1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
; showkeys.asm
bdos equ 5
org 100h
other:
ld c, 6
; This works only in cp/m plus.
;ld e, 0FDh
;call bdos
ld e,0FFh
call bdos
cp 0
jp z, other
cp 20h
jp z, finish
call showreg
jp other
finish ld c, 2
ld e, 0Dh
call bdos
ld c, 2
ld e, 0Ah
call bdos
call 0
showreg:
push bc
push hl
push af
push af
ld e, 20h
ld c, 2
call bdos
pop af
; Para ver mejor al trazar.
and 0F0h
rrca
rrca
rrca
rrca
call shownibble
pop af
call shownibble
pop hl
pop bc
ret
shownibble:
and 0Fh
add a, 30h
cp 3Ah
jp c, isdigit
add a, 7
isdigit:
ld e, a
ld c, 2
call bdos
ret
this_is_the_end: end
; End
|