Re: Buffers in Assembly (NASM)



On Sat, 19 Jul 2008 02:18:33 -0500, ArarghMail807NOSPAM
<spamtrap@xxxxxxxxxx> wrote:

On Fri, 18 Jul 2008 19:34:08 -0700 (PDT), "bwaichu@xxxxxxxxx"
<spamtrap@xxxxxxxxxx> 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:

The bss section is by definition not initialized by the program, so
you have to clear it yourself.

Not familiar with NASM or its linker, but with MASM32 and the standard
PE linker the BSS section (called .data? in MASM) is automatically
zeroed. In this section you can not specify a fill value, you must
use ? or MASM reports an error, but when the app runs that section is
always filled with zeros.

Best regards,


Bob Masta

DAQARTA v4.00
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Sound Level Meter
FREE Signal Generator
Science with your sound card!

.



Relevant Pages

  • Re: Buffers in Assembly (NASM)
    ... can create a zero filled buffer in the bss section in NASM with this: ... The bss section is by definition not initialized by the program, ... Not familiar with NASM or its linker, but with MASM32 and the standard ... so windows must have zeroed it out. ...
    (comp.lang.asm.x86)
  • Re: Buffers in Assembly (NASM)
    ... can create a zero filled buffer in the bss section in NASM with this: ... The bss section is by definition not initialized by the program, ... Not familiar with NASM or its linker, but with MASM32 and the standard ... PE linker the BSS section (called .data? ...
    (comp.lang.asm.x86)
  • Re: Blueflops ate my X
    ... .bss section. ... dos, or of a "dos box" started raising an "illegal operation" in ... I suspect that this may affect some of the "asmutils" utilities, ... But marking the ".text" section "write" (which the friendly Nasm manual says works) still segfaults! ...
    (alt.lang.asm)
  • Re: NASM pe segfaults, RosAsm dissassembles the PE and runs it without segfaulting
    ... I see no .BSS sections in the PEView. ... Now suddenly I have a segfault in rosasm as well, ... The funny thing is that this particular code sequence executes correctly in the NASM version. ...
    (alt.lang.asm)
  • Re: Buffers in Assembly (NASM)
    ... it doesn't know what ".bss" means. ... In other formats, this will ... Nasm to zero it. ... I'm basically just creating a buffer to write strings for functions ...
    (comp.lang.asm.x86)