[fa.info-mac] MS-BASIC program to get MacsBug

info-mac@uw-beaver (info-mac) (08/09/84)

From: Dale Carstensen C-3 <dlc@lanl>
The following program copies a .dl version of macsbug to a data file.
10 REM This program copies "macsbug.dl" (made by doing a "tohex" on the
20 REM file FTP'ed from SUMEX, with name "m.d") to a working data file on
30 REM the Macintosh.  If you don't have 48K (or slightly more?) of free
40 REM space on your MS-BASIC disk, you should put "m.b" on a separate
50 REM disk, and prefix the file names in lines 100 and 110 with the name
60 REM of that disk followed by a colon (for example, "SuMacC:m.d").
100 OPEN "m.d" FOR INPUT AS #1
110 OPEN "xMacsBug" FOR OUTPUT AS #2
120 LINE INPUT#1, L$
130 FOR I = 1 TO 248
140 W$ = ""
150 FOR J = 1 TO 2
160 LINE INPUT #1, L$
170 FOR K= 1 TO 65 STEP 2
180 B = (ASC(MID$(L$, K, 1))-64) * 16 + ASC(MID$(L$, K + 1, 1)) - 64
190 W$ = W$ + CHR$(B)
200 NEXT K
210 NEXT J
220 PRINT #2, W$;
230 NEXT I
240 CLOSE #1
250 FOR I = 1 TO 16
260 PRINT#2,CHR$(0);
270 NEXT I
290 CLOSE #2
300 END