Jump to content
IGNORED

Is this code valid?


Willsy

Recommended Posts

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 by moulinaie
Link to comment
Share on other sites

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. :P

 

...lee

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...