mirror of
https://github.com/mach-kernel/mrbuffer.git
synced 2024-06-16 05:29:34 +00:00
413 lines
2.5 KiB
ArmAsm
413 lines
2.5 KiB
ArmAsm
rel
|
|
typ $B3
|
|
dsk main.l
|
|
|
|
; ensure 16-bit mode (unnecessary?)
|
|
clc
|
|
xce
|
|
rep #$30
|
|
|
|
phk
|
|
plb
|
|
|
|
; half bank for accumulator, you don't want to toggle them on then back off, right?
|
|
|
|
sep #$30
|
|
|
|
; toggle the softswitches; they don't take any values. some are only triggered
|
|
; by writes, $C054 can be triggered by a read
|
|
stal $00C000 ; disable 80 column store?
|
|
|
|
stal $00C00C ; disable 80 column hardware?!
|
|
stal $00C050 ; set standard apple ii gfx mode
|
|
stal $00C051 ; select text mode only. "only"?
|
|
ldal $00C054 ; select text page 1 (there are 2)
|
|
ldal $00C056 ; select "low res" graphics
|
|
|
|
; ok, we are done toggling switches, let's go make a string
|
|
rep #$30
|
|
|
|
phk
|
|
pld
|
|
|
|
hithere strl "hello world"
|
|
ldx #2
|
|
:loopy nop
|
|
lda hithere,x
|
|
stal $000400
|
|
cpx hithere
|
|
inx
|
|
bcs outbrk
|
|
jmp :loopy
|
|
|
|
outbrk brk
|
|
|
|
; y u no work
|
|
* ldx hithere+2
|
|
* ldy #$0400
|
|
* lda hithere
|
|
|
|
* mvp #$02, #$00
|
|
|
|
* brk
|
|
|
|
* lda #"H"
|
|
* sta $0400
|
|
* lda #"e"
|
|
* sta $0401
|
|
* lda #"l"
|
|
* sta $0402
|
|
* lda #"l"
|
|
* sta $0403
|
|
* lda #"o"
|
|
* sta $0404
|
|
* lda #" "
|
|
* sta $0405
|
|
* lda #"W"
|
|
* sta $0406
|
|
* lda #"o"
|
|
* sta $0407
|
|
* lda #"r"
|
|
* sta $0408
|
|
* lda #"l"
|
|
* sta $0409
|
|
* lda #"d"
|
|
* sta $040A
|
|
brk
|
|
|
|
|
|
|
|
; Important locations
|
|
SPEAKER equ $E0C030
|
|
PRODOS16 equ $E100A8
|
|
|
|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