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 Leon Heller

----- Original Message -----
From: Eric
Sent: Monday, February 21, 2005 11: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.
A 'jump table ' is the usual way to do it.
Leon
--
Leon Heller, G1HSM
http://www.geocities.com/leon_heller

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.