本文整理汇总了C++中ot函数的典型用法代码示例。如果您正苦于以下问题:C++ ot函数的具体用法?C++ ot怎么用?C++ ot使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ot函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: OpExt
// --------------------- Opcodes 0x4880+ ---------------------
// Emit an Ext opcode, 01001000 1x000nnn
int OpExt(int op)
{
int ea=0;
int size=0,use=0;
int shift=0;
ea=op&0x0007;
size=(op>>6)&1;
shift=32-(8<<size);
use=OpBase(op,size);
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler
OpStart(op); Cycles=4;
EaCalc (11,0x0007,ea,size+1,0,0);
EaRead (11, 0,ea,size+1,0x0007,0,0);
ot(" mov r0,r0,asl #%d\n",shift);
ot(" adds r0,r0,#0 ;@ Defines NZ, clears CV\n");
ot(" mrs r10,cpsr ;@ r10=flags\n");
ot(" mov r1,r0,asr #%d\n",shift);
ot("\n");
EaWrite(11, 1,ea,size+1,0x0007,0,0);
OpEnd();
return 0;
}
开发者ID:FMB54,项目名称:piplay-modified,代码行数:31,代码来源:OpLogic.cpp
示例2: OpExt
// --------------------- Opcodes 0x4880+ ---------------------
// Emit an Ext opcode, 01001000 1x000nnn
int OpExt(int op)
{
int ea=0;
int size=0,use=0;
int shift=0;
ea=op&0x0007;
size=(op>>6)&1;
shift=32-(8<<size);
use=OpBase(op,size);
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler
OpStart(op); Cycles=4;
EaCalc (11,0x0007,ea,size+1,earwt_msb_dont_care);
EaRead (11, 0,ea,size+1,0x0007,earwt_msb_dont_care);
ot(" movs r0,r0,asl #%d\n",shift);
OpGetFlagsNZ(0);
ot(" mov r1,r0,asr #%d\n",shift);
ot("\n");
EaWrite(11, 1,ea,size+1,0x0007,earwt_msb_dont_care);
OpEnd();
return 0;
}
开发者ID:notaz,项目名称:cyclone68000,代码行数:30,代码来源:OpLogic.cpp
示例3: errorsummary
/*
* report errors
*/
void errorsummary (void)
{
if (ncmp)
error("missing closing bracket");
nl();
comment();
outdec(errcnt);
if (errcnt) errfile = YES;
outstr(" error(s) in compilation");
nl();
comment();
ot("literal pool:");
outdec(litptr);
nl();
comment();
ot("constant pool:");
outdec(const_size);
nl();
comment();
ot("global pool:");
outdec(glbptr - rglbptr);
nl();
comment();
ot("Macro pool:");
outdec(macptr);
nl();
pl(errcnt ? "Error(s)" : "No errors");
}
开发者ID:ArtemioUrbina,项目名称:huc,代码行数:31,代码来源:main.c
示例4: OpTst
// --------------------- Opcodes 0x4a00+ ---------------------
// Emit a Tst opcode, 01001010 xxeeeeee
int OpTst(int op)
{
int sea=0;
int size=0,use=0;
sea=op&0x003f;
size=(op>>6)&3; if (size>=3) return 1;
// See if we can do this opcode:
if (EaCanWrite(sea)==0||EaAn(sea)) return 1;
use=OpBase(op,size);
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler
OpStart(op,sea); Cycles=4;
EaCalc ( 0,0x003f,sea,size,1);
EaRead ( 0, 0,sea,size,0x003f,1);
ot(" adds r0,r0,#0 ;@ Defines NZ, clears CV\n");
ot(" mrs r10,cpsr ;@ r10=flags\n");
ot("\n");
OpEnd(sea);
return 0;
}
开发者ID:FMB54,项目名称:piplay-modified,代码行数:28,代码来源:OpLogic.cpp
示例5: DamPut8
int DamPut8(char *From,int r,int Ext)
{
// Put register r from From (must be dl for reg 6)
if (r==6) { ot(" DAM_WRITE8\n"); return 0; }
ot(" mov %s,%s\n",DamLoc8(r,Ext),From);
return 0;
}
开发者ID:alfredox123,项目名称:pifba,代码行数:7,代码来源:damm.cpp
示例6: DamGet8
int DamGet8(char *To ,int r,int Ext)
{
// Get register r into To (must be dl for reg 6)
if (r==6) { ot(" DAM_READ8\n"); return 0; }
ot(" mov %s,%s\n",To,DamLoc8(r,Ext));
return 0;
}
开发者ID:alfredox123,项目名称:pifba,代码行数:7,代码来源:damm.cpp
示例7: SetZN16
// sets ZN for reg in *reg
static void SetZN16(char *reg)
{
ot(" and spc_p,spc_p,#0xff\n");
ot(" orr spc_p,spc_p,%s,lsl #16\n", reg);
ot(" tst %s,#0xff\n", reg);
ot(" orrne spc_p,spc_p,#0x01000000\n");
}
开发者ID:Alexander--,项目名称:SNesoid,代码行数:8,代码来源:spcgen.c
示例8: MemHandler
// Trashes r0-r3
static void MemHandler(int set, int z, int save)
{
if(set) ot(" bl S9xAPUSetByte%s\n", z ? "Z" : "");
else ot(" bl S9xAPUGetByte%s\n", z ? "Z" : "");
if(save) ot(" ldr spc_ram,[context,#iapu_ram]\n");
}
开发者ID:Alexander--,项目名称:SNesoid,代码行数:8,代码来源:spcgen.c
示例9: SetClr1
static void SetClr1()
{
ot(" ldrb r0,[spc_pc]\n");
MemHandler(0, 1, 0);
ot(" %s r0,r0,#0x%02x\n", opcode & 0x10 ? "bic" : "orr", 1<<(opcode>>5));
ot(" ldrb r1,[spc_pc],#1\n");
MemHandler(1, 1, 1);
}
开发者ID:Alexander--,项目名称:SNesoid,代码行数:8,代码来源:spcgen.c
示例10: TCall
static void TCall()
{
ot(" sub r0,spc_pc,spc_ram\n");
PushW();
ot(" ldr r0,[context,#iapu_extraram]\n");
ot(" ldrh r0,[r0,#0x%x]\n", (15-(opcode>>4))<<1);
ot(" add spc_pc,spc_ram,r0\n");
}
开发者ID:Alexander--,项目名称:SNesoid,代码行数:8,代码来源:spcgen.c
示例11: Lsr
// does LSR on r0, sets flags
static void Lsr()
{
ot(" tst r0,#0x01\n");
ot(" orrne spc_p,spc_p,#flag_c\n");
ot(" biceq spc_p,spc_p,#flag_c\n");
ot(" mov r0,r0,lsr #1\n");
SetZN8("r0");
}
开发者ID:Alexander--,项目名称:SNesoid,代码行数:9,代码来源:spcgen.c
示例12: Asl
// does ASL on r0, sets flags but doesn't cut the shifted bits
static void Asl()
{
ot(" tst r0,#0x80\n");
ot(" orrne spc_p,spc_p,#flag_c\n");
ot(" biceq spc_p,spc_p,#flag_c\n");
ot(" mov r0,r0,lsl #1\n");
SetZN8("r0");
}
开发者ID:Alexander--,项目名称:SNesoid,代码行数:9,代码来源:spcgen.c
示例13: PopW
// pops to r0, trashes r1
static void PopW()
{
ot(" add spc_s,spc_s,#2\n");
ot(" add r1,spc_ram,spc_s\n");
ot(" ldrb r0,[r1,#0xff]\n");
ot(" ldrb r1,[r1,#0x100]\n");
ot(" orr r0,r0,r1,lsl #8\n");
}
开发者ID:Alexander--,项目名称:SNesoid,代码行数:9,代码来源:spcgen.c
示例14: PushW
// pushes r0, trashes r0,r1
static void PushW()
{
ot(" add r1,spc_ram,spc_s\n");
ot(" strb r0,[r1,#0xff]\n");
ot(" mov r0,r0,lsr #8\n");
ot(" strb r0,[r1,#0x100]\n");
ot(" sub spc_s,spc_s,#2\n");
}
开发者ID:Alexander--,项目名称:SNesoid,代码行数:9,代码来源:spcgen.c
示例15: Ror
// does ROR on r0, sets flags
static void Ror()
{
ot(" tst spc_p,#flag_c\n");
ot(" orrne r0,r0,#0x100\n");
ot(" movs r0,r0,lsr #1\n");
ot(" orrcs spc_p,spc_p,#flag_c\n");
ot(" biccc spc_p,spc_p,#flag_c\n");
SetZN8("r0");
}
开发者ID:Alexander--,项目名称:SNesoid,代码行数:10,代码来源:spcgen.c
示例16: GetXBit
// Get X Bit into carry - trashes r2
int GetXBit(int subtract)
{
ot(";@ Get X bit:\n");
ot(" ldr r2,[r7,#0x4c]\n");
if (subtract) ot(" mvn r2,r2 ;@ Invert it\n");
ot(" msr cpsr_flg,r2 ;@ Get into Carry\n");
ot("\n");
return 0;
}
开发者ID:pcercuei,项目名称:picodrive-rzx50,代码行数:10,代码来源:OpArith.cpp
示例17: DamAddPc
int DamAddPc(int n)
{
// Increase the PC by n
if (n== 1) ot(" inc %s\n",DamPc);
else if (n==-1) ot(" dec %s\n",DamPc);
else if (n > 0) ot(" add %s,%d\n",DamPc, n);
else if (n < 0) ot(" sub %s,%d\n",DamPc,-n);
return 0;
}
开发者ID:alfredox123,项目名称:pifba,代码行数:9,代码来源:damm.cpp
示例18: DamIxIyOffset
void DamIxIyOffset(int nRel)
{
// Get IX/IY offset from PC+nRel
ot(" ; Get IX/IY offset into di\n");
DamFetch(nRel,1);
ot(" xor dh,dh\n");
ot(" xor dl,0x80\n");
ot(" sub dx,0x80\n");
ot(" mov di,dx\n");
}
开发者ID:alfredox123,项目名称:pifba,代码行数:10,代码来源:damm.cpp
示例19: Cmp
// CMP rr0,rr1; trashes r12
static void Cmp(char *r0, char *r1, int and_r0)
{
char *lop = r0;
if(and_r0) { ot(" and r12,%s,#0xff\n", r0); lop = "r12"; }
ot(" subs r12,%s,%s\n", lop, r1);
ot(" orrge spc_p,spc_p,#flag_c\n");
ot(" biclt spc_p,spc_p,#flag_c\n");
SetZN8("r12");
}
开发者ID:Alexander--,项目名称:SNesoid,代码行数:11,代码来源:spcgen.c
示例20: BssBbc
static void BssBbc()
{
ot(" ldrb r0,[spc_pc],#1\n");
MemHandler(0, 1, 1);
ot(" tst r0,#0x%02x\n", 1<<(opcode>>5));
ot(" add%s spc_pc,spc_pc,#1\n", opcode & 0x10 ? "ne" : "eq");
ot(" ldr%ssb r0,[spc_pc],#1\n", opcode & 0x10 ? "eq" : "ne");
ot(" add%s spc_pc,spc_pc,r0\n", opcode & 0x10 ? "eq" : "ne");
ot(" sub%s cycles,cycles,#%i\n",opcode & 0x10 ? "eq" : "ne", ONE_APU_CYCLE*2);
}
开发者ID:Alexander--,项目名称:SNesoid,代码行数:10,代码来源:spcgen.c
注:本文中的ot函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论