Changeset 561 for sbliveos2/trunk/lib32


Ignore:
Timestamp:
Jul 28, 2011, 11:16:56 AM (14 years ago)
Author:
rudi
Message:

SBLliveOS2: Adapt to newer OpenWatcom versions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sbliveos2/trunk/lib32/debug.c

    r151 r561  
    5050
    5151char hextab[]="0123456789ABCDEF";
     52
     53#ifdef DEBUG                            //--------------------------- CharOut -
     54void CharOut(char c)
     55{
     56        _asm    {
     57
     58        mov     dx, MAGIC_COMM_PORT     // address of PS/2's first COM port
     59        add     dx, UART_LINE_STAT
     60
     61ReadyCheck:
     62        in      al, dx                                                          // wait for comm port ready signal
     63
     64        DELAY
     65        DELAY
     66        DELAY
     67
     68        test    al, 020h
     69        jz      ReadyCheck
     70
     71        // Send the character
     72
     73        add     dx, UART_DATA - UART_LINE_STAT
     74        mov     al,c
     75        out     dx, al
     76
     77        DELAY
     78        DELAY
     79        DELAY
     80        }
     81}
     82#endif
     83
     84#ifdef DEBUG                            //------------------------- StringOut -
     85void StringOut(char *DbgStr)
     86{
     87   while (*DbgStr)
     88      CharOut(*DbgStr++);
     89
     90   if (fLineTerminate)
     91   {
     92      CharOut(CR);                              // append carriage return,
     93      CharOut(LF);                              // linefeed
     94   }
     95}
     96#endif
     97
    5298
    5399                                        //-------------------- DecLongToASCII -
     
    373419}
    374420
    375 #ifdef DEBUG                            //------------------------- StringOut -
    376 void StringOut(char *DbgStr)
    377 {
    378    while (*DbgStr)
    379       CharOut(*DbgStr++);
    380 
    381    if (fLineTerminate)
    382    {
    383       CharOut(CR);                              // append carriage return,
    384       CharOut(LF);                              // linefeed
    385    }
    386 }
    387 #endif
    388 
    389421#ifdef DEBUG
    390422//#define       MAGIC_COMM_PORT 0x3f8           // pulled from word ptr 40:0
     
    405437#endif
    406438
    407 #ifdef DEBUG                            //--------------------------- CharOut -
    408 void CharOut(char c)
    409 {
    410         _asm    {
    411 
    412         mov     dx, MAGIC_COMM_PORT     // address of PS/2's first COM port
    413         add     dx, UART_LINE_STAT
    414 
    415 ReadyCheck:
    416         in      al, dx                                                          // wait for comm port ready signal
    417 
    418         DELAY
    419         DELAY
    420         DELAY
    421 
    422         test    al, 020h
    423         jz      ReadyCheck
    424 
    425         // Send the character
    426 
    427         add     dx, UART_DATA - UART_LINE_STAT
    428         mov     al,c
    429         out     dx, al
    430 
    431         DELAY
    432         DELAY
    433         DELAY
    434         }
    435 }
    436 #endif
Note: See TracChangeset for help on using the changeset viewer.