Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 256
- mov ax, 0x0013
- int 0x10
- push array ; Matrix data
- push 50 ; Matrix x
- push 40 ; Matrix y
- push 20 ; Matrix width
- push 20 ; Matrix height
- call print_matr
- add sp, 10
- while:
- mov ah, 0
- int 0x16
- cmp al, 'q'
- jnz while
- mov ax, 3
- int 0x10
- ret
- array: db 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 00, 00, 00, 00, 00, 00, 00, 00, 00, \
- 00, 00, 00, 00, 00, 00, 00, 00, 15, 00, 00, 15, 00, 00, 00, 00, 00, 00, 00, 00,\
- 00, 00, 00, 00, 00, 00, 00, 15, 00, 00, 00, 00, 15, 00, 00, 00, 00, 00, 00, 00,\
- 00, 00, 00, 00, 00, 00, 00, 15, 00, 00, 00, 00, 15, 00, 00, 00, 00, 00, 00, 00,\
- 00, 00, 00, 00, 00, 00, 15, 00, 00, 15, 15, 00, 00, 15, 00, 00, 00, 00, 00, 00,\
- 000, 000, 000, 000, 000, 015, 000, 000, 015, 000, 000, 015, 000, 00, 015, 000, 000, 000, 000, 000,\
- 000, 000, 000, 000, 000, 015, 000, 015, 000, 000, 000, 000, 015, 000, 15, 000, 000, 000, 000, 000,\
- 000, 000, 000, 000, 015, 000, 015, 000, 000, 015, 015, 000, 000, 015, 000, 015, 000, 000, 000, 000,\
- 000, 000, 000, 015, 000, 015, 000, 000, 000, 015, 015, 000, 000, 000, 015, 000, 015, 000, 000, 000,\
- 000, 000, 000, 015, 000, 015, 000, 000, 000, 015, 015, 000, 000, 000, 015, 000, 015, 000, 000, 000,\
- 0, 0, 015, 0, 0, 015, 000, 0, 0, 15, 15, 00, 00, 00, 15, 00, 00, 15, 00, 00,\
- 00, 15, 00, 00, 00, 00, 015, 00, 00, 15, 15, 00, 00, 15, 00, 00, 00, 00, 15, 00,\
- 00, 15, 00, 00, 00, 00, 00, 15, 00, 00, 00, 00, 15, 00, 00, 00, 00, 00, 15, 00,\
- 15, 00, 00, 00, 00, 00, 00, 00, 15, 00, 00, 15, 00, 00, 00, 00, 00, 00, 00, 15,\
- 15, 00, 00, 00, 00, 00, 00, 00, 00, 15, 15, 00, 00, 00, 00, 00, 00, 00, 00, 15,\
- 015, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 015,\
- 015, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 015,\
- 015, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 015,\
- 015, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 015,\
- 015, 015, 015, 015, 015, 015, 015, 015, 015, 015, 015, 015, 015, 015, 015, 015, 015, 015, 015, 015
- print_matr:
- push bp
- mov bp, sp
- push ax
- push bx
- push cx
- push dx
- mov ah, 0xC
- mov bx, [bp + 12] ; Matrix data
- mov dx, [bp + 8] ; y
- add WORD[bp + 4], dx
- mov cx, WORD[bp + 10]
- add WORD[bp + 6], cx ; now in [bp + 6] matrix x2 coord
- matr_while1:
- mov cx, [bp + 10] ; x
- matr_while2:
- mov al, [bx]
- int 0x10
- inc bx
- inc cx
- cmp cx, [bp + 6]
- jnz matr_while2
- inc dx
- cmp dx, [bp + 4]
- jnz matr_while1
- pop dx
- pop cx
- pop bx
- pop ax
- pop bp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement