Post Reply 
The never-released HP-72S / HP-74S - the successors of the HP-71B
05-28-2021, 09:04 AM
Post: #25
RE: The never-released HP-72S / HP-74S - the successors of the HP-71B
(05-27-2021 01:55 PM)Alejandro Paz(Germany) Wrote:  But I have a question regarding these routines to extend the stack: RSTK<R and R<RSTK, they extend the stack lets say from 8 to 24, adding up to 16 levels. Do you see any benefit from implementing a deeper stack and avoiding these routines ? (one would have to skip over these long gosubs/very long gosubs (4 levels needs ~63 opcodes).

Yes, the Saturn hardware stack is very limited: 8 levels, one of them used for interrupts. The HP71 OS had to save levels with these RSTK<R and R<RSTK routines, still stack overflow (i.e. lost of a return address) was the cause of several bugs of the 1BBBB and HPIL:1A versions in special conditions. In many places there was few or no spare levels and it was difficult to check all the special cases and paths (error, exception, ...).

Still now when developing new LEX, ensuring no stack level lost is a major concern. For instance, functions can only use 4 return levels, and it's easy to reach this limit when calling system routines, thus requiring to save levels at the right points.

So yes, having a deeper hardware stack would be very welcome.
Actually, Emu71/DOS already emulates a 64-level stack, although it is not used at the moment, it ensures that "Memory Lost" conditions due to stack overflow will no more occur.
Emu71/DOS also implements the R5-R7 registers, that are not existing in the real Saturn but that are allowed by the opcode coding structure.
The hypothetical Titan X enhanced CPU would have implement these improvements, and other ...

Ultimately, this could allow us (me?) to build the 72S/74S ROM with these enhancements.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: The never-released HP-72S / HP-74S - the successors of the HP-71B - J-F Garnier - 05-28-2021 09:04 AM



User(s) browsing this thread: 1 Guest(s)