gvasm
gvasm copied to clipboard
Assembler and disassembler designed specifically for Game Boy Advance homebrew.
WIP
The big feature for v3 should be a system for distributing libraries (sharing code). I should be able to pull in a music library, or a saving library, and everything...
``` .struct Player = iwram(-1) // all layers // ... .end ``` Something like `iwram(v)` where `v` is a 32-bit number that says whether the struct should be allocated to...
Now that we can allocate structs to IWRAM or EWRAM, it would be nice to have the equivalent for code: ``` .begin irqNone = iwram .arm mov r0, #0x04000000 ldr...
What if macros were just: ``` .script export foo = { { 'temp:reg', 'shift:int', 'save:regrange' }, // parameters ` // body ldr $temp, =123 lsls $temp, #$shift push $save `...
Would be nice to do something like: ``` .script i8 pack.huff pack.lz77 {1, 2, 3, 4, 5} .end ``` and also: ``` .pack huff .pack lz77 .i8 1, 2, 3,...
https://developer.arm.com/documentation/dui0473/m/writing-arm-assembly-language/assembly-language-changes-after-rvct-v2-1?lang=en
These should work in Thumb: ``` strx r0, [sp, #S.foo] strx r0, [sp] (S.foo) ldrx r0, [sp, #S.foo] ldrx r0, [sp] (S.foo) ```
Word on discord is you can perform a mov in thumb on low registers without setting status. They claim it's undocumented. I should verify this on real hardware and, assuming...