De instructieset
De instructies die de 68HC11 kent zijn in de volgende tabellen per functie gerangschikt. Bij elke instructie is aangegeven welk type adressering bij de instructie kan worden toegepast.
Een volledig overzicht met beschrijving van alle instructies, om te
downloaden en eventueel af te drukken, vindt u hier.
|
Imm |
immediate adressering |
|
Dir |
direct adressering |
|
Ext |
extended adressering |
|
Ind |
indexed adressering (IX en IY) |
|
Inh |
inherente adressering |
|
Rel |
relative adressering |
De micro-controller is een Amerikaans produkt. De namen van de instructies zijn dan ook in het Engels. Wij hebben deze Engelse benamingen gehandhaafd, omdat de afkortingen van de instructies ('mnemonics') uiteraard op deze Engelse namen betrekking hebben.
Wat elke instructie precies doet, wordt hier
behandeld.
Laden, Opslaan en Verwisselen
|
Functie |
Mnemonic |
Imm |
Dir |
Ext |
Ind |
Inh |
|
Clear memory Byte |
CLR |
|
|
x |
x |
|
|
Clear accumulator A |
CLRA |
|
|
|
|
x |
|
Clear accumulator B |
CLRB |
|
|
|
|
x |
|
Load accumulator A |
LDAA |
x |
x |
x |
x |
|
|
Load accumulator B |
LDAB |
x |
x |
x |
x |
|
|
Load D |
LDD |
x |
x |
x |
x |
|
|
Pull A |
PULA |
|
|
|
|
x |
|
Pull B |
PULB |
|
|
|
|
x |
|
Push A |
PSHA |
|
|
|
|
x |
|
Push B |
PSHB |
|
|
|
|
x |
|
Store accumulator A |
STAA |
x |
x |
x |
x |
|
|
Store accumulator B |
STAB |
x |
x |
x |
x |
|
|
Store D |
STD |
x |
x |
x |
x |
|
|
Transfer A to B |
TAB |
|
|
|
|
x |
|
Transfer A to CCR |
TAP |
|
|
|
|
x |
|
Transfer B to A |
TBA |
|
|
|
|
x |
|
Transfer CCR to A |
TPA |
|
|
|
|
x |
|
Exchange D with X |
XGDX |
|
|
|
|
x |
|
Exchange D with Y |
XGDY |
|
|
|
|
x |
Rekenkundige bewerkingen
|
Functie |
Mnemonic |
Imm |
Dir |
Ext |
Ind |
Inh |
|
Add acumulator B to A |
ABA |
|
|
|
|
x |
|
Add B to X |
ABX |
|
|
|
|
x |
|
Add B to Y |
ABY |
|
|
|
|
x |
|
Add with Carry to A |
ADCA |
x |
x |
x |
x |
|
|
Add with Carry to B |
ADCB |
x |
x |
x |
x |
|
|
Add memory to A |
ADDA |
x |
x |
x |
x |
|
|
Add memory to B |
ADDB |
x |
x |
x |
x |
|
|
Add memory to D |
ADDD |
x |
x |
x |
x |
|
|
Compare A to B |
CBA |
|
|
|
|
x |
|
Compare A to memory |
CMPA |
x |
x |
x |
x |
|
|
Compare B to memory |
CMPB |
x |
x |
x |
x |
|
|
Compare D to memory |
CPD |
x |
x |
x |
x |
|
|
Decimal Adjust A |
DAA |
|
|
|
|
x |
|
Decrement memory byte |
DEC |
|
|
x |
x |
|
|
Decrement A |
DECA |
|
|
|
|
x |
|
Decrement B |
DECB |
|
|
|
|
x |
|
Increment memory byte |
INC |
|
|
x |
x |
|
|
Increment A |
INCA |
|
|
|
|
x |
|
Increment B |
INCB |
|
|
|
|
x |
|
Two's complement memory |
NEG |
|
|
x |
x |
|
|
Two's complement A |
NEGA |
|
|
|
|
x |
|
Two's complement B |
NEGB |
|
|
|
|
x |
|
Subtract with Carry from A |
SBCA |
x |
x |
x |
x |
|
|
Subtract with Carry from B |
SBCB |
x |
x |
x |
x |
|
|
Subtract from A |
SUBA |
x |
x |
x |
x |
|
|
Subtract from B |
SUBB |
x |
x |
x |
x |
|
|
Subtract from D |
SUBD |
x |
x |
x |
x |
|
|
Test for zero or minus |
TST |
|
|
x |
x |
|
|
Test for zero or minus A |
TSTA |
|
|
|
|
x |
|
Test for zero or minus B |
TSTB |
|
|
|
|
x |
|
Multiply |
MUL |
|
|
|
|
x |
|
Integer divide |
IDIV |
|
|
|
|
x |
|
Fractional divide |
FDIV |
|
|
|
|
x |
Logische bewerkingen
|
Functie |
Mnemonic |
Imm |
Dir |
Ext |
Ind |
Inh |
|
And A with memory |
ANDA |
x |
x |
x |
x |
|
|
And B with memory |
ANDB |
x |
x |
x |
x |
|
|
Bit(s) test A with memory |
BITA |
x |
x |
x |
x |
|
|
Bit(s) test B with memory |
BITB |
x |
x |
x |
x |
|
|
Complement memory byte |
COM |
|
|
x |
x |
|
|
Complement A |
COMA |
|
|
|
|
x |
|
Complement B |
COMB |
|
|
|
|
x |
|
Or A with memory |
ORAA |
x |
x |
x |
x |
|
|
Or B with memory |
ORAB |
x |
x |
x |
x |
|
|
Exor A with memory |
EORA |
x |
x |
x |
x |
|
|
Exor B with memory |
EORB |
x |
x |
x |
x |
|
Bit test en set/clear
|
Functie |
Mnemonic |
Imm |
Dir |
Ext |
Ind |
Inh |
|
Bit(s) test A with memory |
BITA |
x |
x |
x |
x |
|
|
Bit(s) test B with memory |
BITB |
x |
x |
x |
x |
|
|
Clear bit(s) in memory |
BCLR |
|
x |
|
x |
|
|
Set bit(s) in memory |
BSET |
|
x |
|
x |
|
|
Branch if bit(s) clear |
BRCLR |
|
x |
|
x |
|
|
Branch if bit(s) set |
BRSET |
|
x |
|
x |
|
Schuiven en roteren
|
Functie |
Mnemonic |
Imm |
Dir |
Ext |
Ind |
Inh |
|
Arithmetic shift left |
ASL |
|
|
x |
x |
|
|
Arithmetic shift left A |
ASLA |
|
|
|
|
x |
|
Arithmetic shift left B |
ASLB |
|
|
|
|
x |
|
Arithmetic shift left D |
ASLD |
|
|
|
|
x |
|
Arithmetic shift right |
ASR |
|
|
x |
x |
|
|
Arithmetic shift right A |
ASRA |
|
|
|
|
x |
|
Arithmetic shift right B |
ASRB |
|
|
|
|
x |
|
Logical shift left |
LSL |
|
|
x |
x |
|
|
Logical shift left A |
LSLA |
|
|
|
|
x |
|
Logical shift left B |
LSLB |
|
|
|
|
x |
|
Logical shift left D |
LSLD |
|
|
|
|
x |
|
Logical shift right |
LSR |
|
|
x |
x |
|
|
Logical shift right A |
LSRA |
|
|
|
|
x |
|
Logical shift right B |
LSRB |
|
|
|
|
x |
|
Logical shift right D |
LSRD |
|
|
|
|
x |
|
Rotate left |
ROL |
|
|
x |
x |
|
|
Rotate left A |
ROLA |
|
|
|
|
x |
|
Rotate left B |
ROLB |
|
|
|
|
x |
|
Rotate right |
ROR |
|
|
x |
x |
|
|
Rotate right A |
RORA |
|
|
|
|
x |
|
Rotate right B |
RORB |
|
|
|
|
x |

