home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / emulator / unix / z80pack / z80asm / 00readme.txt < prev    next >
Encoding:
Text File  |  1992-07-09  |  2.5 KB  |  79 lines

  1. Usage:
  2.  
  3. z80asm -ofile -f[b|m|h] -l[file] -s[n|a] -v -dsymbol ... file ...
  4.  
  5. A maximum of 512 source files is allowed. If the filename of a source
  6. doesn't have an extension the default extension ".asm" will be
  7. concated. Source file names may have a path, the maximum length of
  8. a full qualified filename is 128 characters.
  9. If one use relative paths, the extension must be given, because all
  10. after a "." would be used as extension!
  11.  
  12. Option o:
  13. To override the default name of the output file. Without this option
  14. the name of the output file becomes the name of the input file,
  15. but with the extension ".bin". The output file may have a path,
  16. the maximum length is limited to 128 characters.
  17.  
  18. Option f:
  19. Format of the output file:
  20.  
  21.     -fb -> binary file
  22.     -fm -> binary file with Mostek header
  23.     -fh -> Intel hex
  24.  
  25. Option l:
  26. Without this option no list file will be generated. With -l a list
  27. file with the name of the source file but extension ".lis" will be
  28. generated. An optional file name with path (128 characters maximum)
  29. may be added to this option.
  30.  
  31. Option s:
  32. This option writes the unsorted symbol table (-s), sorted by name (-sn)
  33. or sorted by address (-sa) into the list file. This options works
  34. only, if option -l was given.
  35.  
  36. Option v:
  37. Verbose operation of the assembler.
  38.  
  39. Option d:
  40. With this option one can predefine symbols with a value of 0.
  41. The number of this option is not limited in the command line.
  42.  
  43. Pseudo Operations:
  44.  
  45. Definition of symbols and allocation of memory:
  46.  
  47.      ORG    <expression>    - set program address
  48. <symbol> EQU    <expression>    - define constant symbol
  49. <symbol> DEFL   <expression>    - define variable symbol
  50. <symbol> DEFB   <exp,'char',..> - write bytes in memory
  51. <symbol> DEFW   <exp,exp..>     - write words (16 bits) in memory
  52. <symbol> DEFM   <'string'>      - write character string in memory
  53. <symbol> DEFS   <expression>    - reserve space in memory
  54.  
  55.  
  56. Conditional assembly:
  57.  
  58. IFDEF   <symbol>        - assemble if symbol defined
  59. IFNDEF  <symbol>        - assemble if symbol not defined
  60. IFEQ    <exp1,exp2>     - assemble if equal
  61. IFNEQ   <exp1,exp2>     - assemble if not equal
  62. ELSE                    - else for all conditionals
  63. ENDIF                   - end of conditional assembly
  64.  
  65.  
  66. Manipulation of list file:
  67.  
  68. PAGE    <expression>    - number of lines/page
  69. EJECT                   - skip to new page
  70. LIST                    - listing on
  71. NOLIST                  - listing off
  72. TITLE   <'string'>      - define title for page header
  73.  
  74.  
  75. Others:
  76.  
  77. INCLUDE <filename>      - include another source file
  78. PRINT   <'string'>      - print string to stdout in pass one
  79.