Hello guys,
I'm trying to develop my first assembly MSX-DOS application after my really first little application in 1986 (the nostalgy wins...).
Actually, my goal is to capture the SHIFT key press action when the user write something on MSX-DOS prompt.
I created this code where after "start" label I rewrite H.TIMI routine for to call my custom "readKeys" routine and this solution works.
Into debug mode I can observe the execution to arrive on my break point on "ld a,(KEYS+6)" row.
The execution do not continue on next instruction "bit 0,a" and I don't understand why. If I try to use step in debug command I lost myself into standard code.
Can you help me to find the issue on my code?
Thanks.
Fausto
; MSX-DOS entry point BDOS equ #0005 ;MSX BIOS CALLS KEYINT equ #0038 KEYS equ #FBE5 H_TIMI equ #FD9A ; MSX-DOS function codes STROUT equ #0009 ; START POINT! org #100 start: di ld hl,H_TIMI ld de,oldHook ld bc,5 ldir ld hl,H_TIMI ld de, readKeys ld (hl), #C3 ld (H_TIMI+1), de ei ret readKeys: ld a,(KEYS+6) bit 0,a jp z, ShiftKeyPressed jp oldHook ShiftKeyPressed: push de ld de, message ld c, STROUT call BDOS pop de jp oldHook message: db "Key pressed!$" oldHook: db #C9,#C9,#C9,#C9,#C9 ; use the label "start" as the entry point finish: end start
Для того, чтобы оставить комментарий, необходимо регистрация или !login