en:docs:macrolib:auxinit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:macrolib:auxinit [2022/04/14 12:41] prokusheven:docs:macrolib:auxinit [2022/10/02 03:31] (current) prokushev
Line 6: Line 6:
  
 Initialize serial port Initialize serial port
 +
 +===== BIOS Interrupt =====
 +
 +[[en:docs:bios:api:int|INTH]]: [[en:docs:bios:api::|H]]
 +
 +===== Family API =====
 +
 +[[en:docs:fapi:]]
  
 ===== Syntax ===== ===== Syntax =====
Line 16: Line 24:
  
   * port (WORD) - port number   * port (WORD) - port number
-  * settings (BYTE)+  * settings (BYTE) - port settings
  
-    Baud rates is passed in the high order 3 bits as follows:+Baud rates is passed in the high order 3 bits as follows:
  
-                000 =   110 baud +000 110 baud | 
-                001 =   150  '' +001 150 baud | 
-                010 =   300  '' +010 300 baud | 
-                011 =   600  '' +011 600 baud | 
-                100 =  1200  '' +100 1200 baud | 
-                101 =  2400  '' +101 2400 baud | 
-                110 =  4800  '' +110 4800 baud | 
-                111 =  9600  ''+111 9600 baud |
  
  
-    Bits 4-3 define parity:     0 0       no parity +Bits 4-3 define parity: 
-                                1 0       no parity +| 00| no parity | 
-                                0 1      odd parity +| 10 | no parity | 
-                                1 1     even parity+| 01 | odd parity | 
 +| 11 | even parity |
  
-    Bit 2 defines stop bits:             1 stop bit; +Bit 2 defines stop bits: 
-                                         +1 stop bit | 
 +stop bits |
  
-    Bits 1-0 character length:  1 0        7 bits +Bits 1-0 character length: 
-                                1 1        8 bits+| 10 | 7 bits | 
 +| 11 | 8 bits |
  
 ===== Return ===== ===== Return =====
Line 45: Line 56:
   * AX - port status   * AX - port status
  
 +Bitfields for serial line status (AH):
 +^ Bit(s) ^ Description ^
 +| 7 | timeout |
 +| 6 | transmit shift register empty |
 +| 5 | transmit holding register empty |
 +| 4 | break detected |
 +| 3 | framing error |
 +| 2 | parity error |
 +| 1 | overrun error |
 +| 0 | receive data ready |
 +
 +Bitfields for modem status (AL):
 +^ Bit(s) ^ Description ^
 +| 7 | carrier detect |
 +| 6 | ring indicator |
 +| 5 | data set ready |
 +| 4 | clear to send |
 +| 3 | delta carrier detect |
 +| 2 | trailing edge of ring indicator |
 +| 1 | delta data set ready |
 +| 0 | delta clear to send |