diff --git a/tools/src/librw11/Rw11UnitStream.cpp b/tools/src/librw11/Rw11UnitStream.cpp index 1a3148ea..ebb2fa38 100644 --- a/tools/src/librw11/Rw11UnitStream.cpp +++ b/tools/src/librw11/Rw11UnitStream.cpp @@ -1,6 +1,6 @@ -// $Id: Rw11UnitStream.cpp 515 2013-05-04 17:28:59Z mueller $ +// $Id: Rw11UnitStream.cpp 848 2017-02-04 14:55:30Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2017 by Walter F.J. Mueller // // 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 @@ -13,13 +13,14 @@ // // Revision History: // Date Rev Version Comment +// 2017-02-04 848 1.1 Pos(): return -1 if not attached // 2013-05-04 515 1.0 Initial version // 2013-05-01 513 0.1 First draft // --------------------------------------------------------------------------- /*! \file - \version $Id: Rw11UnitStream.cpp 515 2013-05-04 17:28:59Z mueller $ + \version $Id: Rw11UnitStream.cpp 848 2017-02-04 14:55:30Z mueller $ \brief Implemenation of Rw11UnitStream. */ @@ -73,8 +74,7 @@ void Rw11UnitStream::SetPos(int pos) int Rw11UnitStream::Pos() const { - if (!Virt()) - throw Rexception("Rw11UnitStream::Pos", "no stream attached"); + if (!Virt()) return -1; // allow tcl 'get ?' if not attached RerrMsg emsg; int irc = Virt()->Tell(emsg); diff --git a/tools/tcl/rw11/asm.tcl b/tools/tcl/rw11/asm.tcl index 717d28cf..65076a0d 100644 --- a/tools/tcl/rw11/asm.tcl +++ b/tools/tcl/rw11/asm.tcl @@ -1,6 +1,6 @@ -# $Id: asm.tcl 704 2015-07-25 14:18:03Z mueller $ +# $Id: asm.tcl 848 2017-02-04 14:55:30Z mueller $ # -# Copyright 2013-2015 by Walter F.J. Mueller +# Copyright 2013-2017 by Walter F.J. Mueller # # 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 @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2017-02-04 784 1.0.5 asmrun: allow 'ps' in initializer list # 2015-07-25 704 1.0.4 asmrun,asmtreg,asmtmem: use args in proc definition # 2014-07-26 575 1.0.3 add asmwait_tout variable, use in asmwait # 2014-07-10 568 1.0.2 add errcnt return for asmtreg and asmtmem @@ -55,14 +56,19 @@ namespace eval rw11 { } } - $cpu cp -wr0 $opts(r0) \ - -wr1 $opts(r1) \ - -wr2 $opts(r2) \ - -wr3 $opts(r3) \ - -wr4 $opts(r4) \ - -wr5 $opts(r5) \ - -wsp $opts(sp) \ - -stapc $opts(pc) + set clist {} + foreach key {r0 r1 r2 r3 r4 r5 sp} { + lappend clist "-w${key}" $opts($key) + } + if {[info exists opts(ps)]} { + lappend clist "-wpc" $opts(pc) + lappend clist "-wps" $opts(ps) + lappend clist "-start" + } else { + lappend clist "-stapc" $opts(pc) + } + + $cpu cp {*}$clist return "" }