5 ms·
I read that line as suggesting that when using HLL the programmer generally does not have control over the assembly that is generated. I guess that is why some
by 3xblah 7y ago
I read that line as suggesting that when using HLL the programmer generally does not have control over the assembly that is generated. I guess that is why sometimes, as the author suggests, the programmer may write part of a program in HLL and another part in assembly in order to achieve increase execution speed.
- anfilt 7y agoIt's more than just execution speed. It could something as simple making a function using assembly that swaps the virtual memory page table on a processor. That's not something you gonna find in a high level language.
- dahfizz 7y agoYup. The example I implemented in college is stack pointer manipulation to implement multithreading (think pthread). Some things can only be done in assembly.
- anfilt 7y agoYea done that myself, save all the register states, save the stack pointer, and then set a new stack pointer and load all that tasks register states. Although doing the same on windows is kinda annoying. Also the amount callee saved registers is kinda like what the heck. Here is some code I wrote doing that for window's ABI. https://pastebin.com/jnxeMRcV https://pastebin.com/jnxeMRcV