From f338736ecc1a62ff2e2e71c9429ff4bccc807a7d Mon Sep 17 00:00:00 2001 From: David Stancu Date: Fri, 26 Jan 2018 21:25:23 -0500 Subject: [PATCH] trying to display text via a loop, but will likely attempt using the toolbox stuff soon --- src/main.S | 119 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 85 insertions(+), 34 deletions(-) diff --git a/src/main.S b/src/main.S index f526a15..8a44fbb 100644 --- a/src/main.S +++ b/src/main.S @@ -2,62 +2,113 @@ typ $B3 dsk main.l - ; ensure 16-bit mode (unnecessary?) + ; ensure 16-bit mode (unnecessary?) clc xce rep #$30 phk plb +;;;;; +; we're going to need this +entrydp dw + + phd + pla + sta entrydp + +;;;;;;;;; -* sec -* clc sep #$30 ; a, m, x half bank lda #$00 pha 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 pha 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 -*; by writes, $C054 can be triggered by a read - sta $C000 ; disable 80 column store? + inx - 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 + jmp loopy - 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 +outbrk lda #37 + 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