Help information for EI.SYS 06 Sep 82 Summary Program name: EI.SYS Programmers name: P.C.Waggett PURPOSE: Emulate EIS instruction set on BIS machines. Language: MACRO Assembler. Operating system: RT-11 Machine dependence: PDP-11 Special devices: None Core store: Driver occupies 2466 Octal bytes. - i - Help information for EI.SYS 06 Sep 82 CONTENTS i . . . . . Summary iii . . . . . 1.0 Introduction iii . . . . . 2.0 Using the Emulator iii . . . . . 3.0 Set options available iii . . . . . 4.0 Operating restrictions iv . . . . . 5.0 Debug aids iv . . . . . 6.0 Programme test iv . . . . . 7.0 Programme Modification - ii - Help information for EI.SYS 06 Sep 82 1.0 Introduction This programme was written to emulate the EIS instructions MUL, DIV, SOB, ASH, ASHC, SXT and XOR on a BIS machine. The driver is available on request from T63B. 2.0 Using the Emulator EI.SYS must be Installed, Loaded and then Set ON. i.e. INS EI ( Should not be required, but may be ) LOA EI SET EI ON The last operation alters the driver name to and the driver cannot be removed until a SET EI OFF is performed. This means that it cannot be unloaded from a programme, or used after loading from a programme. These operations MUST be done from the console. Once this process is complete EIS instructions will be emulated, transparently to the user, by software. Any none emulated instruction will TRAP as usual. 3.0 Set options available Four options are available:- ON.....This enables the driver. It puts the entry address of the driver in the M-TRAP location.(10). OFF.....This disables the driver. It puts the address of the RT-11 Monitor TRAP handling routine in location 10. BIS.....Clear BIT 400 at 370(RMON).Clears the EIS available bit. EIS.....Sets BIT 400 at 370(RMON).Sets the EIS available bit. If try to set EI ON when driver is already set ON, or any other illegal option, the message EI-BAD appears. If try to unload EI when EI is SET ON, the message EI-DEV appears. The driver alters its own name in P$TABLE ( P$TABLE is a monitor RT-11 table) hence if do a SH EI will not be present but Z will be. If do a SH D then EI is present but Z is not. This occurs because SH D lists all SYS files on the system disc. The SH lists all the devices in P$TABLE. 4.0 Operating restrictions The driver emulates all sensible ( and probably all non-sensible) EIS assembler instructions using any combination of registers, including PC and SP. All addressing modes are emulated. No known faults exist. To aid fault finding the driver should be reassembled with DEBUG=1. This enables the programmer to examine each instuction which causes the emulator to be entered and gives some information on the errors in processing. (see 5.0 ). - iii - Help information for EI.SYS 06 Sep 82 5.0 Debug aids (1) A routine (LOOK) is called on entering the driver. This routine looks at bit 15 of the Console switch-register. If this switch is up (SET), the programme loops until the switch is put down, whence programme execution continues. While in waiting loop, register R2 (1777702) contains the instruction the emulator is about to process. After execution the location SAVINS contains the last instruction emulated by the driver. Hence if the driver dies, this location can be examined to see which instruction caused the crash ! (2) Divide by zero or overflow in DIV is detected and a message EI-ABORT is sent to the console. 6.0 Programme test The driver allows programs DCREM, FLTSPC (Compiled with CODE=EIS), RUNOFF etc to run on ALTAIR (11/10). T63B would be interested in other programmes that run/do not run ! on the emulator. Programme size is 2466 Octal Bytes. 7.0 Programme Modification This programme is NOT easy to follow as it is full of self-modifying code ! Hopefully, the comments will enable other programmers to follow the ideosyncratic programming. The option part of the code is especially bad as space was in short supply and every trick to save space was employed !. Similarly in the MAIN emulator. PLEASE do NOT modify the source without first consulting T63B, who will otherwise be VERY annoyed. Any errors found in the program will be remorselessly tracked down and painfully eliminated. - iv -