Compare commits

...

44 Commits

Author SHA1 Message Date
郭宇翔
9aa36a0f96 Merge pull request #26 from LJS08/patch-1
Fix: 翻译不完全04_day/asmhead.nas
2024-04-01 16:14:55 +08:00
LJS80
9bb71ea5ce Update asmhead.nas 2023-06-19 23:06:13 +08:00
郭宇翔
f8b2930281 Merge pull request #9 from sky5454/patch-2
Update README.md
2020-08-10 15:07:34 +08:00
郭宇翔
c462063e0b Update ipl10.nas
Fixed #10
2020-08-10 09:40:14 +08:00
郭宇翔
dade193e1f Update README.md 2020-08-10 09:36:42 +08:00
sky5454
670d454b4e Update README.md
Add HELP
2019-05-27 22:13:46 +08:00
郭宇翔
6ee187a190 Merge pull request #8 from sky5454/patch-1
Update helloos.nas
2019-05-26 23:29:22 +08:00
sky5454
7d59920a37 Update helloos.nas
修正:“必??”改为“必须是”,"字?"改为"字节"
不知道是不是仓库主人误操作,还是git的bug?
2019-05-26 21:48:38 +08:00
郭宇翔
b308a9e295 fix imgout BPB data error
fixed #3
2018-08-08 00:26:36 +08:00
Yourtion
a28136d3de bug fix 2016-05-31 18:13:22 +08:00
Yourtion
438eeb5135 Update README 2016-05-21 00:37:05 +08:00
Yourtion
d9d034cf43 update 2016-05-21 00:31:13 +08:00
Yourtion
c8be7ff36f update README 2016-05-21 00:30:29 +08:00
Yourtion
140774a293 bug fix 2016-05-21 00:24:41 +08:00
Yourtion
7c2fc66927 add screen 2016-05-20 15:28:31 +08:00
Yourtion
636c1a8c3d Update README 2016-05-20 15:16:20 +08:00
Yourtion
c177821913 整理 2016-05-20 14:56:29 +08:00
Yourtion
febac10ebf IPL的改良 2016-05-20 14:49:26 +08:00
Yourtion
0e31ff06ca bug fix 2016-05-20 14:27:07 +08:00
Yourtion
08d19d7512 图片阅览器 2016-05-20 14:05:13 +08:00
Yourtion
b2d31a8e54 MML播放器 2016-05-20 13:38:43 +08:00
Yourtion
72532c8cd7 文本阅览器 2016-05-20 12:03:41 +08:00
Yourtion
3871740126 命令行计算器 2016-05-20 11:01:41 +08:00
Yourtion
70b335278d bug fix 2016-05-20 10:54:34 +08:00
Yourtion
2c262f986d Add 30 day code 2016-05-20 10:44:09 +08:00
Yourtion
6b0457bed6 外星人游戏 2016-05-19 14:22:52 +08:00
Yourtion
0adab9385e bball 2016-05-19 14:13:37 +08:00
Yourtion
73b7421cf2 非矩形窗口 2016-05-19 14:08:59 +08:00
Yourtion
203dd63152 标准函数 2016-05-19 14:05:01 +08:00
Yourtion
9df2b90ad3 clean files 2016-05-19 13:07:37 +08:00
Yourtion
633089d320 文件压缩 2016-05-19 13:01:06 +08:00
Yourtion
41a0252634 修复bug 2016-05-19 12:27:28 +08:00
Yourtion
5a064e20c2 Add 29 day code 2016-05-19 12:27:14 +08:00
Yourtion
d925a8d992 update 2016-05-18 13:20:49 +08:00
Yourtion
7497159026 日文文字显示(3) 2016-05-18 13:19:01 +08:00
Yourtion
fcd87ee302 日文文字显示(2) 2016-05-18 12:58:00 +08:00
Yourtion
ac8b6b1411 日文文字显示(1) 2016-05-18 12:43:01 +08:00
Yourtion
86791cd7f4 命令行API 2016-05-18 11:41:34 +08:00
Yourtion
9231ce4a38 文件操作API 2016-05-18 11:31:29 +08:00
Yourtion
7b5d69c7c8 alloca(2) 2016-05-18 11:02:51 +08:00
Yourtion
1bcf500c14 bug fix 2016-05-18 10:54:21 +08:00
Yourtion
6bd4307e95 alloca(1) 2016-05-18 10:52:21 +08:00
Yourtion
c65ca780b3 Add 28 day code 2016-05-18 10:25:37 +08:00
Yourtion
f025b0083f 整理make环境 2016-05-17 13:30:27 +08:00
761 changed files with 37680 additions and 287 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
*.hrb
*.lst
*.map
*.bim
*.hrb

