figured out that merlin has long modes which means i dont have to do crazy things to toggle softswitches anymore

This commit is contained in:
David Stancu 2018-01-27 22:41:56 -05:00
parent f338736ecc
commit daf4eb3dc0

View File

@ -9,83 +9,47 @@
phk
plb
;;;;;
; we're going to need this
entrydp dw
phd
pla
sta entrydp
;;;;;;;;;
sep #$30 ; a, m, x half bank
lda #$00
pha
plb
; slide direct page up
lda #$0000
pha
pld
; 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?
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
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
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
pha
pld
sty $04,x
phk
plb
lda entrydp
pha
pld
hithere strl "hello world"
ldx #2
:loopy nop
lda hithere,x
stal $000400
cpx hithere
inx
bcs outbrk
jmp :loopy
jmp loopy
outbrk brk
outbrk lda #37
brk
; y u no work
* ldx hithere+2
* ldy #$0400
* lda hithere
* mvp #$02, #$00
* brk
* lda #"H"
* sta $0400
@ -310,6 +274,122 @@ QP adrl $0000