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

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

.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


  3 Responses to “Category : OS/2 Files
Archive   : EMXLIB8F.ZIP
Filename : INDEX.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/