Post Reply 
Updated 41Z : Deluxe Edition available
03-14-2017, 06:22 PM
Post: #35
RE: Updated 41Z : Deluxe Edition available
(03-14-2017 06:13 AM)Ángel Martin Wrote:  
(03-14-2017 05:24 AM)hth Wrote:  HP does this, and it is not for sure that the calculator goes to sleep before running a poll vector.

I have never run into an issue with the current status (i.e. without the additional "assurance" on the secondary banks) - not on V41, i41CX, all the standard machines, and of course the CL. I too was under the impression that the Cold Start or deep sleep will do that as well, but yes I've seen that done on the 41 Advantage - maybe due to the type of chip they used for that module?

Moreover, all throughout the code there are numerous locations where I haven't been all that rigorous switching back to the main bank - like after an error condition (Data Error, NonExistent, OutOfRange). This doesn't seem to have an adverse effect, the machine is back to the main bank regardless - which should confirm the Deep Sleep assumption.

Calling an error exit routine from a bank other than 1 will leave the current bank active. In most cases the error is displayed and the calculator goes to light sleep, resetting to bank 1.

However, if flag 25 is set (keep going on error), and you are in a running program, you will carry on with the secondary bank active. Calling a routine in such ROM will cause a NONEXISTENT error as the FAT is no longer visible (as soon as flag 25 is clear).

Regarding the poll vector table. HP resets to bank 1 here, but on second thought that seems a bit overkill to me. If you manage to leave the wrong bank up, you will most likely run into an error not being able to find a routine in the FAT, stop any execution and everything goes back to normal, with a mysterious NONEXISTENT message. Trying to switch the bank back in the poll vector routine will very seldom help to prevent this.

The 41CX ROM resets to bank 1 as part of its poll vector routine, but that only affect page 5. 41CV and 41C does not do this, but they do not have any secondary banks in page 5 either.

My conclusion is that you should never exit back to mainframe without switching back to bank 1 first. Furthermore, you also should reset to bank 1 before going to an error exit routine from a secondary bank, as otherwise this will leave a trap if flag 25 is set in a program. Any poll vector area in a secondary bank can just be filled with NOPs.

Håkan
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread



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