From df0d6a4503a26508553510b4050eaa79f52e4e4e Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sun, 18 Oct 2020 18:22:31 +0300 Subject: Another step to release. --- sts/ia32/stack.sts | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sts/ia32/stack.sts (limited to 'sts/ia32/stack.sts') diff --git a/sts/ia32/stack.sts b/sts/ia32/stack.sts new file mode 100644 index 0000000..e884098 --- /dev/null +++ b/sts/ia32/stack.sts @@ -0,0 +1,41 @@ +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] + # 50 ?' ; push eax +next + +defasm set + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 89 ?' # 04 ?' # 9c ?' ; mov [esp + 4 * ebx], eax +next + +defasm drop + # 58 ?' ; pop eax +next + +defasm dup + # ff ?' # 34 ?' # 24 ?' ; push dword [esp] +next + +defasm over + # ff ?' # 74 ?' # 24 ?' # 4 ?' ; push dword [esp + 4] +next + +defasm swap + # 58 ?' ; pop eax + # 5b ?' ; pop ebx + # 50 ?' ; push eax + # 53 ?' ; push ebx +next -- cgit v1.2.3