| ??? 04/15/03 18:27 Read: times |
#43491 - RE: placing text in code area in asm51 Responding to: ???'s previous message |
For text manipulation, you can place a symbol (label?) before the DB directive:
HELLOSTR: DB 'HELLO WORLD' HELLOSTRLEN EQU $-HELLOSTR It may be helpful to add the second line too when it comes time to manipulate the string, for example sending it through the UART: MOV DPTR,#HELLOSTR ; string start address MOV R1,#0 ; string index MOV A,R1 ; Get string char MOVC A,@A+DPTR MOV SBUF,A ; Send character JNB TI,$ ; Wait for TI INC R1 ; Next string character CJNE R1,#STRLEN,$-8 ; Repeat until end of string - Lee |
| Topic | Author | Date |
| placing text in code area in asm51 | 01/01/70 00:00 | |
| RE: placing text in code area in asm51 | 01/01/70 00:00 | |
| RE: placing text in code area in asm51 | 01/01/70 00:00 | |
RE: placing text in code area in asm51 | 01/01/70 00:00 |



