aboutsummaryrefslogtreecommitdiff
path: root/diskio.asm
blob: fa1524c9d3462824cf60a1316f683182d0ef11ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Reset the disk system
;; DL must be disk to reset
diskio_ResetDiskSystem:
	pop		ax
	pop		dx
	push	ax
	xor		ah, ah
	int		0x13
	ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diskio_DumpBootSector:
	xor		bx, bx
	mov		es, bx
	mov		bx, diskio_SectorBuffer	; ES:BX = address
	mov		dl, [Drive]			; DL = Drive number
	mov		ah, 2				; AH = Read command
	int		0x13					; Read sector
	push	diskio_SectorBuffer
	call	OutText
	ret