First post wooo!
I decided to learn some 6502 in my spare time, and opted to try the Vic20 for a couple of reasons.
1. I used to have one when I was 7 (40 *cough* years ago),
2. I'm curious what I can cram into an unexpanded box,
3. It's an elegant and basic machine so I want to be able to focus more on the asm than the feature set.
So this is one of my first programs, to show a custom 'A' on the screen. Works. But I can't access the usual characters by adding #128 or #168 (128+40) to the message byte values, which afaict, I should be able to.
I've been through the whole forum, reading up on character sets, and have looked through a couple of books but these are all in basic, so maybe I've missed some vital equivalent of a POKE statement to set things up properly?
Would really appreciate someone with more experience than I to cast an eye over and see what I've done (or not!). I use ACME assembler.
Bw
D
Code: Select all
; Char test
* = $1001
; BASIC program to boot the machine language code
!byte $0b, $10, $0a, $00, $9e, $34, $31, $30, $39, $00, $00, $00
jmp init
init
strptr = $fa ; string pointer zp
ldx #$ff ; set custom character range for $1c00
stx $9005 ; starts at '@', other chars +128 for usual letters
lda #<msg ; Get msg ptr
sta strptr
lda #>msg
sta strptr+1
ldy #0
jmp strt
loop
; clc ; nomatter what I put here doesn't show the ROM letters
; adc #128 ; I tried 128 & 168 (128+40)
jsr $ffd2 ; print char value in accumulator
iny
strt
lda (strptr),y
bne loop ; loops until byte 0 encountered
rts
msg !byte $01, $02, $03, $00
;new letter a, this works
* = $1c08
letA !byte $00, $00, $7c, $42, $7e, $42, $42, $0