EER-018
Introduction to Digital Computers
Lecture 24
6805 Instructions
Condition Code Register
Read/Write/Modify Instructions - 6805 book pp.
122 -instructions
that read a memory location or register, modify its contents and write
the modified value back to a memory location or register.
-
shifts and rotates: LSL, LSR, ASR, ROR, ROL
-
bit sets and clears: BSET, BCLR
-
clear register: CLR
-
increment, decrement: INC, DEC
-
complements: COM NEG
Jump and Branch instructions - 6805 book pp. 123 instructions that can interrupt
the normal sequence of incrementing PC.
-
Branch always and never: BRA, BRN
-
Unconditional jump: JMP
-
Branch if flag is true: BCS, BEQ, BHCS, BMI,
-
Branch if flag is false: BCC, BNE, BHCC, BPL
-
Branch to Subroutine: BSR
-
Jump to Subroutine: JSR
-
Branch if Bit Set or Clear: BRSET, BRSET
Control Instructions - 6805 book pp. 124
-
Set or clear flags: SEC, SEI, CLC, CLI
-
No operation: NOP
-
Return from subroutine: RTS
-
Return from interrupt: RTI
-
Transfer A and X: TAX, TXA
Example Programs
Assembly program
Hand assembly - what does the program look like in memory?