aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/call.asm7
-rw-r--r--examples/div.asm2
2 files changed, 8 insertions, 1 deletions
diff --git a/examples/call.asm b/examples/call.asm
new file mode 100644
index 0000000..a6557c8
--- /dev/null
+++ b/examples/call.asm
@@ -0,0 +1,7 @@
+mov a, 2
+call square
+hlt
+
+square:
+ mul a, a
+ ret
diff --git a/examples/div.asm b/examples/div.asm
index f07766c..b4ec2e6 100644
--- a/examples/div.asm
+++ b/examples/div.asm
@@ -1,4 +1,4 @@
mov a, 10
-mov b, 2
+mov b, 10
div a, b
hlt