Sign in Join

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

Mailing lists / fpc-pascal / 2003-11

absolute

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

2cz

in school we use a BPTP 7, but at home i use FPC. And now i have a problem with videoram.
here is a problem source part:

program iksko;
uses crt, dos;
const t=3;
type hodi_se=record
xx,xy:integer;
end;
taky_se_hodi=array[1..t] of hodi_se;
var had:taky_se_hodi;
sy,sx,u:integer;
M: array[1..25,1..80] of
record znak:char; attr:byte end
absolute $B800:0;
a:char;
begin
..
 and when i try to compile i get this :
had.pp(12,15) Error: absolute can only be associated with a var or const
had.pp(12,15) Fatal: Syntax error, ; expected but : found

in BPTP is this right. what shall i do?

2cz (newbie)

Florian Klaempfl
to 2cz
2cz wrote 26 lines
in school we use a BPTP 7, but at home i use FPC. And now i have a problem with videoram. here is a problem source part: program iksko; uses crt, dos; const t=3; type hodi_se=record xx,xy:integer; end; taky_se_hodi=array[1..t] of hodi_se; var had:taky_se_hodi; sy,sx,u:integer; M: array[1..25,1..80] of record znak:char; attr:byte end absolute $B800:0; a:char; begin .. and when i try to compile i get this : had.pp(12,15) Error: absolute can only be associated with a var or const had.pp(12,15) Fatal: Syntax error, ; expected but : found in BPTP is this right. what shall i do?

Which FPC version do you use? absolute $B800:0; is only useful under DOS, so it won't work with the win32 or linux version FPC, use the go32v2 one.

2cz
to Florian Klaempfl

1.00.10 for linux.
Oh, thanks. And don't you know how to do the same thing (direct access to video ram) under linux ?

Florian Klaempfl wrote 37 lines
2cz wrote: > in school we use a BPTP 7, but at home i use FPC. And now i have a > problem with videoram. > here is a problem source part: > > program iksko; > uses crt, dos; > const t=3; > type hodi_se=record > xx,xy:integer; > end; > taky_se_hodi=array[1..t] of hodi_se; > var had:taky_se_hodi; > sy,sx,u:integer; > M: array[1..25,1..80] of > record znak:char; attr:byte end > absolute $B800:0; > a:char; > > begin > .. > > and when i try to compile i get this : > had.pp(12,15) Error: absolute can only be associated with a var or const > had.pp(12,15) Fatal: Syntax error, ; expected but : found > > in BPTP is this right. what shall i do? Which FPC version do you use? absolute $B800:0; is only useful under DOS, so it won't work with the win32 or linux version FPC, use the go32v2 one. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Marco van de Voort
to 2cz
1.00.10 for linux. Oh, thanks. And don't you know how to do the same thing (direct access to video ram) under linux ?

Modern operating systems don't allow that. Sometimes it can be emulated with a virtual screen (see unit video that does that)