diff --git a/code/asm.odin b/code/asm.odin index aaebf28..d0b3810 100644 --- a/code/asm.odin +++ b/code/asm.odin @@ -1,3 +1,3 @@ -package asmd // ASM Duffle +package asmduff // ASM Duffle diff --git a/code/asm/hello_yasm.asm b/code/asm/hello_nasm.asm similarity index 93% rename from code/asm/hello_yasm.asm rename to code/asm/hello_nasm.asm index 1cb4050..32e936a 100644 --- a/code/asm/hello_yasm.asm +++ b/code/asm/hello_nasm.asm @@ -2,17 +2,18 @@ BITS 64 ; Explicitly specify 64-bit mode DEFAULT REL ; Use RIP-relative addressing by default +extern ExitProcess ; Import Windows API functions +extern GetStdHandle +extern WriteConsoleA + ; Data section section .data - message db "Hello, x86-64 ASM!", 13, 10, 0 ; String with CRLF and null terminator + message db "Hello, NASM!", 13, 10, 0 ; String with CRLF and null terminator message_len equ $ - message ; Calculate string length ; Code section section .text global main ; Export main symbol for linker -extern ExitProcess ; Import Windows API functions -extern GetStdHandle -extern WriteConsoleA main: ; Function prologue diff --git a/code/host.odin b/code/host.odin index d55441d..c5653f3 100644 --- a/code/host.odin +++ b/code/host.odin @@ -1,4 +1,21 @@ -package asmd +package asmduff + + + +section_data :: proc() +{ + +} + +section_text :: proc() +{ + +} + +section_externs :: proc() +{ + +} main :: proc() { diff --git a/code/pkg_mappings.odin b/code/pkg_mappings.odin index cf6aa15..00f9345 100644 --- a/code/pkg_mappings.odin +++ b/code/pkg_mappings.odin @@ -1,3 +1,3 @@ -package asmd - +package asmduff +import diff --git a/scripts/build.ps1 b/scripts/build_duff.ps1 similarity index 100% rename from scripts/build.ps1 rename to scripts/build_duff.ps1 diff --git a/scripts/build_hello_nasm.ps1 b/scripts/build_hello_nasm.ps1 new file mode 100644 index 0000000..171d472 --- /dev/null +++ b/scripts/build_hello_nasm.ps1 @@ -0,0 +1,2 @@ +$nasm = 'nasm' +& $nasm -help diff --git a/scripts/build_nasm.ps1 b/scripts/build_nasm.ps1 new file mode 100644 index 0000000..7fec4c9 --- /dev/null +++ b/scripts/build_nasm.ps1 @@ -0,0 +1 @@ +$nams \ No newline at end of file diff --git a/toolchain/readme.md b/toolchain/readme.md index e3138a8..7cc055e 100644 --- a/toolchain/readme.md +++ b/toolchain/readme.md @@ -4,8 +4,3 @@ Repo: https://github.com/Ed94/gencpp.git Commit: 685bba36d5ed64b48908c950fbbb7f1dbb297120 - -## YASM - -Repo: https://github.com/yasm/yasm.git -Commit: 121ab150b3577b666c79a79f4a511798d7ad2432 diff --git a/toolchain/yasm b/toolchain/yasm deleted file mode 160000 index 121ab15..0000000 --- a/toolchain/yasm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 121ab150b3577b666c79a79f4a511798d7ad2432