aboutsummaryrefslogtreecommitdiffstats
path: root/initrd
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-04-08 17:29:30 -0400
committerClyne Sullivan <tullivan99@gmail.com>2018-04-08 17:29:30 -0400
commit0726b60a6e32760fbadd1cdd39362c9c7a0fd9cc (patch)
tree38d594dd9c259f13fc6d867da349cb96a8c25158 /initrd
parent7eb572702ca012a89370cc94a297eeb346a8dee9 (diff)
file loading, switching, good!
Diffstat (limited to 'initrd')
-rw-r--r--initrd/boot3
-rw-r--r--initrd/calc8
-rw-r--r--initrd/init12
-rw-r--r--initrd/keys11
-rw-r--r--initrd/lines3
5 files changed, 24 insertions, 13 deletions
diff --git a/initrd/boot b/initrd/boot
deleted file mode 100644
index 13e5876..0000000
--- a/initrd/boot
+++ /dev/null
@@ -1,3 +0,0 @@
-choice = filemenu
-print("\nChoice: ")
-print(choice)
diff --git a/initrd/calc b/initrd/calc
new file mode 100644
index 0000000..7359f16
--- /dev/null
+++ b/initrd/calc
@@ -0,0 +1,8 @@
+while (1) {
+ print("> ")
+ input = gets()
+ answer = solve(input)
+ print("\n")
+ print(answer)
+ print("\n")
+}
diff --git a/initrd/init b/initrd/init
index 7359f16..6c5acac 100644
--- a/initrd/init
+++ b/initrd/init
@@ -1,8 +1,10 @@
while (1) {
- print("> ")
- input = gets()
- answer = solve(input)
- print("\n")
- print(answer)
+ rect(0, 0, 480, 320, 0)
+ ppos(0, 0)
+
+ print("Free mem: ")
+ print(freemem())
print("\n")
+ choice = filemenu()
+ program(choice)
}
diff --git a/initrd/keys b/initrd/keys
index 47dbae1..b5b4dfc 100644
--- a/initrd/keys
+++ b/initrd/keys
@@ -1,8 +1,9 @@
-do
- getkey > input
- print input
- delay 1000
-while (1)
+while (1) {
+ input = getkey()
+ print(input)
+ print("\n")
+ delay(1000)
+}
#do
# getkey > input
diff --git a/initrd/lines b/initrd/lines
index f6b2a82..8523339 100644
--- a/initrd/lines
+++ b/initrd/lines
@@ -26,4 +26,7 @@ while (1) {
j = 50 + rand(219)
line(x, y, i, j, 511)
+
+ # for exiting
+ getkey()
}