Searching \ for 'Mpasm ' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/language/index.htm?key=asm
Search entire site for: 'Mpasm'.

No exact or substring matches. trying for part
PICList Thread
'MPALC vs. MPASM ??'
1995\01\05@161154 by crocontroller discussion list

flavicon
face
Harrison Cooper wrote:

>When it ain't broke, don't fix it........
> ....
>when did the switch [from MPALC to MPASM] occur and what is the
>benifits/drawbacks of the MPASM compiler - or is the MPASM the Parralax
>software.
>
>I don't want to have to rewrite my code for a new assembler - and it
>ought to be downward compatible anyway.

Harrison:

Unfortunately, MPALC _was_ broke.

MPASM is NOT Parallax's assembler; theirs is called PASM and is a
much... umm... "leaner" product.

If you've followed generally-accepted rules for writing
assembly-language code (labels starting at the leftmost column, opcodes
starting anywhere else, comments preceded by a semicolon), your code
will be compatible with MPASM.

MPASM drawbacks:

       MPASM needs more free memory than MPALC, since it dynamically
       allocates heap space.  This isn't usually a problem (especially
       for relatively-small programs), and there's a protected-mode
       version of MPASM that uses extended memory, anyway.

MPASM benefits:

       Too numerous to list.  The main ones are:

       It's supported by Microchip.  MPALC support was dropped a year
       ago.

       It works with all existing and future PICs (including the 17Cxx
       series).

       It doesn't have MPALC's math bugs.

       It generates what's called a ".COD" file, which allows true
       source-level debugging with Microchip's PIC-Master emulator and
       MPSIM simulator.

       It adds a number of assembly directives, including a "#define"
       directive that forever solves the problem of addressing the
       correct bit of the wrong byte in bit-oriented instructions.  For
       example:

       With MPALC, you might write:

               DATAIN  EQU     1               ;"DATAIN" IS BIT 1 OF
                                               ;PORTA.
               ....
                       BTFSS   PORTA,DATAIN    ;CORRECT USE.
               ....
                       BTFSS   PORTB,DATAIN    ;INCORRECT USE... I
                                               ;FORGOT TO WHICH PORT
                                               ;"DATAIN" WAS ASSIGNED.

       With MPASM, you can do this:

               #DEFINE DATAIN  PORTA,1         ;"DATAIN" IS BIT 1 OF
                                               ;PORTA.
               ....
                       BTFSS   DATAIN          ;NO NEED TO REMEMBER
                                               ;WHICH PORT, AND NO
                                               ;CHANCE OF ERROR.

       Also, MPASM can create object-code files for use with the
       upcoming linker/librarian.  These object files will also be
       linkable with code generated by Byte Craft Limited's "MPC" C
       compiler.

Since MPASM is compatible with your existing source code (except for
some minor reserved-word conflicts [HIGH and LOW, for instance,
shouldn't be used as symbols in your source code]), it'd probably be a
good idea to move your development to MPASM as soon as possible.

-Andy


--
Andrew Warren - spam_OUTfastfwdTakeThisOuTspamix.netcom.com
Fast Forward Engineering, Vista, California

'MPASM question'
1995\01\12@080832 by crocontroller discussion list

flavicon
face
Is there a way to avoid the warnings that occur when
data in memory banks 1-3 is accessed?
Processor type is 16C57.
MPASM v.1.02

Example:

Definition:
       ORG 70H                 ; BANK3
RAMXX   RES  1

Code:
       BSF     FSR,BA1         ; BANK3
       BSF     FSR,BA2
Warning: Argument out of range: RAMDE (112).  Least significant bits used.
       CLRF    RAMXX


Thanks in advance.
Finn.


--
:) ============================================================
Finn L. Amundsen                Tlf: (+47) 73 90 36 17
Cap Computas AS                 Fax: (+47) 73 90 36 49
PO Box 3765, N-7002 TRONDHEIM, NORWAY
E-mail: .....famKILLspamspam@spam@trh.cap-computas.no

1995\01\14@180142 by crocontroller discussion list

flavicon
face
Finn Amundsen (famspamKILLspamcap-computas.no) wrote:

>Is there a way to avoid the warnings that occur when data in memory
>banks 1-3 is accessed?
>Processor type is 16C57.
>
>Example:
>
>Definition:
>        ORG 70H                 ; BANK3
>RAMXX   RES  1
>
>Code:
>        BSF     FSR,BA1         ; BANK3
>        BSF     FSR,BA2
>Warning: Argument out of range: RAMDE (112).  Least significant bits
used.
>        CLRF    RAMXX

Finn:

Sure... There are a number of ways.

First, in case you don't understand what exactly is causing the warning,
here's a quick explanation:  The 16C57's 12-bit instructions are only
wide enough to hold an opcode and a 5-bit register address.  They work
fine for the 16C54, which only has 32 registers, but they can't handle
the 7-bit addresses of the 16C57's registers.  That's why the high two
bits of those register-addresses are held in the FSR bits you call BA1
and BA2.

When you equate the symbol RAMDE to address 70 (hex), then try to do a
CLRF RAMDE, the assembler sees that the address won't fit in 5 bits, so
it ignores the high two bits, assembles the instruction using the low 5
bits, and generates the warning message.  It's only a warning; your code
will work just fine.

The easiest (and, from some points of view, the worst) way to keep the
warnings from appearing is to use the assembler directive "LIST W=1",
which will keep warning messages from appearing in your .LST file.

Another way is to equate your symbols, not at their actual addresses,
but at the 5-bit equivalent of those addresses.  This is difficult to do
if you use ORG and RES to reserve space for registers; it's easy if you
use EQU.  For example:

       RAMG0   EQU     0x08            ;FIRST GLOBALLY-ACCESSIBLE REG.
       RAMG1   EQU     RAMG0+1         ;NEXT ONE.
       RAMG2   EQU     RAMG1+1         ;NEXT...
       ....
       RAM00   EQU     0x10            ;FIRST REGISTER ON PAGE 0.
       RAM01   EQU     RAM00+1         ;ETC...
       ....
       RAM10   EQU     0x30 & 0x1F     ;FIRST REGISTER ON PAGE 1.
       RAM11   EQU     RAM10+1         ;ETC...
       ....
       RAM20   EQU     0x50 & 0x1F     ;FIRST REGISTER ON PAGE 2.
       RAM21   EQU     RAM20+1         ;ETC...
       ....
       RAM30   EQU     0x70 & 0x1F     ;FIRST REGISTER ON PAGE 3.
       RAM31   EQU     RAM30+1         ;ETC...

This will assemble beautifully, and will generate no warnings when you
use the registers, but the PIC-Master emulator (and probably MPSIM,
too) will be a little confused.  This confusion manifests itself as an
inability to specify watch-window variables by name; since the emulator
thinks that RAM30 is at address 0x10, it will display 0x10's contents
for RAM30, instead of 0x70's.  This is a pretty minor thing, easily
worked around.

You can also equate your symbols to their real addresses, then do the "&
0x1F" masking in the body of your source-code.  For example:

               ORG     0x70

       RAMDE   RES     1               ;FIRST REGISTER ON PAGE 3.
       ....
               CLRF    RAMDE & 0x1F

This will generate no warnings, and PIC-Master/MPSIM will have a
slightly-easier time with it.  With the current version of MPASM, it's
easy to write macros that redefine the PIC opcodes, so the assembler can
even be made to automatically insert the "& 0x1F" for you when
necessary.

Unfortunately, when MPASM version 2.0 is released, it will not allow
redefinition of opcodes, so you'll probably want to do the bit-masking
in the EQUs or just turn off the warning-message display.

Good luck...

-Andy


--
Andrew Warren - .....fastfwdKILLspamspam.....ix.netcom.com
Fast Forward Engineering, Vista, California


'MPASM problem'
1995\05\24@212314 by tnguyen
flavicon
face
    The bug is known and will be fixed in next release of MPASM (1.20).
    The beta release of this version should be on the MCHIPBBS in a couple
    of weeks or so.

    Thang


______________________________ Forward Header __________________________________
Subject: Re: MPASM problem
Author:  "Robinson, Peter John" <EraseMEPRobinsospam_OUTspamTakeThisOuTQITGSDV1.MS-MAIL.TELECOM.COM.AU> at
Internet_Exchange
Date:    5/25/95 9:40 AM


Mauricio

This is a bit of MPASM "functionality".  It doesn't like replacing
an opcode using a #define.  Arguments are ok but the opcode itself
fails.  You'll have to use a macro :-(  Microchip, if you're
listening, this would be a good one to have a look at.


{Quote hidden}

1233-171
>61111 Ljubljana                                     Fax:     +386 61
1233-488
>Slovenia                                            E-Mail:
mauriciospamspam_OUTarne.si
>E U R O P E


'MPASM bugs with #define'
1995\06\22@005001 by Greg Solberg
flavicon
face
Hi,

I use Microchip's MPASM v1.10.  Anyone else have problems with #define?
For instance, I compile the following code:

   #define     FOO(a)  (a)
   one equ     FOO(1)
   two equ     FOO(1) + 1
   three       equ     FOO(1) + FOO(1) + FOO(1)
   four        equ     2 + FOO(2)
               end

And I get the following in the list file:

                    0001  #define FOO(a)  (a)
 0001               0002 one     equ     FOO(1)
 0001               0003 two     equ     FOO(1) + 1
 0001               0004 three   equ     FOO(1) + FOO(1) + FOO(1)
 0004               0005 four    equ     2 + FOO(2)
                    0006         end

The values computed for labels "two" and "three" are wrong.  The basic problem
seems to be with using a #define macro at the beginning of an expression.

Does anyone else have this problem?  Does Microchip know about it?  Anyone
have some nice work-around?

Thanks for your help,
Greg Solberg
@spam@gregKILLspamspammigsol.com

'mpasm warnings...?'
1995\06\27@213835 by Andrew Warren

face
flavicon
face
Kenny Baby <KILLspamMCTKEAWKILLspamspamMH1.MCC.AC.UK> wrote:

>I would say it was the assembler giving me unnecessary warnings

Kenny:

You'd be right.  At least, that's the short answer.

The long answer is, well, LONG.  If you're REALLY interested, I'll tell
you all about it.  Otherwise, I'd rather spend my time doing something
else.

-Andy

--
Andrew Warren - RemoveMEfastfwdTakeThisOuTspamix.netcom.com
Fast Forward Engineering, Vista, California

1995\06\28@160446 by Andrew Warren

face
flavicon
face
Kenny Baby <spamBeGoneMCTKEAWspamBeGonespamMH1.MCC.AC.UK> wrote:

>go on tell me. if you have timeI've seen things you people would'nt believe,
>Attack ships on fire of the shores of Orion,
>I watched sea beams,glitter in the darkness at ten houser gate,
>All these moments will be lost,
>In time,
>like tears in the rain
>
>Remember now, watch out for the Fairies......!


Kenny:

Get rid of that ridiculous signature and we'll talk.

-Andy

--
Andrew Warren - TakeThisOuTfastfwdEraseMEspamspam_OUTix.netcom.com
Fast Forward Engineering, Vista, California

1995\06\28@161110 by Andrew Warren

face
flavicon
face
Nick (RemoveMECHP3HOWARNJspamTakeThisOuTNTU.AC.UK) wrote:

>One way round this problem is :-
>
>1) Declare the tris registers as per the data sheet eg  equ trisx 0x8x
>
>2) When you come to set trisx, AND bit 7 with a 0 thus:-
>
>        mowlw   b'00011101'     ;for example
>        movwf   trisx & b'01111111'
>
>So bit 7 is cleared as required by MPASM but MPSIM is also happy with
>the equate.

This is good advice, but there's a subtle improvement you can make:

If, instead of ANDing the register address with 0x7F, you XOR it with
0x80, your code will still assemble without warnings, MPSIM (and
PIC-Master) will still recognize the symbol, AND the assembler will
give you a warning whenever you accidentally treat a page-0 register as
though it were on page 1.

-Andy

--
Andrew Warren - fastfwdEraseMEspam.....ix.netcom.com
Fast Forward Engineering, Vista, California


'MPASM 1.2 Messages.'
1995\07\10@033652 by Andrew Warren
face
flavicon
face
Nino Benci <EraseMENino.BencispamSCI.MONASH.EDU.AU> asked:

>What does the following message mean. It is not explained in the
>usrguide.txt file.
>
>    Message: Using default destination of 1 (file)
>
>It does not occur consistentlyand the instructions that it preceeds
>are not always the same.

Nino:

The PIC instruction set allows the result of most file-oriented
instructions to be stored in either the file register itself or the
W-register.  One would normally use, for instance,

   INCF    REG,W

to store the result of the INCF in the W-register, and

   INCF    REG

to store the result back in register REG.

When you use the prior form of the instruction (since MPASM
automatically equates "W" to 0), you're actually saying

   INCF    REG,0

What many people apparently don't realize is that the latter form of
the instruction implies a trailing ",1":

   "INCF REG" is equivalent to "INCF REG,1".

Nobody in his right mind actually puts the ",1"s in his code; it's
time-consuming,  distracting, and it makes all instructions look sort
of like bit-oriented (BSF, BTFSS, etc.) instructions.

Someone in Microchip's Tech-Support Department, however, has decided
that it's a good idea to warn us that our code is doing exactly what we
want it to, so MPASM now generates the message whenever you properly
"forget" to explicitly specify the destination with a ",1".

I don't know anyone (including MPASM's author) who thinks this message
is a particularly good idea; as far as I can tell, its only purpose is
to allow stupid people to make their code as hard for us to read as it
is for them to write.

Sometime soon, MPASM will include a facility for selectively turning
off individual messages, warnings, and errors, so you'll be able to
keep the message from appearing in your .LST file.  Until then, you'll
just have to try to ignore it, I guess.

-Andy

--
Andrew Warren - RemoveMEfastfwdEraseMEspamEraseMEix.netcom.com
Fast Forward Engineering, Vista, California

'mpasm 1.2 errors..?'
1995\07\10@231427 by Andrew Warren

face
flavicon
face
Kenny Baby <RemoveMEMCTKEAWspam_OUTspamKILLspamMH1.MCC.AC.UK> wrote:

>I have the following
>
>0000                    0019            org                 0x00
>error :overwriting previous address contents (0000)
>error :overwriting previous address contents (0000)
>
>0000    2877            00121           goto go
>
>
>anybody know why two warnings and how to get rid of them
>.
>.
>didnt exist in the 1.02 version

Kenny:

Well, let's see... You didn't exactly give a whole lot of information
(not even which PIC you're using), but I'd bet that somewhere before
the one-line code fragment you posted, there's a line that looks
something like this:

   OPTION  EQU 081H

If so, replace all occurrences of the word "OPTION" (including the one
in the equate) with, say, "OPTREG".  If you're using a 16Cxx (not a
16C5x), the problem should go away.

If not, and if you're using a 16Cxx part (not a 16C5x), remember that
0x00 is the Reset Vector on those parts; you probably have your reset
vector and your main code both ORG'ed at 0x00.

-Andy

--
Andrew Warren - RemoveMEfastfwdTakeThisOuTspamspamix.netcom.com
Fast Forward Engineering, Vista, California


'pasm -> mpasm translator'
1995\08\13@121946 by Aaron Wohl
flavicon
face
I created a translator from Parallax assembly to microchip assembly.
It keeps all the comments.  The Parallax psuedo ops are translated into
their microchip equivilants.   Anyone interested in beta testing it?   I
can mail you uuencoded file.
Aaron Wohl / ham callsign N3LIW / 412-731-3691 / 412-268-5032

'MPASM Warnings'
1995\08\14@123518 by John T

picon face
The warnings are just that. When you access a register on page 1, MPASM issues a
warning. It doesn't mean there is anything wrong with your code.

It doesn't check though if you have properly set bit RP0.

John Magrane
FAE
Bell Industries
408 734-8570
EraseME72712.2347spamspamspamBeGonecompuserve.com

'Re[2]: pasm -> mpasm translator'
1995\08\15@142244 by Claus K|hnel

flavicon
face
>>I created a translator from Parallax assembly to microchip assembly.
>>Anyone interested in beta testing it?   I
>
>Yes, I'm very interested !
>
>Regards
>   Erik
>
--------------
Me Too!
Ciao,
Claus Kuehnel
RemoveMEkuehnelKILLspamspamdial.eunet.ch

'MPASM message'
1995\08\27@001451 by Walter Anderson

flavicon
face
I'm getting a Message[302] in the following code and I do not
understand what I have done wrong to cause it.  Any ideas?

0023                00054 START
0023 1683           00056                 bsf     STATUS, RP0
0024 0064           00057                 clrwdt
0025 30A0           00058                 movlw   B'10100000'
0026 008B           00059                 movwf   INTCON
0027 30D4           00060                 movlw   B'11010100'
Message[302]: Argument out of range.  Least significant bits used.
0028 0081           00061                 movwf   OPTION_REG
0029 1283           00062                 bcf     STATUS, RP0

1995\08\27@011206 by Andrew Warren

face
flavicon
face
Walter Anderson <khadfwSTOPspamspamspam_OUTONRAMP.NET> wrote:

>I'm getting a Message[302] in the following code and I do not
>understand what I have done wrong to cause it.  Any ideas?
>
>0023                00054 START
>0023 1683           00056                 bsf     STATUS, RP0
>0024 0064           00057                 clrwdt
>0025 30A0           00058                 movlw   B'10100000'
>0026 008B           00059                 movwf   INTCON
>0027 30D4           00060                 movlw   B'11010100'
>Message[302]: Argument out of range.  Least significant bits used.
>0028 0081           00061                 movwf   OPTION_REG
>0029 1283           00062                 bcf     STATUS, RP0

Walter:

You haven't done anything wrong; the PIC's opcodes are only wide enough
to hold 7-bit addresses, which is why the "RP0" bit need to be set
before accessing registers with addresses greater than 7F.

The message refers to the "movwf OPTION_REG" instruction.  OPTION_REG
is at address 81 (too large to fit in the instruction), so MPASM uses
the least-significant 7 bits of the address (01).  If you examine the
generated machine-code ("0081"), you'll see that "movwf 81" actually
assembled to "movwf 01".

Your code will work just fine.  If you want to avoid this message in
the future, change the instruction to "movwf OPTION_REG ^ 0x80", or
change the OPTION_REG equate to "OPTION_REG EQU 0x81 ^ 0x80".

Or you could just leave it alone... I would, since the next version of
MPASM will allow messages, warnings, and errors to be individually
suppressed.

-Andy

--
Andrew Warren - spamBeGonefastfwdSTOPspamspamEraseMEix.netcom.com
Fast Forward Engineering, Vista, California


'mpasm for windows'
1995\10\12@104510 by eyal
flavicon
face
Microchip has a program called mpasmwin.exe.
It is an mpasm assembler for 16 bit ms-windows.
The version I got is v01.20, and it support the most of the pic
microcontrolres.

There is a windows host programmer for the pic16c84 writen by
someone that work with hardware similar to to an589.


Eyal Oppenheimer
ASE R&D
Aladdin Knowledge Systems Ltd.
Tel:    +972-3-537-5795
Fax:    +972-3-537-5796
E-mail: KILLspameyalspamBeGonespamaladdin.co.il
WWW Home Page:  http://www.aks.com/

1995\10\12@122307 by John T

picon face
The latest version of MPASM is 1.21. If you download the .zip file from the
Microchip BBS, it will contain both the DOS and Windows versions.

John Magrane
FAE Bell Industries
408 734-8570
EraseME72712.2347spamEraseMEcompuserve.com

1995\10\12@185138 by William Chops Westfield

face picon face
   If you download the .zip file from the Microchip BBS, it will contain
   both the DOS and Windows versions.

Grumble, grumble.  Microchip has a (rather nice) web site.  How come
all the software and stuff only seems to be available from their BBS?

BillW

'new MPASM features - documentation'
1995\10\18@122228 by Siegfried Grob

flavicon
face
Hello everyone,

I have ftp'ed the MPASM version 1.21 from rasi.lr.ttu.ee (that is much faster
than ftp.ultranet.com) and it is working fine with my asm-files.
But in a readme-file there were some special variables mentioned like
__MAXRAM or __BADRAM. I have found similar variables in the different PIC
variable initialization files, but the included documentation (I think it is
named usrguide.txt) doesn't mention this new feature anywhere. It seems that
the document has not been updated yet.

Who can point me towards a description of these 'system variables', please, or
post a documentation?

BTW, I still prefer the DOS-version of MPASM. But it only uses the 80x25
character resolution and does not switch back to my preferred 100x40 screen
resolution which is based on the 800x600 graphics res. and provided by most
ET4000 graphic adapters.


Siggi


Siegfried Grob,                                   |
student of electrical engineering,                |
university of ulm, germany                        |
e-mail:  @spam@siegfried.grob@spam@spamspam_OUTstudent.uni-ulm.de        |
tel&fax: +49 731 25148                            |
--------------------------------------------------'

1995\10\18@232225 by PETE KLAMMER

flavicon
face
> I have ftp'ed the MPASM version 1.21 from rasi.lr.ttu.ee (that is much faster
> than ftp.ultranet.com) and it is working fine with my asm-files.
> But in a readme-file there were some special variables mentioned like
> __MAXRAM or __BADRAM. I have found similar variables in the different PIC
> variable initialization files, but the included documentation (I think it is
> named usrguide.txt) doesn't mention this new feature anywhere. It seems that
> the document has not been updated yet.
>
> Who can point me towards a description of these 'system variables', please, or
> post a documentation?

They were documented in README.1ST from ASM12100.ZIP when I downloaded it
from MCHIPBBS.  The USRGUIDE.TXT in there did not mention them yet.

> BTW, I still prefer the DOS-version of MPASM. But it only uses the 80x25
> character resolution and does not switch back to my preferred 100x40 screen
> resolution which is based on the 800x600 graphics res. and provided by most
> ET4000 graphic adapters.

Agreed!  I have a 132x25 mode which is perfect for viewing listings output
from the assembler, but MPASM insists on switching to 80x25, and does not
switch back.  I suspect this means it would not work if I redirected the
console (CTTY?) to a serial port, etc.  Microchip!  Please give an option
for no-mode-switching standard output from MPASM!

> Siggi

Peter F. Klammer, Racom Systems Inc.                   spamBeGonePKlammerspamKILLspamACM.Org
6080 Greenwood Plaza Boulevard                            (303)773-7411
Englewood, CO  80111                                  FAX:(303)771-4708

1995\10\19@053249 by Falstaff

picon face
>
> > I have ftp'ed the MPASM version 1.21 from rasi.lr.ttu.ee (that is much
faster
> > than ftp.ultranet.com) and it is working fine with my asm-files.
> > But in a readme-file there were some special variables mentioned like
> > __MAXRAM or __BADRAM. I have found similar variables in the different PIC
> > variable initialization files, but the included documentation (I think it is
> > named usrguide.txt) doesn't mention this new feature anywhere. It seems that
> > the document has not been updated yet.
> >
> > Who can point me towards a description of these 'system variables', please,
or
{Quote hidden}

Yes!!!

Those silly buggers at bytecraft must believe that everyone uses the
'menu-interface' of the assembler; I just want to run the assembler
directly from my editor (which doesn't like mode changes in its DOS
shell) or from make (in which case my screen is blanked and reset to
80x25).

This way of forcing one's own preferences down the throat of users
seems to come mainly from the example that turbo pascal set back in
1985.

Frank

"Mutual respect, even if we disagree."
------------------------------------------------------------------------
Frank A. Vorstenbosch        +31-(70)-355 5241        .....falstaffspam_OUTspamxs4all.nl

1995\10\19@124750 by rman

flavicon
face
In message <TakeThisOuT199510190934.KAA14933.....spamTakeThisOuTlistserv.rl.ac.uk>, TakeThisOuTfalstaffKILLspamspamspamxs4all.nl writes
:
>Those silly buggers at bytecraft must believe that everyone uses the
>'menu-interface' of the assembler; I just want to run the assembler
>directly from my editor (which doesn't like mode changes in its DOS
>shell) or from make (in which case my screen is blanked and reset to
>80x25).

I'm glad I'm not the only person who finds this _really_ annoying.  I
don't expect command line utilities (which is how _I_ use the assembler)
to mess around with the video settings.  It doesn't _need_ to do anything
fancy.  As a compromise, there should be a /NOVIDEO (or somesuch) option
so that those of us with build scripts and extended video modes can work
without this getting in the way.

It can't be that difficult to add an option for this.  Please!

Dave.

1995\10\19@124750 by rman

flavicon
face
In message <.....199510190934.KAA14933spamRemoveMElistserv.rl.ac.uk>, RemoveMEfalstaffspamspamBeGonexs4all.nl writes
:
>Those silly buggers at bytecraft must believe that everyone uses the
>'menu-interface' of the assembler; I just want to run the assembler
>directly from my editor (which doesn't like mode changes in its DOS
>shell) or from make (in which case my screen is blanked and reset to
>80x25).

