Changeset 293 in xtideuniversalbios for trunk/Assembly_Library/Src/Serial
- Timestamp:
- Mar 4, 2012, 1:33:52 AM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Serial/SerialServer.asm
r292 r293 3 3 4 4 %include "SerialServer.inc" 5 5 6 6 ; Section containing code 7 7 SECTION .text 8 8 9 9 ;-------------------------------------------------------------------- 10 ; SerialServer_SendReceive: 10 ; SerialServer_SendReceive: 11 11 ; Parameters: 12 12 ; DX: Packed I/O port and baud rate … … 20 20 ; AL, BX, CX, DX 21 21 ;-------------------------------------------------------------------- 22 SerialServer_SendReceive: 23 22 SerialServer_SendReceive: 23 24 24 push si 25 25 push di … … 37 37 mov al,[bp+SerialServer_Command.bSectorCount] 38 38 mov ah,[bp+SerialServer_Command.bCommand] 39 39 40 40 ; 41 41 ; Command byte and sector count live at the top of the stack, pop/push are used to access … … 44 44 push ax ; working copy on the top of the stack 45 45 46 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS ; DF already cleared in Int13h.asm 46 47 cld 48 %endif 47 49 48 50 ;---------------------------------------------------------------------- … … 121 123 jz .zeroSectors 122 124 %endif 123 125 124 126 ; 125 127 ; Top of the read/write loop, one iteration per sector … … 278 280 %endif 279 281 mov ah, al ; for success, AL will already be zero 280 282 281 283 pop bx ; recover "ax" (command and count) from stack 282 284 pop cx ; recover saved sector count 283 mov ch, 0285 xor ch, ch 284 286 sub cl, bl ; subtract off the number of sectors that remained 285 287 … … 366 368 367 369 .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 374 371 ;;; fall-through 375 372 … … 381 378 ; One entry point fills in AH with 20h for write 382 379 ; DX: Port address (OK if already incremented to UART_lineStatus) 383 ; BX: 380 ; BX: 384 381 ; Stack: 2 words on the stack below the command/count word 385 382 ; Returns: … … 430 427 pop ax 431 428 %endif 432 429 433 430 .WaitAndPoll: 434 431 %ifndef SERIALSERVER_TIMER_LOCATION … … 441 438 pop bx 442 439 pop ax 443 %endif 440 %endif 444 441 jc SerialServer_OutputWithParameters_ErrorAndPop4Words 445 442 in al,dx
Note:
See TracChangeset
for help on using the changeset viewer.