forked from shattered/macro11
-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
187 lines (143 loc) · 8.3 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
A MACRO-11 assembler for the PDP-11 in portable C source code.
Copyright (c) 2001, Richard Krehbiel
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
o Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
o Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
modified 2009 by Joerg Hoppe,
modified 2015-2017,2020,2021 by Olaf 'Rhialto' Seibert.
Files:
macro11.c Command line parsing and driving the passes.
assemble.c Handles all of the opcodes and directives.
assemble_aux.c Helper functions mostly called from assemble().
assemble_globals.c Global variables for assemble().
extree.c Expression tree: memory management and evaluation.
listing.c Listing generation.
macros.c Define macros and make them available as stream2s.
parse.c Basic parsing for numbers, labels, strings, expressions
rept_irpc.c stream2 subclass for processing .REPT and .IREPT.
object.c Functions for writing RSX-11 compatible .OBJ files.
mlb-rsx.c Classes (!) for reading RSX-11 macro libraries.
mlb-rt11.c Classes (!) for reading RT-11 macro libraries.
mlb2.c Glue functions for macro libraries in general.
stream2.c Functions for managing input streams and buffers.
rad50.c Functions for converting text to and from RAD50.
util.c A few general utility fuctions.
macro11.h, object.h, mlb.h, stream2.h, rad50.h, util.h
types and symbols exported from the associated sources.
dumpobj.c A program I wrote to examine the output from
RT-11's MACRO.SAV program and compare it with my
own output.
Makefile A GNU makefile for Linux; simple enough, it
should be convertible to any Unix.
Contains automatic dependency generation.
macro11.dsp, dumpobj.dsp, macro11.dsw
Visual Studio 6 projects. Out of date.
README This file
LICENSE The copyright notice and license
CHANGES A list of changes from previous versions
TODO A list of things that may need fixing
Notes:
Sorry, I am a believer in 4 column hardware tabs, for a number of
reasons, mostly regarding editing convenience. (I did untabify this
README file though.)
The bulk of Richard's development was done in Microsoft Visual Studio 6,
but currently Olaf maintains it using a Unix (NetBSD) system. I build
with gcc and a lot of warning options, and from time to time check with
a Linux system which has a different gcc version, and clang. The Visual
Studio project files are out of date.
Richard used the MACRO11 from RT-11 as reference, but I use the one
from RSX-11M+. It turns out there are some small file format
differences. I used the dumpobj command to compare the output of this
macro11 with the reference version when assembling Kermit-11 source
files, and currently there seem to be no significant differences.
The macro11 command line:
macro11 [options...] files...
Options:
-v Prints program version.
-e opt .ENABL option. Implemented options are AMA, GBL,
and also .LIST options ME, BEX, and
MD, though the status of listing control is
presently very poor.
-d opt .DSABL option; same options as -e.
-m macname Gives a macro library name.
Up to 32 macro libraries may be specified, one per
-m option.
The current object file format (default, or from
-rt11 or -rsx before this option) is used first to
read the file; if this fails, the other format is
tried.
Note: unlike MACRO.SAV, SYSMAC.SML is not
automatically included; you must name it.
-p macpath For any .MCALL <macro> directive, macro11 will
first search -m macro libraries, then it will
search the MCALL path for a file named <macro>.MAC
to locate the body of the macro. The MCALL path
is an environment variable containing directory
names separated by delimiters (":" for Unix-style
targets; ";" for Windows). The -p command line
options appends a directory name to the MCALL
path.
-I incpath For any .INCLUDE <file> directive, macro11 will
search the INCLUDE path for a file named <file>
to include. The INCLUDE path works like the MCALL
path. If not specified at all, the default is the
current directory. If <file> contains a drive
and/or directory in RSX/RT-11 form
(DEV:[DIR]FILE.EXT) then the search is also tried
without DEV: and without DEV:[DIR].
-o objname Gives the name of the object file. No extension
is assumed; if you want .OBJ you have to say it.
With no -o option, no object file is generated.
-l lstname Gives the name of a listing file. The name "-"
may be given to write the listing to stdout. No
extension is assumed; if you want .LST you have to
say it. With no -l option, no listing file is
written.
-x Tells macro11 not to assemble anything, but rather
to simply extract all the macros in all the -m
macro libraries into individual .MAC files in the
current directory. This should be the last option
given, as none following will be processed.
This also works for extracting an object library
(.OLB) file.
-rsx Tells macro11 to generate rsx style object files.
This is the default.
-rt11 Tells macro11 to generate rt11 style object files.
Various options starting with -y enable extensions:
-ysl <num> Allow longer symbols up to the given length.
The maximal allowed value is 64.
-yus Allow underscore in symbol names.
-yl1 Include the processing of the first pass in the
listing file. This may be useful for finding
phase errors.
files... Any number of input files. They will be assembled
as if they were concatenated together.
You may define the MCALL and INCLUDE environment variable prior to
invoking macro11, as a path to directories containing macros or files to
be included, respectively.
=======================================================================
Included in subdirectory obj2bin is a Perl script from Don North,
copied from https://github.com/AK6DN/obj2bin. The copied version may
get out of date; when in doubt check the original.
=======================================================================