> Mon86 ::end: Hos%=fx(0,1):(fx(135,0)256)((<&FFFF)&80):<&FFFF:=fx(132,0) (Hio%=(fx(130,0)=&FFFF)(os%<6):ad$="ddress":dd$="isassembl":*FX219,9 2]ctrl%39,data%15,zp%3,A%-1:bln%=-A%-1500*(1-2*(>&FFFF)):buf%=-bln%:cpu:err:end: <&X%=ctrl%:Y%=X%256:P%:P%= F:hlp:menu:end: P#ݤerr:<0:P%=P%2:O%=O%2:=-1 Z:<>17: d-1:" at line "; n=-1 xend:"FX3": bot:*QUIT  nݤmenu:'30"Memory: &"ho(P%-O%,W%)19)"Origin: &"ho(O%,W%)'"Buffer: &";~buf%18)"Buffer size: &";~bln%' >addr%=line(P%):num%=addr%-P%::addr%=line(addr%):>=ht% %Q$=:Q$>"`"Q$<"{":Q$=(Q$-32) )8+9+13+127+"*+-;= ",Q$)Q$>="0" Q$=13:P%=P%+1:=0 Q$=127Q$=8:P%=P%-1:=0 Q$=" ":P%=P%+num%:=0 ,(Q$>"/"Q$<":")(Q$>"@"Q$<"G"):hex:=0 Q$="L":lst:=0 Q$="T"Q$="Y":"MessageText",1-7*(Q$="T"),7);:": "A$:A%=P%?A$:$P%=A$:P%?A$=A%:P%?(A$-1)=P%?(A$-1)((Q$="Y")&80):P%=P%+A$:=0 Q$=9:Z%=Z%64:=0 Q$="M":m:=0 Q$="O":o:=0 Q$="+"Q$=";":P%=P%+8:=0 "Q$="-"Q$="=":P%=P%-8:=0 ,Q$="*":osc:Q$="":=0 6Q$="H":Z%=Z%32:col:=0 @WQ$="G":"Load file: "A$:A$<>"":"LOAD """+A$+""" "+~buf%+"+"+~bln%,os%=32):=0 JYQ$="P":"Save file: "A$:A$<>"":"Length: &"Q$:"SAVE """+A$+""" "+~buf%+"+"+Q$:=0 T+Q$="J":Z%=(Z%-4)+((Z%3)+1)3:col:=0 ^$Q$="W":W%="44456784",W%,1):=0 hQ$="S":mde:=0 r0Q$="Z":Dis_Name(0)="":M%=Dis_CPU:cpu:=0 |Q$="R":io%:rom:=0 ?Q$="Q"Q$="X":"Quit? "Q$:A%=(Q$&DF)=89:Q$="":A%:Q$="Q"  =Q$="Q" (ݤline(addr%):ho(addr%-O%,W%);" "; Qio%:addr%<0:N%=07:data%?N%=rm(addr%+N%):N%=0154:data%!N%=addr%!N%: ^Z%64:A%=11-Z%16:N%=0A%:ho(data%?N%,2)" ";::N%=0A%:c(data%?N%);:::=addr%+A%+1 -N%=Dis_Code(M%,addr%-O%,data%)-1:A%=Z%3 0B%=0N%2^A%:ho(data%!B%,2*(2^A%));" ";: 'W%+U%);:B%=0N%:c(data%?B%);: ,W%+V%);:$(X%+4)8:(X%?264):"":O%=("&"+A$) N,"FX3":addr%=line(addr%):addr%>end%: X1hex:"Bytes: &";Q$;::A%=:A%>96:A%=A%&DF b+(A%=95A%=8)Q$<>"":127:Q$=Q$,Q$-1) l7((A%>47A%<58)(A%>64A%<71))Q$<30:A%:Q$=Q$+A% vAA%=13:Q$<>""::?P%=("&"+Q$,2)):P%=P%+1:Q$=Q$,3):Q$<2: Posc:bot::"*"A$:A$:58:Q$=(&DF):10+13+"GP",Q$):127:Q$<>10: 7rom:"ROM: &"A$:A$=uc(A$):A$="":P%=P%&FFFFFF: .P%=(P%&FFFF)&FF00000065536*("&F"+A$): mde:"Mode: "A$:A$="": &Q%=(A$)&80:io%:fx(133,Q%)<:  22,Q%: gcpu:X%=ctrl%:Y%=X%256:!X%=0:M$=Dis_Name(M%)+" D"+dd$+"er":W%=(X%?33)*2+4:Z%=(X%?3/4)31:col: /col:A%=Z%4:U%=A%*3+13:V%=U%+A%+6:A%<8: U%=17:V%=U%+7: $bot:260,ht%-8*(wd%<40)-1): =hlp:"FX3,16":26,12:wd%=fx(160,10):ht%=fx(160,9)&FF wd%>50:28,wd%-29,ht%,wd%,0:(14-M$/2);M$''"RETURN forward 1 + forward 8"'"DELETE back 1"5"- back 8"'"SPACE move past code"''" M: Set memory a"ad$'" O: Set code origin" wd%>50:" W: A"ad$" width"'" J: Data width"'" H: Hex/Oct toggle"'"TAB: Dump/list"''"0-9 A-F: Enter bytes"'" T: Enter text"'" Y: Enter message" wd%>50:" L: List d"dd$"y"'" G: Load file"'" P: Save file"'" Z: Select CPU"'" S: Screen mode"'" R: ROM number"'" Q: Quit":28,0,ht%,wd%-31,0:  \((wd%+1-M$)/2);M$:28,0,ht%,wd%,ht%-5:B$=" ":C$=" ":fx(135,0)256=7:B$=132:C$=135 B$"RETURN"C$"forward 1"5;B$"+"C$"forward 8"'B$"DELETE"C$"backward 1"4;B$"-"C$"backward 8"'B$"TAB"C$"DUMP/LIST"8;B$"H"C$"HEX/ASCII"  B$"M"C$"Set memory a"ad$" "B$"O"C$"Set code offset"8'B$"T"C$"Enter text"9;B$"Y"C$"Enter message"'B$"L"C$"List d"dd$"y "B$"SPC"C$"Move past code";:28,0,ht%-6,wd%,1:ht%=ht%-7: *2ݤho(A%,N%):Z%32:=o0(A%,N%*3/2)=h0(A%,N%) 4-ݤc(A%):A%=A%127:A%=127A%<32:="."=A% >ݤuc(A$):B$:A$="":="" H5B$=B$+(A$((A$<"@")&DF)):A$=A$,2):A$="":=B$ R#ݤh0(A%,N%)="0000000"+~A%,N%) \4ݤo0(A%,N%):A$,B%,L%:A%<0:B%=2:A%=A%&7FFFFFFF f;A$=(A%7)+A$:A%=A%8:L%=L%+3:L%>27:=(A%+B%)+A$,N%) p?ݤfx(A%,X%):Y%:Y%=X%256:<&FFFFF:=((&FFF4)&FFFF00)256 z-A%=135:X%=:X%>-1:=X%*256A%=135:=&A00 (A%=160:X%=10:=@vdu%!28@vdu%!216-1 'A%=160:X%=9:=@vdu%!36@vdu%!220-1 =((&FFF4)&FFFF00)256 7ݤrm(!&F6):Y%:Y%=?&F8+&40:Y%&40:?&F7>&BF:?&F9=0 1!&F6<0:?&F7>&7FY%=&3E:=(&FFB9)&FF=?!&F6 'ݤDis_Name(A%)="80x86 (INCOMPLETE)" /ݤDis_Code(A%,Ptr%,Data%):s%,d%,c%,w%,num% 2num%=1:c%=?Data%:w%=c%1:d%=c%7:s%=(c%&38)8 &!X%=0:$(X%+4)=_86:X%?3=num%:=num% ݤ_86:num%=1 ;(c%&C6)=0:=alu(s%)+" "+mr+","+reg((Data%?1&38)8) ;(c%&C6)=0:=alu(s%)+" "+reg((Data%?1&38)8)+","+mr  ="???" ="DB &"+h0(op%,2) 3ݤalu(A%)="ADDOR ADCSBBANDSUBXORCMP",A%*3+1,3) Hݤmr:num%=num%+1:A%=Data%?1:mod%=(A%&C0):reg%=(A%&38)8:rm%=(A%7) $mod%=&C0:=reg(rm%) .mod%=&00:=ea(A%)+"]" 8Amod%=&80:num%=num%+1:=ea(A%)+"+&"+h0(Data%?(num%-1),2)+"]" BAmod%=&40:num%=num%+2:=ea(A%)+"+&"+h0(Data%?(num%-2),4)+"]" L="?" V0ݤreg(A%):w%:="AXCXDXBXSPBPSIDI",A%*2+1,2) `"="ALCLDLBLAHCHDHBH",A%*2+1,2) j ݤea(A%) tA%=0:="[BX+SI" ~A%=1:="[BX+DI" A%=2:="[BP+SI" A%=3:="[BP+DI" A%=4:="[SI" A%=5:="[DI" A%=7:="[BX" +num%=num%+2:="[&"+h0(Data%!(num%-2),4) 3ݤrot(A%)="RLCRRCRL RR SLASRASLSSRL",A%*3+1,3) ݤr(A%)="BCDEHLFA",A%+1,1) >ݤdrg(A%)="BCDEHLSPIXAFIY",(A%1)+((xy%*4)((A%6)=4)),2) "ݤreg(A%):xy%=0A%<>6:=r(A%) A%=6xy%=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) Dݤjr(A%):A%<128:="&"+h0(Ptr%+A%+2,4)="&"+h0(Ptr%+A%+2-256,4) (Eݤcc(A%)="NZZ NCC POPEP M ",A%*2+1,2-((A%1)(A%<4))-(1(A%>5))) 2ݤz80_0:c%=0:="NOP" <@(c%&F7)=&10:num%=2:="DJNZJR ",s%*4-7,4)+" "+jr(Data%?1) F'd%=7s%<4:=rot(s%),3+(s%>1))+"A" P%d%=7:="DAACPLSCFCCF",s%*3-11,3) ZCd%=6:num%=num%+1:="LD "+reg(s%)+",&"+h0(?(Data%+num%-1),2) d4(d%6)=4:="INCDEC",(d%1)*3+1,3)+" "+reg(s%) n0d%=3:="INCDEC",(s%1)*3+1,3)+" "+drg(s%) xFc%=&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" 7c%=&3A:num%=num%+2:="LD A,(&"+h0(Data%!1,4)+")" +d%=2(s%5)=0:="LD ("+drg(s%)+"),A" "d%=2:="LD A,("+drg(s%)+")" 0d%=1(s%1)=1:="ADD "+drg(4)+","+drg(s%) Cd%=1:num%=num%+2:="LD "+drg(s%)+",&"+h0(!(Data%+num%-2),4) >d%=0s%>3:num%=num%+1:="JR "+cc(s%3)+","+jr(Data%?1) ="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%) Dݤz80_80:s%<4:=alu(s%)+" A,"+reg(d%)=alu(s%)+" "+reg(d%) -ݤz80_C0:d%=5(s%1)=1:=("FNz80_"+~c%) c%=&CB:=z80_CB "!d%=7:="RST &"+h0(c%&38,2) ,6d%=6s%<4:num%=2:=alu(s%)+" A,&"+h0(Data%?1,2) 6/d%=6:num%=2:=alu(s%)+" &"+h0(Data%?1,2) @G(d%3)=1(s%1)=0:="POP PUSH",(d%4)*4+1,4)+" "+drg(s%-4*(s%>5)) J:d%=4:num%=num%+2:="CALL "+cc(s%)+",&"+h0(Data%!1,4) T:d%=2:num%=num%+2:="JP "+cc(s%)+",&"+h0(Data%!1,4) ^d%=0:="RET "+cc(s%) h+c%=&C3:num%=3:="JP &"+h0(Data%!1,4) rc%=&C9:="RET" |2c%=&D3:num%=2:="OUT (&"+h0(Data%?1,2)+"),A" 2c%=&DB:num%=2:="IN A,(&"+h0(Data%?1,2)+")" c%=&D9:="EXX" !c%=&E3:="EX (SP),"+drg(4) !c%=&E9:="JP ("+drg(4)+")" c%=&EB:="EX DE,HL" c%=&F9:="LD SP,HL" ="DIEI",(s%1)*2+1,2) ,ݤz80_CD:num%=3:="CALL &"+h0(Data%!1,4) 3ݤz80_CB:num%=num%+1:xy%:c%=Data%?3c%=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)) &DA$,4),"X")+A$,"Y")=0:num%=1:="DEFB &"+h0(xy%*&20+&BD,2)=A$ 05ݤz80_ED:xy%:num%=1:="DEFB &"+h0(xy%*&20+&CD,2) :0num%=num%+1:c%=Data%?1:d%=c%7:s%=(c%&38)8 Dc%<&10:="DEFW &"+h0(c%*256+&ED,4)+":\ MOS_"+"QUITCLI BYTEWORDWRCHRDCHFILEARGSBGETBPUTGBPBFINDFF0CFF0DFF0EFF0F",c%*4+1,4) N%c%<&40c%>&C0:num%=1:="DEFB &ED" X4(c%&C7)=&42:=alu(3-(s%1)*2)+" HL,"+drg(s%) bH(c%&CF)=&4B:num%=num%+2:="LD "+drg(s%)+",(&"+h0(Data%!2,4)+")" lE(c%&CF)=&43:num%=num%+2:="LD (&"+h0(Data%!2,4)+"),"+drg(s%) v((c%&C7)=&40:="IN "+r(s%)+",(C)" %(c%&C7)=&41:="OUT (C),"+r(s%) /(c%&E7)=&46s%<>1:="IM "+(s%-1-(s%=0)) '(c%&F7)=&67:="RRDRLD",s%*3-11,3) ((c%&F7)=&45:="RETNRETI",s%*4+1,4) c%=&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"