Skip to content
Snippets Groups Projects
Commit 4f66bc89 authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Adicionado arquivo handlerUART.s

parent 1ba27cc9
No related branches found
No related tags found
No related merge requests found
......@@ -108,11 +108,11 @@ UARTinterr:
#----------------------------------
# while you are developing the complete handler,
# uncomment the line below and comment out lines up to UARTret
# .include "../tests/handlerUART.s"
.include "../tests/handlerUART.s"
#----------------------------------
andi $a0, $k1, UART_rx_irq # Is this reception?
beq $a0, $zero, UARTret # no, ignore it and return
# andi $a0, $k1, UART_rx_irq # Is this reception?
# beq $a0, $zero, UARTret # no, ignore it and return
lui $a0, %hi(HW_uart_addr)
ori $a0, $a0, %lo(HW_uart_addr)
......
#--------------------------------------------------------------------------
# interrupt handler for UART
RX:
andi $a0, $k1, UART_rx_irq # Is this reception?
beq $a0, $zero, TX # no, test if it's transmission
nop
# TODO: Read data, store it to buffer and decrement nrx (we're reading a char)
TX:
andi $a0, $k1, UART_tx_irq # Is this transmission?
beq $a0, $zero, END # no, end handler
nop
# TODO: Increment ntx (we're sending a char)
END:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment