Searching \ for '[PIC]: Make Comment for many lines of code' 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/microchip/devices.htm?key=pic
Search entire site for: 'Make Comment for many lines of code'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Make Comment for many lines of code'
2004\01\31@071501 by #LEE CHUN YONG#

flavicon
face
I just want to know how to make comment for more than 1 line of code besides the brute-force which is done by putting semicolon( ; ) to each line of code. Thanks in advance. Cheers. ;)

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu

.

2004\01\31@081759 by Olin Lathrop

face picon face
#LEE CHUN YONG# wrote:
> I just want to know how to make comment for more than 1 line of code
> besides the brute-force which is done by putting semicolon( ; ) to
> each line of code.

It's a good idea to make comment lines stand out visually.  A semicolon in
column 1 does that.  If it's such an imposition to type a semicolon on a
line, especially when you will be adding tens of text characters, then go
find another line of work.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu

.

2004\01\31@104136 by Ken Pergola

flavicon
face
LEE CHUN YONG wrote:

> I just want to know how to make comment for more than 1 line of
> code besides the brute-force which is done by putting semicolon(
> ; ) to each line of code. Thanks in advance. Cheers. ;)

Hi LEE CHUN YONG,

If I understand your question correctly I write *sectional* comments like
this:
(Of course I also write comments after the mnemonics when a single line of
code needs commenting)



         .
       .
       .

       ; Cache (on stack) EECON1, stack overflow/underflow flags, and RCON for
parsing in main app
       PUSH
     MOVF    EECON1, W
     MOVWF   TOSU

       MOVF    STKPTR, W
       MOVWF   TOSH

       MOVF      RCON, W
       MOVWF     TOSL
         .
       .
       .



The vertical ellipsis points just mean this code is taken out of context of
the whole program.

Is this what you are getting at Lee?


Best regards,

Ken Pergola

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu

.

2004\01\31@111045 by

picon face
#LEE CHUN YONG# wrote :

> I just want to know how to make comment for more than 1 line
> of code besides the brute-force which is done by putting
> semicolon( ; ) to each line of code. Thanks in advance. Cheers. ;)

You don't say, so I have to assume that you are talking about
MPASM assembler, right ?

I don't know of any other way then a ";" on each line, and
I don't think there are. I assume you *have* checked the
online HELP file, right ? The only way that is documents
there is the ";" thing...

But what's wrong with that ?

Personaly I'm using an editor where I can "select" a large
part of the code, then just select "Comment selected text"
from the "Edit" menu and it (the editor) puts a ";" first
on each line.


Jan-Erik.

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu

.

2004\01\31@113404 by Ken Pergola

flavicon
face
Hi Lee,

Not sure if your knew about this, but here goes anyways:


If you are using the Microchip MPLAB editor you can get some helpful editor
features by right-clicking your mouse in your workspace area:

Right-click >> Advanced >> Comment Block
                       >> Uncomment Block

Right-click >> Advanced >> Format Text >> Uppercase
                                      >> Lowercase


If you want to have these feature apply to any existing text, you must
highlight the text first before you right-click your mouse.


I guess if you are left-handed you would left-click your mouse? ;)

Just explore and have fun.

Best regards Lee,

Ken Pergola

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu

