[Reduction] #221-222: memset

Two functions, just differing in their order of parameters. It's...
convenient, I guess?
This commit is contained in:
nmlgc 2014-08-27 07:50:37 +02:00
parent 444901acb5
commit f3e9147459
16 changed files with 96 additions and 1127 deletions

60
libs/BorlandC/memset.asm Normal file
View File

@ -0,0 +1,60 @@
; void __cdecl setmem(void *addr, unsigned int len, char val)
public _setmem
_setmem proc DIST
@@addr = dword ptr 6
@@len = word ptr 0Ah
@@val = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
LES_ di, [bp+@@addr]
mov cx, [bp+@@len]
mov al, [bp+@@val]
mov ah, al
cld
test di, 1
jz short @@isAligned
jcxz short @@done
stosb
dec cx
@@isAligned:
shr cx, 1
rep stosw
jnb short @@noOdd
stosb
@@noOdd:
@@done:
pop di
pop si
pop bp
ret
_setmem endp
; void *__cdecl memset(void *src, int c, size_t n)
public _memset
_memset proc DIST
@@src = dword ptr 6
@@c = byte ptr 0Ah
@@n = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+@@c]
push [bp+@@n]
push word ptr [bp+@@src+2]
push word ptr [bp+@@src]
call _setmem
add sp, 8
mov dx, word ptr [bp+@@src+2]
mov ax, word ptr [bp+@@src]
pop di
pop si
pop bp
ret
_memset endp

View File

@ -8806,77 +8806,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_4947
jcxz short loc_494E
stosb
dec cx
loc_4947:
shr cx, 1
rep stosw
jnb short loc_494E
stosb
loc_494E:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -14198,9 +14128,7 @@ loc_7674:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_77C7
; ---------------------------------------------------------------------------

View File

@ -8685,85 +8685,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_4C29
jcxz short loc_4C30
stosb
dec cx
loc_4C29:
shr cx, 1
rep stosw
jnb short loc_4C30
stosb
loc_4C30:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc near
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
_memset endp ; sp-analysis failed
; =============== S U B R O U T I N E =======================================
; Attributes: library function
sub_4C4C proc far
mov dx, [bp+8]
mov ax, [bp+6]
pop di
pop si
pop bp
retf
sub_4C4C endp ; sp-analysis failed
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -14029,9 +13951,7 @@ loc_78EF:
push ss ; c
les bx, [bp+arg_6]
push word ptr es:[bx+36h]
nop
push cs ; s
call _memset
nopcall _memset
add sp, 8
jmp loc_7A42
; ---------------------------------------------------------------------------
@ -22694,7 +22614,7 @@ _s = dword ptr -4
call near ptr sub_B976
push large 7D0000FFh ; c
push large [bp+_s] ; s
call far ptr _memset
call _memset
add sp, 0Ah
push cs
call near ptr sub_BA0A
@ -22735,7 +22655,7 @@ sub_BB3C endp
call near ptr sub_B976
push large 7D0000FFh
push large dword ptr [bp-4]
call far ptr _memset
call _memset
add sp, 0Ah
push cs
call near ptr sub_BA0A
@ -22891,7 +22811,7 @@ var_2 = word ptr -2
push ss
lea ax, [bp+_s]
push ax ; s
call far ptr _memset
call _memset
add sp, 8
mov [bp+var_2], 0
jmp loc_BD2E
@ -23109,7 +23029,7 @@ loc_BDF4:
push ss
lea ax, [bp-32h]
push ax
call far ptr _memset
call _memset
add sp, 8
mov word ptr [bp-2], 0
jmp loc_BE9F
@ -25269,7 +25189,7 @@ loc_CF49:
push ss
lea ax, [bp-34h]
push ax
call far ptr _memset
call _memset
add sp, 8
xor di, di
jmp loc_CFFD

View File

@ -9886,9 +9886,7 @@ loc_48E8:
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
nop
push cs
call near ptr _setmem
nopcall _setmem
add sp, 8
mov bx, [bp+_length]
xor cx, cx
@ -12392,77 +12390,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_5F9F
jcxz short loc_5FA6
stosb
dec cx
loc_5F9F:
shr cx, 1
rep stosw
jnb short loc_5FA6
stosb
loc_5FA6:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -17868,9 +17796,7 @@ loc_8D62:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_8EB5
; ---------------------------------------------------------------------------

View File

@ -9270,77 +9270,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_676C
jcxz short loc_6773
stosb
dec cx
loc_676C:
shr cx, 1
rep stosw
jnb short loc_6773
stosb
loc_6773:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -14045,9 +13975,7 @@ loc_8C6D:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_8DC0
; ---------------------------------------------------------------------------

View File

@ -5230,77 +5230,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_4B6C
jcxz short loc_4B73
stosb
dec cx
loc_4B6C:
shr cx, 1
rep stosw
jnb short loc_4B73
stosb
loc_4B73:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -9954,9 +9884,7 @@ loc_706D:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_71C0
; ---------------------------------------------------------------------------

