Correcting code style
This commit is contained in:
parent
f4daef6374
commit
1d9d02196c
|
@ -80,7 +80,7 @@ dump:
|
|||
; bl : color code ;
|
||||
; esi : string address ;
|
||||
;-----------------------------------------------------------------------;
|
||||
mov edi, [NextTRAM] ; TRAM ADDRESS
|
||||
mov edi, [NextTRAM] ; TRAM ADDRESS
|
||||
push rsi
|
||||
push rdi
|
||||
push rcx
|
||||
|
@ -149,40 +149,40 @@ ata_read:
|
|||
push rdx
|
||||
push rcx
|
||||
push rdi
|
||||
mov dx,1f6h ;Drive and head port
|
||||
mov al,0a0h ;Drive 0, head 0
|
||||
out dx,al
|
||||
mov dx, 0x1f6 ;Drive and head port
|
||||
mov al, 0x0a0 ;Drive 0, head 0
|
||||
out dx,al
|
||||
|
||||
mov dx,1f2h ;Sector count port
|
||||
mov al,1 ;Read one sector
|
||||
out dx,al
|
||||
mov dx, 0x1f2 ;Sector count port
|
||||
mov al, 1 ;Read one sector
|
||||
out dx, al
|
||||
|
||||
mov dx,1f3h ;Sector number port
|
||||
mov al,1 ;Read sector one
|
||||
out dx,al
|
||||
mov dx, 0x1f3 ;Sector number port
|
||||
mov al, 1 ;Read sector one
|
||||
out dx, al
|
||||
|
||||
mov dx,1f4h ;Cylinder low port
|
||||
mov al,0 ;Cylinder 0
|
||||
out dx,al
|
||||
mov dx, 0x1f4 ;Cylinder low port
|
||||
mov al, 0 ;Cylinder 0
|
||||
out dx, al
|
||||
|
||||
mov dx,1f5h ;Cylinder high port
|
||||
mov al,0 ;The rest of the cylinder 0
|
||||
out dx,al
|
||||
mov dx, 0x1f5 ;Cylinder high port
|
||||
mov al, 0 ;The rest of the cylinder 0
|
||||
out dx, al
|
||||
|
||||
mov dx,1f7h ;Command port
|
||||
mov al,20h ;Read with retry.
|
||||
out dx,al
|
||||
mov dx, 0x1f7 ;Command port
|
||||
mov al, 20 ;Read with retry.
|
||||
out dx, al
|
||||
still_going:
|
||||
in al,dx
|
||||
test al,8 ;This means the sector buffer requires
|
||||
;servicing.
|
||||
jz still_going ;Don't continue until the sector buffer
|
||||
;is ready.
|
||||
in al, dx
|
||||
test al, 8 ;This means the sector buffer requires
|
||||
;servicing.
|
||||
jz still_going ;Don't continue until the sector buffer
|
||||
;is ready.
|
||||
|
||||
mov cx,512/2 ;One sector /2
|
||||
mov rdi,buffer
|
||||
mov dx,1f0h ;Data port - data comes in and out of here.
|
||||
rep insw
|
||||
mov cx, 512/2 ;One sector /2
|
||||
mov rdi, buffer
|
||||
mov dx, 0x1f0 ;Data port - data comes in and out of here.
|
||||
rep insw
|
||||
pop rdi
|
||||
pop rcx
|
||||
pop rdx
|
||||
|
@ -195,5 +195,6 @@ still_going:
|
|||
mov esi, end
|
||||
call write
|
||||
ret
|
||||
|
||||
buffer: times 512 db "_"
|
||||
end: db "[End of Sector]", 0x0
|
||||
|
|
Loading…
Reference in New Issue