2023-03-15 00:59:50 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-04-29 14:51:06 +03:00
|
|
|
mkdir iso/
|
2023-03-15 00:59:50 +03:00
|
|
|
rm iso/os.bin
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo
|
2023-04-29 14:51:06 +03:00
|
|
|
fasm bootloader.asm iso/os.bin
|
2023-03-15 00:59:50 +03:00
|
|
|
echo
|
2023-04-29 14:51:06 +03:00
|
|
|
fasm programs/calculator.asm iso/calc.bin
|
2023-03-15 00:59:50 +03:00
|
|
|
echo
|
2023-04-29 14:51:06 +03:00
|
|
|
# fasm programs/notepad.asm iso/notepad.bin
|
2023-03-15 00:59:50 +03:00
|
|
|
# echo
|
2023-04-29 14:51:06 +03:00
|
|
|
fasm programs/viewer.asm iso/viewer.bin
|
2023-03-15 00:59:50 +03:00
|
|
|
echo
|
|
|
|
nasm -fbin programs/snake.asm -o iso/snake.bin
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
|
|
|
|
cd iso
|
|
|
|
|
|
|
|
rm boot.img
|
|
|
|
dd if=/dev/zero of=boot.img bs=1024 count=1440
|
|
|
|
dd if=os.bin of=boot.img conv=notrunc
|
|
|
|
dd if=calc.bin of=boot.img conv=notrunc bs=512 seek=16
|
|
|
|
# dd if=notepad.bin of=boot.img conv=notrunc bs=512 seek=17
|
|
|
|
dd if=viewer.bin of=boot.img conv=notrunc bs=512 seek=17
|
|
|
|
dd if=calc.bin of=boot.img bs=512 seek=19 conv=notrunc
|
|
|
|
dd if=snake.bin of=boot.img bs=512 seek=20 conv=notrunc
|
|
|
|
# dd if=just_text.t of=boot.img conv=notrunc bs=512 seek=23
|
|
|
|
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# qemu-system-i386 iso/os.bin
|
|
|
|
qemu-system-i386 -fda iso/boot.img
|