2 ms·
You still need to learn a lot of stuff. Problem is that it isn't portable. You have differences in architectures but most are quite similar if your goal is to m
by raxxorraxor 4y ago
You still need to learn a lot of stuff. Problem is that it isn't portable. You have differences in architectures but most are quite similar if your goal is to make a program work instead of it being efficient for which you need deep knowledge about an architecture and its quirks. A few different mnemonic and register names is the far smaller problem.
But you also need to know about calling conventions of your operating system if you want to do any form of system call, which you very likely want to. Which registers supply arguments, which registers have to be saved, addresses of system functions which can change with OS or kernel version. You also need to learn what these function do. How would anyone know that writing a 48 into your accumulator and calling interrupt at address 80 opens a socket on Linux?
Thinking about this again makes assembly seem like a terrible, terrible idea...
To start with I would either recommend x86_64 for either Windows and Linux. I would prefer Linux here but I believe UEFI for example uses the Windows calling conventions, so taking a look at that might be practical. But these combinations usually offer the most learning helpers.
Usually you should only cause general protection faults at worst if you have something newer than a 386. But no guarantee...