I'm glad I'm not the only person who finds this _really_ annoying.  I
don't expect command line utilities (which is how _I_ use the assembler)
to mess around with the video settings.  It doesn't _need_ to do anything
fancy.  As a compromise, there should be a /NOVIDEO (or somesuch) option
so that those of us with build scripts and extended video modes can work
without this getting in the way.

It can't be that difficult to add an option for this.  Please!

Dave.

1995\10\19@193711 by Peter Jennings

picon face
> Those silly buggers at bytecraft must believe that everyone uses the
> 'menu-interface' of the assembler; I just want to run the assembler
> directly from my editor (which doesn't like mode changes in its DOS
> shell) or from make (in which case my screen is blanked and reset to
> 80x25).

I'm confused. I use MPASM 1.21 from the DOS command line because I
don't like the menu (e.g. C> MPASM mysrc ) and it doesn't affect my
80x50 display at all. What am I missing here? Works fine from the
editor DOS shell, too.

MPSIM on the other hand does change the display to 80x25. And just
to show how dumb it is, it does it when it exits, so it isn't even
necessary. It would be much nicer if it would use all 50 lines!

Peter
--                                                spamBeGonepeterj@spam@spamspam_OUTnetcom.com
        URL: http://mall.turnpike.net/~jc/

Stereograms - Shareware - Amateur Radio - WWW Camera Map - Delphi Mysteries

1995\10\20@112441 by John Payson

flavicon
face
> > Those silly buggers at bytecraft must believe that everyone uses the
> > 'menu-interface' of the assembler; I just want to run the assembler
> > directly from my editor (which doesn't like mode changes in its DOS
> > shell) or from make (in which case my screen is blanked and reset to
> > 80x25).
>
> I'm confused. I use MPASM 1.21 from the DOS command line because I
> don't like the menu (e.g. C> MPASM mysrc ) and it doesn't affect my
> 80x50 display at all. What am I missing here? Works fine from the
> editor DOS shell, too.
>
> MPSIM on the other hand does change the display to 80x25. And just
> to show how dumb it is, it does it when it exits, so it isn't even
> necessary. It would be much nicer if it would use all 50 lines!

I have a little 48-byte .COM file I wrote which may be of help.  When run
the first time, it disables all calls to INT 10h; when run a second time,
it re-enables them.  Rather than executing as a TSR, it (blindly) assumes
that the user vectors at 1F0-1F4 [inclusive] will be available for its
use; it uses 1F0-1F3 to store the old INT 10h vector and 1F4 to store a
0CFh instruction [IRET].  If anyone is interested, I could uuencode it and
put it up here (I know, no binaries here, but this one would be less than
four lines long...)

'MPASM and 80x25 mode'
1995\10\20@120654 by Peter Jennings

picon face
> Those silly buggers at bytecraft must believe that everyone uses the
> 'menu-interface' of the assembler; I just want to run the assembler
> directly from my editor (which doesn't like mode changes in its DOS
> shell) or from make (in which case my screen is blanked and reset to
> 80x25).

I'm confused. I use MPASM 1.21 from the DOS command line

   C> MPASM MYSTUFF            ( where, MYSTUFF.ASM is my source )

and it doesn't affect my 80x50 display at all. What am I missing
here? Works fine from the editor DOS shell. Doesn't bring up the
menu, just assembles and returns to the editor.

MPSIM on the other hand does change the display to 80x25. And just
to show how dumb it is, it changes the display mode when it exits,
proving it wasn't necessary. It would be much nicer if it would use
all 50 lines to display the code or registers.

Peter
--                                                TakeThisOuTpeterjspamspamnetcom.com
        URL: http://mall.turnpike.net/~jc/

Stereograms - Shareware - Amateur Radio - WWW Camera Map - Delphi Mysteries

--                                 peterjEraseMEspamnetcom.com

'new MPASM features - documentation'
1995\10\26@122306 by Martin McCormick

flavicon
face
       I truly agree for a couple of reasons.  One can send the output to
a file, if desired, to process by some other unrelated utility.
It is also possible to do other non-standard things with the output such
as run it to a speech synthesizer.  Those of us who are blind appreciate
software that can produce standard output because it is much easier to make
it work right for us than programs that only write to the screen buffer.
This feature should not be much trouble to implement because somebody had
to reinvent output to write directly to the screen so why not
make it possible to divert that output to standard output if desired.
a flag to switch between direct screen writes or BIOS should make everybody
happy.

       I do not yet have a programming setup for PIC's, but I have plaid
around with the Motorola 68HC11 whose free assembler totally uses standard
I/O and I have no trouble at all with it.

In message <RemoveMEm0t5ob8-0000nNCEraseMEspamspam_OUTdc.cis.okstate.edu>, PETE KLAMMER writes:
>I have a 132x25 mode which is perfect for viewing listings output
>from the assembler, but MPASM insists on switching to 80x25, and does not
>switch back.  I suspect this means it would not work if I redirected the
>console (CTTY?) to a serial port, etc.  Microchip!  Please give an option
>for no-mode-switching standard output from MPASM!


Martin McCormick WB5AGZ  Stillwater, OK 36.7N97.4W
OSU Center for Computing and Information Services Data Communications Group


'MPASM question'
1995\11\18@180445 by mlk
picon face
Hello all,

       I know this question will bring a hailstorm of advice and
comments about which assembler(s) are best.  I am going to ask it
anyway.  I have been using the Parallax assembler (PASM) to generate
16C57 code.  In several instances my code has grown large enough to
utilize most of the program memory as well as the RAM in the PIC.  I have
found that it gets very confusing trying to manage all the bank switching
and all required for the 16C57.

       Does the Microchip assembler (MPASM) offer any features which
simplify this dilemma?  ie, can it be set up to automate the bank
switching from within the assembler?

Thanks for your comments,

Martin Kirk
Arizona State University
@spam@mlkRemoveMEspamEraseMEasu.edu
(602) 582-5718

1995\11\18@233813 by Andrew Warren

flavicon
face
Martin Kirk (EraseMEmlkspam@spam@ASU.EDU) wrote:

> I have been using the Parallax assembler (PASM) to generate 16C57
> code. ....  I have found that it gets very confusing trying to
> manage all the bank switching and all required for the 16C57.
>
> Does the Microchip assembler (MPASM) offer any features which
> simplify this dilemma?  ie, can it be set up to automate the bank
> switching from within the assembler?

Martin:

MPASM doesn't automate the process, but its macro capability (which
Parallax's PASM lacks) does make the process a WHOLE lot easier.

-Andy
Andrew Warren - @spam@fastfwdspam_OUTspam.....ix.netcom.com
Fast Forward Engineering, Vista, California


'Test and an MPASM question'
1995\12\06@105343 by Martin J. Maney
flavicon
face
The test is to see if the reflector will bounce this back as a duplicate,
as it did my recent attempts to reply to the fellow who's trying to drive
power MOSFETs from a PIC.  (BTW, I think you can use a simple open
collector driver with relatively large pullup resistors: since you're
always turning the device on at the supply's zero-corssing the turn-on
delay is unimportant.)

And so to the MPASM question.  I'm using the supplied p16cxx.inc header
and don't care to get the "operand too large" warning every time I
address a port in the upper bank of RAM.  Is there some magic I can
invoke to shut this up?  I really don't want to write "ADCON1 & 0xff" all
over the place, but that would be marginally better than writing the
address as a literal.

What's everyone else doing about this - perhaps one of the other
assemblers available is better?

Thanks.


'Thank's about MPASM help!'
1996\03\12@152846 by Dwayne Reid
flavicon
face
>I just looked at the .inc files from Microchip and the definitions are in
>them.  Are you including a .inc file to define registers etc?  If so, the
>above equates are probably in them.
>
>Norm

No, I don't use any .inc files as of yet.  I'll have to start, my source is
getting too hard to handle but not as of yet.  Have a look at some of the
updates to MPASM - at some point they talk about not needing to define W and
F to 1 & 0.  As I said, I've never had to so far.

Dwayne

'MPASM Warning[207], "Found label after column 1"'
1996\03\18@090541 by Martin Mueller

flavicon
face
When I do calculations with variables in nested conditions I get a
warning. Does anybody know why?

The source

       (...)

       local a = 1
       while a < 5
         nop
         a += 3        <--- Warning line
       endw

       (...)

produce the warning

       Warning[207] ... : Found label after column 1. (a)

The final code has two nops, as one would expect.

Thanks Martin

1996\03\18@103804 by Juan Jose Abba

flavicon
face
Is the line "local a=1"stating at colum 1????
If I recall correctly, that should be the problem
regards
juan
{Quote hidden}

1996\03\18@123655 by Martin Mueller

flavicon
face
On Mon, 18 Mar 1996 12:10:14 -0300, you wrote:

>Is the line "local a=1"stating at colum 1????
No.

In addition to my original posting:
I get the warning not only in a condition block, as I thought first.
Seems like every assignment to the variable produce such a warning.

Martin

1996\03\18@134456 by Andrew Warren

flavicon
face
Martin Mueller <spamBeGonePICLISTEraseMEspamMITVMA.MIT.EDU> wrote:

> When I do calculations with variables in nested conditions I get a
> warning. Does anybody know why?
>
> The source
>
>         (...)
>
>         local a = 1
>         while a < 5
>           nop
>           a += 3        <--- Warning line
>         endw
>
>         (...)
>
> produce the warning
>
>         Warning[207] ... : Found label after column 1. (a)

Martn:

This is nothing to worry about... MPASM is simply telling you that it
found a text string ("a") which appears to be a label (since it's
neither a PIC instruction nor an MPASM directive), and that the label
isn't left-justified.

This warning isn't too useful in your case, but imagine what would
happen if you misspelled NOP as NPO somewhere in your code:  The
assembler would see that NPO is neither an instruction nor a
directive, so it'd assume it was just a label... No code would be
generated.  Without the "Found label after column 1" warning, you
probably wouldn't even notice that you had screwed up.

If you want to make the warning message go away, you can do one of
two things:

   Put an "ERRORLEVEL -207" directive just before the macro, with a
   corresponding "ERRORLEVEL +207" directive after it, or

   Move the "a += 3" line to the leftmost column.

-Andy

Andrew Warren - fastfwdspamBeGonespamix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499

1996\03\18@190021 by Kim Cooper

flavicon
face
    Martin,

    In the line you have referenced, "a" is a label, and labels should be
    in column 1.  Just move the line to start in column 1.  Yes, this can
    make the code look a bit funny, but it will catch things like
    misspelled opcodes.  That's what you get when you use free-format
    constructs in a fixed-format assembler!

    Kim


______________________________ Reply Separator _________________________________
Subject: MPASM Warning[207], "Found label after column 1"
Author:  Martin Mueller <RemoveMEmmueller@spam@spamspamBeGoneBRE.WINNET.DE> at Internet_Exchange
Date:    3/18/96 2:03 PM


When I do calculations with variables in nested conditions I get a
warning. Does anybody know why?

The source

       (...)

       local a = 1
       while a < 5
         nop
         a += 3        <--- Warning line
       endw

       (...)

produce the warning

       Warning[207] ... : Found label after column 1. (a)

The final code has two nops, as one would expect.

Thanks Martin

1996\03\18@224730 by Martin Mueller

flavicon
face
>This is nothing to worry about... MPASM is simply telling you that it
>found a text string ("a") which appears to be a label (since it's
>neither a PIC instruction nor an MPASM directive), and that the label
>isn't left-justified.
Sounds logic.

>imagine [...] you misspelled NOP as NPO somewhere in your code:
that's why I don't like to ignore or disable Warnings *global* ;-)

Martin


'What is MPASM error code 302'
1996\04\09@202628 by Wilf Melling
flavicon
picon face
I have made a start on my very first PIC project, it is to be a home
alarm system (hopefully). So here my very first plea for help, I keep
getting the following message. I have read the manuals but the answer
does not jump out at me.

Message[302] C:\MPASM\HALARM.ASM 40 : Argument out of range.  Least
significant bits used.

Code sample with line numbers:-
39        Movlw   PORT_B_OUT      ;Define PORTB
40        Movwf   TRISB           ;as output

PORT_B_OUT   EQUates to b11111111

If anyone as any tips or know of any similar projects that have code
available to look at I would be VERY grateful.

TIA


--
Wilf Melling
Tel. +44 802 633888

1996\04\09@205810 by Dave Ritchie

flavicon
face
> Message[302] C:\MPASM\HALARM.ASM 40 : Argument out of range.  Least
> significant bits used.
>
> Code sample with line numbers:-
> 39        Movlw   PORT_B_OUT      ;Define PORTB
> 40        Movwf   TRISB           ;as output
>
> PORT_B_OUT   EQUates to b11111111
>
> If anyone as any tips or know of any similar projects that have code
> available to look at I would be VERY grateful.
>
> TIA
>
>
> --
> Wilf Melling
> Tel. +44 802 633888
>

I would start by changing this constant to decimal and retrying the
assembly - the EQU function of the assembler may be getting confused
here.....

-- Dave Ritchie
former assember maintainer for HP....
.....der@spam@spamEraseMEatl.hp.com

1996\04\09@210020 by Andrew Warren

face
flavicon
face
Wilf Melling <.....PICLISTRemoveMEspamMITVMA.MIT.EDU> wrote:

> I have made a start on my very first PIC project, it is to be a home
> alarm system (hopefully). So here my very first plea for help, I
> keep getting the following message. I have read the manuals but the
> answer does not jump out at me.
>
> Message[302] C:\MPASM\HALARM.ASM 40 : Argument out of range.  Least
> significant bits used.
>
> Code sample with line numbers:-
> 39        Movlw   PORT_B_OUT      ;Define PORTB
> 40        Movwf   TRISB           ;as output
>
> PORT_B_OUT   EQUates to b11111111

Wilf:

This has nothing to do with your problem, but if you want all the
PORTB pins to be outputs, PORT_B_OUT must equate to 00000000.

Ok...

The MPASM message refers not to PORT_B_OUT but to TRISB.

If you look at the instruction set for your PIC, you'll see that
register-oriented instructions only have room for 7-bit register
addresses, so they can only address 128 registers.  To accomodate
more than 128 registers, PICs employ a banking scheme that uses a few
bits of the STATUS register to select from multiple 128-register
banks.

If you try to directly access a register in any bank other than Bank
0, MPASM won't be able to fit the register's 8-bit address into the
instruction.  Instead, it'll just use the low 7 bits of the
register's address and generate the message you're seeing.

TRISB is located at address 086H, which puts it in Bank 1.  To access
it, you need to select bank 1 (by setting the RP0 bit in the STATUS
register), then write to register 006H.  Before accessing registers on
Bank 0, you'll need to switch back to that page by clearing the
RP0 bit.  Your code should look like this:

   BSF     STATUS,RP0

       MOVLW   PORT_B_OUT
   MOVWF   080H ^ TRISB

   BCF     STATUS,RP0

The "080H ^ TRISB" exclusive-ORs the TRISB address with 080H, thereby
clearing the high bit of the address... It's equivalent to "07FH &
TRISB", "TRISB - 128", and "006H".

-Andy

Andrew Warren - .....fastfwdSTOPspamspam@spam@ix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499

1996\04\09@234212 by Byron A Jeff

face picon face
{Quote hidden}

That's a great explaination Andy. Now can I ask a dumb question?
The 16C84 Datasheet (and I assume the others too) state that the FSR
will utilize all 8 bits of the file address on indirection. So would
the following work?

  movlw     TRISB
  movwf     FSR
  movlw     .0     ; Note that 0 bits are required for output
  movwf     INDF

It's the same number of instructions but I find it slightly more straight-
forward personally.

BTW I just re-read the databook and in fact the IRP bit in the status
register is prepended to the FSR giving a nine bit address. So in fact
4 128 register pages are accessible using indirection. Cool.

BAJ

1996\04\10@001802 by Andrew Warren

face
flavicon
face
Byron A Jeff <RemoveMEPICLISTspamspamBeGoneMITVMA.MIT.EDU> wrote:

> That's a great explaination Andy. Now can I ask a dumb question? The
> 16C84 Datasheet (and I assume the others too) state that the FSR
> will utilize all 8 bits of the file address on indirection. So would
> the following work?
>
>    movlw     TRISB
>    movwf     FSR
>    movlw     .0     ; Note that 0 bits are required for output
>    movwf     INDF
>
> It's the same number of instructions but I find it slightly more
> straight- forward personally.

   Byron:

   Yes, that will work perfectly.  Keep in mind that, although it's
   no longer than the bank-switching code FOR ACCESSING ONE
   REGISTER, it's much less efficient for cases that require
   multiple register accesses.

> BTW I just re-read the databook and in fact the IRP bit in the
> status register is prepended to the FSR giving a nine bit address.
> So in fact 4 128 register pages are accessible using indirection.

   Well, yeah... If any of the 16C6x, 7x, or 8x parts had more than
   2 pages, it'd be pretty useful.

   -Andy

Andrew Warren - spamBeGonefastfwdKILLspamspam@spam@ix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499

1996\04\10@132120 by John Payson

flavicon
face
> >    movlw     TRISB
> >    movwf     FSR
> >    movlw     .0     ; Note that 0 bits are required for output
> >    movwf     INDF
> >
> > It's the same number of instructions but I find it slightly more
> > straight- forward personally.
>
>     Byron:
>
>     Yes, that will work perfectly.  Keep in mind that, although it's
>     no longer than the bank-switching code FOR ACCESSING ONE
>     REGISTER, it's much less efficient for cases that require
>     multiple register accesses.

While in most cases it makes more sense to use direct addressing with RP0
set/unset as appropriate, indirect addressing can be useful when rapidly
accessing registers in both banks.  For example, if you need rapidly and
repeatedly set TRISB and PORTB, it may make sense to point FSR to TRISB, so
that it may be accessed without any intermediate accesses to RP0.  This
technique can pay off especially well when trying to rapidly read the EEPROM
on a 16C84 [point FSR to EECTRL1].


'MPASM Errors'
1996\05\21@123011 by Mark Peterson
flavicon
face
I have a couple of errors in MPASM that are troubling. I commmented the
offending lines out to assemble but of course that's a nowhere solution.

In the heading area I used  _CONFIG FFF9. I tried it with 0xFFF9, h'FFF9',
etc. but still get error. FFF9 for a 16C74 is WDT=off, clock=xtal. I realize
that in MPSIM the SC instruction lets me change the clock cycle time and
there is a way to disable the WDT. But what does that have to do with MPASM?

As per datasheet for 16Cxx's when first enter interrupt routine must
SAVE_STATUS and SAVE_Wreg. A temp copy of Wreg must exist on page0 and page1
at the same relative location. I tried this as

W_tem   EQU     0x20            ;page0 location of W_tem
W_tem   EQU     0xA0            ;page1 location of W_tem.

The idea is that by restoring the STATUS reg first the correct bank can be
pointed to for retrieval of the current copy of the accumulator.

MPASM didn't like the second equate. So what am I doing wronnnnnng!

Thanks,

mapspam_OUTspam@spam@tidepool.com

1996\05\21@132022 by fastfwd

face
flavicon
face
Mark Peterson <spamBeGonePICLIST@spam@spamMITVMA.MIT.EDU> wrote:

> I have a couple of errors in MPASM that are troubling. I commmented
> the offending lines out to assemble but of course that's a nowhere
> solution.
>
> In the heading area I used  _CONFIG FFF9. I tried it with 0xFFF9,
> h'FFF9', etc. but still get error.

   Try it with TWO underscores instead of one.

   Also, make sure that there's some white space to the left of the
   directive; "__CONFIG" should NOT begin in column one.

{Quote hidden}

   You're attempting to redefine a symbol.  This is illegal; each
   symbol may be EQU'ed only once.  Rename the second symbol
   "W1_tem" or something.  Your interrupt routine won't change;
   it should still refer only to "W_tem".

   -Andy

Andrew Warren - RemoveMEfastfwdEraseMEspamKILLspamix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499


'Going from Intel Hex format file back to MPASM ass'
1996\06\05@082229 by Jim Main
flavicon
face
Owing to a hard disk corruption, I've lost the latest version of my s/ware.

Unfortunately, I didn't back up that version (which worked) and can't
remember the changes I made to the software to get it to work!

What I do have is a blown 16C74, and the intel hex code off it - how do I
get back to a partial assembly listing???

Jim

1996\06\05@084202 by rdmiller

picon face
On Wed, 5 Jun 1996, Jim Main wrote:
> Owing to a hard disk corruption, I've lost the latest version of my s/ware.
>
> Unfortunately, I didn't back up that version (which worked) and can't
> remember the changes I made to the software to get it to work!
>
> What I do have is a blown 16C74, and the intel hex code off it - how do I
> get back to a partial assembly listing???

Under the new MPLAB you can "File-->Import-->Load to Memory" the HEX file
and it will disassemble it for you into the "Program Memory" window which
you can view via "Window-->Program Memory".

Rick Miller

'MPLAB/MPASM Warning'
1996\06\05@122934 by LEUNG LAUREN KWAN-KIT

flavicon
face
Does anyone know what's "warning 221" means?
It says something like: HEX FILE FORMAT CHOSEN etc....
It happens on the line LIST F=IHHX8M

- Lauren

1996\06\05@173139 by Paul Smith

flavicon
face
At 09:26 AM 5/06/96 -0700, LEUNG LAUREN KWAN-KIT wrote:
>Does anyone know what's "warning 221" means?
>It says something like: HEX FILE FORMAT CHOSEN etc....
>It happens on the line LIST F=IHHX8M
                               ^

Should it not read      LIST F=INHX8M  ?

1996\06\05@204725 by Holger Klemm

picon face
>
> At 09:26 AM 5/06/96 -0700, LEUNG LAUREN KWAN-KIT wrote:
> >Does anyone know what's "warning 221" means?
> >It says something like: HEX FILE FORMAT CHOSEN etc....
> >It happens on the line LIST F=IHHX8M
>                                 ^
>
> Should it not read      LIST F=INHX8M  ?
>

I think the problem is that you chose in your file a different format
(INHX8M) than you specified in the options in the MPLAB to build the hex
file.  So, you should either specify your desired format in the MPLAB
assembler options or within the source code.

Holger


'MPASM Question'
1996\09\23@122039 by Philip Lalone
flavicon
face
       Is it possible to write a MPASM macro that will print a string
using: PRINT "This is the string"? The only way i've been able to get
anything like this working is writing seperate code for each string I
want to print, any theory or code would be appriciated.  I need to do this
for serial data and a LCD, which I've written code for, so all the macro
would need to do is call the serial/lcd routine with each character or a
pointer to the string.
                                       Philip Lalone
                                       Alpha-X Development

1996\09\23@125803 by Scott Dattalo

face
flavicon
face
Philip Lalone wrote:
>
>         Is it possible to write a MPASM macro that will print a string
> using: PRINT "This is the string"? The only way i've been able to get
> anything like this working is writing seperate code for each string I
> want to print, any theory or code would be appriciated.  I need to do this
> for serial data and a LCD, which I've written code for, so all the macro
> would need to do is call the serial/lcd routine with each character or a
> pointer to the string.

Philip,

I'm not sure if this is exactly what you want... But several months ago
I posted some code that allowed strings to be looked up in a table. Matthew
Rowe copied it into his "Virtual Notebook" (see the write_string function):

http://hobbes.king.ac.uk:80/matt/pic/tables.html


You will still need to supply the LCD infra-structure software. That should
be no problem since you see a new version every month or so...


Matthew has some other PIC stuff at

http://hobbes.king.ac.uk:80/matt/pic/

(Hey Matthew, are you still out there?)


Scott

1996\09\23@150621 by Martin J. Maney

flavicon
face
On Mon, 23 Sep 1996, Philip Lalone wrote:

>         Is it possible to write a MPASM macro that will print a string
> using: PRINT "This is the string"? The only way i've been able to get
> anything like this working is writing seperate code for each string I
> want to print, any theory or code would be appriciated.  I need to do this
> for serial data and a LCD, which I've written code for, so all the macro
> would need to do is call the serial/lcd routine with each character or a
> pointer to the string.

I'm not certain about the syntax, but I believe there's a built-in that
will take a string (?) and assemble a series of retlw instructions, which
suggests that you could get the macro to generate something like this:

   goto str1_end
str1:
   retlw 'T'
   retlw 'h'
   retlw 'i'
   retlw 's'
   .
   .
   .
   retlw 0
str1_end:
   movlw high(str1)
   movwf StrPtrHi
   movlw low(str1)
   call RoutineToOutputStringToWherever

Where the output routine would handle stepping the pointer and fetching
bytes until the terminating NUL was reached.  Alternately, I believe you
could make the first byte returned be a count.  In either case, the
string's (far) address is in StrPtrHi:W on entry to the output routine.

Hmmm... I may have a use for this in a project that's been simmering on
the back burner for a while.  :-)

