Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Net - <b>ncb_command</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
NCB_COMMAND

Length: 1
Type:   DB
Description: NCB Command field

Description
NCB_COMMAND is a 1 byte field. Each command executes in either a wait or no-
wait mode. Setting the high-order bit to 1 selects the no-wait option. Setting
the high-order bit to 0 slects the wait option. The remaining 7 bits specify
the command that you want the adapter to execute.

Use the no-wait option for maximum throughput between the adapter and the
computer. In addition, the no-wait option allows multiple commands to be
queued for execution with the adapter.

The programming interface to the NETBIOS is differnt depending upon the
selection of the wait/no-wait option. For example, when issuing the
instruction interrupt hex 5C using the wait option, control is not returned to
the next instruction until the adapter completes the command. When the command
is complete, check the AL register, the NCB_RETCODE, or the CMD_CPLT field for
the status of the completed command.

If you choose the no-wait option for the interrupt hex 5C instruction, you
will receive two return codes. One code is returned immediately after you
issue the instruction. The following is a list of the possible immediate
return codes found in the AL register:

. Hex 00    - Command has no immediate errors
. Hex 03    - Invalid command
. Hex 21    - Interface busy
. Hex 22    - Too many commands outstanding
. Hex 23    - Invalid number in NCB_LANA_NUM field
. Hex 24    - Command completed while cancel occurring
. Hex 26    - Command not valid to cancel
. Hex 40/4F - Unusual network condition
. Hex 50/FE - Adapter malfunction

When the immediate retrun code is hex 00, a final return code is posted to the
user after the command is executed. The return code is posted by interrupting
the user application and can be noted by checking the NCB_CMD_CPLT field. If
the NCB_POST@ field is not zero, the adapter interrupts the user application
program at the address specified in the NCB_POST@ field. If the NCB_POST@
field is zero, the adapter does not interrupt the program, and command
completion must be determined by checking the NCB_CMD_CPLT field.

When the adpater interrupts the user application program upon command
completion, the final return code can be obtained from either the AL register,
the NCB_RETCODE field, or the NCB_CMD_CPLT field. If checking the NCB_CMD_CPLT
field, a change in value from hex FF (pending status) indicates command
completion. This value represents the final return code. The possible final
result codes vary for each command.

If the immediate return code is other than hex 00, the adapter cannot execute
the requested command and adapter processing ends.

See Also:

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson