From: cumani AT dns DOT ien DOT it Newsgroups: comp.os.msdos.djgpp Subject: Re: Using the fonts stored in the ROM Date: Fri, 15 May 1998 11:37:11 +0200 Organization: Politecnico di Torino - Italia Lines: 34 Message-ID: <355C0CC7.28CC@is.ien.it> References: <01bd7f95$80a9aca0$LocalHost AT default> NNTP-Posting-Host: vega.ien.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Dark Angel wrote: > > I am trying to use the text fonts stored in the ROM of the EGA/VGA, but i > am having some trouble. > > I am using the function 1130h of the interrupt 10h to get the segment and > offset of the font. I already know the addressing in protected mode is > different, so i used _dmpi_segment_to_descriptor to get a descriptor for > the segment returned by the function call. > Then i used _farpeekb(selector, offset) to get the bytes from the memory: i > got a segmentation fault! > I tryed another way: _farpeekb(_dos_ds, segment*16+offset): i still got a > segmentation fault! > > I have tryed this in real mode and it worked. I know the segment (ffffh) > and offset(e67c) returned by the funtion call are correct. > I cant't help you with descriptors and such, but I have used the second method, i.e. _farpeekb(_dos_ds, segment*16+offset) in several programs, without any problem (well, actually I used dosmemget() to get all the font at once, but that should make no difference). Maybe the problem is somewhere else in your code? -- Ing. Aldo Cumani Istituto Elettrotecnico Nazionale Str. delle Cacce, 91 10135 Torino