1996\09\23@163855 by Scott Dattalo

face
flavicon
face
Martin J. Maney wrote:
>
> I'm not certain about the syntax, but I believe there's a built-in that
> will take a string (?) and assemble a series of retlw instructions....

   dt "your string", 0

will be assembled by MPASM as though if it were

   RETLW  'y'
   RETLW  'o'
   RETLW  'u'
   RETLW  'r'
     .
     .
     .
   RETLW  0

Scott

PS. Did the previous message I posted on this thread get out there? I got
confirmation from the PICLIST server, yet I also got an error from what I
believe to be a Compuserve server saying that the "mail-box" was full. I
requested this month's archive and did see my post. However, Martin's
question/response suggests that my post never made it (or maybe you didn't/
couldn't check out the web link, Martin?). At any rate, I can a) repost
the original message, or b) Post a message that has the code (so you
don't have to surf).


'Using MPASM with Micormint's PicStic and EPIC prog'
1996\10\17@134734 by )
flavicon
face
Has anyone used MPASM with Micromint's PicStic system? I have been
unable to successfully download MPASM compiled code using the
Micromint/micro Engineering EPIC programmer. The code is tested and
known to work when programmed into a 16C84 using PicStart in an
otherwise identical circuit to what's on the PicStic module. When
downloaded with EPIC we get "Config Verify Error" or no error sometimes,
but in either case there is no sign of life. I can also take code
compiled with Micromint/micro Engineering's PM assembler (Parallax
format) and have it work fine on the same PicStic. The reason for using
MPASM over PM is that we already have code in MPASM format as well as a
better familiarity with Micochip assembler format.

Anyone have any ideas?

1996\10\17@155205 by dontronics

flavicon
face
Richterkessing, Frank H (GEA, 055132 ) wrote:
>
> Has anyone used MPASM with Micromint's PicStic system? I have been
> unable to successfully download MPASM compiled code using the
> Micromint/micro Engineering EPIC programmer. The code is tested and
> known to work when programmed into a 16C84 using PicStart in an
> otherwise identical circuit to what's on the PicStic module. When
> downloaded with EPIC we get "Config Verify Error" or no error sometimes,
> but in either case there is no sign of life. I can also take code
> compiled with Micromint/micro Engineering's PM assembler (Parallax
> format) and have it work fine on the same PicStic. The reason for using
> MPASM over PM is that we already have code in MPASM format as well as a
> better familiarity with Micochip assembler format.
>
> Anyone have any ideas?

Why not contact:
Jeff Schmoyer <spamBeGone71165.322spam_OUTspamRemoveMECompuServe.COM>
at microEngineering Labs.

MEL not only did the drivers for the EPIC programmer, they also did the
PicStic software. I realise that you built your own PicStic equiv. but
I'm sure Jeff would be
concerned if he knew the latest MPASM threw out a config wobbly that his
EPIC software couldn't handle.

Don...

Don McKenzie .....donmckspamRemoveMElabyrinth.net.au
DonTronics Tullamarine, Australia
http://www.labyrinth.net.au/~donmck

EASY PIC'n Beginners Guide to using PIC 16/17 MicroChip products.
Picosaurus(tm) 40 pin FED Basic with 8 channels of A-D, and real Uart.
MEL PicBasic Compiler. Programmers from 15 USD.  Pic-Axe(tm) A New Tool.


'Formatting MPASM output listing'
1996\11\09@234742 by Brooke
flavicon
face
Hi:

I am using MPLAB 3.12.00 & MPASM 01.40 LaserJet 4 w/postscript 600dpi
WFWG 3.11.
In order to see full line lengths I have selected COURIER 9 point fonts.
After 60 printed lines the assembler generates a page break even
though there is about 3 inches of white space on the bottom of the
page.  How do I tell the assembler that It can print more lines?

Also when telling the assembler to print just pages 1 to 3, it only
prints a page heading on a single sheet.  Is this a bug in MPASM 01.40?

Thanks,
Brooke

1996\11\10@013926 by fastfwd

face
flavicon
face
Brooke <PICLISTspam@spam@MITVMA.MIT.EDU> wrote:

> I am using MPLAB 3.12.00 & MPASM 01.40 LaserJet 4 w/postscript
> 600dpi WFWG 3.11. In order to see full line lengths I have selected
> COURIER 9 point fonts. After 60 printed lines the assembler
> generates a page break even though there is about 3 inches of white
> space on the bottom of the page.  How do I tell the assembler that
> It can print more lines?

Brooke:

Near the top of your source file, add the line:

   LIST N=xxx

where "xxx" is the number of lines you'd like to print per page.

-Andy

Andrew Warren - EraseMEfastfwdRemoveMEspamSTOPspamix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499

'Differences between MPASM V1.11 & V 1.21'
1996\11\13@104059 by Mike Hogben

flavicon
face
Code previously assembled without error using  Version 1.11 of MPASM, now
gives a number of Error 110: "Unmatched"  and Error 113 : "Symbol not
previously defined" errors, presumably in connection with labels.

I have release notes for V1.21 but can't see anything immediatey
obvious to explain why this should be ( but I'll stand corrected on
this )

Any ideas ?
----------------------------------------------------------
Mike Hogben.
Senior Engineer.
RemoveMEmahKILLspamspamTakeThisOuTitl.co.uk.

'MPASM V1.11 & V1.21 differences.'
1996\11\19@114110 by Mike Hogben

flavicon
face
Code previously assembled without error using  Version 1.11 of MPASM,
now gives a number of Error 110: "Unmatched"  and Error 113 : "Symbol
not previously defined" errors, presumably in connection with labels.

I have release notes for V1.21 but can't see anything immediatey
obvious to explain why this should be ( but I'll stand corrected on
this )

Any ideas ?
----------------------------------------------------------
Mike Hogben.
Senior Engineer.
spamBeGonemahspam@spam@itl.co.uk.

'Possible BUG in MPASM V1.4???'
1996\11\20@072415 by Mike Hogben

flavicon
face
LIST P=16C84

I have been having some problems with code previously written with
V1.11 that gives Error [110] : "Unmatched" errors when attempting to
assemble with V1.21 or V1.4 MPASM..

The following test code has no errors on V1.11 but gives error [106]
"String subsitution too complex" followed by Error [109] "Unmatched
(" when assembled with Version 1.21 or 1.4 MPASM.

#define A               D'100'
#define         B               D'17000'
#define         C               (( B * 4 ) / D'1000')
#define         D               (( A * 4 ) - C)
#define         E               low      D

MAIN
  MOVLW        E
END

It is a real shame that the old version 1.11 seems to be better at
hadling the directive language than 1.4.

If I am doing something silly here, please tell me and I'll stand
corrected.
----------------------------------------------------------
Mike Hogben.
Senior Engineer.
RemoveMEmahspam_OUTspamitl.co.uk.


'mpasm obj output'
1996\12\01@155556 by Tony Matthews
flavicon
face
running windows version of mpasm the output .obj option is greyed out
can someone explain    Tony M.

1996\12\01@162921 by fastfwd

face
flavicon
face
Tony Matthews <PICLISTspamspamMITVMA.MIT.EDU> wrote:

> running windows version of mpasm the output .obj option is greyed
> out can someone explain

Sure, Tony...

The ".obj" output will be used by Microchip's as-yet-unavailable
linker.  Until that linker is available, there's no reason to
generate ".obj" files, so the option is unavailable.

-Andy

=== Andrew Warren - spam_OUTfastfwdspam_OUTspamspam_OUTix.netcom.com                 ===
=== Fast Forward Engineering - Vista, California          ===
===                                                       ===
=== Did the information in this post help you?  Consider  ===
=== contributing to the PICLIST Fund.  Details are at:    ===
=== http://www.geocities.com/SiliconValley/2499/fund.html ===

'mpasm question'
1996\12\21@192231 by Tony Matthews

flavicon
face
Hello
Would someone be willing to explain what I am doing wrong here This is
mpasm .lst file clipping for a 16c84?

Warning[202]: Argument out of range.  Least significant bits used.
0008 301B           00031                 MOVLW   11111b          ;value
used to initialize data direction
Message[302]: Register in operand not in bank 0.  Ensure that bank bits
are correct.
0009 0085           00032                 MOVWF   TRISA           ;set
ra <0:5> to input mode

1996\12\21@205236 by Stephen H Alsop

picon face
try this:

0008 301B           00031                 MOVLW   00011111b          ;value

I always pad out the binary to 8 chars.  Also try '00011111'b with ' '
chars either side as early versions of mpasm seemed to need this.

Also - I do not use the tris reg.  Instead use the fsr and indf reg, eg

       movlw   trisa   ;get the address of the tris reg into w
       movwf   fsr     ;store this address at the indirect setup reg

       movlw   00001111b       ;set the io bits and store them at
       movwf   indf    ;the indirect register which is pointing to trisa

This method stops having to use page 0,1 bit setups and stops compiler
messages

Happy Xmas

----- Stephen H Alsop -----
email: s.ssystemsspam_OUTspameasynet.co.uk
www  : http://easyweb.easynet.co.uk/~s.ssystems
S&S Systems Ltd, Bretton Court, Manor Road, Wales Village, Sheffield
S31 8PD, England.  Tel: 01909 773399  *  Fax: 01909 773645


----------
: From: Tony Matthews <RemoveMEtonyKILLspamspam@spam@MAGICNET.NET>
: To: Multiple recipients of list PICLIST <PICLISTspamBeGonespam.....MITVMA.MIT.EDU>
: Subject: mpasm question
: Date: 22 December 1996 00:21
:
: Hello
: Would someone be willing to explain what I am doing wrong here This is
: mpasm .lst file clipping for a 16c84?
:
: Warning[202]: Argument out of range.  Least significant bits used.
: 0008 301B           00031                 MOVLW   11111b          ;value
: used to initialize data direction
: Message[302]: Register in operand not in bank 0.  Ensure that bank bits
: are correct.
: 0009 0085           00032                 MOVWF   TRISA           ;set
: ra <0:5> to input mode

1996\12\21@212630 by Bob Blick

flavicon
face
>Warning[202]: Argument out of range.  Least significant bits used.
>0008 301B           00031                 MOVLW   11111b

It doesn't understand you are giving it a binary number. You should say:
           MOVLW   b'00011111'


>Message[302]: Register in operand not in bank 0.  Ensure that bank bits
>are correct.
>0009 0085           00032                 MOVWF   TRISA

PICs can't address registers above 7F directly, and TRISA is 85, and the
assembler is telling you it is addressing 05 or 85, it doesn't know which.
Which one depends on the setting of bit 5 of the status register (this bit
is usually referred to as "RP0").

In other words, of the eight bits you need for a register's address, you can
only specify the lower 7. The eighth bit is ignored, and RP0 is used instead.

To make sure that you are really talking to TRISA, you would need to do this:

          movlw   b'00011111' ;the direction pattern you wanted
          bsf     STATUS,5    ;set RP0 to the 80's
          movwf   TRISA       ;move w into TRISA
          bcf     STATUS,5    ;switch back to the lower bank of registers

You'll still get the "Message[302]: Register in operand not in bank 0.
Ensure that bank bits" warning, but ignore it or tell the assembler to
suppress it.

Most people will tell you that changing to register bank 1 is not needed,
since there is a perfectly good way to do just what you wanted. I'd do it, too!

          movlw   b'00011111' ;your bit pattern
          tris    5           ;5 is the address of port A

This will give you an assembler warning, but ignore it. The tris command is
still valid and you should use it whenever you want to.

Cheers, Bob

1996\12\21@223630 by Bob Blick

flavicon
face
>
>Also - I do not use the tris reg.  Instead use the fsr and indf reg, eg
>
>        movlw   trisa   ;get the address of the tris reg into w
>        movwf   fsr     ;store this address at the indirect setup reg
>
>        movlw   00001111b       ;set the io bits and store them at
>        movwf   indf    ;the indirect register which is pointing to trisa
>
>This method stops having to use page 0,1 bit setups and stops compiler
>messages


That's very clever! I always assumed that register addresses would be formed
the  same way when using fsr. (taking the top bit from RP0)

'MPASM preprocessor'
1996\12\30@073102 by Janusz J. Mlodzianowski

flavicon
face
                MPASM Preprocessor.

I have the following problem (idea..):
Being used to z80/8086 mnemonics I wonder whether there already exist
some sort of preprocessor which would translate 8086 like mnemonics
to Microchip MPASM (which I still have difficulties in understanding).
I am thinking about writing such programme (C, C++) myself but if there
already exist one than why bother.
Having such preprocessor one could expand some exotic mnemonics as macros,
say add some of the recently discussed math examples, etc
Any ideas?

All The Best For The New Year!!

Janusz

1996\12\30@114303 by Walter Banks

picon face
Janusz J. Mlodzianowski wrote:
>
>                  MPASM Preprocessor.
>
> I have the following problem (idea..):
> Being used to z80/8086 mnemonics I wonder whether there already exist
> some sort of preprocessor which would translate 8086 like mnemonics
> to Microchip MPASM (which I still have difficulties in understanding).
> I am thinking about writing such programme (C, C++) myself but if there
> already exist one than why bother.

I have not seen such a preprocessor. The Parallax mnemonics are a little
like the 8051 and they may be usefull to help understand the Microchip
PIC processor instruction sets.

Walter Banks
http://www.bytecraft.com


'Executing MPASM from a DOS Program'
1997\01\01@113606 by myke predko
flavicon
face
This question is probably best answered by the Microchip guys, or Walt
Banks, but here goes.

I'm trying to execute MPASM from another DOS program using the int 21h 0x04B
function ("Load or Execute a Program").  I have trouble sending command line
parameters to MPASM.

I have tried putting in the string from the command line part of the
Parameter Block (which works fine for Edit, MPSIM) as well as forcing it
into the FCB block, but in both cases, it doesn't work - a "random" ASCII
character is put in with .asm (ie "3.asm") according to MPASM.

I do have enough space to load MPASM (usually around 500K in the Windows/95
DOS box).

Does anybody have any ideas?

Thanx and I hope everybody has a wonderful New Year!

myke

"There are only three kinds of economists in the world.  Those who can count
and those who can't." - Eddy George, governor of the Bank of England

1997\01\03@155422 by Eduardo J. Martinez Velez

flavicon
face
part 0 468 bytes

I have tried putting in the string from the command line part of the
Parameter Block (which works fine for Edit, MPSIM)


----------------------------
Thanks for all - Mil gracias
----------------------------
Eduardo Jorge Mart’nez VŽlez
a   Asesoria
&   &
 s   Sistematizacion
INET: KILLspamejmvspam.....satlink.com
 spam_OUT73070.3653spamKILLspamcompuserve.com
CServe: 73070,3653
2000-Rosario-SF-Argentina
TelFax: (54)(41)254561
Tel: (54)(41)8804
----------------------------

1997\01\06@103929 by myke predko

flavicon
face
Hi Eduardo,

>        You implied that you *CAN* pass parameters to mpsim.
>        Can you (May be interesting your version) pass anything related
with commans file (*.ini) or *.hex to load?
>        I tried but, due to my non-existent free time, I abandoned that line.

No, you can't pass anything related to the *.ini or load the *.hex file.
MPSIM looks for, loads, and executes MPSIM.INI and that's it on Power Up.
Sorry.

You can send simple Parameters (ie what is the type of PIC to be simulated)
to MPSIM, but that's about it.

sorry.

>I have tried putting in the string from the command line part of the
>Parameter Block (which works fine for Edit, MPSIM)

Now, what was the file that you sent me (attached to this note)?  I tried to
take a look at it and it's some kind of binary file, but I'm not sure what
it's actually for...

myke
{Quote hidden}

"There are only three kinds of economists in the world.  Those who can count
and those who can't." - Eddy George, governor of the Bank of England


'MPASM Pseudo Ops'
1997\02\06@113543 by John Piccirillo
flavicon
face
  Where does one get a list, and definition, of MPASM pseudo ops.  Did I miss
it in the MPASM manual?

John-

1997\02\06@190334 by Martin J. Maney

flavicon
face
On Thu, 6 Feb 1997, John Piccirillo wrote:

>    Where does one get a list, and definition, of MPASM pseudo ops.  Did I miss
>  it in the MPASM manual?

They used to hide in an appendix at the back of the printed manual.  As of
about a year ago they were NOT in any electronic document, I believe;
certainly not in the MPASM manual I downloaded and printed about that
time.

1997\02\06@193415 by Andrew Warren

face
flavicon
face
John Piccirillo <PICLISTspamspamMITVMA.MIT.EDU> wrote:

> Where does one get a list, and definition, of MPASM pseudo ops?

   Right here, John.

> Did I miss it in the MPASM manual?

   Maybe.  The following table is copied directly from the
   "USRGUIDE.TXT" file that was included with old versions of
   MPASM:

          PIC16CXX SPECIAL INSTRUCTION MNEMONICS

    Name                Mnemonic       Equivalent       Status
                                      Operation(s)
Clear Carry                CLRC        BCF      3,0        -
Clear Digit Carry          CLRDC       BCF      3,1        -
Set Digit Carry            SETDC       BSF      3,1        -
Clear Zero                 CLRZ        BCF      3,2        -
Set Zero                   SETZ        BSF      3,2        -
Skip on Carry              SKPC        BTFSS    3,0        -
Skip on No Carry           SKPNC       BTFSC    3,0        -
Skip on Digit Carry        SKPDC       BTFSS    3,1        -
Skip on No Digit Carry     SKPNDC      BTFSC    3,1        -
Skip on Zero               SKPZ        BTFSS    3,2        -
Skip on Non Zero           SKPNZ       BTFSC    3,2        -
Test File                  TSTF f      MOVF     f,1        Z
Move File to W             MOVFW f     MOVF     f,0        Z
Negate File                NEGF f,d    COMF     f,1
                                      INCF     f,d        Z
Add Carry to File          ADDCF f,d   BTFSC    3,0
                                      INCF     f,d        Z
Subtract Carry from File   SUBCF f,d   BTFSC    3,0
                                      DECF     f,d        Z
Add Digit Carry to File    ADDDCF f,d  BTFSC    3,1
                                      INCF     f,d        Z
Subtract Digit             SUBDCF f,d  BTFSC    3,1
Carry from File                        DECF     f,d        Z
Branch                     B k         GOTO     k          -
Branch on Carry            BC k        BTFSC    3,0
                                      GOTO     k          -
Branch on No Carry         BNC k       BTFSS    3,0
                                      GOTO     k          -
Branch on Digit Carry      BDC k       BTFSC    3,1
                                      GOTO     k          -
Branch on No Digit Carry   BNDC k      BTFSS    3,1
                                      GOTO     k          -
Branch on Zero             BZ k        BTFSC    3,2
                                      GOTO     k          -
Branch on Non Zero         BNZ k       BTFSS    3,2
                                      GOTO     k          -
Call across page boundary  LCALL k     BCF 3,5 or BSF 3,5
                                      BCF 3,6 or BSF 3,6
                                      CALL     k

   Hope that helps...

   -Andy

   P.S.  By the way, don't bother using the "LCALL" pseudo-op...
         Since it doesn't restore the code-page bits after the
         CALL, it's sorta useless.

=== Andrew Warren - RemoveMEfastfwdspamBeGonespamRemoveMEix.netcom.com                 ===
=== Fast Forward Engineering - Vista, California          ===
===                                                       ===
=== Did the information in this post help you?  Consider  ===
=== contributing to the PICLIST Fund.  Details are at:    ===
=== http://www.geocities.com/SiliconValley/2499/fund.html ===

1997\02\06@201351 by dporter

flavicon
face
John Piccirillo wrote:
>
>    Where does one get a list, and definition, of MPASM pseudo ops.  Did I miss
>  it in the MPASM manual?
>
> John-

Try the MPASM help screens for the codes of the chip de jour.  Many
thanks to Andy Warren for pointing out the same thing to me.
David Porter
KILLspamdporterspamBeGonespamvoicenet.com

1997\02\07@065118 by mike

flavicon
picon face
In message  <@spam@199702061635.KAA19988STOPspamspam@spam@mdsc1.tbe.com> PICLISTspamBeGonespamspamBeGoneMITVMA.MIT.EDU writes:
>    Where does one get a list, and definition, of MPASM pseudo ops.  Did I miss
>  it in the MPASM manual?
>

John

Yes, its at the back of the manual amoungst the tables of standard
op-codes.

Regards,



Mike Watson

1997\02\07@065120 by mike

flavicon
picon face
In message  <spamBeGonePine.BSF.3.95.970206175902.856B-100000spamVenus.mcs.net>> spam_OUTPICLISTSTOPspamspamMITVMA.MIT.EDU writes:
> On Thu, 6 Feb 1997, John Piccirillo wrote:
>
> >    Where does one get a list, and definition, of MPASM pseudo ops.  Did I
miss
> >  it in the MPASM manual?
>
> They used to hide in an appendix at the back of the printed manual.  As of
> about a year ago they were NOT in any electronic document, I believe;
> certainly not in the MPASM manual I downloaded and printed about that
> time.
>

I downloaded the manual last week and they were in the back.

Regards,


Mike Watson

1997\02\07@112736 by John Piccirillo

flavicon
face
>>Where does one get a list, and definition, of MPASM pseudo ops.  Did I miss
>>it in the MPASM manual?

Andy Warren wrote:
>Maybe.  The following table is copied directly from the
>    "USRGUIDE.TXT" file that was included with old versions of
>    MPASM:

 SNIP the table...

      I looked through the MPASM Manual Appendices but apparently it's not in
the newer versions.

>    Hope that helps...

   It does; I wanted it to interpret the code of others that use the mnemonics.
 Thanks.

John-

1997\02\07@122927 by Darrel Johansen

picon face
John Piccirillo <RemoveMEjpiccirispamspamNEBULA.TBE.COM> writes:

      >>I looked through the MPASM Manual Appendices but apparently it's not in
      >>the newer versions.

It's in Appendix D., Quick Reference of the MPASM User's Guide, DS33014E, pages
78-79.

Darrel Johansen

1997\02\07@161907 by Craig Knotts

flavicon
face
Attachment converted: wonderlandfive:ATTACH01.TXT 1 (TEXT/CSOm) (0000B5E0)

'MPASM (on from code error)'
1997\02\20@141037 by Philip Martin

flavicon
picon face
Hi all,

Many thanks for the replies to my previous problem.

Whilst on the subject of MPASM, whats the name of the file I need to
download the latest version from microchip. I've logged on to their BBS
recently, but a specific file to download would be handy.

TIA,
--
Philip Martin   email TakeThisOuTphilipspamspamRemoveMEphilmart.demon.co.uk
Royal Quays, North Shields


'MPASM accessing middle bytes...'
1997\03\25@093918 by mike
flavicon
picon face
Hi,

In MPASM, I can declare a constant value of two byte
and access the high and low bytes using 'HIGH' and 'LOW'.

Example:

MyConst  equ  h'ABCD'

   movlw   high(MyConst)   ; will move $AB into w


If I declare a constant with more than 2 bytes, is it possible
to access the middle bytes?

Example:

MyConst  equ  h'01020304'

  movlw   ???? (MyConst)    ;how do I access the 3rd byte???

Regards,

Mike Watson

1997\03\25@150058 by Andrew Warren

face
flavicon
face
Mayes uk <KILLspammikespamspamspam_OUTd-m-g.demon.co.uk> wrote:

> If I declare a constant with more than 2 bytes, is it possible
> to access the middle bytes?
>
> Example:
>
> MyConst  equ  h'01020304'
>
>    movlw   ???? (MyConst)    ;how do I access the 3rd byte???

Mike:

   MOVLW ((MYCONST) >> 8) & 0xFF

It's probably easiest if you use parameterized #DEFINEs to define
the shift-and-AND operations for each byte-position... Then you can
just say:

   MOVLW LSB2(MYCONT)

or whatever.

By the way, it's best to use shift-and-AND macros instead of LOW and
HIGH... In at least some versions of M

1997\03\26@040621 by mike

flavicon
picon face
In message  <199703251959.NAA23125RemoveMEspamdfw-ix5.ix.netcom.com> EraseMEPICLISTSTOPspamspamRemoveMEMITVMA.MIT.EDU
writes:
{Quote hidden}

Thanks for the reply, Andy.

One phrase I didn't understand was "parameterized #DEFINEs". Can
you give me an example?

Regards,


Mike

'MPASM accessing middle bytes...BUG???'
1997\03\26@104938 by Antti Lukats

flavicon
face
>> It's probably easiest if you use parameterized #DEFINEs to define
>> the shift-and-AND operations for each byte-position... Then you can
>> just say:
>>
>>     MOVLW LSB2(MYCONT)
>>
>> or whatever.
>>
>> By the way, it's best to use shift-and-AND macros instead of LOW and
>> HIGH... In at least some versions of M
>>
>
>Thanks for the reply, Andy.
>
>One phrase I didn't understand was "parameterized #DEFINEs". Can
>you give me an example?

hi Mike
the #define - 'string substition engine' is a real powerful feature
of MPASM, but apparently there is a bug with >> more than 15 bits see
code snipped below, both #define are identical, but only one works.


                   00004 #define BYTE_2(a) (a >> 16) & 0xFF
                   00005 #define BYTE_2x(a) (a >> 8 >> 8) & 0xFF
                   00006
 12345678          00007 mylong_thing = 0x12345678
                   00008

0000 3048           00009  movlw BYTE_2(mylong_thing)
;      ^ this one messes up MPASM 1.40 bug???

0001 3034           00010  movlw BYTE_2x(mylong_thing)
;      ^ this one works fine

antti

-- Silicon Studio Ltd.
-- http://www.sistudio.com

1997\03\26@180526 by Andrew Warren

face
flavicon
face
Antti Lukats <TakeThisOuTPICLISTRemoveMEspam@spam@MITVMA.MIT.EDU> wrote:

> apparently there is a bug with >> more than 15 bits see code
> snipped below, both #define are identical, but only one works.
>
>
>                     00004 #define BYTE_2(a) (a >> 16) & 0xFF
>                     00005 #define BYTE_2x(a) (a >> 8 >> 8) & 0xFF
>                     00006
>   12345678          00007 mylong_thing = 0x12345678
>                     00008
>
> 0000 3048           00009  movlw BYTE_2(mylong_thing)
> ;      ^ this one messes up MPASM 1.40 bug???
>
> 0001 3034           00010  movlw BYTE_2x(mylong_thing)
> ;      ^ this one works fine

   You're going to laugh, Antti... Kim Cooper and I certainly did
   when we figured out what was happening.

   Here... I'll walk you through it:

       0x12345678, expressed in binary, is:

           00010010001101000101011001111000

       The result you got was 0x48.  Expressed in binary, 0x48 is:

           01001000

       Ok... Where in the original number does that bit-pattern
       appear?

       If you look closely, you'll see that it appears in bit
       positions 22 through 29... It seems that your "a >> 16"
       expression was actually working like "a >> 22", right?

   At this point, the answer should be dawning, but just in case it
   isn't...

       Decimal 22 = Hexadecimal 16.

       Oops.

   Change your #defines to read ".... a >> 0x10", or add a "LIST
   R=DEC" directive at the start of your program, and everything
   will work fine.

   -Andy

=== Andrew Warren - EraseMEfastfwdRemoveMEspamix.netcom.com
=== Fast Forward Engineering - Vista, California
===
=== Custodian of the PICLIST Fund -- For more info, see:
=== www.geocities.com/SiliconValley/2499/fund.html

1997\03\26@184057 by Antti Lukats

flavicon
face
>        If you look closely, you'll see that it appears in bit
>        positions 22 through 29... It seems that your "a >> 16"
>        expression was actually working like "a >> 22", right?
>
>    At this point, the answer should be dawning, but just in case it
>    isn't...
>
>        Decimal 22 = Hexadecimal 16.
>
>        Oops.

oops, oops yep I did think it is something simple, I usually always
declare radix dec but hence I wrote a simple 5 lines test program I forgot,

so let it be a reminder to cross check everuthing inclunding correct
radix, if thing dont look they way they should

oh, shame shame on me :)

antti

-- Silicon Studio Ltd.
-- http://www.sistudio.com

'MPASM Pseudo Ops'
1997\03\27@134220 by Andrew Warren

face
flavicon
face
A few people have recently asked about MPASM pseudo-ops in
private e-mail, so I'm reposting the list.

The following pseudo-ops are understood by MPASM directly; no
include file, etc., is needed in order to use them.

          PIC16CXX SPECIAL INSTRUCTION MNEMONICS

    Name                Mnemonic       Equivalent       Status
                                      Operation(s)
Clear Carry                CLRC        BCF      3,0        -
Clear Digit Carry          CLRDC       BCF      3,1        -
Set Digit Carry            SETDC       BSF      3,1        -
Clear Zero                 CLRZ        BCF      3,2        -
Set Zero                   SETZ        BSF      3,2        -
Skip on Carry              SKPC        BTFSS    3,0        -
Skip on No Carry           SKPNC       BTFSC    3,0        -
Skip on Digit Carry        SKPDC       BTFSS    3,1        -
Skip on No Digit Carry     SKPNDC      BTFSC    3,1        -
Skip on Zero               SKPZ        BTFSS    3,2        -
Skip on Non Zero           SKPNZ       BTFSC    3,2        -
Test File                  TSTF f      MOVF     f,1        Z
Move File to W             MOVFW f     MOVF     f,0        Z
Negate File                NEGF f,d    COMF     f,1
                                      INCF     f,d        Z
Add Carry to File          ADDCF f,d   BTFSC    3,0
                                      INCF     f,d        Z
Subtract Carry from File   SUBCF f,d   BTFSC    3,0
                                      DECF     f,d        Z
Add Digit Carry to File    ADDDCF f,d  BTFSC    3,1
                                      INCF     f,d        Z
Subtract Digit             SUBDCF f,d  BTFSC    3,1
Carry from File                        DECF     f,d        Z
Branch                     B k         GOTO     k          -
Branch on Carry            BC k        BTFSC    3,0
                                      GOTO     k          -
Branch on No Carry         BNC k       BTFSS    3,0
                                      GOTO     k          -
Branch on Digit Carry      BDC k       BTFSC    3,1
                                      GOTO     k          -
Branch on No Digit Carry   BNDC k      BTFSS    3,1
                                      GOTO     k          -
Branch on Zero             BZ k        BTFSC    3,2
                                      GOTO     k          -
Branch on Non Zero         BNZ k       BTFSS    3,2
                                      GOTO     k          -
Call across page boundary  LCALL k     BCF 3,5 or BSF 3,5
                                      BCF 3,6 or BSF 3,6
                                      CALL     k

By the way, don't bother using the "LCALL" pseudo-op... Since it
doesn't restore the code-page bits after the CALL, it's sorta
useless.  Also, be careful with the pseudo-ops that assemble to two
instructions; constructs like the following, for instance, will
cause you great pain and suffering:

   ; DON'T DO THIS!

   BTFSS   FLAGS,SWITCH    ;If the switch is pressed, skip ahead.
   NEGF    REG             ;Otherwise, negate the REG register.

-Andy

=== Andrew Warren - spamfastfwd.....spamspamix.netcom.com
=== Fast Forward Engineering - Vista, California
===
=== Custodian of the PICLIST Fund -- For more info, see:
=== www.geocities.com/SiliconValley/2499/fund.html

1997\03\27@192443 by Jim Main

flavicon
picon face
In article <199703271840.MAA01554spam_OUTspam@spam@dfw-ix6.ix.netcom.com>, Andrew Warren
<.....fastfwdspamspam.....IX.NETCOM.COM> writes
>A few people have recently asked about MPASM pseudo-ops in
>private e-mail, so I'm reposting the list.
>
>The following pseudo-ops are understood by MPASM directly; no
>include file, etc., is needed in order to use them.
>
>           PIC16CXX SPECIAL INSTRUCTION MNEMONICS
>
>     Name                Mnemonic       Equivalent       Status
>                                       Operation(s)
>Clear Carry                CLRC        BCF      3,0        -

etc. ......

what I'd like to know - is why isn't any of this documented in the MPASM
documentation (all 90 odd pages of it!)

Jim
--
Jim Main
jimKILLspamspamEraseMEewcomm.demon.co.uk
Visit Eastwood Communications at http://www.ewcomm.demon.co.uk
Broadcast Electronics & Custom Design

1997\03\27@193231 by Andrew Warren

face
flavicon
face
Jim Main <EraseMEPICLIST@spam@spam@spam@MITVMA.MIT.EDU> wrote:

> what I'd like to know - is why isn't any of this [list of MPASM
> pseudo-ops] documented in the MPASM documentation (all 90 odd pages
> of it!)

Jim:

Some versions of the manual (and USRGUIDE.TXT file) included it; some
didn't.  The next MPASM manual will probably include it.

The pseudo-ops themselves are understood by all versions of MPASM.

-Andy

=== Andrew Warren - @spam@fastfwdspamspamKILLspamix.netcom.com
=== Fast Forward Engineering, Vista, California
=== http://www.geocities.com/SiliconValley/2499

1997\03\27@204932 by sdattalo

face
flavicon
face
Jim Main wrote:
>
> >           PIC16CXX SPECIAL INSTRUCTION MNEMONICS
> >
> >     Name                Mnemonic       Equivalent       Status
> >                                       Operation(s)
> >Clear Carry                CLRC        BCF      3,0        -
>
> etc. ......
>
> what I'd like to know - is why isn't any of this documented in the MPASM
> documentation (all 90 odd pages of it!)
>

It's documented in MPLAB. Look under:

   Help
     |
     --> MPASM Help
             |
             --> PIC16CXX Instruction Set (or in which ever Instruction
                                           Set you're interested.)

In addition to the "Standard Mnemonics", the "Special Mnemonics" are
also documented.

Scott

'MPASM macro questions'
1997\03\28@175906 by Dwayne Reid

flavicon
face
Does anyone know how to determine whithin a MPASM macro whether a parameter
has been specified?  For example:

eeset    MACRO  label, addr, default, min, max

   if (min)
     retlw  min
   else
     retlw  0x00
   endif
blah blah blah

In other words, if I invoked the macro as:  eeset HITEMP, 01, 0x55,,
I could tell within the macro that I had not specified certain parameters
and allow the macro to use standard defaults for those parameters.

I have tried:
   if (min)
   if min
   if !(min)
   if !min
   if !((min)==())
   if (min) != ()

all of these return errors.

I also tried:
   ifdef   (min)
   ifdef   min
but those always return false whether or not the parameter is present or not.

Any ideas?


Dwayne Reid   <spamBeGonedwaynerRemoveMEspamEraseMEplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, Alberta, CANADA
(403) 489-3199 voice     (403) 487-6397 fax

1997\03\29@073934 by Andrew Kovalev

flavicon
face
> Does anyone know how to determine whithin a MPASM macro whether a
parameter
> has been specified?

Hello, Dwayne!

Suggestion: use simple arythmetic to make compiler think it
performs a smart job :)

test_parm       MACRO             p1
;
; Parameter p1 is parsed here as 0 if the value
; is not supplied to the list.
;
       if ( p1+0 ) == 0                ; parser with 0 default value
       messg "Parm 1 default"  ; so this is the case of your
       retlw   0x0                     ; 1st example
       else
       messg "Parm 1 defined"
       retlw   p1
       endif
       ENDM

I guess something more complex can parse zeros (eg. logical operation "!")
There is also a #v() "text substitution" operation which may be of some
use.
                            sincerely yours, Andrew.

1997\03\29@181455 by Dwayne Reid

flavicon
face
>> Does anyone know how to determine whithin a MPASM macro whether a
>>parameter has been specified?
>
>Hello, Dwayne!
>
>Suggestion: use simple arythmetic to make compiler think it
>performs a smart job :)
>
>test_parm       MACRO             p1
>;
>; Parameter p1 is parsed here as 0 if the value
>; is not supplied to the list.
>;
>        if ( p1+0 ) == 0                ; parser with 0 default value

YES  YES  YES

Thank you, Andrew!  The obvious solution that eluded me for longer than I
care to admit!!  As it turns out, my default and min values default to 00 if
not specified so all I needed to do was add 0 to them.  My current version
looks like this:

label           EQU addr
   org         (EEDEFAULT)+(EECNT)+(EEOFFSET) ;start addr + counter + offset
   retlw       (default+0)

   org         (EELOLIMIT)+(EECNT)+(EEOFFSET)
   retlw       (min+0)

   org         (EEHILIMIT)+(EECNT)+(EEOFFSET)
   if          (max+0)==0
     retlw     0xFF                  ;max limit must be >0
   else
     retlw     max
   endif

MPASM seems to have no problem with a number expressed as (+0) so everything
compiles OK (and generates appropriate code).

Thanks again!

Dwayne Reid   <RemoveMEdwaynerKILLspamspamRemoveMEplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, Alberta, CANADA
(403) 489-3199 voice     (403) 487-6397 fax


'MPASM accessing middle bytes...BUG???'
1997\04\02@122759 by mike
flavicon
picon face
In message  <TakeThisOuT199703262303.RAA22889spamdfw-ix7.ix.netcom.com> spamBeGonePICLISTKILLspamspamTakeThisOuTMITVMA.MIT.EDU
writes:
> Antti Lukats <EraseMEPICLIST.....spamKILLspamMITVMA.MIT.EDU> wrote:
>
> > apparently there is a bug with >> more than 15 bits see code
> > snipped below, both #define are identical, but only one works.
> >
> >
> >                     00004 #define BYTE_2(a) (a >> 16) & 0xFF
> >                     00005 #define BYTE_2x(a) (a >> 8 >> 8) & 0xFF
> >                     00006

Andy,

I guess I'll just ignore Antti's bug report.

Also, I guess the above is what you meant by "parameterized #defines".

I didn't know you could do this in MPASM - it open the door to all
sorts of things.

Regards,


Mike Watson

'MPASM macro'
1997\04\09@023657 by Ruben Jnsson

flavicon
face
Hi

When I write a program for the PIC (or any other destination)
I define 2 symbols and 1 definition for bit variables:

 b_redled  equ 3        ;It's bit position in the file reg.
 m_redled equ 1 << b_redled       ;It's mask value.
 #define f_redled  port_a.,b_redled     ;It's flag definition

This way I can do the following:
  bsf  f_redled     ;Direct bit access with flagdefinition

  movlw (m_redled | ....)   ;Byte manipulation with mask symbol
  tris port_a

  btfss temp,b_redled  ;Bit access on a copy of the original file
register.

Instead of the 3 definitions above I would like to do it
with one macro, something like:
 bitdef    redled,3,port_a

I havn't found a way to do this with mpasm's macro
functions. The problem here is that I can't create new
symbolnames based on a macro argument with a
prefix added to it (b_, m_ and f_).

Is there any way of doing this with mpasm ?

(Of course I could do a preprocessor program that
substituted the bitdef... with the 3 definitions above.
This would, however, change the number of lines
in the assembled source which in turn would mess
up the line numbers from mpasm's error file.)


------------------------------------
Ruben Joensson
AB Liros Elektronik
Box 9124
200 39 Malmoe
Sweden
Tel +46 40 14 20 80
Mail: spamrubenspamsbbs.se
------------------------------------

1997\04\09@093527 by myke predko

flavicon
face
Ruben Joensson wrote:
<SNIP>
>Instead of the 3 definitions above I would like to do it
>with one macro, something like:
>  bitdef    redled,3,port_a
>
>I havn't found a way to do this with mpasm's macro
>functions. The problem here is that I can't create new
>symbolnames based on a macro argument with a
>prefix added to it (b_, m_ and f_).
>
>Is there any way of doing this with mpasm ?

No.

>(Of course I could do a preprocessor program that
>substituted the bitdef... with the 3 definitions above.
>This would, however, change the number of lines
>in the assembled source which in turn would mess
>up the line numbers from mpasm's error file.)

I wish there was.  I *once* worked with a language that had a macro
processor that could do this - it really was as powerful as the language it
was coupled with.

It made stuff like you're proposing great to create and really easy.


Unfortunately, such power is occasionally used for evil - I was responsible
for maintaining an RTOS that was written *completely* with these types of
macro functions (absolutely *no* code in the source)  The first time I had
to fix something, I had to go through each macro source file and turn on the
listing function.  It was hell.

The original authors were all PhDs, which should explain why it was done
this way.


If you do come up with a preprocessor that has this type of function, I
would be interested in seeing it.  I think there are a lot of advantages to
macro system like you are proposing.

Good Luck!

myke

"Some people say that foreign cars handle best, while others say domestic.
For my money, nothing handles as well as a rental car." - P.J. O'Rourke


'MPASM memory allocation..'
1997\05\05@061756 by Janusz J. Mlodzianowski
flavicon
face
I remember a while ago somone asked similar question, but I could not find
where I have the answer..

I need to allocate some 16C84 data memory. My old copy of MPASM (I do not
remember the version #) has DB and DW directives. I understand that those
could allocate programme memory. The Parallax assembler(I do not have it)
has a DS directive which I belive could do the job.
Being z80/i86 oriented I would like to maintain even using PICs similar
programming fashion. I would not like to use EQUs like I have seen in many
MPASM listings.
The second problem I have is how to efficiently initiate the allocated memory?
I would like to write a code equivalent to:

;somewhere in the data memory
location:       DB      'storage','$'

BTW is there a public domain assembler that works in the above fashion,
uses object files and has a linker and librarian
Thanks for suggestions,
janusz

1997\05\05@071024 by Andy Kunz

flavicon
face
>;somewhere in the data memory
>location:       DB      'storage','$'
>
>BTW is there a public domain assembler that works in the above fashion,
>uses object files and has a linker and librarian

Parallax assembler uses DS to reserve space.  For the above example, one
would use

location:       RETW      'storage','$'

You must remember that you cannot initialize RAM in this manner, only ROM
areas.

If you want to see the message, do the following in Parallax assembler
(http://www.parallaxinc.com):


               org     (somewhere in RAM)

MsgPntr ds      1



               org     (somewhere such that all characters are below address 25
6 in current
bank)

Msg             jmp     PC+W
               RETW      'storage','$'


Then later in your code



MsgOut
               clrf    temp1
:Loop           movf    temp1,W
               call    Msg
               xorlw   '$'             ; TEst for end
               btfss   Z
               goto    :Done           ; Found, then exit
               xorlw   '$'             ; Fix bits back again
               call    Display
               incf    temp1,F
       goto    :Loop
:Done
       continue with rest of program

FWIW, I use 0x00 as end-of-string.  Not only is it understood by more
stuff, but then you can actually send "$" character easily.

Andy

==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================

'PASMX to MPASM translator?'
1997\05\14@063545 by wterreb

flavicon
face
Hi

 Do anyone know if there is a translator program available anywhere
that translates source files written for the Parallax PASMX compiler
into source files that can be compiled by Microchip MPASM?  I seem to
have read something about this on the Piclist a long time ago, but
forgot now what the details were.

Alternatively, is it possible to convert the OBJ files generated by
PASMX into HEX files needed by most programmers?

Rgds
Werner

'mpasm object code error'
1997\05\19@115321 by Andrew Farrar - Technician

flavicon
face
Have compiled a program which has the error message:

'missing segment name for .obj file'

This seems to occur around origin statements, any help would be most
welcome. The two errors occur right a t beginning, after many
equates:
          org     0
          goto    start

         org    30
start   clrw    .......etc....

Many thanks in anticipation
Andy Farrar.

1997\05\19@130322 by eric naus

picon face
Hi There,

According to the manual it states:

If an object file is to be generated,syntex for the ORG directive
is different. Until the linker is ready,there is no reason to generate
an object file.

I don't know if this helps ????

Regards

Eric Naus

At 04:41 PM 5/19/97 GMT, you wrote:
{Quote hidden}

'MPASM & IDE'
1997\05\29@200513 by Alex I. Torres

flavicon
face
  Hi All PICers !

I received many requests for the working with MPASM in
Borland's IDE, so I post it here.

  Best Wishes, Alex Torres.
  Kharkov, Ukraine, exUSSR.
  E-Mail To : altorSTOPspamspamcook.kharkov.ua   via InterNet
              or 2:461/28             via FidoNet

---------------------- begin ----------------------------

Content-type: application/octet-stream; name:ideasm.zip
Content-transfer-encoding: base64

UEsDBBQAAAAIAFJwLiJB4rx8OQQAABEMAAAHAAAASURFLkRPQ71W72/iRhD9bsn/wxTlQ1CI8+Oq
the1VTkCd6cUgg6ud1XVD4s94C3rHXd3DUGq8rd3d22Dk0DTU6P6E/bOvp15b/YN8KGQkssFDMfd
yRC4BJMivCElmExO31/3w+D03z5hcNGGaaFmBMcVQht64EHCoFrpnZzA8UV0bs9RBbyKzttQaFQa
1lwIYHmuMObMoM8jJ635jAtuNmAoDLhc0RKrXJkGBkYxqeeoIFe0UCyDuaKsWYM7PgqDASn7leuO
X5tzYRp7huPJ8HI4eQtzH1UfgErZ9wy1ZgvUYZDaE2eI0u1b8QSTCKZkKTNoUQxuKTT0OIEO5Kgs
eBYG/ngSgtaOdW0w11eeHjiFNwi6UK50Zkq0qP+5Dw6kTrH8YGM0ZbhO0f6ymm2oUDDuTt9FNdTE
MGV8Gg3abTV1Uva97TLzJV/fTrYbHVG7LVaojmVLaQOx4PHyCuA2N5ykhr9gUFjFMpSFe7kd1Qg9
F7jTwQXAjCm7tXp2CNNKvXrrpxTLBmzVKy1IOBO0gBndAbeKx4av0PKprCw+tJ9wA7PCGJLbIka0
LmGGlPD55myE6+1Z8N5g9gBWp1SIxEpboUcOBGDgGrK6EDvFuN1dK1Y946qNptwIdGXel53Q1Rqz
mXDlPYkdM5N6RnxoI6BHWeYE+plLjwVnf8LR6HbyqTuGo0n3lz70Pn6Ao559HU7eHtd90Yaj/vWo
O+w3oHzFghmquf/t8++N5XdkYImbnS6TlM8NDF7XxU1T3+s10Y7ERzx7vRSaQklMoOr7vdo1Fbu9
eYzzBS0zYSt07Xbj9jqdrfo7AUvDENhxybCK//rKY61mKTNgwk0YWFUTC7PmJi3F6MB6W7hT3NNy
OngdOUIemQIc8zkwuWmHQZUEy3Nkqj6pNSwDW1AeE8GvVEDMJMwUrbVLTVGxSH2wh9adMHD6/1Fk
+c5LNBUqttF4Z2C2Ac2zXGx2KX7flwbVjy5DrgFXNv01qaXDsvltsd0Fklb1Krna/rjRKOYdJ4pb
sslxGYsiKUn7Kgx+eLEnDC6fjogx0zET9ZwIA79+Wn39NjqvBoRjjQlNgLZ42rgSuGq6rPeySvRN
ZHH+wZwfnNF06IfX3cr6Pzl0s96GUTc+7/frL3FbIqH3WK37/LzP7rn+e23Wor2ou25dtX7uh/fP
2mv+nL2K/26vlX/qqwf+eXLQP5/a3gH7fKzHi3lnX664ImlDjH0bK5yjQhnjnqZoLB5qjYRrVrtr
qydII5AsK1+Qq6Y0rZYXdWuIVTYtiFOMlxYyep6nAZdMiE35F2RfqQ/HQz0ZyivvzdbdQffXMSl9
vp50T8fE1hN9umHQGBWVhbvx4GbJgUFwYADoVj1popf0U+eo0BV4B1NSlsEOMGFI/RQTLaNlytSS
VlHBANiSweXV199cnF1+Z/lMaISmY/felDGdj0vFuLQF/w1QSwMEFAAAAAgA6rYpIv6JKhoBDAAA
YBIAAAwAAABNUFNNMk1TRy5FWEWtVw1MVGfWPvdn7lzuwEiLUos6DFFvV0etZZQqAxS1gC4KUyw/
QlGbttuabLUZ7kCb1mHMfPla5oK7TbObLmk3UgzJAtugZdsBujIwIH8lIG4WF9tNo7VeMrZroYG2
4sye984g2LrdfMk34bn3vec95znnvO95f9hXfBgEyIZl0MQ2nf6YgnTANsBKxHLEakQyYh/iIOJ/
EX9GfIT4GHERcQnxGeIG4htENIUciDhEKuIw4ijiOOJtRAOiEzGKmEZQNEAMYgMiFXEYcRThRLyF
aED8BTGImEBcR0whZhFziCUMgAGxA5GNOIA4grAjTiBqEH9ANCDOID5EdCD6EcOIzxBXENcRtxDA
AmgQyxBxiHjEOgSF47SCyoZoJhsuR2TDDCJSyAYTYv6nWb/pOZtN2LlntXWPdXVuNlAllLEW44L8
qmseoGqH6Ww4cQOoTgB9occI1s6neEMhauwCtdX5Bj48JrDWVmizwZXWyoN9S0gnDXXqbLwcK/GW
2FN8Jf/agxbuj3x5zD0M/b3OtAY0ZSYLmbr3eB13msd2NtNZrEXVBkL3JUaiftY+iwnVvomf57li
Cjo/jEAVDsN7xGutpZCsNqC5o1DCh41StGEZ75WYyfM06aJC9MWAkQQxkvMc6ry7YFysIQ+WPDjy
YKDzPvSjGtQm89lQn4cp5wFV/lDNOQjGhqkosNblwW5r7bCWhMyE2f9EvmJ+bL/IMJiUB57/gXk7
WGTnTCsBo33pHX6C2kdxQv3XfkoZCmn7z4TELg5pXoG4Vzn/n51pftaZKuks5u5SYomIvktEExGF
fp3oV8pYECzokEJoASspg1c5YoO98zWxSL5QHmps93JURBLs0GGCT0IfV4BLyZVWBICF474zYTit
tb9RLTD2Wj0ftv1RONQdt6eeXAjhVP6idsGiduHi8On/Ev7kmtuh2j43vyBCPivvoetP+rl18p/t
qm6UPuKtjaXCW0a+fMN1w2roLY+scbTEaueaU3JtdEvu229On070NvYWcK1xwwk1BS2x8XKO0Joz
nBDf4+AUI8jXSgcFYm0I68S35g4nkD4WSgdZsBlcfQYDF5/obQNqbur9mQvurlx5Nuf29OnGuXiz
t76V9xH/7Trq5EQ1tw3MXyn/1CmnQO7RxMAZ9qJSPcZ01wtQHwkMx0K9HuqXQ/1KqF8DJ1FdrKOh
3ohzuR7+DtX6DZixcG473RYDv53b1Ny6dTihalV1Bu3qY6/8y6CPb4+kPLB2OKE9hvKsJu/L4FlD
3izleQzf8Z4PeYPVYPU8Q+uteiWH1iv9tAcHcUGWjLI2esjsfafEeX3J/nffOeC8dtN5+6akT3eO
3Ax/S1T6e3vBZ/biWXHL1cMVua7Hn+j7PTjntpcxncFgYeuTwwnyDWdOLFVUcqD44KHSeO2IZxRQ
1c94+uFAiV+LBWceMF9WR+ZWfSLIXTqflFoXDTqv9PBJrxhqrTD5Kh6YvZQK0WXR7dEwe4XpsmlF
C8eDjRPrloL/gtxf7TMZtoHLH12l3wJVhiToMWyCai/SxeAMbIL6zVCfAp6jlN7K7R9Sh0CvrA/l
rVcS6LvHdK2hdxmOFBnSm3VbQMclgbSuYy+trIe6RFASoaOEVgxQlwRKOrQkK/mAWspW6DhMK1qi
0rp3OGGTWyt4JU7ZBrv8074zz2LPGUGhwc8mfjHzDbvZigxF7h6f1d2jUFBkPcOOKQoDRWuWsJtT
km00q3WPtnLDCT6gVySsXrNla9Kj27YnW1JS0x6z59mPSkdefM6IB+AxmxGMT0tG2BQlgPWYTTpy
7GiZcdexl16xHXn+Bcn4i2fWGR/Zvs28YXuicecx26+fPvqs2fs6lwJDrrQUPLmpoboUmHwpIH+b
dPJxWrTk05Xa15aKFo1tCX5wr/GVONYZbAU15BmAyd0BzzhM7gxogLZFmXrKImYvWbhksGHvIEyu
D7Sbx+RPDUk9lXxSbwU7Z/Y2eVrGmzxOaMJmU1NNhtRUjbKGiCZPNpG16WG6qS0XdGP2iObk/nLW
3X+Vb8ZxYxqvfIfLMn6QB/lT5BOS5CxWrMpg8c3hOxLfPL71Zi8+SUvAVdp+ZtzPt58d9zPtH4zj
ksVVKsoZdOqZcen+1LPjUlRqy7gU3YfZ/wr8a/K4Qr2yFooJRT49T9MRDcpekDixL4NuGScrvAX8
dAsVpjtxnEa25eSNhDzheh78y60dS0FZBkUYemTHSlAEWLDnCrlCMfggljKDRXhI6wsNESv25keK
8j5WlFe1PjacYIsm7jGYvgwer0JoiC0BwP/1In3zgPj6Pp5YpKOF1tQlMZ7nVOX/qESbvaF+tVte
5brFlnOtaaEe7AjVwVbxRCVmZt8kyhW8aKkQJJOB258n9hZijIcELTPBTM0FR01T1d0l2nixqoLX
ee28j+T/AvisT+QVcvsVM1WiPVR8oGiew/6xL8SeTtjPjtu3i3IuxlDJm0ZMF8pYZtA8xok9FZFM
oMU4N91oCmjFqko0rWTtEXlIeAVKtMVYHP2qoyMQptsdptuxiK4L6frNXgz65ITYcyiS
uTU3fdp0Sw02TBllzStA0hokPVhchPF752nJ5B7kPB0a85jydcAuiK7KODwzlZfULb45JUqKTImT
7rNM26dRyWeZliKaUwSJyjF7fZ5Rzbw9DeesUD2hFAUXKDaqFCGFkEwIJcEo96td3H4xeGhpuDp8
6tfy+S9yaKnK24h1aIYeIgljPoI9WukOEnn4W4oRg7goMHfRTZUOhaamJc7/repckAu4XzoY5cVA
iHFdeAzXqkaEQi5kibE7kxff2BG0/GDn0Eo5FCRBhsYpTBXpmeTkHE528HKBkKX89bbc1+PgTX27
G0sHOXW0luBo6Rot059PXdWgso+Mk2rKi25t4hdIgdGYRh0aq/LZbZwJSZDLCVmmsipAONooxh/V
RtF+vo2i/EwbFR5Az34tztDe2+6u0LzESStmeimJRZf3z/TSOEvGCh5n6Roq+vYQr/Kn1RO4FwlY
/FwSVgsWxckJ3Crm1I7wRtXc6O5P/ErtYcM9i0yak7vKaXfXgs6CdSTq8W7c0VGP0w1UkkiZb0xd
tph0YqkbOE6bByxd5Zzc5cfV1ij3qwT83e5Fd1TiV80iaMp48bwm6O6aGWW+z3L3hwNS7x7lwhzZ
Fze4RxNnyD5ETEyDtpU7spqn3rcvk/vkf8iDe6YbJL38nTwklwuZ/i/NXj+725TJxZfe8Yjhkm2g
WXSvRQfJn2BinwgDEoeZNdjp5J754EjuLVRjkjuLbcQTfj5cAQk4shXPZ8KR6PC/LNrl4Kjjmr5M
jgpfM3scAqfel+VMbjceskOBHoee7LhMEBUCYYVgOUeunXqlOaBXJgNhGa9XXg6Qi1fkInpwPOVy
8OAoOOHgg1CZe8LBBcFBXAZ/6pInLosCizyhjMnkrCFvaejt1ZC3kCBCdceru2hvJWseqIryQGpo
s49qoYMabH4wLtGtKc7jm0GKqMnfjBtocZXGo2Pbs9VrTEj5YXmVBx4fTpjpdnoOky65X56wL1XN
ccmbwGOZN8AD4ux4VcbSqvzYqn3Lq0rj+jJWOtm+DAN2q1u2ecw8gHT0zuGEjU5wTUAZa/biCTso
jxIvKK75nRPanBA6QMqwwsyXLZckoxNlcRKzyz8lXzSNtgWDYRZCR84EnzxyTgB5Qnf5lftmL89e
cl0GvJ7kYvFt3OEzj701O4N/zu7Nzh+SbYyzW5srvrFMHtVdtF81jfhICOaZq6WiM9UkafG50a7J
ydoj7cXmGmm36F7l9Cc7fULZ2pnzN+1J+y98fmEsz0qeBCWMryTmYklikPG5xiDryqh8STchLdHN
vKKdncBIJsA89TLl+96HjD8QrltPYwh+Y4jTpnP6H3D6uLIB/PiIJYS2vwVG7DOCL+vKhUUk36lb
5w2jnKmXC6JrHBCrVSKCBnk2Fq/1uNNwcmakpdtBy92WQXwOWrqO03LXXCMeqPwTcn+LcbrxwPTp
+Ds1iKWiLrmsqxGYptHOZF2ZVb4N2OirEfKIKUcgg0KWZVUUqaLOPDBo22idaeTCpNk7N93kg3v+
gkH4v/yi0wFO4XXEA0ADXvfu+v0bUEsBAhQAFAAAAAgAUnAuIkHivHw5BAAAEQwAAAcAAAAAAAAA
AQAgAAAAAAAAAElERS5ET0NQSwECFAAUAAAACADqtiki/okqGgEMAABgEgAADAAAAAAAAAAAACAA
AABeBAAATVBTTTJNU0cuRVhFUEsFBgAAAAACAAIAbwAAAIkQAAAAAE==




--- GoldED 2.50.A0531+


'MPASM Maths question'
1997\06\27@060646 by Philip Martin
flavicon
picon face
Hi all,

Question, Ive just got the Microchip Picstart unit c/w MPLAB and MPASM.
Reading through the documentation I notice that there are the maths
functions '*' and '/' listed for MPASM, ie a = a * b.

Does this mean that I can write code, for say a 16c84, in the assembler
and include these functions, or am I being too optimistic:-).

TIA,
--
Philip Martin   ----------------------------------------------------------------
Royal Quays             If at first you don't succeed, try again. Then quit:
North Shields.          no use being a damn fool about it !
                                                       W.C. Fields
email philipSTOPspamspamKILLspamphilmart.demon.co.uk


'MPASM syntax for FSR ?'
1997\07\30@223114 by Ravindra Divekar
picon face
I want to use the FSR register as a data pointer on 16C84.

i.e.
       if FSR = h'0c',

       movf    @fsr,w   ( correct syntax)

should load data in h'0c' into w.

What is the syntax for this in MPASM (using MPLAB) ?


Thanks!...Ravindra/.

1997\07\31@003637 by Mike Keitz

picon face
On Wed, 30 Jul 1997 19:26:29 -0700 Ravindra Divekar <@spam@ravindra.....spamspamHAL.COM>
writes:
>I want to use the FSR register as a data pointer on 16C84.
>
>i.e.
>        if FSR = h'0c',
>
>        movf    @fsr,w   ( correct syntax)
>
>should load data in h'0c' into w.
>
>What is the syntax for this in MPASM (using MPLAB) ?
Instead of '@FSR' use INDF.  INDF is a directly accessable special
function register that causes an indirect access.

In a 14-bit PIC like the 16C84, register 0 has a special function, it
always holds a copy of the data in the register pointed to by register 4.
(actually, register 0 doesn't exist, attempting to access it triggers
address substitution logic that uses the contents of register 4 as the
address instead)  Microchip calls register 4 "FSR" (File Select Register)
and register 0 "INDF" (INDirect File) and equates them as such in the
.inc file for the particular chip in use.  So to read register 0c into W
indirectly, use:

       movlw   h'0c'
       movwf   FSR             ;Point FSR at RAM 0c
       movfw   INDF            ;or "movf INDF,w" - Get byte
@FSR

-Mike

1997\07\31@005420 by Andrew Warren

face
flavicon
face
Ravindra Divekar <Ravindra Divekar <spamPICLIST.....spam.....MITVMA.MIT.EDU>> wrote:

> I want to use the FSR register as a data pointer on 16C84.
>
> i.e.
>         if FSR = h'0c',
>
>         movf    @fsr,w   ( correct syntax)
>
> should load data in h'0c' into w.
>
> What is the syntax for this in MPASM (using MPLAB) ?

Ravindra:

The FSR register is partnered with another "register" called INDF;
indirect register accesses through the FSR are performed on INDF.

Your example codes up like this:


   INDF    EQU     0
   FSR     EQU     4

   ....

           MOVLW   0x0C    ;Point the FSR at Register 0C.
           MOVWF   FSR     ;

           MOVF    INDF,W  ;Grab the contents of the register
                           ;to which FSR points, and put them in W.

Note that "INDF" is Microchip's name for the register; personally, I
call it "USEFSR"... Given your apparent preference for the "@fsr"
syntax, you might want to call it "ATFSR".

-Andy
=== Andrew Warren - fastfwd.....spamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499


'Mpasm ('DT" directive)'
1997\08\06@161858 by Mike Keitz
picon face
On Wed, 6 Aug 1997 14:27:08 +0200 David BALDWIN <KILLspambaldwinspam_OUTspamETCA.ALCATEL.BE>
writes:
>I can't have the DT 'Test' instruction assembled into:
>        retlw   'T'
>        retlw   'e'
>        retlw   's'
>        retlw   't'
>with Mpasm v1.30, any idea?

With version 1.50 (for Windows) in 16F84 mode, dt 'Test' is an error, but
dt "Test" (or DT "Test") works properly, generating 4 retlw instructions.

'New! MPLINK, MPLIB, MPASM tools from Microchip'
1997\08\08@164031 by Darrel Johansen

picon face
PICLISTers,

    Today Microchip is posting advance releases of the new MPASM
    relocatable assembler to the web site and to the Microchip BBS
    (v1.99.33).  This version works in two modes: the old way, which
    generates .HEX files directly, and the new way (signified by using
a
    "/o" on the command line) to generate relocatable object modules
for
    the linker.

    The advanced release of MPLINK is available separately (v0.00.02),
and
    documentation for it and the new MPASM are included as .PDF files,
    for viewing with Adobe Acrobat Reader.

    MPLIB (v0.00.20) is newly released as part of the MPLINK package
and it
    allows you to make reusable libraries.

    These are posted as beta versions on the "Tools" section of the
    Microchip web site.  Files are located at:
        http://www.microchip2.com/mplab.htm

    The programmers at Microchip hope that you will add this
reloacatable
    macro assembler, linker, and librarian to your suite of freely
    distributed Microchip Development System tools.  Any feedback can
be
    sent directly to me or to the webmaster.

    Darrel Johansen
    spam_OUTdarrel.johansenspamTakeThisOuTmicrochip.com

1997\08\08@223458 by Eric Smith

flavicon
face
Darrel,

I downloaded the new MPLINK.  When I ran it, it went through the nice Windows
setup stuff, but then it asked me to insert disk 2.  The web site only
seems to have Disk 1 of 1.  Am I doing something wrong?

Thanks,
Eric

1997\08\09@140904 by Darrel Johansen

picon face
Eric Smith wrote:
>
> Darrel,
>
> I downloaded the new MPLINK.  When I ran it, it went through the nice Windows
> setup stuff, but then it asked me to insert disk 2.  The web site only
> seems to have Disk 1 of 1.  Am I doing something wrong?
>
> Thanks,
> Eric

Sorry.  Looks like we didn't get both files zipped up into that one.  I
may be able to send it to you directly if you'd like.  Otherwise, we'll
get the right one up on the web page on Monday.

Darrel

1997\08\09@172939 by Dave Brobst

flavicon
face
At 02:09 AM 8/9/97 -0000, you wrote:
>Darrel,
>
>I downloaded the new MPLINK.  When I ran it, it went through the nice Windows
>setup stuff, but then it asked me to insert disk 2.  The web site only
>seems to have Disk 1 of 1.  Am I doing something wrong?
>
>Thanks,
>Eric
>

The same thing happend here. . . I downloaded the software twice.  Perhaps
there is something in the instructions I am missing . . .
David Brobst
Solutions Cubed
3029 Esplanade, Suite F
Chico, CA 95973
Phone:  (916)891-8045
Fax:    (916)891-1643

1997\08\12@115230 by Dave Mumert

flavicon
face
It appears the files currently on the web site are missing
a file called DISK02.
Just add any file and call it DISK02, it can even be a
blank file.  The install program needs this to identify and
confirm that disk 2 is in the drive.

I have installed both the linker and assembler but have not
had a chance to play with them yet.

Good Luck
Dave  Mumert
.....SDM.....spamRemoveMEsoftoptions.com



----------
> From: Darrel Johansen <spam_OUTdarreljTakeThisOuTspamEraseMEPRIMENET.COM>
> To:
> Subject: Re: New!    MPLINK, MPLIB, MPASM  tools from
Microchip
> Date: Saturday, August 09, 1997 11:11 AM
>
> Eric Smith wrote:
> >
> > Darrel,
> >
> > I downloaded the new MPLINK.  When I ran it, it went
through the nice Windows
> > setup stuff, but then it asked me to insert disk 2.
The web site only
> > seems to have Disk 1 of 1.  Am I doing something wrong?
> >
> > Thanks,
> > Eric
>
> Sorry.  Looks like we didn't get both files zipped up
into that one.  I
> may be able to send it to you directly if you'd like.
Otherwise, we'll
> get the right one up on the web page on Monday.
>
> Darrel
>

'"New! MPLINK, MPLIB, MPASM tools from Microchip"'
1997\08\12@185707 by .jaring.my, and/or

flavicon
I downloaded both files - Assembler & Link.
The installation for the assem. works because it's just simply unzipped.
But Mpasmwin doesn't. It keeps on saying invalid time and date when run.

The link- I tried exactly what Dave  Mumert have suggested.
Unfortunately, it didn't work as well!

TRY again.

Sam

'"New! MPLINK, MPLIB, MPASM tools from Microchip" -'
1997\08\13@021621 by Erik Klausen

flavicon
face
> I downloaded both files - Assembler & Link.
> The installation for the assem. works because it's just simply unzipped.
> But Mpasmwin doesn't. It keeps on saying invalid time and date when
> run.

This is because you don't use USA-format on the time and date. I had the
same error on a danish-configured Windows. Try changing the xcountry
code in Control Panel, International, to U.S.A.

This is, of cause, not a final solution, but it will get you started on testing
the new assembler. The error is registered at Microchip.

Erik Klausen

'mpasm question'
1997\08\13@103133 by Ooijen,Wouter van

picon face
Is it possible in MPASM to create a #define-macro which translates to
- multiple lines of 'code', among which
- a start-of-macro-definition (the "label MACRO parameter,..." type of
macro) line

I want to create
  #procedure(procname)
and
  #endproc
macros which (among other things) store the intervening lines as a macro
definition.

regards,
Wouter.

1997\08\13@185105 by Ravindra Divekar

picon face
yes it is easy:
the macros can even take parameters.

for e.g. the following macro simulates
an 8051 instruction (compare and jump if not equal)
the macro begins with a "macro" declaration and ends with
a "endm" statement. if the "reg" value is not equal
to the constant the program branches to "label".


cjne macro reg,constant,label
       movlw   constant
       subwf   reg,w
       btfss   status,zero
       goto    label

       endm



{Quote hidden}

1997\08\13@213953 by David Bramham

picon face
Thank you for the info , I will see how things pan out
Regards- David

At 03:22 PM 13/08/97 -0700, you wrote:
{Quote hidden}

1997\08\14@030706 by Ooijen,Wouter van

picon face
>yes it is easy:
>the macros can even take parameters.
>.....

That is not what I meant: I want a #define-style macro to translate to
mutiple lines,
one of which would be the beginning (or end) of a label-MACRO-args style
macro.

something like:

#define procedure(name) \
name macro

#define endproc(name) \
endm

> regards,
> Wouter.
>
>

1997\08\14@031957 by Andrew Warren

face
flavicon
face
Ooijen,Wouter van <Ooijen,Wouter van <EraseMEPICLISTspamBeGonespamKILLspamMITVMA.MIT.EDU>> wrote:

> I want a #define-style macro to translate to mutiple lines, one of
> which would be the beginning (or end) of a label-MACRO-args style
> macro.
>
> something like:
>
> #define procedure(name) \
> name macro
>
> #define endproc(name) \
>  endm

Wouter:

I'm not sure that I understand what you want... But if you just want
to type

   procedure (name)

and have MPASM translate it to

   name macro

then you can do it with the following #define:

   #define procedure(name) ((name) macro)

The corresponding #define for "endproc" is simply:

   #define endproc(name) (endm)

Depending upon the way you indent your "procedure" and "endproc"
invocations, you may need to add the following to the top of your
source file:

   LIST FIXED=0

I hope this helps... But, again, I really don't think I understood
your question.

-Andy

=== Andrew Warren - RemoveMEfastfwdspamBeGonespamspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

=== For PICLIST help (including "unsubscribe" instructions),
=== put the single word "help" in the body of a message and
=== send it to: @spam@listservspamspammitvma.mit.edu

1997\08\14@034902 by Ooijen,Wouter van

picon face
I tried andrew's suggestion:
  #define open(x) ((x) macro)
but that does not work (in mpasm V01.50 from MPLAB).
"open(a)" seems to be translated to "(a) macro" or "((a) macro)",
which is not accepted by mpasm as the start of a macro definition.

BTW, I can start a macro open (see below), but I can not end a macro
with close!
  #define open(name)name macro
  #define close endm
  ...
  open(my_macro)
  ; macro body
  close
Anyone understands why?

To rephrase the second part of my question: can a #define macro
translate
to multiple lines?

regards,
Wouter.

{Quote hidden}

1997\08\14@042430 by Andrew Warren

face
flavicon
face
Ooijen,Wouter van <Ooijen,Wouter van <.....PICLISTEraseMEspamMITVMA.MIT.EDU>> wrote:

> I tried andrew's suggestion:
>    #define open(x) ((x) macro)
> but that does not work (in mpasm V01.50 from MPLAB).
> "open(a)" seems to be translated to "(a) macro" or "((a) macro)",
> which is not accepted by mpasm as the start of a macro definition.

   Whoops... Sorry about that, Wouter; I wasn't thinking.

> BTW, I can start a macro open (see below), but I can not end a macro
> with close!
>    #define open(name)name macro
>    #define close endm
>    ...
>    open(my_macro)
>    ; macro body
>    close
> Anyone understands why?

   Yeah... Now that I've actually tried to do what I said you could
   do, I see that it's not possible; MPASM doesn't like anything to
   be #defined to "endm".

   Sorry for wasting your time.

> To rephrase the second part of my question: can a #define macro
> translate to multiple lines?

   No.

   -Andy

=== Andrew Warren - spamBeGonefastfwdspamRemoveMEix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

=== For PICLIST help (including "unsubscribe" instructions),
=== put the single word "help" in the body of a message and
=== send it to: .....listservEraseMEspammitvma.mit.edu

'two mpasm questions'
1997\08\18@104805 by Ooijen,Wouter van

picon face
two MPASM questions:

1. can I prevent "LIST" from appearing in my listing? I switch
nolist/list VERY often, so the LIST lines become a nuisance.

2. can I  "remove" a variable? I need a lot of temporaries, which value
is of no interest in the end. Those variables make the symbol table very
large.

regards,
Wouter.

1997\08\18@123045 by Andrew Warren

face
flavicon
face
Ooijen,Wouter van <spamPICLISTspam_OUTspam@spam@MITVMA.MIT.EDU> wrote:

> 1. can I prevent "LIST" from appearing in my listing? I switch
> nolist/list VERY often, so the LIST lines become a nuisance.

   Wouter:

   No, you can't keep the LIST line from printing, although this
   feature has already been requested and is in Microchip's
   "requested MPASM features" database.

> 2. can I  "remove" a variable? I need a lot of temporaries, which
> value is of no interest in the end. Those variables make the symbol
> table very large.

   The easiest way to keep the table from filling up with lots of
   temporary variables is, obviously, to use as few temporary
   variables as possible.

   MPASM makes this easy with the "SET" directive; SET works just
   like EQU, except that it allows its asociated symbol to be
   re-assigned a new value later in your source code.

   For example, this code won't work:

       TEMP    EQU     1       ;TEMP = 1 from this point forward.
       ....
       TEMP    EQU     2       ;This line causes an error; variables
                               ;defined with EQU can't be redefined.

   but this code will:

       TEMP    SET     1       ;TEMP = 1 from this point forward.
       ....
       TEMP    SET     2       ;This line works; TEMP = 2 from this
                               ;point forward.
       ....
       TEMP    SET     3       ;Now TEMP = 3.

       etc....

  -Andy

=== Andrew Warren - spamfastfwd@spam@spamSTOPspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

=== For PICLIST help (including "unsubscribe" instructions),
=== put the single word "help" in the body of a message and
=== send it to: spamBeGonelistservspamBeGonespam@spam@mitvma.mit.edu

'MPASM bug ?'
1997\08\20@072615 by Mark Dennehy

picon face
Hi all ...
I'm just starting out with the PIC chip so if this is a silly question,
scratch it up to the learning curve :)

I'm writing a small routine to test the serial line connection (232c
using a max232 and the usart on the 16c74a) but Mpasm keeps giving me
the 'incorrect bank' error message (#302). Here's the code chunk -
anyone know if this is my code or mpasm ?

;  Serial line test program
;

#include "p16c74a.inc"

#define ClkFreq  20000000
#define baud(X)  ((10*ClkFreq/(64*X))+5)/10 -1
#define TXSTA_INIT 0xA0
#define RCSTA_INIT 0x90

org 0

RESET call Setup_Async_Mode
 call Send_Serial_Data_Poll

org 032
Setup_Async_Mode
  bcf  STATUS,RP1
  bsf  STATUS,RP0
  movlw baud(9600)
  movwf SPBRG                ;MPASM gives error #302 here ...
  movlw TXSTA_INIT
  movwf TXSTA               ;... and here
  movlw RCSTA_INIT
  bcf  STATUS,RP0
  movwf RCSTA
  return

Send_Serial_Data_Poll
PollTxmt btfss PIR1,4
  goto PollTxmt
  movlw 'X'
  movwf TXREG
  goto Send_Serial_Data_Poll
END

--
Mark Dennehy, B.A., B.A.I.  Email : RemoveMEmdennehyRemoveMEspamRemoveMEtcd.ie
Research Student,
Computer Vision and Robotics Research Group,
Computer Science Dept., Trinity College Dublin

1997\08\20@080900 by Andrew Warren

face
flavicon
face
Mark Dennehy <PICLISTKILLspamspamspamMITVMA.MIT.EDU> wrote:

> I'm just starting out with the PIC chip so if this is a silly
> question, scratch it up to the learning curve :)

   It's not a silly question, Mark... It gets asked all the time.

{Quote hidden}

   Strictly speaking, the error's in your code... Although this
   section of your program will assemble correctly and work as you
   expect.

   Here's what's happening:

   SPBRG and TXSTA are, as you know, located on register-page 1;
   the PIC16C74A.INC file equates them to 0x99 and 0x98,
   respectively.

   The numbers 0x98 and 0x99 are 8 bits wide, but if you look at
   your PIC16C74 data shet, you'll see that the MOVWF instruction
   only has room for a SEVEN-bit register number.

   This, of course, is why you need to set the RP0 bit before
   accessing registers on page 1, and clear it before accessing
   registers on page 0; RP0 holds the eighth bit of the register
   number.

   Ok...

   When you write "MOVWF SPBRG" (or "MOVWF 0x99"), MPASM notices
   that you're trying to force an eight-bit register number into a
   space only large enough to hold seven bits, so it builds the
   instruction using only the low seven bits of the register number
   (0x19, in this case) and generates Warning #302 to inform you.

   Your code will assemble and work fine, since you really only WANT
   the "MOVWF" insruction to hold the low seven bits of the register
   number, but if you really want to do it RIGHT, you should change
   your "MOVWF SPBRG" and "MOVWF TXSTA" instructions to:

       MOVWF   SPBRG^080H      ; The "^080H" masks off the high bit
                               ; of the register number.

   and:

      MOVWF   TXSTA^080H      ; The "^080H" masks off the high bit
                              ; of the register number.


   Of course, you can also just turn off the warnings by putting an
   "ERRORLEVEL -302" line near the start of your program.

   -Andy

=== Andrew Warren - spam_OUTfastfwd@spam@spamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

=== For PICLIST help (including "unsubscribe" instructions),
=== put the single word "help" in the body of a message and
=== send it to: TakeThisOuTlistservspam_OUTspammitvma.mit.edu

1997\08\20@082325 by Fred Thompson

flavicon
face
       Check you .lst file.  It probably says something like:

Message[302]: Register in operand not in bank 0.  Ensure that bank bits
are correct.

       My program is full of these things and it gets to be a little
annoying.  If you check the code generated, you will probably see that it
made the right numbers.  It just spits out this warning to highlight
places where you could make a mistake (I saw in your listing that you did
not.
       If you get your serial I/O working, I would be VERY interested in
seeing your code.  I wrote an interrupt based routine that does not
receive.  For a complete listing of my code, see the archive.  You can
search by name (Fred Thompson), or by date (Wed 13 Aug, 1997).

Fred Thompson
KILLspamfthompso.....spamTakeThisOuTmail.win.org

1997\08\20@203818 by Darrel Johansen

picon face
Andrew Warren wrote:
>
> Mark Dennehy <TakeThisOuTPICLISTEraseMEspamRemoveMEMITVMA.MIT.EDU> wrote:
>
> > I'm just starting out with the PIC chip so if this is a silly
> > question, scratch it up to the learning curve :)
>
>     It's not a silly question, Mark... It gets asked all the time.
<snip>

Thanks, Andy, for clarifying this one.... again.    :-)