.
Return-Path: <>
Received: from mitvma.mit.edu ([18.92.0.3]) by tomts1-srv.bellnexxia.net
         (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP
         id <20040128011141.CKIT10330.tomts1-srv.bellnexxia.netspamspam_OUTmitvma.mit.edu>>          for <@spam@piclist_errorsKILLspamspamSYMPATICO.CA>;
         Tue, 27 Jan 2004 20:11:41 -0500
Received:  by mitvma.mit.edu (IBM VM SMTP Level 430) via spool with SMTP id 6123 ; Tue, 27 Jan 2004 20:11:38 EST
Received: from MITVMA.MIT.EDU (NJE origin LISTSERV@MITVMA) by MITVMA.MIT.EDU (LMail V1.2d/1.8d) with BSMTP id 2423; Tue, 27 Jan 2004 20:11:38 -0500
Date:         Tue, 27 Jan 2004 20:11:38 -0500
From:         "L-Soft list server at MITVMA.MIT.EDU (1.8e)"
             <KILLspamLISTSERVKILLspamspamMITVMA.MIT.EDU>
Subject: PICLIST: error report from YAHOO.COM
To:           RemoveMElistsjoshTakeThisOuTspam3MTMP.COM,
             spamBeGonepiclist_errorsspamBeGonespamSYMPATICO.CA
Message-ID:   <LISTSERV%TakeThisOuT2004012720113805EraseMEspamspam_OUTMITVMA.MIT.EDU>
X-LSV-ListID: None

The enclosed message has been identified as a delivery error for the PICLIST
list because it was sent to 'RemoveMEowner-piclistspamTakeThisOuTMITVMA.MIT.EDU'.

------------------------------ Message in error -------------------------------
Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail
         V1.2d/1.8d) with BSMTP id 2421; Tue, 27 Jan 2004 20:11:38 -0500
Received: from mta267.mail.scd.yahoo.com [66.218.86.184] by mitvma.mit.edu (IBM
         VM SMTP Level 430) via TCP with SMTP ; Tue, 27 Jan 2004 20:11:37 EST
X-Comment: mitvma.mit.edu: Mail was sent by mta267.mail.scd.yahoo.com
From: MAILER-DAEMONEraseMEspam.....yahoo.com
To: EraseMEowner-piclistspammitvma.mit.edu
X-Loop: RemoveMEMAILER-DAEMONEraseMEspamEraseMEyahoo.com
Subject: Delivery failure

Message from yahoo.com.
Unable to deliver message to the following address(es).

<RemoveMEhbarregrdspam_OUTspamKILLspamyahoo.com>:
Sorry, your message to RemoveMEhbarregrdTakeThisOuTspamspamyahoo.com cannot be delivered.  This account is over quota.

--- Original message follows.

Return-Path: <EraseMEowner-piclistspamspamspamBeGonemitvma.mit.edu>
Received: from 209.119.0.109  (EHLO cherry.ease.lsoft.com) (209.119.0.109)
 by mta267.mail.scd.yahoo.com with SMTP; Tue, 27 Jan 2004 14:30:53 -0800
Received: from PEAR.EASE.LSOFT.COM (209.119.0.19) by cherry.ease.lsoft.com (LSMTP for Digital Unix v1.1b) with SMTP id <RemoveME16.00CBF96FKILLspamspamcherry.ease.lsoft.com>; Tue, 27 Jan 2004 15:26:57 -0500
Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV-TCP/IP release 1.8e)
         with spool id 2260 for PICLISTSTOPspamspamspam_OUTMITVMA.MIT.EDU; Tue, 27 Jan 2004
         15:26:52 -0500
Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail
         V1.2d/1.8d) with BSMTP id 4086; Tue, 27 Jan 2004 15:25:50 -0500
Received: from smtp.hccnet.nl [62.251.0.13] by mitvma.mit.edu (IBM VM SMTP
         Level 430) via TCP with ESMTP ; Tue, 27 Jan 2004 15:25:49 EST
X-Comment: mitvma.mit.edu: Mail was sent by smtp.hccnet.nl
Received: from hccnet.nl by smtp.hccnet.nl via fia65-64-100.dsl.hccnet.nl
         [80.100.64.65] with ESMTP for <spamBeGonePICLISTSTOPspamspamEraseMEMITVMA.MIT.EDU> id
         i0RKPp6c017969 (8.12.10/2.03); Tue, 27 Jan 2004 21:25:51 +0100 (MET)
