Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mmix
util
Commits
36f42f9b
Commit
36f42f9b
authored
Oct 15, 2014
by
Martin Ruckert
Browse files
adapting to compile vmb mmixcpu
parent
d6e0c5ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
mmixlib/Makefile
View file @
36f42f9b
# 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
$(INCL
UDES
)
CFLAGS
=
-Wall
-ggdb
-O0
$(INCL
DIR)
$(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
...
...
mmixlib/libconfig.vmb
View file @
36f42f9b
...
...
@@ -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
#def
ine
MMIX_PRINT
#
un
def MMIX_PRINT
#ifdef MMIX_PRINT
extern int mmix_printf(char *format,...);
...
...
mmixlib/mmix-vmb.c
View file @
36f42f9b
...
...
@@ -15,9 +15,9 @@
#include
"breaks.h"
#include
"vmb.h"
device_info
vmb
=
{
0
};
static
char
localhost
[]
=
"localhost"
;
static
int
bus
port
=
9002
;
/* on which port to connect to the bus */
static
char
*
bus
host
=
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
(
bus
host
==
NULL
)
panic
(
"No Bus given. Use Option -B[host:]port"
);
init_mmix_bus
(
bus
host
,
bus
port
,
"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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment