English Amiga Board


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

 
 
Thread Tools
Old 27 July 2020, 00:13   #1
Quagliarulo
Registered User
 
Quagliarulo's Avatar
 
Join Date: Mar 2010
Location: Napoli, Italia
Posts: 76
Vasm division by 0

Hello. Why is this? What should I do?

Code:
	SECTION	SOMETHING,CODE
	
	move.l	#(franco-ciccio),d0		; moveq #6,d0
	move.l	#(12/6),d0			; moveq #2,d0
	move.l	#(12/(franco-ciccio)),d0	; vasm says division by 0
	rts
ciccio
	dc.b 0,1,2,3,4,5
franco
	end
Quagliarulo is offline  
Old 27 July 2020, 01:43   #2
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
I think it is resolved in the second pass of the assembler.

So I think you should

something EQU franco-ciccio

and then move.l #(12/something),d0

Other ppl will probably know better :-)
Hedeon is offline  
Old 27 July 2020, 01:48   #3
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Quagliarulo View Post
Why is this?
The symbols franco and ciccio are unknown during the first pass, so they evaluate to zero.
I would call it a bug. Never noticed that before. Thanks for reporting! Division by zero errors shouldn't be allowed before the final pass. Will fix that.

Quote:
What should I do?
Wait for the fix. Or define a third symbol
xyz equ 12/(franco-ciccio)
below franco and use that instead.

EDIT: Hedeon was faster.
phx is offline  
Old 27 July 2020, 11:16   #4
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Fixed. Errors during expression evalulation should not show up before the final pass!

Please try tomorrow's daily source snapshot or wait for the next release.
phx is offline  
Old 27 July 2020, 11:30   #5
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
Quote:
Originally Posted by phx View Post
Fixed. Errors during expression evaluation should not show up before the final pass!

Please try tomorrow's daily source snapshot or wait for the next release.
Nice. I thought this was working as intended and taught myself to EQU stuff at the start.

Last edited by Hedeon; 27 July 2020 at 11:39.
Hedeon 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
CMake and vasm sparhawk Coders. General 9 30 November 2019 21:04
vasm and comments xxxxx Coders. Asm / Hardware 10 03 February 2015 12:59
Premier Division lworley77 request.Old Rare Games 2 10 December 2007 00:29
Data Division docs disks Enforcer request.Other 2 29 May 2006 16:39
[REQ] Division One '92 (attn: SPS team) andreas HOL contributions 2 02 November 2005 02:20

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

Top

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