Category : Network Files
Archive   : TCP_SRC.ZIP
Filename : PKTERR.ASM

 
Output of file : PKTERR.ASM contained in archive : TCP_SRC.ZIP
;put into the public domain by Russell Nelson, [email protected]

err0 db "No error at all.",'$'
err1 db "Invalid handle number",'$'
err2 db "No interfaces of specified class found",'$'
err3 db "No interfaces of specified type found",'$'
err4 db "No interfaces of specified number found",'$'
err5 db "Bad packet type specified",'$'
err6 db "This interface does not support multicast",'$'
err7 db "This packet driver cannot terminate",'$'
err8 db "An invalid receiver mode was specified",'$'
err9 db "Operation failed because of insufficient space",'$'
err10 db "The type had previously been accessed, and not released.",'$'
err11 db "The command was out of range, or not implemented",'$'
err12 db "The packet couldn't be sent (usually hardware error)",'$'
err13 db "Hardware address couldn't be changed (more than 1 handle open)",'$'
err14 db "Hardware address has bad length or format",'$'
errunk db "Unknown error",'$'

errlist dw err0, err1, err2, err3, err4, err5, err6, err7, err8
dw err9, err10, err11, err12, err13, err14
error_count equ ($ - errlist)/2

fatal_error:
call print_error
jnc fatal_error_1 ;Only terminate if there really
int 20h ; was an error.
fatal_error_1:
ret

print_error:
;enter with cy set if an error occured, dh is the error number. If cy
; is not set, don't print anything. Don't change any registers.
pushf
jnc print_error_1
or dh,dh
je print_error_1
push ax
push bx
push dx
push ds

push cs
pop ds

mov bl,dh
xor bh,bh
mov dx,offset errunk ;in case we don't know about it.
cmp bl,error_count ;Do we know about this error number?
jae print_error_2 ; no, bail out.
shl bx,1
mov dx,errlist[bx]
print_error_2:
mov ah,9
int 21h

mov al,13 ;crlf.
call chrout
mov al,10
call chrout

pop ds
pop dx
pop bx
pop ax
print_error_1:
popf
ret


  3 Responses to “Category : Network Files
Archive   : TCP_SRC.ZIP
Filename : PKTERR.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/