Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!boingo.med.jhu.edu!haven!umbc3!umbc5.umbc.edu!cs106132 From: cs106132@umbc5.umbc.edu (cs106132) Newsgroups: comp.lang.c Subject: movedata () recoded in 80x86 assembly Message-ID: <5024@umbc3.UMBC.EDU> Date: 14 Feb 91 22:15:54 GMT Sender: newspost@umbc3.UMBC.EDU Reply-To: cs106132@umbc5.umbc.edu (cs106132) Distribution: usa Organization: University of Maryland, Baltimore County Lines: 35 Hi, I was wondering if anyone out there show me an example of coding a routine that will do the equivalent of Turbo C's "movedata()" function. In other words, a routine that will copy a block of memory from any segment:offset to any segment:offset. The important thing is that it does not use any interrupt calls. I would like to see an implementation using inline assembly capability of Turbo C. If you have such a routine or know where I can find one, please let me know either by e-mail or post here. Something like: void my_movedata (unsigned src_seg, unsigned src_off, unsigned dst_seg, unsigned dst_off, unsigned count) { asm push es asm push ds asm mov ax, src_seg asm mov es, asm mov si, src_off asm mov ax, dst_seg asm mov ds, ax asm mov di, dst_off asm mov cx, count/2 asm cld asm rep movsw } I am not really familiar with the assemler, so any help will be appreciated. Regards, Tark