?? compile.bat
字號(hào):
###################################################################################
# 文件說(shuō)明:pyos 執(zhí)行總編譯文件
# 作者:謝煜波
# xieyubo@126.com
###################################################################################
# 先編譯幾個(gè)匯編文件
nasm source_code/boot.asm -o out/boot.bin
nasm source_code/setup.asm -o out/setup.bin
nasm -f elf source_code/kernel.asm -o out/kernel.asmo
nasm -f elf source_code/interrupt.asm -o out/interrupt.asmo
nasm -f elf source_code/mouse.asm -o out/mouse.asmo
nasm -f elf source_code/keyboard.asm -o out/keyboard.asmo
# 使用 gcc 編譯內(nèi)核文件
gcc -fpack-struct -std=c99 -c source_code/kernel.c -o out/kernel.o
gcc -fpack-struct -std=c99 -c source_code/system.c -o out/system.o
gcc -fpack-struct -std=c99 -c source_code/vesa.c -o out/vesa.o
gcc -fpack-struct -std=c99 -c source_code/io.c -o out/io.o
gcc -fpack-struct -std=c99 -c source_code/interrupt.c -o out/interrupt.o
gcc -fpack-struct -std=c99 -c source_code/mouse.c -o out/mouse.o
gcc -fpack-struct -std=c99 -c source_code/keyboard.c -o out/keyboard.o
gcc -fpack-struct -std=c99 -c source_code/message.c -o out/message.o
# 鏈接內(nèi)核
ld -o out/kernel.ld -Ttext 0x90000 -e main out/kernel.asmo out/kernel.o out/system.o out/vesa.o out/io.o out/interrupt.o out/interrupt.asmo out/keyboard.o out/keyboard.asmo out/message.o out/mouse.o out/mouse.asmo
# 去掉 ld 產(chǎn)生的不需要的段,得到純機(jī)器碼的二進(jìn)制文件
objcopy -R .note -R .comment -S -O binary out/kernel.ld out/kernel.bin
# 制作內(nèi)核映象文件
g++ additional/make_pyos_kernel/make_pyos_kernel.cpp -o out/make_pyos_kernel.exe
chmod 755 out/make_pyos_kernel.exe
out/make_pyos_kernel.exe final/pyos.img out/boot.bin out/setup.bin out/kernel.bin
# 制作字庫(kù)
g++ additional/make_font/make_font.cpp -o out/make_font.exe
chmod 755 out/make_font.exe
out/make_font.exe resource/asc16 resource/en.fong resource/hzk16f resource/ch.font
# 加入圖片及字庫(kù)文件
g++ additional/make_together/make_together.cpp -o out/make_together.exe
chmod 755 out/make_together.exe
out/make_together.exe final/pyos.img 36864 resource/login_1.bmp # 起始( 0.2 )
out/make_together.exe final/pyos.img 101376 resource/login_2.bmp # 起始 1.5 ( 1 磁頭 5 磁道 )
out/make_together.exe final/pyos.img 165888 resource/normal_cursor.bmp # 起始 0.9 ( 0 磁頭 9 磁道 )
out/make_together.exe final/pyos.img 169984 resource/down_cursor.bmp
out/make_together.exe final/pyos.img 174080 resource/hold_down_cursor.bmp
out/make_together.exe final/pyos.img 178176 resource/empty.bmp
out/make_together.exe final/pyos.img 182272 resource/full.bmp
out/make_together.exe final/pyos.img 186368 resource/wall.bmp
out/make_together.exe final/pyos.img 190464 resource/my_ball.bmp
out/make_together.exe final/pyos.img 194560 resource/people.bmp
out/make_together.exe final/pyos.img 202752 resource/ch.font # 中文字庫(kù)( 0.11.1 )
out/make_together.exe final/pyos.img 203264 resource/en.font # 英文字庫(kù)( 0.11.2 )
out/make_together.exe final/pyos.img 211968 resource/bomb.bmp # 應(yīng)用程序圖標(biāo)( 1.11 )
out/make_together.exe final/pyos.img 248832 resource/logout.bmp # 應(yīng)用程序圖標(biāo)( 1.13 )
out/make_together.exe final/pyos.img 304128 resource/top.bmp # 應(yīng)用程序圖標(biāo)( 1.16 )
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -