Re: Buffers in Assembly (NASM)
- From: "bwaichu@xxxxxxxxx" <spamtrap@xxxxxxxxxx>
- Date: Sat, 19 Jul 2008 09:56:35 -0700 (PDT)
On Jul 19, 9:28 am, Frank Kotler <spamt...@xxxxxxxxxx> wrote:
bwai...@xxxxxxxxx wrote:
I'm trying to better understand data structures in assembly. I know I
can create a zero filled buffer in the bss section in NASM with this:
buffer: times 64 db 0
Hi Brian,
Well... In -f obj (OMF) output format, Nasm will tolerate this - since
it doesn't know what ".bss" means. In (all?) other formats, this will
generate a warning (64 of 'em, actually) "attempt to initialize memory
in a nobits section: ignored". In an uninitialized (.bss) section,
there's "nothing there", so it would be "conceptually impossible" for
Nasm to zero it. That would be the right way to do it in an initialized
(.data) section.
The is correct. A typo on my part; belongs to the data section.
I am assembling the file on windows since my only *nix box is 64 bit,
and I'm curious about 32 bit asm on windows. Where can I get more
information on the obj (OMF) format since that is what I am using
before using alink to link the file to a PE file? And how do I debug
the program in ollydbg if I don't break the program into sections?
I'm basically just creating a buffer to write strings for functions
like snprintf, so that I can write output to a messageboxa. My goal
is to understand both ways of creating a buffer, so that I have more
flexibility.
Thanks,
Brian
.
- Follow-Ups:
- Re: Buffers in Assembly (NASM)
- From: Frank Kotler
- Re: Buffers in Assembly (NASM)
- From: H. Peter Anvin
- Re: Buffers in Assembly (NASM)
- References:
- Buffers in Assembly (NASM)
- From: bwaichu@xxxxxxxxx
- Re: Buffers in Assembly (NASM)
- From: Frank Kotler
- Buffers in Assembly (NASM)
- Prev by Date: Re: Buffers in Assembly (NASM)
- Next by Date: Re: Buffers in Assembly (NASM)
- Previous by thread: Re: Buffers in Assembly (NASM)
- Next by thread: Re: Buffers in Assembly (NASM)
- Index(es):
Relevant Pages
|