TITLE "DDIR08 - Syslib 4.0" ;================================================================= ; Copyright (C) 1989 by Harold F. Bower. Permission granted to ; Alpha Systems Corp. to distribute with The Libraries, Version 4 ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SDIR08.Z80 Ver 1.5 by Richard Conn ; Date : 27 Aug 88 ; Version : 1.0 ; Module : DDIR08 ; Abstract: This module contains the routine DDIRNPK which ; restructures the selected entries in a directory buffer ; to select only those entries which were previously not ; selected. A required side effect of this routine is ; that the flag extent (set by DIR:) be correct. In most ; cases, a default of 0 is Ok, except when the extent ; size is greater then 16K. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC DDIRNPAK ; External References EXT DDIRPAK, SDFCHK ; Definitions ESIZE EQU 16+15 ; Entry size (+ Create, Access & Mod time) .Z80 CSEG ;=============================================================== ; NAME - DDIRNPAK ; Entry: HL - Points to a Directory Buffer ; BC - Number of entries in the Buffer ; Exit : - Nothing returned ; Uses : None ; Special Requirements: A required side effect is that the flag ; extent (Set by DIR:) be correct. In most cases, default ; of 0 is Ok, except when extent size is greater than 16K ;=============================================================== DDIRNPAK: PUSH HL ; Save Regs PUSH DE PUSH BC PUSH AF LD DE,ESIZE ; Set offset between entries DNPACK: LD A,B ; Done? OR C JR Z,DNPAK1 DEC BC ; Count down LD A,10000000B ; Set MSB to toggle on select XOR (HL) LD (HL),A ; Save the byte with select toggled RLA ; Is this a New select? JR NC,DNPAK0 ; ..jump if Deselect CALL SDFCHK ; Check for Flags JR Z,DNPAK0 ; ..jump if Select is Ok by Flags RES 7,(HL) ; Else deselect this file DNPAK0: ADD HL,DE ; Point to next entry JR DNPACK DNPAK1: POP AF ; Restore regs POP BC POP DE POP HL JP DDIRPAK ; Now branch to DIRPACK END