< > DisZ80 1.01 - 09-Jan-1989 - Z80 disassembly routines :  ݤDis_Name(A%):X%?3=0:="Z80" (CݤDis_Code(A%,Ptr%,Data%): s%,d%,c%,xy%:!X%=0:num%=1:c%=?Data% 28d%=c%7:s%=(c%&38)8:$(X%+4)=("FNz80_"+~(c%&C0)) <X%?3=num%:=num% F: P3ݤalu(A%)="ADDADCSUBSBCANDXOROR CP ",A%*3+1,3) Z3ݤrot(A%)="RLCRRCRL RR SLASRASLSSRL",A%*3+1,3) dݤr(A%)="BCDEHLFA",A%+1,1) n>ݤdrg(A%)="BCDEHLSPIXAFIY",(A%1)+((xy%*4)((A%6)=4)),2) x$ݤreg(A%):xy%=0 A%<>6:=r(A%) A%=6 xy%=0:="(HL)" 7A%=6:num%=num%+1:="(I"+(87+xy%)+rel(Data%?2)+")" #(A%6)=4:="I"+(87+xy%)+r(A%) =r(A%) +ݤrel(A%):A%<128:="+"+A% =(A%-256) /ݤjr(A%):="&"+h0(Ptr%+A%+2+256*(A%>127),4) Kݤcc(A%)="NZZ NCC POPEP M ",A%*2+1,2-((A% 1) (A%<4))-(1 (A%>5))) : ݤz80_0:c%=0:="NOP" @(c%&F7)=&10:num%=2:="DJNZJR ",s%*4-7,4)+" "+jr(Data%?1) )d%=7 s%<4:=rot(s%),3+(s%>1))+"A" %d%=7:="DAACPLSCFCCF",s%*3-11,3) Cd%=6:num%=num%+1:="LD "+reg(s%)+",&"+h0(?(Data%+num%-1),2) 4(d%6)=4:="INCDEC",(d%1)*3+1,3)+" "+reg(s%) 0d%=3:="INCDEC",(s%1)*3+1,3)+" "+drg(s%) Fc%=&22:num%=num%+2:="LD (&"+h0(!(Data%+num%-2),4)+"),"+drg(4) "Ic%=&2A:num%=num%+2:="LD "+drg(4)+",(&"+h0(!(Data%+num%-2),4)+")" ,7c%=&32:num%=num%+2:="LD (&"+h0(Data%!1,4)+"),A" 67c%=&3A:num%=num%+2:="LD A,(&"+h0(Data%!1,4)+")" @-d%=2 (s%5)=0:="LD ("+drg(s%)+"),A" J"d%=2:="LD A,("+drg(s%)+")" T2d%=1 (s%1)=1:="ADD "+drg(4)+","+drg(s%) ^Cd%=1:num%=num%+2:="LD "+drg(s%)+",&"+h0(!(Data%+num%-2),4) h@d%=0 s%>3:num%=num%+1:="JR "+cc(s%3)+","+jr(Data%?1) r="EX AF,AF'" |: ݤz80_40:c%=&76:="HALT" ' s%=6:="LD "+reg(s%)+","+r(d%) ' d%=6:="LD "+r(s%)+","+reg(d%) "="LD "+reg(s%)+","+reg(d%) : 7ݤz80_80:=alu(s%)+" "+"A,",s%<2 s%=3)+reg(d%) /ݤz80_C0:d%=5 (s%1)=1:=("FNz80_"+~c%) c%=&CB:=z80_CB !d%=7:="RST &"+h0(c%&38,2) 8d%=6 s%<4:num%=2:=alu(s%)+" A,&"+h0(Data%?1,2) /d%=6:num%=2:=alu(s%)+" &"+h0(Data%?1,2) H(d%3)=1 (s%1)=0:="POP PUSH",(d%4)*4+1,4)+" "+drg(s%-4*(s%>5)) :d%=4:num%=num%+2:="CALL "+cc(s%)+",&"+h0(Data%!1,4) :d%=2:num%=num%+2:="JP "+cc(s%)+",&"+h0(Data%!1,4) d%=0:="RET "+cc(s%) +c%=&C3:num%=3:="JP &"+h0(Data%!1,4) &c%=&C9:="RET" 02c%=&D3:num%=2:="OUT (&"+h0(Data%?1,2)+"),A" :2c%=&DB:num%=2:="IN A,(&"+h0(Data%?1,2)+")" Dc%=&D9:="EXX" N!c%=&E3:="EX (SP),"+drg(4) X!c%=&E9:="JP ("+drg(4)+")" bc%=&EB:="EX DE,HL" lc%=&F9:="LD SP,HL" v="DIEI",(s%1)*2+1,2) : ,ݤz80_CD:num%=3:="CALL &"+h0(Data%!1,4) 5ݤz80_CB:num%=num%+1:xy%:c%=Data%?3 c%=Data%?1 9d%=c%7:s%=(c%&38)8:c%<&40:=rot(s%)+" "+reg(d%) 8="BITRESSET",(c%64)*3-2,3)+" "+(s%)+","+reg(d%) :  ݤz80_DD  ݤz80_FD ,xy%:num%=1:="DEFB &"+h0(xy%*&20+&BD,2) ' A$:xy%=(c%&20)&20+1:num%=num%+1 >c%=Data%?1:d%=c%7:s%=(c%&38)8:A$=("FNz80_"+~(c%&C0)) FA$,4),"X")+A$,"Y")=0:num%=1:="DEFB &"+h0(xy%*&20+&BD,2) =A$ : 5ݤz80_ED:xy%:num%=1:="DEFB &"+h0(xy%*&20+&CD,2)  0num%=num%+1:c%=Data%?1:d%=c%7:s%=(c%&38)8 c%<&10:="DEFW &"+h0(c%*256+&ED,4)+":\ MOS_"+"QUITCLI BYTEWORDWRCHRDCHFILEARGSBGETBPUTGBPBFINDFF0CFF0DFF0EFF0F",c%*4+1,4)  &c%<&40 c%>&C0:num%=1:="DEFB &ED" *4(c%&C7)=&42:=alu(3-(s%1)*2)+" HL,"+drg(s%) 4H(c%&CF)=&4B:num%=num%+2:="LD "+drg(s%)+",(&"+h0(Data%!2,4)+")" >E(c%&CF)=&43:num%=num%+2:="LD (&"+h0(Data%!2,4)+"),"+drg(s%) H((c%&C7)=&40:="IN "+r(s%)+",(C)" R%(c%&C7)=&41:="OUT (C),"+r(s%) \0(c%&E7)=&46 s%<>1:="IM "+(s%-1-(s%=0)) f'(c%&F7)=&67:="RRDRLD",s%*3-11,3) p((c%&F7)=&45:="RETNRETI",s%*4+1,4) zc%=&44:="NEG" P(c%&E7)=&47:="LD "+(65-8*(s%=0)-17*(s%=1))+","+(65-8*(s%=2)-17*(s%=3)) G(c%&E4)=&A0:="LDCPINOT",d%*2+1,2)+(73-5*(s%1))+(32+25*(s%2)) num%=1:="DEFB &ED"