diff options
-rw-r--r-- | keygen.sts | 34 | ||||
-rw-r--r-- | test.sts | 11 |
2 files changed, 40 insertions, 5 deletions
diff --git a/keygen.sts b/keygen.sts new file mode 100644 index 0000000..6067c0d --- /dev/null +++ b/keygen.sts @@ -0,0 +1,34 @@ +defword keygen + ; Increment + 0 + do + over over = until + dup 2 + get + dup ff < if + 1 + over 2 + set + drop + exit + fi + drop 0 over 2 + set + 1 + + od + drop + + ; Clean old stack data + dup + do + dup 0 = until + 1 get 2 set swap drop + 1 - + od + drop + + 1 + + 0 + do + over over = until + dup 2 get 1 set 0 2 set + 1 + + od + drop +exit @@ -1,12 +1,13 @@ module ia32/elf/begin.sts module ia32/float/float.sts +module keygen.sts set_entry -float_init -4 float_iload -5 float_iload -float_more -4 print_stack +ff ff 2 keygen +5 print_stack +a sys_write +keygen +5 print_stack sys_exit module ia32/elf/end.sts |