diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8444cec --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.hrb diff --git a/27_day/Makefile b/27_day/Makefile index f1ed997..23e155c 100644 --- a/27_day/Makefile +++ b/27_day/Makefile @@ -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/ 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 = $(TOOLPATH)haribote/haribote.rul EDIMG = $(TOOLPATH)edimg.exe IMGTOL = $(TOOLPATH)imgtol.com -GOLIB = $(TOOLPATH)golib00.exe COPY = copy DEL = del -# ƒfƒtƒHƒ‹ƒg“®ì +#默认动作 default : - $(MAKE) img - -# ƒtƒ@ƒCƒ‹¶¬‹K‘¥ - -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 + $(MAKE) haribote.img -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 +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:ipl10.bin len:512 from:0 to:0 \ - copy from:haribote.sys to:@: \ - copy from:ipl10.nas to:@: \ + 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.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:@: \ + 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 -# ˆê”Ê‹K‘¥ - -%.gas : %.c bootpack.h apilib.h Makefile - $(CC1) -o $*.gas $*.c - -%.nas : %.gas Makefile - $(GAS2NASK) $*.gas $*.nas +#命令 -%.obj : %.nas Makefile - $(NASK) $*.nas $*.obj $*.lst +run : + $(MAKE) haribote.img + $(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin + $(MAKE) -C ../z_tools/qemu -# ƒRƒ}ƒ“ƒh +install : + $(MAKE) haribote.img + $(IMGTOL) w a: haribote.img -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 : - $(MAKE) img +run_full : + $(MAKE) full $(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin $(MAKE) -C ../z_tools/qemu -install : - $(MAKE) img +install_full : + $(MAKE) full $(IMGTOL) w a: haribote.img +run_os : + $(MAKE) -C haribote + $(MAKE) run + clean : - -$(DEL) *.bin - -$(DEL) *.lst - -$(DEL) *.obj - -$(DEL) *.map - -$(DEL) *.bim - -$(DEL) *.hrb - -$(DEL) haribote.sys - -$(DEL) apilib.lib +#ä¸æ‰§è¡Œä»»ä½•æ“作 src_only : $(MAKE) clean -$(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 diff --git a/27_day/a/!cons_9x.bat b/27_day/a/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/a/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/a/!cons_nt.bat b/27_day/a/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/a/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/a/Makefile b/27_day/a/Makefile new file mode 100644 index 0000000..674a683 --- /dev/null +++ b/27_day/a/Makefile @@ -0,0 +1,5 @@ +APP = a +STACK = 1k +MALLOC = 0k + +include ../app_make.txt diff --git a/27_day/a.c b/27_day/a/a.c similarity index 100% rename from 27_day/a.c rename to 27_day/a/a.c diff --git a/27_day/a/make.bat b/27_day/a/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/a/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/apilib/!cons_9x.bat b/27_day/apilib/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/apilib/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/apilib/!cons_nt.bat b/27_day/apilib/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/apilib/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/apilib/Makefile b/27_day/apilib/Makefile new file mode 100644 index 0000000..e93248b --- /dev/null +++ b/27_day/apilib/Makefile @@ -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 + +# ƒfƒtƒHƒ‹ƒg“®ì + +default : + $(MAKE) apilib.lib + +# ƒtƒ@ƒCƒ‹¶¬‹K‘¥ + +apilib.lib : Makefile $(OBJS_API) + $(GOLIB) $(OBJS_API) out:apilib.lib + +# ˆê”Ê‹K‘¥ + +%.obj : %.nas Makefile + $(NASK) $*.nas $*.obj $*.lst + +# ƒRƒ}ƒ“ƒh + +clean : + -$(DEL) *.lst + -$(DEL) *.obj + +src_only : + $(MAKE) clean + -$(DEL) apilib.lib diff --git a/27_day/api001.nas b/27_day/apilib/api001.nas similarity index 100% rename from 27_day/api001.nas rename to 27_day/apilib/api001.nas diff --git a/27_day/api002.nas b/27_day/apilib/api002.nas similarity index 100% rename from 27_day/api002.nas rename to 27_day/apilib/api002.nas diff --git a/27_day/api003.nas b/27_day/apilib/api003.nas similarity index 100% rename from 27_day/api003.nas rename to 27_day/apilib/api003.nas diff --git a/27_day/api004.nas b/27_day/apilib/api004.nas similarity index 100% rename from 27_day/api004.nas rename to 27_day/apilib/api004.nas diff --git a/27_day/api005.nas b/27_day/apilib/api005.nas similarity index 100% rename from 27_day/api005.nas rename to 27_day/apilib/api005.nas diff --git a/27_day/api006.nas b/27_day/apilib/api006.nas similarity index 100% rename from 27_day/api006.nas rename to 27_day/apilib/api006.nas diff --git a/27_day/api007.nas b/27_day/apilib/api007.nas similarity index 100% rename from 27_day/api007.nas rename to 27_day/apilib/api007.nas diff --git a/27_day/api008.nas b/27_day/apilib/api008.nas similarity index 100% rename from 27_day/api008.nas rename to 27_day/apilib/api008.nas diff --git a/27_day/api009.nas b/27_day/apilib/api009.nas similarity index 100% rename from 27_day/api009.nas rename to 27_day/apilib/api009.nas diff --git a/27_day/api010.nas b/27_day/apilib/api010.nas similarity index 100% rename from 27_day/api010.nas rename to 27_day/apilib/api010.nas diff --git a/27_day/api011.nas b/27_day/apilib/api011.nas similarity index 100% rename from 27_day/api011.nas rename to 27_day/apilib/api011.nas diff --git a/27_day/api012.nas b/27_day/apilib/api012.nas similarity index 100% rename from 27_day/api012.nas rename to 27_day/apilib/api012.nas diff --git a/27_day/api013.nas b/27_day/apilib/api013.nas similarity index 100% rename from 27_day/api013.nas rename to 27_day/apilib/api013.nas diff --git a/27_day/api014.nas b/27_day/apilib/api014.nas similarity index 100% rename from 27_day/api014.nas rename to 27_day/apilib/api014.nas diff --git a/27_day/api015.nas b/27_day/apilib/api015.nas similarity index 100% rename from 27_day/api015.nas rename to 27_day/apilib/api015.nas diff --git a/27_day/api016.nas b/27_day/apilib/api016.nas similarity index 100% rename from 27_day/api016.nas rename to 27_day/apilib/api016.nas diff --git a/27_day/api017.nas b/27_day/apilib/api017.nas similarity index 100% rename from 27_day/api017.nas rename to 27_day/apilib/api017.nas diff --git a/27_day/api018.nas b/27_day/apilib/api018.nas similarity index 100% rename from 27_day/api018.nas rename to 27_day/apilib/api018.nas diff --git a/27_day/api019.nas b/27_day/apilib/api019.nas similarity index 100% rename from 27_day/api019.nas rename to 27_day/apilib/api019.nas diff --git a/27_day/api020.nas b/27_day/apilib/api020.nas similarity index 100% rename from 27_day/api020.nas rename to 27_day/apilib/api020.nas diff --git a/27_day/apilib/apilib.lib b/27_day/apilib/apilib.lib new file mode 100644 index 0000000..29a8eee Binary files /dev/null and b/27_day/apilib/apilib.lib differ diff --git a/27_day/apilib/make.bat b/27_day/apilib/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/apilib/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/app_make.txt b/27_day/app_make.txt new file mode 100644 index 0000000..2bca4bc --- /dev/null +++ b/27_day/app_make.txt @@ -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 diff --git a/27_day/beepdown/!cons_9x.bat b/27_day/beepdown/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/beepdown/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/beepdown/!cons_nt.bat b/27_day/beepdown/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/beepdown/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/beepdown/Makefile b/27_day/beepdown/Makefile new file mode 100644 index 0000000..ffd14fa --- /dev/null +++ b/27_day/beepdown/Makefile @@ -0,0 +1,5 @@ +APP = beepdown +STACK = 1k +MALLOC = 40k + +include ../app_make.txt diff --git a/27_day/beepdown.c b/27_day/beepdown/beepdown.c similarity index 100% rename from 27_day/beepdown.c rename to 27_day/beepdown/beepdown.c diff --git a/27_day/beepdown/make.bat b/27_day/beepdown/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/beepdown/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/color/!cons_9x.bat b/27_day/color/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/color/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/color/!cons_nt.bat b/27_day/color/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/color/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/color/Makefile b/27_day/color/Makefile new file mode 100644 index 0000000..614dac9 --- /dev/null +++ b/27_day/color/Makefile @@ -0,0 +1,5 @@ +APP = color +STACK = 1k +MALLOC = 56k + +include ../app_make.txt diff --git a/27_day/color.c b/27_day/color/color.c similarity index 100% rename from 27_day/color.c rename to 27_day/color/color.c diff --git a/27_day/color/make.bat b/27_day/color/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/color/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/color2/!cons_9x.bat b/27_day/color2/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/color2/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/color2/!cons_nt.bat b/27_day/color2/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/color2/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/color2/Makefile b/27_day/color2/Makefile new file mode 100644 index 0000000..93b5f23 --- /dev/null +++ b/27_day/color2/Makefile @@ -0,0 +1,5 @@ +APP = color2 +STACK = 1k +MALLOC = 56k + +include ../app_make.txt diff --git a/27_day/color2.c b/27_day/color2/color2.c similarity index 100% rename from 27_day/color2.c rename to 27_day/color2/color2.c diff --git a/27_day/color2/make.bat b/27_day/color2/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/color2/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/haribote.rul b/27_day/haribote.rul new file mode 100644 index 0000000..ee8f67b --- /dev/null +++ b/27_day/haribote.rul @@ -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; diff --git a/27_day/haribote/!cons_9x.bat b/27_day/haribote/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/haribote/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/haribote/!cons_nt.bat b/27_day/haribote/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/haribote/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/haribote/Makefile b/27_day/haribote/Makefile new file mode 100644 index 0000000..b0ce461 --- /dev/null +++ b/27_day/haribote/Makefile @@ -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 diff --git a/27_day/asmhead.nas b/27_day/haribote/asmhead.nas similarity index 100% rename from 27_day/asmhead.nas rename to 27_day/haribote/asmhead.nas diff --git a/27_day/bootpack.c b/27_day/haribote/bootpack.c similarity index 100% rename from 27_day/bootpack.c rename to 27_day/haribote/bootpack.c diff --git a/27_day/bootpack.h b/27_day/haribote/bootpack.h similarity index 100% rename from 27_day/bootpack.h rename to 27_day/haribote/bootpack.h diff --git a/27_day/console.c b/27_day/haribote/console.c similarity index 100% rename from 27_day/console.c rename to 27_day/haribote/console.c diff --git a/27_day/dsctbl.c b/27_day/haribote/dsctbl.c similarity index 100% rename from 27_day/dsctbl.c rename to 27_day/haribote/dsctbl.c diff --git a/27_day/fifo.c b/27_day/haribote/fifo.c similarity index 100% rename from 27_day/fifo.c rename to 27_day/haribote/fifo.c diff --git a/27_day/file.c b/27_day/haribote/file.c similarity index 100% rename from 27_day/file.c rename to 27_day/haribote/file.c diff --git a/27_day/graphic.c b/27_day/haribote/graphic.c similarity index 100% rename from 27_day/graphic.c rename to 27_day/haribote/graphic.c diff --git a/27_day/hankaku.txt b/27_day/haribote/hankaku.txt similarity index 100% rename from 27_day/hankaku.txt rename to 27_day/haribote/hankaku.txt diff --git a/27_day/haribote/haribote.sys b/27_day/haribote/haribote.sys new file mode 100644 index 0000000..e098d2b Binary files /dev/null and b/27_day/haribote/haribote.sys differ diff --git a/27_day/int.c b/27_day/haribote/int.c similarity index 100% rename from 27_day/int.c rename to 27_day/haribote/int.c diff --git a/27_day/haribote/ipl10.bin b/27_day/haribote/ipl10.bin new file mode 100644 index 0000000..9ac675e Binary files /dev/null and b/27_day/haribote/ipl10.bin differ diff --git a/27_day/ipl10.nas b/27_day/haribote/ipl10.nas similarity index 100% rename from 27_day/ipl10.nas rename to 27_day/haribote/ipl10.nas diff --git a/27_day/keyboard.c b/27_day/haribote/keyboard.c similarity index 100% rename from 27_day/keyboard.c rename to 27_day/haribote/keyboard.c diff --git a/27_day/haribote/make.bat b/27_day/haribote/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/haribote/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/memory.c b/27_day/haribote/memory.c similarity index 100% rename from 27_day/memory.c rename to 27_day/haribote/memory.c diff --git a/27_day/mouse.c b/27_day/haribote/mouse.c similarity index 100% rename from 27_day/mouse.c rename to 27_day/haribote/mouse.c diff --git a/27_day/mtask.c b/27_day/haribote/mtask.c similarity index 100% rename from 27_day/mtask.c rename to 27_day/haribote/mtask.c diff --git a/27_day/naskfunc.nas b/27_day/haribote/naskfunc.nas similarity index 100% rename from 27_day/naskfunc.nas rename to 27_day/haribote/naskfunc.nas diff --git a/27_day/sheet.c b/27_day/haribote/sheet.c similarity index 100% rename from 27_day/sheet.c rename to 27_day/haribote/sheet.c diff --git a/27_day/timer.c b/27_day/haribote/timer.c similarity index 100% rename from 27_day/timer.c rename to 27_day/haribote/timer.c diff --git a/27_day/window.c b/27_day/haribote/window.c similarity index 100% rename from 27_day/window.c rename to 27_day/haribote/window.c diff --git a/27_day/hello3/!cons_9x.bat b/27_day/hello3/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/hello3/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/hello3/!cons_nt.bat b/27_day/hello3/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/hello3/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/hello3/Makefile b/27_day/hello3/Makefile new file mode 100644 index 0000000..436f686 --- /dev/null +++ b/27_day/hello3/Makefile @@ -0,0 +1,5 @@ +APP = hello3 +STACK = 1k +MALLOC = 0k + +include ../app_make.txt diff --git a/27_day/hello3.c b/27_day/hello3/hello3.c similarity index 100% rename from 27_day/hello3.c rename to 27_day/hello3/hello3.c diff --git a/27_day/hello3/make.bat b/27_day/hello3/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/hello3/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/hello4/!cons_9x.bat b/27_day/hello4/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/hello4/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/hello4/!cons_nt.bat b/27_day/hello4/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/hello4/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/hello4/Makefile b/27_day/hello4/Makefile new file mode 100644 index 0000000..f4cb8d2 --- /dev/null +++ b/27_day/hello4/Makefile @@ -0,0 +1,5 @@ +APP = hello4 +STACK = 1k +MALLOC = 0k + +include ../app_make.txt diff --git a/27_day/hello4.c b/27_day/hello4/hello4.c similarity index 100% rename from 27_day/hello4.c rename to 27_day/hello4/hello4.c diff --git a/27_day/hello4/make.bat b/27_day/hello4/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/hello4/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/hello5/!cons_9x.bat b/27_day/hello5/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/hello5/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/hello5/!cons_nt.bat b/27_day/hello5/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/hello5/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/hello5/Makefile b/27_day/hello5/Makefile new file mode 100644 index 0000000..366ff9d --- /dev/null +++ b/27_day/hello5/Makefile @@ -0,0 +1,5 @@ +APP = hello5 +STACK = 1k +MALLOC = 0k + +include ../app_make.txt diff --git a/27_day/hello5.nas b/27_day/hello5/hello5.nas similarity index 100% rename from 27_day/hello5.nas rename to 27_day/hello5/hello5.nas diff --git a/27_day/hello5/make.bat b/27_day/hello5/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/hello5/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/lines/!cons_9x.bat b/27_day/lines/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/lines/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/lines/!cons_nt.bat b/27_day/lines/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/lines/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/lines/Makefile b/27_day/lines/Makefile new file mode 100644 index 0000000..45a6aad --- /dev/null +++ b/27_day/lines/Makefile @@ -0,0 +1,5 @@ +APP = lines +STACK = 1k +MALLOC = 48k + +include ../app_make.txt diff --git a/27_day/lines.c b/27_day/lines/lines.c similarity index 100% rename from 27_day/lines.c rename to 27_day/lines/lines.c diff --git a/27_day/lines/make.bat b/27_day/lines/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/lines/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/noodle/!cons_9x.bat b/27_day/noodle/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/noodle/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/noodle/!cons_nt.bat b/27_day/noodle/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/noodle/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/noodle/Makefile b/27_day/noodle/Makefile new file mode 100644 index 0000000..6ec85b8 --- /dev/null +++ b/27_day/noodle/Makefile @@ -0,0 +1,5 @@ +APP = noodle +STACK = 1k +MALLOC = 40k + +include ../app_make.txt diff --git a/27_day/noodle/make.bat b/27_day/noodle/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/noodle/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/noodle.c b/27_day/noodle/noodle.c similarity index 100% rename from 27_day/noodle.c rename to 27_day/noodle/noodle.c diff --git a/27_day/star1/!cons_9x.bat b/27_day/star1/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/star1/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/star1/!cons_nt.bat b/27_day/star1/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/star1/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/star1/Makefile b/27_day/star1/Makefile new file mode 100644 index 0000000..ae4cd72 --- /dev/null +++ b/27_day/star1/Makefile @@ -0,0 +1,5 @@ +APP = star1 +STACK = 1k +MALLOC = 47k + +include ../app_make.txt diff --git a/27_day/star1/make.bat b/27_day/star1/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/star1/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/star1.c b/27_day/star1/star1.c similarity index 74% rename from 27_day/star1.c rename to 27_day/star1/star1.c index 6477c2a..93241a8 100644 --- a/27_day/star1.c +++ b/27_day/star1/star1.c @@ -9,5 +9,10 @@ void HariMain(void) win = api_openwin(buf, 150, 100, -1, "star1"); api_boxfilwin(win, 6, 26, 143, 93, 0);/*黑色*/ api_point(win, 75, 59, 3);/*黄色*/ + for (;;) { + if (api_getkey(1) == 0x0a) { + break; /*按下回车键则break; */ + } + } api_end(); } diff --git a/27_day/stars/!cons_9x.bat b/27_day/stars/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/stars/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/stars/!cons_nt.bat b/27_day/stars/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/stars/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/stars/Makefile b/27_day/stars/Makefile new file mode 100644 index 0000000..899cc8f --- /dev/null +++ b/27_day/stars/Makefile @@ -0,0 +1,5 @@ +APP = stars +STACK = 1k +MALLOC = 47k + +include ../app_make.txt diff --git a/27_day/stars/make.bat b/27_day/stars/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/stars/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/stars.c b/27_day/stars/stars.c similarity index 82% rename from 27_day/stars.c rename to 27_day/stars/stars.c index c8dae64..19c54e5 100644 --- a/27_day/stars.c +++ b/27_day/stars/stars.c @@ -15,5 +15,10 @@ void HariMain(void) y = (rand() % 67) + 26; api_point(win, x, y, 3);/*黄色*/ } + for (;;) { + if (api_getkey(1) == 0x0a) { + break; /*按下回车键则break; */ + } + } api_end(); } diff --git a/27_day/stars2/!cons_9x.bat b/27_day/stars2/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/stars2/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/stars2/!cons_nt.bat b/27_day/stars2/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/stars2/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/stars2/Makefile b/27_day/stars2/Makefile new file mode 100644 index 0000000..77c18cd --- /dev/null +++ b/27_day/stars2/Makefile @@ -0,0 +1,5 @@ +APP = stars2 +STACK = 1k +MALLOC = 47k + +include ../app_make.txt diff --git a/27_day/stars2/make.bat b/27_day/stars2/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/stars2/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/stars2.c b/27_day/stars2/stars2.c similarity index 83% rename from 27_day/stars2.c rename to 27_day/stars2/stars2.c index 11ec0e1..6c63c19 100644 --- a/27_day/stars2.c +++ b/27_day/stars2/stars2.c @@ -16,5 +16,10 @@ void HariMain(void) api_point(win + 1, x, y, 3);/*黄色*/ } api_refreshwin(win, 6, 26, 144, 94); + for (;;) { + if (api_getkey(1) == 0x0a) { + break; /*按下回车键则break; */ + } + } api_end(); } diff --git a/27_day/walk/!cons_9x.bat b/27_day/walk/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/walk/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/walk/!cons_nt.bat b/27_day/walk/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/walk/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/walk/Makefile b/27_day/walk/Makefile new file mode 100644 index 0000000..641c368 --- /dev/null +++ b/27_day/walk/Makefile @@ -0,0 +1,5 @@ +APP = walk +STACK = 1k +MALLOC = 48k + +include ../app_make.txt diff --git a/27_day/walk/make.bat b/27_day/walk/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/walk/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/walk.c b/27_day/walk/walk.c similarity index 100% rename from 27_day/walk.c rename to 27_day/walk/walk.c diff --git a/27_day/winhelo/!cons_9x.bat b/27_day/winhelo/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/winhelo/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/winhelo/!cons_nt.bat b/27_day/winhelo/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/winhelo/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/winhelo/Makefile b/27_day/winhelo/Makefile new file mode 100644 index 0000000..fe2c669 --- /dev/null +++ b/27_day/winhelo/Makefile @@ -0,0 +1,5 @@ +APP = winhelo +STACK = 1k +MALLOC = 0k + +include ../app_make.txt diff --git a/27_day/winhelo/make.bat b/27_day/winhelo/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/winhelo/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/winhelo.c b/27_day/winhelo/winhelo.c similarity index 60% rename from 27_day/winhelo.c rename to 27_day/winhelo/winhelo.c index a56225a..8059d36 100644 --- a/27_day/winhelo.c +++ b/27_day/winhelo/winhelo.c @@ -6,5 +6,10 @@ void HariMain(void) { int win; win = api_openwin(buf, 150, 50, -1, "hello"); + for (;;) { + if (api_getkey(1) == 0x0a) { + break; /*按下回车键则break; */ + } + } api_end(); } diff --git a/27_day/winhelo2/!cons_9x.bat b/27_day/winhelo2/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/winhelo2/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/winhelo2/!cons_nt.bat b/27_day/winhelo2/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/winhelo2/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/winhelo2/Makefile b/27_day/winhelo2/Makefile new file mode 100644 index 0000000..df62c78 --- /dev/null +++ b/27_day/winhelo2/Makefile @@ -0,0 +1,5 @@ +APP = winhelo2 +STACK = 1k +MALLOC = 0k + +include ../app_make.txt diff --git a/27_day/winhelo2/make.bat b/27_day/winhelo2/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/winhelo2/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/winhelo2.c b/27_day/winhelo2/winhelo2.c similarity index 73% rename from 27_day/winhelo2.c rename to 27_day/winhelo2/winhelo2.c index 3cf30c6..2937402 100644 --- a/27_day/winhelo2.c +++ b/27_day/winhelo2/winhelo2.c @@ -8,5 +8,10 @@ void HariMain(void) win = api_openwin(buf, 150, 50, -1, "hello"); api_boxfilwin(win, 8, 36, 141, 43, 3); /*黄色*/ api_putstrwin(win, 28, 28, 0 /*黑色*/, 12, "hello, world"); + for (;;) { + if (api_getkey(1) == 0x0a) { + break; /*按下回车键则break; */ + } + } api_end(); } diff --git a/27_day/winhelo3/!cons_9x.bat b/27_day/winhelo3/!cons_9x.bat new file mode 100644 index 0000000..e42252a --- /dev/null +++ b/27_day/winhelo3/!cons_9x.bat @@ -0,0 +1 @@ +command \ No newline at end of file diff --git a/27_day/winhelo3/!cons_nt.bat b/27_day/winhelo3/!cons_nt.bat new file mode 100644 index 0000000..6e07473 --- /dev/null +++ b/27_day/winhelo3/!cons_nt.bat @@ -0,0 +1 @@ +cmd.exe \ No newline at end of file diff --git a/27_day/winhelo3/Makefile b/27_day/winhelo3/Makefile new file mode 100644 index 0000000..719b23a --- /dev/null +++ b/27_day/winhelo3/Makefile @@ -0,0 +1,5 @@ +APP = winhelo3 +STACK = 1k +MALLOC = 40k + +include ../app_make.txt diff --git a/27_day/winhelo3/make.bat b/27_day/winhelo3/make.bat new file mode 100644 index 0000000..6b0dbfc --- /dev/null +++ b/27_day/winhelo3/make.bat @@ -0,0 +1 @@ +..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/27_day/winhelo3.c b/27_day/winhelo3/winhelo3.c similarity index 76% rename from 27_day/winhelo3.c rename to 27_day/winhelo3/winhelo3.c index 3eafc35..a1529e5 100644 --- a/27_day/winhelo3.c +++ b/27_day/winhelo3/winhelo3.c @@ -10,5 +10,10 @@ void HariMain(void) win = api_openwin(buf, 150, 50, -1, "hello"); api_boxfilwin(win, 8, 36, 141, 43, 6); /*æµ…è“色*/ api_putstrwin(win, 28, 28, 0 , 12, "hello, world");/*黑色*/ + for (;;) { + if (api_getkey(1) == 0x0a) { + break; /*按下回车键则break; */ + } + } api_end(); }