??? 11/26/08 15:20 Read: times |
#160322 - How an assembler works Responding to: ???'s previous message |
Marlon Foendoe said:
My problem is not with the code, or the procedure to send it. What you explain me there I already know that. I rarely plug codes from the net. I use my own codes. But what I want to know is how the code MOV DPTR, #TEXT knows that it has to interprets the "text" as an indirect address for the memory location. But I think I got it . The Assembler treats the location counter of TEXT: as its value. It identifies it as a program label. The Assembler looks at the legal addressing modes of MOV DPTR,... and decides that you are using an immediate 16 bit value by the "#expr" What you do with this information depends on what your called function requires. An "output_string" subroutine commonly wants the string address in DPTR. But you must always read the function documentation first. David. |
Topic | Author | Date |
Loading DPTR with ascii code | 01/01/70 00:00 | |
Used to? | 01/01/70 00:00 | |
Indirect addressing mode on text | 01/01/70 00:00 | |
How an assembler works | 01/01/70 00:00 | |
that is context sensitive! | 01/01/70 00:00 | |
It depends ... read the datasheet ... then guess | 01/01/70 00:00 | |
Right back to basics - really foundational stuff | 01/01/70 00:00 | |
The one thing it most certainly does not do... | 01/01/70 00:00 | |
Thanks!!![]() | 01/01/70 00:00 |