This object is provided under license. By downloading this object, you are agreeing to the terms of the MIT License.
User Reviews:
George Collins commented:
This is my favorite output when I am testing a program. Doesn't take too much memory, but can display a lot of information. You can easily extend this object to handle more features, but if you find yourself adding too much it may make sense to use one of the more full featured TV objects.
January 31, 2009 8:07 a.m.
Comments on this Object:
[2010-11-10 23:44:41] Anonymous said:
TV_Text .str - ASCII values within the STRING() function
I’m having a hard time understanding the parameters in the STRING() function as used with the TV_Text object.str method.
In the example from TV_Text_Demo there is a line as follows where "text" is the name of the instantiation of the TV_Text object.
text.str(STRING(13," TV Text Demo...",13,13,$C,5," OBJ and VAR require only 2.8KB ",$C,1))
which produces a white on blue first message and then a blue on green message followed by a CR. Analyzing the argument for STRING() I get:
13 is the cr prior to the text
“ “ The text
13,13 two cr
$C ?
5 ?
“ “ second string of text
$C ?
1 ?
Some experimenting yields changes in color with changes in the $C and 5. I see the color palette listed in the DAT section of TV_text but I don’t see the correlation to $C or 5 in the list. I have tried to trace this back through the TV_Text.str and then to TV_Text.out and the TV_Text.print, but have not found an explanatory comment.
Q1: Why two number systems?
Why use hex for $C and dec for 5? I see $C can be replaced by 12 and it works. The 5 can be replaced with a $05 and the result is the same. Why not provide both values in the same number system?
Q2 ASCII format code versus color
Why does the TV_Text.str interpret $C (=12) as a color code? Why does it not interpret it as the ASCII format code 12 which is “paper feed”? That would be consistent with a code of 13 = ASCII format code for CR.
Q3 Palette values
I see the palette chart in the DAT of TV_Text but there is no entry for $C or 5 (although 5 is mentioned in the comments). Here is a section as an example
DAT
palette
' fore back ' color color
byte $07, $0A '0 white / dark blue
byte $3D, $3B '4 cyan / dark cyan
byte $6B, $6E '5 green / gray-green
byte $BB, $CE '6 red / pink
Q4: order of arguments
How does the TV_Text know which argument is for foreground color and which for background color?
Much Thanks.
Reply
TV_Text .str - ASCII values within the STRING() function I’m having a hard time understanding the parameters in the STRING() function as used with the TV_Text object.str method. In the example from TV_Text_Demo there is a line as follows where "text" is the name of the instantiation of the TV_Text object. text.str(STRING(13," TV Text Demo...",13,13,$C,5," OBJ and VAR require only 2.8KB ",$C,1)) which produces a white on blue first message and then a blue on green message followed by a CR. Analyzing the argument for STRING() I get: 13 is the cr prior to the text “ “ The text 13,13 two cr $C ? 5 ? “ “ second string of text $C ? 1 ? Some experimenting yields changes in color with changes in the $C and 5. I see the color palette listed in the DAT section of TV_text but I don’t see the correlation to $C or 5 in the list. I have tried to trace this back through the TV_Text.str and then to TV_Text.out and the TV_Text.print, but have not found an explanatory comment. Q1: Why two number systems? Why use hex for $C and dec for 5? I see $C can be replaced by 12 and it works. The 5 can be replaced with a $05 and the result is the same. Why not provide both values in the same number system? Q2 ASCII format code versus color Why does the TV_Text.str interpret $C (=12) as a color code? Why does it not interpret it as the ASCII format code 12 which is “paper feed”? That would be consistent with a code of 13 = ASCII format code for CR. Q3 Palette values I see the palette chart in the DAT of TV_Text but there is no entry for $C or 5 (although 5 is mentioned in the comments). Here is a section as an example DAT palette ' fore back ' color color byte $07, $0A '0 white / dark blue byte $3D, $3B '4 cyan / dark cyan byte $6B, $6E '5 green / gray-green byte $BB, $CE '6 red / pink Q4: order of arguments How does the TV_Text know which argument is for foreground color and which for background color? Much Thanks. Reply