clean files

This commit is contained in:
Yourtion
2016-05-19 13:07:37 +08:00
parent 633089d320
commit 9df2b90ad3
9 changed files with 2 additions and 145 deletions

View File

@@ -21,8 +21,7 @@ haribote.img : haribote/ipl20.bin haribote/haribote.sys Makefile \
lines/lines.hrb walk/walk.hrb noodle/noodle.hrb \
beepdown/beepdown.hrb color/color.hrb color2/color2.hrb \
sosu/sosu.hrb sosu2/sosu2.hrb sosu3/sosu3.hrb \
typeipl/typeipl.hrb type/type.hrb iroha/iroha.hrb \
chklang/chklang.hrb
type/type.hrb iroha/iroha.hrb chklang/chklang.hrb
$(EDIMG) imgin:../z_tools/fdimg0at.tek \
wbinimg src:haribote/ipl20.bin len:512 from:0 to:0 \
copy from:haribote/haribote.sys to:@: \
@@ -47,7 +46,6 @@ haribote.img : haribote/ipl20.bin haribote/haribote.sys Makefile \
copy from:sosu/sosu.hrb to:@: \
copy from:sosu2/sosu2.hrb to:@: \
copy from:sosu3/sosu3.hrb to:@: \
copy from:typeipl/typeipl.hrb to:@: \
copy from:type/type.hrb to:@: \
copy from:iroha/iroha.hrb to:@: \
copy from:chklang/chklang.hrb to:@: \
@@ -88,7 +86,6 @@ full :
$(MAKE) -C sosu
$(MAKE) -C sosu2
$(MAKE) -C sosu3
$(MAKE) -C typeipl
$(MAKE) -C type
$(MAKE) -C iroha
$(MAKE) -C chklang
@@ -136,7 +133,6 @@ clean_full :
$(MAKE) -C sosu clean
$(MAKE) -C sosu2 clean
$(MAKE) -C sosu3 clean
$(MAKE) -C typeipl clean
$(MAKE) -C type clean
$(MAKE) -C iroha clean
$(MAKE) -C chklang clean
@@ -163,7 +159,6 @@ src_only_full :
$(MAKE) -C sosu src_only
$(MAKE) -C sosu2 src_only
$(MAKE) -C sosu3 src_only
$(MAKE) -C typeipl src_only
$(MAKE) -C type src_only
$(MAKE) -C iroha src_only
$(MAKE) -C chklang src_only

View File

@@ -28,9 +28,6 @@ default :
# 镜像文件生成
ipl10.bin : ipl10.nas Makefile
$(NASK) ipl10.nas ipl10.bin ipl10.lst
ipl20.bin : ipl20.nas Makefile
$(NASK) ipl20.nas ipl20.bin ipl20.lst
@@ -78,6 +75,5 @@ clean :
src_only :
$(MAKE) clean
-$(DEL) ipl10.bin
-$(DEL) ipl20.bin
-$(DEL) haribote.sys

View File

@@ -1,109 +0,0 @@
; haribote-ipl
; TAB=4
CYLS EQU 10 ; 声明CYLS=10
ORG 0x7c00 ; 指明程序装载地址
; 标准FAT12格式软盘专用的代码 Stand FAT12 format floppy code
JMP entry
DB 0x90
DB "HARIBOTE" ; 启动扇区名称8字节
DW 512 ; 每个扇区sector大小必须512字节
DB 1 ; 簇cluster大小必须为1个扇区
DW 1 ; FAT起始位置一般为第一个扇区
DB 2 ; FAT个数必须为2
DW 224 ; 根目录大小一般为224项
DW 2880 ; 该磁盘大小必须为2880扇区1440*1024/512
DB 0xf0 ; 磁盘类型必须为0xf0
DW 9 ; FAT的长度必??9扇区
DW 18 ; 一个磁道track有几个扇区必须为18
DW 2 ; 磁头数(必??2
DD 0 ; 不使用分区必须是0
DD 2880 ; 重写一次磁盘大小
DB 0,0,0x29 ; 意义不明(固定)
DD 0xffffffff ; (可能是)卷标号码
DB "HARIBOTEOS " ; 磁盘的名称必须为11字?,不足填空格)
DB "FAT12 " ; 磁盘格式名称(必??8字?,不足填空格)
RESB 18 ; 先空出18字节
; 程序主体
entry:
MOV AX,0 ; 初始化寄存器
MOV SS,AX
MOV SP,0x7c00
MOV DS,AX
; 读取磁盘
MOV AX,0x0820
MOV ES,AX
MOV CH,0 ; 柱面0
MOV DH,0 ; 磁头0
MOV CL,2 ; 扇区2
readloop:
MOV SI,0 ; 记录失败次数寄存器
retry:
MOV AH,0x02 ; AH=0x02 : 读入磁盘
MOV AL,1 ; 1个扇区
MOV BX,0
MOV DL,0x00 ; A驱动器
INT 0x13 ; 调用磁盘BIOS
JNC next ; 没出错则跳转到fin
ADD SI,1 ; 往SI加1
CMP SI,5 ; 比较SI与5
JAE error ; SI >= 5 跳转到error
MOV AH,0x00
MOV DL,0x00 ; A驱动器
INT 0x13 ; 重置驱动器
JMP retry
next:
MOV AX,ES ; 把内存地址后移0x200512/16十六进制转换
ADD AX,0x0020
MOV ES,AX ; ADD ES,0x020因为没有ADD ES只能通过AX进行
ADD CL,1 ; 往CL里面加1
CMP CL,18 ; 比较CL与18
JBE readloop ; CL <= 18 跳转到readloop
MOV CL,1
ADD DH,1
CMP DH,2
JB readloop ; DH < 2 跳转到readloop
MOV DH,0
ADD CH,1
CMP CH,CYLS
JB readloop ; CH < CYLS 跳转到readloop
; 读取完毕跳转到haribote.sys执行
MOV [0x0ff0],CH ; IPLがどこまで読んだのかをメモ
JMP 0xc200
error:
MOV SI,msg
putloop:
MOV AL,[SI]
ADD SI,1 ; 给SI加1
CMP AL,0
JE fin
MOV AH,0x0e ; 显示一个文字
MOV BX,15 ; 指定字符颜色
INT 0x10 ; 调用显卡BIOS
JMP putloop
fin:
HLT ; 让CPU停止等待指令
JMP fin ; 无限循环
msg:
DB 0x0a, 0x0a ; 换行两次
DB "load error"
DB 0x0a ; 换行
DB 0
RESB 0x7dfe-$ ; 填写0x00直到0x001fe
DB 0x55, 0xaa

View File

@@ -1,7 +1,7 @@
; haribote-ipl
; TAB=4
CYLS EQU 10 ; どこまで読み込むか
CYLS EQU 20 ; どこまで読み込むか
ORG 0x7c00 ; このプログラムがどこに読み込まれるのか

View File

@@ -1 +0,0 @@
command

View File

@@ -1 +0,0 @@
cmd.exe

View File

@@ -1,5 +0,0 @@
APP = typeipl
STACK = 1k
MALLOC = 0k
include ../app_make.txt

View File

@@ -1 +0,0 @@
..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9

View File

@@ -1,17 +0,0 @@
#include "apilib.h"
void HariMain(void)
{
int fh;
char c;
fh = api_fopen("ipl10.nas");
if (fh != 0) {
for (;;) {
if (api_fread(&c, 1, fh) == 0) {
break;
}
api_putchar(c);
}
}
api_end();
}