Intel 253668-032US User Manual

Page of 806
9-34   Vol. 3
PROCESSOR MANAGEMENT AND INITIALIZATION
CODE SEGMENT ER  use32 PUBLIC
 
main_start:
 
nop
 
nop
 
nop
CODE  ENDS
END main_start, ds:data, ss:stack
9.10.4 Supporting 
Files
The batch file shown in Example 9-3 can be used to assemble the source code files 
STARTUP.ASM and MAIN.ASM and build the final application.
Example 9-3.  Batch File to Assemble and Build the Application
ASM386 STARTUP.ASM
ASM386 MAIN.ASM
BLD386 STARTUP.OBJ, MAIN.OBJ buildfile(EPROM.BLD) bootstrap(STARTUP) 
Bootload
BLD386 performs several operations in this example:
It allocates physical memory location to segments and tables.
It generates tables using the build file and the input files.
It links object files and resolves references.
It generates a boot-loadable file to be programmed into the EPROM.
 
Example 9-4 shows the build file used as an input to BLD386 to perform the above 
functions.
Example 9-4.  Build File
INIT_BLD_EXAMPLE;
SEGMENT
        *SEGMENTS(DPL = 0)
    ,   startup.startup_code(BASE = 0FFFF0000H)
    ;
TASK
        BOOT_TASK(OBJECT = startup, INITIAL,DPL = 0, 
NOT INTENABLED)
,       PROTECTED_MODE_TASK(OBJECT = main_module,DPL = 0, 
NOT INTENABLED)
    ;