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

0 Members and 1 Guest are viewing this topic.

Offline litwr

  • CPC6128
  • ****
  • Posts: 169
  • Country: ru
    • lidovski's www page
  • Liked: 134
  • Likes Given: 137
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 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
  • Likes Given: 37
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 »