4 .fill 0x1 ;1. element = 1 ;0x10
5 .fill 0x1 ;2. element = 1 ;0x14
6 .fill 0x10, 0x0 ;nullen..
17 .define UART_BASE, 0x2000
18 .define UART_STATUS, 0x0
19 .define UART_RECV, 0xc
20 .define UART_TRANS, 0x8
22 .define UART_TRANS_EMPTY, 0x1
23 .define UART_RECV_NEW, 0x2
33 ldi r10, list@lo ; global pointer
51 ; wert vom stack zurueckgeben
94 ; list[n] = a + list[n-2]
98 ;update counter for aligned access
100 ;calculate adress of top element
109 ;decrement adress for next lopp
111 ;iterative call for n-1 element
115 ;add n-1 and n-2 element
117 ;increment address for n element
118 ;is needed because after return
119 ;we need r2 to be set to the address
127 ldw r3, UART_STATUS(r10)
128 andx r3, UART_RECV_NEW
129 brzs+ recv_byte; branch if zero
131 ldw r0, UART_RECV(r10)
135 ldw r9, UART_STATUS(r10)
136 andx r9, UART_TRANS_EMPTY
137 brnz+ send_byte ; branch if not zero
138 stb r1, UART_TRANS(r10)
143 ;usb_sendbuffersafe ("0x", 2);
156 ;for (j = 0; j < 8; ++j) {
159 ;usb_sendbuffersafe (&int2hex[(i >> 28) & 0xf], 1);
172 ldi r10, UART_BASE@lo
173 ldih r10, UART_BASE@hi