summaryrefslogtreecommitdiffstats
path: root/bootsect.s
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2013-12-04 21:32:57 +0800
committerLAN-TW <lantw44@gmail.com>2013-12-04 21:32:57 +0800
commit209234c1e607ee307cfa9b776d487df40e1d0290 (patch)
treeaca81746f263d8e1f00a9b01f973795c967d18b8 /bootsect.s
parent6b105d56d80b0fbef5f9108f7c0063574febc4a9 (diff)
downloadyotos-master.tar
yotos-master.tar.gz
yotos-master.tar.bz2
yotos-master.tar.lz
yotos-master.tar.xz
yotos-master.tar.zst
yotos-master.zip
將所有 CRLF 替換成 LF (Unix 文字檔格式)HEADmaster
Diffstat (limited to 'bootsect.s')
-rw-r--r--bootsect.s108
1 files changed, 54 insertions, 54 deletions
diff --git a/bootsect.s b/bootsect.s
index 6d6e744..e2c05f2 100644
--- a/bootsect.s
+++ b/bootsect.s
@@ -1,54 +1,54 @@
- org 0x7c00 ; boot sector
-
-entry:
- ; now loading from disk
- mov cx, 3 ; retry count
- mov ax, 0x0000
- mov ds, ax
- mov ax, 0x9050
- mov es, ax ; set es, the destination
- mov bx, 0
-loaddisk:
- mov si, cx
- mov ah, 0x02 ; function: read disk sectors
- mov al, 16 ; sector count
- mov dh, 0 ; head
- mov dl, 0 ; drive number
- mov ch, 0 ; track
- mov cl, 2 ; sector offset
- int 0x13
- jnc loadok
- mov bl, al
- call putcharhex
- mov cx, si
- loop loaddisk
-
- ; load failed
- mov ah, 0x0e
- mov al, 'X'
- int 0x10
- jmp $
-
- ; load OK
-loadok:
- mov ah, 0x0e
- mov al, 'P'
- int 0x10
- mov al, 'R'
- int 0x10
- mov al, 'E'
- int 0x10
- mov al, 'Y'
- int 0x10
- mov al, 'O'
- int 0x10
- mov al, 'T'
- int 0x10
- mov ax, 0x9050
- mov ds, ax
- mov es, ax
- mov ss, ax
- db 0xEA
- dd 0x90500000
-
-%include "basic.s"
+ org 0x7c00 ; boot sector
+
+entry:
+ ; now loading from disk
+ mov cx, 3 ; retry count
+ mov ax, 0x0000
+ mov ds, ax
+ mov ax, 0x9050
+ mov es, ax ; set es, the destination
+ mov bx, 0
+loaddisk:
+ mov si, cx
+ mov ah, 0x02 ; function: read disk sectors
+ mov al, 16 ; sector count
+ mov dh, 0 ; head
+ mov dl, 0 ; drive number
+ mov ch, 0 ; track
+ mov cl, 2 ; sector offset
+ int 0x13
+ jnc loadok
+ mov bl, al
+ call putcharhex
+ mov cx, si
+ loop loaddisk
+
+ ; load failed
+ mov ah, 0x0e
+ mov al, 'X'
+ int 0x10
+ jmp $
+
+ ; load OK
+loadok:
+ mov ah, 0x0e
+ mov al, 'P'
+ int 0x10
+ mov al, 'R'
+ int 0x10
+ mov al, 'E'
+ int 0x10
+ mov al, 'Y'
+ int 0x10
+ mov al, 'O'
+ int 0x10
+ mov al, 'T'
+ int 0x10
+ mov ax, 0x9050
+ mov ds, ax
+ mov es, ax
+ mov ss, ax
+ db 0xEA
+ dd 0x90500000
+
+%include "basic.s"