; TITLE "SINITFCB - Syslib 4.0" NAME ('INITFC') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SINITFCB Ver 1.1 by Richard Conn ; Date : 11 Jun 89 ; Version : 1.3 ; Module : SINITFCB ; Abstract: This module contains the single routine INITFCB. ; Given an FCB pointed to by DE, INITFCB fills all bytes of ; the FCB through the Record Number other than the name and ; type fields to zero. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points: PUBLIC INITFCB .Z80 CSEG ;========================================================================= ; NAME - INITFCB ; Entry: DE - Address of a 33-byte File Control Block (FCB) ; Exit : - No status returned ; Uses : - None ; Special Requirements: None ;========================================================================= INITFCB: PUSH HL ; Save Registers PUSH DE PUSH AF EX DE,HL ; HL pts to FCB LD DE,12 ; FCB offset in E, 0 in D LD (HL),D ; Set Drive field to zero ADD HL,DE ; Point to Extent byte LD E,21 ; Clear next 21 bytes LOOP: LD (HL),D ; ..with Null INC HL DEC E ; Count down JR NZ,LOOP ; Continue til done POP AF ; Restore registers POP DE POP HL RET END