Reformatting code.

This commit is contained in:
Bobbi Webber-Manners 2022-12-26 22:29:29 -05:00
parent d2f2475212
commit 1a2d98bec4
2 changed files with 62 additions and 67 deletions

Binary file not shown.

View File

@ -341,73 +341,68 @@ SHRNEXTROW LDA VDUADDR+0 ; Add 160 to VDUADDR
* Copy text line A+1 to line A * Copy text line A+1 to line A
* Note: Code for this courtesy Kent Dickey * Note: Code for this courtesy Kent Dickey
* TODO: This is only for 640 mode at present * TODO: This is only for 640 mode at present
SHRSCR1LINE SHRSCR1LINE PHY
; acc=line to scroll (0-24) PHX
; nead to calc acc * $500. Could use a table, but this is about as fast STA VDUADDR+1
phy STZ VDUADDR
phx PHP
sta VDUADDR+1 SEI
stz VDUADDR CLC
php XCE
sei PHB
clc REP #$31 ; M,X 16 bit, carry clear
xce
phb
rep #$31 ; M,X 16 bit, carry clear
MX %00 ; Tell Merlin MX %00 ; Tell Merlin
lda VDUADDR LDA VDUADDR
asl ASL
asl ASL
adc VDUADDR ADC VDUADDR
sta VDUADDR ;; VDUADDR = line * $500 STA VDUADDR ; VDUADDR = line * $500
lda TXTWINLFT LDA TXTWINLFT
asl ASL
and #$00ff AND #$00ff
adc VDUADDR ADC VDUADDR
sta VDUADDR ; VDUADDR = Minimum position STA VDUADDR ; VDUADDR = Minimum position
sep #$21 ; M 8 bit, X 16 bit, carry set SEP #$21 ; M 8 bit, X 16 bit, carry set
MX %10 ; Tell Merlin MX %10 ; Tell Merlin
lda TXTWINRGT LDA TXTWINRGT
sbc TXTWINLFT SBC TXTWINLFT
rep #$31 ; M,X 16 bit, carry clear REP #$31 ; M,X 16 bit, carry clear
MX %00 ; Tell Merlin MX %00 ; Tell Merlin
asl ASL
and #$00ff AND #$00ff
adc VDUADDR ADC VDUADDR
tax TAX
pea #$e1e1 PEA #$e1e1
plb PLB
plb PLB
:loop1 :LOOP1 LDA $2500,x ; 2 bytes, row 0
lda $2500,x ;; 2 bytes, row 0 STA $2000,x
sta $2000,x LDA $25a0,x ; row 1
lda $25a0,x ; row 1 STA $20a0,x
sta $20a0,x LDA $2640,x ; row 2
lda $2640,x ; row 2 STA $2140,x
sta $2140,x LDA $26e0,x ; row 3
lda $26e0,x ; row 3 STA $21e0,x
sta $21e0,x LDA $2780,x ; row 4
lda $2780,x ; row 4 STA $2280,x
sta $2280,x LDA $2820,x ; row 5
lda $2820,x ; row 5 STA $2320,x
sta $2320,x LDA $28c0,x ; row 6
lda $28c0,x ; row 6 STA $23c0,x
sta $23c0,x LDA $2960,x ; row 7
lda $2960,x ; row 7 STa $2460,x
sta $2460,x DEX
dex DEX
dex BMI :DONE
bmi :done CPX VDUADDR
cpx VDUADDR BCS :LOOP1
bcs :loop1 :DONE PLB
:done SEC
plb XCE
sec PLP
xce PLX
plp PLY
plx RTS
ply
rts
* Reverse scroll one line * Reverse scroll one line