Thanks for the answers.
From what I can see I don't think I am doing anything wrong yet I am getting the error.
As was mentioned, if I have -
ldhx #Table
Then hx is loaded with the address of the table, not what I want.
If I change this command to -
ldhx Table
The error I am seeing in CodeWarrior says -
"Error A13001: Invalid Addressing Mode. not allowed for LDHX"
I get the very same error if I use the line of code that 'Encoder' posted up -
ldhx table,x ; table+pointer -> H:X
However, the other code you posted works fine with no compile error -
clrh ; assures h=0
ldx #pointer ; pointer is an 8 bit offset
lda table,x
sta T1MODH
lda table+1,x
sta T1MODH+1
Thanks,
Ross
Message Edited by Bloodhound on
2007-09-21 08:56 AM