News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_FloppySoftware

SamaruX: Unix-like shell for CP/M.

Started by FloppySoftware, 23:06, 22 September 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GeoffB17

#25
Still playing with this.   Still very interesting, I'm sure it will have a number of uses.

I've now d/l most of the external commands (*.x) files, but had to do them one-by-one.   Not a big deal.

Wondered what the df (disk free) command would do with the uIDE system, there's a problem here.   Not a big deal, but still.

df c: d: e: f:  gives:

c: 1588KB  (12704 recs)
d: 5396KB (-22363 recs)
e: 8136KB (-449 recs)
f: 4196KB ((-31968 recs)

The bytes free figures are OK, the records free numbers are not - I think a signed integer should be a long int?   Will be OK for PCW std floppy disks of course.  Correction, a standard int, but unsigned, would be just enough!

Tried the ls -l command on my c: drive, which has quite a few files on.   Took a long time, but produced a nice listing.   Sorted, which no doubt added to the time.   Interesting to see that the listing shows actual file sizes, i.e. not based on block size, so a number of files that would normally have all been 4k showed as 1k, 2k or 3k.   Maybe this added to the time taken as well?

LOTS more playing to do yet.


Thanks.

Geoff

FloppySoftware

#26
Quote from: GeoffB17 on 17:59, 01 October 21
Wondered what the df (disk free) command would do with the uIDE system, there's a problem here.   Not a big deal, but still.

df c: d: e: f:  gives:

c: 1588KB  (12704 recs)
d: 5396KB (-22363 recs)
e: 8136KB (-449 recs)
f: 4196KB ((-31968 recs)

The bytes free figures are OK, the records free numbers are not - I think a signed integer should be a long int?   Will be OK for PCW std floppy disks of course.  Correction, a standard int, but unsigned, would be just enough!


My fault. I'm using %d instead of %u in printf:


unsigned int recs;


...


printf("%c: %4d KB (%5d recs.) free\n", 'A' + drv, recs / 8, recs);



I have fixed the issue and uploaded a new df.x command file to the repository.

By the way, I have uploaded today to the repository another build of SamaruX with every command as built-in: SX2.COM.

Thanks for checking and reporting!



floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

GeoffB17

Thanks for this.

I've just got the new version of df.x, and yes, this looks much better.

I just now guess that if I'd thought about it, I could have tried to 'patch' your original file.   I assume that the code for printf is in the main module, and df.x has just the template as in effect text, so if I used a binary editor I could have changed the %d to %u, assuming the overall process doesn't include any sort of chk.

I note you say you've done SX2, but I'll not bother with that as I'm using the uIDE (so the external commands load fine) and I'm more intersted in experimenting with using cpm xxx commands so I'd rather keep SX smaller.

Did you ever see the WHM (Write Hand Man) system, which has a similar structure although with a different basis.   here there's a memory resident main module which provides a pop-up menu for the 'external' options.   Again, this works much better via the uIDE system, even more so as some options create/edit small data files (editor, diary, etc) and normally the resultant file would be on M: and you need to remember to save the files to disk - this is not necessary with the uIDE!

Geoff

Powered by SMFPacks Menu Editor Mod