Johnson Lam escreveu:
I've an idea, as the official MEM of FreeDOS, is it good to include the FreeCOM and Kernel information also?
I got a bit annoy because when I want to check Kernel version I have to reboot, and I don't prefer to have another tool just check for Kernel and FreeCOM.
I wrote some time ago a small program to show FreeDOS kernel version. It really should be part of Freecom ;-) it was tested in BC31. I have the .exe if you want it
#include <stdio.h> #include <string.h> #include <dos.h>
int main(void) { int i; char far *p; union REGS regs;
regs.x.ax = 0x3000; int86(0x21, ®s, ®s); /* check oem-id */ if (regs.h.bh==0xfd){ printf("FreeDOS detected: Int21/30 says OEM-ID=0fdh\n"); printf(" Dos verion = %d.%d\n",regs.h.al,regs.h.ah); printf(" Kernel version %d.%d.%d\n",regs.h.ch,regs.h.cl,regs.h.bl); regs.x.ax = 0x33ff; int86(0x21, ®s, ®s); /* get version string */ p = (char far*)MK_FP(regs.x.dx,regs.x.ax); if ( *(int far*)p == 0x7246) /* fast string checking "Fr" */ printf(" %Fs\n",p); }else{ printf("NOT FreeDOS: Int21/30 says OEM-ID=0%02xh\n",regs.h.bh&0xff); return !(regs.h.bh==0xfd); /* error level */ } return 0; }
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel