Pascal
UCSD Pascal System
File doesn't exist
PASCAL NOTE: Guy Stefan-Romano, 99ers Users Group. Sept 1984:
'FILE DOESN'T EXIST" after adding a UNIT to SYSTEM.LIBRARY:
In most USCD Pascals. the system is not provided with a SYSTEM.LIBRARY. TI placed parts of Pascal that would normally reside on disk/ram into chips on the card, to allow our tiny machine to run Pascal. TI also provided a SYSTEM.LIBRARY to allow use of sound, graphics. speech etc.
Because installation of a new UNIT into a SYSTEM.LIBRARY requires that a file be open while data is manipulated, the existing SYSTEM.LIBRARY data is quite vulnerable. TI added protection.
You need to call a temporary File -say USER.LIB. transfer all UNITS in SYSTEM.LIBRARY to USER.LIB, then add your new UNITS to USER.LIB and IF all goes well, rename the USER.LIB file SYSTEM.LIBRARY
What is P-Code?
P-Code can be thought of as a universal assembly type language. P-Code was developed to be transportable to different platforms for execution. The TI-99/4A supports P-Code with the use of the P-Code card. Some other platforms that support P-Code are: Z80, Motorola 6800/68000, Intel 8086/8088 and many others.
A sample of USCD Pascal coding
This program will backup any disk using sector I/O; both 1 and multiple drives and single/double sided. Written in UCSD Pascal for the TI 99/4A.
{$L PRINTER: } program fastback;
buffer:array[1..5120] of integer; inunit,outunit:integer; blkbase,blklimit:integer; ch:string[9]; procedure getfrom; begin inunit:=0; while (inunit,.4) and (inunit,.<>5) and (inunit<>9) do begin write('Enter Source Drive # (4,5,9) '?'); readln(inunit) end; blkbase:=0; while (blkbase<>180) and (blkbase <> 360) do begin write('# blocks to copy (180/360) ?') readln(blkbase) end; blklimit:=(blkbase div 10) - 1; end; procedure getto; begin outunit:=0; while (outunit<>4) and (outunit<>5) and (outunit<>9) do begin write('Enter Copy Drive # (4,5,9) ?'); readln(outunit) end end; beqin writeln('FASTBACK [V1,0]'); qetfrom; getto; writeln('insert disks-- to start'); readln(ch); for blkbase:=0 to blklimit do begin if inunit=outunit then beqin write( ' Insert MASTER disk--press when ready'); readln(ch) end; unitread(inunit,buffer,5120,blkbase*10); if inunit=outunit then begin write('Insert COPY disk--Press when ready'); readln(ch) end; unitwrite(outunit,buffer,5120,blkbase*10) end; write1('Copy Complete.') end.
Turbo Pasc'99
add text