; TITLE "SFOPEN - Syslib 4.0" NAME ('FOPEN') ;================================================================= ; The Libraries, Version 4, (C) 1989 by Alpha Systems Corp. ;----------------------------------------------------------------- ; Author : Harold F. Bower ; Derived from SFOPEN.Z80 Ver 1.1 by Richard Conn ; Date : 11 Jun 89 ; Version : 1.4 ; Module : SFOPEN ; Abstract: This module contains the routine F$OPEN which attempts ; to Open a file. ; Revision: ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC F$OPEN, @DOS ; External References EXT @BDOSA ; Definitions B$OPEN EQU 15 ; CP/M, Zrdos, P2Dos Open File Fcn .Z80 CSEG ;=============================================================== ; NAME - F$OPEN ; Entry: DE - Addresses the FCB for the desired file ; Exit : A = 0, Zero Flag Set (Z) if Open Ok ; A = 0FFH, Zero Flag Reset (NZ) if Error ; Uses : AF ; Special Requirements: None ;=============================================================== F$OPEN: LD A,B$OPEN ; Load Open Function @DOS: CALL @BDOSA ; ..do the call saving registers RET M ; Quit here if already FFH (ERROR) XOR A ; ..else insure Zero Flag Set (OK) RET END