mirror of
https://codeberg.org/sethm/symon.git
synced 2026-11-07 19:12:23 +00:00
Checkpoint of my Swing UI refactoring. Usable for output-only programs, but only barely.
This commit is contained in:
1 parent
5ce81ef82c
commit
ed36690e9e
13 files changed
+776
-659
No files matched your search
+19
-7
@@ -3,18 +3,30 @@
|
||||
;;
|
||||
|
||||
|
||||
.alias cr $0d
|
||||
.alias lf $0a
|
||||
|
||||
.alias out $c000
|
||||
.alias iobase $c000
|
||||
.alias iostatus [iobase + 1]
|
||||
.alias iocmd [iobase + 2]
|
||||
.alias ioctrl [iobase + 3]
|
||||
|
||||
.org $0300
|
||||
|
||||
start: ldx #$00
|
||||
start: cli
|
||||
lda #$09
|
||||
sta iocmd ; Set command status
|
||||
lda #$16
|
||||
sta ioctrl ; 0 stop bits, 8 bit word, 300 baud
|
||||
ldx #$00 ; Initialize index
|
||||
|
||||
loop: lda string,x
|
||||
beq start ; If A is 0, loop back and start again
|
||||
sta out ; Otherwise, store into output
|
||||
inx ; Increment X
|
||||
|
||||
write: lda iostatus
|
||||
and #$10 ; Load ACIA status. Is output buffer empty?
|
||||
beq write ; If not, loop back and try again,
|
||||
lda string,x
|
||||
sta iobase ; Otherwise, write to output.
|
||||
|
||||
inx
|
||||
jmp loop ; Repeat.
|
||||
|
||||
string: .byte "Hello, 6502 world! ", 0
|
||||
Reference in new issue
Block a user