; Points to a null-terminated or :-terminated string in DS:SI
; and returns the name in EAX if it exists and can be found.
; If EAX = 0 on exit, the lookup failed.
-
+;
+; No segment assumptions permitted.
+;
section .text
dns_resolv:
push ds
;
; parse_dotquad:
-; Read a dot-quad pathname in DS:SI and output an IP
-; address in EAX, with SI pointing to the first
-; nonmatching character.
+; Read a dot-quad pathname in DS:SI and output an IP
+; address in EAX, with SI pointing to the first
+; nonmatching character.
;
-; Return CF=1 on error.
+; Return CF=1 on error.
+;
+; No segment assumptions permitted.
;
parse_dotquad:
push cx
; The first four bytes of the manged name is the IP address of
; the download host.
;
+; No segment assumptions permitted.
+;
mangle_name:
push di
push si
- mov eax,[ServerIP]
+ mov eax,[cs:ServerIP]
cmp byte [si],0
je .noip ; Null filename?!?!
cmp word [si],'::' ; Leading ::?