including page headers, line numbers, and hex code.
The listing will be generated on file 'filename.l'.
code (binary) will be produced in file 'filename.b'.
Source code format:
The case of all mnemonics, symbols, etc. is ignored (upper and lower case may be used interchangeably). Lables must start in column 1 and may be terminated by a space, tab, colon, or new line. Lables may contain numbers, letters and '_', and may not start with a number. Comments are indicated by a preceeding ';' or '*', or by starting after the last field of an op code. For example, all of the following are legal:
label: mov a,b ;comment
*comment
;comment
lab mov c,a *comment
lab_2 lxi h,100h comment
Blank lines are ignored. Numbers
are assumed to be decimal, unless they are followed by a H (or h) for hexadecimal, or Q (or q) for octal. Note that hexadecimal numbers begining with digits A F must be preceeded by a 0. The assembler evaluated expressions strictly from left to right, and maintains only 16 bits. Legal operations include:
Unary ops:
negative
~ complement
Binary ops:
+ addition
subtraction
* multiplication
/ division
& logical and
| logical or
^ exclusive or
< shift left
> shift right
Byte values (eg for MVI) must resolve to one byte (8 MSB = 00 or 0FFH). Operations with relocatable lables and public symbols are currently resticted to addition (or subtraction of two relocatable symbols).
Pseudo ops include:
label DB (byte expression),...(byte expression) ; any number of bytes
label DW (expression),...(expression) ; any number of words
label ASC "......" ;characters with any delimiter
label ORG (expression) ;sets assembly location if expression
; is absolute, then all code is non relocatable, although
; if 'R' option is specified, then object code format is
; generated.
label EQU (expression) ;assigns value of expression to label
label DS (expression) ;reserves (expression) bytes
; expression must be absolute
PUBLIC (label),...,(label) ;assigns one or more labels to
; be public. Meaningless if R option not specified. If
; label is not defined in the module, then the linker
; resolves references to this label (ie it is external).
INCLUDE ;the assembler will read source from
; the specified file untill the end of file. Include
; files may be nested 3 deep. Filenames must include
; extents.
Note that lables are optional for all but the EQU pseudo op.
The assembler generates diagnostic error messages to the terminal durring assembly, and ends with an indication of table usage.
LINK
This program links together object modules generated by ASM85, relocates addresses, resolves publics, and generates binary code. Input modules must have extent '.o', and the output file will have the name of the first module with extent '.b'.
Invocation:
LINK
...
Filenames must not include extents.
The linker displays diagnostic error messages, and ends with an indication of table usage.