In this lesson, we will learn you a little bit more about displaying inverted text, displaying to the screen or to the GRAPH_MEM,...
There is also an explanation on the difference between ROM_CALL and call.
System Flags |
Below is a list of most of the commands that will have an effect on how text is written to the screen.
System flags that affect text.
||Make it so text will be displayed white on black
||Make it so text will be displayed black on white
||Affect text memory. This means that when you write text to the screen, the TEXT_MEM will also be updated. This could destroy your variables, so be carefull using this.
||Don't affect text memory. This way your variables won't get messed up. Ash 3.0 and CrASH 1.6 do this for you.
||Make the window scroll if you write on the last line
||Make it so the window does not scroll if you write on the last line
||Write menu text to the GRAPH_MEM only and not to the LCD
||Write menu text to the LCD only and not to GRAPH_MEM
||Erase the pixel line below menu font
||Do not erase the pixel line below menu font
Some notes about the normal font and the menu font:
- After writing a string, HL points to the byte after the zero byte when using D_ZT_STR or D_ZM_STR and to the byte immediately after the string when using D_LT_STR and D_LM_STR.
- When you write text in normal font and it doesn't fit on the line, the text will continue on the next line.
With menu font, this is not the case. The string will be displayed until it is not longer possible and then the routine returns with the address where the string was cut in half in HL.
In the previous lessons, I often used ROM_CALL in examples. I also used call sometimes.
You might now easily think that a ROM_CALL is a call to the rom and a call is a call to the RAM.
Well, that is wrong. Take for example call GET_KEY: this is also a call to the ROM.
The reason why ROM_CALLs are used is the following: not all the TI-82's have exactly the same ROM.
Some have ROM version 16, others 17,18,19 or others. The latest ROM version is 19.0.
With these different ROMs, some routines have been moved. To make these routines available with one simple call, the ROM_CALL() macro is included in the Ash and CrASH shells.
First, a call is made to a routine inside the Ash program. There, the actual address of the routine is calculated (how that calculation is done will be explained in a later lesson) and the routine is called.
Other functions are on the same place in all known ROM versions, e.g. call CP_HL_DE
Previous lesson |