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

📄 protodma.lst

📁 飞利浦usb D12芯片fireware 源程序
💻 LST
📖 第 1 页 / 共 5 页
字号:
C51 COMPILER V8.02   PROTODMA                                                              07/27/2007 11:10:49 PAGE 1   


C51 COMPILER V8.02, COMPILATION OF MODULE PROTODMA
OBJECT MODULE PLACED IN PROTODMA.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE PROTODMA.C LARGE BROWSE DEBUG OBJECTEXTEND CODE LISTINCLUDE SYMBOLS

line level    source

   1          /*
   2             //*************************************************************************
   3             //
   4             //                  P H I L I P S   P R O P R I E T A R Y
   5             //
   6             //           COPYRIGHT (c)   1997 BY PHILIPS SINGAPORE.
   7             //                     --  ALL RIGHTS RESERVED  --
   8             //
   9             // File Name:        PROTODMA.C
  10             // Author:           Wenkai Du
  11             // Created:          18 Aug 98
  12             // Modified:
  13             // Revision:         2.0
  14             //
  15             //*************************************************************************
  16          */
  17          
  18          #include <stdio.h>
   1      =1  /*--------------------------------------------------------------------------
   2      =1  STDIO.H
   3      =1  
   4      =1  Prototypes for standard I/O functions.
   5      =1  Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
   6      =1  All rights reserved.
   7      =1  --------------------------------------------------------------------------*/
   8      =1  
   9      =1  #ifndef __STDIO_H__
  10      =1  #define __STDIO_H__
  11      =1  
  12      =1  #ifndef EOF
  13      =1   #define EOF -1
  14      =1  #endif
  15      =1  
  16      =1  #ifndef NULL
  17      =1   #define NULL ((void *) 0)
  18      =1  #endif
  19      =1  
  20      =1  #ifndef _SIZE_T
  21      =1   #define _SIZE_T
  22      =1   typedef unsigned int size_t;
  23      =1  #endif
  24      =1  
  25      =1  #pragma SAVE
  26      =1  #pragma REGPARMS
  27      =1  extern char _getkey (void);
  28      =1  extern char getchar (void);
  29      =1  extern char ungetchar (char);
  30      =1  extern char putchar (char);
  31      =1  extern int printf   (const char *, ...);
  32      =1  extern int sprintf  (char *, const char *, ...);
  33      =1  extern int vprintf  (const char *, char *);
  34      =1  extern int vsprintf (char *, const char *, char *);
  35      =1  extern char *gets (char *, int n);
  36      =1  extern int scanf (const char *, ...);
  37      =1  extern int sscanf (char *, const char *, ...);
C51 COMPILER V8.02   PROTODMA                                                              07/27/2007 11:10:49 PAGE 2   

  38      =1  extern int puts (const char *);
  39      =1  
  40      =1  #pragma RESTORE
  41      =1  
  42      =1  #endif
  43      =1  
  19          #include <string.h>
   1      =1  /*--------------------------------------------------------------------------
   2      =1  STRING.H
   3      =1  
   4      =1  String functions.
   5      =1  Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
   6      =1  All rights reserved.
   7      =1  --------------------------------------------------------------------------*/
   8      =1  
   9      =1  #ifndef __STRING_H__
  10      =1  #define __STRING_H__
  11      =1  
  12      =1  #ifndef _SIZE_T
           =1  #define _SIZE_T
           =1  typedef unsigned int size_t;
           =1 #endif
  16      =1  
  17      =1  #ifndef NULL
           =1  #define NULL ((void *) 0L)
           =1 #endif
  20      =1  
  21      =1  #pragma SAVE
  22      =1  #pragma REGPARMS
  23      =1  extern char *strcat (char *s1, char *s2);
  24      =1  extern char *strncat (char *s1, char *s2, int n);
  25      =1  
  26      =1  extern char strcmp (char *s1, char *s2);
  27      =1  extern char strncmp (char *s1, char *s2, int n);
  28      =1  
  29      =1  extern char *strcpy (char *s1, char *s2);
  30      =1  extern char *strncpy (char *s1, char *s2, int n);
  31      =1  
  32      =1  extern int strlen (char *);
  33      =1  
  34      =1  extern char *strchr (const char *s, char c);
  35      =1  extern int strpos (const char *s, char c);
  36      =1  extern char *strrchr (const char *s, char c);
  37      =1  extern int strrpos (const char *s, char c);
  38      =1  
  39      =1  extern int strspn (char *s, char *set);
  40      =1  extern int strcspn (char *s, char *set);
  41      =1  extern char *strpbrk (char *s, char *set);
  42      =1  extern char *strrpbrk (char *s, char *set);
  43      =1  extern char *strstr  (char *s, char *sub);
  44      =1  extern char *strtok  (char *str, const char *set);
  45      =1  
  46      =1  extern char memcmp (void *s1, void *s2, int n);
  47      =1  extern void *memcpy (void *s1, void *s2, int n);
  48      =1  extern void *memchr (void *s, char val, int n);
  49      =1  extern void *memccpy (void *s1, void *s2, char val, int n);
  50      =1  extern void *memmove (void *s1, void *s2, int n);
  51      =1  extern void *memset  (void *s, char val, int n);
  52      =1  #pragma RESTORE
  53      =1  
  54      =1  #endif
  20          
