File:  [OS/2 SDKs] / os2sdk / demos / examples / vioreg / viorout.asm
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 12:26:11 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: os2sdk-1988, HEAD
Microsoft OS/2 SDK 03-01-1988

;  Replacement VIO router
;
;
	TITLE	viorout

	.286
stack_frame	struc
	s_bp	dw	?	;BP
	s_di	dw	?	;DI
	s_ip	dw	?	;offset and
	s_cs	dw	?	;   selector of return address
	s_clds	dw	?	;caller's ds
	s_rout	dw	?	;entry point in vio router
	s_indx	dw	?	;index
	s_caddr dd	?	;far address of caller
	s_wd8	dw	?
	s_wd7	dw	?
	s_wd6	dw	?	;maximum # of words needed for any
	s_wd5	dw	?	;  VIO routine parameters
	s_wd4	dw	?
	s_wd3	dw	?
	s_wd2	dw	?
	s_wd1	dw	?

stack_frame	ends

VIOROUT_TEXT	 SEGMENT  BYTE PUBLIC 'CODE'
VIOROUT_TEXT	 ENDS



EXTRN	REPLACE:FAR

VIOROUT_TEXT   SEGMENT
	PUBLIC	VIOROUT
	ASSUME	CS: VIOROUT_TEXT, DS: NOTHING, SS: NOTHING, ES: NOTHING
VIOROUT PROC	FAR
	push	di
        push    bp                      ;save base pointer
        mov     bp,sp                   ;reposition label/entry point

	push	word ptr  [bp].s_wd1	;push all parameters
	push	word ptr  [bp].s_wd2
	push	word ptr  [bp].s_wd3
	push	word ptr  [bp].s_wd4
	push	word ptr  [bp].s_wd5	;CharStr (parameters for
	push	word ptr  [bp].s_wd6	;  VioWrtTTy)
	push	word ptr  [bp].s_wd7	;length
	push	word ptr  [bp].s_wd8	;VIO handle

	mov	di,[bp].s_indx		;get function number
	sal	di,2			;make a word boundary index
	call	DWORD PTR CS:FUNCTION_TBL[DI] ;call vio function

	mov	sp,bp			;move stack pointer back, effectively
	pop	bp			; ignoring any parameters left on stack
	pop	di			;restore bp and di registers
	ret
VIOROUT ENDP

A_DUMMY  PROC	 FAR
	mov	ax,-1		      ;return -1 to VIOrouter
	ret			      ;
A_DUMMY  ENDP

;FUNCTION_TBL contains the far addresses of the replacement routines.
;These must be declared as EXTRN FAR, and must be in a dynamic link
;module which is linked with this routine.

FUNCTION_TBL     LABEL   WORD
	DD    VIOROUT_TEXT:A_DUMMY	       ; 0  VIOGETPHYSBUF
	DD    VIOROUT_TEXT:A_DUMMY	       ; 1  VIOGETBUF
	DD    VIOROUT_TEXT:A_DUMMY	       ; 2  VIOSHOWBUF
	DD    VIOROUT_TEXT:A_DUMMY	       ; 3  VIOGETCURPOS
	DD    VIOROUT_TEXT:A_DUMMY	       ; 4  VIOGETCURTYPE
	DD    VIOROUT_TEXT:A_DUMMY	       ; 5  VIOGETMODE
	DD    VIOROUT_TEXT:A_DUMMY	       ; 6  VIOSETCURPOS
	DD    VIOROUT_TEXT:A_DUMMY	       ; 7  VIOSETCURTYPE
	DD    VIOROUT_TEXT:A_DUMMY	       ; 8  VIOSETMODE
	DD    VIOROUT_TEXT:A_DUMMY	       ; 9  VIOREADCHARSTR
	DD    VIOROUT_TEXT:A_DUMMY	       ; 10 VIOREADCELLSTR
	DD    VIOROUT_TEXT:A_DUMMY	       ; 11 VIOWRTNCHAR
	DD    VIOROUT_TEXT:A_DUMMY	       ; 12 VIOWRTNATTR
	DD    VIOROUT_TEXT:A_DUMMY	       ; 13 VIOWRTNCELL
	DD    VIOROUT_TEXT:A_DUMMY	       ; 14 VIOWRTCHARSTR
	DD    VIOROUT_TEXT:A_DUMMY	       ; 15 VIOWRTCHARSTRATT
	DD    VIOROUT_TEXT:A_DUMMY	       ; 16 VIOWRTCELLSTR

	DD     REPLACE			       ; 17 VIOWRTTTY

	DD    VIOROUT_TEXT:A_DUMMY	       ; 18 VIOSCROLLUP
	DD    VIOROUT_TEXT:A_DUMMY	       ; 19 VIOSCROLLDN
	DD    VIOROUT_TEXT:A_DUMMY	       ; 20 VIOSCROLLLF
	DD    VIOROUT_TEXT:A_DUMMY	       ; 21 VIOSCROLLRT
	DD    VIOROUT_TEXT:A_DUMMY	       ; 22 VIOSETANSI
	DD    VIOROUT_TEXT:A_DUMMY	       ; 23 VIOGETANSI
	DD    VIOROUT_TEXT:A_DUMMY	       ; 24 VIOPRTSC
	DD    VIOROUT_TEXT:A_DUMMY	       ; 25 VIOSCRLOCK
	DD    VIOROUT_TEXT:A_DUMMY	       ; 26 VIOSCRUNLOCK
	DD    VIOROUT_TEXT:A_DUMMY	       ; 27 VIOSAVREDRAWWAIT
	DD    VIOROUT_TEXT:A_DUMMY	       ; 28 VIOSAVREDRAWUNDO
	DD    VIOROUT_TEXT:A_DUMMY	       ; 29 VIOPOPUP
	DD    VIOROUT_TEXT:A_DUMMY	       ; 30 VIOENDPOPUP
	DD    VIOROUT_TEXT:A_DUMMY	       ; 31 VIOPRTSCTOGGLE
	DD    VIOROUT_TEXT:A_DUMMY	       ; 32 VIOMODEWAIT
	DD    VIOROUT_TEXT:A_DUMMY	       ; 33 VIOMODEUNDO
	DD    VIOROUT_TEXT:A_DUMMY	       ; 34 VIOGETFONT
	DD    VIOROUT_TEXT:A_DUMMY	       ; 35 VIOGETCONFIG
	DD    VIOROUT_TEXT:A_DUMMY	       ; 36 VIOSETCP
	DD    VIOROUT_TEXT:A_DUMMY	       ; 37 VIOGETCP
	DD    VIOROUT_TEXT:A_DUMMY	       ; 38 VIOSETFONT
	DD    VIOROUT_TEXT:A_DUMMY	       ; 39 VIOGETSTATE
	DD    VIOROUT_TEXT:A_DUMMY	       ; 40 VIOSETSTATE
	DD    VIOROUT_TEXT:A_DUMMY	       ; 40 VIOSETSTATE

VIOROUT_TEXT  ENDS
	END

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.