Microcontroller 8-Bit Addition
8- BIT ADDITION
ALGORITHM:
- Initialize the pointer to the memory for data and result.
- The ADD instruction writes the result in the accumulator.
- Store the result into Memory from A registers.
INPUT:
- MOV A,# 13
- ADD A,#14
OUTPUT:
- 8600 27H
ADDRESS | OPCODES | MNEMONICS | COMMENTS |
8500 | 74 13 | MOV A,#13 | Give 8 bit first data in A register |
8502 | 24 14 | ADD A,#14 | Give 8 bit second data in acc move |
8504 | 90 86 00 | MOV DPTR,#8600 | Store in 8600 memory location |
8507 | F0 | MOVX @DPTR,A | Store the value acc move |
8508 | 80 FE | HERE: SJMP HERE | End |
Recent Comments