Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Sphinx C-- source code available (Announce)

posted by georgpotthast(R) Homepage, Germany, 21.10.2015, 17:55

I assume it will not support PnP BIOS. But this is the code that makes the ROM-BIOS image structure. Maybe that gives you an answer:

#ifdef __ROM__
#ifdef __SMALL__
dword bakstack=0;
#endif
//static byte sign[2]={0x55,0xAA};
//static byte sizerom=__ROMSIZE/512;
__startupproc()
inline
{
$DW 0xAA55
$DB __ROMSIZE/512
#ifdef __SMALL__
ES=__DATASEG;
DI=0;
$cld
$cli
$db 0xB8 //mov ax,stackstart
__stackval:
__stackstart:
$dw 0
AX><SP;
$stosw
AX=SS;
$stosw
AX=ES;
SS=AX;
$sti
$db 0xBE //mov si,startdata
__startdata:
$dw 0
DS=CS;
$db 0xBE //mov cx,sizedata/2
__sizedata:
$dw 0
$rep $movsw
#else
AX=__DATASEG;
#endif
DS=AX;
main();
#ifdef __SMALL__
$cli
SP=DSWORD[0];
SS=DSWORD[2];
$sti
#endif
$retf
#undef __ROMSIZE
#undef __DATASEG
}
#endif

 

Complete thread:

Back to the forum
Board view  Mix view
15192 Postings in 1365 Threads, 250 registered users, 15 users online (0 registered, 15 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum