On 25 Oct 2003 at 21:12, Olin Lathrop olin_piclist-at- wrote: > > MPASM is the asm in MPLAB. > > Right. Nobody is disputing that. > > > what's the problem here? > > The fact that this code is written for an assembler other than MPASM. It > clearly wouldn't assemble with MPASM. what are you talking about? i said i'm using MPLAB. it's in the subject line *and* the first line of my post. MPASM comes with MPLAB and the code *does* assemble with MPASM. it links with MPLINK. i have no other assemblers. are you using some archaic version of MPASM? here's the code: ;***************************************** IFNDEF _DLYMACRO_INC #DEFINE _DLYMACRO_INC INCLUDE "p16f628a.inc" DLY_10ms macro ; Delay = 0.01 seconds ; Clock frequency = 4 MHz ; Actual delay = 0.01 seconds = 10000 cycles ; Error = 0 % FIXED_REGISTERS UDATA local d1, d2 d1 res 1 d2 res 1 CODE Delay_10ms ;9993 cycles movlw 0xCE BANKSEL d1 movwf d1 movlw 0x08 movwf d2 Delay_0 decfsz d1, f goto $+2 decfsz d2, f goto Delay_0 ;3 cycles goto $+1 nop ;4 cycles (including call) BANKSEL 0 return endm ENDIF ;********************************* it assembles with MPASM and it isn't any different than the psuedo code i put in my original post. > > > to write relocatable code, you use MPLINK. > > Yes, you have to use MPLINK, but the source code is still written and > assembled by MPASM. > > > absolute code is passe`. > > Ha, Ha. I guess we're finally getting somewhere when someone else is > lecturing me about the evils of absolute mode. that was arrogant. > > > even if you use strick MPASM you have to deal with banking issues. > > Right, but has nothing to do with the issue. The point is this guy "this guy" ... i *am* that guy. no one else is replying to you. > is > asking for help with banking and linker issues, but is using some > non-standard assembler. bs. are you saying that BANKSEL is non-standard? it's covered in the MPASM help file under Directives > I for one don't want to waste time with that > because I have no idea what this flakeware assembler might be doing. i told you what happened. i told you how (2 ways) i fixed it. let me reiterate the questions. 1) is BANKSEL 0 as opposed to BANKSEL varname_in_bank0 acceptable? 2) what code does the psuedo-mnemonic "BANKSEL var" generate? a) bcf STATUS, RP0 ?? -or- b) movf FSR, bank2var movwf INDF ??? i'll let the rest go for now. i was hoping to find a good way to control memory allocation when building multiple modules... without having to remember how the data for each module that i wrote in the past was allocated and then having to tweak the linker script. if i let the linker decide where to put the stuff, as i said, i have to mess with BANKSEL. how will i know what bank to select if i'm letting the linker decide where to put it? if i tell the linker what bank to to put it in with the linker script, it might as well be absolute code. if the linker is going to put stuff in other banks, i'd have to use BANKSEL varname for every variable i access. if you're from embedinc, maybe *you're* the one using non-standard tools. maybe you have so much code requiring a pre-assembler that you forgot what standard code looks like. brs, mike > I > may be willing to help, but only with tools I know (MPASM/MPLINK in this > case). I can't imagine anyone will help because he hasn't even said what > assembler he IS using, unless someone recognizes the syntax. low whistle... > > > ***************************************************************** > Embed Inc, embedded system specialists in Littleton Massachusetts > (978) 742-9014, http://www.embedinc.com > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.