On this same topic, there is are two reasons for defining SFR's and
variables with values greater than 7 bits.
 1. You can use variable names while debugging MPLAB in the Modify
      window or in the Execute Opcode dialog.
 2. You can use the new MPASM directives described below.

In the latest beta version of MPASM (v1.99.xx) there are new
directives, one called BANKSEL.  Originally designed for use with the
Linker and relocatable code only, it also now works for
non-relocatable output code from MPASM.

This allows you to do the bank switching to access an SFR or
RAM variable without actually having to toggle the specific bank
bits (there's also BANKISEL for indirect addressing, and PAGESEL
for ROM paging).

When making relocatable code the addresses of RAM variable may not be
known until the Linker is invoked, there needs to be a way to set up
the proper RAM bank page.  This is done like this:
     banksel myvar
     movwf   myvar
       ...
The Linker will generate the proper bit-banging bank instructions for
the
processor currently set with the MPASM P directive...  So if you move
your code from a processor that has two RAM banks to one that has
four, or even if you move it from a 16C54 to a 16C84, the proper
banking code will be generated.

If you are not generating relocatable code (using the /o option with
MPASM), then MPASM will expand the BANKSEL directive to the proper
instructions.  You may want to use
     ERRORLEVEL -302
to suppress those MPASM messages that are distracting, or as Andy also
suggested, AND the operand to strip off the extra bits.

Darrel Johansen

'Masking the High Bit (was: "Re: MPASM bug ?")'
1997\08\21@041205 by Andrew Warren

face
flavicon
face
Darrel Johansen <spam_OUTPICLISTRemoveMEspam.....MITVMA.MIT.EDU> wrote:

> [a whole bunch of useful information on MPASM 1.99.xx's new
> bank-selecting directives, then...]
>
> You may want to use
>       ERRORLEVEL -302
> to suppress those MPASM messages that are distracting, or as Andy
> also suggested, AND the operand to strip off the extra bits.

Darrel:

Actually, I recommended XORing the operand with 0x80; I did NOT
recommend ANDing it with 0x7F.

It's a small distinction, but I think it's important... While both
methods will correctly clear the high bit from an operand that's in
the range [0x80-0xFF], only the XOR method will cause the assembler
to generate a warning if you accidentally try to mask the high bit
of a register in the [0x00-0x7F] range.

This behavior can be very helpful... For instance, say that you
do this:

   TEMP    EQU     0x90            ;TEMP is on register-page 1.

   ....

   BSF     STATUS,RP0              ;Switch to register-page 1.

   MOVF    0x7F&TEMP,W             ;Read TEMP, masking off the
                                   ;high-bit with an "AND".

   BCF     STATUS,RP0              ;Switch back to register-page 0.

Then you decide (for whatever reason) to move TEMP from register 0x90
to register 0x30, but forget to go through your code and remove the
now-incorrect "BSF STATUS,RP0"/"BCF STATUS,RP0" lines from around
your TEMP accesses.

What happens?  Well, the code no longer works... But MPASM still
assembles it with no errors!

Now... Let's say you used "0x80^" instead of "0x7F&".  If you wrote
your code assuming that TEMP was on one page, then moved TEMP to
another page and tried to re-assemble, MPASM would have generated a
Warning #302 every time it saw code that assumed that TEMP was still
on the original page.

The XOR method also checks for other errors... Like mistakenly
guessing that TXSTA is on page 0 and RCSTA is on page 1, etc.

-Andy

=== Andrew Warren - spamfastfwdKILLspamspamKILLspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

=== For PICLIST help (including "unsubscribe" instructions),
=== put the single word "help" in the body of a message and
=== send it to: spamlistservspam_OUTspammitvma.mit.edu

'MPASM bug ?'
1997\08\21@112524 by Lynn Richardson

flavicon
face
At 12:14 PM 8/20/97 +0100, you wrote:
{Quote hidden}

Message 302 is not an error message. It is a warning.  If you have
correctly set RP0, ignore it.  Or you can disable it by putting:

       ERRORLEVEL      -302

in the beginning of your source file.


---------------------------------------------------------------------------
Lynn Richardson - Design Eng.|WA0ZNL            |Progress Instruments, Inc.
DC - 1GHz, RX, TX 100W, PLL  |WA0ZNL.AMPR.ORG   |807 NW Commerce Drive
ASM 6805, 8051, Z8, PIC      |44.46.176.3       |Lee's Summit, MO 64086
C                            |spam_OUTlrichspamspamBeGoneproginst.com|P(816)524-4442 F 246-4556


'funny MPASM behaviour'
1997\09\09@141355 by oortje Hanneman & Wouter van Ooijen
picon face
I have this small and completely useless file,
which shows a strange MPASM behaviour I stumbled
upon while writing a generic RS232 receive macro.

       list p=16c84
wrong   macro
               error something wrong
       endm
test    macro
       local x,y
       if y - x != 1
               error strange #v(y) #v(x)
               wrong ; try to remove
       endif
x       nop
y
       endm
       test ; try to remove
       test
       end

When I assemble its I get

Error[101]   C:\USERS\DEFAULT\16C84\TRY.ASM 9 : ERROR: (strange 0 0)
Error[101]   C:\USERS\DEFAULT\16C84\TRY.ASM 4 : ERROR: (something wrong)

This is caused by the fact that in pass one all forward labels
have the value 0. Indeed the errors disappear when I change
the test to y - x != 1 && y - x != 0.

But when I remove either one "test" macro call,
or the "wrong" macro call both errors disappear!

Can someone explain this?

'MPASM bug?'
1997\09\10@165758 by oortje Hanneman & Wouter van Ooijen

picon face
(Sorry if this has reached PICLIST already, I posted it before but saw no
responses)

I have this small and completely useless file, which shows a strange MPASM
behaviour I stumbled upon while writing a generic RS232 receive macro.

       list p=16c84
wrong   macro
               error something wrong
       endm
test    macro
       local x,y
       if y - x != 1
               error strange #v(y) #v(x)
               wrong ; try to remove
       endif
x       nop
y
       endm
       test ; try to remove
       test
       end

When I assemble its I get

Error[101]   C:\USERS\DEFAULT\16C84\TRY.ASM 9 : ERROR: (strange 0 0)
Error[101]   C:\USERS\DEFAULT\16C84\TRY.ASM 4 : ERROR: (something wrong)

This is caused by the fact that in pass one all forward labels have the
value 0.
Indeed the errors disappear when I change the test to y - x != 1 && y - x != 0.

But when I remove either one "test" macro call, or the "wrong" macro
call both errors disappear! Is this an MPASM bug or can someone explain this?

'MPASM and Picstart Plus Problems'
1997\09\12@120613 by Dave Kingma

flavicon
face
Hello,

I am using the latest MPLAB 3.22.02 that I obtained off the Microchip
website. I am also using the Picstart Plus Development Programmer, Part
#10-00157. When I try and configure the programmer port within MPLAB,
I get an error message saying "Command [8D] not echoed properly [AB]."
Thus, I'm not able to talk to the programmer.  What is happening here?
I am running MPLAB on a Pentium Pro 200 with Windows NT 4.0 Workstation.
I have also tried it on a 486DX2-66 running Windows 95 with similar results
(although it did not report this message, it just couldn't find the
programmer).  Any suggestions?

Thanks,
Dave

1997\09\12@125231 by Thomas Magin

flavicon
face
At 11:50 12.09.1997 -0400, you wrote:
>Hello,
>
>I am using the latest MPLAB 3.22.02 that I obtained off the Microchip
>website. I am also using the Picstart Plus Development Programmer, Part
>#10-00157. When I try and configure the programmer port within MPLAB,
>I get an error message saying "Command [8D] not echoed properly [AB]."
>Thus, I'm not able to talk to the programmer.  What is happening here?
>I am running MPLAB on a Pentium Pro 200 with Windows NT 4.0 Workstation.

AFAIK MPLAB can not operate the Programmer if you are working under NT.
Thats an info from micrchip Germany. We asked because we figured out the
same problem.

Thomas
=8-)

**********************************************************
* Thomas Magin                  FON:   ++49-761-4543-489 *
* marquette-Hellige GmbH        FAX:                -507 *
* Emergency Systems             email: EraseMEmaginspamKILLspamhellige.de  *
* Munzinger Str. 3                                       *
* D-79111 Freiburg / Germany                             *
**********************************************************

1997\09\12@144735 by Dave Kingma

flavicon
face
At 06:39 PM 9/12/97 +0200, you wrote:
>AFAIK MPLAB can not operate the Programmer if you are working under NT.
>Thats an info from micrchip Germany. We asked because we figured out the
>same problem.

Thanks for the info Thomas!  I was on the phone with a Microchip distributor
FAE when I received your timely info.  A couple of hours later, the Microchip
technical support guy called me to let me know this as well.  Thanks again
for saving quite a few hours today!

Dave

1997\09\12@180316 by Matt Bonner

flavicon
face
Dave Kingma wrote:
> I am using the latest MPLAB 3.22.02 that I obtained off the Microchip
> website. I am also using the Picstart Plus Development Programmer, Part
> #10-00157. When I try and configure the programmer port within MPLAB,
> I get an error message saying "Command [8D] not echoed properly [AB]."
> Thus, I'm not able to talk to the programmer.  What is happening here?
> I am running MPLAB on a Pentium Pro 200 with Windows NT 4.0 Workstation.
> I have also tried it on a 486DX2-66 running Windows 95 with similar results
> (although it did not report this message, it just couldn't find the
> programmer).  Any suggestions?
I was just about to put out a similar question - maybe our problems are
related.  I've just added a secondary controller to my product - it's a
16c61 so I've had to migrate from my DOS PicStart to the Windows-based
PicStart Plus.  My test software works out of DOS so I have to move back
and forth between Win95 windows.  The problem: after I communicate over
COM1 with my project and then flip the comm port switch box, MPLAB can't
even find COM1 - my only recourse is to reboot my PC.  I've got MPLAB
v3.22.  I'm going to try the firmware upgrade for the PicStart Plus, but
I doubt that this will help since the problem seems to be a MPLAB and
Win95 issue.
--Matt

1997\09\12@180720 by Matt Bonner

flavicon
face
Dave Kingma wrote:
>
> At 06:39 PM 9/12/97 +0200, you wrote:
> >AFAIK MPLAB can not operate the Programmer if you are working under NT.
> >Thats an info from micrchip Germany. We asked because we figured out the
> >same problem.
>
> Thanks for the info Thomas!  I was on the phone with a Microchip distributor
> FAE when I received your timely info.  A couple of hours later, the Microchip
> technical support guy called me to let me know this as well.  Thanks again
> for saving quite a few hours today!
>
Did you figure out your other problem that was related to Windows95?
--Matt

1997\09\12@200054 by dporter

flavicon
face
We had a similar problem with our product software that uses an old
DOS-based APL interpreter.  A client solved it for us!  He was able to go
into settings and instead of taking the "default" address, he specified the
actual hardware address of the comm port.  Everything worked normally,
except that WinNT wouldn't let other processes have the port.

I admit it sounds wierd, but it was that simple.  Maybe it will work for
MPLAB too.

Good luck


----------
{Quote hidden}

1997\09\12@222718 by Dave Kingma

flavicon
face
At 04:03 PM 9/12/97 -0600, you wrote:
>Did you figure out your other problem that was related to Windows95?

Well, mysteriously when I went back to that machine where the program
did not work before and tried it again, it worked!  The only thing that
was different was that I was not logged onto our Novell network the
second time.  I didn't have time to see if that was what caused it.
Thanks to this list, I programmed the part and stayed on schedule today!
Thanks!!

Dave

1997\09\12@234406 by Mark Hellman

picon face
Here's some tips on using DOS based COM access with Windows.

1> When a DOS program needs a COM port, Windows gives ALL COM hardware to
the DOS session, UNLESS a Windows program already has a port OPEN. In that
case, DOS looses and gets none.

2> Once the COM hardware is allocated, it is not returned until either the
DOS session exits (not just the program!) if it has the hardware, or the
Windows program gives up the hardware.

3> Some Windows programs don't keep the port open all the time but keep a
handle on the port. They use the old handle to reopen the port. If the COM
ports have been given to DOS in the mean time, the handle is invalid. (I
think this is what happens)

4> Only one DOS session can have the hardware.

5> There may be a noticeable delay between freeing the hardware and it
becoming available again.

My work around: I only have one COM app open at any given time, it's a
pain, but it works for me. I set up the DOS apps on desktop shortcuts with
the session set to exit on program exit. I also wait a few secs between
apps.

Mark

{Original Message removed}

1997\09\14@021858 by arthur

flavicon
face
Dave Kingma wrote:
>
> Hello,
>
> I am using the latest MPLAB 3.22.02 that I obtained off the Microchip
> website. I am also using the Picstart Plus Development Programmer, Part
> #10-00157. When I try and configure the programmer port within MPLAB,
> I get an error message saying "Command [8D] not echoed properly [AB]."
> Thus, I'm not able to talk to the programmer.  What is happening here?
> I am running MPLAB on a Pentium Pro 200 with Windows NT 4.0 Workstation.

I have MPLAB 3.09.10 running on my NT 4.0 workstation with a PICStart
Plus. No later versions seem to run. I believe it even worked with my
old PICStart firmware, V1.01, and it works fine with the V1.20 firmware
upgrade. I got 3.09.10 from the 1996 Microchip CD. Might be worth a try,
even though it lacks the latest bells and whistles(and new chip
support).

Maybe Microchip could try going back to the comm routines used on 3.09
for a beta of 3.23!

Blessings!
--
Arthur Doerksen, P.Eng.
A.D.Comtronics & Engineering - 604-533-4933
20783 - 51 B Avenue, Langley, BC Canada  V3A 7T5
http://www.adcomtronics.com

"Amazing grace, how sweet the sound..."

1997\09\14@071706 by paulb

flavicon
face
Dave Kingma wrote:

> At 04:03 PM 9/12/97 -0600, you wrote:
> >Did you figure out your other problem that was related to Windows95?

> Well, mysteriously when I went back to that machine where the program
> did not work before and tried it again, it worked!  The only thing
> that was different was that I was not logged onto our Novell network
> the second time.  I didn't have time to see if that was what caused
> it. Thanks to this list, I programmed the part and stayed on schedule
> today! Thanks!!

> Dave

 Windoze95 makes the assumption that the network card is set to IRQ3,
notwithstanding the fact that this is reserved for COM2.

 Totally Insane, but true!  To what IRQ have you jumpered your network
card?

 Cheers,
       Paul B.

1997\09\14@110811 by arthur

flavicon
face
Dave Kingma wrote:
>
> Hello,
>
> I am using the latest MPLAB 3.22.02 that I obtained off the Microchip
> website. I am also using the Picstart Plus Development Programmer, Part
> #10-00157. When I try and configure the programmer port within MPLAB,
> I get an error message saying "Command [8D] not echoed properly [AB]."
> Thus, I'm not able to talk to the programmer.  What is happening here?
> I am running MPLAB on a Pentium Pro 200 with Windows NT 4.0 Workstation.
> I have also tried it on a 486DX2-66 running Windows 95 with similar results
> (although it did not report this message, it just couldn't find the
> programmer).  Any suggestions?

I have MPLAB 3.09.10 running on my NT 4.0 workstation with a PICStart
Plus. No later versions seem to run. I believe it even worked with my
old PICStart firmware, V1.01, and it works fine with the V1.20 firmware
upgrade. I got 3.09.10 from the 1996 Microchip CD. Might be worth a try,
even though it lacks the latest bells and whistles(and new chip
support).

Maybe Microchip could try going back to the comm routines used on 3.09
for a beta of 3.23!

Blessings!
--
Arthur Doerksen, P.Eng.
A.D.Comtronics & Engineering - 604-533-4933
20783 - 51 B Avenue, Langley, BC Canada  V3A 7T5
http://www.adcomtronics.com

"Amazing grace, how sweet the sound..."

'swopcode (Parallax/MPASM converter?)'
1997\09\27@181655 by Edward Lipson

picon face
I have been looking hard for a Microchip-to-Parallax cross-assembler.
If anyone knows of one that actually works, please e-mail me.
Here is my unsuccessful experience so far with a program that is supposed
to do the job.

This week, I called Parallax and they kindly sent me a zipfile
"swapcode.zip" containing
swopcode.exe and swopcode.dat.
When I run swopcode.exe without command line parameters, it announces
(among other things):
---------------------------------------------------------------------------
SWOPCODE.EXE converts MICROCHIP PIC series assembler files from MICROCHIP's
MPASM.EXE assembler format to PARALLAX's assembler format and vice versa.
Source file type must be .LST, default destination file type is .CVT

Syntax:  SWOPCODE <srcfile> [destfile] [options]

Options: /16Cxx or /17C42  - Processor type (default=16C54)
...etc.
---------------------------------------------------------------------------
Sounds perfect! Just what I need.
When you run it WITH parameters, including a *.LST file assembled with
MPASM ver. 1.5,
it states more about itself, and then aborts with an error message:
---------------------------------------------------------------------------
PIC series source file bidirectional translator Version 1.02
(C) 1995 Craig Webb, licensed to PARALLAX, INC. (916) 624-8333
Translates between Parallax PASM & PASMX assemblers and Microchip's MPASM v2.0


Subscript out of range in line No line number in module SWOPCODE at address
0B29
:792B
---------------------------------------------------------------------------
A minor point: I don't understand why this 1995 program refers to
"Microchip's
MPASM v2.0" when the current 1997 version is 1.5. The *.LST files start
with the line:
"MPASM 01.50 Released        (c)1993-97 Microchip Technology Inc./Byte
Craft Limi".

BTW, I tried deleting this first line ("MPASM v2.0 ...") from the *.LST
files I had tried.
Then swopcode seems to run and even produces an *.CVT file, BUT alas it
reports:
"Input file is neither Microchip's MPASM nor Parallax' assmebler .LST format.
Conversion aborted".

Does anyone know a) Craig Webb and/or his whereabouts, b) where there might
be a (MPASM 1.5 -) compatible version of swopcode or equivalent, or c) any
other way I can autoconvert Microchip code to Parallax? I want to do this
because I have many examples of Microchip code similar to my application,
which I want to produce in Parallax assembler (for now with PIC16C74,
involving ADC and serial i/o). (Since I am relatively new to PIC chips and
don't know the assembly languages very well yet, I'd like this shortcut to
get me moving  faster. FYI, the project involves interface devices for the
severely disabled; I have bought a Parallax programmer and a Clearview
Mathias emulator.)

Thanks for any advice.

Ed Lipson
.....edlipsonspamspam_OUTsyr.edu

1997\09\29@063259 by Tom Handley

picon face
re: Microchip to Parallax

  Ed, the Parallax assembler works with Microchip's syntax. There are a few
things you have to take into account. First download MPASM and read the docs
and the include file for the processor you are using. MPASM is a macro
assembler and is more powerful than Parallax but I prefer the Intel-syntax.
Still, I've had little trouble running MPASM source. Some things to
consider:

  In MPASM, the default radix is hex but this can be changed. Again, you
need to look at the docs, the processor and/or program include files, and
the equates. Some radix examples:

       MPASM           Parallax
       b'10101010'     10101010b       Binary
       0x5A            5Ah             Hex
       .16             16              Decimal

  I've seen examples which redefine STATUS register bits such as "CARRY"
