Back
MASM : STACK : CPUSHANDBIS
CPUSHANDBIS:

Syntax:

Description:

CPUSHANDBISxx pushes the following boolean conditions on top of the stack:

Stack before CPUSHANDBISxx:

High Condition Low Condition
A B Top
C D Next

Stack after CPUSHANDBISxx:

Bank Selector Stack Item High Condition Low Condition
If Bs3 = 1 (low) Top ([Rs0]*[Rs1] op [Rs2]) & A ([Rs0]*[Rs1] op [Rs2]) & B
Next A B
Next C D

Note: [Rs] denotes the complex representation of the data on both banks of register RsX, i.e., [R] = (data on low bank) + i (data on high bank); A, B, C, D take the values TRUE or FALSE; and op depends on the relation:

  • For EQ, op is ==
  • For NE, op is !=

Comparison is done through complex normal operations. It is customary to have in the relevant banks of Rs0 the value 1.0+i0.0, i.e.:

  • [Rs0].L = 0x3FF0000000000000, [Rs0].H = 0x0000000000000000

Please note that the conditions pushed on top of the stack are independent of the value of BS3.

Microcode Pattern:

Takes 12 cycles to execute.
    Example: CPUSHANDBISxx 0xFF 2 0x41 0xA 0xB

	  
STKC  FLW  IOC  AGU   ASEL BS5 P5 BS4 C4 P4  MPC  BS3 C3 P3 P2 P1 P0
--------------------------------------------------------------------
  -    -    -    -      -   0  00  0   0 00  CN10  0   0 00 00 0a 41
  -    -    -    -      -   0  00  0   0 00    -   0   0 00 00 00 00
  -    -    -    -      -   0  00  0   0 00    -   0   0 00 0b 00 00
  -    -    -    -      -   0  00  0   0 00    -   0   0 00 00 00 00
  -    -    -    -      -   0  00  0   0 00    -   0   0 00 00 00 00
  -    -    -    -      -   0  00  0   0 00    -   0   0 00 00 00 00
  -    -    -    -      -   0  00  0   0 00    -   0   0 00 00 00 00
  -    -    -    -      -   0  00  0   0 00    -   0   0 00 00 00 00
  -    -    -    -      -   0  00  0   0 00    -   0   0 00 00 00 00
  -    -    -    -      -   0  00  0   0 00    -   0   0 00 00 00 00
  -    -    -    -      -   0  00  0   0 00    -   2   0 ff 00 00 00
PA2xx  -    -    -      -   0  00  0   0 00    -   0   0 00 00 00 00
--------------------------------------------------------------------

where: rel is one of {EQ,NE}.

Exceptions :

The exceptions are the same as the ones of the CNORM operations

Example :

!! Initial conditions:
!!
!! Content of register 0xA:
!!     [0xA].H = 0x0000000000000000
!!     [0xA].L = 0x3ff0000000000000
!!
!! Content of register 0xB:
!!     [0xB].H = 0xc004000000000000
!!     [0xB].L = 0x401e000000000000
!!
!! Content of register 0xC:  
!!     [0xC].H = 0xc004000000000000
!!     [0xC].L = 0x400e000000000000
!! 
!! Top of the stack is: H = A, L = B

CPUSHANDBISEQ 255 3 0xA 0xB 0xC  !! Pushes: High = TRUE & A  Low = TRUE & B
CPUSHANDBISEQ 255 2 0xA 0xB 0xC  !! Pushes: High = TRUE & A  Low = TRUE & B
CPUSHANDBISEQ 255 1 0xA 0xB 0xC  !! Pushes: High = TRUE & A  Low = TRUE & B

APE Group Zeuthen. 2003
$Id: cpushandbis_masm.php,v 1.2 2004/08/04 09:45:20 noe Exp $
$Id: syntax.php,v 1.8 2004/08/04 09:25:34 noe Exp $