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

📄 bom.h

📁 Cypress公司的CH372EVT芯片基于的USB1。1的驱动
💻 H
📖 第 1 页 / 共 5 页
字号:
#define ZT_PTR         0x21     /* OMF166: pointer descriptor        */
#define ZT_ARRAY       0x22     /* OMF166: array descriptor          */
#define ZT_FUNC        0x23     /* OMF166: function descriptor       */
#define ZT_STRU        0x24     /* OMF166: struct/union descriptor   */
#define ZT_FIELD       0x25     /* OMF166: bitfield descriptor       */
#define ZT_TYPTAG      0x26     /* Fox-Typedef */
#define ZT_COMP        0x27     /* Fox-Component */
#define ZT_FCLIST      0x28     /* Fox-Component-List */
#define ZT_FSTRU       0x29     /* Fox-struct/union descriptor */


/*
 * Fox Scalar-Types
 */

#define TI_NIL         0x40     /* untyped */
#define TI_BIT         0x41     /* bit */
#define TI_CHAR        0x42     /* char */
#define TI_UCHAR       0x43     /* uchar */
#define TI_INT         0x44     /* int */
#define TI_UINT        0x45     /* uint */
#define TI_LONG        0x46     /* long */
#define TI_ULONG       0x47     /* ulong */
#define TI_FLOAT       0x48     /* float (32-bit)  */
#define TI_DOUBLE      0x49     /* double (64-bit) */
#define TI_VOID        0x4A     /* void */
#define TI_LABEL       0x4B     /* label (near) */
#define TI_BITWORD     0x4C     /* a166 bitword */
#define TI_NEAR        0x4D     /* a166 near */
#define TI_FAR         0x4E     /* a166 far */
#define TI_DATA3       0x4F     /* a166 data3 */
#define TI_DATA4       0x50     /* a166 data4 */
#define TI_DATA8       0x51     /* a166 data8 */
#define TI_DATA16      0x52     /* a166 data16 */
#define TI_INTNO       0x53     /* a166 intno */
#define TI_REGBANK     0x54     /* a166 regbank */
#define TI_IFAR        0x55     /* a166 interrupt far */
#define TI_DATA32      0x56     /* a166 data32 */
#define TI_DATA64      0x57     /* a166 data64 */
#define TI_FRACT16     0x58     /* fractional-16 type */
#define TI_FRACT32     0x59     /* fractional-32 type */
#define TI_SHORT       0x7F     /* dummy type for Jumps */


/*
 * Loader-Errors
 */

#define LOD_OK         0x0000


//--- DisAsm Stuff

/*
 * Language Window Definitions
 */

#define HLEVEL   0x00       /* View-Modes */
#define MIXED    0x01
#define ASSMBL   0x02

#define LINENUM  0x20       /* Information Number */
#define ASMLINE  0x21
#define LABLINE  0x22       /* Line with Label only */
#define HISTNUM  0x23
#define HISTLAB  0x24
#define HISTLIN  0x25
#define EMPTYLN  0x26       /* no more lines available */

#define ATTRBRKE 0x40       /* Attributes */
#define ATTRPC   0x80
#define ATTRHIST 0x20
#define ATTRLOG  0x10
#define ATTRHIG  0x08       /* HighLight Attribute */
#define ATTREXEC 0x01       /* hold in member 'cover' */
#define ATTRBRKD   0x100    /* disabled exec-break */
#define ATTRJTAKEN 0x200    // 



#define CRT  struct crt
struct crt  {           /* CRT struct */
  WORD16       inumb;   /* information number     */
  WORD16        cont;   /* content (attribute)    */
  WORD16        attr;   /* attribute CURPC, BRKPT */
  WORD16        bpnr;   /* breakpoint number      */
  ZXFIL       *pFile;
  int             fi;   /* File-Index of 'line'  */
  DWORD          off;   /* offset                 */
  DWORD         line;   /* line number bei HLL    */
  int           hidx;   /* History Index          */
  char         *pLab;   /* LabelName on HISTLAB/LABLINE */
  WORD16        scra;   /* Attribute on Screen    */
  WORD16        nLen;   /* Line-Length            */
  BYTE         cover;   /* Coverage Attribute     */
};
typedef struct crt   *pCRT;





#define ABREAK  0
#define CBREAK  1
#define WBREAK  2
#define RBREAK  3           /* Address-Range Break */

#pragma pack(1)
struct brk  {
  struct brk    *next;
  struct brk    *prev;

  DWORD      type : 4;      // ABREAK, CBREAK, WBREAK
  DWORD   enabled : 1;      // 1:=enabled, 0:=disabled
  DWORD    ReCalc : 1;      // recalc expr flag
  DWORD    BytObj : 1;      // WatchBrk: 0:=Bytes, 1:=Objects

  DWORD           Adr;      // Break-Address
  DWORD        mSpace;      // memory-space
  VTR             *pV;      // used on VTR-access breakpoints

