From 3d01ea6af666199212833196c3ed775949e3fc2a Mon Sep 17 00:00:00 2001 From: David Stancu Date: Sun, 28 Jan 2018 17:29:30 -0500 Subject: [PATCH] more reference material and working text blit --- README.md | 3 ++- src/main.S | 55 ++++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 43 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 98e65ad..8708283 100644 --- a/README.md +++ b/README.md @@ -46,4 +46,5 @@ There are a lot of good materials out there: here is what I used to make this ga - [SNES CPU overview, same CPU, nice insights](https://github.com/michielvoo/SNES/wiki/CPU) - [SNES opcode list](http://wiki.metroidconstruction.com/doku.php?id=super:technical_information:asm_mnemonics) - [65816 primer](http://softpixel.com/~cwright/sianse/docs/65816NFO.HTM) -- [Another 6502 reference, insightful](https://github.com/wiz-lang/wiz/wiki/Registers-and-Memory-(6502)) \ No newline at end of file +- [Another 6502 reference, insightful](https://github.com/wiz-lang/wiz/wiki/Registers-and-Memory-(6502)) +- [65816 interrupts guide](http://6502.org/tutorials/65c816interrupts.html) \ No newline at end of file diff --git a/src/main.S b/src/main.S index c3a82d3..0f9b40c 100644 --- a/src/main.S +++ b/src/main.S @@ -23,28 +23,25 @@ stal $00C051 ; select text mode only. "only"? ldal $00C054 ; select text page 1 (there are 2) ldal $00C056 ; select "low res" graphics + rep #$30 ; go back to 16-bit mode -; ok, we are done toggling switches, let's go make a string - rep #$20 + ldx #hithere+2 ; strl, first two bytes are strlen, # denotes immediate addr val + ldy #$0400 ; start of text buffer on 00 + ldal hithere + dec - ldx #2 -:loopy nop - lda hithere,x - stal $000400,x - cpx hithere - inx - bcs outbrk - jmp :loopy - -outbrk brk + mvn $02, $00 + brk ; Important locations SPEAKER equ $E0C030 PRODOS16 equ $E100A8 jsl PRODOS16 - ; This exit code is "device busy", why is it the only one - ; that works?! + +; This exit code is "device busy", why is it the only one +; that works?! + da $29 adrl QP bcs ERROR @@ -377,6 +374,36 @@ hithere strl "this was excruciating" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +