装载haribote.sys

This commit is contained in:
Yourtion
2014-09-05 17:25:31 +08:00
parent 9b8f03b501
commit 40fafb9b19
2 changed files with 16 additions and 6 deletions

View File

@@ -1,3 +1,11 @@
; haribote-os
; TAB=4
ORG 0xc200 ; 知道程序被装载到内存的地址
MOV AL,0x13 ; VGA显卡、320x200x8bit 彩色
MOV AH,0x00
INT 0x10
fin:
HLT
JMP fin
JMP fin

View File

@@ -77,11 +77,9 @@ next:
CMP CH,CYLS
JB readloop ; CH < CYLS 跳转到readloop
; 读取完毕,无其他指令进入休眠
fin:
HLT ; 让CPU停止等待指令
JMP fin ; 无限循环
; 读取完毕,跳转到haribote.sys执行
MOV [0x0ff0],CH ; IPLがどこまで読んだのかをメモ
JMP 0xc200
error:
MOV SI,msg
@@ -96,6 +94,10 @@ putloop:
INT 0x10 ; 调用显卡BIOS
JMP putloop
fin:
HLT ; 让CPU停止等待指令
JMP fin ; 无限循环
msg:
DB 0x0a, 0x0a ; 换行两次
DB "load error"