Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .data
- set: db 'X'
- unset: db ' '
- enter: db 0ah
- section .text
- global main
- main:
- mov rax,2
- call printTriangleL
- mov rax,3
- call printTriangleL
- mov rax,4
- call printTriangleL
- mov rax,5
- call printTriangleL
- mov rax,1
- call printTriangleL
- ret
- printTriangleL:
- ;w rax lezy rozmiar
- mov rbx,rax
- mov rax,1
- loop1:
- push rax
- push rbx
- loop2:
- push rax
- mov rax, 4
- mov rbx, 1
- mov rcx, set
- mov rdx, 1
- int 80h
- pop rax
- dec rax
- cmp rax,0
- jne loop2
- mov rax,4
- mov rbx,1
- mov rcx,enter
- mov rdx,1
- int 80h
- pop rbx
- pop rax
- inc rax
- cmp rax,rbx
- jbe loop1
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement