important about @..
R Baggett
Posts: 157
I seem to be missing something important about @..
DAT
butxt byte "This here text",$00
strprn(@@butxt,1,1) 'This prints something..
strprn(@butxt,1,3) 'This prints something different
strprn(butxt,1,5) 'This obviously shouldn't work
strprnd(0,1,7) 'Only the function with butxt hard coded works..
PUB strprn (stringptr,x,y) | idx
idx :=0
repeat while (stringptr[noparse][[/noparse]idx])
byte[noparse][[/noparse]@screen+cols*y+x+idx] := (stringptr[noparse][[/noparse]idx++])
PUB strprnd(stringptr,x,y) | idx 'hard coded version of srtprn for tshootng
idx :=0
repeat while (butxt[noparse][[/noparse]idx])
byte[noparse][[/noparse]@screen+cols*y+x+idx] := (butxt[noparse][[/noparse]idx++])
So, Why exactly does this work...
'start vga text driver
vgatext.start(16, @screen, @colors, @cx0, @sync)
I am attaching the whole project, It's based on the vga text demo.
The point is to develop a few useful GUI methods
Post Edited By Moderator (Joshua Donelson (Parallax)) : 10/23/2009 4:41:36 AM GMT
DAT
butxt byte "This here text",$00
strprn(@@butxt,1,1) 'This prints something..
strprn(@butxt,1,3) 'This prints something different
strprn(butxt,1,5) 'This obviously shouldn't work
strprnd(0,1,7) 'Only the function with butxt hard coded works..
PUB strprn (stringptr,x,y) | idx
idx :=0
repeat while (stringptr[noparse][[/noparse]idx])
byte[noparse][[/noparse]@screen+cols*y+x+idx] := (stringptr[noparse][[/noparse]idx++])
PUB strprnd(stringptr,x,y) | idx 'hard coded version of srtprn for tshootng
idx :=0
repeat while (butxt[noparse][[/noparse]idx])
byte[noparse][[/noparse]@screen+cols*y+x+idx] := (butxt[noparse][[/noparse]idx++])
So, Why exactly does this work...
'start vga text driver
vgatext.start(16, @screen, @colors, @cx0, @sync)
I am attaching the whole project, It's based on the vga text demo.
The point is to develop a few useful GUI methods
Post Edited By Moderator (Joshua Donelson (Parallax)) : 10/23/2009 4:41:36 AM GMT
zip
14K