3 ms·
As an electrical engineer I deal with assembly programming all too frequently. So clearly I am missing something important about the concepts presented here. Wh
by jimmyswimmy 10y ago
As an electrical engineer I deal with assembly programming all too frequently. So clearly I am missing something important about the concepts presented here. Why on earth would I go to the trouble of writing assembly code to put in the middle of my C and then use another tool to strip the assembly and convert it to C? Because it turns out that I'm even better at writing C than I am at assembly. And although the power of assembly is fantastic, I vastly prefer C.
Thanks in advance for any explanation. I'm clearly missing something that should be obvious.
- DSingularity 10y agoSometimes there are existing binaries you want to instrument with code. Maybe to profile or perform dynamic analysis for something like bug detection or security enhancement. Valgrind operates like this. Instrument the allocation routines and with tracking of pointer variables you can detect dangling pointers and overflows and leaks and so on.
- jimmyswimmy 10y agoThanks for that, starting from an existing binary was not on my mind. That is a very neat trick.
- bogomipz 10y agoI didn't think most electrical engineers would work with Assembly code. Can I ask what type of electrical engineer you are?
- ZenoArrow 10y agoI'm not the person you're asking but I suspect many embedded systems engineers are at least familiar with the basics of assembly. Also, it isn't that hard to pick up the basics of assembly, the main reasons it's not common anymore is tedium of writing code in assembly, and not being as portable as higher level languages.
- jimmyswimmy 10y agoI'm a jack of all trades design engineer in the R&D space. Assembly is appropriate for the very low end of the 8-bit microcontroller space. Especially for timing critical code. Like a bit banged RS-232 port. There are still micros with only a few kb of flash. Can be hard to fit much of anything in there. You can do some amazing things in assembly if you're motivated, which tends to happen when you have a fifty cent budget for a micro, two weeks left for delivery of prototypes, and code left to write.
- jimmyswimmy 10y agoI'm a jack of all trades design engineer in the R&D space. Assembly is appropriate for the very low end of the 8-bit microcontroller space. Especially for timing critical code. Like a bit banged RS-232 port. There are still micros with only a few kb of flash. Can be hard to fit much of anything in there. You can do some amazing things in assembly if you're motivated, which tends to happen when you have a fifty cent budget for a micro, two weeks left for delivery of prototypes, and code left to write.