Re: [fpc-pascal] location modifier
Am 18.01.2016 18:19 schrieb "Karoly Balogh (Charlie/SGR)" < char...@scenergy.dfmk.hu>: > > Hi, > > On Mon, 18 Jan 2016, Sven Barth wrote: > > > Am 18.01.2016 17:00 schrieb "Karoly Balogh (Charlie/SGR)" < char...@scenergy.dfmk.hu>: > > > In the future, I plan to reuse syscalls and the location > > > syntax for a possible Atari port too. > > > > Who are you and what have you done with Charlie? :P > > Haha! :D I have eaten him! :D > > Nah, seriously, at a recent demoparty I negotiated with an Atari guy who > sits on a pile of Atari Falcon 030s, so I could get one from him in > exchange of getting FPC, or at least FPC-compiled programs working on > it... :) > > And it just seemed "easy enough" to get some basic stuff working in > exchange of such a rare beast of a machine... :) And one can never know, > maybe other 68k-guys would be interested, if their platform was > supported... And there's the ColdFire-based FireBee computer with > Atari-origins, which would be then the fastest 68k for us to run on... > (Aside from emulation based solutions.) Oh, cool. I have Atari support as a very long term point on my ToDo list, so you're welcome to do get this working before me :) Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] location modifier
Hi, On Mon, 18 Jan 2016, Sven Barth wrote: > Am 18.01.2016 17:00 schrieb "Karoly Balogh (Charlie/SGR)" > : > > In the future, I plan to reuse syscalls and the location > > syntax for a possible Atari port too. > > Who are you and what have you done with Charlie? :P Haha! :D I have eaten him! :D Nah, seriously, at a recent demoparty I negotiated with an Atari guy who sits on a pile of Atari Falcon 030s, so I could get one from him in exchange of getting FPC, or at least FPC-compiled programs working on it... :) And it just seemed "easy enough" to get some basic stuff working in exchange of such a rare beast of a machine... :) And one can never know, maybe other 68k-guys would be interested, if their platform was supported... And there's the ColdFire-based FireBee computer with Atari-origins, which would be then the fastest 68k for us to run on... (Aside from emulation based solutions.) Charlie ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] location modifier
Am 18.01.2016 17:00 schrieb "Karoly Balogh (Charlie/SGR)" < char...@scenergy.dfmk.hu>: > In the future, I plan to reuse syscalls and the location > syntax for a possible Atari port too. Who are you and what have you done with Charlie? :P Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] location modifier
On Mon, 18 Jan 2016 16:59:49 +0100 (CET) "Karoly Balogh (Charlie/SGR)" wrote: >[...] > And there's no need to take educated guesses, it's all documented in the > wiki: > > http://wiki.freepascal.org/Amiga#Introduction_to_SysCalls > http://wiki.freepascal.org/MorphOS#Introduction_to_SysCalls > > From syntax PoV, the argument is always a two character string, and can > contain 'd0'-'d7', and 'a0'-'a6', which are the 68k CPU's data and address > registers, respectively. > > Syscalls also exist on AROS/i386 and AROS/x86_64 (for now), but there the > locations are defined by the ABI, without the need to be specified > explicitly. In the future, I plan to reuse syscalls and the location > syntax for a possible Atari port too. > > If there are any more questions, I'm happy to answer. Thanks. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] location modifier
On Mon, 18 Jan 2016 16:40:17 +0100 (CET) Michael Van Canneyt wrote: > > > On Mon, 18 Jan 2016, Mattias Gaertner wrote: > > > Hi, > > > > I can't find the 'location' modifier in the docs. Is it missing? > > I didn't even know this modifier existed. > Let alone that I know what it does > (although I can take an educated guess) Yes, me too. But to fix http://bugs.freepascal.org/view.php?id=29350 I need scope and order. Is it Amiga only? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] location modifier
Hi, On Mon, 18 Jan 2016, Mattias Gaertner wrote: > I can't find the 'location' modifier in the docs. Is it missing? > > For example: > > function bsd_socket(Domain: LongInt location 'd0'; Type_: LongInt > location 'd1'; Protocol: LongInt location 'd2'): LongInt; syscall > SocketBase 30; > > See for example packages/rtl-extra/src/amiga/sockets.pp This modifier only exist for Amiga-library ABI syscalls, therefore only available on m68k-amiga and powerpc-morphos (where it's called the legacy library ABI). It's there to help the compiler to know which value to put into which register, before a library call happens. These registers are explicitly defined in C/assembly, without any common ABI, and it's is heavily macroed when using a a C compiler. On Amiga, we used umpzillion asm-written/generated wrappers before syscalls existed (1.0.x times and before), which was very ugly, slow, and bloated. The location modified is only valid together with the syscall modifier. It actually exists since 2005, or so, when I refused to reinvent the umpzillion asm wrappers stunt for MorphOS, so Florian helped me to come up with this solution. And there's no need to take educated guesses, it's all documented in the wiki: http://wiki.freepascal.org/Amiga#Introduction_to_SysCalls http://wiki.freepascal.org/MorphOS#Introduction_to_SysCalls >From syntax PoV, the argument is always a two character string, and can contain 'd0'-'d7', and 'a0'-'a6', which are the 68k CPU's data and address registers, respectively. Syscalls also exist on AROS/i386 and AROS/x86_64 (for now), but there the locations are defined by the ABI, without the need to be specified explicitly. In the future, I plan to reuse syscalls and the location syntax for a possible Atari port too. If there are any more questions, I'm happy to answer. Charlie ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] location modifier
On Mon, 18 Jan 2016, Mattias Gaertner wrote: Hi, I can't find the 'location' modifier in the docs. Is it missing? I didn't even know this modifier existed. Let alone that I know what it does (although I can take an educated guess) Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] location modifier
Hi, I can't find the 'location' modifier in the docs. Is it missing? For example: function bsd_socket(Domain: LongInt location 'd0'; Type_: LongInt location 'd1'; Protocol: LongInt location 'd2'): LongInt; syscall SocketBase 30; See for example packages/rtl-extra/src/amiga/sockets.pp Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal