EasyManua.ls Logo

Texas Instruments TI-92+ - Page 37

Texas Instruments TI-92+
507 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
EndIf
return {xd,yd,dr,dd}
EndFunc
©=================
© Begin mainline
©=================
StoGDB gdb © Save graph database settings
GetMode("ALL")→modedb © Save mode settings
setMode("3","1") © Set Angle mode to radians
ClrDraw © Clear all plots, functions and drawings
ClrGraph
PlotsOff
FnOff
SetGraph("3","1") © Turn grid off
SetGraph("4","1") © Turn axes off
DispG © Display graph screen
© Initialize calculator-specific parameters
if getconfg()[dim(getconfg())-14]=240 then © Determine calculator model by screen width
239→main\±x © For TI-92+: set maximum x-dimension
103→main\±y © set maximum y-dimension
111→ko © set [O] key code
109→km © set [M] key code
104→kh © set [H] key code
8273→khm © set [HOME] key code
.013772→main\±scl © set scale factor in inches/pixel
else
159→main\±x © For TI-89: set maximum x-dimension
77→main\±y © set maximum y-dimension
45→ko © set [O] key code
53→km © set [M] key code
56→kh © set [H] key code
277→khm © set [HOME] key code
.01381→main\±scl © set scale factor in inches/pixel
endif
© Initialize cursor positions
10→main\±ox © Set origin cursor 'x' 10 pixels from screen left
main\±y-10→main\±oy © Set origin cursor 'y' 10 pixels above screen bottom
intdiv(main\±x,2)→main\±tx © Set target cursor to center of screen
intdiv(main\±y,2)→main\±ty
1→mode © Set mode to move target cursor
draw_all() © Redraw cursors
help() © Display 'help'
© Main loop
Loop
GetKey()→key © Get pressed key code
If key=264 or key=khm or key=4360:Exit © Exit program
© Handle cursor movement keys
If key=340 Then © [RIGHT]
move_x(mode,1) © Move cursor 1 pixel right
draw_all() © Update screen
ElseIf key=337 Then © [LEFT]
move_x(mode,⁻1) © Move cursor 1 pixel left
draw_all() © Update screen
ElseIf key=338 Then © [UP]
1 - 26

Table of Contents