please explain how would you do. Of course debug strings are different and mixed
a message database of null terminated strings
Code:
@ ORG 4000h
messages:
@ dw 0x08 ;message 0 offset
@ dw 0x12 ;message 1 offset
@ dw 0x22 ;message 2 offset
@ dw 0x2e ;message 3 offset
@ DB "a message",0
@ DB "another message",0
@ DB "and another",0
@ DB "last one",0
to find a message[x] read from messages + 2*x this is the offset from messages label
message[x] start address = messages + offset
you can then copy message to a buffer and hserout it the usual way or create your own routine to
stream the message directly from flash
edited lst file
Code:
004000 00839 ORG 4000h
004000 0008 00847 dw 0x08
004002 0012 00855 dw 0x12
004004 0022 00863 dw 0x22
004006 0032 00871 dw 0x2E
004008 2061 656D 7373 00879 DB "a message",0
6761 0065
004012 6E61 746F 6568 00887 DB "another message",0
2072 656D 7373
6761 0065
004022 6E61 2064 6E61 00895 DB "and another",0
746F 6568 0072
00402E 616C 7473 6F20 00903 DB "last one",0
656E 0000
Bookmarks