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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

32 Pascal Implementation: Compiler and Assembler/Interpreter Compiler Listing 33104918501851185210531854105518561857185818591860106118621863186418651866186718681869187018711872187318741875187618771878187918801881188210831884188518861887188818891890189118921893189418951896189/189818991900190119021903190419051906190719081909191019111912elseboginIf lop m 38 thanbegin write(prr,"");with cetptrlfp21" dobeginfor k im 1 to elgth do write(prr,evel1k1:1);for k am elgth+1 to etrglgth do writo(prr,' ');andwriteln(prr,"")endelse if fop - 42 then writeln(prc,chr(fp2))else writeln(prr,fp2112);mee(fop)endend;is 1- lc + 1end (*gent*) 1procedure gen2(fopi oprenge; fpl,fp2t integer);var k 1 integer;beginif prcodo thenbegin putici writs(prroln1fop1e4);ceee top of45,50,54,561writeln(prr,' ,fpli3,fp218);41,48,49,52,53,551begin writs(prr,chr(fp1));if chr(fpl) m 'm' then writs(prr,fp2ill);writeln(prr)end;51,case Ypl of1, writein(prWi ',tp2);21 begin write(prr,'r I );with cetptrlfp21" dofor k tm 1 to otrglgth do write(prr,rval1k1);writeln(prr)end;31 writeln(prr,'b41 writeln(prr,'n');61 writeln(prr,'c '":3,chr(fp2),"");Si begin write(prr,'(');with cstptr(fp2)" dofor k 1m setlow to sethigh doif k in pvel then write(prr,k13)1writeln(prr,')')endendend;end;is 1- is + 1; mee(fop)end (Agen2A)procedure gentypindicstor(fept etp);beginif fepOnil thanwith for domom form ofscaler{ if ferintptr then write(prr,'i')elseif tep-boolptr than write(prr,'b')also1913 it fopmcharptr than write(prr,'c')1914 else1915 if scslkind m declared then wrItu(prr,'1')1916 else write(prWr');1917 eubrangoi gontypindicetor(rengetype);1918 pointer' write(prr, g a');1919 powers write(prWe');1920 cecorde,arreyet write(prr s 'm');1921 filee,tegfld,vArientt error(500)1922 end1923 end (*typindicator");19241925 procedure genOt(fopt oprAnges for etp);1926 begin1927 if prcode then1928 begin putic;1929 write(prr,mn(fop)14);1930 gentypindicetor(fop);1931 writeln(prr);19)2 end;1933 lc is + 1; mee(fop)1934 and (*genOt")119351936 procedure genit(fopt opt-tinge; fp21 integer; lap: etp);1937 begin1938 if prcodo then1939 begin putic;1940 write(prr,mnifopj14);1941 gentypindtcator(fep);1942 writeln(prr,fp2i11)1943 end;1944 is is + I; mee(fop)1945 and (ogenitA)11946•1947 procedure gen2t(fopt oprnnne; fpl,fp2: integer; fop: etp);1948 begin1949 if prcode then1950 begin putic;1951 write(prr,mn(fop)1 4);1952 gentypindicator(fep);19531954writeln(prr,fpl13+5"ord(ebe(fp1))99),4218):end;1955 Ic is + 1; mee(fop)1956 end ( 4 gen20);19571958 procedure load;1959 begin1960 with gattr do1961 It typtr nil then1962 begin1963 CASO kind of1964 cot, if (typtr".form - scaler) end (typtr realptr) then1965 if typtr - boolptr then gen2(51(*Idc"),3,cvel.lvel)1966 elee1967 if typtr ■ charptr then1968 gen2(51( 0 1dc"),6,cval.ival)1969 else gen2(51(Aldc*),1,cval.iyAl)1970 else1911 if typtr1972 elsenilptr then gen2(51( , 1dc"). 4 .0)if cetptrix >- cetoccmax then error(254)1974 elee19731975 begin chtptrix t ■ cetptrlx + 1;1976 cetptrIcetptrixl 1.* cvel.volp;

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

Saved successfully!

Ooh no, something went wrong!