From 5a21e0a0a4d944a7277a86a33a36b2eb7df59e3b Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sun, 18 Oct 2020 15:22:32 +0300 Subject: print_stack improved. --- common/print.sts | 7 +++---- main.sts | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/print.sts b/common/print.sts index 16973c2..a3bea56 100644 --- a/common/print.sts +++ b/common/print.sts @@ -16,16 +16,15 @@ defword print_hex dup 8 shr get_hex sys_write dup 4 shr get_hex sys_write get_hex sys_write - a sys_write exit defword print_stack dup do - dup 0 = until over over - 2 + get print_hex - 1 - - od + 1 - dup 0 = until + space sys_write + od newline sys_write drop drop exit diff --git a/main.sts b/main.sts index fafbb6a..7b12bb5 100644 --- a/main.sts +++ b/main.sts @@ -138,6 +138,7 @@ set_entry float_init ; this is program with floats 0 do dup length = until swap drop 1 + od drop keylen + 4 print_stack od as langcode drop ; output language -- cgit v1.2.3