Implemented length storage of allocated memory
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import io
|
||||
import mem
|
||||
import sys
|
||||
|
||||
@ -9,8 +10,8 @@ main() {
|
||||
info := mem.alloc(24)
|
||||
|
||||
loop {
|
||||
sys.write(1, "$ ", 2)
|
||||
n := sys.read(0, command, length)
|
||||
io.out("$ ")
|
||||
n := io.in(command)
|
||||
|
||||
if n <= 0 {
|
||||
return
|
||||
|
Reference in New Issue
Block a user