4 ms·
vga.asm copies bytes directly to video memory in a raw manner, once it's in VGA mode. It only uses BIOS to switch into VGA mode ("mov ax, 0x13" and then "int 1
by drivers99 12y ago
vga.asm copies bytes directly to video memory in a raw manner, once it's in VGA mode. It only uses BIOS to switch into VGA mode ("mov ax, 0x13" and then "int 10h"), and back to text mode before rebooting when you quit. It does use BIOS to read the keyboard. It also reads bytes from sectors of the disk using BIOS rather than the OS when it starts up. The sound is a beep created with raw "OUT" commands on the data ports (for the PC speaker presumably).
In other words, it's using BIOS for input, but not drawing.
- asveikau 12y agoticks() 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...
- danelectro 12y agoSeems 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.
- asveikau 12y agoThis 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.)