grammer2.5.inc 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. ;===============================================================================
  2. ; Useful TI-OS Equates
  3. ;===============================================================================
  4. #define bcall(x) rst 28h \ .dw x
  5. #define rMov9ToOP1 20h
  6. #define rFindSym 10h
  7. _FindAlphaDn = 4A47h
  8. _FindAlphaUp = 4A44h
  9. _RclAns = 4AD7h
  10. _ChkFindSym = 42F1h
  11. _DispHL = 4507h
  12. _CreateTempStr = 4324h
  13. _SetParserHook = 5026h
  14. _CreateVar = 4E70h
  15. _CreateAppVar = 4E6Ah
  16. _CreatePict = 4333h
  17. _EnoughMem = 42FDh
  18. _InsertMem = 42F7h
  19. _Get_Tok_Strng = 4594h
  20. _DelMem = 4357h
  21. _JForceCmdNoChar= 4027h
  22. _JError = 44D7h
  23. _DelVarArc = 4FC6h
  24. _CreateStrng = 4327h
  25. _CreateReal = 430Fh
  26. _SetXXXXOP2 = 4792h
  27. _Arc_Unarc = 4FD8h
  28. _ConvKeyToTok = 4A02h
  29. _GetKeyRetOff = 500Bh
  30. _RunIndicOff = 4570h
  31. _DeleteTempPrograms = 5041h
  32. _MemChk = 42E5h
  33. _clrTxtShd = 454Ch
  34. _saveCmdShadow = 4573h
  35. _PutS = 450Ah
  36. _OP5ToOP1 = 413Bh
  37. _OP1ToOP5 = 4153h
  38. _VPutMap = 455Eh
  39. _Load_LFontV = 806Fh
  40. _SFont_Len = 4786h
  41. appErr1 = 984Dh
  42. appErr2 = 985Ah
  43. cxErrorEP = 8595h
  44. curRow = 844Bh
  45. curCol = 844Ch
  46. kbdScanCode = 843Fh
  47. basic_prog = 9652h
  48. progStart = 965Bh
  49. parsePtr = 965Dh
  50. progEnd = 965Fh
  51. parserHookPtr = 9BACh
  52. tokenHookPtr = 9BC8h
  53. OP1 = 8478h
  54. OP2 = 8483h
  55. OP3 = 848Eh
  56. OP4 = 8499h
  57. OP5 = 84A4h
  58. OP6 = 84AFh
  59. flags = 89F0h
  60. saveSScreen = 86ECh
  61. textShadow = 8508h
  62. plotSScreen = 9340h
  63. progPtr = 9830h
  64. FPS = 9824h
  65. OPS = 9828h
  66. smallEditRAM = 90D3h ;108 bytes
  67. iMathPtr1 = 84D3h ;10 bytes
  68. iMathPtr2 = 84D5h
  69. iMathPtr3 = 84D7h
  70. iMathPtr4 = 84D9h
  71. iMathPtr5 = 84DBh
  72. asm_data_ptr1 = 84EBh
  73. asm_data_ptr2 = 84EDh
  74. cmdShadow = 966Eh ;128 bytes
  75. pTemp = 982Eh ;bottom of named vars VAT
  76. appBackUpScreen = 9872h
  77. ramCode = 8100h
  78. tempSwapArea = 82A5h
  79. penCol = 86D7h
  80. penRow = 86D8h
  81. lFont_record = 845Ah
  82. ;==============================
  83. ;Flags
  84. ;==============================
  85. CursorFlags = 12
  86. CursorActive = 3
  87. onFlags = 9 ;on key flags
  88. onInterrupt = 4 ;1=on key interrupt request
  89. curFlags = 12 ;Cursor
  90. fmtEdit = 0 ;1=format number for editing
  91. curAble = 2 ;1=cursor flash is enabled
  92. curOn = 3 ;1=cursor is showing
  93. curLock = 4 ;1=cursor is locked off
  94. cmdVirgin = 5 ;1=nothing has been typed in cmd bfr
  95. ;----------------------------------------------------------------------
  96. indicFlags = 18 ;Indicator flags
  97. indicRun = 0 ;1=run indicator ON
  98. shiftFlags = 18 ;[2nd] and [ALPHA] flags
  99. shift2nd = 3 ;1=[2nd] has been pressed
  100. shiftAlpha = 4 ;1=[ALPHA] has been pressed
  101. shiftLwrAlph = 5 ;1=lower case, 0=upper case
  102. shiftALock = 6 ;1=alpha lock has been pressed
  103. shiftKeepAlph = 7 ;1=cannot cancel alpha shift
  104. sGrFlags = 14h
  105. textWrite = 7
  106. fontFlags = 32h
  107. fracDrawLFont = 2
  108. hookflags3 = 35h
  109. tokenHookActive = 0 ;1 = token hook active
  110. fontHookActive = 5 ;1 = font hook active
  111. hookflags4 = 36h ;also sysHookFlag2
  112. parserHookActive = 1 ;1 = parser hook active
  113. appLwrCaseFlag = 24h
  114. lwrCaseActive = 3
  115. ;This is used in gvardata
  116. tokenhook_optout = 0
  117. ;===============================================================================
  118. ;===============================================================================
  119. ; Grammer Equates
  120. ;===============================================================================
  121. #define MODULE_VERSION 3
  122. moduleExec = saveSScreen
  123. gbuf = plotSScreen
  124. pvars = smallEditRAM
  125. ThetaPrimeVar = pvars+106
  126. TempWord1 = OP6-1 ;2 2
  127. TempWord2 = TempWord1+2 ;2 4
  128. TempWord3 = TempWord2+2 ;2 6
  129. TempWord4 = TempWord3+2 ;2 8
  130. TempWord5 = TempWord4+2 ;2 10
  131. textRow = TempWord5+2 ;1 11
  132. textCol = textRow+1 ;1 12
  133. g_ram = 8020h
  134. FS_begin = iMathPtr4
  135. FS_end = FS_begin+2
  136. BufPtr = g_ram ;2
  137. GrayBufPtr = BufPtr+2 ;2
  138. gbuf_temp = GrayBufPtr+2 ;2
  139. FontPointer = gbuf_temp+2 ;2
  140. font_ptr_page=FontPointer+2;1
  141. g_internal = font_ptr_page+1
  142. Ans = appErr2 ;2
  143. ;==============================
  144. ; Grammer Flags
  145. ;==============================
  146. InternalFlag = 33
  147. SlowTextFlag = 0
  148. IntActiveFlag = 1
  149. FactorialFlag = 2
  150. errorChecking = 3
  151. grayFlag = 4 ;this determines the checker pattern for the next gray object drawn
  152. bit32 = 5 ;This determines if the output was 32-bit or not
  153. Mod2nd = 6
  154. nogrampkg = 7 ;This determines the checker pattern for grayscale mode
  155. UserFlags = 34
  156. InvertTextFlag = 0
  157. InvertLCDFlag = 1
  158. OnBlockFlag = 2
  159. baseInput = 3
  160. pxlBoundsRes = 4
  161. SignedText = 5
  162. ; = 6
  163. ; = 7
  164. ParticleFlag = 35
  165. Xis0 = 0
  166. Xis95 = 1
  167. Yis0 = 2
  168. Yis63 = 3
  169. OffScrn = 4
  170. InternalFlag2 = 35
  171. inputflag = 0
  172. ModeFlags2 = 35
  173. floatmode = 5
  174. textmode_default = 0
  175. textmode_varwidth = 1
  176. textmode_smallfixed=2
  177. textmode_Omnicalc = 3
  178. textmode_OS_small = 4
  179. textmode_OS_large = 5
  180. FS_uint8 = 0
  181. FS_str = 3
  182. FS_array = 4
  183. ;===============================================================================
  184. ; Grammer Jump Table
  185. ;===============================================================================
  186. #ifndef NO_JUMP_TABLE
  187. cmdJmp = $4023
  188. ProgramAccessStart = $4026
  189. CompatCall = $4029
  190. SelectedProg = $402C
  191. ExecOP1 = $402F
  192. ParseFullArg = $4032
  193. ParseNextFullArg = $4035
  194. ParseNextFullArg_Inc= $4038
  195. ParseCondition = $403B
  196. DrawRectToGraph = $403E
  197. GraphToLCD = $4041
  198. VPutSC = $4044
  199. GetKey = $4047
  200. GetGrammerText = $404A
  201. GetGrammerText_DE = $404D
  202. GetGrammerStr = $4050
  203. GetKeyDebounce = $4053
  204. SearchString = $4056
  205. FS_createvar_max = $4059
  206. FS_delvar = $405C
  207. FS_resize = $405F
  208. FS_findvar = $4062
  209. ErrMem = $4065
  210. #endif