| | |
newb and nasm
Thread Solved |
•
•
Join Date: Oct 2006
Posts: 1
Reputation:
Solved Threads: 0
Hi, i'm currently learning assembly with the nasm assembler and i'm stuck trying to get a memory address into a register. Here is what I have:
I read the nasm manual and it appear that both instructions should work but they don't. With lea si stays at 0, with mov si gets the wrong address What exactly am I doing wrong here??
Assembly Syntax (Toggle Plain Text)
[bits 32] [org 100h] section .data msg db "Hello", 0 section .text mov si, [msg] ;lea si, [msg] ret
•
•
Join Date: Dec 2006
Posts: 1
Reputation:
Solved Threads: 1
•
•
•
•
Hi, i'm currently learning assembly with the nasm assembler and i'm stuck trying to get a memory address into a register. Here is what I have:
I read the nasm manual and it appear that both instructions should work but they don't. With lea si stays at 0, with mov si gets the wrong address What exactly am I doing wrong here??Assembly Syntax (Toggle Plain Text)
[bits 32] [org 100h] section .data msg db "Hello", 0 section .text mov si, [msg] ;lea si, [msg] ret
to get address of msg into si.
[msg] refers to the content of msg not its address.
![]() |
Similar Threads
- Nasm for 64 bit programming (Assembly)
- Vesa in nasm (Assembly)
- Newb!! (Community Introductions)
- Nasm to tasm code help (Assembly)
- Please help ! A newb needs help with apache ! (Linux Servers and Apache)
Other Threads in the Assembly Forum
- Previous Thread: sort program assembly
- Next Thread: Converting C to MIPS(SPIM)
| Thread Tools | Search this Thread |





