;       SCCSID = @(#)nlssrreg.asm       6.1 90/11/17
;       SCCSID = @(#)nlssrreg.asm       6.2 90/06/15
;       SCCSID = @(#)nlssrreg.asm       6.2 90/06/15
; ****************************************************************************
; *                                                                          *
; *                       IBM/Microsoft Confidential                         *
; *                                                                          *
; *                 Copyright (c) IBM Corporation  1987, 1990                *
; *                 Copyright (c) Microsoft Corp.  1987, 1990                *
; *                           All Rights Reserved                            *
; *                                                                          *
; ****************************************************************************

;***  Change History                                              ***
;***   noto  11/18/93  Define which segment for Page Tuning DLL   ***
;***                                                              ***



.286p
.xlist
include dc1segs.inc                                             ; DCR 704
.list


CODE16C_TUNE1   SEGMENT DWORD USE16 PUBLIC 'CODE'
CODE16C_TUNE1   ENDS




CODE16C_TUNE1   SEGMENT
        assume cs:CODE16C_TUNE1


public  NLSSAVEREGS
NLSSAVEREGS    proc    near

        push    ds              ; Save callers registers, just in case??
        push    es
        push    bx
        push    cx
        push    dx
        push    si
        push    di
        push    bp              ; Save c stack frame offset
        mov     bp,sp           ; Get addressability to return offset
        mov     bx,ss:[bp+16]   ; Get return offset
        pop     bp              ; Restore c stack frame offset
        jmp     bx              ; Return to c mainline code

NLSSAVEREGS endp

public  NLSRESTOREREGS
NLSRESTOREREGS proc    near

        pop     bx              ; Get the return offset
        push    bp              ; Save c stack frame offset
        mov     bp,sp           ; Get addressability to original return offset
        mov     ss:[bp+16],bx   ; Store return offset back on the stack
        pop     bp              ; Restore c stack frame offset
        pop     di              ; Restore caller's registers
        pop     si
        pop     dx
        pop     cx
        pop     bx
        pop     es
        pop     ds

        ret

NLSRESTOREREGS endp


CODE16C_TUNE1   ends
        end

