Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/26/02 14:34
Read: times


 
#21157 - RE: making row colums in 8051
As you're doing it in assembler, you can decide for yourself whether you store the data in your table by rows (like 'C'):
Lowest address:  table[0,0]
Next address:    table[0,1]
                 table[0,2]
                 :
                 table[0,n]
                 table[1,0]
                 :
Highest address: table[m,n]
or by columns:
Lowest address:  table[0,0]
Next address:    table[1,0]
                 table[2,0]
                 :
                 table[m,0]
                 table[1,0]
                 table[1,1]
                 :
Highest address: table[m,n]

It's then just a matter of simple arithmetic to work out the address of a particular element from the size of an element and the size of a row (or column).

If you still have trouble visualising it, Try drawing it out in a grid on paper, and seeing how you get to a particular element from its row & column numbers (indices).

List of 3 messages in thread
TopicAuthorDate
making row colums in 8051            01/01/70 00:00      
RE: making row colums in 8051            01/01/70 00:00      
RE: making row colums in 8051            01/01/70 00:00      

Back to Subject List