C51 COMPILER V8.02   PROTODMA                                                              07/27/2007 11:10:49 PAGE 3   

  21          #ifdef __C51__
  22                  #include <reg51.h>                /* special function register declarations   */
   1      =1  /*--------------------------------------------------------------------------
   2      =1  REG51.H
   3      =1  
   4      =1  Header file for generic 80C51 and 80C31 microcontroller.
   5      =1  Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
   6      =1  All rights reserved.
   7      =1  --------------------------------------------------------------------------*/
   8      =1  
   9      =1  #ifndef __REG51_H__
  10      =1  #define __REG51_H__
  11      =1  
  12      =1  /*  BYTE Register  */
  13      =1  sfr P0   = 0x80;
  14      =1  sfr P1   = 0x90;
  15      =1  sfr P2   = 0xA0;
  16      =1  sfr P3   = 0xB0;
  17      =1  sfr PSW  = 0xD0;
  18      =1  sfr ACC  = 0xE0;
  19      =1  sfr B    = 0xF0;
  20      =1  sfr SP   = 0x81;
  21      =1  sfr DPL  = 0x82;
  22      =1  sfr DPH  = 0x83;
  23      =1  sfr PCON = 0x87;
  24      =1  sfr TCON = 0x88;
  25      =1  sfr TMOD = 0x89;
  26      =1  sfr TL0  = 0x8A;
  27      =1  sfr TL1  = 0x8B;
  28      =1  sfr TH0  = 0x8C;
  29      =1  sfr TH1  = 0x8D;
  30      =1  sfr IE   = 0xA8;
  31      =1  sfr IP   = 0xB8;
  32      =1  sfr SCON = 0x98;
  33      =1  sfr SBUF = 0x99;
  34      =1  
  35      =1  
  36      =1  /*  BIT Register  */
  37      =1  /*  PSW   */
  38      =1  sbit CY   = 0xD7;
  39      =1  sbit AC   = 0xD6;
  40      =1  sbit F0   = 0xD5;
  41      =1  sbit RS1  = 0xD4;
  42      =1  sbit RS0  = 0xD3;
  43      =1  sbit OV   = 0xD2;
  44      =1  sbit P    = 0xD0;
  45      =1  
  46      =1  /*  TCON  */
  47      =1  sbit TF1  = 0x8F;
  48      =1  sbit TR1  = 0x8E;
  49      =1  sbit TF0  = 0x8D;
  50      =1  sbit TR0  = 0x8C;
  51      =1  sbit IE1  = 0x8B;
  52      =1  sbit IT1  = 0x8A;
  53      =1  sbit IE0  = 0x89;
  54      =1  sbit IT0  = 0x88;
  55      =1  
  56      =1  /*  IE   */
  57      =1  sbit EA   = 0xAF;
  58      =1  sbit ES   = 0xAC;
  59      =1  sbit ET1  = 0xAB;
  60      =1  sbit EX1  = 0xAA;
