Page 1 of 1

Problem with constants string in DataSection

Posted: Fri Aug 06, 2004 3:06 pm
by PicardDontoro
Hi,

I've this code:

Code: Select all


#test_const1 = $FFFF
#test_const2 = "my string constant"

Read test1.w
Read test2.s

Debug test1
Debug test2

DataSection

Data.w #test_const1
Data.s #test_const2

EndDataSection

#test_const1 is corretly putted in data section, while #test_const2 not :cry: .

Why?

TIA

Posted: Fri Aug 06, 2004 9:09 pm
by srod
Not sure why this should be so.

You have to put the literal value in the data statement:

Code: Select all

#test_const1 = $FFFF 
Read test1.w 
Read test2.s 

Debug test1 
Debug test2 

DataSection 

Data.w #test_const1 
Data.s "my string constant"

EndDataSection