\
\    Mecrisp-Across - A Forth cross compiler for small MSP430 microcontrollers
\    Copyright (C) 2016  Matthias Koch
\
\    This program is free software: you can redistribute it and/or modify
\    it under the terms of the GNU General Public License as published by
\    the Free Software Foundation, either version 3 of the License, 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 more details.
\
\    You should have received a copy of the GNU General Public License
\    along with this program.  If not, see <http://www.gnu.org/licenses/>.
\


\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\  6. Teil: Die Möglichkeit, zu einem vorherigen Stand zurückzukehren
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

: @+ ( addr -- addr+4 x ) dup @ swap 4 + swap ;

: cross-cornerstone ( -- ) \ cross-cornerstone Name

  <builds

    t-fadenende @ ,
    t-here ,
    t-here 0 ?do
      i t@ ,
    4 +loop

  does>

    t-dictionary dictionarysize 0 fill
    jumpcollection maxjumps 8 * 0 fill

    0 t-dp !

    @+ t-fadenende !
    @+ 0 ?do
      dup i + @  t,
    4 +loop
    drop
;

