Skip to content

Commit

Permalink
Merge pull request #171 from TG9541/refactor-test
Browse files Browse the repository at this point in the history
fixes #170 make MARKER work with CORE
  • Loading branch information
TG9541 authored Mar 3, 2018
2 parents a9745d6 + 239fd79 commit bb51eeb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/MARKER
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
\ STM8eForth : MARKER for words in RAM MM-170929
\ ------------------------------------------------------------------------------

#require LAST
#require [COMPILE]
#require CALL,

HERE \ ( -- xt )
\ get CP stored by MARKER, get last & context from the mark's link field
] RAM DUP @ last 2- ! 2+ @ DUP last ! last 10 + ! [ $81 C,
] RAM DUP @ LAST 2- ! 2+ @ DUP LAST ! LAST 10 + ! [ $81 C,

: MARKER ( "name" -- )
\ The marker "name" removes itself and all later defined words from RAM.
RAM HERE last 2- @ , \ store CP, then define a mark
RAM HERE LAST 2- @ , \ store CP, then define a mark
: [COMPILE] LITERAL ( xt ) LITERAL CALL, [COMPILE] ;
;

Expand Down

0 comments on commit bb51eeb

Please sign in to comment.