home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
405.lha
/
AppleII_Emulators_src
/
src-2
/
cpu_bran.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-06-28
|
2KB
|
143 lines
#include <cpu_prog_model.h>
#include <cpu6502_addrm.h>
void BCC( code)
PM *code;
{
if (!code->Ca)
{
short int value;
value = code->Me [(code->PC)++];
if (value >= 0x80)
value |= (-1 ^ 0xFF);
(code->PC) += value;
}
else
(code->PC)++;
}
void BCS( code)
PM *code;
{
if (code->Ca)
{
short int value;
value = code->Me [(code->PC)++];
if (value >= 0x80)
value |= (-1 ^ 0xFF);
(code->PC) += value;
}
else
(code->PC)++;
}
void BEQ( code)
PM *code;
{
if (code->Ze)
{
short int value;
value = code->Me [(code->PC)++];
if (value >= 0x80)
value |= (-1 ^ 0xFF);
(code->PC) += value;
}
else
(code->PC)++;
}
void BMI( code)
PM *code;
{
if (code->Ne)
{
short int value;
value = code->Me [(code->PC)++];
if (value >= 0x80)
value |= (-1 ^ 0xFF);
(code->PC) += value;
}
else
(code->PC)++;
}
void BNE( code)
PM *code;
{
if (!code->Ze)
{
short int value;
value = code->Me [(code->PC)++];
if (value >= 0x80)
value |= (-1 ^ 0xFF);
(code->PC) += value;
}
else
(code->PC)++;
}
void BPL( code)
PM *code;
{
if (!code->Ne)
{
short int value;
value = code->Me [(code->PC)++];
if (value >= 0x80)
value |= (-1 ^ 0xFF);
(code->PC) += value;
}
else
(code->PC)++;
}
void BVC( code)
PM *code;
{
if (!code->Ov)
{
short int value;
value = code->Me [(code->PC)++];
if (value >= 0x80)
value |= (-1 ^ 0xFF);
(code->PC) += value;
}
else
(code->PC)++;
}
void BVS( code)
PM *code;
{
if (code->Ov)
{
short int value;
value = code->Me [(code->PC)++];
if (value >= 0x80)
value |= (-1 ^ 0xFF);
(code->PC) += value;
}
else
(code->PC)++;
}