; * * * * * ACTDIR -- DISPLAY ALL ACTIVE DIRECTORY ENTRIES ; MACLIB CPMEQU ; standard names MACLIB PROG ; prolog, service macros MACLIB HEXSUB ; hex display routines MACLIB COSUB ; console output routines MACLIB DPSUB ; 16-bit routines ; PROLOG 30,ACTDIR ; HEADING DB 'Active directory entries, drive ' DRIVE DB 0,CR,LF,CR,LF+80H ; THEFCB DB 0 ; drive already selected DB '????????' ; filename DB '???' ; filetype DB '?' ; ALL extent entries DB 0,0,0 ; s1, s2, record count DW 0,0,0,0,0,0,0,0 ; data map DW 0,0 ; current record, direct addr ; ACTDIR EQU $ LDA CPMFCB ; see if a drivecode was given DCR A ; convert A=1 into A=0 JP DIR2 ; (result not FF -- code given) SERVICE 25 ; omitted, get current drive DIR2 MOV E,A ; save drive for service 14 ADI 'A' ; make printable, STA DRIVE ; ..put in message, LXI H,HEADING CALL COSTR ; ..print heading. SERVICE 14 ; select drive (code in reg E) SERVICE 17,THEFCB ; get first active entry ; DIRLOOP ORA A ; any entries left? RM ; (back to CCP if not) CALL DIRDUMP ; yes, dump this one in hex SERVICE 18,THEFCB JMP DIRLOOP ; do next entry, if any ; ; Dump the directory entry whose number is in [A], ; from the current record in the buffer ; DIRDUMP LXI H,CPMBUFF ADD A ; convert 0,1,2,3 --> 0,32,64,96 ADD A ! ADD A ADD A ! ADD A CALL DP$ADAH ; ..and add to buffer address MVI B,16 ; amount to dump in each line CALL HEXLINE ! CALL COCRLF ; 1st line CALL HEXLINE ! CALL COCRLF ; 2nd line CALL COCRLF ; blank line RET ; ; COMMON SUBROUTINES ; HEXSUBM COSUBM DPSUBM END