1 /* 2 * Debugging Routines 3 * 4 * $Id: debug.h,v 1.4 2016-06-11 19:53:08 dom Exp $ 5 */ 6 7 #ifndef __DEBUG_H__ 8 #define __DEBUG_H__ 9 10 #include <sys/compiler.h> 11 12 13 #define MYSELF = 0xFFFF 14 15 /* Disassembles a line; returns the address for the next line 16 if MYSELF, disassembles the current program location */ 17 extern unsigned int __LIB__ disz80(unsigned int address, unsigned int lines) __smallc; 18 19 /* Dump on screen: if MYSELF address is given, displays #count stack words 20 and returns the current SP value (dump excluded), otherwise dumps memory 21 bytes and returns the address reached */ 22 extern unsigned int __LIB__ dump(unsigned int address,unsigned int count) __smallc; 23 24 /* TRUE if Z80 supports undocumented instructions. 25 Otherwise, FALSE (or, in worst cases.. crash !) */ 26 extern int __LIB__ z80undoc(void); 27 28 /* TRUE if Z80 supports strange undocumented flag behaviours 29 Otherwise, FALSE */ 30 extern int __LIB__ z80genuine(void); 31 32 /* TRUE if Z80 supports strange undocumented flag behaviours 33 Otherwise, FALSE */ 34 extern int __LIB__ z80rabbit(void); 35 36 /* Z80 type detection (cross fingers!) 37 0 - Z80 38 1 - Z180 / HD6140 / Other 39 2 - Z280 40 3 - Z380 41 4 - R800 42 5 - Rabbit Control Module 43 */ 44 45 extern int __LIB__ z80type(void); 46 47 #endif 48 49