Stackpointer en Indexregister functies
|
Functie |
Mnemonic |
Imm |
Dir |
Ext |
Ind |
Inh |
|
Add B to X |
ABX |
|
|
|
|
x |
|
Add B to Y |
ABY |
|
|
|
|
x |
|
Compare X to memory |
CPX |
x |
x |
x |
x |
|
|
Compare Y to memory |
CPY |
x |
x |
x |
x |
|
|
Decrement Stackpointer |
DES |
|
|
|
|
x |
|
Decrement X |
DEX |
|
|
|
|
x |
|
Decrement Y |
DEY |
|
|
|
|
x |
|
Increment Stackpointer |
INS |
|
|
|
|
x |
|
Increment X |
INX |
|
|
|
|
x |
|
Increment Y |
INY |
|
|
|
|
x |
|
Load Stackpointer |
LDS |
x |
x |
x |
x |
|
|
Load X |
LDX |
x |
x |
x |
x |
|
|
Load Y |
LDY |
x |
x |
x |
x |
|
|
Pull X from stack |
PULX |
|
|
|
|
x |
|
Pull Y from stack |
PULY |
|
|
|
|
x |
|
Push X onto stack |
PSHX |
|
|
|
|
x |
|
Push Y onto stack |
PSHY |
|
|
|
|
x |
|
Store X |
STX |
x |
x |
x |
x |
|
|
Store Y |
STY |
x |
x |
x |
x |
|
|
Store Stackpointer |
STS |
x |
x |
x |
x |
|
|
Transfer S to X |
TSX |
|
|
|
|
x |
|
Transfer S to Y |
TSY |
|
|
|
|
x |
|
Transfer X to S |
TXS |
|
|
|
|
x |
|
Transfer Y to S |
TYS |
|
|
|
|
x |
|
Exchange D with X |
XGDX |
|
|
|
|
x |
|
Exchange D with Y |
XGDY |
|
|
|
|
x |
Condition Code manipulatie
|
Functie |
Mnemonic |
Imm |
Dir |
Ext |
Ind |
Inh |
|
Clear Carry bit |
CLC |
|
|
|
|
x |
|
Clear Interrupt mask bit |
CLI |
|
|
|
|
x |
|
Clear Overflow bit |
CLV |
|
|
|
|
x |
|
Set Carry bit |
SEC |
|
|
|
|
x |
|
Set Interrupt mask bit |
SEI |
|
|
|
|
x |
|
Set Overflow bit |
SEV |
|
|
|
|
x |
|
Transfer A to CCR |
TAP |
|
|
|
|
x |
|
Transfer CCR to A |
TPA |
|
|
|
|
x |
Branches
|
Functie |
Mnemonic |
Conditie |
Rel |
Dir |
Ind |
|
Branch if carry clear |
BCC |
C = 0 |
x |
|
|
|
Branch if carry set |
BCS |
C = 1 |
x |
|
|
|
Branch if not equal |
BNE |
Z = 0 |
x |
|
|
|
Branch if equal |
BEQ |
Z = 1 |
x |
|
|
|
Branch if plus |
BPL |
N = 0 |
x |
|
|
|
Branch if minus |
BMI |
N = 1 |
x |
|
|
|
Branch if overflow clear |
BVC |
V = 0 |
x |
|
|
|
Branch if overflow set |
BCS |
V = 1 |
x |
|
|
|
Branch if bit(s) clear |
BRCLR |
Bit test |
x |
x |
x |
|
Branch if bit(s) set |
BRSET |
Bit test |
x |
x |
x |
|
Branch if greater than |
BGT |
> (signed) |
x |
|
|
|
Branch if greater or equal |
BGE |
>= (signed) |
x |
|
|
|
Branch if less or equal |
BLE |
<= (signed) |
x |
|
|
|
Branch if less than |
BLT |
< (signed) |
x |
|
|
|
Branch if higher |
BHI |
> (unsigned) |
x |
|
|
|
Branch if higher or same |
BHS |
>= (unsigned) |
x |
|
|
|
Branch if lower or same |
BLS |
<= (unsigned) |
x |
|
|
|
Branch if lower |
BLO |
< (unsigned) |
x |
|
|
Jumps
|
Functie |
Mnemonic |
Imm |
Dir |
Ext |
Ind |
Inh |
|
Jump |
JMP |
|
x |
x |
x |
|
Subroutine aanroep en terugkeer
|
Functie |
Mnemonic |
Rel |
Dir |
Ext |
Ind |
Inh |
|
Jump to subroutine |
JSR |
|
x |
x |
x |
|
|
Branch to subroutine |
BSR |
x |
|
|
|
|
|
Return from subroutine |
RTS |
|
|
|
|
x |
Interrupts
|
Functie |
Mnemonic |
Imm |
Dir |
Ext |
Ind |
Inh |
|
Return from Interrupt |
RTI |
|
|
|
|
x |
|
Software Interrupt |
SWI |
|
|
|
|
x |
|
Wait for Interrupt |
WAI |
|
|
|
|
x |
Diversen
|
Functie |
Mnemonic |
Imm |
Dir |
Ext |
Ind |
Inh |
|
No operation |
NOP |
|
|
|
|
x |
|
Stop |
STOP |
|
|
|
|
x |
|