Board index » delphi » Assembly coding inside Delphi

Assembly coding inside Delphi

Please help me, using Delphi, from time to time I have to fall back on older
(C-ASM) coding for certain utilities wich are referring tot specific Computer
oriented addresses or registers.

i.e. INP 0x30 for testing or so.

How can this sort of (very simple) ASM coding be implemented in Delphi.

My E-Mail : DATA...@EURONET.NL

 

Re:Assembly coding inside Delphi


Quote
DATA...@euronet.nl (Jan_Bodzinga) wrote:
>Please help me, using Delphi, from time to time I have to fall back on older
>(C-ASM) coding for certain utilities wich are referring tot specific Computer
>oriented addresses or registers.
>i.e. INP 0x30 for testing or so.
>How can this sort of (very simple) ASM coding be implemented in Delphi.
>My E-Mail : DATA...@EURONET.NL

Some instructions may not be allowed in the normal protected mode of
windows, so you may have to learn about DPMI (DOS Protected Mode
Interface). But other than that, have you read chapter 19 of the
Object Pascal Language Guide? Or tried searching help for ASM?

HTH. Regards, Bengt Richter

Re:Assembly coding inside Delphi


In article <DATAVJB.2.000E4...@euronet.nl>,
   DATA...@euronet.nl (Jan_Bodzinga) wrote:

Quote
>Please help me, using Delphi, from time to time I have to fall back on older
>(C-ASM) coding for certain utilities wich are referring tot specific Computer
>oriented addresses or registers.

>i.e. INP 0x30 for testing or so.

>How can this sort of (very simple) ASM coding be implemented in Delphi.

How about

Asm
  { assembly stuff }
End;

-----------------------------------------------
Mike Chapin
Powder River
mcha...@vcn.com
http://www.vcn.com/server/netizens/mchapin/first.html
Gillette, WY

Not the end of the earth but you can see it from
there.
-----------------------------------------------

Re:Assembly coding inside Delphi


The message was:

Please help me, using Delphi, from time to time I have to fall back on
older
(C-ASM) coding for certain utilities wich are referring tot specific
Computer
oriented addresses or registers.

i.e. INP 0x30 for testing or so.

How can this sort of (very simple) ASM coding be implemented in Delphi.
______________________________________________________

So what is wrong with using the inline assembler?

I use it, it works fine!

Re:Assembly coding inside Delphi


Quote
On Mon, 29 Jan 1996 14:16:37, DATA...@euronet.nl (Jan_Bodzinga) wrote:
>Please help me, using Delphi, from time to time I have to fall back on older
>(C-ASM) coding for certain utilities wich are referring tot specific Computer
>oriented addresses or registers.

>i.e. INP 0x30 for testing or so.

>How can this sort of (very simple) ASM coding be implemented in Delphi.

>My E-Mail : DATA...@EURONET.NL

Read your online documentation and look for the asm or assembler
keywords, or check out the online Acroread Object Pascal Language
Guided (OBJLANG.PDF).

Re:Assembly coding inside Delphi


All you have to do is type ASM and everything between that asm and the
following end is written in assembly E.G

For Using Calls and Jumps though I Belive an @ has to precede each label :

Procedure Hello(Var I : Byte);
Begin
  ASM
    MOV CX,I
    @STUPID:
    LOOP @STUPID
    INT 19h

  END;
End;

Other Threads