Board index » delphi » Low level intr call in Delphi

Low level intr call in Delphi

Appreciate experts to help me please....

        When I write a small asm routine in Delphi and make a call it says...GENERAL PROTECTION blah blah...at
blah..blah.  I am writing routines like reading the HD track/sector via Delphi using low level BIOS access.
Most calls require hex dump to certain area in the memory will cause this protection error.

        I REALLY appreciate any experts can tell me how to overcome this system error in Windows programming
and in Delphi of course.

        Thanks in a million in advance.

Rgds,
Norbert.

 

Re:Low level intr call in Delphi


Quote
microspy <nl...@pc.jaring.my> wrote:
>Appreciate experts to help me please....

>    When I write a small asm routine in Delphi and make a call it says...GENERAL PROTECTION blah blah...at
>blah..blah.  I am writing routines like reading the HD track/sector via Delphi using low level BIOS access.
>Most calls require hex dump to certain area in the memory will cause this protection error.

>    I REALLY appreciate any experts can tell me how to overcome this system error in Windows programming
>and in Delphi of course.

>    Thanks in a million in advance.

>Rgds,
>Norbert.

Norbert, which platform you use?

1. Delphi 1.x under Windows 3.1x
2. Delphi 1.x under Win95
3. Delphi 1.x under WinNT
4. Delphi 2.x under Win95
5. Delphi 2.x under WinNT

The solutions for each variant are very various.
For Delphi 2.x - create of your own virtual driver (95) or kernel-mode
driver (NT) only.
For Delphi 1.x under Windows 3.1x it is possible without the driver.
It is necessary to arrange memory for I/O-buffers in the first
megabyte through GlobalDOSAlloc().

Victor

Re:Low level intr call in Delphi


On Tue, 24 Dec 1996 12:57:50 +0800, microspy <nl...@pc.jaring.my>
wrote:

Quote
>Appreciate experts to help me please....

>    When I write a small asm routine in Delphi and make a call it says...GENERAL PROTECTION blah blah...at
>blah..blah.  I am writing routines like reading the HD track/sector via Delphi using low level BIOS access.
>Most calls require hex dump to certain area in the memory will cause this protection error.

>    I REALLY appreciate any experts can tell me how to overcome this system error in Windows programming
>and in Delphi of course.

>    Thanks in a million in advance.

{$define notexpert}

what os are you using? win3.1/win95/winNT3.5x/winNT4?
under NT, direct bios calls are NOT allowed. they will result in a OS
exception.
further more, show us some code where you attempt to do call this
bios-stuff.
if you're using asm, did you not forget to push and pop all registers?

Other Threads