3 ms·
I wish there was a language "between" assembly and C: basically assembly with some quality-of-life improvements. Shortcuts to reduce redundant chores (like tho
by Razengan 4y ago
I wish there was a language "between" assembly and C: basically assembly with some quality-of-life improvements.
Shortcuts to reduce redundant chores (like those multiple instructions to load one 64-bit number into an ARM register) but minimal "magic" or unintended consequences as in C. Things like maybe a function call syntax like:
CALL someFunc(R1: thingForRegister1, @R7: pushR7ThenPopOnReturn, R42: [memoryAddressForR42])
and the function might be defined as:
someFunc(R1 as localNameForR1, R7 as oneMoreThing, R42? as optionalArgument)
and so on. (but anyone could come up with better ideas than me)
- xigoi 4y agoI think QBE might be what you're looking for? https://c9x.me/compile/ https://c9x.me/compile/
- spc476 4y agoYou just need a decent assembler with macro support. Here's a few lines of code I have for 32-bit x86 code: PRINTF "main_task: sf=%p",ebp PRINTF " sf: 1=%d 2=%d 3=%d 4=%d",dword [ebp+8],dword [ebp+12],eax,ebx I'm using NASM and it wasn't hard to write the macro to do so.