================================================================== MikeOS -- The Mike Operating System kernel SERIAL PORT ROUTINES ==================================================================


init_serial_port

Set up the serial port for transmitting data

Example:

call init_serial_port
; sets serial port 1 to 9600 baud, no parity, 8 data bits, 1 stop bit


os_send_via_serial

Send a byte via the serial port

Example:

    
         mov al, 'a'                  ; place char to transmit in al
         call os_send_via_serial      ; call it.
         cmp ah, 128                  ; check if bit 7 is set, if it is then indicates an error.
         jnz all_ok                   ; bit 7 not set so it's all OK.
         jmp oops_error               ; deal with it.


os_get_via_serial

Get a byte from the serial port

Example:

         call os_get_via_serial       ; call it.
         cmp ah, 128                  ; check if bit 7 is set, if it is then indicates an error.
         jnz all_ok                   ; bit 7 not set so it's all OK. 
         jmp oops_error               ; deal with it.

all_ok:           

         mov [rx_byte], al            ; now get byte and store it.

RETURN TO MAIN PAGE