commit c736051ea77058258104de32e4e2b3fa1dac2ea6
parent e5192d4fd2607da6d919637987080cf5c652cb15
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Wed, 1 Jun 2022 13:51:41 -0400
README: a little note about TTY configuration
Diffstat:
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
@@ -110,6 +110,12 @@ To build Dusk OS, you need:
Run `make` and then run `./dusk`. You'll get a prompt. Look at `xcomp.txt` and
`boot.fs` to have an idea of the vocabulary available. Type `bye` to quit.
+Dusk OS expects a raw input. With a regular TTY, your input will be buffered
+and echoed twice. To avoid that, you can invoke it like this:
+
+ (stty -icanon -echo; ./dusk; stty icanon echo)
+
+
[1]: http://collapseos.org
[2]: http://collapseos.org/why.html
[3]: https://sr.ht/~vdupras/duskos
diff --git a/dusk.asm b/dusk.asm
@@ -451,7 +451,9 @@ defword 'litn', 4, word_litn, word_shrc
call word_write
ret
-write_displacement:
+defword 'call,', 5, word_callwrite, word_litn
+ pspush 0xe8 ; call opcode
+ call word_cwrite
mov eax, [ebp] ; absolute addr
sub eax, [here] ; displacement
sub eax, 4 ; ... from *after* call/jmp op
@@ -459,11 +461,6 @@ write_displacement:
call word_write
ret
-defword 'call,', 5, word_callwrite, word_litn
- pspush 0xe8 ; call opcode
- call word_cwrite
- jmp write_displacement
-
defword 'exit,', 5, word_exitwrite, word_callwrite
word_asmlast:
pspush 0xc3 ; ret opcode