	title	Module from library BASE_1 : BDOS
	name	('BDOS')
	maclib	baselib.lib

; Execute BDOS call for file I/O

; Copyright (C)	Werner Cirsovius
;		Hohe Weide 44
;		D-20253 Hamburg
;		Tel.: +49-40-4223247

;		Version 1.0 October 1988

; ENTRY	Reg pair <DE> points to FCB
;	Accu holds BDOS function number

; EXIT	Location IORES+0 holds returned Accu
;	Location IORES+1 holds returned register H

	entry	@BDOS,iores

@BDOS:
	push	bc
	push	de
	ld	c,a		; Set function
	call	BDOS		; Execute function
	ld	(iores),hl	; Save returned values
	ld	(iores),a
	pop	de
	pop	bc
	ret

	dseg

iores:
	ds	2

	end

