www.beck-ipc.com

@CHIP-RTOS C Library - BIOS API


BIOS_ExecuteExt

Execute a shell command with feedback.

int BIOS_ExecuteExt ( const char far *command_line,
                      void far *report);

Parameters

command_line

Pointer to a null terminated command line.

report

Output parameter: Object in user memory where certain commands provide feedback.

Return Value

0 - Successful
+1 - Internal command had a problem
-1 - Attempt to launch a DOS program by this name failed

Comments

This function passes the command string to the command interpreter and specifies with the report argument an object where the caller desires feedback be written by the invoked command.

Internal commands are processed in the current task, external commands (.exe files) are loaded and executed in a new task.

Only certain commands will make use of this provided report argument. The structure of the referenced object is specific to each command which provides feedback. These commands are:

  • COPY - report data structure CmdFeedbackS

  • CHKDSK - report data structure DiskStatS

  • CV - report data structure CvStatS

  • FORMAT - report data structure CmdFeedbackS

  • external commands (.exe files) - The invoked program can access the object at report using the progParentData() function.    The format of this object is user defined, however the first two integer values must correspond to the the ProgFeedbackS data structure.   For compatibility with future @Chip-RTOS versions, the first integer (unsigned) of this user defined structure should be set to the size of this user structure. The second integer (signed) will be set to the program's DOS exit code value. The remainder of the structure following these two required integer values can be what ever the user desires.

The report argument is ignored by any other commands.   However, for compatibility with future @Chip-RTOS versions this should not be relied upon.

Caution:
    When another program is invoked using this API, the data area referenced by report must persist until that invoked program terminates. The @Chip-RTOS will write the program's exit code to the second 16 bit location within this referenced memory when the invoked program terminates. Note that due to DOS exit API limitations, this exit code is truncated to 8 bits and then sign extended.

See Also

RTOS API

This library function invokes a RTOS software interrupt.   Refer to this RTOS API function's documentation for more details.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV1.35V1.35

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.18

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document