Pursuing Tom Ram

Game available in Itch.io.

Soruce code in Github.

Programming adventures in VIC-20.


Memory

The Student Edition fits in the 3,5 Kb. free Ram of the VIC-20.

Pursuing Tom Ram uses three memory bytes from page 0 for a good reason. I have to use addresses in page 0 for the indirect addressing I use it in a couple of subroutines, the ones with the callback.

You can gain some extra bytes if you use more addresses from page 0. Last version of the code uses more page 0 addresses. Here you have a list.

  
 ;verb            
; 47 - 48 Variable address
verb = $47

;name            
; 49 - 4a Variable pinter for FOR
name = $49


;token           
; $45 - 46 Current variable name
token = $45

; $71, 72 Cassete buff len

; $73 - 8a CHRGET subroutine
;loc     BYTE    $0
loc = $73

;verb_index      
verb_index = $74

;name_index       
name_index = $75

;flags        
flags = $76

  

Sadly I was not able to store data or code directly in page 0 using CBM PRG Studio. If you know how I would like to hear you.