Skip to navigation

Elite on the BBC Micro and NES

Version analysis of K%

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

Name: K% Type: Workspace

Code variation 1 of 5A variation in the comments only

Tap on a block to expand it, and tap it again to revert.

Address: &0900 to &0D3F
Address: &0400 to &07FF
Address: &8200 to &85FF (&8500 to &88FF in the Executive version)
Category: Workspaces

Code variation 2 of 5A variation in the comments only

Tap on a block to expand it, and tap it again to revert.

Summary: Ship data blocks and ship line heaps
Summary: Ship data blocks

Code variation 3 of 5A variation in the comments only

Tap on a block to expand it, and tap it again to revert.

Contains ship data for all the ships, planets, suns and space stations in our local bubble of universe, along with their corresponding ship line heaps.
Contains ship data for all the ships, planets, suns and space stations in our local bubble of universe.
Contains ship data for all the ships, planets and space stations in our local bubble of universe, along with their corresponding ship line heaps.

Code variation 4 of 5A variation in the comments only

Tap on a block to expand it, and tap it again to revert.

The blocks are pointed to by the lookup table at location UNIV. The first 432 bytes of the K% workspace hold ship data on up to 12 ships, with 36 (NI%) bytes per ship, and the ship line heap grows downwards from WP at the end of the K% workspace.
The blocks are pointed to by the lookup table at location UNIV. The first 444 bytes of the K% workspace hold ship data on up to 12 ships, with 37 (NI%) bytes per ship, and the ship line heap grows downwards from WP at the end of the K% workspace.
The blocks are pointed to by the lookup table at location UNIV. The first 720 bytes of the K% workspace hold ship data on up to 20 ships, with 37 (NI%) bytes per ship.
See the deep dive on "Ship data blocks" for details on ship data blocks, and the deep dive on "The local bubble of universe" for details of how Elite stores the local universe in K%, FRIN and UNIV.

Code variation 5 of 5Related to the 6502SP version

The Executive version has a different memory map to the other 6502SP versions, with the K% workspace at &8500 instead of &8200.

Tap on a block to expand it, and tap it again to revert.

ORG &0900
ORG &0400
IF _SNG45 OR _SOURCE_DISC ORG &8200 ELIF _EXECUTIVE ORG &8500 ENDIF
.K%

 SKIP NOSH * NI%        \ Ship data blocks and ship line heap