]> Shamusworld >> Repos - rmac/commitdiff
Created a quick and dirty windows based makefile.
authorGraeme Hinchliffe <linkovitch@dodgy.net>
Sun, 1 Jan 2012 18:05:45 +0000 (18:05 +0000)
committerGraeme Hinchliffe <linkovitch@dodgy.net>
Sun, 1 Jan 2012 18:05:45 +0000 (18:05 +0000)
Corrected definitions of BYTE, WORD and LONG to appropriate uintN_t values.. (it's warning like a mofo at the moment but tested and it assembled happily enough 68K and RISC)

68kmn
makefile.win [new file with mode: 0644]
rmac.h

diff --git a/68kmn b/68kmn
index e82767a53c4dcc9b2b5dd8a5f90c2086efa4b63f..1c7bcb4ac9c8b4badaec913cc99fcf54ed891c63 100644 (file)
--- a/68kmn
+++ b/68kmn
-abcd   1001
-add    1003
-adda   1005
-addi   1006
-addq   1007
-addx   1008
-and    1010
-andi   1012
-asl    1015
-asr    1019
-bcc    1023
-bhs    1023
-bcs    1024
-blo    1024
-beq    1025
-bze    1025
-bz     1025
-bge    1026
-bgt    1027
-bhi    1028
-ble    1029
-bls    1030
-blt    1031
-bmi    1032
-bne    1033
-bnz    1033
-bpl    1034
-bvc    1035
-bvs    1036
-bchg   1037
-bclr   1041
-bra    1045
-bt     1045
-bset   1046
-bsr    1050
-btst   1051
-chk    1055
-clr    1056
-cmp    1058
-cmpa   1060
-cmpi   1061
-cmpm   1062
-dbcc   1063
-dbcs   1064
-dblo   1064
-dbeq   1065
-dbze   1065
-dbf    1066
-dbra   1066
-dbge   1067
-dbgt   1068
-dbhi   1069
-dbhs   1069
-dble   1070
-dbls   1071
-dblt   1072
-dbmi   1073
-dbne   1074
-dbnz   1074
-dbpl   1075
-dbt    1076
-dbvc   1077
-dbvs   1078
-divs   1079
-divu   1080
-eor    1081
-eori   1082
-exg    1085
-ext    1086
-illegal        1088
-jmp    1089
-jsr    1090
-lea    1091
-link   1092
-lsl    1093
-lsr    1097
-move   1101
-movea  1108
-movem  1109
-movep  1110
-moveq  1112
-muls   1113
-mulu   1114
-nbcd   1115
-neg    1116
-negx   1117
-nop    1118
-not    1119
-or     1120
-ori    1122
-pea    1125
-reset  1126
-rol    1127
-ror    1131
-roxl   1135
-roxr   1139
-rte    1143
-rtr    1144
-rts    1145
-sbcd   1146
-scc    1148
-shs    1148
-scs    1149
-slo    1149
-seq    1150
-sze    1150
-sf     1151
-sge    1152
-sgt    1153
-shi    1154
-sle    1155
-sls    1156
-slt    1157
-smi    1158
-sne    1159
-snz    1159
-spl    1160
-st     1161
-svc    1162
-svs    1163
-stop   1164
-sub    1165
-suba   1167
-subi   1168
-subq   1169
-subx   1170
-swap   1172
-tas    1173
-trap   1174
-trapv  1175
-tst    1176
-unlk   1177
+abcd   1001\r
+add    1003\r
+adda   1005\r
+addi   1006\r
+addq   1007\r
+addx   1008\r
+and    1010\r
+andi   1012\r
+asl    1015\r
+asr    1019\r
+bcc    1023\r
+bhs    1023\r
+bcs    1024\r
+blo    1024\r
+beq    1025\r
+bze    1025\r
+bz     1025\r
+bge    1026\r
+bgt    1027\r
+bhi    1028\r
+ble    1029\r
+bls    1030\r
+blt    1031\r
+bmi    1032\r
+bne    1033\r
+bnz    1033\r
+bpl    1034\r
+bvc    1035\r
+bvs    1036\r
+bchg   1037\r
+bclr   1041\r
+bra    1045\r
+bt     1045\r
+bset   1046\r
+bsr    1050\r
+btst   1051\r
+chk    1055\r
+clr    1056\r
+cmp    1058\r
+cmpa   1060\r
+cmpi   1061\r
+cmpm   1062\r
+dbcc   1063\r
+dbcs   1064\r
+dblo   1064\r
+dbeq   1065\r
+dbze   1065\r
+dbf    1066\r
+dbra   1066\r
+dbge   1067\r
+dbgt   1068\r
+dbhi   1069\r
+dbhs   1069\r
+dble   1070\r
+dbls   1071\r
+dblt   1072\r
+dbmi   1073\r
+dbne   1074\r
+dbnz   1074\r
+dbpl   1075\r
+dbt    1076\r
+dbvc   1077\r
+dbvs   1078\r
+divs   1079\r
+divu   1080\r
+eor    1081\r
+eori   1082\r
+exg    1085\r
+ext    1086\r
+illegal        1088\r
+jmp    1089\r
+jsr    1090\r
+lea    1091\r
+link   1092\r
+lsl    1093\r
+lsr    1097\r
+move   1101\r
+movea  1108\r
+movem  1109\r
+movep  1110\r
+moveq  1112\r
+muls   1113\r
+mulu   1114\r
+nbcd   1115\r
+neg    1116\r
+negx   1117\r
+nop    1118\r
+not    1119\r
+or     1120\r
+ori    1122\r
+pea    1125\r
+reset  1126\r
+rol    1127\r
+ror    1131\r
+roxl   1135\r
+roxr   1139\r
+rte    1143\r
+rtr    1144\r
+rts    1145\r
+sbcd   1146\r
+scc    1148\r
+shs    1148\r
+scs    1149\r
+slo    1149\r
+seq    1150\r
+sze    1150\r
+sf     1151\r
+sge    1152\r
+sgt    1153\r
+shi    1154\r
+sle    1155\r
+sls    1156\r
+slt    1157\r
+smi    1158\r
+sne    1159\r
+snz    1159\r
+spl    1160\r
+st     1161\r
+svc    1162\r
+svs    1163\r
+stop   1164\r
+sub    1165\r
+suba   1167\r
+subi   1168\r
+subq   1169\r
+subx   1170\r
+swap   1172\r
+tas    1173\r
+trap   1174\r
+trapv  1175\r
+tst    1176\r
+unlk   1177\r
diff --git a/makefile.win b/makefile.win
new file mode 100644 (file)
index 0000000..3ee042c
--- /dev/null
@@ -0,0 +1,125 @@
+#\r
+# RMAC - Reboot's Macro Assembler for the Atari Jaguar\r
+# Copyright (C) 199x Landon Dyer, 2011-2012 Reboot & Friends\r
+# MAKEFILE for Windows Compilation\r
+# Currently tested against Windows 7 (64bit) using mingw32-gcc compiler\r
+#\r
+\r
+# Windows specific makefile\r
+# need to define environment variable CC to point to your compiler or set it here\r
+\r
+#CC = cc\r
+\r
+rm = del\r
+\r
+CFLAGS = -g -Wall\r
+\r
+#CFLAGS = -g -D__GCCUNIX__ -I\r
+\r
+SRCS = amode.c debug.c direct.c eagen.c error.c expr.c listing.c mach.c macro.c mark.c object.c procln.c risca.c rmac.c sect.c symbol.c token.c\r
+\r
+OBJS = amode.o debug.o direct.o eagen.o error.o expr.o listing.o mach.o macro.o mark.o object.o procln.o risca.o rmac.o sect.o symbol.o token.o\r
+\r
+#\r
+# Build everything\r
+#\r
+\r
+all : mntab.h 68ktab.h kwtab.h risckw.h rmac\r
+\r
+#\r
+# Generated Sources for State Machines and Keyword, Directive and Mnemonic Definitions\r
+#\r
+\r
+mntab.h : mntab 68kmn kwgen.exe\r
+       type mntab 68kmn | kwgen mn >mntab.h\r
+\r
+68ktab.h 68kmn : 68ktab 68ktab 68kgen.exe\r
+       68kgen 68kmn <68ktab >68ktab.h\r
+\r
+kwtab.h : kwtab kwgen.exe\r
+       kwgen kw <kwtab >kwtab.h\r
+\r
+risckw.h : kwtab kwgen.exe\r
+       kwgen mr <risctab >risckw.h\r
+\r
+#\r
+# Build Tools\r
+#\r
+\r
+kwgen.exe : kwgen.c\r
+       $(CC) $(CFLAGS) -c kwgen.c -o kwgen\r
+\r
+kwgen : kwgen.o\r
+       $(CC) $(CFLAGS) -o kwgen kwgen.o\r
+\r
+68kgen.exe : 68kgen.c\r
+       $(CC) $(CFLAGS) -c 68kgen.c\r
+\r
+#68kgen.exe : 68kgen.o\r
+#      $(CC) $(CFLAGS) -o 68kgen 68kgen.o\r
+\r
+#\r
+# Build RMAC Executable\r
+#\r
+\r
+amode.o : amode.c\r
+       $(CC) $(CFLAGS) -c amode.c\r
+\r
+debug.o : debug.c\r
+       $(CC) $(CFLAGS) -c debug.c\r
+\r
+direct.o : direct.c\r
+       $(CC) $(CFLAGS) -c direct.c\r
+\r
+eagen.o : eagen.c\r
+       $(CC) $(CFLAGS) -c eagen.c\r
+\r
+error.o : error.c\r
+       $(CC) $(CFLAGS) -c error.c\r
+\r
+expr.o : expr.c\r
+       $(CC) $(CFLAGS) -c expr.c\r
+\r
+listing.o : listing.c\r
+       $(CC) $(CFLAGS) -c listing.c\r
+\r
+mach.o : mach.c\r
+       $(CC) $(CFLAGS) -c mach.c\r
+\r
+macro.o : macro.c\r
+       $(CC) $(CFLAGS) -c macro.c\r
+\r
+mark.o : mark.c\r
+       $(CC) $(CFLAGS) -c mark.c\r
+\r
+object.o : object.c\r
+       $(CC) $(CFLAGS) -c object.c\r
+\r
+procln.o : procln.c\r
+       $(CC) $(CFLAGS) -c procln.c\r
+\r
+risca.o : risca.c\r
+       $(CC) $(CFLAGS) -c risca.c\r
+\r
+rmac.o : rmac.c\r
+       $(CC) $(CFLAGS) -c rmac.c\r
+\r
+sect.o : sect.c\r
+       $(CC) $(CFLAGS) -c sect.c\r
+\r
+symbol.o : symbol.c\r
+       $(CC) $(CFLAGS) -c symbol.c\r
+\r
+token.o : token.c\r
+       $(CC) $(CFLAGS) -c token.c\r
+\r
+rmac : $(OBJS)\r
+       $(CC) $(CFLAGS) -o rmac $(OBJS)\r
+\r
+#\r
+# Clean Build Environment\r
+#\r
+\r
+clean:\r
+       $(rm) $(OBJS) kwgen.o 68kgen.o rmac kwgen 68kgen kwtab.h 68ktab.h mntab.h risckw.h\r
+\r
diff --git a/rmac.h b/rmac.h
index 58fba8dcfd5ef99bd1881206e27f3724c0ac3e35..9afb0e40db1ebca654e59300294ce6be66adbe42 100644 (file)
--- a/rmac.h
+++ b/rmac.h
 #endif
 #endif
 
 #endif
 #endif
 
+#include <inttypes.h>
 
 
-
-#define BYTE         unsigned char
-#define WORD         unsigned short
-#define LONG         unsigned long
+#define BYTE         uint8_t
+#define WORD         uint16_t
+#define LONG         uint32_t
 #define VOID         void
 
 #define ERROR        (-1)                                   // Generic error return
 #define VOID         void
 
 #define ERROR        (-1)                                   // Generic error return