Re: [fpc-pascal] Asm
Carsten Bager wrote: > The below Pascal code cannot compile with ARM Pascal > compiler. If I use $E034 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 $F034; 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 $F034; > > 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 - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Sparc future?
While planning the 2.0.2 release building, I was thinking about the future of the sparc port (linux). The download numbers are little, see e.g. sf: http://sourceforge.net/project/showfiles.php?group_id=2174. Further, it even seems that Sun doesn't thrust in it anymore but uses AMD64. Since sparc is currently maintained by the core team it mainly costs time which could be spent in other platforms. So I was thinking about dropping sparc releases for now. If necessary, it can be quickly reviewed. Any comments? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Question on method pointers
I have a question regarding the assignment of the result of a function. The function is declared as such: TMyFunc = function : extended of Object; I have a variable that is of this type and I want to assign the result of this function to a variable of type extended. I was thinking to do it like this; var MyFuncVar: TMyFunc; MyResult := MyFuncVar; But obviously it does not work. On delphi it does, so how can I make it work on FPC?? Kind regards, Darius Blaszijk ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Question on method pointers
On 05 Nov 2005, at 20:21, [EMAIL PROTECTED] wrote: I have a variable that is of this type and I want to assign the result of this function to a variable of type extended. I was thinking to do it like this; var MyFuncVar: TMyFunc; MyResult := MyFuncVar; But obviously it does not work. On delphi it does, so how can I make it work on FPC?? It should work in Delphi mode. In other modes, use MyResult := MyFunc(); (which also works in Delphi if I'm not mistaken) Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Question on method pointers
It works, thanks > > On 05 Nov 2005, at 20:21, [EMAIL PROTECTED] wrote: > >> I have a variable that is of this type and I want to assign the >> result of >> this function to a variable of type extended. I was thinking to do >> it like >> this; >> >> var MyFuncVar: TMyFunc; >> >> MyResult := MyFuncVar; >> >> But obviously it does not work. On delphi it does, so how can I >> make it >> work on FPC?? > > It should work in Delphi mode. In other modes, use > > MyResult := MyFunc(); > > (which also works in Delphi if I'm not mistaken) > > > Jonas > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal