COM1_Read1CHAR

Purpose: Read and remove the next BYTE (or character) from the COM1 Receive Buffer.
Assumes:   It will not block if the COM1 Receive Buffer is empty.
Passed: Nothing.
Returns: R24BYTE  bNextChar   the character read, which will be 0 if the COM1 Receive Buffer is empty.
Alters: R25, R30, R31, the FLAGs (SREG), and the COM1 Receive Buffer
Example:  

      Omitted for this function; see the notes section.
  
>DS+ 0x12A 86  ; Perhaps of interest instead:
SRAM contents:
0120:                                5D 5D 00 00 00 00            ]]....
0130:  44 53 2B 20 30 78 31 32-41 20 38 36 20 20 3B 20  DS+ 0x12A 86  ;
0140:  50 65 72 68 61 70 73 20-6F 66 20 69 6E 74 65 72  Perhaps of inter
0150:  65 73 74 20 69 6E 73 74-65 61 64 3A 0D 00 00 00  est instead:....
0160:  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
0170:  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
>DS+ 0x12A 86
SRAM contents:
0120:                                6E 6E 00 00 00 00            nn....
0130:  44 53 2B 20 30 78 31 32-41 20 38 36 20 20 3B 20  DS+ 0x12A 86  ;
0140:  50 65 72 68 61 70 73 20-6F 66 20 69 6E 74 65 72  Perhaps of inter
0150:  65 73 74 20 69 6E 73 74-65 61 64 3A 0D 44 53 2B  est instead:.DS+
0160:  20 20 20 08 08 30 78 31-32 41 20 38 36 0D 00 00     ..0x12A 86...
0170:  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
>; The last command had 2 backspaces
>DS+  0x12a 86
SRAM contents:
0120:                                50 50 00 00 00 00            PP....
0130:  20 68 61 64 20 32 20 62-61 63 6B 73 70 61 63 65   had 2 backspace
0140:  73 0D 44 53 2B 20 20 30-78 31 32 61 20 38 36 0D  s.DS+  0x12a 86.
0150:  65 73 74 20 69 6E 73 74-65 61 64 3A 0D 44 53 2B  est instead:.DS+
0160:  20 20 20 08 08 30 78 31-32 41 20 38 36 0D 3B 20     ..0x12A 86.;
0170:  54 68 65 20 6C 61 73 74-20 63 6F 6D 6D 61 6E 64  The last command
>; The last one cause the buffer pointers to wrap around.
>; The first three (3) commands entered after a reboot are shown.
>                                                                              
Notes:Bytes are placed in the COM1 Receive Buffer by the Operating System's COM1 Receive Interrupt Service Routine. It is implemented as a circular FIFO (First In, First Out) queue, using the System BYTE Variable bCOM1RxHeadPtr as characters are received and bCOM1RxTailPtr as they are removed. This function only updates bCOM1RxTailPtr.
This is the RAW character buffer, that is, it will contain all BYTEs received, including editing characters (e.g., backspace, tab, carriage return, line feed, etc.) Its status is closely monitored by the Operating System. The BYTEs received are processed into the Parsing (or Command) Buffer (see bParseBuffer), in which backspaces have already been processed and removed, for example.
Since the Operating System uses this System Function very heavily, few good things, and likely many bad things, can happen if the function is called directly. It was almost left undocumented, but the dozen COM1 status and access routines would have been quite obviously incomplete if that were to have been done.
Also see:   The COM1 Receive Buffer status System Functions and the eight (8) system variables beginning with bCOM1Rx, which also has four (4) receive errors counters.