1

I am trying to learn x86_64 linux assembly. But I have annoying problem while trying to assemble the assembly code

Here's the program

section .data
    str db "12.3",0
section .text
global _start
_start:
    mov rax, 60
    mov rdi, 0
    syscall

While trying to assemble this program nasm gives the error

[heman-pc 13]# nasm -f elf64 1.asm
1.asm:2: error: comma, colon, decorator or end of line expected after operand

I am not able to figure out what is wrong with 2nd line

Hash
  • 556
  • 5
  • 17
  • 1
    `str` is being interpreted as an instruction ([Store Task Register](http://www.felixcloutier.com/x86/STR.html)). To avoid this place `:` after labels. Try `str:` – Michael Petch May 14 '18 at 03:51

0 Answers0