Changeset 13 for trunk/src/os2ahci/libc.c
- Timestamp:
- Sep 14, 2010, 10:07:59 AM (15 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/libc.c
r12 r13 27 27 * for printing custom messages via 28 28 * DevHelp_Save_Message() */ 29 30 #define COM_BASE 0x03f8 /* base address of COM port (COM1) */31 29 32 30 /* heap management constants */ … … 54 52 55 53 /* ------------------------ global/static variables ------------------------ */ 54 55 /* debug COM port base address */ 56 u16 com_base = 0x03f8; 56 57 57 58 static char hex_digits[] = "0123456789abcdef"; … … 99 100 100 101 for (i = 0; com1_init_sequence[i].reg != -1; i++) { 101 u16 port = COM_BASE+ com1_init_sequence[i].reg;102 u16 port = com_base + com1_init_sequence[i].reg; 102 103 u8 data = com1_init_sequence[i].data; 103 104 _asm { … … 248 249 * The C equivalent would look like this: 249 250 * 250 * while (!(inp( COM_BASE+ 5) & 0x20));251 * outp( COM_BASE, *s);251 * while (!(inp(com_base + 5) & 0x20)); 252 * outp(com_base, *s); 252 253 */ 253 254 254 255 _asm { 255 256 /* wait until COM transmitter is idle */ 256 mov dx, COM_BASE + 5; 257 mov dx, com_base; 258 add dx, 5; 257 259 transmitter_not_idle: 258 260 in al, dx; … … 261 263 262 264 /* output character to be sent */ 263 mov dx, COM_BASE;265 mov dx, com_base; 264 266 mov bx, s; 265 267 mov al, [bx]; … … 655 657 int disable(void) 656 658 { 657 int rc = 0;659 int rc; 658 660 659 661 _asm {
Note:
See TracChangeset
for help on using the changeset viewer.