• Keine Ergebnisse gefunden

(1)t l t t f t $ i f t j l 0 t i g

N/A
N/A
Protected

Academic year: 2022

Aktie "(1)t l t t f t $ i f t j l 0 t i g"

Copied!
65
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)t l t t f t $ i f t j l 0 t i g. f 6 i 0 t \ I 6 k I \ á I I t I. t b t I f F t ( l É } 0 t I I t. t t ? E I b Q t t l \ l l t I b. t I I I t t I I ¢ ó } b t ó t t. t t I I t $ I l l g i b E ó t Ó. 0 t ? 6 J ) I j I l \ I ó t 0 I. l I 0 t $ $ C l I t I I I l I j. l i ! I I i J I I I ) t I 6 l q. I I q $ 0 t 4 i l t I q C d I l. 0 t I I I ) I I [ ó I 0 I i P t. t I $ i t } P I ! 0 ) I t L l b. ? E I I t l I l f I I t l l 0 t. I l I I l i t ¢ I 4 ) l P ¢ f l. t t I § t $ l I I I ) t I l k I. t I I i E } t t Q 0 I t P t g l. and. ZAS. ! I Q i t á ¶ l P I \ ó l $ 0 t. I t t I g J t I t k ) 0 I I g i. E t t i I l t P r I k t I I g t. t t t I t I C t Q t ) I S Ó f l. h l 0 t R i t i t l b t I $ t ó. I l 0 I t l Y 0 0 t y l I I ¶ I. ( I y t l t ¶ 4 t I p P t t t t. g l I l t j ¶ I P l ) l t t ? l. t t I b t i I t ) l } I I t t l. P I E t I } P t I I b t t i $ t. t t I 0 t b E I I q ) 4 I t ? I. t t t 0 t t C E I t r 0 t t t I. I ) ¶ C I t ¶ l P I Y $ I I h t. t Ó I I P ) 1 I t g y t t l I $. ZLINK. Relocating Macro Msembler and Linker for Z80 and HD64180. Written by Patrick O'Connell. *. t S { I i t l ¢ t t ) l I t 3 Ó I t S I 4 t I 4 T t P b g t ? I 0 0 q t F y f I Ó I t ¢ l } S I I 7 P t i $ ) 0 I i g t t t i l ( I I t I b t I I t 4 ¡ I t I ( I g I l Q I t g P I 6 g l t Ói [ Q r b ¢ l ) t 3 6 I J I l i P ) t I f ¢ t I l I Q I I. l f e l t I t 0 I t 6 t l I ¶ l ? I i I t $ q l I i ó l t ? t t F t l I $ I l I t ) I l I f ó 4 I I S I t I i I l i S F ó ó ¢ t I 0 ó g l t I i I I I 0 ó l P ó E b t I ¢ t Ó I r l C t I L b I b E t ÓS l f I t t I t I t I t r t r I i Q P l l I 4 i $ P t g I 4 I g I t Ó I l I l I t t l t 0 t 0 l l C l t l l t ¶ I g B ÓP I I t I ÓI t I P Ó€ I t J I t I I Ót t I i I I t i t I I I k I i I l C t P I T t j Ót 9 t I l I l t t I k I l q t t ) t I E I f 0 t I F b t t P q t I t I g t Ó1 i l I t b t l $ I f j g i ¢ t ) l I t g l ) I 0 l G P t I l L l $ I i E C I P I I I t I É q ¢ } ) I. I S I t ¶ 1 ó l r I t I t k t l t l I l 8 6 t I f f I l t i I l f I i I ¶ I Ü I I C I i J i I t ¥ I t I I q $ t E I Ók f l t I { I I I I b I l ( t l i f I t I I I B L. I t t t I l i I I I t I 0 l C ó É ( r f ¶ Ó t i I E I I t t b I 6 i I t l ! I 6 q 6 J I t I l I t T ? i I t I t I ) t I t I I 4 t l I t t I t I f t 0 t b i I t I 0 ¶ I Ól I I t I 0 t b l 6 0 0 t q t q b f l i 6 l 6 t l [ I l I l I t l Ót l r t l l 6. i I I Ó t i t 0 g t t I t i t I r t k S [ L 1 b T I E 0 I 4 I i l l 0 t t ) I I t i. { t S Y } I 6 t l t k t f I ¶ t t g ó i E i t i i l ¢ 0 P I t I l k ó j * I ¥ ) q f \ I I k i ó I I ¶ r T t t ó i I ó I 0 0 I ¢ t ¶ t Ó t i I I f I f [ S I t ) P t L l Ó 4 I $ 1 I t $ t t t I 3 l l i I g t I I i I l k l f g t g t I t I ¥ I t q i $ ? I T l l i I l l t ¶ l j b g t i l I I t l r I t 0 T l P b I S I t I I t I l b t 0 t b I F { q P E I I t q p } ) t l t g 0 E t Ó É I j I t i t E I F t I i L I I I ? t i 0 t I t ÓQ I g Q t t I 0 l ) k i b I ) 7 I ) I P I l d i I t g t P t P C [ I Ó t I ¢ 0. $ E I i t ) 1 l C t E I I l I l E I I t ¶ l I l ¢ F P q t i I l P t i I l 6 J t t F { t I O I Ü t t t l I L I 4 ( t I l } t 4 i i P Ód I t Ói I I I ) t ¶ Q I T t ) q. $ $ S t I I ) ó b i } I t $ I ¿ t I f ó L l t I I 1 I F l t I t I l F I Ót I É y Üi I t I ] ó ÓQ f ¢ t l I t I ¶ q f Ót Ó É $ I I t t I I I q t 1 I i l t I l t t i 5 { I L $ t ¶ t q t l t I f h l l 4 t I 4 I 4 t ) Ó$ I r i P t I S i t ? t l 1 t I t I l 0 l ? k t I I I C l t ) t Ót t I : t I l i I 0 I t I t I t b i t ? 0 l ) Ó I. b i k I I E I d f 0 l ó l t j C t t I I Qf l q i l I t I ? t l b P É d I t l I r I l S 1 ¶ l k 0 r t I I \ t C t I I t ¶ I L I f t Ót t i I t t t t I t I l I I I j (. Echelon,. Inc. First Street Los Altos, ca 94022 101. 415/948-3820. I J t t ) t f t I L i t i Ó f b t i [ 0 I b. i i t b ) É g 4 ? t t { I t E ( I I 0 I t t. I I ! i t l f I t l E t ¢ l t t S l T I ) b. C i I b I I I 0 ! C I t I t l I L I t t S t. I i P 0 $ i t i Ó l t I t I t Ó S l l I I t. t t I I Ó i I k t ( y i f l C I Ó É t i t q. I f I l t J t b J I E q t I l t I t l I I t. t t I i q l t t E t l k g i t b l Ó S Ó t ó. I É t I t l t ) I L t I t I ¶ 0 0 Q I I ¶ l. F I f l B 0 F á i t i I f t I t l I I I l 0. f l f q l l t l l l t I ¶ l e t I i I i I á. t $ T ó I I E t t t I I P b t I i I ¢ l t I. I I f l : i [ l 7 l t I I t ¥ I I t i b g B. f t F t 6 l l k I L f l 7 l I t t I f t F t. I I I Ó 0 Ó C I t { E i i i t 6 g t t Ó J i. 0 l I k t I ) I $ t l } ) I C l I I t g 0 4. I I F t I t I I f l t L ; g t t i i B S I t. t I I Ó E i y ¢ g S t I t I t I t t 0 t ? E. E t ¢ I l l r I t t t I 0 ¢ t t ¶ b t É I J. I J f t g I ) l I t I l I I f I t I i t t 4. I t Q ! i I t I 0 t ¢ l E 6 4 $ l k [ I l 0. ¶ i r I 0 l t S i S I ) f i f I $ l I t C t. t d ¢ t I I t t 0 t f I C t Y i ¶ b t l 1 I. g t l I S t f I i S t I g I $ I C I t t t l. t I t I t ) r I t $ E I E i l t g Ó t l I J. 0 0 f i t t I t ¶ I I t I I I b I t $ l P t. E Ó P t g t t I I $ S I ¶ t \ t I i t Ó I I. t I ¢ i g I f i P I I t g I $ I 0 I t q 6 I. 1 Ó t t t ( C t t I i l P i S t y t I É I b. f t t Ó Q g 0 i $ b t t B b f $ ¢ $ q S I t.

(2) R E. L. O C A T. T N G. M. A C R O. A N D. L. I. A S S E M B. L. E R. N K E R. for Z 8. O. H D 6. A N D. 4 1 8. O. by. Patrick O'Connell. No Zlink, Zlib, Zcon, Zref are Copyright 1984/85 by Mitek. in any way or by any part of this document rnay be reproduced means without prior written permission of the publisher. Address requests to Echelon, Inc., 101 First Street, Los Altos, CA. Zas,. 94022.. Rev. 8/29/85.

