Fix LES instruction: Delphi 1.0 inline ASM can't resolve object fields

Replace 'les di, FGlyphBuf' with explicit GlyphBase/GlyphSeg locals
that are extracted in Pascal before the ASM block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Duensing 2026-03-02 18:23:22 -06:00
parent c378abc9e5
commit e7454f87d1

View file

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