Author Topic: SamaruX: Unix-like shell for CP/M.  (Read 912 times)

0 Members and 1 Guest are viewing this topic.

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 261
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
    • Awards
SamaruX: Unix-like shell for CP/M.
« on: 01:06, 23 September 21 »

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
like
0
No reactions
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.828
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #1 on: 14: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
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 261
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #2 on: 15:22, 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.

like
0
No reactions
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline norecess

  • CPC6128
  • ****
  • Posts: 264
  • Country: ca
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #3 on: 20: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..
« Last Edit: 20:57, 23 September 21 by norecess »
like
0
No reactions

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 805
  • Country: gb
  • PCW since '85, more CP/M than Loco
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #4 on: 21: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
like
0
No reactions

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 261
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #5 on: 22:38, 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.








like
0
No reactions
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 261
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #6 on: 22:44, 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.
like
0
No reactions
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 805
  • Country: gb
  • PCW since '85, more CP/M than Loco
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #7 on: 23: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
like
0
No reactions

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.828
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #8 on: 01:38, 24 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.  :)
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 805
  • Country: gb
  • PCW since '85, more CP/M than Loco
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #9 on: 01:45, 24 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
like
0
No reactions

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.828
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #10 on: 01:46, 24 September 21 »
Maybe it could be a good idea to make DSK files for PcW and CPC.
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 261
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #11 on: 08:10, 24 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.
like
0
No reactions
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 261
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #12 on: 08:27, 24 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 (< > >> |):


Code: [Select]
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:


Code: [Select]
man man

For - ie the cat command:


Code: [Select]
man cat

Or the man topics list:


Code: [Select]
man | more

Have fun.




like
0
No reactions
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 261
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #13 on: 08:33, 24 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:


Code: [Select]
A>SX LS -AL *.TXT | MORE

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



like
0
No reactions
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Online m_dr_m

  • 464 Plus
  • *****
  • Posts: 300
  • Country: gb
  • http://orgams.wikidot.com/
    • OrgaMS!
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #14 on: 15: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?
like
0
No reactions

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 261
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #15 on: 20:15, 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.
like
0
No reactions
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.828
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #16 on: 23:13, 29 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
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline DoctorCPC

  • CPC664
  • ***
  • Posts: 63
  • Country: tr
  • CPC464 & CPC6128
    • My Blog
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #17 on: 09: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
like
0
No reactions

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 261
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #18 on: 10:32, 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!
like
0
No reactions
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 261
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #19 on: 10:35, 30 September 21 »
It's always a great idea to Read The FutureOS Manual.  ;D


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

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.828
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #20 on: 15:06, 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.
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 261
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #21 on: 15:21, 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.
like
0
No reactions
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.828
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #22 on: 19:16, 30 September 21 »
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.  :)
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline redbox

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.793
  • Country: gb
    • redbox
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #23 on: 19:28, 30 September 21 »
Sorry accepted

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

Offline BSC

  • 464 Plus
  • *****
  • Posts: 352
  • Country: de
  • CPC 464 aspirant
    • my (Android) mobile game
    • Awards
Re: SamaruX: Unix-like shell for CP/M.
« Reply #24 on: 19:53, 30 September 21 »
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: