68HC05 Instruction Set — Part 1
LDA load the accumulator LDX load the index register STA store the accumulator STX store the index register
TAX transfer the accumulator to the index register TXA transfer the index register to the accumulator
CLR clear a memory location CLRA clear the accumulator CLRX clear the index register
Notes:
The LDA and LDX instructions read or “load” data from memory. The memory location read can be specified using one of several addressing modes discussed later.
The STA and STX instructions write or “store” data to memory. As with LDA and LDX, several addressing modes are available to specify the desired memory location.
The “clear” instructions are memory efficient ways to zero a memory location or register.
For example, CLR $01 (read as “clear direct address $01”) requires 2 bytes of storage and executes in 5 clock cycles.
On the other hand, LDA #$00 (read as “load accumulator with immediate value $00”) and STA $01 (read as “store accumulator to direct address $01”) require 4 bytes of storage and execute in 6 cycles.
Likewise, CLRA and CLRX each require only 1 byte of storage, versus 2 each for LDA #$00 (read as “load accumulator with immediate value $00”) and LDX #$00 (read as “load index register with immediate value $00”).