41C X-Mem data file editor?
|
10-21-2020, 02:13 PM
Post: #1
|
|||
|
|||
41C X-Mem data file editor?
Are there any modules or programs for the 41 that provide a nice interactive data file editor akin to the 41CX text editor? I'm looking for something along the lines of the list editor on the 17BII, 27S, etc. In other words, something that lets you scroll through and view the values in the file, amend, append, insert, or delete registers, and so on.
|
|||
10-21-2020, 02:38 PM
(This post was last modified: 10-21-2020 02:38 PM by Sylvain Cote.)
Post: #2
|
|||
|
|||
RE: 41C X-Mem data file editor?
41CX has ED (Editor) for Extended Memory Text Files.
ZenROM has RAMED (RAM Registers Editor) low level RAM byte editor which does not know anything on how the data is used. AMC/OSX has RAMED, a more powerful alternative to ZenROM RAMED |
|||
10-21-2020, 05:40 PM
Post: #3
|
|||
|
|||
RE: 41C X-Mem data file editor?
(10-21-2020 02:38 PM)Sylvain Cote Wrote: 41CX has ED (Editor) for Extended Memory Text Files. Okay, so nothing really geared toward viewing and editing numeric data files created with CRFLD? I think I could put together something reasonably complete with clever use of PASN, but I don't want to reinvent the wheel if it's already been done. |
|||
10-21-2020, 06:14 PM
Post: #4
|
|||
|
|||
RE: 41C X-Mem data file editor?
I do not think such editor exists on the HP-41 at the moment.
It would be interesting to know more about the use-case. I am not familiar with the existing editors you mention. One thing that springs in my mind is editing numbers, the HP-41 does not allow for this at the moment. Also the display is a bit limited. I try to wrap my idea around how it may look. |
|||
10-21-2020, 07:03 PM
Post: #5
|
|||
|
|||
RE: 41C X-Mem data file editor?
(10-21-2020 06:14 PM)hth Wrote: I do not think such editor exists on the HP-41 at the moment. My use case would be managing a few X-Mem data files where I collect some measurements throughout the day, and may need to quickly review the stored numbers or make corrections later, without a whole lot of manual GETX, SEEKPT, and SAVEX. I'm thinking the editor could work something like this (very similar to the 17BII): Put the filename in alpha, then XEQ "EDD" (for EDit Data) to start the editor. The display would then show 0:XXX, with XXX being the first value in the file, e.g. what you would see if you did 0 SEEKPT, GETX. (Or perhaps I would have the editor start from the current pointer position for the file.) SST and BST (temporarily assigned to global labels via PASN) could be used to go forward or backward through the file, displaying the item index and value in I:XXX format as you go. To replace the value of the item currently displayed, type a new value and press ENTER (also assigned to a global label), which would overwrite the value at the current position, and redisplay the item index and value. Moving "past" the end of the file would show ?:, and entering a value and pressing ENTER would increase the size of the file by 1 register, and append this new value. CLx (Shift Backspace) would delete the current item by moving all following elements up one position, thus overwriting the current register, and reducing the size of the file by 1. Some other shifted key (maybe ISG?) would perform an insert operation, increasing the size of the file by 1, moving the current and following items down by 1, and putting a 0 in the inserted space. RTN would probably jump to the first item, and maybe another key would be assigned to jump to the end of the file for appending new items. R/S would close the editor, and remove all the temporary user key assignments created by the program. I don't think this would be terribly difficult to implement. Maybe I'll take a stab at it if nobody knows of an existing data file editor. |
|||
10-21-2020, 07:56 PM
(This post was last modified: 10-21-2020 08:06 PM by Garth Wilson.)
Post: #6
|
|||
|
|||
RE: 41C X-Mem data file editor?
This is mine, written in the late 1980's. I don't remember why I called it "VV", but it has always been easy for me to remember. Call yours EDD if you like.
Code: ♦LBL "VV" http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, at http://wilsonminesco.com/links.html#hp41 ) |
|||
10-21-2020, 09:42 PM
Post: #7
|
|||
|
|||
RE: 41C X-Mem data file editor?
(10-21-2020 07:56 PM)Garth Wilson Wrote: This is mine, written in the late 1980's. I don't remember why I called it "VV", but it has always been easy for me to remember. Call yours EDD if you like. Thanks, I like the GETKEY idea. Maybe I'll do that instead of all the global labels and PASN stunts. Though it does rule out the intuitive use of Shift-BST to go back a record. Maybe I'll do SST to advance, RCL to go back, and STO to enter a value. |
|||
10-22-2020, 01:39 AM
Post: #8
|
|||
|
|||
RE: 41C X-Mem data file editor?
It's interesting that after all these years, this is a rather obvious application that either was never created, or if it was, never got wide enough distribution that any of the still active members here know about it. More than likely, there is something like this buried in the PPC/CHHU Journal issues, but writing this from scratch may be less work than searching through all that.
For navigating (next record, insert/del record, etc.), I suggest you copy the key assignments (or mappings) from ED, as much of that can be the same; no need to invent something new when those keys are documented right on the device. The key difference is data files can have multiple 'fields' per record, rather than single lines of text, so some clever paradigm for moving 'horizontally' is needed. If each field will be replaced (rather than edited) you could use the [USER] and [PRGM] keys the same way these advance through a text file. --Bob Prosperi |
|||
10-22-2020, 12:49 PM
Post: #9
|
|||
|
|||
RE: 41C X-Mem data file editor?
(10-22-2020 01:39 AM)rprosperi Wrote: It's interesting that after all these years, this is a rather obvious application that either was never created, or if it was, never got wide enough distribution that any of the still active members here know about it. More than likely, there is something like this buried in the PPC/CHHU Journal issues, but writing this from scratch may be less work than searching through all that. That's a good idea regarding the key assignments. I might double up a couple of them by stacking two LBL instructions so that it both mimics the text editor, and also provides more intuitive (in my opinion) bindings for some functions. I think for the data entry function, I'll have the program temporarily PASN a global label to the R/S key and then halt, so that you can XEQ other programs for calculating the new item, and still press R/S to get back to the data file editor. The only caution would be that the other program can't modify the two storage registers that the editor is using, or open a different file. I'm not sure what you mean by multiple fields per record, though. Aren't data files just a linear set of storage registers akin to a 1-column matrix on the 42S? Or is this some more exotic functionality I have yet to discover? |
|||
10-22-2020, 02:41 PM
(This post was last modified: 10-22-2020 02:47 PM by Sylvain Cote.)
Post: #10
|
|||
|
|||
RE: 41C X-Mem data file editor?
Here is an alternative way by reusing ED way of doing things.
Example of key mapping Code: Key mapping interaction description Code: -34 goto record user entry stop, enter record number, then R/S, make it current and show it Focal code that go with it: (the code use key code as numeric label) Code: LBL "XMDE" // Extended Memory Data Editor Code: LBL 90 // unshifted key press handling Code: X<>0? // has a key been pressed ? Code: SF 01 // set shift indicator flag Code: SF 05 // flag to indicate we are processing a shifted key Code: // -------------------------------- Code: LBL 00 // shifted key handler Code: CF 04 // clear key scanning active flag Flag used Code: 01 shift indicator flag Sylvain |
|||
10-22-2020, 04:07 PM
Post: #11
|
|||
|
|||
RE: 41C X-Mem data file editor?
FWIW, there's a Data File Editor in a couple of my modules, it's reproduced below in case it helps.
SF 08 to edit, CF 08 to review. File Name in ALPHA Code: 01 LBL "DFED" Cheers, ÁM "To live or die by your own sword one must first learn to wield it aptly." |
|||
10-22-2020, 04:33 PM
Post: #12
|
|||
|
|||
RE: 41C X-Mem data file editor?
(10-21-2020 06:14 PM)hth Wrote: One thing that springs in my mind is editing numbers, the HP-41 does not allow for this at the moment. Also the display is a bit limited. I try to wrap my idea around how it may look. Tell me about it, I had to create one from the scratch for the ^IM<) function in the 41Z (to input the imaginary part of the complex value), a real bear... "To live or die by your own sword one must first learn to wield it aptly." |
|||
10-22-2020, 05:45 PM
Post: #13
|
|||
|
|||
RE: 41C X-Mem data file editor?
Perhaps utlizing the DM41X might provide at least a multi-line display to reveal more data at one time?
Jake |
|||
10-22-2020, 05:46 PM
(This post was last modified: 10-22-2020 05:47 PM by rprosperi.)
Post: #14
|
|||
|
|||
RE: 41C X-Mem data file editor?
(10-22-2020 12:49 PM)Dave Britten Wrote: I'm not sure what you mean by multiple fields per record, though. Aren't data files just a linear set of storage registers akin to a 1-column matrix on the 42S? Or is this some more exotic functionality I have yet to discover? Sorry, brain fart - I was using the 71B's data files recently, which support this. Not relevant for 41 files and confusing the issue, ignore this. I should have known Angel would have one of these, though I''m not familiar so it must be in some of his modules I don't regularly use. Note that the non-std (i.e. not built into 41CX) WORKFL command near the end is included in the 41X. --Bob Prosperi |
|||
10-22-2020, 07:19 PM
(This post was last modified: 10-22-2020 07:20 PM by Dave Britten.)
Post: #15
|
|||
|
|||
RE: 41C X-Mem data file editor?
(10-22-2020 05:46 PM)rprosperi Wrote:(10-22-2020 12:49 PM)Dave Britten Wrote: I'm not sure what you mean by multiple fields per record, though. Aren't data files just a linear set of storage registers akin to a 1-column matrix on the 42S? Or is this some more exotic functionality I have yet to discover? I was suspecting that might have been a 71B thing. Haven't had the privilege of playing with one myself. WORKFL returns the name of the current working file, right? Here's a rough draft of my editor so far, in case anybody wants to try it out. There's still plenty of room for code optimization. To use it, put the name of a data file in alpha, and XEQ "EDD". Note that this uses the AIP function from the Advantage module. The screen will show something like 0:0.0000, which is the item position (i.e. what you would get from RCLPT), followed by the value of that item. Keys: SST - Next item RCL or Shift + BST - Previous item STO - Input item Shift + LBL - Insert item at the current position (new item defaults to 0) Shift + CLx - Delete item at current position ON or Backspace - Exit editor To enter data, either move to the item you wish to replace, or move past the end of the file, where "NEW" is displayed, and press STO. The program will stop, allowing you to enter/calculate a value. Press R/S to save the item's new value. You can execute any functions or programs here, as long as they don't modify registers 00 or 01, or open a different extended memory file. There is a temporary user key assignment made to R/S so as long as USER mode is on, R/S will continue in EDD regardless of any other programs you've executed (and left the program pointer sitting in). If USER mode gets turned off, R/S will still work as long as the program pointer hasn't been moved from its location in EDD. The temporary key assignment will be removed when the program is resumed. Inserting and deleting is fairly simple. Just use SST/RCL to move to the item you want to delete, or the position where you want to insert a new record, and press the appropriate key. When deleting, items following the selected item are moved to one position earlier in the file, and the file is shortened by one register. When inserting, the file size will be increased by one register, and the current and all following items will be moved down one position, leaving a 0 in the newly vacated position. You can then press STO to enter a value for the inserted item. I'll probably add a "total" function that sums up all the items in the file, similar to the 17BII list editor. EDD.zip (Size: 415 bytes / Downloads: 5) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)