(3) Copyright 1984,'85 Mitek Reserved Rights All. WARNING LAW COPYRIGHT BY U.S. AND/OR REPRODUCTION SALES FINES OF MAYRESULT IN IMPRISONMENTOF UPTOONE YEARAND INERINGERS MAY ALSO BE COPYRIGHT UP TO $10,000 (17 USC 506). TO CIVIL LIABILITY. SUBJECT. THIS. SOFTWARE AND MANUAL ARE BOTH PROTECTED 17 UNITED CODE). UNAUTHORIZED STATES. (TITLE. LIMITED. WARRANTY. IS,". WITHOUT PROGRAM AND INSTRUCTION MANUAL ARE SOLD "AS OR FIYNESS FOR MERCHANTABILITY, \ÑARRANTy AS TO THEIR PERFORMANCE, AND ANY PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE RESULTS PERFORMANCE OF THIS PROGRAM IS ASSUMED BY YOU.. THIS. HOWEVER, WARRANTS THE TO THE ORIGINAL PURCHASER ONLY, ECHELON ON MAGNETC DISKETTE WHICH THE PROGRAM IS RECORDED TO BE FREE FRON DEFECTS AND FAULTY WORKMANSHIP UNDER NORMAL USE FOR IN MATERIALS A PERIOD OF THIRTY DAYS FROM THE DATE OF SHIPMENT. IF DURING PERIOD THE DISKETTE SHOULD BECOME DEFECTIVE, THIS THIRTY-DAY IT CHARGE. WITHOUT MAY BE RETURNED TO ECHELON FOR A REPLACEMENT YOUR SOLE AND EXCLUSIVE REMEDY IS IN THE EVENT OF A DEFECT EXPRESSLY OF THE DISKETTE AS PROVIDED LIMITED TO REPLACEMENT ABOVE. OR FROM ACCIDENT IF FAILURE OF A DISKETTE HAS RESULTED ABUSE ECHELON THE SHALL HAVE NO RESPONSIBILITY TO REPLACE DISKETTE UNDER THE TERMS OF THIS LIMITED WARRANTY. ANY. RELATING IMPLIED WARRANTIES TOTHE DISKETTE, INCLUDINGANY AND FITNESS FOR A PARTICUIMPLIED WARRANTIES OF MERCHANTABILITY LAR PURPOSE, ARE LIMITED TO A PERIOD OF THIRTY DAYS FROM DATE OF OR SHIPMENT. ECHELON SHALL NOT BE LIABLE FOR INDIRECT, SPECIAL, CONSEQUENTIAL DAMAGES RESULTING FROM THE USE OF THIS PRODUCT. DO OR SOFIE STATES NOT ALLOW THE EXCLUSION LIMITATION OF INCIDENDAMAGES, SO THE ABOVE LIMITATIONS MIGHT NOT TIAL OR CONSEQUENTIAL. APPLY TO YOU. THIS WARRANTY GIVES YOU SPECIFIC YOU MAY ALSO HAVE OTHER RIGHTS WHICH VARY FROM. Trademarks:. LEGAL STATE. RIGHTS, AND TO STATE.. Zas, Zlink, Zlib, Zcon, Zref, Mitek; ZDM, RD Software; DSD, soft Solutions; Z-System, Echelon, Inc.; Z80, Zilog, Inc.; HD64180, Hitachi; CP/M, DDT, SID, ZSID, Digital. Research,. Inc..

(4) TABLE. Chapter. Chapter. I1.1. INTRODU«ION...................... Overview. 1.2 1.3 1.4. Distribution Installation. 2. ZAS ZAS ZAS. 2.1 2.2 2.3 Chapter. Chapter. Updates. INV=TION.................... 1 1 1. 2 3 3. 3 4. 3. PROGRAM. 5. 3.1 3.2 3.3 3.4. Label Field Operation Field Operand Field. 4. 4.5 4.6 4.7 4.8 4.9 4.10 5. 5.1 5.2 5.3. Chapter. Software. Files. 1. Operation Options Assembly Statistics. 4.1 4.2 4.3 4.4. Chapter. OF CONTENTS. Comment. FORMAT................... Field. 5 5 6. EXPRESSIONS....................... 7 7 7 7 8 8 8 9 9 10 11 12 12. PSEUIX)-OPS........................ 13 13 16 16 16 17 19 20 22 22. Numeric Constants String Constants Character Constants Labels 4.4.1 Label Characteristics 4.4.2 Relocation Bases Relocation Counter Reference Registers Operators Precedence of Operators Parentheses Versus Brackets Expression Restrictions General. 5.4 5.5 5.6 5.7. Pseudo-ops Pseudo-ops Conditional Assembly Pseudo-ops 5.3.1 IF Pseudo-ops Evaluation 5.3.2 Conditional Assembly Forms Linkage Pseudo-ops Base Relocation Pseudo-ops Macro Pseudo-ops Special Function Pseudo-ops. 6. MACRO. 6.1 6.2 6.3 6.4 6.5 6.6. 5. Listing Control. FACILITY................... Repeat Macros Stored. Macros. Exiting Macros. Local Symbols Macro Invocation Parameter Evaluation. 23 23 25 25 25 26 26.

(5) TABLE. Chapter. CHAPTER. CELAFTER. 7. ZAS. 7.1 7.2. Non-Fatal Errors Fatal Errors 7.2.1 General Fatal Error Messages 7.2.2 Macro Fatal Error Messages. CHAPTER. ERROR. MESSAGES................ 29 29 30 30 30. GENERATION........ 31 31 31 31. 8. CROSS-REFERENCE. 8.1 8.2 8.3. Overview ZREF Operation Reserved Symbols. 9. CODE Code. 9.1 9.2 9.3 CHAPTER. (continued). OF CONTENTS. 10. Operation. Converter. Convertible TDL Pseudo-ops Error Messages. 35 35 35 35 36 37. LINKER............................ 10.1 10.2 10.3 10.4 10.5. Overview ZLINK Operation ZLINK Options Define Next Free Memory ZLINK Error Messages. li11.1. LIBRARY. 11.2 11.3 11.4 11.5. 33 33 33 34. CONVERTER.................... Location. 39 39 39 39 39 40. MANAGER................... Overview ZLIB Operation ZLIB Options ZLIB Messages ZLIB Error Messages. Appendix. A:. Z80. Mnemonic. Appendix. B:. Software. Appendix. C:. Pseudo-op. Appendix. D:. Hitachi. Machine. Update. Form. Summary. HD64180. Mode. Instruction. Codes.

(6) CHAPTER 1 INTRODUCTION. 1-l ZAS. OVERVIEW (Z80. language. and HD64180 Relocating from a disk statements. Macro Assembler) file and produces. reads. assembly. Intel These Microsoft compatible file file. CP/'M can then be loaded using Echelon supplied files or LOAD, A command or any Microsoft object compatible linker. (SYM) symbol table be used is optionallyproduced that can file with Echelon DSD or Digital Research SID and ZSID debuggers. compatible. The. minimum. HEX. Z. 48k-bytes of. or. or. RAM. a. either. in which to use. system configuration with one disk drive.. CP/M. soon as you receive ZAS, make backup copies! the installation process using a copy.. As. 1.2. DISTRIBUTION. You. will find. 1.3. an. REL MLOAD,. Then. go. ZAS. is. through. FILES the. following. files. distribution. on your. File. Function. ZAS.COM. Assembler. ZLINK.COM. Linker. ZLIB.COM. Library Manager. ZCON.COM. 8080. ZREF.COM. Cross-reference. TEST.Z80. Test Assembly. INSTZAS.COM. Installation. to. Z80. Code. disk:. Converter Generator. File Program. INSTALLATION. The. installation program was designed to set assembler output opThe tions. Type in INSTZAS to invoke the installation program. options. described. on. the next page. will. appear. on. the screen.. Page. 1.

(7) CHAPTER. I:. INTRODUCTION. INSTZAS<c,r>. ZAS. installation. 1.. Listing to terminal. 2.. Listing to disk. 3. 4. 5.. options: -. off. file - off Listing to printer - off Generate object file - on Generate symbol file - off. 6.. object. 7.. IF trueness. 99. Enter. file. Changes. option. type based. on. - rel - least significant. bit. complete number. to change:. preset values for different options is indicated to right of option. To change (toggle) an option value (i.e., on to off, rel to hex, or least significant bit to all sixteen bits), simply enter option number (I to 7) followed by carriage return <CR>. When desired option changes have been made, type in 99 to end installation program and have ZAS.COM automatically updated. The. 1.4. SOFMARE. UPDATES. assist in refining ZAS by recommending enhancements and reporting any software problems on a copy of the Software Update Software updates will Form, a sample of which is in Appendix B. be provided intervals for a nominal fee. You will be at regular notified by Echelon when software updates are available. You. Page. can. 2.

(8) ZAS. 2.1. ZAS. ZAS. is invoked by typing:. 2 CHAPTER INVOCATION. OPERATION. ZAS. filename.filetype. filename is the name of the source file to be assembled. filetype is specified, then Z80 is assumed. Typing ^C will If cancel ZAS operation. where no. 2.2 A. ZAS. OFTIONS. variety. execution command. of options are available to provide control over parameters of ZAS. They are used once at the end and line spaces are not allowed between options: ZAS. filename. the of a. {$}options. and reference non-disk options of options: Using the non-disk reference options disk reference options. settings supplied by the Install Program and inreverses the cludes the C, H, and L options. There. are. two. types. Option. Setting the option will page the output of Pressing any key allows you to at 23 lines per page. continue through the output page by page. However, to scroll should be noted that a ^C will abort the assembly. C: CRT ZAS,. C. it. H: generate Hex Option. When this option is set Intel REL compatible hex files instead of Microsoft compatible files. Note: When using HEX files, you must have an ORG statement of 1OOH or higher to prevent an inverted address error from MLOAD or. it will. LOAD.CON!.. L: Lístíng to Printer Option.Z Setting the L option formatted assembly listing to or CP/M LST: device.. sends. a. reference option"s require two characters. The first The second characis the P, O, or option characters. the specified option. ter indicates the output bedisk driveZ, for The second character where must A-P or (for zero or null) suppresses the output altogether. The disk character. S. Z. The object File Generatíon (filename.REL or filename.HEX). Depending option specifies the disk for object file output. on the option, the object file will be a Microsoft compatible REL file or an Intel compatible HEX file.. o:. O. H. P: a. Lísting to a PRN formatted assembly. Symbol fieS output. S:. The option will File (filename.PRN). the specified disk. listing to. File Generatíon Echelon disk for. P. (filename.SYM). or DRI compatible. The S SYM. send. option speci-. fije.. Page. 3.

