English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 28 February 2007, 17:44   #1
BippyM
Global Moderator
 
BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
assemble error

can someone tewll me why

Code:
lea    $10f80(a0),a0
fails to assemble with the error

Code:
The argument value is larger than the operand width
a0 holds location of expmemory and 10f80 is the offset from the start of the loader!
BippyM is offline  
Old 28 February 2007, 17:48   #2
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
That's because the offset is too big, lea xxx(ax),ax only works for values <32k, it's 16bit signed. So do add.l #$10f80,a0 to fix that error.

Edit: I don't know which assembler you are using but Asm1/Pro gives "Out of Range 16 Bit" error which is much more useful than the one your assembler gives I think.
StingRay is offline  
Old 28 February 2007, 17:52   #3
BippyM
Global Moderator
 
BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
thanks stingray

I have another problem that is relevant to my slave.. will post over there
BippyM is offline  
Old 28 February 2007, 17:59   #4
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Feel free to do so. Btw, if your assembler supports 020+ instructions, you can have offsets larger than 32k for the lea xxx(ax),ax instruction.
StingRay is offline  
Old 28 February 2007, 18:00   #5
BippyM
Global Moderator
 
BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
i'm using barfly
BippyM is offline  
Old 28 February 2007, 18:09   #6
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Then enable 020+ instructions and you can have lea ($10f80,a0),a0

Edit: just did a test, seems barfly automatically recognizes 020+ instructions if you use the new syntax. So just use the syntax I've been using above and you can assemble it.

Edit2: WRONG! Barfly doesn't complain but the disassembly shows that it just generated code which uses a negative offset. PHXass gives correct code but you have to enable 020+ mode. I'd say just use the add.l solution and all is fine. =)

Last edited by StingRay; 28 February 2007 at 18:17.
StingRay is offline  
Old 28 February 2007, 21:05   #7
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
Don't use specific 020 code as then your slave will ONLY work on 68020+! And there are still some people that use WHDLoad on A2000's etc.
Codetapper 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
WHDLoad error: error during 'resload_LoadKick' on monkey island & others jamespstevenson project.MAGE 14 20 February 2014 05:33
The Avengers Assemble on the Amiga CodyJarrett project.Amiga Lore 0 06 May 2012 17:30
ERROR: Metal Masters (Illegal Instruction / Address Error / Black Screen) killergorilla project.Killergorilla's WHD packs 7 25 March 2012 15:32
ERROR: Leisure Suit Larry Enhanced (Address Error) batwinky project.Killergorilla's WHD packs 23 30 January 2011 13:00
Forgot how to re-assemble a1200 lol Techx support.Hardware 6 24 April 2008 22:10

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 11:49.

Top

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