Directory Manipulation Routines Numeric String Evaluation Routines Byte-Oriented File Input/Output Routines CP/M File Input/Output Routines User/Disk Manipulation Routines File Name String Parser (FNAME) and FCB Init (INITFCB) ZCPR2-Specific File Name String Parser (ZFNAME) and Support ZCPR2 Feature-Specific Routines Input Line Editors String Output Routines Numeriã Outpuô Routineó String and Value Comparison Routines Character-Oriented Input/Output Routines Math Routines CRC Routines Random Number Generator Routines Sort Routines Misãellaneous Routines ::SYSLIB1.HLP ::SYSLIB2.HLP ::SYSLIB3.HLP ::SYSLIB4.HLP :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 :File Name String Parser (FNAME) and FCB Init (INITFCB) 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:             = _ ; , < > Thå followinç arå valiä examples:       test.txt <-- FN=TEXT FT=TXT, B reg = 0FFH,       C reg = 0FFH       a:t <-- FN=T FT=, B reg = 1,       C reg = 0FFH       5:t <-- FN=T FT=, 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 ::SYSLIB8.HLP ::SYSLIB9.HLP ::SYSLIBA.HLP :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: HL pts to the byte following the terminating 0 (string is printed on CON: or LST:) Registers Affected: HL SYSLI  Routineó Calledº CCOUT¬  COUÔ (foò PSTR)» LCOUT¬ LOUÔ (foò LPSTR) Speciaì Erroò Conditions: Thå strinç MUSÔ bå terminateä bù á binarù 0!!! ::SYSLIB5.HLP :String and Value Comparision Routines Routine Name: COMPHD Functionº Comparå HÌ tï DE®  Oî return¬  Zerï Flaç Seô =¾ HL=DE¬ Carrù Flaç Seô =¾ HL ; ACQUIRE VALUES CALL CRCDONE ; GET VALUE SHLD CRCVAL ; SAVE VALUE CRC$CHECK: ; ROUTINE TO CHECK INCOMING CRC VALUE CALL CRCCLR ; CLEAR CRC ; ACQUIRE VALUES LHLD CRCVAL ; FROM CRC$MAKE ABOVE MOV A,H ; SEND HIGH FIRST CALL CRCUPD ; UPDATE MOV A,L ; SEND LOW NEXT CALL CRCUPD ; UPDATE CALL CRCDONE ; NOW DONE CALL CRCK ; RETURN Z IF OK, NZ IF NOT OK Thå  followinç  screeî displayó describå thå  CRà routines® Thå CRC- routineó uså thå X^16+X^12+X^5+± polynomial¬  whilå  thå CRC1- routineó uså thå X^16+X^15+X^2+± polynomial. Routine Name: CRCCLR, CRC1CLR 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 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 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 Routine Name: CRCK, CRC1K Functionº Checë  thå  CRà accumulatoò  valuå  foò  zero¬   whicè indicateó thaô thå receiveä bytå streaí ió correct® Thió routinå shoulä  bå calleä afteò thå incominç bytå streaí anä thå twï  CRà byteó  (high-ordeò first© havå beeî receiveä anä  passeä  througè CRCUPD. Inputs: None Outputs: A=0 and Z Set if OK, A=0FFH and NZ Set if Not OK Registers Affected: PSW SYSLIB Routines Called: None Special Error Conditions: None :Random Number Generator Routines The Random Number Generator Routines are: RNDINIT - Initializes the Generator Seed on user keypress RNDSEED - Allows user to provide a seed RND - Returns a Pseudo-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 ::SYSLIBB.HLP ::SYSLIBC.HLP