7 ms·
C lets you manipulate memory close to the level assembly allows, and C function pointers, unions, and strings are a very assembly-like thing. But assembly does
by tenebrisalietum 7y ago
C lets you manipulate memory close to the level assembly allows, and C function pointers, unions, and strings are a very assembly-like thing.
But assembly doesn't have the following concepts built into it, you have to manage those yourself if you want them:
- The notion of functions and return values. CALL/RET implements subroutines, not functions.
- Linkage that is more complex than jumps or call/returns. The ABI between units of code is something you have to define and do youself.
- The notion of associating types with variables. Variables in assembly are simply labels for memory locations, but don't really constrict action or tell you how many memory locations are in the variable. Types, including valid actions, data widths, etc. are completely up to you and must be done manually in assembly.