java 数字字母进位_使用带有进位的8085微处理器将两个8位数字相乘

java 数字字母进位

Problem statement:

问题陈述:

Multiplication of two 8 bits numbers using 8085 microprocessor with carry.

使用带有进位的8085微处理器将两个8位数字相乘。

Algorithm:

算法:

  1. Load HL pair with initial data using LHLD command.

    使用LHLD命令向HL对加载初始数据。

  2. Exchange the data of HL and DE pair using XCHG command.

    使用XCHG命令交换HL和DE对的数据。

  3. Copy the data of register D into Register C.

    将寄存器D的数据复制到寄存器C。

  4. Now initialize register D with 0.

    现在将寄存器D初始化为0。

  5. Also initialize HL pair with 0 using LXI command.

    还可以使用LXI命令将HL对初始化为0。

  6. Use the DAD command to add the data of DE pair into the data of HL pair and store in HL Pair.

    使用DAD命令将DE对的数据添加到HL对的数据中并存储在HL Pair中。

  7. Decrease the value of C by one.

    将C的值减一。

  8. Check if the result from previous instruction resets the zero flag and if true, jump to address XXX.

    检查前一条指令的结果是否重置了零标志,如果为真,则跳转到地址XXX。

  9. Store the content of the HL pair into desired location.

    将HL对的内容存储到所需位置。

  10. Stop.

    停止。

Program:

程序:

	LHLD 2050	
	XCHG		
	MOV C, D	
	MVI D 00	
	LXI H 0000	
xxx	DAD D		
	DCR C		
	JNZ 200A	
	SHLD 3050	
	HLT


Observation:

观察:

    INPUT: 
    2050:43
    2051:07

    OUTPUT: 
    3050:D5
    3051:01

Hence successfully multiplied two 8 bits numbers with carry using 8085 microprocessor..

因此,使用8085微处理器成功地将两个8位数字乘以进位。

翻译自: https://www.includehelp.com/embedded-system/multiplication-of-two-8-bits-numbers-using-8085-microprocessor-with-carry.aspx

java 数字字母进位

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值