Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with C switch?

Status
Not open for further replies.

redally

Programmer
Apr 17, 2002
2
0
0
AU
I'm trying to program this C program into assembly can anyone help please! This is a confusing language to learn.
while (A[i+1] != -1{
switch (k) {
case 2: if ( A >= A[i+1] )
temp = A ;
A = A[i+1] ;
A[i+1] = temp; }
break;

case 3: if ( A <= A[i+1] )
temp = A ;
A = A[i+1] ;
A[i+1] = temp; }
break;

case 4: if ( A != A[i+1] )
temp = A ;
A = A[i+1] ;
A[i+1] = temp; }

1++;
}

 
I suggest you post it again, BUT REMOVE THE 'PROCESS TGML' FLAG!
&quot;Information has a tendency to be free. Which means someone will always tell you something you don't want to know.&quot;
 
Some of the older compilers can write an assembly language file when compiling. I've use BCC 3.1 to do that in the past, but don't know if any of the Windows-based compilers will. As well, if you use a debugger, it should show you the assembly language when you step through the code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top