Difference between revisions of "Entry point"
(Created page with "An entry point locates the first section of code (subroutine) executed by a CPU after its source executable is loaded into main memory. A common symbolic name for the entry po...") |
m (3 revisions imported: Initial import from Wikia) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
== main() == | == main() == | ||
− | The <code>main</code> routine calls 3 subroutines. The first of these routines performs hardware initialization. The second contains the | + | The <code>main</code> routine calls 3 subroutines. The first of these routines performs hardware initialization. The second contains the [[Game Loop|game loop]]. The third releases any resources allocated during hardware initialization. Prior to execution of these routines, the game loop condition at <code>0x56410</code> is set to true/1. |
− | In each game, the level id for the 'initial level' is passed as an argument to the | + | In each game, the level id for the 'initial level' is passed as an argument to the [[Game Loop|game loop routine]]. The initial level isn't actually a 'level' per-se, but rather a game state, which includes the title sequence, options menu, password menu (Crash 1), map (Crash 1), and game over screen. |
+ | __FORCETOC__ | ||
+ | __NEWSECTIONLINK__ |
Latest revision as of 17:44, 27 April 2019
An entry point locates the first section of code (subroutine) executed by a CPU after its source executable is loaded into main memory. A common symbolic name for the entry point routine is start
.
Contents
Entry point locations
The following lists the location of the entry point for each of the Crash games:
- Crash 1 - 0x3E018
start()
The start
routine sets the location of the global pointer, initializes the heap, and calls the main
routine.
main()
The main
routine calls 3 subroutines. The first of these routines performs hardware initialization. The second contains the game loop. The third releases any resources allocated during hardware initialization. Prior to execution of these routines, the game loop condition at 0x56410
is set to true/1.
In each game, the level id for the 'initial level' is passed as an argument to the game loop routine. The initial level isn't actually a 'level' per-se, but rather a game state, which includes the title sequence, options menu, password menu (Crash 1), map (Crash 1), and game over screen.