; assembly language graphics support routines

_DATA	segment	word public 'DATA'
_DATA	ends

DGROUP	group	_DATA

_TEXT	segment	byte public 'CODE'
	assume	cs:_TEXT, ds:DGROUP

if 0

;void Dot( int color, int row, int col );
	public	_Dot
_Dot		proc	near		; write a dot on the screen
		push	bp
		mov	bp, sp
		mov	al, [bp+4]	; get color (byte)
		mov	ah, 0Ch		; write pixel function
		xor	bx, bx
		mov	dx, [bp+6]	; get row
		mov	cx, [bp+8]	; get column
		int	10h		; call video rom bios
		pop	bp
		ret
_Dot		endp

;int GetMode( void );
	public	_GetMode
_GetMode	proc	near		; get the screen mode
		mov	ah, 0Fh		; get mode function
		int	10h		; call video rom bios
		xor	ah, ah		; clear top byte (low byte has mode)
		ret
_GetMode	endp

;void SetMode( int mode );
	public	_SetMode
_SetMode	proc	near		; set the screen mode
		push	bp
		mov	bp, sp
		mov	al, [bp+4]	; get new mode
		xor	ah, ah		; set mode function
		int	10h		; call video rom bios
		pop	bp
		ret
_SetMode	endp

endif

_TEXT		ends
		end
