From 797b5825d2179e3bab22643a6873dc29800e79eb Mon Sep 17 00:00:00 2001 From: Wojciech Kosior Date: Tue, 6 Oct 2020 13:49:30 +0200 Subject: add relational operations to stack machine --- tclasm.tcl | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'tclasm.tcl') diff --git a/tclasm.tcl b/tclasm.tcl index 6a97b1f..90adda5 100755 --- a/tclasm.tcl +++ b/tclasm.tcl @@ -332,6 +332,51 @@ proc drop {} { } +proc eq {} { + puts 0011000000000111 +} + + +proc lt {} { + puts 0011000000001000 +} + + +proc ult {} { + puts 0011000000001001 +} + + +proc le {} { + puts 0011000000001010 +} + + +proc ule {} { + puts 0011000000001011 +} + + +proc gt {} { + puts 0011000000001100 +} + + +proc ugt {} { + puts 0011000000001101 +} + + +proc ge {} { + puts 0011000000001110 +} + + +proc uge {} { + puts 0011000000001111 +} + + proc ret {} { puts 0011000010000000 } -- cgit v1.2.3