mirror of
https://github.com/mach-kernel/mrbuffer.git
synced 2025-01-02 14:29:29 +00:00
trying to display text via a loop, but will likely attempt using the toolbox stuff soon
This commit is contained in:
parent
9b5ffc265c
commit
f338736ecc
117
src/main.S
117
src/main.S
@ -9,55 +9,106 @@
|
|||||||
|
|
||||||
phk
|
phk
|
||||||
plb
|
plb
|
||||||
|
;;;;;
|
||||||
|
|
||||||
|
; we're going to need this
|
||||||
|
entrydp dw
|
||||||
|
|
||||||
|
phd
|
||||||
|
pla
|
||||||
|
sta entrydp
|
||||||
|
|
||||||
|
;;;;;;;;;
|
||||||
|
|
||||||
* sec
|
|
||||||
* clc
|
|
||||||
sep #$30 ; a, m, x half bank
|
sep #$30 ; a, m, x half bank
|
||||||
|
|
||||||
lda #$00
|
lda #$00
|
||||||
pha
|
pha
|
||||||
plb
|
plb
|
||||||
|
|
||||||
|
; slide direct page up
|
||||||
|
|
||||||
|
lda #$0000
|
||||||
|
pha
|
||||||
|
pld
|
||||||
|
|
||||||
|
|
||||||
|
; toggle the softswitches; they don't take any values. some are only triggered
|
||||||
|
; by writes, $C054 can be triggered by a read
|
||||||
|
|
||||||
|
sta $C000 ; disable 80 column store?
|
||||||
|
|
||||||
|
sta $C00C ; disable 80 column hardware?!
|
||||||
|
sta $C050 ; set standard apple ii gfx mode
|
||||||
|
sta $C051 ; select text mode only. "only"?
|
||||||
|
lda $C054 ; select text page 1 (there are 2)
|
||||||
|
lda $C056 ; select "low res" graphics
|
||||||
|
|
||||||
|
; ok, we are done toggling switches, let's go make a string
|
||||||
|
|
||||||
|
rep #$30
|
||||||
|
|
||||||
|
phk
|
||||||
|
plb
|
||||||
|
lda entrydp
|
||||||
|
pha
|
||||||
|
pld
|
||||||
|
|
||||||
|
; the first byte of the str is its length, we'll use that for cmp
|
||||||
|
ldx #1
|
||||||
|
|
||||||
|
atxt str "O SHIT"
|
||||||
|
loopy nop
|
||||||
|
clc
|
||||||
|
cpx #4 ; compare with length, bail if too long
|
||||||
|
bcs outbrk
|
||||||
|
ldy atxt,x
|
||||||
|
|
||||||
|
lda #$00
|
||||||
|
pha
|
||||||
|
plb
|
||||||
|
|
||||||
lda #$0000
|
lda #$0000
|
||||||
pha
|
pha
|
||||||
pld
|
pld
|
||||||
|
|
||||||
; direct acc for these?
|
sty $04,x
|
||||||
|
|
||||||
|
phk
|
||||||
|
plb
|
||||||
|
lda entrydp
|
||||||
|
pha
|
||||||
|
pld
|
||||||
|
|
||||||
*; toggle the softswitches; they don't take any values. some are only triggered
|
inx
|
||||||
*; by writes, $C054 can be triggered by a read
|
|
||||||
sta $C000 ; disable 80 column store?
|
|
||||||
|
|
||||||
sta $C00C ; disable 80 column hardware?!
|
jmp loopy
|
||||||
sta $C050 ; set standard apple ii gfx mode
|
|
||||||
sta $C051 ; select text mode only. "only"?
|
|
||||||
lda $C054 ; select text page 1 (there are 2)
|
|
||||||
lda $C056 ; select "low res" graphics
|
|
||||||
|
|
||||||
lda #"H"
|
outbrk lda #37
|
||||||
sta $0400
|
brk
|
||||||
lda #"e"
|
|
||||||
sta $0401
|
* lda #"H"
|
||||||
lda #"l"
|
* sta $0400
|
||||||
sta $0402
|
* lda #"e"
|
||||||
lda #"l"
|
* sta $0401
|
||||||
sta $0403
|
* lda #"l"
|
||||||
lda #"o"
|
* sta $0402
|
||||||
sta $0404
|
* lda #"l"
|
||||||
lda #" "
|
* sta $0403
|
||||||
sta $0405
|
* lda #"o"
|
||||||
lda #"W"
|
* sta $0404
|
||||||
sta $0406
|
* lda #" "
|
||||||
lda #"o"
|
* sta $0405
|
||||||
sta $0407
|
* lda #"W"
|
||||||
lda #"r"
|
* sta $0406
|
||||||
sta $0408
|
* lda #"o"
|
||||||
lda #"l"
|
* sta $0407
|
||||||
sta $0409
|
* lda #"r"
|
||||||
lda #"d"
|
* sta $0408
|
||||||
sta $040A
|
* lda #"l"
|
||||||
|
* sta $0409
|
||||||
|
* lda #"d"
|
||||||
|
* sta $040A
|
||||||
brk
|
brk
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user