Heres 1 problem (also the 'jp rnd's are just wasting space)That_One_Guy wrote:Okay, maybe not. here's the source, maybe one of you folk can fix it?Code: Select all
... atk3: .db "(throws user",0 .db "into wall)",0 jp rnd ;more stuff like this ...
[TI ASM] Displaying random text
Moderator: MaxCoderz Staff
-
- Extreme Poster
- Posts: 479
- Joined: Fri 17 Dec, 2004 11:09 pm
- Contact:
-
- New Member
- Posts: 65
- Joined: Sun 03 Apr, 2005 7:55 pm
- Location: The seventh circle of Hell.
- Contact:
Ahh, so its just unneccesary? Even without, the program still crashes
Truly great madness cannot be achieved without significant intelligence.
http://www.xanga.com/jakku_kun, rants by me.
http://www.xanga.com/jakku_kun, rants by me.
First of all, there should be no executable code among the strings. It's all a bunch of binary data. It's never going to see or even know of the existance of those jumps. It's not like TI Basic where you put the data in line with the code, like Disp "HELLO". No. In assembly, you give it the address of a text string.
Your code is never moving the text cursor, maybe you should do that.
0 is not a newline character, it is a null terminator that marks the end of a string. If you want to display multi line strings, you will need to write a special routine to handle those.
If you're getting crashes, then what .bat file are you using to compile?
Your code is never moving the text cursor, maybe you should do that.
0 is not a newline character, it is a null terminator that marks the end of a string. If you want to display multi line strings, you will need to write a special routine to handle those.
If you're getting crashes, then what .bat file are you using to compile?
Last edited by Dwedit on Tue 12 Apr, 2005 2:34 am, edited 1 time in total.
You know your hexadecimal output routine is broken when it displays the character 'G'.
-
- New Member
- Posts: 65
- Joined: Sun 03 Apr, 2005 7:55 pm
- Location: The seventh circle of Hell.
- Contact:
Oh...emm...then if I make them only one-line strings, it'll work? Or how do I put it on the graph screen? Y'know, so i can have more characters per line than the homescreen.
Truly great madness cannot be achieved without significant intelligence.
http://www.xanga.com/jakku_kun, rants by me.
http://www.xanga.com/jakku_kun, rants by me.
bcall(_vputs) is for displaying text in the small font. Use (penrow) for the Y coordinate, and (pencol) for the X coordinate. Since they are in memory next to each other, and pencol is the least significant byte, you can stick a 16 bit number into (pencol), such as $1008 to display at (8,16).
If you want it to display directly to the screen, you don't do anything special.
If you want it to draw the text onto the graph buffer, use set textwrite,(iy+sgrflags).
(edited 1 time in total...)
If you want it to display directly to the screen, you don't do anything special.
If you want it to draw the text onto the graph buffer, use set textwrite,(iy+sgrflags).
(edited 1 time in total...)
You know your hexadecimal output routine is broken when it displays the character 'G'.
-
- New Member
- Posts: 65
- Joined: Sun 03 Apr, 2005 7:55 pm
- Location: The seventh circle of Hell.
- Contact:
So then, to use the small font, use vputs? then could you do: ld (pencol),0 ld (penrow),0 to display it at the top of the screen?
Truly great madness cannot be achieved without significant intelligence.
http://www.xanga.com/jakku_kun, rants by me.
http://www.xanga.com/jakku_kun, rants by me.
Yes, _VPutS is small font, except that you need to use the accumulator to store into an address:
Code: Select all
ld a,0 ;Note: Unoptimized code
ld (penCol),a
ld a,0
ld (penRow),a
"If SOURCE is outlawed, only outlaws will have SOURCE."
-
- New Member
- Posts: 65
- Joined: Sun 03 Apr, 2005 7:55 pm
- Location: The seventh circle of Hell.
- Contact:
Aha, thanks for the help. I'm gonna try it out once i get all my stuff back (i recently reformatted me comp). I'll let you know if it doesnt work, or if i have any more questions. Thanks again
Truly great madness cannot be achieved without significant intelligence.
http://www.xanga.com/jakku_kun, rants by me.
http://www.xanga.com/jakku_kun, rants by me.