Im using a 6502 emulator to work on a project for university. We use a set area of memory which correlates to displaying an 'output' on a simulated display.
Currently I have an array of alphabetic characters which I wish to display onto this 'screen'. This is not the problem - i have done this and it works.
Ive done this by using a
LDA array,X in a loop and it produces the out put i desire.
My question is that I now have an array that exceeds 255 characters and as the offset just revolves back to 0 it wont display what i want on the screen.
Without being able to modify the array or use additional variables (like having 2 variable names nested within the array), is there a way I can display more than this?
Or should i be looking at an alternative way of displaying this data..
What the data is isnt important - im just interested in how I can show the entire block without it reverting back to the start.
Any suggestions?
(Pls note the code below is a shell i what i used to achieve the basic functionality of the display to the 'screen', there are more lines to it - but omitted)
Im thinking I have to use 16 bit some how but I dont know where to begin in attempting that.
Code:
LDX #$ff
LDY #11 ;lines in the array
.show
INX ;i want x=0 for the first element
LDA array, x ;A becomes the item i want to display
BEQ .doneline ;if A=0 then next line
STA io_putc ;io_putc is the output screen
JMP .show
.doneline
DEY
;display cr/lf here
BNE .show
BRK
array: .db "123456789012345678901234567890",0
.db "123456789012345678901234567890",0
.db "123456789...........................
;assume there are about 400 elements here and it doesnt
;repeat in any fixed pattern