Knowledge Base

Return a hex number from the head of the Rx buffer for the serial port at address pp. Skip any leading spaces. Terminate thereafter after 2 hex digits or on first non-hex character. Accept upper or lower case. Consume the characters used but not the terminating character. Result in X, 0 if nothing there. R register signals outcome. 0 = OK, 1 = no valid hex number present.

Hex numbers longer than 8 bits can be read in several grabs.

This differs from the same instruction without the leading ‘a’ in that it explicitly nominates a serial port address (pp) rather than the default serial port.

Dialect exclusions: Not available in dialects before 29