Uff danke das hatte ich.. aber da wird nicht so viel on AT&T syntax gesprochen..... zum compilieren verwende ich NASM... und eine frage hab ich noch.,. ich versuche ein "hello world" in Intel zu schreiben.. ( Intel assembly ) geht aber nicht.. daher hab ich den syntax für linux gesucht und bin auf AT&R Assembly gekommen.. das ist aber schwerer als intel

also.. wisst ihr vielleicht wie man INTEL Assemble in linux schreiben kann ??
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
section .text ; Declara la seccion
global _start ; start para el ELF-Linker/Loader
_start: ; Start del programa
mov edx,len ; argumento 3, cuan largo es el texto
mov ecx,msg ; segundo argumento, Direccion del texto en memoria ?
mov ebx,1 ; Primer argumento, file handle stdout
mov eax,4 ; Llamada al systema Nr.4 = sys_write
int 0x80 ; llamando al kernel con arriba escritos parametros de
;llamada al systema
mov ebx,0 ; Primer argumento para sys_exit (termina el programa)
mov eax,1 ; LLamada al sistema Nr.1 (sys_exit) Termino del programa
int 0x80 ; llamando al kernel con arriba escritos parametros de
; LLamada al sistema
section .data ; Declara seccion
msg db 'Hello world',0x0A ; Nustro texto incluido Lineas LF (0x0A) <-no bien traducido
len equ $ - msg ; calcular Largo del texto (12 Bytes)
|
das da oben ist AT&T syntax... ist mir aber zu schwer.. und das hier unten ist INTEL :
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
.model tiny ;pequenio programa
.code ;empieza el codigo
org 100h ;creamos un COM <---- DOS ??
START: ;Label start
mov ah, 09h ;09h es la INT21h funcion para mostrar texto ?? <-- DOS ??
mov dx, offset HelloWorld ;Donde esta el texto...
INT 21h ;Lo escribe!
ENDE: ;Label ende
mov ah,4ch ;4Ch para terminar
INT 21h ;Termina !
HelloWorld db 'Hello World !!',10d,13d,'$' ;el string..
END START ;termina todo ??..
|
PS: Sorry hatte noch keine zeit und auf deutsch zu übersetzen.. aber ich hoffe der Code ist zu verstehen
ich will in linux INTEL ASsembly schreiben... hilf mir bitte