View File

@ -5313,77 +5313,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_51B9
jcxz short loc_51C0
stosb
dec cx
loc_51B9:
shr cx, 1
rep stosw
jnb short loc_51C0
stosb
loc_51C0:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -10046,9 +9976,7 @@ loc_76BA:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_780D
; ---------------------------------------------------------------------------

View File

@ -5559,78 +5559,7 @@ sub_4C4C endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_4CEE
jcxz short loc_4CF5
stosb
dec cx
loc_4CEE:
shr cx, 1
rep stosw
jnb short loc_4CF5
stosb
loc_4CF5:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
; sub_1D189+153P
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -10293,9 +10222,7 @@ loc_71EF:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_7342
; ---------------------------------------------------------------------------

View File

@ -4773,77 +4773,7 @@ sub_4B43 endp ; sp-analysis failed
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_4BBC
jcxz short loc_4BC3
stosb
dec cx
loc_4BBC:
shr cx, 1
rep stosw
jnb short loc_4BC3
stosb
loc_4BC3:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -9552,9 +9482,7 @@ loc_70BD:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_7210
; ---------------------------------------------------------------------------

View File

@ -5192,77 +5192,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_4E9E
jcxz short loc_4EA5
stosb
dec cx
loc_4E9E:
shr cx, 1
rep stosw
jnb short loc_4EA5
stosb
loc_4EA5:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -9968,9 +9898,7 @@ loc_739F:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_74F2
; ---------------------------------------------------------------------------

View File

@ -7802,77 +7802,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_60FA
jcxz short loc_6101
stosb
dec cx
loc_60FA:
shr cx, 1
rep stosw
jnb short loc_6101
stosb
loc_6101:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -12581,9 +12511,7 @@ loc_85FB:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_874E
; ---------------------------------------------------------------------------

View File

@ -4685,77 +4685,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_5662
jcxz short loc_5669
stosb
dec cx
loc_5662:
shr cx, 1
rep stosw
jnb short loc_5669
stosb
loc_5669:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -9415,9 +9345,7 @@ loc_7B63:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_7CB6
; ---------------------------------------------------------------------------

View File

@ -5298,77 +5298,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length= word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_5D22
jcxz short loc_5D29
stosb
dec cx
loc_5D22:
shr cx, 1
rep stosw
jnb short loc_5D29
stosb
loc_5D29:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length= word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -10075,9 +10005,7 @@ loc_8223:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_8376
; ---------------------------------------------------------------------------

View File

@ -8188,77 +8188,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_6426
jcxz short loc_642D
stosb
dec cx
loc_6426:
shr cx, 1
rep stosw
jnb short loc_642D
stosb
loc_642D:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -12915,9 +12845,7 @@ loc_8927:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_8A7A
; ---------------------------------------------------------------------------

View File

@ -5464,77 +5464,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_5B4E
jcxz short loc_5B55
stosb
dec cx
loc_5B4E:
shr cx, 1
rep stosw
jnb short loc_5B55
stosb
loc_5B55:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -10192,9 +10122,7 @@ loc_804F:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_81A2
; ---------------------------------------------------------------------------

View File

@ -4980,77 +4980,7 @@ _getenv endp
include libs/BorlandC/memcmp.asm
include libs/BorlandC/memcpy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl setmem(void *dest, unsigned int length, char value)
_setmem proc far
dest = dword ptr 6
_length = word ptr 0Ah
value = byte ptr 0Ch
push bp
mov bp, sp
push si
push di
les di, [bp+dest]
mov cx, [bp+_length]
mov al, [bp+value]
mov ah, al
cld
test di, 1
jz short loc_5972
jcxz short loc_5979
stosb
dec cx
loc_5972:
shr cx, 1
rep stosw
jnb short loc_5979
stosb
loc_5979:
pop di
pop si
pop bp
retf
_setmem endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void *__cdecl memset(void *s, int c, size_t n)
_memset proc far
dest = dword ptr 6
value = byte ptr 0Ah
_length = word ptr 0Ch
push bp
mov bp, sp
push si
push di
push word ptr [bp+value] ; value
push [bp+_length] ; length
push word ptr [bp+dest+2]
push word ptr [bp+dest] ; dest
push cs
call near ptr _setmem
add sp, 8
mov dx, word ptr [bp+dest+2]
mov ax, word ptr [bp+dest]
pop di
pop si
pop bp
retf
_memset endp
include libs/BorlandC/memset.asm
; =============== S U B R O U T I N E =======================================
@ -9659,9 +9589,7 @@ loc_7E73:
push ss
les bx, [bp+arg_6]
push word ptr es:[bx+36h] ; s
nop
push cs
call near ptr _memset
nopcall _memset
add sp, 8
jmp loc_7FC6
; ---------------------------------------------------------------------------