Erik Friesen
01-02-2009, 06:17 AM
here is the code
VAR
long flag,position,shiftdn,shiftrt,height,contrast,off
word characterposition
byte chartoprint,sizecolor,loopcommand,loopgo,test3',te st4
byte data[totalsize+1]
byte cols,col,rows,row,size,color,move
PUB Start |q'no backlight
waitcnt(5_000_000+cnt)'Wait for screen to stabilize
contrast:=%100000
long[@data]:=@SL 'send address pointers
long[@data+4]:=@Bl 'to assembly
long[@data+8]:=@characterposition
long[@data+12]:=@chartoprint
cognew(@entry,@data)
waitcnt(5_000_000+cnt)
out($d) 'initialize with small size )
out(1)
out(0)
loopcommand:=1
loopgo:=1
str(string($d,1,"Hello how are you today I am fine thanks and you and what will I do if this doesn't work now?"))
test3:=$FF
'test4:=$aa
loopcommand:=$FF
loopgo:=$aa
'repeat q from 0 to totalsize-1
'data[q]:=$AA
repeat
waitcnt(10000+cnt)
return @data
If I use test4 everything is great. If I comment it out, loopcommand,loopgo, and test3 are a mirror into data[0-3]. Or more correctly said, data[0] equals loopcommand, data[ 1] equals loopgo and data[ 2] equals test3 when set from within spin as shown above.
note- once again the automatic forum deleter strikes again with the brackets shown above( why can't this be fixed?)
Post Edited (Erik Friesen) : 1/2/2009 12:10:14 AM GMT
VAR
long flag,position,shiftdn,shiftrt,height,contrast,off
word characterposition
byte chartoprint,sizecolor,loopcommand,loopgo,test3',te st4
byte data[totalsize+1]
byte cols,col,rows,row,size,color,move
PUB Start |q'no backlight
waitcnt(5_000_000+cnt)'Wait for screen to stabilize
contrast:=%100000
long[@data]:=@SL 'send address pointers
long[@data+4]:=@Bl 'to assembly
long[@data+8]:=@characterposition
long[@data+12]:=@chartoprint
cognew(@entry,@data)
waitcnt(5_000_000+cnt)
out($d) 'initialize with small size )
out(1)
out(0)
loopcommand:=1
loopgo:=1
str(string($d,1,"Hello how are you today I am fine thanks and you and what will I do if this doesn't work now?"))
test3:=$FF
'test4:=$aa
loopcommand:=$FF
loopgo:=$aa
'repeat q from 0 to totalsize-1
'data[q]:=$AA
repeat
waitcnt(10000+cnt)
return @data
If I use test4 everything is great. If I comment it out, loopcommand,loopgo, and test3 are a mirror into data[0-3]. Or more correctly said, data[0] equals loopcommand, data[ 1] equals loopgo and data[ 2] equals test3 when set from within spin as shown above.
note- once again the automatic forum deleter strikes again with the brackets shown above( why can't this be fixed?)
Post Edited (Erik Friesen) : 1/2/2009 12:10:14 AM GMT