and "Z_bit". Replace those with C, Z, etc, or define them.

  If you run across macros, you will have to `un-roll' them...

  Substitute MPASM device info with Parallax info. This needs to be the
first line of your source file (aside from comments).

  Pay attention to assembler directives. Some are different and MPASM has
more of them. Refer to the docs.

  Other than paying attention to the radix syntax, I really have'nt had a
problem using MPASM source in most of the code I've run across.

  - Tom

At 06:16 PM 9/27/97 -0400, Edward Lipson wrote:
[snip]
{Quote hidden}


'Why does MPASM not see PORTA definition?'
1997\10\03@155458 by Tony Vilches
flavicon
face
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

PORTA is defined in the .inc file (load when the LIST command is
executed) - so why does MPASM not recognise PORTA as a defined
register?

Cheers,
Antonio

Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

  ---- File information -----------
    File:  byte2led.asm
    Date:  3 Oct 1997, 20:44
    Size:  1094 bytes.
    Type:  Program-source

Content-type: Application/Octet-stream; name="byte2led.asm"; type=Program-source
Content-disposition: attachment; filename="byte2led.asm"

Attachment converted: wonderland:byte2led.asm (????/----) (0000814F)

1997\10\03@163224 by Lynn Richardson

flavicon
face
Add the following to cause the assembler to pass through the include file
and pick up the PORTA definition.


;On output, _High contains high byte and _Low contains low byte
;The required byte is in _Sample on entry. (Set to ff for testing)
;
;
       LIST   P=PIC16C84
       INCLUDE "P16C84.INC"
;
_Sample equ 0xff
Base equ 0x20           ;set memory base
;
-------------------------------------------


At 08:52 PM 10/3/97 +0000, Tony Vilches wrote:
{Quote hidden}

---------------------------------------------------------------------------
Lynn Richardson - Design Eng.|WA0ZNL            |Progress Instruments, Inc.
DC - 1GHz, RX, TX 100W, PLL  |WA0ZNL.AMPR.ORG   |807 NW Commerce Drive
ASM 6805, 8051, Z8, PIC      |44.46.176.3       |Lee's Summit, MO 64086
C                            |lrichTakeThisOuTspamKILLspamproginst.com|P(816)524-4442 F 246-4556

'MPASM 2.0 and DPMI?'
1997\10\22@101045 by Ed Todd

picon face
I am getting out of memory problems with MPASM.  I try to run MPASM_DP, but
get 'Runtime error 216 at 0001:3D4F'

I assume this is a DPMI problem.  I'm running Win/95 (OSR2), RTM.EXE and
DPMI16BI.OVL are on path, as per readme file.

Any ideas?


'A little quirk in MPASM for 12C5xx'
1997\11\08@230337 by myke predko
flavicon
face
Hi Folks,

I just wanted to update you on something I've found as I've been debugging a
12C508 application I'm working on with MPASM.

The instruction "return" does NOT return an error/warning/message but puts
in the code for "retlw 0".  This won't be a problem unless you are trying to
return a value in "w" (as I was).

So, this is something to watch out for when doing 12C5xx (and 16C5x?)
applications if data doesn't seem to be returned properly from a subroutine.

myke

Check out "Programming and Customizing the PIC Microcontroller" at:

http://www.myke.com

'MPASM macro question'
1997\11\23@193417 by Tom Dee

flavicon
face
My apologies if this question shows up twice.  My previous message
appears to have been lost.

I need to concatenate a string to an expanded macro parameter. For
example:

myMacro MACRO arg
  CONSTANT arg#?(Bar) = 99   ;#?() is some concatenation operator
  ENDM

  myMacro foo  ; this should define the constant "fooBar"

Does this capability exist in MPASM??

Thanks, Tom....

1997\11\24@073015 by ruben

flavicon
face
Hello Tom

The string concatenation is not supported in MPASM.

Too bad because it could be used to reduce a lot of
typing at the start of a project.

For every bit in a port or a register that hold bit information I
declare 2 symbols and 1 definition with similar names:

b_red_led   equ 0                   ;Bit 0
m_red_led   equ 1<<b_red_led        ;Mask value
#define f_red_led port_a,b_redled   ;Flag definition used for bsf/bcf

which could be replaced with a macro, something like:

bitdefs 0,port_a,red_led

which would reduce the source quite alot.

Someday I might just do my own preprocessor for this..


{Quote hidden}

------------------------------------
Ruben Jšnsson
AB Liros Elektronik
Box 9124
200 39 Malmš, Sweden
Tel:  +46 40 14 20 78
Mail: @spam@rubenSTOPspamspamsbbs.se
------------------------------------

1997\11\24@135709 by Tom Dee

flavicon
face
On Mon, 24 Nov 1997 13:16:56 +0000, you wrote:

>The string concatenation is not supported in MPASM.

Thanks, Ruben;

I was hoping that there was some undocumented trick.  I want do the
same sort of things that you do.

The pre-processor would be a nice thing to write when I get the time.
Maybe in another life.

Tom....

1997\11\24@191036 by Leon Heller

flavicon
picon face
In message <TakeThisOuT12200703900878TakeThisOuTspamRemoveMEsbbs.se>, =?iso-8859-1?q?Ruben_J=F6nsson?=
<spam_OUTrubenspamspam.....SBBS.SE> writes
{Quote hidden}

Rather than write a pre-processor, why not use the M4 macro-processor?
It is *very* powerful, and will do virtually anything you want. Here is
a very simple example that does string concatenation:

File test.m4
------------

define(`myMacro',`$1bar = 99')


File test.txt
-------------

myMacro(foo)

DOS command: m4 test.m4 test.txt

produces the output:

foobar = 99

In practise, the output would be written to a file using I/O re-
direction, or piped to an assembler or compiler.

Most of the features of a conventional programming language are
provided, including conditionals, loops and string manipulation.

GNU M4 (m4.exe) for DOS on 386/486 systems can be found in the Simtel
archive, amongst the DJGPP stuff (DOS port of gcc).

Leon
--
Leon Heller: spamBeGoneleonspamspam_OUTlfheller.demon.co.uk http://www.lfheller.demon.co.uk
Amateur Radio Callsign G1HSM    Tel: +44 (0) 118 947 1424
See http://www.lfheller.demon.co.uk/rcm.htm for details of a
low-cost reconfigurable computing module using the XC6216 FPGA

1997\11\25@195242 by Tom Dee

flavicon
face
>Rather than write a pre-processor, why not use the M4 macro-processor?
>It is *very* powerful, and will do virtually anything you want. Here is
>a very simple example that does string concatenation:
>
>Leon

I had completely forgotten about that old war horse.  I use to use it
to write cross assemblers back in my PDP-11 days.

Thanks for the idea, Leon.

Tom....


'MPASM preprocessor..'
1997\12\30@100721 by Janusz J. Mlodzianowski
flavicon
face
MPASM preprocessor ver. beta.

As I do not like the syntax of PIC mnemonics I have decided to write
up a simple MPASM preprocessor (mpp.exe (MSDOS)).
MPP accepts a a source file which consists of a mixture of Z80, i86 mnemonics
and C language and produces a text file which conforms to Microchip MPASM.

I have done only a limited testing of the preprocessor, but anyone is welcomed
to give it a try. Just let me know about bugs and your comments.

The file mpp.zip (24077 butes) is avialable at my web page:

http://www.bg.univ.gda.pl/~janusz, follow the "Software available" link.
:-)


'mpasm 2.01'
1998\01\04@114728 by Stephen H Alsop
flavicon
face
I use mplab 3.1 and assemble with its mpasm 2.01.

Instead of launching mplab I wanted to simply assemble
some code by launching mpasmwin.exe only, without the mplab
shell.

I select the code (which assembles fine under the mplab shell)
in the mpasm window (as I used to do before using mplab)
and select the options but when I click assemble I immediately
get 'Dos error: file not found' - it does not say what file has not been
found.  The previous mpasmwin.exe used to work fine on its own.
I have not got any include files, just the one simple bit of code.

If anyone knows what the file is (it nothing to do with source) which mpasmwin
says is missing then please let me know as there is nothing in the help files
about this error message.

Thanks

EraseMEsteve.....spams.ssystems.easynet.co.uk - http://easyweb.easynet.co.uk/~s.ssystems
Stephen H Alsop, S&S Systems Ltd, UK. Tel: 01909 773399, Fax: 01909 773645

'MEL PBasic Compiler & MPASM __CONFIG directive'
1998\01\19@125017 by Will Chapman

flavicon
face
I am looking into buying the MEL PBasic compiler.  From what I can tell,
it takes a pbasic text file and compiles it into a .HEX file.

My problem with this is: I use the ITU PIC-1+ programmer which supports
the __CONFIG directive in MPASM.  If I use the MEL PBasic Compiler, how
do I use and equivalent __CONFIG directive?

Would I:
1) Compile my PBasic code into a .HEX using the Pbasic Compiler.
2) Dissamble the .HEX file into .ASM with 3rd party software.
3) Edit the .ASM and add the __CONFIG directive line.
4) Use MPASM to re-compile it back into a HEX.

?????? Stumped in Seattle,

---Will Chapman
  Power-Brick Designs

'MPASM Error 115 ? [16C84]'
1998\01\29@212037 by Stephen Court

flavicon
face
I've been trying to compile someone elses code using the MPASM assembler v2.01 (Windows).  It has worked for them, but not me :(

I get the following error message:

Error[115] PIC03V10.ASM 79 : Duplicate label ("PK_ADDR" or redefining symbol that cannot be redefined)

It seems to be complaining about:
PK_ADDR         equ     RxBuf+0
PK_LEN          equ     RxBuf+1
PK_CMD          equ     RxBuf+2
PK_DATA1        equ     RxBuf+3
PK_DATA2        equ     RxBuf+4
PK_CHK          equ     RxBuf+5

RxBuf is being used as a 6byte buffer for serial input, previously defined with RxBuf res 6.  PK_ADDR is the first byte (file register) within the buffer, PK_LEN is the second etc.  If this method isn't allowed by MPASM, how do I directly access the individual bytes within the buffer ?

I've read that MPASM has become more stringent in its error checking, but I haven't found any reference to the error 115.
Any ideas ?

Stephen Court           spamscourtKILLspamspam@spam@electra.com.au
Electra International   http://www.electra.com.au
Automotive Electronics Diagnostic Equipment
Unit 2, 15 Anthony Street,              ph +61 7 3846 3393
West End, Brisbane              fax +61 7 3846 3282
Queensland 4101 Australia

1998\01\30@044651 by Morgan Olsson

picon face
At 12:09 1998-01-30 +1100, you wrote:
>I've been trying to compile someone elses code using the MPASM assembler
v2.01 (Windows).  It has worked for them, but not me :(
>
>I get the following error message:
>
>Error[115] PIC03V10.ASM 79 : Duplicate label ("PK_ADDR" or redefining
symbol that cannot be redefined)
>
>It seems to be complaining about:
>PK_ADDR         equ     RxBuf+0

Have you searched all files for PK_ADDR to see if it is defned somehow
somewhere else. Maybe one of the include files are different from "someone
elses" above?

Test: Make that line a remark
;PK_ADDR         equ     RxBuf+0
And compile again.
Then look in symbol list to see if it is defined anyway.
Hope this helps.
/Morgan
Morgan Olsson, MORGANS REGLERTEKNIK, Sweden, ph: +46 (0)414 70741; fax 70331
-

1998\01\30@202900 by Eric Naus

picon face
According to the manual a 115 error is "Duplicate label"

"A label was declared as a constant(eg with EQU or CBLOCK directive) in more
than one location"


Hope this helps


Eric Naus


{Original Message removed}

1998\01\31@093526 by Josef Hanzal

flavicon
face
Hi Stephen,

I have also encoutered this kind of error. The reason I believe is, that the
RES directive defines space in program memory, while the EQU directive tries
to use this symbol in data memory. Although not stated explicitly, MPASM
sorts the labels into classes (program, data, #defines, maybe others). Try
to change the RES directive into something like:
       CBLOCK
       RxBuf
       ENDC

       CBLOCK RxBuf+6
       Other variables
       ENDC

       EQUs go here

This cured my problems.

Regards,

Josef

>Error[115] PIC03V10.ASM 79 : Duplicate label ("PK_ADDR" or redefining
symbol that cannot be redefined)
>
>It seems to be complaining about:
>PK_ADDR         equ     RxBuf+0
>PK_LEN          equ     RxBuf+1
>PK_CMD          equ     RxBuf+2
>PK_DATA1        equ     RxBuf+3
>PK_DATA2        equ     RxBuf+4
>PK_CHK          equ     RxBuf+5
>
>RxBuf is being used as a 6byte buffer for serial input, previously defined
with RxBuf res 6.  PK_ADDR is the first byte (file register) within the
buffer, PK_LEN is the second etc.  If this method isn't allowed by MPASM,
how do I directly access the individual bytes within the buffer ?


'MPASM Win95'
1998\02\14@161510 by Ken Pergola
flavicon
face
Does anyone know if you can configure MPASM for Win95 not to
automatically exit after assembly?

It sure would be nice not to have to invoke it every time
you want to
assemble a source file.


Thanks,

Ken Pergola

'Problem with MPASM on 12C508'
1998\02\14@174310 by David Sprenkle

flavicon
face
I can't figure out if I don't know how to use MPASM correctly or there
is a bug in the MPASM program.  Here is what it is.

For the 12C508 processor.

Use any .asm code you want.

The GP3 pin indicates 1.  Change it to 0 with the windows>modify
window.  (I tried changing it with a stimulus file and got the same
problem.)

Try to step through the program.  It will stay at PC = FF and just xor
the working register.  Which indicates to me it is not turning over like
it should to zero.

David

1998\02\14@224813 by Michael S. Hagberg

flavicon
face
do you have this port configured as an input port? I believe that GP3 is
ONLY input.

michael


-----Original Message-----
From: David Sprenkle <sprenklespamspamTakeThisOuTBUSPROD.COM>
To: RemoveMEPICLISTRemoveMEspamMITVMA.MIT.EDU <TakeThisOuTPICLIST@spam@spam@spam@MITVMA.MIT.EDU>
Date: Saturday, February 14, 1998 4:44 PM
Subject: Problem with MPASM on 12C508


{Quote hidden}


'MPASM MACRO'
1998\04\06@194553 by Leonardo De Palo
flavicon
face
Ciao at all of you,

I'm 3 week old novice of PIC and have became an entusiastic of 16C84.
As a case study I have decided to buid a RPM bar LED indicator for the
motorcycle (like copy in progress indicator).
Up to now I have encountered the tipical problems of the new processor that
can be solved trying and testing, but now I have a sensation of frustration
and impotence.
Now I'm in trouble because I need to compose a routine like "case"  or the
tipical;

"  IF   TMR0  >= 196 GOTO AnyLabel  ELSE GOTO OtherLabel".

From my local MICROCHIP distributor I have obtained the last CD ROM "1997
TECHNICAL LIBRARY SECOND EDITION", and I have printed out the 156 pages of
"MPASM USER'S GUIDE" and under chapter 6, on page 75 I have found all
instruction that seems very useful for me. (multiply, divide, less than,
etc), but no words about the use of it. (Probably my bad english contribute
in missing understanding).

Looking on all routine that i have the opportunity to see, no macro one use
of this operators. Why?

I would like understand how build a macro using the aritmetic operators. I
think this list shoul be the better place to discuss about this argument.

Can someone illuminate my darkness.

Thank in advance at all of you

Saluti

TakeThisOuTleo.depalospamspamtelesys.it

1998\04\06@203922 by Andrew Warren

face
flavicon
face
Leonardo De Palo <KILLspamPICLISTKILLspamspamspamBeGoneMITVMA.MIT.EDU> wrote:

> I need to compose a routine like "case"  or the tipical;
>
>  "  IF   TMR0  >= 196 GOTO AnyLabel  ELSE GOTO OtherLabel".

Leonardo:

   MOVLW   196
   SUBWF   TMR0,W
   BC      AnyLabel
   GOTO    OtherLabel

-Andy

=== Andrew Warren - spamBeGonefastfwdKILLspamspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

1998\04\06@204124 by Regulus Berdin

flavicon
face
>  "  IF   TMR0  >= 196 GOTO AnyLabel  ELSE GOTO OtherLabel".

       MOVLW   196
       SUBWF   TMR0,W
       BTFSC   STATUS,0
       GOTO    ANYLABEL
       GOTO    OTHERLABEL

Reggie

1998\04\11@201508 by Regulus Berdin

flavicon
face
Hi Leonardo

>Question one:
>
>For easily the example I have change the TMR0 in  Count
>I do not  have fully understand the meaning of the instructions
>
>SUBWF   COUNT,W
>BTFSC   STATUS,0
>
>first assumption:
>assuming that the current value of Count is 200
>subtract from Count  the value of 196
>The result is 4 and is stored back to Count
>the carry should be on  (is correct?)

Yes CARRY is on.
It is only CLEARED when there is a BORROW.
The result 4 is stored in W,not in COUNT.

To store in COUNT if the command is:
SUBWF    COUNT,F    ;note the F at the end, meaning result is
                                 ;stored in the File register or COUNT.

>Second assumption:
>assuming that the current value of Count is 196
>subtract from Count  the value of 196
>The result is 0 and is stored back to Count
>the carry should be on (is correct?)
As before, result is stored in W and CARRY on.

>Third assumption:
>assuming that the current value of Count is 190
>subtract from Count  the value of 196
>The result is 249 (is correct?) and is stored back to Count
>the carry should be off (is correct?)

The result is 250 or 0xFA and stored in W not if COUNT.
CARRY is OFF (correct).

Subtraction works like this:
190 - 196 = 190 + 2'scomplement (196)
190 + 60  = 250        ; Note no overflow/carry

2's complement is done by negating and then add 1.
196  = 0xC4 = 0b11000100
negating: 0b11000100 -> 0b00111011 = 0x3B = 59
add 1    : 59 + 1 = 60

>Looking at the manual  DS30430B on page 15 fig. 4-5, bit 0 is set ADDWF and
>ADDLW and for me is not clear (probably for my bad english).
>Could you please explain.
Sorry I don't have the manual at this moment, but what register for bit 0
are you refering?

{Quote hidden}

I'll try (untested):
COUNT < 240,    RB1
COUNT <144,    RB1,RB2
   .
   .
   .
COUNT <20,    ....

-----
START:
       CLRF    LIGHTS1
       CLRF    LIGHTS2

       MOVLW    240
       SUBWF    COUNT,W
       BTFSC      STATUS,0
         GOTO     LAST
       BSF          STATUS,0
       RLC          LIGHTS1

       MOVLW    144
       SUBWF    COUNT,W
       BTFSC      STATUS,0
         GOTO     LAST
       BSF          STATUS,0
       RLC          LIGHTS1

       MOVLW    105
       SUBWF    COUNT,W
       BTFSC      STATUS,0
         GOTO     LAST
       BSF          STATUS,0
       RLC          LIGHTS1

           .
           .
           .

       MOVLW    36
       SUBWF    COUNT,W
       BTFSC      STATUS,0
         GOTO     LAST
       BSF          STATUS,0
       RLC          LIGHTS1

       MOVLW    28
       SUBWF    COUNT,W
       BTFSC      STATUS,0
         GOTO     LAST
       BSF          STATUS,0
       RLC          LIGHTS1
       RLC          LIGHTS2

       MOVLW    20
       SUBWF    COUNT,W
       BTFSC      STATUS,0
         GOTO     LAST
       BSF          STATUS,0
       RLC          LIGHTS1
       RLC          LIGHTS2

LAST:
       RLC           LIGHTS1
       RLC           LIGHTS2

       MOVF        LIGHTS1,W
       MOVWF     PORTB
       MOVF        LIGHTS2,W
       MOVWF     PORTA


Reggie

'Bar Graph (was: "Re: MPASM MACRO")'
1998\04\11@222408 by Andrew Warren

face
flavicon
face
Leonardo wrote:

> Referring to the RPM pulse meter, I would like build a LED BAR METER like
> ....
> Count= 20 (RPM=10000) bits set: RB1,RB2,RB3,RB4,RB5,RB6,RB7,RA0,RA1,RA2
> Count= 28 (RPM= 9000) bits set: RB1,RB2,RB3,RB4,RB5,RB6,RB7,RA0,RA1
> Count= 36 (RPM= 8000) bits set: RB1,RB2,RB3,RB4,RB5,RB6,RB7,RA0
> Count= 44 (RPM= 7000) bits set: RB1,RB2,RB3,RB4,RB5,RB6,RB7
> Count= 54 (RPM= 6000) bits set: RB1,RB2,RB3,RB4,RB5,RB6
> Count= 66 (RPM= 5000) bits set: RB1,RB2,RB3,RB4,RB5
> Count= 72 (RPM= 4000) bits set: RB1,RB2,RB3,RB4
> Count=105 (RPM= 3000) bits set: RB1,RB2,RB3
> Count=144 (RPM= 2000) bits set: RB1,RB2
> Count=240 (RPM= 1000) bits set: RB1

Leonardo:

You may want to check your calculations; if 1000 RPM produces a
count of 240, 2000 RPM should produce 120, not 144.  What's the
resolution of your counter (i.e., how many microseconds are required
for one count)?

Anyway... This routine requires 44 instructions.  You could shrink
it to 30 or so by using a subroutine; I probably wouldn't bother.

Note that if you call this routine too often (like more than 2000
times per second), you may get some flicker on the LEDs.  It's best,
therefore, to call this routine no more frequently than once every
10 milliseconds.

       MOVLW   00000111B
       IORWF   PORTA
       MOVLW   11111110B
       IORWF   PORTB

       MOVLW   240-1
       SUBWF   COUNT,W
       SKPNC
       BCF     PORTB,1

       MOVLW   144-1
       SUBWF   COUNT,W
       SKPNC
       BCF     PORTB,2

       MOVLW   105-1
       SUBWF   COUNT
       SKPNC
       BCF     PORTB,3

       MOVLW   72-1
       SUBWF   COUNT,W
       SKPNC
       BCF     PORTB,4

       MOVLW   66-1
       SUBWF   COUNT,W
       SKPNC
       BCF     PORTB,5

       MOVLW   54-1
       SUBWF   COUNT
       SKPNC
       BCF     PORTB,6

       MOVLW   44-1
       SUBWF   COUNT
       SKPNC
       BCF     PORTB,7

       MOVLW   36-1
       SUBWF   COUNT,W
       SKPNC
       BCF     PORTA,0

       MOVLW   28-1
       SUBWF   COUNT,W
       SKPNC
       BCF     PORTA,1

       MOVLW   20-1
       SUBWF   COUNT
       SKPNC
       BCF     PORTA,2

-Andy

=== Andrew Warren - fastfwd@spam@spamKILLspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499


'Help with MPASM error'
1998\05\22@080226 by Mark Jurras
picon face
This used to work, then all of a sudden I get this error message when
I compile the Macro T1.INC with MPLAB 3.31 and 3.40 X is declared
local and USECS is Passed. The Macro is invoked twice.

Here are lines 4,8,12 and 48 respectivly:

       IF ((USECS) > 1024)
       IF ((USECS) < 0)
X = (USECS)%8
X = (USECS)/8

Here is the error:

Command line: "D:\PROGRA~1\MPLAB\MPASM.EXE /aINHX8M /e+ /l+ /x- /w0
/c+ /m+ /rhex /p16C62A /q M:\HOME\TCIR.ASM"
Warning[217] M:\HOME\JURRAM\PROJECTS\IRDATA\TCIR.ASM 3 : Hex file
format specified on command line.
Message[308] M:\HOME\TCIR.ASM 10 : Warning level superceded by command
line value. (0)
Error[112]   M:\HOME\T1.INC 4 : Missing operator
Error[112]   M:\HOME\T1.INC 8 : Missing operator
Error[112]   M:\HOME\T1.INC 12 : Missing operator
Error[112]   M:\HOME\T1.INC 48 : Missing operator
Error[112]   M:\HOME\T1.INC 4 : Missing operator
Error[112]   M:\HOME\T1.INC 8 : Missing operator
Error[112]   M:\HOME\T1.INC 12 : Missing operator
Error[112]   M:\HOME\T1.INC 48 : Missing operator
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

'MPASM 3.40, Symbols inTrace Window'
1998\05\24@191218 by jgmarcos

flavicon
face
Hi,

I'm using the MPASM 3.40 IDE.
The assambler defined to build the project is MPASM.EXE.
The crosref file generation flag is set to ON
After run the simulation, the code captured in the Trace Memory Window
shows all the labels and the special CPU register as text ( W, STATUS,
PCL...),
but all the RAM variables are shown as the hex address instead of the
defined name (I've tried with cblock, equ and set directives).
The symbol list Window contains all the Variables and Labels defined OK.

Please, could someone let me know if it is a 'natural limitation' of
MPSIM or the way to get the RAM variables as text instead of hex numbers
?
Thanks in advance

Javier

1998\05\24@214331 by Andrew Warren

face
flavicon
face
Javier Gonzalez Marcos <EraseMEjgmarcosRemoveMEspam@spam@comadrid.es> wrote:

> I'm using the MPASM 3.40 IDE.
> ....
> After run the simulation, the code captured in the Trace Memory
> Window shows all the labels and the special CPU register as text (
> W, STATUS, PCL...), but all the RAM variables are shown as the hex
> address instead of the defined name
> ....
> is [this] a 'natural limitation' of MPSIM?

Javier:

Yes, it's a natural limitation in MPLAB 3.40.  Microchip will
improve the behavior of the "Trace" window in future versions.

-Andy

=== Andrew Warren - RemoveMEfastfwdspamspamEraseMEix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499 (personal)
=== http://www.netcom.com/~fastfwd (business)


'WHAT'S WRONG? - MPASM WITH 17C756'
1998\07\01@141807 by WF AUTOMACAO
flavicon
face
Hi, :(

       I don't believe what's happening with a program that i try to execute a
program in 2
external EEPROM connected in a PIC17C756 (MICROPROCESSOR MODE)

       The first works well! I wrote 0 and 1 on PORTB, i measure in osciloscope
a square wave!


                   00425
                   00426
                   00427         LIST P=17C756
                   00428
;--------------------------------------------------------------------------
                   00429 ; Program Code
                   00430
;--------------------------------------------------------------------------
                   00431
;--------------------------------------------------------------------------
                   00432 ;   Set the reset vector here.  If you are using a PIC
16C5X device,
use:
                   00433 ;               ORG     &lt;last program memory locati
on&gt;
                   00434 ;   Otherwise, use:
                   00435 ;               ORG     0
                   00436
;--------------------------------------------------------------------------
                   00437
0000                00438                 ORG     0
0000 C001           00439                 GOTO    Start
                   00440
0001                00441 Start
0001 B800           00442                  MOVLB  BANK0 ;select bank1
0002 B000           00443                  MOVLW  0x00
0003 0111           00444                  MOVWF  DDRB  ; portb as output
                   00445
0004                00446 Loop
                   00447
0004 B000           00448                 MOVLW  0x00
0005 0112           00449                 MOVWF  PORTB ; Flip-Flop
0006 B0FF           00450                 MOVLW  0xFF
0007 0112           00451                 MOVWF  PORTB ; Flip-Flop
0008 C004           00452                 goto Loop    ; stay in LOOP
                   00453
                   00454
                   00455                 END

But, when i do a small change on Software, nothing happens, the osciloscope show
s anything!


                   00437
0000                00438                 ORG     0
0000 C001           00439                 GOTO    Start
                   00440
0001                00441 Start
0001 B800           00442                  MOVLB  BANK0 ;select bank1
0002 B000           00443                  MOVLW  0x00
0003 0111           00444                  MOVWF  DDRB  ; portb as output
                   00445
0004                00446 Loop
0004 B706           00447                  lcall Sub     ; call a FLIP-FLOP subr
outine
0005 C004           00448                  goto Loop    ; stay in LOOP
0006                00449 Sub
                   00450
0006 B000           00451                 MOVLW  0x00
0007 0112           00452                 MOVWF  PORTB ; Flip-Flop
0008 B0FF           00453                 MOVLW  0xFF
0009 0112           00454                 MOVWF  PORTB ; Flip-Flop
000A 0002           00455                 RETURN
                   00456
                   00457                 END

What am i doing wrong? Wait for other BIG question! (Now in MPLAB17-C)

My mpab is 01.50, but i think that's not the problem! (BUG)

Miguel Wisintainer

1998\07\01@163501 by Mike Keitz

picon face
On Wed, 1 Jul 1998 15:14:41 -0700 WF AUTOMACAO <STOPspamwf.....spamAMBIENTE.COM.BR>
writes:
>Hi, :(
>
>        I don't believe what's happening with a program that i try to
>execute a program in 2
>external EEPROM connected in a PIC17C756 (MICROPROCESSOR MODE)

What is your PIC clock rate?  It is quite possible that the PIC is
running too fast for the EEPROMs to supply the proper program
instructions to it.

The timing diagrams in the back of the PIC data say that the time between
when the PIC outputs a valid address and the memory must provide the
correct data is 3 xtal cycles - 30 ns.  At 25 MHz, that is only 90 ns.
The delay through the address latch must also be accounted for, maybe 20
ns.  So the memory must have an access time of 70 ns or less.

Parallel EEPROMs are rather slow to read compared to RAM or EPROM.  Newer
Microchip 28C64s are spec'd at 150 ns.  Other ones may be 200 or even 450
ns.  None of these chips will work with the PIC going 25 MHz, or even 16
MHz.  Not allowing enough access time can cause the chips to read wrong,
though often consistent, data.  This would explain one program working
and another not.

For a test, slow the PIC way down and see if the programs operate
properly.  With a 4 MHz crystal, the memories have about 700 ns to
respond, which should be plenty.

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\07\01@165717 by WF AUTOMACAO

flavicon
face
Mike Keitz wrote:
{Quote hidden}

Myke, i don't know if you understood what i did!

THe first sample works well!

But the second, where i did include a Subroutine for change the State of
PORTB, doesn't work!

I only included a Subroutine, nothing more! :(

Miguel

1998\07\01@193749 by Mike Keitz

picon face
On Wed, 1 Jul 1998 17:52:48 -0700 WF AUTOMACAO <@spam@wfspamBeGonespamAMBIENTE.COM.BR>
writes:

>THe first sample works well!
>
>But the second, where i did include a Subroutine for change the State
>of
>PORTB, doesn't work!

If you exceed the speed ratings of the memory chips, they may read one
program OK but fail on another.  Not every bit in a memory chip works at
the same speed.  The manufacturer's rating is just a guaranteed maximum
for the worst bit.  If you happen to have a program only in  fast bits,
it will work OK, but expanding the program into a slow section of the
chip won't.  Bits can also be such that zeros will read at a high speed,
but it takes longer to read a one (or vice versa).  Changing the program
so such a bit that was zero is now one will make it fail.  So it is
something to check.  If you are running the PIC faster than 4 MHz it is
quite possible to have a speed related problem.


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\07\02@104253 by AA9LA

flavicon
face
Miguel,

The LCALL instruction loads the high order 8 bits of the called address from
PCLATH.

You need to be sure it is set to High Sub.  It appears that PCLATH
coincidentally is
set to zero so this should be working as expected (if you are executing this
code
exactly).

The CALL instruction would be more appropriate.

..EUGENE..  (AE2F - "Always Easy To Find")

------------------------------

Date:    Wed, 1 Jul 1998 15:14:41 -0700
From:    WF AUTOMACAO <spam_OUTwfspamspamAMBIENTE.COM.BR>
Subject: WHAT'S WRONG? - MPASM WITH 17C756

Hi, :(

       I don't believe what's happening with a program that i try to
execute a program in 2
external EEPROM connected in a PIC17C756 (MICROPROCESSOR MODE)

       The first works well! I wrote 0 and 1 on PORTB, i measure in
osciloscope a square wave!


                   00425
                   00426
                   00427         LIST P=17C756
                   00428
;--------------------------------------------------------------------------
                   00429 ; Program Code
                   00430
;--------------------------------------------------------------------------
                   00431
;--------------------------------------------------------------------------
                   00432 ;   Set the reset vector here.  If you are using a
PIC16C5X device,
use:
                   00433 ;               ORG     &lt;last program memory
location&gt;
                   00434 ;   Otherwise, use:
                   00435 ;               ORG     0
                   00436
;--------------------------------------------------------------------------
                   00437
0000                00438                 ORG     0
0000 C001           00439                 GOTO    Start
                   00440
0001                00441 Start
0001 B800           00442                  MOVLB  BANK0 ;select bank1
0002 B000           00443                  MOVLW  0x00
0003 0111           00444                  MOVWF  DDRB  ; portb as output
                   00445
0004                00446 Loop
                   00447
0004 B000           00448                 MOVLW  0x00
0005 0112           00449                 MOVWF  PORTB ; Flip-Flop
0006 B0FF           00450                 MOVLW  0xFF
0007 0112           00451                 MOVWF  PORTB ; Flip-Flop
0008 C004           00452                 goto Loop    ; stay in LOOP
                   00453
                   00454
                   00455                 END

But, when i do a small change on Software, nothing happens, the osciloscope
shows anything!


                   00437
0000                00438                 ORG     0
0000 C001           00439                 GOTO    Start
                   00440
0001                00441 Start
0001 B800           00442                  MOVLB  BANK0 ;select bank1
0002 B000           00443                  MOVLW  0x00
0003 0111           00444                  MOVWF  DDRB  ; portb as output
                   00445
0004                00446 Loop
0004 B706           00447                  lcall Sub     ; call a FLIP-FLOP
subroutine
0005 C004           00448                  goto Loop    ; stay in LOOP
0006                00449 Sub
                   00450
0006 B000           00451                 MOVLW  0x00
0007 0112           00452                 MOVWF  PORTB ; Flip-Flop
0008 B0FF           00453                 MOVLW  0xFF
0009 0112           00454                 MOVWF  PORTB ; Flip-Flop
000A 0002           00455                 RETURN
                   00456
                   00457                 END

What am i doing wrong? Wait for other BIG question! (Now in MPLAB17-C)

My mpab is 01.50, but i think that's not the problem! (BUG)

Miguel Wisintainer

------------------------------

'Parallax to MPASM opcode conversion'
1998\07\27@133722 by NCS Products

flavicon
face
Are there any programs out there which can take a
parallax format opcode .asm file and turn it to standard
microchip opcodes?

1998\07\27@140433 by John Bellini

flavicon
face
I had to this before manually and it wasn't too bad.  However, the next
time I have to do this I will write macro's for all of the Parallax
instructions in Microchip.  This is handy too because Parallax has a lot
of good instructions that are useful.

-----Original Message-----
From: NCS Products [spamncsspamspamspamWORLDNET.ATT.NET]
Sent: Sunday, July 26, 1998 9:56 PM
To: spamBeGonePICLISTKILLspamspamKILLspamMITVMA.MIT.EDU
Subject: Parallax to MPASM opcode conversion


Are there any programs out there which can take a
parallax format opcode .asm file and turn it to standard
microchip opcodes?

1998\07\29@043209 by Tom Handley

picon face
  Well... I have some beta software that was loaned to me but I can't go
into details. I have not had time to thoroughly test it. There are more
issues than simply writing macros. One that comes to mind is how the
Parallax (CVASM) assembler handles LCALL/LSET. This has to be done at
assembly time or through a converter. LCALL/LSET allows me to call any
routine, in any bank, without worrying about PCLATH. Other issues are
assembly directives, comments, etc, in the converted code. Obviously the
best qualified folks to write a converter are those intimately familiar with
the assembler (ie: Chip, John, and now, Tech Tools). Chip and John have
their `paws full' with SX. I'm not sure about Tech Tools but their CVASM
update is probably a low priority compared to their other products.

  I really would like a converter but I realize how hard it would be to
implement one. The main reason I rarely post code here is due to the fact
that I prefer the Parallax instruction set. I also know Microchip's but I
don't have time to manually convert from one to the other. I'm sure you
already know this but you can easily generate object files compatible with
other programmers and tools (/S Option) and you can use Microchip syntax
with few if any modifications.

  Just thinking about my comment; "The main reason I rarely post code...".
Actually, it's more related to our resident experts such as Andy W, Scott,
Dimitry, and many others. Anything I would post, other than Parallax-
specific, would seem rather silly ;-)

  - Tom

At 12:55 AM 7/27/98 -0400, you wrote:
>Are there any programs out there which can take a
>parallax format opcode .asm file and turn it to standard
>microchip opcodes?
>
>


'What«s mpasm ? What«s mplink ?'
1998\08\28@185128 by Ricardo Ponte G
flavicon
face
       Hi,

       I«m using the mplab IDE software runing under Windows 95.

       But I was thinking:

       If I only would have DOS I got to make the job different:

       What«s mplab function ? , doing the hard work of creating the Hex. fil
e ?

       What«s mplink function ?, linking the  " *.inc " files used in the sou
rce
file ?

       please Can you clear my teory ?, thanks.

1998\08\28@195601 by Darrel Johansen

picon face
>What's mplab function ? , doing the hard work of creating the Hex. file
>What's mplink function ?, linking the  " *.inc " files used in the source
>file ?

    MPASM is the assembler.  It can create the .HEX file from your source
    code using .ASM source files and .INC header files.  The .INC header
    files are the names and addreses of the PICmicro registers.

    If you download the MPASM User's Guide, you can use it from DOS
    without MPLAB.  There are some examples of its use in this manual.

    You do not need to use MPLINK, but you can see and example of how to
    use it if you download the MPLAB v3.40 Project Manager tutorial from
    the web page.

    Darrel


'MPASM Macro's and Labels'
1998\09\01@195301 by Quentin
flavicon
face
How can I use a macro that has a Goto....Label in it more than once in my
program?
IE:
       macro
       .
Test    .
       .
       GOTO Test
       endm

If I use this macro more than once in my program, I get an error about the
use of more than one label with the same name.
So, how do I get the label to have a different name everytime?

Thanks
Quentin

1998\09\01@204702 by Ralph Landry

flavicon
face
I belive you can do this.

xxx  MACRO  arg1, arg2, jumpto

       your code

       goto jumpto

You supply the jumpto in your call to the macro, check page
47 of the MPASM Assembler user's guide, they have a little
snippet about it there.

-Ralph
TakeThisOuTrlandryspamspamhaywood.main.nc.us
"If they call it Tourist Season why can't we shoot 'em?"

1998\09\01@212843 by Dwayne Reid

flavicon
face
Quentin wrote:

>How can I use a macro that has a Goto....Label in it more than once in my
>program?
>IE:
>        macro
>        .
>Test    .
>        .
>        GOTO Test
>        endm
>
>If I use this macro more than once in my program, I get an error about the
>use of more than one label with the same name.
>So, how do I get the label to have a different name everytime?


Use the 'local' macro directive.  Your macro would look something like:

   dosomething  MACRO
   local test

test
   .
   .
   .
   goto test
   ENDM

Hope this helps.

dwayne


Dwayne Reid   <spamBeGonedwaynerspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(403) 489-3199 voice     (403) 487-6397 fax

'AN512 - Huh?? - MPASM Pseudo instructions.'
1998\09\17@072754 by Andy David

flavicon
face
>
>SKPNC, CLRC, SKPZ, SKPC, SETC.
>
>It's got me totally confused. Is it macro's? If so, then where is it
>defined?
>If I run the program in MPSIM I see that they do something, but I got no
>idea what.
>
>As confused as a chameleon on a comic strip.


Quentin,

SKPNC   - Skip if no carry      [btfsc  STATUS,C]
CLRC    - clear carry           [bcf    STATUS,C]
SKPZ    - Skip if zero  [btfss  STATUS,Z]
SKPC    - Skip if carry [btfss  STATUS,C]
SETC    - set carry             [bsf    STATUS,C]


They are MPASM pseudo instructions and all translate to a single
instruction. There's no real benefit to using them over the normal
instructions except that they're easier to read.


- Andy.

----------------------------------------------------------
Andrew David, Software Manager, Ultronics Ltd, Cheltenham.
EraseMEakdavidEraseMEspamUltronics.co.uk          http:\\http://www.ultronics.com
----------------------------------------------------------

1998\09\17@095445 by Quentin

flavicon
face
Andy David wrote:
>

>
> They are MPASM pseudo instructions and all translate to a single
> instruction. There's no real benefit to using them over the normal
> instructions except that they're easier to read.
>
Or to confuse you. Thanks to all that replied. I now replaced it with the
normal instructions.

Quentin


'MPASM help'
1998\10\24@144346 by Sean Breheny
face picon face
Hi all,

I have been using the MELabs PM assembler and I am just switching over to
MPASM because I prefer the MPLAB IDE and simulator. However, I can't seem
to find in the help the syntax for radix override. I know its 0xXX for hex,
but what about binary,decimal,and octal?

Thanks,

Sean

+-------------------------------+
| Sean Breheny                  |
| Amateur Radio Callsign: KA3YXM|
| Electrical Engineering Student|
+-------------------------------+
Save lives, please look at http://www.all.org
Personal page: http://www.people.cornell.edu/pages/shb7
spamBeGoneshb7spam_OUTspam.....cornell.edu  Phone(USA): (607) 253-0315 ICQ #: 3329174

1998\10\24@184055 by Valter Gruntar

flavicon
face
Radix Types Supported
_____________________________________________________________
Radix
Syntax                                          Example
======================================================
Decimal
D'<digits>'                                    D'100'
Hexadecimal (default)
H'<hex_digits>'                             H'9F'  or  0x9F
Octal
O'<octal_digits>'                          O'777'
Binary
B'<binary_digits>'                        B'00111001'
Character
'<character>'                                'C'

A'<Character>'                            A'C'


Du you want this?

Valter



Sean Breheny wrote:

{Quote hidden}


'Parallax code to MPASM code'
1998\11\19@010750 by Ivan Cenov
flavicon
face
Hi,

I have an include file "parallax.inc" in my web page
for MPASM, where parallax instructions are "macrosed".
May this will help.

http://www.geocities.com/SiliconValley/Network/9276/downld.htm

Ivan Cenov
RemoveMEokto7KILLspamspamKILLspambotev.ttm.bg
ICQ: 17221948
Do what have to do, let happens what it wants.

{Original Message removed}

1998\11\19@081824 by Andy Kunz

flavicon
face
>I have an include file "parallax.inc" in my web page
>for MPASM, where parallax instructions are "macrosed".
>May this will help.
>
>http://www.geocities.com/SiliconValley/Network/9276/downld.htm

Thanks, Ivan.  Those will be a big help!

Andy


==================================================================
Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA
==================================================================


'MPASM string concatenation in macros'
1998\12\20@034115 by Mike Morrin
flavicon
face
I would like to use a macro to generate labels which are based on one of
the parameters.

e.g. I want to have a source code data table of the form:

       table   ITEM_X, 4,      8
       table   ITEM_Y, 3,      7

produce the code (using a macro called table):

ITEM_X_SIZE     EQU     4
ITEM_X_OFFSET   EQU     8
ITEM_Y_SIZE     EQU     3
ITEM_Y_OFFSET   EQU     7

I have not yet found a string concatenation operator, is there one?  if so
can somebody give me an example of its use?

Tia

Mike


'MPASM macros'
1999\02\26@132658 by Josef Hanzal
flavicon
face
I would like to have macro, which behaves differently when argument is
defined and when it is not. The manual says, that argument which is omitted
equals to an empty string, but I cannot find a way, how to test for string
lenght. Has someone already solved this? I tried the following way, but it
is not working, as there is no substitution for MENUITEM in the IFDEF
statement when macro is invoked. I tried several more complicated ways, but
no good results so far. Any suggestions? MPASM 2.15

STRING  MACRO   STR,MENUITEM
STR#V(STRNO):   DT STR,0
IFDEF  MENUTITEM
MENUITEM:       EQU STRNO
ENDIF
       ENDM

Josef

======================================================================
Electronical devices for chemical laboratory, custom electonics design
----------------------------------------------------------------------
Snail Instruments                     Josef Hanzal
Vojanova 615                          phone/fax: +420-311-24433
266 01 Beroun                         e-mail: EraseMEsnailspamBeGonespamspamiol.cz
Czech Republic                        URL: http://www.vitrum.cz/snail/
======================================================================

1999\02\26@174741 by Gerhard Fiedler

picon face
At 19:25 02/26/99 +0100, Josef Hanzal wrote:
>I would like to have macro, which behaves differently when argument is
>defined and when it is not. The manual says, that argument which is omitted
>equals to an empty string, but I cannot find a way, how to test for string
>lenght. Has someone already solved this? I tried the following way, but it
>is not working, as there is no substitution for MENUITEM in the IFDEF
>statement when macro is invoked. I tried several more complicated ways, but
>no good results so far. Any suggestions? MPASM 2.15
>
>STRING  MACRO   STR,MENUITEM
>STR#V(STRNO):   DT STR,0
> IFDEF  MENUTITEM
>MENUITEM:       EQU STRNO
> ENDIF
>        ENDM

i'm not really familiar with mpasm, but a few things caught my eye:

>MENUITEM:       EQU STRNO

shouldn't that be without colon?


> IFDEF  MENUTITEM

if it says that the "argument which is omitted equals to an empty string"
you maybe could try something like

IF MENUITEM = ""

or

IF "MENUITEM" = ""

your version asks whether the item is defined, and if it is an empty
string, it may as well be =defined= as an empty string...

ge

1999\02\26@220000 by Mark Willis

flavicon
face
Josef Hanzal wrote:
>
> I would like to have macro, which behaves differently when argument is
> defined and when it is not. The manual says, that argument which is omitted
> equals to an empty string, but I cannot find a way, how to test for string
> lenght. Has someone already solved this? I tried the following way, but it
> is not working, as there is no substitution for MENUITEM in the IFDEF
> statement when macro is invoked. I tried several more complicated ways, but
> no good results so far. Any suggestions? MPASM 2.15
>
> STRING  MACRO   STR,MENUITEM
> STR#V(STRNO):   DT STR,0
>  IFDEF  MENUTITEM
> MENUITEM:       EQU STRNO
>  ENDIF
>         ENDM
>
> Josef

 Your IFDEF MENUTITEM there has an "extra" T in the middle there, I'm
hoping that's not the cause of the problem?

 I've used "Test Equ NullArg   555" before on other platforms (I'm not
where I can test it here, but it worked in CDC Cyber mainframe assembly
and has worked other places <G> - but NullArg has to be numberical for
that to work.)  Sets a default of 555 (here), for an omitted argument.
I should test that on MPAsm, huh?

 #IFNDEF looks like a candidate here as well.  If it's falling through
on an undefined string, then
 #IFNDEF MENUITEM
;    NOTE Fell through
 #ELSE
MENUITEM:       EQU STRNO
 #ENDIF

 "Programming is the art of thinking deviously enough to figure out how
to get what you want, while not violating the principle of least
astonishment" <G>

 Have you used #EXPAND?  (or is it EXPAND?  I forget.)  To expand the
macro invocation and see more info on what's going through MPASM's head.

 Worst case, add a 3rd arg in the middle:
 STRING  MACRO   STR,BOOL,MENUITEM

 Set Bool=1 when you'll have a MENUITEM.  Icky though.  I'm no MPAsm
expert, and too rusty on Parallax's Assembler now.

 Mark


'MPASM strings'
1999\03\10@082745 by Andy Kunz
flavicon
face
How do I tell MPASM to make a string?

For instance, in Parallax I put

       retw    'Message',0

and it assembles a bunch of retlw instructions.

What's the Microchip equivalent?

Thanks.

Andy

  \-----------------/
   \     /---\     /
    \    |   |    /          Andy Kunz
     \   /---\   /           Montana Design
/---------+   +---------\     http://www.montanadesign.com
| /  |----|___|----|  \ |
\/___|      *      |___\/     Go fast, turn right,
                              and keep the wet side down!

1999\03\10@143039 by Kelly J. Kohls

picon face
>How do I tell MPASM to make a string?
>
>For instance, in Parallax I put
>
>        retw    'Message',0
>
>and it assembles a bunch of retlw instructions.
>
>What's the Microchip equivalent?
>

Andy,

For MPASM, use the following:

    DT  "This is our text string",0

The assembler will convert this to a series of RETLW statements.

Kelly J. Kohls, N5TLE
Email: KILLspamkkohlsspamjuno.com  or  n5tlespam_OUTspamspamqsl.net
Homepage: http://www.qsl.net/n5tle/


___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

1999\03\10@143455 by Marc

flavicon
face
>         retw    'Message',0
>
> and it assembles a bunch of retlw instructions.

Use the DT directive!


'Fwd: [MPLAB] New MPASM and PICmicro Quick Referenc'
1999\04\27@222736 by Eaejrphd
picon face
part 0 2169 bytes content-type:text/plain; charset=us-ascii (decoded 7bit)

Return-Path: <MPLAB-ownerspamspam@spam@mail.microchip.com>
Received: from  rly-yd05.mx.aol.com (rly-yd05.mail.aol.com [172.18.150.5]) by
       air-yd01.mail.aol.com (v59.4) with SMTP; Tue, 27 Apr 1999 17:29:22
       -0400
Received: from mail.microchip.com (mail.Microchip.COM [198.175.253.70])
         by rly-yd05.mx.aol.com (8.8.8/8.8.5/AOL-4.0.0)
         with SMTP id RAA23601 for <spamBeGoneEaejrphd.....spamaol.com>;
         Tue, 27 Apr 1999 17:29:21 -0400 (EDT)
Received: from prometheus.Microchip.COM [198.175.253.66] by
       mail.microchip.com
 (SMTPD32-4.06) id AB7354301DC; Tue, 27 Apr 1999 14:09:39 CDT
Received: by prometheus.Microchip.COM; id AA08869; Tue, 27 Apr 99 13:30:21
       MST
Received: from loghost(172.16.245.37) by prometheus.Microchip.COM via smap
       (3.2)
       id xma008763; Tue, 27 Apr 99 13:30:00 -0700
Received: from microchip.com ([172.16.249.212]) by titan.Microchip.COM
       (8.6.12/8.6.12) with ESMTP id NAA10379; Tue, 27 Apr 1999 13:29:07
       -0700
Message-Id: <.....37261E10.2BFA4EF2@spam@spammicrochip.com>
Date: Tue, 27 Apr 1999 13:29:05 -0700
From: Darrel Johansen <@spam@cnspamMicrochip.COM>
Reply-To: cnRemoveMEspamMicrochip.COM
X-Mailer: Mozilla 4.51 [en] (Win95; I)
X-Accept-Language: en
Mime-Version: 1.0
To: MPLAB LIST SERVE SERVE <spammplabspammail.microchip.com>,
       Compilers LIST SERVE SERVE <compilersspam_OUTspamTakeThisOuTmail.microchip.com>
Subject: [MPLAB] New MPASM and PICmicro Quick Reference Card
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: spam_OUTMPLAB-owner@spam@spamRemoveMEmail.microchip.com

A new MPASM, MPLINK and MPLIB quick reference card is posted at:

http://www.microchip.com/10/Tools/picmicro/code/mpasm/index.htm

This card also contains the instruction sets for the 12-bit, 14-bit,
16-bit
and the new enhanced 16-bit PICmicros.


               ******************************
This list is managed by Microchip Technology Inc.
     (602) 786-7200 http://www.microchip.com
To unsubscribe from this list, send a message to: spamlistservspamspammail.microchip.com
with the following as the body: unsubscribe mplab yourname
Here is an example: unsubscribe mplab John Doe


More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...