On Sat, 15 Mar 2008 22:02:10 GMT, I waved a wand and this message
magically appears in front of Frank Kotler:
> > I've just noticed that when I use buffers in my COM executables,
> > they take up space, leading to wasted space when stored. From what I
> > remember years ago that there were ways of reducing the footprint
> > the executables takes up on storage media by allocating from
> > elsewhere. How?
>
> Well... assuming we're talking about "dos .com" and not Common Object
> Module "COM" (thanks a pantload, Microsoft!), and assuming we're
> talking about Nasm, put your uninitialized data in "section .bss",
> and use "resb/w/d/q/t/o". Fasm uses "rb", etc. but I don't know how
> to tell it "section .bss" - just put it at the end, I guess - that's
> all Nasm does with it. (there are no "segments" in a .com file, it's
> all just laid out flat - Nasm puts ".data" after ".text" and ".bss"
> at the end - it doesn't really "exist", Nasm just defines labels
> in .bss).
Ah, thanks I know what the error I've made - I did put all my
uninitialised data in the .bss section, but forgotten all about the
resb/d/q/t/o - I've been using db/w... Excellent, I'll save a lot of
space!
--
http://www.munted.org.uk
Fearsome grindings.


|