Professional Documents
Culture Documents
Instruction Sap 2
Instruction Sap 2
80
81 A0 Al E6 CD 2F 3D 05 OD 76 DB 3C 04 OC FA C3 C2 CA 3A 78 79 47 41
Instruction
ADD B
ADD C ANA B ANA C ANI byte CALL address CMA DCR A DCR B DCR C HLT IN byte INR A INR B INR C JM address JMP address JNZ address JZ address LDA address MOV A,B MOV A,C MOV B,A MOV B,C
Description A=A+B A=A+C A=A.B A=A.C A=A.(1 byte immediate data) Call subrotine A=A A=A-1 B=B-1 C=C-1 Terminate program Transfer the Data from Input port to Accumulator A=A+1 B=B+1 C=C+1 Jump on minus to specified Address Jump to specified Address Jump on Not Zero to specified Address Jump on zero to specified Address
Type of Instruction Arithmetic Arithmetic Logical Logical Logical Branching Logical Arithmetic Arithmetic Arithmetic
4 4
4 4 7 18 4 4 4 4 5 10 4 4 4 10/7 10 10/7 10/7 13 4 4 4 4
S, Z S. Z S, Z S,Z S, Z None None S, Z S,Z S, Z None None S, Z S,Z S, Z None None None None None None None None None
Register Register Register Register Immediate Immediate Implied Register Register Register
1 1 1 1 2 3 1 1 1 1 1 2 1 1 1 3 3 3 3 3 1 1 1 1
Direct Register Register Register Immediate Immediate Immediate Immediate Direct Register Register Register Register
Data Transfer Arithmetic Arithmetic Arithmetic Branching Branching Branching Branching Data Transfer
Copy the content of B to A Copy the content of C to A Copy the content of A to B Copy the content of C to B
1 1 2 2 2 1 1 1 2 2 1 1 1 3 1 1 1 1 2
Copy the content of A to C Copy the content of B to C Load 1 byte immediate data to accumulator Load 1 byte immediate data to B Regster Load 1 byte immediate data to C register No Operation
Data Transfer Data Transfer Data Transfer Data Transfer Data Transfer
Register Register Immediate Direct Implied Implied Implied Direct Register Register Register Register Immediate
A = AORB A = AORC
A= A(OR)(1 byte immediate data) Transfer content of Accumulator to output port Rotate left Accumulator content Rotate Right Accumulator content Return Store Accumulator content to memory A=A-B A=A-C
Logical Logical Logical Data Transfer Logical Logical Branching Data Transfer Arithmetic Arithmetic Logical Logical Logical
A = A B A = AC
A = A (1ByteData )
Program 1. Write a program to Add the contents of memory Address 3034H and 3035H and store result at memory 3036H, 2. Write a program to Sub the contents of memory Address 3064H and 3065H and store result at memory 3066H, 3. Write a program to set D4 bit of the contents of memory Address 4034H without affecting other bit. 4. Write a program to clear D3 bit of the contents of memory Address 4004H without affecting other bit. 5. Write a program to complement D2 bit of the contents of memory Address 4000H without affecting other bit.