• Re: Power C/asm: returning a value from asse

    From K-Guide@1:130/230 to All on Sat Dec 14 04:39:15 2019
    On Sat 14-Dec-2019 5:17a, Harry Potter@3:770/3.0 said to Harry Potter:
    I found it. :) Sorry for wasting your time. :(

    It is never a waste of time to ask a question, especially in a public forum as others do learn from the dialog. You never know when a simple questions that has been asked before may spark insights or the imagination of the other readers.

    In your case, I am now courious how Power C does handle passing arguments and the return value from a function in assembler?

    [+] K-Guide
    --- CNet/5
    * Origin: Future World II - fw2.cnetbbs.net:6800 (1:130/230)
  • From K-Guide@1:130/230 to All on Sun Dec 15 09:01:21 2019
    On Sat 14-Dec-2019 5:03p, Harry Potter@3:770/3.0 said to K-Guide:
    The docs. I have reveal that the return value seems to overwrite the last parameter passed to the function. That's why I am worried about the too few parameters.

    Ahhh. That does seem odd as I would have though the assember routine would pull from the stack each of its parameters. Sounds like some small prototype code is needed to test this out and determine how this works.

    Are you writing the assembler fuctions or just the C portion of the code?

    [+] K-Guide
    --- CNet/5
    * Origin: Future World II - fw2.cnetbbs.net:6800 (1:130/230)
  • From Harry Potter@3:770/3 to All on Sun Dec 15 16:21:23 2019
    Admittedly, I'm not currently using Power C but am working on special support for it. I also want to create some libraries for it, and some of those functions are better off in Assembler.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From K-Guide@1:130/230 to All on Sun Dec 15 21:45:21 2019
    That cool your working to expand Power C. I have considered doing some C level
    programming on the C64 via cc65, but never got around to it.

    [+] K-Guide
    --- CNet/5
    * Origin: Future World II - fw2.cnetbbs.net:6800 (1:130/230)
  • From Harry Potter@3:770/3 to All on Sat Dec 28 08:20:30 2019
    Try https://www.lyonlabs.org/commodore/onrequest/powerc/index.html. :)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)