CPU-Z80-Disassembler
view release on metacpan or search on metacpan
t/data/zx81.asm view on Meta::CPAN
jr nz, DISPLAY_6 ; to DISPLAY-6
;
ld a, (DF_SZ) ; sv DF_SZ
cp $18 ;
jr nc, DISPLAY_6 ; to DISPLAY-6
;
inc a ;
ld (DF_SZ), a ; sv DF_SZ
ld b, a ;
ld c, $01 ;
call LOC_ADDR ; routine LOC-ADDR
ld d, h ;
ld e, l ;
ld a, (hl) ;
;; FREE-LINE
FREE_LINE:
dec hl ;
cp (hl) ;
jr nz, FREE_LINE ; to FREE-LINE
;
inc hl ;
ex de, hl ;
ld a, ($4005) ; sv RAMTOP_hi
cp $4D ;
call c, RECLAIM_1 ; routine RECLAIM-1
jr EDIT_ROOM ; to EDIT-ROOM
;
; --------------------------
; THE 'WAIT FOR KEY' SECTION
; --------------------------
;
;
;; DISPLAY-6
DISPLAY_6:
ld hl, START ;
ld (X_PTR), hl ; sv X_PTR_lo
;
ld hl, CDFLAG ; system variable CDFLAG
bit 7, (hl) ;
call z, DISPLAY_1 ; routine DISPLAY-1
;
;; SLOW-DISP
SLOW_DISP:
bit 0, (hl) ;
jr z, SLOW_DISP ; to SLOW-DISP
;
ld bc, (LAST_K) ; sv LAST_K
call DEBOUNCE ; routine DEBOUNCE
call DECODE ; routine DECODE
;
jr nc, LOWER ; back to LOWER
;
; -------------------------------
; 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
K_DECODE:
ld a, (MODE) ; Fetch value of system variable MODE
dec a ; test the three values together
;
jp m, FETCH_2 ; forward, if was zero, to FETCH-2
;
jr nz, FETCH_1 ; forward, if was 2, to FETCH-1
;
; The original value was one and is now zero.
ld (MODE), a ; update the system variable MODE
;
dec e ; reduce E to range $00 - $7F
ld a, e ; place in A
sub $27 ; subtract 39 setting carry if range 00 - 38
jr c, FUNC_BASE ; forward, if so, to FUNC-BASE
;
ld e, a ; else set E to reduced value
;
;; FUNC-BASE
FUNC_BASE:
ld hl, K_FUNCT ; address of K-FUNCT table for function keys.
jr TABLE_ADD ; forward to TABLE-ADD
;
; ---
;; FETCH-1
FETCH_1:
ld a, (hl) ;
cp $76 ;
jr z, K_L_KEY ; to K/L-KEY
;
cp $40 ;
set 7, a ;
jr c, ENTER ; to ENTER
;
ld hl, $00C7 ; (expr reqd)
;
;; TABLE-ADD
TABLE_ADD:
add hl, de ;
jr FETCH_3 ; to FETCH-3
;
; ---
;; FETCH-2
FETCH_2:
ld a, (hl) ;
bit 2, (iy+FLAGS-IY0) ; sv FLAGS - K or L mode ?
jr nz, TEST_CURS ; to TEST-CURS
( run in 0.457 second using v1.01-cache-2.11-cpan-39bf76dae61 )