Indirect Addressing

OK Brains trust;
I need to fill a bunch of memory with data, on one occasion with the same data. On another occasion with data form the serial port. I am looking for an instruction like
poke (b0), temp1 ; where bo is the address into which the data in temp1 is to be stored.
This is a standard instruction with some processors.



 

Technical

Technical Support
Staff member
Its also a standard instruction with the PICAXE chip! See the BASIC Commands manual (part 2) - look up peek and poke.
 

Jeremy Leach

Senior Member
Not admitting to being the brains in this trust (!), but I think the standard Poke instruction does what you're afer:

Poke Location,Data
Location is a variable/constant specifying a register address. Valid values are 0
to 255.

e.g Poke b0,77
 
Thanks Guys,
Well if all else fails read the handbook.
Technical Chaps, thanks for that, it did work & I removed about 50 lines of code.
 
Top