1 / 2

if ( x==3 ) y = 4; else y = 5;

Block-structured. goto C. Assembly. cmp #3, &x jnz x_not_3 mov #4, &y jmp end_not3 x_not_3: mov #5, &y end_not3:. if (x!= 3) goto x_not_3; y = 4; goto end_not3; x_not_3: y = 5; end_not3:. if ( x==3 ) y = 4; else y = 5;. Expression. Parse Tree. Assembly. =.

gilles
Télécharger la présentation

if ( x==3 ) y = 4; else y = 5;

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. Block-structured goto C Assembly cmp #3, &x jnz x_not_3 mov#4, &y jmp end_not3 x_not_3: mov #5, &y end_not3: if (x!=3)goto x_not_3; y = 4; gotoend_not3; x_not_3: y = 5; end_not3: if (x==3) y = 4; else y = 5;

  2. Expression Parse Tree Assembly = mov &b, r4 ; r4 := b rra r4 ; r4 := b / 2 add &a, r4 ; r4 := a + b / 2 mov #d, r5 ; r5 := &d mov r4, 0(r5) ; *r5 := r4 (r4) (r5) + * *d = a + b / 2; (r4) a / d b 2

More Related