Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Program koji spaja dva stringa (konkatenacija stringova)
- # dmarjanovic
- .section .data
- str_1: .ascii "dragutin\0"
- str_2: .ascii "marjanovic\0"
- .section .text
- .globl main
- main:
- movl $0, %ebx
- movl $0, %esi
- for_str_1:
- cmpb $0, str_1(,%esi,1)
- je for_str_2
- incl %esi
- jmp for_str_1
- for_str_2:
- cmpb $0, str_2(,%ebx,1)
- je end
- movb str_2(,%ebx,1), %cl
- movb %cl, str_1(,%esi,1)
- incl %esi
- incl %ebx
- jmp for_str_2
- end:
- # Upisujemo kraj stringa
- movl $0, str_1(,%esi,1)
- movl $1, %eax
- int $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement