Microcontroller 8-Bit Substraction
by
eees.in
·
Published
· Updated
ALGORITHM:
- Initialize the pointer to the memory for data and result.
- The SUBB instruction writes the result in the accumulator.
- Store the result into Memory from A registers.
INPUT:
OUTPUT:
PROGRAM:
ADDRESS | OPCODES | MNEMONICS | COMMENDS |
8500 | 74 20 | MOV A,#20 | Give 8 bit first data in A register |
8502 | 94 10 | SUBB A,#10 | 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