home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / asmutl / crowecpm.lbr / CROWECPM.DZC / CROWECPM.DOC
Text File  |  1986-12-07  |  7KB  |  144 lines

  1.                       CROWECPM --- A Z80 ASSEMBLER
  2.  
  3.  
  4. The assembler provides all the features of Zilog's assembler except for
  5. macros, conditional assembly and lower case.  It was originally written
  6. to be used with cassette or paper tape, with the desired pass number
  7. entered from the console.  The assembler is now set up to receive the
  8. pass numbers from a buffer in the program itself.  The output of the
  9. assembler is sent to files except the error listing which is sent to the
  10. console.  For each pass, the source is re-read and the appropriate
  11. output generated.  Pass 1 builds the symbol table and is required.  Pass
  12. 2 outputs the assembly listing, pass 3 writes Intel format hex object
  13. and pass 4 gives an assembly listing of those lines containing errors on
  14. the console.  The assembler has been modified to perform pass 4 before
  15. writing the files (passes 2 and 3) so that errors can be seen and
  16. corrected before the time consuming output is done.
  17.  
  18. The linkage routines are written so that the assembler can be run as a
  19. standard CP/M .COM file with the following command format:
  20.  
  21.                 CROWECPM FILENAME.YY
  22.  
  23. The characters in the normal file extension position are Y/N selects
  24. (default is Y), the first for listing file and the second for the hex
  25. object file.  The source must have a file extension of .Z80 while the
  26. listing is created with an extension of .PRN and the object with an
  27. extension of .HEX.  Only minimal error checking and reporting is done
  28. when creating files.  If no source file with the correct name is found a
  29. message is displayed.  If any other disk error on a BDOS call occurs,
  30. that is reported.  In either case, the routine waits for a keystroke
  31. before exiting to CP/M.
  32.  
  33. SYNTAX
  34.  
  35. The CROWECPM assembler requires that the source file be written using
  36. standard Zilog mnemonics.  In addition it requires that tabs be used as
  37. field delimiters.  Labels may have colons following but this is not
  38. required.  Comments can be entered anywhere (in any field) following a
  39. semicolon as is usually the case.  Hexidecimal numbers that begin with a
  40. letter must be preceded by a 0 and conclude with an H with no imbedded
  41. spaces.  Since the source of the assembler is included, and it is
  42. syntactically correct, it can be used as a model of assembly language
  43. programming.
  44.  
  45. FUNCTIONAL OPERATORS
  46.  
  47. +               MONADIC PLUS
  48. -               MONADIC MINUS
  49. .NOT.  or \      LOGICAL NOT
  50. .HIGH.          VALUE OF MOST SIGNIFICANT BIT
  51. .LOW.           VALUE OF LEAST SIGNIFICNANT BIT
  52. .RES.           RESULT
  53. **              EXPONENTIATION
  54. *               MULTIPLICATION
  55. /               DIVISION
  56. .MOD.           MODULO
  57. .SHR.           LOGIGAL SHIFT RIGHT
  58. .SHL.           LOGICAL SHIFT LEFT
  59. +               ADDITION
  60. -               SUBTRACTION
  61. .AND.  or &      LOGICAL AND
  62. .OR.  or ^       LOGICAL OR
  63. .XOR.           LOGICAL EXCLUSIVE OR
  64. .EQ.  or =       EQUALS
  65. .GT.  or >       GREATER THAN
  66. .LT.  or <       LESS THAN
  67. .UGT.           UNSIGNED GREATER THAN
  68. .ULT.           UNSIGNED LESS THAN
  69.  
  70. PSEUDO-OPS
  71.  
  72. The following Pseudo-ops are supported by CROWECPM:
  73.  
  74. ORG ---Sets the address reference
  75. EQU ---For assigning a value to a label (can appear only once per label)
  76. DEFL --Also assigns a value to a label but can be used to assign different
  77.         values to a label at different places in the program
  78. END ---Must conclude the program.  Can be followed with the starting address
  79.         of the target program.
  80. DEFB --Defines the content of one byte of memory at the address the OP
  81.         appears in the program.
  82. DEFB 'x'--Same as above but defines the byte to be the ascii code for the
  83.         character between the quotes.  (x in the example)
  84. DEFW --Defines the contents of two bytes of memory
  85. DEFS --Reserves bytes in memory beginning with the address the OP appears
  86. DEFM 'x'--Defines the contents memory to be the ascii code of the characters
  87.         appearing between the quotes----MUST NOT EXCEED 32 CHARACTERS-----
  88. TITLE 's'-Defines the program title.  It is printed in the listing headers.
  89.  
  90. An additional note about the assembler the way it stands:  there is a
  91. limit of 32 characters for a quoted string as operand of a DEFM
  92. statement.  If this limit is exceeded NO error message is generated, the
  93. string is truncated.  If you're not careful, the terminating '$' for a
  94. CP/M output string could be lost and the results would be unpredictable.
  95.  
  96. The CROWCPM.Z80 file has the linkages incorporated into it, near the
  97. end.  As it now stands, the symbol table is limited only by the amount
  98. of available memory since the assembler reads the start address of BDOS
  99. from locations 6&7 and sets that as the top of available symbol space.
  100.  
  101. There has been one minor improvement to the assembler: you can now
  102. specify that the .LST or .HEX files should be sent to drive B rather
  103. than the current default drive by putting a B in the proper position in
  104. the normal filename extension.  E.g. CROWECPM CROWECPM.NB would
  105. assemble the file CROWECPM.Z80, skip the .LST file and send the .HEX
  106. file to drive B. The source file must still reside on the same drive as
  107. the assembler.
  108.  
  109. The source is currently set up for the CROWECPM assembler.  To assemble
  110. it with M80 you will need to add ASEG and .Z80 commands to it.
  111.  
  112. Bug fixes from Thomas Hameenaho
  113.  
  114. The first bug resulted when the single quote character in EX AF,AF'
  115. caused the assembler to expect the following characters to be a text
  116. string.  Now I test if the character preceding the ' is a 'F', if so,
  117. the 'QUOTE' flag should not be set.
  118.  
  119. The other bug (LBFSZ-1) resulted because the minus character (instead of
  120. the "_" character) was declared legal in a label.  Probably a typing
  121. error when entering the source code.
  122.  
  123. So now CROWCPM.COM will assemble CROWECPM.Z80.
  124.  
  125.         Thomas Hameenaho
  126.         Djaknegatan 7
  127.         S-754 23 Uppsala
  128.         Sweden
  129. *****************************************************************************
  130.  
  131. Enhancements from Micro Cornucopia
  132.  
  133. The assembler we received was machine dependent.  Rather than just
  134. changing it so that it would run on the Kaypro we replaced the machine
  135. dependent code with standard CP/M function calls.  As a result the
  136. assembler should now run on any standard CP/M machine.  We have tested
  137. it with the Big Board running double density and a Kaypro with a
  138. Winchester sub-system.  If you have any problems with the assembler or
  139. improve it in any way please contact us.
  140.  
  141.         Micro Cornucopia
  142.         PO BOX 223
  143.         Bend OR 97709
  144.