Implement elsif for if-statements
This commit is contained in:
@@ -109,7 +109,7 @@ end;
|
|||||||
(* Returns the amount of bytes written in a0. *)
|
(* Returns the amount of bytes written in a0. *)
|
||||||
proc _read_file(v88: Word, v84: Word);
|
proc _read_file(v88: Word, v84: Word);
|
||||||
begin
|
begin
|
||||||
_syscall(0, v88, v84, 0, 0, 0, 63);
|
return _syscall(0, v88, v84, 0, 0, 0, 63)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(* Writes to the standard output. *)
|
(* Writes to the standard output. *)
|
||||||
@@ -610,7 +610,7 @@ begin
|
|||||||
_compile_binary_rhs();
|
_compile_binary_rhs();
|
||||||
|
|
||||||
(* Execute the operation. *)
|
(* Execute the operation. *)
|
||||||
_write_z("\tslt t0, t1, t0\n\0");
|
_write_z("\tslt t0, t0, t1\n\0");
|
||||||
|
|
||||||
goto .compile_expression_end;
|
goto .compile_expression_end;
|
||||||
end;
|
end;
|
||||||
@@ -1929,8 +1929,15 @@ begin
|
|||||||
_symbol_table_build();
|
_symbol_table_build();
|
||||||
|
|
||||||
(* Read the source from the standard input. *)
|
(* Read the source from the standard input. *)
|
||||||
|
v4 := @source_code;
|
||||||
|
|
||||||
|
.start_read;
|
||||||
(* Second argument is buffer size. Modifying update the source_code definition. *)
|
(* Second argument is buffer size. Modifying update the source_code definition. *)
|
||||||
_read_file(@source_code, 81920);
|
v0 := _read_file(v4, 81920);
|
||||||
|
if v0 > 0 then
|
||||||
|
v4 := v4 + v0;
|
||||||
|
goto .start_read;
|
||||||
|
end;
|
||||||
_compile();
|
_compile();
|
||||||
|
|
||||||
_exit(0);
|
_exit(0);
|
||||||
|
File diff suppressed because it is too large
Load Diff
1470
boot/stage14.elna
1470
boot/stage14.elna
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user