Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hello db [200]
- size dw 200
- pw dw 5000
- mov ax, [hello]
- mget bx, [size]
- add ax, bx
- dec ax
- mov bx, 1
- mset bl, ax
- mget cx, [pw]
- dec cx
- pow:
- call mul_2
- loop pow
- jmp exit
- mul_2 uses ax, cx, dx:
- mov cx, [hello]
- mget cx, [size]
- dec cx
- mov dx, 0
- lp:
- mov ax, 0
- mget al, cx
- mul ax, 5
- add ax, dx
- mset al, cx
- mov dx, ah
- loop lp
- ex:
- ret
- print:
- mov ax, [hello]
- print_loop:
- mget bh, ax
- cmp bh, 24h ; 24h - знак $
- jz print_loop_ex
- push bh
- int 6h
- inc ax
- mov dx, 100h
- jmp print_loop
- print_loop_ex:
- ret
- exit:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement