home *** CD-ROM | disk | FTP | other *** search
Text File | 1985-02-10 | 106.4 KB | 3,313 lines |
- .he SYSLIB User and Reference Manual
- .fo 1 - Introduction Page #
- .pn 1
-
-
-
- SYSLIB -- An Integrated Library of Assembly Language
- Utility Subroutines for use with the Microsoft M80 Assembler
-
-
- 1.0 Introduction
-
- 1.01 What is SYSLIB?
-
- SYSLI┬á (SYSteφ LIBrary⌐ i≤ ß collectioε oµ ove≥ 13░ subrouì
- tine≤ whicΦ arσ designeΣ t∩ providσ t∩ thσ CP/═ 8080/Z8░ assembl∙ ì
- languagσá programme≥ ß se⌠ oµ function≤ upoε whicΦ hσá caεá builΣ ì
- hi≤ programs« Thi≤ librar∙ i≤ intendeΣ t∩ relievσ thσ programme≥ ì
- oµá thσ tasδ oµ frequentl∙ "reinventinτ thσ wheeló anΣ t∩ providσ ì
- hiφ witΦ aε environmen⌠ oµ reliablσ tool≤ whicΦ encourage≤ strucì
- tureΣ programminτ a⌠ thσ assembl∙ languagσ level.
-
- EacΦá subroutinσ withiε SYSLI┬ caε bσ vieweΣ a≤á ßá reliablσ ì
- "blacδ box.ó Thσ subroutine≤ iε SYSLI┬ arσ completel∙ documenteΣ ì
- withiεá thi≤ 112½ pagσ manua∞ anΣ thσ SYSLIBx.HL╨ files¼á anΣ thσ ì
- programme≥á i≤ consistentl∙ provideΣ witΦ thσ followinτá informaì
- tion:
- 1. Name of Subroutine
- 2. Function it performs
- 3. What its inputs are
- 4. What its outputs are
- 5. What registers are affected by it
- 6. What other library routines it calls upon
- 7. What errors can occur and how it handles them
-
- Thσ routine≤ withiε SYSLI┬ arσ designeΣ t∩ worδ togethe≥ anΣ ì
- complemen⌠ eacΦ other«á Paramete≥ passinτ i≤ consisten⌠á betweeε ì
- thσ variou≤ subroutines╗á Fo≥ instance¼á al∞ routine≤ whicΦ neeΣ ì
- t∩á bσá passeΣ ß pointe≥ t∩ ß Filσ Contro∞ Blocδ arσ passeΣá tha⌠ ì
- pointe≥ iε thσ D┼ registe≥ pair«á A≤ ß genera∞ rule¼ iµ ß regisì
- te≥ i≤ no⌠ returneΣ a≤ aε outpu⌠ froφ thσ SYSLI┬ subroutine¼ theε ì
- it≤ valuσ i≤ no⌠ affecteΣ (i⌠ ha≤ thσ samσ valuσ wheε thσ routinσ ì
- i≤ exiteΣ a≤ i⌠ haΣ wheε thσ routinσ wa≤ called).
-
- SYSLI┬á itselµá i≤ ß librar∙ oµ relocatablσá objec⌠á module≤ ì
- createΣá iεá thσ Microsof⌠ M8░ relocatablσá objec⌠á format«á Al∞ ì
- subroutine≤ withiε SYSLI┬ arσ groupeΣ withiε functionally-relateΣ ì
- modules«á Oncσá ß routinσ i≤ referenceΣ (b∙ thσ EX╘ statemen⌠ iε ì
- thσ M8░ assembl∙ languagσ program)¼á it≤ modulσ i≤ loadeΣ anΣá i⌠ ì
- i≤á availablσá t∩ thσ programme≥ b∙ mean≤ oµ ß simplσá subroutinσ ì
- call«á Al∞á othe≥ subroutine≤ withiε tha⌠ particula≥ modulσá arσ ì
- als∩ loaded¼á bu⌠ the∙ arσ no⌠ availablσ t∩ thσ programme≥ unles≤ ì
- hσá ha≤ als∩ referenceΣ theφ b∙ EX╘ statements«á Thσá modulσá i≤ ì
- loadeΣá onl∙á once¼á regardles≤ oµ ho≈ man∙ routine≤á withiεá thσ ì
- modulσá arσ referenced«á Fo≥ thi≤ reason¼á ╔ havσ designeΣá eacΦ ì
- modulσá t∩ contaiε routine≤ whicΦ arσ frequentl∙ useΣ togethe≥ o≥ ì
- arσá calleΣá b∙ eacΦ othe≥ (onσ routinσ withiε thσá modulσá call≤ ì
- another routine within the module).è
- 1.02 What is Needed to Use SYSLIB?
-
- Yo⌡á neeΣ aε 8080- o≥ Z80-baseΣ microcompute≥ witΦ a⌠á leas⌠ ì
- 48╦á byte≤ oµ contiguou≤ memor∙ runninτ CP/═ 2.2¼á thσá Microsof⌠ ì
- M8░á assemble≥ too∞ se⌠ (specifically¼á thσ M8░ assemble≥ anΣ thσ ì
- L8░ linker)¼á anΣ thσ usua∞ se⌠ oµ softwarσ developmen⌠ tool≤ (aε ì
- edito≥ and¼ preferably¼ ß debugger⌐ t∩ usσ SYSLIB.
-
-
-
- 1.03 What Does SYSLIB Buy Me?
-
- Thσ bottoφ linσ i≤ that¼á t∩ thσ experienceΣ SYSLI┬ programì
- mer¼á SYSLI┬ ha≤ thσ potentia∞ oµ beinτ ß significan⌠ too∞á whicΦ ì
- enable≤ hiφ to:
-
- 1. Solve his programming task quickly
- -- becausσá hσ spend≤ les≤ timσ writinτá comì
- áááámonly-useΣ subroutine≤ anΣ worryinτ abou⌠ ho≈ hi≤ regisì
- ááááter≤á arσá affecteΣ b∙ thesσ subroutine≤ anΣá morσá timσ ì
- ááááconcentratinτ oε thσ probleφ a⌠ hand
-
- áááá 2. Write space- and speed-efficient code
- áááá -- becausσá al∞á oµ thσ SYSLI┬ routine≤á havσ ì
- áááábeeε gonσ ove≥ timσ anΣ timσ agaiε t∩ reducσ thei≥á sizσ ì
- ááááanΣá makσá theφ morσ efficien⌠ iε term≤á oµá speed╗á fo≥ ì
- ááááexample¼á thσá SOR╘ routinσ i≤ ß Shel∞ Sor⌠ tha⌠ caεá bσ ì
- áááácalleΣ t∩ perforφ thσ sor⌠ usinτ pointer≤ (iε whicΦ casσ ì
- áááái⌠á exchange≤ pointer≤ rathe≥ thaε record≤ wheε i⌠ need≤ ì
- áááát∩ d∩ ß swap⌐ o≥ perforφ thσ sor⌠ withou⌠ usinτ pointer≤ ì
- áááá(wheε spacσ i≤ ß facto≥ anΣ therσ ma∙ no⌠ bσ enougΦ rooφ ì
- ááááfo≥ ß pointe≥ table)
-
- áááá 3« Writσ morσ maintainablσ code
- áááá -- becausσ SYSLI┬ i≤ designeΣ witΦ structureΣ ì
- ááááprogramminτ philosoph∙ iε mind╗ eacΦ subroutinσ i≤ equiì
- áááávalen⌠á t∩ ß proces≤ box¼á havinτ (1⌐ onl∙ onσá entrancσ ì
- ááááanΣ onσ exit¼á (2⌐ ß precisely-defineΣ function¼ anΣ (3⌐ ì
- ááááß precisely-defineΣ se⌠ oµ inpu⌠ anΣ outpu⌠á parameters╗ ì
- ááááhavinτá useΣá SYSLI┬ fo≥ somσ timσ now¼á thσ autho≥á ha≤ ì
- áááánoteΣ tha⌠ hi≤ programminτ though⌠ processe≤ anΣ prograφ ì
- áááádesign≤á havσ tendeΣ morσ anΣ morσ towarΣá end-inôá (top-ì
- áááádowε froφ thσ objectivσ poin⌠ oµ vie≈ anΣ bottom-u≡ froφ ì
- ááááthσ SYSLI┬ subroutinσ poin⌠ oµ view)¼ structureΣ design≤ ì
- áááátha⌠á hσá caεá g∩ bacδ t∩ a⌠ ß late≥á datσá anΣá readil∙ ì
- áááádeciphe≥ anΣ modify
-
-
- áááá 4. Reduce the programming effort
- áááá -- becausσá SYSLI┬ provide≤ ß numbe≥ oµá ver∙ ì
- ááááinvolveΣ routine≤ whicΦ would¼ iε themselves¼ takσ quitσ ì
- áááásomσá timσ t∩ code╗á fo≥ example¼á thσ DIR╞ routinσ wil∞ ì
- ááááloaΣ thσ director∙ oµ ß disδ int∩ memory¼á selec⌠ ßá se⌠ ì
- ááááoµá file≤á froφ tha⌠ loadeΣ director∙ a≤ specifieΣ b∙á ß ì
- ááááFilσ Contro∞ Blocδ anΣ ß flaτ whicΦ indicate≤ whethe≥ t∩ ì
- ááááincludσ Systeφ o≥ Non-Systeφ file≤ anΣ wha⌠ use≥ areß i≤ ì
- áááát∩á bσ examined¼á pack≤ thσ loadeΣá director∙á (removinτ ì
- ááááentrie≤ no⌠ selecteΣ froφ thσ memor∙ buffer)¼á alphabetì
- ááááize≤á thσ director∙ entrie≤ b∙ filσ namσ anΣ typσ o≥á b∙ ì
- ááááfilσá typσ anΣ name¼á anΣ return≤ ß pointe≥ t∩ thσ firs⌠ ì
- ááááentr∙ anΣ ß coun⌠ oµ thσ numbe≥ oµ entrie≤ selected
-
-
- Iε man∙ ways¼á SYSLI┬ bring≤ somσ oµ thσ advantage≤ oµá proì
- gramminτá iεá ß High-Orde≥ Language¼á likσ ├ o≥á Pascal¼á t∩á thσ ì
- assembl∙á languagσá programmer«á I⌠á allow≤ hiφ t∩á maintaiεá thσ ì
- smalle≥ codσ sizσ anΣ greate≥ efficienc∙ whicΦ caε bσ realizeΣ iε ì
- assembl∙á languagσ programminτ anΣ simultaneousl∙ realizσá ßá reì
- duceΣá life-cyclσá cos⌠á (froφ developmen⌠ t∩ fieldinτá t∩á post-ì
- fieldinτá maintenancσá anΣ modification⌐ ove≥á assembl∙á languagσ ì
- programminτ withou⌠ ß SYSLIB-likσ too∞ set.
-
-
-
- 1.04 How Do I Assemble with SYSLIB?
-
- EacΦá examplσ iε Sectioε 2▒ oµ thi≤ manua∞ show≤ aε assembl∙ ì
- oµ thσ samplσ program«á ╔ frequentl∙ usσ ß commanΣ file¼ whicΦ ╔ ì
- cal∞ M80.SUB¼á t∩ assemblσ m∙ programs«á Thi≤ commanΣ filσ take≤ ì
- onl∙ onσ parameter¼á thσ namσ oµ thσ filσ t∩ bσ assembleΣ WITHOU╘ ì
- its type (MAC is assumed). Warning: The command MUST be:
-
- SUB M80 filename
-
- and it MUST NOT be:
-
- SUB M80 filename.typ
-
- Iµá i⌠á i≤ oµ thσ latte≥ form¼á thσ sourcσ codσ wil∞á bσá deleteΣ ì
- durinτ thσ assembl∙ processí Yo⌡ ma∙ wisΦ t∩ removσ the
-
- ER┴ $1.BAK
-
- commanΣ iε thσ M80.SU┬ filσ t∩ eliminatσ thi≤ problem« ╔ onl∙ d∩ ì
- this for a space savings.
-
-
- My M80.SUB command file is:
-
- ; M80.SUB -- MACRO-80 Assembler and Linker
- M80 =$1
- SUB /A PLEASE ABORT IF ERROR(S) EXIST
- ERA $1.BAK
- ERA $1.COM
- L80 /P:100,$1,A:SYSLIB/S,$1/N,/U,/E
- ERA $1.REL
- ; ASSEMBLY COMPLETE
-
- ╔ ruε ZCPR▓ insteaΣ oµ thσ CP/═ 2.▓ CCP¼á anΣ ╔ aφ alway≤ oε ì
- Drivσá B║á doinτá m∙á developmen⌠á work¼á whilσá m∙á editor≤á anΣ ì
- assembler≤ (anΣ SYSLIB.REL⌐ arσ oε Drivσ A:«á Notσ tha⌠ thi≤á i≤ ì
- reflected in M80.SUB, where L80 looks for A:SYSLIB for the scan.
-
-
-
- 1.05 How Do I Learn to Use SYSLIB Effectively?
-
- Thi≤ is¼ oµ course¼ opinion¼ bu⌠ ╔ fee∞ tha⌠ thσ bes⌠ wa∙ t∩ ì
- learn how to use SYSLIB would involve the following steps:
-
- 1«á Stud∙á thσá SYSLI┬ manua∞ iε aε overvie≈á fashion¼ ì
- familiarizinτá yourselµá witΦ thσ function≤á oµá thσá subroutine≤ ì
- available
-
- 2«á Stud∙ iε somσ detai∞ thσ samplσ sourcσ program≤ iε ì
- Sectioε 21¼ jumpinτ bacδ t∩ thσ maiε bod∙ oµ thσ manua∞ froφ timσ ì
- t∩á timσ t∩ seσ wh∙ thσ routine≤ ╔ selecteΣ iε thσ program≤á werσ ì
- used in the way I used them
-
- 3« Tr∙ codinτ ß couplσ oµ thσ routine≤ iε thi≤ manual¼ ì
- copying them verbatim and assembling them
-
- 4« Tr∙ makinτ u≡ ß fe≈ simplσ problem≤ oµ you≥ owε anΣ ì
- use SYSLIB to code them
-
- 5«á Appl∙á SYSLI┬ t∩ ß significan⌠ prograφ yo⌡ wan⌠ t∩ ì
- write
-
- ╔ aφ ß stronτ advocatσ oµ writinτ program≤ iε orde≥ t∩ learε ì
- ho≈ t∩ program¼á anΣ ╔ fee∞ tha⌠ i⌠ i≤ mos⌠ importan⌠ t∩ (1⌐ gaiε ì
- a≤á mucΦ familiarit∙ witΦ thσ SYSLI┬ routine≤ a≤ yo⌡ caε anΣá (2⌐ ì
- t∩ writσ program≤ usinτ thesσ routines.
-
-
-
-
- 1.06 Who May Use SYSLIB?
-
- SYSLI┬ i≤ hereb∙ releaseΣ t∩ thσ publiπ domain«á Anyonσ wh∩ ì
- wishe≤ t∩ US┼ i⌠ ma∙ d∩ s∩ witΦ n∩ string≤ attached«á Thσ autho≥ ì
- assume≤ n∩ responsibilit∙ o≥ liabilit∙ fo≥ thσ usσ oµ SYSLIB« I⌠ ì
- i≤ copyrighteΣ b∙ thσ author¼á RicharΣ Conn¼á wh∩ ha≤ solσ right≤ ì
- t∩á it«á SYSLI┬ anΣ it≤ associateΣ documentatioε ma∙ bσ solΣá b∙ ì
- itselµá o≥á a≤ aε independen⌠ par⌠ oµ ß packagσ oµ program≤á onl∙ ì
- witΦá thσ express¼á writteε consen⌠ oµ thσ author«á Thσá author¼ ì
- however¼ support≤ thσ usσ oµ SYSLI┬ b∙ commercia∞ softwarσ develì
- opers¼á anΣá place≤ n∩ restrictioε oε thσ salσ oµ program≤á whicΦ ì
- arσá BASE─ oε SYSLI┬ anΣ usσ routine≤ containeΣ withiε SYSLI┬á t∩ ì
- perforφ thei≥ majo≥ functions.
-
-
-
- ╔á hopσ yo⌡ enjo∙ usinτ SYSLI┬ anΣ finΣ i⌠ t∩ bσ a≤ usefu∞ ß ì
- tool as I do.
-
- Richard Conn
-
- .fo 2 - Directory Manipulation Routines Page #
-
- 2.0 SYSLIB Directory Manipulation Routines
-
-
- 2.01 Introduction
- Thi≤ se⌠ oµ SYSLI┬ routine≤ concern≤ itselµ witΦ thσ loadinτ ì
- oµ anΣ acces≤ oµ ß disδ director∙ fo≥ thσ genera∞ purpose≤ oµ thσ ì
- user. Included in this set of routines are the functions of:
-
- 1. Preallocation of buffer space for the routines
-
- 2. Two routines which load all undeleted directory
- entries into a buffer, constantly checking for
- memory overflow as they go
- DIRLOAD loads the first entry for each file
- (this is the faster of the two)
- DIRSLOAD loads the last entry for each file
- (this routine is required if the
- user wishes to compute file sizes)
-
- 3. A routine to determine the amount of free space on
- the disk
-
- 4. A routine to compute the size of a file in K
-
- 5. A routine to sort a loaded directory by file name
- and type or by file type and name
-
- 6. A routine to select (by marking) a set of directory
- entries which match a given ambiguous file spec
-
- 7. A routine to pack the loaded directory, leaving in
- it only those entries marked by the select routine
-
-
-
- 2.02 Generalized Routines -- DIRF and DIRFS
- Routine Name: DIRF and DIRFS
- Function║
- Thi≤ routinσ initialize≤ thσ buffe≥ area¼á load≤ ß disδ ì
- directory¼á select≤á ßá se⌠á oµ file≤ froφ thσá loadeΣá director∙ ì
- specifieΣá b∙á thσ user'≤ ambiguou≤ filσ namσ anΣ ßá passeΣá flaτ ì
- (whicΦ indicate≤ iµ Systeφ file≤ arσ selected¼á Non-systeφá file≤ ì
- arσá selected¼á al∞á use≥á area≤á arσ t∩á bσá covered¼á anΣá wha⌠ ì
- particula≥á use≥ areß i≤ t∩ bσ covereΣ iµ al∞ use≥ area≤ arσá no⌠ ì
- selected)¼ pack≤ thσ directory¼ anΣ alphabetize≤ thσ director∙ b∙ ì
- filσ namσ anΣ filσ type.
- Iµá DIR╞ i≤ used¼á thσ processinτ proceed≤ faste≥ sincσ onl∙ ì
- thσá firs⌠ entr∙ oµ eacΦ filσ i≤ loadeΣ int∩ thσá memor∙á buffer« ì
- Filσ sizinτ informatioε i≤ no⌠ includeΣ iε thi≤ load¼ however.
- Iµ DIRF╙ i≤ used¼ thσ processinτ i≤ somewha⌠ slower¼ bu⌠ thσ ì
- las⌠á entr∙ fo≥ eacΦ filσ i≤ loadeΣ rathe≥ thaε thσ first«á Filσ ì
- sizinτá informatioεá i≤á containeΣá iεá thi≤á entry¼áá anΣáá thi≤ ì
- informatioε caε bσ useΣ b∙ thσ FSIZ┼ routine.
-
- Inputs: HL points to a dynamic buffer which extends from
- after the user's code and buffer areas to the
- end of the TPA
- DE points to the first byte of the FCB used to
- specify the ambiguous file name; only the chars
- in the FN and FT fields are significant, so this
- need not be a true FCB and may be as short as 12
- bytes
- A is the selection flag, structured as follows:
- Bit 7 - If Set, Select Non-System Files
- Bit 6 - If Set, Select System Files
- Bit 5 - If Set, Select All User Areas
- Bits 4-0 - If Bit 5 is Cleared, contains number
- of User Area to Select
-
- Outputs: HL points to the first file entry in the buffer;
- each file entry is 16 bytes long
- BC contains the number of files selected
- ááááá A contains an error flag; A=0 and Zero Flag Set
- ááááá (Z) indicates TPA overflow error during load of
- ááááá directory entries; A<>0 and NZ indicates load OK
-
- Registers Affected: HL, BC, PSW
-
- SYSLIB Routines Called: DBUFFER, DIRLOAD, DIRSEL, DIRPACK,
- DIRALPHA
-
- Special Error Conditions: As outline for the A register
- ááááá above.
-
-
-
- 2.03 Buffer Allocation Routine -- DBUFFER
- Routine Name: DBUFFER
- Function:
- Thi≤á routinσ allocate≤ thσ buffe≥ spacσ necessar∙á fo≥ ì
- thσá se⌠ oµ director∙ function≤ iε general«á Iεá particular¼á i⌠ ì
- allocate≤ thσ necessar∙ spacσ fo≥ thσ alphabetizatioε functioε a≤ ì
- wel∞ a≤ thσ loadeΣ director∙ itself«á Thi≤ routinσ mus⌠ bσá useΣ ì
- iµá thσá DIRALPH┴á routinσá i≤á t∩ bσá late≥á useΣá t∩á sor⌠á thσ ì
- directory╗á thi≤á routinσá allocate≤ al∞ thσ spacσá necessar∙á b∙ ì
- DIRALPH┴ t∩ sor⌠ thσ routinσ (pointe≥ space)« Iµ thi≤ routinσ i≤ ì
- called¼ i⌠ i≤ no⌠ necessar∙ t∩ cal∞ thσ DPARAM╙ routine.
-
- Inputs: HL points to the beginning address of a dynamic
- ááááá buffer area which extends to under the CCP
-
- Outputs: HL points to the first byte at which the directory
- ááááá entries are to be loaded
- ááááá A=0 and Zero Flag is Set (Z) if the CCP is
- ááááá already overrun; else, A<>0 and NZ
-
- Registers Affected: HL, PSW
-
- SYSLIB Routines Called: DPARAMS
-
- Special Error Conditions: As indicated by A reg and Z flag
-
-
-
- 2.04 Disk Parameter Information Extraction Routine -- DPARAMS
- Routine Name: DPARAMS
- Function:
- Thi≤á routinσá extract≤ necessar∙ informatioε froφ thσá Disδ ì
- Paramete≥á Blocδ (DPB⌐ anΣ store≤ i⌠ awa∙ iε somσ globa∞á buffer≤ ì
- useΣ b∙ othe≥ Disδ Director∙ Routines« Thσ informatioε extracteΣ ì
- i≤ no⌠ oµ genera∞ concerε b∙ thσ programmer«á AL╠ TH┼ PROGRAMME╥ ì
- NEED╙á T╧ KNO╫ I╙ THA╘ THI╙ ROUTIN┼ MUS╘ B┼ CALLE─ A╘ LEAS╘á ONC┼ ì
- BEFOR┼ TH┼ DIRLOA─ O╥ DIRSLOA─ ROUTIN┼ I╙ CALLED« Iµ thσ DBUFFE╥ ì
- routinσá i≤á called¼á theε i⌠ i≤ no⌠ necessar∙á t∩á cal∞á DPARAM╙ ì
- again.
- Fo≥ thσ informatioε oµ thσ reader¼ thσ followinτ informatioε ì
- i≤ extracted:
- ááááá BLKSHF <-- Block Shift Factor (1 Byte)
- ááááá BLKMSK <-- Block Mask (1 Byte)
- ááááá EXTENT <-- Extent Mask (1 Byte)
- ááááá BLKMAX <-- Max Number of Blocks on Disk (2 Bytes)
- ááááá DIRMA╪ <-- Ma° Numbe≥ oµ Di≥ Entrie≤ (▓ Bytes)
- Thi≤á routinσ automaticall∙ adjust≤ fo≥ version≤ 1.┤ anΣ 2.▓ ì
- oµ CP/═ anΣ i≤ compatablσ witΦ botΦ version≤ oµ CP/M.
-
- Inputs: None
-
- Outputs: None (Information Extracted into Buffers)
-
- Registers Affected: None
-
- SYSLIB Routines Called: None
-
- Special Error Conditions: None
-
-
-
- 2.05 Free Space Computation Routine -- DFREE
- Routine Name: DFREE
- Function:
- Thi≤á routinσá compute≤ thσ amoun⌠ oµ freσ spacσ (iεá ╦ ì
- bytes⌐ lef⌠ oε disk.
-
- Inputs: None
-
- Outputs: DE = Amount of Free Disk Space in K Bytes
-
- Registers Affected: DE
-
- SYSLIB Routines Called: DPARAMS
-
- Special Error Conditions: None
-
-
-
-
- 2.06 File Size Computation Routine -- FSIZE
- Routine Name: FSIZE
- Function:
- Thi≤á routinσá compute≤ thσ sizσ oµ ß filσ whosσá entr∙ ì
- (whicΦá MUS╘ bσ loadeΣ b∙ DIRSLOAD⌐ i≤ pointeΣ t∩á b∙á HL«á Thi≤ ì
- routinσ wil∞ work¼ bu⌠ generall∙ returε incorrec⌠ results¼ iµ thσ ì
- entr∙ pointeΣ t∩ wa≤ loadeΣ b∙ DIRLOA─ instead.
-
- Inputs: HL points to first byte of file entry
-
- Outputs: DE contains the file size in K Bytes
-
- Registers Affected: DE
-
- SYSLIB Routines Called: DPARAMS
-
- Special Error Conditions: None
-
-
- 2.07 Directory Load Routines -- DIRLOAD and DIRSLOAD
- Routine Names: DIRLOAD and DIRSLOAD
- Function:
- DIRLOA─á anΣá DIRSLOA─ loaΣ entrie≤ fo≥á al∞á undeleteΣ ì
- file≤á oεá thσá currentl∙ loggeΣ iε disδ int∩ thσá memor∙á buffe≥ ì
- pointeΣ t∩ b∙ HL« Al∞ entrie≤ arσ 1╢ byte≤ long.
- DIRLOA─á i≤ faste≥ thaε DIRSLOAD«á I⌠ load≤ jus⌠ thσá firs⌠ ì
- entr∙ oµ eacΦ filσ oε disk«á DIRLOAD¼á however¼á shoulΣ bσá useΣ ì
- onl∙áá iµá filσá sizinτá informatioεá i≤á no⌠á requireΣá b∙áá thσ ì
- application≤ program.
- DIRSLOA─á load≤á jus⌠ thσ LAS╘ entr∙ oµ eacΦ filσá oεá disk« ì
- Thi≤á entr∙ contain≤ thσ necessar∙ filσ sizinτ informatioεá whicΦ ì
- ma∙ bσ useΣ b∙ FSIZ┼ t∩ computσ thσ sizσ oµ thσ loadeΣ file.
- Iµá thσá TP┴ i≤ filleΣ durinτ DIRLOA─ o≥ DIRSLOA─ anΣá therσ ì
- arσ stil∞ morσ filσ entrie≤ t∩ load¼á thσ loaΣ wil∞ bσ halteΣ anΣ ì
- aε erro≥ returε wil∞ bσ madσ t∩ thσ caller«á Oε return¼á iµá A=░ ì
- anΣá thσá Zer∩á Flaτá i≤ Se⌠ (Z)¼á theε ßá loaΣá erro≥á occurred╗ ì
- otherwise¼ thσ loaΣ wa≤ OK.
-
- Inputs: HL points to the first byte of the directory buffer
- ááááá area; this area extends from after the last buffer
- ááááá used by the applications program to the page
- ááááá before the CCP. If alphabetization is to be done,
- ááááá the value returned in HL by DBUFFER is a correct
- ááááá input for DIRLOAD or DIRSLOAD
- ááááá A=0 and Zero Flag is Set (Z) if TPA Overflow;
- ááááá A<>0 and NZ if load OK
-
- Outputs: BC is the number of files loaded into the buffer
-
- Registers Affected: BC
-
- SYSLIB Routines Called: None
-
- Special Error Conditions: If TPA is filled and load is
- ááááá incomplete, A=0 and Zero Flag is Set (Z) as error indic
-
-
- 2.08 Directory Alphabetization Routine -- DIRALPHA
- Routine Name: DIRALPHA
- Function:
- T∩ alphabetizσ thσ file≤ iε thσ director∙ pointeΣ t∩ b∙ ì
- H╠á b∙ eithe≥ filσ namσ anΣ typσ (STEST.AS═ goe≤ beforσ TEST.AAA⌐ ì
- o≥ b∙ filσ typσ anΣ namσ (TEST.AA┴ goe≤ beforσ STEST.ASM).
-
- Inputs: HL points to first directory entry
- ááááá BC contains the number of files to sort
- ááááá ┴ i≤ thσ sor⌠ flag╗ A=░ mean≤ sor⌠ b∙ filσ namσ anΣ ì
- ááááá áááááthen file type, A<>0 means by file type and name
-
- Outputs: None (directory list is sorted)
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: PRINT
-
- Special Error Conditions:
- ááááá I⌠á i≤ possible¼á alth∩ highl∙ unlikel∙ froφ al∞á test≤ ì
- ááááágiveεá s∩á far¼á tha⌠á DIRALPH┴ ma∙ experiencσá aεá interna∞ ì
- áááááerror. If this happens, the message:
- ááááá DIRALPHA -- Pointer Error
- áááááwil∞ bσ printeΣ anΣ thσ routinσ wil∞ abor⌠ t∩ CP/M« Iµ thi≤ ì
- áááááhappens¼á pleasσá repor⌠á thi≤ probleφ anΣá bσá prepareΣá t∩ ì
- áááááduplicatσ thσ exac⌠ situatioε whicΦ causeΣ thi≤ erro≥ t∩ thσ ì
- áááááauthor, Richard Conn.
-
-
-
- 2.09 Directory Entry Selection Routine -- DIRSEL
- Routine Name: DIRSEL
- Function:
- DIRSE╠á select≤á al∞á entrie≤ iε thσá director∙á buffe≥ ì
- whicΦá matcΦ thσ ambiguou≤ filσ namσ specifieΣ iε thσ F╬á anΣá F╘ ì
- field≤á oµá thσá FC┬ pointeΣ t∩ b∙ D┼ upoε entr∙á t∩á DIRSEL«á ┴ ì
- selectioεá flaτ i≤ als∩ passeΣ t∩ DIRSE╠ iε thσ ┴á register¼á anΣ ì
- thi≤ flaτ tell≤ DIRSE╠ whethe≥ o≥ no⌠ t∩ includσ Non-Systeφ file≤ ì
- anΣ Systeφ file≤ iε thσ selectioε anΣ whethe≥ t∩ selec⌠ file≤á iε ì
- al∞ use≥ area≤ o≥ iε ß particula≥ use≥ area.
- DIRSE╠á identifie≤ thσ selecteΣ filσ entrie≤ b∙ settinτá thσ ì
- Mos⌠á Significan⌠ Bi⌠ oµ thσ firs⌠ bytσ oµ eacΦ oµ thesσá entrie≤ ì
- t∩ ▒ iµ thσ entr∙ i≤ selected«á DIRSE╠ make≤ n∩ othe≥ change≤ t∩ ì
- thσ filσ entrie≤ iε thσ director∙ buffer.
-
-
- Inputs: HL points to the directory buffer
- ááááá D┼á point≤ t∩ thσ FC┬ containinτ thσá ambiguou≤á F╬ ì
- ááááá and FT fields; only the first 12 bytes are needed
- ááááá BC contains the number of files in the directory
- ááááá A contains a selection flag, organized as follows:
- ááááá Bit 7 - Select Non-System Files
- ááááá Bit 6 - Select System Files
- ááááá Bit 5 - Select Files in All User Areas
- ááááá Bits 4-0 - If Bit 5 is 0, indicates number of
- ááááá User Area to select files from
-
- Outputs: None (MSBs of selected entries are set)
-
- Registers Affected: None
-
- SYSLIB Routines Called: None
-
- Special Error Conditions: None
-
-
-
- 2.10 Directory Pack Routine -- DIRPACK
- Routine Name: DIRPACK
- Function:
- DIRPAC╦á restructure≤ thσ director∙ buffe≥á t∩á contaiε ì
- onl∙ thosσ entrie≤ markeΣ b∙ DIRSEL«á Iε thi≤ way¼ thosσ entrie≤ ì
- NO╘á markeΣá b∙ DIRSE╠ arσ discardeΣ froφ thσá buffe≥á (actually¼ ì
- jus⌠á takeε ou⌠ oµ consideration¼á bu⌠ thσ content≤ oµ thσ buffe≥ ì
- afte≥á thσá las⌠á selecteΣ entr∙ i≤á no⌠á guaranteeΣá t∩á contaiε ì
- anythinτ significant).
- Thσá Mos⌠á Significan⌠ Bi⌠ oµ thσ firs⌠ bytσ oµ al∞á entrie≤ ì
- remaininτ iε thσ director∙ buffe≥ i≤ rese⌠ t∩ ░ a≤ ß sidσá effec⌠ ì
- oµ DIRPACK.
-
- Inputs: HL points to the directory buffer
- ááááá BC contains the number of files in the buffer
-
- Outputs: BC contains the number of files (those selected by
- ááááá DIRSEL) remaining in the directory buffer
-
- Registers Affected: BC
-
- SYSLIB Routines Called: None
-
- Special Error Conditions: None
-
-
- 2.11 Negative Directory Pack Routine
- Routine Name: DIRNPACK
- Function:
- DIRNPAC╦á restructure≤ thσ director∙ buffe≥ t∩á contaiε ì
- onl∙á thosσá entrie≤ NO╘ markeΣ b∙ DIRSEL«á Iε thi≤á way¼á thosσ ì
- entrie≤ markeΣ b∙ DIRSE╠ arσ discardeΣ froφ thσ buffe≥ (actually¼ ì
- jus⌠ takeε ou⌠ oµ consideration¼á bu⌠ thσ content≤ oµ thσá buffe≥ ì
- afte≥á thσá las⌠á selecteΣá entr∙ i≤ no⌠á guaranteeΣá t∩á contaiε ì
- anythinτ significant).
- Thσá Mos⌠ Significan⌠ Bi⌠ oµ thσ firs⌠ bytσ oµá al∞á entrie≤ ì
- remaininτá iε thσ director∙ buffe≥ i≤ rese⌠ t∩ ░ a≤ ß sidσ effec⌠ ì
- oµ DIRNPACK.
-
- Inputs: HL points to the directory buffer
- ááááá BC contains the number of files in the buffer
-
- Outputs: BC contains the number of files (those NOT selected
- ááááá by DIRSEL) remaining in the directory buffer
-
- Registers Affected: BC
-
- SYSLIB Routines Called: DIRPACK
-
- Special Error Conditions: None
-
- .fo 3 - Numeric String Evaluation Routines Page #
-
- 3.0 Numeric String Evaluation Routines
-
- 3.01 Evaluation of String at All Bases -- EVAL
- Routine Name: EVAL
- Function║
- Thi≤á routinσ convert≤ thσ characte≥ strinτ pointeΣá t∩ ì
- b∙á H╠á int∩ thσ 16-bi⌠ binar∙ numbe≥ representeΣá b∙á it«á EVA╠ ì
- perform≤á thσá conversioεá unti∞ ß non-hexadecima∞á characte≥á i≤ ì
- encountered¼ a⌠ whicΦ timσ i⌠ look≤ a⌠ thσ las⌠ characte≥ anΣ thσ ì
- previou≤á characte≥ t∩ determinσ iµ thσ strinτ i≤ representinτá ß ì
- binary¼á octal¼á decimal¼á o≥ hexadecima∞ number«á Inpu⌠á strinτ ì
- character≤á ma∙ bσ upper- o≥ lower-case«á ValiΣ format≤ fo≥á thσ ì
- inpu⌠ strinτ arσ --
- bbbbbbbbbbbbbbbbB -- b=0 or b=1; Binary string
- ttttt or tttttD -- 0 <= t <= 9; Decimal string
- hhhhH or hhhhX -- 0 <= h <= F; Hexadecimal string
- oooooooO or oooooooQ -- 0 <= o <= 7; Octal string
-
- Inputs: HL points to the first byte of the string to convert
- String is loaded in a buffer
-
- Outputs: HL points to next character after converted string
- DE contains 16-bit value
- A = E
- CARR┘á Flaτ Se⌠ mean≤ aε erro≥ wa≤ encountereΣá iε ì
- strinτ format
-
- Registers Affected: PSW, DE, HL
-
- SYSLIB Routines Called: CAPS, EVAL16, EVAL10, EVAL8, EVAL2
-
- Specia∞á Erro≥ Conditions║
- CARR┘á Flaτ Se⌠ indicate≤ tha⌠ aε erro≥ wa≤ encountereΣ ì
- iεá thσá evaluatioεá oµ thσ string╗á iµá so¼á H╠á point≤á t∩á thσ ì
- offendinτ character
-
-
- 3.02 Evaluation of String in Base 16 -- EVAL16
- Routine Name: EVAL16
- Function║
- EVAL1╢áá convert≤á thσá strinτá oµá ASCI╔áá hexadecima∞ ì
- character≤áá pointeΣá t∩á b∙á H╠á int∩á ßá 16-bi⌠á binar∙á value« ì
- Conversioε progresse≤ unti∞ aε invaliΣ hexadecima∞ digi⌠ (0-9¼ A-ì
- F⌐ i≤ encountered.
-
- Inputs: HL points to the first byte of the string to convert
- String is loaded in a buffer
-
- Outputs: HL points to the offending character
- DE contains the 16-bit value
- A = E
-
- Registers Affected: PSW, DE, HL
-
- SYSLIB Routines Called: CAPS
-
- Special Error Conditions: -None-
-
-
- 3.03 Evaluation of String in Base 10 -- EVAL10
- Routine Name: EVAL10
- Function║
- EVAL1░ convert≤ thσ strinτ oµ ASCI╔ decima∞á character≤ ì
- pointeΣá t∩á b∙á H╠á int∩á ßá 16-bi⌠á binar∙á value«á Conversioε ì
- progresse≤ unti∞ aε invaliΣ decima∞ digi⌠ (0-9⌐ i≤ encountered.
-
- Inputs: HL points to the first byte of the string to convert
- String is loaded in a buffer
-
- Outputs: HL points to the offending character
- DE contains the 16-bit value
- A = E
-
- Registers Affected: PSW, DE, HL
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
-
- 3.04 Evaluation of String in Base 8 -- EVAL8
- Routine Name: EVAL8
- Function║
- EVAL╕á convert≤á thσ strinτ oµ ASCI╔á octa∞á character≤ ì
- pointeΣá t∩á b∙á H╠á int∩á ßá 16-bi⌠á binar∙á value«á Conversioε ì
- progresse≤ unti∞ aε invaliΣ octa∞ digi⌠ (0-7⌐ i≤ encountered.
-
- Inputs: HL points to the first byte of the string to convert
- String is loaded in a buffer
-
- Outputs: HL points to the offending character
- DE contains the 16-bit value
- A = E
-
- Registers Affected: PSW, DE, HL
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
- 3.05 Evaluation of String in Base 2 -- EVAL2
- Routine Name: EVAL2
- Function║
- EVAL▓á convert≤á thσ strinτ oµ ASCI╔ binar∙á character≤ ì
- pointeΣá t∩á b∙á H╠á int∩á ßá 16-bi⌠á binar∙á value«á Conversioε ì
- progresse≤ unti∞ aε invaliΣ binar∙ digi⌠ (0-1⌐ i≤ encountered.
-
- Inputs: HL points to the first byte of the string to convert
- String is loaded in a buffer
-
- Outputs: HL points to the offending character
- DE contains the 16-bit value
- A = E
-
- Registers Affected: PSW, DE, HL
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
- .fo 4 - Byte-Oriented File Input/Output Routines Page #
-
- 4.0 Byte-Oriented File Input/Output Routines
-
- 4.01 Introduction to Byte-Oriented File Input/Output Routines
-
- Thσá followinτá documentatioεá cover≤ thσá serie≤á oµá byte-ì
- orienteΣá filσ input/outpu⌠ routine≤ iε SYSLIB«á Thesσá routine≤ ì
- allo≈ thσ use≥ t∩ sequentiall∙ reaΣ froφ (GET⌐ anΣ writσ t∩ (PUT⌐ ì
- ß filσ oε ß byte-for-bytσ basis«á Hence¼á thesσ routine≤ providσ ì
- aε exceptionall∙ simplσ methoΣ fo≥ handlinτ inpu⌠ froφ anΣ outpu⌠ ì
- t∩ ß file.
-
- ┴ typica∞ prograφ whicΦ employ≤ thesσ routine≤ mus⌠ opeε thσ ì
- requireΣ file≤ beforσ doinτ an∙ processing¼ mus⌠ theε perforφ thσ ì
- processinτá oε thσ openeΣ files¼á anΣ mus⌠ theε closσá thσá file≤ ì
- wheεá thσá processinτ i≤ completσ (closinτ thσ file≤ i≤á optiona∞ ì
- fo≥ inpu⌠ file≤ anΣ mandator∙ fo≥ outpu⌠ files).
-
- SYSLI┬ provide≤ fou≥ set≤ oµ routine≤ fo≥ byte-orienteΣ filσ ì
- inpu⌠ anΣ output« Thesσ routine≤ arσ --
-
- Input Open Output Open GET PUT Input Close Output Close
- ---------- ----------- --- --¡ ----------- ------------
- FI0$OPEN FO0$OPEN F0$GET F0$PUT FI0$CLOSE FO0$CLOSE
- FI1$OPEN FO1$OPEN F1$GET F1$PUT FI1$CLOSE FO1$CLOSE
- FI2$OPEN FO2$OPEN F2$GET F2$PUT FI2$CLOSE FO2$CLOSE
- FI3$OPEN FO3$OPEN F3$GET F3$PUT FI3$CLOSE FO3$CLOSE
-
- Thi≤á systeφá allow≤á thσ use≥ t∩ havσ u≡ t∩á ╕á file≤á opeε ì
- simultaneousl∙ -- fou≥ arσ opeε fo≥ inpu⌠ usinτ GE╘ anΣ fou≥á arσ ì
- opeεá fo≥á outpu⌠ usinτ PUT«á Fo≥ example¼á thσ followinτá i≤á ß ì
- samplσ codσ sectioε usinτ thesσ routine≤ fo≥ tw∩ files:
-
- EXT FI0$OPEN ; DECLARE LIBRARY REFERENCES
- EXT FO0$OPEN
- EXT FI0$CLOSE
- EXT FO0$CLOSE
- EXT F0$GET
- EXT F0$PUT
- ...
- LXI D,FCBI ; PT TO FCB OF INPUT FILE
- CALL FI0$OPEN
- LXI D,FCBO ; PT TO FCB OF OUTPUT FILE
- CALL FO0$OPEN
- ...
- [body containing CALL F0$GET and CALL F0$PUT where required]
- ...
- CALL FI0$CLOSE ; CLOSE FILE
- CALL FO0$CLOSE
- ...
- END
-
-
- Notσ tha⌠ onl∙ thσ routine≤ t∩ bσ useΣ arσ referenceΣ iε thσ ì
- EX╘ statements«á Iµ yo⌡ d∩ no⌠ neeΣ ß particula≥ routine¼ d∩ no⌠ ì
- referencσá it«á No⌠á referencinτ aε unneedeΣá routinσá generall∙ ì
- save≤ thσ overheaΣ memor∙ spacσ oµ loadinτ i⌠ froφ thσ library.
-
- EacΦ se⌠ oµ INPU╘ OPEN¼á INPU╘ CLOSE¼á OUTPU╘á OPEN¼á OUTPU╘ ì
- CLOSE¼á GET¼ anΣ PU╘ routine≤ i≤ containeΣ iε onσ librar∙ module¼ ì
- s∩á referencinτ an∙ oµ thesσ routine≤ cause≤ thσ entirσ modulσ t∩ ì
- bσá loaded¼á anΣá al∞á thσ routine≤ arσ accessablσá t∩á thσá use≥ ì
- (provideΣ the∙ arσ mentioneΣ iε thσ externa∞ definitions⌐ withou⌠ ì
- an∙áá additiona∞á memor∙áá overhead«áá Specifically¼áá FI0$OPEN¼ ì
- FI0$CLOSE¼á FO0$OPEN¼ FO0$CLOSE¼ F0$GET¼ anΣ F0$PU╘ arσ containeΣ ì
- iε onσ module¼á anΣ referencσ t∩ an∙ oµ thesσ routine≤ load≤á thσ ì
- entirσ module╗ thσ samσ i≤ truσ fo≥ thσ othe≥ set≤ oµ routines.
-
- Thσ CLOS┼ routinσ fo≥ outpu⌠ (FOn$CLOSE⌐ i≤ ALWAY╙ required╗ ì
- i⌠á fill≤á thσ res⌠ oµ thσ curren⌠ blocδ witΦ Ctrl-┌ followeΣá b∙ ì
- <NULL╛á byte≤ anΣ properl∙ close≤ file«á Thσ CLOS┼á routinσá fo≥ ì
- inpu⌠ (FIn$CLOSE⌐ i≤ requireΣ ONL┘ I╞ yo⌡ arσ goinτ t∩ late≥ opeε ì
- anothe≥á filσá fo≥á inpu⌠ usinτ thσá correspondinτá OPE╬á routinσ ì
- (FIn$OPEN)«á FIn$CLOS┼á onl∙ serve≤ t∩ rese⌠ thσ OPE╬ flaτ (useΣ ì
- t∩ GE╘ t∩ ascertaiε tha⌠ thσ filσ ha≤ beeε properl∙ opened).
-
-
-
- 4.02 Byte-Oriented Input and Output File Open
- Routine Names: FI0$OPEN, FI1$OPEN, FI2$OPEN, FI3$OPEN
- Function║
- Opeεá thσ filσ whosσ FC┬ i≤ pointeΣ t∩ b∙ D┼ fo≥á inpu⌠ ì
- (usσ witΦ F$GET).
-
- Inputs: DE = ptr to FCB of file to open
-
- Outputs: Z Flag is Error Indicator, A is Error Code
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: Internal
-
- Special Error Conditions: See Section on Error Codes
-
-
-
- Routine Names: FO0$OPEN, FO1$OPEN, FO2$OPEN, FO3$OPEN
- Function║
- Opeε thσ filσ whosσ FC┬ i≤ pointeΣ t∩ b∙ D┼ fo≥á outpu⌠ ì
- (usσ witΦ F$PUT).
-
- Inputs: DE = ptr to FCB of file to open
-
- Outputs: Z Flag is Error Indicator, A is Error Code
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: Internal
-
- Special Error Conditions: See Section on Error Codes
-
-
-
- 4.03 Byte-Oriented Input and Output File Close
- Routine Names: FI0$CLOSE, FI1$CLOSE, FI2$CLOSE, FI3$CLOSE
- Function║
- Closσá thσ filσ previousl∙ openeΣ b∙ thσá correspondinτ ì
- FI$OPE╬á routine«á Usσá oµá thesσ routine≤ i≤á optiona∞á iµá thσ ì
- anothe≥á filσá wil∞á no⌠ bσ openeΣ late≥ iε thσá prograφá b∙á thσ ì
- correspondinτ FI$OPE╬ routine.
-
- Inputs: -None-
-
- Outputs: Z Flag is Error Indicator, A is Error Code
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: Internal
-
- Specia∞ Erro≥ Conditions: See Section on Error Codes
-
-
-
- Routine Names: FO0$CLOSE, FO1$CLOSE, FO2$CLOSE, FO3$CLOSE
- Function║
- Closσá thσ filσ previousl∙ openeΣ b∙ thσá correspondinτ ì
- FO$OPE╬ routine« Usσ oµ thesσ routine≤ i≤ MANDATOR┘ afte≥ outpu⌠ ì
- t∩ thσ filσ (usinτ thσ correspondinτ F$PU╘ routine⌐ i≤ complete.
-
- Inputs: -None-
-
- Outputs: Z Flag is Error Indicator, A is Error Code
-
- Registers Affected: -None-
-
- SYSLIB Routines Called: Internal
-
- Specia∞ Erro≥ Conditions: See Section on Error Codes
-
- è
- 4.04 Byte-Oriented Input and Output
- Routine Names: F0$GET, F1$GET, F2$GET, F3$GET
- Function║
- Ge⌠ thσ nex⌠ bytσ iε sequencσ froφ thσ filσá previousl∙ ì
- openeΣ b∙ thσ correspondinτ FI$OPE╬ routine« Bytσ i≤ returneΣ iε ì
- Registe≥ A.
-
- Inputs: -None-
-
- Outputs: A = Next byte from file if no error
- If Error, NZ and A = Error Code
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: Internal
-
- Specia∞ Erro≥ Conditions: See Section on Error Codes
-
-
-
- Routine Names: F0$PUT, F1$PUT, F2$PUT, F3$PUT
- Function║
- Pu⌠á thσá bytσ iε Registe≥ ┴ ont∩ thσ enΣ oµá thσá filσ ì
- previousl∙ openeΣ b∙ thσ correspondinτ FO$OPE╬ routine.
-
- Inputs: A = Byte to PUT
-
- Outputs: Z Flag is Error Indicator, A is Error Code
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: Internal
-
- Specia∞á Erro≥ Conditions║ See Section on Error Codes
-
-
-
- 4.05 Error Return Codes
-
- Fo≥á eacΦ oµ thσ routine≤ iε thi≤ se⌠ oµ byte-orienteΣá filσ ì
- I/╧ routines¼ thσ Zer∩ Flaτ anΣ thσ ┴ Registe≥ pla∙ ß ke∙ rolσ iε ì
- indicating the error conditions of the routines.
-
- Iµá thσá Zer∩á Flaτá i≤ Se⌠ (Z⌐ afte≥á ßá routinσá ha≤á beeε ì
- executed¼á theε thi≤ indicate≤ tha⌠ n∩ erro≥ ha≤ occurred« Thσ ┴ ì
- Registe≥á i≤á eithe≥á unaffecteΣ (iε mos⌠ cases⌐á o≥á contain≤á ß ì
- returned value (if so indicated, as in Fn$GET routines).
-
- Iµá thσá Zer∩ Flaτ i≤ Clea≥ (NZ⌐ afte≥ ßá routinσá ha≤á beeε ì
- executed¼á theε thi≤ indicate≤ tha⌠ aε erro≥ ha≤ occurred« Thσ ┴ ì
- Registe≥á no≈á contain≤á thσ Erro≥á Code«á Thσá followinτá tablσ ì
- summarize≤á thσá Erro≥á Code≤á whicΦ ma∙ bσá returneΣá iεá thσá ┴ ì
- Register.
- è
- The following display summarizes the Error Codes.
-
-
- Summary of Error Codes
- Returned by Byte-Oriented File I/O Routines
-
- Code Meaning
- ---- -------
-
- 1 GET or PUT attempted on an unopened file
- 2 Disk Full (Ran out of space)
- 3 Input File Not Found
- 4 Attempt to Read Past EOF
- 5 Directory Full
- 6 Error in Closing a File
- 7 Attempt to Open a File which is already Open
-
-
- .fo 5 - CP/M File Input/Output Routines Page #
-
- 5.0 CP/M File Input/Output Routines
-
- 5.01 Introduction
-
- Thσ followinτ routine≤ arσ general-purposσ filσ I/╧ routine≤ ì
- whicΦá interfacσá t∩ CP/═ througΦ thσ Entr∙ Poin⌠ a⌠ locatioεá 5« ì
- The∙ preservσ BC¼á DE¼á anΣ HL¼ anΣ the∙ returε witΦ thσ standarΣ ì
- CP/═ erro≥ code≤ fo≥ thσ correspondinτ routines.
-
- Specifically, these routines are --
-
- F$OPEN Open a file
- F$MOPEN Open/Create a file
- F$CLOSE Close a file
- F$MAKE Create a file
- F$DELETE Delete a file
- F$RENAME Rename a file
- F$EXIST Test of existance of a file
- F$READ Read a block (128 bytes) from a file
- F$WRITE Write a block (128 bytes) to a file
-
-
-
- 5.02 Open a File
- Routine Name: F$OPEN
- Function║
- Opeεá thσá filσ specifieΣ b∙ thσ FC┬ pointeΣ t∩ b∙á DE« ì
- Iµ filσ no⌠ found¼á F$OPE╬ return≤ witΦ aε erro≥ codσ iε ┴ (0FFH⌐ ì
- anΣ Zer∩ Flaτ Clea≥ (NZ).
-
- Inputs: DE = pointer to FCB
-
- Outputs: A = Error Code and PSW Flags Set (Zero Flag)
- 0 --> No Error
- 0FFH --> File not opened
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: BDOS, CAPS, CIN, COUT, CRLF, PRINT
-
- Special Error Conditions: -None-
-
-
-
-
- Routine Name: F$MOPEN
- Function║
- Opeεá thσ filσ specifieΣ b∙ thσ FC┬ pointeΣ t∩á b∙á DE« ì
- Iµá filσ i≤ no⌠ found¼á F$MOPE╬ trie≤ t∩ creatσ one«á I⌠ return≤ ì
- thσá erro≥ codσ oµ 0FF╚ iε ┴ iµ therσ wa≤ no⌠ enougΦ rooφ iεá thσ ì
- disδ director∙ t∩ creatσ thσ director∙ entry.
-
- Inputs: DE = pointer to FCB
-
- Outputs: A = Error Code and PSW Flags (Zero Flag) Set
- 0 --> No Error
- 0FFH --> File not opened
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: BDOS, CAPS, CIN, COUT, CRLF, PRINT
-
- Special Error Conditions: -None-
-
-
-
- 5.03 Close a File
- Routine Name: F$CLOSE
- Function:
- Close the file whose FCB is pointed to by DE.
-
- Inputs: DE = pointer to FCB
-
- Outputs: A = Error Code
- 0 --> No Error
- 0FFH --> Error in closing file
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: BDOS
-
- Special Error Conditions: -None-
-
-
-
-
- 5.04 Create a File
- Routine Name: F$MAKE
- Function:
- Create (Make) the file whose FCB is pointed to by DE.
-
- Inputs: DE = pointer to FCB
-
- Outputs: A = Error Code
- 0FFH --> No directory space available
- Not 0FFH --> No Error; Value is byte address in
- TBUFF (80H-0FFH) of directory entry
- allocated to the FCB
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: BDOS, F$DELETE
-
- Special Error Conditions: -None-
-
-
-
- 5.05 Delete a File
- Routine Name: F$DELETE
- Function║
- Deletσ thσ filσ whosσ FC┬ i≤ pointeΣ t∩ b∙ DE« Iµ filσ ì
- doe≤á no⌠á exist¼á nothinτ happen≤ (n∩ erro≥ messagσ o≥á codσá i≤ ì
- given).
-
- Inputs: DE = pointer to FCB
-
- Outputs: -None-
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: BDOS
-
- Special Error Conditions: -None-
-
-
-
- 5.06 Rename a File
- Routine Name: F$RENAME
- Function║
- F$RENAM┼á ma∙ bσ useΣ t∩ renamσ ß file«á Oε entry¼á D┼ ì
- pt≤ t∩ thσ firs⌠ twelvσ byte≤ oµ thσ file'≤ FC┬ anΣ H╠ pt≤ t∩ thσ ì
- firs⌠ twelvσ byte≤ oµ thσ FC┬ fo≥ thσ ne≈ filσ (tha⌠ is¼ onl∙ thσ ì
- F╬ anΣ F╘ field≤ arσ significant¼á s∩ thσ res⌠ oµ aε FC┬ neeΣ no⌠ ì
- bσá presen⌠á fo≥ thi≤ functioε t∩ work)«á F$RENAM┼á contain≤á aε ì
- interna∞ FC┬ whicΦ i≤ structureΣ froφ thσ tw∩ entrie≤ t∩ properl∙ ì
- rename the file.
-
- Inputs: HL pts to 1st 12 bytes of new FCB
- DE pts to 1st 12 bytes of old FCB
-
- Outputs: Zero Flag Set (Z) means error (file not found)
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: BDOS, FILLB, MOVEB
-
- Specia∞ Erro≥ Conditions║á Filσ No⌠ FounΣ error¼á indicateΣ ì
- by Z flag
-
-
-
- 5.07 Test for the Existance of a File
- Routine Name: F$EXIST
- Function║
- F$EXIS╘ test≤ fo≥ thσ presencσ oµ thσ filσ whosσ FC┬ i≤ ì
- pteΣá t∩ b∙ D┼ iε thσ curren⌠ disk/use≥ area«á Iµ thi≤ filσ doe≤ ì
- no⌠á exis⌠ iε thi≤ area¼á F$EXIS╘ return≤ witΦ thσ Zer∩ Flaτá Se⌠ ì
- (Z); if this file does exist, F$EXIST returns with NZ.
-
- Inputs: DE pts to FCB of file to test for
-
- Outputs: Zero Flag Set (Z) means file not found; NZ means
- file found
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: BDOS
-
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- 5.08 Read a Block from a File
- Routine Name: F$READ
- Function║
- ReaΣá nex⌠ blocδ (12╕ bytes⌐ froφ thσ openeΣ filσ whosσ ì
- FC┬ i≤ pointeΣ t∩ b∙ D┼ int∩ TBUF╞ (buffe≥ a⌠ 80╚ - 0FFH).
-
- Inputs: DE = pointer to FCB
-
- Outputs: A = Error Code
- 0 --> No Error
- 1 --> Read past end of file
- 2 --> Reading unwritten data in random access
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: BDOS
-
- Special Error Conditions: -None-
-
-
-
- 5.09 Write a Block to a File
- Routine Name: F$WRITE
- Function║
- Writσá nex⌠ blocδ (12╕ bytes⌐ froφ TBUF╞ (buffe≥ a⌠ 80╚ ì
- t∩ 0FFH⌐ t∩ thσ openeΣ filσ whosσ FC┬ i≤ pointeΣ t∩ b∙ DE.
-
- Inputs: DE = pointer to FCB
-
- Outputs: A = Error Code
- 0 --> No Error
- 1 --> Error in extending file
- 2 --> End of disk data
- 0FFH --> No more directory space
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: BDOS
-
- Special Error Conditions: -None-
-
- .fo 6 - File Name String Parser and FCB Init Page #
-
- 6.0 File Name String Parser and FCB Init
-
- Routine Name: FNAME
- Function:
- FNAM┼á i≤ ß filσ namσ scanner«á Pointinτ t∩ thσá firs⌠ ì
- characte≥ oµ ß filσ namσ specificatioε oµ thσ form:
-
- ááááá du:filename.typ
-
- wherσá an∙á par⌠ oµ thσ specificatioε i≤ optional¼á thi≤á routinσ ì
- fill≤ iε aε FC┬ witΦ zeroe≤ (3╢ bytes)¼á properl∙ initialize≤ thσ ì
- F╬ (Filσ Name⌐ fielΣ iµ 'filenameº i≤ presen⌠ anΣ F╘ (Filσá Type⌐ ì
- fielΣ iµ 'typº i≤ present¼ anΣ return≤ thσ numbe≥ oµ thσ selecteΣ ì
- disδá (iεá thσ rangσ froφ ▒ fo≥ ┴ t∩ 1╢ fo≥ P⌐ iµ 'dº i≤á presen⌠ ì
- anΣá thσ numbe≥ oµ thσ selecteΣ use≥ (iε thσ rangσ froφ ░á t∩á 3▒ ì
- anΣá thσ questioε marδ '?º character⌐ iµ 'uº i≤ present«á Iµ 'dº ì
- i≤ no⌠ present¼ 0FF╚ i≤ returneΣ fo≥ i⌠ t∩ indicatσ curren⌠ disk¼ ì
- anΣá iµ 'uº i≤ no⌠ present¼á 0FF╚ i≤ returneΣ fo≥ i⌠ t∩á indicatσ ì
- curren⌠ user.
-
- Thσ strinτ pointeΣ t∩ b∙ H╠ i≤ no⌠ ß conventiona∞ strinτá iε ì
- thσá sensσá oµ thσ res⌠ oµ thσ SYSLI┬ routines«á Thi≤ strinτá i≤ ì
- terminateΣ b∙ an∙ oµ thσ followinτ delims¼á a≤ opposeΣ b∙á simpl∙ ì
- alway≤ beinτ terminateΣ b∙ ß binar∙ zero« Thσ delimite≥ lis⌠ is:
-
- ááááá <NULL or Binary 0> <SP or Space>
- ááááá = _ ; , < >
-
- Thσ followinτ arσ valiΣ examples:
- ááááá test.txt <-- FN=TEXT FT=TXT, B reg = 0FFH,
- ááááá C reg = 0FFH
- ááááá a:t <-- FN=T FT=<SP>, B reg = 1,
- ááááá C reg = 0FFH
- ááááá 5:t <-- FN=T FT=<SP>, B reg = 0FFH,
- ááááá C reg = 5
- ááááá c10:x.y <-- FN=X FT=Y, B reg = 3,
- ááááá C reg = 10
-
-
- Inputs: HL points to the first byte of the target string
- ááááá (which ends in a delimiter)
- ááááá DE pts to the first byte of a 36-byte long FCB
-
- Outputs: B=Disk Number (1 for A to 16 for P, or 0FFH if
- ááááá no disk specified)
- ááááá C=User Number (0 to 31 or '?' for all users, or
- ááááá 0FFH if no user specified)
- ááááá HL points to the character which ended the scan
- ááááá A = 0 and Zero Flag Set (Z) if invalid Disk or User
- ááááá Specified; A = 0FFH and NZ if no error
- Registers Affected: PSW, BC, HL
- SYSLIB Routines Called: CAPS
- Special Error Conditions: None
- è
- Routine Name: INITFCB
- Function║
- ááááá INITFC┬á simpl∙á clear≤ al∞ oµ thσ field≤ oµ ßá 36-bytσ ì
- áááááFC┬á t∩á zer∩ excep⌠ fo≥ thσ F╬ anΣ F╘ (Filσ Namσá anΣá Filσ ì
- áááááType⌐ fields¼ whicΦ i⌠ leave≤ untouched.
-
- Inputs: DE = pointer to FCB buffer
-
- Outputs: None
-
- Registers Affected: None
-
- SYSLIB Routines Called: FILLB
-
- Special Error Conditions: None
-
- .fo 7 - Input Line Editors Page #
-
- 7.0 Input Line Editors
-
- Aεá Inpu⌠ Linσ Edito≥ i≤ useΣ t∩ accep⌠ ß linσ oµ tex⌠á froφ ì
- thσ user¼ allowinτ hiφ t∩ issuσ command≤ likσ backspacσ anΣ Ctrl-ì
- ╪á (erasσá al∞á oµ linσ typeΣ s∩ far⌐ t∩ edi⌠ hi≤ tex⌠ a≤á hσá i≤ ì
- inputtinτá it«á Oncσ thσ tex⌠ ha≤ beeε entered¼á thσ Inpu⌠á Linσ ì
- Edito≥ return≤ t∩ thσ callinτ prograφ witΦ thσ user'≤ tex⌠ storeΣ ì
- in a buffer. This text is terminated by a binary 0.
-
- Tw∩ oµ thσ Inpu⌠ Linσ Editor≤ iε SYSLI┬ usσ thσ CP/═ BDO╙ t∩ ì
- providσ thσ linσ edito≥ function«á The∙ mainl∙ servσ t∩ preservσ ì
- thσá register≤á durinτá thσá functioεá cal∞á anΣá t∩á storσáá thσ ì
- terminatinτ zer∩ a⌠ thσ enΣ oµ thσ text«á The∙ occup∙ les≤ spacσ ì
- than the third Input Line Editor, INLINE.
-
- Thσ thirΣ Inpu⌠ Linσ Editor¼á INLINE¼á i≤ useΣ wheε securit∙ ì
- i≤á important«á Unlikσá thσ othe≥ two¼á wheε typinτ ß Ctrl-├á t∩ ì
- INLINE¼á thσá Inpu⌠á Linσá Edito≥ (anΣ callinτá program⌐á i≤á no⌠ ì
- aborteΣ anΣ contro∞ returneΣ t∩ CP/M«á Instead¼á thσ Ctrl-├ cha≥ ì
- i≤ simpl∙ storeΣ iε thσ user'≤ line« Also¼ unlikσ thσ othe≥ two¼ ì
- INLIN┼á caεá bσá instructeΣá t∩á ech∩á o≥á no⌠á ech∩á thσáá inpu⌠ ì
- characters«á Thi≤á featurσ i≤ usefu∞ fo≥ program≤ whicΦ wan⌠á t∩ ì
- inpu⌠á ßá password«á INLIN┼á caε bσ instructeΣ no⌠ t∩á ech∩á thσ ì
- password¼á bu⌠á i⌠ wil∞ stil∞ providσ thσ linσ editinτá function≤ ì
- for the user so that he can correct mistakes if he makes them.
-
-
- Routine Name: BBLINE
- Function:
- BBLIN┼ provide≤ ß ver∙ convenien⌠ interfacσ t∩ thσ BDO╙ ì
- fo≥á inpu⌠ linσ edito≥ functions«á I⌠ contain≤ it≤ owεá interna∞ ì
- buffe≥á fo≥ storagσ oµ thσ inpu⌠ linσ (20░ byte≤ allocated)¼á anΣ ì
- i⌠á return≤ ß pointe≥ t∩ thσ firs⌠ bytσ oµ thσ linσ upoεá return« ì
- Thσá linσá storeΣ iε thi≤ buffe≥ i≤ terminateΣ b∙ ßá binar∙á zer∩ ì
- (0).
-
- T∩á usσá BBLINE¼áá thσá use≥á neeΣá onl∙á cal∞á it¼á witΦá ß ì
- capitalizatioε flaτ storeΣ iε thσ ┴ Register«á Iµ ┴ ╜ 0¼á BBLIN┼ ì
- doe≤ no⌠ capitalizσ thσ inpu⌠ linσ characters╗á iµ ┴ <╛ 0¼ BBLIN┼ ì
- capitalize≤á thσá inpu⌠ linσ character≤ beforσ returninτá t∩á thσ ì
- caller.
-
- N∩ erro≥ code≤ arσ returneΣ b∙ BBLINE« Oε return¼ H╠ point≤ ì
- t∩ thσ firs⌠ bytσ oµ thσ inpu⌠ linσ anΣ ┴ contain≤ ß coun⌠ oµ thσ ì
- numbe≥ oµ character≤ iε tha⌠ linσ (no⌠ countinτ thσ endinτ zero).
-
-
- Inputs: A=0 to Not Capitalize Line, A<>0 to Capitalize Line
-
- Outputs: HL pts to first char in the line
- A is number of characters in the line (not
- counting the ending zero)
-
- Registers Affected: PSW, HL
-
- SYSLIB Routines Called: CAPS
-
- Special Error Conditions: None
-
-
-
- Routine Name: BLINE
- Function:
- BLIN┼ provide≤ ß ver∙ convenien⌠ interfacσ t∩ thσá BDO╙ ì
- fo≥á inpu⌠ linσ edito≥ functions«á I⌠ perform≤ thσ samσ typσá oµ ì
- functioεá a≤á BBLINE¼á bu⌠ i⌠ doe≤ no⌠ contaiε it≤á owεá interna∞ ì
- buffer«á Thσ use≥ i≤ expecteΣ t∩ providσ sucΦ ß buffer¼ whicΦ i≤ ì
- structureΣ a≤ follows:
-
- SIZE: DB <Size of Buffer>
- CCNT: DS 1
- LINE: DS <Size of Buffer + 1>
- ì
- BLIN┼ return≤ ß pointe≥ t∩ thσ firs⌠ bytσ oµ thσ linσ (LINE⌐ upoε ì
- return« Thσ linσ storeΣ iε thi≤ buffe≥ i≤ terminateΣ b∙ ß binar∙ ì
- zer∩ (0).
-
- T∩ usσ BLINE¼á thσ use≥ neeΣ onl∙ cal∞ it¼ witΦ ß pointe≥ t∩ ì
- thσ user'≤ buffe≥ iε H╠ anΣ ß capitalizatioε flaτ storeΣ iε thσ ┴ ì
- Register«á Iµá ┴ ╜ 0¼á BLIN┼ doe≤ no⌠ capitalizσ thσ inpu⌠á linσ ì
- characters╗áá iµá ┴á <╛á 0¼á BLIN┼á capitalize≤á thσá inpu⌠á linσ ì
- character≤ beforσ returninτ t∩ thσ caller.
-
- N∩ erro≥ code≤ arσ returneΣ b∙ BLINE«á Oε return¼ H╠ point≤ ì
- t∩ thσ firs⌠ bytσ oµ thσ inpu⌠ linσ anΣ ┴ contain≤ ß coun⌠ oµ thσ ì
- numbe≥ oµ character≤ iε tha⌠ line (not counting the ending zero).
-
- Inputs: A=0 to Not Capitalize Line, A<>0 to Capitalize Line
- HL pts to first byte (SIZE) of user-supplied buffer
-
- Outputs: HL pts to first char in the line
- A is number of characters in the line (not
- counting the ending zero)
-
- Registers Affected: PSW, HL
-
- SYSLIB Routines Called: CAPS
-
- Special Error Conditions: None
-
-
-
- Routine Name: INLINE
- Function║
- INLIN┼á allow≤á thσ use≥ t∩ inpu⌠ ß linσ oµá tex⌠á froφ ì
- CON║á int∩ thσ buffe≥ pointeΣ t∩ b∙ HL«á Thσ use≥ i≤ alloweΣá t∩ ì
- edi⌠á thσá tex⌠á a≤á hσ type≤ it¼á anΣá INLIN┼á respond≤á t∩á thσ ì
- followinτ edito≥ commands:
-
- Key Command Function
- <BS> Delete previous character and back up cursor
- <DEL> Delete previous character and echo it
- <CR> Input complete -- return to calling program
- <LF> Skip down to next physical line and insert a
- <CR> <LF> into buffer
- <TAB> Tabulate to next tab stop (every 8)
- Ctrl-U, Erase current line (clear buffer) and restart
- Ctrl-X input
- Ctrl-R Retype current line
- Ctrl-┼ Ski≡ dowε t∩ nex⌠ physica∞ line╗ inser⌠
- nothing into buffer
-
- Oε exit¼á thσ buffe≥ contain≤ thσ tex⌠ entereΣ followeΣ b∙ ß ì
- <NULL╛ (binar∙ 0)╗á thσ <CR╛ typeΣ t∩ enΣ thσ inpu⌠ i≤ NO╘ placeΣ ì
- iε thσ buffer.
-
-
- Inputs: HL = pointer to input line buffer
- A = Echo Flag (A=0 Means Don't Echo Input)
- Outputs: -None- (Input line buffer contains text typed by user)
- Registers Affected: -None-
- SYSLIB Routines Called: CCOUT, CIN, COUT, CRLF
-
- Specia∞á Erro≥ Conditions║
- <BEL╛á (Bee≡ a⌠ CON:⌐ i≤ outpu⌠ iµ attemp⌠ i≤á madσá t∩ ì
- deletσá characte≥ (<BS╛ o≥ <DEL>⌐ beforσ beginninτ oµá line«á N∩ ì
- limi⌠á o≥á erro≥ checkinτ i≤ donσ oε thσ sizσ oµ thσá inpu⌠á linσ ì
- buffe≥á (buffe≥ overflo≈ i≤ possible¼á s∩ i⌠ i≤ recommendeΣá tha⌠ ì
- buffe≥á i≤ madσ arbitraril∙ large)«á HasΦ marδ (#⌐ i≤ printeΣ iε ì
- responsσ t∩ Ctrl-R¼ Ctrl-U¼ anΣ Ctrl-X.
-
- Note║á INLIN┼á offer≤á tw∩ feature≤ no⌠ founΣ iε BLIN┼á anΣ ì
- BBLINE«á First¼á i⌠ canno⌠ bσ aborteΣ b∙ ß Ctrl-C╗ thi≤ i≤ good¼ ì
- sincσá i⌠á caε bσ useΣ iε "secureó program≤ withou⌠ fea≥á oµá thσ ì
- use≥ breakinτ ou⌠ oµ thσ program« Second¼ i⌠ caε bσ madσ t∩ ech∩ ì
- o≥á no⌠á ech∩á thσá input╗á thi≤á provide≤á somσá protectioεá fo≥ ì
- inputtinτ sensitivσ information¼ likσ ß password.
-
- INLIN┼á essentiall∙á provide≤ al∞ oµ thσ conventiona∞á inpu⌠ ì
- linσ edito≥ functions«á I⌠ i≤ somewha⌠ morσ flexiblσ thaεá BLIN┼ ì
- anΣá BBLINE¼á bu⌠ thσ tradeofµ i≤ tha⌠ INLIN┼ take≤ u≡ morσ spacσ ì
- thaε eithe≥ BLIN┼ o≥ BBLINE«á Iµ securit∙ i≤ no⌠ required¼ i⌠ i≤ ì
- recommendeΣ tha⌠ thσ programme≥ emplo∙ BLIN┼ o≥ BBLIN┼ insteaΣ oµ ì
- INLINE.
-
-
- .fo 8 - String Output Routines Page #
-
- 8.0 String Output Routines -- PRINT, LPRINT, PSTR, LPSTR
-
- Routine Names: PRINT, LPRINT
- Function║
- Prin⌠á strinτ pointeΣ t∩ b∙ thσ returε addres≤ oεá CON║ ì
- (PRINT⌐á o≥ LST║á (LPRINT)«á Strinτ i≤ terminateΣ b∙ ß binar∙ 0« ì
- Contro∞ i≤ returneΣ t∩ bytσ followinτ string.
-
- Inputs: Return Address = pointer to string to be printed
-
- Outputs: HL points to byte after string
- (string is printed on CON: or LST:)
-
- Registers Affected: HL
-
- SYSLIB Routines Called: PSTR (for PRINT); LSTR (for LPRINT)
-
- Specia∞ Erro≥ Conditions:
- Thσ strinτ MUS╘ bσ terminateΣ b∙ ß binar∙ 0!!!
-
-
-
- Routine Names: PSTR, LPSTR
- Function║
- Prin⌠á strinτ pointeΣ t∩ b∙ H╠ oε CON║á (PSTR⌐ o≥á LST║ ì
- (LPSTR)« Strinτ i≤ terminateΣ b∙ ß binar∙ 0.
-
- Inputs: HL = pointer to string to be printed
-
- Outputs: -None- (string is printed on CON: or LST:)
-
- Registers Affected: -None-
-
- SYSLI┬á Routine≤ Called║ CCOUT¼á COU╘ (fo≥ PSTR)╗
- LCOUT¼ LOU╘ (fo≥ LPSTR)
-
- Specia∞ Erro≥ Conditions:
- Thσ strinτ MUS╘ bσ terminateΣ b∙ ß binar∙ 0!!!
-
- .fo 9 - Numeric Output Routines Page #
-
- 9.0 Numeric Output Routines
-
- 9.01 Output HL as 4 Hexadecimal Characters
-
- Routine Names: PHL4HC, LHL4HC
- Function║
- Prin⌠á H╠á a≤ fou≥ (4⌐ hexadecima∞ character≤á oεá CON║ ì
- (PHL4HC⌐ o≥ LST║ (LHL4HC).
-
- Inputs: HL = value to be printed
-
- Outputs: -None- (Value is printed)
-
- Registers Affected: -None-
-
- SYSLIB Routines Called: PA2HC (for PHL4HC);
- LA2HC (for LHL4HC)
-
- Special Error Conditions: -None-
-
-
-
- Routine Name: MHL4HC
- Function║
- Storσá H╠ a≤ fou≥ (4⌐ hexadecima∞ character≤ iε thσá 4-ì
- bytσ memor∙ buffe≥ pointeΣ t∩ b∙ DE« Oε return¼ D┼ point≤ t∩ thσ ì
- bytσ followinτ thi≤ buffer.
-
- Inputs: HL = value to be converted and stored
- DE points to 4-byte buffer
-
- Outputs: DE points to byte after buffer
-
- Registers Affected: DE
-
- SYSLIB Routines Called: MA2HC
-
- Special Error Conditions: -None-
-
-
-
- 9.02 Output HL as 5 Decimal Character
-
- Routine Names: PHL5DC, LHL5DC
- Function║
- Prin⌠á H╠á a≤á fivσá (5⌐á decima∞á character≤á oεá CON║ ì
- (PHL5DC⌐ o≥ LST║ (LHL5DC).
-
- Inputs: HL = value to be printed
-
- Outputs: -None- (Value is printed)
-
- Registers Affected: -None-
-
- SYSLIB Routines Called: POUT (for PHL5DC); LOUT (for LHL5DC)
-
- Special Error Conditions: -None-
-
-
-
- Routine Name: MHL5DC
- Function║
- Storσá H╠ a⌠ fivσ (5⌐ decima∞ character≤ iεá memor∙á iε ì
- thσ 5-bytσ buffe≥ pointeΣ t∩ b∙ DE«á Oε return¼ D┼ point≤ t∩ thσ ì
- bytσ afte≥ thi≤ buffer.
-
- Inputs: HL = value to be converted and stored
- DE points to a 5-byte buffer
-
- Outputs: DE points to the byte following the buffer
-
- Registers Affected: DE
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
-
- 9.03 Output HL as Up to 5 Decimal Character with Leading Spaces
-
- Routine Names: PHLDC, LHLDC
- Function║
- Prin⌠á H╠á a≤á u≡ t∩ fivσ (5⌐ decima∞á character≤á witΦ ì
- leadinτ space≤ (<SP>⌐ oε CON║ (PHLDC⌐ o≥ LST║ (LHLDC).
-
- Inputs: HL = value to be printed
-
- Outputs: -None- (Value is printed)
-
- Registers Affected: -None-
-
- SYSLIB Routines Called: POUT (for PHLDC); LOUT (for LHLDC)
-
- Special Error Conditions: -None-è
- Routine Name: MHLDC
- Function║
- Storσá H╠á a≤ u≡ t∩ fivσ (5⌐á decima∞á character≤á witΦ ì
- leadinτ space≤ iε thσ 5-bytσ memor∙ buffe≥ pointeΣ t∩ b∙ DE.
-
- Inputs: HL = value to be converted and printed
- DE points to the 5-byte buffer
-
- Outputs: DE points to the byte after the buffer
-
- Registers Affected: DE
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
- 9.04 Output A as 2 Hexadecimal Characters
-
- Routine Names: PA2HC, LA2HC
- Function║
- Prin⌠á ┴á a≤á tw∩ (2⌐ hexadecima∞á character≤á oεá CON║ ì
- (PA2HC⌐ o≥ LST║ (LA2HC).
-
- Inputs: A = value to be printed
-
- Outputs: -None- (Value is printed)
-
- Registers Affected: -None-
-
- SYSLI┬ Routine≤ Called║á E╬ (fo≥ both)╗á POU╘ (fo≥á PA2HC)╗ ì
- LOU╘ (fo≥ LA2HC)
-
- Special Error Conditions: -None-
-
-
-
- Routine Name: MA2HC
- Function║
- Storσ ┴ a≤ tw∩ (2⌐ hexadecima∞ character≤ iε thσ 2-bytσ ì
- memor∙á buffe≥ pointeΣ t∩ b∙ DE«á Oε return¼á DE point≤ t∩á bytσ ì
- afte≥ buffer.
-
- Inputs: A = value to be converted and stored
- DE points to 2-byte buffer
-
- Outputs: DE points to byte after this buffer
-
- Registers Affected: DE
-
- SYSLIB Routines Called: EN
-
- Special Error Conditions: -None-
- è
- 9.05 Output A as 3 Decimal Characters
-
- Routine Names: PA3DC, LA3DC
- Function║
- Prin⌠ ┴ a≤ threσ (3⌐ decima∞ character≤ oε CON║ (PA3DC⌐ ì
- o≥ LST║ (LA3DC).
-
- Inputs: A = value to be printed
-
- Outputs: -None- (Value is printed)
-
- Registers Affected: -None-
-
- SYSLIB Routines Called: POUT (for PA3DC); LOUT (for LA3DC)
-
- Special Error Conditions: -None-
-
-
-
- Routine Name: MA3DC
- Function║
- Storσá ┴ a≤ threσ (3⌐ decima∞ character≤ iε thσá 3-bytσ ì
- memor∙ buffe≥ pointeΣ t∩ b∙ DE« Oε return¼ DE point≤ t∩ thσ bytσ ì
- afte≥ thσ buffer.
-
- Inputs: A = value to be converted and stored
- DE points to the 3-byte buffer
-
- Outputs: DE points to the byte after the buffer
-
- Registers Affected: DE
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
- 9.06 Output A as Up to 3 Decimal Characters with Leading Spaces
-
- Routine Names: PADC, LADC
- Function║
- Prin⌠á ┴á a≤á u≡ t∩ threσ (3⌐ decima∞á character≤á witΦ ì
- leadinτ space≤ (<SP>⌐ oε CON║ (PADC⌐ o≥ LST║ (LADC).
-
- Inputs: A = value to be printed
-
- Outputs: -None- (Value is printed)
-
- Registers Affected: -None-
-
- SYSLIB Routines Called: POUT (for PADC); LOUT (for LADC)
-
- Special Error Conditions: -None-
- è
- Routine Name: MADC
- Function║
- Storσá ┴á a≤ u≡ t∩ threσ (3⌐á decima∞á character≤á witΦ ì
- leadinτ space≤ iε thσ 3-bytσ memor∙ buffe≥ pointeΣ t∩ b∙ DE«á Oε ì
- return¼ DE point≤ t∩ thσ bytσ afte≥ thσ buffer.
-
- Inputs: A = value to be converted and stored
- DE points to the 3-byte memory buffer
-
- Outputs: DE points to the byte after the buffer
-
- Registers Affected: DE
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
- .fo 10 - String and Value Comparison Routines Page #
-
- 10.0 String and Value Comparision Routines
-
- Routine Name: COMPHD
- Function║
- Comparσ H╠ t∩ DE«á Oε return¼á Zer∩ Flaτ Se⌠ =╛ HL=DE¼ ì
- Carr∙ Flaτ Se⌠ =╛ HL<DE.
-
- Inputs: HL, DE -- Values to compare
-
- Outputs: Zero and Carry Flags
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
-
- Routine Names: COMPB, COMPBC
- Function║
- Vecto≥ Comparσ Routines« Comparσ thσ vecto≥ pointeΣ t∩ ì
- b∙á H╠ witΦ tha⌠ pointeΣ t∩ b∙ D┼ (Vector≤ arσ oµ equa∞á length)« ì
- Vector≤á arσ ┬ byte≤ lonτ fo≥ COMP┬ anΣ B├ byte≤ lonτ fo≥ COMPBC« ì
- Oεá exit¼á Zer∩á Flaτ Se⌠ indicate≤ tha⌠ vector≤á arσá identical╗ ì
- Carr∙ Flaτ Se⌠ indicate≤ tha⌠ thσ vecto≥ pointeΣ t∩ b∙ H╠ i≤ les≤ ì
- thaε thσ vecto≥ pointeΣ t∩ b∙ DE.
-
- Inputs: HL, DE -- Pointers to vectors to compare
- B (for COMPB), BC (for COMPBC) -- number of bytes
- in vectors
-
- Outputs: Zero and Carry Flags
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
-
- Routine Name: SCANNER
- Function║
- SCANNE╥ scan≤ thσ vecto≥ oµ byte≤ pointeΣ t∩ b∙ H╠á fo≥ ì
- thσá vecto≥ oµ byte≤ pointeΣ t∩ b∙ DE«á Thσ HL-bytσ vecto≥ i≤á ┬ ì
- byte≤ lonτ anΣ thσ DE-bytσ vecto≥ i≤ ├ byte≤ long« Oε return¼ iµ ì
- found¼ H╠ point≤ t∩ thσ beginninτ locatioε withiε thσ origina∞ H╠ ì
- vecto≥á oµá thσ locateΣ vecto≥ anΣ thσ Zer∩ Flaτ i≤ Set╗á iµá no⌠ ì
- found¼ Zer∩ Flaτ i≤ no⌠ se⌠ anΣ H╠ i≤ no⌠ affecteΣ (point≤ t∩ thσ ì
- beginninτ oµ thσ origina∞ HL-bytσ vector).
-
-
- Inputs: HL = Pointer to vector to be scanned
- DE = Pointer to vector to scan for
- B = Number of bytes in HL-vector
- C = Number of bytes in DE-vector
-
- Outputs: If found, Zero Set and HL pts to located vector
- If not found, Zero Reset and HL unaffected
-
- Registers Affected: PSW, HL
-
- SYSLIB Routines Called: -None-
-
- Specia∞á Erro≥á Conditions║á Automatiπá succes≤á iµá vecto≥ ì
- searcheΣ fo≥ i≤ null.
-
-
-
- Routine Name: INSTR
- Function║
- INSTRIN╟á Function«á Scaε thσ strinτ pointeΣ t∩ b∙á H╠ ì
- fo≥ thσ strinτ pointeΣ t∩ b∙ DE«á ┴ strinτ i≤ ß vecto≥ oµá byte≤ ì
- terminateΣ b∙ ß binar∙ 0.
-
- Oε return¼á iµ found¼ Zer∩ Flaτ i≤ Se⌠ anΣ H╠ point≤ t∩ ì
- 1s⌠ bytσ oµ substrinτ withiε scanneΣ string╗á iµ no⌠ found¼á Zer∩ ì
- Flaτ i≤ no⌠ se⌠ anΣ H╠ i≤ no⌠ affected.
-
-
- Inputs: HL = Pointer to string to be scanned
- DE = Pointer to string to scan for
-
- Outputs: If found, Zero Set and HL pts to located substring
- If not found, Zero Reset and HL unaffected
-
- Registers Affected: PSW, HL
-
- SYSLIB Routines Called: -None-
-
- Specia∞ Erro≥ Conditions:
- Automatiπ succes≤ iµ strinτ searcheΣ fo≥ i≤ null.
- .fo 11 - Character Input/Output Routines Page #
-
- 11.0 Character Input/Output Routines
-
- 11.01 <CR> <LF> Output
-
- Routine Names: CRLF, LCRLF
- Function:
- Print <CR> and <LF> on CON: (CRLF) or LST: (LCRLF).
-
- Inputs: -None-
-
- Outputs: -None- (<CR> <LF> is printed)
-
- Registers Affected: -None-
-
- SYSLIB Routines Called: POUT (for CRLF); LOUT (for LCRLF)
-
- Special Error Conditions: -None-
-
-
-
- 11.02 Conditional Input
-
- Routine Name: CONDIN
- Function║
- Inpu⌠á ßá characte≥á froφ CON║á iµá onσá i≤á available╗ ì
- otherwise¼á returεá ßá flaτá statinτá tha⌠á ßá characte≥á i≤á no⌠ ì
- availablσ oε CON:.
-
- Inputs: -None-
-
- Outputs: A = character typed at CON: (if available)
- Zero Flag is set (Z) if no character is available
- Zero Flag is reset (NZ) if character is available
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: CST, CIN
-
- Special Error Conditions: -None-
-
-
- 11.03 General Input Routines
-
- Routine Name: CST
- Function║
- Inpu⌠ thσ statu≤ oε CON║á iε Registe≥ A«á Iµ ReaΣ Datß ì
- Available¼ A=0╗ otherwise¼ A=1.
-
- Inputs: -None-
-
- Outputs: A = Console Status
- 0 --> Read Data Available (RDA)
- 1 --> Read Data Not Available (Not RDA)
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
-
- Routine Names: CIN, RIN
- Function║á Inpu⌠ characte≥ froφ CON║á (CIN⌐ o≥ RDR║ (RIN⌐ iε ì
- Registe≥ A.
-
- Inputs: -None-
-
- Outputs: A = Character input from CON: or RDR:
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
-
- 11.04 General Output Routines
-
- Routine Names: COUT, LOUT, POUT
- Function║
- Outpu⌠á characte≥ iε Registe≥ ┴ t∩á CON║á (COUT)¼á LST║ ì
- (LOUT)¼ o≥ PUN║ (POUT).
-
- Inputs: A = Character to output
-
- Outputs: -None- (Character is output)
-
- Registers Affected: -None-
-
- SYSLIB Routine Called: -None-
-
- Special Error Conditions: -None-
- è
- Routine Names: CCOUT, CLOUT, CPOUT
- Function║
- Outpu⌠á characte≥ iε Registe≥ ┴ t∩á CON║á (COUT)¼á LST║ ì
- (LOUT)¼á o≥ PUN║á (POUT⌐ witΦ contro∞ characte≥ processing«á Al∞ ì
- character≤ witΦ ASCI╔ code≤ les≤ thaε <SP╛ (spacσ ╜ 20H⌐ iε valuσ ì
- excep⌠á <NULL>¼á <BEL>¼á <BS>¼á <LF>¼á anΣ <CR╛ arσ outpu⌠ a≤á aε ì
- uparro≈á (^⌐á followeΣ b∙ thσ correspondinτ lette≥á generateΣá b∙ ì
- addinτ 40╚ t∩ thσ characte≥ valuσ (i.e.¼á ▒ output≤ a≤ "^A"¼ ▓ a≤ ì
- "^B"¼á etc.)«á Again¼ thσ character≤ les≤ thaε <SP╛ iε valuσ NO╘ ì
- outpu⌠ iε thi≤ manne≥ arσ --
-
- <NULL> <BEL> <BS> <LF> <CR>
-
- An∙ characte≥ oµ valuσ greate≥ thaε <SP╛ i≤ outpu⌠ normally.
-
- Inputs: A = Character to output
-
- Outputs: -None- (Character/Code is output)
-
- Registers Affected: PSW (only the Flags;
- Register A is NOT affected)
-
- SYSLI┬ Routine≤ Called║ COU╘ (fo≥ CCOUT)╗
- LOU╘ (fo≥ CLOUT)╗ POU╘ (fo≥ CPOUT)
-
- Special Error Conditions: -None-
-
- .fo 12 - Math Routines Page #
-
- 12.0 Math Routines
-
- 12.01 Introduction
-
- Thi≤á modulσá contain≤ ß se⌠ oµ 16-bi⌠á unsigneΣá arithmetiπ ì
- routines«á Al∞ routine≤ usσ H╠ a≤ thσ accumulato≥ o≥ thσ result¼ ì
- anΣá H╠ anΣ D┼ contaiε thσ operand≤ requireΣ (iµ onl∙ onσ operanΣ ì
- is needed, HL contains it).
-
- The available routines are:
-
- ADDHD -- HL = HL + DE SUBHD -- HL = HL - DE
- MULHD -- HL = HL * DE DIVHD -- HL = HL / DE
- NEGH -- HL = 2's Complement of HL
- CMPH -- HL = 1's Complement of HL
- ROTLH -- HL is rotated left one bit position
- ROTRH -- HL is rotated right one bit position
- SHFTLH -- HL is shifted left one bit position
- SHFTRH -- HL is shifted right one bit position
- ANDHD -- HL = HL AND DE
- ORHD -- HL = HL OR DE
- XORHD -- HL = HL XOR DE
-
-
-
- 12.02 Arithmetic Operations -- ADDHD, SUBHD, MULHD, DIVHD
-
- Al∞á oµá thesσ routine≤ operatσ oε H╠ anΣá DE¼á placinτá thσ ì
- resul⌠á iε HL«á Thσ Carr∙ Flaτ i≤ affected¼á frequentl∙ useΣá t∩ ì
- indicate overflow.
-
-
- Routine Name: ADDHD
- Function║
- HL = HL + DE
- Inputs: HL, DE are operands
- Outputs: HL is result, Carry Flag Set (C) means overflow
- Registers Affected: HL, PSW
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- Routine Name: SUBHD
- Function║
- HL = HL - DE
- Inputs: HL, DE are operands
- Outputs: HL is result, Carry Flag Set (C) if HL<DE
- Registers Affected: HL, PSW
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
-
-
- Routine Name: MULHD
- Function║
- HL = HL * DE
- Inputs: HL, DE are operands
- Outputs: HL is result, Carry Set means Overflow
- Registers Affected: HL, PSW
- SYSLIB Routines Called: SHFTRH, SHFTLH
- Specia∞á Erro≥ Conditions║ None
- Note║á Thi≤á routinσ i≤ optimizeΣ fo≥ speed¼á witΦ ßá mino≥ ì
- sacrificσá oε size¼á anΣ i⌠ alway≤ take≤ 1╢ loop≤ t∩ perforφá an∙ ì
- multiplication.
-
-
-
-
- Routine Name: DIVHD
- Function║
- HL = HL / DE
- Inputs: HL, DE are operands
- Outputs: HL is result
- Registers Affected: HL
- SYSLIB Routines Called: SHFTLH
- Specia∞á Erro≥ Conditions║ None
- Note║á Thi≤á routinσ i≤ optimizeΣ fo≥ speed¼á witΦ ßá mino≥ ì
- sacrificσá oε size¼á anΣ i⌠ alway≤ take≤ 1╢ loop≤ t∩ perforφá an∙ ì
- division.
-
-
-
- 12.03 Complement Operations -- NEGH and CMPH
-
- These routines operate on HL, placing the result into HL.
-
-
- Routine Name: NEGH
- Function║
- HL = 2's Complement of HL
- Inputs: HL is operand
- Outputs: HL is result
- Registers Affected: HL
- SYSLIB Routines Called: CMPH
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- Routine Name: CMPH
- Function║
- HL = 1's Complement of HL
- Inputs: HL is operand
- Outputs: HL is result
- Registers Affected: HL
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ Noneè
- 12.04 Rotate and Shift Operations -- ROTLH, ROTRH, SHFTLH, SHFTRH
-
-
- These operations operate on HL, placing the result into HL.
-
-
- Routine Name: ROTLH
- Function║
- H╠á i≤á rotateΣá lef⌠ onσá bi⌠á position«á Thi≤á i≤á ß ì
- circula≥á rotate¼á anΣá thσ mos⌠ significan⌠ bi⌠ oµ ╚ i≤á rotateΣ ì
- into the least significant bit position of L.
- Inputs: HL is operand
- Outputs: HL is result
- Registers Affected: HL
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- Routine Name: ROTRH
- Function║
- H╠á i≤á rotateΣá righ⌠ onσ bi⌠á position«á Thi≤á i≤á ß ì
- circula≥á rotate¼á anΣ thσ leas⌠ significan⌠ bi⌠ oµ ╠ i≤á rotateΣ ì
- into the most significant bit position of H.
- Inputs: HL is operand
- Outputs: HL is result
- Registers Affected: HL
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- Routine Name: SHFTLH
- Function║
- H╠á i≤á shifteΣá lef⌠á onσá bi⌠á position«á Thσá leas⌠ ì
- significant bit of L is filled with a Zero.
- Inputs: HL is operand
- Outputs: HL is result
- Registers Affected: HL
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
-
-
-
- Routine Name: SHFTRH
- Function║
- H╠á i≤á shifteΣá righ⌠á onσá bi⌠á position«á Thσá mos⌠ ì
- significant bit of H is filled with a Zero.
- Inputs: HL is operand
- Outputs: HL is result
- Registers Affected: HL
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- 12.05 Logical Operations -- ANDHD, ORHD, XORHD
-
- These operate on HL and DE, placing the result into HL.
-
-
- Routine Name: ANDHD
- Function║
- HL = HL AND DE
- Inputs: HL and DE are operands
- Outputs: HL is result
- Registers Affected: HL
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- Routine Name: ORHD
- Function║
- HL = HL OR DE
- Inputs: HL and DE are operands
- Outputs: HL is result
- Registers Affected: HL
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- Routine Name: XORHD
- Function║
- HL = HL XOR DE
- Inputs: HL and DE are operands
- Outputs: HL is result
- Registers Affected: HL
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
-
- .fo 13 - CRC Routines Page #
-
- 13.0 CRC Routines
-
- Thσá CR├á Routine≤ ma∙ bσ useΣ t∩ checδ thσ validit∙á oµá aε ì
- incominτ seria∞ bytσ streaφ oµ arbitrar∙ length«á Thesσ routine≤ ì
- computσ anΣ checδ ß truσ 16-bi⌠ Cycliπ Redundanc∙ Codσ (CRC).
- The use of these routines will guarantee detection of:
- 1) all single- and double-bit errors
- 2) all errors with an odd number of error bits
- 3) all burst errors of length 16 or less
- Additionally, the following statistics:
- 1) 99.9969% of all 17-bit error bursts
- 2) 99.9984% of all possible longer error bursts
-
- Thσ followinτ displa∙ illustrate≤ ß typica∞ wa∙ t∩ usσ thesσ ì
- routines:
-
- ;
- ; EXTERNAL DECLARATIONS OF SYSLIB ROUTINES
- ;
- ...
- EXT CRCCLR ; CLEAR CRC ACCUMULATOR
- EXT CRCUPD ; UPDATE CRC ACCUMULATOR
- EXT CRCDONE ; RETURN CRC ACCUMULATOR VALUE
- EXT COMPHD ; COMPARE HL TO DE, RETURN ZERO IF EQUAL
- ...
- CRC$MAKE: ; ROUTINE TO ESTABLISH OUTGOING CRC
- CALL CRCCLR ; CLEAR CRC
- <loop CALLing CRCUPD> ; ACQUIRE VALUES
- CALL CRCDONE ; GET VALUE
- PUSH H ; SAVE VALUE
- CRC$CHECK: ; ROUTINE TO CHECK INCOMING CRC VALUE
- CALL CRCCLR ; CLEAR CRC
- <loop CALLing CRCUPD> ; ACQUIRE VALUES
- CALL CRCDONE ; GET 2ND CRC
- POP D ; GET 1ST CRC IN DE, 2ND IN HL
- CALL COMPHD ; COMPARE HL TO DE (SYSLIB ROUTINE)
- JNZ ERROR ; ERROR IF NO MATCH
- ...
-
- Thσá followinτá screeε display≤ describσ thσá CR├á routines« ì
- Therσ arσ threσ differen⌠ set≤ oµ CR├ computatioε routines¼á eacΦ ì
- se⌠á workinτ witΦ ß differen⌠ polynomial«á Thσ routinσá se⌠á fo≥ ì
- CRC▓á use≤ thσ samσ polynomia∞ a≤ thσ publiπ domaiε CRC╦á prograφ ì
- b∙ KeitΦ Petersen.
-
- CRC Routine Polynomial
- ----------- ----------
- CRC X^16 + X^12 + X^5 + 1
- CRC1 X^16 + X^15 + X^2 + 1
- CRC2 X^16 + X^15 + X^13 + X^7 + X^4 +
- X^2 + X + 1
-
-
-
- Routine Name: CRCCLR, CRC1CLR, CRC2CLR
- Function║
- Clea≥á thσá interna∞ CR├ Accumulato≥ iε preparatioεá t∩ ì
- CR├ computation.
-
- Inputs: None
-
- Outputs: None
-
- Registers Affected: None
-
- SYSLIB Routines Called: None
-
- Special Error Conditions: None
-
-
-
- Routine Name: CRCUPD, CRC1UPD, CRC2UPD
- Function:
- Updatσ thσ CR├ Accumulato≥ valuσ witΦ thσ nex⌠ byte.
-
- Input: A=byte to be included in CRC
-
- Outputs: None
-
- Registers Affected: None
-
- SYSLIB Routines Called: None
-
- Special Error Conditions: None
-
-
-
- Routine Name: CRCDONE, CRC1DONE, CRC2DONE
- Function║
- Terminatσáá CR├á valuσá accumulatioεá anΣá returεáá thσ ì
- calculateΣ 16-bi⌠ CR├ value.
-
- Inputs: None
-
- Output: HL = calculated CRC value
-
- Registers Affected: HL
-
- SYSLIB Routines Called: None
-
- Special Error Conditions: None
-
-
-
-
-
-
-
-
-
-
-
- **** This Page Intentionally Left Blank ****
-
-
-
-
-
- .fo 14 - Random Number Generator Routines Page #
-
- 14.0 Random Number Generator Routines
-
- Thσ followinτ se⌠ oµ routine≤ arσ useΣ t∩ (1⌐ providσ ß seeΣ ì
- valuσá fo≥á thσá randoφ numbe≥ generato≥ anΣ (2⌐á cal∞á ßá randoφ ì
- number generator to return a random number.
-
- RNDINI╘á counts¼á waitinτ fo≥ thσ user'≤ keypress¼á a⌠ whicΦ ì
- poin⌠ i⌠ stop≤ countinτ anΣ use≤ thσ coun⌠ a≤ thσ seeΣ valuσá fo≥ ì
- the random number generator.
-
- RNDSEE─á allow≤á thσá use≥ t∩ specif∙ ß seeΣ valuσá fo≥á thσ ì
- random number generator.
-
- RND returns a random number.
-
-
- Routine Name: RNDINIT
- Function║
- RNDINI╘ enter≤ ß countinτ loop¼ waitinτ fo≥ thσ use≥ t∩ ì
- strikσ ß ke∙ a⌠ hi≤ console« I⌠ theε set≤ thσ seeΣ valuσ fo≥ thσ ì
- randoφ numbe≥ generato≥ baseΣ upoε it≤ coun⌠ valuσ a⌠ thσ instan⌠ ì
- of keypress. The seed value is an 8-bit quantity.
-
- Inputs: None (User Keypress)
-
- Outputs: None (Seed is set)
-
- Registers Affected: None
-
- SYSLIB Routines Called: CONDIN, RND
-
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- Routine Name: RNDSEED
- Function║
- Thi≤á routinσá allow≤ thσ use≥ t∩ providσ ß seeΣá valuσ ì
- fo≥á thσ randoφ numbe≥ generator«á Thσ seeΣ i≤ passeΣ iεá thσá ┴ ì
- register.
-
- Inputs: A = Seed
-
- Outputs: None (Seed is set)
-
- Registers Affected: None
-
- SYSLIB Routines Called: RND
-
- Specia∞á Erro≥ Conditions║ None
-
-
- è
- Routine Name: RND
- Function║
- Thi≤ i≤ thσ user-callablσ randoφ numbe≥ generator«á I⌠ ì
- return≤á ßá pseudo-randoφ numbe≥ (8-bit⌐ iε thσ ┴á registe≥á wheε ì
- called.
-
- Inputs: None
-
- Outputs: A = Random Number
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: None
-
- Specia∞á Erro≥ Conditions║ None
-
-
- .fo 15 - User/Disk Manipulation Routines Page #
-
- 15.0 User/Disk Manipulation Routines
-
- Thi≤á i≤á ßá se⌠ oµ fou≥ routine≤ whicΦ allo≈á thσá use≥á t∩ ì
- readil∙ movσ arounΣ betweeε disk≤ anΣ use≥ areas« Thesσ routine≤ ì
- are:
- PUTUD -- to save away the current disk/user
- GETUD -- to restore the disk/user saved by PUTUD
- RETUD -- to return the current disk/user
- LOGUD -- to log the user into a specified disk/user
-
- PUTU─á anΣ GETU─ arσ designeΣ t∩ bσ useΣ a≤ ßá placσá marke≥ ì
- anΣá returεá combination«á The∙ arσ intendeΣ t∩ bσ useΣ iεá codσ ì
- sequences like the following:
-
- CALL PUTUD ; Mark current location
- < move around on disks/users >
- CALL GETUD ; Return to marked location
-
- RETU─ anΣ LOGU─ arσ t∩ bσ useΣ t∩ finΣ ou⌠ wherσ thσ prograφ ì
- is (RETUD) and to enter a specific disk/user area (LOGUD).
-
-
-
- Routine Name: PUTUD
- Function║
- PUTU─á save≤ thσ curren⌠ use≥ anΣ disδ number≤ awa∙ fo≥ ì
- late≥á retrieva∞ b∙ GETUD«á PUTU─ anΣ GETU─ arσ intendeΣá t∩á bσ ì
- useΣá t∩á savσ anΣ restorσ thσ curren⌠ disδ anΣ use≥ arounΣá somσ ì
- set of operations in another user/disk area.
-
- Inputs: None
-
- Outputs: None
-
- Registers Affected: None
-
- SYSLIB Routines Called: RETUD
-
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- Routine Name: GETUD
- Function║
- GETU─á restore≤á thσ curren⌠ use≥ anΣá disδá whicΦá wa≤ ì
- saved by PUTUD.
-
- Inputs: None
-
- Outputs: None
-
- Registers Affected: None
-
- SYSLIB Routines Called: BDOS
-
- Specia∞á Erro≥ Conditions║ None
-
-
-
- Routine Name: LOGUD
- Function║
- LOGU─ log≤ iε thσ disδ specifieΣ b∙ thσ ┬ registe≥ (B=░ ì
- fo≥ Disδ A) and the user specified by the C register.
-
- Inputs: B=Disk (B=0 for Disk A), C=User
-
- Outputs: None
-
- Registers Affected: None
-
- SYSLIB Routines Called: BDOS
-
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- Routine Name: RETUD
- Function║
- RETU─á return≤ thσ number≤ oµ thσ curren⌠ use≥ iε ├ anΣ ì
- current disk in B (B=0 for disk A).
-
- Inputs: None
-
- Outputs: B=Disk (B=0 for disk A), C=User
-
- Registers Affected: BC
-
- SYSLIB Routines Called: BDOS
-
- Specia∞á Erro≥ Conditions║ None
-
-
- .fo 16 - Sort Routines Page #
-
- 16.0 Sort Routine≤
-
- Tw∩á routine≤ arσ provideΣ whicΦ givσ thσ SYSLI┬á programme≥ ì
- acces≤á t∩ ß ver∙ flexiblσ sortinτ system«á Thσ maiε routinσá i≤ ì
- calleΣá SORT¼á anΣ i⌠ provide≤ ß utilit∙ whicΦ doe≤ aεá in-memor∙ ì
- sor⌠á oµá ß se⌠ oµ fixed-lengtΦ records«á Thσ sortinτá techniquσ ì
- useΣ i≤ ß Shel∞ Sort¼á adapteΣ froφ thσ booδ "Softwarσ Toolsóá b∙ ì
- Kernigaεá anΣ Plaugher¼á publisheΣ b∙ Addison-Wesly¼á 1976¼á pagσ ì
- 106« Thi≤ sor⌠ i≤ ver∙ fast¼ mucΦ morσ s∩ thaε thσ simplσ bubblσ ì
- sort.
-
- Thi≤á Shel∞ Sor⌠ caε bσ donσ iε tw∩ ways║á witΦ o≥á withou⌠ ì
- usinτá pointers«á Sortinτá withou⌠ usinτ pointer≤á i≤á typicall∙ ì
- slowe≥ thaε sortinτ witΦ pointers¼á anΣ thσ onl∙ advantagσ t∩ no⌠ ì
- usinτá pointer≤ i≤ thσ saving≤ oµ spacσ whicΦ i≤ takeε u≡ b∙á thσ ì
- pointer≤ (2*numbe≥ oµ entrie≤ bytes)«á Iµ pointer≤ arσ useΣá fo≥ ì
- thσá sort¼á theε wheneve≥ aε exchangσ i≤ done¼á thσ pointer≤á arσ ì
- simpl∙ exchanged¼á rathe≥ thaε thσ ful∞ records¼ anΣ thi≤ greatl∙ ì
- decreases the sort time in most cases.
-
- Thσ SOR╘ routinσ i≤ controlleΣ b∙ passinτ t∩ i⌠ ß pointe≥ t∩ ì
- ß Sor⌠ Specificatioε Blocδ (SSB⌐ iε DE«á Thi≤ Sor⌠ Specificatioε ì
- Blocδá i≤á ß serie≤ oµ 2-bytσ word≤ whicΦ contaiεá thσá followinτ ì
- information:
-
- Bytes 0&1: Starting Address of 1st Record
- Bytes 2&3: Number of Records to Sort
- Bytes 4&5: Size of Each Record (in Bytes)
- Bytes 6&7: Address of Compare Routine Provided by User
- Thi≤á routinσ compare≤ tw∩ records¼á onσ ì
- ááááááááááááááááááááápointeΣ t∩ b∙ H╠ anΣ thσ othe≥ pointeΣ t∩ b∙ ì
- áááááááááááááááááááááDE«á Iµ thσ recorΣ pointeΣ t∩ b∙ D┼ i≤ les≤ ì
- áááááááááááááááááááááiε sortinτ orde≥ thaε tha⌠ pointeΣ t∩ b∙ HL¼ ì
- áááááááááááááááááááááthi≤ Comparσ Routinσ i≤ t∩ returε witΦ Carr∙ ì
- áááááááááááááááááááááSe⌠á (C)«á Iµá thσá record≤á arσá equa∞á iε ì
- ááááááááááááááááááááásortinτá order¼á thi≤ Comparσ Routinσ i≤á t∩ ì
- áááááááááááááááááááááreturε witΦ Zer∩ Se⌠ (Z)«á Onl∙ thσ PS╫á i≤ ì
- áááááááááááááááááááááto be affected by the Compare Routine.
- Bytes 8&9: Address of Pointer Table
- Bytσ 10║ Flag╗ ░FFH mean≤ t∩ usσ pointers¼ 0 mean≤ not
- Byte 11: Unused
-
- A≤ mentioneΣ previously¼á tw∩ routine≤ arσ availablσ iε thi≤ ì
- sor⌠ module«á Thσ firs⌠ routine¼ SSBINIT¼ look≤ a⌠ thσ beginninτ ì
- oµá ßá scratcΦá areßá anΣá thσ initia∞ content≤á oµá aεá SS┬á anΣ ì
- allocate≤ spacσ fo≥ thσ pointe≥ table«á I⌠ als∩ check≤ t∩ seσ iµ ì
- thσá buffe≥á requireΣ wil∞ overflo≈ thσá TP┴á (Transien⌠á Prograφ ì
- Area).
-
- Thσ seconΣ routine¼á SORT¼ perform≤ thσ sort¼ anΣ controlleΣ ì
- by the SSB pointer passed to it in DE.
-
-
- Routine Name: SSBINIT
- Function║
- Thi≤á routinσ load≤ byte≤ 0&▒ (addres≤ oµ firs⌠ record⌐ ì
- anΣá 8&╣ (addres≤ oµ pointe≥ table⌐ oµ aε SSB¼á checkinτ fo≥á TP┴ ì
- overflow«á I⌠ i≤ passeΣ thσ star⌠ addres≤ oµ ß scratcΦ area¼ anΣ ì
- set≤á thσ pointe≥ tablσ t∩ star⌠ here¼á look≤ a⌠ thσ recorΣá sizσ ì
- anΣ recorΣ coun⌠ entrie≤ oµ aε SSB¼á anΣ add≤ thi≤ produc⌠ t∩ thσ ì
- addres≤ oµ thσ pointe≥ table«á Thσ resultan⌠ addres≤ i≤ returneΣ ì
- as the address of the first record.
- Thi≤á routinσá ma∙á bσ useΣ a≤ describeΣá abovσá beforσá an∙ ì
- record≤á arσ loadeΣ int∩ memor∙ fo≥ thσ sort¼á o≥ i⌠ ma∙ bσá useΣ ì
- afte≥ thσ record≤ havσ alread∙ beeε loaded«á Iε thσ latte≥ case¼ ì
- thσá use≥ shoulΣ savσ thσ star⌠ addres≤ oµ thσ firs⌠á recorΣá anΣ ì
- cal∞á SSBINI╘á witΦ thσ addres≤ oµ thσ firs⌠ bytσ afte≥ thσá las⌠ ì
- record«á Oncσá SSBINI╘á ha≤ loadeΣ thσ buffer≤ iεá thσá SS┬á anΣ ì
- checkeΣá fo≥á ßá TP┴á overflo≈ (notσ tha⌠ thi≤ i≤á donσá fo≥á thσ ì
- pointer≤ only)¼á i⌠ wil∞ returε t∩ thσ caller¼á a⌠ whicΦ timσ thσ ì
- calle≥á shoulΣá restorσ thσ firs⌠ tw∩ byte≤ oµ thσ SS┬á t∩á thei≥ ì
- proper values, the actual start address of the first record.
-
- Inputs: HL pts to start of scratch area, DE pts to SSB
-
- Outputs: Z Flag is Set (Z) if TPA overflow; NZ if OK
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: MOVEB
-
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- Routine Name: SORT
- Function║
- SOR╘ sort≤ thσ se⌠ oµ fixeΣ lengtΦ record≤ accordinτ t∩ ì
- thσá contro∞á informatioε iε thσ Sor⌠ Specificatioεá Blocδá (SSB⌐ ì
- pointed to by DE.
-
- Inputs: DE pts to SSB
-
- Outputs: None (Records are Sorted)
-
- Registers Affected: None
-
- SYSLIB Routines Called: MOVEB, PRINT
-
- Specia∞á Erro≥ Conditions║
- Thσ Erro≥ Messagσ "SOR╘ Pointe≥ Erroró ma∙ bσá printed¼ ì
- bu⌠ i≤ highl∙ unlikely« Thi≤ indicate≤ ß fla≈ ha≤ developeΣ witΦ ì
- thσ SOR╘ routinσ fo≥ thi≤ particula≥ case¼á anΣ i⌠ coulΣ no⌠ SOR╘ ì
- thσá se⌠á oµ record≤ a≤ desired«á Thi≤ erro≥ i≤ fata∞á anΣá wil∞ ì
- abort to CP/M.
- .fo 17 - ZCPR2 Feature-Specific Routines Page #
-
- 17.0 ZCPR2 Feature-Specific Routines
-
- Thi≤ modulσ contain≤ ß serie≤ oµ routine≤ whicΦ arσ designeΣ ì
- t∩á allo≈ thσ programme≥ t∩ takσ advantagσ oµ ke∙ ZCPR▓á Feature≤ ì
- withou⌠ doinτ ß lo⌠ oµ programminτ fo≥ himself«á Iεá particular¼ ì
- facilitie≤ sucΦ a≤ thσ followinτ arσ provided:
-
- ZINIMC - Initializatioε -- Settinτ thσ locatioε oµ the
- multiple command line buffer
- ZINIEXT - Initialization -- Defining the location of a command
- search path
- ZINICI - Initialization -- Setting the current disk/user
- character definition
- ZINIDMA - Initialization -- Set the DMA address for ZCPR2 disk
- Input/Output
- ZGPINS - Initialization -- Setting all ZCPR2 buffers as
- required from buffers set up as per the
- ZCPR2 Utility Standard General Purpose
- Installation Format
- ZCPR╤ - Utilit∙ -- Returninτ ß pointe≥ t∩ thσ interna∞
- buffers of the first ZCPR2 SYSLIB Module
- ZMCPTR - Utility -- Returning a pointer to the first byte
- of the next command
- ZPFIND - Utility -- Searching for a file along the command
- search path
- ZFSTAT - Utility -- Determining the attributes of a file
-
- ┴á notσá oεá statu≤ routines║á therσ arσ threσá module≤á iε ì
- SYSLI┬á whicΦá contain≤á ZCPR2-specifiπá routines«áá Onσá modulσ ì
- contain≤ jus⌠ ZGPIN╙ anΣ contain≤ n∩ statu≤ returεá routine¼á bu⌠ ì
- thσ othe≥ tw∩ module≤ contaiε ZCPR╤ anΣ ZCPRQ2¼á resp¼á t∩ returε ì
- pointer≤á t∩á importan⌠á interna∞ buffer≤ a≤á describeΣá iεá thi≤ ì
- manual«á Thi≤ chapte≥ describe≤ thσ firs⌠ ZCPR▓ module¼á anΣ it≤ ì
- status routine is ZCPRQ.
-
-
- Routine Name: ZINIMC
- Function║
- ZINIM├ define≤ thσ basσ addres≤ oµ thσ multiplσ commanΣ ì
- linσá buffe≥ fo≥ thσ ZCPR▓ system«á Thσ initializatioε performeΣ ì
- b∙á thi≤á routinσá i≤ useΣ b∙ thσ ZMCPT╥ routinσá t∩á returεá thσ ì
- pointer to the first character of the next command.
-
- Inputs: HL = base address of multiple command line buffer
- Outputs: None
- Registers Affected: None
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
-
- Note║á Iµá thi≤ routinσ i≤ no⌠ called¼á i⌠ i≤ assumeΣá tha⌠ ì
- multiple command lines are not supported.
-
-
-
- Routine Name: ZINIEXT
- Function║
- ZINIEX╘á define≤ thσ basσ addres≤ oµ ßá commanΣá searcΦ ì
- path«á Thσá ZPFIN─á routinσ use≤ thi≤ basσ addres≤ t∩ star⌠á it≤ ì
- searcΦ fo≥ ß file«á Notσ tha⌠ thi≤ provide≤ addeΣ flexibilit∙ iε ì
- tha⌠á thi≤ neeΣ no⌠ necessaril∙ bσ thσ basσ addres≤ oµ thσá ZCPR▓ ì
- Systeφ commanΣ searcΦ path¼ bu⌠ i⌠ ma∙ bσ thσ basσ addres≤ oµ an∙ ì
- path (such as a separate path to look for HLP files).
-
- Inputs: HL = base address of path
-
- Outputs: None
-
- Registers Affected: None
-
- SYSLIB Routines Called: None
-
- Specia∞á Erro≥ Conditions║ None
-
- Note║á Iµá thi≤á routinσ i≤ no⌠ called¼á thσ externa∞á patΦ ì
- default≤ t∩ aε empt∙ path¼á s∩ n∩ harφ i≤ donσ anΣ n∩ searcΦá caε ì
- bσ performed.
-
-
- Routine Name: ZINICI
- Function║
- ZINIC╔á define≤á thσá characte≥ useΣá t∩á indicatσá thσ ì
- curren⌠á use≥á o≥ disδ iε thσ ZCPR▓ commanΣá searcΦá path«á Thi≤ ì
- characte≥á i≤ passeΣ iε A«á Iµ thi≤ routinσ i≤ no⌠á called¼á thσ ì
- ZCPR2 default of '$' is assumed.
- Inputs: A = Current Indicator
- Outputs: None
- Registers Affected: None
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
- Note║á Iµá thi≤á routinσ i≤ no⌠ called¼á Curren⌠á Indicato≥ ì
- defaults to '$'.
-
-
- Routine Name: ZINIDMA
- Function║
- ZINIDM┴ define≤ thσ DM┴ addres≤ useΣ fo≥ al∞ disδ Inpu⌠ ì
- anΣá Output«á Thi≤ addres≤ i≤ passeΣ iε HL«á Iµ thi≤ routinσ i≤ ì
- no⌠ called¼ thσ ZCPR▓ defaul⌠ oµ 80╚ i≤ assumed.
- Inputs: HL = DMA Address
- Outputs: None
- Registers Affected: None
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
- Note║á Iµ thi≤ routinσ i≤ no⌠ called¼á DM┴ Addres≤ default≤ ì
- t∩ 80H.
-
-
- Routine Name: ZGPINS
- Function║
- ZGPIN╙á initialize≤ thσ ZCPR2-Specifiπ Buffer≤ froφ thσ ì
- ZCPR▓á Utilit∙ StandarΣ General-Purposσ Installatioε Forma⌠á Bufì
- fers«á Thi≤ i≤ t∩ bσ useΣ b∙ ZCPR▓ Utilities¼á sucΦ a≤ XDIR3¼ t∩ ì
- completel∙ initializσ al∞ thσ necessar∙ buffers.
- Thσ buffer≤ iε thσ utilitie≤ arσ locateΣ a≤ indicateΣ iε thσ ì
- ZCPR▓ Utilitie≤ Manual.
-
- Inputs: None
-
- Outputs: None
-
- Registers Affected: None
-
- SYSLIB Routines Called: MOVEB, ZINIMC, ZINIEXT, ZCPRSET,
- ZFNINIT
-
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
-
- Routine Name: ZCPRQ
- Function║
- ZCPR╤á querie≤á thσ statu≤ oµ thσ SZCP╥á module¼á whicΦ ì
- contain≤ thesσ routines« Oε exit¼ thi≤ routinσ return≤ ß pointe≥ ì
- t∩á thσá interna∞ buffer≤ oµ thσ firs⌠ ZCPR▓á modulσá iεá SYSLIB« ì
- These buffers are structured as follows:
- Byte 0: Multiple command available flag (0=no)
- Bytes 1-2: Address of multiple command line
- buffer, if available
- Bytes 3-4: Address of external path (empty
- path if path not set)
- Byte 5: Current User/Disk Indicator
- Bytes 6-7: DMA Address
-
- Inputs: None
- Outputs: HL = Base Address of Buffers
- Registers Affected: HL
- SYSLIB Routines Called: None
- Specia∞á Erro≥ Conditions║ None
-
-
- Routine Name: ZMCPTR
- Function║
- ZMCPT╥á return≤ ß pointe≥ t∩ thσ nex⌠ characte≥ iεá thσ ì
- multiplσ commanΣ linσ iµ multiplσ command≤ arσ enabled«á ┴á flaτ ì
- is returned which says if multiple commands are enabled or not.
-
- Inputs: None
-
- Outputs: HL pts to next char in line
- A=0 and Zero Flag Set (Z) if multiple commands
- are not available; NZ otherwise
-
- Registers Affected: HL, PSW
-
- SYSLIB Routines Called: None
-
- Specia∞á Erro≥ Conditions║ None
-
-
-
-
- Routine Name: ZPFIND
- Function║
- ZPFIN─á searche≤á fo≥ ß filσ alonτ thσá commanΣá searcΦ ì
- patΦá whosσá basσ addres≤ wa≤ defineΣ wheε thσ programme≥á calleΣ ì
- ZINIEXT«á I⌠á log≤ int∩ eacΦ disδ anΣ use≥ areß alonτ thσá path¼ ì
- lookinτ fo≥ thσ filσ whosσ FC┬ i≤ pteΣ t∩ b∙ DE¼á unti∞ i⌠ eithe≥ ì
- find≤á thσ filσ o≥ reache≤ thσ enΣ oµ thσ patΦ (filσ no⌠á found)« ì
- Iµ thσ filσ i≤ found¼á i⌠ return≤ thσ disδ anΣ use≥ areß iε whicΦ ì
- thσ filσ resides«á ZPFIN─ alway≤ return≤ thσ proces≤ t∩ thσ disδ ì
- and user area it is "currently" logged into.
-
- Inputs: DE pts to the FCB of the file to find
- B is a flag; if B <> 0, search the current disk and
- user area first; if B=0, do not search the
- current disk and user area first
-
- Outputs: Zero Flag Clear (NZ) and A=0FFH if file found
- B = Disk (B=0 if Disk A), C=User if file found
- Zero Flag Set (Z) and A=0 if file not found
-
- Registers Affected: BC, PSW
-
- SYSLIB Routines Called: BDOS
-
- Specia∞á Erro≥ Conditions║ None
-
-
- Routine Name: ZFSTAT
- Function║
- ZFSTA╘á determine≤á thσ attribute≤ oµ thσ filσá iεá thσ ì
- curren⌠ disδ anΣ use≥ areß whosσ FC┬ i≤ pteΣ t∩ b∙ DE«á I⌠ tell≤ ì
- the programmer if the file is SYSTEM or not and READ/ONLY or not.
-
- Inputs: DE pts to FCB of file
-
- Outputs: B=0 means file is NOT System, B<>0 means file is
- C=0 means file is NOT R/O, C<>0 means file is
- Zer∩ Flaτ Se⌠ (Z⌐ anΣ A=░ iµ filσ founΣ anΣ BC
- valid, and Zero Flag Clear (NZ) if file not
- found
-
- Registers Affected: BC, PSW
-
- SYSLIB Routines Called: BDOS
-
- Specia∞á Erro≥ Conditions║ None
-
- Note: ZFSTAT does NOT do a search.
-
-
- .fo 18 - ZCPR2-Specific Named Directory Routines Page #
-
- 18.0 ZCPR2-Specific Named Directory Routines
-
- Thi≤ se⌠ oµ routine≤ i≤ specifiπ t∩ thσ ZCPR2-Specifiπ NameΣ ì
- Director∙ Structure«á Thesσ routine≤ providσ thσ programme≥ witΦ ì
- ßá se⌠á oµ routine≤ whicΦ resolvσ thσ nameΣ director∙á reference≤ ì
- fo≥ him¼ translatinτ ß nameΣ director∙ int∩ thσ disk/use≥ areß i⌠ ì
- refers to.
-
- Five routines are included in this set:
- o ZCPRQ2 -- Return Status
- o ZFNINIT -- Initialize Named Directory Buffers
- o ZDNFIND -- Scan for Disk Directory Name
- o ZDNAME -- Load All Disk Directory Name Data
- o ZFNAME -- Named Directory File Name Scanner
-
-
- Routine Name: ZCPRQ2
- Function:
- ZCPRQ▓á i≤á thσ companioε t∩ ZCPRQ¼á anΣ i⌠á return≤á ß ì
- pointe≥á t∩ thσ interna∞ buffer≤ oµ thσ seconΣ ZCPR▓ modulσ whicΦ ì
- contains such buffers. The organization of these buffers is:
-
- Byte 0: Max Number of Named Directory Entries
- Bytes 1-2: Address of memory-resident named
- directory buffer (or 0 if none)
- Bytes 3-38: FCB of NAMES.DIR
-
- Inputs: None
- Outputs: HL points to first byte of buffer
- Registers Affected: HL
- SYSLIB Routines Called: None
- Special Error Conditions: None
-
-
- Routine Name: ZFNINIT
- Function║
- ZFNINI╘á allow≤ thσ use≥ t∩ specif∙ thσ addres≤ oµá thσ ì
- memory-residen⌠á nameΣ director∙ buffer¼á initializσ thσ namσá oµ ì
- thσá nameΣá director∙ filσ (defaul⌠ namσ oµá NAMES.DIR⌐á t∩á somσ ì
- othe≥á name¼á anΣá t∩ changσ thσ numbe≥ oµ name≤ permitteΣá iεá ß ì
- director∙ filσ (defaul⌠ oµ 64).
-
- Inputs: DE pts to FCB containing the new file name
- HL contains address of memory-resident buffer
- C is the new maximum number of directory names
- A is a flag indicating values to set as follows:
- Bit 7 -- Set to 1 to load default FCB fm DE
- Bit 6 -- Set to 1 to load name count fm C
- Bit 5 -- Set to 1 to load address fm HL
- Outputs: None
- Registers Affected: None
- SYSLIB Routines Called: MOVEB
- Specia∞á Erro≥ Conditions║ None
-
- Routine Name: ZDNAME
- Function:
- ZDNAM┼á load≤ thσ content≤ oµ thσ NAMES.DI╥á filσá int∩ ì
- thσ memor∙ buffe≥ pointeΣ t∩ b∙ HL« EacΦ entr∙ iε thi≤ buffe≥ i≤ ì
- structured as follows:
- Byte 0: Disk Number (A=0)
- Byte 1: User Number
- Bytes 2-9: Directory Name, 8 Chars Max, Space
- Fill at End
-
- Inputs: HL pts to the memory buffer extending to the base
- of the BDOS
-
- Outputs: HL pts to the first entry in the buffer
- C is the number of valid entries, B=0
- A is the error flag (A=0 and Z if error)
-
- Registers Affected: HL, BC, PSW
-
- SYSLIB Routines Called: INITFCB, ZPFIND, FI3$OPEN, F3$GET
-
- Special Error Conditions: None
-
-
-
-
-
- Routine Name: ZDNFIND
- Function║
- ZDNFIN─ examine≤ thσ DIR║á prefi° fo≥ eithe≥ ß DU║ forφ ì
- o≥ ß director∙ name« Iµ i⌠ i≤ determineΣ tha⌠ thσ DIR║ prefi° i≤ ì
- no⌠ oµ thσ DU║ form¼ theε thσ memory-residen⌠ director∙ buffe≥ i≤ ì
- scanned¼á iµ present¼á and¼á failinτ that¼á thσ NAMES.DI╥ filσ i≤ ì
- sough⌠á alonτ thσ ZCPR▓ path¼á loaded¼á anΣ scanneΣ fo≥ ß corresì
- pondinτ name«á Iµ found¼á thσ correspondinτ use≥ anΣ disδ value≤ ì
- arσ returned╗ iµ no⌠ found¼ aε erro≥ codσ i≤ returned.
-
- Inputs: HL pts to first byte of DIR: prefix
- A=░ iµ DU║ forφ NO╘ allowed
-
- Outputs: B=Disk (B=1 if Disk A, B=0FFH if Current Disk),
- C=User (C=0FFH if Current User), HL pts to colon,
- Zer∩ Flaτ Clea≥ (NZ⌐ iµ n∩ error╗ Zer∩ Flaτ Se⌠
- (Z) if error, and no valid values returned
-
- Registers Affected: BC, HL, PSW
- SYSLIB Routines Called: INITFCB, ZPFIND, FI3$OPEN,
- FI3$CLOSE, F3$GET
-
- Specia∞ Erro≥ Conditions║ Notσ tha⌠ ZDNFIN─ use≤ Inpu⌠ Filσ ì
- 3¼á s∩á Inpu⌠á Filσ │ shoulΣ no⌠ bσ openeΣ wheε thi≤á routinσá i≤ ì
- called«á Also¼á ZPFIN─ i≤ used¼ s∩ thσ programme≥ mus⌠ bσ surσ ß ì
- proper external path is specified if needed by calling ZINIEXT.
-
- Routine Name: ZFNAME
- Function║
- ZFNAM┼á i≤ ß filσ namσ scanner«á Pointinτ t∩ thσ firs⌠ ì
- characte≥áá oµáá ßáá filσá namσáá specificatioεáá oµáá thσáá forφ ì
- 'DIR:FILENAME.TYP'¼á wherσá an∙á par⌠á oµ thi≤á specificatioεá i≤ ì
- optional¼á thi≤á routinσ fill≤ iε aε FC┬á witΦá zeroes¼á properl∙ ì
- initialize≤á thσá F╬ anΣ F╘ (Filσ Namσ anΣ Filσ Type⌐á field≤á iµ ì
- 'FILENAME.TYPºá o≥ an∙ par⌠ thereoµ i≤ present¼á anΣ return≤á thσ ì
- valuσ oµ disδ anΣ use≥ iµ the∙ arσ specifieΣ (o≥ 0FF╚ iµ not).
- Thσ director∙ indicato≥ 'DIR:'¼á iµ specified¼ ma∙ bσ oµ onσ ì
- of four forms:
- DIRECT: -- A named directory, of up to 8 chars long
- d: -- A disk drive letter
- u: -- A user number
- du: -- A disk drive letter and a user number
- Thσ du║á forφ i≤ checkeΣ first¼ s∩ unnecessar∙ disδ activit∙ ì
- in looking for the NAMES.DIR file is avoided.
- Examples of valid input strings:
- HELP:*.HLP A5:TEST.TXT C?:ABC.* PASCAL:*.COM
-
- Inputs: DE pts to FCB to fill, HL pts to first byte of
- targe⌠ string; FCB is 36 bytes long
-
- Outputs: B=Disk (B=1 for Disk A), C=User
- B=0FFH if no disk specified (current disk)
- C=0FFH if no user specified (current user)
- C=? if all user areas specified
- HL pts to terminating character
- A=0 and Zero Flag Set (Z) if error in disk
- or user numbers; A=0FFH and NZ if no error
-
- Registers Affected: BC, HL, PSW
-
- SYSLIB Routines Called: ZDNFIND
-
- Specia∞áá Erro≥áá Conditions║áá Seσáá FNAM┼áá routinσáá fo≥ ì
- similarities
-
-
- .fo 19 - Miscellaneous Routines Page #
-
- 19.0 Miscellaneou≤ Routine≤
-
- Thi≤ sectioε describe≤ thσ followinτ Miscellaneou≤ Routines:
-
-
- BDOS For Direct BDOS Interface
- BIOS For Direct BIOS Interface
- CAPS For Character Capitalization
- CAPSTR For String Capitalization
- CATH Convert ASCII Character to Hexadecimal
- CLINE Save Command Line Buffer
- CODEND Provide End of Code/Data Area
- EN Exchange Nybbles in A
- FILLB Fill Memory (up to 255 bytes)
- FILLBC Fill Memory (up to 65,535 bytes)
- HFILB Fill Memory (up to 255 bytes)
- HFILBC Fill Memory (up to 65,535 bytes)
- MOVEB Move Memory (up to 255 bytes)
- MOVEBC Move Memory (up to 65,535 bytes)
- HMOVB Move Memory (up to 255 bytes)
- HMOVBC Move Memory (up to 65,535 bytes)
- PAUSE Delay N 10ths of a Second
- VERSION Return Version Number of SYSLIB
-
-
- Routine Name: BDOS
- Function║
- Cal∞á CP/═á Entr∙á Poin⌠á a⌠ locatioεá ╡á anΣá preservσ ì
- Register≤ DE anΣ BC.
-
- Inputs: C and DE provide input parameters
-
- Outputs: A and HL provide output parameters
-
- Registers Affected: PSW, HL
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -Determined by Routines Called-
-
-
-
- Routine Name: BIOS
- Function║
- BIO╙ provide≤ thσ use≥ witΦ ß direc⌠ interfacσ int∩ thσ ì
- CP/═á BIOS«á I⌠á i≤ calleΣ witΦ thσ ┴ Reτ containinτá thσá inde° ì
- offse⌠á int∩ thσ BIO╙ JM╨ table«á N∩ register≤ arσ preserveΣá b∙ ì
- thi≤ routine«á Thσ content≤ oµ HL¼á DE¼ anΣ B├ arσ passeΣ t∩ thσ ì
- BIOS unchanged.
-
- The following table summarizes the BIOS JMP Table Entries --
-
- Offset Function
- 0 Cold Start
- 1 Warm Start
- 2 Console Status; Returns A=0FFH if char ready, A=0 if
- not
- 3 Console Input; Returns char in A
- 4 Console Output; Char passed in C
- 5 List Output; Char passed in C
- 6 Punch Output; Char passed in C
- 7 Reader Input; Returns char in A
-
- 8 Home Disk Head (Return Version Number); Returns
- Version Number in HL
- 9 Select Disk; Disk Number (A=0, etc) passed in C
- 10 Set Track Number; Track Number passed in C
- 11 Set Sector Number; Sector Number passed in C
- 12 Set DMA Address; DMA Address passed in BC
- 13 Read Block from Disk; Returns A=0 if OK, A=1 if Error
- 14 Write Block to Disk; Returns A=0 if OK, A=1 if Error
-
- 15 List Status; Returns A=0FFH if ready to output, A=0
- if not
- 16 Sector Translation; Logical-to-Physical Sector
- Translation; Logical Sector Number passed in BC
- and Translate Table Address passed in DE; Returns
- Physical Sector Number in HL
- è
- Inputs: A = Offset (as per Table Above)
- BC = Input Parameters
-
- Outputs: A, HL = Output Parameters
-
- Registers Affected: All
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
-
- Routine Name: CAPS
- Function║
- Capitalizσá ASCI╔á characte≥á iε Registe≥ ┴á iµá i⌠á i≤ ì
- lower-casσá alphabetiπá (a-z)╗á otherwise¼á returε ┴á unaffected« ì
- Onl∙á thσ lowe≥ seveε bit≤ oµ thσ bytσ arσá considered¼á anΣá thσ ì
- Mos⌠ Significan⌠ Bi⌠ i≤ maskeΣ ou⌠ t∩ zero.
-
- Inputs: A = character to capitalize
-
- Outputs: A = capitalized character
-
- Registers Affected: PSW
-
- SYSLIB Routins Called: -None-
-
- Special Error Conditions: -None-
-
-
-
- Routine Name: CAPSTR
- Function:
- CAPST╥ capitalize≤ thσ <NULL>-terminateΣ strinτ pointeΣ ì
- to by HL. No Registers are affected.
-
- Inputs: HL pts to first byte of string
-
- Outputs: None (String is Capitalized)
-
- Registers Affected: None
-
- SYSLIB Routines Called: CAPS
-
- Special Error Conditions: None
-
-
-
- Routine Name: CATH
- Function║
- Conver⌠á thσá ASCI╔á Hexadecima∞á characte≥á iεá thσá ┴ ì
- Registe≥ t∩ binar∙ iε thσ ┴ Register«á Iµ invaliΣ characte≥ (no⌠ ì
- 0-9¼ A-F)¼ returε <SP╛ (2░ Hex⌐ iε ┴ Registe≥ a≤ erro≥ code.
-
- Input: A = ASCII Hex Character (0-9, A-F)
-
- Output: A = Binary value represented by char
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: -None-
- Specia∞ Erro≥ Conditions:
- Iµá invaliΣá he°á char¼á <SP╛ (2░ Hex⌐á returneΣá iεá ┴ ì
- Register.
-
-
-
- Routine Name: CLINE
- Function:
- T∩á savσ thσ commanΣ linσ buffe≥ pteΣ t∩ b∙ H╠ awa∙á iε ì
- aε interna∞ buffe≥ a≤ ß string«á Thσ characte≥ coun⌠ i≤á pointeΣ ì
- t∩ b∙ H╠ (likσ thσ buffe≥ a⌠ 80╚ se⌠ b∙ ZCPR▓ anΣ CP/═ 2.2)¼á anΣ ì
- thσá buffe≥ content≤ (no⌠ includinτ thσ characte≥ count⌐ i≤ saveΣ ì
- awa∙ a≤ ß null-terminateΣ string«á Thi≤ routinσ return≤ witΦá H╠ ì
- pointing to the first character of this string.
-
- Inputs: HL points to command line
-
- Outputs: HL points to first character of string
-
- Registers Affected: HL
-
- SYSLIB Routines Called: -None-
- Special Error Conditions: -None-
-
-
-
- Routine Name: CODEND
- Function║
- Returεá thσ addres≤ oµ thσ nex⌠ pagσ followinτ thσ las⌠ ì
- bytσá oµ code«á Thi≤ i≤ usefu∞ iε determininτ wherσ thσá scratcΦ ì
- areß begins.
-
- Inputs: None
-
- Output: HL=Address of next page
-
- Registers Affected: HL
-
- SYSLIB Routines Called: -None-
- Special Error Conditions: -None-
-
- Routine Name: EN
- Function║
- Exchangσá Nybble≤ iε Registe≥ A╗á High-orde≥ fou≥á bit≤ ì
- arσ exchangeΣ witΦ Low-orde≥ fou≥ bit≤ oµ Registe≥ A.
-
- Inputs: A = Byte input
-
- Outputs: A = Byte output
-
- Registers Affected: PSW
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
-
- Routine Names: FILLB, FILLBC, HFILB, HFILBC
- Function║
- Thesσá routine≤ fil∞ aε areß oµ memor∙ witΦ ßá constan⌠ ì
- bytσ value«á FILL┬ caε fil∞ u≡ t∩ ß 256-bytσ buffer¼á anΣ FILLB├ ì
- caε fil∞ u≡ t∩ ß 65,536-bytσ (withiε reason⌐ buffer.
- FILL┬á anΣ FILLB├ havσ n∩ effect≤ oε an∙á registers«á HFIL┬ ì
- anΣ HFILB├ botΦ affec⌠ thσ H╠ registe≥ pair¼ anΣ the∙ returε witΦ ì
- H╠á pointinτ t∩ thσ bytσ afte≥ thσ las⌠ bytσ filled«á HFIL┬á anΣ ì
- HFILB├á arσá usefu∞ wheε furthe≥ processinτ froφ thσá las⌠á poin⌠ ì
- filled is desired.
-
- Inputs: HL points to the first byte of the buffer
- B (for FILLB) or BC (for FILLBC) = number of bytes
- in buffer
- A = byte value to fill buffer with
-
- Outputs: None for FILLB and FILLBC (Buffer is filled)
- H╠ point≤ t∩ nex⌠ bytσ fo≥ HFIL┬ anΣ HFILBC
-
- Registers Affected: None for FILLB, FILLBC; HL for HFILB,
- HFILBC
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
-
- Routine Names: MOVEB, MOVEBC, HMOVB, HMOVBC
- Function║
- Movσ thσ blocδ oµ memor∙ pointeΣ t∩ b∙ H╠ t∩ thσ memor∙ ì
- locatioεá pointeΣá t∩ b∙ DE«á MOVE┬ caε movσ u≡á t∩á ßá 256-bytσ ì
- buffer¼ anΣ MOVEB├ caε movσ u≡ t∩ ß 65,536-bytσ buffer.
-
- MOVE┬á anΣ MOVEB├ havσ n∩ effect≤ oε an∙á registers«á HMOV┬ ì
- anΣ HMOVB├ botΦ affec⌠ thσ H╠ registe≥ pair¼ anΣ the∙ returε witΦ ì
- H╠ anΣ D┼ pointinτ t∩ thσ bytσ afte≥ thσ las⌠ bytσ moved«á HMOV┬ ì
- anΣ HMOVB├ arσ usefu∞ wheε furthe≥ processinτ froφ thσ las⌠ poin⌠ ì
- filleΣ i≤ desired.
-
-
- Inputs: HL points to the 1st byte of the buffer to move
- DE points to the 1st byte of the buffer to move to
- B (for MOVEB) or BC (for MOVEBC) = number of bytes
- in buffer
-
- Outputs: None for MOVEB and MOVEBC (Buffer is moved)
- HL and DE pt to byte after last byte moved for
- HMOVB and HMOVBC
-
- Registers Affected: None for MOVEB, MOVBC; HL, DE for
- HMOVB, HMOVBC
-
- SYSLIB Routines Called: -None-
-
- Special Error Conditions: -None-
-
-
-
-
- Routine Name: PAUSE
- Function:
- Delay N 10ths of a Second.
- Inputs: HL = N (Number of 10ths of a Second Delay desired)
- B = Processor Speed in MHz (1, 2, 3, 4, ...)
- Outputs: None (Routine returns N 10ths of a Second later)
- Registers Affected: None
- SYSLIB Routines Called: None
- Special Error Conditons: None
-
-
-
-
- Routine Name: VERSION
- Function:
- Return Version Number of SYSLIB.
- Inputs: None
- Outputs: HL = Version Number (H=Major, L=Minor)
- Registers Affected: HL
- SYSLIB Routines Called: None
- Special Error Conditons: None
- .fo 20 - Cross-Reference Listing of SYSLIB Routines Page #
-
- 20.0 Cross-Reference Listing of SYSLIB Routines
-
- Symbol Defined Referenced
-
- ADDHD SMATH
- ADRCPY SFILEI S0FILE S1FILE S2FILE S3FILE
- ANDHD SMATH
-
- BBLINE SBBLIN
- BDOS SBODS SZFNAM SZCPR SFOPEN SFEXIS SFMAKE
- SFCLOS SRENAM SFREAD SFWRIT SFDEL
- SUD
- BIOS SBIOS
- BLINE SBLINE
-
- CAPS SCAPS SZFNAM SFNAME SEVAL SEVAL2 SBBLIN
- SBLINE SCAPST
- CAPSTR SCAPST
- CATH SCATH
- CCOUT SCCOUT SINLIN SPSTR
- CIN SCIN SCONDI SINLIN
- CLINE SCLINE
- CLOUT SCLOUT SLPSTR
- CMPH SMATH
- CODEND SCODEN
- COMPB SCOMP
- COMPBC SCOMP
- COMPHD SCOMPH
- CONDIN SCONDI SRAND
- COUT SCOUT SINLIN SPSTR SPHL5D SPA2HC SPADC
- SCRLF SCCOUT
- CPOUT SCPOUT
- CRC1CL SCRC1
- CRC1DO SCRC1
- CRC1UP SCRC1
- CRC2CL SCRC2
- CRC2DO SCRC2
- CRC2UP SCRC2
- CRCCLR SCRC
- CRCDON SCRC
- CRCUPD SCRC
- CRLF SCRLF SINLIN
- CST SCST SCONDI
-
- DBUFFE SDIR
- DFREE SDIR
- DIRALP SDIR
- DIRF SDIR
- DIRFS SDIR
- DIRLOA SDIR
- DIRNPA SDIR
- DIRPAC SDIR
- DIRSEL SDIR
- DIRSLO SDIRèSymbol Defined Referenced
-
- DIVHD SMATH
- DPARAM SDIR
-
- EN SEN SMA2HC SLA2HC SPA2HC
- EVAL SEVAL
- EVAL10 SEVAL1 SEVAL
- EVAL16 SEVAL2 SEVAL
- EVAL2 SEVAL4 SEVAL
- EVAL8 SEVAL3 SEVAL
-
- F$CLOS SFCLOS
- F$DELE SFDEL SFMAKE
- F$EXIS SFEXIS
- F$GET SFILEI S0FILE S1FILE S2FILE S3FILE
- F$MAKE SFMAKE
- F$MOPE SFOPEN SFILEI
- F$OPEN SFOPEN SFILEI
- F$PUT SFILEI S0FILE S1FILE S2FILE S3FILE
- F$READ SFREAD
- F$RENA SRENAM
- F$WRIT SFWRIT
-
- F0$GET S0FILE
- F1$GET S1FILE
- F2$GET S2FILE
- F3$GET S3FILE SZFNAM
- F0$PUT S0FILE
- F1$PUT S1FILE
- F2$PUT S2FILE
- F3$PUT S3FILE
- FI$CLO SFILEI S0FILE S1FILE S2FILE S3FILE
- FI0$CL S0FILE
- FI1$CL S1FILE
- FI2$CL S2FILE
- FI3$CL S3FILE SZFNAM
- FI$OPE SFILEI S0FILE S1FILE S2FILE S3FILE
- FI0$OP S0FILE
- FI1$OP S1FILE
- FI2$OP S2FILE
- FI3$OP S3FILE SZFNAM
-
- FILLB SFILL SINITF
- FILLBC SFILL
- FNAME SFNAME
-
-
- Symbol Defined Referenced
-
- FO$CLO SFILEI S0FILE S1FILE S2FILE S3FILE
- FO$OPE SFILEI S0FILE S1FILE S2FILE S3FILE
- FO0$CL S0FILE
- FO1$CL S1FILE
- FO2$CL S2FILE
- FO3$CL S3FILE
- FO0$OP S0FILE
- FO1$OP S1FILE
- FO2$OP S2FILE
- FO3$OP S3FILE
-
- FSIZE SDIR
-
- GETUD SUD
-
- HFILB SFILL
- HFILBC SFILL
- HMOVB SMOVE
- HMOVBC SMOVE
-
- INITFC SINITF SFIELI SZFNAM
- INLINE SINLIN
- INSTR SINSTR
-
- LA2HC SLA2HC SLHL4H
- LA3DC SLADC
- LADC SLADC
- LCRLF SLCRLF
- LHL4HC SLHL4H
- LHL5DC SLHL5D
- LHLDC SLHL5D
- LOGUD SUD
- LOUT SLOUT SLPSTR SLHL5D SLA2HC SLADC SLCRLF
- SCLOUT
- LPRINT SLPRIN
- LPSTR SLPSTR SLPRIN
-
- MA2HC SMA2HC SMHL4H
- MA3DC SMADC
- MADC SMADC
- MHL4HC SMHL4H
- MHL5DC SMHL5D
- MHLDC SMHL5D
- MOVEB SMOVE SZFNAM SSORT SRENAM SZGPIN
- MOVEBC SMOVE
- MULHD SMATH
-
- NEGH SMATH
-
- ORHD SMATH
-
-
- Symbol Defined Referenced
-
- PA2HC SPA2HC SPHL4H
- PA3DC SPADC
- PADC SPADC
- PAUSE SPAUSE
- PHL4HC SPHL4H
- PHL5DC SPHL5D
- PHLDC SPHL5D
- POUT SPOUT SCPOUT
- PRINT SPRINT SDIR SSORT SRAND
- PSTR SPSTR SPRINT
- PUTUD SUD
-
- RETUD SUD
- RIN SRIN
- ROTLH SMATH
- ROTRH SMATH
- RND SRAND
- RNDINI SRAND
- RNDSEE SRAND
-
- SCANNE SSCANN
- SHFTLH SMATH
- SHFTRH SMATH
- SORT SSORT
- SSBINI SSORT
- SUBHD SMATH
-
- VERSIO SVERSI
-
- XORHD SMATH
-
- ZCPRQ SZCPR
- ZCPRQ2 SZFNAM
- ZDNAME SZFNAM
- ZDNFIN SZFNAM
- ZFNAME SZFNAM
- ZFNINI SZFNAM SZGPIN
- ZFSTAT SZCPR
- ZGPINS SZGPIN
- ZINICI SZCPR SZGPIN
- ZINIDM SZCPR SZGPIN
- ZINIEX SZCPR SZGPIN
- ZINIMC SZCPR SZGPIN
- ZMCPTR SZCPR
- ZPFIND SZCPR SZFNAM
-
- .fo 21 - Sample Programs Using SYSLIB Page #
-
- .FI SYSLIBS.WS
-