wok-next diff linld/stuff/src/MEMCPY32.ASM @ rev 20198
linld: updates from rolling
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Nov 03 15:13:54 2017 +0100 (2017-11-03) |
parents | 9107c8697bd1 |
children |
line diff
1.1 --- a/linld/stuff/src/MEMCPY32.ASM Fri Mar 17 15:18:10 2017 +0100 1.2 +++ b/linld/stuff/src/MEMCPY32.ASM Fri Nov 03 15:13:54 2017 +0100 1.3 @@ -39,15 +39,17 @@ 1.4 push ss 1.5 push ax 1.6 pop [dword cs:sssp] 1.7 + mov [word bx+4],offset step19 1.8 else 1.9 + mov ax,offset step19 1.10 + xchg ax,[word bx+4] 1.11 push [word bx+6] 1.12 - push [word bx+4] ; save step 1.13 + push ax ; save step 1.14 mov [word cs:sssp],sp 1.15 mov [word cs:sssp+2],ss 1.16 endif 1.17 ;cmp [byte bx+7],0F0h 1.18 ;jnc notdos 1.19 - mov [word bx+4],offset step19 1.20 mov [bx+6],cs 1.21 pushf 1.22 pop ax 1.23 @@ -72,10 +74,10 @@ 1.24 ifndef NO386 1.25 lss sp,[dword cs:sssp] 1.26 else 1.27 - lds bx,[dword cs:sssp] 1.28 + lds ax,[dword cs:sssp] 1.29 push ds 1.30 pop ss 1.31 - mov sp,bx 1.32 + xchg ax,sp 1.33 endif 1.34 xor bx,bx 1.35 mov ds,bx 1.36 @@ -168,13 +170,16 @@ 1.37 xor bx,bx 1.38 xor dx,dx 1.39 xor si,si 1.40 - mov ax,[bp+8] ; srcseg 1.41 - call near N_LXLSH@4 1.42 - add [bp+10],ax ; srcofs lo 1.43 - adc [bp+10+2],dx ; srcofs hi 1.44 + mov ax,[srcseg] 1.45 + mov cl,4 1.46 + extrn N_LXLSH@:near 1.47 + call near N_LXLSH@ 1.48 + add [word srcofs],ax 1.49 + adc [word srcofs+2],dx 1.50 @@2flat: 1.51 - mov ax,[bp+si+10] ; srcofs, dstofs lo 1.52 - mov dx,[bp+si+10+2] ; srcofs, dstofs hi 1.53 + mov ax,[word si+srcofs] ; srcofs, dstofs lo 1.54 + mov dx,[word si+srcofs+2] ; srcofs, dstofs hi 1.55 + extrn N_LXURSH@4:near 1.56 call near N_LXURSH@4 1.57 or bx,dx ; >=1mb flag 1.58 push ax ; srcseg, dstseg 1.59 @@ -182,8 +187,8 @@ 1.60 jnz @@2flat 1.61 pop dx ; dstseg 1.62 pop ax ; srcseg 1.63 - test bx,bx ; <1mb ? (clear C) 1.64 - jnz @@pmcopy 1.65 + dec bx ; <1mb ? 1.66 + jns @@pmcopy 1.67 push di 1.68 @@movlp: 1.69 mov ds,ax 1.70 @@ -260,7 +265,7 @@ 1.71 ;db 66h ;operand width override for ecx 1.72 db 67h ;address width override for esi/edi 1.73 rep movsb 1.74 - cld 1.75 + ;cld 1.76 1.77 ;****** Return to rm ******************************************* 1.78 dec ax ;CR0_PE off 1.79 @@ -298,39 +303,6 @@ 1.80 1.81 endp _memcpy32 1.82 1.83 - ifdef NO386 1.84 - global N_LXURSH@:near 1.85 - global N_LXURSH@4:near 1.86 - proc N_LXURSH@4 near 1.87 - 1.88 - mov cl,4 1.89 -N_LXURSH@: 1.90 - mov ch,0 1.91 -@@loop: 1.92 - shr dx,1 1.93 - rcr ax,1 1.94 - loop @@loop 1.95 - ret 1.96 - 1.97 - endp N_LXURSH@4 1.98 - 1.99 - global N_LXLSH@:near 1.100 - global N_LXLSH@4:near 1.101 - proc N_LXLSH@4 near 1.102 - 1.103 - mov cl,4 1.104 -N_LXLSH@: 1.105 - mov ch,0 1.106 -@@loop: 1.107 - shl ax,1 1.108 - rcl dx,1 1.109 - loop @@loop 1.110 - ret 1.111 - 1.112 - endp N_LXLSH@4 1.113 - 1.114 - endif 1.115 - 1.116 ends _TEXT 1.117 1.118 end