[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-------------+############################################################
#+-| SETUP_MICRO |-----------------------------------+########################
#| +-------------+ Allow FORCE programs to link with |########################
#| MS/C runtime and graphic libs |########################
#+---------------------------------------------------+########################
##############################################################################
##############################################################################
#+--| Summary |---------------+###############################################
#| #INCLUDE mixed.hdr |###############################################
#+----------------------------+###############################################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------+##################################
#| PROCEDURE setup_micro PROTOTYPE |##################################
#+-----------------------------------------+##################################
##############################################################################
##############################################################################
########+---| Description |-----------------------------------------+#########
########| This procedure allows a FORCE program to link directly |#########
########| with the Microsoft C runtime and graphics library, or any |#########
########| library specific to Microsoft's compiler. |#########
########| --------------------------------------------------------- |#########
########| The procedure must be called prior to using any Microsoft |#########
########| library routines. It is best to call setup_micro at the |#########
########| start of your program, within the procedure force_main. |#########
########+-----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+---| Design |--------------------------------------------+##########
#########| The setup_micro procedure emulates Microsoft's startup |##########
#########| modules for their C libraries, i.e., crt0.obj. An |##########
#########| array is established for the command line allowing the |##########
#########| usage of the C library argv() and argc() functions. |##########
#########| Also, the DOS environment is copied to an internal |##########
#########| buffer. |##########
#########| ------------------------------------------------------- |##########
#########| The link order is important with Microsoft libraries. |##########
#########| The force.lib file must appear BEFORE any Microsoft |##########
#########| libraries. For example, |##########
#########| |##########
#########| link forceapp ,,, force mlibc |##########
#########| |##########
#########| Because FORCE's memory module is large, use only large |##########
#########| model libraries. |##########
#########| ------------------------------------------------------- |##########
#########| The source to setup_micro is distributed on the FORCE |##########
#########| diskettes. A sample application using Microsoft |##########
#########| library routines, ftomc.prg, is also included. |##########
#########+---------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Make the call to the setup_micro procedure |#########
#########| * at the start of your program. |#########
#########| |#########
#########| #include mixed.hdr |#########
#########| PROCEDURE force_main |#########
#########| DO setup_micro |#########
#########| {...} |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
setup_turboc
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson