How to alphabetically sort an alpha XM-file (HP-41)



#7

What is the best, most efficient way of alphabetically sorting an ascii exended memory file on the HP-41?


#8

Have you tried the SORTFL function of the CCD module?


#9

Good tip. Don't have the CCD (waiting for it). I would however need a routine that doesn't use functions outside a standard HP-41CX (to make my upcomming PDA program usable for most people).

#10

It seems the SORTFL function only sort data registers in XM.


#11

That's right, SORTFL can only deal w/ data files (or matrix files if you've changed its file type previously). ASCII files are trickier in that each record can have multiple "registers" (7-words each), thus the file type change trick won't work in this case.

No substitute to plain old RPN programming in this case, or so it looks.

Best,

ÁM


#12

Excuse my ignorance: Matrix files, what's that?


#13

Geir Isene posted:
"Excuse my ignorance: Matrix files, what's that? "

    They're files created by the Advantage ROM, which can directly create and use matrices stored in extended memory. This way you use no numeric registers at all to store matrices, greatly simplifying most matricial programs.

    In some cases your program can run even using no numeric registers at all (and no 'synthetic' registers M,N, etc., either), this is, even with SIZE 000. See my 62-line, SIZE 000 Nth-degree Polynomial Fit program featured in my Datafile article Long Live the Advantage ROM !

Best regards from V.
#14

Here we go (sorts only ascii files with records of max 24 characters - that's all I need for the "HP-41: The Reminder"-program):

001 *LBL "FLSORT"
002 LBL 01
003 0
004 SEEKPT
005 SF 25
006 GETREC
007 SF 05
008 FC? 25
009 GTO 03
010 SF 25
011 LBL 02
012 ASTO 05
013 GETREC
014 FC? 25
015 GTO 03
016 5
017 ENTER
018 ASTO X
019 X>NN?
020 GTO 02
021 CF 05
022 DELREC
023 RCLPT
024 1
025 -
026 SEEKPT
027 INSREC
028 1
029 +
030 SEEKPT
031 GTO 02
032 LBL 03
033 FC?C 05
034 GTO 01
035 CLA
036 CLST
037 SEEKPT
038 END

Edited: 4 Feb 2006, 3:02 a.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP-41(CL): The easiest way to transfer FOCAL programs from a Linux PC to the HP-41 Geir Isene 13 3,345 12-05-2013, 02:40 AM
Last Post: Hans Brueggemann
  Cannot delete file Les Koller 4 1,229 11-07-2013, 12:17 AM
Last Post: Les Koller
  File Format: hpprgm Thomas Chrapkiewicz 6 1,597 10-30-2013, 09:32 PM
Last Post: Thomas Chrapkiewicz
  HP-Prime File extension Paul D. Fox 6 1,375 10-07-2013, 01:45 AM
Last Post: cyrille de Brébisson
  Rearanging the "Fixed" sort order of Prime's Apps icons Joe Horn 3 1,026 10-02-2013, 10:24 AM
Last Post: Han
  go71b 'lexs' or 'raws' file format? Christoph Giesselink 2 872 08-21-2013, 02:53 AM
Last Post: Christoph Giesselink
  How do you print a 'data' file on the HP 71B to the HP 2225B thinkjet? Geoff Quickfall 3 1,078 08-18-2013, 04:32 PM
Last Post: Geoff Quickfall
  WP-34S: Alpha lock Marcel Samek 15 2,627 07-08-2013, 08:23 AM
Last Post: Reth
  How to use XnView to create .gro4 file as in OpenFire? arturfeghali 2 876 06-27-2013, 05:57 PM
Last Post: jerome ibanes
  41CL :TROUBLE IN FILE TRANsFER aurelio 22 3,941 06-18-2013, 03:44 PM
Last Post: aurelio

Forum Jump: