Date : Fri, 21 Dec 1984 22:43:42 PST
From : NBaheti.es@XEROX.ARPA
Subject: Basic "MBOOT" program
Andrew: I think that this program will do what you are looking for.
Let me know how it truns out...
80 REM It will work with the Xerox as well as the Kaypro
90 REM FOR THE KAYPRO
100 GOTO 280
110 X=(INP(STATUS)AND RMASK):RETURN
120 Y=INP(MODEM):RETURN
130 X=(INP(STATUS)AND SMASK):RETURN
140 OUT MODEM,Y:RETURN
150 GOSUB 130:IF X THEN 140 ELSE 150
160 GOSUB 110:IF X THEN 120 ELSE 160
170 GOSUB 110:IF X THEN GOSUB 120:PRINT CHR$(Y);:GOTO 170
180 Y$="":Y$=INKEY$:IF Y$=""THEN 170
190 IF Y$=T$ THEN Y$=DC3$ ELSE IF Y$=ESC$ THEN Y$=ETX$
200 IF Y$<>E$ THEN Y=ASC(Y$):GOSUB 140:GOTO 170
210 INPUT "ENTER FILE NAME TO RECEIVE? ",F$:OPEN "R",1,F$
220 FIELD 1,128 AS A$:Y=NAK:GOSUB 150:FOR I=1 TO 1E+06:PRINT I;CHR$(13);
230 C=0:GOSUB 160:IF Y=EOT THEN Y=ACK:GOSUB 150:CLOSE 1:PRINT CHR$(7):GOTO 170
240 GOSUB 160:J=Y:GOSUB 160:IF J+Y<>255 THEN C=13
250 FOR J=1 TO 128:GOSUB 160:MID$(B$,J,1)=CHR$(Y):C=C+Y:NEXT
260 GOSUB 160:C=(C AND 255):IF C<>Y THEN Y=NAK:GOSUB 150:GOTO 230
270 LSET A$=B$:PUT 1,I:Y=ACK:GOSUB 150:NEXT
280 MODEM=&H04:STATUS=&H06:RMASK=1:SMASK=4
290 B$=STRING$(128,0):ACK=6:NAK=21:E$=CHR$(5):WIDTH 255:EOT=4
300 ESC$=CHR$(27):ETX$=CHR$(3):DC3$=CHR$(19):T$="~":GOTO 170
BMODEM.DOC
THIS IS A VERY BASIC MODEM PROGRAM FOR THOSE WHO DON'T HAVE
THE PATIENCE FOR DEALING WITH MBOOT3.
THE ONLY LINE THAT NEEDS ALTERING IS 280 IN WHICH YOU PUT
MODEM PORTS IN (HEX OR DEC) AND THE RECIEVE & SEND BIT MASKS.
When you run the program it will act like a very dumb terminal
Use it to log on and setup XMODEM to send you a
better modem program or USQ.
CTRL E asks you for the filename to be received.
An ESC will transmit CTRL C to the remote machine.
A tilde will transmit a CTRL S.
To dial the Hayes modem enter ATDT <phone number>
Altered for the Xerox 820,820-II, and 16/8 on 12/07/84
-Arun Baheti
[NBaheti.es@Xerox.Arpa]