View File

@@ -12,15 +12,15 @@
DW 224 ; 根目录大小一般为224项 DW 224 ; 根目录大小一般为224项
DW 2880 ; 该磁盘大小必须为2880扇区1440*1024/512 DW 2880 ; 该磁盘大小必须为2880扇区1440*1024/512
DB 0xf0 ; 磁盘类型必须为0xf0 DB 0xf0 ; 磁盘类型必须为0xf0
DW 9 ; FAT的长度??9扇区 DW 9 ; FAT的长度须是9扇区
DW 18 ; 一个磁道track有几个扇区必须为18 DW 18 ; 一个磁道track有几个扇区必须为18
DW 2 ; 磁头数(必??2 DW 2 ; 磁头数(必须是2
DD 0 ; 不使用分区必须是0 DD 0 ; 不使用分区必须是0
DD 2880 ; 重写一次磁盘大小 DD 2880 ; 重写一次磁盘大小
DB 0,0,0x29 ; 意义不明(固定) DB 0,0,0x29 ; 意义不明(固定)
DD 0xffffffff ; (可能是)卷标号码 DD 0xffffffff ; (可能是)卷标号码
DB "HELLO-OS " ; 磁盘的名称必须为11字?,不足填空格) DB "HELLO-OS " ; 磁盘的名称必须为11字,不足填空格)
DB "FAT12 " ; 磁盘格式名称(必??8字?,不足填空格) DB "FAT12 " ; 磁盘格式名称(必须是8字,不足填空格)
RESB 18 ; 先空出18字节 RESB 18 ; 先空出18字节
; 程序主体 ; 程序主体
@@ -47,4 +47,4 @@
DB 0xf0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 DB 0xf0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00
RESB 4600 RESB 4600
DB 0xf0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 DB 0xf0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00
RESB 1469432 RESB 1469432

View File

@@ -6,7 +6,7 @@
; 标准FAT12格式软盘专用的代码 Stand FAT12 format floppy code ; 标准FAT12格式软盘专用的代码 Stand FAT12 format floppy code
JMP entry JMP entry
DB 0xeb, 0x4e, 0x90 DB 0x90
DB "HELLOIPL" ; 启动扇区名称8字节 DB "HELLOIPL" ; 启动扇区名称8字节
DW 512 ; 每个扇区sector大小必须512字节 DW 512 ; 每个扇区sector大小必须512字节
DB 1 ; 簇cluster大小必须为1个扇区 DB 1 ; 簇cluster大小必须为1个扇区

View File

@@ -53,7 +53,7 @@ retry:
MOV BX,0 MOV BX,0
MOV DL,0x00 ; A驱动器 MOV DL,0x00 ; A驱动器
INT 0x13 ; 调用磁盘BIOS INT 0x13 ; 调用磁盘BIOS
JNC next ; 没出错则跳转到fin JNC next ; 没出错则跳转到next
ADD SI,1 ; 往SI加1 ADD SI,1 ; 往SI加1
CMP SI,5 ; 比较SI与5 CMP SI,5 ; 比较SI与5
JAE error ; SI >= 5 跳转到error JAE error ; SI >= 5 跳转到error

View File

