Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
software:upi_conventions [2016/06/14 10:12]
ex_writer [User-Defined Subroutines]
software:upi_conventions [2016/06/14 10:18]
ex_writer
Line 125: Line 125:
 From system BIOS: From system BIOS:
  
-<​code>​If the call index provided is negative [or from $ff through $80] then the users dispatch table pointer (USERTB) is used [also UMARGT]. Note that the sign bit isn't zapped before being used as an index, this means that the users dispatch table pointer should point 128 bytes before the first entry.</​code>​+<​code>​The UPI has been extended to support user-supplied routines. ​If the call index provided is negative [or from $ff through $80] then the users dispatch table pointer (USERTB) is used [also UMARGT]. Note that the sign bit isn't zapped before being used as an index, this means that the users dispatch table pointer should point 128 bytes before the first entry.</​code>​
  
-=== Example === +Also: 
-<​code ​z80+ 
-     ​LD        HL,​USERMT-64 ​    ​; WHERE USERMT POINTS AT +<​code>​ 
-     ​LD        (UMARGT),HL+THE UPI HAS BEEN EXTENDED TO PROVIDE USER PROVIDED 
 +  ;  SYSTEM ROUTINES. IF A NEGATIVE CALL INDEX IS ENCOUNTERED 
 +  ;  BY THE INTERPRETER,​ AND 'SUCK INLINE'​ IS OPTIONED, THE 
 +  ;  USER MACRO ROUTINE ARGUMENT TABLE IS INDEXED FOR A 
 +  ;  PARAMETER MASK.  THE ADDRESS OF THIS TABLE IS ASSUMED 
 +  ;  TO BE IN (UMARGT),​(UMARGT+1). ​ THIS POINTER SHOULD 
 +  ;  POINT 64 BYTES BEFORE THE FIRST REAL ENTRY. 
 +  ;  I.E. LD      HL,​USERMT-64 ​ ; WHERE USERMT POINTS AT the USER's Macro Table 
 +  ; ​      LD      (UMARGT),HL
 </​code>​ </​code>​
 +
 +----
  
 The user must set up the subroutine as follows: The user must set up the subroutine as follows: