SLC 500 Subroutine jump

K

Thread Starter

Kev

I'm trying to include values from the integer register in a subroutine jump. I have an SLC 500 trainer and can't seem to get the JSR, SBR, or RET to open up to allow me to enter data location. Am I just missing something here?
 
S
>Am I just missing something here?

Yes, you are! Subroutine calls aren't paramaterizable in the SLC.

Designate a memory area as the argument area and the return area for the subroutine, then refer to those addresses in the subroutine.

Move your arguments to their area before the JSR and retrieve return(s), if any, from theirs after the call.

Alternatively, if all the arguments are in identically laid-out areas of memory, you could instead pass in a pointer, to be used for indirect or indexed addressing inside the subroutine.
 
B

bob peterson

Does the processor you are using actually support return values from subroutines? I don't recall that the SLC line does.

--
Bob
 
Top