home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
programs
/
emulaton
/
trash80
/
!Trash80
/
c
/
EmuOpT
< prev
next >
Wrap
Text File
|
1992-08-28
|
1KB
|
66 lines
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "bbc.h"
#include "general.h"
#include "Externals.h"
static BOOL EmuOp0(u_char pfx)
{
switch(pfx)
{
case 0x60:
Reg_A= Reg_B= Reg_C= 0;
Reg_F|= BITZ;
Reg_PC= 0x0065;
return(TRUE);
case 0xc4:
Reg_H= Reg_L= 0;
Reg_F&= ~BITZ;
Reg_PC= 0x00d4;
return(TRUE);
}
return(FALSE);
}
static BOOL EmuOp2(u_char pfx)
{
switch(pfx)
{
extern u_char Rdk7bit(u_char v);
extern void Wrk7byte(u_char v);
case 0x42: /* Read a bit from k7 */
Reg_A= Rdk7bit(Reg_A);
Reg_PC= 0x025f;
return(TRUE);
case 0x68: /* Write a byte to k7 */
Wrk7byte(Reg_A);
Reg_PC= 0x0279;
return(TRUE);
}
return(FALSE);
}
BOOL (*EmulOp[SIZE_CODE>>8])(u_char pfx) =
{
EmuOp0,0,EmuOp2,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* c */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* d */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* f */
};