	title	Get DPB Block Of A Drive
	name	('DPARAMS')

; Return block shift-factor byte and
; max data block number on the currently logged drive

bdos	equ	5

	entry	dparams

	entry	extmsk,blkshf

; Enter:	drive (0=A:, ..., 15=P:) logged in
; Exit:		de = no. of blocks on the disc
;
dparams:
	ld	c,31		; BDOS get disk parameters function
	call	bdos
	inc	hl		; point to block shift-factor byte
	inc	hl
	ld	a,(hl)		; Get value and
	ld	(blkshf),a	; ..save it
	inc	hl		; point to max data block number
	inc	hl
	ld	a,(hl)
	ld	(extmsk),a	; save it
	inc	hl
	ld	e,(hl)		; Get (word) value into DE
	inc	hl
	ld	d,(hl)
	inc	de		; Add 1 for max number of blocks
	ret
;
blkshf:	ds	1
extmsk:	ds	1

	end

