简体   繁体   中英

Call another assembly file from bootloader

I haven't been able to fix this problem.

I developed a bootloader using NASM for X86 using this tutorial as reference: http://fisnikhasani.com/building-your-own-bootloader/

Using the command:

nasm -f bin boot.asm -o boot.bin

I was able to run my bootloader called boot.bin on a usb key.

However I also developed a Pacman game using x86 assembly called pacman.asm. I want to be able to boot into the bootloader and play the pacman game.

However I have not idea how to run the pacman.asm file once my usb key with the boot.bin file is connected and booted.

Any help is appreciated.

if you use windows then this worked for me:

type into you command line:

copy /b bootldr.bin + pacman.bin myGame.img

this will copy bootloader.bin and then it puts pacman.bin at the end of the bootloader and stores the end result in MyGame.img

you dont have to use .img or .bin

then you load the pacman game into memory and do a far jump
and now you can play your game :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM