www.beck-ipc.com

@CHIP-RTOS - BIOS Interface Documentation


    IPC@CHIP® Documentation Index

BIOS Interrupts

Here are the interface definition for the BIOS Interrupts.

The system BIOS in a regular PC offers many services, only a subset of which is required in embedded systems.   This subset is described here.

Unsupported BIOS functions are handled by a default handler which issues a message to the console.

Some additional functions not found in a normal PC BIOS are provided for your convenience.


BIOS API Data Structures

BIOS Interrupt 0x10 Services

  • 0x00:_Get char from standard input
  • 0x01:_Check if a character is available from std in
  • 0x08:_Read character at cursor
  • 0x09:_Write character at cursor
  • 0x0E:_Teletype output
  • 0x0F:_Get video state
  • 0x12:_Video subsystem configuration

  • BIOS Interrupt 0x11 Services

  • 0xXX:_Get equipment list

  • BIOS Interrupt 0x16 Services

  • 0x00:_Get char from standard input
  • 0x01:_Check if a character is available from std in

  • BIOS Interrupt 0x1A Services

  • 0x00:_Get clock count since midnight

  • BIOS Interrupt 0xA0 Services

  • 0x00:_Get serial number
  • 0x01:_Get IP address of the Ethernet interface
  • 0x02:_Set IP address of the Ethernet interface
  • 0x03:_Get IP subnet mask of the Ethernet interface
  • 0x04:_Set IP subnet mask
  • 0x05:_Get IP gateway
  • 0x06:_Set IP default gateway
  • 0x07:_Execute a command shell command
  • 0x08:_Set timer 0x1C's interval
  • 0x09:_Set timer interrupt 0xAF's interval
  • 0x0A:_Get disk space info
  • 0x0B:_Execute a command shell command with feedback.
  • 0x0C:_Close a specified disk drive
  • 0x11:_Set STDIO focus
  • 0x12:_Get bootstrap version number
  • 0x13:_Get @CHIP-RTOS version number
  • 0x14:_Set batch file execution mode.
  • 0x15:_Continue batch file execution in BATCHMODE 1
  • 0x16:_Get information about the @CHIP-RTOS features
  • 0x17:_Get MAC address of the Ethernet interface
  • 0x18:_Power save
  • 0x19:_Change level for configuration server.
  • 0x20:_Install a user fatal error handler
  • 0x21:_Rebooting the IPC@CHIP®
  • 0x22:_Get version string
  • 0x23:_Insert an entry in chip.ini
  • 0x24:_Find an entry in chip.ini
  • 0x25:_Set the Stdio focus key
  • 0x26:_Get the IPC@CHIP® device name
  • 0x27:_Suspend/Resume System Servers
  • 0x28:_Fast Findfirst
  • 0x29:_Fast Findnext
  • 0x2A:_Long File Name (LFN) Findfirst
  • 0x2B:_Long file name (LFN) Findnext
  • 0x2C:_Long file name (LFN) FindDone
  • 0x2D:_Get system servers state
  • 0x2E:_Install a user interrupt not supported handler
  • 0x30:_Fast Finddone
  • 0x31:_Detect Ethernet link state
  • 0x32:_Set a memory gap between the loaded DOS programs
  • 0x33:_Set stdin/stdout channel
  • 0x34:_Get stdin/stdout settings
  • 0x35:_Install user specific stdio handlers
  • 0x36:_Install a System Server Connection Handler function
  • 0x37:_Enable/Disable File sharing
  • 0x38:_Get file name by handle
  • 0x3A:_Get long file name by handle
  • 0x3B:_Set ethernet operation mode
  • 0x3C:_Set server credentials
  • 0x40:_Install a UDP Cfg Callback
  • 0x41:_Insert an entry in INI file
  • 0x42:_Find an entry in INI file
  • 0x45:_Write persistent User Data
  • 0x46:_Read persistent User Data
  • 0x48:_Assign RTOS memory block to task
  • 0x50:_Get IP address of the PPP Server
  • 0x55:_Get IP address of the PPP Client
  • 0x56:_Get vsprintf address
  • 0x57:_Allocate Memory from fast memory pool
  • 0x58:_Get MAC address of the second Ethernet controller
  • 0x59:_Set fatal error record
  • 0x5A:_Check for installed license


  • Interrupt 0x1A service 0x00:     Get clock count since midnight

    Returns the number of clock ticks since midnight.
    The frequency of the clock is 18.2 Hz (e.g. 54.945 ms per tick).

    Parameters

    AH
    Must be 0.

    Return Value

    Returns the 32 bit tick count in CX (high word) and DX (low word)
    If an overflow occurred since the last call, AX is set to 1.

    Comments

    Please note that the overflow indication returned in register AX can not be relied upon if several tasks are using this service.   This function is not reentrant!

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0x11 service 0xXX:     Get equipment list

    Get the BIOS equipment list

    Return Value

    Returns the equipment list in AX, currently 0x013C.   This bit field indicates:

      bit 8:       1 : No DMA
      bit 6-7:   00: One floppy
      bit 4-5:   11: 80x25 mono
      bit 2-3:   11: system ram
      bit 1:       0 : no 8087
      bit 0:       0 : no disk drives

    Comments

    This function is needed to make sure an application finds no 8087 coprocessor so it can load a floating-point emulator.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0x10 service 0x00:     Get char from standard input

    Get a character from std in, wait if none available

    Parameters

    AH
    Must be 0.

    Return Value

    Returns input character in AL
    Return at DX the source stdin channel: 1: EXT, 2: COM, 4: Telnet, 8: User channel

    Comments

    Please note that AH does not contain the scan code, but is always 0.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0x10 service 0x01:     Check if a character is available from std in

    Check if a character is available from standard input

    Parameters

    AH
    Must be 1.

    Return Value

    AX=1 if a character is available, AX=0 and zero-flag is cleared if no character is available.

    Comments

    Please note that AH does not contain the scan code, but is instead always 0.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0x10 service 0x08:     Read character at cursor

    Read character at cursor position, always returns 0

    Parameters

    AH
    Must be 0x08

    Return Value

    AX = 0. (This function exists only for PC compatibility.)

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0x10 service 0x09:     Write character at cursor

    Write character to the standard output.

    Parameters

    AH
    Must be 0x09

    AL
    Character to write

    Return Value

    Returns nothing.

    Comments

    This function exists only for PC compatibility. At old DOS PCs this functions writes a character with specified attributes at the current cursor position. At the @CHIP-RTOS this function works in the same way as service 0x0E

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.20V1.20V1.20V1.01V1.00

    Top of list
    Index page
    Interrupt 0x10 service 0x0E:     Teletype output

    Write a character to the standard output.

    Parameters

    AH
    Must be 0x0E

    AL
    Character to write

    Return Value

    Returns nothing.

    Comments

    This call returns immediately after space becomes available in the transmit ring buffer.
    (The data transfer from the transmit ring buffer to the hardware transmitter is interrupt driven.)

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0x10 service 0x0F:     Get video state

    Get video state

    Parameters

    AH
    must be 0x0F

    Return Value

    number of screen columns, 80 in AH
    mode currently set, 3 in AL
    mode currently display page ,0 in BH

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0x10 service 0x12:     Video subsystem configuration

    Video subsystem configuration

    Parameters

    AH
    must be 0x12

    Return Value

    AX=0x0012
    BX=0
    CX=0

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0x16 service 0x00:     Get char from standard input

    Get a character from std in, wait if none available

    Parameters

    AH
    Must be 0.

    Return Value

    Returns character in AL
    Returns at DX the source stdin channel of the character: 1: EXT , 2: COM , 4: Telnet, 8: User channel

    Comments

    Please note that AH does not contain the scan code, but is always 0.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0x16 service 0x01:     Check if a character is available from std in

    Check if a character is available from standard input

    Parameters

    AH
    Must be 1.

    Return Value

    AX=1 if a character is available, AX=0 and zero-flag is cleared if no character is available.

    Comments

    Please note that AH does not contain the scan code, but is always 0.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x00:     Get serial number

    Get the serial number of the IPC@CHIP® device

    Parameters

    AH
    Must be 0.

    Return Value

    AX=low word, BX=high word of IPC@CHIP® serial number

    CX=low word, DX=high word of BECK product serial number (if not available CX=DX=0)
    SI contains BECK product hardware revision number HighByte and LowByte (if not available SI=0)
    DI contains SCxxx hardware revision number HighByte and LowByte (if not available DI=0)

    Comments

    The serial number is a 24 bit value.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.10V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x01:     Get IP address of the Ethernet interface

    Get the IPv4 address as a string.

    Parameters

    AH
    Must be 1.

    ES:DX
    Pointer to a 16 byte memory area where the IPv4 address is to be stored as a null terminated string.

    Beck C-Library Usage

    Get_IPConfig()

    Related Topics

    Ethernet IPv4 address initial value
    Ethernet IPv6 address initial value
    Convert ASCII IPv4 address to binary

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00n/aV0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x02:     Set IP address of the Ethernet interface

    Set the Ethernet interface's IPv4 address based on the supplied string.

    Parameters

    AH
    Must be 2.

    ES:DX
    Pointer to a 16 byte memory area where the IPv4 address is stored as a null terminated string.

    Comments

    This API is thread safe and reentrant.

    A new IP configuration must be activated by calling the ipeth command
    or by calling the TCP/IP API interrupt 0xAC service 0x71 (RECONFIG_ETHERNET).

    Beck C-Library Usage

    Set_IPConfig()

    Related Topics

    TCP/IP API RECONFIG_ETHERNET service
    Ethernet IPv4 address initial value
    Ethernet IPv6 address initial value
    IPv4 address IP command line
    Convert binary IPv4 address to ASCII dotted decimal

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00n/aV0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x03:     Get IP subnet mask of the Ethernet interface

    Get the IPv4 subnet mask as a string.

    Parameters

    AH
    Must be 3.

    ES:DX
    Pointer to a 16 byte memory area where the IP subnet mask is to be stored as a null terminated string.

    Beck C-Library Usage

    Get_IPConfig()

    Related Topics

    Ethernet IP subnet mask initial value

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00n/aV0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x04:     Set IP subnet mask

    Set the IPv4 subnet mask to the string supplied

    Parameters

    AH
    Must be 4.

    ES:DX
    Pointer to a 16 byte memory area where the IP subnet mask is stored as a null terminated string.

    Comments

    This API is thread safe and reentrant.

    A new IP configuration must be activated by calling the ipeth command
    or by calling the TCP/IP API interrupt 0xAC service 0x71 (RECONFIG_ETHERNET).

    Beck C-Library Usage

    Set_IPConfig()

    Related Topics

    Ethernet IP subnet mask initial value
    NETMASK command line
    TCP/IP API documentation

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00n/aV0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x05:     Get IP gateway

    Get the IPv4 gateway as a string.

    Parameters

    AH
    Must be 5.

    ES:DX
    Pointer to a 16 byte memory area where the IPv4 gateway is to be stored as a null terminated string.

    Beck C-Library Usage

    Get_IPConfig()

    Related Topics

    Ethernet default gateway initialization
    GATEWAY command line
    ADD_DEFAULT_GATEWAY API function
    PPP server default gateway initialization

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00n/aV0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x06:     Set IP default gateway

    Set the IPv4 gateway to the string supplied

    Parameters

    AH
    Must be 6.

    ES:DX
    Pointer to a 16 byte memory area where the IP gateway is stored as a null terminated string.

    Comments

    This API is thread safe and reentrant.

    A new IP configuration must be activated by calling the ipeth command
    or by calling the TCP/IP API interrupt 0xAC service 0x71 (RECONFIG_ETHERNET).

    The TCP/IP stack of the IPC@CHIP® supports only one valid default gateway for all device interfaces:
      Ethernet, pppserver and pppclient.

    The ipcfg command shows the current default gateway.

    Beck C-Library Usage

    Set_IPConfig()

    Related Topics

    Ethernet default gateway initialization
    GATEWAY command line
    ADD_DEFAULT_GATEWAY API function
    PPP server default gateway initialization

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00n/aV0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x07:     Execute a command shell command

    Passes a command string to the command interpreter.

    Parameters

    AH
    Must be 7.

    ES:DX
    Pointer to a null terminated command line.

    Return Value

    AX = 0 success
    AX = +1 error (Internal command had a problem!)
    AX = -1 error (loading EXE file failed!)

    Comments

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

    Beck C-Library Usage

    BIOS_Execute() - Execute a command

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x08:     Set timer 0x1C's interval

    Defines the interval in milliseconds for timer interrupt 0x1C.

    Parameters

    AH
    Must be 0x08.

    BX
    Interval in milliseconds

    Comments

    Use setvect(0x1c, my_function) to change the interrupt vector.

    Define your routine as:
            void interrupt my_function(void)

    You must restore the old timer interrupt vector before ending the program.
    Your interrupt routine must be as short as possible without any waiting or endless loops.
    Avoid the usage of large C-library functions such as printf.

    Related Topics

    chip.ini TIMER 0x1C configuration

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x09:     Set timer interrupt 0xAF's interval

    Defines the interval in milliseconds for timer interrupt 0xAF.

    Parameters

    AH
    Must be 0x09.

    BX
    Interval in milliseconds

    Comments

    Use setvect(0xAF, my_function) to change the interrupt vector.

    Define your routine as:
            void interrupt my_function(void)

    You must restore the old timer interrupt vector before ending the program.
    Your interrupt routine must be as short as possible without any waiting or endless loops.
    Avoid the usage of large C-library functions such as printf.

    Related Topics

    chip.ini TIMER 0xAF configuration

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x0A:     Get disk space info

    Reports disk size and space.

    Parameters

    AH
    Must be 0x0A.

    AL
    Drive (0 current drive, 1=A:,..,26=Z:)

    ES:BX
    Pointer to BiosDiskInfo data structure containing disk drive statistics which will be filled in by this API call.

    Comments

    This API is provided as an alternative to the DOS interrupt 0x21 service 0x36 "Get Disk Free Space" service.   For large drives whose sector counts exceed 0xFFFF, this alternative API provided here should be used.

    Beck C-Library Usage

    BIOS_Disk_Info() - Get disk information
    BIOS_Disk_Space() - Get disk space

    Related Topics

    DOS service 0x36 Get Disk Free Space

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.23V1.23V1.23V1.16V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x0B:     Execute a command shell command with feedback.

    Passes a command string to the command interpreter.

    Parameters

    AH
    Must be 0x0B.

    ES:BX
    Pointer to a null terminated command line.

    DX:CX
    Pointer to a command specific feedback data structure.

    Return Value

    AX = 0 success
    AX = +1 error (Internal command had a problem!)
    AX = -1 error (loading EXE file failed!)

    Comments

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

    The report structure referenced by DX:CX will be output to by only the following select commands:

    • COPY - report data structure CmdFeedbackS

    • CHKDSK - report data structure DiskStatS

    • 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 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 DX:CX argument is ignored by any other command.

    Caution:
      When another program is invoked using this API, the data area referenced by DX:CX 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.

    Beck C-Library Usage

    BIOS_ExecuteExt() - Execute extended

    Supported since or modified in @CHIP-RTOS version

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

    Top of list
    Index page
    Interrupt 0xA0 service 0x0C:     Close a specified disk drive

    The specified disk drive will be closed.

    Parameters

    AH
    Must be 0x0C.

    ES:BX
    Pointer to a null terminated ASCII drive specifier, for example "B:".

    CX
    Bit field to request special actions:
    • BDC_SAVE_1_FAT = 0x1 - Save only one copy of the File Allocation Table (FAT) in order to save time.
    • BDC_ABORT_READ_WRITE = 0x2 - Cut short any read/write activity currently in progress, so that drive can be closed with a minimum of delay.

    These bit flags may be OR'ed together.   Undefined bits should be set zero for compatibility with future versions.

    Return Value

    AX register contains status:
      AX = 0 - Successful
      AX = -1 - Invalid path or drive was already closed.

    Comments

    The ASCII drive specifier in [ES:BX] cannot be empty.   (No provision is offered by this API to specify a default drive.)

    Beck C-Library Usage

    BIOS_Disk_Close() - Close disk

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      n/an/an/aV1.40V1.40

    Top of list
    Index page
    Interrupt 0xA0 service 0x11:     Set STDIO focus

    Set the focus of STDIO to either console, application or both

    Parameters

    AH
    Must be 0x11

    AL
    1: command shell (console), 2: Application, 3: both

    Comments

    If your application requires input from the user, you should set the focus to the application.
    You should assure that only one application requests input from STDIO.
    The user can change the focus by using the focus hot key (default Ctrl-F).
    Changing the focus clears the serial input and output queues immediately.

    Important :
      All buffered incoming and outgoing characters in the internal serial
      send and receive queues are lost after this call.

    Related Topics

    Focus key definition

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x12:     Get bootstrap version number

    Get the version number of the bootstrap loader.

    Parameters

    AH
    Must be 0x12

    Return Value

    AX=version number, AH is major version, AL is minor version.

    Comments

    Example:
      If the function returns 0x0100 in AX, this means that you have version 1.00.

    Related Topics

    Get @CHIP-RTOS version number

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x13:     Get @CHIP-RTOS version number

    Get the version number of the @CHIP-RTOS.

    Parameters

    AH
    Must be 0x13

    Return Value

    AX=version number, AH is major version, AL is minor version.
    If DX is set it is a Beta version.

    Comments

    Example:
      If the function returns 0x0100 in AX, this means that you have version 1.00.

    Related Topics

    Get bootstrap version number
    Get version string
    Get device name

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x14:     Set batch file execution mode.

    Sets the batch file execution mode of programs for either concurrent or sequential execution.
    See BATCHMODE initialization documentation for details.

    Parameters

    AH
    Must be 0x14

    AL

    AL = 0:    (Selects default BATCHMODE=0, = concurrent)

    AL = 1:    (Sets BATCHMODE=1, = sequential)

    BX

    BX = 0:    Disable the max. delayed execution timeout of DOS programs

    BX = 1:    Enable the max. delayed execution timeout of DOS programs in a batch file, if BATCHMODE=1

    Return Value

    returns nothing

    Comments

    Important:
      If  BATCHMODE=1 take care that every program in your batch file which has a successor
      program either exits (int21h 0x4C) or terminates resident with int21h 0x31.
      A program which runs forever should call BIOS Interrupt 0xA0 Service 0x15, which immediately enables the further batch file sequencing.
      By default the maximum delay time for execution of the next listed program in the batch file is 15 seconds.
      If BX is set to 0, the successor program in a batch file waits forever for execution, if the predecessor program
      does not finish or call 0xA0 Service 0x15

    Related Topics

    Initial batch mode configuration
    BATCHMODE command

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x15:     Continue batch file execution in BATCHMODE 1

    This call allows the next program listed in a batch file to start execution.   This is implemented by waking up a batch file execution task which dispatches any subsequent program listed in the batch file.

    Parameters

    AH
    Must be 0x15

    Return Value

    returns nothing

    Related Topics

    Initial batch mode configuration
    Run-time batch mode selection

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x16:     Get information about the @CHIP-RTOS features

    Get information about running servers, interfaces and features of the @CHIP-RTOS

    Parameters

    AH
    0x16

    Return Value

    Bits of AX, BX and DX indicate the services or devices available, coded as:
      Bit=0: service or device is not available.
      Bit=1: service or device is available.

    AX:
      Bit 0: Ethernet device for TCP/IP
      Bit 1: PPP server
      Bit 2: PPP client
      Bit 3: Web server
      Bit 4: Telnet server
      Bit 5: FTP server
      Bit 6: TFTP server
      Bit 7: DHCP client
      Bit 8: IPv6 support
      Bit 9: SSL Web server

    BX:

    DX:
      Bit 0: I2C-Bus API
      Bit 1: Hardware API
      Bit 2: RTOS API
      Bit 3: Packet driver interface for Ethernet
      Bit 4: Serial XMODEM file transfer
      Bit 5: External disk interface
      Bit 6: Software SPI API
      Bit 7: CAN-Bus API
      Bit 8: USB API

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.10V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x17:     Get MAC address of the Ethernet interface

    Get the MAC address as a 6 Byte array.

    Parameters

    AH
    Must be 0x17.

    ES:DX
    Pointer to a 6 byte memory area where the MAC address is to be stored.

    Comments

    At IPC@CHIP® targets without internal Ethernet (e.g. SC11), this number represents a virtual ID.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x18:     Power save
    SC12:
    Slows down the internal timer for the RTOS and puts the CPU in a halt mode until the next interrupt occurs.   Please note that the internal time/date will be affected.

    SC11/SC13/SC1x3/SC2x:
    Slows down the processor clock and puts the CPU in a power save mode until the restore function is called or in halt mode until the next interrupt occurs.   Please note that the internal time/date will be affected in some modes.

    Parameters

    AH
    Must be 0x18.

    SC11/SC13 Parameters

    AL
    Mode
    If DX == 0xABCD and CX == 0x1234
        AL == 0x01: Restore full speed mode
        AL == 0x02: Set 1/2 speed mode
        AL == 0x04: Set 1/4 speed mode (serial baud rates > 57600 will no longer be accurate)
        AL == 0x80: Enter sleep mode (RTOS 1ms timer and time/date will be affected)
        AL == 0x81: Wakeup from sleep mode
        AL == 0x20: Power down Ethernet controller (no Ethernet communication is possible)
        AL == 0x21: Power up Ethernet controller
    Else
        Put the CPU in halt mode until next interrupt occurs.
        Please note that the internal time/date will be affected.
        Call this function when your program is in idle state.
        Power savings are marginal.
    Endif

    CX
    Set to 0x1234 if using AL as mode specifier

    DX
    Set to 0xABCD if using AL as mode specifier

    SC1x3/SC2x Parameters

    AL
    Mode
    If DX == 0xABCD and CX == 0x1234
        AL == 0x01: Restore full speed mode
        AL == 0x02: Set 1/2 speed mode
        AL == 0x04: Set 1/4 speed mode
        AL == 0x20: Power down Ethernet controller (no Ethernet communication is possible)
        AL == 0x21: Power up Ethernet controller
        AL == 0x22: Disable the Ethernet Energy Detect Power-Down mode
        AL == 0x23: Enable the Ethernet Energy Detect Power-Down mode
    Else
        Put the CPU in halt mode until next interrupt occurs.
        Please note that the internal time/date will be affected.
        Call this function when your program is in idle state.
        Power savings are marginal.
    Endif

    CX
    Set to 0x1234 if using AL as mode specifier

    DX
    Set to 0xABCD if using AL as mode specifier

    SC11/SC13/SC1x3/SC2x Return Value

    AX==0, if successful (only when DX==0xABCD and CX==0x1234)

    Comments

    Please note that power consumption may differ slightly when the date code of the IPC@CHIP® is changed.

    SC12 Comments

    Call this function when your program is in idle state.   Power savings are marginal since we use a DRAM.

    SC1x3/SC2x Comments

    In mode 0x23 the Ethernet PHY is partially powered down.   The PHY powers-up when there is valid energy from the line: 100Base-TX, 10 Base-T or auto negotiation.
    If the user calls this function with AL==4 (Set 1/4 speed mode), the internal ethernet controller doesn't work in the 100 MBit mode. Because of this behaviour, it is recommended to set the ethernet mode at chip.ini fix to 10MBit Halfduplex.

    The modes 0x02 and 0x04 influence the USB API. In mode 0x02 the USB API cannot be used at all. The SC1X3 will crash if you do. In mode 0x04 the USB API can only be used in Device mode, because Host mode needs better performance.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x19:     Change level for configuration server.

    Change the supported level for the configuration server.   For a description of the possible levels, please refer to UDPCFG documentation.

    Parameters

    AH
    Must be 0x19.

    BX
    The supported level.

    Comments

    Please note that if the level defined in the chip.ini is 0 (zero), the configuration server task is not started and changing the supported level does not have any effect.   To avoid this, use a unlisted support level such as 0x1000 in the chip.ini.

    The entry in the chip.ini file is not changed by this call.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x20:     Install a user fatal error handler

    Install a user fatal error callback function.   This installed function will be called by the system on execution of fatal errors.  

    Parameters

    AH
    Must be 0x20.

    ES:DI
    Address of the user error handler function (or zero to remove a previously installed handler).

    Return Value

    ES:DI holds old handler (since SC1x RTOS V1.25 / SC1x3/SC2x RTOS V1.20)

    Comments

    The user is permitted to execute an error handler function if a fatal error occurs in either an application program or the @CHIP-RTOS.

    Note that this mechanism will (of course) fail if the user error handler code is itself overwritten (corrupt).

    Only one error handler callback per system is supported.   An application can remove its handler by calling this install function with a zero (NULL) value in ES:DI, which is an advisable clean-up procedure at program exit.

    The callback function must be of type huge _pascal with an errorcode input parameter.

    Refer to the BIOS_Install_Error_Handler() C-Library API documentation for more details.

    Related Topics

    Set fatal error record
    ERRORS command

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.25V1.25V1.25V1.20V1.20

    Top of list
    Index page
    Interrupt 0xA0 service 0x21:     Rebooting the IPC@CHIP®

    This function works in the same way as the reboot shell command

    Parameters

    AH
    0x21

    Return Value

    No return from this function occurs due to system reboot.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x22:     Get version string

    Copies the @CHIP-RTOS version information in to a text buffer.   The string is null terminated.

    Parameters

    AH
    Must be 0x22

    CX
    Buffer length, including space for null terminator

    ES
    Segment of memory buffer for the string

    DI
    Offset of memory buffer for the string

    Related Topics

    Get version number
    Get device name
    VER shell command

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x23:     Insert an entry in chip.ini

    The functions 0x23 and 0x24 allows the user to modify/place and find/read
    your own chip.ini entries.

    Parameters

    AH
    Must be 0x23.

    BX:SI
    Pointer to section string (max. 40 chars)

    ES:DI
    Pointer to item name (max. 40 chars)

    DS:DX
    Pointer to item text (max. 128 chars)
    Pass a NULL pointer here to erase the complete item line

    Return Value

    AX=0 success
    AX=-1 Invalid string length, low heap memory or file error.

    Comments

    This API is thread safe and reentrant.   This function will fail (no operation) if insufficient system heap memory is available to momentarily hold the contents of the CHIP.INI file.

    This API can be accessed through the Beck C-Library function BIOS_Set_Ini_String.   A call to this function with parameters:

    BIOS_Set_Ini_String("MY_SECTION", "MY_ITEM", "VALUE_TEXT");

    produces the following chip.ini entry:

        [MY_SECTION]
        MY_ITEM=VALUE_TEXT

    Keep in mind that this function writes to the chip.ini file.   This generates flash write cycles and these cycles are limited.

    Related Topics

    Get CHIP.INI entry

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.20V1.20V1.20V1.05V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x24:     Find an entry in chip.ini

    Finds an entry in chip.ini configuration file.

    Parameters

    AH
    Must be 0x24.

    CX
    Maximum length of target string (without '\0').

    BX:SI
    Pointer to section string

    ES:DI
    Pointer to item name

    DS:DX
    Pointer to target

    Return Value

    AX= 0 : Entry not found
    AX= -1: Could not open chip.ini or low memory
    else Success: pointer at DS:DX contains the found string AX contains length of the found string

    Comments

    Leading and trailing white space characters will be cut. The function stops reading the entry when it finds an invalid character (<0x20).
    This API is thread safe and reentrant.   This function will fail if insufficient system heap memory is available to momentarily hold the contents of the CHIP.INI file.

    The maximum length value in CX specifies the number of characters which could be copied into the target string.   You have to allocate one more character for the null termination.

    The Beck C-Library function BIOS_Get_Ini_String can be used to access this API.   Example usage would be as follows:

    // Declare a target buffer to be filled by BIOS_Get_Ini_String().
    unsigned char target[101];

    BIOS_Get_Ini_String("MY_SECTION", "MY_ITEM", target, 100);
    // Now target contains the chip.ini text for this item

    Related Topics

    Set CHIP.INI entry

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x25:     Set the Stdio focus key

    Set the Stdio focus key

    Parameters

    AH
    Must be 0x25.

    AL
    Focus key character (default CTRL-F, ASCII 6)

    Return Value

    Returns nothing

    Comments


    By default, the focus key is set to CTRL-F (ASCII 6).

    At runtime, the pressed key Ctrl-F toggles between these three modes and shows the current mode.

    Key Range:     0..254

    If the key is set to zero, the switching of stdio is disabled.   The focus key is not usable by the command shell or DOS executable.

    Related Topics

    Focus key definition

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.01V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x26:     Get the IPC@CHIP® device name

    Get the IPC@CHIP® device name

    Parameters

    AH
    Must be 0x26.

    Return Value

    AX=0
    ES:DI contains pointer to the fixed IPC@CHIP® device name stored at the IPC@CHIP® flash
    BX:SI contains pointer to the device name configured at chip.ini.

    DX:CX contains pointer to the fixed BECK product name stored in the IPC@CHIP® flash

    Comments

    All returned strings are terminated by 0.   These strings should be treated as read only.

    Related Topics

    Device name definition
    Get version number
    Get version string

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.10V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x27:     Suspend/Resume System Servers

    Suspend/Resume FTP, Telnet or Web Server

    Parameters

    AH
    Must be 0x27.

    AL
    0: Resume, 1: Suspend

    SC1x Parameters

    BX
    0: FTP Server, 1: Telnet Server, 2: Web Server

    SC1x3/SC2x Parameters

    BX
    0: FTP Server, 1: Telnet Server, 2: Web Server, 3: SSL Web Server, 4: SSH Server

    Return Value

    AX=  0:   Success
    AX=  1:   Server was already in the postulated state
    AX= -1:   Invalid Parameter

    Comments

    If FTP, Telnet or WEB was disabled at startup with a CHIP.INI entry, you can enable it using this call.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.02V1.00V1.00V1.07V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x28:     Fast Findfirst

    Begins a file system directory scan with node locked.

    Parameters

    AH
    Must be 0x28.

    CX
    File attribute (provisional, not used)

    BX:SI
    Null terminated file specification

    ES:DI
    Pointer to a filefind structure which will be initialized inside this API.

    Return Value

    AX=   1 DX=0: Success
    AX=   0 DX=0: No file found

    Comments

    The three filefind functions (0x28, 0x29, 0x30) provide a slightly faster Findfirst/next operation than the DOS compatible functions at INT 21h.   The directory being searched will be locked, preventing it from being deleted until the lock is released.   This release occurs when either the directory scan is completed (Findfirst/Findnext return with AX equal zero) or the Finddone API terminates the search.

    This function starts an iteration of files found at the path specified in [BX:SI].   This path may contain the * and ? wild card characters.   If this function returns with AX set to 1, it has successfully found a matching file at the specified path.   The Findnext function can then be used to retrieve further matching file names.

    This function is reentrant.   However, eventually the system will run out of file system resources (e.g. directory nodes) if too many sessions are simultaneously active.

    CAUTION:

    The Fast Finddone function must be called if the Findfirst/Findnext sequence is stopped prior to these iteration functions returning with AX equal zero ("File not found").    This is important so that the directory can be unlocked and file system resources released!

    SC1x3/SC2x Comments

    The alternative directory scan functions for long file names (LFN) starting with LFN Findfirst can be used to read out the long file names.

    Beck C-Library Usage

    BIOS_Fast_Findfirst()

    Related Topics

    Fast Findnext
    Fast Finddone must be called at end of the search
    LFN Findfirst

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.20V1.20V1.20V0.91V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x29:     Fast Findnext

    Continues a search which was started by Fast Findfirst (0x28)

    Parameters

    AH
    Must be 0x29.

    ES:DI
    Pointer to filefind structure initialized by the Fast Findfirst function (0x28).

    Return Value

    AL=  1 DX=0: Success
    AX=  0 DX=0: no file found

    Comments

    This function is reentrant.

    See Fast Findfirst function (0x28) for further description.

    CAUTION:

    The Fast Finddone function must be called if the Findfirst/Findnext sequence is stopped prior to these iteration functions returning with AX equal zero ("File not found").    This is important so that the directory can be unlocked and file system resources released!

    Beck C-Library Usage

    BIOS_Fast_Findnext()

    Related Topics

    Fast Findfirst must be called to start the search
    Fast Finddone called at end of the search

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.20V1.20V1.20V0.91V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x2A:     Long File Name (LFN) Findfirst

    Begin iteration of files listed in specified directory.

    Parameters

    AH
    Must be 0x2A.

    AL
    non-zero to leave the directory node locked to prevent it being deleted.

    BX:SI
    Null terminated file path

    ES:DI
    Pointer to a LFN_filefind structure which will be initialized inside this API.

    Return Value

    CX=   1: Success
    CX=   0: No file found
    Carry flag zero (in either case)

    Comments

    The set of long file name file find functions (0x2A, 0x2B and 0x2C) provide access to the long file names as well as the short [8.3] DOS alias names.   These functions operate roughly similar to the DOS compatible functions at INT 21h when AL parameter is zero.   No directory node lock is performed in that case.

    When AL parameter is non-zero, then these functions behave analogous to the so called Fast findfirst BIOS service 0x28 but providing the long file names.   In this case these functions lock the file node (directory delete protection) of the directory being scanned.   This lock remains in affect until either a "No file found" indication is returned from either this function or Findnext (0x2B), or until the user calls the LFN FindDone API, 0x2C, to terminate the search.

    This function starts an iteration of files found at the path specified in [BX:SI].   This path may contain the * and ? wild card characters.   If this function returns with AX set to 1, it has successfully found a matching file at the specified path.   The LFN Findnext function can then be used to retrieve further matching file names.

    This function is reentrant.   However, eventually the system will run out of file system resources (e.g. directory nodes) if too many sessions are simultaneously active.   This resource exhaustion with excessive recursion is more likely when the AL non-zero node locking is used.

    Note:    The alternative Fast Findfirst / Fast Findnext functions which retrieve only the short alias DOS file names are no faster than this series of long name findfirst/findnext functions.   (Those functions are named "fast" only for historical reasons.)

    CAUTION:

    System heap memory, and file system resources remain allocated until the user calls LFN FindDone (0x2C) or until either of the LFN FindFirst/FindNext functions return with CX equal zero.   Therefore it is important that the user call the LFN FindDone API if the search is terminated before the FindFirst/FindNext functions reach the "No file found" condition.   Calling the LFN FindDone function for "good measure" after the FindFirst/FindNext functions have returned the zero in CX does no harm (has no affect).

    Beck C-Library Usage

    BIOS_LFN_Findfirst()

    Related Topics

    Long File Name Findnext
    Long File Name Finddone
    Short name "Fast" Findfirst

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      n/an/an/aV0.91V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x2B:     Long file name (LFN) Findnext

    Continues a file search which was started by LFN Findfirst (0x2A)

    Parameters

    AH
    Must be 0x2B.

    ES:DI
    Pointer to LFN_filefind structure initialized by LFN Findfirst call.

    Return Value

    CX=  1: Success
    CX=  0: no file found

    Comments

    This function is reentrant.

    See LFN Findfirst function (0x2A) for further description.

    CAUTION:

    System heap memory, and file system resources remain allocated until the user calls LFN FindDone (0x2C) or until either of the LFN FindFirst/FindNext functions return with CX equal zero.   Therefore it is important that the user call the LFN FindDone API if the search is terminated before the FindFirst/FindNext functions reach the "No file found" condition.

    Beck C-Library Usage

    BIOS_LFN_Findnext()

    Related Topics

    LFN Findfirst must be called to start the search
    LFN Finddone must be called at end of the search

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      n/an/an/aV0.91V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x2C:     Long file name (LFN) FindDone

    Terminates a search which was started by LFN Findfirst (0x2A), releasing resources.

    Parameters

    AH
    Must be 0x2C.

    ES:DI
    Pointer to LFN_filefind structure initialized by LFN Findfirst call.

    Return Value

    Carry flag zero

    Comments

    This function releases the system resources required during a directory scan operation.

    This function is reentrant.

    See LFN Findfirst function (0x2A) for further description.

    CAUTION:

    System heap memory, and file system resources remain allocated until either the user calls LFN FindDone or either the LFN FindFirst/FindNext functions return with CX equal zero.   Therefore it is important that the user call this LFN FindDone API if the search is terminated before the FindFirst/FindNext functions reach the "No file found" condition.

    Beck C-Library Usage

    BIOS_LFN_Find_Done()

    Related Topics

    LFN Findfirst must be called to start the search
    LFN Findnext continues search

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      n/an/an/aV0.91V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x2D:     Get system servers state

    Get state of system servers (FTP, Telnet, Web Server etc.)

    Parameters

    AH
    Must be 0x2D.

    SC1x Parameters

    BX
    0: FTP Server, 1: Telnet Server, 2: Web Server

    SC1x3/SC2x Parameters

    BX
    0: FTP Server, 1: Telnet Server, 2: Web Server, 3: SSL Web Server, 4: SSH Server

    Return Value

    AX=  0:   Server is enabled
    AX=  1:   Server is suspended
    AX= -1:   Invalid Parameter

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.27V1.27V1.27V1.30V1.30

    Top of list
    Index page
    Interrupt 0xA0 service 0x2E:     Install a user interrupt not supported handler

    Install a user interrupt not supported handler callback function.   This installed function will be called by the system on execution of an software interrupt call that is not supported.  

    Parameters

    AH
    Must be 0x2E.

    ES:DI
    Address of the user handler function (or zero to remove a previously installed handler).

    Return Value

    ES:DI holds old handler

    Comments

    The user is permitted to execute an error handler function if an unsupported software interrupt occurs in either an application program or the @CHIP-RTOS.

    Note that this mechanism will (of course) fail if the user handler code is itself overwritten (corrupt).

    Only one handler callback per system is supported.   An application can remove its handler by calling this install function with a zero (NULL) value in ES:DI, which is an advisable clean-up procedure at program exit.

    The callback function must be of type huge _pascal with intnumber and ax input parameters.

    If the callback function returns the value 0, the error message that is normally output to STDOUT is skipped by the RTOS. If the callback returns the value 1, the printing of the error message depends on a CHIP.INI setting.

    Refer to the BIOS_Install_IntNotSupported_Handler() C-Library API documentation for more details.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      n/an/an/aV1.52V1.52

    Top of list
    Index page
    Interrupt 0xA0 service 0x30:     Fast Finddone

    Closes a find access started with Fast Findfirst, thereby releasing the lock on the directory that was being searched.

    Parameters

    AH
    Must be 0x30.

    ES:DI
    Pointer to filefind structure initialized by the Fast Findfirst function (0x28).

    Return Value

    AX=0 DX=0:   Success

    Comments

    This function releases the file system resources used during a directory scan operation.

    This function is reentrant.

    See Fast Findfirst function (0x28) for further description.

    Beck C-Library Usage

    BIOS_Fast_Find_Done()

    Related Topics

    Fast Findfirst
    Fast Findnext

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.20V1.20V1.20V0.91V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x31:     Detect Ethernet link state

    Detect Ethernet link state

    Parameters

    AH
    Must be 0x31.

    Return Value

    AX=0: Link ok
    AX!=0: No Link (no cable connected?)
    DX!=0: Initialization or reset procedure of Ethernet device failed

    SC12 Return Value

    CX=0

    SC13/SC1x3 Return Value

    CX holds the current Phy status.

      Bit 14   1 = Link Not detected
      Bit 07   1 = 100Base-TX mode, 0=10Base-T mode
      Bit 06   1 = Device in Full Duplex mode

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.03V1.00n/aV0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x32:     Set a memory gap between the loaded DOS programs

    Sets a memory gap between loaded DOS programs as a memory reserve.

    Parameters

    AH
    Must be 0x32.

    BX
    Number of paragraphs (range between 0 to 2048 paragraphs).

    Return Value

    AX=0 DX=0: Success
    AX=-1: Invalid value found in BX

    Comments

    Some programs compiled with Borland C 5.02, Paradigm Beck Edition (other compilers??) try to increase their program memory block at runtime.   This can occur, for example, when opening a file with the Borland or Paradigm C-library function fopen, where some additional memory is required.   The C-library fopen function calls int 21h 0x4A, which is not directly visible to the application programmer.   This memory resize call fails if another program is loaded after the previous one, because now there is no memory space left for increasing the memory size of the previously executed program.   The program then returns from fopen with an error.   In this case, the global program variable errno is set to value 8 (not enough memory).

    To prevent this error, the @CHIP-RTOS allows a memory gap of a defined size between loaded programs.   This memory gap size is specified as a number of paragraphs (where 1 paragraph equals 16 bytes for SC1x, and 256 bytes for SC1x3 systems).

    This value can also be defined in chip.ini.

    Note:   This strategy can fail when programs are terminated and restarted again.  
    It is not necessary to set this entry if the application doesn't show the described error.   Only if a C-library function call sets errno to 8, should this value be defined.   We recommend in that case a value of 128 paragraphs for SC1x or 8 paragraphs for SC1x3 (2048 bytes in either case).   The described problem was noticed when the Borland or Paradigm C-library function fopen were used.   The same can happen with usage of C-library function malloc using memory model Large.   The malloc returns a NULL pointer in this case.

    SC1x3/SC2x Comments

    The BeckHeap library provides an alternative solution to this memory problem.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.02V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x33:     Set stdin/stdout channel

    Set the stdin/stdout channel

    Parameters

    AH
    Must be 0x33.

    AL
    Bit 0 = 1 set stdout, Bit 1 = 1 set stdin

    BX
    Channel bits, see comment

    Return Value

    AX=0 DX=0: Success
    AX=DX=-1: Invalid parameter

    Comments

    Channel bits for BX register:
    Bit 0: Serial port 0 (PORT EXT)
    Bit 1: Serial port 1 (PORT COM)
    Bit 2: Telnet server
    Bit 3: User channel
    Bit 4: SSH channel (SC1x3 only)

    Setting a bit to zero deactivates this channel, setting a bit to one activates the specified channel

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.02V1.00V1.00V1.07V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x34:     Get stdin/stdout settings

    Get the stdin/stdout settings

    Parameters

    AH
    Must be 0x34.

    Return Value

    AX=0, BX contains stdout settings, CX: stdin settings

    Comments

    Return values
    Bit 0 == 1: Serial port 0 (EXT)
    Bit 1 == 1: Serial port 1 (COM)
    Bit 2 == 1: Telnet server
    Bit 3 == 1: User channel
    Bit 4 == 1: SSH channel (SC1x3 only)

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.02V1.00V1.00V1.07V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x35:     Install user specific stdio handlers

    Installs user specific stdio channel handlers.

    This API call allows the user to install their own stdio handler functions, e.g. for a user developed input/output device connected to the IPC@CHIP® (e.g. a display and/or keyboard device) or a user TCP application similar to Telnet.

    The user must implement inside of their application four functions for reading and writing characters from/to their stdin/stdout device.

    After installing these functions with this API call and setting stdin and/or stdout to include the user channel with Set stdio channels, the @CHIP-RTOS will call these user functions at each stdin and stdout operation.   For further details on programming and installing these handler functions, see the comments below.

    Parameters

    AH
    Must be 0x35.

    ES:DI
    Pointer to User_Stdio_Funcs structure variable, see comments

    Return Value

    AX=0 DX=0: Success

    Comments


    Necessary type definitions:

    typedef int (huge *User_Kbhit)(void);
    typedef void (huge *User_PutCh)(char chr);
    typedef void (huge *User_PutStr)(char * pch, int n);
    typedef int (huge *User_Getch)(void);


    typedef struct tag_user_stdio
    {
             User_Kbhit user_kbhit;
             User_Getch user_getch;
             User_PutCh user_putch;
             User_PutStr user_putstr;
    }User_Stdio_Funcs;


    Functions to be implemented by the user:

    int huge user_kbhit(void);     // returns 1 ,if a character is available, 0 if not
    int huge user_getch(void);     // read a char from stdin (wait, if none available)
    void huge user_putch(char chr);     // write a single char to stdout
    void huge user_putstr(char * pch, int n);    // write a string with n chars to stdout


    The user must set the four callback function vectors in their User_Stdio_Funcs type variable and then call this API function with the address of the User_Stdio_Funcs structure in ES:DI.

    With ES = DI = 0, the user can later uninstall their stdio handlers.

    Important:

    1.    If your applications exits, don't forget to uninstall your stdio handlers, by calling this API call with ES=DI=0.
    2.    Do not call your implemented stdio functions from inside your application.   These installed functions must be called only from inside the @CHIP-RTOS.

    This API can be reached using the BIOS_Install_User_Stdio Beck C-Library function.   Example usage of this function is shown below.

                
    User_Stdio_Funcs user_stdio_funcs;    // global variable
    
    // Implementation of users stdio functions
    int  huge my_kbhit(void)
    {
      //........
    }
    
    int huge my_getch(void)
    {
      //........
    }
    
    void huge my_putch(char chr)
    {
      //........
    }
    
    void huge my_putstr(char * pch, int n)
    {
      //.......
    }
    
    void install_mystdio_channel(void)
    {
      user_stdio_funcs.user_kbhit  = my_kbhit;
      user_stdio_funcs.user_getch  = my_getch;
      user_stdio_funcs.user_putch  = my_putch;
      user_stdio_funcs.user_putstr = my_putstr;
    
      BIOS_Install_User_Stdio ( &user_stdio ) ;
      BIOS_Select_Stdio ( STDIO_COM | STDIO_TELNET | STDIO_USER,
               SET_STDOUT | SET_STDIN) ;
    }
    
    void remove_mystdio_channel(void)
    {
      BIOS_Select_Stdio ( STDIO_COM | STDIO_TELNET,
               SET_STDOUT | SET_STDIN) ;
    
      BIOS_Install_User_Stdio ( 0 ) ;
    }
    
    int main(void)
    {
      //......
      install_mystdio_channel();
      //....
    
      // at the end of the program
      remove_my_stdio_channel():
    }

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.02V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x36:     Install a System Server Connection Handler function

    Installs a user specific System Server Connection Handler function.
    The handler function will be called if a client establishes a connection.   This functions allows application programmers to implement their own callback functions for controlling access to the default @CHIP-RTOS servers.

    Parameters

    AH
    Must be 0x36.

    ES:DI
    Pointer to handler function

    SC1x Parameters

    BX
    0: FTP Server, 1: Telnet Server, 2: Web Server

    SC1x3/SC2x Parameters

    BX
    0: FTP Server, 1: Telnet Server, 2: Web Server, 3: SSL Web Server, 4: SSH Server

    Return Value

    AX=0: Success
    AX=-1: Invalid Parameter

    Comments

    The connection handler will be called when a client establishes a connection to the server (FTP, WEB, Telnet).
    Exemplary usage:
    The implemented handler function can check the source IP address (Clients IP), compare this IP with an application internal list of allowed IP addresses.   The connection can then be rejected by returning a non-zero value if the source IP is not a member of the list.

    A connection handler function must be declared in the following manner:
    int huge UserConnectionHandler( struct sockaddr_in *sockptr );


    If the handler returns 0 the connection will be established.   If it returns a nonzero value, the connection will be aborted.
    To uninstall a connection handler call this function with a null pointer (ES=DI=0).

    SC1x Comments

    Example handler:
    The handler can read the IP Address and the Port in the sockaddr_in struct . (If desired, the IP address in the sin_addr structure member can be converted to ASCII using the TCP/IP API_INETTOASCII function.)  

    int huge UserConnectionHandler( struct sockaddr * SockAddr )
    {
        char ip_str[INET_ADDRSTRLEN];
        InetToAscii(&((struct sockaddr_in *)SockAddr)->sin_addr.s_addr
                    ,ip_str);
        helper_printf("\r\nHost %s, Port %u",ip_str,
                    ((struct sockaddr_in *)SockAddr)->sin_port);
        return 0;
    }

    SC1x3/SC2x Comments

    Example handler:
    The handler can read the IP Address and the Port in the sockaddr_storage struct .

                
    int huge UserConnectionHandler( struct sockaddr * SockAddr )
    {
      char ip_str[INET6_ADDRSTRLEN];
      struct sockaddr_in ipv4SockAddr;
    
      if(IN6_IS_ADDR_V4MAPPED(
           &((struct sockaddr_storage *)SockAddr)->addr.ipv6.sin6_addr))
      {
       //IPv4, copy data into  sockaddr_in variable
       ipv4SockAddr.sin_addr.s_addr=((struct sockaddr_storage *)SockAddr)
                                   ->addr.ipv6.sin6_addr.ip6Addr.ip6U32[3];
       ipv4SockAddr.sin_port=
             ((struct sockaddr_storage *)SockAddr)->addr.ipv6.sin6_port;
       //Convert to string
       inet_ntop( AF_INET,&ipv4SockAddr.sin_addr,ip_str,INET_ADDRSTRLEN);
    
       //helper_printf(.........);
      }
      else
      {
        //IPv6: //Convert to string
        inet_ntop( AF_INET6,
                  &((struct sockaddr_storage *)SockAddr)
                  ->addr.ipv6.sin6_addr,ip_str,INET6_ADDRSTRLEN);
        //helper_printf(...........);
      }
      return 0;
    }

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.02V1.00V1.00V1.07V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x37:     Enable/Disable File sharing

    Enable disable File sharing of Int21h open/create

    Parameters

    AH
    Must be 0x37.

    AL
    0: set mode, 1: get mode

    BX
    0: disable, 1: enable (Sharing mode)

    Return Value

    AX=0: Success, contains Sharing mode if al=1
    AX=-1: Invalid Parameter

    Comments

    By default file sharing is disabled.   This has the effect that a file which is opened for write access can't be opened a second time for read or write access.   Also a file which is opened for read access can only be opened for read access a further time.

    To avoid this security feature you can enable file sharing.   This can also be done with the CHIP.INI entry FILESHARING.

    NOTE:   Be careful when opening a file multiple times with one or more of the openings done with write access!

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.02V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x38:     Get file name by handle

    Returns the file name string corresponding to a specified file handle.

    Parameters

    AH
    Must be 0x38.

    CX
    File handle

    ES:BX
    Output Parameter:   Pointer to string, must be 13 chars long (12 + Null termination)

    Return Value

    AX=0: Success
    AX=-1: Invalid file handle

    Comments

    This function is reentrant.

    SC1x3/SC2x Comments

    The alternative Get LFN function can be used to retrieve the long file names.

    Related Topics

    Get LFN

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.00V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x3A:     Get long file name by handle

    Returns the long file name string corresponding to a specified file handle.

    Parameters

    AH
    Must be 0x3A.

    CX
    File handle

    ES:BX
    Output parameter:   Pointer to buffer in user memory where up to 259 ASCII characters plus a null terminator will be written.

    Return Value

    AX=0: Success
    AX=-1: Invalid file handle

    Comments

    On success, the long file name is written to the caller's buffer at [ES:BX].

    This function is reentrant.

    Related Topics

    Get DOS file name

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      n/an/an/aV0.91V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x3B:     Set ethernet operation mode

    Set operation mode of the internal ethernet controller. This setting overlays temporarily the CHIP.INI setting ETH_MODE.

    Parameters

    AH
    Must be 0x3B.

    CL
    Operating mode The internal Ethernet controller is able to operate in different operating modes. Select the following operating modes of the internal Ethernet device:

    0: Auto negotiation, Default mode
    1: Fixed 010 MBit/s, Half duplex
    2: Fixed 010 MBit/s, Full duplex
    3: Fixed 100 MBit/s, Half duplex
    4: Fixed 100 MBit/s, Full duplex

    Return Value

    AX contains the current value of the ethernet operating mode

    Comments

    The setting becomes valid when executing the shell command IPETH , after calling TCPIP interrupt 0xAC service 0x71 (controller hardware restart and IP reconfiguration) or BIOS interrupt 0xA0 service 0x39 (controller hardware restart only)

    The current mode could be retrieved by calling this functions with parameter CL>4.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      n/an/an/aV1.23V1.23

    Top of list
    Index page
    Interrupt 0xA0 service 0x3C:     Set server credentials

    Modify user/password settings for FTP,Telnet or SSH server temporary.

    Parameters

    AH
    Must be 0x3C.

    CX
    Server identification:
    0: FTP server
    1: Telnet server
    4: SSH server

    ES:BX
    Pointer to a structure variable provided by the caller, which must contain the new credentials.

    Return Value

    AX=0: Success
    AX=-1: Invalid parameters at CX or ES:BX

    Comments

    This API doesn't modify the corresponding chip.ini settings. This can be done by the user by calling service 0x23.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      n/an/an/aV1.50V1.50

    Top of list
    Index page
    Interrupt 0xA0 service 0x40:     Install a UDP Cfg Callback

    Install a UDP Config Server User Callback function.

    Parameters

    AH
    Must be 0x40.

    ES:DI
    Pointer to the User Callback function

    Comments

    This API Function installs a User Callback function for the UDP Config Server.   If a UDP Cfg Request with the command number 06 arrives, this User Callback function will be called.   This allows you to realize your own UDP Config sub protocol and commands.   The UDP Cfg Callback function receives an argument with information about the UDP Cfg Request and its requester.   This information structure and the function must be declared as specified in the description below:

    typedef struct UdpCfgSrv_UserCBInfo
    {
        int length;                     // Length of this struct
        struct sockaddr_in *fromAddrPtr;    // Sender address pointer
        int udpCfgSD;                // UDP Config Server's Socket Descriptor
        char *dataPtr;               // Data of Request package
        unsigned dataLength;         // Length of request package
    };

    void huge MyUdpCfgSrvCB( struct UdpCfgSrv_UserCBInfo *infoPtr );

    If the callback function returns with the dataPtr and dataLength fields in the UdpCfgSrv_UserCBInfo structure both non-zero, the UDP Config Server will send the dataLength bytes from location referenced by dataPtr back to the requester.   If the pointer is set to null or the dataLength field is set to 0, no data will be sent back to the requester.

    To remove an installed callback function, call this function with a null pointer.

    For more Information on the UDP Config Server and its protocol, refer to the UDP Config Server description available on our website.

    Note:   The data sent and received is limited to 300 bytes maximum.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.03V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x41:     Insert an entry in INI file

    The functions 0x41 and 0x42 allows the user to modify/place and find/read
    your own entries in your own ini file.

    Parameters

    AH
    Must be 0x41.

    BX:SI
    Pointer to argument struct

    Return Value

    AX=0 success
    AX=-1 Invalid string length, low heap memory or file error.

    Comments

    This API is thread safe and reentrant.   This function will fail (no operation) if insufficient system heap memory is available to momentarily hold the contents of the INI file.

    This API can be accessed through the Beck C-Library function BIOS_Set_Ini_String_Ext.   A call to this function with parameters:

    BIOS_Set_Ini_String_EXT("A:\MYFILE.INI", "MY_SECTION", "MY_ITEM", "VALUE_TEXT");

    produces the following ini entry in the file MYFILE.INI:

        [MY_SECTION]
        MY_ITEM=VALUE_TEXT

    Related Topics

    Get INI entry

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.27V1.27V1.27V1.60V1.60

    Top of list
    Index page
    Interrupt 0xA0 service 0x42:     Find an entry in INI file

    Finds an entry in INI configuration file.

    Parameters

    AH
    Must be 0x42.

    BX:SI
    Pointer to argument struct

    CX
    Maximum length of target string (without '\0').

    Return Value

    AX= 0 : Entry not found
    AX= -1: Could not open INI file or low memory
    else Success: pointer at DS:DX contains the found string AX contains length of the found string

    Comments

    Leading and trailing white space characters will be cut. The function stops reading the entry when it finds an invalid character (<0x20).
    This API is thread safe and reentrant.   This function will fail if insufficient system heap memory is available to momentarily hold the contents of the INI file.

    The maximum length value specifies the number of characters which could be copied into the target string.   You have to allocate one more character for the null termination.

    The Beck C-Library function BIOS_Get_Ini_String_Ext can be used to access this API.   Example usage would be as follows:

    // Declare a target buffer to be filled by BIOS_Get_Ini_String_Ext().
    unsigned char target[101];

    BIOS_Get_Ini_String("A:\MYFILE.INI", "MY_SECTION", "MY_ITEM", target, 100);
    // Now target contains the INI text for this item

    Related Topics

    Set INI entry

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.27V1.27V1.27V1.60V1.60

    Top of list
    Index page
    Interrupt 0xA0 service 0x45:     Write persistent User Data

    Writes persistent data into the Flash memory of the IPC@CHIP®.

    A block of the IPC@CHIP flash is provided for storage of non-volatile customer product data.   This block is independent from the IPC@CHIP® file system.   The size of this area for the IPC@ targets SC1x and SC1x3/SC2x is 192 Bytes.   Developers of IPC@CHIP-based products can use this block in any way they want, e.g. for programming serial number of their product or other important data.

    Parameters

    AH
    Must be 0x45.

    ES:SI
    Pointer to the User data

    CL
    number of bytes to write (max 192)

    Comments

    The user can use this function to save product specific persistent data (e.g. own serial number of the product).
    The function requires a pointer in [es:si] to memory block, which should be written into the flash memory.
    The 192 bytes array in the flash memory will be untouched on a format of the file system and also on an @CHIP-RTOS BIOS Update.

    Related Topics

    Read persistent User Data

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.10V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x46:     Read persistent User Data

    Reads persistent data from the Flash memory of the @CHIP.

    Parameters

    AH
    Must be 0x46.

    ES:DI
    Pointer to the User buffer

    CL
    number of bytes to read (max 192)

    Comments

    The user can use this function to read product specific persistent data written with function 0x45 (Write Persistent User Data).
    The function requires a pointer [es:di] to the memory block into which the read data will be stored.

    Related Topics

    Write persistent User Data

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.10V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x48:     Assign RTOS memory block to task

    The indicated memory block is re-assigned to the specified RTOS task.

    Parameters

    AH
    Must be 0x48.

    ES:BX
    Pointer to the memory block allocated by the RTOS.

    CX
    RTOS task ID of task to assign this memory block.   You may set this to zero to assign the memory block to the current task that is making this call.

    Return Value

    Success: AX = 0
    Invalid task ID:   AX = -1
    Invalid RTOS memory pointer:   AX = -38

    Comments

    This function can be useful to control the lifespan of a given block of memory.   After the specified task has been assigned ownership of this memory block, this memory block will be automatically released when that task is deleted from the system if the block had not already been released.

    A task's stack space allocated from system memory can safely be released in this manner.

    Related Topics

    Allocate normal RTOS memory
    Allocate fast RTOS memory
    Delete task

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.23V1.23V1.23V1.12V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x50:     Get IP address of the PPP Server

    Get the IP address as a string.

    Parameters

    AH
    Must be 0x50.

    ES:DX
    Pointer to a 16 byte memory area where the IP address is to be stored as a null terminated string.   If no PPP IP address is set (e.g. no link is established) this function returns an empty string.

    SC1x3/SC2x Comments

    This function is deprecated, because it doesn't work, if the PPP server uses the IPv6 protocol.   The IP configuration of all TCPIP/IP devices can be read by using Get_Iface_Entries or Get_IPv6_Iface_Entries.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.10V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x55:     Get IP address of the PPP Client

    Get the IP address as a string.

    Parameters

    AH
    Must be 0x55.

    ES:DX
    Pointer to a 16 byte memory area where the IP address is to be stored as a null terminated string.   If no PPP IP address is set (e.g. no link is established) this function returns an empty string.

    SC1x3/SC2x Comments

    This function is deprecated, because it doesn't work, if the PPP server uses the IPv6 protocol.   The IP configuration of all TCPIP/IP devices can be read by using Get_Iface_Entries or Get_IPv6_Iface_Entries.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.10V1.00V1.00V0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x56:     Get vsprintf address

    Get the address of the internal RTOS vsprintf function.

    Parameters

    AH
    Must be 0x56.

    Return Value

    AX=0
    ES:DI points to the internal vsprintf function of the @CHIP-RTOS BX = 0x1 to signal caller that this @Chip-RTOS version supports the direct console output when first argument to the vsprintf function is MK_FP(0, 0x22).   (If BX remains unchanged, then @Chip-RTOS version is older and does not support this feature.)

    Comments


    This function is used by our C-library to provide a printf function for user applications.   Floating point types are not supported by this vsprintf implementation.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.20V1.20V1.20V0.91V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x57:     Allocate Memory from fast memory pool

    Allocates memory for the calling process from the fast memory pool.

    Parameters

    AH
    0x57

    BX
    Size counted in paragraphs

    Return Value

    Success:
      AX holds the segment of the memory area
    Failure:
      AX = 0, due to not enough memory available.

    Comments

    A paragraph is 256 bytes in length.

    Note:

    The software Cryptographic Engine used by SSH, SSL or IPsec will operate noticeably quicker during key negotiation (e.g. Diffie-Hellmann, RSA, DSS) if a block of memory in the fast memory pool is available.   A memory block of roughly 42 Kbyte size is required by the Cryptographic Engine.   If the block is not available in this fast RAM area, then an attempt is made to allocate it from the normal system memory as a last resort.

    Beck C-Library Usage

    helper_alloc_rtos_fast_mem()

    Related Topics

    Allocate normal RTOS memory
    Free allocated memory
    Reassign memory ownership

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      n/an/an/aV0.90V1.00

    Top of list
    Index page
    Interrupt 0xA0 service 0x58:     Get MAC address of the second Ethernet controller

    Get the MAC address as a 6 Byte array.

    Parameters

    AH
    Must be 0x58.

    ES:DX
    Pointer to a 6 byte memory area where the MAC address is to be stored.

    Comments

    The second Ethernet controller has no PHY controller.   Only an MII interface is provided.   It is only accessible with an external connected PHY and an external driver program, which must base on the TCPIP device driver API.

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      n/an/an/aV0.90n/a

    Top of list
    Index page
    Interrupt 0xA0 service 0x59:     Set fatal error record

    Sets the RTOS' fatal error record

    Parameters

    AH
    0x59

    BX
    Error code
    Codes 0..999 are reserved for the RTOS.
    Codes 1000..9999 are reserved for Beck drivers and libraries. (see Install a user fatal error handler)
    Codes 10000... can be used for user applications.

    CX:DX
    Details:
    This arbitrary integer value can be used to describe the error more detailed. (CX holds high word)

    Return Value

    AX = 0: Success
    AX = -1: Illegal (reserved) error code

    Beck C-Library Usage

    BIOS_Set_Error()

    Related Topics

    Install a user fatal error handler
    ERRORS command

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      n/an/an/aV1.30V1.30

    Top of list
    Index page
    Interrupt 0xA0 service 0x5A:     Check for installed license

    Check for installed license

    Parameters

    AH
    0x5A

    AL
    ID of license key

    ES:BX
    Pointer to secret key

    CX
    Length of secret key in bytes

    Return Value

    AX = 0: Success, found a valid license
    AX = -1: Error, no valid license for specified ID found
    AX = -2: Error, reading product data failed
    AX = -3: Error, MD5 functions failed

    Beck C-Library Usage

    helper_check_license()

    Supported since or modified in @CHIP-RTOS version

      SC12SC13SC11SC1x3SC2x
      V1.27V1.27V1.27V1.35V1.35

    Top of list
    Index page


    End of document