Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

mips assembly language

if statement

Best Answer BlackRabbit, 26 September 2014 - 11:29 PM

Welcome aboard!

 

Programing on Windows or Linux?

 

Please take a look to the Codecall's Assembly tutorials forum

You might find what you want in there.

Go to the full post


This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1 azi

azi

    CC Lurker

  • New Member
  • Pip
  • 8 posts

Posted 26 September 2014 - 07:50 PM

i have already wrote my codes to convert celsius to fahrenheit and viseversa.

but i dont know how to give an option to user to choose c2f or f2c and carry out the conversion accordingly.

i think it should be if statement..

 

 

prompt: .asciiz "\nif you want convert ctf type1: "
res:   .asciiz "\nDegree in C is: "
pick:  .asciiz "choose the format c2f or f2c?"

.text
main:
                li   $v0, 4             # system call code for Print String
            la   $a0, prompt        # load address of prompt into $a0
            syscall                      # print the prompt message
    
            li    $v0, 5
                syscall
                move     $t1, $v0
              

 

 

c2f:

.

.

.

.

.

f2c

 

..

 

.

.

 

 



#2 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 26 September 2014 - 11:29 PM   Best Answer

Welcome aboard!

 

Programing on Windows or Linux?

 

Please take a look to the Codecall's Assembly tutorials forum

You might find what you want in there.



#3 azi

azi

    CC Lurker

  • New Member
  • Pip
  • 8 posts

Posted 27 September 2014 - 07:46 AM

on windows