NASM - The Netwide Assembler
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Calendar
Login
Register
NASM - The Netwide Assembler
»
NASM Forum
»
Using NASM
»
Reserving memory for struct in bss
« previous
next »
Print
Pages: [
1
]
Author
Topic: Reserving memory for struct in bss (Read 15715 times)
nobody
Guest
Reserving memory for struct in bss
«
on:
March 12, 2009, 08:59:03 AM »
Hi,
Please could you help me how can I reserve memory for a struct in the bss section.
I f I add the code like this:
"
section .bss
myInstance istruc myStruct
"
than no memory is reserved I just got a label myInstance which reserves 0 bytes.
Thanks,
Csaba
Logged
nobody
Guest
Re: Reserving memory for struct in bss
«
Reply #1 on:
March 12, 2009, 11:42:26 AM »
section .bss
myinstance resb myStruct_size
That would be an instanciated, but uninitialized structure. "istruc" would be for an initialized one, and would want to be in a .data section.
Best,
Frank
Logged
nobody
Guest
Re: Reserving memory for struct in bss
«
Reply #2 on:
March 12, 2009, 11:54:20 AM »
Thanks, this works,
Csaba
Logged
Print
Pages: [
1
]
« previous
next »
NASM - The Netwide Assembler
»
NASM Forum
»
Using NASM
»
Reserving memory for struct in bss