Willsy Posted October 5, 2012 Share Posted October 5, 2012 Is this legal code? LI R0,>02E0 ; LWPI OP-CODE LI R1,>3000 ; OPERAND FOR LWPI INSTRUCTION X R0 I believe that is legal code. It should set the workspace pointer to >3000. It doesn't when I try in classic99. Any ideas? Quote Link to comment Share on other sites More sharing options...
moulinaie Posted October 5, 2012 Share Posted October 5, 2012 (edited) Is this legal code? LI R0,>02E0 ; LWPI OP-CODE LI R1,>3000 ; OPERAND FOR LWPI INSTRUCTION X R0 I believe that is legal code. It should set the workspace pointer to >3000. It doesn't when I try in classic99. Any ideas? Your instruction LWPI >3000 uses more than one word, so the operand >3000 must follow th X instruction and not the R0 register! LI R0,>02E0 ; LWPI OP-CODE X R0 DATA >3000 From the manual... But didn't test it! Guillaume. Edited October 5, 2012 by moulinaie Quote Link to comment Share on other sites More sharing options...
Willsy Posted October 5, 2012 Author Share Posted October 5, 2012 Ah! Yes! I'm an ass! Quote Link to comment Share on other sites More sharing options...
moulinaie Posted October 5, 2012 Share Posted October 5, 2012 Ah! Yes! I'm an ass! Don't tell everybody.... Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted October 5, 2012 Share Posted October 5, 2012 Is this legal code? LI R0,>02E0 ; LWPI OP-CODE LI R1,>3000 ; OPERAND FOR LWPI INSTRUCTION X R0 I believe that is legal code. It should set the workspace pointer to >3000. It doesn't when I try in classic99. Any ideas? If you really want to execute it from the registers, you would need to use at least one more register to store a return and then BL to the address of R0 rather than X it. Of course, because the point of this is changing the WP, you'd probably need to first update the new R11 for the return---probably not the solution you were looking for. ...lee Quote Link to comment Share on other sites More sharing options...
Willsy Posted October 5, 2012 Author Share Posted October 5, 2012 I got it working now! Check out the Forth arcana thread Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.