(9) CHAPTER. 2.3. 2:. INVOCATION. ZAS. ASSEMBLY. STATISTICS. At the completion of an assembly, ZAS provides several The output on the program assembled. is as follows: Assembly. statistics. statistics:. nnnn lines nnnn labels nnnn macros read nnnn macro expansions nnnn errors nnnn free bytes where. nnnn. is. a. decimal. number.. +. Page. 4.

(10) 3 CRAFTER pRcmAMFoRMAT. Acceptable the form:. input consists of. program. sequence. operand. operation. label. a. in. of statements. comment. by one or more spaces and/or tabs. field is separated begin in any column except for and may fields are optional All is the label field which must begin in column one. The statement feed and a by a allowed but where each. is line carriage return may also insert blank lines into the program.. terminated. not necessary.. You. for macro. except may be either upper or lower-case statement formal and the parameters. For macro parameters, actual be take place. must in the same case for substitution to The. 3.1. LABEL. t. FIELD. take. Labels. the. parameters. form:. label. or. label:. optional except for the SET, EQU, and MACRO assembler The a ?, directives. label consists of alphanumeric characters, be $ the numeric. and the first character must not an or a If 15 characters then the label is truncated to the label exceeds be either upper-case Labels can or lower-case. The ": " right. Examples of labels include the following a label is optional. following:. and are @,. a123 aLL:. All? 3.2. ?al23. @a123. ?ALL: INDEX. updatefile UPDATE$FILE. FIELD. OPERATION. of the following three: a mnea pseudo operation code which instruction assembly The Z80 mnemonic directs the process, or a macro. machine instruction codes are listed in Appendix A and Hitachi HD64180 instruction codes are list-ed in Appendix D. The assembler pseudo-op 5, with a codes are discussed in Chapter C. Appendix And the summary of the pseudo-ops macro listed instructions are discussed in Chapter 6. The. operation. monic. machine. field. 3.3. OPERAND. FIELD. The. operand. field. contains. may. one. code,. contain. numeric. constants,. character. con-. stants, ASCII strings, relocation counter references, labels, register references, operators, or expressions containing any combination Expressions of the previously mentioned items. are further described in Chapter 4. Page. 5.

(11) CHAPTER. 3:. PROGRAM. FORMAT. 3.4 comENT FIELD comment field is always preceded by a semicolon (;). Comments are ignored by the assembler but are useful for programmer documentation, and later, debugging. A. Page. 6.

