Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2603499
  • 博文数量: 877
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 5920
  • 用 户 组: 普通用户
  • 注册时间: 2013-12-05 12:25
个人简介

技术的乐趣在于分享,欢迎多多交流,多多沟通。

文章分类

全部博文(877)

文章存档

2021年(2)

2016年(20)

2015年(471)

2014年(358)

2013年(26)

分类: 嵌入式

2014-07-10 15:00:25

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);
}
阅读(1435) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~