11/28/88 load_mowse Syntax as a command: load_mowse {filename} Function: Transfers the file mowse.com, exitmows.com, bft.com, bft_load.com, or wsterm.exe as specified by the argument "filename" to an IBM PC or compatible. This facility is used to install MOWSE and BFT on the PC only if no other transfer facility exists which can transfer binary executable files. This code for the program must be entered on the PC, as described below. The files (as listed above) are found in >library_dir_dir>unbundled>object>pc_mowse_executable.archive. Arguments: filename is the name of the file to be transfered. It must be mowse.com, exitmows.com, bft.com, bft_load.com, or wsterm.exe. Notes: In order to use load_mowse it is necessary to type in a Basic program on the PC. This program is approximately 100 lines long. It must be typed into the Basic subsystem on the PC. The code for the program is contained at the end of this file. Notes on use: 1) type in: basic /c:10000 2) type in program (code supplied) [SAVE -optional] 3) press the key, or type: run 4) login to Multics 5) enter the command: load_mowse {filename} where filename is on of the files specified above 6) repeat 5 until all necessary files are transferred 7) upon completion of transfer, logout from Multics 8) press the key 9) type in: SYSTEM The size of the communication buffer should be increased with the '/c:'command when Basic is first invoked (ie. basic /c:10000). This will help prevent communication buffer overflow. The comments with the program do not have to be typed in. Once entered, the program can be saved as a Basic file, but this is not necessary. It is useful only for transferring MOWSE and BFT, and BFT can then be used to transfer any other desired files. If you want to save it you must do so before you enter 'system' at the Basic command level or the program will be lost. Typing 'save filename' will do this. Once the program is entered you use the function key or type 'run' to start it working. You then have to login to your Multics account. The PC will act as a Multics terminal until you type 'load_mowse {filename}', where {filename} is mowse.com, exitmows.com, bft.com, bft_load.com, or wsterm.exe. The named file will then be transferred to the PC. After the first file is transferred, use the load_mowse command to transfer the second file, and so on. There is no way to recover from transmission errors. This means that if there are ANY errors in transmitting the file, you have to retransmit the entire file. There are two general ways that the program can fail. If the PC receives anything other than a character or the check_sum for a particular packet is different from what the packet sum is, then the PC will tell Multics to stop sending data. This will return you to Multics command level and you can start the transmission again. Alternately, the PC could experience problems such as buffer overflow or a bad file name when attempting to open the file for saving data etc. In these cases you are returned to the PC basic level. You then have to run the basic program again and re-log in to Multics. Note: you do not need to re-type the program in this case, just issue the run command again. When load_mowse finishes sending a file, and there are no errors, you are returned to Multics command level. To exit Multics you logout normally. This places you back in the PC Basic program which will give you the Multics login banner. To exit the Basic program you hit the ESC key on the keyboard. This returns you to Basic on the PC. Notes on load_mowse code: 100 REM ********************************************************** 110 REM * 120 REM * Copyright, (c) Honeywell Information Systems Inc., 1986 130 REM * Copyright, (c) 1986 by Massachusetts Institute of 140 REM * Technology and Honeywell Information Systems, Inc. 150 REM * 160 REM ********************************************************** 170 REM TERMINAL EMULATOR AND TRANSFER PROTOCOL 180 SCREEN 0,0: WIDTH 80 190 KEY OFF: CLS: CLOSE: 'FUNC KEYS OFF, CLEAR SCRN 200 COLOR 2 'PRETTY COLOR 210 LOCATE 1,1,1 220 OPEN "COM1: 9600,E,7,1,CS,DS" AS #1 'OPEN COM LINE TO MULTICS 230 PRINT #1, "loadmowse 1.0" 240 B$ = INKEY$ 'GET INPUT FROM KEYBOARD 250 IF B$ = "" THEN 280 'NO KEYBOARD INPUT, CHECK MULTICS 260 IF ASC(B$) = 27 THEN 380 'IF ESC KEY THEN QUIT 270 PRINT #1, B$; 'OTHERWISE SHIP KEY TO MULTICS 280 IF LOC(1) < 1 THEN 240 'NO MULTICS INPUT,CHECK KEYBOARD 300 A$ = INPUT$(LOC(1), #1) 'ELSE GET BUFFER INPUT 301 C$ = C$ + A$ 'CATENATE TO START TEST BUFFER 302 J = INSTR(C$,"s") 'LOOK FOR THE s IN srtr 303 IF J = 0 THEN 315 'NO, THEN LOOK LATER 304 IF LEN(C$) - J < 3 THEN 320 'NOT ENOUGH AFTER s FOR strt 310 IF INSTR(C$,"strt") THEN Z=1: GOTO 320 'strt IS THERE SO SET START FLAG 315 C$ = "" 'RESET START TEST BUFFER 320 IF X > 0 THEN MID$(A$, X)=CHR$(255) ' EXTRA 330 X = INSTR(A$, CHR$(10)) ' LINE 340 IF X > 0 THEN 320 ' FEEDS 350 IF Z > 0 THEN GOSUB 500: GOTO 280 360 PRINT A$; 'PRINT 370 GOTO 240 'RECHECK KEYBOARD 380 CLOSE 'CLOSE ALL FILES 390 CLS: COLOR 2 'CLEAR SCREEN, PRETTY COLOR 400 END 500 PRINT #1, "y" 'ALLOW MULTICS TO CONTINUE 510 FOR I = 1 TO 5: C$ = " ": WHILE C$ <> "*": C$ = INPUT$(1,#1): WEND: NEXT I 'DISCARD 5 * PRECEEDING FILENAME 520 WHILE LOC(1) < 12: WEND: FOR I = 1 TO 100: NEXT I: N$ = INPUT$(LOC(1),#1) 'GET FILENAME FROM MULTICS 530 OPEN N$ AS #2 LEN = 1 'OPEN FILE ON PC 540 FIELD #2, 1 AS BITS$ 550 CLS: 560 Z = 1 570 WHILE X = 0 'RECEIVE UNTIL EOF 580 PRINT #1, "y" 'ALLOW MULTICS TO CONTINUE 590 S = 0 600 FOR I = 1 TO 4 610 WHILE LOC(1) < 2: WEND 'WAIT FOR PACKET 620 B1$ = INPUT$(1, #1): IF B1$ < CHR$(32) THEN 620 630 B2$ = INPUT$(1, #1): IF B2$ < CHR$(32) THEN 630 640 B1 = ASC(B1$): S = S + B1 'GET ASCII VALUE FOR... 650 B2 = ASC(B2$): S = S + B2 '...EACH CHARACTER 660 IF B1 = 92 AND B2 = 55 THEN X = 0: GOTO 830 'EOF SIGNAL 670 IF B1 < 32 OR B2 < 32 THEN X = 1: PRINT B1, B2: GOTO 830 'ERR SIGNAL 680 IF B1 > 48 OR B2 > 48 THEN X = 1: PRINT B1, B2: GOTO 830 'ERR SIGNAL 690 B1 = B1 - 32 'SUBTRACT CHAR VALUE FROM... 700 B2 = B2 - 32 '...EACH BYTE 710 B1 = B1 * 16 'SHIFT HIGH ORDER BYTE LEFT 720 B3 = B1 + B2 'COMBINE TO FORM ORIGINAL 730 LSET BITS$ = MKI$(B3) 'MAKE PC "SEE" BITS 740 PUT #2 'PRINT VALUE TO PC FILE 750 NEXT I 760 LOCATE 25, 1: PRINT N$": packets received: "Z: Z = Z + 1 770 PRINT #1, "y" 'ALLOW MULTICS TO CONTINUE 780 Q1$ = INPUT$(1, #1): IF Q1$ < CHR$(30) THEN 780 'READ CHECKSUM FROM LINE 790 Q1 = ASC(Q1$) 800 S2 = ((S - INT(S/30) * 30) + 30) * 2 'FORMAT CALCULATED CHECKSUM 810 IF Q1 <> S2 THEN X = 1: GOTO 830 'IF CHECKSUMS DON'T MATCH-ERROR 820 WEND 830 CLOSE #2 'CLOSE PC FILE 840 IF X = 0 THEN PRINT "transfer finished" ELSE PRINT "error in transmitting": PRINT #1, "q" 860 A$ = "" 'CLEAR INPUT STORAGE 870 IF LOC(1) > 0 THEN C$ = INPUT$(LOC(1), #1) 'CLEAR COMM LINE 880 RETURN Notes on baud rate: When entering line 230 of the program, the OPEN statement, you must enter the correct baud rate for the communication line that you are using. This is the first number in the code line given (ie. 9600). This number can range from 300 to 9600 depending on the line. Notes on filename length: When entering line 520, the code awaits for 12 characters of input before extracting the filename from the communications buffer. This may not always be the case (12 character filenames). It may be necessary to adjust the "12" in the "WHILE LOC(1) < 12" statement to be the actual length of the filename. For instance, set it to "7" for transfer of "bft.com". ----------------------------------------------------------- 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