File: ion.inc - Tab length: 1 2 4 8 - Lines: on off - No wrap: on off

001: ; The Ion Include File by Dan Englender
002: 
003: ;----> Safe Memory Areas
004: ; saferam1 = 768 bytes (apdram)
005: ; saferam2 = 531 bytes (statram)
006: ; saferam3 = 128 bytes (textmem)
007: ; saferam4 = 66 bytes (ops)
008: ; saferam5 = 10 bytes (imathptrs)
009: 
010: #ifdef  TI83
011: #define bcall(xxxx) call xxxx
012: #define bcallz(xxxx)    call    z,xxxx
013: #define bcallnz(xxxx)   call    nz,xxxx
014: #define bcallc(xxxx)    call    c,xxxx
015: #define bcallnc(xxxx)   call    nc,xxxx
016: #define bjump(xxxx) jp xxxx
017:  .addinstr BCALL *       CD   3 NOP 1
018: _htimesl    =$4382
019: usermemoff  =$8565
020: progstart   =9327h
021: libstart    =$0002
022: saferam1    =8265h
023: saferam2    =858Fh
024: saferam3    =80C9h
025: saferam4    =8039h
026: _zeroop1    =428Eh
027: _getcsc     =$4014
028: _homeup     =$4775
029: _newline    =$473D
030: _darkline   =$4AE0
031: _indicatorOff   =$4795
032: _indicatorOn    =$4791
033: _cleargbuf  =515Bh
034: _copygbuf   =4B9Ch
035: _clrlcdf    =4755h
036: _cleartextshad  =4765h
037: _clrscr     =4759h
038: _clrscrf    =475Dh
039: _cline      =4A84h
040: _iline      =4AE4h
041: _ipoint     =4AE8h
042: _ldhlind    =4000h
043: _divhlby10  =4008h
044: _cphlde     =4004h
045: _disphl     =4709h
046: _divhlbya   =400Ch
047: _hltimes9   =4146h
048: _vputmap    =477Dh
049: _vputs      =4781h
050: _vputsn     =4785h
051: _putmap     =4701h
052: _puts       =470Dh
053: _putps      =4715h
054: _parseinp       =$4E8C
055: _putc       =4705h
056: _getkey     =4CFEh
057: _getk       =4A18h
058: _rcly       =4EE0h
059: _rclx       =4EE8h
060: _memfree    =441Ah
061: _chksysvar  =442Ah
062: _findsym    =442Eh
063: _creategdb  =4486h
064: _createprog =448Ah
065: _createreal =4452h
066: _createstring   =4472h
067: _delvar     =44AAh
068: _insertmem  =4432h
069: _deletemem  =44B2h
070: _lcdbusy    =4066h
071: ptemp       =9317h
072: op1     =8039h
073: op2     =8044h
074: op3     =804Fh
075: op4     =805Ah
076: op5     =8065h
077: op6     =8070h
078: imathptr1   =8094h
079: imathptr2   =8096h
080: imathptr3   =8098h
081: imathptr4   =809Ah
082: imathptr5   =809Ch
083: progptr     =9319h
084: cmdshad     =9157h
085: plotsscreen =8E29h
086: symtable    =$FE6E
087: currow      =800Ch
088: curcol      =800Dh
089: pencol      =8252h
090: penrow      =8253h
091: curgy       =886Dh
092: curgx       =886Eh
093: _op1toop2   =$418E
094: _op1toop3   =$417E
095: _op1toop4   =$416E
096: _op1toop5   =$41BE
097: _op1toop6   =$41BA
098: _op2toop1   =$41C2
099: _op2toop3   =$41F6
100: _op2toop4   =$4172
101: _op2toop5   =$41B2
102: _op2toop6   =$41B6
103: _op3toop1   =$41A2
104: _op3toop2   =$417A
105: _op3toop4   =$416A
106: _op3toop5   =$41AE
107: _op4toop1   =$419A
108: _op4toop2   =$4176
109: _op4toop3   =$41FA
110: _op4toop5   =$41AA
111: _op4toop6   =$4202
112: _op5toop1   =$419E
113: _op5toop2   =$4182
114: _op5toop3   =$41FE
115: _op5toop4   =$418A
116: _op5toop6   =$4186
117: _op6toop1   =$4196
118: _op6toop2   =$4192
119: _op6toop5   =$41A6
120: _op1exop2   =$4306
121: _op1exop3   =$42FE
122: _op1exop4   =$4302
123: _op1exop5   =$42EE
124: _op1exop6   =$42F2
125: _op2exop4   =$42F6
126: _op2exop5   =$42FA
127: _op2exop6   =$42E6
128: _op5exop6   =$42EA
129: _PUSHREALO1        .EQU           4536h
130: _PUSHREALO4        .EQU           452Ah
131: _POPREALO2         .EQU           44FAh
132: _POPREALO5         .EQU           44EEh
133: _PUSHREALO2        .EQU           4532h
134: _PUSHREALO5        .EQU           4526h
135: _POPREALO3         .EQU           44F6h
136: _POPREALO6         .EQU           44EAh
137: _PUSHREALO3        .EQU           452Eh
138: _PUSHREALO6        .EQU           4522h
139: _POPREALO1         .EQU           44FEh
140: _POPREALO4         .EQU           44F2h
141: _FPMULT            .EQU           40AAh
142: _FPADD             .EQU           4092h
143: 
144: _OP1SET0           .EQU           4286h
145: 
146: _SIN               .EQU           40F6h
147: _op1set1    =$4232
148: _op1set2    =$4242
149: _op1set3    =$423A
150: _op1set4    =$4236
151: _op2set0    =$4282
152: _op2set1    =$4252
153: _op2set2    =$4246
154: _op2set3    =$422E
155: _op2set4    =$422A
156: _op2set5    =$4222
157: _op2set8    =$421E
158: _op2set60   =$4EA8
159: _op2setA    =$4226
160: _op3set0    =$427E
161: _op3set1    =$421A
162: _op3set2    =$423E
163: _op4set0    =$427A
164: _op4set1    =$4216
165: _op5set0    =$4276
166: _pushop1    =$454A
167: _pushop3    =$4542
168: _popop1     =$44E6
169: _popop3     =$44E2
170: _setxxop1   =$4A74
171: _setxxop2   =$4A78
172: _setxxxxop2 =$4A7C
173: _dispop1a   =$51D4
174: _mov9toop1  =$4206
175: contrast    =$8008
176: #endif
177: #ifdef  TI83P
178: #define bcall(xxxx) rst 28h \ .dw xxxx
179: #define bcallz(xxxx)    jr nz,$+5 \ rst 28h \ .dw xxxx
180: #define bcallnz(xxxx)   jr  z,$+5 \ rst 28h \ .dw xxxx
181: #define bcallc(xxxx)    jr  nc,$+5 \ rst 28h \ .dw xxxx
182: #define bcallnc(xxxx)   jr  c,$+5   \ rst 28h \ .dw xxxx
183: #define bjump(xxxx) call 50h \ .dw xxxx
184:  .addinstr BCALL *       EF   3 NOP 1
185: appBackupScreen =$9872  ; 768 bytes
186: _ldhlind    =$4009
187: _htimesl    =$4276
188: _convop1    =$4AEF
189: contrast    =8447h
190: _darkline   =$47DD
191: _darkpoint  =$47F2
192: _archUnarch =$4FD8
193: _enoughRam  =$42FD
194: usermemoff  =$89EC
195: libstart    =$0004
196: progstart   =9D95h
197: ;saferam1   =86ECh
198: saferam1    =9872h
199: saferam2    =858fh
200: saferam3    =8508h
201: saferam4    =8478h
202: saferamp    =9872h
203: saferamp2   =8251h
204: _homeup     =$4558
205: _newline    =$452E
206: _cleargbuf  =4BD0h
207: _indicatorOn    =456Dh
208: _indicatorOff   =4570h
209: _copygbuf   =486Ah
210: _clrlcdf    =4540h
211: _cleartextshad  =454Ch
212: _clrscr     =4543h
213: _clrscrf    =4546h
214: _cline      =4798h
215: _iline      =47E0h
216: _ipoint     =47E3h
217: _ParseInp   =4A9Bh
218: _divhlby10  =400Fh
219: _cphlde     =400Ch
220: _disphl     =4507h
221: _divhlbya   =4012h
222: _hltimes9   =40F9h
223: _vputmap    =455Eh
224: _vputs      =4561h
225: _vputsn     =4564h
226: _putmap     =4501h
227: _puts       =450Ah
228: _putps      =4510h
229: _putc       =4504h
230: _getkey     =4972h
231: _getk       =4744h
232: _getcsc     =4018h
233: ;_RCLY      =4EE0h
234: ;_RCLX      =4EE8h
235: _memfree    =$42E5
236: _chksysvar  =42F1h
237: _findsym    =42F4h
238: ;_CREATEGDB =4486h
239: ;_CREATEREAL    =4452h
240: ;_CREATESTRNG   =4472h
241: _createprog =$4339
242: _createprotprog =$4E6D
243: _delvar     =4351h
244: _insertmem  =42F7h
245: _deletemem  =4357h
246: _lcdbusy    =4051h
247: op1     =8478h
248: op2     =8483h
249: op3     =8499h
250: op4     =8499h
251: op5     =84A4h
252: op6     =84AFh
253: imathptr1   =84D3h
254: imathptr2   =84D5h
255: imathptr3   =84D7h
256: imathptr4   =84D9h
257: imathptr5   =84DBh
258: progptr     =9830h
259: cmdshad     =966Eh
260: plotsscreen =9340h
261: symtable    =$FE6E
262: currow      =844Bh
263: curcol      =844Ch
264: pencol      =86D7h
265: penrow      =86D8h
266: curgy       =8D18h
267: curgx       =8D19h
268: _PushRealO1 .equ 43BAh
269: _PushRealO2 .equ 43B7h
270: _PushRealO3 .equ 43B4h
271: _PushRealO4 .equ 43B1h
272: _PushRealO5 .equ 43AEh
273: _PushRealO6 .equ 43ABh
274: _FPAdd  .equ 4072h
275: _FPDiv  .equ 4099h
276: _FPMult .equ 4084h
277: _OP1ExOP4   .equ 421Ch
278: _OP1Set0    .equ 41BFh
279: _OP3SET2    .equ 41A4h
280: _PopRealO1  =4390h
281: _PopRealO2  =438Dh
282: _PopRealO3  =438Ah
283: _PopRealO4  =4387h
284: _PopRealO5  =4384h
285: _PopRealO6  =4381h
286: _op5exop6   =420Ah
287: _op5set0    =41B3h
288: _cpop1op2   =$4111
289: _op3toop4   =$4114
290: _op1toop4   =$4117
291: _op2toop4   =$411A
292: _op4toop2   =$411D
293: _op3toop2   =$4120
294: _op1toop3   =$4123
295: _op5toop2   =$4126
296: _op5toop6   =$4129
297: _op5toop4   =$412C
298: _op1toop2   =$412F
299: _op6toop2   =$4132
300: _op6toop1   =$4135
301: _op4toop1   =$4138
302: _op5toop1   =$413B
303: _op3toop1   =$413E
304: _op6toop5   =$4141
305: _op4toop5   =$4144
306: _op3toop5   =$4147
307: _op2toop5   =$414A
308: _op2toop6   =$414D
309: _op1toop6   =$4150
310: _op1toop5   =$4153
311: _op2toop1   =$4156
312: _op2toop3   =$416E
313: _op4toop3   =$4171
314: _op5toop3   =$4174
315: _op4toop6   =$4177
316: _OP1Set1    .equ 419Bh
317: _OP1Set2    .equ 41A7h
318: _OP1Set3    .equ 41A1h
319: _OP1Set4    .equ 419Eh
320: _pushop1    =$43C9
321: _popop1     =$437E
322: _arc_unarc  .equ 4FD8h
323: _sin        =40BDh
324: _zeroop1    =$41C5
325: _zeroop2    =$41C8
326: _zeroop3    =$41CB
327: _setxxop1   =$478C
328: _setxxop2   =$478F
329: _setxxxxop2 =$4792
330: _dispop1a   =4BF7h
331: _mov9toop1  =$417A
332: _delvararc  =$4fC6
333: ptemp       =982Eh
334: #endif
335: grbuf       =plotsscreen
336: graph_mem   =plotsscreen
337: gbuf        =plotsscreen
338: sram        =saferam1
339: apdram      =saferam1
340: statram     =saferam2
341: statvars    =saferam2
342: vat     =progptr
343: saferam5    =imathptr1
344: _grbufcpy   =_copygbuf
345: _grbufclr   =_cleargbuf
346: _clrlcdfull     =_clrlcdf
347: _clrscrnfull    =_clrscrf
348: _chkfindsym     =_chksysvar
349: textshadow  =saferam3
350: savesscreen     =saferam1
351: ;-----> Ion Functions
352: lVectors    =cmdshad+80
353: ionVersion  =lVectors
354: ionRandom   =lVectors+3
355: ionPutSprite    =lVectors+6
356: ionLargeSprite  =lVectors+9
357: ionGetPixel =lVectors+12
358: ionFastCopy =lVectors+15
359: ionDetect   =lVectors+18
360: ionDecompress   =lVectors+21
361: 
362: 
363: trigflags       .EQU       0           ; IY OFFSET VALUE
364: trigdeg         .EQU       2
365: ;
366: plotflags       .EQU       2           ; IY OFFSET VALUE
367: plotloc         .EQU       1
368: plotdisp        .EQU       2
369: ;
370: grfmodeflags    .EQU       2           ; IY OFFSET VALUE
371: grffuncm        .EQU       4
372: grfpolarm       .EQU       5
373: grfparamm       .EQU       6
374: grfrecurm       .EQU       7
375: ;
376: graphflags      .EQU       3           ; IY OFFSET VALUE
377: graphdraw       .EQU       0
378: graphcursor     .EQU       2
379: ;
380: grfdbflags      .EQU       4           ; IY OFFSET VALUE
381: grfdot          .EQU       0
382: grfsimul        .EQU       1
383: grfgrid         .EQU       2
384: grfpolar        .EQU       3
385: grfnocoord      .EQU       4
386: grfnoaxis       .EQU       5
387: grflabel        .EQU       6
388: ;
389: textflags       .EQU       5           ; IY OFFSET VALUE
390: textEraseBelow  .EQU       1
391: textScrolled    .EQU       2
392: textInverse     .EQU       3
393: ;
394: onflags         .EQU       9           ; IY OFFSET VALUE
395: onRunning       .EQU       3
396: onInterrupt     .EQU       4
397: ;
398: statflags       .EQU       9           ; IY OFFSET VALUE
399: statsvalid      .EQU       6
400: ;
401: fmtflags        .EQU       10          ; IY OFFSET VALUE
402: fmtExponent     .EQU       0
403: fmtEng          .EQU       1
404: ;
405: nummode         .EQU       10          ; IY OFFSET VALUE
406: FMTREAL         .EQU       5
407: FMTRECT         .EQU       6
408: FMTPOLAR        .EQU       7
409: ;
410: curflags        .EQU       12          ; IY OFFSET VALUE
411: curAble         .EQU       2
412: curOn           .EQU       3
413: curLock         .EQU       4
414: ;
415: appflags        .EQU       13          ; IY OFFSET VALUE
416: appTextSave     .EQU       1
417: appAutoScroll   .EQU       2
418: ;
419: PLOTFLAG2       .EQU       17          ; IY OFFSET VALUE
420: EXPR_PARAM      .EQU       3
421: EXPR_WRITING    .EQU       4
422: ;
423: indicflags      .EQU       18          ; IY OFFSET VALUE
424: indicRun        .EQU       0
425: indicOnly       .EQU       2
426: ;
427: shiftflags      .EQU       18          ; IY OFFSET VALUE
428: shift2nd        .EQU       3
429: shiftAlpha      .EQU       4
430: shiftALock      .EQU       6
431: ;
432: tblflags        .EQU       19          ; IY OFFSET VALUE
433: AutoFill        .EQU       4
434: AutoCalc        .EQU       5
435: ;
436: sgrflags        .EQU       20          ; IY OFFSET VALUE
437: grfSplit        .EQU       0
438: VertSplit       .EQU       1
439: WRITE_ON_GRAPH  .EQU       4
440: textwrite       .EQU       7
441: ;
442: asm_flag1       .EQU       33          ; IY OFFSET VALUE
443: asm_flag1_0     .EQU       0
444: asm_flag1_1     .EQU       1
445: asm_flag1_2     .EQU       2
446: asm_flag1_3     .EQU       3
447: asm_flag1_4     .EQU       4
448: asm_flag1_5     .EQU       5
449: asm_flag1_6     .EQU       6
450: asm_flag1_7     .EQU       7
451: ;
452: asm_flag2       .EQU       34          ; IY OFFSET VALUE
453: asm_flag2_0     .EQU       0
454: asm_flag2_1     .EQU       1
455: asm_flag2_2     .EQU       2
456: asm_flag2_3     .EQU       3
457: asm_flag2_4     .EQU       4
458: asm_flag2_5     .EQU       5
459: asm_flag2_6     .EQU       6
460: asm_flag2_7     .EQU       7
461: ;
462: asm_flag3       .EQU       35          ; IY OFFSET VALUE
463: asm_flag3_0     .EQU       0
464: asm_flag3_1     .EQU       1
465: asm_flag3_2     .EQU       2
466: asm_flag3_3     .EQU       3
467: asm_flag3_4     .EQU       4
468: asm_flag3_5     .EQU       5
469: asm_flag3_6     .EQU       6
470: asm_flag3_7     .EQU       7
471: 
472: 
473: