Sphinx C-- source code available (Announce)
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:
- Sphinx C-- source code available - georgpotthast, 19.10.2015, 19:21 (Announce)
- Sphinx C-- source code available - Guti, 20.10.2015, 17:27
- Sphinx C-- source code available - georgpotthast, 20.10.2015, 20:58
- Sphinx C-- source code available - RayeR, 20.10.2015, 19:17
- Sphinx C-- source code available - georgpotthast, 20.10.2015, 21:03
- Sphinx C-- source code available - RayeR, 20.10.2015, 22:26
- Sphinx C-- source code available - georgpotthast, 21.10.2015, 17:55
- Sphinx C-- source code available - RayeR, 21.10.2015, 18:30
- Sphinx C-- source code available - georgpotthast, 21.10.2015, 17:55
- Sphinx C-- source code available - RayeR, 20.10.2015, 22:26
- Sphinx C-- source code available - georgpotthast, 20.10.2015, 21:03
- Sphinx C-- source code available - Guti, 20.10.2015, 17:27