Advertisement

Quick Links

cit/m
2
£)m 4));:miLt:=I
USERS MAN,UAL

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CP/M 2 ZSM Assembler and is the answer not in the manual?

Questions and answers

Summary of Contents for Vector Graphic CP/M 2 ZSM Assembler

  • Page 1 cit/m £)m 4));:miLt:=I USERS MAN,UAL...
  • Page 3 ZStt ASSEMBLER FOR CP/M Version 2.5 USER' S MANUAL Revision A February HJ, 1980 CP/M is a registerd trademark of Digital Research.
  • Page 4 Vector Graphic to notify any person of such revision or changes, except when an agreement to the contrary exists.
  • Page 5 This manual is intended for ASSEMBLY LANGUAGE programmers. It assumes a moderate technical knowledge of small computers, and familiari ty with the basic operation of the Vector Graphic system, the CP/M operating system, and z-sa instruction set. This manual will describe the operation of the ZSM Assembler for CP/M, including all pseudo operations and syntax.
  • Page 7 Calling ZSM from CCP •••••••.•.•••••.••••••••.••••••.••.•••••• eleInents.· ...•..•.•.•.••..•..•..•..•..•. I..anguage Constants •••••••••••••••••••••••••••••••••••••••••••••••••••• O~rators ••••••••••••••••••••••••••• '••••••••••••••••••••••••• Registers Pseudo-ops •••••••••••••.•••••••••••.•••••••••••••••••••••.••• .Assembly errors •••••••••••••.•••.••.••.•.••••••.••••.•.•••••• 2-11...
  • Page 9 Z5Mfor cP/M is a program which converts z-sa assembly language text (source code) into a sequence of machine language instructions (object code). latter can then be loaded into the corrputer's rnerooryand executed. Z8Mis a "disk to disk" aSSembler, meaing that it takes a named source file from a disk...
  • Page 10 This section is included for users already familiar with Z8Mfor CP/M. ZSM 2.5 clears up the problems in version 2.2. Problems corrected are as follows: Print-file output Pass 1 errors now print only once, not twice. Tab characters in the source file are converted to spaces properly.
  • Page 11: Calling Zsm From Ccp •••••••.•.•••••.••••••••.••••••.••.••••••

    2.1 Calling ZSM from CCP (the CP1M executive) Make sure you have a CP/M 2 System Diskette in drive A, from which you have done a wann or cold boot. Make sure your source file is on a diskette in one of the drives.
  • Page 12 Thus, the command28MUSERCU8T • (return) indicates that the source file .ABC U8ERCU8T.ASM is to be taken from disk A, that USERCU8T.HEX is to be put on drive B, and that U8EROJ8T.PRN is to be put on drive C. The command28MU8ERCUST.ABX (return) is the same except that it prints listing...
  • Page 13: Constants ••••••••••••••••••••••••••••••••••••••••••••••••••••

    The OPERANDS vary. There can be any number of them, depending on whether they are operands for an opcode or a pseudo-op. There are also instances where there are no operands, and therefore this field can, in some cases, be omitted. If more operands are supplied that are needed, the extras are ignored.
  • Page 14 2.4 Operators ZSM recognizes 10 operators. '!hey are as follows: addition subtraction, or negative (as in -1) multiplication division modulo (remainder of division) & logical AND logical OR logical EXCLUSIVE-oR > rotate right (1101018>3 yields 1011108) < rotate left (11101108<1 yields 11011018) All arithmetic operators treat their operands as unsigned 16-bit quantities, and answers are truncated to 16 bits.
  • Page 15: Registers ,

    Registers The Z-80 has a number of registers, all of which have a specific symbolic reference. ZSMsupports these references, as follows. register register Also may be called DE for register-pair instructions register register register Also may be called HL for register-pair instructions register accumulator -...
  • Page 16: Pseudo-Ops •••••••••••••.•••••••••••.•••••••••••••••••••••.•••

    Pseudo-ops ZSM supports a large number of pseudo-ops. They will be explained now. The ORG pseudo-op specifies where the object code is to be put. Assembled code and data is assembled starting at the address specified as the operand to the ORGpsuedo-op, and proceeds upward,...
  • Page 17 Request value The REQpseudo-op is similar to the EQU pseudo-op, only instead of an explicit value being specified, the system console is prompted for the value. pranpt is specified as the operand. For example, TEST: REQ'Input:' Input: to be displayed on the console during pass 1 of the assembly. The operator must then type the value to be associated with the label.
  • Page 18 If false - conditional assembly The block of code following the IFF pseudo-op will be assembled only if the operand evaluates to 0. If true - conditional assembly The block of code following the 1FT pseudo-op will be assembled only if the operand evaluates to anything other than 0.
  • Page 19 The DT pseudo-op allows ASCII text to be put into memory. The desired text IIlJst be enclosed by single quotes. For example, TEST: DT' ABCDEF' Define text tenninated high The DTHpseudo-op is like DT, only the last character is ORedwith 80H before it is written out.
  • Page 20 Type TITLE <title>, with no quotation marks around <title>. For example, TITLE 'Ibis is a program will cause "This is a program" to print at the top of every page in the assembly listing. This pseudo op sets the radix for all numbers used in the source program which do not have a specific number base designation such as H or D attached.
  • Page 21: Assembly Errors •••••••••••••.•••.••.••.•.••••••.••••.•.••••••

    There are ten assembly errors. Note that an error doesn't necessarily cause the program to assemble wrong, particularly if the error is a syntax error something like a TAB statement. Nevertheless, all errors should be avoided. The errors are as follows. Argumenterror This is caused by an invalid character...
  • Page 23 AP'ENCIX A coce ASCU CHART Standard' CQd. Standard Amwican IntlrChlng& No. X3.4-1968 of Ame,;CItI , • .ASCII: IntorrnaUQft Naticnai Standardllnfti1utao II,. 1" '\ 0 "0: Bits 1 I 1 t"i3~~, ••• +.ew+ • I SP 0000 NULi DLE: 000.1 ~. CI SOH! Del I»...

Table of Contents