(12) 4 CHAFTER EXPRESSIONS. Before the pseudo operations and macros can be described, is necessary to discuss expressions because of their complexity. Expressions consist of simple operands combined into properly. it. formed sub-expressions by operators. Blanks and tabs are ignored Each between operators and operands of the expression. expression produces a 16-bit value during the assembly. only 8 bits are needed, the least significant half of the 16-bit value is used.. If. 4.1. NUMERIC. CONSTANTS. numeric The bases.. constant is a 16-bit value in one of several number base, called the radix of the constant, is denoted by Any a trailing radix indicator. numeric constant which does not terminate with a radix indicator uses the default radix which has The radix been initially set to decimal. indicators are:. A. B O Q D H. binary constant octal constant octal constant. decimal constant hexadecimal constant. base base base base base. 2. 8 8 10 16. constant is a sequence of digits, followed by an optional radix indicator, where the digits are appropriate for the radix, i.e., and 1 digits etc. binary constants must be composed of For. A. O. hexadecimal. the. leading. digit must be a decimal digit hexadecimal in order to avoid confusing the constant with an (a leading O will work). A numeric identifier constant must produce a binary number which can be contained within a 16-bit value. 4.2 ASCII. constants,. STRINGS. String constants. represent and are sequences of ASCII characters, by enclosing the characters apostrophe symbols within ('). All strings must be fully contained within the current physical line. The apostrophe character itself can be included within a string by representing as a double apostrophe which becomes a single apostrophe when read by the assembler. ("), represented. it. 4.3. CHARACTER. CONSTANTS. Like strings, character constants are composed of O, 1, or 2 ASCII characters, delimited by an apostrophe (') or quotation (") One difference between symbol. strings and character constants is strings are used only with DB, dc, DEFB, and all macro pseudoPage. 7.

(13) 4:. CHAPTER. EXPRESSIONS. all other cases, a character constant is assumed. difference is that the value of a character constant is calculated and the result is stored with the low byte in the address and the high byte in the second address. For first example, in the character constant:. ops. In Another. DW. the value of stored in the. 'AB'. is stored in the second memory location and first memory location. In the string:. A. DB. is. B. is. 'AB'. the value of A is stored in the first memory location and stored in the second memory location. 4.4. B. LABELS. value determined by the type of statement label precedes a macro definition, the label is If a given text value, which is the body of the macro definition. the label precedes an EQU or SET pseudo operation, then the If a label label is given the value of the operand field. If precedes any other type of statement, is given the value of the current relocation counter. A. label is given. precedes.. it. a. the. it. The value of a label is precedes a SET pseudo-op. the number of times the 4.4.1. LABEL. not allowed to change unless the label In which case, there is no limit to label's value may change.. CHARACIERISTICS. into one of three categories: public, external, or fall Public labels are labels defined in the current program. Labels. local.. and can be referenced in other program modules External labels are labels which have been defined as public in some other in the module declaring program module and are being referenced a label has not been declared external them external. or is local and cannot be referenced by any other public then program module. module. it. 4.4.2. REIÁJCATION. If. BASES. symbolic names for independently located memory areas are called relocation bases. These relocation bases may represent ROM, shared COMMON areas, special memory areas such as video mapped I/O, etc. Within each sub-program, each of refresh, memory these memory areas is referenced by a unique name. The actual allocation and mapping of the name to physical addresses is deferred All label references to the link edit and load process. assembled the program are relative to one of these relocawithin The four relocation bases and their typical uses are tion bases. summarized as follows: The. Page. 8.

(14) CHAPTER. 4:. EXPRESSIONS. Absolute: Absolute assembles non-relocatable code. A programmer selects Absolute mode when a block of program code is to be loaded each time into specific addresses, regardless of what else located the same is time. at code for a section of a Data Relative: Data Relative assembles change be loaded into RAM. and may must therefore program that This applies especially to program data areas. Symbols in Data Relative are relocatable. Code Relative: Code (program) Relative assembles code for be changed and therefore sections not of programs that will can be loaded into ROM/PROM. Symbols in Code Relative are. relocatable.. COMMON code that assembles data area. This allows program memory and common values.. COMMON: common. of. To change the relocation ops in a statement line:. base,. ASEG DSEG CSEG COPMON. 4.5. REIÁJCATION. COUNTER. use one. is loaded modules. into a defined to share a block. of the following. pseudo-. Absolute Data Relative Code. COMMON. Relative--default. REFERENCE. The. current relocation counter may be referenced as a l6-bit value by use of the symbol $. The value represented by $ is always the relocation counter value at the start of the current statement.. For example,. JP. will 4.6 When. endlessly. jump. to. $. itself.. REGISTERS ZAS. a one or two character encounters symbol, will look symbol up the in the corresponding 8 or 16-bit register table (see the next page). the symbol is found, then the operand is assumed to be a register reference. Because these single and double character symbols are reserved words, do not use them as. it. If. labels.. Page. 9.

(15) 4:. CHAPTER. EXPRESSIONS. 8-Bit Registers (Reserved Words). 16-Bit Registers. Words). (Reserved. A B. BC DE HL. C D. IX IV. E H. SP AF. L M. I. R. 4.7. OPERATORS. The operands. previously described can be combined in normal algebraic expression using any combination of properly formed and parenthesized operands, operators, expressions. All arithme(+,-,*,/,MOD,SHL, and SHR) produce a 16-bit unoperators tic The signed arithmetic result. relational operators (EQ, LT, LE, (OOOOH) GT, GE, and NE) produce a true (OFFFFH) 16-bit or false And (NOT, AND, OR, the logical operators and XOR) operate result. a 16-bit result of 16 bit-by-bit on their operand(s) Theproducing HIGH LOW and individual bit operations. operators always produce a 16-bit result with a high order byte which is zero. The NUL operator produces a true or false result. for the operand field are given below. In general, operands which and treated are as 16y represent letters unsigned quantities in the range 0-65535.. The. operators. the. x. bit. Arithmetic. Result. Operators x"y x-y *. x x x x x. /. MOD. SHL SHR. y y y y y. arithmetic sum of x and y arithmetic difference between x and y unsigned multiplication of x by y unsigned division of x by y remainder after division of x by y shift left byby y, with zero right y, with zero left shift right. fill fill. Relational. Result. Operators x x x x x x. EQ. LT LE GT GE NE. Page. y, x=y y, x<y y, x<=y y, x>y y, x>=y y, x<>y. 10. true true true true true true. if ifif. if ifif. x x x x x x. equals y, false otherwise is less than y, false otherwise is less or equal to y, else false is greater than y, false otherwise is greater or equal to y, else false is not equal to y, false otherwise.

(16) 4:. CHAPTER. Logical. Result. Operators NOT x AND x OR x XOR. y y y, y. bit-by-bit logical inverse of y bitwise logical AND of x and y bitwise logical OR of x and y logical exclusive OR of x and y. x!y. Special Operators HIGH LOW NUL. EXPRESSIONS. Result. identical to y SHR 8 (high order byte of y) identical to y AND OFFH (low order byte of y) the remainder of the current line is null true. y y. line. if. only space and/or tab characters. Beor contains cause the NUL operator uses the rest of the must be the current source line as an operand, last operator on a line.. it. 4.8. PRECEDENCE. OF OPERATORS. Without. parentheses have an order of applior brackets operators As described they were parenthesized cation as or bracketed. below, the operators listed have highest precedence, and first the operators listed last have lowest precedence. Operators listed on the same line have equal priority and are applied from left to right in the expression. if. highest. precedence. *. /. SHL. MOD +. LT. EQ. lowest The. precedence. expressions. shown. below are +. x x. OR. y. *. a. y. *. z. SHR b. SHR. —. LE GT GE NOT AND OR XOR HIGH LOW NUL. NE. equivalent: x. =. x. =. + OR. [y [y. * *. zl la. SHR. bll. Balanced parenthesized or bracketed sub-expressions can always be used to override the order of precedence described above. The last expression could be rewritten to force application of operators in a different order: Ix. OR. y]. *. [a. SHR. b]. Page. 11.

(17) CHAPTER. 4.9. 4:. EXPRESSIONS. PARENTHESES. VERSUS. BRACKETS. Parentheses. and brackets are not interchangeable. They serve Parentheses used in expressions that are different purposes. modes. have indirect addressing For example, LD. will. load. the register pair location six (5+1) and seven.. Brackets. is. mode. are used for not indirect.. will. load the. 4.10. EXPRESSION. HL. other all Using the LD. register pair. (5+1). HL,. HL,. from. the contents of memory. expressions where the addressing above example with brackets, 15+1]. with the immediate value six.. HL. REsTRIcrIoNs. operand field of a statement may consist of the metic expression with following restrictions:. The. external. An. (2). A. (3). If be. (4). In all other arithmetic The must be absolute.. may. from. arith-. added. or. relocatable value may have an absolute or another relocatable value (in the same relocation base) added to or subtracted from it. The result will relocatable. two relocatable values absolute.. are subtracted. 12. then the. logical operations, result will be absolute. and. expression error will be generated above the restrictions. follow. An. Page. complex. only have an absolute quantity it. The result will be external.. (I). subtracted. a. if. an. result. will. both operands. expression. does not.

(18) CHAPTER 5 PSEUDO-OPS. 5.1. GENERAL. PSEUDO-OPS. The D.efine Byte pseudo-op is used to enter one or more oneThe statement form is: data values into the program.. DB:. byte. {,n...}. DB n. where n is any expression with a valid B-bit value. More than one from the preceding byte can be defined at a time by separating DB value with a comma. All of the bytes defined in a single The consecutive memory assigned Zilog statement locations. are mnemonic DEFB can be used instead of DB.. it. Define Character pseudo-op stores the characters in a string in successive memory locations beginning with the current The most significant of the last characrelocation counter. bit pseudo-op The form for the be set is: ter will to one. The. DC:. DC. DC. The D.efine. DS:. form. reserves an area of memory. The. Space pseudo-op. is:. DS. where the value to be reserved.. 'string'. of the The. {,expression}. expression. the number of bytes can be used instead of. expression gives first mnemonic DEFS. Zilog. DS.. reserved space, set the optional second expresdesired. to If the second expression is omitted, the reserved space is left as is (uninitialized). The reserved To block of memory is not automatically initialized to zeros. initialize to zeros give the second expression the value To. the initialize the value. sion. O.. used in the first expression must be previously defined U Otherwise, on pass a error (undefined symbol) is generated during pass I, and a P error (phase error) will probably be generated during pass 2 because the DS pseudo-op generated no code on pass 1.. All. DW:. into. names. 1.. The Define Word directive the program. This directive DW. nn. is used to enter takes. the form:. a. 16-bit value. {,nn...}. Where nn is any expression with a valid 16-bit value. Multiple 16-bit values may be defined with one DW statement by separating the values with a comma. All 16-bit values defined by the DW pseudo-op are stored in standard Z80 word format with the least The Zilog mnemonic DEFW can be used byte significant DW. instead of. first.. Page. 13.

(19) 5:. CHAPTER. END statement is optional. The form is: ignored.. The. END: END. PSEUDO-OPS. are. optional expression. Intel compatible address will be. file instruction. a. following the. lexpressionl. END The. All statements. is at. REL. The. EQU:. lar. The The. is the program starting address. an hex file is being generated, then this starting included in the last record of the hex file. being generated, then ZLINK will place a JUMP 1OOH to the specified starting address.. If. EQUate. numeric. If. values.. statement is used The form is:. to. label. expression. EQU. label must be present and cannot assembler evaluates the expression. the. label. The label is usually of the expression. Also, this program. as. a. name. for particu-. label any other statement. and assigns this value to. which a name name can be. or operand.. parameter. synonyms. describes the value used throughout the. The INsert (or MACLIB) pseudo-op allows the programmer to the same section of assembler source code in a number of The format different assemblies. is: .IN: use. .IN. {d: }filename. MACLIB. or. where d is the optional Z or CP/M the logged disk) and filename assumed filetype LIB.. {d: }filename. disk specifier (defaulting to is the file on disk with the. directive causes theandspecified file to be copied into the in its entirety, to be treated exactly as if it were part of the original source file. All inserted source lines are flagged with a """ on the listing. Only one level of insert is allowed, they cannot be nested.. This. assembly. .LIST: This pseudo-op resumes a listing which has been suppressed See the next page. by the .XLIST directive. The. PAGE:. which device.. page pseudo-op. gives. is sent to the The form for the PRN. file PAGE. PAGE. control over the output formatting and/or directly to or CP/M LST: statement is: Z. {expressiorü. statement is used without the optional expression feed is sent to the output file and/or Z or CP/M LST: The form feed is sent before the statement with page has device. Consequently, been printed. the PAGE command is often issued directly ahead of major sections of an assembly language program, such as a group of subroutines, to cause the next statement to appear at the top of the following printer page. the PAGE If then a form. The. Page. second form. 14. of the. PAGE command. is used to specify the output.

(20) CHAPTER. 5:. PSEUDO-OPS. the PAGE In this case, the expression which follows page size. be the number of output lines to printed on pseudo-op determines 40 and between a equates eachpage. to value the expression 90, then the page size is set to the value of the expression. When for each page, a form feed isa 56issued thisa value is reached The assembler line page eject. initially assumes to cause and produces a of the page eject at the beginning page size. If. Usually, no more than one PAGE statement with the option is included in a particular program.. listing.. expression. The. .RADIX:. is:. form. statement. .RADIX. n. is 2, 8, 10, or 16. This pseudo-op sets the radix to n for all numbers which follow, unless another .RADIX statement is encountered, or the radix is overridden by a suffix radix modifier. Initially, the default radix is set to 10 (decimal).. where. n. The. SET:. numeric. SET. values.. statement is used The form is:. label. to. name. synonyms. for particular. expression. SET. label must be present and cannot label any other statement, The assembler evaluates the expression except for another SET. and assigns this value to the label. The label is usually a name which describes the value of the expression. Also, this name can be used throughout the program as a parameter The or operand. Zilog mnemonic DEFL can be used instead of SET. The. .TITLE form:. and .SBTTL: The. title .TITLE .SBTTL. and. subtitle. pseudo-ops. 'string-constant 'string-constant. take the. 1' 2'. where the string-constants in are an ASCII string, enclosed a .TITLE apostrophes, which do not exceed 64 characters. and/or .SBTTL is encountered during the assembly, thenIf each page of the listing is prefixed with the title and/or subtitle stringconstant. The title line will be preceded by a standard ZAS header as follows: MITEK. Relocating. string-constant string-constant where n.n number and. Macro Assembler. I2. vers. n.n. page. nnn. is the ZAS version number, nnn is the current page and/or 2 is the string given in the string-constant ZAS pseudo-op. corresponding assumes that these initially When pseudo-ops are not in effect. specified, the line, along with the subtitle line are not included in thetitle count line the page. Usually, no more than one .TITLE statement is for included in a particular program. 1. Page. 15.

(21) 5:. CHAPTER. PSEUDO-OPS. 5.2 LISTING. PSEUDO-OPS. CONTROL. L.ist ALL macro. lines,. including. .LALL: generate. code.. .LIST:. This pseudo-op resumes by the .XLIST directive.. suppressed. The. .LFCOND:. ing. ,L.ist. of conditional print. The. .PRINT:. on. console. willpassoutput can. I 2. .SALL:. .S.uppress. pseudo-op. takes. text. be. one. to the console during the of three values: both passes. - print text during. pass two. of the macro. The Suppress.F.alse. list-. the form:. - print text during - pr: i-nt text during ALL. the. pass,text. object code produced by macros. .SFCOND:. which has been. CONDitionals pseudo-op assures expressions that evaluate false.. The O. listing. a. that do not. .F.alse. .PRINT. This pseudo-op specified pass.. lines. *. pass one. listing, including all text. CONDitionals. portion of the listing that contains that evaluate false. the. pseudo-op. and. suppresses. conditional expressions. The EXclude ALL non-code macro lines pseudo-op .XALL: will by a macro, but source lines source and object code produced which do not generate code are not listed.. list. .XLIST: Thispseudo-op suppresses pseudo-op is encountered. 5.3 The. CONDITIONAL. AssmBLY. all list outputuntil a.LIST. PSEUDO-OPS. next two sections describe the. facility. 5.3.1 IF. PSEUDO-OP. ZAS. conditional. assembly. EVALUATION. methods for evaluating the trueness of an method bases the trueness on the least significant bit of the IF expression, which is compatible with Digital Research's The second method ASN, MAC, and RMAC assemblers. bases the trueness of the expression on the 16-bit expresmethod Microsoft M80 This compatible with the value. is sion assembler. has two IF expression.. ZAS. different One. full. Page. 16.

(22) CHAPTER. 5:. PSEUDO-OPS. program default evaluation is set by the installation be The set also method may 1.3). evaluation explicitly (section by the following two pseudo-ops:. The. .IF1. -. cause IF expressions to evaluate will the least significant bit of the IF 1. evaluates. to. .IF16. 5.3.2. if. to true expression. OR. to evaluate to true cause IF expressions - will evaluates the IF expression to non-zero.. CONDITIONAL. ASSEMBLY. when. FORMS. The IF, ELSE, and ENDIF pseudo-ops define a range of assembly which are to be included language statements or excluded during and assembly The IF ENDIF statements alone can be the process. used to bound a group of statements to be conditionally assembled thus: 0 IF expressíon statement #1 statement #2 0 0 0. statement. #n. ENDIF. the the assembler evaluates encountering the IF statement, expression expression must following the IF (all operands in the be defined ahead of the IF statement). Depending on the condievaluates the expression tional assembly option in effect, to 1, a non-zero value a evaluates the least to significant bit or then statement #1 through statement #n are assembled. the expression evaluates to a zero, then the statements are listed but not assembled. Upon. if. If. The. statement can be used as an alternative to an IF statement, and must occur between the IF and ENDIF statements. The form is: ELSE. expression IF statement #1 statement #2 0 e 0. statement. #n. ELSE. statement statement. #n"l #n+2. 0 0 0. statement. #m. ENDIF. Page. 17.

(23) CHAPTER. 5:. PSEUDO-OPS. the expression produces a non-zero (true) value, then If assembled. However, statements n+l statements 1 through. nare in the assembly process. When the expresvalue (false), statements through n are As an skipped, while statements n+l through are assembled. A example, the conditional assembly shown in Listing could be rewritten as shown in Listing B. through m are sion produces. skipped a zero. 1. Iñ. Listing TTY CRT DEVICE TTYOUT CRTOUT. EQU EQU EQU EQU EQU. IF CALL ENDIF. IF CALL ENDIF. 1. 2 TTY OFO03H OF1OOH DEVICE TTYOUT DEVICE CRTOUT. Listing TTY CRT DEVICE TTYOUT CRTOUT. EQU EQU EQU EQU EQU. IF CALL ELSE CALL ENDIF. A. EQ. TTY. EQ. CRT. EQ. TTY. B. l 2. TTY OFO03H OF1OOH DEVICE TTYOUT CRTOUT. Properly balanced IF's, ELSE's, and ENDIE's can be completely contained within the boundaries of outer encompassing conditional The structure outlined below shows properly assembly groups. nested. IF,. ELSE,. and. ENDIF. statements:. exp#1 IF #1 group exp#2 IF group#2 ELSE. group#3 ENDIF. group#4 ELSE. group#5 exp#3 IF group#6 ENDIF. group#7 ENDIF. Page. 18.

(24) CHAPTER. 5:. PSEUDO-OPS. of statements to be are sequences exp#3 are expressions through and exp#1 assembled, conditionally exp#l is true, then which control the conditional assembly. and group 5,6, and 7 group#1 and group#4 are always assembled, be skipped. exp#1 and exp#2 are both true, then Further, will group#2 will also be included in the assembly, otherwise group#3 exp#1 produced a false value, groups 1, 2, be included. be always 3, and 4 will be skipped, and group 5 and 7 under these circumstances, exp#3 is true then assembled. group#6 will also be included with 5 and 7, otherwise will be skipped in the assembly. where. I through. group. 7. If. if. If. will. will. If. it. Conditional assembly of this sort can be nested up to eight levels (i.e., there can be up to eight pending IFs or ELSEs with but usually unresolved ENDIFs at any point in the assembly), becomes unreadable of nesting. The after two or three levels nesting level restriction also holds for pending IFS and ELSES during macro evaluation. Nesting level overflow will produce an error during assembly. 5.4. LINKAGE. The. EXTRN:. fined in. The. PSEUDO-OPS EXTeR.N,al. other. some. form. is:. symbols which are depseudo-op identifies program but are used in the cnrrent program. EXTRN. where symbol symbols may. symbol. {,syñbol...}. is the symbol being declared as external. Multiple declared in the same statement by separating them Also, a symbol in an expression with commas. is suffixed with one or two # signs, then the symbol is treated as an external. EXT is a synonym for EXTRN. be. if. The. NAME:. NAME. pseudo-op. takes NAME. the form: symbol. where symbol by the linking. This name is used is the relocatable module name. loader and library manager to identify the module Only the for selective loading or manipulation. first six characters In the absence of are significant in the module name. the NAME pseudo-op, up to the first six characters of the program name. are used. The. pseudo-op identifies those symbols within the current program which are to be made accessible to other programs symbols. as external This directive has no effect on the assembly process for the current program, but merely records the name and value of the identified symbols on the object file for later use by the linking loader. A public symbol must be defined within the current program as a label. PUBLIC:. PUBLIC. Page. 19.

(25) CHAPTER. 5:. PSEUIX)-OPS. Request. .REQUEST:. a. library search. filename. .REQUEST. The. form. is:. {,filename...}. sends a request to ZLINK or any Microsoft This pseudo-op compatible loader to search the filenames in the list for The filename undefined external symbols. in the list should not include filetypes or device designation. ZLINK assumes the default extension .REL and the currently logged disk drive. 5.5. REIÁ)CATION The. ASEG:. generates. BASE. Absolute. PSEUDO-OPS. pseudo-op code.. SEGment. non-relocatable. never. has operands.. ASEG. sets the location counter to an absolute segment (actual address) of memory. The ASEG will default to O, which could the module to write over part of the operating system. cause recommended is that each ASEG be followed with an ORG statement set at IOOH or higher. ASEG. It. COMMON:. COMMON statements COMMON COMMON area. are non-executable,. storage allocating arrays, and data to a This allows various program storage. The length of a COMMON same storage area.. assigns variables,. statements.. called to share the the number of bytes required to contain the variables, arrays, anddata declared in the COMMON block, which ends when another relocation base pseudo-op is encountered. storage modules area is. The,C.ode SEGment directive never has an operand. assembled in Code Relative mode can be loaded into ROM/PROM.. CSEG:. Code. resets the location counter to the code relative segment of The location will be that of the last CSEG (default to memory. O), unless an ORG is done after the CSEG to change the location.. CSEG. However the CRG statement does not set a hard absolute address An ORG statement under CSEG causes the assemunder CSEG mode. bler to add the number of bytes specified by the expression loaded. argument in the ORG statement to the last CSEG address ORG 25 is given, 25 bytes be added to the For example, will The clearing current CSEG location. Then csEGwill be loaded. DSEG) CSEG ORG (and the statement following can be used effect of the module Rationale an give not for allowing ORG to offset. to CSEG CSEG absolute address the keep an set relocatable. for is to. if. Assembly begins with is the default mode of the assembler. automatically executed, and the location counter in the Code Relative mode, pointing to location in the Code Relative segment of memory. All subsequent instructions will be assembled into the Code Relative segment of memory until ASEG, DSEG, or CSEG is then entered COMMON is executed. to return the assembler mode, which Code the location counter point Relative at to Code Relative segment. the the next free in location returns to. CSEG a CSEG. O. Page. 20.

(26) CHAPTER. 5:. PSEUDO-OPS. The Data SEGment pseudo-op never has operands. assembled relocatable code that will specifies segments of be loaded into RAM only.. DSEG:. DSEG. later. of sets the location counter to the Data Relative segment The location of the data relative counter will be that memory. of the last DSEG (default is O), unless an ORG is done after the DSEG to change the location. However, the ORG statement does not set a hard absolute address under DSEG mode. An ORG statement under DSEG causes the assembler to add the number of bytes ORG statement to the last DSEG specified by the expression in the 25 ORG address loaded. For example, is given, 25 bytes will Then be added DSEG the DSEG will be address loaded. to the last The ORG statement loaded. following DSEG clearing effect of the CSEG) (and Rational can be used to give the module an offset. for not allowing ORG to set an absolute address for DSEG is to keep the DSEG relocatable. DSEG. if. ORG:. counter. The Set. to. be. ORGin pseudo-op allows The changed at any time. ORG. the value of is:. form. a. location. expression. program counter mode, the relocation counter is set to the value of the expression, and the assembler assigns generated code starting with that value. Under CSEG, DSEG, and COMMON relocation bases, the location counter for that base is incremented by the value of the expression. All names used in the expression must be known on pass 1, and the value must either base as the current be absolute or in the same relocation location counter. Under theASEG. .PHASE/.DEPHASE:. The. form. is:. .PHASE. expression. 0 0 9. .DEPHASE .PHASE allows code to where expression is an absolute value. located in one area, but executed at a different area with .DPHASE specified by expression. is used start address the end of the relocated block of code. indicate. be a. to. The relocation base within a .PHASE block is absolute, the same The code, as the mode of the expression in the .PHASE statement. .PHASE however, is loaded in the area in effect when the stateThe code ment is encountered. within the block is later moved to the address specified by expression for execution.. Page. 21.

(27) CHAPTER. This. 5:. PSEUDO-OPS. example, 30OH. .PHASE CALL JP RET .DEPHASE JP. DUMMY: ENTRY:. assembles 0300 0300 0303 0306 0007 0007. 5.6. ENTRY. O. to: CD0630 C30700 C9. DUKMY:. C30000. ENTRY:. 30OH DUMMY ENTRY. .PHASE CALL JP RET .DEPHASE JP. O. MACRO PSEUDO-OPS. Provided here is only a a more complete For ops.. 5.7. DUMMY. SPECIAL. of the brief description the description, see. Pseudo-op. Description. ENDM EXITM IRP IRPC LOCAL REPT MACRO. End. FUNCTION. Macro Exit Macro. Indefinite Indefinite. Local Repeat Macro. Symbol. macro pseudonext chapter.. Repeat Repeat Character Generation. Definition. PSEUDO-OPS. This pseudo-openables ZAS to assemble the ten extended upward Z80 instructions of the Hitachi HD64180 microprocessor, The compatible. ten instructions and their forms are listed in .HD64:. Appendix. Page. 22. D..

(28) CHAPTER. 6. FACILITY. MACRO. of assembly language programs is that common characteristic coding sequences are repeated over and over with only one or many two of the operands changing. Macros provide a mechanism for The the repeated sequences with a single statement. generating dummy repeated sequences are written with values for the changing A single statement, operands. referring to the macro by name and providing values for the dummy operands, can then generate the repeated sequence.. A. The coding sequence begins with either the macro definition pseudo-op or one of the repeat pseudo-ops and ends with the ENDM pseudo-op. All ofThethe macro pseudo-ops may be used inside a macro sequence. one exception is a stored macro which, cannot be defined inside a repeat type macro. Macro nesting is allowed up to 15 levels deep. The. macro. facility. includes. macro. pseudo-ops. definition:. (macro. MACRO. for:. definition). repetitions. (repeat). REPT IRP IRPC. (indefinite repeat) (indefinite repeat character). terminations: ENDM EXITM. unique. (end macro) (exit macro). symbols. LOCAL. within macro sequences:. operators: & E D T y. ^ % <;>. 6.1. REPEAT. (OR. INLINE). MACROS. The simplest macro groups.. macro facilities involve the REPT, IRPC, and IRP these forms All cause the assembler to repetitively re-read portions of the source program under control of a These groups are counter or of textual substitutions. listed in increasing order of complexity.. list. Page. 23.

(29) REPT-ENDM. GROUP:. assembly language terminated by an. The. group is written as a sequence of statements starting with the REPT pseudo-op and The forní is: ENDM pseudo-op. REPT-ENDM. label:. REPT. expression. 0 0 0. label:. ENDM. where the labels are optional, and the expression indicates the number of times the sequence of statements between REPT and ENDM be repeated. The expression is evaluated as a 16-bit unsigned number. the expression contains an external symbol undefined operands, generated. an or error is. will. If. if. a label appears on the REPT statement, its value In general, the machine code address which follows. This REPT label is first each loop. The optional not is re-read on repetition of the ENDM the re-read and each thus constant on on label is iteration LOCAL generated through concatenation pseudo(not labels or with phase errors ops) will generate the repetition cuunt is greater than 1.. if. IRPC-ENDM GROUP: Similar to the REPT group, the IRPC-ENDM assembler the causes to re-read a bounded set of statements. form is:. label:. IRPC. group The. identifier,string. 0 g *. label:. ENDM. optional labels follow the same conventions as in the The is any valid symbol and string group. identifierterminated by a delimiter (space, characters, denotes a string of comment). tab, end-of-line, or where the. REPT-ENDM. The sequence of statements between IRPC and ENDM are repeated Each repetition in the string. once for each character the character the next string for every occurrence in substitutes of identifier in the sequence.. similar in function toa the IRPC, multiple except that theThecontrolling identifier can take on form IRP-ENDM. GROUP:. The IRP. is. is:. string value.. label:. IRP. identifier, string {,string...}. 0 e e. label:. ENDM. where the optional labels The sequence IRPC groups. each repeated for string.. Page. 24. REPT and follow the conventions of the ENDM is IRP and between statements of On the the string is first iteration,.

(30) 6:. CHAPTER. MACRO. FACILITY. substituted for the identifier wherever the identifier occurs in On the second iteration, the second the sequence of statements. the value the controlling identifier and so on of string becomes and processed. encountered until the last string is 6.2. STORED. MACRO. MACROS. form. The. DEFINITION: macname. MACRO. for the macrodefinition. is:. duríuny{,durmy...}. 0 0 0. ENDM. of statements from the MACRO statement line to the ENDM statement line comprises the body of the macro, or the The macname macro's definition. is any non-conflicting assembly Dummy language label. parameter is a place holder that is replaced by an actual parameter in a one for one text substitution when the MACRO sequence is used. The. sequence. statements are read and stored in the assembler's tables under the name given by "macname", but are notprocessed until the macro is expanded.. The. prototype. internal. comment preceded by two semicolons is not saved as part of the But a comment preceded by only one semicolon macro definition. is preserved and will appear in the expansion.. A. 6.3 EXITING. MACROS. The EXITM pseudo-op is used inside a MACRO or Repeat block to terminate an expansion when some condition makes the remaining EXITM expansion unnecessary or undesirable. Usually, is used in conjunction with a conditional pseudo-op. when an EXITM is exited immediately is assembled. expansion or repetition is not generated. If the block containing the EXITM is nested within another block, the outer level continues to be expanded. The. expansion Any remaining. 6.4. IÁJCAL. The. LOCAL. The. form. SYMBOLS. pseudo-op. for the. LOCAL When. is allowed only inside directive is:. LOCAL. a. MACROdefinition.. identifier l,identifier...}. ZAS is executed, creates a unique symbol for each substitutes that symbol for each occurrence of the identifier expansion. These unique symbols are usually in the identifier used to define a label within a macro. This eliminates multipleLOCAL. and. Page. 25.

(31) 6:. CHAPTER. MACRO. FACILITY. defined labels on successive expansions. The of the macro. symbols c,reated by ZAS range from ??0001 to ??9999. Users should A LOCAL avoid the form ??nnnn for their own symbols. statement must precede other types of statements in the macro. all. definition. 6.5. MACRO. The. form. INVOCATION. for the macro invocation is: macname. parameter{,parameter...}. Upon recognition parameter in the. of the macname, ZAS "pairs-off" each dummy MACRO definition with the actual parameter text, i.e., the first dummy parameter is associated with the first actual parameter, the second dummy is associated with the second actual, and so on until the list is completed. If more actuals than dummy parameters then the extras are ignored. are provided If fewer actuals are provided, then the extra dummy parameter are associated with the empty string, i.e., a text string of zero length. It is important to realize at this point that the value of dummy parameter is not a numeric value, but is instead a textual value consisting of a sequence of zero or more ASCII characters. 6.6. PARAMETER. EVALUATION. There are several options available in the construction of actual parameters, as well as in the specification of character lists Although an actual parameter is simply a for the IRP group. placed between parameter delimiters, these characters sequence of options allow overrides where delimiter characters themselves become a part of the text. In general, a parameter x occurs in the context:. label:. macnaine. ...,x,.... the label is optional and the macname is the name of a previously defined macro. The ellipses (...) represent optional surrounding In actual parameters in the invocation of macname. a IRP of character group, the occurrence the case of an list x where. would. be.:. label:. IRP. id,. ...,x,.... label is optional, and the ellipses represent optional character within the IRP group lists for substitutionfound. controlling identifier "id" is In either case, the scope of a surthe statements could be contained within dummy Therefore, parameter rounding macro expansion. substituencompassing place the could take macro while the actual for tion parameter is being scanned. where the surrounding where the. zas follows these character list:. Page. 26. steps. in forming an actual. parameter or.

(32) MACRO. FACILITY. occur. in front. is examined to determine to take place.. the type. CHAPTER. (I) Leading blanks and tabs are removed of X. (2). The. of (3). leading character of x which operation is scan. when. 6:. they. If the leading character is a string quote, the text up through and including the balancing. then x becomes string quote,. using the normal string scanning rules: double apostrophes within the string are reduced to a single apostrophe, and upper case dummy parameters adjacent to the ampersand symbol Note that are substituted by their actual parameter values. in the string quotes on either end of the string are included the actual parameter text. (4). (5). the first character is the left caret (<) then the removed, and the value of x becomes the sequence characters right of up to , but not including, the balancing become which does {)) not left. this case, part of x. In caret and right carets may be nested to any level within x, and Quoted only the outer carets are removed in the evaluation. and substitution allowed, strings within the carets are above. within these strings follows the rules stated in (3) become Note that left and right carets within quoted strings a part of the string, and are not counted in the caret comma, nesting the delimiter characters within x. Further, they occur blank, semicolon, and tab, become a part of x when within the caret nesting. instead If bracket is. the leading. character is a is taken a 16-bit is converted to a decimal number sequence of digits, with left zero. If. characters evaluated. (6). which follows immediately as. then the sequence of which is expression as value. The resulting value and treated as an ASCII (0-65535). suppression °ó,. an. left. character is If the leadingpercent), bracket, the or. follow,. up to the next becomes the value of x.. none of the above (quote, of characters which sequence comma, blank, tab, or semicolon,. There is one important exception to the above rule: the single character escape, denoted by an up-arrow, causes ZAS to read the character immediately following as a part of x without treating the character which folHowever, the character as significant. lows the up-arrow, must be a blank, tab, or visible ASCII character. The up-arrow itself can be represented by two up-arrows in succession. the up-arrow directly precedes a dummy parameter, then the up-arrow is removed and the dummy parameter is not replaced by its actual parameter value. Thus, the up-arrow can be used to prevent evaluation of dummy parameters within the has no special Note that the up-arrow macro body. significance within string quotes, and is simply included as a part of the. If. string.. Evaluation considered,. of. dummy. although. parameters. in macro expansions. this topic has been presented. must also be throughout the. Page. 27.

(33) 6:. CHAPTER. MACRO. FACILITY. previous sections. Generally parameters as follows:. the macro assembler. evaluated. dummy. (I). dummy a parameter is either preceded If concatenation operator (&), then the. (2). parameters are replaced only once at each occurrence as encompassing macro expands. This prevents the "infinite a dummy parameter evalsubstitution" which would occur uated itself.. followed by the preceding and/or following "&" operator is removed, the actual parameter is substituted for the dummy parameter, and the implied delimiter is removed at the position(s) the ampersand occurs. or. Dummy. the. if. In. summary,. -. Page. parameter. evaluation follows these rules:. leading and trailing tabs and blanks are removed quoted strings are passed with their string quotes intact nested carets enclose arbitrary characters with delimiters °5 a leading causes immediate numeric evaluation + character an up-arrow as a literal value passes a special an up-arrow prevents evaluation of a dummy parameter the "&" operator is removed next to a duminy parameter dummy parameters are replaced only once at each occurrence. 28.

(34) ms. 7 CHAFTER ERROR MESSAGES. of error messages: Non-fatal errors and fatal Non-fatal errors are indicated by a single letter code errors. to the left of the statement line with thewhyerror. Fatal errors the error may have the assembly and give messages as to kill occurred. Statement lines with errors will not generate object There are two types. code. 7.1. NON-FATAL. Error. ERRORS. Code. Explanation. of the arguments for the op-. A. Argument code is. B. An ELSE Balance error. or an ENDIF pseudo-op does not have a preceding IF statement. Or an END macro statement Macro call has no preceding and/or macro definition.. C. ZAS has found an invalid Character ís invalid. and probably a is control character. The be character replaced by a "^" invalid will. it. character D. E. 0. Duplicate error. than once.. A. Expression error. be. and cannot. I. One. error. invalid.. found or. M. Mode mode. O. Opcode opcode.. P. Phase error. Pass 2 than. The. expression. computed.. is ill-formed. specified insert file cannot insert is already in progress.. an The. error. error.. more. The. Insert error.. be. label has been defined. statement The. error.. contains. statement. an. contains. label has a different did on Pass 1.. A. it. addressing an. illegal. value. on. S. Syntax error. The assembly statement is formed and cannot be processed. This error may be due characters to invalid or delimiters which are out of place.. U. A label argument Undefined symbol. defined in the program.. V. Value. in-. its. error. The operand allowable range.. (argument). has not been. is out of. Page. 29.

(35) CHAPTER. 7.2. 7:. FATAL. ZAS. ERROR MESSAGES. ERRORS. Fatal error messages have been classified into two categories: errors caused by macros and general errors (or errors not caused by macros). 7.2.1. GENERAL. FATAL. ERROR MESSAGES. not found." (I) "Fijename.fíletyEK2 The specified source file cannot (2). be. found. "Invalíd option sp±cífication." or more of the assembler options line is invalid.. (4). "More than eight IF levels are pmdíng Where line nnnn is the line with the eight IF levels can be nested. "Unterminated IF!" end of file has. The. (5). "Memry full at assembler's. The. 7.2.2. MACRO FATAL. "IÁxml. (3). label. maximum. (4). Page. no. terminating. exceeded!" limit symbols 9,999. local. of. ENDIF.. levels at line nnnn" levels of nested macros are allowed.. past 16. has been exceeded.. 16. "Im:al table exceeds 127 bytes at Line nnnn" total length of all local symbols cannot exceed for a particular macro definition.. The. (5). of. at line nnnn" ninth IF. A maximum. starting at line nnnn" the line with the error. This error is definition that has no terminating END. of. "Macro nested A maximum. with. command. ERROR MESSAGES. macro Where line nnnn is caused by a macro macro statement. The. reached. disk.. line nnnn" internal tables have run out of memory.. (I) "Unterminated. (2). been. the. specified in the. One. (3). on. 127. bytes. definition ínside an ínlíne macro at line nnrm" This message indicates that a macro definition has been placed inside a repeat type macro and that is not allowed. "Macro. 30.

(36) 8 CHAFTER GENERATION CROSS-REFERENCE. 8.1. OVERVIEW. (ZREF) is used to provide a summary ZREF reads the throughout a speciof usage program. file each by number a fied line line, attaches line prefix to line, and writes each prefixed line to the filename.XRF. After filename.XRF, completing this operation, ZREF appends to the a cross-reference numbers where report that lists all the line each symbol in the each C also flags with an appears. number where the referenced symbol defined. line is The. cross-reference generator. symbol. file. file. 8.2. ZREF. file. It. OPERATION. is invoked by typing. ZREF. ZREF. filename.filetype. {$}option. where. filename.filetype is the name of the file to be crossassumed .Z80, and option is the referenced with the filetypedevice the the L, output instead of a file. is to letter list. if. 8.3. RESERVED. The. following symbols. SYMBOLS. will. be. not. A AF AND B BC. HI. C. L LE LOW LT. D. DE E EQ. GE GT H. HL. I. IX IY. M MOD. NC NE. part of the- cross reference: NUL NOT NZ OR P PE PO R. SHL SHR SP XOR Z. Page. 31.

(37) 9 CHAPTER CODE CONVERTER. 9.1. CODE. OPERATION. CONVERTER. 8080 (ZCON) converts code converter source statements, all of machine instruction the statements, and most of the common TDL pseudo-ops to Z80 source statements (see the next section for a listing of the convertible TDL pseudo-ops). In addition, and comments, ASCII strings, except for character-constants, parentheses Also, parity bit (bit 7) are converted to brackets. is zeroed. The. TDL. To. invoke. the code. converter, type: ZCON. filename.filetype. {$}jj. filename is the name of the source file to be converted. is assumed. When the"u" filetype is specified, then ASMconversion If option is specified, only upper-case is done. This is Z80 When already have lower a useful you case. source file in t-he conversion be in a completed, the output called is file will filename.Z80 and one of two messages will be displayed. where no. if. Message. "nnnn Where. I:. lines converted, with no errors detected." nnnn is the number of lines converted. OR. Message2: "nnnn Lines converted, with eee errors logged in filename.ERR" Where nnnn is the number of lines converted and eee is the number of errors detected. 9.2 The. CONVERTIBLE. TDL. code converter They include the. PSEUDO-OPS. will. convert. the. most. common. TDL. pseudo-ops.. following: .ASCII .BLKB .BLKW .BYTE .EXTERN. .IDENT .INTERN. .LIST .WORD. .XLIST. Page. 33.

(38) 9:. CHAPTER. 9.3. ERROR MESSAGES. the If leaves (I). CODE CONVERTER. code converter detects an error in a the line unchanged. There are two types. ": ":k*. Syntax. statement line, of error messages.. it. error at line nnn, line follows ***w error line. is the statement line number, and error line is the statement line with the syntax error. Normally, this error should not occur because indicates that the operand for this particular op-code is syntactically incorrect. Where nnn. it. (2). "*"* IF/ENDIF unbalanced. ***". the IFS and ENDIFS are not This error message appears paired. For every IF, there should be an ENDIF, and vice. if. versa.. Page. 34.

(39) CHAFTER LINKER. 10.1. 10. OVERVIEW. Linker (ZLINK) is used to combine Microsoft relocatableZ under ready for execution modules object into an absolute When symbol CP/M. ZLINK table, sorted completed, listsand the load or which shows symbols, map a unresolved any or duplicate and and number locations of t-he the size the of free bytes left segments: different The. Z80. file. LOAD. MAP. SEGMENT ABSOLUTE CODE DATA. FOR FILENAME.COM SIZE. START. STOP. COMMON. FREE. writes the sorted symbol table to a .SYM file suitable for (DSD) and Digital Dynamic Screen Debugger use with Echelon Research Symbolic Debuggers (SID and ZSID) as Instruction described in the option (see next page). ZLINK also creates a COM direct execution under or CP/M. If errors are file for detected, the P option (see next page) will be set automatically. ZLINK. S. Z. 10.2. ZLINK. OPERATION. is invoked by typing. ZLINK. ZLINK. filename1{,fi1ename2,...,filenameN}. where filename. is the name of the object module(s) to no filetype is specified, then REL is assumed. If If filename is desired for the COM and SYM files, specified as follows: ZLINK. If. newfilename=filename1. be some. it. linked. other may. be. {,filename2,...fijenameN}. encounters a starting address which is caused by supoptional program starting address to the assembler END pseudo-op then ZLINK will place a JUMP instruction at 1OOH to the program starting address. ZLINK. plying. 10.3 A. an. ZLINK. variety. execution. OPTIONS. of options are available to provide control over the Except for the / option (library of ZLINK.. parameters. Page. 35.

(40) search option) are used once. all of the options are link control options. at the end of a command line:. filenaIne1{,filename2,...filenameN} Where. nnnn. ZLINK. options. is. hexadecimal. a. They. $Cnnnn,Dnnnn,P,Rnnnn. number.. include:. Code Segment Origin Option. The C option is used to specify the load address of the code segment. is not used, then code address (IOOH). ZLINK Unless segment put the at the C:. the. R. will option. code segment C. option is. If it. indicates otherwise, the relocation value of the be set to its load address. The syntax for the where nnnn the desired code origin in hex.. will Cnnnn,. if. Data Origin Option. The D option indicates the load address of the data and common segments. the D option is used, the address specified must be higher than the load address for the code segment. is not used, ZLINK will put the data and common segments immediately after the program segment. The synD tax for the option is Dnnnn, where nnnn is the desired data origin in hex. D:. If. If it. option will page the output of ZLINK, lines per page to the terminal. Pressing any key allows continue a to output one page at time. you to Paging. P:. at. 23. Option.. The. P. option specifies the reRelocate Origin Option. The location value for the code segment. not used, then ZLINK If code segment to its load will set the relocation value of the R. R:. address.. S: .SYM File Option. this option is set, ZLINK will write the sorted symbol table to a .SYM file suitable for use with the Echelon DSD or Digital Research SID and ZSID debuggers.. If. This option is used to indicate that the presearch should be treated as a library. ZLINK the file and include only those modules containing symbols which are referenced but not defined in the modules already linked. Unlike the link control options which can be used once at the end of a command line, the / option must be used after each filename to be searched:. l:. Search. ceding. file. Option.. will. filename1/,filename2/,...filenameN/ 10.4. DEFINE. NEXT. FREE. MEMORY IÁJCATION. the public symbol $MEMRY is encountered during the link proIf $MEMRY and $MEMRY cess, then the two bytes addressed by the value 1 are in with the address of the benext free memory filled $ME4RY The a DS statement. labeled must statement location. +. Page. 36.

(41) CHAPTER. 10:. LINKER. For example:. $MEMRY:. PUBLIC LD RET DS. ERROR. MESSAGES. FREBEG:. 10.5. ZLINK. FREBEG,$MEMRY HLJ$MEMRY). routine returns ;the first free byte ;of memory ;This. 2. (I) "Can't find filename.filetyFK?" Specified (2). file.. of the. of the options. "MenKjry. There (5). not. "Undefíned. memory. ". name(s) in any. following this heading are referenced of the modules being linked.. "Duplicate symbols:. "Read. " are defined thistheheading modules being. of. as. a. linked.. a D. segment. is error options.. into memory already probably caused by. "Syntax. cannot. be. error ín. command. read. incor-. properly.. line!". ccmIband. line is. ill. formed.. "Multiple main nmiules!". Two. used. error!". file. The. (li). but. "***OverlaWing segIrKmts***w. A. (IQ). REL. symbols:. ZLINK attempted to write by another segment. This C the and/or of rect use. (9). Microsoft compatible. to complete the linking process.. The symbol name(s) following PUBLIC symbol in more than one. (8). a. fije!". specified is invalid.. is insufficient. symbol not defined. (7). REL. full!". The. (6). files specified is. disk.. the. on. "Invalid optíon sp±cifícation!" One. (4). found. be. cannot. "Filename.filetyp± is an invalid One. (3). file. or more modules contain. a. program. starting address.. "Library search limít exceeded!" of ten libraries can be specified from assembler. A maximum .REQUEST. statements.. Page. 37.

(42) CHAPTER 11 MANAGER LIBRARY. 11.1. OVERVIEW. Library Manager (ZLIB) is used to combine Microsoft relocatLibraries are files consisobject modules into a library. ZLIB can ting of any number of relocatable object modules. REL modules from a library, into a delete concatenate files module and modules names in a library, print library, re-place and public symbols from a library. The. able. 11.2 ZLIB. OPERATION. is invoked by typing:. ZLIB. ZLIB. $option. libname=filename{,filename,...}. where libname is the name of the library with filename is the name of the object modu1e(s). specified, then REL is assumed.. alternate form of invoking (as described below) is:. An. ZLIB. ZLIB libname where. listoption. 11.3 ZLIB. is the. M. or. P. when. using. If. the. M. or. and. filetype P. is. option. $listoption. option.. specified, then the specified The options include: library.. D:. Delete. M:. Print the module. names. in the library.. P:. Print the module. names. and. R:. Replace. the. the. will. be. public symbols in the library.. specified modules.. MESSAGES. Under the. following circumstances a. modules. specified modules.. 11.4 ZLIB. When. If. no. REL. OPTIONS. no option is appended to the. (I). filetype. module. ZLIB. will. produce. messages.. is being appended to the library: "AEEKmding. filename.filetyp±". Page. 39.

(43) li:. CHAPTER. (2). the. If. ified. LIBRARY. MANAGER. specified library does not exist option is append: "Creating. (3). If. module. a. on. disk and the spec-. library". is being deleted: "Deleting ~ulenaine". (4). If. module. a. is being replaced: "Deleting mdulename filename.filetyEe". AEEKmdíng. 11.5 ZLIB. ERROR MESSAGES. (l) "Can't find filenajne.filetyFKr Specified file cannot be found (2). "Filename.filetype is an invalid One. of the. file. (3). not. option specified is invalid.. "Syntax The. Page. files specified is. "Invalid optíon sFK2cificatíon!" The. (4). on. 40. error in ccxmand Line!" line is in formed.. command. the REL a. disk.. file!". '. Microsoft compatible. REL.

(44) Z80. object. Source Statement. Code. BE DD8E05 FD8E05 8F 88 89 BA 8B 8C BD CE20. MNEMONIC. A APPENDIX INSTRUCTION MACHINE. ADC ADC ADC ADC ADC ADC ADC ADC ADC ADC ADC. A,(HL) A,(1X"d) A,(IY+d) A,A A,B A,C A,D A,E A,H A,L A,n. CODES. Notes. Operation Add and. with Carry Operto Acc.. Leading A Operand is Optional. If isd O. is Omitted. Assumed. *********************************************************************** Add with Carry Reg. adc hl,bc HL,DE ADC Pair to HL. ED4A ED5A ED6A ED7A. ·. ADC ADC. HL,FIL HL,SP. *********************************************************************** Add Operand 86 ADD Leading A OperA,(HL) to Acc. DD8605 ADD and is Optional A,(lx+d) FD8605 87 80 81 82 83 84 85 C620. ADD ADD ADD ADD ADD ADD ADD ADD ADD. A,(IY+d) A,A A,B A,C A,D A,E A,H A,L A,n. If isd O. is Omitted. Assumed. *********************************************************************** Add Reg. Pair ADD HL,BC to HL. 09 19 29 39. ADD ADD ADD. HL,DE. HL,HL HL,SP. *********************************************************************** Add Reg. ADD Pair to IX ix,bc. DD09 DD19 DD29 DD39. ADD ADD ADD. IX,DE. IX,IX IX,SP. *********************************************************************** Add Reg. add Pair to IV iy,bc. FD09 FD19 FD29 FD39. ADD ADD ADD. IY,DE. IY,IY IY,SP. **************************k******************************************** AND A,(HL) Logical 'AND' of Leading A OperAND A,(1X"d) Operand and Acc. and is Optional. A6 DDA605 FDA605. AND. A,(IY+d). Al.

(45) APPENDIX. A:. Z80. object. Al A2 A3 A4 A5 E620. MACHINE. Source Statement. Code. A7 AD. MNEMONIC. AND AND AND AND AND AND AND AND. A,A A,B A,C A,D A,E A,H A,L A,n. INSTRUCTION. CODES. Operation. Logial 'AND' of Operand and Acc.. Notes Leading A Operand is Optional. If isd O. is Omitted. Assumed. *********************************************************************** d is Omitted 0,(HL) BIT Test Bit of Location If 0,(IX+d) BIT is Assumed or Reg.. CB46 DDCB0546 FDCB0546 CB47 CB40 CB41 CB42 CB43 CB44 CB45 CB4E DDCB054E FDCB054E CB4F CB48 CB49 CB4A CB4B CB4C CB4D CB56 DDCB0556 FDCB0556 CB57 CB50 CB51 CB52 CB53 CB54 CB55 CB5E DDCB055E DFCB055E CB5F CB58 CB59 CB5A CB5B CB5C CB5D CB66 DDCB0566 FDCBO566. O. BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT. 0,(IY+d) O,A O,B O,C C),D O,E O,H. O,L. I,(HL). 1,(IX+d) 1,(IY+d) 1,A 1,B 1,C. I,D 1,E. I,H 1,1,. 2,(HL) 2,(IX+d) 2,(IX+d) 2,A 2,B 2,C 2,D 2,E 2,H 2,L 3,(HL) 3,(IX+d) 3,(IY+d) 3,A 3,B 3,C 3,D 3,E 3,H 3,L 4,(HL) 4,(IX+d) 4,(IV+d). A2.

(46) APPENDIX. object. Source Statement. Code. CB67 CB60 CB61 CB62 CB63 CB64 CB65 CB6E DDCB056E FDCB056E CB6F CB68 CB69 CB6A CB6B CB6C CB6D CB76 DDCB0576 FDCB0576 CB77 CB70 CB71 CB72 CB73 CB74 CB75 CB7E DDCB057E FDCB057E CB7F CB78 CB79 CB7A CB7B CB7C CB7D. BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT BIT. 4,A 4,B 4,C 4,D 4,E 4,H 4,L 5,(HL) 5,(IX+d) 5,(IY+d) 5,A 5,B 5,C 5,D 5,E 5,H 5,L 6,(HL). A:. Z80. MNEMONIC. MACHINE. INSTRUCTION. Notes. Operatio.n. Test Bit or Reg.. of Location. If isd O. F48405 EC8405 E48405 CC8405. CALL CALL CALL CALL CALL CALL CALL. 6,(Ix+d) 6,(IY+d) 6,A 6,B 6,C 6,D 6,E 6,H 6,L 7,(HL) 7,(IX+d) 7,(IY+d) 7,A 7,B 7,C 7,D 7,E 7,H 7,L M,nn NC,nn NZ,nn P,nn PE,nn. Location tion True. nn. if. Condi-. PO,nn. Z,nn. *********************************************************************** CD8405 CALL Unconditional nn Call to Subroutine at nn ************************************k********************************** 3F. CCF. Complement Carry. A3. Flag. is Omitted. Assumed. *********************************************************************** CALL C,nn Call Subroutine at. DC8405 FC8405 D48405 C48405. CODES.

Referenzen

ÄHNLICHE DOKUMENTE

Doch dahinter – auch wenn es anders erscheint, auch wenn wir es leidvoller und schmerzhafter erleben – dahinter öffnet sich an Ostern bereits eine andere Welt, eine andere

Falls in Ihrem Garten ein Baum entfernt werden muss, welcher als Weihnachtsbaum für den Rathausplatz, für die Kirche oder für den Kindergarten verwendet wer- den kann, dann melden

Bitte vereinbaren Sie für Ihre Anliegen jedoch vorab einen Termin per Telefon (07464/98620) oder per E-Mail (info@durchhausen.de).. Dezember 2020, findet ab 19:00 Uhr in

©er norftelieube, in golge bes 33efc£)tufies beä SkooinsiaLSanbtageä oom 11. aufgeftettte britte Siadftrag ju bem ^Reglement nont 16. guni 1884, betreffenb bie

liche Sirenenanlage zu gewährleis- ten. Die Sirenen sind in den 80er Jahren mit Einführung der „stillen Alarmie- rung“ der Feuerwehr demontiert worden. In einigen

Bewerbungen um das Sonderstipendium für Studierende mit Betreuungspflichten sind schriftlich an die Universität Mozarteum Salzburg, Mirabellplatz 1, 5020 Salzburg,

(6) Von Nebenhörerinnen und Nebenhörern, die nicht an Berliner oder Brandenburger Hochschulen eingeschrieben sind, werden Gebühren gemäß der Rahmengebührensatzung in Verbindung mit

Bitte beachten Sie, dass Kinderreisepässe zukünftig nur für ein Jahr ausgestellt bzw. verlängert werden können. Auf Wunsch kann auch für Kinder unter 12 Jahren ein