www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/06/10/05:35:42

To: djgpp AT sun DOT soe DOT clarkson DOT edu
From: A DOT APPLEYARD AT fs1 DOT mt DOT umist DOT ac DOT uk
Date: 10 Jun 93 09:42:57 GMT
Subject: defining user-defined screen characters

  I have this version of the Gnu C/C++ system: go32 version 1.08, gcc version
2.2.2, gas version 1.38.1, bison version 1.16, flex version 2.3.7 .
 In this version there now is a total barrier stopping me from ever using in
Gnu C the useful PC feature of loading a character of my own devising (e.g.
'cubed' i.e. raised '3', which I wanted to do once recently) into a PC font.
INT10 with AH=0x11 does this if:-
  AL=0: load own chars into an EGA font table
  AL=1 to 4: load each of the ROM fonts into an EGA font table.
  AL=0x10: as AL=0, but also activate it.
  AL=0x11 to 0x14: as AL=1 to 4, but also activate it.
  AL=0x30: according to BH, find the address of one of the ROM fonts, or the
        contents of interrupt table 0x1f or 0x43.
  But AL=0 and AL=0x10 don't work with GO32 (Gnu C programs, etc) because the
subroutine i_10() (whose source form is in \GCC\GO32\EXPHDLR.C) doesn't
convert the input address of the userdefined characters (in DX) from virtual
mode to absolute mode in these cases.
  So that people can define their own PC text mode characters, to avoid much
duplicated effort by many people having to alter their own individual copies,
it would be very helpful if in the next version of GO32 the main distribution
copy of subroutine i_10() in \GCC\GO32\EXPHDLR.C could be altered to make GO32
handle interrupts INT10 AH=0x10 AL=0 and AL=0x10 correctly.
  Which file contains the MAKE 'macro' (or 'rule' or whatever it is called) to
call to recompile the various parts of GO32? How do I call that MAKE 'macro'?

Here is a 'diff -c3' of my suggested alteration:-
*** t$$1	Sat Jan 23 14:37:12 1993 (EXPHDLR.C of go32 version 1.08)
--- t$$2	Sun Jan 24 11:52:16 1993 (ditto as altered by me)
***************
*** 248,253 ****
--- 248,254 ----

  i_10()
  {
+   word32 v; int i,j; char c;
  #ifdef NONEWDRIVER
    if ((tss_ptr->tss_eax & 0xFF00) == 0xFF00)
    {
***************
*** 263,268 ****
--- 264,280 ----
        return 0;
    }
    tss2reg(&r);
+   i=tss_ptr->tss_eax & 0xffff; /* int10 function 0x11 subfunctions 0 & 0x10 */
+   if(i==0x1100 ?1: i==0x1110) { /* userdefined text characters */
+       v = tss_ptr->tss_edx + ARENA; /* bh*cx bytes starting at (ds:dx) */
+       if (!page_is_valid(v)) {
+         fprintf(stderr,
+            "Segmentation violation in pointer 0x%08lx\n", tss_ptr->tss_edx);
+         return 1; }
+       j = ((tss_ptr->tss_ebx >> 8) & 0xff) * (tss_ptr->tss_ecx & 0xffff);
+       for (i=0; i<j; i++) { c = peek8(v); v++; transfer_buffer[i] = c; }
+       r.r_dx = FP_OFF(transfer_buffer);
+       r.r_ds = _DS; }
    intr(0x10, &r);
    reg2tss(&r);
    tss_ptr->tss_ebp = r.r_es * 16L + r.r_bp + 0xe0000000L;

- Raw text -


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