CPU-Z80-Disassembler
view release on metacpan or search on metacpan
t/data/zx81.ctl view on Meta::CPAN
:; update LAST_K with new values.
:;
0248:C
0248 78 ld a, b :C
:; load A with previous column - will be $FF if
:; there was no key.
0249:C
0249 C602 add a, $02 :C
:; adding two will set carry if no previous key.
:;
024B:C
024B ED42 sbc hl, bc :C
:; subtract with the carry the two key values.
:;
024D:C
:#; If the same key value has been returned twice then HL will be zero.
:#
024D 3A2740 ld a, ($4027) :C
:; fetch system variable DEBOUNCE
0250:C
0250 B4 or h :C
:; and OR with both bytes of the difference
0251:C
0251 B5 or l :C
:; setting the zero flag for the upcoming branch.
:;
0252:C
0252 58 ld e, b :C
:; transfer the column value to E
0253:C
0253 060B ld b, $0B :C
:; and load B with eleven
:;
0255:C
0255 213B40 ld hl, $403B :C
:; address system variable CDFLAG
0258:C
0258 CB86 res 0, (hl) :C
:; reset the rightmost bit of CDFLAG
025A:C
025A 2008 jr nz, $0264 :C
:; skip forward if debounce/diff >0 to NO-KEY
:;
025C:C
025C CB7E bit 7, (hl) :C
:; test compute and display bit of CDFLAG
025E:C
025E CBC6 set 0, (hl) :C
:; set the rightmost bit of CDFLAG.
0260:C
0260 C8 ret z :C
:; return if bit 7 indicated fast mode.
:;
0261:C
0261 05 dec b :C
:; (4) decrement the counter.
0262:C
0262 00 nop :C
:; (4) Timing - 4 clock cycles. ??
0263:C
0263 37 scf :C
:; (4) Set Carry Flag
:;
0264:C
:#;; NO-KEY
0264 212740 ld hl, $4027 :C NO_KEY
:; sv DEBOUNCE
0267:C
0267 3F ccf :C
:; Complement Carry Flag
0268:C
0268 CB10 rl b :C
:; rotate left B picking up carry
:; C<-76543210<-C
:;
026A:C
:#;; LOOP-B
026A 10FE djnz $026A :C LOOP_B
:; self-loop while B>0 to LOOP-B
:;
026C:C
026C 46 ld b, (hl) :C
:; fetch value of DEBOUNCE to B
026D:C
026D 7B ld a, e :C
:; transfer column value
026E:C
026E FEFE cp $FE :C
:;
0270:C
0270 9F sbc a, a :C
:;
0271:C
0271 061F ld b, $1F :C
:;
t/data/zx81.ctl view on Meta::CPAN
1CAC:B
1CAC-1CAC 00 :B
:;;jump-true
1CAD:B
1CAD-1CAD 04 :B
:;;to L1CB1, VALID
:;
1CAE:B
1CAE-1CAE 34 :B
:;;end-calc
:;
:;
1CAF:C
:#;; REPORT-Ab
1CAF CF rst $08 :C REPORT_Ab
:; ERROR-1
1CB0:B
1CB0-1CB0 09 :B
:; Error Report: Invalid argument
:;
1CB1:B
:#;; VALID
1CB1-1CB1 A0 :B VALID
:;;stk-zero Note. not
1CB2:B
1CB2-1CB2 02 :B
:;;delete necessary.
1CB3:B
1CB3-1CB3 34 :B
:;;end-calc
1CB4:C
1CB4 7E ld a, (hl) :C
:;
:;
1CB5:C
1CB5 3680 ld (hl), $80 :C
:;
1CB7:C
1CB7 CD1D15 call $151D :C
:; routine STACK-A
:;
1CBA:C
1CBA EF rst $28 :C
:;; FP-CALC
1CBB:B
1CBB-1CBB 30 :B
:;;stk-data
1CBC:B
1CBC-1CBC 38 :B
:;;Exponent: $88, Bytes: 1
1CBD:B
1CBD-1CBD 00 :B
:;;(+00,+00,+00)
1CBE:B
1CBE-1CBE 03 :B
:;;subtract
1CBF:B
1CBF-1CBF 01 :B
:;;exchange
1CC0:B
1CC0-1CC0 2D :B
:;;duplicate
1CC1:B
1CC1-1CC1 30 :B
:;;stk-data
1CC2:B
1CC2-1CC2 F0 :B
:;;Exponent: $80, Bytes: 4
1CC3:B
1CC3-1CC6 4CCCCCCD :B
:;;
1CC7:B
1CC7-1CC7 03 :B
:;;subtract
1CC8:B
1CC8-1CC8 33 :B
:;;greater-0
1CC9:B
1CC9-1CC9 00 :B
:;;jump-true
1CCA:B
1CCA-1CCA 08 :B
:;;to L1CD2, GRE.8
:;
1CCB:B
1CCB-1CCB 01 :B
:;;exchange
1CCC:B
1CCC-1CCC A1 :B
:;;stk-one
1CCD:B
1CCD-1CCD 03 :B
:;;subtract
1CCE:B
( run in 0.496 second using v1.01-cache-2.11-cpan-e1769b4cff6 )