home *** CD-ROM | disk | FTP | other *** search
- LIBRARY MAINTENANCE
-
- by Ray Penley
-
-
- Wσá havσ founΣ tha⌠ somσ oµ thσ member≤ arσ havinτá problem≤ ì
- creatinτá thei≥ owε librarie≤ oµ commonl∙ useΣ routines«á A≤ yo⌡ ì
- kno≈á i⌠ i≤ oµ primar∙ importancσ t∩ havσ ß librar∙á oµá routine≤ ì
- tha⌠á yo⌡ don'⌠ havσ t∩ kee≡ writinτ ove≥ anΣ ove≥á again«á Wheε ì
- yo⌡á writσ you≥ prograφ yo⌡ onl∙ havσ t∩ referencσ thσ routinσ a≤ ì
- an external and then use the routine freely in your program.
-
- Wσá arσá goinτá t∩á creatσ ß librar∙á oµá commonl∙á routine≤ ì
- presentl∙á founΣá iε thσ "┌ User≤ Groupó librar∙á anΣá cal∞á thi≤ ì
- new library ASL.REL (A Small Library).
-
- T∩ makσ ß librar∙ yo⌡ mus⌠ firs⌠ havσ ß subroutinσ assembleΣ ì
- int∩ ß .RE╠ file« Iµ yo⌡ neeΣ hel≡ witΦ thi≤ procedure¼ thσ tex⌠ ì
- filσá MAKEREL.DO├ founΣ oε volumσ #▒ shoulΣ be most helpful.
-
- Ruεá thσá linke≥á bu⌠ ente≥ thσá librariaεá modσá b∙á typinτ ì
- /L:filename« Sincσ wσ wan⌠ t∩ cal∞ ou≥ librar∙ AS╠ let≤ star⌠ b∙ ì
- typing:
-
- A>LINK /L:ASL
-
-
- No≈á yo⌡á specif∙ thσ file≤ t∩ bσ includeΣ iεá thσá library« ì
- *** REMARKS ***
- *KEYIN found on volumes #3 and #4
- *CHAIN found on Pascal/Z library disk
- *INPORT found on volume #3
- *OUTPORT found on volume #3
- *DELAY found on volume #3
- *RANDOM found on volume #3
- *HALT found on this volume
- */E Typing /E closes the output file
-
- NOTES:
- Iµá yo⌡ makσ ß mistakσ yo⌡ caε alway≤ restar⌠ thσ linke≥á b∙ ì
- typing /R.
- Iµá ß filσ witΦ thσ samσ namσ alread∙ exist≤ oε thσ disδá i⌠ ì
- wil∞ bσ deleteΣ anΣ theε ß ne≈ filσ wil∞ bσ created¼á s∩ bσá ver∙ ì
- carefu∞ a⌠ thi≤ step.
- Thσá orde≥á oµá entr∙á int∩á thσá librar∙á ma∙á bσá oµá somσ ì
- importance«á Sincσá thσ librar∙ i≤ loadeΣ iε onσ pass¼á ß modulσ ì
- shoulΣ appea≥ afte≥ i⌠ ha≤ beeε referenceΣ b∙ aε externa∞á symbo∞ ì
- iε othe≥ modules.
- .paè No≈ i⌠ i≤ ß simplσ matte≥ t∩ usσ ou≥ ne≈ library«á Let≤ usσ ì
- the routine KEYIN in a sample program.
-
- Program DRead;
- { A program to directly read a char from the keyboard.}
-
- LABEL 1;
- VAR CH: CHAR;
-
- Procedure KEYIN(VAR C:CHAR); EXTERNAL;
-
- BEGIN
- WHILE TRUE DO
- BEGIN
- WRITE('ENTER A CHARACTER ');
- KEYIN(CH);
- IF ( ORD(CH)=3 ) THEN GOTO 1;
- WRITELN('YOU ENTERED A ',CH);
- END;
- 1: {EXIT HERE ON CONTROL-C}
- END.{ of DREAD }
-
-
- Now compile the program:
-
- A>PASCAL DREAD.BBB
- A>ASMBL MAIN,DREAD.BB/REL
- A>LINK /N:B:DREAD B:DREAD ASL/S /E
-
-
- That'≤ al∞ therσ i≤ t∩ itíá Noticσ tha⌠ thσ ne≈ librar∙á i≤ ì
- oε thσ samσ disδ a≤ PASCAL.COM¼ ASMBL.COM¼ LIB.RE╠ AN─ LINK.COM«
-
-
- ╔á havσ writteε ß submi⌠ filσ tha⌠ wil∞ allo≈ yo⌡ t∩ compilσ ì
- ßá prograφá anΣ u≡ t∩ │ additiona∞ librar∙á files«á Executσá thσ ì
- submi⌠ filσ likσ so:
-
- A>SUBMIT COMPILE PROGRAM DRIVE LIBRARY/S
- A>SUBMIT COMPILE my PROGRAM on DRIVE using LIBRARY/S
-
-
- We can compile and link our sample program in one step:
-
- A>SUBMIT COMPILE DREAD B ASL/S
-
- Isn'⌠á tha⌠ easyíá Thσ .CO═ filσ wil∞ bσ placeΣ oε thσá samσ ì
- drivσ a≤ thσ Pasca∞ sourcσ program«á Notσ tha⌠ yo⌡ mus⌠ cal∞ fo≥ ì
- thσá librar∙á filσ witΦ thσ /╙ optioε elsσ yo⌡ loaΣ iε thσá wholσ ì
- library.
- .paèCall this file COMPILE.SUB
-
- Pascal $1.$2$2$2
- asmbl main,$1.$2$2/rel
- ERA $2:$1.SRC
- link /n:$2:$1 $2:$1 $3 $4 $5 lib/s/E
- ERA $2:$1.REL
- :
- FILES $2:$1.*
-
-
- That'≤ al∞ fo≥ now«á Iµ yo⌡ havσ an∙ question≤ fee∞ freσ t∩ cal∞ ì
- mσ o≥ dro≡ ß note«
-
- RAYMOND E. PENLEY
- 1263 ALLEN COURT
- WALDORF, MD 20601
- (301) 645-9632 (evenings or weekends only)
- .paè