16-bit Code > 64K
Posted: Mon Mar 23, 2009 9:02 pm
I'm trying to write a second stage boot loader that basically runs in Real Mode.
I have no problems with handling data so far, but I can see I'm going to have limitations with the code itself.
I need to add code for reading partitions, initializing some hardware, reading and maybe writing files and detection routines for doing stuff more transparent from specific hardware. I'm sure that there will be soon a point where this program will exceed the 64K.
I'm pretty much in the darkness in things like whether the assembler (YASM or NASM) will help me somehow manage far calls and far jumps, etc., or what part of it I should keep track of manually, as I have only ever made small 16-bit binary programs or EXE files using compilers, as well as some regular 32 and 64-bit code.
Does anybody know effective ways to make such a program (raw 16-bit code) stable, manageable, and most importantly, fully reachable for any arbitrary parts of the program itself, no matter if it spans several 64K segments?
I have no problems with handling data so far, but I can see I'm going to have limitations with the code itself.
I need to add code for reading partitions, initializing some hardware, reading and maybe writing files and detection routines for doing stuff more transparent from specific hardware. I'm sure that there will be soon a point where this program will exceed the 64K.
I'm pretty much in the darkness in things like whether the assembler (YASM or NASM) will help me somehow manage far calls and far jumps, etc., or what part of it I should keep track of manually, as I have only ever made small 16-bit binary programs or EXE files using compilers, as well as some regular 32 and 64-bit code.
Does anybody know effective ways to make such a program (raw 16-bit code) stable, manageable, and most importantly, fully reachable for any arbitrary parts of the program itself, no matter if it spans several 64K segments?