diff options
Diffstat (limited to 'print_123.s')
| -rw-r--r-- | print_123.s | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/print_123.s b/print_123.s index 612b4c8..b87309b 100644 --- a/print_123.s +++ b/print_123.s @@ -8,35 +8,21 @@ # || -> cont .thunkcode main # push a new integer - pushq $100 - pushq $INT_code - mov %rsp, %r11 # backup first arg + thunkto %r11, $INT_code, $100 # push another new integer - pushq $23 - pushq $INT_code - mov %rsp, %r12 # backup second arg + thunkto %r12, $INT_code, $23 # push the plus - push %r12 - push %r11 - pushq $2 - pushq $plus - mov %rsp, %r11 # backup plus + thunkto %r11, $plus, $2, %r11, %r12 # push the print - push %r11 - pushq $1 - pushq $print - mov %rsp, %r11 # backup print + thunkto %r11, $print, $1, %r11 - # push a cont thunk for main_exit - push %rsi - pushq $1 - pushq $main_exit + # push a cont thunk for main_exit and set continuation for main_exit + thunkto %rsi, $main_exit, $1, %rsi # evaluate into main_exit - mov %rsp, %rsi enter %r11 .include "include/main_exit.s" |
