Putting start-up assembly code in the beginning of the C file seems flaky. I’d rather put it in a separate file, prepend it with .section .startup and add a .startup section to the ldscript before .text:
.section .startup
.startup
.text
. = 0x0100; .startup : { KEEP(*(.startup)) }
Nice article though.
In 2008, I used gas to build a copy of the 31-byte DOS demo Klappquadrat using Debian (or maybe Ubuntu, I forget). That page and the related one about the 16-byte fr-016 may have useful information about how to get started doing this kind of thing, including how to use QEMU to debug.
Putting start-up assembly code in the beginning of the C file seems flaky. I’d rather put it in a separate file, prepend it with
.section .startupand add a.startupsection to the ldscript before.text:Nice article though.
In 2008, I used gas to build a copy of the 31-byte DOS demo Klappquadrat using Debian (or maybe Ubuntu, I forget). That page and the related one about the 16-byte fr-016 may have useful information about how to get started doing this kind of thing, including how to use QEMU to debug.