Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #make_COM#
- org 100h
- jmp start:
- MSG db 'German Volf is creator of this programm.', 13, 10
- db 'My task:', 13, 10
- db 'I need to create cycle for filling array, composed of 10 elements (squares of natural numbers) size 1 byte.', '$'
- start: lea DX, MSG
- mov AH, 9h
- int 21h
- ;mov AH, 4Ch
- ;int 21h
- .data
- mass db 0ah,0bh, 'Array - ', '$'
- text db 13, 10, 'Output is in ASCII code. Look at the ASCII table of the characters.', '$'
- mas db 10 dup (?)
- .code
- main:
- mov ax,@data
- mov cx, 10
- mov BP, 2
- mov bx, 0
- mov al, 2
- mov ah, 2
- mul ah
- go:
- mov mas[bx], al
- inc BP
- mov ax, BP
- mov ah, al
- mul ah
- inc bx
- loop go
- show_mass:
- mov cx, 10
- mov bx, 0
- mov AH, 9h
- lea DX, mass
- int 21h
- show:
- mov AH, 2h
- mov dl, mas[bx]
- add dl, 30h
- int 21h
- inc bx
- loop show
- mov AH, 9h
- lea DX, text
- int 21h
- exit:
- mov AX, 4Ch
- int 21h
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement