diff options
Diffstat (limited to 'baremetal/shell/cell.mu')
-rw-r--r-- | baremetal/shell/cell.mu | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/baremetal/shell/cell.mu b/baremetal/shell/cell.mu index c4f3311e..fe1dd6b6 100644 --- a/baremetal/shell/cell.mu +++ b/baremetal/shell/cell.mu @@ -7,6 +7,16 @@ type cell { number-data: float # type 2: symbol # type 3: string - text-data: (handle array byte) + text-data: (handle stream byte) # TODO: array, (associative) table, stream } + +fn new-symbol _out: (addr handle cell) { + var out/eax: (addr handle cell) <- copy _out + allocate out + var out-addr/eax: (addr cell) <- lookup *out + var type/ecx: (addr int) <- get out-addr, type + copy-to *type, 2/symbol + var dest-ah/eax: (addr handle stream byte) <- get out-addr, text-data + populate-stream dest-ah, 0x40/max-symbol-size +} |