hi, i need a simple sample in AT&T syntax

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
shellex
Posts: 12
Joined: Sat Nov 17, 2007 8:35 am

hi, i need a simple sample in AT&T syntax

Post by shellex »

i use at&t asm to build my os . however, when i wanna jmp from real mode to protected mode,i meet a problem which i don't know how to do it .
and samples in forum or wiki are all intel Syntax that i have no ideas to translate to AT&T syntax.
so i wanna a simple sample in at&t syntax to describe procedure.
thx, and i am sorry for my poor english.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

It isn't very cryptic, and if you actually knew the syntax.. you wouldn't find it complicated to port Intel Syntax.

AT&T Syntax

Code: Select all

movl %cr0, %eax
or $0x1, %al
movl %eax, %cr0
Intel Syntax

Code: Select all

mov eax, cr0
or al, 1
mov cr0, eax
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

Opcode syntax has a lot of information on the differences between intel and AT&T syntax.
User avatar
shellex
Posts: 12
Joined: Sat Nov 17, 2007 8:35 am

Post by shellex »

e... in fact, i know some at&t syntax...but not be proficient.
i will try to do the translation, thx all
:)
Post Reply