mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-24 05:38:05 +11:00
sms/vdp: properly protect AF on PutC
This commit is contained in:
parent
f41508725d
commit
162e503291
@ -133,6 +133,8 @@ vdpPutC:
|
|||||||
cp ASCII_BS
|
cp ASCII_BS
|
||||||
jr z, vdpBS
|
jr z, vdpBS
|
||||||
|
|
||||||
|
push af
|
||||||
|
|
||||||
; ... but first, let's convert it.
|
; ... but first, let's convert it.
|
||||||
call vdpConv
|
call vdpConv
|
||||||
|
|
||||||
@ -140,20 +142,21 @@ vdpPutC:
|
|||||||
call vdpSpitC
|
call vdpSpitC
|
||||||
|
|
||||||
; Move cursor. The screen is 32x24
|
; Move cursor. The screen is 32x24
|
||||||
ex af, af'
|
|
||||||
ld a, (VDP_ROW)
|
ld a, (VDP_ROW)
|
||||||
cp 31
|
cp 31
|
||||||
jr z, .incline
|
jr z, .incline
|
||||||
; We just need to increase row
|
; We just need to increase row
|
||||||
inc a
|
inc a
|
||||||
ld (VDP_ROW), a
|
ld (VDP_ROW), a
|
||||||
ex af, af' ; bring back orig A
|
|
||||||
|
pop af
|
||||||
ret
|
ret
|
||||||
.incline:
|
.incline:
|
||||||
; increase line and start anew
|
; increase line and start anew
|
||||||
ex af, af' ; bring back orig A
|
|
||||||
call vdpCR
|
call vdpCR
|
||||||
jr vdpLF
|
call vdpLF
|
||||||
|
pop af
|
||||||
|
ret
|
||||||
|
|
||||||
vdpCR:
|
vdpCR:
|
||||||
call vdpClrPos
|
call vdpClrPos
|
||||||
|
Loading…
Reference in New Issue
Block a user