Re: [Freedos-devel] mode.com
Hi! MODE does indeed have verbose errorlevels in codepage handling: With FreeCOM, you can display them like this: C:\>mode con cp prepare=((437) c:\freedos\cpi\ega.cpx) MODE: No compatible FreeDOS DISPLAY driver loaded. Syntax example: ... DISPLAY CON=(VGA,437,1) C:\>echo %errorlevel% 101 Other MODE functions are more boring in their errorlevels, for example they just produce 0 if okay and 1 or 255 (-1) on error. Regards, Eric Mode is a typical example. At https://gitlab.com/FreeDOS/base/mode/-/blob/master/DOC/MODE/MODE.TXT there is a big explanation what the original mode.com from 1995 can do for me. But the last change was in 2015 - and as it looks like a lot of things were changed without a documentation, among others FD has no park function. If I understand this right, the actual errorlevels should be like this (found them at modecp.c - hopefully correct?) MODE has the following ERRORLEVEL / EXITCODES [1]: generic: 100: INTERNAL ERROR: size for prepared table too small 101: No compatible FreeDOS DISPLAY [2] driver loaded. Syntax example: ... DISPLAY [2] CON=(VGA,437,1) 102: File not found 103: Error specifying codepage / buffer 104: Error: selected buffer not present 105: Syntax error check codepage: 26: Active codepage was never set 27: Device read codepage error prepare codepage: 27: Codepage was not found in CPI file 29: Could not get codepage info from file (or XMS troubles) 31: specified CPI file is damaged (or XMS troubles) end prepare codepage: 31: INTERNAL ERROR: End prepare without Begin prepare select codepage: 26: Specified codepage was not found in file 27: KEYB failed to change codepage 29: Device select codepage failed (or XMS troubles) 31: Device select codepage error (I think 0 should be added too) The orignal looks as follows: Errorlevels returned by MODE are as follows: 0No error 115Serial port does not exist (either for COMn: or LPTn:=COMx) 117No hard disk(s) found to park 118Specified video mode is not supported on this machine 162Insufficient memory (MODE requires about 6K of memory) 241Parameter out of range (e.g. time value, LPT port number etc) 242Cannot have 43-line or 50-line modes with modes other than CO80 243Unknown baud rate 244Must specify both DELAY= and RATE= for typematic setting 246More than one command or command type was given 255Incorrect usage syntax (all usage syntax errors) Question: Which are the correct errorlevels? ___ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel
Re: [Freedos-devel] I wish I had a boot.log file
Hi Tom, > On Mar 26, 2023, at 5:57 AM, tom ehlert wrote: > >> For >> instance, vecho (which displays many user messages, like “Welcome to >> FreeDOS”) don’t output text the same way as other programs and do not get >> captured at present. > > I don't know how and why vecho displays text different. However it > could "display" the text twice: once in the complicated way, and once > in a "do nothing" way intercepted by your logger. Thats easy enough for me to explain. :-) Most stuff uses DOS interrupt calls to output text. In turn DOS itself displays that text through the BIOS Teletype Output [1] function (int 0x10, function 0x0e). VECHO (part of V8Power Tools) does not use that interrupt function to display text. Those programs uses multiple BIOS interrupts to move the cursor around[2][3], display text[4] and scroll the screen[5]. They use those functions (instead of the simple Teletype output) to support windowed like behavior needed by the FreeDOS installer. It allows them to write text inside “window” boxes and such things. A more general method will be to just grab stuff as it scrolls off the screen, or when the screen is cleared. Then as long as a program is not directly managing video memory for the scroll, any text (even if written directly to video memory) that is displayed will be captured. But, I definitely plan on adding a “add to log” function in the driver. This will permit the interface program to directly write messages and allow redirecting individual program output to the log. All of which will be very useful in the FreeDOS installer and permit capturing output from programs like FDISK for trouble shooting installation problems. > >> There is a lot of other stuff that I’d like to get done with Logger >> for the T2304 Interim Build. But, those are not critical functionality. > > cool would be a single logger.exe, useful both as > > device=logger.exe > > and > c:>logger.exe > later For now, I’m going with two files, the driver a SYS and interface a COM. device[high]=logger.sys and c:\logger.com But, there are a couple of advantages to just having a single EXE. So eventually, it will most likely move to that file format. > Tom :-) Jerome [1] - https://fd.lod.bz/rbil/interrup/video/100e.html#140 [2] - https://fd.lod.bz/rbil/interrup/video/1002.html#121 [3] - https://fd.lod.bz/rbil/interrup/video/1003.html#122 [4] - https://fd.lod.bz/rbil/interrup/video/1009.html#133 [5] - https://fd.lod.bz/rbil/interrup/video/1006.html#130 > > ___ > Freedos-devel mailing list > Freedos-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freedos-devel ___ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel
Re: [Freedos-devel] I wish I had a boot.log file
> For > instance, vecho (which displays many user messages, like “Welcome to > FreeDOS”) don’t output text the same way as other programs and do not get > captured at present. I don't know how and why vecho displays text different. However it could "display" the text twice: once in the complicated way, and once in a "do nothing" way intercepted by your logger. > There is a lot of other stuff that I’d like to get done with Logger > for the T2304 Interim Build. But, those are not critical functionality. cool would be a single logger.exe, useful both as device=logger.exe and c:>logger.exe later Tom ___ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel