Per chi avrà problemi in futuro, inserisco qui il codice:
.data
welcome: .string "Inserisci stringa "
n_welcome = .-welcome
sms: .string "Stringa ribaltata "
n_sms = .-sms
str: .space 30 # Lunghezza stringa
n_str = .-str
new_line: .string "\n"
.text
.global main
main:
# STAMPO: "Inserisci stringa "
movl , %eax
movl , %ebx
movl $welcome, %ecx
movl $n_welcome, %edx
int Per chi avrà problemi in futuro, inserisco qui il codice:
.data
welcome: .string "Inserisci stringa "
n_welcome = .-welcome
sms: .string "Stringa ribaltata "
n_sms = .-sms
str: .space 30 # Lunghezza stringa
n_str = .-str
new_line: .string "\n"
.text
.global main
main:
# STAMPO: "Inserisci stringa "
movl , %eax
movl , %ebx
movl $welcome, %ecx
movl $n_welcome, %edx
int {parsed_message}x080
# LEGGO: str
movl , %eax
movl {parsed_message}, %ebx
movl $str, %ecx
movl $n_str, %edx
int {parsed_message}x080
# STAMPO: "Stringa ribaltata "
movl , %eax
movl , %ebx
movl $sms, %ecx
movl $n_sms, %edx
int {parsed_message}x080
# COPIO: lunghezza str nel registro ESI
movl $n_str, %esi
loop:
movl , %eax
movl , %ebx
movl $str, %ecx
addl %esi, %ecx
movl , %edx
int {parsed_message}x080
decl %esi
cmp $-1, %esi
jne loop
exit:
movl , %eax
movl , %ebx
movl $new_line, %ecx
movl , %edx
int {parsed_message}x080
movl , %eax
movl {parsed_message}, %ebx
int {parsed_message}x080
x080
# LEGGO: str
movl , %eax
movl Per chi avrà problemi in futuro, inserisco qui il codice:
.data
welcome: .string "Inserisci stringa "
n_welcome = .-welcome
sms: .string "Stringa ribaltata "
n_sms = .-sms
str: .space 30 # Lunghezza stringa
n_str = .-str
new_line: .string "\n"
.text
.global main
main:
# STAMPO: "Inserisci stringa "
movl , %eax
movl , %ebx
movl $welcome, %ecx
movl $n_welcome, %edx
int {parsed_message}x080
# LEGGO: str
movl , %eax
movl {parsed_message}, %ebx
movl $str, %ecx
movl $n_str, %edx
int {parsed_message}x080
# STAMPO: "Stringa ribaltata "
movl , %eax
movl , %ebx
movl $sms, %ecx
movl $n_sms, %edx
int {parsed_message}x080
# COPIO: lunghezza str nel registro ESI
movl $n_str, %esi
loop:
movl , %eax
movl , %ebx
movl $str, %ecx
addl %esi, %ecx
movl , %edx
int {parsed_message}x080
decl %esi
cmp $-1, %esi
jne loop
exit:
movl , %eax
movl , %ebx
movl $new_line, %ecx
movl , %edx
int {parsed_message}x080
movl , %eax
movl {parsed_message}, %ebx
int {parsed_message}x080
, %ebx
movl $str, %ecx
movl $n_str, %edx
int Per chi avrà problemi in futuro, inserisco qui il codice:
.data
welcome: .string "Inserisci stringa "
n_welcome = .-welcome
sms: .string "Stringa ribaltata "
n_sms = .-sms
str: .space 30 # Lunghezza stringa
n_str = .-str
new_line: .string "\n"
.text
.global main
main:
# STAMPO: "Inserisci stringa "
movl , %eax
movl , %ebx
movl $welcome, %ecx
movl $n_welcome, %edx
int {parsed_message}x080
# LEGGO: str
movl , %eax
movl {parsed_message}, %ebx
movl $str, %ecx
movl $n_str, %edx
int {parsed_message}x080
# STAMPO: "Stringa ribaltata "
movl , %eax
movl , %ebx
movl $sms, %ecx
movl $n_sms, %edx
int {parsed_message}x080
# COPIO: lunghezza str nel registro ESI
movl $n_str, %esi
loop:
movl , %eax
movl , %ebx
movl $str, %ecx
addl %esi, %ecx
movl , %edx
int {parsed_message}x080
decl %esi
cmp $-1, %esi
jne loop
exit:
movl , %eax
movl , %ebx
movl $new_line, %ecx
movl , %edx
int {parsed_message}x080
movl , %eax
movl {parsed_message}, %ebx
int {parsed_message}x080
x080
# STAMPO: "Stringa ribaltata "
movl , %eax
movl , %ebx
movl $sms, %ecx
movl $n_sms, %edx
int Per chi avrà problemi in futuro, inserisco qui il codice:
.data
welcome: .string "Inserisci stringa "
n_welcome = .-welcome
sms: .string "Stringa ribaltata "
n_sms = .-sms
str: .space 30 # Lunghezza stringa
n_str = .-str
new_line: .string "\n"
.text
.global main
main:
# STAMPO: "Inserisci stringa "
movl , %eax
movl , %ebx
movl $welcome, %ecx
movl $n_welcome, %edx
int {parsed_message}x080
# LEGGO: str
movl , %eax
movl {parsed_message}, %ebx
movl $str, %ecx
movl $n_str, %edx
int {parsed_message}x080
# STAMPO: "Stringa ribaltata "
movl , %eax
movl , %ebx
movl $sms, %ecx
movl $n_sms, %edx
int {parsed_message}x080
# COPIO: lunghezza str nel registro ESI
movl $n_str, %esi
loop:
movl , %eax
movl , %ebx
movl $str, %ecx
addl %esi, %ecx
movl , %edx
int {parsed_message}x080
decl %esi
cmp $-1, %esi
jne loop
exit:
movl , %eax
movl , %ebx
movl $new_line, %ecx
movl , %edx
int {parsed_message}x080
movl , %eax
movl {parsed_message}, %ebx
int {parsed_message}x080
x080
# COPIO: lunghezza str nel registro ESI
movl $n_str, %esi
loop:
movl , %eax
movl , %ebx
movl $str, %ecx
addl %esi, %ecx
movl , %edx
int Per chi avrà problemi in futuro, inserisco qui il codice:
.data
welcome: .string "Inserisci stringa "
n_welcome = .-welcome
sms: .string "Stringa ribaltata "
n_sms = .-sms
str: .space 30 # Lunghezza stringa
n_str = .-str
new_line: .string "\n"
.text
.global main
main:
# STAMPO: "Inserisci stringa "
movl , %eax
movl , %ebx
movl $welcome, %ecx
movl $n_welcome, %edx
int {parsed_message}x080
# LEGGO: str
movl , %eax
movl {parsed_message}, %ebx
movl $str, %ecx
movl $n_str, %edx
int {parsed_message}x080
# STAMPO: "Stringa ribaltata "
movl , %eax
movl , %ebx
movl $sms, %ecx
movl $n_sms, %edx
int {parsed_message}x080
# COPIO: lunghezza str nel registro ESI
movl $n_str, %esi
loop:
movl , %eax
movl , %ebx
movl $str, %ecx
addl %esi, %ecx
movl , %edx
int {parsed_message}x080
decl %esi
cmp $-1, %esi
jne loop
exit:
movl , %eax
movl , %ebx
movl $new_line, %ecx
movl , %edx
int {parsed_message}x080
movl , %eax
movl {parsed_message}, %ebx
int {parsed_message}x080
x080
decl %esi
cmp $-1, %esi
jne loop
exit:
movl , %eax
movl , %ebx
movl $new_line, %ecx
movl , %edx
int Per chi avrà problemi in futuro, inserisco qui il codice:
.data
welcome: .string "Inserisci stringa "
n_welcome = .-welcome
sms: .string "Stringa ribaltata "
n_sms = .-sms
str: .space 30 # Lunghezza stringa
n_str = .-str
new_line: .string "\n"
.text
.global main
main:
# STAMPO: "Inserisci stringa "
movl , %eax
movl , %ebx
movl $welcome, %ecx
movl $n_welcome, %edx
int {parsed_message}x080
# LEGGO: str
movl , %eax
movl {parsed_message}, %ebx
movl $str, %ecx
movl $n_str, %edx
int {parsed_message}x080
# STAMPO: "Stringa ribaltata "
movl , %eax
movl , %ebx
movl $sms, %ecx
movl $n_sms, %edx
int {parsed_message}x080
# COPIO: lunghezza str nel registro ESI
movl $n_str, %esi
loop:
movl , %eax
movl , %ebx
movl $str, %ecx
addl %esi, %ecx
movl , %edx
int {parsed_message}x080
decl %esi
cmp $-1, %esi
jne loop
exit:
movl , %eax
movl , %ebx
movl $new_line, %ecx
movl , %edx
int {parsed_message}x080
movl , %eax
movl {parsed_message}, %ebx
int {parsed_message}x080
x080
movl , %eax
movl Per chi avrà problemi in futuro, inserisco qui il codice:
.data
welcome: .string "Inserisci stringa "
n_welcome = .-welcome
sms: .string "Stringa ribaltata "
n_sms = .-sms
str: .space 30 # Lunghezza stringa
n_str = .-str
new_line: .string "\n"
.text
.global main
main:
# STAMPO: "Inserisci stringa "
movl , %eax
movl , %ebx
movl $welcome, %ecx
movl $n_welcome, %edx
int {parsed_message}x080
# LEGGO: str
movl , %eax
movl {parsed_message}, %ebx
movl $str, %ecx
movl $n_str, %edx
int {parsed_message}x080
# STAMPO: "Stringa ribaltata "
movl , %eax
movl , %ebx
movl $sms, %ecx
movl $n_sms, %edx
int {parsed_message}x080
# COPIO: lunghezza str nel registro ESI
movl $n_str, %esi
loop:
movl , %eax
movl , %ebx
movl $str, %ecx
addl %esi, %ecx
movl , %edx
int {parsed_message}x080
decl %esi
cmp $-1, %esi
jne loop
exit:
movl , %eax
movl , %ebx
movl $new_line, %ecx
movl , %edx
int {parsed_message}x080
movl , %eax
movl {parsed_message}, %ebx
int {parsed_message}x080
, %ebx
int Per chi avrà problemi in futuro, inserisco qui il codice:
.data
welcome: .string "Inserisci stringa "
n_welcome = .-welcome
sms: .string "Stringa ribaltata "
n_sms = .-sms
str: .space 30 # Lunghezza stringa
n_str = .-str
new_line: .string "\n"
.text
.global main
main:
# STAMPO: "Inserisci stringa "
movl , %eax
movl , %ebx
movl $welcome, %ecx
movl $n_welcome, %edx
int {parsed_message}x080
# LEGGO: str
movl , %eax
movl {parsed_message}, %ebx
movl $str, %ecx
movl $n_str, %edx
int {parsed_message}x080
# STAMPO: "Stringa ribaltata "
movl , %eax
movl , %ebx
movl $sms, %ecx
movl $n_sms, %edx
int {parsed_message}x080
# COPIO: lunghezza str nel registro ESI
movl $n_str, %esi
loop:
movl , %eax
movl , %ebx
movl $str, %ecx
addl %esi, %ecx
movl , %edx
int {parsed_message}x080
decl %esi
cmp $-1, %esi
jne loop
exit:
movl , %eax
movl , %ebx
movl $new_line, %ecx
movl , %edx
int {parsed_message}x080
movl , %eax
movl {parsed_message}, %ebx
int {parsed_message}x080
x080