Prev: F8DC Up: Map Next: F92C
F8E2: set timing
Used by the routines at F92C and FA60.
F8E2 86 B1 STX $B1 save tape timing constant max byte
F8E4 A5 B0 LDA $B0 get tape timing constant min byte
F8E6 0A ASL A *2
F8E7 0A ASL A *4
F8E8 18 CLC clear carry for add
F8E9 65 B0 ADC $B0 add tape timing constant min byte *5
F8EB 18 CLC clear carry for add
F8EC 65 B1 ADC $B1 add tape timing constant max byte
F8EE 85 B1 STA $B1 save tape timing constant max byte
F8F0 A9 00 LDA #$00
F8F2 24 B0 BIT $B0 test tape timing constant min byte
F8F4 30 01 BMI $F8F7 branch if b7 set
F8F6 2A ROL A else shift carry into ??
F8F7 06 B1 ASL $B1 shift tape timing constant max byte
F8F9 2A ROL A
F8FA 06 B1 ASL $B1 shift tape timing constant max byte
F8FC 2A ROL A
F8FD AA TAX
F8FE AD 06 DC LDA $DC06 get VIA 1 timer B low byte
F901 C9 16 CMP #$16 compare with ??
F903 90 F9 BCC $F8FE loop if less
F905 65 B1 ADC $B1 add tape timing constant max byte
F907 8D 04 DC STA $DC04 save VIA 1 timer A low byte
F90A 8A TXA
F90B 6D 07 DC ADC $DC07 add VIA 1 timer B high byte
F90E 8D 05 DC STA $DC05 save VIA 1 timer A high byte
F911 AD A2 02 LDA $02A2 read VIA 1 CRB shadow copy
F914 8D 0E DC STA $DC0E save VIA 1 CRA
F917 8D A4 02 STA $02A4 save VIA 1 CRA shadow copy
F91A AD 0D DC LDA $DC0D read VIA 1 ICR
F91D 29 10 AND #%00010000 mask 000x 0000, FLAG interrupt
F91F F0 09 BEQ $F92A if no FLAG interrupt just exit
else first call the IRQ routine
F921 A9 F9 LDA #$F9 set the return address high byte
F923 48 PHA push the return address high byte
F924 A9 2A LDA #$2A set the return address low byte
F926 48 PHA push the return address low byte
F927 4C 43 FF JMP $FF43 save the status and do the IRQ routine
F92A 58 CLI enable interrupts
F92B 60 RTS
Prev: F8DC Up: Map Next: F92C