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}  ڰrͲ`rn\"[;W @@{ _r@/$;Vp8"9Zۘ!.+ @ppPWJB]m+@ @`!/!͠"rn\"[;W @{ _r@/$;V8"Zڀ!.+ @ppP WJB]m+@ @`!'-gͯ@"rn\"[;W @{(@{(A{ Nn 0$"3@:tN 3@@9?lf Ktn%rRaU 9|ۮW@jB]m+ ]` ڸpD  24.COR55E88.CVTFLTrTE%48Ȱ.ERRORbUDh͠.FMULTBuHȈ.ILT4EdIS E$HRMODA_r@ $;Vru\0 Հ]m+@ @`TB_.  ڰ`\-V+4hX.6ۮW& @ppB]jʈɊ`\ȫ *ѓ \gɪ \B&G3SSd5$TACREMOA 1t iSL@?Zb(P ؁̀>  nHaS`k XT|i 0.ENTRSCbUDiTuDtU(TOLOWERAۦ@Du@/3M|iR;tæv:  rTE%48.EXITFBYTTuDUU(TOUPPERAۦ@Du@/3M|iR;tæv:  rTE%48.EXITFBY 55E(STRA7MGtn-p!g7Ytnߍsf~ۧGtn 3" 3@:`KtrV3?ܢ9D 7Mφtn_4vhdMφW/ݥ!@=n~7LЈ(Tn7L}  sf~A@mtN3[CorE(rk0tn@3>ۥtf0mn33[BR+0tn7ғtnnV7ґ\9MϦn-p!^)ۥͺn~7L[tn_sf}ۧGta0#0@ &3ː/ MQN2 ˑS0II=J2VU4%3 S#.@9 Y2S#!03 L$@02DUS' 58POSA7\ ?͠+5Fb^r@ p$|_6Vjaҽ7N@6!`d"*))P@1r*J4d))")FM@*Jr"*ՐS 5dVALAۦCB04]jiItN!$# 9QIM2>VUH dtDGOTOXYAC`(q@ 3@Q@ S+f7`HD> D "5LQt na2@n02F`AȩʊJhq \V&&3R:FILE: BERRIES.PLT *START T: TYPE STRAW BERRIES OR ELSE A: M:STRAW BERRIES JN: *START T: I SURE LIKE @ans@ AND CREAM E: NUMBER SIZE NAME COMMENTS ------ ---- --------------- ----------------------------------------------- 000.1 9K ASL.REL A Small Library. Contains assembly language modules used with PILOT/P. 000.2 1K BERRIES.PLT Short prgm demoing matching exactly. 000.3 1K CHAIN.REL Module that is used for linking programs. 000.4 1K CHAIN.SUB Batch processor for linking programs. 000.5 34K CPM.HLP Data file used with TUTORIAL.PLT. 000.6 4K DISK.COM Execllent file transfer prgm. 000.7 3K DO.COM A replacement program for submit.com. 000.8 2K GOLDI.PLT Fantasy about a girl and 3 bears. 000.9 2K HIPILOT.PLT Interactive session program. 000.10 1K LESSON1.PLT This is a chained program under LESSONS. 000.11 1K LESSON2.PLT This is a chained program under LESSONS. 000.12 1K LESSONS.PLT Driver program for chaining sample lessons. 000.13 1K LMENU.PLT Menu prgm for LESSONS; prgms chain back here. 000.14 3K MATCH.PZ Source code for the Match routine. 000.15 1K MATCH.REL Assembly language module. 000.16 5K MATCH.SRC Assembly source code. 000.17 2K PRIMS.PZ Declarations for the routines in ASL.REL. 000.18 14K PILOT/P.COM PILOT/P object program. 000.19 14K PILOT/P.DOC Documentation of PILOT/P. 000.20 3K PILOT/P.HDR An include file for PILOT/P. 000.21 17K PILOT/P.PAS PILOT/P source code (Pascal/Z compiler). 000.22 9K PILOT/P.REF Quick Reference Guide. 000.23 1K PILOT/P.SUB Batch processor file to be used with DO.COM 000.24 4K PILOT/PR.HDR The include file with RANDOM and real #s. 000.25 4K SAGE.PLT Lesson in abstraction. 000.26 1K SAMPLE1.PLT Demo - Type, Accept, Match and X. 000.27 1K SAMPLE2.PLT Demo - subroutine. 000.28 2K SAMPLE3.PLT Demo - Menues, selection, and subroutine. 000.29 1K SAMPLE4.PLT Demo - output text to printer device. 000.30 1K SAMPLE5.PLT Demo - reading a data file. 000.31 1K SAMPLE6.PLT Demo - the WAIT stmt. 000.32 1K SAMPLE7.PLT Demo - RANDOM, RND, and RANDOMIZE. 000.33 2K TUTORIAL.PLT Pascal and PILOT program. Tutorial on CP/M using the data file CPM/HLP. 000.34 1K WAIT.PZ Source code for the Wait routine. 000.35 1K WAIT.REL Assembly language module. 000.36 2K WAIT.SRC Assembly source code. 000.37 4K XDIR.COM Super extended directory program. PRSb40:RS0j!.4 urAl6H E/ u!@.an e iwFK1rBJq$d#$' A1rzrJtd(")'FGr*b ,:SUBMIT CHAIN Program DriveUnit [Optional libraries] :SUBMIT CHAIN LESSONS B PILOT/P $2:$1 PASCAL $1.$2$2X ASMBL $1.$2$2/REL ERA $2:$1.SRC LINK /N:$2:$1 chain $2:$1 asl/s $3 $4 $5/E ERA $2:$1.REL DIR $2:$1.* Pascal $1.$2$2X asmbl $1.$2$2/rel ERA $2:$1.SRC LINK /N:$2:$1 $2:$1/V asl/s $3 $4 $5/E ERA $2:$1.REL DIR $2:$1.* 65 :General Information on CP/M .break CP/M is a monitor control program for microcomputer software development which uses IBM-compatible flexible disks (floppy disks) for mass storage. Using a microcomputer mainframe based on Intel's 8080 or Zilog's Z80 microprocessor, CP/M provides a general environment for program construction, storage, and editing, along with assembly and program debug facilities. An important feature of CP/M is that it can be easily altered to execute with any computer configuration which uses an Intel 8080 or Zilog Z80 Microprocessor and has at least 20K bytes of main memory with up to eight IBM-compatable diskette drives. The CP/M monitor provides access to programs through a comprehensive file management system. The file subsystem supports a named file structure, allowing dynamic allocation of file space as well as sequential and random file access. Using this file system, up to 128 distinct programs can be stored in both source and machine-executable form. Digital Research, the designer of CP/M, has provided a set of nine manuals which describe the use and operation of CP/M in detail. .pause .break These manuals are: 1. An Introduction to CP/M Features and Facilities 2. ED: A Context Editor for the CP/M Disk System 3. ASM: CP/M Assembler User's Manual 4. DDT: CP/M Dynamic Debugging Tool User's Manual 5. CP/M 1.4 Interface Guide 6. CP/M 1.4 System Alteration Guide 7. CP/M 2.0 User's Guide 8. CP/M 2.0 Interface Guide 9. CP/M 2.0 System Alteration Guide As the reader can see, CP/M supports a context editor, an assembler (Intel-compatable), and a debugger system. These are available in the basic CP/M package. There is a large variety of other software available which can run under CP/M with little or no modification. Such software includes several assemblers (both 8080 and Z80), a symbolic debugger, several high-level languages (including FORTRAN IV {compiler}, BASIC-E {translator}, CBASIC {translator}, many interpretive BASICs, ALGOL, FOCAL, and C), and several special-purpose applications programs (such as text formatting systems and accounting systems). This HELP File addresses itself specifically to the CP/M 2.x Operating Systems. .pause .end 66 :CP/M File References .break A file reference identifies a particular file or group of files on a particular disk attached to CP/M. These file references can be either unambiguous (ufn) or ambiguous (afn). An unambiguous file reference uniquely identifies a single file, while an ambiguous file reference may be satisfied by a number of different files. An unambiguous file reference is an exact name of the specified file. It consists of up to eight characters in the file name and three characters in the file type. An unambiguous file reference is of the form -- pppppppp.sss The characters used in specifying an unambiguous file reference may not contain any of -- < > . , ; : = ? * [ ] An ambiguous file reference is used for directory search and pattern matching. The form of an ambiguous file reference is similar to an unambiguous reference, except the symbol '?' may be interspersed throughout the file reference. In various commands throughout CP/M, the '?' symbol .pause .break matches any character of a file name in the '?' position. For example, X?Y.C?M will match XZY.COM and X3Y.CEM. The '*' symbol is used to match all characters of a file name or file type. For example, *.COM will match XZY.COM and HELP.COM, while HELP.* will match HELP.COM and HELP.HLP. .pause .end 67 :CP/M Line Editing and Output Control .break The following are the line editing functions supported by CP/M -- rubout Delete and echo the last character typed at the console. Ctrl-H Delete the last character typed; Backspace one character; CRT-oriented Ctrl-U Delete the entire line typed at the console. Ctrl-X Delete the entire line typed at the console; Backspace to the beginning of the current line; CRT-oriented. Ctrl-R Retype current command line: types a "clean line" following character deletion with rubouts. Ctrl-E Physical end of line: carriage is returned, but line is not sent until the carriage return key is depressed. Ctrl-M Terminates input (carriage return). Ctrl-J Terminates current input (line feed); CRT-oriented Ctrl-C This is used in CP/M to re-initialize the system. Anytime you change diskettes in a drive, you should type control-C so that the operating system will know that a diskette was changed. Ctrl-Z End input from the console (used in PIP and ED). .pause .break Other control functions affect console output -- Ctrl-P This code is used to tell CP/M that characters sent to the screen should also be sent to the printer. This will remain in effect until you press control-P a second time to turn off the routing to the printer, or until you reset the system. Ctrl-S This is used to pause or "freeze" the characters that are scrolling by on the screen. Pressing any other character will resume output (scrolling) to the screen. Input lines can generally be up to 255 characters in length. They are not acted upon until the carriage return key is typed. .pause .end 68 :CP/M Built-In Commands .break The ERA Command This command is used to erase files from a diskette. The format is: ERA FILENAME Where FILENAME is any valid CP/M filename. The filename may be prefixed by a drive designator (i.e. ERA B:FILENAME ). If no designator is given then the currently logged drive will be used. EXAMPLE To erase a file called "LETTER.TXT" from drive B, you would type: ERA B:LETTER.TXT .pause .break The DIR Command This command displays a list of all files on a diskette. Its format is: DIR x: Where x: is an optional drive designator (A:, B:, etc.). If no disk drive is specified, then CP/M will give you a listing of the files on the drive that is currently logged. EXAMPLE To get a listing of all the files on drive B, you would type: DIR B: .pause .break The REN Command You may change the name that you have given to a file with the REN command. To use the REN command, you would type: REN NEWNAME=OLDNAME EXAMPLE To change the name of the file "LETTER.TXT" on drive B to the new name "MEMO.TXT," you would type: REN B:MEMO.TXT=B:LETTER.TXT The SAVE Command The SAVE command places n pages (256-byte blocks) onto disk from the TPA and names this file ufn. The form of the SAVE command is: SAVE xx FILE.COM .pause .break The TYPE Command The TYPE command is used in CP/M to display a file on the screen. To use the TYPE command, enter the following: TYPE FILENAME This will cause the file to be sent to the screen of the terminal. When the file is being displayed, you may press CONTROL-S to stop the scrolling. To continue scrolling, press any other character. By preceding the TYPE command with a CONTROL-P, the output will also be sent to the printer. EXAMPLE To view a file called "LETTER.TXT" on drive B, enter: TYPE B:LETTER.TXT This command will only work to display text files. Displaying non-text files such as files ending in "COM," may cause your terminal to do strange things. .pause .break The USER Command Upon cold boot, the user is automatically logged in to User Area 0, which is compatible with CP/M 1.4 directories. The USER command allows the user to move to another logical area within the same directory; areas are numbered 0-15. The ERA, DIR, REN, SAVE, and TYPE commands apply to the current User Area. .pause .end 69 :CP/M Transient Commands .break The CP/M standard transient commands are -- STAT List the number of bytes of storage and data on the currently logged-in disk, provide statistical information about particular files, and display or alter device assignment. PIP Load the Peripheral Interchange Program for later disk file and peripheral transfer operations. ED Load and execute the CP/M text editor program. SUBMIT Submit a file of commands for batch processing. XSUB Used in conjunction with SUBMIT, transfers all buffered console input from CON: to the SUBMIT File. ASM Load the CP/M assembler and assemble the specified program from disk. LOAD Load the file in Intel "hex" machine code format and produce a file in machine executable form which can be loaded into the TPA (this loaded program becomes a new command under the CCP). .pause .break DDT Load the CP/M debugger into the TPA and execute it. DUMP Dump the contents of a file in hex. SYSGEN Create a new CP/M system diskette. MOVCPM Regenerate the CP/M system for a particular memory size. .pause .end 70 :Physical Device Assignments for ARIES-1 .break Logical Device Physical Device CON: TTY: Model 43 Teletype CRT: Hazeltine 1500 CRT BAT: CRT and Modem UC1: In=CRT, Out=CRT and Modem RDR: TTY: Model 43 Teletype PTR: Modem UR1: CRT and Modem w/CRT Output UR2: CRT and Modem PUN: TTY: Model 43 Teletype PTP: Modem UP1: CRT and Modem UP2: CRT and Modem LST: TTY: Model 43 Teletype CRT: Hazeltine 1500 CRT LPT: Modem UL1: CRT and Modem .pause .end 71 :CP/M STAT Command .break The STAT Command takes any of the following forms -- STAT Calculate the storage remaining on all active drives and print a message like x: R/W, SPACE: nnnK -- if disk is Read/Write x: R/O, SPACE: nnnK -- if disk is Read Only STAT x: Calculate the storage remaining on the specified drive and print BYTES REMAINING ON x: nnnK .pause .break STAT x:afn [$S] Scan the specified files on the specified drive (x: is optional), and list all files which satisfy the unambiguous reference in alphabetical order with storage requirements. A table like the following is generated -- Size Recs Bytes Ext Acc sssss rrrr nnnk ee a/b d:pppppppp.sss where sssss -- number of virtual 128-byte records in file This field is display if the optional $S is given rrrr -- number of 128-byte records in each extent of the file nnnK -- number of bytes (in K, K=1024) allocated to the file ee -- number of 16K extensions a/b -- access mode of file; R/O or R/W d:pppppppp.sss -- drive name (d may be A, B, C, D) and file name .pause .break STAT x:=R/O Set the specified drive to Read Only. This is cleared by a warm boot. When a disk is Read Only, the message BDOS ERR ON x: READ ONLY will appear if there is an attempt to write to it. STAT VAL: Summarize the status commands. STAT VAL: will print the list -- Temp R/O Disk: d:=R/O Set Indicator: d:filename.typ $R/O $R/W $SYS $DIR Disk Status : DSK: d:DSK: User Status : USR: Iobyte Assign: CON: = TTY: CRT: BAT: UC1: RDR: = TTY: PTR: UR1: UR2: PUN: = TTY: PTP: UP1: UP2: LST: = TTY: CRT: LPT: UL1: .pause .break STAT DEV: Display the current logical to physical device mapping. For example, the list may appear as -- CON: = CRT: PUN: = PTP: RDR: = UR1: LST: = TTY: STAT d:afn [$R/O or $R/W or $SYS or $DIR] Set the various permanent file indicators. R/O=Read/Only, R/W=Read/Write, SYS=System, DIR=Non-System STAT ld1=pd1, ld2=pd2, ... Change the logical to physical device assignments. Logical device ld1 is assigned to physical device pd1, etc. The valid logical device names are -- CON: The system console device RDR: The paper tape reader device PUN: The paper tape punch device LST: The output list device .pause .break The valid physical device names are -- TTY: Slow speed output device (teletype) CRT: High speed output device (cathode ray tube) BAT: Batch processing (CON: input is RDR:, CON: output is LST:) UC1: User-defined console PTR: Paper tape reader PTP: Paper tape punch UR1: User-defined reader #1 UR2: User-defined reader #2 UP1: User-defined punch #1 UP2: User-defined punch #2 LPT: Line printer UL1: User-defined list device #1 .pause .break STAT d:DSK: List the characteristics of the disk named "d:"; if "d:" is not specified, list the characteristics of all active disks. A sample listing: d: Drive Characteristics 65536: 128 Byte Record Capacity 8192: Kilobyte Drive Capacity 128: 32 Byte Directory Entries 0: Checked Directory Entries 1024: Records/ Extent 128: Records/ Block 58: Sectors/ Track 2: Reserved Tracks STAT USR: List the User Number the user is currently in and the User Numbers which have files on the currently addressed disk. A sample listing: Active User : 0 Active Files: 0 1 3 .pause .end 72 :CP/M PIP Command .break PIP (Peripheral Interchange Program) is the CP/M transient which implements the basic media conversion operations necessary to load, print, punch, copy, and combine disk files. PIP is initiated by one of the following forms -- PIP Engage PIP, prompt the user with '*', and read command lines directly from the console. PIP used in this way is exited by either typing an empty command line (just a carriage return) or a Ctrl-C as the first character of the line. PIP cmnd Engage PIP, execute the specified command, and return to CP/M. The form of each command line in PIP is -- destination = source#1, source#2, source#3, ..., source#n .pause .break The general forms of PIP command lines are -- x:=y:afn Copy all files satisfying afn from drive y to drive x. 'y' may be omitted, and, if so, the currently logged-in drive is selected. x:ufn=y: Copy the file given by ufn from y to x. 'x' may be omitted, and, if so, the currently logged-in drive is selected. x:afn=y:afn Like the above, but x and/or y may be omitted; the default drive is selected for the omitted drive(s). ld=pd Copy from the specified physical device to the specified logical device. Valid logical devices are -- CON:, RDR:, PUN:, LST: Valid physical devices are -- TTY:, CRT:, UC1:, PTR:, PTP:, UR1:, UR2:, UP1:, UP2:, LPT:, UL1: .pause .break There are many different ways to use PIP. The following examples illustrate the most common forms A>PIP B:=A:FILENAME - Makes a duplicate copy on drive B, of the file "FILENAME" on drive A. A>PIP C:NEWNAME=B:FILENAME - Makes a duplicate copy on drive C, of the file "FILENAME" on drive B, calling it "NEWNAME" on drive C. A>PIP B:=A:*.* - Copies all files from drive A to drive B. .pause .break Additional device names which may be used in PIP commands are -- NUL: Send 40 Nulls (ASCII 0) to the device. EOF: Send a CP/M End of File character (ASCII Ctrl-Z). INP: Special PIP input source to be patched (see manual). OUT: Special PIP output destination to be patched (see manual). PRN: Same as LST:, but tabs are expanded at every eighth character position, lines are numbered, and page ejects are inserted every 60 lines with an initial eject. The user can also specify one or more PIP parameters enclosed in square brackets separated by zero or more blanks. These parameters are -- B Block mode transfer. Data is buffered by PIP until an ASCII X- Off character (Ctrl-S) is received from the source device. Dn Delete characters which extend past column n in the transfer of data to the destination from the character source. E Echo all transfer operations to the console. F Filter (remove) form feeds from the file. .pause .break Gn Get File from User Number n (n in the range 0 - 15) H Hex data transfer. All data is checked for proper Intel hex file format. I Ignore ':00' records in the transfer of Intel hex format file. L Translate upper case to lower case alphabetics. N Add line numbers to each line transferred to the destination. O Object file (non-ASCII) transfer. Ignore End of File. Pn Include page ejects at every n lines. Qs^Z Quit copying from the source device or file when the string s (terminated by Ctrl-Z) is encountered. R Read system files Ss^Z Start copying from the source file when the string s is seen. Tn Expand tabs to every nth column. U Translate lower case to upper case alphabetics. V Verify that data has been copied correctly. W Write over R/O files without console interrogation Z Zero the parity bit on input for each ASCII character. .pause .end 73 :CP/M ED Command .break The ED Program is the CP/M system context editor, which allows creation and alteration of ASCII files. Complete details are given in the user's manual. The following are the error indicators given by ED -- ? Unrecognized Command > Memory buffer full # Cannot apply command the number of times specified O Cannot open LIB file in R command The following are the control characters recognized by ED -- ^C System reboot ^E Physical (not entered in command) ^H Character delete (backspace) ^I Logical tab ^J New line (line feed) ^L Logical in search and substitute strings ^M New line (carriage return) .pause .break ^U Line delete ^X Line delete and backspace ^Z String terminator Rubout Character delete Break Discontinue command The following are the commands recognized by ED -- nA Append lines +/- B Beginning/Bottom of buffer +/- nC Move character positions +/- nD Delete characters E Exit nFs^Z Find string H End edit, close and reopen files Is^Z Insert characters nJ Place strings in juxtaposition +/- nK Kill (delete) lines +/- nL Move down/up lines .pause .break nM Macro definition O Return to original file +/- nP Move and print pages Q Quit with no file changes R Read library file nSs1^Zs2^Z Substitute s2 for s1 +/- nT Type lines +/- U Translate lower to upper case if U; none if -U +/- V Engage/disengage line numbers (verify) 0V Print memory buffer info (free/total usage) nW Write lines nX Transfer n lines to X$$$$$$$.LIB 0X Empty X$$$$$$$.LIB nZ Sleep +/- n Move and type (+/- nLT) n: Move to absolute line (V engaged) :n Process from current line to specified line (V engaged) .pause .end 74 :CP/M ASM Command .break The ASM Command loads and executes the CP/M 8080 assembler. It is of the form -- ASM filename.xyz where filename ... is the name of the file 'filename.ASM' to assemble x ... designates the disk name which contains the source y ... designates the disk name to contain the hex file (y=Z suppresses generation of the hex file) z ... designates the disk name to contain the print file (y=X lists on CON:, y=Z suppresses listing) Refer to the ASM Manual for further details. .pause .end 75 :CP/M LOAD Command .break The LOAD Command reads the file specified, which is assumed to contain Intel hex format machine code and produces a memory image file which can be subsequently executed (converts .HEX to .COM files). It is of the form -- LOAD filename where filename is the name of the file 'filename.HEX'. .pause .end 76 :The UNLOAD Command .break The UNLOAD Command does the reverse of the LOAD Command -- it converts COM files to HEX files. It is of the form -- UNLOAD filename where filename is the name of the file 'filename.COM'. .pause .end 77 :CP/M DDT Command .break The DDT Program allows dynamic interactive testing and debugging of programs generated in the CP/M environment. It is invoked by -- DDT DDT filename.HEX DDT filename.COM where 'filename' is the name of the program to be loaded or tested. DDT responds to the normal CP/M input line editing characters. DDT responds to the following commands -- As Perform inline assembly starting at the specified address s. D Display memory from the current address for 16 display lines. Ds Display memory from address s for 16 display lines. Ds,f Display memory from address s to address f. Fs,f,c Fill memory from start address s to final address f with byte c. .pause .break G Start execution at the current value of the PC. Gs Start execution at the specified address s. Gs,b Start execution at the specified address s and set a breakpoint at the address b. Gs,b,c Same as above with breakpoints at b and c. G,b Start execution at the current value of the PC with breakpoint b. G,b,c Same as above with breakpoints at b and c. If Insert a file name f into the default FCB. L List 12 lines of disassembled code from the current address. Ls List 12 lines from the specified address s. Ls,f List lines of disassembled code from s to f. Ms,f,d Move the block from address s to f to destination at address d. R Read file in FCB into memory at 100H. Rb Read file in FCB into memory with offset b from 100H. Ss Set (examine and alter) memory starting at address s. T Trace the next instruction. Tn Trace the next n instructions. .pause .break U Untrace -- like Trace, but intermediate steps are not displayed. X Examine all registers and flags. Xr Examine specified registers or flag, where r may be -- C Carry flag Z Zero flag M Minus (sign) flag I Interdigit Carry flag A Accumulator B BC Reg pair D DE Reg pair H HL Reg pair S Stack pointer P PC .pause .end 78 :The ZDT Command .break ZDT is a Z80 version of DDT. It is invoked by typing -- ZDT The commands recognized by ZDT are input in single-character input mode. No input line editing is done, and each command expects an exact input. All byte values are exactly two characters, and all addresses are exactly four characters. The commands recognized by ZDT are -- A bbbb Enter ASCII characters into memory from keyboard starting at address bbbb. B Warm Boot -- Return to CP/M. C bbbb eeee nnnn Compare memory from address bbbb to address eeee to block starting at nnnn. .pause .break D bbbb eeee Dump memory from bbbb to eeee. E bbbb eeee Search for ASCII string from bbbb to eeee. String is at most 16 characters. String is terminated by . F bbbb eeee Search for hex string from bbbb to eeee. String is terminated by . G Go to next breakpoint. H aaaa nnnn Hex add and subtract. Computes aaaa+nnnn and aaaa-nnnn. I nn Input. Prints value at port nn. J nnnn Jump to and execute at location nnnn. K Keyboard echo. L filename.typ nnnn Loads specified disk file into location nnnn. .pause .break M bbbb eeee nnnn Move block from bbbb to eeee-1 to nnnn. N aaaa Enter offset aaaa for loading. O nn dd Output byte dd to port nn. P bbbb Input hex into memory from keyboard starting at bbbb. advances pointer, or backs pointer. Q bbbb eeee Dumps from bbbb to eeee in ASCII. R n ll tt ss bbbb Read block of data from disk n of length ll (256-byte pages) starting at track tt and sector ss placing the data at bbbb. S bbbb eeee Disassembly (symbolic dump) from bbbb to eeee. T bbbb eeee Destructive memory test from bbbb to eeee-1. U bbbb Set breakpoint at bbbb. .pause .break V Display all currently-set breakpoints. W n ll tt ss bbbb Write on disk n the data at bbbb for a length of ll starting at track tt, sector ss. ll is in 256-byte pages. X Display registers. Z bbbb eeee dd Zero or set memory from bbbb to eeee-1 with byte dd. .pause .end 79 :CP/M SYSGEN Command .break The SYSGEN Command This command is used to place a copy of CP/M in its reserved place on a diskette. Anytime you want to create a diskette that can be used in drive A of your computer, you must use SYSGEN to place a copy of CP/M on the diskette first. This is because the CP/M operating system always expects to find a copy of itself on the diskette in drive A. It is invoked by typing: SYSGEN Once invoked, the user may be expected to see the following prompts: A>SYSGEN CP/M System Generation Program Source Drive (or CR to skip): a Source on A, then type CR Destination Drive (or CR to abort): b Destination on B, then type CR Destination Drive (or CR to abort): .pause .end 80 :CP/M SUBMIT and XSUB Commands .break The SUBMIT command allows CP/M commands to be batched together for automatic processing. The form of this command is SUBMIT ufn parm1 parm2 ... parmn The ufn given in the SUBMIT command must be the filename (not type) of a file which exists on the currently logged-in disk with an assumed file type of '.SUB'. Refer to the CP/M Manual for further details. The XSUB command extends the power of the SUBMIT facility. When specified as the first line of a SUBMIT File, it self-relocates directly below the CCP. All subsequent SUBMIT command lines are processed by XSUB, so that programs which read buffered console input (BDOS Function 10) receive input directly from the SUBMIT File. While XSUB is in memory, it prints the message "(xsub active)" on each warm boot. An example of the use of XSUB to display memory from 100H to 1FFH is -- XSUB DDT D100,1FF G0 .pause .end 81 :CP/M BDOS -- Basic I/O Operations .break Function and Number Input Parameters Output Parameters System Reset 0 None None Read Console 1 None ASCII Char in A Write Console 2 ASCII Char in E None Read Reader 3 None ASCII Char in A Write Punch 4 ASCII Char in E None Write List 5 ASCII Char in E None Direct Con I/O 6 ASCII Char in E I/O Status in A if E=0FFH Get I/O Status 7 None I/O Status in A Put I/O Status 8 I/O Status in E None Print Buffer 9 Address of string None terminated by $ in DE Read Buffer 10 Address of Read Read Buffer is filled Buffer in DE Console Ready 11 None LSB of A is 1 if char ready *All function numbers are passed in Reg C. .pause .break I/O Status Byte -- Value Bits 6&7 Bits 4&5 Bits 2&3 Bits 0&1 00 CON:=TTY: RDR:=TTY: PUN:=TTY: LST:=TTY: 01 CRT: PTR: PTP: CRT: 10 BAT: UR1: UP1: LPT: 11 UC1: UR2: UP2: UL1: Read Buffer -- Byte Function 1 Maximum Buffer Length 2 Current Buffer Length (returned value) 3-n Data (returned values) .pause .end 82 :CP/M BIOS -- Basic Disk Operations .break Function and Number Input Parameters Output Parameters Return Version # 12 None Version Info in HL H=0 CP/M, H=1 MP/M L=00 CP/M 1.x, 2x 2.x Init BDOS 13 None None Log-In Disk 14 Value in Reg E None A=0, B=1, C=2, D=3 Open File 15 Address of FCB Byte address of FCB in DE if found or 0FFH if not Close File 16 Address of FCB Byte address of FCB in DE if found or 0FFH if not Search for File 17 Address of FCB Byte address of FCB (0-3) in DE if found or 0FFH if not Search for Next 18 Address of FCB Byte address of next FCB in DE if found or 0FFH if not Delete File 19 Address of FCB Byte address of FCB (0-3) in DE if found or 0FFH if not .pause .break Function and Number Input Parameters Output Parameters Read Next Record 20 Address of FCB 0=successful read in DE 1=read past EOF 2=reading random data Write Next Rec 21 Address of FCB 0=successful write in DE 1=error in extending 2=end of disk data 255=no more dir space Make File 22 Address of FCB Byte address of FCB or in DE 255 if no more dir space Rename FCB 23 Address of FCB Byte Address of Dir entry in DE or 255 if no match Return Log Code 24 None Login vector in HL Read Drive No 25 None Number of logged-in drive (A=0, B=1, C=2, D=3) Set DMA Address 26 Address of 128 None byte buffer in DE .pause .break Function and Number Input Parameters Output Parameters Get Alloc Vect 27 None Allocation Vect Addr in HL Write Prot Disk 28 None None Get R/O Vect 29 None HL=R/O Vect Val Set File Attrib 30 Ptr to FCB in DE Dir code in A Get Disk Parms 31 None HL=DPB Address Set/Get Usr Code 32 E=0FFH (get)/Code A=Current code (get)/no (set) value (set) Read Random 33 DE=FCB addr A=return code 1=reading unwritten data 2=(not used) 3=can't close curr ext 4=seek to unwritten ext 5=(not used) 6=seek past end of disk .pause .break Function and Number Input Parameters Output Parameters Write Random 34 DE=FCB addr A=return code 1=reading unwritten data 2=(not used) 3=can't close curr ext 4=seek to unwritten ext 5=dir overflow 6=seek past end of disk Compute File Siz 35 DE=FCB addr Random Rec Field set to file size Set Random Rec 36 DE=FCB addr Random Rec Field set *All function numbers are passed in Reg C .pause .end 83 :CP/M File Types .break AIN ALGOL 60 Intermediate ALG ALGOL 60 Source File ASM Assembler Source File BAK Backup File BAS BASIC Source File C C Source File COB COBOL Source File COM "Command" File FOR FORTRAN IV Source File HEX Intel "hex" code file HLP HELP File INT BASIC Intermediate File LST Listing File MAC MACRO-80 Source File PAS PASCAL Source File PRN Assembler Listing File REL Relocatable Module SRC PASCAL/MT Source File SUB SUBMIT File SYM Symbol File TC Tiny-C Source File TFS TFS Source File TXT Text File $$$ Temporary File .pause .end 84 :CP/M BIOS Jump Vector .break The following is a table representing the entry points into the CP/M BIOS of the major routines accessable to the user -- Routine Relative Offset Comment BOOT 00H Cold Start WBOOT 03H Warm Start CONST 06H Console Status Reg A = 00 if no char ready Reg A = FF if char ready CONIN 09H Console char in (Reg A) CONOUT 0CH Console char out (Reg C) LIST 0FH List out (Reg C) PUNCH 12H Punch out (Reg C) READER 15H Reader in (Reg A) .pause .break Routine Relative Offset Comment HOME 18H Move to track 00 SELDSK 1BH Select disk given by Reg C (A=0,B=1,...) SETTRK 1EH Set track address given by Reg C (0...76) SETSEC 21H Set sector address given by Reg C (1...26) SETDMA 24H Set subsequent DMA address (RP B&C) READ 27H Read track/sector (block) WRITE 2AH Write track/sector (block) LISTST 2DH List Device Status Reg A = 00 if no char ready Reg A = FF if char ready SECTRAN 30H Translate sector number in Reg C using table pointed to by DE; physical sector number returned in Reg L .pause .end R:FILE: GOLDI.PLT R:A SHORT STORY. R: GOLDILOCKS AND YOU KNOW WHO; 2/7/77 T: ONCE UPON A TIME THERE WERE THREE BEARS T: WHO DO YOU THINK THEY WERE? A: T: T: GOLDILOCKS DIDN'T LIKE PORRIDGE, SO SHE T: FOUND SOME YOGURT IN THE KITCHEN. NEXT SHE A: $A T: T: THEN THE THREE BEARS CAME HOME. THE LITTLE BEAR T: SNIFFED AROUND AND SAID ; A: $B T: T: THEN THE BIG DADDY BEAR CHASED GOLDILOCKS ALL T: OVER THE HOUSE BECAUSE SHE @$A@. T: T: GOLDILOCKS HID UNDER THE BED. T: BABY BEAR HID UNDER THE BED. T: THEY SAT ON BABY BEAR'S ELECTRIC TRAIN, AND A: T: T: PRETTY SOON MAMA BEAR CAME IN YELLING T: "WHO ATE UP ALL MY YOGURT?" A: T: T: GOLDILOCKS LAUGHED. T: BABY BEAR LAUGHED EVEN HARDER. T: HE SAID "@$B@." T: MAMA BEAR SAID A: $C T: T: THEN THEY WENT ON A PICNIC. T: THEY PACKED A BASKET OF PEANUTS AND POPCORN AND ; A: $F T: AND BUBLE GUM AND FRISBEES AND LEMONADE. T: T: THEY DECIDED TO GO TO ; A: $P T: T: WHEN THEY GOT THERE, THE DADDY BEAR OPENED THE DOOR T: AND ALL OF THE @$F@ ; T: FELL OUT OF THE CAR. T: THE BABY BEAR SAID "@$B@" T: THE MAMA BEAR SAID "@$C@" T: THE GREAT BIG DADDY BEAR SAID A: T: T: GOLDILOCKS CRIED "LETS'S GET OUT OF @$P@. T: LET'S GO HOME." T: BUT THE CAR HAD A FLAT TIRE AND THEY ALL HAD TO SLEEP T: IN THE BACK SEAT, AND ALL NIGHT LONG THE DADDY BEAR GRUMBLED T: "@$B@." T: T: T: T: THE END E: PROGRAM HIPILOT; {$iPILOT/P.HDR } { FILE: HIPILOT.PLT} { A TYPICAL INTERACTIVE SESSION.} { } BEGIN initialize; WRITELN(' Hi there, is this your first time on a computer?'); READLN(ans); ucase(ans); match('YES!SURE!OK!YEAH','!',ans,flag); if flag then WRITELN(' I hope you will enjoy your experience with me.'); WRITELN(' In the area of education, what are your main interests?'); 1: READLN(ans); ucase(ans); match('TEACH!INSTR!LEARN!MATERIAL','!',ans,flag); if flag then GOTO 2; match('ADMIN!PROGRAM!TEST!GRAD!ANALYS!COURSE!CURR','!',ans,flag); if flag then GOTO 3; WRITELN('Please tell me more about this.'); if not flag then GOTO 1; 2: WRITELN(' An excellent way of using computers for teaching and learning'); WRITELN(' is to give children an opportunity to write their own programs.'); WRITELN(' How does this strike you?'); READLN(ans); ucase(ans); match('GOOD!EXCEL!FINE!YES!IMPORTANT!OK','!',ans,flag); if not flag then WRITELN(' I see you disagree. Will you explain further?'); if flag then GOTO 4; READLN(ans); 4: WRITELN(' Of course the teacher should write programs too, however,'); WRITELN(' it isn''t always necessary to use "packaged curricula"'); WRITELN(' for effective use of the computer in learning situations.'); GOTO 0; 3: WRITELN(' Are you interested in the computer''s application to teaching?'); READLN(ans); ucase(ans); match('NO!NEVER','!',ans,flag); if not flag then GOTO 2; WRITELN(' Then perhaps ''PILOT'' is not for you. PILOT''s intention is'); WRITELN(' for it''s use by teachers and children for interactive dialogues.'); WRITELN(' Thank you for your time and interest.'); GOTO 0; 0:END. R: FILE: HIPILOT.PLT R: A TYPICAL INTERACTIVE SESSION. R: T: Hi there, is this your first time on a computer? A: C:ucase(ans) M:YES!SURE!OK!YEAH TY: I hope you will enjoy your experience with me. : In the area of education, what are your main interests? *MORE A: C:ucase(ans) M:TEACH!INSTR!LEARN!MATERIAL JY:*TEACHING M:ADMIN!PROGRAM!TEST!GRAD!ANALYS!COURSE!CURR JY:*OTHER T:Please tell me more about this. JN: *MORE *TEACHING T: An excellent way of using computers for teaching and learning : is to give children an opportunity to write their own programs. : How does this strike you? A: C:ucase(ans) M:GOOD!EXCEL!FINE!YES!IMPORTANT!OK TN: I see you disagree. Will you explain further? JY: *YES A: *YES T: Of course the teacher should write programs too, however, : it isn't always necessary to use "packaged curricula" : for effective use of the computer in learning situations. E: *OTHER T: Are you interested in the computer's application to teaching? A: C:ucase(ans) M:NO!NEVER JN: *TEACHING T: Then perhaps 'PILOT' is not for you. PILOT's intention is : for it's use by teachers and children for interactive dialogues. : Thank you for your time and interest. E: S rU%%E%9AUR.READ˔PQr$U$0L112rU%%E.INPUTR$TH .READLNׂr$U$ L110D)P#62W"P3n-\Vm4 =vC4jS@{%^g7h ͦ|[ P@KN@6UDk%W+zT.8F#f4(kPt ±X haV>/,HF#f0qXD&[E2Ebq+elüCp`Ha2 FSɼdIf땺! n[e# u|`t\ Lpl6|?۠~7K52+`t`UC2W D0pYeWWVZe1zY,nVe-]@FY 6~?۠Y9 m EpZn sͣ z|[R0 2€0l  h ٶpfؠAMoh>a;aۅͦ⠠T: 0V3 ү^0#Ck6?˅Rw f 004 rLpW,m4Y+! d?mllUrp)G@m@0 6?(,"((kF(kH(c[8C# ?#h`6`]^iP3\|\Ƞͦ Q00f@-WYU f~7MϷ+tn@  #A +[!&_ 2[ab@^>/bʼkh_- tH7Lwp@/tuWVX!ͼ/hr\:Pò{f7M+qipjހ″6 .1dٵ pGf 1 M@  @ #( + 6*r@m&ׂ3lhJ@ٵ `f9qnQzre^ͳnñ3¯#Y 3Vqp얫Blh /h ± Má0\lڊuRFm<F`W-A^G<5{%^X- f`6mDQ wi5:C/%n sV7K6F#fXw< &[9wK1A.l1uCgwy8DSrIuzNG#y@i7 &,Ga4˘&.BYTIN4P$.EOFρTʀ.ERRORR'.PERROR$$40.STRERR5E$4x$.TINEDɸ&.TXTYPQPtDD%DXMU eQ:QUcMU eQj\`!~xD>råCO| +LST`TU$4XI95:QTTcI95kd[hr\ u u\mmUPH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TXTIN('LMENU.COM');CHAIN; GOTO 0; 0:END. R: FILE: LESSON1.PLT T:@$c@ T: LESSON #1 T: T: @$n@, AFTER PROGRESSING THRU THESE LESSONS WE T: AUTOMATICALLY RETURN TO THE MAIN PROGRAM. W:5 L: LMENU E: R: FILE: LESSON2.PLT T:@$c@ T: LESSON #2 T: T: @$n@, AFTER PROGRESSING THRU THESE LESSONS WE T: AUTOMATICALLY RETURN TO THE MAIN PROGRAM. W:5 L: LMENU E: R: FILE: LESSONS.PLT R: BY COMBINING PILOT AND PASCAL/Z WE CAN CHAIN TO OTHER PROGRAMS. R: THIS PROGRAM DEMONSTRATES HOW TO CHAIN WITH PASCAL/Z. R: YOU MUST FOLLOW THE DIRECTIONS GIVEN IN THE PASCAL/Z MANUAL CONCERNING R: CHAINING AND THE PROGRAM CHAINED TO MUST FOLLOW THE CP/M FILE NAMING R: CONVENTION. T:WELCOME T: T:WHAT IS YOUR NAME?; A:$n t:THANK YOU @$n@. NOW WE WILL TAKE AN ADVENTURE. r: first time flag; = 1 means 1st time here; = 0 means not 1st time. c: #f := 1 r: clear screen string for Zenith terminal. c:$c[1]:=chr(27); $c[2]:='E'; setlength($c,2) r: string to home up the cursor but not clear the screen. c:$h[1]:=chr(27); $h[2]:='H'; setlength($h,2) T: L:LMENU R: FILE: LMENU.PLT %:QUIRY( message: strng; goodchars: charset; var c: char ) T:@message@; C:REPEAT keyin(ch) C: c := toupper(ch) C: IF c IN goodchars THEN writeln(ch) ELSE write(chr(7)) C:UNTIL c IN goodchars E: *BEGIN T:@$c@ x: #f=1 TY: WELCOME @$n@ TO USAGE OF A COMPUTER. TY: CY: #f:=0 TN: TN: *AGAIN T:YOU HAVE THESE OPTIONS: T: 0) END TODAYS SESSION. T: 1) BEGINNING USE OF THE COMPUTER. T: 2) MORE ADVANCED USES OF THE COMPUTER. T: U:QUIRY(' YOUR CHOICE?',['0','1','2'],ch) C: ans[1]:=ch; setlength(ans,1) M:0 JY:*END M:1 JY:*LESSON1 M:2 JY:*LESSON2 J:*AGAIN *LESSON1 L:LESSON1 *LESSON2 L:LESSON2 *END T: THANK YOU FOR COMING @$n@. T: GOODBYE. E: PROCEDURE match( patterns : string255; {these patterns } delim : char; {separated by this delimiter} source : string255; {against this source string} var status : boolean ); {returning this flag } {+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ LAST EDITED: 03/03/84 rep RETURNS: 'status' true if any of the patterns appear in the source string. DECLARE: TYPE string0 = string 0; string255 = string 255; CALL AS: match ( 'YES!yes!NO!no', '!', ans,flag ); match ( $s, '!', ans,flag ); Required: function vlength(); from ASL.REL procedure setlength(); Pascal/Z supplied extension. function index(); Pascal/Z supplied extension. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++} TYPE nodeptr = ^node; node = record data : STRING 18; { MATCH MAXIMUM OF 18 CHARACTERS PER ARGUMENT } next : nodeptr end; VAR i : integer; a, root: nodeptr; {$C-,F-,R-,S-,M-} { NAME MATCH ENTRY MATCH } { setlength - forces the length of string 's' to length 'n' } PROCEDURE setlength ( VAR s: string0; n: integer ); external; { vlength - returns length of ANY length string. super fast! } FUNCTION vlength ( VAR s: string0 ): integer; external; { index - returns the position of pattern in source else 0 } FUNCTION index ( source,pattern: string255 ): integer; external; { MATCH: } BEGIN root := NIL; append(patterns,delim); i := 0; WHILE ivlength(patterns)) OR (patterns[i]=delim)) DO BEGIN append(a^.data,patterns[i]); i := i+1 END END; a := root; status := false; WHILE (a<>NIL) AND (status=false) DO BEGIN status := (index(source,a^.data)<>0); a := a^.next END END{match}; SPU TD4MATCHA7Nr@ %!p(rA-p9D 7N7?ۦ`pA@ K8YJ\X3@3?m3n~]IVsn3t~7N7?\s{7M#n ӫnL+u@+68YjML^3A@땺 n ReP 7?\7?ۦ`B 3m\j@@+67M#n ӫetn}L:[`Kt;MW/ݥ&U@ VpA Hmp!Y3J7?GjfV}+٠ޯv^guLsk7Nã"X FA1r*r*f("$)j!rJ:d$"^qrJb!e($*FTyr*g, ")FWjJr"*e`&F|"af&Wbaf)&"#Fi:b*r:D;PROCEDURE match( patterns : string255; {these patterns } ; delim : char; {separated by this delimiter} ; source : string255; {against this source string} ; var status : boolean ); {returning this flag } ;{+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ;LAST EDITED: 03/03/84 rep ; ;RETURNS: ; 'status' true if any of the patterns appear in the source string. ; ; ;DECLARE: ; TYPE string0 = string 0; ; string255 = string 255; ; ; CALL AS: ; match ( 'YES!yes!NO!no', '!', ans,flag ); ; match ( $s, '!', ans,flag ); ; ; Required: ; function vlength(); from ASL.REL ; procedure setlength(); Pascal/Z supplied extension. ; function index(); Pascal/Z supplied extension. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++} ;TYPE ; nodeptr = ^node; ; node = record ; data : STRING 18; { MATCH MAXIMUM OF 18 CHARACTERS PER ARGUMENT } ; next : nodeptr ; end; ;VAR ; i : integer; ; a, ; root: nodeptr; ;{$C-,F-,R-,S-,M-} C SET 0 F SET 0 R SET 0 S SET 0 M SET 0 NAME MATCH ENTRY MATCH ;{ vlength - returns length of ANY length string. super fast! } ;FUNCTION vlength ( VAR s: string0 ): integer; external; EXT VLENGTH ; ;{ setlength - forces the length of string 's' to length 'n' } ;PROCEDURE setlength ( VAR s: string0; n: integer ); external; EXTD L171,SETLENGT ; ;{ index - returns the position of pattern in source else 0 } ;FUNCTION index ( source,pattern: string255 ): integer; external; EXTD L173,INDEX MATCH: ENTR D,2,6 ; root := NIL; MOV -4(IX),A MOV -5(IX),A ; append(patterns,delim); PUSH IX POP H LXI B,522 DADD B PUSH H LXI H,255 PUSH H MOV H,A LXI B,266 PUSH IX DADX B MOV L,0(IX) POP IX INR H PUSH H LXI H,2 PUSH H CALL L137 ; i := 0; MOV 0(IX),A MOV -1(IX),A ; WHILE ivlength(patterns)) OR (patterns[i]=delim)) DO L254 MOV L,-1(IX) MOV H,0(IX) PUSH H PUSH IX POP H LXI B,522 DADD B PUSH H CALL VLENGTH POP H GRET D,0 JC L259 MOV L,-1(IX) MOV H,0(IX) XCHG LXI H,522 ADDR IX MOV D,A MOV E,M MOV H,A LXI B,266 PUSH IX DADX B MOV L,0(IX) POP IX DSB1 D,0 ; BEGIN JZ L253 ; append(a^.data,patterns[i]); MOV H,-2(IX) MOV L,-3(IX) PUSH H LXI H,18 PUSH H MOV L,-1(IX) MOV H,0(IX) XCHG LXI H,522 ADDR IX MOV D,A MOV E,M INR D PUSH D LXI H,2 PUSH H CALL L137 ; i := i+1 MOV L,-1(IX) MOV H,0(IX) ; END INX H MOV 0(IX),H MOV -1(IX),L ; END; JMP L254 L253 L256 EQU L253 L257 EQU L256 L259 EQU L257 JMP L200 L199 ; a := root; MOV L,-5(IX) MOV H,-4(IX) MOV -2(IX),H MOV -3(IX),L ; status := false; MOV H,9(IX) MOV L,8(IX) MOV M,A ; WHILE (a<>NIL) AND (status=false) DO L329 MOV L,-3(IX) MOV H,-2(IX) MOV D,A MOV E,A DSB1 D,0 JZ L328 LXI H,9 ILOD H,1,0 MOV A,L CMPI D,0 MOV A,H ; BEGIN JNZ L328 ; status := (index(source,a^.data)<>0); PUSH IX POP H LXI B,265 DADD B SPSH S,255 MOV H,-2(IX) MOV L,-3(IX) SPSH S,255 CALL L173 MOV H,A MOV L,A DSB1 D,0 JRZ L349 INR A L349 MOV L,A XRA A MOV H,A XCHG MOV H,9(IX) MOV L,8(IX) MOV M,E ; a := a^.next ; END LXI H,-2 ILOD H,2,-19 MOV -2(IX),H MOV -3(IX),L ;END{match}; JMP L329 L328 EXIT D,515,6 *+*+w!8* w##w!~(F# ~ (~ #N#ͦ5 ͦ5û^#V!&!!!!!$!2 !$!!5Æ*Illegal pointer dereferencString too lonCall by reference precision erroIndex or value out of rangAttempted divide by zerMultiply overfloStack overfloFloating point overflow/underflo -- statement INIT TERM PRGM PROC UNK PROGSYM REMSYM TYPSYM MTCHSYM JMPSYM EXITSYM PROCSYM TERMSYM COMPUTESUSESYM BOOLSYM ASKSYM LABELSYMLINKSYM WAITSYM NULL 1!Q!9 QU͎+ :RORRE!!9!5!Q!9 Q`͎+eunitnoc ot gnihtyna epyT!!9!uͽ+N#͎+6!YÚ21gn!8W^{ zgn!8W^! ѯR! gn!_!7(#7ʆ*.7! Ú21! ͌8W_R¯f n W8nf#tuf n F+n`nff nP>PiQnf ^Vr+snf w+wnf w+wvf n F+n`!9f n Qnf#9QPP1)nf f n'u!9f n Qnf#9QPP()Nnf f n'uLEBAL ETACILPUD!_>PiGV3+ ! Ú21! ͌8W_R›wwSf n F+n`!9f n Qnf#9QPP1)nf f n|rsR!9f n Qnf#9QPP()Fnf f n|rsR! ͌8tu! Ú21f n͎"+++f n|rsnfW_R¸+++f n'+++f n|rsgo͎8tu! Ú21NFݾ >nf>f n#7҈>nf#>tu>nf>f nRW^f ns! }8}@|…>ݾ8uÐf n6@! Ú21! ͌8f n r+s! ͌8W_Rf n F+n` V+^f n r+s! ͌8W_Rf nw+w!Ú21! ͌8W_Rn f f n r+s3f nF+n` ^ V r+sn f f nr+s!Ú21 gogo!ETIRW!!9!gͽ+f n#goR gogo!;NL!!9!͎+U f n#f nRW^{;z f nf n#!_!A  gogo!NL!!9!" ͽ+f n#goR~  gogo!!!;e3 ͎+U wwwwwwwnff n#7k +++T8fn w+wfngo(++gn}@| ++gn}@|N fn!Pgn$!e(gn}'|2 fn!P!'!e(gnfn s++ nf  Ó  go(wݾڄ +++  ͖nfW_RB !8}  !P!9fn Q!Qe(B A  !P!'!e( !P!9fn Q!Qe( !P!'!e(nfW_R^ nfW_R iGV3+!!K  gogo!(hctam!!9! !Q!9U Q;)galf,sna,'!',!!9! z͎+ #!77N gogo!(hctam!!9!(͎+Ç gogo!(hctam!!9!dͽ+ gogo!!!'e3!Q!9 Q;)galf,sna,'!','!!9!v͎+ê( gn}*|<lebal demrof ylreporpmI!#>PiGV3+  Yrsgn}¬ gogo! OTOG!!9!n!nf!!;e3͎+  gogo!!nf!!:e3͎+ê, gogo!;0 OTOG!!9!͎+ês gogo! ERUDECORP ! !9!H !Q!9 Q!!;e3p͎+ gogo!!,11,01,9,8,7,6,5,4,3,2,1,0 LEBAL ! !9! ,ͽ+ gogo!;02,91,81,71,61,51,41,31,21!!9!'͎+ gogo!NIGEB!!9!N͎+êµ gogo!;DNE:0!!9!͎+ê ( gogo!!Q!9 Q!!;e3b͎+ê  #!7X.KNIL ROF EMAN MARGORP DILAVNI!?>PiGV3+  !PMOC.!9!f!e( gogo! '(NITXTF!!9!!Q!9 Q ;NIAHC;)' ! !9! v͎+ês gogo!(TIAW!!9!!Q!9 Q;)hc,!!9!No͎+ê  gogo!=:galf!!9!!Q!9 Q!!;e3l͎+ê © #!Rjgn!#ͮ)$ͮ))Ҷgn!!ZAͥ)!zaͥ))Ҷ gogo!(NLDAER!!9!V!gne3!gne3;)!!9!#͎+ggn}#detcepxe elbairav regetnI!>PiGV3+ g$.detcepxe elbairav gnirtS!>PiGV3+ g tnemetats ksa demrof ylreporpmI!P>PiGV3+ é gogo! ;)sna(NLDAER ! !9! ͎+! Ú21gne3g_#{R6sT6sM6sJ6sE6s%6sC6sU,6 sX96 sAF6 sLS6 sW`6s*m6 s6! Ú21>go(3! 8}:|¾!T!9f n !! 8e3gͰf ns! }8}|! }8} |f n !!_!3! 8e3g_#sgn!Yͮ)Nͮ))gn}Yz>!P neht galf fi !9!T!e(÷N¶>!P neht galf ton fi!9!!e(f n !!_!3! }8} | f n !f n >iGV3+!:!9͟(_!! Ú21wwwww gogo! MARGORP!!9!@!Q!9 Q!!;e3n͎+ gogo!} RDH.P/TOLIPi${!!9!͎+ :gnitalsnarT ! !9! !Q!9 Qf͎+6ww) \+) W_go! P͟# #goRg  ygn}|ʦgn}ºgn}|¢6÷gn}|ʷ6G3[ <gn}|66<gn}|66G3[ <;gn}|;.won erudecorp od t'naC!%>PiGV3+ #go70PiGV3+ 3[  gogo!.DNE:0!!9!͎+h4!dilavni si margorp lacsaP ,margorp TOLIP ni srorrE3!3!9!37͎+!Ú2]1go,+Ҳ ?elif tahw etalsnarT!!9!ͽ+++P͟#++P>Pi Q !PTLP.!9!!e( ~_+#9P{OG!OB96 ) P+*) \+!!e3 ELIF ,DETANIMRET MARGORP!!9![!Q!9] Qwͽ+ .DNUOF TON !>iGV3+# MORF GNIDAER ! !9! !Q!9] Qf͎+++P>Pi Q !PSAP.!9!?!e( ~_+#9P{OG!OB96  P0 OT GNITIRW ! !9! !Q!9] Qf͎+++>iGV3+!:!9͟(s++>iGV3+!.!9͟(sgn}|5++#s=gn+ugn>|Sgn#uW6 ++>iGV3+gngnW^R#K gne3g_#s P>Pi Q!Ú2!9!8!98Rڂ48/62/20 ,5.2 noisrev P/TOLIP!!9!!͎+né*1f n #rsnf ^V7E nfW_Rxf n go!9 !e(E nf  #7E nf ^VR·++go(++f n >iGV3+nf nf^V R#K f n nf +(f n go!9 !e(f n go!9 !e(! Ú21  #s  f  ngo(nf ^ V +W^70tnf W_70gn f W_70Z6nf W^70@  f  ngon f W^+! 8W^!e(4 N6gnW^708  f  ngogn! 8W^!e(4 !Ú21f n #rsn f 78n f ^V78nf 70È"n f R!nf ^V70f n go(È"n f ^V +^V702n f ^V +^VRtunf ^VRt un f ^V ^V70 կNX$T]F('###58C(?58:(6+++ (ˆ#w+> ###58(G+++ˆ ˎ#Np+y ++Nwy+!^$ÏRead beyond EO!PY9G!ݾ Lfn( ~^(Vfnů|.ˆ^ ѯݾ'~(!z(& ,F[%L'%̾%& r+sFfn\+X$|(,+0n({( #\+8,+8# > w+6 +#T(*t(&F(+f(' (鯼1(!J(5[5 ͇5[%ͨ%ͨ%fnpG#Ee ,\+OG \+8x,+8s(c8%# (] (Y (U (Q (M#(1_(-$(){8 [8:8ç&a8A8 0ڧ&Wҧ&zW>( (#3 #%%fn~!9 G_~((GW>__{(+#ܯ>(#> + ٯgk9~fnw !!9G ᯼1(!J(5[5 %1(OfnF+\+X$|(,+0#w\+8G,+8B# (; (7(3 x8w+᯼i!5 .7!J(5[5,+0͇5&G #qF ̓'(1(!J(5fnqG̓'fnp+qG!D# (- + #:0%08!''c8:000⯸x/Gy/Oɯ e!J(5[5 !T]jjZj_ZfnV^\+X$###5++Fwx+0w+z  z %!7(ÏType error on inpuError in input, try again !9N#F ~(!V+^++~+ AN+둾iyFwyHB+O#!9!O~82G>+ (<+(~<#_1!~w!M21f n Nq! M2Q) 2-Q)()$Q) Q) Q)8 Q)07ɯ!9Y#X#~(6( 8FG+8  8 > >># }((!"9(7>7w+! 9͎10 ###ͩ3 w##w#͸1+++~### 8[785O8 ( (++q+++++++ˎ#q#x*#fn##|###ĩ3#fn##|###ĩ3 -- Module!*5|og + +|g!S5 +d + + +!a5/ R0.7 *~+7^#~ 77~ F777~7N77gi#9A[5 Nͦ5+ ͦ5#+F +###goQ, =. =.#+F +ˆ###.goQ,!9Rx!9 PY FfnV go͎1T1| }~^(Vfn>|.f(zȯF+,c-̹,s,"- Nng)))V^G~ (#X(y(8 PG =.BN=.#F~++( 8 G =.F+N=.+++ݾ~-8 (8 Gy =.OAO=.TRUEFALSEF~+++N Ő( 8G =.( +N=.y(G++V^!9 z(6-+goGRw+O'--d- -E.G #~-   60 +A~8 ( W =. N=.++++!9ѯɯR0 >0w+ G fnN++I.| z ô+  .7+++~(.7###v###m.Ͱ7Yá73>+++###Ͱ7`i##ˆ#z7V {f("z((/.(###=(>GÐ0/F0R00(5~<0$^#Vr+sR0$ N#fiR(+R(><f B###'44+++/F0R0z(&/.¨.##N++(6F0R0(^.0^0(4~(^W##~#w+0##N++6$^#Vr+sGR0z## Ư++OW_ˆ++`i(  S_xDM!=()8 )0 0)+} E˸$}($0##0""JS\$s#r#q!#6!*!!4 #4 #4!!+F&( 6##Nq+'6p 5 6w+( ##++á7˞á7͎10 ###ͩ3 w##w#͸18i+++v ~ ,1###͓7:7+++͎֯10 ###ͩ3+++go͎10 | }!Z1ÏToo many open output file!z1ÏBad output file nam#}( ##|#(}#7[50!9G ANͦ5+ ͦ5ͤ2[5 r+{PY_>0D*>_~:(GAG*>_~ > :(*5*+~͙3x8I!M557á7L(C ͙3O ͙3N  ͙3S ͙3T  ͙3á7w ͙38(.(w#H (#[5a8{0_ Ͱ7+++f###%(6333á7Ͱ7y%44fʱ4###z7"«4!5~< #5~< #5'"«4! 6!'+Fˆ"(w#w#w 44~0#4 #4!!4 #4 #4! 6!!%664!5Ï)~6<(3z7' " ^##wá7!5 !5 !65 !?5ÏDisk erroError in extending filDisk fulDirectory fulBad filename Ͱ7*^#~ 84 á7 ( #64Ͱ7*6O  ͦ5 .7á7Ͱ7*6#~P( 4^qá75 ͦ57á7~O.7#Ͱ7%~#?6fr6##N(6$4~0#4 #4###z74~0#4 #4!4~0#4 #4!6~Ҹ6z7   76<+w_##~á7##ˎ++"!5~< #5~< #5'"Ͱ7 ʡ7>á7Ͱ7á7Ͱ7Yá7Ͱ7z74Ͱ7%6#6z7xá7Ͱ7$^Ͱ7z7|7R?|77R|77R?|7Rb$ɯ7!#9!  r+s!9Rxr+sV+^#!+Rfn|(R bk###ͩ3ww##ɯ(#~+*^W#~!OG F+N ngOG F+N F+n`OG F+N+~=(ۯOG F+N+~ =(rW+sɯRɯR8L2734 AL2759 L2760 L PILOT/P Implementing a High-Level Language in a Hurry by David Mundie Documentation by Raymond E. Penley, Feb 26, 1984 With PILOT/P one has the features of the languages Pascal and PILOT. PILOT/P is a PILOT to Pascal translator. It was originally written for the UCSD Pascal language but has since been rewritten to use the Pascal/Z compiler by Ithaca Intersystems. Pascal/Z has all the standard Pascal constructs plus the ability to chain to another program, thereby increasing the flexibility of the PILOT langugae. The experienced Pascal programmer may add additional variables, functions, real numbers, and procedures by modifying the file "PILOT.HDR". The program has been modified to conform, as much as possible, to standard PILOT syntax since its original publication in the July 1980 issue of BYTE. To compile the PILOT/P program SAMPLE1.PLT residing on the diskette in drive B, execute the PILOT/P submit program: A>DO PILOT/P SAMPLE1 B Programs that utilize the program linking statement must be compiled using the CHAIN submit program instead of the PILOT/P submit program. Let us assume that these PILOT/P programs are a complete lesson and that they are all on the diskette in drive unit B. LESSON.PLT, LMENU.PLT, LESSON1.PLT, LESSON2.PLT, and LESSON3.PLT Then the following commands will compile and link all the progrms: A>DO / *DO CHAIN LESSON B *DO CHAIN MENU B *DO CHAIN LESSON1 B *DO CHAIN LESSON2 B *DO CHAIN LESSON3 B * (The order in which they are done is not important.) When completed all the required programs will be on drive B. Recommended placement of programs on a 2 drive system: DRIVE A DRIVE B ------------ ----------------- PILOT/P.COM PILOT/P programs. PILOT/P.SUB SAMPLE1.PLT -PROGRAMS CAN BE PILOT/P.HDR ON DRIVE A IF ROOM. DO.COM -Supersub renamed. PASCAL.COM MAIN.SRC ASMBL.COM LINK.COM ASL.REL -A Small Library (Pascal/Z User's Group) CHAIN.REL CHAIN.SUB LIB.REL EDITOR.COM -YOUR FAVORITE EDITOR PIP.COM STAT.COM ------------------------------------------------------------------------------ PILOT/P INSTRUCTIONS ------------------------------------------------------------------------------ TYPE (T:) SYNTAX: ------------------------------------------------------------------------------ T [] : T [] : ; ------------------------------------------------------------------------------ DESCRIPTION: Displays a message to the PILOT user. A message can consist of a literal character string, string variables and numeric variables. All char- acter positions to the right of the colon are reproduced in a literal fashion with the execption that the values of variables are inserted as replacements for their names. String variable names are identified by beginning with "$" and numeric variable names by beginning with "#". Variables may be displayed if their names are enclosed by at-signs "@". The second form of the TYPE statement will print the message and hold the cursor immediately following the last character on the same line. LIMITATIONS: Never print a string variable that has not been defined by a previous assignment. The results are unpredictable and usually disasterous. The length of a TYPE statement is limited to 78 characters, including the 'T' and ':'. EXAMPLE: ------------------------------------------------------------------------------ T: WELCOME TO PILOT. T: PLEASE TELL ME YOUR NAME. A: $N TN: HI THERE @$N@, I HOPE YOU HAVE A NICE TIME. C: #X := #X + 1 T: YOUR NEW SCORE IS @#X@. T: YOUR NEW SCORE IS @#X:4@. T: This is a very long type statement. And we are going to reach the limit >>| T: These two type statements; T: will print on one line. ------------------------------------------------------------------------------ ACCEPT (A:) SYNTAX: ------------------------------------------------------------------------------ A [] : A [] : # A [] : $ ------------------------------------------------------------------------------ DESCRIPTION: Opens the console device for the PILOT user to enter a response. Line editing follows standard CP/M 2.2 line editing. The line terminates when carriage return is entered. The blank accept statment actually stores the user input in the system variable "ans". The system variable may be used at any time in the program. LIMITATIONS: Numeric variables and string variables may be any one of the 26 single letters of the alphabet: a..z. #a,#b,#c, ...,#z. $a,$b,$c, ...,$z. Upper and lower case letters are considered the same variable. The length of a response is limited to 80 characters. A numeric variable response may be +-32767. EXAMPLE: ------------------------------------------------------------------------------ T:WHO ARE YOU? A: ..... T:WHAT IS YOUR NAME? A:$N ..... T:WHAT IS YOUR AGE? A:#X ..... ------------------------------------------------------------------------------ MATCH (M:) SYNTAX ------------------------------------------------------------------------------ M [] : [!...!] M [] : @string variable@ ------------------------------------------------------------------------------ DESCRIPTION: Causes a scan of the last user response, the one received by the last ACCEPT (A:) statement. Patterns in the expression field of the MATCH statement are compared with the last response. Any item which matches causes the YN-switch to be set true. Patterns in the list are separated by commas, with leading or trailing blanks considered part of the pattern. A comma which terminates the last item is ignored but can serve to indicate the presence of a trailing blank. A moving window scan of the response with each pattern occurs until either a match is found or the input is exhausted. LIMITATIONS: The match statement does no case translations. The length of the arguments on the command line is limited to 62 characters max. M:<------------------- 62 CHARACTERS MAX ----------------------> M:Washington!Baltimore!California!Tennessee!Mississippi!Maryland EXAMPLE: ------------------------------------------------------------------------------ M:A!B!C Matches A or B or HAT or ALICE or JOB M: A! B! C Matches A or B or ALICE Does not match JOB or HAT. M: A ! B ! C ! Matches only A or B or C M: A! B! C! a! b! c Matches upper and lower case. M:@$a@ Matches the contents of the string variable $a ------------------------------------------------------------------------------ JUMP (J:) SYNTAX: ------------------------------------------------------------------------------ J [] : ------------------------------------------------------------------------------ DESCRIPTION: Jumps to the specified destination in the current program. The destination must reference an existing label. The label may come before or after the jump statement. LIMITATIONS: A Label statement must be the only statement on a line. The PILOT/P translator does not check to see that you are jumping to a real label, also it does not know if you jump to a label that does not exist anywhere in the program. (A two pass translator would be required to do that.) EXAMPLE: ------------------------------------------------------------------------------ *START J:*MORE ..... ..... *MORE T:ARE YOU READY TO BEGIN? A: M:YES JY:*AGAIN JN:*START ..... *AGAIN T:I HAVE A QUESTION FOR YOU. ..... ------------------------------------------------------------------------------ SUBROUTINE (PROCEDURES) (%:) SYNTAX: ------------------------------------------------------------------------------ % : ------------------------------------------------------------------------------ DESCRIPTION: Identifies and delimits subroutines. The statement '%:' is followed by the subroutine name. LIMITATIONS: Procedures must be declared before the main program body. EXAMPLE: ------------------------------------------------------------------------------ %: getchoice(var #c:integer) -- procedure starts R: accepts a number and checks its value C: REPEAT writeln T: What is your choice(1 to 10)?; A: #c X: #c in [1..10] TN: @#c:4@,@chr(7)@ is out of range C: UNTIL flag E: -- procedure ends ------------------------------------------------------------------------------ USE A SUBROUTINE (U:) SYNTAX: ------------------------------------------------------------------------------ U []: : ------------------------------------------------------------------------------ DESCRIPTION: Calls the specified procedure in the current program. LIMITATIONS: Only those limitations imposed by your Pascal compiler. Also see the above instructions on subroutines. EXAMPLE: ------------------------------------------------------------------------------ %:INSTRUCTIONS T:THE FOLLOWING INSTRUCTIONS APPLY ..... E: *START T:THIS IS WHERE WE START T:DO YOU NEED INSTRUCTIONS?; A: M:YES UY:INSTRUCTIONS ..... ------------------------------------------------------------------------------ END OF SUBROUTINE OR PROGRAM (E:) SYNTAX: ------------------------------------------------------------------------------ E [] : ------------------------------------------------------------------------------ DESCRIPTION: Indicates the end of a subroutine or the end of the current program. EXAMPLE: ------------------------------------------------------------------------------ %:skip(#x:integer) C:for #i:=1 to #x do writeln E: ..... T:If you'd like to do more with the abstract and :concrete, try CLOVE. Bye for now, @$n@. E: ..... *QUIT T: O.K. @$n@ T: Try SAGE again if you like. E: ------------------------------------------------------------------------------ COMPUTE (C:) SYNTAX: ------------------------------------------------------------------------------ C [] : := C [] : ------------------------------------------------------------------------------ DESCRIPTION: Computes a value based on evaluation of the numeric expression and assigns the result to the numeric variable on the left of the assignment operator. You may use any legal Pascal expression. All statements are terminated with a semi-colon and the assignment operator is the ":=". LIMITATIONS: Numeric variable names are the alpha letters A..Z,a..z. Longer names may not be written unless they are predefined in the file 'PILOT.HDR'. EXAMPLE: ------------------------------------------------------------------------------ C:FOR #i:=1 to 100 DO writeln(#i:5) C: #X := #X + 5 C: #X := (#A+5) DIV 15 C: $s := 'SUNDAY MONDAY TUESDAY WEDENSDAY' ------------------------------------------------------------------------------ REMARK (R:) SYNTAX: ------------------------------------------------------------------------------ R : ------------------------------------------------------------------------------ DESCRIPTION: PILOT/P ignores the REMARK statement and blank lines.. It is a means of storing potentially useful information in the program listing. The REMARK statement may occur at any point in a PILOT/P program. EXAMPLE: ------------------------------------------------------------------------------ R:-------------------------------- R:LESSON TWO: DATE WRITTEN: 1/2/84 R:-------------------------------- ------------------------------------------------------------------------------ PROGRAM LINKING (L:) SYNTAX: ------------------------------------------------------------------------------ L [] : ------------------------------------------------------------------------------ DESCRIPTION: Links to another PILOT/P program. LIMITATIONS: Must follow the rules in the Pascal/Z manual concerning chaining programs. Program name must be from 1 to 8 characters only. EXAMPLE: ------------------------------------------------------------------------------ L:LESSON1 ------------------------------------------------------------------------------ WAIT STATEMENT (W:) SYNTAX: ------------------------------------------------------------------------------ W [] : n W [] : # ------------------------------------------------------------------------------ DESCRIPTION: Pauses the specified number of seconds or until any key is pressed, whichever comes first. The system variable 'ch' contains the key pressed or if no key was pressed within the specified time period the value returned is the null (0) character. EXAMPLE: ------------------------------------------------------------------------------ W:5 X: ch = chr(0) TY:You must select one of the above, try again. JY:*AGAIN M:Q!q ------------------------------------------------------------------------------ BOOLEAN EXPRESSION (X:) SYNTAX: ------------------------------------------------------------------------------ X [] : ------------------------------------------------------------------------------ DESCRIPTION: Any Pascal boolean expression may be used, whether arithmetic or not. EXAMPLE: ------------------------------------------------------------------------------ X: i < length(ans) X: (ans='HOUSE') or (ans='house') X: index(ans,'car')<>0 C: $s := 'SUNDAY MONDAY TUESDAY WEDENSDAY' X: index($s,'DAY')<>0 ------------------------------------------------------------------------------ {$L-,C-,M-,F-,P+ DO COMPILE PILOT B ASL/S ILIB/S Place the program PILOT.PAS ON DRIVE 'B' and these files on drive 'A': DO.COM, COMPILE.SUB, PRIMS.PZ, ASL.REL, ILIB.REL, LIB.REL, PASCAL.COM, PAS254, MAIN.SRC, LINK.COM, ASMBL.COM } {-------------- Pascal/Z compiler options -----------------} {$C-}{..........control-c checking OFF } {$R-}{..........range checking OFF } {$S-}{..........stack overflow error checking OFF } {$F-}{..........floating point error checking OFF } {$M-}{..........integer mult & divd error checking OFF } {----------------------------------------------------------} TYPE strng = STRING 80; { the length of a "default" string } byte = 0..255; { single byte integer } string0 = STRING 0; { special string for Pascal/Z } string255 = STRING 255; { maximum length for a string } lblptr = ^labelrec; labelrec = RECORD { The data structure of the label list } name : strng; { THE LABEL'S NAME } posn : integer; { POSITION OF LABEL IN TREE } left, { We use a binary tree for faster access } right : lblptr end; mode =(init, { initial stage of production } term, { terminator } prgm, { program mode } proc, { procedure mode } unk); { null mode; no activity } sym =(progsym, remsym, {REMARK } typsym, {TYPE } mtchsym, {MATCH } jmpsym, {JUMP } exitsym, procsym, {PROCEDURE } termsym, computesym, {COMPUTE } usesym, {USE } boolsym, asksym, {ACCEPT } labelsym, linksym, {LINK } waitsym, {WAIT } null ); VAR badsyntax : boolean; { flag any bad systax in prgm } buffer : strng; { data line from input file } cpos : integer; { current label's position } tree : lblptr; { the labels tree } state : mode; { the current state } PrevState : mode; { the previous state } symbol : sym; { the current symbol } PrevSym : sym; { the previous symbol } temp : strng; { temp usage string } used_outbuf: boolean; { flag if using outbuf } fout, { Output file } fin : TEXT; { Input file } {$iPRIMS.PZ }{Utilities from Pascal/Z Users Group Utility Library disk} PROCEDURE error( message: strng ); VAR ch: char; BEGIN WRITELN( buffer ); WRITELN( 'ERROR: ',message ); WRITE( 'Type anything to continue' ); keyin(ch); WRITELN; badsyntax := true; END{error}; { strip -- strips blanks and tabs from buffer at position 'i' } PROCEDURE strip( i: byte ); BEGIN WHILE (buffer[i]=' ') or (buffer[i]=chr(9)) DO delete(buffer,i,1); END{strip}; PROCEDURE place( VAR tree: lblptr; var key: strng ); BEGIN IF tree = NIL THEN BEGIN NEW(tree); cpos := cpos+1; WITH tree^ DO BEGIN name := key; posn := cpos; left := NIL; right := NIL END{WITH} END ELSE WITH tree^ DO IF key < name THEN place( left,key ) ELSE IF key > name THEN place( right,key ) ELSE error('DUPLICATE LABEL') END{place}; FUNCTION FIND( VAR tree: lblptr; VAR key: strng ): lblptr; BEGIN if tree=nil then find := nil else WITH tree^ DO if key < name then find := find( left,key ) else if key > name then find := find( right,key ) else find := tree END{FIND}; FUNCTION lookup( VAR buffer: strng ): INTEGER; { tries to find the label contained in buffer in the labels tree. if not found then the label is inserted into the tree. returns the position of this label in the tree. } VAR node: lblptr; BEGIN ucase( buffer ); node := find( tree,buffer ); if node=nil then begin place( tree,buffer ); node := find( tree,buffer ); end; lookup := node^.posn; END{lookup}; PROCEDURE T( VAR buffer: strng ); { THIS VERSION WRITTEN BY Raymond E. Penley, Feb 01, 1984 } { LAST EDITED: MAR 4, 1984 rep } { THIS INPUT PRODUCES THIS OUTPUT T:This is a test writeln('This is a test'); T: writeln; T:@$a@ writeln($a); T:@chr(7)@@chr(27)@ writeln(chr(7),chr(27)); T:@temp@ is not correct writeln(temp,' is not correct'); T: your score is @#s@ writeln(' your score is ',#s); T:Your score is @#s:3@ points writeln('Your score is ',#s:3,' points'); } LABEL 9; CONST delim = '@'; apos = ''''; TYPE link = ^object; object = record { the data structure of the parse list } TXT : STRNG; TYP : BOOLEAN; next: link end; VAR empty, { flag for empty queue } switch : BOOLEAN; { toggle switch for string vs variable } c : CHAR; argv : link; { one component of the queue } front, { front of the queue } rear : link; { rear component of queue } I : INTEGER; width : INTEGER; { getc - returns one character from the input buffer } PROCEDURE getc( var c: char ); BEGIN IF INIL then begin front := front^.next; if front=NIL then rear := NIL; end; END{retrieve}; { enqueue - places a new component at the rear of the queue. 'Arrival' is a pointer to the new component provided by the caller of the program. Special action is taken when the queue becomes empty. } PROCEDURE enqueue( arrival: link; var front,rear: link ); BEGIN if front=NIL then front := arrival else rear^.next := arrival; rear := arrival; END{enqueue}; BEGIN{PROCEDURE T} WRITE( fout,'WRITE' ); IF vlength(buffer)=0 THEN BEGIN WRITELN( fout,'LN;' ); GOTO 9; END; IF buffer[vlength(buffer)]=';' THEN delete( buffer,vlength(buffer),1 ) ELSE write ( fout,'LN' ); IF vlength(buffer)=0 THEN BEGIN WRITELN( fout,';' ); GOTO 9; END; front := NIL; { initialize queue pointers } rear := NIL; I := 0; SWITCH := FALSE; WHILE Idelim do begin append(argv^.txt,c); IF c=apos THEN append(argv^.txt,apos); argv^.typ := SWITCH; getc(c); END; enqueue( argv,front,rear ); END; { Rebuild the output string from all the arguments } setlength( temp,0 ); { temp := ''; } empty := false; while not empty do begin retrieve( argv,front,rear ); if argv<>nil then begin CASE argv^.typ OF TRUE: append(temp,argv^.txt); FALSE: BEGIN append(temp,apos); append(temp,argv^.txt); append(temp,apos); END END{CASE}; end; empty := (front=nil) and (rear=nil); if not empty then append(temp,','); end; if {we} used_outbuf then width := 51 else width := 68; if vlength(temp) > width then writeln( fout,'(' ) else write( fout,'(' ); writeln( fout,temp,');' ); 9: END{T}; PROCEDURE Execute( symbol: sym ); {LAST EDITED: 02/26/84 Ray Penley} VAR i:INTEGER; BEGIN CASE symbol of labelsym,jmpsym,asksym,linksym,waitsym: strip{buffer}(1); { purge any blanks/tabs } end{case}; CASE symbol of progsym: { Begin main program symbol. internal program symbol } WRITELN( fout,'BEGIN initialize;' ); remsym: { Remark symbol } { R: This is a remark } WRITELN( fout,'{',buffer,'}' ); typsym: { Type symbol } { T: text string } { TY: text @$a@ text -- type a variable } T( buffer ); mtchsym: { Match symbol } { M:@$a@ <<< string variable } { M:a!e!i!o!u <<< text string } IF buffer[1]='@' THEN BEGIN { match a variable } copy( temp,buffer,2,2 );{ extract 2 characters from variable } WRITELN( fout,'match(', temp, ',''!'',ans,flag);' ); END ELSE BEGIN{ match a text string } IF vlength(buffer)>55 then writeln( fout,'match(' ) else write ( fout,'match(' ); WRITELN( fout,'''', buffer, ''',''!'',ans,flag);' ); END; jmpsym,labelsym: { Jump, label symbols } { *START