One Time Setup

The first line of the original game immediately jumps to a machine code routine at $E164.

Initially, I thought this was calling something in the NEC PC-6001 ROM.

It was really more interesting than that.

The routine at $E164 performs a block memory move to setup the machine code and data appended after the end of the tokenized BASIC during load.

As its final act, the $E164 routine overwrites the BASIC program's line 10.

When loaded, but before first run, line 10 reads:

10 EXEC&HE164

After the the EXEC, line 10 reads:

10 REM ASCII

This prevents the memory move and other early setup from being re-run over and over if the player chooses to “play again” when asked.

;*********************************************************************
BAS0010:                      ; START SETTING UP GAME
;*********************************************************************
                              ; 10 EXEC&HE164 'OVERWRITE WITH 10 REM ASCII
                              ; 10 REM ASCII  'for subsequent runs

Return to Nostromo