@@ -15,7 +15,7 @@ VRAM EQU 0x0ff8 ; 图像缓冲区的起始地址
ORG 0xc200 ; 这个的程序要被装载的内存地址 ORG 0xc200 ; 这个的程序要被装载的内存地址
; 画面モードを設定 ; 设置画面模式
MOV AL,0x13 ; VGA显卡320x200x8bit MOV AL,0x13 ; VGA显卡320x200x8bit
MOV AH,0x00 MOV AH,0x00

View File

@@ -1,234 +1,142 @@
OBJS_BOOTPACK = bootpack.obj naskfunc.obj hankaku.obj graphic.obj dsctbl.obj \
int.obj fifo.obj keyboard.obj mouse.obj memory.obj sheet.obj timer.obj \
mtask.obj window.obj console.obj file.obj
OBJS_API = api001.obj api002.obj api003.obj api004.obj api005.obj api006.obj \
api007.obj api008.obj api009.obj api010.obj api011.obj api012.obj \
api013.obj api014.obj api015.obj api016.obj api017.obj api018.obj \
api019.obj api020.obj
TOOLPATH = ../z_tools/ TOOLPATH = ../z_tools/
INCPATH = ../z_tools/haribote/ INCPATH = ../z_tools/haribote/
MAKE = $(TOOLPATH)make.exe -r MAKE = $(TOOLPATH)make.exe -r
NASK = $(TOOLPATH)nask.exe
CC1 = $(TOOLPATH)cc1.exe -I$(INCPATH) -Os -Wall -quiet
GAS2NASK = $(TOOLPATH)gas2nask.exe -a
OBJ2BIM = $(TOOLPATH)obj2bim.exe
MAKEFONT = $(TOOLPATH)makefont.exe
BIN2OBJ = $(TOOLPATH)bin2obj.exe
BIM2HRB = $(TOOLPATH)bim2hrb.exe
RULEFILE = $(TOOLPATH)haribote/haribote.rul
EDIMG = $(TOOLPATH)edimg.exe EDIMG = $(TOOLPATH)edimg.exe
IMGTOL = $(TOOLPATH)imgtol.com IMGTOL = $(TOOLPATH)imgtol.com
GOLIB = $(TOOLPATH)golib00.exe
COPY = copy COPY = copy
DEL = del DEL = del
# デフォルト動 #默认动
default : default :
$(MAKE) img
# ファイル生成規則
ipl10.bin : ipl10.nas Makefile
$(NASK) ipl10.nas ipl10.bin ipl10.lst
asmhead.bin : asmhead.nas Makefile
$(NASK) asmhead.nas asmhead.bin asmhead.lst
hankaku.bin : hankaku.txt Makefile
$(MAKEFONT) hankaku.txt hankaku.bin
hankaku.obj : hankaku.bin Makefile
$(BIN2OBJ) hankaku.bin hankaku.obj _hankaku
bootpack.bim : $(OBJS_BOOTPACK) Makefile
$(OBJ2BIM) @$(RULEFILE) out:bootpack.bim stack:3136k map:bootpack.map \
$(OBJS_BOOTPACK)
# 3MB+64KB=3136KB
bootpack.hrb : bootpack.bim Makefile
$(BIM2HRB) bootpack.bim bootpack.hrb 0
haribote.sys : asmhead.bin bootpack.hrb Makefile
copy /B asmhead.bin+bootpack.hrb haribote.sys
apilib.lib : Makefile $(OBJS_API)
$(GOLIB) $(OBJS_API) out:apilib.lib
a.bim : a.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:a.bim map:a.map a.obj apilib.lib
a.hrb : a.bim Makefile
$(BIM2HRB) a.bim a.hrb 0
hello3.bim : hello3.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:hello3.bim map:hello3.map hello3.obj apilib.lib
hello3.hrb : hello3.bim Makefile
$(BIM2HRB) hello3.bim hello3.hrb 0
hello4.bim : hello4.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:hello4.bim stack:1k map:hello4.map \
hello4.obj apilib.lib
hello4.hrb : hello4.bim Makefile
$(BIM2HRB) hello4.bim hello4.hrb 0
hello5.bim : hello5.obj Makefile
$(OBJ2BIM) @$(RULEFILE) out:hello5.bim stack:1k map:hello5.map hello5.obj
hello5.hrb : hello5.bim Makefile
$(BIM2HRB) hello5.bim hello5.hrb 0
winhelo.bim : winhelo.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:winhelo.bim stack:1k map:winhelo.map \
winhelo.obj apilib.lib
winhelo.hrb : winhelo.bim Makefile
$(BIM2HRB) winhelo.bim winhelo.hrb 0
winhelo2.bim : winhelo2.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:winhelo2.bim stack:1k map:winhelo2.map \
winhelo2.obj apilib.lib
winhelo2.hrb : winhelo2.bim Makefile
$(BIM2HRB) winhelo2.bim winhelo2.hrb 0
winhelo3.bim : winhelo3.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:winhelo3.bim stack:1k map:winhelo3.map \
winhelo3.obj apilib.lib
winhelo3.hrb : winhelo3.bim Makefile
$(BIM2HRB) winhelo3.bim winhelo3.hrb 40k
star1.bim : star1.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:star1.bim stack:1k map:star1.map \
star1.obj apilib.lib
star1.hrb : star1.bim Makefile
$(BIM2HRB) star1.bim star1.hrb 47k
stars.bim : stars.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:stars.bim stack:1k map:stars.map \
stars.obj apilib.lib
stars.hrb : stars.bim Makefile
$(BIM2HRB) stars.bim stars.hrb 47k
stars2.bim : stars2.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:stars2.bim stack:1k map:stars2.map \
stars2.obj apilib.lib
stars2.hrb : stars2.bim Makefile
$(BIM2HRB) stars2.bim stars2.hrb 47k
lines.bim : lines.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:lines.bim stack:1k map:lines.map \
lines.obj apilib.lib
lines.hrb : lines.bim Makefile
$(BIM2HRB) lines.bim lines.hrb 48k
walk.bim : walk.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:walk.bim stack:1k map:walk.map \
walk.obj apilib.lib
walk.hrb : walk.bim Makefile
$(BIM2HRB) walk.bim walk.hrb 48k
noodle.bim : noodle.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:noodle.bim stack:1k map:noodle.map \
noodle.obj apilib.lib
noodle.hrb : noodle.bim Makefile
$(BIM2HRB) noodle.bim noodle.hrb 40k
beepdown.bim : beepdown.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:beepdown.bim stack:1k map:beepdown.map \
beepdown.obj apilib.lib
beepdown.hrb : beepdown.bim Makefile
$(BIM2HRB) beepdown.bim beepdown.hrb 40k
color.bim : color.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:color.bim stack:1k map:color.map \
color.obj apilib.lib
color.hrb : color.bim Makefile
$(BIM2HRB) color.bim color.hrb 56k
color2.bim : color2.obj apilib.lib Makefile
$(OBJ2BIM) @$(RULEFILE) out:color2.bim stack:1k map:color2.map \
color2.obj apilib.lib
color2.hrb : color2.bim Makefile
$(BIM2HRB) color2.bim color2.hrb 56k
haribote.img : ipl10.bin haribote.sys Makefile \
a.hrb hello3.hrb hello4.hrb hello5.hrb winhelo.hrb winhelo2.hrb \
winhelo3.hrb star1.hrb stars.hrb stars2.hrb lines.hrb walk.hrb \
noodle.hrb beepdown.hrb color.hrb color2.hrb
$(EDIMG) imgin:../z_tools/fdimg0at.tek \
wbinimg src:ipl10.bin len:512 from:0 to:0 \
copy from:haribote.sys to:@: \
copy from:ipl10.nas to:@: \
copy from:make.bat to:@: \
copy from:a.hrb to:@: \
copy from:hello3.hrb to:@: \
copy from:hello4.hrb to:@: \
copy from:hello5.hrb to:@: \
copy from:winhelo.hrb to:@: \
copy from:winhelo2.hrb to:@: \
copy from:winhelo3.hrb to:@: \
copy from:star1.hrb to:@: \
copy from:stars.hrb to:@: \
copy from:stars2.hrb to:@: \
copy from:lines.hrb to:@: \
copy from:walk.hrb to:@: \
copy from:noodle.hrb to:@: \
copy from:beepdown.hrb to:@: \
copy from:color.hrb to:@: \
copy from:color2.hrb to:@: \
imgout:haribote.img
# 一般規則
%.gas : %.c bootpack.h apilib.h Makefile
$(CC1) -o $*.gas $*.c
%.nas : %.gas Makefile
$(GAS2NASK) $*.gas $*.nas
%.obj : %.nas Makefile
$(NASK) $*.nas $*.obj $*.lst
# コマンド
img :
$(MAKE) haribote.img $(MAKE) haribote.img
#文件生成规则
haribote.img : haribote/ipl10.bin haribote/haribote.sys Makefile \
a/a.hrb hello3/hello3.hrb hello4/hello4.hrb hello5/hello5.hrb \
winhelo/winhelo.hrb winhelo2/winhelo2.hrb winhelo3/winhelo3.hrb \
star1/star1.hrb stars/stars.hrb stars2/stars2.hrb \
lines/lines.hrb walk/walk.hrb noodle/noodle.hrb \
beepdown/beepdown.hrb color/color.hrb color2/color2.hrb
$(EDIMG) imgin:../z_tools/fdimg0at.tek \
wbinimg src:haribote/ipl10.bin len:512 from:0 to:0 \
copy from:haribote/haribote.sys to:@: \
copy from:haribote/ipl10.nas to:@: \
copy from:make.bat to:@: \
copy from:a/a.hrb to:@: \
copy from:hello3/hello3.hrb to:@: \
copy from:hello4/hello4.hrb to:@: \
copy from:hello5/hello5.hrb to:@: \
copy from:winhelo/winhelo.hrb to:@: \
copy from:winhelo2/winhelo2.hrb to:@: \
copy from:winhelo3/winhelo3.hrb to:@: \
copy from:star1/star1.hrb to:@: \
copy from:stars/stars.hrb to:@: \
copy from:stars2/stars2.hrb to:@: \
copy from:lines/lines.hrb to:@: \
copy from:walk/walk.hrb to:@: \
copy from:noodle/noodle.hrb to:@: \
copy from:beepdown/beepdown.hrb to:@: \
copy from:color/color.hrb to:@: \
copy from:color2/color2.hrb to:@: \
imgout:haribote.img
#命令
run : run :
$(MAKE) img $(MAKE) haribote.img
$(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin $(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin
$(MAKE) -C ../z_tools/qemu $(MAKE) -C ../z_tools/qemu
install : install :
$(MAKE) img $(MAKE) haribote.img
$(IMGTOL) w a: haribote.img $(IMGTOL) w a: haribote.img
full :
$(MAKE) -C haribote
$(MAKE) -C apilib
$(MAKE) -C a
$(MAKE) -C hello3
$(MAKE) -C hello4
$(MAKE) -C hello5
$(MAKE) -C winhelo
$(MAKE) -C winhelo2
$(MAKE) -C winhelo3
$(MAKE) -C star1
$(MAKE) -C stars
$(MAKE) -C stars2
$(MAKE) -C lines
$(MAKE) -C walk
$(MAKE) -C noodle
$(MAKE) -C beepdown
$(MAKE) -C color
$(MAKE) -C color2
$(MAKE) haribote.img
run_full :
$(MAKE) full
$(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin
$(MAKE) -C ../z_tools/qemu
install_full :
$(MAKE) full
$(IMGTOL) w a: haribote.img
run_os :
$(MAKE) -C haribote
$(MAKE) run
clean : clean :
-$(DEL) *.bin #不执行任何操作
-$(DEL) *.lst
-$(DEL) *.obj
-$(DEL) *.map
-$(DEL) *.bim
-$(DEL) *.hrb
-$(DEL) haribote.sys
-$(DEL) apilib.lib
src_only : src_only :
$(MAKE) clean $(MAKE) clean
-$(DEL) haribote.img -$(DEL) haribote.img
clean_full :
$(MAKE) -C haribote clean
$(MAKE) -C apilib clean
$(MAKE) -C a clean
$(MAKE) -C hello3 clean
$(MAKE) -C hello4 clean
$(MAKE) -C hello5 clean
$(MAKE) -C winhelo clean
$(MAKE) -C winhelo2 clean
$(MAKE) -C winhelo3 clean
$(MAKE) -C star1 clean
$(MAKE) -C stars clean
$(MAKE) -C stars2 clean
$(MAKE) -C lines clean
$(MAKE) -C walk clean
$(MAKE) -C noodle clean
$(MAKE) -C beepdown clean
$(MAKE) -C color clean
$(MAKE) -C color2 clean
src_only_full :
$(MAKE) -C haribote src_only
$(MAKE) -C apilib src_only
$(MAKE) -C a src_only
$(MAKE) -C hello3 src_only
$(MAKE) -C hello4 src_only
$(MAKE) -C hello5 src_only
$(MAKE) -C winhelo src_only
$(MAKE) -C winhelo2 src_only
$(MAKE) -C winhelo3 src_only
$(MAKE) -C star1 src_only
$(MAKE) -C stars src_only
$(MAKE) -C stars2 src_only
$(MAKE) -C lines src_only
$(MAKE) -C walk src_only
$(MAKE) -C noodle src_only
$(MAKE) -C beepdown src_only
$(MAKE) -C color src_only
$(MAKE) -C color2 src_only
-$(DEL) haribote.img
refresh :
$(MAKE) full
$(MAKE) clean_full
-$(DEL) haribote.img

1
27_day/a/!cons_9x.bat Normal file
View File

@@ -0,0 +1 @@
command

1
27_day/a/!cons_nt.bat Normal file
View File

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

5
27_day/a/Makefile Normal file
View File

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

1
27_day/a/make.bat Normal file
View File

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

View File

@@ -0,0 +1 @@
command

View File

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

47
27_day/apilib/Makefile Normal file
View File

@@ -0,0 +1,47 @@
OBJS_API = api001.obj api002.obj api003.obj api004.obj api005.obj api006.obj \
api007.obj api008.obj api009.obj api010.obj api011.obj api012.obj \
api013.obj api014.obj api015.obj api016.obj api017.obj api018.obj \
api019.obj api020.obj
TOOLPATH = ../../z_tools/
INCPATH = ../../z_tools/haribote/
MAKE = $(TOOLPATH)make.exe -r
NASK = $(TOOLPATH)nask.exe
CC1 = $(TOOLPATH)cc1.exe -I$(INCPATH) -Os -Wall -quiet
GAS2NASK = $(TOOLPATH)gas2nask.exe -a
OBJ2BIM = $(TOOLPATH)obj2bim.exe
MAKEFONT = $(TOOLPATH)makefont.exe
BIN2OBJ = $(TOOLPATH)bin2obj.exe
BIM2HRB = $(TOOLPATH)bim2hrb.exe
RULEFILE = ../haribote.rul
EDIMG = $(TOOLPATH)edimg.exe
IMGTOL = $(TOOLPATH)imgtol.com
GOLIB = $(TOOLPATH)golib00.exe
COPY = copy
DEL = del
#默认动作
default :
$(MAKE) apilib.lib
#库生成规则
apilib.lib : Makefile $(OBJS_API)
$(GOLIB) $(OBJS_API) out:apilib.lib
#文件生成规则
%.obj : %.nas Makefile
$(NASK) $*.nas $*.obj $*.lst
#命令
clean :
-$(DEL) *.lst
-$(DEL) *.obj
src_only :
$(MAKE) clean
-$(DEL) apilib.lib

1
27_day/apilib/make.bat Normal file
View File

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

79
27_day/app_make.txt Normal file
View File

@@ -0,0 +1,79 @@
TOOLPATH = ../../z_tools/
INCPATH = ../../z_tools/haribote/
APILIBPATH = ../apilib/
HARIBOTEPATH = ../haribote/
MAKE = $(TOOLPATH)make.exe -r
NASK = $(TOOLPATH)nask.exe
CC1 = $(TOOLPATH)cc1.exe -I$(INCPATH) -I../ -Os -Wall -quiet
GAS2NASK = $(TOOLPATH)gas2nask.exe -a
OBJ2BIM = $(TOOLPATH)obj2bim.exe
MAKEFONT = $(TOOLPATH)makefont.exe
BIN2OBJ = $(TOOLPATH)bin2obj.exe
BIM2HRB = $(TOOLPATH)bim2hrb.exe
RULEFILE = ../haribote.rul
EDIMG = $(TOOLPATH)edimg.exe
IMGTOL = $(TOOLPATH)imgtol.com
GOLIB = $(TOOLPATH)golib00.exe
COPY = copy
DEL = del
#默认动作
default :
$(MAKE) $(APP).hrb
#文件生成规则
$(APP).bim : $(APP).obj $(APILIBPATH)apilib.lib Makefile ../app_make.txt
$(OBJ2BIM) @$(RULEFILE) out:$(APP).bim map:$(APP).map stack:$(STACK) \
$(APP).obj $(APILIBPATH)apilib.lib
$(APP).hrb : $(APP).bim Makefile ../app_make.txt
$(BIM2HRB) $(APP).bim $(APP).hrb $(MALLOC)
haribote.img : ../haribote/ipl10.bin ../haribote/haribote.sys $(APP).hrb \
Makefile ../app_make.txt
$(EDIMG) imgin:../../z_tools/fdimg0at.tek \
wbinimg src:../haribote/ipl10.bin len:512 from:0 to:0 \
copy from:../haribote/haribote.sys to:@: \
copy from:$(APP).hrb to:@: \
imgout:haribote.img
#一般规则
%.gas : %.c ../apilib.h Makefile ../app_make.txt
$(CC1) -o $*.gas $*.c
%.nas : %.gas Makefile ../app_make.txt
$(GAS2NASK) $*.gas $*.nas
%.obj : %.nas Makefile ../app_make.txt
$(NASK) $*.nas $*.obj $*.lst
#命令
run :
$(MAKE) haribote.img
$(COPY) haribote.img ..\..\z_tools\qemu\fdimage0.bin
$(MAKE) -C ../../z_tools/qemu
full :
$(MAKE) -C $(APILIBPATH)
$(MAKE) $(APP).hrb
run_full :
$(MAKE) -C $(APILIBPATH)
$(MAKE) -C ../haribote
$(MAKE) run
clean :
-$(DEL) *.lst
-$(DEL) *.obj
-$(DEL) *.map
-$(DEL) *.bim
-$(DEL) haribote.img
src_only :
$(MAKE) clean
-$(DEL) $(APP).hrb

View File

@@ -0,0 +1 @@
command

View File

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

5
27_day/beepdown/Makefile Normal file
View File

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

1
27_day/beepdown/make.bat Normal file
View File

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

View File

@@ -0,0 +1 @@
command

View File

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

5
27_day/color/Makefile Normal file
View File

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

1
27_day/color/make.bat Normal file
View File

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

View File

@@ -0,0 +1 @@
command

View File

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

5
27_day/color2/Makefile Normal file
View File

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

1
27_day/color2/make.bat Normal file
View File

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

10
27_day/haribote.rul Normal file
View File

@@ -0,0 +1,10 @@
format:
code(align:1, logic:0x24, file:0x24);
data(align:4, logic:stack_end, file:code_end);
file:
../../z_tools/haribote/harilibc.lib;
../../z_tools/haribote/golibc.lib;
label:
_HariStartup;

View File

@@ -0,0 +1 @@
command

View File

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

79
27_day/haribote/Makefile Normal file
View File

@@ -0,0 +1,79 @@
OBJS_BOOTPACK = bootpack.obj naskfunc.obj hankaku.obj graphic.obj dsctbl.obj \
int.obj fifo.obj keyboard.obj mouse.obj memory.obj sheet.obj timer.obj \
mtask.obj window.obj console.obj file.obj
TOOLPATH = ../../z_tools/
INCPATH = ../../z_tools/haribote/
MAKE = $(TOOLPATH)make.exe -r
NASK = $(TOOLPATH)nask.exe
CC1 = $(TOOLPATH)cc1.exe -I$(INCPATH) -Os -Wall -quiet
GAS2NASK = $(TOOLPATH)gas2nask.exe -a
OBJ2BIM = $(TOOLPATH)obj2bim.exe
MAKEFONT = $(TOOLPATH)makefont.exe
BIN2OBJ = $(TOOLPATH)bin2obj.exe
BIM2HRB = $(TOOLPATH)bim2hrb.exe
RULEFILE = ../haribote.rul
EDIMG = $(TOOLPATH)edimg.exe
IMGTOL = $(TOOLPATH)imgtol.com
GOLIB = $(TOOLPATH)golib00.exe
COPY = copy
DEL = del
#默认动作
default :
$(MAKE) ipl10.bin
$(MAKE) haribote.sys
# 镜像文件生成
ipl10.bin : ipl10.nas Makefile
$(NASK) ipl10.nas ipl10.bin ipl10.lst
asmhead.bin : asmhead.nas Makefile
$(NASK) asmhead.nas asmhead.bin asmhead.lst
hankaku.bin : hankaku.txt Makefile
$(MAKEFONT) hankaku.txt hankaku.bin
hankaku.obj : hankaku.bin Makefile
$(BIN2OBJ) hankaku.bin hankaku.obj _hankaku
bootpack.bim : $(OBJS_BOOTPACK) Makefile
$(OBJ2BIM) @$(RULEFILE) out:bootpack.bim stack:3136k map:bootpack.map \
$(OBJS_BOOTPACK)
# 3MB+64KB=3136KB
bootpack.hrb : bootpack.bim Makefile
$(BIM2HRB) bootpack.bim bootpack.hrb 0
haribote.sys : asmhead.bin bootpack.hrb Makefile
copy /B asmhead.bin+bootpack.hrb haribote.sys
# 其他指令
%.gas : %.c bootpack.h Makefile
$(CC1) -o $*.gas $*.c
%.nas : %.gas Makefile
$(GAS2NASK) $*.gas $*.nas
%.obj : %.nas Makefile
$(NASK) $*.nas $*.obj $*.lst
# 运行程序
clean :
-$(DEL) asmhead.bin
-$(DEL) hankaku.bin
-$(DEL) *.lst
-$(DEL) *.obj
-$(DEL) *.map
-$(DEL) *.bim
-$(DEL) *.hrb
src_only :
$(MAKE) clean
-$(DEL) ipl10.bin
-$(DEL) haribote.sys

1
27_day/haribote/make.bat Normal file
View File

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

View File

@@ -0,0 +1 @@
command

View File

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

5
27_day/hello3/Makefile Normal file
View File

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

1
27_day/hello3/make.bat Normal file
View File

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

View File

@@ -0,0 +1 @@
command

View File

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

5
27_day/hello4/Makefile Normal file
View File

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

1
27_day/hello4/make.bat Normal file
View File

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

View File

@@ -0,0 +1 @@
command

View File

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

5
27_day/hello5/Makefile Normal file
View File

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

1
27_day/hello5/make.bat Normal file
View File

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

View File

@@ -0,0 +1 @@
command

View File

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

5
27_day/lines/Makefile Normal file
View File

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

1
27_day/lines/make.bat Normal file
View File

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

View File

@@ -0,0 +1 @@
command

View File

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

5
27_day/noodle/Makefile Normal file
View File

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

1
27_day/noodle/make.bat Normal file
View File

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

Some files were not shown because too many files have changed in this diff Show More