Download 1 Program Summary

Transcript
4 applied instructions
Related flag
Flag meaning
Flag
Name
Function
M8020
Zero
ON:the calculate result is zero
OFF:the calculate result is not zero
M8021
Borrow
ON:the calculate result is less than -32768(16 bit) or -2147483648(32bit)
OFF:the calculate result is over -32768(16 bit) or -2147483648(32bit)
M8022
Carry
ON:the calculate result is over 32768(16 bit) or 2147483648(32bit)
OFF:the calculate result is less than 32768(16 bit) or 2147483648(32bit)
4-6-2.Subtraction [SUB]
1. Summary
Sub two numbers, store the result
Subtraction [SUB]
16 bits
SUB
32 bits
DSUB
Execution
Normally ON/OFF
Suitable
XC1.XC2.XC3.XC5.XCM
condition
Models
-
Hardware
-
Software
requirement
requirement
2.Operands
Operands
Function
Data Type
S1
The number address
16 bits /32 bits,BIN
S2
The number address
16 bits /32 bits,BIN
D
The result address
16 bits /32 bits,BIN
3.Suitable soft component
Word
Operands
System
D
FD
S1
●
S2
●
D
●
ED
Constant
Module
ID
TD
CD
DX
DY
DM
DS
K/H
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
QD