' PFLOAD - Atari Portfolio Bootstrap File Loader ' Written by Michael D. Weisner, Jan 6, 1990 ' Placed in public domain to help others in need ' ' Called from PFBOOT.BAT ' PRINT "PFLOAD - Atari Portfolio loader" OPEN "B", #1, COMMAND$ OPEN ENVIRON$("PFSPEC") FOR RANDOM AS #2 lf$ = CHR$(10) eofchr$ = CHR$(26) a$ = " " eofflag = 0 n = 0 PRINT "Downloading "; COMMAND$; "..."; t = TIMER + 1 DO LOOP UNTIL TIMER > t IF LOC(2) THEN b$ = INPUT$(LOC(2), #1) DO GET #1, , a$ n = n + 1 IF EOF(1) THEN EXIT DO ELSE PRINT #2, a$; IF a$ = eofchr$ THEN eofflag = 1 IF (n MOD 128) = 0 OR a$ = lf$ THEN t = TIMER + .25 DO LOOP UNTIL TIMER > t END IF END IF LOOP IF eofflag = 0 THEN PRINT #2, eofchr$; CLOSE #1 ON ERROR GOTO errchk OPEN "i", #1, "chksum.dat" PRINT "checking..."; DO LOOP UNTIL (LOC(2) >= 4 OR INKEY$ <> "") IF LOC(2) >= 4 THEN a$ = INPUT$(4, #2) INPUT #1, b$ IF a$ <> b$ THEN PRINT PRINT "Bad Checksum"; TAB(30); "Good Checksum" PRINT a$; TAB(30); b$ ELSE PRINT "OK" CLOSE #1 KILL "chksum.dat" END IF ELSE PRINT "No response from Portfolio, abort" END IF CLOSE #1 CLOSE #2 SYSTEM errchk: IF ERR = 53 THEN ' CHKSUM.DAT does not exist, no checking PRINT "no checking" ELSE DO READ a, a$ LOOP UNTIL (a = ERR OR a = 256) PRINT PRINT a$ END IF RESUME errnext errnext: ON ERROR GOTO 0 CLOSE #1 CLOSE #2 SYSTEM DATA 2,"Syntax error in DATA statement" DATA 3,"RETURN without GOSUB",4,"Out of DATA" DATA 5,"Illegal function call",6,"Arithmetic overflow" DATA 7,"Out of memory for file buffer" DATA 9,"Subscript out of range" DATA 10,"Redimensioned array" DATA 11,"Division by zero",13,"Argument type mismatch" DATA 14,"Out of string space" DATA 16,"String formula too complex",19,"No RESUME" DATA 20,"RESUME without error",24,"Device timeout" DATA 25,"Device fault",27,"Out of paper" DATA 39,"CASE ELSE expected",40,"Variable required" DATA 50,"FIELD overflow" DATA 51,"Internal error" DATA 52,"Bad file name or number",53,"File not found" DATA 54,"Bad file mode",55,"File already open" DATA 56,"FIELD statement active",57,"Device I/O error" DATA 58,"File already exists",59,"Bad record length" DATA 61,"Disk full",62,"Input past end" DATA 63,"Bad record number",64,"Bad file name" DATA 67,"Too many files",68,"Device unavailable" DATA 69,"Communication buffer overflow" DATA 70,"Permission denied (write protected disk)" DATA 71,"Disk not ready",72,"Disk media error" DATA 73,"Advanced feature unavailable",74,"Rename across disks" DATA 75,"Path/File accesss error",76,"Path not found" DATA 256,"No description for error"