PDA

View Full Version : Why can I not use trinary operators?


jiraphat2200
05-28-08, 10:01 AM
Hello, I am practicing writing program on ISOPOD V2 with ISOMAX.
I got struck at trinary operators part because I cannot use word AT-ADDRESS.
I tried the code in the tutorial but it doesn't work.

(In the thermostat example)
HEX
DEFINE TOO-COLD? TEST-MASK 01 DATA-MASK 01 AT-ADDRESS 3CBF FOR-INPUT

The terminal returns:
AT-ADDRESS?
(like it does not know this word.)

I use address 3CBF, because it is the address of PORTA in WORDS. Is it right?

What am I doing wrong?

Thank you in advance :)

jiraphat2200
05-28-08, 10:11 AM
Hello, I am practicing writing program on ISOPOD V2 with ISOMAX.
I got struck at trinary operators part, because I cannot use "AT-ADDRESS".
I tried the code in the tutorial.

(Thermostat example)
HEX
DEFINE TOO-COLD? TEST-MASK 01 DATA-MASK 01 AT-ADDRESS 3CBF FOR-INPUT

The terminal returns:
AT-ADDRESS ?
(like it does not know this word.)

I use address 3CBF, because it is the address of PORTA in WORDS. (Is this wrong?)
What is wrong with this?

Thank you :)

RMDumse
05-31-08, 05:06 PM
I don't think the AT-ADDRESS feature made it from the original HC11 IsoMax(TM) to the DSP56F8xxxx code.

Using the address of the CFA of PORTA is not a good idea. It points to the interpreter that operates the OO workd PORTA and is in program space. OTOH, The address of Port A is at $0FB1. But one should read up on the ports operations before directly accessing them. They have a data direction register that must be set up and a PER register that controls the primary GPIO or alternative Peripheral Equipment Register functions.