home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / dskutl / ed409.asm < prev    next >
Encoding:
Assembly Source File  |  1994-07-13  |  2.5 KB  |  74 lines

  1.  
  2. ; ED409.ASM        ED409.ASM dated 1984 September
  3.  
  4. ; This file is an overlay to EDFILE.COM which provides modifications.
  5. ; Since EDFILE is a particularly popular public domain program and
  6. ; since more fixes and modifications are sure to follow, this patch
  7. ; will be referred to by its date...4 for 1984 and 09 for September.
  8.  
  9. ; This patch by Clint Lew
  10. ; South Bay Technical Support Group RCP/M (213) 970-9238
  11.  
  12. ; This patch corrects two small bugs in the current version.
  13. ; The first bug limited the size of the file to which direct jumps
  14. ; could be made.  In the original version, for files greater than 
  15. ; about 8000H, the "dump relative address" or "A" command would not
  16. ; consistently jump directly to all addresses. (Actually the address
  17. ; jump limit was dependent upon the file size).
  18. ; The second bug was a minor problem in that a jump to an address
  19. ; which happened to be on a sector boundary would send you to the
  20. ; block before the desired block.
  21.  
  22.  
  23.  
  24.     ORG    0528H
  25.     PUSH    H    ;selected address
  26.     LHLD    27C3H    ;address offset
  27.     CALL    2A3AH    ;subtract offset from address
  28.     LXI    D,7
  29.     CALL    29DCH    ;divide by 128 to get record number
  30.     XCHG
  31.     LHLD    27BCH    ;LOF record number
  32.     XCHG
  33.     MOV    A,D
  34.     CMP    H    ;compare most significant byte
  35.     JC    0357H    ;selected record greater than LOF
  36.     JNZ    NEWREC    ;less than LOF
  37.     MOV    A,E
  38.     CMP    L    ;compare least significant byte
  39.     JZ    0357H    ;selected record equals LOF
  40.     JC    0357H    ;greater than LOF record
  41. NEWREC:    SHLD    27CAH    ;store valid record number
  42.     JMP    0562H    ;continue
  43.     END
  44.  
  45.  
  46. ;*************************************************************
  47. ;    General usage instructions for using ASM overlays 
  48. ;*************************************************************
  49.  
  50. ;               I N S T R U C T I O N S
  51. ;
  52. ;
  53. ; First, edit this file to your preferences using any editor.
  54. ; Wordstar in non-document mode works very well for this.
  55. ;
  56. ; Second, assemble this file using Digital Research's CP/M
  57. ; assembler ASM.COM.  For the file ED409.ASM,  enter ASM ED409.
  58. ;
  59. ; Lastly, use DDT to overlay the results of this EDOVR program 
  60. ; onto EDFILE.COM.  The procedure for this overlay follows:
  61. ;
  62. ;        A>DDT EDFILE.COM
  63. ;        DDT VERS 2.2
  64. ;        NEXT  PC
  65. ;        2C00 0100        (size varies with version)
  66. ;        -IED409.HEX        (note the "I" command)
  67. ;        -R            ("R" loads in the .HEX file)
  68. ;        NEXT  PC
  69. ;        2C80 0000
  70. ;        -G0            (return to CP/M)
  71. ;        A>SAVE 44 EDFILE.COM    (now have a modified .COM file)
  72. ;
  73. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  74.