- Timestamp:
- Oct 24, 2011 12:23:51 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 74522
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/asmdefs.mac
r28800 r39090 70 70 ; al and dx are wasted. 71 71 ; @todo comport init doesn't quite work - therefore we no longer use this! :-/ 72 ; @todo test again, it might work now... 72 73 %macro COM_INIT 0 73 push eax 74 push edx 75 76 mov dx, VBOX_UART_BASE + 3 77 mov al, 80h 78 out dx, al ; make DL register accessible 79 80 mov dx, VBOX_UART_BASE 81 mov ax, VBOX_UART_RATE 82 out dx, ax ; write bps rate divisor 83 84 mov dx, VBOX_UART_BASE + 3 85 mov al, VBOX_UART_PARAMS 86 out dx, al ; write parameters 87 88 89 xor ax, ax 90 mov dx, VBOX_UART_BASE + 4 ; disconnect the UART from the int line 91 out dx, al 92 93 mov dx, VBOX_UART_BASE + 1 ; disable UART ints 94 out dx, al 95 96 mov dx, VBOX_UART_BASE + 2 ; disable the fifos (old software relies on it) 97 out dx, al 98 99 mov dx, VBOX_UART_BASE 100 in al, dx ; clear receiver 101 mov dx, VBOX_UART_BASE + 5 102 in al, dx ; clear line status 103 inc dx 104 in al, dx ; clear modem status 105 106 pop edx 107 pop eax 74 push eax 75 push edx 76 77 mov dx, VBOX_UART_BASE + 2 78 mov al, 0 79 out dx, al ; Disable the fifos (old software relies on it) 80 81 mov dx, VBOX_UART_BASE + 3 82 mov al, 80h 83 out dx, al ; make DL register accessible 84 85 mov dx, VBOX_UART_BASE 86 mov ax, VBOX_UART_RATE 87 out dx, al ; write low bps rate divisor 88 89 mov dx, VBOX_UART_BASE+1 90 xchg al, ah 91 out dx, al ; write high bps rate divisor 92 93 mov dx, VBOX_UART_BASE + 3 94 mov al, VBOX_UART_PARAMS 95 out dx, al ; write parameters & lock divisor 96 97 mov dx, VBOX_UART_BASE + 4 ; disconnect the UART from the int line 98 mov al, 0 99 out dx, al 100 101 mov dx, VBOX_UART_BASE + 1 ; disable UART ints 102 out dx, al 103 104 mov dx, VBOX_UART_BASE 105 in al, dx ; clear receiver 106 mov dx, VBOX_UART_BASE + 5 107 in al, dx ; clear line status 108 inc dx 109 in al, dx ; clear modem status 110 mov dx, VBOX_UART_BASE + 2 111 in al, dx ; clear interrupts (IIR) 112 113 pop edx 114 pop eax 108 115 %endmacro 109 116
Note:
See TracChangeset
for help on using the changeset viewer.