User-Agent: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.4) Gecko/20030624
X-Accept-Language: en-us, en, fr, nl, de-de
MIME-Version: 1.0
References: <KILLspam37FB7AA6F5F9814FB634A7BF4C35A6F5640CD9spamBeGonespamESEALNT442.al.sw.ericsson.se>> Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID:  <
EraseME4016C94F.7020303spamEraseMEhccnet.nl>
Date:         Tue, 27 Jan 2004 21:25:51 +0100
Reply-To:     pic microcontroller discussion list <@spam@PICLIST@spam@spamspam_OUTMITVMA.MIT.EDU>
Sender:       pic microcontroller discussion list <spamBeGonePICLISTspamKILLspamMITVMA.MIT.EDU>
From:         Rob Hamerling <.....r.hamerlingspam_OUTspamHCCNET.NL>
Subject: Re: [PIC:] duplicate device IDs in the 18F series
To:           TakeThisOuTPICLIST.....spamTakeThisOuTMITVMA.MIT.EDU
In-Reply-To:  <TakeThisOuT37FB7AA6F5F9814FB634A7BF4C35A6F5640CD9KILLspamspamspamESEALNT442.al.sw.ericsson.se>> Precedence: list

Hi Jan-Erik,

Jan-Erik Soderholm XA (TN/PAC) wrote:
{Quote hidden}

Doesn't make a difference for a PIC programmer (at least not for mine,
the Wisp628).

> As far as I can see from the line card the 16F767 and 777 have
> the same amount of flash, no eeprom and so on.

True.

So for a PIC programmer it may not be a problem if a 16F767 and 16F777
would use the same ID. The reason that I mentioned the 28-pins DIP
package was to say that I'm sure it is _not_ a 16F777 (I didn't mention
it, but it has also 16F767 printed on the body!).

I reported a documentation error to MicroChip.

Regards, Rob.


--
Rob Hamerling, Vianen, NL phone +31-347-322822
homepage: http://www.robh.nl/

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
*** MESSAGE TRUNCATED ***


..
.

2004\01\31@115107 by M. Adam Davis

flavicon
face
In assembly code the end of line characters mean something.  A new line
says, "Clear out the buffer, the next string is completely new and
unrelated to the last string"  Unlike C/C++ and others where you can put
as many or as few end of lines wherever you'd put any other whitespace
without affecting the code.

The tradeoff is that you have to have an end of statement for those
languages, but in assembly you don't:
c=a;  // requires both a semicolon and comment characters
movff rega, regb ; requires only a semicolon

So the tradeoff is a character at the end of every statement, or a
character at the beginning of each line of comments.

The way some people comment, there are fewer characters typed in PIC
code... :-)

If you really want this function, then you'll need to build or modify an
existing pre-parser which takes those comments out before compiling
them.  The problem is that the code isn't portable without also
distributing the parser.

-Adam

#LEE CHUN YONG# wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspamspamBeGonemitvma.mit.edu

.

2004\01\31@120140 by Wouter van Ooijen

face picon face
> I just want to know how to make comment for more than 1 line
> of code besides the brute-force which is done by putting
> semicolon( ; ) to each line of code. Thanks in advance. Cheers. ;)

#ifdef JHFJHFFHHFGHFHkygghjg
....
#endif

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-request@spam@spamspam_OUTmitvma.mit.edu

.

2004\01\31@122706 by Chuck Busch

picon face
Very good response Ken.

Helps one hell of a lot better than telling someone who asks a reasonable
question to get into another line work.

Thanks,

Chuck


{Original Message removed}

2004\01\31@123327 by Dave Tweed

face
flavicon
face
Jan-Erik Soderholm XA (TN/PAC) <TakeThisOuTjan-erik.xa.soderholmspamspamERICSSON.COM> wrote:
> #LEE CHUN YONG# wrote :
>
> > I just want to know how to make comment for more than 1 line
> > of code besides the brute-force which is done by putting
> > semicolon( ; ) to each line of code. Thanks in advance. Cheers. ;)
>
> You don't say, so I have to assume that you are talking about
> MPASM assembler, right ?
> I don't know of any other way then a ";" on each line, and
> I don't think there are.

 if 0
  .
  .
  .
  .
 endif

