Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .section .data
- str_max = 40
- string1: .ascii "UNESITE IME I PREZIME:\0"
- str_len1 = . - string1
- string2: .fill str_max, 1,0
- string3: .ascii "VI STE:\0"
- str_len3 = . - string3
- .section .text
- .globl main
- main:
- movl $4, %eax
- movl $1, %ebx
- leal string1, %ecx
- movl $str_len1, %edx
- int $0x80
- movl $3, %eax
- movl $0, %ebx
- leal string2, %ecx
- movl $str_max, %edx
- int $0x80
- movl $string2,%eax
- petlja:
- cmpb $10,(%eax)
- je ispis
- cmpb $90,(%eax)
- jg zameni
- incl %eax
- jmp petlja
- zameni:
- subb $32, (%eax)
- jmp petlja
- ispis:
- movl $4, %eax
- movl $1, %ebx
- leal string3, %ecx
- movl $str_len3, %edx
- int $0x80
- movl $4, %eax
- movl $1, %ebx
- leal string2, %ecx
- movl $str_max, %edx
- int $0x80
- kraj:
- movl $1,%eax
- movl $0,%ebx
- int $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement