Asembler x86/Funkcje/GNU AS: Różnice pomiędzy wersjami
Usunięta treść Dodana treść
zmiana wielkości liter |
zwiększenie czytelności kodu |
||
Linia 20:
# Wypisuje zawartość rejestru AL
.data
msg: .string "
.text
.
_start:
movb "A", %al
CALL printChar
movb "C", %al
CALL printChar
movb $0ah, %al
CALL printChar
# wyjście z programu
xorl %ebx, %ebx
int $80h
# KONIEC PROGRAMU
printChar:
movb ($msg), %al
movl $4, %eax
movl $1, %ebx
movl $msg, %ecx
movl $1, %edx
int $80h
# wyjście z podprogramu
ret
# KONIEC PODPROGRAMU
</source>
|