home bbs files messages ]

Just a sample of the Echomail archive

Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.

   CBM      Commodore Computer Conference      4,328 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,917 of 4,328   
   K-Guide to All   
   Re: Power C/asm: returning a value from    
   14 Dec 19 17:10:07   
   
   MSGID: 1:130/230@fidonet 5df56bd4   
   PID: C-NET AMIGA 5.25D   
   On Sat 14-Dec-2019  8:48a, Harry Potter@3:770/3.0 said to K-Guide:   
   HP> It seems that I have to pass the return value in the TOS, but what if the   
   HP> function has no parameters or too few parameters?   
      
   Using the stack makes alot of since for the return value of the assembler   
   function.  In the case of no parameter, I suspect you can just call the routine   
    via a function pointer in C. Set that to the address of your assembler routine   
    and call the function.  Please bear in mind I am not a Power C programmer, but   
    am just guessing based on other platforms I program on.  If you have   
   parameters there could be some documemtation on how to pass them via registers   
   in the compiler docs.  Compilers seem to have their own style for stuff like   
   that.  It also could be that you just need to drop the values into a certain   
   memory location as the assember routine expects it there.   
      
   Not sure I follow you about the too few parameters.   
      
   [+] K-Guide   
   --- CNet/5   
    * Origin: Future World II - fw2.cnetbbs.net:6800 (1:130/230)   
   SEEN-BY: 1/123 15/0 2 19/35 36 34/999 90/1 104/115 106/101 201 114/224   
   SEEN-BY: 114/702 705 706 116/18 123/140 124/5014 5016 5018 128/2 73   
   SEEN-BY: 128/187 253 130/230 803 153/7715 218/700 222/2 226/16 227/114   
   SEEN-BY: 229/101 275 354 426 1014 230/150 152 240/1120 5832 249/1   
   SEEN-BY: 249/206 307 317 400 250/1 261/38 100 266/512 267/155 275/100   
   SEEN-BY: 282/1031 1056 291/1 111 298/25 305/1 3 310/2 312/2 317/3   
   SEEN-BY: 320/119 219 322/757 340/400 342/13 200 387/25 396/45 640/1321   
   SEEN-BY: 712/848 801/161 189 2320/105 3005/1 3634/12 5020/1042 31999/99   
   PATH: 130/230 396/45 261/38 15/0 317/3 229/426   
      

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca