01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Interrupt 0xAC service 0x07: API_HTONS, Convert byte order<br />

Parameters<br />

AH<br />

BX<br />

Converts a short (16 bit) value from host byte order to network byte order.<br />

0x07 (= API_HTONS)<br />

short value<br />

Return Value<br />

Comments<br />

Top of list<br />

Index page<br />

DX = 0, AX contains converted value<br />

This is used to convert port numbers; e.g. htons(7).<br />

Interrupt 0xAC service 0x08: API_INETADDR, Convert an IP-String to binary<br />

Parameters<br />

AH<br />

BX:SI<br />

ES:DI<br />

Converts a dotted decimal IP address string to an unsigned long in network byte order.<br />

0x08 (= API_INETADDR)<br />

Pointer to the IP dotted decimal string set by caller. This ASCII string must be zero terminated.<br />

Pointer to a 32 bit unsigned long variable, where this function outputs the converted IP address value.<br />

Return Value<br />

DX = 0 AX = 0, [ES:DI] contains converted 32 bit binary value<br />

DX != 0 AX = error code, syntax error<br />

Related Topics<br />

Top of list<br />

Index page<br />

Get IP address of the Ethernet interface<br />

Convert binary IP address to ASCII dotted decimal<br />

Interrupt 0xAC service 0x09: API_SLEEP, Sleep<br />

Page 110 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!