Table of Contents
ToggleProblem
Write an ALP for 8051 microcontroller to multiply two numbers. Assume multiplicand is stored in internal memory location 40H and multiplier in memory location 41H. Store the LB and HB of the result in memory location 42H and 43H respectively.
Algorithm
Step 1: Load multiplicand from internal memory 40h to accumulator.
Step 2: Load multiplier from 41h into register B, the address of register b is F0h
Step 3: Multiply A and B
Step 4: Store the lower byte of result from accumulator to memory address 42h.
Step 5: Store the higher byte of result from register B to memory address 43h.
Step 6: Stop
Flowchart
Program
MOV A, 40h ; Copy the content of 40h into accumulator
MOV 0F0h, 41h ; Copy content of 41h into register B
MUL AB ; Multiply contents of Accumulator and B register
MOV 42H, A ; Copy the lower byte of result from accumulator to 42h
MOV 43H, 0F0h ; Copy the higher byte of result from B register to 43h
STOP: AJMP STOP ; Stop
Recent posts
Related posts:
- Assembler Directives in 8051 Microcontroller
- Features of 8051 Microcontroller
- Memory Organization of 8051 Microcontroller
- Addressing Modes in 8051 Microcontroller
- Instruction Set in 8051 Microcontroller
- Architecture of 8051 Microcontroller
- PSW Register in 8051 Microcontroller | Program Status Word
- Pin Configuration of 8051 Microcontroller
- The Stack and Stack Pointer in 8051 Microcontroller
- Stack Pointer Data Pointer and Program Counter in 8051 Microcontroller
- Functions of Timing and Control Unit of 8051
- Functions of Ports in 8051 Microcontroller
- Port Structure of 8051 Microcontroller
- Reset Circuit of 8051 Microcontroller
- Registers in 8051 Microcontroller
- Boolean Processor in 8051 Microcontroller
- Power Saving Mode in 8051 | 8051 Power Down and Idle Mode
- 8051 Microcontroller Family
- Program Development Steps in ALP
- Addition of Two 8-Bit Numbers in 8051 Microcontroller
- Addition of Two 8 Bit Numbers with Carry in 8051 Microcontroller
- 8051 Program for Addition of Two 16 Bit Numbers
- 8051 Program to Add an Array of Numbers
- 8051 Program for Subtraction of Two 8-Bit Numbers
- 8051 Program for Subtraction of Two 16 bit Numbers