----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 82-RAM.TXT A Programmer's Guide to the TI-82 RAM Version 0.2 Copyright (c) 1997 Mattias Lindqvist & Dines Justesen ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- This file lists the functions of the known locations i the system part of the RAM. Suggestion, additions and corrections are very welcome, mail Dines Justesen at c958362@student.dtu.dk or Mattias Lindqvist ml@df.lth.se All the words below which are just called pointers is pointers to places in the used part of the ram. The function of these pointers have not been found. Byte 8000: Last key pressed Byte 8001: Translated scancode of key currently pressed Byte 8002: Same as 8001, but FFh if more than one key is pressed Byte 8003: Countdown until keyrepeat Byte 8004: Bit 2 set = Data valid, Bit 0 Set = no key Byte 8005: Current key pressed (scancode as returned by keyboard handler) Byte 8006: Current key pressed (or last if no key pressed now) Byte 8007: ? Byte 8008: Current contrast level (0..1F) Word 8009: Counter used for APD (MSB in 8009) Byte 800B: Cursor blink counter Byte 800C: Current row of text cursor (0-7) Byte 800D: Current column of text cursor (0-F) Byte 800E: Letter under cursor Byte 800F: Command to get current graphics coloum Byte 8011: Command to get current graphics line ??? 8012? buffer? 8 801E: 8x8 Bitmap of top rigth corner of screen Byte 8026: Busy counter Byte 8027: Busy bitmap 11 8028 OP1 11 8033 OP2 11 803E OP3 11 8049 OP4 11 8054 OP5 11 805F OP6 8 806A 11 8072 Buffer used to store program name (used in editor) Word 807D Pointer Word 807F Pointer Word 8081 Pointer Word 8083 Pointer Word 8085 Pointer Word 8087 Pointer to ANS? Word 8089 Pointer to last var accesed? Word 808B Pointer 80 808F Start of text mem Byte 810F secondary row of text cursor (0-7) \ Byte 8110 secondary column of text cursor (0-F) \ Byte 8111 secondary Number of first row in window > Secondary text Byte 8112 secondary IY+12 / info Byte 8113 secondary IY+05 And 10 (insert cursor bit) / Word 8114 Pointer to code : Key press pointer Word 8116 Pointer to code Word 8118 Pointer to code Word 811A Pointer to code Word 811C Pointer to code Word 811E Pointer to code Byte 8120 Rom page for code at (8114) or (811C) or (811E) Byte 8121 Code for which "function" of the calc is used (see table) 8122 here might be pointers like 8114 (E bytes) Word 8136 Checksum of mem Byte 8161 Used to run code at other pages in rom 81DF Buffer used for writing name of token 4 81F4 Buffer used by link rutine at 2697E Word 81F8 Cheksum used by link rutines Word 81FD Length (DE) 11 81FF Var info (OP1) 9 8209 buffer 2 Byte 8215 X value for graphics rutines Byte 8216 Y value for graphics rutines Byte 8219 Last error number Word 821A Pointer to current error handler 8228 Backup buffer used to store image on display when calc APDs 8528 Table of bitmapped system data. IY usually points here. Byte 854D Number af Y-Var. (used by 2DE8 to select token) 3 854E (1F9C) 3 bytes used as part of token name ? Byte 8553 (init 40) Byte 8554 (init 60) Word 8555 Pointer to a place in the buffer below, used to find end (Pointer in system ram (init value:8557)) 8557 Buffer used to stored lastentry (used when pressing 2nd ENTER) 756 8581 Graph memory byte 85d7 Number of entries in buffer at 8557 ???? byte 85d8 Word 8772 Pointer Word 8774 Pointer Word 8776 Pointer Word 8778 Pointer Word 877A Pointer Word 877C Pointer Word 88AE Pointer Word 88B2 Pointer Word 88B4 Pointer Word 88B6 Pointer 756 88B8 Graphics mememory ? 8BB8 Buffer min 12 bytes Word 8BD3 Pointer Word 8BD5 Pointer Word 8BD7 Pointer 80 8BDF Secondary text memory For other values look at 15470 Word 8C65 | Word 8C67 \ Word 8C69 > Pointers to some kind of buffers for text input Word 8C6B / Word 8C71 Pointer Word 8C73 Pointer 8C79 Buffer (F bytes) ? Byte 8C8F Number of first row in window Byte 8C90 Number of last row in window Byte 8C91 Cursor row (0..7) Byte 8C92 Cursor coloum (0..F) Byte 8C93 Length of current cursor (4 LSB, Upper bits ?? <>0) Word 8C94 \ Secondary text mem vars ??? Pointer to ASZII string Word 8C96 / Position ? Pointer Word 8C98 / . ? Word 8CF2 Pointer Word 8CF4 Pointer Word 8CF6 Pointer Word 8CFF Pointer ?? Word 8D02 Pointer Word 8D04 Pointer Word 8D06 Pointer to last variable accesed ? Word 8D08 Pointer Word 8D0A Pointer (init to 8D24) Word 8D0C Pointer (init to 8D24) Pointer last byte of mem used by variables Word 8D0E Pointer to last byte of used mem (init to 8D24) Pointer to last byte of used mem Word 8D10 Pointer to last VAT entry (includes ANS) Word 8D12 Pointer to last byte of free mem (init to FE6E) VAT Word 8D18 Pointer to last VAT entry (does not include ANS) FE6E Start of VAT TABLE OF BITMAPPED DATA ======================= (IY+00) or (8528): bit 4 set: a key has been released bit 3 set: a key has been pressed bit 3 res: no key pressed bit 2 set: Degree \ angle display mode res: Radian / (IY+01) or (8528): bit 2 set: Graph screen is displayed res: Graph screen is not displayed (IY+02) or (852A): Bit 1 set: graph writes to display and graph mem Bit 2 set: graph is beeing displayed Bit 4 set: graph mode is function bit 5 set: graph mode is polar bit 6 set: graph mode is parametric bit 7 set: graph mode is sequence (IY+03) or (852B): bit 0 set: Redraw graph res: Use graph mem (IY+04) or (852C): bit 0 set: draw line \ bit 0 res: draw dots \ graphing mode bit 1 set: Simultaneus draw / bit 1 res: Sequential draw / bit 2 set: Grid on bit 2 res: Grid off bit 3 set: Polar coordinates bit 3 res: Rectangular coordinates bit 4 set: Coordinates on bit 4 res: Coordinates off bit 5 set: Axes off bit 5 res: Axes on bit 6 set: Labels on bit 6 res: Labels off (IY+05) or (852D): bit 4 set: use insert cursor bit 3 set: display white on black bit 3 res: display black on white bit 2 set: text has been scrooled bit 2 res: text has not been scrooled bit 1 set: erase line below small font bit 1 res: do not erase it (IY+08) or (8530): bit 3 set: key repeat on?? bit 3 res: key repeat off? (IY+09) or (8531): bit 3 set: Calcalator is running bit 4 set: An ON key interrupt has occured (IY+0A) or (8532) or (IY+0B) or (8533): bit 1-0 : 11= Engineering \ 01= Scientific > Exponential display mode 00= Normal / (IY+0C) or (8534): bit 2 set : cursor enabled bit 3 set : cursor is currently on bit 4 set : cursor is locked (IY+0D) or (8535): bit 2 set: scroll window bit 2 res: do not scroll bit 1 set: affect text memory bit 1 res: do not affect text memory (IY+0E) or (8536): bit 6 set: use extra digits in math bit 6 res: do not use extra digits (set to 0) (IY+12) or (853A): bit 0 set: the busy indicator is turned on bit 1 set: there is valid data in the 8 byte buffer at 801E bit 2 set: run indic only, no apd bit 3 set: 2nd has been pressed bit 3 res: 2nd has not been pressed bit 4 set: ALPHA/alpha has been pressed | alpha does not exists bit 4 res: ALPHA/alpha has not been pressed | but functions are the same bit 6 set: alpha on | as on ti85. Not like ti83. bit 6 res: ALPHA on | (and the cursor exists) bit 7 set: Alpha has been locked | bit 7 set: Alpha has not been locked | (IY+13) or (853B) bit 4 set: Prompt for independent var? bit 5 set: Prompt dependent var? (IY+14) or (853C) bit 7 set: write to graph bit 7 res: do not write to graph bit 2 \ Spilt screen bit 0 / (IY+15) or (853D) bit 3 set: (8121)=43 bit 4 set: (8121)=4B Registers --------- The TI82 has 6 buffers in the system memory, used to store floating point numbers and variable information. The buffer are called OPX where X is the number of the reg. Each of the registers is 10 bytes. 8028 OP1 8033 OP2 803E OP3 8049 OP4 8054 OP5 805F OP6 FP Stack -------- The TI82 has a stack used to store floating point values. The stack is placed at the end of the used memory, and grows upwards. Page 0 holds all the needed functions to use this stack. Location -------- The byte at 8121 is used to find out which function of the calculator is currently beeing used. The list below contains the know values. Value: Place: 40 Homescreen 41 Link 45 Graph 46 Mode 47 Program editor 48 Program name input 49 Window 4A Y-Var input 4B Table 4C Tableset 52 Error