works just as well on general text (comments) as it does on actual code.
Just make sure you don't start a line with 'else' or 'endif'.

-- Dave Tweed

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestEraseMEspammitvma.mit.edu

.

2004\01\31@135200 by Dave VanHorn

flavicon
face
At 08:10 PM 1/31/2004 +0800, #LEE CHUN YONG# wrote:
>I just want to know how to make comment for more than 1 line of code
>besides the brute-force which is done by putting semicolon( ; ) to each
>line of code. Thanks in advance. Cheers. ;)


This would be a feature of your assembler or compiler.
It would help to know which one you're using.

Look in the docs under directives, which is what they are usually called.

Things like comments, .if/.endif,  .equ,  .byte, .ds, .dw, .byte etc are
compiler/assembler directives.

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestEraseMEspamspam_OUTmitvma.mit.edu

.

2004\01\31@211610 by John Ferrell

face picon face
I give an A+ to Ken for the right answer. I asked the same question many
moons ago and got the same (good) answer but I was asking in my native
language.

In Turbo Pascal (yes, I know that was a long time ago) you could comment a
line at a time with (* ....comments...*)
or a whole block of Comments with
{    stuff
   more stuff
more stuff
more stuff
more stuff
}

Which a lot of us still prefer.

The comment selected block is good, but it don't jump out at you when you
first get started with PICs.

A note to  "#LEE CHUN YONG#" :

 Don't take it personal, the guys are having a bad day! They usually do
better.

John Ferrell
6241 Phillippi Rd
Julian NC 27283
Phone: (336)685-9606
@spam@johnferrellRemoveMEspamEraseMEearthlink.net
http://DixieNC.US
NSRCA 479 AMA 4190  W8CCW
"My Competition is Not My Enemy"

{Original Message removed}


'[PIC]: Make Comment for many lines of code'
2004\02\01@054132 by #LEE CHUN YONG#
flavicon
face
Thanks Ken an John for the valuable help. I really appreciate it. Have a nice day!

________________________________

From: pic microcontroller discussion list on behalf of John Ferrell
Sent: Sun 2/1/2004 10:19 AM
To: EraseMEPICLISTspam@spam@MITVMA.MIT.EDU
Subject: Re: [PIC]: Make Comment for many lines of code



I give an A+ to Ken for the right answer. I asked the same question many
moons ago and got the same (good) answer but I was asking in my native
language.

In Turbo Pascal (yes, I know that was a long time ago) you could comment a
line at a time with (* ....comments...*)
or a whole block of Comments with
{    stuff
   more stuff
more stuff
more stuff
more stuff
}

Which a lot of us still prefer.

The comment selected block is good, but it don't jump out at you when you
first get started with PICs.

A note to  "#LEE CHUN YONG#" :

 Don't take it personal, the guys are having a bad day! They usually do
better.

John Ferrell
6241 Phillippi Rd
Julian NC 27283
Phone: (336)685-9606
@spam@johnferrellspam_OUTspam.....earthlink.net
http://DixieNC.US
NSRCA 479 AMA 4190  W8CCW
"My Competition is Not My Enemy"

{Original Message removed}

2004\02\01@144724 by steve

