Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
software:upi_conventions [2016/06/14 10:25]
ex_writer [User-Defined Subroutines]
software:upi_conventions [2016/06/14 10:45] (current)
ex_writer [Example: Space Fortress User Subroutine]
Line 195: Line 195:
  
 ; [...] ; [...]
 +        LD      HL,$1FA7
 +        LD      ($4FFD),​HL ​     ; $4FFD is USER Table Base + routine = JumP address
 +        LD      HL,​$1FE9 ​  
 +        LD      ($4FFB),​HL ​     ; $4FFB is User Mask ARGument Table + (routine / 2)
 +        LD      A,R
 +        AND     $1C
 +        LD      ($4F2A),A
 +L2FEE   ​LD ​     HL,​L2FEE ​       ; $2FEE is current program counter address ​
 +        PUSH    HL
 +        EI 
  
 ;  Call User's Macro Subroutine $80 ;  Call User's Macro Subroutine $80