Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

X68k/Condition: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(Created page with ' <nowiki> 0x 1x 2x 3x 4x 5x 6x 7x 8x 9x Ax Bx Cx Dx Ex Fx 0 NUL DLE SPC 0 @ P ` p *1│ │ ー タ ミ │ │*2 1 SOH DC1 ! 1 A Q a …')
 
m (Xkeeper moved page X68k:Condition to X68k/Condition: normalize subpages and titles)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<nowiki> 0x  1x  2x  3x  4x  5x  6x  7x  8x  9x  Ax  Bx  Cx  Dx  Ex  Fx
{{subpage|game=Sharp X68000}}
0 NUL DLE SPC 0  @  P  `  p  *1│  │    ー  タ  ミ │  │*2
<pre>
1 SOH DC1 !  1  A  Q  a  q ┌非│第│。  ア  チ  ム │第│*3
・符号なしの表現 [条件成立フラグ状態]
2 STX DC2 "  2  B  R  b  r │漢│一│「  イ  ツ  メ │二│*4
X: N: Z: V:  C:
3 ETX DC3 #  3  C  S  c  s │字│水│」  ウ  テ  モ │水│*5
4 EOT DC4 $  4  D  T  d  t ├─┤準│、  エ  ト  ヤ │準│*6
5 ENQ NAK %  5  E  U  e  u │拡│漢│・  オ  ナ  ユ │漢│*6
6 ACK SYN &  6  F  V  f  v │張│字│ヲ  カ  ニ  ヨ │字│
7 BEL ETB '  7  G  W  g  w │外│  │ァ  キ  ヌ  ラ │  │
8 BS  CAN (  8  H  X   h  x │字├─┤ィ  ク  ネ  リ │
9 HT EM )  9  I  Y  i  y ├─┤第│ゥ  ケ  ノ  ル │  │
A LF  SUB *  :   J  Z  j  z │第│二│ェ  コ  ハ  レ ├─┤
B VT ESC +  ;  K  [  k  { │一│水│ォ  サ  ヒ  ロ │  │
C FF  FS  ,  <  L  \  l  | │水│準│ャ  シ  フ  ワ │外│
D CR  GS  -  =  M  ]  m  } │準│漢│ュ  ス  ヘ  ン │字│
E SO  RS  .  >  N  ^  n  ~ │漢│字│ョ  セ  ホ  ゙ │  │
F SI  US  /  ?  O  _  o  DEL│字├─┘ッ  ソ  マ  ゚ └─┘


*1 $80xx:半角文字(平仮名)
x<y HI (High) -  -  0:  -  0: HI:成立
*2 $f0xx:上付き1/4角文字(片仮名)
x≦y CC (Carry Clear) -  -  -  -  0: CC:成立
*3 $f1xx: (平仮名)
x>y CS (Carry Set) -  -  -  -  1: CS:成立
*4 $f2xx:下付き1/4角文字(片仮名)
x≧y LS (Lower or Same) -  -  -  -  1: LS:成立
*5 $f3xx: (平仮名)
LS (Lower or Same) -  -  1:  -  - LS:成立
*6 $f4xx,$f5xx:半角外字
 
</nowiki>
 
・符号ありの表現 [条件成立フラグ状態]
X:  N:  Z:  V:  C:
 
x<y GT (Greater Than) -  0:  0:  0:  - GT:成立
GT (Greater Than) -  1:  0:  1:  - GT:成立
x≦y GE (Greater or Equal) -  0:  -  0:  - GE:成立
GE (Greater or Equal) -  1:  -  1:  - GE:成立
x>y LT (Less Than) -  0:  -  1:  - LT:成立
LT (Less Than) -  1:  -  0:  - LT:成立
x≧y LE (Less or Equal) -  0:  -  1:  - LE:成立
LE (Less or Equal) -  1: -  0:  - LE:成立
LE (Less or Equal) -  -  1:  -  - LE:成立
 
 
・その他の表現 [条件成立フラグ状態]
X:  N:  Z:  V:  C:
 
x=y EQ (Equal) -  -  1:  -  - EQ:成立
x≠y NE (Not Equal) -  -  0: -  - NE:成立
PL (Plus) -  0:  -  -  - PL:成立
MI (Minus) -  1: -  -  - MI:成立
VC (Overflow Clear) -  -  -  0:  - VC:成立
VS (Overflow Set) -  -  -  1: - VS:成立
T  (True) -  -  -  -  - T :成立
F  (False) -  -  -  -  - F :不成立
 
==============================================================================
 
Pattern Condition (in words) CC    Formula Condition
----- ---- -- -- --------
0000 always True T 1
0001 always False F 0
0010 High HI <(u) !C・!Z
0011 Lower or Same LS ≧(u) C+ Z
0100 Carry Clear CC ≦(u) !C
0101 Carry Set CS >(u) C
0110 Not Equal NE ≠ !Z
0111 Equal EQ = Z
1000 Overflow Clear VC !V
1001 Overflow Set VS V
1010 Plus PL !N
1011 Minus MI N
1100 Greater or Equal GE ≦(s) N・ V+!N・!V
1101 Less Than LT >(s) N・!V+!N・ V
1110 Greater Than GT <(s) N・ V・!Z+!N・!V・!Z
1111 Less or Equal LE ≧(s) N・!V+!N・ V+ Z
 
Note:
For the greater/lesser comparisons, (u) means unsigned and (s) signed.
        For the Bcc instructions, the bit pattern belonging to the conition
        ($61??) yields BSR, the one belonging to the T condition yields BRA.
 
</pre>

Latest revision as of 02:42, 24 January 2024

This is a sub-page of X68k.

・符号なしの表現		[条件成立フラグ状態]
				 X:  N:  Z:  V:  C:

 x<y	HI (High)		 -   -   0:  -   0:	HI:成立
 x≦y	CC (Carry Clear)	 -   -   -   -   0:	CC:成立
 x>y	CS (Carry Set)		 -   -   -   -   1:	CS:成立
 x≧y	LS (Lower or Same)	 -   -   -   -   1:	LS:成立
	LS (Lower or Same)	 -   -   1:  -   -	LS:成立


・符号ありの表現		[条件成立フラグ状態]
				 X:  N:  Z:  V:  C:

 x<y	GT (Greater Than)	 -   0:  0:  0:  -	GT:成立
	GT (Greater Than)	 -   1:  0:  1:  -	GT:成立
 x≦y	GE (Greater or Equal)	 -   0:  -   0:  -	GE:成立
	GE (Greater or Equal)	 -   1:  -   1:  -	GE:成立
 x>y	LT (Less Than)		 -   0:  -   1:  -	LT:成立
	LT (Less Than)		 -   1:  -   0:  -	LT:成立
 x≧y	LE (Less or Equal)	 -   0:  -   1:  -	LE:成立
	LE (Less or Equal)	 -   1:  -   0:  -	LE:成立
	LE (Less or Equal)	 -   -   1:  -   -	LE:成立


・その他の表現			[条件成立フラグ状態]
				 X:  N:  Z:  V:  C:

 x=y	EQ (Equal)		 -   -   1:  -   -	EQ:成立
 x≠y	NE (Not Equal)		 -   -   0:  -   -	NE:成立
	PL (Plus)		 -   0:  -   -   -	PL:成立
	MI (Minus)		 -   1:  -   -   -	MI:成立
	VC (Overflow Clear)	 -   -   -   0:  -	VC:成立
	VS (Overflow Set)	 -   -   -   1:  -	VS:成立
	T  (True)		 -   -   -   -   -	T :成立
	F  (False)		 -   -   -   -   -	F :不成立

==============================================================================

Pattern	Condition (in words)	CC    Formula	Condition
-----	----			--	--	--------
0000	always True		T		 1
0001	always False		F		 0
0010	High			HI	<(u)	!C・!Z
0011	Lower or Same		LS	≧(u)	 C+ Z
0100	Carry Clear		CC	≦(u)	!C
0101	Carry Set		CS	>(u)	 C
0110	Not Equal		NE	≠	!Z
0111	Equal			EQ	=	 Z
1000	Overflow Clear		VC		!V
1001	Overflow Set		VS		 V
1010	Plus			PL		!N
1011	Minus			MI		 N
1100	Greater or Equal	GE	≦(s)	 N・ V+!N・!V
1101	Less Than		LT	>(s)	 N・!V+!N・ V
1110	Greater Than		GT	<(s)	 N・ V・!Z+!N・!V・!Z
1111	Less or Equal		LE	≧(s)	 N・!V+!N・ V+ Z

Note:
	For the greater/lesser comparisons, (u) means unsigned and (s) signed.
        For the Bcc instructions, the bit pattern belonging to the conition
        ($61??) yields BSR, the one belonging to the T condition yields BRA.