- Top Stats

Top Posters Top Topic Starters Top Topics
TFM 514
ComSoft612... 287
Gryzor 282
Targhan 174
Ast 160
ComSoft612... 29
TFM 17
arnoldemu 15
Gryzor 12
Devilmarku... 11
BBS software /... - 560851 Views Octoate 21:00, 23 March 10
Arkos Tracker - 31731 Views Targhan 16:56, 20 February 10
SID tracker / ... - 26252 Views BSC 14:35, 05 November 13
SymbOS CPC upd... - 21553 Views Prodatron 00:18, 11 October 16
X-Mass Application - 20253 Views Ast 16:18, 04 March 16

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

0 Members and 1 Guest are viewing this topic.

Offline litwr

  • CPC664
  • ***
  • Posts: 149
  • Country: ru
    • lidovski's www page
  • Liked: 122
Re: SamaruX - Unix-like shell for CP/M
« Reply #25 on: 17:32, 07 November 16 »
Clear knows three tty types currently:
- vt52
- vt100 or ansi
- ascii
But it's extremely easy to add more.
Anyway, as far as I know, MSX systems use a VT52 like terminal emulation (as Amstrad CPC / PCW do). If that's the case, just include this line in your profile.sx file:
env TERM vt52
I am using Amstrad CPC! :) I have a suggestion.  Try to detect Amstrad hardware at startup time.  Put this info into a system type byte.  This byte maybe used by CLEAR to detect a terminal type.  Amstrad CPC uses only two CP/M variants: 2.2 and 3. The same CP/M 3 is used by  Amstrad PCW.  Make a favor for the Amstrad users. :)
I am a bit disappointed by absence of redirections for CP/M commands.  It looks like step back for CP/M 3 and MSX-DOS.  I can repeat MSX-DOS and CP/M+ have built-in redirections.  MSX-DOS supports even >>.
Anyway, thanks for the nice project.  :)

Offline qbert

  • CPC664
  • ***
  • Posts: 73
  • Country: fr
  • CPC 464 FR Qwerty
  • Liked: 7
Re: SamaruX - Unix-like shell for CP/M
« Reply #26 on: 19:12, 19 December 16 »
Wow that's very impressive!!
Did you implement Piping with temporary files?

Quote from: litwr
CP/M+  also has redirections but misses pipes. [...]

Hello there,
Sorry to insist on that point but, as litwr mentionned, "vanilla" CPM+ aldready had redirections for any executable command/program (not only the ones offering dedicated arguments) by using the prefix redirection commands named GET and PUT. If not implemented in RAM, piping by temporary ".$$$" files was easily done for any program. The well-named PIP(e) command was also useful here for merging pipes from multiples inputs.

here it is from the 1984 manual :

 GET {CONSOLE INPUT FROM} FILE filespec options
 GET directs the system to take console input from a file for the next system
 command or user program entered at the console.

 PUT CONSOLE {OUTPUT TO} FILE filespec {option}
 PUT PRINTER {OUTPUT TO} FILE filespec {option}
 PUT puts console or printer output to a file for the next command entered
at the console, until the program terminates. Then console output reverts
to the console. Printer output is directed to a file until the program
terminates. Then printer output is put back to the printer.
 PUT with the SYSTEM option directs all subsequent console/printer
output to the specified file. This option terminates when you enter the
 PUT Options;
 Option Function
 ECHO Specifies that output is echoed to the console. This is the default
option when you direct console output to a file.
 NO ECHO Specifies that file output is not echoed to the console. NO ECHO
is the default for the PUT PRINTER command.
 FILTER Specifies filtering of control characters, which means that control
characters are translated to printable characters. For example, an
 ESCape character is translated to ^[.
 NO FILTER Means that PUT does not translate control characters. This is
the default option.

 PUT Options:
 Option Function
 SYSTEM Specifies that system output and program output are written to the
file specified by filespec. Output is written to the file until a
subsequent PUT CONSOLE command redirects console output
back to the console.
« Last Edit: 20:30, 19 December 16 by qbert »