QDOS Internals

Anything you never knew you wanted to know about the Sinclair QL.

User Tools

Site Tools


BP_LET/SB_PUTP - Vector $120

This vector allows a parameter to either a machine code procedure or function to be changed.

Call ParametersReturn Parameters
D0.LUnused D0.LError code.
D1.LUnused D1.LCorrupted.
D2.LUnused D2.LCorrupted.
D3.LUnused D3.LCorrupted.
A0.LUnused A0.LCorrupted.
A1.LUnused A1.LCorrupted.
A2.LUnused A2.LCorrupted.
A3.LPointer to parameter A3.LPreserved.
A6.LSuperBASIC pointer A6.LMay be changed.


ERR_BPBad Parameter.


  • All registers not shown above are not used on entry and are preserved on exit.
  • (A3,A6.L) points to the parameter's entry in the Name Table.
  • The updated value of the parameter must be put onto the maths stack.


The example below shows an integer parameter being halved.

        move.w  CA_GTINT,A2     ; CA_GTINT vector address.       
	jsr	(a2)		; Put the parameter on the maths stack.
	bne.s	Error_handler	; Oops!
        asr     (a1,a6.l)       ; Halve the parameter.
        movea.w BP_LET,(a2)     ; BP_LET vector address.
        jsr	(a2)            ; Put the new value from the maths stack. 
	bne.s	Error_handler	; Oops!
qdosmsq/vectors/putp.txt · Last modified: 2009/02/11 14:54 by george.gwilt