?? bom.h
字號(hào):
struct Reg251 { // 80251 Registers
union {
BYTE bregs [16];
WORD16 wregs [16];
DWORD dregs [16];
} r;
DWORD nPC; // full address !
BYTE sp; // SP
BYTE psw; // PSW-sfr
BYTE psw1; // PSW1-sfr
BYTE b; // B-sfr
BYTE acc; // ACC-sfr
BYTE dpl; // DPL-sfr
BYTE dph; // DPH-sfr
BYTE ports[4];
INT64 nCycles; // cycle counter
};
struct RegS6 { // iMCS51 - SLE66Cxx (ECO2000) Registers
DWORD nPC;
INT64 nCycles; // cycle counter
BYTE psw;
BYTE sp;
BYTE b;
BYTE acc;
BYTE dpl;
BYTE dph;
BYTE bregs [8];
BYTE dpsel;
BYTE adrxh; // page for MOVX @Ri
WORD16 dptx [8]; // DPTR save area
};
#pragma pack()
#define SZ_R166 (OFO (struct Reg166, macc))
#define SZ_ST10 (sizeof (struct Reg166))
#define SZ_RX51 (sizeof (struct Regx51))
#define SZ_SLSZ (sizeof (struct RegS6))
#define SZ_S251 (sizeof (struct Reg251))
#define SZ_51MX (sizeof (struct Reg51MX))
/*
* iMCS-51 SFR-Attribute codes
*/
#define nSF 0x0000 // SFR not present
#define iSF 0x8000 // SFR is present
#define pSF 0x4000 // SFR is present and is Port-0...3
#define cSF 0x2000 // ECO 'external SFR' (EEPROM,TIMER,UART)
#define dSF 0x1000 // 80320: Sfr is DPL/DPH or DPL1/DPH1
// Note: the above need to be combined with ATR_READ/ATR_WRITE
// for selectively attribute configuration
// iAV replaced by ATR_READ/ATR_WRITE
/*
* Memory spaces
*/
#define mmNONE 0x0000 // not spaced
#define mmXDATA 0x0001 // XDATA
#define mmBANK0 0x0080 // BANK0
#define mmBANK31 0x009F // BANK31
#define mmDATA 0x00F0 // DATA
#define mmBIT 0x00F1 // BIT
#define mmEDATA 0x00F2 // EDATA (i251)
#define mmIDATA 0x00F3 // IDATA
#define mmECODE 0x00F4 // 251 ecode
#define mmHDATA 0x00F5 // 251 hdata
#define mmHCONS 0x00F6 // 251 hconst
#define mmCONST 0x00F7 // 251 const
#define mmPDATA 0x00FE // PDATA (c51 macht das bei generic)
#define mmCODE 0x00FF // CODE
#define mmPHYS 0x0100 // Physical SLE66+ Memory
#define mmPHLIM 0x0110 // 1MB Physical Memory
#define mmU1MEM 0x00F8 // UsrMem #1 (E2-PROM)
#define mmU2MEM 0x00F9 // UsrMem #2 (undefined)
#define mmU3MEM 0x00FA // UsrMem #3 (undefined)
#define mmU4MEM 0x00FB // UsrMem #4 (undefined)
#define mmU5MEM 0x00FC // UsrMem #5 (undefined)
#define mmU6MEM 0x00FD // UsrMem #6 (undefined)
#if 0
//--- SLE88Cxx specific's: -------------------------------
struct RegSle {
union {
// WORD16 wregs[16]; // ECO-2 word regs
DWORD dregs [9]; // SLE R0-R7,A
} r;
DWORD nPC; // LoWord is relevant !!!
DWORD Psw; // SLE PSW (32-Bit)
DWORD Reco; //
DWORD Aram; //
INT64 nCycles; // cycle counter
WORD16 sp;
BYTE cs;
BYTE ss;
BYTE ds0;
BYTE ds1;
BYTE ts0;
BYTE ts1;
};
#endif
//--------------------------------------------------------------
#define iSLE88 100 // dead !
#define i80x51 0x00 // generic 80x51
#define iEXTMAC 0x01 // MAC167
#define iSLE66 0x02 // SLE66
#define iC51MX 0x03 // Philips 80C51MX
#define iRF5016 0x04 // Philips P8RF5016 (Mifare pro X)
#define xxMENU UsrDwrd[0] // holds CAN-Extension Menu (DYM *)
#define xxUPDATE UsrDwrd[1] // holds 'void (*CanUpdate) (DWORD nCode)'
//
// Sle66: ioc.pUv[0] = WORD16 *pTab; // 256 Words fuer Peripheral-Config
//
struct bom {
DWORD nSize;
WORD16 bInitialized;
WORD16 iMCS; // ToolSet Definitions 0=51, 1=251, 2=166, 3=Fox
WORD16 iMinor; // SubCode: iMCS166(1):=MAC167
DWORD iModel; // memory model (based on iMCS)
DWORD iRtx; // which RTX (0=none, 1=RtxTiny, 2=RtxFull)
DWORD RunDeb : 1; // dScope is running
DWORD CmdLog : 1; // 1 := command log file is active
DWORD SerLog : 1; // 1 := serial log file active
DWORD iRun : 1; // GO or Step currently running
DWORD InfoiRun : 1; // Sim about to start running
DWORD iBoot : 1; // currently starting up Sim
DWORD iReset : 1; // Reset issued via Button
DWORD wdog_rst : 1; // Reset via Watchdog Timer
DWORD logmod : 1; // 0:=LOG, 1:=SLOG
DWORD target : 1; // 1:=target mode
DWORD jSilent : 1; // kill function without query
DWORD MemAccR : 1; // Memory-access possible while running
DWORD RegAccR : 1; // Register-access possible while running
DWORD hTrace : 1; // trace support
DWORD hCover : 1; // code coverage support
DWORD hPaLyze : 1; // Performance Analyzer support
DWORD hMemMap : 1; // Memory-Map support
DWORD ResetR : 1; // Reset possible while running
DWORD WinAcc : 1; // ReadMem/WriteMem/LoadTyp activated
// by some non-simulation vehicle
ZBK *pScp; // current Scope via WaScope()
ZXFIL *pScpF; // and the associated file
LIN *pLn; // and the line number
SYM *SfrH; // SFR-Symbols supplied by Cpu/Peri-DLL
SYM *hIntr; // head of Intrinsic's
SYM *tIntr; // head of Intrinsic's
SYM *hFunc; // head of Functions (User/Signal
struct szPAT *hSrcP; // head of search pathes (via 'set src')
struct szPAT *tSrcP; // tail of search pathes (via 'set src')
DWORD startasm; // DasmFox exports for LWinVw
DWORD altstart;
DWORD MarkPC;
// for enhancements:
BYTE UsrByte[16]; // currently not used.
WORD16 UsrWord[16]; // currently not used.
DWORD movb : 1; // MOVB instruction executed (SLE66)
DWORD SfrRdy : 1; // data from sfr is valid (SLE66)
DWORD DemoF : 1; // about to debug a demo file...
DWORD : 29; // currently not used.
DWORD UsrDwrd[15]; // currently not used.
//--- debug specific flags: -----------------------------------
DWORD periodic : 1; // periodic window update Flag
DWORD aLwin : 1;
DWORD aCover : 1;
DWORD aSer1 : 1;
DWORD aSer2 : 1;
DWORD aPa : 1;
DWORD aBox : 1;
DWORD viewmode : 3; // LwinVw: view mode
DWORD vrSel : 4; // LwinVw: address-range selection
DWORD aSym : 1; // Symbols Dialog active
DWORD aTbox : 1; // ToolBox is active
DWORD AscS1 : 1; // Serial #1 - 0:=Ascii, 1:=Hex mode
DWORD AscS2 : 1; // Serial #2 - 0:=Ascii, 1:=Hex mode
BYTE trace; // Record trace information
//-------------------------------------------------------------
BYTE ptree; // dump expression tree (_ptree_)
BYTE traps; // enable/disable interrupt/trap messages
BYTE *trap; // Trace buffer
int curtra; // current trace index
int numtra; // records in buffer
int cbreaks; // number of C-breaks
BKS *BpHead; // List head of Breakpoints
BKS *BpTail; // List tail of Breakpoints
DWORD AccOff; // if > 0: ignore access breaks
BYTE BpBlock : 1; // Block Bp-commands if Bp-Dialog is active
BYTE PaBlock : 1; // Block PA-commands if PA-Dialog is active
BYTE PaDlg : 1; // PA-Dialog is open
BYTE PaRun : 1; // PA is running
BYTE PaTim : 1; // Update PA time information
BYTE FuncGen;
BYTE KeyEsc; // Escape key has been pressed
// log file
char *CmdLogN; // name of command log file
FILE *CmdLogH; // file handle of command log file
char *SerLogN; // name of serial log file
FILE *SerLogH; // file handle of serial log file
HMODULE Linst; // DLL Instance handle
HMODULE Ginst; // AGDI Instance handle
HMODULE Rinst; // RTX-DLL Instance handle
HWND hwnd; // CMainFrame's m_hWnd, Parent for Dll-Dialogs
DWORD hmsg; // WM_OUTOUT Message
DYM *pMenu; // attached by peripheral dll
DYM *pMtrg; // attached via AGDI
DYM *pMrtx; // attached via RTX dll
int (*vp) (struct bom *pioc, DWORD nCode); // DLL init/uninit
int (*rvp) (DWORD nCode, void *p1); // RTX-DLL init/uninit
HWND curDlg; // currently active modeless dialog
union rstat st; // Run-Status Info
DWORD nPC; // Offset (16-bit) of the PC
INT64 cycles; // number of cycles executed
int etime; // execution time, counts down from tdelay to 0
int tdelay; // Time till next time watch
WORD16 error; // Error-code
DWORD ErrAdr; // Opt. Error-address
DWORD OscFrq; // Oscillator frequency
VTR *pVTA; // allocated array of MAXVTR VtReg's
WATCH **pVTwa; // and watch pointer list
DWORD nVT; // number of currently used VtReg's
CSTK *pStk; // call-stack entries
int nStk; // call-stack depth tracker
int tos; // PA-stack index
PAST *StPa; // PA-stack slots
PA *PaBgHd; // background PA always present.
PA *PaHead; // Head of PA ranges
PA *PaTail; // Tail of PA ranges
DWORD paEadr; // PA current range entry/exit address
INT64 CapCyc; // captures cycles
// struct FoxCont fox;
#if 1
union itrp itrp; // Interrupt status
BYTE sleep; // CPU sleep mode
BYTE _break_; // Stop execution, if _break_ := 1
BYTE radix; // number base, for compat. to dScope
BYTE intchange;
DWORD intvect; // interrupt vector address if itrp.w.flag = 1
BYTE intdis;
DWORD cPsw; // current PSW
DWORD oPsw; // old PSW
#endif
DWORD EINIT_exec; // 0=EINIT not yet executed / 1=EINIT executed
DWORD SRVWDT_exec; // 0=SRVWDT not yet executed / 1=SRVWDT executed
DWORD WDOGACTIVE; // 0=Watchdog disabled / 1=Watchdog enabled
// Polymorphic function
DWORD (*SimFunc) (DWORD nCode, void *p1, void *p2);
void (*LFwLF) (CRT *X); // DasmFox exports for LwinVw
void (*LRwLF) (CRT *X);
void (*CrtAtt) (CRT *X);
char *(*LGet) (CRT *X);
BYTE (*FileLine) (ZXFIL *pF, DWORD nLine);
ZXFIL *(*FileScope) (DWORD nAdr); // End of DasmFox exports
ZXFIL *(*DocToZXF) (LPCTSTR pN); // Map Docname to ZXFIL
WORD16 *(*GetAttr) (DWORD nAdr); // get attr for address
void (*StopRun) (void); // Uv3-Stop-Button was pressed
void (*ServeWDT) (void); // Watchdog timer function
void (*GoTil) (DWORD nAdr); // Go until for Fox-Sim test
int (*HistFunc) (int nCode, int indx, int n1, BYTE *pR);
DWORD (*PaFunc) (int nCode, int nAdr, void *p);
void (*GetOpc) (DWORD nAdr, DWORD *vp); // get 4-Bytes Opcode
DWORD (*SetOpc) (DWORD nAdr, BYTE *pB, DWORD mMany);
DWORD (*ReadMem) (DWORD nAdr, DWORD nMany, BYTE *vp);
DWORD (*WriteMem) (DWORD nAdr, DWORD nMany, BYTE *vp);
void (*Step) (DWORD nMany, DWORD type); // Step function
void (*Stop) (void); // Notbremse
void (*Reset) (WORD16 nFlags); // Reset Simu
void (*GetRegs) (void *vp /*struct FoxReg *vp*/);
void (*SetRegs) (void *vp /*struct FoxReg *vp*/);
DWORD (*MapMem) (DWORD SegTyp, DWORD nAdr1, DWORD nLen);
int (*ValidAdr) (DWORD nAdr, int nCode);
DWORD (*BpInfo) (DWORD nAdr, WORD16 nCode);
DWORD (*BpExists) (DWORD nAdr);
BKS *(*BreakFunc) (WORD16 nCode, WORD16 n1, DWORD nAdr, BKS *pB);
BKS *(*NewBreak) (DWORD nAdr, WORD16 nType, WORD16 nCode);
void (*DlgBp) (struct BpBlk *pB); // create Dialog Bp
VTR *(*p_create) (char *name, WORD16 nTyp); // create VTREG
void (*p_putval) (VTR *pV, union v *pCont);
void (*p_getval) (VTR *pV, union v *pCont);
VTR *(*FindVTR) (char *name); // find VTREG
void (*w_read) (pACCESS ac, WFP cur, WFP pnew);
void (*w_write) (pACCESS ac, WFP pnew);
void (*inval) (DWORD val);
int (*w_access) (DWORD adr, DWORD mask);
void (*ResetPeri) (void); // Reset Peripherals
void (*w_create) (pWATCH wp);
int (*t_create) (INT64 tv, void (*fc)(void));
void (*t_remove) (int indx);
void (*intcheck) (void);
// Serial I/O
void (*SerIn) (int nCom, WORD16 val); // Keypress in SerVw
void (*DlgUpdate) (void); // update peripheral dialogs
void (*ExtDlgUpd) (void); // update AGDI extension dialogs
void (*RtxUpdate) (DWORD nCode); // update RTX extension dialog(s)
//------------------------
//--- Kernel functions ---
//------------------------
void (*DoEvents) (void);
DWORD (*Notify) (DWORD nCode, void *lp1);
WORD16 (*RunCmd) (char *cmd, int nLen);
void (*CmdWinOut) (char *text);
void (*CmdCmdOut) (char *text);
void (*FreeEnv) (DWORD env);
void *(*GetMem) (DWORD many, int env);
char *(*SaveString) (char *s, int env);
void (*CleanUp) (void); // clean up after Stop-Debug
int (*SerByteOut) (int nCom, BYTE *pS, DWORD nMany); // write into SerWin
int (*SerWordOut) (int nCom, WORD16 *pW, DWORD nMany); // write into SerWin
void (*LogWrite) (int nSel, char *pLine, int nMany);
void (*BootHelp) (DWORD hlpExpr, DWORD noHelp, DWORD hStart);
void (*CreaWatch) (IRX *pX);
WORD16 (*WatchCalc) (EXP *ep, char *pB);
WORD16 (*AsnWatch) (char *exp, int nLen);
void (*LoadTyp) (char *pS, DWORD nAdr, int base, TYP *tp, union v *pU);
void (*LoadStr) (char *pS, DWORD nAdr, int nMax);
ZBK *(*WaScope) (DWORD nAdr);
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -