www.jupiter-ace.co.uk

FAQs Index > Jupiter Ace Memory Map




16384*
16383*












15424
15423

15360
Ramtop
Return Stack



DATA Stack


12 unused bytes


Dictionary start

[System Variables 64 bytes]

4000*
3FFF*












3C40
3C3F

3C00
*Ramtop 8000 (32768)
*16K Rampack fitted these values apply 32767 (7FFF)

Upto 48K of RAM can be added giving a total amount of RAM as 51K
15359

14336

[1st Echo of Top 1K]

3BFF

3800
 
14335

11312

[2nd Echo of Top 1K]

37FF

3400
 
11311

12288

[3rd Echo of Top 1K]

33FF

3000
 
12287


11264

128 Character Set RAM
Write Only RAM
2FFF


2C00
 
11263

10240

[Echo of next 1K]
[fast access for CPU]
2BFF

2800
 
10239
9985
9984
9983


9216
Pad RAM 254 bytes



Video RAM 768 bytes
24*32 cells

27FF
2701
2700 (=0)
26FF


2400


Address 2700 (9984) always holds byte value 0
9215

8192

[Echo of next 1K]
[fast access for CPU]
23FF

2000
 
8191






0


8K ROM


1FFF






0000
The character set in RAM cannot be read from, but the one in the ROM can.

Space [ASCII 32] starts at 1D7A (7547)

© [ASCII 127] ends at 1FFB (8187)


If you add a 16kB RAMpack to the Jupiter Ace the total amount of system memory will be 19kB, and 51kB if you add a 48kB pack. So how do we get these odd RAM values, 19kB and 51Kb?

The Jupiter Ace's Z80A CPU can address 65536 memory locations. The first 8192 [0 to 8191] locations are taken up with the Ace's ROM, the next 8192 [8192 to 16384] locations are taken up with system variables, video RAM, PAD (1kB) character Set RAM (1kB), and user dictionary RAM(1kB). So there's your standard 3kB RAM in the Ace. The rest of the locations due to the design of the Ace are taken up by some echoes of the character set (1kB), video RAM (1kB), and three echoes of the top 1kB.

For more details see the above Memory Map.

So now we know that with the ROM (8kB), and 3kB of RAM, plus the echoes (5kB), in a standard Jupiter Ace points to the last address locations used is 16383.

Additional RAMpack locations start at address 16384 onwards. So by adding a 16kB RAMpack plus the 3kB of built in RAM below address 16384 gives the what seems is the strange total value of 19kB in the system. As with, a 48kB RAMpack the total amount of RAM to the system would be 51kB.


We can also now have a 99kB Ace. Memory locations 16384 to 65536 = 49152 (48kB), can be paged in or out in a 48kB page. The Ace's original 3kB is not moved.

To verify the availability of your extra memory, type in 15384 @ U. and press Enter. This should give 32768 with the additional 16kB memory or 0 with the additional 48kB memory. When some ZX81 types of 32K RAM packs are used the Ace is tricked into thinking it has an extra 16K of RAM but cannot find anywhere to store its return stack. So, it stores the return stack below address 32768. This can result in a system reset if the stacks collide. With these extra Rampack installed after switching on type:

For 32kB    49151 15384 ! QUIT

This will let the Ace know where to put the return stack. These problems do not seem to happen on the Pacer 32kB RAM pack.







Well, you have 880 bytes of dictionary space for your own programs, also in this 880 bytes you will have the data stack and return stack. The PAD can hold 254 bytes, which would make a place to store machine code, but the AceForth words, WORD, LOAD and SAVE would clear any code in those 254 bytes.

736 bytes of screen data can be BLOADed and BSAVEd, this area can be used for data storage if your program does now require the screen. You could create a screen then Bload the screen back saving space by not using up the dictionary space with words to create your screen.

Then there are the 24 additional user definable characters as well as the normal set.

If your not using floating point math's then address 15360 has 19 bytes spare, enough for a small machine code program.

Altogether just under 2K of usable memory if you do not count the user definable keyboard characters. Here is a word that tests for spare dictionary space. It fills the data stack with 1s and stops with an ERROR 1. The variable x keeps a byte count of the 1s found. When you get the ERROR 1 message type x @ 2 * 55 + u. to get the number of byes.
0 variable x
: fill
  0 x !
  begin
    x @ 1+ x !
    257 0
  until
;
32K Free RAM results with FILL
32K results with fill.

3K Free RAM results with FILL
3K results with fill.


