# HG changeset patch # User telesto # Date 1681047855 -7200 # Sun Apr 09 15:44:15 2023 +0200 # Node ID e1745529d3ce032f877b19ebd7bfc26623d7059a # Parent 226bac9d6cacb5b3176e0f4d819c95fc45b623df bootstrap.asm: add m' diff --git a/bootstrap.asm b/bootstrap.asm --- a/bootstrap.asm +++ b/bootstrap.asm @@ -653,22 +653,38 @@ mov tos, [cfa(tos)] .notfound: ret + +; ( *dp -- *str|empty ) +musttick: + push tos + drop + exec word + dup + dup + pop tos + ; ( saddr saddr *dp -- ) + exec tick + test tos, tos + jnz .found + ; ( saddr 0 ) + drop + jmp nosuchword +.found: + ; ( waddr saddr ) + nip + ret ; find code address of next forth word in stream ; ( -- ) fcreate ftick, "f'" - exec word - dup pushs fdp - exec tick - test tos, tos - jz .notfound - nip - ret -.notfound: - drop - call nosuchword - ret + jmp musttick + +; find code address of next forth word in stream +; ( -- ) +fcreate mtick, "m'" + pushs mdp + jmp musttick ; taken from colorforth ; we use the fact that we are little endian