Farseer
Farseer

Reputation: 4172

Assembly NASM writing to reserved space

If I reserve some place for my use later on like this:

section .bss
LC1:
    RESB    256

How can I write characters or numbers there?

Upvotes: 1

Views: 1269

Answers (1)

Michael
Michael

Reputation: 58427

By enclosing the address in brackets. For example:

mov [LC1],eax       ; Store the value of eax at address LC1
mov byte [LC1+8],0  ; Store the 8-bit immediate 0 at address LC1+8

Refer to the NASM manual for further information (in particular section 3.3).

Upvotes: 2

Related Questions