System Flags of TI-OS

z80 » Advanced

The TI86 has many flags (options) available. They are stored as bits either set (yes, on) or reset (no, off) in a designated area of memory. They start at the following equate:

_flags	=$c3e5

Each "grouping" of like options are stored in a byte. We reference those groupings as "offsets" from the start of the flags (_flags). According to the chart below, the '_textflags' are at offset $05 from '_flags'.

Most all the names used on this page are equated in ti86asm.inc.

TI-OS likes to keep the iy register always holding the address of the start of the flags. That makes it easier if it wants to check any flag at any time. That is also why we try not to mess with iy in our program, so we don't change the offset TI-OS assumes.

Here's an example of changing the text display option to print white text on a black background. This is done by setting that option's bit. The next line changes it back to the default black text on a white background.

	set textinverse,(iy+textflags)	;white on black
	res textinverse,(iy+textflags)	;default black on white

Flag Offset Name Hex/Dec

Name Bit Description

trigflags $00/0

trigdeg 2 0 - Radians
1 - Degrees
doneprgm 5 1 - Program running so print "Done" when finished
0 - Program not running

plotflags/grfmodeflags $02/2

plotloc 1 0 - Graph writes to display and backup buffer
1 - Graph writes do display only
plotdisp 2 0 - Graph screen not currently displayed
1 - Graph screen being displayed now
grffuncm 4 1 - Function Graph mode
grfpolarm 5 1 - Polar Graph mode
grfparamm 6 1 - Parametric Graph mode
grfrecurm 7 1 - Differential Equation Graph mode

graphflags $03/3

graphdraw 0 0 - Don't need to redraw graph before displaying
1 - Need to redraw graph
graphcursor 2 0 - Graph cursor is not displayed
1 - Graph cursor currently displayed

grfdbflags $04/4

grfdot 0 0 - Graph Line mode
1 - Graph Dot mode
grfsimul 1 0 - Sequential Graph mode
1 - Simultaneous Graph mode
grfgrid 2 0 - Show grid
1 - Hide grid
grfpolar 3 0 - Rectangular coordinates
1 - Polar coordinates
grfnocoord 4 0 - Show coordinates
1 - Hide coordinates
grfnoaxis 5 0 - Show axis
1 - Hide axis
grflabel 6 0 - Show labels
1 - Hide labels

textflags $05/5

texterasebelow 1 1 - Erase line below variable width font
textscrolled 2 1 - Screen was scrolled up after last printing
textinverse 3 1 - Print white text on black background
0 - Print black text on white background

apdflags $08/8

apdable 2 1 - APD on
0 - APD off
apdlock 3 1 - APD locked
0 - APD unlocked
apdwarmstart 4 1 - APD has expired

onflags $09/9

onrunning 3 1 - TI86 is turned on currently
oninterrupt 4 1 - [ON] interrupt occured

fmtflags $0a/10

fmtexponent 0 1 - Exponential number format
fmteng 1 1 - Engineering number format
fmthex 2 1 - Hexadecimal mode
fmtoct 3 1 - Octadecimal mode
fmtbin 4 1 - Binary mode

curflags $0c/12

curable 2 1 - Blinking cursor on
curon 3 1 - Static cursor displayed
curlock 4 1 - Cannot change cursor state
6 0 - Has to do with _JForceCmdNoChar=$409c

appflags $0d/13

apptextsave 1 1 - Save characters on screen to _textShadow ($c0f9)
appautoscroll 2 1 - Automatically scroll text if printing on bottom line

indicflags $12/18

indicrun 0 1 - Animated Run Indicator
indiconly 2 1 - Interrupts do not work with APD or cursor. They just animate run indicator
shift2nd 3 1 - 2nd mode
shiftalpha 4 1 - Alpha mode
shiftlwralph 5 1 - Lowercase Alpha
0 - Uppercase Alpha
shiftalock 6 1 - Locked in Alpha mode

newgrfflags $18/24

textwrite 6 1 - Variable Width Font writes to Graph screen

statflags $1d/29

statsvalid 6 1 - Statistics results can be used

graphcursorflag $1e/30

dispcursor 2 1 - Show status of cursor (Alpha, alpha, 2nd, or regular) in upper right corner of screen. Useful for string input routines.

altflags/userflags $23/35

altfont 0 1 - Use User Font for cursor font
altvfont 1 1 - Use User Font for variable width font
altint 2 1 - Use User Interrupt Routine
alton 3 1 - Use User On Routine
altlink 4 1 - Use User Link Routine
altoff 7 1 - Use User Off Routine

sqrtflags $24/36

sqrtparse 0 1 - Use SqrtParse Routine
sqrtform 1 1 - Use SqrtExec Routine
sqrtexec 2 1 - Use SqrtExec Routine
sqrtexpr 3 1 - Use SqrtExpr Routine
sqrthome 4 1 - Use SqrtHome Routine
sqrtcmdtok 5 1 - Use SqrtCmdTok Routine
sqrtkey 6 1 - Use SqrtKey Routine
sqrtgrf 7 1 - Use SqrtGrf Routine


More from z80 » Advanced
All The Ports // APD // Assembler Directives // Entry Stack // User Fonts // IM 1 // IM 2 // Index, Shadow, and Other Registers // User Interrupt // Morphic Code // On-Off // Reading Keypresses from Port // Shift and Rotate // Simulating Key Presses // Sound // Square-Root Programs // System Flags of TI-OS