delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/24/12:26:26

Date: Thu, 24 Jul 1997 09:24:19 -0700 (PDT)
Message-Id: <199707241624.JAA27138@adit.ap.net>
Mime-Version: 1.0
To: rd AT enterprise DOT net
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: need help with text mode character redefining
Cc: djgpp AT delorie DOT com

You wrote:
>Can anyone tell me a easy why to redefine the text mode character set
>and restore it afterwards.
A way, yes. Easy, depends on your point of view.

First, have the new font somewhere in your program. It's stored as one byte
per scan line per character. You may be able to get a font editor to output
this.

Move the font into DOS memory. Depending on its size, it may fit the
transfer buffer, or you can use __dpmi_allocate_dos_memory. Then use
dosmemput to do the move.

Then, do an INT 10 with:
- AX = 0x1100
- ES:BP -> your font in real-mode memory
- CX = # of characters to load (256 for all of them)
- DX = character to start at (probably 0)
- BL = which block to load (0)
- BH = bytes per character (16 for 8x16 font, 14 for 8x14, etc)

You can put it back with INT 10/AH = 0/AL = 3, or do textmode(_CO80) after
#including <conio.h>

Source: Ralf Brown's Interrupt List R53
HTH


Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019