Jump to content
Sign in to follow this  
Cyprian

Rmac - do the math

Recommended Posts

Posted (edited)

For the last few days I was struggling with my code, which sometimes worked and sometimes it didn't

Fortunately thanks to @dilinger Virtual Jaguar debugger I've just found an issue. It seems RMAC doesn't handle math correctly.

 

Copyright (C) 199x Landon Dyer, 2011-2020 Reboot
V2.0.23 Oct 24 2020 (Linux/OSX)

 

Variables Test1 / Test2 should have the same value:

	nop
LISTSIZE_FULL = 5 

Base = $F00000
Test1 = Base + ((LISTSIZE_FULL*8)*4*4)
Test2 = Base + (LISTSIZE_FULL*8)*4*4

		move.l	#Base,D0
		move.l	#Test1,D0
		move.l	#Test2,D0

	nop
	nop

But they don't:

 

Issue_Rmac.png.506af20edca2c82d5174c03a1e5a240a.png

 

 

 

Edited by Cyprian

Share this post


Link to post
Share on other sites

This is not a bug -- this behavior is documented:

image.thumb.png.03598eba99ba76dcf8d83fb3f84be382.png

 

Workaround: always use explicit parentheses.

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...