summaryrefslogtreecommitdiff
path: root/v4.0/src/CMD/MODE/DISPLAY.ASM
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/CMD/MODE/DISPLAY.ASM')
-rw-r--r--v4.0/src/CMD/MODE/DISPLAY.ASM181
1 files changed, 181 insertions, 0 deletions
diff --git a/v4.0/src/CMD/MODE/DISPLAY.ASM b/v4.0/src/CMD/MODE/DISPLAY.ASM
new file mode 100644
index 0000000..870110f
--- /dev/null
+++ b/v4.0/src/CMD/MODE/DISPLAY.ASM
@@ -0,0 +1,181 @@
1;m
2PRINTF_CODE SEGMENT PUBLIC
3
4ASSUME CS:PRINTF_CODE, DS:PRINTF_CODE, ES:PRINTF_CODE, SS:PRINTF_CODE
5
6
7;ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ P U B L I C S ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
8;º º
9
10PUBLIC initialize_sublists
11
12;º º
13;ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ P U B L I C S ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
14
15;*****************************************************************************
16; External Declarations
17;*****************************************************************************
18;
19
20EXTRN first_sublist:BYTE
21EXTRN number_of_sublists:ABS
22EXTRN SysDispMsg:Near
23
24
25
26
27
28
29;
30;***************************************************************************
31; Message Structures
32;***************************************************************************
33;
34
35
36Message_Table struc ; ;AN000;
37 ;
38Entry1 dw 0 ; ;AN000;
39Entry2 dw 0 ; ;AN000;
40Entry3 dw 0 ; ;AN000;
41Entry4 dw 0 ; ;AN000;
42Entry5 db 0 ; ;AN000;
43Entry6 db 0 ; ;AN000;
44Entry7 dw 0 ; ;AN000;
45 ;
46Message_Table ends ; ;AN000;
47
48include common.stc ;contains the following structure
49
50;sublist_def STRUC
51
52; db ? ;Sublist Length, fixed
53; db ? ;Reserved, not used yet ;AN000;
54; dw ? ;offset
55;sublist_seg dw ? ;segment part of pointer to piece of message
56; db ? ;ID, special end of message format ;AN000;
57; db ? ;flags
58; db ?
59; db ?
60; db ?
61
62;sublist_def ENDS
63
64;ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
65
66;³ INITIALIZE_SUBLISTS
67;³ -------------------
68;³ A .COM file cannot have references to segments in it at EXE2BIN time so
69;³ the segment part of pointers to pieces of messages in sublist blocks must
70;³ be done at execution time. This routine does that for all sublists.
71
72
73;³ INPUT:
74
75
76
77
78
79
80
81;³ RETURN:
82
83
84;³ MESSAGES: none
85
86
87
88;³ REGISTER
89;³ USAGE AND
90;³ COMVENTIONS:
91
92
93
94;³ ASSUMPTIONS:
95
96
97;³ SIDE EFFECT:
98
99
100;³ ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
101
102;³ BEGIN
103;³ ³
104;³ END ³
105
106;ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
107
108initialize_sublists PROC NEAR ;AN000;
109
110MOV CX,number_of_sublists ;AN000;
111MOV SI,OFFSET first_sublist ;address first sublist ;AN000;
112REPEAT: ;AN000;
113 MOV [SI].sublist_seg,DS ;set up the segment part of the pointer field in the sublist block ;AN000;
114 ADD SI,TYPE sublist_def ;point to next sublist block ;AN000;
115LOOPNZ repeat ;AN000;
116 ;AN000;
117RET
118 ;AN000;
119initialize_sublists ENDP
120
121;*****************************************************************************
122;PRINTF
123;*****************************************************************************
124;
125;Description: Save all registers, set up registers required for SysDispMsg
126; routine. This information is contained in a message description
127; table pointed to by the DX register. Call SysDispMsg, then
128; restore registers. This routine assumes that the only time an
129; error will be returned is if an extended error message was
130; requested, so it will ignore error returns
131;
132;Called Procedures: sysdispmsg
133;
134;Change History: Created 4/22/87 MT
135;
136;Input: ES:DX = pointer to message description
137;
138;Output: None
139;
140;Psuedocode
141;----------
142;
143; Save all registers
144; Setup registers for SysDispMsg from Message Description Tables
145; CALL SysDispMsg
146; Restore registers
147; ret
148;*****************************************************************************
149
150Public PRINTF
151PRINTF PROC NEAR ; ;AN000;
152
153; push ax
154 ;Save registers ;AN000;
155 push bx ; " " " " ;AN000;
156 push cx ; " " " " ;AN000;
157 push dx ; " " " " ;AN000;
158 push si ; " " " " ;AN000;
159 push di ; " " " " ;AN000;
160 mov di,dx ;Change pointer to table ;AN000;
161 mov ax,[di].Entry1 ;Message number ;AN000;
162 mov bx,[di].Entry2 ;Handle ;AN000;
163 mov si,[di].Entry3 ;Sublist ;AN000;
164 mov cx,[di].Entry4 ;Count ;AN000;
165 mov dh,[di].Entry5 ;Class ;AN000;
166 mov dl,[di].Entry6 ;Function ;AN000;
167 mov di,[di].Entry7 ;Input ;AN000;
168 call SysDispMsg ;Display the message ;AN000;
169 pop di ;Restore registers ;AN000;
170 pop si ; " " " " ;AN000;
171 pop dx ; " " " " ;AN000;
172 pop cx ; " " " " ;AN000;
173 pop bx ; " " " " ;AN000;
174; pop ax ; " " " " ;AN000;
175 ret ;All done ;AN000;
176
177PRINTF ENDP ; ;AN000;
178
179PRINTF_CODE ENDS
180
181 end