Asm85 Relocating Cross-Assembler for the ibm pc



Yüklə 13,47 Kb.
tarix08.10.2017
ölçüsü13,47 Kb.
#3539

ASM85 Relocating Cross Assembler for the IBM PC

                                               


D.W.Curtis April 1984 Document version 1.0

This document describes the ASM85 relocating cross assembler. ASM85 generates 8085 object code in either absolute or relocatable format. Relocatable modules may be linked together by LINK. Object code generated either by ASM85 or LINK is in binary format, suitable for down loading to a mini osmonitor or equivalent development system. A program called 'MINIOS' is available to control the minios monitor (down load code, program roms, etc).

ASM85, LINK, and MINIOS were written in the C programming language for use on an IBM PC computer. A small segment of ASM85 and LINK were written in 8086 assembly code for efficieny, but this segment may easily be re written in C for transportability. The serial port driver section of MINIOS was also written in 8086 assembly language.
ASM85 Assembler

               


This assembler implements the INTEL standard 8085 instruction set, together with the instruction set additions (SLDE, DSB, etc.). Source files must have extent '.a', with the exception that include files may have any extent. Object files (relocatable format) have extent '.o', and binary files (absolute code) have extent '.b'. Listing files have extent '.l'.

ASM85 is invoked by:


ASM85 [options]
has no extents, but may include drive id and/or path name.

Options are:


L   (or l) Will cause the assembler to generate a listing file

including page headers, line numbers, and hex code.

The listing will be generated on file 'filename.l'.

R   (or r) Will cause the assembler to generate object code

format (relocatable) for the linker in file

'filename.o'. If this option is not used, absolute

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.







Yüklə 13,47 Kb.

Dostları ilə paylaş:




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə