aboutsummaryrefslogtreecommitdiff
path: root/samples/clamp.orgaasm
diff options
context:
space:
mode:
Diffstat (limited to 'samples/clamp.orgaasm')
-rw-r--r--samples/clamp.orgaasm20
1 files changed, 2 insertions, 18 deletions
diff --git a/samples/clamp.orgaasm b/samples/clamp.orgaasm
index ecd2824..dcf5229 100644
--- a/samples/clamp.orgaasm
+++ b/samples/clamp.orgaasm
@@ -1,3 +1,4 @@
+@main
#000f #00f0 #0042 DBG
/clamp DBG POP
#000f #00f0 #0f00 DBG
@@ -6,21 +7,4 @@
/clamp DBG POP
RET
-@clamp ( min max a -- b )
- /min /max RET
-
-@min ( a b -- a < b ? a : b )
- OVR OVR LTH
- JNZ ,min/morethan
- SWP
-@min/morethan
- POP
- RET
-
-@max ( a b -- a > b ? a : b )
- OVR OVR GTH
- JNZ ,max/lessthan
- SWP
-@max/lessthan
- POP
- RET
+include(std.orgaasm)