diff options
| author | andromeda <andromeda@lenovo> | 2026-03-12 14:12:33 +0100 |
|---|---|---|
| committer | andromeda <andromeda@lenovo> | 2026-03-12 14:12:33 +0100 |
| commit | 9e68a6bb6ef295b6d0f721d1da42842706313391 (patch) | |
| tree | f0b0fe2ecba28398e1ab41b4897ac4d57c8c1f88 | |
| parent | c003e63d62a72c997151851fdcf999c22fd4bb1e (diff) | |
increase/fix warnings
| -rw-r--r-- | twasm/asm/main.asm | 7 | ||||
| -rw-r--r-- | twasm/package.nix | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/twasm/asm/main.asm b/twasm/asm/main.asm index 7224b01..8cab49e 100644 --- a/twasm/asm/main.asm +++ b/twasm/asm/main.asm @@ -24,6 +24,9 @@ TEST_LINE_LENGTH equ 80 ; right border of test suite results [bits 64] [org LOAD_ADDR] +[default abs] ; TODO see if I actually need to do this + ; afaik absolute addressing is not harmful on bare metal + ; reasoning: stops annoying warning =D start: mov rsp, STACK_ADDR ; we might need more stack space, let's just be safe @@ -200,7 +203,7 @@ assemble: ret ; runs dec on .pending_operator_num_args - .dec_num_args + .dec_num_args: push rax mov al, [.pending_operator_num_args] dec al @@ -208,7 +211,7 @@ assemble: pop rax ret - .reset_state + .reset_state: ; I don't actually know if these `word` and `byte` directives are needed ; TODO check that. I think they are, becasue Nasm doesn't record the size ; of labels? diff --git a/twasm/package.nix b/twasm/package.nix index b435ebb..ee4e250 100644 --- a/twasm/package.nix +++ b/twasm/package.nix @@ -10,7 +10,11 @@ stdenv.mkDerivation { version = "0.1.0"; src = ./.; buildPhase = '' - ${nasm}/bin/nasm asm/main.asm -o out.bin + ${nasm}/bin/nasm \ + asm/main.asm \ + -o out.bin \ + -w+all \ + -w-reloc-abs ''; installPhase = '' dd if=/dev/zero of=disk bs=512 count=2880 |
