access bank error

Discuss about beta versions of mikroPascal compiler.
Post Reply
Author
Message
janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

access bank error

#1 Post by janni » 12 Sep 2007 15:10

The compiler does not care about the access memory designator in asm block defined by the user, which is OK as long as the compiler sets it right in the resulting code. Unfortunately, this does not seem to be the case.

Firstly, ... forget about firstly - I've mistaken the variable address :oops: , so my point wasn't valid. Compiler sets the access memory designator for GPRs properly, whatever the user's setting is.

The following also does not make sense, but stays as a reminder :wink: .
Secondly, instructions containing SFRs are not always having correct access memory designator. For example, instruction negf is almost always compiled with access memory designator set to default (i.e. 1). Like in this:

Code: Select all

	negf	WREG,F,0
results in final code

Code: Select all

$6DE8		NEGF	WREG, F
which means that this instruction will never perform it's task, unless BSR is previously set to SFRs bank.

Why can't the compiler take the contents of asm block code as it is - with user defined access memory designator (or default)? It's the simplest solution and moves responsibility for the final code to the user.
Last edited by janni on 13 Sep 2007 13:59, edited 1 time in total.

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: access bank error

#2 Post by zristic » 13 Sep 2007 07:50

Janni, forget about getting support for assembly.
Either take care yourself about asm instructions, or use Pascal so that compiler will take care of it.
You are asking too much.

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

#3 Post by janni » 13 Sep 2007 13:19

Yeah, I probably deserved that as this

Code: Select all

negf   WREG,F,0
does not make sense. Must have been one of my bad days :oops: . I'm spoiled by MPLAB which protests to such nonsense. Will keep it in mind.

Post Reply

Return to “mikroPascal Beta testing”