了解" S [CC" 68000汇编指令 [英] Understanding the "S[cc]" instructions of 68000 assembly

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

问题描述

我想了解S [CC]中的68000汇编指令集。

I'm trying to understand the "S[cc]" set of instructions in 68000 assembly.

指令的格式是这样的:

S[cc] reg

[CC] 是一个条件code(例如, SEQ 表示设置是否等于 )。如果规定的条件[CC] 为真,寄存器设置为所有的 1 秒。否则,该寄存器设置为所有的 0 秒。

[cc] is a condition code (for example, SEQ means "set if equals"). If the condition specified by [cc] is true, the register is set to all 1s. Otherwise, the register is set to all 0s.

有一件事我不明白:哪里的 S [CC] 操作一下检查,如果条件是真的吗?不会检查标志?

There's one thing I don't understand: where does the S[cc] operation look to check if the condition is true? Does it check the flags?

如果是这样,比我想注册 D0 举行前pression结果 D0 = D1 ,这是我需要做的:

If so, than if I want register D0 to hold the result of the expression D0 = D1, this is what I need to do:

CMP D0,D1 ; this sets the flags according to the result
SEQ D0 ; sets D0 to true if the flags indicate the condition is true. else, sets it to false.

这是正确的?或者我不能正确理解这个操作?

Is this correct? Or do I not understand this operation correctly?

推荐答案

是的,它会检查标志,看着助记符时候应该变得明显:

Yes, it checks the flags, which should become apparent when looking at the mnemonics:

SCC set on carry clear (!C)
SCS set on carry set (C)
SEQ set on equal (Z)
SGE set on greater than or equal (N.V + !N.!V)
SGT set on greater than (N.V.!Z + !N.!V.!Z)
SHI set on higher than (!C.!Z)
SLE set on less than or equal (Z + N.!V + !N.V)
SLS set on lower than or same (C + Z)
SLT set on less than (N.!V + !N.V)
SMI set on minus (i.e., negative) (N)
SNE set on not equal (!Z)
SPL set on plus (i.e., positive) (!N)
SVC set on overflow clear (!V)
SVS set on overflow set (V)
SF  set on false (i.e., set never) (0)
ST  set on true (i.e., set always) (1)

http://de.scribd.com/doc/拍摄418461 /易摩托罗拉68K-参考 51页。我不知道的第一件事大约68K ASM。 ; - )

Taken from http://de.scribd.com/doc/418461/Easy-Motorola-68k-Reference page 51. I don't know the first thing about 68k ASM. ;-)

这篇关于了解" S [CC" 68000汇编指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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