QUICK REFERENCE FOR SPASM (SINGLE PASS ASSEMBLER) UNDER CP/M-80 Written by: Harris Landsberg (C) Copyright 1986,1987,1988 This documentation will aquaint you with the basics of the SPASM software package. It has been extracted from the more detail documentation previously written. Please refer to the SPL Language Manual for more detail about module interfacing in object libraries. SPASM.COM requires CP/M-80 Version 2.2 or higher. The cross-assembler SPASM80.EXE requires MS-DOS Version 2.0 or higher. SLINK.COM (or SLINK80.EXE) is required to link the object files that are created with SPASM. SPASM is a single pass assembler which means it only makes one pass through the source to produce the object code file. In most other assembler require two or more passes. The code that is generated is fully relocatable containg the necessary symbol imformation to produce a command file from multiple object code files and use common libraries to extract only imported modules that are necessary for the load module. An optional Librarian, SLIB, can optimize a object file to remove symbol references that should not be global. It can also create library files by combining one or more modules from one or more object code files. This is similar to having multiple modules within an assembler source. A: INSTRUCTION SET SPASM uses the standard INTEL 8080 mnemonics with no extra modifications for the Z-80 opcodes. It does not contain a macro facility. All labels defined or used are global. It does not use EXTRN or ENTRY instructions, but implies it. Most assembler source written for the standard CP/M ASM.COM program will run without requiring modifications. SPASM statement format is: Label Operation Operand ;Comment where any or all fields may be absent. A ':' (colon) may follow a label, but is not required. Only one operation is allowed per line. Only addition, subtaction, multiplication, division can be done on operands that are not registers. Numeric constants may be decimal or hexidecimal if followed by a 'H'. All symbols are changed to uppercase and significant to 31 characters. The '$' by itself implies the current CODE counter and can be used in word sized operands. SLINK defines ?CODE ?DATA ?HEAP so they should not be defined, but can be referenced. B: PSEUDO-MNEMONICS The following, in alphabetic order, are the pseudo-ops for SPASM. There are two segments: CODE and DATA. CODE contains all the relocatable and absolute text segments while DATA contains the uninitilized main storage section. All opcodes are implied to the CODE segment, if they generate code or use space, except the VAR opcode which is for variables and defines the usage of the DATA segment. SLINK combines the segments. DB [,...] Defines a byte storage area for constants. Can be a single or multi-character string. Strings begin and end with a ' only.