| ??? 09/06/03 09:28 Read: times |
#54207 - RE: array in asm51 Responding to: ???'s previous message |
Two points...
1. Some assemblers require the colons after the labels on data allocation statements and some do not. Clearly if required by your assembler you will have to insert them as you showed. The Keil assembler that I normally use wants to have colons after the labels too. I normally write my code where I place the labels on a separate line like shown below and then a colon is required for almost all assemblers.
STATE_TABLE:
DW STATE_1
DW STATE_2
2. A third label as you suggest is a very good idea for obtaining the size of the array symbolically within the source code. As a matter of fact you can see this done in code I wrote back at the beginning of June 2003. Click the link below to open the former thread on state machine design...then open the link there for Updated State Machine Code. Look down the code for the label STATE_CNT. http://www.8052.com/forum/read.phtml?id=47505 Michael Karas |
| Topic | Author | Date |
| array in asm51 | 01/01/70 00:00 | |
| RE: array in asm51 | 01/01/70 00:00 | |
| RE: array in asm51 | 01/01/70 00:00 | |
| RE: array in asm51 | 01/01/70 00:00 | |
RE: array in asm51 | 01/01/70 00:00 | |
| RE: array in asm51 | 01/01/70 00:00 | |
| RE: array in asm51 | 01/01/70 00:00 |



