Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop #36

Closed
GSoftwareDevelopment opened this issue May 8, 2021 · 3 comments
Closed

Infinite loop #36

GSoftwareDevelopment opened this issue May 8, 2021 · 3 comments

Comments

@GSoftwareDevelopment
Copy link
Contributor

From time to time I get a message during compilation:

start.a65 (126) WARNING: Infinite loop by label VADR
.
.
.
17107 lines of source assembled in 20 pass (infinite loop)

start.a65 warning code:

; ------------------------------------------------------------

START
	tsx
	stx MAIN.@halt+1

	.ifdef fmulinit
	fmulinit
	eif

VLEN	= VARDATASIZE-VARINITSIZE
VADR	= DATAORIGIN+VARINITSIZE <-- Here he points out the warning.

	ift VADR > $BFFF
	ert 'Invalid memory address range ',VADR
	eli (VLEN>0) && (VLEN<=256)
	ldx #256-VLEN
	lda #0
	sta:rne VADR+VLEN-256,x+
	eli VLEN>0
	@fill #VADR #VLEN #0
	eif

Trying to run a program compiled this way, ends up with the emulator "crashing" during program initialization.

Sometimes simply adding or removing code helps.
That being said, I would venture to suggest that this may be due to a paging error - a tight page boundary - or something similar.

A bit of an annoying bug, because it forces you to combine things.

@GSoftwareDevelopment
Copy link
Contributor Author

I'm using version 1.6.4, and the error is showing. I'm sending link to package with program, where during compilation error is showing (Sorry for a big app :P)
https://drive.google.com/file/d/1-sdKFljstbYx456_RghTg-FNjYMBYutw/view?usp=sharing

@GSoftwareDevelopment
Copy link
Contributor Author

Unfortunately, the "infinite loop" error also shows up in the new version.

I already thought it was gone, until here it suddenly showed up. And again, adding/including some (arbitrary, not required) instruction, causes that, the error disappears.

You can "cut yourself" and look for a bug that is not really in the code.

@tebe6502
Copy link
Owner

use the constant DATAORIGIN

-data:address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants