Asm

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Asm

Carsten Bager
The below Pascal code cannot compile with ARM Pascal
compiler. If I use $EFFFF034 as constant it compiles. I am
trying to write some assembler in the Pascal source code (to
get around this error), could someone give me a hint how to
write the line:
  VICDefVectAddr := @UartInterrupt;
in assembler.


Regards Carsten

-------------------------

Var
  VICDefVectAddr : Pointer Absolute $FFFFF034;

Procedure UartInterrupt;
begin
end;

Begin
  VICDefVectAddr := @UartInterrupt;
End.

---- Assembler sorce code ---------------------------
# [212] VICDefVectAddr := @UartInterrupt;{ holds address at what
routine for servicing non-vectored IRQs (i.e. UART1 and I2C) starts }

        ldr     r0,.L68
        ldr     r1,.L69
        str     r0,[r1]
--------------------------------------
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Asm

Florian Klämpfl
Carsten Bager wrote:

> The below Pascal code cannot compile with ARM Pascal
> compiler. If I use $EFFFF034 as constant it compiles. I am

Just checked with 2.1.1, probably a bug in 2.0.0 which has been fixed
meanwhile.

c:\fpc>type testarm.pp
Var
  VICDefVectAddr : Pointer Absolute $FFFFF034;

Procedure UartInterrupt;
begin
end;

Begin
  VICDefVectAddr := @UartInterrupt;
End.

c:\fpc>c:\fpc\compiler\arm\pp -Fuc:\fpc\rtl\units\arm-linux
-Fuc:\fpc\fcl\units\arm-linux testarm.pp -Sd -XParm-linux- -vi
Target OS: Linux for ARM
Compiling testarm.pp
Assembling program
Linking testarm
10 Lines compiled, 0.0 sec


> trying to write some assembler in the Pascal source code (to
> get around this error), could someone give me a hint how to
> write the line:
>   VICDefVectAddr := @UartInterrupt;
> in assembler.
>
>
> Regards Carsten
>
> -------------------------
>
> Var
>   VICDefVectAddr : Pointer Absolute $FFFFF034;
>
> Procedure UartInterrupt;
> begin
> end;
>
> Begin
>   VICDefVectAddr := @UartInterrupt;
> End.
>
> ---- Assembler sorce code ---------------------------
> # [212] VICDefVectAddr := @UartInterrupt;{ holds address at what
> routine for servicing non-vectored IRQs (i.e. UART1 and I2C) starts }
>
>         ldr     r0,.L68
>         ldr     r1,.L69
>         str     r0,[r1]
> --------------------------------------
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal