Changeset 293 in xtideuniversalbios for trunk/Assembly_Library/Src/Serial/SerialServer.asm


Ignore:
Timestamp:
Mar 4, 2012, 1:33:52 AM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Commit 1/2 (Library, Configurators and Serial Server):

  • Changed Emulate.inc so that making 286 and 386 versions now works. Additionally, only one processor type define is needed in the makefile.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Serial/SerialServer.asm

    r292 r293  
    33
    44%include "SerialServer.inc"
    5        
     5
    66; Section containing code
    77SECTION .text
    88
    99;--------------------------------------------------------------------
    10 ; SerialServer_SendReceive:     
     10; SerialServer_SendReceive:
    1111;   Parameters:
    1212;       DX:     Packed I/O port and baud rate
     
    2020;       AL, BX, CX, DX
    2121;--------------------------------------------------------------------
    22 SerialServer_SendReceive:       
    23        
     22SerialServer_SendReceive:
     23
    2424        push    si
    2525        push    di
     
    3737        mov     al,[bp+SerialServer_Command.bSectorCount]
    3838        mov     ah,[bp+SerialServer_Command.bCommand]
    39        
     39
    4040;
    4141; Command byte and sector count live at the top of the stack, pop/push are used to access
     
    4444        push    ax              ; working copy on the top of the stack
    4545
     46%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS   ; DF already cleared in Int13h.asm
    4647        cld
     48%endif
    4749
    4850;----------------------------------------------------------------------
     
    121123        jz      .zeroSectors
    122124%endif
    123        
     125
    124126;
    125127; Top of the read/write loop, one iteration per sector
     
    278280%endif
    279281        mov     ah, al          ;  for success, AL will already be zero
    280        
     282
    281283        pop     bx              ;  recover "ax" (command and count) from stack
    282284        pop     cx              ;  recover saved sector count
    283         mov     ch, 0
     285        xor     ch, ch
    284286        sub     cl, bl          ; subtract off the number of sectors that remained
    285287
     
    366368
    367369.writeTimeout1:
    368 %ifndef USE_186
    369         mov     ax,.writeByte1Ready
    370         push    ax              ; return address for ret at end of SC_writeTimeout2
    371 %else
    372         push    .writeByte1Ready
    373 %endif
     370        ePUSH_T ax, .writeByte1Ready    ; return address for ret at end of SC_writeTimeout2
    374371;;; fall-through
    375372
     
    381378;               One entry point fills in AH with 20h for write
    382379;       DX:     Port address (OK if already incremented to UART_lineStatus)
    383 ;       BX:     
     380;       BX:
    384381;       Stack:  2 words on the stack below the command/count word
    385382;   Returns:
     
    430427        pop     ax
    431428%endif
    432        
     429
    433430.WaitAndPoll:
    434431%ifndef SERIALSERVER_TIMER_LOCATION
     
    441438        pop     bx
    442439        pop     ax
    443 %endif     
     440%endif
    444441        jc      SerialServer_OutputWithParameters_ErrorAndPop4Words
    445442        in      al,dx
Note: See TracChangeset for help on using the changeset viewer.