Hi All,
It's stupid question time, again!
I'm doing some assembler programming and wonder what the 'normal' usage of address registers A4, A5 & A6 are.
Can I use these with impunity? Will the civilisation as we know it collapse? OK, maybe not quite that bad but are there problems or effects that I should be aware of.
Thanks for your guidance,
Whopper
Address register usage
Re: Address register usage
Definitely depends (I'm always in for useful answers )Whopper wrote: I'm doing some assembler programming and wonder what the 'normal' usage of address registers A4, A5 & A6 are.
SuperBASIC extensions are not allowed to change A6 at any time, not even temporarily. all other registers are free to use.
EXECutable jobs are free to use all registers but will receive some values from the system, so make sure you use or store these values before you change the registers in any way.
a6 normally points to the start address of a job when it is created
a6+a4 is pointing to the data space of the job
a6+a5 is pointing to the end of the data space
Just by convention, most people tend to use a6 as the base address of the data space (once they have redirected it from the job's start address). SuperBASIC does more or less the same.
Device driver code has much more restrictions on the usage of registers which I won't go into here.
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO