h30003
s 00004/00004/00048
d D 1.2 83/03/17 19:11:19 bog 2 1
c Word align SSeg
e
s 00052/00000/00000
d D 1.1 83/03/17 17:47:08 bog 1 0
c date and time created 83/03/17 17:47:08 by bog
e
u
4
U
t
T
I 1
Gdos		Equ	224
GzDdOpCode	CSeg	Byte	Public

		Public	GzDdOp

GzDdOp:	Push	Ds			; Save caller's Ds
	Push	Bp			;  & Bp
	Mov	Bp,Sp			; Point into stack

Contrl	Equ	Ss:(Dword Ptr .24)[Bp]
IntIn	Equ	Ss:(Dword Ptr .20)[Bp]
PtsIn	Equ	Ss:(Dword Ptr .16)[Bp]
IntOut	Equ	Ss:(Dword Ptr .12)[Bp]
PtsOut	Equ	Ss:(Dword Ptr .8)[Bp]
;Ret far address
OldDs	Equ	Ss:(Word Ptr .2)[Bp]
OldBp	Equ	Ss:(Word Ptr .0)[Bp]

; Push the parameters on the stack in reverse order, preserving order within
; the pairs

	Cld				; Work up
	Mov	Cx,5			; 5 DWord Ptrs
	Lea	Si,PtsOut		; Point to 5th offset
	Push	Ss			; Point Ds
	Pop	Ds			;  into stack

Push_Loop:
	Lodsw				; Get offset
	Mov	Bx,Ax			;  into Bx
	Lodsw				; Get seg

	Push	Ax			; Push seg
	Push	Bx			;  & offset

	Loop	Push_Loop		; Loop thru 5 parameters

	Mov	Dx,Sp			; Point Ds:Dx to param block

	Mov	Cx,00473h
	Int	Gdos

	Mov	Sp,Bp
	Pop	Bp
	Pop	Ds
	Retf	20

D 2
Stack		SSeg
		Rs	512	; Enough for Open Workstation & 112 points
		Rs	30	; Ds, Bp, 5 dwords, Int Gdos
E 2
I 2
Stack	SSeg	Word
	Rs	512	; Enough for Open Workstation & 112 points
	Rs	30	; Ds, Bp, 5 dwords, Int Gdos
E 2

D 2
		End
E 2
I 2
	End
E 2
E 1
