Subj : Re: Quest: Rebuilding c0t.obj for 16-bit BC++ OS loader... To : borland.public.cpp.borlandcpp From : "lewi" Date : Sat Jul 19 2003 06:50 pm Ok an update now... I was able to get the code below to work(by using org 100h and using opcode asm defines) but I know it isn't what I did a year ago and also I only can make a jump to _main not call it through opcode asm defines and later when I add the entering PMode code to the asm I need to have returned from _main and start after the call to _main... Also a near call _main opcode will be better than a far call... The asm code... extrn _main ..model tiny ..code org 100h _startup: mov ax, cs mov ds, ax DB 0EAh ; far jump DD _main ; 32-bit offset DW 2000 jmp short $ ;Continue on adding 0 to fill rest of the sector. ;db 246 dup (0) end _startup The C code [Note: if you dont know this will reset video mode and write "..." to the top left of screen...]... extern "C" void main() { _asm { mov ax, 0x0003 int 0x10 mov ah, 0x0e mov al, '.' mov bx, 0x004f int 0x10 int 0x10 int 0x10 } for(;;); } The cmdlines... c:\bc31\bin\tasm.exe /la /q c0Start.asm, c0tStart.obj c:\bc31\bin\bcc.exe -c -mt -oOSLoad.obj OSLoad.cpp c:\bc31\bin\tlink.exe /n /3 /m /s /t c0tStart.obj OSLoad.obj, OSLoad.com Any more help... .