how do i check i 8051 programming if a matric is symmetric or not for eg If the value stored in 60H is 3 and values stored in 61H, 62H, . . ., 69H are 1, 4, 3, 4, 1, 2, 3, 2, 1 . then psw.5 shud be set to 1. matrix dimension m can be 2, 3, or 4. Assume the matrix M to be stored in row-major form, i.e., element M(1, 1) is in the 1st location, M(1, 2) is in the 2nd location, . . . , M(m, m − 1) is in the (m − 1)*m-th location and M(m, m) in the m^2 -th location ;
.so wat i thought was that i could enter the values in the addresses mentioned . now in case of 2*2 matrix the numbers at 62h and 63h should be equal.similarly that at 62h-64h,63h-67h and 66h-68h for 3*3 matrix like that.so i used cjne to check if matrix dimension is 2 or 3 or 4 and in case i checked the condition like if 62h and 63h are equal using cjne. my problem is that i am not able to get the output in keil. and i am not able to figure out the problem.the logic seems fine to me but i would like to know whether the logic is wrong or are there any possible mistakes which i should take care of
.so wat i thought was that i could enter the values in the addresses mentioned . now in case of 2*2 matrix the numbers at 62h and 63h should be equal.similarly that at 62h-64h,63h-67h and 66h-68h for 3*3 matrix like that.so i used cjne to check if matrix dimension is 2 or 3 or 4 and in case i checked the condition like if 62h and 63h are equal using cjne. my problem is that i am not able to get the output in keil. and i am not able to figure out the problem.the logic seems fine to me but i would like to know whether the logic is wrong or are there any possible mistakes which i should take care of
Last edited: