forked from mig-hub/mikeOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildwin.bat
37 lines (29 loc) · 839 Bytes
/
buildwin.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@echo off
echo Build script for Windows
echo.
echo Assembling bootloader...
cd source\bootload
nasm -O0 -f bin -o bootload.bin bootload.asm
cd ..
echo Assembling MikeOS kernel...
nasm -O0 -f bin -o kernel.bin kernel.asm
echo Assembling programs...
cd ..\programs
for %%i in (*.asm) do nasm -O0 -fbin %%i
for %%i in (*.bin) do del %%i
for %%i in (*.) do ren %%i %%i.bin
cd ..
echo Adding bootsector to disk image...
cd disk_images
partcopy ..\source\bootload\bootload.bin 0 200 mikeos.flp 0
cd ..
echo Mounting disk image...
imdisk -a -f disk_images\mikeos.flp -s 1440K -m B:
echo Copying kernel and applications to disk image...
copy source\kernel.bin b:\
copy programs\*.bin b:\
copy programs\sample.pcx b:\
copy programs\*.bas b:\
echo Dismounting disk image...
imdisk -D -m B:
echo Done!