XTAIL Version 1.1 Gene Pizzetta January 12, 1991 XTAIL is a ZCPR3 utility that displays the command tail as parsed by the command processor. Both the default and alternate (secondary) file control blocks are displayed as a hexadecimal dump and in ASCII, as is the complete tail in the default DMA buffer. This program can be useful for anyone exploring programming in the ZCPR3 environment. USAGE: XTAIL {whatever you want} No command line parameters or options affect the operation of XTAIL. This distribution also includes a type-3 version that loads at 8000h and a type-4 version that loads as high in memory as possible. There are some slight differences in the command line buffer contents from one version to the other. DISPLAY: If it is available in your TCAP, highlighting will be used in the display to make it more readable. A typical command line and display follows: C0:ASM>>xtail d3:myfile.txt a15:yourfile.doc /abcd XTAIL Version 1.1 (loaded at 0100h) Default and alternate file control blocks: addr dr filename -- -- -- -- -- filetype us fl 005C: 04 4D 59 46 49 4C 45 20 20 54 58 54 00 03 00 00 |.MYFILE TXT....| 006C: 01 59 4F 55 52 46 49 4C 45 44 4F 43 00 0F 00 00 |.YOURFILEDOC....| offset: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Command tail: addr ct tail -- -- -- -- -- -- -- -- -- -- -- -- -- 0080: 25 20 44 33 3A 4D 59 46 49 4C 45 2E 54 58 54 20 |% D3:MYFILE.TXT | 0090: 41 31 35 3A 59 4F 55 52 46 49 4C 45 2E 44 4F 43 |A15:YOURFILE.DOC| 00A0: 20 2F 41 42 43 44 00 19 EB 0E 09 C3 05 00 4E 6F | /ABCD........No| C0:ASM>> The header above the two file control blocks identifies important bytes: addr address of file control block dr drive byte (0=default, 1=A, 2=B, etc.) filename name of the file filetype file name extension us user area byte (0=user 0, 1F=user 31) fl validity flag set by some CPR's if the filespec includes an invalid DU or DIR specification (the drive, user, or directory does not exist) as shown in the example below The header above the command tail is simpler: addr beginning address of bytes displayed ct count of characters in the command tail (excluding the final null byte) tail the command tail itself (only enough lines are displayed to show the entire tail, not the entire buffer) If an invalid DU or DIR specification is given, the CPR sets the drive and user bytes to the current default and, in some cases, sets the validity flag byte to FFh. Normally this flag byte is zero. For example, entering drive "Q" instead of "D" gives the following results: C0:ASM>>xtail q3:myfile.txt a15:yourfile.doc /abcd XTAIL Version 1.1 (loaded at 0100h) Default and alternate file control blocks: addr dr filename -- -- -- -- -- filetype us fl 005C: 03 4D 59 46 49 4C 45 20 20 54 58 54 00 00 00 FF |.MYFILE TXT....| 006C: 01 59 4F 55 52 46 49 4C 45 44 4F 43 00 0F 00 00 |.YOURFILEDOC....| offset: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Command tail: addr ct tail -- -- -- -- -- -- -- -- -- -- -- -- -- 0080: 25 20 51 33 3A 4D 59 46 49 4C 45 2E 54 58 54 20 |% Q3:MYFILE.TXT | 0090: 41 31 35 3A 59 4F 55 52 46 49 4C 45 2E 44 4F 43 |A15:YOURFILE.DOC| 00A0: 20 2F 41 42 43 44 00 19 EB 0E 09 C3 05 00 4E 6F | /ABCD........No| C0:ASM>> The line below the file control blocks display gives the relative offset for each byte within the block. HISTORY: I originally wrote this utility to explore the FCB parsing of the CPR. I found it invaluable at the time. I just realized it might be of use to others, so I've put it into release form. Version 1.1 -- January 12, 1991 -- Gene Pizzetta Changed hard-coded video attributes to use VLIB routines. Converted to Zilog mnemonics. Added type-3 header and type- 4 assembly. Created documentation file. Version 1.0 -- December 21, 1987 -- Gene Pizzetta Original version. Gene Pizzetta 481 Revere St. Revere, MA 02151 Voice: (617) 284-0891 Newton Centre Z-Node: (617) 965-7259 Ladera Z-Node Central: (213) 670-9465