patricktran
New Member
I think a label is better than a subroutine. The reason is returnning from a lable, we can GOTO anywhere we like!! 8) But with subroutine, we must return to where we called it before.
We can even "pretend" a label as a subroutine as follow:
Loop
decfsz d1
goto DoSomeThing
Back goto Loop
DoSomeThing
blah blah blah
goto Back
---------------------
It is the same with subroutine:
Loop
decfsz d1
call DoSomeThing
goto Loop
DoSomeThing
blah blah blah
return
----------------------
Please correct me if I am wrong.
Thanks
Pat
We can even "pretend" a label as a subroutine as follow:
Loop
decfsz d1
goto DoSomeThing
Back goto Loop
DoSomeThing
blah blah blah
goto Back
---------------------
It is the same with subroutine:
Loop
decfsz d1
call DoSomeThing
goto Loop
DoSomeThing
blah blah blah
return
----------------------
Please correct me if I am wrong.
Thanks
Pat