wok diff linld/stuff/src/CRTL.ASM @ rev 21569
Up zstd (1.4.0), fix linld: base_himem/strtol
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat May 18 13:29:32 2019 +0200 (2019-05-18) |
parents | 8685ee90f6aa |
children | 0e811092e7bb |
line diff
1.1 --- a/linld/stuff/src/CRTL.ASM Fri Feb 15 11:29:31 2019 +0100 1.2 +++ b/linld/stuff/src/CRTL.ASM Sat May 18 13:29:32 2019 +0200 1.3 @@ -380,31 +380,31 @@ 1.4 global @argstr$qpxzcxt1ppxzc:near 1.5 proc @argstr$qpxzcxt1ppxzc near 1.6 1.7 - stc 1.8 - db 73h ; jnc 1.9 + mov cl,2 1.10 + db 0a9h ; test ax,# 1.11 global @argnum$qpzcxpxzcpul:near 1.12 @argnum$qpzcxpxzcpul: 1.13 - clc 1.14 - 1.15 - xchg ax,bx ; keywords 1.16 - xchg ax,cx ; s 1.17 - xchg ax,dx ; vars 1.18 - sbb dx,dx ; str:-1 num:0 1.19 - sbb dx,-4 ; str:2 num:4 1.20 + mov cl,4 1.21 + xchg ax,bx ; keywords -> bx 1.22 + xchg ax,cx ; s -> cx 1.23 + cbw ; argstr:0002 argnum:0004 1.24 + xchg ax,dx ; vars -> ax 1.25 push si di 1.26 - xchg ax,di ; vars 1.27 + xchg ax,di ; vars => di 1.28 dec bx 1.29 - mov al,0 1.30 @@testalt: 1.31 + mov al,-1 1.32 sub di,dx 1.33 @@test: 1.34 cmp al,'=' 1.35 je @@found 1.36 + cmp al,0 ; eos, si=next argv 1.37 + je @@found 1.38 mov si,cx ; s 1.39 add di,dx 1.40 @@match: 1.41 - inc bx 1.42 - lodsb 1.43 + inc bx ; keywords++ 1.44 + lodsb ; *s++ 1.45 or al,20h 1.46 cmp al,[bx] 1.47 je @@match 1.48 @@ -414,10 +414,8 @@ 1.49 je @@match 1.50 @@notopt: 1.51 ifdef EXTRA 1.52 - add di,dx 1.53 cmp [byte bx],'/' 1.54 je @@testalt 1.55 - sub di,dx 1.56 endif 1.57 cmp [byte bx],'|' 1.58 je @@test 1.59 @@ -432,7 +430,7 @@ 1.60 dec dx 1.61 dec dx 1.62 je @@done 1.63 - push si 1.64 + mov bx,si 1.65 call @strtol$qpxzc 1.66 mov [di],ax 1.67 mov [di+2],dx 1.68 @@ -1038,21 +1036,19 @@ 1.69 1.70 1.71 ;*************************************************************** 1.72 -;pascal unsigned long strtol(const char *s); 1.73 +;_fastcall unsigned long strtol(const char *s); 1.74 ;*************************************************************** 1.75 global @strtol$qpxzc:near 1.76 proc @strtol$qpxzc near 1.77 1.78 - pop ax 1.79 - pop bx ; s 1.80 - push ax 1.81 ifndef NO386 1.82 - xor ebx,ebx 1.83 push si 1.84 - jcxz @@end 1.85 - mov si,cx 1.86 + mov si,bx 1.87 xor ecx,ecx 1.88 xor eax,eax 1.89 + xor ebx,ebx 1.90 + or si,si 1.91 + jz @@end 1.92 lodsb 1.93 mov dx,ax 1.94 or al,20h 1.95 @@ -1136,9 +1132,10 @@ 1.96 push di 1.97 xor ax,ax 1.98 cwd 1.99 - jcxz @@goend 1.100 + or bx,bx 1.101 + jz @@goend 1.102 xchg ax,di 1.103 - mov si,cx 1.104 + mov si,bx 1.105 lodsb 1.106 mov bx,ax 1.107 or al,20h