Post Reply 
Saving the state of HP41 CL to PC
12-28-2017, 07:23 AM (This post was last modified: 12-28-2017 07:34 AM by Ángel Martin.)
Post: #11
RE: Saving the state of HP41 CL to PC
(12-28-2017 03:46 AM)PeterP Wrote:  Thanks Monte! This is super helpful. [deletedTwo] Four quick questions:
  1. Which events/functions clear the RAM page at 0x800?
  2. Do I need to save the page 804 as well or does page 800 include all the modules loaded correctly when saved?
  3. The XPMM module from Angel provides the functions "YWALL" / "YRALL" to store everything into Flash 0x1FE and 0x1FF. While certainly not as easy to use as it requires Lib#4 and OSX and XPMM, I wanted to know if there are any other risks/objections to using this function?
  4. If these functions are not objectionable, would it be possible to add them to the YFNZ module so that one always has the ability to restore to a nice state from a ML condition and batteries out?


Thank you for your kind help!

YWALL and YRALL are also in the PowerCL_Extreme, and except the Library#4, they don't have any additional dependency but the YFNX itself. They are short FOCAL programs BTW, see the listing below:

Code:
1    LBL "YWALL"
2    "1FE000"
3    AVIEW
4    FC? 49
5    YFERASE
6    "800>1FE"
7    AVIEW
8    YFWR
9    FC? 01
10    GTO 02
11    "1FF000"
12    FC? 49
13    YFERASE
14    "804>1FF"
15    YFWR
16    GTO 02
17    LBL "YRALL"
18    "1FE>800"
19    AVIEW
20    YMCPY
21    "1FF>804"
22    AVIEW
23    FS? 01
24    YMCPY
25    LBL 02
26    "DONE"
27    END

They use FLASH blocks at 0x1FE and 0x1FF for a back-up of the bottom RAM pages 0x800 and 0x804 respectively. As far as I know those locations are still available in the "official" CL flash map.

The main restriction is that they assume the top flash sector (from 0x1F8 to 0x1FF) is eraseable by 4k blocks, and not as a complete sector like all others. I understand this has had some variations in the different versions of the CL boards, so you'll need to make sure this is the case in yours. The functions assume versions V3 or V4 by default.

The FLASH? function in the YUPS module tells you which type of CL board you have as to that behavior, see the CL Update Functions manual, pages 15 & 16.

User Flag 01 is used to control whether to include block 804 in the backup: FI Set includes it, F1 Clear excludes it. This is where the MMU "meta-data" and other CL-configuration details are included, I always include it.

As always, make sure your batteries are fresh before you write to flash!

Cheers,
ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Saving the state of HP41 CL to PC - PeterP - 12-27-2017, 11:30 PM
RE: Saving the state of HP41 CL to PC - Ángel Martin - 12-28-2017 07:23 AM



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