di
ld a,$99
ld i,a
ld hl,$9900
ld de, $9901
ld (hl),$9A
ld bc,256
ldir
ld ix,$9A9A
ld (ix+0),$C3
ld hl,Interrupt
ld (ix+1),l
ld (ix+2),h
im 2
ld a,%00001011
out (3),a
ld e,$FF
ei
Loop:
jr Loop
Interrupt:
di
xor a
out (3),a
ld a,$26
out ($10),a
call WasteTime
ld a,$9C
out ($10),a
call WasteTime
ld a,e
srl a
srl a
out ($11),a
dec e
ld a,%00001011
out (3),a
ei
ret
WasteTime:
ld l,10
WasteLoop:
nop
nop
nop
nop
dec l
jr nz,WasteLoop
ret
My code as it is currently, by request of Sorunome. Thanks Eems for the link.
Edit Sorunome: added code-tags