Monday 15 April 2013

Mips and cisc assembly langue -



Mips and cisc assembly langue -

does have simple programme source code run in both assembly langue mips , cisc explan mips run less cpu cycle cisc ?

simple programme not require big one

thank you

a simple illustration comparing 2 strings against each others:

mips

; string pointers in $a0 , $a1 more: ld $r0,($a0) ld $r1,($a1) add together 1, $a0 add together 1, $a1 cmp $r0,$0 je eos cmp $r1,$0 je eos cmp $r0,$r1 je more eos: cmp $r0, $r1 ; cmp result defines whether a0 < a1, a0 == a1, a0 > a1

cisc (intel)

; start strings in edi , esi more: cmps (edi), (esi) loopnz more ; cmps result defines whether a0 < a1, a0 == a1, a0 > a1

i not guarantee validity of code. however, can see cisc same thing mips in 2 instructions (although initialization may require more code in cisc...). however, taking same amount of time.

assembly mips cpu cycle

No comments:

Post a Comment