Runtime error 216 ????? 
Author Message
 Runtime error 216 ?????

                       ** URGENT **

When I use Turbo Pascal whith the protected mode in
order to use the interruption 13h =intr($13,tregister)
to acces to the boot sector of any disk, I get the
following error:  Runtime error 216 and the system
shuts down.

  Please help me.



Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime error 216 ?????


Quote:
>                       ** URGENT **
>When I use Turbo Pascal whith the protected mode in
>order to use the interruption 13h =intr($13,tregister)
>to acces to the boot sector of any disk, I get the
>following error:  Runtime error 216 and the system
>shuts down.

A runtime error 216 indicates a general protection fault; your system is
running in protected mode, and you violated memory protection.  In TP, it's
probably not documented, because you can't compile protected mode programs
(although one of the included IDE programs runs in protected mode).  In BP,
where PM is supported as a target, more information is available in the
manuals.

As for reading the boot sector, I'd strongly recommend against using int 13h
unless you're certain you're using it correctly.  You may also find it
easier to use int 25h instead and let DOS return the appropriate logical
sector.

Quote:
>  Please help me.

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



Wed, 18 Jun 1902 08:00:00 GMT  
 Runtime error 216 ?????

As far as I can recall, error 216 is the general protection error.
When using int 13h to read from disk, the thing is running in
real mode !!!!!

A possible solution may be to create a new pointer/selector using
GLOBALDOSALLOC, which creates a memory block in the lower 1MB area and
returns a longint containing a prot. mode selector and a real mode segment.
You then assign the ES parameter (or DS ?) in Your Tregister with the segment
part before the int 13h call, and later use the selector to gain access to
the data in DPMI.

...........................................
Jan H. Hviid
Danish Defence Research Establishment

DK - 2100 Copenhagen O.
Denmark
...........................................


Quote:
> When I use Turbo Pascal whith the protected mode in
> order to use the interruption 13h =intr($13,tregister)
> to acces to the boot sector of any disk, I get the
> following error:  Runtime error 216 and the system
> shuts down.



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

 Relevant Pages 

1. Runtime error 216?

2. Accessing?database?in?OCX?givces runtime error 216?on?exit

3. Runtime Error 216 in Drivers.StoreEvent

4. EExternalException....RunTime error 216???

5. Runtime Error 216 at 0005:4417.onal msnsger

6. runtime error 216 whe

7. runtime error 216 when using BP7 for protected mode use

8. Floodfill with Borland pascal 7 creates a runtime 216 error

9. DPMI, RTM.EXE and Error 216

10. Error 216 when connected to Netware 4.11 Network

11. Internal error 216????

12. 216 error with pxengine

 

 
Powered by phpBB® Forum Software