;File Name : prak01.ASM * ;Inc File : NONE * ;Hardware : NONE * ;Xtall : 12 MHz * ;Software : EDSIM51 Simulator * ;Date Start : 11 Mar 2010 * ;Date Revision 1 : NONE * ;Date End : NONE * ;Functions : Adding 3 bit => 1A0734 + 051B25 * ;Comments : * ;Design by : WOLVERINE * ;************************************************************************ ORG 0000H CLR C ; Set carry = 0 MOV A,#34H ; Set 34H to Acc ADD A,#25H ; 34H + 25H MOV R3,A ; R3 = 59H MOV A,#0F5H ; Set F5H to Acc ADDC A,#0BH ; Add Acc with 0BH and carry from the previous operation. MOV R2,A ; R3 = A MOV A,#0F4H ; Acc set F4H ADDC A,#0FBH ; Add Acc with FBH and carry from the previous operation. MOV R1,A ; R2 = A MOV A,#0 ; A = 0 ADDC A,#0 ; Adding Acc with 0. to see if any carry. MOV R0,A ; Set last carry to R0 SJMP $ END