LBL "FS" Copyright Michael Markov 86/07/16 CF 00 Preliminary version for use with only one drive on the loop FIX 0 Flag 0 will be set for program files, enabling the analysis of CF 29 the END. FIX 0 & CF 29 for output appearance, should be restored. VERIFY Trap "File not found", get directory entry into buffer #1, & 32 position drive pointers to end of file sector. BSIZEX Create DEVIL buffer MIPT Set-up for locating entry: UNL UNT AAU See WIPEFL write-up 2 Reset MSD pointer to byte 0 LAD 3 DDL CLX OUTBIN Reset accomplished UNL " " 2 TAD SIGN DDT We are now ready to get the entries from buffer #1 AAD Restore normal addressing mode to facilitate printer use LBL 98 Labels numbers are critical for file type identification 32 Use care when renumbering. INBUFX Get the directory entry(ies). 10 A=BUFX? Do we have a match? GTO 97 GTO 98 LBL 97 We now start analysis of the directory entry "FILE : " The method is straightforward, almost obvious! 10 BUF-AX PRA 11 PT= SIGN BUF-XB "TYPE : " 16 / ENTER^ INT XY? XEQ 00 SF 25 XEQ IND X FC?C 25 "??" GTO 99 LBL 00 RDN 16 * 1 X=Y? RTN 255 Since there is no LBL 255, this forces an error during RTN the subsequent execution of XEQ IND X for most HP71 files LBL 01 "AS" RTN LBL 04 "WA" RTN LBL 05 "KY" RTN LBL 06 "ST" RTN LBL 07 "ML" RTN LBL 08 "PR" SF 00 enable analysis of END RTN LBL 13 "DA" RTN LBL 99 above sieve does not include new file types from EXT-IL ROM PRA "LENGTH : " 28 PT= 7 7 bytes/register in RAM, but 8 bytes/register on MSD 2 Let us use 7, since the extra byte is effectively unused BUF-XB X<>Y RDN FC? 00 this insures all file lengths are given in bytes * ARCL X PRA "RESERVED: " 18 PT= This allows us to get reserved space in bytes 3 BUF-XB ARCL X PRA "UNUSED : " RCL T - ARCL X PRA FC? 00 RTN AAU The last program byte should be in the current MSD sector 2 after executing VERIFY LAD LASTX 3 DDL - This should place us at the start of the END (3 bytes). 256 We probably should position the MSD pointer to the last byte of MOD the END instead. OUTBIN Repositioning completed 2 TAD CLX DDT DDT0 mode, prepare to read buffer #0. 3 INBUFX BUF-XB SIGN AAD Again, restore normal addressing. LASTX "END : " 15 AND retain the last nibble of the end to determine PACK status 9 XY? is it really packed? "UN" "PACKED" PRA CLA 0 PT= Restore the ALPHA register ... 10 BUF-AX END We could of course extract additional data as to file attributes & file start address. The tools introduced by FS could be used to extract any data to be found in an MSD directory. Best reguards, Michael Markov