Category : OS/2 Files
Archive   : EMXLIB8F.ZIP
Filename : MEMSET.S

 
Output of file : MEMSET.S contained in archive : EMXLIB8F.ZIP
/ memset.s (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes

.globl _memset

/ void *memset (void *s, int c, size_t n)
/ {
/ size_t i;
/
/ for (i = 0; i < n; ++i)
/ ((char *)s)[i] = (char)c;
/ return (s);
/ }

/ assumes ds=es!

.text

.align 2, 0x90

_memset:
pushl %edi
movl 2*4(%esp), %edi / s
movl 3*4(%esp), %eax / c
movl 4*4(%esp), %ecx / n
movb %al, %ah
movl %eax, %edx
shll $16, %eax
movw %dx, %ax
shrl $2, %ecx
rep
stosl
movl 4*4(%esp), %ecx / n
andl $3, %ecx
rep
stosb
movl 2*4(%esp), %eax / s
popl %edi
ret


  3 Responses to “Category : OS/2 Files
Archive   : EMXLIB8F.ZIP
Filename : MEMSET.S

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/