Memory Layout
Memory on the Mattel Aquarius computer is divided in the following main parts:
ROM Part | Not addressable with PEEK and POKE | |
00 00 2F FF | 0 12287 |
|
RAM Part | VIDEO AND COLOR MATRIX | |
30 00 37 FF | 12288 14335 |
|
RAM Part | SYSTEM INFORMATION | |
38 00 38 FF | 14336 14591 |
|
RAM Part | START BASIC PROGRAMMCODE | |
39 01 | 14593 | This pointer can be found at 14414(LSB) and 14415(MSB) |
LENGTH DEPENDS ON BASICPROGRAM | Ends with two zero's | |
RAM Part | START SIMPLE VARIABLE LIST | |
Following after BASIC programmcode. The pointer to this start address can be found at 14550(LSB) and 14451(MSB) | ||
RAM Part | START ARRAY-VARIABLE LIST | |
Following after the simple variable list. The pointer to this start address can be found at 14552(LSB) and 14453(MSB) | ||
RAM Part | START REST MEMORY | |
Following after the array-variable list. The pointer to this start address can be found at 14554(LSB) and 14455(MSB). This part of memory is used by the computer as "stack" and "overhead" | ||
RAM Part | START STRING-VARIABLE MEMORY | |
The pointer to this start address can be found at 14411(LSB) and 14412(MSB). Default 50 bytes, can be enlarged with the CLEAR command (e.g. CLEAR 100) | ||
MAX MEMORY | Pointer at 14509(LSB) and 14510(MSB) |
After the memory reserved for the character and color matrix is a part of the memory reserved for the system and BASIC. This area is about 256 bytes and runs from memory address 14336 up to 14591 (0x3800 -> 0x3FF)
Address | Mnemonic | Start value | Description | |
---|---|---|---|---|
Hex | Dec | |||
0x3800 | 14336 | TTYPOS: | 0x00 | Row position of cursor on screen (0x00-0x27) |
0x3801 0x3802 | 14337 14338 | CHRPOS: | Address of the cursor within the cursor matrix | |
0x3803 | 14339 | USRGO: | 0xC3 | The number 179, which is the JUMP (0xC3) instruction for the Z80, is used for the execution of the USR() function. |
0x3804 0x3805 | 14340 14341 | USRAL: USRAH | 0x97 0x06 | The start address to the machinecoded programm used by the USR() function. On startup it uses LSB=151 (0x97) and MSB=6 (0x06), pointing to memory address 1687 (0x0697) --> JMP FCERR. Jump to an errormessage routine within ROM) |
0x3806 0x3807 | 14342 14343 | HOKDSP: | 0x3B 0x00 | Pointer to the "HOOK SERVICE ROUTINE" LSB=59 (0x3B) and MSB=0, address 59 (0x003B) in the standard ROM. If BASIC Extension-ROM is used the address will be changed. |
0x3808 | 14344 | LISTCT: | 0x00 | Counter for LIST-command. The listening will be stopped after every 24 rows. |
0x3809 | 14345 | PTOLD: | 0xA3 | Contains the code which will be send to the protection port |
0x380A | 14346 | CHARQ: | 0x00 | ASCII-value of the latest key pressed on the keyboard, but not yet been transferred to the character-matrix. Hence the value which will be used by the key-scanning routine (0x380E). The value will eventually end op at address 14350 (0x380F) | 0x380B 0x380C | 14347 14348 | SKEY: | 0x00 0x00 | Pointer use in the single key command |
0x380D | 14349 | BUFO: | 0x20 | Storage of the character behind the cursor |
0x380E | 14350 | CTRLFG: | 0x00 | Debounce count for the key scanning routine |
0x380F | 14351 | FLAG: | 0x00 | Current key value after scanning |
0x3810 0x381E | 14352 14366 | FDIV: | Subroutine for division | |
0x381F 0x3844 | 14367 14404 | RANDOM: | For the use in generation random numbers | |
0x3845 | 14405 | LPTLST: | 0x00 | Last printer operation status. |
0x3846 | 14406 | LPTPOS: | 0x00 | Position of the printerhead (0-131) |
0x3847 | 14407 | PRTFLG: | 0x28 | Flag to direct output to printer or CRT. |
0x3848 | 14408 | LINLEN: | 0x28 | Line length. Initially set to 40 |
0x3849 | 14409 | CLMLST: | 0x0E | Position of last comma column |
0x384A | 14410 | RUBSW: | 0x00 | Rubout switch |
0x384B 0x384C | 14411 14412 | STKTOP: | Top location to be used for stack. It is followed by the RAM-stack where the strings are stored. At default there are 50 bytes reserved for strings at the top of the memory. With the command 'CLEAR 100' the stringspace will be enlarged en the stack therefor has to start at a lower address. | |
0x384D 0x384E | 14413 14414 | CURLIN: | 0xFE 0xFF | Current line number. Set to 0xFFFF for direct statement mode. |
0x384F 0x3850 | 14415 14416 | TXTTAB: | 0x01 0x39 | Pointer to the beginning of Text of Basic programm. |
0x3851 0x3856 | 14417 14422 | CASNAM: | 6 bytes for cassette name. | |
0x3857 0x385C | 14423 14428 | CASNM2: | 6 bytes for cassette name read from tape | |
0x385D 0x385E | 14429 14430 | CASFL2: CASFL3: | 0xBE 0x08 | Flags for cassette input/output routines. |
0x385F | 14431 | BUFMIN: | 0x31 | Used by INPUT statement |
0x3860 0x38A8 | 14432 14504 | BUF: | 73 bytes used for the current line input buffer. | |
0x38A9 | 14505 | BUFEND: | End of input buffer | |
0x38AA | 14506 | DIMFLG: | Flag to differentiate variable type. | |
0x38AB | 14507 | VALTYP: | To differentiate between string or nummeric value. | |
0x38AC | 14508 | DORES: | Flag for crunch. | |
0x38AD 0x38AE | 14509 14510 | MEMSIZ: | Contains the highest RAM location. | |
0x38AF 0x38C0 | 14511 14528 | For string functions | ||
0x38C1 0x38C2 | 14529 14530 | FRETOP: | Top of string free space. | |
0x38C3 0x38C5 | 14531 14533 | TEMP: | Pointer for addresses of string storage. | |
0x38C6 0x38CB | 14534 14539 | Use for FOR function. | ||
0x38CC 0x38D3 | 14538 14547 | Pointer and flags for programm execution | ||
0x38D4 0x38D5 | 14548 14549 | Points to the start of the BASIC line which was interrupted by the break. | ||
0x38D6 0x38D7 | 14550 14551 | VARTAB: | Points to start of simple variable table | |
0x38D8 0x38D9 | 14552 14553 | ARYTAB: | Points to start of array table. | |
0x38DA 0x38DB | 14554 14555 | Contains the end address of the BASIC & simple & array list. | ||
0x38DC 0x38DD | 14556 14557 | Points to where the DATA has been READ. At start of programm or after a RESTORE this points to the address before the start of the BASIC programm (14592) which always contains zero. | ||
0x38DE 0x38E3 | 14558 14563 | Pointer and flags for arrays | ||
0x38E4 0x38F8 | 14556 | FACLO: | Floating number (exponent & mantissa stored here.) |