From 9ff05a96e5a31df902293c90af2fec2531d8ee36 Mon Sep 17 00:00:00 2001 From: Wojciech Kosior Date: Wed, 2 Sep 2020 09:10:01 +0200 Subject: add tee instruction --- tclasm.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tclasm.tcl') diff --git a/tclasm.tcl b/tclasm.tcl index d326c00..99b01a1 100755 --- a/tclasm.tcl +++ b/tclasm.tcl @@ -181,6 +181,8 @@ proc __encode_extended_instruction {instruction} { return [__to_binary 5 9] } elseif {"$instruction" == "mul"} { return [__to_binary 6 9] + } elseif {"$instruction" == "tee"} { + return [__to_binary 7 9] } else { error "no such extended instruction: '$instruction'" } @@ -306,7 +308,7 @@ proc cond_jump {{address im_address}} { } } -foreach instruction {halt nop swap add sub div mul} { +foreach instruction {halt nop swap add sub div mul tee} { proc $instruction {} " _extended_instruction $instruction " -- cgit v1.2.3