Changeset 6525 in vbox for trunk/include/VBox
- Timestamp:
- Jan 28, 2008 12:52:23 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/asmdefs.mac
r5999 r6525 24 24 ; 25 25 26 %ifndef __ VBox_asmdefs_mac__27 %define __ VBox_asmdefs_mac__26 %ifndef ___VBox_asmdefs_mac 27 %define ___VBox_asmdefs_mac 28 28 29 29 ;; @def VBOX_WITH_STATISTICS … … 40 40 41 41 42 ;%define UART_BASE 2f8h ; com2 43 %define UART_BASE 3f8h ; com1 44 %define UART_RATE 12 ; 9600 bps 45 %define UART_PARAMS 00000011b ; 8n1 42 %ifndef VBOX_UART_BASE 43 %ifndef IPRT_UART_BASE 44 %define VBOX_UART_BASE 3f8h ; COM1 (see src/VBox/Runtime/common/log/logcom.cpp) 45 %else 46 %define VBOX_UART_BASE IPRT_UART_BASE 47 %endif 48 %endif 49 %ifndef VBOX_UART_RATE 50 %define VBOX_UART_RATE 12 ; 9600 bps 51 %endif 52 %ifndef VBOX_UART_PARAMS 53 %define VBOX_UART_PARAMS 00000011b ; 8n1 54 %endif 46 55 47 56 … … 49 58 ; Initializes the com port to 9600 baud 8n1. 50 59 ; al and dx are wasted. 51 ; @todo comport init doesn't quite work . :/60 ; @todo comport init doesn't quite work - therefore we no longer use this! :-/ 52 61 %macro COM_INIT 0 53 62 push eax 54 63 push edx 55 64 56 mov dx, UART_BASE + 365 mov dx, VBOX_UART_BASE + 3 57 66 mov al, 80h 58 67 out dx, al ; make DL register accessible 59 68 60 mov dx, UART_BASE61 mov ax, UART_RATE69 mov dx, VBOX_UART_BASE 70 mov ax, VBOX_UART_RATE 62 71 out dx, ax ; write bps rate divisor 63 72 64 mov dx, UART_BASE + 365 mov al, UART_PARAMS73 mov dx, VBOX_UART_BASE + 3 74 mov al, VBOX_UART_PARAMS 66 75 out dx, al ; write parameters 67 76 68 77 69 78 xor ax, ax 70 mov dx, UART_BASE + 4; disconnect the UART from the int line71 out dx, al 72 73 mov dx, UART_BASE + 1; disable UART ints74 out dx, al 75 76 mov dx, UART_BASE + 2; disable the fifos (old software relies on it)77 out dx, al 78 79 mov dx, UART_BASE79 mov dx, VBOX_UART_BASE + 4 ; disconnect the UART from the int line 80 out dx, al 81 82 mov dx, VBOX_UART_BASE + 1 ; disable UART ints 83 out dx, al 84 85 mov dx, VBOX_UART_BASE + 2 ; disable the fifos (old software relies on it) 86 out dx, al 87 88 mov dx, VBOX_UART_BASE 80 89 in al, dx ; clear receiver 81 mov dx, UART_BASE + 590 mov dx, VBOX_UART_BASE + 5 82 91 in al, dx ; clear line status 83 92 inc dx … … 106 115 mov cx, %%stringend - %%string 107 116 %%status: 108 mov dx, UART_BASE + 5117 mov dx, VBOX_UART_BASE + 5 109 118 in al, dx 110 119 test al, 20h … … 112 121 113 122 mov al, [esi] 114 mov dx, UART_BASE123 mov dx, VBOX_UART_BASE 115 124 out dx, al 116 125 inc esi … … 119 128 120 129 %%status2: 121 mov dx, UART_BASE + 5130 mov dx, VBOX_UART_BASE + 5 122 131 in al, dx 123 132 test al, 20h … … 143 152 mov cx, %%stringend - %%string 144 153 %%status: 145 mov dx, UART_BASE + 5154 mov dx, VBOX_UART_BASE + 5 146 155 in al, dx 147 156 test al, 20h … … 149 158 150 159 mov al, [rsi] 151 mov dx, UART_BASE160 mov dx, VBOX_UART_BASE 152 161 out dx, al 153 162 inc rsi … … 156 165 157 166 %%status2: 158 mov dx, UART_BASE + 5167 mov dx, VBOX_UART_BASE + 5 159 168 in al, dx 160 169 test al, 20h … … 184 193 185 194 %%status: 186 mov dx, UART_BASE + 5195 mov dx, VBOX_UART_BASE + 5 187 196 in al, dx 188 197 test al, 20h … … 190 199 191 200 mov al, %1 192 mov dx, UART_BASE201 mov dx, VBOX_UART_BASE 193 202 out dx, al 194 203 195 204 %%status2: 196 mov dx, UART_BASE + 5205 mov dx, VBOX_UART_BASE + 5 197 206 in al, dx 198 207 test al, 20h … … 213 222 214 223 %%status: 215 mov dx, UART_BASE + 5224 mov dx, VBOX_UART_BASE + 5 216 225 in al, dx 217 226 test al, 20h … … 219 228 220 229 mov al, %1 221 mov dx, UART_BASE230 mov dx, VBOX_UART_BASE 222 231 out dx, al 223 232 224 233 %%status2: 225 mov dx, UART_BASE + 5234 mov dx, VBOX_UART_BASE + 5 226 235 in al, dx 227 236 test al, 20h … … 237 246 238 247 %%status: 239 mov dx, UART_BASE + 5248 mov dx, VBOX_UART_BASE + 5 240 249 in al, dx 241 250 test al, 20h … … 243 252 244 253 mov al, %1 245 mov dx, UART_BASE254 mov dx, VBOX_UART_BASE 246 255 out dx, al 247 256 248 257 %%status2: 249 mov dx, UART_BASE + 5258 mov dx, VBOX_UART_BASE + 5 250 259 in al, dx 251 260 test al, 20h … … 273 282 274 283 %%status1: 275 mov dx, UART_BASE + 5284 mov dx, VBOX_UART_BASE + 5 276 285 in al, dx 277 286 test al, 20h … … 279 288 280 289 mov al, 13 281 mov dx, UART_BASE290 mov dx, VBOX_UART_BASE 282 291 out dx, al 283 292 284 293 %%status2: 285 mov dx, UART_BASE + 5294 mov dx, VBOX_UART_BASE + 5 286 295 in al, dx 287 296 test al, 20h … … 289 298 290 299 mov al, 10 291 mov dx, UART_BASE300 mov dx, VBOX_UART_BASE 292 301 out dx, al 293 302 294 303 %%status3: 295 mov dx, UART_BASE + 5304 mov dx, VBOX_UART_BASE + 5 296 305 in al, dx 297 306 test al, 20h … … 312 321 313 322 %%status1: 314 mov dx, UART_BASE + 5323 mov dx, VBOX_UART_BASE + 5 315 324 in al, dx 316 325 test al, 20h … … 318 327 319 328 mov al, 13 320 mov dx, UART_BASE329 mov dx, VBOX_UART_BASE 321 330 out dx, al 322 331 323 332 %%status2: 324 mov dx, UART_BASE + 5333 mov dx, VBOX_UART_BASE + 5 325 334 in al, dx 326 335 test al, 20h … … 328 337 329 338 mov al, 10 330 mov dx, UART_BASE339 mov dx, VBOX_UART_BASE 331 340 out dx, al 332 341 333 342 %%status3: 334 mov dx, UART_BASE + 5343 mov dx, VBOX_UART_BASE + 5 335 344 in al, dx 336 345 test al, 20h … … 346 355 347 356 %%status1: 348 mov dx, UART_BASE + 5357 mov dx, VBOX_UART_BASE + 5 349 358 in al, dx 350 359 test al, 20h … … 352 361 353 362 mov al, 13 354 mov dx, UART_BASE363 mov dx, VBOX_UART_BASE 355 364 out dx, al 356 365 357 366 %%status2: 358 mov dx, UART_BASE + 5367 mov dx, VBOX_UART_BASE + 5 359 368 in al, dx 360 369 test al, 20h … … 362 371 363 372 mov al, 10 364 mov dx, UART_BASE373 mov dx, VBOX_UART_BASE 365 374 out dx, al 366 375 367 376 %%status3: 368 mov dx, UART_BASE + 5377 mov dx, VBOX_UART_BASE + 5 369 378 in al, dx 370 379 test al, 20h … … 399 408 400 409 %%status0: 401 mov dx, UART_BASE + 5410 mov dx, VBOX_UART_BASE + 5 402 411 in al, dx 403 412 test al, 20h … … 413 422 add al, 'a' - 10 414 423 %%print: 415 mov dx, UART_BASE424 mov dx, VBOX_UART_BASE 416 425 out dx, al 417 426 … … 441 450 442 451 %%status0: 443 mov dx, UART_BASE + 5452 mov dx, VBOX_UART_BASE + 5 444 453 in al, dx 445 454 test al, 20h … … 455 464 add al, 'a' - 10 456 465 %%print: 457 mov dx, UART_BASE466 mov dx, VBOX_UART_BASE 458 467 out dx, al 459 468 … … 478 487 479 488 %%status0: 480 mov dx, UART_BASE + 5489 mov dx, VBOX_UART_BASE + 5 481 490 in al, dx 482 491 test al, 20h … … 492 501 add al, 'a' - 10 493 502 %%print: 494 mov dx, UART_BASE503 mov dx, VBOX_UART_BASE 495 504 out dx, al 496 505 … … 526 535 527 536 %%status0: 528 mov dx, UART_BASE + 5537 mov dx, VBOX_UART_BASE + 5 529 538 in al, dx 530 539 test al, 20h … … 540 549 add al, 'a' - 10 541 550 %%print: 542 mov dx, UART_BASE551 mov dx, VBOX_UART_BASE 543 552 out dx, al 544 553 … … 568 577 569 578 %%status0: 570 mov dx, UART_BASE + 5579 mov dx, VBOX_UART_BASE + 5 571 580 in al, dx 572 581 test al, 20h … … 582 591 add al, 'a' - 10 583 592 %%print: 584 mov dx, UART_BASE593 mov dx, VBOX_UART_BASE 585 594 out dx, al 586 595 … … 606 615 607 616 %%status0: 608 mov dx, UART_BASE + 5617 mov dx, VBOX_UART_BASE + 5 609 618 in al, dx 610 619 test al, 20h … … 620 629 add al, 'a' - 10 621 630 %%print: 622 mov dx, UART_BASE631 mov dx, VBOX_UART_BASE 623 632 out dx, al 624 633 … … 651 660 mov ebx, %1 ; get value we're supposed to print 652 661 %%status0: 653 mov dx, UART_BASE + 5662 mov dx, VBOX_UART_BASE + 5 654 663 in al, dx 655 664 test al, 20h … … 665 674 add al, 'a' - 10 666 675 %%print: 667 mov dx, UART_BASE676 mov dx, VBOX_UART_BASE 668 677 out dx, al 669 678 … … 680 689 mov ebx, %1 ; get value we're supposed to print 681 690 %%status0: 682 mov dx, UART_BASE + 5691 mov dx, VBOX_UART_BASE + 5 683 692 in al, dx 684 693 test al, 20h … … 694 703 add al, 'a' - 10 695 704 %%print: 696 mov dx, UART_BASE705 mov dx, VBOX_UART_BASE 697 706 out dx, al 698 707
Note:
See TracChangeset
for help on using the changeset viewer.