Hi. I want to use 64-bit registers (processor: Intel Celeron D) under 32-bit
Linux. So I wrote program listed below, compiled and launched:
format ELF executable
entry start
use64
segment readable executable
start:
; mov rbx,msg
; mov rax,[rbx]
; inc rbx
; mov [rbx],rax
mov eax,4
mov ebx,1
mov ecx,msg
mov edx,msg_size
int 0x80
mov eax,1
xor ebx,ebx
int 0x80
segment readable writeable
msg db 'HelloWorld',0xA
msg_size = $-msg
The result was 'HelloWorld'. OK. But try to omit every semicolon, compile
and launch again. 'HFellWorld' will appear on the screen. Why it's not 'HHelloWord' ?
|