1. Can someone explain how to call a function C from a machine code routine?.

This program is an idea of how serious the real program

atom key 
 
key=SDL_GetKeyState(NULL) 
 
constant main_bucle=get_asm( 
 
"pushad "& 
 
"l1: "& 
 
"mov al,[key+27] "&      <===== Get escape key state. 
 
"call SDL_PumpEvents "&  <===== This is not possible but it would be like. 
 
"or al,al "& 
 
"jz l1: "& 
 
"popad "& 
 
resolve_param("key",key) 
 
resolve_param("SDL_PumpEvents ",xSDL_PumpEvents) 
 
call(main_bucle) 
 
SDL_Quit() 

[edit: added eucode tags]

new topic     » topic index » view message » categorize

2. Re: Can someone explain how to call a function C from a machine code routine?.

javier07b9 said...

This program is an idea of how serious the real program...

Take a look at fptr:

http://www.rapideuphoria.com/fptr.zip

It supports several calling conventions.

Matt

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu