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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/29/03 16:54
Read: times


 
#37665 - RE: db
Did you notice that by putting your .db before the next op code, you are instructing your uC to execute the .db bytes as code. Somehow I don't think this is what you are trying to do. You'll need to place your .db in a data segment if it's to be treated as data. But then that's a little more difficult to do with in-line assembler.

You need to do some reading. If not the manual that has been referenced again and again in reply to your questions, then pick a book on assembly programming, preferably 8051. Go to chip vendors websites, read application notes...many of these have example code written in C and assembler.

Also, don't ignore the answers and suggestions you've been given. Andy pointed out that 0x002 is C notation, and most in-line assembler still requires assembler notation, for example 2 or 0Ch. Erik has given you suggestions for creating assembler functions, and Steve has suggested the value of assembly programming with an assembler instead of C compiler.

List of 13 messages in thread
TopicAuthorDate
db            01/01/70 00:00      
RE: db            01/01/70 00:00      
RE: db            01/01/70 00:00      
RE: db            01/01/70 00:00      
RE: db            01/01/70 00:00      
RE: db            01/01/70 00:00      
RE: db            01/01/70 00:00      
RE: db            01/01/70 00:00      
RE: db            01/01/70 00:00      
RE: db            01/01/70 00:00      
RE: db            01/01/70 00:00      
Please read manual first            01/01/70 00:00      
   RE: Please read manual first/Craig            01/01/70 00:00      

Back to Subject List