oldos/run.sh

37 lines
808 B
Bash
Raw Normal View History

#!/bin/bash
2023-04-29 14:51:06 +03:00
mkdir iso/
rm iso/os.bin
echo
echo
2023-04-29 14:51:06 +03:00
fasm bootloader.asm iso/os.bin
echo
2023-04-29 14:51:06 +03:00
fasm programs/calculator.asm iso/calc.bin
echo
2023-04-29 14:51:06 +03:00
# fasm programs/notepad.asm iso/notepad.bin
# echo
2023-04-29 14:51:06 +03:00
fasm programs/viewer.asm iso/viewer.bin
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