English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 14 August 2022, 08:47   #1
koobo
Registered User
 
koobo's Avatar
 
Join Date: Sep 2019
Location: Finland
Posts: 363
ADD vs. ADDI, vasm vs. Asmone

While investigating the differences in resulting binaries by vasm and AsmOne I noticed that with input

Code:
   ADD.W #10,D0
AsmOne gives:
Code:
   0640000A   ADDI.W #10,D0
vasm gives:
Code:
   D07C000A   ADD.W #10,D0
This, for me, is a bit surprising, I didn't think that there could be such overlaps in the instructions. The instruction format documentation describes these in detail. The documentation for ADD mentions "ADDI and ADDQ are used when the source is immediate data. Most assemblers automatically make this distinction."
koobo is offline  
Old 14 August 2022, 10:03   #2
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 14,354
http://eab.abime.net/showthread.php?t=94176
alexh is offline  
Old 14 August 2022, 10:38   #3
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,233
Well, here two instructions fall together. ADDI is "add immediate to some complex addressing mode, including data registers", whereas ADD is "add some complex addressing mode to data register" or "add data register to some complex addressing mode". In some cases, the two opcodes just fall together, as you see.
Thomas Richter 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
AsmOne and IncBin Nightshft Coders. Asm / Hardware 2 26 November 2019 16:36
ADDI vs ADD # hth313 Coders. Asm / Hardware 17 12 September 2018 08:56
AsmOne and/or AsmTwo guy lateur Coders. Asm / Hardware 87 17 April 2018 11:06
AsmOne and tabs oRBIT Coders. Asm / Hardware 2 04 September 2017 21:34
AsmOne even directive...? pmc Coders. General 30 04 December 2009 09:33

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 21:03.

Top

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