  DWORD         tsize;      // WatchBrk: size of one object
  DWORD          many;      // WatchBrk: many objects or bytes
  WORD16          acc;      // WatchBrk: 1:=Read, 2:=Write, 3:=ReadWrite
  WORD16       BitPos;      // currently not used
  DWORD        number;      // BreakPoint-Number
  int          rcount;      // Break is taken when rcount = 1

  int          ocount;      // Original Count
  EXP             *ep;      // Cond-Expression
  char           *cmd;      // Exec-Command
  char          *Line;      // Breakpoint-Expression Line for Display
  char            *pF;      // module file name
  DWORD         nLine;      // line number
  BYTE         Opc[8];      // Opcode-Save Area for Monitors
};
#pragma pack()

#define BKS  struct brk



struct BpBlk  {
  BKS        Bp;             // Bp to clone from
  BKS      *nBp;             // the new Bp
  WORD16    Err;             // Error-Number
  BYTE     Item;             // 1 := expr, 2 := count, 3 := command */
  BYTE      Atr;             // 1 := Bp redefined
  BYTE    BpDlg;             // 1 := Bp create from Dialog
};



#if 0
extern void       LRwLF (pCRT X);             /* Language-Reverse-Line */
extern void       LFwLF (pCRT X);             /* Language-Forward-Line */
extern void      CrtAtt (pCRT X);             /* get LL-Attributes */
extern char       *LGet (pCRT X);
extern DWORD   AsmBelow (DWORD off);          /* Sync for ThumbTrack */
extern int               yindx;
extern CRT               cwLog;
extern DWORD            MARKPC;        /* used for LWin-HighLight */
extern BYTE   DynaScope (DWORD nAdr);
extern WORD16   DynaHll (DWORD nAdr);
extern ZXFIL *FileScope (DWORD nAdr);  /* map nAdr to 'ZXFIL *' */
extern BYTE    FileLine (ZXFIL *pF, DWORD nLine);
//--- End DisAsm Stuff
#endif


/*
 * Fox-Section types (taken from OMF267-Specification)
 */

#define   SF66_BIT        0x0000        /* Bit-Section */
#define   SF66_DATA       0x0001        /* Data-Section */
#define   SF66_CODE       0x0002        /* Code-Section */
#define   SF66_NCONST     0x0003        /* NConst-Section */
#define   SF66_HDATA      0x0005        /* Hdata-Section */
#define   SF66_HCONST     0x0007        /* HConst-Section */
#define   SF66_XDATA      0x0009        /* Xhuge-Data-Section */
#define   SF66_XCODE      0x000A        /* XCode-Section */
#define   SF66_XCONST     0x000B        /* XConst-Section */








#define ATR_EXEC   0x01         // 'executable ' Attribute
#define ATR_READ   0x02         // 'readable' Attribute
#define ATR_WRITE  0x04         // 'writable' Attribute
#define ATR_BREAK  0x08         // 'Exec-Break' Attribute
#define ATR_EXECD  0x10         // 'Executed' Attribute
#define ATR_WATCH  0x20         // Location has a Watch */
#define ATR_BPDIS  0x40         // 'disabled Exec-Break' Attribute
#define ATR_PAP    0x80         // Location has a Perf.-Analyzer point */
#define ATR_WRBRK  0x100        // Loc has a write-access break
#define ATR_RDBRK  0x200        // Loc has a read-access break
#define ATR_COMC   0x400        // iMCS51/251: Common code marker
#define ATR_VNM    0x800        // iMCS51: von Neumann mapped
#define ATR_BEP    0x1000       // iMCS51: Bank-Entry Point

#define ATR_EXTR   0x2000       // 166/167: within range of an EXTR sequence
#define ATR_JTAKEN 0x4000       // Jump-taken attribute


                                // for DASMFOX:
#define LOBOUND    0x00000000   // current low bound
#define HIBOUND    0xFFFFFFFF   // Fox: current high bound





struct irx  {
  char       *pS;           // the expression text
  WORD16  uError;           // Error-code
  int     uIndex;           // Error-Index
  int     nRadix;           // Expr.-Radix (-1:=auto, 10 or 16)  
  EXP        *e0;           // watch-expression
  EXP        *e1;           // store-expression
};
#define IRX  struct irx

/*
 * Real Scanner for Fox (SCANFOX1.C)
 */

#define  CINS  struct cins
#define  HNODES    256
#define  IDHEAP   2048

struct cins  {            // Command Input level structure
  char           achr;
  char         *pLine;    // the input line(s)
  int             ndx;    // read index
  int            lndx;    // index in current line
  int          iStart;    // start of following line index
  char         *fname;    // in case of FuncDef

  char         *iname;    // name of include file
  HANDLE        hFile;
  HANDLE        hFmap;
  DWORD         fSize;    // file length in bytes

  int          inHook;

  int          LineNo;
  int          nNodes;
  EXP          *nPool;
  WORD16         type;
  WORD16    PromptLen;    // length of Line-Prompt
  char         *idbuf;
  int           idndx;
  int            deep;    // FuncDef: '{' depth
//int       LastToken;

