2003-04-10 08:00 AM
Adding text in your code (Assembler)
2003-04-09 05:24 AM
How do you add text so that appears is the s19 file.
I want to add software name / author in some code so that if you read back the device you can read the text. I want to do this in the ST7 assembler2003-04-09 07:05 PM
You may do that directly in the window of the visual programmer, where the memory is free of any code. Or maybe by adding a constant declaration in your code.....
Rgds F2003-04-09 09:09 PM
If I want to set up a constant how do you define a string in assembler.
DS.B is a byte DS.W is a word ?2003-04-09 09:33 PM
in your map file (for example):
SEGMENT BYTE AT F000-FF00 'ROM' SEGMENT BYTE AT FF00-FFDF 'TITLE' in your source file SEGMENT 'TITLE' DC.B 'A' DC.B 'B' DC.B 'C' the string ABC will then be located starting from adress 0xff00 (check it in the window of the visual programmer) Rgds Florent2003-04-09 10:03 PM
why not just use the STRING keyword, eg.
segment 'rom' STRING ''teststring'' Regards Spen2003-04-09 10:10 PM
because I forgot this possibility
Anyway, you still have to define the segment if you want to allocate it at a defined adress. F2003-04-09 10:24 PM
Thanks for that. Now done
Regards, Brian2003-04-09 10:33 PM
hello
I've got a questions about this: How can I do this in C (Cosmic C-Compiler)? I mean to add software name / author in code. regards2003-04-10 02:50 AM
define a new section in your linker file,eg.
+seg .str -b 0xf000 -n .str # special const section +seg .text -n .text -a .str # program code +seg .const -a .text # constants follow code then to put our string in the special section use #pragma section const {str} const char * const pString = ''teststring''; #pragma section const {} Hope this helps Regards Spen