diff --git a/03_day/haribote.nas b/03_day/haribote.nas index 96ce171..9a3792c 100644 --- a/03_day/haribote.nas +++ b/03_day/haribote.nas @@ -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 \ No newline at end of file diff --git a/03_day/ipl10.nas b/03_day/ipl10.nas index deb1883..b72c70b 100644 --- a/03_day/ipl10.nas +++ b/03_day/ipl10.nas @@ -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"