Digital Research
This commit is contained in:
2020-11-06 18:50:37 +01:00
parent 621ed8ccaf
commit 31738079c4
8481 changed files with 1888323 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
; Figure 5-20
;
; CF
; Create File
; This subroutine creates a file. It erases any previous
; File before creating the new one.
;
; Entry Parameters
;
; DE -> File Control Block for new file
;
; Exit Parameters
;
; Carry Clear if operation successful (A = 0,1,2,3)
; Carry Set if error (A = 0FFH)
;
; Calling Sequence
;
; LXI D,FCB
; CALL CF
; JC ERROR
;
B$ERASE EQU 19 ;Erase File
B$CREATE EQU 22 ;Create File
BDOS EQU 5 ;BDOS Entry Point
;
;
CF:
PUSH D ;Preserve FCB Pointer
MVI C,B$ERASE ;Erase any existing file
CALL BDOS
POP D ;Recover FCB Pointer
MVI C,B$CREATE ;Create (and open new file)
CALL BDOS
CPI 0FFH ;Carry set if OK, Clear if Error
CMC ;Complete to use Carry set if Error
RET