Вывод РОНа » History » Version 1
Version 1/3
-
Next » -
Current version
krufter_multiclet, 07/18/2013 07:22 PM
Вывод РОНа¶
.include "HDL50001_pcf.inc" .alias ron2 4 .alias ron3 5 .alias UART_DATA UART3_DATA .alias UART_BDR UART3_BDR .alias UART_ST UART3_ST .alias UART_CR UART3_CR .alias UART_PORT_PIN 0x300 .alias UART_PORT_BPS GPIOD_BPS .text paragraph1: setl #ron3, 0x12345678 jmp initUART complete initUART: getl 0x00000300 wrl @1, UART_PORT_BPS getl 0x00000104 wrl @1, UART_BDR getl 0x00000003 wrl @1, UART_CR jmp send_byte_UART setl #ron2, 7 complete send_byte_UART: getl #ron2 jne @1, send_byte_UART je @2, buf_TXD getq #ron3 slrq @1, 8 setq #ron3, @1 wrl @3, UART_DATA subl @7, 1 setl #ron2, @1 complete buf_TXD: rdl UART_ST getl 0x00000004 and @1, @2 je @1, buf_TXD jne @2, end complete end: getl 0x1000 complete