我有这部分代码,所有文本行都同时出现在屏幕上。现在我希望每一行从另一侧出现在屏幕上(即左起第一行,右起第二行等)。任何人都可以帮忙吗?
Start SEI
LDX #$01
STX $0286
DEX
STX $D020
STX $D021
JSR $E544
mainLoop LDA #$FA
waitRaster CMP $D012
BNE waitRaster
waitRaster2 CMP $D012
BEQ waitRaster2
LDA #$0F
STA $D020
JSR UpdateThings
INC $D020
JMP mainLoop
UpdateThings ; is state 0 ?
LDA State
BNE nextState
; yes, call Move Text to Screen routine
JSR MoveTextIn
nextState RTS
我在这里尝试了一些改变..
MoveTextIn LDX 02
LDY Counter
loop ; LDA TextLines1+(1*40),x
; STA $0400+(1*40),X
LDA TextLines2+(1*40),y
STA $0400+(1*40),X
; LDA TextLines+(5*40),Y
; STA $0400+(5*40),X
INX
INY
CPY #$28
BNE loop
and there....
; LDX #$27
TXA
SEC
SBC Counter
TAY
又在这里...
loop2 ;LDA TextLines1+(0*40),x
;STA $0400+(0*40),X
LDA TextLines2+(0*40),y
STA $0400+(0*40),X
;LDA TextLines+(4*40),Y
;STA $0400+(4*40),X
DEX
DEY
BPL loop2
LDA Counter
BEQ TextMoveDone
DEC Counter
RTS
TextMoveDone INC State
RTS
State !byte 0
Counter !byte $10
TextLines1 !scr "!x-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-xx!"
TextLines2 !scr "!x commodore master soft x!"
!scr "! ------------------- !"
!scr "! somewhere in 2019. !"
!scr "! ---------------- !"
!scr "! -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- !"