Tutorial #2
2-17-99Displaying Text on the graph screen!
This tutorial will show you how to do something useful!! Display text on the graph screen!!! Now in Basic you just did this: Text(20,20,"Text Here" Well in ASM is much more complex... But a lot of the code is necessary in every ASM program... So here we go! I'll go over what the new commands mean after the code. .NOLIST #DEFINE equ .equ #DEFINE EQU .equ #DEFINE end .end #INCLUDE "ti83asm.inc" #INCLUDE "tokens.inc" .org 9327h call _clrLCDFull ;Clears the screen ld hl,1025h ;Sets coords to 10, 25 then stores them into hl ld (PENCOL),hl ;Loads what was stored into hl into the Graph Screen Text called PENCOL ld hl,text ;Loads the text you want to display call _vputs ;Puts everything on Screen ret ;Returns to what it was doing text: ;Variable (Like in Basic you can have 0-9 and A-Z as variables, in asm you have unlimited) .db "It worked!!! ",0 ;The text (The four spaces erase the "Done" text) .end ;Ends the program END ;needed for some programs to workWell, you probably don't know what any of this ment but here is my explanation. First the "ld hl,1025h" part sets the coordinates to 9,24, even though it says 1025 it subtracts one from each, I don't know why. The "ld (PENCOL),hl" part loads the coordinates into the graph screen. That is what PENCOL means, PENCOL is for Graph Screen Text... You'll need to know that later. You know in basic that "2->X" means you want to store 2 into X, well in ASM when you see something like "ld hl,text" it means you want to store text into hl. Kind of like "Text->hl" only you can't do that in basic. You will learn more about this later. Now _vputs means that you want to display the text that you have loaded. In ASM you can have unlimited amount of characters in Variables, you see Variables in ASM are not tabed in, why? I don't know. You can just read the comments to understand the rest, if you have any more questions e-mail me. (Also I don't know what .db stands for)
(KSA)Tekken (uncool3@juno.com)