1. 8 BIT ARITHMETIC OPERATION
                                    a. 8-BIT ADDITION
AIM:  
            To write an assembly language program for the addition of two 8-bit numbers
APPARATUS REQUIRED:
                                                8085 kit, power chord
ALGORITHM:
            1. Start the program
            2. Initialize the carry register as zero.
            3. Load the accumulator immediately as 51
            4. Load the B register as EB
            5. Add B register as accumulator
            6. Jump on no carry to step 8
            7. Increment the C register
            8. Store the content of accumulator to the memory location 5000
            9. Store the content of C register   
10. Stop the program.
PROGRAM:      
|     ADDRESS  |        LABEL  |        OPCODE  |        MNEMONICS  |        OPERAND  |        COMMENTS  |   
|     4100  |        |        0E, 00  |        MVI        |        C, 00  |        Clear c register  |   
|     4102  |        |        3E,data1  |        MVI  |        A.data1  |        Movedata1toaccumulator  |   
|     4104  |        |        06,data2  |        MVI  |        B, data2  |        Move data2 to B Register  |   
|     4106  |        |        80  |        ADD  |        B  |        Add BReg to accumulator  |   
|     4107  |        |        D2, 0B, 41  |        JNC  |        GO (410B)  |        Jump on No carry to address  |   
|     410A  |        |        0C  |        INR  |        C  |        Increment C Register  |   
|     410B  |        GO  |        32,00,50  |        STA  |        5000  |        Store the result  |   
|     410E  |        |        79  |        MOV  |        A, C  |        Move carry to acc  |   
|     410F  |        |        32,01,50  |        STA  |        5001  |        Store the carry  |   
|     4112  |        |        76  |        HLT  |        |        Stop the program  |   
INPUT:         A = 51,B = EB
OUTPUT: 5000=3C,           5001 = 01 (C)           
RESULT:
            Thus the assembly language program for 8-bit addition is executed and the results are verified.
0 comments:
Post a Comment