; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ;ARROW.ASM ; ;source code to patch the Osborne 1 arrow keys to WS mode upon starting WS ;and to patch them back to CP/M mode upon exiting WS INISUB equ 03BBh UNISUB equ 03BEh MORPAT equ 045Bh RAM1ST equ 0894h EXTRA equ 0896h START equ EXTRA FALSE equ 0 TRUE equ NOT FALSE CPUZ80 equ TRUE CPU8080 equ NOT CPUZ80 org INISUB jmp ARWWS org UNISUB jmp ARWCPM ; The following is adapted from WSPATCH by Lee Swordy as modified by ; Jim Woolley. Self Patch for BIOS location added by Gerry Werth. ; These routines patch the Osborne Arrow keys for WordStar and CP/M ; ; The following is adapted by Gerry Werth from WORDSTAR ENHANCER by ; Craig Feied MD. ; These routines set the Logged and Exit disk drives. ; These routines patch the Osborne Arrow keys for WordStar and CP/M ; org START ;origin of special patch area if CPUZ80 ARWWS call MOVEM db 05h,04h,18h,13h ;^E,^D,^X,^S ; ARWCPM call MOVEM db 0Bh,0Ch,0Ah,08h ;^K,^L,^J,^H ; MOVEM pop d ;Source was one byte after the call lxi b,04h ;length is 4 bytes lda 0002h ;load accumulator with HI byte of BIOS sta $+5 ;store it below lhld 007Fh ;BIOS +7Fh Arrow Key table address pointer xchg ;swap DE and HL so HL=source and DE=dest db 0EDh,0B0h ;Z80 LDIR ret endif ;CPUZ80 ; if CPU8080 ARWWS lda 0002h ;load accumulator with HI byte of BIOS sta $+5 ;store it below lhld 007Fh ;BIOS +7Fh Arrow Key table address pointer mvi m,05h ;^E up inx h mvi m,04h ;^D right inx h mvi m,18h ;^X down inx h mvi m,13h ;^S left ret ; ARWCPM lda 0002h ;load accumulator with HI byte of BIOS sta $+5 ;store it below lhld 007Fh ;BIOS +7Fh Arrow Key table address pointer mvi m,0Bh ;^K up inx h mvi m,0Ch ;^L right inx h mvi m,0Ah ;^J down inx h mvi m,08h ;^H left endif ;CPU8080 ; RAMEND equ $ ; org RAM1ST DW RAMEND+1 ; end ;