1 / 2

Answers to Quiz #1

Answers to Quiz #1. 1. mov $t0,$t1 -> add $t0,$t1,$zero bgt $t0,$t1,L1 -> slt $t2,$t1,$t0 bne $t2,$zero,L1 2. The functions computes the factorial of n in a loop.

thad
Download Presentation

Answers to Quiz #1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Answers to Quiz #1 1. mov $t0,$t1 ->add $t0,$t1,$zero bgt $t0,$t1,L1 -> slt $t2,$t1,$t0 bne $t2,$zero,L1 2. The functions computes the factorial of n in a loop. 3. The maximum size is 215-1 words (the maximal positive number of 16-bits) minus one word for the jump instruction. Thus the maximal size is 131064 bytes. 4. addi $t0,$t0,1 add $t0,$t0,$t1 add $t0,$t0,$t2

  2. L1: bne $a0,$a1,End . . j L1 End: L1: beq $a0,$a1,L2 j End # jump is $a0!=$a1 L2: . . j L1 End:

More Related