English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 01 November 2019, 14:28   #1
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,139
EQU *-2 in Resource

Hi,
I did a disassembly using resource and after the code below I’ve a label with EQU *-2
If it was a data section I’ll would have jusr changed it’s size but it is code so can I get read of it or is it normal code? I guess it’s not because I’ve bad reference in Resource.

JMP lbB00A440(PC, D0.W)
LbB00A440 EQU *-2

Thanks
kamelito is offline  
Old 01 November 2019, 14:36   #2
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,530
Quote:
Originally Posted by kamelito View Post
Hi,
I did a disassembly using resource and after the code below I’ve a label with EQU *-2
If it was a data section I’ll would have jusr changed it’s size but it is code so can I get read of it or is it normal code? I guess it’s not because I’ve bad reference in Resource.

JMP lbB00A440(PC, D0.W)
LbB00A440 EQU *-2

Thanks
Seems a jmp table.

Do this:
label:  JMP label+2(PC,D0.W)

Do not move the table that comes next it
ross is offline  
Old 01 November 2019, 14:52   #3
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,139
There still code below no datas, in the code Resource added « fix code reference expected »
Ps I’ve seen a pic of you from Neuss posted online

Another exemple a bit more detailed

lbW008B6C
dc.w lbC008B24-lbB008B82
dc.w lbC008B38-lbB008B82
dc.w lbC008B48-lbB008B82
dc.w lbC008B5C-lbB008B82

lbC008B74
CMP.W #4,D0
BCC.S lbC008B84
ADD.W D0,D0
MOVE.W lbW008B6C(PC,D0.W),D0
JMP lbB008B82(PC,D0.W)
lbB008B82 EQU *-2

;fiX Code reference expected
lbC008B84
BTST #0,_MasterFlags-DT(A4)
BNE.S lbC008B92
TST.W D2
BNE lbC008C8A
lbC008B92
kamelito is offline  
Old 01 November 2019, 15:14   #4
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,530
Ah, ok, it's a dereferenced jmp table.

if really EQU annoys you (it also does it to me), do this:

Code:
lbW008B6C
   dc.w    lbC008B24-lbB008B82-2
   dc.w    lbC008B38-lbB008B82-2
   dc.w    lbC008B48-lbB008B82-2
   dc.w    lbC008B5C-lbB008B82-2

lbC008B74
   CMP.W    #4,D0
   BCC.S    lbC008B84
   ADD.W    D0,D0
   MOVE.W    lbW008B6C(PC,D0.W),D0
lbB008B82
   JMP    lbB008B82(PC,D0.W)

lbC008B84
   BTST    #0,_MasterFlags-DT(A4)
   BNE.S    lbC008B92
   TST.W    D2
   BNE    lbC008C8A
lbC008B92
Cheers

EDIT.
Quote:
Originally Posted by kamelito View Post
Ps I’ve seen a pic of you from Neuss posted online
I was not in Neuss (unfortunately) , so he was my double

Last edited by ross; 01 November 2019 at 15:22.
ross is offline  
Old 01 November 2019, 15:32   #5
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,139
Thanks I think I mixed my mind, it was Dan Scott sorry.
kamelito is offline  
Old 01 November 2019, 15:40   #6
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,530
Quote:
Originally Posted by kamelito View Post
Thanks I think I mixed my mind, it was Dan Scott sorry.
ross is offline  
Old 01 November 2019, 16:17   #7
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,139
Can I do the -2 directly in Resource?
kamelito is offline  
Old 01 November 2019, 17:44   #8
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,530
Quote:
Originally Posted by kamelito View Post
Can I do the -2 directly in Resource?
L(LABELS)/Edit single/symbol should work.
ross is offline  
Old 01 November 2019, 18:27   #9
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,139
Isn’t it the dc.w that should be changed?
I think it is symbol dest instead but then how to remove the EQU *-2
It is easier in the generated asm...

Last edited by kamelito; 01 November 2019 at 18:38.
kamelito is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
ReSource 4.16, 5.0, 5.10, 6.01, 6.06 mark_k request.Apps 32 28 September 2014 22:57
ReSource drago request.Apps 2 08 July 2008 00:30
ReSource 6.XX MrZammler request.Apps 7 30 October 2007 14:15
ReSource v6.06 A.I request.Apps 3 08 October 2005 21:25
Resource Amigaboy request.Apps 2 16 August 2001 05:15

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:05.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.15134 seconds with 15 queries