English
Language : 

SD6830 Datasheet, PDF (20/34 Pages) AUK corp – 4BIT MICROCONTROLLER
SD6830
9.3 Instruction Descriptions
ADD n
Binary code : 0110xxxx
Syntax
: [<label>] ADD n
Operation
: (A) (A) + n, n=0~15 ( n must be decimal number )
Flags
: CY: Unaffected. SF: Set to one if carry occurs, cleared otherwise.
Words/Cycles : 1/1
Description : Adds an immediate data to the accumulator and stores the result in
the accumulate.
Example
: ADD 8
; Add 8 to A.
JMP 035 ; Jump to 035 if 0 A 7
JMP 05F ; Jump to 05F if 8 A 15
ADDC @HL
Binary code 00010000
Syntax
: [<label>] ADDC @HL
Operation
: (A) (A) + M[(HL)] + (CY), (CY) Carry
Flags
: CY: Set on carry-out of (A) + M[(HL)] + (CY)
SF: Unaffected
Words/Cycles : 1/1
Description : Adds the contents of the accumulator, the contents of data memory
addressed by registers H and L, and the carry bit. It stores the result in
the accumulator and the carry flag.
Example
: CLRB CY ; Clear CY to zero
LDA
5 ; Load 5 to A
CLRB H ; Clear H to zero
LDL
6 ; Load 6 to L
ADDC @HL ; Add the content of A, M[(06)], and the content of CY
CAL addr
Binary code : 11xxxxxx
Syntax
: [<label>] CAL addr
Operation : (SK1) (SK0), (SK0) (PC) + 1, (PCL) addr, addr = 000 ~ 03F
( addr must be hexadecimal number )
Flags
: CY: Unaffected SF: Unaffected
Words/Cycles : 1/1
Description : Calls a subroutine located at the indicated address and pushes the current
contents of the program counter to the top of stack. The indicated address
must be within the current page.
Example
: CAL 100 : Call subroutine located at the 100. The 100 must be logical
address and within the current page.
KSI-W002-000
20