  DWORD       eof : 1;
  DWORD LineReady : 1;
  DWORD   InStruc : 1;    // struct/union member mode
  DWORD   LitMode : 1;    // get next token literally
  DWORD       eol : 1;    // end of line marker (delayed eol)
  DWORD      iDbm : 1;    // use ENV_DBM-Env for GetMem
  DWORD     iShow : 1;
  DWORD    iNoRes : 1;    // Watch-Asn expr.: no result output

  int           stlin;
  WORD16       uError;    // Error number
  int          uIndex;    // Error index
  BYTE          shoot;    // Line number
  BYTE        ExprErr;    // Expression-Error Flag.
  DWORD        uAddre;    // Error address (eg. load)
  IRX            *vpx;
  void           *yyp;    // Yacc's value Stack

  BYTE          __eoi;    // placeholder
};



#define YYMAXD   300            // from YACCPAR !
#define  IPMAX    30            // input stack 1...29

extern int          nStack;     // Input-Stack index
extern CINS *iStack[IPMAX];     // Input Stack
extern CINS          *cinp;     // current input
extern char  yytext [1024];

//extern YYSTYPE      yylval;

extern int          ExpLin;     // Line-Number
//extern int             ndx;     // line index
extern BYTE           tdef;     // typedef-search flag
extern int           stlin;

#if 0      // moved to 166.h
 extern WORD16       uError;     // Error number
 extern int          uIndex;     // Error index
 extern BYTE          shoot;     // Line number
 extern DWORD        uAddre;     // Error address (eg. load)
 extern char         *uName;     // some name, eg. function name
#endif


extern CINS  *CreateInput (char *pLine, WORD16 PromptLen, WORD16 type);
extern void     KillInput (void);
extern void   InitScanner (void);
extern void     ClearHeap (void);            // after command
extern void    SetLitMode (void);

extern EXP      *HeapNode (void);
extern TYP      *MakeType (BYTE type, DWORD nSz, TYP *btp);

extern SYM      *vFindSym (SYM *table, char *name);
//extern ZBK      *FindTMod (char *name);
extern ZBK      *FindFunc (ZBK *Theadr, char *name);
extern LIN    *FindLineNo (ZBK *Theadr, DWORD LineNo);
extern SYM       *FindSym (char *s);
extern vSYM      *SrcvSym (char *name);
extern vSYM     *MakevSym (char *name, WORD16 index, TYP *tp);

extern int          yylex (void);
extern int        yyparse (void);


/*
 * NodeFox.C:
 */

extern void HandleErr (EXP *ep);    // special node with etyp := 0
extern EXP     *MkOp2 (WORD16 Op, WORD16 index, EXP *L, EXP *R);
extern EXP     *MkOp1 (WORD16 Op, WORD16 index, EXP *L);
extern EXP      *Hook (EXP *X, EXP *L, EXP *R);
extern EXP    *castex (EXP *L, TYP *tp, WORD16 Expl, WORD16 index);
extern EXP      *call (EXP *X, EXP *args);
extern EXP  *parmlist (EXP *e1, EXP *e2);
extern EXP   *SizeObj (WORD16 index, EXP *L);
extern EXP   *SizeTyp (WORD16 index, TYP *tp);
extern EXP   *undefid (EXP *L);
extern EXP   *StruRef (EXP *L, char *Member, WORD16 index, WORD16 ptr);
extern EXP    *RefArr (EXP *L, EXP *R);
extern EXP     *ExecC (WORD16 index, EXP *parms);
extern EXP   *DoQuali (SQUAL *pq);
extern EXP  *HandleDp (int dpn, EXP *e2);

extern TYP    *DoType (void);
extern void     makep (DWORD nAtr, DWORD cv);
extern void    ArrTyp (EXP *ep);
extern void     linki (TYP *t1, TYP *t2);
extern void    dclspc (DWORD mode);

extern void     popdp (void);
extern void    p_type (WORD16 base, WORD16 index);
extern void    p_sign (WORD16 sign, WORD16 index);
extern void    attrib (WORD16 attr, WORD16 index);
extern void        md (BYTE mode);
extern void        cl (BYTE sclass);
extern void    dclspc (DWORD mode);
extern TYP    *DoType (void);


extern void      CmdErr (void);
extern void   LineFlush (void);

extern void   DoExitCmd (void);
extern void   DoExprCmd (EXP *ep, BYTE Run);
extern void   DoEvalCmd (EXP *ep);
extern void   DoLoadCmd (char *name, WORD16 index, int lOpt);  // 1:=nocode
extern void   DoLogShow (void);
extern void    DoLogOff (void);
extern void    LogWrite (int nSel, char *pLine, int nMany);
extern void     DoReset (int nCmd);
extern void     MkWatch (EXP *ep, int index);
extern void   CreaWatch (IRX *pX);
extern WORD16  AsnWatch (char *exp, int nLen); // Assignment via WatchVw
extern WORD16 WatchCalc (EXP *ep, char *pB);

⌨️ 快捷键说明

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