I'm kind of bored, and somewhat enjoy the restrictions of bootsector programming. On top of that, my laptop's current boot system is rather horrid in getting Windows Vista, Firebird (my OS), and Leopard 10.5.6 all working nicely with each other. So I decided to try writing an MBR just for the fun of it. It should, in theory, be easier than writing my FAT32 bootloader.
My current problem is this: I want to wait 3 seconds for the user to press F8, and if they do, I want to do one thing, but if not, I want to do something else. Unfortunately, a quick Google gave me "Halt the program X amount of time" or "Halt the program until a key is pressed." What's the easiest way to do this?
BIOS wait x time for keypress
- Firestryke31
- Member
- Posts: 550
- Joined: Sat Nov 29, 2008 1:07 pm
- Location: Throw a dart at central Texas
- Contact:
BIOS wait x time for keypress
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
Re: BIOS wait x time for keypress
INT 0x16h Function 0x01h - Check For Keystroke
INT 0x15h Function 0x86h - Wait
INT 0x15h Function 0x86h - Wait
- Firestryke31
- Member
- Posts: 550
- Joined: Sat Nov 29, 2008 1:07 pm
- Location: Throw a dart at central Texas
- Contact:
Re: BIOS wait x time for keypress
Thanks! I didn't notice the "Check for keypress" function in int 16h, and I thought I was probably going to have to use int 15h ah:86h in a loop. It's not as painful as I thought it would be...
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?