10 ms·
Depending what you mean by "hardware guys" this isn't completely accurate. Though, you may not need to "learn" it in the sense that you do other programming lan
by P_I_Staker 4y ago
Depending what you mean by "hardware guys" this isn't completely accurate. Though, you may not need to "learn" it in the sense that you do other programming languages, or like you previously did.
It's conceivable that they might have to write ASM at some point. However it will probably be very minimal and geared to a specific low level (hardware) goal.
There's still some value to "learning" ASM, or at least having worked with it if you want to write low level code, though it might be minimal. I wouldn't understand C and low level software without having worked with ASM at some point, even though I don't use it.
I probably wouldn't recommend it a good use of time.
- baremetal 4y agoIt is good to know how control flow works under the hood. Like C loops and ifs are made of jumps and compares in assembly.
- eimrine 4y ago> jumps <irony>goto is considered harmful</irony>
- P_I_Staker 4y agoIf you do it correctly it can help demystify function call/return and pointers... although, as I understand it pointers are NOT just addresses in memory.
- markus_zhang 4y agoI think there is also the type of the data it points to, or maybe at least the length of the data it points to? I was wondering how come OS understands that say it only needs to grab 4 bytes for an int32_t, but 8 for an int64_t, I guess such information is included.
- ksherlock 4y agoGenerally, the CPU has instructions for loading memory into registers and storing registers into memory and they specify how much memory to read/write. eg: ARM (32) has LDR (32-bit), LDRH (16-bit), and LDRB (8-bit) 68K has MOVE.L (32-bit), MOVE.W (16-bit), MOVE.B (8-bit) There are also some architectures (early Alpha for example) where memory can only be read in aligned 32-bit chunks or aligned 64-bit chunks. If you want to read 8 bits... well the compiler will generate a 32-bit read and then shift/mask the data to get the 8-bits that you care about.
- markus_zhang 4y agoOh you are right, I absolutely forgot the translation part I read about tons of time.