wok-current diff linld/stuff/src/CRTL.ASM @ rev 20485
linld: fix memcpy32 (16 low mem case)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Oct 23 08:25:49 2018 +0200 (2018-10-23) |
parents | 81a3d87e0965 |
children | 049ced0bd387 |
line diff
1.1 --- a/linld/stuff/src/CRTL.ASM Sun Oct 21 17:30:30 2018 +0200 1.2 +++ b/linld/stuff/src/CRTL.ASM Tue Oct 23 08:25:49 2018 +0200 1.3 @@ -482,8 +482,8 @@ 1.4 xor eax,eax 1.5 else 1.6 xor ax,ax 1.7 + cwd 1.8 endif 1.9 - cwd 1.10 mov [(image_himem di).fd],ax 1.11 mov bx,[(image_himem di).state] 1.12 cmp al,[bx] ; "" 1.13 @@ -501,7 +501,7 @@ 1.14 mov [(image_himem di).state],cx 1.15 dec si 1.16 push [word si] 1.17 - mov [byte si],dl ; set temp eos 1.18 + mov [byte si],ah ; set temp eos 1.19 call open 1.20 pop [word si] ; restore string 1.21 jc @@die 1.22 @@ -861,26 +861,19 @@ 1.23 global _open_image:near 1.24 proc _open_image near 1.25 1.26 - pop ax ;caller return address 1.27 + pop cx ;caller return address 1.28 pop bx ; name 1.29 - pop cx ; m 1.30 + pop ax ; m 1.31 + push ax 1.32 + push bx 1.33 push cx 1.34 - push bx 1.35 - push ax 1.36 push di 1.37 - mov di,cx 1.38 - ifndef NO386 1.39 - xor eax,eax ; 1st loop flag + eos 1.40 - else 1.41 - xor ax,ax ; 1st loop flag + eos 1.42 - endif 1.43 + xchg ax,di 1.44 mov [(image_himem di).next_chunk],offset next_chunk 1.45 mov [(image_himem di).state],bx 1.46 push bx 1.47 @@next: 1.48 - push di 1.49 call [(image_himem di).next_chunk] ; m->next_chunk() 1.50 - pop di 1.51 ifndef NO386 1.52 add eax,3 1.53 and al,0FCh 1.54 @@ -984,9 +977,7 @@ 1.55 sub [word sz],ax 1.56 pushf 1.57 jcxz @@same_chunk 1.58 - push di 1.59 call [(image_himem di).next_chunk] 1.60 - pop di 1.61 @@same_chunk: 1.62 popf 1.63 jnz @@loop