From daf4eb3dc04e8eab339e3d7d706b7c8d85f72204 Mon Sep 17 00:00:00 2001 From: David Stancu Date: Sat, 27 Jan 2018 22:41:56 -0500 Subject: [PATCH] figured out that merlin has long modes which means i dont have to do crazy things to toggle softswitches anymore --- src/main.S | 202 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 141 insertions(+), 61 deletions(-) diff --git a/src/main.S b/src/main.S index 8a44fbb..1a47e79 100644 --- a/src/main.S +++ b/src/main.S @@ -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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +