From 9722e907912faade407d881a3a5a89306e721f56 Mon Sep 17 00:00:00 2001 From: Yourtion Date: Fri, 5 Sep 2014 16:52:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=95=9C=E5=83=8F=E5=86=85?= =?UTF-8?q?=E5=AE=B9harinote.sys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 03_day/Makefile | 14 +++++++++----- 03_day/haribote.nas | 3 +++ 03_day/ipl.nas | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 03_day/haribote.nas diff --git a/03_day/Makefile b/03_day/Makefile index 47dc03a..da19e27 100644 --- a/03_day/Makefile +++ b/03_day/Makefile @@ -16,15 +16,17 @@ default : ipl.bin : ipl.nas Makefile $(NASK) ipl.nas ipl.bin ipl.lst -haribote.img : ipl.bin Makefile +haribote.sys : haribote.nas Makefile + $(NASK) haribote.nas haribote.sys haribote.lst + +haribote.img : ipl.bin haribote.sys Makefile $(EDIMG) imgin:../z_tools/fdimg0at.tek \ - wbinimg src:ipl.bin len:512 from:0 to:0 imgout:haribote.img + wbinimg src:ipl.bin len:512 from:0 to:0 \ + copy from:haribote.sys to:@: \ + imgout:haribote.img # 其他指令 -asm : - $(MAKE) ipl.bin - img : $(MAKE) haribote.img @@ -40,6 +42,8 @@ install : clean : -$(DEL) ipl.bin -$(DEL) ipl.lst + -$(DEL) haribote.sys + -$(DEL) haribote.lst src_only : $(MAKE) clean diff --git a/03_day/haribote.nas b/03_day/haribote.nas new file mode 100644 index 0000000..96ce171 --- /dev/null +++ b/03_day/haribote.nas @@ -0,0 +1,3 @@ +fin: + HLT + JMP fin diff --git a/03_day/ipl.nas b/03_day/ipl.nas index c88e0e1..deb1883 100644 --- a/03_day/ipl.nas +++ b/03_day/ipl.nas @@ -53,7 +53,7 @@ retry: MOV BX,0 MOV DL,0x00 ; A驱动器 INT 0x13 ; 调用磁盘BIOS - JNC fin ; 没出错则跳转到fin + JNC next ; 没出错则跳转到fin ADD SI,1 ; 往SI加1 CMP SI,5 ; 比较SI与5 JAE error ; SI >= 5 跳转到error