URL
https://opencores.org/ocsvn/ssbcc/ssbcc/trunk
Subversion Repositories ssbcc
[/] [ssbcc/] [trunk/] [core/] [9x8/] [peripherals/] [tb/] [UART_Rx/] [tb_UART_Rx.s-rtrn] - Rev 9
Compare with Previous | Blame | View Log
; Copyright 2015, Sinclair R.F., Inc.
;
; Test bench for UART_Rx peripheral with RTRn signal output.
.main
; Wait for the FIFO to fill.
0x00 0x41 >r :wait
.jumpc(no_major_dec,1-) r> 1- >r :no_major_dec r@ -1<> .jumpc(wait)
; Read from the UART Rx port until the terminating null character is encountered.
:loop
;If no character is available, then continue waiting.
.inport(I_UART_RX_EMPTY) .jumpc(loop)
; Read the next character and output it, preserving it on the data stack.
.inport(I_UART_RX) O_DATA outport
; If the character was not a null character, then continue running the loop.
.jumpc(loop)
; Signal program termination.
1 .outport(O_DONE)
; Wait forever.
:infinite .jump(infinite)