IMD 1.16: 31/05/2007 19:59:04 FOGCPM.110 --FOGCPM110MAC FIXMACREF COMMACREF DOCXMAC ASM ML80-L80DOC M81 COML ML80 DOC ML80 REFG L81 COMX!"#$%&'()*+L82 COMV,-./0123456L83 COM&789:;ML SUB<USRMAN TXT=>?@ABCDEFGHIJKLUSRMAN TXTDMNOPQRSTU-CPM112 DOC-07-00 86 WDIR M80VWXXDIR M80YZ[\ALGOLM COMj]^_`abcdefghijCOMERR TXT klALGINTROTXTBmnopqrstuALGOL DOCvALGSTARTTXTwxyRUNALG COMpz{|}~RUNERR TXTARRAY ALGBLKTEST ALGBOOLINT ALGCASETESTALGCASETWO ALGFLYTEST ALGGOTOTESTALGHANOI ALG LUNAR ALG ONEND2 ALGPERM ALG READWORDALGRWINT ALGSIISTR ALGSORT ALGSTRING ALGSTRTST ALGBLK INPFILE1 INPFILE2 INPRFILE INPWINPUT INPWFILE OUT-CPM110 DOC This is the disk name. TOPIC : HOW TO MODIFY MAC.COM TO NOT CHANGE LOWER-CASE TO UPPER-CASE FROM : IRVIN M. HOFF DATE : 22 OCT 82 MAC.COM (by Digital Research) is one of the most popular assemblers used with CP/M. It has one feature that most people do not like -- when making a print file (FILENAME.PRN) it automatically converts any lower- case characters to upper-case. Neither ASM.COM nor RMAC.COM by the same firm does that. There are two ways to modify MAC.COM to approach this problem. Changing address 165C from C8 to D0 will convert any lower-case source code to upper, leaving DB strings and comments alone. (1st example below). Changing 1663 from E6 to 5F will leave all the lower case comments alone, will convert all DB strings to upper case, but will toss out any lower case code that does not agree with labels that are also lower case. (second example.) 1st example: leaves all comments and DB strings alone =================================================== 1655 47 MOV B,A 1656 3A 05 30 LDA 3005 1659 FE 03 CPI 03 165B 78 MOV A,B 165C C8 RZ Change the RZ (C8) to a RNC (D0) Using DDT or SID: 165C C8 D0 A>SAVE 46 MAC.COM This will convert any source code not in a string from lower to upper, and not bother any comment areas or DB strings. It's as close as you can get easily, to leaving all lower case alone. 2nd example: leaves all comments alone, but throws out lower case source code including strings that do not match. =================================================== 1663 E6 5F (ANI 5FH) Using DDT or SID, change to: 1663 E6 7F (ANI 7FH) A>SAVE 46 MAC.COM (new, normal version) This prevents the lower-case from being changed to upper-case. For a complete disassembly of that area: 1655 47 MOV B,A ;Put the char. into 'B' temporarily 1656 3A 05 30 LDA ABORT ;See any request to quit 1659 FE 03 CPI 03 165B 78 MOV A,B ;Get the char. back again 165C C8 RZ ;Exit with the char. if a 03 165D FE 61 CPI 61H ;Less than lower-case alpha char.? 165F D8 RC ;If less, ignore 1660 FE 7B CPI 7AH+1 ;More than lower-case alpha char.? 1662 D0 RNC ;If more, ignore 1663 E6 5F ANI 5FH ;Otherwise change to upper-case 1665 C9 RET ;Finished ================================== 1663 E6 5F (ANI 5FH) Using DDT or SID, change to: 1663 E6 7F (ANI 7FH) A>SAVE 46 MAC.COM (new, normal version) This prevents the lower-case from being changed to upper-case. For a complete disassembly of that area: 1655 47 MOV B,A ;Put the !9"1d !]~ ( *i!eR\822͇!]v:2O!R6 +6 !4͇: „͊sʍ:ʔҫ:+s!RsO!~;s*s"!:=~xRy2n:O*~ 7?ss]s]b7?ss~ W0s:s0zWW#5zs2s7?ss~;s"y2n:O*b*+"!|5ͨ!"*> D~D#«~D#¶> D:O^#Vz~D#> D ^#V+z> D> D:=2̨> D> D> D:=2̨*"*}|¡}¡\\#~# xR# x]!hi6R0ڈ:Aڈ[ɷ!~ D> D> D> D:2!:G~D#~ ;# 7ɷ~;  # 7ɷ*|6}6\3>@!~#" *w#"|ƒ}ƒ\rK #!"6R!6 R ¦ aڷ{ҷ'{_Gzx*! > #$ʝw# w+6 !r :,+-*/=()<>!"** <f# I%B~ I**"*}|};I<:=z> 2!^#Vz©+*s#r!R6#6#"ÁSYMPRNCP/M MACRO ASSEMTITLEPAGE Program name not specified$ Symbol file doesn't exist$ Out of Memory$ Invalid Symbol File$ Print file doesn't exist$ Disk or Directory Full$Assembled April 14, 1982$'t exist$ Out of Memory$ Invalid Symbol File$ Print file doesn't exist$ Disk or Directory Full$Assembled April 14, 1982$̨> D> D> D:=2̨*"*}|¡}¡\\#~# xR# x]!hi6R0ڈ:Aڈ[ɷ!~ D> D> D> D:2!:G~D#~ ;# 7ɷ~;MACREF.COM is a nifty cross-reference utility for MAC print files. It appends a cross-reference to the '.prn' output using the labels from the '.sym' file. Uses memory addresses to reference lines. Does not create a new output file, but adds the xref to the '.prn'. To invoke MACREF, 'MACREF FILE', where FILE.PRN and FILE.SYM are on the same diskette. le, but adds the xref t the '.prn'. To invoke MACREF, 'MACREF FILE', where FILE.PRN and FILE.SYM are on the same diskette. le, but adds the xref t; ;XMAC -- ; MACRO ASSEMBLER "MAC" CHANGES TO DISABLE 8080 OPCODES FOR CROSS-ASSEMBLY ; WORK ; THIS PATCH WAS ORIGINALLY SUPPLIED WITH MY MAC MANUAL -- RLC ; THIS IS TO BE PATCHED INTO MAC USING DDT. AFTER THE PATCH IS COMPLETE, ; PERFORM A "SAVE 46 XMAC.COM" TO CREATE XMAC.COM. ; RT EQU 25 ; 8080 REGISTER NAME PT EQU 26 ; PSEUDO OPCODE TYPE TAREA EQU 2561H ; FREE AREA IN TOKEN MODULE ; ORG 2444H ; OVERLAY INXH - MOV B,M - RET JMP TAREA ; ORG TAREA ; TYPE IS IN THE ACCUMULATOR CPI RT ; BELOW RT IF ARITHMETIC OPERATOR JC TYPEOK CPI PT ; PSEUDO OP? RNZ ; RETURN WITH NON-ZERO FLAG ; OTHERWISE, PSEUDO-OP OR ARITHMETIC OP TYPEOK: INX H MOV B,M CMP A ; SET ZERO FLAG RET END  OTHERWISE, PSEUDO-OP OR ARITHMETIC OP TYPEOK: INX H MOV B,M CMP A ; SET ZERO FLAG RET END These files comprise the ML80 system from -CPMUG.004 and -CPMUG.036. This system is the result of L.R.B.Pedroso's thesis "ML80: A Structured Machine- oriented Microcomputer Programming Language," available from the National Technical Information Service (NTIS) using order number AD/A-020 055. ML80 is actually two language processors, M80 and L80. M80 is a general macro processor which can be used independently of L80. L80 is a structured assembly language for the 8080. Two sample disk directory programs written in ML80 are included, WDIR and XDIR. To use the system, place ML.SUB, M81.COM, L81.COM, L82.COM, L83.COM, and SUBMIT.COM in drive A. At the A> prompt, type SUBMIT ML filename where filename is an ML80 program file of type .M80 (which must also be in drive A). If macros are not used, the M81 portion of the process may be skipped; in this case, the program file must be of type .L80. L81 parses the program, L82 generates code, and L83 links the program creating a .COM file, which may be executed at a CP/M > prompt. For further information, refer to ML.DOC first, then ML.REF. Service (NTIS) using order number AD/A-020 055. ML80 is actually two language processors, M80 and L80. M80 is a general macro processor which can be used independently of L80. L80 is a structured assembly language for the 8080. Two sample disk directory programs written in ML80 are included, WDIR and XDIR. To use the system, place ML.SUB, M81.COM, L81.COM, L82.COM, L83.COM, and SUBMIT.COM in drive A. At the A> prompt, type SUBMIT ML filename where filename is an ML80 program file of type .M80 (which must also be in drive A). If macros are not used, the M81 portion of the process may be skipped; in this case, the program file must be of type .L80. L81 parses the program, L82 generates code, and L83 links the program 1È!R&q#p-^,VzW{_ {B!U&q,s#r!Y&q,s#r!\&6#6!\&~,F!,OxҪ!\&N,F! ,YP ʝÒ WRITE ERROR, ABEND M81.$ y,8*\& "\&F-6#6!_&q!~,FOx>-N,F! !_&Ny*#"!`&q#p!~ր ,!6!`&^,V  >!N* ~!b&w!4!b&~ /*\##"\#!b&~!c&q.QN L.c^,R.cNͱ 4 4!d&q#p*d&~$|~O4*d&#"d&d!f&q#pS!f&N,F^!Q&6͐åEND M81 $}S8!h&q#p.k6> !k&N*h& ~ !k&N*h& ~O4!k&~.4!k&4¼!l&q#p͐CANNOT OPEN $}!l&N,FͲ͖!n&q> 9~ AO4@~0O4!o&q~ HO#!o&~O#!p&q#p04!p&N,FHA!p&NAH4!r&q#p-N,Fң-4!r&,O>-q#w!t&6#6'.w6>!t&,O><!t&^,V.rN,Fz/W{/_!>yOxG}o|g=|W}_!v&q,-N#!w&6!t&^,V.rN,F!r&s#r !t&N,F!t&q#pï.rN#!x&q#p.{6!{&~|N.x^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& ~#F!8&w#p*& ~#F!:&w#p *& ~#F!<&w#p *& ~#F!>&w#p.N͈!&N͊!6N%. ~#F!&^,VO!2&^,VOͥ!<~,FOx!Z#^,VGͥu!:w#p!76!8~u.6o͒͊͒!:6#6.86u!:w#p!7~}.A6.96!9~Ґ6.6N%. ~#F!A^Od!<w#p-~,FOx,q#w-~,FOx0]à-~,FOx[z.:~,FOxGy,,Oxp.A4.6N%. ~#F!A^Od!<w#p-~,FOx,q#w-~,FOx0V]z-~,FOx j5mUz.A~w.96à&!`#q#p*~#F!`#,Ox,q#w!L&6#6>!L&,O>-N,F!0" 6#6!L&N,F! "L&á,6#6!N&~,F!d#,Ox}.16!N&N,F.Lq#p!L&N,F*`# ~!L&N,F*`# ~O*L&#"L&!N&N,F3 !1#N%- ~#FO3 *N&+*`#~O! KB3 *N&+*`#!1#NyN%- !$N,Fyx*L& "N&$.N,F,q#p~͇͐vx,q#w!L&6#6>!L&,O>-N,F!0" 6#6!L&N,F! "L&á,6#6!N&~,F!d#,Ox}.16!N&N,F.Lq#p!L&N,F*`# ~!L&N,F*`# ~O*L&#"L&!N&N,F3 !1#N%- ~#FO3 *N&+*`#~O! KB3 *N&+*`#!1#NyN%- !$N,Fyx*L& "N&$.N,F,q#p~͇͐ L80\[ @[          ]  000000 0 _ 0% & !! -( (' * ) + 00000- 0]. 0 0 01 \0 0&2 00 0% & -( (' : ; < =7 <8 >9 +5 -6 "0*= /> %? *0-01020B & !! -( (' C 0001 D \0 001 \0 0% & !! -( (' % & !! -( (' !0% & -( (' % & -( (' $0%0&0'0(0)0% & -( (' )N 1 \0 )O _ 1050P &2 0&2 00+5 -6 #0*= /> %? +0*= /> %? ,0.0/0003040Q 0R 0 "#$%&'(+.9>.ABCDEHILMN.OTWXYbsz{|}     '@ ,/'A0E1F2G!3 4H"45I6J#=K>L?M$ !#%+/379? 0INT DEC OCT HEX CHAR MACROTHENELSEIF 0M81.COM is a patched version of 4.14 which fixes an error in the IF macro. L82.COM is a heavily patched version of 4.12 which fixes a bug in generating relocation information for DATA constant declarations, moves the top of memory (for symbol tables) to 5D00H from 3200H. Note that the old value was for 16K CPM version 1.3. In CPM version 1.4, max memory in 16K is only 3100H. This maximum can be changed with DDT by changing the byte at 2301H from 5DH to whatever. 5D00H allows running ML82.COM under DDT in 32K CPM version 1.4. The most substantive change patches the symbol table arrays from 40 entries to 254 entries. This number limits the maximum number of names which can be known within any one block. After running over 40 and patching, I have not yet hit the new limit with over 800 line programs. Between this patch and the expansion of memory, the total number of distinct labels and strings in the program can probably exceed 700. ML80.REF This is a four page capsule summary of the syntax and semantics, and errors, of M80 and L80. h fixes a bug in generating relocation information for DATA constant declarations, moves the top of memory (for symbol tables) to 5D00H from 3200H. Note that the old value was for 16K CPM version 1.3. In CPM version 1.4, max memory in 16K is only 3100H. This maximum can be changed with DDT by changing the byte at 2301H from 5DH to whatever. 5D00H allows running ML82.COM under DDT in 32K CPM version 1.4. The most substantive change patches the symbol table arrays from 40 entries to 254 entries. This number limits the maximum number of names which can be known within any one block. After running over 40 and patching, I have not yet hit the new limit with over 800 line programs. Between this patch and the expansion of memory, the total number of distinct labels and strings in the program can probably exceed 700. ML80.REF This is a four page capsule summary of theThis is documentation of ML80 extracted from L. R. B. Pedroso's thesis, "ML80: A structured machine-oriented microcomputer programming language." The thesis is available from the National Technical Information Service as order number AD/A-020 055 for $7.75 (on the last price list I saw). It includes complete PL/M source code listings as well as the formal grammars and fairly complete discussion and examples. The source code is available from the Intel Users' Library for $70. What follows is on the order of a quick reference guide to ML80. ML80 is actually two language processors, M80 and L80. M80 is a general macro processor which can be used independently of L80 for any macro processing. L80 is a structured assembly language for the 8080 microprocessor, and almost all of the operations allowed directly reflect one or two 8080 instructions. SUMMARY OF M80 SYNTAX [INT id1 id2 ...] Declare integer macros, initial value zero [id := expr] Assign new value to integer macro [DEC expr] Substitute decimal value of expr in text [OCT expr] Substitute octal value [HEX expr] Substitute hexidecimal value [CHAR expr] Substitute ASCII character, 0=NUL, 32 = SPACE, 65= A, etc. Note that this is the only way to get [, ], and ' in the result. [id] Substitute the (decimal) value of id Note on all of the above that no characters bracket the final substitution. Thus the string 'XX[DEC 23H]YY' becomes 'XX35YY' [MACRO mname fp1 fp2 ... fpn 'string'] Define new macro with name mname and formal parameters fp1 ... fpn and body string [mname 'str1' 'str2' ... 'strn'] Replace by result of substituting str1 ... strn for the formal parameters of mname in the macro body. The quotes ARE needed. [IF expr THEN 'string'] Replace by string if the least significant bit of expr (in binary) is 1. [IF expr THEN 'str1' ELSE 'str2'] Replace by one of the strings depending on expr. Of the above, INT, assignment, MACRO and a false THEN-only IF are replaced by the empty string. Comments may be embedded in macro bodies by /* comment */ device. Expressions are composed of (in order of increasing priority): \ for OR \\ for XOR & for AND ! for NOT = < > <= >= <> for comparisons + - * / % for MOD integer-id number -number (expr) (id := expr) The value of expressions are limited to integers +/- 32767 Numbers may be written in hex, decimal, octal or binary by using the suffix H, D, Q and B respectively. Hex numbers must start with a decimal digit. Identifiers within an expression are NOT bracketed. In strings, use two consecutive quotes '' to represent a single quote. Macro calls are recognized even within strings. M81 processor errors: M81 writes all error messages embedded in the output text being processed. These messages may be found by searching for *** LINE nnnn: ERROR nn in column 1. From ED, use F^L*** LINE^Z0TT to find and print the next message. Error Meaning 1 Unexpected EOF. Probably mismatched ' or [. 2 Mispelled number 3 Number too large, -32768 to 32767 only 7 Syntax error 11 Undefined macro, probably misspelled or wrong number of parms 12 Numeric macro has parms 13 More actual parms than formal parms 14 Nonnumeric assignment 15 Nonnumeric expression The following errors abort processing F1 Too many macros F2 Too much nesting of macro calls F3 Strings too long F5 M81 error F7 unrecoverable syntax error L80. L80 is implemented as three modules, L81 -- the parser, L82 -- code generator, and L83 -- linker. Note that if you write a program without macros you don't need M81. L81 and L82 each process a single program file, but L83 can combine several if it is given a file which declares external procedures. For each external procedure, it will also load the file of the same name. Capsule summary of L80 syntax Program ::= stmt; stmt; ... EOF Stmt ::= ident:stmt defines ordinary label here number:stmt puts stmt at absolute location IF cond THEN stmt {ELSE stmt} note else optional DECLARE id {(length)}BYTE variables (id1, id2,..) LABEL for forward GOTOs EXTERNAL external proc COMMON external data DATA(const, const, ...) a constant variable BYTE may be followed by INITIAL(const, const, ...) initialize ONCE DO; stmts; END ident grouping for IF etc. DO assign {BY assign} WHILE cond; stmts; END Note that you must be sure to set flags for while DO CASE HL; c0stmt; c1stmt; ...; END do one alternative Note that this changes HL, uses array of labels(fast) ident:PROCEDURE{(id, id,...)}; stmts; END RETURN IF simple-cond RETURN Note no THEN, generates RC etc CALL ident{(const, const,...)} Note parms are constants CALL number No parms, CALL 0 gives RST 0, etc IF simple-cond CALL id/number No parms, uses CC, etc GOTO M(HL) GOTO ident/number IF simple-cond GOTO id/number Uses JZ etc REPEAT; stmts...; UNTIL cond Always done at least once. HALT NOP DISABLE Interrupts of course ENABLE Ditto A::expr CMP or CPI HL==reg-exp XCHG or XTHL var=reg-exp Watch possible registers reg=expr The following are builtin, reserved variables: M(BC) M(HL) M(DE) M(const) IN(number) OUT(number) A, B, C, D, E, H, L, BC, DE, HL, PSW, SP, STACK (meaning top), CY. All assignments and expressions must have an 8080 op code (except that HL=BC (etc) work). Thus BC=BC+5 is illegal. simple-cond ::= {(stmts)} flag Optional stmts can be used to set PSW for flag test flag ::= ZERO | ! ZERO | CY | ! CY | PY EVEN | PY ODD | PLUS | MINUS COND ::= simple-cond & simple-cond & ... Several anded tests simple-cond \ simple-cond \ ... or several ored tests. And and or can't be mixed in one cond. CONSTANT ::= .'string' | 'string' | number | -number .ident | .ident(number) . denotes address of, gives a two byte constant. Expressions are evaluated left to right,  except a parenthesized register expression within an axpression is done just before needed. E.g. A=M(7)+(B=8),-2; compiles as LDA 7! MVI B,8! ADD B! SUI 2 Unary operations always follow an assignment =, but nested expressions to the right are still possible. All operators are equal priority and ldft to right. Operators are: + add - sub ++ adc -- sbb & and \ or \\ xor < ral << rlc > rar >> rrc ! cma/cmc # daa !, #, >, >>, <, << are unary operations. Following the first operator in an expression, all subsequent operators are delimited with a comma. +/- 1 is recognized as incr/decr-ement. Beacause of 8080 instruction limitations, most occurances of non-register variables are limited to assignment to and from A and HL. Generally, most places a variable or register may occur on the right side of an operation, a parenthsized assignment to that variable is allowed (as the (B=8) in the example above. ERRORS L81 prints all its error messages to the console in plain text (giving line number and error message). If you use no CR/LF sequences inside macros, these line numbers will be the same as the M80 macro source. CR/LF in a macro body will put extra lines in while CR/LF inside macro calls will remove a line. L82 errors. Also given in terms of line number. Error Meaning 00 INITIAL data too long, truncated on left. 01 Identifier redeclared in same block. 02 Identifier redeclared (ignored). 03 Invalid procedure name. 04 Reference to undeclared identifier. Usually either mispelled, lost in some earlier error or forgot to declare label for forward branch. 05 Wrong number of parms in procedure call. 06 Invalid call (not a procedure or undefined) 07 Not a machine operation (no 8080 instruction does this) This often follows 04 as 04 is fixed up by substituting M(0). 08 Feature not implemented. (E.g. CASE DE in DO) 0A Invalid constant 0B Invalid GOTO destination, not a label or number 0E Reference to undefined address TERMINAL ERRORS F1 Too many nested statements F2 Too many symbols in one block F3 Too many nested blocks F4 Too many unresolved cases F5 Parser actions file (.80P) contains error F6 Symbol list overflow, too many symbols and strings L83 errors (all terminal) 1 Too many modules (file groups) 2 Memory overflow (segment too big) 3 Bad relocation record (in .80R) Files used in ML80 x.M80 macro source input x.L80 macro expansion output, L81 input source x.80S Symbol table, out from L81, into L82 and L83 x.80P Parser actions, from L81 to L82 x.80C L82 output of code and constants, to L83 x.80D L82 output of initializing data for variables, to L83 x.80R L82 output of relocation information, to L83 x.COM CP/M command file after linking L83 doesn't do it, but all material from x.80C could by put in PROM, with material from 80D loaded to initialize the program (after relocation). B Invalid GOTO destination, not a label or number 0E Reference to undefined address TERMINAL ERRORS F1 Too many nested stat1ô!q,s#r!q,s#r!q^ $ $!q#p -^,V!q#p1!N,F<!q> u~ AO$|~0O$!q~ „O_!~O_!q#p-N,FH}!N}úEND L81$L1!q#p.6> ! N* ~ !N* ~O$!~.$!4!q#p"CANNOT OPEN $L!N,Fͯ!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!fw#p * ~#F!hw#p* ~#F!lw#p,w#p*~#F!h,Ox,q#w!6#6>!,O>&-N,F!p 6#6!N,F! "!6#6!~,F%.n,Oxҳ$.q6.N,F!q#p!N,F*h ~x!N,F*h ~O*#"O!qN%- ~#F_P!N,Fj !qN%- !N,Fyx* ".Z;ERRORS: $L![N}ͯv#F!h,Ox,q#w!6#6>!,O>&-N,F!p 6#6!N,F! "!6#6!~,F%.n,Oxҳ$.q6.N,F!q#p!N,F*h ~x!N,F*h ~O*#"O!qN%- ~#F_P!N,Fj !qN%-  80P 80S\  $ % *   2 4 $ %( & M1 '- )) * + , - .+ /, 0. 1/ 20 35 46 @;7 0000,8 00 0 0 0 0 00000$ % *   2 4 #; $ %( & M1 '- )) * + , - .+ /, 0. 1/ 20 35 46   $ % *   2 4 $ %( & M1 '- )) * + , - .+ /, 0. 1/ 20 35 46 B (E ;F  $ % *   2 4 $ %( & M1 '- )) * + , - .+ /, 0. 1/ 20 35 46 Z0(L !N O P Q R S T V X Y MZ g0k0l0m0n0] \ =^ 0,_ 0(a :` 0:b i * ;I02 "f M1 '- .+ /, 0. 1/ 20 35 46 0;j (m b0;n 0000000(o 0=p M0(q (r  $ % * s   2 4 $ %( & M1 '- )) * + , - .+ /, 0. 1/ 20 35 46 00V0 0 $ % *   2 4 $ %( & M1 '- )) * + , - .+ /, 0. 1/ 20 35 46 w 00z 50(} | ~    A0  C0 $ % *    2 4 $ %( & M1 '- )) * + , - .+ /, 0. 1/ 20 35 46 ;  & \ $ % & &0(L !N O P Q R S ,0  .000  3040( \0]0^0  - . d0e0( ;   * ( 2 M '- - . .+ /, 0. 1/ 20 * ( 2 M '- .+ /, 0. 1/ 20 i   *   ( ! 2 M1 '- - . .+ /, 0. 1/ 20 < > # 35 46    & \ - + 0 0J0K0  ! * 2 M '- .+ /, 0. 1/ 20 0=^ (a 0T0;  X0j0  ' - . . /   000!0#0=0( 60;0E0>0?0@070( ) , ) H0L0 0$ % *    2 4 #; $ %( & M1 '- )) * + , - .+ /, 0. 1/ 20 35 46  $ % *    2 4 $ %( & M1 '- )) * + , - .+ /, 0. 1/ 20 35 46 "0'0)0[0c0h0& $0\ %0; ) -0/01020`0, ) |0}0   '  $ % *   2 4 $ %( & M1 '- ( )) * + , - .+ /, 0. 1/ 20 35 46 o0z0{0r0* 2 M '- .+ /, 0. 1/ 20 ( p0   & \ - + v0i   * ( 2 M1 '- - . .+ /, 0. 1/ 20 35 46 x0y00000000000000) i * 2 M1 '- .+ /, 0. 1/ 20 35 46 (L !N O P Q R S P0Q0R0U0, ) ) ) ) ) q0) ) , ) 0, ) 90 B0D000S0(0*0!N O P Q R S _0a0~0( 00) ,_ ) ' u0w00! O0& \ &0W0Y0000000F0G080:0<0+0 f0i0s0t0) N0047:;<=>ABCDEFGHIJK~      =BCFGHIJKLMPQTUX[))89>?@EFGJKLUVWZ]zz L L!$',-.1f"EFGHIJKL]MNOPQRSTWpp]p"##!!! ''%&(((()**,-+//0122 45533 66 7 99;;88$$$$$$.........<<<<<<<======::::::: #)+-/13579;=CKOQWY[_ackmuw{}G[L<7t=vFttt9>9:: &gF8u?yЊe"#=HJIJKKM@A{WoyȂCxD&cd&h\]^fphhߣ!'klUW\]p^3 EOF DECLAREINITIALENDIFTHENELSEZEROCYPYODDEVENPLUSMINUSDATABYTELABELEXTERNALCOMMONDO BY!WHILE"CASE#PROCEDURE$RETURN%CALL&GOTO'HL(UNTIL)REPEAT*HALT+NOP,DISABLE-ENABLE.BC/DE0SP1STACK2PSW3IN4OUTODDEVENPLUSMINUSDATABYTELABELEXTERNALCOMMONDO BY%'(k),)W*M ^ UbZvOD)EEKIBM; !@nEra`@@jG'iB<%{&=@,@F]naO#z`@JcM]lPJ@"H-h0fA"|n(HH)tKic I{heڪYIO(14&"!-+q,s#r!1+q,s#r!5+q^  !6+q#p+ !6+^,V!8+q> a~ AOh~0O!9+q~ pOK!9+~OK!:+q#p-N,FHi!:+Ni!<+q!) ~ôEND L82$6+!=+qCANNOT OPEN $6!=+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NF!w#p*+*~!w.N >.O~_~ѣ* ".NF!w#p!N,F* !N,F* >!~O~.N-q8 L:$5 !N,FͩN A:$J Ϳ!NFO* KBͩm T:$i Ϳ!N ƒ LTê ~‘ BTê ~Ÿ PTê ~ª ST T!N,F* KBU!6 *@ ~ ` SYMBOL LISTING$ `z.w OUTPUT TO PRINTER$ `z .6.N,F͕`z/` C LA (XXXX) = $6 !w!^O.w#p!N,F,q#p$.#6!6#6$. "h!6!~ ^*@O~!w  .N,F$. !N!E !Nyq*#"!4Ç .N,F$. 6*#"! KBx!w.6!~. N.X !N,F$. s#rS͚~I!~.ʩ ~R.O~,V_zң -N,F* "!N,F͢ң !4~p ͇*+*!NyN%.h !N,Fyx.N. !NyI% .N%. !N%. !N,Fyxq#p!N%. !N. !N,Fyxq#p!N.0 !N,Fyx.4 0EYPEYPA ͇ !E 6!N,F$. "!6!~.ڰ C͚~I!~.ʘ ~R.^O>ʍ ܌Is .N%. ~#FO!4\ 6!~. D͚~I!~. ~R.O~܌!~S. I .N. ~#FO!4² ̈́EYP* ͇!N,F͕F LAST ADDRESS = $6 *+KBͩdm MODULES LINKED: $\ !6!~.ړ d!Nt!4x dv\ COMM81 $1 L81 $1 ERA $1.L80 L82 $1 L83 $1.X ERA $1.80? XMAC ASM ML80-L80DOC M81 COML ML80 DOC ML80 REFG L81 COMX!"#$%&'()*+L82 COMV,-./0123456L83 COM&789:;ML $$$ ALGOL-M LANGUAGE REFERENCE MANUAL This section describes the various elements of the ALGOL-M language. The format of the element will be shown, followed by a description and examples of use. The following notation is used: Braces {} indicate an optional entry. A vertical bar | indicates alternate choices, one of which must appear. Elipses "..." indicate that the preceding item may be optionally repeated. Reserved words are indicated by capital letters. Reserved words and other special symbols must appear as shown. Items appearing in small letters are elements of the language which are defined and explained elsewhere in the language manual. arithmetic expression ELEMENT: arithmetic expression FORMAT: integer|decimal variable {(} arithmetic expression binary operator arithmetic expression {)} {(} unary operator arithmetic expression {)} DESCRIPTION: Operators in ALGOL-M have an implied precedence which is used to determine the manner in which operators and operands are grouped. A-B/C causes the result of B divided by C to be subtracted from A. In this case B is considered to be "bound" to the "/" operator instead of the "-" operator which causes the division to be performed first. The implied precedence binds operands to the adjacent operator of highest precedence. The implied precedence of operators is as follows: unary -,+ ** *,/ +,- Parentheses can be used to override the implied precedence in the same way as they are used in ordinary algebra. Thus the expression (A-B)/C will cause B to be subtracted from A and the result divided by C. EXAMPLE: (X + Y) * (Z * Y + X) ** 2 X + Y + Z * X * Y * Z / 5.456 + I ARRAY declaration ELEMENT: ARRAY declaration FORMAT: INTEGER|DECIMAL|STRING {(expression)} ARRAY identifier ... bound pair list {,identifier} DESCRIPTION: The array declaration dynamically allocates storage for arrays. The optional integer expression indicates the length of each array element. For strings, the maximum length is 255 characters and for decimals the maximum length is 18 digits. Integer lengths are not specified since storage adequate to represent all integer values between -16,383 and +16,383 is automatically allocated. Arrays are not automatically initialized to zero. EXAMPLE: INTEGER ARRAY X[0:5,0:5]; DECIMAL(10) ARRAY X,Y[3:6,5:10]; STRING ARRAY WORDS[Y+3:12]; STRING(20) WORD[0:X+5,5:10,15:20]; assignment statement ELEMENT: assignment statement FORMAT: variable := {variable :=} ... expression DESCRIPTION: The expression is evaluated and stored into the variable. The types of permissible assignments are indicated by the following table: expression integer decimal string integer yes no no variable decimal yes yes no string no no yes Multiple assignments are allowed with the expression being assigned to all of the listed variables. EXAMPLE: X := Y + Z; Y[1] := Y[2] := 50; assignment on the fly ELEMENT: assignment on the fly FORMAT: ( variable := { variable := } ... expression ) DESCRIPTION: Algol-m allows a special form of the assignment statement known as assignment on the fly. This form of an assignment statement can be used anywhere an expression is allowed. The expression to the right of the := symbol is evaluated and then stored into the variable on the left. The value of the entire expression is the same as that of it's right half. The only difference is the side-effect of storing the intermediate result into the variable on the left. These intermediate results can then be used at a later point in the program without re-calculating them. EXAMPLE: A:= (B:=C + 5) * 2; IF (B:=C:=D+5) > 10 THEN WRITE(B); balanced statement ELEMENT: balanced statement FORMAT: {label definition} simple statement {label definition} IF boolean expression THEN balanced statement ELSE balanced statement DESCRIPTION: If the boolean expression is true, the balanced statement to the left of the ELSE is executed. If the boolean expression is false, the balanced statement to the right of the ELSE is executed. EXAMPLE: IF A < B THEN A := 1 ELSE A := 2; IF B = C THEN BEGIN WRITE(B); B := B + 1; END ELSE BEGIN WRITE(C); C := C + 1; END; PROGRAMMING NOTE: A semicolon is not allowed after the statement immediately preceding an ELSE. block ELEMENT: block FORMAT: BEGIN {declaration;} ... statement; ... END; DESCRIPTION: The block is the foundation of the ALGOL-M language. Each time a new block is entered new variables may be declared. These variables are unique in the sense that a variable X declared in two different blocks represents two different variables. All storage within a block is dynamic and allocated when the block is entered and de-allocated when the block is departed. A block can be used any place a simple statement can be used. EXAMPLE: BEGIN X := 1; Y := 2; END; IF X = Y THEN BEGIN INTEGER X,Y; X := 3; Y := 4; END; PROGRAMMING NOTE: Declarations may not appear in case blocks. The final END, which matches the initial program BEGIN, is not followed by a semicolon. boolean expression ELEMENT: boolean expression FORMAT: NOT boolean expression boolean expression OR boolean expression boolean expression AND boolean expression {(} expression =|<|>|>=|<=|<> expression {)} DESCRIPTION: Integer-integer, decimal-integer, decimal-decimal, integer-decimal, and string-string comparisons are allowed in ALGOL-M. For integer-decimal and decimal-integer comparisons the integer value is converted to a decimal value prior to comparison. The result of a comparison of numerical values is based on the size of the numbers. The result of a comparison of string values depends on a character-by-character comparison where the first instance of a non-equal character establishes the boolean result. The collating sequence of the ASCII character set is used for string comparisons. Generally, numbers are followed by upper case letters which are followed by lower case letters. EXAMPLE: X > Y OR Y < Z; (X = Y) AND (Y = Z OR Z = 10); IF NOT X = 1 THEN WRITE("HELLO"); bound pair list ELEMENT: bound pair list FORMAT: [expression : expression{,expression : expression} ...] DESCRIPTION: Expressions in the bound pair list must be of type integer and greater than or equal to zero. There can be no more than 255 dimensions. EXAMPLE: [1:7,0:5] [3:6,x:y] [y*3:z,1:12] CASE statement ELEMENT: CASE statement FORMAT: CASE expression OF BEGIN statement; ... END; DESCRIPTION: The CASE statement allows the programmer to choose one of several statements to be executed. The statement chosen depends on the value of the integer expression. The first statement is executed if the expression evaluates to zero. If the value of the expression is greater than the number of statements in the case block, the resulting action is undefined. EXAMPLE: CASE X+Y OF BEGIN WRITE("CASE 0"); WRITE("CASE 1"); END; constant ELEMENT: constant FORMAT: integer|decimal|string DESCRIPTION: A constant may be either an integer, decimal, or string constant. Integer constants are numbers with no decimal point ranging from -16383 to +16383. Decimal constants are numbers with a decimal point and may not exceed 18 digits in length. String constants may be composed of any combination of alphanumeric and special characters and may be up to 255 characters in length. Strings entered from the console or disk may be either enclosed in quotation marks or delimitd with commas. Strings used as constants in the program must be enclosed in quotation marks. EXAMPLE: 10 10.5678 "EXAMPLE ONE" declaration ELEMENT: declaration DESCRIPTION: See FILE declaration, ARRAY declaration, simple declaration, procedure declaration, and function declaration. expression ELEMENT: expression FORMAT: boolean expression|arithmetic expression DESCRIPTION: See arithmetic expression and boolean expression. FILE declaration ELEMENT: FILE declaration FORMAT: FILE identifier {(expression)} {,identifier {(expression)}} ... DESCRIPTION: The identifiers used in the FILE declaration are file identifiers which reference actual file names. The actual file names may be assigned at compile-time or at run-time. The  optional integer expression following the file identifier is used to specify the record length in bytes for blocked records. EXAMPLE: FILE TAPE1, TAPE2(128); PROGRAMMING NOTE: Blocked records are not implemented. FOR statement ELEMENT: FOR statement FORMAT: {label definition} FOR assignment statement STEP expression UNTIL expression DO simple statement DESCRIPTION: Execution of all statements within the simple statement are repeated until the indexing variable is greater than or equal to the value of the UNTIL expression. The indexing variable is incremented by the amount specified in the STEP expression and must be incremented by a positive amount. The UNTIL and STEP expressions are evaluated on each loop. EXAMPLE: FOR I := 1 STEP 1 UNTIL 10 DO X := Y; FOR INDEX := X+Y STEP 2 UNTIL X*Y DO BEGIN A := A + B; WRITE(A); END; function call ELEMENT: function call FORMAT: identifier {(expression {,expression} ...)} DESCRIPTION: Functions may appear as primary elements in arithmetic or boolean expressions. Parameter passing is by value. Functions may be called recursively with no limit to the number of recursive calls allowed. EXAMPLE: X := RAND; Y := SQRT(5.6); C := FUNC * RND(2); function declaration ELEMENT: function declaration FORMAT: INTEGER|DECIMAL|STRING FUNCTION identifier {(identifier {,identifier} ...)} {declaration; ...} simple statement; DESCRIPTION: A function declaration may or may not include parameters. If parameters are included they must be declared before the simple statement which represents the body of the function. Parameters are passed by value and may be of type integer, decimal, or string. Functions return a value to the point of call. The value to be returned is assigned to the function name (which is used as a simple variable within the function) prior to the end of the function. Functions may be called recursively with no limit set as to the number of recursive calls which can be made. Variables may be declared within functions and are considered local to the function. EXAMPLE: INTEGER FUNCTION VALUE(X); INTEGER X; BEGIN X := (X * 5) + (X * 2 ); VALUE := X; END; GOTO statement ELEMENT: GOTO statement FORMAT: label definition GO TO identifier|integer label definition GOTO identifier|integer DESCRIPTION: Execution continues at the statement labeled with the identifier or integer following the GOTO or GO TO statement. EXAMPLE: NEXT: GO TO 100; 100: GOTO NEXT; PROGRAMMING NOTE: GOTO statements can only be used to branch within the current block or to an outer block. GOTO statements branching out of subroutines can cause unkown results. identifier ELEMENT: identifier FORMAT: letter {letter|number} ... DESCRIPTION: Identifiers begin with a letter and are continued with any alphanumeric characters. Although identifiers up to 255 characters may be used, only the first 31 characters are actually used to distinguish the identifiers. EXAMPLE: A NAME COUNTER1  IF statement ELEMENT: IF statement DESCRIPTION: See balanced statement or unbalanced statement. if expression ELEMENT: if expression FORMAT: IF boolean expression THEN expression ELSE expression DESCRIPTION: The if expression allows a conditional expression evaluation. If the boolean expression is true the value of the if expression is the value of the expression following the word THEN. If the boolean expression is false the value of the if expression is the value of the expression following the word ELSE. EXAMPLE: WRITE( IF A > B THEN A ELSE B ); A:= IF B=C THEN B ELSE D; label definition ELEMENT: label definition FORMAT: identifier|integer : DESCRIPTION: Label definitions are optional on all balanced or unbalanced statements. EXAMPLE: FINISH: 100: procedure call ELEMENT: procedure call FORMAT: identifier {(expression {,expression} ...)} DESCRIPTION: Procedures can be called with or without parameters. Parameter passing is by value. Procedures can be called recursively with no limit set as to the number of recursive calls. EXAMPLE: COMPUTE; COMPARE("AAA", WORD); COUNT(1, 2, 3); procedure declaration ELEMENT: procedure declaration FORMAT: PROCEDURE identifier {(identifier {,identifier} ...)} {declaration; ...} simple statement DESCRIPTION: A procedure declaration may or may not include parameters. If parameters are included they must be declared before the simple statement which represents the body of the procedure. Parameters are passed by value and may be of type integer, decimal or string. Procedures do not return a value to the point of call. Procedures can be called recursively. Procedures are considered separate blocks within which local variables may be declared. EXAMPLE: PROCEDURE OUTPUT; WRITE ("HELLO"); PROCEDURE COMPARE(X,Y); INTEGER X,Y; BEGIN WRITE("THE LARGEST INTEGER IS "); IF X > Y THEN WRITE(X); ELSE WRITE(Y); END; READ statement ELEMENT: READ statement FORMAT: READ {file identifier}(variable {,variable} ...) {ONENDFILE block} DESCRIPTION: If the form of the READ statement is READ(, then the input device is the console. Otherwise a file option must be specified and the input device is the disk. A READ statement reads one or more variables at a time. The optional ONENDFILE section indicates action to be taken when the end of the specified file is reached. EXAMPLE: READ(WORDONE, X, VALUE2); READ FILE3 (WORDONE, X, VALUE2); PROGRAMMING NOTE: The ONENDFILE section is curently not implemented. The file identifier must have a CPM file name assigned to it prior to reading from that file. When this file name is assigned in an assignment statement it also opens the file. All files are automatically closed at the end of the block in which they are declared. A file close error will occurr if a file is declared and never opened. reserved word list ELEMENT: reserved word list FORMAT: letter {letter} ... DESCRIPTION: The following words are reserved by ALGOL-M and may not be used as identifiers: AND ARRAY BEGIN CASE CLOSE DECIMAL DO ELSE END FILE FUNCTION GO GOTO IF INTEGER NOT OF ONENDFILE OR PROCEDURE READ STEP STRING TAB THEN TO UNTIL WHILE WRITE WRITEON Reserved words must be preceeded and followed by either a special character or a space. Spaces may not be embedded within reserved words. simple statement ELEMENT: simple statement FORMAT: block|assignment statement|for statement| case statement||goto statement| while statement|read statement|write statement| procedure call|identifier DESCRIPTION: All ALGOL-M statements are free form and must be separated by semicolons. simple declaration ELEMENT: simple declaration FORMAT: INTEGER|DECIMAL|STRING {(identifier|integer)}  identifier {,identifier} ... DESCRIPTION Simple integer variables may be any value between -16,383 and +16,383. Simple decimal variables can be specified as any length from one to 18 digits with a default length of 10 digits. Simple string variables can be specified as any length from one to 255 characters with a default length of 10 characters. EXAMPLE: INTEGER X; DECIMAL(15) X,Y; STRING(33) WORDONE, WORDTWO, WORDTHREE; special characters ELEMENT special characters DESCRIPTION: The following special characters are used by ALGOL-M: ) close parenthesis * asterisk + plus - minus : colon ; semicolon < less-than > greater-than  = equal , comma [ open bracket ] close bracket := assigned equal ** exponentiation % percentage Any special character in the ASCII character set may appear in a string. Special characters, other than those listed above, will cause an error condition if used outside of a string. TAB expression ELEMENT: TAB expression FORMAT: TAB expression DESCRIPTION: TAB is optionally used in a WRITE statement to cause spacing on the output line. The amount of spacing is specified by the integer expression following TAB. EXAMPLE: WRITE("NEXT NAME", TAB 5, NAME[I]); unbalanced statement ELEMENT: unbalanced statement FORMAT: - {label definition} IF boolean expression THEN statement {label definition} IF boolean expression THEN balanced statement ELSE unbalanced statement DESCRIPTION: Unlike the balanced statement that will always have a balanced statement on either side of the ELSE in an IF THEN ELSE structure, an unbalanced statement may not even include the ELSE portion of the statement. EXAMPLE: IF S > Y THEN WRITE(X); IF X < Y THEN IF Z > Y THEN WRITE(Z) ELSE WRITE(X); PROGRAMMING NOTE: A semicolon is not allowed after the statement immediately preceding an ELSE. variable ELEMENT: variable FORMAT: identifier {[bound pair list]} DESCRIPTION: A variable in ALGOL-M may be simple or subscripted and of type INTEGER, DECIMAL, or STRING. EXAMPLE:  X VALUE[2] Z[1,X * Y] WHILE statement ELEMENT: WHILE statement FORMAT: WHILE boolean expression DO simple statement DESCRIPTION: WHILE statements continue executing the simple statement following the DO for as long as the boolean expression is true. EXAMPLE: WHILE I > 0 DO I := I - 1; WHILE X > 5 AND Y <> 8 DO BEGIN X := X / 3; WRITE(X); END; WRITE statement ELEMENT: WRITE statement FORMAT: WRITE|WRITEON {file option} (expression|tab expression|string {,expression|tab expression|pic definition|string} ...) DESCRIPTION: The WRITE option indicates the output will start printing on a new line, while the WRITEON option will continue printing on the same line. If the form of the statement is WRITE( or WRITEON(, the output device is the console. Otherwise, a file option must be specified and the output device is the disk. EXAMPLE: WRITE(X); WRITE("THE NUMBER IS",X + Y); WRITE("ANSWER", TAB 5, X * Y); WRITE FILE("hello");  X := X / 3; WRITE(X); END; WRITE statement ELEMENT: WRITE statement FORMAT: WRITE|WRITEON {file option} (expression|tab expression|string {,expression|tab expression|pic definition|string} ...) DESCRIPTION: The WRITE option indicates the output will start printing on a new line, while the WRITEON option will continue printing on the same li/* WDIR - WIDE DIRECTORY LISTING */ /* B.RATOFF - 9/11/77 */ [INT FCB] [FCB := 5CH] [MACRO BUFF '80H'] [MACRO MONLOC '5'] [MACRO CR '0DH'] [MACRO LF '0AH'] [MACRO PCFUN '2'] [MACRO ZERO '30H'] [MACRO COLON '3AH'] [MACRO SPACE '20H'] [MACRO SFIRST '11H'] [MACRO SNEXT '12H'] [MACRO PSHALL 'STACK = HL; STACK = DE; STACK = BC; STACK = PSW;'] [MACRO POPALL 'PSW = STACK; BC = STACK; DE = STACK; HL = STACK;'] DECLARE OSTACK(2) BYTE; /* PRINT CHARACTER IN REGISTER E */ PCHAR: PROCEDURE; [PSHALL] C = [PCFUN]; CALL [MONLOC]; [POPALL] END PCHAR; /* PRINT A CR-LF SEQUENCE */ CRLF: PROCEDURE; E = [CR]; CALL PCHAR; E = [LF]; CALL PCHAR; END CRLF; /* PRINT A SPACE */ SPACE1: PROCEDURE; E = [SPACE]; CALL PCHAR; END SPACE1; /* PRINT 2 SPACES */ SPACE2: PROCEDURE; CALL SPACE1; CALL SPACE1; END SPACE2; /* PRINT B CHARS STARTING AT HL */ DOSTR: PROCEDURE; REPEAT; E=M(HL); CALL PCHAR; HL=HL+1; UNTIL (B=B-1) ZERO; END DOSTR; /* FIND A FILENAME AND PRINT IT */ DONAME: PROCEDURE; DE=[HEX FCB]; CALL [MONLOC]; IF (A::255) ZERO THEN /* END OF DIRECTORY? */ DO; SP = (HL = OSTACK); RETURN; /* RESTORE CP/M'S SP & QUIT */ END; B = 0; /* CONVERT OFFSET RETURNED BY CP/M (0-3) */ A = A & 3; /* INTO ADDRESS (BUFF+1,33,65,OR 97) */ A = >>A; A = >>A; A = >>A; A = A + 1; C = A; HL = [BUFF] + BC; B = 8; /* PRINT FILENAME */ CALL DOSTR; CALL SPACE1; B = 3; /* PRINT FILETYPE */ CALL DOSTR; A=M(HL)+[ZERO]; /* PRINT EXTENT # IF NON-ZERO */ IF (A::[COLON]) !CY THEN A=A+7; IF (A::[ZERO]) ZERO THEN CALL SPACE2 ELSE DO; E='+'; CALL PCHAR; E=A; CALL PCHAR; END; END DONAME; /* MAINLINE STARTS HERE */ MAIN: DECLARE NSTACK(20) BYTE; OSTACK = (HL = 0 + SP); /* SAVE CP/M'S SP FOR RETURN */ SP = .NSTACK(20); /* SET UP OUR OWN STACK */ /* WAS A FILE SPEC GIVEN? */ IF (HL=[HEX FCB+1]; A=[SPACE]; A::M(HL)) ZERO THEN DO; B = 11; /* NO, SO FORCE IT TO ????????.??? */  REPEAT; M(HL) = '?'; HL = HL + 1; UNTIL (B = B - 1) ZERO; END; M([HEX FCB+12])=(A='?'); /* MATCH ALL EXTENTS */ C = [SFIRST]; /* GIVE INITIAL SEARCH CALL */ CALL DONAME; CALL SPACE2; STACK = (BC = 300H); /* 3 MORE NAMES ON THIS LINE */ DLOOP: C = [SNEXT]; /* 'FIND NEXT' FDOS CALL */ CALL DONAME; IF (BC = STACK; B=B-1; STACK = BC) !ZERO THEN CALL SPACE2 /* MORE ON THIS LINE */ ELSE DO; BC = STACK; /* GO TO NEXT LINE */ STACK = (BC = 400H); CALL CRLF; END; GOTO DLOOP; /* EITHER WAY, GO GET ANOTHER NAME */ EOF ; E='+'; CALL PCHAR; E=A; CALL PCHAR; END; END DONAME; /* MAINLINE STARTS HERE */ MAIN: DECLARE NSTACK(20) BYTE; OSTACK = (HL = 0 + SP); /* SAVE CP/M'S SP FOR RETURN */ SP = .NSTACK(20); /* SET UP OUR OWN STACK */ /* WAS A FILE SPEC GIVEN? */ IF (HL=[HEX FCB+1]; A=[SPACE]; A::M(HL)) ZERO THEN DO; B = 11; /* NO, SO FORCE IT TO ????????.??? */ /* XDIR - EXTENDED DIRECTORY LISTING */ /* B.RATOFF - 10/13/77 */ [INT FCB] [FCB := 5CH] [MACRO BUFF '80H'] [MACRO MONLOC '5'] [MACRO CR '0DH'] [MACRO LF '0AH'] [MACRO PCFUN '2'] [MACRO CSFUN '0BH'] [MACRO FENCE '7CH'] [MACRO ZERO '30H'] [MACRO COLON '3AH'] [MACRO SPACE '20H'] [MACRO SFIRST '11H'] [MACRO SNEXT '12H'] [MACRO PSHALL 'STACK = HL; STACK = DE; STACK = BC; STACK = PSW;'] [MACRO POPALL 'PSW = STACK; BC = STACK; DE = STACK; HL = STACK;'] DECLARE OSTACK(2) BYTE; /* RESTORE CP/M'S STACK AND QUIT */ QUIT: PROCEDURE; SP = (HL = OSTACK); RETURN; END QUIT; /* PRINT CHARACTER IN REGISTER E */ PCHAR: PROCEDURE; [PSHALL] C = [PCFUN]; CALL [MONLOC]; C = [CSFUN]; CALL [MONLOC]; IF (A=A&1) !ZERO GOTO QUIT; [POPALL] END PCHAR; /* PRINT A CR-LF SEQUENCE */ CRLF: PROCEDURE; E = [CR]; CALL PCHAR; E = [LF]; CALL PCHAR; END CRLF; /* PRINT A SPACE */ SPACE1: PROCEDURE; E = [SPACE]; CALL PCHAR; END SPACE1; /* PRINT 2 SPACES */ SPACE2: PROCEDURE; CALL SPACE1; CALL SPACE1; END SPACE2; /* PRINT A 'FENCE' */ PFENCE: PROCEDURE; E = [FENCE]; CALL PCHAR; CALL SPACE2; END PFENCE; /* PRINT B CHARS STARTING AT HL */ DOSTR: PROCEDURE; REPEAT; E=M(HL); CALL PCHAR; HL=HL+1; UNTIL (B=B-1) ZERO; END DOSTR; BDIV: PROCEDURE; /* BYTE DIVISION ROUTINE */ B=0; L=8; REPEAT; CY=0; C=(A=>A; A = >>A; A = >>A; A = A + 1; C = A; HL = [BUFF] + BC; B = 8; /* PRINT FILENAME */ CALL DOSTR; CALL SPACE1; B = 3; /* PRINT FILETYPE */ CALL DOSTR; A=M(HL)+[ZERO]; /* PRINT EXTENT # IF NON-ZERO */ IF (A::[COLON]) !CY THEN A=A+7; IF (A::[ZERO]) ZERO THEN CALL SPACE2 ELSE DO; E='+'; CALL PCHAR; E=A; CALL PCHAR; END; CALL SPACE1; HL=HL+1,+1,+1; /* PRINT FILE SIZE */ A=M(HL); CALL PDEC; CALL SPACE1; END DONAME; /* MAINLINE STARTS HERE */ MAIN: DECLARE NSTACK(20) BYTE; OSTACK = (HL = 0 + SP); /* SAVE CP/M'S SP FOR RETURN */ SP = .NSTACK(20); /* SET UP OUR OWN STACK */ /* WAS A FILE SPEC GIVEN? */ IF (HL=[HEX FCB+1]; A=[SPACE]; A::M(HL)) ZERO THEN DO; B = 11; /* NO, SO FORCE IT TO ????????.??? */ REPEAT; M(HL) = '?'; HL = HL + 1; UNTIL (B = B - 1) ZERO; END; M([HEX FCB+12])=(A='?'); /* MATCH ALL EXTENTS */ C = [SFIRST]; /* GIVE INITIAL SEARCH CALL */ CALL DONAME; CALL PFENCE; STACK = (BC = 200H); /* 2 MORE NAMES ON THIS LINE */ DLOOP: C = [SNEXT]; /* 'FIND NEXT' FDOS CALL */ CALL DONAME; IF (BC = STACK; B=B-1; STACK = BC) !ZERO THEN CALL PFENCE /* MORE ON THIS LINE */ ELSE DO; BC = STACK; /* GO TO NEXT LINE */ STACK = (BC = 300H); CALL CRLF; END; GOTO DLOOP; /* EITHER WAY, GO GET ANOTHER NAME */ EOF ACE1; HL=HL+1,+1,+1; /* PRINT FILE SIZE */ A=M(HL); CALL PDEC; CALL SPACE1; END DONAME; /* MAINLINE STARTS HERE */ MAIN: DECLARE NSTACK(20) BYTE; OSTACK = (HL = 0 + SP); /* SAVE CP/M'S SP FOR RETURN */ SP = .NSTACK(20); /* SET UP OUR OWN 1+M(& 25/125!"&')*.25!"&')*.2552525 /1255 /125 /12555555 5      25 5 !"&')*.2555 !"&')*+,-.245       # /125&5 +,-453  (5%0$!"&')*.5           +,-43 5 +,-4 t( $P!P!R #IQRenswyz   !$PRTY&) !$PYEp !$PSY1C  *+-C.011;:;CCwKCwMNPPQSTUVWX[]^_abceg[Xhjkkkkkkmn1pppCqqrtuvwCC:CCCCCw "%(+.13579;=?EGIKQSU !!&''777777888>>AAAAACCCDDTUUVVWWXYZZ[\\]^__``aabbcdddeeffffffggjjkltuuxxxzz}~~~~          !1q,s#r!1q,s#r!1q#p.s!15~*1~*1w#"1*1#"1è!1q,s!15~-N*1q#"1!161YP ̓!1q^̓!1q#p -^,V̓DE $.ALG!16+#6 *j, KB͟ *j,  *j, 66!j,^,V͏ypNG $l!i,~l,YP͏!i,~,N,F!1q#pl, ͟l,YP̓l,YP͏ !l, 6!j,^,V͏!1wO>!1~!i,~,YP̓l,YP͏̓  !1q#p.6.6>!1ڗ,60!1N. ~#F!1O~,V_zu,N. ~#F!1O~,V_z-s#w.6.46,~/.ҋ.NÐ !14*ä PROD = $!,N TOKEN = $! -N!1q! ,4~ր! ,6N. !1Ny,!1q#p R!1q!d,N,F!.N  !16!1~.wN!, ~ a!16>!1p !14Ip!1N!, ~O!14-!1q*-#"-!g,~/Җ!1N!1q#p-N,FH{!1N{!1q#p-~,FOxG͗EOF ! ,N* , ~! ,4~.. 6=>!"-w !"-O~/ !16#6! ,N,F͟! ,6!"-w%.c4N. !"-Ny~ ƒ *d,#"d,!2~k {!d,N{!d,N,FH{!1~{ !c,N !c,6!"-~ Ž 6 ~ O~ڐ ALGOL-M COMPILER VERS 1.1$ !,N,F  ERROR(S) DETECTED$ !3q#p*,#", ***$ !d,N,F( ERROR $  !3N,FH!3NN NEAR $G  !36!#-~!3| N!#- ~O!34^ ! -~Ž ͛!g,~ !16m#6,͟!,~$ !36!34N!, ~!3w  ~AwO>ڵ *3& !16 !16 !i,6 !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N!43 !+s,r'*+w#p'!23w#pÓ(! \ AIN&', <A "%+&)+J "%+&)+3(-<2 ;3FFC@ ? D>;   "%+&)+:!  "%+&)+."I EG"#B= $6.7 0*  "%+&)#$'(/001245899==>>??@@AABBFGHKOlmttttt:v|8*CYXghf~LKU14-R`b\.!a]^_/c[MJJJJJJJLJJJNWVzZwDSTejkixPPPPPPPQsI%qEd}py,)567r9unoH{d  APPENDIX B - COMPILER ERROR MESSAGES AS Function/Procedure on left hand side of assignment statement. BP Incorrect bound pair subtype (must be integer). DE Disk error; no corrective action can be taken in the program. DD Doubly declared identifier, label, variable etc. FP Incorrect file open statement. IC Invalid special character. ID Subtypes incompatible (decimal values can not be assigned to integer variables). IO Integer overflow. IT Identifier is not declared as a simple variable or function. NG No ALG file found. NI Subtype is not integer. NP No applicable production exists. NS Subtype is not string. NT For clause,Step expression,Until clause expressions are not of the same subtype.(must all be integer or decimal). PC Number of parameters in procedure call does not match the number in the procedure declaration. PD Undeclared parameter. PM Parameter type does not match the declared type. SO Stack overflow. SI Array subscript is not of subtype integer. TD Subtype has to be integer or decimal. TM Subtypes do not match or are incompatible. TO Symbol table overflow. TS Undeclared subscripted variable. UD Undeclared identifier. UF Undeclared file/function. UL Undeclared label. UP Undeclared procedure. US Undeclared simple variable. VO Varc table overflow. Possibly caused by too many long identifiers. ALG file found. NI Subtype is not integer. NP No applicable production exists. NS Subtype is not string. NT For clause,Step expression,Until clause expressions are not of the same subtype.(must all be integer or decimal). PC Number of parameters in procedure call does not match the number in the procedure declaration. PD I. ALGOL-M LANGUAGE DESCRIPTION A. FEATURES OF THE ALGOL-M LANGUAGE Although ALGOL-M was modeled after ALGOL-60, no attempt was made to make it a formal subset of ALGOL-60. This was done intentionally in order to provide a language which would be best suited to the needs of applications programmers using microcomputer systems. However, the basic structure of ALGOL-M is similar enough to ALGOL-60 to allow simple conversion of programs from one language to the other. This was considered particularly important in view of the fact that the standard publication language is ALGOL-60. Therefore, there exists a large source of applications programs and library procedures which can be simply converted to execute under ALGOL-M. 1. Type Declarations ALGOL-M supports three types of variables: integers, decimals, and strings. Integers may be any value between -16,383 and +16,383. Decimals may be declared with up to 18 digits of precision and strings may be declared as long as 255 characters. The default precision for decimals is ten digits and the default length for strings is ten characters. Decimal and string variable lengths may be integer variables which can be assigned actual values at run-time. Another form of declaration in ALGOL-M is the array 1 declaration. Arrays may have up to 255 dimensions with each dimension ranging from 0 to +16,383. The maximum 8080 microprocesor address space of 63k bytes  limits practical array sizes to something smaller than the maximum. Dimension bounds may be integer variables with the actual values assigned at run-time. Arrays may be of type integer, decimal or string. 2. Arithmetic Processing Integer and binary coded decimal arithmetic are supported under ALGOL-M. Integers may be used in decimal expressions and will be converted to decimals at run-time. The integer and decimal comparisons of less-than (<), greater-than (>), equal-to (=), not-equal-to (<>), less- than-or-equal-to (<=), and greater-than-or-equal-to (>=) are provided. Additionally, the logical operators AND, OR and NOT are available. 3. Control Structures ALGOL-M control structures consist of BEGIN, END, FOR, IF THEN, IF THEN ELSE, WHILE, CASE and GOTO constructs. Function and procedure calls are also used as control structures. ALGOL-M is a block stuctured language with a block normally bracketed by a BEGIN and an END. Blocks may be nested within other blocks to nine levels. Variables which are declared within a block can only be referenced within that block or a block nested within that block. Once program control proceeds outside of a block in which a variable has been declared, the variable may not be 2 referenced and, in fact, run-time storage space for that variable no longer exists. Functions, when called, return an integer, decimal or string value depending on the type of the function. Procedures do not return a value when called. Both functions and procedures may have zero or more parameters which are call by value and both may be called recursively. 3. Input/Output The ALGOL-M WRITE statement causes output to the console on a new line. The desired output is specified in a write list which is enclosed in parentheses. String constants may be used in a write list and are characterized by being enclosed in quotation marks. Any combination of integer, decimal and string variables or expressions may also be used in a write list. A WRITEON statement is also available which is essentially the same as the WRITE statement except that output continues on the same line as the output from a previous WRITE or WRITEON statement. When a total of 80 characters have been written to the console, a new line is started automatically. A TAB option may also be used in the write list which causes the following item in the write list to be spaced to the right by a specifed amount. Console input is accomplished by the READ statement followed by a read list of any combination of integer, decimal and string variables enclosed in parentheses. If embedded blanks are desired in the input for a string 3 variable, the console input must be enclosed in quotation marks. A READ statement will result in a halt in program execution at run-time until the input values are typed at the console and a carriage return is sent. If the values typed at the console match the read list in number and type, program execution continues. If an error as to number or type of variables from the console occurs, program execution is again halted until values are re-entered on the console. 5. Disk Access ALGOL-M programs may read data from, or write data to, one or more disk files which may be located on one or more disk drives. When file input or output is desired, the appropriate READ or WRITE statement is modified by placing a filename identifier immediately after READ or WRITE. The actual name of the file may be assigned to the file name identifier when the program is written or it may be assigned at run-time. Various disk drives are referenced by the letters A through Z. A specific drive may be specified by prefixing the actual file name with the desired drive letter followed by a colon. Additionally, if random file access is desired, the file name identifier may be followed by a comma and an integer constant or variable. This integer value specifies the record within the file which is to be used for input/output. Prior to the use of a file name identifier in a READ or WRITE statement, the file name identifier must appear in a file declaration statement. The file name identifier can 4 only be referenced within the same block (or a lower block) as the file declaration. Files are normally treated as unblocked sequential files. However, if blocked files are desired, the record length may optionally be specified in brackets after the file name identifier in the file declaration statement.  followed by a comma and an integer constant or variable. This integer value specifies the record within the file which is to be used for input/output. Prior to the use of a file name identifier in a READ or WRITE statement, the file name identifier must appear in a file declaration statement. The file name identifier can 4 only be referenced within the same block (or a lower block) as the file declaration. Files are normally treated as unblocked sequential files. However, if blocked files are desired, the record length may optioThese files are a version of Algol called ALGOLM. This system was down loaded from -CPMUG.028. Documentation in files of type .TXT are included. Read ALGSTART.TXT first. Sample programs for this version of Algol are included. The system is used in a manner similar to CBASIC. Place ALGOLM.COM in drive A. At the A> prompt, type ALGOLM d:filename $A where filename is the name of a program file of type .ALG (i.e., filename.ALG) on drive d and $A (optional) indicates that a listing is desired. (The other option discussed in the documentation, $E for trace of program execution, does not appear to work.) ALGOLM will produce an intermediate file with the name filename.AIN on drive d. To execute this file, place RUNALG.COM in drive A. At the A> prompt, type RUNALG d:filename Refer to the .TXT files for further information.  ALGOL-M CP/M VERSION 1.1 AUGUST 1978 WRITTEN BY LT MARK MORANVILLE(CODE 52MI) NAVAL POSTGRADUATE SCHOOL MONTEREY,CALIF 93940 ON THIS DISK YOU SHOULD FIND VARIOUS TXT FILES, THESE FILES CONTAIN DOCUMENTATION CONCERNING THE ALGOL-M PROGRAMMING LANGUAGE. THEY INCLUDE THE FOLLOWING:- ALGINTRO.TXT: AN OVERVIEW OF THE ALGOL-M LANGUAGE . USRMAN.TXT: AN ALGOL-M USER'S MANUAL WITH A COMPLETE DESCRIPTION OF THE VARIOUS ALGOL-M LANGUAGE STRUCTURES. COMERR.TXT: A DESCRIPTION OF THE ALGOL-M COMPILER ERROR MESSAGES. RUNERR.TXT: A DESCRIPTION OF THE ALGOL-M INTERPRETER ERROR AND WARNING MESSAGES. IN ADDITION TO THESE FILES YOU SHOULD FIND VARIOUS SAMPLE PROGRAMS WHICH DEMONSTRATE MOST OF THE FEATURES OF THE LANGUAGE. INCLUDED IN THIS SECTION IS A DESCRIPTION OF HOW TO CREATE,COMPILE, AND EXECUTE AN ALGOL-M PROGRAM. ALGOL-M REQUIRES A CP/M SYSTEM WITH AT LEAST 24K OF MEMORY. TO CREATE AND RUN A PROGRAM YOU DO THE FOLLOWING:- 1. CREATE AN "ALG" FILE USING THE CP/M EDITOR. THIS FILE MUST BEGIN WITH A "BEGIN" OR A COMMENT(WHICH CONSISTS OF EITHER A. A STRING ENCLOSED WITH "%" OR B. A STRING BEGINNING WITH THE WORD "COMMENT" AND ENDING WITH A ";"). THIS FILE MUST END WITH EITHER A. THE WORD "END" WITH NO ; OR B. AN "END" FOLLOWED BY AN "EOF". REVIEW THE VARIOUS SAMPLE PROGRAMS FOR THE EXACT FORMAT. 2. COMPILE THE "ALG" PROGRAM BY TYPING "ALGOLM FILENAME" FOLLOWED BY A CARRIAGE RETURN. "FILENAME" STANDS FOR THE NAME OF YOUR FILE. YOU MAY OBTAIN AN OPTIONAL LISTING OF THE FILE AT THE TERMINAL BY ADDING A "$A" AFTER THE FILE NAME. THE FORMAT FOR THE LISTING IS AS FOLLOWS: 1 1 BEGIN THE NUMBER 1 ON THE LEFT REPRESENTS THE LINE NUMBER. THE NUMBER 1 IN THE MIDDLE REPRESENTS THE BLOCK LEVEL. AT THE END OF THE PROGRAM THE LAST LINE MUST CONTAIN A BLOCK LEVEL OF 0 OR YOU HAVE LEFT OFF AN END IN YOUR PROGRAM. THE WORD BEGIN REPRESENTS THE INFORMATION ON LINE 1. THE FORMATS FOR COMPILING ARE AS FOLLOWS:- (THE INFORMATION CONTAINED IN THE PARENTHESES IS NOT TYPED) ALGOLM LUNAR (NO LISTING,NO TRACE) ALGOLM LUNAR $A (LISTING,NO TRACE) ALGOLM LUNAR $E (NO LISTING,TRACE) ALGOLM LUNAR $AE (LISTING,TRACE) 3. TO ACQUIRE A TRACE OF PROGRAM EXECUTION USE THE $E OPTION. WHEN THE PROGRAM IS EXECUTED THE SOURCE CODE LINE NUMBER WILL BE TYPED AT THE CONSOLE AFTER EXECUTION OF THAT LINE HAS COMPLETED. 4. AFTER A SUCCESSFUL COMPILATION THERE WILL BE AN "AIN" FILE CREATED. TO EXECUTE THE "AIN" FILE TYPE "RUNALG FILENAME" FOLLOWED BY A CARRIAGE RETURN. RMAT FOR THE LISTING IS AS FOLLOWS: 1 1 BEGIN THE NUMBER 1 ON THE LEFT REPRESENTS THE LINE NUMBER. THE NUMBER 1 IN THE MIDDLE REPRESENTS THE BLOCK LEVEL. AT THE END OF THE PROGRAM THE LAST LINE MUST CONTAIN A BLOCK LEVEL OF 0 OR YOU HAVE LEFT O1l7'!8q,s#r!8q,s#r!8q^!8q#p -^,V " " *7 6A *7 6I *7 6N!7^,VŠ~NA $x/?!7^,V*7#"7{_zھ!76#6͋ʾ*76*7~*7w#"7͗*7~!7w*7#!7s,r*7w*7w*7##"7OyOxG.q,pO*7 {B!9q#p,s#r]!9~/wH*8~0*8w\*8~*8O~0*8w#"8.N,F%.q#p$.N,F%.q#p$.6%.N,F%.q#p*86#"8!8N,F%.q#p*86#"8*8~~0/O~_>9џ/-*7~^yOxG}o|g=X|W}_L*7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z!9s#w*7~_!7N,F*7~O*7  "7X5*8 "7*76#6Y6!8N,F*7q#pY6*8~#F!7w#p*8 "8Y6)5 ^#VY6)))*&*6*<*=*R*g*******+h++Y6++++6,`,f,~,,Y6,,,,--B-Z-r-----..=.U.m....../"/Y6/Y6Y6/Y6/70I0^0s0{00000000000011!1D1^1x111111112:2k2|34r5!E86Y)?T'Y))"v~#F!7w#p*8 "8Y6)5 ^#VY6)))*&*6*<*=*R*g*******+h++Y6++++6,`,f,~,,Y6,,,,--B-Z-r-----..=.U.m....../"/Y6/Y6Y6/Y6/70I0^0s0{00000000000011!1D1^1x111111112:2k2|34r5!E86Y)?T'Y))"v~#F!7w#p*8\P'd  APPENDIX C - INTERPRETER ERROR/WARNING MESSAGES ERROR MESSAGES AB Array subscript out of bounds. CE Disk file close error. DB Input field length is larger then the buffer size. DW Disk file write error. ER Variable block size write error. IO Integer overflow(integer value greater than 16383). IR Record number incorrect or random file is not initialized. ME Disk file creation error. NA No AIN file found on directory. OV Decimal register overflow during arithmetic operation/ load. RE Attempt to read past end of record on blocked file. RU Attempt to random access a non-blocked file. SK Stack overflow(no more memory available). WARNING MESSAGES AZ Attempt to allocate null decimal or string, system defaults to 10 digits/characters. DO Decimal overflow during store operation. The value of the variable is set to 1.0 and execution continues. The variable's allocation size should be increased in it's declaration statement. DI Disk file variable format error. DZ Decimal division by zero, result is set to 1.0. EF End of file on read. IA Integer addition/subtraction over/under flow result is set to 1. II Invalid Console Input. Try input again. IR Record number incorrect or random file is not initialized. IZ Integer division by zero. Divisor set to 1 and division is completed. NX Negative exponential. Exponentiation not done. SO Characters lost during string store. ailable). WARNING MESSAGES AZ Attempt to allocate null decimal or string, system defaults to 10 digits/characters. DO Decimal overflow during store operation. The value of the variable is set to 1.0 and exeBEGIN INTEGER A,B,C,D,E,F; WRITE("INPUT THE UPPER AND LOWER BOUNDS OF A 3 DIMENSIONAL ARRAY"); WRITE("THE FIRST TWO ENTRIES ARE FOR THE 1ST DIMENSION"); WRITE("AND SO ON FOR THE OTHER DIMENSIONS. THE PROGRAM"); WRITE("EXPECTS SIX ENTRIES: A LOWER AND UPPER BOUND FOR EACH"); WRITE("DIMENSION. SAMPLE DATA AT THIS POINT IS 1,3,5,6,11,13"); READ(A,B,C,D,E,F); BEGIN INTEGER ARRAY THREE[A:B,C:D,E:F]; INTEGER I,J,K; WRITE(TAB 14,"THREE DIMENSION ARRAY"); WRITE(" "); WRITE(TAB 8,"ARRAY SUBSCRIPTS",TAB 17,"CONTENTS"); WRITE(" "); WRITE(TAB 1,"ROW",TAB 11,"COLUMN",TAB 10,"PAGE"); WRITE(" "); WRITE("INPUT VARIOUS INTEGER VALUES TO FILL THE ARRAY"); FOR I:=A STEP 1 UNTIL B DO BEGIN FOR J:= C STEP 1 UNTIL D DO BEGIN K:=E; WHILE K<= F DO BEGIN READ(THREE[I,J,K]); WRITE(I,TAB 8,J,TAB 8,K,TAB 5,THREE[I,J,K]); WRITE(" "); K:=K+1; END; END; END; WRITE(" "); BEGIN INTEGER X,P; WRITE("INPUT A VALUE FOR P, IF P<0 X WILL BE SET TO"); WRITE("TO THE FIRST ELEMENT IN THE ARRAY, IF P>0 THEN"); WRITE("X WILL BE SET TO THE LAST ELEMENT OF THE ARRAY"); WRITE("SAMPLE INPUT 3"); READ(P); X:= IF P<0 THEN THREE[A,C,E] ELSE THREE[B,D,F]; WRITE("X= ",X," FIRST ELEMENT = ",THREE[A,C,E]," LAST ELEMENT = ", THREE[B,D,F]); WRITE(" "); IF P<> 1 THEN BEGIN WRITE(TAB 14,"SECOND PAGE OF ARRAY"); WRITE(" "); WRITE(TAB 8,"ARRAY SUBSCRIPTS",TAB 17,"CONTENTS"); WRITE(" "); WRITE(TAB 1,"ROW",TAB 11,"COLUMN",TAB 10,"PAGE"); WRITE(" "); FOR I:=A STEP 1 UNTIL B DO BEGIN FOR J:=C STEP 1 UNTIL D DO WRITE(I,TAB 8,J,TAB 8,E+1,TAB 5,THREE[I,J,E+1]); END; END ELSE BEGIN WRITE(TAB 14,"SECOND ROW OF ARRAY"); WRITE(" "); WRITE(TAB 8,"ARRAY SUBSCRIPTS",TAB 17,"CONTENTS"); WRITE(" "); WRITE(TAB 1,"ROW",TAB 11,"COLUMN",TAB 10, "PAGE"); WRITE(" "); FOR I:=C STEP 1 UNTIL D DO BEGIN J:=E; WHILE J<=F DO BEGIN WRITE(THREE[A+1,I,J]); J:=J+1; END; END; END; END; WRITE(" "); BEGIN INTEGER Z,Y; WRITE("INPUT A VALUE TO TEST THE ALGOL-M CASE STATEMENT"); WRITE("THE VALUE MUST BE BETWEEN 0 AND 4 SAMPLE 3"); WRITE("FOR THIS INPUT A RESULT OF 13 WILL BE RETURNED"); READ(Z); CASE Z OF BEGIN Y:=10; Y:=11; Y:=12; Y:=13; Y:=14; END; WRITE(TAB 4,"Y = ",Y); WRITE(" "); END; END; END N WRITE(TAB 14,"SECOND ROW OF ARRAY"); WRITE(" "); WRITE(TAB 8,"ARRAY SUBSCRIPTS",TAB 17,"CONTENTS"); WRITE("BEGIN INTEGER I,A; BEGIN FILE X[40] ; %BLOCKED FILE 40 CHAR'S PER BLOCK% WRITE("THIS PROGRAM CREATES AND OPENS A CP/M FILE "); WRITE("WITH A NAME OF BLK.INP. THIS IS A BLOCKED "); WRITE("RANDOM ACCESS FILE. IT THEN WRITES THE NUMBERS 1"); WRITE("TO 5 OUT TO THIS FILE, ONE NUMBER PER BLOCK."); X:="BLK.INP"; %THIS ASSIGNS BLK.INP TO X AND OPENS THE FILE% A:=0; WRITE("THE NUMBERS WRITTEN TO THE FILE ARE"); FOR I:=1 STEP 1 UNTIL 5 DO BEGIN WRITE X,I((A:=A+1));%X IS THE FILE NAME AND I IS THE RECORD NBR% WRITE (A); % THIS WRITES TO THE CONSOLE % END; END; % THIS IS THE END OF THE BLOCK IN WHICH % % FILE X IS DECLARED SO AT THIS POINT IT % % IS CLOSED % BEGIN FILE XI[40]; %THIS IS A NEW BLOCKED FILE % XI:="BLK.INP"; % FILE XI IS ALSO ASSIGNED TO BLK.INP AND% % BLK.INP IS RE-OPENED HERE % WRITE ("THE NUMBERS IN THE FILE ARE"); FOR I:=1 STEP 1 UNTIL 5 DO BEGIN READ XI,I(A); % THIS READS FROM FILE XI RECORD I % WRITE(A); END; END; END BEGIN COMMENT THIS PROGRAM TESTS THE ALGOL-M BOOLEAN TESTS FOR INTEGER VALUES; INTEGER X,Y,Z; WHILE 1=1 DO BEGIN READ(X,Y); IF X>5 AND X<100 THEN WRITE("5-100"); IF NOT X<5 OR X>100 THEN WRITE("NOT 5-100"); IF X>Y AND Y>5 AND X>10 THEN WRITE("5-10-X>Y"); IF X=5 OR X=10 OR X?@ABCDEFGHIJKLUSRMAN TXTDMNOPQRSTUWDIR M80VWXXDIR M80YZ[\ALGOLM COMj]^_`abcdefghijCOMERR TXT klALGINTROTXTBmnopqrstuALGOL DOCvALGSTARTTXTwxyRUNALG COMpz{|}~RUNERR TXTARRAY ALGBLKTEST ALGBOOLINT ALGCASETESTALGCASETWO $$$ BEGIN COMMENT THIS PROGRAM DEMONSTRATES THE ASSIGNMENT ON THE FLY STATEMENT: IT READS TWO INTEGERS AT A TIME FROM THE CONSOLE AND WRITES THREE VALUES BACK TO THE CONSOLE AS INDICATED IN THE CODE; INTEGER A,B,C; WHILE 1=1 DO BEGIN WRITE("INPUT TWO INTEGER VALUES SEPARATED BY COMMAS"); READ(A,B); IF (A:=B*2)>(C:=B) THEN WRITE("GREATER"); WRITE(A,B,C); A:=B:=(C:=A:=B)*2; WRITE(A,B,C); END; END XDIR M80YZ[\ALGOLM COMj]^_`abcdefghijCOMERR TXT klALGINTROTXTBmnopqrstuALGOL DOCvALGSTARTTXTwxyRUNALG COMpz{|}~RUNERR TXTARRAY ALGBLKTEST ALGBOOLINT ALGCASETESTALGCASETWO ALGFLYTEST $$$BEGIN COMMENT THIS PROGRAM DOESN'T DO MUCH EXCEPT TEST GOTO STATEMENTS; INTEGER A,B,C; INTEGER I; FOR I:=1 STEP 1 UNTIL 10 DO BEGIN IF I=8 THEN GO TO NEXTSTMT; WRITE(I); END; NEXTSTMT:WRITE("NEXTSTMT"); WHILE 1=1 DO BEGIN I:=I+1; IF I=12 THEN GO TO NEXTSTMT ELSE GO TO LASTSTMT; END; LASTSTMT:WRITE("LASTSTMT"); BEGIN READ(A); WRITE(I); IF A=5 THEN GOTO QUIT; GO TO NEXTSTMT; QUIT:WRITE("END"); END; END EOF XDIR M80YZ[\ALGOLM COMj]^_`abcdefghijCOMERR TXT klALGINTROTXTBmnopqrstuALGOL DOCvALGSTARTTXTwxyRUNALG COMpz{|}~RUNERR TXTARRAY ALGBLKTEST ALGBOOLINT ALGCASETESTALGCASETWO ALGFLYTEST ALGGOTOTEST$$$BEGIN COMMENT THIS PROGRAM PRINTS THE MOVES REQUIRED TO TRANSFER A TOWER OF ANY HEIGHT FROM NEEDLE 1 TO NEEDLE 3.; STRING TEST; INTEGER TOTAL; PROCEDURE MOVETOWER(HEIGHT,FROMNEEDLE,TONEEDLE,USINGNEEDLE); INTEGER HEIGHT,FROMNEEDLE,TONEEDLE,USINGNEEDLE; BEGIN PROCEDURE MOVEDISK(TAKEOFF,PUTON); INTEGER TAKEOFF,PUTON; BEGIN WRITE(TAKEOFF," ->",PUTON); END; IF HEIGHT>0 THEN BEGIN MOVETOWER(HEIGHT-1,FROMNEEDLE,USINGNEEDLE,TONEEDLE); MOVEDISK(FROMNEEDLE,TONEEDLE); MOVETOWER(HEIGHT-1,USINGNEEDLE,TONEEDLE,FROMNEEDLE); END; END;%MOVETOWER% BEGIN%HANOI% WRITE("THIS PROGRAM WILL PRINT THE MOVES REQUIRED"); WRITE("TO MOVE A TOWER OF RINGS FROM ONE NEEDLE TO"); WRITE("ANOTHER. THERE ARE THREE NEEDLES AND THE RULES"); WRITE("ARE THAT YOU CAN NEVER MOVE A LARGER RING ON TOP"); WRITE("OF A SMALLER RING."); TEST:="YES"; WHILE TEST="YES" DO BEGIN WRITE("INPUT THE NUMBER OF RINGS");  READ(TOTAL); WRITE("FROM TOWER -> TO TOWER"); MOVETOWER(TOTAL,1,3,2); WRITE("ANOTHER VALUE? ENTER YES OR NO"); READ(TEST); END; END; END DLE,USINGNEEDLE; BEGIN PROCEDURE MOVEDISK(TAKEOFF,PUTON); INTEGER TAKEOFF,PUTON; BEGIN WRITE(TAKEOFF," ->",PUTON); END; IF HEIGHT>0 THEN BEGIN MOVETOWER(HEIGHT-1,FROMNEEDLE,USINGNEEDLE,TONEEDLE); MOVEDISK(FROMNEEDLE,TONEEDLE); MOVETOWER(HEIGHT-1,USINGNEEDLE,TONEEDLE,FROMNEEDLE); END; END;%MOVETOWER% BEGIN%HANOI% WRITE("THIS PROGRAM WILL PRINT THE MOVES REQUIRED"); WRITE("TO MOVE A TOWER OF RINGS FROM ONE NEEDLE TO"); WRITE("ANOTHER. THERE ARE THREE NEEDLES AND THE RULES"); WRITE("ARE THAT YOU CAN NEVER MOVE A LARGER RING ON TOP"); WRITE("OF A SMALLER RING."); TEST:="YES"; WHILE TEST="YES" DO BEGIN WRITE("INPUT THE NUMBER OF RINGS"); BEGIN COMMENT UPDATED LUNAR LANDER FROM KILOBAUD AUGUST 78; DECIMAL F,V,D,B,C; INTEGER A; WRITE(TAB 8,"LUNAR LANDER MKII"); WRITE(TAB 8,"+++++++++++++++++"); WRITE(" "); WRITE("WOULD YOU LIKE INSTRUCTIONS?"); WRITE("1=YES 0=NO"); READ(A); IF A=1 THEN BEGIN WRITE("YOU HAVE 120 LBS OF FUEL"); WRITE("YOU ARE APPROACHING THE LUNAR"); WRITE("SURFACE AT 50 FT/SEC, AND"); WRITE("ARE CURRENTLY 500 FT FROM"); WRITE("THE SURFACE, TO CANCEL"); WRITE("GRAVITY BURN 5 LB FUEL"); END; A:=1; WHILE A=1 DO BEGIN WRITE("HAPPY LANDINGS!!!!"); F:= 120.0; V:=50.0; D:=500.0; FUEL:WRITE("FUEL ", F); WRITE("SPEED ",V); WRITE("DISTANCE ",D); INPUTBURN:WRITE("ENTER YOUR BURN"); READ(B); IF B>F THEN GOTO INPUTBURN; F:=F-B; C:=B-5.0; D:=D-V+C/2.0; V:=V-C; IF D>0 THEN GO TO FUEL; IF V>=5.0 THEN BEGIN WRITE("****!!!CRASH!!!****"); WRITE("YOU HIT THE MOON AT ", V," FT/SEC"); END ELSE BEGIN WRITE("WELL DONE - YOU LANDED OK"); WRITE("LANDING SPEED ",V," !FT/SEC"); END; WRITE("DO YOU WANT ANOTHER TRY?"); WRITE("1=YES, 0=NO"); READ(A); END; WRITE("END"); END  WRITE(TAB 8,"+++++++++++++++++"); WRITE(" "); WRITE("WOULD YOU LIKE INSTRUCTIONS?"); WRITE("1=YES 0=NO"); READ(A); IF A=1 THEN BEGIN WRITE("YOU HAVE 120 LBS OF FUEL"); WRITE("YOU ARE APPROACHING THE LUNAR"); WRITE("SURFACE AT 50 FT/SEC, AND"); WRITE("ARE CURRENTLY 500 FT FROM"); WRITE("THE SURFACE, TO CANCEL"); WRITE("GRAVITY BURN 5 LB FUEL"); END; A:=1; WHILE A=1 DO BEGIN WRITE("HAPPY LANDINGS!!!!"); F:= 120.0; V:=50.0; D:=500.0; FUEL:WRITE("FUEL ", F); WRITE("SPEED ",V); WRITE("DISTANCE ",D); INPUTBURN:WRITE("ENTER YOUR BURN"); READ(B); IF B>F THEN GOTO INPUTBURN; F:=F-B; C:=B-5.0; D:=D-V+C/2.0; V:=V-C; IF D>0 THEN GO TO FUEL; IF V>=5.0 THEN BEGIN WRITE("****!!!CRASH!!!****"); WRITE("YOU HIT THE MOON AT ", V," FT/SEC"); END ELSE BEGIN WRITE("WELL DONE - YOU LANDED OK"); WRITE("LANDING SPEED ",V," BEGIN COMMENT THIS PROGRAM DEMONSTRATES THE FUNCTIONING OF THE ALGOL-M ONENDFILE FEATURE USING TWO INPUT FILES; % VARIABLE DECLARATIONS % FILE FILE1,FILE2; INTEGER A,I,J; INTEGER ARRAY NUM[0:50]; STRING(5) FILEEND; PROCEDURE ENDFILE(FILENUMBER); INTEGER FILENUMBER; BEGIN FILEEND:="TRUE"; CASE FILENUMBER-1 OF BEGIN WRITE("END OF FILE1 REACHED"); WRITE("END OF FILE2 REACHED"); END; END; % PROGRAM EXECUTION BEGINS HERE % % OPEN FILES % FILE1:="FILE1.INP"; FILE2:="FILE2.INP"; I:=-1; FILEEND:="FALSE"; WHILE FILEEND<>"TRUE" DO READ FILE1(NUM[(I:=I+1)]) ONENDFILE ENDFILE(1); FILEEND:="FALSE"; I:=I-1;%RESET I% WHILE FILEEND<>"TRUE" DO READ FILE2(NUM[(I:=I+1)]) ONENDFILE ENDFILE(2); FOR J:=0 STEP 1 UNTIL I-1 DO WRITE(NUM[J]); END begin comment algol-m program to compute permutations of sets of numbers; integer n; integer function factorial(n); integer n; FACTORIAL:=IF N=0 THEN 1 ELSE N*FACTORIAL(N-1); write("Input the number of numbers in the set"); read(n); while n<>9999 do begin integer array set[1:n]; procedure writeout; begin integer i; write(" "); for i:=1 step 1 until n do writeon(set[i]); end; procedure exchange(i,j); integer i,j; integer temp; begin temp:=set[i]; set[i]:=set[j]; set[j]:=temp; end; procedure permute(k); integer k,i; begin if k=n then writeout else BEGIN for i:=k step 1 until n do begin exchange(i,k); permute(k+1); exchange(k,i); end; end; end; PROCEDURE READER; begin integer i; for i:=1 step 1 until n do begin write("Input number",i);  read(set[i]); end; writeout; end; WRITE(" "); WRITE("THERE ARE",FACTORIAL(N)," "); WRITEON("PERMUTATIONS OF THE FOLLOWING SET OF NUMBERS"); READER; WRITE(" "); WRITE(" "); permute(1); write(" "); read(n); end; write("end of run"); end eof  for i:=1 step 1 until n do writeon(set[i]); end; procedure exchange(i,j); integer i,j; integer temp; begin temp:=set[i]; set[i]:=set[j]; set[j]:=temp; end; procedure permute(k); integer k,i; begin if k=n then writeout else BEGIN for i:=k step 1 until n do begin exchange(i,k); permute(k+1); exchange(k,i); end; end; end; PROCEDURE READER; begin integer i; for i:=1 step 1 until n do begin write("Input number",i); BEGIN COMMENT THIS PROGRAM WILL SORT A VARIABLE NUMBER OF WORDS STORED ON AN INPUT FILE. THE PROGRAM ACCEPTS THE NAME OF THE FILE FROM THE CONSOLE AND OPENS THE FILE INDICATED. IT THEN READS THE FIRST NUMBER IN THE FILE WHICH INDICATES HOW MANY NAMES ARE IN THE FILE. THIS NUMBER CAN CHANGE AS THE NUMBER OF NAMES IN THE FILE CHANGES. THE PROGRAM THEN READS IN THE WORDS AND STORES THEM IN AN ARRAY WHICH IS THEN SORTED AND PRINTED! ; INTEGER I,N; FILE INPUT; %NAME USED BY PROGRAM TO REFER TO A FILE% STRING(15) FILENAME;%FILENAME UP TO 15 CHAR'S% WRITE("INPUT NAME OF FILE TO BE SORTED:"); WRITE("USE WINPUT.INP FOR SAMPLE INPUT"); READ(FILENAME); %READS FILENAME FROM CONSOLE% INPUT:=FILENAME; %THIS OPENS THE FILE% READ INPUT(N);% READS NUMBER OF NAMES FROM FILE INPUT% BEGIN STRING ARRAY WORDS[1:N];%MAX WORD SIZE EQUAL 10% FOR I:=1 STEP 1 UNTIL N DO READ INPUT(WORDS[I]); BEGIN PROCEDURE QUICKSORT; " BEGIN PROCEDURE SORT(L,R); INTEGER L,R; BEGIN INTEGER I,J; STRING X,W; I:=L; J:=R; X:=WORDS[(L+R)/2]; WHILE I<=J DO BEGIN WHILE WORDS[I]< X DO I:= I+1; WHILE X= "HELLA" THEN WRITE(A); END EOF BEGIN COMMENT ALGOL-M PROGRAM TO SORT DECIMAL NUMBERS IN DESCENDING ORDER :- INPUT IS FROM THE CONSOLE; INTEGER N; PROCEDURE HEADING(N); INTEGER N; WRITE("DATA SET",N); PROCEDURE DASHES(N); INTEGER N; BEGIN INTEGER I; WRITE("-"); FOR I:=2 STEP 1 UNTIL N DO WRITEON("-"); END; PROCEDURE TITLE; BEGIN WRITE(" ALGOL-M SORTING PROGRAM"); WRITE(" "); WRITE(" "); END; PROCEDURE INPUT; BEGIN WRITE("INPUT AN INTEGER TO INDICATE THE NUMBER OF DECIMAL"); WRITE("NUMBERS TO BE SORTED. INPUT 9999 TO TERMINATE "); READ(N); END; INTEGER COUNT,K; COUNT:=0; K:=30; TITLE; INPUT; WHILE N<>9999 DO BEGIN DECIMAL ARRAY SORT[1:N]; INTEGER FUNCTION SORTER; BEGIN INTEGER I,COUNT,SORTED; DECIMAL T; COUNT:=1; SORTED:=0; T:=1.0; WHILE COUNT<>0 DO BEGIN COUNT:=0; FOR I:=1 STEP 1 UNTIL N-1 DO BEGIN IF SORT[I]0 DO BEGIN COUNT:=0; FOR I:=1 STEP 1 UNTIL N-1 DO BEGIN IF SORT[I]B THEN WRITE("GTR"); IF A>=B THEN WRITE("GTREQL"); IF A<=B THEN WRITE("LSSEQL"); IF A<>B THEN WRITE("NEQL"); END; END  1, 2, 3, 4, 5, STRTST ALGBLK $$$1,2,3,4,5,6,7,8,9,10 RWINT ALGSIISTR ALGSORT ALGSTRING ALGSTRTST ALGBLK INPFILE1 $$$11,12,13,14,15,16 RWINT ALGSIISTR ALGSORT ALGSTRING ALGSTRTST ALGBLK INPFILE1 INPFILE2 $$$$; ; CRCK.ASM version 4.2B ; by Keith Petersen, W8SDZ ; (REVISED 4/27/ BY BRK) ; ;----> NOTE: MUST BE ASSEMBLED BY MAC <---- ; ;CRCK is a program to read any CP/M file and print ;a CYCLIC-REDUNDANCY-CHECK number based on the ;CCITT standardSTRTST ALGBLK INPFILE1 INPFILE2 INPRFILE $$$to ignore ; NAMTST: IF NOSYS LDA FCB+10 ;GET SYS ATTRIBUTE ANI 80H ;IS IT SYS? JNZ AGAIN ;YES, IGNORE THIS FILE ENDIF RWINT ALGSIISTR ALGSORT ALGSTRING ALGSTRTST ALGBLK INPFILE1 INPFILE2 INPRFILE INPWINPUT $$$r size (presently set for 8k) ; BSIZE EQU 8*1024 ;DISK WRITE BUFFER SIZE ; ;BDOS equates ; RDCON EQU 1 WRCON EQU 2 PRINT EQU 9 CSTAT EQU 11 OPEN EQU 15 SRCHF EQU 17 SRCHN EQU 18 READ EQU 20 STDMA EQU 26 BDOS EQU BASE+5 FCB EQU BASE+5CH FCSTRTST ALGBLK INPFILE1 INPFILE2 INPRFILE INPWINPUT INPWFILE $$$ This is the release date of the disk. MACREF COM MACREF DOC XMAC ASM ML80-L80DOC M81 COM &ML80 DOC ML80 REF #L81 COM !,L82 COM ,+L83 COM 7ML SUB <USRMAN TXT =bSRMAN TXT M"-CPM112 DOC L82 .COM F3 7A 11008 86 L83 .COM 8A 54 4864 38 ML .SUB 68 75 128 1 USRMAN .TXT 0B 39 25088 196 WDIR .M80 3C 88 2688 21 XDIR .M80 CC 16 3840 30 ALGOLM .COM 17 1E 13568 106 COMERR .TXT B1 8C 1664 13 ALGINTRO.TXT 86 A1 8448 66 ALGOL .DOC 84 4B 896 7 ALGSTART.TXT A5 3B 2816 22 RUNALG .COM 4A 07 14336 112 RUNERR  Fog Library Disk FOG-CPM.110 Copyright (1986) by Fog International Computer Users Group to the extent not copyrighted by the original author for the exclusive use and enjoyment of its members. Any reproduction or distribution for profit or personal gain is strictly forbidden. For information, contact FOG, P. O. Box 3474, Daly City, CA. 94015-0474. as part of the description of a file indicates that the program is distributed on a "try first, pay if you like it" basis. If you find the program(s) meet your need, please refer to the author's documentation for information on becoming a registered user. Only by registering and paying for the programs you like and use will the authors of such programs continue development. Often, more complete documentation, additional modules, and new releases are available only to registered users. Algol-M Programming Language, assemblers, and MAC fixes. Filename Description -07-00 .86 This is the relea%se date of the disk. -CPM110 .DOC This is the description of the disk contents. MAC .FIX 5F3C 3K Notes on modifying MAC.COM to not convert lower case instructions. MACREF .COM E74D 2K [MACREF 1 of 2] Cross-reference utility for MAC .PRN files. MACREF .DOC BAB7 1K [MACREF 2 of 2] XMAC .ASM 8F68 1K Can be overlayed in MAC for cross assembly work. M81 .COM 896C 10K [ML80-L80 1 of 11] Structured 8080 assembly language. ML80 .DOC FE3E 2K [ML80-L80 2 of 11] ML80 .REF 58B5 9K [ML80-L80 3 of 11] ML .SUB 6875 1K [ML80-L80 4 of 11] L81 .COM 259D 11K [ML80-L80 5 of 11] Structured 8080 assembly language. L82 .COM F37A 11K [ML80-L80 6 of 11] Structured 8080 assembly language. L83 .COM 8A54 5K [ML80-L80 7 of 11] Structured 8080 assembly language. ML80-L80.DOC 3F67 2K [ML80-L80 8 of 11] USRMAN .TXT 0B39 25K [ML80-L80 9 of 11] WDIR .M80 3C88 3K [ML80-L80 10 of 11] XDIR .M80 CC16 4K [ML80-L80 11 of 11] ALGOLM .COM 171E 14K [ALGOL-M 1 of 30] ALGOL is a block structure language. Included here is the compiler by Lt. Mark Moranville and several sample programs. COMERR .TXT B18C 2K [ALGOL-M 2 of 30] ALGINTRO.TXT 86A1 9K [ALGOL-M 3 of 30] ALGOL .DOC 844B 1K [ALGOL-M 4 of 30] ALGSTART.TXT A53B 3K [ALGOL-M 5 of 30] RUNALG .COM 4A07 14K [ALGOL-M 6 of 30] RUNERR .TXT 50A8 2K [ALGOL-M 7 of 30] ARRAY .ALG 1500 3K [ALGOL-M 8 of 30] BLKTEST .ALG 2ACA 1K [ALGOL-M 9 of 30] BOOLINT .ALG BBC1 1K [ALGOL-M 10 of 30] CASETEST.ALG 57EF 1K [ALGOL-M 11 of 30] CASETWO .ALG 388E 1K [ALGOL-M 12 of 30] FLYTEST .ALG E1B6 1K [ALGOL-M 13 of 30] GOTOTEST.ALG BA6B 1K [ALGOL-M 14 of 30] HANOI .ALG CEA3 2K [ALGOL-M 15 of 30] LUNAR .ALG 41C9 2K [ALGOL-M 16 of 30] ONEND2 .ALG B11C 1K [ALGOL-M 17 of 30] PERM .ALG 2A1A 2K [ALGOL-M 18 of 30] READWORD.ALG EF10 2K [ALGOL-M 19 of 30] RWINT .ALG 1039 1K [ALGOL-M 20 of 30] SIISTR .ALG BD6C 1K [ALGOL-M 21 of 30] SORT .ALG 4DC1 2K [ALGOL-M 22 of 30] STRING .ALG BABD 1K [ALGOL-M 23 of 30] STRTST .ALG 551A 1K [ALGOL-M 24 of 30] BLK .INP D3EE 1K [ALGOL-M 25 of 30] FILE1 .INP 00CF 1K [ALGOL-M 26 of 30] FILE2 .INP 493D 1K [ALGOL-M 27 of 30] RFILE .INP 1C09 1K [ALGOL-M 28 of 30] WINPUT .INP C0BC 1K [ALGOL-M 29 of 30] WFILE .OUT 0B84 1K [ALGOL-M 30 of 30]  ? "  Fog Library Disk FOG-CPM.112 Copyright (1986) by Fog International Computer Users Group to the extent not copyrighted by the original author for the exclusive use and enjoyment of its members. Any reproduction or distribution for profit or personal gain is strictly forbidden. For information, contact FOG, P. O. Box 3474, Daly City, CA. 94015-0474. as part of the description of a file indicates that the program is distributed on a "try first, pay if you like it" basis. If you find the program(s) meet your need, please refer to the author's documentation for information on becoming a registered user. Only by registering and paying for the programs you like and use will the authors of such programs continue development. Often, more complete documentation, additional modules, and new releases are available only to registered users. DISK 1 of 2. Small 'C' compiler. Filename Description -07-00 .86 This is the release date of the disk. -CPM112 .DOC This is the description of the disk contents. C1 .COM 3436 32K [Small 'C' 1 of 32] Mike Bernson version of a Small 'C' compiler. Written in BDS 'C' 1.41. Includes samples. ASSEMBLE.COM C262 21K [Small 'C' 2 of 32] LINK .COM FEE0 13K [Small 'C' 3 of 32] C .DEF AF19 6K [Small 'C' 4 of 32] C .SUB 7EC2 1K [Small 'C' 5 of 32] CC .SUB DED1 1K [Small 'C' 6 of 32] CL .SUB C192 1K [Small 'C' 7 of 32] FUNCTION.CRL A7F7 1K [Small 'C' 8 of 32] STDLIB .TXT 7CA2 3K [Small 'C' 9 of 32] C1 .C ECA6 11K [Small 'C' 10 of 32] C2 .C 1C9B 13K [Small 'C' 11 of 32] C3 .C 6886 5K [Small 'C' 12 of 32] C4 .C 9CD6 6K [Small 'C' 13 of 32] C5 .C 9A47 7K [Small 'C' 14 of 32] C6 .C DE36 4K [Small 'C'& 15 of 32] C7 .C 252E 14K [Small 'C' 16 of 32] C8 .C C491 7K [Small 'C' 17 of 32] C9 .C 4855 4K [Small 'C' 18 of 32] SUBMIT .C F2B5 7K [Small 'C' 19 of 32] Sample file that allows nested submits. TIME .C 057D 5K [Small 'C' 20 of 32] Sample file to get and/or set the date. WORDPUZL.C F0CE 5K [Small 'C' 21 of 32] Sample game. WORDPUZL.DOC 54F6 1K [Small 'C' 22 of 32]  [Small 'C' 16 of 32] C8 .C C491 7K [Small 'C' 17 of 32] C9 .C 4855 4K [Small 'C' 18 of 32] SUBMIT .C F2B5 7K [Small 'C' 19 of 32] Sample file that allows nested submits. TIME .C 057D 5K [Small 'C' 20 of 32] Sample file to get and/or set the date. WORDPUZL.C F0CE 5K [Small 'C' 21 of 32] Sample game. WORDPUZL.DOC 54F6'