# o Provides the emulators
# * The gbdk-lib package from gbdk.
# o cvs -d cvs.gbdk.sourceforge.net:/cvsroot/gbdk co gbdk-lib
-# o Provildes mul, div, and include files for the z80 tests.
+# o Proviles mul, div, and include files for the z80 tests.
# * python 1.5 or above
+# * uCsim for the mcs51 port
#
# The paths below assume that sdcc, sdcc-extra, and gbdk-lib all reside in
# the same directory.
# The port name must be the same as the one used in the SDCC '-mxxx' argument.
# Each port must have a spec.mk which describes how to build the object
# files and how to run the emulator.
-ALL_PORTS = $(filter-out CVS,$(notdir $(wildcard $(PORTS_DIR)/*)))
+ALL_PORTS = $(filter-out CVS mcs51,$(notdir $(wildcard $(PORTS_DIR)/*)))
all: test-ports
_putchar('0' + rem);
}
+#ifdef SDCC_mcs51
+union
+{
+ struct
+ {
+ int offset;
+ char data_space;
+ } part;
+ char *p;
+} generic_p_u;
+#endif
+
void __printf(const char *szFormat, ...) REENTRANT
{
va_list ap;
if (*szFormat == '%') {
switch (*++szFormat) {
case 's': {
+#ifdef SDCC_mcs51
+#warning Workaround bug #436344
+ char GENERIC *sz;
+
+ generic_p_u.part.data_space = va_arg (ap, char);
+ generic_p_u.part.offset = va_arg (ap, int);
+ sz = generic_p_u.p;
+#else
char GENERIC *sz = va_arg(ap, char GENERIC *);
+#endif
while (*sz) {
_putchar(*sz++);
}