From 253d9ed5e81c9b5e27ab48984e31a74775d305a0 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sat, 29 Jul 2023 08:54:52 -0700 Subject: [PATCH] Fixed wrong definition in lambda --- examples/hello.tal | 1 - src/drifblim.tal | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/hello.tal b/examples/hello.tal index 9114a22..31b8913 100644 --- a/examples/hello.tal +++ b/examples/hello.tal @@ -7,7 +7,6 @@ ;hello-word print-str - #010e DEO #800f DEO BRK diff --git a/src/drifblim.tal b/src/drifblim.tal index f697f4f..6ce2079 100644 --- a/src/drifblim.tal +++ b/src/drifblim.tal @@ -183,15 +183,15 @@ POP2 JMP2r @lambda &ptr =memory/lambda - &push ( id -- ) + &push ( -- ) [ LIT &count $1 ] INCk ,&count STR DUP ,&ptr LDR2 INC2k ,&ptr STR2 STA LIT "0 ADD ,&id STR ;&sym #60 ! - &pop ( -- id ) - ,&ptr LDR2 #0001 SUB2 DUP2 ,&ptr STR2 - LDA LIT "0 ADD ;&id STA + &pop ( -- ) + ,&ptr LDR2 #0001 SUB2 LDAk LIT "0 ADD ,&id STR + ,&ptr STR2 #6c ;&sym #6f !