|
|
|
all : image
|
|
|
|
|
|
|
|
compile :
|
|
|
|
nasm -f bin -o boot.bin boot.asm
|
|
|
|
nasm -f bin -o program.bin program.asm
|
|
|
|
nasm -f bin -o software.bin software.asm
|
|
|
|
nasm -f bin -o food.bin food.asm
|
|
|
|
nasm -f bin -o beep.bin beep.asm
|
|
|
|
nasm -f bin -o voice.bin voice.asm
|
|
|
|
nasm -f bin -o silence.bin silence.asm
|
|
|
|
nasm -f bin -o light.bin light.asm
|
|
|
|
# nasm -f bin -o program2.bin program2.asm
|
|
|
|
|
|
|
|
|
|
|
|
image : compile
|
|
|
|
sudo dd if=/dev/zero of=disk.img bs=1024 count=720
|
|
|
|
#cat boot.bin program.bin > exe.bin
|
|
|
|
sudo dd if=boot.bin of=disk.img bs=512 count=1 conv=notrunc
|
|
|
|
sudo dd if=program.bin of=disk.img bs=512 seek=1 count=4 conv=notrunc
|
|
|
|
sudo dd if=software.bin of=disk.img bs=512 seek=5 count=1 conv=notrunc
|
|
|
|
sudo dd if=food.bin of=disk.img bs=512 seek=6 count=1 conv=notrunc
|
|
|
|
sudo dd if=beep.bin of=disk.img bs=512 seek=7 count=1 conv=notrunc
|
|
|
|
sudo dd if=voice.bin of=disk.img bs=512 seek=8 count=1 conv=notrunc
|
|
|
|
sudo dd if=silence.bin of=disk.img bs=512 seek=9 count=1 conv=notrunc
|
|
|
|
sudo dd if=light.bin of=disk.img bs=512 seek=10 count=1 conv=notrunc
|
|
|
|
|
|
|
|
|
|
|
|
flashusb : image
|
|
|
|
sudo dd if=boot.bin of=/dev/sdb bs=512 count=1
|
|
|
|
sudo dd if=program.bin of=/dev/sdb bs=512 seek=1 count=4
|
|
|
|
sudo dd if=software.bin of=/dev/sdb bs=512 seek=5 count=1
|
|
|
|
sudo dd if=food.bin of=/dev/sdb bs=512 seek=6 count=1
|
|
|
|
sudo dd if=beep.bin of=/dev/sdb bs=512 seek=7 count=1
|
|
|
|
sudo dd if=voice.bin of=/dev/sdb bs=512 seek=8 count=1
|
|
|
|
sudo dd if=silence.bin of=/dev/sdb bs=512 seek=9 count=1
|
|
|
|
sudo dd if=light.bin of=/dev/sdb bs=512 seek=10 count=1
|
|
|
|
# sudo dd if=exe.bin of=/dev/sdb bs=512 count=4
|
|
|
|
|
|
|
|
|
|
|
|
run : image
|
|
|
|
qemu-system-x86_64 disk.img -soundhw pcspk
|
|
|
|
|
|
|
|
clean :
|
|
|
|
rm *.img
|
|
|
|
rm *.bin
|
|
|
|
|