flat assembler
Message board for the users of flat assembler.

Index > Main > [solved] 64 bits error movabs

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
I read exist asm command movabs
Godbolt.org get in asm code movabs.

And this give:
movabs rdx,'012345678'

But fasm 1.73 get error illegal instruction


Last edited by Roman on 27 Aug 2020, 13:25; edited 1 time in total
Post 27 Aug 2020, 13:17
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17639
Location: In your JS exploiting you and your system
revolution
Is it in the Intel manual?
Post 27 Aug 2020, 13:19
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
Post 27 Aug 2020, 13:22
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17639
Location: In your JS exploiting you and your system
revolution
Is it in the Intel manual? Because stackexchange is not a source for Intel instructions.
Post 27 Aug 2020, 13:26
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
site godbolt.org
c++
long long fermat() {
long long a = 0xff00ff00ff00ff00;
return a;
}
Get x64 msvc 19 wine
Code:
mov     rax, -71777214294589696             ; ff00ff00ff00ff00H
        mov     QWORD PTR a$[rsp], rax
        mov     rax, QWORD PTR a$[rsp]
    

Get gcc compiler
Code:
movabs  rax, -71777214294589696     
    
Post 27 Aug 2020, 14:52
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17639
Location: In your JS exploiting you and your system
revolution
Is it in the Intel manual? It just looks like an ordinary mov.
Post 27 Aug 2020, 14:54
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
I think its some psevdo asm command.
And how i read movabs do usual mov
Post 27 Aug 2020, 15:05
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
When i see movabs i think do this:
Code:
movabs rdx,'01234567' ;this good for compare 8 text symbols !
cmp rdx,[Text]
jz .findText
    


Because i think movabs work like mov, but load in rdx 64 bits number
Post 27 Aug 2020, 15:07
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17639
Location: In your JS exploiting you and your system
revolution
And still the unanswered question: Is it in the Intel manual? Razz
Post 27 Aug 2020, 15:14
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
I dont know !
I only read about movabs and try to do this in Fasm.
Post 27 Aug 2020, 15:53
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1514
Furs
movabs is the 64-bit move. Just write:
Code:
mov rax, 0xc001c0dedeadbeef    
Post 27 Aug 2020, 19:24
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17639
Location: In your JS exploiting you and your system
revolution
Code:
movabs equ mov    
Fixed. Razz
Post 28 Aug 2020, 04:12
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3025
Location: vpcmipstrm
bitRAKE
FYI: https://gcc.godbolt.org/ supports the Intel compiler as well, called ICC in the dropdown. It'll save a lot of head bumping to see the correct instruction mnemonics.

https://gcc.godbolt.org/z/evMGqh
Post 28 Aug 2020, 13:21
View user's profile Send private message Visit poster's website Reply with quote
MaoKo



Joined: 07 May 2019
Posts: 56
Location: Paris/French
MaoKo
There is also a specific register to gnu as which is eiz. Eiz is not in the Intel man and it's equivalent to 0.
Code:
; as
lea 0x00(%esi,%eiz,0x01),%esi
; fasm
eiz equ 0x00
lea esi, dword [esi+eiz*0x01]
    
Post 28 Aug 2020, 19:10
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.