As you can see in the screen shot an unexpanded Ace gives 889 free bytes, with a 16k and 32K RAMpacks gives the results 17273 and 33657 bytes.


 
System Variables


Name Hex Address Dec Address Function - Description
FP_WS 3C00 15360
19 bytes used as work space for floating point calculations.
LISTS 3C13 15379
5 bytes used as work space by LIST and EDIT.
RAM 3C18 15384
2 bytes — the first address past the last address in RAM. If you want to set aside some RAM at the top end as not being available for the dictionary and stacks, then store its starting address at RAM and do QUIT. QUIT clears the return stack and starts it off again at the address stored in RAM.
HOLD 3C1A 15386
2 bytes. The address of the latest character held in the pad by formatted output (#, HOLD and so on).
SCRAPS 3C1C 15388
2 bytes. The address of the place in the video RAM where the next character is to be printed (i.e. the print position). The example TAB (Ace manual Chapter 12, Exercise 4) uses this.
INSCRN 3C1E 15390
2 bytes. The address of the start of the current logical line (what I called before a computer line) in the input buffer.
CURSOR 3C20 15392
2 bytes. The address of the cursor in the input buffer.
ENDBUF 3C22 15394
2 bytes. The address of the end of the current logical line in the input buffer.
L_HALF 3C24 15396
2 bytes. The address of the start of the input buffer. The input buffer itself is stored in the video RAM, where you see it.
KEYCOD 3C26 15398
1 byte. The ASCII code of the last key pressed.
KEYCNT 3C27 15399
1 byte. Used by the routine that reads the keyboard.
STATIN 3C28 15400
1 byte. Used by the routine that reads the keyboard.
EXWRCH 3C29 15401
2 bytes. This is normally 0, but it can be changed to allow printing to be sent to some device (e.g. a printer) other than the television screen. EXWRCH must be given the address of a machine code routine to output a character. The character is provided in the A register of the Z80. The output routine should preserve the auxiliary registers, ix and iy, and finish off with exx and ret.
FRAMES 3C2B 15403
4 bytes. These four bytes form a double length integer that counts the time since the Ace was switched on, in 50ths of a second. It can thus be used as a clock. Here are some words to use it.
Warning — if these four bytes ever reach hex FFFFFFFF then the next change, to 00000000, will also affect the system variable XCOORD. Also, note that BEEP and tape operations temporarily stop the frame counter.
XCOORD 3C2F 15407
1 byte. The x-coordinate last used by PLOT. DRAW, in Chapter 13 Ace Manual, exercise 1 uses this to tell it where to start the line.
YCOORD 3C30 15408
1 byte. The y-coordinate last used by PLOT.
CURRENT 3C31 15409
2 bytes. The parameter field address for the vocabulary word of the current vocabulary. See Chapter 22 Ace Manual.
CONTEXT 3C33 15411
2 bytes. The parameter field address for the vocabulary word of the context vocabulary. See Chapter 22 Ace Manual.
VOCLNK 3C35 15413
2 bytes. The address of the fourth byte in the parameter field — the vocabulary linkage — of the vocabulary word of the most recently defined vocabulary. See Chapter 22 Ace Manual.
STKBOT 3C37 15415
2 bytes. The address of the next byte into which anything will be enclosed in the dictionary, i.e. one byte past the present end of the dictionary. HERE is equivalent to 15415 @.
DICT 3C39 15417
2 bytes. The address of the length field in the newest word in the dictionary. If that length field is correctly filled in, then DICT may be 0.
SPARE 3C3B 15419
2 bytes. The address of the first byte past the too of the stack. Note — because of the way @ works, 15419 @ will give the address of the top entry on the stack.
ERR_NO 3C3D 15421
1 byte. This is usually 255, meaning "no error". If ABORT is used, and ERR_NO is between 0 and 127, then "ERROR" will be printed out, followed by the error number ERR_NO.
FLAGS 3C3E 15422
1 byte. Shows the state of various parts of the system, each bit showing whether something particular is happening or not. Some of these may be useful.
Bit 2 (the 4 bit in binary), when 1, shows that there is an incomplete definition at the end of the dictionary. If ABORT is executed, this definition (its address is inferred from DICT) is taken out of the dictionary.
Bit 3 (the 8 bit), when 1, shows that output is to be fed into the input buffer.
Bit 4 (the 16 bit), when 1, shows that the Ace is in invisible mode.
Bit 6 (the 64 bit), when 1, shows that the Ace is in compile mode.
BASE 3C3F 15423
1 byte. The system number base.