Download presentation
Presentation is loading. Please wait.
1
Physics 413 Chapter 2
2
6800 Architecture A B X SP PC CCR
3
Straight-line Programming
In Paris they simply stared when I spoke to them in French ; I never did succeed in making those idiots understand their own language Mark Twain , The Innocents Abroad, 1869
4
My First Program CLRA Clears accumulator A ( A = 0 )
INC A This instruction does this: A A WAI Stop (Wait)
5
Op-codes Assembly Language Memory Location Op-codes CLRA 0000 4F
INCA C WAI E
6
My Second Program LDAA # $ 12 ADDA # $ 15 WAI
7
Object Code Program # 2 Assembly Language Memory Location Op-codes LDAA # $ ADDA # $ B WAI E
8
Addressing Modes Inherent (implied) : Simplest with no operand. One-byte op-code. Examples: INCA and CLRA Immediate : Operand specified is immediate (no memory access). Examples: LDAA # $ 12 and ADDA # $ 15
9
Immediate and Direct Modes
Immediate LDAA # $ Load 12 op-code Direct LDAA $ Load from memory 0012 op-code
10
My Third Program Assembly Language Memory Location Op-codes
LDAA # $ 04 STAA $ 15 LDAA # $ 08 ? ? ADDA $ 15 WAI
11
My Third Program Assembly Language Memory Location Op-codes
LDAA # $ STAA $ LDAA # $ ADDA $ B 15 WAI E
12
Extended Addressing Mode
The extended addressing mode becomes indispensable when memory locations beyond the zero page must be addressed. Here, as always, an example is worth a thousand words: LDAA $$ 3C5E Load A from memory 3C5E Op-codes B6 3C 5E
13
Three Trick Questions What is the outcome of B6 00 2A ?
What is the outcome of LDAA # $ 3C5E ? What is the outcome of STAB $$ 3C44 ?
14
Trick Questions . . . Answered!
What is the outcome of B6 00 2A ? Legal but not very smart. What is the outcome of LDAA # $ 3C5E ? Not Legal What is the outcome of STAB $$ 3C44 ? O.K. and op-code is F7 3C 44
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.