mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
Functions in X86
This commit is contained in:
parent
8907ab2119
commit
b19bea4d58
13 changed files with 126 additions and 67 deletions
|
|
@ -7,7 +7,7 @@ RC=../src/rc.opt
|
|||
check: $(TESTS)
|
||||
|
||||
$(TESTS): %: %.expr
|
||||
# @$(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
||||
@$(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
||||
@cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
|
||||
@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ RC = ../../src/rc.opt
|
|||
check: $(TESTS)
|
||||
|
||||
$(TESTS): %: %.expr
|
||||
# @RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
||||
@RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
||||
@cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
|
||||
@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ RC = ../../src/rc.opt
|
|||
check: $(TESTS)
|
||||
|
||||
$(TESTS): %: %.expr
|
||||
# @RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
||||
@RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
||||
@cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
|
||||
@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ fun test2 (b) {
|
|||
a := b
|
||||
}
|
||||
|
||||
read (x);
|
||||
|
||||
test1 ();
|
||||
write (a);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ fun print () {
|
|||
write (c)
|
||||
}
|
||||
|
||||
read (x);
|
||||
|
||||
a := 100;
|
||||
b := 200;
|
||||
c := 300;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ fun print () {
|
|||
write (c)
|
||||
}
|
||||
|
||||
read (x);
|
||||
|
||||
a := 100;
|
||||
b := 200;
|
||||
c := 300;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
0
|
||||
0
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ fun test2 (b) {
|
|||
print ()
|
||||
}
|
||||
|
||||
read (x);
|
||||
|
||||
a := 100;
|
||||
b := 200;
|
||||
c := 300;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ fun ack (m, n) {
|
|||
fi
|
||||
}
|
||||
|
||||
read (x);
|
||||
|
||||
for m := 0, m <= 3, m := m+1 do
|
||||
for n := 0, n <= 8, n := n+1 do
|
||||
write (ack (m, n))
|
||||
|
|
|
|||
|
|
@ -8,5 +8,7 @@ fun test (n, m) local i, s {
|
|||
return s
|
||||
}
|
||||
|
||||
read (x);
|
||||
|
||||
write (test (10, 100));
|
||||
write (test (100, 10))
|
||||
Loading…
Add table
Add a link
Reference in a new issue