Created
October 15, 2022 19:07
-
-
Save bplaat/5855f9888b470b9d70ebf6f2903ddfc9 to your computer and use it in GitHub Desktop.
Commander X16 - Vera display text program
This file contains hidden or 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
| ; Commander X16 - Vera display text program | |
| ; acme -f cbm --cpu 65c02 -o vera.prg vera.asm && x16emu -prg vera.prg -run | |
| CHROUT=$FFD2 | |
| VERA_ADDR_L=$9F20 | |
| VERA_ADDR_M=$9F21 | |
| VERA_ADDR_H=$9F22 | |
| VERA_DATA0=$9F23 | |
| *=$0801 | |
| !byte $0B, $08, $01, $00, $9E, $32, $30, $36, $31, $00, $00, $00 | |
| start: | |
| ; Clear screen | |
| lda #$93 | |
| jsr CHROUT | |
| ; Print centered colored string | |
| lda #%00010001 ; Increment 1 byte | |
| sta VERA_ADDR_H | |
| lda #$b0 | |
| sta VERA_ADDR_M | |
| lda #68 | |
| sta VERA_ADDR_L | |
| ldy #0 | |
| .repeat: | |
| lda message, y | |
| beq .done | |
| sta VERA_DATA0 | |
| lda #$2f ; Color | |
| sta VERA_DATA0 | |
| iny | |
| bra .repeat | |
| .done: | |
| rts | |
| ; https://cx16.dk/veratext/ | |
| ; H E L L O , W O R L D ! | |
| message !byte $08,$05,$0C,$0C,$0F,$2C,$20,$17,$0F,$12,$0C,$04,$21,$00 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment