Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include io.asm
- segment sstack stack
- db 128 dup(?)
- ends sstack
- segment sdata
- inputn db "Input n(1..10)>", "$"
- inputm db "Input m(1..10)>", "$"
- inpute db "Input elements of matrix(0..255)", "$"
- n dw 0
- m dw 0
- maxrow dw 0
- currow dw 0
- matrix db 100 dup(0)
- ends sdata
- segment scode
- assume cs:scode, ds:sdata, ss:sstack
- start:
- mov ax,sdata
- mov ds,ax
- mov dx,offset inputn
- outstr
- inint n
- mov dx,offset inputm
- outstr
- inint m
- mov dx,offset inpute
- outstr
- newline
- mov ax,n
- mov bx,m
- mul bl
- mov cx,ax
- mov bx,offset matrix
- mov dx,m
- input_elements:
- inint ax
- mov [bx],al
- add currow,ax
- dec dx
- cmp dx,0
- jne not_comp
- mov dx,currow
- cmp dx,maxrow
- jbe not_great
- mov maxrow,dx
- not_great:
- mov dx,0
- mov currow,dx
- mov dx,m
- not_comp:
- inc bx
- loop input_elements
- newline
- newline
- newline
- outint maxrow
- finish
- ends scode
- end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement