Jump to content

DevHelp QueueRead: Difference between revisions

From EDM2
Created page with "This service returns and removes a character from the beginning of the specified character queue structure. If the queue is empty, an indicator is set. ==Syntax== ===C=== U..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This service returns and removes a character from the beginning of the specified character queue structure. If the queue is empty, an indicator is set.  
{{DISPLAYTITLE:DevHelp_QueueRead}}
This service returns and removes a character from the beginning of the specified character queue structure. If the queue is empty, an indicator is set.


==Syntax==
==Syntax==
Line 14: Line 15:
==Parameters==
==Parameters==
===C===
===C===
; Queue (NPBYTE) : input - Near pointer to the queue structure to be initialized. (The Qsize field must be set up.)
;Queue (NPBYTE) : input - Near pointer to the queue structure to be initialized. (The Qsize field must be set up.)
 
;Char (PBYTE) : input - Pointer to the character read from the queue.
; Char (PBYTE) : input - Pointer to the character read from the queue.


===Assembler===
===Assembler===
Line 22: Line 22:


==Return Code==
==Return Code==
===C===
===C===
Success Indicator: 0 - returns character read from the queue.
Success Indicator: 0 - returns character read from the queue.
Line 45: Line 44:
                                   PBYTE Char)
                                   PBYTE Char)
</PRE>
</PRE>
==Related Functions==


[[Category:DevHlps]]
[[Category:DevHlps]]

Latest revision as of 00:56, 8 October 2018

This service returns and removes a character from the beginning of the specified character queue structure. If the queue is empty, an indicator is set.

Syntax

C

USHORT APIENTRY DevHelp_QueueRead (NPBYTE Queue, PBYTE Char)

Assembler

MOV   BX,OFFSET DS:queue      ; Points to the queue structure.
MOV   DL,DevHlp_QueueRead

CALL  [Device_Help]

Parameters

C

Queue (NPBYTE)
input - Near pointer to the queue structure to be initialized. (The Qsize field must be set up.)
Char (PBYTE)
input - Pointer to the character read from the queue.

Assembler

MOV   BX,OFFSET DS:queue      ; Points to the queue structure.

Return Code

C

Success Indicator: 0 - returns character read from the queue.

Assembler

   'C' Clear if successful.
       AL = the character read from the queue.

   'C' Set if the queue is empty.

Remarks

This function operates on the simple character queue structure initialized by QueueInit.

Example Code

C

#include  "dhcalls.h"

USHORT APIENTRY DevHelp_QueueRead (NPBYTE Queue,
                                   PBYTE Char)