Miscellaneous Routines -- Introduction BDOS and BIOS Routines Capitalization Routines Convert ASCII to Hexadecimal End of Code Exchange Nybbles Memory Fill Routines Memory Move Routines Delay Routine Version Number of SYSLIB :Miscellaneouó Routineó -- Introduction Thió  sectioî  oæ  thå  Helð Filå  describeó  thå  followinç Miscellaneous 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 Command Line Extraction 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 10th of a Second VERSION Return Version Number of SYSLIB :BDOS and BIOS Routines 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 BIOS, Con't Offset Function 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 BIOS, Con't 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- :Capitalization Routines 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å -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 :Convert ASCII to Hexadecimal 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î 0 and Zero Flag Clear (NZ) if Buffer OK Registers Affected: HL SYSLIB Routines Called: -None- Special Error Conditions: None :End of Code 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- Š :Exchange Nybbles 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- :Memory Fill Routines 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 to be filled 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- :Memory Move Routines 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 first byte of the buffer to move DE points to the first 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- :Delay Routine 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 :Version Number of SYSLIB Routine Name: VERSION Function: Return Version Number of SYSLIB. Inputs: None Outputsº HL=Versioî (H=Major¬ L=Minor» H=2¬ L=± foò 2.1) Registers Affected: HL SYSLIB Routines Called: None Special Error Conditions: None