mirror of
https://github.com/wfjm/w11.git
synced 2026-05-04 15:16:59 +00:00
- interim release w11a_V0.562 (untagged)
- C++ and Tcl based backend server: many support classes for interfacing to w11 system designs, and the associated Tcl bindings. - add 'asm-11', a simple, Macro-11 syntax subset combatible, assembler. - use now doxygen 1.8.3.1, generate c++,tcl, and vhdl source docs
This commit is contained in:
2
tools/src/testtclsh/.cvsignore
Normal file
2
tools/src/testtclsh/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
*.dep
|
||||
testtclsh
|
||||
47
tools/src/testtclsh/Makefile
Normal file
47
tools/src/testtclsh/Makefile
Normal file
@@ -0,0 +1,47 @@
|
||||
# $Id: Makefile 504 2013-04-13 15:37:24Z mueller $
|
||||
#
|
||||
# Revision History:
|
||||
# Date Rev Version Comment
|
||||
# 2013-02-10 485 1.0 Initial version
|
||||
#
|
||||
# Compile and Link search paths
|
||||
#
|
||||
include ../checkpath_cpp.mk
|
||||
#
|
||||
INCLFLAGS = -I${TCLINC} -I${RETROBASE}/tools/src
|
||||
LDLIBS = -ltcl -lreadline
|
||||
LDLIBS += -L${RETROBASE}/tools/lib -lrtcltools
|
||||
LDLIBS += -lrutiltpp -lrlinktpp -lrwxxtpp
|
||||
#LDLIBS += -lrusbtpp
|
||||
#
|
||||
# Object files to be included
|
||||
#
|
||||
OBJ_all = testtclsh.o
|
||||
#
|
||||
DEP_all = $(OBJ_all:.o=.dep)
|
||||
#
|
||||
testtclsh : $(OBJ_all)
|
||||
|
||||
#- generic part ----------------------------------------------------------------
|
||||
#
|
||||
include $(RETROBASE)/tools/make/generic_cpp.mk
|
||||
include $(RETROBASE)/tools/make/generic_dep.mk
|
||||
include $(RETROBASE)/tools/make/dontincdep.mk
|
||||
#
|
||||
# The magic autodependcy include
|
||||
#
|
||||
ifndef DONTINCDEP
|
||||
include $(DEP_all)
|
||||
endif
|
||||
#
|
||||
# cleanup phonies:
|
||||
#
|
||||
.PHONY : clean cleandep distclean
|
||||
clean :
|
||||
@ rm -f $(OBJ_all)
|
||||
@ echo "Object files removed"
|
||||
#
|
||||
cleandep :
|
||||
@ rm -f $(DEP_all)
|
||||
@ echo "Dependency files removed"
|
||||
#
|
||||
68
tools/src/testtclsh/testtclsh.cpp
Normal file
68
tools/src/testtclsh/testtclsh.cpp
Normal file
@@ -0,0 +1,68 @@
|
||||
// $Id: testtclsh.cpp 504 2013-04-13 15:37:24Z mueller $
|
||||
//
|
||||
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
||||
//
|
||||
// This program is free software; you may redistribute and/or modify it under
|
||||
// the terms of the GNU General Public License as published by the Free
|
||||
// Software Foundation, either version 2, 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 complete details.
|
||||
//
|
||||
// Revision History:
|
||||
// Date Rev Version Comment
|
||||
// 2013-02-10 485 1.0 Initial version
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
|
||||
#include "tcl.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern "C" int Rutiltpp_Init(Tcl_Interp* interp);
|
||||
extern "C" int Rlinktpp_Init(Tcl_Interp* interp);
|
||||
//extern "C" int Rusbtpp_Init(Tcl_Interp* interp);
|
||||
extern "C" int Rwxxtpp_Init(Tcl_Interp* interp);
|
||||
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
cout << "testtclsh starting..." << endl;
|
||||
|
||||
Tcl_Interp* interp = Tcl_CreateInterp();
|
||||
if (!interp) {
|
||||
cout << "Tcl_CreateInterp() failed" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Rutiltpp_Init(interp);
|
||||
Rlinktpp_Init(interp);
|
||||
// Rusbtpp_Init(interp);
|
||||
Rwxxtpp_Init(interp);
|
||||
|
||||
char* line;
|
||||
while ((line = readline("testtclsh> "))) {
|
||||
if (line[0]!=0) add_history(line);
|
||||
int rc = Tcl_Eval(interp, line);
|
||||
if (rc != TCL_OK) {
|
||||
cout << "command '" << line << "' failed" << endl;
|
||||
}
|
||||
const char* res = Tcl_GetStringResult(interp);
|
||||
if (res && res[0])
|
||||
cout << Tcl_GetStringResult(interp) << endl;
|
||||
free(line);
|
||||
}
|
||||
|
||||
Tcl_DeleteInterp(interp);
|
||||
Tcl_Finalize();
|
||||
|
||||
cout << "testtclsh exit..." << endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user