Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Assembly notation #4

Open
rylev opened this issue Feb 2, 2016 · 1 comment
Open

Assembly notation #4

rylev opened this issue Feb 2, 2016 · 1 comment
Labels

Comments

@rylev
Copy link
Collaborator

rylev commented Feb 2, 2016

Which assembly notation should we use?

intermezzOS has used Intel notation so far because that's what nasm expects. However, some books prefer AT&T notation, and this is what objdump disassembles to by default. AT&T is a bit nosier than Intel, but it has (in my opinion) a nicer order of operands. For example, mov %eax, %ebx copies the contents of eax into ebx. The equivalent in Intel notation is mov ebx, eax.

@rylev rylev added the question label Feb 2, 2016
@steveklabnik
Copy link
Member

This is a good question. I've always been stuck, because I prefer the order of operands in AT&T, but prefer the non-sigils of Intel.

Rust's inline assembly uses AT&T, IIRC. So that might be a good tiebreaker.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants