A-code library mode interface
This document is still under construction!
Normally, A-code games drive their own main loop, but various app frameworks insist on taking this functionality over. To cater for implementations based on such frameworks, A-code kernel has a library mode. When compiled in this mode, instead of having main(), it has a function called advturn(), which takes as its sole character string argument a a request (e.g. a player's command), and returns as its value a pointer to the game's response.
At present, there is on important restriction on A-code games to be built using the library mode: they cannot use the QUERY directive. Reasons for this restriction , as well as a workaround, can be found in a separate document describing the A-code CONTEXT mechanism.