alloc.h 08/07/87 1522.0rew 08/07/87 1439.1 11079 /* BEGIN INCLUDE FILE alloc.h */ /* HISTORY COMMENTS: 1) change(86-07-04,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. END HISTORY COMMENTS */ /* FUNCTION Defines the necessary structures for wsalloc, a memory allocation scheme written for MOWSE. */ /* NOTES This is essentially a copy of the allocation scheme described in K&R, page 173. */ #define ALLOCH 1 typedef int ALIGN; /* force alignment */ union header { /* free block header */ struct { union header *ptr; /* next free block */ unsigned size; /* size of this free block */ } s; ALIGN x; /* force alignment of blocks */ }; typedef union header HEADER; struct allocstr { int memory_used; /* non-zero, if all memory used */ int memory_size; /* size of memory block */ char *memory; /* pointer to memory block */ HEADER m_base; /* base free block header */ HEADER *m_allocp; /* last allocated block */ }; /* END INCLUDE FILE alloc.h */   asmdefs.mac 08/07/87 1522.5rew 08/07/87 1456.5 24489 ;/* BEGIN INCLUDE FILE: asmdefs.mac */ ; HISTORY COMMENTS: ; 1) change(86-09-16,Lee), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; History comments, include comments ; END HISTORY COMMENTS ;--------------Buffer Sizes--------------- BUFSIZE = 4096 ;4k general buffer size TBUFSIZE = 4096 ;4k terminal buffer size PBUFSIZE = 520 ;packet_buf size = a little over 512,just in case ;--------------ASCII codes---------------- LF = 0Ah ;line feed CR = 0dh ;carridge return ESC = 1bh ;escape SOP = 01h ;Start of packet EOP = 0Ah ;End of Packet TAB = 09h ;Tab character ;--------------BIOS calls------------------ RS232 = 14h ;RS232 Service kbd_io = 16h ;Keyboard service ;--------------INS8250 ACE Registers----------- THR = 3f8h ;trans holding register RBR = 3f8h ;Receiver buffer register(read) IER = 3f9h ;Interrupt enable register LCR = 3fbh ;Line control register ;bit 7 of LCR is DLAB. DLAB must ;be zero to acces THR. RBR, IER. IIR = 3fah ;Interrupt identification register MCR = 3fch ;Modem control register LSR = 3fdh ;Line status register MSR = 3feh ;Modem status register ;------------- structure holding parameters for initialising com 1 commparm record baud:3, parity:2, stopbits:1, wordbits:2 ;--------------Baud rates------------------------------ ; see tech reference manual on rs232 B110 = 000b ; 110 b150 = 001b ; 150 B300 = 010b ; 300 B600 = 011b ; 600 B1200 = 100b ; 1200 B2400 = 101b ; 2400 B4800 = 110b ; 4800 B9600 = 111b ; 9600 ;--------------Parity----------- no_parity = 00b odd_parity = 01b even_parity = 11b ;--------------Stop bits------------- stop1 = 0 stop2 = 1 ;--------------Data bits------------- data7 = 10b data8 = 11b ;/* END INCLUDE FILE asmdefs.mac */   cat.h 08/07/87 1522.0rew 08/07/87 1439.3 21663 /* BEGIN INCLUDE FILE: cat.h */ /* HISTORY COMMENTS: 1) change(86-06-15,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. 2) change(86-09-04,Flegel), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Changed sleep time to int (long is too compiler dependent) END HISTORY COMMENTS */ /* FUNCTION: Defines the structures of the local and remote capability address tables. Equivalent include file cat.mac */ #ifndef CAPABILITY_NAME_LENGTH #include "ws.h" #endif #ifndef MCB_DEFINED #include "ws_mcb.h" #endif #define RESET_BIT 01 /* Reset state of application */ #define SUSPENDED_BIT 02 /* Suspended state ... */ #define SLEEPING_BIT 04 /* Sleeping state ... */ #define WAITING_BIT 010 /* Waiting state ... */ #define NULL_BIT 020 /* No application entry */ /* Remote CAT table structure element */ typedef struct remote_cat_struct { char major_capability; /* CAT index of capability */ char system_id; /* System id field */ char capability_name[CAPABILITY_NAME_LENGTH]; /* Name of capability */ char flags; /* State of capability */ } remote_cat; /* Local CAT table structure element */ typedef struct local_cat_struct { struct local_cat_struct *next_cat; /* Next capability sleeping */ char flags; /* State of capability */ char pad; /* to avoid alignment problems */ long sleep_time; /* Awakening time of capability */ struct SREGS sregs; /* Capabilities segment registers */ union REGS regs; /* Capabilities registers */ short bpreg; /* BasePtr register */ short spreg; /* StackPtr register */ int (*ws_entry)(); /* Entry point of capability action */ short waitreg; /* Wait register */ mcb *mcb_ptr; /* MCB of capability */ } local_cat; /* END INCLUDE FILE: cat.h */  cat.mac 08/07/87 1522.5rew 08/07/87 1455.8 16551 ;/* BEGIN INCLUDE FILE: cat.mac */ ; HISTORY COMMENTS: ; 1) change(86-06-15,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; 2) change(86-09-04,Flegel), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Changed sleep_time to one word to match with ; "int" type in 'C'. ; END HISTORY COMMENTS ;/* FUNCTION: ; ;Defines the structure of the remote Capability Address Table and the structure ;of the local Capability Address Table. Equivalent include file cat.h ; ;*/ RESET_BIT = 01 ; Reset state of application SUSPENDED_BIT = 02 ; Suspended state ... SLEEPING_BIT = 04 ; Sleeping state ... WAITING_BIT = 010 ; Waiting state ... NULL_BIT = 020 ; No application entry ; Remote cat structure, for definition refer to cat.h remote_cat struc major_capability db ? system_id db ? capability_name db CAPABILITY_NAME_LENGTH dup(?) rcflags db ? remote_cat ends ; Local cat structure, for definition refer to cat.h local_cat struc next_cat dw ? lcflags db ? pad db ? ; to avoid alignment problems sleep_time dd ? esreg dw ? csreg dw ? ssreg dw ? dsreg dw ? axreg dw ? bxreg dw ? cxreg dw ? dxreg dw ? sireg dw ? direg dw ? bpreg dw ? spreg dw ? ws_entry dw ? waitreg dw ? mcb_ptr dw ? local_cat ends ;/* END INCLUDE FILE: cat.mac */  dos.mac 08/07/87 1522.5rew 08/07/87 1243.7 25200 .XLIST PAGE 58,132 ;** ; ; This macro library defines the operating environment for the 8086 S ; memory model, which allows 64Kbytes of data and 64Kbytes of program. ; ;** MSDOS EQU 2 ;** ; ; The following symbols define the 8086 memory mode being used. Set LPROG ; to 1 for a large program segment (greater than 64K-bytes), and set LDATA ; to 1 for a large data segment. Set COM to 1 to generate .COM files ; instead of .EXE files. Note that if COM is not zero, then LPROG and ; LDATA must be 0. ; ;** COM EQU 0 LPROG EQU 0 LDATA EQU 0 ;** ; ; The following symbols are established via LPROG and LDATA as follows: ; ; S8086 set for small model (small prog, small data) ; D8086 set for model with large data, small prog ; P8086 set for model with large prog, small data ; L8086 set for large model ; ;** IF (LPROG EQ 0) AND (LDATA EQ 0) S8086 EQU 1 D8086 EQU 0 P8086 EQU 0 L8086 EQU 0 ENDIF IF (LPROG EQ 0) AND (LDATA NE 0) S8086 EQU 0 D8086 EQU 1 P8086 EQU 0 L8086 EQU 0 ENDIF IF (LPROG NE 0) AND (LDATA EQ 0) S8086 EQU 0 D8086 EQU 0 P8086 EQU 1 L8086 EQU 0 ENDIF IF (LPROG NE 0) AND (LDATA NE 0) S8086 EQU 0 D8086 EQU 0 P8086 EQU 0 L8086 EQU 1 ENDIF ;** ; ; The DSEG and PSEG macros are defined to generate the appropriate GROUP ; and SEGMENT statements for the memory model being used. The ENDDS and ; ENDPS macros are then used to end the segments. ; ;** DSEG MACRO DGROUP GROUP DATA DATA SEGMENT WORD PUBLIC 'DATA' ASSUME DS:DGROUP ENDM ENDDS MACRO DATA ENDS ENDM IF S8086 PSEG MACRO PGROUP GROUP PROG PROG SEGMENT BYTE PUBLIC 'PROG' ASSUME CS:PGROUP ENDM ENDPS MACRO PROG ENDS ENDM ENDIF IF D8086 PSEG MACRO CGROUP GROUP CODE CODE SEGMENT BYTE PUBLIC 'CODE' ASSUME CS:CGROUP ENDM ENDPS MACRO CODE ENDS ENDM ENDIF IF P8086 PSEG MACRO _CODE SEGMENT BYTE ASSUME CS:_CODE ENDM ENDPS MACRO _CODE ENDS ENDM ENDIF IF L8086 PSEG MACRO _PROG SEGMENT BYTE ASSUME CS:_PROG ENDM ENDPS MACRO _PROG ENDS ENDM ENDIF ;** ; ; The BEGIN and ENTRY macros establish appropriate function entry points ; depending on whether NEAR or FAR program addressing is being used. The ; only difference between the two is that BEGIN generates a PROC operation ; to start a segment. ; BEGIN MACRO NAME ; begin a function PUBLIC NAME IF LPROG NAME PROC FAR ELSE NAME PROC NEAR ENDIF ENDM ENTRY MACRO NAME PUBLIC NAME IF LPROG NAME LABEL FAR ELSE NAME LABEL NEAR ENDIF ENDM ;** ; ; The following symbols are defined to help set up a STRUC defining the ; stack frame: ; ; CPSIZE -> code pointer size (2 or 4) ; DPSIZE -> data pointer size (2 or 4) ; ; These wouldn't be necessary if it were possible to use macros or even ; conditionals within a STRUC. ; IF LPROG CPSIZE EQU 4 ELSE CPSIZE EQU 2 ENDIF IF LDATA DPSIZE EQU 4 ELSE DPSIZE EQU 2 ENDIF .LIST  emulator.h 08/07/87 1522.0rew 08/07/87 1439.1 19593 /* BEGIN INCLUDE FILE: emulator.h */ /* HISTORY COMMENTS: 1) change(86-09-01,Lee), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. 2) change(86-12-04,Flegel), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Added DELAY_INTERVAL constant. END HISTORY COMMENTS */ /* FUNCTION: Define values and modes used by the MOWSE terminal emulator */ #define DELAY_INTERVAL 300 /* Waste time loop count */ #define DEL_LINE 512 /* key value defined for deleting */ /* a line */ #define KB_BUFFERSIZE 1024 /* size of keyboard buffer */ #define KB_STACKSIZE 1024 /* size of keyboard stack (should */ /* be same as keyboard buffer) */ #define KB_TABSIZE 10 /* default tab size used by emulator */ /* keyboard display modes */ #define ASCII_ONLY 0 /* flag meaning display only printable chars */ #define NON_ASCII_OCTAL 1 /* flag - non printable chars displayed as octal */ #define ANY_CHAR 2 /* flag - display all characters */ #ifndef TRUE /* define TRUE if not already defined */ #define TRUE 1 #endif #ifndef FALSE /* define FALSE if not already defined */ #define FALSE 0 #endif /* define number buffers for storing background messages */ #define BG_SENDBUFF_SIZE (NUMBER_OF_CAT_ENTRIES+1) #define OP_FREEZE 1 /* code value to "freezing" emulator */ #define OP_BREAK 2 /* code value to sending a break char */ #define OP_EXEDOSCMD 3 /* code value to executing DOS command */ #define OP_BG_REPLY 4 /* code value to send background reply */ #define OP_EXIT 5 /* code value to exit the emulator */ /* : Set EM_DEBUG to 1 for debugging version, set to 0 for non-debugging version */ #define EM_DEBUG 0 /* END INCLUDE FILE: emulator.h */   keydefs.h 08/07/87 1522.0rew 08/07/87 1439.2 40599 /* BEGIN INCLUDE FILE: keydefs.h */ /* HISTORY COMMENTS: 1) change(86-09-01,Lee), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. END HISTORY COMMENTS */ /* FUNCTION: This include file assigns a unique value to each key sequence on the PC keyboard. A key sequence consists of a single key press or a key press while the control or the ALT key is depressed. For keys not explicitly assigned a value, the ASCII value for that key character is assumed. Some keys are represented as extended ASCII codes (such as the BREAK key, function keys, arrow keys, etc.). These generate a two character sequence from the keyboard with the first character being a NULL byte. The value assigned for extended ASCII characters is the value of the second byte plus 256. */ /* define values for functions keys F1 to F10 */ #define F1 315 #define F2 316 #define F3 317 #define F4 318 #define F5 319 #define F6 320 #define F7 321 #define F8 322 #define F9 323 #define F10 324 /* define values for function keys F1 to F10 while the CTRL key is depressed */ #define CTRL_F1 350 #define CTRL_F2 351 #define CTRL_F3 352 #define CTRL_F4 353 #define CTRL_F5 354 #define CTRL_F6 355 #define CTRL_F7 356 #define CTRL_F8 357 #define CTRL_F9 358 #define CTRL_F10 359 /* define values for functions keys F1 to F10 while the ALT key is depressed */ #define ALT_F1 360 #define ALT_F2 361 #define ALT_F3 362 #define ALT_F4 363 #define ALT_F5 364 #define ALT_F6 365 #define ALT_F7 366 #define ALT_F8 367 #define ALT_F9 368 #define ALT_F10 369 /* define values for miscellaneous extended ASCII characters */ #define HOME_KEY 327 /* Home key */ #define UP_ARROW_KEY 328 /* the up arrow key */ #define PAGE_UP_KEY 329 /* the page up key */ #define LEFT_ARROW_KEY 331 /* the left arrow key */ #define RIGHT_ARROW_KEY 333 /* the right arrow key */ #define END_KEY 335 /* the End key */ #define DOWN_ARROW_KEY 336 /* the down arrow key */ #define PAGE_DOWN_KEY 337 /* the PgDn key */ #define INS_KEY 338 /* the Ins key */ #define DEL_KEY 339 /* the Del key */ /* define values for characters with the CTRL key depressed */ #define CTRL_A 1 /* CTRL A */ #define CTRL_B 2 /* CTRL B */ #define CTRL_C 3 /* CTRL C */ #define CTRL_D 4 /* etc ... */ #define CTRL_E 5 #define CTRL_F 6 #define CTRL_G 7 #define CTRL_H 8 #define CTRL_I 9 #define CTRL_J 10 #define CTRL_K 11 #define CTRL_L 12 #define CTRL_M 13 #define CTRL_N 14 #define CTRL_O 15 #define CTRL_P 16 #define CTRL_Q 17 #define CTRL_R 18 #define CTRL_S 19 #define CTRL_T 20 #define CTRL_U 21 #define CTRL_V 22 #define CTRL_W 23 #define CTRL_X 24 #define CTRL_Y 25 #define CTRL_Z 26 /* CTRL Z */ #define CTRL_RSB 29 /* CTRL ] (control right square */ /* bracket) */ /* define ALIASES for commonly used keys */ #define BELL 7 /* same as CTRL G */ #define BS 8 /* same as CTRL H */ #define TAB 9 /* same as CTRL I */ #define LF 10 /* same as CTRL J */ #define CR 13 /* same as CTRL M */ #define ESC 27 /* the Esc key */ #define SPACE 32 /* the space bar */ /* END INCLUDE FILE: keydefs.h */   mowsdefs.h 08/23/88 0820.0rew 08/23/88 0817.3 23796 /* BEGIN INCLUDE FILE: mowsedefs.h */ /* HISTORY COMMENTS: 1) change(86-01-01,Flegel), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. 2) change(88-01-26,Flegel), approve(88-02-29,MCR7853), audit(88-03-10,Nakaska): Moved in option definitions from MOWSE.C 3) change(88-06-17,Lee), approve(88-07-18,MCR7936), audit(88-08-10,Flegel): Added definitions for Mark and Space parity values END HISTORY COMMENTS */ /* FUNCTION Define the necessary initialization and miscellaneous values required by MOWSE. */ #define ACK 6 #define NAK 21 /* Baud rates */ #define B110 0 #define B150 1 #define B300 2 #define B600 3 #define B1200 4 #define B2400 5 #define B4800 6 #define B9600 7 /* Parity */ #define NO_PARITY 0 #define ODD_PARITY 1 #define EVEN_PARITY 3 #define MARK_PARITY 5 #define SPACE_PARITY 7 #define NO_PAR 0 #define ODD_PAR 1 #define EVEN_PAR 3 #define MARK_PAR 5 #define SPAC_PAR 7 /* Stop Bits */ #define STOP1 0 #define STOP2 1 /* Data Bits */ #define DATA7 2 #define DATA8 3 /* Default communications setup: */ #define DEFAULT_COMM ((B9600<<5)|(EVEN_PARITY<<3)|(STOP1<<2)|(DATA7)) #define DEF_COMM ((B9600<<5)|(EVEN_PAR<<3)|(STOP1<<2)|(DATA7)) /* Common constant values */ #define T 1 #define TRUE 1 #define F 0 #define FALSE 0 #define ADD_CONTROL 32 /* Buffer constants */ #define BUFSIZE 4096 /* General buffer size */ #define TBUFSIZE 4096 /* Terminal buffer size */ #define PBUFSIZE 520 /* Packet buffer size */ #define DATA_SIZE 121 /* Packet data size */ /* ASCII Codes */ #define BS 8 #define TAB 9 #define LF 10 #define CR 13 #define ESC 27 #define CTL_RSB 29 /* Startup option parameters */ #define OPTION_B 0x001 /* B parameter option */ #define OPTION_C 0x002 /* C */ #define OPTION_D 0x004 /* D */ #define OPTION_I 0x018 /* I */ #define OPTION_P 0x010 /* P */ #define OPTION_S 0x020 /* S */ #define OPTION_GX 0x040 /* G X */ #define OPTION_GR 0x080 /* G R */ #define OPTION_GP 0x100 /* G P */ #define OPTION_H 0x200 /* H */ /* END INCLUDE FILE mowsedefs.h */  mowsdefs.mac 03/15/88 1605.0rew 03/15/88 1546.8 45981 ; BEGIN INCLUDE FILE: mowsdefs.mac ; HISTORY COMMENTS: ; 1) change(85-12-15,Flegel), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; 2) change(86-09-11,Flegel), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Changed MASKMCR to force DTR high (initialized ; to 1) at initialization so that DTR is not dropped thus preventing the ; line from dropping. ; 3) change(88-01-26,Flegel), approve(88-02-29,mcr7853), ; audit(88-03-10,Nakaska): ; Copied in startup option definitions from MOWSE.C ; END HISTORY COMMENTS ; FUNCTION ; ; define all necessary assembler definitions for mowse ;--------------Buffer Sizes--------------- BUFSIZE = 4096 ;4k General buffer size TBUFSIZE = 4096 ;4k Terminal buffer size PBUFSIZE = 520 ;packet_buf size = a little over 512,just in case WSPAKSIZ = 121 ; packet size ;--------------ASCII codes---------------- LF = 0Ah ;line feed CR = 0dh ;carridge return ESC = 1bh ;escape SOP = 01h ;Start of packet EOP = 0Ah ;End of Packet TAB = 09h ;Tab character ;--------------BIOS calls------------------ RS232 = 14h ;RS232 Service kbd_io = 16h ;Keyboard service ;--------------DOS calls------------------- DOSFUNCTION = 21h ;DOS function PRINTSTRING = 09h ;print string SETVECTOR = 25h ;set interrupt vector GETVECTOR = 35h ;get interrupt vector ;--------------INS8250 ACE Registers----------- DLL = 00000000b ; divisor latch least significant DLM = 00000001b ; divisor latch most significant THR = 00000000b ; Transmitter holding register RBR = 00000000b ; Receiver buffer register(read) IER = 00000001b ; interrupt enable register IIR = 00000010b ; interrupt identification register LCR = 00000011b ; line control register MCR = 00000100b ; modem control register LSR = 00000101b ; line status register MSR = 00000110b ; modem status register LSR_LSTATUS = 00000110b ; line status interrupt (LSR) LSR_RCV = 00000100b ; receive data interrupt (LSR) LSR_THRE = 00000010b ; transmitter holding register empty (LSR) LSR_MSI = 00000000b ; modem status interrupt (LSR) IIR_PENDING = 00000001b ; interrupt pending (IIR) ;------------- Ports ---------------------------- IMR8259 = 21h ;Interrupt mask register port OMR8259 = 20h ;Signal mask register port ;------------- Masks ---------------------------- MCRREAD = 00001011b ;enable: read modem MASKLCR = 01111111b ;reset: DLAB MASKIER = 00001111b ;enable: ALL MASKMCR = 00001011b ;enable: out2, RTS, DTR MASKMCR_DROP = 00001000b ;enable: out2, RTS LOW, DTR LOW MSRCTS = 00010000b ;test: MSR clear to send LSRTHRE = 00100000b ;test: LSR transmit holding register empty MASKEOI = 00100000b ;enable: end of interrupt MASKPENDING = 00000001b ;test: interrupt pending MASKBREAK = 00000110b ;test: break detect MASKRDATA = 00000100b ;test: receive data ready MASKTDATA = 00000010b ;test: transmit register empty MASKMCHNG = 00000000b ;test: modem change in status MASK7 = 01111111b ;enable: all but bit 7 MASKERROR = 00011110b ;test: break,framing,parity,overrun ;------------- structure holding parameters for initialising com 1 commparm record baud:3, parity:2, stopbits:1, wordbits:2 ;--------------Baud rates------------------------------ ; refer to tech manual on rs232 B110 = 000b B150 = 001b B300 = 010b B600 = 011b B1200 = 100b B2400 = 101b B4800 = 110b B9600 = 111b ;-------------------Parity----------- no_parity = 00b odd_parity = 01b even_parity = 11b ;--------------Stop bits------------- stop1 = 0 stop2 = 1 ;--------------Data bits------------- data7 = 10b data8 = 11b ;-------------- Constants FRAMESIZE = 600h ;offset above stack_base ADD_CONTROL = 32 ;control addition for capabilities ;-------------- Startup option definitions OPTION_B = 1h ; B parameter option OPTION_C = 2h ; C OPTION_D = 4h ; D OPTION_I = 8h ; I OPTION_P = 10h ; P OPTION_S = 20h ; S OPTION_GX = 40h ; G X OPTION_GR = 80h ; G R OPTION_GP = 100h ; G P OPTION_H = 200h ; H ; END INCLUDE FILE: mowsdefs.mac  mowse.h 08/07/87 1522.0rew 08/07/87 1438.2 4383 /* BEGIN INCLUDE FILE mowse.h */ /* HISTORY COMMENTS: 1) change(86-08-15,Lee), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. END HISTORY COMMENTS */ /* FUNCTION Include all of the background application include files. */ #include #include #include #include #include #include /* END INCLUDE FILE mowse.h */   mowse.mac 08/07/87 1522.5rew 08/07/87 1454.4 4329 ; /* BEGIN INCLUDE FILE mowse.h */ ; HISTORY COMMENTS: ; 1) change(87-01-23,Flegel), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; END HISTORY COMMENTS ; /* FUNCTION ; ; Include all of the background application include files. ; */ include mowsdefs.mac include ws.mac include ws_mcb.mac include ws_error.mac include wsmincap.mac ; /* END INCLUDE FILE mowse.h */   rs232err.mac 08/07/87 1522.5rew 08/07/87 1454.0 14904 ;/* BEGIN INCLUDE FILE: rs232err.mac */ ; HISTORY COMMENTS: ; 1) change(86-06-05,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; END HISTORY COMMENTS ;/* : FUNCTION ; ;This include file identifies the error messages that can be created by the ;hardware interrupt handler and it's support routines. Notification of errors ;is placed in the rs232 input buffer by means of a two character sequence. ;The first character identifies the class of error message and the second ;character identifies the error within the class. ;*/ ;ERROR MESSAGE CLASSES LINE_STATUS = 3 MODEM_STATUS = 4 INTERRUPT_STATUS = 5 ESCAPE_STATUS = 6 ;LINE STATUS ERRORS LSROR = 00000001b ; OVERRUN IN RECEIVE BUFFER LSRPE = 00000010b ; PARITY ERROR DETECTED BY HARDWARE LSRFE = 00000100b ; FRAMING ERROR DETECTED BY HARDWARE LSRBI = 00001000b ; BREAK DETECTED BY HARDWARE ;MODEM STATUS ERRORS MSRDCTS = 00000001b ; DELTA CLEAR TO SEND MSRDDSR = 00000010b ; DELTA DATA SET READY MSRTERI = 00000100b ; DELTA RING INDICATOR MSRDRLSD = 00001000b ; DELTA LINE SIGNAL DETECTOR ;INTERRUPT STATUS ERRORS ISIBO = 00000001b ; INPUT BUFFER OVERFLOW ISCTSTO = 00000010b ; CTS TIMEOUT ISTHRETO = 00000100b ; TRANSMITTER HOLDING REGISTER TIMEOUT ;ESCAPE STATUS ; Used to escape a genuine received data value equal to one of the ; above status register values ;/* END INCLUDE FILE rs232err.mac */   util.mac 08/07/87 1522.5rew 08/07/87 1453.7 7614 ;/* BEGIN INCLUDE FILE: util.mac */ ; HISTORY COMMENTS: ; 1) change(85-12-20,ASmith), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; END HISTORY COMMENTS ;/* : FUNCTION ; ; Macros for register preservation ;*/ SAVEALL macro ;save processor status ;AX is used for return values from soft int push bx push cx push dx push si push di push bp pushf endm RESTOREALL macro ;restore processor status popf pop bp pop di pop si pop dx pop cx pop bx ;AX was not preserved endm ;/* END INCLUDE FILE: util.mac */   ws.h 08/23/88 0820.0rew 08/23/88 0817.3 21915 /* BEGIN INCLUDE FILE: WS.H */ /* HISTORY COMMENTS: 1) change(86-06-01,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. 2) change(88-02-02,Flegel): Changed version number to 1.1 3) change(88-06-17,Lee), approve(88-07-18,MCR7936), audit(88-08-10,Flegel): Changed version number to 1.2 END HISTORY COMMENTS */ /* : FUNCTION: Defines constants used by mowse routines. Equivalent include file ws.mac */ #define VERSION 1 /* Version Number */ #define SUBVERSION 2 #define FG 1 /* defines foreground channel */ #define BG 0 /* defines background channel */ #define WSMAJCAP 32 /* Mowse's major capability */ #define WSIBMPC 33 /* IBMPC system ID */ #define WSMULTICS 32 /* Multics system ID */ #define WSLOCAL 0 /* Local system */ #define WSREMOTE 1 /* Remote system */ #define WSMINBUF 128 /* Minimum buffer size */ #define WSMAXBUF 4096 /* Maximum buffer size */ #define WSPAKSIZ 118 /* Packet size(data portion) */ #define MIN_CAPABILITY_NUMBER 33 /* Min capability number */ #define MAX_CAPABILITY_NUMBER 65 /* Max capability number */ #define NUMBER_OF_CAT_ENTRIES 32 /* Max number of CAT entries */ #define CAPABILITY_NAME_LENGTH 32 /* Capability name length */ #define WSCAPLEN 32 #define MIN_SYSTEM_ID 32 /* Minimum system id */ #define MAX_SYSTEM_ID 64 /* Maximum system id */ #define WSINFO 37 /* defines info background msg */ #define WSQUERY 38 /* defines query background msg */ #define WSACCEPT 32 /* accept connect request */ #define WSREJECT 33 /* reject connect request */ #define WSRQSTATUS 1 /* ask MOWSE to request status */ #define WSRPSTATUS 2 /* ask MOWSE for status reply */ #define WSSDSTATUS 3 /* ask MOWSE to send status */ /* END INCLUDE FILE: WS.H */  ws.mac 08/23/88 0820.0rew 08/23/88 0817.3 18576 ; /* BEGIN INCLUDE FILE: WS.MAC */ ; HISTORY COMMENTS: ; 1) change(86-06-01,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; 2) change(88-02-02,Flegel): ; Changed version number to 1.1 ; 3) change(88-06-17,Lee), approve(88-07-18,MCR7936), audit(88-08-10,Flegel): ; Changed version number to 1.2 ; END HISTORY COMMENTS ; /* : FUNCTION: ; ; Defines constants used by mowse routines. Equivalent include file: ws.h ; */ VERSION = 1 ;version number SUBVERSION = 2 FG = 1 ;foreground channel number BG = 0 ; background channel number WSMAJCAP = 32 ;Mowse's major capability WSIBMPC = 33 ;IBMPC system ID WSMULTICS = 32 ;Multics system ID WSLOCAL = 0 ;Local system WSREMOTE = 1 ;Remote system WSMINBUF = 128 ;Minimum buffer size WSMAXBUF = 4096 ;Maximum buffer size WSPAKSIZ = 118 ;Packet size (data portion) MIN_CAPABILITY_NUMBER = 33 ;Min capability number MAX_CAPABILITY_NUMBER = 65 ;Max capability number NUMBER_OF_CAT_ENTRIES = 32 ;Max number of CAT entries CAPABILITY_NAME_LENGTH = 32 ;Capability name length MIN_SYSTEM_ID = 32 ;Minimum system id MAX_SYSTEM_ID = 32 ;Maximum system id WSINFO = 37 ;defines info background msg WSQUERY = 38 ;defines query background msg WSRQSTATUS = 1 ;ask MOWSE to request status WSRPSTATUS = 2 ;ask MOWSE for status reply WSSDSTATUS = 3 ;ask MOWSE to send status ; ; ; /* END INCLUDE FILE: WS.MAC */  ws_auto.h 08/07/87 1521.9rew 08/07/87 1439.2 9621 /* BEGIN INCLUDE FILE ws_load.h */ /* HISTORY COMMENTS: 1) change(86-10-10,Flegel), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. END HISTORY COMMENTS */ /* FUNCTION Define the necessary information to support the autoload facility. The capability to be autoloaded MUST be in the search path of the PC */ #define AUTO_LIMIT 32 /* Maximum number of capabilities to load */ #define AUTO_LENGTH 9 /* Maximum number of characters in load name */ #define AUTO_ACTIVE 001 /* Autoload in progress */ #define AUTO_COMPLETE 002 /* Autoload complete */ #define AUTO_ON 004 /* Specifies that the entry is valid */ #define AUTO_PENDING 001 /* General flag indicates pending loads */ typedef struct { char name[AUTO_LENGTH]; /* Name of capability to autoload */ int flags; /* Flags associated with autoload */ } AUTO, *AUTO_PTR; /* END INCLUDE FILE ws_load.h */   ws_buf.h 08/07/87 1521.9rew 08/07/87 1438.6 8595 /* BEGIN INCLUDE FILE ws_buf.h */ /* HISTORY COMMENTS: 1) change(86-06-01,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. END HISTORY COMMENTS */ /* FUNCTION Defines the structure of a circular buffer. Equivalent include file ws_buf.mac */ struct bstruc { /* circular buffer structure */ int bsize; /* Size of buffer */ char *bfirst; /* First char in buffer */ char *blast; /* Last char in buffer */ char *bin; /* First data in buffer */ char *bout; /* Last data in buffer */ char bminor; /* Minor of data */ char mbuffer[1]; /* data holding place */ }; /* END INCLUDE FILE ws_buf.h */   ws_buf.mac 08/07/87 1522.4rew 08/07/87 1453.0 29574 ;/* BEGIN INCLUDE FILE ws_buf.mac */ ; HISTORY COMMENTS: ; 1) change(86-04-10,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; END HISTORY COMMENTS ;/* : FUNCTION ; ;Defines macros that support circular buffers. ;*/ bstruc struc bsize dw ? ;size of buffer bfirst dw ? ; start of buffer blast dw ? ; end of buffer bin dw ? ; next empty space in buffer bout dw ? ; next char to be removed bminor db ? ; minor capability associated mbuffer dw ? ; placeholder for message bstruc ends def_buf macro bname,bufsize ;define circular buffer bname bstruc db bufsize dup(?) endm init_buf macro bname ; initialize circular buffer mov bx, offset bname mov ax, offset bname.mbuffer mov bfirst[bx],ax mov bin[bx],ax mov bout[bx],ax add ax,bname.bsize mov blast[bx],ax endm put_buf macro bname,nostop ; insert character into buffer push si push bx mov bx,offset bname mov si, bin[bx] mov byte ptr ds:[si],al ; inbuff = inbuff + 1 ; if (inbuff is at end of buffer) ; inbuff = start of buffer inc si cmp si,blast[bx] nae1 = $ jbe short $+(nae2-nae1) ;if not at end of buffer mov si,bfirst[bx] nae2 = $ ; if (not overflow) store inbuff, clear error code, and return */ mov ax,1 ;set error return code, just in case ifb cmp si, bout[bx] novf1 = $ je $ + (novf2 - novf1) endif mov bin[bx],si xor ax,ax ;set return code novf2 = $ pop bx pop si endm get_buf macro bname ; get character from buffer push si push bx mov bx, offset bname mov si,bout[bx] cmp si,bin[bx] bemp1 = $ je $ + (bemp2 - bemp1) ;/* : if (buffer not empty) get character into AX */ mov al,byte ptr ds:[si] ;/* : outbuff = outbuff + 1 ; if (outbuff = end of buffer) outbuff = start of buffer */ inc si cmp si,blast[bx] nae3 = $ jbe $ + (nae4 - nae3) mov si,bfirst[bx] nae4 = $ mov bout[bx],si stc ; SET carry flag to indicate data available bnemp1 = $ jmp $ + (bnemp2 - bnemp1) ;/* : if (buffer empty) clear carry flag, and return */ bemp2 = $ clc ; CLEAR carry flag to indicate no data bnemp2 = $ pop bx pop si endm len_buf macro bname ; calculate empty space in buffer push bx mov bx,offset bname mov ax,bout[bx] sub ax,bin[bx] lb1 = $ ja $ + (lb2-lb1) ; if no wrap add ax,bsize[bx] lb2 = $ pop bx endm ;/* END INCLUDE FILE ws_buf.mac */   ws_dcls.h 08/07/87 1521.9rew 08/07/87 1438.9 45981 /* BEGIN INCLUDE FILE: ws_dcls.h */ /* HISTORY COMMENTS: 1) change(86-07-06,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. 2) change(86-10-24,ASmith), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Added i_connect_request structure. END HISTORY COMMENTS */ /* FUNCTION: Defines the structures that are passed to MOWSE when the user calls an entry_ point in the MOWSE application library. The address and length of the appropriate structure is given to call_mowse_int, which calls the mowse user interrupt. The user interrupt handler will transfer the entire structure into MOWSE's address space. At the conclusion of the interrupt, the structure will be copied back to the user's address space. Equivalent include file ws_dcls.mac */ #ifndef CAPABILITY_NAME_LENGTH #include "ws.h" #endif #ifndef MCB_DEFINED #include "ws_mcb.h" #endif /* Find name parameter */ struct findname_param_struct { int major_capability_number; /* major capability number to be found */ char capability_name[CAPABILITY_NAME_LENGTH]; /* name of capability, if found */ }; /* Find number parameter */ struct findnumb_param_struct { int major_capability_number; /* lowest capability number to try */ char capability_name[CAPABILITY_NAME_LENGTH]; /* name of capability to be found */ }; /* Destroy instance parameter */ struct destinst_param_struct { int cap_index; /* Capability index of caller */ mcb *mcb_ptr; /* MCB of caller */ }; /* Create instance parameter */ struct cretinst_param_struct { mcb *mcb_ptr; /* address of caller's mcb */ short cs_reg; /* caller's stack register */ int (*entry_pt)(); /* address of ws_entry */ char major_capability; /* returned to caller */ char system_id; /* returned to caller */ char capability_name[CAPABILITY_NAME_LENGTH]; }; /* Get data structure */ struct get_struc { char *local_buffer_pointer; /* Destination buffer */ int local_buffer_size; /* Buffer size */ int minor_capability; /* minor capability of data */ int background_pending_flag; /* Are there BG messages flag */ }; /* Put data structure */ struct putt_struc { int minor_cap; /* Minor cap of data */ int putstrl; /* Length of data */ char putstr[WSPAKSIZ]; /* Data to send */ }; /* Execute capability structure */ struct xcap_struc { char system; /* System of execution */ char major; /* Major to be executed */ char minor; /* Minor of execution */ char source_system; /* source system */ char source_major; /* source major */ char xcapstr[1]; /* Message */ }; /* Get background message structure */ struct gbgmsg_struc { int bg_type; /* type of message */ int sender_major; /* who sent message */ int length; /* Length of message */ char bgmsg[WSPAKSIZ]; /* message */ }; /* Put background message structure */ struct putbg_struc { int type; /* type of background message */ int sender_major; /* sender's major capability */ int length; /* length of message */ char bgmsg[WSPAKSIZ]; /* background message */ }; /* Execute command structure */ struct execom_struc { int com_len; /* length of command */ int system; /* system id */ int major; /* major capability */ int cmd_id; /* command id */ int status; /* execution status */ char command[WSPAKSIZ]; /* command string */ }; /* Sleep structure */ struct sleep_struc { int time; /* Number of seconds to sleep */ char system; /* System sleeping on */ char major; /* Major of caller */ char minor; /* Minor of caller */ char source_system; /* Source of caller */ char source_major; /* source of caller */ char xcapstr[1]; /* data */ }; /* connect request structure */ struct i_connect_request { char system; /* system of destination connectoin */ char source_system; /* Source system of request */ char source_major; /* Major of requesting application */ char connect_command[WSPAKSIZ]; /* Command to connect application with */ }; /* END INCLUDE FILE: ws_dcls.h */   ws_dcls.mac 08/07/87 1522.4rew 08/07/87 1452.1 14913 ;/* BEGIN INCLUDE FILE: ws_dcls.mac */ ; HISTORY COMMENTS: ; 1) change(86-07-08,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; END HISTORY COMMENTS ;/* : GETTDATA ; ;structure that defines gettdata parameters. ;*/ getdata struc getlbp dw ? ; pointer to caller's buffer getlbs dw ? ; size of caller's buffer gmincap dw ? ; minor capability no. of this message gbpflag dw ? ; background pending flag getdata ends gettlen equ gbpflag - getlbp + 2 ;structure that defines puttdata parameters. puttdata struc minor_cap dw ? ; minor_capability putstrl dw ? ; length of string puttstr db WSPAKSIZ dup (?); ; message space puttdata ends ;Structure that defines the getbgmes parameters. gbgmsg struc type dw ? ; type of background message sender_major dw ? ; sender's major capability length dw ? ; length of message bgmsg db WSPAKSIZ dup (?) ; message data gbgmsg ends ;Defines the structure used by putbgmes to pass data to software interrupt ;handler putbgstr struc ptype dw ? ; type of background message psender_major dw ? ; sender's major capability plength dw ? ; length of message pbgmsg db WSPAKSIZ dup (?) ; message data putbgstr ends ;/* END INCLUDE FILE: ws_dcls.mac */   ws_error.h 08/07/87 1521.9rew 08/07/87 1437.8 20907 /* BEGIN INCLUDE FILE ws_error.h */ /* HISTORY COMMENTS: 1) change(86-06-01,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. 2) change(86-09-05,Flegel), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Added WSINVTIM. END HISTORY COMMENTS */ /* : FUNCTION Defines PC error codes, equivalent include file ws_error.mac Error codes between -1000 and -1200 are general -1201 and -1300 are PC only -1301 and -1400 are Multics only */ #define WSNOERR 0 /* No error */ #define WSACTIVE -1000 /* MOWSE is currently active */ #define WSNOTACT -1001 /* Mowse not active */ #define WSINVSYS -1002 /* Invalid system number */ #define WSINVMCB -1003 /* Invalid MCB pointer */ #define WSINVNUM -1005 /* Invalid capability number */ #define WSSUSPND -1006 /* Suspended */ #define WSERROR -1007 /* Some kind of error */ #define WSINVMIN -1008 /* Invalid minor capability */ #define WSBUFOVR -1009 /* Buffer Overflow */ #define WSDISPEN -1010 /* Disconnect pending */ #define WSCNTCRE -1011 /* couldn't create instance */ #define WSINVNAM -1012 /* Invalid capability name */ #define WSINVTIM -1013 /* Invalid sleep interval */ #define WSNOSPND -1014 /* Not suspended */ #define WSSLPING -1015 /* Already sleeping */ #define WSNOTRES -1016 /* MOWSE is not resident */ #define WSNOMESS -1201 /* No background message */ #define WSINVBUF -1202 /* Invalid buffer size */ #define WSINVCAT -1203 /* Invalid CAT entry */ #define WSINVENM -1301 /* Invalid entry name */ #define WSINVCON -1302 /* Invalid connect status */ /* END INCLUDE FILE ws_error.h */  ws_error.mac 08/07/87 1522.4rew 08/07/87 1451.7 18999 ; HISTORY COMMENTS: ; 1) change(86-06-06,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; 2) change(86-09-04,Flegel), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Added WSINVTIM. ; END HISTORY COMMENTS ; /* BEGIN INCLUDE FILE ws_error.mac */ ; ; /* : FUNCTION: ; Defines error codes return to application by mowse capabilities. Equivalent ; include file ws_error.h ; ; Error codes between -1000 and -1200 are general ; -1201 and -1300 are PC only ; -1301 and -1400 are Multics only ; */ WSNOERR = 0 ; No error WSACTIVE = -1000 ; Mowse active WSNOTACT = -1001 ; Mowse not active WSINVSYS = -1002 ; Invalid system number WSINVMCB = -1003 ; Invalid MCB pointer WSINVNUM = -1005 ; Invalid capability number WSSUSPND = -1006 ; Suspended WSERROR = -1007 ; Some kind of error WSINVMIN = -1008 ; Invalid minor capability WSBUFOVR = -1009 ; Buffer Overflow WSDISPEN = -1010 ; Disconnect pending WSCNTCRE = -1011 ; couldn't create instance WSINVNAM = -1012 ; Invalid capability name WSINVTIM = -1013 ; Invalid sleep interval WSNOSPND = -1014 ; Not suspended WSSLPING = -1015 ; Already sleeping WSNOTRES = -1016 ; MOWSE is not resident WSNOMESS = -1201 ; No background message WSINVBUF = -1202 ; Invalid buffer size WSINVCAT = -1203 ; Invalid CAT entry WSINVENM = -1301 ; Invalid entry name WSINVCON = -1302 ; Invalid connect status ; /* END INCLUDE FILE ws_error.mac */  ws_fgb.h 08/07/87 1521.9rew 08/07/87 1438.9 6669 /* BEGIN INCLUDE FILE ws_fgb.h */ /* HISTORY COMMENTS: 1) change(86-05-31,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. END HISTORY COMMENTS */ /* FUNCTION Defines the foreground linked buffer structure. Equivalent include file ws_fgb.mac */ /* foreground buffer structure */ struct fgbstr { struct fgbstr *fgb_next; /* pointer to next fg buffer */ int fgb_length; /* length of data in buffer */ char fgb_minor; /* minor capability number */ char fgb_char[1]; /* first character if fg data */ }; /* END INCLUDE FILE ws_fgb.h */   ws_fgb.mac 08/07/87 1522.4rew 08/07/87 1451.3 7173 ;/* BEGIN INCLUDE FILE ws_fgb.mac */ ; HISTORY COMMENTS: ; 1) change(86-06-01,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; END HISTORY COMMENTS ;/* : FUNCTION ; ;FGBSTR structure Defines the foreground buffer structure the foreground ;buffer is a linked list that contains individual packets received from ;the remote system. ; ;Equivalent include file ws_fgb.h ;*/ fgbstr struc fgb_next dw ? ; pointer to next structure fgb_length dw ? ; length of data in buffer fgb_minor db ? ; minor capability number fgb_char db ? ; first character in buffer fgbstr ends ;/* END INCLUDE FILE ws_fgb.mac */   ws_func.h 08/07/87 1521.9rew 08/07/87 1438.2 15660 /* BEGIN INCLUDE FILE ws_func.h */ /* HISTORY COMMENTS: 1) change(86-05-31,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. 2) change(86-10-24,ASmith), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Added I$CONNECT minor. END HISTORY COMMENTS */ /* FUNCTION Defines the MOWSE functions numbers used by the software interrupt handler. Equivalent include file ws_func.mac */ /* Application interrupts */ #define I$EXECOM 2 /* execute command */ #define I$EXECAP 3 /* execute capability */ #define I$CRETINST 4 /* create instance */ #define I$DESTINST 5 /* destroy instance */ #define I$FINDNAME 6 /* find capability name */ #define I$FINDNUMB 7 /* find capability number */ #define I$GETTDATA 9 /* get terminal data */ #define I$PUTTDATA 10 /* put terminal data */ #define I$GETBGMES 11 /* get background message */ #define I$PUTBGMES 12 /* put background message */ #define I$SENDBG 13 /* send message to background */ #define I$PUTQUERY 13 /* put query message */ #define I$STATUS 14 /* status request/reply */ #define I$RESET 15 /* send reset or resume request */ #define I$SLEEP 16 /* put application to sleep */ #define I$DISCONNECT 17 /* disconnect request */ #define I$FOREBREAK 18 /* Foreground break */ #define I$SUSPEND 19 /* Suspend application */ #define I$CONNECT 20 /* Connect to application */ /* END INCLUDE FILE ws_func.h */   ws_func.mac 08/07/87 1522.3rew 08/07/87 1458.1 14751 ;/* BEGIN INCLUDE FILE ws_func.mac */ ; HISTORY COMMENTS: ; 1) change(86-04-30,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; 2) change(86-10-24,ASmith), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw): ; Added I$CONNECT minor. ; END HISTORY COMMENTS ;/* FUNCTION ; ;Defines the MOWSE functions numbers used by the software interrupt handler. ; ;Equivalent include file ws_func.h ;*/ ; Application interrupts I$EXECOM = 2 ; execute command I$EXECAP = 3 ; execute capability I$CRETINST = 4 ; create instance I$DESTINST = 5 ; destroy instance I$FINDNAME = 6 ; find capability name I$FINDNUMB = 7 ; find capability number I$GETTDATA = 9 ; get terminal data I$PUTTDATA = 10 ; put terminal data I$GETBGMES = 11 ; get background message I$PUTBGMES = 12 ; put background message I$SENDBG = 13 ; send message to background I$PUTQUERY = 13 ; put query message I$STATUS = 14 ; status request/reply I$RESET = 15 ; reset request/response I$SLEEP = 16 ; sleep request I$DISCONNECT = 17 ; disconnect request I$FOREBREAK = 18 ; foreground break request I$SUSPEND = 19 ; Suspend application I$CONNECT = 20 ; Connect internal minor ; /* END INCLUDE FILE ws_func.mac */   ws_mcb.h 08/07/87 1521.9rew 08/07/87 1437.8 18756 /* BEGIN INCLUDE FILE ws_mcb.h */ /* HISTORY COMMENTS: 1) change(86-05-31,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. END HISTORY COMMENTS */ /* FUNCTION Defines the mowse control block structure Equivalent include file ws_mcb.mac */ #define MCB_DEFINED 1 #ifndef ALLOCH #include #endif #define MCB_SUSPEND 1 /* Suspended flag */ #define MCB_TERMINATE 2 /* Terminating flag */ #define MCB_SLEEP 4 /* Sleeping flag */ #define MCB_NULL_ROUTINE 8 /* Null routine flag */ struct linklst { struct linklst *nextbuf; /* pointer to next buffer chain */ struct linklst *nextlink; /* pointer to next buffer link */ int linksize; /* size of this link */ int linkused; /* amount of link used */ char lldata[1]; /* data place holder */ }; typedef struct mcb_struct { char major_capability; /* Major capability number */ char system_id; /* System of capability */ char mcb_flag; /* MCB information */ char capability_name[CAPABILITY_NAME_LENGTH]; int (*entry_point_offset)(); /* pre-entry point of application */ int (*application_entry)(); /* Actual entry of application */ char *data_block_ptr; /* Application data */ struct allocstr *inalloc; /* Input buffer */ int inbuff_length; /* Length of input buffer */ struct linklst *inbuff; /* Inbuffer data */ struct allocstr *outalloc; /* Outbuffer */ int outbuff_length; /* Length of outbuffer */ struct linklst *outbuff; /* Outbuffer data */ double low_memory; /* Memory bounds of application */ double high_memory; /* ... */ } mcb; /* END INCLUDE FILE ws_mcb.h */  ws_mcb.mac 08/07/87 1522.3rew 08/07/87 1447.4 14301 ;/* BEGIN INCLUDE FILE ws_mcb.mac */ ; HISTORY COMMENTS: ; 1) change(86-04-30,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; END HISTORY COMMENTS ;/* : FUNCTION ; ;Defines the mowse control block structure ; ;Equivalent include file ws_mcb.h ;*/ MCB_DEFINED = 1 MCB_SUSPEND = 1 ; Suspended flag MCB_TERMINATE = 2 ; Terminating flag MCB_SLEEP = 4 ; Sleeping flag MCB_NULL_ROUTINE = 8 ; Null routine flag mcb_struct struc major_capability db ? ; Capability number system_id db ? ; System id mcb_flag db ? ; MCB active flag capability_name db CAPABILITY_NAME_LENGTH dup(?) entry_point_offset dw ? ; Entry to application application_entry dw ? ; Actual entry data_block_ptr dw ? ; Static data pointer inalloc dw ? ; Inbuffrer "area" inbuff_length dw ? ; Inbuffer length inbuff dw ? ; Inbuffer message position outalloc dw ? ; Outbuffer "area" outbuff_length dw ? ; Outbuffer length outbuff dw ? ; Outbuffer message position low_memory dd ? ; Low boundary of application high_memory dd ? ; High ... mcb_struct ends ;/* END INCLUDE FILE ws_mcb.mac */   ws_msg.h 08/07/87 1521.9rew 08/07/87 1438.9 41895 /* BEGIN INCLUDE FILE: ws_msg.h */ /* HISTORY COMMENTS: 1) change(86-06-01,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. 2) change(86-09-03,Flegel), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Installed a message structure which contains no data. END HISTORY COMMENTS */ /* FUNCTION: Defines formats for the mowse internal minor capabilities. Equivalent include file wsmsg.mac */ struct input_msg { char system; /* destination system id */ char major; /* destination major capability */ char minor; /* destination minor capability */ char source_system; /* source system id */ char source_major; /* source major capability */ char msg_data[1]; /* placeholder for data string */ }; struct more_msg { char system; /* destination system id */ char major; /* destination major capability */ char more_minor; /* MORE_DATA minor capability */ char source_system; /* source system id */ char source_major; /* source major capability */ char minor; /* destination minor capability */ char msg_data[1]; /* placeholder for data string */ }; struct execom_msg { /* execute_command message */ char system; /* destination system id */ char major; /* destination major capability */ char minor; /* destination minor capability */ char source_system; /* source system id */ char source_major; /* source major capability */ int cmd_id; /* unique id for command */ char command [1]; /* placeholder for data string */ }; struct exerep_msg { /* execute_command_reply */ char system; /* destination system id */ char major; /* destination major capability */ char minor; /* destination minor capability */ char source_system; /* source system id */ char source_major; /* source major capability */ int cmd_id; /* unique id for command */ char status; /* status of execute attempt */ }; struct execap_msg { /* execute capability message */ char system; /* destination system id */ char major; /* destination major capability */ char minor; /* destination minor capability */ char source_system; /* source system id */ char source_major; /* source major capability */ char data_len; /* length of data string */ char data_buf[1]; /* placeholder for data string */ }; struct alter_cat_msg { /* Alter CAT entry */ char system; /* destination system id */ char major; /* destination major capability */ char minor; /* destination minor capability */ char source_system; /* source system id */ char source_major; /* source major capability */ char rat_major; /* major cap to be inserted */ char major_name[2]; /* placeholder for data string */ }; struct query_msg { /* background query/info message*/ char minor; /* destination minor capability */ char source_system; /* source system id */ char source_major; /* source major capability */ char msg_data[1]; /* placeholder for data string */ }; struct packet_msg { char system; /* destination system id */ char major; /* destination major capability */ char minor; /* destination minor capability */ char source_system; /* source system id */ /* = 0, if foreground is sender */ char source_major; /* source major capability */ /* = 0, if foreground is sender */ char msg_data[128]; /* data string */ }; struct null_msg { /* Message with no data */ char system; /* destination system id */ char major; /* destination major capability */ char minor; /* destination minor capability */ char source_system; /* source system id */ char source_major; /* source major capability */ }; /* END INCLUDE FILE: ws_msg.h */   ws_msg.mac 08/07/87 1522.4rew 08/07/87 1451.0 33633 ; /* BEGIN INCLUDE FILE: ws_msg.mac ; HISTORY COMMENTS: ; 1) change(86-06-01,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; 2) change(86-09-03,Flegel), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Installed null_msg structure. ; END HISTORY COMMENTS ;/* : FUNCTION: ; ;Defines formats for mowse internal messages. Equivalent include file ws_msg.h ;*/ input_msg struc im_system db ? ; destination system id im_major db ? ; destination major capability im_minor db ? ; destination minor capability im_source_system db ? ; source system id im_source_major db ? ; source major capability im_msg_data db ? ; placeholder for data string input_msg ends execom_msg struc ; execute_command message em_system db ? ; destination system id em_major db ? ; destination major capability em_minor db ? ; destination minor capability em_source_system db ? ; source system id em_source_major db ? ; source major capability em_cmd_id dw ? ; unique id for command em_command db ? ; placeholder for data string execom_msg ends exerep_msg struc ; execute_command_reply er_system db ? ; destination system id er_major db ? ; destination major capability er_minor db ? ; destination minor capability er_source_system db ? ; source system id er_source_major db ? ; source major capability er_cmd_id dw ? ; unique id for command er_status dw ? ; status of execute attempt exerep_msg ends execap_msg struc ; execute capability message ep_system db ? ; destination system id ep_major db ? ; destination major capability ep_minor db ? ; destination minor capability ep_source_system db ? ; source system id ep_source_major db ? ; source major capability ep_data_len dw ? ; length of data string ep_data_buf dw ? ; placeholder for data string execap_msg ends alter_cat_msg struc ; Alter CAT entry ac_system db ? ; destination system id ac_major db ? ; destination major capability ac_minor db ? ; destination minor capability ac_source_system db ? ; source system id ac_source_major db ? ; source major capability ac_rat_major dw ? ; major cap to be inserted ac_major_name dw ? ; placeholder for data string alter_cat_msg ends query_msg struc ; background query/info message qm_minor db ? ; destination minor capability qm_source_system db ? ; source system id qm_source_major db ? ; source major capability qm_msg_data db ? ; placeholder for data string query_msg ends packet_msg struc pm_system db ? ; destination system id pm_major db ? ; destination major capability pm_minor db ? ; destination minor capability pm_source_system db ? ; source system id ; = 0, if foreground is sender pm_source_major db ? ; source major capability ; = 0, if foreground is sender pm_msg_data db 128 dup(?); data string packet_msg ends null_msg struc nm_system db ? ; destination system id nm_major db ? ; destination major capability nm_minor db ? ; destination minor capability nm_source_system db ? ; source system id nm_source_major db ? ; source major capability null_msg ends ;/* END INCLUDE FILE: ws_msg.mac */   ws_stack.h 08/07/87 1521.9rew 08/07/87 1438.8 9828 /* BEGIN INCLUDE FILE ws_stack.h */ /* HISTORY COMMENTS: 1) change(86-06-10,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. END HISTORY COMMENTS */ /* FUNCTION Defines mowse stack format. Equivalent include file ws_stack.mac */ typedef struct ws_stack_struct { int ipreg; /* register save area */ int axreg; int bxreg; int cxreg; int dxreg; int sireg; int direg; int bpreg; int spreg; int flreg; int esreg; int csreg; int ssreg; int dsreg; int bpsave; /* just here for debugging */ int chan; /* mowse channel */ int datac; /* count of datap to use for snddat */ int datap[3]; /* pointers to data strings for snddat */ int datal[3]; /* length of data strings for snddat */ char pkthdr[8]; /* packet header work area */ int wsparm; /* base address for local data */ } ws_stack; /* END INCLUDE FILE ws_stack.h */   ws_stack.mac 08/07/87 1522.4rew 08/07/87 1450.3 9009 ;/* BEGIN INCLUDE FILE ws_stack.mac */ ; HISTORY COMMENTS: ; 1) change(86-06-10,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; END HISTORY COMMENTS ;/* : FUNCTION ; ;Defines mowse stack format. ; ;Equivalent include file ws_stack.h ;*/ ws_stack struc ipreg dw ? ; register save area axreg dw ? bxreg dw ? cxreg dw ? dxreg dw ? sireg dw ? direg dw ? bpreg dw ? spreg dw ? flreg dw ? esreg dw ? csreg dw ? ssreg dw ? dsreg dw ? bpsave dw ? ; just here for debugging chan dw ? ; mowse channel datac dw ? ; count of datap to use for snddat datap dw 3 dup(?); pointers to data strings for snddat datal dw 3 dup(?); length of data strings for snddat pkthdr db 8 dup(?); packet header work area wsparm dw ? ; base address for local data ws_stack ends ;/* END INCLUDE FILE ws_stack.mac */   wsmincap.h 08/07/87 1521.8rew 08/07/87 1438.8 38862 /* BEGIN INCLUDE FILE: wsmincap.h */ /* HISTORY COMMENTS: 1) change(86-05-31,Westcott), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Created. 2) change(86-09-02,Flegel), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Added MOWSE_DETACHED, MOWSE_ATTACHED minor. 3) change(86-11-20,Flegel), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Combined with ws_caps to bring all predefined minor capability numbers under one roof. 4) change(86-11-21,Flegel), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): Added SET_SUSPEND/RESET_SUSPEND minors. END HISTORY COMMENTS */ /* FUNCTION: Defines the dedicated minor capability numbers used by MOWSE. These minor capability numbers should be supported by all MOWSE applications. Equivalent include file wsmincap.mac */ #define EXECUTE_COMMAND_REPLY 32 /* Execute command reply */ #define WSCOMREP 32 #define FAIL_CAPABILITY 33 /* Execute capability failed */ #define WSFAILCP 33 #define WS_EXECUTE_COMMAND 34 /* Execute command */ #define WS_ADD_TO_RAT 35 /* Add to RAT */ #define WS_DELETE_FROM_RAT 36 /* Delete from RAT */ #define SUSPEND_APPLICATION 37 /* Suspend BG application */ #define WSSUSAPP 37 #define RESUME_APPLICATION 38 /* Resume BG application */ #define WSRSMAPP 38 #define TERMINATE_APPLICATION 39 /* Terminate BG application */ #define WSTRMAPP 39 #define RESET_APPLICATION 40 /* Reset BG application */ #define WSRSTAPP 40 #define RESET_REPLY 41 /* BG application reset */ #define WSRSTREP 41 #define WAKE_UP 42 /* Wake up BG application */ #define WSWAKEUP 42 #define GET_STATUS 43 /* Status request */ #define WSSTATUS 43 #define MESSAGE_TOO_LONG 44 /* Buffer overflow */ #define WSOVRFLW 44 #define SYSTEM_ERROR 45 /* System error occurred */ #define WSSYSERR 45 #define QUERY_REPLY 46 /* Query reply */ #define WSQRYREP 46 #define RESPONSE_CONNECT 47 /* Connect response */ #define WSRESPCN 47 #define RESPONSE_DISCONNECT 48 /* Disconnect response */ #define WSRESPDS 48 #define REQUEST_CONNECT 49 /* Connect request */ #define WSRQSTCN 49 #define REQUEST_DISCONNECT 50 /* Disconnect request */ #define WSRQSTDS 50 #define WS_SET_SLEEP_FLAG 53 /* Set sleep flag */ #define WS_RESET_SLEEP_FLAG 54 /* Reset sleep flag */ #define SET_SUSPEND 55 /* Set suspend on remote cat */ #define RESET_SUSPEND 56 /* Reset suspend on remote cat */ #define STATUS_REPLY 57 /* reply to get_status */ #define STATREPL 57 /* Special internal MOWSE minor caps for PAD */ #define PARTIAL_MESSAGE 51 /* Message fragment */ #define CONTINUE_MESSAGE 52 /* Request for message */ /* The following minor capability numbers should be supported by foreground MOWSE applications. */ #define FG_CONTROL_MESSAGE 33 /* Control message for WSTERM */ #define FGCONTRL 33 #define FG_BREAK 34 /* Foreground break */ #define FGBREAK 34 #define FG_TERMINAL_DATA 35 /* foreground terminal data */ #define FGDATA 35 #define FG_MORE_DATA 36 /* more data to follow */ #define FGMORDAT 36 #define BG_MESSAGE 37 /* background message */ #define BG_QUERY 38 /* background query */ #define MOWSE_DETACHED 39 /* Multics MOWSE not attached */ #define DETACHED 39 #define MOWSE_ATTACHED 40 /* Multics MOWSE attached */ #define ATTACHED 40 /* END INCLUDE FILE: wsmincap.h */   wsmincap.mac 08/07/87 1522.4rew 08/07/87 1449.9 30681 ;/* BEGIN INCLUDE FILE: wsmincap.mac */ ; ; HISTORY COMMENTS: ; 1) change(86-05-31,Westcott), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; 2) change(86-09-02,Flegel), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Added MOWSE_DETACHED, MOWSE_ATTACHED minor. ; END HISTORY COMMENTS ;/* FUNCTION: ; ;Defines the dedicated minor capability numbers used by MOWSE. These minor ;capability numbers should be supported by all MOWSE applications. Equivalent ;include file wsmincap.h ;*/ EXECUTE_COMMAND_REPLY = 32 ; Execute command reply WSCOMREP = 32 FAIL_CAPABILITY = 33 ; Execute capability failed WSFAILCP = 33 WS_EXECUTE_COMMAND = 34 ; Execute command WS_ADD_TO_RAT = 35 ; Add to RAT WS_DELETE_FROM_RAT = 36 ; Delete from RAT SUSPEND_APPLICATION = 37 ; Suspend BG application WSSUSAPP = 37 RESUME_APPLICATION = 38 ; Resume BG application WSRSMAPP = 38 TERMINATE_APPLICATION = 39 ; Terminate BG application WSTRMAPP = 39 RESET_APPLICATION = 40 ; Reset BG application WSRSTAPP = 40 RESET_REPLY = 41 ; BG application reset WSRSTREP = 41 WAKE_UP = 42 ; Wake up BG application WSWAKEUP = 42 GET_STATUS = 43 ; Status request WSSTATUS = 43 MESSAGE_TOO_LONG = 44 ; Buffer overflow WSOVRFLW = 44 SYSTEM_ERROR = 45 ; System error occurred WSSYSERR = 45 QUERY_REPLY = 46 ; Query reply WSQRYREP = 46 RESPONSE_CONNECT = 47 ; Connect response WSRESPCN = 47 RESPONSE_DISCONNECT = 48 ; Disconnect response WSRESPDS = 48 REQUEST_CONNECT = 49 ; Connect request WSRQSTCN = 49 REQUEST_DISCONNECT = 50 ; Disconnect request WSRQSTDS = 50 WS_SET_SLEEP_FLAG = 53 ; Set sleep flag WS_RESET_SLEEP_FLAG = 54 ; Reset sleep flag SET_SUSPEND = 55 ; Set suspend on remote cat RESET_SUSPEND = 56 ; Reset suspend on remote cat STATUS_REPLY = 57 ; reply to get_status STATREPL = 57 ;/* Special internal minor capability numbers for PAD */ PARTIAL_MESSAGE = 51 ; Message fragment CONTINUE_MESSAGE = 52 ; Request for message ;/* The following minor capability numbers should be supported by foreground ; MOWSE applications. */ FG_CONTROL_MESSAGE = 33 ; foreground control message FGCONTRL = 33 FG_BREAK = 34 ; foreground break FGBREAK = 34 FG_TERMINAL_DATA = 35 ; foreground terminal data FGDATA = 35 FG_MORE_DATA = 36 ; more data to follow FGMORDAT = 36 BG_MESSAGE = 37 ; background message BG_QUERY = 38 ; background query MOWSE_DETACHED = 39 ; mowse inactive on Multics side DETACHED = 39 MOWSE_ATTACHED = 40 ; mowse active on Multics side ATTACHED = 40 ; /* END INCLUDE FILE: wsmincap.mac */   xoscall.mac 08/07/87 1522.4rew 08/07/87 1449.1 8037 ;/* BEGIN INCLUDE FILE: xoscall.mac */ ; HISTORY COMMENTS: ; 1) change(85-12-30,ASmith), approve(87-07-13,mcr7580), ; audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): ; Created. ; END HISTORY COMMENTS ;/* : FUNCTION ; ;Provide macros to generate DOS and BIOS calls to the operating system ;*/ @bioscall MACRO call_num,parm ;; Generates an 'int call_num', with parm in AH ifnb ;True if parm not blank mov AH,parm endif int call_num ;Generate interrupt call_num ENDM @doscall MACRO function,parm ;; Generates a DOS function call with parm in AL ifnb ;True if parm not blank mov AL,parm endif @bioscall 21h,function ;Generate bios call to DOS ENDM ; /* END INCLUDE FILE: xoscall.mac */ bull_copyright_notice.txt 08/30/05 1008.4r 08/30/05 1007.3 00020025 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group Bull including Bull HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell Bull Inc., Groupe Bull and Bull HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato.Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, Bull or Bull HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by Bull HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved