From 53ccfab6c1f2ddad977ceedbdbbfa54a05b81070 Mon Sep 17 00:00:00 2001 From: exegete Date: Sat, 17 Oct 2020 17:52:20 +0300 Subject: stack print and etc --- ia32/bitwise.sts | 21 +++++++++++++++++++++ ia32/float/float.sts | 20 +++++++++++++++----- 2 files changed, 36 insertions(+), 5 deletions(-) (limited to 'ia32') diff --git a/ia32/bitwise.sts b/ia32/bitwise.sts index b86e6c6..205e618 100644 --- a/ia32/bitwise.sts +++ b/ia32/bitwise.sts @@ -4,3 +4,24 @@ defasm xor # 31 ?' # d8 ?' ; xor eax, ebx # 50 ?' ; push eax next + +defasm and + # 5b ?' ; pop ebx + # 58 ?' ; pop eax + # 21 ?' # d8 ?' ; and eax, ebx + # 50 ?' ; push eax +next + +defasm shr + # 59 ?' ; pop ecx + # 58 ?' ; pop eax + # d3 ?' # e8 ?' ; shr eax, cl + # 50 ?' ; push eax +next + +defasm shl + # 59 ?' ; pop ecx + # 58 ?' ; pop eax + # d3 ?' # e0 ?' ; shl eax, cl + # 50 ?' ; push eax +next diff --git a/ia32/float/float.sts b/ia32/float/float.sts index 158781c..9f3ba52 100644 --- a/ia32/float/float.sts +++ b/ia32/float/float.sts @@ -3,6 +3,21 @@ defasm float_init # db ?' # e3 ?' ; fninit next +defasm float_cload + # d9 ?' # 2c ?' # 24 ?' ; fldcw [esp] + # 58 ?' ; pop eax +next + +defasm float_sstore + # 9b ?' # df ?' # e0 ?' ; fstsw ax + # 50 ?' ; push eax +next + +defasm float_cstore + # 50 ?' ; push eax + # d9 ?' # 3c ?' # 24 ?' ; fstcw [esp] +next + defasm float_fload # d9 ?' # 04 ?' # 24 ?' ; fld dword [esp] # 58 ?' ; pop eax @@ -23,11 +38,6 @@ defasm float_istore # db ?' # 1c ?' # 24 ?' ; fistp dword [esp] next -defasm float_status - # de ?' # f9 ?' ; fnstsw ax - # 50 ?' ; push eax -next - defasm float_add # de ?' # c1 ?' ; faddp st1, st0 next -- cgit v1.2.3