Mercurial > repos > simple16
view bgcolor.s16 @ 16:ae58e7c3c328
Poll events regularly to avoid unresponsive app warnings. Handle quit event
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 27 Mar 2016 21:42:10 -0700 |
parents | 769120da2c1f |
children | cc885122e9e3 |
line wrap: on
line source
;r0 = VDP address ;r1 = current color ;r2 = color increment ;r3 = target line ;r4 = screen bottom ;r5 = scratch ;r6 = right edge ;r7 = counter ldim 248, r4 ldimh 0, r4 ;320 == $140 ldim $40, r6 ldimh 1, r6 top ldim 0, r0 ldimh $FF, r0 ldim 0, r1 ldim 1, r2 ldim 8, r3 ldim 16, r7 linestart outi 14, r0 waitline ini $C, r5 cmp r5, r3 bne waitline waithblank ini $D, r5 cmp r5, r6 bgr waithblank outi 15, r1 add r2, r1, r1 addi 4, r3 addi -1, r7 bne normal ldim 16, r7 ;TODO: replace with lsli once it works in the assembler add r2, r2, r2 add r2, r2, r2 add r2, r2, r2 add r2, r2, r2 ldim 0, r1 normal cmp r3, r4 beq top bra linestart