Main

Model 1 And 3 RAM Addresses

Important RAM Addresses

The following keys for DOSes apply:
  • T1 - Model 1 TRSDOS
  • T3 - Model 3 TRSDOS
  • N1 - Model 1 NEWDOS
  • N3 - Model 3 NEWDOS
  • L1 - Model 1 LDOS
  • L3 - Model 3 LDOS
  • M1 - Model 1 MULTIDOS
  • M3 - Model 3 MULTIDOS
  • D1 - Model 1 DOSPLUS
  • D3 - Model 3 DOSPLUS
  • All - All DOSes, Model I and Model III.
Hex Dec Description
3C00 15360 This is the beginning of video ram or VIDRAM. It ends at 3FFFH or 16383.
4000 16384 RST 08 Compare value pointed to by HL to that immediately following RST instruction.
4003 16387 RST 10 Examine next symbol pointed to by HL.
4006 16390 RST 18 Compare DE and HL.
4009 16393 RST 20 Test the type of current varible.
400C 16396 RST 28 3 byte break key vector (cass. Basic & TRSDOS1.3) and normal Dos function call.
400F 16399 RST 30 Reserved for Dos; normally for invoking Debug
4012 16402 RST 38 Maskable interupt vector.
4015 16405 Beggining of Keyboard DCB. One byte device type. = 1
4016 16406 Two byte keyboard driver vector.
4018 16408 Right SHIFT toggle.
4019 16409 Caps lock switch (Not 0 = Caps only)
401A 16410 Cursor blink count
401B 16411 Cursor blink status. (0=blinks)
401C 16412 Cursor blink switch (0 = blink)
401D 16413 Beggining of Video DCB. One byte device type. = 7.
401E 16414 Two byte video driver vector.
4020 16416 Two byte cursor position.
4022 16418 0 = Cursor on, Not 0 = character replaced by cursor.
4023 16419 Cursor Character (in ascii).
4024 16420 FLAG: 0=Space compression; Not 0=special character.
4025 16421 Beggining of Printer DCB. One byte device type. = 6.
4026 16422 Two byte printer driver vector.
4028 16424 Maximum lines printed per page plus one. Default=67.
4029 16425 Number of lines printed plus one.
402A 16426 Character counter + 1.
402B 16427 Line printer maximum line length less two.
402C 16428 "R"
402D 16429 Return to Dos exit. (Disk systems only).
4030 16432 For all DOSes except TRSDOS, is abnormal return to DOS ready.
4036 16438 Keyboard buffer (7 bytes).
403D 16445 Cassette port and print size flag (bit 3) copy (For Model 3, see 4210). L3: location of routine to add task to interupt chain.
403E 16446 For Model I DOSPLUS, hold DOS version in DCB format.
4040 16448 For L1 & M1, 25 ms heartbeat counter. For L3, used to remove task from interrupt chain.
4041 16449 Beginning of Time and Date bytes. (seconds, min., hours, year, day, month) Ends at 4046H or 16454. L1, D1, and M1
4043 16451 L3, change address of interupt task.
4044 16452 L1, D1, & M1. Contains date in binary format.
4046 16454 L3. Remove task from interupt chain.
4047 16455 L1. Current day in coded form.
4049 16457 For the Model III disk is non maskable interupt vector, for Model I disk is highest available memory location (Model III = 4411H)
404B 16459 L1. Contains image of interrupt latch.
408E 16526 Address of USR routine (two bytes)
4099 16537 INKEY$ storage. Most recent keyboard character.
409A 16538 Error code is at this address (for BASIC only)
409C 16540 OUTSEL. On Model I, is a 1-byte output device flag. -1 (or 129) for cass, 0 for video, 1 for printer.
40A0 16544 Clear address pointer. Beggining of CLEARed area for string variable storage
40A2 16546 Last executed line number.
40A4 16548 Pointer to beggining of Basic program.
40A6 16550 Cursor's current column number.
40A7 16551 Input buffer pointer.
40A9 16553 ???.
40AA 16554 3 byte random seed number.
40AB 16555 This byte is changed by RANDOM.
40AF 16559 SAFLAG. Contains typeflag of software accumulator.
40B1 16561 Two byte MEMTOP (for BASIC).
40D3 16585 Saves length ASCII representation of binary integer.
40D4 16586 Two byte address. Points to buffer where ASCII decimal representation written.
40D6 16598 String pointer. Keeps track within CLEARed area as to where last string data was put.
40D8 16600 Two byte location of where Basic is currently reading program.
40DF 16607 Default entry point for SYSTEM tapes.
40E1 16609 Auto flag.
40E2 16610 Current auto line number.
40E4 16612 Auto increment.
40E6 16614 Pointer to terminator (end of line 00H byte or ":") of last executed Basic statement is at this address.
40E8 16616 Beggining of Basic's stack.
40EA 16618 Two byte address. Contains line number with error.
40EC 16621 Two byte address. "." line number.
40EE 16622 Pointer to I/O buffer.
40F0 16624 Pointer to line of BASIC error handling.
40F2 16626 Error flag.
40F5 16629 Current line number.
40F9 16633 End of BASIC program/ start of simple variable list pointer.
40FB 16635 Start of arrays variables pointer.
40FD 16637 End of arrays variables/ start of free memory pointer.
40FF 16639 Two byte address. Current location of Basic's DATA pointer.
4101 16641 Beginning of variable type table.
411A 16666 End of variable type table.
411B 16667 Trace flag.
411D 16669 First byte of SA.
4124 16673 Last byte of SA.
4127 16679 First byte of SA1.
412E 16686 Last byte of SA1.
4152 16722 CVI 3 byte vector.
4155 16725 FN "
4158 16728 CVS "
415B 16731 DEF "
415E 16734 CVD "
4161 16737 EOF "
4164 16740 LOC "
4167 16743 LOF "
416A 16746 MKI$ "
416D 16749 MKS$ "
4170 16752 MKD$ "
4173 16755 CMD "
4179 16761 OPEN "
417C 16764 FIELD "
417F 16767 GET "
4182 16770 PUT "
4185 16773 CLOSE "
4188 16776 LOAD "
418B 16779 MERGE "
418E 16782 NAME "
4191 16785 KILL "
4194 16788 & function "
4197 16791 LSET "
419A 16794 RSET "
419D 16797 INSTR "
41A0 16800 SAVE "
41A3 16803 LINE "
41A6 16806 ERROR Error processing jumps to this 3-byte vector. In cassette BASIC it contains RET instruction; in Disk BASIC, contains a jump (through RST) to long error message
41A9 16809 USR 3 byter vector.
41AC 16812 Ready prompt
41AF 16815 Called from 0368H to input line from keyboard to I/O buffer.
41B2 16818 Called from 1AA1H immediately after BASIC line is tokenized. HL points to tokenized line.
41B5 16821 Called from 1AECH immediately after BASIC's table of prg lines are updated. After call to 41B5H, BASIC calls CLEAR routine at 1B5DH then calls this dos exit from 1AF2H
41BB 16827 Called from 1B8CH and 1DB0H during NEW and END processing to allow Disk Basic to close open files.
41BE 16830 PRINT# processing called from 2174H
41C1 16833 Byte output to any device. Called from 032CH so output to disk can be handled as to other devices.
41C4 16836 ROM KB scan (0358H) calls this exit. BASIC processes INKEY$ here and also after each command when system searches for break or shift @.
41C7 16839 Called from 1EA6H when RUN is followed by filename or line number
41CA 16842 Related to 41BEH above. Called at beggining of print processing from 206FH to check for possible disk output.
41CD 16845 Called from 20C6H. Call made during print processing after number is in ASCII and just before printing. Could be used for Hex and Binary printing.
41D0 16848 Called from 2103H (from PRINT routine after code that send CR.) Could be used for screen wrap-around.
41D3 16851 Called from 2108H and 2141H. First is for printing with comma tabs, second is for printing with TAB statement. Could be used to increase length of original tabs from 63 or 127 up to 255.
41D6 16854 INPUT# processing. Called from 219EH to check for INPUT# command and to provide input from disk.
41D9 16857 Left side of MID$ processing. Only DOS exit BASIC jumps to instead of calls. Used to allow MID$ on left side of equals sign.
41DC 16860 Variables assignment. During processing of READ & INPUT statements, after computer recieves value and before assigned to variable, BASIC calls this exit from 222DH.
41DF 16863 Called twice from BASIC: From 2278H after BASIC assigns input value to variable and just before BASIC searches for extra data that will generate "Extra ignored" message, and from 2B44H from the midst of list processing. Could be used to alter list command.
41E2 16866 SYSTEM command processing. Called from 02B2 just before "*?" prompt. A system tape will automatically start if a jump to its starting address is placed here. Keep in mind this is a 3 byte location. The first byte should be C3H which is the code for "JP" and should be followed by the starting address of your program.
41E8 16872 $RSRCV input buffer (1 byte)
41F0 16880 $RSTX output buffer (1 byte)
41F8 16888 $RSINIT baud rate code. TX code = most sig. nibble, RCV code = least sig. nib.
41F9 16889 $RSINIT parity/word/length stop-bit code
41FA 16890 $RSINIT wait switch (0 = wait, Not 0 = wait)
4209 16905 L3. Checks for drive and mounted disk.
4210 16912 Various controls: See port EC
4211 16913 Cass baud rate switch (0=500 baud, Not 0=1500 baud)
4214 16916 Video display scroll protect (range = 0 - 7)
4217 16919 Model 3 time. Contains time in binary format.
421A 16922 Model 3 date. Contains date in binary format.
4220 16928 $ROUTE destination device (two bytes)
4222 16930 $ROUTE source device (two bytes)



Top

The TRS-80 Home Page created and maintained by Pete Cervasio
cervasio@airmail.net

Copyright © 1998 Pete Cervasio