Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2000-11

SegB800 analogy

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jonas Maebe
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

Reply by email

Michail A.Baikov
to Jonas Maebe

Jonas, i'm know how to use in BP70 ;). I'm say about Win32 :) Sorry, i'm not say about that. Now I'm use Win32 API function (GetCharacter and WriteCharactetandAttr or like ...) and all work. But thanks for answer.

Earlier message 35 lines
----- Original Message ----- From: "Jonas Maebe" To: Sent: Monday, November 13, 2000 3:31 PM Subject: Re: [fpc-pascal]SegB800 analogy > >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! > >

Reply by email