|Re: 41 User Memory vs System Memory|
Message #3 Posted by Eric Smith on 29 June 2012, 1:45 a.m.,
in response to message #1 by Gerry Schultz
I don't like (or particularly even understand) their use of the terms "user memory" and "system memory".
The Nut architecture has two address spaces, ROM of up to 64K 10-bit words, and RAM of up to 1024 56-bit words.
The ROM is divided into 16 4K pages, of which originally pages 0-2 were the mainframe ROM, 3 was reserved for possible expansion, 4 was reserved for the factory diagnostic ROM, 5-6 were reserved, and 7 was reserved for the printer ROM. Pages 8-F were allocated in groups of two to the four expansion ports. Later page 5 was allocated to the Time Module, page 6 to HP-IL mass storage and control, and in the 41CX, page 3 to CX extended functions. Also at around the time of the CX bank-switched ROMs were introduced.
While HP never offered any products that use the ROM address space for anything but actual ROM, there were third-party offerings such as MLDLs and the HEPAX that put RAM or EPROM into the ROM address space. As far as the normal 41 firmware is concerned, though, it still acts like ROM.
The RAM has a fixed address space with no bank switching, however, at any given time at most one block of 16 registers is selected. This is because when the RAM select instruction is given, there are some access instructions that will read or write that specific address (one register), and others that can read or write any address within the same block of 16 registers.
000-00f status registers (stack, ALPHA, etc.)
010-03f nonexistent (010 MUST!) select 010 to deselect all RAM
040-0bf extended functions module (built-in for 41CX)
0c0-0ff base 41C memory
100-1ff up to 4 memory modules, or 1 quad mem (built-in for 41CV, CX)
200 nonexistent (MUST!)
201-2ef extended memory module
301-3ef extended memory module
3f0-3ff nonexistent (MUST!)
Locations 010 and 3f0-3ff MUST be nonexistent because there are code sequences in the ROMs that depend on all RAMs deselecting when these addresess are selected. In particular, it is common to select a peripheral chip at an address such as fd by loading the C register with 3fd then doing a RAM select and a peripheral select. The peripheral only uses 8 bits of address, so it ignores the "3" in the "3fd".
Location 200 MUST be nonexistent to prevent the mainframe ROM from believing that there is normal memory at 200 and above. This would cause problems because the code was not written to deal with it, so for example there are not enough bits in compiled GTO and XEQ instructions to deal with larger main memory.
In principle there is no reason why locations 2f0-2ff and 300 couldn't be used, but since the same extended memory module is addressed in the 2xx or 3xx range depending on which port it is installed into, they left those locations out.
The RAM chips only use 10 bits of address, so generally it is not possible to use addresses above 3ff.