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 / TROMPAT1.LBR / WSPATCH.AQM / WSPATCH.ASM
Assembly Source File  |  2000-06-30  |  1KB  |  67 lines

  1. ; WSPATCH.ASM 5-30-86 gsd
  2. ; Simple patch to WS 3.30 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 levle definitiions are restored.
  8. ;
  9. ; USE DDT TO PATCH WS.COM:
  10. ;
  11. ; A>DDT WS.COM
  12. ; DDT VERS 2.2
  13. ; NEXT PC
  14. ; 4600 0100
  15. ; -IWSPATCH.HEX
  16. ; -R
  17. ; NEXT PC
  18. ; 4600 0100
  19. ; -G0
  20. ;
  21. ; Warm Boot 
  22. ; A>SAVE 69 WS.COM
  23. ;
  24.  
  25. djnz    macro addr
  26.     db 10h
  27.     db low addr-($+1)
  28.     endm
  29.  
  30.     org 0162h    ; id string
  31.     
  32.     db '3.30'
  33.  
  34.     org 0287h
  35.  
  36. ;
  37. inisub:    jmp    morpat
  38. ;
  39. unisub: jmp    morpat
  40.  
  41.     org 2d7h
  42. ;
  43. morpat:    lhld    0001        ; GET WARM BOOT JMP ADDR
  44.     lxi    d,32h        ; offset to xlate table
  45.       dad    d        ; hl --> xlate table (bios) 
  46.     lxi    d,table        ; de --> xlate table (local)
  47.     mvi    b,4        ; count 
  48. ;
  49. loop:                ; repeat
  50.     mov    c,m        ;   swap *hl,*de
  51.     ldax    d
  52.     mov    m,a
  53.     mov    a,c
  54.     stax    d
  55.     inx    h        ;   hl++, de++
  56.     inx    d
  57.     djnz    loop        ; unitl bytes swaped
  58.         ret
  59. ;
  60. table:    db    'E'-40h        ; up arrow
  61.     db    'X'-40h        ; down arrow
  62.     db    'S'-40h        ; left arrow
  63.     db    'D'-40H        ; right arrow
  64.  
  65.     end
  66.