mirror of
https://github.com/yourtion/30dayMakeOS.git
synced 2026-04-05 03:39:24 +08:00
装载haribote.sys
This commit is contained in:
@@ -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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user