Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- ; file: kostur.asm
- ; Kostur asemblerskog programa
- ;
- %include "asm_io.inc"
- segment .data
- segment .bss
- n1 resd 1
- n2 resd 1
- segment .text
- global asm_main
- asm_main:
- enter 0,0
- pusha
- mov eax,0
- call read_int
- mov [n1],eax
- call read_int
- mov [n2],eax
- mov ebx,[n1]
- petlja:
- cmp ebx,[n2]
- jb ovdje
- mov eax,ebx
- mov edx,7
- div edx
- cmp edx,0
- jne preskakat
- mov eax,ebx
- call print_int
- preskakat:
- add ebx,1
- jmp petlja
- ovdje:
- popa
- mov eax, 0
- leave
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement