MCODE: NoV-32: WROM/WRITE S&X/040 to address 4100



#7

I have an MCODE program that will switch between the two memory banks of my NoV-32 by writing either h0FF or h000 into the address 4100. According to the David Assembler manual, I can use WRITE S&X (called WROM on the overlay [SHIFT+SIN]) - the opcode being h040 - but it doesn't work - it freezes the calc (the display goes blank except for the USER annunciator). Pointers anyone?


#8

Hi,

you're simply sewing the wood branch you're sitting on;-)

I assume your code resides somewhere in the NoVRAM,

and then you switch it away while running it...

Workaround: Use a dock location which doesn't switch,

or switch using a FOCAL program.

HTH

Raymond


#9

Quote:
Hi,

you're simply sewing the wood branch you're sitting on;-)

I assume your code resides somewhere in the NoVRAM,

and then you switch it away while running it...


Ah, obviously. Thanks.

Quote:
Workaround: Use a dock location which doesn't switch,


How do I do this?

Quote:
or switch using a FOCAL program.

... and how could this be done?


#10

A principal solution was posted by 'DavidMY' here,

I'd like to add the following:

AFAIK the DA doesn't include a command to write to ROM in batch mode,

as the ASSM keyword always invokes the interactive assembly mode.

Maybe he meant the 'Assembler 3' ROM, which includes keywords

for writing to Pseudo-ROM devices (like X>ROM or similar).

But you could easily write your own ROM which could include the suitable keyword(s).

Given you have a copy of your ROM in both banks,

this keyword can then be called from a FOCAL program.

HTH

Raymond


#11

Of course you are right Raymond. While typing my comment I was looking up at the shelf with my 41 documentation and my manual for the David Assembler was right next to my CCD manual. And, of course, it's the CCD rom that has peek and poke. In my defense I haven't done any 41 code for a while [actually quite a while] due to my real job designing and installing office networks.

Come to think, I can't even remember if the various peek and poke commands in several roms allow poking to Rom addresses [and since I'm on a job I can't check a manual]. Writing an mcode routine to poke the address and mapping to the same address in both banks is probably the best way.

#12

Geir:
To access the memory location from a user program (i.e. FOCAL) you would need to have available the "poke" command. The David Assembler should have it available. Of course, if you have the above loaded into the NoV32 rather than the actual module you will need the code in BOTH banks in the same [virtual] port.

Traditionally, when paging was done for a CPU that didn't support this action with CPU hardware registers and didn't have "fixed" external memory locations the trick was to locate the "switch" code at the same memory location in both banks.

Actually, this trick is already used with the 41: if you follow the bank switch code for the HexPac module you will see that the same location (at the end of the module's space) is called to overlay the rom banks.

So, if you want to use an exclusively machine coded solution (and assuming your machine code routine starts at 6100h in the first bank --place the same code in the second bank at 6100h. Since the code--after--the instruction loading the 4000h location is the same the routine finishes and returns.

Done correctly [test the 4000h location first] and you can have a routine that acts as a toggle.

Also, note that because the return stack is part of the CPU registers you will return to the same address in either bank, but the code THERE doesn't need to be the same.

DavidMY


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP-41 Clonix&NoV's SW Update. (For the non-Primer's guys out there... :-) Diego Diaz 21 703 11-13-2013, 09:00 AM
Last Post: Ángel Martin
  RPL 32 David Hayden 4 240 11-11-2013, 11:34 AM
Last Post: David Hayden
  HP-41 MCODE: The Last Function - at last! Ángel Martin 0 138 11-08-2013, 05:11 AM
Last Post: Ángel Martin
  Where to the 32-bit version of User Code Utiltiy for HP-41 ? Olivier (Wa) 2 157 09-26-2013, 01:55 AM
Last Post: Olivier (Wa)
  Last HP emulation, 32 & 01 Olivier De Smet 0 137 09-07-2013, 08:27 AM
Last Post: Olivier De Smet
  New website address for Meindert Kuipers' MLDL2000? Garth Wilson 2 171 08-11-2013, 01:43 PM
Last Post: Meindert Kuipers
  HP41 Functions Address Table (F.A.T.) Antoine M. Couëtte 6 279 07-21-2013, 02:48 AM
Last Post: Antoine M. Couëtte
  41-MCODE: Auto XEQ+ALPHA possible? Ángel Martin 5 256 05-29-2013, 06:15 AM
Last Post: Ángel Martin
  HP 41 Mcode related Questions Michael Fehlhammer 4 234 05-10-2013, 07:09 PM
Last Post: Michael Fehlhammer
  HP-41CL & NoV(-64): Race condition? Geir Isene 11 534 05-03-2013, 01:59 PM
Last Post: Diego Diaz

Forum Jump: