b .start .rept 1023 mov r0, r0 .endr .start: mov r0, r0 mov r0, #0x40000000 orr r0, r0, #0x00e00000 mov r1, #0x00ff0000 orr r1, r0, #0xff000000 orr r2, r1, r1, lsr #16 mov r3, #0 # str r2, [r0, #0x0c] # str r2, [r0, #0x14] # str r2, [r0, #0x18] # str r2, [r0, #0x1c] # str r2, [r0, #0x20] ldr r2, [r0, #0x10] mov r3, #0xffff3fff and r2, r2, r3 orr r2, r2, #0x8000 str r2, [r0, #0x10] mov r2, #0x0fffffff ldr r1, [r0, #0x5c] and r1, r1, r2 orr r1, r1, #0x60000000 str r1, [r0, #0x5c] mov r0, #0x40000000 orr r0, r0, #0x00700000 mov r1, #128 str r1, [r0, #0x0c] @ allow access to the baud rate divisors mov r1, #8 str r1, [r0, #0] @ set baud rate div. low byte mov r1, #0 str r1, [r0, #4] @ set baud rate div. high byte mov r1, #3 str r1, [r0, #0x0c] @ deny access to the baud rate divisors and set word size to 8 bits mov r1, #1 str r1, [r0, #0x20] @ Enable IR mode (tx only) mov r1, #64 str r1, [r0, #4] @ Set IER to enable UART mov r1, #0 str r1, [r0, #8] @ Disable fifo mode mov r1, #0xf0 orr r1, r1, #0xf000 orr r1, r1, r1, lsl #16 .loop: str r1, [r0, #0] b .loop .end: b .end