MSM66911 Information

Registers

  8 16
000 r0 X1
001 r1 X2
010 r2 DP
011 r3 PSW
100 r4 er0
101 r5 er1
110 r6 er2
111 r7 er3

ERn: ER0, ER1, ER2, ER3
PRn: X1, X2, DP, USP
Rn R0, R1, R2, R3, R4, R5, R6, R7

Other Registers: SSP, PSWH, PSWL, LRB

Special Function Registers (SFR)

Address Name Symbol R/W 8/16-bit Operation Reset
0x00 System stack printer SSP (ASSP) R/W 8/16 0xFF
0x01 0xFF
0x02 Local register base LRB (ALRB) R/W 8/16 undefined
0x03
0x04 Program status word PSWL PSW R/W 8/16 0xC8
0x05 PSWH (APSW) 0x0C
0x06 Accumulator ACC R/W 8/16 0x00
0x07 0x00
0x10 Standby control register SBYCON R/W 8 0xF8

Program Status Word (PSW) (0x04 PSWL, 0x05 PSWH
R/W-0 R/W-0 R/W-0 R/W-0 U-1 U-1 R/W-0 R/W-0 U-1 U-1 R/W-0 R/W=0 U-1 R/W-0 R/W-0 R/W-0
CY ZF HC DD UF (MIP) MIP UF (MIP) UF (MIP) SCB2 SCB1 SCB0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

CY = Carry Flag
ZF = Zero Flag
HC = Half Carry Flag
DD = Data Descriptor
MIP = Master Interrupt Priority Flag
UF = User Flag
SCB = System Control Base

Op Codes

  0 1 2 3 4 5 6 7
0 NOP RT RTI J N16
1 VCAL 0 VCAL 1 VCAL 2 VCAL 3 VCAL 4 VCAL 5 VCAL 6 VCAL 7
2 (r0) (r1) (r2) (r3) (r4) (r5) (r6) (r7)
3 JRNZ DP, addr SCAL addr CAL N16 ROL A L A,er0 L A,er1 L A,er2 L A,er3
4 L A,X1 L A,X2 L A,DP ROR A (er0) (er1) (er2) (er3)
5 MOV X1, A MOV X2, A MOV DP, A SLL A PUSHS LRB PUSHS A PUSHS PSW ST A, #N
6 MOV X1, #N16 MOV X2, #N16 MOV DP, #N16 SRL A POPS LRB POPS A POPS PSW L A, #N
7 INC X1 INC X2 INC DP SRA A LB A, #N
8 DEC X1 DEC X2 DEC DP SWAP XNBL A, off N8 SC ADD A, #N ADDB A, off #N
9 (X1) (X2) (DP) DAA DAS RC ADC A, #N ADCB A, off #N
A (SSP) (USP) (PSWH) (PSWL) (LRB) SUB A,#N SUBB A, off #N
B (N16[X1])16 (N16[X2])16 ([DP])16 (N8[USP])16 (off N8)16 (N8)16 SBC A, #N SBCB A, #N
C (N16[X1])8 (N16[X2])8 ([DP])8 (N8[USP])8 (off N8)8 (N8)8 CMP A, #N CMPB A, off #N
D ST A, N16[X1] ST A, N16[X2] ST A, [DP] ST A, N8[USP] ST A, off N8 ST A, N8 AND A, #N AND A off #N
E L A,N16[X1] L A,N16[X2] L A,[DP] L A,N8[USP] L A,off N8 L A,N8 OR A, #N ORB A, off #N
F LB A,N16[X1] LB A,N16[X2] LB A,[DP] LB A,N8[USP] LB A,off N8 LB A,N8 XOR A, #N XORB A, off #N

  8 9 A B C D E F
0 ADD A, er0 ADD A, er1 ADD A, er2 ADD A, er3 ADD A, X1 ADD A, X2 ADD A, DP ADD A, USP
1 ADC A, er0 ADC A, er1 ADC A, er2 ADC A, er3 ADC A, X1 ADC A, X2 ADC A, DP ADC A, USP
2 SUB A, er0 SUB A, er1 SUB A, er2 SUB A, er3 SUB A, X1 SUB A, X2 SUB A, DP SUB A, USP
3 SBC A, er0 SBC A, er1 SBC A, er2 SBC A, er3 SBC A, X1 SBC A, X2 SBC A, DP SBC A, USP
4 CMP A, er0 CMP A, er1 CMP A, er2 CMP A, er3 CMP A, X1 CMP A, X2 CMP A, DP CMP A, USP
5 AND A, er0 AND A, er1 AND A, er2 AND A, er3 AND A, X1 AND A, X2 AND A, DP AND A, USP
6 OR / XOR A, er0 OR / XOR A, er1 OR / XOR A, er2 OR / XOR A, er3 OR / XOR A, X1 OR / XOR A, X2 OR / XOR A, DP OR / XOR A, USP
7 LB A,r0 LB A,r1 LB A,r2 LB A,r3 LB A,r4 LB A,r5 LB A,r6 LB A,r7
8 ST A, er0 ST A, er1 ST A, er2 ST A, er3 ST A, X1 ST A, X2 ST A, DP ST A, USP
9 MOVB r0, #N MOVB r1, #N MOVB r2, #N MOVB r3, #N MOVB r4, #N MOVB r5, #N MOVB r6, #N MOVB r7, #N
A INCB r0 INCB r1 INCB r2 INCB r3 INC A
B DECB r0 DECB r1 DECB r2 DECB r3
C JGT addr JEQ addr JLT addr JNS addr JPS addr JGE addr JNE addr JLE addr
D JBR off N8.0,addr JBR off N8.1,addr JBR off N8.2,addr JBR off N8.3,addr JBR off N8.4,addr JBR off N8.5,addr JBR off N8.6,addr JBR off N8.7,addr
E JBS off N8.0,addr JBS off N8.1,addr JBS off N8.2,addr JBS off N8.3,addr JBS off N8.4,addr JBS off N8.5,addr JBS off N8.6,addr JBS off N8.7,addr
F EXTND CLR A CLRB A CPL C INC LRB DEC LRB BRK

Op Codes Escapes

  0 1 2 3 4 5 6 7
0
1 XCHG * SBR * RBR * TRB * INC * / INCB * DEC * / DECB *
2 MBR *, C MBR C, * J [*] CAL *
3 DIVB DIV
4
5
6
7
8
9
A SUB *, #N16 SUB *, A SUB A, * SUB *, off N8
B SBC *, #N16 SBC *, A SBC A, * SBC *, off N8 ROL *
C CMPB *, #N8 ROR *
D SLL *
E OR *, #N16 OR *, A OR A, * OR *, off N8 SRL *
F XOR *, #N16 XOR *, A XOR A, * XOR *, off N8 SRA *

  8 9 A B C D E F
0 RB *.0 RB *.1 RB *.2 RB *.3 RB *.4 RB *.5 RB *.6 RB *.7
1 SB *.0 SB *.1 SB *.2 SB *.3 SB *.4 SB *.5 SB *.6 SB *.7
2 MB C, *.0 MB C, *.1 MB C, *.2 MB C, *.3 MB C, *.4 MB C, *.5 MB C, *.6 MB C, *.7
3 MB *.0, C MB *.1, C MB *.2, C MB *.3, C MB *.4, C MB *.5, C MB *.6, C MB *.7, C
4 MOVB r0, * MOVB r1, * MOVB r2, * MOVB r3, * MOVB r4, * MOVB r5, * MOVB r6, * MOVB r7, *
5
6
7 MOV X1, * MOV X2, * MOV DP, * MOV USP, * MOVB off N8, * MOV PSW, * MOV SSP, * MOV LRB, *
8 MOVB PSWL, * MOVB PSWH, * MOV *, A / MOVB *, A
9 MOV *, #N16 / MOVB *, #N8 MOVB A, * / MOV A, * LC A, N16 LCB A, N16 CMPC A, N16 CMPCB A, N16
A LC A,[N16(*)] LC A,N16(*) LCB A,[N16(*)] LCB A, (N16*) CMPC A, [*] CMPC A, * CMPCB A,[*] CMPCB A, *
B
C
D
E
F



movb	off xx, reg8	00100rrr01111100xxxxxxxx
267CXX		MOVB	off XX, r6

mov	off xx, reg16	01000rrr01111100xxxxxxxx
447CXX		MOV	off XX, er0
457CXX		MOV	off XX, er1

mov	ret16, ret16	01000rrr01111rrr
4478		MOV    X1, er0
4679		MOV    X2, er2
4778            MOV    X1, er3
447D            MOV    PSW, er0

mov	off XX, reg16	01000rrr01111100xxxxxxxx
447CXX          : MOV    off XX, er0		; should be er0 to er0 maybe same register is the reason they gave it different function?
477CXX         : MOV    off XX, er3		; should be er3 to er0 ?????
467CXX           : MOV    off XX, er2

mov	reg16, imm	01000rrr10011000xxxxxxxxxxxxxxxx
4598XXXX        : MOV    er1, #XXXX

mov	X1, A		01010000
50                 : MOV    X1, A

mov	LBR, imm	01010111xxxxxxxxxxxxxxxx
57XXXX           : MOV    LRB, #XXXX

mov	reg16, imm	01100rrrxxxxxxxxxxxxxxxx
60XXXX		MOV	X1, #XXXX
61XXXX		MOV	X2, #XXXX
62XXXX		MOV	DP, #XXXX

movb	reg8, imm	10011rrrxxxxxxxx
98XX		MOVB	r0, #XX
99XX		MOVB	r1, #XX
9CXX		MOVB	r4, #XX
9DXX		MOVB	r5, #XX
9EXX		MOVB	r6, #XX
9FXX		MOVB	r7, #XX

mov	DP, SSP		1010000001111010
A07A		MOV	DP, SSP

mov	SSP, imm	101010011000xxxxxxxxxxxxxxxx
A098XXXX	MOV	SSP, XXXX

movb	PSWH, imm	1010001010011000xxxxxxxx
A298XX		MOVB	PSWH, XX

mov	DP, XXXX[reg16]	10110rrrxxxxxxxxxxxxxxxx01111rrr
B1XXXX7A	MOV    DP, XXXX[X2]
B0XXXX7A	MOV    DP, XXXX[X1]
B1XXXX78        MOV    X1, 0238[X2]
B1XXXX7A        MOV    DP, 0236[X2]

mov	llll[X2], #XXXX	10110001llllllllllllllll10011000xxxxxxxxxxxxxxxx
B1LLLL98XXXX	MOV	LLLL[X2], #XXXX

mov	USP, [DP]	1011001001111011
B27B		MOV	USP, [DP]

mov	[DP], #XXXX	101100101000xxxxxxxxxxxxxxxx
B298XXXX	MOV	[DP], #XXXX

mov	off XX, off XX
B4XX7CMM        : MOV    off MM, off XX

mov	off LL, #XXXX	10110100llllllll10011000xxxxxxxxxxxxxxxx
B4LL98XXXX	MOV	off LL, #XXXX

mov	LL, #XXXX	10110101llllllll10011000xxxxxxxxxxxxxxxx
B5LL98XXXX	MOV	LL, #XXXX


movb	LLLL[reg16], #XX	11000rrrllllllllllllllll10011000xxxxxxxx
C0LLLL98XX     MOVB   LLLL[X1], #XX
C1DE0298XX     MOVB   N17[X2], #XX
C1600398XX	MOVB	N17[X2], #XX
C1DE0298XX	MOVB	N17[X2], #XX
C1FE0398XX	MOVB	N17[X2], #XX
C13B0298XX     : MOVB   N17[X2], #XX
C1 A5 02 98 1C     : MOVB   N17[X2], #1C
C1 B6 02 98 20     : MOVB   N17[X2], #20

movb	[reg16], #XX		11000rrr10011000xxxxxxxx
C298XX		MOVB   [DP], #XX

movb	PSWL, off XX	11000100xxxxxxxx10001000
C4XX88		MOVB	PSWL, off XX

movb	PSWL, XX	11000101xxxxxxxx10001000
C5XX88		MOVB	PSWL, XX

movb	XX, A		11000101xxxxxxxx10001010
C5XX8A		MOVB	XX, A

movb	off LL, XX	11000101xxxxxxxx01111100llllllll
C5XX7CLL	MOVB	off LL, XX

movb	off LL, #XX	11000100llllllll10011000xxxxxxxx
C4LL98XX	MOVB	off LL, #XX

movb	LL, #XX		11000101llllllll10011000xxxxxxxx
C5LL98XX	MOVB	LL, #XX