[Coco] Assembly Language - Simple Q
William Mikrut
wmikrut72 at gmail.com
Wed Feb 8 22:20:20 EST 2017
So I am beginning to dabble in the ML world again... I miss it.
I do have a question with a simple program... take the following for
example:
org $1200
start ldy #$0400 Point to the start of VidRam
sty $88 Position the Cursor
ldx s001 Load the address of my data
wrt001 lda ,x+ Get a character from my data
cmpa #$0d Is it end of data?
beq e001 If yes, quit
jsr $a30a Put the character on the screen
bra wrt001 Go do it again
e001 rts
s001 fcc 'THIS IS SOME TEXT!'
fcb $0d
end start
Simple enough -- go print some text on the screen.
However, one thing bugs me in the compiler output:
That BE 1216 @ 1207.
Assuming I loaded the program to another section of memory..
Well, you see my dilemma.
I thought there was a way to signal the compiler to look at the fcc
data xxx bytes down --13 bytes specifically without using a specific memory
location.
What am I missing?
org $1200 1200 108E 0400 start ldy #$0400 1204 109F 88 sty $88 1207 *BE
1216* ldx s001 120A A6 80 wrt001 lda ,x+ 120C 81 0D cmpa #$0d 120E 27 05
beq e001 1210 BD A30A jsr $A30A 1213 20 F5 bra wrt001 1215 39 e001 rts 1216
54 48 49 53 s001 fcc 'THIS IS SOME TEXT!' 121A 20 49 53 20 121E 53 4F 4D 45
1222 20 54 45 58 1226 54 21 1228 0D fcb $0d {$1200} end start
More information about the Coco
mailing list