summaryrefslogtreecommitdiff
path: root/boot/stage1.s
diff options
context:
space:
mode:
Diffstat (limited to 'boot/stage1.s')
-rw-r--r--boot/stage1.s13
1 files changed, 7 insertions, 6 deletions
diff --git a/boot/stage1.s b/boot/stage1.s
index e591e21..9b118d5 100644
--- a/boot/stage1.s
+++ b/boot/stage1.s
@@ -1896,11 +1896,6 @@ _main:
sw s0, 0(sp)
addi s0, sp, 8
- # Read the source from the standard input.
- la a0, source_code
- li a1, SOURCE_BUFFER_SIZE # Buffer size.
- call _read_file
-
li s2, 1
# Epilogue.
@@ -1912,7 +1907,13 @@ _main:
# Entry point.
.type _start, @function
_start:
- call _tokenizer_initialize
+ # Read the source from the standard input.
+ la a0, source_code
+ li a1, SOURCE_BUFFER_SIZE # Buffer size.
+ call _read_file
+
+ mv a0, s1
+ call _tokenize
call _main
call _compile