2003-08-14 02:10 AM
2003-08-13 10:47 PM
Hi,
When defining constant tables in Rom segment for ST72F324J6, it maybe a chance or fault, I see that after defining .SEGTAB1: DC.B $FE the read of SEGTAB1 first element results in $01. If we define it as .SEGTAB1: DC.B 254 then read to it is OK. Can you please advise it ? Regards, Tayfun2003-08-14 02:07 AM
If you are using ST assembler then you need to declare your array as:
.SEGTAB1 ; remove : DC.B $FE,$FF to access the array: clr X ld A, (SEGTAB1,X) ; read first element of array inc X ld A, (SEGTAB1,X) ; read second element Hope this helps SJO2003-08-14 02:10 AM
Forgot to mention make sure the memory declaration is not on the first column eg.
.SEGTAB1: DC.B $FE,$FF not .SEGTAB1: DC.B $FE,$FF Note: Forum has removed spaces. Regards SJO[ This message was edited by: sjo on 14-08-2003 14:42 ]