View Single Post
Old 30 December 2013, 19:28   #35
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Quote:
Originally Posted by FrodeSolheim View Post
I wasn't sure if the registers of the caller's task could be easily updated by the task-resuming code. I should have asked I'll update the code to use D0 as a return register then! I can also then allow the native functions to return a long value to the D0 register.
bsdsocket also uses this type of functions and they do work.

Amiga -> native code -> native code calls some Amiga library function -> Amiga side -> m68k code runs again -> back to native side -> final return to original Amiga side with return code in D0. I don't know how this works trap magic works, I only know it works

Quote:
I do have another question though, in ahidsound_dsonly.cpp, the dll function calls are done with some inline assembly code instead of calling via a C function prototype. Is this a "hack" to make it work with both cdecl / stdcall calling conventions in libraries.
I have no idea. Most of it is not mine (mainly the dll check protection and some ahi modifications). Windows clipboard stuff is also mostly obsolete.
Toni Wilen is online now  
 
Page generated in 0.04917 seconds with 9 queries