; /*
if 0
*/

/* for C begin */

#ifndef _EMU_TEST_
#define _EMU_TEST_

extern U8 timeOut;
extern U8 *bin2hex;
extern U16 Clock;
extern U8 exceptBreak;

//external
void HelpMsg(void);
void TestEP(U16);
void TestP2(U16);
void DumpTraceBuff(void);
void DumpDebugBuff(void);
void BDMTraceReset(void);
//!!void TraceReset(void);
U8   FillCode(U32);
void TraceBDM(void);
void TestBDM(U32*);
void TestBDM_L(U32*);
void TestBDM_H(U32*);
void TestBDMLong(U8*);
void BDMsync(void);
void FwReset(void);

//local
int isprint(U8 c){ return (0x20 <= c) && (c <= 0x7e); }
void PutStr(U8 *Str);
void asciiStr(U8 *Buff);
#define GetStrBufSize 60
U8 *GetStr(U8);
U16 hex2bin(U8 *hex,U8 *bin);
U16 hex2long(U8 *hex,U8 *bin);
U16 hex2word(U8 *hex,U8 *bin);
void ECHO(void);
void HEXCH(void);
void SendHexErr(void);
void SendVerifyErr(void);
void HexByteStr(U8 ch,U8 *buff);
void HexWordStr(U8 ch,U8 *buff);
void HexLongStr(U8 ch,U8 *buff);
void TestReg(U8* buff);
U16 GetRegNum(U8 *RegName);
void EditReg(U8 *RegName);
void TestCmp(U16);
void TestCpy(U16);
void TestSearch(void);


#endif

/* for C end */

#if 0
endif

; for ASM begin

 DB 'EPBK                          - display exceptBreak',13,10
 DB 'RSTH,RSTL,TEAH,TEAL,BKPL,BKPH - set target RST/TEA/BKPT signal',13,10
 DB 'REG,E<reg>                    - dump/edit register',13,10
 DB 'MR<cnt>                       - set maximum retry',13,10
 DB 'TB,TW,TR<address>             - test memory',13,10
 DB 'WC<address>                   - write code',13,10
 DB 'FB,FW,F<address>              - fill memory',13,10
 DB 'DB,DW,D<address>              - dump memory',13,10
 DB 'CMPB,CMPW                     - compare memory',13,10
 DB 'CPY+,CPY-                     - copy memory',13,10
 DB 'SEARCH                        - search memory',13,10
 DB 'TRST,TBUF                     - reset/dump trace buffer',13,10
 DB 'DRST,DBUF                     - reset/dump debug buffer',13,10
 DB 'A,S,SL<cmd>                   - send BDM command',13,10
 DB 'TBDM                          - trace BDM command',13,10
 DB 'H,?                           - show this message',13,10
 DB 0

; for ASM end

if 0
#endif
; /*
endif
; */
