Prev: 44072 Up: Map Next: 44927
44908: Start Game
Used by the routine at GameEntry.
Clears the whole game variables area (from RandomSeed1 up to the end of the objects table at Font) and then carries on to set up a new game. The low byte of the system FRAMES counter is kept across the clear and used as the first random seed, so that every game plays differently.
Clear the variables and keep the seed.
StartGame 44908 LD HL,23456 Point HL at RandomSeed1.
44911 LD BC,1384 Set the number of bytes to 1384.
44914 LD A,(23672) Fetch the low byte of FRAMES.
44917 PUSH AF Stash the seed on the stack.
44918 CALL FillMemory Call FillMemory.
44921 POP AF Restore the seed from the stack.
44922 LD (23456),A Write it to RandomSeed1.
44925 JR InitialiseGame Jump to InitialiseGame.
View the equivalent code in;
Prev: 44072 Up: Map Next: 44927