So here's what I've done for now (before I saw BigDumbDinosaur's post).
I defined a string at the end of my file:
Code:
*=$A000
row_text !text "row: ",$FF," col: ",$EE, $00
The plan being that I would use $FF and $EE as markers for substituting values later on....
Then I wrote a macro:
Code:
!macro show_row .x,.y {
ldx #$00
ROW_START
lda row_text,x
beq ROW_END
cmp #$FF
beq ROW_X
cmp #$EE
beq ROW_Y
sta TEXT_START,x
inx
jmp ROW_START
ROW_X
lda .x
jmp ROW_GO
ROW_Y
lda .y
ROW_GO
adc #$2F
sta TEXT_START,x
inx
jmp ROW_START
ROW_END
lda #$00
sta TEXT_START,x
jsr OUT_TEXT
}
You can see how I'm looking for the $FF and $EE in there.
Then I called the macro:
Code:
; accumulator holds the row
; .col is address that holds the column
; .row is address that will hold the row
sta .row
+show_row .row,.col
Then I called my lcd display code and I had a proper string! It worked great.
I have two things I don't quite get, though. First, you can see in my macro I'm adding #$2F to the values in the .row and .col memory addresses. If .row holds #$01, and I add #$2F to it, I should get #$30, which would be ASCII for "0", but "1" displays. I'm not sure why. Second, just before I call the macro, I have one of the values in the accumulator. I store it in a memory location and then call the macro with that memory location. So I'm actually calling the macro with two memory locations. Not that I need to, but I'm curious if there is any way I can call the macro in one line that passes the value in the accumulator and the value in the memory location. I don't think there is, but I wonder about it.
I really can't thank all of you enough. You've been so helpful. I really do appreciate it.