You will learn how to diplay text on the screen in this tutorial. The program goes as follows:
.NOLIST ;\\Save this code as an assembly file, compile it, and run it. You will notice that it displays 'hello world' on the third row of the display. Using hl to load coordinates is a trick that speeds up the program. You could also use the following code to produce the same result:
#include "ti83plus.inc" ; |
#include "mirage.inc" ; } Standard Header
.LIST ; |
.org 9D95h ;/
bcall(_clrLCDfull) ;calls routine to clear screen
ld hl,0300h ;puts 0 into h(rows) and 3 into l(cols)
ld (currow),hl ;load h into cursor row and l into cursor column
ld hl,str ;Loads text into hl register
bcall(_puts) ;put string to screen
ret ;Return to operating system
str: ;label of string
.db "hello world",0 ;value of string
ld a,3The reason that this works is that hl stores 16 bits of information or '0300h.' Currow is only 8 bits, so the 8 bit h register is written to currow and then the 8 bit l register is written to the next memory address, which just happens to be curcol! In the second example, a is used to load currow and curcol individually.
bcall(_[rom call]) Calls a routine from memory.Three other rom calls that you can use are listed below.
(currow) Variable for the row value on the home screen.
(curcol) Variable for the column value on the home screen.
_clrLCDfull Clears screen; turns off split screen
_puts Put text in hl at currow and curcol.
_clrLCD Clears screen; keeps split screen and text ShadowAs before, you can find these and other commands in the refernce section. Download the TI-83 Plus SDK Guide from the Utilities section to get a full reference."
_clrScrn Clears screen; keeps split screen but not text shadow
_clrScrnFull Clears screen; turns off split screen and text shadow