From 65f13dba60cab28c5b6cae2d72b792ade51c86c8 Mon Sep 17 00:00:00 2001 From: Alejandro Sior Date: Sun, 31 Jul 2022 15:42:56 +0200 Subject: cook: getting system compilers --- test/.build | 5 ++--- test/test.S | 6 ++++++ test/test.asm | 6 ------ 3 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 test/test.S delete mode 100644 test/test.asm (limited to 'test') diff --git a/test/.build b/test/.build index 8fdda48..74fa78d 100644 --- a/test/.build +++ b/test/.build @@ -1,5 +1,4 @@ linker_sc = CWD / "linker.sc" -as_obj = asm("test.asm") -obj = cc("main.c", extra_args="-T" + str(linker_sc)) -aout = ld("a.out", obj, as_obj) \ No newline at end of file +obj = cc("main.c", "test.S") +aout = ld("a.out", obj) \ No newline at end of file diff --git a/test/test.S b/test/test.S new file mode 100644 index 0000000..875ab58 --- /dev/null +++ b/test/test.S @@ -0,0 +1,6 @@ +.code64 + +.global test +test: + mov $69, %rax + ret \ No newline at end of file diff --git a/test/test.asm b/test/test.asm deleted file mode 100644 index bcd7d20..0000000 --- a/test/test.asm +++ /dev/null @@ -1,6 +0,0 @@ -[bits 64] - -global test -test: - mov eax, 69 - ret \ No newline at end of file -- cgit v1.2.3