PDA

View Full Version : vga_text.spin / vga_text_demo.spin



Richard S.
02-08-2007, 09:56 PM
Question:· why am I unable to compile a program using IDE if I have '$00' or color '$C,0' in a

text.str(string($00,$A,12,$B,14,$C,0,"print this",13,13)) command?

The IDE gives me an error that I cannot use $00 or use the color palette selection of 0.

Mike Green
02-08-2007, 11:17 PM
Because the zero value is used to indicate the end of a string, it is not allowed in the string() construction. You can define this string in a DAT section and pass its address to text.str or you can split the string into pieces and use .out for the zero bytes like:


text.out(0)
text.str(string($A,12,$B,14,$C))
text.out(0)
text.str(string("print this",13,13))

Richard S.
02-09-2007, 01:01 AM
Mike...

Ahha...the light goes on. Thanx!