Message board for the users of flat assembler.
> Linux > 64-bit registers
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
segment readable executable
; mov rbx,msg
; mov rax,[rbx]
; inc rbx
; mov [rbx],rax
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' ?
|13 Jan 2007, 13:09||
You can't use 64-bit registers under 32-bit environment. The REX byte uses encodings that under 32-bit context are INCs and DECs.
|13 Jan 2007, 14:32||
Celeron D didn't have 64-bit GPRs, but maybe you mean SSE registers - there are used by SSE instructions.
|25 Jan 2007, 21:03||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar.
Powered by rwasa.