[GEM Development] Weird SDCGA8.CGA bug

John Elliott jce at seasip.demon.co.uk
Wed Apr 13 21:39:08 PDT 2005


:   If you run this using the CGA driver SDCGA8.CGA or the mono driver
: SDPSM8.VGA, two of the lines of text (numbers 1 and 3, boldface and grey
: boldface) don't display. If you use SDPSC9.VGA, they do.

  And I now know why.

  In the driver source, spec_bold looks like this:

: spec_bold:
:                 test    SPECIAL, THICKEN
:                 jz      spec_grey
:                 call    text_bold
:                 test    MONO_STA, 0ffffh        ; is this a monospaced font?
:                 jnz     spec_grey
:                 add     si, WEIGHT              ; bump width
:                 add     dx, WEIGHT              ; bump offset to next char
: spec_grey:

  In SDPSC9.VGA, spec_bold looks like this:

cseg:5BF3                 test    SPECIAL, 1
cseg:5BF9                 jz      spec_grey
cseg:5BFB                 call    text_bold
cseg:5BFE                 add     si, WEIGHT
cseg:5C02                 test    MONO_STA, 0FFFFh
cseg:5C08                 jnz     spec_grey
cseg:5C0A                 add     dx, WEIGHT

  This has a side-effect. If you print monospaced bold text upside-down, it
comes out wider than when printed the right way up, because upside-down 
printing uses SI for the character spacing.

------------- http://www.seasip.demon.co.uk/index.html --------------------
John Elliott           |BLOODNOK: "But why have you got such a long face?"
                       |SEAGOON: "Heavy dentures, Sir!"    - The Goon Show 
:-------------------------------------------------------------------------)


More information about the gem-dev mailing list