Fig word "Marker"

Topics relating to various Forth models on the 6502, 65816, and related microprocessors and microcontrollers.
Post Reply
Powersoft
Posts: 31
Joined: 13 May 2021
Location: Hellevoetsluis-NL

Fig word "Marker"

Post by Powersoft »

Knows someone the definition (source) of the word marker?
leepivonka
Posts: 168
Joined: 15 Apr 2016

Re: Fig word "Marker"

Post by leepivonka »

NARKER is a FORTH 2012 standard word: https://forth-standard.org/standard/core/MARKER
It creates a word that, when executed, FORGETs itself and all words following.

It should be possible to define MARKER in FIG to create a word that passes it's own address into the middle of the FORGET logic. I haven't done this yet.

Another alternative is to change your program to delete MARKER & use FORGET where the MARKER created word would be called.
Post Reply