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 / KAYPRO / ADVENT1.ARK / REPATCH.ASM < prev    next >
Assembly Source File  |  1986-09-19  |  1KB  |  76 lines

  1. ; REPATCH.ASM 6-5-86 gsd
  2. ; Simple patch to REDIT for Kaypro Keyboard Arrow Keys
  3. ; Assembles with DRI MAC.COM
  4. ; These patches are intended to work with The Advent TurboROM.
  5. ; The patches simply swap the CP/M level arrow key definitions
  6. ; for MicroPRO type arrow key usage on start up of the program.
  7. ; On exit from the program the CP/M level definitiions are restored.
  8. ;
  9. ; All of the following files must be patched:
  10. ;
  11. ;    DATASTAR.COM
  12. ;    FORMGEN.COM
  13. ;    REDIT.COM
  14. ;    REPORT.COM
  15. ;    RINSTALL.COM
  16. ;
  17. ;
  18. ; USE DDT TO PATCH REDIT.COM:
  19. ;
  20. ; A>DDT REDIT.COM
  21. ; DDT VERS 2.2
  22. ; NEXT PC
  23. ; 7100 0100
  24. ; -IDSPATCH.HEX
  25. ; -R
  26. ; NEXT PC
  27. ; 7100 0100
  28. ; -G0
  29. ;
  30. ; Warm Boot 
  31. ; A>SAVE 112 REDIT.COM
  32. ;
  33. ;
  34.  
  35. djnz    macro addr
  36.     db 10h
  37.     db low addr-($+1)
  38.     endm
  39.  
  40.     org 0162h    ; id string REDIT.COM 1.03
  41.     db    '1.03'
  42.  
  43.     org 2A7h
  44. ;
  45. inisub:    jmp    morpat
  46. ;
  47. unisub: jmp    morpat
  48.  
  49.     org 2deh
  50. ;
  51. morpat:    lhld    0001        ; GET WARM BOOT JMP ADDR
  52.     lxi    d,32h        ; offset to xlate table
  53.     dad    d        ; hl --> xlate table (bios) 
  54.     lxi    d,table        ; de --> xlate table (local)
  55.     mvi    b,4        ; count 
  56. ;
  57. loop:                ; repeat
  58.     mov    c,m        ;   swap *hl,*de
  59.     ldax    d
  60.     mov    m,a
  61.     mov    a,c
  62.     stax    d
  63.     inx    h        ;   hl++, de++
  64.     inx    d
  65.     djnz    loop        ; unitl bytes swaped
  66.         ret
  67. ;
  68. table:    db    'E'-40h        ; up arrow
  69.     db    'X'-40h        ; down arrow
  70.     db    'S'-40h        ; left arrow
  71.     db    'D'-40H        ; right arrow
  72.  
  73.     end
  74.  
  75.