⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yy.lst

📁 c8051f040单片机上的UCOS 移植代码
💻 LST
字号:
C51 COMPILER V8.01   YY                                                                    04/23/2007 15:47:28 PAGE 1   


C51 COMPILER V8.01, COMPILATION OF MODULE YY
OBJECT MODULE PLACED IN yy.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE yy.c LARGE BROWSE DEBUG OBJECTEXTEND

line level    source

   1          #include <includes.h>
   2          #include <serial.h>
   3          #include "stdio.h"
   4          void TaskStartyya(void *yydata) reentrant;
   5          void TaskStartyyb(void *yydata) reentrant;
   6          void TaskStartyyc(void *yydata) reentrant;
   7          void TaskStartyyd(void *yydata) reentrant;
   8          void SYSCLK_Init (void)         reentrant ;
   9          void PORT_Init (void)           reentrant  ;
  10          OS_STK  TaskStartStkyya[MaxStkSize];//注意:我在ASM文件中设置?STACK空间为40H即64。
  11          OS_STK TaskStartStkyyb[MaxStkSize];     //任务堆栈 ;静态堆栈
  12          OS_STK TaskStartStkyyc[MaxStkSize];
  13           OS_STK TaskStartStkyyd[MaxStkSize];
  14          void main(void)
  15          {
  16   1          OSInit();
  17   1          SYSCLK_Init();
  18   1              PORT_Init();
  19   1          InitSerial();
  20   1          InitSerialBuffer();
  21   1              InitTimer0();
  22   1             OSTaskCreate(TaskStartyya, (void *)0, &TaskStartStkyya[0],1);
  23   1                  OSTaskCreate(TaskStartyyb, (void *)0, &TaskStartStkyyb[0],3);
  24   1                  OSTaskCreate(TaskStartyyc, (void *)0, &TaskStartStkyyc[0],4);
  25   1                  OSTaskCreate(TaskStartyyd, (void *)0, &TaskStartStkyyd[0],5);
  26   1          OSStart();
  27   1      }
  28          
  29          
  30          void TaskStartyya(void *yydata) reentrant
  31          {
  32   1        char SFRPAGE_SAVE = SFRPAGE;        // Save Current SFR page
  33   1          yydata=yydata;
  34   1              InitTimer0();    //用户必须在多任务系统启动以后再开启时钟节拍器
  35   1          PrintStr ("\n\t\t*******************************\n");
  36   1          PrintStr ("\t\t*     Hello! The world.       *\n");
  37   1          PrintStr("\t\t*******************************\n\n\n");
  38   1          for(;;){
  39   2          PrintStr ("\taaaaAAAAAA111111 is active.\n");
  40   2              SFRPAGE = UART1_PAGE;
  41   2          printf ("%lu\n", OSTime);
  42   2          SFRPAGE = SFRPAGE_SAVE;             // Restore SFR page
  43   2             OSTimeDly(2);   // 20hz   调用?C/OS-Ⅱ的服务例程之一:任务延时函数 OSTimeDly()
  44   2          }    
  45   1      }
  46          
  47           void TaskStartyyb(void *yydata) reentrant
  48          {
  49   1        char SFRPAGE_SAVE = SFRPAGE;        // Save Current SFR page
  50   1          yydata=yydata;
  51   1          for(;;){
  52   2              PrintStr ("\tbbbbBBBBBB111111 is active.\n");
  53   2          PrintStr ("\tbbbbBBBBBB222222 is active.\n");
  54   2              PrintStr ("\tbbbbBBBBBB333333 is active.\n");
  55   2              PrintStr ("\tbbbbBBBBBB444444 is active.\n");
C51 COMPILER V8.01   YY                                                                    04/23/2007 15:47:28 PAGE 2   

  56   2              PrintStr ("\tbbbbBBBBBB555555 is active.\n");
  57   2             OSTimeDly(5);   //  10hz  调用?C/OS-Ⅱ的服务例程之一:任务延时函数 OSTimeDly()
  58   2          }    
  59   1      }
  60          
  61          
  62           void TaskStartyyc(void *yydata) reentrant
  63          {
  64   1        char SFRPAGE_SAVE = SFRPAGE;        // Save Current SFR page
  65   1          yydata=yydata;
  66   1          for(;;){
  67   2                   PrintStr ("\tcccCCCCCC6666666 is active.\n");
  68   2               OSTimeDly(10);   //  5hz  调用?C/OS-Ⅱ的服务例程之一:任务延时函数 OSTimeDly()
  69   2          }    
  70   1      }
  71           void TaskStartyyd(void *yydata) reentrant
  72          {
  73   1        char SFRPAGE_SAVE = SFRPAGE;        // Save Current SFR page
  74   1          yydata=yydata;
  75   1          for(;;){
  76   2                      PrintStr ("\tddddddddd3333333 is active.\n");
  77   2      
  78   2             OSTimeDly(25);   //  2hz  调用?C/OS-Ⅱ的服务例程之一:任务延时函数 OSTimeDly()
  79   2          }    
  80   1      }
  81          void SYSCLK_Init (void)         reentrant
  82          {
  83   1          char SFRPAGE_SAVE = SFRPAGE;        // Save Current SFR page
  84   1      /*
  85   1         SFRPAGE = CONFIG_PAGE;              // set SFR page
  86   1      
  87   1         OSCICN = 0x83;                      // set internal oscillator to run
  88   1                                             // at its maximum frequency
  89   1      
  90   1         CLKSEL = 0x00;                      // Select the internal osc. as
  91   1                                             // the SYSCLK source
  92   1        */
  93   1      
  94   1          int i = 0;
  95   1      
  96   1         WDTCN = 0xde;                       // disable watchdog timer
  97   1         WDTCN = 0xad;
  98   1      
  99   1          SFRPAGE   = CONFIG_PAGE;
 100   1          OSCXCN    = 0x67;
 101   1          for (i = 0; i < 3000; i++);  // Wait 1ms for initialization
 102   1          while ((OSCXCN & 0x80) == 0);
 103   1          CLKSEL    = 0x01;
 104   1          OSCICN    = 0x83;
 105   1      
 106   1         SFRPAGE = SFRPAGE_SAVE;             // Restore SFR page
 107   1      }
 108          
 109          //-----------------------------------------------------------------------------
 110          // PORT_Init
 111          //-----------------------------------------------------------------------------
 112          //
 113          // This routine configures the crossbar and GPIO ports.
 114          //
 115          void PORT_Init (void)              reentrant
 116          {
 117   1         char SFRPAGE_SAVE = SFRPAGE;        // Save Current SFR page
C51 COMPILER V8.01   YY                                                                    04/23/2007 15:47:28 PAGE 3   

 118   1      
 119   1         SFRPAGE = CONFIG_PAGE;              // set SFR page
 120   1      
 121   1         XBR0     = 0x00;
 122   1         XBR1     = 0x00;
 123   1         XBR2     = 0x44;                    // Enable crossbar and weak pull-up
 124   1                                             // Enable UART1
 125   1      
 126   1         P0MDOUT |= 0x01;                    // Set TX1 pin to push-pull
 127   1         P1MDOUT |= 0x40;                    // Set P1.6(LED) to push-pull
 128   1      
 129   1         SFRPAGE = SFRPAGE_SAVE;             // Restore SFR page
 130   1      }


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


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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -