'How to rewrite [es:di] to att syntax
This is a short question but I did not manage to find the answer online.
How do you rewrite mov [es:di], dl into AT&T syntax?
I use it to write a pixel to the screen in real mode.
Solution 1:[1]
mov %dl, %es:(%di):
In the AT&T Syntax, memory is referenced in the following way:
segment-override:signed-offset(base,index,scale)
parts of which can be omitted depending on the address you want.
%es:100(%eax,%ebx,2)
A corresponding Intel syntax indirect memory reference:
segment-override:[base + index*scale + signed-offset]
es:[eax + ebx*2 + 100]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ernie Sanderson |
