about summary refs log tree commit diff stats
path: root/cpp/000organization
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-14 22:17:37 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-14 22:17:37 -0700
commite7f76736d22acafa8b7b84df24fde0575d97686c (patch)
tree3f60913dddb775edd0092d7aabd241a6c12daef5 /cpp/000organization
parent06db0dd4beb09b5cdbe257a33a2d0fb1da7b394e (diff)
downloadmu-e7f76736d22acafa8b7b84df24fde0575d97686c.tar.gz
921
Diffstat (limited to 'cpp/000organization')
-rw-r--r--cpp/000organization22
1 files changed, 0 insertions, 22 deletions
diff --git a/cpp/000organization b/cpp/000organization
index f410fcd9..ab1cee79 100644
--- a/cpp/000organization
+++ b/cpp/000organization
@@ -95,28 +95,6 @@
 // End Globals
 
 int main(int argc, char* argv[]) {
-  if (argc > 1) {
-    // Commandline Options
-    if (!is_equal(argv[1], "test")) {
-      setup();
-      for (int i = 1; i < argc; ++i) {
-        ifstream fin(argv[i]);
-        while (!fin.eof()) add_recipe(fin);
-        fin.close();
-      }
-    }
-  }
-
-//?   setup();
-//?   for (unordered_map<string, int>::iterator p = Recipe_number.begin(); p != Recipe_number.end(); ++p) { //? 1
-//?     cout << p->first << ": " << p->second << '\n'; //? 1
-//?   } //? 1
-  recipe_number r = Recipe_number[string("main")];
-//?   cout << "recipe " << r << '\n'; //? 1
-//?   START_TRACING_UNTIL_END_OF_SCOPE //? 1
-//?   DUMP(""); //? 1
-  if (r) run(r);
-  dump_memory();
   return 0;  // End Main
 }
 
ight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# Some OS-specific preliminaries for Soso.

# Memory layout
#
# 0x40000000 - 0x40001ffff - for ELF code+data
# 0x40002000 - 0x401ffffff - for heap
== code 0x40000000
== data 0x40001000

# Syscalls
#
# We don't have libc, so we need to know Soso's precise syscall layout.
# https://github.com/ozkl/soso/blob/master/kernel/syscalltable.h
== code

syscall_exit:  # status/ebx : int
    b8/copy-to-eax 8/imm32
    cd/syscall 0x80/imm8

syscall_read:  # fd/ebx : int, buf/ecx : addr, size/edx : int -> nbytes-or-error/eax : int
    b8/copy-to-eax 2/imm32
    cd/syscall 0x80/imm8
    c3/return

syscall_write:  # fd/ebx : int, buf/ecx : addr, size/edx : int -> nbytes-or-error/eax : int
    b8/copy-to-eax 3/imm32
    cd/syscall 0x80/imm8
    c3/return

syscall_open:  # filename/ebx : (addr kernel-string), flags/ecx : int -> fd-or-error/eax : int
    b8/copy-to-eax 0/imm32
    cd/syscall 0x80/imm8
    c3/return

syscall_close:  # fd/ebx : int -> status/eax
    b8/copy-to-eax 1/imm32
    cd/syscall 0x80/imm8
    c3/return

# anonymous mmap not implemented