13.07.2015 Views

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

80 Pascal Implementation: Compiler and Asse ► 'r/Interpreter Assembler/Interpreter Listing 81U2552613278205292: storeisp),vb :. storefsp).vr >- store(sp+1).vr;3: store(ep).vb I. otoro(sp).vb >.•store(sp+1).vb;4: ecore(apkvb :- store(sp).vm >. store(sp+1J've;2: storeisp),vb :. storefsp).vr3: store(ep).vb I. otoro(sp).vb4: ecore(apkvb :- store(sp).vm5: begin compere;storc(spj.vb :... b orstorc(spj.vb :... b or88989U95 ("chkah). if (storc(op).ve < np) or891 (store(epl.va > (mexstr-q)) then892 error!(' bad pointer value ').893!(' value out of range,),835 20 (hgrth)1 begin sp :- sp-I; 399 27 (heofh)1 begin i :.. etore(sp).vl;836 case p of 90U if t-inputadr then..----- 7 537 0: errori(' - for address '). 901 begin store(apI.vb 1.. eof(lnput), store(sp+11.vi; 902 end else errori(' code in error539 6: store[spkvb :N etore(epl.vc ) atore(sp+1).vc; 903 end;840 2: etore(sp).vb :- storo(sp).vr > I:tor:3(•1)+11.yr; 904841 3: store(sp).vb :- store(ep).vb > etore(sp+11.vb; 905 28 (*adi"): begin sp : - sp - 1;843 5: begin compare; 907 end;844 store(sp).vb t., not b and 908545 (store(il+i).vi > •tore(l2+tkvi) 909 29 (hadrh); begin ap :.., sp-I;846 end 910, store(spj.vr ;.., store(sp).vr + store(sp+11.vr847 end; (*caps ph) 911 end;540 end; 912,)851 case p of 915 end;852 0: orrori(' - for address '); 916853 1: storelsp).vb ... storol•p).vi (- storelep+1).vi; 917 31 (Asbr*): begin sp 1... op-1;855 2: otore(sp).vb t ■ atoro(sp).vr O. store(sp+1).vr; 919 end;556 3: store(sp).vb 1... storo(sp).vb O. storelap+1).vb; 920057 4: ntore(sp).vb :.. store(sp).v• Os stordsp+11.vo, 921 32 (hags's)! store(sp).vs :... (store(sp1.vil.858 5: begin compare; 922860 (store(11+il.vi C. store(i2+1).vi) 924861 end; 925 34 ("110): storelep - 11.vr :P store(sp - 1).vi;862 end; ("case ph) 926863 end; 927 15 (Acre"): store(sp).vi : - trunc(store(sp).vr);864 928865 22 ( 4 1o0)1 begin tip ;- sp-I; 929 36 (o.ngi*); storo(epj.vi ;., -atore(sp).vi;866 case p of 930867 01 crrori(' ,>-. for address '); 931 37 (ongr")1 store(sp).vr 1. -atore(sp).vr;868 I: "torelsp).vb :.. store(sp).vi < atore(•p+!).vi; 932869 6: storelepl.vb IP storelsid.vc < store(sp+1).vc; 933 38 (*eqi*): store(spl.vi t ■ sqr(store(sP).vi);U70 2: store(sp).vb 1.• store(sp).vr < storelep+11.vr; 934871 3: etore(ep).vb :P store(sp).vb < storo(sp+11.vb; 935 39 (*sqr"): •tora(sp).vr ;.. sqr(store(spl.vr);872 5: begin compare; 936873 store(sp).vb :.. not b and 937 40 (*obi"): •tore(sp).vi ,i- abs(store(sp).vi);074 (store(11+1).vi < store(i2+ikvi) 938875 end I 939 41 (*abr"): store(sp).vr :. abs(storelsp).vr);876 end; ("case ph) 940877 end; 941 42 (*not*): store(ep).vb 1. not store(sp).vb;879 23 (hujph)1 pc I. q; 943 43 ("and")1 begin •p JP sp-1;880 944 store(•phvb :P store(•p).vb and •tore(sp+1).vb881 24 (*t)p*): begin it not store(ep).vb then pc 1- (I; 945 ends882 sp :- ap - 1 946883 end; 947 44 ("loth): begin sp 10 sp-1;504 948 ' •toro(spl.vb 1... store(sp).vb or store(ap+1).vb1355 25 (Aajp*)! begin 949 end;886 pc 10 sfore(sp).vi + q; 950857 sp :- ap-1 951 45 (hdifh): begin ap 1. op-I;888 end; 952 storelsp).vs 1-. storolep1.vs - •tore(spt11.vs575 942

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!