search_dos_dir returns attributes in DL, so we shouldn't push/pop DX
around this function!
; ZF clear
; SI = file pointer
; EAX = file length (MAY BE ZERO!)
-; DL = file attributes
+; DL = file attribute
+; DH = clobbered
; If unsuccessful
; ZF set
+; EAX, SI, DX clobbered
;
search_dos_dir:
jnz .alloc_failure
push cx
- push dx
push gs
push es
push ds
.failure:
pop es
pop gs
- pop dx
pop cx
.alloc_failure:
pop bx
pop es
pop gs
- pop dx
pop cx
pop bx
ret