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.

FloppySoftware


I'm happy to announce a new release of SamaruX, my Unix-like shell for CP/M.


You will find the binaries, C source code and documentation for the new v2.07 in my GitHub repository:


https://github.com/MiguelVis/samarux


Its website is here:


http://floppysoftware.es/samarux.html?path=cpm_projects|samarux
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

GUNHED

Looks good. But why to reinvent the wheel? We have all of that and more in the ZCPR System. You may know Z3Plus for CP/M Plus. If not ... it's really worth taking a look at it.


Oh, there's nothing on youtube  :o :o :o
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

FloppySoftware

Quote from: GUNHED on 12:00, 23 September 21
Looks good. But why to reinvent the wheel? We have all of that and more in the ZCPR System. You may know Z3Plus for CP/M Plus. If not ... it's really worth taking a look at it.


Oh, there's nothing on youtube  :o :o :o


The obvious reply could be: why not?


But I know ZCPR and the goal is totally different compared to SamaruX.

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

norecess464

#3
I looked at your website, it looks nice.

I'm curious, do you program everything on the real machine ? I noticed you were using SmallC + your own text editor..
My personal website: https://norecess.cpcscene.net
My current project is Sonic GX, a remake of Sonic the Hedgehog for the awesome Amstrad GX-4000 game console!

GeoffB17

Interesting.

I've downloaded the SX.COM and this works on my (enhanced) PCW, but it does very little.   I guess that I need to download the various *.sx files?   Get them one by one?

Not clear what I need for basic functionality

The benefit of this system is that it runs on top of CP/M, and does not need any mods to the system.  The ZCPR (etc) systems need to replace the existing CP/M I understand?

I use the HiSoft ED80 text editor, which works well, I'll see how this operated within this process?

Thanks.

Geoff

FloppySoftware

Quote from: norecess on 18:21, 23 September 21
I looked at your website, it looks nice.

I'm curious, do you program everything on the real machine ? I noticed you were using SmallC + your own text editor..


I use some generic CP/M emulators and a real Amstrad PCW when the day-by-day life permits.


When I'm in a hurry I use a fast command line CP/M emulator.

Anyway, I learned something very recently about emulators.


All of them emulate the cpu, right?


But some of them emulate also the BDOS functions while others run the real BDOS from Digital Research.

Well, trust in emulators running the real BDOS, not in the others.


I had an issue with the result from the BDOS function that returns the size of a file.


According to a on-line documentation that function returns a code in the A register.


The emulator with an emulated BDOS followed that convention.

My program followed that convention.


My program failed with a real BDOS. What?!


I read the original CP/M manuals from Digital Research.


Of course, the real BDOS was right, the on-line documentation was wrong and also the emulator.


That BDOS function did not return anything in A register in CP/M v2. It does in v3.


So, I use emulators but prefer the real OS and even better the real machine with the real OS.








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

FloppySoftware

Quote from: GeoffB17 on 19:10, 23 September 21
Interesting.

I've downloaded the SX.COM and this works on my (enhanced) PCW, but it does very little.   I guess that I need to download the various *.sx files?   Get them one by one?

Not clear what I need for basic functionality

The benefit of this system is that it runs on top of CP/M, and does not need any mods to the system.  The ZCPR (etc) systems need to replace the existing CP/M I understand?

I use the HiSoft ED80 text editor, which works well, I'll see how this operated within this process?

Thanks.

Geoff


This SX.COM release have some internal (built-in) commands but a lot are external.


Just write "builtin" and SamaruX will tell you which are.

The external commands have the ".x" extension.


The files with the ".sx" extension are batch commands, a sort of SUBMIT or shell scripts.


It's very easy to build a SX.COM with every command as internal, just by modifying the SX.C file.


I will include another SX binary like that asap.
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

GeoffB17

Hello,

Thanks for the extra info.

No problem with the commands being external, I assume it's the usual trade off between performance and TPA size.

I downloaded the SX.COM OK, but the other files don't have a visible d/l option - or am I missing something?   I'd like to get the *.x and the *.sx for now.   A better batch system would be useful.

Performance may well not be an issue if everything is loading of one of the uIDE drives?

Geoff

GUNHED

