Metropoli BBS
VIEWER: two_mon.asm MODE: TEXT (ASCII)
; TWO_MON.ASM for E32 - Copyright (C) 1994 Douglas Herr
;  all rights reserved

include	model.inc

public	two_mon
extrn	tomono:near
extrn	tocolor:near
extrn	cursoroff:near
extrn	showfkey:near
extrn	swapb:near
extrn	set_screen_dimensions:near

include	dataseg.inc
extrn	screen_data_size:abs
extrn	columns:word, screen2_data:word
extrn	rows:word
extrn	dirty_bits:byte
extrn	screen_addr:dword
extrn	monitors:byte
@curseg	ends

include	codeseg.inc
two_mon	proc	near
	call	cursoroff
	or	dirty_bits,1		; screen is dirty
	cmp	screen_addr,0B0000h
	je	short monochrome
	call	tomono
	jmp	short exit

monochrome:
	call	tocolor
exit:	jc	short oops		; if no other monitor, turn flag off
	mov	eax,screen_data_size
	push	ds
	pop	es
	lea	esi,columns
	lea	edi,screen2_data
	call	swapb
	mov	ax,rows
	inc	ax
	mov	bx,columns
	jmp	set_screen_dimensions

two_mon	endp

oops:
	clc
	ret

@curseg	ends
	end
[ RETURN TO DIRECTORY ]