This commit is contained in:
Mylloon 2023-12-31 15:40:23 +01:00
parent 74b3abff1e
commit 14828b3b0e
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
4 changed files with 8 additions and 9 deletions

View file

@ -2,25 +2,23 @@ globals (x, y, z, k)
x <- copy 6; x <- copy 6;
%rdi <- copy x; %rdi <- copy x;
print_int(); print_int();
%rdi <- copy "\n"; %rdi <- copy " ";
print_string(); print_string();
y <- copy 7; y <- copy 7;
%rdi <- copy y; %rdi <- copy y;
print_int(); print_int();
%rdi <- copy "\n"; %rdi <- copy " ";
print_string(); print_string();
z <- mul y, x; z <- mul y, x;
%rdi <- copy z; %rdi <- copy z;
print_int(); print_int();
%rdi <- copy "\n"; %rdi <- copy " ";
print_string(); print_string();
k <- sub z, x; k <- sub z, x;
%rdi <- copy k; %rdi <- copy k;
print_int(); print_int();
%rdi <- copy "\n";
print_string();
end end

View file

@ -13,7 +13,4 @@ globals (res)
res <- copy %rax; res <- copy %rax;
%rdi <- copy res; %rdi <- copy res;
print_int(); print_int();
%rdi <- copy "\n";
print_string();
end end

View file

@ -0,0 +1,4 @@
globals ()
%rdi <- copy 42;
observe_int();
end

View file

@ -3,7 +3,7 @@ TARGET = retrolix
main: main:
@for f in $(wildcard *.$(TARGET)); do \ @for f in $(wildcard *.$(TARGET)); do \
printf "%s:\n" $$f; \ printf "%s: " $$f; \
./$(FLAP) -s $(TARGET) -d true -r true $$f; \ ./$(FLAP) -s $(TARGET) -d true -r true $$f; \
printf "\n"; \ printf "\n"; \
done done