home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Serving the Web
/
ServingTheWeb1995.disc1of1.iso
/
connect
/
tcpip
/
crynwr
/
pktd11a
/
getea.asm
< prev
next >
Wrap
Assembly Source File
|
1992-08-05
|
548b
|
28 lines
;put into the public domain by Russell Nelson, nelson@crynwr.com
ether_byte db ?,?,?,?
get_eaddr:
;enter with ds:si -> Ethernet address to parse, es:di -> place to put it.
mov cx,EADDR_LEN
get_eaddr_2:
push cx
push di
mov di,offset ether_byte
call get_hex
mov al,cl ;remember the number in al.
pop di
pop cx
jc get_eaddr_3 ;exit if no number at all.
stosb ;store a byte.
cmp byte ptr [si],':' ;skip colons between bytes.
jne get_eaddr_4
inc si
get_eaddr_4:
loop get_eaddr_2
clc
get_eaddr_3:
ret