MCODE (NoV-32): Odd behaviour - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: MCODE (NoV-32): Odd behaviour (/thread-137238.html) |
MCODE (NoV-32): Odd behaviour - Geir Isene - 05-15-2008 In the task of making bank switching on the NoV-32 automatic, I have the following code in Page #B (last HEPAX RAM page) on both of the 16K memory banks:
04E C=0 ALL
The code works, but it has one (and only one) odd side effect: It messes up my key assignments. Why?
Re: MCODE (NoV-32): Odd behaviour - Eric Smith - 05-15-2008 I don't know why that would affect key assignments, but it's possible that I (or someone else) might have a better idea of what's going on if you explained what the code is supposed to do. I don't really understand how writing to the code memory helps to make bank switching automatic.
The usual approach to bank switching is to have switching routines near the end of the page, just below the poll vectors, and code that needs to know which vector is active would normally look at the ROM ID words, which should be different in each bank.
Re: MCODE (NoV-32): Odd behaviour - Geir Isene - 05-16-2008 The code simply writes to the address h4100 to swap the two memory banks/blocks of the NoV-32. I do this manyally (through HEXEDIT) all the time. I wanted to have the possibility to switch to the other block from within a user code program.
Re: MCODE (NoV-32): Odd behaviour - Raymond Del Tondo - 05-16-2008 Hi,
are you sure it is the ML code above which messes up your KA,
What happens if you insert a STOP into your FOCAL program, Other idea: Is #0FF the suitable constant? I thought it was #111... One more: Does your FOCAL program reside in one of the simulated HEPAX RAM pages?
And another one (to Diego): Could it be a side effect of the switching itself?
Raymond
Re: MCODE (NoV-32): Odd behaviour - Diego Diaz - 05-16-2008 Hi all, First, (not because of its importance but just in order to make things clear): the *only* meaningful bit into NoV-32's RAM block selection word (@ H'4100) is the *Less Significant Bit*. So ANY odd word will turn Block #1 (one) ON, and ANY even word will turn Block #0 (zero) ON. The H'0FF stored after power on is just a reminiscent of the debugging process and could be replaced by H'001. I'm serously thinking in replacing it in the next version of NoV's code to avoid further confusion. The fact is that NoV-32's Block swapping method was conceived with the idea of being achieved by keyboard input thru HEXEDIT (or any other software able of a WRITE s&x (H'040) instruction) residing *into* NoV-32's internal Flash ROM. (Note you cannot write into NoV-32's RAM from an external module!) In the user's guide (not accurate regarding the overall process though), it was recommended to power cycle the HP-41 after block swapping. Apart from that, the only effect of swaping RAM Blocks is that one chip is powered OFF while the other is powered ON. I can't see no side effect form this into user memory registers (where key assignments are stored). However, some actions may be taken by MF code depending on the contents of the polling points in the actived block. Are these polling points all "zeroed"? Please keep me/us informed of any other relevant info that may concern this issue. I'm now working in the NoV-64 code which deals with four chips *swapping*, and also handles the config word @ H'4100 both to manage RAM (4x16k) and ROM (3x16k) blocks; so I'm the most interested in acquiring as much info as possible on this subject. Best regards from the Canary Islands.
Diego.
Re: MCODE (NoV-32): Odd behaviour - Geir Isene - 05-16-2008 Quote:I made the above code as an MCODE routine I call BS (Black Switch). I have not yet used it in a FOCAL program, only tried it directly from the keyboard - so no, there is noe external interference.
Quote:
This I didn't get. MF? And which polling points?
Re: MCODE (NoV-32): Odd behaviour - Raymond Del Tondo - 05-16-2008 MF: Main Frame
Effectively these locations contain either zero (000/NOP)
For more details please take a look into the SDK41 manual;-)
Re: MCODE (NoV-32): Odd behaviour - DavidMY - 05-16-2008 Geir:
Good luck David
Re: MCODE (NoV-32): Odd behaviour - Diego Diaz - 05-16-2008 Thanks Raymond, I couldn't have said it better... ;-) David, you've just remembered me a good teacher I had, he used to repeat about 10 times an hour: "PUSH registers, always PUSH registers into the stack before you CALL *anywhere*... even phoning your girlfriend!". He was not very good making jokes... but certainly a very good teacher. Cheers
Diego.
|