📄 test.lst
字号:
591 }
592
593 // judge = int_flg & 0x08; //取出OTB7860的中断
594 // if (judge == 0x08){
595 int_reg = f2rc7860_rd(F2Int_vec);
596 if (int_reg){
597 if (start_flg[0] == 1){
598 f2rc7860_wr(F2Reg_protect,0xAA); //open 7860 write reg protect
599 f2rc7860_wr(F2Int_mask,0x80);
600 }
601 else{
602 if (int_reg & 0xF0){
603 judge = f2rc7860_rd(F2Ia0_a); //光分支盘A口中断处理
604 judge1 = f2rc7860_rd(F2Ia1_a);
605 judge2 = f2rc7860_rd(F2Ia2_a);
606 judge3 = f2rc7860_rd(F2Ia3_a);
607 // f2rc7860_wr(F2Rdint_clr,0x40); //清除OTB盘的F2Ia3_a与F2Ia3_b中断位
608 for (temp = 0; temp <= 7; temp++){ //取出63个时隙的AIS寄存器值
609 ais_reg[2][temp] |= f2rc7860_rd(temp + 0x00A6);
610 }
611 if ((judge & 0xDA) | (judge2 & 0xE0) | (judge3 & 0x80)){
612 intflg_OTBA = 1;
C51 COMPILER V7.50 TEST 03/10/2006 16:35:17 PAGE 11
613 }
614 if (judge != 0){
615 f2rc7860_wr(F2Intmask0_a,judge);
616 judge &= 0xD0; //取出可发生自动倒换的bit位
617 if (judge != 0){
618 init_recover[2] = 1;
619 path_switch_otba();
620 // SetExtRdyTbl(5);
621 }
622 }
623 if (judge1 != 0){
624 f2rc7860_wr(F2Intmask1_a,judge1);
625 // judge1 &= 0xF0;
626 // if (judge1 != 0){
627 // SetExtRdyTbl(5);
628 // path_switch_otba();
629 // }
630 }
631 if (judge2 != 0){
632 f2rc7860_wr(F2Intmask2_a,judge2);
633 judge2 &= 0xE0;
634 if (judge2 != 0){
635 // SetExtRdyTbl(5);
636 init_recover[2] = 1;
637 path_switch_otba();
638 }
639 }
640 if (judge3 != 0){
641 // f2rc7860_wr(F2Intmask3_a,judge3);
642 judge3 &= 0x80;
643 if (judge3 != 0){
644 init_recover[2] = 1;
645 path_switch_otba_tu();
646 SetExtRdyTbl(6);
647 }
648 }
649 }
650
651 if (int_reg & 0x0F){
652 judge = f2rc7860_rd(F2Ia0_b); //光分支盘B口中断处理
653 judge1 = f2rc7860_rd(F2Ia1_b);
654 judge2 = f2rc7860_rd(F2Ia2_b);
655 judge3 = f2rc7860_rd(F2Ia3_b);
656 // f2rc7860_wr(F2Rdint_clr,0x40); //清除OTB盘的F2Ia3_a与F2Ia3_b中断位
657 for (temp = 0; temp <= 7; temp++){ //取出63个时隙的AIS寄存器值
658 ais_reg[3][temp] |= f2rc7860_rd(temp + 0x02A6);
659 }
660 if ((judge & 0xDA) | (judge2 & 0xE0) | (judge3 & 0x80)){
661 intflg_OTBB = 1;
662 }
663 if (judge != 0){
664 f2rc7860_wr(F2Intmask0_b,judge);
665 judge &= 0xD0; //取出可发生自动倒换的bit位
666 if (judge != 0){
667 init_recover[3] = 1;
668 path_switch_otbb();
669 // SetExtRdyTbl(7);
670 }
671 }
672 if (judge1 != 0){
673 f2rc7860_wr(F2Intmask1_b,judge1);
674 // judge1 &= 0xF0;
C51 COMPILER V7.50 TEST 03/10/2006 16:35:17 PAGE 12
675 // if (judge1 != 0){
676 // SetExtRdyTbl(7);
677 // path_switch_otbb();
678 // }
679 }
680 if (judge2 != 0){
681 f2rc7860_wr(F2Intmask2_b,judge2);
682 judge2 &= 0xE0;
683 if (judge2 != 0){
684 // SetExtRdyTbl(7);
685 init_recover[3] = 1;
686 path_switch_otbb();
687 }
688 }
689 if (judge3 != 0){
690 // f2rc7860_wr(F2Intmask3_b,judge3);
691 judge3 &= 0x80;
692 if (judge3 != 0){
693 init_recover[3] = 1;
694 path_switch_otbb_tu();
695 SetExtRdyTbl(8);
696 }
697 }
698 }
699 }
700 }
701
702 SetExtRdyTbl(15); //每秒查询改写2M盘的AIS速率
703 Rdint_clr = 0x40; //清除MCB盘的Ia3_a与Ia3_b中断位
704 f2rc7860_wr(F2Rdint_clr,0x40); //清除OTB盘的F2Ia3_a与F2Ia3_b中断位
705
706 }
707
708
709 /****************************************************************************************
710 void service_int0(void) interrupt 0 using 1{
711 volatile unsigned char int_reg;
712 volatile unsigned char judge;
713 volatile unsigned char judge1;
714 volatile unsigned char judge2;
715 volatile unsigned char judge3;
716 volatile unsigned char temp;
717
718 // Rdint_clr = 0x40; //清除MCB盘的Ia3_a与Ia3_b中断位
719 // f2rc7860_wr(F2Rdint_clr,0x40); //清除OTB盘的F2Ia3_a与F2Ia3_b中断位
720 // int_flg = XBYTE[0xB400]; //中断源片选信号 Bit0 MCB7820,Bit1 MCB7860,Bit2 OTB7820,Bit3 OTB7860
721 for (temp = 0; temp <= 7; temp++){ //取出63个时隙的AIS寄存器值
722 ais_reg[0][temp] = XBYTE[temp + 0x88A6];
723 ais_reg[1][temp] = XBYTE[temp + 0x8AA6];
724 if (start_flg[0] == 0){
725 ais_reg[2][temp] = f2rc7860_rd(temp + 0x00A6);
726 ais_reg[3][temp] = f2rc7860_rd(temp + 0x02A6);
727 }
728 }
729 // for (temp = 0; temp <= 7; temp++){ //取出63个时隙的AIS寄存器值
730 // ais_reg[0][temp] |= XBYTE[temp + 0x88A6];
731 // ais_reg[1][temp] |= XBYTE[temp + 0x8AA6];
732 // if (start_flg[0] == 0){
733 // ais_reg[2][temp] |= f2rc7860_rd(temp + 0x00A6);
734 // ais_reg[3][temp] |= f2rc7860_rd(temp + 0x02A6);
735 // }
736 // }
C51 COMPILER V7.50 TEST 03/10/2006 16:35:17 PAGE 13
737 // Rdint_clr = 0x40; //清除MCB盘的Ia3_a与Ia3_b中断位
738 // f2rc7860_wr(F2Rdint_clr,0x40); //清除OTB盘的F2Ia3_a与F2Ia3_b中断位
739
740 int_reg = Int_vec;
741 if (int_reg & 0xF0){
742 judge = Ia0_a; //得出MCB的7860A口IA0中断寄存器值
743 judge1 = Ia1_a;
744 judge2 = Ia2_a;
745 judge3 = Ia3_a;
746 Rdint_clr = 0x40; //清除MCB盘的Ia3_a与Ia3_b中断位
747 for (temp = 0; temp <= 7; temp++){ //取出63个时隙的AIS寄存器值
748 ais_reg[0][temp] |= XBYTE[temp + 0x88A6];
749 }
750 if ((judge & 0xDA) | (judge2 & 0xE0) | (judge3 & 0x80)){
751 intflg_MCBA = 1; //计算误码秒的标志位
752 }
753 if (judge != 0){
754 Intmask0_a = judge;
755 judge &= 0xD0; //取出可发生自动倒换的bit位
756 if (judge != 0){
757 // SetExtRdyTbl(1);
758 init_recover[0] = 1;
759 path_switch_mcba();
760 }
761 }
762 if (judge1 != 0){
763 Intmask1_a = judge1;
764 // judge1 &= 0xF0;
765 // if (judge1 != 0){
766 // SetExtRdyTbl(1);
767 // path_switch_mcba();
768 // }
769 }
770 if (judge2 != 0){
771 Intmask2_a = judge2;
772 judge2 &= 0xE0;
773 if (judge2 != 0){
774 // SetExtRdyTbl(1);
775 init_recover[0] = 1;
776 path_switch_mcba();
777 }
778 }
779 if (judge3 != 0){
780 // Intmask3_a = judge3;
781 judge3 &= 0x80;
782 if (judge3 != 0){
783 // ina += 1;
784 SetExtRdyTbl(2);
785 init_recover[0] = 1;
786 path_switch_mcba_tu();
787 }
788 }
789 }
790
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -