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
29 ; we received the enter bootrom sign
37 ldw r3, UART_STATUS(r10)
38 andx r3, UART_TRANS_EMPTY
39 brnz+ send_byte ; branch if not zero
40 stw r1, UART_TRANS(r10)
57 ldw r3, UART_STATUS(r10)
58 andx r3, UART_RECV_NEW
59 brzs+ recv_byte; branch if zero
61 ldw r0, UART_RECV(r10)
108 ; 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