0 Members and 2 Guests are viewing this topic.
TurnOnInterrupts: ld a, $80 out ($10), a ld a, 3 ;3 resets the timer each time. ld hl, plotsscreen ld de, 11 ;Add to hl each time ld b, 64 ld c, $11 ex af, af' exx ld c, $10 ld a, $20 ld (copycolumn), a_ in f, (c) jp m, -_ out ($10), a ld a, $80 out ($30), a ld a, 3 out ($31), a im 2 ei ld a, 100 out ($32), a retInterrupt Routine: exx ;4 ex af, af' ;4 out ($31), a ;11 dec c ;4_ in f, (c) jp m, -_ inc c outi add hl, de ;11 exx ;4 jr z, _ ;7 ex af, af' ;ei ret ;10_;Here, go to the next row of the screen exx push af ld a, (copycolumn) inc a ld (copycolumn), a cp $2c;If $2C, turn off interrupts and timers jr z, EndCopy dec h dec h dec h inc hl_ dec c in f, (c) jp m, -_ out ($10), a inc c ld b, 64 exx ld a, $80 out ($30), a ld a, 3 out ($31), a ;ld a, 80 ;out ($32), a pop af ex af, af' ;exx ;ei retEndCopy: exx xor a out ($30), a out ($31), a di pop af ex af, af' ret
1. The first interrupt occurs from hardware timers as opposed to crystal timers. I assume that it's normal and that there's nothing I can do about it?
2. The 84+ uses two of the three timers. Which of the three is free to use?
Interrupt Routine: exx ex af, af' out ($31), a dec c _ in f, (c) jp m, -_ inc c outi add hl, de exx jr z, _ ex af, af' ei ret _;Here, go to the next row of the screen exx push af ld a, (copycolumn) inc a ld (copycolumn), a cp $2c;If $2C, turn off interrupts and timers jr z, EndCopy dec h dec h dec h inc hl dec c_ in f, (c) jp m, -_ out ($10), a inc c ld b, 64 exx ld a, $80 out ($30), a ld a, 3 out ($31), a ld a, 155 out ($32), a pop af ex af, af' exx ei retEndCopy: exx xor a out ($30), a out ($31), a di pop af ex af, af' ret