]> wirehaze git hosting - MS-DOS.git/blob - v4.0/src/CMD/EXE2BIN/DISPLAY.ASM

wirehaze git hosting

MZ is back!
[MS-DOS.git] / v4.0 / src / CMD / EXE2BIN / DISPLAY.ASM
1
2
3 CODE SEGMENT PARA PUBLIC 'CODE'
4 CODE ENDS
5 DATA SEGMENT PARA PUBLIC 'DATA'
6 DATA ENDS
7 STACK SEGMENT PARA STACK 'STACK'
8 STACK ENDS
9 ZLOAD SEGMENT PARA PUBLIC 'ZLOAD'
10 ZLOAD ENDS
11
12 CODE SEGMENT PARA PUBLIC 'CODE'
13 assume cs:code,ds:data
14 ;
15 ;*****************************************************************************
16 ; External Declarations
17 ;*****************************************************************************
18 ;
19
20 extrn SysDispMsg:near
21
22 ;
23 ;***************************************************************************
24 ; Message Structures
25 ;***************************************************************************
26 ;
27
28
29 Message_Table struc ; ;AN000;
30 ;
31 Entry1 dw 0 ; ;AN000;
32 Entry2 dw 0 ; ;AN000;
33 Entry3 dw 0 ; ;AN000;
34 Entry4 dw 0 ; ;AN000;
35 Entry5 db 0 ; ;AN000;
36 Entry6 db 0 ; ;AN000;
37 Entry7 dw 0 ; ;AN000;
38 ;
39 Message_Table ends ; ;AN000;
40
41
42
43 ;*****************************************************************************
44 ;Routine name&gml Display_Interface
45 ;*****************************************************************************
46 ;
47 ;DescriptioN&gml Save all registers, set up registers required for SysDispMsg
48 ; routine. This information is contained in a message description
49 ; table pointed to by the DX register. Call SysDispMsg, then
50 ; restore registers. This routine assumes that the only time an
51 ; error will be returned is if an extended error message was
52 ; requested, so it will ignore error returns
53 ;
54 ;Called Procedures: Message (macro)
55 ;
56 ;Change History&gml Created 4/22/87 MT
57 ;
58 ;Input&gml ES&gmlDX = pointer to message description
59 ;
60 ;Output&gml None
61 ;
62 ;Psuedocode
63 ;----------
64 ;
65 ; Save all registers
66 ; Setup registers for SysDispMsg from Message Description Tables
67 ; CALL SysDispMsg
68 ; Restore registers
69 ; ret
70 ;*****************************************************************************
71
72 Public Display_Interface
73 Display_Interface proc ; ;AN000;
74
75 push ds ; ;AN000;
76 push es ; ;AN000;
77 push ax ;Save registers ;AN000;
78 push bx ; " " " " ;AN000;
79 push cx ; " " " " ;AN000;
80 push dx ; " " " " ;AN000;
81 push si ; " " " " ;AN000;
82 push di ; " " " " ;AN000;
83 mov di,dx ;Change pointer to table ;AN000;
84 mov dx,SEG data ;Point to data segment
85 mov ds,dx ;
86 mov es,dx
87 mov ax,[di].Entry1 ;Message number ;AN000;
88 mov bx,[di].Entry2 ;Handle ;AN000;
89 mov si,[di].Entry3 ;Sublist ;AN000;
90 mov cx,[di].Entry4 ;Count ;AN000;
91 mov dh,[di].Entry5 ;Class ;AN000;
92 mov dl,[di].Entry6 ;Function ;AN000;
93 mov di,[di].Entry7 ;Input ;AN000;
94 call SysDispMsg ;Display the message ;AN000;
95 pop di ;Restore registers ;AN000;
96 pop si ; " " " " ;AN000;
97 pop dx ; " " " " ;AN000;
98 pop cx ; " " " " ;AN000;
99 pop bx ; " " " " ;AN000;
100 pop ax ; " " " " ;AN000;
101 pop es ; ;AN000;
102 pop ds ; ;AN000;
103 ret ;All done ;AN000;
104
105 Display_Interface endp ; ;AN000;
106 code ends
107
108
109 end
110 \1a