ISX - An ISIS-II emulator
Browsing through the CP/M unofficial pages I found an interesting piece of software: an ISIS-II emulator for the CP/M operating system. In case you are too young to know it (or too old to remember it), ISIS-II was an early operating system released by Intel for the MDS series of development machines. Much of the CP/M was actually developed using ISIS, many of the utilities were written in PL/M, and compiled under ISIS.
I wanted to get this historical curiosity running on the P112.
Exact file sizes
In constrast with CP/M 2.2, ISIS-II supports file sizes with byte resolution, and so does the ISX emulator. How it was done? A disassembly of the emulator shows that the disk subsystem is based on the vanilla CP/M 2.2 BDOS; minor changes were done so the BDOS size could stay the same. The exact file size support is similar in principle to what both CP/M 3.0 and DOS+ 2.5 do, but there are differences:
The CP/M 3.0 and DOS+ 2.5 way:
The ISX way:
There is a SETEOF utility included with the emulator, which is used to adjust the size of CP/M text files before they can be used by ISIS utilities. Here is what it does:
You will probably notice that this is not the best way to determine where a text file ends: the method might fail for text files that have been SAVEd, since there are chances that an extra record is appended (the SAVE command has a 2-record resolution). Also, some text editors might not fill the remainder of the record with ^Z characters, as SETEOF expects. A better way would be to scan the text file from the very beginning until the first ^Z is encountered. However, the SETEOF method is faster and will work for files that have been EDited.
Text files created by ISIS programs will have the size field setup correctly; SETEOF does not need to be called for such files unless you edit them under CP/M.
SETEOF requires a CP/M system using the same modified BDOS that the ISX emulator susbsystem uses. Therefore, it will not work under the standard CP/M or a Z-system.
The ISX command line processor is based on the standard CP/M CCP. There are the familiar DIR, ERA, TYPE and REN commands, but USER is missing: it was replaced by a DBUG command, which can be used to trace the execution of ISIS system calls. The new command apparently was intended for debugging the ISX emulator itself, according to the amount and type of information it provides, but it can be useful when debugging ISIS programs or just to see what they are doing.
In response to the DBUG command, the emulator asks for a "trace level". As response it will only accept a string of ones (111...) terminated by a CR, or a single hash (#). Anything else will cause the prompt to be displayed again. The more ones you enter, the more detailed trace dump you will get (think of the 1's as some sort of bit mask), but only the first 5 ones entered are meaningful. To disable tracing, just hit Enter (CR) when prompted for the trace level. The hash character is used when debugging ISX under DDT, SID or a similar program; it forces the emulator to break into the debugger via RST 7. Don't use it without a debugger, or your system will hang.
The trace dump format is easier to understand with an example. The following is the output for the ISIS READ function:
003: 261E READ 464B (44A3) 000:0002 81 X0100. E00 U00 R03 C00 L80 @3600 B0003 ,00 001:465D-> 002:A3A2 003:4518-> 004:45B4-> 465D=1902 4518=0180 45B4=0000
The first line shows, from left to right:
003: - ISIS function code (contents of C register) 261E - address of the handling routine in the DOS subsystem READ - ISIS function name 464B - address of function argument block (contents of DE register) (44A3) - where this routine was called from (address of CALL instruction in the user program)
Then, the function arguments will follow, one per line, in the form:
000: - argument number, count starts at 0 0002 - argument value, followed by a -> if the argument is a pointer. In this example, the first argument to the READ system call is a file descriptor, and the dump of the corresponding ISX structure is output next: 81 - file descriptor flags; bits are in the form ufffffwr, where: u = 'in use' bit (1 = fd used, 0 = fd is free) fffff = associated internal FCB number w = 'write' mode bit r = 'read' mode bit note that both r and w bits can be set at the same time X0100. - file name and extension E00 - FCB extent value U00 - FCB s1 value (unused bytes count) R03 - FCB rc value C00 - FCB cr value L80 - FCB r0 value @3600 - I/O buffer address B0003 - number of records ,00 - last record byte count
Additionally, the contents of one or more I/O buffers may be displayed, depending on the current trace level. Finally, the word value referenced by every pointer in the function call is shown in the form addr=value:
465D=1902 4518=0180 45B4=0000
The ISIS operating system defines 15 functions, they are:
Under the emulator you can use either the ISIS-II or CP/M notation when specifying disks and device names in the command line. Thus, :F0: and A: are the same thing, CON: and :CO: are equivalent, etc. (see table below). That is valid at least for CP/M-style commands like DIR, ERA and REN. ISIS-II utilities will typically allow only ISIS-style names.
The device handling routines expect IOBYTE support in the BIOS. For some devices, the ISX emulator changes the IOBYTE assignment before calling the BDOS handling routine, and restores it afterwards:
Running the emulator
Necessary system modifications:
The disassembled ISX 1.4 can be found in the downloads area. There you'll find also a bootable 3.5" floppy disk image with a working copy of ISX. The system uses a 60K CP/M with a modified BIOS whose data area is located above F900h.
There are several SUBMIT files included with the emulator to aid with compilation (ISIS-II command lines can get really long):
IC.SUB - ISIS Compile (PL/M-80 source to ISIS executable)
Note that by default the PL/M compiler stores intermediate files in :F1: (disk B: in the CP/M world), so your P112 should have a second drive connected, and a disk with enough free space on it.
Last updated: 10-Feb-2007