[fpc-pascal]SegB800 analogy

Jonas Maebe jonas at zeus.rug.ac.be
Mon Nov 13 13:31:37 CET 2000


>How to get address of text video buffer in fpc? Analog SegB800 pointer in
>BP70.

Only under Dos:

* in pascal:

var
  vscreen: array[0..24,0..79] of word absolute $b800:0;
...
vscreen[y,x] := value;

or

mem[$b800:x+y*80*2] := value;

* in assembler:

{$asmmode intel}
asm
  mov al, fs:[$b8000+x+y*80*2]
end;

(pseudo-notation, of course you can't use the above unless x and y are 
constants). Note that the the $b8000 is intentional in the assembler 
code, it must not be $b800!


Jonas




More information about the fpc-pascal mailing list