: : : : : I have got turbo pascal7.0, but why cant i run programs with inline assembler???
: : : : :
: : : : : i am recieving the commands : begin expected and unknown identifier.
: : : : :
: : : : : i was told yesterday that version 6.0 and newer, would have the inline assembler build in.
: : : : :
: : : : : can anybody help me??
: : : : :
: : : : : reggards
: : : : :
: : : : : johnny
: : : : :
: : : : Without a code example, we are very hard-pressed to help you. It might be a typo in the word assembler, or the programmer has written something other than asm to start the assembler part. Perhaps an unknown variable type, or something like that.
: : : :
: : : in this example it says 'begin expectet' and the cursor is blinking in the start of 'assembler'
: : :
: : : Procedure Palette(ColNum,R,G,B:Byte); Assembler;
: : : Asm Mov dx,$3c8; Mov al,ColNum; Out dx,al; Inc dx; Mov al,R;
: : : Out dx,al; Mov al,G; Out dx,al; Mov al,B; Out dx,al End;
: : :
: : :
: : : and in this example it says 'unknown identifier' and the cursor is blinking in the start of 'asm'
: : :
: : : procedure FontAccess( Accessible : boolean );
: : : begin
: : : asm
: : : push ax
: : : push dx
: : : cli
: : :
: : : { -- EgaVga sequencer -- }
: : : mov dx, 3c4h
: : :
: : : mov ax, 0100h
: : : @1:
: : : out dx, ax
: : : mov ax, 0302h
: : : cmp Accessible, True
: : : jnz @2
: : : inc ah { 0402h if accessible }
: : :
: : :
: : :
: : :
: : : i hope you can help me.
: : :
: : : reggards
: : :
: : : johnny
: : :
: : :
: : Neither my TP6.0 manual nor my Delphi 6.0 manual show "assembler" as a reserved word. Comment that out and it should compiles. As noted in my post yesterday, all you need is asm....end; So, in your case,
: :
: : Procedure Palette(ColNum,R,G,B:Byte);
: : Asm
: : Mov dx,$3c8; Mov al,ColNum; Out dx,al; Inc dx; Mov al,R;
: : Out dx,al; Mov al,G; Out dx,al; Mov al,B; Out dx,al;
: : End;
: :
: : should compile. HTH
: :
: The TP7 and D5 online helps list the assembler directive as reserved words (in D5 only as backward compatibility).
:
I stand corrected. I looked in my D6 documentation and it's in there as well. Sorry about the misinformation.