IMD 1.17: 4/01/2010 17:41:28 turbo pascal morroe cp/m 80 version 3.00a 1983 >2!9^#V!1 Not a SYSTEM Diskette. (^ >2!9^#V!1 Not a SYSTEM Diskette. READ ME 5TURBO COMq TURBO MSG TURBO OVR TINST COMG !"#$TINST DTA#%&'TINST MSG()LISTER PAS,*+,CMDLIN PAS-MC PAS3./01MC-MOD00INC2MC-MOD01INC3MC-MOD02INC45MC-MOD03INC$678MC-MOD04INCF9:;<=MC-MOD05INCX>?@ABCMC HLP%DEFMCDEMO MCS]GHIJKL Welcome to TURBO PASCAL Version 3.0! ------------------------------------ In spite of all efforts, some errors have found their way into the new TURBO 3.0 manual. This file contains all the necessary corrections and additions, and we apologize for any inconvenience this may cause you. Please make a working copy of your TURBO disk and store the ori- ginal in a safe place. For help making a backup copy, please refer to appendix M of the TURBO PASCAL Reference Manual. Now, using your working copy, run TINST to install TURBO.COM for your terminal. Installation procedures are discussed in Chapter One and Appendix L. ******************************************* * * * Need help with TURBO? Please see * * Appendix N in your Reference Manual * * for answers to common questions.  * * * ******************************************* ------------------- Contents of the READ.ME File ---------------------------- 1. CORRECTIONS to the 3.0 Reference Manual [ All versions ] 2. OMMISSIONS from the 3.0 Reference Manual [ All versions ] 3. New FEATURES [ CP/M-80 ] 4. ADDITIONAL FILE LIST [ CP/M-80 ] ------------------- CORRECTIONS ----------- Page 253 - MOV AL,[BP-1] ------------------------ The correct statement is: MOV AL,[BP+4] Page 293 - TURBO-BCD will compile and run any program ----------------------------------------------------- Well - almost. The Real functions Sin, Cos, ArcTan, Ln, Exp, and Sqrt and the pre-declared constant Pi are not availab error. 2 Run-time error. In case of a user interrupt (Ctrl-C), the low byte of "ErrNo" is always 1. "ErrAddr" contains the address (offset in Code Segment for 16 bit versions) of the error. To activate the error handler, assign its offset address to the standard variable "ErrorPtr", i.e. ErrorPtr:=Ofs(Error); { 16 bit } or ErrorPtr:=Addr(Error); { 8 bit } There are no limits to what an error handler may do. Typi- cally it will close all open files, output an error mes- sage, and call the Halt standard procedure to terminate the program. If an error handler returns, i.e. if it does not call Halt, or if an error occurs within an error handler, Turbo Pascal will itself output the error message and terminate the program. ------------------- NEW FEATURES OF CP/M-80 IMPLEMENTATION OF S-DOS) or OvrDrive (CP/M) standard proce- dures may be used to specify the drive and subdirectory in which overlay files reside. Please note that run-time error F0 indicates that your over- lay file is missing or is called recursively. (This error number is omitted from the Reference Manual but is included elsewhere in this file.) ------------------- TURBO PASCAL Version 3.0 CP/M-80 Additional File List In addition to the list of files mentioned in Chapter 1 of your TURBO Reference Manual, the following files are included on your TURBO disk: Sample programs --------------- LISTER PAS - simple program to list your Pascal source CMDLIN PAS - get parameters from the command line MC PAS - sample spreadsheet program - MAIN MODULE MC-MOD00 INC - sample spreadsheet program le in TURBOBCD. ------------------- OMISSIONS --------- User Written Error Handlers --------------------------- In Turbo Pascal 3.0 you may write your own error handler, which is called in case of an I/O or Run-time error. The procedure must have the following header: procedure Error(ErrNo, ErrAddr: Integer); The name of the procedure and its parameters are unim- portant, as long as it is a procedure with two value parameters of type Integer. The value passed in ErrNo is the error type and number. The most significant byte, i.e. "Hi(ErrNo)", contains the error type, and the least significant byte, i.e. "Lo(ErrNo)", contains the error number (see Appendix F or G in the Turbo Pascal Manual). The following error types are defined: 0 User Break (Ctrl-C). 1 I/O TURBO 3.0 - AN OVERVIEW - ----------------------------------------- Inline ------ A constant identifier used in an INLINE statement does not always generate two bytes of code. Files ----- New FIB formats. Optional 4th parameter on Blockread/Write returns number of blocks actually read. SeekEoln function. SeekEof function. Misc. ----- Exit procedure - To exit the current block OvrDrive procedure - To specify the drive on which to find overlays ParamCount function - Gives number of characters in the command buffer ParamStr function - Gives the string of characters in the command line Overlays -------- Overlay files are opened and closed every time they are accessed. Therefore, there is never a need to specifically close an overlay file. The Y compiler directive is no longer supported. Instead, the OvrPath (M- INCLUDE MODULE 00 MC-MOD01 INC - sample spreadsheet program - INCLUDE MODULE 01 MC-MOD02 INC - sample spreadsheet program - INCLUDE MODULE 02 MC-MOD03 INC - sample spreadsheet program - INCLUDE MODULE 03 MC-MOD04 INC - sample spreadsheet program - INCLUDE MODULE 04 MC-MOD05 INC - sample spreadsheet program - INCLUDE MODULE 05 MC HLP - spreadsheet help file MCDEMO MCS - spreadsheet data file (not for use with TURBO-87) ---------------------------------------------------------------------  your TURBO Reference Manual, the following files are included on your TURBO disk: Sample programs --------------- LISTER PAS - simple program to list your Pascal source CMDLIN PAS - get parameters from the command line MC PAS - sample spreadsheet program - MAIN MODULE MC-MOD00 INC - sample spreadsheet program  ͫCopyright (C) 1985 BORLAND IncBNo Terminal SelectedP= E RC1B1~7#~= oͦkԄ!!"~#(}:$= +*!5!*!!:(2!5:(>2!!!:O::O:!*! !45(! +/ 0y0( d!k5!{5__o&  :(͠|(  *"x2y( >28!"9!! og2"">~22 9/4*9 Co&ͦͣ} [ (!e{ͦA8Q0G: x@!\w# (͂ ?(*( .( w^. ^!h6# (?( *( ͂( w#>?> w#ͦ 8 !ɿ .,;:=?*[]<>{}a{ |ʹ}ͽƐ'@'7||}>2ͯ*Bڨ  "og"2>2! 8 (8~wPT] ) >' ́ ͬ͗ }>' xˆ }} ˸T}ٕ(0D=z ,= ( ͒ 0%{ , 7 ?(8ͬ x ͆ - r 8˸x ͏  ,-xG}r }مM 9r .>#n0͒ { = - nx ͇ ,-(-˸G,-r }ٕ?M 9.> 8ͬ ?= u+-(>͆ 0ͬ ͆ 8 ?x ͇ , 78ƀ8ƀ8ox٨!دoGOW_gɷɷ|لg{ً_zيWyىOxوG|ٔg{ٛ_zٚWyٙOx٘Gxٸyٹzٺ{ٻ|ټx٨ xx( ?}ٽ }ցr <(r 7{ = |٤g{٣_z٢Wy١Ox٠G{ ͬ ́ }x>' ͬ}ƀ/ƀo -́ }0͎-́ ͎,}l˸ 8 4 ͗ x( - 8́ - 8,́ }l8;*!͗ ! >4ͬ͗ ͗ ͬ--- ́""*B"[Ru*"^#V#^#V#N#FO/o&9O/o&9!9(> (G!9 w#Eͺw}8' RB0 >' R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: Nr!~6go(\R*s#r_2x( s x(T]DMx(R0 U(͝O/o&9q# (!>F0#( ~ ( #]( ~ ( (#}(  i&T-a%â}ͦo*!~6o&|:2 2}:__zѯ2*|KB " z ^C User break+=  I/O Run-time error {ʹ, PC=*ͯNot enough memory Program aborted :ʎ'^!*"HE!zd k˸}րogM| .(z = ~> x0w#xG%͇ %͇ ZJDM%͇ = _~65+~hìx-Sx9?+{Η@}|z z gZJDM0{ ,7}o˸? #yO!@9i&?  #?w#?/w#?w#!9! E9!!9~(+Fͺ!"9!(#>2*"| >"2:( Ͷ *w*6 !\$![ (ͦ( #:~CONTRMKBDLSTCAUXUSR>2i:*ˮ~0:*:(@q##pZ* :(  ~* < >26"!"""~>2""v>2>"!"ˮ(!~8>~O6~*">22*f(/˦:G(##~++ :O x yC!ͺ Q*:G(##~._.͚f<\=<͚*##w ͮ +4 #4x >>2:G("ͮ"*nˮ*0 SZѷR8@* N#F#s#r, 0})jS\*##w+ N#FB ͮr+s>2!T]>)j)0 0= ]R!#]*^#V#N#F#^#V>2Ͱ:0:*6 #-Nw#Fwq#p#6#w#w#w"~Á>">!DM!":*B:!>(>2>">!"2"~ʰ*w#wx(9* :O *-4 #4!*4 #4 *-N#Fq#pV+^Bq#pSZѷR&* s#r$ s#rL <?*L!\  <( !\$>2>2L:>!(* \$\<(!3: [1ð\!(7"~> 2"S"Ns#FrB(Z#\: \<(?*"}K\! !*}#"}! x \* *>) 2""{_!"*Ä :BE:AEĤ-͏-K-%:D=(2BE;"---------------------------------------  *< "D<2D >(!TURBO Pascal systemkV!Version 3.00A V!CP/M-80, Z80 Copyright (C) 1983,84,85 ̈́BORLAND Inc. (! Terminal: !S Include error messages!-2AEĤ-͏-z"{!;"ͦ!`$r$ P$8: z >ogged drive:Aork file:51ain file:D-dit ompile un ave eecute ir uit compiler ptions Text: [DE*FE+8#[FE*HEFree: շR\. bytes (ͯ>-ͯ>)= compile ->  V!!y#>:Da#emory a#om-file a#cn-file :D(]tart address:*Dͯ (min ! ͯ) nd address:*Dͯ (max *ͯ) ind run-time error uit ͦ!k$$P$(#7^#VLWMECRSXDQOMCHSEFQ,$$*'(*9&-++$+y#@'D'H'P'n''$z" Main file name͟-a">2D*-D!\$!%"%& Work file namea">2E ͏-;"*-E!\nes :yp):y z*not found ;"( *y R.#Code: [y*y+8#*y.#* yData: 8#>2BEZ*0sGError &ha.:AE(f*B~(^ 80O#0#( ~# #: ~ (7 0![B 0  ( #z*found2D:y(?>.&E!y % Error found in above include filez-( E!D v.* y*Disk or directory fullv.;"Run-time error position :BE'(:D=(;=3+z-!E(!D3y >C!OM2*i-&͢*B";"&3+'&}!>O!VR .!&ѷ( Programa"!>C!OM .(!\:D!!!PD!!Dir maska"er:\( =_erA2,Wyer&O<(RyO!ay ~ =!Wy  :h=0:  #~x> (> ( No file ~<2q{nf"o{#,*o{ͥ,`i,Bytes Remaining On X: Ra.>k_er |,,( ͽ,0:q{)New drivea" : ͦA er2_e>0(-'11d1 1R8<00 E-: #V6#:/0^ :D>y 6 ~04J ~(~ͨ/#4 1 - qB( (( 1_~ݾ04s~#ͨ/~8V÷1~5+~ 1B>ɯ2~D1 2U>FindD;1>Replace withD>OptionsD;1:hg%.â>2~D1 2 2͊/6@>#>#[RD͑At{R[PD"D!DF6(C#~08:0 &40_0.+ͦW U N G B { SD*DE:}Dg(*FE_ *D"Df [FE;Ҁ3;ڀ3D:DGf(=_0F(3~838T(4 K6F( 4~8386f;:~D04^ KD CDx E48f(*D423ͩ3^>Search string not found?ͯ3,=[FE;8;"PDRt{"RD?@[DE͑A*FE+ÑA08:A8 [a8{طf( ;?f(;ȾV( 30ɾkb)))͏B(N aͩ3͖;N U>Replace (/): nf͢2B͏B  y !͢2B͏B  y qB>ͦY( NƯ2BE:DO:DO0f *D?x(!D͏BGA ,=9Af F@>,=*`D[bD$!%"%!%"}%͏-E*DE"`D"bD"PD"TD"XD"jDKHE;%6 #"FE Loading -\&$&Wyer<(.Cm{Km{B &Wyw# File not foundv.͠%2 New File#!*FE File too big%2E;"!e6B#6A#6K>:D(,Workfile 51 not saved. Save2D!-P-!E\$ Saving \-*FE+6%&er!]l2D<2D\&*DE&er<(NWyer~#G& >Wyx xր> \er\! 6T] Directory  Disk fullv.&&:D2D!]l2D%&;">>>2Dß-Start addressa"! -"DEnd addressa"*< -"D *| ;"Enter PCa"-"'!"y>2y Searching͟-(K-P-z-!E P--(&!%"}%!%"%D%>2D3y$2y*" y*FE6#"y':D=ʪ(= >C!OM>C!HN22y*D"y*D" y3y&erer Compiling 3y(  --> -͟-JE:y  Compilation aborted;" lir (Y/N)? ͦY(N N->P!AS2e"f:\er<2\:EK- z- $E!D$>2D:D&%:DE!D #*DE6 #"FE2D2D2BE*B"DE}!>M!SG .2AEv.(!%"%!%"}%\%*FE6#"DE!ͦ0 8 ))))o@@>:  x>./-!\Q.:DwQ.>wQ.6- not found&<͛&. Press   *FEr+sS{2tD<2uD!C"r{!lD>*DEͩ3:D=(!͢:DG> ͖;/:/0.(!.z8 2DW2BE!WD[D͊/6qB2D!BE6*RD{;0FAw#͗A"RD?ý.qB( !D6#w!DB/ !DiC/7=( !C ^#V7͊/qB4#ẘ/2B͏B!͢!D~#~ͨ/= < >^@ N#0O # >>O 2B͏B!tD~ s6!"vD2xD͢<<:h88 !*͢51!BLine !BCol !:rD BInsert BOverwrite :yD BIndent:lD<*xD(2xD!͢0[vD*PD;ʤ7ͤ7[DE*PDRMDy(> 02B͏B ! ͢<>0*PD"vDä70G> |;<6,=>Write block to filef5*-&<(">Overwrite old \--(&*bD~6 >*`D͒&wD;1D>Read block from filef5*-&<  >\>.?<6*FE[HE RDM*D7?!5*DR!5"}%`%"bD*D"`D*m{RDM![D5><6,=͇6*D[`D"`D "bD?*`Dͩ3b7<6,=͇6*D"`D "bD@,=b7F(#>#[RD͑AD>t{R[PD"D[`D;[bD8;0 *`DR"DMD?KDy/Ox/G[D*`DF@>*`D;"PD*TD[`D;8[bD;0*PD"TD*bD[`DR,=MD@?*PD"`D"bD,=b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:{G*{^#V#lF#lF#l:y=[yR}2{)lg[{[TyR(l"Ty! !{ |"{"{2{2y!"{:{2{:{2{Hp~#:{r[*{"{*{"{!yq ( ( ( 8w#2{~q͏q~q6*{#"{}(> :y(>I> > *{a.͠(. *** Abort compilation-r  :y *{~#"{*{[{R80[{:{Geryer !>S{*{~#"{ 2y:{2{:{2{*{#"{A[?_a{?qr0:?||r}DM!>))0 = BKgo>jB0 7?= ## ##+~͏q2y( yR[{:y [DER[{" y:y= 3yer{q{ tEGETNItAHCtAER tAELOOBtXETuTYB  URT SLAF  NIXAM !I P tUPTUO tUPNI tOC tRT tBK tSL tUA tSU uELFUBtTPPAEHtTPRUCERtTPTSNOCtTPNINOCtTPTUONOCtTPTUOTSLtTPNIXUAtTPTUOXUAtTPNIRSUtTPTUORSUtTPRORRE tAERBC    dSEEKEOLdFILESIZdFILEPOdKEYPRESSE dMEMAVAIeMAXAVAIePORԿeSTACKPTeADDveSIZEOƝeBDOSHSeBDOTeBIOSHeBIOeME.:LABECONSTYPVABEGIOVERLAPROCEDURFUNCTIOBEGIwSISWHIL$TREPEALTFOkTCAS!UGOT&VWITNVINLINŘVT#DOWNT+ANDIMOSHSHOXO<>< (IWRITELZWRITZREADL2ZREA3ZDELETf\INSERԇ\ASSIGCYRESEԹYREWRITžYCLOSYERASqYRENAMfYSEEˌYGETME͔]NEן]FREEMEʹ]DISPOSſ]MAR]RELEAS]OVRDRIV]CRTINI8^CRTEXI=^GOTOXm]CLRSCB^CLREOH^NORMVIDEM^HIGHVIDEM^LOWVIDER^INSLINW^DELLIN\^DELAى]BLOCKREA\BLOCKWRIT\RANDOMIZŃ]MOV^FILLCHA^EXIa^HALg^PORm^STACKPTx^FLUSȫYEXECUT~YCHAIyYSTҺ\VA"]BDOSeBIOeCH%dORdCOP`dLENGTAdPORdCONCAԁdSUCcPREcUPCAS7dTRUNþcROUNcODdABqcSQ`cSQRԅcSIΊcCOӏcARCTAΔcLΙcEXОcINԣcFRAècRANDOͬdPARAMCOUNԜdPARAMSTҡdLcHcSWAcPT+dIORESULdEOdEOLdSEEKEOdSEEKEOLdFILESIZdFILEPOdKEYPRESSE dMEMAVAIeMAXAVAIePORԿeSTACKPTeADDveSIZEOƝeBDOSHSeBDOTeBIOSHeBIOeME are not allowed  can not be  constant  does not  expression  identifier  file  here Integer File Illegal  or Undefined  match  real String Textfile  out of range  variable  overflow  expected  type Invalid  pointer 01';' 02':' 03',' 04'(' 05')' 06'=' 07':=' 08'[' 09']' 10'.' 11'..' 12BEGIN 13DO 14END 15OF 17THEN 18TO DOWNTO 20Boolean 21  22  23  24  25  26  27  28Pointer 29Record 30Simple 31Simple 32 33 34 35 36Type 37Untyped 40 label 41Unknown syntax error 42 in preceding definitions 43Duplicate label 44Type mismatch 45 46 and CASE selector 47Operand(s) operator 48 result 49  length 50 length 51 subrange base 52Lower bound > upper bound 53Reserved word 54 assignment 55 exceeds line 56Error in integer 57Error in 58 character in 60s 61 s ands 62Structureds 63s 64s and untypeds 65Untypeds )uuuuvv4vPROGRAENFORWAREXTERNAPACKEARRAFILSERECORSTRINOABSOLUTTHEELSDUNTINONI.:LABECONSTYPVABEGIOVERLAPROCEDURFUNCTIOBEGIwSISWHIL$TREPEALTFOkTCAS!UGOT&VWITNVINLINŘVT#DOWNT+ANDIMOSHSHOXO<>< (IWRITELZWRITZREADL2ZREA3ZDELETf\INSERԇ\ASSIGCYRESEԹYREWRITžYCLOSYERASqYRENAMfYSEEˌYGETME͔]NEן]FREEMEʹ]DISPOSſ]MAR]RELEAS]OVRDRIV]CRTINI8^CRTEXI=^GOTOXm]CLRSCB^CLREOH^NORMVIDEM^HIGHVIDEM^LOWVIDER^INSLINW^DELLIN\^DELAى]BLOCKREA\BLOCKWRIT\RANDOMIZŃ]MOV^FILLCHA^EXIa^HALg^PORm^STACKPTx^FLUSȫYEXECUT~YCHAIyYSTҺ\VA"]BDOSeBIOeCH%dORdCOP`dLENGTAdPORdCONCAԁdSUCcPREcUPCAS7dTRUNþcROUNcODdABqcSQ`cSQRԅcSIΊcCOӏcARCTAΔcLΙcEXОcINԣcFRAècRANDOͬdPARAMCOUNԜdPARAMSTҡdLcHcSWAcPT+dIORESULdEOdEOLdSEEKEOdSEEKEOLdFILESIZdFILEPOdKEYPRESSE dMEMAVAIeMAXAVAIePORԿeSTACKPTeADDveSIZEOƝeBDOSHSeBDOTeBIOSHeBIOeME  66I/O 67 s must be parameters 68 componentss 69dering of fields 70Set base 71 GOTO 72Label not within current block 73 FORWARD procedure(s) 74INLINE error 75 use of ABSOLUTE 90 not found 91Unexpected end of source 97Too many nested WITH's 98Memory 99Compilerd WITH's 98Memory 99Compiler ""*B"[Ru*"^#V#^#V#N#FO/o&9O/o&9!9(> (G!9 w#Eͺw}8' RB0 >' RqRR!+ Ͱ R!+ Ͱ r!+ Ͱ r!+ Ͱ r!# Ͱ r!+ Ͱ T]KB!z> S>))0 = | |̀̀DMgo>jB0 7?= H͒<z5a)a<z {0Gɯgo||~}||/g}/o#}o&K[xAJSJDM!b"!6J"DM'd } ) W _}8(8J`9{T]=o`9y 2{G:|2{x4!  ^C$qqqq1:2_ :_:@. '. !<.    7*"! *o"![K<!ѷ(  :{>> 2|TURBO COM TURBO.COM not found. Re-insert disk in drive X: and hit RETURN$"/"""@2Б!12 2*"*"rKB*"!ے &),HV]agqty Egmv"&^#V#{*N#F r+s!6#6q(6 #( {w#6x2q(#Q!\q(a!\\!Q  a{  ͫCopyright (C) 1985 BORLAND IncBNo Terminal selectedP~7#~= oͦkԄ!!"~#(}:$= +*!5!*!!:(2!5:(>2!!!:O::O:!*! !45(! +/ 0y0( d!k5!{5__o&  :(͠|(  *"x2y( >28!"9!! og2"">~22 9/4*9 Co&ͦͣ} [ (!e{ͦA8Q0G: x@!\w# (͂ ?(*( .( w^. ^!h6# (?( *( ͂( w#>?> w#ͦ 8 !ɿ .,;:=?*[]<>{}a{ |ʹ}ͽƐ'@'7||}>2ͯ*Bڨ  "og"2>2!  8 (8~wPT] ) >' ́ ͬ͗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^T_͈`RpcZbÔcR€caÔcR”c!_50Üc!E[c oE7v!P"~b5XE7vW!! !=02!!e!02 ^T_͈`RZbhcRaxcR”c!_50Üc!E[c oE7v!P"~b5XE7vW!! !=02!!e!02 ^T_͈`RZbhcRaxc" !ͩ!-D *-&}2-*-&! E`*-&!@}2-*-&e.!^:Ͳ!͒Eʈ`͛ *-&e.!^:Ͳ". ADDS 20/25/300PY  KPY ADDS 40/600PY  KMlPYADDS Viewpoint-1A0AY  KPYADM 3A= P= Ampex D80= )(TER(=ANSI;1P[;HDEC Rainbow, 8 bitPoE]!}2B^!}2B!"! e.!>!_!>͗WͯW!M1*!"!!,fz]}2A!*A&)):ͣ#}2@**@&!Eʦ]!}2B! X^!_!*A&))͗WͯW*@&M1**@&"*A&#[]!}2@!_!@͗WͯW!M1^^*B&=^!_!8͗WͯW!͆0*#"*8&}29*9&*!*!!"!"!_!͗WͯW!͆0!"*!R"!!,fzS_}2 14 CURSOR MOVEMENTS: 20 Character left 21 Alternative 22 Character right 23 Word left 24 Word right 25 Line up 26 Line down 27 Scroll down 28 Scroll up 29 Page up 30 Page down 31 To left on line 32 To right on line 33 To top of page 34 To bottom of page 35 To top o Find & replace 63 Repeat last find 64 Control character prefix 101 Nothing ^Q: Quit, ^R: Last page, ^C: Next page, : Select terminal: Wait Sorting Definitions Change to: (Y/N)? y n Text file name: Command: Numeric entry expected Legal range is , please re-enter: Choose one of the following terminals: None of the above ( Max. 20 Characters ) Delete a definition ( Max. 20 Characters ) Which terminal? (Enter no. or ^Q to exit): Delete terminal? (Enter no. or ^Q to exit): Do you want to modify this definition before installation? Terminal type: Send an initialization string to the terminal? Initializaion defined as a command string? (No = a file) Send a reset string to the terminal Reset defined as a command? (No = a file) CURSOR LEAD-IN command: CURSOR POSITIONING COMMAND to send between line and column: CURSOR POSITIONING COMMAND to send after both line and column: Column first OFFSET to add to LINprogram SourceLister; { SOURCE LISTER DEMONSTRATION PROGRAM Version 1.00A This is a simple program to list your TURBO PASCAL source programs. PSEUDO CODE 1. Find Pascal source file to be listed 2. Initialize program variables 3. Open main source file 4. Process the file a. Read a character into line buffer until linebuffer full or eoln; b. Search line buffer for include file. c. If line contains include file command: Then process include file and extract command from line buffer Else print out the line buffer. d. Repeat step 4.a thru 4.c until eof(main file); INSTRUCTIONS 1. Compile and run the program using the TURBO.COM compiler. 2. Two ways to print a file a. Run from TURBO in memory: 1. Type "R" and enter a file name to print when prompted. 2. Specify a run-time parameter from the compiler options menu. b. Run the progrf file 36 To end of file 37 To begining of block 38 To end of block 39 To last cursor position 15 INSERT & DELETE: 40 Insert mode on/off 41 Insert line 42 Delete line 43 Delete to end of line 44 Delete right word 45 Delete character under cursor 46 Delete left character 47 Alternative 16 BLOCK COMMANDS: 48 Mark block begin 49 Mark block end 50 Mark single word 51 Hide/display block 52 Copy block 53 Move block 54 Delete block 55 Read block from disk 56 Write block to disk 17 MISC. EDITING COMMANDS: 57 End edit 58 Tab 59 Auto tab on/off 60 Restore line 61 Find 62E: OFFSET to add to COLUMN: Binary address Number of ASCII digits (2 or 3): CLEAR SCREEN command: Does CLEAR SCREEN also HOME cursor HOME command: DELETE LINE command: INSERT LINE command: ERASE TO END OF LINE command: START HIGHLIGHTING command: END HIGHLIGHTING command: Number of rows (lines) on your screen: Number of columns on your screen: Delay after CURSOR ADDRESS (0-255 ms): Delay after CLEAR, DELETE and INSERT (0-255 ms): Delay after ERASE TO END OF LINE and HIGHLIGHT (0-255 ms): Is this definition correct? Hardware dependent information Operating frequency of your microprocessor in MHz (for delays): pendent information Operating frequency of your microprocessor in MHz (for delays): am from DOS 1. Type LISTER and enter a file name to print when prompted. 2. Specify a commandline parameter: A> LISTER filename } Const PageWidth = 80; PrintLength = 55; PathLength = 65; FormFeed = #12; VerticalTabLength = 3; Type WorkString = String[126]; FileName = String[PathLength]; Var CurRow : integer; MainFileName: FileName; MainFile: text; search1, search2, search3, search4: string[5]; Procedure Initialize; begin CurRow := 0; clrscr; search1 := '{$'+'I'; { So LISTER can list itself! } search2 := '{$'+'i'; search3 := '(*$'+'I'; search4 := '(*$'+'i'; end {initialize}; Function Open(var fp:text; name: Filename): boolean; begin Assign(fp,Name); {$I-} reset(fp); {$I+} If IOresult <> 0 then begin Open := False; close(fp); end else Open := True; end { Open }; ChkChar := '-'; column := pos(search1,CurStr); if column <> 0 then chkchar := CurStr[column+3] else begin column := Pos(search3,CurStr); if column <> 0 then chkchar := CurStr[column+4] else begin column := Pos(search2,CurStr); if column <> 0 then chkchar := CurStr[column+3] else begin column := Pos(search4,CurStr); if column <> 0 then chkchar := CurStr[column+4] end; end; end; if ChkChar in ['+','-'] then IncludeIn := False Else IncludeIn := True; end { IncludeIn }; Procedure ProcessIncludeFile(VAR IncStr: WorkString); var NameStart, NameEnd: integer; IncludeFile: text; IncludeFileName: Filename; Function Parse(IncStr: WorkString): WorkString; begin NameStart := pos('$I',IncStr)+2; ile) do begin Readln(MainFile,LineBuffer); if IncludeIn(LineBuffer) then ProcessIncludeFile(LineBuffer) else ProcessLine(LineBuffer); end; close(MainFile); write(lst,FormFeed); end {Process File}; BEGIN Initialize; OpenMain; ProcessFile; END. e}; BEGIN Initialize; OpenMain; ProcessFile; END.  Procedure OpenMain; begin If ParamCount = 0 then begin Write('Enter filename: '); readln(MainFileName); end else begin MainFileName := ParamStr(1); end; If Not Open(MainFile,MainFileName) Then begin Writeln('ERROR -- File not found: ',MainFileName); Halt; end; end {Open Main}; Procedure VerticalTab; var i: integer; begin for i := 1 to VerticalTabLength do writeln(lst); end {vertical tab}; Procedure ProcessLine(PrintStr: WorkString); begin CurRow := Succ(CurRow); if length(PrintStr) > PageWidth then CurRow := Succ(CurRow); if CurRow > PrintLength Then begin Write(lst,FormFeed); VerticalTab; CurRow := 1; end; Writeln(lst,PrintStr); end {Process line}; Procedure ProcessFile; var LineBuffer: WorkString; Function IncludeIn(VAR CurStr: WorkString): Boolean; Var ChkChar: char; column: integer; begin  while IncStr[NameStart] = ' ' do NameStart := Succ(NameStart); NameEnd := NameStart; while (not (IncStr[NameEnd] in [' ','}','*'])) AND ((NameEnd - NameStart) <= PathLength) do NameEnd := Succ(NameEnd); NameEnd := Pred(NameEnd); Parse := copy(IncStr,NameStart,(NameEnd-NameStart+1)); end {Parse}; begin {Process include file} IncludeFileName := Parse(IncStr); If not Open(IncludeFile,IncludeFileName) then begin LineBuffer := 'ERROR -- Include file not found: ' + IncludeFileName; ProcessLine(LineBuffer); end Else begin while not eof(IncludeFile) do begin Readln(IncludeFile,LineBuffer); ProcessLine(LineBuffer); end; close(IncludeFile); end; end {Process include file}; begin {Process File} VerticalTab; Writeln('Printing . . . '); while not eof(mainfprogram CommandLine; { COMMANDLINE PARAMETERS DEMONSTRATION PROGRAM Version 1.00A This program gets parameters from the command line: INSTRUCTIONS 1. Load the TURBO compiler and compile to a .COM file 2. Quit the TURBO compiler and execute the program with parameters. Try: cmdlin abc def cmdlin Greetings from Frank Borland! cmdlin NOTE: For information about these functions, please refer to your TURBO 3.0 Reference Manual. } var i : integer; begin for i := 1 to ParamCount do writeln(ParamSTR(i)); end. 0 Reference Manual. } var i : integer; begin for i := 1 to ParamCount do writeln(ParamSTR(i)); end. program MicroCalc; { MICROCALC DEMONSTRATION PROGRAM Version 1.00A This program is Copyrighted by Borland International, Inc. 1983, 1984, 1985 and is hereby donated to the public domain for non-commercial use only. Dot commands are for the program lister: LISTT.PAS (available with our TURBO TUTOR): .PA, .CP20, etc... INSTRUCTIONS 1. Compile this program using the TURBO.COM compiler. a. Use the O command from the main menu to select Options. b. Select the C option to generate a .COM file. c. Select the Q option to Quit the Options menu. d. Select the M option to specify the Main file e. Type "MC" and hit f. Type C to compile the program to disk g. Type R to run the program 2. Exit the program by typing: /Q } {$R-,U-,V-,X-,A+,C-} const FXMax: Char = 'G'; { Maximum number of columns } FYMax = 21; { Maximum number of lines  } MCFile: file of CellRec; { File to store sheets in } AutoCalc: boolean; { Recalculate after each entry? } { The following include files contain procedures used in MicroCalc. } { In the following source code there is a reference after each } { procedure call indicating in which module the procedure is located.} { If you want a printer listing of the following modules then you } { must let the include directives start in column one and then use } { the TLIST program to generate a listing. } {$I MC-MOD00.INC Miscelaneous procedures } {$I MC-MOD01.INC Initialization procedures } {$I MC-MOD02.INC Commands to move between fields } {$I MC-MOD03.INC Commands to Load,Save,Print } {$I MC-MOD04.INC Evaluating an expression in a cell } {$I MC-MOD05.INC Reading a cell definition and Format comma } type Anystring = string[255]; ScreenIndex = 'A'..'G'; Attributes = (Constant,Formula,Txt,OverWritten,Locked,Calculated); { The spreadsheet is made out of Cells every Cell is defined as } { the following record: } CellRec = record CellStatus: set of Attributes; { Status of cell (see type def.) } Contents: String[70]; { Contains a formula or some text } Value: Real; { Last calculated cell value } DEC,FW: 0..20; { Decimals and Cell Whith } end; Cells = array[ScreenIndex,1..FYMax] of CellRec; const XPOS: array[ScreenIndex] of integer = (3,14,25,36,47,58,68); var Screen: Cells; { Definition of the spread sheet } FX: ScreenIndex; { Culumn of current cell } FY: Integer; { Line of current cell } Ch: Char; { Last read character nd} {.PA} {*********************************************************************} {* START OF MAIN PROGRAM PROCEDURES *} {*********************************************************************} { Procedure Commands is activated from the main loop in this program } { when the user type a semicolon. Commands then activates a procedure} { which will execute the command. These procedures are located in the} { above modules. } { For easy reference the source code module number is shown in a } { comment on the right following the procedure call. } procedure Commands; begin GotoXY(1,24); HighVideo; Write('/ restore, Quit, Load, Save, Recalculate, Print, Format, AutoCalc, Help '); Read(Kbd,Ch); Ch:=UpCase(Ch); case Ch of { In module } 'Q': Halt; 'F': Format; { 04 } 'S': S); end; begin { procedure Wellcome } ClrScr; GotoXY(1,9); Center('Welcome to MicroCalc. A Turbo demonstation program'); Center('Copyright 1983 by Borland International Inc. '); Center('Press any key for help or to start'); GotoXY(40,12); Read(Kbd,Ch); if Ch<>^M then Help; end; {.PA} {*********************************************************************} {* THIS IS WHERE THE PROGRAM STARTS EXECUTING *} {*********************************************************************} begin Init; { 01 } Wellcome; ClrScr; Grid; { 01 } GotoCell(FX,FY); repeat Read(Kbd,Ch); case Ch of ^E: MoveUp; { 02 } ^X,^J: MoveDown; { 02 } ^D,^M,^F: MoveRight; { 02 } ^S,^A: MoveLeft; Save; { 03 } 'L': Load; { 03 } 'H': Help; { 03 } 'R': Recalculate; { 05 } 'A': Auto; { 00 } '/': Update; { 01 } 'C': Clear; { 01 } 'P': Print; { 03 } end; Grid; { 01 } GotoCell(FX,FY); { 02 } end; { Procedure Hello says hello and activates the help procedure if the } { user presses anything but Return } procedure Wellcome; procedure Center(S: AnyString); var I: integer; begin for I:=1 to (80-Length(S)) div 2 do Write(' '); writeln( { 02 } '/': Commands; ^[: GetCell(FX,FY); { 04 } else if Ch in [' '..'~'] then GetCell(FX,FY); { 04 } end; until true=false; { (program stops in procedure Commands) } end. *************} {* THIS IS WHERE THE PROGRAM STARTS EXECUTING *} {*********************************************************************} begin Init; { 01 } Wellcome; ClrScr; Grid; { 01 } GotoCell(FX,FY); repeat Read(Kbd,Ch); case Ch of ^E: MoveUp; { 02 } ^X,^J: MoveDown; { 02 } ^D,^M,^F: MoveRight; { 02 } ^S,^A: MoveLeft; {.PA} {*******************************************************************} {* SOURCE CODE MODULE: MC-MOD00 *} {* PURPOSE: Micellaneous utilities an commands. *} {*******************************************************************} procedure Msg(S: AnyString); begin GotoXY(1,24); ClrEol; Write(S); end; procedure Flash(X: integer; S: AnyString; Blink: boolean); begin HighVideo; GotoXY(X,23); Write(S); if Blink then begin repeat GotoXY(X,23); Blink:=not Blink; if Blink then HighVideo else LowVideo; Write(S); Delay(175); until KeyPressed; end; LowVideo; end; procedure Auto; begin AutoCalc:=not AutoCalc; if AutoCalc then Flash(65,'AutoCalc: ON ',false) else Flash(65,'AutoCalc: OFF',false); end; then Flash(65,'AutoCalc: ON ',false) else Flash(65,'AutoCalc: OFF',false); end; {.PA} {*******************************************************************} {* SOURCE CODE MODULE: MC-MOD01 *} {* PURPOSE: Display grid and initialize all cells *} {* in the spread sheet. *} {*******************************************************************} procedure Grid; var I: integer; Count: Char; begin HighVideo; For Count:='A' to FXMax do begin GotoXY(XPos[Count],1); Write(Count); end; GotoXY(1,2); for I:=1 to FYMax do writeln(I:2); LowVideo; if AutoCalc then Flash(65,'AutoCalc: ON' ,false) else Flash(65,'AutoCalc: OFF',false); Flash(33,' Type / for Commands',false); end; procedure Init; var I: ScreenIndex; J: Integer; LastName: string[2]; begin for I:='A' to FXMAX do begin for J:=1 to FYMAX do begin with Screen[I,J] do begin CellStatus:=[Txt]; Contents:=''; Value:=0; {.PA} {*******************************************************************} {* SOURCE CODE MODULE: MC-MOD02 *} {* PURPOSE: Display values in cells and move between *} {* cells in the spread sheet. *} {*******************************************************************} procedure FlashType; begin with Screen[FX,FY] do begin GotoXY(1,23); Write(FX,FY:2,' '); if Formula in CellStatus then write('Formula:') else if Constant in CellStatus then Write('Numeric ') else if Txt in CellStatus then Write('Text '); GotoXY(1,24); ClrEol; if Formula in CellStatus then Write(Contents); end; end; { The following procedures move between the Cells on the calc sheet.} { Each Cell has an associated record containing its X,Y coordinates } { and data. See the type definition for "Cell". } procedure GotoCell(GX: ScreenIndex; GY: integer); begin with Scree DEC:=2; { Default number of decimals } FW:=10; { Default field whith } end; end; end; AutoCalc:=True; FX:='A'; FY:=1; { First field in upper left corner } end; procedure Clear; begin HighVideo; GotoXY(1,24); ClrEol; Write('Clear this worksheet? (Y/N) '); repeat Read(Kbd,Ch) until Upcase(Ch) in ['Y','N']; Write(Upcase(Ch)); if UpCase(Ch)='Y' then begin ClrScr; Init; Grid; end; end; nd; end; n[GX,GY] do begin HighVideo; GotoXY(XPos[GX],GY+1); Write(' '); GotoXY(XPos[GX],GY+1); if Txt in CellStatus then Write(Contents) else begin if DEC>=0 then Write(Value:FW:DEC) else Write(Value:FW); end; FlashType; GotoXY(XPos[GX],GY+1); end; LowVideo; end; {.CP20} procedure LeaveCell(FX:ScreenIndex;FY: integer); begin with Screen[FX,FY] do begin GotoXY(XPos[FX],FY+1); LowVideo; if Txt in CellStatus then Write(Contents) else begin if DEC>=0 then Write(Value:FW:DEC) else Write(Value:FW); end; end; end; {.CP20} procedure Update; var UFX: ScreenIndex; UFY: integer; begin ClrScr; Grid; for UFX:='A' to FXMax do for UFY:=1 to FYMax do if Screen[UFX,UFY].Contents<>'' then LeaveCell(UFX,UFY); GotoCell(FX,FY); end; {.CP20} procedure MoveDown; var Start: integer; begin LeaveCell(FX,FY); Start:=FY; repeat FY:=FY+1; if FY>CellStatus*[OverWritten,Locked]=[]) or (FX=Start); if FX<>Start then GotoCell(FX,FY); end; ellStatus*[OverWritten,Locked]=[]) or (FX=Start); if FX<>Start then GotoCell(FX,FY); end;  var I: screenIndex; J: integer; begin HighVideo; Msg('Save: Enter filename '); GetFileName(Filename,'MCS'); if FileName<>'' then begin Assign(MCFile,FileName); Rewrite(MCFile); for I:='A' to FXmax do begin for J:=1 to FYmax do write(MCfile,Screen[I,J]); end; Grid; Close(MCFile); LowVideo; GotoCell(FX,FY); end; end; {.CP30} procedure Load; begin HighVideo; Msg('Load: Enter filename '); GetFileName(Filename,'MCS'); if (Filename<>'') then if (not exist(FileName)) then repeat Msg('File not Found: Enter another filename '); GetFileName(Filename,'MCS'); until exist(FileName) or (FileName=''); if FileName<>'' then begin ClrScr; Msg('Please Wait. Loading definition...'); Assign(MCFile,FileName); Reset(MCFile); for FX:='A' to FXmax do for FY:=1 to FYmax do read(MCFile,Screen[FX,FY]); FX:='A'; FY:=1; LowVideo; UpDate; end; GotoCell(FX,FY); endFYMax then FY:=1; until (Screen[FX,FY].CellStatus*[OverWritten,Locked]=[]) or (FY=Start); if FY<>Start then GotoCell(FX,FY); end; {.CP20} procedure MoveUp; var Start: integer; begin LeaveCell(FX,FY); Start:=FY; repeat FY:=FY-1; if FY<1 then FY:=FYMax; until (Screen[FX,FY].CellStatus*[OverWritten,Locked]=[]) or (FY=Start); if FY<>Start then GotoCell(FX,FY); end; {.CP20} procedure MoveRight; var Start: ScreenIndex; begin LeaveCell(FX,FY); Start:=FX; repeat FX:=Succ(FX); if FX>FXMax then begin FX:='A'; FY:=FY+1; if FY>FYMax then FY:=1; end; until (Screen[FX,FY].CellStatus*[OverWritten,Locked]=[]) or (FX=Start); if FX<>Start then GotoCell(FX,FY); end; {.CP20} procedure MoveLeft; var Start: ScreenIndex; begin LeaveCell(FX,FY); Start:=FX; repeat FX:=Pred(FX); if FX<'A' then begin FX:=FXMax; FY:=FY-1; if FY<1 then FY:=FYMax; end; until (Screen[FX,FY].{.PA} {*******************************************************************} {* SOURCE CODE MODULE: MC-MOD03 *} {* PURPOSE: Read, Save and Print a spread sheet. *} {* Display on-line manual. *} {*******************************************************************} type String3 = string[3]; var FileName: string[14]; Line: string[100]; function Exist(FileN: AnyString): boolean; var F: file; begin {$I-} assign(F,FileN); reset(F); {$I+} if IOResult<>0 then Exist:=false else Exist:=true; end; procedure GetFileName(var Line: AnyString; FileType:String3); begin Line:=''; repeat Read(Kbd,Ch); if Upcase(Ch) in ['A'..'Z',^M] then begin write(Upcase(Ch)); Line:=Line+Ch; end; until (Ch=^M) or (length(Line)=8); if Ch=^M then Delete(Line,Length(Line),1); if Line<>'' then Line:=Line+'.'+FileType; end; {.CP20} procedure Save;; {.PA} procedure Print; var I: screenIndex; J,Count, LeftMargin: Integer; P: string[20]; MCFile: Text; begin HighVideo; Msg('Print: Enter filename "P" for Printer> '); GetFileName(Filename,'LST'); Msg('Left margin > '); Read(LeftMargin); if FileName='P.LST' then FileName:='Printer'; Msg('Printing to: ' + FileName + '....'); Assign(MCFile,FileName); Rewrite(MCFile); For Count:=1 to 5 do Writeln(MCFile); for J:=1 to FYmax do begin Line:=''; for I:='A' to FXmax do begin with Screen[I,J] do begin while (Length(Line)0 then Str(Value:FW:DEC,P) else Str(Value:FW,P); Line:=Line+P; end; end else Line:=Line+Contents; end; { With } end; { One line } For Count:=1 ress to start MicroCalc >>>'); LowVideo; Readln(Ch); UpDate; end else { Help file did not exist } begin Msg('To get help the file MC.HLP must be on your disk. Press '); repeat Read(kbd,Ch) until Ch=^M; GotoCell(FX,FY); end; end; toCell(FX,FY); end; end; Line) do begin if Line[J]=^B then begin Bold:=not Bold; if Bold then HighVideo else LowVideo; end else write(Line[J]); end; Writeln; I:=I+1; Readln(H,Line); until Eof(H) or (I>23) or (Copy(Line,1,3)='.PA'); GotoXY(26,24); HighVideo; write('<<< Please press any key to continue >>>'); LowVideo; read(Kbd,Ch); end; GotoXY(20,24); HighVideo; write('<<< Please p{.PA} {*******************************************************************} {* SOURCE CODE MODULE: MC-MOD04 *} {* PURPOSE: Evaluate formulas. *} {* Recalculate spread sheet. *} {* *} {* NOTE: This module contains recursive procedures *} {* and is for computer scientists only. *} {*******************************************************************} var Form: Boolean; {$A-} procedure Evaluate(var IsFormula: Boolean; { True if formula} var Formula: AnyString; { Fomula to evaluate} var Value: Real; { Result of formula } var ErrPos: Integer);{ Position of error } const Numbers: set of Char = ['0'..'9']; EofLine = ^M; var Pos: Integer; { Current position in formula } Ch: Char; { to LeftMargin do Write(MCFile,' '); writeln(MCFile,Line); end; { End Column } Grid; Close(MCFile); LowVideo; GotoCell(FX,FY); end; {.PA} procedure Help; var H: text; HelpFileName: string[14]; Line: string[80]; I,J: integer; Bold: boolean; begin if Exist('MC.HLP') then begin Assign(H,'MC.HLP'); Reset(H); while not Eof(H) do begin Readln(H,Line); ClrScr; I:=1; Bold:=false; LowVideo; repeat For J:=1 to Length(Line) do begin if Line[J]=^B then begin Bold:=not Bold; if Bold then HighVideo else LowVideo; end else write(Line[J]); end; Writeln; I:=I+1; Readln(H,Line); until Eof(H) or (I>23) or (Copy(Line,1,3)='.PA'); GotoXY(26,24); HighVideo; write('<<< Please press any key to continue >>>'); LowVideo; read(Kbd,Ch); end; GotoXY(20,24); HighVideo; write('<<< Please pCurrent character being scanned } EXY: string[3]; { Intermidiate string for conversion } { Procedure NextCh returns the next character in the formula } { The variable Pos contains the position ann Ch the character } procedure NextCh; begin repeat Pos:=Pos+1; if Pos<=Length(Formula) then Ch:=Formula[Pos] else Ch:=eofline; until Ch<>' '; end { NextCh }; function Expression: Real; var E: Real; Opr: Char; function SimpleExpression: Real; var S: Real; Opr: Char; function Term: Real; var T: Real; function SignedFactor: Real; function Factor: Real; type StandardFunction = (fabs,fsqrt,fsqr,fsin,fcos, farctan,fln,flog,fexp,ffact); StandardFunctionList = array[StandardFunction] of string[6]; const StandardFunctionNames: StandardFunctionList =('ABS','SQRT','S repeat NextCh until not (Ch in Numbers); end; Val(Copy(Formula,Start,Pos-Start),F,ErrPos); end else if Ch='(' then begin NextCh; F:=Expression; if Ch=')' then NextCh else ErrPos:=Pos; end else if Ch in ['A'..'G'] then { Maybe a cell reference } begin EFX:=Ch; NextCh; if Ch in Numbers then begin F:=0; EXY:=Ch; NextCh; if Ch in Numbers then begin EXY:=EXY+Ch; NextCh; end; Val(EXY,EFY,ErrPos); IsFormula:=true; if (Constant in Screen[EFX,EFY].CellStatus) and not (Calculated in Screen[EFX,EFY].CellStatus) then begin Evaluate(Form,screen[EFX,EFY].contents,f,ErrPos);  not (Calculated in Screen[SumFX,SumFY].CellStatus) then begin Evaluate(Form,Screen[SumFX,SumFY].contents,f,errPos); Screen[SumFX,SumFY].CellStatus:= Screen[SumFX,SumFY].CellStatus+[Calculated]; end else if not (Txt in Screen[SumFX,SumFY].CellStatus) then F:=ScrEEn[SumFX,SumFY].Value; Cellsum:=Cellsum+f; f:=Cellsum; end; end; end; end; end; end else begin found:=false; for sf:=fabs to ffact do if not found then begin l:=Length(StandardFunctionNames[sf]); if copy(Formula,Pos,l)=StandardFunctionNames[sf] then begin Pos:=Pos+l-1; NextCh; F:QR','SIN','COS', 'ARCTAN','LN','LOG','EXP','FACT'); var E,EE,L: Integer; { intermidiate variables } Found:Boolean; F: Real; Sf:StandardFunction; OldEFY, { Current cell } EFY, SumFY, Start:Integer; OldEFX, EFX, SumFX:ScreenIndex; CellSum: Real; function Fact(I: Integer): Real; begin if I > 0 then begin Fact:=I*Fact(I-1); end else Fact:=1; end { Fact }; {.PA} begin { Function Factor } if Ch in Numbers then begin Start:=Pos; repeat NextCh until not (Ch in Numbers); if Ch='.' then repeat NextCh until not (Ch in Numbers); if Ch='E' then begin NextCh;  Screen[EFX,EFY].CellStatus:=Screen[EFX,EFY].CellStatus+[Calculated] end else if not (Txt in Screen[EFX,EFY].CellStatus) then F:=Screen[EFX,EFY].Value; if Ch='>' then begin OldEFX:=EFX; OldEFY:=EFY; NextCh; EFX:=Ch; NextCh; if Ch in Numbers then begin EXY:=Ch; NextCh; if Ch in Numbers then begin EXY:=EXY+Ch; NextCh; end; val(EXY,EFY,ErrPos); Cellsum:=0; for SumFY:=OldEFY to EFY do begin for SumFX:=OldEFX to EFX do begin F:=0; if (Constant in Screen[SumFX,SumFY].CellStatus) and =Factor; case sf of fabs: f:=abs(f); fsqrt: f:=sqrt(f); fsqr: f:=sqr(f); fsin: f:=sin(f); fcos: f:=cos(f); farctan: f:=arctan(f); fln : f:=ln(f); flog: f:=ln(f)/ln(10); fexp: f:=exp(f); ffact: f:=fact(trunc(f)); end; Found:=true; end; end; if not Found then ErrPos:=Pos; end; Factor:=F; end { function Factor}; {.PA} begin { SignedFactor } if Ch='-' then begin NextCh; SignedFactor:=-Factor; end else SignedFactor:=Factor; end { SignedFactor }; begin { Term } T:=SignedFactor; while Ch='^' do begin NextCh; t:=exp(ln(t)*SignXY(1,24); ClrEol; Write('Calculating..'); for RFY:=1 to FYMax do begin for RFX:='A' to FXMax do begin with Screen[RFX,RFY] do begin if (Formula in CellStatus) then begin CellStatus:=CellStatus+[Calculated]; OldValue:=Value; Evaluate(Form,Contents,Value,Err); if OldValue<>Value then begin GotoXY(XPos[RFX],RFY+1); if (DEC>=0) then Write(Value:FW:DEC) else Write(Value:FW); end; end; end; end; end; GotoCell(FX,FY); end; FW); end; end; end; end; end; GotoCell(FX,FY); end; se; Pos:=0; NextCh; Value:=Expression; if Ch=EofLine then ErrPos:=0 else ErrPos:=Pos; end { Evaluate }; {.PA} procedure Recalculate; var RFX: ScreenIndex; RFY:integer; OldValue: real; Err: integer; begin LowVideo; Goto{.PA} {*******************************************************************} {* SOURCE CODE MODULE: MC-MOD05 *} {* PURPOSE: Read the contents of a cell and update *} {* associated cells. *} {*******************************************************************} { Procedure GetLine will let the user type and/or edit a string of } { maximum length "MAX". The string will start at cursor position: } { ColNO,LineNO. If ErrPos <> 0 then the cursor will jump to position } { ErrPos in the string. If the last parameter is "True" then all } { characters entered will be translated to upper case. } { If the user at anytimes types then the string returned } { contain $FF to indicate that editing was aborted. } procedure GetLine(var S: AnyString; { String to edit } ColNO,LineNO, { Where start line } edFactor); end; Term:=t; end { Term }; begin { SimpleExpression } s:=term; while Ch in ['*','/'] do begin Opr:=Ch; NextCh; case Opr of '*': s:=s*term; '/': s:=s/term; end; end; SimpleExpression:=s; end { SimpleExpression }; begin { Expression } E:=SimpleExpression; while Ch in ['+','-'] do begin Opr:=Ch; NextCh; case Opr of '+': e:=e+SimpleExpression; '-': e:=e-SimpleExpression; end; end; Expression:=E; end { Expression }; begin { procedure Evaluate } if Formula[1]='.' then Formula:='0'+Formula; if Formula[1]='+' then delete(Formula,1,1); IsFormula:=false; Pos:=0; NextCh; Value:=Expression; if Ch=EofLine then ErrPos:=0 else ErrPos:=Pos; end { Evaluate }; {.PA} procedure Recalculate; var RFX: ScreenIndex; RFY:integer; OldValue: real; Err: integer; begin LowVideo; Goto MAX, { Max length } ErrPos: integer; { Where to begin } UpperCase:Boolean); { True if auto Upcase } var X: integer; InsertOn: boolean; OkChars: set of Char; procedure GotoX; begin GotoXY(X+ColNo-1,LineNo); end; begin OkChars:=[' '..'}']; InsertOn:=true; X:=1; GotoX; Write(S); if Length(S)=1 then X:=2; if ErrPos<>0 then X:=ErrPos; GotoX; repeat Read(Kbd,Ch); if UpperCase then Ch:=UpCase(Ch); case Ch of ^[: begin S:=chr($FF); { abort editing } Ch:=^M; end; ^D: begin { Move cursor right } X:=X+1; if (X>length(S)+1) or (X>MAX) then X:=X-1; GotoX; end; ^G: begin { Delete right char } if X<=Length(S) then begin Delete(S,X,1); Write(copy(S,X,Length(S)-X+1),' '); write(Ch); if X=length(S) then S:=S+Ch else S[X]:=Ch; end; if Length(S)+1<=MAX then X:=X+1 else OkChars:=[]; { Line too Long } GotoX; end else if Length(S)+1<=Max then OkChars:= [' '..'}']; { Line ok again } end; end; until CH=^M; end; {.PA} procedure GetCell(FX: ScreenIndex;FY: Integer); var S: AnyString; NewStat: Set of Attributes; ErrorPosition: Integer; I: ScreenIndex; Result: Real; Abort: Boolean; IsForm: Boolean; { Procedure ClearCells clears the current cell and its associated } { cells. An associated cell is a cell overwritten by data from the } { current cell. The data can be text in which case the cell has the } { attribute "OverWritten". If the data is a result from an expression} { and the field with is larger tahn 11 then the cell is "Locked" } procedure ClearCells; begin  } procedure GetFormula; begin FlashType; repeat GetLine(S,1,24,70,ErrorPosition,True); if S<>Chr($FF) then begin Evaluate(IsForm,S,Result,ErrorPosition); if ErrorPosition<>0 then Flash(15,'Error at cursor'+^G,false) else Flash(15,' ',false); end; until (ErrorPosition=0) or (S=Chr($FF)); if IsForm then NewStat:=NewStat+[Formula]; end; {.CP20} { Procedure GetText calls the procedure GetLine with the current } { cells X,Y position as parameters. This means that text entering } { takes place direcly at the cells posion on the screen. } procedure GetText; begin FlashType; with Screen[FX,FY] do GetLine(S,XPos[FX],FY+1,70,ErrorPosition,False); end; {.CP20} { Procedure EditCell loads a copy of the current cells contents in } { in the variable S before calling either GetText or GetFormula. In } { this way no changes are made to the current cell.  GotoX; end; end; ^S,^H: begin { Move cursor left } X:=X-1; if X<1 then X:=1; GotoX; end; ^F: begin { Move cursor to end of line } X:=Length(S)+1; GotoX; end; ^A: begin { Move cursor to beginning of line } X:=1; GotoX; end; #127: begin { Delete left char } X:=X-1; if (Length(S)>0) and (X>0) then begin Delete(S,X,1); Write(copy(S,X,Length(S)-X+1),' '); GotoX; if X<1 then X:=1; end else X:=1; end; ^V: InsertOn:= not InsertOn; {.PA} else begin if Ch in OkChars then begin if InsertOn then begin insert(Ch,S,X); Write(copy(S,X,Length(S)-X+1),' '); end else begin  I:=FX; repeat with Screen[I,FY] do begin GotoXY(XPos[I],FY+1); write(' '); I:=Succ(I); end; until ([OverWritten,Locked]*Screen[I,FY].CellStatus=[]); { Cell is not OVerWritten not Locked } end; {.CP20} { The new type of the cell is flashed at the bottom of the screen } { Notice that a constant of type array is used to indicate the type } procedure FlashType; begin HighVideo; GotoXY(5,23); LowVideo; end; {.CP20} { Procedure GetFormula repeats calling the procedure GetLine and } { Evaluate until the line read by GetLine contains a valid formula. } { Evaluate returns an error position in the string evaluated. If } { this position is non zero GetLine is called. If the user types } { ESC in GetLine to abort the editing then the string returned from } { Getline will contain $FF and te original value of the cell will } { be restored later.  } procedure EditCell; begin with Screen[FX,FY] do begin S:=Contents; if Txt in CellStatus then GetText else GetFormula; end; end; {.PA} { Procedure UpdateCells is a little more complicated. Basically it } { makes sure to tag and untag cells which has been overwritten or } { cleared from data from another cell. It also updates the current } { with the new type and the contents which still is in the temporaly } { variable "S". } procedure UpdateCells; var Flength: Integer; begin Screen[FX,FY].Contents:=S; if Txt in NewStat {Screen[FX,FY].CellStatus} then begin I:=FX; FLength:=Length(S); repeat I:=Succ(I); with Screen[I,FY] do begin FLength:=Flength-11; if (Flength>0) then begin CellStatus:=[Overwritten,Txt]; Contents:=''; end else begin ariable "S" with the last read character. It then depending on } { this character calls GetFormula, GetText, or EditCell. } begin { procedure GetCell } S:=Ch; ErrorPosition:=0; Abort:=false; NewStat:=[]; if Ch in ['0'..'9','+','-','.','(',')'] then begin NewStat:=[Constant]; if not (Formula in Screen[FX,FY].CellStatus) then begin GotoXY(11,24); ClrEol; ClearCells; GetFormula; end else begin Flash(15,'Edit formula Y/N?',true); repeat read(Kbd,Ch) until UpCase(CH) in ['Y','N']; Flash(15,' ',false); if UpCase(Ch)='Y' then EditCell Else Abort:=true; end; end else begin if Ch=^[ then begin NewStat:=(Screen[FX,FY].CellStatus)*[Txt,Constant]; EditCell; end else begin if formula in Screen[FX,FY].CellStatus then begin Flash(15,'Edit formula Y/N?',true); repeat read(Kbd,Ch) until UpCase(CH) in ['Y','N']; Flash(15,' end; until (I>=Max) or (Ch=^M); if I>Max then I:=Max; end; begin HighVideo; Msg('Format: Enter number of decimals (Max 11): '); GetInt(DEC,11); Msg('Enter Cell whith remember if larger than 10 next column will lock: '); GetInt(FW,20); Msg('From which line in column '+FX+': '); GetInt(FromLine,FYMax); Msg('To which line in column '+FX+': '); GetInt(ToLine,FYMax); if FW>10 then Lock:=true else Lock:=False; for J:=FromLine to ToLine do begin Screen[FX,J].DEC:=DEC; Screen[FX,J].FW:=FW; with Screen[Succ(FX),J] do begin if Lock then begin CellStatus:=CellStatus+[Locked,Txt]; Contents:=''; end else CellStatus:=CellStatus-[Locked]; end; end; NormVideo; UpDate; GotoCell(FX,FY); end; Video; UpDate; GotoCell(FX,FY); end;  if OverWritten in CellStatus then begin CellStatus:=[Txt]; GotoCell(I,FY);LeaveCell(I,FY); end; end; end; until (I=FXMax) or (Screen[I,FY].Contents<>''); Screen[FX,FY].CellStatus:=[Txt]; end else { string changed to formula or constant } begin { Event number two } I:=FX; repeat with Screen[I,FY] do begin if OverWritten in CellStatus then begin CellStatus:=[Txt]; Contents:=''; end; I:=Succ(I); end; until not (OverWritten in Screen[I,FY].CellStatus); with Screen[FX,FY] do begin CellStatus:=[Constant]; if IsForm then CellStatus:=CellStatus+[Formula]; Value:=Result; end; end; end; {.PA} { Procedure GetCell finnaly starts here. This procedure uses all } { all the above local procedures. First it initializes the temporaly } { v ',false); if UpCase(Ch)='Y' then EditCell Else Abort:=true; end else begin NewStat:=[Txt]; ClearCells; GetText; end; end; end; if not Abort then begin if S<>Chr($FF) then UpDateCells; GotoCell(FX,FY); if AutoCalc and (Constant in Screen[FX,FY].CellStatus) then Recalculate; if Txt in NewStat then begin GotoXY(3,FY+1); Clreol; For I:='A' to FXMax do LeaveCell(I,FY); end; end; Flash(15,' ',False); GotoCell(FX,FY); end; {.PA} { Procedure Format is used to } procedure Format; var J,FW,DEC, FromLine,ToLine: integer; Lock: Boolean; procedure GetInt(var I: integer; Max: Integer); var S: string[8]; Err: Integer; Ch: Char; begin S:=''; repeat repeat Read(Kbd,Ch) until Ch in ['0'..'9','-',^M]; if Ch<>^M then begin Write(Ch); S:=S+Ch; Val(S,I,Err); isabled). * Print the spread sheet on the printer. * Clear the current spread sheet. The spread sheet is an electronic piece of paper on which you can enter text, numbers and formulas and have MicroCalc do calcula- tions automatically. The next page shows the electronic spread sheet. .PA ---------------------------------------------------------------- A B C D .... 1 22.00 2 1.00 3 2.00 4 3.00 5 28.00 . . A 5 Formula: (A1+A2+A3+A4+A5) ----------------------------------------------------------------- In the example the next last line shows that the active cell is cell A5 and that A5 contains a formula: (A1+A2+A3+A4) which means that the numbers in A1,A2,A3 and A4 should be added and placed in A5. The formula can be abbreviated to: (A1>A4) meaning: add all cells from A1 to A4. .PA You move the cursor around just like you do in the TURBO editor: (Up) tween fields: ^S,^D,^E,^X move left right up and down. When editing a field ^S,^D moves left and right. ^A,^F moves to beginning/end of line. DEL,^G deletes left or right character. ESC makes it possible to regret changes and to edit an existing cell. .PA Summary of commands / will restore the screen Q will Quit MicroCalc L will Load a spread sheet from the disk. S will Save a spread sheet on the disk. R will Recalculate P will Print the spread sheet. F makes it possible to change the output format for numbers. A switches Autocalc ON and OFF Note: to use scientific notation use the the F command and enter minus one -1 for the number of decimals. .PA EXAMPLES The following are examples of valid cell formulas: A1+(B2-C7) subtract cell C7 from B2 and add the result to cell A1 (A1>A23) the sum of cells: A1,A2,A3..A23  INTRODUCTION MicroCalc is a tiny spread sheet program a la VisiCalc. It is provided with the TURBO-Pascal system as an example program. Since MicroCalc is only a demonstation program it has its limita- tions (which you may have fun eliminating): * You cannot copy formulas from one cell to others. * You cannot insert and delete lines or columns. In spite of its limitations MicroCalc does provide some interest- ing features among which are: * 11 digits floating point reals (Thanks to TURBO Pascal!) * Full set of mathematical functions (SIN,COS,LN,EXP etc.) * Built in line editor for text and formula editing. * Text can be entered across cells. * Once entered a formula is protected from accidental erasure. .PA In addition to this MicroCalc offers all the usual features of a spread sheet program: * Load a spread sheet from the disk. * Save a spread sheet on the disk. * Automatic recalculation after each entry. (May be d Ctrl-E (Left) Ctrl-S Ctrl-G (Right) Ctrl-X (Down) A cell may contain a number, a formula or some text. The type of of the cell and its coordinates are shown in the bottom left corner of the screen: A 5 Formula: (Means that the current cell is A5 and that it contains a formula) A 1 Text (Cell A1 contains text) A 2 Numeric (Cell A2 contains a number and no cell references) .PA Summary of MicroCalc Cells are denoted A1 through G21 giving a total of 147 cells. Summary of standard functions and operators: SIN, COS, ARCT, ABS, FACT, EXP, LN, +,-,/,* Futhermore the operator '>' can be used to denote a range of cells to add. Entering data To enter data in any field move the cursor to the cell and enter the data. MicroCalc automatically determines if the field is numeric or a a text field. When moving be(A1>B5) the sum of cells: A1..A5 and B1..B5 The formulas may be as complicated as you want:  SIN(A1)*COS(A2)/((1.2*A8)+LN(FACT(A8)+8.9E-3))+(C1>C5) To edit an existing formula or text simply move to the cell and press ESC, make your changes and press . If you make a mistake you may press ESC again, the old value of the cell will then be restored. To try MicroCalc now you may use the /L command and load the file: CALCDEMO.  try MicroCalc now you may use the /L command and load the file: CALCDEMO. . A switches Autocalc ON and OFF Note: to use scientific notation use the the F command and enter minus one -1 for the number of decimals. .PA EXAMPLES The following are examples of valid cell formulas: A1+(B2-C7) subtract cell C7 from B2 and add the result to cell A1 (A1>A23) the sum of cells: A1,A2,A3..A23 P To: B. Osss S: string[8]; Err: Integer; Ch: Char; b  From: O. P. Timistt (B3) kjhlkjfdsahfsdalkjhfksjhdafkjldshfalkjdsaf skajfs 034909 D As you requested I have compiled a sales budget for our three major E products covering next year by quaters. I have assumed an increase d > of 20% every quater for Super A and 10 pct for Super B and C. 1;r;r;r;r;r;r; A Product 1. Quater 2. Quater 3. Quater 4. Quater Year Totalal C -------------------------------------------------------  Super Adfskjdfskjlkjljlsafjfshdkljhfdsjfhkjfdkljfakljakjhkjlhfds  Super Bl{kjdl{kds{lkdjs{lksdjf{ldksfaj{lkdjsfl{kdjf{lkdjf 335  (A8)+A4 23 54 45dskdklfklfkldsalkdsfdklklfdlkfd !330fllkfdasklfkskfld !23308 !220000 45 # (B12>B14) 34 4l{kdjf{lkjfd  Super C A -------------------------------------------------------  Year total B =====================================================  22 B To simulate sales just change the numbers for the first quater.  (A1>A19) kjdsflkdjsalkdjfsklj{fdlkjfsdflk{dfl{kjdfkljsdkljsfkljsflkjsdkljfsdlkj 3 2354 (C3+A3+C3) 22 33 34 34 34 23 325 400 3332 11 33 35 (C3>C6) 32 23 32 543 45 345 3254 3 435 23 23 4 # (C12*1.2)Ez> # (C13*1.1): ף^ # (C14*1.1) l|{dsfa{dsf{l|dsa{lds{lfd{lkfd 32 32 23 43 # (D12*1.2)td # (D13*1.1)>lt # (D14*1.1)F7Aj 435 # (E12>E14)*i 3 43 34 23 # (B12*1.2)efff # (B13*1.1)efffJ # (B14*1.1)A 435 # (C12>C14)13332 34 43 34 43 43 2YT 435 # (D12>D14)ףK 34 43 34 34 32 223 324 253 23 3454 234  43 32 23 32 543 435 54 543 (A1) 43 2 Year totalj k; IL ĵMANELIF  GNIRTSoo& oo&HGIREVOMoow%UEVOMoo$WODEVO ooG$TADPU#FjF)ooY#LECEVAEL"GjG) ECOTOGoo !PYTHSALFoox AELCooI ooIRGooiTUA&NILB kFjooSA ooSM k*LACOTUA 0 +LIFCM j۸ F )޸F ߸EERCS )j OPX -)    LLEC P  E12) jFMUS jFE jFEDLO Skƈ/$1 # (B13>E13)jȱ jʱEj̱1EMANNOITCNUFDRADNATS ~j|U # (B14>E14)SILNOITCNUFDRADNATS   CAFF XEF X94L FLF ATCRAF j1TGNELFooMELLECETAD # (F12>F14)LECTIDEooDXETTEGooC jC jL@  jAMj  AMjjjF FooOETNECooOMOCLLEWooMDNAMMOC oJAMROF!FjF)ooBLECTEG?SACREPPU kOPRRE NLOCjFoo>NILTEGoo=TALUCLACERAOPRRE LUMROFFLUMROFSI kooc1TAULAVE k+ROFo oo+NIRPoo)AOLoo )VAS-PYTEL Foo(MANELIFTEGELIFF^ k'SIXE e!I P  O kUPNI kOC kRT kBK kSL k kSU kELFUBjTPPAEHjTPRUCERjTPTSN TPNINOCjTPTUONOCjTPTUOTSLjTPNIXUAj jTPNIRSUjTPTUORSU SYSLIST 90.08,Gy} 0( x!^~ ( (|!0o) h4GhG4GG Gh4G@G GGG22" x!^~ ( (|!0o) h4GhG4GG Gh4G@G GGG22" x!^~!"#$%&'