I already uploaded notes about Addressing Modes of 68HC12 via iLearn portal more than a week ago. The students can easily access the notes. However, why they still don't have this notes? It is really make me very upset. Everything is on fingertips today, just + internet access. Here, we don't have any problem to access to the internet today because of the networking is already improved and served better in term of speed especially. Thank's to USMB UiTM Dungun. I also uploaded all notes in Yahoo Group of ECE365. No problem to access today. When I remind back during my era around 1999 to 2003, there's no internet access provided as today, no e-learning system and no notes given by the lecturer. With my efforts, I asked the senior for the notes and photocopy everything belong to them. I got the notes before the semester began. See, the different environment of studying today and 5 years ago!
What I want to write here, is not a mumbling state as above. I want to share how do you wanna be a master in Addressing Modes of 6812? I give you some tips as following :
- You should have my notes and Appendix A from iLearn or Yahoo Group (Class ECE365).
- In your mind, you should remember the architecture of CPU Registers of 6812 and Memory.
- You should understand how to use Appendix A.
- You should try to understand the Addressing Modes as below.
Table 1.0 Summary of Addressing Mode
From Table 1.0 above, you know how many types of addressing modes in 6812 and how to write a proper instruction. Do you know what the instruction all about? Easily refer to Appendix A and my hand notes.
INH
The execution is only inside the CPU.
Syntax : Instruction
eg. NOP ; no operation
INX ; X <= X+1
INY ; Y <=Y+1
DECA; A <= A-1
DECB; B <= B-1
IMM
To load immediate value with #
Syntax : Instruction #8-bit/16-bit data
eg. LDAA #35 ; A <=35
LDAB #%10000101; B <=87H
DIR
To access memory $0000-$00FF
Syntax : Instruction 8-bit address
eg. LDAA $20; A <=($20)
LDAB $3A ; B <= ($3A)
EXT
To access memory >$00FF
Syntax : Instruction 16-bit address
eg. LDAA $0105; A <= ($0105)
LDAB $10FF ; B <= ($10FF)
IDX (5-bit constant offset => -16 to 15) -2^5 to (2^5 -1)
Syntax : Instruction 5-bit signed offset, X/Y/SP/PC
eg. LDAB 15,Y ; B <= (Y+15)
STAA -8,X ; (X-8) <=A
IDX1 (9-bit constant offset => -256 to 255) -2^8 to (2^8-1)
Syntax : Instruction 9-bit signed offset, X/Y/SP/PC
eg. LDAB 100,Y ; B <= (Y+100)
STAA -200,X ; (X-200) <= A
IDX2 (16-bit constant offset => -32,758 to 32,757) -2^15 to (2^15-1)
Syntax : Instruction 16-bit signed offset, X/Y/SP/PC
eg. LDAB 1000,Y; B <= (Y+1000)
STAA -2000,X ; (X-1000) <= A
[IDX2] 16-bit constant indirect=> -32,758 to 32,757) -2^15 to (2^15-1)
Syntax : Instruction 16-bit signed offset, X/Y/SP/PC
eg. LDAB [100,Y] ; B <= [Y+100]
STAA [-20,X] ; [X-20] <= A
Syntax : Instruction A/B/D,X/Y/SP/PC
eg. LDAB A,Y ; B <= (A+Y)
STAA B,X ; (B+X) <= A
Syntax : Instruction 3bit,X/Y/SP
Pre Decrement
eg. LDAA 2,-SP ; A <= (SP-2), SP <= SP-2
Post-Decrement
eg. LDAA 2,SP- ; A <= (SP), SP <=SP-2
Pre-Increment
eg. LDAA, 2,+SP ; A <= (SP+2), SP <=SP+2
Post-Increment
eg. LDAA 2,SP+ ; A <= (SP), SP <= SP+2
REL and [D,IDX2] - discussed later when you understand the program loops and subroutines
No more notes in my file via i-learn today except my hand notes that I will upload in a week later. Refer to your module.
ReplyDelete