Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

8051 program

Status
Not open for further replies.

madthug

Newbie
Newbie level 2
Joined
Jan 22, 2021
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
21
Write a program to check if a given m × m matrix
. The matrix dimension m is stored in 60H and the memory location
corresponding to the 1st element of the matrix is 61H. If the given matrix is symmetric
then set the user definable bit in program status word (PSW) i.e., set P SW.5 to 1
else set it to 0. The 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.
Example: 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, respectively, then set P SW.5 to 1.
 

Why, of course, I'd be happy to do your homework for you. Especially since you are apparently incapable of even writing a complete sentence:

"Write a program to check if a given m x m matrix"

Not gonna happen, dude.
 

Why, of course, I'd be happy to do your homework for you. Especially since you are apparently incapable of even writing a complete sentence:

"Write a program to check if a given m x m matrix"

Not gonna happen, dude.
i dont want to make anybody solve my homework.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

i should have told this in the while asking the question itself, but this is my first time here so i didn't know u have tell what are your thoughts on it.apologies for that
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top