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 / FGPATCH.ASM < prev    next >
Assembly Source File  |  1986-09-19  |  1KB  |  72 lines

  1. ; FGPATCH.ASM 6-5-86 gsd
  2. ; Simple patch to FORMGEN 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 FORMGEN.COM:
  19. ;
  20. ; A>DDT FORMGEN.COM
  21. ; DDT VERS 2.2
  22. ; NEXT PC
  23. ; 8500 0100
  24. ; -IDSPATCH.HEX
  25. ; -R
  26. ; NEXT PC
  27. ; 8500 0100
  28. ; -G0
  29. ;
  30. ;
  31.  
  32. djnz    macro addr
  33.     db 10h
  34.     db low addr-($+1)
  35.     endm
  36.  
  37.     org 0165h    ; id string FORMGEN.COM 1.42
  38.     db    '1.42'
  39.     org 2A7h
  40. ;
  41. inisub:    jmp    morpat
  42. ;
  43. unisub: jmp    morpat
  44.  
  45.     org 2deh
  46. ;
  47. morpat:    lhld    0001        ; GET WARM BOOT JMP ADDR
  48.     lxi    d,32h        ; offset to xlate table
  49.     dad    d        ; hl --> xlate table (bios) 
  50.     lxi    d,table        ; de --> xlate table (local)
  51.     mvi    b,4        ; count 
  52. ;
  53. loop:                ; repeat
  54.     mov    c,m        ;   swap *hl,*de
  55.     ldax    d
  56.     mov    m,a
  57.     mov    a,c
  58.     stax    d
  59.     inx    h        ;   hl++, de++
  60.     inx    d
  61.     djnz    loop        ; unitl bytes swaped
  62.         ret
  63. ;
  64. table:    db    'E'-40h        ; up arrow
  65.     db    'X'-40h        ; down arrow
  66.     db    'S'-40h        ; left arrow
  67.     db    'D'-40H        ; right arrow
  68.  
  69.     end
  70.  
  71.