cmps.c File Reference

#include <stdint.h>
#include <errno.h>
#include "emu/emu.h"
#include "emu/emu_cpu.h"
#include "emu/emu_cpu_data.h"
#include "emu/emu_cpu_stack.h"
#include "emu/emu_memory.h"
#include <stdio.h>
Include dependency graph for cmps.c:

Defines

#define INSTR_CALC(bits, a, b)
#define INSTR_CALC_AND_SET_FLAGS(bits, cpu, a, b)
#define INSTR_CALC_EDI_ESI(cpu, bits)

Functions

int32_t instr_cmps_a6 (struct emu_cpu *c, struct emu_cpu_instruction *i)
int32_t instr_cmps_a7 (struct emu_cpu *c, struct emu_cpu_instruction *i)

Define Documentation

#define INSTR_CALC ( bits,
a,
 ) 
Value:
UINTOF(bits) operand_a = a; \
UINTOF(bits) operand_b = b; \
UINTOF(bits) operation_result = operand_a - operand_b;
#define INSTR_CALC_AND_SET_FLAGS ( bits,
cpu,
a,
 ) 
Value:
INSTR_CALC(bits, a, b) \
INSTR_SET_FLAG_ZF(cpu) \
INSTR_SET_FLAG_PF(cpu) \
INSTR_SET_FLAG_SF(cpu) \
INSTR_SET_FLAG_CF(cpu, -) \
INSTR_SET_FLAG_OF(cpu, -,bits)
#define INSTR_CALC_EDI_ESI ( cpu,
bits   ) 
Value:
{ \
        if ( !CPU_FLAG_ISSET(cpu,f_df) ) \
        { \
                cpu->reg[edi]+=bits/8; \
                cpu->reg[esi]+=bits/8; \
        } \
        else \
        { \
                cpu->reg[edi]-=bits/8; \
                cpu->reg[esi]-=bits/8; \
        } \
}

Referenced by instr_cmps_a6(), and instr_cmps_a7().


Function Documentation

int32_t instr_cmps_a6 ( struct emu_cpu c,
struct emu_cpu_instruction i 
)
int32_t instr_cmps_a7 ( struct emu_cpu c,
struct emu_cpu_instruction i 
)

Generated on Sun Jan 9 16:50:01 2011 for libemu by  doxygen 1.6.1