Annotation of coherent/d/286_KERNEL/USRSRC/ldrv/sfmem.s, revision 1.1.1.1

1.1       root        1: / $Header: /usr/src/sys/ldrv/RCS/sfmem.s,v 1.1 88/03/24 16:31:08 src Exp $
                      2: /
                      3: /      The  information  contained herein  is a trade secret  of INETCO
                      4: /      Systems, and is confidential information.   It is provided under
                      5: /      a license agreement,  and may be copied or disclosed  only under
                      6: /      the terms of that agreement.   Any reproduction or disclosure of
                      7: /      this  material  without  the express  written  authorization  of
                      8: /      INETCO Systems or persuant to the license agreement is unlawful.
                      9: /
                     10: /      Copyright (c) 1986
                     11: /      An unpublished work by INETCO Systems, Ltd.
                     12: /      All rights reserved.
                     13: /
                     14: / $Log:        /usr/src/sys/ldrv/RCS/sfmem.s,v $
                     15: / Revision 1.1 88/03/24  16:31:08      src
                     16: / Initial revision
                     17: / 
                     18: /
                     19: ////////
                     20: 
                     21: ////////
                     22: /
                     23: / void
                     24: / sfmem( fp, m, n )    -- set far memory
                     25: / char far * fp;
                     26: / char * m;
                     27: / int n;
                     28: /
                     29: /      Input:  fp = far pointer [32 bit selector:offset] to destination
                     30: /              m  = source
                     31: /              n  = number of bytes to transfer.
                     32: /
                     33: /      Action: Transfer 'n' bytes from offset 'm' in the current data space
                     34: /              to far address 'fp'.
                     35: /
                     36: /      Return: None.
                     37: /
                     38: ////////
                     39: 
                     40:        .globl  sfmem_
                     41: 
                     42: sfmem_:        push    si              / void
                     43:        push    di              / sfmem( fp, m, n )
                     44:        push    bp              /
                     45:        mov     bp, sp          / register char * fp;           /* ES:DI */
                     46:        push    es              / register char * m;            /* SI */
                     47:        les     di, 8(bp)       / register int n;               /* CX */
                     48:        mov     si, 12(bp)      /
                     49:        mov     cx, 14(bp)      / {
                     50:                                /
                     51:        cld                     /
                     52:        clc                     /       for ( ; n != 0; --n )
                     53:        rcr     cx, $1          /
                     54:        rep                     /               *fp++ = *m++;
                     55:        movsw                   /
                     56:        rcl     cx, $1          /
                     57:        rep                     /
                     58:        movsb                   /
                     59:                                /
                     60:        pop     es              / }
                     61:        pop     bp
                     62:        pop     di
                     63:        pop     si
                     64:        ret

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.