From 808a161313e0a03ead45f843fee3d9c40bec02bd Mon Sep 17 00:00:00 2001 From: exegete Date: Fri, 16 Oct 2020 23:20:36 +0300 Subject: ref (asm) added --- ia32/macro.sts | 4 ---- ia32/stack.sts | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ia32/macro.sts b/ia32/macro.sts index 34c3a9d..9335176 100644 --- a/ia32/macro.sts +++ b/ia32/macro.sts @@ -51,10 +51,6 @@ top as %1% ] -[ ref 0 - top + 1 + -] - [ literal 0 lit # %1% ?. ] diff --git a/ia32/stack.sts b/ia32/stack.sts index f3c8bab..e884098 100644 --- a/ia32/stack.sts +++ b/ia32/stack.sts @@ -2,6 +2,13 @@ defasm top # 54 ?' ; push esp next +defasm ref + # 58 ?' ; pop eax + # c1 ?' # e0 ?' # 2 ?' ; shl eax, 2 + # 01 ?' # e0 ?' ; add eax, esp + # 50 ?' ; push eax +next + defasm get # 58 ?' ; pop eax # 8b ?' # 4 ?' # 84 ?' ; mov eax, [esp + 4 * eax] -- cgit v1.2.3