I'm very new to assembly in fact I just started learning today and I am trying to figure out a way to change a value stored in .data to something else in the _start: area of the code. I have tried several ways to do this but I can't seem to figure it out. I do get 2 errors:
main.asm:5: warning: character constant too long
main.asm:5: error: invalid combination of opcode and operands
Code:
section .text
global _start
_start:
;where the issue starts
mov msg, 'Hello, world.' ; i want to change the value to hello world with a . instead of a !
mov edx, len ;message length
mov ecx, msg ;message to write
mov ebx, 1 ;stdout
mov eax, 4 ;system call number (sys_write)
int 0x80 ;call kernel
mov eax, 1 ;system call number (sys_exit)
int 0x80 ;call kernel
section .data
msg db 'Hello, world!',0xa ;The original string
len equ $ - msg ;string length