2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 36f42f9b authored by Martin Ruckert's avatar Martin Ruckert
Browse files

adapting to compile vmb mmixcpu

parent d6e0c5ca
# the directory with the MMIXware sources
MMIXWARE=./mmixware
INCLUDES=-I ../../vmb/src/util -I ../../vmb/src/vmbmmixlib
INCLDIR=-I ../../vmb/src/util -I ../../vmb/src/vmbmmixlib
LIBDIR=-L. -L../../vmb/src/util -L../../vmb/src/vmbmmixlib
LIBSIM= libboot.c libfinal.c libload.c libprint.c libstats.c \
libcommand.c libinit.c libmem.c libprofile.c libtrace.c \
......@@ -17,7 +18,7 @@ LIBSRC= libname.c libbase.c
LIBOBJ= $(LIBSIM:.c=.o) $(LIBAL:.c=.o) $(LIBSRC:.c=.o) mmix-arith.o mmix-io.o
CC= gcc
CFLAGS= -Wall -ggdb -O0 $(INCLUDES)
CFLAGS= -Wall -ggdb -O0 $(INCLDIR) $(LIBDIR)
AR = ar
ARFLAGS = cru
RANLIB = ranlib
......@@ -60,6 +61,10 @@ libmmix.a: $(LIBOBJ)
mmix-sim: libmmix.a mmix-sim.c
$(CC) $(CFLAGS) mmix-sim.c -L. -lmmix -o mmix-sim
mmixcpu: libmmix.a mmix-vmb.c
$(CC) $(CFLAGS) mmix-vmb.c -lmmix -lvmbmmix -lvmb -lpthread -o mmixcpu
mmixal: libmmix.a mmixal.c
$(CC) $(CFLAGS) mmixal.c -L. -lmmix -o mmixal
......
......@@ -61,7 +61,7 @@ if (vmb_get_interrupt(&vmb,&new_Q.h,&new_Q.l)==1) \
otherwise it will resume at Main */
#define MMIX_BOOT
#define MMIX_PRINT
#undef MMIX_PRINT
#ifdef MMIX_PRINT
extern int mmix_printf(char *format,...);
......
......@@ -15,9 +15,9 @@
#include "breaks.h"
#include "vmb.h"
device_info vmb = {0};
static char localhost[]="localhost";
static int busport=9002; /* on which port to connect to the bus */
static char *bushost=localhost; /* on which host to connect to the bus */
char localhost[]="localhost";
int port=9002; /* on which port to connect to the bus */
char *host=localhost; /* on which host to connect to the bus */
int main(argc,argv)
......@@ -33,8 +33,8 @@ int main(argc,argv)
mmix_lib_initialize();
mmix_commandline(argc,argv);
if (bushost==NULL) panic("No Bus given. Use Option -B[host:]port");
init_mmix_bus(bushost,busport,"MMIX CPU");
if (host==NULL) panic("No Bus given. Use Option -B[host:]port");
init_mmix_bus(host,port,"MMIX CPU");
mmix_initialize();
......@@ -64,7 +64,7 @@ boot:
mmix_commandline(argc, argv);
write_all_data_cache();
clear_all_instruction_cache();
if (interacting) set_break(g[rWW],exec_bit);
if (interacting) mem_find(g[rWW])->bkpt|=exec_bit;
while (true) {
if (interrupt && !breakpoint) breakpoint=interacting=true, interrupt=false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment