]>
wirehaze git hosting - MS-DOS.git/blob - v4.0/src/CMD/MODE/DISPLAY.ASM
2 PRINTF_CODE
SEGMENT PUBLIC
4 ASSUME
CS:PRINTF_CODE
, DS:PRINTF_CODE
, ES:PRINTF_CODE
, SS:PRINTF_CODE
7 ;ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ P U B L I C S ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
10 PUBLIC initialize_sublists
13 ;ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ P U B L I C S ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
15 ;*****************************************************************************
16 ; External Declarations
17 ;*****************************************************************************
20 EXTRN first_sublist
:BYTE
21 EXTRN number_of_sublists
:ABS
30 ;***************************************************************************
32 ;***************************************************************************
36 Message_Table
struc ; ;AN000;
46 Message_Table ends
; ;AN000;
48 include common.stc ;contains the following structure
52 ; db ? ;Sublist Length, fixed
53 ; db ? ;Reserved, not used yet ;AN000;
55 ;sublist_seg dw ? ;segment part of pointer to piece of message
56 ; db ? ;ID, special end of message format ;AN000;
64 ;ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
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.
100 ;³ ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
106 ;ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
108 initialize_sublists PROC
NEAR ;AN000;
110 MOV CX,number_of_sublists
;AN000;
111 MOV SI,OFFSET first_sublist
;address first sublist ;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;
115 LOOPNZ repeat ;AN000;
119 initialize_sublists ENDP
121 ;*****************************************************************************
123 ;*****************************************************************************
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
132 ;Called Procedures: sysdispmsg
134 ;Change History: Created 4/22/87 MT
136 ;Input: ES:DX = pointer to message description
144 ; Setup registers for SysDispMsg from Message Description Tables
148 ;*****************************************************************************
151 PRINTF PROC
NEAR ; ;AN000;
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;
177 PRINTF ENDP
; ;AN000;