ورود

نسخه کامل مشاهده نسخه کامل : ماتریس در اسمبلی



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
[

martin_superhuman
30-04-2008, 00:32
دوست عزیز توضیح بدید برنامه چی میخواد؟
اینطوری معلوم نیست.

maah e zarrin
03-05-2008, 16:03
فقط می خوام اعداد یه ماتریس را از ورودی بگیره ودر خروجی چاپ کنه:40: