PDA

View Full Version : Mismatched Block nesting error



boroko
- 27th June 2011, 10:27
Hi all,

I have been trying to clean up one of my programs' communications and ran into an compile error "ERROR: ENDIF: Mismatched block nesting". The interesting thing is that MCS dosen't hint at where it might be so I can get an idea of how to attack it.

The project is crammed into a 18F1320 and it is already using MIBAM.pbp, EE_Vars.PBP, DT_INTS.bas, ReEnterPBP-18.bas and ReEnterPBP-18LP.bas (low priority because of the MIBAM).

I have managed to get the program memory sorted out by reusing some of the variables and playing with the BANK0 vs.BANKA situation explained in http://www.picbasic.co.uk/forum/showthread.php?t=12284&page=1 (thank you Darrel, for the includes and all of the insightful explaining the you offer us).

A search reveals only hints on the Microchip site and only in the C sections.

This was a working program until I had thin it down to add the LP INTS to better handle the comm, so it can't be too far off.

I looked at all of the IF-THEN loops and don't see any missing parts, and all of the ASM's end in ENDASM's. There are a number of single @ instructions, but they should be stand-alone.

Any ideas on how to look for this Mismatched Block error?

PBP 2.50c, MPASM 8.15, MCS 3.0.0.5

Bo

Dave
- 27th June 2011, 11:30
Hey Boroko, Why not use FineLine viewer? It's free.. It will show you what IF's and ENDIF's are connected and tell you where the problem is.

Dave Purola,
N8NTA

boroko
- 27th June 2011, 11:46
Well, I see that I have been chasing my tail yet again... I have explored this subject in the past. http://www.picbasic.co.uk/forum/showthread.php?t=7393&page=3
I still don't understand the exact issue, but I suspect that it comes back to the issue of conflict with MIBAM and the INTS.

Oh well..
Bo

boroko
- 27th June 2011, 11:48
Thanks Dave,
I had used that in the past, but lost it and couldn't remember what it was called. I appreciate the refresh and will get it for when I need it again.

Bo

Dave
- 27th June 2011, 12:36
Boroko, the link is here...http://www.norm-online.net/FineLineIDE.php

Dave Purola,
N8NTA

boroko
- 27th June 2011, 16:39
Thanks again Dave,
I appreciate the link. Trying to track is down again was a bit of a challenge. It seems that the recent development is aimed at a plugin for Proton. Finding the most recent stand-alone was not going well.

Bo
KC8LBA

mackrackit
- 28th June 2011, 12:46
http://www.picbasic.co.uk/forum/content.php?r=60-Useful-Links

boroko
- 29th June 2011, 02:15
Thanks for the links and the heads-up on favorites.
It turns out the the problems that I was having trying to load FineLineIDE was that you need to rename it to .zip and then decompress it. Onec you have done that, you rename the .xyz to an .exe and install it. I initially understood the instructions wrongly and renamed the downloaded file to .exe and all it did was fire a DOS window and clear. All better now. Back to the problems at hand.

Bo