Shell environment and ELF

The Shell is a command line user interface implemented for OZ 5.0. It provides an environment for binary execution with a fully access to all OZ services. The Shell is a good application, multiple instances can be suspend or revived at any time. Some commands are internal, integrated in the application : exit, cd, pwd, cls. The external commands are binaries. By default, basic commands have been implemented. They are stored in the internal file area (:EPR.0/bin/). Those commands manipulates :

  • filesystem : ls, rm, cp, mv, mkdir, rmdir
  • process : ps, kill, cli
  • tools  : mw, dz, crc32, readelf, uname
  • help : man

    Example screenshots :

The execution environment follows the ELF specification like in many modern Unix operating systems. A specific API has been developed to interface with ELF standard : GN_Elf. This general user interface call does all the magic to open, allocate memory and handles, load binary segments, execute, release resources and close the ELF file. This is performed by using the ELF low-level interface DC_Elf and DC_Rte. GN_Elf allows arguments to be passed to the executable. They are passed via the stack, following the SDCC convention. Binary executables can be written in C language and compiled with the SDCC compiler suite (with a modified crt0.s loader). They are actually limited to 56K and will be unlimited in a near future.

Preliminary relocatable Z80 machine code is implemented. ELF allocates memory from any free pages available. This powerful feature allows several instances of Shell running on an unexpanded 32K machine.

web analytics