Category : OS/2 Files
Archive   : EMXLIB8F.ZIP
Filename : INDEX.S
.globl _index
/ char *index (const char *string, int c)
/ {
/ do
/ {
/ if (*string == (char)c)
/ return ((char *)string);
/ } while (*string++ != 0);
/ return (NULL);
/ }
.text
.align 2, 0x90
_index:
pushl %esi
movl 2*4(%esp), %esi / string
movb 3*4(%esp), %ah / c
.align 2, 0x90
1: lodsb
cmpb %ah, %al
jz 2f
orb %al, %al
jnz 1b
xorl %eax, %eax
popl %esi
ret
.align 2, 0x90
2: lea -1(%esi), %eax
popl %esi
ret
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/