CPU-Z80-Disassembler
view release on metacpan or search on metacpan
t/data/zx81.ctl view on Meta::CPAN
0313 210940 ld hl, $4009 :C
:; set start of area to VERSN thereby
:; preserving RAMTOP etc.
:;
0316:C
:#;; OUT-PROG
0316 CD1E03 call $031E :C OUT_PROG
:; routine OUT-BYTE
:;
0319:C
0319 CDFC01 call $01FC :C
:; routine LOAD/SAVE >>
031C:C
031C 18F8 jr $0316 :C
:; loop back to OUT-PROG
:;
031E:C
:#; -------------------------
:#; THE 'OUT-BYTE' SUBROUTINE
:#; -------------------------
:#; This subroutine outputs a byte a bit at a time to a domestic tape recorder.
:#
:#;; OUT-BYTE
031E 5E ld e, (hl) :C OUT_BYTE
:; fetch byte to be saved.
031F:C
031F 37 scf :C
:; set carry flag - as a marker.
:;
0320:C
:#;; EACH-BIT
0320 CB13 rl e :C EACH_BIT
:; C < 76543210 < C
0322:C
0322 C8 ret z :C
:; return when the marker bit has passed
:; right through. >>
:;
0323:C
0323 9F sbc a, a :C
:; $FF if set bit or $00 with no carry.
0324:C
0324 E605 and $05 :C
:; $05 $00
0326:C
0326 C604 add a, $04 :C
:; $09 $04
0328:C
0328 4F ld c, a :C
:; transfer timer to C. a set bit has a longer
:; pulse than a reset bit.
:;
0329:C
:#;; PULSES
0329 D3FF out ($FF), a :C PULSES
:; pulse to cassette.
032B:C
032B 0623 ld b, $23 :C
:; set timing constant
:;
032D:C
:#;; DELAY-2
032D 10FE djnz $032D :C DELAY_2
:; self-loop to DELAY-2
:;
032F:C
032F CD460F call $0F46 :C
:; routine BREAK-1 test for BREAK key.
:;
0332:C
:#;; BREAK-2
0332 3072 jr nc, $03A6 :C BREAK_2
:; forward with break to REPORT-D
:;
0334:C
0334 061E ld b, $1E :C
:; set timing value.
:;
0336:C
:#;; DELAY-3
0336 10FE djnz $0336 :C DELAY_3
:; self-loop to DELAY-3
:;
0338:C
0338 0D dec c :C
:; decrement counter
0339:C
0339 20EE jr nz, $0329 :C
:; loop back to PULSES
:;
033B:C
:#;; DELAY-4
033B A7 and a :C DELAY_4
:; clear carry for next bit test.
033C:C
033C 10FD djnz $033B :C
:; self loop to DELAY-4 (B is zero - 256)
:;
t/data/zx81.ctl view on Meta::CPAN
:#; the name has been matched in full.
:#; proceed to load the data but first increment the high byte of E_LINE, which
:#; is one of the system variables to be loaded in. Since the low byte is loaded
:#; before the high byte, it is possible that, at the in-between stage, a false
:#; value could cause the load to end prematurely - see LOAD/SAVE check.
:#
0375 FD3415 inc (iy+$15) :C
:; increment system variable E_LINE_hi.
0378:C
0378 210940 ld hl, $4009 :C
:; start loading at system variable VERSN.
:;
037B:C
:#;; IN-PROG
037B 50 ld d, b :C IN_PROG
:; set D to zero as indicator.
037C:C
037C CD4C03 call $034C :C
:; routine IN-BYTE loads a byte
037F:C
037F 71 ld (hl), c :C
:; insert assembled byte in memory.
0380:C
0380 CDFC01 call $01FC :C
:; routine LOAD/SAVE >>
0383:C
0383 18F6 jr $037B :C
:; loop back to IN-PROG
:;
0385:C
:#; ---
:#
:#; this branch assembles a full byte before exiting normally
:#; from the IN-BYTE subroutine.
:#
:#;; GET-BIT
0385 D5 push de :C GET_BIT
:; save the
0386:C
0386 1E94 ld e, $94 :C
:; timing value.
:;
0388:C
:#;; TRAILER
0388 061A ld b, $1A :C TRAILER
:; counter to twenty six.
:;
038A:C
:#;; COUNTER
038A 1D dec e :C COUNTER
:; decrement the measuring timer.
038B:C
038B DBFE in a, ($FE) :C
:; read the
038D:C
038D 17 rla :C
:;
038E:C
038E CB7B bit 7, e :C
:;
0390:C
0390 7B ld a, e :C
:;
0391:C
0391 38F5 jr c, $0388 :C
:; loop back with carry to TRAILER
:;
0393:C
0393 10F5 djnz $038A :C
:; to COUNTER
:;
0395:C
0395 D1 pop de :C
:;
0396:C
0396 2004 jr nz, $039C :C
:; to BIT-DONE
:;
0398:C
0398 FE56 cp $56 :C
:;
039A:C
039A 30B2 jr nc, $034E :C
:; to NEXT-BIT
:;
039C:C
:#;; BIT-DONE
039C 3F ccf :C BIT_DONE
:; complement carry flag
039D:C
039D CB11 rl c :C
:;
039F:C
039F 30AD jr nc, $034E :C
:; to NEXT-BIT
:;
03A1:C
( run in 0.654 second using v1.01-cache-2.11-cpan-39bf76dae61 )