|
|
1.1 ! root 1: //////// ! 2: / ! 3: / Intel 8086 C runtime. ! 4: / SMALL model. ! 5: / ! 6: //////// ! 7: ! 8: .globl blkmv ! 9: ! 10: //////// ! 11: / ! 12: / char * ! 13: / blkmv(dptr, sptr, nbytes); ! 14: / char *dptr; ! 15: / char *sptr; ! 16: / ! 17: / Copy a block of bytes of length "nbytes" from ! 18: / the block at "sptr" to the block at "dptr". ! 19: / This routine is called by generated code for structure assignment and ! 20: / for functions that return structures. ! 21: / ! 22: / The function returns the start address of the destination buffer. ! 23: / This is used as the return value of a function returning a structure. ! 24: / ! 25: //////// ! 26: ! 27: blkmv: push si / standard ! 28: push di / c ! 29: push bp / function ! 30: mov bp,sp / linkage. ! 31: ! 32: mov cx,12(bp) / grab the byte count. ! 33: jcxz L0 / duck if no bytes. ! 34: mov si,10(bp) / get source and ! 35: mov di, 8(bp) / destination pointers. ! 36: cld / move forward ! 37: rep / copy ! 38: movsb / the data block. ! 39: ! 40: L0: mov ax, 8(bp) / return dptr. ! 41: ! 42: mov sp,bp / standard ! 43: pop bp / c ! 44: pop di / function ! 45: pop si / linkage. ! 46: ret / done.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.