汇编语言,两个数字的想加
Problem statement:
问题陈述:
Write an assembly language program in 8085 microprocessor to multiply two 16 bit numbers.
在8085微处理器中编写汇编语言程序,以将两个16位数字相乘。
Assumption:
假设:
Starting address of program: 2000
程序的起始地址:2000
Input memory location: 2050, 2051, 2052, 2053
输入存储器位置:2050、2051、2052、2053
Output memory location: 2054, 2055, 2056, 2057
输出存储器位置:2054、2055、2056、2057
Algorithm:
算法:
Load the first data in HL pair.
加载HL对中的第一个数据。
Move content of HL pair to stack pointer.
将HL对的内容移到堆栈指针。
Load the second data in HL pair and move it to DE.
将第二对数据装入HL对并将其移至DE。
Make H register as 00H and L register as 00H.
将H寄存器设为00H,将L寄存器设为00H。
ADD HL pair and stack pointer.
添加HL对和堆栈指针。
Check for carry if carry increment it by 1 else move to next step.
检查进位是否将进位加1,否则进入下一步。
Then move E to A and perform OR operation with accumulator and register D.
然后将E移至A,并对累加器和寄存器D执行“或”运算。
The value of operation is zero, then store the value else goto step 3.
运算的值为零