CPU-Z80-Disassembler
view release on metacpan or search on metacpan
t/data/zx81.ctl view on Meta::CPAN
:#; THE 'WAIT FOR KEY' SECTION
:#; --------------------------
:#;
:#;
:#
:#;; DISPLAY-6
04C1 210000 ld hl, $0000 :C DISPLAY_6
:;
04C4:C
04C4 221840 ld ($4018), hl :C
:; sv X_PTR_lo
:;
04C7:C
04C7 213B40 ld hl, $403B :C
:; system variable CDFLAG
04CA:C
04CA CB7E bit 7, (hl) :C
:;
:;
04CC:C
04CC CC2902 call z, $0229 :C
:; routine DISPLAY-1
:;
04CF:C
:#;; SLOW-DISP
04CF CB46 bit 0, (hl) :C SLOW_DISP
:;
04D1:C
04D1 28FC jr z, $04CF :C
:; to SLOW-DISP
:;
04D3:C
04D3 ED4B2540 ld bc, ($4025) :C
:; sv LAST_K
04D7:C
04D7 CD4B0F call $0F4B :C
:; routine DEBOUNCE
04DA:C
04DA CDBD07 call $07BD :C
:; routine DECODE
:;
04DD:C
04DD 3093 jr nc, $0472 :C
:; back to LOWER
:;
04DF:C
:#; -------------------------------
:#; THE 'KEYBOARD DECODING' SECTION
:#; -------------------------------
:#; The decoded key value is in E and HL points to the position in the
:#; key table. D contains zero.
:#
:#;; K-DECODE
04DF 3A0640 ld a, ($4006) :C K_DECODE
:; Fetch value of system variable MODE
04E2:C
04E2 3D dec a :C
:; test the three values together
:;
04E3:C
04E3 FA0805 jp m, $0508 :C
:; forward, if was zero, to FETCH-2
:;
04E6:C
04E6 200F jr nz, $04F7 :C
:; forward, if was 2, to FETCH-1
:;
04E8:C
:#; The original value was one and is now zero.
:#
04E8 320640 ld ($4006), a :C
:; update the system variable MODE
:;
04EB:C
04EB 1D dec e :C
:; reduce E to range $00 - $7F
04EC:C
04EC 7B ld a, e :C
:; place in A
04ED:C
04ED D627 sub $27 :C
:; subtract 39 setting carry if range 00 - 38
04EF:C
04EF 3801 jr c, $04F2 :C
:; forward, if so, to FUNC-BASE
:;
04F1:C
04F1 5F ld e, a :C
:; else set E to reduced value
:;
04F2:C
:#;; FUNC-BASE
04F2 21CC00 ld hl, $00CC :C FUNC_BASE
:; address of K-FUNCT table for function keys.
04F5:C
04F5 180E jr $0505 :C
:; forward to TABLE-ADD
:;
( run in 0.444 second using v1.01-cache-2.11-cpan-39bf76dae61 )