HP41CX - Naive' question - "Current File"
|
12-16-2022, 04:42 PM
Post: #1
|
|||
|
|||
HP41CX - Naive' question - "Current File"
Hi:
In working with the Extended Memory in the HP41CX, there are references to the 'current file'. How does one ensure that there is not a current file selected/enabled? I have studied both Vol1 and Vol2 manuals and the only reference I see to 'no current file' is after a 'PURFL' command is executed. On a related question - how does one query the machine for what is the 'current file'. Thank you, TomC |
|||
12-16-2022, 07:00 PM
(This post was last modified: 12-16-2022 07:00 PM by Sylvain Cote.)
Post: #2
|
|||
|
|||
RE: HP41CX - Naive' question - "Current File"
To my knowledge, the CX nor the XF module have a function that returns the current/working XM file.
Some of Ángel modules adds the WORKFL function that does what you are searching for. See: (XMTW) XMEM Twin Manual or (XMXF) XMEM X-Functions Manual. |
|||
12-16-2022, 07:56 PM
Post: #3
|
|||
|
|||
RE: HP41CX - Naive' question - "Current File"
Thank you Sylvain!!!
Happy Holidays!!! TomC (12-16-2022 07:00 PM)Sylvain Cote Wrote: To my knowledge, the CX nor the XF module have a function that returns the current/working XM file. |
|||
12-16-2022, 09:09 PM
Post: #4
|
|||
|
|||
RE: HP41CX - Naive' question - "Current File"
IIRC, using FLSIZE (or maybe GETSUB?) on a filename which does not exist sets the 'current file' to some undefined state (so probably close to what you're looking for) rather than falling back to the previously current file. At least this is easy to check...
--Bob Prosperi |
|||
12-16-2022, 11:35 PM
(This post was last modified: 12-17-2022 01:25 PM by Gene.)
Post: #5
|
|||
|
|||
RE: HP41CX - Naive' question - "Current File"
NOTE: DO NOT use this code if your extended functions plug-in module is version 1B. This can be see by doing a CAT 2 when plugged into your HP-41.
If you have a version later than 1B, such as 1C, etc. OR if you are using an HP-41CX or DM-41, then the code below is safe. If you use RCLPT and there is no working file, the message "FL NOT FOUND" is displayed. In a program, this code: LBL 01 SF 25 RCLPT FS? 25 This step is executed if there is no current file. Is that what you need ? Gene |
|||
12-17-2022, 09:33 AM
Post: #6
|
|||
|
|||
RE: HP41CX - Naive' question - "Current File"
(12-16-2022 11:35 PM)Gene Wrote: If you use RCLPT and there is no working file, the message "FL NOT FOUND" is displayed. I'm surprised nobody seem to remember that it's dangerous to have no working file with the Extended Functions module 1B. From the Ext-Fcn manual Addendum 82180-90026, April 82 (not on Eric's site, but can be found elsewhere ...): "After a file in extended memory is purged, there is no working file. [...] you should always define a working file before executing functions that operate on it; otherwise, all files in extended memory will be lost". The above code is risky. J-F (still using an Ext-Fcn 1B on my 41CV) |
|||
12-17-2022, 01:14 PM
Post: #7
|
|||
|
|||
RE: HP41CX - Naive' question - "Current File"
(12-17-2022 09:33 AM)J-F Garnier Wrote: I'm surprised nobody seem to remember that it's dangerous to have no working file with the Extended Functions module 1B. Thanks J-F, I certainly did not recall this particular warning's effects, but it may be because of this effect that I recalled some functions can leave it undefined?? Was this bug fixed in the 1C version included in the CX, or did they simply add the warning into the User Manual (no longer requiring an addendum)? --Bob Prosperi |
|||
12-17-2022, 03:15 PM
(This post was last modified: 12-17-2022 03:44 PM by J-F Garnier.)
Post: #8
|
|||
|
|||
RE: HP41CX - Naive' question - "Current File"
I believe (but that I don't really remember) that it have been fixed in the revision 1C of the module for the 41C/CV, and so in the 2D revision of the 41CX X-F too.
This also applies to the other bugs of revision 1B, see the addendum, sorry I can't put a link due to TAR (That Archaic Rule). The reason I remember so well the 1B bugs is that I was a bit disappointed when I bought the expensive X-F module at the time and discovered the addendum inserted with the manual. Such bugs for such an expensive module... J-F |
|||
12-17-2022, 03:20 PM
(This post was last modified: 12-17-2022 03:29 PM by Sylvain Cote.)
Post: #9
|
|||
|
|||
RE: HP41CX - Naive' question - "Current File"
(12-17-2022 01:14 PM)rprosperi Wrote: Thanks J-F, I certainly did not recall this particular warning's effects, but it may be because of this effect that I recalled some functions can leave it undefined??Easy to test. Validate that XM is empty Code: EMDIR → "DIR EMPTY" Create a bunch of text files in XM Code: 10 Validate that XM is not empty Code: EMDIR → "ABC A010" Select a XM file and add data to it Code: 0 Delete a XM file and append a record without a XM selected file Code: "DEF" Using a 41CV with XF 1B Code: EMDIR → "DIR EMPTY" Using a 41CX with XF 2D Code: EMDIR → "ABC A010" Edit: (12-17-2022 03:15 PM)J-F Garnier Wrote: I believe (but that I don't really remember) that it have been fixed in the revision 1C of the module for the 41C/CV, and so in the 2D revision of the 41CX X-F too.Unfortunately, I am not able to test the 1C, all my XFM modules are 1B (~10 modules). Thank you Jean-François for reminding us of this bug and also why, as a rule, I was always using one of the SEEK function before using a XM data/text file. |
|||
12-17-2022, 03:33 PM
Post: #10
|
|||
|
|||
RE: HP41CX - Naive' question - "Current File" | |||
12-17-2022, 03:49 PM
(This post was last modified: 12-17-2022 10:07 PM by J-F Garnier.)
Post: #11
|
|||
|
|||
RE: HP41CX - Naive' question - "Current File"
(12-17-2022 03:20 PM)Sylvain Cote Wrote: Unfortunately, I am not able to test the 1C, all my XFM modules are 1B (~10 modules). Really, something missing in your collection? Edit: Actually, the revision 1A did exist too but is probably much harder to find. J-F |
|||
12-18-2022, 02:41 PM
Post: #12
|
|||
|
|||
RE: HP41CX - Naive' question - "Current File"
(12-17-2022 03:49 PM)J-F Garnier Wrote:However hard I try, I have learned to live with the fact that my collection will never be complete.(12-17-2022 03:20 PM)Sylvain Cote Wrote: Unfortunately, I am not able to test the 1C, all my XFM modules are 1B (~10 modules).Really, something missing in your collection? Sylvain |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)