C51 COMPILER V8.02   PROTODMA                                                              07/27/2007 11:10:49 PAGE 4   

  61      =1  sbit ET0  = 0xA9;
  62      =1  sbit EX0  = 0xA8;
  63      =1  
  64      =1  /*  IP   */ 
  65      =1  sbit PS   = 0xBC;
  66      =1  sbit PT1  = 0xBB;
  67      =1  sbit PX1  = 0xBA;
  68      =1  sbit PT0  = 0xB9;
  69      =1  sbit PX0  = 0xB8;
  70      =1  
  71      =1  /*  P3  */
  72      =1  sbit RD   = 0xB7;
  73      =1  sbit WR   = 0xB6;
  74      =1  sbit T1   = 0xB5;
  75      =1  sbit T0   = 0xB4;
  76      =1  sbit INT1 = 0xB3;
  77      =1  sbit INT0 = 0xB2;
  78      =1  sbit TXD  = 0xB1;
  79      =1  sbit RXD  = 0xB0;
  80      =1  
  81      =1  /*  SCON  */
  82      =1  sbit SM0  = 0x9F;
  83      =1  sbit SM1  = 0x9E;
  84      =1  sbit SM2  = 0x9D;
  85      =1  sbit REN  = 0x9C;
  86      =1  sbit TB8  = 0x9B;
  87      =1  sbit RB8  = 0x9A;
  88      =1  sbit TI   = 0x99;
  89      =1  sbit RI   = 0x98;
  90      =1  
  91      =1  #endif
  23                  #include "epphal.h"
   1      =1  /*
   2      =1     //*************************************************************************
   3      =1     //
   4      =1     //                  P H I L I P S   P R O P R I E T A R Y
   5      =1     //
   6      =1     //           COPYRIGHT (c)   1997 BY PHILIPS SINGAPORE.
   7      =1     //                     --  ALL RIGHTS RESERVED  --
   8      =1     //
   9      =1     // File Name:        EPPHAL.H
  10      =1     // Author:           Wenkai Du
  11      =1     // Created:          19 Dec 97
  12      =1     // Modified:
  13      =1     // Revision:         2.1
  14      =1     //
  15      =1     //*************************************************************************
  16      =1     //
  17      =1     // 98/11/27                  Move part of defination from D12CI.H (WK)
  18      =1     //*************************************************************************
  19      =1     */
  20      =1  
  21      =1  
  22      =1  #ifndef __EPPHAL_H__
  23      =1  #define __EPPHAL_H__
  24      =1  
  25      =1  #ifndef __C51__
           =1 
           =1         #define portbase 0x368
           =1 
           =1 
           =1         #define D12_COMMAND (portbase + 1)
C51 COMPILER V8.02   PROTODMA                                                              07/27/2007 11:10:49 PAGE 5   

           =1         #define D12_DATA portbase
           =1         #define D12_EVAL_PORT_I (portbase + 2)
           =1         #define D12_EVAL_PORT_O (portbase + 3)
           =1 
           =1         unsigned char D12Eval_inportb(void);
           =1         void D12Eval_outportb(unsigned char val, unsigned char mask);
           =1 
           =1         #define DISABLE disable()
           =1         #define ENABLE  enable()
           =1 
           =1 #else
  42      =1  
  43      =1          #define portbase 2
  44      =1  
  45      =1          #define D12_COMMAND (portbase + 1)
  46      =1          #define D12_DATA portbase
  47      =1  
  48      =1          #define CPLD_CNT0 0x00
  49      =1          #define CPLD_CNT1 0x01
  50      =1  
  51      =1          #define COUNT_L   0x00
  52      =1          #define COUNT_H   0x00
  53      =1          #define EPP_PORT  P1
  54      =1          #define DATA_BUS  P0
  55      =1  
  56      =1  
  57      =1          sbit MCU_HOSTDREQ = P2^0;
  58      =1          sbit MCU_HOSTDACK = P2^1;
  59      =1          sbit MCU_EPPINIT  = P2^2;

⌨️ 快捷键说明

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