Function does not work SDL_thread () in conjunction with machine code?

new topic     » topic index » view thread      » older message » newer message

constant dato=allocate(8) atom key, t, arg

arg=allocate(8)

dummy = SDL_Init(SDL_INIT_TIMER)

key=SDL_GetKeyState(NULL)

function Thread(atom dato) while peek(dato)=0 do SDL_PumpEvents() end while return 0 end function

t = call_back({'+',routine_id("Thread")})

constant main_bucle=get_asm( "pushad "& "l1: "& "mov al,[key+27] "& "or al,al "& "jz l1 "& "mov [dato],al "& "popad "& "ret") resolve_param("dato",dato) resolve_param("key",key)

poke(dato,0)

dummy=SDL_CreateThread(t,arg) call(main_bucle)

SDL_Quit()

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu