Crossware

Table of Contents        Previous topic       Next topic       

The Extension Interface->General Purpose Interface Calls->SetSerialOutputWord()

extern "C" void SetSerialOutputWord(LONG nExtensionState, BYTE nBuffAddress, WORD nWord)

The simulator will call SetSerialOutputWord when a data 'byte' has been transmitted by the serial port.  Unlike SetSerialOuput which passes an 8-bit value to the extension, SetSerialOutputWord passes a 16-bit value in nWord. The low byte of nWord contains the same information as the byte passed by SetSerialOuput.  The contents of the high byte of nWord depend upon the operating mode of the serial port:
    

(Note that there is not information to represent the start bit.)

If a variant supports more than one serial port, the extension can test the value of nBuffAddress to determine which serial port has transmitted the byte passed with this call.