C51 COMPILER V9.54   IO                                                                    12/03/2024 15:15:46 PAGE 1   


C51 COMPILER V9.54, COMPILATION OF MODULE IO
OBJECT MODULE PLACED IN .\Objects\io.obj
COMPILER INVOKED BY: C:\Keil_v5\C51\BIN\C51.EXE public\io.c OPTIMIZE(8,SPEED) BROWSE INCDIR(.\public) DEBUG OBJECTEXTEND
                    - PRINT(.\Listings\io.lst) OBJECT(.\Objects\io.obj)

line level    source

   1          #include "io.h"
   2          
   3          //如果使用keil仿真调试，不能操作P0.5，P0.6口，否则会运行出错
   4          //P0/P1/P2/P3 口可按位操作,P4/P5 口只能寄存器操作   P5.5为RST口
   5          /*将所有IO寄存器清零*/
   6          void IO_CLR()
   7          {
   8   1          P0CR = 0xFF;
   9   1          P1CR |= 0xF0;
  10   1          P2CR = 0xFF;
  11   1          P3CR = 0xFF;
  12   1          P4CR = 0xFF;
  13   1          P5CR = 0x3F;
  14   1              
  15   1          P0PCR = 0x00;
  16   1          P1PCR &= 0x0F;
  17   1          P2PCR = 0x00;
  18   1          P3PCR = 0x00;
  19   1          P4PCR = 0x00;
  20   1          P5PCR = 0x00;
  21   1              
  22   1                      ALFSEL0 = 0x00;
  23   1                      ALFSEL1 = 0x00;
  24   1              
  25   1                      P0 = 0;
  26   1          P2 = 0;
  27   1          P3 = 0;
  28   1          P4 = 0;
  29   1          P5 = 0xFF;
  30   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     48    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
