pretty sure you already have your concrete concepts about the title already. but i just wanna impart my opinion about those coz there are notion and stereotypes about assembly language being not portable.
and the definition of that was true when the nascent computer hobbyist scene are bombarded with different chips. and with that, programmers had to write assembly language FOR each chip that are remotely similar to each other.
and then the sorcery of high level languages appeared (but that's for another thread).
so source level portability in assembly language.
pretty much the chips are collated now into a similarity and commonality. assembly instruction are still the same (unless it's arm & arm64). and this is even facilitated by the existence of old libraries that existed since brian kernighan wrote the hello world c program.
so in my opinion, source code portabilty is when you get a source, assemble it successfully in an operating system, mod the source by 1% or even .5% and then assemble it successfully in another operating system.
the same codebase being assembled in operating systems running under a similar or compatible hardware/chip.
this, again, is possible if you use libraries, not for the whole functionality of your code, but for certain functions (which were interrupts in DOS) that is present in the operating systems that you're building on.
coz int 0x80 or something like that is not ExitProcess() @ source level, right? (you get the point).
And compiled level portability??
you get a virtual machine/framework, write programs to run solely under the virtual machine's or framework constraints, develop ports of that virtual machine/framework to all of the available OS's and install those ports and the programs written for the virtual machine/framework will run in all architectures. and by all architectures i mean the different hardware on the bottom of the OS's that you want your virtual machine/framework to be installed in.
i think that the original .NET Framework's vision was to use old computers and mainframes coz they'll just make a .NET framework for 16 bit Computers or Mainframes and run C# or Visual Basic.NET programs in 16-bit Computers or Mainframes right?
~~ alCoPaUL [GIMO][As][aBrA][NPA][b8][BCVG][rRlf]