Re: [Freedos-devel] mode.com

2023-03-26 Thread Eric Auer



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] mode.com

2023-03-21 Thread Paul Dufresne via Freedos-devel
 Le sam., 18 mars 2023 10:49:48 -0400   a écrit 

 > Hi all,
 > 
 > sometimes trying to write FD help makes me crazy.
 > 
 > Mode is a typical example. At 
 > https://gitlab.com/FreeDOS/base/mode/-/blob/master/DOC/MODE/MODE.TXT
[...]
 > If I understand this right, the actual errorlevels should be like this 
 > (found them at modecp.c - hopefully correct?)
 >

Testing a bit, the only code error I get is 1... (not speaking of 0 for 
success). 



___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] mode.com

2023-03-19 Thread Ralf Quint

On 3/18/2023 7:49 AM, wilhelm.spi...@mnet-online.de wrote:


Hi all,

sometimes trying to write FD help makes me crazy.

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?)




...


Question: Which are the correct errorlevels?


It looks to me as if you have the lists of error level from two 
different MODE programs. The first shows error levels regarding setting 
screen/video modes, while the later refers to results setting the 
serial/parallel port to specific values.



Ralf

___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] mode.com

2023-03-18 Thread wilhelm . spiegl
Hi all, 

sometimes trying to write FD help makes me crazy. 

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?

Your mousepusher

Willi
 

Links:
--
[1]
file:///F:/htmlhelp-110/HTMLhelp-110-english12k/en/hhstndrd/batch/errorlvl.htm
[2]
file:///F:/htmlhelp-110/HTMLhelp-110-english12k/en/hhstndrd/base/display.htm___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel