include libmacro.inc

beglib

	.286
	

	item	'w_mode'
		int	10h
		pop	ax

	item	'w_char40' ; x y attr char 
	
		mov	bx, 0b800h
		mov	es, bx
		pop	bx	;attr
		mov	ah, bl
		pop	bx	; y
		imul	bx, 80
		pop	cx	; x
		add	cx, cx
		add	bx, cx
		mov	es:[bx], ax
		pop	ax

	item	'w_char80' ; x y attr char 
	
		mov	bx, 0b800h
		mov	es, bx
		pop	bx	;attr
		mov	ah, bl
		pop	bx	; y
		imul	bx, 160
		pop	cx	; x
		add	cx, cx
		add	bx, cx
		mov	es:[bx], ax
		pop	ax

	item	'w_char40fill' ; x y char 
	
		mov	bx, 0b800h
		mov	es, bx
		pop	bx	; y
		imul	bx, 80
		pop	cx	; x
		add	cx, cx
		add	bx, cx
		mov	ah, es:[bx+1]
		mov	es:[bx], ax
		pop	ax
		
	item	'w_char80fill' ; x y char 
	
		mov	bx, 0b800h
		mov	es, bx
		pop	bx	; y
		imul	bx, 160
		pop	cx	; x
		add	cx, cx
		add	bx, cx
		mov	ah, es:[bx+1]
		mov	es:[bx], ax
		pop	ax
		


endlib
