Created
August 16, 2019 03:37
-
-
Save laubzega/fb59ee6a3d482feb509dae7b77e925cf to your computer and use it in GitHub Desktop.
optcompo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Build _without_ BASIC header | |
; | |
* = $2e0 | |
start: | |
lda #$92 | |
next_basic_line: | |
next_char: | |
ldx #$A0 | |
adr: stx $7c0 | |
adr2: stx $7c0+39 | |
inc adr + 1 | |
dec adr2 + 1 | |
dec 213 | |
stop: bmi stop | |
roller: | |
sec | |
tax | |
bmi skip | |
asl $d020-$49,x | |
jsr $e8ec | |
clc | |
skip: | |
rol | |
bne next_char | |
.word start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Build _without_ BASIC header | |
; | |
* = $801 | |
.word next_basic_line | |
lda #$92 | |
.byte $9e | |
next_basic_line: | |
.byte "2049" | |
next_char: | |
ldx #$A0 | |
adr: stx $7c0 | |
adr2: stx $7c0+39 | |
inc adr + 1 | |
dec adr2 + 1 | |
dec 213 | |
stop: bmi stop | |
roller: | |
sec | |
tax | |
bmi skip | |
asl $d020-$49,x | |
jsr $e8ec | |
clc | |
skip: | |
rol | |
bne next_char |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Build with standard basic header | |
; | |
sta $d020 | |
sta $d021 | |
next_char: | |
lda #$A0 | |
adr: sta $7c0 | |
adr2: sta $7c0+39 | |
inc adr + 1 | |
dec adr2 + 1 | |
dec 213 | |
stop: bmi stop | |
lda roller | |
rol | |
rol roller | |
bcc next_char | |
jsr $e8ea | |
beq next_char | |
roller: .byte %01101101 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Build with standard basic header | |
; | |
ptr = 251 | |
roller = 253 | |
yreg1 = 254 | |
yreg2 = 255 | |
xreg = 250 | |
sta $d020 | |
sta $d021 | |
sta yreg1 | |
lda #<$7c0 | |
sta ptr | |
lda #>$7c0 | |
sta ptr + 1 | |
ldx #40 | |
stx xreg | |
dex | |
stx yreg2 | |
lda #$6d | |
sta roller | |
next_char: | |
lda #$A0 | |
ldy yreg1 | |
sta (ptr),y | |
ldy yreg2 | |
sta (ptr),y | |
dec xreg | |
stop: beq stop | |
inc yreg1 | |
dec yreg2 | |
lda roller | |
rol | |
rol roller | |
bcc next_char | |
jsr $e8ea | |
beq next_char |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Build with standard basic header | |
; | |
ptr = 200 | |
roller = 202 | |
jsr $e544 | |
ldx #0 | |
ldy #0 | |
restart: | |
stx $d020 | |
stx $d021 | |
stx ptr | |
lda #>$400 | |
sta ptr + 1 | |
ldx #40 | |
lda #$6d | |
sta roller | |
next_char: | |
lda #$A0 | |
sta (ptr),y | |
dex | |
stop: bne go_on | |
lda #$88 ; DEY | |
sta opcode | |
ldy #39 | |
bne restart | |
go_on: | |
opcode: iny | |
lda roller | |
rol | |
rol roller | |
bcc next_char | |
lda ptr | |
adc #39 | |
sta ptr | |
bcc next_char | |
inc ptr + 1 | |
bne next_char |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment