mirror of
https://github.com/Asraelite/littlebigcomputer.git
synced 2025-07-17 16:16:51 +00:00
Add compiler
This commit is contained in:
parent
476972f85a
commit
3f3125ef43
31 changed files with 2625 additions and 3 deletions
45
programs/parva_0.2/split_args
Normal file
45
programs/parva_0.2/split_args
Normal file
|
@ -0,0 +1,45 @@
|
|||
|
||||
let input_string: *word;
|
||||
|
||||
|
||||
let space: char;
|
||||
li space, ' ';
|
||||
|
||||
let parts: quad;
|
||||
lq parts, input_string;
|
||||
|
||||
b loop_1_no_align
|
||||
|
||||
loop_1:
|
||||
|
||||
andi input_string, input_string, 0b11
|
||||
|
||||
# Frame 2
|
||||
|
||||
loop_1_no_align:
|
||||
|
||||
vindexof.6 x0, x1, x4
|
||||
bgez x0, split
|
||||
addi x8, x8, 1
|
||||
vindexof.6 x0, x1, x5
|
||||
bgez x0, split
|
||||
addi x8, x8, 1
|
||||
vindexof.6 x0, x1, x6
|
||||
bgez x0, split
|
||||
addi x8, x8, 1
|
||||
vindexof.6 x0, x1, x7
|
||||
bgez x0, split
|
||||
addi x8, x8, 1
|
||||
b loop_1
|
||||
|
||||
# Frame 8
|
||||
|
||||
split:
|
||||
|
||||
@mul char_index, 6
|
||||
sll x1, x2, x1
|
||||
lw x0, [x8]
|
||||
xor x0, x0, x1
|
||||
|
||||
addi x8, x8, 1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue