Phar Lap Macro Assembler Version 4.1 Wed Jul 27 11:31:36 1994 Page 1-1 ; ; outfast.asm - some optimized comms st uff for VPX ; ; outveryfast ; ; eax = pointer to data ; edx = link adapter base register ; ebx = no of bytes to send ; .PROT assume cs:_text 00000000 _text segment public outveryfast_ public outsw_ public wmemcpy_ ;{{{ outveryfast_ proc 00000000 outveryfast_ proc 00000000 51 push ecx 00000001 56 push esi 00000002 FC cld ; clear decreme nt flag, i assume 00000003 8B F0 mov esi,eax ; save away for pump 00000005 8B CB mov ecx,ebx 00000007 66| 83 C2 03 add dx, 3 ; output status 0000000B #next_byte_reset: 0000000B 33 DB xor ebx,ebx ; clear error c ount 0000000D #next_byte: 0000000D EC in al,dx 0000000E 24 01 and al, 1 00000010 0F 84 00000012 jz #loop_check ; output reg has cleared... 00000016 #loop_ready: 00000016 66| 83 F2 02 xor dx, 2 ; move to data r egister 0000001A 6E outsb ; output data in [esi++] to dx 0000001B 66| 83 F2 02 xor dx, 2 ; move to status register Phar Lap Macro Assembler Version 4.1 Wed Jul 27 11:31:36 1994 Page 1-2 0000001F E2 EA loop #next_byte_reset 00000021 #exit_ok: 00000021 66| B8 0001 mov ax,1 00000025 5E pop esi 00000026 59 pop ecx 00000027 C3 ret 00000028 #loop_check: ; output reg has cleared... 00000028 43 inc ebx 00000029 81 F3 0003E800 xor ebx,256000 0000002F 75 DC jnz #next_byte 00000031 #exit_err: 00000031 66| B8 0000 mov ax,0 00000035 5E pop esi 00000036 59 pop ecx 00000037 C3 ret outveryfast_ endp ;}}} ; outsw - fifo transmit, followed by le ngth word wown LA ; ; eax = length word ; edx = link adapter base register ; ebx = address of data to send ; ecx = no of bytes to send ; ; ;{{{ outsw_ proc 00000038 outsw_ proc 00000038 56 push esi 00000039 83 C1 03 add ecx, 3 ; mak e n_bytes be a multiple of 0000003C 83 E1 FC and ecx, -4 ; 4 b ytes 0000003F D1 E9 shr ecx, 1 ; con vert to shorts ; now do the fifo output 00000041 8B F3 mov esi,ebx ; set up data base pointer 00000043 66| 83 F2 04 xor dx, 4 ; poi nt at fifo read/write port 00000047 F3/ 66| 6F rep outsw ; do Phar Lap Macro Assembler Version 4.1 Wed Jul 27 11:31:36 1994 Page 1-3 the transfer 0000004A 66| 83 F2 07 xor dx, 7 ; mov e to output status 0000004E 25 FFFFFFFF and eax, -1 00000053 0F 84 0000001F jz #outsw_exitok ; now do the link adapter 32-bit leng th-word output 00000059 8B C8 mov ecx, eax ; pus h length word into cx 0000005B E8 0000001F call output_byte 00000060 C1 E9 08 shr ecx, 8 00000063 E8 00000017 call output_byte 00000068 C1 E9 08 shr ecx, 8 0000006B E8 0000000F call output_byte 00000070 C1 E9 08 shr ecx, 8 00000073 E8 00000007 call output_byte 00000078 #outsw_exitok: 00000078 5E pop esi 00000079 B8 00000001 mov eax, 1 0000007E C3 ret ; ret urn to caller outsw_ endp ; ; local function to output a single byt e down LA ; ; dx = output status reg, ecx = byte to output ; ; on failure to output, returns to outs w caller ; 0000007F output_byte proc 0000007F 33 DB xor ebx,ebx ; do byte 0 00000081 #byte_loop: 00000081 EC in al,dx 00000082 24 01 and al, 1 00000084 0F 85 0000000E jnz #byte_doit ; out put reg has cleared... 0000008A 43 inc ebx 0000008B 81 F3 0003E800 xor ebx,256000 00000091 75 EE jnz #byte_loop 00000093 E9 0000000C jmp #byte_exiterr 00000098 #byte_doit: 00000098 8B C1 mov eax,ecx 0000009A 66| 83 F2 02 xor dx, 2 ; move to data r Phar Lap Macro Assembler Version 4.1 Wed Jul 27 11:31:36 1994 Page 1-4 egister 0000009E EE out dx, al ; output data in [esi++] to dx 0000009F 66| 83 F2 02 xor dx, 2 ; move to status register 000000A3 C3 ret 000000A4 #byte_exiterr: 000000A4 5E pop esi ; trash return a ddress to outsw 000000A5 5E pop esi ; real esi 000000A6 B8 00000000 mov eax, 0 ; put error code into eax for return 000000AB C3 ret ; and return to outsw caller output_byte endp ;}}} ; eax = dest ; edx = src ; ebx = no of bytes to send ; ;{{{ wmemcpy_ proc 000000AC wmemcpy_ proc 000000AC 51 push ecx 000000AD 56 push esi 000000AE 57 push edi 000000AF 8B CB mov ecx,ebx 000000B1 C1 E9 02 shr ecx,2 000000B4 8B F2 mov esi,edx 000000B6 8B F8 mov edi,eax 000000B8 F3/ A5 rep movsd 000000BA 5F pop edi 000000BB 5E pop esi 000000BC 59 pop ecx 000000BD C3 ret wmemcpy_ endp ;}}} 000000BE _text ends end Phar Lap Macro Assembler Version 4.1 Wed Jul 27 11:31:36 1994 Symbols-1 GROUPS AND SEGMENTS Name Size Use Align Combine Class _text . . . . . . . . . . . . . 000000BE USE32 PARA NONE PROCEDURES Name Type Offset Scope Segment output_byte . . . . . . . . . . N PROC 0000007F Prvate _text LOCAL VARIABLES AND LABELS #byte_doit . . . . . . . . . N LABEL 00000098 Local _text #byte_exiterr . . . . . . . . N LABEL 000000A4 Local _text #byte_loop . . . . . . . . . N LABEL 00000081 Local _text outsw_ . . . . . . . . . . . . . N PROC 00000038 Public _text LOCAL VARIABLES AND LABELS #outsw_exitok . . . . . . . . N LABEL 00000078 Local _text outveryfast_ . . . . . . . . . . N PROC 00000000 Public _text LOCAL VARIABLES AND LABELS #exit_err . . . . . . . . . . N LABEL 00000031 Local _text #exit_ok . . . . . . . . . . N LABEL 00000021 Local _text #loop_check . . . . . . . . . N LABEL 00000028 Local _text #loop_ready . . . . . . . . . N LABEL 00000016 Local _text #next_byte . . . . . . . . . N LABEL 0000000D Local _text #next_byte_reset . . . . . . N LABEL 0000000B Local _text wmemcpy_ . . . . . . . . . . . . N PROC 000000AC Public _text 15 Symbols 0 Warning Errors 0 Severe Errors