Re:Floppy Bird: A Flappy Bird clone in 16-bit x86 assembly
by asveikau on Tuesday July 15, 2014 @06:36PM
(#8039545)
ticks() and sleep() also use BIOS. The author could have implemented this by handling IRQ 0. :-) Come to think of it handling the keyboard interrupts isn't that hard either...
Also looks like boot.asm uses the BIOS to read the rest of the program...
Re:Floppy Bird: A Flappy Bird clone in 16-bit x86 assembly
by danelectro on Wednesday July 16, 2014 @12:15AM
(#8040544)
Seems like if the "boot.asm" (actually sector 0 of the floppy) could be made relocatable away from sector0,
then it could still be functional when stored in a filesystem (including on a HDD) not unlike BOOTSECT.DOS.
The remainder of the floppy (sectors 1 through 16 proper) when copied to the same sectors (which are normally blank
and unused) on a MBR/BIOS style HDD work just the same as from floppy without having to be in a filesystem
themself.
Then you could easily chainload to Floppy Bird on a HDD from other bootloaders (like WinNT5 & NT6), with no changes to the main ASM program.
EDIT: the comments in boot.asm refer to sectors 1 & 2 since they are the first 2 sectors of the floppy, these two are officially numbered 0 & 1 in a disk editor or DD command.
Re:Floppy Bird: A Flappy Bird clone in 16-bit x86 assembly
by asveikau on Wednesday July 16, 2014 @01:03AM
(#8040656)
This stuff is kind of annoying to write. When I wrote stuff on raw metal (hobby OS kernel) I mainly just built an ELF file that GRUB can load. (Surprisingly easy to do.) Or, in days before that when I used more Microsoft stuff, a small .COM file where ms-dos or freedos is a glorified bootloader. (DOS is totally cool with a program hijacking everything.)
In other words, it's using BIOS for input, but not drawing.