1
0
mirror of https://frontier.innolan.net/github/AmigaExamples.git synced 2025-11-24 01:04:30 +00:00
Files
AmigaExamples/011.ehb_mode/utils.s
2016-03-06 21:08:40 +11:00

23 lines
367 B
ArmAsm

waitVerticalBlank:
movem.l d0-a6,-(sp)
.loop move.l $dff004,d0
and.l #$1ff00,d0
cmp.l #303<<8,d0
bne.b .loop
movem.l (sp)+,d0-a6
rts
waitRaster: ;wait for rasterline d0.w. Modifies d0-d2/a0.
movem.l d0-a6,-(sp)
move.l #$1ff00,d2
lsl.l #8,d0
and.l d2,d0
lea $dff004,a0
.wr: move.l (a0),d1
and.l d2,d1
cmp.l d1,d0
bne.s .wr
movem.l (sp)+,d0-a6
rts