wok diff linld/stuff/src/CRTL.ASM @ rev 23984

linld: fix bootiso/strhead
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 25 20:41:41 2020 +0000 (2020-11-25)
parents fc88d0826de4
children 555bcdab610b
line diff
     1.1 --- a/linld/stuff/src/CRTL.ASM	Tue Nov 24 08:47:45 2020 +0000
     1.2 +++ b/linld/stuff/src/CRTL.ASM	Wed Nov 25 20:41:41 2020 +0000
     1.3 @@ -135,20 +135,17 @@
     1.4          global  @strcmp$qpxzct1:near
     1.5          proc    @strcmp$qpxzct1 near
     1.6  
     1.7 -                push	si
     1.8 -		xchg	ax,si
     1.9 -		dec	bx
    1.10 -@@lp:
    1.11 -		inc	bx
    1.12 -		lodsb
    1.13 -		sub	al,[bx]
    1.14 -		jnz	@@out
    1.15 -		or	al,[bx]
    1.16 -		jnz	@@lp
    1.17 -@@out:
    1.18 -		cbw
    1.19 -                pop	si
    1.20 -                ret
    1.21 +@@loop:
    1.22 +		xchg	ax,bx
    1.23 +                mov	cl,[bx]			; cl = *b++
    1.24 +                inc	bx
    1.25 +		xchg	ax,bx
    1.26 +                cmp	cl,[bx]			; cl ?= *a++
    1.27 +		jnz	fail			; return -1
    1.28 +                inc	bx
    1.29 +		or	cl,cl			; clear C
    1.30 +		jz	failifc			; return 0
    1.31 +                jmp	@@loop
    1.32  
    1.33          endp    @strcmp$qpxzct1
    1.34  	endif
    1.35 @@ -169,6 +166,7 @@
    1.36  
    1.37  open:						; open(bx)
    1.38  	ifdef	ISOHOOK
    1.39 +;_fastcall int open(bx:const char* name);
    1.40  		extrn	iso_open_hack:word
    1.41  		call	[iso_open_hack]		; or ret
    1.42  	endif
    1.43 @@ -255,6 +253,7 @@
    1.44                  mov	ah,3Fh
    1.45  		endif
    1.46  	ifdef	ISOHOOK
    1.47 +;_fastcall int read(bx:int fd, dx:void* data, cx:int sz);
    1.48  		extrn	iso_read_hack:word
    1.49  		call	[iso_read_hack]		; or ret
    1.50  	endif
    1.51 @@ -298,6 +297,7 @@
    1.52  		sbb	cx,cx
    1.53  lseekset:
    1.54  	ifdef	ISOHOOK
    1.55 +;_fastcall long lseek(ax:int fd, cxdx:unsigned long offset, bl:whence);
    1.56  		extrn	iso_lseek_hack:word
    1.57  		call	[iso_lseek_hack]	; or ret
    1.58  	endif
    1.59 @@ -417,7 +417,7 @@
    1.60  		endif
    1.61  		cmp	[byte bx],'|'
    1.62  		je	@@test
    1.63 -		cmp	[byte bx],0
    1.64 +		cmp	[byte bx],dh
    1.65  		je	@@test
    1.66  		mov	al,-1
    1.67  		inc	bx
    1.68 @@ -425,7 +425,7 @@
    1.69  @@test:
    1.70  		or	al,al			; 1st loop ?
    1.71  		jns	@@testal
    1.72 -		cmp	[byte bx],0
    1.73 +		cmp	[byte bx],dh
    1.74  		jne	@@loop
    1.75  @@testal:
    1.76  		cmp	al,'='