flavicon
face
> In Turbo Pascal (yes, I know that was a long time ago) you could
> comment a line at a time with (* ....comments...*) or a whole block of
> Comments with {

In the olden days, assemblers had a COMMENT / ENDCOMMENT
directive for doing block comments. That seemed to fall out of favour
but it was a really useful tool and isn't as ambiguous as the DIY
alternatives like #ifdef's, etc.

Steve.


==========================================
Steve Baldwin                          Electronic Product Design
TLA Microsystems Ltd             Microcontroller Specialists
PO Box 15-680, New Lynn                http://www.tla.co.nz
Auckland, New Zealand                     ph  +64 9 820-2221
email: spamBeGonesteveEraseMEspamtla.co.nz                      fax +64 9 820-1929
=========================================

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

.

2004\02\01@165409 by Colin Constant

picon face
>From: Olin Lathrop <olin_piclistspamBeGonespamEMBEDINC.COM>
>
>It's a good idea to make comment lines stand out visually.  A semicolon in
>column 1 does that.  If it's such an imposition to type a semicolon on a
>line, especially when you will be adding tens of text characters, then go
>find another line of work.

Geez I wish you'd stop sugar-coating it like this.  Why not just tell him
what you really think?

Colin

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

.

2004\02\02@155427 by dr. Imre Bartfai

flavicon
face
Both languages C and PL/I and even Rexx has a multiline comment
/* any comment */

Regards,
Imre

On Mon, 2 Feb 2004 RemoveMEsteve@spam@spamspamBeGoneTLA.CO.NZ wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\02\03@112456 by Ken Pergola

flavicon
face
Thread update:

I wrote:

> If you are using the Microchip MPLAB editor you can get some
> helpful editor features by right-clicking your mouse in your workspace
area:
>
> Right-click >> Advanced >> Comment Block
>                         >> Uncomment Block
>
> Right-click >> Advanced >> Format Text >> Uppercase
>                                        >> Lowercase


Unfortunately Microchip removed the ADVANCED menu item from the mouse
right-click pop-up menu in MPLAB v6.42.
(it's now under the main EDIT menu)

Sigh. :(

I put in a request asking that they put in back in.

They took it out because they were getting complaints that the mouse
right-click pop-up menu was too long.
(They are planning on placing hot keys for this item in the menu)


Regards,

Ken Pergola

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\02\03@124636 by Jim Woodward

flavicon
face
Better yet make the GUI interface of MPLAB somewhat customizable allowing
programmers to place what they want on the right click menu and features
they want on pull down menus (possibly one or two customizable pull downs).


I like the idea of at least what comes up on the right click menu being
customizable and the order of items on the right click menu (maybe a few
standard defaults always there at the top with a separator if Microchip
feels there are some that absolutely must be on there).  Adding a dialogue
for a customizable right click menu wouldn't be that much of a stretch for a
GUI programmer to do - as they say it's just SMOP (simple matter of
programming - man I hate when the marketing or sales guys say this to a
customer without checking with me first when it's my code).

Hot Keys are a good start for some of these menus (personally I think many
more of the menu items need hotkeys as well besides just these two).  
Best Regards,
Jim Woodward
Sr. Electrical Engineer
http://www.moblize.com
"Ebusiness to Wireless"
Direct: 713-622-1082
Cell: 832-541-0614

{Original Message removed}

2004\02\03@133831 by Ken Pergola

flavicon
face
Jim Woodward wrote:

> Hot Keys are a good start for some of these menus (personally I think many
> more of the menu items need hotkeys as well besides just these two).

Hi Jim,

You might have missed my message yesterday (different thread) but you now
can have user-programmable hot keys for various functions in MPLAB v6.42.

Best regards,

Ken Pergola

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\02\04@030250 by hael Rigby-Jones

picon face
{Quote hidden}

Which managed to stop Ctrl Insert/Shift Insert from working :(

Mike




=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================
Any questions about Bookham's E-Mail service should be directed to
postmasterEraseMEspam@spam@bookham.com.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body

2004\02\04@093230 by Ken Pergola

flavicon
face
Michael Rigby-Jones wrote:

> Which managed to stop Ctrl Insert/Shift Insert from working :(

Hiya Mike,

Yup, that was an oversight and it *should* be back up and running in MPLAB
v6.43 from what I learned.

Best regards,

Ken Pergola

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...