bootstrap.asm: add m'
1 files changed, 27 insertions(+), 11 deletions(-)

M bootstrap.asm
M bootstrap.asm +27 -11
@@ 653,22 653,38 @@ fcreate tick, "(')"
 	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