Init_Int(0x803c00,0x803e00,isr_PIT1_PIF,34);
Init_Int(0x803c00, 0x803e00, isr_USB_IRQ, 33);
void isr_USB_IRQ()
void isr_PIT1_PIF()
// ---------------------------------------------------------------------
// Variables Declarations
// ---------------------------------------------------------------------
// r2 : 1st arg of Fnuction;
// r3 : 2st arg of Fnuction;
// r4 : 3st arg of Fnuction;
// r5 : 4st arg of Fnuction;
#define BASE r2
#define STACK r3
#define HANDLER r4
#define OFFSET r5
asm void Init_Int(register long base,register long stack,register void(*handler)(),register unsigned char offset)
#include
using namespace std;
int checkCPU(char x)
{
if(x==0x12)
{
return (0);
}
else
return (1);
}
union
{
short s;
char c[2];
}x;
int main()
{
x.s=0x1234;
if(checkCPU(x.c[0])==0)
cout<<"Big_endian"<
else
cout<<"Little_endian"<
return(0);
}
阅读(1483) | 评论(0) | 转发(0) |