| ??? 01/21/04 08:45 Read: times |
#63041 - Solution / problem ? Responding to: ???'s previous message |
Hello All,
Some time back I was not able to use this NUMBER directive,Now that I have discovered how to use,I am posting it here so that it will be of some use to others.Here it goes before the #I2C_MEM_rdcmd was declared in the code segment,but to use it I had to do the following circus... In main.asm extrn code (I2C_MEM_rdcmd) clr sda_scl mov dptr,#I2C_MEM_rdcmd mov a,#00 movc a,@a+dptr mov rdcmd,a and in i2c.asm I have public I2C_MEM_rdcmd rseg mem_const I2C_MEM_RDCMD: db 10100001B Now that I have figured out how to use NUMBER I do the following In main.asm extrn NUMBER (I2C_MEM_rdcmd) mov rdcmd,#I2C_MEM_rdcmd and in i2c.asm I have public I2C_MEM_rdcmd I2C_MEM_rdcmd equ 10100001B By doing so I save 10 bytes of code space and its 6 times faster... I am for sure that this is a better way to implement(or have I missed something?),but since most have already suggested... I read "symbols with the class NUMBER match every memory class". Since NOTHING in assembler will work on an unknown memory class it is essential to know the type of memory associated with it so why on earth try to suppress it What do I do now Rgds Raj Shetgar |
| Topic | Author | Date |
| extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| RE: extrn... | 01/01/70 00:00 | |
| anyhow | 01/01/70 00:00 | |
| RE: anyhow | 01/01/70 00:00 | |
| RE: anyhow | 01/01/70 00:00 | |
| pls skip previous, same tagged right | 01/01/70 00:00 | |
| RE: pls skip previous, same tagged right | 01/01/70 00:00 | |
| RE: pls skip previous, same tagged right | 01/01/70 00:00 | |
| RE: pls skip previous, same tagged right | 01/01/70 00:00 | |
| RE: pls skip previous, same tagged right | 01/01/70 00:00 | |
| RE: pls skip previous, same tagged right | 01/01/70 00:00 | |
Solution / problem ? | 01/01/70 00:00 |