Quote from: GeoffB17 on 19:10, 23 September 21
The benefit of this system is that it runs on top of CP/M, and does not need any mods to the system.  The ZCPR (etc) systems need to replace the existing CP/M I understand?
No, for CP/M Plus just start JETLDR.COM to get Z3Plus up. It will replace CCP and BDOS automatically and you have a wonderland. But this should be discussed in another thread.

Back to SamaruX. Looks like the key features are the Unix like appearance.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

GeoffB17

Furrther playing...

Now determined that it's the .sx files that don't have an option to download, but the .x files will do so.   I'll assume that the text files have the problem, any binary ones will download OK?

Copied through some of the .x files, and thied how things operate.   Things seem to work OK with C: and J:, so no problems with the uIDE etc.  Certainly seem faster with the uIDE than direct floppy.   Both seem OK though.

Tried to get the redirect to work.   Tried ls c0: >m0:dir.txt and this seemed to try to do what it was supposed to do, no result appeared on the screen, but I get an Error - Bad File Name message.

Also tried cpm ed80 test.txt which correctly went into ed80, all fine, but on exit while test.txt was created I got a prompt showing
sx -r profrst.sx which is nothing that I'd entered - maybe this is a temp bat file that the cpm process has created?   But should it show in this way?

Anyway, looking VERY interesting.   Useful to be able to mix the 'unix' and the cpm commands.

More playing...

Geoff

GUNHED

Maybe it could be a good idea to make DSK files for PcW and CPC.
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

FloppySoftware

Quote from: GeoffB17 on 21:08, 23 September 21
Hello,

Thanks for the extra info.

No problem with the commands being external, I assume it's the usual trade off between performance and TPA size.

I downloaded the SX.COM OK, but the other files don't have a visible d/l option - or am I missing something?   I'd like to get the *.x and the *.sx for now.   A better batch system would be useful.

Performance may well not be an issue if everything is loading of one of the uIDE drives?

Geoff


You can download the entire repository, there is a button for that in GitHub.
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

FloppySoftware

Quote from: GeoffB17 on 23:45, 23 September 21
Furrther playing...

Now determined that it's the .sx files that don't have an option to download, but the .x files will do so.   I'll assume that the text files have the problem, any binary ones will download OK?

Copied through some of the .x files, and thied how things operate.   Things seem to work OK with C: and J:, so no problems with the uIDE etc.  Certainly seem faster with the uIDE than direct floppy.   Both seem OK though.

Tried to get the redirect to work.   Tried ls c0: >m0:dir.txt and this seemed to try to do what it was supposed to do, no result appeared on the screen, but I get an Error - Bad File Name message.

Also tried cpm ed80 test.txt which correctly went into ed80, all fine, but on exit while test.txt was created I got a prompt showing
sx -r profrst.sx which is nothing that I'd entered - maybe this is a temp bat file that the cpm process has created?   But should it show in this way?

Anyway, looking VERY interesting.   Useful to be able to mix the 'unix' and the cpm commands.

More playing...

Geoff


You must type one or more spaces between the redirection symbol (< > >> |):


ls *:txt > files.lst


Regarding profrst.sx, is the expected behaviour. SamaruX try to save the current state before running a CP/M command in that file.  It's a batch file interpreted when returning to SamaruX.


Anyway there are some limitations / issues as CP/M does not provide a good BDOS "running another program and comeback".


Under CP/M 2 there is the $$$.SUB trick that does not work well and under CP/M 3 we have BDOS fn Chain to program but it have its own issues as well.


By the way, Samarux has a manual.txt extracted from the samarux.man file.


But in the shell you can run the man command to get help.


For the man command itself:


man man


For - ie the cat command:


man cat


Or the man topics list:


man | more


Have fun.




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

FloppySoftware

Quote from: GUNHED on 23:38, 23 September 21

Back to SamaruX. Looks like the key features are the Unix like appearance.  :)


Unix-like behaviour.


Another one is being able to execute just a SamaruX command directly from the CP/M CCP like:


A>SX LS -AL *.TXT | MORE


For the rest RTFM if you are really interested.  :P :P



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

m_dr_m

Amazing project and very neat site.
Piping and scripting, wow!


