home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / ZCPR33 / A-R / M80HACK.TXT < prev    next >
Text File  |  2000-06-30  |  4KB  |  127 lines

  1. Macro80/Link80 version 3.44 patches for ZRDOS/ZCPR3
  2.  
  3. The following two short .HEX segments are overlay patches for
  4. M80 and L80. To use them, write the hex code between the horizontal
  5. lines out into seperate files and use MLOAD to overlay the .COM
  6. originals.
  7.  
  8. EG: (write first block of hex code to MPAT.HEX)
  9. MLOAD M80.COM MPAT.HEX
  10.  
  11. The first, for Macro-80, causes M80 to increment ZCPR3 flags 0 and 1
  12. whenever a fatal error or warning is found during assembly. I use
  13. ZEX frequently to assemble a number of files with different option
  14. switches and link the .RELs together; as this takes a while, I normally
  15. go and get a coffee during the assembly, and a well-known law states
  16. that if one of the files has errors the warning message will have
  17. been scrolled off the screen before I return. However, the patch
  18. allows ZEX to examine the flags and abort the batch if any errors
  19. are found.
  20.  
  21. The second patch cures an annoying "feature" of Link-80. In between
  22. commands it resets the disk system, presumably in case the disks
  23. have been changed. Apart from adding significantly to the time for
  24. complex links, it crashes the system if there's no disk in the A drive.
  25. This is not necessary for ZRDOS and can be killed by writing NOPs over
  26. the three BDOS calls at 02DEH, 02C4H and 02DBH.
  27. I'd like to have a patch for detecting undefined globals at the end
  28. of the link and setting a flag for ZEX, but this requires detecting
  29. that L80 is about to exit.
  30.  
  31. WARNING: these patches are only valid for the 3.44 versions of M80/L80
  32. dated 09-Dec-81.
  33.  
  34. Hack for Microsoft Macro-80 3.44 09-Dec-81
  35. Intercepts errors and warnings and increments :
  36. Flag byte 0 (0FDB0H) for fatal errors
  37. Flag byte 1 (0FDB1H) for warnings
  38. If your flags are at different locations you'll
  39. have to edit your addresses into the hex and
  40. change the checksum. To calculate the checksum add
  41. all the data bytes together, mod 256, invert and add 1.
  42. EG: 01+01+27+00+80=A9, NOT(A9)=56, +1 gives 57.
  43. check: (01+01+27+00+80+57) MOD 100H = 00.
  44. -------------------------------------------
  45. :010127008057
  46. :012E1500803C
  47. :022EC900404F78
  48. :032F0000CD504F62
  49. :104F40003AB0FD3C32B0FDAFC3D12E0000000000EE
  50.    flag 0  ^^^^    ^^^^        checksum  ^^  <delete this text>
  51. :104F50003AB1FD3C32B1FDAF215F2FC90000000026
  52.    flag 1  ^^^^    ^^^^        checksum  ^^  <delete this text>
  53. :00000001FF
  54. -------------------------------------------
  55. (End Macro-80 hack)
  56.  
  57. Hack for Microsoft Link-80 3.44 09-Dec-81
  58. Removes disk reset between file links,
  59. greatly speeding up long batch jobs.
  60. -------------------------------------------
  61. :0302CE000000002D
  62. :0302D40000000027
  63. :0302DB0000000020
  64. :00000001FF
  65. -------------------------------------------
  66. (End Link-80 hack)
  67.  
  68. My ZEX file to use these patches goes as follows.
  69.  
  70. ;; ZEX submit file for multiple assembly. Assembles .MAC files
  71. ;; from current user area, transfers them into area $1 (you enter),
  72. ;; links them into $2.HEX (you enter), and saves an ID file $3
  73. ;; (which you enter). 3 parameters needed.
  74. ;; --- eg ---  ZEX ASM 1: HEXFILE -USERID
  75. ;; builds HEXFILE.HEX in user area 1 and saves -USERID as i/d
  76. ;;
  77. ^<^|Assembling into area $1 and producing file $1$2.HEX^|^>
  78. ;; clear error registers
  79. root:reg s# 0
  80. root:quiet s
  81. root:m80
  82. =file1
  83. =file2
  84. =file3
  85. =file4
  86. =file5
  87. =file6
  88. =file7
  89. =file8
  90. =file9
  91. =file10
  92. =vars
  93. ^C
  94. ;; if both flag 0 and flag 1 are zero, do the link
  95. if 0 0
  96. if 1 0
  97. echo                 Assembly complete, moving files now ..|
  98. $1|
  99. era *.rel
  100. root:move 0:*.rel $1
  101. if ~nu $3
  102. if ~ex $3
  103. save 0 $3
  104. fi
  105. fi
  106. echo                 Linking files ..|
  107. l80
  108. /p:100,/d:4000
  109. vars
  110. file1,file2,file3,file4,file5,file6,file7,file8,file9,file10
  111. $2/n:p/e/x
  112. ;;
  113. else
  114. ;; if flag 1 was non-zero
  115. echo ^g                There were assembler warnings!|
  116. root:reg d1
  117. fi
  118. else
  119. ;; if flag 0 was non-zero
  120. echo ^g                There were fatal errors!|
  121. root:reg d0
  122. fi
  123. root:quiet r
  124. ^<^|That's all, folks!^|^>
  125.  
  126. Peter Hand, Portsmouth, England
  127.