Smallest Executable to write "Hello World" to the screen

Started by Prince Wotoshi, November 01, 2008, 08:09:19 PM

Previous topic - Next topic

Antariy


dedndave

QuoteYou're right. I had the idea that with the AT segment there is no risk that a linker adds 256 null- bytes to "fill" the gap, but this isn't necessary. Also, some linkers won't accept an AT segment in a group.

yes - that may happen if you stuck anything more than a label there
over the years, using different versions of different assemblers...
you can sometimes get away with DW ? - sometimes not
ORG xx LABEL DWORD or ORG xx BranchLabel: always seem to work

the only time i have used SEGMENT AT is when i wanted to access the interrupt vector table (even then it isn't needed)
or when writing ROMable code
it matters if you want to generate proper segment values in far addresses

as i said, it isn't needed when accessing the IVT, because i generally do not access that memory in 0000:0000 context
rather, i use something like XOR AX,AX - MOV DS,AX - then access the vector offsets