Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

ASM programming

Name: Anonymous 2012-10-10 20:46

I'm relatively new to assembly programming and have a question regarding HC12 microprocessors. I understand the whole idea behind immediate addressing but say I want to...
PRINTF EQU $EE88

LDD #STRING
LDX PRINTF
JSR $0,X
...
STRING FCC 'blahblahblah'

Why when I'm trying to use the variable string do I have to use imm add to to put the address in D whereas when putting the address of PRINTF into X I do not have to use imm add?

Name: Anonymous 2012-10-10 21:53

Does that snippet work as you expect it to? The LDX instruction would load the value stored at $EE88, not load the value $EE88 into IX.

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2012-10-11 1:55

>>2
EE88 contains the address of the actual function.

I'd refer you to the monitor source listing but AFAIK they never released it online and I don't want to go dig out the manual and transcribe it.

Don't change these.
Name: Email:
Entire Thread Thread List