I am new to this subject so forgive my ignorance?
I just started learning assembly for x86 processors on my linux system. I wrote a simple bootloader which worked but was specific to x86. Also I understand the registers etc are very different for intel and amd or 32 bit and 64 bits. So how is an operating system or application written for various architectures at the same time. Yes applications are operating system specific but shouldn't they be cpu specific also. Like when they are compiled into machine code, they need to be made for one type of processor(since registers etc are different for different architectures)? So how do they do it?
Or is it possible that all x86 has common registers and instruction set like athlon, pentium, i3, i5 etc and it is only different between x86 and 64 bit architecture?