maah e zarrin
28-04-2008, 23:26
من کد زیر را برای این ماتریس نوشتم ولی نمی دونم چرا حلقهinputs تمام نمیشه(البته شاید برنامه کلا اشتباه باشه )لطفا کمک کنید
]
include io.h
d1 segment
temp db 7 dup(?)
db 0
A dw 3 dup(3 dup(?))
x dw ?
y dw ?
d1 ends
c1 segment
assume cs:c1,ds:d1
start:
mov ax,seg d1
mov ds,ax
lea bx,A
mov cx,3
l1:
mov x,cx
mov cx,3
l2:
mov dx,cx
inputs temp,7
atoi temp
mov [bx],ax
mov cx,dx
add bx,2
loop l2
mov cx,x
add bx,2
loop l1
lea bx,A
mov cx,3
l3:
mov x,cx
mov cx,3
l4:
mov y,cx
itoa temp,[bx]
output temp
mov cx,y
add bx,2
loop l4
mov cx,x
add bx,2
loop l3
mov ax,4c00h
int 21h
c1 ends
end start
[
]
include io.h
d1 segment
temp db 7 dup(?)
db 0
A dw 3 dup(3 dup(?))
x dw ?
y dw ?
d1 ends
c1 segment
assume cs:c1,ds:d1
start:
mov ax,seg d1
mov ds,ax
lea bx,A
mov cx,3
l1:
mov x,cx
mov cx,3
l2:
mov dx,cx
inputs temp,7
atoi temp
mov [bx],ax
mov cx,dx
add bx,2
loop l2
mov cx,x
add bx,2
loop l1
lea bx,A
mov cx,3
l3:
mov x,cx
mov cx,3
l4:
mov y,cx
itoa temp,[bx]
output temp
mov cx,y
add bx,2
loop l4
mov cx,x
add bx,2
loop l3
mov ax,4c00h
int 21h
c1 ends
end start
[