各位大虾:
我原来在16位机(et256)上有下面两个函数:
void Enter(unsigned char *ctr_store)
{
unsigned char flag;
/*Store interrupt configuration,Save flags and disable interrupts */
asm pshc;
asm sei;
asm movb 1,sp+, flag;
*ctr_store = flag;
}
void Exit(unsigned char *ctr_store)
{
unsigned char flag;
flag = *ctr_store; /* Restore flags */
asm movb flag, 1,-sp;
asm pulc;
}
这两个函数是在执行某条语句前后分别调用的。现在要转移到8位机(dn60)上, 想保持这两个函数功能不变,该怎么修改这两个函数啊?请大虾们帮忙呀。 |