Changeset 566 in xtideuniversalbios for trunk/Assembly_Library


Ignore:
Timestamp:
Aug 29, 2013, 12:49:15 AM (11 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Fixed a very old bug (from r150) in IdeError.asm where GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX would return RET_HD_SEEK_FAIL instead of RET_HD_STATUSERR.
  • Optimizations and other fixes.
Location:
trunk/Assembly_Library
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/Macros.inc

    r258 r566  
    11; Project name  :   Assembly Library
    22; Description   :   This is the place to put various generic macros.
    3 ;                   Should be included immediately after emulate.inc
     3;                   Should be included immediately after Emulate.inc
    44%ifndef MACROS_INC
    55%define MACROS_INC
  • trunk/Assembly_Library/Src/Serial/SerialServer.asm

    r526 r566  
    9292
    9393        mov     al,047h
    94         inc     dx              ;  fifo
     94        inc     dx              ; fifo
    9595        out     dx,al
    9696
    9797        mov     al,03h
    98         inc     dx              ;  linecontrol
     98        inc     dx              ; linecontrol
    9999        out     dx,al
    100100
    101101        mov     al,0bh
    102         inc     dx              ;  modemcontrol
    103         out     dx,al
    104 
    105         inc     dx              ;  linestatus (no output now, just setting up BH for later use)
     102        inc     dx              ; modemcontrol
     103        out     dx,al
     104
     105        inc     dx              ; linestatus (no output now, just setting up BH for later use)
    106106        mov     bh,dl
    107107
     
    158158        mov     cx,0101h        ; writing 256 words (plus 1)
    159159
    160         shr     ah,1            ; command byte, are we doing a write?
     160        sahf                    ; command byte, are we doing a write?
    161161        jnc     .readEntry
    162162
     
    285285; taken care of this, but I have seen cases where this is not true.
    286286;
    287         xor     cx,cx                   ; timeout this clearing routine, in case the UART isn't there
     287        xor     cx,cx           ; timeout this clearing routine, in case the UART isn't there
    288288.clearBuffer:
    289289        mov     dl,bh
     
    294294        test    al,1
    295295        in      al,dx
    296         loopnz  .clearBuffer            ; note ZF from test above
     296        loopnz  .clearBuffer    ; note ZF from test above
    297297
    298298.clearBufferComplete:
    299         mov     al, 3           ;  error return code and CF (low order bit)
     299        mov     al, 1           ; error return code
    300300
    301301ALIGN JUMP_ALIGN
    302302SerialServer_OutputWithParameters_ReturnCodeInAL:
    303303%if 0
    304         sti                     ;  all paths here will already have interrupts turned back on
    305 %endif
    306         mov     ah, al          ;  for success, AL will already be zero
    307 
    308         pop     bx              ;  recover "ax" (command and count) from stack
    309         pop     cx              ;  recover saved sector count
     304        sti                     ; all paths here will already have interrupts turned back on
     305%endif
     306        mov     ah, al          ; for success, AL will already be zero
     307
     308        pop     bx              ; recover "ax" (command and count) from stack
     309        pop     cx              ; recover saved sector count
    310310        xor     ch, ch
    311311        sub     cl, bl          ; subtract off the number of sectors that remained
     
    315315        pop     si
    316316
    317         shr     ah, 1           ; shift down return code and CF
     317        sahf                    ; error return code to CF
    318318
    319319        ret
     
    440440;
    441441        sti
     442%ifndef SERIALSERVER_TIMER_LOCATION
    442443        mov     cl,SerialServer_WaitAndPoll_SoftDelayTicks
    443 %ifndef SERIALSERVER_TIMER_LOCATION
    444444        call    Timer_InitializeTimeoutWithTicksInCL
    445445%else
Note: See TracChangeset for help on using the changeset viewer.