In a text adventure, each location is usually unique.
Desert is a grid game, where the most important thing is the exploration of a grid. A grid game repeats many locations.
I have taken the largest grid size that fits in a byte: 16 x 16 squares for a total of 256 and I have plenty of memory left over. Larger grids may be used. Later, I will explain different ideas for using larger grids.
As I told you in Pursuing tom Ram, I use as many ROM subroutines as I can to save memory. The subroutines I use in Desert are these.
All but one of the subroutines I have also used in Pursuing Tom Ram. The new subroutine is PRTFIX, which I use to print numbers on the screen.
; Subrutines
PRTSTR = $CB1E
CHROUT = $ffd2
CHIN = $FFCF
CLRS = $e55f ; CLR Screen
PRTFIX = $ddcd ; Convert and pritns and integer