Invoking MACRO-80 MACRO-80 Switches MACRO-80 Pseudo-Ops MACRO-80 In-Line Error Messages MACRO-80 Console Error Messages Invoking LINK-80 LINK-80 Switches Invoking LIB-80 LIB-80 Switches Invoking CREF-80 Debugging MACRO-80 Programs Using DEBUG.MAC :Invoking MACRO-80 MACRO-80 is invoked by the following command -- M80 obj:fn1.ext,lst:fn2.ext=src:fn3.ext where obj:fn1.ext is the device/filename for the object program lst:fn2.ext is the device/filename for the listing src:fn3.ext is the device/filename for the source :MACRO-80 Switches The following switches may be specified in the command line -- O Print all listing addresses in octal H Print all listing addresses in hexadecimal R Force generation of an object file L Force generation of a listing file C Force generation of a cross reference file Z Assemble Zilog (Z80) mnemonics I Assemble Intel (8080) mnemonics Р Eacè /Ð allocateó aî extrá 25¶ byteó oæ stacë spacå foò uså during assembly. Use /P if stack overflow errors occur during assembly. :MACRO-80 Pseudo-Ops The following are the pseudo-ops recognized by MACRO-80 -- ASEG COMMON CSEG DB DC DS DSEG DW END ENTRY PUBLIC EQU EXT EXTRN NAME ORG PAGE SET SUBTTL TITLE .COMMENT .PRINTX .RADIX .REQUEST .Z80 .8080 IF IFT IFE IFF IF1 IF2 IFDEF IFNDEF IFB IFNB ENDIF .LIST .XLIST .CREF .XCREF REPT ENDM MACRO IRP IRPC EXITM LOCAL COND ENDC *EJECT DEFB DEFS DEFW DEFM DEFL GLOBAL EXTERNAL INCLUDE MACLIB ELSE .LALL .SALL .XALL Š:MACRO-80 In-Line Error Messages A Argument Error O Bad opcode or objectionable syntax C Conditional nesting err P Phase error D Double Defined Symbol Q Questionable E External error R Relocation M Multiply Defined Symbol U Undefined symbol N Number error V Value error :MACRO-80 Console Error Messages No end statement encountered in input file -- no END statement Unterminated conditional -- at least one conditional is unterminated Unterminated REPT/IRP/IRPC/MACRO -- at least one block is unterminated [xx] [No] Fatal error(s) [,xx warnings] -- the number of fatal errors and warnings :Invoking LINK-80 LINK-80 is invoked by typing -- L80 obj1:filename.ext/sw1,obj2:filename.ext/sw2,... wherå  objn:filename.exô  denoteó á .REÌ filå tï bå linkeä anä swî  denoteó switches which control the linking process. :LINK-80 Switches /R Reset -- put loader back in initial state /E or /E:Name Exiô LINK-8° anä returî tï CP/M®  Searcè thå systeí librarù foò anù undefineä references®  /E:Namå useó Namå foò thå starô addresó  oæ the program. /G or /G:Name Starô  executioî  oæ  thå program®  Again¬  iæ  /G:Namå  ió specified, Name defines the start address of execution. /N Save the binary on disk under the name 'filename.COM'. /P:adr and /D:adr Seô  thå Prograí anä Datá areá originó foò thå nexô  prograí to be loaded. /U Lisô thå origiî anä enä oæ thå prograí anä datá areá aó welì as all undefined globals. /M Lisô  thå origiî anä enä oæ thå prograí anä datá  area¬  alì defineä globaló anä theiò values¬  anä alì undefineä globaló followeä bù aî asterisk. /S Search 'filename.REL' to satisfy references. /Ø Iæ á filename/Î waó specified¬  /Ø wilì causå thå filå tï bå saved in Intel HEX format with a extension of .HEX. /Ù Iæ á filename/Î waó specified¬ /Ù wilì creatå á filename.SYÍ filå wheî /Å ió entered® Thió filå containó thå nameó anä addresseó oæ alì globals for use with SID or ZSID. :Invoking LIB-80 To invoke LIB-80, type -- LIB Commandó  tï LIB-8° consisô oæ aî optionaì destinatioî filenamå  whicè setó  thå  namå oæ thå librarù beinç created¬  followeä bù aî  equaì  sign¬ followeä bù modulå nameó separateä bù commaó oò filenameó witè modulå nameó enclosed in angle brackets separated by commas. Tï  selecô  á  giveî modulå froí á file¬  uså thå  namå  oæ  thå  filå followeä  bù  thå  module(s©  specifieä  encloseä  iî  anglå  bracketó  anä separateä  bù  commas®  Iæ nï moduleó arå selecteä froí á file¬  theî  alì modules are selected. :LIB-80 Switches /O Set listing radix to Octal /H Set listing radix to Hexadecimal /U List undefineds /L List cross reference /C Create -- start LIB over /E Exit -- rename .LIB to .REL and exit /R Rename -- rename .LIB to .REL :Invoking CREF-80 CREF-80 is invoked by typing -- CREF80 listing=source wherå  'listing§  ió  thå  namå oæ thå  filå  'listing.LST§  generateä  anä 'source§  ó  thå  namå  oæ thå filå  'source.CRF§  generateä  bù  MACRO-80® 'listing§ ió optional¬ and¬ iæ omitted¬ thå listinç filå generateä ió nameä 'source.LST'. :Debugging MACRO-80 Programs Using DEBUG.MAC Š DEBUG.MAà ió  á  packagå oæ MACROó whicè thå useò maù emploù  tï  aiä himselæ  iî debugginç MACRO-8° programs®  Thió packagå containó twï  prinô MACROs¬  onå  registeò displaù MACRO¬  anä onå exiô MACRO®  Iî alì  cases¬ these MACROs have no net affect on any register. DEBUG.MAà ió useä bù firsô specifyinç iô aó á MACRÏ Librarù withiî thå user's program. This is accomplished by the statement -- MACLIB DEBUG.MAC aó aî assembly-languagå instructioî aô thå beginninç oæ hió program®  Thió statemenô  loadó thå librarù DEBUG.MAà anä makeó itó MACROó  availablå  foò use. These MACROs are -- Name # Args Size (Bytes) Function Example ---- ------ ------------ -------- ------- EXIT 0/1 275 or 263+ Print an exit message, EXIT print the contents of EXIT all registers, and warm boot CP/M PRINT 1 19+ Print a message on CON: PRINT PRINTC 1 17+ Print a char string on PRINTC <'M1',0DH> CON: REGS 0 241 Print the contents of REGS all registers on CON: Noteº Thå « afteò á sizå indicateó thaô onå musô adä tï thå indicateä sizå the number of characters specified in the parameter. Noteº  Messageó specifieä foò EXIÔ anä PRINÔ shoulä noô contaiî restricteä MACRO-80 symbols (such as !) or an error message will result. An example of the use of these MACROs follows -- MACLIB DEBUG.MAC -- code -- REGS ; print all register values at this point -- code -- PRINT ; got to check point 1 -- code -- EXIT ; should not have taken this path -- code -- PRINT ; got to check point 2 -- code -- EXIT ; normal exit -- code --