2 TITLE DOS
- KEYB Command
- Copy Shared_Data_Area
4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5 ;; DOS - NLS Support - KEYB Command
6 ;; (C) Copyright 1988 Microsoft
8 ;; File Name: KEYBCPSD.ASM
13 ;; Copies the SHARED_DATA_AREA into a part of memory that
14 ;; can be left resident. All relative pointers must already
15 ;; be recalculated to this new position.
16 ;; THIS FILE MUST BE THE LAST OF THE RESIDENT FILES WHEN KEYB IS LINKED.
18 ;; Documentation Reference:
19 ;; ------------------------
20 ;; PC DOS 3.3 Detailed Design Document - May ?? 1986
22 ;; Procedures Contained in This File:
23 ;; ----------------------------------
25 ;; Include Files Required:
26 ;; -----------------------
27 ;; INCLUDE KEYBSHAR.INC
28 ;; INCLUDE KEYBCMD.INC
29 ;; INCLUDE KEYBTBBL.INC
31 ;; External Procedure References:
32 ;; ------------------------------
33 ;; FROM FILE ????????.ASM:
34 ;; procedure - description????????????????????????????????
36 ;; Linkage Information: Refer to file KEYB.ASM
37 ;; --------------------
41 ;; PTMP3955 ;AN004;KEYB component to free environment and close handles 0 - 4
43 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
46 PUBLIC COPY_SD_AREA
;;
50 INCLUDE KEYBSHAR
.INC ;;
51 INCLUDE KEYBCMD
.INC ;;
52 INCLUDE KEYBTBBL
.INC ;;
54 CODE SEGMENT PUBLIC 'CODE' ;;
56 ASSUME
CS:CODE,DS:CODE ;;
58 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
60 ;; Module: COPY_SD_AREA
71 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
74 TSD EQU TEMP_SHARED_DATA
;;
76 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
78 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
80 COPY_SD_AREA PROC
NEAR ;;
82 REP MOVS ES:BYTE PTR [DI],DS:[SI] ;; Copy SHARED_DATA_AREA to
84 push ax ;AN004;save existing values
86 xor ax,ax ;AN004;clear out ax
87 mov ax,cs:[2
ch] ;AN004;check offset for address containin environ.
91 mov ax,4900H
;AN004;make the free allocate mem func
96 pop es ;AN004;restore existing values
102 ;AN004; ;Terminate and stay resident
103 mov bx,4 ;AN004; ;1st close file handles
104 .REPEAT ;AN004; ;STDIN,STDOUT,STDERR
108 .UNTIL
<BX eq 0> ;AN004; ;
112 ;AN004; new part of memory
113 MOV BYTE PTR ES:SD
.TABLE_OK
,1 ;; Activate processing flag
118 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
120 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
123 SD_DEST_PTR
LABEL BYTE ;;
125 SHARED_DATA SHARED_DATA_STR
<> ;;
126 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;