-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOUTPUT.ASM
executable file
·125 lines (100 loc) · 2.61 KB
/
OUTPUT.ASM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
page ,132
;-----------------------------Module-Header-----------------------------;
; Module Name: OUTPUT.ASM
;
; This module contains the dispatch routine for the Output function.
;
; Created: 22-Feb-1987
; Author: **** ***** [*****]
;
; Copyright (c) 1984-1987 Microsoft Corporation
;
; Exported Functions: Output
;
; Public Functions: none
;
; Public Data: none
;
; General Description:
;
; Those functions of output which are supported by this driver
; are dispatched to.
;
; Restrictions:
;
;-----------------------------------------------------------------------;
??_out output
incOutput = 1 ;Include control for gdidefs.inc
.xlist
include cmacros.inc
include gdidefs.inc
include macros.mac
.list
externFP do_scanlines
externFP do_polylines
sBegin Code
assumes cs,Code
page
;--------------------------Exported-Routine-----------------------------;
; Output
;
; Output is the entry point for output functions such as lines,
; scanlines, arcs, etc. Those functions which are supported
; will be dispatched to. If the function is not supported, an
; error code will be returned.
;
; Entry:
; None
; Return:
; Per sub-function
; Error Returns:
; Per sub-function
; AX = 0 if sub-function not supported
; Registers Preserved:
; SI,DI,DS,BP
; Registers Destroyed:
; AX,BX,CX,DX,ES,FLAGS
; Calls:
; scanlines
; lines
; History:
; Wed 04-Mar-1987 12:25:32 -by- **** ***** [*****]
; Created.
;-----------------------------------------------------------------------;
;------------------------------Pseudo-Code------------------------------;
; {
; }
;-----------------------------------------------------------------------;
assumes ds,Data
assumes es,nothing
cProc Output,<FAR,PUBLIC,WIN,PASCAL>,<si,di>
parmD lp_dst_dev ;--> to the destination
parmW style ;Output operation
parmW count ;# of points
parmD lp_points ;--> to a set of points
parmD lp_phys_pen ;--> to physical pen
parmD lp_phys_brush ;--> to physical brush
parmD lp_draw_mode ;--> to a Drawing mode
parmD lp_clip_rect ;--> to a clipping rectange if <> 0
cBegin <nogen>
mov ax, 1
ret 28
mov bx,sp
mov ax,wptr ss:[bx][26] ;Get the style parameter
cmp ax,OS_POLYLINE ;Is this a polyline
je dispatch_lines ; Yes
cmp ax,OS_SCANLINES ;Is this a scanline ?
jne output_return_error ; No, return an error
dispatch_scanlines:
jmp do_scanlines
dispatch_lines:
jmp do_polylines
output_return_error:
xor ax,ax ;Show error
ret 28
cEnd <nogen>
sEnd Code
ifdef PUBDEFS
include output.pub
endif
end