diff --git a/delphi/KPANSI.PAS b/delphi/KPANSI.PAS index 17e7c68..78460f9 100644 --- a/delphi/KPANSI.PAS +++ b/delphi/KPANSI.PAS @@ -2123,6 +2123,7 @@ var I: Integer; Ofs: Integer; GlyphSeg: Word; + GlyphBase: Word; { Offset component of FGlyphBuf (nibble table at +0) } PixSeg: Word; GlyphOfs: Word; PixOfs: Word; @@ -2137,9 +2138,10 @@ begin Stride := Word(FCols) * Word(FCellWidth); CellH := FCellHeight; - { Extract segments from far pointers -- pure Pascal, no register clobber } - GlyphSeg := Seg(PPixelBuf(FGlyphBuf)^); - PixSeg := Seg(PPixelBuf(FRowBuf)^); + { Extract segments/offsets from far pointers -- pure Pascal, no register clobber } + GlyphSeg := Seg(PPixelBuf(FGlyphBuf)^); + GlyphBase := Ofs(PPixelBuf(FGlyphBuf)^); + PixSeg := Seg(PPixelBuf(FRowBuf)^); { Determine which line to render (handles scrollback view) } if FScrollPos <> 0 then @@ -2251,7 +2253,8 @@ begin push di push bx push es - les di, FGlyphBuf + mov es, GlyphSeg + mov di, GlyphBase mov al, BGIdx mov ah, al { AX = BG:BG } mov dl, FGIdx