Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .model tiny
- .code
- .startup
- Org 100h
- Jmp Short Start
- N Equ 3
- M Equ 2
- Matrix Dw 9, 0, 3
- Dw 0, 0, 6
- Vector DW N Dup (?)
- S Equ Type Matrix
- Vert Equ 0
- FormVector Proc
- Push Bp
- Mov Bp, Sp
- Push Cx
- Push Bx
- Push Dx
- Push Di
- Push Ax
- Mov Cx, [Bp + 4]
- Mov Bx, [Bp + 8]
- Mov Di, [Bp + 10]
- Mov Ax, S
- Mul Word Ptr [Bp + 4] ; 4 = ?? + ??
- Mov Si, Ax
- Rows: Xor Ax, Ax
- Push Cx
- Push Bx
- Mov Cx, [Bp + 6]
- Cols: Cmp [Bx], Word Ptr Vert
- Jne False
- Inc Ax
- False:
- Add Bx, Si
- Loop Cols
- Pop Bx
- Add Bx, S
- Mov [Di], Ax
- Pop Cx
- Add Di, S
- Loop Rows
- Pop Ax
- Pop Di
- Pop Dx
- Pop Bx
- Pop Cx
- Pop Bp
- Ret 2*4
- FormVector EndP
- Print Proc
- Push Bp
- Mov Bp, Sp
- Push Cx
- Push Bx
- Push Ax
- Mov Cx, [Bp + 4]
- Mov Bx, [Bp + 6]
- Pr: Mov Ax, [Bx]
- Add Bx, S
- Loop Pr
- Pop Ax
- Pop Bx
- Pop Cx
- Pop Bp
- Ret 2*2
- Print EndP
- Start:
- Lea Ax, Vector
- Push Ax
- Lea Ax, Matrix
- Push Ax
- Mov Ax, M
- Push Ax
- Mov Ax, N
- Push Ax
- Call FormVector
- Lea Ax, Vector
- Push Ax
- Mov Ax, N
- Push Ax
- Call Print
- .exit 0
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement