• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Motorola M6800 (6800) Exorciser / SWTPC emulator plus 6801 instruction set emulation


コミットメタ情報

リビジョン0203aae90733aec52af26bf9eef230a1e73cb5f8 (tree)
日時2020-11-05 22:20:15
作者Joel Matthew Rees <joel.rees@gmai...>
コミッターJoel Matthew Rees

ログメッセージ

cleaning up the output of make (not CFLAGS -Wall)

変更サマリ

差分

--- a/asm6800.c
+++ b/asm6800.c
@@ -19,7 +19,9 @@
1919 #include <stdio.h>
2020 #include <stdlib.h>
2121 #include <string.h>
22+
2223 #include "asm6800.h"
24+#include "utils.h" /* JMR20201103 */
2325
2426 /* Fixup types */
2527
--- a/exor.c
+++ b/exor.c
@@ -24,10 +24,13 @@
2424 #include <fcntl.h>
2525 #include <sys/poll.h>
2626 #include <signal.h>
27+#include <unistd.h> /* JMR20201103 */
2728
2829 #include "sim6800.h"
30+#include "unasm6800.h" /* JMR202021103 */
2931 #include "exor.h"
3032 #include "exorterm.h"
33+#include "utils.h" /* JMR20201103 */
3134
3235 /* Options */
3336
--- /dev/null
+++ b/exorsim.h
@@ -0,0 +1,22 @@
1+/* Configurations for Joseph H. Allen's Exorsim
2+ * This file copyright 2020 Joel Matthew Rees
3+ *
4+ * This is free software; you can redistribute it and/or modify it under the
5+ * terms of the GNU General Public License as published by the Free Software
6+ * Foundation; either version 1, or (at your option) any later version.
7+ *
8+ * It is distributed in the hope that it will be useful, but WITHOUT ANY
9+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
11+ * details.
12+ *
13+ * You should have received a copy of the GNU General Public License along with
14+ * this software; see the file COPYING. If not, write to the Free Software Foundation,
15+ * 675 Mass Ave, Cambridge, MA 02139, USA.
16+ */
17+
18+
19+/* #define SIM6800 0x6800 */
20+#define SIM6801 0x6801
21+
22+
--- a/exorterm.c
+++ b/exorterm.c
@@ -21,7 +21,10 @@
2121 #include <string.h>
2222 #include <fcntl.h>
2323 #include <sys/poll.h>
24+#include <unistd.h> /* JMR20201103 */
25+
2426 #include "exorterm.h"
27+#include "utils.h" /* JMR20201103 */
2528
2629 /* State of real terminal */
2730
--- a/mdos.c
+++ b/mdos.c
@@ -559,6 +559,9 @@ int del_file(int rib_sector)
559559 return 0;
560560 }
561561
562+/* Defined below in this file: (JMR20201103) */
563+int find_file(char *filename, int *type, int del);
564+
562565 /* Delete file name */
563566
564567 int rm(char *name)
--- a/mon.c
+++ b/mon.c
@@ -22,9 +22,11 @@
2222 #include <fcntl.h>
2323 #include <sys/poll.h>
2424 #include <signal.h>
25+#include <unistd.h> /* JMR20201105 */
2526
2627 #include "utils.h"
2728 #include "asm6800.h"
29+#include "unasm6800.h" /* JMR20201105 */
2830 #include "sim6800.h"
2931 #include "exor.h"
3032
@@ -176,11 +178,11 @@ int b_cmd(char *p)
176178 {
177179 int val;
178180 if (!*p) {
179- brk = 0;
181+ hasbrk = 0; /* JMR20201103 */
180182 printf("Breakpoint cleared\n");
181183 } else if (parse_hex(&p, &val)) {
182184 brk_addr = val;
183- brk = 1;
185+ hasbrk = 1; /* JMR20201103 */
184186 printf("Breakpoint set at %4.4X\n", brk_addr);
185187 } else
186188 huh();
@@ -333,7 +335,9 @@ int u_cmd(char *p)
333335 int target;
334336 int x;
335337 for (x = 0; x != 22; ++x) {
336- unasm_line(mem, &addr, buf, &target, 1);
338+ unsigned short saddr = (unsigned short) addr; /* JMR20201105 hidden endian issues */
339+ unasm_line(mem, &saddr, buf, &target, 1); /* JMR20201105 */
340+ addr = saddr; /* JMR20201105 ugly hack, let Joe figure it out. */
337341 fprintf(mon_out, "%s\n", buf);
338342 }
339343 last_u = addr;
--- a/sim6800.c
+++ b/sim6800.c
@@ -16,10 +16,15 @@
1616 * 675 Mass Ave, Cambridge, MA 02139, USA.
1717 */
1818
19+/* Modifications for 6801 copyright 2020 Joel Matthew Rees
20+*/
21+
22+
1923 #include <stdio.h>
2024 #include <stdlib.h>
2125 #include <string.h>
2226
27+#include "exorsim.h" /* JMR20201103 */
2328 #include "exor.h"
2429 #include "unasm6800.h"
2530 #include "asm6800.h"
@@ -46,7 +51,8 @@ unsigned char i_flag; /* 1=masked, 0=enabled */
4651 unsigned char h_flag;
4752
4853 /* Breakpoint */
49-int brk;
54+/* int brk; */
55+int hasbrk; /* JMR20201103: 'brk' conflicts with unistd library. */
5056 unsigned short brk_addr;
5157
5258 /* Trace buffer */
@@ -693,8 +699,8 @@ void sim(void)
693699 t->ea = 0;
694700 t->data = 0;
695701
696- if (brk && brk_addr == pc || stop) {
697- if (brk && brk_addr == pc)
702+ if (hasbrk && brk_addr == pc || stop) { /* JMR20201103 */
703+ if (hasbrk && brk_addr == pc) /* JMR20201103 */
698704 printf("\r\nBreakpoint!\n");
699705 monitor();
700706 t->pc = pc;
--- a/sim6800.h
+++ b/sim6800.h
@@ -7,7 +7,8 @@ extern int reset;
77 extern int abrt;
88 extern int sp_stop;
99
10-extern int brk;
10+/* extern int brk; */
11+extern int hasbrk; /* JMR20201103 'brk' conflicts with unistd library. */
1112 extern unsigned short brk_addr;
1213
1314 /* CPU registers */
@@ -31,6 +32,8 @@ void write_flags(unsigned char f);
3132
3233 void sim(void);
3334
35+void simulated(unsigned short addr); /* For exor.c, JMR20201103 */
36+
3437 /* Dump trace buffer */
3538 void show_traces(int n);
3639
--- a/unasm6800.c
+++ b/unasm6800.c
@@ -21,6 +21,7 @@
2121 #include <string.h>
2222
2323 #include "unasm6800.h"
24+#include "utils.h" /* JMR20201103 */
2425
2526 struct fact *swi_facts;
2627 int targets[65536];
@@ -53,7 +54,8 @@ void parse_facts(FILE *f)
5354 if (buf[0] && buf[strlen(buf)-1]=='\r')
5455 buf[strlen(buf)-1] = 0;
5556 p = buf;
56- unsigned short addr;
57+ /* unsigned short addr; */
58+ int addr; /* JMR20201103 parse_hex() wants an int pointer. */
5759 char keyword[100];
5860 int len;
5961 char label[100];