flat assembler
Message board for the users of flat assembler.

Index > Main > AT&T syntax help?

Author
Thread Post new topic Reply to topic
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
What do following AT&T-style commands mean?
Code:
movw (0xfff3), %ax
movb $0x00, (%bx,%di)
movw -3(%bx,%si), %ax
ljmp $0xe342, $0xebe0
jmp *-22(%bp,%di)
ljmp *-24(%bp,%si)
    


For what i could find, first 4 translate like that:
Code:
mov ax,word [0fff3h]
mov byte [bx+di],0
mov ax,word [bx+si-3]
jmp 0e342h:0ebe0h
    

But i'm not sure since i can't find anything definitive on that syntax, nor have any idea what the last two jmp's mean.

Help please?
Post 22 Apr 2010, 14:40
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17271
Location: In your JS exploiting you and your system
revolution
I guess:
Code:
jmp near[bp+di-22]
jmp far[bp+si-24]    
Post 22 Apr 2010, 14:47
View user's profile Send private message Visit poster's website Reply with quote
Artlav



Joined: 23 Dec 2004
Posts: 188
Location: Moscow, Russia
Artlav
That worked, thank you.
Post 22 Apr 2010, 16:03
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17271
Location: In your JS exploiting you and your system
revolution
This "jmp 0e342h:0ebe0h" may be the opposite "jmp 0ebe0h:0e342h"? Best if you check it thoroughly.
Post 22 Apr 2010, 16:05
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
Artlav,

Sun's x86 Assembly Language Reference Manual is my source of information about as AT&T syntax, yet it lacks ljmp mnemonic Wink. Older Solaris 2.5 manual contains it. ljmp $0xe342, $0xebe0 is jmp 0e342h:0ebe0h, that's correct.
Post 22 Apr 2010, 16:36
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
AT&T syntax is the reason why C exists...
it was so boring to code with that they prefered invent a HLL. Laughing
Post 22 Apr 2010, 17:58
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
It seems people often can't understand AT&T, but here's a trick that may help:

Code:
c:\tmp>djgpp
4.42

c:\tmp [ DJGPP ] >as artlav.s

c:\tmp [ DJGPP ] >objdump -d -M intel a.out

a.out:     file format coff-go32


Disassembly of section .text:

00000000 <.text>:
   0:   66 a1 f3 ff 00 00       mov    ax,ds:0xfff3
   6:   67 c6 01 00             addr16 mov BYTE PTR [bx+di],0x0
   a:   67 66 8b 40 fd          addr16 mov ax,WORD PTR [bx+si-0x3]
   f:   ea e0 eb 00 00 42 e3    jmp    0xe342:0xebe0
  16:   67 ff 63 ea             addr16 jmp DWORD PTR [bp+di-0x16]
  1a:   67 ff 6a e8             addr16 jmp FWORD PTR [bp+si-0x18]
  1e:   90                      nop
  1f:   90                      nop
    
Post 22 Apr 2010, 21:03
View user's profile Send private message Visit poster's website 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.

Powered by rwasa.