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
/
memset-s.S
File editor
//------------------------------------------------------------------------------ // #include <string.h> // void * memset (void * s, int c, size_t n); //------------------------------------------------------------------------------ #include <libc-private/call-cvt.h> .arch i8086, nojumps .code16 .text .global memset memset: push %bp mov %sp,%bp // Save DI ES #ifndef __IA16_CALLCVT_REGPARMCALL mov %es,%dx mov %ds,%ax mov %ax,%es mov %di,%bx #else push %es push %di mov %ds,%bx mov %bx,%es #endif // Do the setup #ifndef __IA16_CALLCVT_REGPARMCALL mov 4+FAR_ADJ_(%bp),%di // s mov 6+FAR_ADJ_(%bp),%ax // c mov 8+FAR_ADJ_(%bp),%cx // n #else mov %ax,%di // s mov %ax,%bx mov %dx,%ax // c // n = CX already #endif cld rep stosb // Restore DI ES #ifndef __IA16_CALLCVT_REGPARMCALL mov %bx,%di mov %dx,%es #else pop %di pop %es #endif // Return value is destination #ifndef __IA16_CALLCVT_REGPARMCALL mov 4+FAR_ADJ_(%bp),%ax #else mov %bx,%ax #endif pop %bp RET_(6) //------------------------------------------------------------------------------
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