Exemple #1
0
int FSFD(String *arguments){
	int operand1;
	int operand2;
	int opcode;
	
	operand1 = operand1ExtractValue(arguments);
	operand2 = operand1ExtractValue(arguments);
	
	return opcode = (0x0<<24) + (operand2<<16) + (0x0<<8) + (operand1);
}
Exemple #2
0
/*
*	K
*	
*	Operation:
*		operand1 take LSB 0 to 7 bit value
*
*	Return:
*		opcode value
*
*/
int K(String *arguments){
	int operand1,operand2,operand3;
	int opcode;
	ErrorCode error;
		
	operand1 = operand1ExtractValue(arguments);

	operand1 = operand1&0xff;

	return opcode = operand1;
}
Exemple #3
0
/**
 *	NS
 *	
 *	To generate the opcode is based on the operand1 and operand2. The operand1
 *	is get the value and shifted to left 16 times and return. After that get the 
 *	operand1 and mask with 0xff and return. The operand2 is get the value and 
 *	shifted to left 8 times and return
 *
 *	Input 	:
 *		arguments
 *
 *	Return	:
 *		opcode
 **/
int NS(String *arguments){
	int operand1;
	int operand2;
	int opcode;
	
	operand1 = operand1ExtractValue(arguments);
	operand2 = operandExtract1BitsValue(arguments);
	
	return opcode = (0x0<<24) + (operand1<<16) + (operand2<<8) + (operand1 & 0xff);


}
Exemple #4
0
int NS(String *arguments){
	int operand1;
	int operand2;
	int opcode;
	
	operand1 = operand1ExtractValue(arguments);
	operand2 = operandExtract1BitsValue(arguments);
	
	return opcode = ((operand1&0xfff00)<<8) | (operand2<<8) | (operand1 & 0xff);


}
Exemple #5
0
int FA(String *arguments){
	int operand1;
	int operand2;
	int opcode;
	
	operand1 = operand1ExtractValue(arguments);
	operand2 = extract1bitsACCESSBANKED(arguments, operand1);
	
	operand1 = operand1 & 0xff;
	
	if(operand2%2 != 0){
		operand2 = 0x1;
	}else{
		operand2 = 0x0;
	}

	
	return opcode = operand1 + (operand2<<8);
}