elks-enhanced
public
Read
Owner: themaster
Branch: master
Commits: 6893
Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
elks-enhanced
/
libc
/
asm
/
strlen-s.S
File editor
//------------------------------------------------------------------------------ // #include <string.h> // size_t strlen (const char * s); //------------------------------------------------------------------------------ #include <libc-private/call-cvt.h> .arch i8086, nojumps .code16 .text .global strlen strlen: push %bp mov %sp,%bp // Save DI ES mov %es,%dx mov %ds,%bx mov %bx,%es mov %di,%bx // Do the scan #ifndef __IA16_CALLCVT_REGPARMCALL mov 4+FAR_ADJ_(%bp),%di // s #else mov %ax,%di #endif mov $-1,%cx xor %ax,%ax cld repne scasb mov %cx,%ax not %ax dec %ax // Restore DI ES mov %bx,%di mov %dx,%es pop %bp RET_(2) //------------------------------------------------------------------------------
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
master
Visibility
public
Your access
Read
Remote
Configured
File activity
View file history