APPENDICES ZCPR3: THE LIBRARIES A Reference Manual and User's Guide for SYSLIB, Z3LIB, and VLIB Written by Richard Conn Copyright 1986 Richard Conn This Page Left Blank ZCPR3: The Libraries Sample Programs A. SAMPLE PROGRAMS This appendix contains terminal sessions which illustrate several of the routines available in SYSLIB. Each subsection contains a listing of the program, some commentary on it, an assembly of the program using the ZAS assembler, the linking of the program with SYSLIB (SYSLIB.REL is on disk A in these sessions), and the execution of the program. The program listings are truncated to properly fit on the pages of this appendix. Full listings are available in the STESTxxx.ZSO files, distributed with SYSLIB (STEST.LBR is usually used to contain these test programs). Only selected STEST programs are shown in this appendix. Each example is divided into four sections: Listing - a listing of the program (lines longer than 65 columns are truncated) with line numbers Commentary - a brief discussion of the program (line numbers are referenced) Assemble and Link - the assembly process and linking the assembly output with SYSLIB to create a COM (executable) file Execution - a demonstration of the program A-l ZCPR3: The Libraries Sample Programs A.I. Classic File Dump Program (STEST006) Listing Bl:ASM>page stest006.z80 pi PAGE, Version 2.0 PAGE File: B 1: STEST006.Z80 1 2 PROGRAM: STEST006 3 AUTHOR: Richard Conn 4 PURPOSE: This program dumps the disk file specified 5 in hexadecimal and ASCII 6 NOTE: This test demonstrates the use of the SYSLIB 7 Byte-Oriented File Input routines 8 9 10 ; External CP/M or ZCPR3 Buffers 11 fcb equ 5ch 12 13 ; External References for SYSLIB routines used 14 ext fil$open Open File for 15 ext fil$close Close File 16 ext fl$get Get Byte from File 17 ext cout Character Output 18 ext pa2hc Print A as 2 Hex Chars 19 ext phldc Print HL as up to 20 ext print String Print 21 ext crif New Line 22 23 24 Start of Routine — Print Banner 25 26 call print 27 db 'STEST006 - Sample DUMP Program to 28 db 'Byte-Oriented File Input' 29 db 0 30 call crif ; new line 31 32 ; 33 ; Set Offset Counter 34 ; 35 Id hl,0 ; Init to zero 36 Id (counter),hi 37 38 ; 39 ; Open File for Input 40 ; 41 Id de.fcb pt to FCB filled in by 42 call fil$open try to open it 43 jp z,loop continue if OK 44 call print file roust not have been 45 db 'File Not Found' 0 46 ret return to Operating 47 48 ; 49 ; Main Loop 50 ; 51 loop: ZCPR3: The Libraries Sample Programs 52 Id b,0 set byte count in case 53 call £l$get get first character 54 jp nz,readdn done if past EOF 55 push af save character 56 Id hi,(counter) get counter value 57 call phldc print as decimal number 58 Id de,8 add 8 to counter for 59 add hi, de 60 Id (counter),hl save count away 61 call print 62 db ': ' ,0 63 Id b,0 ; set byte count to zero 64 Id hi,buffer ; point to first byte of 65 pop af ; get first character 66 jr readlpl 67 readip: 68 call fl$get get next byte 69 jp nz,readdn done if past EOF 70 readlpl: 71 Id (hi),a store byte into buffer 72 inc hi point to next byte in 73 inc b increment byte count 74 Id a,b check for done 75 cp 8 read in 8 bytes? 76 jp nz,readip 77 call bufprint print contents of 78 call crif new line 79 jp loop ; continue until End of 80 81 , 82 ; Done with Read — Print current Buffer and Exit 83 ; B = Number of bytes to print 84 , 85 readdn: 86 call bufprint print buffer 87 call crif new line 88 call fil$close close file 89 ret 90 91 * , 92 ; Buffer print routine; print the contents of the buffer 93 • , 94 bufprint; 95 Id hi,buffer point to first byte of 96 push be save character count 97 bufploop: 98 Id a,b check count first < in 99 or a done? 100 jp z.ascprint print as ASCII chars 101 dec b count down 102 id a,(hi) get byte from buffer 103 inc hi point to next byte in 104 cal 1 pa2hc print byte as 2 Hex 105 Id a,' ' print a space 106 call cout 107 jp bufploop 108 , ZCPR3: The Libraries Sample Programs 109 ; Now print buffer as t 110 f 111 ascprint: 112 Id hi,buff 113 pop be 114 Id a,b 115 or a 116 ret z 117 call print 118 db •I ',0 119 ascploop: 120 Id a,b 121 or a 122 ret z 123 dec b 124 Id a,(hi) 125 and 7fh 126 Id c,a 127 cp • i 128 JP nc,ascp 129 Id c,'.' 130 ascp: 131 Id a,c 132 call cout 133 inc hi 134 JP ascploo 135 136 counter: 137 ds 2 138 buffer: 139 ds 8 140 141 end point to first character get character count check for empty buffer print a separator check for empty buffer done if zero return to caller if so count down get byte to output mask out roost save character in C test for printable print character if print dot if not to print get char print it point to continue next character until count is ; Offset Counter ; 8-byte buffer for input Commentary The name of the file is passed in the system FCB, and lines 41-42 cause this file to be opened for byte-oriented input (input to the program from the file). If it is successfully opened (in particular, if the file exists), we proceed at label LOOP (line 51); else, an error message is printed (lines 44-45) and we return to the operating system (line 46). The main loop extends from lines 51 to 79. The Fl$GET call on line 53 obtains the first byte of the next group of 8. If there is no next byte, we exit at READDN (lines 85-89). If there is a next byte, we save it on the stack (line 55), print the prefix to the line about to be printed (lines 56-62), and READLP (lines 67-76) stores our first byte and the next seven (eight bytes total) into the BUFFER area. After all eight bytes are stored, line 77 prints the output line followed by a new line (line 78) and the main loop continues. Each F1$GET call (lines 53 and 68) is followed by a JP NZ,READDN as an error trap for processing the end-of-file condition. Supporting routines are BUFPRINT and ASCPRINT (lines 94- 134). They print the output lines. A-4 ZCPR3: The Libraries Sample Programs Assemble and Link Bl:ASM>zas stest006 MITEK Relocating Macro Assembler vers 2.1 (C) Copyright 1984 Mitek All Rights Reserved Assembly statistics: 141 lines 20 labels 0 macros read 0 macros expanded 0 errors 33894 free bytes Bl:ASM>zlink stest006,a:syslib/ MITEK Linking loader vers 2.0 (C) Copyright 1984 Mitek All Rights reserved BDOS 0687 CCOUT 0646 COUT 0673 CRLF 0639 F$GET 044C F$MOPE 0544 F$OPEN 052C F$PUT 0491 F1$GET 020E F1$PUT 0215 FI$CLO 04C5 FI$OPE 03ED FI1$CL 021C FI1$OP 0200 FILLB 068F FILLBC 0698 FO$CLO 04D2 FO$OPE 0429 P01$CL 0223 F01$OP 0207 HFILB 06A5 HFILBC 06AE HMOVB 06C2 HMOVBC 06CF INITFC 0517 MOVEB 06D9 MOVEBC 06E2 PA2HC 0619 PHL5DC 05BC PHLDC 05C5 PRINT 055E PSTR 0564 Load map for STEST006.COM SEGMENT SIZE START STOP ABSOLUTE 0000 CODE 0615 0100 0714 DATA 0000 COMMON 0000 FREE AAE7 1D1E C804 Execution Bl:ASM>; Now to create a file to test the dump program on Bl:ASM>ed deroo.txt NEW FILE . *, This is a very short operation of SYSTEST the contents of this demonstration file to test the 6 (STEST006.Z80). STEST006 dumps file in hexadecimal and ASCII. "e Bl:ASM>type demo.txt This is a very short demonstration file to test the operation of SYSTEST 6 (STEST006.Z80). STEST006 dumps the contents of this file in hexadecimal and ASCII. B1:ASM>stest006 demo.txt STEST006 - Sample DUMP Program to Illustrate SYSLIB Byte-Oriented A-5 Sample Programs 0 54 68 69 73 20 69 73 20 1 This is 8 61 20 76 65 72 79 20 73 • a very s 16 68 6F 72 74 20 64 65 6D ! hort dem 24 6F 6E 73 74 72 61 74 69 t onstrati 32 6F 6E 20 66 69 6C 65 20 i on file 40 74 6F 20 74 65 73 74 20 i• to test 48 74 68 65 OD OA 6F 70 65 1 the..ope 56 72 61 74 69 6F 6E 20 6F ! ration o 64 66 20 53 59 53 54 45 53 ! f SYSTES 72 54 20 36 20 28 53 54 45 1 T 6 (STE 80 53 54 30 30 36 2E 5A 38 1 ST006.Z8 88 30 29 2E 20 20 53 54 45 i 0). STE 96 53 54 30 30 36 20 64 75 ! ST006 du 104 6D 70 73 OD OA 74 68 65 1 mps••the 112 20 63 6F 6E 74 65 6E 74 ! content 120 73 20 6F 66 20 74 68 69 ! s of thi 128 73 20 66 69 6C 65 20 69 i• s file i 136 6E 20 68 65 78 61 64 65 ! n hexade 144 63 69 6D 61 6C 20 61 6E 1 cimal an 152 64 20 41 53 43 49 49 2E 1 d ASCII. 160 on OA 1 & 1A 1A 1AXA 1 & 1AJL&* i 168 W1A V**1A •&A 1A ^&J1A •L*\ 1A 1A •&A 1A 1A 1 ZCPR3: The Libraries Sample Programs A.2. Random File Access (STESTOOO) Listinq Bl:ASM>page stest000.z80 pi PAGE, Version 2.0 PAGE File: B 1: STEST000.Z80 1 2 PROGRAM: STESTOOO 3 AUTHOR: Richard Conn 4 PURPOSE: This program demonstrates many routines, 5 file access, by creating a dummy file 6 it and modifying it in a random fashion 7 8 9 External Buffers 10 fob equ 5ch 11 tbuff equ 80h 12 cr equ Odh 13 If equ Oah 14 maxrec equ 100 ; max number of records 15 16 ; External References for SYSLIB routines used 17 ext f$open,f$make,f$close,f$write,f$delete,initfcb 18 ext print,pstr,crlf 19 ext filib 20 ext mhldc.madc 21 ext comphd compare HL and DE 22 ext bbline input line editor 23 ext evallO ASCII decimal to binary 24 ext capine capitalize input and echo 25 ext pfn2 print file name without 26 ext scfa set and clear file 27 ext r$read random read 28 ext r$write random write 29 30 « , 31 ; Start of Routine — Print Banner 32 * , 33 call print 34 db 'STESTOOO - Sample Program to Illustrate 35 db 'Random File Access Routines',cr,If,0 36 37 1 38 ; Create file for later use 39 • , 40 Id a,(fcb+l) ; check for file name 41 cp ' ' ; error? 42 jp nz,fileok 43 call print 44 db 'Error - File Name NOT Specified',cr,If 45 db 'Issue "STESTOOO FILENAME.TYP" to execute',0 46 ret 47 fileok: 48 call print 49 db 'Building Data File',cr,lf,0 50 Id de,fcb ; pt to FCB 51 call initfcb ; init FCB A-7 ZCPR3: The Libraries Sample Programs 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 optr: xor a call scfa call f$delete call f$make Id b,maxrec call setup Id de,fcb call £$write dec b JP nz,make Id de,fcb call f$close Id de,fcb call initfcb call £$open •• Menu and Get Usi call print db cr,lf,'W» Id de,fcb+l call pfn2 call print db cr,lf,'0] db cr,lf,' 1 db cr,l£,' \ db cr,lf,' : db cr,l£,'C< call capine call crif cp •R' JP z,optr cp 'W JP z,optw cp 'X' ret z call print db cr,lf.'* JP main Records from FiL call print db cr,lf,'R< call bbline or a JP z,main call crif call evallO ex de,hl Id de,maxre< call comphd JP nc,rerr Id de,fob ; R/W and DIR ; set file attributes ; delete file ; create file ; number of records ; set up buffer entry ; write buffer ZCPR3: The Libraries Sample Programs 109 call r$read 110 Id hl,tbuff 111 call pstr 112 JP optr 113 rerr: 114 call print 115 db cr,lf,'** 116 JP optr 117 • r 118 ; Write Records to File 119 i 120 optw: 121 call print 122 db cr,lf,'Re< 123 call bbline 124 or a 125 JP z,roain 126 call evallO 127 ex de,hl 128 Id derinaxrec 129 call comphd 130 JP nc,werr 131 push hi 132 Id de,nummsg 133 call mhldc 134 Id hl,tbuff 135 Id b,128 136 Id a,lah 137 call filib 138 Id de,wmsg 139 wloop: 140 Id a,(de) 141 or a 142 JP z,wloop2 143 Id (hi),a 144 inc hi 145 inc de 146 JP wloop 147 wloop2; 148 Id zas stestOOO MITEK Relocating Macro Assembler vers 2.1 zlink stestOOO,a:syslib/ MITEK Linking loader vers 2.0 stestOOO dummy.bin STESTOOO - Sample Program to Illustrate SYSLIB Random File Access Building Data File Working File: DUMMY.BIN Options: R - Read Records W - Write Records X - Exit Command? W Record Number (RETURN to Exit)? 5 Record Number (RETURN to Exit)? 1 Record Number (RETURN to Exit)? 2 Record Number (RETURN to Exit)? 7 Record Number (RETURN to Exit)? 8 Record Number (RETURN to Exit)? Working File: DUMMY.BIN Options: R - Read Records W - Write Records X - Exit Command? R Record Number (RETURN to Exit)? 0 This is Record Number 0 Record Number (RETURN to Exit)? 1 Record 1 Modified Record Number (RETURN to Exit)? 2 Record 2 Modified Record Number (RETURN to Exit)? 3 This is Record Number 3 Record Number (RETURN to Exit)? 4 This is Record Number 4 Record Number (RETURN to Exit)? 5 Record 5 Modified Record Number (RETURN to Exit)? 6 This is Record Number 6 Record Number (RETURN to Exit)? 7 Record 7 Modified Record Number (RETURN to Exit)? 8 Record . 8 Modified Record Number (RETURN to Exit)? Working File: DUMMY.BIN Options: R - Read Records W - Write Records X - Exit Command? X Bl:ASM>zdm dummy.bin ZDM VERS 3.2 NEXT PC 3300 0100 -dlOO llf 0100 54 68 69 73 20 69 ... 6F 72 64 20 4E This.is.Record.N A-12 ZCPR3: The Libraries Sample Programs 0110 75 6D 62 -d200 21£ 0200 52 65 63 0210 69 66 69 -d300 31f 0300 54 68 69 0310 75 6D 62 -d400 41f 0400 54 68 69 0410 75 6D 62 -d500 51f 0500 52 65 63 0510 69 66 69 -d600 61£ 0600 54 68 69 0610 75 6D 62 -d700 71£ 0700 54 68 69 0710 75 6D 62 -d800 81f 0800 54 68 69 0810 75 6D 62 --C 65 72 20 ... 1A 1A 1A 1A 1A umber...0. 6F 72 64 65 64 00 ... 32 20 ... 1A 1A 4D 6F 64 1A 1A 1A 73 65 20 69 72 20 ... 6F... 1A 72 1A 641A 20 1A 4E 1A 73 65 20 69 72 20 ... 6F ... 1A 72 1A 64 1A 201A 4E 1A 6F 65 72 64 64 00 ...38... 1A 201A 4D 1A 6F 1A 64 1A 73 65 20 69 72 20 ... 6P ... 1A 721A 64 1A 20 1A 4E 1A 73 65 20 69 72 20 ... 6P ... 1A 72 1A 64 1A 20 1A 4E 1A 73 65 20 69 72 20 ... 6F... 1A 721A 64 1A 20 1A 4E 1A Record, ified.. .2.Mod This.is.Record.N umber...4....... This.is.Record.N umber...6....... Record. ified.. .8.Mod This.is.Record.N umber..10....... This.is.Record.N umber..12•...••. This.is.Record.N umber..14....... A-13 ZCPR3: The Libraries Sample Programs A.3. Byte-Oriented File Output (STEST001) Listing Bl:ASM>page stest001.z80 pi PAGE, Version 2.0 PAGE File: B Is STEST001.Z80 1 ; 2 ; PROGRAM: STEST001 3 ; AUTHOR: Richard Conn 4 ; PURPOSE: This program creates a file and then accepts 5 ; to input into that file. 6 ; NOTE: This test illustrates the use of the byte-oriented 7 ; output routines and the use of SYSLIB. 8 ; 9 10 ; Define the and constants 11 cr equ Odh 12 If equ Oah 13 14 ; External Definitions of Routines to be Used 15 ext fname Convert file name into 16 ext print Print string 17 ext bbline Input Line Editor 18 ext fo0$open Open File for Output 19 ext fo0$close Close File 20 ext f0$put Write Byte to File 21 22 ; 23 ; This part of the program prompts the user for input and 24 ; 25 call print 26 db 'STEST001 - Byte-Oriented File Output 27 db cr,If,'Name of Pile to Create? ',0 28 xor a ; A=0 so BBLINE does not 29 call bbline ; input file name from user 30 or a ; check char count for zero 31 ret z ; return to OS if no line 32 33 ; 34 ; The file name specified by the user is converted into 35 ; and stored into an PCB 36 ; 37 ; First char of filename is pointed to by HL, as returned 38 ; 39 Id de,fcb ; load fcb 40 call fname 41 42 ; 43 ; Now we open the file for byte-oriented output; since 44 ; affect DE, DE still points to the FCB 45 } 46 call fo0$open ; open file for output 47 jp z,loop ; ok to proceed 48 49 ; 50 ; File could not be opened — print error message and 51 ; ZCPR3: The Libraries Sample Programs 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 call print db cr,If,'Cannot Open File — Abort',0 ret ; This loop prompts the user for a line and stores it in If the user types an empty line (just =Done)? ',0 xor a ; A=0 so BBLINE does not call bbline ; get line from user or a ; check char count jp z,done ; done if no chars ; This loop writes the string pted to by HL (from BBLINE) , oloop: Id a,(hi) ; get char or a ; done if zero jp z,odone call f0$put ; write to disk jp nz,derr ; check for disk error inc hi ; pt to next char to output jp oloop ; This routine terminates the string just written to disk ; pair, and the creation of the file is continued. « f odone: Id a,cr call f0$put Id a,If call f0$put jp loop ; The user has typed an empty line (just zas stestOOl MITEK Relocating Macro Assembler vers 2.1 (0 Copyright 1984 Mitek All Rights Reserved Assembly statistics: 114 lines 14 labels 0 macros read 0 macros expanded 0 errors 34002 free bytes Bl:ASM>zlink stestOOl,a:syslib/ MITEK Linking loader vers 2.0 (C) Copyright 1984 Mitek All Rights reserved BBLINE 067B BDOS COUT 080F F$GET F$PUT 05AE FO$GET FI$OPE 050A FIO$CL FILLBC 0834 FNAME FOO$CL 0340 FOO$OP HMOVB 085E HMOVBC MOVEBC 087E PRINT Load map for STEST001.COM SEGMENT SIZE START STOP ABSOLUTE 0000 0823 CAPS 08B1 CCOUT 07E2 0569 F$MOPE 0661 F$OPEN 0649 032B FO$PUT 0332 FI$CLO 05E2 0339 FIO$OP 031D PILLB 082B 0204 FO$CLO 05EF PO$OPE 0546 0324 HFILB 0841 HFILBC 084A 086B INITFC 0634 MOVEB 0875 0784 PSTR 078A CODE 07BC 0100 08BB DATA 0000 COMMON 0000 A-16 ZCPR3; The Libraries Sample Programs FREE A94A 1EBB C804 Execution Bl:ASM>stest001 STEST001 - Byte-Oriented File Output Demonstration Name of File to Create? demo.txt Input Line «CR>=Done)? This is a test Input Line «CR>=Done)? This is only a test Input Line «CR>=Done)? Bye for now Input Line «CR>=Done)? Bl:ASM>type deroo.txt This is a test This is only a test Bye for now A-17 ZCPR3: The Libraries Sample Programs A.4. Directory Access (STEST002) Listing Bl:ASM>page stest002.z80 pi PAGE, Version 2.0 PAGE File: B 1: STEST002.Z80 1 2 PROGRAM: STEST002 3 AUTHOR: Richard Conn 4 PURPOSE: To demonstrate the SYSLIB routines for directory 5 NOTE: This program loads the disk directory and selects 6 which are non-system in the user area given 7 may be used to test and compare DIRF and DIRFS 8 9 10 11 Externals 12 13 ext bbline Input Line Editor 14 ext evallO String to Binary Conversion 15 ext dirf Past Directory Load/Select/ 16 ext dirfs DIRF with File Sizing 17 ext print Print String 18 ext cin Char in 19 ext caps Capitalize 20 ext cout Char out 21 ext crif New Line 22 ext retud Return User and Disk 23 ext codend ; End of Code/Beginning of Buffer 24 25 26 CP/M Equates 27 28 fob equ 5ch ; address of FCB loaded by CP/M 29 cr equ Odh 30 If equ Oah 31 32 ; 33 ; I would normally look at the FCB to see if any file was 34 ; make it wild (all ?'s) if so, but I won't do this so we 35 ; to the problem at hand. Hence, if the user simply types 36 ; his command, the PCB will be all spaces and no file will 37 ; 38 Id hl.fcb+1 ; clear FCB to ? chars 39 Id b,ll ; 11 bytes 40 Id a,'?' ; wild card 41 fill: 42 Id (hi),a ; copy into FCB 43 inc hi 44 dec b 45 jp nz.fill 46 ; 47 ; Main Loop 48 ; 49 test: 50 call print 51 db cr.lf,'STEST002 - Demo of Directory Routines ZCPR3: The Libraries Sample Programs 52: db cr,l£,'Use DIRF (Y), DIRFS zas stest002 MITEK Relocating Macro Assembler vers 2.1 (C) Copyright 1984 Mitek A-20 ZCPR3: The Libraries Sample Programs All Rights Reserved Assembly statistics: 151 lines 22 labels 0 macros read 0 macros expanded 0 errors 33858 free bytes Bl:ASM>zlink stest002,a:syslib/ MITEK Linking loader vers 2.0 (0 Copyright 1984 Mitek All Rights reserved $MEMRY 08EE BBLINE 06F8 BLKMAX 06C6 BLKMSK 06C5 BLKSHF 06C4 CAPS 08D5 CCOUT 086C CIN 0899 CODEND 08EO COUT 08AA CRLF 085P DBUFFE 025E DIRALP 0408 DIRBUF 06CD DIRF 0226 DIRFS 0242 DIRLOA 02EC DIRMAX 06C8 DIRPAC 0635 DIRSEL 05D9 DIRSLO 0372 DPARAM 0291 EVAL10 06CF ORDER 06CB PRINT 0801 PSTR 0807 RETUD 08BE SDFCHK 068B SDMOVE 0682 SELFLG 06CA Load map for STEST002.COM SEGMENT SIZE START STOP ABSOLUTE 0000 CODE 07FO 0100 08EF DATA 0000 COMMON 0000 FREE A920 1EE5 C804 A-21 ZCPR3: The Libraries Sample Programs Execution B1;ASM>; Test: B1:ASM>; Display files so the reader can see what files are on disk Bl:ASM>xd *.* oa Filename.Typ Size K Filename.Typ Size K Filename.Typ Size K DEMO .BAK 0 STEST002.REL 4 STEST007.Z80 8 DUMMY .BIN 16 STEST006.REL 4 STEST008.Z80 4 STESTOOO.COM 4 DEMO .TXT 4 STEST009.Z80 8 STEST001.COM 4 DIRLIST .Z80 4 STEST010.Z80 4 STEST002.COM 4 STESTOOO.Z80 4 STEST011.Z80 8 STEST006.COM 4 STEST001.Z80 4 STEST012.Z80 4 STEST011.DAT 4 STEST002.Z80 4 STEST013.Z80 4 STEST .DOC 4 STEST003.Z80 4 STEST014.Z80 12 STEST .LBR 68 STEST004.Z80 8 STEST015.Z80 4 STESTOOO.REL 4 STEST005.Z80 4 STEST016.Z80 4 STEST001.REL 4 STEST006.Z80 4 STEST .ZEX 4 Bl: ASM — 33 Files Using 228K (3540K Left) Bl:ASM>stest002STEST002 - Demo of Directory Routines in SYSLIB Use DIRF (Y), DIRFS (N), or Quit page stest003.z80 pi PAGE, Version 2.0 PAGE File: B 1: STEST003.Z80 1 2 PROGRAM: STEST003 3 AUTHOR: Richard Conn 4 PURPOSE: This program demonstrates the EVAL routines 5 routines within SYSLIB 6 7 8 9 Externals 10 11 EXT ADDHD ; HL = HL + DE 12 EXT SUBHD ; HL = HL - DE 13 EXT NEGH ; HL = NEGATE OF HL 14 EXT MULHD ; HL = HL * DE 15 EXT DIVHD HL = HL / DE 16 EXT ANDHD HL = HL AND DE 17 EXT ORHD HL = HL OR DE 18 EXT XORHD HL = HL XOR DE 19 EXT SHFTRH HL = HL shifted right one bit 20 EXT SHFTLH HL = HL shifted left one bit / 21 EXT ROTRH HL = HL rotated right one bit 22 EXT ROTLH HL = HL rotated left one bit 23 24 EXT PRINT Print String 25 EXT BBLINE Input Line Editor 26 EXT EVAL Number Evaluator 27 EXT PHLDC Print HL as up to 5 decimal chars 28 EXT PHL4HC Print HL as 4 Hex chars 29 30 31 ASCII Char defns 32 33 cr equ Odh 34 If equ Oah 35 36 37 Print Banner 38 39 call print 40 db 'STEST003 — Math Routines and Evaluation 41 42 ; 43 ; This is the main loop and a prompt to the user. 44 ; 45 loop: 46 call print 47 db cr,If,'Input Two Numbers, Separated by a 48 db • — ',0 49 call bbline get user input 50 or a no input if A=0 51 ret z return to Operating System ZCPR3: The Libraries Sample Programs 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ; evaluate the first number call ex Id ex inc call eval de,hl (numi),hi de,hl hi eval ; place number in HL ; save it away as 1st number ; restore pointer to comma ; skip comma ; evaluate the 2nd number Through the rest of this loop, DE contains the 2nd of the routines affect it. call print db cr,If,'First Number is ',0 Id hi,=Done)? ',0 58 xor a ; do not capitalize input 59 call bbline ; get line from user 60 or a ; A=char count=0 if done 61 jp z,sortl ; do sort if done 62 inc be ; incr record count 63 push be ; save record count 64 Id b,40 ; copy user input into next 65 66 • f 67 ; This loop copies the user's string/ which was input by 68 ; to by HL, into the next record position, which is pointed 69 • 70 ipi: 71 Id a, (hi) ; get byte 72 or a ; done if zero 73 jp z, lp2 74 Id (de) ,a ; put byte 75 inc hi ; pt to next 76 inc de 77 dec b ; count down 78 JP Ipl 79 80 81 This loop fills the rest of the record with spaces. This 82 a very good program in the sense that it does not do any 83 to see if the user typed more than 40 chars, but it is 84 85 lp2: 86 Id a,' ' ; store 87 Id (de), a ; put byte 88 inc de ; pt to next 89 dec b ; count down 90 jp nz,lp2 91 92 93 Now we get our record count back and continue the program 94 95 pop be ; get rec count 96 jp loop ; continue until done 97 98 • » 99 ; The user has typed an empty line, and the number of 100 / 101 sorti: 102 103 104 Set up record count field of SSB 105 106 Id h,b ; save record count 107 Id l,c 108 Id (recnt),hl ; save record count field ZCPR3: The Libraries Sample Programs 109 110 • i 111 ; Test for no records and abort if so 112 f 113 Id a,h ; any records? 114 or 1 115 jp nz,sort2 116 cat 1 print 117 * db cr,lf,'No Records — Aborting Sort',0 118 ret ; Return to OS 119 120 • f 121 ; Set up record size field of SSB 122 • i 123 sort2: 124 Id hi,40 ; 40 bytes/record 125 Id (recsiz),hl ; save record size field 126 127 • 9 128 ; Set up compare routine address field of SSB 129 • , 130 Id hl.comp ; address of compare routine 131 Id (cmpadr),hl ; save compare address in 132 133 134 I shall now use SSBINIT to set up the ORDER buffer and 135 it does not overflow the TPA. SSBINIT will also set 136 after the order buffer, but I will discard this and reset 137 to the first byte of my first record. 138 f 139 ex de,hl ; HL pts to next available 140 Id de,ssb ; Pt to SSB 141 call ssbinit ; initialize the SSB FIRSTP 142 Id hi,(start) ; set start address field 143 id zas atest004;zlink stest004,a:syslib/ MITEK Relocating Macro Assembler vers 2.1 (C) Copyright 1984 Mitek All Rights Reserved Assembly statistics: 244 lines 34 labels 0 macros read 0 macros expanded 0 errors 33642 free bytes A-32 ZCPR3: The Libraries Sample Programs MITEK Linking loader vers 2.0 (0 Copyright 1984 Mitek All Rights reserved $MEMRY CIN HMOVB PRINT 06EE 065D 0682 05C5 BBLINE CODEND HMOVBC PSTR 04BC 06EO 068F 05CB CAPS COUT MOVEB SORT 06D5 066E 0699 02E2 CCOUT CRLF MOVEBC SSBINI 0630 0623 06A2 027B Load map for STEST004.COM SEGMENT SIZE START STOP ABSOLUTE 0000 CODE 05FO 0100 06EF DATA 0000 COMMON 0000 FREE ABAC 1C59 C804 Execution Bl:ASM>stest004 STEST004 — Sort Demonstration Entry «CR>=Done)? Rick Entry «CR>=Done)? Jane Entry «CR>=Done)? Tom Entry «CR>=Done)? Dick Entry «CR>=Done)? Harry Entry «CR>=Done)? David Entry «CR>=Done>? Debbie Entry «CR>=Done)? Caroline Entry «CR>=Done)? Harold Entry «CR>=Done>? Starting Sort — Buffer After Sort — Caroline David Debbie Dick Harold Harry Jane Rick Tom Do you wish to run this test again (Y/N)? N A-33 ZCPR3: The Libraries Sample Programs Listing Bl;ASM>page stest005.z80 pi PAGE, Version 2.0 • PAGE File: B 1: STEST005.Z80 1 « 2 ; PROGRAM; STEST005 3 ; AUTHOR: Richard Conn 4 ; PURPOSE: This program obtains a seed value and then 5 ; 10 random numbers 6 •r 7 8 • i 9 ; Externals 10 • i 11 ext cin char in 12 ext cout char out 13 ext print print string 14 ext rndinit init random number generator by 15 ext rnd return random number 16 ext rndseed init random number generator by 17 ext crif new line 18 ext padc print A as up to 3 decimal digits 19 ext caps capitalize char 20 ext bbline get line from user 21 ext eval evaluate string 22 23 24 Constants 25 26 cr equ Odh 27 If equ Oah 28 29 call print 30 db 'STEST005 - Random Number Demo',0 31 32 • 33 Start of main loop, which generates 10 random numbers 34 executed. 35 f 36 start: 37 38 • » 39 ; Prompt user to see if he wants to select his own seed 40 • , 41 call print 42 db cr,lf,'Do you want to pick your own seed 43 call cin ; get single-char response 44 cat 1 caps 45 call cout 46 cp 'N' 47 jp z,rseed 48 49 • , 50 ; Input a seed value from the user. 51 • / ZCPR3: The Libraries Sample Programs 52 call 53 db 54 xor 55 call 56 call 57 call 58 call 59 db 60 call 61 JP 62 63 { 64 ; Prompt user 65 f 66 rseed: 67 call 68 db 69 call 70 71 f 72 ', Generate 10 73 i 74 rseedl: 75 call 76 db 77 Id 78 loop: 79 call 80 call 81 Id 82 call 83 dec 84 JP 85 86 f 87 ', Prompt user 88 89 call 90 db 91 call 92 call 93 call 94 cp 95 JP 96 ret 97 98 end Commentary print cr,l£,'What a bbline eval v rndseed print cr,lf,'Your padc rseedl is your seed value? ',0 ; no caps ; get string ; evaluate string and return ; set seed from 8-bit value ; print seed stored seed is: ',0 and wait for keypress to set seed. print cr,If,'Wait a little and then press a key rndinit print cr,lf,'10 Random Numbers follow —',cr,lf,0 b,10 ; 10 numbers rnd ; get number padc ; print it as decimal a,' ' ; print cout b ; count down nz,loop to continue print cr.lf.'Do you want to run this test again cin ; get response caps cout •N' nz,start ; return to OS if done Commentary This program illustrates the operation of the random number generator. The main loop is in lines 36-96. The random number generator has to be initialized with a seed value. The user may input a seed of his selection (lines 52-61), and RNDSEED is used to set the seed value (line 57). The user may also allow a loop to set the seed (lines 66-69), and RNDINIT (line 69) does this. The random numbers are output in lines 74-84. ZCPR3: The Libraries Sample Programs Assemble and Link Bl:ASM>zas stest005;zlink stest005,»a:syslib/ MITEK Relocating Macro Assembler vers 2.1 (0 Copyright 1984 Mitek All Rights Reserved Assembly statistics: 98 lines 17 labels 0 macros read 0 macros expanded 0 errors 33948 free bytes MITEK Linking loader vers 2.0 (C) Copyright 1984 Mitek All Rights reserved BBLINE CONDIN EVAL EVAL8 PSTR Load map SEGMENT ABSOLUTE CODE DATA COMMON FREE 03FO 03DE 0284 038F 04FF CAPS COUT EVAL10 PA3DC RND 0610 05FC 0325 0557 0271 CCOUT CRLF EVAL16 PADC RNDINI 05AA 059D 034E 055P 0252 CIN CST EVAL2 PRINT RNDSEE 05EB 05D7 03BA 04F9 026A for STEST005.COM SIZE START STOP 0000 051B 0100 061A 0000 0000 AC59 1BAC C804 Execution Bl:ASM>stest005 STEST005 - Random Number Demo Do you want to pick your own seed (Y/N)? N Wait a little and then press a key to set the seed 10 Random Numbers follow — 153 101 233 49 191 120 94 141 104 123 Do you want to run this test again (Y/N)? Y Do you want to pick your own seed page stestOlO.zSO pi PAGE, Version 2.0 PAGE File: B 1: STEST010.Z80 1 ; 2 ; PROGRAM: STEST010 3 ; AUTHOR: RICHARD CONN 4 ; PURPOSE: This program tests the FSI2E routine. It 5 ; display (using DIRFS) and displays the name of each file 6 ; via the FSIZE routine. 7 ; 8 ext dirfs,fsize 9 ext codend, retud 10 ext print, phldc 11 ext pfni.crif 12 13 ; 14 ; Begin 15 ; 16 call print 17 db 'STEST010 - Testing FSIZE',0dh,0ah,0 18 call retud ; get disk/user in BC 19 call codend ; determine end of code 20 Id de,fcbl 21 Id a,c ; get user in A 22 or 80h ; set non-sys in current 23 call dirfs ; get files 24 loop: 25 push hi 26 ex de,hl 27 inc de 28 call pfnl 29 pop hi 30 call print 31 db ' - ',0 32 push hi 33 call fsize 34 ex de,hl 35 call phldc 36 pop hi 37 Id de,16 38 add hl,de 39 call crif 40 dec be 41 Id a,b 42 or c 43 jp nz, loop 44 ret 45 46 fcbl: 47 db 0 48 db '???????????' 49 50 end 2CPR3: The Libraries Sample Programs Commentary This program illustrates how easy it is to access a disk directory with SYSLIB. Lines 18-23 load the directory into a buffer starting at the address returned by CODEND (line 19). The following loop (lines 24-43) then prints the names of the files and their sizes to the nearest disk allocation group. The call to PFN1 (line 28) prints the name of the file, the call to FSIZE (line 33) computes its size, and the call to PHLDC (line 35) prints the file's size on the console. Assemble and Link Bl:ASM>zas stest010;zlink stest010,a:syslib/ MITEK Relocating Macro Assembler vers 2.1 (C) Copyright 1984 Mitek All Rights Reserved Assembly statistics: 50 lines 10 labels 0 macros read 0 macros expanded 0 errors 34074 free bytes MITEK Linking (C) Copyright All Rights $MEMRY 077F 0719 017A 024C CCOUT DBUFFE DIRLOA DIRSLO PFN1 PSTR SELFLG Load map SEGMENT ABSOLUTE CODE DATA COMMON FREE 02D2 06EA 0635 062A loader vers 2.0 1984 Mitek reserved BLKMAX CODEND DIRALP DIRMAX DPARAM PHL5DC RETUD 0626 BLKMSK 0625 BLKSHF 0624 0771 COUT 0746 CRLF 070C 0368 DIRBUF 062D DIRFS 015E 0628 DIRPAC 0595 DIRSEL 0539 01AD FSIZE 0208 ORDER 062B 068D PHLDC 0696 PRINT 062F 075A SDFCHK 05EB SDMOVE 05E2 for STEST010.COM SIZE START STOP 0000 0681 0100 0780 0000 0000 AA99 1D6C C804 Execution Bl:ASM>stest010 *.com STEST010 - Testing FSIZE DEMO .BAK - 0 DEMO .TXT - 4 DIRLIST .Z80 - 4 DUMMY .BIN - 16 STEST .DOC - 4 STEST .LBR - 68 STEST .ZEX - 4 STESTOOO.COM - 4 STESTOOO.REL - 4 A-38 ZCPR3: The Libraries Sample Programs Bl:ASM>xd *.* oa Filename .Typ Size K Filename.Typ Size K Filename .Typ S: Lze K DEMO .BAK 0 STEST001.REL 4 STEST005 .Z80 4 DUMMY .BIN 16 STEST002.REL 4 STEST006 .Z80 4 STESTOOO.COM 4 STEST003.REL 4 STEST007 .Z80 8 STEST001 .COM 4 STEST004.REL 4 STEST008 .Z80 4 STEST002.COM 4 STEST005.REL 4 STEST009 .Z80 8 STEST003.COM 4 STEST006.REL 4 STEST010 .Z80 4 STEST004 .COM 4 STEST010.REL 4 STEST011 .Z80 8 STEST005 .COM 4 DEMO .TXT 4 STEST012 .Z80 4 STEST006 .COM 4 DIRLIST .Z80 4 STEST013 .Z80 . 4 STEST010 .COM 4 STESTOOO.Z80 4 STEST014 .Z80 12 STEST011 •DAT 4 STEST001.Z80 4 STEST015 .Z80 4 STEST .DOC 4 STEST002.Z80 4 STEST016 .Z80 4 STEST .LBR 68 STEST003.Z80 4 STEST .ZEX 4 STESTOOO .REL 4 STEST004.Z80 8 Bl: ASM — 41 Files Using 260K (3508K Left) A-39 ZCPR3: The Libraries Sample Programs A.9. File Append (STEST013) Listing Bl:ASM>page stest013.z80 pi PAGE, Version 2.0 PAGE File: B 1: STEST013.Z80 1 2 PROGRAM: STEST013 3 AUTHOR: RICHARD CONN 4 PURPOSE: TO TEST THE F$APPL FUNCTION OF SYSLIB. STEST012 5 WITH COMMANDS LIKE: 6 STEST013 FILE 7 THE USER WILL BE PROMPTED FOR TEXT TO INPUT, AND THIS 8 APPENDED AFTER THE LAST PIECE OF TEXT IN THE FILE. 9 10 11 12 Externals 13 ; 14 ext initfcb 15 ext print,bbline 16 ext f$exist,f$make,f$write,f$close,evall0 17 ext f$appl 18 19 20 Equates 21 22 fcb equ 5ch 23 fcb2 equ 6ch 24 tbuff equ 80h 25 cr equ Odh 26 If equ Oah 27 ctriz equ 'Z'-'@' 28 29 ; 30 ; Test program 31 ; 32 call print 33 db 'STEST013 - Text Append file test for 34 Id a,(fcb+l) ; check for help 35 cp • /' 36 jp z,help 37 cp ' • 38 jp nz,go 39 ; 40 ; Print help message 41 ; 42 help; 43 call print 44 db cr,If,'Syntax: STEST013 file en' 45 db cr.lf,' "file" is the name of a file to 46 db cr,lf,' The user is prompted for text to 47 db 0 48 ret 49 ; 50 ; Start 51 ; ZCPR3: The Libraries Sample Programs 52 go: 53 id de,fcb pt to fcb 54 call initfcb init for possible MAKE 55 call f$exist does file exist? 56 JP nz,start 57 call f$roake create file if not 58 Id a,ctrlz mark file as empty 59 Id ',0 83 xor a ; no caps 84 call bbline get line from user 85 pop de ptr to buffer in DE 86 Id a,(hi) get first char 87 or a none? 88 JP z,done 89 ex de,hl HL pts to dest, DE to 90 loopi: 91 Id a,(de) get next char 92 or a done? 93 JP 2,loop2 94 call putch put char to disk 95 JP loopi 96 loop2: 97 Id a,cr ; put CRLF 98 call putch 99 Id a,If 100 call putch 101 JP loop 102 103 , 104 ; Put char in A to disk 105 , 106 putch: 107 Id (hi),a ; store it 108 inc hi ; pt to next ZCPR3: The Libraries Sample Programs 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 me Id or ret push Id call pop Id ret de a,h a z de de,£cb f$write de hl,tbuff ; record full? ; 0=no save ptr to source write record get ptr to source pt to tbuff as dest continue ; Fill last record with "Z ; DE pts to next char in record done: Id Id inc Id or JP Id call call ret end a,ctrlz (de),a de a,d a z,done de,fob f$write f$close write "Z pt to next done? 0=no write last record close file Commentary This program illustrates a technique for appending text to the end of a file. Each time this program is run, text lines input from the user are appended to the end of a text file. Lines 52-61 initialize the file for processing. If the file does not exist (F$EXIST is called at line 55), then the file is created and initialized (lines 57-61). The call to F$APPL in line 63 opens the file for the append procedure. Lines 71-77 search for the terminating "'L in order to find the byte at which to start appending on. Lines 78-101 accept input from the user, stores the text (followed by CRLF) into the buffer, and continues until the user terminates input. Note that line 79 ensures storage of a final "Z into the file, and the completion routine DONE (lines 123-133) fills out the rest of the last block with ~Z characters, writes the last block zas stest013;zlink stest013,a:syslib/ MITEK Relocating Macro Assembler vers 2.1 (C) Copyright 1984 Mitek All Rights Reserved Assembly statistics: 135 lines 25 labels 0 macros read 0 macros expanded 0 errors A-42 ZCPR3: The Libraries Sample Programs 33804 free bytes MITEK Linking loader vers 2.0 (0 Copyright 1984 Mitek All Rights reserved BBLINE 033D BDOS 04E5 CAPS 0520 CCOUT 04A4 COUT 04D1 EVAL10 0263 F$APPE 028C F$APPL 029E F$CLOS 0318 F$DELE 0333 F$EXIS 02FF F$MAKE 030A F$WRIT 0328 FILLB 04ED FILLBC 04F6 HFILB 0503 HFILBC 050C INITFC 02EA PRINT 0446 PSTR 044C Load map for STEST013.COM SEGMENT SIZE START STOP ABSOLUTE 0000 CODE 042B 0100 052A DATA 0000 COMMON 0000 FREE AD49 1ABC C804 Execution Bl:ASM>stest013 t.tmp STEST013 - Text Append file test for SYSLIB Input Line (CR to End)> This is a test Input Line (CR to End)> This is only a test Input Line (CR to End)> Bl:ASM>type t.tmp This is a test This is only a test Bl:ASM>stest013 t.tmp STEST013 - Text Append file test for SYSLIB Input Line (CR to End)> This is another test Input Line One more time ... Input Line (CR to End)> Bl:ASM>type t.tmp This is a test This is only a test This is another test One more time ... Bl:ASM>stest013 t.tmp STEST013 - Text Append file test for SYSLIB Input Line (CR to End)> **** Input Line (CR to End)> Time number 3 Input Line (CR to End)> Bl:ASM>type t.tmp This is a test This is only a test This is another test One more time ... **** Time number 3 A-43 ZCPR3: The Libraries Sample Programs A-44 ZCPR3: The Libraries File Listings B. FILE LISTINGS The following pages contain file listings of the current versions of SYSLIB, Z3LIB, and VLIB. The current versions of these libraries are described in the last update notice in this document (see the appendix named "Update Notices"). These listings match the entries in the chapters in the reference sections. Each library routine is listed along with details of the file it is contained in: the name of the file, its size to the next 1K, the number of records in the file, its CRC value, and its checksum. B-l ZCPR3: The Libraries File Listings NOTES: B-2 ZCPR3: The Libraries File Listings B.I. SYSLIB B.I.I. Character Input/Output Character Input Contents Filename.typ Size K Recs CRC Cksum CIN RIN BIN CAPIN, CAPINE Conditional Input Contents CONDIN Character Output Contents COOT LOUT POUT SOUT BOUT CCOUT CLOUT CPOUT CSOUT Newline Output Contents CRLF LCRLF SCRLF Console Status Contents CST BI3T SCIN .Z80 1 6 6304 C5 SPIN .Z80 1 6 4526 45 SBIN .Z80 1 3 AD77 5D SCAPIN .Z80 1 4 AA18 3C Filename .typ Size K Recs CRC Cksum SCONDIN .Z80 1 6 E70F CA Filename •typ Size K Recs CRC Cksum SCOUT .Z80 1 7 4AE6 83 SLOUT .Z80 1 7 7D3A 2A SPOUT .Z80 1 7 1APB 97 SSOUT .Z80 1 5 13B3 23 SBOUT .Z80 1 4 241A B4 SCCOUT .Z80 2 9 BF30 59 SCLOUT .Z80 2 9 FDF7 58 SCPOUT .Z80 2 9 48FE B4 SSCOUT .Z80 1 6 D193 18 Filename .typ Size K Recs CRC Cksum SCRLF .Z80 1 6 04AB 4A SLCRLF .Z80 1 6 AE47 60 SSCRLF .Z80 1 4 2CFA B1 Filename .typ Size K Recs CRC Cksum SCST .Z80 1 7 5303 18 SBIST .Z80 1 3 695C 14 B.I.2. String Input/Output String Print Contents Filename.typ Size K Recs CRC Cksum PRINT EPRINT LPRINT SPRINT PSTR EPSTR LPSTR SPSTR SPRINT • Z80 1 4 88BC 83 SEPRINT • Z80 1 4 33EF OD SLPRINT • Z80 1 4 8E3D D6 SSPRINT • Z80 1 4 DD82 40 SPSTR • Z80 2 14 336A A6 SEPSTR • Z80 2 15 C125 3E SLPSTR • Z80 2 14 FDAD FF SSPSTR • Z80 2 14 4F40 03 B-3 ZCPR3: The Libraries File Listings Pile Name Output Contents Filename.typ Size K Recs CRC Cksuro LFN1 LFN2 LFN3 PFN1 PFN2 PFN3 SFN1 SFN2 SFN3 Contents SLFN1 • Z80 1 5 E852 6A SLFN2 • Z80 1 5 747A D4 SLFN3 • Z80 1 8 D399 OC SPFN1 • Z80 1 5 06C3 48 SPFN2 • Z80 1 5 284A 66 SPFN3 • Z80 1 8 EE3A E1 SSFN1 • Z80 1 5 89A5 B5 SSFN2 • Z80 1 6 E3E9 4F SSFN3 • Z80 1 8 DEB4 5E Filename.typ Size K Recs CRC Cksuro MFN1 MFN2 MFN3 Input Line Editors Contents SMFN1 SMFN2 SMFN3 .Z80 .Z80 .Z80 5 40C1 B2 6 6580 41 8 2688 F1 Filename.typ Size K Recs CRC Cksuro BBLINE BLINE INLINE SBBLINE .Z80 SBLINE .Z80 SINLINE .Z80 17 OC38 2E 21 A49F 33 45 41B2 42 B.I.3. Numeric Input/Output Numeric Output, Hexadecimal Output of Register A Contents Filename.typ Size K Recs CRC Cksuro SLA2HC .Z80 1 6 BF37 D7 SPA2HC .Z80 1 6 87B5 B9 SSA2HC .Z80 1 6 A518 32 SMA2HC .Z80 1 7 104C 4A LA2HC PA2HC SA2HC MA2HC Numeric Output, Decimal Output of Register A Contents Filename.typ Size K Recs CRC Cksuro LA3DC PA3DC SA3DC MA3DC Contents SLADC .Z80 2 11 CBCC EB SPADC .Z80 2 11 C01E 9B SSADC .Z80 2 11 0067 95 SMADC .Z80 2 14 388B 8E Filename.typ Size K Recs CRC Cksuro LADC PADC SADC MADC SLADC .Z80 2 11 CBCC EB SPADC .Z80 2 11 C01E 9B SSADC .Z80 2 11 0067 95 SMADC .Z80 2 14 388B 8E B-4 ZCPR3; The Libraries File Listings Numeric Output., Decimal Output of Register A cont'd Contents Filename.typ Size K Recs CRC Cksum LAFDC SLAFDC •Z80 2 9 FD48 9E PAFDC SPAPDC .Z80 2 9 360B 59 SAFDC SSAPDC .Z80 2 9 8AC1 PA MAFDC SMAFDC .Z80 2 11 D7D3 6D Numeric Output, Hexadecimal Output of Register Pair HL Contents Filename •typ Size K Recs CRC Cksum LHL4HC SLHL4HC .Z80 1 4 95D6 04 PHL4HC SPHL4HC .Z80 1 4 D3C7 89 SHL4HC SSHL4HC .Z80 1 4 7A71 E7 MHL4HC SMHL4HC .Z80 1 4 702D 3E Contents Filename •typ Size K Recs CRC Cksum LHL5DC SLHL5DC .Z80 2 13 E558 B7 PHL5DC SPHL5DC .Z80 2 13 D617 67 SHL5DC SSHL5DC .Z80 2 13 AOB8 61 MHL5DC SMHL5DC .Z80 3 19 1869 C8 Contents Filename .typ Size K Recs CRC Cksum LHLDC SLHL5DC .Z80 2 13 E558 B7 PHLDC SPHL5DC .Z80 2 13 D617 67 SHLDC SSHL5DC .Z80 2 13 AOB8 61 MHLDC SMHL5DC .Z80 3 19 1869 C8 Contents Filename .typ Size K Recs CRC Cksum LHLFDC SLHLFDC .Z80 2 12 E526 E6 PHLFDC SPHLFDC .Z80 2 12 3D21 C9 SHLFDC SSHLFDC .Z80 2 12 39B5 6A MHLFDC SMHLFDC .Z80 2 16 OAEE 7E Contents Filename •typ Size K Recs CRC Cksum EVAL SEVAL .Z80 3 24 7AE5 FO EVAL16 SEVAL2 .Z80 2 12 1864 07 EVAL10 SEVAL1 .Z80 2 10 1AEF 5B EVAL8 SEVAL3 .Z80 2 9 OA3B A3 EVAL2 SEVAL4 .Z80 1 8 5366 2F B.I.4. File Manipulation File Input/Output Contents Filename.typ Size K Recs CRC Cksum F$APPEND, F$APPL F$CLOSE F$DELETE F$EXIST F$MAKE F$OPEN, P$MOPEN SFAPPEND.Z80 SFCLOSE .Z80 SFDELETE.Z80 SFEXIST .Z80 SFMAKE .Z80 SFOPEN .Z80 24 F13C 4 E9B6 3 B5AA 4 5C54 4 C7E2 10 6923 7E 41 2B 19 1C 89 B-5 ZCPR3: The Libraries File Listings F$READ SPREAD •Z80 1 4 D907 82 F$WRITE SFWRITE .Z80 1 4 69B2 AA F$RENAME SFRENAME .Z80 2 12 7CBB CB F$SIZE SFSIZE .Z80 2 12 2D7A 93 Contents Filename .typ Size K Recs CRC Cksum GETRR, GETFS SGRR .Z80 2 13 E730 BE GETRR1, GETFS1 SGRR1 .Z80 2 12 1B5A 9E GFA SGFA .Z80 3 20 7F5B 42 R$READ SPREAD .Z80 2 9 9D6B 4D R$WRITE SRWRITE .Z80 2 9 536F AB SCFA SSCFA .Z80 2 16 78B6 E6 SFA SSFA .Z80 2 16 057E C1 Byte-Oriented File Input/Output Contents Filename •typ Size K Recs CRC Cksuro FIO$OPEN, FIO$CLOSE i FOO$OPEN, FOO$CLOSE f FO$GET, FO$PUT SOFILEIO .Z80 2 13 31E4 41 FI1$OPEN, FI1$CLOSE f F01$OPEN, F01$CLOSE , F1$GET, F1$PUT S1FILEIO .Z80 2 13 0424 68 FI2$OPEN, FI2$CLOSE » F02$OPEN, F02$CLOSE f F2$GET, F2$PUT S2FILEIO .Z80 2 13 C1F5 8P FI3$OPEN, FI3$CLOSE f F03$OPEN, F03$CLOSE , F3$GET, F3$POT S3FILEIO .Z80 2 13 1ABD B6 Byte-Oriented File I/O with Variable Buffers Contents Filename •typ Size K Recs CRC Cksum FXI$OPEN, FXI$CLOSE, FXO$OPEN, FXO$CLOSE, FX$GET, FX$PUT SFXIO .Z80 13 Byte-Oriented File I/O with DNGET Contents Filename.typ Size K 101 CFCC 7D Recs CRC Cksum FYI$OPEN, FYI$CLOSE, FY$UNGET, FYO$OPEN, FYO$CLOSE, FY$GET, FY$PUT, SFYIO .Z80 15 113 F4B4 14 Library Piles Contents Filename.typ Size K Recs CRC Cksum LUINIT LUDIR LUOPEN LUREAD LUCLOSE SLUINIT .Z80 SLUDIR .Z80 SLUOPEN .Z80 SLUREAD .Z80 SLUCLOSE.Z80 18 843C 4F 28 DF11 05 22 911C 6C 9 174C 8D 5 DC01 7C B-6 ZCPR3; The Libraries File Listings Miscellaneous Contents Filename.typ Size K Recs CRC Cksum FNAME INITPCB SETDMA SFNAME .Z80 5 39 8622 OB SINITFCB.Z80 1 7 81D3 AF SSDMA .Z80 1 4 OB91 D2 B.I.5. Directory Manipulation Buffer Allocation Contents Filename.typ Size K Recs CRC Cksum DBDFFER SDIR01 .Z80 2 12 825A 4P Directory Alphabetization Contents Filename.typ Size K Recs CRC Cksuro DIRALPHA SDIR06 .Z80 11 81 5A52 BD Directory Entry Selection Contents Filename.typ Size K Recs CRC Cksum DIRSEL SDIR07 .Z80 3 17 1CCD E9 Directory Load Contents Filename.typ Size K Recs CRC Cksum DIRLOAD, DIRSLOAD SDIR05 .Z80 7 56 0698 85 Directory Pack Contents Filename.typ Size K Recs CRC Cksum DIRPACK SDIR09 .Z80 2 15 6816 42 DIRNPACK SDIR08 .Z80 2 11 C2DO F7 Disk Parameter Information Extraction Contents Filename, typ Size K Recs CRC Cksum DPARAMS SDIR02 .Z80 3 18 4063 DC Pile Size Computation Contents Filename, typ Size K Recs CRC Cksum FSIZE SDIR04 .Z80 2 14 8BA4 50 Free Space Computation Contents Filename, typ Size K Recs CRC Cksum DFREE SDIR03 .Z80 2 16 015P 2B B-7 ZCPR3: The Libraries File Listings General -Purpose Contents Filename.typ Size K Recs CRC Cksum DIRF, DIRFS DIRQ DIRQS SDIR .Z80 2 14 OB34 4D SDIRQ .Z80 18 138 E710 B7 SDIRQS .Z80 20 157 4490 49 B.I.6. User Areas and Disks Save and Restore Disk/User Area Contents Filename.typ GETUD, PUTUD SUD1 .Z80 Size K Recs 1 8 CRC Cksum 33E3 OD Get and Set Current User Area Contents Filename.typ Size K Recs CRC Cksum GUA SUA Log Into a Disk/User Contents SGUA SSUA .Z80 .Z80 919A C283 36 29 LOGUD Filename.typ SUD2 .Z80 Return the Current Disk/User Contents Fit ename.typ RETUD SDD3 .Z80 Size K Recs 1 5 Size K Recs 1 5 CRC Cksum OE56 03 CRC Cksurn 56B6 94 B.1.7. Branching Case with Register A Contents Filename.typ Size K Recs CRC Cksum ACASE1 ACASE2 ACASE3 SACAS1 .Z80 SACAS2 .Z80 SACAS3 .Z80 13 38A8 56 14 68AE 9F 16 5475 4D Case with Register Pair HL Contents Filename.typ Size K Recs CRC Cksum HCASE1 HCASE2 HCASE3 SHCAS1 .Z80 SHCAS2 .Z80 SHCAS3 .Z80 17 26E6 FP 18 296D 91 20 F434 48 Confuted Goto with Register A Contents Filename, typ Size K Recs CRC Cksum AGOT01 AGOT02 BGOT01 BGOT02 SAG01 SAG02 SBG01 SBG02 .Z80 .Z80 .Z80 .Z80 8 29A7 8 567E 10 83CC 10 2B6C BE IE 04 CF B-8 ZCPR3: The Libraries File Listings Computed Goto with Register Pair HL Contents Filename.typ Size K Recs CRC Cksuin HGOT01 HGOT02 DGOT01 DGOT02 SHG01 .Z80 1 8 D45D 20 SHG02 .Z80 2 9 62AF 06 SDG01 .Z80 2 12 D46B AE SDG02 .Z80 2 12 B52B C3 Arithmetic IF with Register A Contents Filename.typ Size K Recs CRC Cksum AIF1 AIF2 SAIF1 SAIF2 .Z80 1 .Z80 1 7 1D89 7 B551 A3 1A Arithmetic IF with Register Pair HL Contents Filename.typ Size K Recs CRC Cksum HIF1 HIF2 SHIF1 SHIF2 .Z80 .Z80 10 66DE 10 202C E2 D3 B.1.8. Mathematical Functions Arithmetic Operations Contents Filename.typ Size K Recs CRC Cksum ADDHD SUBHD MULHD DIVHD Complement Operations Contents NEGH, CMPH Logical Operations Contents SMTH01 .Z80 SMTH02 .Z80 SMTH11 .Z80 SMTH12 .Z80 Filename.typ SMTH10 .Z80 1 4 1 4 2 13 2 13 Size K Recs 1 4 E9ED 4D 4060 EA E321 28 OB5B 5F CRC Cksum BBBC 03 Filename.typ Size K Recs CRC Cksum ANDHD ORHD XORHD SMTH07 .Z80 SMTH08 .Z80 SMTH09 .Z80 DF1C 88 DE30 D9 9CF7 6E Rotate and Shift Operations Contents Filename.typ Size K Recs CRC Cksum ROTLH ROTRH SHFTLH SHFTRH Random Number Generator Contents RNDINIT, RNDSEED, RND SOTH03 .Z80 SMTH04 .Z80 SMTH05 .Z80 SMTH06 .Z80 Filename.typ SRAND .Z80 Size K Recs 2 12 8FOO AE 2CAA 81 DCAD 46 E3BA D6 CRC Cksum 9CA3 18 B-9 ZCPR3: The Libraries File Listings CRC Calculation Contents Filename.typ Size K Recs CRC Cksuin CRCCLR, CRCUPD, CRCDONE CRC1CLR, CRC1UPD, CRC1DONE CRC2CLR, CRC2UPD, CRC2DONE SCRC .Z80 SCRC1 .Z80 SCRC2 .Z80 24 5008 10 24 CBCC 25 22 B3EA F2 B.I.9. Utilities I Menory Allocation Contents Filename.typ Size K Recs SALLOC .Z80 3 22 ALLOC, IALLOC Parsing Aids, Character Skip Contents Filename.typ Size K Recs CRC Cksum A20C 13 CRC Cksuin SKNPUN, SKPCN SKNSP, SKSP SSKPUN SSKSP .Z80 .Z80 P425 PD9D D6 2C Parsing Aids, Character Test Contents Filename.typ Size K Recs CRC Cksum ISALNUM ISALPHA ISCTRL ISDIGIT ISGRAPH ISHEX I SPRINT ISPUN ISSP SISALNUM.Z80 1 5 06A2 9B SISALPHA.Z80 1 6 PBAO 77 SISCTRL .Z80 1 5 0467 E2 SISDIGIT.Z80 1 5 , 21D9 6B SISGRAPH.Z80 1 5 24E2 5A SISHEX .Z80 1 6 PB81 58 SISPRINT.Z80 1 5 63EE C4 SISPUN .Z80 1 8 3A83 C1 SISSP .Z80 1 8 D09C F8 Parsing Aids, UNIX-Style ARGC/ARGV String Parser Contents Filename.typ Size K Recs CRC Cksuro 22 OFD6 40 CRC Cksum 8FOB 26 SARGV .Z80 ARGV Sort Contents Filename.typ Size K Recs SSORT .Z80 15 113 SORT, SSBINIT String and Value Comparison Contents Filename.typ Size K Recs CRC Cksum INSTR CQMPHD COMPB, COMPBC SCANNER SINSTR .Z80 SCOMPHD .Z80 SCOMP .Z80 SSCANNER.Z80 12 C950 89 4 OFC6 BD 9 AB96 31 11 3C2D OC B-IO ZCPR3: The Libraries File Listings B.I.10. Utilities 2 BDOS and BIOS Access Contents Filename.typ Size K Recs CRC Cksum BDOS SBDOS .Z80 1 4 842D 36 BIOS SBIOS .Z80 3 17 064A 96 Capitalization Contents Filename.typ Size K Recs CRC Cksum CAPS SCAPS .Z80 1 3 864E 34 CAPSTR SCAPSTR .Z80 1 5 B6BB C8 Coraoand Line Tail Extraction Contents Filename.typ Size K Recs CRC Cksum CLINE SCLINE .Z80 2 11 7399 9C Convert ASCII to Hexadecimal Contents Filename.typ Size K Recs CRC Cksum CATH SCATH .Z80 1 5 DDEB 01 End of Code Contents Filename.typ Size K Recs CRC Cksum CODEND, $MEMRY SCODEND .Z80 1 7 DC7F 44 Exchange Nybbles Contents Filename.typ Size K Recs CRC Cksum EN SEN .Z80 1 2 879B B9 Memory Pill Contents Filename.typ Size K Recs CRC Cksuro FILLB, FILLBC, HFILB, HFILBC SFILL .Z80 2 10 C441 B9 Mentory Move Contents Filename.typ Size K Recs CRC Cksum MOVEB, MOVEBC, HMOVB, HMOVBC SMOVE .Z80 3 19 398D E9 Pause Execution Contents Filename.typ Size K Recs CRC Cksum PAUSE SPAUSE .Z80 3 23 965P 70 Version Number of SYSLIB Contents Filename, typ Size K Recs CRC Cksum VERSION SVERSION.Z80 2 16 B82F F3 B-ll ZCPR3: The Libraries File Listings B.I.11. Other Files SYSLIB.REL is the relocatable object code library of SYSLIB Filename.typ Size K Recs CRC Cksum SYSLIB .REL 24 188 5CD9 9D SBUILD.ZEX is used to assemble and create SYSLIB.REL SYSLIB.SEQ shows the linking order of the modules in SYSLIB Filename.typ Size K Recs CRC Cksum SBUILD .ZEX SYSLIB .SEQ 54 C288 15 21 821C ED STEST.LBR contains the test programs for SYSLIB Filename.typ Size K Recs CRC Cksum STEST .LBR 66 528 2EFE El SYSLIB.CN is this document file Filename.typ Size K Recs CRC Cksum SYSLIB .CN 27 211 906F 6D The following are include files used by SYSLIB routines Filename.typ Size K Recs CRC Cksum LUDDEF .LIB 1 8 D856 16 SDIRHDR .LIB 1 5 4451 B6 The following are the Help Files for SYSLIB Filename .typ Size K Recs CRC Cksum SYSLIB .HLP 2 10 359F FA SYSLIBO •HLP 14 112 86FE 65 SYSLIB1 .HLP 20 160 OFOA 93 SYSLIB2 .HLP 5 34 47 5B 8E SYSLIB3 .HLP 24 186 F74C 07 SYSLIB4 .HLP 17 134 17A8 95 SYSLIB5 .HLP 12 90 DDF2 1C SYSLIB6 .HLP 8 61 OB26 95 SYSLIB7 .HLP 6 46 3C31 64 SYSLIB8 .HLP 5 37 10B8 80 SYSLIB9 .HLP 4 26 8C8D A5 SYSLIBA .HLP 7 55 84B4 OD B-12 ZCPR3: The Libraries File Listings SYSLIBB SYSLIBC SYSLIBD SYSLIBE SYSLIBF SYSLIBG SYSLIBH SYSLIBI SYSLIBJ SYSLIBK SYSLIBL .HLP .HLP .HLP .HLP .HLP .HLP .HLP .HLP .HLP .HLP .HLP 5 9 7 8 4 3 2 6 21 8 1 39 ODD6 72 OFB9 51 DDE1 63 71F8 25 5A27 21 1203 14 2530 44 B232 162 6E76 60 2C07 4 D170 A8 93 80 00 OD E7 6F 65 3F 9F 6A B-13 ZCPR3: The Libraries File Listings NOTES: B-14 ZCPR3: The Libraries File Listings B.2. Z3LIB B.2.1. Environment Access 1 Coranand Line Contents Filename.typ Size K Recs CRC Cksum APPCL CLRCL GETCL1 GETCL2 PUTCL CRT/Printer Data Contents GETCRT PUTCRT GETPRT PUTPRT DD/Max DD Contents GETDUOK PUTDUOK GETMDISK PUTMDISK GETMUSER PUTMUSER External PCB Contents GETEFCB Environment of ZCPR3 Contents Z3APPCL .Z80 2 16 947F 63 Z3CLRCL .Z80 1 6 2334 6E Z3GCL1 .Z80 1 8 72E5 4F Z3GCL2 .Z80 2 9 076D 01 Z3PCL .Z80 3 19 2907 A8 Filename •typ Size K Recs CRC Cksum Z3GCRT .Z80 1 7 5320 65 Z3PCRT .Z80 1 6 DF3C 9C Z3GPRT .Z80 1 7 A52C OC Z3PPRT .Z80 1 6 EE19 CC Filename .typ Size K Recs CRC Cksum Z3GDUOK .Z80 1 4' 79B2 20 Z3PDUOK .Z80 1 4 F4A3 59 Z3GMDISK .Z80 1 4 AFF2 IF Z3PMDISK .Z80 1 4 21E4 5A Z3GMUSER .Z80 1 4 1471 AB Z3PMUSER .Z80 1 4 3E50 E6 Filename .typ Size K Recs CRC Cksum Z3GEFCB .Z80 1 4 DD77 4E Filename.typ Size K Recs CRC Cksuro GETENV GETVID FCP Address Contents GETFCP File Names Contents 3 9F4F OE 5 95A4 A5 Z3GENV .Z80 Z3GVID .Z80 Filename.typ Size K Recs CRC Cksum Z3GFCP .Z80 1 6 4400 AA Filename.typ Size K Recs CRC Cksum GETFN1 GETFN2 GETFNX PUTFNX Z3GFN1 .Z80 Z3GFN2 .Z80 Z3GFNX .Z80 Z3PFNX .Z80 F73A 24 6BFE 5E 9468 45 EF8E 5C B-15 ZCPR3: The Libraries File Listings Initialize Contents Z3INIT IOP Contents Filename.typ Size K Recs CRC Cksuro Z3INI .Z80 1 4 394E 25 Filename.typ Size K Recs CRC Cksuro GETION GETIOP GETIOS IOMATCH PUTIOD IOP Recording Contents Z3GIOX .Z80 Z3GIOP .Z80 Z3GIOX .Z80 Z3IOMA .Z80 Z3GIOX .Z80 3 18 1 6 3 18 2 16 3 18 129F BF 6DEB 81 129F BP 5CB7 86 129F BF Filename.typ Size K Recs CRC Cksuro IORCOFF, IORCON, IORLOFF, IORLON Z3IOR .Z80 2 14 A7D9 4F B.2.2. Environment Access 2 Messages Contents Filenaroe.typ Size K Recs- CRC Cksuro GETMSG GETSHM PUTSHM Named Directories Contents Z3GMSG .Z80 Z3MSGG .Z80 Z3MSGH .Z80 5 9FD4 Dl 6 49A7 EO 6 3683 CB Filenaroe.typ Size K Recs CRC Cksuro ADDNDR DIRNDR DUNDR GETNDR SUBNDR Path Contents GETPATH Processor Speed Contents Z3ANDR .Z80 35 E059 18 5CBA 18 5CBA 6 6B47 20 D5E5 CB A4 A4 25 EC Z3QNDR .Z80 Z3QNDR .Z80 Z3GNDR .Z80 Z3SNDR .Z80 Recs CRC Cksuro 6 581E E8 Filename.typ Z3GPATH .Z80 Size K 1 Filenaroe.typ Size K Recs CRC Cksuro GETSPEED PUTSPEED Quiet Flag Contents 4 9815 23 4 03AD 5E Z3GSPEED.Z80 Z3PSPEED.Z80 Filenaroe.typ Size K Recs CRC Cksuro GETQUIET PUTQUIET Z3GQUIET.Z80 Z3PQUIET.Z80 4 1379 BC 4 6AFA FD B-16 ZCPR3: The Libraries File Listings RCP Address Contents Filename.typ Size K Recs CRC Cksum GETRCP Z3GRCP .Z80 1 6 8DC7 F1 Shell Stack Contents Filename.typ Size K Recs CRC Cksum GETSH1, GETSH2 Z3GSH .Z80 2 10 E963 E5 Wheel Byte Contents Filenaroe.typ Size K Recs CRC Cksum GETWHL Z3GWHL .Z80 1 5 B859 30 PUTWHL Z3PWHL .Z80 1 5 3153 BB B.2.3. Flow and ZEX Control Flow Control Contents Filename.typ Size K Recs CRC Cksum I FEND Z3IFEND .Z80 1 5 B672 9E IFT, IFF Z3IF .Z80 2 14 F002 D6 IFTEST Z3IFTEST.Z80 1 6 29EB 11 IFELSE Z3IFELSE.Z80 1 8 E68D 07 ZEX Access and Control, ZEX Data Contents Filename.typ Size K Recs CRC Cksuro GETZFC Z3GZFC .Z80 1 8 416C 8A GETZNC Z3GZNC .Z80 1 8 FD4E 84 PUTZNC Z3PZNC .Z80 1 8 2507 B2 GETZRUN Z3GZR .Z80 1 7 8D60 D2 PUTZRUN Z3PZR .Z80 1 7 D350 D5 ZEX Access and Control, ZEX Status and Control Contents Filename.typ Size K Recs CRC Cksum GETZEX Z3MSG8 .Z80 1 5 9E2E 16 PUTZEX Z3MSG9 .Z80 1 7 859E DC HALTZEX Z3HZEX .Z80 1 6 55A5 AC STOPZEX, STRTZEX Z3MSG9 .Z80 1 7 859E DC B.2.4. Messages of ZCPR3 Cooroand Status Messages Contents Filename.typ Size K Recs CRC Cksum GETCST Z3MSG5 .Z80 1 4 98A9 8B PUTCST Z3MSGF .Z80 1 6 56AA 7F QERROR Z3MSG7 . Z80 1 6 80B2 BB QSHELL Z3MSG6 .Z80 1 5 9367 F5 B-17 ZCPR3: The Libraries File Listings Error Flag and Error Command Contents Filename.typ Size K Recs CRC Cksum ERRADR GETER1 PUTER1 GETERC PUTERC Z3MSGE .Z80 Z3MSG1 .Z80 Z3MSG2 .Z80 Z3MSGB .Z80 Z3MSG3 .Z80 5 A39F 4 C222 4 34E7 8 3DB8 4 6E53 45 B8 69 96 7C Inter-Transient Error Code Contents Filename.typ Size K Recs CRC Cksum GETER2 PUTER2 Register Access Contents 4 6E53 7C 4 7F44 FO Z3MSG3 .Z80 Z3MSG4 .Z80 Filename.typ Size K Recs CRC Cksurn GETREG PUTREG Z3MSGC .Z80 Z3MSGD .Z80 6 F633 65 6 DF1D 4C B.2.5. Utilities Locate ROOT Directory in Path Contents ROOT Log into ZCPR3 FCB DO Contents Z3LOG Filename.typ Size K Z3ROOT .Z80 1 Filename.typ Size K Z3LOG .Z80 2 Named Directory and Disk Oser Conversion Contents Filename.typ Size K Recs CRC Cksum 8 7FA8 F7 Recs CRC Cksum 9 C73C 10 Recs CRC Cksuro DIRTDU DUTDIR Z3DIRTDU.Z80 Z3DUTDIR.Z80 20 9 F888 FD65 B8 7D Output Routines Based on the Quiet Flag Contents Filename.typ Size K Recs CRC Cksuro QCOUT QCRLF QOUT QPRINT QPSTR Parse Coranand Line Contents PARSER Z3QCOUT .Z80 1 Z3QCRLF .Z80 1 Z3QOUT .Z80 1 Z3QPRINT.Z80 1 Z3QPSTR .Z80 1 Filename.typ Size K Recs Z3PRS1 .Z80 14 112 DBC1 CD C3FO D8 10E5 A4 B49C 3D D17C 7D CRC Cksum BB1B 5E B-18 ZCPR3: The Libraries File Listings Parse Token Contents Filename.typ Size K Recs CRC Cksuro ZPRSFN ZFNAME Z3PRS1 .Z80 Z3PRS2 .Z80 14 11 112 82 BB1B 409C 5E 6D Pause ExecutionContents Filename.typ Size K Recs CRC Cksum WAIT1S WAIT1MS WAITP1S Z3W1 .Z80 Z3W2 .Z80 Z3W3 .Z80 1 1 1 7 6 7 F214 A446 2F1F 3F E2 E3 Program Loader (Chain)Contents Filename.typ Size K Recs CRC Cksum PRGLOAD Z3PRGLD .Z80 3 20 C76P OF Resolve Directory ReferContents encesFilename.typ Size K Recs CRC Cksum DNSCAN, DUSCAN, DIRSCAN Z3PRS3 .Z80 51 ADE9 16 Search for File Along Path Contents Filename.typ PFIND Z3PFIND .Z80 Shell Stack Manipulation Size K 5 Recs CRC Cksum 33 C05A A4 Contents SHEMPTY SHFULL SHPOP SHPUSH Z3LIB Version Number Contents Filename.typ Size K Recs CRC Cksum Z3LVER Initialize Z3LIB Contents Z3SHEMPT.Z80 Z3SHFULL.Z80 Z3SHPOP .Z80 Z3SHPUSH.Z80 Filename.typ Z3LVER .Z80 4 2AFB 54 8 9572 3A 13 4438 87 22 07CC DA Size K Recs CRC Cksum 1 4 78AB 2E Z3INIT Filename, typ Z3INI .Z80 Size K Recs CRC Cksum 1 4 394E 25 B-19 ZCPR3: The Libraries Pile Listings B.2.6. Other Files Z3LIB.REL is the relocatable object code library of Z3LIB Filename.typ Size K Recs CRC Cksum Z3LIB .REL 10 78 B674 D7 Z3LIB.ZEX is used to assemble and create Z3LIB.REL Z3LIB.SEQ shows the linking order of the modules in Z3LIB Filename.typ Size K Recs CRC Cksum Z3LIB Z3LIB .ZEX .SEQ 16 174D E2 11 767D CE Z3LIB.CN is this document file Filename.typ Size K Recs CRC Cksum Z3LIB .CN 14 109 D3A7 4B The following are the Help Files for Z3LIB Filename.typ Size K Recs CRC Cksum Z3LIB .HLP 3 17 0394 15 Z3LIB1 .HLP 19 145 4526 A8 Z3LIB2 .HLP 25 198 537A 61 Z3LIB3 .HLP 14 109 1097 67 Z3LIB4 .HLP 15 120 28F7 85 Z3LIB5 .HLP 16 127 189C 13 B-20 ZCPR3: The Libraries B.3. VLIB B.3.1. VLIB File Listings Clear ScreenContents Filename.typ Size K Recs CRC Cksum CLS VID1 .Z80 1 6 EA2B 16 Cursor PositioningContents Filename.typ Size K Recs CRC Cksum AT GOTOXY VLAT .Z80 VID7 .Z80 1 5 6 41 64B4 F1A5 1B DA Erase to End of LineContents Filename.typ Size K Recs CRC Cksum EREOL VID2 .Z80 1 7 7185 EE InitializationContents Filename.typ Size K Recs CRC Cksum VIDINIT, Z3VINIT VIDB .Z80 1 6 FBAO 7A PrintContents Filename.typ Size K Recs CRC Cksuro GXYMSG, VPRINT VLGXYMSG.Z80 2 12 2BBE B7 Standout ModeContents Filename.typ Size K Recs CRC Cksum STNDOUT STNDEND VID3 .Z80 VID4 .Z80 1 7 1 7 2151 9B07 59 71 Terminal InitializationContents Filename.typ Size K Recs CRC Cksum TINIT DINIT VID5 .Z80 VID6 .Z80 1 7 1 7 8B6A 8DBP EE 55 B.3.2. Other Files VLIB.REL is the relocatable object code library of VLIB Filename.typ Size K Recs CRC Cksum VLIB .REL 2 13 30C3 97 B-21 ZCPR3: The Libraries File Listings VLIB.ZEX is used to assemble and create VLIB.REL VLIB.SEQ shows the linking order of the modules in VLIB Filename.typ Size K Recs CRC Cksum VLIB .ZEX 1 3 6386 93 VLIB .SEQ 1 1 4AFD 02 VLIB.CN is this document file Filename.typ Size K Recs CRC Cksum VLIB .CN 3 21 EB7D FD The following are the Help Files for VLIB Filename.typ Size K Recs CRC Cksum VLIB .HLP 11 88 EFB6 26 B-22 ZCPR3: The Libraries Update Notices C. DPDATE NOTICES This is the initial release of ZCPR3: The Libraries. It describes the following libraries: SYSLIB Version 3.6 Z3LIB Version 1.3 VLIB Version 1.1 C-l ZCPR3: The Libraries Update Notices NOTES: C-2