Does it have auto-completion like Symbos shell?


By the way, how does MESCC compare with SDCC and LLVM-Z80?

FloppySoftware

Quote from: m_dr_m on 13:30, 29 September 21
Amazing project and very neat site.
Piping and scripting, wow!


Does it have auto-completion like Symbos shell?


By the way, how does MESCC compare with SDCC and LLVM-Z80?


The shell does not have autocompletion yet. It will.


MESCC is a derived native Small C compiler, so it compares really bad with crosscompilers but does the job.
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

GUNHED

Quote from: FloppySoftware on 06:33, 24 September 21
For the rest RTFM if you are really interested.  :P :P
It's always a great idea to Read The FutureOS Manual.  ;D
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

DoctorCPC

your Amstrad PCW projects are great. i shared this links at turkish Retro Computers forums. and i will share this information at my CPCUserClub web site. really great Amstrad PCW projects. I love Amstrad CPC, Amstrad PCW and Amstrad NC
My Amstrad Products: Amstrad CPC 464, Amstrad CPC 6128, Schneider CPC 6128, Amstrad NC 100, Amstrad HiFi EX330, Amstrad Fidelity CKX100 Music Keyboard, Amstrad Penpad 600, Amstrad Emailer Plus, Amstrad E3 Emailer, Amstrad VCR Programmable Remote Control, Amstrad DVD/Divx Player, Amstrad GT 65, Schneider CTM640

CPC Hardware: USIFACII, M4Wifi, ZMEM, MotherX4, GOTEK, PS2 Mouse Adapter, RSF3 (Soon), DES Mini (Soon)
PCW Hardware: GOTEK, PCWIO, uIDE (Soon), uRTC (Soon)

Editor-In-Chief / ACUC Magazine - Amstrad CPC User Club Magazine (Soon)
www.dizzyradio.com  / Amstrad CPC, Commodore 64, Amiga and Other Home Computer's Musics
www.cpcuserclub.com / +90 555 498 36 55 for adding WhatsApp Group

FloppySoftware

Quote from: DoctorCPC on 07:42, 30 September 21
your Amstrad PCW projects are great. i shared this links at turkish Retro Computers forums. and i will share this information at my CPCUserClub web site. really great Amstrad PCW projects. I love Amstrad CPC, Amstrad PCW and Amstrad NC


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

FloppySoftware

Quote from: GUNHED on 21:13, 29 September 21
It's always a great idea to Read The FutureOS Manual.  ;D


Of course everything goes around your OS.  :picard:
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

GUNHED

Quote from: FloppySoftware on 08:35, 30 September 21

Of course everything goes around your OS.  :picard:


Do you have any kind of humor? If not please don't tell me RTFM, because that's offensive.


Actually I posted here a bit, because I wanted to support your work. But your behaviour is not acceptable. So for future do your stuff alone.
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

FloppySoftware

Quote from: GUNHED on 13:06, 30 September 21

Do you have any kind of humor? If not please don't tell me RTFM, because that's offensive.


Actually I posted here a bit, because I wanted to support your work. But your behaviour is not acceptable. So for future do your stuff alone.


Oh, sorry then, it was not my aim to offense anyone.


Anyway we know each other even if you were using another nickname some time ago.


So don't tell me anything about bad behaviour.
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

GUNHED

Sorry accepted. BTW: Yes, I had another nickname back the day. I got banned for using "RTFM". But now it's today. Let's do things better.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

redbox

Quote from: GUNHED on 17:16, 30 September 21Sorry accepted

Whats the german for "gall"?  As in "I can't believe the gall of this guy"?  Frechheit?

BSC

Seems like the new version "TFM" is asking for a second ban! Here comes FloppySoftware, telling us about his awesome project, which is actually useful, mind you! And also along comes inescapable "TFM", spitting his useless gibberish and insulting the OP for his own lack of humour. Please give us a break!  :picard2:
** My SID player/tracker AYAY Kaeppttn! on github **  Some CPC music and experiments ** Other music ** More music on scenestream (former nectarine) ** Some shaders ** Some Soundtrakker tunes ** Some tunes in Javascript

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

Powered by SMFPacks Menu Editor Mod