4 .define UART_BASE, 0x2000
5 .define UART_STATUS, 0x0
7 .define UART_TRANS, 0x8
9 .define UART_TRANS_EMPTY, 0x1
10 .define UART_RECV_NEW, 0x2
24 ldih r10, UART_BASE@hi
28 ldw r3, UART_STATUS(r10)
29 andx r3, UART_RECV_NEW
30 brzs+ poll; branch if zero
33 ; we received the enter bootrom sign
41 ldw r3, UART_STATUS(r10)
42 andx r3, UART_TRANS_EMPTY
43 brnz+ send_byte ; branch if not zero
44 stb r1, UART_TRANS(r10)
61 ldw r3, UART_STATUS(r10)
62 andx r3, UART_RECV_NEW
63 brzs+ recv_byte; branch if zero
65 ldb r0, UART_RECV(r10)
110 ; cmpi r0, 0x48 ; 'H'
121 call recv_word ; receive addr
123 call recv_word ; receive instr
130 call recv_word ; receive addr
139 call recv_word ; receive addr
141 call recv_word ; receive data
148 call recv_word ; receive addr