os-tutorial
os-tutorial copied to clipboard
32 bit NASM compilability.
Does this tutorial assume a 32 bit environment, are the instructions mostly the same in 64 as well?
i use ubuntu 64 bit and it compiles just fine
does the make file have to use nasm? im trying to cross compile this using tools available through termux on android so its a bit hard to find some apps needed. XD
@ChanForPres It appears that this tutorial assumes the follower is using an x86_64 64-bit Mac environment. The kernel that is described in the tutorial is an i386 32-bit kernel. The tutorial also describes how to build 32-bit tools for building a 32-bit kernel in a 64-bit environment. I am using a 64-bit Linux environment and I have been able to follow this tutorial with no real issues so far.
@Myersj281 The assembler source in the tutorial uses nasm syntax (which is actually a "modern" version of masm [The Microsoft Macro Assembler] syntax. There are other assemblers which use this syntax but the source might some tweaking of the assembler directives (non cpu instructions) to get them to work. If the assembler uses AT&T syntax (like gas), then the assembler source would need to be completely re-written. I'm not sure what x86 assemblers are available for use with Android. So, no, you do not need to use nasm but no matter what tools you choose to use, you will need to do some research (google) to modify this tutorial to work in an Android termux environment. The tutorial, as written, makes the assumptions that you are able to assemble 32-bit i386 assembly code, compile C code in 32-bit elf binary format, and run the binary in an emulated i386 32-bit environment (qemu).