#include "ADDS_21161_EzKit.h" #include #include #include #include const int i=4;//ilosc wierszy macierzy const int j=4;//ilosc kolumn macierz const int n=3;//ilosc kolumn/wiersz w macierzy Amtrix_A_inv //dane umieszczone w pamiêci danych (DataMemory) int dm vector[4]={2,3,4,5}; int dm macierz1[3][4]; float dm mat_a[4][4]={1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16}; float pm vector_X[4]={1,0,1,0}; float dm vector_Y[4]; float pm mat_X[4][4]={1,0,2,1, 0,1,1,0, 1,0,1,0, 1,0,0,1}; float dm mat_Y[4][4]; float dm mat_X_inv[4][4]; float dm matrix_A[9]={ 1,2,3, 11,12,13, 21,22,23 }; //taka macierz A umieszczona w pamiêci programu (ProgramMemory) float pm matrix_A_PM[9]={ 1.0, 2.0 ,3.0, 11.0,12.0,13.0, 21.0,22.0,23.0 }; /* Deklaracja elementow potrzebnych do odwrocenia macierzy*/ float pm matrix_A_inv[3][3]={-3,6,9, 10,-5,12, 4,-12,7}; int pm pf[4]; int pm swc[3]; int dm swr[3]; float dm det[1]={3}; int wiersz,kolumna; int count_start(); int count_end(int); int time_start, time_elapsed; void dodawanko(); void mat_x_vec(); void mat_x_mat(); void mat_inv(); void mat_det_3x3(); void operacje_macierzowe(); void main() { //#### transpozycja macierzy #### //printf("\nMacierz A: \n"); operacje_macierzowe(); //########################### while (1) //pêtla nieskonczona { asm("nop;"); } } void operacje_macierzowe() { mat_x_vec(); printf("\nMnozenie macierzy przez wektor - procedura w asemblerze\n"); printf("\n A[][] x X[] = Y[]\n\n"); for(wiersz=0; wiersz