Page 1 of 1

USR function

Posted: Sun Jun 12, 2016 4:00 pm
by minimaltom
Hi, I'm going through "Spectrum Machine Language for Begginers" And its going fairly well but at the beginning I was baffled by the line "don't forget that the function of "USR" is to execute a machine language subroutine", but this was the first time USR was mentioned in the book! Can someone explain what it is and why is it the value of the bc register pair at the end of running a program? I can't find anything about it with google but my guess is its a subroutine stored in ROM/RAM??? that executes Machine code instructions.

Thanks

Re: USR function

Posted: Sun Jun 12, 2016 5:30 pm
by 1024MAK
Have a read here ;)

Mark

Re: USR function

Posted: Mon Jun 13, 2016 7:32 pm
by XavSnap
Hi,
Just a keyboard trouble !
Don't type URS as U_S_R word.
If you type "U" "S" "R", this word is a variable, not a function!

10 LET USR=1
20 PRINT USR
RUN
1
:oops:
30 RANDOMIZE USR =>> RANDOMZE 1
40 LET VAL=USR 32000 =>> VAL= 1 32000 (RETURN AN ERROR!)

You had to type "1" "0" "T" "CTRL+SHIFT" "L" "3" "2" "0" "0" "0" !
>> 10 RANDOMIZE USR 32000