IMD 1.18: 22/01/1996 8:11:10 micro cornucopia kaypro user group disk 46     46-DISK DOCCLKDEMO COMS CLKDEMO PAS)CLOCK84 BOX.GRAFIX BOX GRAFIX M4P'!"#$%GRFDEMO COMQ&'()*+,-./0GRFDEMO PAS'12345INLINE COML6789:;<=>?INLINE DOC@ABINLINE PAS,CDEFGHKAYPRO84BOX IJSCREEN COMKLMNOPQRSTUVWXYZSCREEN COM[SCREEN DOC\]^_SCREEN PAS`abcdefghijklmno KAYPRO DISK K-46 PASCAL RUNOFF - TURBO UTILITIES Here we go with a set of utilities designed to ease your life as a Turbo Pascal programmer. These are some real gems from our Turbo Pascal Runoff, so enjoy! Source is included for all programs. Some of the files on this disk have been squeezed. So before you do anything else, any file with a 'Q' as the second letter of the extension should be unsqueezed as in the following example: SCREEN PASpqrSETCLOCKCOMGstuvwxyz{TRUN DOC;|}~TRUN28 COMKTRUN28 PAS&TRUN2C COMKTRUN2C PAS&TRUN3 COMLTRUN3 PASVIDDEMO COMEVIDDEMO PAS VIDEO84 BOX USQ CLOCK84.BQX d: The unsqueezed file will be redirected to drive d:. If d: is not specified, USQ will write to the current drive. Since the unsqueezed files take up so much room you'll want to unsqueeze them to another disk, especially if all you have are single sided drives. ______________________________________________________________________________ 84TOOLBOX - This group of files demonstrates how to control the video and real time clock capabilities   of the 84 series Kaypros. Take a look at CLKDEMO, CLOCK84, GRAFIX, GRFDEMO, KAYPRO84, SETCLOCK, VIDDEMO, and VIDEO84. INLINE - Turbo's facility for use of inline machine code can really speed up your programs. Unfortunately, inline code is a pain to write. INLINE solves this problem by creating an inline statement using the PRN file generated by either the Z80MR or ASM assembler. SCREEN - Generating a menu or any nicely formatted screen output is a trying experience. You try this and try tH\<z5+)+<z {0Gɯgo||H}||/g}/o#}o&K[xAJSJDM!b"!6J"DM'ͬͬdͬ ͬ} wͦWͧ _}8(8J`9{T]=o`9y 28!?"9!!>2 :D]SXN]D [ (!e}̈́A8Q0G: x@!\w# (   yV. V!h6# (*(.(!8}(*(̈́w#>?> w#a{ |͒}͛Ɛ'@'7||}>"C"6# ""͐ͩ*B"[R5*"^#V#a}.; OJ , ; !U >,k- o&0%,` }g; }؉}颋.:}8c~I$I~L*kٷx˸; }0G,͙<},-(-J ! >0 a` o8 Oþ >um.`1pF,t6|!wS<.z}[|%FXc~ur1}Oٯx(<˸ͨ 8; !~Jͨ 0O!><ͨ 8 =  7 <` O ; 7 0 W-J OT0 j oD,:j !I}袋.}8c~I$I~L!>hat until it looks right. With SCREEN's editor you can fiddle with a menu until it's just what you want, then hit ESC and a procedure to print the menu is created. TRUN - Each COM file generated by Turbo Pascal has an 8K run time library attached. If you have a lot of small programs this 8K overhead for each one can add up to a bunch of wasted disk space. TRUN solves this problem by allowing execution of chain files (no run time library). xW^8/w >uJ u` }>(; xQ }} ˸T}ٕ(0D=C ,= ( [ 0%D , 7 ͏ ?(8u x O - ; 8˸x X ,-xG}; }م 9; .>#n0[ D = - nx P ,-(-˸G,-; }ٕ? 9.>͏ 8u ?= u+-(>O 0u O 8^#V#N#FO/o&9O/o&9!9(> (G!9 w#E͊w}8uRB0 >R@RR!+ͨ z R!+ͨ z <!+ͨ z <!+ͨ z <!#ͨ z <!+ͨ z T]KB!z> S>))0 = |JJDMgo>jB0 7?= u` ` 77 ` = O nf^VNF!DLT\I!!53!r1!\!> x #-= o˸xO(- }(x>8(C ,C `iM!>u|; |J>| )=|(DMbo˸ͦ88ͦx(0 8> Mx(>-Ͳ{(ay(Ͱͦ \z(>.Ͳ (Ͱ ~ͦ{>EͲ>+|(|Dg>-Ͳ|/ 0:p# ~# +>0w#,-  60#J˸}րogM| .ͫCopyright (C) 1984 BORLAND IncAKayproDelete2/920/92P= ERT###&&&~7#~=% o&ͦoͦܐԩͣ}!!"8~#(}:$= +*!Z!*B!!:(=2!Z: <2!!!:O::O:!*B͏ ?x P , 78ƀ8ƀ8ox٨!دoGOW_gɷɷ|لg{ً_zيWyىOxوG|ٔg{ٛ_zٚWyٙOx٘Gxٸyٹzٺ{ٻ|ټx٨ xx(ͼ ?}ٽÏ }ց; <(; 7D = |٤g{٣_z٢Wy١Ox٠GD u J }x>uu}ƀ/ƀo; -J }0W-J W,}l˸ͨ 8 ; ` x( -ͨ 8J -ͨ 8,J }l8;*!` ! >u` ` u--- J ,,,-xGg?+2n*8t z~,->uxu  (C = ~> x0w#xG%P %P ZJDM%P = _~65i+~hìx-Sx9?+{Η@}|C C gZJDM0D ,7}o˸  #yO!@9i&   # w# /w#*###w* N#FB ͟r+s> !T]>)j)0 0= UR!#U*^#V#N#F#^#V>">!2DM"~x(L* :O(o:" C}=( ?*-N#Fp+qq#p! * F+N+++V+^Bq#p>>> SRѷR* s#r$ s#r"S"! N#FB(^x * 6#[<(H*! Kq#p##K[! *! 4 #4! x *$ *>w""{_!"*nf}(HR0nf" ^VMDnfutqp J= B== ͯ}8= ͵}/ͭ !*###~-_~(4Q6*>2>*##w:>*##~*#~(E[ ( ( ( !][ ( ( ((w#(6!]~-#8~>7  [>OkͼMs #rkͼpX á[ [ (( #w(q*#~[ (  *##~6͜O$*#~(08ʦ=ʦ==ʩ=ʬò+###~-_q46͡> *:4^q}Ò*|(ŔPress any key to Exitb! Bc!!w` *w&RX! Sunday !iͲ!"Rz! Monday !iͲ!"Rœ! Tuesday !iͲ!"R¾! Wednesday !iͲ!"R! Thursday !iͲ!"R" Friday !iͲ!"R!" Saturday !iͲ!#! !i R!qb!!x` *x&Rn" January !_Ͳ#R" February !_Ͳ#R²" March !_Ͳ#R" April !_Ͳ#R" May !_Ͳ#R# w#!9! E9!!9~(+F͊!"9!(#>2*Ͳ"|>" :( ͆ *6#w*6#6 !\$![ (̈́( #:~CONTRMKBDLSTAUXUSR>2$*#~ Ͷ$*:> >w###6  #6++p>2S-$Ͷ:*6###ww#w$w#w: ##N#F*B> w#w#[s#r>2S$Ͷ$*6 #-Nw#Fwq#p#6#w#w#w* :( ͒*s#r*s#r"* 5KB!>u~#fo{_"*R0RnfR0KqputsrNF( ^VNF^V*SutKqp R*R(~w~wnf ut"6# * *!""*NFy(* "*B0Cnf* [R*"*RS[s#r^#VS>O"w2x2!"" @*>2"!"""!\Ͳ*: !~6go(\R*s#r_2x( s xM|( M6-#͐ͦ[R8 (G> ͒C~͒#*ͦC!h !lTRUEFALSEͦ!9^#(~#(G~͒#> ͒> Ò "F![(#RR0*4#4> RR *4 #4(>>2$*V(/˖:(#~+ x y2!͵( =( X:(R*:(###~-_-͌X> :("͟"*^˞*V˖0 SRѷR8A* N#F#s#r$ 0})jS\ June !_Ͳ#R:# July !_Ͳ#R\# August !_Ͳ# R~# September !_Ͳ# R # October !_Ͳ# R# November !_Ͳ# R# December !_Ͳ!!w` !"! !_ R!q! *w&!b!$!*x&R!!/*w&!́/85b!!v` !!5z-%}2{!!u` !!5z"%}2z!!t` !!5z%}2y!!s` !#!*v&R!!:*u&!!:*t&!!.*s: *^ F* < >26"~͟*-w#ww#͟"~ <@*Ͳ!\  <ʮ!\$> >2*|>! * \$\<(!: [1Á\!(f"> 2:!<"F( #~#6e>!["N>!~8>O6*"w (=(&("( :(N 8y(~#x+% (6*#~[*#~ *~(h#"b=  8(T]DMR0 -a%}̈́o*!~6o&͠|ͣ}%^C User break1:% I/O% Run-time% error ͒%, PC=[R"͍% Program aborted*1!͍!O*@Ͳ!)}2\}2]!"!i*\&!  ͧ"V*\&! *VR"T!*V*T}2\! *]&i!$*\&i"Q}2S!"!i! *S&i!$Mh*Qs*Qn&! ͧ"K*Qn&!*KR"I! *K*I*QscR!!C!4b!!   &!b*y&#å$*z&#Å$*{&#e$͠EO$R!!B!4bc!!ŔSet Clock Procedureb!!ŔPlease answer the following:b!!Ŕ"Month : 1 = Januaryb!.!R!:b!-!Ŕ 12 = Decemberb!!!@+b*@&Q!! kE&!*@&!! ŔDay of Month : 1 . . 31͐b!&! !@+b*@&Q!!kEʉ&!*@&!! Ŕ!Day of Week : 1 = Sundayb!.es that can be used with the clock procedures in CLOCK84.BOX } Var I,J,K, NMonth,NDay, Hour,Minute, Second,Hundreth : byte; ADay,AMonth : string[9]; Selection : char; {$I clock84.box} Procedure ReadtheClock; Begin ClrScr; Write(Chr(27),chr(67),chr(52)); GotoXY(29,10); Write('Press any key to Exit'); Delay(3000);  ',NDay:2); GotoXY(36,16); Write(NMonth:2,'/',NDay:2,'/85'); Repeat ReadClock(4,Hour); For I := 1 to 5 do Begin ReadClock(3,Minute); For J := 1 to 4 do Begin ReadClock(2,Second); For K := 1 to 6 do Begin ReadClock(1,Hundreth); GotoXY(35,20); ! R!:b!.!Ŕ 7 = Saturdayb!%! !@+b*@&Q!!kE2'!*@&!!ŔHour : 0 . . 23͐b!!!@+b*@&Q!!kEʦ'!*@&!!ŔPlease enter the next minuteb!!Ŕand when the second handb!!Ŕ reaches 12b!!Ŕ!Next Minute : 0 . . 59b!%!!@+b*@&Q!!;kEʘ(! !i!$!i! !i!$!i!*@&c ClrScr; ReadClock(5,NDay); Case NDay of 1 : ADay := ' Sunday'; 2 : ADay := ' Monday'; 3 : ADay := ' Tuesday'; 4 : ADay := 'Wednesday'; 5 : ADay := ' Thursday'; 6 : ADay := ' Friday'; 7 : ADay := ' Saturday'; End; GotoXY(35,10); Write(ADay); ReadClock(7,NMonth); Case NMonth of 1 : AMonth := ' January'; 2 : AMonth : { * * * * * * * * * * * * * * * * * * * * * * * * * * * * Clock Demonstration * * * * Jack E. Heiss * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This program is a demonstration of some of the programming techniqu Write(Hour:2,':',Minute:2,':',Second:2,'.',Hundreth:2); End; End; End; until KeyPressed; Write(Chr(27),chr(66),chr(52)); End; Procedure SettheClock; Var Time : byte ; Begin ClrScr; GotoXY(26,2); Write('Set Clock Procedure'); GotoXY(26,4); Write('Please answer the following:'); GotoXY(23,6); Write('Month : Ŕ Clock Set͐bR͐bc!! ŔDo you wish tob!! Ŕ 1. Read the Clockb!! Ŕ 2. Set the Clockb!! Ŕ 3. Return to CP/Mb!!Ŕ Please Select : b!8!^b*^&Q!1a!2a!3aE)*^&1R** 7*2R7*N%*^&!3NE!)c Please Select : b!8!^b*^&Q!1= ' February'; 3 : AMonth := ' March'; 4 : AMonth := ' April'; 5 : AMonth := ' May'; 6 : AMonth := ' June'; 7 : AMonth := ' July'; 8 : AMonth := ' August'; 9 : AMonth := 'September'; 10 : AMonth := ' October'; 11 : AMonth := ' November'; 12 : AMonth := ' December'; End; ReadClock(6,NDay); Gotoxy(34,12); Write(AMonth,'   1 = January'); GotoXY(46,7); Write(':'); GotoXY(45,8); Write('12 = December'); Repeat GotoXY(31,6); Read(Time); until Time in [1..12]; SetClock(7,Time); GotoXY(23,10); Writeln('Day of Month : 1 . . 31'); Repeat GotoXY(38,10); Read(Time); until Time in [1..31]; SetClock(6,Time); GotoXY(23,12); Write('Day o Writeln; End; {MAIN PROGRAM} Begin Repeat ClrScr; GotoXY(30,10); Write('Do you wish to'); GotoXY(30,11); Write(' 1. Read the Clock'); GotoXY(30,12); Write(' 2. Set the Clock'); GotoXY(30,13); Write(' 3. Return to CP/M'); GotoXY(30,15); Write(' Please Select : '); Repeat Read(Kbd,Selection); until Selection in ['1','2','3']; Case Selection of '1' : ReadtheClock; '2' : Se * * Procedure for Setting * * the Clock * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Procedure SetClock(parameter1,parameter2) - A call to SetClock will set the Kaypro's internal clock. The time attribute is sent as parameter1. Parameter1 must be of type compatible with byte af Week : 1 = Sunday'); GotoXY(46,13); Write(':'); GotoXY(46,14); Write('7 = Saturday'); Repeat GotoXY(37,12); Read(Time); until Time in [1..7]; SetClock(5,Time); GotoXY(23,16); Writeln('Hour : 0 . . 23'); Repeat GotoXY(30,16); Read(Time); until Time in [0..23]; SetClock(4,Time); GotoXY(23,18); Write( { * * * * * * * * * * * * * * * * * * * * * * * * * * * * Procedures * * for the * * Real Time Clock * * in * * TurboPASCAL * * for the * * ttheClock; End; until Selection = '3'; ClrScr; End.nd in the set [1..7] in accordance with the following table: 7 = Month 6 = Day of Month 5 = Day of Week 4 = Hour 3 = Minute 2 = Second 1 = Hundreth The current time is passed as parameter2. Parameter2 must be of type byte and in the proper set of values for the given attribute. No variables need b'Please enter the next minute'); GotoXY(23,19); Write('and when the second hand'); GotoXY(23,20); Write('reaches 12'); GotoXY(23,22); Write('Next Minute : 0 . . 59'); Repeat GotoXY(37,22); Read(Time) until Time in [0..59]; Port[32] := 1; Port[36] := 0; Port[32] := 2; Port[36] := 0; SetClock(3,Time); ClrScr; Writeln('Clock Set');  KAYPRO Universal Board * * * * Jack E. Heiss * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Procedures available in this Include file: SetClock(parameter1,parameter2); ReadClock(parameter,variable); * * * * * * * * * * * * * * * * * * * * * * * * * * *   e declared in the calling program. Acceptable values for parameter are as follows: Parameter 1 Parameter 2 7 (Month) 1..12 where 1 = January : 12 = December 6 (Day of Month) 1..31 5 (Day of Week) 1..7 where 1 =  accordance with the following table: Time Attribute Value Ranges (parameter) (variable) 7 = Month 1 = January : : 12 = December 6 = Day of Month 1..31 5 = Day of Week 1 = Sunday : : * * * * * * * * * * Procedure ReadClock(parameter,variable) - A call to ReadClock(parameter,variable) will return the byte value of the clocks content. The value is returned as the variable named in the passed parameter. The variable must be declared in the calling program as a byte. The parameter tells the procedure which component of time to read. The parameter in the procedure call must be byte compatible and in accord with the following attribute table { * * * * * * * * * * * * * * * * * * * * * * * * * * * * Simple Screen Graphics * * Procedures * * in * * TurboPASCAL * * for the * * KAYPRO Universal Board * * Sunday : 7 = Saturday 4 (Hour) 0..23 3 (Minute) 0..59 2 (Second) 0..59 1 (Hundreth) 0..99 } Procedure SetClock(Attribute,TimeValue :byte); Var DecHex,UnitHex : integer; Begin Port[34] := 15; DecHex := Trunc(TimeValue / 10); UnitH 7 = Saturday 4 = Hour 0..23 3 = Minute 0..59 2 = Seconds 0..59 1 = Hundreths 0..99 } Procedure ReadClock(Attribute : byte; var Clockvalue : byte); Var DecHex,UnitHex : integer; Begin Port[34] := 15; Port[32] := Attribute; ClockValue := Port[36]; : Month = 7 Day of Month = 6 Day of Week = 5 Hour = 4 Minute = 3 Second = 2 Hundreth = 1 ReadClock(parameter,variable) is the most primitve but fastest of the calls and is the procedure of choice for timing activities. Clock output in the passed variable name is an byte in * * Jack E. Heiss * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Procedures available in this Include file: DrawLine( Xparameter1,Yparameter1, Xparameter2,Yparameter2); EraseLine( Xparameter1,Yparameter1, Xparameter2,Yparameter2); DrawPoint( Xparameter,Yparameter); ex := TimeValue - 10 * DecHex; TimeValue := 16 * DecHex + UnitHex; Port[32] := Attribute; Port[36] := TimeValue; End; { * * * * * * * * * * * * * * * * * * * * * * * * * * * * Procedure for Reading * * the Clock * * * * * * * * * * * * * * * * * * *  DecHex := Trunc(ClockValue / 16); UnitHex := ClockValue - 16 * DecHex; ClockValue := 10 * DecHex + UnitHex End; {End of Clock84.box}    ErasePoint(Xparameter,Yparameter); The passed parameters passed to these procedures are of type real. The acceptable ranges for the parameters are: X parameters 0..159.99 Y parameters 0...99.99 The origin of the screen coordinates are in the lower left hand corner. 99.99 | | | | Y-axis | | | |  h1 := xb1 + 32; h2 := xb2 + 32; v1 := 131 - yb1; v2 := 131 - yb2; Write(chr(27),chr(68),chr(v1),chr(h1),chr(v2),chr(h2)); End; {Procedure DrawPoint - turns on the pixel at coordinates x,y.} Procedure DrawPoint(x,y : real); Var v,h, xb,yb : byte; Begin xb := trunc(x); yb := trunc(y); h := xb + 32; v := 131 - yb; Write(chr(27),chr(42),chr(v),chr(h)); End; {Procedure ErasePoint - erases the pixel at coord ErasePoint(Xparameter,Yparameter); The passed parameters passed to these procedures are of type real. The acceptable ranges for the parameters are: X parameters 0..159.99 Y parameters 0...99.99 The origin of the screen coordinates are in the lower left hand corner. 99.99 | | | | Y-axis | | | |  | 0.00 |_______________________________________ 0.00 159.99 X-axis } {Procedure Drawline - draws a line from coordinates x1,y1 to coordinates x2,y2.} Procedure DrawLine(x1,y1,x2,y2 : real); Var v1,h1,v2,h2, xb1,yb1,xb2,yb2 : byte; Begin xb1 := trunc(x1); yb1 := trunc(y1); xb2 := trunc(x { * * * * * * * * * * * * * * * * * * * * * * * * * * * * Simple Screen Graphics * * Procedures * * in * * TurboPASCAL * * for the * * KAYPRO Universal Board * * inates x,y.} Procedure ErasePoint(x,y : real); Var v,h, xb,yb : byte; Begin xb := trunc(x); yb := trunc(y); h := xb + 32; v := 131 - yb; Write(chr(27),chr(32),chr(v),chr(h)); End; {End of Grafix84.box} | 0.00 |_______________________________________ 0.00 159.99 X-axis } var color: integer; PROCEDURE BEIDE; BEGIN PORT[131]:=253; END; PROCEDURE HIRES; BEGIN PORT[131]:=255; END; PROCEDURE TEXTMODE; BEGIN PORT[131]:=252; END; PROCEDURE CLSH; BEGIN INLINE 2); yb2 := trunc(y2); h1 := xb1 + 32; h2 := xb2 + 32; v1 := 131 - yb1; v2 := 131 - yb2; Write(chr(27),chr(76),chr(v1),chr(h1),chr(v2),chr(h2)); End; {Procedure EraseLine - erases a line or any pixel on the line from coordinates x1,y1 to coordinates x2,y2.} Procedure EraseLine(x1,y1,x2,y2 : real); Var v1,h1,v2,h2, xb1,yb1,xb2,yb2 : byte; Begin xb1 := trunc(x1); yb1 := trunc(y1); xb2 := trunc(x2); yb2 := trunc(y2);  * * Jack E. Heiss * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Procedures available in this Include file: DrawLine( Xparameter1,Yparameter1, Xparameter2,Yparameter2); EraseLine( Xparameter1,Yparameter1, Xparameter2,Yparameter2); DrawPoint( Xparameter,Yparameter);   ($3E/$75/$D3/$83/$0E/$00/$79/$D3/$80/$AF/$D3/$81/$06/$F0/$D3/$82/$10/ $FC/$0C/$79/$FE/$50/$20/$EE); END; PROCEDURE DRAW(x1,y1,x2,y2:integer); var y_1,y_2 : integer; BEGIN y_1:=239-y1; y_2:=239-y2; INLINE ( $2A/x2/$ED/$5B/x1/$CD/*+$00BF/$22/*+$010A/$ED/$43/*+$010A/$7C/$B5/$2A/y_2/$ED/ $5B/y_1/$CD/*+$00AC/$22/*+$00F9/$ED/$43/*+$00F9/$B4/$B5/$CA/*+$0103/$AF/$32/ *+$00F6/$2A/*+$00E7/$ED/$5B/*+$00E5/$ED/$52/$30/$0A/$2A/*+$00DE/$3E/$01/$32/ *+$00E3/$18/$03/$2A/*+$00D2/$22/*+$00D7/$CB/ color:=1; a:=trunc(x*4); b:=trunc(y*2.4); plot(a,b); end; {Procedure ErasePoint - erases the pixel at coordinates x,y.} Procedure ErasePoint(x,y : real); var a,b : integer; Begin color:=0; a:=trunc(x*4); b:=trunc(y*2.4); plot(a,b); end; {End of Grafix84.box}1,b1,a2,b2 : integer; Begin color:=1; a1:=trunc(x1*4);b1:=trunc(y1*2.4);a2:=trunc(x2*4);b2:=trunc(y2*2.4); draw(a1,b1,a2,b2); End; {Procedure EraseLine - erases a line or any pixel on the line from coordinates x1,y1 to coordinates x2,y2.} Procedure EraseLine(x1,y1,x2,y2 : real); var a1,b1,a2,b2 : integer; Begin color:=0; a1:=trunc(x1*4);b1:=trunc(y1*2.4);a2:=trunc(x2*4);b2:=trunc(y2*2.4); draw(a1,b1,a2,b2); End; PROCEDURE PLOT(X,^#V#N#FO/o&9O/o&9!9(> (G!9 w#E͊w}8uRB0 >R@RR!+ͨ z R!+ͨ z <!+ͨ z <!+ͨ z <!#ͨ z <!+ͨ z T]KB!z> S>))0 = |JJDMgo>jB0 7?= $3C/$CB/$1D/$22/*+$00D2/$CD/*+$0087 /$ED/$4B/*+$00C9/$03/$0B/$78/$B1/$CA/*+$00CF/$C5/$2A/*+$00C0/$3A/*+$00BF/$B7 /$28/$30/$ED/$5B/*+$00AC/$19/$22/*+$00B2/$B7/$ED/$5B/*+$00A5/$ED/$52/$38/$0E /$22/*+$00A6/$2A/x1/$ED/$5B/*+$0099/$19/$22/x1/$3A/y_1/$ED/$5B/*+$0090/$83 /$32/y_1/$CD/*+$0045/$C1/$18/$C0/$ED/$5B/*+$007E/$19/$22/*+$0082/$B7/$ED/$5B/ *+$0073/$ED/$52/$38/$0E/$22/*+$0076/$3A/y_1/$ED/$5B/*+$006B/$83/$32/y_1/$2A/x1/ $ED/$5B/*+$005E/$19/$22/x1/$CD/*+$0015/$C1/$18/$90/$B7/$01/$01/$00/$ED/$52 /$F0/$1ͫCopyright (C) 1984 BORLAND IncAKayproDelete2/920/92P= ERT###&&&~7#~=% o&ͦoͦܐԩͣ}!!"8~#(}:$= +*!Z!*B!!:(=2!Z: <2!!!:O::O:!*BY:INTEGER); var y_: integer; BEGIN y_:=239-y; INLINE ( $3A/Y_/$D3/$81/$2A/X/$7D/$E6/$07/$4F/$06/$00/$CB/$3C /$CB/$1D/$CB/$3C/$CB/$1D/$CB/$3D/$7D/$D3/$80/$21/*+$0024/$09 /$3A/COLOR/$47/$DB/$82/$04/$10/$07/$2F/$B6/$2F/$D3/$82/$18/$19 /$10/$03/$B6/$18/$F7/$10/$03/$AE/$18/$F2/$96/$20/$0C/$AF/$32/COLOR /$80/$40/$20/$10/$08/$04/$02/$01/$00) END; {Procedure DrawPoint - turns on the pixel at coordinates x,y.} Procedure DrawPoint(x,y : real); var a,b : integer; Begin H\<z5+)+<z {0Gɯgo||H}||/g}/o#}o&K[xAJSJDM!b"!6J"DM'ͬͬdͬ ͬ} wͦWͧ _}8(8J`9{T]=o`9y 28!?"9!!>2 :D]SXN]D [ (!e}̈́A8Q0G: x@!\w# (   yV. V!h6# (*(.(!8}(*(̈́w#>?> w#a{ |͒}͛Ɛ'@'7||}>"C"6# ""͐ͩ*B"[R5*"^#V#  xW^8/w >uJ u` }>(; xQ }} ˸T}ٕ(0D=C ,= ( [ 0%D , 7 ͏ ?(8u x O - ; 8˸x X ,-xG}; }م 9; .>#n0[ D = - nx P ,-(-˸G,-; }ٕ? 9.>͏ 8u ?= u+-(>O 0u O 8 w#!9! E9!!9~(+F͊!"9!(#>2*Ͳ"|>" :( ͆ *6#w*6#6 !\$![ (̈́( #:~CONTRMKBDLSTAUXUSR>2$*#~ Ͷ$*:> >w###6  #6++p>2S-$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p##K[! *! 4 #4! x *$ *>w""{_!"*nf}(HR0nf" ^VMDnfutqpa}.; OJ , ; !U >,k- o&0%,` }g; }؉}颋.:}8c~I$I~L*kٷx˸; }0G,͙<},-(-J ! >0 a` o8 Oþ >um.`1pF,t6|!wS<.z}[|%FXc~ur1}Oٯx(<˸ͨ 8; !~Jͨ 0O!><ͨ 8 =  7 <` O ; 7 0 W-J OT0 j oD,:j !I}袋.}8c~I$I~L!> J= B== ͯ}8= ͵}/ͭ !*###~-_~(4Q6*>2>*##w:>*##~*#~(E[ ( ( ( !][ ( ( ((w#(6!]~-#8~>7  [>OkͼMs #rkͼpX á[ [ (( #w(q*#~[ (  *##~6͜O$*#~(08ʦ=ʦ==ʩ=ʬò+###~-_q46͡> *:4^q}Ò*|(  *s#r*s#r"* 5KB!>u~#fo{_"*R0RnfR0KqputsrNF( ^VNF^V*SutKqp R*R(~w~wnf ut"6# * *!""*NFy(* "*B0Cnf* [R*"*RS[s#r^#VS>O"w2x2!"" @*>2"!"""!\Ͳ*: !~6go(\R*s#r_2x( s xn'!^!ͳ !d͡!j!X!p!^ͽ !j!X!v!d*W&! N!^!j}oE(!^!ͼ !d͡!j!X!p!^ͽ !j!X!v!d*W&!N!p!j}oEʞ(!p!ͼ !v͡!j!X!p!^ͽ !j!X!v!d*W&! N!p!j}oE6)!p!ͳ !v͡!j!X!p aboutb!! Ŕ/the screen. The Vector Keys must be configuredb!! Ŕ-as they came with CP/M. The P key toggles theb!!Ŕ)pen up and down. to end. Have Fun!b!!ŔAny Key to Startb!8!WbcR!!C!!b~"c!!v͡!!d͡!v!d͒!!8!Wb*W&!PN*W&!pN}oEʺ$*&Eʳ$!}2!v!j͡!d!X͡ú$!}2*&Eʮ&!v!p͡!d!^͡*W&! N!^!c { * * * * * * * * * * * * * * * * * * * * * * * * * * * * Graphics Demonstration * * * * " RUBER LINE " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This program demonstrates some of the programming techniques that c(T]DMR0 -a%}̈́o*!~6o&͠|ͣ}%^C User break1:% I/O% Run-time% error ͒%, PC=[R"͍% Program aborted*1!͍!j)Ͳ#!?͡!E͡!K͡!Q͡!Qͧ}26!Kͧ}25!Eͧ}24!?ͧ}23*6&! }29*4&! }27!*5&R}2:!*3&R}28R!!L*:&*9&*8&*7&b!͡!!͡!'͡!-͡!-ͧ}2!'ͧ}!^ͽ !j!X!v!d*W&!NER$cR!!B!!b!X!pj}oER%!^!ͳ !d͡!p!^"!p!d͒!*W&! N!^!j}oE%!^!ͼ !d͡!p!^"!p!d͒!*W&!N!p!j}oE:&!p!ͼ !v͡!p!^"!v!^͒!*W&! N!p!j}oEʮ&!p!ͳ !v͡!p!^"!v!^͒!*&}oE6)!v!p͡!d!^͡*W&! N!^!cj}oEan be uses with GRAFIX84.BOX, its also kinda fun. The vector are meant to be used in their 'stock' config- uration, that is: Up = ^K Left = ^H Down = ^J Right = ^L You might use Config to make the following changes to the Numeric Pad: _________ _________ _________ _________ | | | | | | | | | | | | ^K |2!!ͧ}2!ͧ}2*&! }2*&! }2!*&R}2!*&R}2R!!D*&*&*&*&b!͡! ͡! ͧ}2!ͧ}2*&! }2!*&R}2R!!**&*&b!͡!͡!ͧ}2!ͧ}2*&! }2!*&R}2R!! *&*&bc!!ŔR U B B E R L I N Eb!"! Ŕ Instructionsb!! Ŕ,Use the Vector Keys to move the Cursor   | | | | | | | |---------|---------|---------|---------| | | | | | | ^H | P | ^L | | | | | | | |---------|---------|---------|---------| | | | | | | | ^J | | | | | | | | |_________|__ ErasePoint(Xold,Yold); DrawPoint(Xnew,Yold); End; If (ConChar = ^L) and (Xold <> 159) then Begin Xnew := Xold + 1; ErasePoint(Xold,Yold); DrawPoint(Xnew,Yold); End; End; If not PenUp then Begin Xold := Xnew; Yold := Ynew; If (ConChar = ^K) and (Yold <> 99) then Begin Ynew := Yold + 1; EraseLine(Xnow,Ynow,Xold,Y Write('Any Key to Start'); Read(Kbd,ConChar); End; Begin ClrScr; Write(chr(27),'C',4); Intro; ClrScr; Xnew := 0; YNew := 0; DrawPoint(Xnew,Ynew); Repeat Read(Kbd,ConChar); If (Conchar = 'P') or (ConChar = 'p') then If PenUp then Begin PenUp := false; Xnow := Xnew; Ynow := Ynew; End else PenUp := true; If PenUp then Begin XoͫCopyright (C) 1984 BORLAND IncAKayproDelete2/920/92P= ERT###&&&~7#~=% o&ͦoͦܐԩͣ}!!"8~#(}:$= +*!Z!*B!!:(=2!Z: <2!!!:O::O:!*B_______|_________| | | | | | | | | | | | | | | | | | |___________________|_________|_________| } Const PenUp : boolean = true; Var Xnew,Xold,Xnow, Ynew,Yold,Ynow : real; ConChar : chold); DrawLine(Xnow,Ynow,Xnew,Ynew); End; If (ConChar = ^J) and (Yold <> 0) then Begin Ynew := Yold - 1; EraseLine(Xnow,Ynow,Xold,Yold); DrawLine(Xnow,Ynow,Xnew,Ynew); End; If (ConChar = ^H) and (Xold <> 0) then Begin Xnew := Xold - 1; EraseLine(Xnow,Ynow,Xold,Yold); DrawLine(Xnow,Ynow,Xnew,Ynew); End; If (ConChar = ^L) and (Xold := Xnew; Yold := Ynew; If (ConChar = ^K) and (Yold <> 99) then Begin Ynew := Yold + 1; ErasePoint(Xold,Yold); DrawPoint(Xold,Ynew); End; If (ConChar = ^J) and (Yold <> 0) then Begin Ynew := Yold - 1; ErasePoint(Xold,Yold); DrawPoint(Xold,Ynew); End; If (ConChar = ^H) and (Xold <> 0) then Begin Xnew := Xold - 1; ! !45(!.+/ 0y0( d!kZ!{Z͈͈o&  :(y ͠|( *"x2y( >28!?"9!!>2 :D]SXN]D [ (!e}̈́A8Q0G: x@!\w# (   yV. V!h6# (*(.(!8}(*(̈́w#>?> w#a{ |͒}͛Ɛ'@'7||}>"C"6# ""͐ͩ*B"[R5*"^#V#ar; {$I grafix.box} Procedure Intro; Begin ClrScr; GotoXY(30,8); Write('R U B B E R L I N E'); GotoXY(34,10); Write('Instructions'); GotoXY(20,11); Write('Use the Vector Keys to move the Cursor about'); GotoXY(20,12); Write('the screen. The Vector Keys must be configured'); GotoXY(20,13); Write('as they came with CP/M. The P key toggles the'); GotoXY(20,14); Write('pen up and down. to end. Have Fun!'); GotoXY(31,16); ld <> 159) then Begin Xnew := Xold + 1; EraseLine(Xnow,Ynow,Xold,Yold); DrawLine(Xnow,Ynow,Xnew,Ynew); End; End; until ConChar = chr(27); ClrScr; Write(chr(27),'B',4); End. {End of GrfDemo.pas}  ^#V#N#FO/o&9O/o&9!9(> (G!9 w#E͊w}8uRB0 >R@RR!+ͨ z R!+ͨ z <!+ͨ z <!+ͨ z <!#ͨ z <!+ͨ z T]KB!z> S>))0 = |JJDMgo>jB0 7?= u` ` 77 ` = O nf^VNF!DLT\I!!53!r1!\!> x #-= o˸xO(- }(x>8(C ,C `iM!>u|; |J>| )=|(DMbo˸ͦ88ͦx(0 8> Mx(>-Ͳ{(ay(Ͱͦ \z(>.Ͳ (Ͱ ~ͦ{>EͲ>+|(|Dg>-Ͳ|/ 0:p# ~# +>0w#,-  60#J˸}րogM| .͏ ?x P , 78ƀ8ƀ8ox٨!دoGOW_gɷɷ|لg{ً_zيWyىOxوG|ٔg{ٛ_zٚWyٙOx٘Gxٸyٹzٺ{ٻ|ټx٨ xx(ͼ ?}ٽÏ }ց; <(; 7D = |٤g{٣_z٢Wy١Ox٠GD u J }x>uu}ƀ/ƀo; -J }0W-J W,}l˸ͨ 8 ; ` x( -ͨ 8J -ͨ 8,J }l8;*!` ! >u` ` u--- J ,,,-xGg?+2n*8t z~,->uxu: *^ F* < >26"~͟*-w#ww#͟"~ <@*Ͳ!\  <ʮ!\$> >2*|>! * \$\<(!: [1Á\!(f"> 2:!<"F( #~#6e>!["N>!~8>O6*"w (=(&("( :(N 8y(~#x+% (6*#~[*#~ *~(h#"b=  8H\<z5+)+<z {0Gɯgo||H}||/g}/o#}o&K[xAJSJDM!b"!6J"DM'ͬͬdͬ ͬ} wͦWͧ _}8(8J`9{T]=o`9y  x0w#xG%P %P ZJDM%P = _~65i+~hìx-Sx9?+{Η@}|C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ͳ*#>$! !{e.~!Ͳ! !~ *!d5~!Ͳ! !}e.~!Ͳ![! !q͐bò"" *Ͳ* m!]n&!(T]DMR0 -a%}̈́o*!~6o&͠|ͣ}%^C User break1:% I/O% Run-time% error ͒%, PC=[R"͍% Program aborted*1!͍!&Ͳ]% !nͲ"{*{!n <b*{5!aE0 !}2}*{b7 !}2}*}& !OͲ}2\ !>Ͳ!O *\&e. !OͲ!O!> m!n&*\&aE !> !O!> m!n&e. !>Ͳt !>  !]Ͳ!] !!o }oE!!}2...................................................................... INLINE.PAS Jim Kircher (206) 746-1836 INLINE.COM 17915 NE 19th PL Bellevue, Wa 98008 ...................................................................... USEAGE: EDIT FNAME.AZM { the subprogram is written } Z80MR FNAME { the .PRN file is created } PIP FNAME.PRN = FNAME.PRN[T8] { tabs are expanded to spaces } *###w* N#FB ͟r+s> !T]>)j)0 0= UR!#U*^#V#N#F#^#V>">!2DM"~x(L* :O(o:" C}=( ?*-N#Fp+qq#p! * F+N+++V+^Bq#p>>> SRѷR* s#r$ s#r"S"! N#FB(^x * 6#[<(H*! Kq#p##K[! *! 4 #4! x *$ *>w""{_!"*nf}(HR0nf" ^VMDnfutqpaE2%* * m!]n&e. *Ͳ$!.* =  *Ͳ! * =  *Ͳ!o$!o oEʨ%!o .INL !bͲ!o .PRN !oͲ ͘"R͐bŔ --writing to file !b !q́--͐b![́Inline ͐b![!(bͲ"![́$00);͐b!bR͐b!͝}oE{&!8!~~._b!~ R!q͐b@&!b!bbͲ"![́$00);͐b!bR͐b!͝}oEʰs!8!~~._b!~ R!q͐b@&!!o oE4!!o R!q́ not found,bŔ$ Enter file name or to end.͐b!-+ ._b!- \Eʋ!!.!- =  !-Ͳ!- .INL !bͲ!- .PRN !oͲ!!}2*&E ~!/Ͳ!/!n&! N!/ m!͛}oE3"!/!!ͽ!!/!/ mn&! N!/ m!͛}oE"!/!/ m!ͽ3"!/ ~!Ͳ! !!b <b!b!͝}oE$~!Ͳ!"!8!~~._b!~ m!͛E$!~ INLINE FNAME { the .INL file is created } ~~ DOCUMENTATION ~~ TURBO Pascal has a lot of great features. External procedures, inline machine code and absolute addressing allow programs that run almost as fast as assembled code. I favor using Pascal source for everything but the tight loops and very low level byte/bit manipulations. Here, very small relocatable subprograms can be assembl*s#r*s#r"* 5KB!>u~#fo{_"*R0RnfR0KqputsrNF( ^VNF^V*SutKqp R*R(~w~wnf ut"6# * *!""*NFy(* "*B0Cnf* [R*"*RS[s#r^#VS>O"w2x2!"" @*>2"!"""!\Ͳ*: !~6go(\R*s#r_2x( s x  ed and included as Inline procedures. Entering this code from the keyboard is tedious and error prone. INLINE.COM will create this code from a .PRN file. To use, enter A> INLINE filename (file type .PRN assumed). The program retreives the filename from the command tail and appends a type of .PRN to it. The .PRN file is then opened, text is processed and written to a file created with name filename.INL. The program is designed to wonFileName : Filename; InlFileName : Filename; SourceFile : TEXT; DestFile : TEXT; I,J : INTEGER; OK : BOOLEAN; linebuffer : Workstring; FUNCTION Open(VAR fp:TEXT; name: filename): BOOLEAN; BEGIN ASSIGN(fp,Name); {$I-} { so program does not terminate on bad filename} RESET (fp); {$I+} { I/O checking active again } IF IOresult <> 0 THEN BEGIN Open := FALSE; CLOSE(fp); END ELSE Open bject module must be produced. Macros must be expanded. Conditional code must not be listed for false conditionals. The switches for the preceding are all set properly (on) by default by Z80MR, no pseudo-ops are needed. If DEFM, DEFB etc is used, the LIST A (normally off by default) pseudo-op must be placed in the Z80MR source code file before assembly so all bytes are listed in the .PRN file. END ]=' ') and (LENGTH(S) >0) DO delete (S,LENGTH(S),1); Trim := S; END {Trim}; PROCEDURE OpenDest; BEGIN ASSIGN(destFile,InlFileName); REWRITE(destFile); END {open dest}; PROCEDURE ProcessFile; LABEL 10; VAR destBuff : workstring; CONST code1 = 7; {Z80MR .PRN files, 1st byte of Z80 code in column 7} mnemon = 25; { " " " , column where mnemonic starts} BEGIN WHILE NOT EOF(SourceFile) DO BEGIN DestBuff := ''; I := code1; READLN(SourceFilerk on .PRN files generated by Z80MR as furnished by Micro Cornucopia for the Big Board. No research was done on other assembler's .PRN files, the Pascal source may have to be modified to fit. To have readable .INL files, all tabs in the .PRN file must first be expanded to spaces with PIP. A> PIP fname.prn = fname.prn[T8] (converts tabs to 8 spaces) The generated file starts with the INLINE statement and left parenthesis and ends := TRUE; END {open}; FUNCTION CopyTo(ch : char; Str1 : filename) : filename ; VAR S : filename; BEGIN S := ''; Str1 := Str1 + ch ; {so while loop will exit} { the next line copies Str1 to S char by char until '.'} WHILE Str1[LENGTH(S)+1] <> ch DO S:=S +Str1[LENGTH(S)+1]; CopyTo := S; END; PROCEDURE OpenMain; VAR Str1 : filename; BEGIN REPEAT IF NOT Open(SourceFile,PrnFileName) THEN BEGIN OK := FALSE; IF PrnFileName <> '' THEN WRITE( {--------------------------------------------------------------------} { --INLINE.PAS-- PROCESS .PRN FILE, WRITE INLINE CODE } { ..................... TO DESTINATION (.INL) FILE } { : last rev 08 05 85 : FILE NAME RETREIVED FROM COMMAND LINE } { :...................: Jim Kircher Bellevue, WA } {--------------------------------------------------------------------} TYPE Workstring = STRING[126]; Filename = STRING[12]; VAR Pr,Linebuffer); { get 1 line of text } IF (Length (Linebuffer) > 0) THEN BEGIN IF linebuffer[2] <> ' ' THEN { if address bytes, } BEGIN { then code follows. } WHILE lineBuffer[I] IN ['0'..'9','A'..'F'] DO { get all hex bytes } BEGIN IF I = code1 THEN destBuff := '$'; { $ delimit 1st byte } IF (Odd(I)) and (I > code1) THEN destBuff := destBuff with the ');' as required by Turbo. All text that is not actual executable code is surrounded by braces. Dollar signs and slashes are included where Turbo requires (delimiting each byte of code). The program stops processing the .PRN file when it encounters the END pseudo-op code. This eliminates the Symbol table, etc from the inline file. Besides being relocatable, several conventions must be followed in the Z80MR source code. An oPrnFileName,' not found,'); WRITELN(' Enter file name or to end.'); READLN(Str1); IF Str1 = '' THEN HALT; Str1 := CopyTo('.',Str1); { strip file type, if entered } InlFileName := Str1 + '.INL'; PrnFileName := Str1 + '.PRN'; END ELSE OK := TRUE; UNTIL OK; END {open main}; FUNCTION Trim( S : workstring): workstring; {trim spaces fore and aft} BEGIN WHILE (S[1] = ' ') and (LENGTH(S) >0) DO delete(S,1,1); WHILE (S[LENGTH(S)  + '/$'; destbuff := destbuff + lineBuffer[I]; I := SUCC(I); END; IF I >code1 THEN DestBuff := DestBuff + '/'; {delimit last byte of code} END; IF LENGTH(linebuffer) > I-1 THEN { still some text left ? } BEGIN IF trim(COPY(linebuffer,mnemon,5)) = 'END' THEN GOTO 10; For J := I-1 TO 14 DO DestBuff := DestBuff +' '; {Add spaces to line up columns} destBuff := DestBuff + CHR(1name from command line } IF PrnFileName <> '' THEN BEGIN InlFileName := PrnFileName + '.INL'; {dest file always has type of .INL } PrnFileName := PrnFileName + '.PRN'; {main file always has type of .PRN } END; OpenMain; OpenDest; WRITELN; WRITELN(' --writing to file ',InlFileName,'--'); WRITELN(destFile,'Inline '); {write reserved word 'Inline' to file} WRITE(destFile,'('); { " the left parentheses " " } ProcessFile;  Clock84.box Grafix84.box Demonstrations: VidDemo.pas ClkDemo.pas GrfDemo.pas SetClock.com The titles of the files are somewhat self explanatory with the three areas of interest being the video attributes, the real time clock and the screen graphics. 23); { beginning comment brace } destBuff :=DestBuff + COPY(lineBuffer,I,100); {copy rest as comments} destBuff := DestBuff + CHR(125); { ending brace } END; WRITELN(DestFile,DestBuff); { processed line to file} END; { IF Length... } END; 10:END; {ProcessFile} PROCEDURE CommandLine(VAR S : filename); { get 1st argument from commnand line. $5D is hex address of 1st character} { in command line. The end of the 1st ar * * * * * * * * * * * * * * * * * * * * * * * * * * * * * KAYPRO-84 * * Toolbox * * * * Jack E. Heiss * * * * * * * * * * * * * * * * * * * * * * * * * * * * * KAYPRO-8 { " the code & comments " " } WRITELN(destFile,'$00);'); { last byte must not be delimited } RESET(destFile); { now read the file } WRITELN; { and write to the console } WHILE NOT EOF(destFile) DO BEGIN READLN(destFile,Linebuffer); WRITELN(Linebuffer); END; CLOSE(SourceFile); CLOSE(DestFile); END. gument was marked with 0 by CP/M. } BEGIN S := ''; { next line copies memory from hex 5D into string S until 0 encountered } WHILE MEM[LENGTH(S)+$5D] <> 0 DO S:=S+CHR(MEM[LENGTH(S)+$5D]); S := CopyTo('.',S); { dont include any file type} S := CopyTo(' ',S); { dont include spaces } END; {CommandLine} { ----------- Main Program Body ---------- } BEGIN CommandLine(PrnFileName); {get file 4 Toolbox is a set of pre-wriiten procedures in TurboPASCAL for accessing some of the advanced features of the Kaypro Universal Board Computers, also known as the -84 computers. The Toolbox contains three files of procedures plus three demonstration programs. Another file, SETCLOCK.COM is included for convenience. Each procedure file contains its own documentation. Files on the disk are: Procedure Files: Video84.box   ͫCopyright (C) 1984 BORLAND IncAKayproDelete2/920/92P= ERT###&&&~7#~=% o&ͦoͦܐԩͣ}!!"8~#(}:$= +*!Z!*B!!:(=2!Z: <2!!!:O::O:!*B͏ ?x P , 78ƀ8ƀ8ox٨!دoGOW_gɷɷ|لg{ً_zيWyىOxوG|ٔg{ٛ_zٚWyٙOx٘Gxٸyٹzٺ{ٻ|ټx٨ xx(ͼ ?}ٽÏ }ց; <(; 7D = |٤g{٣_z٢Wy١Ox٠GD u J }x>uu}ƀ/ƀo; -J }0W-J W,}l˸ͨ 8 ; ` x( -ͨ 8J -ͨ 8,J }l8;*!` ! >u` ` u--- J ,,,-xGg?+2n*8t z~,->uxuH\<z5+)+<z {0Gɯgo||H}||/g}/o#}o&K[xAJSJDM!b"!6J"DM'ͬͬdͬ ͬ} wͦWͧ _}8(8J`9{T]=o`9y  x0w#xG%P %P ZJDM%P = _~65i+~hìx-Sx9?+{Η@}|C C gZJDM0D ,7}o˸  #yO!@9i&   # w# /w#! !45(!.+/ 0y0( d!kZ!{Z͈͈o&  :(y ͠|( *"x2y( >28!?"9!!>2 :D]SXN]D [ (!e}̈́A8Q0G: x@!\w# (   yV. V!h6# (*(.(!8}(*(̈́w#>?> w#a{ |͒}͛Ɛ'@'7||}>"C"6# ""͐ͩ*B"[R5*"^#V#a}.;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SCREEN GENERATORb!%!Ŕver 2.0b!!ŔP--------------------------------------------------------------------------------b!! Ŕ%Produces a Pascal procedure in sourceb!'! Ŕbyb!!!ŔThomas R. Mieraub*###w* N#FB ͟r+s> !T]>)j)0 0= UR!#U*^#V#N#F#^#V>">!2DM"~x(L* :O(o:" C}=( ?*-N#Fp+qq#p! * F+N+++V+^Bq#p>>> SRѷR* s#r$ s#r"S"! N#FB(^x * 6#[<(H*! Kq#p##K[! *! 4 #4! x *$ *>w""{_!"*nf}(HR0nf" ^VMDnfutqp !SͲ!!S =!5!N}2`!-b*`&}oEW&!!S =!b!!ŔCreating a new datafileb!4"a!!5z?&"!!P5z&"!*+))))))!*+)))))) ! e.P*#ð%*a*+))))))!*+)))))) P*#Ü%![!4b!-b!!S =!b!!Ŕ Reading the Datafile b!4"a!8!4ͳb!!5z '"!*+))))))*a*+)))))) P J= B== ͯ}8= ͵}/ͭ !*###~-_~(4Q6*>2>*##w:>*##~*#~(E[ ( ( ( !][ ( ( ((w#(6!]~-#8~>7  [>OkͼMs #rkͼpX á[ [ (( #w(q*#~[ (  *##~6͜O$*#~(08ʦ=ʦ==ʩ=ʬò+###~-_q46͡> *:4^q}Ò*|(!!Ŕ Contributed to the public domainb!@!ŔType any key...b!O!!8!b!!5z!"!!*!+))))))P!S*!+)!s#r!#*!+)!s#r!*!+))))))P*!#|!c! !ŔSCREEN GENERATORb!!ŔFile Selection Screenb!!ŔP--------------------------------------------------------------------------------b!! ŔFile name: ________b!!Ŕ*Procedure name: __________*s#r*s#r"* 5KB!>u~#fo{_"*R0RnfR0KqputsrNF( ^VNF^V*SutKqp R*R(~w~wnf ut"6# * *!""*NFy(* "*B0Cnf* [R*"*RS[s#r^#VS>O"w2x2!"" @*>2"!"""!\Ͳ*: !~6go(\R*s#r_2x( s x*#&!-b!!5zʘ'"!*+)))))) P!Ͳ!!P5zʏ'"!*+))))*+!*n&s*#U'*# '!!5zJ("!*+))))))P!!P5zA("!*+))))))!*+)))))) !*+))))*+n&e.P*#'*#ä'!!+))))))!!+)))))) !!O5P!!ŔWait! b͙'!!5z("!*!*+)))))) R!qb*#ò(c!!M|( M6-#͐ͦ[R8 (G> ͒C~͒#*ͦC!h !lTRUEFALSEͦ!9^#(~#(G~͒#> ͒> Ò "F![(#RR0*4#4> RR *4 #4(>>2$*V(/˖:(#~+ x y2!͵( =( X:(R*:(###~-_-͌X> :("͟"*^˞*V˖0 SRѷR8A* N#F#s#r$ 0})jS\_______________bSCREEN!ͲScreen!gͲ!%! !+.b! \En#! !Ͳ!!5zʧ#"e!*e!*en&(s*e#y#!%! ! R!q́ b! !Ͳ!%!!+.b! \E"$!g !Ͳ!%!! R!q́ b! !gͲ!%!ŔIs the above correct? (Y/N) b!8!b*&(}2*&!YN*&!NN}oEi$*&!YNE6#!}2`! .DAT  ŔSCREEN GENERATORb!!ŔCommand Summaryb!!ŔP--------------------------------------------------------------------------------b!!ŔJ^E or ^K = Cursor up ^A = Cursor to left end of lineb!!ŔK^X or ^J = Cursor down ^F = Cursor to right end of lineb!! ŔB^S or ^H = Cursor left ^R = Cursor to top leftb!! ŔF^D or ^L = Cursor right ^C = Cursor to *+n&s*!*!*!+))))*+n&Rb*!#2!!P+))))*+! s!P*!!P+))))*+n&Rb***!NEʌ4*!N5z54"!!*!+))))*+!*!!+))))*+n&s*!*!*!+))))*+n&Rb*!#ø3!!O+))))*+! s!O*!!P+))))*+n&Rb**!}2:*!ͯE5*!P5z5"!*+))))*+! s**!*+))))*+n&R!}2:!O"!"**!}2:!!5zʮ/"!!P5zʥ/"!*+))))*+! s**!*+))))*+n&Rb*#F/*#2/!"!!O5z0"!*+))))*+! s**!*+))))*+n&Rb*#ÿ/!"!"**!}2:*!ͯED1*!QͯED1!P*!Ez0"!!*!+))))*+!*!!R+))))*+n&s*!*!*!+))))*+n&Rb*!+m0!*+))))*!+n&Rb*#ÿ8*!NEʘ9!!O5zʘ9"!*+))))!+! s*!!*+))))!+n&Rb*#99!"**j:*!"*!ͯE9!"*"*"**!*5z :"M2*"*#9!"***!"*!"!"**!*5zi:"50*#T:!}2:!"!"!"*!"!*+))))*+n&}2*&! a*!QN}oEʃ:*!R"!Q"*!R"!*+)))bottom rightb!!ŔD^Q = Delete to end of line ^Z = Delete entire screenb!!Ŕ;^Y = Delete line ^N = Insert lineb!!Ŕ; inserts space at cursor ^B = Center textb!!Ŕ1 deletes character to the left of the cursorb!!Ŕ5 Code program & quit ^@ = Help b!0!ŔType any key to continue...b!8!Bbc͊(R$=͎.a>R4=ͩ9a>RD=/a>RT=.a>Rd=,a>Rt=ͦ.a>R„=ͤ-a> R”=50a> R¤=6-a> R´=,a> R=.a> R=j-a>R=͝5a>R=͍4a>R>.a>R>ͤ-a>R$>6-a>R4>7a>RD> /a>RT>,a>Ra>M2*:&}oEr>͐;!}2:*;&E, and waits for SCREEN.COM to write the source code. The code is then stored in a text file that can be block read, or nds. (5.) Type any key; and after a short delay; you will be in the editing mode. If you opened an existing data file, the screen for that data file will be displayed. If not, the screen will be blank. (6.) Create your screen by typing in your text as it is to appear in your final program. Use the commands listed on the help menu. To recall this menu, type ^@. FroE@?!}2!}2*"!S*+)*s#r!#*+)*s#r*!"*!P͛Ec?!}2*&E>!}2*&Eʈ@!P"!*n&}2*&! aE@!}2*"!**R" !*+))))))!*+)))))) ** 5P*!R"**NEr@!}2!" !*+))))))!*+)))))) ** 5P*&Eʄ?*!"*#Ø>*!R"c! .LIB !Ͳ!!! <b!!b!![́ Procedure ! !q!;͐ included into any Pascal program you choose. SCREEN.COM was compiled with Turbo Pascal (tm) and is intended to produce source code for the Turbo editor. To create a screen with SCREEN.COM, follow these instructions: (1.) Type SCREEN and . (2.) Enter your choice for file and procedure names. If you don't enter a choice, SCREEN.COM will select these names for you. The default *** SCREEN.COM *** ------------------------ Produces a Pascal procedure in source by Thomas R. Mierau 454 Carver N.W. Massillon, OH 44646 (216) 832 - 8037 Contributed to the publm the help menu, any key will return you to the editing mode. (7.) When you are finished editing, type . (8.) Your screen will be saved to the files discussed in step (2.). Using your Turbo editor, you can then use the "block read" feature or the {$I} directive to include your code in the main program. (9.) If your screen contb!![́Begin͐b!![́ Clrscr;͐b!*5zA"!!![́ GotoXY(!#*!+)^#V!!,!S*!+)^#V!́);͐b!![́ Write('!*!+)))))) !q́');͐b*!#͡@Ac P* file names will be SCREEN.LIB for the text file, and SCREEN.DAT for SCREEN.COM's data file. The default procedure name will be "Procedure Screen;". (3.) Answer (Y/N) to the query followed by . If the files named here already exists on the disk, they will be reopened. If not, new files will be created. (4.) The next screen is a "Help Menu" of editing comma  ains variables, you will have to edit the above .LIB file with the Turbo editor and enter the variable statements manually. 2  Write('Type any key...'); Gotoxy(79,24); Read(Kbd,Key); End; Procedure ClearLines; Begin For I := 1 to 24 do Begin Statement[I] := ''; VP[I] := 0; HP[I] := 0; Line[I] := ''; End; End; Procedure FileScreen; Var XFilename: String[8]; XProcedureName: String[25]; I: Integer; Begin Clrscr; GotoXY(32,1); Write('SCREEN GENERATOR'); GotoXY(30,3); Write('File Selection Screen'); GotoXY(1,4); WrieenData; ScreenData: XScreenData; Flag: Boolean; Ltr: Array[1..80,1..24] of Char; Line: Array[1..24] of String[80]; Statement: Array[1..24] of String[80]; VP: Array[1..24] of Integer; HP: Array[1..24] of Integer; I,Q,R,X,Y,XX,YY, Pointer,First, Last,Len: Integer; Filename: String[8]; ProcedureName: String[25]; TestLine: String[80]; Key: Char; Kr OK: Boolean; LocalFilename: String[12]; Begin OK := true; LocalFilename := concat(Filename,'.DAT'); {$I-} Assign(Disk1,LocalFilename); Reset(Disk1); OK := (IOResult =0); {$I+} Close(Disk1); If Not OK then Begin Assign(Disk1,LocalFilename); Rewrite(Disk1); Gotoxy(1,24); Write('Creating a new datafile'); With ScreenData do Begin For Y := 1 to 24 do Begin For X := 1 to 80 do Begte('--------------------------------------------------------------------------------'); GotoXY(25,12); Write('File name: ________'); GotoXY(20,16); Write('Procedure name: _________________________'); XFilename := 'SCREEN'; XProcedureName := 'Screen'; Repeat Gotoxy(37,12); Read(Filename); If Filename = '' then Filename := XFilename; For I := 1 to 8 do Filename[I] := upcase(Filename[I]); Gotoxy(37,12); Write(Filename,' Flag, Found: Boolean; Procedure FirstScreen; Begin Clrscr; GotoXY(33,1); Write('SCREEN GENERATOR'); GotoXY(37,3); Write('ver 2.0'); GotoXY(1,4); Write('--------------------------------------------------------------------------------'); GotoXY(22,10); Write('Produces a Pascal procedure in source'); GotoXY(39,12); Write('by'); GotoXY(33,14); Write('Thomas R. Mierau'); GotoXY(25,20); Write('Contributed to the public domain'); GotoXY(64,24);in Line[Y] := (Line[Y] + ' '); End; XLine[Y] := Line[Y]; End; Write(Disk1,ScreenData); Close(Disk1); End; End; Assign(Disk1,LocalFilename); Reset(Disk1); Gotoxy(1,24); Write('Reading the Datafile '); With ScreenData do Begin Read(Disk1,ScreenData); For Y := 1 to 24 do Begin Line[Y] := XLine[Y]; End; Close(Disk1); End; End; Procedure FillArray;Program SCREEN; { Submitted to the TURBO PASCAL RUNOFF sponsored by MICRO CORNUCOPIA from Thomas R. Mierau 454 Carver N.W. Massillon, OH 44646 (216) 832 - 8037 This program is a screen generator for TURBO PASCAL [(tm) BORLAND INTERNATIONAL]. It produces the source code for a procedure for a screen of text. } Type XScreenData = Record XLine: Array[1..24] of String[80]; End; Var Disk1: File of XScr '); XFilename := Filename; Gotoxy(37,16); Read(ProcedureName); If ProcedureName = '' then ProcedureName := XProcedureName; Gotoxy(37,16); Write(ProcedureName,' '); XProcedureName := ProcedureName; Repeat Gotoxy(37,20); Write('Is the above correct? (Y/N) '); Read(Kbd,Key); Key := upcase(Key); Until (Key = 'Y') OR (Key = 'N'); Until Key = 'Y'; End; Procedure ReadDataFile; Va   Begin For Y := 1 to 24 do Begin TestLine := Line[Y]; For X := 1 to 80 do Begin Ltr[X,Y] := Testline[X]; End; End; End; Procedure FillLines; Begin For YY := 1 to 24 do Begin Line[YY] := ''; For XX := 1 to 80 do Begin Line[YY] := Line[YY] + Ltr[XX,YY]; End; End; Line[24] := copy(Line[24],1,79); End; Procedure DisplayData; Begin Gotoxy(1,1); Write('Wait! '); FillLines; For YY := 1 X :=1; If Y > 24 then Y := 1; Gotoxy(X,Y); End; Procedure CursorLeft; Begin Flag2 := true; X := (X-1); If X < 1 then Begin X := 80; Y := (Y-1); If Y < 1 then Begin X := 1; Y := 1; End; End; Gotoxy(X,Y); End; Procedure CursorRight; Begin Flag2 := true; If Y =  ^B = Center text'); GotoXY(1,20); Write(' deletes character to the left of the cursor'); GotoXY(1,22); Write(' Code program & quit ^@ = Help '); GotoXY(48,24); Write('Type any key to continue...'); Read(Kbd,Key); Clrscr; DisplayData; End; Procedure EditScr; Var Num: Integer; Flag1, Flag2: Boolean; Procedure Help; Begin Flag2 := true; HelpScreen; Gotoxy(X,Y); End; egin Flag2 := true; For Y := 1 to 23 do Begin For X := 1 to 80 do Begin Ltr[X,Y] := (' '); Gotoxy(X,Y); Write(Ltr[X,Y]); End; End; Y := 24; For X := 1 to 79 do Begin Ltr[X,Y] := ' '; Gotoxy(X,Y); Write(Ltr[X,Y]); End; X :=1; Y:= 1; Gotoxy(X,Y); End; Procedure  to 24 do Begin Gotoxy(1,YY); Write(Line[YY]); End; End; Procedure HelpScreen; Var Key: Char; Begin Clrscr; GotoXY(30,1); Write('SCREEN GENERATOR'); GotoXY(30,3); Write('Command Summary'); GotoXY(1,4); Write('--------------------------------------------------------------------------------'); GotoXY(1,6); Write('^E or ^K = Cursor up ^A = Cursor to left end of line'); GotoXY(1,8); Write('^X or ^J = Cursor down 24 then Begin X := (X+1); If X > 79 then Begin X := 1; Y := 1; End; End; If Y < 24 then Begin X := (X+1); If X > 80 then Begin X := 1; Y := (Y+1); End; End; Gotoxy(X,Y); End; Procedure LeftEnd; Begin Flag2 := true; X := 1; Gotoxy(X Procedure Quit; Begin Flag1 := true; Flag2 := true; End; Procedure CursorUp; Begin Flag2 := true; Y := (Y-1); If Y < 1 then Y := 1; Gotoxy(X,Y); End; Procedure CursorDown; Begin Flag2 := true; Y := (Y+1); If Y > 24 then Y := 24; Gotoxy(X,Y); End; Procedure CarriageReturn; Begin Flag2 := true; Y := (Y+1); InsertCharacter; Begin Flag2 := true; If Y < 24 then Begin If X < 81 then Begin For I := 80 downto (X+1) do Begin Ltr[I,Y] := Ltr[(I-1),Y]; Gotoxy(I,Y); Write(Ltr[I,Y]); End; Ltr[X,Y] := (' '); Gotoxy(X,Y); Write(Ltr[X,Y]); Gotoxy(X,Y); End; End;  ^F = Cursor to right end of line'); GotoXY(1,10); Write('^S or ^H = Cursor left ^R = Cursor to top left'); GotoXY(1,12); Write('^D or ^L = Cursor right ^C = Cursor to bottom right'); GotoXY(1,14); Write('^Q = Delete to end of line ^Z = Delete entire screen'); GotoXY(1,16); Write('^Y = Delete line ^N = Insert line'); GotoXY(1,18); Write(' inserts space at cursor ,Y); End; Procedure RightEnd; Begin Flag2 := true; If Y < 24 then X := 80; If Y = 24 then X := 79; Gotoxy(X,Y); End; Procedure BeginningOfField; Begin Flag2 := true; X :=1; Y :=1; Gotoxy(X,Y); End; Procedure EndOfField; Begin Flag2 := true; X := 79; Y := 24; Gotoxy(X,Y); End; Procedure EraseField; B   If Y = 24 then Begin If X < 80 then Begin For I := 79 downto (X+1) do Begin Ltr[I,Y] := Ltr[(I-1),Y]; Gotoxy(I,Y); Write(Ltr[I,Y]); End; Ltr[X,Y] := (' '); Gotoxy(X,Y); Write(Ltr[X,Y]); Gotoxy(X,Y); End; End; End; Procedure DeleteCharacter; Begin  Gotoxy(Q,R); Write(Ltr[Q,R]); End; End; For Q := 1 to 80 do Begin Ltr[Q,Y] := (' '); Gotoxy(Q,Y); Write(Ltr[Q,Y]); End; End; If Y = 24 then Begin For Q := 1 to 80 do Begin Ltr[Q,Y] := (' '); Gotoxy(Q,Y); Write(Ltr[Q,Y]); End; X := 1; Gotoxy(X,Y); End; ine; Begin Flag2 := true; If Y < 24 then Begin For Q := X to 80 do Begin Ltr[Q,Y] := (' '); Gotoxy(Q,Y); Write(Ltr[Q,Y]); End; Gotoxy(X,Y); End; If Y = 24 then Begin For Q := X to 79 do Begin Ltr[Q,Y] := (' '); Gotoxy(Q,Y); Write(Ltr[Q,Y]); End;  2); If NewMar <1 then NewMar := 1; X := LftMar; Old := Y; Gotoxy(X,Y); For Ptr := 1 to NewMar do Begin DeleteCharacter; Y := Old; End; X := 1; Gotoxy(X,Y); End; Procedure ShiftRight; Begin Diff := (Diff * (-1)); NewMar := (Diff div 2); X := 1; Gotoxy(X,Y); For Ptr  Flag2 := true; X := (X-1); If X <1 then Begin X := 80; Y := (Y-1); If Y <1 then Begin Y := 1; X := 1; End; Gotoxy(X,Y); End; If Y < 24 then Begin For I := X to 79 do Begin Ltr[I,Y] := Ltr[(I+1),Y]; Gotoxy(I,Y); Write(Ltr[I,Y]); End; LtrX := 1; Gotoxy(X,Y); End; Procedure DeleteLine; Begin Flag2 := true; If Y < 24 then Begin For R := Y to 23 do Begin For Q := 1 to 80 do Begin Ltr[Q,R] := Ltr[Q,(R+1)]; Gotoxy(Q,R); Write(Ltr[Q,R]); End; End; For Q := 1 to 79 do Begin Ltr[Q,24] := (' '); Gotoxy(Q,2 Gotoxy(X,Y); End; End; Procedure InsertLine; Begin Flag2 := true; If Y < 24 then Begin R := 24; For Q := 1 to 79 do Begin Ltr[Q,R] := Ltr[Q,(R-1)]; Gotoxy(Q,R); Write(Ltr[Q,R]); End; For R := 23 downto (Y+1) do Begin For Q := 1 to 80 do Begin Ltr[Q,R] := Ltr[Q,(R-1)]; := 1 to NewMar do Begin InsertCharacter; End; End; Begin Flag2 := true; Diff := 0; NewMar := 0; Ptr := 0; {Find left margin} Repeat Ptr := (Ptr + 1); KKey := (Ltr[Ptr,Y]); Until (KKey <> ' ') or (Ptr = 81); LftMar := (Ptr - 1); Ptr := 81; {Find right margin} Repeat Ptr := (Ptr-1); KKey := (Ltr[P[80,Y] := (' '); Gotoxy(80,Y); Write(Ltr[80,Y]); Gotoxy(X,Y); End; If Y = 24 then Begin For I := X to 78 do Begin Ltr[I,Y] := Ltr[(I+1),Y]; Gotoxy(I,Y); Write(Ltr[I,Y]); End; Ltr[79,Y] := (' '); Gotoxy(79,Y); Write(Ltr[80,Y]); Gotoxy(X,Y); End; End; Procedure DeleteToEndOfL4); Write(Ltr[Q,24]); End; End; If Y = 24 then Begin For Q := 1 to 79 do Begin Ltr[Q,24] := (' '); Gotoxy(Q,24); Write(Ltr[Q,24]); End; End; X := 1; Gotoxy(X,Y); End; Procedure CenterText; Var Ptr, LftMar, RgtMar, NewMar, Diff, Old: Integer; KKey: Char; Procedure Shiftleft; Begin NewMar := (Diff div  tr,Y]); Until (KKey <> ' ') or (Ptr = 0); RgtMar := (80 - Ptr); Diff := (LftMar - RgtMar); If DIff <> 0 then Begin If Diff > 0 then ShiftLeft; If Diff < 0 then ShiftRight; End; NewMar := 0; End; Procedure PrintText; Begin If Y < 24 then Begin Gotoxy(X,Y); If X < 81 then Begin Ltr[X,Y] := Key; Write(Lt := true; Last := X; Len := (1+(Last - First)); Statement[Pointer] := copy(Line[Y],First,Len); End; X := (X - 1); If X = First then Begin KFlag := true; Len := 1; Statement[Pointer] := copy(Line[Y],First,Len); End; Until KFlag; Pointer := (Pointer + 1); End; End; Pointer := (Pointer - 1); End; Procedure PrintliinningOfField; 19: CursorLeft; 24: CursorDown; 25: DeleteLine; 26: EraseField; 27: Quit; 127: DeleteCharacter; End; If not Flag2 then PrintText; Flag2 := true; Until Flag1; Clrscr; End; Procedure ParseLines; Begin Pointer := 1; For Y := 1 to 24 do Begin X := 1; First := 0; Last := 0; Kflag := false; Found := false; Repeat TestLine := Line[Y]; .. '); FillLines; ParseLines; PrintLines; WriteDataFile; ClrScr; End.r[X,Y]); End; X := (X+1); If X > 80 then X := 80; Gotoxy(X,Y); End; If Y = 24 then Begin Gotoxy(X,Y); If X < 80 then Begin Ltr[X,Y] := Key; Write(Ltr[X,Y]); End; X := (X+1); If X > 80 then X := 80; Gotoxy(X,Y); End; End; Begin Y := 1; X := 1; Flag1 := false; Gotoxy(X,Ynes; Var Disk: Text; LocalFilename: String[12]; Begin Clrscr; LocalFilename := concat(Filename,'.LIB'); Assign(Disk,LocalFilename); Rewrite(Disk); Writeln(Disk,'Procedure ',ProcedureName,';'); Writeln(Disk,'Begin'); Writeln(Disk,' Clrscr;'); For I := 1 to Pointer do Begin Writeln(Disk,' GotoXY(',HP[I],',',VP[I],');'); Writeln(Disk,' Write(''',Statement[I],''');'); End; Writeln(Disk,'End;'); Close(Disk); End; Procedure Writ Key := TestLine[X]; If Key <> (' ') then Begin Found := true; Kflag := true; First := X; VP[Pointer] := Y; HP[Pointer] := X; End; X := (X + 1); If X > 80 then KFlag := true; Until KFlag; KFlag := false; If Found then Begin X := 80; Repeat Key := TestLine[X]; If Key <> (' ') then Begin KFlag); Repeat Flag2 := false; Read(Kbd,Key); Num := ord(Key); Case Num of 0: Help; 1: LeftEnd; 2: CenterText; 3: EndOfField; 4: CursorRight; 5: CursorUp; 6: RightEnd; 8: CursorLeft; 9: InsertCharacter; 10: CursorDown; 11: CursorUp; 12: CursorRight; 13: CarriageReturn; 14: InsertLine; 17: DeleteToEndOfLine; 18: BegeDataFile; Var LocalFilename: String[12]; Begin LocalFileName := concat(Filename,'.DAT'); Assign(Disk1,LocalFilename); Rewrite(Disk1); With ScreenData do Begin For Y := 1 to 24 do Begin; XLine[Y] := Line[Y]; End; Write(Disk1,ScreenData); Close(Disk1); End; End; Begin Clrscr; ClearLines; FirstScreen; FileScreen; ReadDataFile; FillArray; HelpScreen; Editscr; Gotoxy(31,12); Write('Please stand by.  ͫCopyright (C) 1984 BORLAND IncA Kaypro 4-84nd IVctedP=  ERC0B0~7#~=% o&ͦoͦܐԩͣ}!!"8~#(}:$= +*!Z!*B!!:(=2!Z: <2!!!:O::O:!*B͏ ?x P , 78ƀ8ƀ8ox٨!دoGOW_gɷɷ|لg{ً_zيWyىOxوG|ٔg{ٛ_zٚWyٙOx٘Gxٸyٹzٺ{ٻ|ټx٨ xx(ͼ ?}ٽÏ }ց; <(; 7D = |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#ͨ z <!+ͨ z T]KB!z> S>))0 = |JJDMgo>jB0 7?= u` ` 77 ` = O nf^VNF!DLT\I!!53!r1!\!> x #-= o˸xO(- }(x>8(C ,C `iM!>u|; |J>| )=|(DMbo˸ͦ88ͦx(0 8> Mx(>-Ͳ{(ay(Ͱͦ \z(>.Ͳ (Ͱ ~ͦ{>EͲ>+|(|Dg>-Ͳ|/ 0:p# ~# +>0w#,-  60#J˸}րogM| .  : *^ F* < >26"~͟*-w#ww#͟"~ <@*Ͳ!\  <ʮ!\$> >2*|>! * \$\<(!: [1Á\!(f"> 2:!<"F( #~#6e>!["N>!~8>O6*"w (=(&("( :(N 8y(~#x+% (6*#~[*#~ *~(h#"b=  8(T]DMR0 -a%}̈́o*!~6o&͠|ͣ}%^C User break1:% I/O% Run-time% error ͒%, PC=[R"͍% Program aborted*1!͍!9$Ͳ3$}2}2!"!i*&!  ͧ"*&! *R"!**}2! *&i!$*&ic!!ŔSet Clock Procedureb!!ŔPlease answer the following:b!!Ŕ"Month : 1 = Januaryb!.!R!:*###w* N#FB ͟r+s> !T]>)j)0 0= UR!#U*^#V#N#F#^#V>">!2DM"~x(L* :O(o:" C}=( ?*-N#Fp+qq#p! * F+N+++V+^Bq#p>>> SRѷR* s#r$ s#r"S"! N#FB(^x * 6#[<(H*! Kq#p##K[! *! 4 #4! x *$ *>w""{_!"*nf}(HR0nf" ^VMDnfutqp (c) August, 1985 by Mike Dingacci, MD This material is hereby placed in the public domain. The author accepts no responsibility for the accuracy of the software, nor for any problems which may result from its use. - RMD - Comments or questions to: P.O. Box 1124 Fallon, Nevada 89406 -------------------------------------------------------------- TRUN.DOC --- J= B== ͯ}8= ͵}/ͭ !*###~-_~(4Q6*>2>*##w:>*##~*#~(E[ ( ( ( !][ ( ( ((w#(6!]~-#8~>7  [>OkͼMs #rkͼpX á[ [ (( #w(q*#~[ (  *##~6͜O$*#~(08ʦ=ʦ==ʩ=ʬò+###~-_q46͡> *:4^q}Ò*|(b!-!Ŕ 12 = Decemberb!!!+b*&Q!! kE'!!*&!! ŔDay of Month : 1 . . 31͐b!&! !+b*&Q!!kEʛ!!*&!! Ŕ!Day of Week : 1 = Sundayb!.! R!:b!.!Ŕ 7 = Saturdayb!%! !+b*&Q!!kED"!*&!!ŔHour : 0 . . 23͐b!!!+b*&Q!!kEʸ"!*&!!*s#r*s#r"* 5KB!>u~#fo{_"*R0RnfR0KqputsrNF( ^VNF^V*SutKqp R*R(~w~wnf ut"6# * *!""*NFy(* "*B0Cnf* [R*"*RS[s#r^#VS>O"w2x2!"" @*>2"!"""!\Ͳ*: !~6go(\R*s#r_2x( s x----- Turbo Pascal requires that every program must have included within it the run-time pascal library. This is usually not a problem unless there are many Turbo programs on a disk. In this case, there is a large overhead of storage space for all those duplicate pascal libraries in every program. One method of solving this problem has been the inclusion of a "menu" program in packages of programs distributed on the same disk. An initializing program is used to "chain" to a CHN-typM|( M6-#͐ͦ[R8 (G> ͒C~͒#*ͦC!h !lTRUEFALSEͦ!9^#(~#(G~͒#> ͒> Ò "F![(#RR0*4#4> RR *4 #4(>>2$*V(/˖:(#~+ x y2!͵( =( X:(R*:(###~-_-͌X> :("͟"*^˞*V˖0 SRѷR8A* N#F#s#r$ 0})jS\ŔPlease enter the next minuteb!!Ŕand when the second handb!!Ŕ reaches 12b!!Ŕ!Next Minute : 0 . . 59b!%!!+b*&Q!!;kEʪ#! !i!$!i! !i!$!i!*&cŔ Clock Set͐bR͐b` b*&Q!!;kEʪ#! !i!$!i! !i!$!  e menu program. The pascal library is placed in memory when the initializing program is run and the menu program contains a menu or list of the various CHN-type programs on the disk. The user chooses the appropriate program to run and the menu program chains to that program. At the end of the run, the chosen program chains back to the menu again. In this way, the user can chain back and forth from the menu to the various programs on the disk, using the same pascal library already containedhose who have already written programs using Turbo Pascal v3.0, however, parameters may be more easily passed by using the standard functions ParamStr and ParamCount. The second version, TRUN3, therefore, uses those standard Turbo v3.0 functions for parsing the command line. Program Variables: ----------------- Cmdline: Contains the entire un-parsed command line. Used for passing command line paramters when chaining to CHN programs. This should  p. 1 The advantages of a program of this type are obvious. You can now compile all your programs to CHN files instead of COM files, thus saving 8k+ of space for each program on the disk. In situations where files are transferred over phone lines using modems, the advantages are even more notable. On a remote data base, one copy of TRUN could be available and all other compiled Turbo programs on the data base would be in the form of CHN files. Thimdfile before chain can occur. Cmdln: Integer varaible containing the location of the command line copy at the bottom of CCP in program TRUN2C (see comments in TRUN2C). p. 2 Ltr: Integer variable containing the number of characters (letters) in the command line. a: String variable containing a carriage return + line feed. Used for pretty fo in memory. This works well, but is limited to a finite group of programs on the distributed disk. TRUN is a program which acts as a run-time loader for any CHN-type program. TRUN loads the pascal library into memory and then chains to a specified CHN-type program. The program to be run is specified on the command line by using the syntax: TRUN filename. If no extension is specified, the loader will supply CHN as the default file extension. Example: TRUN FRAP would cha be the first variable declared in both the TRUN loader and the CHN program which is receiving command line parameters. Cmdbuffer: Contains the entire command line in versions of TRUN which use the Absolute variable declaration for the command buffer location at $80. Cmd: Contains the name of the program being chained to. An equivalent of ParamStr(1). In all versios would save 8k+ of data to be either uploaded or downloaded with each compiled Turbo pro- gram. On services like CompuServe, this could save you a fortune, especially if you only have a 300-baud modem. In order to work under ALL CP/M and MS-DOS versions of Turbo Pascal, TWO versions of TRUN are needed. The first version, TRUN28, contains routines for parsing the command line with earlier CP/M and MS-DOS Turbo versions 1.0 and 2.0. It should also work just as well with version 3.0. For trmatting of text in the source file, while saving a few bytes of space. Z: Integer variable increments to count the command line parameters as they are built. I: Integer variable increments as a counter in "For" and "While" loops. For CP/M Programmers -------------------- Most CP/M programs which parse the command line have an intrinsic limitation of 32 characters for the in to program FRAP.CHN. To use an extension other than CHN for chained programs, an extension may be specified on the command line. Example: TRUN FRAP.C30 would chain to program FRAP.C30. If no program is specified on the command line, the program will display an instructional message and then ask for the name of the program to be run. The same syntax for default extension holds for program names entered via this prompt. If a blank line is entered, the program ends. ns of TRUN, a file extension of ".CHN" is added to this variable if no extension is specified in the original file name taken from the command line. This may be changed to any file extension preferred. For instance, you may want to use ".C3N" as the extension for CHN-type files to be used with Turbo v3.0 and TRUN3. Cmdfile: Cmd variable is assigned to the file variable C  length of the command line. This is because, in CP/M, the TPA starts at address 0100 hex and the command buffer starts at 0080 hex. Whenever a program is loaded and run, it over-writes any part of the command tail which extends beyond 0100 hex. Since the command buffer starts at 0080 hex and it cannot extend beyond 0100 hex, its length cannot be over 20 hex or 32 characters. In Turbo Pascal's version 3.0 for CP/M, this limitation also applies when using the functions Paramcount and ParamStr for ! !45(!.+/ 0y0( d!kZ!{Z͈͈o&  :(y ͠|( *"x2y( >28!?"9!!>2 :D]SXN]D [ (!e}̈́A8Q0G: x@!\w# (   yV. V!h6# (*(.(!8}(*(̈́w#>?> w#a{ |͒}͛Ɛ'@'7||}>"C"6# ""͐ͩ*B"[R5*"^#V#xW^8/w >uJ u` }>(; xQ }} ˸T}ٕ(0D=C ,= ( [ 0%D , 7 ͏ ?(8u x O - ; 8˸x X ,-xG}; }م 9; .>#n0[ D = - nx P ,-(-˸G,-; }ٕ? 9.>͏ 8u ?= u+-(>O 0u O 8 parsing the command line. Fortunately, whenever a program is loaded into the TPA, CP/M places a copy of the entire command line in high memory near the start of the CCP. For those who wish to parse command lines longer than 32 characters, this copy provides a convenient substitute for the command buffer. For CP/M users who may need this longer command line, a third version of TRUN, named TRUN2C, is provided which parses the copy in high memory instead of the command buffer. It should work wit^#V#N#FO/o&9O/o&9!9(> (G!9 w#E͊w}8uRB0 >R@RR!+ͨ z R!+ͨ z <!+ͨ z <!+ͨ z <!#ͨ z <!+ͨ z T]KB!z> S>))0 = |JJDMgo>jB0 7?= ͫCopyright (C) 1984 BORLAND IncAKayproDelete2/920/92P= ERT###&&&~7#~=% o&ͦoͦܐԩͣ}!!"8~#(}:$= +*!Z!*B!!:(=2!Z: <2!!!:O::O:!*B͏ ?x P , 78ƀ8ƀ8ox٨!دoGOW_gɷɷ|لg{ً_zيWyىOxوG|ٔg{ٛ_zٚWyٙOx٘Gxٸyٹzٺ{ٻ|ټx٨ xx(ͼ ?}ٽÏ }ց; <(; 7D = |٤g{٣_z٢Wy١Ox٠GD u J }x>uu}ƀ/ƀo; -J }0W-J W,}l˸ͨ 8 ; ` x( -ͨ 8J -ͨ 8,J }l8;*!` ! >u` ` u--- J ,,,-xGg?+2n*8t z~,->uxuh all three CP/M versions of Turbo Pascal, operating with most standard varieties of CP/M. It was tested during development using Kaypro's CP/M versions 2.2F and 2.2G. p. 3 sing Kaypro's CP/M versions 2.2F and 2.2G. p. 3 H\<z5+)+<z {0Gɯgo||H}||/g}/o#}o&K[xAJSJDM!b"!6J"DM'ͬͬdͬ ͬ} wͦWͧ _}8(8J`9{T]=o`9y ,k- o&0%,` }g; }؉}颋.:}8c~I$I~L*kٷx˸; }0G,͙<},-(-J ! >0 a` o8 Oþ >um.`1pF,t6|!wS<.z}[|%FXc~ur1}Oٯx(<˸ͨ 8; !~Jͨ 0O!><ͨ 8 =  7 <` O ; 7 0 W-J OT0 j oD,:j !I}袋.}8c~I$I~L!> J= B== ͯ}8= ͵}/ͭ !*###~-_~(4Q6*>2>*##w:>*##~*#~(E[ ( ( ( !][ ( ( ((w#(6!]~-#8~>7  [>OkͼMs #rkͼpX á[ [ (( #w(q*#~[ (  *##~6͜O$*#~(08ʦ=ʦ==ʩ=ʬò+###~-_q46͡> *:4^q}Ò*|( w#!9! E9!!9~(+F͊!"9!(#>2*Ͳ"|>" :( ͆ *6#w*6#6 !\$![ (̈́( #:~CONTRMKBDLSTAUXUSR>2$*#~ Ͷ$*:> >w###6  #6++p>2S-$Ͷ:*6###ww#w$w#w: ##N#F*B> w#w#[s#r>2S$Ͷ$*6 #-Nw#Fwq#p#6#w#w#w* :( ͒*s#r*s#r"* 5KB!>u~#fo{_"*R0RnfR0KqputsrNF( ^VNF^V*SutKqp R*R(~w~wnf ut"6# * *!""*NFy(* "*B0Cnf* [R*"*RS[s#r^#VS>O"w2x2!"" @*>2"!"""!\Ͳ*: !~6go(\R*s#r_2x( s xu` ` 77 ` = O nf^VNF!DLT\I!!53!r1!\!> x #-= o˸xO(- }(x>8(C ,C `iM!>u|; |J>| )=|(DMbo˸ͦ88ͦx(0 8> Mx(>-Ͳ{(ay(Ͱͦ \z(>.Ͳ (Ͱ ~ͦ{>EͲ>+|(|Dg>-Ͳ|/ 0:p# ~# +>0w#,-  60#J˸}րogM| .M|( M6-#͐ͦ[R8 (G> ͒C~͒#*ͦC!h !lTRUEFALSEͦ!9^#(~#(G~͒#> ͒> Ò "F![(#RR0*4#4> RR *4 #4(>>2$*V(/˖:(#~+ x y2!͵( =( X:(R*:(###~-_-͌X> :("͟"*^˞*V˖0 SRѷR8A* N#F#s#r$ 0})jS\: *^ F* < >26"~͟*-w#ww#͟"~ <@*Ͳ!\  <ʮ!\$> >2*|>! * \$\<(!: [1Á\!(f"> 2:!<"F( #~#6e>!["N>!~8>O6*"w (=(&("( :(N 8y(~#x+% (6*#~[*#~ *~(h#"b=  8(T]DMR0 -a%}̈́o*!~6o&͠|ͣ}%^C User break1:% I/O% Run-time% error ͒%, PC=[R"͍% Program aborted*1!͍!&?Ͳ#c!!5z "zR͐b*z#Ŕ? TRUN v. 2.8 - Compiled with Turbo Pascal v. 2.0 !C !q!C !q́? This is a run-time loader, compiled with the DEFAULT START!C !q́? ADDRESS (the end of the pascal library plus 1). For proper(C = ~> x0w#xG%P %P ZJDM%P = _~65i+~hìx-Sx9?+{Η@}|C C gZJDM0D ,7}o˸  #yO!@9i&   # w# /w#*###w* N#FB ͟r+s> !T]>)j)0 0= UR!#U*^#V#N#F#^#V>">!2DM"~x(L* :O(o:" C}=( ?*-N#Fp+qq#p! * F+N+++V+^Bq#p>>> SRѷR* s#r$ s#r"S"! N#FB(^x * 6#[<(H*! Kq#p##K[! *! 4 #4! x *$ *>w""{_!"*nf}(HR0nf" ^VMDnfutqp  !C !q́? handling of variables, CHN programs run with this loader must!C !q́? be compiled with this same start address. To run a CHN file!C !q́? with a DIFFERENT start address, a new version of this loader!C !q́? may be compiled with a start address IDENTICAL to that of the!C !q́? program to be run. !C !q!C !qbŔ?To avoid this message, use the syntax: TRUN filename !C !q!C !accept no responsibility for the accuracy of the software, nor for any problems which may result from its use. - RMD - Comments or questions to: P.O. Box 1124 Fallon, Nevada 89406 } Type Cmdstr = String[127]; { Max = 32 char in CP/M-80 because the TPA } { starts at $100, overwriting everything } o run a CHN file' ,a, ' with a DIFFERENT start address, a new version of this loader' ,a, ' may be compiled with a start address IDENTICAL to that of the' ,a, ' program to be run. ' ,a,a); { Above message for CP/M-80. Use the following for CP/M-86 and MS-DOS versions of TRUN: ' This is a run-time loader compiled with DEFAULT MEMORY SIZE.' ,a, ' For proper handling of variables with MS-DOS and CP/M-86, the' ,aq́?Filename is the name (without extension) of CHN program to run.!C !q!C !q́Name of program to run: b!|+._b!!| m5z#"z!|*z!|*zn&(s*z#à#! ! e.l !CͲ!|Ͳ!"z!"v! !Ͳ! m"x*z*xͯEʨ$*z!"z*v!NEʀ$!*zn&! aEʀ$!| !*zn&e.!|Ͳ!*zn&! NEʥ$*v!"v$!| \Eʽ$!.e.!| |!NE$!| .CHN!|Ͳ!| .CH { beyond 32 characters in the command buffer. } { Theoretical max = 127, if your DOS allows. } Var Cmdline,Cmd : Cmdstr; { Declared 1st for easy passage to .CHN file } Cmdbuffer : Cmdstr Absolute $80; {--> for CP/M-80 } {*** Cmdbuffer : Cmdstr Absolute Dseg:$80; --> for CP/M-86 ***} {*** Cmdbuffer : Cmdstr Absolute Cseg:$80; --> for MS-DOS ***} I,Ltr,Z : Integer; Cmdfil : File; a : String[Program TRUN; { TRUN runs a program specified on the command line. This version works with earlier versions of CP/M-80 Turbo Pascal. Change the variable "Cmdbuffer" as shown in order to convert this version of TRUN for use with MS-DOS or CP/M-86 Turbo (v. 1 & 2). (c) August, 1985 by: Mike Dingacci, MD Program is hereby placed in the public domain. It may be used by anyone for any purpose. The author will , ' loader and the CHN programs to be run must all have the same' ,a, ' respective CODE SEGMENT, DATA SEGMENT, and FREE MEMORY sizes.' ,a, ' In order to run CHN programs with DIFFERENT memory values,' ,a, ' compile a new version of this loader whose memory values are' ,a, ' IDENTICAL to those of the files to be run. ' ,a,a,} Write( 'To avoid this message, use the syntax: TRUN filename ' ,a,a, 'Filename is the name (withoNoE&ŔTRUN v. 2.8 (08/25/85): b!| R!q͐bR͐b!F!| =!Fʹ5!aE&Ŕ- - - - - - - - - - - > !!| !q́ NOT found. !C !q!C !q́28!?"9!!>2 :D]SXN]D [ (!e}̈́A8Q0G: x@!\w# (   yV. V!h6# (*(.(!8}(*(̈́w#>?> w#a{ |͒}͛Ɛ'@'7||}>"C"6# ""͐ͩ*B"[R5*"^#V#lt <> 0 Then Write( '- - - - - - - - - - - > ', Chr(7), Cmd, ' NOT found. ' ,a,a, 'Check disk and try again! '); End; END. {TRUN} &?# ##($$D$$]$$$$$$$$%&j%&͐xW^8/w >uJ u` }>(; xQ }} ˸T}ٕ(0D=C ,= ( [ 0%D , 7 ͏ ?(8u x O - ; 8˸x X ,-xG}; }م 9; .>#n0[ D = - nx P ,-(-˸G,-; }ٕ? 9.>͏ 8u ?= u+-(>O 0u O 8haracters } While I < Ltr Do Begin { Routine builds ParamStr(1) } I := I+1; { (could build 2, 3, etc.) } If Z = 1 Then If Cmdline[I] <> ' ' Then Cmd := Cmd + Cmdline[I]; If Cmdline[I] = ' ' Then Z := Z + 1; End; If Cmd = '' Then Instruct; { Instructions if no parameters. } If Pos('.',Cmd) = 0 Then Cmd := Cmd+'.CHN'; { If no extent then = '.CHN' } If Cmd <> '.CHN' Then Begin ^#V#N#FO/o&9O/o&9!9(> (G!9 w#E͊w}8uRB0 >R@RR!+ͨ z R!+ͨ z <!+ͨ z <!+ͨ z <!#ͨ z <!+ͨ z T]KB!z> S>))0 = |JJDMgo>jB0 7?= ͫCopyright (C) 1984 BORLAND IncAKayproDelete2/920/92P= ERT###&&&~7#~=% o&ͦoͦܐԩͣ}!!"8~#(}:$= +*!Z!*B!!:(=2!Z: <2!!!:O::O:!*B͏ ?x P , 78ƀ8ƀ8ox٨!دoGOW_gɷɷ|لg{ً_zيWyىOxوG|ٔg{ٛ_zٚWyٙOx٘Gxٸyٹzٺ{ٻ|ټx٨ xx(ͼ ?}ٽÏ }ց; <(; 7D = |٤g{٣_z٢Wy١Ox٠GD u J }x>uu}ƀ/ƀo; -J }0W-J W,}l˸ͨ 8 ; ` x( -ͨ 8J -ͨ 8,J }l8;*!` ! >u` ` u--- J ,,,-xGg?+2n*8t z~,->uxu { Chain to CHN program named -- } { (unless it is a blank line). } Write('TRUN v. 2.8 (08/25/85): '); { Same v. as Turbo used to compile} Writeln(Cmd); Writeln; Assign(Cmdfil,Cmd); {$I-} Chain(Cmdfil) {$I+}; { 'file not found' error-trapping } { starts on chain to cmdfil and } { error message follows: } If IoresuH\<z5+)+<z {0Gɯgo||H}||/g}/o#}o&K[xAJSJDM!b"!6J"DM'ͬͬdͬ ͬ} wͦWͧ _}8(8J`9{T]=o`9y ,k- o&0%,` }g; }؉}颋.:}8c~I$I~L*kٷx˸; }0G,͙<},-(-J ! >0 a` o8 Oþ >um.`1pF,t6|!wS<.z}[|%FXc~ur1}Oٯx(<˸ͨ 8; !~Jͨ 0O!><ͨ 8 =  7 <` O ; 7 0 W-J OT0 j oD,:j !I}袋.}8c~I$I~L!> J= B== ͯ}8= ͵}/ͭ !*###~-_~(4Q6*>2>*##w:>*##~*#~(E[ ( ( ( !][ ( ( ((w#(6!]~-#8~>7  [>OkͼMs #rkͼpX á[ [ (( #w(q*#~[ (  *##~6͜O$*#~(08ʦ=ʦ==ʩ=ʬò+###~-_q46͡> *:4^q}Ò*|( w#!9! E9!!9~(+F͊!"9!(#>2*Ͳ"|>" :( ͆ *6#w*6#6 !\$![ (̈́( #:~CONTRMKBDLSTAUXUSR>2$*#~ Ͷ$*:> >w###6  #6++p>2S-$Ͷ:*6###ww#w$w#w: ##N#F*B> w#w#[s#r>2S$Ͷ$*6 #-Nw#Fwq#p#6#w#w#w* :( ͒*s#r*s#r"* 5KB!>u~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FB(^x * 6#[<(H*! Kq#p##K[! *! 4 #4! x *$ *>w""{_!"*nf}(HR0nf" ^VMDnfutqp  Turbo Pascal v. 2.0 !A !q!A !q!A !q́? This is a run-time loader, compiled with the DEFAULT START!A !q́? ADDRESS (the end of the pascal library plus 1). For proper!A !q́? handling of variables, CHN programs run with this loader must!A !q́? be compiled with this same start address. To run a CHN file!A !q́? with a DIFFERENT start address, a new version of this loader!A !q́? may be compiled with a start address IDENTICAL to thacters). (2) Can use the initial command in the line (ParamStr(0)). (c) August, 1985 by Mike Dingacci, MD Program is hereby placed in the public domain. It may be used by anyone for any purpose. The author will accept no responsibility for the accuracy of the software, nor for any problems which may result from its use. - RMD - Comments or  End; End; {Parse} Procedure Instruct; { v. number = same as v. of Turbo used to compile } Begin ClrScr; Gotoxy(1,4); Write( ' TRUN v. 2.c - Compiled with CP/M Turbo Pascal v. 2.0 ' ,a,a,a, { ^-->use command line at ccp instead of $80 } ' This is a run-time loader, compiled with the DEFAULT START' ,a, ' ADDRESS (the end of the pascal library plus 1). For proper' ,a, ' handling of variables, CHN progat of the!A !q́? program to be run. !A !q!A !q́?To avoid this message, use the syntax: TRUN filename !A !q!A !q́?Filename is the name (without extension) of CHN program to run.!A !q!A !q́Name of program to run: b!|+._b!!| m5zʕ$"z!|*z!|*zn&(s*z#g$! ! e.l !AͲ!n&!!R!"t!| \E$ !.e.!| |!N questions to: P.O. Box 1124 Fallon, Nevada 89406 } Type Cmdstr = String[127]; { 127 = max theoretical cmdline length } Var Cmdline,Cmd : Cmdstr; { Declared 1st for easy passage to .CHN file } I,Ltr,Z,Cmdln : Integer; Cmdfil : File; a : String[2]; Procedure Parse; Begin Cmdline := ''; Cmd := ''; { zero variables for below } I := 0; Z := 0; Ltr := Mem[Program TRUN2c; { TRUN runs a program specified on the command line. This version works with all versions of CP/M-80 Turbo Pascal and is designed to eliminate the 32-character limit imposed by using the command line buffer at $80. This limit exists whether the line is parsed by a program subroutine in earlier Turbo versions or by ParamStr and ParamCount functions in Turbo Pascal v. 3.00. Advantages: (1) Can parse longer command lines (up to 128 charrams run with this loader must' ,a, ' be compiled with this same start address. To run a CHN file' ,a, ' with a DIFFERENT start address, a new version of this loader' ,a, ' may be compiled with a start address IDENTICAL to that of the' ,a, ' program to be run. ' ,a,a, 'To avoid this message, use the syntax: TRUN filename ' ,a,a, 'Filename is the name (without extension) of CHN program to run.' ,a,a, 'NamE%!| .CHN!|Ͳ!| .CHNoE9&ŔTRUN v. 2.c (08/25/85): b!| R!q͐bR͐b!D!| =!Dʹ5!NE9&Ŕ- - - - - - - - - - - > !!| !q́ NOT found. !A !q!A !q́ ' ' Then Cmd := Cmd + Cmdline[I]; If Cmdline[I] = ' ' Then Z := Z + 1; !  e of program to run: '); Readln(Cmd); For I := 1 to Length(Cmd) Do Cmd [I] := Upcase(Cmd[I]); { Capitalize } End; {Instruct} BEGIN {TRUN} a := chr(13) + chr(10); { put CR/LF into variable a } Cmdln := mem[2] * 256 - $1600 + 7; { find start of command line (This algorithm will work even when pro- ) (bottom of CCP+7), where it (grams such as XtraKey and UniForm are ) was conveniently stored for (protected in high memory. Locatio( d!k6!{6``o&  :(͠|(  *"x2y( >28!"9!! og2"">~22!:05+:!Co&ͦͣ} [ (!e|ͧA8Q0G: x@!\w# (̓ ?(*( .( x_. _!h6# (?( *( ̓( w#>?> w#ͧ 8 !ɿ .,;:=?*[]<>{}a{ |͵};Ɛ'@'7||}>2Ͱ*Bک  "og"2>2! - - - - - - - - - - > ', Chr(7), Cmd, ' NOT found. ' ,a,a, 'Check disk and try again! '); End; END. {TRUN} ~8 (8~wPT] *  >( ͂ ͭ͘ }>( x‰ }} ˸T}ٕ(0D={ ,= ( ͓ 0%| , 7 ?(8ͭ x ͇ - s 8˸x ͐  ,-xG}s }مN 9s .>#n0͓ | = - nx ͈ ,-(-˸G,-s }ٕ?N n from ) us, in its entirety, by (06h and 07h won't work if this is true. ) cp/m! } Parse; { procedure builds Parameters and } { returns strings Cmdline and Cmd.} If Cmd = '' Then Instruct; { Instructions if no parameters. } If Pos('.',Cmd) = 0 Then Cmd := Cmd+'.CHN'; { If no extent then = .CHN } If Cmd <> '.CHN' Then Begin { Chain to CHN program name ""*B"[Rv*"^#V#^#V#N#FO/o&9O/o&9!9(> (G!9 w#Eͻw}8( RB0 >( RrRR!+ ͱ R!+ ͱ s!+ ͱ s!+ ͱ s!# ͱ s!+ ͱ T]KB!z> ͫCopyright (C) 1985 BORLAND IncBKaypro with hiliteedP=  E RC1B1~7#~=  oͦlԅ!!"~#(}:$= +*!6!*!!:(2!6:(>2!!!:O::O:!*! !45(! +/ 0y09.> 8ͭ ?= u+-(>͇ 0ͭ ͇ 8 ?x ͈ , 78ƀ8ƀ8ox٨!دoGOW_gɷɷ|لg{ً_zيWyىOxوG|ٔg{ٛ_zٚWyٙOx٘Gxٸyٹzٺ{ٻ|ټx٨ xx( ?}ٽ }ցs <(s 7| = |٤g{٣_z٢Wy١Ox٠G| ͭ ͂ }x>( ͭ}ƀ/ƀo  -͂ }0͏-͂ ͏,}l˸ 8 5 ͘ x( - 8͂ - 8,͂ }l8;*!͘ ! >5ͭ͘ ͘ ͭ--- d -- } { (unless it is a blank line). } Write('TRUN v. 2.c (08/25/85): '); { Same v. as Turbo used to compile} Writeln(Cmd); Writeln; Assign(Cmdfil,Cmd); {$I-} Chain(Cmdfil) {$I+}; { 'file not found' error-trapping } { starts on chain to cmdfil and } { error message follows: } If Ioresult = 1 Then Write( '- S>))0 = | |́́DMgo>jB0 7?= H͓<z5b)b<z {0Gɯgo||}||/g}/o#}o&K[xAJSJDM!b"!6J"DM'd } * W _}8(8J`9{T]=o`9y ( x( ͙}. ͇͂ , ! >5,ͣ- o&0% ,͘  }gs }؉}颋.:}8c~I$I~L*ͣٷx˸ }0G,<} ,-(-͂ !>J0 ͙͘ o8 ͇ >( m.`1pF,t6|!wS<.z}[|%FXc~ur1}͇ٯx(<˸ 8 !~J 0/O!>t 8 =  o t͘ ͇ /o 0 ͏-͂ OT0 j oD,::4^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*!G"""!\*: Os!~6go(\R*s#r_2x( s x(T]DMx(R0 U(͞O/o&9q# (!>F0#( ~ ( #]( ~ ( (#}(  i&T-a%ã}ͧo*!~6o&|:2!2}:__{ѯ2*|KB " z ^C User break+=  I/O Run-time error {͵, PC=*ͰNot enough memory Program aborted :m'1!e!&;>$˸}րogM| .({ = ~> x0w#xG%͈ %͈ ZJDM%͈ = _~65+~hìx-Sx9?+{Η@}|{ { gZJDM0| ,7}o˸@ #yO!@9i&"~ʱ*w#wx(9* :O *-4 #4!*4 #4 *-N#Fq#pV+^Bq#pS[ѷR'* s#r$ s#rM <?*M!\  <( !\$>2>2M:>!(* \$\<(!4: [1ð\!(7"~> 2"S"Ns#FrB(Z#\: \<(?*"}K\! !*}#"}! x \* *>* 2""{_!"*#  ?!!͜ͻ? TRUN v. 3.0 - Compiled with Turbo Pascal v. 3.0 !E;!ͫ!E;!ͫͻ? This is a run-time loader, compiled with the DEFAULT START!E;!ͫͻ? ADDRESS (the end of the pascal library plus 1). For proper!E;!ͫͻ? handling of variables, CHN programs run with this loader must!E;!ͫͻ? be compiled with this same start address. To run a CHN file!E;!ͫͻ? with a DIFFERENT start address, a new version of this loader!E;!ͫͻ? may  will accept no responsibility for the accuracy of the software, nor for any problems which may result from its use. - RMD - Comments or questions to: P.O. Box 1124 Fallon, Nevada 89406 } Var Cmdline,Cmd : String[127]; Cmdfil : File; a : String[2]; I : Integer; Procedure Instruct; { v. numberhave the same' ,a, ' respective CODE SEGMENT, DATA SEGMENT, and FREE MEMORY sizes.' ,a, ' In order to run CHN programs with DIFFERENT memory values,' ,a, ' compile a new version of this loader whose memory values are' ,a, ' IDENTICAL to those of the files to be run. ' ,a,a,} Write( 'To avoid this message, use the syntax: TRUN filename ' ,a,a, 'Filename is the name (without extension) of CHN program to run.' ,a,a, 'Name obe compiled with a start address IDENTICAL to that of the!E;!ͫͻ? program to be run. !E;!ͫ!E;!ͫ ͜ͻ?To avoid this message, use the syntax: TRUN filename !E;!ͫ!E;!ͫͻ?Filename is the name (without extension) of CHN program to run.!E;!ͫ!E;!ͫͻName of program to run:  !x͏ !!x;ͤgz$"C!x*C!x*Cn&s*C#Ú$N!xN!! ! e.ͣ >!E!͜ = same as v. of Turbo used to compile } Begin ClrScr; Gotoxy(1,4); Write( ' TRUN v. 3.0 - Compiled with Turbo Pascal v. 3.0 ' ,a,a, ' This is a run-time loader, compiled with the DEFAULT START' ,a, ' ADDRESS (the end of the pascal library plus 1). For proper' ,a, ' handling of variables, CHN programs run with this loader must' ,a, ' be compiled with this same start address. To run a CHN file' ,a, ' with a DIFFERENT start addr Program TRUN; { TRUN runs a program specified on the command line. This version will work ONLY with Turbo Pascal v. 3.00A. It should work with either CP/M or MS-DOS. For earlier versions of Turbo, TRUN v. 2.8 uses a different algorithm to parse the command line. (c) July, 1985 by Mike Dingacci, MD Program is hereby placed in the public domain. It may be used by anyone for any purpose. The authorf program to run: '); Readln(Cmd); For I := 1 to Length(Cmd) Do Cmd [I] := Upcase(Cmd[I]); { Capitalize } End; {Instruct} BEGIN Cmd := ''; Cmdline := ''; a := chr(13) + chr(10); { initialize variables } For I := 1 to ParamCount do Cmdline := Cmdline+' '+Paramstr(I); If ParamCount>0 Then Cmd := ParamStr(1) Else Instruct; { instructions if no parameters } If Pos('.',Cmd) = 0 Then Cmd := Cmd+'.CHN'; { adds gz8%"C!;! e.>*C~>!*C#%͜!EY%!~!x\%!!.e.!x;ͳ!̀Eʒ%!x;N.CHN>!x!x;N.CHN͡Eʮ&͜ͻTRUN v. 3.0 (08/18/85):  !x;͜!ͫ ͜ !H!x;q!H!̀Eʮ&͜ͻ- - - - - - - - - - - > !#!x;!ͫͻ NOT found. !E;!ͫ!E;!ͫͻ '.CHN' Then Begin { routine chains to .CHN program } { named in ParamStr(1) } Write('TRUN v. 3.0 (08/18/85): '); { same v. as TURBO used to compile} Writeln(Cmd); Writeln; Assign(Cmdfil,Cmd); {$I-} Chain(Cmdfil) {$I+}; { 'file not found' error-trapping } { starts on chain to cmdfil and } H\<z5+)+<z {0Gɯgo||H}||/g}/o#}o&K[xAJSJDM!b"!6J"DM'ͬͬdͬ ͬ} wͦWͧ _}8(8J`9{T]=o`9y 28!?"9!!>2 :D]SXN]D [ (!e}̈́A8Q0G: x@!\w# (   yV. V!h6# (*(.(!8}(*(̈́w#>?> w#a{ |͒}͛Ɛ'@'7||}>"C"6# ""͐ͩ*B"[R5*"^#V#a}.; OJ , ; !U >,k- o&0%,` }g; }؉}颋.:}8c~I$I~L*kٷx˸; }0G,͙<},-(-J ! >0 a` o8 Oþ >um.`1pF,t6|!wS<.z}[|%FXc~ur1}Oٯx(<˸ͨ 8; !~Jͨ 0O!><ͨ 8 =  7 <` O ; 7 0 W-J OT0 j oD,:j !I}袋.}8c~I$I~L!> { error message follows: } If Ioresult = 1 Then Write( '- - - - - - - - - - - > ', Chr(7), Cmd, ' NOT found. ' ,a,a, 'Check disk and try again! '); End; END. {TRUN} xW^8/w >uJ u` }>(; xQ }} ˸T}ٕ(0D=C ,= ( [ 0%D , 7 ͏ ?(8u x O - ; 8˸x X ,-xG}; }م 9; .>#n0[ D = - nx P ,-(-˸G,-; }ٕ? 9.>͏ 8u ?= u+-(>O 0u O 8^#V#N#FO/o&9O/o&9!9(> (G!9 w#E͊w}8uRB0 >R@RR!+ͨ z R!+ͨ z <!+ͨ z <!+ͨ z <!#ͨ z <!+ͨ z T]KB!z> S>))0 = |JJDMgo>jB0 7?= u` ` 77 ` = O nf^VNF!DLT\I!!53!r1!\!> x #-= o˸xO(- }(x>8(C ,C `iM!>u|; |J>| )=|(DMbo˸ͦ88ͦx(0 8> Mx(>-Ͳ{(ay(Ͱͦ \z(>.Ͳ (Ͱ ~ͦ{>EͲ>+|(|Dg>-Ͳ|/ 0:p# ~# +>0w#,-  60#J˸}րogM| .ͫCopyright (C) 1984 BORLAND IncAKayproDelete2/920/92P= ERT###&&&~7#~=% o&ͦoͦܐԩͣ}!!"8~#(}:$= +*!Z!*B!!:(=2!Z: <2!!!:O::O:!*B͏ ?x P , 78ƀ8ƀ8ox٨!دoGOW_gɷɷ|لg{ً_zيWyىOxوG|ٔg{ٛ_zٚWyٙOx٘Gxٸyٹzٺ{ٻ|ټx٨ xx(ͼ ?}ٽÏ }ց; <(; 7D = |٤g{٣_z٢Wy١Ox٠GD u J }x>uu}ƀ/ƀo; -J }0W-J W,}l˸ͨ 8 ; ` x( -ͨ 8J -ͨ 8,J }l8;*!` ! >u` ` u--- J ,,,-xGg?+2n*8t z~,->uxu%  (C = ~> x0w#xG%P %P ZJDM%P = _~65i+~hìx-Sx9?+{Η@}|C C gZJDM0D ,7}o˸  #yO!@9i&   # w# /w#*###w* N#FB ͟r+s> !T]>)j)0 0= UR!#U*^#V#N#F#^#V>">!2DM"~x(L* :O(o:" C}=( ?*-N#Fp+qq#p! * F+N+++V+^Bq#p>>> SRѷR* s#r$ s#r"S"! N#FB(^x * 6#[<(H*! Kq#p##K[! *! 4 #4! x *$ *>w""{_!"*nf}(HR0nf" ^VMDnfutqp J= B== ͯ}8= ͵}/ͭ !*###~-_~(4Q6*>2>*##w:>*##~*#~(E[ ( ( ( !][ ( ( ((w#(6!]~-#8~>7  [>OkͼMs #rkͼpX á[ [ (( #w(q*#~[ (  *##~6͜O$*#~(08ʦ=ʦ==ʩ=ʬò+###~-_q46͡> *:4^q}Ò*|(!C!7bR!bR!bR! bR! bR! bR!bR!bcŔThis line is in reverse͐b R͐b!B ŔThis line is blinking͐b2 R͐b!BK ŔThis line is underlined͐bd R͐b! BŔThis cursor is now ON͐b!BR͐bŔThe cursor is now OFF͐b͖ !BR͐bŔIt is now back ON͐b} ! B!R͐bŔDing͐b!B!ŔDing͐b!B!ŔDing͐b!Bc w#!9! E9!!9~(+F͊!"9!(#>2*Ͳ"|>" :( ͆ *6#w*6#6 !\$![ (̈́( #:~CONTRMKBDLSTAUXUSR>2$*#~ Ͷ$*:> >w###6  #6++p>2S-$Ͷ:*6###ww#w$w#w: ##N#F*B> w#w#[s#r>2S$Ͷ$*6 #-Nw#Fwq#p#6#w#w#w* :( ͒*s#r*s#r"* 5KB!>u~#fo{_"*R0RnfR0KqputsrNF( ^VNF^V*SutKqp R*R(~w~wnf ut"6# * *!""*NFy(* "*B0Cnf* [R*"*RS[s#r^#VS>O"w2x2!"" @*>2"!"""!\Ͳ*: !~6go(\R*s#r_2x( s xM|( M6-#͐ͦ[R8 (G> ͒C~͒#*ͦC!h !lTRUEFALSEͦ!9^#(~#(G~͒#> ͒> Ò "F![(#RR0*4#4> RR *4 #4(>>2$*V(/˖:(#~+ x y2!͵( =( X:(R*:(###~-_-͌X> :("͟"*^˞*V˖0 SRѷR8A* N#F#s#r$ 0})jS\It is now back ON͐b} ! B!R͐bŔDing͐b!B!ŔDing͐b!B!ŔDing͐b!Bc: *^ F* < >26"~͟*-w#ww#͟"~ <@*Ͳ!\  <ʮ!\$> >2*|>! * \$\<(!: [1Á\!(f"> 2:!<"F( #~#6e>!["N>!~8>O6*"w (=(&("( :(N 8y(~#x+% (6*#~[*#~ *~(h#"b=  8(T]DMR0 -a%}̈́o*!~6o&͠|ͣ}%^C User break1:% I/O% Run-time% error ͒%, PC=[R"͍% Program aborted*1!͍!#0Ͳn!R!!B!0bR!!C!0bR!!B!2bR!!C!2bR!!B!3bR!!C!3bR!!B!4bR!!C!4bR!!B!6bR!!C!6bR!!B!7bR!&   { * * * * * * * * * * * * * * * * * * * * * * * * * * * * Video and Graphics * * Demonstration * * * * Jack E. Heiss * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is a Jack E. Heiss * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * } {Procedures available in this Include file: ReverseOn; ReverseOff; BlinkOn; BlinkOff; UnderLineOn; UnderLineOff; CursorOn; CursorOff; RememberCursor; RecallCursor; StatusLineOn; 0); ClrScr; End. Turns Cursor on/off.} Procedure CursorOn; Begin Write(chr(27),chr(66),chr(52)); End; Procedure CursorOff; Begin Write(chr(27),chr(67),chr(52)); End; {Procedures RememberCursor/RecallCursor - These procedures are for remebering a cursor position on the screen and then recalling that position.} Procedure RememberCursor; Begin Write(chr(27),chr(66),chr(54)); End; Procedure RecallCursor; Begin Write(chr(27),chr(67),chr(54)); End; demonstration of some of the programming techniques that can be used with VIDEO84.BOX and GRAFIX84.BOX.} {$I video84.box} Begin ClrScr; ReverseOn; Writeln('This line is in reverse'); ReverseOff; Writeln; Delay(2000); BlinkOn; Writeln('This line is blinking'); BlinkOff; Writeln; Delay(4000); UnderlineOn; Writeln('This line is underlined'); UnderlineOff;  StatusLineOff; CursorLeft; CursorRight; CursorDown; CursorUp; ClrEOS; Home; RingBell; } {Procedures ReverseOn/ReverseOff - Turns on/off the reverse video feature.} Procedure ReverseOn; Begin Write(chr(27),chr(66),chr(48)); End; Procedure ReverseOff; Begin Write(chr(27),chr(67),chr(48)); End; {Procedures BlinkOn/BlinkOff { * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Video Procedures * * in * * Turbo PASCAL * * for the * * KAYPRO Universal Board * * * *  {Procedures StatusLineOn/StatusLineOff - Turns on/off the status line (line 24) preservation features.} Procedure StatusLineOn; Begin Write(chr(27),chr(66),chr(55)); End; Procedure StatusLineOff; Begin Write(chr(27),chr(67),chr(55)); End; {Procedure RingBell - rings the console bell.} Procedure RingBell; Begin Write(chr(7)); End; {Procedures CursorLeft,CursorRight,CursorDown,CursorUp - move the cursor in the specified direction.} Proce Writeln; Delay(3000); Writeln('This cursor is now ON'); Delay(2000); Writeln; WriteLn('The cursor is now OFF'); CursorOff; Delay(2000); Writeln; Writeln('It is now back ON'); CursorOn; Delay(3000); RingBell; Writeln; Writeln('Ding'); Delay(500); RingBell; Writeln('Ding'); Delay(500); RingBell; Writeln('Ding'); Delay(200 - Turns on/off the video blinking features.} Procedure BlinkOn; Begin Write(chr(27),chr(66),chr(50)); End; Procedure BlinkOff; Begin Write(chr(27),chr(67),chr(50)); End; {Procedures UnderlineOn/UnderlineOff - Turns on/off the video underlining features.} Procedure UnderlineOn; Begin Write(chr(27),chr(66),chr(51)); End; Procedure UnderlineOff; Begin Write(chr(27),chr(67),chr(51)); End; {Procedures CursorOn/CursorOff - '  dure CursorLeft; Begin Write(chr(8)); End; Procedure CursorRight; Begin Write(chr(12)); End; Procedure CursorDown; Begin Write(chr(10)); End; Procedure CursorUp; Begin Write(chr(11)); End; {Procedure ClrEOS - clears from the cursor to the end of the screen.} Procedure ClrEOS; Begin Write(chr(23)); End; {Procedure Home - moves the cursor to the beginning of the screen but does not erase the screen.} Procedure Home; Begin Write(chr(30)); End; {End of Video84.pas}