When ExtRamConfig is On, why isn't the external RAM automatically allocated?
When I set RamSize using Register.RamStart, the correct amounts show up in the .map file; when the RAM is enabled only--but the size is not set--extra bytes are not added.
Just curious what physically happens inside the device when the RAM is enabled, but no size is defined.
By the way, the 1281e is a very cool device. Its power is quite amazing given the ease of use. [Of course, it can't compete with something like a dsPIC in performance, and it's not trying to, but dang, its peripherals are so much faster to use for almost anything not extremely demanding.]
1281e RAM allocation
Re: 1281e RAM allocation
When the ZX-1281e begins running after reset, it scans the RAM space to try to determine how much RAM is available. Once the RAM size is determined, the value of Register.RAMSize is set. You should be able to see this using the following simple program. Try running it with the RAM daughter card installed and not installed.pjc30943 wrote:When ExtRamConfig is On, why isn't the external RAM automatically allocated?
Code: Select all
Sub Main()
Debug.Print "RAM Size = "; CStr(Register.RAMSize)
End Sub
Note that 'Option RAMSize' simply tells the compiler how much RAM is available so that it can warn you if you define too many variables. The compiler has no way of knowing if you have the RAM daughter card installed or not - that's why you have to help it out.pjc30943 wrote:When I set RamSize using Register.RamStart, the correct amounts show up in the .map file; when the RAM is enabled only--but the size is not set--extra bytes are not added.
Unless you specifically limit the amount of external RAM, the maximum amount is made available. It is not particularly useful on the ZX-1281e to restrict the amount of external RAM. In contrast, on the ZX-1281 you might want to do that in order to use the upper address lines for digital I/O.pjc30943 wrote:Just curious what physically happens inside the device when the RAM is enabled, but no size is defined.
- Don Kinzer