diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-09-22 00:16:21 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-09-22 00:16:21 -0700 |
commit | 08c2f2a5ce0a55c1b33314309ab857d305a0e58b (patch) | |
tree | e50605d4c4a11599c8abbc13e58e52da44f1677b /subx/examples/ex7.k2 | |
parent | 3f8597bc3d44ab26536b080ae00e3b66202137d6 (diff) | |
download | mu-08c2f2a5ce0a55c1b33314309ab857d305a0e58b.tar.gz |
4587
Diffstat (limited to 'subx/examples/ex7.k2')
-rw-r--r-- | subx/examples/ex7.k2 | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/subx/examples/ex7.k2 b/subx/examples/ex7.k2 deleted file mode 100644 index 515c5c12..00000000 --- a/subx/examples/ex7.k2 +++ /dev/null @@ -1,24 +0,0 @@ -var stream : int = 0 -var a : char = 97 -var b : char = 0 -var filename : (array char) = ".foo" - -fn main [ - call create, filename - *stream <- call open, filename, 1/wronly - call write, *stream, a, 1 - call close, *stream - stream <- call open, filename, 0/rdonly - call read, *stream, b, 1 - call close, *stream - call unlink, filename - var result/EBX : char - result/EBX <- copy b # TODO: copy char to int? - call exit-EBX -] - -# like exit, but assumes the code is already in EBX -fn exit-EBX [ - code/EAX <- copy 1/exit - syscall -] |