Searching \ for 'Computed GOTO in CCS (please, help me!!!)' 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/index.htm?key=computed+goto+ccs
Search entire site for: 'Computed GOTO in CCS (please, help me!!!)'.

Truncated match.
PICList Thread
'Computed GOTO in CCS (please, help me!!!)'
2000\01\07@114751 by Edson Brusque

face
flavicon
face
Hello,

   I'm still trying to make a computed goto in CCS:

       #asm
       movlw high case00   // <-- This doesn't compiles: "Undefined
identifier"
       movwf PCLATCH
       movf  case_variable, W
       addwf PCL, F
       call case00
       call case01
       call case02
       call case03
       call case04
       call case05
       call case06
       call case07
       call case08
       call case09
       call case10
       call case11
       call case12
       #endasm

   Any sugestion? This works in MPASM, but not in CCS. CCS isn't supposed
to pass anything between #asm and #endasm to the assembler???

   Best regards,

   Brusque
___________________________________________________________________________
| | || |\| | || || |\|\ Edson :-^= Brusque
| | || ||| | || || |||| spam_OUTbrusqueTakeThisOuTspamflynet.com.br
| |_||_||| |_||_||_|||| Musician, Programmer, Developer, Electronics
| \_\\_\|| \_\\_\\_\||| Blumenau / SC / Brazil / South America
|  |  |  |  |  |  |  ||    Earth / Solar System / Milk Way
|__|__|__|__|__|__|__|| Giro In'Italia homepage: http://www.flynet.com.br/giro
\__\__\__\__\__\__\__\| C.I.Tronics Lighting Designers: http://www.citronics.com.br
---------------------------------------- ICQ# 15937748 ---------------------
       Founder of the CUMP mailing list .....subscribe-cumpKILLspamspam@spam@egroups.com
  Founder of the SoundFont mailing list soundfont-subscribespamKILLspamonelist.com
----------------------------------------------------------------------------

2000\01\07@125643 by Robert A. LaBudde

flavicon
face
<x-flowed>At 02:45 PM 1/7/00 -0200, Brusque wrote:
>Hello,
>
>     I'm still trying to make a computed goto in CCS:
>
>         #asm
>         movlw high case00   // <-- This doesn't compiles: "Undefined
>identifier"
>         movwf PCLATCH
>         movf  case_variable, W

try "movlw HIGH case00".


================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: .....ralKILLspamspam.....lcfltd.com
Least Cost Formulations, Ltd.                   URL: http://lcfltd.com/
824 Timberlake Drive                            Tel: 757-467-0954
Virginia Beach, VA 23464-3239                   Fax: 757-467-2947

"Vere scire est per causae scire"
================================================================

</x-flowed>

2000\01\07@141604 by Lawrence Lile

flavicon
face
Edson -
Dump the assembler.  Lile's rule for beginning C students:  When using C, if
you hafta drop into assembler you are probably trying to do something the
compiler already knows how to do.


Try the more standard C syntax - switch case statement.  These are REALLY
powerful!
This is from memory - check the syntax in your manual in case I left out a
parenthesis or something.

Switch (case_variable){
   case 0:                         // I can't remember if switch case can
handle case zero or not..
            case00();
           break;

    case 1:
           case01();
           break;

      case 2:
           case02();
           break;

etc. etc.

}



{Original Message removed}

2000\01\07@145004 by Edson Brusque

face
flavicon
face
Hello Robert LaBudde,

> try "movlw HIGH case00".

   Already tried. Doesn't works.

   Thanks anyway,

   Brusque
___________________________________________________________________________
| | || |\| | || || |\|\ Edson :-^= Brusque
| | || ||| | || || |||| EraseMEbrusquespam_OUTspamTakeThisOuTflynet.com.br
| |_||_||| |_||_||_|||| Musician, Programmer, Developer, Electronics
| \_\\_\|| \_\\_\\_\||| Blumenau / SC / Brazil / South America
|  |  |  |  |  |  |  ||    Earth / Solar System / Milk Way
|__|__|__|__|__|__|__|| Giro In'Italia homepage: http://www.flynet.com.br/giro
\__\__\__\__\__\__\__\| C.I.Tronics Lighting Designers: http://www.citronics.com.br
---------------------------------------- ICQ# 15937748 ---------------------
       Founder of the CUMP mailing list subscribe-cumpspamspam_OUTegroups.com
  Founder of the SoundFont mailing list @spam@soundfont-subscribeKILLspamspamonelist.com
----------------------------------------------------------------------------

2000\01\08@070719 by paulb

flavicon
face
Edson -

>>        addwf PCL, F
>>        call case00
>>        call case01
>>        call case02
...
>>        #endasm

... corresponds to, in C,

{Quote hidden}

 Note, no "break" - after the selected "case" is called, all following
are called in turn also.  Is that what you want, or did you really mean
"goto".

 Don't ask me whether there is a way of inducing C to build an
execution vector table though!  You are correct AFAIK, the "case"
statement simply builds a tree of branches, and not even a binary tree.
--
 Cheers,
       Paul B.

2000\01\10@015559 by Dr. Imre Bartfai

flavicon
face
Hi,

I do not know CCS in that depth, but:

I made experiences with a lot of assemblers. What you want to do (get a
hibyte of an identifier's address) is not standardized. There are a lot of
variations, and you have tried only one. The others I know:

       ... hi case00
       ... case00 << 8
       ... high(case00)
       ... case00<

etc.

I am (almost) sure you will find the solution, if one exist.

Regards,
Imre


On Fri, 7 Jan 2000, Edson Brusque wrote:

{Quote hidden}

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