Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-11

Asm

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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]
--------------------------------------

Reply by email

Florian Klaempfl
to Carsten Bager
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

Show quoted text 34 lines
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 - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email