summaryrefslogtreecommitdiff
path: root/sdas/as8xcxxx
diff options
context:
space:
mode:
Diffstat (limited to 'sdas/as8xcxxx')
-rw-r--r--sdas/as8xcxxx/Makefile137
-rw-r--r--sdas/as8xcxxx/Makefile.in137
-rw-r--r--sdas/as8xcxxx/clean.mk25
-rw-r--r--sdas/as8xcxxx/ds8.h203
-rw-r--r--sdas/as8xcxxx/ds8adr.c249
-rw-r--r--sdas/as8xcxxx/ds8mch.c945
-rw-r--r--sdas/as8xcxxx/ds8pst.c344
-rw-r--r--sdas/as8xcxxx/sdas390.vcxproj165
-rw-r--r--sdas/as8xcxxx/sdas390.vcxproj.filters86
9 files changed, 2291 insertions, 0 deletions
diff --git a/sdas/as8xcxxx/Makefile b/sdas/as8xcxxx/Makefile
new file mode 100644
index 0000000..f43df84
--- /dev/null
+++ b/sdas/as8xcxxx/Makefile
@@ -0,0 +1,137 @@
+#
+#
+#
+
+VERSION = 3.9.3
+VERSIONHI = 3
+VERSIONLO = 9
+VERSIONP = 3
+
+SHELL = /bin/sh
+CC = gcc
+CPP = gcc -E
+INSTALL = /usr/bin/install -c
+STRIP = strip
+MAKEDEP = g++ -MM
+
+top_builddir = ../..
+top_srcdir = ../..
+
+srcdir = .
+prefix = /usr/local
+exec_prefix = ${prefix}
+bindir = ${exec_prefix}/bin
+libdir = ${exec_prefix}/lib
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+includedir = ${prefix}/include
+mandir = ${datarootdir}/man
+man1dir = $(mandir)/man1
+man2dir = $(mandir)/man2
+infodir = @info@
+
+EXEEXT =
+
+
+
+CPPFLAGS = -DSDCDB -DNOICE -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../asxxsrc -I$(srcdir)/../../support/util
+CFLAGS = -pipe -ggdb -g -O2 -Wall -Wno-parentheses $(CPPFLAGS)
+LDFLAGS =
+LIBS = -lm
+
+OBJDIR = obj
+
+UTILLIB = $(srcdir)/../../support/util
+UTILSRC = dbuf.c dbuf_string.c
+UTILLIBOBJS = $(UTILSRC:%.c=$(OBJDIR)/%.o)
+
+ASXXLIB = $(srcdir)/../asxxsrc
+ASXXLIBSRC = asdbg.c asdata.c asexpr.c aslex.c aslist.c asmain.c asout.c assubr.c assym.c asmcro.c sdas.c strcmpi.c
+ASXXLIBOBJS = $(ASXXLIBSRC:%.c=$(OBJDIR)/%.o)
+
+SRC = ds8pst.c ds8mch.c ds8adr.c
+OBJS = $(SRC:%.c=$(OBJDIR)/%.o)
+
+ASSOURCES = $(SRC) $(ASXXLIBSRC:%.c=$(ASXXLIB)/%.c) $(UTILSRC:%.c=$(UTILLIB)/%.c)
+
+ASOBJECTS = $(OBJS) $(ASXXLIBOBJS) $(UTILLIBOBJS)
+
+ASX = $(top_builddir)/bin/sdas390$(EXEEXT)
+#DEST = $(DESTDIR)$(bindir)/sdas390$(EXEEXT)
+DEST = sdas390
+DESTPATH = $(DESTDIR)$(bindir)/
+
+transform = s,x,x,
+
+# Compiling entire program or any subproject
+# ------------------------------------------
+all: checkconf $(ASX)
+
+$(ASX): $(ASOBJECTS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS) $(LIBS)
+
+# Compiling and installing everything and running test
+# ----------------------------------------------------
+install: all installdirs
+ $(INSTALL) $(ASX) $(DESTPATH)`echo $(DEST)|sed '$(transform)'`$(EXEEXT)
+ $(STRIP) $(DESTPATH)`echo $(DEST)|sed '$(transform)'`$(EXEEXT)
+
+# Deleting all the installed files
+# --------------------------------
+uninstall:
+ rm -f $(DESTPATH)`echo $(DEST)|sed '$(transform)'`$(EXEEXT)
+
+
+# Performing self-test
+# --------------------
+check:
+
+
+# Performing installation test
+# ----------------------------
+installcheck:
+
+
+# Creating installation directories
+# ---------------------------------
+installdirs:
+ $(INSTALL) -d $(DESTDIR)$(bindir)
+
+
+# Creating dependencies
+# ---------------------
+dep: Makefile.dep
+
+Makefile.dep: $(ASSOURCES) $(srcdir)/*.h
+ $(MAKEDEP) $(CPPFLAGS) $(filter %.c,$^) >Makefile.dep
+
+ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
+ clean distclean mostlyclean realclean)" ""
+ -include Makefile.dep
+endif
+include $(srcdir)/clean.mk
+
+# My rules
+# --------
+$(OBJDIR)/.stamp:
+ mkdir -p $(OBJDIR)
+ touch $(OBJDIR)/.stamp
+
+$(OBJDIR)/%.o: %.c $(OBJDIR)/.stamp
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+$(OBJDIR)/%.o: $(ASXXLIB)/%.c $(OBJDIR)/.stamp
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+$(OBJDIR)/%.o: $(UTILLIB)/%.c $(OBJDIR)/.stamp
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+
+# Remaking configuration
+# ----------------------
+checkconf:
+ @if [ -f $(top_builddir)/devel ]; then\
+ $(MAKE) -f ../conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
+ fi
+
+# End of Makefile
diff --git a/sdas/as8xcxxx/Makefile.in b/sdas/as8xcxxx/Makefile.in
new file mode 100644
index 0000000..5dbfade
--- /dev/null
+++ b/sdas/as8xcxxx/Makefile.in
@@ -0,0 +1,137 @@
+#
+#
+#
+
+VERSION = @VERSION@
+VERSIONHI = @VERSIONHI@
+VERSIONLO = @VERSIONLO@
+VERSIONP = @VERSIONP@
+
+SHELL = /bin/sh
+CC = @CC@
+CPP = @CPP@
+INSTALL = @INSTALL@
+STRIP = @STRIP@
+MAKEDEP = @MAKEDEP@
+
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+includedir = @includedir@
+mandir = @mandir@
+man1dir = $(mandir)/man1
+man2dir = $(mandir)/man2
+infodir = @info@
+
+EXEEXT = @EXEEXT@
+
+VPATH = @srcdir@
+
+CPPFLAGS = @CPPFLAGS@ -DSDCDB -DNOICE -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../asxxsrc -I$(srcdir)/../../support/util
+CFLAGS = @CFLAGS@ @WALL_FLAG@ $(CPPFLAGS)
+LDFLAGS = @LDFLAGS@
+LIBS = -lm
+
+OBJDIR = obj
+
+UTILLIB = $(srcdir)/../../support/util
+UTILSRC = dbuf.c dbuf_string.c
+UTILLIBOBJS = $(UTILSRC:%.c=$(OBJDIR)/%.o)
+
+ASXXLIB = $(srcdir)/../asxxsrc
+ASXXLIBSRC = asdbg.c asdata.c asexpr.c aslex.c aslist.c asmain.c asout.c assubr.c assym.c asmcro.c sdas.c strcmpi.c
+ASXXLIBOBJS = $(ASXXLIBSRC:%.c=$(OBJDIR)/%.o)
+
+SRC = ds8pst.c ds8mch.c ds8adr.c
+OBJS = $(SRC:%.c=$(OBJDIR)/%.o)
+
+ASSOURCES = $(SRC) $(ASXXLIBSRC:%.c=$(ASXXLIB)/%.c) $(UTILSRC:%.c=$(UTILLIB)/%.c)
+
+ASOBJECTS = $(OBJS) $(ASXXLIBOBJS) $(UTILLIBOBJS)
+
+ASX = $(top_builddir)/bin/sdas390$(EXEEXT)
+#DEST = $(DESTDIR)$(bindir)/sdas390$(EXEEXT)
+DEST = sdas390
+DESTPATH = $(DESTDIR)$(bindir)/
+
+transform = @program_transform_name@
+
+# Compiling entire program or any subproject
+# ------------------------------------------
+all: checkconf $(ASX)
+
+$(ASX): $(ASOBJECTS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS) $(LIBS)
+
+# Compiling and installing everything and running test
+# ----------------------------------------------------
+install: all installdirs
+ $(INSTALL) $(ASX) $(DESTPATH)`echo $(DEST)|sed '$(transform)'`$(EXEEXT)
+ $(STRIP) $(DESTPATH)`echo $(DEST)|sed '$(transform)'`$(EXEEXT)
+
+# Deleting all the installed files
+# --------------------------------
+uninstall:
+ rm -f $(DESTPATH)`echo $(DEST)|sed '$(transform)'`$(EXEEXT)
+
+
+# Performing self-test
+# --------------------
+check:
+
+
+# Performing installation test
+# ----------------------------
+installcheck:
+
+
+# Creating installation directories
+# ---------------------------------
+installdirs:
+ $(INSTALL) -d $(DESTDIR)$(bindir)
+
+
+# Creating dependencies
+# ---------------------
+dep: Makefile.dep
+
+Makefile.dep: $(ASSOURCES) $(srcdir)/*.h
+ $(MAKEDEP) $(CPPFLAGS) $(filter %.c,$^) >Makefile.dep
+
+ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
+ clean distclean mostlyclean realclean)" ""
+ -include Makefile.dep
+endif
+include $(srcdir)/clean.mk
+
+# My rules
+# --------
+$(OBJDIR)/.stamp:
+ mkdir -p $(OBJDIR)
+ touch $(OBJDIR)/.stamp
+
+$(OBJDIR)/%.o: %.c $(OBJDIR)/.stamp
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+$(OBJDIR)/%.o: $(ASXXLIB)/%.c $(OBJDIR)/.stamp
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+$(OBJDIR)/%.o: $(UTILLIB)/%.c $(OBJDIR)/.stamp
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+
+# Remaking configuration
+# ----------------------
+checkconf:
+ @if [ -f $(top_builddir)/devel ]; then\
+ $(MAKE) -f ../conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
+ fi
+
+# End of Makefile
diff --git a/sdas/as8xcxxx/clean.mk b/sdas/as8xcxxx/clean.mk
new file mode 100644
index 0000000..ac998bb
--- /dev/null
+++ b/sdas/as8xcxxx/clean.mk
@@ -0,0 +1,25 @@
+# Deleting all files created by building the program
+# --------------------------------------------------
+include $(top_builddir)/Makefile.common
+
+clean: mostlyclean
+ rm -f *.dep
+ rm -f $(ASOBJECTS) $(OBJDIR)/.stamp
+ if [ -d $(OBJDIR) ]; then rmdir $(OBJDIR); fi
+
+# Deleting all files created by configuring or building the program
+# -----------------------------------------------------------------
+distclean: clean
+ rm -f Makefile
+
+# Like clean but some files may still exist
+# -----------------------------------------
+mostlyclean:
+ rm -f *core *[%~] *.[oa]
+ rm -f .[a-z]*~
+ rm -f $(top_builddir)/bin/sdas390$(EXEEXT)
+
+# Deleting everything that can reconstructed by this Makefile. It deletes
+# everything deleted by distclean plus files created by bison, etc.
+# -----------------------------------------------------------------------
+realclean: distclean
diff --git a/sdas/as8xcxxx/ds8.h b/sdas/as8xcxxx/ds8.h
new file mode 100644
index 0000000..0cfb9d9
--- /dev/null
+++ b/sdas/as8xcxxx/ds8.h
@@ -0,0 +1,203 @@
+/* ds8.h */
+
+/*
+ * Copyright (C) 1998-2009 Alan R. Baldwin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ * Alan R. Baldwin
+ * 721 Berkeley St.
+ * Kent, Ohio 44240
+ *
+ * This Assember Ported by
+ * jhartman at compuserve dot com
+ * noice at noicedebugger dot com
+ *
+ * Modified from i51pst.c
+ * Bill McKinnon
+ * w_mckinnon at conknet dot com
+ *
+ */
+
+/*)BUILD
+ $(PROGRAM) = AS8XCXXX
+ $(INCLUDE) = {
+ ASXXXX.H
+ DS8.H
+ }
+ $(FILES) = {
+ DS8MCH.C
+ DS8ADR.C
+ DS80PST.C
+ ASMAIN.C
+ ASDBG.C
+ ASLEX.C
+ ASSYM.C
+ ASSUBR.C
+ ASEXPR.C
+ ASDATA.C
+ ASLIST.C
+ ASOUT.C
+ }
+ $(STACK) = 3000
+*/
+
+/* Addressing modes */
+#define S_A 30 /* A */
+/* #define S_B 31 */ /* B */
+#define S_C 32 /* C (carry) */
+#define S_RAB 33 /* AB */
+#define S_DPTR 34 /* DPTR */
+#define S_REG 35 /* Register R0-R7 */
+#define S_IMMED 36 /* immediate */
+#define S_DIR 37 /* direct */
+#define S_EXT 38 /* extended */
+#define S_PC 39 /* PC (for addressing mode) */
+
+#define S_AT_R 40 /* @R0 or @R1 */
+#define S_AT_DP 41 /* @DPTR */
+#define S_AT_APC 42 /* @A+PC */
+#define S_AT_ADP 43 /* @A+DPTR */
+#define S_NOT_BIT 44 /* /BIT (/DIR) */
+
+/*
+ * Symbol types.
+ */
+#define S_INH 50 /* One byte inherent */
+#define S_JMP11 51 /* Jump and call 11 bit. */
+#define S_JMP16 52 /* Jump and call 16 bit */
+#define S_ACC 53 /* Accumulator */
+#define S_TYP1 54 /* Type 1 (inc and dec) */
+#define S_TYP2 55 /* Type 2 (arith ops) */
+#define S_TYP3 56 /* Type 3 (logic ops) */
+#define S_TYP4 57 /* Type 4 (XCH) */
+#define S_MOV 58 /* MOV */
+#define S_BITBR 59 /* bit branch */
+#define S_BR 60 /* branch */
+#define S_ACBIT 61 /* CLR, CPL */
+#define S_CJNE 62 /* CJNE */
+#define S_DJNZ 63 /* DJNZ */
+#define S_JMP 64 /* JMP */
+#define S_MOVC 65 /* MOVC */
+#define S_MOVX 66 /* MOVX */
+#define S_AB 67 /* AB (div and mul) */
+#define S_CPL 68 /* CPL */
+#define S_SETB 69 /* SETB */
+#define S_DIRECT 70 /* DIRECT (pusha and pop) */
+#define S_XCHD 71 /* XCHD */
+
+#define S_AMODE 90 /* address mode directive */
+
+#define S_CPU 91 /* Machines */
+
+/*
+ * Processor Types (S_CPU)
+ */
+#define X_DS______ 0
+#define X_DS8XCXXX 1
+#define X_DS80C310 2
+#define X_DS80C320 3
+#define X_DS80C323 4
+#define X_DS80C390 5
+#define X_DS83C520 6
+#define X_DS83C530 7
+#define X_DS83C550 8
+#define X_DS87C520 9
+#define X_DS87C530 10
+#define X_DS87C550 11
+
+/*
+ * Registers. Value == address in RAM, except for PC
+ */
+#define R0 0
+#define R1 1
+#define R2 2
+#define R3 3
+#define R4 4
+#define R5 5
+#define R6 6
+#define R7 7
+#define A 0xE0
+#define DPTR 0x82
+#define PC 0xFF /* dummy number for register ID only */
+#define AB 0xFE /* dummy number for register ID only */
+#define C 0xFD /* dummy number for register ID only */
+
+struct adsym
+{
+ char a_str[5]; /* addressing string (length for DPTR+null)*/
+ int a_val; /* addressing mode value */
+};
+
+/* pre-defined symbol structure: name, value, processor type */
+struct PreDef
+{
+ char *id; /* ARB */
+ int value;
+ int ptype;
+};
+extern struct PreDef preDef[];
+
+/*
+ * Assembler Types
+ */
+#define DS______ (0x00000000)
+#define DS8XCXXX (0x00000001)
+#define DS80C310 (0x00000002)
+#define DS80C320 (0x00000004)
+#define DS80C323 (0x00000008)
+#define DS80C390 (0x00000010)
+#define DS83C520 (0x00000100)
+#define DS83C530 (0x00000200)
+#define DS83C550 (0x00000400)
+#define DS87C520 (0x00001000)
+#define DS87C530 (0x00002000)
+#define DS87C550 (0x00004000)
+
+ /* machine dependent functions */
+
+#define DS_CPU "Dallas Semiconductor"
+
+#ifdef OTHERSYSTEM
+
+ /* ds8adr.c */
+extern struct adsym reg51[];
+extern int addr(struct expr *esp);
+extern int admode(struct adsym *sp);
+extern int any(int c, char *str);
+extern int srch(char *str);
+extern int reg(void);
+
+ /* ds8mch.c */
+extern VOID machine(struct mne *mp);
+extern int mchpcr(struct expr *esp);
+extern VOID minit(void);
+
+#else
+
+ /* ds8adr.c */
+extern struct adsym reg51[];
+extern int addr();
+extern int admode();
+extern int any();
+extern int srch();
+extern int reg();
+
+ /* ds8mch.c */
+extern VOID machine();
+extern int mchpcr();
+extern VOID minit();
+
+#endif
diff --git a/sdas/as8xcxxx/ds8adr.c b/sdas/as8xcxxx/ds8adr.c
new file mode 100644
index 0000000..3575707
--- /dev/null
+++ b/sdas/as8xcxxx/ds8adr.c
@@ -0,0 +1,249 @@
+/* ds8adr.c */
+
+/*
+ * Copyright (C) 1998-2009 Alan R. Baldwin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ * Alan R. Baldwin
+ * 721 Berkeley St.
+ * Kent, Ohio 44240
+ *
+ * This Assember Ported by
+ * jhartman at compuserve dot com
+ * noice at noicedebugger dot com
+ *
+ * Modified from i51pst.c
+ * Bill McKinnon
+ * w_mckinnon at conknet dot com
+ *
+ */
+
+#include "asxxxx.h"
+#include "ds8.h"
+
+
+struct adsym reg51[] = { /* R0 thru R7 registers */
+ { "R0", R0 },
+ { "R1", R1 },
+ { "R2", R2 },
+ { "R3", R3 },
+ { "R4", R4 },
+ { "R5", R5 },
+ { "R6", R6 },
+ { "R7", R7 },
+ { "A", A },
+ { "DPTR", DPTR },
+ { "PC", PC },
+ { "C", C },
+ { "AB", AB },
+ { "", 0x00 }
+};
+
+/* Classify argument as to address mode */
+int
+addr(struct expr *esp)
+{
+ int c;
+ unsigned int rd;
+
+ if ((c = getnb()) == '#') {
+ /* Immediate mode */
+ expr(esp, 0);
+ esp->e_mode = S_IMMED;
+ }
+ else if (c == '@') {
+ /* choices are @R0, @R1, @DPTR, @A+PC, @A+DPTR */
+ switch (reg()) {
+ case R0:
+ esp->e_mode = S_AT_R;
+ esp->e_addr = R0;
+ break;
+ case R1:
+ esp->e_mode = S_AT_R;
+ esp->e_addr = R1;
+ break;
+ case DPTR:
+ esp->e_mode = S_AT_DP;
+ esp->e_addr = DPTR;
+ break;
+ case A:
+ if (getnb() == '+') {
+ rd = reg();
+ if (rd == PC) {
+ esp->e_mode = S_AT_APC;
+ esp->e_addr = 0;
+ } else if (rd == DPTR) {
+ esp->e_mode = S_AT_ADP;
+ esp->e_addr = 0;
+ } else {
+ aerr();
+ }
+ } else
+ aerr();
+ break;
+ }
+
+ esp->e_flag = 0;
+ esp->e_base.e_ap = NULL;
+ }
+ else if (c == '*') {
+ if ((c = getnb()) == '/') {
+ /* Force inverted bit */
+ expr(esp, 0);
+ esp->e_mode = S_NOT_BIT;
+ } else {
+ unget(c);
+ /* Force direct page */
+ expr(esp, 0);
+ esp->e_mode = S_DIR;
+ }
+ if (esp->e_addr & ~0xFF)
+ err('d');
+ }
+ else if (c == '/') {
+ /* Force inverted bit */
+ expr(esp, 0);
+ esp->e_mode = S_NOT_BIT;
+ }
+ else {
+ unget(c);
+
+ /* try for register: A, AB, R0-R7, DPTR, PC, Cy */
+ if ((esp->e_addr = admode(reg51)) != -1) {
+ switch (esp->e_addr) {
+ case A:
+ esp->e_mode = S_A;
+ break;
+ case AB:
+ esp->e_mode = S_RAB;
+ break;
+ case DPTR:
+ esp->e_mode = S_DPTR;
+ break;
+ case PC:
+ esp->e_mode = S_PC;
+ break;
+ case C:
+ esp->e_mode = S_C;
+ break;
+ default:
+ /* R0-R7 */
+ esp->e_mode = S_REG;
+ }
+ } else {
+ /* Must be an expression */
+ esp->e_addr = 0; /* Vasiliy Petrov */
+ expr(esp, 0);
+ if ((!esp->e_flag)
+ && (esp->e_base.e_ap==NULL)
+ && !(esp->e_addr & ~0xFF)) {
+ esp->e_mode = S_DIR;
+ } else {
+ esp->e_mode = S_EXT;
+ }
+ }
+ }
+ return (esp->e_mode);
+}
+
+/*
+ * Enter admode() to search a specific addressing mode table
+ * for a match. Return the addressing value on a match or
+ * -1 for no match.
+ */
+int
+admode(struct adsym *sp)
+{
+ char *ptr;
+ int i;
+
+ unget(getnb());
+ i = 0;
+ while ( *(ptr = &sp[i].a_str[0]) ) {
+ if (srch(ptr)) {
+ return(sp[i].a_val);
+ }
+ i++;
+ }
+ return(-1);
+}
+
+/*
+ * srch --- does string match ?
+ */
+int
+srch(char *str)
+{
+ char *ptr;
+ ptr = ip;
+
+ while (*ptr && *str) {
+ if(ccase[*ptr & 0x007F] != ccase[*str & 0x007F])
+ break;
+ ptr++;
+ str++;
+ }
+ if (ccase[*ptr & 0x007F] == ccase[*str & 0x007F]) {
+ ip = ptr;
+ return(1);
+ }
+
+ if (!*str)
+ if (any(*ptr," \t\n,];")) {
+ ip = ptr;
+ return(1);
+ }
+ return(0);
+}
+
+/*
+ * any --- does str contain c?
+ */
+int
+any(int c, char *str)
+{
+ while (*str)
+ if(*str++ == c)
+ return(1);
+ return(0);
+}
+
+/*
+ * Read a register name. Return register value, -1 if no register found
+ */
+int
+reg(void)
+{
+ struct mne *mp;
+ char id[NCPS];
+
+ getid(id, -1);
+ if ((mp = mlookup(id))==NULL) {
+ aerr();
+ return (-1);
+ }
+ switch (mp->m_type) {
+ case S_A:
+ case S_AB:
+ case S_DPTR:
+ case S_PC:
+ case S_REG:
+ return ((int) mp->m_valu);
+
+ default:
+ return (-1);
+ }
+}
diff --git a/sdas/as8xcxxx/ds8mch.c b/sdas/as8xcxxx/ds8mch.c
new file mode 100644
index 0000000..1fe4bf4
--- /dev/null
+++ b/sdas/as8xcxxx/ds8mch.c
@@ -0,0 +1,945 @@
+/* ds8mch.c */
+
+/*
+ * Copyright (C) 1998-2009 Alan R. Baldwin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ * Alan R. Baldwin
+ * 721 Berkeley St.
+ * Kent, Ohio 44240
+ *
+ * This Assember Ported by
+ * jhartman at compuserve dot com
+ * noice at noicedebugger dot com
+ *
+ * Modified from i51pst.c
+ * Bill McKinnon
+ * w_mckinnon at conknet dot com
+ *
+ */
+
+#include "asxxxx.h"
+#include "ds8.h"
+
+char *cpu = "Dallas Semiconductor [User Defined]";
+char *dsft = "asm";
+
+static int amode;
+static char buff[80];
+static int ds8_bytes;
+static int mchtyp;
+
+/*
+ * Opcode Cycle Definitions
+ */
+#define OPCY_SDP ((char) (0xFF))
+#define OPCY_ERR ((char) (0xFE))
+
+/* OPCY_NONE ((char) (0x80)) */
+/* OPCY_MASK ((char) (0x7F)) */
+
+#define OPCY_CPU ((char) (0xFD))
+#define OPCY_AMODE ((char) (0xFC))
+#define OPCY_BITS ((char) (0xFB))
+
+
+#define UN ((char) (OPCY_NONE | 0x00))
+
+/*
+ * ds8xcxxx Cycle Count
+ *
+ * opcycles = ds8pg1[opcode]
+ */
+static char ds8pg1[256] = {
+/*--*--* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+/*--*--* - - - - - - - - - - - - - - - - */
+/*00*/ 4,12,16, 4, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+/*10*/ 12,12,16, 4, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+/*20*/ 12,12,16, 4, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+/*30*/ 12,12,16, 4, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+/*40*/ 12,12, 8,12, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+/*50*/ 12,12, 8,12, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+/*60*/ 12,12, 8,12, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+/*70*/ 12,12, 8,12, 8,12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+/*80*/ 12,12, 8,12,20,12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+/*90*/ 12,12, 8,12, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+/*A0*/ 8,12, 8,12,20,UN, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+/*B0*/ 8,12, 8, 4,16,16,16,16,16,16,16,16,16,16,16,16,
+/*C0*/ 8,12, 8, 4, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+/*D0*/ 8,12, 8, 4, 4,16, 4, 4,12,12,12,12,12,12,12,12,
+/*E0*/ 8,12, 8, 8, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+/*F0*/ 8,12, 8, 8, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+};
+
+/*
+ * Process machine ops.
+ */
+VOID
+machine(struct mne *mp)
+{
+ char *p, *str;
+ char pid[NINPUT], id[NINPUT];
+ int c, d, t, t1, v1;
+ a_uint op;
+ struct sym *sp;
+ struct expr e, e1, e2;
+
+ clrexpr(&e);
+ clrexpr(&e1);
+ clrexpr(&e2);
+
+ op = mp->m_valu;
+ switch (mp->m_type) {
+
+ case S_CPU:
+ opcycles = OPCY_CPU;
+ lmode = SLIST;
+ switch(op) {
+ default: op = DS8XCXXX;
+ case DS8XCXXX: v1 = 2; str = "DS8XCXXX"; sym[2].s_addr = X_DS8XCXXX; break;
+ case DS80C310: v1 = 2; str = "DS80C310"; sym[2].s_addr = X_DS80C310; break;
+ case DS80C320: v1 = 2; str = "DS80C320"; sym[2].s_addr = X_DS80C320; break;
+ case DS80C323: v1 = 2; str = "DS80C323"; sym[2].s_addr = X_DS80C323; break;
+ case DS80C390: v1 = 3; str = "DS80C390"; sym[2].s_addr = X_DS80C390; break;
+ case DS83C520: v1 = 2; str = "DS83C520"; sym[2].s_addr = X_DS83C520; break;
+ case DS83C530: v1 = 2; str = "DS83C530"; sym[2].s_addr = X_DS83C530; break;
+ case DS83C550: v1 = 2; str = "DS83C550"; sym[2].s_addr = X_DS83C550; break;
+ case DS87C520: v1 = 2; str = "DS87C520"; sym[2].s_addr = X_DS87C520; break;
+ case DS87C530: v1 = 2; str = "DS87C530"; sym[2].s_addr = X_DS87C530; break;
+ case DS87C550: v1 = 2; str = "DS87C550"; sym[2].s_addr = X_DS87C550; break;
+ case DS______: v1 = 2; str = "DS______"; sym[2].s_addr = X_DS______;
+ if (more()) {
+ str = p = pid;
+ d = getnb();
+ while ((c = get()) != d) {
+ if (c == '\0') {
+ qerr();
+ }
+ if (p < &pid[sizeof(pid)-3]) {
+ *p++ = c;
+ } else {
+ break;
+ }
+ }
+ *p = 0;
+ }
+ break;
+ }
+ if (op != 0) {
+ ds8_bytes = v1;
+ exprmasks(v1);
+ }
+ mchtyp = (int) op;
+
+ sprintf(id, "__%s", str);
+ sp = lookup(id);
+ if (sp->s_type != S_NEW && (sp->s_flag & S_ASG) == 0) {
+ err('m');
+ }
+ sp->s_type = S_USER;
+ sp->s_addr = 1;
+ sp->s_flag |= S_ASG;
+
+ sprintf(buff, "%s %s", DS_CPU, str);
+ cpu = buff;
+
+ sp = lookup("__SFR_BITS");
+ if (sp->s_type != S_NEW && (sp->s_flag & S_ASG) == 0) {
+ err('m');
+ }
+ sp->s_type = S_USER;
+ sp->s_flag |= S_ASG;
+
+ if (more()) {
+ expr(&e, 0);
+ abscheck(&e);
+ sp->s_addr = e.e_addr;
+ } else {
+ sp->s_addr = 1;
+ }
+ break;
+
+ case S_AMODE:
+ opcycles = OPCY_AMODE;
+ if ((mchtyp != 0) && (mchtyp != DS80C390)) {
+ err('o');
+ break;
+ } else
+ if ((mchtyp == 0) && ((a_bytes < 2) || (a_bytes > 3))) {
+ err('o');
+ break;
+ }
+ expr(&e, 0);
+ abscheck(&e);
+ amode = (int) e.e_addr;
+ if ((amode < 0) || (amode > 2)) {
+ amode = 0;
+ err('o');
+ }
+ if ((c = getnb()) == ',') {
+ expr(&e1, 0);
+ abscheck(&e1);
+ if (e1.e_addr != 0) {
+/* mov ta,#0aah */ outab(0x075); outab(0x0C7); outab(0x0AA);
+/* mov ta,#055h */ outab(0x075); outab(0x0C7); outab(0x055);
+/* mov acon,#amode */ outab(0x075); outab(0x09D); outab(amode);
+ } else {
+ lmode = SLIST;
+ }
+ } else {
+ unget(c);
+ lmode = SLIST;
+ }
+ break;
+
+ case S_BITS:
+ if (ds8_bytes == 0) {
+ ds8_bytes = (int) op;
+ exprmasks(ds8_bytes);
+ } else
+ if (ds8_bytes != (int) op) {
+ err('m');
+ }
+ opcycles = OPCY_BITS;
+ lmode = SLIST;
+ break;
+
+ case S_INH:
+ outab(op);
+ break;
+
+ case S_JMP11:
+ expr(&e, 0);
+ if (amode == 2) {
+ outr3bm(&e, R_J19, op);
+ } else {
+ outrwm(&e, R_J11, op);
+ }
+ break;
+
+ case S_JMP16:
+ expr(&e, 0);
+ outab(op);
+ if (amode == 2) {
+ outr3b(&e, R_NORM);
+ } else {
+ outrw(&e, R_NORM);
+ }
+ break;
+
+ case S_ACC:
+ t = addr(&e);
+ if (t != S_A)
+ aerr();
+ outab(op);
+ break;
+
+ case S_TYP1:
+ /* A, direct, @R0, @R1, R0 to R7. "INC" also allows DPTR */
+ t = addr(&e);
+
+ switch (t) {
+ case S_A:
+ outab(op + 4);
+ break;
+
+ case S_DIR:
+ case S_EXT:
+ /* Direct is also legal */
+ outab(op + 5);
+ outrb(&e, R_PAG0);
+ break;
+
+ case S_AT_R:
+ outab(op + 6 + e.e_addr);
+ break;
+
+ case S_REG:
+ outab(op + 8 + e.e_addr);
+ break;
+
+ case S_DPTR:
+ if (op != 0)
+ /* only INC (op=0) has DPTR mode */
+ aerr();
+ else
+ outab( 0xA3);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ case S_TYP2:
+ /* A,#imm; A,direct; A,@R0; A,@R1; A,R0 to A,R7 */
+ t = addr(&e);
+ if (t != S_A)
+ aerr();
+ comma(1);
+ t1 = addr(&e1);
+
+ switch (t1) {
+ case S_IMMED:
+ outab(op + 4);
+ outrb(&e1, R_NORM);
+ break;
+
+ case S_DIR:
+ case S_EXT:
+ outab(op + 5);
+ outrb(&e1, R_PAG0);
+ break;
+
+ case S_AT_R:
+ outab(op + 6 + e1.e_addr);
+ break;
+
+ case S_REG:
+ outab(op + 8 + (e1.e_addr));
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ case S_TYP3:
+ /* dir,A; dir,#imm;
+ * A,#imm; A,direct; A,@R0; A,@R1; A,R0 to A,R7
+ * C,direct; C,/direct
+ */
+ t = addr(&e);
+ comma(1);
+ t1 = addr(&e1);
+
+ switch (t) {
+ case S_DIR:
+ case S_EXT:
+ switch (t1) {
+ case S_A:
+ outab(op + 2);
+ outrb(&e, R_PAG0);
+ break;
+
+ case S_IMMED:
+ outab(op + 3);
+ outrb(&e, R_PAG0);
+ outrb(&e1, R_NORM);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ case S_A:
+ switch (t1) {
+ case S_IMMED:
+ outab(op + 4);
+ outrb(&e1, R_NORM);
+ break;
+
+ case S_DIR:
+ case S_EXT:
+ outab(op + 5);
+ outrb(&e1, R_PAG0);
+ break;
+
+ case S_AT_R:
+ outab(op + 6 + e1.e_addr);
+ break;
+
+ case S_REG:
+ outab(op + 8 + e1.e_addr);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ case S_C:
+ /* XRL has no boolean version. Trap it */
+ if (op == 0x60)
+ aerr();
+
+ switch (t1) {
+ case S_DIR:
+ case S_EXT:
+ outab(op + 0x32);
+ outrb(&e1, R_PAG0);
+ break;
+
+ case S_NOT_BIT:
+ outab(op + 0x60);
+ outrb(&e1, R_PAG0);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ case S_TYP4:
+ /* A,direct; A,@R0; A,@R1; A,R0 to A,R7 */
+ t = addr(&e);
+ if (t != S_A)
+ aerr();
+ comma(1);
+ t1 = addr(&e1);
+
+ switch (t1) {
+ case S_DIR:
+ case S_EXT:
+ outab(op + 5);
+ outrb(&e1, R_PAG0);
+ break;
+
+ case S_AT_R:
+ outab(op + 6 + e1.e_addr);
+ break;
+
+ case S_REG:
+ outab(op + 8 + e1.e_addr);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ /* MOV instruction, all modes */
+ case S_MOV:
+ t = addr(&e);
+ comma(1);
+ t1 = addr(&e1);
+
+ switch (t) {
+ case S_A:
+ switch (t1) {
+ case S_IMMED:
+ outab(0x74);
+ outrb(&e1, R_NORM);
+ break;
+
+ case S_DIR:
+ case S_EXT:
+ outab(0xE5);
+ outrb(&e1, R_PAG0);
+ break;
+
+ case S_AT_R:
+ outab(0xE6 + e1.e_addr);
+ break;
+
+ case S_REG:
+ outab(0xE8 + e1.e_addr);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ case S_REG:
+ switch (t1) {
+ case S_A:
+ outab(0xF8 + e.e_addr);
+ break;
+
+ case S_IMMED:
+ outab(0x78 + e.e_addr);
+ outrb(&e1, R_NORM);
+ break;
+
+ case S_DIR:
+ case S_EXT:
+ outab(0xA8 + e.e_addr);
+ outrb(&e1, R_PAG0);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ case S_DIR:
+ case S_EXT:
+ switch (t1) {
+ case S_A:
+ outab(0xF5);
+ outrb(&e, R_PAG0);
+ break;
+
+ case S_IMMED:
+ outab(0x75);
+ outrb(&e, R_PAG0);
+ outrb(&e1, R_NORM);
+ break;
+
+ case S_DIR:
+ case S_EXT:
+ outab(0x85);
+ outrb(&e1, R_PAG0);
+ outrb(&e, R_PAG0);
+ break;
+
+ case S_AT_R:
+ outab(0x86 + e1.e_addr);
+ outrb(&e, R_PAG0);
+ break;
+
+ case S_REG:
+ outab(0x88 + e1.e_addr);
+ outrb(&e, R_PAG0);
+ break;
+
+ case S_C:
+ outab(0x92);
+ outrb(&e, R_PAG0);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ case S_AT_R:
+ switch (t1) {
+ case S_IMMED:
+ outab(0x76 + e.e_addr);
+ outrb(&e1, R_NORM);
+ break;
+
+ case S_DIR:
+ case S_EXT:
+ outab(0xA6 + e.e_addr);
+ outrb(&e1, R_PAG0);
+ break;
+
+ case S_A:
+ outab(0xF6 + e.e_addr);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ case S_C:
+ if ((t1 != S_DIR) && (t1 != S_EXT))
+ aerr();
+ outab(0xA2);
+ outrb(&e1, R_PAG0);
+ break;
+
+ case S_DPTR:
+ if (t1 != S_IMMED)
+ aerr();
+ outab(0x90);
+ if (amode == 2)
+ outr3b(&e1, R_NORM);
+ else
+ outrw(&e1, R_NORM);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ case S_BITBR: /* JB, JBC, JNB bit,rel */
+ /* Branch on bit set/clear */
+ t = addr(&e);
+ if ((t != S_DIR) && (t != S_EXT))
+ aerr();
+ /* sdcc svn rev #4994: fixed bug 1865114 */
+ comma(1);
+ expr(&e1, 0);
+
+ outab(op);
+ outrb(&e, R_PAG0);
+
+ if (mchpcr(&e1)) {
+ v1 = (int) (e1.e_addr - dot.s_addr - 1);
+ /* sdcc svn rev #602: Fix some path problems */
+ if (pass == 2 && ((v1 < -128) || (v1 > 127)))
+ aerr();
+ outab(v1);
+ } else {
+ outrb(&e1, R_PCR);
+ }
+ if (e1.e_mode != S_USER)
+ rerr();
+ break;
+
+ case S_BR: /* JC, JNC, JZ, JNZ */
+ /* Relative branch */
+ /* sdcc svn rev #4994: fixed bug 1865114 */
+ expr(&e1, 0);
+ outab(op);
+
+ if (mchpcr(&e1)) {
+ v1 = (int) (e1.e_addr - dot.s_addr - 1);
+ /* sdcc svn rev #602: Fix some path problems */
+ if (pass == 2 && ((v1 < -128) || (v1 > 127)))
+ aerr();
+ outab(v1);
+ } else {
+ outrb(&e1, R_PCR);
+ }
+ if (e1.e_mode != S_USER)
+ rerr();
+ break;
+
+ case S_CJNE:
+ /* A,#; A,dir; @R0,#; @R1,#; Rn,# */
+ t = addr(&e);
+ comma(1);
+ t1 = addr(&e1);
+
+ /* Benny */
+ comma(1);
+ expr(&e2, 0);
+
+ switch (t) {
+ case S_A:
+ if (t1 == S_IMMED) {
+ outab(op + 4);
+ outrb(&e1, R_NORM);
+ }
+ else if ((t1 == S_DIR) || (t1 == S_EXT)) {
+ outab(op + 5);
+ outrb(&e1, R_PAG0);
+ }
+ else
+ aerr();
+ break;
+
+ case S_AT_R:
+ outab(op + 6 + e.e_addr);
+ if (t1 != S_IMMED)
+ aerr();
+ outrb(&e1, R_NORM);
+ break;
+
+ case S_REG:
+ outab(op + 8 + e.e_addr);
+ if (t1 != S_IMMED)
+ aerr();
+ outrb(&e1, R_NORM);
+ break;
+
+ default:
+ aerr();
+ break;
+ }
+
+ /* branch destination */
+ if (mchpcr(&e2)) {
+ v1 = (int) (e2.e_addr - dot.s_addr - 1);
+ /* sdcc svn rev #602: Fix some path problems */
+ if (pass == 2 && ((v1 < -128) || (v1 > 127)))
+ aerr();
+ outab(v1);
+ } else {
+ outrb(&e2, R_PCR);
+ }
+ if (e2.e_mode != S_USER)
+ rerr();
+ break;
+
+ case S_DJNZ:
+ /* Dir,dest; Reg,dest */
+ t = addr(&e);
+ /* sdcc svn rev #4994: fixed bug 1865114 */
+ comma(1);
+ expr(&e1, 0);
+
+ switch (t) {
+ case S_DIR:
+ case S_EXT:
+ outab(op + 5);
+ outrb(&e, R_PAG0);
+ break;
+
+ case S_REG:
+ outab(op + 8 + e.e_addr);
+ break;
+
+ default:
+ aerr();
+ }
+
+ /* branch destination */
+ /* sdcc svn rev #4994: fixed bug 1865114 */
+ if (mchpcr(&e1)) {
+ v1 = (int) (e1.e_addr - dot.s_addr - 1);
+ /* sdcc svn rev #602: Fix some path problems */
+ if (pass == 2 && ((v1 < -128) || (v1 > 127)))
+ aerr();
+ outab(v1);
+ } else {
+ outrb(&e1, R_PCR);
+ }
+ if (e1.e_mode != S_USER)
+ rerr();
+ break;
+
+ case S_JMP:
+ /* @A+DPTR */
+ t = addr(&e);
+ if (t != S_AT_ADP)
+ aerr();
+ outab(op);
+ break;
+
+ case S_MOVC:
+ /* A,@A+DPTR A,@A+PC */
+ t = addr(&e);
+ if (t != S_A)
+ aerr();
+ comma(1);
+ t1 = addr(&e1);
+ if (t1 == S_AT_ADP)
+ outab(0x93);
+ else if (t1 == S_AT_APC)
+ outab(0x83);
+ else
+ aerr();
+ break;
+
+ case S_MOVX:
+ /* A,@DPTR A,@R0 A,@R1 @DPTR,A @R0,A @R1,A */
+ t = addr(&e);
+ comma(1);
+ t1 = addr(&e1);
+
+ switch (t) {
+ case S_A:
+ switch (t1) {
+ case S_AT_DP:
+ outab(0xE0);
+ break;
+
+ case S_AT_R:
+ outab(0xE2 + e1.e_addr);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ case S_AT_DP:
+ if (t1 == S_A)
+ outab(0xF0);
+ else
+ aerr();
+ break;
+
+ case S_AT_R:
+ if (t1 == S_A)
+ outab(0xF2 + e.e_addr);
+ else
+ aerr();
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ /* MUL/DIV A,B */
+ case S_AB:
+ t = addr(&e);
+ if (t != S_RAB)
+ aerr();
+ outab(op);
+ break;
+
+ /* CLR or CPL: A, C, or bit */
+ case S_ACBIT:
+ t = addr(&e);
+ switch (t) {
+ case S_A:
+ if (op == 0xB2)
+ outab(0xF4);
+ else
+ outab(0xE4);
+ break;
+
+ case S_C:
+ outab(op+1);
+ break;
+
+ case S_DIR:
+ case S_EXT:
+ outab(op);
+ outrb(&e, R_PAG0);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ /* SETB C or bit */
+ case S_SETB:
+ t = addr(&e);
+ switch (t) {
+ case S_C:
+ outab(op+1);
+ break;
+
+ case S_DIR:
+ case S_EXT:
+ outab(op);
+ outrb(&e, R_PAG0);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ /* direct */
+ case S_DIRECT:
+ t = addr(&e);
+ if (t == S_A) {
+ e.e_addr = 0xE0;
+ e.e_mode = S_DIR;
+ } else
+ if ((t != S_DIR) && (t != S_EXT)) {
+ aerr();
+ break;
+ }
+ outab(op);
+ outrb(&e, R_PAG0);
+ break;
+
+ /* XCHD A,@Rn */
+ case S_XCHD:
+ t = addr(&e);
+ if (t != S_A)
+ aerr();
+ comma(1);
+ t1 = addr(&e1);
+ switch (t1) {
+ case S_AT_R:
+ outab(op + e1.e_addr);
+ break;
+
+ default:
+ aerr();
+ }
+ break;
+
+ default:
+ opcycles = OPCY_ERR;
+ err('o');
+ break;
+ }
+ if (opcycles == OPCY_NONE) {
+ opcycles = ds8pg1[cb[0] & 0xFF];
+ }
+}
+
+/*
+ * Branch/Jump PCR Mode Check
+ */
+int
+mchpcr(struct expr *esp)
+{
+ if (esp->e_base.e_ap == dot.s_area) {
+ return(1);
+ }
+ if (esp->e_flag==0 && esp->e_base.e_ap==NULL) {
+ /*
+ * Absolute Destination
+ *
+ * Use the global symbol '.__.ABS.'
+ * of value zero and force the assembler
+ * to use this absolute constant as the
+ * base value for the relocation.
+ */
+ esp->e_flag = 1;
+ esp->e_base.e_sp = &sym[1];
+ }
+ return(0);
+}
+
+/*
+ * Machine specific initialization
+ */
+
+VOID
+minit(void)
+{
+ struct sym *sp;
+ struct PreDef *pd;
+ int i;
+ char pid[8];
+ char *p;
+
+ /*
+ * Byte Order
+ */
+ hilo = 1;
+
+ amode = 0;
+ /*
+ * First time only:
+ * add the pre-defined symbols to the table
+ * as local symbols.
+ */
+ if (pass == 0) {
+ ds8_bytes = 0;
+ mchtyp = X_DS8XCXXX;
+ sym[2].s_addr = X_DS8XCXXX;
+
+ pd = preDef;
+ while (pd->id) {
+ strcpy(pid, pd->id);
+ for (i=0; i<2; i++) {
+ /*
+ * i == 0, Create Upper Case Symbols
+ * i == 1, Create Lower Case Symbols
+ */
+ if (i == 1) {
+ p = pid;
+ while (*p) {
+ *p = ccase[*p & 0x007F];
+ p++;
+ }
+ }
+ sp = lookup(pid);
+ if (sp->s_type == S_NEW) {
+ sp->s_addr = pd->value;
+ sp->s_type = S_USER;
+ sp->s_flag = S_LCL | S_ASG;
+ }
+ }
+ pd++;
+ }
+ }
+}
diff --git a/sdas/as8xcxxx/ds8pst.c b/sdas/as8xcxxx/ds8pst.c
new file mode 100644
index 0000000..f8fa830
--- /dev/null
+++ b/sdas/as8xcxxx/ds8pst.c
@@ -0,0 +1,344 @@
+/* ds8pst.c */
+
+/*
+ * Copyright (C) 1998-2009 Alan R. Baldwin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ * Alan R. Baldwin
+ * 721 Berkeley St.
+ * Kent, Ohio 44240
+ *
+ * This Assembler Ported by
+ * jhartman at compuserve dot com
+ * noice at noicedebugger dot com
+ *
+ * Modified from i51pst.c
+ * Bill McKinnon
+ * w_mckinnon at conknet dot com
+ *
+ */
+
+#include "asxxxx.h"
+#include "ds8.h"
+
+/*
+ * Basic Relocation Mode Definition
+ *
+ * #define R_NORM 0000 No Bit Positioning
+ */
+char mode0[32] = { /* R_NORM */
+ '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+ '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+ '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+ '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237'
+};
+
+/*
+ * Additional Relocation Mode Definitions
+ *
+ * Specification for the 11-bit addressing mode:
+ */
+char mode1[32] = { /* R_J11 */
+ '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+ '\215', '\216', '\217', '\013', '\014', '\015', '\016', '\017',
+ '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+ '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037'
+};
+
+/*
+ * Specification for the 19-bit addressing mode:
+ */
+char mode2[32] = { /* R_J19 */
+ '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+ '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+ '\225', '\226', '\227', '\023', '\024', '\025', '\026', '\027',
+ '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037'
+};
+
+/*
+ * *m_def is a pointer to the bit relocation definition.
+ * m_flag indicates that bit position swapping is required.
+ * m_dbits contains the active bit positions for the output.
+ * m_sbits contains the active bit positions for the input.
+ *
+ * struct mode
+ * {
+ * char * m_def; Bit Relocation Definition
+ * a_uint m_flag; Bit Swapping Flag
+ * a_uint m_dbits; Destination Bit Mask
+ * a_uint m_sbits; Source Bit Mask
+ * };
+ */
+#ifdef LONGINT
+struct mode mode[3] = {
+ { &mode0[0], 0, 0x0000FFFFl, 0x0000FFFFl },
+ { &mode1[0], 1, 0x0000E0FFl, 0x000007FFl },
+ { &mode2[0], 1, 0x00E0FFFFl, 0x0007FFFFl }
+};
+#else
+struct mode mode[3] = {
+ { &mode0[0], 0, 0x0000FFFF, 0x0000FFFF },
+ { &mode1[0], 1, 0x0000E0FF, 0x000007FF },
+ { &mode2[0], 1, 0x00E0FFFF, 0x0007FFFF }
+};
+#endif
+
+/*
+ * Array of Pointers to mode Structures
+ */
+struct mode *modep[16] = {
+ &mode[0], &mode[1], &mode[2], NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL
+};
+
+/*
+ * Mnemonic Structure
+ */
+struct mne mne[] = {
+
+ /* machine */
+
+ { NULL, ".amode", S_AMODE, 0, 0 },
+
+ { NULL, ".cpu", S_CPU, 0, DS______ },
+ { NULL, ".DS8XCXXX", S_CPU, 0, DS8XCXXX },
+ { NULL, ".DS80C310", S_CPU, 0, DS80C310 },
+ { NULL, ".DS80C320", S_CPU, 0, DS80C320 },
+ { NULL, ".DS80C323", S_CPU, 0, DS80C323 },
+ { NULL, ".DS80C390", S_CPU, 0, DS80C390 },
+ { NULL, ".DS83C520", S_CPU, 0, DS83C520 },
+ { NULL, ".DS83C530", S_CPU, 0, DS83C530 },
+ { NULL, ".DS83C550", S_CPU, 0, DS83C550 },
+ { NULL, ".DS87C520", S_CPU, 0, DS87C520 },
+ { NULL, ".DS87C530", S_CPU, 0, DS87C530 },
+ { NULL, ".DS87C550", S_CPU, 0, DS87C550 },
+
+ /* system */
+
+
+ { NULL, "CON", S_ATYP, 0, A_CON },
+ { NULL, "OVR", S_ATYP, 0, A_OVR },
+ { NULL, "REL", S_ATYP, 0, A_REL },
+ { NULL, "ABS", S_ATYP, 0, A_ABS },
+ { NULL, "NOPAG", S_ATYP, 0, A_NOPAG },
+ { NULL, "PAG", S_ATYP, 0, A_PAG },
+
+ { NULL, "CODE", S_ATYP, 0, A_CODE },
+ { NULL, "DATA", S_ATYP, 0, A_DATA },
+ { NULL, "XDATA", S_ATYP, 0, A_XDATA },
+ { NULL, "BIT", S_ATYP, 0, A_BIT },
+
+ { NULL, ".page", S_PAGE, 0, 0 },
+ { NULL, ".title", S_HEADER, 0, O_TITLE },
+ { NULL, ".sbttl", S_HEADER, 0, O_SBTTL },
+ { NULL, ".module", S_MODUL, 0, 0 },
+ { NULL, ".include", S_INCL, 0, 0 },
+ { NULL, ".area", S_AREA, 0, 0 },
+ { NULL, ".org", S_ORG, 0, 0 },
+ { NULL, ".radix", S_RADIX, 0, 0 },
+ { NULL, ".globl", S_GLOBL, 0, 0 },
+ { NULL, ".local", S_LOCAL, 0, 0 },
+ { NULL, ".if", S_CONDITIONAL, 0, O_IF },
+ { NULL, ".iff", S_CONDITIONAL, 0, O_IFF },
+ { NULL, ".ift", S_CONDITIONAL, 0, O_IFT },
+ { NULL, ".iftf", S_CONDITIONAL, 0, O_IFTF },
+ { NULL, ".ifgt", S_CONDITIONAL, 0, O_IFGT },
+ { NULL, ".iflt", S_CONDITIONAL, 0, O_IFLT },
+ { NULL, ".ifge", S_CONDITIONAL, 0, O_IFGE },
+ { NULL, ".ifle", S_CONDITIONAL, 0, O_IFLE },
+ { NULL, ".ifeq", S_CONDITIONAL, 0, O_IFEQ },
+ { NULL, ".ifne", S_CONDITIONAL, 0, O_IFNE },
+ { NULL, ".iif", S_CONDITIONAL, 0, O_IIF },
+ { NULL, ".iiff", S_CONDITIONAL, 0, O_IIFF },
+ { NULL, ".iift", S_CONDITIONAL, 0, O_IIFT },
+ { NULL, ".iiftf", S_CONDITIONAL, 0, O_IIFTF },
+ { NULL, ".iifgt", S_CONDITIONAL, 0, O_IIFGT },
+ { NULL, ".iiflt", S_CONDITIONAL, 0, O_IIFLT },
+ { NULL, ".iifge", S_CONDITIONAL, 0, O_IIFGE },
+ { NULL, ".iifle", S_CONDITIONAL, 0, O_IIFLE },
+ { NULL, ".iifeq", S_CONDITIONAL, 0, O_IIFEQ },
+ { NULL, ".iifne", S_CONDITIONAL, 0, O_IIFNE },
+ { NULL, ".else", S_CONDITIONAL, 0, O_ELSE },
+ { NULL, ".endif", S_CONDITIONAL, 0, O_ENDIF },
+ { NULL, ".list", S_LISTING, 0, O_LIST },
+ { NULL, ".nlist", S_LISTING, 0, O_NLIST },
+ { NULL, ".equ", S_EQU, 0, O_EQU },
+ { NULL, ".gblequ", S_EQU, 0, O_GBLEQU},
+ { NULL, ".lclequ", S_EQU, 0, O_LCLEQU},
+/* sdas specific */
+ { NULL, ".optsdcc", S_OPTSDCC, 0, 0 },
+/* end sdas specific */
+ { NULL, ".byte", S_DATA, 0, O_1BYTE },
+ { NULL, ".db", S_DATA, 0, O_1BYTE },
+ { NULL, ".fcb", S_DATA, 0, O_1BYTE },
+ { NULL, ".word", S_DATA, 0, O_2BYTE },
+ { NULL, ".dw", S_DATA, 0, O_2BYTE },
+ { NULL, ".fdb", S_DATA, 0, O_2BYTE },
+ { NULL, ".3byte", S_DATA, 0, O_3BYTE },
+ { NULL, ".triple", S_DATA, 0, O_3BYTE },
+/* { NULL, ".4byte", S_DATA, 0, O_4BYTE }, */
+/* { NULL, ".quad", S_DATA, 0, O_4BYTE }, */
+ { NULL, ".blkb", S_BLK, 0, O_1BYTE },
+ { NULL, ".ds", S_BLK, 0, O_1BYTE },
+ { NULL, ".rmb", S_BLK, 0, O_1BYTE },
+ { NULL, ".rs", S_BLK, 0, O_1BYTE },
+ { NULL, ".blkw", S_BLK, 0, O_2BYTE },
+ { NULL, ".blk3", S_BLK, 0, O_3BYTE },
+/* { NULL, ".blk4", S_BLK, 0, O_4BYTE }, */
+ { NULL, ".ascii", S_ASCIX, 0, O_ASCII },
+ { NULL, ".ascis", S_ASCIX, 0, O_ASCIS },
+ { NULL, ".asciz", S_ASCIX, 0, O_ASCIZ },
+ { NULL, ".str", S_ASCIX, 0, O_ASCII },
+ { NULL, ".strs", S_ASCIX, 0, O_ASCIS },
+ { NULL, ".strz", S_ASCIX, 0, O_ASCIZ },
+ { NULL, ".fcc", S_ASCIX, 0, O_ASCII },
+ { NULL, ".even", S_BOUNDARY, 0, O_EVEN },
+ { NULL, ".odd", S_BOUNDARY, 0, O_ODD },
+ { NULL, ".bndry", S_BOUNDARY, 0, O_BNDRY },
+ { NULL, ".16bit", S_BITS, 0, O_2BYTE },
+ { NULL, ".24bit", S_BITS, 0, O_3BYTE },
+
+ /* Macro Processor */
+
+ { NULL, ".macro", S_MACRO, 0, O_MACRO },
+ { NULL, ".endm", S_MACRO, 0, O_ENDM },
+ { NULL, ".mexit", S_MACRO, 0, O_MEXIT },
+
+ { NULL, ".narg", S_MACRO, 0, O_NARG },
+ { NULL, ".nchr", S_MACRO, 0, O_NCHR },
+ { NULL, ".ntyp", S_MACRO, 0, O_NTYP },
+
+ { NULL, ".irp", S_MACRO, 0, O_IRP },
+ { NULL, ".irpc", S_MACRO, 0, O_IRPC },
+ { NULL, ".rept", S_MACRO, 0, O_REPT },
+
+ { NULL, ".nval", S_MACRO, 0, O_NVAL },
+
+ { NULL, ".mdelete", S_MACRO, 0, O_MDEL },
+
+ /* machine */
+
+ { NULL, "a", S_A, 0, A },
+ { NULL, "ab", S_AB, 0, 0 },
+ { NULL, "dptr", S_DPTR, 0, DPTR },
+ { NULL, "pc", S_PC, 0, PC },
+ { NULL, "r0", S_REG, 0, R0 },
+ { NULL, "r1", S_REG, 0, R1 },
+ { NULL, "r2", S_REG, 0, R2 },
+ { NULL, "r3", S_REG, 0, R3 },
+ { NULL, "r4", S_REG, 0, R4 },
+ { NULL, "r5", S_REG, 0, R5 },
+ { NULL, "r6", S_REG, 0, R6 },
+ { NULL, "r7", S_REG, 0, R7 },
+
+ { NULL, "nop", S_INH, 0, 0x00 },
+ { NULL, "ret", S_INH, 0, 0x22 },
+ { NULL, "reti", S_INH, 0, 0x32 },
+
+ { NULL, "ajmp", S_JMP11, 0, 0x01 },
+ { NULL, "acall", S_JMP11, 0, 0x11 },
+ { NULL, "ljmp", S_JMP16, 0, 0x02 },
+ { NULL, "lcall", S_JMP16, 0, 0x12 },
+
+ { NULL, "rr", S_ACC, 0, 0x03 },
+ { NULL, "rrc", S_ACC, 0, 0x13 },
+ { NULL, "rl", S_ACC, 0, 0x23 },
+ { NULL, "rlc", S_ACC, 0, 0x33 },
+ { NULL, "swap", S_ACC, 0, 0xC4 },
+ { NULL, "da", S_ACC, 0, 0xD4 },
+
+ { NULL, "inc", S_TYP1, 0, 0x00 },
+ { NULL, "dec", S_TYP1, 0, 0x10 },
+
+ { NULL, "add", S_TYP2, 0, 0x20 },
+ { NULL, "addc", S_TYP2, 0, 0x30 },
+ { NULL, "subb", S_TYP2, 0, 0x90 },
+
+ { NULL, "orl", S_TYP3, 0, 0x40 },
+ { NULL, "anl", S_TYP3, 0, 0x50 },
+ { NULL, "xrl", S_TYP3, 0, 0x60 },
+
+ { NULL, "xch", S_TYP4, 0, 0xC0 },
+
+ { NULL, "mov", S_MOV, 0, 0x00 },
+
+ { NULL, "jbc", S_BITBR, 0, 0x10 },
+ { NULL, "jb", S_BITBR, 0, 0x20 },
+ { NULL, "jnb", S_BITBR, 0, 0x30 },
+
+ { NULL, "jc", S_BR, 0, 0x40 },
+ { NULL, "jnc", S_BR, 0, 0x50 },
+ { NULL, "jz", S_BR, 0, 0x60 },
+ { NULL, "jnz", S_BR, 0, 0x70 },
+ { NULL, "sjmp", S_BR, 0, 0x80 },
+
+ { NULL, "cjne", S_CJNE, 0, 0xB0 },
+ { NULL, "djnz", S_DJNZ, 0, 0xD0 },
+ { NULL, "jmp", S_JMP, 0, 0x73 },
+ { NULL, "movc", S_MOVC, 0, 0x83 },
+ { NULL, "movx", S_MOVX, 0, 0x00 },
+ { NULL, "div", S_AB, 0, 0x84 },
+ { NULL, "mul", S_AB, 0, 0xA4 },
+ { NULL, "clr", S_ACBIT, 0, 0xC2 },
+ { NULL, "cpl", S_ACBIT, 0, 0xB2 },
+ { NULL, "setb", S_SETB, 0, 0xD2 },
+ { NULL, "push", S_DIRECT, 0, 0xC0 },
+ { NULL, "pop", S_DIRECT, 0, 0xD0 },
+ { NULL, "xchd", S_XCHD, S_EOL, 0xD6 }
+};
+
+struct PreDef preDef[] = {
+ { "AC", 0x00D6 },
+ { "ACC", 0x00E0 },
+ { "ACC.0", 0x00E0 },
+ { "ACC.1", 0x00E1 },
+ { "ACC.2", 0x00E2 },
+ { "ACC.3", 0x00E3 },
+ { "ACC.4", 0x00E4 },
+ { "ACC.5", 0x00E5 },
+ { "ACC.6", 0x00E6 },
+ { "ACC.7", 0x00E7 },
+ { "B", 0x00F0 },
+ { "B.0", 0x00F0 },
+ { "B.1", 0x00F1 },
+ { "B.2", 0x00F2 },
+ { "B.3", 0x00F3 },
+ { "B.4", 0x00F4 },
+ { "B.5", 0x00F5 },
+ { "B.6", 0x00F6 },
+ { "B.7", 0x00F7 },
+ { "CY", 0x00D7 },
+ { "DPH", 0x0083 },
+ { "DPL", 0x0082 },
+ { "EA", 0x00AF },
+ { "F0", 0x00D5 },
+ { "IE", 0x00A8 },
+ { "IP", 0x00B8 },
+ { "OV", 0x00D2 },
+ { "P", 0x00D0 },
+ { "PCON", 0x0087 },
+ { "PS", 0x00BC },
+ { "PSW", 0x00D0 },
+ { "RS0", 0x00D3 },
+ { "RS1", 0x00D4 },
+ { "SM0", 0x009F },
+ { "SM1", 0x009E },
+ { "SM2", 0x009D },
+ { "SP", 0x0081 },
+ { NULL, 0x0000 }
+};
diff --git a/sdas/as8xcxxx/sdas390.vcxproj b/sdas/as8xcxxx/sdas390.vcxproj
new file mode 100644
index 0000000..86e5c57
--- /dev/null
+++ b/sdas/as8xcxxx/sdas390.vcxproj
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{13410A29-B3A6-4F10-8345-39D5293F3D9A}</ProjectGuid>
+ <ProjectName>sdas390</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\SDCC.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\SDCC.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin_vc\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin_vc\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/sdas390.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>.;../asxxsrc;../../support/util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_CONSOLE;INDEXLIB;MLH_MAP;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>.\Release/sdas390.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin_vc\$(TargetFileName)</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ProgramDatabaseFile>.\Release/sdas390.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Release/sdas390.bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/sdas390.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>.;../asxxsrc;../../support/util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_CONSOLE;INDEXLIB;MLH_MAP;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>.\Debug/sdas390.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
+ <ObjectFileName>.\Debug/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>..\..\bin_vc\$(TargetFileName)</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/sdas390.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Debug/sdas390.bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\asxxsrc\asdata.c" />
+ <ClCompile Include="..\asxxsrc\asdbg.c" />
+ <ClCompile Include="..\asxxsrc\asexpr.c" />
+ <ClCompile Include="..\asxxsrc\aslex.c" />
+ <ClCompile Include="..\asxxsrc\aslist.c" />
+ <ClCompile Include="..\asxxsrc\asmain.c" />
+ <ClCompile Include="..\asxxsrc\asmcro.c" />
+ <ClCompile Include="..\asxxsrc\asout.c" />
+ <ClCompile Include="..\asxxsrc\assubr.c" />
+ <ClCompile Include="..\asxxsrc\assym.c" />
+ <ClCompile Include="..\..\support\util\dbuf.c" />
+ <ClCompile Include="..\..\support\util\dbuf_string.c" />
+ <ClCompile Include="ds8adr.c" />
+ <ClCompile Include="ds8mch.c" />
+ <ClCompile Include="ds8pst.c" />
+ <ClCompile Include="..\asxxsrc\sdas.c" />
+ <ClCompile Include="..\asxxsrc\strcmpi.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\asxxsrc\asxxxx.h" />
+ <ClInclude Include="..\..\support\util\dbuf.h" />
+ <ClInclude Include="..\..\support\util\dbuf_string.h" />
+ <ClInclude Include="ds8.h" />
+ <ClInclude Include="..\asxxsrc\sdas.h" />
+ <ClInclude Include="..\..\sdcc_vc.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/sdas/as8xcxxx/sdas390.vcxproj.filters b/sdas/as8xcxxx/sdas390.vcxproj.filters
new file mode 100644
index 0000000..f2d358e
--- /dev/null
+++ b/sdas/as8xcxxx/sdas390.vcxproj.filters
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{f6ebe258-476c-4574-8ffd-370097bc714e}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{bb4757ba-a5e7-4354-8f21-6900f1929dcf}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\asxxsrc\asdata.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\asxxsrc\asdbg.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\asxxsrc\asexpr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\asxxsrc\aslex.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\asxxsrc\aslist.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\asxxsrc\asmain.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\asxxsrc\asout.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\asxxsrc\assubr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\asxxsrc\assym.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\support\util\dbuf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\support\util\dbuf_string.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ds8adr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ds8mch.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="ds8pst.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\asxxsrc\sdas.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\asxxsrc\strcmpi.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\asxxsrc\asmcro.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\asxxsrc\asxxxx.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\support\util\dbuf.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\support\util\dbuf_string.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="ds8.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\asxxsrc\sdas.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\sdcc_vc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file