Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] the "case" statement

2005-02-21 by Eric

it's OK all

I am beginning to think someone used a lot of "caseX" in their code, so they could read their code
easier. even thou is no assembly code "case" equivalent.

I just inserted break at the end of each "caseX" and it never worked.


From Eric




----- Original Message -----
From: "Eric" <erichards@clear.net.nz>
To: <AVR-Chat@yahoogroups.com>
Sent: Tuesday, February 22, 2005 12:02 AM
Subject: [AVR-Chat] the "case" statement



Hi all chat'ers
In C/C++ there is a "case" statement, is there such a thing in assembly code? and is there a example
around.


e.g here is the C version
switch( i )
{
    case -1:
        n++;
        break;
    case 0 :
        z++;
        break;
    case 1 :
        p++;
        break;
}

how do you do the line containing the "switch( i )" in assembly code.

From Eric
no attachment was sent with this email, if there is one, you might have a problem.




Yahoo! Groups Links

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.