Re: A89: Re: btst (ON_topic)


[Prev][Next][Index][Thread]

Re: A89: Re: btst (ON_topic)




Olle Hedman wrote:
> #old_x_status is though always an immidiate number, equivalent to #10 or #2436
> or any other number. exactly what number depends on what address that label is
> on.

to clearify, an immidiate number is hardcoded with the instruction and cannot
change (unless you code selfmodifying code)
that is why btst.b #0,#old_x_status (or btst.b #0,#47, wich is equivalent) is
quite pointless, and therefore not supported.

in short:

#old_x, #47, #0                : a number, will always be the same.

old_x, (old_x), 4711, $600010  : an address. the address will always be 
                                 the same, but the value at it can change
                                  (naturally)

old_x(pc), 42(pc)              : a relative address. the actuall
physical 				         address depends on the value of PC 
                                 (where you execute the program in the
                                  memoryspace)
                                 The value at the address can be changed.
                                 It is a type of indirect addressing.

(a0), 7(a3,d0), 47(PC,a0),     : different types of indirect addressings.
(a0)+, -(a0)                     the physical address depends on the value 
			         of the registers. the address can easily be
                                 changed by changeing the content of the regs.
                                 and the value at the address can be changed.

a0, d5, a3...		       : hopefully you understand this at least. no
                                 addresses involved. it is always the value
                                 in the register that is refered to.

If you know and understand this, you will never again have to think long if you
should have that # or thoose paranthesis or not.

//Olle
and yeah, always use monospaced font when you read mail.


References: