DS, ES, FS, GS Registers in TP7.0 *HELP* 
Author Message
 DS, ES, FS, GS Registers in TP7.0 *HELP*

Hi!!!

I have a problem. I have some problems with drawing bitmaps on the screen
in VGA 13h (it is too slow). Because this procedure is written in
assembler, I posted it in comp.lang.asm.x86. I got some answers, but all
of them requires more segment registers than ES. (DS, FS, GS). Is there
any way of using this registers in Pascal (the documentation says I cannot
change DS, and it is doing like it does not know FS and GS at all - I was
playing with TP6.0, can it work on TP7.0) ?????

Thanx a lot      Vaclav Pribik



Wed, 18 Jun 1902 08:00:00 GMT  
 DS, ES, FS, GS Registers in TP7.0 *HELP*

Quote:
>Hi!!!
>I have a problem. I have some problems with drawing bitmaps on the screen
>in VGA 13h (it is too slow).

13h slow?  If it's slow, it's probably the code.  13h is straightforward and
easy to use.  How slow is too slow, anyway?

Quote:
>Because this procedure is written in
>assembler, I posted it in comp.lang.asm.x86.

I haven't been following c.l.a.x86 lately, so I didn't notice it.  Perhaps
you could post it here, if you haven't already (haven't checked for it yet).

Quote:
>I got some answers, but all
>of them requires more segment registers than ES.

Typically, you should just need ES and DS, to specify the write destination
and read source, respectively.

Quote:
>(DS, FS, GS).

DS you need.  FS and GS are 386+ segment registers, and not readily
available in TP (286 registers only).

Quote:
>Is there
>any way of using this registers in Pascal (the documentation says I cannot
>change DS,

This isn't quite correct.  You can change DS any way you need, as long as
you preserve the original value when you're done with it.  DS holds the
segment (selector in prot. mode) of the program's data segment, and changing
it without any regard is likely to crash the program or, in some cases, the
whole system.  The same applies to the SS (stack segment) and CS (code
segment) registers.

The method I use for coding an assembler block that needs to use DS looks
like:

procedure my_asm_proc; assembler;

asm
  {some code might go here}
  push  ds

  pop   ds
  {other clean-up code goes here}
end;


restores DS and whatever else it needs to do.

Quote:
>and it is doing like it does not know FS and GS at all - I was
>playing with TP6.0, can it work on TP7.0) ?????

Not easily, since TP is a 286-level native compiler at best.  It can be done
with inlining or db/dw codes.

Quote:
>Thanx a lot      Vaclav Pribik

--
Scott F. Earnest           | We now return you to our regularly scheduled



Wed, 18 Jun 1902 08:00:00 GMT  
 DS, ES, FS, GS Registers in TP7.0 *HELP*

Quote:
>Path: nic.wi.leidenuniv.nl!highway.leidenuniv.nl!surfnet.nl!swsbe6.switch.ch!swidir.switch.ch!in2p3.fr!univ-lyon1.fr!jussieu.fr!math.ohio-state.edu!cs.utexas.edu!swrinde!gatech!newsfeed.internetmci.com!csn!news-1.csn.net!news-2.csn.net!p8.boulder-2.dialu>Path: nic.wi.leidenuniv.nl!highway.leidenuniv.nl!surfnet.nl!swsbe6.switch.ch!swidir.switch.ch!in2p3.fr!univ-lyon1.fr!jussieu.fr!math.ohio-state.edu!cs.utexas.edu!swrinde!gatech!newsfeed.internetmci.com!csn!news-1.csn.net!news-2.csn.net!p8.boulder-2.dialu>.csn.net!user

>Newsgroups: comp.lang.pascal.borland
>Subject: DS, ES, FS, GS Registers in TP7.0 *HELP*
>Date: Sun, 07 Apr 1996 10:05:53 -0700
>Organization: HAF
>Lines: 12

>NNTP-Posting-Host: 199.117.100.8
>Hi!!!

>I have a problem. I have some problems with drawing bitmaps on the screen
>in VGA 13h (it is too slow). Because this procedure is written in
>assembler, I posted it in comp.lang.asm.x86. I got some answers, but all
>of them requires more segment registers than ES. (DS, FS, GS). Is there
>any way of using this registers in Pascal (the documentation says I cannot
>change DS, and it is doing like it does not know FS and GS at all - I was
>playing with TP6.0, can it work on TP7.0) ?????

Hi,
you can use DS, but you'll have to push it first:

begin
  asm
    push ds
    ...   {your code}
    pop ds
  end;
end;

Hope this helps..

Quote:
>Thanx a lot      Vaclav Pribik

you're welcome :)

Alcyone



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Assembler - accessing FS / GS registers?

2. FS: TP7 and TPW

3. Help with DbiRegenIndex(es)

4. Acessing FS and GS in a Pascal ASM statement???

5. TP 7.0 and [GS]etTime

6. Connecting to Lotus Notes ODBC DS

7. Good text books (Pas and DS)

8. HELP : VGA read plane register.

9. Registering types, please help!

10. Help - EOleSysError - class not registered ???

11. Class not registered, Please help me

12. HELP - Register ODBC Drivers in Windows

 

 
Powered by phpBB® Forum Software