Looking up DAT Variables
tdeyle
Posts: 85
I am trying to display values from a variable stack in the DAT block by passing the address of the variables to another method, allowing me to display multiple screens without writing individual methods to display them.
Problem being, I keep getting random characters on the LCD screen with the following code:
Any suggestions?
I have correctly displayed the values with this repeat loop, but cannot seem to get the MAIN method to pass them on correctly to the DISPLAY method.
Problem being, I keep getting random characters on the LCD screen with the following code:
PUB Main Display2(@Bootscreen, BootScreen) PUB Display2(Address, Lines) | x, y debug.cls y:=0 repeat lines repeat x from y to y+20 debug.str(long[noparse][[/noparse]address][noparse][[/noparse]x+3]) y += 21 DAT BootScreen long 0, 4, 2, "SPAT- ", 0, "System Performance ", 0, "and Adjustment ", 0, "Terminal ", 0
Any suggestions?
I have correctly displayed the values with this repeat loop, but cannot seem to get the MAIN method to pass them on correctly to the DISPLAY method.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I am 1011, so be surprised!
Advertisement sponsored by dfletch:
Come and join us on the Propeller IRC channel for fast and easy help!
Channel: #propeller
Server: irc.freenode.net or freenode.net
If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
However, it does work if I use WORD and LONG.
EDIT: And no, strings are always bytes. Your code should not work, but using words or longs was just luck.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I am 1011, so be surprised!
Advertisement sponsored by dfletch:
Come and join us on the Propeller IRC channel for fast and easy help!
Channel: #propeller
Server: irc.freenode.net or freenode.net
If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
I had a look back in the manual, I see where I went wrong. I removed the zeros from in between the separate strings and it displayed correctly.
Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I am 1011, so be surprised!
Advertisement sponsored by dfletch:
Come and join us on the Propeller IRC channel for fast and easy help!
Channel: #propeller
Server: irc.freenode.net or freenode.net
If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com