CCR的68000 [英] CCR on the 68000

查看:246
本文介绍了CCR的68000的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,有人问我从一个朋友谁也努力学习和理解语言的装配问题。他问:

So i was asked an assembly question from a friend who is also trying to learn and understand the language. He asked:

由于下列寄存器的值:

D0: 364B 421E
D1: F3FC 9066

指令执行后:

cmp.w    D0,D1

什么是CCR中的结果值:

what would be the resulting values in the CCR:

N:    Z:    V:    C:

和是否每个以下分支将发生于:

and whether or not each of the following branches to would occur:

BLO    <Label>     Yes or No?

BVC    <Label>     Yes or No?

BGE    <Label>     Yes or No?

BMI    <Label>     Yes or No?

BLT    <Label>     Yes or No?

BCS    <Label>     Yes or No?

有人能帮助我理解它,以及这种方式,当我向他解释,我可以加深我理解的概念和答案。谢谢你。

Can someone help me out in understanding it as well that way when i explain it to him, i can deepen my understand of the concept and answer. Thank you.

推荐答案

这可能有助于映射概念,现代的条款。 C标志对应的无符号运算和N和V标志对应符号算术。 Z标志都有效。

It may help to map the concepts to modern-day terms. The C flag corresponds to unsigned arithmetic and the N and V flags correspond to signed arithmetic. The Z flag is valid for both.

分支指令在全部拼写出来M68000程序员参考手册。请注意,在表中几个错别字。

The branch instructions are fully spelled out in table 3-19 of the M68000 Programmer's Reference Manual. Note that there are a couple of typos in the table.

有关无符号运算使用以下分支:

For unsigned arithmetic use the following branches:

>   BHI
<=  BLS
>=  BCC/BHS
<   BCS/BLO

有关签署算术使用如下分支:

For signed arithmetic use the following branches:

>=  BGE
<   BLT
>   BGT
<=  BLE

和这些工作为:

==  BEQ
!=  BNE

最后,还有的BVS / BVC对。当有溢出,这意味着该结果的符号位不从输入的符号位跟随V标志被置位。从一个正数减去一个负数应该总是导致例如一个正数。

Finally there's the BVS/BVC pair. The V flag is set when there's overflow, meaning the sign bit of the result doesn't follow from the sign bits of the inputs. Subtracting a negative number from a positive number should always result in a positive number for example.

这篇关于CCR的68000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