L1VM - endianess
Endianess in CS means the order in wich the bytes of data types (int16, int32, int64 and double) are stored: Wikipedia endianess
So there are little-endianess CPUs like x86, ARM and Z80. Big-endianess CPUs are PowerPC, 6800 and 68000.
How does my L1VM handle this? The bytecode of my L1VM is in big-endian order. It is converted to the CPU architecture endianess while loading the whole bytecode with the load function.
So there is “zero” handling it on run time!
And for the most programs running on my VM you even don’t need to know the CPU endianess.
I did find some information about endianess handling of Node.js compiling WebAssembly: Node.js WebAssembly
So endianess is handled at run time. And on PowerPC and the z CPU there are special opcodes to load/store data in WebAssembly little-endian order.
On other CPUs a conversion code has to be run.
So my L1VM uses a much simpler solution to handle endianess.