jaafar1363
سه شنبه 08 دی 1388, 13:12 عصر
سلام دوستان
این برنامه می خواد ماتریس معکوس یه ماتریس 2*2 رو حساب کنه.مشکلش چیه؟
******************************************
include io.h
;---------------------------------
sseg segment stack
db 256 Dup(?)
sseg ends
;---------------------------------
dseg segment
MAT-IN DW 4 DUP(*)
matn db "enter four number",13,10
str dw 20 dup(?)
str1 db 20 dup(?)
str2 db 20 dup(?)
str3 db 20 dup(?)
str4 db 20 dup(?)
m db (?)
n db(?)
o db(?)
dseg ends
;---------------------------------
cseg segment
assume cs:cseg,ds:dseg
start: mov ax,seg dseg
mov ds,ax
output matn
mov ah,02h
mov bh,0
mov dh,24
mov dl,5
int 10h
mov SI,0
mov cx,3
L1: mov dx,cx
inputs str,3
atoi str
MOV mat-in[SI],ax
add SI,2
mov cx,dx
LOOP L1
sub ax,cx
itoa o,ax
output o ;Determinan
mov ax,4c00h ;exit to dos
int 21h
cseg ends
end start
****************************************
این برنامه می خواد ماتریس معکوس یه ماتریس 2*2 رو حساب کنه.مشکلش چیه؟
******************************************
include io.h
;---------------------------------
sseg segment stack
db 256 Dup(?)
sseg ends
;---------------------------------
dseg segment
MAT-IN DW 4 DUP(*)
matn db "enter four number",13,10
str dw 20 dup(?)
str1 db 20 dup(?)
str2 db 20 dup(?)
str3 db 20 dup(?)
str4 db 20 dup(?)
m db (?)
n db(?)
o db(?)
dseg ends
;---------------------------------
cseg segment
assume cs:cseg,ds:dseg
start: mov ax,seg dseg
mov ds,ax
output matn
mov ah,02h
mov bh,0
mov dh,24
mov dl,5
int 10h
mov SI,0
mov cx,3
L1: mov dx,cx
inputs str,3
atoi str
MOV mat-in[SI],ax
add SI,2
mov cx,dx
LOOP L1
sub ax,cx
itoa o,ax
output o ;Determinan
mov ax,4c00h ;exit to dos
int 21h
cseg ends
end start
****************************************