English Amiga Board


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

 
 
Thread Tools
Old 02 April 2021, 16:29   #1
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
Why does my code crash AsmOne & AsmPro

This is driving me nuts, doing some little testing here but it "crashes" both AsmOne and AsmPro in the same way during compilation.
** Unexpected end of file
** end of file
And usually a few moments later my entire WinUAE environment locks up so I need to "reboot" my virtual Amiga.

Anyone see anything obvious that can cause this crash? Do I need new glasses? Probably..

Would btw happily contribute to someone who wanted to continue to improve and bugfix AsmOne/AsmPro. Anyone up for the task?

Code:
PushToStack:	MACRO
		move.b	\1,([StackPtr])
		subq.b	#1,StackPtr+3
		ENDM

PullFromStack:	MACRO
		addq.b	#1,StackPtr+3
		move.b	([StackPtr]),\1
		ENDM

PushToStackW:	MACRO
		move.b	\1,([StackPtr])
		subq.b	#1,StackPtr+3
		lsr.w	#8,\1
		move.b	\1,([StackPtr])
		subq.b	#1,StackPtr+3
		ENDM

PullFromStackW:	MACRO
		addq.b	#1,StackPtr+3
		move.b	([StackPtr]),\1
		lsl.w	#8,\1
		addq.b	#1,StackPtr+3
		move.b	([StackPtr]),\1
	
		ENDM


start:		lea	mem,a0
.loop:		tst.w	a0
		beq.b	done
		addq.l	#1,a0
		bra.b	.loop

done:		move.l	#$100,d0
		move.l	a0,a1
		add.l	d0,a1
		move.l	a1,stackptr

		move.l	#$aabb,d1
		;PushToStackW d1

		;PullFromStackW d2		

		;move.l	#$a0,d1
		;PushToStack d1

		;move.l	#$b0,d1
		;PushToStack d1


		;PullFromStack d2
		;PullFromStack d3

		rts

StackPtr:	dc.l	0


mem:		blk.b	64*1024*2,0
oRBIT is offline  
Old 02 April 2021, 16:43   #2
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,957
For which CPU? I dont know if tst.w A0 exist (i never seen this in real), tst.l A0 for 68020+ exist. And you used addq.l #1,a0, for me logical is addq.l #2,a0.
Don_Adan is offline  
Old 02 April 2021, 16:43   #3
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
68020+
I suspect it's somehow related to the MACRO's...
oRBIT is offline  
Old 02 April 2021, 16:48   #4
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,957
Then remove all macros and check, if works later add one macro, next second macro etc
Don_Adan is offline  
Old 02 April 2021, 16:51   #5
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,957
Btw. i dont coded long time, but perhaps i will use something like this:
move.l #mem+$fffe,D0
clr.w D0
move.l D0,A0

Last edited by Don_Adan; 02 April 2021 at 17:02.
Don_Adan is offline  
Old 02 April 2021, 17:12   #6
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
It's caused by the move.b ([StackPtr]),\1 line in MACRO PullFromStackW.
You have discovered yet another ASM-One/Pro MACRO bug, there are MANY more!
StingRay is offline  
Old 02 April 2021, 19:29   #7
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
Thanks alot StingRay!
You're not tempted taking up those old sources and fixing them up?
oRBIT is offline  
Old 02 April 2021, 21:09   #8
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
The only feasible approach would be a complete recode, everything else is bound to fail. ASM-Pro's source is available but a giant unmaintainable mess of disassembled ASM-One code, ASM-One's source is only available for the very early version which doesn't help much.

Many people, including myself, tried to fix bugs in ASM-Pro but everyone gave up sooner or later for obvious reasons.

The answer to your question is no, I'm afraid.
StingRay is offline  
Old 02 April 2021, 21:11   #9
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
Would be awesome with an updated assembler (that works similar to Asm-One/Asm-Pro). I guess it would be a pretty huge task though..
oRBIT 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
Why does this code crash? kamelito Coders. General 8 23 December 2019 18:38
LUCAS & FRANCES Boards, PAL Code & PCB Masks Kai Hardware mods 173 29 October 2017 18:35
'Harald Haardtand' whdload crash code 103 hippox89 support.FS-UAE 24 04 July 2017 04:40
ANSI control-code (?) bug in "all" AsmOne versions under Kick 2.0+ Photon support.WinUAE 4 17 July 2011 19:29
Why nobody continue Asmone/AsmPro development ? kamelito Amiga scene 16 25 March 2007 15:08

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 13:50.

Top

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