From a0b02231bf4ce778bc2802f1ef51e1a697b29b0d Mon Sep 17 00:00:00 2001 From: Sven Van de Velde Date: Sun, 8 Oct 2023 14:47:56 +0200 Subject: [PATCH] - Test cases and creation of correct R43 SMC.BIN for testing - Fixing SMC.BIN header for compatible ROM.BINs --- SMC.BIN | Bin 0 -> 7466 bytes python/SMC-HEADER.BIN | Bin 0 -> 32 bytes python/{r45.1.preview.bin => SMC-R45.1.0.BIN} | Bin python/SMC.BIN | Bin 0 -> 7482 bytes .../firmware_and_bootloader_r45.1.preview.hex | 499 - python/smc_convert.py | 21 +- python/x16-smc-header.hex | 3 + ...{x16-smc-r45.1.hex => x16-smc-r45.1.0.hex} | 931 +- src/cx16-display-text.h | 17 +- src/cx16-display.c | 2 +- src/cx16-smc.c | 62 +- src/cx16-smc.h | 13 +- src/cx16-status.c | 20 +- src/cx16-update.c | 187 +- target/src/cx16-update.asm | 15206 +++++++++------- target/src/cx16-update.klog | 4 +- target/src/cx16-update.prg | Bin 21904 -> 24372 bytes tests/cx16-tests.md | 75 + 18 files changed, 8997 insertions(+), 8043 deletions(-) create mode 100644 SMC.BIN create mode 100644 python/SMC-HEADER.BIN rename python/{r45.1.preview.bin => SMC-R45.1.0.BIN} (100%) create mode 100644 python/SMC.BIN delete mode 100644 python/firmware_and_bootloader_r45.1.preview.hex create mode 100644 python/x16-smc-header.hex rename python/{x16-smc-r45.1.hex => x16-smc-r45.1.0.hex} (96%) create mode 100644 tests/cx16-tests.md diff --git a/SMC.BIN b/SMC.BIN new file mode 100644 index 0000000000000000000000000000000000000000..0c606e2642607edf5f8646446adb110fdd6cbccc GIT binary patch literal 7466 zcmb7J3s@9Kw(c^bjK-ZAd>{}7!~~5BGrlz%G;zN?_U?zSd0d|iVvHJZ#G7bhVq*6U z$P5EB{g@FjF$jD&*+h+ERB%_NFj*IK4J~=77=gkUzNd+;W4@qsPxTCh*-cpcH_dDe4K}!I2SwcyUg4F zow?$DX7xKO-!dSEnKYc4XzT)vlHy_`9$^?$a(wTwt_(BTJg9G%1VL3&{#0 z(*vojjUx^{D@llzJcuJa3HQbcBH{%BC8voo#hDz86H#$mab_H}iIL6Mw6SToVJt6+ z=&Z~W7DgSGQz~wHSRo0HYwG8>bf>}ZS6WiZ4zW5!29?nUgpES9I1(}3vUi@4X>GTGWDF?PN(xDQiNvFj&N!;2 zQ|%grujI5i&|tW?4cSVpw;sW^lI%ctc(S*;!PDyH=zK7SgVKhqoIA~(DRG67FDRwl zm-?#Y@&SF;FO#fb3rfS4QQB={mDsKYy%Z}^OMbsaT znlaaGNYSZ3VeV|qM4eiPxl@Lxb?SGRJ7a|RA?yH&4cL&9sk(if-a>5S$E#d2H@&E5 z8@f0zkh)N)MKhZs%sOQ+c9vKz&a&<}XS7cJ5=A~b2-rEuXUDDIZnvGCj-@r zq3K&WY7FI@v$iEPgLCaEm_g@vmblh7$kx+zt!X&I%qdZ0Rw$HbPwcze4C}fwHcnN@ zsab(k3s;LSHb$2QWn>qumt!><*@c1}Ig;{c7w3iKX47+I<2ap?FV~{|jnvk5nIrjS z*_!M+l>>=%>W4C&>Cp$wMCIPu7@W!dL3(H=_xp20Gr8Y+mCCQo1O2%_oFV6yxYKgW zUeWl?k>6~oMc&3&=^V-{Kw-B`fymS0<5R)MJ&txS{}{ZSVt_`bh|=Dr#?pSJeM@PJ z$k_l9vy`$sh{zKpj>a7cMo>hsLL#!6UI5>p1~KN3$T2KRX(j=p^H@*wgqQvZF>D&3 zaJjfvbc@B}gAnvxMPo&;ih&iZ5Dz>Cp&XMC#)Z(NQ>J2GcphTJ3#c%%zIELhfqc~j zSjTptngCRBC_IUIw5X?}Aq(5hLYPkZGiHTF=!$G#V>i{S&!K?N9bMdG(clcvx(fpF zG^vP_Qc;FymBBARhu}*{MdKR2L9VD`U0&afVcW0G#uUR(BN|2LHO$2HEz9gEAuL|a zKgE-o4YM!@Ur{QJ&NpSNR;N_I$gc5Jh8Hj)x0}xhZXZuBj-TLfhOaDPGUf^#*I6N* z@sQO?oUseGk$00=p%B(xq{YCTzR&-%b@%?={~TU7Jip?TioB?eI{ogOo=>Xu`}3== zRNSsGuV0JkI!sM|#M*Kv>J+COl$O%%->=`lb$`1its|){Wip-d;7Qs)5cu?}dQfC4 z=H2{SemO*_oIp41e#d6&ujH7HsO~hLw4t+q38W4d;5{>tdPcYkJC{PP>I1Qt;QN1s zox)||R07q-43&C?(_~PcX{TkDG((}0IT$JJTwT*pZXy@o*BlnF#7{TtCfbJDXiMB! zbJ$HaVVIzD#(~($ai-O(l{jr#=XkQg=CEDm0-UK}g+e9Qc_?Op#@G#WchS&3h}EWg zKOH|+jj^_mzRca?h-@{j@W)us!`|42F1-{;9ZlEMXI zf*sAFbl_u_Y9Soi*R<@^3h)=6ymT@hzIVw%9d+nBduDNJ8_E*w35OJ(*!4xRZKx$A zM;oFN{X_UsNH_Mv#jwZc32|O)LY`#jh9nHJ6>Am__bxEaP-*WZ!J5o^ZP0(7O9H9f z&~{l!8a5o{zbL1J94nhF@Z7J}|E|@SK|Px+X)=hbklM7+7nJta&*$Z!EiJ@JJ_SlE zDQkKxcR=pI+!$BT0>S>vP0^*H?@-jud_ba#yj!JV3#G z$WqcEOR=B>T4qwyufE&GZohTwuTbQF--N|^=!iHU5it!Zq6In0UmJO0E-Er9s$d$@ zN_9OnIez-6o}Z(5Vj_D`7fiF57rm$aal&l$#IQJNHi{GGAS+~8b0CM}rMajpE;21q zHkbq@(2=zme}#z6Lhp6RQsy9Q;;5Fzsp0 zHR+T}neuIyX(muCKwzgpBzBVXjp<;4B3S(bh>q>@Q3{^WY=MPYDMxqOM%hWSHR{^N z^T1<{#-ls%cu#Bny77`sty!ggWj3A(SvaO?pexo@i+(xTKV-?y5&V3k1$^YyMru(O zEXspLH-SaBYZk4B7`6&le5}DSj8h+M^_u?m;TOYy3%?AyZqE{3S8MuN$?Y+W-^W zQ9c>izzbXcO-y{DVd4wG#AXc>n>9>qc_=2fXqecnVPbO#6T1NuU)+U>-P$ho%^gha z3}NCcz`<_7#18O&THmQ*Vi$aEfwCFO7aAsZg)p(@eoVls+kK)x*nCF_6ZvF*LpsSP zdRYAqut&Rml%gFIw0(<)iG1=KMBaQdt$|`6l9!EzACc*OyJ=ICDn?p`AtVsFVR2TNPD%Rgdbiee?yPaB;DA-tA z{Cb$To+nr2toqaP0ic=%*-S74da+=Mc7~#-hj4E~!6AP~Ptlz^2N}=|HBLxCCSfq5 zd+HJ;-eeBrTDug`j4T0sXE4pk)Z#{j`!`_VegyI>Dv=qokoJCbealHavM%hg)2iK%-MO0I$bkZ0|6Xz53U9_DjP8tf{3X~F1Nv6EEtl5b zk>)6wxtWug6I{+>w8!u<-pYblH@zeekHZaR`c z9cH9AE}VOhRpU~*fo*Z^;bpqV4?&fMv6Vl`*`Ye^VT4hDkI@MAHHPWbH8KXNSy)FN ztYf9@DtEni;o8cNGUb)W;7kFsVYuB`B3BmfxXVW#uJ5~NNLM=eo0UJ^#nT{C>2`b+ zjkkZ)CewAYKG&Xq*D7{j%U$w3$oACoefJLBOY<7AL@RyUAfu+a;?xuA@XS3y^NpvV z?j%{-?wt;rfGlV_&5nA3)}d}H_tOz?pD>6W851k)3h~?(;^`uhz{f=_z%!p1p`K4> zYdp(=C+s4?bC<>w>KacMc@cPa>^T1#NfME&-t{;ttQJQVU&WD}ee3q+5cj^E^XvB9 z^ceO>?(Mgit~hG%V|%mDxc6n9%irgyU>7=IltGkWfAB!@LgAsfp$Je!WIe-5BcV1H z$`~l4p^QQYHsB3^+Yt0XYMI;?8VyH-$BsgdW(n$Jp*{xXommg{Jg7S%-nihMkL)e9 zEeq;4Xj=#GY?OV$18r-d{yyw-HuAsqG_$YKo~z-xjvUaQRrNGlXV%|>FOF1d&n5LV zZ%b?*Lrl^{6emr9Og+0IZ>`mmUFED`7dxwHfBeO<&_5pf$KBh%&{>t|D@^i`Uz4gy zg0D1b{3%<~Gh}DdOma3!?=z6YgTM7;kfTXC=OODl?rsst#p5~fY&lMZr_oioH<Q~iu#`0=|_$-W= ziVV_g3?nUMSm6!uo+u>}M!o@~mT6xj>J8#D_zLEZ48#Xiz=v)wmXb_upW}Y|684qJ zK%Wl&ynun+o?!}f*N+I3G?`doH+Yv$t(2S1;mY!Ag>gRCX??ehYTi zN&~rCi>3R0>^M19+hGx%G8R@a88wk(&oDYK;>XGA7|Q zCLXfTR>03k&OwQ&UNZ^9Ij5q9;jttdJbv;q>ibzk%LDa!*q(N_TaIk zT6!yF0=&inULDDevIzImZ{SK*Fq{1t^11x0^khrV(-_Xv1oj3jbs$_3ryy%{o$S#@ zeUg%XqjRs@cR;4|R)Hn%9Y=3r;z70@a-6UdJqeiFE~Y>f?L^gFDh~(mEtXxrjoSHq z@o_2__50tK%LTntP&UcZX5i!}Q;@$(tG^HRI`GI8SjQrW(ZA1wt}UxMLmOp*Q95Nm zSY|59Zl0x`*jvuGk_fBO+S}UK+Q%Ac?PrCo$+m#}aMah*xhGHSIe4_?zMdSdXV1}t zXX=RaDo=`Rc3ZSH#u_{&$L98TMY*C~F)n&H(7&`6-8@QbG1h2n4%~H8>ZsD_(wNf6 zN(Yn5|CZ%?oBgq$(zCVu3Qy=MC<3JIliN49Uv6Zs!DVzsxO%(j zx!a)KI83OaXQnV-703vk=cXqhcWnzi5@3uGeP$W^#3nw?FjGDZ{i{d+xa9vFiZaY+f*W;IKwjc7>h*-cpcH_dDe4K}!I2SwcyUg4F zow?$DX7xKO-!dSEnKXi#XzT)v6Juj~Kf*Akq_{p|T^VMwd2qkJ-56%{s3GzFyF>q& z$0NdZ3^VqL0g*j>FwD5|2}7eEh4x`gbT5V(G-3E-%s}`Y35C%!%sgi99H?b1UXZ@X z^5*RKmcG7Z;cFkz&Q%OEkr@w_r^R+11ac@Rf<67G!^M8pdMN=g%>i!(VGC!*rC;>=iR6C;|hX=BrF!&qJt z(OH=%EQ~rVr&QeZutFk?O+uRl6WT7A(cp^k-RO20PD+VX(E5^r$)~~ZS6WiZ4zW5!29?nUgpES9I1(_3vUi@4X>GTGWDF?PN(xDQiNvFj&N!;2 zQ|%grucWkC&|tW?4cSVpw;sW^lI%ctc(S*;!PDyH=zK7SgVKhqoIA~(DRG4nFDRwl zm-?!t@_~KVFO#fb3rfS4QQB={mDsKYy%Zx+O`0W=z_i89B&WLDL)&C#@Es7CC-x0?Uu#0=p)cnx$-geu15$D*7xvU z^g9x)@s5PNvVhMQ73ksi{WYqxMbsaT znlaaGNYSZ3VeV}7M4eiPxl@KII`uouoiW1u5O#pX25d;lRNX#KZy~niWR*+erWf^W zLl@@-QWpxfXl7GyvrgHIoh4R_v#dML8KYCb#LuhTm~iD&jl+M*&XT;cr7}0R+8kYn^3OjuZ0l$w0MY zX!=%;983A;tZfO+;9PqOX3+VaC9bs%vh_4wYZ~rt=9I{>D-_DJC-z-!hIL&T7pp4d z)T}_Ng{wsu8>32tGO`QS%Q2da>_S0~7)ANBi}ONqv*|gqalB5+muu1fMrv!j%#r-E zY)y8Z%7H{W^+TD?^ymX-qH^zS49?{KAU!mb`~A70ncVNZO66DPf&Sbd&X99U+-bRG zuW0<{$ZxjPB5&iXbPnYeps-t}LgeZ2@oC`W9!I;Ee+*tuF+d|z@6tY{#?ta7cMo>hsLISdxUI5>J7GlgFkz;tI(o6zG=dqsV2`~K-V%W2Q z!sX&x(JdB>4?@s)6^#|WDh5@sLLBfIjB-pu7#Bj5PML;z;dzJ=FQCGR`qp)41oBlA zU>)0mY64KjqVPoK(W0J?hAeD13t>9t&zKb!p)0a|jonnQK8FH6cT{nYMME+?>n;ey z)1)F!N<|r-RR+KO9D*+)6^(EB2Du`Ob$R_ZhHbw#8&eEVK{SfaYnX}YTb9|;LRg%d ze~KqF8)jh+z9Ll`oo~uktxl#UH@ zc*yER&e#Rp$h(QGPzdWT(qdpvzvqA1x_kfbe~zddkzesiMPB4aoqqRC&nH#-{rOc_ zDsESp*RMr%9i}EfVr{t-b&69CN=xbX@7M3&y1!kM)=^ZJGMUbJ@FeXY1bli`Jt#62 z^KO1EzZ@b|PM{lhzhg5EP;yL1RCgLr+R)j*1X70x@SYh+JtJI&ol7BC^?{g6@clo+ zPT{g}DxT_MhDyD{X)>tJw9_(6nxW9h9E_B9uC8eqH<63$XAX-~;-;H*6K%t6v?X?& zIqaqyKU`2b;~?zhIMZs?N}RT=b3EB#bJ(tO0nSvgLZOoDJQOoPW9){xyJ%=1#A;K$ zpN^lVMqArQU*>LcM7Ek%_@k}oVQ*|hmtG2_j-l)6w61Dpbo?-7wCQs-XP5h(oPEJn zHoqKPrMn{C*c;#Ud@P(wBHjz}mnC;qxOa>xl2U(gULI?j;Lq8Wv-Y%n(*qhA?gP!Q zf*sAFbl_u_Y9Soi*R<@^3h)=6ymT@hzIVw%9d+nBduDNJ8_E*w@rM+i*!4v*ZKx$A zM;oFN{X_UsNH_Mv#jwZc39(*le4b?IhQ<%I6>Am__bxEaP-*WZ!J5Q+ZP0(7O9ZLh z&~{l!96kc%zbL1J94nhF@Z7J}|E|@SK|Px+X)=hbklM7+7nJta&*$Z!EiJ@JJ_SlE zDQkKxcVOS>vO;M$x?@-T4qwyzrNeWZohRKpitz0--N|^=!iHU5it!Zq6In0UmJO0E-Er9s$d%0 zN_9OfDQ^1co}Z&QVj_D`7fiF57rm$avBGTh#PC>YHi{MIAS+~8b0CM}rMajpE;21q zHkbq@(2=zme}#z6Lhp6RQsy9Q;;5Fzsp0 zHR+T}neuIyX(muCKwzgp1a^}1jp<;4B3S(bh>q>@Q3{^WY=MPYDMxqOM%hWSHR{^N z^T1<{#-ls%cu#Bny77`sty!ggWj3A(Svb0BkSoSji+(vdAY{qT5&V3k1$^YyMru(O zEXspLH-SaBYZk4B7`6&le5}DSoKqic^_l_o;TOYy3%?AyZqE{3S8MuP$?B6x~51Ml=+SASb6=# zUqGYlNFSJI9r>mq7^P`$*pW-KLis~6u@x}!C17G3U}F3Im;hM|025mQ6JG)*wgD!# zqkJ-`ffu&?o0#}Q!^9VWiOm`&HfxyJ@=#1{(J--D!^GwgCUyfRzPJk$yR}{Fn>(1; z8N$R@fP>wDi5=kmw7yfr#4h;S0%bFlFEmW-3SnZ){g{ANxBJ8Zu=$PTrx1&90{Jw#T z?x{d>gRg)2iK%-MO0I$bkKVX@Be_Q>v6EEtl5b zk(9*$HEQ3&dOoXwpzH!J@ zFbwtv5o{^ITB$b;MKP6?8(b}MkoDh`>F7A6ve14pe@_Hv;eLhQwG>8_U!!$8Hyuf! z4l~jl7tX!Ms&T2@z_z&d@G{-whoZ{Dn985z>`rgk9`{{_cPZ-3GjENO?g?R1?@pO?0;Nv0|;F(X1P|qi` zHJ;_b6Lt~cxl7{-b&aQsya+rycAS5WB#B5>?|K{+R*R#Gui{9~zIFR@hZ(Q)sNA?!l zmIZYiw5@}8Hp;%>fwnbJe;;-^8~NXQn%UQA&(-i;M-FJus(Ko&GwW}`7e^|!=aPDw zwB_?Siij^inrk-7qx7KROu5wnei=9=pKkni<=ud|J@%Q#GbXMj03KKo#*TiZP z?<-AAK4nXMn(R!RNzNwfeFk!P$hV#hax^jLJY-$R-7NyScsvK5Eysy41zm-ElV`yj zX!bT08^kG~pUIHxWH4AlkZnJ!?ceox<*GCj?p-` z(O0M!P1F6Xln&alFvkhK`NEK)Z4x0@f(&iDxDztVU8sR{oAXu<@WKpDMsZ7QYKSASr6qyb~Pz8(bqjF+P0s2{K#GI(PLh4mxGaotfFQ51aXCGU=Xi zyf)7IFV}XG#NK5wof@g>YTQxKo7zXV!yQG?a^Z?m4%+T1z(`lXiiNS6O28ZLw_svU7V-j9t z;vfrch3syshPzleDSH7G*_goTT&GUQ;p#N(fm#Np=b#2a>eyNvIe64DT&I|74<1Xb zrME&Rz-uhv)sfUFi*PUf2Ch^Ev)PX!pUb~WPqy?tjo~~^U~j-u2f`I`DzY}$$sTRg zCn@PSI`_JL2V^>L6>1{Py`&j!~`&uKc{jHES*%pu=j`~_U_vC3k2amSg*OR05>^XYy zOdWAvA=!KrFL@eoIq4%^q zJ@-}8I<+jj_j?ADIvra6^dB!Vvu4t+SC};~)A#&t*Sc(EPS8IwnLyW$x<2e$my2E2 HAm;x7u^H+% literal 0 HcmV?d00001 diff --git a/python/firmware_and_bootloader_r45.1.preview.hex b/python/firmware_and_bootloader_r45.1.preview.hex deleted file mode 100644 index 62228a7..0000000 --- a/python/firmware_and_bootloader_r45.1.preview.hex +++ /dev/null @@ -1,499 +0,0 @@ -:1000000076C0D1C899C0FCC997C096C055C8B0C9C0 -:10001000F7C892C091C090C08FC098C88DC08CC0E6 -:100020008BC08AC089C07800747270717B00797748 -:100030007573100100003C2C003A11020000002EE4 -:10004000201F12030000302F2113050400003D3152 -:100050002215140600003332242316070000003452 -:10006000251708090000352618190B0A0000363735 -:1000700027281A0C00000029001B0D00001E392B38 -:100080001C001D0000002D000000000F00005D009E -:100090005C5B0000006368626166606E5A7A6A6742 -:1000A0006964657D000000007600003A00370000BA -:1000B000003B0038000000000000000000000300CA -:1000C00004000500000000390036000101010101B3 -:1000D00001010102020202020202020102040810EE -:1000E000204080010204081020408000C90D112426 -:1000F0001FBECFE5D2E0DEBFCDBF11E0A0E6B0E08D -:10010000EAE7FCE102C005900D92A030B107D9F7F3 -:1001100021E0A0E0B1E001C01D92A73BB207E1F7EA -:1001200010E0C7E7D0E003C02197FE019EDDC6378F -:10013000D107D1F7DDD99FCD63CFFC0113821282A5 -:100140000895909195019923A1F090919401903296 -:1001500040F590919301E92FF0E0E050FF4F80834C -:1001600081E0890F809393018093940181E090E076 -:10017000089520919201909191012F5F921B9F70A1 -:1001800081F0909192019F5F9F7020919101921751 -:10019000E1F3E92FF0E0E05FFE4F8083909392015E -:1001A000E5CF90E080E00895CCCF3FB7F894809100 -:1001B0002E0190912F01A0913001B091310122B711 -:1001C00008B601FE05C02F3F19F00196A11DB11D13 -:1001D0003FBFBA2FA92F982F8827BC01CD01620FEE -:1001E000711D811D911D43E0660F771F881F991FA8 -:1001F0004A95D1F70895CF92DF92EF92FF92CF9375 -:10020000DF936B017C01D1DFEB01CFDF6C1B7D0B3A -:10021000683E7340A0F0C114D104E104F10439F444 -:10022000DF91CF91FF90EF90DF90CF90089581E024 -:10023000C81AD108E108F108C851DC4FE6CFC11453 -:10024000D104E104F10409F7EBCF90919001809182 -:100250008F01891B8F70089580919401882339F054 -:1002600020919301821318C08FEF9FEF0895EDDF67 -:100270008823D1F39091900180918F019817E1F339 -:10028000E0919001EF5FEF70E0939001F0E0E050BB -:10029000FF4F808190E00895E22FF0E0E050FF4FA3 -:1002A000808190E02F5F209393010895FC0183A14A -:1002B00082FD03C083A185FF07C083A180FD06C026 -:1002C00083A182958170089580E0089581E008956A -:1002D000FC0182818F5F8F709381981749F0A28112 -:1002E000AE0FBF2FB11D14966C93828381E00895E9 -:1002F00081E081A380E00895AF92BF92CF92DF9218 -:10030000EF92FF920F931F93CF93DF93EC016A3A22 -:1003100011F06C3FA9F480914301853179F484E0B8 -:10032000809343011FA6DF91CF911F910F91FF9002 -:10033000EF90DF90CF90BF90AF9008956FA7F3CF6D -:10034000162F89A1882309F440C09A818B819813C4 -:100350003CC08AA1811139C05E01F12CE12CCC2472 -:10036000C394D12C8BA19CA10E2D892790E00E2C3B -:1003700002C0959587950A94E2F780FF1BC0F501AE -:1003800067A18BA190E00E2C02C0959587950A94E9 -:10039000E2F780FF6068CE019BDF8823B1F09CA16B -:1003A0008BA1960101C0220F0A95EAF789278223C3 -:1003B00089278CA3FFEFEF1AFF0A8FEFA81AB80A5C -:1003C00098E0E916F10471F619A28AA1823309F4C2 -:1003D000B5C090F5813109F453C0813209F478C079 -:1003E000811131C081E1103F09F4D5C081E51B3A8C -:1003F00009F4D1C081E2103E09F4CDC081E4113E80 -:1004000009F4C9C089A1811110C0103F70F48FEFA9 -:10041000810F60E0833838F4812F8150990BFC0103 -:10042000EA5DFF4F6491CE0153DF123109F0BCC089 -:100430008BA182608BA307C0873409F4AEC048F457 -:10044000813408F0A6C089A181116DCF8BA18CA346 -:100450006ACF8135C1F71AA2F6CF143119F48BA1F6 -:100460008460E8CF113119F48BA18160E3CF143897 -:1004700051F7CE011BDF882331F381E08EA3E3CF58 -:100480001AA21231B1F48BA18D7F8BA389A18111A6 -:10049000DACF8FEF810F60E0833838F4812F8150FD -:1004A000990BFC01EA5DFF4F64916068CE0110DF9B -:1004B000CACF193519F48BA1877FE7CF143119F40E -:1004C0008BA18B7FE2CF113109F78BA18E7FDDCF1E -:1004D00082E3103F09F45FC0123181F0193571F0E9 -:1004E00089A181110BC0EFEEE10F60E0ED3620F441 -:1004F000F0E0E259FF4F6081CE01EADE1AA214312A -:1005000019F48BA1806296CF1F3119F48BA18064FE -:1005100091CF173219F48BA180688CCF113119F467 -:100520008BA1806187CF113709F08DCFCE01BEDE60 -:10053000882309F488CF81E08DA385CF1AA21231D8 -:1005400009F481CF193509F47ECF89A181110CC03E -:10055000EFEEE10F60E0ED3620F4F0E0E259FF4FFE -:1005600060816068CE01B4DE143119F48BA18F7DF7 -:1005700061CF1F3119F48BA18F7B5CCF173219F437 -:100580008BA18F7757CF113109F05DCF8BA18F7E73 -:1005900051CF8AA18F5F8AA356CF89A181115BCFEA -:1005A0006EE7CE0195DE57CF193509F056CF8BA1F6 -:1005B000886040CFFC0182818F5F8F709381981794 -:1005C00041F0A2819489AE0FBF2FB11D14969C9368 -:1005D00082830895FC011382128212A213A211A237 -:1005E00016A215A20895FC0192818381981759F0F3 -:1005F000A381AE0FBF2FB11D14968C9193819F5F85 -:100600009F709383089580E008958091270183303F -:1006100049F48091440190914501892B19F0E1E062 -:10062000FFE0099482E390E09093450180934401B8 -:1006300008956F927F928F929F92AF92BF92CF92C6 -:10064000DF92EF92FF920F931F93CF93DF93CDB77B -:10065000DEB70DB71EB7809121019091220187303E -:10066000910581F480914301853109F041C0909159 -:100670004801809149019817D9F186E491E0B3DFF0 -:1006800090E008C08830910539F480912001082E4F -:10069000000C990B89DD84C08831910509F04DC0AB -:1006A00080916601EDCF887C8830D9F44701FFEF57 -:1006B0008F1A9F0A6624639486E991E094DFF4011F -:1006C00081934F0163947610F7CF4701F401819134 -:1006D0004F0137DDC4018E199F098C159D05B0F3BC -:1006E0005AC084E080933E0190E080E05DDD53C01D -:1006F00090E080E0CFCF8033910521F48DE290E04F -:1007000053DD59C08133910519F481E090E0F8CFB1 -:100710008233910519F490E080E0F2CF8E38910594 -:1007200009F049C0E0E0FEE1E4918FEF90E0EA38A3 -:1007300039F7E1E0FEE184913DC0819789F5809130 -:10074000610094E0792E811102C083E0782E8091BF -:10075000980190919901891B8F70871548F2ADB669 -:10076000BEB6C72CD12C8DB79EB78C199D090FB67C -:10077000F8949EBF0FBE8DBFEDB7FEB731967F01D7 -:1007800086E991E030DFF70180838A3A09F08BCF68 -:1007900084E080933E010FB6F894BEBE0FBEADBE9E -:1007A00080912101909122018232910509F0A3CF1D -:1007B00080916100C6DC0FB6F8941EBF0FBE0DBF5E -:1007C000DF91CF911F910F91FF90EF90DF90CF902D -:1007D000BF90AF909F908F907F906F90089587FF0C -:1007E00006C08F77833018F08730D0F48F5F90E0A9 -:1007F000FC01E552FF4F2491FC01E553FF4FE491CA -:10080000EE23A1F0F0E0EE0FFF1FEB53FF4FA59199 -:10081000B491EC91E22381E090E051F480E00895FE -:100820008B3010F48B5FE3CF80E0E1CF80E090E08D -:100830000895CF93DF93EC018881D1DF29813A813C -:100840002115310521F0215031093A83298329816D -:100850003A8120363105F8F4232B91F481111EC022 -:100860008B81813079F482E08B8384E690E09A83F7 -:100870008983EE81FF81309771F0DF91CF910994E8 -:1008800081110CC08B81811106C081E08B8384E6CD -:1008900090E09A838983DF91CF9108958130D9F7D1 -:1008A0008B81813041F41B8284E690E09A838983B6 -:1008B000EC81FD81E0CF823071F71B82E8CF90E0C0 -:1008C000FC01EB54FF4F3491FC01E552FF4F2491A2 -:1008D000FC01E553FF4FE491EE23C1F0332329F0EF -:1008E0003330A9F487B58F7787BDF0E0EE0FFF1F97 -:1008F000E155FF4FA591B4918FB7611112C0F894E3 -:100900009C91E22FE095E923EC938FBF089534305A -:1009100019F487B58F7DE8CF353039F787B5877FF4 -:10092000E3CFF894EC91E22BEFCF8091760188230E -:1009300089F08091440190914501892B59F460E040 -:1009400081E0BDDF6CE271E080E090E054DC61E0CA -:1009500081E0B5CF0895CF93DF9390E0FC01E5529D -:10096000FF4F249185539F4FFC0184918823C9F048 -:1009700090E0880F991FFC01E755FF4FA591B491B6 -:10098000FC01E155FF4FC591D49161110DC09FB796 -:10099000F8948C91209582238C9388812823288336 -:1009A0009FBFDF91CF910895623051F49FB7F894C3 -:1009B0003C91822F809583238C93E8812E2BEFCF5F -:1009C0008FB7F894EC912E2B2C938FBFEACF61E078 -:1009D00080E075DF60E080E0BECF61E080E0BBDFFB -:1009E00060E080E06CCF61E085E069DF1092760125 -:1009F000F4DF64EF71E080E090E0FDDBE8CFCF93BF -:100A0000DF93EC0160E08BE0A6DF60E082E0A3DF33 -:100A10001C8A1D8A1E8A1B8EDF91CF910895CF9369 -:100A2000DF93EC01ECDF1AA2DF91CF910895CF9212 -:100A3000DF92EF92FF9280916101811188C08FB7A0 -:100A4000F894C0902A01D0902B01E0902C01F090F6 -:100A50002D018FBF80915D0190915E01A0915F019A -:100A6000B0916001C296A11DB11DC816D906EA0653 -:100A7000FB0618F086E491E0D2DFC0925D01D092CF -:100A80005E01E0925F01F09260018BE0A8DE909140 -:100A90005C019930F0F4913028F1882389F0292FF6 -:100AA0002150330BA90121E030E0B90102C0660FEB -:100AB000771F4A95E2F720915A01262B20935A017D -:100AC00020915B01820F80935B019F5F90935C019B -:100AD00004C0993069F09A3091F0FF90EF90DF9068 -:100AE000CF9008958111F9CF81E080935C01F5CF1B -:100AF00090915B01890F80935B018AE0F6CF809132 -:100B0000660160915A01813021F46E3F31F46093A7 -:100B1000660186E491E0F0DB13C06A3FD1F7909163 -:100B200064019230A1F790916301809366019093E4 -:100B30006201109263018093640183E080936501F8 -:100B400010925C0110925B0110925A01C6CF809105 -:100B500065018111C2CF80915C01883079F160F02C -:100B60008930B9F18A3009F0B8CF86E491E0FF907E -:100B7000EF90DF90CF9053CF8091620160E080FFD3 -:100B800017C08BE0E8DE61E08BE099DE90916201B6 -:100B900080915B01890F80935B018091620190E0FD -:100BA000959587958093620180915C018F5F9DCFC1 -:100BB0008BE085DE61E08BE0CEDEE8CF80915B01EB -:100BC00060E080FF07C08BE07ADE61E08BE0C3DE8F -:100BD000EBCF60E08BE0BFDE61E08BE070DEE4CF66 -:100BE000CF93DF93EC011BDF1E8E1F8ECE01F2DC54 -:100BF00018A2DF91CF9108958F929F92AF92BF92EA -:100C0000CF92DF92EF92FF92E8DE60E085E057DE60 -:100C10008FB7F89480902A0190902B01A0902C011E -:100C2000B0902D018FBFC12CD12C760183E0D7DD90 -:100C3000892B81F48FB7F894C0902A01D0902B01B2 -:100C4000E0902C01F0902D018FBFC818D908EA0858 -:100C5000FB08ECCF81E0C81AD108E108F1088EEE5C -:100C6000C81682E0D806E104F10450F0BCDEFF9023 -:100C7000EF90DF90CF90BF90AF909F908F90A7CED6 -:100C800086E491E0ADDF64EF71E080E090E0B3DAFC -:100C900081E080937601EBCF8091440190914501F2 -:100CA000892B31F080912701816080932701ADCCA1 -:100CB00080917601811101C09FCF95CECF93DF93B4 -:100CC000EC0160E08DE047DE60E08EE044DE1C8AEF -:100CD0001D8A1E8A1B8EDF91CF91089586E991E0CF -:100CE000EDDFE6E9F1E0168E178E13821282089589 -:100CF0008091440190914501892B31F08091270129 -:100D000082608093270181CC86E491E063DCE6DF9A -:100D10001092B60180917601882391F05EDE64EF37 -:100D200071E080E090E067DA52DE61E086E013DE99 -:100D300060E086E0C4DD84E080933E01809343015F -:100D40000895CF92DF92EF92FF928091B1018111CD -:100D500088C08FB7F894C0902A01D0902B01E09002 -:100D60002C01F0902D018FBF8091AD019091AE01CB -:100D7000A091AF01B091B001C296A11DB11DC816DE -:100D8000D906EA06FB0618F086E991E097DFC092E3 -:100D9000AD01D092AE01E092AF01F092B0018DE0D2 -:100DA0001EDD9091AC019930F0F4913028F1882348 -:100DB00089F0292F2150330BA90121E030E0B9013E -:100DC00002C0660F771F4A95E2F72091AA01262BF1 -:100DD0002093AA012091AB01820F8093AB019F5F0A -:100DE0009093AC0104C0993069F09A3091F0FF9073 -:100DF000EF90DF90CF9008958111F9CF81E080933B -:100E0000AC01F5CF9091AB01890F8093AB018AE0E3 -:100E1000F6CF8091B6016091AA01813021F46E3F36 -:100E200031F46093B60186E991E0C4DB13C06A3FF8 -:100E3000D1F79091B4019230A1F79091B3018093D2 -:100E4000B6019093B2011092B3018093B40183E094 -:100E50008093B5011092AC011092AB011092AA01DF -:100E6000C6CF8091B5018111C2CF8091AC0188308D -:100E700079F160F08930B9F18A3009F0B8CF86E9AC -:100E800091E0FF90EF90DF90CF9018CF8091B2016A -:100E900060E080FF17C08DE05EDD61E08DE00FDD7A -:100EA0009091B2018091AB01890F8093AB01809149 -:100EB000B20190E0959587958093B2018091AC0145 -:100EC0008F5F9DCF8DE0FBDC61E08DE044DDE8CFFE -:100ED0008091AB0160E080FF07C08DE0F0DC61E055 -:100EE0008DE039DDEBCF60E08DE035DD61E08DE058 -:100EF000E6DCE4CF0F931F93CF93DF931092220190 -:100F000010922101109224011092230110922601C7 -:100F100010922501D0E0C0E0809194018823A1F0D7 -:100F200090919301891B990B892B99F0C330D105BE -:100F300074F492D9FE01EE0FFF1FEF5DFE4F99276B -:100F4000918380832196E8CF80D990E0EDCF84D93A -:100F5000E3CFC230D10559F4809121019091220153 -:100F60004A9769F4DF91CF911F910F9108952397CC -:100F7000C9F780912101909122014A9799F78091B8 -:100F80002101909122018130910551F4209123019A -:100F9000309124012115310569F02130310581F1AD -:100FA000029749F48091230190912401892B19F42F -:100FB0009FDE01C018DDC0912101D0912201C33014 -:100FC000D10531F58091230190912401892B01F500 -:100FD000ACDCC032D105C9F5809123019091240188 -:100FE000009741F097FD31C09C0123503109223018 -:100FF000310558F58093600084E080933E01B2CFC4 -:10100000F2DC68EE73E080E090E0F5D8F5DDD3CF58 -:10101000C530D10599F4009123011091240161E0BC -:1010200086E099DC1016110624F060E086E047DCCB -:10103000D0CF61E000381105CCF7F7CFC830D1052B -:10104000C1F48091230180932001CF38D10509F0AC -:1010500089CF8091230190912401C19709F082CF1B -:1010600080ED97E090934501809344011092270111 -:1010700079CFC931D10579F49091230181E0809332 -:10108000660190936201109263018093640183E092 -:101090008093650167CFCA31D10509F09ACF80915D -:1010A00025019091230121E0209366019093620134 -:1010B0008093630182E0E9CF1F920F920FB60F92E7 -:1010C00011242F933F938F939F93AF93BF9380915E -:1010D0002A0190912B01A0912C01B0912D0130910A -:1010E000290126E0230F2D3768F129E8230F039605 -:1010F000A11DB11D2093290180932A0190932B01FA -:10110000A0932C01B0932D0180912E0190912F017D -:10111000A0913001B09131010196A11DB11D8093C4 -:101120002E0190932F01A0933001B0933101BF9114 -:10113000AF919F918F913F912F910F900FBE0F9084 -:101140001F9018950296A11DB11DD4CF1F920F922A -:101150000FB60F9211242F933F934F935F936F938A -:101160007F938F939F93AF93BF93EF93FF93809160 -:10117000390190913A01892B29F0E0913901F091E0 -:101180003A010995FF91EF91BF91AF919F918F9196 -:101190007F916F915F914F913F912F910F900FBE73 -:1011A0000F901F9018951F920F920FB60F92112457 -:1011B0002F933F934F935F936F937F938F939F935F -:1011C000AF93BF93EF93FF938091370190913801D4 -:1011D000892B29F0E0913701F09138010995FF91B1 -:1011E000EF91BF91AF919F918F917F916F915F919F -:1011F0004F913F912F910F900FBE0F901F90189518 -:101200001F920F920FB60F9211240F931F932F93DB -:101210003F934F935F936F937F938F939F93AF937E -:10122000BF93CF93EF93FF9380912801823009F40D -:1012300076C0C8F4882399F1813009F456C0FF9133 -:10124000EF91CF91BF91AF919F918F917F916F91CE -:101250005F914F913F912F911F910F910F900FBE72 -:101260000F901F901895843009F45FC0B8F1853055 -:1012700031F784E0809328019FB180918F018F5FC7 -:101280008F7020919001281709F470C080938F010E -:10129000E0918F01F0E0E050FF4F908319C08FB1D3 -:1012A000882331F08FB1869590913201891319C04E -:1012B000789B12C0E0913501F0913601309729F00A -:1012C0008091920180939101099581E0809328019A -:1012D0001FB8B89A8EE721C084E0F8CF8FB1882379 -:1012E00021F0B89888EA8DB917C08091910190914A -:1012F00092019817B1F3809191018F5F8F70809365 -:101300009101E0919101F0E0E05FFE4F80818FB9A3 -:1013100082E080932801B89A80E78EB990CF83E06D -:1013200080932801B8981FB8D5CF85E08093280115 -:10133000B89880E78EB900913301109134010115FE -:10134000110509F47CCFC0918F01809190018C1719 -:1013500009F475CF8EB18E7AE9F3759B70CF75D78E -:1013600090E0F8010995C093900169CFB898B2CF89 -:101370001F920F920FB60F9211240F931F932F936A -:101380003F934F935F936F937F938F939F93AF930D -:10139000BF93CF93EF93FF930091330110913401EA -:1013A0000115110561F0C0918F01809190018C179A -:1013B00031F04BD790E0F8010995C093900110925D -:1013C0002801B898B29B1AC0B09BFCCF88EA8DB9AF -:1013D00080EF8EB9FF91EF91CF91BF91AF919F9127 -:1013E0008F917F916F915F914F913F912F911F91BD -:1013F0000F910F900FBE0F901F90189588EFE7CFB9 -:101400001F920F920FB60F9211242F933F934F9379 -:101410005F936F937F938F939F93AF93BF93EF935C -:10142000FF9315BC1EBC80916501882331F180912A -:1014300065018330A9F460E082E041DA61E082E096 -:101440008ADA60E08BE03BDA61E08BE084DA81E00D -:1014500080936101809165018150809365010DC089 -:10146000809165018130B1F760E082E074DA10921A -:10147000650110925C0110925B018091B501882397 -:1014800031F18091B5018330A9F460E08EE017DA84 -:1014900061E08EE060DA60E08DE011DA61E08DE01D -:1014A0005ADA81E08093B1018091B5018150809337 -:1014B000B5010DC08091B5018130B1F760E08EE0DB -:1014C0004ADA1092B5011092AC011092AB01FF9173 -:1014D000EF91BF91AF919F918F917F916F915F91AC -:1014E0004F913F912F910F900FBE0F901F90189525 -:1014F00093E093BF789489B7826089BF90BF81E001 -:1015000087BD86BD87E08FBD86E886B9F89410BE9A -:1015100017BC16BC15BC1EBC19BC1CBC85E48FBD19 -:1015200084E68DBD89B7806489BF78941092930159 -:1015300010929401109295011092900110928F01D7 -:10154000109291011092920182E4809332011092E4 -:101550003601109235011092340110923301C29A73 -:10156000C09ABA9AB89888EA8DB980EF8EB98AE79E -:1015700097E0909334018093330189E193E0909355 -:101580003601809335018CE496E090938C01809332 -:101590008B0190938E0180938D0188E796E0909364 -:1015A000840180938301909386018093850185E96E -:1015B00094E090937C0180937B0160E083E0CBD941 -:1015C00061E085E0C8D961E085E079D961E086E035 -:1015D000C2D961E086E0BFD960E086E070D9FDD96C -:1015E00061E081E0B8D961E081E069D98FB7F89412 -:1015F00027E135E030933A01209339018FBF85B759 -:101600008C7F826085BF8BB780688BBF8FB7F89463 -:1016100021EA36E030933801209337018FBF85B738 -:101620008C7F826085BF8BB780648BBF8CEF982ED8 -:1016300094E0F92EC1E023EFA22E38E2832E42E09F -:10164000B42E53E0E52E0FEF10E0CC24CA9463E0F3 -:10165000D62E87E891E0EDD88FE791E0EAD887E7CA -:1016600091E0E7D8E0913E01EE2309F444C0809177 -:101670007601811140C010923E0110923D01D0923E -:101680006300C09262002ADB1092B6019091430180 -:10169000809142018F5F80934201D091760199231E -:1016A00009F4B3C1D111B1C11092430110924101AB -:1016B000109365000093640080916B01882319F0FA -:1016C00017DB10926B0180916C01882319F02DD9E2 -:1016D00010926C018091440190914501009729F08E -:1016E000019790934501809344016AE070E080E0A7 -:1016F00090E081D5AECF80913D01882361F180914A -:10170000620090916300009709F5D0913C0110921E -:101710003D018091B601813009F4B8CFE13108F084 -:101720006FC1F0E0EB56F44F099417C028C042C0D7 -:101730006AC16AC086C064C163C1A7C0BBC0DBC048 -:10174000F6C011C185C04DC157C12DC001979093FE -:10175000630080936200DE2FDCCF809176018823C6 -:1017600011F19092610010923B01C0933D011093E2 -:10177000630000936200F0923C01D1E014C09091AC -:10178000980180919901981771F086E991E02BD723 -:101790008A3A61F4C0933D011093630000936200A4 -:1017A000F0923C01D2E0D0933E0170CF8C3FD9F74C -:1017B000DFEFF9CF9091980180919901981799F3F3 -:1017C00086E991E010D7882321F09DEF980F9230A1 -:1017D00050F78093610080916000D8E081110BC0C8 -:1017E000C093B601A092B2018092B301B092B4014D -:1017F000E092B501DDE0C0933D01109363000093DA -:101800006200F0923C01CFCF9092610010923B01B8 -:101810001092990110929801C093B6018FEF8093B6 -:10182000B2011092B301C093B401E092B501C0932C -:101830003D01109363000093620080933C01D5E06A -:10184000B2CF8A3F09F0B4CF86E991E0CCD68DCFF4 -:1018500010929901109298018A3F11F0D3E0A3CF22 -:10186000C093B60184EF8093B2011092B301C0938C -:10187000B401E092B501C0933D0110936300009361 -:101880006200F0923C01DEE08ECFC093B601A092E0 -:10189000B20188EC8093B301B092B401E092B5013B -:1018A000C0933D011093630000936200F0923C01ED -:1018B000D9E079CF10929901109298018A3F71F680 -:1018C00080913B01C093B601A092B201882389F0B8 -:1018D00088EC8093B301B092B401E092B501C0935B -:1018E0003D011093630000936200F0923C01DAE046 -:1018F0005ACF84E6EECF10929901109298018A3F58 -:1019000009F0ACCFC093B601A092B20180E58093FC -:10191000B301B092B401E092B501C0933D011093C0 -:10192000630000936200F0923C01DBE03CCF109238 -:101930009901109298018A3F09F090CFC093B601A7 -:1019400082EF8093B2011092B301C093B401E09290 -:10195000B501C0933D011093630000936200F092C3 -:101960003C01DCE020CF909198018091990198177B -:1019700009F419CF86E991E036D68A3F09F413CFEE -:10198000882329F09DEF980F923008F011CF8093B3 -:10199000610080913B01811104C08091600083301F -:1019A000A1F4C093B601A092B2018092B301B092AB -:1019B000B401E092B501C0933D0110936300009320 -:1019C0006200F0923C01DDE0EECEC0933B01C0939B -:1019D0003D011093630000936200F0923C01D8E057 -:1019E000E2CE10929901109298018A3F09F036CF09 -:1019F00010923D01DFE0D7CE10923D01D0E1D3CE71 -:101A000090926100D0CED4E0CECE80914101882367 -:101A100059F1209164003091650021153105F1F4F0 -:101A2000809140011092410120916601953009F4A6 -:101A300085C0E0F4913009F450C008F441C09430FE -:101A400009F463C080934301DD2309F435CE83E0BC -:101A5000C6D6892B09F030CEC6D72ECE21503109FB -:101A60003093650020936400892FDECF923109F412 -:101A70006BC0B8F4913131F7C09366018DEE80935D -:101A8000620110926301C0936401E0926501C0930A -:101A900041011093650000936400F092400182E1DF -:101AA000D1CF943109F46BC09E3F61F6C0934101E0 -:101AB0001093650000936400F09240018FEFC2CF55 -:101AC000DD2309F4BFCFC09341011093650000935B -:101AD0006400F092400181E0B5CF213009F4B2CF2B -:101AE000209175012A3A61F4B0923F01909341012F -:101AF0001093650000936400F092400181E1A2CF51 -:101B00002C3F09F09FCF8EEF9DCF86E491E068D8FF -:101B1000C09366018FEF8093620110926301C093BE -:101B20006401E0926501C093410110936500009348 -:101B300064008EEF8093400185E084CF213009F46A -:101B400081CF2A3F01F7BFCF213009F47BCF2A3F55 -:101B5000D1F680913F01C09366018093620110929B -:101B60006301C0936401E0926501C0934101109349 -:101B7000650000936400F092400184E163CF21305E -:101B800009F460CF2A3F09F0BECF1092410185E1F0 -:101B900059CFCF93DF93E7E8F1E0128211821382ED -:101BA000158214821782168284E0808362E0D3D685 -:101BB000EFE7F1E0128211821382158214821782FC -:101BC00016828CE0808362E0C6D6E7E7F1E01282FD -:101BD00011821382158214821782168287E0808315 -:101BE00062E0B9D6C6E4D1E08BEE90E099838883B9 -:101BF0001A821B821C8A1D8A1E8A1F8A188E198EC1 -:101C00001A8E1B8E1E8E1F8E18A2CE01F8D61E8E27 -:101C10001F8E1B821A8287EF90E09983888319A216 -:101C20001AA21BA21CA21DA21EA288E0E6E6F0E0FA -:101C3000ADE6B1E001900D928A95E1F71FA6E6E9C5 -:101C4000F1E08FED90E09183808312821382148AF9 -:101C5000158A168A178A108E118E128E138E168E82 -:101C6000178E10A2DF91CF9139C8EE0FFF1F05909C -:0A1C7000F491E02D0994F894FFCFE1 -:101C7A0004FCFF03FF001112145911141F273E0020 -:101C8A0000407E0000000000000000003B00000051 -:101C9A00000000003F0000000000000041000000BA -:101CAA00000000000000000000000000000000002A -:101CBA00000000000000005F0000000000000000BB -:101CCA00000000000000006C00000000000000009E -:101CDA0000000000000051004F500000004B4C541F -:101CEA000059530000000056007C55000000005EB9 -:101CFA0006F3029D00DA0200000000FF04F3029DD1 -:101D0A0000DA02000000000F05F302EA027C01007B -:020000020000FC -:101E00008A02F894C0EAD0E01E012E01442755272B -:101E100066270FEF1FEF20E2E4D0C0E6D0E008E134 -:101E200015E923E1DED0C65209E209930FEC0993CC -:101E3000C45F0BE309930FEC099307E409930FECDC -:101E40000993EE27FF27B2D000E41127380112D002 -:101E50007894FFCFF894A89500E004BF01B508611D -:101E600001BD00E001BDEE27FF27C0EAD0E0A0D011 -:101E70007894C6C0B898BA9AC09AC29A08EA0DB9BE -:101E800000E70EB9089571E0B89806B30570043004 -:101E9000E1F308EF00FD08EA0DB900EF0EB918955F -:101EA000713071F40FB1102F0695023459F5812F5E -:101EB00080FF992772E07F98B89A0EE70EB91895BF -:101EC000723031F59238B9F4F89400EF0EB900276A -:101ED0000DB9BA98B898C298C098F301593018F063 -:101EE00065D0B096B096FE3118F413E06ED0F9CFFD -:101EF0000CE001BDFFCF80FD22C073E0B89800E781 -:101F00000EB91895B89808EA0DB900E70EB91895FA -:101F1000733099F40FB1903011F4902FCBCF9038EB -:101F200049F6E2014A3040F4493029F0483011F0D6 -:101F300009932E01600F4395BDCF753061F576E0B2 -:101F400010E0913819F5F30112E04930E1F413E0A3 -:101F50006030C9F415E0072D0E31A8F453955031C7 -:101F600019F0583031F00CC021D0B096B0963F0136 -:101F700058E0C0E6D0E02E010FEF1FEF20E231D095 -:101F800011E0120101C02101442766271FB9B89A48 -:101F900000E70EB91895763029F477E0B8980EE787 -:101FA0000EB918950FB100FDADCFC9CFC0E6D0E096 -:101FB00013E00BD000E40990199011E006D0EE5F19 -:101FC0000250C9F7E05415E000C037B730FDFDCF2F -:101FD0003CB331FDFDCF17BFE89537B73123E9F7A3 -:0C1FE0000895099319932A95E1F70895DC -:00000001FF diff --git a/python/smc_convert.py b/python/smc_convert.py index ec293b8..3dcfa36 100644 --- a/python/smc_convert.py +++ b/python/smc_convert.py @@ -1,6 +1,21 @@ from intelhex import IntelHex src1 = IntelHex() -src1. -src1.fromfile("C:/Users/svenv/OneDrive/Documents/GitHub/x16-flash/python/x16-smc-r45.1.hex", format="hex") -src1.tofile("r45.1.preview.bin", format="bin") + +src1.fromfile("C:/Users/svenv/OneDrive/Documents/GitHub/x16-flash/python/x16-smc-header.hex", format="hex") +src1.tofile("python/SMC-HEADER.BIN", format="bin") + +src2 = IntelHex() + +src2.fromfile("C:/Users/svenv/OneDrive/Documents/GitHub/x16-flash/python/x16-smc-r45.1.0.hex", format="hex") +src2.tofile("python/SMC-R45.1.0.BIN", format="bin") + +# Try reading the file in binary mode and writing it back in binary +# mode. By default it reads files in text mode +input1 = open('python/SMC-HEADER.BIN', 'rb').read() +input2 = open('python/SMC-R45.1.0.bin', 'rb').read() + +input1 += input2 + +with open('python/SMC.BIN', 'wb') as fp: + fp.write(input1) \ No newline at end of file diff --git a/python/x16-smc-header.hex b/python/x16-smc-header.hex new file mode 100644 index 0000000..fdf774f --- /dev/null +++ b/python/x16-smc-header.hex @@ -0,0 +1,3 @@ +:100000002B2C000000000000000000000000000099 +:1000100000000000000000000000000000000000E0 +:00000001FF \ No newline at end of file diff --git a/python/x16-smc-r45.1.hex b/python/x16-smc-r45.1.0.hex similarity index 96% rename from python/x16-smc-r45.1.hex rename to python/x16-smc-r45.1.0.hex index 6b265dd..5d5e627 100644 --- a/python/x16-smc-r45.1.hex +++ b/python/x16-smc-r45.1.0.hex @@ -1,467 +1,464 @@ -:1000000076C0D1C899C0FCC997C096C055C8B0C9C0 -:10001000F7C892C091C090C08FC098C88DC08CC0E6 -:100020008BC08AC089C07800747270717B00797748 -:100030007573100100003C2C003A11020000002EE4 -:10004000201F12030000302F2113050400003D3152 -:100050002215140600003332242316070000003452 -:10006000251708090000352618190B0A0000363735 -:1000700027281A0C00000029001B0D00001E392B38 -:100080001C001D0000002D000000000F00005D009E -:100090005C5B0000006368626166606E5A7A6A6742 -:1000A0006964657D000000007600003A00370000BA -:1000B000003B0038000000000000000000000300CA -:1000C00004000500000000390036000101010101B3 -:1000D00001010102020202020202020102040810EE -:1000E000204080010204081020408000C90D112426 -:1000F0001FBECFE5D2E0DEBFCDBF11E0A0E6B0E08D -:10010000EAE7FCE102C005900D92A030B107D9F7F3 -:1001100021E0A0E0B1E001C01D92A73BB207E1F7EA -:1001200010E0C7E7D0E003C02197FE019EDDC6378F -:10013000D107D1F7DDD99FCD63CFFC0113821282A5 -:100140000895909195019923A1F090919401903296 -:1001500040F590919301E92FF0E0E050FF4F80834C -:1001600081E0890F809393018093940181E090E076 -:10017000089520919201909191012F5F921B9F70A1 -:1001800081F0909192019F5F9F7020919101921751 -:10019000E1F3E92FF0E0E05FFE4F8083909392015E -:1001A000E5CF90E080E00895CCCF3FB7F894809100 -:1001B0002E0190912F01A0913001B091310122B711 -:1001C00008B601FE05C02F3F19F00196A11DB11D13 -:1001D0003FBFBA2FA92F982F8827BC01CD01620FEE -:1001E000711D811D911D42E0660F771F881F991FA9 -:1001F0004A95D1F70895CF92DF92EF92FF92CF9375 -:10020000DF936B017C01D1DFEB01CFDF6C1B7D0B3A -:10021000683E7340A0F0C114D104E104F10439F444 -:10022000DF91CF91FF90EF90DF90CF90089581E024 -:10023000C81AD108E108F108C851DC4FE6CFC11453 -:10024000D104E104F10409F7EBCF90919001809182 -:100250008F01891B8F70089580919401882339F054 -:1002600020919301821318C08FEF9FEF0895EDDF67 -:100270008823D1F39091900180918F019817E1F339 -:10028000E0919001EF5FEF70E0939001F0E0E050BB -:10029000FF4F808190E00895E22FF0E0E050FF4FA3 -:1002A000808190E02F5F209393010895FC0183A14A -:1002B00082FD03C083A185FF07C083A180FD06C026 -:1002C00083A182958170089580E0089581E008956A -:1002D000FC0182818F5F8F709381981749F0A28112 -:1002E000AE0FBF2FB11D14966C93828381E00895E9 -:1002F00081E081A380E00895AF92BF92CF92DF9218 -:10030000EF92FF920F931F93CF93DF93EC016A3A22 -:1003100011F06C3FA9F480914301853179F484E0B8 -:10032000809343011FA6DF91CF911F910F91FF9002 -:10033000EF90DF90CF90BF90AF9008956FA7F3CF6D -:10034000162F89A1882309F440C09A818B819813C4 -:100350003CC08AA1811139C05E01F12CE12CCC2472 -:10036000C394D12C8BA19CA10E2D892790E00E2C3B -:1003700002C0959587950A94E2F780FF1BC0F501AE -:1003800067A18BA190E00E2C02C0959587950A94E9 -:10039000E2F780FF6068CE019BDF8823B1F09CA16B -:1003A0008BA1960101C0220F0A95EAF789278223C3 -:1003B00089278CA3FFEFEF1AFF0A8FEFA81AB80A5C -:1003C00098E0E916F10471F619A28AA1823309F4C2 -:1003D000B5C090F5813109F453C0813209F478C079 -:1003E000811131C081E1103F09F4D5C081E51B3A8C -:1003F00009F4D1C081E2103E09F4CDC081E4113E80 -:1004000009F4C9C089A1811110C0103F70F48FEFA9 -:10041000810F60E0833838F4812F8150990BFC0103 -:10042000EA5DFF4F6491CE0153DF123109F0BCC089 -:100430008BA182608BA307C0873409F4AEC048F457 -:10044000813408F0A6C089A181116DCF8BA18CA346 -:100450006ACF8135C1F71AA2F6CF143119F48BA1F6 -:100460008460E8CF113119F48BA18160E3CF143897 -:1004700051F7CE011BDF882331F381E08EA3E3CF58 -:100480001AA21231B1F48BA18D7F8BA389A18111A6 -:10049000DACF8FEF810F60E0833838F4812F8150FD -:1004A000990BFC01EA5DFF4F64916068CE0110DF9B -:1004B000CACF193519F48BA1877FE7CF143119F40E -:1004C0008BA18B7FE2CF113109F78BA18E7FDDCF1E -:1004D00082E3103F09F45FC0123181F0193571F0E9 -:1004E00089A181110BC0EFEEE10F60E0ED3620F441 -:1004F000F0E0E259FF4F6081CE01EADE1AA214312A -:1005000019F48BA1806296CF1F3119F48BA18064FE -:1005100091CF173219F48BA180688CCF113119F467 -:100520008BA1806187CF113709F08DCFCE01BEDE60 -:10053000882309F488CF81E08DA385CF1AA21231D8 -:1005400009F481CF193509F47ECF89A181110CC03E -:10055000EFEEE10F60E0ED3620F4F0E0E259FF4FFE -:1005600060816068CE01B4DE143119F48BA18F7DF7 -:1005700061CF1F3119F48BA18F7B5CCF173219F437 -:100580008BA18F7757CF113109F05DCF8BA18F7E73 -:1005900051CF8AA18F5F8AA356CF89A181115BCFEA -:1005A0006EE7CE0195DE57CF193509F056CF8BA1F6 -:1005B000886040CFFC0182818F5F8F709381981794 -:1005C00041F0A2819489AE0FBF2FB11D14969C9368 -:1005D00082830895FC011382128212A213A211A237 -:1005E00016A215A20895FC0192818381981759F0F3 -:1005F000A381AE0FBF2FB11D14968C9193819F5F85 -:100600009F709383089580E008958091270183303F -:1006100049F48091440190914501892B19F0E1E062 -:10062000FFE0099482E390E09093450180934401B8 -:1006300008956F927F928F929F92AF92BF92CF92C6 -:10064000DF92EF92FF920F931F93CF93DF93CDB77B -:10065000DEB70DB71EB7809121019091220187303E -:10066000910581F480914301853109F041C0909159 -:100670004801809149019817D9F186E491E0B3DFF0 -:1006800090E008C08830910539F480912001082E4F -:10069000000C990B89DD84C08831910509F04DC0AB -:1006A00080916601EDCF887C8830D9F44701FFEF57 -:1006B0008F1A9F0A6624639486E991E094DFF4011F -:1006C00081934F0163947610F7CF4701F401819134 -:1006D0004F0137DDC4018E199F098C159D05B0F3BC -:1006E0005AC084E080933E0190E080E05DDD53C01D -:1006F00090E080E0CFCF8033910521F48DE290E04F -:1007000053DD59C08133910519F481E090E0F8CFB1 -:100710008233910519F490E080E0F2CF8E38910594 -:1007200009F049C0E0E0FEE1E4918FEF90E0EA38A3 -:1007300039F7E1E0FEE184913DC0819789F5809130 -:10074000610094E0792E811102C083E0782E8091BF -:10075000980190919901891B8F70871548F2ADB669 -:10076000BEB6C72CD12C8DB79EB78C199D090FB67C -:10077000F8949EBF0FBE8DBFEDB7FEB731967F01D7 -:1007800086E991E030DFF70180838A3A09F08BCF68 -:1007900084E080933E010FB6F894BEBE0FBEADBE9E -:1007A00080912101909122018232910509F0A3CF1D -:1007B00080916100C6DC0FB6F8941EBF0FBE0DBF5E -:1007C000DF91CF911F910F91FF90EF90DF90CF902D -:1007D000BF90AF909F908F907F906F90089587FF0C -:1007E00006C08F77833018F08730D0F48F5F90E0A9 -:1007F000FC01E552FF4F2491FC01E553FF4FE491CA -:10080000EE23A1F0F0E0EE0FFF1FEB53FF4FA59199 -:10081000B491EC91E22381E090E051F480E00895FE -:100820008B3010F48B5FE3CF80E0E1CF80E090E08D -:100830000895CF93DF93EC018881D1DF29813A813C -:100840002115310521F0215031093A83298329816D -:100850003A8120363105F8F4232B91F481111EC022 -:100860008B81813079F482E08B8384E690E09A83F7 -:100870008983EE81FF81309771F0DF91CF910994E8 -:1008800081110CC08B81811106C081E08B8384E6CD -:1008900090E09A838983DF91CF9108958130D9F7D1 -:1008A0008B81813041F41B8284E690E09A838983B6 -:1008B000EC81FD81E0CF823071F71B82E8CF90E0C0 -:1008C000FC01EB54FF4F3491FC01E552FF4F2491A2 -:1008D000FC01E553FF4FE491EE23C1F0332329F0EF -:1008E0003330A9F487B58F7787BDF0E0EE0FFF1F97 -:1008F000E155FF4FA591B4918FB7611112C0F894E3 -:100900009C91E22FE095E923EC938FBF089534305A -:1009100019F487B58F7DE8CF353039F787B5877FF4 -:10092000E3CFF894EC91E22BEFCF8091760188230E -:1009300089F08091440190914501892B59F460E040 -:1009400081E0BDDF6CE271E080E090E054DC61E0CA -:1009500081E0B5CF0895CF93DF9390E0FC01E5529D -:10096000FF4F249185539F4FFC0184918823C9F048 -:1009700090E0880F991FFC01E755FF4FA591B491B6 -:10098000FC01E155FF4FC591D49161110DC09FB796 -:10099000F8948C91209582238C9388812823288336 -:1009A0009FBFDF91CF910895623051F49FB7F894C3 -:1009B0003C91822F809583238C93E8812E2BEFCF5F -:1009C0008FB7F894EC912E2B2C938FBFEACF61E078 -:1009D00080E075DF60E080E0BECF61E080E0BBDFFB -:1009E00060E080E06CCF61E085E069DF1092760125 -:1009F000F4DF64EF71E080E090E0FDDBE8CFCF93BF -:100A0000DF93EC0160E08BE0A6DF60E082E0A3DF33 -:100A10001C8A1D8A1E8A1B8EDF91CF910895CF9369 -:100A2000DF93EC01ECDF1AA2DF91CF910895CF9212 -:100A3000DF92EF92FF9280916101811188C08FB7A0 -:100A4000F894C0902A01D0902B01E0902C01F090F6 -:100A50002D018FBF80915D0190915E01A0915F019A -:100A6000B0916001C296A11DB11DC816D906EA0653 -:100A7000FB0618F086E491E0D2DFC0925D01D092CF -:100A80005E01E0925F01F09260018BE0A8DE909140 -:100A90005C019930F0F4913028F1882389F0292FF6 -:100AA0002150330BA90121E030E0B90102C0660FEB -:100AB000771F4A95E2F720915A01262B20935A017D -:100AC00020915B01820F80935B019F5F90935C019B -:100AD00004C0993069F09A3091F0FF90EF90DF9068 -:100AE000CF9008958111F9CF81E080935C01F5CF1B -:100AF00090915B01890F80935B018AE0F6CF809132 -:100B0000660160915A01813021F46E3F31F46093A7 -:100B1000660186E491E0F0DB13C06A3FD1F7909163 -:100B200064019230A1F790916301809366019093E4 -:100B30006201109263018093640183E080936501F8 -:100B400010925C0110925B0110925A01C6CF809105 -:100B500065018111C2CF80915C01883079F160F02C -:100B60008930B9F18A3009F0B8CF86E491E0FF907E -:100B7000EF90DF90CF9053CF8091620160E080FFD3 -:100B800017C08BE0E8DE61E08BE099DE90916201B6 -:100B900080915B01890F80935B018091620190E0FD -:100BA000959587958093620180915C018F5F9DCFC1 -:100BB0008BE085DE61E08BE0CEDEE8CF80915B01EB -:100BC00060E080FF07C08BE07ADE61E08BE0C3DE8F -:100BD000EBCF60E08BE0BFDE61E08BE070DEE4CF66 -:100BE000CF93DF93EC011BDF1E8E1F8ECE01F2DC54 -:100BF00018A2DF91CF9108958F929F92AF92BF92EA -:100C0000CF92DF92EF92FF92E8DE60E085E057DE60 -:100C10008FB7F89480902A0190902B01A0902C011E -:100C2000B0902D018FBFC12CD12C760183E0D7DD90 -:100C3000892B81F48FB7F894C0902A01D0902B01B2 -:100C4000E0902C01F0902D018FBFC818D908EA0858 -:100C5000FB08ECCF81E0C81AD108E108F1088EEE5C -:100C6000C81682E0D806E104F10450F0BCDEFF9023 -:100C7000EF90DF90CF90BF90AF909F908F90A7CED6 -:100C800086E491E0ADDF64EF71E080E090E0B3DAFC -:100C900081E080937601EBCF8091440190914501F2 -:100CA000892B31F080912701816080932701ADCCA1 -:100CB00080917601811101C09FCF95CECF93DF93B4 -:100CC000EC0160E08DE047DE60E08EE044DE1C8AEF -:100CD0001D8A1E8A1B8EDF91CF91089586E991E0CF -:100CE000EDDFE6E9F1E0168E178E13821282089589 -:100CF0008091440190914501892B31F08091270129 -:100D000082608093270181CC86E491E063DCE6DF9A -:100D10001092B60180917601882391F05EDE64EF37 -:100D200071E080E090E067DA52DE61E086E013DE99 -:100D300060E086E0C4DD84E080933E01809343015F -:100D40000895CF92DF92EF92FF928091B1018111CD -:100D500088C08FB7F894C0902A01D0902B01E09002 -:100D60002C01F0902D018FBF8091AD019091AE01CB -:100D7000A091AF01B091B001C296A11DB11DC816DE -:100D8000D906EA06FB0618F086E991E097DFC092E3 -:100D9000AD01D092AE01E092AF01F092B0018DE0D2 -:100DA0001EDD9091AC019930F0F4913028F1882348 -:100DB00089F0292F2150330BA90121E030E0B9013E -:100DC00002C0660F771F4A95E2F72091AA01262BF1 -:100DD0002093AA012091AB01820F8093AB019F5F0A -:100DE0009093AC0104C0993069F09A3091F0FF9073 -:100DF000EF90DF90CF9008958111F9CF81E080933B -:100E0000AC01F5CF9091AB01890F8093AB018AE0E3 -:100E1000F6CF8091B6016091AA01813021F46E3F36 -:100E200031F46093B60186E991E0C4DB13C06A3FF8 -:100E3000D1F79091B4019230A1F79091B3018093D2 -:100E4000B6019093B2011092B3018093B40183E094 -:100E50008093B5011092AC011092AB011092AA01DF -:100E6000C6CF8091B5018111C2CF8091AC0188308D -:100E700079F160F08930B9F18A3009F0B8CF86E9AC -:100E800091E0FF90EF90DF90CF9018CF8091B2016A -:100E900060E080FF17C08DE05EDD61E08DE00FDD7A -:100EA0009091B2018091AB01890F8093AB01809149 -:100EB000B20190E0959587958093B2018091AC0145 -:100EC0008F5F9DCF8DE0FBDC61E08DE044DDE8CFFE -:100ED0008091AB0160E080FF07C08DE0F0DC61E055 -:100EE0008DE039DDEBCF60E08DE035DD61E08DE058 -:100EF000E6DCE4CF0F931F93CF93DF931092220190 -:100F000010922101109224011092230110922601C7 -:100F100010922501D0E0C0E0809194018823A1F0D7 -:100F200090919301891B990B892B99F0C330D105BE -:100F300074F492D9FE01EE0FFF1FEF5DFE4F99276B -:100F4000918380832196E8CF80D990E0EDCF84D93A -:100F5000E3CFC230D10559F4809121019091220153 -:100F60004A9769F4DF91CF911F910F9108952397CC -:100F7000C9F780912101909122014A9799F78091B8 -:100F80002101909122018130910551F4209123019A -:100F9000309124012115310569F02130310581F1AD -:100FA000029749F48091230190912401892B19F42F -:100FB0009FDE01C018DDC0912101D0912201C33014 -:100FC000D10531F58091230190912401892B01F500 -:100FD000ACDCC032D105C9F5809123019091240188 -:100FE000009741F097FD31C09C0123503109223018 -:100FF000310558F58093600084E080933E01B2CFC4 -:10100000F2DC68EE73E080E090E0F5D8F5DDD3CF58 -:10101000C530D10599F4009123011091240161E0BC -:1010200086E099DC1016110624F060E086E047DCCB -:10103000D0CF61E000381105CCF7F7CFC830D1052B -:10104000C1F48091230180932001CF38D10509F0AC -:1010500089CF8091230190912401C19709F082CF1B -:1010600080ED97E090934501809344011092270111 -:1010700079CFC931D10579F49091230181E0809332 -:10108000660190936201109263018093640183E092 -:101090008093650167CFCA31D10509F09ACF80915D -:1010A00025019091230121E0209366019093620134 -:1010B0008093630182E0E9CF1F920F920FB60F92E7 -:1010C00011242F933F938F939F93AF93BF9380915E -:1010D0002A0190912B01A0912C01B0912D0130910A -:1010E000290123E0230F2D3768F126E8230F02960C -:1010F000A11DB11D2093290180932A0190932B01FA -:10110000A0932C01B0932D0180912E0190912F017D -:10111000A0913001B09131010196A11DB11D8093C4 -:101120002E0190932F01A0933001B0933101BF9114 -:10113000AF919F918F913F912F910F900FBE0F9084 -:101140001F9018950196A11DB11DD4CF1F920F922B -:101150000FB60F9211242F933F934F935F936F938A -:101160007F938F939F93AF93BF93EF93FF93809160 -:10117000390190913A01892B29F0E0913901F091E0 -:101180003A010995FF91EF91BF91AF919F918F9196 -:101190007F916F915F914F913F912F910F900FBE73 -:1011A0000F901F9018951F920F920FB60F92112457 -:1011B0002F933F934F935F936F937F938F939F935F -:1011C000AF93BF93EF93FF938091370190913801D4 -:1011D000892B29F0E0913701F09138010995FF91B1 -:1011E000EF91BF91AF919F918F917F916F915F919F -:1011F0004F913F912F910F900FBE0F901F90189518 -:101200001F920F920FB60F9211240F931F932F93DB -:101210003F934F935F936F937F938F939F93AF937E -:10122000BF93CF93EF93FF9380912801823009F40D -:1012300076C0C8F4882399F1813009F456C0FF9133 -:10124000EF91CF91BF91AF919F918F917F916F91CE -:101250005F914F913F912F911F910F910F900FBE72 -:101260000F901F901895843009F45FC0B8F1853055 -:1012700031F784E0809328019FB180918F018F5FC7 -:101280008F7020919001281709F470C080938F010E -:10129000E0918F01F0E0E050FF4F908319C08FB1D3 -:1012A000882331F08FB1869590913201891319C04E -:1012B000789B12C0E0913501F0913601309729F00A -:1012C0008091920180939101099581E0809328019A -:1012D0001FB8B89A8EE721C084E0F8CF8FB1882379 -:1012E00021F0B89888EA8DB917C08091910190914A -:1012F00092019817B1F3809191018F5F8F70809365 -:101300009101E0919101F0E0E05FFE4F80818FB9A3 -:1013100082E080932801B89A80E78EB990CF83E06D -:1013200080932801B8981FB8D5CF85E08093280115 -:10133000B89880E78EB900913301109134010115FE -:10134000110509F47CCFC0918F01809190018C1719 -:1013500009F475CF8EB18E7AE9F3759B70CF75D78E -:1013600090E0F8010995C093900169CFB898B2CF89 -:101370001F920F920FB60F9211240F931F932F936A -:101380003F934F935F936F937F938F939F93AF930D -:10139000BF93CF93EF93FF930091330110913401EA -:1013A0000115110561F0C0918F01809190018C179A -:1013B00031F04BD790E0F8010995C093900110925D -:1013C0002801B898B29B1AC0B09BFCCF88EA8DB9AF -:1013D00080EF8EB9FF91EF91CF91BF91AF919F9127 -:1013E0008F917F916F915F914F913F912F911F91BD -:1013F0000F910F900FBE0F901F90189588EFE7CFB9 -:101400001F920F920FB60F9211242F933F934F9379 -:101410005F936F937F938F939F93AF93BF93EF935C -:10142000FF9315BC1EBC80916501882331F180912A -:1014300065018330A9F460E082E041DA61E082E096 -:101440008ADA60E08BE03BDA61E08BE084DA81E00D -:1014500080936101809165018150809365010DC089 -:10146000809165018130B1F760E082E074DA10921A -:10147000650110925C0110925B018091B501882397 -:1014800031F18091B5018330A9F460E08EE017DA84 -:1014900061E08EE060DA60E08DE011DA61E08DE01D -:1014A0005ADA81E08093B1018091B5018150809337 -:1014B000B5010DC08091B5018130B1F760E08EE0DB -:1014C0004ADA1092B5011092AC011092AB01FF9173 -:1014D000EF91BF91AF919F918F917F916F915F91AC -:1014E0004F913F912F910F900FBE0F901F90189525 -:1014F00093E093BF789489B7826089BF90BF81E001 -:1015000087BD86BD87E08FBD87E886B9F89410BE99 -:1015100017BC16BC15BC1EBC19BC1CBC85E48FBD19 -:1015200084E68DBD89B7806489BF78941092930159 -:1015300010929401109295011092900110928F01D7 -:10154000109291011092920182E4809332011092E4 -:101550003601109235011092340110923301C29A73 -:10156000C09ABA9AB89888EA8DB980EF8EB98AE79E -:1015700097E0909334018093330189E193E0909355 -:101580003601809335018CE496E090938C01809332 -:101590008B0190938E0180938D0188E796E0909364 -:1015A000840180938301909386018093850185E96E -:1015B00094E090937C0180937B0160E083E0CBD941 -:1015C00061E085E0C8D961E085E079D961E086E035 -:1015D000C2D961E086E0BFD960E086E070D9FDD96C -:1015E00061E081E0B8D961E081E069D98FB7F89412 -:1015F00027E135E030933A01209339018FBF85B759 -:101600008C7F826085BF8BB780688BBF8FB7F89463 -:1016100021EA36E030933801209337018FBF85B738 -:101620008C7F826085BF8BB780648BBF8CEF982ED8 -:1016300094E0F92EC1E023EFA22E38E2832E42E09F -:10164000B42E53E0E52E0FEF10E0CC24CA9463E0F3 -:10165000D62E87E891E0EDD88FE791E0EAD887E7CA -:1016600091E0E7D8E0913E01EE2309F444C0809177 -:101670007601811140C010923E0110923D01D0923E -:101680006300C09262002ADB1092B6019091430180 -:10169000809142018F5F80934201D091760199231E -:1016A00009F4B3C1D111B1C11092430110924101AB -:1016B000109365000093640080916B01882319F0FA -:1016C00017DB10926B0180916C01882319F02DD9E2 -:1016D00010926C018091440190914501009729F08E -:1016E000019790934501809344016AE070E080E0A7 -:1016F00090E081D5AECF80913D01882361F180914A -:10170000620090916300009709F5D0913C0110921E -:101710003D018091B601813009F4B8CFE13108F084 -:101720006FC1F0E0EB56F44F099417C028C042C0D7 -:101730006AC16AC086C064C163C1A7C0BBC0DBC048 -:10174000F6C011C185C04DC157C12DC001979093FE -:10175000630080936200DE2FDCCF809176018823C6 -:1017600011F19092610010923B01C0933D011093E2 -:10177000630000936200F0923C01D1E014C09091AC -:10178000980180919901981771F086E991E02BD723 -:101790008A3A61F4C0933D011093630000936200A4 -:1017A000F0923C01D2E0D0933E0170CF8C3FD9F74C -:1017B000DFEFF9CF9091980180919901981799F3F3 -:1017C00086E991E010D7882321F09DEF980F9230A1 -:1017D00050F78093610080916000D8E081110BC0C8 -:1017E000C093B601A092B2018092B301B092B4014D -:1017F000E092B501DDE0C0933D01109363000093DA -:101800006200F0923C01CFCF9092610010923B01B8 -:101810001092990110929801C093B6018FEF8093B6 -:10182000B2011092B301C093B401E092B501C0932C -:101830003D01109363000093620080933C01D5E06A -:10184000B2CF8A3F09F0B4CF86E991E0CCD68DCFF4 -:1018500010929901109298018A3F11F0D3E0A3CF22 -:10186000C093B60184EF8093B2011092B301C0938C -:10187000B401E092B501C0933D0110936300009361 -:101880006200F0923C01DEE08ECFC093B601A092E0 -:10189000B20188EC8093B301B092B401E092B5013B -:1018A000C0933D011093630000936200F0923C01ED -:1018B000D9E079CF10929901109298018A3F71F680 -:1018C00080913B01C093B601A092B201882389F0B8 -:1018D00088EC8093B301B092B401E092B501C0935B -:1018E0003D011093630000936200F0923C01DAE046 -:1018F0005ACF84E6EECF10929901109298018A3F58 -:1019000009F0ACCFC093B601A092B20180E58093FC -:10191000B301B092B401E092B501C0933D011093C0 -:10192000630000936200F0923C01DBE03CCF109238 -:101930009901109298018A3F09F090CFC093B601A7 -:1019400082EF8093B2011092B301C093B401E09290 -:10195000B501C0933D011093630000936200F092C3 -:101960003C01DCE020CF909198018091990198177B -:1019700009F419CF86E991E036D68A3F09F413CFEE -:10198000882329F09DEF980F923008F011CF8093B3 -:10199000610080913B01811104C08091600083301F -:1019A000A1F4C093B601A092B2018092B301B092AB -:1019B000B401E092B501C0933D0110936300009320 -:1019C0006200F0923C01DDE0EECEC0933B01C0939B -:1019D0003D011093630000936200F0923C01D8E057 -:1019E000E2CE10929901109298018A3F09F036CF09 -:1019F00010923D01DFE0D7CE10923D01D0E1D3CE71 -:101A000090926100D0CED4E0CECE80914101882367 -:101A100059F1209164003091650021153105F1F4F0 -:101A2000809140011092410120916601953009F4A6 -:101A300085C0E0F4913009F450C008F441C09430FE -:101A400009F463C080934301DD2309F435CE83E0BC -:101A5000C6D6892B09F030CEC6D72ECE21503109FB -:101A60003093650020936400892FDECF923109F412 -:101A70006BC0B8F4913131F7C09366018DEE80935D -:101A8000620110926301C0936401E0926501C0930A -:101A900041011093650000936400F092400182E1DF -:101AA000D1CF943109F46BC09E3F61F6C0934101E0 -:101AB0001093650000936400F09240018FEFC2CF55 -:101AC000DD2309F4BFCFC09341011093650000935B -:101AD0006400F092400181E0B5CF213009F4B2CF2B -:101AE000209175012A3A61F4B0923F01909341012F -:101AF0001093650000936400F092400181E1A2CF51 -:101B00002C3F09F09FCF8EEF9DCF86E491E068D8FF -:101B1000C09366018FEF8093620110926301C093BE -:101B20006401E0926501C093410110936500009348 -:101B300064008EEF8093400185E084CF213009F46A -:101B400081CF2A3F01F7BFCF213009F47BCF2A3F55 -:101B5000D1F680913F01C09366018093620110929B -:101B60006301C0936401E0926501C0934101109349 -:101B7000650000936400F092400184E163CF21305E -:101B800009F460CF2A3F09F0BECF1092410185E1F0 -:101B900059CFCF93DF93E7E8F1E0128211821382ED -:101BA000158214821782168284E0808362E0D3D685 -:101BB000EFE7F1E0128211821382158214821782FC -:101BC00016828CE0808362E0C6D6E7E7F1E01282FD -:101BD00011821382158214821782168287E0808315 -:101BE00062E0B9D6C6E4D1E08BEE90E099838883B9 -:101BF0001A821B821C8A1D8A1E8A1F8A188E198EC1 -:101C00001A8E1B8E1E8E1F8E18A2CE01F8D61E8E27 -:101C10001F8E1B821A8287EF90E09983888319A216 -:101C20001AA21BA21CA21DA21EA288E0E6E6F0E0FA -:101C3000ADE6B1E001900D928A95E1F71FA6E6E9C5 -:101C4000F1E08FED90E09183808312821382148AF9 -:101C5000158A168A178A108E118E128E138E168E82 -:101C6000178E10A2DF91CF9139C8EE0FFF1F05909C -:0A1C7000F491E02D0994F894FFCFE1 -:101C7A0004FCFF03FF001112145911141F273E0020 -:101C8A0000407E0000000000000000003B00000051 -:101C9A00000000003F0000000000000041000000BA -:101CAA00000000000000000000000000000000002A -:101CBA00000000000000005F0000000000000000BB -:101CCA00000000000000006C00000000000000009E -:101CDA0000000000000051004F500000004B4C541F -:101CEA000059530000000056007C55000000005EB9 -:101CFA0006F3029D00DA0200000000FF04F3029DD1 -:101D0A0000DA02000000000F05F302EA027C01007B -:00000001FF +:1000000076C0D1C899C0FCC997C096C055C8B0C9C0 +:10001000F7C892C091C090C08FC098C88DC08CC0E6 +:100020008BC08AC089C07800747270717B00797748 +:100030007573100100003C2C003A11020000002EE4 +:10004000201F12030000302F2113050400003D3152 +:100050002215140600003332242316070000003452 +:10006000251708090000352618190B0A0000363735 +:1000700027281A0C00000029001B0D00001E392B38 +:100080001C001D0000002D000000000F00005D009E +:100090005C5B0000006368626166606E5A7A6A6742 +:1000A0006964657D000000007600003A00370000BA +:1000B000003B0038000000000000000000000300CA +:1000C00004000500000000390036000101010101B3 +:1000D00001010102020202020202020102040810EE +:1000E000204080010204081020408000C90D112426 +:1000F0001FBECFE5D2E0DEBFCDBF11E0A0E6B0E08D +:10010000EAE7FCE102C005900D92A030B107D9F7F3 +:1001100021E0A0E0B1E001C01D92A73BB207E1F7EA +:1001200010E0C7E7D0E003C02197FE019EDDC6378F +:10013000D107D1F7DDD99FCD63CFFC0113821282A5 +:100140000895909195019923A1F090919401903296 +:1001500040F590919301E92FF0E0E050FF4F80834C +:1001600081E0890F809393018093940181E090E076 +:10017000089520919201909191012F5F921B9F70A1 +:1001800081F0909192019F5F9F7020919101921751 +:10019000E1F3E92FF0E0E05FFE4F8083909392015E +:1001A000E5CF90E080E00895CCCF3FB7F894809100 +:1001B0002E0190912F01A0913001B091310122B711 +:1001C00008B601FE05C02F3F19F00196A11DB11D13 +:1001D0003FBFBA2FA92F982F8827BC01CD01620FEE +:1001E000711D811D911D42E0660F771F881F991FA9 +:1001F0004A95D1F70895CF92DF92EF92FF92CF9375 +:10020000DF936B017C01D1DFEB01CFDF6C1B7D0B3A +:10021000683E7340A0F0C114D104E104F10439F444 +:10022000DF91CF91FF90EF90DF90CF90089581E024 +:10023000C81AD108E108F108C851DC4FE6CFC11453 +:10024000D104E104F10409F7EBCF90919001809182 +:100250008F01891B8F70089580919401882339F054 +:1002600020919301821318C08FEF9FEF0895EDDF67 +:100270008823D1F39091900180918F019817E1F339 +:10028000E0919001EF5FEF70E0939001F0E0E050BB +:10029000FF4F808190E00895E22FF0E0E050FF4FA3 +:1002A000808190E02F5F209393010895FC0183A14A +:1002B00082FD03C083A185FF07C083A180FD06C026 +:1002C00083A182958170089580E0089581E008956A +:1002D000FC0182818F5F8F709381981749F0A28112 +:1002E000AE0FBF2FB11D14966C93828381E00895E9 +:1002F00081E081A380E00895AF92BF92CF92DF9218 +:10030000EF92FF920F931F93CF93DF93EC016A3A22 +:1003100011F06C3FA9F480914301853179F484E0B8 +:10032000809343011FA6DF91CF911F910F91FF9002 +:10033000EF90DF90CF90BF90AF9008956FA7F3CF6D +:10034000162F89A1882309F440C09A818B819813C4 +:100350003CC08AA1811139C05E01F12CE12CCC2472 +:10036000C394D12C8BA19CA10E2D892790E00E2C3B +:1003700002C0959587950A94E2F780FF1BC0F501AE +:1003800067A18BA190E00E2C02C0959587950A94E9 +:10039000E2F780FF6068CE019BDF8823B1F09CA16B +:1003A0008BA1960101C0220F0A95EAF789278223C3 +:1003B00089278CA3FFEFEF1AFF0A8FEFA81AB80A5C +:1003C00098E0E916F10471F619A28AA1823309F4C2 +:1003D000B5C090F5813109F453C0813209F478C079 +:1003E000811131C081E1103F09F4D5C081E51B3A8C +:1003F00009F4D1C081E2103E09F4CDC081E4113E80 +:1004000009F4C9C089A1811110C0103F70F48FEFA9 +:10041000810F60E0833838F4812F8150990BFC0103 +:10042000EA5DFF4F6491CE0153DF123109F0BCC089 +:100430008BA182608BA307C0873409F4AEC048F457 +:10044000813408F0A6C089A181116DCF8BA18CA346 +:100450006ACF8135C1F71AA2F6CF143119F48BA1F6 +:100460008460E8CF113119F48BA18160E3CF143897 +:1004700051F7CE011BDF882331F381E08EA3E3CF58 +:100480001AA21231B1F48BA18D7F8BA389A18111A6 +:10049000DACF8FEF810F60E0833838F4812F8150FD +:1004A000990BFC01EA5DFF4F64916068CE0110DF9B +:1004B000CACF193519F48BA1877FE7CF143119F40E +:1004C0008BA18B7FE2CF113109F78BA18E7FDDCF1E +:1004D00082E3103F09F45FC0123181F0193571F0E9 +:1004E00089A181110BC0EFEEE10F60E0ED3620F441 +:1004F000F0E0E259FF4F6081CE01EADE1AA214312A +:1005000019F48BA1806296CF1F3119F48BA18064FE +:1005100091CF173219F48BA180688CCF113119F467 +:100520008BA1806187CF113709F08DCFCE01BEDE60 +:10053000882309F488CF81E08DA385CF1AA21231D8 +:1005400009F481CF193509F47ECF89A181110CC03E +:10055000EFEEE10F60E0ED3620F4F0E0E259FF4FFE +:1005600060816068CE01B4DE143119F48BA18F7DF7 +:1005700061CF1F3119F48BA18F7B5CCF173219F437 +:100580008BA18F7757CF113109F05DCF8BA18F7E73 +:1005900051CF8AA18F5F8AA356CF89A181115BCFEA +:1005A0006EE7CE0195DE57CF193509F056CF8BA1F6 +:1005B000886040CFFC0182818F5F8F709381981794 +:1005C00041F0A2819489AE0FBF2FB11D14969C9368 +:1005D00082830895FC011382128212A213A211A237 +:1005E00016A215A20895FC0192818381981759F0F3 +:1005F000A381AE0FBF2FB11D14968C9193819F5F85 +:100600009F709383089580E008958091270183303F +:1006100049F48091440190914501892B19F0E1E062 +:10062000FFE0099482E390E09093450180934401B8 +:1006300008956F927F928F929F92AF92BF92CF92C6 +:10064000DF92EF92FF920F931F93CF93DF93CDB77B +:10065000DEB70DB71EB7809121019091220187303E +:10066000910581F480914301853109F041C0909159 +:100670004801809149019817D9F186E491E0B3DFF0 +:1006800090E008C08830910539F480912001082E4F +:10069000000C990B89DD84C08831910509F04DC0AB +:1006A00080916601EDCF887C8830D9F44701FFEF57 +:1006B0008F1A9F0A6624639486E991E094DFF4011F +:1006C00081934F0163947610F7CF4701F401819134 +:1006D0004F0137DDC4018E199F098C159D05B0F3BC +:1006E0005AC084E080933E0190E080E05DDD53C01D +:1006F00090E080E0CFCF8033910521F48DE290E04F +:1007000053DD59C08133910519F481E090E0F8CFB1 +:100710008233910519F490E080E0F2CF8E38910594 +:1007200009F049C0E0E0FEE1E4918FEF90E0EA38A3 +:1007300039F7E1E0FEE184913DC0819789F5809130 +:10074000610094E0792E811102C083E0782E8091BF :10075000980190919901891B8F70871548F2ADB669 +:10076000BEB6C72CD12C8DB79EB78C199D090FB67C +:10077000F8949EBF0FBE8DBFEDB7FEB731967F01D7 +:1007800086E991E030DFF70180838A3A09F08BCF68 +:1007900084E080933E010FB6F894BEBE0FBEADBE9E +:1007A00080912101909122018232910509F0A3CF1D +:1007B00080916100C6DC0FB6F8941EBF0FBE0DBF5E +:1007C000DF91CF911F910F91FF90EF90DF90CF902D +:1007D000BF90AF909F908F907F906F90089587FF0C +:1007E00006C08F77833018F08730D0F48F5F90E0A9 +:1007F000FC01E552FF4F2491FC01E553FF4FE491CA +:10080000EE23A1F0F0E0EE0FFF1FEB53FF4FA59199 +:10081000B491EC91E22381E090E051F480E00895FE +:100820008B3010F48B5FE3CF80E0E1CF80E090E08D +:100830000895CF93DF93EC018881D1DF29813A813C +:100840002115310521F0215031093A83298329816D +:100850003A8120363105F8F4232B91F481111EC022 +:100860008B81813079F482E08B8384E690E09A83F7 +:100870008983EE81FF81309771F0DF91CF910994E8 +:1008800081110CC08B81811106C081E08B8384E6CD +:1008900090E09A838983DF91CF9108958130D9F7D1 +:1008A0008B81813041F41B8284E690E09A838983B6 +:1008B000EC81FD81E0CF823071F71B82E8CF90E0C0 +:1008C000FC01EB54FF4F3491FC01E552FF4F2491A2 +:1008D000FC01E553FF4FE491EE23C1F0332329F0EF +:1008E0003330A9F487B58F7787BDF0E0EE0FFF1F97 +:1008F000E155FF4FA591B4918FB7611112C0F894E3 +:100900009C91E22FE095E923EC938FBF089534305A +:1009100019F487B58F7DE8CF353039F787B5877FF4 +:10092000E3CFF894EC91E22BEFCF8091760188230E +:1009300089F08091440190914501892B59F460E040 +:1009400081E0BDDF6CE271E080E090E054DC61E0CA +:1009500081E0B5CF0895CF93DF9390E0FC01E5529D +:10096000FF4F249185539F4FFC0184918823C9F048 +:1009700090E0880F991FFC01E755FF4FA591B491B6 +:10098000FC01E155FF4FC591D49161110DC09FB796 +:10099000F8948C91209582238C9388812823288336 +:1009A0009FBFDF91CF910895623051F49FB7F894C3 +:1009B0003C91822F809583238C93E8812E2BEFCF5F +:1009C0008FB7F894EC912E2B2C938FBFEACF61E078 +:1009D00080E075DF60E080E0BECF61E080E0BBDFFB +:1009E00060E080E06CCF61E085E069DF1092760125 +:1009F000F4DF64EF71E080E090E0FDDBE8CFCF93BF +:100A0000DF93EC0160E08BE0A6DF60E082E0A3DF33 +:100A10001C8A1D8A1E8A1B8EDF91CF910895CF9369 +:100A2000DF93EC01ECDF1AA2DF91CF910895CF9212 +:100A3000DF92EF92FF9280916101811188C08FB7A0 +:100A4000F894C0902A01D0902B01E0902C01F090F6 +:100A50002D018FBF80915D0190915E01A0915F019A +:100A6000B0916001C296A11DB11DC816D906EA0653 +:100A7000FB0618F086E491E0D2DFC0925D01D092CF +:100A80005E01E0925F01F09260018BE0A8DE909140 +:100A90005C019930F0F4913028F1882389F0292FF6 +:100AA0002150330BA90121E030E0B90102C0660FEB +:100AB000771F4A95E2F720915A01262B20935A017D +:100AC00020915B01820F80935B019F5F90935C019B +:100AD00004C0993069F09A3091F0FF90EF90DF9068 +:100AE000CF9008958111F9CF81E080935C01F5CF1B +:100AF00090915B01890F80935B018AE0F6CF809132 +:100B0000660160915A01813021F46E3F31F46093A7 +:100B1000660186E491E0F0DB13C06A3FD1F7909163 +:100B200064019230A1F790916301809366019093E4 +:100B30006201109263018093640183E080936501F8 +:100B400010925C0110925B0110925A01C6CF809105 +:100B500065018111C2CF80915C01883079F160F02C +:100B60008930B9F18A3009F0B8CF86E491E0FF907E +:100B7000EF90DF90CF9053CF8091620160E080FFD3 +:100B800017C08BE0E8DE61E08BE099DE90916201B6 +:100B900080915B01890F80935B018091620190E0FD +:100BA000959587958093620180915C018F5F9DCFC1 +:100BB0008BE085DE61E08BE0CEDEE8CF80915B01EB +:100BC00060E080FF07C08BE07ADE61E08BE0C3DE8F +:100BD000EBCF60E08BE0BFDE61E08BE070DEE4CF66 +:100BE000CF93DF93EC011BDF1E8E1F8ECE01F2DC54 +:100BF00018A2DF91CF9108958F929F92AF92BF92EA +:100C0000CF92DF92EF92FF92E8DE60E085E057DE60 +:100C10008FB7F89480902A0190902B01A0902C011E +:100C2000B0902D018FBFC12CD12C760183E0D7DD90 +:100C3000892B81F48FB7F894C0902A01D0902B01B2 +:100C4000E0902C01F0902D018FBFC818D908EA0858 +:100C5000FB08ECCF81E0C81AD108E108F1088EEE5C +:100C6000C81682E0D806E104F10450F0BCDEFF9023 +:100C7000EF90DF90CF90BF90AF909F908F90A7CED6 +:100C800086E491E0ADDF64EF71E080E090E0B3DAFC +:100C900081E080937601EBCF8091440190914501F2 +:100CA000892B31F080912701816080932701ADCCA1 +:100CB00080917601811101C09FCF95CECF93DF93B4 +:100CC000EC0160E08DE047DE60E08EE044DE1C8AEF +:100CD0001D8A1E8A1B8EDF91CF91089586E991E0CF +:100CE000EDDFE6E9F1E0168E178E13821282089589 +:100CF0008091440190914501892B31F08091270129 +:100D000082608093270181CC86E491E063DCE6DF9A +:100D10001092B60180917601882391F05EDE64EF37 +:100D200071E080E090E067DA52DE61E086E013DE99 +:100D300060E086E0C4DD84E080933E01809343015F +:100D40000895CF92DF92EF92FF928091B1018111CD +:100D500088C08FB7F894C0902A01D0902B01E09002 +:100D60002C01F0902D018FBF8091AD019091AE01CB +:100D7000A091AF01B091B001C296A11DB11DC816DE +:100D8000D906EA06FB0618F086E991E097DFC092E3 +:100D9000AD01D092AE01E092AF01F092B0018DE0D2 +:100DA0001EDD9091AC019930F0F4913028F1882348 +:100DB00089F0292F2150330BA90121E030E0B9013E +:100DC00002C0660F771F4A95E2F72091AA01262BF1 +:100DD0002093AA012091AB01820F8093AB019F5F0A +:100DE0009093AC0104C0993069F09A3091F0FF9073 +:100DF000EF90DF90CF9008958111F9CF81E080933B +:100E0000AC01F5CF9091AB01890F8093AB018AE0E3 +:100E1000F6CF8091B6016091AA01813021F46E3F36 +:100E200031F46093B60186E991E0C4DB13C06A3FF8 +:100E3000D1F79091B4019230A1F79091B3018093D2 +:100E4000B6019093B2011092B3018093B40183E094 +:100E50008093B5011092AC011092AB011092AA01DF +:100E6000C6CF8091B5018111C2CF8091AC0188308D +:100E700079F160F08930B9F18A3009F0B8CF86E9AC +:100E800091E0FF90EF90DF90CF9018CF8091B2016A +:100E900060E080FF17C08DE05EDD61E08DE00FDD7A :100EA0009091B2018091AB01890F8093AB01809149 +:100EB000B20190E0959587958093B2018091AC0145 +:100EC0008F5F9DCF8DE0FBDC61E08DE044DDE8CFFE +:100ED0008091AB0160E080FF07C08DE0F0DC61E055 +:100EE0008DE039DDEBCF60E08DE035DD61E08DE058 +:100EF000E6DCE4CF0F931F93CF93DF931092220190 +:100F000010922101109224011092230110922601C7 +:100F100010922501D0E0C0E0809194018823A1F0D7 +:100F200090919301891B990B892B99F0C330D105BE +:100F300074F492D9FE01EE0FFF1FEF5DFE4F99276B +:100F4000918380832196E8CF80D990E0EDCF84D93A +:100F5000E3CFC230D10559F4809121019091220153 +:100F60004A9769F4DF91CF911F910F9108952397CC +:100F7000C9F780912101909122014A9799F78091B8 +:100F80002101909122018130910551F4209123019A +:100F9000309124012115310569F02130310581F1AD +:100FA000029749F48091230190912401892B19F42F +:100FB0009FDE01C018DDC0912101D0912201C33014 +:100FC000D10531F58091230190912401892B01F500 +:100FD000ACDCC032D105C9F5809123019091240188 +:100FE000009741F097FD31C09C0123503109223018 +:100FF000310558F58093600084E080933E01B2CFC4 +:10100000F2DC68EE73E080E090E0F5D8F5DDD3CF58 +:10101000C530D10599F4009123011091240161E0BC +:1010200086E099DC1016110624F060E086E047DCCB +:10103000D0CF61E000381105CCF7F7CFC830D1052B +:10104000C1F48091230180932001CF38D10509F0AC +:1010500089CF8091230190912401C19709F082CF1B +:1010600080ED97E090934501809344011092270111 +:1010700079CFC931D10579F49091230181E0809332 +:10108000660190936201109263018093640183E092 +:101090008093650167CFCA31D10509F09ACF80915D +:1010A00025019091230121E0209366019093620134 +:1010B0008093630182E0E9CF1F920F920FB60F92E7 +:1010C00011242F933F938F939F93AF93BF9380915E +:1010D0002A0190912B01A0912C01B0912D0130910A +:1010E000290123E0230F2D3768F126E8230F02960C +:1010F000A11DB11D2093290180932A0190932B01FA +:10110000A0932C01B0932D0180912E0190912F017D +:10111000A0913001B09131010196A11DB11D8093C4 +:101120002E0190932F01A0933001B0933101BF9114 +:10113000AF919F918F913F912F910F900FBE0F9084 +:101140001F9018950196A11DB11DD4CF1F920F922B +:101150000FB60F9211242F933F934F935F936F938A +:101160007F938F939F93AF93BF93EF93FF93809160 +:10117000390190913A01892B29F0E0913901F091E0 +:101180003A010995FF91EF91BF91AF919F918F9196 +:101190007F916F915F914F913F912F910F900FBE73 +:1011A0000F901F9018951F920F920FB60F92112457 +:1011B0002F933F934F935F936F937F938F939F935F +:1011C000AF93BF93EF93FF938091370190913801D4 +:1011D000892B29F0E0913701F09138010995FF91B1 +:1011E000EF91BF91AF919F918F917F916F915F919F +:1011F0004F913F912F910F900FBE0F901F90189518 +:101200001F920F920FB60F9211240F931F932F93DB +:101210003F934F935F936F937F938F939F93AF937E +:10122000BF93CF93EF93FF9380912801823009F40D +:1012300076C0C8F4882399F1813009F456C0FF9133 +:10124000EF91CF91BF91AF919F918F917F916F91CE +:101250005F914F913F912F911F910F910F900FBE72 +:101260000F901F901895843009F45FC0B8F1853055 +:1012700031F784E0809328019FB180918F018F5FC7 +:101280008F7020919001281709F470C080938F010E +:10129000E0918F01F0E0E050FF4F908319C08FB1D3 +:1012A000882331F08FB1869590913201891319C04E +:1012B000789B12C0E0913501F0913601309729F00A +:1012C0008091920180939101099581E0809328019A +:1012D0001FB8B89A8EE721C084E0F8CF8FB1882379 +:1012E00021F0B89888EA8DB917C08091910190914A +:1012F00092019817B1F3809191018F5F8F70809365 +:101300009101E0919101F0E0E05FFE4F80818FB9A3 +:1013100082E080932801B89A80E78EB990CF83E06D +:1013200080932801B8981FB8D5CF85E08093280115 +:10133000B89880E78EB900913301109134010115FE +:10134000110509F47CCFC0918F01809190018C1719 +:1013500009F475CF8EB18E7AE9F3759B70CF75D78E +:1013600090E0F8010995C093900169CFB898B2CF89 +:101370001F920F920FB60F9211240F931F932F936A +:101380003F934F935F936F937F938F939F93AF930D +:10139000BF93CF93EF93FF930091330110913401EA +:1013A0000115110561F0C0918F01809190018C179A +:1013B00031F04BD790E0F8010995C093900110925D +:1013C0002801B898B29B1AC0B09BFCCF88EA8DB9AF +:1013D00080EF8EB9FF91EF91CF91BF91AF919F9127 +:1013E0008F917F916F915F914F913F912F911F91BD +:1013F0000F910F900FBE0F901F90189588EFE7CFB9 +:101400001F920F920FB60F9211242F933F934F9379 +:101410005F936F937F938F939F93AF93BF93EF935C +:10142000FF9315BC1EBC80916501882331F180912A +:1014300065018330A9F460E082E041DA61E082E096 +:101440008ADA60E08BE03BDA61E08BE084DA81E00D +:1014500080936101809165018150809365010DC089 +:10146000809165018130B1F760E082E074DA10921A +:10147000650110925C0110925B018091B501882397 +:1014800031F18091B5018330A9F460E08EE017DA84 +:1014900061E08EE060DA60E08DE011DA61E08DE01D +:1014A0005ADA81E08093B1018091B5018150809337 +:1014B000B5010DC08091B5018130B1F760E08EE0DB +:1014C0004ADA1092B5011092AC011092AB01FF9173 +:1014D000EF91BF91AF919F918F917F916F915F91AC +:1014E0004F913F912F910F900FBE0F901F90189525 +:1014F00093E093BF789489B7826089BF90BF81E001 +:1015000087BD86BD87E08FBD87E886B9F89410BE99 +:1015100017BC16BC15BC1EBC19BC1CBC85E48FBD19 +:1015200084E68DBD89B7806489BF78941092930159 +:1015300010929401109295011092900110928F01D7 +:10154000109291011092920182E4809332011092E4 +:101550003601109235011092340110923301C29A73 +:10156000C09ABA9AB89888EA8DB980EF8EB98AE79E +:1015700097E0909334018093330189E193E0909355 +:101580003601809335018CE496E090938C01809332 +:101590008B0190938E0180938D0188E796E0909364 +:1015A000840180938301909386018093850185E96E +:1015B00094E090937C0180937B0160E083E0CBD941 +:1015C00061E085E0C8D961E085E079D961E086E035 +:1015D000C2D961E086E0BFD960E086E070D9FDD96C +:1015E00061E081E0B8D961E081E069D98FB7F89412 :1015F00027E135E030933A01209339018FBF85B759 +:101600008C7F826085BF8BB780688BBF8FB7F89463 +:1016100021EA36E030933801209337018FBF85B738 +:101620008C7F826085BF8BB780648BBF8CEF982ED8 +:1016300094E0F92EC1E023EFA22E38E2832E42E09F +:10164000B42E53E0E52E0FEF10E0CC24CA9463E0F3 +:10165000D62E87E891E0EDD88FE791E0EAD887E7CA +:1016600091E0E7D8E0913E01EE2309F444C0809177 +:101670007601811140C010923E0110923D01D0923E +:101680006300C09262002ADB1092B6019091430180 +:10169000809142018F5F80934201D091760199231E +:1016A00009F4B3C1D111B1C11092430110924101AB +:1016B000109365000093640080916B01882319F0FA +:1016C00017DB10926B0180916C01882319F02DD9E2 +:1016D00010926C018091440190914501009729F08E +:1016E000019790934501809344016AE070E080E0A7 +:1016F00090E081D5AECF80913D01882361F180914A +:10170000620090916300009709F5D0913C0110921E +:101710003D018091B601813009F4B8CFE13108F084 +:101720006FC1F0E0EB56F44F099417C028C042C0D7 +:101730006AC16AC086C064C163C1A7C0BBC0DBC048 +:10174000F6C011C185C04DC157C12DC001979093FE +:10175000630080936200DE2FDCCF809176018823C6 +:1017600011F19092610010923B01C0933D011093E2 +:10177000630000936200F0923C01D1E014C09091AC +:10178000980180919901981771F086E991E02BD723 +:101790008A3A61F4C0933D011093630000936200A4 +:1017A000F0923C01D2E0D0933E0170CF8C3FD9F74C +:1017B000DFEFF9CF9091980180919901981799F3F3 +:1017C00086E991E010D7882321F09DEF980F9230A1 +:1017D00050F78093610080916000D8E081110BC0C8 +:1017E000C093B601A092B2018092B301B092B4014D +:1017F000E092B501DDE0C0933D01109363000093DA +:101800006200F0923C01CFCF9092610010923B01B8 +:101810001092990110929801C093B6018FEF8093B6 +:10182000B2011092B301C093B401E092B501C0932C +:101830003D01109363000093620080933C01D5E06A +:10184000B2CF8A3F09F0B4CF86E991E0CCD68DCFF4 +:1018500010929901109298018A3F11F0D3E0A3CF22 +:10186000C093B60184EF8093B2011092B301C0938C +:10187000B401E092B501C0933D0110936300009361 +:101880006200F0923C01DEE08ECFC093B601A092E0 +:10189000B20188EC8093B301B092B401E092B5013B +:1018A000C0933D011093630000936200F0923C01ED +:1018B000D9E079CF10929901109298018A3F71F680 +:1018C00080913B01C093B601A092B201882389F0B8 +:1018D00088EC8093B301B092B401E092B501C0935B +:1018E0003D011093630000936200F0923C01DAE046 +:1018F0005ACF84E6EECF10929901109298018A3F58 +:1019000009F0ACCFC093B601A092B20180E58093FC +:10191000B301B092B401E092B501C0933D011093C0 +:10192000630000936200F0923C01DBE03CCF109238 +:101930009901109298018A3F09F090CFC093B601A7 +:1019400082EF8093B2011092B301C093B401E09290 +:10195000B501C0933D011093630000936200F092C3 +:101960003C01DCE020CF909198018091990198177B +:1019700009F419CF86E991E036D68A3F09F413CFEE +:10198000882329F09DEF980F923008F011CF8093B3 +:10199000610080913B01811104C08091600083301F +:1019A000A1F4C093B601A092B2018092B301B092AB +:1019B000B401E092B501C0933D0110936300009320 +:1019C0006200F0923C01DDE0EECEC0933B01C0939B +:1019D0003D011093630000936200F0923C01D8E057 +:1019E000E2CE10929901109298018A3F09F036CF09 +:1019F00010923D01DFE0D7CE10923D01D0E1D3CE71 +:101A000090926100D0CED4E0CECE80914101882367 +:101A100059F1209164003091650021153105F1F4F0 +:101A2000809140011092410120916601953009F4A6 +:101A300085C0E0F4913009F450C008F441C09430FE +:101A400009F463C080934301DD2309F435CE83E0BC +:101A5000C6D6892B09F030CEC6D72ECE21503109FB +:101A60003093650020936400892FDECF923109F412 +:101A70006BC0B8F4913131F7C09366018DEE80935D +:101A8000620110926301C0936401E0926501C0930A +:101A900041011093650000936400F092400182E1DF +:101AA000D1CF943109F46BC09E3F61F6C0934101E0 +:101AB0001093650000936400F09240018FEFC2CF55 +:101AC000DD2309F4BFCFC09341011093650000935B +:101AD0006400F092400181E0B5CF213009F4B2CF2B +:101AE000209175012A3A61F4B0923F01909341012F +:101AF0001093650000936400F092400181E1A2CF51 +:101B00002C3F09F09FCF8EEF9DCF86E491E068D8FF +:101B1000C09366018FEF8093620110926301C093BE +:101B20006401E0926501C093410110936500009348 +:101B300064008EEF8093400185E084CF213009F46A +:101B400081CF2A3F01F7BFCF213009F47BCF2A3F55 +:101B5000D1F680913F01C09366018093620110929B +:101B60006301C0936401E0926501C0934101109349 +:101B7000650000936400F092400184E163CF21305E +:101B800009F460CF2A3F09F0BECF1092410185E1F0 +:101B900059CFCF93DF93E7E8F1E0128211821382ED +:101BA000158214821782168284E0808362E0D3D685 +:101BB000EFE7F1E0128211821382158214821782FC +:101BC00016828CE0808362E0C6D6E7E7F1E01282FD +:101BD00011821382158214821782168287E0808315 +:101BE00062E0B9D6C6E4D1E08BEE90E099838883B9 +:101BF0001A821B821C8A1D8A1E8A1F8A188E198EC1 +:101C00001A8E1B8E1E8E1F8E18A2CE01F8D61E8E27 +:101C10001F8E1B821A8287EF90E09983888319A216 +:101C20001AA21BA21CA21DA21EA288E0E6E6F0E0FA +:101C3000ADE6B1E001900D928A95E1F71FA6E6E9C5 +:101C4000F1E08FED90E09183808312821382148AF9 +:101C5000158A168A178A108E118E128E138E168E82 +:101C6000178E10A2DF91CF9139C8EE0FFF1F05909C +:0A1C7000F491E02D0994F894FFCFE1 +:101C7A0004FCFF03FF001112145911141F273E0020 +:101C8A0000407E0000000000000000003B00000051 +:101C9A00000000003F0000000000000041000000BA +:101CAA00000000000000000000000000000000002A +:101CBA00000000000000005F0000000000000000BB +:101CCA00000000000000006C00000000000000009E +:101CDA0000000000000051004F500000004B4C541F +:101CEA000059530000000056007C55000000005EB9 +:101CFA0006F3029D00DA0200000000FF04F3029DD1 +:101D0A0000DA02000000000F05F302EA027C01007B +:00000001FF \ No newline at end of file diff --git a/src/cx16-display-text.h b/src/cx16-display-text.h index e77a9b0..7026fae 100644 --- a/src/cx16-display-text.h +++ b/src/cx16-display-text.h @@ -60,17 +60,28 @@ const char* display_no_valid_smc_bootloader_text[9] = { "a CX16 community friend containing a valid bootloader!" }; -const char display_smc_rom_issue_count = 7; -const char* display_smc_rom_issue__text[7] = { +const char display_smc_rom_issue_count = 8; +const char* display_smc_rom_issue_text[8] = { "There is an issue with the CX16 SMC or ROM flash readiness.", "", "Both the SMC and the main ROM must be updated together,", "to avoid possible conflicts of firmware, bricking your CX16.", "", "Therefore, ensure you have the correct SMC.BIN and ROM.BIN", - "files placed on your SDcard." + "files placed on your SDcard. Also ensure that the", + "J1 jumper pins on the CX16 board are closed." }; +const char display_smc_unsupported_rom_count = 7; +const char* display_smc_unsupported_rom_text[7] = { + "There is an issue with the CX16 SMC or ROM flash versions.", + "", + "Both the SMC and the main ROM must be updated together,", + "to avoid possible conflicts of firmware, bricking your CX16.", + "", + "The SMC.BIN does not support the current ROM.BIN file", + "placed on your SDcard. Upgrade the CX16 upon your own risk!" +}; const char display_debriefing_count_smc = 12; diff --git a/src/cx16-display.c b/src/cx16-display.c index 061cf54..66776f9 100644 --- a/src/cx16-display.c +++ b/src/cx16-display.c @@ -496,7 +496,7 @@ void display_info_smc(unsigned char info_status, unsigned char* info_text) { status_smc = info_status; display_smc_led(status_color[info_status]); gotoxy(INFO_X, INFO_Y); - printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_string); + printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_text); if(info_text) { printf("%-25s", info_text); } diff --git a/src/cx16-smc.c b/src/cx16-smc.c index 658ec88..900bc60 100644 --- a/src/cx16-smc.c +++ b/src/cx16-smc.c @@ -24,7 +24,18 @@ // Globals (to save zeropage and code overhead with parameter passing.) __mem unsigned int smc_bootloader = 0; __mem unsigned int smc_file_size = 0; -__mem unsigned char smc_version_string[16]; + +__mem unsigned char smc_rom_releases[32]; + +__mem unsigned char smc_release; +__mem unsigned char smc_major; +__mem unsigned char smc_minor; + +__mem unsigned char smc_file_release; +__mem unsigned char smc_file_major; +__mem unsigned char smc_file_minor; + +__mem unsigned char smc_version_text[16]; @@ -67,7 +78,13 @@ unsigned long smc_get_version_text(unsigned char* version_string, unsigned char return MAKELONG(MAKEWORD(minor, major), MAKEWORD(0, release)); } - +unsigned char smc_supported_rom(unsigned char rom_release) { + for(unsigned char i=0; i<32; i++) { + if(smc_rom_releases[i] == rom_release) + return 1; + } + return 0; +} /** * @brief Shut down the CX16 through an SMC reboot. @@ -138,27 +155,34 @@ unsigned int smc_read(unsigned char display_progress) { FILE *fp = fopen("SMC.BIN", "r"); if (fp) { - // We read block_size bytes at a time, and each block_size bytes we plot a dot. - // Every r bytes we move to the next line. - while (smc_file_read = fgets(ram_ptr, SMC_PROGRESS_CELL, fp)) { + // Read the ROM releases in the SMC.BIN header first. + smc_file_read = fgets(smc_rom_releases, 32, fp); - sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr); - display_action_text(info_text); + // Has the header been read, all ok, otherwise the file size is wrong! + if(smc_file_read) { - if (progress_row_bytes == SMC_PROGRESS_ROW) { - gotoxy(x, ++y); - progress_row_bytes = 0; - } + // We read block_size bytes at a time, and each block_size bytes we plot a dot. + // Every r bytes we move to the next line. + while (smc_file_read = fgets(ram_ptr, SMC_PROGRESS_CELL, fp)) { - if(display_progress) - cputc('.'); + sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr); + display_action_text(info_text); - ram_ptr += smc_file_read; - smc_file_size += smc_file_read; - progress_row_bytes += smc_file_read; - } + if (progress_row_bytes == SMC_PROGRESS_ROW) { + gotoxy(x, ++y); + progress_row_bytes = 0; + } - fclose(fp); + if(display_progress) + cputc('.'); + + ram_ptr += smc_file_read; + smc_file_size += smc_file_read; + progress_row_bytes += smc_file_read; + } + + fclose(fp); + } } // We return the amount of bytes read. @@ -277,7 +301,7 @@ unsigned int smc_flash(unsigned int smc_bytes_total) { if(smc_attempts_flashed >= 10) { sprintf(info_text, "There were too many attempts trying to flash the SMC at location %04x", smc_bytes_flashed); display_action_text(info_text); - return 0; + return 0xFFFFFFFF; } } diff --git a/src/cx16-smc.h b/src/cx16-smc.h index 88e49e9..caf7c68 100644 --- a/src/cx16-smc.h +++ b/src/cx16-smc.h @@ -29,9 +29,20 @@ #define FLASH_I2C_SMC_DEVICE 0x42 extern unsigned int smc_bootloader; -extern unsigned char smc_version_string[16]; +extern unsigned char smc_version_text[16]; extern unsigned int smc_file_size; +extern unsigned char smc_rom_releases[32]; + +extern unsigned char smc_release; +extern unsigned char smc_major; +extern unsigned char smc_minor; + +extern unsigned char smc_file_release; +extern unsigned char smc_file_major; +extern unsigned char smc_file_minor; + + unsigned int smc_detect(); unsigned long smc_get_version_text(unsigned char* version_string, unsigned char release, unsigned char major, unsigned char minor); void smc_reset(); diff --git a/src/cx16-status.c b/src/cx16-status.c index 5ae3f01..eb60b4b 100644 --- a/src/cx16-status.c +++ b/src/cx16-status.c @@ -24,7 +24,7 @@ __mem unsigned char status_rom[8] = {0}; * @param status The status to be checked. * @return unsigned char true if the status is equal. */ -inline unsigned char check_status_smc(unsigned char status) { +unsigned char check_status_smc(unsigned char status) { return (unsigned char)(status_smc == status); } @@ -34,7 +34,7 @@ inline unsigned char check_status_smc(unsigned char status) { * @param status The status to be checked. * @return unsigned char true if the status is equal. */ -inline unsigned char check_status_vera(unsigned char status) { +unsigned char check_status_vera(unsigned char status) { return (unsigned char)(status_vera == status); } @@ -45,7 +45,7 @@ inline unsigned char check_status_vera(unsigned char status) { * @param status The status to be checked. * @return unsigned char true if the status is equal. */ -inline unsigned char check_status_rom(unsigned char rom_chip, unsigned char status) { +unsigned char check_status_rom(unsigned char rom_chip, unsigned char status) { return (unsigned char)(status_rom[rom_chip] == status); } @@ -65,13 +65,13 @@ inline unsigned char check_status_cx16_rom(unsigned char status) { * @param status The status to be checked. * @return unsigned char true if one chip is equal to the status. */ -inline unsigned char check_status_card_roms(unsigned char status) { +unsigned char check_status_card_roms(unsigned char status) { for(unsigned char rom_chip = 1; rom_chip < 8; rom_chip++) { if(check_status_rom(rom_chip, status)) { - return status; + return 1; } } - return STATUS_NONE; + return 0; } /** @@ -80,13 +80,13 @@ inline unsigned char check_status_card_roms(unsigned char status) { * @param status The status to be checked. * @return unsigned char true if one chip is equal to the status. */ -inline unsigned char check_status_roms(unsigned char status) { +unsigned char check_status_roms(unsigned char status) { for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) { if(check_status_rom(rom_chip, status)) { - return status; + return 1; } } - return STATUS_NONE; + return 0; } /** @@ -95,7 +95,7 @@ inline unsigned char check_status_roms(unsigned char status) { * @param status The status to be checked. * @return unsigned char true if all chips are equal to the status. */ -inline unsigned char check_status_roms_all(unsigned char status) { +unsigned char check_status_roms_all(unsigned char status) { for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) { if(check_status_rom(rom_chip, status) != status) { return 0; diff --git a/src/cx16-update.c b/src/cx16-update.c index 718b88c..69061df 100644 --- a/src/cx16-update.c +++ b/src/cx16-update.c @@ -74,25 +74,6 @@ void main() { display_info_rom(rom_chip, STATUS_NONE, NULL); } -#ifdef __INTRO - - bank_set_brom(4); - CLI(); - - display_progress_text(display_into_briefing_text, display_intro_briefing_count); - util_wait_space(); - - display_progress_text(display_into_colors_text, display_intro_colors_count); - for(unsigned char intro_status=0; intro_status<11; intro_status++) { - display_info_led(PROGRESS_X + 3, PROGRESS_Y + 3 + intro_status, status_color[intro_status], BLUE); - } - util_wait_space(); - display_progress_clear(); - - SEI(); - bank_set_brom(0); - -#endif #ifdef __SMC_CHIP_PROCESS @@ -100,26 +81,30 @@ void main() { // Detect the SMC bootloader and turn the SMC chip led WHITE if there is a bootloader present. // Otherwise, stop flashing and exit after explaining next steps. smc_bootloader = smc_detect(); - strcpy(smc_version_string, "0.0.0"); + strcpy(smc_version_text, "0.0.0"); display_chip_smc(); if(smc_bootloader == 0x0100) { + // SD-1 | No Bootloader | Display that there is no bootloader and set SMC to Issue. | Issue display_info_smc(STATUS_ISSUE, "No Bootloader!"); // If the CX16 board does not have a bootloader, display info how to flash bootloader. display_progress_text(display_no_valid_smc_bootloader_text, display_no_valid_smc_bootloader_count); } else { if(smc_bootloader == 0x0200) { + // SD-2 | SMC chip not detected | Display that the SMC chip is not detected and set SMC to Error. | Error display_info_smc(STATUS_ERROR, "SMC Unreachable!"); // This is an error with the CX16 board. J5 jumpers doesn't matter when flashing the CX16 from this utility. } else { if(smc_bootloader > 0x2) { + // SD-3 | Bootloader version not supported | Display that the current bootloader is not supported and set SMC to Issue. | Issue sprintf(info_text, "Bootloader v%02x invalid! !", smc_bootloader); display_info_smc(STATUS_ISSUE, info_text); // Bootloader is not supported by this utility, but is not error. display_progress_text(display_no_valid_smc_bootloader_text, display_no_valid_smc_bootloader_count); } else { - unsigned int release = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_VERSION); - unsigned int major = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_MAJOR); - unsigned int minor = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_MINOR); - smc_get_version_text(smc_version_string, release, major, minor); + // SD-4 | SMC chip was detected and bootloader ok | Display SMC chip version and bootloader version and set SMC to Check. | Check + smc_release = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_VERSION); + smc_major = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_MAJOR); + smc_minor = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_MINOR); + smc_get_version_text(smc_version_text, smc_release, smc_major, smc_minor); sprintf(info_text, "BL:v%u", smc_bootloader); // All ok, display bootloader version. display_info_smc(STATUS_DETECTED, info_text); } @@ -140,19 +125,43 @@ void main() { for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) { if(rom_device_ids[rom_chip] != UNKNOWN) { + // RD-1 | Known ROM chip device ID | Display ROM chip firmware release number and github commit ID if in hexadecimal format and set to Check. | None // Fill the version data ... + bank_set_brom(0); rom_get_github_commit_id(&rom_github[rom_chip*8], (char*)0xC000); rom_release[rom_chip] = rom_get_release(*((char*)0xFF80)); rom_prefix[rom_chip] = rom_get_prefix(*((char*)0xFF80)); rom_get_version_text(&rom_release_text[rom_chip*13], rom_prefix[rom_chip], rom_release[rom_chip], &rom_github[rom_chip*8]); display_info_rom(rom_chip, STATUS_DETECTED, ""); // Set the info for the ROMs to Detected. } else { + // RD-2 | Unknown ROM chip device ID | Don't do anything and set to None. | None // display_info_rom(rom_chip, STATUS_NONE, ""); // Set the info for the ROMs to None. } } #endif +#ifdef __INTRO + + bank_set_brom(4); + CLI(); + + display_progress_text(display_into_briefing_text, display_intro_briefing_count); + util_wait_space(); + + display_progress_text(display_into_colors_text, display_intro_colors_count); + for(unsigned char intro_status=0; intro_status<11; intro_status++) { + display_info_led(PROGRESS_X + 3, PROGRESS_Y + 3 + intro_status, status_color[intro_status], BLUE); + } + util_wait_space(); + display_progress_clear(); + + SEI(); + bank_set_brom(0); + +#endif + + #ifdef __SMC_CHIP_PROCESS #ifdef __SMC_CHIP_CHECK @@ -163,23 +172,24 @@ void main() { // Check the SMC.BIN file size! smc_file_size = smc_read(0); - // In case no file was found, set the status to error and skip to the next, else, mention the amount of bytes read. if (!smc_file_size) { + // SF-1 | no SMC.BIN | Ask user to place an SMC.BIN file onto the SDcard and don't flash. | Issue + // SF-2 | size SMC.BIN is 0 | Ask user to place an SMC.BIN file onto the SDcard and don't flash. | Issue display_info_smc(STATUS_SKIP, "No SMC.BIN!"); // Skip if there is no SMC.BIN file. } else { - // If the smc.bin file size is larger than 0x1E00 then there is an issue! if(smc_file_size > 0x1E00) { + // SF-3 | size SMC.BIN is > 0x1E00 | Display SMC.BIN file size issue and don't flash. Ask the user to place a correct SMC.BIN file onto the SDcard. | Issue display_info_smc(STATUS_ISSUE, "SMC.BIN too large!"); // Stop with SMC issue, and reset the CX16. } else { - // All ok, display the SMC.BIN file version and SMC on-board bootloader. + // SF-4 | SMC.BIN and all ok | Display the SMC.BIN file version and set SMC to Flash. | Flash // Fill the version data ... - unsigned char file_smc_release = rom_get_release(*((char*)0xA030)); - unsigned char file_smc_major = rom_get_prefix(*((char*)0xA031)); - unsigned char file_smc_minor = rom_get_prefix(*((char*)0xA032)); + smc_file_release = rom_get_release(*((char*)0xA030)); + smc_file_major = rom_get_prefix(*((char*)0xA031)); + smc_file_minor = rom_get_prefix(*((char*)0xA032)); - char file_smc_version_text[13]; - smc_get_version_text(file_smc_version_text, file_smc_release, file_smc_major, file_smc_minor); - sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, file_smc_version_text); // All ok, display bootloader version. + char smc_file_version_text[13]; + smc_get_version_text(smc_file_version_text, smc_file_release, smc_file_major, smc_file_minor); + sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, smc_file_version_text); // All ok, display bootloader version. display_info_smc(STATUS_FLASH, NULL); // All ok, SMC can be updated. } @@ -191,6 +201,7 @@ void main() { #endif #endif + #ifdef __ROM_CHIP_PROCESS #ifdef __ROM_CHIP_CHECK @@ -219,30 +230,34 @@ void main() { // In case no file was found, set the status to none and skip to the next, else, mention the amount of bytes read. if (!rom_bytes_read) { + // RF-1 | no ROM.BIN | Ask the user to place the ROM.BIN file onto the SDcard. Set ROM to Issue. | Issue + // RF-2 | ROM.BIN size 0 | Ask the user to place a correct ROM.BIN file onto the SDcard. Set ROM to Issue. | Issue + // TODO: RF-4 | ROM.BIN size over 0x80000 | Ask the user to place a correct ROM.BIN file onto the SDcard. Set ROM to Issue. | Issue sprintf(info_text, "No %s", file); display_info_rom(rom_chip, STATUS_SKIP, info_text); // No ROM flashing for this one. } else { - // If the rom size is not a factor or 0x4000 bytes, then there is an error. unsigned long rom_file_modulo = rom_bytes_read % 0x4000; if(rom_file_modulo) { + // RF-3 | ROM.BIN size not % 0x4000 | Ask the user to place a correct ROM.BIN file onto the SDcard. Set ROM to Issue. | Issue sprintf(info_text, "File %s size error!", file); display_info_rom(rom_chip, STATUS_ISSUE, info_text); // No flash. } else { + // RF-5 | ROM.BIN all ok | Display the ROM.BIN release version and github commit id (if any) and set ROM to Flash | Flash // We know the file size, so we indicate it in the status panel. file_sizes[rom_chip] = rom_bytes_read; // Fill the version data ... - unsigned char file_rom_github[8]; - rom_get_github_commit_id(file_rom_github, (char*)RAM_BASE); + unsigned char rom_file_github[8]; + rom_get_github_commit_id(rom_file_github, (char*)RAM_BASE); bank_push_set_bram(1); - unsigned char file_rom_release = rom_get_release(*((char*)0xBF80)); - unsigned char file_rom_prefix = rom_get_prefix(*((char*)0xBF80)); + unsigned char rom_file_release = rom_get_release(*((char*)0xBF80)); + unsigned char rom_file_prefix = rom_get_prefix(*((char*)0xBF80)); bank_pull_bram(); - char file_rom_release_text[13]; - rom_get_version_text(file_rom_release_text, file_rom_prefix, file_rom_release, file_rom_github); + char rom_file_release_text[13]; + rom_get_version_text(rom_file_release_text, rom_file_prefix, rom_file_release, rom_file_github); - sprintf(info_text, "%s %s", file, file_rom_release_text); + sprintf(info_text, "%s %s", file, rom_file_release_text); display_info_rom(rom_chip, STATUS_FLASH, info_text); } } @@ -255,28 +270,55 @@ void main() { bank_set_brom(4); CLI(); - // TODO: validate the SMC firmware version on the CX16 with the SMC firmware version in the SMC.BIN. - // TODO: if equal, do not flash ... => No SMC flash necessary, but ROM flash can continue... - // TODO: if no SMC flash => Just reset the system, no SMC reset needed. - - + // VA-5 | SMC is not Flash and CX16 is Flash | Display SMC update issue and don't flash. | Issue if(!check_status_smc(STATUS_FLASH) && check_status_cx16_rom(STATUS_FLASH)) { - display_action_progress("Please check the SMC update issue!"); - display_progress_text(display_smc_rom_issue__text, display_smc_rom_issue_count); + display_action_progress("SMC update issue!"); + display_progress_text(display_smc_rom_issue_text, display_smc_rom_issue_count); display_info_cx16_rom(STATUS_SKIP, "Issue with SMC!"); display_info_smc(STATUS_ISSUE, NULL); util_wait_space(); } - if(check_status_smc(STATUS_FLASH) && !check_status_cx16_rom(STATUS_FLASH)) { - display_action_progress("Please check the main CX16 ROM update issue!"); - display_progress_text(display_smc_rom_issue__text, display_smc_rom_issue_count); + + // VA-3 | SMC.BIN and CX16 ROM not Detected | Display issue and don't flash. Ask to close the J1 jumper pins on the CX16 main board. | Issue + if(check_status_smc(STATUS_FLASH) && check_status_cx16_rom(STATUS_NONE)) { + display_action_progress("CX16 ROM update issue, ROM not detected!"); + display_progress_text(display_smc_rom_issue_text, display_smc_rom_issue_count); display_info_smc(STATUS_SKIP, "Issue with main CX16 ROM!"); - display_info_cx16_rom(STATUS_ISSUE, NULL); + display_info_cx16_rom(STATUS_ISSUE, "Are J1 jumper pins closed?"); util_wait_space(); + } else { + // VA-4 | SMC is Flash and CX16 is not Flash | Display CX16 ROM update issue and don't flash. | Issue + if(check_status_smc(STATUS_FLASH) && !check_status_cx16_rom(STATUS_FLASH)) { + display_action_progress("CX16 ROM update issue!"); + display_progress_text(display_smc_rom_issue_text, display_smc_rom_issue_count); + display_info_smc(STATUS_SKIP, "Issue with main CX16 ROM!"); + display_info_cx16_rom(STATUS_ISSUE, NULL); + util_wait_space(); + } } - if(!check_status_smc(STATUS_ISSUE) && !check_status_vera(STATUS_ISSUE) && !check_status_roms_all(STATUS_ISSUE) && - !check_status_smc(STATUS_ERROR) && !check_status_vera(STATUS_ERROR) && !check_status_roms_all(STATUS_ERROR)) { + + // VA-1 | Version of SMC and SMC.BIN equal | Display that the SMC and SMC.BIN versions are equal and no flashing is required. Set SMC to Skip. | None + if(smc_release == smc_file_release && smc_major == smc_file_major && smc_minor == smc_file_minor) { + display_action_progress("The SMC chip and SMC.BIN versions are equal, no flash required!"); + display_info_smc(STATUS_SKIP, NULL); + util_wait_space(); + } + + // VA-2 | SMC.BIN does not support ROM.BIN release | Display warning that SMC.BIN does not support the ROM.BIN release. Ask for user confirmation to continue flashing Y/N. If the users selects not to flash, set both the SMC and the ROM as an Issue and don't flash. | Issue + if(!smc_supported_rom(rom_release[0])) { + display_action_progress("The ROM.BIN isn't compatible with SMC.BIN, no flash allowed!"); + display_progress_text(display_smc_unsupported_rom_text, display_smc_unsupported_rom_count); + unsigned char ch = util_wait_key("You still want to continue with flashing? [YN]", "YN"); + if(ch == 'N') { + // Cancel flash + display_info_smc(STATUS_ISSUE, NULL); + display_info_cx16_rom(STATUS_ISSUE, NULL); + } + } + + if(!check_status_smc(STATUS_ISSUE) && !check_status_vera(STATUS_ISSUE) && !check_status_roms(STATUS_ISSUE) && + !check_status_smc(STATUS_ERROR) && !check_status_vera(STATUS_ERROR) && !check_status_roms(STATUS_ERROR)) { // If the SMC and CX16 ROM is ready to flash, or, if one of the ROMs can be flashed, ok, go ahead and flash. if(check_status_smc(STATUS_FLASH) && check_status_cx16_rom(STATUS_FLASH) || check_status_card_roms(STATUS_FLASH)) { @@ -296,14 +338,14 @@ void main() { bank_set_bram(0); SEI(); +#ifdef __SMC_CHIP_PROCESS +#ifdef __SMC_CHIP_FLASH + // Flash the SMC when it has the status! if (check_status_smc(STATUS_FLASH) && check_status_cx16_rom(STATUS_FLASH)) { display_progress_clear(); -#ifdef __SMC_CHIP_PROCESS -#ifdef __SMC_CHIP_FLASH - // Read the SMC.BIN to flash the SMC chip. smc_file_size = smc_read(1); if(smc_file_size) { @@ -311,16 +353,25 @@ void main() { display_action_text("Press both POWER/RESET buttons on the CX16 board!"); display_info_smc(STATUS_FLASHING, "Press POWER/RESET!"); unsigned long flashed_bytes = smc_flash(smc_file_size); - if(flashed_bytes) + if(flashed_bytes) { + // SF-1 | and POWER/RESET pressed display_info_smc(STATUS_FLASHED, ""); - else - display_info_smc(STATUS_ERROR, "SMC not updated!"); + } else { + if(flashed_bytes == (unsigned long)0xFFFFFFFF) { + // SF-3 | errors during flash + display_info_smc(STATUS_ERROR, "SMC has errors!"); + } else { + // SF-2 | no action on POWER/RESET press request + display_info_smc(STATUS_ISSUE, "POWER/RESET not pressed!"); + } + } } + } + #endif #endif - } #ifdef __ROM_CHIP_PROCESS #ifdef __ROM_CHIP_FLASH @@ -361,8 +412,10 @@ void main() { rom_chip, rom_bank, file_sizes[rom_chip]); if (!rom_differences) { + // RF-1 | ROM and ROM.BIN equal | Display that there are no differences between the ROM and ROM.BIN. Set ROM to Flashed. | None display_info_rom(rom_chip, STATUS_FLASHED, "No update required"); } else { + // // If there are differences, the ROM needs to be flashed. sprintf(info_text, "%05x differences!", rom_differences); display_info_rom(rom_chip, STATUS_FLASH, info_text); @@ -370,9 +423,11 @@ void main() { unsigned long rom_flash_errors = rom_flash( rom_chip, rom_bank, file_sizes[rom_chip]); if(rom_flash_errors) { + // RF-2 | Flash ROM resulting in errors sprintf(info_text, "%u flash errors!", rom_flash_errors); display_info_rom(rom_chip, STATUS_ERROR, info_text); } else { + // RF-3 | Flash ROM and all ok display_info_rom(rom_chip, STATUS_FLASHED, "OK!"); } } @@ -385,19 +440,23 @@ void main() { #endif #endif + } if(check_status_smc(STATUS_SKIP) && check_status_vera(STATUS_SKIP) && check_status_roms_all(STATUS_SKIP)) { + // DE-1 | All components skipped vera_display_set_border_color(BLACK); display_action_progress("The update has been cancelled!"); } else { if(check_status_smc(STATUS_ERROR) || check_status_vera(STATUS_ERROR) || check_status_roms(STATUS_ERROR)) { + // DE-2 | There is an error with one of the components vera_display_set_border_color(RED); display_action_progress("Update Failure! Your CX16 may be bricked!"); display_action_text("Take a foto of this screen. And shut down power ..."); while(1); } else { if(check_status_smc(STATUS_ISSUE) || check_status_vera(STATUS_ISSUE) || check_status_roms(STATUS_ISSUE)) { + // DE-3 | There is an Issue with one of the components vera_display_set_border_color(YELLOW); display_action_progress("Update issues, your CX16 is not updated!"); } else { @@ -412,9 +471,13 @@ void main() { display_action_text(info_text); } + // DE-4 | The components correctly updated, SMC bootloader 1 sprintf(info_text, "Please disconnect your CX16 from power source ..."); display_action_text(info_text); + // DE-5 | The components correctly updated, SMC bootloader 2 + // When bootloader 1, the CX16 won't shut down automatically and will hang! The user will see the above bootloader 1 action. + // When bootloader 2, the CX16 will shut down automatically. The user will never see the bootloader 1 action. smc_reset(); // This call will reboot the SMC, which will reset the CX16 if bootloader R2. } else { @@ -425,7 +488,7 @@ void main() { } { - + // DE-6 | Wait until reset for (unsigned char w=200; w>0; w--) { wait_moment(); sprintf(info_text, "(%u) Your CX16 will reset ...", w); diff --git a/target/src/cx16-update.asm b/target/src/cx16-update.asm index b117128..3230fd8 100644 --- a/target/src/cx16-update.asm +++ b/target/src/cx16-update.asm @@ -122,7 +122,8 @@ .const display_intro_briefing_count = $e .const display_intro_colors_count = $10 .const display_no_valid_smc_bootloader_count = 9 - .const display_smc_rom_issue_count = 7 + .const display_smc_rom_issue_count = 8 + .const display_smc_unsupported_rom_count = 7 .const display_debriefing_count_smc = $c .const display_debriefing_count_rom = 4 .const OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1 @@ -169,10 +170,7 @@ .label VERA_L1_MAPBASE = $9f35 .label BRAM = 0 .label BROM = 1 - /// Current position in the buffer being filled ( initially *s passed to snprintf() - /// Used to hold state while printing - .label __snprintf_buffer = $ed - .label __errno = $c9 + .label __errno = $f0 .segment Code // __start __start: { @@ -186,10 +184,10 @@ __start: { lda #4 sta.z BROM // char * __snprintf_buffer - // [3] __snprintf_buffer = (char *) 0 -- pbuz1=pbuc1 + // [3] __snprintf_buffer = (char *) 0 -- pbum1=pbuc1 lda #<0 - sta.z __snprintf_buffer - sta.z __snprintf_buffer+1 + sta __snprintf_buffer + sta __snprintf_buffer+1 // volatile unsigned char __stdio_filecount = 0 // [4] __stdio_filecount = 0 -- vbum1=vbuc1 sta __stdio_filecount @@ -212,13 +210,14 @@ __start: { /// Print a character into snprintf buffer /// Used by snprintf() /// @param c The character to print -// void snputc(__register(X) char c) +// void snputc(__zp($ea) char c) snputc: { .const OFFSET_STACK_C = 0 - // [10] snputc::c#0 = stackidx(char,snputc::OFFSET_STACK_C) -- vbuxx=_stackidxbyte_vbuc1 + .label c = $ea + // [10] snputc::c#0 = stackidx(char,snputc::OFFSET_STACK_C) -- vbuz1=_stackidxbyte_vbuc1 tsx lda STACK_BASE+OFFSET_STACK_C,x - tax + sta.z c // ++__snprintf_size; // [11] __snprintf_size = ++ __snprintf_size -- vwum1=_inc_vwum1 inc __snprintf_size @@ -250,8 +249,9 @@ snputc: { cmp __snprintf_capacity bne __b2 // [16] phi from snputc::@1 to snputc::@2 [phi:snputc::@1->snputc::@2] - // [16] phi snputc::c#2 = 0 [phi:snputc::@1->snputc::@2#0] -- vbuxx=vbuc1 - ldx #0 + // [16] phi snputc::c#2 = 0 [phi:snputc::@1->snputc::@2#0] -- vbuz1=vbuc1 + lda #0 + sta.z c // [15] phi from snputc::@1 to snputc::@3 [phi:snputc::@1->snputc::@3] // snputc::@3 // [16] phi from snputc::@3 to snputc::@2 [phi:snputc::@3->snputc::@2] @@ -259,22 +259,27 @@ snputc: { // snputc::@2 __b2: // *(__snprintf_buffer++) = c - // [17] *__snprintf_buffer = snputc::c#2 -- _deref_pbuz1=vbuxx + // [17] *__snprintf_buffer = snputc::c#2 -- _deref_pbum1=vbuz2 // Append char - txa + lda.z c + ldy __snprintf_buffer + sty.z $fe + ldy __snprintf_buffer+1 + sty.z $ff ldy #0 - sta (__snprintf_buffer),y + sta ($fe),y // *(__snprintf_buffer++) = c; - // [18] __snprintf_buffer = ++ __snprintf_buffer -- pbuz1=_inc_pbuz1 - inc.z __snprintf_buffer + // [18] __snprintf_buffer = ++ __snprintf_buffer -- pbum1=_inc_pbum1 + inc __snprintf_buffer bne !+ - inc.z __snprintf_buffer+1 + inc __snprintf_buffer+1 !: rts } // conio_x16_init /// Set initial screen values. conio_x16_init: { + .label conio_x16_init__5 = $e0 // screenlayer1() // [20] call screenlayer1 jsr screenlayer1 @@ -282,17 +287,19 @@ conio_x16_init: { // conio_x16_init::@1 // textcolor(CONIO_TEXTCOLOR_DEFAULT) // [22] call textcolor - // [700] phi from conio_x16_init::@1 to textcolor [phi:conio_x16_init::@1->textcolor] - // [700] phi textcolor::color#18 = WHITE [phi:conio_x16_init::@1->textcolor#0] -- vbuxx=vbuc1 - ldx #WHITE + // [745] phi from conio_x16_init::@1 to textcolor [phi:conio_x16_init::@1->textcolor] + // [745] phi textcolor::color#18 = WHITE [phi:conio_x16_init::@1->textcolor#0] -- vbuz1=vbuc1 + lda #WHITE + sta.z textcolor.color jsr textcolor // [23] phi from conio_x16_init::@1 to conio_x16_init::@2 [phi:conio_x16_init::@1->conio_x16_init::@2] // conio_x16_init::@2 // bgcolor(CONIO_BACKCOLOR_DEFAULT) // [24] call bgcolor - // [705] phi from conio_x16_init::@2 to bgcolor [phi:conio_x16_init::@2->bgcolor] - // [705] phi bgcolor::color#14 = BLUE [phi:conio_x16_init::@2->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [750] phi from conio_x16_init::@2 to bgcolor [phi:conio_x16_init::@2->bgcolor] + // [750] phi bgcolor::color#14 = BLUE [phi:conio_x16_init::@2->bgcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z bgcolor.color jsr bgcolor // [25] phi from conio_x16_init::@2 to conio_x16_init::@3 [phi:conio_x16_init::@2->conio_x16_init::@3] // conio_x16_init::@3 @@ -308,10 +315,11 @@ conio_x16_init: { // conio_x16_init::@5 // [30] conio_x16_init::$4 = cbm_k_plot_get::return#2 // BYTE1(cbm_k_plot_get()) - // [31] conio_x16_init::$5 = byte1 conio_x16_init::$4 -- vbuaa=_byte1_vwum1 + // [31] conio_x16_init::$5 = byte1 conio_x16_init::$4 -- vbuz1=_byte1_vwum2 lda conio_x16_init__4+1 + sta.z conio_x16_init__5 // __conio.cursor_x = BYTE1(cbm_k_plot_get()) - // [32] *((char *)&__conio) = conio_x16_init::$5 -- _deref_pbuc1=vbuaa + // [32] *((char *)&__conio) = conio_x16_init::$5 -- _deref_pbuc1=vbuz1 sta __conio // cbm_k_plot_get() // [33] call cbm_k_plot_get @@ -320,20 +328,23 @@ conio_x16_init: { // conio_x16_init::@6 // [35] conio_x16_init::$6 = cbm_k_plot_get::return#3 // BYTE0(cbm_k_plot_get()) - // [36] conio_x16_init::$7 = byte0 conio_x16_init::$6 -- vbuaa=_byte0_vwum1 + // [36] conio_x16_init::$7 = byte0 conio_x16_init::$6 -- vbum1=_byte0_vwum2 lda conio_x16_init__6 + sta conio_x16_init__7 // __conio.cursor_y = BYTE0(cbm_k_plot_get()) - // [37] *((char *)&__conio+1) = conio_x16_init::$7 -- _deref_pbuc1=vbuaa + // [37] *((char *)&__conio+1) = conio_x16_init::$7 -- _deref_pbuc1=vbum1 sta __conio+1 // gotoxy(__conio.cursor_x, __conio.cursor_y) - // [38] gotoxy::x#2 = *((char *)&__conio) -- vbuxx=_deref_pbuc1 - ldx __conio - // [39] gotoxy::y#2 = *((char *)&__conio+1) -- vbuyy=_deref_pbuc1 - tay + // [38] gotoxy::x#2 = *((char *)&__conio) -- vbuz1=_deref_pbuc1 + lda __conio + sta.z gotoxy.x + // [39] gotoxy::y#2 = *((char *)&__conio+1) -- vbuz1=_deref_pbuc1 + lda __conio+1 + sta.z gotoxy.y // [40] call gotoxy - // [718] phi from conio_x16_init::@6 to gotoxy [phi:conio_x16_init::@6->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#2 [phi:conio_x16_init::@6->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#2 [phi:conio_x16_init::@6->gotoxy#1] -- register_copy + // [763] phi from conio_x16_init::@6 to gotoxy [phi:conio_x16_init::@6->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#2 [phi:conio_x16_init::@6->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#2 [phi:conio_x16_init::@6->gotoxy#1] -- register_copy jsr gotoxy // conio_x16_init::@7 // __conio.scroll[0] = 1 @@ -350,21 +361,27 @@ conio_x16_init: { .segment Data .label conio_x16_init__4 = cbm_k_plot_get.return .label conio_x16_init__6 = cbm_k_plot_get.return + conio_x16_init__7: .byte 0 } .segment Code // cputc // Output one character at the current cursor position // Moves the cursor forward. Scrolls the entire screen if needed -// void cputc(__register(X) char c) +// void cputc(__zp($34) char c) cputc: { .const OFFSET_STACK_C = 0 - // [44] cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C) -- vbuxx=_stackidxbyte_vbuc1 + .label cputc__1 = $22 + .label cputc__2 = $b1 + .label cputc__3 = $b2 + .label c = $34 + // [44] cputc::c#0 = stackidx(char,cputc::OFFSET_STACK_C) -- vbuz1=_stackidxbyte_vbuc1 tsx lda STACK_BASE+OFFSET_STACK_C,x - tax + sta.z c // if(c=='\n') - // [45] if(cputc::c#0==' ') goto cputc::@1 -- vbuxx_eq_vbuc1_then_la1 - cpx #'\n' + // [45] if(cputc::c#0==' ') goto cputc::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #'\n' + cmp.z c beq __b1 // cputc::@2 // *VERA_CTRL &= ~VERA_ADDRSEL @@ -373,27 +390,31 @@ cputc: { and VERA_CTRL sta VERA_CTRL // BYTE0(__conio.offset) - // [47] cputc::$1 = byte0 *((unsigned int *)&__conio+$13) -- vbuaa=_byte0__deref_pwuc1 + // [47] cputc::$1 = byte0 *((unsigned int *)&__conio+$13) -- vbuz1=_byte0__deref_pwuc1 lda __conio+$13 + sta.z cputc__1 // *VERA_ADDRX_L = BYTE0(__conio.offset) - // [48] *VERA_ADDRX_L = cputc::$1 -- _deref_pbuc1=vbuaa + // [48] *VERA_ADDRX_L = cputc::$1 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_L // BYTE1(__conio.offset) - // [49] cputc::$2 = byte1 *((unsigned int *)&__conio+$13) -- vbuaa=_byte1__deref_pwuc1 + // [49] cputc::$2 = byte1 *((unsigned int *)&__conio+$13) -- vbuz1=_byte1__deref_pwuc1 lda __conio+$13+1 + sta.z cputc__2 // *VERA_ADDRX_M = BYTE1(__conio.offset) - // [50] *VERA_ADDRX_M = cputc::$2 -- _deref_pbuc1=vbuaa + // [50] *VERA_ADDRX_M = cputc::$2 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_M // __conio.mapbase_bank | VERA_INC_1 - // [51] cputc::$3 = *((char *)&__conio+5) | VERA_INC_1 -- vbuaa=_deref_pbuc1_bor_vbuc2 + // [51] cputc::$3 = *((char *)&__conio+5) | VERA_INC_1 -- vbuz1=_deref_pbuc1_bor_vbuc2 lda #VERA_INC_1 ora __conio+5 + sta.z cputc__3 // *VERA_ADDRX_H = __conio.mapbase_bank | VERA_INC_1 - // [52] *VERA_ADDRX_H = cputc::$3 -- _deref_pbuc1=vbuaa + // [52] *VERA_ADDRX_H = cputc::$3 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_H // *VERA_DATA0 = c - // [53] *VERA_DATA0 = cputc::c#0 -- _deref_pbuc1=vbuxx - stx VERA_DATA0 + // [53] *VERA_DATA0 = cputc::c#0 -- _deref_pbuc1=vbuz1 + lda.z c + sta VERA_DATA0 // *VERA_DATA0 = __conio.color // [54] *VERA_DATA0 = *((char *)&__conio+$d) -- _deref_pbuc1=_deref_pbuc2 lda __conio+$d @@ -483,26 +504,62 @@ main: { .const bank_set_brom2_bank = 4 .const bank_set_brom3_bank = 0 .const bank_set_brom4_bank = 0 - .const bank_set_brom5_bank = 4 + .const bank_set_brom5_bank = 0 + .const bank_set_brom6_bank = 4 .const bank_push_set_bram1_bank = 1 .const bank_set_bram2_bank = 0 - .const bank_set_brom6_bank = 0 - .label main__102 = $da - .label main__159 = $c2 - .label release = $b7 - .label major = $e2 - .label minor = $29 - .label file_smc_release = $e7 - .label file_smc_major = $f7 - .label rom_bytes_read = $7c - .label rom_file_modulo = $f8 - .label check_status_smc4_return = $e9 - .label check_status_vera1_return = $f1 - .label check_status_smc5_return = $f2 - .label check_status_smc6_return = $cb - .label rom_bytes_read1 = $7c - .label rom_differences = $25 - .label rom_flash_errors = $32 + .const bank_set_brom7_bank = 0 + .label main__79 = $f2 + .label main__105 = $67 + .label main__107 = $c1 + .label main__187 = $ee + .label check_status_smc1_main__0 = $37 + .label check_status_smc2_main__0 = $e8 + .label check_status_cx16_rom1_check_status_rom1_main__0 = $e7 + .label check_status_smc3_main__0 = $2f + .label check_status_smc4_main__0 = $e6 + .label check_status_roms1_check_status_rom1_main__0 = $ec + .label check_status_smc6_main__0 = $c6 + .label check_status_vera2_main__0 = $d0 + .label check_status_roms2_check_status_rom1_main__0 = $71 + .label check_status_cx16_rom4_check_status_rom1_main__0 = $6a + .label check_status_smc9_main__0 = $70 + .label check_status_cx16_rom5_check_status_rom1_main__0 = $53 + .label check_status_rom1_main__0 = $be + .label check_status_smc10_main__0 = $66 + .label check_status_smc11_main__0 = $c0 + .label check_status_vera4_main__0 = $68 + .label check_status_smc12_main__0 = $73 + .label check_status_vera5_main__0 = $e9 + .label check_status_roms4_check_status_rom1_main__0 = $b3 + .label check_status_smc13_main__0 = $df + .label check_status_smc1_return = $37 + .label check_status_smc2_return = $e8 + .label check_status_cx16_rom1_check_status_rom1_return = $e7 + .label check_status_smc3_return = $2f + .label check_status_smc4_return = $e6 + .label check_status_roms1_check_status_rom1_return = $ec + .label check_status_smc6_return = $c6 + .label check_status_vera2_return = $d0 + .label check_status_roms2_check_status_rom1_return = $71 + .label check_status_cx16_rom4_check_status_rom1_return = $6a + .label check_status_smc9_return = $70 + .label check_status_cx16_rom5_check_status_rom1_return = $53 + .label check_status_rom1_return = $be + .label check_status_smc10_return = $66 + .label rom_differences = $30 + .label check_status_smc11_return = $c0 + .label check_status_vera4_return = $68 + .label check_status_smc12_return = $73 + .label check_status_vera5_return = $e9 + .label check_status_roms4_check_status_rom1_return = $b3 + .label check_status_smc13_return = $df + .label main__317 = $f2 + .label main__318 = $f2 + .label main__319 = $f2 + .label main__321 = $67 + .label main__322 = $67 + .label main__323 = $67 // main::SEI1 // asm // asm { sei } @@ -517,8 +574,8 @@ main: { // [74] BROM = main::bank_set_brom1_bank#0 -- vbuz1=vbuc1 lda #bank_set_brom1_bank sta.z BROM - // [75] phi from main::bank_set_brom1 to main::@58 [phi:main::bank_set_brom1->main::@58] - // main::@58 + // [75] phi from main::bank_set_brom1 to main::@64 [phi:main::bank_set_brom1->main::@64] + // main::@64 // display_frame_init_64() // [76] call display_frame_init_64 // Get the current screen mode ... @@ -538,237 +595,164 @@ main: { } } */ - // [739] phi from main::@58 to display_frame_init_64 [phi:main::@58->display_frame_init_64] + // [784] phi from main::@64 to display_frame_init_64 [phi:main::@64->display_frame_init_64] jsr display_frame_init_64 - // [77] phi from main::@58 to main::@82 [phi:main::@58->main::@82] - // main::@82 + // [77] phi from main::@64 to main::@89 [phi:main::@64->main::@89] + // main::@89 // display_frame_draw() // [78] call display_frame_draw - // [759] phi from main::@82 to display_frame_draw [phi:main::@82->display_frame_draw] + // [804] phi from main::@89 to display_frame_draw [phi:main::@89->display_frame_draw] jsr display_frame_draw - // [79] phi from main::@82 to main::@83 [phi:main::@82->main::@83] - // main::@83 + // [79] phi from main::@89 to main::@90 [phi:main::@89->main::@90] + // main::@90 // display_frame_title("Commander X16 Flash Utility!") // [80] call display_frame_title - // [800] phi from main::@83 to display_frame_title [phi:main::@83->display_frame_title] + // [845] phi from main::@90 to display_frame_title [phi:main::@90->display_frame_title] jsr display_frame_title - // [81] phi from main::@83 to main::display_info_title1 [phi:main::@83->main::display_info_title1] + // [81] phi from main::@90 to main::display_info_title1 [phi:main::@90->main::display_info_title1] // main::display_info_title1 // cputsxy(INFO_X-2, INFO_Y-2, "# Chip Status Type Curr. Release Update Info") // [82] call cputsxy - // [805] phi from main::display_info_title1 to cputsxy [phi:main::display_info_title1->cputsxy] - // [805] phi cputsxy::s#4 = main::s [phi:main::display_info_title1->cputsxy#0] -- pbuz1=pbuc1 + // [850] phi from main::display_info_title1 to cputsxy [phi:main::display_info_title1->cputsxy] + // [850] phi cputsxy::s#4 = main::s [phi:main::display_info_title1->cputsxy#0] -- pbuz1=pbuc1 lda #s sta.z cputsxy.s+1 - // [805] phi cputsxy::y#4 = $11-2 [phi:main::display_info_title1->cputsxy#1] -- vbuyy=vbuc1 - ldy #$11-2 - // [805] phi cputsxy::x#4 = 4-2 [phi:main::display_info_title1->cputsxy#2] -- vbuxx=vbuc1 - ldx #4-2 + // [850] phi cputsxy::y#4 = $11-2 [phi:main::display_info_title1->cputsxy#1] -- vbuz1=vbuc1 + lda #$11-2 + sta.z cputsxy.y + // [850] phi cputsxy::x#4 = 4-2 [phi:main::display_info_title1->cputsxy#2] -- vbuz1=vbuc1 + lda #4-2 + sta.z cputsxy.x jsr cputsxy - // [83] phi from main::display_info_title1 to main::@84 [phi:main::display_info_title1->main::@84] - // main::@84 + // [83] phi from main::display_info_title1 to main::@91 [phi:main::display_info_title1->main::@91] + // main::@91 // cputsxy(INFO_X-2, INFO_Y-1, "- ---- --------- ------ ------------- --------------------") // [84] call cputsxy - // [805] phi from main::@84 to cputsxy [phi:main::@84->cputsxy] - // [805] phi cputsxy::s#4 = main::s1 [phi:main::@84->cputsxy#0] -- pbuz1=pbuc1 + // [850] phi from main::@91 to cputsxy [phi:main::@91->cputsxy] + // [850] phi cputsxy::s#4 = main::s1 [phi:main::@91->cputsxy#0] -- pbuz1=pbuc1 lda #s1 sta.z cputsxy.s+1 - // [805] phi cputsxy::y#4 = $11-1 [phi:main::@84->cputsxy#1] -- vbuyy=vbuc1 - ldy #$11-1 - // [805] phi cputsxy::x#4 = 4-2 [phi:main::@84->cputsxy#2] -- vbuxx=vbuc1 - ldx #4-2 + // [850] phi cputsxy::y#4 = $11-1 [phi:main::@91->cputsxy#1] -- vbuz1=vbuc1 + lda #$11-1 + sta.z cputsxy.y + // [850] phi cputsxy::x#4 = 4-2 [phi:main::@91->cputsxy#2] -- vbuz1=vbuc1 + lda #4-2 + sta.z cputsxy.x jsr cputsxy - // [85] phi from main::@84 to main::@59 [phi:main::@84->main::@59] - // main::@59 + // [85] phi from main::@91 to main::@65 [phi:main::@91->main::@65] + // main::@65 // display_action_progress("Introduction ...") // [86] call display_action_progress - // [812] phi from main::@59 to display_action_progress [phi:main::@59->display_action_progress] - // [812] phi display_action_progress::info_text#15 = main::info_text [phi:main::@59->display_action_progress#0] -- pbuz1=pbuc1 + // [857] phi from main::@65 to display_action_progress [phi:main::@65->display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text [phi:main::@65->display_action_progress#0] -- pbuz1=pbuc1 lda #info_text sta.z display_action_progress.info_text+1 jsr display_action_progress - // [87] phi from main::@59 to main::@85 [phi:main::@59->main::@85] - // main::@85 + // [87] phi from main::@65 to main::@92 [phi:main::@65->main::@92] + // main::@92 // display_progress_clear() // [88] call display_progress_clear - // [826] phi from main::@85 to display_progress_clear [phi:main::@85->display_progress_clear] + // [871] phi from main::@92 to display_progress_clear [phi:main::@92->display_progress_clear] jsr display_progress_clear - // [89] phi from main::@85 to main::@86 [phi:main::@85->main::@86] - // main::@86 + // [89] phi from main::@92 to main::@93 [phi:main::@92->main::@93] + // main::@93 // display_chip_smc() // [90] call display_chip_smc - // [841] phi from main::@86 to display_chip_smc [phi:main::@86->display_chip_smc] + // [886] phi from main::@93 to display_chip_smc [phi:main::@93->display_chip_smc] jsr display_chip_smc - // [91] phi from main::@86 to main::@87 [phi:main::@86->main::@87] - // main::@87 + // [91] phi from main::@93 to main::@94 [phi:main::@93->main::@94] + // main::@94 // display_chip_vera() // [92] call display_chip_vera - // [846] phi from main::@87 to display_chip_vera [phi:main::@87->display_chip_vera] + // [891] phi from main::@94 to display_chip_vera [phi:main::@94->display_chip_vera] jsr display_chip_vera - // [93] phi from main::@87 to main::@88 [phi:main::@87->main::@88] - // main::@88 + // [93] phi from main::@94 to main::@95 [phi:main::@94->main::@95] + // main::@95 // display_chip_rom() // [94] call display_chip_rom - // [851] phi from main::@88 to display_chip_rom [phi:main::@88->display_chip_rom] + // [896] phi from main::@95 to display_chip_rom [phi:main::@95->display_chip_rom] jsr display_chip_rom - // [95] phi from main::@88 to main::@89 [phi:main::@88->main::@89] - // main::@89 + // [95] phi from main::@95 to main::@96 [phi:main::@95->main::@96] + // main::@96 // display_info_smc(STATUS_COLOR_NONE, NULL) // [96] call display_info_smc - // [870] phi from main::@89 to display_info_smc [phi:main::@89->display_info_smc] - // [870] phi display_info_smc::info_text#14 = 0 [phi:main::@89->display_info_smc#0] -- pbuz1=vbuc1 + // [915] phi from main::@96 to display_info_smc [phi:main::@96->display_info_smc] + // [915] phi display_info_smc::info_text#17 = 0 [phi:main::@96->display_info_smc#0] -- pbuz1=vbuc1 lda #<0 sta.z display_info_smc.info_text sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = BLACK [phi:main::@89->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = BLACK [phi:main::@96->display_info_smc#1] -- vbuz1=vbuc1 lda #BLACK sta.z display_info_smc.info_status jsr display_info_smc - // [97] phi from main::@89 to main::@90 [phi:main::@89->main::@90] - // main::@90 + // [97] phi from main::@96 to main::@97 [phi:main::@96->main::@97] + // main::@97 // display_info_vera(STATUS_NONE, NULL) // [98] call display_info_vera - // [900] phi from main::@90 to display_info_vera [phi:main::@90->display_info_vera] - // [900] phi display_info_vera::info_text#10 = 0 [phi:main::@90->display_info_vera#0] -- pbuz1=vbuc1 + // [945] phi from main::@97 to display_info_vera [phi:main::@97->display_info_vera] + // [945] phi display_info_vera::info_text#10 = 0 [phi:main::@97->display_info_vera#0] -- pbuz1=vbuc1 lda #<0 sta.z display_info_vera.info_text sta.z display_info_vera.info_text+1 - // [900] phi display_info_vera::info_status#3 = STATUS_NONE [phi:main::@90->display_info_vera#1] -- vbuz1=vbuc1 + // [945] phi display_info_vera::info_status#3 = STATUS_NONE [phi:main::@97->display_info_vera#1] -- vbuz1=vbuc1 lda #STATUS_NONE sta.z display_info_vera.info_status jsr display_info_vera - // [99] phi from main::@90 to main::@7 [phi:main::@90->main::@7] - // [99] phi main::rom_chip#2 = 0 [phi:main::@90->main::@7#0] -- vbum1=vbuc1 + // [99] phi from main::@97 to main::@13 [phi:main::@97->main::@13] + // [99] phi main::rom_chip#2 = 0 [phi:main::@97->main::@13#0] -- vbum1=vbuc1 lda #0 sta rom_chip - // main::@7 - __b7: + // main::@13 + __b13: // for(unsigned char rom_chip=0; rom_chip<8; rom_chip++) - // [100] if(main::rom_chip#2<8) goto main::@8 -- vbum1_lt_vbuc1_then_la1 + // [100] if(main::rom_chip#2<8) goto main::@14 -- vbum1_lt_vbuc1_then_la1 lda rom_chip cmp #8 - bcs !__b8+ - jmp __b8 - !__b8: - // main::bank_set_brom2 - // BROM = bank - // [101] BROM = main::bank_set_brom2_bank#0 -- vbuz1=vbuc1 - lda #bank_set_brom2_bank - sta.z BROM - // main::CLI1 - // asm - // asm { cli } - cli - // [103] phi from main::CLI1 to main::@60 [phi:main::CLI1->main::@60] - // main::@60 - // display_progress_text(display_into_briefing_text, display_intro_briefing_count) - // [104] call display_progress_text - // [926] phi from main::@60 to display_progress_text [phi:main::@60->display_progress_text] - // [926] phi display_progress_text::text#10 = display_into_briefing_text [phi:main::@60->display_progress_text#0] -- qbuz1=qbuc1 - lda #display_into_briefing_text - sta.z display_progress_text.text+1 - // [926] phi display_progress_text::lines#11 = display_intro_briefing_count [phi:main::@60->display_progress_text#1] -- vbuz1=vbuc1 - lda #display_intro_briefing_count - sta.z display_progress_text.lines - jsr display_progress_text - // [105] phi from main::@60 to main::@93 [phi:main::@60->main::@93] - // main::@93 - // util_wait_space() - // [106] call util_wait_space - // [936] phi from main::@93 to util_wait_space [phi:main::@93->util_wait_space] - jsr util_wait_space - // [107] phi from main::@93 to main::@94 [phi:main::@93->main::@94] - // main::@94 - // display_progress_text(display_into_colors_text, display_intro_colors_count) - // [108] call display_progress_text - // [926] phi from main::@94 to display_progress_text [phi:main::@94->display_progress_text] - // [926] phi display_progress_text::text#10 = display_into_colors_text [phi:main::@94->display_progress_text#0] -- qbuz1=qbuc1 - lda #display_into_colors_text - sta.z display_progress_text.text+1 - // [926] phi display_progress_text::lines#11 = display_intro_colors_count [phi:main::@94->display_progress_text#1] -- vbuz1=vbuc1 - lda #display_intro_colors_count - sta.z display_progress_text.lines - jsr display_progress_text - // [109] phi from main::@94 to main::@9 [phi:main::@94->main::@9] - // [109] phi main::intro_status#2 = 0 [phi:main::@94->main::@9#0] -- vbum1=vbuc1 - lda #0 - sta intro_status - // main::@9 - __b9: - // for(unsigned char intro_status=0; intro_status<11; intro_status++) - // [110] if(main::intro_status#2<$b) goto main::@10 -- vbum1_lt_vbuc1_then_la1 - lda intro_status - cmp #$b - bcs !__b10+ - jmp __b10 - !__b10: - // [111] phi from main::@9 to main::@11 [phi:main::@9->main::@11] - // main::@11 - // util_wait_space() - // [112] call util_wait_space - // [936] phi from main::@11 to util_wait_space [phi:main::@11->util_wait_space] - jsr util_wait_space - // [113] phi from main::@11 to main::@96 [phi:main::@11->main::@96] - // main::@96 - // display_progress_clear() - // [114] call display_progress_clear - // [826] phi from main::@96 to display_progress_clear [phi:main::@96->display_progress_clear] - jsr display_progress_clear - // main::SEI2 - // asm - // asm { sei } - sei - // main::bank_set_brom3 - // BROM = bank - // [116] BROM = main::bank_set_brom3_bank#0 -- vbuz1=vbuc1 - lda #bank_set_brom3_bank - sta.z BROM - // [117] phi from main::bank_set_brom3 to main::@61 [phi:main::bank_set_brom3->main::@61] - // main::@61 + bcs !__b14+ + jmp __b14 + !__b14: + // [101] phi from main::@13 to main::@15 [phi:main::@13->main::@15] + // main::@15 // smc_detect() - // [118] call smc_detect + // [102] call smc_detect jsr smc_detect - // [119] smc_detect::return#2 = smc_detect::return#0 - // main::@97 + // [103] smc_detect::return#2 = smc_detect::return#0 + // main::@100 // smc_bootloader = smc_detect() - // [120] smc_bootloader#0 = smc_detect::return#2 -- vwum1=vwuz2 + // [104] smc_bootloader#0 = smc_detect::return#2 -- vwum1=vwuz2 lda.z smc_detect.return sta smc_bootloader lda.z smc_detect.return+1 sta smc_bootloader+1 - // strcpy(smc_version_string, "0.0.0") - // [121] call strcpy - // [950] phi from main::@97 to strcpy [phi:main::@97->strcpy] - // [950] phi strcpy::dst#0 = smc_version_string [phi:main::@97->strcpy#0] -- pbuz1=pbuc1 - lda #strcpy] + // [982] phi strcpy::dst#0 = smc_version_text [phi:main::@100->strcpy#0] -- pbuz1=pbuc1 + lda #smc_version_string + lda #>smc_version_text sta.z strcpy.dst+1 - // [950] phi strcpy::src#0 = main::source1 [phi:main::@97->strcpy#1] -- pbuz1=pbuc1 + // [982] phi strcpy::src#0 = main::source1 [phi:main::@100->strcpy#1] -- pbuz1=pbuc1 lda #source1 sta.z strcpy.src+1 jsr strcpy - // [122] phi from main::@97 to main::@98 [phi:main::@97->main::@98] - // main::@98 + // [106] phi from main::@100 to main::@101 [phi:main::@100->main::@101] + // main::@101 // display_chip_smc() - // [123] call display_chip_smc - // [841] phi from main::@98 to display_chip_smc [phi:main::@98->display_chip_smc] + // [107] call display_chip_smc + // [886] phi from main::@101 to display_chip_smc [phi:main::@101->display_chip_smc] jsr display_chip_smc - // main::@99 + // main::@102 // if(smc_bootloader == 0x0100) - // [124] if(smc_bootloader#0==$100) goto main::@1 -- vwum1_eq_vwuc1_then_la1 + // [108] if(smc_bootloader#0==$100) goto main::@1 -- vwum1_eq_vwuc1_then_la1 lda smc_bootloader cmp #<$100 bne !+ @@ -778,417 +762,514 @@ main: { jmp __b1 !__b1: !: - // main::@12 + // main::@16 // if(smc_bootloader == 0x0200) - // [125] if(smc_bootloader#0==$200) goto main::@15 -- vwum1_eq_vwuc1_then_la1 + // [109] if(smc_bootloader#0==$200) goto main::@19 -- vwum1_eq_vwuc1_then_la1 lda smc_bootloader cmp #<$200 bne !+ lda smc_bootloader+1 cmp #>$200 - bne !__b15+ - jmp __b15 - !__b15: + bne !__b19+ + jmp __b19 + !__b19: !: - // main::@13 + // main::@17 // if(smc_bootloader > 0x2) - // [126] if(smc_bootloader#0>=2+1) goto main::@16 -- vwum1_ge_vbuc1_then_la1 + // [110] if(smc_bootloader#0>=2+1) goto main::@20 -- vwum1_ge_vbuc1_then_la1 lda smc_bootloader+1 - beq !__b16+ - jmp __b16 - !__b16: + beq !__b20+ + jmp __b20 + !__b20: lda smc_bootloader cmp #2+1 - bcc !__b16+ - jmp __b16 - !__b16: + bcc !__b20+ + jmp __b20 + !__b20: !: - // main::@14 - // unsigned int release = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_VERSION) - // [127] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 + // main::@18 + // cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_VERSION) + // [111] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 lda #$42 sta cx16_k_i2c_read_byte.device - // [128] cx16_k_i2c_read_byte::offset = $30 -- vbum1=vbuc1 + // [112] cx16_k_i2c_read_byte::offset = $30 -- vbum1=vbuc1 lda #$30 sta cx16_k_i2c_read_byte.offset - // [129] call cx16_k_i2c_read_byte + // [113] call cx16_k_i2c_read_byte jsr cx16_k_i2c_read_byte - // [130] cx16_k_i2c_read_byte::return#14 = cx16_k_i2c_read_byte::return#1 -- vwuz1=vwuz2 + // [114] cx16_k_i2c_read_byte::return#14 = cx16_k_i2c_read_byte::return#1 + // main::@109 + // smc_release = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_VERSION) + // [115] smc_release#0 = cx16_k_i2c_read_byte::return#14 -- vbum1=vwuz2 lda.z cx16_k_i2c_read_byte.return - sta.z cx16_k_i2c_read_byte.return_1 - lda.z cx16_k_i2c_read_byte.return+1 - sta.z cx16_k_i2c_read_byte.return_1+1 - // main::@106 - // [131] main::release#0 = cx16_k_i2c_read_byte::return#14 - // unsigned int major = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_MAJOR) - // [132] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 + sta smc_release + // cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_MAJOR) + // [116] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 lda #$42 sta cx16_k_i2c_read_byte.device - // [133] cx16_k_i2c_read_byte::offset = $31 -- vbum1=vbuc1 + // [117] cx16_k_i2c_read_byte::offset = $31 -- vbum1=vbuc1 lda #$31 sta cx16_k_i2c_read_byte.offset - // [134] call cx16_k_i2c_read_byte + // [118] call cx16_k_i2c_read_byte jsr cx16_k_i2c_read_byte - // [135] cx16_k_i2c_read_byte::return#15 = cx16_k_i2c_read_byte::return#1 -- vwuz1=vwuz2 + // [119] cx16_k_i2c_read_byte::return#15 = cx16_k_i2c_read_byte::return#1 + // main::@110 + // smc_major = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_MAJOR) + // [120] smc_major#0 = cx16_k_i2c_read_byte::return#15 -- vbum1=vwuz2 lda.z cx16_k_i2c_read_byte.return - sta.z cx16_k_i2c_read_byte.return_2 - lda.z cx16_k_i2c_read_byte.return+1 - sta.z cx16_k_i2c_read_byte.return_2+1 - // main::@107 - // [136] main::major#0 = cx16_k_i2c_read_byte::return#15 - // unsigned int minor = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_MINOR) - // [137] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 + sta smc_major + // cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_MINOR) + // [121] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 lda #$42 sta cx16_k_i2c_read_byte.device - // [138] cx16_k_i2c_read_byte::offset = $32 -- vbum1=vbuc1 + // [122] cx16_k_i2c_read_byte::offset = $32 -- vbum1=vbuc1 lda #$32 sta cx16_k_i2c_read_byte.offset - // [139] call cx16_k_i2c_read_byte + // [123] call cx16_k_i2c_read_byte jsr cx16_k_i2c_read_byte - // [140] cx16_k_i2c_read_byte::return#16 = cx16_k_i2c_read_byte::return#1 - // main::@108 - // [141] main::minor#0 = cx16_k_i2c_read_byte::return#16 - // smc_get_version_text(smc_version_string, release, major, minor) - // [142] smc_get_version_text::release#0 = main::release#0 -- vbuyy=vwuz1 - ldy.z release - // [143] smc_get_version_text::major#0 = main::major#0 -- vbuz1=vwuz2 - lda.z major + // [124] cx16_k_i2c_read_byte::return#16 = cx16_k_i2c_read_byte::return#1 + // main::@111 + // smc_minor = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_MINOR) + // [125] smc_minor#0 = cx16_k_i2c_read_byte::return#16 -- vbum1=vwuz2 + lda.z cx16_k_i2c_read_byte.return + sta smc_minor + // smc_get_version_text(smc_version_text, smc_release, smc_major, smc_minor) + // [126] smc_get_version_text::release#0 = smc_release#0 -- vbuz1=vbum2 + lda smc_release + sta.z smc_get_version_text.release + // [127] smc_get_version_text::major#0 = smc_major#0 -- vbuz1=vbum2 + lda smc_major sta.z smc_get_version_text.major - // [144] smc_get_version_text::minor#0 = main::minor#0 -- vbuz1=vwuz2 - lda.z minor + // [128] smc_get_version_text::minor#0 = smc_minor#0 -- vbuz1=vbum2 + lda smc_minor sta.z smc_get_version_text.minor - // [145] call smc_get_version_text - // [963] phi from main::@108 to smc_get_version_text [phi:main::@108->smc_get_version_text] - // [963] phi smc_get_version_text::minor#2 = smc_get_version_text::minor#0 [phi:main::@108->smc_get_version_text#0] -- register_copy - // [963] phi smc_get_version_text::major#2 = smc_get_version_text::major#0 [phi:main::@108->smc_get_version_text#1] -- register_copy - // [963] phi smc_get_version_text::release#2 = smc_get_version_text::release#0 [phi:main::@108->smc_get_version_text#2] -- register_copy - // [963] phi smc_get_version_text::version_string#2 = smc_version_string [phi:main::@108->smc_get_version_text#3] -- pbuz1=pbuc1 - lda #smc_get_version_text] + // [995] phi smc_get_version_text::minor#2 = smc_get_version_text::minor#0 [phi:main::@111->smc_get_version_text#0] -- register_copy + // [995] phi smc_get_version_text::major#2 = smc_get_version_text::major#0 [phi:main::@111->smc_get_version_text#1] -- register_copy + // [995] phi smc_get_version_text::release#2 = smc_get_version_text::release#0 [phi:main::@111->smc_get_version_text#2] -- register_copy + // [995] phi smc_get_version_text::version_string#2 = smc_version_text [phi:main::@111->smc_get_version_text#3] -- pbuz1=pbuc1 + lda #smc_version_string + lda #>smc_version_text sta.z smc_get_version_text.version_string+1 jsr smc_get_version_text - // [146] phi from main::@108 to main::@109 [phi:main::@108->main::@109] - // main::@109 + // [130] phi from main::@111 to main::@112 [phi:main::@111->main::@112] + // main::@112 // sprintf(info_text, "BL:v%u", smc_bootloader) - // [147] call snprintf_init - // [982] phi from main::@109 to snprintf_init [phi:main::@109->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@109->snprintf_init#0] -- pbuz1=pbuc1 + // [131] call snprintf_init + // [1014] phi from main::@112 to snprintf_init [phi:main::@112->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@112->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [148] phi from main::@109 to main::@110 [phi:main::@109->main::@110] - // main::@110 + // [132] phi from main::@112 to main::@113 [phi:main::@112->main::@113] + // main::@113 // sprintf(info_text, "BL:v%u", smc_bootloader) - // [149] call printf_str - // [987] phi from main::@110 to printf_str [phi:main::@110->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@110->printf_str#0] -- pprz1=pprc1 + // [133] call printf_str + // [1019] phi from main::@113 to printf_str [phi:main::@113->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@113->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s4 [phi:main::@110->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s4 [phi:main::@113->printf_str#1] -- pbuz1=pbuc1 lda #s4 sta.z printf_str.s+1 jsr printf_str - // main::@111 + // main::@114 // sprintf(info_text, "BL:v%u", smc_bootloader) - // [150] printf_uint::uvalue#13 = smc_bootloader#0 -- vwuz1=vwum2 + // [134] printf_uint::uvalue#13 = smc_bootloader#0 -- vwuz1=vwum2 lda smc_bootloader sta.z printf_uint.uvalue lda smc_bootloader+1 sta.z printf_uint.uvalue+1 - // [151] call printf_uint - // [996] phi from main::@111 to printf_uint [phi:main::@111->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 0 [phi:main::@111->printf_uint#0] -- vbuz1=vbuc1 + // [135] call printf_uint + // [1028] phi from main::@114 to printf_uint [phi:main::@114->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 0 [phi:main::@114->printf_uint#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 0 [phi:main::@111->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 0 [phi:main::@114->printf_uint#1] -- vbuz1=vbuc1 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = DECIMAL [phi:main::@111->printf_uint#2] -- vbuxx=vbuc1 - ldx #DECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#13 [phi:main::@111->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = DECIMAL [phi:main::@114->printf_uint#2] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#13 [phi:main::@114->printf_uint#3] -- register_copy jsr printf_uint - // main::@112 + // main::@115 // sprintf(info_text, "BL:v%u", smc_bootloader) - // [152] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [136] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [153] callexecute snputc -- call_vprc1 + // [137] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_info_smc(STATUS_DETECTED, info_text) - // [155] call display_info_smc + // [139] call display_info_smc // All ok, display bootloader version. - // [870] phi from main::@112 to display_info_smc [phi:main::@112->display_info_smc] - // [870] phi display_info_smc::info_text#14 = info_text [phi:main::@112->display_info_smc#0] -- pbuz1=pbuc1 + // [915] phi from main::@115 to display_info_smc [phi:main::@115->display_info_smc] + // [915] phi display_info_smc::info_text#17 = info_text [phi:main::@115->display_info_smc#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_info_smc.info_text lda #>@info_text sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_DETECTED [phi:main::@112->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_DETECTED [phi:main::@115->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_DETECTED sta.z display_info_smc.info_status jsr display_info_smc - // [156] phi from main::@100 main::@105 main::@112 main::@15 to main::@2 [phi:main::@100/main::@105/main::@112/main::@15->main::@2] + // [140] phi from main::@115 to main::@2 [phi:main::@115->main::@2] + // [140] phi smc_minor#397 = smc_minor#0 [phi:main::@115->main::@2#0] -- register_copy + // [140] phi smc_major#398 = smc_major#0 [phi:main::@115->main::@2#1] -- register_copy + // [140] phi smc_release#399 = smc_release#0 [phi:main::@115->main::@2#2] -- register_copy // main::@2 __b2: // display_chip_vera() - // [157] call display_chip_vera + // [141] call display_chip_vera // Detecting VERA FPGA. - // [846] phi from main::@2 to display_chip_vera [phi:main::@2->display_chip_vera] + // [891] phi from main::@2 to display_chip_vera [phi:main::@2->display_chip_vera] jsr display_chip_vera - // [158] phi from main::@2 to main::@113 [phi:main::@2->main::@113] - // main::@113 + // [142] phi from main::@2 to main::@116 [phi:main::@2->main::@116] + // main::@116 // display_info_vera(STATUS_DETECTED, "VERA installed, OK") - // [159] call display_info_vera - // [900] phi from main::@113 to display_info_vera [phi:main::@113->display_info_vera] - // [900] phi display_info_vera::info_text#10 = main::info_text3 [phi:main::@113->display_info_vera#0] -- pbuz1=pbuc1 + // [143] call display_info_vera + // [945] phi from main::@116 to display_info_vera [phi:main::@116->display_info_vera] + // [945] phi display_info_vera::info_text#10 = main::info_text3 [phi:main::@116->display_info_vera#0] -- pbuz1=pbuc1 lda #info_text3 sta.z display_info_vera.info_text+1 - // [900] phi display_info_vera::info_status#3 = STATUS_DETECTED [phi:main::@113->display_info_vera#1] -- vbuz1=vbuc1 + // [945] phi display_info_vera::info_status#3 = STATUS_DETECTED [phi:main::@116->display_info_vera#1] -- vbuz1=vbuc1 lda #STATUS_DETECTED sta.z display_info_vera.info_status jsr display_info_vera - // [160] phi from main::@113 to main::@114 [phi:main::@113->main::@114] - // main::@114 + // [144] phi from main::@116 to main::@117 [phi:main::@116->main::@117] + // main::@117 // rom_detect() - // [161] call rom_detect + // [145] call rom_detect // Detecting ROM chips - // [1006] phi from main::@114 to rom_detect [phi:main::@114->rom_detect] + // [1038] phi from main::@117 to rom_detect [phi:main::@117->rom_detect] jsr rom_detect - // [162] phi from main::@114 to main::@115 [phi:main::@114->main::@115] - // main::@115 + // [146] phi from main::@117 to main::@118 [phi:main::@117->main::@118] + // main::@118 // display_chip_rom() - // [163] call display_chip_rom - // [851] phi from main::@115 to display_chip_rom [phi:main::@115->display_chip_rom] + // [147] call display_chip_rom + // [896] phi from main::@118 to display_chip_rom [phi:main::@118->display_chip_rom] jsr display_chip_rom - // [164] phi from main::@115 to main::@17 [phi:main::@115->main::@17] - // [164] phi main::rom_chip1#10 = 0 [phi:main::@115->main::@17#0] -- vbum1=vbuc1 + // [148] phi from main::@118 to main::@21 [phi:main::@118->main::@21] + // [148] phi main::rom_chip1#10 = 0 [phi:main::@118->main::@21#0] -- vbum1=vbuc1 lda #0 sta rom_chip1 - // main::@17 - __b17: + // main::@21 + __b21: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [165] if(main::rom_chip1#10<8) goto main::@18 -- vbum1_lt_vbuc1_then_la1 + // [149] if(main::rom_chip1#10<8) goto main::@22 -- vbum1_lt_vbuc1_then_la1 lda rom_chip1 cmp #8 - bcs !__b18+ - jmp __b18 - !__b18: + bcs !__b22+ + jmp __b22 + !__b22: + // main::bank_set_brom2 + // BROM = bank + // [150] BROM = main::bank_set_brom2_bank#0 -- vbuz1=vbuc1 + lda #bank_set_brom2_bank + sta.z BROM + // main::CLI1 + // asm + // asm { cli } + cli + // [152] phi from main::CLI1 to main::@66 [phi:main::CLI1->main::@66] + // main::@66 + // display_progress_text(display_into_briefing_text, display_intro_briefing_count) + // [153] call display_progress_text + // [1088] phi from main::@66 to display_progress_text [phi:main::@66->display_progress_text] + // [1088] phi display_progress_text::text#12 = display_into_briefing_text [phi:main::@66->display_progress_text#0] -- qbuz1=qbuc1 + lda #display_into_briefing_text + sta.z display_progress_text.text+1 + // [1088] phi display_progress_text::lines#11 = display_intro_briefing_count [phi:main::@66->display_progress_text#1] -- vbuz1=vbuc1 + lda #display_intro_briefing_count + sta.z display_progress_text.lines + jsr display_progress_text + // [154] phi from main::@66 to main::@119 [phi:main::@66->main::@119] + // main::@119 + // util_wait_space() + // [155] call util_wait_space + // [1098] phi from main::@119 to util_wait_space [phi:main::@119->util_wait_space] + jsr util_wait_space + // [156] phi from main::@119 to main::@120 [phi:main::@119->main::@120] + // main::@120 + // display_progress_text(display_into_colors_text, display_intro_colors_count) + // [157] call display_progress_text + // [1088] phi from main::@120 to display_progress_text [phi:main::@120->display_progress_text] + // [1088] phi display_progress_text::text#12 = display_into_colors_text [phi:main::@120->display_progress_text#0] -- qbuz1=qbuc1 + lda #display_into_colors_text + sta.z display_progress_text.text+1 + // [1088] phi display_progress_text::lines#11 = display_intro_colors_count [phi:main::@120->display_progress_text#1] -- vbuz1=vbuc1 + lda #display_intro_colors_count + sta.z display_progress_text.lines + jsr display_progress_text + // [158] phi from main::@120 to main::@24 [phi:main::@120->main::@24] + // [158] phi main::intro_status#2 = 0 [phi:main::@120->main::@24#0] -- vbum1=vbuc1 + lda #0 + sta intro_status + // main::@24 + __b24: + // for(unsigned char intro_status=0; intro_status<11; intro_status++) + // [159] if(main::intro_status#2<$b) goto main::@25 -- vbum1_lt_vbuc1_then_la1 + lda intro_status + cmp #$b + bcs !__b25+ + jmp __b25 + !__b25: + // [160] phi from main::@24 to main::@26 [phi:main::@24->main::@26] + // main::@26 + // util_wait_space() + // [161] call util_wait_space + // [1098] phi from main::@26 to util_wait_space [phi:main::@26->util_wait_space] + jsr util_wait_space + // [162] phi from main::@26 to main::@126 [phi:main::@26->main::@126] + // main::@126 + // display_progress_clear() + // [163] call display_progress_clear + // [871] phi from main::@126 to display_progress_clear [phi:main::@126->display_progress_clear] + jsr display_progress_clear + // main::SEI2 + // asm + // asm { sei } + sei + // main::bank_set_brom4 + // BROM = bank + // [165] BROM = main::bank_set_brom4_bank#0 -- vbuz1=vbuc1 + lda #bank_set_brom4_bank + sta.z BROM // main::SEI3 // asm // asm { sei } sei // main::check_status_smc1 // status_smc == status - // [167] main::check_status_smc1_$0 = status_smc#0 == STATUS_DETECTED -- vboaa=vbum1_eq_vbuc1 + // [167] main::check_status_smc1_$0 = status_smc#0 == STATUS_DETECTED -- vboz1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_DETECTED beq !+ lda #1 !: eor #1 + sta.z check_status_smc1_main__0 // return (unsigned char)(status_smc == status); // [168] main::check_status_smc1_return#0 = (char)main::check_status_smc1_$0 - // main::@62 + // main::@68 // if(check_status_smc(STATUS_DETECTED)) - // [169] if(0==main::check_status_smc1_return#0) goto main::CLI2 -- 0_eq_vbuaa_then_la1 - cmp #0 - bne !__b6+ - jmp __b6 - !__b6: - // [170] phi from main::@62 to main::@21 [phi:main::@62->main::@21] - // main::@21 + // [169] if(0==main::check_status_smc1_return#0) goto main::CLI2 -- 0_eq_vbuz1_then_la1 + lda.z check_status_smc1_return + bne !__b8+ + jmp __b8 + !__b8: + // [170] phi from main::@68 to main::@27 [phi:main::@68->main::@27] + // main::@27 // smc_read(0) // [171] call smc_read - // [1056] phi from main::@21 to smc_read [phi:main::@21->smc_read] - // [1056] phi smc_read::display_progress#19 = 0 [phi:main::@21->smc_read#0] -- vbum1=vbuc1 + // [1101] phi from main::@27 to smc_read [phi:main::@27->smc_read] + // [1101] phi smc_read::display_progress#19 = 0 [phi:main::@27->smc_read#0] -- vbum1=vbuc1 lda #0 sta smc_read.display_progress - // [1056] phi __errno#35 = 0 [phi:main::@21->smc_read#1] -- vwsz1=vwsc1 + // [1101] phi __errno#35 = 0 [phi:main::@27->smc_read#1] -- vwsz1=vwsc1 sta.z __errno sta.z __errno+1 jsr smc_read // smc_read(0) // [172] smc_read::return#2 = smc_read::return#0 - // main::@120 + // main::@127 // smc_file_size = smc_read(0) - // [173] smc_file_size#0 = smc_read::return#2 -- vwum1=vwuz2 - lda.z smc_read.return + // [173] smc_file_size#0 = smc_read::return#2 -- vwum1=vwum2 + lda smc_read.return sta smc_file_size - lda.z smc_read.return+1 + lda smc_read.return+1 sta smc_file_size+1 // if (!smc_file_size) - // [174] if(0==smc_file_size#0) goto main::@24 -- 0_eq_vwum1_then_la1 + // [174] if(0==smc_file_size#0) goto main::@30 -- 0_eq_vwum1_then_la1 // In case no file was found, set the status to error and skip to the next, else, mention the amount of bytes read. lda smc_file_size ora smc_file_size+1 - bne !__b24+ - jmp __b24 - !__b24: - // main::@22 + bne !__b30+ + jmp __b30 + !__b30: + // main::@28 // if(smc_file_size > 0x1E00) - // [175] if(smc_file_size#0>$1e00) goto main::@25 -- vwum1_gt_vwuc1_then_la1 + // [175] if(smc_file_size#0>$1e00) goto main::@31 -- vwum1_gt_vwuc1_then_la1 // If the smc.bin file size is larger than 0x1E00 then there is an issue! lda #>$1e00 cmp smc_file_size+1 - bcs !__b25+ - jmp __b25 - !__b25: + bcs !__b31+ + jmp __b31 + !__b31: bne !+ lda #<$1e00 cmp smc_file_size - bcs !__b25+ - jmp __b25 - !__b25: + bcs !__b31+ + jmp __b31 + !__b31: !: - // main::@23 - // unsigned char file_smc_release = rom_get_release(*((char*)0xA030)) - // [176] rom_get_release::release#2 = *((char *) 41008) -- vbuxx=_deref_pbuc1 - ldx $a030 + // main::@29 + // rom_get_release(*((char*)0xA030)) + // [176] rom_get_release::release#2 = *((char *) 41008) -- vbum1=_deref_pbuc1 + lda $a030 + sta rom_get_release.release // [177] call rom_get_release - // All ok, display the SMC.BIN file version and SMC on-board bootloader. - // Fill the version data ... - // [1114] phi from main::@23 to rom_get_release [phi:main::@23->rom_get_release] - // [1114] phi rom_get_release::release#4 = rom_get_release::release#2 [phi:main::@23->rom_get_release#0] -- register_copy + // [1164] phi from main::@29 to rom_get_release [phi:main::@29->rom_get_release] + // [1164] phi rom_get_release::release#4 = rom_get_release::release#2 [phi:main::@29->rom_get_release#0] -- register_copy jsr rom_get_release - // unsigned char file_smc_release = rom_get_release(*((char*)0xA030)) + // rom_get_release(*((char*)0xA030)) // [178] rom_get_release::return#3 = rom_get_release::return#0 - // main::@121 - // [179] main::file_smc_release#0 = rom_get_release::return#3 -- vbuz1=vbuxx - stx.z file_smc_release - // unsigned char file_smc_major = rom_get_prefix(*((char*)0xA031)) - // [180] rom_get_prefix::release#1 = *((char *) 41009) -- vbuaa=_deref_pbuc1 + // main::@128 + // smc_file_release = rom_get_release(*((char*)0xA030)) + // [179] smc_file_release#0 = rom_get_release::return#3 -- vbum1=vbum2 + lda rom_get_release.return + sta smc_file_release + // rom_get_prefix(*((char*)0xA031)) + // [180] rom_get_prefix::release#1 = *((char *) 41009) -- vbuz1=_deref_pbuc1 lda $a031 + sta.z rom_get_prefix.release // [181] call rom_get_prefix - // [1121] phi from main::@121 to rom_get_prefix [phi:main::@121->rom_get_prefix] - // [1121] phi rom_get_prefix::release#4 = rom_get_prefix::release#1 [phi:main::@121->rom_get_prefix#0] -- register_copy + // [1171] phi from main::@128 to rom_get_prefix [phi:main::@128->rom_get_prefix] + // [1171] phi rom_get_prefix::release#4 = rom_get_prefix::release#1 [phi:main::@128->rom_get_prefix#0] -- register_copy jsr rom_get_prefix - // unsigned char file_smc_major = rom_get_prefix(*((char*)0xA031)) + // rom_get_prefix(*((char*)0xA031)) // [182] rom_get_prefix::return#3 = rom_get_prefix::return#0 - // main::@122 - // [183] main::file_smc_major#0 = rom_get_prefix::return#3 -- vbuz1=vbuxx - stx.z file_smc_major - // unsigned char file_smc_minor = rom_get_prefix(*((char*)0xA032)) - // [184] rom_get_prefix::release#2 = *((char *) 41010) -- vbuaa=_deref_pbuc1 + // main::@129 + // smc_file_major = rom_get_prefix(*((char*)0xA031)) + // [183] smc_file_major#0 = rom_get_prefix::return#3 -- vbum1=vbum2 + lda rom_get_prefix.return + sta smc_file_major + // rom_get_prefix(*((char*)0xA032)) + // [184] rom_get_prefix::release#2 = *((char *) 41010) -- vbuz1=_deref_pbuc1 lda $a032 + sta.z rom_get_prefix.release // [185] call rom_get_prefix - // [1121] phi from main::@122 to rom_get_prefix [phi:main::@122->rom_get_prefix] - // [1121] phi rom_get_prefix::release#4 = rom_get_prefix::release#2 [phi:main::@122->rom_get_prefix#0] -- register_copy + // [1171] phi from main::@129 to rom_get_prefix [phi:main::@129->rom_get_prefix] + // [1171] phi rom_get_prefix::release#4 = rom_get_prefix::release#2 [phi:main::@129->rom_get_prefix#0] -- register_copy jsr rom_get_prefix - // unsigned char file_smc_minor = rom_get_prefix(*((char*)0xA032)) + // rom_get_prefix(*((char*)0xA032)) // [186] rom_get_prefix::return#4 = rom_get_prefix::return#0 - // main::@123 - // [187] main::file_smc_minor#0 = rom_get_prefix::return#4 - // smc_get_version_text(file_smc_version_text, file_smc_release, file_smc_major, file_smc_minor) - // [188] smc_get_version_text::release#1 = main::file_smc_release#0 -- vbuyy=vbuz1 - ldy.z file_smc_release - // [189] smc_get_version_text::major#1 = main::file_smc_major#0 - // [190] smc_get_version_text::minor#1 = main::file_smc_minor#0 -- vbuz1=vbuxx - stx.z smc_get_version_text.minor + // main::@130 + // smc_file_minor = rom_get_prefix(*((char*)0xA032)) + // [187] smc_file_minor#0 = rom_get_prefix::return#4 -- vbum1=vbum2 + lda rom_get_prefix.return + sta smc_file_minor + // smc_get_version_text(smc_file_version_text, smc_file_release, smc_file_major, smc_file_minor) + // [188] smc_get_version_text::release#1 = smc_file_release#0 -- vbuz1=vbum2 + lda smc_file_release + sta.z smc_get_version_text.release + // [189] smc_get_version_text::major#1 = smc_file_major#0 -- vbuz1=vbum2 + lda smc_file_major + sta.z smc_get_version_text.major + // [190] smc_get_version_text::minor#1 = smc_file_minor#0 -- vbuz1=vbum2 + lda smc_file_minor + sta.z smc_get_version_text.minor // [191] call smc_get_version_text - // [963] phi from main::@123 to smc_get_version_text [phi:main::@123->smc_get_version_text] - // [963] phi smc_get_version_text::minor#2 = smc_get_version_text::minor#1 [phi:main::@123->smc_get_version_text#0] -- register_copy - // [963] phi smc_get_version_text::major#2 = smc_get_version_text::major#1 [phi:main::@123->smc_get_version_text#1] -- register_copy - // [963] phi smc_get_version_text::release#2 = smc_get_version_text::release#1 [phi:main::@123->smc_get_version_text#2] -- register_copy - // [963] phi smc_get_version_text::version_string#2 = main::file_smc_version_text [phi:main::@123->smc_get_version_text#3] -- pbuz1=pbuc1 - lda #smc_get_version_text] + // [995] phi smc_get_version_text::minor#2 = smc_get_version_text::minor#1 [phi:main::@130->smc_get_version_text#0] -- register_copy + // [995] phi smc_get_version_text::major#2 = smc_get_version_text::major#1 [phi:main::@130->smc_get_version_text#1] -- register_copy + // [995] phi smc_get_version_text::release#2 = smc_get_version_text::release#1 [phi:main::@130->smc_get_version_text#2] -- register_copy + // [995] phi smc_get_version_text::version_string#2 = main::smc_file_version_text [phi:main::@130->smc_get_version_text#3] -- pbuz1=pbuc1 + lda #file_smc_version_text + lda #>smc_file_version_text sta.z smc_get_version_text.version_string+1 jsr smc_get_version_text - // [192] phi from main::@123 to main::@124 [phi:main::@123->main::@124] - // main::@124 - // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, file_smc_version_text) + // [192] phi from main::@130 to main::@131 [phi:main::@130->main::@131] + // main::@131 + // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, smc_file_version_text) // [193] call snprintf_init - // [982] phi from main::@124 to snprintf_init [phi:main::@124->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@124->snprintf_init#0] -- pbuz1=pbuc1 + // [1014] phi from main::@131 to snprintf_init [phi:main::@131->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@131->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [194] phi from main::@124 to main::@125 [phi:main::@124->main::@125] - // main::@125 - // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, file_smc_version_text) + // [194] phi from main::@131 to main::@132 [phi:main::@131->main::@132] + // main::@132 + // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, smc_file_version_text) // [195] call printf_str - // [987] phi from main::@125 to printf_str [phi:main::@125->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@125->printf_str#0] -- pprz1=pprc1 + // [1019] phi from main::@132 to printf_str [phi:main::@132->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@132->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s4 [phi:main::@125->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s4 [phi:main::@132->printf_str#1] -- pbuz1=pbuc1 lda #s4 sta.z printf_str.s+1 jsr printf_str - // main::@126 - // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, file_smc_version_text) + // main::@133 + // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, smc_file_version_text) // [196] printf_uint::uvalue#14 = smc_bootloader#0 -- vwuz1=vwum2 lda smc_bootloader sta.z printf_uint.uvalue lda smc_bootloader+1 sta.z printf_uint.uvalue+1 // [197] call printf_uint - // [996] phi from main::@126 to printf_uint [phi:main::@126->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 0 [phi:main::@126->printf_uint#0] -- vbuz1=vbuc1 + // [1028] phi from main::@133 to printf_uint [phi:main::@133->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 0 [phi:main::@133->printf_uint#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 0 [phi:main::@126->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 0 [phi:main::@133->printf_uint#1] -- vbuz1=vbuc1 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = DECIMAL [phi:main::@126->printf_uint#2] -- vbuxx=vbuc1 - ldx #DECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#14 [phi:main::@126->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = DECIMAL [phi:main::@133->printf_uint#2] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#14 [phi:main::@133->printf_uint#3] -- register_copy jsr printf_uint - // [198] phi from main::@126 to main::@127 [phi:main::@126->main::@127] - // main::@127 - // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, file_smc_version_text) + // [198] phi from main::@133 to main::@134 [phi:main::@133->main::@134] + // main::@134 + // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, smc_file_version_text) // [199] call printf_str - // [987] phi from main::@127 to printf_str [phi:main::@127->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@127->printf_str#0] -- pprz1=pprc1 + // [1019] phi from main::@134 to printf_str [phi:main::@134->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@134->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s6 [phi:main::@127->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s6 [phi:main::@134->printf_str#1] -- pbuz1=pbuc1 lda #s6 sta.z printf_str.s+1 jsr printf_str - // [200] phi from main::@127 to main::@128 [phi:main::@127->main::@128] - // main::@128 - // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, file_smc_version_text) + // [200] phi from main::@134 to main::@135 [phi:main::@134->main::@135] + // main::@135 + // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, smc_file_version_text) // [201] call printf_string - // [1130] phi from main::@128 to printf_string [phi:main::@128->printf_string] - // [1130] phi printf_string::putc#22 = &snputc [phi:main::@128->printf_string#0] -- pprz1=pprc1 + // [1180] phi from main::@135 to printf_string [phi:main::@135->printf_string] + // [1180] phi printf_string::putc#22 = &snputc [phi:main::@135->printf_string#0] -- pprz1=pprc1 lda #snputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = main::file_smc_version_text [phi:main::@128->printf_string#1] -- pbuz1=pbuc1 - lda #printf_string#1] -- pbuz1=pbuc1 + lda #file_smc_version_text + lda #>smc_file_version_text sta.z printf_string.str+1 - // [1130] phi printf_string::format_justify_left#22 = 0 [phi:main::@128->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_justify_left#22 = 0 [phi:main::@135->printf_string#2] -- vbuz1=vbuc1 lda #0 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 0 [phi:main::@128->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 0 [phi:main::@135->printf_string#3] -- vbuz1=vbuc1 sta.z printf_string.format_min_length jsr printf_string - // main::@129 - // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, file_smc_version_text) + // main::@136 + // sprintf(info_text, "BL:v%u, SMC:%s", smc_bootloader, smc_file_version_text) // [202] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha @@ -1199,22 +1280,31 @@ main: { // display_info_smc(STATUS_FLASH, NULL) // [205] call display_info_smc // All ok, display bootloader version. - // [870] phi from main::@129 to display_info_smc [phi:main::@129->display_info_smc] - // [870] phi display_info_smc::info_text#14 = 0 [phi:main::@129->display_info_smc#0] -- pbuz1=vbuc1 + // [915] phi from main::@136 to display_info_smc [phi:main::@136->display_info_smc] + // [915] phi display_info_smc::info_text#17 = 0 [phi:main::@136->display_info_smc#0] -- pbuz1=vbuc1 lda #<0 sta.z display_info_smc.info_text sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_FLASH [phi:main::@129->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_FLASH [phi:main::@136->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_FLASH sta.z display_info_smc.info_status jsr display_info_smc - // [206] phi from main::@129 main::@24 main::@25 to main::CLI2 [phi:main::@129/main::@24/main::@25->main::CLI2] - // [206] phi __errno#247 = __errno#18 [phi:main::@129/main::@24/main::@25->main::CLI2#0] -- register_copy + // [206] phi from main::@136 to main::CLI2 [phi:main::@136->main::CLI2] + // [206] phi smc_file_minor#243 = smc_file_minor#0 [phi:main::@136->main::CLI2#0] -- register_copy + // [206] phi smc_file_major#244 = smc_file_major#0 [phi:main::@136->main::CLI2#1] -- register_copy + // [206] phi smc_file_release#245 = smc_file_release#0 [phi:main::@136->main::CLI2#2] -- register_copy + // [206] phi __errno#239 = __errno#18 [phi:main::@136->main::CLI2#3] -- register_copy jmp CLI2 - // [206] phi from main::@62 to main::CLI2 [phi:main::@62->main::CLI2] - __b6: - // [206] phi __errno#247 = 0 [phi:main::@62->main::CLI2#0] -- vwsz1=vwsc1 - lda #<0 + // [206] phi from main::@68 to main::CLI2 [phi:main::@68->main::CLI2] + __b8: + // [206] phi smc_file_minor#243 = 0 [phi:main::@68->main::CLI2#0] -- vbum1=vbuc1 + lda #0 + sta smc_file_minor + // [206] phi smc_file_major#244 = 0 [phi:main::@68->main::CLI2#1] -- vbum1=vbuc1 + sta smc_file_major + // [206] phi smc_file_release#245 = 0 [phi:main::@68->main::CLI2#2] -- vbum1=vbuc1 + sta smc_file_release + // [206] phi __errno#239 = 0 [phi:main::@68->main::CLI2#3] -- vwsz1=vwsc1 sta.z __errno sta.z __errno+1 // main::CLI2 @@ -1225,28 +1315,28 @@ main: { // main::SEI4 // asm { sei } sei - // [209] phi from main::SEI4 to main::@26 [phi:main::SEI4->main::@26] - // [209] phi __errno#112 = __errno#247 [phi:main::SEI4->main::@26#0] -- register_copy - // [209] phi main::rom_chip2#10 = 0 [phi:main::SEI4->main::@26#1] -- vbum1=vbuc1 + // [209] phi from main::SEI4 to main::@32 [phi:main::SEI4->main::@32] + // [209] phi __errno#114 = __errno#239 [phi:main::SEI4->main::@32#0] -- register_copy + // [209] phi main::rom_chip2#10 = 0 [phi:main::SEI4->main::@32#1] -- vbum1=vbuc1 lda #0 sta rom_chip2 // We loop all the possible ROM chip slots on the board and on the extension card, // and we check the file contents. // Any error identified gets reported and this chip will not be flashed. // In case of ROM0.BIN in error, no flashing will be done! - // main::@26 - __b26: + // main::@32 + __b32: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [210] if(main::rom_chip2#10<8) goto main::bank_set_brom4 -- vbum1_lt_vbuc1_then_la1 + // [210] if(main::rom_chip2#10<8) goto main::bank_set_brom5 -- vbum1_lt_vbuc1_then_la1 lda rom_chip2 cmp #8 - bcs !bank_set_brom4+ - jmp bank_set_brom4 - !bank_set_brom4: - // main::bank_set_brom5 + bcs !bank_set_brom5+ + jmp bank_set_brom5 + !bank_set_brom5: + // main::bank_set_brom6 // BROM = bank - // [211] BROM = main::bank_set_brom5_bank#0 -- vbuz1=vbuc1 - lda #bank_set_brom5_bank + // [211] BROM = main::bank_set_brom6_bank#0 -- vbuz1=vbuc1 + lda #bank_set_brom6_bank sta.z BROM // main::CLI3 // asm @@ -1254,1011 +1344,1198 @@ main: { cli // main::check_status_smc2 // status_smc == status - // [213] main::check_status_smc2_$0 = status_smc#0 == STATUS_FLASH -- vboaa=vbum1_eq_vbuc1 + // [213] main::check_status_smc2_$0 = status_smc#0 == STATUS_FLASH -- vboz1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_FLASH beq !+ lda #1 !: eor #1 + sta.z check_status_smc2_main__0 // return (unsigned char)(status_smc == status); - // [214] main::check_status_smc2_return#0 = (char)main::check_status_smc2_$0 -- vbuyy=vbuaa - tay + // [214] main::check_status_smc2_return#0 = (char)main::check_status_smc2_$0 // [215] phi from main::check_status_smc2 to main::check_status_cx16_rom1 [phi:main::check_status_smc2->main::check_status_cx16_rom1] // main::check_status_cx16_rom1 // main::check_status_cx16_rom1_check_status_rom1 // status_rom[rom_chip] == status - // [216] main::check_status_cx16_rom1_check_status_rom1_$0 = *status_rom == STATUS_FLASH -- vboaa=_deref_pbuc1_eq_vbuc2 + // [216] main::check_status_cx16_rom1_check_status_rom1_$0 = *status_rom == STATUS_FLASH -- vboz1=_deref_pbuc1_eq_vbuc2 lda status_rom eor #STATUS_FLASH beq !+ lda #1 !: eor #1 + sta.z check_status_cx16_rom1_check_status_rom1_main__0 // return (unsigned char)(status_rom[rom_chip] == status); - // [217] main::check_status_cx16_rom1_check_status_rom1_return#0 = (char)main::check_status_cx16_rom1_check_status_rom1_$0 -- vbuxx=vbuaa - tax - // main::@64 + // [217] main::check_status_cx16_rom1_check_status_rom1_return#0 = (char)main::check_status_cx16_rom1_check_status_rom1_$0 + // main::@70 // if(!check_status_smc(STATUS_FLASH) && check_status_cx16_rom(STATUS_FLASH)) - // [218] if(0!=main::check_status_smc2_return#0) goto main::check_status_smc3 -- 0_neq_vbuyy_then_la1 - cpy #0 + // [218] if(0!=main::check_status_smc2_return#0) goto main::check_status_smc3 -- 0_neq_vbuz1_then_la1 + lda.z check_status_smc2_return bne check_status_smc3 - // main::@205 - // [219] if(0!=main::check_status_cx16_rom1_check_status_rom1_return#0) goto main::@33 -- 0_neq_vbuxx_then_la1 - cpx #0 - beq !__b33+ - jmp __b33 - !__b33: + // main::@223 + // [219] if(0!=main::check_status_cx16_rom1_check_status_rom1_return#0) goto main::@39 -- 0_neq_vbuz1_then_la1 + lda.z check_status_cx16_rom1_check_status_rom1_return + beq !__b39+ + jmp __b39 + !__b39: // main::check_status_smc3 check_status_smc3: // status_smc == status - // [220] main::check_status_smc3_$0 = status_smc#0 == STATUS_FLASH -- vboaa=vbum1_eq_vbuc1 + // [220] main::check_status_smc3_$0 = status_smc#0 == STATUS_FLASH -- vboz1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_FLASH beq !+ lda #1 !: eor #1 + sta.z check_status_smc3_main__0 // return (unsigned char)(status_smc == status); - // [221] main::check_status_smc3_return#0 = (char)main::check_status_smc3_$0 -- vbuyy=vbuaa - tay + // [221] main::check_status_smc3_return#0 = (char)main::check_status_smc3_$0 // [222] phi from main::check_status_smc3 to main::check_status_cx16_rom2 [phi:main::check_status_smc3->main::check_status_cx16_rom2] // main::check_status_cx16_rom2 // main::check_status_cx16_rom2_check_status_rom1 // status_rom[rom_chip] == status - // [223] main::check_status_cx16_rom2_check_status_rom1_$0 = *status_rom == STATUS_FLASH -- vboaa=_deref_pbuc1_eq_vbuc2 + // [223] main::check_status_cx16_rom2_check_status_rom1_$0 = *status_rom == STATUS_NONE -- vbom1=_deref_pbuc1_eq_vbuc2 lda status_rom - eor #STATUS_FLASH + eor #STATUS_NONE beq !+ lda #1 !: eor #1 + sta check_status_cx16_rom2_check_status_rom1_main__0 // return (unsigned char)(status_rom[rom_chip] == status); - // [224] main::check_status_cx16_rom2_check_status_rom1_return#0 = (char)main::check_status_cx16_rom2_check_status_rom1_$0 -- vbuxx=vbuaa - tax - // main::@67 - // if(check_status_smc(STATUS_FLASH) && !check_status_cx16_rom(STATUS_FLASH)) - // [225] if(0==main::check_status_smc3_return#0) goto main::check_status_smc4 -- 0_eq_vbuyy_then_la1 - cpy #0 + // [224] main::check_status_cx16_rom2_check_status_rom1_return#0 = (char)main::check_status_cx16_rom2_check_status_rom1_$0 + // main::@73 + // if(check_status_smc(STATUS_FLASH) && check_status_cx16_rom(STATUS_NONE)) + // [225] if(0==main::check_status_smc3_return#0) goto main::check_status_smc4 -- 0_eq_vbuz1_then_la1 + lda.z check_status_smc3_return beq check_status_smc4 - // main::@206 - // [226] if(0==main::check_status_cx16_rom2_check_status_rom1_return#0) goto main::@3 -- 0_eq_vbuxx_then_la1 - cpx #0 - bne !__b3+ + // main::@224 + // [226] if(0!=main::check_status_cx16_rom2_check_status_rom1_return#0) goto main::@3 -- 0_neq_vbum1_then_la1 + lda check_status_cx16_rom2_check_status_rom1_return + beq !__b3+ jmp __b3 !__b3: // main::check_status_smc4 check_status_smc4: // status_smc == status - // [227] main::check_status_smc4_$0 = status_smc#0 == STATUS_ISSUE -- vboaa=vbum1_eq_vbuc1 + // [227] main::check_status_smc4_$0 = status_smc#0 == STATUS_FLASH -- vboz1=vbum2_eq_vbuc1 + lda status_smc + eor #STATUS_FLASH + beq !+ + lda #1 + !: + eor #1 + sta.z check_status_smc4_main__0 + // return (unsigned char)(status_smc == status); + // [228] main::check_status_smc4_return#0 = (char)main::check_status_smc4_$0 + // [229] phi from main::check_status_smc4 to main::check_status_cx16_rom3 [phi:main::check_status_smc4->main::check_status_cx16_rom3] + // main::check_status_cx16_rom3 + // main::check_status_cx16_rom3_check_status_rom1 + // status_rom[rom_chip] == status + // [230] main::check_status_cx16_rom3_check_status_rom1_$0 = *status_rom == STATUS_FLASH -- vbom1=_deref_pbuc1_eq_vbuc2 + lda status_rom + eor #STATUS_FLASH + beq !+ + lda #1 + !: + eor #1 + sta check_status_cx16_rom3_check_status_rom1_main__0 + // return (unsigned char)(status_rom[rom_chip] == status); + // [231] main::check_status_cx16_rom3_check_status_rom1_return#0 = (char)main::check_status_cx16_rom3_check_status_rom1_$0 + // main::@74 + // if(check_status_smc(STATUS_FLASH) && !check_status_cx16_rom(STATUS_FLASH)) + // [232] if(0==main::check_status_smc4_return#0) goto main::@4 -- 0_eq_vbuz1_then_la1 + lda.z check_status_smc4_return + beq __b4 + // main::@225 + // [233] if(0==main::check_status_cx16_rom3_check_status_rom1_return#0) goto main::@6 -- 0_eq_vbum1_then_la1 + lda check_status_cx16_rom3_check_status_rom1_return + bne !__b6+ + jmp __b6 + !__b6: + // main::@4 + __b4: + // if(smc_release == smc_file_release && smc_major == smc_file_major && smc_minor == smc_file_minor) + // [234] if(smc_release#399!=smc_file_release#245) goto main::@5 -- vbum1_neq_vbum2_then_la1 + lda smc_release + cmp smc_file_release + bne __b5 + // main::@227 + // [235] if(smc_major#398!=smc_file_major#244) goto main::@5 -- vbum1_neq_vbum2_then_la1 + lda smc_major + cmp smc_file_major + bne __b5 + // main::@226 + // [236] if(smc_minor#397==smc_file_minor#243) goto main::@7 -- vbum1_eq_vbum2_then_la1 + lda smc_minor + cmp smc_file_minor + bne !__b7+ + jmp __b7 + !__b7: + // main::@5 + __b5: + // smc_supported_rom(rom_release[0]) + // [237] smc_supported_rom::rom_release#0 = *rom_release -- vbum1=_deref_pbuc1 + lda rom_release + sta smc_supported_rom.rom_release + // [238] call smc_supported_rom + // [1205] phi from main::@5 to smc_supported_rom [phi:main::@5->smc_supported_rom] + jsr smc_supported_rom + // smc_supported_rom(rom_release[0]) + // [239] smc_supported_rom::return#3 = smc_supported_rom::return#2 + // main::@171 + // [240] main::$52 = smc_supported_rom::return#3 + // if(!smc_supported_rom(rom_release[0])) + // [241] if(0!=main::$52) goto main::check_status_smc5 -- 0_neq_vbum1_then_la1 + lda main__52 + bne check_status_smc5 + // [242] phi from main::@171 to main::@8 [phi:main::@171->main::@8] + // main::@8 + // display_action_progress("The ROM.BIN isn't compatible with SMC.BIN, no flash allowed!") + // [243] call display_action_progress + // [857] phi from main::@8 to display_action_progress [phi:main::@8->display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text15 [phi:main::@8->display_action_progress#0] -- pbuz1=pbuc1 + lda #info_text15 + sta.z display_action_progress.info_text+1 + jsr display_action_progress + // [244] phi from main::@8 to main::@174 [phi:main::@8->main::@174] + // main::@174 + // display_progress_text(display_smc_unsupported_rom_text, display_smc_unsupported_rom_count) + // [245] call display_progress_text + // [1088] phi from main::@174 to display_progress_text [phi:main::@174->display_progress_text] + // [1088] phi display_progress_text::text#12 = display_smc_unsupported_rom_text [phi:main::@174->display_progress_text#0] -- qbuz1=qbuc1 + lda #display_smc_unsupported_rom_text + sta.z display_progress_text.text+1 + // [1088] phi display_progress_text::lines#11 = display_smc_unsupported_rom_count [phi:main::@174->display_progress_text#1] -- vbuz1=vbuc1 + lda #display_smc_unsupported_rom_count + sta.z display_progress_text.lines + jsr display_progress_text + // [246] phi from main::@174 to main::@175 [phi:main::@174->main::@175] + // main::@175 + // unsigned char ch = util_wait_key("You still want to continue with flashing? [YN]", "YN") + // [247] call util_wait_key + // [1212] phi from main::@175 to util_wait_key [phi:main::@175->util_wait_key] + // [1212] phi util_wait_key::filter#13 = main::filter [phi:main::@175->util_wait_key#0] -- pbuz1=pbuc1 + lda #filter + sta.z util_wait_key.filter+1 + // [1212] phi util_wait_key::info_text#3 = main::info_text16 [phi:main::@175->util_wait_key#1] -- pbuz1=pbuc1 + lda #info_text16 + sta.z util_wait_key.info_text+1 + jsr util_wait_key + // unsigned char ch = util_wait_key("You still want to continue with flashing? [YN]", "YN") + // [248] util_wait_key::return#3 = util_wait_key::ch#4 -- vbum1=vwum2 + lda util_wait_key.ch + sta util_wait_key.return + // main::@176 + // [249] main::ch#0 = util_wait_key::return#3 + // if(ch == 'N') + // [250] if(main::ch#0!='N') goto main::check_status_smc5 -- vbum1_neq_vbuc1_then_la1 + lda #'N' + cmp ch + bne check_status_smc5 + // [251] phi from main::@176 to main::@9 [phi:main::@176->main::@9] + // main::@9 + // display_info_smc(STATUS_ISSUE, NULL) + // [252] call display_info_smc + // Cancel flash + // [915] phi from main::@9 to display_info_smc [phi:main::@9->display_info_smc] + // [915] phi display_info_smc::info_text#17 = 0 [phi:main::@9->display_info_smc#0] -- pbuz1=vbuc1 + lda #<0 + sta.z display_info_smc.info_text + sta.z display_info_smc.info_text+1 + // [915] phi display_info_smc::info_status#17 = STATUS_ISSUE [phi:main::@9->display_info_smc#1] -- vbuz1=vbuc1 + lda #STATUS_ISSUE + sta.z display_info_smc.info_status + jsr display_info_smc + // [253] phi from main::@9 to main::@177 [phi:main::@9->main::@177] + // main::@177 + // display_info_cx16_rom(STATUS_ISSUE, NULL) + // [254] call display_info_cx16_rom + // [1236] phi from main::@177 to display_info_cx16_rom [phi:main::@177->display_info_cx16_rom] + // [1236] phi display_info_cx16_rom::info_text#4 = 0 [phi:main::@177->display_info_cx16_rom#0] -- pbuz1=vbuc1 + lda #<0 + sta.z display_info_cx16_rom.info_text + sta.z display_info_cx16_rom.info_text+1 + // [1236] phi display_info_cx16_rom::info_status#4 = STATUS_ISSUE [phi:main::@177->display_info_cx16_rom#1] -- vbuz1=vbuc1 + lda #STATUS_ISSUE + sta.z display_info_cx16_rom.info_status + jsr display_info_cx16_rom + // main::check_status_smc5 + check_status_smc5: + // status_smc == status + // [255] main::check_status_smc5_$0 = status_smc#0 == STATUS_ISSUE -- vbom1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_ISSUE beq !+ lda #1 !: eor #1 + sta check_status_smc5_main__0 // return (unsigned char)(status_smc == status); - // [228] main::check_status_smc4_return#0 = (char)main::check_status_smc4_$0 -- vbuz1=vbuaa - sta.z check_status_smc4_return + // [256] main::check_status_smc5_return#0 = (char)main::check_status_smc5_$0 // main::check_status_vera1 // status_vera == status - // [229] main::check_status_vera1_$0 = status_vera#0 == STATUS_ISSUE -- vboaa=vbum1_eq_vbuc1 + // [257] main::check_status_vera1_$0 = status_vera#0 == STATUS_ISSUE -- vbom1=vbum2_eq_vbuc1 lda status_vera eor #STATUS_ISSUE beq !+ lda #1 !: eor #1 + sta check_status_vera1_main__0 // return (unsigned char)(status_vera == status); - // [230] main::check_status_vera1_return#0 = (char)main::check_status_vera1_$0 -- vbuz1=vbuaa - sta.z check_status_vera1_return - // [231] phi from main::check_status_vera1 to main::check_status_roms_all1 [phi:main::check_status_vera1->main::check_status_roms_all1] - // main::check_status_roms_all1 - // [232] phi from main::check_status_roms_all1 to main::check_status_roms_all1_@1 [phi:main::check_status_roms_all1->main::check_status_roms_all1_@1] - // [232] phi main::check_status_roms_all1_rom_chip#2 = 0 [phi:main::check_status_roms_all1->main::check_status_roms_all1_@1#0] -- vbuxx=vbuc1 - ldx #0 - // main::check_status_roms_all1_@1 - check_status_roms_all1___b1: + // [258] main::check_status_vera1_return#0 = (char)main::check_status_vera1_$0 + // [259] phi from main::check_status_vera1 to main::check_status_roms1 [phi:main::check_status_vera1->main::check_status_roms1] + // main::check_status_roms1 + // [260] phi from main::check_status_roms1 to main::check_status_roms1_@1 [phi:main::check_status_roms1->main::check_status_roms1_@1] + // [260] phi main::check_status_roms1_rom_chip#2 = 0 [phi:main::check_status_roms1->main::check_status_roms1_@1#0] -- vbum1=vbuc1 + lda #0 + sta check_status_roms1_rom_chip + // main::check_status_roms1_@1 + check_status_roms1___b1: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [233] if(main::check_status_roms_all1_rom_chip#2<8) goto main::check_status_roms_all1_check_status_rom1 -- vbuxx_lt_vbuc1_then_la1 - cpx #8 - bcs !check_status_roms_all1_check_status_rom1+ - jmp check_status_roms_all1_check_status_rom1 - !check_status_roms_all1_check_status_rom1: - // [234] phi from main::check_status_roms_all1_@1 to main::check_status_roms_all1_@return [phi:main::check_status_roms_all1_@1->main::check_status_roms_all1_@return] - // [234] phi main::check_status_roms_all1_return#2 = 1 [phi:main::check_status_roms_all1_@1->main::check_status_roms_all1_@return#0] -- vbum1=vbuc1 - lda #1 - sta check_status_roms_all1_return - // main::check_status_roms_all1_@return - // main::check_status_smc5 - check_status_smc5: + // [261] if(main::check_status_roms1_rom_chip#2<8) goto main::check_status_roms1_check_status_rom1 -- vbum1_lt_vbuc1_then_la1 + lda check_status_roms1_rom_chip + cmp #8 + bcs !check_status_roms1_check_status_rom1+ + jmp check_status_roms1_check_status_rom1 + !check_status_roms1_check_status_rom1: + // [262] phi from main::check_status_roms1_@1 to main::check_status_roms1_@return [phi:main::check_status_roms1_@1->main::check_status_roms1_@return] + // [262] phi main::check_status_roms1_return#2 = 0 [phi:main::check_status_roms1_@1->main::check_status_roms1_@return#0] -- vbum1=vbuc1 + lda #0 + sta check_status_roms1_return + // main::check_status_roms1_@return + // main::check_status_smc6 + check_status_smc6: // status_smc == status - // [235] main::check_status_smc5_$0 = status_smc#0 == STATUS_ERROR -- vboaa=vbum1_eq_vbuc1 + // [263] main::check_status_smc6_$0 = status_smc#0 == STATUS_ERROR -- vboz1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_ERROR beq !+ lda #1 !: eor #1 + sta.z check_status_smc6_main__0 // return (unsigned char)(status_smc == status); - // [236] main::check_status_smc5_return#0 = (char)main::check_status_smc5_$0 -- vbuz1=vbuaa - sta.z check_status_smc5_return + // [264] main::check_status_smc6_return#0 = (char)main::check_status_smc6_$0 // main::check_status_vera2 // status_vera == status - // [237] main::check_status_vera2_$0 = status_vera#0 == STATUS_ERROR -- vboaa=vbum1_eq_vbuc1 + // [265] main::check_status_vera2_$0 = status_vera#0 == STATUS_ERROR -- vboz1=vbum2_eq_vbuc1 lda status_vera eor #STATUS_ERROR beq !+ lda #1 !: eor #1 + sta.z check_status_vera2_main__0 // return (unsigned char)(status_vera == status); - // [238] main::check_status_vera2_return#0 = (char)main::check_status_vera2_$0 -- vbuyy=vbuaa - tay - // [239] phi from main::check_status_vera2 to main::check_status_roms_all2 [phi:main::check_status_vera2->main::check_status_roms_all2] - // main::check_status_roms_all2 - // [240] phi from main::check_status_roms_all2 to main::check_status_roms_all2_@1 [phi:main::check_status_roms_all2->main::check_status_roms_all2_@1] - // [240] phi main::check_status_roms_all2_rom_chip#2 = 0 [phi:main::check_status_roms_all2->main::check_status_roms_all2_@1#0] -- vbuxx=vbuc1 - ldx #0 - // main::check_status_roms_all2_@1 - check_status_roms_all2___b1: + // [266] main::check_status_vera2_return#0 = (char)main::check_status_vera2_$0 + // [267] phi from main::check_status_vera2 to main::check_status_roms2 [phi:main::check_status_vera2->main::check_status_roms2] + // main::check_status_roms2 + // [268] phi from main::check_status_roms2 to main::check_status_roms2_@1 [phi:main::check_status_roms2->main::check_status_roms2_@1] + // [268] phi main::check_status_roms2_rom_chip#2 = 0 [phi:main::check_status_roms2->main::check_status_roms2_@1#0] -- vbum1=vbuc1 + lda #0 + sta check_status_roms2_rom_chip + // main::check_status_roms2_@1 + check_status_roms2___b1: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [241] if(main::check_status_roms_all2_rom_chip#2<8) goto main::check_status_roms_all2_check_status_rom1 -- vbuxx_lt_vbuc1_then_la1 - cpx #8 - bcs !check_status_roms_all2_check_status_rom1+ - jmp check_status_roms_all2_check_status_rom1 - !check_status_roms_all2_check_status_rom1: - // [242] phi from main::check_status_roms_all2_@1 to main::check_status_roms_all2_@return [phi:main::check_status_roms_all2_@1->main::check_status_roms_all2_@return] - // [242] phi main::check_status_roms_all2_return#2 = 1 [phi:main::check_status_roms_all2_@1->main::check_status_roms_all2_@return#0] -- vbuxx=vbuc1 - ldx #1 - // main::check_status_roms_all2_@return - // main::@68 - __b68: - // if(!check_status_smc(STATUS_ISSUE) && !check_status_vera(STATUS_ISSUE) && !check_status_roms_all(STATUS_ISSUE) && - // !check_status_smc(STATUS_ERROR) && !check_status_vera(STATUS_ERROR) && !check_status_roms_all(STATUS_ERROR)) - // [243] if(0!=main::check_status_smc4_return#0) goto main::check_status_smc6 -- 0_neq_vbuz1_then_la1 - lda.z check_status_smc4_return - bne check_status_smc6 - // main::@211 - // [244] if(0==main::check_status_vera1_return#0) goto main::@210 -- 0_eq_vbuz1_then_la1 - lda.z check_status_vera1_return - bne !__b210+ - jmp __b210 - !__b210: - // main::check_status_smc6 - check_status_smc6: + // [269] if(main::check_status_roms2_rom_chip#2<8) goto main::check_status_roms2_check_status_rom1 -- vbum1_lt_vbuc1_then_la1 + lda check_status_roms2_rom_chip + cmp #8 + bcs !check_status_roms2_check_status_rom1+ + jmp check_status_roms2_check_status_rom1 + !check_status_roms2_check_status_rom1: + // [270] phi from main::check_status_roms2_@1 to main::check_status_roms2_@return [phi:main::check_status_roms2_@1->main::check_status_roms2_@return] + // [270] phi main::check_status_roms2_return#2 = 0 [phi:main::check_status_roms2_@1->main::check_status_roms2_@return#0] -- vbum1=vbuc1 + lda #0 + sta check_status_roms2_return + // main::check_status_roms2_@return + // main::@75 + __b75: + // if(!check_status_smc(STATUS_ISSUE) && !check_status_vera(STATUS_ISSUE) && !check_status_roms(STATUS_ISSUE) && + // !check_status_smc(STATUS_ERROR) && !check_status_vera(STATUS_ERROR) && !check_status_roms(STATUS_ERROR)) + // [271] if(0!=main::check_status_smc5_return#0) goto main::check_status_smc7 -- 0_neq_vbum1_then_la1 + lda check_status_smc5_return + bne check_status_smc7 + // main::@232 + // [272] if(0==main::check_status_vera1_return#0) goto main::@231 -- 0_eq_vbum1_then_la1 + lda check_status_vera1_return + bne !__b231+ + jmp __b231 + !__b231: + // main::check_status_smc7 + check_status_smc7: // status_smc == status - // [245] main::check_status_smc6_$0 = status_smc#0 == STATUS_SKIP -- vboaa=vbum1_eq_vbuc1 + // [273] main::check_status_smc7_$0 = status_smc#0 == STATUS_SKIP -- vbom1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_SKIP beq !+ lda #1 !: eor #1 + sta check_status_smc7_main__0 // return (unsigned char)(status_smc == status); - // [246] main::check_status_smc6_return#0 = (char)main::check_status_smc6_$0 -- vbuz1=vbuaa - sta.z check_status_smc6_return + // [274] main::check_status_smc7_return#0 = (char)main::check_status_smc7_$0 // main::check_status_vera3 // status_vera == status - // [247] main::check_status_vera3_$0 = status_vera#0 == STATUS_SKIP -- vboaa=vbum1_eq_vbuc1 + // [275] main::check_status_vera3_$0 = status_vera#0 == STATUS_SKIP -- vbom1=vbum2_eq_vbuc1 lda status_vera eor #STATUS_SKIP beq !+ lda #1 !: eor #1 + sta check_status_vera3_main__0 // return (unsigned char)(status_vera == status); - // [248] main::check_status_vera3_return#0 = (char)main::check_status_vera3_$0 -- vbuyy=vbuaa - tay - // [249] phi from main::check_status_vera3 to main::check_status_roms_all3 [phi:main::check_status_vera3->main::check_status_roms_all3] - // main::check_status_roms_all3 - // [250] phi from main::check_status_roms_all3 to main::check_status_roms_all3_@1 [phi:main::check_status_roms_all3->main::check_status_roms_all3_@1] - // [250] phi main::check_status_roms_all3_rom_chip#2 = 0 [phi:main::check_status_roms_all3->main::check_status_roms_all3_@1#0] -- vbuxx=vbuc1 - ldx #0 - // main::check_status_roms_all3_@1 - check_status_roms_all3___b1: + // [276] main::check_status_vera3_return#0 = (char)main::check_status_vera3_$0 + // [277] phi from main::check_status_vera3 to main::check_status_roms_all1 [phi:main::check_status_vera3->main::check_status_roms_all1] + // main::check_status_roms_all1 + // [278] phi from main::check_status_roms_all1 to main::check_status_roms_all1_@1 [phi:main::check_status_roms_all1->main::check_status_roms_all1_@1] + // [278] phi main::check_status_roms_all1_rom_chip#2 = 0 [phi:main::check_status_roms_all1->main::check_status_roms_all1_@1#0] -- vbum1=vbuc1 + lda #0 + sta check_status_roms_all1_rom_chip + // main::check_status_roms_all1_@1 + check_status_roms_all1___b1: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [251] if(main::check_status_roms_all3_rom_chip#2<8) goto main::check_status_roms_all3_check_status_rom1 -- vbuxx_lt_vbuc1_then_la1 - cpx #8 - bcs !check_status_roms_all3_check_status_rom1+ - jmp check_status_roms_all3_check_status_rom1 - !check_status_roms_all3_check_status_rom1: - // [252] phi from main::check_status_roms_all3_@1 to main::check_status_roms_all3_@return [phi:main::check_status_roms_all3_@1->main::check_status_roms_all3_@return] - // [252] phi main::check_status_roms_all3_return#2 = 1 [phi:main::check_status_roms_all3_@1->main::check_status_roms_all3_@return#0] -- vbuxx=vbuc1 - ldx #1 - // main::check_status_roms_all3_@return - // main::@69 - __b69: + // [279] if(main::check_status_roms_all1_rom_chip#2<8) goto main::check_status_roms_all1_check_status_rom1 -- vbum1_lt_vbuc1_then_la1 + lda check_status_roms_all1_rom_chip + cmp #8 + bcs !check_status_roms_all1_check_status_rom1+ + jmp check_status_roms_all1_check_status_rom1 + !check_status_roms_all1_check_status_rom1: + // [280] phi from main::check_status_roms_all1_@1 to main::check_status_roms_all1_@return [phi:main::check_status_roms_all1_@1->main::check_status_roms_all1_@return] + // [280] phi main::check_status_roms_all1_return#2 = 1 [phi:main::check_status_roms_all1_@1->main::check_status_roms_all1_@return#0] -- vbum1=vbuc1 + lda #1 + sta check_status_roms_all1_return + // main::check_status_roms_all1_@return + // main::@76 + __b76: // if(check_status_smc(STATUS_SKIP) && check_status_vera(STATUS_SKIP) && check_status_roms_all(STATUS_SKIP)) - // [253] if(0==main::check_status_smc6_return#0) goto main::check_status_smc10 -- 0_eq_vbuz1_then_la1 - lda.z check_status_smc6_return - beq check_status_smc10 - // main::@213 - // [254] if(0==main::check_status_vera3_return#0) goto main::check_status_smc10 -- 0_eq_vbuyy_then_la1 - cpy #0 - beq check_status_smc10 - // main::@212 - // [255] if(0!=main::check_status_roms_all3_return#2) goto main::vera_display_set_border_color1 -- 0_neq_vbuxx_then_la1 - cpx #0 + // [281] if(0==main::check_status_smc7_return#0) goto main::check_status_smc11 -- 0_eq_vbum1_then_la1 + lda check_status_smc7_return + beq check_status_smc11 + // main::@234 + // [282] if(0==main::check_status_vera3_return#0) goto main::check_status_smc11 -- 0_eq_vbum1_then_la1 + lda check_status_vera3_return + beq check_status_smc11 + // main::@233 + // [283] if(0!=main::check_status_roms_all1_return#2) goto main::vera_display_set_border_color1 -- 0_neq_vbum1_then_la1 + lda check_status_roms_all1_return beq !vera_display_set_border_color1+ jmp vera_display_set_border_color1 !vera_display_set_border_color1: - // main::check_status_smc10 - check_status_smc10: + // main::check_status_smc11 + check_status_smc11: // status_smc == status - // [256] main::check_status_smc10_$0 = status_smc#0 == STATUS_ERROR -- vboaa=vbum1_eq_vbuc1 + // [284] main::check_status_smc11_$0 = status_smc#0 == STATUS_ERROR -- vboz1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_ERROR beq !+ lda #1 !: eor #1 + sta.z check_status_smc11_main__0 // return (unsigned char)(status_smc == status); - // [257] main::check_status_smc10_return#0 = (char)main::check_status_smc10_$0 -- vbum1=vbuaa - sta check_status_smc10_return + // [285] main::check_status_smc11_return#0 = (char)main::check_status_smc11_$0 // main::check_status_vera4 // status_vera == status - // [258] main::check_status_vera4_$0 = status_vera#0 == STATUS_ERROR -- vboaa=vbum1_eq_vbuc1 + // [286] main::check_status_vera4_$0 = status_vera#0 == STATUS_ERROR -- vboz1=vbum2_eq_vbuc1 lda status_vera eor #STATUS_ERROR beq !+ lda #1 !: eor #1 + sta.z check_status_vera4_main__0 // return (unsigned char)(status_vera == status); - // [259] main::check_status_vera4_return#0 = (char)main::check_status_vera4_$0 -- vbuyy=vbuaa - tay - // [260] phi from main::check_status_vera4 to main::check_status_roms1 [phi:main::check_status_vera4->main::check_status_roms1] - // main::check_status_roms1 - // [261] phi from main::check_status_roms1 to main::check_status_roms1_@1 [phi:main::check_status_roms1->main::check_status_roms1_@1] - // [261] phi main::check_status_roms1_rom_chip#2 = 0 [phi:main::check_status_roms1->main::check_status_roms1_@1#0] -- vbuxx=vbuc1 - ldx #0 - // main::check_status_roms1_@1 - check_status_roms1___b1: + // [287] main::check_status_vera4_return#0 = (char)main::check_status_vera4_$0 + // [288] phi from main::check_status_vera4 to main::check_status_roms3 [phi:main::check_status_vera4->main::check_status_roms3] + // main::check_status_roms3 + // [289] phi from main::check_status_roms3 to main::check_status_roms3_@1 [phi:main::check_status_roms3->main::check_status_roms3_@1] + // [289] phi main::check_status_roms3_rom_chip#2 = 0 [phi:main::check_status_roms3->main::check_status_roms3_@1#0] -- vbum1=vbuc1 + lda #0 + sta check_status_roms3_rom_chip + // main::check_status_roms3_@1 + check_status_roms3___b1: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [262] if(main::check_status_roms1_rom_chip#2<8) goto main::check_status_roms1_check_status_rom1 -- vbuxx_lt_vbuc1_then_la1 - cpx #8 - bcs !check_status_roms1_check_status_rom1+ - jmp check_status_roms1_check_status_rom1 - !check_status_roms1_check_status_rom1: - // [263] phi from main::check_status_roms1_@1 to main::check_status_roms1_@return [phi:main::check_status_roms1_@1->main::check_status_roms1_@return] - // [263] phi main::check_status_roms1_return#2 = STATUS_NONE [phi:main::check_status_roms1_@1->main::check_status_roms1_@return#0] -- vbuxx=vbuc1 - ldx #STATUS_NONE - // main::check_status_roms1_@return - // main::@76 - __b76: + // [290] if(main::check_status_roms3_rom_chip#2<8) goto main::check_status_roms3_check_status_rom1 -- vbum1_lt_vbuc1_then_la1 + lda check_status_roms3_rom_chip + cmp #8 + bcs !check_status_roms3_check_status_rom1+ + jmp check_status_roms3_check_status_rom1 + !check_status_roms3_check_status_rom1: + // [291] phi from main::check_status_roms3_@1 to main::check_status_roms3_@return [phi:main::check_status_roms3_@1->main::check_status_roms3_@return] + // [291] phi main::check_status_roms3_return#2 = 0 [phi:main::check_status_roms3_@1->main::check_status_roms3_@return#0] -- vbum1=vbuc1 + lda #0 + sta check_status_roms3_return + // main::check_status_roms3_@return + // main::@83 + __b83: // if(check_status_smc(STATUS_ERROR) || check_status_vera(STATUS_ERROR) || check_status_roms(STATUS_ERROR)) - // [264] if(0!=main::check_status_smc10_return#0) goto main::vera_display_set_border_color2 -- 0_neq_vbum1_then_la1 - lda check_status_smc10_return + // [292] if(0!=main::check_status_smc11_return#0) goto main::vera_display_set_border_color2 -- 0_neq_vbuz1_then_la1 + lda.z check_status_smc11_return beq !vera_display_set_border_color2+ jmp vera_display_set_border_color2 !vera_display_set_border_color2: - // main::@220 - // [265] if(0!=main::check_status_vera4_return#0) goto main::vera_display_set_border_color2 -- 0_neq_vbuyy_then_la1 - cpy #0 + // main::@241 + // [293] if(0!=main::check_status_vera4_return#0) goto main::vera_display_set_border_color2 -- 0_neq_vbuz1_then_la1 + lda.z check_status_vera4_return beq !vera_display_set_border_color2+ jmp vera_display_set_border_color2 !vera_display_set_border_color2: - // main::@219 - // [266] if(0!=main::check_status_roms1_return#2) goto main::vera_display_set_border_color2 -- 0_neq_vbuxx_then_la1 - cpx #0 + // main::@240 + // [294] if(0!=main::check_status_roms3_return#2) goto main::vera_display_set_border_color2 -- 0_neq_vbum1_then_la1 + lda check_status_roms3_return beq !vera_display_set_border_color2+ jmp vera_display_set_border_color2 !vera_display_set_border_color2: - // main::check_status_smc11 + // main::check_status_smc12 // status_smc == status - // [267] main::check_status_smc11_$0 = status_smc#0 == STATUS_ISSUE -- vboaa=vbum1_eq_vbuc1 + // [295] main::check_status_smc12_$0 = status_smc#0 == STATUS_ISSUE -- vboz1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_ISSUE beq !+ lda #1 !: eor #1 + sta.z check_status_smc12_main__0 // return (unsigned char)(status_smc == status); - // [268] main::check_status_smc11_return#0 = (char)main::check_status_smc11_$0 -- vbum1=vbuaa - sta check_status_smc11_return + // [296] main::check_status_smc12_return#0 = (char)main::check_status_smc12_$0 // main::check_status_vera5 // status_vera == status - // [269] main::check_status_vera5_$0 = status_vera#0 == STATUS_ISSUE -- vboaa=vbum1_eq_vbuc1 + // [297] main::check_status_vera5_$0 = status_vera#0 == STATUS_ISSUE -- vboz1=vbum2_eq_vbuc1 lda status_vera eor #STATUS_ISSUE beq !+ lda #1 !: eor #1 + sta.z check_status_vera5_main__0 // return (unsigned char)(status_vera == status); - // [270] main::check_status_vera5_return#0 = (char)main::check_status_vera5_$0 -- vbuyy=vbuaa - tay - // [271] phi from main::check_status_vera5 to main::check_status_roms2 [phi:main::check_status_vera5->main::check_status_roms2] - // main::check_status_roms2 - // [272] phi from main::check_status_roms2 to main::check_status_roms2_@1 [phi:main::check_status_roms2->main::check_status_roms2_@1] - // [272] phi main::check_status_roms2_rom_chip#2 = 0 [phi:main::check_status_roms2->main::check_status_roms2_@1#0] -- vbuxx=vbuc1 - ldx #0 - // main::check_status_roms2_@1 - check_status_roms2___b1: + // [298] main::check_status_vera5_return#0 = (char)main::check_status_vera5_$0 + // [299] phi from main::check_status_vera5 to main::check_status_roms4 [phi:main::check_status_vera5->main::check_status_roms4] + // main::check_status_roms4 + // [300] phi from main::check_status_roms4 to main::check_status_roms4_@1 [phi:main::check_status_roms4->main::check_status_roms4_@1] + // [300] phi main::check_status_roms4_rom_chip#2 = 0 [phi:main::check_status_roms4->main::check_status_roms4_@1#0] -- vbum1=vbuc1 + lda #0 + sta check_status_roms4_rom_chip + // main::check_status_roms4_@1 + check_status_roms4___b1: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [273] if(main::check_status_roms2_rom_chip#2<8) goto main::check_status_roms2_check_status_rom1 -- vbuxx_lt_vbuc1_then_la1 - cpx #8 - bcs !check_status_roms2_check_status_rom1+ - jmp check_status_roms2_check_status_rom1 - !check_status_roms2_check_status_rom1: - // [274] phi from main::check_status_roms2_@1 to main::check_status_roms2_@return [phi:main::check_status_roms2_@1->main::check_status_roms2_@return] - // [274] phi main::check_status_roms2_return#2 = STATUS_NONE [phi:main::check_status_roms2_@1->main::check_status_roms2_@return#0] -- vbuxx=vbuc1 - ldx #STATUS_NONE - // main::check_status_roms2_@return - // main::@78 - __b78: + // [301] if(main::check_status_roms4_rom_chip#2<8) goto main::check_status_roms4_check_status_rom1 -- vbum1_lt_vbuc1_then_la1 + lda check_status_roms4_rom_chip + cmp #8 + bcs !check_status_roms4_check_status_rom1+ + jmp check_status_roms4_check_status_rom1 + !check_status_roms4_check_status_rom1: + // [302] phi from main::check_status_roms4_@1 to main::check_status_roms4_@return [phi:main::check_status_roms4_@1->main::check_status_roms4_@return] + // [302] phi main::check_status_roms4_return#2 = 0 [phi:main::check_status_roms4_@1->main::check_status_roms4_@return#0] -- vbum1=vbuc1 + lda #0 + sta check_status_roms4_return + // main::check_status_roms4_@return + // main::@85 + __b85: // if(check_status_smc(STATUS_ISSUE) || check_status_vera(STATUS_ISSUE) || check_status_roms(STATUS_ISSUE)) - // [275] if(0!=main::check_status_smc11_return#0) goto main::vera_display_set_border_color3 -- 0_neq_vbum1_then_la1 - lda check_status_smc11_return + // [303] if(0!=main::check_status_smc12_return#0) goto main::vera_display_set_border_color3 -- 0_neq_vbuz1_then_la1 + lda.z check_status_smc12_return beq !vera_display_set_border_color3+ jmp vera_display_set_border_color3 !vera_display_set_border_color3: - // main::@222 - // [276] if(0!=main::check_status_vera5_return#0) goto main::vera_display_set_border_color3 -- 0_neq_vbuyy_then_la1 - cpy #0 + // main::@243 + // [304] if(0!=main::check_status_vera5_return#0) goto main::vera_display_set_border_color3 -- 0_neq_vbuz1_then_la1 + lda.z check_status_vera5_return beq !vera_display_set_border_color3+ jmp vera_display_set_border_color3 !vera_display_set_border_color3: - // main::@221 - // [277] if(0!=main::check_status_roms2_return#2) goto main::vera_display_set_border_color3 -- 0_neq_vbuxx_then_la1 - cpx #0 + // main::@242 + // [305] if(0!=main::check_status_roms4_return#2) goto main::vera_display_set_border_color3 -- 0_neq_vbum1_then_la1 + lda check_status_roms4_return beq !vera_display_set_border_color3+ jmp vera_display_set_border_color3 !vera_display_set_border_color3: // main::vera_display_set_border_color4 // *VERA_CTRL &= ~VERA_DCSEL - // [278] *VERA_CTRL = *VERA_CTRL & ~VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [306] *VERA_CTRL = *VERA_CTRL & ~VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 lda #VERA_DCSEL^$ff and VERA_CTRL sta VERA_CTRL // *VERA_DC_BORDER = color - // [279] *VERA_DC_BORDER = GREEN -- _deref_pbuc1=vbuc2 + // [307] *VERA_DC_BORDER = GREEN -- _deref_pbuc1=vbuc2 lda #GREEN sta VERA_DC_BORDER - // [280] phi from main::vera_display_set_border_color4 to main::@80 [phi:main::vera_display_set_border_color4->main::@80] - // main::@80 + // [308] phi from main::vera_display_set_border_color4 to main::@87 [phi:main::vera_display_set_border_color4->main::@87] + // main::@87 // display_action_progress("Your CX16 update is a success!") - // [281] call display_action_progress - // [812] phi from main::@80 to display_action_progress [phi:main::@80->display_action_progress] - // [812] phi display_action_progress::info_text#15 = main::info_text30 [phi:main::@80->display_action_progress#0] -- pbuz1=pbuc1 - lda #display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text36 [phi:main::@87->display_action_progress#0] -- pbuz1=pbuc1 + lda #info_text30 + lda #>info_text36 sta.z display_action_progress.info_text+1 jsr display_action_progress - // main::check_status_smc12 + // main::check_status_smc13 // status_smc == status - // [282] main::check_status_smc12_$0 = status_smc#0 == STATUS_FLASHED -- vboaa=vbum1_eq_vbuc1 + // [310] main::check_status_smc13_$0 = status_smc#0 == STATUS_FLASHED -- vboz1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_FLASHED beq !+ lda #1 !: eor #1 + sta.z check_status_smc13_main__0 // return (unsigned char)(status_smc == status); - // [283] main::check_status_smc12_return#0 = (char)main::check_status_smc12_$0 - // main::@81 + // [311] main::check_status_smc13_return#0 = (char)main::check_status_smc13_$0 + // main::@88 // if(check_status_smc(STATUS_FLASHED)) - // [284] if(0!=main::check_status_smc12_return#0) goto main::@50 -- 0_neq_vbuaa_then_la1 - cmp #0 - bne __b50 - // [285] phi from main::@81 to main::@6 [phi:main::@81->main::@6] - // main::@6 + // [312] if(0!=main::check_status_smc13_return#0) goto main::@56 -- 0_neq_vbuz1_then_la1 + lda.z check_status_smc13_return + beq !__b56+ + jmp __b56 + !__b56: + // [313] phi from main::@88 to main::@12 [phi:main::@88->main::@12] + // main::@12 // display_progress_text(display_debriefing_text_rom, display_debriefing_count_rom) - // [286] call display_progress_text - // [926] phi from main::@6 to display_progress_text [phi:main::@6->display_progress_text] - // [926] phi display_progress_text::text#10 = display_debriefing_text_rom [phi:main::@6->display_progress_text#0] -- qbuz1=qbuc1 + // [314] call display_progress_text + // [1088] phi from main::@12 to display_progress_text [phi:main::@12->display_progress_text] + // [1088] phi display_progress_text::text#12 = display_debriefing_text_rom [phi:main::@12->display_progress_text#0] -- qbuz1=qbuc1 lda #display_debriefing_text_rom sta.z display_progress_text.text+1 - // [926] phi display_progress_text::lines#11 = display_debriefing_count_rom [phi:main::@6->display_progress_text#1] -- vbuz1=vbuc1 + // [1088] phi display_progress_text::lines#11 = display_debriefing_count_rom [phi:main::@12->display_progress_text#1] -- vbuz1=vbuc1 lda #display_debriefing_count_rom sta.z display_progress_text.lines jsr display_progress_text - // [287] phi from main::@198 main::@6 main::@75 main::@79 to main::@55 [phi:main::@198/main::@6/main::@75/main::@79->main::@55] - __b11: - // [287] phi main::w1#2 = $c8 [phi:main::@198/main::@6/main::@75/main::@79->main::@55#0] -- vbum1=vbuc1 + // [315] phi from main::@12 main::@216 main::@82 main::@86 to main::@61 [phi:main::@12/main::@216/main::@82/main::@86->main::@61] + __b9: + // [315] phi main::w1#2 = $c8 [phi:main::@12/main::@216/main::@82/main::@86->main::@61#0] -- vbum1=vbuc1 lda #$c8 sta w1 - // main::@55 - __b55: + // main::@61 + __b61: // for (unsigned char w=200; w>0; w--) - // [288] if(main::w1#2>0) goto main::@56 -- vbum1_gt_0_then_la1 + // [316] if(main::w1#2>0) goto main::@62 -- vbum1_gt_0_then_la1 lda w1 - bne __b56 - // [289] phi from main::@55 to main::@57 [phi:main::@55->main::@57] - // main::@57 + bne __b62 + // [317] phi from main::@61 to main::@63 [phi:main::@61->main::@63] + // main::@63 // system_reset() - // [290] call system_reset - // [1155] phi from main::@57 to system_reset [phi:main::@57->system_reset] + // [318] call system_reset + // [1241] phi from main::@63 to system_reset [phi:main::@63->system_reset] jsr system_reset // main::@return // } - // [291] return + // [319] return rts - // [292] phi from main::@55 to main::@56 [phi:main::@55->main::@56] - // main::@56 - __b56: + // [320] phi from main::@61 to main::@62 [phi:main::@61->main::@62] + // main::@62 + __b62: // wait_moment() - // [293] call wait_moment - // [1160] phi from main::@56 to wait_moment [phi:main::@56->wait_moment] + // [321] call wait_moment + // [1246] phi from main::@62 to wait_moment [phi:main::@62->wait_moment] jsr wait_moment - // [294] phi from main::@56 to main::@199 [phi:main::@56->main::@199] - // main::@199 + // [322] phi from main::@62 to main::@217 [phi:main::@62->main::@217] + // main::@217 // sprintf(info_text, "(%u) Your CX16 will reset ...", w) - // [295] call snprintf_init - // [982] phi from main::@199 to snprintf_init [phi:main::@199->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@199->snprintf_init#0] -- pbuz1=pbuc1 + // [323] call snprintf_init + // [1014] phi from main::@217 to snprintf_init [phi:main::@217->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@217->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [296] phi from main::@199 to main::@200 [phi:main::@199->main::@200] - // main::@200 + // [324] phi from main::@217 to main::@218 [phi:main::@217->main::@218] + // main::@218 // sprintf(info_text, "(%u) Your CX16 will reset ...", w) - // [297] call printf_str - // [987] phi from main::@200 to printf_str [phi:main::@200->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@200->printf_str#0] -- pprz1=pprc1 + // [325] call printf_str + // [1019] phi from main::@218 to printf_str [phi:main::@218->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@218->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s17 [phi:main::@200->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s17 [phi:main::@218->printf_str#1] -- pbuz1=pbuc1 lda #s17 sta.z printf_str.s+1 jsr printf_str - // main::@201 + // main::@219 // sprintf(info_text, "(%u) Your CX16 will reset ...", w) - // [298] printf_uchar::uvalue#13 = main::w1#2 -- vbuxx=vbum1 - ldx w1 - // [299] call printf_uchar - // [1165] phi from main::@201 to printf_uchar [phi:main::@201->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 0 [phi:main::@201->printf_uchar#0] -- vbuz1=vbuc1 + // [326] printf_uchar::uvalue#13 = main::w1#2 -- vbuz1=vbum2 + lda w1 + sta.z printf_uchar.uvalue + // [327] call printf_uchar + // [1251] phi from main::@219 to printf_uchar [phi:main::@219->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 0 [phi:main::@219->printf_uchar#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 0 [phi:main::@201->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 0 [phi:main::@219->printf_uchar#1] -- vbuz1=vbuc1 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:main::@201->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:main::@219->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = DECIMAL [phi:main::@201->printf_uchar#3] -- vbuyy=vbuc1 - ldy #DECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#13 [phi:main::@201->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = DECIMAL [phi:main::@219->printf_uchar#3] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#13 [phi:main::@219->printf_uchar#4] -- register_copy jsr printf_uchar - // [300] phi from main::@201 to main::@202 [phi:main::@201->main::@202] - // main::@202 + // [328] phi from main::@219 to main::@220 [phi:main::@219->main::@220] + // main::@220 // sprintf(info_text, "(%u) Your CX16 will reset ...", w) - // [301] call printf_str - // [987] phi from main::@202 to printf_str [phi:main::@202->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@202->printf_str#0] -- pprz1=pprc1 + // [329] call printf_str + // [1019] phi from main::@220 to printf_str [phi:main::@220->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@220->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s21 [phi:main::@202->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s21 [phi:main::@220->printf_str#1] -- pbuz1=pbuc1 lda #s21 sta.z printf_str.s+1 jsr printf_str - // main::@203 + // main::@221 // sprintf(info_text, "(%u) Your CX16 will reset ...", w) - // [302] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [330] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [303] callexecute snputc -- call_vprc1 + // [331] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [305] call display_action_text - // [1176] phi from main::@203 to display_action_text [phi:main::@203->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:main::@203->display_action_text#0] -- pbuz1=pbuc1 + // [333] call display_action_text + // [1262] phi from main::@221 to display_action_text [phi:main::@221->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:main::@221->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text sta.z display_action_text.info_text+1 jsr display_action_text - // main::@204 + // main::@222 // for (unsigned char w=200; w>0; w--) - // [306] main::w1#1 = -- main::w1#2 -- vbum1=_dec_vbum1 + // [334] main::w1#1 = -- main::w1#2 -- vbum1=_dec_vbum1 dec w1 - // [287] phi from main::@204 to main::@55 [phi:main::@204->main::@55] - // [287] phi main::w1#2 = main::w1#1 [phi:main::@204->main::@55#0] -- register_copy - jmp __b55 - // [307] phi from main::@81 to main::@50 [phi:main::@81->main::@50] - // main::@50 - __b50: + // [315] phi from main::@222 to main::@61 [phi:main::@222->main::@61] + // [315] phi main::w1#2 = main::w1#1 [phi:main::@222->main::@61#0] -- register_copy + jmp __b61 + // [335] phi from main::@88 to main::@56 [phi:main::@88->main::@56] + // main::@56 + __b56: // display_progress_text(display_debriefing_text_smc, display_debriefing_count_smc) - // [308] call display_progress_text - // [926] phi from main::@50 to display_progress_text [phi:main::@50->display_progress_text] - // [926] phi display_progress_text::text#10 = display_debriefing_text_smc [phi:main::@50->display_progress_text#0] -- qbuz1=qbuc1 + // [336] call display_progress_text + // [1088] phi from main::@56 to display_progress_text [phi:main::@56->display_progress_text] + // [1088] phi display_progress_text::text#12 = display_debriefing_text_smc [phi:main::@56->display_progress_text#0] -- qbuz1=qbuc1 lda #display_debriefing_text_smc sta.z display_progress_text.text+1 - // [926] phi display_progress_text::lines#11 = display_debriefing_count_smc [phi:main::@50->display_progress_text#1] -- vbuz1=vbuc1 + // [1088] phi display_progress_text::lines#11 = display_debriefing_count_smc [phi:main::@56->display_progress_text#1] -- vbuz1=vbuc1 lda #display_debriefing_count_smc sta.z display_progress_text.lines jsr display_progress_text - // [309] phi from main::@50 to main::@51 [phi:main::@50->main::@51] - // [309] phi main::w#2 = $f0 [phi:main::@50->main::@51#0] -- vbum1=vbuc1 + // [337] phi from main::@56 to main::@57 [phi:main::@56->main::@57] + // [337] phi main::w#2 = $f0 [phi:main::@56->main::@57#0] -- vbum1=vbuc1 lda #$f0 sta w - // main::@51 - __b51: + // main::@57 + __b57: // for (unsigned char w=240; w>0; w--) - // [310] if(main::w#2>0) goto main::@52 -- vbum1_gt_0_then_la1 + // [338] if(main::w#2>0) goto main::@58 -- vbum1_gt_0_then_la1 lda w - bne __b52 - // [311] phi from main::@51 to main::@53 [phi:main::@51->main::@53] - // main::@53 + bne __b58 + // [339] phi from main::@57 to main::@59 [phi:main::@57->main::@59] + // main::@59 // sprintf(info_text, "Please disconnect your CX16 from power source ...") - // [312] call snprintf_init - // [982] phi from main::@53 to snprintf_init [phi:main::@53->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@53->snprintf_init#0] -- pbuz1=pbuc1 + // [340] call snprintf_init + // [1014] phi from main::@59 to snprintf_init [phi:main::@59->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@59->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [313] phi from main::@53 to main::@196 [phi:main::@53->main::@196] - // main::@196 + // [341] phi from main::@59 to main::@214 [phi:main::@59->main::@214] + // main::@214 // sprintf(info_text, "Please disconnect your CX16 from power source ...") - // [314] call printf_str - // [987] phi from main::@196 to printf_str [phi:main::@196->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@196->printf_str#0] -- pprz1=pprc1 + // [342] call printf_str + // [1019] phi from main::@214 to printf_str [phi:main::@214->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@214->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s19 [phi:main::@196->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s19 [phi:main::@214->printf_str#1] -- pbuz1=pbuc1 lda #s19 sta.z printf_str.s+1 jsr printf_str - // main::@197 + // main::@215 // sprintf(info_text, "Please disconnect your CX16 from power source ...") - // [315] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [343] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [316] callexecute snputc -- call_vprc1 + // [344] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [318] call display_action_text - // [1176] phi from main::@197 to display_action_text [phi:main::@197->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:main::@197->display_action_text#0] -- pbuz1=pbuc1 + // [346] call display_action_text + // [1262] phi from main::@215 to display_action_text [phi:main::@215->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:main::@215->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text sta.z display_action_text.info_text+1 jsr display_action_text - // [319] phi from main::@197 to main::@198 [phi:main::@197->main::@198] - // main::@198 + // [347] phi from main::@215 to main::@216 [phi:main::@215->main::@216] + // main::@216 // smc_reset() - // [320] call smc_reset - // [1190] phi from main::@198 to smc_reset [phi:main::@198->smc_reset] + // [348] call smc_reset + // [1276] phi from main::@216 to smc_reset [phi:main::@216->smc_reset] jsr smc_reset - jmp __b11 - // [321] phi from main::@51 to main::@52 [phi:main::@51->main::@52] - // main::@52 - __b52: + jmp __b9 + // [349] phi from main::@57 to main::@58 [phi:main::@57->main::@58] + // main::@58 + __b58: // wait_moment() - // [322] call wait_moment - // [1160] phi from main::@52 to wait_moment [phi:main::@52->wait_moment] + // [350] call wait_moment + // [1246] phi from main::@58 to wait_moment [phi:main::@58->wait_moment] jsr wait_moment - // [323] phi from main::@52 to main::@190 [phi:main::@52->main::@190] - // main::@190 + // [351] phi from main::@58 to main::@208 [phi:main::@58->main::@208] + // main::@208 // sprintf(info_text, "(%u) Please read carefully the below ...", w) - // [324] call snprintf_init - // [982] phi from main::@190 to snprintf_init [phi:main::@190->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@190->snprintf_init#0] -- pbuz1=pbuc1 + // [352] call snprintf_init + // [1014] phi from main::@208 to snprintf_init [phi:main::@208->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@208->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [325] phi from main::@190 to main::@191 [phi:main::@190->main::@191] - // main::@191 + // [353] phi from main::@208 to main::@209 [phi:main::@208->main::@209] + // main::@209 // sprintf(info_text, "(%u) Please read carefully the below ...", w) - // [326] call printf_str - // [987] phi from main::@191 to printf_str [phi:main::@191->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@191->printf_str#0] -- pprz1=pprc1 + // [354] call printf_str + // [1019] phi from main::@209 to printf_str [phi:main::@209->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@209->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s17 [phi:main::@191->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s17 [phi:main::@209->printf_str#1] -- pbuz1=pbuc1 lda #s17 sta.z printf_str.s+1 jsr printf_str - // main::@192 + // main::@210 // sprintf(info_text, "(%u) Please read carefully the below ...", w) - // [327] printf_uchar::uvalue#12 = main::w#2 -- vbuxx=vbum1 - ldx w - // [328] call printf_uchar - // [1165] phi from main::@192 to printf_uchar [phi:main::@192->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 0 [phi:main::@192->printf_uchar#0] -- vbuz1=vbuc1 + // [355] printf_uchar::uvalue#12 = main::w#2 -- vbuz1=vbum2 + lda w + sta.z printf_uchar.uvalue + // [356] call printf_uchar + // [1251] phi from main::@210 to printf_uchar [phi:main::@210->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 0 [phi:main::@210->printf_uchar#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 0 [phi:main::@192->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 0 [phi:main::@210->printf_uchar#1] -- vbuz1=vbuc1 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:main::@192->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:main::@210->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = DECIMAL [phi:main::@192->printf_uchar#3] -- vbuyy=vbuc1 - ldy #DECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#12 [phi:main::@192->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = DECIMAL [phi:main::@210->printf_uchar#3] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#12 [phi:main::@210->printf_uchar#4] -- register_copy jsr printf_uchar - // [329] phi from main::@192 to main::@193 [phi:main::@192->main::@193] - // main::@193 + // [357] phi from main::@210 to main::@211 [phi:main::@210->main::@211] + // main::@211 // sprintf(info_text, "(%u) Please read carefully the below ...", w) - // [330] call printf_str - // [987] phi from main::@193 to printf_str [phi:main::@193->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@193->printf_str#0] -- pprz1=pprc1 + // [358] call printf_str + // [1019] phi from main::@211 to printf_str [phi:main::@211->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@211->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s18 [phi:main::@193->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s18 [phi:main::@211->printf_str#1] -- pbuz1=pbuc1 lda #s18 sta.z printf_str.s+1 jsr printf_str - // main::@194 + // main::@212 // sprintf(info_text, "(%u) Please read carefully the below ...", w) - // [331] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [359] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [332] callexecute snputc -- call_vprc1 + // [360] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [334] call display_action_text - // [1176] phi from main::@194 to display_action_text [phi:main::@194->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:main::@194->display_action_text#0] -- pbuz1=pbuc1 + // [362] call display_action_text + // [1262] phi from main::@212 to display_action_text [phi:main::@212->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:main::@212->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text sta.z display_action_text.info_text+1 jsr display_action_text - // main::@195 + // main::@213 // for (unsigned char w=240; w>0; w--) - // [335] main::w#1 = -- main::w#2 -- vbum1=_dec_vbum1 + // [363] main::w#1 = -- main::w#2 -- vbum1=_dec_vbum1 dec w - // [309] phi from main::@195 to main::@51 [phi:main::@195->main::@51] - // [309] phi main::w#2 = main::w#1 [phi:main::@195->main::@51#0] -- register_copy - jmp __b51 + // [337] phi from main::@213 to main::@57 [phi:main::@213->main::@57] + // [337] phi main::w#2 = main::w#1 [phi:main::@213->main::@57#0] -- register_copy + jmp __b57 // main::vera_display_set_border_color3 vera_display_set_border_color3: // *VERA_CTRL &= ~VERA_DCSEL - // [336] *VERA_CTRL = *VERA_CTRL & ~VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [364] *VERA_CTRL = *VERA_CTRL & ~VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 lda #VERA_DCSEL^$ff and VERA_CTRL sta VERA_CTRL // *VERA_DC_BORDER = color - // [337] *VERA_DC_BORDER = YELLOW -- _deref_pbuc1=vbuc2 + // [365] *VERA_DC_BORDER = YELLOW -- _deref_pbuc1=vbuc2 lda #YELLOW sta VERA_DC_BORDER - // [338] phi from main::vera_display_set_border_color3 to main::@79 [phi:main::vera_display_set_border_color3->main::@79] - // main::@79 + // [366] phi from main::vera_display_set_border_color3 to main::@86 [phi:main::vera_display_set_border_color3->main::@86] + // main::@86 // display_action_progress("Update issues, your CX16 is not updated!") - // [339] call display_action_progress - // [812] phi from main::@79 to display_action_progress [phi:main::@79->display_action_progress] - // [812] phi display_action_progress::info_text#15 = main::info_text29 [phi:main::@79->display_action_progress#0] -- pbuz1=pbuc1 - lda #display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text35 [phi:main::@86->display_action_progress#0] -- pbuz1=pbuc1 + lda #info_text29 + lda #>info_text35 sta.z display_action_progress.info_text+1 jsr display_action_progress - jmp __b11 - // main::check_status_roms2_check_status_rom1 - check_status_roms2_check_status_rom1: + jmp __b9 + // main::check_status_roms4_check_status_rom1 + check_status_roms4_check_status_rom1: // status_rom[rom_chip] == status - // [340] main::check_status_roms2_check_status_rom1_$0 = status_rom[main::check_status_roms2_rom_chip#2] == STATUS_ISSUE -- vboaa=pbuc1_derefidx_vbuxx_eq_vbuc2 + // [368] main::check_status_roms4_check_status_rom1_$0 = status_rom[main::check_status_roms4_rom_chip#2] == STATUS_ISSUE -- vboz1=pbuc1_derefidx_vbum2_eq_vbuc2 lda #STATUS_ISSUE - eor status_rom,x + ldy check_status_roms4_rom_chip + eor status_rom,y beq !+ lda #1 !: eor #1 + sta.z check_status_roms4_check_status_rom1_main__0 // return (unsigned char)(status_rom[rom_chip] == status); - // [341] main::check_status_roms2_check_status_rom1_return#0 = (char)main::check_status_roms2_check_status_rom1_$0 - // main::check_status_roms2_@11 + // [369] main::check_status_roms4_check_status_rom1_return#0 = (char)main::check_status_roms4_check_status_rom1_$0 + // main::check_status_roms4_@11 // if(check_status_rom(rom_chip, status)) - // [342] if(0==main::check_status_roms2_check_status_rom1_return#0) goto main::check_status_roms2_@4 -- 0_eq_vbuaa_then_la1 - cmp #0 - beq check_status_roms2___b4 - // [274] phi from main::check_status_roms2_@11 to main::check_status_roms2_@return [phi:main::check_status_roms2_@11->main::check_status_roms2_@return] - // [274] phi main::check_status_roms2_return#2 = STATUS_ISSUE [phi:main::check_status_roms2_@11->main::check_status_roms2_@return#0] -- vbuxx=vbuc1 - ldx #STATUS_ISSUE - jmp __b78 - // main::check_status_roms2_@4 - check_status_roms2___b4: + // [370] if(0==main::check_status_roms4_check_status_rom1_return#0) goto main::check_status_roms4_@4 -- 0_eq_vbuz1_then_la1 + lda.z check_status_roms4_check_status_rom1_return + beq check_status_roms4___b4 + // [302] phi from main::check_status_roms4_@11 to main::check_status_roms4_@return [phi:main::check_status_roms4_@11->main::check_status_roms4_@return] + // [302] phi main::check_status_roms4_return#2 = 1 [phi:main::check_status_roms4_@11->main::check_status_roms4_@return#0] -- vbum1=vbuc1 + lda #1 + sta check_status_roms4_return + jmp __b85 + // main::check_status_roms4_@4 + check_status_roms4___b4: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [343] main::check_status_roms2_rom_chip#1 = ++ main::check_status_roms2_rom_chip#2 -- vbuxx=_inc_vbuxx - inx - // [272] phi from main::check_status_roms2_@4 to main::check_status_roms2_@1 [phi:main::check_status_roms2_@4->main::check_status_roms2_@1] - // [272] phi main::check_status_roms2_rom_chip#2 = main::check_status_roms2_rom_chip#1 [phi:main::check_status_roms2_@4->main::check_status_roms2_@1#0] -- register_copy - jmp check_status_roms2___b1 + // [371] main::check_status_roms4_rom_chip#1 = ++ main::check_status_roms4_rom_chip#2 -- vbum1=_inc_vbum1 + inc check_status_roms4_rom_chip + // [300] phi from main::check_status_roms4_@4 to main::check_status_roms4_@1 [phi:main::check_status_roms4_@4->main::check_status_roms4_@1] + // [300] phi main::check_status_roms4_rom_chip#2 = main::check_status_roms4_rom_chip#1 [phi:main::check_status_roms4_@4->main::check_status_roms4_@1#0] -- register_copy + jmp check_status_roms4___b1 // main::vera_display_set_border_color2 vera_display_set_border_color2: // *VERA_CTRL &= ~VERA_DCSEL - // [344] *VERA_CTRL = *VERA_CTRL & ~VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [372] *VERA_CTRL = *VERA_CTRL & ~VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 lda #VERA_DCSEL^$ff and VERA_CTRL sta VERA_CTRL // *VERA_DC_BORDER = color - // [345] *VERA_DC_BORDER = RED -- _deref_pbuc1=vbuc2 + // [373] *VERA_DC_BORDER = RED -- _deref_pbuc1=vbuc2 lda #RED sta VERA_DC_BORDER - // [346] phi from main::vera_display_set_border_color2 to main::@77 [phi:main::vera_display_set_border_color2->main::@77] - // main::@77 + // [374] phi from main::vera_display_set_border_color2 to main::@84 [phi:main::vera_display_set_border_color2->main::@84] + // main::@84 // display_action_progress("Update Failure! Your CX16 may be bricked!") - // [347] call display_action_progress - // [812] phi from main::@77 to display_action_progress [phi:main::@77->display_action_progress] - // [812] phi display_action_progress::info_text#15 = main::info_text27 [phi:main::@77->display_action_progress#0] -- pbuz1=pbuc1 - lda #display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text33 [phi:main::@84->display_action_progress#0] -- pbuz1=pbuc1 + lda #info_text27 + lda #>info_text33 sta.z display_action_progress.info_text+1 jsr display_action_progress - // [348] phi from main::@77 to main::@189 [phi:main::@77->main::@189] - // main::@189 + // [376] phi from main::@84 to main::@207 [phi:main::@84->main::@207] + // main::@207 // display_action_text("Take a foto of this screen. And shut down power ...") - // [349] call display_action_text - // [1176] phi from main::@189 to display_action_text [phi:main::@189->display_action_text] - // [1176] phi display_action_text::info_text#19 = main::info_text28 [phi:main::@189->display_action_text#0] -- pbuz1=pbuc1 - lda #display_action_text] + // [1262] phi display_action_text::info_text#19 = main::info_text34 [phi:main::@207->display_action_text#0] -- pbuz1=pbuc1 + lda #info_text28 + lda #>info_text34 sta.z display_action_text.info_text+1 jsr display_action_text - // [350] phi from main::@189 main::@54 to main::@54 [phi:main::@189/main::@54->main::@54] - // main::@54 - __b54: - jmp __b54 - // main::check_status_roms1_check_status_rom1 - check_status_roms1_check_status_rom1: + // [378] phi from main::@207 main::@60 to main::@60 [phi:main::@207/main::@60->main::@60] + // main::@60 + __b60: + jmp __b60 + // main::check_status_roms3_check_status_rom1 + check_status_roms3_check_status_rom1: // status_rom[rom_chip] == status - // [351] main::check_status_roms1_check_status_rom1_$0 = status_rom[main::check_status_roms1_rom_chip#2] == STATUS_ERROR -- vboaa=pbuc1_derefidx_vbuxx_eq_vbuc2 + // [379] main::check_status_roms3_check_status_rom1_$0 = status_rom[main::check_status_roms3_rom_chip#2] == STATUS_ERROR -- vbom1=pbuc1_derefidx_vbum2_eq_vbuc2 lda #STATUS_ERROR - eor status_rom,x + ldy check_status_roms3_rom_chip + eor status_rom,y beq !+ lda #1 !: eor #1 + sta check_status_roms3_check_status_rom1_main__0 // return (unsigned char)(status_rom[rom_chip] == status); - // [352] main::check_status_roms1_check_status_rom1_return#0 = (char)main::check_status_roms1_check_status_rom1_$0 - // main::check_status_roms1_@11 + // [380] main::check_status_roms3_check_status_rom1_return#0 = (char)main::check_status_roms3_check_status_rom1_$0 + // main::check_status_roms3_@11 // if(check_status_rom(rom_chip, status)) - // [353] if(0==main::check_status_roms1_check_status_rom1_return#0) goto main::check_status_roms1_@4 -- 0_eq_vbuaa_then_la1 - cmp #0 - beq check_status_roms1___b4 - // [263] phi from main::check_status_roms1_@11 to main::check_status_roms1_@return [phi:main::check_status_roms1_@11->main::check_status_roms1_@return] - // [263] phi main::check_status_roms1_return#2 = STATUS_ERROR [phi:main::check_status_roms1_@11->main::check_status_roms1_@return#0] -- vbuxx=vbuc1 - ldx #STATUS_ERROR - jmp __b76 - // main::check_status_roms1_@4 - check_status_roms1___b4: + // [381] if(0==main::check_status_roms3_check_status_rom1_return#0) goto main::check_status_roms3_@4 -- 0_eq_vbum1_then_la1 + lda check_status_roms3_check_status_rom1_return + beq check_status_roms3___b4 + // [291] phi from main::check_status_roms3_@11 to main::check_status_roms3_@return [phi:main::check_status_roms3_@11->main::check_status_roms3_@return] + // [291] phi main::check_status_roms3_return#2 = 1 [phi:main::check_status_roms3_@11->main::check_status_roms3_@return#0] -- vbum1=vbuc1 + lda #1 + sta check_status_roms3_return + jmp __b83 + // main::check_status_roms3_@4 + check_status_roms3___b4: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [354] main::check_status_roms1_rom_chip#1 = ++ main::check_status_roms1_rom_chip#2 -- vbuxx=_inc_vbuxx - inx - // [261] phi from main::check_status_roms1_@4 to main::check_status_roms1_@1 [phi:main::check_status_roms1_@4->main::check_status_roms1_@1] - // [261] phi main::check_status_roms1_rom_chip#2 = main::check_status_roms1_rom_chip#1 [phi:main::check_status_roms1_@4->main::check_status_roms1_@1#0] -- register_copy - jmp check_status_roms1___b1 + // [382] main::check_status_roms3_rom_chip#1 = ++ main::check_status_roms3_rom_chip#2 -- vbum1=_inc_vbum1 + inc check_status_roms3_rom_chip + // [289] phi from main::check_status_roms3_@4 to main::check_status_roms3_@1 [phi:main::check_status_roms3_@4->main::check_status_roms3_@1] + // [289] phi main::check_status_roms3_rom_chip#2 = main::check_status_roms3_rom_chip#1 [phi:main::check_status_roms3_@4->main::check_status_roms3_@1#0] -- register_copy + jmp check_status_roms3___b1 // main::vera_display_set_border_color1 vera_display_set_border_color1: // *VERA_CTRL &= ~VERA_DCSEL - // [355] *VERA_CTRL = *VERA_CTRL & ~VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [383] *VERA_CTRL = *VERA_CTRL & ~VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 lda #VERA_DCSEL^$ff and VERA_CTRL sta VERA_CTRL // *VERA_DC_BORDER = color - // [356] *VERA_DC_BORDER = BLACK -- _deref_pbuc1=vbuc2 + // [384] *VERA_DC_BORDER = BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta VERA_DC_BORDER - // [357] phi from main::vera_display_set_border_color1 to main::@75 [phi:main::vera_display_set_border_color1->main::@75] - // main::@75 + // [385] phi from main::vera_display_set_border_color1 to main::@82 [phi:main::vera_display_set_border_color1->main::@82] + // main::@82 // display_action_progress("The update has been cancelled!") - // [358] call display_action_progress - // [812] phi from main::@75 to display_action_progress [phi:main::@75->display_action_progress] - // [812] phi display_action_progress::info_text#15 = main::info_text26 [phi:main::@75->display_action_progress#0] -- pbuz1=pbuc1 - lda #display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text32 [phi:main::@82->display_action_progress#0] -- pbuz1=pbuc1 + lda #info_text26 + lda #>info_text32 sta.z display_action_progress.info_text+1 jsr display_action_progress - jmp __b11 - // main::check_status_roms_all3_check_status_rom1 - check_status_roms_all3_check_status_rom1: + jmp __b9 + // main::check_status_roms_all1_check_status_rom1 + check_status_roms_all1_check_status_rom1: // status_rom[rom_chip] == status - // [359] main::check_status_roms_all3_check_status_rom1_$0 = status_rom[main::check_status_roms_all3_rom_chip#2] == STATUS_SKIP -- vboaa=pbuc1_derefidx_vbuxx_eq_vbuc2 + // [387] main::check_status_roms_all1_check_status_rom1_$0 = status_rom[main::check_status_roms_all1_rom_chip#2] == STATUS_SKIP -- vbom1=pbuc1_derefidx_vbum2_eq_vbuc2 lda #STATUS_SKIP - eor status_rom,x + ldy check_status_roms_all1_rom_chip + eor status_rom,y beq !+ lda #1 !: eor #1 + sta check_status_roms_all1_check_status_rom1_main__0 // return (unsigned char)(status_rom[rom_chip] == status); - // [360] main::check_status_roms_all3_check_status_rom1_return#0 = (char)main::check_status_roms_all3_check_status_rom1_$0 - // main::check_status_roms_all3_@11 + // [388] main::check_status_roms_all1_check_status_rom1_return#0 = (char)main::check_status_roms_all1_check_status_rom1_$0 + // main::check_status_roms_all1_@11 // if(check_status_rom(rom_chip, status) != status) - // [361] if(main::check_status_roms_all3_check_status_rom1_return#0==STATUS_SKIP) goto main::check_status_roms_all3_@4 -- vbuaa_eq_vbuc1_then_la1 - cmp #STATUS_SKIP - beq check_status_roms_all3___b4 - // [252] phi from main::check_status_roms_all3_@11 to main::check_status_roms_all3_@return [phi:main::check_status_roms_all3_@11->main::check_status_roms_all3_@return] - // [252] phi main::check_status_roms_all3_return#2 = 0 [phi:main::check_status_roms_all3_@11->main::check_status_roms_all3_@return#0] -- vbuxx=vbuc1 - ldx #0 - jmp __b69 - // main::check_status_roms_all3_@4 - check_status_roms_all3___b4: + // [389] if(main::check_status_roms_all1_check_status_rom1_return#0==STATUS_SKIP) goto main::check_status_roms_all1_@4 -- vbum1_eq_vbuc1_then_la1 + lda #STATUS_SKIP + cmp check_status_roms_all1_check_status_rom1_return + beq check_status_roms_all1___b4 + // [280] phi from main::check_status_roms_all1_@11 to main::check_status_roms_all1_@return [phi:main::check_status_roms_all1_@11->main::check_status_roms_all1_@return] + // [280] phi main::check_status_roms_all1_return#2 = 0 [phi:main::check_status_roms_all1_@11->main::check_status_roms_all1_@return#0] -- vbum1=vbuc1 + lda #0 + sta check_status_roms_all1_return + jmp __b76 + // main::check_status_roms_all1_@4 + check_status_roms_all1___b4: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [362] main::check_status_roms_all3_rom_chip#1 = ++ main::check_status_roms_all3_rom_chip#2 -- vbuxx=_inc_vbuxx - inx - // [250] phi from main::check_status_roms_all3_@4 to main::check_status_roms_all3_@1 [phi:main::check_status_roms_all3_@4->main::check_status_roms_all3_@1] - // [250] phi main::check_status_roms_all3_rom_chip#2 = main::check_status_roms_all3_rom_chip#1 [phi:main::check_status_roms_all3_@4->main::check_status_roms_all3_@1#0] -- register_copy - jmp check_status_roms_all3___b1 - // main::@210 - __b210: - // if(!check_status_smc(STATUS_ISSUE) && !check_status_vera(STATUS_ISSUE) && !check_status_roms_all(STATUS_ISSUE) && - // !check_status_smc(STATUS_ERROR) && !check_status_vera(STATUS_ERROR) && !check_status_roms_all(STATUS_ERROR)) - // [363] if(0!=main::check_status_roms_all1_return#2) goto main::check_status_smc6 -- 0_neq_vbum1_then_la1 - lda check_status_roms_all1_return - beq !check_status_smc6+ - jmp check_status_smc6 - !check_status_smc6: - // main::@209 - // [364] if(0==main::check_status_smc5_return#0) goto main::@208 -- 0_eq_vbuz1_then_la1 - lda.z check_status_smc5_return - beq __b208 - jmp check_status_smc6 - // main::@208 - __b208: - // [365] if(0!=main::check_status_vera2_return#0) goto main::check_status_smc6 -- 0_neq_vbuyy_then_la1 - cpy #0 - beq !check_status_smc6+ - jmp check_status_smc6 - !check_status_smc6: - // main::@207 - // [366] if(0==main::check_status_roms_all2_return#2) goto main::check_status_smc7 -- 0_eq_vbuxx_then_la1 - cpx #0 - beq check_status_smc7 - jmp check_status_smc6 - // main::check_status_smc7 - check_status_smc7: + // [390] main::check_status_roms_all1_rom_chip#1 = ++ main::check_status_roms_all1_rom_chip#2 -- vbum1=_inc_vbum1 + inc check_status_roms_all1_rom_chip + // [278] phi from main::check_status_roms_all1_@4 to main::check_status_roms_all1_@1 [phi:main::check_status_roms_all1_@4->main::check_status_roms_all1_@1] + // [278] phi main::check_status_roms_all1_rom_chip#2 = main::check_status_roms_all1_rom_chip#1 [phi:main::check_status_roms_all1_@4->main::check_status_roms_all1_@1#0] -- register_copy + jmp check_status_roms_all1___b1 + // main::@231 + __b231: + // if(!check_status_smc(STATUS_ISSUE) && !check_status_vera(STATUS_ISSUE) && !check_status_roms(STATUS_ISSUE) && + // !check_status_smc(STATUS_ERROR) && !check_status_vera(STATUS_ERROR) && !check_status_roms(STATUS_ERROR)) + // [391] if(0!=main::check_status_roms1_return#2) goto main::check_status_smc7 -- 0_neq_vbum1_then_la1 + lda check_status_roms1_return + beq !check_status_smc7+ + jmp check_status_smc7 + !check_status_smc7: + // main::@230 + // [392] if(0==main::check_status_smc6_return#0) goto main::@229 -- 0_eq_vbuz1_then_la1 + lda.z check_status_smc6_return + beq __b229 + jmp check_status_smc7 + // main::@229 + __b229: + // [393] if(0!=main::check_status_vera2_return#0) goto main::check_status_smc7 -- 0_neq_vbuz1_then_la1 + lda.z check_status_vera2_return + beq !check_status_smc7+ + jmp check_status_smc7 + !check_status_smc7: + // main::@228 + // [394] if(0==main::check_status_roms2_return#2) goto main::check_status_smc8 -- 0_eq_vbum1_then_la1 + lda check_status_roms2_return + beq check_status_smc8 + jmp check_status_smc7 + // main::check_status_smc8 + check_status_smc8: // status_smc == status - // [367] main::check_status_smc7_$0 = status_smc#0 == STATUS_FLASH -- vboaa=vbum1_eq_vbuc1 + // [395] main::check_status_smc8_$0 = status_smc#0 == STATUS_FLASH -- vbom1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_FLASH beq !+ lda #1 !: eor #1 + sta check_status_smc8_main__0 // return (unsigned char)(status_smc == status); - // [368] main::check_status_smc7_return#0 = (char)main::check_status_smc7_$0 -- vbum1=vbuaa - sta check_status_smc7_return - // [369] phi from main::check_status_smc7 to main::check_status_cx16_rom3 [phi:main::check_status_smc7->main::check_status_cx16_rom3] - // main::check_status_cx16_rom3 - // main::check_status_cx16_rom3_check_status_rom1 + // [396] main::check_status_smc8_return#0 = (char)main::check_status_smc8_$0 + // [397] phi from main::check_status_smc8 to main::check_status_cx16_rom4 [phi:main::check_status_smc8->main::check_status_cx16_rom4] + // main::check_status_cx16_rom4 + // main::check_status_cx16_rom4_check_status_rom1 // status_rom[rom_chip] == status - // [370] main::check_status_cx16_rom3_check_status_rom1_$0 = *status_rom == STATUS_FLASH -- vboaa=_deref_pbuc1_eq_vbuc2 + // [398] main::check_status_cx16_rom4_check_status_rom1_$0 = *status_rom == STATUS_FLASH -- vboz1=_deref_pbuc1_eq_vbuc2 lda status_rom eor #STATUS_FLASH beq !+ lda #1 !: eor #1 + sta.z check_status_cx16_rom4_check_status_rom1_main__0 // return (unsigned char)(status_rom[rom_chip] == status); - // [371] main::check_status_cx16_rom3_check_status_rom1_return#0 = (char)main::check_status_cx16_rom3_check_status_rom1_$0 -- vbuyy=vbuaa - tay - // [372] phi from main::check_status_cx16_rom3_check_status_rom1 to main::check_status_card_roms1 [phi:main::check_status_cx16_rom3_check_status_rom1->main::check_status_card_roms1] + // [399] main::check_status_cx16_rom4_check_status_rom1_return#0 = (char)main::check_status_cx16_rom4_check_status_rom1_$0 + // [400] phi from main::check_status_cx16_rom4_check_status_rom1 to main::check_status_card_roms1 [phi:main::check_status_cx16_rom4_check_status_rom1->main::check_status_card_roms1] // main::check_status_card_roms1 - // [373] phi from main::check_status_card_roms1 to main::check_status_card_roms1_@1 [phi:main::check_status_card_roms1->main::check_status_card_roms1_@1] - // [373] phi main::check_status_card_roms1_rom_chip#2 = 1 [phi:main::check_status_card_roms1->main::check_status_card_roms1_@1#0] -- vbuxx=vbuc1 - ldx #1 + // [401] phi from main::check_status_card_roms1 to main::check_status_card_roms1_@1 [phi:main::check_status_card_roms1->main::check_status_card_roms1_@1] + // [401] phi main::check_status_card_roms1_rom_chip#2 = 1 [phi:main::check_status_card_roms1->main::check_status_card_roms1_@1#0] -- vbum1=vbuc1 + lda #1 + sta check_status_card_roms1_rom_chip // main::check_status_card_roms1_@1 check_status_card_roms1___b1: // for(unsigned char rom_chip = 1; rom_chip < 8; rom_chip++) - // [374] if(main::check_status_card_roms1_rom_chip#2<8) goto main::check_status_card_roms1_check_status_rom1 -- vbuxx_lt_vbuc1_then_la1 - cpx #8 + // [402] if(main::check_status_card_roms1_rom_chip#2<8) goto main::check_status_card_roms1_check_status_rom1 -- vbum1_lt_vbuc1_then_la1 + lda check_status_card_roms1_rom_chip + cmp #8 bcs !check_status_card_roms1_check_status_rom1+ jmp check_status_card_roms1_check_status_rom1 !check_status_card_roms1_check_status_rom1: - // [375] phi from main::check_status_card_roms1_@1 to main::check_status_card_roms1_@return [phi:main::check_status_card_roms1_@1->main::check_status_card_roms1_@return] - // [375] phi main::check_status_card_roms1_return#2 = STATUS_NONE [phi:main::check_status_card_roms1_@1->main::check_status_card_roms1_@return#0] -- vbuxx=vbuc1 - ldx #STATUS_NONE + // [403] phi from main::check_status_card_roms1_@1 to main::check_status_card_roms1_@return [phi:main::check_status_card_roms1_@1->main::check_status_card_roms1_@return] + // [403] phi main::check_status_card_roms1_return#2 = 0 [phi:main::check_status_card_roms1_@1->main::check_status_card_roms1_@return#0] -- vbum1=vbuc1 + lda #0 + sta check_status_card_roms1_return // main::check_status_card_roms1_@return - // main::@70 - __b70: + // main::@77 + __b77: // if(check_status_smc(STATUS_FLASH) && check_status_cx16_rom(STATUS_FLASH) || check_status_card_roms(STATUS_FLASH)) - // [376] if(0==main::check_status_smc7_return#0) goto main::@214 -- 0_eq_vbum1_then_la1 - lda check_status_smc7_return - beq __b214 - // main::@215 - // [377] if(0!=main::check_status_cx16_rom3_check_status_rom1_return#0) goto main::@4 -- 0_neq_vbuyy_then_la1 - cpy #0 - beq !__b4+ - jmp __b4 - !__b4: - // main::@214 - __b214: - // [378] if(0!=main::check_status_card_roms1_return#2) goto main::@4 -- 0_neq_vbuxx_then_la1 - cpx #0 - beq !__b4+ - jmp __b4 - !__b4: + // [404] if(0==main::check_status_smc8_return#0) goto main::@235 -- 0_eq_vbum1_then_la1 + lda check_status_smc8_return + beq __b235 + // main::@236 + // [405] if(0!=main::check_status_cx16_rom4_check_status_rom1_return#0) goto main::@10 -- 0_neq_vbuz1_then_la1 + lda.z check_status_cx16_rom4_check_status_rom1_return + beq !__b10+ + jmp __b10 + !__b10: + // main::@235 + __b235: + // [406] if(0!=main::check_status_card_roms1_return#2) goto main::@10 -- 0_neq_vbum1_then_la1 + lda check_status_card_roms1_return + beq !__b10+ + jmp __b10 + !__b10: // main::bank_set_bram2 bank_set_bram2: // BRAM = bank - // [379] BRAM = main::bank_set_bram2_bank#0 -- vbuz1=vbuc1 + // [407] BRAM = main::bank_set_bram2_bank#0 -- vbuz1=vbuc1 lda #bank_set_bram2_bank sta.z BRAM // main::SEI5 // asm // asm { sei } sei - // main::check_status_smc8 + // main::check_status_smc9 // status_smc == status - // [381] main::check_status_smc8_$0 = status_smc#0 == STATUS_FLASH -- vboaa=vbum1_eq_vbuc1 + // [409] main::check_status_smc9_$0 = status_smc#0 == STATUS_FLASH -- vboz1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_FLASH beq !+ lda #1 !: eor #1 + sta.z check_status_smc9_main__0 // return (unsigned char)(status_smc == status); - // [382] main::check_status_smc8_return#0 = (char)main::check_status_smc8_$0 -- vbuyy=vbuaa - tay - // [383] phi from main::check_status_smc8 to main::check_status_cx16_rom4 [phi:main::check_status_smc8->main::check_status_cx16_rom4] - // main::check_status_cx16_rom4 - // main::check_status_cx16_rom4_check_status_rom1 + // [410] main::check_status_smc9_return#0 = (char)main::check_status_smc9_$0 + // [411] phi from main::check_status_smc9 to main::check_status_cx16_rom5 [phi:main::check_status_smc9->main::check_status_cx16_rom5] + // main::check_status_cx16_rom5 + // main::check_status_cx16_rom5_check_status_rom1 // status_rom[rom_chip] == status - // [384] main::check_status_cx16_rom4_check_status_rom1_$0 = *status_rom == STATUS_FLASH -- vboaa=_deref_pbuc1_eq_vbuc2 + // [412] main::check_status_cx16_rom5_check_status_rom1_$0 = *status_rom == STATUS_FLASH -- vboz1=_deref_pbuc1_eq_vbuc2 lda status_rom eor #STATUS_FLASH beq !+ lda #1 !: eor #1 + sta.z check_status_cx16_rom5_check_status_rom1_main__0 // return (unsigned char)(status_rom[rom_chip] == status); - // [385] main::check_status_cx16_rom4_check_status_rom1_return#0 = (char)main::check_status_cx16_rom4_check_status_rom1_$0 -- vbuxx=vbuaa - tax - // main::@71 + // [413] main::check_status_cx16_rom5_check_status_rom1_return#0 = (char)main::check_status_cx16_rom5_check_status_rom1_$0 + // main::@78 // if (check_status_smc(STATUS_FLASH) && check_status_cx16_rom(STATUS_FLASH)) - // [386] if(0==main::check_status_smc8_return#0) goto main::@37 -- 0_eq_vbuyy_then_la1 - cpy #0 - beq __b37 - // main::@216 - // [387] if(0!=main::check_status_cx16_rom4_check_status_rom1_return#0) goto main::@47 -- 0_neq_vbuxx_then_la1 - cpx #0 - beq !__b47+ - jmp __b47 - !__b47: - // [388] phi from main::@216 to main::@37 [phi:main::@216->main::@37] - // [388] phi from main::@166 main::@38 main::@49 main::@71 to main::@37 [phi:main::@166/main::@38/main::@49/main::@71->main::@37] - // [388] phi __errno#410 = __errno#18 [phi:main::@166/main::@38/main::@49/main::@71->main::@37#0] -- register_copy - // main::@37 - __b37: - // [389] phi from main::@37 to main::@39 [phi:main::@37->main::@39] - // [389] phi __errno#114 = __errno#410 [phi:main::@37->main::@39#0] -- register_copy - // [389] phi main::rom_chip4#10 = 7 [phi:main::@37->main::@39#1] -- vbum1=vbuc1 + // [414] if(0==main::check_status_smc9_return#0) goto main::@43 -- 0_eq_vbuz1_then_la1 + lda.z check_status_smc9_return + beq __b43 + // main::@237 + // [415] if(0!=main::check_status_cx16_rom5_check_status_rom1_return#0) goto main::@53 -- 0_neq_vbuz1_then_la1 + lda.z check_status_cx16_rom5_check_status_rom1_return + beq !__b53+ + jmp __b53 + !__b53: + // [416] phi from main::@237 to main::@43 [phi:main::@237->main::@43] + // [416] phi from main::@184 main::@44 main::@55 main::@78 to main::@43 [phi:main::@184/main::@44/main::@55/main::@78->main::@43] + // [416] phi __errno#387 = __errno#18 [phi:main::@184/main::@44/main::@55/main::@78->main::@43#0] -- register_copy + // main::@43 + __b43: + // [417] phi from main::@43 to main::@45 [phi:main::@43->main::@45] + // [417] phi __errno#116 = __errno#387 [phi:main::@43->main::@45#0] -- register_copy + // [417] phi main::rom_chip4#10 = 7 [phi:main::@43->main::@45#1] -- vbum1=vbuc1 lda #7 sta rom_chip4 // Flash the ROM chips. @@ -2267,18 +2544,18 @@ main: { // If the file contents are the same as the ROM contents, then no flashing is required. // IMPORTANT! We start to flash the ROMs on the extension card. // The last ROM flashed is the CX16 ROM on the CX16 board! - // main::@39 - __b39: + // main::@45 + __b45: // for(unsigned char rom_chip = 7; rom_chip != 255; rom_chip--) - // [390] if(main::rom_chip4#10!=$ff) goto main::check_status_rom1 -- vbum1_neq_vbuc1_then_la1 + // [418] if(main::rom_chip4#10!=$ff) goto main::check_status_rom1 -- vbum1_neq_vbuc1_then_la1 lda #$ff cmp rom_chip4 bne check_status_rom1 - jmp check_status_smc6 + jmp check_status_smc7 // main::check_status_rom1 check_status_rom1: // status_rom[rom_chip] == status - // [391] main::check_status_rom1_$0 = status_rom[main::rom_chip4#10] == STATUS_FLASH -- vboaa=pbuc1_derefidx_vbum1_eq_vbuc2 + // [419] main::check_status_rom1_$0 = status_rom[main::rom_chip4#10] == STATUS_FLASH -- vboz1=pbuc1_derefidx_vbum2_eq_vbuc2 lda #STATUS_FLASH ldy rom_chip4 eor status_rom,y @@ -2286,82 +2563,83 @@ main: { lda #1 !: eor #1 + sta.z check_status_rom1_main__0 // return (unsigned char)(status_rom[rom_chip] == status); - // [392] main::check_status_rom1_return#0 = (char)main::check_status_rom1_$0 - // main::@72 + // [420] main::check_status_rom1_return#0 = (char)main::check_status_rom1_$0 + // main::@79 // if(check_status_rom(rom_chip, STATUS_FLASH)) - // [393] if(0==main::check_status_rom1_return#0) goto main::@40 -- 0_eq_vbuaa_then_la1 - cmp #0 - beq __b40 - // main::check_status_smc9 + // [421] if(0==main::check_status_rom1_return#0) goto main::@46 -- 0_eq_vbuz1_then_la1 + lda.z check_status_rom1_return + beq __b46 + // main::check_status_smc10 // status_smc == status - // [394] main::check_status_smc9_$0 = status_smc#0 == STATUS_FLASHED -- vboaa=vbum1_eq_vbuc1 + // [422] main::check_status_smc10_$0 = status_smc#0 == STATUS_FLASHED -- vboz1=vbum2_eq_vbuc1 lda status_smc eor #STATUS_FLASHED beq !+ lda #1 !: eor #1 + sta.z check_status_smc10_main__0 // return (unsigned char)(status_smc == status); - // [395] main::check_status_smc9_return#0 = (char)main::check_status_smc9_$0 -- vbuxx=vbuaa - tax - // main::@73 + // [423] main::check_status_smc10_return#0 = (char)main::check_status_smc10_$0 + // main::@80 // if((rom_chip == 0 && check_status_smc(STATUS_FLASHED)) || (rom_chip != 0)) - // [396] if(main::rom_chip4#10!=0) goto main::@217 -- vbum1_neq_0_then_la1 + // [424] if(main::rom_chip4#10!=0) goto main::@238 -- vbum1_neq_0_then_la1 // IMPORTANT! We only flash the CX16 ROM chip if the SMC got flashed succesfully! lda rom_chip4 - bne __b217 - // main::@218 - // [397] if(0!=main::check_status_smc9_return#0) goto main::bank_set_brom6 -- 0_neq_vbuxx_then_la1 - cpx #0 - bne bank_set_brom6 - // main::@217 - __b217: - // [398] if(main::rom_chip4#10!=0) goto main::bank_set_brom6 -- vbum1_neq_0_then_la1 + bne __b238 + // main::@239 + // [425] if(0!=main::check_status_smc10_return#0) goto main::bank_set_brom7 -- 0_neq_vbuz1_then_la1 + lda.z check_status_smc10_return + bne bank_set_brom7 + // main::@238 + __b238: + // [426] if(main::rom_chip4#10!=0) goto main::bank_set_brom7 -- vbum1_neq_0_then_la1 lda rom_chip4 - bne bank_set_brom6 - // main::@46 + bne bank_set_brom7 + // main::@52 // display_info_rom(rom_chip, STATUS_ISSUE, "Update SMC failed!") - // [399] display_info_rom::rom_chip#10 = main::rom_chip4#10 -- vbuz1=vbum2 + // [427] display_info_rom::rom_chip#10 = main::rom_chip4#10 -- vbuz1=vbum2 sta.z display_info_rom.rom_chip - // [400] call display_info_rom - // [1199] phi from main::@46 to display_info_rom [phi:main::@46->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = main::info_text21 [phi:main::@46->display_info_rom#0] -- pbuz1=pbuc1 - lda #display_info_rom] + // [1285] phi display_info_rom::info_text#16 = main::info_text27 [phi:main::@52->display_info_rom#0] -- pbuz1=pbuc1 + lda #info_text21 + lda #>info_text27 sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#10 [phi:main::@46->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_ISSUE [phi:main::@46->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#10 [phi:main::@52->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_ISSUE [phi:main::@52->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_ISSUE - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - // [401] phi from main::@177 main::@188 main::@41 main::@45 main::@46 main::@72 to main::@40 [phi:main::@177/main::@188/main::@41/main::@45/main::@46/main::@72->main::@40] - // [401] phi __errno#411 = __errno#18 [phi:main::@177/main::@188/main::@41/main::@45/main::@46/main::@72->main::@40#0] -- register_copy - // main::@40 - __b40: + // [429] phi from main::@195 main::@206 main::@47 main::@51 main::@52 main::@79 to main::@46 [phi:main::@195/main::@206/main::@47/main::@51/main::@52/main::@79->main::@46] + // [429] phi __errno#388 = __errno#18 [phi:main::@195/main::@206/main::@47/main::@51/main::@52/main::@79->main::@46#0] -- register_copy + // main::@46 + __b46: // for(unsigned char rom_chip = 7; rom_chip != 255; rom_chip--) - // [402] main::rom_chip4#1 = -- main::rom_chip4#10 -- vbum1=_dec_vbum1 + // [430] main::rom_chip4#1 = -- main::rom_chip4#10 -- vbum1=_dec_vbum1 dec rom_chip4 - // [389] phi from main::@40 to main::@39 [phi:main::@40->main::@39] - // [389] phi __errno#114 = __errno#411 [phi:main::@40->main::@39#0] -- register_copy - // [389] phi main::rom_chip4#10 = main::rom_chip4#1 [phi:main::@40->main::@39#1] -- register_copy - jmp __b39 - // main::bank_set_brom6 - bank_set_brom6: + // [417] phi from main::@46 to main::@45 [phi:main::@46->main::@45] + // [417] phi __errno#116 = __errno#388 [phi:main::@46->main::@45#0] -- register_copy + // [417] phi main::rom_chip4#10 = main::rom_chip4#1 [phi:main::@46->main::@45#1] -- register_copy + jmp __b45 + // main::bank_set_brom7 + bank_set_brom7: // BROM = bank - // [403] BROM = main::bank_set_brom6_bank#0 -- vbuz1=vbuc1 - lda #bank_set_brom6_bank + // [431] BROM = main::bank_set_brom7_bank#0 -- vbuz1=vbuc1 + lda #bank_set_brom7_bank sta.z BROM - // [404] phi from main::bank_set_brom6 to main::@74 [phi:main::bank_set_brom6->main::@74] - // main::@74 + // [432] phi from main::bank_set_brom7 to main::@81 [phi:main::bank_set_brom7->main::@81] + // main::@81 // display_progress_clear() - // [405] call display_progress_clear - // [826] phi from main::@74 to display_progress_clear [phi:main::@74->display_progress_clear] + // [433] call display_progress_clear + // [871] phi from main::@81 to display_progress_clear [phi:main::@81->display_progress_clear] jsr display_progress_clear - // main::@170 + // main::@188 // unsigned char rom_bank = rom_chip * 32 - // [406] main::rom_bank1#0 = main::rom_chip4#10 << 5 -- vbum1=vbum2_rol_5 + // [434] main::rom_bank1#0 = main::rom_chip4#10 << 5 -- vbum1=vbum2_rol_5 lda rom_chip4 asl asl @@ -2370,113 +2648,114 @@ main: { asl sta rom_bank1 // unsigned char* file = rom_file(rom_chip) - // [407] rom_file::rom_chip#1 = main::rom_chip4#10 -- vbuaa=vbum1 + // [435] rom_file::rom_chip#1 = main::rom_chip4#10 -- vbuz1=vbum2 lda rom_chip4 - // [408] call rom_file - // [1242] phi from main::@170 to rom_file [phi:main::@170->rom_file] - // [1242] phi rom_file::rom_chip#2 = rom_file::rom_chip#1 [phi:main::@170->rom_file#0] -- register_copy + sta.z rom_file.rom_chip + // [436] call rom_file + // [1328] phi from main::@188 to rom_file [phi:main::@188->rom_file] + // [1328] phi rom_file::rom_chip#2 = rom_file::rom_chip#1 [phi:main::@188->rom_file#0] -- register_copy jsr rom_file // unsigned char* file = rom_file(rom_chip) - // [409] rom_file::return#5 = rom_file::return#2 - // main::@171 - // [410] main::file1#0 = rom_file::return#5 + // [437] rom_file::return#5 = rom_file::return#2 + // main::@189 + // [438] main::file1#0 = rom_file::return#5 // sprintf(info_text, "Reading %s ... (.) data ( ) empty", file) - // [411] call snprintf_init - // [982] phi from main::@171 to snprintf_init [phi:main::@171->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@171->snprintf_init#0] -- pbuz1=pbuc1 + // [439] call snprintf_init + // [1014] phi from main::@189 to snprintf_init [phi:main::@189->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@189->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [412] phi from main::@171 to main::@172 [phi:main::@171->main::@172] - // main::@172 + // [440] phi from main::@189 to main::@190 [phi:main::@189->main::@190] + // main::@190 // sprintf(info_text, "Reading %s ... (.) data ( ) empty", file) - // [413] call printf_str - // [987] phi from main::@172 to printf_str [phi:main::@172->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@172->printf_str#0] -- pprz1=pprc1 + // [441] call printf_str + // [1019] phi from main::@190 to printf_str [phi:main::@190->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@190->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s13 [phi:main::@172->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s13 [phi:main::@190->printf_str#1] -- pbuz1=pbuc1 lda #s13 sta.z printf_str.s+1 jsr printf_str - // main::@173 + // main::@191 // sprintf(info_text, "Reading %s ... (.) data ( ) empty", file) - // [414] printf_string::str#21 = main::file1#0 -- pbuz1=pbum2 + // [442] printf_string::str#21 = main::file1#0 -- pbuz1=pbum2 lda file1 sta.z printf_string.str lda file1+1 sta.z printf_string.str+1 - // [415] call printf_string - // [1130] phi from main::@173 to printf_string [phi:main::@173->printf_string] - // [1130] phi printf_string::putc#22 = &snputc [phi:main::@173->printf_string#0] -- pprz1=pprc1 + // [443] call printf_string + // [1180] phi from main::@191 to printf_string [phi:main::@191->printf_string] + // [1180] phi printf_string::putc#22 = &snputc [phi:main::@191->printf_string#0] -- pprz1=pprc1 lda #snputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#21 [phi:main::@173->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 0 [phi:main::@173->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#21 [phi:main::@191->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 0 [phi:main::@191->printf_string#2] -- vbuz1=vbuc1 lda #0 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 0 [phi:main::@173->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 0 [phi:main::@191->printf_string#3] -- vbuz1=vbuc1 sta.z printf_string.format_min_length jsr printf_string - // [416] phi from main::@173 to main::@174 [phi:main::@173->main::@174] - // main::@174 + // [444] phi from main::@191 to main::@192 [phi:main::@191->main::@192] + // main::@192 // sprintf(info_text, "Reading %s ... (.) data ( ) empty", file) - // [417] call printf_str - // [987] phi from main::@174 to printf_str [phi:main::@174->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@174->printf_str#0] -- pprz1=pprc1 + // [445] call printf_str + // [1019] phi from main::@192 to printf_str [phi:main::@192->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@192->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s8 [phi:main::@174->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s8 [phi:main::@192->printf_str#1] -- pbuz1=pbuc1 lda #s8 sta.z printf_str.s+1 jsr printf_str - // main::@175 + // main::@193 // sprintf(info_text, "Reading %s ... (.) data ( ) empty", file) - // [418] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [446] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [419] callexecute snputc -- call_vprc1 + // [447] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_progress(info_text) - // [421] call display_action_progress - // [812] phi from main::@175 to display_action_progress [phi:main::@175->display_action_progress] - // [812] phi display_action_progress::info_text#15 = info_text [phi:main::@175->display_action_progress#0] -- pbuz1=pbuc1 + // [449] call display_action_progress + // [857] phi from main::@193 to display_action_progress [phi:main::@193->display_action_progress] + // [857] phi display_action_progress::info_text#18 = info_text [phi:main::@193->display_action_progress#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_progress.info_text lda #>@info_text sta.z display_action_progress.info_text+1 jsr display_action_progress - // main::@176 + // main::@194 // unsigned long rom_bytes_read = rom_read(1, rom_chip, file, STATUS_READING, rom_bank, rom_sizes[rom_chip]) - // [422] main::$245 = main::rom_chip4#10 << 2 -- vbum1=vbum2_rol_2 + // [450] main::$273 = main::rom_chip4#10 << 2 -- vbum1=vbum2_rol_2 lda rom_chip4 asl asl - sta main__245 - // [423] rom_read::file#1 = main::file1#0 -- pbum1=pbum2 + sta main__273 + // [451] rom_read::file#1 = main::file1#0 -- pbum1=pbum2 lda file1 sta rom_read.file lda file1+1 sta rom_read.file+1 - // [424] rom_read::brom_bank_start#2 = main::rom_bank1#0 -- vbuz1=vbum2 + // [452] rom_read::brom_bank_start#2 = main::rom_bank1#0 -- vbum1=vbum2 lda rom_bank1 - sta.z rom_read.brom_bank_start - // [425] rom_read::rom_size#1 = rom_sizes[main::$245] -- vduz1=pduc1_derefidx_vbum2 - ldy main__245 + sta rom_read.brom_bank_start + // [453] rom_read::rom_size#1 = rom_sizes[main::$273] -- vduz1=pduc1_derefidx_vbum2 + ldy main__273 lda rom_sizes,y sta.z rom_read.rom_size lda rom_sizes+1,y @@ -2485,68 +2764,69 @@ main: { sta.z rom_read.rom_size+2 lda rom_sizes+3,y sta.z rom_read.rom_size+3 - // [426] call rom_read - // [1248] phi from main::@176 to rom_read [phi:main::@176->rom_read] - // [1248] phi rom_read::display_progress#28 = 1 [phi:main::@176->rom_read#0] -- vbuz1=vbuc1 + // [454] call rom_read + // [1334] phi from main::@194 to rom_read [phi:main::@194->rom_read] + // [1334] phi rom_read::display_progress#28 = 1 [phi:main::@194->rom_read#0] -- vbum1=vbuc1 lda #1 - sta.z rom_read.display_progress - // [1248] phi rom_read::rom_size#12 = rom_read::rom_size#1 [phi:main::@176->rom_read#1] -- register_copy - // [1248] phi __errno#106 = __errno#114 [phi:main::@176->rom_read#2] -- register_copy - // [1248] phi rom_read::file#11 = rom_read::file#1 [phi:main::@176->rom_read#3] -- register_copy - // [1248] phi rom_read::brom_bank_start#22 = rom_read::brom_bank_start#2 [phi:main::@176->rom_read#4] -- register_copy + sta rom_read.display_progress + // [1334] phi rom_read::rom_size#12 = rom_read::rom_size#1 [phi:main::@194->rom_read#1] -- register_copy + // [1334] phi __errno#108 = __errno#116 [phi:main::@194->rom_read#2] -- register_copy + // [1334] phi rom_read::file#11 = rom_read::file#1 [phi:main::@194->rom_read#3] -- register_copy + // [1334] phi rom_read::brom_bank_start#22 = rom_read::brom_bank_start#2 [phi:main::@194->rom_read#4] -- register_copy jsr rom_read // unsigned long rom_bytes_read = rom_read(1, rom_chip, file, STATUS_READING, rom_bank, rom_sizes[rom_chip]) - // [427] rom_read::return#3 = rom_read::return#0 - // main::@177 - // [428] main::rom_bytes_read1#0 = rom_read::return#3 + // [455] rom_read::return#3 = rom_read::return#0 + // main::@195 + // [456] main::rom_bytes_read1#0 = rom_read::return#3 // if(rom_bytes_read) - // [429] if(0==main::rom_bytes_read1#0) goto main::@40 -- 0_eq_vduz1_then_la1 - lda.z rom_bytes_read1 - ora.z rom_bytes_read1+1 - ora.z rom_bytes_read1+2 - ora.z rom_bytes_read1+3 - bne !__b40+ - jmp __b40 - !__b40: - // [430] phi from main::@177 to main::@43 [phi:main::@177->main::@43] - // main::@43 + // [457] if(0==main::rom_bytes_read1#0) goto main::@46 -- 0_eq_vdum1_then_la1 + lda rom_bytes_read1 + ora rom_bytes_read1+1 + ora rom_bytes_read1+2 + ora rom_bytes_read1+3 + bne !__b46+ + jmp __b46 + !__b46: + // [458] phi from main::@195 to main::@49 [phi:main::@195->main::@49] + // main::@49 // display_action_progress("Comparing ... (.) same, (*) different.") - // [431] call display_action_progress + // [459] call display_action_progress // Now we compare the RAM with the actual ROM contents. - // [812] phi from main::@43 to display_action_progress [phi:main::@43->display_action_progress] - // [812] phi display_action_progress::info_text#15 = main::info_text22 [phi:main::@43->display_action_progress#0] -- pbuz1=pbuc1 - lda #display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text28 [phi:main::@49->display_action_progress#0] -- pbuz1=pbuc1 + lda #info_text22 + lda #>info_text28 sta.z display_action_progress.info_text+1 jsr display_action_progress - // main::@178 + // main::@196 // display_info_rom(rom_chip, STATUS_COMPARING, "") - // [432] display_info_rom::rom_chip#11 = main::rom_chip4#10 -- vbuz1=vbum2 + // [460] display_info_rom::rom_chip#11 = main::rom_chip4#10 -- vbuz1=vbum2 lda rom_chip4 sta.z display_info_rom.rom_chip - // [433] call display_info_rom - // [1199] phi from main::@178 to display_info_rom [phi:main::@178->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = info_text4 [phi:main::@178->display_info_rom#0] -- pbuz1=pbuc1 + // [461] call display_info_rom + // [1285] phi from main::@196 to display_info_rom [phi:main::@196->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = info_text4 [phi:main::@196->display_info_rom#0] -- pbuz1=pbuc1 lda #info_text4 sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#11 [phi:main::@178->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_COMPARING [phi:main::@178->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#11 [phi:main::@196->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_COMPARING [phi:main::@196->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_COMPARING - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - // main::@179 + // main::@197 // unsigned long rom_differences = rom_verify( // rom_chip, rom_bank, file_sizes[rom_chip]) - // [434] rom_verify::rom_chip#0 = main::rom_chip4#10 -- vbuz1=vbum2 + // [462] rom_verify::rom_chip#0 = main::rom_chip4#10 -- vbuz1=vbum2 lda rom_chip4 sta.z rom_verify.rom_chip - // [435] rom_verify::rom_bank_start#0 = main::rom_bank1#0 -- vbuxx=vbum1 - ldx rom_bank1 - // [436] rom_verify::file_size#0 = file_sizes[main::$245] -- vdum1=pduc1_derefidx_vbum2 - ldy main__245 + // [463] rom_verify::rom_bank_start#0 = main::rom_bank1#0 -- vbum1=vbum2 + lda rom_bank1 + sta rom_verify.rom_bank_start + // [464] rom_verify::file_size#0 = file_sizes[main::$273] -- vdum1=pduc1_derefidx_vbum2 + ldy main__273 lda file_sizes,y sta rom_verify.file_size lda file_sizes+1,y @@ -2555,12 +2835,12 @@ main: { sta rom_verify.file_size+2 lda file_sizes+3,y sta rom_verify.file_size+3 - // [437] call rom_verify + // [465] call rom_verify // Verify the ROM... jsr rom_verify - // [438] rom_verify::return#2 = rom_verify::rom_different_bytes#11 - // main::@180 - // [439] main::rom_differences#0 = rom_verify::return#2 -- vduz1=vduz2 + // [466] rom_verify::return#2 = rom_verify::rom_different_bytes#11 + // main::@198 + // [467] main::rom_differences#0 = rom_verify::return#2 -- vduz1=vduz2 lda.z rom_verify.return sta.z rom_differences lda.z rom_verify.return+1 @@ -2570,309 +2850,311 @@ main: { lda.z rom_verify.return+3 sta.z rom_differences+3 // if (!rom_differences) - // [440] if(0==main::rom_differences#0) goto main::@41 -- 0_eq_vduz1_then_la1 + // [468] if(0==main::rom_differences#0) goto main::@47 -- 0_eq_vduz1_then_la1 lda.z rom_differences ora.z rom_differences+1 ora.z rom_differences+2 ora.z rom_differences+3 - bne !__b41+ - jmp __b41 - !__b41: - // [441] phi from main::@180 to main::@44 [phi:main::@180->main::@44] - // main::@44 + bne !__b47+ + jmp __b47 + !__b47: + // [469] phi from main::@198 to main::@50 [phi:main::@198->main::@50] + // main::@50 // sprintf(info_text, "%05x differences!", rom_differences) - // [442] call snprintf_init - // [982] phi from main::@44 to snprintf_init [phi:main::@44->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@44->snprintf_init#0] -- pbuz1=pbuc1 + // [470] call snprintf_init + // [1014] phi from main::@50 to snprintf_init [phi:main::@50->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@50->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // main::@181 + // main::@199 // sprintf(info_text, "%05x differences!", rom_differences) - // [443] printf_ulong::uvalue#7 = main::rom_differences#0 - // [444] call printf_ulong - // [1399] phi from main::@181 to printf_ulong [phi:main::@181->printf_ulong] - // [1399] phi printf_ulong::format_zero_padding#10 = 1 [phi:main::@181->printf_ulong#0] -- vbuz1=vbuc1 + // [471] printf_ulong::uvalue#7 = main::rom_differences#0 + // [472] call printf_ulong + // [1485] phi from main::@199 to printf_ulong [phi:main::@199->printf_ulong] + // [1485] phi printf_ulong::format_zero_padding#10 = 1 [phi:main::@199->printf_ulong#0] -- vbuz1=vbuc1 lda #1 sta.z printf_ulong.format_zero_padding - // [1399] phi printf_ulong::format_min_length#10 = 5 [phi:main::@181->printf_ulong#1] -- vbuz1=vbuc1 + // [1485] phi printf_ulong::format_min_length#10 = 5 [phi:main::@199->printf_ulong#1] -- vbuz1=vbuc1 lda #5 sta.z printf_ulong.format_min_length - // [1399] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:main::@181->printf_ulong#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [1399] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#7 [phi:main::@181->printf_ulong#3] -- register_copy + // [1485] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:main::@199->printf_ulong#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_ulong.format_radix + // [1485] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#7 [phi:main::@199->printf_ulong#3] -- register_copy jsr printf_ulong - // [445] phi from main::@181 to main::@182 [phi:main::@181->main::@182] - // main::@182 + // [473] phi from main::@199 to main::@200 [phi:main::@199->main::@200] + // main::@200 // sprintf(info_text, "%05x differences!", rom_differences) - // [446] call printf_str - // [987] phi from main::@182 to printf_str [phi:main::@182->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@182->printf_str#0] -- pprz1=pprc1 + // [474] call printf_str + // [1019] phi from main::@200 to printf_str [phi:main::@200->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@200->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s15 [phi:main::@182->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s15 [phi:main::@200->printf_str#1] -- pbuz1=pbuc1 lda #s15 sta.z printf_str.s+1 jsr printf_str - // main::@183 + // main::@201 // sprintf(info_text, "%05x differences!", rom_differences) - // [447] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [475] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [448] callexecute snputc -- call_vprc1 + // [476] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_info_rom(rom_chip, STATUS_FLASH, info_text) - // [450] display_info_rom::rom_chip#13 = main::rom_chip4#10 -- vbuz1=vbum2 + // [478] display_info_rom::rom_chip#13 = main::rom_chip4#10 -- vbuz1=vbum2 lda rom_chip4 sta.z display_info_rom.rom_chip - // [451] call display_info_rom - // [1199] phi from main::@183 to display_info_rom [phi:main::@183->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = info_text [phi:main::@183->display_info_rom#0] -- pbuz1=pbuc1 + // [479] call display_info_rom + // [1285] phi from main::@201 to display_info_rom [phi:main::@201->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = info_text [phi:main::@201->display_info_rom#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_info_rom.info_text lda #>@info_text sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#13 [phi:main::@183->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_FLASH [phi:main::@183->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#13 [phi:main::@201->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_FLASH [phi:main::@201->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_FLASH - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - // main::@184 + // main::@202 // unsigned long rom_flash_errors = rom_flash( // rom_chip, rom_bank, file_sizes[rom_chip]) - // [452] rom_flash::rom_chip#0 = main::rom_chip4#10 -- vbum1=vbum2 + // [480] rom_flash::rom_chip#0 = main::rom_chip4#10 -- vbum1=vbum2 lda rom_chip4 sta rom_flash.rom_chip - // [453] rom_flash::rom_bank_start#0 = main::rom_bank1#0 -- vbum1=vbum2 + // [481] rom_flash::rom_bank_start#0 = main::rom_bank1#0 -- vbum1=vbum2 lda rom_bank1 sta rom_flash.rom_bank_start - // [454] rom_flash::file_size#0 = file_sizes[main::$245] -- vduz1=pduc1_derefidx_vbum2 - ldy main__245 + // [482] rom_flash::file_size#0 = file_sizes[main::$273] -- vdum1=pduc1_derefidx_vbum2 + ldy main__273 lda file_sizes,y - sta.z rom_flash.file_size + sta rom_flash.file_size lda file_sizes+1,y - sta.z rom_flash.file_size+1 + sta rom_flash.file_size+1 lda file_sizes+2,y - sta.z rom_flash.file_size+2 + sta rom_flash.file_size+2 lda file_sizes+3,y - sta.z rom_flash.file_size+3 - // [455] call rom_flash - // [1409] phi from main::@184 to rom_flash [phi:main::@184->rom_flash] + sta rom_flash.file_size+3 + // [483] call rom_flash + // [1495] phi from main::@202 to rom_flash [phi:main::@202->rom_flash] jsr rom_flash // unsigned long rom_flash_errors = rom_flash( // rom_chip, rom_bank, file_sizes[rom_chip]) - // [456] rom_flash::return#2 = rom_flash::flash_errors#10 - // main::@185 - // [457] main::rom_flash_errors#0 = rom_flash::return#2 -- vduz1=vduz2 - lda.z rom_flash.return - sta.z rom_flash_errors - lda.z rom_flash.return+1 - sta.z rom_flash_errors+1 - lda.z rom_flash.return+2 - sta.z rom_flash_errors+2 - lda.z rom_flash.return+3 - sta.z rom_flash_errors+3 + // [484] rom_flash::return#2 = rom_flash::flash_errors#10 + // main::@203 + // [485] main::rom_flash_errors#0 = rom_flash::return#2 -- vdum1=vdum2 + lda rom_flash.return + sta rom_flash_errors + lda rom_flash.return+1 + sta rom_flash_errors+1 + lda rom_flash.return+2 + sta rom_flash_errors+2 + lda rom_flash.return+3 + sta rom_flash_errors+3 // if(rom_flash_errors) - // [458] if(0!=main::rom_flash_errors#0) goto main::@42 -- 0_neq_vduz1_then_la1 - lda.z rom_flash_errors - ora.z rom_flash_errors+1 - ora.z rom_flash_errors+2 - ora.z rom_flash_errors+3 - bne __b42 - // main::@45 + // [486] if(0!=main::rom_flash_errors#0) goto main::@48 -- 0_neq_vdum1_then_la1 + lda rom_flash_errors + ora rom_flash_errors+1 + ora rom_flash_errors+2 + ora rom_flash_errors+3 + bne __b48 + // main::@51 // display_info_rom(rom_chip, STATUS_FLASHED, "OK!") - // [459] display_info_rom::rom_chip#15 = main::rom_chip4#10 -- vbuz1=vbum2 + // [487] display_info_rom::rom_chip#15 = main::rom_chip4#10 -- vbuz1=vbum2 lda rom_chip4 sta.z display_info_rom.rom_chip - // [460] call display_info_rom - // [1199] phi from main::@45 to display_info_rom [phi:main::@45->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = main::info_text25 [phi:main::@45->display_info_rom#0] -- pbuz1=pbuc1 - lda #display_info_rom] + // [1285] phi display_info_rom::info_text#16 = main::info_text31 [phi:main::@51->display_info_rom#0] -- pbuz1=pbuc1 + lda #info_text25 + lda #>info_text31 sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#15 [phi:main::@45->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_FLASHED [phi:main::@45->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#15 [phi:main::@51->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_FLASHED [phi:main::@51->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_FLASHED - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - jmp __b40 - // [461] phi from main::@185 to main::@42 [phi:main::@185->main::@42] - // main::@42 - __b42: + jmp __b46 + // [489] phi from main::@203 to main::@48 [phi:main::@203->main::@48] + // main::@48 + __b48: // sprintf(info_text, "%u flash errors!", rom_flash_errors) - // [462] call snprintf_init - // [982] phi from main::@42 to snprintf_init [phi:main::@42->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@42->snprintf_init#0] -- pbuz1=pbuc1 + // [490] call snprintf_init + // [1014] phi from main::@48 to snprintf_init [phi:main::@48->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@48->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // main::@186 + // main::@204 // sprintf(info_text, "%u flash errors!", rom_flash_errors) - // [463] printf_ulong::uvalue#8 = main::rom_flash_errors#0 -- vduz1=vduz2 - lda.z rom_flash_errors + // [491] printf_ulong::uvalue#8 = main::rom_flash_errors#0 -- vduz1=vdum2 + lda rom_flash_errors sta.z printf_ulong.uvalue - lda.z rom_flash_errors+1 + lda rom_flash_errors+1 sta.z printf_ulong.uvalue+1 - lda.z rom_flash_errors+2 + lda rom_flash_errors+2 sta.z printf_ulong.uvalue+2 - lda.z rom_flash_errors+3 + lda rom_flash_errors+3 sta.z printf_ulong.uvalue+3 - // [464] call printf_ulong - // [1399] phi from main::@186 to printf_ulong [phi:main::@186->printf_ulong] - // [1399] phi printf_ulong::format_zero_padding#10 = 0 [phi:main::@186->printf_ulong#0] -- vbuz1=vbuc1 + // [492] call printf_ulong + // [1485] phi from main::@204 to printf_ulong [phi:main::@204->printf_ulong] + // [1485] phi printf_ulong::format_zero_padding#10 = 0 [phi:main::@204->printf_ulong#0] -- vbuz1=vbuc1 lda #0 sta.z printf_ulong.format_zero_padding - // [1399] phi printf_ulong::format_min_length#10 = 0 [phi:main::@186->printf_ulong#1] -- vbuz1=vbuc1 + // [1485] phi printf_ulong::format_min_length#10 = 0 [phi:main::@204->printf_ulong#1] -- vbuz1=vbuc1 sta.z printf_ulong.format_min_length - // [1399] phi printf_ulong::format_radix#10 = DECIMAL [phi:main::@186->printf_ulong#2] -- vbuxx=vbuc1 - ldx #DECIMAL - // [1399] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#8 [phi:main::@186->printf_ulong#3] -- register_copy + // [1485] phi printf_ulong::format_radix#10 = DECIMAL [phi:main::@204->printf_ulong#2] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_ulong.format_radix + // [1485] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#8 [phi:main::@204->printf_ulong#3] -- register_copy jsr printf_ulong - // [465] phi from main::@186 to main::@187 [phi:main::@186->main::@187] - // main::@187 + // [493] phi from main::@204 to main::@205 [phi:main::@204->main::@205] + // main::@205 // sprintf(info_text, "%u flash errors!", rom_flash_errors) - // [466] call printf_str - // [987] phi from main::@187 to printf_str [phi:main::@187->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@187->printf_str#0] -- pprz1=pprc1 + // [494] call printf_str + // [1019] phi from main::@205 to printf_str [phi:main::@205->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@205->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s16 [phi:main::@187->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s16 [phi:main::@205->printf_str#1] -- pbuz1=pbuc1 lda #s16 sta.z printf_str.s+1 jsr printf_str - // main::@188 + // main::@206 // sprintf(info_text, "%u flash errors!", rom_flash_errors) - // [467] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [495] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [468] callexecute snputc -- call_vprc1 + // [496] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_info_rom(rom_chip, STATUS_ERROR, info_text) - // [470] display_info_rom::rom_chip#14 = main::rom_chip4#10 -- vbuz1=vbum2 + // [498] display_info_rom::rom_chip#14 = main::rom_chip4#10 -- vbuz1=vbum2 lda rom_chip4 sta.z display_info_rom.rom_chip - // [471] call display_info_rom - // [1199] phi from main::@188 to display_info_rom [phi:main::@188->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = info_text [phi:main::@188->display_info_rom#0] -- pbuz1=pbuc1 + // [499] call display_info_rom + // [1285] phi from main::@206 to display_info_rom [phi:main::@206->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = info_text [phi:main::@206->display_info_rom#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_info_rom.info_text lda #>@info_text sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#14 [phi:main::@188->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_ERROR [phi:main::@188->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#14 [phi:main::@206->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_ERROR [phi:main::@206->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_ERROR - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - jmp __b40 - // main::@41 - __b41: + jmp __b46 + // main::@47 + __b47: // display_info_rom(rom_chip, STATUS_FLASHED, "No update required") - // [472] display_info_rom::rom_chip#12 = main::rom_chip4#10 -- vbuz1=vbum2 + // [500] display_info_rom::rom_chip#12 = main::rom_chip4#10 -- vbuz1=vbum2 lda rom_chip4 sta.z display_info_rom.rom_chip - // [473] call display_info_rom - // [1199] phi from main::@41 to display_info_rom [phi:main::@41->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = main::info_text24 [phi:main::@41->display_info_rom#0] -- pbuz1=pbuc1 - lda #display_info_rom] + // [1285] phi display_info_rom::info_text#16 = main::info_text30 [phi:main::@47->display_info_rom#0] -- pbuz1=pbuc1 + lda #info_text24 + lda #>info_text30 sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#12 [phi:main::@41->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_FLASHED [phi:main::@41->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#12 [phi:main::@47->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_FLASHED [phi:main::@47->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_FLASHED - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - jmp __b40 - // [474] phi from main::@216 to main::@47 [phi:main::@216->main::@47] - // main::@47 - __b47: + jmp __b46 + // [502] phi from main::@237 to main::@53 [phi:main::@237->main::@53] + // main::@53 + __b53: // display_progress_clear() - // [475] call display_progress_clear - // [826] phi from main::@47 to display_progress_clear [phi:main::@47->display_progress_clear] + // [503] call display_progress_clear + // [871] phi from main::@53 to display_progress_clear [phi:main::@53->display_progress_clear] jsr display_progress_clear - // [476] phi from main::@47 to main::@165 [phi:main::@47->main::@165] - // main::@165 + // [504] phi from main::@53 to main::@183 [phi:main::@53->main::@183] + // main::@183 // smc_read(1) - // [477] call smc_read - // [1056] phi from main::@165 to smc_read [phi:main::@165->smc_read] - // [1056] phi smc_read::display_progress#19 = 1 [phi:main::@165->smc_read#0] -- vbum1=vbuc1 + // [505] call smc_read + // [1101] phi from main::@183 to smc_read [phi:main::@183->smc_read] + // [1101] phi smc_read::display_progress#19 = 1 [phi:main::@183->smc_read#0] -- vbum1=vbuc1 lda #1 sta smc_read.display_progress - // [1056] phi __errno#35 = __errno#112 [phi:main::@165->smc_read#1] -- register_copy + // [1101] phi __errno#35 = __errno#114 [phi:main::@183->smc_read#1] -- register_copy jsr smc_read // smc_read(1) - // [478] smc_read::return#3 = smc_read::return#0 - // main::@166 + // [506] smc_read::return#3 = smc_read::return#0 + // main::@184 // smc_file_size = smc_read(1) - // [479] smc_file_size#1 = smc_read::return#3 -- vwum1=vwuz2 - lda.z smc_read.return - sta smc_file_size - lda.z smc_read.return+1 - sta smc_file_size+1 + // [507] smc_file_size#1 = smc_read::return#3 -- vwum1=vwum2 + lda smc_read.return + sta smc_file_size_1 + lda smc_read.return+1 + sta smc_file_size_1+1 // if(smc_file_size) - // [480] if(0==smc_file_size#1) goto main::@37 -- 0_eq_vwum1_then_la1 - lda smc_file_size - ora smc_file_size+1 - bne !__b37+ - jmp __b37 - !__b37: - // [481] phi from main::@166 to main::@48 [phi:main::@166->main::@48] - // main::@48 + // [508] if(0==smc_file_size#1) goto main::@43 -- 0_eq_vwum1_then_la1 + lda smc_file_size_1 + ora smc_file_size_1+1 + bne !__b43+ + jmp __b43 + !__b43: + // [509] phi from main::@184 to main::@54 [phi:main::@184->main::@54] + // main::@54 // display_action_text("Press both POWER/RESET buttons on the CX16 board!") - // [482] call display_action_text + // [510] call display_action_text // Flash the SMC chip. - // [1176] phi from main::@48 to display_action_text [phi:main::@48->display_action_text] - // [1176] phi display_action_text::info_text#19 = main::info_text17 [phi:main::@48->display_action_text#0] -- pbuz1=pbuc1 - lda #display_action_text] + // [1262] phi display_action_text::info_text#19 = main::info_text23 [phi:main::@54->display_action_text#0] -- pbuz1=pbuc1 + lda #info_text17 + lda #>info_text23 sta.z display_action_text.info_text+1 jsr display_action_text - // [483] phi from main::@48 to main::@167 [phi:main::@48->main::@167] - // main::@167 + // [511] phi from main::@54 to main::@185 [phi:main::@54->main::@185] + // main::@185 // display_info_smc(STATUS_FLASHING, "Press POWER/RESET!") - // [484] call display_info_smc - // [870] phi from main::@167 to display_info_smc [phi:main::@167->display_info_smc] - // [870] phi display_info_smc::info_text#14 = main::info_text18 [phi:main::@167->display_info_smc#0] -- pbuz1=pbuc1 - lda #display_info_smc] + // [915] phi display_info_smc::info_text#17 = main::info_text24 [phi:main::@185->display_info_smc#0] -- pbuz1=pbuc1 + lda #info_text18 + lda #>info_text24 sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_FLASHING [phi:main::@167->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_FLASHING [phi:main::@185->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_FLASHING sta.z display_info_smc.info_status jsr display_info_smc - // main::@168 + // main::@186 // unsigned long flashed_bytes = smc_flash(smc_file_size) - // [485] smc_flash::smc_bytes_total#0 = smc_file_size#1 -- vwum1=vwum2 - lda smc_file_size + // [513] smc_flash::smc_bytes_total#0 = smc_file_size#1 -- vwum1=vwum2 + lda smc_file_size_1 sta smc_flash.smc_bytes_total - lda smc_file_size+1 + lda smc_file_size_1+1 sta smc_flash.smc_bytes_total+1 - // [486] call smc_flash - // [1524] phi from main::@168 to smc_flash [phi:main::@168->smc_flash] + // [514] call smc_flash + // [1610] phi from main::@186 to smc_flash [phi:main::@186->smc_flash] jsr smc_flash // unsigned long flashed_bytes = smc_flash(smc_file_size) - // [487] smc_flash::return#5 = smc_flash::return#1 - // main::@169 - // [488] main::flashed_bytes#0 = smc_flash::return#5 -- vdum1=vwuz2 + // [515] smc_flash::return#5 = smc_flash::return#1 + // main::@187 + // [516] main::flashed_bytes#0 = smc_flash::return#5 -- vdum1=vwuz2 lda.z smc_flash.return sta flashed_bytes lda.z smc_flash.return+1 @@ -2881,410 +3163,513 @@ main: { sta flashed_bytes+2 sta flashed_bytes+3 // if(flashed_bytes) - // [489] if(0!=main::flashed_bytes#0) goto main::@38 -- 0_neq_vdum1_then_la1 + // [517] if(0!=main::flashed_bytes#0) goto main::@44 -- 0_neq_vdum1_then_la1 lda flashed_bytes ora flashed_bytes+1 ora flashed_bytes+2 ora flashed_bytes+3 - bne __b38 - // [490] phi from main::@169 to main::@49 [phi:main::@169->main::@49] - // main::@49 + bne __b44 + // [518] phi from main::@187 to main::@55 [phi:main::@187->main::@55] + // main::@55 // display_info_smc(STATUS_ERROR, "SMC not updated!") - // [491] call display_info_smc - // [870] phi from main::@49 to display_info_smc [phi:main::@49->display_info_smc] - // [870] phi display_info_smc::info_text#14 = main::info_text20 [phi:main::@49->display_info_smc#0] -- pbuz1=pbuc1 - lda #display_info_smc] + // [915] phi display_info_smc::info_text#17 = main::info_text26 [phi:main::@55->display_info_smc#0] -- pbuz1=pbuc1 + lda #info_text20 + lda #>info_text26 sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_ERROR [phi:main::@49->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_ERROR [phi:main::@55->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_ERROR sta.z display_info_smc.info_status jsr display_info_smc - jmp __b37 - // [492] phi from main::@169 to main::@38 [phi:main::@169->main::@38] - // main::@38 - __b38: + jmp __b43 + // [520] phi from main::@187 to main::@44 [phi:main::@187->main::@44] + // main::@44 + __b44: // display_info_smc(STATUS_FLASHED, "") - // [493] call display_info_smc - // [870] phi from main::@38 to display_info_smc [phi:main::@38->display_info_smc] - // [870] phi display_info_smc::info_text#14 = info_text4 [phi:main::@38->display_info_smc#0] -- pbuz1=pbuc1 + // [521] call display_info_smc + // [915] phi from main::@44 to display_info_smc [phi:main::@44->display_info_smc] + // [915] phi display_info_smc::info_text#17 = info_text4 [phi:main::@44->display_info_smc#0] -- pbuz1=pbuc1 lda #info_text4 sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_FLASHED [phi:main::@38->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_FLASHED [phi:main::@44->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_FLASHED sta.z display_info_smc.info_status jsr display_info_smc - jmp __b37 - // [494] phi from main::@214 main::@215 to main::@4 [phi:main::@214/main::@215->main::@4] - // main::@4 - __b4: + jmp __b43 + // [522] phi from main::@235 main::@236 to main::@10 [phi:main::@235/main::@236->main::@10] + // main::@10 + __b10: // display_action_progress("Chipsets have been detected and update files validated!") - // [495] call display_action_progress - // [812] phi from main::@4 to display_action_progress [phi:main::@4->display_action_progress] - // [812] phi display_action_progress::info_text#15 = main::info_text11 [phi:main::@4->display_action_progress#0] -- pbuz1=pbuc1 - lda #display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text17 [phi:main::@10->display_action_progress#0] -- pbuz1=pbuc1 + lda #info_text11 + lda #>info_text17 sta.z display_action_progress.info_text+1 jsr display_action_progress - // [496] phi from main::@4 to main::@160 [phi:main::@4->main::@160] - // main::@160 + // [524] phi from main::@10 to main::@178 [phi:main::@10->main::@178] + // main::@178 // unsigned char ch = util_wait_key("Continue with update of highlighted chipsets? [Y/N]", "nyNY") - // [497] call util_wait_key - // [1686] phi from main::@160 to util_wait_key [phi:main::@160->util_wait_key] - // [1686] phi util_wait_key::filter#12 = main::filter [phi:main::@160->util_wait_key#0] -- pbuz1=pbuc1 - lda #util_wait_key] + // [1212] phi util_wait_key::filter#13 = main::filter1 [phi:main::@178->util_wait_key#0] -- pbuz1=pbuc1 + lda #filter + lda #>filter1 sta.z util_wait_key.filter+1 - // [1686] phi util_wait_key::info_text#2 = main::info_text12 [phi:main::@160->util_wait_key#1] -- pbuz1=pbuc1 - lda #util_wait_key#1] -- pbuz1=pbuc1 + lda #info_text12 + lda #>info_text18 sta.z util_wait_key.info_text+1 jsr util_wait_key // unsigned char ch = util_wait_key("Continue with update of highlighted chipsets? [Y/N]", "nyNY") - // [498] util_wait_key::return#3 = util_wait_key::ch#4 -- vbuaa=vwum1 + // [526] util_wait_key::return#4 = util_wait_key::ch#4 -- vbum1=vwum2 lda util_wait_key.ch - // main::@161 - // [499] main::ch#0 = util_wait_key::return#3 + sta util_wait_key.return_1 + // main::@179 + // [527] main::ch1#0 = util_wait_key::return#4 // strchr("nN", ch) - // [500] strchr::c#1 = main::ch#0 -- vbuz1=vbuaa - sta.z strchr.c - // [501] call strchr - // [1710] phi from main::@161 to strchr [phi:main::@161->strchr] - // [1710] phi strchr::c#4 = strchr::c#1 [phi:main::@161->strchr#0] -- register_copy - // [1710] phi strchr::str#2 = (const void *)main::$268 [phi:main::@161->strchr#1] -- pvoz1=pvoc1 - lda #strchr] + // [1772] phi strchr::c#4 = strchr::c#1 [phi:main::@179->strchr#0] -- register_copy + // [1772] phi strchr::str#2 = (const void *)main::$297 [phi:main::@179->strchr#1] -- pvoz1=pvoc1 + lda #main__268 + lda #>main__297 sta.z strchr.str+1 jsr strchr // strchr("nN", ch) - // [502] strchr::return#4 = strchr::return#2 - // main::@162 - // [503] main::$159 = strchr::return#4 + // [530] strchr::return#4 = strchr::return#2 + // main::@180 + // [531] main::$187 = strchr::return#4 // if(strchr("nN", ch)) - // [504] if((void *)0==main::$159) goto main::bank_set_bram2 -- pvoc1_eq_pvoz1_then_la1 - lda.z main__159 + // [532] if((void *)0==main::$187) goto main::bank_set_bram2 -- pvoc1_eq_pvoz1_then_la1 + lda.z main__187 cmp #<0 bne !+ - lda.z main__159+1 + lda.z main__187+1 cmp #>0 bne !bank_set_bram2+ jmp bank_set_bram2 !bank_set_bram2: !: - // [505] phi from main::@162 to main::@5 [phi:main::@162->main::@5] - // main::@5 + // [533] phi from main::@180 to main::@11 [phi:main::@180->main::@11] + // main::@11 // display_info_smc(STATUS_SKIP, "Cancelled") - // [506] call display_info_smc + // [534] call display_info_smc // We cancel all updates, the updates are skipped. - // [870] phi from main::@5 to display_info_smc [phi:main::@5->display_info_smc] - // [870] phi display_info_smc::info_text#14 = main::info_text13 [phi:main::@5->display_info_smc#0] -- pbuz1=pbuc1 - lda #display_info_smc] + // [915] phi display_info_smc::info_text#17 = main::info_text19 [phi:main::@11->display_info_smc#0] -- pbuz1=pbuc1 + lda #info_text13 + lda #>info_text19 sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_SKIP [phi:main::@5->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_SKIP [phi:main::@11->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_SKIP sta.z display_info_smc.info_status jsr display_info_smc - // [507] phi from main::@5 to main::@163 [phi:main::@5->main::@163] - // main::@163 + // [535] phi from main::@11 to main::@181 [phi:main::@11->main::@181] + // main::@181 // display_info_vera(STATUS_SKIP, "Cancelled") - // [508] call display_info_vera - // [900] phi from main::@163 to display_info_vera [phi:main::@163->display_info_vera] - // [900] phi display_info_vera::info_text#10 = main::info_text13 [phi:main::@163->display_info_vera#0] -- pbuz1=pbuc1 - lda #display_info_vera] + // [945] phi display_info_vera::info_text#10 = main::info_text19 [phi:main::@181->display_info_vera#0] -- pbuz1=pbuc1 + lda #info_text13 + lda #>info_text19 sta.z display_info_vera.info_text+1 - // [900] phi display_info_vera::info_status#3 = STATUS_SKIP [phi:main::@163->display_info_vera#1] -- vbuz1=vbuc1 + // [945] phi display_info_vera::info_status#3 = STATUS_SKIP [phi:main::@181->display_info_vera#1] -- vbuz1=vbuc1 lda #STATUS_SKIP sta.z display_info_vera.info_status jsr display_info_vera - // [509] phi from main::@163 to main::@34 [phi:main::@163->main::@34] - // [509] phi main::rom_chip3#2 = 0 [phi:main::@163->main::@34#0] -- vbum1=vbuc1 + // [537] phi from main::@181 to main::@40 [phi:main::@181->main::@40] + // [537] phi main::rom_chip3#2 = 0 [phi:main::@181->main::@40#0] -- vbum1=vbuc1 lda #0 sta rom_chip3 - // main::@34 - __b34: + // main::@40 + __b40: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [510] if(main::rom_chip3#2<8) goto main::@35 -- vbum1_lt_vbuc1_then_la1 + // [538] if(main::rom_chip3#2<8) goto main::@41 -- vbum1_lt_vbuc1_then_la1 lda rom_chip3 cmp #8 - bcc __b35 - // [511] phi from main::@34 to main::@36 [phi:main::@34->main::@36] - // main::@36 + bcc __b41 + // [539] phi from main::@40 to main::@42 [phi:main::@40->main::@42] + // main::@42 // display_action_text("You have selected not to cancel the update ... ") - // [512] call display_action_text - // [1176] phi from main::@36 to display_action_text [phi:main::@36->display_action_text] - // [1176] phi display_action_text::info_text#19 = main::info_text16 [phi:main::@36->display_action_text#0] -- pbuz1=pbuc1 - lda #display_action_text] + // [1262] phi display_action_text::info_text#19 = main::info_text22 [phi:main::@42->display_action_text#0] -- pbuz1=pbuc1 + lda #info_text16 + lda #>info_text22 sta.z display_action_text.info_text+1 jsr display_action_text jmp bank_set_bram2 - // main::@35 - __b35: + // main::@41 + __b41: // display_info_rom(rom_chip, STATUS_SKIP, "Cancelled") - // [513] display_info_rom::rom_chip#9 = main::rom_chip3#2 -- vbuz1=vbum2 + // [541] display_info_rom::rom_chip#9 = main::rom_chip3#2 -- vbuz1=vbum2 lda rom_chip3 sta.z display_info_rom.rom_chip - // [514] call display_info_rom - // [1199] phi from main::@35 to display_info_rom [phi:main::@35->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = main::info_text13 [phi:main::@35->display_info_rom#0] -- pbuz1=pbuc1 - lda #display_info_rom] + // [1285] phi display_info_rom::info_text#16 = main::info_text19 [phi:main::@41->display_info_rom#0] -- pbuz1=pbuc1 + lda #info_text13 + lda #>info_text19 sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#9 [phi:main::@35->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_SKIP [phi:main::@35->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#9 [phi:main::@41->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_SKIP [phi:main::@41->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_SKIP - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - // main::@164 + // main::@182 // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [515] main::rom_chip3#1 = ++ main::rom_chip3#2 -- vbum1=_inc_vbum1 + // [543] main::rom_chip3#1 = ++ main::rom_chip3#2 -- vbum1=_inc_vbum1 inc rom_chip3 - // [509] phi from main::@164 to main::@34 [phi:main::@164->main::@34] - // [509] phi main::rom_chip3#2 = main::rom_chip3#1 [phi:main::@164->main::@34#0] -- register_copy - jmp __b34 + // [537] phi from main::@182 to main::@40 [phi:main::@182->main::@40] + // [537] phi main::rom_chip3#2 = main::rom_chip3#1 [phi:main::@182->main::@40#0] -- register_copy + jmp __b40 // main::check_status_card_roms1_check_status_rom1 check_status_card_roms1_check_status_rom1: // status_rom[rom_chip] == status - // [516] main::check_status_card_roms1_check_status_rom1_$0 = status_rom[main::check_status_card_roms1_rom_chip#2] == STATUS_FLASH -- vboaa=pbuc1_derefidx_vbuxx_eq_vbuc2 + // [544] main::check_status_card_roms1_check_status_rom1_$0 = status_rom[main::check_status_card_roms1_rom_chip#2] == STATUS_FLASH -- vbom1=pbuc1_derefidx_vbum2_eq_vbuc2 lda #STATUS_FLASH - eor status_rom,x + ldy check_status_card_roms1_rom_chip + eor status_rom,y beq !+ lda #1 !: eor #1 + sta check_status_card_roms1_check_status_rom1_main__0 // return (unsigned char)(status_rom[rom_chip] == status); - // [517] main::check_status_card_roms1_check_status_rom1_return#0 = (char)main::check_status_card_roms1_check_status_rom1_$0 + // [545] main::check_status_card_roms1_check_status_rom1_return#0 = (char)main::check_status_card_roms1_check_status_rom1_$0 // main::check_status_card_roms1_@11 // if(check_status_rom(rom_chip, status)) - // [518] if(0==main::check_status_card_roms1_check_status_rom1_return#0) goto main::check_status_card_roms1_@4 -- 0_eq_vbuaa_then_la1 - cmp #0 + // [546] if(0==main::check_status_card_roms1_check_status_rom1_return#0) goto main::check_status_card_roms1_@4 -- 0_eq_vbum1_then_la1 + lda check_status_card_roms1_check_status_rom1_return beq check_status_card_roms1___b4 - // [375] phi from main::check_status_card_roms1_@11 to main::check_status_card_roms1_@return [phi:main::check_status_card_roms1_@11->main::check_status_card_roms1_@return] - // [375] phi main::check_status_card_roms1_return#2 = STATUS_FLASH [phi:main::check_status_card_roms1_@11->main::check_status_card_roms1_@return#0] -- vbuxx=vbuc1 - ldx #STATUS_FLASH - jmp __b70 + // [403] phi from main::check_status_card_roms1_@11 to main::check_status_card_roms1_@return [phi:main::check_status_card_roms1_@11->main::check_status_card_roms1_@return] + // [403] phi main::check_status_card_roms1_return#2 = 1 [phi:main::check_status_card_roms1_@11->main::check_status_card_roms1_@return#0] -- vbum1=vbuc1 + lda #1 + sta check_status_card_roms1_return + jmp __b77 // main::check_status_card_roms1_@4 check_status_card_roms1___b4: // for(unsigned char rom_chip = 1; rom_chip < 8; rom_chip++) - // [519] main::check_status_card_roms1_rom_chip#1 = ++ main::check_status_card_roms1_rom_chip#2 -- vbuxx=_inc_vbuxx - inx - // [373] phi from main::check_status_card_roms1_@4 to main::check_status_card_roms1_@1 [phi:main::check_status_card_roms1_@4->main::check_status_card_roms1_@1] - // [373] phi main::check_status_card_roms1_rom_chip#2 = main::check_status_card_roms1_rom_chip#1 [phi:main::check_status_card_roms1_@4->main::check_status_card_roms1_@1#0] -- register_copy + // [547] main::check_status_card_roms1_rom_chip#1 = ++ main::check_status_card_roms1_rom_chip#2 -- vbum1=_inc_vbum1 + inc check_status_card_roms1_rom_chip + // [401] phi from main::check_status_card_roms1_@4 to main::check_status_card_roms1_@1 [phi:main::check_status_card_roms1_@4->main::check_status_card_roms1_@1] + // [401] phi main::check_status_card_roms1_rom_chip#2 = main::check_status_card_roms1_rom_chip#1 [phi:main::check_status_card_roms1_@4->main::check_status_card_roms1_@1#0] -- register_copy jmp check_status_card_roms1___b1 - // main::check_status_roms_all2_check_status_rom1 - check_status_roms_all2_check_status_rom1: + // main::check_status_roms2_check_status_rom1 + check_status_roms2_check_status_rom1: // status_rom[rom_chip] == status - // [520] main::check_status_roms_all2_check_status_rom1_$0 = status_rom[main::check_status_roms_all2_rom_chip#2] == STATUS_ERROR -- vboaa=pbuc1_derefidx_vbuxx_eq_vbuc2 + // [548] main::check_status_roms2_check_status_rom1_$0 = status_rom[main::check_status_roms2_rom_chip#2] == STATUS_ERROR -- vboz1=pbuc1_derefidx_vbum2_eq_vbuc2 lda #STATUS_ERROR - eor status_rom,x + ldy check_status_roms2_rom_chip + eor status_rom,y beq !+ lda #1 !: eor #1 + sta.z check_status_roms2_check_status_rom1_main__0 // return (unsigned char)(status_rom[rom_chip] == status); - // [521] main::check_status_roms_all2_check_status_rom1_return#0 = (char)main::check_status_roms_all2_check_status_rom1_$0 - // main::check_status_roms_all2_@11 - // if(check_status_rom(rom_chip, status) != status) - // [522] if(main::check_status_roms_all2_check_status_rom1_return#0==STATUS_ERROR) goto main::check_status_roms_all2_@4 -- vbuaa_eq_vbuc1_then_la1 - cmp #STATUS_ERROR - beq check_status_roms_all2___b4 - // [242] phi from main::check_status_roms_all2_@11 to main::check_status_roms_all2_@return [phi:main::check_status_roms_all2_@11->main::check_status_roms_all2_@return] - // [242] phi main::check_status_roms_all2_return#2 = 0 [phi:main::check_status_roms_all2_@11->main::check_status_roms_all2_@return#0] -- vbuxx=vbuc1 - ldx #0 - jmp __b68 - // main::check_status_roms_all2_@4 - check_status_roms_all2___b4: + // [549] main::check_status_roms2_check_status_rom1_return#0 = (char)main::check_status_roms2_check_status_rom1_$0 + // main::check_status_roms2_@11 + // if(check_status_rom(rom_chip, status)) + // [550] if(0==main::check_status_roms2_check_status_rom1_return#0) goto main::check_status_roms2_@4 -- 0_eq_vbuz1_then_la1 + lda.z check_status_roms2_check_status_rom1_return + beq check_status_roms2___b4 + // [270] phi from main::check_status_roms2_@11 to main::check_status_roms2_@return [phi:main::check_status_roms2_@11->main::check_status_roms2_@return] + // [270] phi main::check_status_roms2_return#2 = 1 [phi:main::check_status_roms2_@11->main::check_status_roms2_@return#0] -- vbum1=vbuc1 + lda #1 + sta check_status_roms2_return + jmp __b75 + // main::check_status_roms2_@4 + check_status_roms2___b4: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [523] main::check_status_roms_all2_rom_chip#1 = ++ main::check_status_roms_all2_rom_chip#2 -- vbuxx=_inc_vbuxx - inx - // [240] phi from main::check_status_roms_all2_@4 to main::check_status_roms_all2_@1 [phi:main::check_status_roms_all2_@4->main::check_status_roms_all2_@1] - // [240] phi main::check_status_roms_all2_rom_chip#2 = main::check_status_roms_all2_rom_chip#1 [phi:main::check_status_roms_all2_@4->main::check_status_roms_all2_@1#0] -- register_copy - jmp check_status_roms_all2___b1 - // main::check_status_roms_all1_check_status_rom1 - check_status_roms_all1_check_status_rom1: + // [551] main::check_status_roms2_rom_chip#1 = ++ main::check_status_roms2_rom_chip#2 -- vbum1=_inc_vbum1 + inc check_status_roms2_rom_chip + // [268] phi from main::check_status_roms2_@4 to main::check_status_roms2_@1 [phi:main::check_status_roms2_@4->main::check_status_roms2_@1] + // [268] phi main::check_status_roms2_rom_chip#2 = main::check_status_roms2_rom_chip#1 [phi:main::check_status_roms2_@4->main::check_status_roms2_@1#0] -- register_copy + jmp check_status_roms2___b1 + // main::check_status_roms1_check_status_rom1 + check_status_roms1_check_status_rom1: // status_rom[rom_chip] == status - // [524] main::check_status_roms_all1_check_status_rom1_$0 = status_rom[main::check_status_roms_all1_rom_chip#2] == STATUS_ISSUE -- vboaa=pbuc1_derefidx_vbuxx_eq_vbuc2 + // [552] main::check_status_roms1_check_status_rom1_$0 = status_rom[main::check_status_roms1_rom_chip#2] == STATUS_ISSUE -- vboz1=pbuc1_derefidx_vbum2_eq_vbuc2 lda #STATUS_ISSUE - eor status_rom,x + ldy check_status_roms1_rom_chip + eor status_rom,y beq !+ lda #1 !: eor #1 + sta.z check_status_roms1_check_status_rom1_main__0 // return (unsigned char)(status_rom[rom_chip] == status); - // [525] main::check_status_roms_all1_check_status_rom1_return#0 = (char)main::check_status_roms_all1_check_status_rom1_$0 - // main::check_status_roms_all1_@11 - // if(check_status_rom(rom_chip, status) != status) - // [526] if(main::check_status_roms_all1_check_status_rom1_return#0==STATUS_ISSUE) goto main::check_status_roms_all1_@4 -- vbuaa_eq_vbuc1_then_la1 - cmp #STATUS_ISSUE - beq check_status_roms_all1___b4 - // [234] phi from main::check_status_roms_all1_@11 to main::check_status_roms_all1_@return [phi:main::check_status_roms_all1_@11->main::check_status_roms_all1_@return] - // [234] phi main::check_status_roms_all1_return#2 = 0 [phi:main::check_status_roms_all1_@11->main::check_status_roms_all1_@return#0] -- vbum1=vbuc1 - lda #0 - sta check_status_roms_all1_return - jmp check_status_smc5 - // main::check_status_roms_all1_@4 - check_status_roms_all1___b4: + // [553] main::check_status_roms1_check_status_rom1_return#0 = (char)main::check_status_roms1_check_status_rom1_$0 + // main::check_status_roms1_@11 + // if(check_status_rom(rom_chip, status)) + // [554] if(0==main::check_status_roms1_check_status_rom1_return#0) goto main::check_status_roms1_@4 -- 0_eq_vbuz1_then_la1 + lda.z check_status_roms1_check_status_rom1_return + beq check_status_roms1___b4 + // [262] phi from main::check_status_roms1_@11 to main::check_status_roms1_@return [phi:main::check_status_roms1_@11->main::check_status_roms1_@return] + // [262] phi main::check_status_roms1_return#2 = 1 [phi:main::check_status_roms1_@11->main::check_status_roms1_@return#0] -- vbum1=vbuc1 + lda #1 + sta check_status_roms1_return + jmp check_status_smc6 + // main::check_status_roms1_@4 + check_status_roms1___b4: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [527] main::check_status_roms_all1_rom_chip#1 = ++ main::check_status_roms_all1_rom_chip#2 -- vbuxx=_inc_vbuxx - inx - // [232] phi from main::check_status_roms_all1_@4 to main::check_status_roms_all1_@1 [phi:main::check_status_roms_all1_@4->main::check_status_roms_all1_@1] - // [232] phi main::check_status_roms_all1_rom_chip#2 = main::check_status_roms_all1_rom_chip#1 [phi:main::check_status_roms_all1_@4->main::check_status_roms_all1_@1#0] -- register_copy - jmp check_status_roms_all1___b1 - // [528] phi from main::@206 to main::@3 [phi:main::@206->main::@3] + // [555] main::check_status_roms1_rom_chip#1 = ++ main::check_status_roms1_rom_chip#2 -- vbum1=_inc_vbum1 + inc check_status_roms1_rom_chip + // [260] phi from main::check_status_roms1_@4 to main::check_status_roms1_@1 [phi:main::check_status_roms1_@4->main::check_status_roms1_@1] + // [260] phi main::check_status_roms1_rom_chip#2 = main::check_status_roms1_rom_chip#1 [phi:main::check_status_roms1_@4->main::check_status_roms1_@1#0] -- register_copy + jmp check_status_roms1___b1 + // [556] phi from main::@226 to main::@7 [phi:main::@226->main::@7] + // main::@7 + __b7: + // display_action_progress("The SMC chip and SMC.BIN versions are equal, no flash required!") + // [557] call display_action_progress + // [857] phi from main::@7 to display_action_progress [phi:main::@7->display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text14 [phi:main::@7->display_action_progress#0] -- pbuz1=pbuc1 + lda #info_text14 + sta.z display_action_progress.info_text+1 + jsr display_action_progress + // [558] phi from main::@7 to main::@172 [phi:main::@7->main::@172] + // main::@172 + // display_info_smc(STATUS_SKIP, NULL) + // [559] call display_info_smc + // [915] phi from main::@172 to display_info_smc [phi:main::@172->display_info_smc] + // [915] phi display_info_smc::info_text#17 = 0 [phi:main::@172->display_info_smc#0] -- pbuz1=vbuc1 + lda #<0 + sta.z display_info_smc.info_text + sta.z display_info_smc.info_text+1 + // [915] phi display_info_smc::info_status#17 = STATUS_SKIP [phi:main::@172->display_info_smc#1] -- vbuz1=vbuc1 + lda #STATUS_SKIP + sta.z display_info_smc.info_status + jsr display_info_smc + // [560] phi from main::@172 to main::@173 [phi:main::@172->main::@173] + // main::@173 + // util_wait_space() + // [561] call util_wait_space + // [1098] phi from main::@173 to util_wait_space [phi:main::@173->util_wait_space] + jsr util_wait_space + jmp __b5 + // [562] phi from main::@225 to main::@6 [phi:main::@225->main::@6] + // main::@6 + __b6: + // display_action_progress("CX16 ROM update issue!") + // [563] call display_action_progress + // [857] phi from main::@6 to display_action_progress [phi:main::@6->display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text12 [phi:main::@6->display_action_progress#0] -- pbuz1=pbuc1 + lda #info_text12 + sta.z display_action_progress.info_text+1 + jsr display_action_progress + // [564] phi from main::@6 to main::@167 [phi:main::@6->main::@167] + // main::@167 + // display_progress_text(display_smc_rom_issue_text, display_smc_rom_issue_count) + // [565] call display_progress_text + // [1088] phi from main::@167 to display_progress_text [phi:main::@167->display_progress_text] + // [1088] phi display_progress_text::text#12 = display_smc_rom_issue_text [phi:main::@167->display_progress_text#0] -- qbuz1=qbuc1 + lda #display_smc_rom_issue_text + sta.z display_progress_text.text+1 + // [1088] phi display_progress_text::lines#11 = display_smc_rom_issue_count [phi:main::@167->display_progress_text#1] -- vbuz1=vbuc1 + lda #display_smc_rom_issue_count + sta.z display_progress_text.lines + jsr display_progress_text + // [566] phi from main::@167 to main::@168 [phi:main::@167->main::@168] + // main::@168 + // display_info_smc(STATUS_SKIP, "Issue with main CX16 ROM!") + // [567] call display_info_smc + // [915] phi from main::@168 to display_info_smc [phi:main::@168->display_info_smc] + // [915] phi display_info_smc::info_text#17 = main::info_text10 [phi:main::@168->display_info_smc#0] -- pbuz1=pbuc1 + lda #info_text10 + sta.z display_info_smc.info_text+1 + // [915] phi display_info_smc::info_status#17 = STATUS_SKIP [phi:main::@168->display_info_smc#1] -- vbuz1=vbuc1 + lda #STATUS_SKIP + sta.z display_info_smc.info_status + jsr display_info_smc + // [568] phi from main::@168 to main::@169 [phi:main::@168->main::@169] + // main::@169 + // display_info_cx16_rom(STATUS_ISSUE, NULL) + // [569] call display_info_cx16_rom + // [1236] phi from main::@169 to display_info_cx16_rom [phi:main::@169->display_info_cx16_rom] + // [1236] phi display_info_cx16_rom::info_text#4 = 0 [phi:main::@169->display_info_cx16_rom#0] -- pbuz1=vbuc1 + lda #<0 + sta.z display_info_cx16_rom.info_text + sta.z display_info_cx16_rom.info_text+1 + // [1236] phi display_info_cx16_rom::info_status#4 = STATUS_ISSUE [phi:main::@169->display_info_cx16_rom#1] -- vbuz1=vbuc1 + lda #STATUS_ISSUE + sta.z display_info_cx16_rom.info_status + jsr display_info_cx16_rom + // [570] phi from main::@169 to main::@170 [phi:main::@169->main::@170] + // main::@170 + // util_wait_space() + // [571] call util_wait_space + // [1098] phi from main::@170 to util_wait_space [phi:main::@170->util_wait_space] + jsr util_wait_space + jmp __b4 + // [572] phi from main::@224 to main::@3 [phi:main::@224->main::@3] // main::@3 __b3: - // display_action_progress("Please check the main CX16 ROM update issue!") - // [529] call display_action_progress - // [812] phi from main::@3 to display_action_progress [phi:main::@3->display_action_progress] - // [812] phi display_action_progress::info_text#15 = main::info_text9 [phi:main::@3->display_action_progress#0] -- pbuz1=pbuc1 + // display_action_progress("CX16 ROM update issue, ROM not detected!") + // [573] call display_action_progress + // [857] phi from main::@3 to display_action_progress [phi:main::@3->display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text9 [phi:main::@3->display_action_progress#0] -- pbuz1=pbuc1 lda #info_text9 sta.z display_action_progress.info_text+1 jsr display_action_progress - // [530] phi from main::@3 to main::@156 [phi:main::@3->main::@156] - // main::@156 - // display_progress_text(display_smc_rom_issue__text, display_smc_rom_issue_count) - // [531] call display_progress_text - // [926] phi from main::@156 to display_progress_text [phi:main::@156->display_progress_text] - // [926] phi display_progress_text::text#10 = display_smc_rom_issue__text [phi:main::@156->display_progress_text#0] -- qbuz1=qbuc1 - lda #main::@163] + // main::@163 + // display_progress_text(display_smc_rom_issue_text, display_smc_rom_issue_count) + // [575] call display_progress_text + // [1088] phi from main::@163 to display_progress_text [phi:main::@163->display_progress_text] + // [1088] phi display_progress_text::text#12 = display_smc_rom_issue_text [phi:main::@163->display_progress_text#0] -- qbuz1=qbuc1 + lda #display_smc_rom_issue__text + lda #>display_smc_rom_issue_text sta.z display_progress_text.text+1 - // [926] phi display_progress_text::lines#11 = display_smc_rom_issue_count [phi:main::@156->display_progress_text#1] -- vbuz1=vbuc1 + // [1088] phi display_progress_text::lines#11 = display_smc_rom_issue_count [phi:main::@163->display_progress_text#1] -- vbuz1=vbuc1 lda #display_smc_rom_issue_count sta.z display_progress_text.lines jsr display_progress_text - // [532] phi from main::@156 to main::@157 [phi:main::@156->main::@157] - // main::@157 + // [576] phi from main::@163 to main::@164 [phi:main::@163->main::@164] + // main::@164 // display_info_smc(STATUS_SKIP, "Issue with main CX16 ROM!") - // [533] call display_info_smc - // [870] phi from main::@157 to display_info_smc [phi:main::@157->display_info_smc] - // [870] phi display_info_smc::info_text#14 = main::info_text10 [phi:main::@157->display_info_smc#0] -- pbuz1=pbuc1 + // [577] call display_info_smc + // [915] phi from main::@164 to display_info_smc [phi:main::@164->display_info_smc] + // [915] phi display_info_smc::info_text#17 = main::info_text10 [phi:main::@164->display_info_smc#0] -- pbuz1=pbuc1 lda #info_text10 sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_SKIP [phi:main::@157->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_SKIP [phi:main::@164->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_SKIP sta.z display_info_smc.info_status jsr display_info_smc - // [534] phi from main::@157 to main::@158 [phi:main::@157->main::@158] - // main::@158 - // display_info_cx16_rom(STATUS_ISSUE, NULL) - // [535] call display_info_cx16_rom - // [1719] phi from main::@158 to display_info_cx16_rom [phi:main::@158->display_info_cx16_rom] - // [1719] phi display_info_cx16_rom::info_text#2 = 0 [phi:main::@158->display_info_cx16_rom#0] -- pbuz1=vbuc1 - lda #<0 + // [578] phi from main::@164 to main::@165 [phi:main::@164->main::@165] + // main::@165 + // display_info_cx16_rom(STATUS_ISSUE, "Are J1 jumper pins closed?") + // [579] call display_info_cx16_rom + // [1236] phi from main::@165 to display_info_cx16_rom [phi:main::@165->display_info_cx16_rom] + // [1236] phi display_info_cx16_rom::info_text#4 = main::info_text11 [phi:main::@165->display_info_cx16_rom#0] -- pbuz1=pbuc1 + lda #info_text11 sta.z display_info_cx16_rom.info_text+1 - // [1719] phi display_info_cx16_rom::info_status#2 = STATUS_ISSUE [phi:main::@158->display_info_cx16_rom#1] -- vbuxx=vbuc1 - ldx #STATUS_ISSUE + // [1236] phi display_info_cx16_rom::info_status#4 = STATUS_ISSUE [phi:main::@165->display_info_cx16_rom#1] -- vbuz1=vbuc1 + lda #STATUS_ISSUE + sta.z display_info_cx16_rom.info_status jsr display_info_cx16_rom - // [536] phi from main::@158 to main::@159 [phi:main::@158->main::@159] - // main::@159 + // [580] phi from main::@165 to main::@166 [phi:main::@165->main::@166] + // main::@166 // util_wait_space() - // [537] call util_wait_space - // [936] phi from main::@159 to util_wait_space [phi:main::@159->util_wait_space] + // [581] call util_wait_space + // [1098] phi from main::@166 to util_wait_space [phi:main::@166->util_wait_space] jsr util_wait_space - jmp check_status_smc4 - // [538] phi from main::@205 to main::@33 [phi:main::@205->main::@33] - // main::@33 - __b33: - // display_action_progress("Please check the SMC update issue!") - // [539] call display_action_progress - // [812] phi from main::@33 to display_action_progress [phi:main::@33->display_action_progress] - // [812] phi display_action_progress::info_text#15 = main::info_text7 [phi:main::@33->display_action_progress#0] -- pbuz1=pbuc1 + jmp __b4 + // [582] phi from main::@223 to main::@39 [phi:main::@223->main::@39] + // main::@39 + __b39: + // display_action_progress("SMC update issue!") + // [583] call display_action_progress + // [857] phi from main::@39 to display_action_progress [phi:main::@39->display_action_progress] + // [857] phi display_action_progress::info_text#18 = main::info_text7 [phi:main::@39->display_action_progress#0] -- pbuz1=pbuc1 lda #info_text7 sta.z display_action_progress.info_text+1 jsr display_action_progress - // [540] phi from main::@33 to main::@152 [phi:main::@33->main::@152] - // main::@152 - // display_progress_text(display_smc_rom_issue__text, display_smc_rom_issue_count) - // [541] call display_progress_text - // [926] phi from main::@152 to display_progress_text [phi:main::@152->display_progress_text] - // [926] phi display_progress_text::text#10 = display_smc_rom_issue__text [phi:main::@152->display_progress_text#0] -- qbuz1=qbuc1 - lda #main::@159] + // main::@159 + // display_progress_text(display_smc_rom_issue_text, display_smc_rom_issue_count) + // [585] call display_progress_text + // [1088] phi from main::@159 to display_progress_text [phi:main::@159->display_progress_text] + // [1088] phi display_progress_text::text#12 = display_smc_rom_issue_text [phi:main::@159->display_progress_text#0] -- qbuz1=qbuc1 + lda #display_smc_rom_issue__text + lda #>display_smc_rom_issue_text sta.z display_progress_text.text+1 - // [926] phi display_progress_text::lines#11 = display_smc_rom_issue_count [phi:main::@152->display_progress_text#1] -- vbuz1=vbuc1 + // [1088] phi display_progress_text::lines#11 = display_smc_rom_issue_count [phi:main::@159->display_progress_text#1] -- vbuz1=vbuc1 lda #display_smc_rom_issue_count sta.z display_progress_text.lines jsr display_progress_text - // [542] phi from main::@152 to main::@153 [phi:main::@152->main::@153] - // main::@153 + // [586] phi from main::@159 to main::@160 [phi:main::@159->main::@160] + // main::@160 // display_info_cx16_rom(STATUS_SKIP, "Issue with SMC!") - // [543] call display_info_cx16_rom - // [1719] phi from main::@153 to display_info_cx16_rom [phi:main::@153->display_info_cx16_rom] - // [1719] phi display_info_cx16_rom::info_text#2 = main::info_text8 [phi:main::@153->display_info_cx16_rom#0] -- pbuz1=pbuc1 + // [587] call display_info_cx16_rom + // [1236] phi from main::@160 to display_info_cx16_rom [phi:main::@160->display_info_cx16_rom] + // [1236] phi display_info_cx16_rom::info_text#4 = main::info_text8 [phi:main::@160->display_info_cx16_rom#0] -- pbuz1=pbuc1 lda #info_text8 sta.z display_info_cx16_rom.info_text+1 - // [1719] phi display_info_cx16_rom::info_status#2 = STATUS_SKIP [phi:main::@153->display_info_cx16_rom#1] -- vbuxx=vbuc1 - ldx #STATUS_SKIP + // [1236] phi display_info_cx16_rom::info_status#4 = STATUS_SKIP [phi:main::@160->display_info_cx16_rom#1] -- vbuz1=vbuc1 + lda #STATUS_SKIP + sta.z display_info_cx16_rom.info_status jsr display_info_cx16_rom - // [544] phi from main::@153 to main::@154 [phi:main::@153->main::@154] - // main::@154 + // [588] phi from main::@160 to main::@161 [phi:main::@160->main::@161] + // main::@161 // display_info_smc(STATUS_ISSUE, NULL) - // [545] call display_info_smc - // [870] phi from main::@154 to display_info_smc [phi:main::@154->display_info_smc] - // [870] phi display_info_smc::info_text#14 = 0 [phi:main::@154->display_info_smc#0] -- pbuz1=vbuc1 + // [589] call display_info_smc + // [915] phi from main::@161 to display_info_smc [phi:main::@161->display_info_smc] + // [915] phi display_info_smc::info_text#17 = 0 [phi:main::@161->display_info_smc#0] -- pbuz1=vbuc1 lda #<0 sta.z display_info_smc.info_text sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_ISSUE [phi:main::@154->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_ISSUE [phi:main::@161->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_ISSUE sta.z display_info_smc.info_status jsr display_info_smc - // [546] phi from main::@154 to main::@155 [phi:main::@154->main::@155] - // main::@155 + // [590] phi from main::@161 to main::@162 [phi:main::@161->main::@162] + // main::@162 // util_wait_space() - // [547] call util_wait_space - // [936] phi from main::@155 to util_wait_space [phi:main::@155->util_wait_space] + // [591] call util_wait_space + // [1098] phi from main::@162 to util_wait_space [phi:main::@162->util_wait_space] jsr util_wait_space jmp check_status_smc3 - // main::bank_set_brom4 - bank_set_brom4: + // main::bank_set_brom5 + bank_set_brom5: // BROM = bank - // [548] BROM = main::bank_set_brom4_bank#0 -- vbuz1=vbuc1 - lda #bank_set_brom4_bank + // [592] BROM = main::bank_set_brom5_bank#0 -- vbuz1=vbuc1 + lda #bank_set_brom5_bank sta.z BROM - // main::@63 + // main::@69 // if(rom_device_ids[rom_chip] != UNKNOWN) - // [549] if(rom_device_ids[main::rom_chip2#10]==$55) goto main::@27 -- pbuc1_derefidx_vbum1_eq_vbuc2_then_la1 + // [593] if(rom_device_ids[main::rom_chip2#10]==$55) goto main::@33 -- pbuc1_derefidx_vbum1_eq_vbuc2_then_la1 ldy rom_chip2 lda rom_device_ids,y cmp #$55 - bne !__b27+ - jmp __b27 - !__b27: - // [550] phi from main::@63 to main::@30 [phi:main::@63->main::@30] - // main::@30 + bne !__b33+ + jmp __b33 + !__b33: + // [594] phi from main::@69 to main::@36 [phi:main::@69->main::@36] + // main::@36 // display_progress_clear() - // [551] call display_progress_clear - // [826] phi from main::@30 to display_progress_clear [phi:main::@30->display_progress_clear] + // [595] call display_progress_clear + // [871] phi from main::@36 to display_progress_clear [phi:main::@36->display_progress_clear] jsr display_progress_clear - // main::@130 + // main::@137 // unsigned char rom_bank = rom_chip * 32 - // [552] main::rom_bank#0 = main::rom_chip2#10 << 5 -- vbum1=vbum2_rol_5 + // [596] main::rom_bank#0 = main::rom_chip2#10 << 5 -- vbum1=vbum2_rol_5 lda rom_chip2 asl asl @@ -3293,117 +3678,118 @@ main: { asl sta rom_bank // unsigned char* file = rom_file(rom_chip) - // [553] rom_file::rom_chip#0 = main::rom_chip2#10 -- vbuaa=vbum1 + // [597] rom_file::rom_chip#0 = main::rom_chip2#10 -- vbuz1=vbum2 lda rom_chip2 - // [554] call rom_file - // [1242] phi from main::@130 to rom_file [phi:main::@130->rom_file] - // [1242] phi rom_file::rom_chip#2 = rom_file::rom_chip#0 [phi:main::@130->rom_file#0] -- register_copy + sta.z rom_file.rom_chip + // [598] call rom_file + // [1328] phi from main::@137 to rom_file [phi:main::@137->rom_file] + // [1328] phi rom_file::rom_chip#2 = rom_file::rom_chip#0 [phi:main::@137->rom_file#0] -- register_copy jsr rom_file // unsigned char* file = rom_file(rom_chip) - // [555] rom_file::return#4 = rom_file::return#2 - // main::@131 - // [556] main::file#0 = rom_file::return#4 -- pbum1=pbum2 + // [599] rom_file::return#4 = rom_file::return#2 + // main::@138 + // [600] main::file#0 = rom_file::return#4 -- pbum1=pbum2 lda rom_file.return sta file lda rom_file.return+1 sta file+1 // sprintf(info_text, "Checking %s ... (.) data ( ) empty", file) - // [557] call snprintf_init - // [982] phi from main::@131 to snprintf_init [phi:main::@131->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@131->snprintf_init#0] -- pbuz1=pbuc1 + // [601] call snprintf_init + // [1014] phi from main::@138 to snprintf_init [phi:main::@138->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@138->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [558] phi from main::@131 to main::@132 [phi:main::@131->main::@132] - // main::@132 + // [602] phi from main::@138 to main::@139 [phi:main::@138->main::@139] + // main::@139 // sprintf(info_text, "Checking %s ... (.) data ( ) empty", file) - // [559] call printf_str - // [987] phi from main::@132 to printf_str [phi:main::@132->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@132->printf_str#0] -- pprz1=pprc1 + // [603] call printf_str + // [1019] phi from main::@139 to printf_str [phi:main::@139->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@139->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s7 [phi:main::@132->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s7 [phi:main::@139->printf_str#1] -- pbuz1=pbuc1 lda #s7 sta.z printf_str.s+1 jsr printf_str - // main::@133 + // main::@140 // sprintf(info_text, "Checking %s ... (.) data ( ) empty", file) - // [560] printf_string::str#16 = main::file#0 -- pbuz1=pbum2 + // [604] printf_string::str#16 = main::file#0 -- pbuz1=pbum2 lda file sta.z printf_string.str lda file+1 sta.z printf_string.str+1 - // [561] call printf_string - // [1130] phi from main::@133 to printf_string [phi:main::@133->printf_string] - // [1130] phi printf_string::putc#22 = &snputc [phi:main::@133->printf_string#0] -- pprz1=pprc1 + // [605] call printf_string + // [1180] phi from main::@140 to printf_string [phi:main::@140->printf_string] + // [1180] phi printf_string::putc#22 = &snputc [phi:main::@140->printf_string#0] -- pprz1=pprc1 lda #snputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#16 [phi:main::@133->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 0 [phi:main::@133->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#16 [phi:main::@140->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 0 [phi:main::@140->printf_string#2] -- vbuz1=vbuc1 lda #0 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 0 [phi:main::@133->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 0 [phi:main::@140->printf_string#3] -- vbuz1=vbuc1 sta.z printf_string.format_min_length jsr printf_string - // [562] phi from main::@133 to main::@134 [phi:main::@133->main::@134] - // main::@134 + // [606] phi from main::@140 to main::@141 [phi:main::@140->main::@141] + // main::@141 // sprintf(info_text, "Checking %s ... (.) data ( ) empty", file) - // [563] call printf_str - // [987] phi from main::@134 to printf_str [phi:main::@134->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@134->printf_str#0] -- pprz1=pprc1 + // [607] call printf_str + // [1019] phi from main::@141 to printf_str [phi:main::@141->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@141->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s8 [phi:main::@134->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s8 [phi:main::@141->printf_str#1] -- pbuz1=pbuc1 lda #s8 sta.z printf_str.s+1 jsr printf_str - // main::@135 + // main::@142 // sprintf(info_text, "Checking %s ... (.) data ( ) empty", file) - // [564] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [608] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [565] callexecute snputc -- call_vprc1 + // [609] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_progress(info_text) - // [567] call display_action_progress - // [812] phi from main::@135 to display_action_progress [phi:main::@135->display_action_progress] - // [812] phi display_action_progress::info_text#15 = info_text [phi:main::@135->display_action_progress#0] -- pbuz1=pbuc1 + // [611] call display_action_progress + // [857] phi from main::@142 to display_action_progress [phi:main::@142->display_action_progress] + // [857] phi display_action_progress::info_text#18 = info_text [phi:main::@142->display_action_progress#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_progress.info_text lda #>@info_text sta.z display_action_progress.info_text+1 jsr display_action_progress - // main::@136 + // main::@143 // unsigned long rom_bytes_read = rom_read(0, rom_chip, file, STATUS_CHECKING, rom_bank, rom_sizes[rom_chip]) - // [568] main::$243 = main::rom_chip2#10 << 2 -- vbum1=vbum2_rol_2 + // [612] main::$271 = main::rom_chip2#10 << 2 -- vbum1=vbum2_rol_2 lda rom_chip2 asl asl - sta main__243 - // [569] rom_read::file#0 = main::file#0 -- pbum1=pbum2 + sta main__271 + // [613] rom_read::file#0 = main::file#0 -- pbum1=pbum2 lda file sta rom_read.file lda file+1 sta rom_read.file+1 - // [570] rom_read::brom_bank_start#1 = main::rom_bank#0 -- vbuz1=vbum2 + // [614] rom_read::brom_bank_start#1 = main::rom_bank#0 -- vbum1=vbum2 lda rom_bank - sta.z rom_read.brom_bank_start - // [571] rom_read::rom_size#0 = rom_sizes[main::$243] -- vduz1=pduc1_derefidx_vbum2 - ldy main__243 + sta rom_read.brom_bank_start + // [615] rom_read::rom_size#0 = rom_sizes[main::$271] -- vduz1=pduc1_derefidx_vbum2 + ldy main__271 lda rom_sizes,y sta.z rom_read.rom_size lda rom_sizes+1,y @@ -3412,78 +3798,78 @@ main: { sta.z rom_read.rom_size+2 lda rom_sizes+3,y sta.z rom_read.rom_size+3 - // [572] call rom_read + // [616] call rom_read // Read the ROM(n).BIN file. - // [1248] phi from main::@136 to rom_read [phi:main::@136->rom_read] - // [1248] phi rom_read::display_progress#28 = 0 [phi:main::@136->rom_read#0] -- vbuz1=vbuc1 + // [1334] phi from main::@143 to rom_read [phi:main::@143->rom_read] + // [1334] phi rom_read::display_progress#28 = 0 [phi:main::@143->rom_read#0] -- vbum1=vbuc1 lda #0 - sta.z rom_read.display_progress - // [1248] phi rom_read::rom_size#12 = rom_read::rom_size#0 [phi:main::@136->rom_read#1] -- register_copy - // [1248] phi __errno#106 = __errno#112 [phi:main::@136->rom_read#2] -- register_copy - // [1248] phi rom_read::file#11 = rom_read::file#0 [phi:main::@136->rom_read#3] -- register_copy - // [1248] phi rom_read::brom_bank_start#22 = rom_read::brom_bank_start#1 [phi:main::@136->rom_read#4] -- register_copy + sta rom_read.display_progress + // [1334] phi rom_read::rom_size#12 = rom_read::rom_size#0 [phi:main::@143->rom_read#1] -- register_copy + // [1334] phi __errno#108 = __errno#114 [phi:main::@143->rom_read#2] -- register_copy + // [1334] phi rom_read::file#11 = rom_read::file#0 [phi:main::@143->rom_read#3] -- register_copy + // [1334] phi rom_read::brom_bank_start#22 = rom_read::brom_bank_start#1 [phi:main::@143->rom_read#4] -- register_copy jsr rom_read // unsigned long rom_bytes_read = rom_read(0, rom_chip, file, STATUS_CHECKING, rom_bank, rom_sizes[rom_chip]) - // [573] rom_read::return#2 = rom_read::return#0 - // main::@137 - // [574] main::rom_bytes_read#0 = rom_read::return#2 + // [617] rom_read::return#2 = rom_read::return#0 + // main::@144 + // [618] main::rom_bytes_read#0 = rom_read::return#2 // if (!rom_bytes_read) - // [575] if(0==main::rom_bytes_read#0) goto main::@28 -- 0_eq_vduz1_then_la1 + // [619] if(0==main::rom_bytes_read#0) goto main::@34 -- 0_eq_vdum1_then_la1 // In case no file was found, set the status to none and skip to the next, else, mention the amount of bytes read. - lda.z rom_bytes_read - ora.z rom_bytes_read+1 - ora.z rom_bytes_read+2 - ora.z rom_bytes_read+3 - bne !__b28+ - jmp __b28 - !__b28: - // main::@31 + lda rom_bytes_read + ora rom_bytes_read+1 + ora rom_bytes_read+2 + ora rom_bytes_read+3 + bne !__b34+ + jmp __b34 + !__b34: + // main::@37 // unsigned long rom_file_modulo = rom_bytes_read % 0x4000 - // [576] main::rom_file_modulo#0 = main::rom_bytes_read#0 & $4000-1 -- vduz1=vduz2_band_vduc1 + // [620] main::rom_file_modulo#0 = main::rom_bytes_read#0 & $4000-1 -- vdum1=vdum2_band_vduc1 // If the rom size is not a factor or 0x4000 bytes, then there is an error. - lda.z rom_bytes_read + lda rom_bytes_read and #<$4000-1 - sta.z rom_file_modulo - lda.z rom_bytes_read+1 + sta rom_file_modulo + lda rom_bytes_read+1 and #>$4000-1 - sta.z rom_file_modulo+1 - lda.z rom_bytes_read+2 + sta rom_file_modulo+1 + lda rom_bytes_read+2 and #<$4000-1>>$10 - sta.z rom_file_modulo+2 - lda.z rom_bytes_read+3 + sta rom_file_modulo+2 + lda rom_bytes_read+3 and #>$4000-1>>$10 - sta.z rom_file_modulo+3 + sta rom_file_modulo+3 // if(rom_file_modulo) - // [577] if(0!=main::rom_file_modulo#0) goto main::@29 -- 0_neq_vduz1_then_la1 - lda.z rom_file_modulo - ora.z rom_file_modulo+1 - ora.z rom_file_modulo+2 - ora.z rom_file_modulo+3 - beq !__b29+ - jmp __b29 - !__b29: - // main::@32 + // [621] if(0!=main::rom_file_modulo#0) goto main::@35 -- 0_neq_vdum1_then_la1 + lda rom_file_modulo + ora rom_file_modulo+1 + ora rom_file_modulo+2 + ora rom_file_modulo+3 + beq !__b35+ + jmp __b35 + !__b35: + // main::@38 // file_sizes[rom_chip] = rom_bytes_read - // [578] file_sizes[main::$243] = main::rom_bytes_read#0 -- pduc1_derefidx_vbum1=vduz2 + // [622] file_sizes[main::$271] = main::rom_bytes_read#0 -- pduc1_derefidx_vbum1=vdum2 // We know the file size, so we indicate it in the status panel. - ldy main__243 - lda.z rom_bytes_read + ldy main__271 + lda rom_bytes_read sta file_sizes,y - lda.z rom_bytes_read+1 + lda rom_bytes_read+1 sta file_sizes+1,y - lda.z rom_bytes_read+2 + lda rom_bytes_read+2 sta file_sizes+2,y - lda.z rom_bytes_read+3 + lda rom_bytes_read+3 sta file_sizes+3,y - // rom_get_github_commit_id(file_rom_github, (char*)RAM_BASE) - // [579] call rom_get_github_commit_id - // [1724] phi from main::@32 to rom_get_github_commit_id [phi:main::@32->rom_get_github_commit_id] - // [1724] phi rom_get_github_commit_id::commit_id#6 = main::file_rom_github [phi:main::@32->rom_get_github_commit_id#0] -- pbuz1=pbuc1 - lda #rom_get_github_commit_id] + // [1781] phi rom_get_github_commit_id::commit_id#6 = main::rom_file_github [phi:main::@38->rom_get_github_commit_id#0] -- pbuz1=pbuc1 + lda #file_rom_github + lda #>rom_file_github sta.z rom_get_github_commit_id.commit_id+1 - // [1724] phi rom_get_github_commit_id::from#6 = (char *)$7800 [phi:main::@32->rom_get_github_commit_id#1] -- pbuz1=pbuc1 + // [1781] phi rom_get_github_commit_id::from#6 = (char *)$7800 [phi:main::@38->rom_get_github_commit_id#1] -- pbuz1=pbuc1 lda #<$7800 sta.z rom_get_github_commit_id.from lda #>$7800 @@ -3495,731 +3881,771 @@ main: { lda.z 0 pha // BRAM = bank - // [581] BRAM = main::bank_push_set_bram1_bank#0 -- vbuz1=vbuc1 + // [625] BRAM = main::bank_push_set_bram1_bank#0 -- vbuz1=vbuc1 lda #bank_push_set_bram1_bank sta.z BRAM - // main::@65 - // unsigned char file_rom_release = rom_get_release(*((char*)0xBF80)) - // [582] rom_get_release::release#3 = *((char *) 49024) -- vbuxx=_deref_pbuc1 - ldx $bf80 - // [583] call rom_get_release - // [1114] phi from main::@65 to rom_get_release [phi:main::@65->rom_get_release] - // [1114] phi rom_get_release::release#4 = rom_get_release::release#3 [phi:main::@65->rom_get_release#0] -- register_copy + // main::@71 + // unsigned char rom_file_release = rom_get_release(*((char*)0xBF80)) + // [626] rom_get_release::release#3 = *((char *) 49024) -- vbum1=_deref_pbuc1 + lda $bf80 + sta rom_get_release.release + // [627] call rom_get_release + // [1164] phi from main::@71 to rom_get_release [phi:main::@71->rom_get_release] + // [1164] phi rom_get_release::release#4 = rom_get_release::release#3 [phi:main::@71->rom_get_release#0] -- register_copy jsr rom_get_release - // unsigned char file_rom_release = rom_get_release(*((char*)0xBF80)) - // [584] rom_get_release::return#4 = rom_get_release::return#0 - // main::@145 - // [585] main::file_rom_release#0 = rom_get_release::return#4 -- vbuyy=vbuxx - txa - tay - // unsigned char file_rom_prefix = rom_get_prefix(*((char*)0xBF80)) - // [586] rom_get_prefix::release#3 = *((char *) 49024) -- vbuaa=_deref_pbuc1 + // unsigned char rom_file_release = rom_get_release(*((char*)0xBF80)) + // [628] rom_get_release::return#4 = rom_get_release::return#0 + // main::@152 + // [629] main::rom_file_release#0 = rom_get_release::return#4 + // unsigned char rom_file_prefix = rom_get_prefix(*((char*)0xBF80)) + // [630] rom_get_prefix::release#3 = *((char *) 49024) -- vbuz1=_deref_pbuc1 lda $bf80 - // [587] call rom_get_prefix - // [1121] phi from main::@145 to rom_get_prefix [phi:main::@145->rom_get_prefix] - // [1121] phi rom_get_prefix::release#4 = rom_get_prefix::release#3 [phi:main::@145->rom_get_prefix#0] -- register_copy + sta.z rom_get_prefix.release + // [631] call rom_get_prefix + // [1171] phi from main::@152 to rom_get_prefix [phi:main::@152->rom_get_prefix] + // [1171] phi rom_get_prefix::release#4 = rom_get_prefix::release#3 [phi:main::@152->rom_get_prefix#0] -- register_copy jsr rom_get_prefix - // unsigned char file_rom_prefix = rom_get_prefix(*((char*)0xBF80)) - // [588] rom_get_prefix::return#10 = rom_get_prefix::return#0 -- vbuaa=vbuxx - txa - // main::@146 - // [589] main::file_rom_prefix#0 = rom_get_prefix::return#10 -- vbuxx=vbuaa - tax + // unsigned char rom_file_prefix = rom_get_prefix(*((char*)0xBF80)) + // [632] rom_get_prefix::return#10 = rom_get_prefix::return#0 + // main::@153 + // [633] main::rom_file_prefix#0 = rom_get_prefix::return#10 // main::bank_pull_bram1 // asm // asm { pla sta$00 } pla sta.z 0 - // main::@66 - // rom_get_version_text(file_rom_release_text, file_rom_prefix, file_rom_release, file_rom_github) - // [591] rom_get_version_text::prefix#1 = main::file_rom_prefix#0 - // [592] rom_get_version_text::release#1 = main::file_rom_release#0 -- vbum1=vbuyy - sty rom_get_version_text.release - // [593] call rom_get_version_text - // [1741] phi from main::@66 to rom_get_version_text [phi:main::@66->rom_get_version_text] - // [1741] phi rom_get_version_text::github#2 = main::file_rom_github [phi:main::@66->rom_get_version_text#0] -- pbuz1=pbuc1 - lda #rom_get_version_text] + // [1798] phi rom_get_version_text::github#2 = main::rom_file_github [phi:main::@72->rom_get_version_text#0] -- pbuz1=pbuc1 + lda #file_rom_github + lda #>rom_file_github sta.z rom_get_version_text.github+1 - // [1741] phi rom_get_version_text::release#2 = rom_get_version_text::release#1 [phi:main::@66->rom_get_version_text#1] -- register_copy - // [1741] phi rom_get_version_text::prefix#2 = rom_get_version_text::prefix#1 [phi:main::@66->rom_get_version_text#2] -- register_copy - // [1741] phi rom_get_version_text::release_info#2 = main::file_rom_release_text [phi:main::@66->rom_get_version_text#3] -- pbuz1=pbuc1 - lda #rom_get_version_text#1] -- register_copy + // [1798] phi rom_get_version_text::prefix#2 = rom_get_version_text::prefix#1 [phi:main::@72->rom_get_version_text#2] -- register_copy + // [1798] phi rom_get_version_text::release_info#2 = main::rom_file_release_text [phi:main::@72->rom_get_version_text#3] -- pbuz1=pbuc1 + lda #file_rom_release_text + lda #>rom_file_release_text sta.z rom_get_version_text.release_info+1 jsr rom_get_version_text - // [594] phi from main::@66 to main::@147 [phi:main::@66->main::@147] - // main::@147 - // sprintf(info_text, "%s %s", file, file_rom_release_text) - // [595] call snprintf_init - // [982] phi from main::@147 to snprintf_init [phi:main::@147->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@147->snprintf_init#0] -- pbuz1=pbuc1 + // [638] phi from main::@72 to main::@154 [phi:main::@72->main::@154] + // main::@154 + // sprintf(info_text, "%s %s", file, rom_file_release_text) + // [639] call snprintf_init + // [1014] phi from main::@154 to snprintf_init [phi:main::@154->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@154->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // main::@148 - // sprintf(info_text, "%s %s", file, file_rom_release_text) - // [596] printf_string::str#19 = main::file#0 -- pbuz1=pbum2 + // main::@155 + // sprintf(info_text, "%s %s", file, rom_file_release_text) + // [640] printf_string::str#19 = main::file#0 -- pbuz1=pbum2 lda file sta.z printf_string.str lda file+1 sta.z printf_string.str+1 - // [597] call printf_string - // [1130] phi from main::@148 to printf_string [phi:main::@148->printf_string] - // [1130] phi printf_string::putc#22 = &snputc [phi:main::@148->printf_string#0] -- pprz1=pprc1 + // [641] call printf_string + // [1180] phi from main::@155 to printf_string [phi:main::@155->printf_string] + // [1180] phi printf_string::putc#22 = &snputc [phi:main::@155->printf_string#0] -- pprz1=pprc1 lda #snputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#19 [phi:main::@148->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 0 [phi:main::@148->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#19 [phi:main::@155->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 0 [phi:main::@155->printf_string#2] -- vbuz1=vbuc1 lda #0 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 0 [phi:main::@148->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 0 [phi:main::@155->printf_string#3] -- vbuz1=vbuc1 sta.z printf_string.format_min_length jsr printf_string - // [598] phi from main::@148 to main::@149 [phi:main::@148->main::@149] - // main::@149 - // sprintf(info_text, "%s %s", file, file_rom_release_text) - // [599] call printf_str - // [987] phi from main::@149 to printf_str [phi:main::@149->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@149->printf_str#0] -- pprz1=pprc1 + // [642] phi from main::@155 to main::@156 [phi:main::@155->main::@156] + // main::@156 + // sprintf(info_text, "%s %s", file, rom_file_release_text) + // [643] call printf_str + // [1019] phi from main::@156 to printf_str [phi:main::@156->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@156->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s [phi:main::@149->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s [phi:main::@156->printf_str#1] -- pbuz1=pbuc1 lda #<@s sta.z printf_str.s lda #>@s sta.z printf_str.s+1 jsr printf_str - // [600] phi from main::@149 to main::@150 [phi:main::@149->main::@150] - // main::@150 - // sprintf(info_text, "%s %s", file, file_rom_release_text) - // [601] call printf_string - // [1130] phi from main::@150 to printf_string [phi:main::@150->printf_string] - // [1130] phi printf_string::putc#22 = &snputc [phi:main::@150->printf_string#0] -- pprz1=pprc1 + // [644] phi from main::@156 to main::@157 [phi:main::@156->main::@157] + // main::@157 + // sprintf(info_text, "%s %s", file, rom_file_release_text) + // [645] call printf_string + // [1180] phi from main::@157 to printf_string [phi:main::@157->printf_string] + // [1180] phi printf_string::putc#22 = &snputc [phi:main::@157->printf_string#0] -- pprz1=pprc1 lda #snputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = main::file_rom_release_text [phi:main::@150->printf_string#1] -- pbuz1=pbuc1 - lda #printf_string#1] -- pbuz1=pbuc1 + lda #file_rom_release_text + lda #>rom_file_release_text sta.z printf_string.str+1 - // [1130] phi printf_string::format_justify_left#22 = 0 [phi:main::@150->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_justify_left#22 = 0 [phi:main::@157->printf_string#2] -- vbuz1=vbuc1 lda #0 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 0 [phi:main::@150->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 0 [phi:main::@157->printf_string#3] -- vbuz1=vbuc1 sta.z printf_string.format_min_length jsr printf_string - // main::@151 - // sprintf(info_text, "%s %s", file, file_rom_release_text) - // [602] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // main::@158 + // sprintf(info_text, "%s %s", file, rom_file_release_text) + // [646] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [603] callexecute snputc -- call_vprc1 + // [647] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_info_rom(rom_chip, STATUS_FLASH, info_text) - // [605] display_info_rom::rom_chip#8 = main::rom_chip2#10 -- vbuz1=vbum2 + // [649] display_info_rom::rom_chip#8 = main::rom_chip2#10 -- vbuz1=vbum2 lda rom_chip2 sta.z display_info_rom.rom_chip - // [606] call display_info_rom - // [1199] phi from main::@151 to display_info_rom [phi:main::@151->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = info_text [phi:main::@151->display_info_rom#0] -- pbuz1=pbuc1 + // [650] call display_info_rom + // [1285] phi from main::@158 to display_info_rom [phi:main::@158->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = info_text [phi:main::@158->display_info_rom#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_info_rom.info_text lda #>@info_text sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#8 [phi:main::@151->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_FLASH [phi:main::@151->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#8 [phi:main::@158->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_FLASH [phi:main::@158->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_FLASH - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - // [607] phi from main::@140 main::@144 main::@151 main::@63 to main::@27 [phi:main::@140/main::@144/main::@151/main::@63->main::@27] - // [607] phi __errno#246 = __errno#18 [phi:main::@140/main::@144/main::@151/main::@63->main::@27#0] -- register_copy - // main::@27 - __b27: + // [651] phi from main::@147 main::@151 main::@158 main::@69 to main::@33 [phi:main::@147/main::@151/main::@158/main::@69->main::@33] + // [651] phi __errno#238 = __errno#18 [phi:main::@147/main::@151/main::@158/main::@69->main::@33#0] -- register_copy + // main::@33 + __b33: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [608] main::rom_chip2#1 = ++ main::rom_chip2#10 -- vbum1=_inc_vbum1 + // [652] main::rom_chip2#1 = ++ main::rom_chip2#10 -- vbum1=_inc_vbum1 inc rom_chip2 - // [209] phi from main::@27 to main::@26 [phi:main::@27->main::@26] - // [209] phi __errno#112 = __errno#246 [phi:main::@27->main::@26#0] -- register_copy - // [209] phi main::rom_chip2#10 = main::rom_chip2#1 [phi:main::@27->main::@26#1] -- register_copy - jmp __b26 - // [609] phi from main::@31 to main::@29 [phi:main::@31->main::@29] - // main::@29 - __b29: + // [209] phi from main::@33 to main::@32 [phi:main::@33->main::@32] + // [209] phi __errno#114 = __errno#238 [phi:main::@33->main::@32#0] -- register_copy + // [209] phi main::rom_chip2#10 = main::rom_chip2#1 [phi:main::@33->main::@32#1] -- register_copy + jmp __b32 + // [653] phi from main::@37 to main::@35 [phi:main::@37->main::@35] + // main::@35 + __b35: // sprintf(info_text, "File %s size error!", file) - // [610] call snprintf_init - // [982] phi from main::@29 to snprintf_init [phi:main::@29->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@29->snprintf_init#0] -- pbuz1=pbuc1 + // [654] call snprintf_init + // [1014] phi from main::@35 to snprintf_init [phi:main::@35->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@35->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [611] phi from main::@29 to main::@141 [phi:main::@29->main::@141] - // main::@141 + // [655] phi from main::@35 to main::@148 [phi:main::@35->main::@148] + // main::@148 // sprintf(info_text, "File %s size error!", file) - // [612] call printf_str - // [987] phi from main::@141 to printf_str [phi:main::@141->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@141->printf_str#0] -- pprz1=pprc1 + // [656] call printf_str + // [1019] phi from main::@148 to printf_str [phi:main::@148->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@148->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s10 [phi:main::@141->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s10 [phi:main::@148->printf_str#1] -- pbuz1=pbuc1 lda #s10 sta.z printf_str.s+1 jsr printf_str - // main::@142 + // main::@149 // sprintf(info_text, "File %s size error!", file) - // [613] printf_string::str#18 = main::file#0 -- pbuz1=pbum2 + // [657] printf_string::str#18 = main::file#0 -- pbuz1=pbum2 lda file sta.z printf_string.str lda file+1 sta.z printf_string.str+1 - // [614] call printf_string - // [1130] phi from main::@142 to printf_string [phi:main::@142->printf_string] - // [1130] phi printf_string::putc#22 = &snputc [phi:main::@142->printf_string#0] -- pprz1=pprc1 + // [658] call printf_string + // [1180] phi from main::@149 to printf_string [phi:main::@149->printf_string] + // [1180] phi printf_string::putc#22 = &snputc [phi:main::@149->printf_string#0] -- pprz1=pprc1 lda #snputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#18 [phi:main::@142->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 0 [phi:main::@142->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#18 [phi:main::@149->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 0 [phi:main::@149->printf_string#2] -- vbuz1=vbuc1 lda #0 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 0 [phi:main::@142->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 0 [phi:main::@149->printf_string#3] -- vbuz1=vbuc1 sta.z printf_string.format_min_length jsr printf_string - // [615] phi from main::@142 to main::@143 [phi:main::@142->main::@143] - // main::@143 + // [659] phi from main::@149 to main::@150 [phi:main::@149->main::@150] + // main::@150 // sprintf(info_text, "File %s size error!", file) - // [616] call printf_str - // [987] phi from main::@143 to printf_str [phi:main::@143->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@143->printf_str#0] -- pprz1=pprc1 + // [660] call printf_str + // [1019] phi from main::@150 to printf_str [phi:main::@150->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@150->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s11 [phi:main::@143->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s11 [phi:main::@150->printf_str#1] -- pbuz1=pbuc1 lda #s11 sta.z printf_str.s+1 jsr printf_str - // main::@144 + // main::@151 // sprintf(info_text, "File %s size error!", file) - // [617] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [661] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [618] callexecute snputc -- call_vprc1 + // [662] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_info_rom(rom_chip, STATUS_ISSUE, info_text) - // [620] display_info_rom::rom_chip#7 = main::rom_chip2#10 -- vbuz1=vbum2 + // [664] display_info_rom::rom_chip#7 = main::rom_chip2#10 -- vbuz1=vbum2 lda rom_chip2 sta.z display_info_rom.rom_chip - // [621] call display_info_rom - // [1199] phi from main::@144 to display_info_rom [phi:main::@144->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = info_text [phi:main::@144->display_info_rom#0] -- pbuz1=pbuc1 + // [665] call display_info_rom + // [1285] phi from main::@151 to display_info_rom [phi:main::@151->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = info_text [phi:main::@151->display_info_rom#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_info_rom.info_text lda #>@info_text sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#7 [phi:main::@144->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_ISSUE [phi:main::@144->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#7 [phi:main::@151->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_ISSUE [phi:main::@151->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_ISSUE - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - jmp __b27 - // [622] phi from main::@137 to main::@28 [phi:main::@137->main::@28] - // main::@28 - __b28: + jmp __b33 + // [666] phi from main::@144 to main::@34 [phi:main::@144->main::@34] + // main::@34 + __b34: // sprintf(info_text, "No %s", file) - // [623] call snprintf_init - // [982] phi from main::@28 to snprintf_init [phi:main::@28->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@28->snprintf_init#0] -- pbuz1=pbuc1 + // [667] call snprintf_init + // [1014] phi from main::@34 to snprintf_init [phi:main::@34->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@34->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [624] phi from main::@28 to main::@138 [phi:main::@28->main::@138] - // main::@138 + // [668] phi from main::@34 to main::@145 [phi:main::@34->main::@145] + // main::@145 // sprintf(info_text, "No %s", file) - // [625] call printf_str - // [987] phi from main::@138 to printf_str [phi:main::@138->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@138->printf_str#0] -- pprz1=pprc1 + // [669] call printf_str + // [1019] phi from main::@145 to printf_str [phi:main::@145->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@145->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s9 [phi:main::@138->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s9 [phi:main::@145->printf_str#1] -- pbuz1=pbuc1 lda #s9 sta.z printf_str.s+1 jsr printf_str - // main::@139 + // main::@146 // sprintf(info_text, "No %s", file) - // [626] printf_string::str#17 = main::file#0 -- pbuz1=pbum2 + // [670] printf_string::str#17 = main::file#0 -- pbuz1=pbum2 lda file sta.z printf_string.str lda file+1 sta.z printf_string.str+1 - // [627] call printf_string - // [1130] phi from main::@139 to printf_string [phi:main::@139->printf_string] - // [1130] phi printf_string::putc#22 = &snputc [phi:main::@139->printf_string#0] -- pprz1=pprc1 + // [671] call printf_string + // [1180] phi from main::@146 to printf_string [phi:main::@146->printf_string] + // [1180] phi printf_string::putc#22 = &snputc [phi:main::@146->printf_string#0] -- pprz1=pprc1 lda #snputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#17 [phi:main::@139->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 0 [phi:main::@139->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#17 [phi:main::@146->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 0 [phi:main::@146->printf_string#2] -- vbuz1=vbuc1 lda #0 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 0 [phi:main::@139->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 0 [phi:main::@146->printf_string#3] -- vbuz1=vbuc1 sta.z printf_string.format_min_length jsr printf_string - // main::@140 + // main::@147 // sprintf(info_text, "No %s", file) - // [628] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [672] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [629] callexecute snputc -- call_vprc1 + // [673] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_info_rom(rom_chip, STATUS_SKIP, info_text) - // [631] display_info_rom::rom_chip#6 = main::rom_chip2#10 -- vbuz1=vbum2 + // [675] display_info_rom::rom_chip#6 = main::rom_chip2#10 -- vbuz1=vbum2 lda rom_chip2 sta.z display_info_rom.rom_chip - // [632] call display_info_rom - // [1199] phi from main::@140 to display_info_rom [phi:main::@140->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = info_text [phi:main::@140->display_info_rom#0] -- pbuz1=pbuc1 + // [676] call display_info_rom + // [1285] phi from main::@147 to display_info_rom [phi:main::@147->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = info_text [phi:main::@147->display_info_rom#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_info_rom.info_text lda #>@info_text sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#6 [phi:main::@140->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_SKIP [phi:main::@140->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#6 [phi:main::@147->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_SKIP [phi:main::@147->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_SKIP - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - jmp __b27 - // [633] phi from main::@22 to main::@25 [phi:main::@22->main::@25] - // main::@25 - __b25: + jmp __b33 + // [677] phi from main::@28 to main::@31 [phi:main::@28->main::@31] + // main::@31 + __b31: // display_info_smc(STATUS_ISSUE, "SMC.BIN too large!") - // [634] call display_info_smc - // [870] phi from main::@25 to display_info_smc [phi:main::@25->display_info_smc] - // [870] phi display_info_smc::info_text#14 = main::info_text6 [phi:main::@25->display_info_smc#0] -- pbuz1=pbuc1 + // [678] call display_info_smc + // [915] phi from main::@31 to display_info_smc [phi:main::@31->display_info_smc] + // [915] phi display_info_smc::info_text#17 = main::info_text6 [phi:main::@31->display_info_smc#0] -- pbuz1=pbuc1 lda #info_text6 sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_ISSUE [phi:main::@25->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_ISSUE [phi:main::@31->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_ISSUE sta.z display_info_smc.info_status jsr display_info_smc + // [206] phi from main::@30 main::@31 to main::CLI2 [phi:main::@30/main::@31->main::CLI2] + __b11: + // [206] phi smc_file_minor#243 = 0 [phi:main::@30/main::@31->main::CLI2#0] -- vbum1=vbuc1 + lda #0 + sta smc_file_minor + // [206] phi smc_file_major#244 = 0 [phi:main::@30/main::@31->main::CLI2#1] -- vbum1=vbuc1 + sta smc_file_major + // [206] phi smc_file_release#245 = 0 [phi:main::@30/main::@31->main::CLI2#2] -- vbum1=vbuc1 + sta smc_file_release + // [206] phi __errno#239 = __errno#18 [phi:main::@30/main::@31->main::CLI2#3] -- register_copy jmp CLI2 - // [635] phi from main::@120 to main::@24 [phi:main::@120->main::@24] - // main::@24 - __b24: + // [679] phi from main::@127 to main::@30 [phi:main::@127->main::@30] + // main::@30 + __b30: // display_info_smc(STATUS_SKIP, "No SMC.BIN!") - // [636] call display_info_smc - // [870] phi from main::@24 to display_info_smc [phi:main::@24->display_info_smc] - // [870] phi display_info_smc::info_text#14 = main::info_text5 [phi:main::@24->display_info_smc#0] -- pbuz1=pbuc1 + // [680] call display_info_smc + // [915] phi from main::@30 to display_info_smc [phi:main::@30->display_info_smc] + // [915] phi display_info_smc::info_text#17 = main::info_text5 [phi:main::@30->display_info_smc#0] -- pbuz1=pbuc1 lda #info_text5 sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_SKIP [phi:main::@24->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_SKIP [phi:main::@30->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_SKIP sta.z display_info_smc.info_status jsr display_info_smc - jmp CLI2 - // main::@18 - __b18: + jmp __b11 + // main::@25 + __b25: + // display_info_led(PROGRESS_X + 3, PROGRESS_Y + 3 + intro_status, status_color[intro_status], BLUE) + // [681] display_info_led::y#3 = PROGRESS_Y+3 + main::intro_status#2 -- vbuz1=vbuc1_plus_vbum2 + lda #PROGRESS_Y+3 + clc + adc intro_status + sta.z display_info_led.y + // [682] display_info_led::tc#3 = status_color[main::intro_status#2] -- vbuz1=pbuc1_derefidx_vbum2 + ldy intro_status + lda status_color,y + sta.z display_info_led.tc + // [683] call display_info_led + // [1814] phi from main::@25 to display_info_led [phi:main::@25->display_info_led] + // [1814] phi display_info_led::y#4 = display_info_led::y#3 [phi:main::@25->display_info_led#0] -- register_copy + // [1814] phi display_info_led::x#4 = PROGRESS_X+3 [phi:main::@25->display_info_led#1] -- vbuz1=vbuc1 + lda #PROGRESS_X+3 + sta.z display_info_led.x + // [1814] phi display_info_led::tc#4 = display_info_led::tc#3 [phi:main::@25->display_info_led#2] -- register_copy + jsr display_info_led + // main::@125 + // for(unsigned char intro_status=0; intro_status<11; intro_status++) + // [684] main::intro_status#1 = ++ main::intro_status#2 -- vbum1=_inc_vbum1 + inc intro_status + // [158] phi from main::@125 to main::@24 [phi:main::@125->main::@24] + // [158] phi main::intro_status#2 = main::intro_status#1 [phi:main::@125->main::@24#0] -- register_copy + jmp __b24 + // main::@22 + __b22: // if(rom_device_ids[rom_chip] != UNKNOWN) - // [637] if(rom_device_ids[main::rom_chip1#10]!=$55) goto main::@19 -- pbuc1_derefidx_vbum1_neq_vbuc2_then_la1 + // [685] if(rom_device_ids[main::rom_chip1#10]!=$55) goto main::bank_set_brom3 -- pbuc1_derefidx_vbum1_neq_vbuc2_then_la1 lda #$55 ldy rom_chip1 cmp rom_device_ids,y - bne __b19 - // main::@20 - __b20: + bne bank_set_brom3 + // main::@23 + __b23: // for(unsigned char rom_chip = 0; rom_chip < 8; rom_chip++) - // [638] main::rom_chip1#1 = ++ main::rom_chip1#10 -- vbum1=_inc_vbum1 + // [686] main::rom_chip1#1 = ++ main::rom_chip1#10 -- vbum1=_inc_vbum1 inc rom_chip1 - // [164] phi from main::@20 to main::@17 [phi:main::@20->main::@17] - // [164] phi main::rom_chip1#10 = main::rom_chip1#1 [phi:main::@20->main::@17#0] -- register_copy - jmp __b17 - // main::@19 - __b19: + // [148] phi from main::@23 to main::@21 [phi:main::@23->main::@21] + // [148] phi main::rom_chip1#10 = main::rom_chip1#1 [phi:main::@23->main::@21#0] -- register_copy + jmp __b21 + // main::bank_set_brom3 + bank_set_brom3: + // BROM = bank + // [687] BROM = main::bank_set_brom3_bank#0 -- vbuz1=vbuc1 + lda #bank_set_brom3_bank + sta.z BROM + // main::@67 // rom_chip*8 - // [639] main::$102 = main::rom_chip1#10 << 3 -- vbuz1=vbum2_rol_3 + // [688] main::$107 = main::rom_chip1#10 << 3 -- vbuz1=vbum2_rol_3 lda rom_chip1 asl asl asl - sta.z main__102 + sta.z main__107 // rom_get_github_commit_id(&rom_github[rom_chip*8], (char*)0xC000) - // [640] rom_get_github_commit_id::commit_id#0 = rom_github + main::$102 -- pbuz1=pbuc1_plus_vbuz2 + // [689] rom_get_github_commit_id::commit_id#0 = rom_github + main::$107 -- pbuz1=pbuc1_plus_vbuz2 clc adc #rom_github adc #0 sta.z rom_get_github_commit_id.commit_id+1 - // [641] call rom_get_github_commit_id - // Fill the version data ... - // [1724] phi from main::@19 to rom_get_github_commit_id [phi:main::@19->rom_get_github_commit_id] - // [1724] phi rom_get_github_commit_id::commit_id#6 = rom_get_github_commit_id::commit_id#0 [phi:main::@19->rom_get_github_commit_id#0] -- register_copy - // [1724] phi rom_get_github_commit_id::from#6 = (char *) 49152 [phi:main::@19->rom_get_github_commit_id#1] -- pbuz1=pbuc1 + // [690] call rom_get_github_commit_id + // [1781] phi from main::@67 to rom_get_github_commit_id [phi:main::@67->rom_get_github_commit_id] + // [1781] phi rom_get_github_commit_id::commit_id#6 = rom_get_github_commit_id::commit_id#0 [phi:main::@67->rom_get_github_commit_id#0] -- register_copy + // [1781] phi rom_get_github_commit_id::from#6 = (char *) 49152 [phi:main::@67->rom_get_github_commit_id#1] -- pbuz1=pbuc1 lda #<$c000 sta.z rom_get_github_commit_id.from lda #>$c000 sta.z rom_get_github_commit_id.from+1 jsr rom_get_github_commit_id - // main::@116 + // main::@121 // rom_get_release(*((char*)0xFF80)) - // [642] rom_get_release::release#1 = *((char *) 65408) -- vbuxx=_deref_pbuc1 - ldx $ff80 - // [643] call rom_get_release - // [1114] phi from main::@116 to rom_get_release [phi:main::@116->rom_get_release] - // [1114] phi rom_get_release::release#4 = rom_get_release::release#1 [phi:main::@116->rom_get_release#0] -- register_copy + // [691] rom_get_release::release#1 = *((char *) 65408) -- vbum1=_deref_pbuc1 + lda $ff80 + sta rom_get_release.release + // [692] call rom_get_release + // [1164] phi from main::@121 to rom_get_release [phi:main::@121->rom_get_release] + // [1164] phi rom_get_release::release#4 = rom_get_release::release#1 [phi:main::@121->rom_get_release#0] -- register_copy jsr rom_get_release // rom_get_release(*((char*)0xFF80)) - // [644] rom_get_release::return#2 = rom_get_release::return#0 - // main::@117 - // [645] main::$98 = rom_get_release::return#2 -- vbuaa=vbuxx - txa + // [693] rom_get_release::return#2 = rom_get_release::return#0 + // main::@122 + // [694] main::$103 = rom_get_release::return#2 // rom_release[rom_chip] = rom_get_release(*((char*)0xFF80)) - // [646] rom_release[main::rom_chip1#10] = main::$98 -- pbuc1_derefidx_vbum1=vbuaa + // [695] rom_release[main::rom_chip1#10] = main::$103 -- pbuc1_derefidx_vbum1=vbum2 + lda main__103 ldy rom_chip1 sta rom_release,y // rom_get_prefix(*((char*)0xFF80)) - // [647] rom_get_prefix::release#0 = *((char *) 65408) -- vbuaa=_deref_pbuc1 + // [696] rom_get_prefix::release#0 = *((char *) 65408) -- vbuz1=_deref_pbuc1 lda $ff80 - // [648] call rom_get_prefix - // [1121] phi from main::@117 to rom_get_prefix [phi:main::@117->rom_get_prefix] - // [1121] phi rom_get_prefix::release#4 = rom_get_prefix::release#0 [phi:main::@117->rom_get_prefix#0] -- register_copy + sta.z rom_get_prefix.release + // [697] call rom_get_prefix + // [1171] phi from main::@122 to rom_get_prefix [phi:main::@122->rom_get_prefix] + // [1171] phi rom_get_prefix::release#4 = rom_get_prefix::release#0 [phi:main::@122->rom_get_prefix#0] -- register_copy jsr rom_get_prefix // rom_get_prefix(*((char*)0xFF80)) - // [649] rom_get_prefix::return#2 = rom_get_prefix::return#0 - // main::@118 - // [650] main::$99 = rom_get_prefix::return#2 -- vbuaa=vbuxx - txa + // [698] rom_get_prefix::return#2 = rom_get_prefix::return#0 + // main::@123 + // [699] main::$104 = rom_get_prefix::return#2 // rom_prefix[rom_chip] = rom_get_prefix(*((char*)0xFF80)) - // [651] rom_prefix[main::rom_chip1#10] = main::$99 -- pbuc1_derefidx_vbum1=vbuaa + // [700] rom_prefix[main::rom_chip1#10] = main::$104 -- pbuc1_derefidx_vbum1=vbum2 + lda main__104 ldy rom_chip1 sta rom_prefix,y // rom_chip*13 - // [652] main::$290 = main::rom_chip1#10 << 1 -- vbuaa=vbum1_rol_1 + // [701] main::$321 = main::rom_chip1#10 << 1 -- vbuz1=vbum2_rol_1 tya asl - // [653] main::$291 = main::$290 + main::rom_chip1#10 -- vbuaa=vbuaa_plus_vbum1 + sta.z main__321 + // [702] main::$322 = main::$321 + main::rom_chip1#10 -- vbuz1=vbuz1_plus_vbum2 + tya clc - adc rom_chip1 - // [654] main::$292 = main::$291 << 2 -- vbuaa=vbuaa_rol_2 + adc.z main__322 + sta.z main__322 + // [703] main::$323 = main::$322 << 2 -- vbuz1=vbuz1_rol_2 + lda.z main__323 asl asl - // [655] main::$100 = main::$292 + main::rom_chip1#10 -- vbuaa=vbuaa_plus_vbum1 + sta.z main__323 + // [704] main::$105 = main::$323 + main::rom_chip1#10 -- vbuz1=vbuz1_plus_vbum2 + tya clc - adc rom_chip1 + adc.z main__105 + sta.z main__105 // rom_get_version_text(&rom_release_text[rom_chip*13], rom_prefix[rom_chip], rom_release[rom_chip], &rom_github[rom_chip*8]) - // [656] rom_get_version_text::release_info#0 = rom_release_text + main::$100 -- pbuz1=pbuc1_plus_vbuaa + // [705] rom_get_version_text::release_info#0 = rom_release_text + main::$105 -- pbuz1=pbuc1_plus_vbuz2 clc adc #rom_release_text adc #0 sta.z rom_get_version_text.release_info+1 - // [657] rom_get_version_text::github#0 = rom_github + main::$102 -- pbuz1=pbuc1_plus_vbuz2 - lda.z main__102 + // [706] rom_get_version_text::github#0 = rom_github + main::$107 -- pbuz1=pbuc1_plus_vbuz2 + lda.z main__107 clc adc #rom_github adc #0 sta.z rom_get_version_text.github+1 - // [658] rom_get_version_text::prefix#0 = rom_prefix[main::rom_chip1#10] -- vbuxx=pbuc1_derefidx_vbum1 - ldx rom_prefix,y - // [659] rom_get_version_text::release#0 = rom_release[main::rom_chip1#10] -- vbum1=pbuc1_derefidx_vbum2 + // [707] rom_get_version_text::prefix#0 = rom_prefix[main::rom_chip1#10] -- vbum1=pbuc1_derefidx_vbum2 + lda rom_prefix,y + sta rom_get_version_text.prefix + // [708] rom_get_version_text::release#0 = rom_release[main::rom_chip1#10] -- vbum1=pbuc1_derefidx_vbum2 lda rom_release,y sta rom_get_version_text.release - // [660] call rom_get_version_text - // [1741] phi from main::@118 to rom_get_version_text [phi:main::@118->rom_get_version_text] - // [1741] phi rom_get_version_text::github#2 = rom_get_version_text::github#0 [phi:main::@118->rom_get_version_text#0] -- register_copy - // [1741] phi rom_get_version_text::release#2 = rom_get_version_text::release#0 [phi:main::@118->rom_get_version_text#1] -- register_copy - // [1741] phi rom_get_version_text::prefix#2 = rom_get_version_text::prefix#0 [phi:main::@118->rom_get_version_text#2] -- register_copy - // [1741] phi rom_get_version_text::release_info#2 = rom_get_version_text::release_info#0 [phi:main::@118->rom_get_version_text#3] -- register_copy + // [709] call rom_get_version_text + // [1798] phi from main::@123 to rom_get_version_text [phi:main::@123->rom_get_version_text] + // [1798] phi rom_get_version_text::github#2 = rom_get_version_text::github#0 [phi:main::@123->rom_get_version_text#0] -- register_copy + // [1798] phi rom_get_version_text::release#2 = rom_get_version_text::release#0 [phi:main::@123->rom_get_version_text#1] -- register_copy + // [1798] phi rom_get_version_text::prefix#2 = rom_get_version_text::prefix#0 [phi:main::@123->rom_get_version_text#2] -- register_copy + // [1798] phi rom_get_version_text::release_info#2 = rom_get_version_text::release_info#0 [phi:main::@123->rom_get_version_text#3] -- register_copy jsr rom_get_version_text - // main::@119 + // main::@124 // display_info_rom(rom_chip, STATUS_DETECTED, "") - // [661] display_info_rom::rom_chip#5 = main::rom_chip1#10 -- vbuz1=vbum2 + // [710] display_info_rom::rom_chip#5 = main::rom_chip1#10 -- vbuz1=vbum2 lda rom_chip1 sta.z display_info_rom.rom_chip - // [662] call display_info_rom - // [1199] phi from main::@119 to display_info_rom [phi:main::@119->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = info_text4 [phi:main::@119->display_info_rom#0] -- pbuz1=pbuc1 + // [711] call display_info_rom + // [1285] phi from main::@124 to display_info_rom [phi:main::@124->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = info_text4 [phi:main::@124->display_info_rom#0] -- pbuz1=pbuc1 lda #info_text4 sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#5 [phi:main::@119->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_DETECTED [phi:main::@119->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#5 [phi:main::@124->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_DETECTED [phi:main::@124->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_DETECTED - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - jmp __b20 - // [663] phi from main::@13 to main::@16 [phi:main::@13->main::@16] - // main::@16 - __b16: + jmp __b23 + // [712] phi from main::@17 to main::@20 [phi:main::@17->main::@20] + // main::@20 + __b20: // sprintf(info_text, "Bootloader v%02x invalid! !", smc_bootloader) - // [664] call snprintf_init - // [982] phi from main::@16 to snprintf_init [phi:main::@16->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:main::@16->snprintf_init#0] -- pbuz1=pbuc1 + // [713] call snprintf_init + // [1014] phi from main::@20 to snprintf_init [phi:main::@20->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:main::@20->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [665] phi from main::@16 to main::@101 [phi:main::@16->main::@101] - // main::@101 + // [714] phi from main::@20 to main::@104 [phi:main::@20->main::@104] + // main::@104 // sprintf(info_text, "Bootloader v%02x invalid! !", smc_bootloader) - // [666] call printf_str - // [987] phi from main::@101 to printf_str [phi:main::@101->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@101->printf_str#0] -- pprz1=pprc1 + // [715] call printf_str + // [1019] phi from main::@104 to printf_str [phi:main::@104->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@104->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s2 [phi:main::@101->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s2 [phi:main::@104->printf_str#1] -- pbuz1=pbuc1 lda #s2 sta.z printf_str.s+1 jsr printf_str - // main::@102 + // main::@105 // sprintf(info_text, "Bootloader v%02x invalid! !", smc_bootloader) - // [667] printf_uint::uvalue#12 = smc_bootloader#0 -- vwuz1=vwum2 + // [716] printf_uint::uvalue#12 = smc_bootloader#0 -- vwuz1=vwum2 lda smc_bootloader sta.z printf_uint.uvalue lda smc_bootloader+1 sta.z printf_uint.uvalue+1 - // [668] call printf_uint - // [996] phi from main::@102 to printf_uint [phi:main::@102->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:main::@102->printf_uint#0] -- vbuz1=vbuc1 + // [717] call printf_uint + // [1028] phi from main::@105 to printf_uint [phi:main::@105->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:main::@105->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 2 [phi:main::@102->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 2 [phi:main::@105->printf_uint#1] -- vbuz1=vbuc1 lda #2 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:main::@102->printf_uint#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#12 [phi:main::@102->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:main::@105->printf_uint#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#12 [phi:main::@105->printf_uint#3] -- register_copy jsr printf_uint - // [669] phi from main::@102 to main::@103 [phi:main::@102->main::@103] - // main::@103 + // [718] phi from main::@105 to main::@106 [phi:main::@105->main::@106] + // main::@106 // sprintf(info_text, "Bootloader v%02x invalid! !", smc_bootloader) - // [670] call printf_str - // [987] phi from main::@103 to printf_str [phi:main::@103->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:main::@103->printf_str#0] -- pprz1=pprc1 + // [719] call printf_str + // [1019] phi from main::@106 to printf_str [phi:main::@106->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:main::@106->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = main::s3 [phi:main::@103->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = main::s3 [phi:main::@106->printf_str#1] -- pbuz1=pbuc1 lda #s3 sta.z printf_str.s+1 jsr printf_str - // main::@104 + // main::@107 // sprintf(info_text, "Bootloader v%02x invalid! !", smc_bootloader) - // [671] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [720] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [672] callexecute snputc -- call_vprc1 + // [721] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_info_smc(STATUS_ISSUE, info_text) - // [674] call display_info_smc - // [870] phi from main::@104 to display_info_smc [phi:main::@104->display_info_smc] - // [870] phi display_info_smc::info_text#14 = info_text [phi:main::@104->display_info_smc#0] -- pbuz1=pbuc1 + // [723] call display_info_smc + // [915] phi from main::@107 to display_info_smc [phi:main::@107->display_info_smc] + // [915] phi display_info_smc::info_text#17 = info_text [phi:main::@107->display_info_smc#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_info_smc.info_text lda #>@info_text sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_ISSUE [phi:main::@104->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_ISSUE [phi:main::@107->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_ISSUE sta.z display_info_smc.info_status jsr display_info_smc - // [675] phi from main::@104 to main::@105 [phi:main::@104->main::@105] - // main::@105 + // [724] phi from main::@107 to main::@108 [phi:main::@107->main::@108] + // main::@108 // display_progress_text(display_no_valid_smc_bootloader_text, display_no_valid_smc_bootloader_count) - // [676] call display_progress_text + // [725] call display_progress_text // Bootloader is not supported by this utility, but is not error. - // [926] phi from main::@105 to display_progress_text [phi:main::@105->display_progress_text] - // [926] phi display_progress_text::text#10 = display_no_valid_smc_bootloader_text [phi:main::@105->display_progress_text#0] -- qbuz1=qbuc1 + // [1088] phi from main::@108 to display_progress_text [phi:main::@108->display_progress_text] + // [1088] phi display_progress_text::text#12 = display_no_valid_smc_bootloader_text [phi:main::@108->display_progress_text#0] -- qbuz1=qbuc1 lda #display_no_valid_smc_bootloader_text sta.z display_progress_text.text+1 - // [926] phi display_progress_text::lines#11 = display_no_valid_smc_bootloader_count [phi:main::@105->display_progress_text#1] -- vbuz1=vbuc1 + // [1088] phi display_progress_text::lines#11 = display_no_valid_smc_bootloader_count [phi:main::@108->display_progress_text#1] -- vbuz1=vbuc1 lda #display_no_valid_smc_bootloader_count sta.z display_progress_text.lines jsr display_progress_text + // [140] phi from main::@103 main::@108 main::@19 to main::@2 [phi:main::@103/main::@108/main::@19->main::@2] + __b12: + // [140] phi smc_minor#397 = 0 [phi:main::@103/main::@108/main::@19->main::@2#0] -- vbum1=vbuc1 + lda #0 + sta smc_minor + // [140] phi smc_major#398 = 0 [phi:main::@103/main::@108/main::@19->main::@2#1] -- vbum1=vbuc1 + sta smc_major + // [140] phi smc_release#399 = 0 [phi:main::@103/main::@108/main::@19->main::@2#2] -- vbum1=vbuc1 + sta smc_release jmp __b2 - // [677] phi from main::@12 to main::@15 [phi:main::@12->main::@15] - // main::@15 - __b15: + // [726] phi from main::@16 to main::@19 [phi:main::@16->main::@19] + // main::@19 + __b19: // display_info_smc(STATUS_ERROR, "SMC Unreachable!") - // [678] call display_info_smc - // [870] phi from main::@15 to display_info_smc [phi:main::@15->display_info_smc] - // [870] phi display_info_smc::info_text#14 = main::info_text2 [phi:main::@15->display_info_smc#0] -- pbuz1=pbuc1 + // [727] call display_info_smc + // [915] phi from main::@19 to display_info_smc [phi:main::@19->display_info_smc] + // [915] phi display_info_smc::info_text#17 = main::info_text2 [phi:main::@19->display_info_smc#0] -- pbuz1=pbuc1 lda #info_text2 sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_ERROR [phi:main::@15->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_ERROR [phi:main::@19->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_ERROR sta.z display_info_smc.info_status jsr display_info_smc - jmp __b2 - // [679] phi from main::@99 to main::@1 [phi:main::@99->main::@1] + jmp __b12 + // [728] phi from main::@102 to main::@1 [phi:main::@102->main::@1] // main::@1 __b1: // display_info_smc(STATUS_ISSUE, "No Bootloader!") - // [680] call display_info_smc - // [870] phi from main::@1 to display_info_smc [phi:main::@1->display_info_smc] - // [870] phi display_info_smc::info_text#14 = main::info_text1 [phi:main::@1->display_info_smc#0] -- pbuz1=pbuc1 + // [729] call display_info_smc + // [915] phi from main::@1 to display_info_smc [phi:main::@1->display_info_smc] + // [915] phi display_info_smc::info_text#17 = main::info_text1 [phi:main::@1->display_info_smc#0] -- pbuz1=pbuc1 lda #info_text1 sta.z display_info_smc.info_text+1 - // [870] phi display_info_smc::info_status#14 = STATUS_ISSUE [phi:main::@1->display_info_smc#1] -- vbuz1=vbuc1 + // [915] phi display_info_smc::info_status#17 = STATUS_ISSUE [phi:main::@1->display_info_smc#1] -- vbuz1=vbuc1 lda #STATUS_ISSUE sta.z display_info_smc.info_status jsr display_info_smc - // [681] phi from main::@1 to main::@100 [phi:main::@1->main::@100] - // main::@100 + // [730] phi from main::@1 to main::@103 [phi:main::@1->main::@103] + // main::@103 // display_progress_text(display_no_valid_smc_bootloader_text, display_no_valid_smc_bootloader_count) - // [682] call display_progress_text + // [731] call display_progress_text // If the CX16 board does not have a bootloader, display info how to flash bootloader. - // [926] phi from main::@100 to display_progress_text [phi:main::@100->display_progress_text] - // [926] phi display_progress_text::text#10 = display_no_valid_smc_bootloader_text [phi:main::@100->display_progress_text#0] -- qbuz1=qbuc1 + // [1088] phi from main::@103 to display_progress_text [phi:main::@103->display_progress_text] + // [1088] phi display_progress_text::text#12 = display_no_valid_smc_bootloader_text [phi:main::@103->display_progress_text#0] -- qbuz1=qbuc1 lda #display_no_valid_smc_bootloader_text sta.z display_progress_text.text+1 - // [926] phi display_progress_text::lines#11 = display_no_valid_smc_bootloader_count [phi:main::@100->display_progress_text#1] -- vbuz1=vbuc1 + // [1088] phi display_progress_text::lines#11 = display_no_valid_smc_bootloader_count [phi:main::@103->display_progress_text#1] -- vbuz1=vbuc1 lda #display_no_valid_smc_bootloader_count sta.z display_progress_text.lines jsr display_progress_text - jmp __b2 - // main::@10 - __b10: - // display_info_led(PROGRESS_X + 3, PROGRESS_Y + 3 + intro_status, status_color[intro_status], BLUE) - // [683] display_info_led::y#3 = PROGRESS_Y+3 + main::intro_status#2 -- vbuz1=vbuc1_plus_vbum2 - lda #PROGRESS_Y+3 - clc - adc intro_status - sta.z display_info_led.y - // [684] display_info_led::tc#3 = status_color[main::intro_status#2] -- vbuxx=pbuc1_derefidx_vbum1 - ldy intro_status - ldx status_color,y - // [685] call display_info_led - // [1757] phi from main::@10 to display_info_led [phi:main::@10->display_info_led] - // [1757] phi display_info_led::y#4 = display_info_led::y#3 [phi:main::@10->display_info_led#0] -- register_copy - // [1757] phi display_info_led::x#4 = PROGRESS_X+3 [phi:main::@10->display_info_led#1] -- vbuyy=vbuc1 - ldy #PROGRESS_X+3 - // [1757] phi display_info_led::tc#4 = display_info_led::tc#3 [phi:main::@10->display_info_led#2] -- register_copy - jsr display_info_led - // main::@95 - // for(unsigned char intro_status=0; intro_status<11; intro_status++) - // [686] main::intro_status#1 = ++ main::intro_status#2 -- vbum1=_inc_vbum1 - inc intro_status - // [109] phi from main::@95 to main::@9 [phi:main::@95->main::@9] - // [109] phi main::intro_status#2 = main::intro_status#1 [phi:main::@95->main::@9#0] -- register_copy - jmp __b9 - // main::@8 - __b8: + jmp __b12 + // main::@14 + __b14: // rom_chip*13 - // [687] main::$286 = main::rom_chip#2 << 1 -- vbuaa=vbum1_rol_1 + // [732] main::$317 = main::rom_chip#2 << 1 -- vbuz1=vbum2_rol_1 lda rom_chip asl - // [688] main::$287 = main::$286 + main::rom_chip#2 -- vbuaa=vbuaa_plus_vbum1 + sta.z main__317 + // [733] main::$318 = main::$317 + main::rom_chip#2 -- vbuz1=vbuz1_plus_vbum2 + lda rom_chip clc - adc rom_chip - // [689] main::$288 = main::$287 << 2 -- vbuaa=vbuaa_rol_2 + adc.z main__318 + sta.z main__318 + // [734] main::$319 = main::$318 << 2 -- vbuz1=vbuz1_rol_2 + lda.z main__319 asl asl - // [690] main::$72 = main::$288 + main::rom_chip#2 -- vbuaa=vbuaa_plus_vbum1 + sta.z main__319 + // [735] main::$79 = main::$319 + main::rom_chip#2 -- vbuz1=vbuz1_plus_vbum2 + lda rom_chip clc - adc rom_chip + adc.z main__79 + sta.z main__79 // strcpy(&rom_release_text[rom_chip*13], " " ) - // [691] strcpy::destination#1 = rom_release_text + main::$72 -- pbuz1=pbuc1_plus_vbuaa + // [736] strcpy::destination#1 = rom_release_text + main::$79 -- pbuz1=pbuc1_plus_vbuz2 clc adc #rom_release_text adc #0 sta.z strcpy.destination+1 - // [692] call strcpy - // [950] phi from main::@8 to strcpy [phi:main::@8->strcpy] - // [950] phi strcpy::dst#0 = strcpy::destination#1 [phi:main::@8->strcpy#0] -- register_copy - // [950] phi strcpy::src#0 = main::source [phi:main::@8->strcpy#1] -- pbuz1=pbuc1 + // [737] call strcpy + // [982] phi from main::@14 to strcpy [phi:main::@14->strcpy] + // [982] phi strcpy::dst#0 = strcpy::destination#1 [phi:main::@14->strcpy#0] -- register_copy + // [982] phi strcpy::src#0 = main::source [phi:main::@14->strcpy#1] -- pbuz1=pbuc1 lda #source sta.z strcpy.src+1 jsr strcpy - // main::@91 + // main::@98 // display_info_rom(rom_chip, STATUS_NONE, NULL) - // [693] display_info_rom::rom_chip#4 = main::rom_chip#2 -- vbuz1=vbum2 + // [738] display_info_rom::rom_chip#4 = main::rom_chip#2 -- vbuz1=vbum2 lda rom_chip sta.z display_info_rom.rom_chip - // [694] call display_info_rom - // [1199] phi from main::@91 to display_info_rom [phi:main::@91->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = 0 [phi:main::@91->display_info_rom#0] -- pbuz1=vbuc1 + // [739] call display_info_rom + // [1285] phi from main::@98 to display_info_rom [phi:main::@98->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = 0 [phi:main::@98->display_info_rom#0] -- pbuz1=vbuc1 lda #<0 sta.z display_info_rom.info_text sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#4 [phi:main::@91->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_NONE [phi:main::@91->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#4 [phi:main::@98->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_NONE [phi:main::@98->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_NONE - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - // main::@92 + // main::@99 // for(unsigned char rom_chip=0; rom_chip<8; rom_chip++) - // [695] main::rom_chip#1 = ++ main::rom_chip#2 -- vbum1=_inc_vbum1 + // [740] main::rom_chip#1 = ++ main::rom_chip#2 -- vbum1=_inc_vbum1 inc rom_chip - // [99] phi from main::@92 to main::@7 [phi:main::@92->main::@7] - // [99] phi main::rom_chip#2 = main::rom_chip#1 [phi:main::@92->main::@7#0] -- register_copy - jmp __b7 + // [99] phi from main::@99 to main::@13 [phi:main::@99->main::@13] + // [99] phi main::rom_chip#2 = main::rom_chip#1 [phi:main::@99->main::@13#0] -- register_copy + jmp __b13 .segment Data - file_smc_version_text: .fill $d, 0 + smc_file_version_text: .fill $d, 0 // Fill the version data ... - file_rom_github: .fill 8, 0 - file_rom_release_text: .fill $d, 0 + rom_file_github: .fill 8, 0 + rom_file_release_text: .fill $d, 0 title_text: .text "Commander X16 Flash Utility!" .byte 0 s: .text "# Chip Status Type Curr. Release Update Info" @@ -4260,53 +4686,65 @@ main: { .byte 0 s11: .text " size error!" .byte 0 - info_text7: .text "Please check the SMC update issue!" + info_text7: .text "SMC update issue!" .byte 0 info_text8: .text "Issue with SMC!" .byte 0 - info_text9: .text "Please check the main CX16 ROM update issue!" + info_text9: .text "CX16 ROM update issue, ROM not detected!" .byte 0 info_text10: .text "Issue with main CX16 ROM!" .byte 0 - info_text11: .text "Chipsets have been detected and update files validated!" + info_text11: .text "Are J1 jumper pins closed?" .byte 0 - info_text12: .text "Continue with update of highlighted chipsets? [Y/N]" + info_text12: .text "CX16 ROM update issue!" .byte 0 - filter: .text "nyNY" + info_text14: .text "The SMC chip and SMC.BIN versions are equal, no flash required!" .byte 0 - main__268: .text "nN" + info_text15: .text "The ROM.BIN isn't compatible with SMC.BIN, no flash allowed!" .byte 0 - info_text13: .text "Cancelled" + info_text16: .text "You still want to continue with flashing? [YN]" .byte 0 - info_text16: .text "You have selected not to cancel the update ... " + filter: .text "YN" .byte 0 - info_text17: .text "Press both POWER/RESET buttons on the CX16 board!" + info_text17: .text "Chipsets have been detected and update files validated!" .byte 0 - info_text18: .text "Press POWER/RESET!" + info_text18: .text "Continue with update of highlighted chipsets? [Y/N]" .byte 0 - info_text20: .text "SMC not updated!" + filter1: .text "nyNY" .byte 0 - info_text21: .text "Update SMC failed!" + main__297: .text "nN" .byte 0 - info_text22: .text "Comparing ... (.) same, (*) different." + info_text19: .text "Cancelled" .byte 0 - info_text24: .text "No update required" + info_text22: .text "You have selected not to cancel the update ... " + .byte 0 + info_text23: .text "Press both POWER/RESET buttons on the CX16 board!" + .byte 0 + info_text24: .text "Press POWER/RESET!" + .byte 0 + info_text26: .text "SMC not updated!" + .byte 0 + info_text27: .text "Update SMC failed!" + .byte 0 + info_text28: .text "Comparing ... (.) same, (*) different." + .byte 0 + info_text30: .text "No update required" .byte 0 s15: .text " differences!" .byte 0 s16: .text " flash errors!" .byte 0 - info_text25: .text "OK!" + info_text31: .text "OK!" .byte 0 - info_text26: .text "The update has been cancelled!" + info_text32: .text "The update has been cancelled!" .byte 0 - info_text27: .text "Update Failure! Your CX16 may be bricked!" + info_text33: .text "Update Failure! Your CX16 may be bricked!" .byte 0 - info_text28: .text "Take a foto of this screen. And shut down power ..." + info_text34: .text "Take a foto of this screen. And shut down power ..." .byte 0 - info_text29: .text "Update issues, your CX16 is not updated!" + info_text35: .text "Update issues, your CX16 is not updated!" .byte 0 - info_text30: .text "Your CX16 update is a success!" + info_text36: .text "Your CX16 update is a success!" .byte 0 s17: .text "(" .byte 0 @@ -4316,23 +4754,62 @@ main: { .byte 0 s21: .text ") Your CX16 will reset ..." .byte 0 - main__243: .byte 0 - main__245: .byte 0 + .label main__52 = smc_supported_rom.return + .label main__103 = rom_get_release.return + .label main__104 = rom_get_prefix.return + main__271: .byte 0 + main__273: .byte 0 + check_status_cx16_rom2_check_status_rom1_main__0: .byte 0 + check_status_cx16_rom3_check_status_rom1_main__0: .byte 0 + check_status_smc5_main__0: .byte 0 + check_status_vera1_main__0: .byte 0 + check_status_smc7_main__0: .byte 0 + check_status_vera3_main__0: .byte 0 + check_status_roms_all1_check_status_rom1_main__0: .byte 0 + check_status_smc8_main__0: .byte 0 + check_status_card_roms1_check_status_rom1_main__0: .byte 0 + check_status_roms3_check_status_rom1_main__0: .byte 0 rom_chip: .byte 0 - intro_status: .byte 0 rom_chip1: .byte 0 + intro_status: .byte 0 rom_chip2: .byte 0 rom_bank: .byte 0 file: .word 0 - .label check_status_roms_all1_return = rom_chip - check_status_smc7_return: .byte 0 + .label rom_bytes_read = rom_read.return + rom_file_modulo: .dword 0 + .label rom_file_release = rom_get_release.return + .label rom_file_prefix = rom_get_prefix.return + .label check_status_cx16_rom2_check_status_rom1_return = check_status_cx16_rom2_check_status_rom1_main__0 + .label check_status_cx16_rom3_check_status_rom1_return = check_status_cx16_rom3_check_status_rom1_main__0 + .label check_status_smc5_return = check_status_smc5_main__0 + .label check_status_vera1_return = check_status_vera1_main__0 + check_status_roms1_rom_chip: .byte 0 + check_status_roms1_return: .byte 0 + check_status_roms2_rom_chip: .byte 0 + check_status_roms2_return: .byte 0 + .label ch = util_wait_key.return + .label check_status_smc7_return = check_status_smc7_main__0 + .label check_status_vera3_return = check_status_vera3_main__0 + .label check_status_roms_all1_check_status_rom1_return = check_status_roms_all1_check_status_rom1_main__0 + check_status_roms_all1_rom_chip: .byte 0 + check_status_roms_all1_return: .byte 0 + .label check_status_smc8_return = check_status_smc8_main__0 + .label check_status_card_roms1_check_status_rom1_return = check_status_card_roms1_check_status_rom1_main__0 + check_status_card_roms1_rom_chip: .byte 0 + check_status_card_roms1_return: .byte 0 + .label ch1 = strchr.c rom_chip3: .byte 0 flashed_bytes: .dword 0 rom_chip4: .byte 0 rom_bank1: .byte 0 .label file1 = rom_file.return - check_status_smc10_return: .byte 0 - check_status_smc11_return: .byte 0 + .label rom_bytes_read1 = rom_read.return + rom_flash_errors: .dword 0 + .label check_status_roms3_check_status_rom1_return = check_status_roms3_check_status_rom1_main__0 + check_status_roms3_rom_chip: .byte 0 + check_status_roms3_return: .byte 0 + check_status_roms4_rom_chip: .byte 0 + check_status_roms4_return: .byte 0 w: .byte 0 w1: .byte 0 } @@ -4341,16 +4818,17 @@ main: { // Set the layer with which the conio will interact. screenlayer1: { // screenlayer(1, *VERA_L1_MAPBASE, *VERA_L1_CONFIG) - // [696] screenlayer::mapbase#0 = *VERA_L1_MAPBASE -- vbuxx=_deref_pbuc1 - ldx VERA_L1_MAPBASE - // [697] screenlayer::config#0 = *VERA_L1_CONFIG -- vbuz1=_deref_pbuc1 + // [741] screenlayer::mapbase#0 = *VERA_L1_MAPBASE -- vbuz1=_deref_pbuc1 + lda VERA_L1_MAPBASE + sta.z screenlayer.mapbase + // [742] screenlayer::config#0 = *VERA_L1_CONFIG -- vbuz1=_deref_pbuc1 lda VERA_L1_CONFIG sta.z screenlayer.config - // [698] call screenlayer + // [743] call screenlayer jsr screenlayer // screenlayer1::@return // } - // [699] return + // [744] return rts } // textcolor @@ -4358,22 +4836,27 @@ screenlayer1: { // - color: a 4 bit value ( decimal between 0 and 15). // This will only work when the VERA is in 16 color mode! // Note that on the VERA, the transparent color has value 0. -// char textcolor(__register(X) char color) +// char textcolor(__zp($e0) char color) textcolor: { + .label textcolor__0 = $e5 + .label textcolor__1 = $e0 + .label color = $e0 // __conio.color & 0xF0 - // [701] textcolor::$0 = *((char *)&__conio+$d) & $f0 -- vbuaa=_deref_pbuc1_band_vbuc2 + // [746] textcolor::$0 = *((char *)&__conio+$d) & $f0 -- vbuz1=_deref_pbuc1_band_vbuc2 lda #$f0 and __conio+$d + sta.z textcolor__0 // __conio.color & 0xF0 | color - // [702] textcolor::$1 = textcolor::$0 | textcolor::color#18 -- vbuaa=vbuaa_bor_vbuxx - stx.z $ff - ora.z $ff + // [747] textcolor::$1 = textcolor::$0 | textcolor::color#18 -- vbuz1=vbuz2_bor_vbuz1 + lda.z textcolor__1 + ora.z textcolor__0 + sta.z textcolor__1 // __conio.color = __conio.color & 0xF0 | color - // [703] *((char *)&__conio+$d) = textcolor::$1 -- _deref_pbuc1=vbuaa + // [748] *((char *)&__conio+$d) = textcolor::$1 -- _deref_pbuc1=vbuz1 sta __conio+$d // textcolor::@return // } - // [704] return + // [749] return rts } // bgcolor @@ -4381,30 +4864,36 @@ textcolor: { // - color: a 4 bit value ( decimal between 0 and 15). // This will only work when the VERA is in 16 color mode! // Note that on the VERA, the transparent color has value 0. -// char bgcolor(__register(X) char color) +// char bgcolor(__zp($e0) char color) bgcolor: { - .label bgcolor__0 = $bd + .label bgcolor__0 = $e1 + .label bgcolor__1 = $e0 + .label bgcolor__2 = $e1 + .label color = $e0 // __conio.color & 0x0F - // [706] bgcolor::$0 = *((char *)&__conio+$d) & $f -- vbuz1=_deref_pbuc1_band_vbuc2 + // [751] bgcolor::$0 = *((char *)&__conio+$d) & $f -- vbuz1=_deref_pbuc1_band_vbuc2 lda #$f and __conio+$d sta.z bgcolor__0 // color << 4 - // [707] bgcolor::$1 = bgcolor::color#14 << 4 -- vbuaa=vbuxx_rol_4 - txa + // [752] bgcolor::$1 = bgcolor::color#14 << 4 -- vbuz1=vbuz1_rol_4 + lda.z bgcolor__1 asl asl asl asl + sta.z bgcolor__1 // __conio.color & 0x0F | color << 4 - // [708] bgcolor::$2 = bgcolor::$0 | bgcolor::$1 -- vbuaa=vbuz1_bor_vbuaa - ora.z bgcolor__0 + // [753] bgcolor::$2 = bgcolor::$0 | bgcolor::$1 -- vbuz1=vbuz1_bor_vbuz2 + lda.z bgcolor__2 + ora.z bgcolor__1 + sta.z bgcolor__2 // __conio.color = __conio.color & 0x0F | color << 4 - // [709] *((char *)&__conio+$d) = bgcolor::$2 -- _deref_pbuc1=vbuaa + // [754] *((char *)&__conio+$d) = bgcolor::$2 -- _deref_pbuc1=vbuz1 sta __conio+$d // bgcolor::@return // } - // [710] return + // [755] return rts } // cursor @@ -4415,12 +4904,12 @@ bgcolor: { cursor: { .const onoff = 0 // __conio.cursor = onoff - // [711] *((char *)&__conio+$c) = cursor::onoff#0 -- _deref_pbuc1=vbuc2 + // [756] *((char *)&__conio+$c) = cursor::onoff#0 -- _deref_pbuc1=vbuc2 lda #onoff sta __conio+$c // cursor::@return // } - // [712] return + // [757] return rts } // cbm_k_plot_get @@ -4430,11 +4919,11 @@ cursor: { */ cbm_k_plot_get: { // __mem unsigned char x - // [713] cbm_k_plot_get::x = 0 -- vbum1=vbuc1 + // [758] cbm_k_plot_get::x = 0 -- vbum1=vbuc1 lda #0 sta x // __mem unsigned char y - // [714] cbm_k_plot_get::y = 0 -- vbum1=vbuc1 + // [759] cbm_k_plot_get::y = 0 -- vbum1=vbuc1 sta y // kickasm // kickasm( uses cbm_k_plot_get::x uses cbm_k_plot_get::y uses CBM_PLOT) {{ sec jsr CBM_PLOT stx y sty x }} @@ -4444,14 +4933,14 @@ cbm_k_plot_get: { sty x // MAKEWORD(x,y) - // [716] cbm_k_plot_get::return#0 = cbm_k_plot_get::x w= cbm_k_plot_get::y -- vwum1=vbum2_word_vbum3 + // [761] cbm_k_plot_get::return#0 = cbm_k_plot_get::x w= cbm_k_plot_get::y -- vwum1=vbum2_word_vbum3 lda x sta return+1 lda y sta return // cbm_k_plot_get::@return // } - // [717] return + // [762] return rts .segment Data x: .byte 0 @@ -4461,51 +4950,63 @@ cbm_k_plot_get: { .segment Code // gotoxy // Set the cursor to the specified position -// void gotoxy(__register(X) char x, __register(Y) char y) +// void gotoxy(__zp($48) char x, __zp($49) char y) gotoxy: { - .label gotoxy__9 = $3a + .label gotoxy__2 = $48 + .label gotoxy__3 = $48 + .label gotoxy__6 = $47 + .label gotoxy__7 = $47 + .label gotoxy__8 = $4c + .label gotoxy__9 = $4a + .label gotoxy__10 = $49 + .label x = $48 + .label y = $49 + .label gotoxy__14 = $47 // (x>=__conio.width)?__conio.width:x - // [719] if(gotoxy::x#30>=*((char *)&__conio+6)) goto gotoxy::@1 -- vbuxx_ge__deref_pbuc1_then_la1 - cpx __conio+6 + // [764] if(gotoxy::x#30>=*((char *)&__conio+6)) goto gotoxy::@1 -- vbuz1_ge__deref_pbuc1_then_la1 + lda.z x + cmp __conio+6 bcs __b1 - // [721] phi from gotoxy gotoxy::@1 to gotoxy::@2 [phi:gotoxy/gotoxy::@1->gotoxy::@2] - // [721] phi gotoxy::$3 = gotoxy::x#30 [phi:gotoxy/gotoxy::@1->gotoxy::@2#0] -- register_copy + // [766] phi from gotoxy gotoxy::@1 to gotoxy::@2 [phi:gotoxy/gotoxy::@1->gotoxy::@2] + // [766] phi gotoxy::$3 = gotoxy::x#30 [phi:gotoxy/gotoxy::@1->gotoxy::@2#0] -- register_copy jmp __b2 // gotoxy::@1 __b1: - // [720] gotoxy::$2 = *((char *)&__conio+6) -- vbuxx=_deref_pbuc1 - ldx __conio+6 + // [765] gotoxy::$2 = *((char *)&__conio+6) -- vbuz1=_deref_pbuc1 + lda __conio+6 + sta.z gotoxy__2 // gotoxy::@2 __b2: // __conio.cursor_x = (x>=__conio.width)?__conio.width:x - // [722] *((char *)&__conio) = gotoxy::$3 -- _deref_pbuc1=vbuxx - stx __conio + // [767] *((char *)&__conio) = gotoxy::$3 -- _deref_pbuc1=vbuz1 + lda.z gotoxy__3 + sta __conio // (y>=__conio.height)?__conio.height:y - // [723] if(gotoxy::y#30>=*((char *)&__conio+7)) goto gotoxy::@3 -- vbuyy_ge__deref_pbuc1_then_la1 - cpy __conio+7 + // [768] if(gotoxy::y#30>=*((char *)&__conio+7)) goto gotoxy::@3 -- vbuz1_ge__deref_pbuc1_then_la1 + lda.z y + cmp __conio+7 bcs __b3 // gotoxy::@4 - // [724] gotoxy::$14 = gotoxy::y#30 -- vbuaa=vbuyy - tya - // [725] phi from gotoxy::@3 gotoxy::@4 to gotoxy::@5 [phi:gotoxy::@3/gotoxy::@4->gotoxy::@5] - // [725] phi gotoxy::$7 = gotoxy::$6 [phi:gotoxy::@3/gotoxy::@4->gotoxy::@5#0] -- register_copy + // [769] gotoxy::$14 = gotoxy::y#30 -- vbuz1=vbuz2 + sta.z gotoxy__14 + // [770] phi from gotoxy::@3 gotoxy::@4 to gotoxy::@5 [phi:gotoxy::@3/gotoxy::@4->gotoxy::@5] + // [770] phi gotoxy::$7 = gotoxy::$6 [phi:gotoxy::@3/gotoxy::@4->gotoxy::@5#0] -- register_copy // gotoxy::@5 __b5: // __conio.cursor_y = (y>=__conio.height)?__conio.height:y - // [726] *((char *)&__conio+1) = gotoxy::$7 -- _deref_pbuc1=vbuaa + // [771] *((char *)&__conio+1) = gotoxy::$7 -- _deref_pbuc1=vbuz1 + lda.z gotoxy__7 sta __conio+1 // __conio.cursor_x << 1 - // [727] gotoxy::$8 = *((char *)&__conio) << 1 -- vbuxx=_deref_pbuc1_rol_1 + // [772] gotoxy::$8 = *((char *)&__conio) << 1 -- vbuz1=_deref_pbuc1_rol_1 lda __conio asl - tax + sta.z gotoxy__8 // __conio.offsets[y] + __conio.cursor_x << 1 - // [728] gotoxy::$10 = gotoxy::y#30 << 1 -- vbuaa=vbuyy_rol_1 - tya - asl - // [729] gotoxy::$9 = ((unsigned int *)&__conio+$15)[gotoxy::$10] + gotoxy::$8 -- vwuz1=pwuc1_derefidx_vbuaa_plus_vbuxx - tay - txa + // [773] gotoxy::$10 = gotoxy::y#30 << 1 -- vbuz1=vbuz1_rol_1 + asl.z gotoxy__10 + // [774] gotoxy::$9 = ((unsigned int *)&__conio+$15)[gotoxy::$10] + gotoxy::$8 -- vwuz1=pwuc1_derefidx_vbuz2_plus_vbuz3 + ldy.z gotoxy__10 clc adc __conio+$15,y sta.z gotoxy__9 @@ -4513,48 +5014,51 @@ gotoxy: { adc #0 sta.z gotoxy__9+1 // __conio.offset = __conio.offsets[y] + __conio.cursor_x << 1 - // [730] *((unsigned int *)&__conio+$13) = gotoxy::$9 -- _deref_pwuc1=vwuz1 + // [775] *((unsigned int *)&__conio+$13) = gotoxy::$9 -- _deref_pwuc1=vwuz1 lda.z gotoxy__9 sta __conio+$13 lda.z gotoxy__9+1 sta __conio+$13+1 // gotoxy::@return // } - // [731] return + // [776] return rts // gotoxy::@3 __b3: // (y>=__conio.height)?__conio.height:y - // [732] gotoxy::$6 = *((char *)&__conio+7) -- vbuaa=_deref_pbuc1 + // [777] gotoxy::$6 = *((char *)&__conio+7) -- vbuz1=_deref_pbuc1 lda __conio+7 + sta.z gotoxy__6 jmp __b5 } // cputln // Print a newline cputln: { + .label cputln__2 = $6f // __conio.cursor_x = 0 - // [733] *((char *)&__conio) = 0 -- _deref_pbuc1=vbuc2 + // [778] *((char *)&__conio) = 0 -- _deref_pbuc1=vbuc2 lda #0 sta __conio // __conio.cursor_y++; - // [734] *((char *)&__conio+1) = ++ *((char *)&__conio+1) -- _deref_pbuc1=_inc__deref_pbuc1 + // [779] *((char *)&__conio+1) = ++ *((char *)&__conio+1) -- _deref_pbuc1=_inc__deref_pbuc1 inc __conio+1 // __conio.offset = __conio.offsets[__conio.cursor_y] - // [735] cputln::$2 = *((char *)&__conio+1) << 1 -- vbuaa=_deref_pbuc1_rol_1 + // [780] cputln::$2 = *((char *)&__conio+1) << 1 -- vbuz1=_deref_pbuc1_rol_1 lda __conio+1 asl - // [736] *((unsigned int *)&__conio+$13) = ((unsigned int *)&__conio+$15)[cputln::$2] -- _deref_pwuc1=pwuc2_derefidx_vbuaa + sta.z cputln__2 + // [781] *((unsigned int *)&__conio+$13) = ((unsigned int *)&__conio+$15)[cputln::$2] -- _deref_pwuc1=pwuc2_derefidx_vbuz1 tay lda __conio+$15,y sta __conio+$13 lda __conio+$15+1,y sta __conio+$13+1 // cscroll() - // [737] call cscroll + // [782] call cscroll jsr cscroll // cputln::@return // } - // [738] return + // [783] return rts } // display_frame_init_64 @@ -4567,77 +5071,79 @@ display_frame_init_64: { .const vera_display_set_vstart1_start = $13 .const vera_display_set_vstop1_stop = $db // textcolor(WHITE) - // [740] call textcolor + // [785] call textcolor // Set the charset to lower case. // screenlayer1(); - // [700] phi from display_frame_init_64 to textcolor [phi:display_frame_init_64->textcolor] - // [700] phi textcolor::color#18 = WHITE [phi:display_frame_init_64->textcolor#0] -- vbuxx=vbuc1 - ldx #WHITE + // [745] phi from display_frame_init_64 to textcolor [phi:display_frame_init_64->textcolor] + // [745] phi textcolor::color#18 = WHITE [phi:display_frame_init_64->textcolor#0] -- vbuz1=vbuc1 + lda #WHITE + sta.z textcolor.color jsr textcolor - // [741] phi from display_frame_init_64 to display_frame_init_64::@2 [phi:display_frame_init_64->display_frame_init_64::@2] + // [786] phi from display_frame_init_64 to display_frame_init_64::@2 [phi:display_frame_init_64->display_frame_init_64::@2] // display_frame_init_64::@2 // bgcolor(BLUE) - // [742] call bgcolor - // [705] phi from display_frame_init_64::@2 to bgcolor [phi:display_frame_init_64::@2->bgcolor] - // [705] phi bgcolor::color#14 = BLUE [phi:display_frame_init_64::@2->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [787] call bgcolor + // [750] phi from display_frame_init_64::@2 to bgcolor [phi:display_frame_init_64::@2->bgcolor] + // [750] phi bgcolor::color#14 = BLUE [phi:display_frame_init_64::@2->bgcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z bgcolor.color jsr bgcolor - // [743] phi from display_frame_init_64::@2 to display_frame_init_64::@3 [phi:display_frame_init_64::@2->display_frame_init_64::@3] + // [788] phi from display_frame_init_64::@2 to display_frame_init_64::@3 [phi:display_frame_init_64::@2->display_frame_init_64::@3] // display_frame_init_64::@3 // scroll(0) - // [744] call scroll + // [789] call scroll jsr scroll - // [745] phi from display_frame_init_64::@3 to display_frame_init_64::@4 [phi:display_frame_init_64::@3->display_frame_init_64::@4] + // [790] phi from display_frame_init_64::@3 to display_frame_init_64::@4 [phi:display_frame_init_64::@3->display_frame_init_64::@4] // display_frame_init_64::@4 // clrscr() - // [746] call clrscr + // [791] call clrscr jsr clrscr // display_frame_init_64::vera_display_set_hstart1 // *VERA_CTRL |= VERA_DCSEL - // [747] *VERA_CTRL = *VERA_CTRL | VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // [792] *VERA_CTRL = *VERA_CTRL | VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 lda #VERA_DCSEL ora VERA_CTRL sta VERA_CTRL // *VERA_DC_HSTART = start - // [748] *VERA_DC_HSTART = display_frame_init_64::vera_display_set_hstart1_start#0 -- _deref_pbuc1=vbuc2 + // [793] *VERA_DC_HSTART = display_frame_init_64::vera_display_set_hstart1_start#0 -- _deref_pbuc1=vbuc2 lda #vera_display_set_hstart1_start sta VERA_DC_HSTART // display_frame_init_64::vera_display_set_hstop1 // *VERA_CTRL |= VERA_DCSEL - // [749] *VERA_CTRL = *VERA_CTRL | VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // [794] *VERA_CTRL = *VERA_CTRL | VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 lda #VERA_DCSEL ora VERA_CTRL sta VERA_CTRL // *VERA_DC_HSTOP = stop - // [750] *VERA_DC_HSTOP = display_frame_init_64::vera_display_set_hstop1_stop#0 -- _deref_pbuc1=vbuc2 + // [795] *VERA_DC_HSTOP = display_frame_init_64::vera_display_set_hstop1_stop#0 -- _deref_pbuc1=vbuc2 lda #vera_display_set_hstop1_stop sta VERA_DC_HSTOP // display_frame_init_64::vera_display_set_vstart1 // *VERA_CTRL |= VERA_DCSEL - // [751] *VERA_CTRL = *VERA_CTRL | VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // [796] *VERA_CTRL = *VERA_CTRL | VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 lda #VERA_DCSEL ora VERA_CTRL sta VERA_CTRL // *VERA_DC_VSTART = start - // [752] *VERA_DC_VSTART = display_frame_init_64::vera_display_set_vstart1_start#0 -- _deref_pbuc1=vbuc2 + // [797] *VERA_DC_VSTART = display_frame_init_64::vera_display_set_vstart1_start#0 -- _deref_pbuc1=vbuc2 lda #vera_display_set_vstart1_start sta VERA_DC_VSTART // display_frame_init_64::vera_display_set_vstop1 // *VERA_CTRL |= VERA_DCSEL - // [753] *VERA_CTRL = *VERA_CTRL | VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // [798] *VERA_CTRL = *VERA_CTRL | VERA_DCSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 lda #VERA_DCSEL ora VERA_CTRL sta VERA_CTRL // *VERA_DC_VSTOP = stop - // [754] *VERA_DC_VSTOP = display_frame_init_64::vera_display_set_vstop1_stop#0 -- _deref_pbuc1=vbuc2 + // [799] *VERA_DC_VSTOP = display_frame_init_64::vera_display_set_vstop1_stop#0 -- _deref_pbuc1=vbuc2 lda #vera_display_set_vstop1_stop sta VERA_DC_VSTOP // display_frame_init_64::@1 // cx16_k_screen_set_charset(3, (char *)0) - // [755] display_frame_init_64::cx16_k_screen_set_charset1_charset = 3 -- vbum1=vbuc1 + // [800] display_frame_init_64::cx16_k_screen_set_charset1_charset = 3 -- vbum1=vbuc1 lda #3 sta cx16_k_screen_set_charset1_charset - // [756] display_frame_init_64::cx16_k_screen_set_charset1_offset = (char *) 0 -- pbum1=pbuc1 + // [801] display_frame_init_64::cx16_k_screen_set_charset1_offset = (char *) 0 -- pbum1=pbuc1 lda #<0 sta cx16_k_screen_set_charset1_offset sta cx16_k_screen_set_charset1_offset+1 @@ -4650,7 +5156,7 @@ display_frame_init_64: { jsr CX16_SCREEN_SET_CHARSET // display_frame_init_64::@return // } - // [758] return + // [803] return rts .segment Data cx16_k_screen_set_charset1_charset: .byte 0 @@ -4663,325 +5169,328 @@ display_frame_init_64: { */ display_frame_draw: { // textcolor(LIGHT_BLUE) - // [760] call textcolor - // [700] phi from display_frame_draw to textcolor [phi:display_frame_draw->textcolor] - // [700] phi textcolor::color#18 = LIGHT_BLUE [phi:display_frame_draw->textcolor#0] -- vbuxx=vbuc1 - ldx #LIGHT_BLUE + // [805] call textcolor + // [745] phi from display_frame_draw to textcolor [phi:display_frame_draw->textcolor] + // [745] phi textcolor::color#18 = LIGHT_BLUE [phi:display_frame_draw->textcolor#0] -- vbuz1=vbuc1 + lda #LIGHT_BLUE + sta.z textcolor.color jsr textcolor - // [761] phi from display_frame_draw to display_frame_draw::@1 [phi:display_frame_draw->display_frame_draw::@1] + // [806] phi from display_frame_draw to display_frame_draw::@1 [phi:display_frame_draw->display_frame_draw::@1] // display_frame_draw::@1 // bgcolor(BLUE) - // [762] call bgcolor - // [705] phi from display_frame_draw::@1 to bgcolor [phi:display_frame_draw::@1->bgcolor] - // [705] phi bgcolor::color#14 = BLUE [phi:display_frame_draw::@1->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [807] call bgcolor + // [750] phi from display_frame_draw::@1 to bgcolor [phi:display_frame_draw::@1->bgcolor] + // [750] phi bgcolor::color#14 = BLUE [phi:display_frame_draw::@1->bgcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z bgcolor.color jsr bgcolor - // [763] phi from display_frame_draw::@1 to display_frame_draw::@2 [phi:display_frame_draw::@1->display_frame_draw::@2] + // [808] phi from display_frame_draw::@1 to display_frame_draw::@2 [phi:display_frame_draw::@1->display_frame_draw::@2] // display_frame_draw::@2 // clrscr() - // [764] call clrscr + // [809] call clrscr jsr clrscr - // [765] phi from display_frame_draw::@2 to display_frame_draw::@3 [phi:display_frame_draw::@2->display_frame_draw::@3] + // [810] phi from display_frame_draw::@2 to display_frame_draw::@3 [phi:display_frame_draw::@2->display_frame_draw::@3] // display_frame_draw::@3 // display_frame(0, 0, 67, 14) - // [766] call display_frame - // [1839] phi from display_frame_draw::@3 to display_frame [phi:display_frame_draw::@3->display_frame] - // [1839] phi display_frame::y#0 = 0 [phi:display_frame_draw::@3->display_frame#0] -- vbuz1=vbuc1 + // [811] call display_frame + // [1896] phi from display_frame_draw::@3 to display_frame [phi:display_frame_draw::@3->display_frame] + // [1896] phi display_frame::y#0 = 0 [phi:display_frame_draw::@3->display_frame#0] -- vbuz1=vbuc1 lda #0 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@3->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@3->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = 0 [phi:display_frame_draw::@3->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = 0 [phi:display_frame_draw::@3->display_frame#2] -- vbuz1=vbuc1 lda #0 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@3->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@3->display_frame#3] -- vbuz1=vbuc1 lda #$43 sta.z display_frame.x1 jsr display_frame - // [767] phi from display_frame_draw::@3 to display_frame_draw::@4 [phi:display_frame_draw::@3->display_frame_draw::@4] + // [812] phi from display_frame_draw::@3 to display_frame_draw::@4 [phi:display_frame_draw::@3->display_frame_draw::@4] // display_frame_draw::@4 // display_frame(0, 0, 67, 2) - // [768] call display_frame - // [1839] phi from display_frame_draw::@4 to display_frame [phi:display_frame_draw::@4->display_frame] - // [1839] phi display_frame::y#0 = 0 [phi:display_frame_draw::@4->display_frame#0] -- vbuz1=vbuc1 + // [813] call display_frame + // [1896] phi from display_frame_draw::@4 to display_frame [phi:display_frame_draw::@4->display_frame] + // [1896] phi display_frame::y#0 = 0 [phi:display_frame_draw::@4->display_frame#0] -- vbuz1=vbuc1 lda #0 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = 2 [phi:display_frame_draw::@4->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = 2 [phi:display_frame_draw::@4->display_frame#1] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = 0 [phi:display_frame_draw::@4->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = 0 [phi:display_frame_draw::@4->display_frame#2] -- vbuz1=vbuc1 lda #0 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@4->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@4->display_frame#3] -- vbuz1=vbuc1 lda #$43 sta.z display_frame.x1 jsr display_frame - // [769] phi from display_frame_draw::@4 to display_frame_draw::@5 [phi:display_frame_draw::@4->display_frame_draw::@5] + // [814] phi from display_frame_draw::@4 to display_frame_draw::@5 [phi:display_frame_draw::@4->display_frame_draw::@5] // display_frame_draw::@5 // display_frame(0, 2, 67, 14) - // [770] call display_frame - // [1839] phi from display_frame_draw::@5 to display_frame [phi:display_frame_draw::@5->display_frame] - // [1839] phi display_frame::y#0 = 2 [phi:display_frame_draw::@5->display_frame#0] -- vbuz1=vbuc1 + // [815] call display_frame + // [1896] phi from display_frame_draw::@5 to display_frame [phi:display_frame_draw::@5->display_frame] + // [1896] phi display_frame::y#0 = 2 [phi:display_frame_draw::@5->display_frame#0] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@5->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@5->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = 0 [phi:display_frame_draw::@5->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = 0 [phi:display_frame_draw::@5->display_frame#2] -- vbuz1=vbuc1 lda #0 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@5->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@5->display_frame#3] -- vbuz1=vbuc1 lda #$43 sta.z display_frame.x1 jsr display_frame - // [771] phi from display_frame_draw::@5 to display_frame_draw::@6 [phi:display_frame_draw::@5->display_frame_draw::@6] + // [816] phi from display_frame_draw::@5 to display_frame_draw::@6 [phi:display_frame_draw::@5->display_frame_draw::@6] // display_frame_draw::@6 // display_frame(0, 2, 8, 14) - // [772] call display_frame + // [817] call display_frame // Chipset areas - // [1839] phi from display_frame_draw::@6 to display_frame [phi:display_frame_draw::@6->display_frame] - // [1839] phi display_frame::y#0 = 2 [phi:display_frame_draw::@6->display_frame#0] -- vbuz1=vbuc1 + // [1896] phi from display_frame_draw::@6 to display_frame [phi:display_frame_draw::@6->display_frame] + // [1896] phi display_frame::y#0 = 2 [phi:display_frame_draw::@6->display_frame#0] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@6->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@6->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = 0 [phi:display_frame_draw::@6->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = 0 [phi:display_frame_draw::@6->display_frame#2] -- vbuz1=vbuc1 lda #0 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = 8 [phi:display_frame_draw::@6->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = 8 [phi:display_frame_draw::@6->display_frame#3] -- vbuz1=vbuc1 lda #8 sta.z display_frame.x1 jsr display_frame - // [773] phi from display_frame_draw::@6 to display_frame_draw::@7 [phi:display_frame_draw::@6->display_frame_draw::@7] + // [818] phi from display_frame_draw::@6 to display_frame_draw::@7 [phi:display_frame_draw::@6->display_frame_draw::@7] // display_frame_draw::@7 // display_frame(8, 2, 19, 14) - // [774] call display_frame - // [1839] phi from display_frame_draw::@7 to display_frame [phi:display_frame_draw::@7->display_frame] - // [1839] phi display_frame::y#0 = 2 [phi:display_frame_draw::@7->display_frame#0] -- vbuz1=vbuc1 + // [819] call display_frame + // [1896] phi from display_frame_draw::@7 to display_frame [phi:display_frame_draw::@7->display_frame] + // [1896] phi display_frame::y#0 = 2 [phi:display_frame_draw::@7->display_frame#0] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@7->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@7->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = 8 [phi:display_frame_draw::@7->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = 8 [phi:display_frame_draw::@7->display_frame#2] -- vbuz1=vbuc1 lda #8 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $13 [phi:display_frame_draw::@7->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $13 [phi:display_frame_draw::@7->display_frame#3] -- vbuz1=vbuc1 lda #$13 sta.z display_frame.x1 jsr display_frame - // [775] phi from display_frame_draw::@7 to display_frame_draw::@8 [phi:display_frame_draw::@7->display_frame_draw::@8] + // [820] phi from display_frame_draw::@7 to display_frame_draw::@8 [phi:display_frame_draw::@7->display_frame_draw::@8] // display_frame_draw::@8 // display_frame(19, 2, 25, 14) - // [776] call display_frame - // [1839] phi from display_frame_draw::@8 to display_frame [phi:display_frame_draw::@8->display_frame] - // [1839] phi display_frame::y#0 = 2 [phi:display_frame_draw::@8->display_frame#0] -- vbuz1=vbuc1 + // [821] call display_frame + // [1896] phi from display_frame_draw::@8 to display_frame [phi:display_frame_draw::@8->display_frame] + // [1896] phi display_frame::y#0 = 2 [phi:display_frame_draw::@8->display_frame#0] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@8->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@8->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = $13 [phi:display_frame_draw::@8->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = $13 [phi:display_frame_draw::@8->display_frame#2] -- vbuz1=vbuc1 lda #$13 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $19 [phi:display_frame_draw::@8->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $19 [phi:display_frame_draw::@8->display_frame#3] -- vbuz1=vbuc1 lda #$19 sta.z display_frame.x1 jsr display_frame - // [777] phi from display_frame_draw::@8 to display_frame_draw::@9 [phi:display_frame_draw::@8->display_frame_draw::@9] + // [822] phi from display_frame_draw::@8 to display_frame_draw::@9 [phi:display_frame_draw::@8->display_frame_draw::@9] // display_frame_draw::@9 // display_frame(25, 2, 31, 14) - // [778] call display_frame - // [1839] phi from display_frame_draw::@9 to display_frame [phi:display_frame_draw::@9->display_frame] - // [1839] phi display_frame::y#0 = 2 [phi:display_frame_draw::@9->display_frame#0] -- vbuz1=vbuc1 + // [823] call display_frame + // [1896] phi from display_frame_draw::@9 to display_frame [phi:display_frame_draw::@9->display_frame] + // [1896] phi display_frame::y#0 = 2 [phi:display_frame_draw::@9->display_frame#0] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@9->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@9->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = $19 [phi:display_frame_draw::@9->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = $19 [phi:display_frame_draw::@9->display_frame#2] -- vbuz1=vbuc1 lda #$19 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $1f [phi:display_frame_draw::@9->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $1f [phi:display_frame_draw::@9->display_frame#3] -- vbuz1=vbuc1 lda #$1f sta.z display_frame.x1 jsr display_frame - // [779] phi from display_frame_draw::@9 to display_frame_draw::@10 [phi:display_frame_draw::@9->display_frame_draw::@10] + // [824] phi from display_frame_draw::@9 to display_frame_draw::@10 [phi:display_frame_draw::@9->display_frame_draw::@10] // display_frame_draw::@10 // display_frame(31, 2, 37, 14) - // [780] call display_frame - // [1839] phi from display_frame_draw::@10 to display_frame [phi:display_frame_draw::@10->display_frame] - // [1839] phi display_frame::y#0 = 2 [phi:display_frame_draw::@10->display_frame#0] -- vbuz1=vbuc1 + // [825] call display_frame + // [1896] phi from display_frame_draw::@10 to display_frame [phi:display_frame_draw::@10->display_frame] + // [1896] phi display_frame::y#0 = 2 [phi:display_frame_draw::@10->display_frame#0] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@10->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@10->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = $1f [phi:display_frame_draw::@10->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = $1f [phi:display_frame_draw::@10->display_frame#2] -- vbuz1=vbuc1 lda #$1f sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $25 [phi:display_frame_draw::@10->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $25 [phi:display_frame_draw::@10->display_frame#3] -- vbuz1=vbuc1 lda #$25 sta.z display_frame.x1 jsr display_frame - // [781] phi from display_frame_draw::@10 to display_frame_draw::@11 [phi:display_frame_draw::@10->display_frame_draw::@11] + // [826] phi from display_frame_draw::@10 to display_frame_draw::@11 [phi:display_frame_draw::@10->display_frame_draw::@11] // display_frame_draw::@11 // display_frame(37, 2, 43, 14) - // [782] call display_frame - // [1839] phi from display_frame_draw::@11 to display_frame [phi:display_frame_draw::@11->display_frame] - // [1839] phi display_frame::y#0 = 2 [phi:display_frame_draw::@11->display_frame#0] -- vbuz1=vbuc1 + // [827] call display_frame + // [1896] phi from display_frame_draw::@11 to display_frame [phi:display_frame_draw::@11->display_frame] + // [1896] phi display_frame::y#0 = 2 [phi:display_frame_draw::@11->display_frame#0] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@11->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@11->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = $25 [phi:display_frame_draw::@11->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = $25 [phi:display_frame_draw::@11->display_frame#2] -- vbuz1=vbuc1 lda #$25 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $2b [phi:display_frame_draw::@11->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $2b [phi:display_frame_draw::@11->display_frame#3] -- vbuz1=vbuc1 lda #$2b sta.z display_frame.x1 jsr display_frame - // [783] phi from display_frame_draw::@11 to display_frame_draw::@12 [phi:display_frame_draw::@11->display_frame_draw::@12] + // [828] phi from display_frame_draw::@11 to display_frame_draw::@12 [phi:display_frame_draw::@11->display_frame_draw::@12] // display_frame_draw::@12 // display_frame(43, 2, 49, 14) - // [784] call display_frame - // [1839] phi from display_frame_draw::@12 to display_frame [phi:display_frame_draw::@12->display_frame] - // [1839] phi display_frame::y#0 = 2 [phi:display_frame_draw::@12->display_frame#0] -- vbuz1=vbuc1 + // [829] call display_frame + // [1896] phi from display_frame_draw::@12 to display_frame [phi:display_frame_draw::@12->display_frame] + // [1896] phi display_frame::y#0 = 2 [phi:display_frame_draw::@12->display_frame#0] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@12->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@12->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = $2b [phi:display_frame_draw::@12->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = $2b [phi:display_frame_draw::@12->display_frame#2] -- vbuz1=vbuc1 lda #$2b sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $31 [phi:display_frame_draw::@12->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $31 [phi:display_frame_draw::@12->display_frame#3] -- vbuz1=vbuc1 lda #$31 sta.z display_frame.x1 jsr display_frame - // [785] phi from display_frame_draw::@12 to display_frame_draw::@13 [phi:display_frame_draw::@12->display_frame_draw::@13] + // [830] phi from display_frame_draw::@12 to display_frame_draw::@13 [phi:display_frame_draw::@12->display_frame_draw::@13] // display_frame_draw::@13 // display_frame(49, 2, 55, 14) - // [786] call display_frame - // [1839] phi from display_frame_draw::@13 to display_frame [phi:display_frame_draw::@13->display_frame] - // [1839] phi display_frame::y#0 = 2 [phi:display_frame_draw::@13->display_frame#0] -- vbuz1=vbuc1 + // [831] call display_frame + // [1896] phi from display_frame_draw::@13 to display_frame [phi:display_frame_draw::@13->display_frame] + // [1896] phi display_frame::y#0 = 2 [phi:display_frame_draw::@13->display_frame#0] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@13->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@13->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = $31 [phi:display_frame_draw::@13->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = $31 [phi:display_frame_draw::@13->display_frame#2] -- vbuz1=vbuc1 lda #$31 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $37 [phi:display_frame_draw::@13->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $37 [phi:display_frame_draw::@13->display_frame#3] -- vbuz1=vbuc1 lda #$37 sta.z display_frame.x1 jsr display_frame - // [787] phi from display_frame_draw::@13 to display_frame_draw::@14 [phi:display_frame_draw::@13->display_frame_draw::@14] + // [832] phi from display_frame_draw::@13 to display_frame_draw::@14 [phi:display_frame_draw::@13->display_frame_draw::@14] // display_frame_draw::@14 // display_frame(55, 2, 61, 14) - // [788] call display_frame - // [1839] phi from display_frame_draw::@14 to display_frame [phi:display_frame_draw::@14->display_frame] - // [1839] phi display_frame::y#0 = 2 [phi:display_frame_draw::@14->display_frame#0] -- vbuz1=vbuc1 + // [833] call display_frame + // [1896] phi from display_frame_draw::@14 to display_frame [phi:display_frame_draw::@14->display_frame] + // [1896] phi display_frame::y#0 = 2 [phi:display_frame_draw::@14->display_frame#0] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@14->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@14->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = $37 [phi:display_frame_draw::@14->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = $37 [phi:display_frame_draw::@14->display_frame#2] -- vbuz1=vbuc1 lda #$37 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $3d [phi:display_frame_draw::@14->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $3d [phi:display_frame_draw::@14->display_frame#3] -- vbuz1=vbuc1 lda #$3d sta.z display_frame.x1 jsr display_frame - // [789] phi from display_frame_draw::@14 to display_frame_draw::@15 [phi:display_frame_draw::@14->display_frame_draw::@15] + // [834] phi from display_frame_draw::@14 to display_frame_draw::@15 [phi:display_frame_draw::@14->display_frame_draw::@15] // display_frame_draw::@15 // display_frame(61, 2, 67, 14) - // [790] call display_frame - // [1839] phi from display_frame_draw::@15 to display_frame [phi:display_frame_draw::@15->display_frame] - // [1839] phi display_frame::y#0 = 2 [phi:display_frame_draw::@15->display_frame#0] -- vbuz1=vbuc1 + // [835] call display_frame + // [1896] phi from display_frame_draw::@15 to display_frame [phi:display_frame_draw::@15->display_frame] + // [1896] phi display_frame::y#0 = 2 [phi:display_frame_draw::@15->display_frame#0] -- vbuz1=vbuc1 lda #2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $e [phi:display_frame_draw::@15->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $e [phi:display_frame_draw::@15->display_frame#1] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = $3d [phi:display_frame_draw::@15->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = $3d [phi:display_frame_draw::@15->display_frame#2] -- vbuz1=vbuc1 lda #$3d sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@15->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@15->display_frame#3] -- vbuz1=vbuc1 lda #$43 sta.z display_frame.x1 jsr display_frame - // [791] phi from display_frame_draw::@15 to display_frame_draw::@16 [phi:display_frame_draw::@15->display_frame_draw::@16] + // [836] phi from display_frame_draw::@15 to display_frame_draw::@16 [phi:display_frame_draw::@15->display_frame_draw::@16] // display_frame_draw::@16 // display_frame(0, 14, 67, PROGRESS_Y-5) - // [792] call display_frame + // [837] call display_frame // Progress area - // [1839] phi from display_frame_draw::@16 to display_frame [phi:display_frame_draw::@16->display_frame] - // [1839] phi display_frame::y#0 = $e [phi:display_frame_draw::@16->display_frame#0] -- vbuz1=vbuc1 + // [1896] phi from display_frame_draw::@16 to display_frame [phi:display_frame_draw::@16->display_frame] + // [1896] phi display_frame::y#0 = $e [phi:display_frame_draw::@16->display_frame#0] -- vbuz1=vbuc1 lda #$e sta.z display_frame.y - // [1839] phi display_frame::y1#16 = PROGRESS_Y-5 [phi:display_frame_draw::@16->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = PROGRESS_Y-5 [phi:display_frame_draw::@16->display_frame#1] -- vbuz1=vbuc1 lda #PROGRESS_Y-5 sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = 0 [phi:display_frame_draw::@16->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = 0 [phi:display_frame_draw::@16->display_frame#2] -- vbuz1=vbuc1 lda #0 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@16->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@16->display_frame#3] -- vbuz1=vbuc1 lda #$43 sta.z display_frame.x1 jsr display_frame - // [793] phi from display_frame_draw::@16 to display_frame_draw::@17 [phi:display_frame_draw::@16->display_frame_draw::@17] + // [838] phi from display_frame_draw::@16 to display_frame_draw::@17 [phi:display_frame_draw::@16->display_frame_draw::@17] // display_frame_draw::@17 // display_frame(0, PROGRESS_Y-5, 67, PROGRESS_Y-2) - // [794] call display_frame - // [1839] phi from display_frame_draw::@17 to display_frame [phi:display_frame_draw::@17->display_frame] - // [1839] phi display_frame::y#0 = PROGRESS_Y-5 [phi:display_frame_draw::@17->display_frame#0] -- vbuz1=vbuc1 + // [839] call display_frame + // [1896] phi from display_frame_draw::@17 to display_frame [phi:display_frame_draw::@17->display_frame] + // [1896] phi display_frame::y#0 = PROGRESS_Y-5 [phi:display_frame_draw::@17->display_frame#0] -- vbuz1=vbuc1 lda #PROGRESS_Y-5 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = PROGRESS_Y-2 [phi:display_frame_draw::@17->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = PROGRESS_Y-2 [phi:display_frame_draw::@17->display_frame#1] -- vbuz1=vbuc1 lda #PROGRESS_Y-2 sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = 0 [phi:display_frame_draw::@17->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = 0 [phi:display_frame_draw::@17->display_frame#2] -- vbuz1=vbuc1 lda #0 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@17->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@17->display_frame#3] -- vbuz1=vbuc1 lda #$43 sta.z display_frame.x1 jsr display_frame - // [795] phi from display_frame_draw::@17 to display_frame_draw::@18 [phi:display_frame_draw::@17->display_frame_draw::@18] + // [840] phi from display_frame_draw::@17 to display_frame_draw::@18 [phi:display_frame_draw::@17->display_frame_draw::@18] // display_frame_draw::@18 // display_frame(0, PROGRESS_Y-2, 67, 49) - // [796] call display_frame - // [1839] phi from display_frame_draw::@18 to display_frame [phi:display_frame_draw::@18->display_frame] - // [1839] phi display_frame::y#0 = PROGRESS_Y-2 [phi:display_frame_draw::@18->display_frame#0] -- vbuz1=vbuc1 + // [841] call display_frame + // [1896] phi from display_frame_draw::@18 to display_frame [phi:display_frame_draw::@18->display_frame] + // [1896] phi display_frame::y#0 = PROGRESS_Y-2 [phi:display_frame_draw::@18->display_frame#0] -- vbuz1=vbuc1 lda #PROGRESS_Y-2 sta.z display_frame.y - // [1839] phi display_frame::y1#16 = $31 [phi:display_frame_draw::@18->display_frame#1] -- vbuz1=vbuc1 + // [1896] phi display_frame::y1#16 = $31 [phi:display_frame_draw::@18->display_frame#1] -- vbuz1=vbuc1 lda #$31 sta.z display_frame.y1 - // [1839] phi display_frame::x#0 = 0 [phi:display_frame_draw::@18->display_frame#2] -- vbuz1=vbuc1 + // [1896] phi display_frame::x#0 = 0 [phi:display_frame_draw::@18->display_frame#2] -- vbuz1=vbuc1 lda #0 sta.z display_frame.x - // [1839] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@18->display_frame#3] -- vbuz1=vbuc1 + // [1896] phi display_frame::x1#16 = $43 [phi:display_frame_draw::@18->display_frame#3] -- vbuz1=vbuc1 lda #$43 sta.z display_frame.x1 jsr display_frame - // [797] phi from display_frame_draw::@18 to display_frame_draw::@19 [phi:display_frame_draw::@18->display_frame_draw::@19] + // [842] phi from display_frame_draw::@18 to display_frame_draw::@19 [phi:display_frame_draw::@18->display_frame_draw::@19] // display_frame_draw::@19 // textcolor(WHITE) - // [798] call textcolor - // [700] phi from display_frame_draw::@19 to textcolor [phi:display_frame_draw::@19->textcolor] - // [700] phi textcolor::color#18 = WHITE [phi:display_frame_draw::@19->textcolor#0] -- vbuxx=vbuc1 - ldx #WHITE + // [843] call textcolor + // [745] phi from display_frame_draw::@19 to textcolor [phi:display_frame_draw::@19->textcolor] + // [745] phi textcolor::color#18 = WHITE [phi:display_frame_draw::@19->textcolor#0] -- vbuz1=vbuc1 + lda #WHITE + sta.z textcolor.color jsr textcolor // display_frame_draw::@return // } - // [799] return + // [844] return rts } // display_frame_title @@ -4993,67 +5502,75 @@ display_frame_draw: { // void display_frame_title(char *title_text) display_frame_title: { // gotoxy(2, 1) - // [801] call gotoxy - // [718] phi from display_frame_title to gotoxy [phi:display_frame_title->gotoxy] - // [718] phi gotoxy::y#30 = 1 [phi:display_frame_title->gotoxy#0] -- vbuyy=vbuc1 - ldy #1 - // [718] phi gotoxy::x#30 = 2 [phi:display_frame_title->gotoxy#1] -- vbuxx=vbuc1 - ldx #2 + // [846] call gotoxy + // [763] phi from display_frame_title to gotoxy [phi:display_frame_title->gotoxy] + // [763] phi gotoxy::y#30 = 1 [phi:display_frame_title->gotoxy#0] -- vbuz1=vbuc1 + lda #1 + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = 2 [phi:display_frame_title->gotoxy#1] -- vbuz1=vbuc1 + lda #2 + sta.z gotoxy.x jsr gotoxy - // [802] phi from display_frame_title to display_frame_title::@1 [phi:display_frame_title->display_frame_title::@1] + // [847] phi from display_frame_title to display_frame_title::@1 [phi:display_frame_title->display_frame_title::@1] // display_frame_title::@1 // printf("%-65s", title_text) - // [803] call printf_string - // [1130] phi from display_frame_title::@1 to printf_string [phi:display_frame_title::@1->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_frame_title::@1->printf_string#0] -- pprz1=pprc1 + // [848] call printf_string + // [1180] phi from display_frame_title::@1 to printf_string [phi:display_frame_title::@1->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_frame_title::@1->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = main::title_text [phi:display_frame_title::@1->printf_string#1] -- pbuz1=pbuc1 + // [1180] phi printf_string::str#22 = main::title_text [phi:display_frame_title::@1->printf_string#1] -- pbuz1=pbuc1 lda #main.title_text sta.z printf_string.str+1 - // [1130] phi printf_string::format_justify_left#22 = 1 [phi:display_frame_title::@1->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_justify_left#22 = 1 [phi:display_frame_title::@1->printf_string#2] -- vbuz1=vbuc1 lda #1 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = $41 [phi:display_frame_title::@1->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = $41 [phi:display_frame_title::@1->printf_string#3] -- vbuz1=vbuc1 lda #$41 sta.z printf_string.format_min_length jsr printf_string // display_frame_title::@return // } - // [804] return + // [849] return rts } // cputsxy // Move cursor and output a NUL-terminated string // Same as "gotoxy (x, y); puts (s);" -// void cputsxy(__register(X) char x, __register(Y) char y, __zp($29) const char *s) +// void cputsxy(__zp($e2) char x, __zp($ed) char y, __zp($2d) const char *s) cputsxy: { - .label s = $29 + .label y = $ed + .label s = $2d + .label x = $e2 // gotoxy(x, y) - // [806] gotoxy::x#1 = cputsxy::x#4 - // [807] gotoxy::y#1 = cputsxy::y#4 - // [808] call gotoxy - // [718] phi from cputsxy to gotoxy [phi:cputsxy->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#1 [phi:cputsxy->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#1 [phi:cputsxy->gotoxy#1] -- register_copy + // [851] gotoxy::x#1 = cputsxy::x#4 -- vbuz1=vbuz2 + lda.z x + sta.z gotoxy.x + // [852] gotoxy::y#1 = cputsxy::y#4 -- vbuz1=vbuz2 + lda.z y + sta.z gotoxy.y + // [853] call gotoxy + // [763] phi from cputsxy to gotoxy [phi:cputsxy->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#1 [phi:cputsxy->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#1 [phi:cputsxy->gotoxy#1] -- register_copy jsr gotoxy // cputsxy::@1 // cputs(s) - // [809] cputs::s#1 = cputsxy::s#4 -- pbuz1=pbuz2 + // [854] cputs::s#1 = cputsxy::s#4 -- pbuz1=pbuz2 lda.z s sta.z cputs.s lda.z s+1 sta.z cputs.s+1 - // [810] call cputs - // [1973] phi from cputsxy::@1 to cputs [phi:cputsxy::@1->cputs] + // [855] call cputs + // [2030] phi from cputsxy::@1 to cputs [phi:cputsxy::@1->cputs] jsr cputs // cputsxy::@return // } - // [811] return + // [856] return rts } // display_action_progress @@ -5062,65 +5579,67 @@ cputsxy: { * * @param info_text The progress text to be displayed. */ -// void display_action_progress(__zp($69) char *info_text) +// void display_action_progress(__zp($64) char *info_text) display_action_progress: { - .label x = $38 - .label y = $2e - .label info_text = $69 + .label x = $eb + .label y = $c5 + .label info_text = $64 // unsigned char x = wherex() - // [813] call wherex + // [858] call wherex jsr wherex - // [814] wherex::return#2 = wherex::return#0 + // [859] wherex::return#2 = wherex::return#0 // display_action_progress::@1 - // [815] display_action_progress::x#0 = wherex::return#2 -- vbuz1=vbuaa - sta.z x + // [860] display_action_progress::x#0 = wherex::return#2 // unsigned char y = wherey() - // [816] call wherey + // [861] call wherey jsr wherey - // [817] wherey::return#2 = wherey::return#0 + // [862] wherey::return#2 = wherey::return#0 // display_action_progress::@2 - // [818] display_action_progress::y#0 = wherey::return#2 -- vbuz1=vbuaa - sta.z y + // [863] display_action_progress::y#0 = wherey::return#2 // gotoxy(2, PROGRESS_Y-4) - // [819] call gotoxy - // [718] phi from display_action_progress::@2 to gotoxy [phi:display_action_progress::@2->gotoxy] - // [718] phi gotoxy::y#30 = PROGRESS_Y-4 [phi:display_action_progress::@2->gotoxy#0] -- vbuyy=vbuc1 - ldy #PROGRESS_Y-4 - // [718] phi gotoxy::x#30 = 2 [phi:display_action_progress::@2->gotoxy#1] -- vbuxx=vbuc1 - ldx #2 + // [864] call gotoxy + // [763] phi from display_action_progress::@2 to gotoxy [phi:display_action_progress::@2->gotoxy] + // [763] phi gotoxy::y#30 = PROGRESS_Y-4 [phi:display_action_progress::@2->gotoxy#0] -- vbuz1=vbuc1 + lda #PROGRESS_Y-4 + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = 2 [phi:display_action_progress::@2->gotoxy#1] -- vbuz1=vbuc1 + lda #2 + sta.z gotoxy.x jsr gotoxy // display_action_progress::@3 // printf("%-65s", info_text) - // [820] printf_string::str#1 = display_action_progress::info_text#15 - // [821] call printf_string - // [1130] phi from display_action_progress::@3 to printf_string [phi:display_action_progress::@3->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_action_progress::@3->printf_string#0] -- pprz1=pprc1 + // [865] printf_string::str#1 = display_action_progress::info_text#18 + // [866] call printf_string + // [1180] phi from display_action_progress::@3 to printf_string [phi:display_action_progress::@3->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_action_progress::@3->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#1 [phi:display_action_progress::@3->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 1 [phi:display_action_progress::@3->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#1 [phi:display_action_progress::@3->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 1 [phi:display_action_progress::@3->printf_string#2] -- vbuz1=vbuc1 lda #1 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = $41 [phi:display_action_progress::@3->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = $41 [phi:display_action_progress::@3->printf_string#3] -- vbuz1=vbuc1 lda #$41 sta.z printf_string.format_min_length jsr printf_string // display_action_progress::@4 // gotoxy(x, y) - // [822] gotoxy::x#10 = display_action_progress::x#0 -- vbuxx=vbuz1 - ldx.z x - // [823] gotoxy::y#10 = display_action_progress::y#0 -- vbuyy=vbuz1 - ldy.z y - // [824] call gotoxy - // [718] phi from display_action_progress::@4 to gotoxy [phi:display_action_progress::@4->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#10 [phi:display_action_progress::@4->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#10 [phi:display_action_progress::@4->gotoxy#1] -- register_copy + // [867] gotoxy::x#10 = display_action_progress::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z gotoxy.x + // [868] gotoxy::y#10 = display_action_progress::y#0 -- vbuz1=vbuz2 + lda.z y + sta.z gotoxy.y + // [869] call gotoxy + // [763] phi from display_action_progress::@4 to gotoxy [phi:display_action_progress::@4->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#10 [phi:display_action_progress::@4->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#10 [phi:display_action_progress::@4->gotoxy#1] -- register_copy jsr gotoxy // display_action_progress::@return // } - // [825] return + // [870] return rts } // display_progress_clear @@ -5129,116 +5648,120 @@ display_action_progress: { */ display_progress_clear: { .const h = PROGRESS_Y+PROGRESS_H - .label x = $cd - .label i = $e8 - .label y = $f7 + .label x = $72 + .label i = $ed + .label y = $e2 // textcolor(WHITE) - // [827] call textcolor - // [700] phi from display_progress_clear to textcolor [phi:display_progress_clear->textcolor] - // [700] phi textcolor::color#18 = WHITE [phi:display_progress_clear->textcolor#0] -- vbuxx=vbuc1 - ldx #WHITE + // [872] call textcolor + // [745] phi from display_progress_clear to textcolor [phi:display_progress_clear->textcolor] + // [745] phi textcolor::color#18 = WHITE [phi:display_progress_clear->textcolor#0] -- vbuz1=vbuc1 + lda #WHITE + sta.z textcolor.color jsr textcolor - // [828] phi from display_progress_clear to display_progress_clear::@5 [phi:display_progress_clear->display_progress_clear::@5] + // [873] phi from display_progress_clear to display_progress_clear::@5 [phi:display_progress_clear->display_progress_clear::@5] // display_progress_clear::@5 // bgcolor(BLUE) - // [829] call bgcolor - // [705] phi from display_progress_clear::@5 to bgcolor [phi:display_progress_clear::@5->bgcolor] - // [705] phi bgcolor::color#14 = BLUE [phi:display_progress_clear::@5->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [874] call bgcolor + // [750] phi from display_progress_clear::@5 to bgcolor [phi:display_progress_clear::@5->bgcolor] + // [750] phi bgcolor::color#14 = BLUE [phi:display_progress_clear::@5->bgcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z bgcolor.color jsr bgcolor - // [830] phi from display_progress_clear::@5 to display_progress_clear::@1 [phi:display_progress_clear::@5->display_progress_clear::@1] - // [830] phi display_progress_clear::y#2 = PROGRESS_Y [phi:display_progress_clear::@5->display_progress_clear::@1#0] -- vbuz1=vbuc1 + // [875] phi from display_progress_clear::@5 to display_progress_clear::@1 [phi:display_progress_clear::@5->display_progress_clear::@1] + // [875] phi display_progress_clear::y#2 = PROGRESS_Y [phi:display_progress_clear::@5->display_progress_clear::@1#0] -- vbuz1=vbuc1 lda #PROGRESS_Y sta.z y // display_progress_clear::@1 __b1: // while (y < h) - // [831] if(display_progress_clear::y#2display_progress_clear::@2] + // [878] phi from display_progress_clear::@1 to display_progress_clear::@2 [phi:display_progress_clear::@1->display_progress_clear::@2] __b4: - // [833] phi display_progress_clear::x#2 = PROGRESS_X [phi:display_progress_clear::@1->display_progress_clear::@2#0] -- vbuz1=vbuc1 + // [878] phi display_progress_clear::x#2 = PROGRESS_X [phi:display_progress_clear::@1->display_progress_clear::@2#0] -- vbuz1=vbuc1 lda #PROGRESS_X sta.z x - // [833] phi display_progress_clear::i#2 = 0 [phi:display_progress_clear::@1->display_progress_clear::@2#1] -- vbuz1=vbuc1 + // [878] phi display_progress_clear::i#2 = 0 [phi:display_progress_clear::@1->display_progress_clear::@2#1] -- vbuz1=vbuc1 lda #0 sta.z i // display_progress_clear::@2 __b2: // for(unsigned char i = 0; i < w; i++) - // [834] if(display_progress_clear::i#2display_progress_clear::@1] - // [830] phi display_progress_clear::y#2 = display_progress_clear::y#1 [phi:display_progress_clear::@4->display_progress_clear::@1#0] -- register_copy + // [875] phi from display_progress_clear::@4 to display_progress_clear::@1 [phi:display_progress_clear::@4->display_progress_clear::@1] + // [875] phi display_progress_clear::y#2 = display_progress_clear::y#1 [phi:display_progress_clear::@4->display_progress_clear::@1#0] -- register_copy jmp __b1 // display_progress_clear::@3 __b3: // cputcxy(x, y, ' ') - // [836] cputcxy::x#12 = display_progress_clear::x#2 -- vbuxx=vbuz1 - ldx.z x - // [837] cputcxy::y#12 = display_progress_clear::y#2 -- vbuyy=vbuz1 - ldy.z y - // [838] call cputcxy - // [1986] phi from display_progress_clear::@3 to cputcxy [phi:display_progress_clear::@3->cputcxy] - // [1986] phi cputcxy::c#15 = ' ' [phi:display_progress_clear::@3->cputcxy#0] -- vbuz1=vbuc1 + // [881] cputcxy::x#12 = display_progress_clear::x#2 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [882] cputcxy::y#12 = display_progress_clear::y#2 -- vbuz1=vbuz2 + lda.z y + sta.z cputcxy.y + // [883] call cputcxy + // [2043] phi from display_progress_clear::@3 to cputcxy [phi:display_progress_clear::@3->cputcxy] + // [2043] phi cputcxy::c#15 = ' ' [phi:display_progress_clear::@3->cputcxy#0] -- vbuz1=vbuc1 lda #' ' sta.z cputcxy.c - // [1986] phi cputcxy::y#15 = cputcxy::y#12 [phi:display_progress_clear::@3->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#12 [phi:display_progress_clear::@3->cputcxy#2] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#12 [phi:display_progress_clear::@3->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#12 [phi:display_progress_clear::@3->cputcxy#2] -- register_copy jsr cputcxy // display_progress_clear::@6 // x++; - // [839] display_progress_clear::x#1 = ++ display_progress_clear::x#2 -- vbuz1=_inc_vbuz1 + // [884] display_progress_clear::x#1 = ++ display_progress_clear::x#2 -- vbuz1=_inc_vbuz1 inc.z x // for(unsigned char i = 0; i < w; i++) - // [840] display_progress_clear::i#1 = ++ display_progress_clear::i#2 -- vbuz1=_inc_vbuz1 + // [885] display_progress_clear::i#1 = ++ display_progress_clear::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [833] phi from display_progress_clear::@6 to display_progress_clear::@2 [phi:display_progress_clear::@6->display_progress_clear::@2] - // [833] phi display_progress_clear::x#2 = display_progress_clear::x#1 [phi:display_progress_clear::@6->display_progress_clear::@2#0] -- register_copy - // [833] phi display_progress_clear::i#2 = display_progress_clear::i#1 [phi:display_progress_clear::@6->display_progress_clear::@2#1] -- register_copy + // [878] phi from display_progress_clear::@6 to display_progress_clear::@2 [phi:display_progress_clear::@6->display_progress_clear::@2] + // [878] phi display_progress_clear::x#2 = display_progress_clear::x#1 [phi:display_progress_clear::@6->display_progress_clear::@2#0] -- register_copy + // [878] phi display_progress_clear::i#2 = display_progress_clear::i#1 [phi:display_progress_clear::@6->display_progress_clear::@2#1] -- register_copy jmp __b2 } // display_chip_smc display_chip_smc: { // display_smc_led(GREY) - // [842] call display_smc_led - // [1994] phi from display_chip_smc to display_smc_led [phi:display_chip_smc->display_smc_led] - // [1994] phi display_smc_led::c#2 = GREY [phi:display_chip_smc->display_smc_led#0] -- vbuz1=vbuc1 + // [887] call display_smc_led + // [2051] phi from display_chip_smc to display_smc_led [phi:display_chip_smc->display_smc_led] + // [2051] phi display_smc_led::c#2 = GREY [phi:display_chip_smc->display_smc_led#0] -- vbuz1=vbuc1 lda #GREY sta.z display_smc_led.c jsr display_smc_led - // [843] phi from display_chip_smc to display_chip_smc::@1 [phi:display_chip_smc->display_chip_smc::@1] + // [888] phi from display_chip_smc to display_chip_smc::@1 [phi:display_chip_smc->display_chip_smc::@1] // display_chip_smc::@1 // display_print_chip(CHIP_SMC_X, CHIP_SMC_Y+2, CHIP_SMC_W, "SMC ") - // [844] call display_print_chip - // [2000] phi from display_chip_smc::@1 to display_print_chip [phi:display_chip_smc::@1->display_print_chip] - // [2000] phi display_print_chip::text#11 = display_chip_smc::text [phi:display_chip_smc::@1->display_print_chip#0] -- pbuz1=pbuc1 + // [889] call display_print_chip + // [2057] phi from display_chip_smc::@1 to display_print_chip [phi:display_chip_smc::@1->display_print_chip] + // [2057] phi display_print_chip::text#11 = display_chip_smc::text [phi:display_chip_smc::@1->display_print_chip#0] -- pbum1=pbuc1 lda #text - sta.z display_print_chip.text_2+1 - // [2000] phi display_print_chip::w#10 = 5 [phi:display_chip_smc::@1->display_print_chip#1] -- vbuz1=vbuc1 + sta display_print_chip.text_2+1 + // [2057] phi display_print_chip::w#10 = 5 [phi:display_chip_smc::@1->display_print_chip#1] -- vbuz1=vbuc1 lda #5 sta.z display_print_chip.w - // [2000] phi display_print_chip::x#10 = 1 [phi:display_chip_smc::@1->display_print_chip#2] -- vbuz1=vbuc1 + // [2057] phi display_print_chip::x#10 = 1 [phi:display_chip_smc::@1->display_print_chip#2] -- vbuz1=vbuc1 lda #1 sta.z display_print_chip.x jsr display_print_chip // display_chip_smc::@return // } - // [845] return + // [890] return rts .segment Data text: .text "SMC " @@ -5248,32 +5771,32 @@ display_chip_smc: { // display_chip_vera display_chip_vera: { // display_vera_led(GREY) - // [847] call display_vera_led - // [2044] phi from display_chip_vera to display_vera_led [phi:display_chip_vera->display_vera_led] - // [2044] phi display_vera_led::c#2 = GREY [phi:display_chip_vera->display_vera_led#0] -- vbum1=vbuc1 + // [892] call display_vera_led + // [2101] phi from display_chip_vera to display_vera_led [phi:display_chip_vera->display_vera_led] + // [2101] phi display_vera_led::c#2 = GREY [phi:display_chip_vera->display_vera_led#0] -- vbuz1=vbuc1 lda #GREY - sta display_vera_led.c + sta.z display_vera_led.c jsr display_vera_led - // [848] phi from display_chip_vera to display_chip_vera::@1 [phi:display_chip_vera->display_chip_vera::@1] + // [893] phi from display_chip_vera to display_chip_vera::@1 [phi:display_chip_vera->display_chip_vera::@1] // display_chip_vera::@1 // display_print_chip(CHIP_VERA_X, CHIP_VERA_Y+2, CHIP_VERA_W, "VERA ") - // [849] call display_print_chip - // [2000] phi from display_chip_vera::@1 to display_print_chip [phi:display_chip_vera::@1->display_print_chip] - // [2000] phi display_print_chip::text#11 = display_chip_vera::text [phi:display_chip_vera::@1->display_print_chip#0] -- pbuz1=pbuc1 + // [894] call display_print_chip + // [2057] phi from display_chip_vera::@1 to display_print_chip [phi:display_chip_vera::@1->display_print_chip] + // [2057] phi display_print_chip::text#11 = display_chip_vera::text [phi:display_chip_vera::@1->display_print_chip#0] -- pbum1=pbuc1 lda #text - sta.z display_print_chip.text_2+1 - // [2000] phi display_print_chip::w#10 = 8 [phi:display_chip_vera::@1->display_print_chip#1] -- vbuz1=vbuc1 + sta display_print_chip.text_2+1 + // [2057] phi display_print_chip::w#10 = 8 [phi:display_chip_vera::@1->display_print_chip#1] -- vbuz1=vbuc1 lda #8 sta.z display_print_chip.w - // [2000] phi display_print_chip::x#10 = 9 [phi:display_chip_vera::@1->display_print_chip#2] -- vbuz1=vbuc1 + // [2057] phi display_print_chip::x#10 = 9 [phi:display_chip_vera::@1->display_print_chip#2] -- vbuz1=vbuc1 lda #9 sta.z display_print_chip.x jsr display_print_chip // display_chip_vera::@return // } - // [850] return + // [895] return rts .segment Data text: .text "VERA " @@ -5286,34 +5809,38 @@ display_chip_vera: { * */ display_chip_rom: { - .label r = $cf - // [852] phi from display_chip_rom to display_chip_rom::@1 [phi:display_chip_rom->display_chip_rom::@1] - // [852] phi display_chip_rom::r#2 = 0 [phi:display_chip_rom->display_chip_rom::@1#0] -- vbuz1=vbuc1 + .label display_chip_rom__4 = $eb + .label display_chip_rom__6 = $be + .label r = $35 + .label display_chip_rom__11 = $c4 + .label display_chip_rom__12 = $c4 + // [897] phi from display_chip_rom to display_chip_rom::@1 [phi:display_chip_rom->display_chip_rom::@1] + // [897] phi display_chip_rom::r#2 = 0 [phi:display_chip_rom->display_chip_rom::@1#0] -- vbuz1=vbuc1 lda #0 sta.z r // display_chip_rom::@1 __b1: // for (unsigned char r = 0; r < 8; r++) - // [853] if(display_chip_rom::r#2<8) goto display_chip_rom::@2 -- vbuz1_lt_vbuc1_then_la1 + // [898] if(display_chip_rom::r#2<8) goto display_chip_rom::@2 -- vbuz1_lt_vbuc1_then_la1 lda.z r cmp #8 bcc __b2 // display_chip_rom::@return // } - // [854] return + // [899] return rts - // [855] phi from display_chip_rom::@1 to display_chip_rom::@2 [phi:display_chip_rom::@1->display_chip_rom::@2] + // [900] phi from display_chip_rom::@1 to display_chip_rom::@2 [phi:display_chip_rom::@1->display_chip_rom::@2] // display_chip_rom::@2 __b2: // strcpy(rom, "ROM ") - // [856] call strcpy - // [950] phi from display_chip_rom::@2 to strcpy [phi:display_chip_rom::@2->strcpy] - // [950] phi strcpy::dst#0 = display_chip_rom::rom [phi:display_chip_rom::@2->strcpy#0] -- pbuz1=pbuc1 + // [901] call strcpy + // [982] phi from display_chip_rom::@2 to strcpy [phi:display_chip_rom::@2->strcpy] + // [982] phi strcpy::dst#0 = display_chip_rom::rom [phi:display_chip_rom::@2->strcpy#0] -- pbuz1=pbuc1 lda #rom sta.z strcpy.dst+1 - // [950] phi strcpy::src#0 = display_chip_rom::source [phi:display_chip_rom::@2->strcpy#1] -- pbuz1=pbuc1 + // [982] phi strcpy::src#0 = display_chip_rom::source [phi:display_chip_rom::@2->strcpy#1] -- pbuz1=pbuc1 lda #source @@ -5321,83 +5848,86 @@ display_chip_rom: { jsr strcpy // display_chip_rom::@5 // strcat(rom, rom_size_strings[r]) - // [857] display_chip_rom::$11 = display_chip_rom::r#2 << 1 -- vbum1=vbuz2_rol_1 + // [902] display_chip_rom::$11 = display_chip_rom::r#2 << 1 -- vbuz1=vbuz2_rol_1 lda.z r asl - sta display_chip_rom__11 - // [858] strcat::source#0 = rom_size_strings[display_chip_rom::$11] -- pbuz1=qbuc1_derefidx_vbum2 + sta.z display_chip_rom__11 + // [903] strcat::source#0 = rom_size_strings[display_chip_rom::$11] -- pbum1=qbuc1_derefidx_vbuz2 tay lda rom_size_strings,y - sta.z strcat.source + sta strcat.source lda rom_size_strings+1,y - sta.z strcat.source+1 - // [859] call strcat - // [2050] phi from display_chip_rom::@5 to strcat [phi:display_chip_rom::@5->strcat] + sta strcat.source+1 + // [904] call strcat + // [2107] phi from display_chip_rom::@5 to strcat [phi:display_chip_rom::@5->strcat] jsr strcat // display_chip_rom::@6 // if(r) - // [860] if(0==display_chip_rom::r#2) goto display_chip_rom::@3 -- 0_eq_vbuz1_then_la1 + // [905] if(0==display_chip_rom::r#2) goto display_chip_rom::@3 -- 0_eq_vbuz1_then_la1 lda.z r beq __b3 // display_chip_rom::@4 // r+'0' - // [861] display_chip_rom::$4 = display_chip_rom::r#2 + '0' -- vbuaa=vbuz1_plus_vbuc1 + // [906] display_chip_rom::$4 = display_chip_rom::r#2 + '0' -- vbuz1=vbuz2_plus_vbuc1 lda #'0' clc adc.z r + sta.z display_chip_rom__4 // *(rom+3) = r+'0' - // [862] *(display_chip_rom::rom+3) = display_chip_rom::$4 -- _deref_pbuc1=vbuaa + // [907] *(display_chip_rom::rom+3) = display_chip_rom::$4 -- _deref_pbuc1=vbuz1 sta rom+3 // display_chip_rom::@3 __b3: // display_rom_led(r, GREY) - // [863] display_rom_led::chip#0 = display_chip_rom::r#2 -- vbuz1=vbuz2 + // [908] display_rom_led::chip#0 = display_chip_rom::r#2 -- vbuz1=vbuz2 lda.z r sta.z display_rom_led.chip - // [864] call display_rom_led - // [2062] phi from display_chip_rom::@3 to display_rom_led [phi:display_chip_rom::@3->display_rom_led] - // [2062] phi display_rom_led::c#2 = GREY [phi:display_chip_rom::@3->display_rom_led#0] -- vbuz1=vbuc1 + // [909] call display_rom_led + // [2119] phi from display_chip_rom::@3 to display_rom_led [phi:display_chip_rom::@3->display_rom_led] + // [2119] phi display_rom_led::c#2 = GREY [phi:display_chip_rom::@3->display_rom_led#0] -- vbuz1=vbuc1 lda #GREY sta.z display_rom_led.c - // [2062] phi display_rom_led::chip#2 = display_rom_led::chip#0 [phi:display_chip_rom::@3->display_rom_led#1] -- register_copy + // [2119] phi display_rom_led::chip#2 = display_rom_led::chip#0 [phi:display_chip_rom::@3->display_rom_led#1] -- register_copy jsr display_rom_led // display_chip_rom::@7 // r*6 - // [865] display_chip_rom::$12 = display_chip_rom::$11 + display_chip_rom::r#2 -- vbuaa=vbum1_plus_vbuz2 - lda display_chip_rom__11 + // [910] display_chip_rom::$12 = display_chip_rom::$11 + display_chip_rom::r#2 -- vbuz1=vbuz1_plus_vbuz2 + lda.z display_chip_rom__12 clc adc.z r - // [866] display_chip_rom::$6 = display_chip_rom::$12 << 1 -- vbuaa=vbuaa_rol_1 + sta.z display_chip_rom__12 + // [911] display_chip_rom::$6 = display_chip_rom::$12 << 1 -- vbuz1=vbuz2_rol_1 asl + sta.z display_chip_rom__6 // display_print_chip(CHIP_ROM_X+r*6, CHIP_ROM_Y+2, CHIP_ROM_W, rom) - // [867] display_print_chip::x#2 = $14 + display_chip_rom::$6 -- vbuz1=vbuc1_plus_vbuaa + // [912] display_print_chip::x#2 = $14 + display_chip_rom::$6 -- vbuz1=vbuc1_plus_vbuz1 + lda #$14 clc - adc #$14 + adc.z display_print_chip.x sta.z display_print_chip.x - // [868] call display_print_chip - // [2000] phi from display_chip_rom::@7 to display_print_chip [phi:display_chip_rom::@7->display_print_chip] - // [2000] phi display_print_chip::text#11 = display_chip_rom::rom [phi:display_chip_rom::@7->display_print_chip#0] -- pbuz1=pbuc1 + // [913] call display_print_chip + // [2057] phi from display_chip_rom::@7 to display_print_chip [phi:display_chip_rom::@7->display_print_chip] + // [2057] phi display_print_chip::text#11 = display_chip_rom::rom [phi:display_chip_rom::@7->display_print_chip#0] -- pbum1=pbuc1 lda #rom - sta.z display_print_chip.text_2+1 - // [2000] phi display_print_chip::w#10 = 3 [phi:display_chip_rom::@7->display_print_chip#1] -- vbuz1=vbuc1 + sta display_print_chip.text_2+1 + // [2057] phi display_print_chip::w#10 = 3 [phi:display_chip_rom::@7->display_print_chip#1] -- vbuz1=vbuc1 lda #3 sta.z display_print_chip.w - // [2000] phi display_print_chip::x#10 = display_print_chip::x#2 [phi:display_chip_rom::@7->display_print_chip#2] -- register_copy + // [2057] phi display_print_chip::x#10 = display_print_chip::x#2 [phi:display_chip_rom::@7->display_print_chip#2] -- register_copy jsr display_print_chip // display_chip_rom::@8 // for (unsigned char r = 0; r < 8; r++) - // [869] display_chip_rom::r#1 = ++ display_chip_rom::r#2 -- vbuz1=_inc_vbuz1 + // [914] display_chip_rom::r#1 = ++ display_chip_rom::r#2 -- vbuz1=_inc_vbuz1 inc.z r - // [852] phi from display_chip_rom::@8 to display_chip_rom::@1 [phi:display_chip_rom::@8->display_chip_rom::@1] - // [852] phi display_chip_rom::r#2 = display_chip_rom::r#1 [phi:display_chip_rom::@8->display_chip_rom::@1#0] -- register_copy + // [897] phi from display_chip_rom::@8 to display_chip_rom::@1 [phi:display_chip_rom::@8->display_chip_rom::@1] + // [897] phi display_chip_rom::r#2 = display_chip_rom::r#1 [phi:display_chip_rom::@8->display_chip_rom::@1#0] -- register_copy jmp __b1 .segment Data rom: .fill $10, 0 source: .text "ROM " .byte 0 - display_chip_rom__11: .byte 0 } .segment Code // display_info_smc @@ -5408,137 +5938,142 @@ display_chip_rom: { * * @remark The smc_booloader is a global variable. */ -// void display_info_smc(__zp($be) char info_status, __zp($4d) char *info_text) +// void display_info_smc(__zp($e8) char info_status, __zp($3d) char *info_text) display_info_smc: { - .label info_status = $be - .label info_text = $4d + .label display_info_smc__8 = $e8 + .label y = $6c + .label info_status = $e8 + .label info_text = $3d // unsigned char x = wherex() - // [871] call wherex + // [916] call wherex jsr wherex - // [872] wherex::return#10 = wherex::return#0 + // [917] wherex::return#10 = wherex::return#0 -- vbum1=vbuz2 + lda.z wherex.return + sta wherex.return_2 // display_info_smc::@3 - // [873] display_info_smc::x#0 = wherex::return#10 -- vbum1=vbuaa - sta x + // [918] display_info_smc::x#0 = wherex::return#10 // unsigned char y = wherey() - // [874] call wherey + // [919] call wherey jsr wherey - // [875] wherey::return#10 = wherey::return#0 + // [920] wherey::return#10 = wherey::return#0 -- vbuz1=vbuz2 + lda.z wherey.return + sta.z wherey.return_2 // display_info_smc::@4 - // [876] display_info_smc::y#0 = wherey::return#10 -- vbum1=vbuaa - sta y + // [921] display_info_smc::y#0 = wherey::return#10 // status_smc = info_status - // [877] status_smc#0 = display_info_smc::info_status#14 -- vbum1=vbuz2 + // [922] status_smc#0 = display_info_smc::info_status#17 -- vbum1=vbuz2 lda.z info_status sta status_smc // display_smc_led(status_color[info_status]) - // [878] display_smc_led::c#1 = status_color[display_info_smc::info_status#14] -- vbuz1=pbuc1_derefidx_vbuz2 + // [923] display_smc_led::c#1 = status_color[display_info_smc::info_status#17] -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z info_status lda status_color,y sta.z display_smc_led.c - // [879] call display_smc_led - // [1994] phi from display_info_smc::@4 to display_smc_led [phi:display_info_smc::@4->display_smc_led] - // [1994] phi display_smc_led::c#2 = display_smc_led::c#1 [phi:display_info_smc::@4->display_smc_led#0] -- register_copy + // [924] call display_smc_led + // [2051] phi from display_info_smc::@4 to display_smc_led [phi:display_info_smc::@4->display_smc_led] + // [2051] phi display_smc_led::c#2 = display_smc_led::c#1 [phi:display_info_smc::@4->display_smc_led#0] -- register_copy jsr display_smc_led - // [880] phi from display_info_smc::@4 to display_info_smc::@5 [phi:display_info_smc::@4->display_info_smc::@5] + // [925] phi from display_info_smc::@4 to display_info_smc::@5 [phi:display_info_smc::@4->display_info_smc::@5] // display_info_smc::@5 // gotoxy(INFO_X, INFO_Y) - // [881] call gotoxy - // [718] phi from display_info_smc::@5 to gotoxy [phi:display_info_smc::@5->gotoxy] - // [718] phi gotoxy::y#30 = $11 [phi:display_info_smc::@5->gotoxy#0] -- vbuyy=vbuc1 - ldy #$11 - // [718] phi gotoxy::x#30 = 4 [phi:display_info_smc::@5->gotoxy#1] -- vbuxx=vbuc1 - ldx #4 + // [926] call gotoxy + // [763] phi from display_info_smc::@5 to gotoxy [phi:display_info_smc::@5->gotoxy] + // [763] phi gotoxy::y#30 = $11 [phi:display_info_smc::@5->gotoxy#0] -- vbuz1=vbuc1 + lda #$11 + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = 4 [phi:display_info_smc::@5->gotoxy#1] -- vbuz1=vbuc1 + lda #4 + sta.z gotoxy.x jsr gotoxy - // [882] phi from display_info_smc::@5 to display_info_smc::@6 [phi:display_info_smc::@5->display_info_smc::@6] + // [927] phi from display_info_smc::@5 to display_info_smc::@6 [phi:display_info_smc::@5->display_info_smc::@6] // display_info_smc::@6 - // printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_string) - // [883] call printf_str - // [987] phi from display_info_smc::@6 to printf_str [phi:display_info_smc::@6->printf_str] - // [987] phi printf_str::putc#73 = &cputc [phi:display_info_smc::@6->printf_str#0] -- pprz1=pprc1 + // printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_text) + // [928] call printf_str + // [1019] phi from display_info_smc::@6 to printf_str [phi:display_info_smc::@6->printf_str] + // [1019] phi printf_str::putc#73 = &cputc [phi:display_info_smc::@6->printf_str#0] -- pprz1=pprc1 lda #cputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = display_info_smc::s [phi:display_info_smc::@6->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = display_info_smc::s [phi:display_info_smc::@6->printf_str#1] -- pbuz1=pbuc1 lda #s sta.z printf_str.s+1 jsr printf_str // display_info_smc::@7 - // printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_string) - // [884] display_info_smc::$8 = display_info_smc::info_status#14 << 1 -- vbuaa=vbuz1_rol_1 - lda.z info_status - asl - // [885] printf_string::str#3 = status_text[display_info_smc::$8] -- pbuz1=qbuc1_derefidx_vbuaa - tay + // printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_text) + // [929] display_info_smc::$8 = display_info_smc::info_status#17 << 1 -- vbuz1=vbuz1_rol_1 + asl.z display_info_smc__8 + // [930] printf_string::str#3 = status_text[display_info_smc::$8] -- pbuz1=qbuc1_derefidx_vbuz2 + ldy.z display_info_smc__8 lda status_text,y sta.z printf_string.str lda status_text+1,y sta.z printf_string.str+1 - // [886] call printf_string - // [1130] phi from display_info_smc::@7 to printf_string [phi:display_info_smc::@7->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_info_smc::@7->printf_string#0] -- pprz1=pprc1 + // [931] call printf_string + // [1180] phi from display_info_smc::@7 to printf_string [phi:display_info_smc::@7->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_info_smc::@7->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#3 [phi:display_info_smc::@7->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 1 [phi:display_info_smc::@7->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#3 [phi:display_info_smc::@7->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 1 [phi:display_info_smc::@7->printf_string#2] -- vbuz1=vbuc1 lda #1 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 9 [phi:display_info_smc::@7->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 9 [phi:display_info_smc::@7->printf_string#3] -- vbuz1=vbuc1 lda #9 sta.z printf_string.format_min_length jsr printf_string - // [887] phi from display_info_smc::@7 to display_info_smc::@8 [phi:display_info_smc::@7->display_info_smc::@8] + // [932] phi from display_info_smc::@7 to display_info_smc::@8 [phi:display_info_smc::@7->display_info_smc::@8] // display_info_smc::@8 - // printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_string) - // [888] call printf_str - // [987] phi from display_info_smc::@8 to printf_str [phi:display_info_smc::@8->printf_str] - // [987] phi printf_str::putc#73 = &cputc [phi:display_info_smc::@8->printf_str#0] -- pprz1=pprc1 + // printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_text) + // [933] call printf_str + // [1019] phi from display_info_smc::@8 to printf_str [phi:display_info_smc::@8->printf_str] + // [1019] phi printf_str::putc#73 = &cputc [phi:display_info_smc::@8->printf_str#0] -- pprz1=pprc1 lda #cputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = display_info_smc::s1 [phi:display_info_smc::@8->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = display_info_smc::s1 [phi:display_info_smc::@8->printf_str#1] -- pbuz1=pbuc1 lda #s1 sta.z printf_str.s+1 jsr printf_str - // [889] phi from display_info_smc::@8 to display_info_smc::@9 [phi:display_info_smc::@8->display_info_smc::@9] + // [934] phi from display_info_smc::@8 to display_info_smc::@9 [phi:display_info_smc::@8->display_info_smc::@9] // display_info_smc::@9 - // printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_string) - // [890] call printf_string - // [1130] phi from display_info_smc::@9 to printf_string [phi:display_info_smc::@9->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_info_smc::@9->printf_string#0] -- pprz1=pprc1 + // printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_text) + // [935] call printf_string + // [1180] phi from display_info_smc::@9 to printf_string [phi:display_info_smc::@9->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_info_smc::@9->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = smc_version_string [phi:display_info_smc::@9->printf_string#1] -- pbuz1=pbuc1 - lda #printf_string#1] -- pbuz1=pbuc1 + lda #smc_version_string + lda #>smc_version_text sta.z printf_string.str+1 - // [1130] phi printf_string::format_justify_left#22 = 0 [phi:display_info_smc::@9->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_justify_left#22 = 0 [phi:display_info_smc::@9->printf_string#2] -- vbuz1=vbuc1 lda #0 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 0 [phi:display_info_smc::@9->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 0 [phi:display_info_smc::@9->printf_string#3] -- vbuz1=vbuc1 sta.z printf_string.format_min_length jsr printf_string - // [891] phi from display_info_smc::@9 to display_info_smc::@10 [phi:display_info_smc::@9->display_info_smc::@10] + // [936] phi from display_info_smc::@9 to display_info_smc::@10 [phi:display_info_smc::@9->display_info_smc::@10] // display_info_smc::@10 - // printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_string) - // [892] call printf_str - // [987] phi from display_info_smc::@10 to printf_str [phi:display_info_smc::@10->printf_str] - // [987] phi printf_str::putc#73 = &cputc [phi:display_info_smc::@10->printf_str#0] -- pprz1=pprc1 + // printf("SMC %-9s ATTiny v%s ", status_text[info_status], smc_version_text) + // [937] call printf_str + // [1019] phi from display_info_smc::@10 to printf_str [phi:display_info_smc::@10->printf_str] + // [1019] phi printf_str::putc#73 = &cputc [phi:display_info_smc::@10->printf_str#0] -- pprz1=pprc1 lda #cputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s [phi:display_info_smc::@10->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s [phi:display_info_smc::@10->printf_str#1] -- pbuz1=pbuc1 lda #<@s sta.z printf_str.s lda #>@s @@ -5546,7 +6081,7 @@ display_info_smc: { jsr printf_str // display_info_smc::@11 // if(info_text) - // [893] if((char *)0==display_info_smc::info_text#14) goto display_info_smc::@1 -- pbuc1_eq_pbuz1_then_la1 + // [938] if((char *)0==display_info_smc::info_text#17) goto display_info_smc::@1 -- pbuc1_eq_pbuz1_then_la1 lda.z info_text cmp #<0 bne !+ @@ -5556,49 +6091,50 @@ display_info_smc: { !: // display_info_smc::@2 // printf("%-25s", info_text) - // [894] printf_string::str#5 = display_info_smc::info_text#14 -- pbuz1=pbuz2 + // [939] printf_string::str#5 = display_info_smc::info_text#17 -- pbuz1=pbuz2 lda.z info_text sta.z printf_string.str lda.z info_text+1 sta.z printf_string.str+1 - // [895] call printf_string - // [1130] phi from display_info_smc::@2 to printf_string [phi:display_info_smc::@2->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_info_smc::@2->printf_string#0] -- pprz1=pprc1 + // [940] call printf_string + // [1180] phi from display_info_smc::@2 to printf_string [phi:display_info_smc::@2->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_info_smc::@2->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#5 [phi:display_info_smc::@2->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 1 [phi:display_info_smc::@2->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#5 [phi:display_info_smc::@2->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 1 [phi:display_info_smc::@2->printf_string#2] -- vbuz1=vbuc1 lda #1 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = $19 [phi:display_info_smc::@2->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = $19 [phi:display_info_smc::@2->printf_string#3] -- vbuz1=vbuc1 lda #$19 sta.z printf_string.format_min_length jsr printf_string // display_info_smc::@1 __b1: // gotoxy(x, y) - // [896] gotoxy::x#14 = display_info_smc::x#0 -- vbuxx=vbum1 - ldx x - // [897] gotoxy::y#14 = display_info_smc::y#0 -- vbuyy=vbum1 - ldy y - // [898] call gotoxy - // [718] phi from display_info_smc::@1 to gotoxy [phi:display_info_smc::@1->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#14 [phi:display_info_smc::@1->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#14 [phi:display_info_smc::@1->gotoxy#1] -- register_copy + // [941] gotoxy::x#14 = display_info_smc::x#0 -- vbuz1=vbum2 + lda x + sta.z gotoxy.x + // [942] gotoxy::y#14 = display_info_smc::y#0 -- vbuz1=vbuz2 + lda.z y + sta.z gotoxy.y + // [943] call gotoxy + // [763] phi from display_info_smc::@1 to gotoxy [phi:display_info_smc::@1->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#14 [phi:display_info_smc::@1->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#14 [phi:display_info_smc::@1->gotoxy#1] -- register_copy jsr gotoxy // display_info_smc::@return // } - // [899] return + // [944] return rts .segment Data s: .text "SMC " .byte 0 s1: .text " ATTiny v" .byte 0 - x: .byte 0 - y: .byte 0 + .label x = fclose.sp } .segment Code // display_info_vera @@ -5607,58 +6143,65 @@ display_info_smc: { * * @param info_status The STATUS_ */ -// void display_info_vera(__zp($ce) char info_status, __zp($30) char *info_text) +// void display_info_vera(__zp($e7) char info_status, __zp($74) char *info_text) display_info_vera: { - .label info_status = $ce - .label info_text = $30 + .label display_info_vera__8 = $e7 + .label x = $e3 + .label y = $6e + .label info_status = $e7 + .label info_text = $74 // unsigned char x = wherex() - // [901] call wherex + // [946] call wherex jsr wherex - // [902] wherex::return#11 = wherex::return#0 + // [947] wherex::return#11 = wherex::return#0 -- vbuz1=vbuz2 + lda.z wherex.return + sta.z wherex.return_3 // display_info_vera::@3 - // [903] display_info_vera::x#0 = wherex::return#11 -- vbum1=vbuaa - sta x + // [948] display_info_vera::x#0 = wherex::return#11 // unsigned char y = wherey() - // [904] call wherey + // [949] call wherey jsr wherey - // [905] wherey::return#11 = wherey::return#0 + // [950] wherey::return#11 = wherey::return#0 -- vbuz1=vbuz2 + lda.z wherey.return + sta.z wherey.return_3 // display_info_vera::@4 - // [906] display_info_vera::y#0 = wherey::return#11 -- vbum1=vbuaa - sta y + // [951] display_info_vera::y#0 = wherey::return#11 // status_vera = info_status - // [907] status_vera#0 = display_info_vera::info_status#3 -- vbum1=vbuz2 + // [952] status_vera#0 = display_info_vera::info_status#3 -- vbum1=vbuz2 lda.z info_status sta status_vera // display_vera_led(status_color[info_status]) - // [908] display_vera_led::c#1 = status_color[display_info_vera::info_status#3] -- vbum1=pbuc1_derefidx_vbuz2 + // [953] display_vera_led::c#1 = status_color[display_info_vera::info_status#3] -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z info_status lda status_color,y - sta display_vera_led.c - // [909] call display_vera_led - // [2044] phi from display_info_vera::@4 to display_vera_led [phi:display_info_vera::@4->display_vera_led] - // [2044] phi display_vera_led::c#2 = display_vera_led::c#1 [phi:display_info_vera::@4->display_vera_led#0] -- register_copy + sta.z display_vera_led.c + // [954] call display_vera_led + // [2101] phi from display_info_vera::@4 to display_vera_led [phi:display_info_vera::@4->display_vera_led] + // [2101] phi display_vera_led::c#2 = display_vera_led::c#1 [phi:display_info_vera::@4->display_vera_led#0] -- register_copy jsr display_vera_led - // [910] phi from display_info_vera::@4 to display_info_vera::@5 [phi:display_info_vera::@4->display_info_vera::@5] + // [955] phi from display_info_vera::@4 to display_info_vera::@5 [phi:display_info_vera::@4->display_info_vera::@5] // display_info_vera::@5 // gotoxy(INFO_X, INFO_Y+1) - // [911] call gotoxy - // [718] phi from display_info_vera::@5 to gotoxy [phi:display_info_vera::@5->gotoxy] - // [718] phi gotoxy::y#30 = $11+1 [phi:display_info_vera::@5->gotoxy#0] -- vbuyy=vbuc1 - ldy #$11+1 - // [718] phi gotoxy::x#30 = 4 [phi:display_info_vera::@5->gotoxy#1] -- vbuxx=vbuc1 - ldx #4 + // [956] call gotoxy + // [763] phi from display_info_vera::@5 to gotoxy [phi:display_info_vera::@5->gotoxy] + // [763] phi gotoxy::y#30 = $11+1 [phi:display_info_vera::@5->gotoxy#0] -- vbuz1=vbuc1 + lda #$11+1 + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = 4 [phi:display_info_vera::@5->gotoxy#1] -- vbuz1=vbuc1 + lda #4 + sta.z gotoxy.x jsr gotoxy - // [912] phi from display_info_vera::@5 to display_info_vera::@6 [phi:display_info_vera::@5->display_info_vera::@6] + // [957] phi from display_info_vera::@5 to display_info_vera::@6 [phi:display_info_vera::@5->display_info_vera::@6] // display_info_vera::@6 // printf("VERA %-9s FPGA ", status_text[info_status]) - // [913] call printf_str - // [987] phi from display_info_vera::@6 to printf_str [phi:display_info_vera::@6->printf_str] - // [987] phi printf_str::putc#73 = &cputc [phi:display_info_vera::@6->printf_str#0] -- pprz1=pprc1 + // [958] call printf_str + // [1019] phi from display_info_vera::@6 to printf_str [phi:display_info_vera::@6->printf_str] + // [1019] phi printf_str::putc#73 = &cputc [phi:display_info_vera::@6->printf_str#0] -- pprz1=pprc1 lda #cputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = display_info_vera::s [phi:display_info_vera::@6->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = display_info_vera::s [phi:display_info_vera::@6->printf_str#1] -- pbuz1=pbuc1 lda #s @@ -5666,41 +6209,40 @@ display_info_vera: { jsr printf_str // display_info_vera::@7 // printf("VERA %-9s FPGA ", status_text[info_status]) - // [914] display_info_vera::$8 = display_info_vera::info_status#3 << 1 -- vbuaa=vbuz1_rol_1 - lda.z info_status - asl - // [915] printf_string::str#6 = status_text[display_info_vera::$8] -- pbuz1=qbuc1_derefidx_vbuaa - tay + // [959] display_info_vera::$8 = display_info_vera::info_status#3 << 1 -- vbuz1=vbuz1_rol_1 + asl.z display_info_vera__8 + // [960] printf_string::str#6 = status_text[display_info_vera::$8] -- pbuz1=qbuc1_derefidx_vbuz2 + ldy.z display_info_vera__8 lda status_text,y sta.z printf_string.str lda status_text+1,y sta.z printf_string.str+1 - // [916] call printf_string - // [1130] phi from display_info_vera::@7 to printf_string [phi:display_info_vera::@7->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_info_vera::@7->printf_string#0] -- pprz1=pprc1 + // [961] call printf_string + // [1180] phi from display_info_vera::@7 to printf_string [phi:display_info_vera::@7->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_info_vera::@7->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#6 [phi:display_info_vera::@7->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 1 [phi:display_info_vera::@7->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#6 [phi:display_info_vera::@7->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 1 [phi:display_info_vera::@7->printf_string#2] -- vbuz1=vbuc1 lda #1 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 9 [phi:display_info_vera::@7->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 9 [phi:display_info_vera::@7->printf_string#3] -- vbuz1=vbuc1 lda #9 sta.z printf_string.format_min_length jsr printf_string - // [917] phi from display_info_vera::@7 to display_info_vera::@8 [phi:display_info_vera::@7->display_info_vera::@8] + // [962] phi from display_info_vera::@7 to display_info_vera::@8 [phi:display_info_vera::@7->display_info_vera::@8] // display_info_vera::@8 // printf("VERA %-9s FPGA ", status_text[info_status]) - // [918] call printf_str - // [987] phi from display_info_vera::@8 to printf_str [phi:display_info_vera::@8->printf_str] - // [987] phi printf_str::putc#73 = &cputc [phi:display_info_vera::@8->printf_str#0] -- pprz1=pprc1 + // [963] call printf_str + // [1019] phi from display_info_vera::@8 to printf_str [phi:display_info_vera::@8->printf_str] + // [1019] phi printf_str::putc#73 = &cputc [phi:display_info_vera::@8->printf_str#0] -- pprz1=pprc1 lda #cputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = display_info_vera::s1 [phi:display_info_vera::@8->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = display_info_vera::s1 [phi:display_info_vera::@8->printf_str#1] -- pbuz1=pbuc1 lda #s1 @@ -5708,7 +6250,7 @@ display_info_vera: { jsr printf_str // display_info_vera::@9 // if(info_text) - // [919] if((char *)0==display_info_vera::info_text#10) goto display_info_vera::@1 -- pbuc1_eq_pbuz1_then_la1 + // [964] if((char *)0==display_info_vera::info_text#10) goto display_info_vera::@1 -- pbuc1_eq_pbuz1_then_la1 lda.z info_text cmp #<0 bne !+ @@ -5718,130 +6260,49 @@ display_info_vera: { !: // display_info_vera::@2 // printf("%-25s", info_text) - // [920] printf_string::str#7 = display_info_vera::info_text#10 -- pbuz1=pbuz2 + // [965] printf_string::str#7 = display_info_vera::info_text#10 -- pbuz1=pbuz2 lda.z info_text sta.z printf_string.str lda.z info_text+1 sta.z printf_string.str+1 - // [921] call printf_string - // [1130] phi from display_info_vera::@2 to printf_string [phi:display_info_vera::@2->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_info_vera::@2->printf_string#0] -- pprz1=pprc1 + // [966] call printf_string + // [1180] phi from display_info_vera::@2 to printf_string [phi:display_info_vera::@2->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_info_vera::@2->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#7 [phi:display_info_vera::@2->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 1 [phi:display_info_vera::@2->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#7 [phi:display_info_vera::@2->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 1 [phi:display_info_vera::@2->printf_string#2] -- vbuz1=vbuc1 lda #1 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = $19 [phi:display_info_vera::@2->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = $19 [phi:display_info_vera::@2->printf_string#3] -- vbuz1=vbuc1 lda #$19 sta.z printf_string.format_min_length jsr printf_string // display_info_vera::@1 __b1: // gotoxy(x, y) - // [922] gotoxy::x#16 = display_info_vera::x#0 -- vbuxx=vbum1 - ldx x - // [923] gotoxy::y#16 = display_info_vera::y#0 -- vbuyy=vbum1 - ldy y - // [924] call gotoxy - // [718] phi from display_info_vera::@1 to gotoxy [phi:display_info_vera::@1->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#16 [phi:display_info_vera::@1->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#16 [phi:display_info_vera::@1->gotoxy#1] -- register_copy + // [967] gotoxy::x#16 = display_info_vera::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z gotoxy.x + // [968] gotoxy::y#16 = display_info_vera::y#0 -- vbuz1=vbuz2 + lda.z y + sta.z gotoxy.y + // [969] call gotoxy + // [763] phi from display_info_vera::@1 to gotoxy [phi:display_info_vera::@1->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#16 [phi:display_info_vera::@1->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#16 [phi:display_info_vera::@1->gotoxy#1] -- register_copy jsr gotoxy // display_info_vera::@return // } - // [925] return + // [970] return rts .segment Data s: .text "VERA " .byte 0 s1: .text " FPGA " .byte 0 - x: .byte 0 - y: .byte 0 -} -.segment Code - // display_progress_text -/** - * @brief Print a block of text within the progress frame with a count of lines. - * - * @param text A pointer to an array of strings to be displayed (char**). - * @param lines The amount of lines to be displayed, starting from the top of the progress frame. - */ -// void display_progress_text(__zp($b7) char **text, __zp($bb) char lines) -display_progress_text: { - .label l = $c0 - .label lines = $bb - .label text = $b7 - // display_progress_clear() - // [927] call display_progress_clear - // [826] phi from display_progress_text to display_progress_clear [phi:display_progress_text->display_progress_clear] - jsr display_progress_clear - // [928] phi from display_progress_text to display_progress_text::@1 [phi:display_progress_text->display_progress_text::@1] - // [928] phi display_progress_text::l#2 = 0 [phi:display_progress_text->display_progress_text::@1#0] -- vbuz1=vbuc1 - lda #0 - sta.z l - // display_progress_text::@1 - __b1: - // for(unsigned char l=0; ldisplay_progress_text::@1] - // [928] phi display_progress_text::l#2 = display_progress_text::l#1 [phi:display_progress_text::@3->display_progress_text::@1#0] -- register_copy - jmp __b1 -} - // util_wait_space -util_wait_space: { - // util_wait_key("Press [SPACE] to continue ...", " ") - // [937] call util_wait_key - // [1686] phi from util_wait_space to util_wait_key [phi:util_wait_space->util_wait_key] - // [1686] phi util_wait_key::filter#12 = s [phi:util_wait_space->util_wait_key#0] -- pbuz1=pbuc1 - lda #s - sta.z util_wait_key.filter+1 - // [1686] phi util_wait_key::info_text#2 = util_wait_space::info_text [phi:util_wait_space->util_wait_key#1] -- pbuz1=pbuc1 - lda #info_text - sta.z util_wait_key.info_text+1 - jsr util_wait_key - // util_wait_space::@return - // } - // [938] return - rts - .segment Data - info_text: .text "Press [SPACE] to continue ..." - .byte 0 } .segment Code // smc_detect @@ -5853,31 +6314,32 @@ util_wait_space: { * @return unsigned int 0x0200 if there is a technical error reading or detecting the SMC chip. */ smc_detect: { + .label smc_detect__1 = $c5 // When the bootloader is not present, 0xFF is returned. - .label smc_bootloader_version = $29 - .label return = $29 + .label smc_bootloader_version = $2d + .label return = $2d // cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_OFFSET) - // [939] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 + // [971] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 lda #$42 sta cx16_k_i2c_read_byte.device - // [940] cx16_k_i2c_read_byte::offset = $8e -- vbum1=vbuc1 + // [972] cx16_k_i2c_read_byte::offset = $8e -- vbum1=vbuc1 lda #$8e sta cx16_k_i2c_read_byte.offset - // [941] call cx16_k_i2c_read_byte + // [973] call cx16_k_i2c_read_byte jsr cx16_k_i2c_read_byte - // [942] cx16_k_i2c_read_byte::return#10 = cx16_k_i2c_read_byte::return#1 + // [974] cx16_k_i2c_read_byte::return#10 = cx16_k_i2c_read_byte::return#1 // smc_detect::@3 // smc_bootloader_version = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_OFFSET) - // [943] smc_detect::smc_bootloader_version#1 = cx16_k_i2c_read_byte::return#10 + // [975] smc_detect::smc_bootloader_version#1 = cx16_k_i2c_read_byte::return#10 // BYTE1(smc_bootloader_version) - // [944] smc_detect::$1 = byte1 smc_detect::smc_bootloader_version#1 -- vbuaa=_byte1_vwuz1 + // [976] smc_detect::$1 = byte1 smc_detect::smc_bootloader_version#1 -- vbuz1=_byte1_vwuz2 lda.z smc_bootloader_version+1 + sta.z smc_detect__1 // if(!BYTE1(smc_bootloader_version)) - // [945] if(0==smc_detect::$1) goto smc_detect::@1 -- 0_eq_vbuaa_then_la1 - cmp #0 + // [977] if(0==smc_detect::$1) goto smc_detect::@1 -- 0_eq_vbuz1_then_la1 beq __b1 - // [948] phi from smc_detect::@3 to smc_detect::@2 [phi:smc_detect::@3->smc_detect::@2] - // [948] phi smc_detect::return#0 = $200 [phi:smc_detect::@3->smc_detect::@2#0] -- vwuz1=vwuc1 + // [980] phi from smc_detect::@3 to smc_detect::@2 [phi:smc_detect::@3->smc_detect::@2] + // [980] phi smc_detect::return#0 = $200 [phi:smc_detect::@3->smc_detect::@2#0] -- vwuz1=vwuc1 lda #<$200 sta.z return lda #>$200 @@ -5886,72 +6348,72 @@ smc_detect: { // smc_detect::@1 __b1: // if(smc_bootloader_version == 0xFF) - // [946] if(smc_detect::smc_bootloader_version#1!=$ff) goto smc_detect::@4 -- vwuz1_neq_vbuc1_then_la1 + // [978] if(smc_detect::smc_bootloader_version#1!=$ff) goto smc_detect::@4 -- vwuz1_neq_vbuc1_then_la1 lda.z smc_bootloader_version+1 bne __b2 lda.z smc_bootloader_version cmp #$ff bne __b2 - // [948] phi from smc_detect::@1 to smc_detect::@2 [phi:smc_detect::@1->smc_detect::@2] - // [948] phi smc_detect::return#0 = $100 [phi:smc_detect::@1->smc_detect::@2#0] -- vwuz1=vwuc1 + // [980] phi from smc_detect::@1 to smc_detect::@2 [phi:smc_detect::@1->smc_detect::@2] + // [980] phi smc_detect::return#0 = $100 [phi:smc_detect::@1->smc_detect::@2#0] -- vwuz1=vwuc1 lda #<$100 sta.z return lda #>$100 sta.z return+1 rts - // [947] phi from smc_detect::@1 to smc_detect::@4 [phi:smc_detect::@1->smc_detect::@4] + // [979] phi from smc_detect::@1 to smc_detect::@4 [phi:smc_detect::@1->smc_detect::@4] // smc_detect::@4 - // [948] phi from smc_detect::@4 to smc_detect::@2 [phi:smc_detect::@4->smc_detect::@2] - // [948] phi smc_detect::return#0 = smc_detect::smc_bootloader_version#1 [phi:smc_detect::@4->smc_detect::@2#0] -- register_copy + // [980] phi from smc_detect::@4 to smc_detect::@2 [phi:smc_detect::@4->smc_detect::@2] + // [980] phi smc_detect::return#0 = smc_detect::smc_bootloader_version#1 [phi:smc_detect::@4->smc_detect::@2#0] -- register_copy // smc_detect::@2 __b2: // smc_detect::@return // } - // [949] return + // [981] return rts } // strcpy // Copies the C string pointed by source into the array pointed by destination, including the terminating null character (and stopping at that point). -// char * strcpy(__zp($4d) char *destination, char *source) +// char * strcpy(__zp($3d) char *destination, char *source) strcpy: { - .label src = $69 - .label dst = $4d - .label destination = $4d - // [951] phi from strcpy strcpy::@2 to strcpy::@1 [phi:strcpy/strcpy::@2->strcpy::@1] - // [951] phi strcpy::dst#2 = strcpy::dst#0 [phi:strcpy/strcpy::@2->strcpy::@1#0] -- register_copy - // [951] phi strcpy::src#2 = strcpy::src#0 [phi:strcpy/strcpy::@2->strcpy::@1#1] -- register_copy + .label src = $64 + .label dst = $3d + .label destination = $3d + // [983] phi from strcpy strcpy::@2 to strcpy::@1 [phi:strcpy/strcpy::@2->strcpy::@1] + // [983] phi strcpy::dst#2 = strcpy::dst#0 [phi:strcpy/strcpy::@2->strcpy::@1#0] -- register_copy + // [983] phi strcpy::src#2 = strcpy::src#0 [phi:strcpy/strcpy::@2->strcpy::@1#1] -- register_copy // strcpy::@1 __b1: // while(*src) - // [952] if(0!=*strcpy::src#2) goto strcpy::@2 -- 0_neq__deref_pbuz1_then_la1 + // [984] if(0!=*strcpy::src#2) goto strcpy::@2 -- 0_neq__deref_pbuz1_then_la1 ldy #0 lda (src),y cmp #0 bne __b2 // strcpy::@3 // *dst = 0 - // [953] *strcpy::dst#2 = 0 -- _deref_pbuz1=vbuc1 + // [985] *strcpy::dst#2 = 0 -- _deref_pbuz1=vbuc1 tya tay sta (dst),y // strcpy::@return // } - // [954] return + // [986] return rts // strcpy::@2 __b2: // *dst++ = *src++ - // [955] *strcpy::dst#2 = *strcpy::src#2 -- _deref_pbuz1=_deref_pbuz2 + // [987] *strcpy::dst#2 = *strcpy::src#2 -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (src),y sta (dst),y // *dst++ = *src++; - // [956] strcpy::dst#1 = ++ strcpy::dst#2 -- pbuz1=_inc_pbuz1 + // [988] strcpy::dst#1 = ++ strcpy::dst#2 -- pbuz1=_inc_pbuz1 inc.z dst bne !+ inc.z dst+1 !: - // [957] strcpy::src#1 = ++ strcpy::src#2 -- pbuz1=_inc_pbuz1 + // [989] strcpy::src#1 = ++ strcpy::src#2 -- pbuz1=_inc_pbuz1 inc.z src bne !+ inc.z src+1 @@ -5969,13 +6431,11 @@ strcpy: { * LDY #$20 ; start of NVRAM inside RTC * JSR i2c_read_byte ; read first byte of NVRAM */ -// __zp($29) unsigned int cx16_k_i2c_read_byte(__mem() volatile char device, __mem() volatile char offset) +// __zp($2d) unsigned int cx16_k_i2c_read_byte(__mem() volatile char device, __mem() volatile char offset) cx16_k_i2c_read_byte: { - .label return = $29 - .label return_1 = $b7 - .label return_2 = $e2 + .label return = $2d // unsigned int result - // [958] cx16_k_i2c_read_byte::result = 0 -- vwum1=vwuc1 + // [990] cx16_k_i2c_read_byte::result = 0 -- vwum1=vwuc1 lda #<0 sta result sta result+1 @@ -5988,14 +6448,14 @@ cx16_k_i2c_read_byte: { sta result rol result+1 // return result; - // [960] cx16_k_i2c_read_byte::return#0 = cx16_k_i2c_read_byte::result -- vwuz1=vwum2 + // [992] cx16_k_i2c_read_byte::return#0 = cx16_k_i2c_read_byte::result -- vwuz1=vwum2 sta.z return lda result+1 sta.z return+1 // cx16_k_i2c_read_byte::@return // } - // [961] cx16_k_i2c_read_byte::return#1 = cx16_k_i2c_read_byte::return#0 - // [962] return + // [993] cx16_k_i2c_read_byte::return#1 = cx16_k_i2c_read_byte::return#0 + // [994] return rts .segment Data device: .byte 0 @@ -6009,49 +6469,49 @@ cx16_k_i2c_read_byte: { * * @param version_string The string containing the SMC version filled upon return. */ -// unsigned long smc_get_version_text(__zp($30) char *version_string, __register(Y) char release, __zp($f7) char major, __zp($e8) char minor) +// unsigned long smc_get_version_text(__zp($74) char *version_string, __zp($2f) char release, __zp($72) char major, __zp($37) char minor) smc_get_version_text: { - .label major = $f7 - .label minor = $e8 - .label version_string = $30 + .label release = $2f + .label major = $72 + .label minor = $37 + .label version_string = $74 // sprintf(version_string, "%u.%u.%u ", release, major, minor) - // [964] snprintf_init::s#0 = smc_get_version_text::version_string#2 - // [965] call snprintf_init - // [982] phi from smc_get_version_text to snprintf_init [phi:smc_get_version_text->snprintf_init] - // [982] phi snprintf_init::s#27 = snprintf_init::s#0 [phi:smc_get_version_text->snprintf_init#0] -- register_copy + // [996] snprintf_init::s#0 = smc_get_version_text::version_string#2 + // [997] call snprintf_init + // [1014] phi from smc_get_version_text to snprintf_init [phi:smc_get_version_text->snprintf_init] + // [1014] phi snprintf_init::s#27 = snprintf_init::s#0 [phi:smc_get_version_text->snprintf_init#0] -- register_copy jsr snprintf_init // smc_get_version_text::@1 // sprintf(version_string, "%u.%u.%u ", release, major, minor) - // [966] printf_uchar::uvalue#1 = smc_get_version_text::release#2 -- vbuxx=vbuyy - tya - tax - // [967] call printf_uchar - // [1165] phi from smc_get_version_text::@1 to printf_uchar [phi:smc_get_version_text::@1->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 0 [phi:smc_get_version_text::@1->printf_uchar#0] -- vbuz1=vbuc1 + // [998] printf_uchar::uvalue#1 = smc_get_version_text::release#2 + // [999] call printf_uchar + // [1251] phi from smc_get_version_text::@1 to printf_uchar [phi:smc_get_version_text::@1->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 0 [phi:smc_get_version_text::@1->printf_uchar#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 0 [phi:smc_get_version_text::@1->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 0 [phi:smc_get_version_text::@1->printf_uchar#1] -- vbuz1=vbuc1 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:smc_get_version_text::@1->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:smc_get_version_text::@1->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = DECIMAL [phi:smc_get_version_text::@1->printf_uchar#3] -- vbuyy=vbuc1 - ldy #DECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#1 [phi:smc_get_version_text::@1->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = DECIMAL [phi:smc_get_version_text::@1->printf_uchar#3] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#1 [phi:smc_get_version_text::@1->printf_uchar#4] -- register_copy jsr printf_uchar - // [968] phi from smc_get_version_text::@1 to smc_get_version_text::@2 [phi:smc_get_version_text::@1->smc_get_version_text::@2] + // [1000] phi from smc_get_version_text::@1 to smc_get_version_text::@2 [phi:smc_get_version_text::@1->smc_get_version_text::@2] // smc_get_version_text::@2 // sprintf(version_string, "%u.%u.%u ", release, major, minor) - // [969] call printf_str - // [987] phi from smc_get_version_text::@2 to printf_str [phi:smc_get_version_text::@2->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_get_version_text::@2->printf_str#0] -- pprz1=pprc1 + // [1001] call printf_str + // [1019] phi from smc_get_version_text::@2 to printf_str [phi:smc_get_version_text::@2->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_get_version_text::@2->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_get_version_text::s [phi:smc_get_version_text::@2->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_get_version_text::s [phi:smc_get_version_text::@2->printf_str#1] -- pbuz1=pbuc1 lda #s @@ -6059,35 +6519,37 @@ smc_get_version_text: { jsr printf_str // smc_get_version_text::@3 // sprintf(version_string, "%u.%u.%u ", release, major, minor) - // [970] printf_uchar::uvalue#2 = smc_get_version_text::major#2 -- vbuxx=vbuz1 - ldx.z major - // [971] call printf_uchar - // [1165] phi from smc_get_version_text::@3 to printf_uchar [phi:smc_get_version_text::@3->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 0 [phi:smc_get_version_text::@3->printf_uchar#0] -- vbuz1=vbuc1 + // [1002] printf_uchar::uvalue#2 = smc_get_version_text::major#2 -- vbuz1=vbuz2 + lda.z major + sta.z printf_uchar.uvalue + // [1003] call printf_uchar + // [1251] phi from smc_get_version_text::@3 to printf_uchar [phi:smc_get_version_text::@3->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 0 [phi:smc_get_version_text::@3->printf_uchar#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 0 [phi:smc_get_version_text::@3->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 0 [phi:smc_get_version_text::@3->printf_uchar#1] -- vbuz1=vbuc1 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:smc_get_version_text::@3->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:smc_get_version_text::@3->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = DECIMAL [phi:smc_get_version_text::@3->printf_uchar#3] -- vbuyy=vbuc1 - ldy #DECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#2 [phi:smc_get_version_text::@3->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = DECIMAL [phi:smc_get_version_text::@3->printf_uchar#3] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#2 [phi:smc_get_version_text::@3->printf_uchar#4] -- register_copy jsr printf_uchar - // [972] phi from smc_get_version_text::@3 to smc_get_version_text::@4 [phi:smc_get_version_text::@3->smc_get_version_text::@4] + // [1004] phi from smc_get_version_text::@3 to smc_get_version_text::@4 [phi:smc_get_version_text::@3->smc_get_version_text::@4] // smc_get_version_text::@4 // sprintf(version_string, "%u.%u.%u ", release, major, minor) - // [973] call printf_str - // [987] phi from smc_get_version_text::@4 to printf_str [phi:smc_get_version_text::@4->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_get_version_text::@4->printf_str#0] -- pprz1=pprc1 + // [1005] call printf_str + // [1019] phi from smc_get_version_text::@4 to printf_str [phi:smc_get_version_text::@4->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_get_version_text::@4->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_get_version_text::s [phi:smc_get_version_text::@4->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_get_version_text::s [phi:smc_get_version_text::@4->printf_str#1] -- pbuz1=pbuc1 lda #s @@ -6095,35 +6557,37 @@ smc_get_version_text: { jsr printf_str // smc_get_version_text::@5 // sprintf(version_string, "%u.%u.%u ", release, major, minor) - // [974] printf_uchar::uvalue#3 = smc_get_version_text::minor#2 -- vbuxx=vbuz1 - ldx.z minor - // [975] call printf_uchar - // [1165] phi from smc_get_version_text::@5 to printf_uchar [phi:smc_get_version_text::@5->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 0 [phi:smc_get_version_text::@5->printf_uchar#0] -- vbuz1=vbuc1 + // [1006] printf_uchar::uvalue#3 = smc_get_version_text::minor#2 -- vbuz1=vbuz2 + lda.z minor + sta.z printf_uchar.uvalue + // [1007] call printf_uchar + // [1251] phi from smc_get_version_text::@5 to printf_uchar [phi:smc_get_version_text::@5->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 0 [phi:smc_get_version_text::@5->printf_uchar#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 0 [phi:smc_get_version_text::@5->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 0 [phi:smc_get_version_text::@5->printf_uchar#1] -- vbuz1=vbuc1 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:smc_get_version_text::@5->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:smc_get_version_text::@5->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = DECIMAL [phi:smc_get_version_text::@5->printf_uchar#3] -- vbuyy=vbuc1 - ldy #DECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#3 [phi:smc_get_version_text::@5->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = DECIMAL [phi:smc_get_version_text::@5->printf_uchar#3] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#3 [phi:smc_get_version_text::@5->printf_uchar#4] -- register_copy jsr printf_uchar - // [976] phi from smc_get_version_text::@5 to smc_get_version_text::@6 [phi:smc_get_version_text::@5->smc_get_version_text::@6] + // [1008] phi from smc_get_version_text::@5 to smc_get_version_text::@6 [phi:smc_get_version_text::@5->smc_get_version_text::@6] // smc_get_version_text::@6 // sprintf(version_string, "%u.%u.%u ", release, major, minor) - // [977] call printf_str - // [987] phi from smc_get_version_text::@6 to printf_str [phi:smc_get_version_text::@6->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_get_version_text::@6->printf_str#0] -- pprz1=pprc1 + // [1009] call printf_str + // [1019] phi from smc_get_version_text::@6 to printf_str [phi:smc_get_version_text::@6->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_get_version_text::@6->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s [phi:smc_get_version_text::@6->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s [phi:smc_get_version_text::@6->printf_str#1] -- pbuz1=pbuc1 lda #<@s sta.z printf_str.s lda #>@s @@ -6131,16 +6595,16 @@ smc_get_version_text: { jsr printf_str // smc_get_version_text::@7 // sprintf(version_string, "%u.%u.%u ", release, major, minor) - // [978] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1010] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [979] callexecute snputc -- call_vprc1 + // [1011] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // smc_get_version_text::@return // } - // [981] return + // [1013] return rts .segment Data s: .text "." @@ -6149,63 +6613,66 @@ smc_get_version_text: { .segment Code // snprintf_init /// Initialize the snprintf() state -// void snprintf_init(__zp($30) char *s, unsigned int n) +// void snprintf_init(__zp($74) char *s, unsigned int n) snprintf_init: { - .label s = $30 + .label s = $74 // __snprintf_capacity = n - // [983] __snprintf_capacity = $ffff -- vwum1=vwuc1 + // [1015] __snprintf_capacity = $ffff -- vwum1=vwuc1 lda #<$ffff sta __snprintf_capacity lda #>$ffff sta __snprintf_capacity+1 // __snprintf_size = 0 - // [984] __snprintf_size = 0 -- vwum1=vbuc1 + // [1016] __snprintf_size = 0 -- vwum1=vbuc1 lda #<0 sta __snprintf_size sta __snprintf_size+1 // __snprintf_buffer = s - // [985] __snprintf_buffer = snprintf_init::s#27 -- pbuz1=pbuz2 + // [1017] __snprintf_buffer = snprintf_init::s#27 -- pbum1=pbuz2 lda.z s - sta.z __snprintf_buffer + sta __snprintf_buffer lda.z s+1 - sta.z __snprintf_buffer+1 + sta __snprintf_buffer+1 // snprintf_init::@return // } - // [986] return + // [1018] return rts } // printf_str /// Print a NUL-terminated string -// void printf_str(__zp($b7) void (*putc)(char), __zp($69) const char *s) +// void printf_str(__zp($4d) void (*putc)(char), __zp($64) const char *s) printf_str: { - .label s = $69 - .label putc = $b7 - // [988] phi from printf_str printf_str::@2 to printf_str::@1 [phi:printf_str/printf_str::@2->printf_str::@1] - // [988] phi printf_str::s#72 = printf_str::s#73 [phi:printf_str/printf_str::@2->printf_str::@1#0] -- register_copy + .label c = $c4 + .label s = $64 + .label putc = $4d + // [1020] phi from printf_str printf_str::@2 to printf_str::@1 [phi:printf_str/printf_str::@2->printf_str::@1] + // [1020] phi printf_str::s#72 = printf_str::s#73 [phi:printf_str/printf_str::@2->printf_str::@1#0] -- register_copy // printf_str::@1 __b1: // while(c=*s++) - // [989] printf_str::c#1 = *printf_str::s#72 -- vbuaa=_deref_pbuz1 + // [1021] printf_str::c#1 = *printf_str::s#72 -- vbuz1=_deref_pbuz2 ldy #0 lda (s),y - // [990] printf_str::s#0 = ++ printf_str::s#72 -- pbuz1=_inc_pbuz1 + sta.z c + // [1022] printf_str::s#0 = ++ printf_str::s#72 -- pbuz1=_inc_pbuz1 inc.z s bne !+ inc.z s+1 !: - // [991] if(0!=printf_str::c#1) goto printf_str::@2 -- 0_neq_vbuaa_then_la1 - cmp #0 + // [1023] if(0!=printf_str::c#1) goto printf_str::@2 -- 0_neq_vbuz1_then_la1 + lda.z c bne __b2 // printf_str::@return // } - // [992] return + // [1024] return rts // printf_str::@2 __b2: // putc(c) - // [993] stackpush(char) = printf_str::c#1 -- _stackpushbyte_=vbuaa + // [1025] stackpush(char) = printf_str::c#1 -- _stackpushbyte_=vbuz1 + lda.z c pha - // [994] callexecute *printf_str::putc#73 -- call__deref_pprz1 + // [1026] callexecute *printf_str::putc#73 -- call__deref_pprz1 jsr icall15 // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla @@ -6216,58 +6683,62 @@ printf_str: { } // printf_uint // Print an unsigned int using a specific format -// void printf_uint(void (*putc)(char), __zp($29) unsigned int uvalue, __zp($cd) char format_min_length, char format_justify_left, char format_sign_always, __zp($be) char format_zero_padding, char format_upper_case, __register(X) char format_radix) +// void printf_uint(void (*putc)(char), __zp($2d) unsigned int uvalue, __zp($e8) char format_min_length, char format_justify_left, char format_sign_always, __zp($e7) char format_zero_padding, char format_upper_case, __zp($35) char format_radix) printf_uint: { - .label uvalue = $29 - .label format_min_length = $cd - .label format_zero_padding = $be + .label uvalue = $2d + .label format_radix = $35 + .label format_min_length = $e8 + .label format_zero_padding = $e7 // printf_uint::@1 // printf_buffer.sign = format.sign_always?'+':0 - // [997] *((char *)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 + // [1029] *((char *)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 // Handle any sign lda #0 sta printf_buffer // utoa(uvalue, printf_buffer.digits, format.radix) - // [998] utoa::value#1 = printf_uint::uvalue#15 - // [999] utoa::radix#0 = printf_uint::format_radix#15 - // [1000] call utoa + // [1030] utoa::value#1 = printf_uint::uvalue#15 + // [1031] utoa::radix#0 = printf_uint::format_radix#15 + // [1032] call utoa // Format number into buffer jsr utoa // printf_uint::@2 // printf_number_buffer(putc, printf_buffer, format) - // [1001] printf_number_buffer::buffer_sign#1 = *((char *)&printf_buffer) -- vbuz1=_deref_pbuc1 + // [1033] printf_number_buffer::buffer_sign#1 = *((char *)&printf_buffer) -- vbuz1=_deref_pbuc1 lda printf_buffer sta.z printf_number_buffer.buffer_sign - // [1002] printf_number_buffer::format_min_length#1 = printf_uint::format_min_length#15 -- vbuxx=vbuz1 - ldx.z format_min_length - // [1003] printf_number_buffer::format_zero_padding#1 = printf_uint::format_zero_padding#15 - // [1004] call printf_number_buffer + // [1034] printf_number_buffer::format_min_length#1 = printf_uint::format_min_length#15 + // [1035] printf_number_buffer::format_zero_padding#1 = printf_uint::format_zero_padding#15 + // [1036] call printf_number_buffer // Print using format - // [2107] phi from printf_uint::@2 to printf_number_buffer [phi:printf_uint::@2->printf_number_buffer] - // [2107] phi printf_number_buffer::putc#10 = &snputc [phi:printf_uint::@2->printf_number_buffer#0] -- pprz1=pprc1 + // [2160] phi from printf_uint::@2 to printf_number_buffer [phi:printf_uint::@2->printf_number_buffer] + // [2160] phi printf_number_buffer::putc#10 = &snputc [phi:printf_uint::@2->printf_number_buffer#0] -- pprz1=pprc1 lda #snputc sta.z printf_number_buffer.putc+1 - // [2107] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#1 [phi:printf_uint::@2->printf_number_buffer#1] -- register_copy - // [2107] phi printf_number_buffer::format_zero_padding#10 = printf_number_buffer::format_zero_padding#1 [phi:printf_uint::@2->printf_number_buffer#2] -- register_copy - // [2107] phi printf_number_buffer::format_min_length#3 = printf_number_buffer::format_min_length#1 [phi:printf_uint::@2->printf_number_buffer#3] -- register_copy + // [2160] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#1 [phi:printf_uint::@2->printf_number_buffer#1] -- register_copy + // [2160] phi printf_number_buffer::format_zero_padding#10 = printf_number_buffer::format_zero_padding#1 [phi:printf_uint::@2->printf_number_buffer#2] -- register_copy + // [2160] phi printf_number_buffer::format_min_length#3 = printf_number_buffer::format_min_length#1 [phi:printf_uint::@2->printf_number_buffer#3] -- register_copy jsr printf_number_buffer // printf_uint::@return // } - // [1005] return + // [1037] return rts } // rom_detect rom_detect: { .const bank_set_brom1_bank = 4 - .label rom_detect__24 = $dc - .label rom_detect_address = $25 - // [1007] phi from rom_detect to rom_detect::@1 [phi:rom_detect->rom_detect::@1] - // [1007] phi rom_detect::rom_chip#10 = 0 [phi:rom_detect->rom_detect::@1#0] -- vbum1=vbuc1 + .label rom_detect__9 = $6c + .label rom_detect__14 = $78 + .label rom_detect__15 = $2c + .label rom_detect__21 = $6e + .label rom_detect__24 = $e3 + .label rom_detect_address = $30 + // [1039] phi from rom_detect to rom_detect::@1 [phi:rom_detect->rom_detect::@1] + // [1039] phi rom_detect::rom_chip#10 = 0 [phi:rom_detect->rom_detect::@1#0] -- vbum1=vbuc1 lda #0 sta rom_chip - // [1007] phi rom_detect::rom_detect_address#10 = 0 [phi:rom_detect->rom_detect::@1#1] -- vduz1=vduc1 + // [1039] phi rom_detect::rom_detect_address#10 = 0 [phi:rom_detect->rom_detect::@1#1] -- vduz1=vduc1 sta.z rom_detect_address sta.z rom_detect_address+1 lda #<0>>$10 @@ -6279,7 +6750,7 @@ rom_detect: { // rom_detect::@1 __b1: // for (unsigned long rom_detect_address = 0; rom_detect_address < 8 * 0x80000; rom_detect_address += 0x80000) - // [1008] if(rom_detect::rom_detect_address#10<8*$80000) goto rom_detect::@2 -- vduz1_lt_vduc1_then_la1 + // [1040] if(rom_detect::rom_detect_address#10<8*$80000) goto rom_detect::@2 -- vduz1_lt_vduc1_then_la1 lda.z rom_detect_address+3 cmp #>8*$80000>>$10 bcc __b2 @@ -6298,20 +6769,20 @@ rom_detect: { !: // rom_detect::@return // } - // [1009] return + // [1041] return rts // rom_detect::@2 __b2: // rom_manufacturer_ids[rom_chip] = 0 - // [1010] rom_manufacturer_ids[rom_detect::rom_chip#10] = 0 -- pbuc1_derefidx_vbum1=vbuc2 + // [1042] rom_manufacturer_ids[rom_detect::rom_chip#10] = 0 -- pbuc1_derefidx_vbum1=vbuc2 lda #0 ldy rom_chip sta rom_manufacturer_ids,y // rom_device_ids[rom_chip] = 0 - // [1011] rom_device_ids[rom_detect::rom_chip#10] = 0 -- pbuc1_derefidx_vbum1=vbuc2 + // [1043] rom_device_ids[rom_detect::rom_chip#10] = 0 -- pbuc1_derefidx_vbum1=vbuc2 sta rom_device_ids,y // rom_unlock(rom_detect_address + 0x05555, 0x90) - // [1012] rom_unlock::address#2 = rom_detect::rom_detect_address#10 + $5555 -- vduz1=vduz2_plus_vwuc1 + // [1044] rom_unlock::address#2 = rom_detect::rom_detect_address#10 + $5555 -- vduz1=vduz2_plus_vwuc1 clc lda.z rom_detect_address adc #<$5555 @@ -6325,16 +6796,16 @@ rom_detect: { lda.z rom_detect_address+3 adc #0 sta.z rom_unlock.address+3 - // [1013] call rom_unlock - // [2138] phi from rom_detect::@2 to rom_unlock [phi:rom_detect::@2->rom_unlock] - // [2138] phi rom_unlock::unlock_code#5 = $90 [phi:rom_detect::@2->rom_unlock#0] -- vbuz1=vbuc1 + // [1045] call rom_unlock + // [2191] phi from rom_detect::@2 to rom_unlock [phi:rom_detect::@2->rom_unlock] + // [2191] phi rom_unlock::unlock_code#5 = $90 [phi:rom_detect::@2->rom_unlock#0] -- vbuz1=vbuc1 lda #$90 sta.z rom_unlock.unlock_code - // [2138] phi rom_unlock::address#5 = rom_unlock::address#2 [phi:rom_detect::@2->rom_unlock#1] -- register_copy + // [2191] phi rom_unlock::address#5 = rom_unlock::address#2 [phi:rom_detect::@2->rom_unlock#1] -- register_copy jsr rom_unlock // rom_detect::@12 // rom_read_byte(rom_detect_address) - // [1014] rom_read_byte::address#0 = rom_detect::rom_detect_address#10 -- vduz1=vduz2 + // [1046] rom_read_byte::address#0 = rom_detect::rom_detect_address#10 -- vduz1=vduz2 lda.z rom_detect_address sta.z rom_read_byte.address lda.z rom_detect_address+1 @@ -6343,20 +6814,21 @@ rom_detect: { sta.z rom_read_byte.address+2 lda.z rom_detect_address+3 sta.z rom_read_byte.address+3 - // [1015] call rom_read_byte - // [2148] phi from rom_detect::@12 to rom_read_byte [phi:rom_detect::@12->rom_read_byte] - // [2148] phi rom_read_byte::address#2 = rom_read_byte::address#0 [phi:rom_detect::@12->rom_read_byte#0] -- register_copy + // [1047] call rom_read_byte + // [2201] phi from rom_detect::@12 to rom_read_byte [phi:rom_detect::@12->rom_read_byte] + // [2201] phi rom_read_byte::address#2 = rom_read_byte::address#0 [phi:rom_detect::@12->rom_read_byte#0] -- register_copy jsr rom_read_byte // rom_read_byte(rom_detect_address) - // [1016] rom_read_byte::return#2 = rom_read_byte::return#0 + // [1048] rom_read_byte::return#2 = rom_read_byte::return#0 // rom_detect::@13 - // [1017] rom_detect::$3 = rom_read_byte::return#2 + // [1049] rom_detect::$3 = rom_read_byte::return#2 // rom_manufacturer_ids[rom_chip] = rom_read_byte(rom_detect_address) - // [1018] rom_manufacturer_ids[rom_detect::rom_chip#10] = rom_detect::$3 -- pbuc1_derefidx_vbum1=vbuaa + // [1050] rom_manufacturer_ids[rom_detect::rom_chip#10] = rom_detect::$3 -- pbuc1_derefidx_vbum1=vbum2 + lda rom_detect__3 ldy rom_chip sta rom_manufacturer_ids,y // rom_read_byte(rom_detect_address + 1) - // [1019] rom_read_byte::address#1 = rom_detect::rom_detect_address#10 + 1 -- vduz1=vduz2_plus_1 + // [1051] rom_read_byte::address#1 = rom_detect::rom_detect_address#10 + 1 -- vduz1=vduz2_plus_1 lda.z rom_detect_address clc adc #1 @@ -6370,20 +6842,21 @@ rom_detect: { lda.z rom_detect_address+3 adc #0 sta.z rom_read_byte.address+3 - // [1020] call rom_read_byte - // [2148] phi from rom_detect::@13 to rom_read_byte [phi:rom_detect::@13->rom_read_byte] - // [2148] phi rom_read_byte::address#2 = rom_read_byte::address#1 [phi:rom_detect::@13->rom_read_byte#0] -- register_copy + // [1052] call rom_read_byte + // [2201] phi from rom_detect::@13 to rom_read_byte [phi:rom_detect::@13->rom_read_byte] + // [2201] phi rom_read_byte::address#2 = rom_read_byte::address#1 [phi:rom_detect::@13->rom_read_byte#0] -- register_copy jsr rom_read_byte // rom_read_byte(rom_detect_address + 1) - // [1021] rom_read_byte::return#3 = rom_read_byte::return#0 + // [1053] rom_read_byte::return#3 = rom_read_byte::return#0 // rom_detect::@14 - // [1022] rom_detect::$5 = rom_read_byte::return#3 + // [1054] rom_detect::$5 = rom_read_byte::return#3 // rom_device_ids[rom_chip] = rom_read_byte(rom_detect_address + 1) - // [1023] rom_device_ids[rom_detect::rom_chip#10] = rom_detect::$5 -- pbuc1_derefidx_vbum1=vbuaa + // [1055] rom_device_ids[rom_detect::rom_chip#10] = rom_detect::$5 -- pbuc1_derefidx_vbum1=vbum2 + lda rom_detect__5 ldy rom_chip sta rom_device_ids,y // rom_unlock(rom_detect_address + 0x05555, 0xF0) - // [1024] rom_unlock::address#3 = rom_detect::rom_detect_address#10 + $5555 -- vduz1=vduz2_plus_vwuc1 + // [1056] rom_unlock::address#3 = rom_detect::rom_detect_address#10 + $5555 -- vduz1=vduz2_plus_vwuc1 clc lda.z rom_detect_address adc #<$5555 @@ -6397,59 +6870,65 @@ rom_detect: { lda.z rom_detect_address+3 adc #0 sta.z rom_unlock.address+3 - // [1025] call rom_unlock - // [2138] phi from rom_detect::@14 to rom_unlock [phi:rom_detect::@14->rom_unlock] - // [2138] phi rom_unlock::unlock_code#5 = $f0 [phi:rom_detect::@14->rom_unlock#0] -- vbuz1=vbuc1 + // [1057] call rom_unlock + // [2191] phi from rom_detect::@14 to rom_unlock [phi:rom_detect::@14->rom_unlock] + // [2191] phi rom_unlock::unlock_code#5 = $f0 [phi:rom_detect::@14->rom_unlock#0] -- vbuz1=vbuc1 lda #$f0 sta.z rom_unlock.unlock_code - // [2138] phi rom_unlock::address#5 = rom_unlock::address#3 [phi:rom_detect::@14->rom_unlock#1] -- register_copy + // [2191] phi rom_unlock::address#5 = rom_unlock::address#3 [phi:rom_detect::@14->rom_unlock#1] -- register_copy jsr rom_unlock // rom_detect::bank_set_brom1 // BROM = bank - // [1026] BROM = rom_detect::bank_set_brom1_bank#0 -- vbuz1=vbuc1 + // [1058] BROM = rom_detect::bank_set_brom1_bank#0 -- vbuz1=vbuc1 lda #bank_set_brom1_bank sta.z BROM // rom_detect::@11 // rom_chip*3 - // [1027] rom_detect::$14 = rom_detect::rom_chip#10 << 1 -- vbum1=vbum2_rol_1 + // [1059] rom_detect::$14 = rom_detect::rom_chip#10 << 1 -- vbuz1=vbum2_rol_1 lda rom_chip asl - sta rom_detect__14 - // [1028] rom_detect::$9 = rom_detect::$14 + rom_detect::rom_chip#10 -- vbuaa=vbum1_plus_vbum2 + sta.z rom_detect__14 + // [1060] rom_detect::$9 = rom_detect::$14 + rom_detect::rom_chip#10 -- vbuz1=vbuz2_plus_vbum3 + lda rom_chip clc - adc rom_chip + adc.z rom_detect__14 + sta.z rom_detect__9 // gotoxy(rom_chip*3+40, 1) - // [1029] gotoxy::x#23 = rom_detect::$9 + $28 -- vbuxx=vbuaa_plus_vbuc1 + // [1061] gotoxy::x#23 = rom_detect::$9 + $28 -- vbuz1=vbuz2_plus_vbuc1 + lda #$28 clc - adc #$28 - tax - // [1030] call gotoxy - // [718] phi from rom_detect::@11 to gotoxy [phi:rom_detect::@11->gotoxy] - // [718] phi gotoxy::y#30 = 1 [phi:rom_detect::@11->gotoxy#0] -- vbuyy=vbuc1 - ldy #1 - // [718] phi gotoxy::x#30 = gotoxy::x#23 [phi:rom_detect::@11->gotoxy#1] -- register_copy + adc.z rom_detect__9 + sta.z gotoxy.x + // [1062] call gotoxy + // [763] phi from rom_detect::@11 to gotoxy [phi:rom_detect::@11->gotoxy] + // [763] phi gotoxy::y#30 = 1 [phi:rom_detect::@11->gotoxy#0] -- vbuz1=vbuc1 + lda #1 + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = gotoxy::x#23 [phi:rom_detect::@11->gotoxy#1] -- register_copy jsr gotoxy // rom_detect::@15 // printf("%02x", rom_device_ids[rom_chip]) - // [1031] printf_uchar::uvalue#8 = rom_device_ids[rom_detect::rom_chip#10] -- vbuxx=pbuc1_derefidx_vbum1 + // [1063] printf_uchar::uvalue#8 = rom_device_ids[rom_detect::rom_chip#10] -- vbuz1=pbuc1_derefidx_vbum2 ldy rom_chip - ldx rom_device_ids,y - // [1032] call printf_uchar - // [1165] phi from rom_detect::@15 to printf_uchar [phi:rom_detect::@15->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 1 [phi:rom_detect::@15->printf_uchar#0] -- vbuz1=vbuc1 + lda rom_device_ids,y + sta.z printf_uchar.uvalue + // [1064] call printf_uchar + // [1251] phi from rom_detect::@15 to printf_uchar [phi:rom_detect::@15->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 1 [phi:rom_detect::@15->printf_uchar#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 2 [phi:rom_detect::@15->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 2 [phi:rom_detect::@15->printf_uchar#1] -- vbuz1=vbuc1 lda #2 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &cputc [phi:rom_detect::@15->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &cputc [phi:rom_detect::@15->printf_uchar#2] -- pprz1=pprc1 lda #cputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = HEXADECIMAL [phi:rom_detect::@15->printf_uchar#3] -- vbuyy=vbuc1 - ldy #HEXADECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#8 [phi:rom_detect::@15->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = HEXADECIMAL [phi:rom_detect::@15->printf_uchar#3] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#8 [phi:rom_detect::@15->printf_uchar#4] -- register_copy jsr printf_uchar // rom_detect::@16 // case SST39SF010A: @@ -6457,7 +6936,7 @@ rom_detect: { // rom_size_strings[rom_chip] = "128"; // rom_sizes[rom_chip] = 128 * 1024; // break; - // [1033] if(rom_device_ids[rom_detect::rom_chip#10]==$b5) goto rom_detect::@3 -- pbuc1_derefidx_vbum1_eq_vbuc2_then_la1 + // [1065] if(rom_device_ids[rom_detect::rom_chip#10]==$b5) goto rom_detect::@3 -- pbuc1_derefidx_vbum1_eq_vbuc2_then_la1 ldy rom_chip lda rom_device_ids,y cmp #$b5 @@ -6470,7 +6949,7 @@ rom_detect: { // rom_size_strings[rom_chip] = "256"; // rom_sizes[rom_chip] = 256 * 1024; // break; - // [1034] if(rom_device_ids[rom_detect::rom_chip#10]==$b6) goto rom_detect::@4 -- pbuc1_derefidx_vbum1_eq_vbuc2_then_la1 + // [1066] if(rom_device_ids[rom_detect::rom_chip#10]==$b6) goto rom_detect::@4 -- pbuc1_derefidx_vbum1_eq_vbuc2_then_la1 lda rom_device_ids,y cmp #$b6 bne !__b4+ @@ -6482,35 +6961,35 @@ rom_detect: { // rom_size_strings[rom_chip] = "512"; // rom_sizes[rom_chip] = 512 * 1024; // break; - // [1035] if(rom_device_ids[rom_detect::rom_chip#10]==$b7) goto rom_detect::@5 -- pbuc1_derefidx_vbum1_eq_vbuc2_then_la1 + // [1067] if(rom_device_ids[rom_detect::rom_chip#10]==$b7) goto rom_detect::@5 -- pbuc1_derefidx_vbum1_eq_vbuc2_then_la1 lda rom_device_ids,y cmp #$b7 beq __b5 // rom_detect::@6 // rom_manufacturer_ids[rom_chip] = 0 - // [1036] rom_manufacturer_ids[rom_detect::rom_chip#10] = 0 -- pbuc1_derefidx_vbum1=vbuc2 + // [1068] rom_manufacturer_ids[rom_detect::rom_chip#10] = 0 -- pbuc1_derefidx_vbum1=vbuc2 lda #0 sta rom_manufacturer_ids,y // rom_device_names[rom_chip] = "----" - // [1037] rom_device_names[rom_detect::$14] = rom_detect::$31 -- qbuc1_derefidx_vbum1=pbuc2 - ldy rom_detect__14 + // [1069] rom_device_names[rom_detect::$14] = rom_detect::$31 -- qbuc1_derefidx_vbuz1=pbuc2 + ldy.z rom_detect__14 lda #rom_detect__31 sta rom_device_names+1,y // rom_size_strings[rom_chip] = "000" - // [1038] rom_size_strings[rom_detect::$14] = rom_detect::$32 -- qbuc1_derefidx_vbum1=pbuc2 + // [1070] rom_size_strings[rom_detect::$14] = rom_detect::$32 -- qbuc1_derefidx_vbuz1=pbuc2 lda #rom_detect__32 sta rom_size_strings+1,y // rom_sizes[rom_chip] = 0 - // [1039] rom_detect::$24 = rom_detect::rom_chip#10 << 2 -- vbuz1=vbum2_rol_2 + // [1071] rom_detect::$24 = rom_detect::rom_chip#10 << 2 -- vbuz1=vbum2_rol_2 lda rom_chip asl asl sta.z rom_detect__24 - // [1040] rom_sizes[rom_detect::$24] = 0 -- pduc1_derefidx_vbuz1=vbuc2 + // [1072] rom_sizes[rom_detect::$24] = 0 -- pduc1_derefidx_vbuz1=vbuc2 tay lda #0 sta rom_sizes,y @@ -6518,18 +6997,18 @@ rom_detect: { sta rom_sizes+2,y sta rom_sizes+3,y // rom_device_ids[rom_chip] = UNKNOWN - // [1041] rom_device_ids[rom_detect::rom_chip#10] = $55 -- pbuc1_derefidx_vbum1=vbuc2 + // [1073] rom_device_ids[rom_detect::rom_chip#10] = $55 -- pbuc1_derefidx_vbum1=vbuc2 lda #$55 ldy rom_chip sta rom_device_ids,y // rom_detect::@7 __b7: // rom_chip++; - // [1042] rom_detect::rom_chip#1 = ++ rom_detect::rom_chip#10 -- vbum1=_inc_vbum1 + // [1074] rom_detect::rom_chip#1 = ++ rom_detect::rom_chip#10 -- vbum1=_inc_vbum1 inc rom_chip // rom_detect::@8 // rom_detect_address += 0x80000 - // [1043] rom_detect::rom_detect_address#1 = rom_detect::rom_detect_address#10 + $80000 -- vduz1=vduz1_plus_vduc1 + // [1075] rom_detect::rom_detect_address#1 = rom_detect::rom_detect_address#10 + $80000 -- vduz1=vduz1_plus_vduc1 clc lda.z rom_detect_address adc #<$80000 @@ -6543,31 +7022,32 @@ rom_detect: { lda.z rom_detect_address+3 adc #>$80000>>$10 sta.z rom_detect_address+3 - // [1007] phi from rom_detect::@8 to rom_detect::@1 [phi:rom_detect::@8->rom_detect::@1] - // [1007] phi rom_detect::rom_chip#10 = rom_detect::rom_chip#1 [phi:rom_detect::@8->rom_detect::@1#0] -- register_copy - // [1007] phi rom_detect::rom_detect_address#10 = rom_detect::rom_detect_address#1 [phi:rom_detect::@8->rom_detect::@1#1] -- register_copy + // [1039] phi from rom_detect::@8 to rom_detect::@1 [phi:rom_detect::@8->rom_detect::@1] + // [1039] phi rom_detect::rom_chip#10 = rom_detect::rom_chip#1 [phi:rom_detect::@8->rom_detect::@1#0] -- register_copy + // [1039] phi rom_detect::rom_detect_address#10 = rom_detect::rom_detect_address#1 [phi:rom_detect::@8->rom_detect::@1#1] -- register_copy jmp __b1 // rom_detect::@5 __b5: // rom_device_names[rom_chip] = "f040" - // [1044] rom_device_names[rom_detect::$14] = rom_detect::$29 -- qbuc1_derefidx_vbum1=pbuc2 - ldy rom_detect__14 + // [1076] rom_device_names[rom_detect::$14] = rom_detect::$29 -- qbuc1_derefidx_vbuz1=pbuc2 + ldy.z rom_detect__14 lda #rom_detect__29 sta rom_device_names+1,y // rom_size_strings[rom_chip] = "512" - // [1045] rom_size_strings[rom_detect::$14] = rom_detect::$30 -- qbuc1_derefidx_vbum1=pbuc2 + // [1077] rom_size_strings[rom_detect::$14] = rom_detect::$30 -- qbuc1_derefidx_vbuz1=pbuc2 lda #rom_detect__30 sta rom_size_strings+1,y // rom_sizes[rom_chip] = 512 * 1024 - // [1046] rom_detect::$21 = rom_detect::rom_chip#10 << 2 -- vbuaa=vbum1_rol_2 + // [1078] rom_detect::$21 = rom_detect::rom_chip#10 << 2 -- vbuz1=vbum2_rol_2 lda rom_chip asl asl - // [1047] rom_sizes[rom_detect::$21] = (unsigned long)$200*$400 -- pduc1_derefidx_vbuaa=vduc2 + sta.z rom_detect__21 + // [1079] rom_sizes[rom_detect::$21] = (unsigned long)$200*$400 -- pduc1_derefidx_vbuz1=vduc2 tay lda #<$200*$400 sta rom_sizes,y @@ -6581,24 +7061,25 @@ rom_detect: { // rom_detect::@4 __b4: // rom_device_names[rom_chip] = "f020a" - // [1048] rom_device_names[rom_detect::$14] = rom_detect::$27 -- qbuc1_derefidx_vbum1=pbuc2 - ldy rom_detect__14 + // [1080] rom_device_names[rom_detect::$14] = rom_detect::$27 -- qbuc1_derefidx_vbuz1=pbuc2 + ldy.z rom_detect__14 lda #rom_detect__27 sta rom_device_names+1,y // rom_size_strings[rom_chip] = "256" - // [1049] rom_size_strings[rom_detect::$14] = rom_detect::$28 -- qbuc1_derefidx_vbum1=pbuc2 + // [1081] rom_size_strings[rom_detect::$14] = rom_detect::$28 -- qbuc1_derefidx_vbuz1=pbuc2 lda #rom_detect__28 sta rom_size_strings+1,y // rom_sizes[rom_chip] = 256 * 1024 - // [1050] rom_detect::$18 = rom_detect::rom_chip#10 << 2 -- vbuaa=vbum1_rol_2 + // [1082] rom_detect::$18 = rom_detect::rom_chip#10 << 2 -- vbum1=vbum2_rol_2 lda rom_chip asl asl - // [1051] rom_sizes[rom_detect::$18] = (unsigned long)$100*$400 -- pduc1_derefidx_vbuaa=vduc2 + sta rom_detect__18 + // [1083] rom_sizes[rom_detect::$18] = (unsigned long)$100*$400 -- pduc1_derefidx_vbum1=vduc2 tay lda #<$100*$400 sta rom_sizes,y @@ -6612,24 +7093,25 @@ rom_detect: { // rom_detect::@3 __b3: // rom_device_names[rom_chip] = "f010a" - // [1052] rom_device_names[rom_detect::$14] = rom_detect::$25 -- qbuc1_derefidx_vbum1=pbuc2 - ldy rom_detect__14 + // [1084] rom_device_names[rom_detect::$14] = rom_detect::$25 -- qbuc1_derefidx_vbuz1=pbuc2 + ldy.z rom_detect__14 lda #rom_detect__25 sta rom_device_names+1,y // rom_size_strings[rom_chip] = "128" - // [1053] rom_size_strings[rom_detect::$14] = rom_detect::$26 -- qbuc1_derefidx_vbum1=pbuc2 + // [1085] rom_size_strings[rom_detect::$14] = rom_detect::$26 -- qbuc1_derefidx_vbuz1=pbuc2 lda #rom_detect__26 sta rom_size_strings+1,y // rom_sizes[rom_chip] = 128 * 1024 - // [1054] rom_detect::$15 = rom_detect::rom_chip#10 << 2 -- vbuaa=vbum1_rol_2 + // [1086] rom_detect::$15 = rom_detect::rom_chip#10 << 2 -- vbuz1=vbum2_rol_2 lda rom_chip asl asl - // [1055] rom_sizes[rom_detect::$15] = (unsigned long)$80*$400 -- pduc1_derefidx_vbuaa=vduc2 + sta.z rom_detect__15 + // [1087] rom_sizes[rom_detect::$15] = (unsigned long)$80*$400 -- pduc1_derefidx_vbuz1=vduc2 tay lda #<$80*$400 sta rom_sizes,y @@ -6641,24 +7123,112 @@ rom_detect: { sta rom_sizes+3,y jmp __b7 .segment Data - rom_detect__25: .text "f010a" - .byte 0 - rom_detect__26: .text "128" - .byte 0 - rom_detect__27: .text "f020a" - .byte 0 - rom_detect__28: .text "256" - .byte 0 - rom_detect__29: .text "f040" - .byte 0 - rom_detect__30: .text "512" - .byte 0 - rom_detect__31: .text "----" - .byte 0 - rom_detect__32: .text "000" + rom_detect__25: .text "f010a" + .byte 0 + rom_detect__26: .text "128" + .byte 0 + rom_detect__27: .text "f020a" + .byte 0 + rom_detect__28: .text "256" + .byte 0 + rom_detect__29: .text "f040" + .byte 0 + rom_detect__30: .text "512" + .byte 0 + rom_detect__31: .text "----" + .byte 0 + rom_detect__32: .text "000" + .byte 0 + .label rom_detect__3 = fclose.sp + .label rom_detect__5 = fclose.sp + .label rom_detect__18 = rom_get_release.rom_get_release__0 + .label rom_chip = rom_get_release.return +} +.segment Code + // display_progress_text +/** + * @brief Print a block of text within the progress frame with a count of lines. + * + * @param text A pointer to an array of strings to be displayed (char**). + * @param lines The amount of lines to be displayed, starting from the top of the progress frame. + */ +// void display_progress_text(__zp($4d) char **text, __zp($37) char lines) +display_progress_text: { + .label display_progress_text__3 = $78 + .label lines = $37 + .label text = $4d + // display_progress_clear() + // [1089] call display_progress_clear + // [871] phi from display_progress_text to display_progress_clear [phi:display_progress_text->display_progress_clear] + jsr display_progress_clear + // [1090] phi from display_progress_text to display_progress_text::@1 [phi:display_progress_text->display_progress_text::@1] + // [1090] phi display_progress_text::l#2 = 0 [phi:display_progress_text->display_progress_text::@1#0] -- vbum1=vbuc1 + lda #0 + sta l + // display_progress_text::@1 + __b1: + // for(unsigned char l=0; ldisplay_progress_text::@1] + // [1090] phi display_progress_text::l#2 = display_progress_text::l#1 [phi:display_progress_text::@3->display_progress_text::@1#0] -- register_copy + jmp __b1 + .segment Data + .label l = rom_get_prefix.return +} +.segment Code + // util_wait_space +util_wait_space: { + // util_wait_key("Press [SPACE] to continue ...", " ") + // [1099] call util_wait_key + // [1212] phi from util_wait_space to util_wait_key [phi:util_wait_space->util_wait_key] + // [1212] phi util_wait_key::filter#13 = s [phi:util_wait_space->util_wait_key#0] -- pbuz1=pbuc1 + lda #s + sta.z util_wait_key.filter+1 + // [1212] phi util_wait_key::info_text#3 = util_wait_space::info_text [phi:util_wait_space->util_wait_key#1] -- pbuz1=pbuc1 + lda #info_text + sta.z util_wait_key.info_text+1 + jsr util_wait_key + // util_wait_space::@return + // } + // [1100] return + rts + .segment Data + info_text: .text "Press [SPACE] to continue ..." .byte 0 - rom_detect__14: .byte 0 - .label rom_chip = smc_flash.smc_package_committed } .segment Code // smc_read @@ -6668,380 +7238,417 @@ rom_detect: { * * @return unsigned int The amount of bytes read from SMC.BIN to be flashed. */ -// __zp($3c) unsigned int smc_read(__mem() char display_progress) +// __mem() unsigned int smc_read(__mem() char display_progress) smc_read: { - .label fp = $4b - .label return = $3c - .label smc_file_read = $72 - .label y = $ec - .label ram_ptr = $e2 - .label smc_file_size = $3c + .label fp = $62 + .label smc_file_read = $bc + .label ram_ptr = $60 /// Holds the amount of bytes actually read in the memory to be flashed. - .label progress_row_bytes = $c2 + .label progress_row_bytes = $ee // display_action_progress("Reading SMC.BIN ... (.) data, ( ) empty") - // [1057] call display_action_progress + // [1102] call display_action_progress // It is assume that one RAM bank is 0X2000 bytes. - // [812] phi from smc_read to display_action_progress [phi:smc_read->display_action_progress] - // [812] phi display_action_progress::info_text#15 = smc_read::info_text [phi:smc_read->display_action_progress#0] -- pbuz1=pbuc1 + // [857] phi from smc_read to display_action_progress [phi:smc_read->display_action_progress] + // [857] phi display_action_progress::info_text#18 = smc_read::info_text [phi:smc_read->display_action_progress#0] -- pbuz1=pbuc1 lda #info_text sta.z display_action_progress.info_text+1 jsr display_action_progress - // [1058] phi from smc_read to smc_read::@9 [phi:smc_read->smc_read::@9] - // smc_read::@9 + // [1103] phi from smc_read to smc_read::@10 [phi:smc_read->smc_read::@10] + // smc_read::@10 // textcolor(WHITE) - // [1059] call textcolor - // [700] phi from smc_read::@9 to textcolor [phi:smc_read::@9->textcolor] - // [700] phi textcolor::color#18 = WHITE [phi:smc_read::@9->textcolor#0] -- vbuxx=vbuc1 - ldx #WHITE + // [1104] call textcolor + // [745] phi from smc_read::@10 to textcolor [phi:smc_read::@10->textcolor] + // [745] phi textcolor::color#18 = WHITE [phi:smc_read::@10->textcolor#0] -- vbuz1=vbuc1 + lda #WHITE + sta.z textcolor.color jsr textcolor - // [1060] phi from smc_read::@9 to smc_read::@10 [phi:smc_read::@9->smc_read::@10] - // smc_read::@10 + // [1105] phi from smc_read::@10 to smc_read::@11 [phi:smc_read::@10->smc_read::@11] + // smc_read::@11 // gotoxy(x, y) - // [1061] call gotoxy - // [718] phi from smc_read::@10 to gotoxy [phi:smc_read::@10->gotoxy] - // [718] phi gotoxy::y#30 = PROGRESS_Y [phi:smc_read::@10->gotoxy#0] -- vbuyy=vbuc1 - ldy #PROGRESS_Y - // [718] phi gotoxy::x#30 = PROGRESS_X [phi:smc_read::@10->gotoxy#1] -- vbuxx=vbuc1 - ldx #PROGRESS_X + // [1106] call gotoxy + // [763] phi from smc_read::@11 to gotoxy [phi:smc_read::@11->gotoxy] + // [763] phi gotoxy::y#30 = PROGRESS_Y [phi:smc_read::@11->gotoxy#0] -- vbuz1=vbuc1 + lda #PROGRESS_Y + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = PROGRESS_X [phi:smc_read::@11->gotoxy#1] -- vbuz1=vbuc1 + lda #PROGRESS_X + sta.z gotoxy.x jsr gotoxy - // [1062] phi from smc_read::@10 to smc_read::@11 [phi:smc_read::@10->smc_read::@11] - // smc_read::@11 + // [1107] phi from smc_read::@11 to smc_read::@12 [phi:smc_read::@11->smc_read::@12] + // smc_read::@12 // FILE *fp = fopen("SMC.BIN", "r") - // [1063] call fopen - // [2160] phi from smc_read::@11 to fopen [phi:smc_read::@11->fopen] - // [2160] phi __errno#333 = __errno#35 [phi:smc_read::@11->fopen#0] -- register_copy - // [2160] phi fopen::pathtoken#0 = smc_read::path [phi:smc_read::@11->fopen#1] -- pbuz1=pbuc1 + // [1108] call fopen + // [2217] phi from smc_read::@12 to fopen [phi:smc_read::@12->fopen] + // [2217] phi __errno#318 = __errno#35 [phi:smc_read::@12->fopen#0] -- register_copy + // [2217] phi fopen::pathtoken#0 = smc_read::path [phi:smc_read::@12->fopen#1] -- pbuz1=pbuc1 lda #path sta.z fopen.pathtoken+1 jsr fopen // FILE *fp = fopen("SMC.BIN", "r") - // [1064] fopen::return#3 = fopen::return#2 - // smc_read::@12 - // [1065] smc_read::fp#0 = fopen::return#3 -- pssz1=pssz2 + // [1109] fopen::return#3 = fopen::return#2 + // smc_read::@13 + // [1110] smc_read::fp#0 = fopen::return#3 -- pssz1=pssz2 lda.z fopen.return sta.z fp lda.z fopen.return+1 sta.z fp+1 // if (fp) - // [1066] if((struct $2 *)0==smc_read::fp#0) goto smc_read::@1 -- pssc1_eq_pssz1_then_la1 + // [1111] if((struct $2 *)0==smc_read::fp#0) goto smc_read::@1 -- pssc1_eq_pssz1_then_la1 lda.z fp cmp #<0 bne !+ lda.z fp+1 cmp #>0 - beq __b4 + beq __b2 !: - // [1067] phi from smc_read::@12 to smc_read::@2 [phi:smc_read::@12->smc_read::@2] - // [1067] phi smc_read::y#10 = PROGRESS_Y [phi:smc_read::@12->smc_read::@2#0] -- vbuz1=vbuc1 + // smc_read::@2 + // fgets(smc_rom_releases, 32, fp) + // [1112] fgets::stream#0 = smc_read::fp#0 -- pssm1=pssz2 + lda.z fp + sta fgets.stream + lda.z fp+1 + sta fgets.stream+1 + // [1113] call fgets + // [2298] phi from smc_read::@2 to fgets [phi:smc_read::@2->fgets] + // [2298] phi fgets::ptr#13 = smc_rom_releases [phi:smc_read::@2->fgets#0] -- pbuz1=pbuc1 + lda #smc_rom_releases + sta.z fgets.ptr+1 + // [2298] phi fgets::size#11 = $20 [phi:smc_read::@2->fgets#1] -- vwuz1=vbuc1 + lda #<$20 + sta.z fgets.size + lda #>$20 + sta.z fgets.size+1 + // [2298] phi fgets::stream#3 = fgets::stream#0 [phi:smc_read::@2->fgets#2] -- register_copy + jsr fgets + // fgets(smc_rom_releases, 32, fp) + // [1114] fgets::return#5 = fgets::return#1 + // smc_read::@14 + // smc_file_read = fgets(smc_rom_releases, 32, fp) + // [1115] smc_read::smc_file_read#1 = fgets::return#5 + // if(smc_file_read) + // [1116] if(0==smc_read::smc_file_read#1) goto smc_read::@1 -- 0_eq_vwuz1_then_la1 + lda.z smc_file_read + ora.z smc_file_read+1 + beq __b2 + // [1117] phi from smc_read::@14 to smc_read::@3 [phi:smc_read::@14->smc_read::@3] + // [1117] phi smc_read::y#10 = PROGRESS_Y [phi:smc_read::@14->smc_read::@3#0] -- vbum1=vbuc1 lda #PROGRESS_Y - sta.z y - // [1067] phi smc_read::progress_row_bytes#10 = 0 [phi:smc_read::@12->smc_read::@2#1] -- vwuz1=vwuc1 + sta y + // [1117] phi smc_read::progress_row_bytes#10 = 0 [phi:smc_read::@14->smc_read::@3#1] -- vwuz1=vwuc1 lda #<0 sta.z progress_row_bytes sta.z progress_row_bytes+1 - // [1067] phi smc_read::smc_file_size#11 = 0 [phi:smc_read::@12->smc_read::@2#2] -- vwuz1=vwuc1 - sta.z smc_file_size - sta.z smc_file_size+1 - // [1067] phi smc_read::ram_ptr#10 = (char *)$7800 [phi:smc_read::@12->smc_read::@2#3] -- pbuz1=pbuc1 + // [1117] phi smc_read::smc_file_size#10 = 0 [phi:smc_read::@14->smc_read::@3#2] -- vwum1=vwuc1 + sta smc_file_size + sta smc_file_size+1 + // [1117] phi smc_read::ram_ptr#10 = (char *)$7800 [phi:smc_read::@14->smc_read::@3#3] -- pbuz1=pbuc1 lda #<$7800 sta.z ram_ptr lda #>$7800 sta.z ram_ptr+1 // We read block_size bytes at a time, and each block_size bytes we plot a dot. // Every r bytes we move to the next line. - // smc_read::@2 - __b2: + // smc_read::@3 + __b3: // fgets(ram_ptr, SMC_PROGRESS_CELL, fp) - // [1068] fgets::ptr#2 = smc_read::ram_ptr#10 -- pbuz1=pbuz2 + // [1118] fgets::ptr#3 = smc_read::ram_ptr#10 -- pbuz1=pbuz2 lda.z ram_ptr sta.z fgets.ptr lda.z ram_ptr+1 sta.z fgets.ptr+1 - // [1069] fgets::stream#0 = smc_read::fp#0 -- pssz1=pssz2 + // [1119] fgets::stream#1 = smc_read::fp#0 -- pssm1=pssz2 lda.z fp - sta.z fgets.stream + sta fgets.stream lda.z fp+1 - sta.z fgets.stream+1 - // [1070] call fgets - // [2241] phi from smc_read::@2 to fgets [phi:smc_read::@2->fgets] - // [2241] phi fgets::ptr#12 = fgets::ptr#2 [phi:smc_read::@2->fgets#0] -- register_copy - // [2241] phi fgets::size#10 = SMC_PROGRESS_CELL [phi:smc_read::@2->fgets#1] -- vwuz1=vbuc1 + sta fgets.stream+1 + // [1120] call fgets + // [2298] phi from smc_read::@3 to fgets [phi:smc_read::@3->fgets] + // [2298] phi fgets::ptr#13 = fgets::ptr#3 [phi:smc_read::@3->fgets#0] -- register_copy + // [2298] phi fgets::size#11 = SMC_PROGRESS_CELL [phi:smc_read::@3->fgets#1] -- vwuz1=vbuc1 lda #SMC_PROGRESS_CELL sta.z fgets.size+1 - // [2241] phi fgets::stream#2 = fgets::stream#0 [phi:smc_read::@2->fgets#2] -- register_copy + // [2298] phi fgets::stream#3 = fgets::stream#1 [phi:smc_read::@3->fgets#2] -- register_copy jsr fgets // fgets(ram_ptr, SMC_PROGRESS_CELL, fp) - // [1071] fgets::return#5 = fgets::return#1 - // smc_read::@13 + // [1121] fgets::return#10 = fgets::return#1 + // smc_read::@15 // smc_file_read = fgets(ram_ptr, SMC_PROGRESS_CELL, fp) - // [1072] smc_read::smc_file_read#1 = fgets::return#5 + // [1122] smc_read::smc_file_read#10 = fgets::return#10 // while (smc_file_read = fgets(ram_ptr, SMC_PROGRESS_CELL, fp)) - // [1073] if(0!=smc_read::smc_file_read#1) goto smc_read::@3 -- 0_neq_vwuz1_then_la1 + // [1123] if(0!=smc_read::smc_file_read#10) goto smc_read::@4 -- 0_neq_vwuz1_then_la1 lda.z smc_file_read ora.z smc_file_read+1 - bne __b3 - // smc_read::@4 + bne __b4 + // smc_read::@5 // fclose(fp) - // [1074] fclose::stream#0 = smc_read::fp#0 - // [1075] call fclose - // [2295] phi from smc_read::@4 to fclose [phi:smc_read::@4->fclose] - // [2295] phi fclose::stream#2 = fclose::stream#0 [phi:smc_read::@4->fclose#0] -- register_copy + // [1124] fclose::stream#0 = smc_read::fp#0 + // [1125] call fclose + // [2352] phi from smc_read::@5 to fclose [phi:smc_read::@5->fclose] + // [2352] phi fclose::stream#2 = fclose::stream#0 [phi:smc_read::@5->fclose#0] -- register_copy jsr fclose - // [1076] phi from smc_read::@4 to smc_read::@1 [phi:smc_read::@4->smc_read::@1] - // [1076] phi smc_read::return#0 = smc_read::smc_file_size#11 [phi:smc_read::@4->smc_read::@1#0] -- register_copy + // [1126] phi from smc_read::@5 to smc_read::@1 [phi:smc_read::@5->smc_read::@1] + // [1126] phi smc_read::return#0 = smc_read::smc_file_size#10 [phi:smc_read::@5->smc_read::@1#0] -- register_copy rts - // [1076] phi from smc_read::@12 to smc_read::@1 [phi:smc_read::@12->smc_read::@1] - __b4: - // [1076] phi smc_read::return#0 = 0 [phi:smc_read::@12->smc_read::@1#0] -- vwuz1=vwuc1 + // [1126] phi from smc_read::@13 smc_read::@14 to smc_read::@1 [phi:smc_read::@13/smc_read::@14->smc_read::@1] + __b2: + // [1126] phi smc_read::return#0 = 0 [phi:smc_read::@13/smc_read::@14->smc_read::@1#0] -- vwum1=vwuc1 lda #<0 - sta.z return - sta.z return+1 + sta return + sta return+1 // smc_read::@1 // smc_read::@return // } - // [1077] return + // [1127] return rts - // [1078] phi from smc_read::@13 to smc_read::@3 [phi:smc_read::@13->smc_read::@3] - // smc_read::@3 - __b3: + // [1128] phi from smc_read::@15 to smc_read::@4 [phi:smc_read::@15->smc_read::@4] + // smc_read::@4 + __b4: // sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr) - // [1079] call snprintf_init - // [982] phi from smc_read::@3 to snprintf_init [phi:smc_read::@3->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:smc_read::@3->snprintf_init#0] -- pbuz1=pbuc1 + // [1129] call snprintf_init + // [1014] phi from smc_read::@4 to snprintf_init [phi:smc_read::@4->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:smc_read::@4->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [1080] phi from smc_read::@3 to smc_read::@14 [phi:smc_read::@3->smc_read::@14] - // smc_read::@14 + // [1130] phi from smc_read::@4 to smc_read::@16 [phi:smc_read::@4->smc_read::@16] + // smc_read::@16 // sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr) - // [1081] call printf_str - // [987] phi from smc_read::@14 to printf_str [phi:smc_read::@14->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_read::@14->printf_str#0] -- pprz1=pprc1 + // [1131] call printf_str + // [1019] phi from smc_read::@16 to printf_str [phi:smc_read::@16->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_read::@16->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_read::s [phi:smc_read::@14->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_read::s [phi:smc_read::@16->printf_str#1] -- pbuz1=pbuc1 lda #s sta.z printf_str.s+1 jsr printf_str - // smc_read::@15 + // smc_read::@17 // sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr) - // [1082] printf_uint::uvalue#0 = smc_read::smc_file_read#1 -- vwuz1=vwuz2 + // [1132] printf_uint::uvalue#0 = smc_read::smc_file_read#10 -- vwuz1=vwuz2 lda.z smc_file_read sta.z printf_uint.uvalue lda.z smc_file_read+1 sta.z printf_uint.uvalue+1 - // [1083] call printf_uint - // [996] phi from smc_read::@15 to printf_uint [phi:smc_read::@15->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_read::@15->printf_uint#0] -- vbuz1=vbuc1 + // [1133] call printf_uint + // [1028] phi from smc_read::@17 to printf_uint [phi:smc_read::@17->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_read::@17->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 5 [phi:smc_read::@15->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 5 [phi:smc_read::@17->printf_uint#1] -- vbuz1=vbuc1 lda #5 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_read::@15->printf_uint#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#0 [phi:smc_read::@15->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_read::@17->printf_uint#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#0 [phi:smc_read::@17->printf_uint#3] -- register_copy jsr printf_uint - // [1084] phi from smc_read::@15 to smc_read::@16 [phi:smc_read::@15->smc_read::@16] - // smc_read::@16 + // [1134] phi from smc_read::@17 to smc_read::@18 [phi:smc_read::@17->smc_read::@18] + // smc_read::@18 // sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr) - // [1085] call printf_str - // [987] phi from smc_read::@16 to printf_str [phi:smc_read::@16->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_read::@16->printf_str#0] -- pprz1=pprc1 + // [1135] call printf_str + // [1019] phi from smc_read::@18 to printf_str [phi:smc_read::@18->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_read::@18->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s1 [phi:smc_read::@16->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s1 [phi:smc_read::@18->printf_str#1] -- pbuz1=pbuc1 lda #s1 sta.z printf_str.s+1 jsr printf_str - // smc_read::@17 + // smc_read::@19 // sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr) - // [1086] printf_uint::uvalue#1 = smc_read::smc_file_size#11 -- vwuz1=vwuz2 - lda.z smc_file_size + // [1136] printf_uint::uvalue#1 = smc_read::smc_file_size#10 -- vwuz1=vwum2 + lda smc_file_size sta.z printf_uint.uvalue - lda.z smc_file_size+1 + lda smc_file_size+1 sta.z printf_uint.uvalue+1 - // [1087] call printf_uint - // [996] phi from smc_read::@17 to printf_uint [phi:smc_read::@17->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_read::@17->printf_uint#0] -- vbuz1=vbuc1 + // [1137] call printf_uint + // [1028] phi from smc_read::@19 to printf_uint [phi:smc_read::@19->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_read::@19->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 5 [phi:smc_read::@17->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 5 [phi:smc_read::@19->printf_uint#1] -- vbuz1=vbuc1 lda #5 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_read::@17->printf_uint#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#1 [phi:smc_read::@17->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_read::@19->printf_uint#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#1 [phi:smc_read::@19->printf_uint#3] -- register_copy jsr printf_uint - // [1088] phi from smc_read::@17 to smc_read::@18 [phi:smc_read::@17->smc_read::@18] - // smc_read::@18 + // [1138] phi from smc_read::@19 to smc_read::@20 [phi:smc_read::@19->smc_read::@20] + // smc_read::@20 // sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr) - // [1089] call printf_str - // [987] phi from smc_read::@18 to printf_str [phi:smc_read::@18->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_read::@18->printf_str#0] -- pprz1=pprc1 + // [1139] call printf_str + // [1019] phi from smc_read::@20 to printf_str [phi:smc_read::@20->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_read::@20->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s2 [phi:smc_read::@18->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s2 [phi:smc_read::@20->printf_str#1] -- pbuz1=pbuc1 lda #s2 sta.z printf_str.s+1 jsr printf_str - // [1090] phi from smc_read::@18 to smc_read::@19 [phi:smc_read::@18->smc_read::@19] - // smc_read::@19 + // [1140] phi from smc_read::@20 to smc_read::@21 [phi:smc_read::@20->smc_read::@21] + // smc_read::@21 // sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr) - // [1091] call printf_uint - // [996] phi from smc_read::@19 to printf_uint [phi:smc_read::@19->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_read::@19->printf_uint#0] -- vbuz1=vbuc1 + // [1141] call printf_uint + // [1028] phi from smc_read::@21 to printf_uint [phi:smc_read::@21->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_read::@21->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 2 [phi:smc_read::@19->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 2 [phi:smc_read::@21->printf_uint#1] -- vbuz1=vbuc1 lda #2 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_read::@19->printf_uint#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [996] phi printf_uint::uvalue#15 = 0 [phi:smc_read::@19->printf_uint#3] -- vwuz1=vbuc1 + // [1028] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_read::@21->printf_uint#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = 0 [phi:smc_read::@21->printf_uint#3] -- vwuz1=vbuc1 lda #<0 sta.z printf_uint.uvalue sta.z printf_uint.uvalue+1 jsr printf_uint - // [1092] phi from smc_read::@19 to smc_read::@20 [phi:smc_read::@19->smc_read::@20] - // smc_read::@20 + // [1142] phi from smc_read::@21 to smc_read::@22 [phi:smc_read::@21->smc_read::@22] + // smc_read::@22 // sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr) - // [1093] call printf_str - // [987] phi from smc_read::@20 to printf_str [phi:smc_read::@20->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_read::@20->printf_str#0] -- pprz1=pprc1 + // [1143] call printf_str + // [1019] phi from smc_read::@22 to printf_str [phi:smc_read::@22->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_read::@22->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s3 [phi:smc_read::@20->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s3 [phi:smc_read::@22->printf_str#1] -- pbuz1=pbuc1 lda #s3 sta.z printf_str.s+1 jsr printf_str - // smc_read::@21 + // smc_read::@23 // sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr) - // [1094] printf_uint::uvalue#3 = (unsigned int)smc_read::ram_ptr#10 -- vwuz1=vwuz2 + // [1144] printf_uint::uvalue#3 = (unsigned int)smc_read::ram_ptr#10 -- vwuz1=vwuz2 lda.z ram_ptr sta.z printf_uint.uvalue lda.z ram_ptr+1 sta.z printf_uint.uvalue+1 - // [1095] call printf_uint - // [996] phi from smc_read::@21 to printf_uint [phi:smc_read::@21->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_read::@21->printf_uint#0] -- vbuz1=vbuc1 + // [1145] call printf_uint + // [1028] phi from smc_read::@23 to printf_uint [phi:smc_read::@23->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_read::@23->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 4 [phi:smc_read::@21->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 4 [phi:smc_read::@23->printf_uint#1] -- vbuz1=vbuc1 lda #4 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_read::@21->printf_uint#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#3 [phi:smc_read::@21->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_read::@23->printf_uint#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#3 [phi:smc_read::@23->printf_uint#3] -- register_copy jsr printf_uint - // [1096] phi from smc_read::@21 to smc_read::@22 [phi:smc_read::@21->smc_read::@22] - // smc_read::@22 + // [1146] phi from smc_read::@23 to smc_read::@24 [phi:smc_read::@23->smc_read::@24] + // smc_read::@24 // sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr) - // [1097] call printf_str - // [987] phi from smc_read::@22 to printf_str [phi:smc_read::@22->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_read::@22->printf_str#0] -- pprz1=pprc1 + // [1147] call printf_str + // [1019] phi from smc_read::@24 to printf_str [phi:smc_read::@24->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_read::@24->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s4 [phi:smc_read::@22->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s4 [phi:smc_read::@24->printf_str#1] -- pbuz1=pbuc1 lda #s4 sta.z printf_str.s+1 jsr printf_str - // smc_read::@23 + // smc_read::@25 // sprintf(info_text, "Reading SMC.BIN:%05x/%05x -> RAM:%02x:%04p ...", smc_file_read, smc_file_size, 0, ram_ptr) - // [1098] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1148] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1099] callexecute snputc -- call_vprc1 + // [1149] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [1101] call display_action_text - // [1176] phi from smc_read::@23 to display_action_text [phi:smc_read::@23->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:smc_read::@23->display_action_text#0] -- pbuz1=pbuc1 + // [1151] call display_action_text + // [1262] phi from smc_read::@25 to display_action_text [phi:smc_read::@25->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:smc_read::@25->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text sta.z display_action_text.info_text+1 jsr display_action_text - // smc_read::@24 + // smc_read::@26 // if (progress_row_bytes == SMC_PROGRESS_ROW) - // [1102] if(smc_read::progress_row_bytes#10!=SMC_PROGRESS_ROW) goto smc_read::@5 -- vwuz1_neq_vwuc1_then_la1 + // [1152] if(smc_read::progress_row_bytes#10!=SMC_PROGRESS_ROW) goto smc_read::@6 -- vwuz1_neq_vwuc1_then_la1 lda.z progress_row_bytes+1 cmp #>SMC_PROGRESS_ROW - bne __b5 + bne __b6 lda.z progress_row_bytes cmp #gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#20 [phi:smc_read::@7->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = PROGRESS_X [phi:smc_read::@7->gotoxy#1] -- vbuxx=vbuc1 - ldx #PROGRESS_X + // [1154] gotoxy::y#20 = smc_read::y#1 -- vbuz1=vbum2 + lda y + sta.z gotoxy.y + // [1155] call gotoxy + // [763] phi from smc_read::@8 to gotoxy [phi:smc_read::@8->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#20 [phi:smc_read::@8->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = PROGRESS_X [phi:smc_read::@8->gotoxy#1] -- vbuz1=vbuc1 + lda #PROGRESS_X + sta.z gotoxy.x jsr gotoxy - // [1106] phi from smc_read::@7 to smc_read::@5 [phi:smc_read::@7->smc_read::@5] - // [1106] phi smc_read::y#20 = smc_read::y#1 [phi:smc_read::@7->smc_read::@5#0] -- register_copy - // [1106] phi smc_read::progress_row_bytes#4 = 0 [phi:smc_read::@7->smc_read::@5#1] -- vwuz1=vbuc1 + // [1156] phi from smc_read::@8 to smc_read::@6 [phi:smc_read::@8->smc_read::@6] + // [1156] phi smc_read::y#20 = smc_read::y#1 [phi:smc_read::@8->smc_read::@6#0] -- register_copy + // [1156] phi smc_read::progress_row_bytes#4 = 0 [phi:smc_read::@8->smc_read::@6#1] -- vwuz1=vbuc1 lda #<0 sta.z progress_row_bytes sta.z progress_row_bytes+1 - // [1106] phi from smc_read::@24 to smc_read::@5 [phi:smc_read::@24->smc_read::@5] - // [1106] phi smc_read::y#20 = smc_read::y#10 [phi:smc_read::@24->smc_read::@5#0] -- register_copy - // [1106] phi smc_read::progress_row_bytes#4 = smc_read::progress_row_bytes#10 [phi:smc_read::@24->smc_read::@5#1] -- register_copy - // smc_read::@5 - __b5: + // [1156] phi from smc_read::@26 to smc_read::@6 [phi:smc_read::@26->smc_read::@6] + // [1156] phi smc_read::y#20 = smc_read::y#10 [phi:smc_read::@26->smc_read::@6#0] -- register_copy + // [1156] phi smc_read::progress_row_bytes#4 = smc_read::progress_row_bytes#10 [phi:smc_read::@26->smc_read::@6#1] -- register_copy + // smc_read::@6 + __b6: // if(display_progress) - // [1107] if(0==smc_read::display_progress#19) goto smc_read::@6 -- 0_eq_vbum1_then_la1 + // [1157] if(0==smc_read::display_progress#19) goto smc_read::@7 -- 0_eq_vbum1_then_la1 lda display_progress - beq __b6 - // smc_read::@8 + beq __b7 + // smc_read::@9 // cputc('.') - // [1108] stackpush(char) = '.' -- _stackpushbyte_=vbuc1 + // [1158] stackpush(char) = '.' -- _stackpushbyte_=vbuc1 lda #'.' pha - // [1109] callexecute cputc -- call_vprc1 + // [1159] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla - // smc_read::@6 - __b6: + // smc_read::@7 + __b7: // ram_ptr += smc_file_read - // [1111] smc_read::ram_ptr#1 = smc_read::ram_ptr#10 + smc_read::smc_file_read#1 -- pbuz1=pbuz1_plus_vwuz2 + // [1161] smc_read::ram_ptr#1 = smc_read::ram_ptr#10 + smc_read::smc_file_read#10 -- pbuz1=pbuz1_plus_vwuz2 clc lda.z ram_ptr adc.z smc_file_read @@ -7050,16 +7657,16 @@ smc_read: { adc.z smc_file_read+1 sta.z ram_ptr+1 // smc_file_size += smc_file_read - // [1112] smc_read::smc_file_size#1 = smc_read::smc_file_size#11 + smc_read::smc_file_read#1 -- vwuz1=vwuz1_plus_vwuz2 + // [1162] smc_read::smc_file_size#1 = smc_read::smc_file_size#10 + smc_read::smc_file_read#10 -- vwum1=vwum1_plus_vwuz2 clc - lda.z smc_file_size + lda smc_file_size adc.z smc_file_read - sta.z smc_file_size - lda.z smc_file_size+1 + sta smc_file_size + lda smc_file_size+1 adc.z smc_file_read+1 - sta.z smc_file_size+1 + sta smc_file_size+1 // progress_row_bytes += smc_file_read - // [1113] smc_read::progress_row_bytes#2 = smc_read::progress_row_bytes#4 + smc_read::smc_file_read#1 -- vwuz1=vwuz1_plus_vwuz2 + // [1163] smc_read::progress_row_bytes#2 = smc_read::progress_row_bytes#4 + smc_read::smc_file_read#10 -- vwuz1=vwuz1_plus_vwuz2 clc lda.z progress_row_bytes adc.z smc_file_read @@ -7067,12 +7674,12 @@ smc_read: { lda.z progress_row_bytes+1 adc.z smc_file_read+1 sta.z progress_row_bytes+1 - // [1067] phi from smc_read::@6 to smc_read::@2 [phi:smc_read::@6->smc_read::@2] - // [1067] phi smc_read::y#10 = smc_read::y#20 [phi:smc_read::@6->smc_read::@2#0] -- register_copy - // [1067] phi smc_read::progress_row_bytes#10 = smc_read::progress_row_bytes#2 [phi:smc_read::@6->smc_read::@2#1] -- register_copy - // [1067] phi smc_read::smc_file_size#11 = smc_read::smc_file_size#1 [phi:smc_read::@6->smc_read::@2#2] -- register_copy - // [1067] phi smc_read::ram_ptr#10 = smc_read::ram_ptr#1 [phi:smc_read::@6->smc_read::@2#3] -- register_copy - jmp __b2 + // [1117] phi from smc_read::@7 to smc_read::@3 [phi:smc_read::@7->smc_read::@3] + // [1117] phi smc_read::y#10 = smc_read::y#20 [phi:smc_read::@7->smc_read::@3#0] -- register_copy + // [1117] phi smc_read::progress_row_bytes#10 = smc_read::progress_row_bytes#2 [phi:smc_read::@7->smc_read::@3#1] -- register_copy + // [1117] phi smc_read::smc_file_size#10 = smc_read::smc_file_size#1 [phi:smc_read::@7->smc_read::@3#2] -- register_copy + // [1117] phi smc_read::ram_ptr#10 = smc_read::ram_ptr#1 [phi:smc_read::@7->smc_read::@3#3] -- register_copy + jmp __b3 .segment Data info_text: .text "Reading SMC.BIN ... (.) data, ( ) empty" .byte 0 @@ -7080,7 +7687,10 @@ smc_read: { .byte 0 s: .text "Reading SMC.BIN:" .byte 0 - .label display_progress = smc_flash.smc_bytes_checksum + .label return = smc_flash.smc_package_flashed + .label y = smc_supported_rom.return + .label smc_file_size = smc_flash.smc_package_flashed + .label display_progress = main.check_status_cx16_rom2_check_status_rom1_main__0 } .segment Code // rom_get_release @@ -7091,34 +7701,40 @@ smc_read: { * @param release The raw release number. * @return unsigned char The release potentially taken 2's complement. */ -// __register(X) char rom_get_release(__register(X) char release) +// __mem() char rom_get_release(__mem() char release) rom_get_release: { // release & 0x80 - // [1115] rom_get_release::$0 = rom_get_release::release#4 & $80 -- vbuaa=vbuxx_band_vbuc1 - txa - and #$80 + // [1165] rom_get_release::$0 = rom_get_release::release#4 & $80 -- vbum1=vbum2_band_vbuc1 + lda #$80 + and release + sta rom_get_release__0 // if(release & 0x80) - // [1116] if(0==rom_get_release::$0) goto rom_get_release::@1 -- 0_eq_vbuaa_then_la1 - cmp #0 + // [1166] if(0==rom_get_release::$0) goto rom_get_release::@1 -- 0_eq_vbum1_then_la1 beq __b1 // rom_get_release::@2 // ~release - // [1117] rom_get_release::$2 = ~ rom_get_release::release#4 -- vbuaa=_bnot_vbuxx - txa + // [1167] rom_get_release::$2 = ~ rom_get_release::release#4 -- vbum1=_bnot_vbum1 + lda rom_get_release__2 eor #$ff + sta rom_get_release__2 // release = ~release + 1 - // [1118] rom_get_release::release#0 = rom_get_release::$2 + 1 -- vbuxx=vbuaa_plus_1 - tax - inx - // [1119] phi from rom_get_release rom_get_release::@2 to rom_get_release::@1 [phi:rom_get_release/rom_get_release::@2->rom_get_release::@1] - // [1119] phi rom_get_release::return#0 = rom_get_release::release#4 [phi:rom_get_release/rom_get_release::@2->rom_get_release::@1#0] -- register_copy + // [1168] rom_get_release::release#0 = rom_get_release::$2 + 1 -- vbum1=vbum1_plus_1 + inc release + // [1169] phi from rom_get_release rom_get_release::@2 to rom_get_release::@1 [phi:rom_get_release/rom_get_release::@2->rom_get_release::@1] + // [1169] phi rom_get_release::return#0 = rom_get_release::release#4 [phi:rom_get_release/rom_get_release::@2->rom_get_release::@1#0] -- register_copy // rom_get_release::@1 __b1: // rom_get_release::@return // } - // [1120] return + // [1170] return rts + .segment Data + rom_get_release__0: .byte 0 + .label rom_get_release__2 = return + return: .byte 0 + .label release = return } +.segment Code // rom_get_prefix /** * @brief Determine the prefix of the ROM release number. @@ -7128,107 +7744,121 @@ rom_get_release: { * @param release The release potentially taken 2's complement. * @return unsigned char 'r' if the release is official, 'p' if the release is inofficial of 0xFF. */ -// __register(A) char rom_get_prefix(__register(A) char release) +// __mem() char rom_get_prefix(__zp($2f) char release) rom_get_prefix: { + .label rom_get_prefix__2 = $2f + .label release = $2f // if(release == 0xFF) - // [1122] if(rom_get_prefix::release#4!=$ff) goto rom_get_prefix::@1 -- vbuaa_neq_vbuc1_then_la1 - cmp #$ff + // [1172] if(rom_get_prefix::release#4!=$ff) goto rom_get_prefix::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$ff + cmp.z release bne __b3 - // [1123] phi from rom_get_prefix to rom_get_prefix::@3 [phi:rom_get_prefix->rom_get_prefix::@3] + // [1173] phi from rom_get_prefix to rom_get_prefix::@3 [phi:rom_get_prefix->rom_get_prefix::@3] // rom_get_prefix::@3 - // [1124] phi from rom_get_prefix::@3 to rom_get_prefix::@1 [phi:rom_get_prefix::@3->rom_get_prefix::@1] - // [1124] phi rom_get_prefix::prefix#4 = 'p' [phi:rom_get_prefix::@3->rom_get_prefix::@1#0] -- vbuxx=vbuc1 - ldx #'p' + // [1174] phi from rom_get_prefix::@3 to rom_get_prefix::@1 [phi:rom_get_prefix::@3->rom_get_prefix::@1] + // [1174] phi rom_get_prefix::prefix#4 = 'p' [phi:rom_get_prefix::@3->rom_get_prefix::@1#0] -- vbum1=vbuc1 + lda #'p' + sta prefix jmp __b1 - // [1124] phi from rom_get_prefix to rom_get_prefix::@1 [phi:rom_get_prefix->rom_get_prefix::@1] + // [1174] phi from rom_get_prefix to rom_get_prefix::@1 [phi:rom_get_prefix->rom_get_prefix::@1] __b3: - // [1124] phi rom_get_prefix::prefix#4 = 'r' [phi:rom_get_prefix->rom_get_prefix::@1#0] -- vbuxx=vbuc1 - ldx #'r' + // [1174] phi rom_get_prefix::prefix#4 = 'r' [phi:rom_get_prefix->rom_get_prefix::@1#0] -- vbum1=vbuc1 + lda #'r' + sta prefix // rom_get_prefix::@1 __b1: // release & 0x80 - // [1125] rom_get_prefix::$2 = rom_get_prefix::release#4 & $80 -- vbuaa=vbuaa_band_vbuc1 - and #$80 + // [1175] rom_get_prefix::$2 = rom_get_prefix::release#4 & $80 -- vbuz1=vbuz1_band_vbuc1 + lda #$80 + and.z rom_get_prefix__2 + sta.z rom_get_prefix__2 // if(release & 0x80) - // [1126] if(0==rom_get_prefix::$2) goto rom_get_prefix::@4 -- 0_eq_vbuaa_then_la1 - cmp #0 + // [1176] if(0==rom_get_prefix::$2) goto rom_get_prefix::@4 -- 0_eq_vbuz1_then_la1 beq __b2 - // [1128] phi from rom_get_prefix::@1 to rom_get_prefix::@2 [phi:rom_get_prefix::@1->rom_get_prefix::@2] - // [1128] phi rom_get_prefix::return#0 = 'p' [phi:rom_get_prefix::@1->rom_get_prefix::@2#0] -- vbuxx=vbuc1 - ldx #'p' + // [1178] phi from rom_get_prefix::@1 to rom_get_prefix::@2 [phi:rom_get_prefix::@1->rom_get_prefix::@2] + // [1178] phi rom_get_prefix::return#0 = 'p' [phi:rom_get_prefix::@1->rom_get_prefix::@2#0] -- vbum1=vbuc1 + lda #'p' + sta return rts - // [1127] phi from rom_get_prefix::@1 to rom_get_prefix::@4 [phi:rom_get_prefix::@1->rom_get_prefix::@4] + // [1177] phi from rom_get_prefix::@1 to rom_get_prefix::@4 [phi:rom_get_prefix::@1->rom_get_prefix::@4] // rom_get_prefix::@4 - // [1128] phi from rom_get_prefix::@4 to rom_get_prefix::@2 [phi:rom_get_prefix::@4->rom_get_prefix::@2] - // [1128] phi rom_get_prefix::return#0 = rom_get_prefix::prefix#4 [phi:rom_get_prefix::@4->rom_get_prefix::@2#0] -- register_copy + // [1178] phi from rom_get_prefix::@4 to rom_get_prefix::@2 [phi:rom_get_prefix::@4->rom_get_prefix::@2] + // [1178] phi rom_get_prefix::return#0 = rom_get_prefix::prefix#4 [phi:rom_get_prefix::@4->rom_get_prefix::@2#0] -- register_copy // rom_get_prefix::@2 __b2: // rom_get_prefix::@return // } - // [1129] return + // [1179] return rts + .segment Data + return: .byte 0 + // If the release is 0xFF, then the release is a preview. + // If bit 7 of the release is set, then the release is a preview. + .label prefix = return } +.segment Code // printf_string // Print a string value using a specific format // Handles justification and min length -// void printf_string(__zp($55) void (*putc)(char), __zp($69) char *str, __zp($bb) char format_min_length, __zp($c0) char format_justify_left) +// void printf_string(__zp($4f) void (*putc)(char), __zp($64) char *str, __zp($e2) char format_min_length, __zp($ed) char format_justify_left) printf_string: { - .label printf_string__9 = $43 - .label padding = $bb - .label str = $69 - .label str_1 = $f4 - .label format_min_length = $bb - .label format_justify_left = $c0 - .label putc = $55 + .label printf_string__9 = $55 + .label len = $2c + .label padding = $e2 + .label str = $64 + .label format_min_length = $e2 + .label format_justify_left = $ed + .label putc = $4f // if(format.min_length) - // [1131] if(0==printf_string::format_min_length#22) goto printf_string::@1 -- 0_eq_vbuz1_then_la1 + // [1181] if(0==printf_string::format_min_length#22) goto printf_string::@1 -- 0_eq_vbuz1_then_la1 lda.z format_min_length beq __b3 // printf_string::@3 // strlen(str) - // [1132] strlen::str#3 = printf_string::str#22 -- pbuz1=pbuz2 + // [1182] strlen::str#3 = printf_string::str#22 -- pbuz1=pbuz2 lda.z str sta.z strlen.str lda.z str+1 sta.z strlen.str+1 - // [1133] call strlen - // [2323] phi from printf_string::@3 to strlen [phi:printf_string::@3->strlen] - // [2323] phi strlen::str#8 = strlen::str#3 [phi:printf_string::@3->strlen#0] -- register_copy + // [1183] call strlen + // [2380] phi from printf_string::@3 to strlen [phi:printf_string::@3->strlen] + // [2380] phi strlen::str#8 = strlen::str#3 [phi:printf_string::@3->strlen#0] -- register_copy jsr strlen // strlen(str) - // [1134] strlen::return#10 = strlen::len#2 + // [1184] strlen::return#10 = strlen::len#2 // printf_string::@6 - // [1135] printf_string::$9 = strlen::return#10 + // [1185] printf_string::$9 = strlen::return#10 // signed char len = (signed char)strlen(str) - // [1136] printf_string::len#0 = (signed char)printf_string::$9 -- vbsaa=_sbyte_vwuz1 + // [1186] printf_string::len#0 = (signed char)printf_string::$9 -- vbsz1=_sbyte_vwuz2 lda.z printf_string__9 + sta.z len // padding = (signed char)format.min_length - len - // [1137] printf_string::padding#1 = (signed char)printf_string::format_min_length#22 - printf_string::len#0 -- vbsz1=vbsz1_minus_vbsaa - eor #$ff + // [1187] printf_string::padding#1 = (signed char)printf_string::format_min_length#22 - printf_string::len#0 -- vbsz1=vbsz1_minus_vbsz2 + lda.z padding sec - adc.z padding + sbc.z len sta.z padding // if(padding<0) - // [1138] if(printf_string::padding#1>=0) goto printf_string::@10 -- vbsz1_ge_0_then_la1 + // [1188] if(printf_string::padding#1>=0) goto printf_string::@10 -- vbsz1_ge_0_then_la1 cmp #0 bpl __b1 - // [1140] phi from printf_string printf_string::@6 to printf_string::@1 [phi:printf_string/printf_string::@6->printf_string::@1] + // [1190] phi from printf_string printf_string::@6 to printf_string::@1 [phi:printf_string/printf_string::@6->printf_string::@1] __b3: - // [1140] phi printf_string::padding#3 = 0 [phi:printf_string/printf_string::@6->printf_string::@1#0] -- vbsz1=vbsc1 + // [1190] phi printf_string::padding#3 = 0 [phi:printf_string/printf_string::@6->printf_string::@1#0] -- vbsz1=vbsc1 lda #0 sta.z padding - // [1139] phi from printf_string::@6 to printf_string::@10 [phi:printf_string::@6->printf_string::@10] + // [1189] phi from printf_string::@6 to printf_string::@10 [phi:printf_string::@6->printf_string::@10] // printf_string::@10 - // [1140] phi from printf_string::@10 to printf_string::@1 [phi:printf_string::@10->printf_string::@1] - // [1140] phi printf_string::padding#3 = printf_string::padding#1 [phi:printf_string::@10->printf_string::@1#0] -- register_copy + // [1190] phi from printf_string::@10 to printf_string::@1 [phi:printf_string::@10->printf_string::@1] + // [1190] phi printf_string::padding#3 = printf_string::padding#1 [phi:printf_string::@10->printf_string::@1#0] -- register_copy // printf_string::@1 __b1: // if(!format.justify_left && padding) - // [1141] if(0!=printf_string::format_justify_left#22) goto printf_string::@2 -- 0_neq_vbuz1_then_la1 + // [1191] if(0!=printf_string::format_justify_left#22) goto printf_string::@2 -- 0_neq_vbuz1_then_la1 lda.z format_justify_left bne __b2 // printf_string::@8 - // [1142] if(0!=printf_string::padding#3) goto printf_string::@4 -- 0_neq_vbsz1_then_la1 + // [1192] if(0!=printf_string::padding#3) goto printf_string::@4 -- 0_neq_vbsz1_then_la1 lda.z padding cmp #0 bne __b4 @@ -7236,70 +7866,275 @@ printf_string: { // printf_string::@4 __b4: // printf_padding(putc, ' ',(char)padding) - // [1143] printf_padding::putc#3 = printf_string::putc#22 -- pprz1=pprz2 + // [1193] printf_padding::putc#3 = printf_string::putc#22 -- pprz1=pprz2 lda.z putc sta.z printf_padding.putc lda.z putc+1 sta.z printf_padding.putc+1 - // [1144] printf_padding::length#3 = (char)printf_string::padding#3 -- vbuz1=vbuz2 + // [1194] printf_padding::length#3 = (char)printf_string::padding#3 -- vbuz1=vbuz2 lda.z padding sta.z printf_padding.length - // [1145] call printf_padding - // [2329] phi from printf_string::@4 to printf_padding [phi:printf_string::@4->printf_padding] - // [2329] phi printf_padding::putc#7 = printf_padding::putc#3 [phi:printf_string::@4->printf_padding#0] -- register_copy - // [2329] phi printf_padding::pad#7 = ' ' [phi:printf_string::@4->printf_padding#1] -- vbuz1=vbuc1 + // [1195] call printf_padding + // [2386] phi from printf_string::@4 to printf_padding [phi:printf_string::@4->printf_padding] + // [2386] phi printf_padding::putc#7 = printf_padding::putc#3 [phi:printf_string::@4->printf_padding#0] -- register_copy + // [2386] phi printf_padding::pad#7 = ' ' [phi:printf_string::@4->printf_padding#1] -- vbuz1=vbuc1 lda #' ' sta.z printf_padding.pad - // [2329] phi printf_padding::length#6 = printf_padding::length#3 [phi:printf_string::@4->printf_padding#2] -- register_copy + // [2386] phi printf_padding::length#6 = printf_padding::length#3 [phi:printf_string::@4->printf_padding#2] -- register_copy jsr printf_padding // printf_string::@2 __b2: // printf_str(putc, str) - // [1146] printf_str::putc#1 = printf_string::putc#22 -- pprz1=pprz2 + // [1196] printf_str::putc#1 = printf_string::putc#22 -- pprz1=pprz2 lda.z putc sta.z printf_str.putc lda.z putc+1 sta.z printf_str.putc+1 - // [1147] printf_str::s#2 = printf_string::str#22 - // [1148] call printf_str - // [987] phi from printf_string::@2 to printf_str [phi:printf_string::@2->printf_str] - // [987] phi printf_str::putc#73 = printf_str::putc#1 [phi:printf_string::@2->printf_str#0] -- register_copy - // [987] phi printf_str::s#73 = printf_str::s#2 [phi:printf_string::@2->printf_str#1] -- register_copy + // [1197] printf_str::s#2 = printf_string::str#22 + // [1198] call printf_str + // [1019] phi from printf_string::@2 to printf_str [phi:printf_string::@2->printf_str] + // [1019] phi printf_str::putc#73 = printf_str::putc#1 [phi:printf_string::@2->printf_str#0] -- register_copy + // [1019] phi printf_str::s#73 = printf_str::s#2 [phi:printf_string::@2->printf_str#1] -- register_copy jsr printf_str // printf_string::@7 // if(format.justify_left && padding) - // [1149] if(0==printf_string::format_justify_left#22) goto printf_string::@return -- 0_eq_vbuz1_then_la1 + // [1199] if(0==printf_string::format_justify_left#22) goto printf_string::@return -- 0_eq_vbuz1_then_la1 lda.z format_justify_left beq __breturn // printf_string::@9 - // [1150] if(0!=printf_string::padding#3) goto printf_string::@5 -- 0_neq_vbsz1_then_la1 + // [1200] if(0!=printf_string::padding#3) goto printf_string::@5 -- 0_neq_vbsz1_then_la1 lda.z padding cmp #0 bne __b5 rts - // printf_string::@5 - __b5: - // printf_padding(putc, ' ',(char)padding) - // [1151] printf_padding::putc#4 = printf_string::putc#22 -- pprz1=pprz2 - lda.z putc - sta.z printf_padding.putc - lda.z putc+1 - sta.z printf_padding.putc+1 - // [1152] printf_padding::length#4 = (char)printf_string::padding#3 -- vbuz1=vbuz2 - lda.z padding - sta.z printf_padding.length - // [1153] call printf_padding - // [2329] phi from printf_string::@5 to printf_padding [phi:printf_string::@5->printf_padding] - // [2329] phi printf_padding::putc#7 = printf_padding::putc#4 [phi:printf_string::@5->printf_padding#0] -- register_copy - // [2329] phi printf_padding::pad#7 = ' ' [phi:printf_string::@5->printf_padding#1] -- vbuz1=vbuc1 - lda #' ' - sta.z printf_padding.pad - // [2329] phi printf_padding::length#6 = printf_padding::length#4 [phi:printf_string::@5->printf_padding#2] -- register_copy - jsr printf_padding - // printf_string::@return - __breturn: + // printf_string::@5 + __b5: + // printf_padding(putc, ' ',(char)padding) + // [1201] printf_padding::putc#4 = printf_string::putc#22 -- pprz1=pprz2 + lda.z putc + sta.z printf_padding.putc + lda.z putc+1 + sta.z printf_padding.putc+1 + // [1202] printf_padding::length#4 = (char)printf_string::padding#3 -- vbuz1=vbuz2 + lda.z padding + sta.z printf_padding.length + // [1203] call printf_padding + // [2386] phi from printf_string::@5 to printf_padding [phi:printf_string::@5->printf_padding] + // [2386] phi printf_padding::putc#7 = printf_padding::putc#4 [phi:printf_string::@5->printf_padding#0] -- register_copy + // [2386] phi printf_padding::pad#7 = ' ' [phi:printf_string::@5->printf_padding#1] -- vbuz1=vbuc1 + lda #' ' + sta.z printf_padding.pad + // [2386] phi printf_padding::length#6 = printf_padding::length#4 [phi:printf_string::@5->printf_padding#2] -- register_copy + jsr printf_padding + // printf_string::@return + __breturn: + // } + // [1204] return + rts + .segment Data + .label str_1 = rom_read.rom_package_read +} +.segment Code + // smc_supported_rom +// __mem() char smc_supported_rom(__mem() char rom_release) +smc_supported_rom: { + // [1206] phi from smc_supported_rom to smc_supported_rom::@1 [phi:smc_supported_rom->smc_supported_rom::@1] + // [1206] phi smc_supported_rom::i#2 = 0 [phi:smc_supported_rom->smc_supported_rom::@1#0] -- vbum1=vbuc1 + lda #0 + sta i + // smc_supported_rom::@1 + __b1: + // for(unsigned char i=0; i<32; i++) + // [1207] if(smc_supported_rom::i#2<$20) goto smc_supported_rom::@2 -- vbum1_lt_vbuc1_then_la1 + lda i + cmp #$20 + bcc __b2 + // [1209] phi from smc_supported_rom::@1 to smc_supported_rom::@return [phi:smc_supported_rom::@1->smc_supported_rom::@return] + // [1209] phi smc_supported_rom::return#2 = 0 [phi:smc_supported_rom::@1->smc_supported_rom::@return#0] -- vbum1=vbuc1 + lda #0 + sta return + rts + // smc_supported_rom::@2 + __b2: + // if(smc_rom_releases[i] == rom_release) + // [1208] if(smc_rom_releases[smc_supported_rom::i#2]!=smc_supported_rom::rom_release#0) goto smc_supported_rom::@3 -- pbuc1_derefidx_vbum1_neq_vbum2_then_la1 + lda rom_release + ldy i + cmp smc_rom_releases,y + bne __b3 + // [1209] phi from smc_supported_rom::@2 to smc_supported_rom::@return [phi:smc_supported_rom::@2->smc_supported_rom::@return] + // [1209] phi smc_supported_rom::return#2 = 1 [phi:smc_supported_rom::@2->smc_supported_rom::@return#0] -- vbum1=vbuc1 + lda #1 + sta return + // smc_supported_rom::@return + // } + // [1210] return + rts + // smc_supported_rom::@3 + __b3: + // for(unsigned char i=0; i<32; i++) + // [1211] smc_supported_rom::i#1 = ++ smc_supported_rom::i#2 -- vbum1=_inc_vbum1 + inc i + // [1206] phi from smc_supported_rom::@3 to smc_supported_rom::@1 [phi:smc_supported_rom::@3->smc_supported_rom::@1] + // [1206] phi smc_supported_rom::i#2 = smc_supported_rom::i#1 [phi:smc_supported_rom::@3->smc_supported_rom::@1#0] -- register_copy + jmp __b1 + .segment Data + .label i = main.check_status_cx16_rom2_check_status_rom1_main__0 + return: .byte 0 + .label rom_release = util_wait_key.return +} +.segment Code + // util_wait_key +/** + * @brief + * + * @param info_text + * @param filter + * @return unsigned char + */ +// __mem() char util_wait_key(__zp($4f) char *info_text, __zp($d7) char *filter) +util_wait_key: { + .const bank_set_bram1_bank = 0 + .const bank_set_brom1_bank = 4 + .label util_wait_key__9 = $ee + .label bram = $36 + .label bank_get_brom1_return = $5c + .label info_text = $4f + .label filter = $d7 + // display_action_text(info_text) + // [1213] display_action_text::info_text#0 = util_wait_key::info_text#3 + // [1214] call display_action_text + // [1262] phi from util_wait_key to display_action_text [phi:util_wait_key->display_action_text] + // [1262] phi display_action_text::info_text#19 = display_action_text::info_text#0 [phi:util_wait_key->display_action_text#0] -- register_copy + jsr display_action_text + // util_wait_key::bank_get_bram1 + // return BRAM; + // [1215] util_wait_key::bram#0 = BRAM -- vbuz1=vbuz2 + lda.z BRAM + sta.z bram + // util_wait_key::bank_get_brom1 + // return BROM; + // [1216] util_wait_key::bank_get_brom1_return#0 = BROM -- vbuz1=vbuz2 + lda.z BROM + sta.z bank_get_brom1_return + // util_wait_key::bank_set_bram1 + // BRAM = bank + // [1217] BRAM = util_wait_key::bank_set_bram1_bank#0 -- vbuz1=vbuc1 + lda #bank_set_bram1_bank + sta.z BRAM + // util_wait_key::bank_set_brom1 + // BROM = bank + // [1218] BROM = util_wait_key::bank_set_brom1_bank#0 -- vbuz1=vbuc1 + lda #bank_set_brom1_bank + sta.z BROM + // [1219] phi from util_wait_key::@2 util_wait_key::@5 util_wait_key::bank_set_brom1 to util_wait_key::kbhit1 [phi:util_wait_key::@2/util_wait_key::@5/util_wait_key::bank_set_brom1->util_wait_key::kbhit1] + // util_wait_key::kbhit1 + kbhit1: + // util_wait_key::kbhit1_cbm_k_clrchn1 + // asm + // asm { jsrCBM_CLRCHN } + jsr CBM_CLRCHN + // [1221] phi from util_wait_key::kbhit1_cbm_k_clrchn1 to util_wait_key::kbhit1_@2 [phi:util_wait_key::kbhit1_cbm_k_clrchn1->util_wait_key::kbhit1_@2] + // util_wait_key::kbhit1_@2 + // cbm_k_getin() + // [1222] call cbm_k_getin + jsr cbm_k_getin + // [1223] cbm_k_getin::return#2 = cbm_k_getin::return#1 + // util_wait_key::@4 + // [1224] util_wait_key::ch#4 = cbm_k_getin::return#2 -- vwum1=vbuz2 + lda.z cbm_k_getin.return + sta ch + lda #0 + sta ch+1 + // util_wait_key::@3 + // if (filter) + // [1225] if((char *)0!=util_wait_key::filter#13) goto util_wait_key::@1 -- pbuc1_neq_pbuz1_then_la1 + // if there is a filter, check the filter, otherwise return ch. + lda.z filter+1 + cmp #>0 + bne __b1 + lda.z filter + cmp #<0 + bne __b1 + // util_wait_key::@2 + // if(ch) + // [1226] if(0!=util_wait_key::ch#4) goto util_wait_key::bank_set_bram2 -- 0_neq_vwum1_then_la1 + lda ch + ora ch+1 + bne bank_set_bram2 + jmp kbhit1 + // util_wait_key::bank_set_bram2 + bank_set_bram2: + // BRAM = bank + // [1227] BRAM = util_wait_key::bram#0 -- vbuz1=vbuz2 + lda.z bram + sta.z BRAM + // util_wait_key::bank_set_brom2 + // BROM = bank + // [1228] BROM = util_wait_key::bank_get_brom1_return#0 -- vbuz1=vbuz2 + lda.z bank_get_brom1_return + sta.z BROM + // util_wait_key::@return + // } + // [1229] return + rts + // util_wait_key::@1 + __b1: + // strchr(filter, ch) + // [1230] strchr::str#0 = (const void *)util_wait_key::filter#13 -- pvoz1=pvoz2 + lda.z filter + sta.z strchr.str + lda.z filter+1 + sta.z strchr.str+1 + // [1231] strchr::c#0 = util_wait_key::ch#4 -- vbum1=vwum2 + lda ch + sta strchr.c + // [1232] call strchr + // [1772] phi from util_wait_key::@1 to strchr [phi:util_wait_key::@1->strchr] + // [1772] phi strchr::c#4 = strchr::c#0 [phi:util_wait_key::@1->strchr#0] -- register_copy + // [1772] phi strchr::str#2 = strchr::str#0 [phi:util_wait_key::@1->strchr#1] -- register_copy + jsr strchr + // strchr(filter, ch) + // [1233] strchr::return#3 = strchr::return#2 + // util_wait_key::@5 + // [1234] util_wait_key::$9 = strchr::return#3 + // if(strchr(filter, ch) != NULL) + // [1235] if(util_wait_key::$9!=0) goto util_wait_key::bank_set_bram2 -- pvoz1_neq_0_then_la1 + lda.z util_wait_key__9 + ora.z util_wait_key__9+1 + bne bank_set_bram2 + jmp kbhit1 + .segment Data + return: .byte 0 + .label return_1 = strchr.c + ch: .word 0 +} +.segment Code + // display_info_cx16_rom +/** + * @brief Display the ROM status of the main CX16 ROM chip. + * + * @param info_status The status. + * @param info_text The status text. + */ +// void display_info_cx16_rom(__zp($e6) char info_status, __zp($dd) char *info_text) +display_info_cx16_rom: { + .label info_status = $e6 + .label info_text = $dd + // display_info_rom(0, info_status, info_text) + // [1237] display_info_rom::info_status#0 = display_info_cx16_rom::info_status#4 + // [1238] display_info_rom::info_text#0 = display_info_cx16_rom::info_text#4 + // [1239] call display_info_rom + // [1285] phi from display_info_cx16_rom to display_info_rom [phi:display_info_cx16_rom->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = display_info_rom::info_text#0 [phi:display_info_cx16_rom->display_info_rom#0] -- register_copy + // [1285] phi display_info_rom::rom_chip#16 = 0 [phi:display_info_cx16_rom->display_info_rom#1] -- vbuz1=vbuc1 + lda #0 + sta.z display_info_rom.rom_chip + // [1285] phi display_info_rom::info_status#16 = display_info_rom::info_status#0 [phi:display_info_cx16_rom->display_info_rom#2] -- register_copy + jsr display_info_rom + // display_info_cx16_rom::@return // } - // [1154] return + // [1240] return rts } // system_reset @@ -7312,19 +8147,19 @@ system_reset: { .const bank_set_brom1_bank = 0 // system_reset::bank_set_bram1 // BRAM = bank - // [1156] BRAM = system_reset::bank_set_bram1_bank#0 -- vbuz1=vbuc1 + // [1242] BRAM = system_reset::bank_set_bram1_bank#0 -- vbuz1=vbuc1 lda #bank_set_bram1_bank sta.z BRAM // system_reset::bank_set_brom1 // BROM = bank - // [1157] BROM = system_reset::bank_set_brom1_bank#0 -- vbuz1=vbuc1 + // [1243] BROM = system_reset::bank_set_brom1_bank#0 -- vbuz1=vbuc1 lda #bank_set_brom1_bank sta.z BROM // system_reset::@2 // asm // asm { jmp($FFFC) } jmp ($fffc) - // [1159] phi from system_reset::@1 system_reset::@2 to system_reset::@1 [phi:system_reset::@1/system_reset::@2->system_reset::@1] + // [1245] phi from system_reset::@1 system_reset::@2 to system_reset::@1 [phi:system_reset::@1/system_reset::@2->system_reset::@1] // system_reset::@1 __b1: jmp __b1 @@ -7335,9 +8170,9 @@ system_reset: { * */ wait_moment: { - .label i = $e2 - // [1161] phi from wait_moment to wait_moment::@1 [phi:wait_moment->wait_moment::@1] - // [1161] phi wait_moment::i#2 = $ffff [phi:wait_moment->wait_moment::@1#0] -- vwuz1=vwuc1 + .label i = $60 + // [1247] phi from wait_moment to wait_moment::@1 [phi:wait_moment->wait_moment::@1] + // [1247] phi wait_moment::i#2 = $ffff [phi:wait_moment->wait_moment::@1#0] -- vwuz1=vwuc1 lda #<$ffff sta.z i lda #>$ffff @@ -7345,7 +8180,7 @@ wait_moment: { // wait_moment::@1 __b1: // for(unsigned int i=65535; i>0; i--) - // [1162] if(wait_moment::i#2>0) goto wait_moment::@2 -- vwuz1_gt_0_then_la1 + // [1248] if(wait_moment::i#2>0) goto wait_moment::@2 -- vwuz1_gt_0_then_la1 lda.z i+1 bne __b2 lda.z i @@ -7353,60 +8188,61 @@ wait_moment: { !: // wait_moment::@return // } - // [1163] return + // [1249] return rts // wait_moment::@2 __b2: // for(unsigned int i=65535; i>0; i--) - // [1164] wait_moment::i#1 = -- wait_moment::i#2 -- vwuz1=_dec_vwuz1 + // [1250] wait_moment::i#1 = -- wait_moment::i#2 -- vwuz1=_dec_vwuz1 lda.z i bne !+ dec.z i+1 !: dec.z i - // [1161] phi from wait_moment::@2 to wait_moment::@1 [phi:wait_moment::@2->wait_moment::@1] - // [1161] phi wait_moment::i#2 = wait_moment::i#1 [phi:wait_moment::@2->wait_moment::@1#0] -- register_copy + // [1247] phi from wait_moment::@2 to wait_moment::@1 [phi:wait_moment::@2->wait_moment::@1] + // [1247] phi wait_moment::i#2 = wait_moment::i#1 [phi:wait_moment::@2->wait_moment::@1#0] -- register_copy jmp __b1 } // printf_uchar // Print an unsigned char using a specific format -// void printf_uchar(__zp($b7) void (*putc)(char), __register(X) char uvalue, __zp($cf) char format_min_length, char format_justify_left, char format_sign_always, __zp($be) char format_zero_padding, char format_upper_case, __register(Y) char format_radix) +// void printf_uchar(__zp($4d) void (*putc)(char), __zp($2f) char uvalue, __zp($e8) char format_min_length, char format_justify_left, char format_sign_always, __zp($e7) char format_zero_padding, char format_upper_case, __zp($e2) char format_radix) printf_uchar: { - .label putc = $b7 - .label format_min_length = $cf - .label format_zero_padding = $be + .label uvalue = $2f + .label format_radix = $e2 + .label putc = $4d + .label format_min_length = $e8 + .label format_zero_padding = $e7 // printf_uchar::@1 // printf_buffer.sign = format.sign_always?'+':0 - // [1166] *((char *)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 + // [1252] *((char *)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 // Handle any sign lda #0 sta printf_buffer // uctoa(uvalue, printf_buffer.digits, format.radix) - // [1167] uctoa::value#1 = printf_uchar::uvalue#14 - // [1168] uctoa::radix#0 = printf_uchar::format_radix#14 - // [1169] call uctoa + // [1253] uctoa::value#1 = printf_uchar::uvalue#14 + // [1254] uctoa::radix#0 = printf_uchar::format_radix#14 + // [1255] call uctoa // Format number into buffer jsr uctoa // printf_uchar::@2 // printf_number_buffer(putc, printf_buffer, format) - // [1170] printf_number_buffer::putc#2 = printf_uchar::putc#14 - // [1171] printf_number_buffer::buffer_sign#2 = *((char *)&printf_buffer) -- vbuz1=_deref_pbuc1 + // [1256] printf_number_buffer::putc#2 = printf_uchar::putc#14 + // [1257] printf_number_buffer::buffer_sign#2 = *((char *)&printf_buffer) -- vbuz1=_deref_pbuc1 lda printf_buffer sta.z printf_number_buffer.buffer_sign - // [1172] printf_number_buffer::format_min_length#2 = printf_uchar::format_min_length#14 -- vbuxx=vbuz1 - ldx.z format_min_length - // [1173] printf_number_buffer::format_zero_padding#2 = printf_uchar::format_zero_padding#14 - // [1174] call printf_number_buffer + // [1258] printf_number_buffer::format_min_length#2 = printf_uchar::format_min_length#14 + // [1259] printf_number_buffer::format_zero_padding#2 = printf_uchar::format_zero_padding#14 + // [1260] call printf_number_buffer // Print using format - // [2107] phi from printf_uchar::@2 to printf_number_buffer [phi:printf_uchar::@2->printf_number_buffer] - // [2107] phi printf_number_buffer::putc#10 = printf_number_buffer::putc#2 [phi:printf_uchar::@2->printf_number_buffer#0] -- register_copy - // [2107] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#2 [phi:printf_uchar::@2->printf_number_buffer#1] -- register_copy - // [2107] phi printf_number_buffer::format_zero_padding#10 = printf_number_buffer::format_zero_padding#2 [phi:printf_uchar::@2->printf_number_buffer#2] -- register_copy - // [2107] phi printf_number_buffer::format_min_length#3 = printf_number_buffer::format_min_length#2 [phi:printf_uchar::@2->printf_number_buffer#3] -- register_copy + // [2160] phi from printf_uchar::@2 to printf_number_buffer [phi:printf_uchar::@2->printf_number_buffer] + // [2160] phi printf_number_buffer::putc#10 = printf_number_buffer::putc#2 [phi:printf_uchar::@2->printf_number_buffer#0] -- register_copy + // [2160] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#2 [phi:printf_uchar::@2->printf_number_buffer#1] -- register_copy + // [2160] phi printf_number_buffer::format_zero_padding#10 = printf_number_buffer::format_zero_padding#2 [phi:printf_uchar::@2->printf_number_buffer#2] -- register_copy + // [2160] phi printf_number_buffer::format_min_length#3 = printf_number_buffer::format_min_length#2 [phi:printf_uchar::@2->printf_number_buffer#3] -- register_copy jsr printf_number_buffer // printf_uchar::@return // } - // [1175] return + // [1261] return rts } // display_action_text @@ -7415,69 +8251,75 @@ printf_uchar: { * * @param info_text The info text to be displayed. */ -// void display_action_text(__zp($55) char *info_text) +// void display_action_text(__zp($4f) char *info_text) display_action_text: { - .label info_text = $55 - .label x = $c6 - .label y = $c1 + .label info_text = $4f + .label x = $6b + .label y = $43 // unsigned char x = wherex() - // [1177] call wherex + // [1263] call wherex jsr wherex - // [1178] wherex::return#3 = wherex::return#0 + // [1264] wherex::return#3 = wherex::return#0 -- vbuz1=vbuz2 + lda.z wherex.return + sta.z wherex.return_1 // display_action_text::@1 - // [1179] display_action_text::x#0 = wherex::return#3 -- vbuz1=vbuaa - sta.z x + // [1265] display_action_text::x#0 = wherex::return#3 // unsigned char y = wherey() - // [1180] call wherey + // [1266] call wherey jsr wherey - // [1181] wherey::return#3 = wherey::return#0 + // [1267] wherey::return#3 = wherey::return#0 -- vbuz1=vbuz2 + lda.z wherey.return + sta.z wherey.return_1 // display_action_text::@2 - // [1182] display_action_text::y#0 = wherey::return#3 -- vbuz1=vbuaa - sta.z y + // [1268] display_action_text::y#0 = wherey::return#3 // gotoxy(2, PROGRESS_Y-3) - // [1183] call gotoxy - // [718] phi from display_action_text::@2 to gotoxy [phi:display_action_text::@2->gotoxy] - // [718] phi gotoxy::y#30 = PROGRESS_Y-3 [phi:display_action_text::@2->gotoxy#0] -- vbuyy=vbuc1 - ldy #PROGRESS_Y-3 - // [718] phi gotoxy::x#30 = 2 [phi:display_action_text::@2->gotoxy#1] -- vbuxx=vbuc1 - ldx #2 + // [1269] call gotoxy + // [763] phi from display_action_text::@2 to gotoxy [phi:display_action_text::@2->gotoxy] + // [763] phi gotoxy::y#30 = PROGRESS_Y-3 [phi:display_action_text::@2->gotoxy#0] -- vbuz1=vbuc1 + lda #PROGRESS_Y-3 + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = 2 [phi:display_action_text::@2->gotoxy#1] -- vbuz1=vbuc1 + lda #2 + sta.z gotoxy.x jsr gotoxy // display_action_text::@3 // printf("%-65s", info_text) - // [1184] printf_string::str#2 = display_action_text::info_text#19 -- pbuz1=pbuz2 + // [1270] printf_string::str#2 = display_action_text::info_text#19 -- pbuz1=pbuz2 lda.z info_text sta.z printf_string.str lda.z info_text+1 sta.z printf_string.str+1 - // [1185] call printf_string - // [1130] phi from display_action_text::@3 to printf_string [phi:display_action_text::@3->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_action_text::@3->printf_string#0] -- pprz1=pprc1 + // [1271] call printf_string + // [1180] phi from display_action_text::@3 to printf_string [phi:display_action_text::@3->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_action_text::@3->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#2 [phi:display_action_text::@3->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 1 [phi:display_action_text::@3->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#2 [phi:display_action_text::@3->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 1 [phi:display_action_text::@3->printf_string#2] -- vbuz1=vbuc1 lda #1 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = $41 [phi:display_action_text::@3->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = $41 [phi:display_action_text::@3->printf_string#3] -- vbuz1=vbuc1 lda #$41 sta.z printf_string.format_min_length jsr printf_string // display_action_text::@4 // gotoxy(x, y) - // [1186] gotoxy::x#12 = display_action_text::x#0 -- vbuxx=vbuz1 - ldx.z x - // [1187] gotoxy::y#12 = display_action_text::y#0 -- vbuyy=vbuz1 - ldy.z y - // [1188] call gotoxy - // [718] phi from display_action_text::@4 to gotoxy [phi:display_action_text::@4->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#12 [phi:display_action_text::@4->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#12 [phi:display_action_text::@4->gotoxy#1] -- register_copy + // [1272] gotoxy::x#12 = display_action_text::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z gotoxy.x + // [1273] gotoxy::y#12 = display_action_text::y#0 -- vbuz1=vbuz2 + lda.z y + sta.z gotoxy.y + // [1274] call gotoxy + // [763] phi from display_action_text::@4 to gotoxy [phi:display_action_text::@4->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#12 [phi:display_action_text::@4->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#12 [phi:display_action_text::@4->gotoxy#1] -- register_copy jsr gotoxy // display_action_text::@return // } - // [1189] return + // [1275] return rts } // smc_reset @@ -7493,28 +8335,28 @@ smc_reset: { .const bank_set_brom1_bank = 0 // smc_reset::bank_set_bram1 // BRAM = bank - // [1191] BRAM = smc_reset::bank_set_bram1_bank#0 -- vbuz1=vbuc1 + // [1277] BRAM = smc_reset::bank_set_bram1_bank#0 -- vbuz1=vbuc1 lda #bank_set_bram1_bank sta.z BRAM // smc_reset::bank_set_brom1 // BROM = bank - // [1192] BROM = smc_reset::bank_set_brom1_bank#0 -- vbuz1=vbuc1 + // [1278] BROM = smc_reset::bank_set_brom1_bank#0 -- vbuz1=vbuc1 lda #bank_set_brom1_bank sta.z BROM // smc_reset::@2 // cx16_k_i2c_write_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_REBOOT, 0) - // [1193] smc_reset::cx16_k_i2c_write_byte1_device = $42 -- vbum1=vbuc1 + // [1279] smc_reset::cx16_k_i2c_write_byte1_device = $42 -- vbum1=vbuc1 lda #$42 sta cx16_k_i2c_write_byte1_device - // [1194] smc_reset::cx16_k_i2c_write_byte1_offset = $82 -- vbum1=vbuc1 + // [1280] smc_reset::cx16_k_i2c_write_byte1_offset = $82 -- vbum1=vbuc1 lda #$82 sta cx16_k_i2c_write_byte1_offset - // [1195] smc_reset::cx16_k_i2c_write_byte1_value = 0 -- vbum1=vbuc1 + // [1281] smc_reset::cx16_k_i2c_write_byte1_value = 0 -- vbum1=vbuc1 lda #0 sta cx16_k_i2c_write_byte1_value // smc_reset::cx16_k_i2c_write_byte1 // unsigned char result - // [1196] smc_reset::cx16_k_i2c_write_byte1_result = 0 -- vbum1=vbuc1 + // [1282] smc_reset::cx16_k_i2c_write_byte1_result = 0 -- vbum1=vbuc1 sta cx16_k_i2c_write_byte1_result // asm // asm { ldxdevice ldyoffset ldavalue stzresult jsrCX16_I2C_WRITE_BYTE rolresult } @@ -7524,7 +8366,7 @@ smc_reset: { stz cx16_k_i2c_write_byte1_result jsr CX16_I2C_WRITE_BYTE rol cx16_k_i2c_write_byte1_result - // [1198] phi from smc_reset::@1 smc_reset::cx16_k_i2c_write_byte1 to smc_reset::@1 [phi:smc_reset::@1/smc_reset::cx16_k_i2c_write_byte1->smc_reset::@1] + // [1284] phi from smc_reset::@1 smc_reset::cx16_k_i2c_write_byte1 to smc_reset::@1 [phi:smc_reset::@1/smc_reset::cx16_k_i2c_write_byte1->smc_reset::@1] // smc_reset::@1 __b1: jmp __b1 @@ -7543,88 +8385,103 @@ smc_reset: { * @param info_status The status. * @param info_text The status text. */ -// void display_info_rom(__zp($6b) char rom_chip, __mem() char info_status, __zp($3e) char *info_text) +// void display_info_rom(__zp($2f) char rom_chip, __zp($e6) char info_status, __zp($dd) char *info_text) display_info_rom: { - .label display_info_rom__13 = $b1 - .label info_text = $3e - .label rom_chip = $6b + .label display_info_rom__6 = $5c + .label display_info_rom__12 = $e6 + .label display_info_rom__13 = $36 + .label x = $5b + .label y = $54 + .label info_status = $e6 + .label info_text = $dd + .label rom_chip = $2f + .label display_info_rom__16 = $5c + .label display_info_rom__17 = $5c // unsigned char x = wherex() - // [1200] call wherex + // [1286] call wherex jsr wherex - // [1201] wherex::return#12 = wherex::return#0 + // [1287] wherex::return#12 = wherex::return#0 -- vbuz1=vbuz2 + lda.z wherex.return + sta.z wherex.return_4 // display_info_rom::@3 - // [1202] display_info_rom::x#0 = wherex::return#12 -- vbum1=vbuaa - sta x + // [1288] display_info_rom::x#0 = wherex::return#12 // unsigned char y = wherey() - // [1203] call wherey + // [1289] call wherey jsr wherey - // [1204] wherey::return#12 = wherey::return#0 + // [1290] wherey::return#12 = wherey::return#0 -- vbuz1=vbuz2 + lda.z wherey.return + sta.z wherey.return_4 // display_info_rom::@4 - // [1205] display_info_rom::y#0 = wherey::return#12 -- vbum1=vbuaa - sta y + // [1291] display_info_rom::y#0 = wherey::return#12 // status_rom[rom_chip] = info_status - // [1206] status_rom[display_info_rom::rom_chip#16] = display_info_rom::info_status#16 -- pbuc1_derefidx_vbuz1=vbum2 - lda info_status + // [1292] status_rom[display_info_rom::rom_chip#16] = display_info_rom::info_status#16 -- pbuc1_derefidx_vbuz1=vbuz2 + lda.z info_status ldy.z rom_chip sta status_rom,y // display_rom_led(rom_chip, status_color[info_status]) - // [1207] display_rom_led::chip#1 = display_info_rom::rom_chip#16 -- vbuz1=vbuz2 + // [1293] display_rom_led::chip#1 = display_info_rom::rom_chip#16 -- vbuz1=vbuz2 tya sta.z display_rom_led.chip - // [1208] display_rom_led::c#1 = status_color[display_info_rom::info_status#16] -- vbuz1=pbuc1_derefidx_vbum2 - ldy info_status + // [1294] display_rom_led::c#1 = status_color[display_info_rom::info_status#16] -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z info_status lda status_color,y sta.z display_rom_led.c - // [1209] call display_rom_led - // [2062] phi from display_info_rom::@4 to display_rom_led [phi:display_info_rom::@4->display_rom_led] - // [2062] phi display_rom_led::c#2 = display_rom_led::c#1 [phi:display_info_rom::@4->display_rom_led#0] -- register_copy - // [2062] phi display_rom_led::chip#2 = display_rom_led::chip#1 [phi:display_info_rom::@4->display_rom_led#1] -- register_copy + // [1295] call display_rom_led + // [2119] phi from display_info_rom::@4 to display_rom_led [phi:display_info_rom::@4->display_rom_led] + // [2119] phi display_rom_led::c#2 = display_rom_led::c#1 [phi:display_info_rom::@4->display_rom_led#0] -- register_copy + // [2119] phi display_rom_led::chip#2 = display_rom_led::chip#1 [phi:display_info_rom::@4->display_rom_led#1] -- register_copy jsr display_rom_led // display_info_rom::@5 // gotoxy(INFO_X, INFO_Y+rom_chip+2) - // [1210] gotoxy::y#17 = display_info_rom::rom_chip#16 + $11+2 -- vbuyy=vbuz1_plus_vbuc1 + // [1296] gotoxy::y#17 = display_info_rom::rom_chip#16 + $11+2 -- vbuz1=vbuz2_plus_vbuc1 lda #$11+2 clc adc.z rom_chip - tay - // [1211] call gotoxy - // [718] phi from display_info_rom::@5 to gotoxy [phi:display_info_rom::@5->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#17 [phi:display_info_rom::@5->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = 4 [phi:display_info_rom::@5->gotoxy#1] -- vbuxx=vbuc1 - ldx #4 + sta.z gotoxy.y + // [1297] call gotoxy + // [763] phi from display_info_rom::@5 to gotoxy [phi:display_info_rom::@5->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#17 [phi:display_info_rom::@5->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = 4 [phi:display_info_rom::@5->gotoxy#1] -- vbuz1=vbuc1 + lda #4 + sta.z gotoxy.x jsr gotoxy // display_info_rom::@6 // printf("ROM%u %-9s %-6s %-13s ", rom_chip, status_text[info_status], rom_device_names[rom_chip], &rom_release_text[rom_chip*13]) - // [1212] display_info_rom::$13 = display_info_rom::rom_chip#16 << 1 -- vbuz1=vbuz2_rol_1 + // [1298] display_info_rom::$13 = display_info_rom::rom_chip#16 << 1 -- vbuz1=vbuz2_rol_1 lda.z rom_chip asl sta.z display_info_rom__13 // rom_chip*13 - // [1213] display_info_rom::$16 = display_info_rom::$13 + display_info_rom::rom_chip#16 -- vbuaa=vbuz1_plus_vbuz2 + // [1299] display_info_rom::$16 = display_info_rom::$13 + display_info_rom::rom_chip#16 -- vbuz1=vbuz2_plus_vbuz3 clc adc.z rom_chip - // [1214] display_info_rom::$17 = display_info_rom::$16 << 2 -- vbuaa=vbuaa_rol_2 + sta.z display_info_rom__16 + // [1300] display_info_rom::$17 = display_info_rom::$16 << 2 -- vbuz1=vbuz1_rol_2 + lda.z display_info_rom__17 asl asl - // [1215] display_info_rom::$6 = display_info_rom::$17 + display_info_rom::rom_chip#16 -- vbuaa=vbuaa_plus_vbuz1 + sta.z display_info_rom__17 + // [1301] display_info_rom::$6 = display_info_rom::$17 + display_info_rom::rom_chip#16 -- vbuz1=vbuz1_plus_vbuz2 + lda.z display_info_rom__6 clc adc.z rom_chip + sta.z display_info_rom__6 // printf("ROM%u %-9s %-6s %-13s ", rom_chip, status_text[info_status], rom_device_names[rom_chip], &rom_release_text[rom_chip*13]) - // [1216] printf_string::str#10 = rom_release_text + display_info_rom::$6 -- pbuz1=pbuc1_plus_vbuaa + // [1302] printf_string::str#10 = rom_release_text + display_info_rom::$6 -- pbum1=pbuc1_plus_vbuz2 clc adc #rom_release_text adc #0 - sta.z printf_string.str_1+1 - // [1217] call printf_str - // [987] phi from display_info_rom::@6 to printf_str [phi:display_info_rom::@6->printf_str] - // [987] phi printf_str::putc#73 = &cputc [phi:display_info_rom::@6->printf_str#0] -- pprz1=pprc1 + sta printf_string.str_1+1 + // [1303] call printf_str + // [1019] phi from display_info_rom::@6 to printf_str [phi:display_info_rom::@6->printf_str] + // [1019] phi printf_str::putc#73 = &cputc [phi:display_info_rom::@6->printf_str#0] -- pprz1=pprc1 lda #cputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = display_info_rom::s [phi:display_info_rom::@6->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = display_info_rom::s [phi:display_info_rom::@6->printf_str#1] -- pbuz1=pbuc1 lda #s @@ -7632,35 +8489,35 @@ display_info_rom: { jsr printf_str // display_info_rom::@7 // printf("ROM%u %-9s %-6s %-13s ", rom_chip, status_text[info_status], rom_device_names[rom_chip], &rom_release_text[rom_chip*13]) - // [1218] printf_uchar::uvalue#0 = display_info_rom::rom_chip#16 -- vbuxx=vbuz1 - ldx.z rom_chip - // [1219] call printf_uchar - // [1165] phi from display_info_rom::@7 to printf_uchar [phi:display_info_rom::@7->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 0 [phi:display_info_rom::@7->printf_uchar#0] -- vbuz1=vbuc1 + // [1304] printf_uchar::uvalue#0 = display_info_rom::rom_chip#16 + // [1305] call printf_uchar + // [1251] phi from display_info_rom::@7 to printf_uchar [phi:display_info_rom::@7->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 0 [phi:display_info_rom::@7->printf_uchar#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 0 [phi:display_info_rom::@7->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 0 [phi:display_info_rom::@7->printf_uchar#1] -- vbuz1=vbuc1 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &cputc [phi:display_info_rom::@7->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &cputc [phi:display_info_rom::@7->printf_uchar#2] -- pprz1=pprc1 lda #cputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = DECIMAL [phi:display_info_rom::@7->printf_uchar#3] -- vbuyy=vbuc1 - ldy #DECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#0 [phi:display_info_rom::@7->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = DECIMAL [phi:display_info_rom::@7->printf_uchar#3] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#0 [phi:display_info_rom::@7->printf_uchar#4] -- register_copy jsr printf_uchar - // [1220] phi from display_info_rom::@7 to display_info_rom::@8 [phi:display_info_rom::@7->display_info_rom::@8] + // [1306] phi from display_info_rom::@7 to display_info_rom::@8 [phi:display_info_rom::@7->display_info_rom::@8] // display_info_rom::@8 // printf("ROM%u %-9s %-6s %-13s ", rom_chip, status_text[info_status], rom_device_names[rom_chip], &rom_release_text[rom_chip*13]) - // [1221] call printf_str - // [987] phi from display_info_rom::@8 to printf_str [phi:display_info_rom::@8->printf_str] - // [987] phi printf_str::putc#73 = &cputc [phi:display_info_rom::@8->printf_str#0] -- pprz1=pprc1 + // [1307] call printf_str + // [1019] phi from display_info_rom::@8 to printf_str [phi:display_info_rom::@8->printf_str] + // [1019] phi printf_str::putc#73 = &cputc [phi:display_info_rom::@8->printf_str#0] -- pprz1=pprc1 lda #cputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s [phi:display_info_rom::@8->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s [phi:display_info_rom::@8->printf_str#1] -- pbuz1=pbuc1 lda #<@s sta.z printf_str.s lda #>@s @@ -7668,41 +8525,40 @@ display_info_rom: { jsr printf_str // display_info_rom::@9 // printf("ROM%u %-9s %-6s %-13s ", rom_chip, status_text[info_status], rom_device_names[rom_chip], &rom_release_text[rom_chip*13]) - // [1222] display_info_rom::$12 = display_info_rom::info_status#16 << 1 -- vbuaa=vbum1_rol_1 - lda info_status - asl - // [1223] printf_string::str#8 = status_text[display_info_rom::$12] -- pbuz1=qbuc1_derefidx_vbuaa - tay + // [1308] display_info_rom::$12 = display_info_rom::info_status#16 << 1 -- vbuz1=vbuz1_rol_1 + asl.z display_info_rom__12 + // [1309] printf_string::str#8 = status_text[display_info_rom::$12] -- pbuz1=qbuc1_derefidx_vbuz2 + ldy.z display_info_rom__12 lda status_text,y sta.z printf_string.str lda status_text+1,y sta.z printf_string.str+1 - // [1224] call printf_string - // [1130] phi from display_info_rom::@9 to printf_string [phi:display_info_rom::@9->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_info_rom::@9->printf_string#0] -- pprz1=pprc1 + // [1310] call printf_string + // [1180] phi from display_info_rom::@9 to printf_string [phi:display_info_rom::@9->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_info_rom::@9->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#8 [phi:display_info_rom::@9->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 1 [phi:display_info_rom::@9->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#8 [phi:display_info_rom::@9->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 1 [phi:display_info_rom::@9->printf_string#2] -- vbuz1=vbuc1 lda #1 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 9 [phi:display_info_rom::@9->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 9 [phi:display_info_rom::@9->printf_string#3] -- vbuz1=vbuc1 lda #9 sta.z printf_string.format_min_length jsr printf_string - // [1225] phi from display_info_rom::@9 to display_info_rom::@10 [phi:display_info_rom::@9->display_info_rom::@10] + // [1311] phi from display_info_rom::@9 to display_info_rom::@10 [phi:display_info_rom::@9->display_info_rom::@10] // display_info_rom::@10 // printf("ROM%u %-9s %-6s %-13s ", rom_chip, status_text[info_status], rom_device_names[rom_chip], &rom_release_text[rom_chip*13]) - // [1226] call printf_str - // [987] phi from display_info_rom::@10 to printf_str [phi:display_info_rom::@10->printf_str] - // [987] phi printf_str::putc#73 = &cputc [phi:display_info_rom::@10->printf_str#0] -- pprz1=pprc1 + // [1312] call printf_str + // [1019] phi from display_info_rom::@10 to printf_str [phi:display_info_rom::@10->printf_str] + // [1019] phi printf_str::putc#73 = &cputc [phi:display_info_rom::@10->printf_str#0] -- pprz1=pprc1 lda #cputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s [phi:display_info_rom::@10->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s [phi:display_info_rom::@10->printf_str#1] -- pbuz1=pbuc1 lda #<@s sta.z printf_str.s lda #>@s @@ -7710,76 +8566,76 @@ display_info_rom: { jsr printf_str // display_info_rom::@11 // printf("ROM%u %-9s %-6s %-13s ", rom_chip, status_text[info_status], rom_device_names[rom_chip], &rom_release_text[rom_chip*13]) - // [1227] printf_string::str#9 = rom_device_names[display_info_rom::$13] -- pbuz1=qbuc1_derefidx_vbuz2 + // [1313] printf_string::str#9 = rom_device_names[display_info_rom::$13] -- pbuz1=qbuc1_derefidx_vbuz2 ldy.z display_info_rom__13 lda rom_device_names,y sta.z printf_string.str lda rom_device_names+1,y sta.z printf_string.str+1 - // [1228] call printf_string - // [1130] phi from display_info_rom::@11 to printf_string [phi:display_info_rom::@11->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_info_rom::@11->printf_string#0] -- pprz1=pprc1 + // [1314] call printf_string + // [1180] phi from display_info_rom::@11 to printf_string [phi:display_info_rom::@11->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_info_rom::@11->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#9 [phi:display_info_rom::@11->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 1 [phi:display_info_rom::@11->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#9 [phi:display_info_rom::@11->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 1 [phi:display_info_rom::@11->printf_string#2] -- vbuz1=vbuc1 lda #1 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 6 [phi:display_info_rom::@11->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 6 [phi:display_info_rom::@11->printf_string#3] -- vbuz1=vbuc1 lda #6 sta.z printf_string.format_min_length jsr printf_string - // [1229] phi from display_info_rom::@11 to display_info_rom::@12 [phi:display_info_rom::@11->display_info_rom::@12] + // [1315] phi from display_info_rom::@11 to display_info_rom::@12 [phi:display_info_rom::@11->display_info_rom::@12] // display_info_rom::@12 // printf("ROM%u %-9s %-6s %-13s ", rom_chip, status_text[info_status], rom_device_names[rom_chip], &rom_release_text[rom_chip*13]) - // [1230] call printf_str - // [987] phi from display_info_rom::@12 to printf_str [phi:display_info_rom::@12->printf_str] - // [987] phi printf_str::putc#73 = &cputc [phi:display_info_rom::@12->printf_str#0] -- pprz1=pprc1 + // [1316] call printf_str + // [1019] phi from display_info_rom::@12 to printf_str [phi:display_info_rom::@12->printf_str] + // [1019] phi printf_str::putc#73 = &cputc [phi:display_info_rom::@12->printf_str#0] -- pprz1=pprc1 lda #cputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s [phi:display_info_rom::@12->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s [phi:display_info_rom::@12->printf_str#1] -- pbuz1=pbuc1 lda #<@s sta.z printf_str.s lda #>@s sta.z printf_str.s+1 jsr printf_str // display_info_rom::@13 - // [1231] printf_string::str#33 = printf_string::str#10 -- pbuz1=pbuz2 - lda.z printf_string.str_1 + // [1317] printf_string::str#33 = printf_string::str#10 -- pbuz1=pbum2 + lda printf_string.str_1 sta.z printf_string.str - lda.z printf_string.str_1+1 + lda printf_string.str_1+1 sta.z printf_string.str+1 // printf("ROM%u %-9s %-6s %-13s ", rom_chip, status_text[info_status], rom_device_names[rom_chip], &rom_release_text[rom_chip*13]) - // [1232] call printf_string - // [1130] phi from display_info_rom::@13 to printf_string [phi:display_info_rom::@13->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_info_rom::@13->printf_string#0] -- pprz1=pprc1 + // [1318] call printf_string + // [1180] phi from display_info_rom::@13 to printf_string [phi:display_info_rom::@13->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_info_rom::@13->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#33 [phi:display_info_rom::@13->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 1 [phi:display_info_rom::@13->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#33 [phi:display_info_rom::@13->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 1 [phi:display_info_rom::@13->printf_string#2] -- vbuz1=vbuc1 lda #1 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = $d [phi:display_info_rom::@13->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = $d [phi:display_info_rom::@13->printf_string#3] -- vbuz1=vbuc1 lda #$d sta.z printf_string.format_min_length jsr printf_string - // [1233] phi from display_info_rom::@13 to display_info_rom::@14 [phi:display_info_rom::@13->display_info_rom::@14] + // [1319] phi from display_info_rom::@13 to display_info_rom::@14 [phi:display_info_rom::@13->display_info_rom::@14] // display_info_rom::@14 // printf("ROM%u %-9s %-6s %-13s ", rom_chip, status_text[info_status], rom_device_names[rom_chip], &rom_release_text[rom_chip*13]) - // [1234] call printf_str - // [987] phi from display_info_rom::@14 to printf_str [phi:display_info_rom::@14->printf_str] - // [987] phi printf_str::putc#73 = &cputc [phi:display_info_rom::@14->printf_str#0] -- pprz1=pprc1 + // [1320] call printf_str + // [1019] phi from display_info_rom::@14 to printf_str [phi:display_info_rom::@14->printf_str] + // [1019] phi printf_str::putc#73 = &cputc [phi:display_info_rom::@14->printf_str#0] -- pprz1=pprc1 lda #cputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s [phi:display_info_rom::@14->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s [phi:display_info_rom::@14->printf_str#1] -- pbuz1=pbuc1 lda #<@s sta.z printf_str.s lda #>@s @@ -7787,7 +8643,7 @@ display_info_rom: { jsr printf_str // display_info_rom::@15 // if(info_text) - // [1235] if((char *)0==display_info_rom::info_text#16) goto display_info_rom::@1 -- pbuc1_eq_pbuz1_then_la1 + // [1321] if((char *)0==display_info_rom::info_text#16) goto display_info_rom::@1 -- pbuc1_eq_pbuz1_then_la1 lda.z info_text cmp #<0 bne !+ @@ -7797,59 +8653,60 @@ display_info_rom: { !: // display_info_rom::@2 // printf("%-25s", info_text) - // [1236] printf_string::str#11 = display_info_rom::info_text#16 -- pbuz1=pbuz2 + // [1322] printf_string::str#11 = display_info_rom::info_text#16 -- pbuz1=pbuz2 lda.z info_text sta.z printf_string.str lda.z info_text+1 sta.z printf_string.str+1 - // [1237] call printf_string - // [1130] phi from display_info_rom::@2 to printf_string [phi:display_info_rom::@2->printf_string] - // [1130] phi printf_string::putc#22 = &cputc [phi:display_info_rom::@2->printf_string#0] -- pprz1=pprc1 + // [1323] call printf_string + // [1180] phi from display_info_rom::@2 to printf_string [phi:display_info_rom::@2->printf_string] + // [1180] phi printf_string::putc#22 = &cputc [phi:display_info_rom::@2->printf_string#0] -- pprz1=pprc1 lda #cputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#11 [phi:display_info_rom::@2->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 1 [phi:display_info_rom::@2->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#11 [phi:display_info_rom::@2->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 1 [phi:display_info_rom::@2->printf_string#2] -- vbuz1=vbuc1 lda #1 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = $19 [phi:display_info_rom::@2->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = $19 [phi:display_info_rom::@2->printf_string#3] -- vbuz1=vbuc1 lda #$19 sta.z printf_string.format_min_length jsr printf_string // display_info_rom::@1 __b1: // gotoxy(x,y) - // [1238] gotoxy::x#18 = display_info_rom::x#0 -- vbuxx=vbum1 - ldx x - // [1239] gotoxy::y#18 = display_info_rom::y#0 -- vbuyy=vbum1 - ldy y - // [1240] call gotoxy - // [718] phi from display_info_rom::@1 to gotoxy [phi:display_info_rom::@1->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#18 [phi:display_info_rom::@1->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#18 [phi:display_info_rom::@1->gotoxy#1] -- register_copy + // [1324] gotoxy::x#18 = display_info_rom::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z gotoxy.x + // [1325] gotoxy::y#18 = display_info_rom::y#0 -- vbuz1=vbuz2 + lda.z y + sta.z gotoxy.y + // [1326] call gotoxy + // [763] phi from display_info_rom::@1 to gotoxy [phi:display_info_rom::@1->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#18 [phi:display_info_rom::@1->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#18 [phi:display_info_rom::@1->gotoxy#1] -- register_copy jsr gotoxy // display_info_rom::@return // } - // [1241] return + // [1327] return rts .segment Data s: .text "ROM" .byte 0 - x: .byte 0 - y: .byte 0 - .label info_status = rom_get_version_text.release } .segment Code // rom_file -// __mem() char * rom_file(__register(A) char rom_chip) +// __mem() char * rom_file(__zp($ed) char rom_chip) rom_file: { + .label rom_file__0 = $ed + .label rom_chip = $ed // if(rom_chip) - // [1243] if(0!=rom_file::rom_chip#2) goto rom_file::@1 -- 0_neq_vbuaa_then_la1 - cmp #0 + // [1329] if(0!=rom_file::rom_chip#2) goto rom_file::@1 -- 0_neq_vbuz1_then_la1 + lda.z rom_chip bne __b1 - // [1246] phi from rom_file to rom_file::@return [phi:rom_file->rom_file::@return] - // [1246] phi rom_file::return#2 = rom_file::file_rom_cx16 [phi:rom_file->rom_file::@return#0] -- pbum1=pbuc1 + // [1332] phi from rom_file to rom_file::@return [phi:rom_file->rom_file::@return] + // [1332] phi rom_file::return#2 = rom_file::file_rom_cx16 [phi:rom_file->rom_file::@return#0] -- pbum1=pbuc1 lda #file_rom_cx16 @@ -7858,21 +8715,23 @@ rom_file: { // rom_file::@1 __b1: // '0'+rom_chip - // [1244] rom_file::$0 = '0' + rom_file::rom_chip#2 -- vbuaa=vbuc1_plus_vbuaa + // [1330] rom_file::$0 = '0' + rom_file::rom_chip#2 -- vbuz1=vbuc1_plus_vbuz1 + lda #'0' clc - adc #'0' + adc.z rom_file__0 + sta.z rom_file__0 // file_rom_card[3] = '0'+rom_chip - // [1245] *(rom_file::file_rom_card+3) = rom_file::$0 -- _deref_pbuc1=vbuaa + // [1331] *(rom_file::file_rom_card+3) = rom_file::$0 -- _deref_pbuc1=vbuz1 sta file_rom_card+3 - // [1246] phi from rom_file::@1 to rom_file::@return [phi:rom_file::@1->rom_file::@return] - // [1246] phi rom_file::return#2 = rom_file::file_rom_card [phi:rom_file::@1->rom_file::@return#0] -- pbum1=pbuc1 + // [1332] phi from rom_file::@1 to rom_file::@return [phi:rom_file::@1->rom_file::@return] + // [1332] phi rom_file::return#2 = rom_file::file_rom_card [phi:rom_file::@1->rom_file::@return#0] -- pbum1=pbuc1 lda #file_rom_card sta return+1 // rom_file::@return // } - // [1247] return + // [1333] return rts .segment Data file_rom_cx16: .text "ROM.BIN" @@ -7883,64 +8742,58 @@ rom_file: { } .segment Code // rom_read -// __zp($7c) unsigned long rom_read(__zp($c7) char display_progress, char rom_chip, __mem() char *file, char info_status, __zp($e9) char brom_bank_start, __zp($5b) unsigned long rom_size) +// __mem() unsigned long rom_read(__mem() char display_progress, char rom_chip, __mem() char *file, char info_status, __mem() char brom_bank_start, __zp($7b) unsigned long rom_size) rom_read: { .const bank_set_brom1_bank = 0 - .label rom_read__11 = $d0 - .label rom_address = $45 - .label return = $7c - .label rom_package_read = $f4 - .label brom_bank_start = $e9 - .label y = $f1 - .label ram_address = $ae - .label rom_file_size = $7c - .label rom_row_current = $67 - .label bram_bank = $e7 - .label rom_size = $5b - .label display_progress = $c7 + .label rom_read__11 = $f3 + .label rom_address = $57 + .label ram_address = $d2 + .label rom_row_current = $af + .label rom_size = $7b // unsigned long rom_address = rom_address_from_bank(brom_bank_start) - // [1249] rom_address_from_bank::rom_bank#0 = rom_read::brom_bank_start#22 -- vbuaa=vbuz1 - lda.z brom_bank_start - // [1250] call rom_address_from_bank - // [2365] phi from rom_read to rom_address_from_bank [phi:rom_read->rom_address_from_bank] - // [2365] phi rom_address_from_bank::rom_bank#3 = rom_address_from_bank::rom_bank#0 [phi:rom_read->rom_address_from_bank#0] -- register_copy + // [1335] rom_address_from_bank::rom_bank#0 = rom_read::brom_bank_start#22 -- vbum1=vbum2 + lda brom_bank_start + sta rom_address_from_bank.rom_bank + // [1336] call rom_address_from_bank + // [2427] phi from rom_read to rom_address_from_bank [phi:rom_read->rom_address_from_bank] + // [2427] phi rom_address_from_bank::rom_bank#3 = rom_address_from_bank::rom_bank#0 [phi:rom_read->rom_address_from_bank#0] -- register_copy jsr rom_address_from_bank // unsigned long rom_address = rom_address_from_bank(brom_bank_start) - // [1251] rom_address_from_bank::return#2 = rom_address_from_bank::return#0 + // [1337] rom_address_from_bank::return#2 = rom_address_from_bank::return#0 // rom_read::@17 - // [1252] rom_read::rom_address#0 = rom_address_from_bank::return#2 + // [1338] rom_read::rom_address#0 = rom_address_from_bank::return#2 // rom_read::bank_set_bram1 // BRAM = bank - // [1253] BRAM = 0 -- vbuz1=vbuc1 + // [1339] BRAM = 0 -- vbuz1=vbuc1 lda #0 sta.z BRAM // rom_read::bank_set_brom1 // BROM = bank - // [1254] BROM = rom_read::bank_set_brom1_bank#0 -- vbuz1=vbuc1 + // [1340] BROM = rom_read::bank_set_brom1_bank#0 -- vbuz1=vbuc1 lda #bank_set_brom1_bank sta.z BROM - // [1255] phi from rom_read::bank_set_brom1 to rom_read::@15 [phi:rom_read::bank_set_brom1->rom_read::@15] + // [1341] phi from rom_read::bank_set_brom1 to rom_read::@15 [phi:rom_read::bank_set_brom1->rom_read::@15] // rom_read::@15 // sprintf(info_text, "Opening %s from SD card ...", file) - // [1256] call snprintf_init - // [982] phi from rom_read::@15 to snprintf_init [phi:rom_read::@15->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:rom_read::@15->snprintf_init#0] -- pbuz1=pbuc1 + // [1342] call snprintf_init + // [1014] phi from rom_read::@15 to snprintf_init [phi:rom_read::@15->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:rom_read::@15->snprintf_init#0] -- pbuz1=pbuc1 lda #info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [1257] phi from rom_read::@15 to rom_read::@18 [phi:rom_read::@15->rom_read::@18] + // [1343] phi from rom_read::@15 to rom_read::@18 [phi:rom_read::@15->rom_read::@18] // rom_read::@18 // sprintf(info_text, "Opening %s from SD card ...", file) - // [1258] call printf_str - // [987] phi from rom_read::@18 to printf_str [phi:rom_read::@18->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_read::@18->printf_str#0] -- pprz1=pprc1 + // [1344] call printf_str + // [1019] phi from rom_read::@18 to printf_str [phi:rom_read::@18->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_read::@18->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = rom_read::s [phi:rom_read::@18->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = rom_read::s [phi:rom_read::@18->printf_str#1] -- pbuz1=pbuc1 lda #s @@ -7948,36 +8801,36 @@ rom_read: { jsr printf_str // rom_read::@19 // sprintf(info_text, "Opening %s from SD card ...", file) - // [1259] printf_string::str#13 = rom_read::file#11 -- pbuz1=pbum2 + // [1345] printf_string::str#13 = rom_read::file#11 -- pbuz1=pbum2 lda file sta.z printf_string.str lda file+1 sta.z printf_string.str+1 - // [1260] call printf_string - // [1130] phi from rom_read::@19 to printf_string [phi:rom_read::@19->printf_string] - // [1130] phi printf_string::putc#22 = &snputc [phi:rom_read::@19->printf_string#0] -- pprz1=pprc1 + // [1346] call printf_string + // [1180] phi from rom_read::@19 to printf_string [phi:rom_read::@19->printf_string] + // [1180] phi printf_string::putc#22 = &snputc [phi:rom_read::@19->printf_string#0] -- pprz1=pprc1 lda #snputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#13 [phi:rom_read::@19->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 0 [phi:rom_read::@19->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#13 [phi:rom_read::@19->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 0 [phi:rom_read::@19->printf_string#2] -- vbuz1=vbuc1 lda #0 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 0 [phi:rom_read::@19->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 0 [phi:rom_read::@19->printf_string#3] -- vbuz1=vbuc1 sta.z printf_string.format_min_length jsr printf_string - // [1261] phi from rom_read::@19 to rom_read::@20 [phi:rom_read::@19->rom_read::@20] + // [1347] phi from rom_read::@19 to rom_read::@20 [phi:rom_read::@19->rom_read::@20] // rom_read::@20 // sprintf(info_text, "Opening %s from SD card ...", file) - // [1262] call printf_str - // [987] phi from rom_read::@20 to printf_str [phi:rom_read::@20->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_read::@20->printf_str#0] -- pprz1=pprc1 + // [1348] call printf_str + // [1019] phi from rom_read::@20 to printf_str [phi:rom_read::@20->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_read::@20->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = rom_read::s1 [phi:rom_read::@20->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = rom_read::s1 [phi:rom_read::@20->printf_str#1] -- pbuz1=pbuc1 lda #s1 @@ -7985,17 +8838,17 @@ rom_read: { jsr printf_str // rom_read::@21 // sprintf(info_text, "Opening %s from SD card ...", file) - // [1263] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1349] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1264] callexecute snputc -- call_vprc1 + // [1350] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [1266] call display_action_text - // [1176] phi from rom_read::@21 to display_action_text [phi:rom_read::@21->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:rom_read::@21->display_action_text#0] -- pbuz1=pbuc1 + // [1352] call display_action_text + // [1262] phi from rom_read::@21 to display_action_text [phi:rom_read::@21->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:rom_read::@21->display_action_text#0] -- pbuz1=pbuc1 lda #info_text @@ -8003,26 +8856,26 @@ rom_read: { jsr display_action_text // rom_read::@22 // FILE *fp = fopen(file, "r") - // [1267] fopen::path#3 = rom_read::file#11 -- pbuz1=pbum2 + // [1353] fopen::path#3 = rom_read::file#11 -- pbuz1=pbum2 lda file sta.z fopen.path lda file+1 sta.z fopen.path+1 - // [1268] call fopen - // [2160] phi from rom_read::@22 to fopen [phi:rom_read::@22->fopen] - // [2160] phi __errno#333 = __errno#106 [phi:rom_read::@22->fopen#0] -- register_copy - // [2160] phi fopen::pathtoken#0 = fopen::path#3 [phi:rom_read::@22->fopen#1] -- register_copy + // [1354] call fopen + // [2217] phi from rom_read::@22 to fopen [phi:rom_read::@22->fopen] + // [2217] phi __errno#318 = __errno#108 [phi:rom_read::@22->fopen#0] -- register_copy + // [2217] phi fopen::pathtoken#0 = fopen::path#3 [phi:rom_read::@22->fopen#1] -- register_copy jsr fopen // FILE *fp = fopen(file, "r") - // [1269] fopen::return#4 = fopen::return#2 + // [1355] fopen::return#4 = fopen::return#2 // rom_read::@23 - // [1270] rom_read::fp#0 = fopen::return#4 -- pssm1=pssz2 + // [1356] rom_read::fp#0 = fopen::return#4 -- pssm1=pssz2 lda.z fopen.return sta fp lda.z fopen.return+1 sta fp+1 // if (fp) - // [1271] if((struct $2 *)0==rom_read::fp#0) goto rom_read::@1 -- pssc1_eq_pssm1_then_la1 + // [1357] if((struct $2 *)0==rom_read::fp#0) goto rom_read::@1 -- pssc1_eq_pssm1_then_la1 lda fp cmp #<0 bne !+ @@ -8030,114 +8883,116 @@ rom_read: { cmp #>0 beq __b2 !: - // [1272] phi from rom_read::@23 to rom_read::@2 [phi:rom_read::@23->rom_read::@2] + // [1358] phi from rom_read::@23 to rom_read::@2 [phi:rom_read::@23->rom_read::@2] // rom_read::@2 // gotoxy(x, y) - // [1273] call gotoxy - // [718] phi from rom_read::@2 to gotoxy [phi:rom_read::@2->gotoxy] - // [718] phi gotoxy::y#30 = PROGRESS_Y [phi:rom_read::@2->gotoxy#0] -- vbuyy=vbuc1 - ldy #PROGRESS_Y - // [718] phi gotoxy::x#30 = PROGRESS_X [phi:rom_read::@2->gotoxy#1] -- vbuxx=vbuc1 - ldx #PROGRESS_X + // [1359] call gotoxy + // [763] phi from rom_read::@2 to gotoxy [phi:rom_read::@2->gotoxy] + // [763] phi gotoxy::y#30 = PROGRESS_Y [phi:rom_read::@2->gotoxy#0] -- vbuz1=vbuc1 + lda #PROGRESS_Y + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = PROGRESS_X [phi:rom_read::@2->gotoxy#1] -- vbuz1=vbuc1 + lda #PROGRESS_X + sta.z gotoxy.x jsr gotoxy - // [1274] phi from rom_read::@2 to rom_read::@3 [phi:rom_read::@2->rom_read::@3] - // [1274] phi rom_read::y#11 = PROGRESS_Y [phi:rom_read::@2->rom_read::@3#0] -- vbuz1=vbuc1 + // [1360] phi from rom_read::@2 to rom_read::@3 [phi:rom_read::@2->rom_read::@3] + // [1360] phi rom_read::y#11 = PROGRESS_Y [phi:rom_read::@2->rom_read::@3#0] -- vbum1=vbuc1 lda #PROGRESS_Y - sta.z y - // [1274] phi rom_read::rom_row_current#10 = 0 [phi:rom_read::@2->rom_read::@3#1] -- vwuz1=vwuc1 + sta y + // [1360] phi rom_read::rom_row_current#10 = 0 [phi:rom_read::@2->rom_read::@3#1] -- vwuz1=vwuc1 lda #<0 sta.z rom_row_current sta.z rom_row_current+1 - // [1274] phi rom_read::brom_bank_start#10 = rom_read::brom_bank_start#22 [phi:rom_read::@2->rom_read::@3#2] -- register_copy - // [1274] phi rom_read::rom_address#10 = rom_read::rom_address#0 [phi:rom_read::@2->rom_read::@3#3] -- register_copy - // [1274] phi rom_read::ram_address#10 = (char *)$7800 [phi:rom_read::@2->rom_read::@3#4] -- pbuz1=pbuc1 + // [1360] phi rom_read::brom_bank_start#10 = rom_read::brom_bank_start#22 [phi:rom_read::@2->rom_read::@3#2] -- register_copy + // [1360] phi rom_read::rom_address#10 = rom_read::rom_address#0 [phi:rom_read::@2->rom_read::@3#3] -- register_copy + // [1360] phi rom_read::ram_address#10 = (char *)$7800 [phi:rom_read::@2->rom_read::@3#4] -- pbuz1=pbuc1 lda #<$7800 sta.z ram_address lda #>$7800 sta.z ram_address+1 - // [1274] phi rom_read::bram_bank#10 = 0 [phi:rom_read::@2->rom_read::@3#5] -- vbuz1=vbuc1 + // [1360] phi rom_read::bram_bank#10 = 0 [phi:rom_read::@2->rom_read::@3#5] -- vbum1=vbuc1 lda #0 - sta.z bram_bank - // [1274] phi rom_read::rom_file_size#11 = 0 [phi:rom_read::@2->rom_read::@3#6] -- vduz1=vduc1 - sta.z rom_file_size - sta.z rom_file_size+1 + sta bram_bank + // [1360] phi rom_read::rom_file_size#11 = 0 [phi:rom_read::@2->rom_read::@3#6] -- vdum1=vduc1 + sta rom_file_size + sta rom_file_size+1 lda #<0>>$10 - sta.z rom_file_size+2 + sta rom_file_size+2 lda #>0>>$10 - sta.z rom_file_size+3 + sta rom_file_size+3 // rom_read::@3 __b3: // while (rom_file_size < rom_size) - // [1275] if(rom_read::rom_file_size#11fclose] - // [2295] phi fclose::stream#2 = fclose::stream#1 [phi:rom_read::@7->fclose#0] -- register_copy + // [1363] call fclose + // [2352] phi from rom_read::@7 to fclose [phi:rom_read::@7->fclose] + // [2352] phi fclose::stream#2 = fclose::stream#1 [phi:rom_read::@7->fclose#0] -- register_copy jsr fclose - // [1278] phi from rom_read::@7 to rom_read::@1 [phi:rom_read::@7->rom_read::@1] - // [1278] phi rom_read::return#0 = rom_read::rom_file_size#11 [phi:rom_read::@7->rom_read::@1#0] -- register_copy + // [1364] phi from rom_read::@7 to rom_read::@1 [phi:rom_read::@7->rom_read::@1] + // [1364] phi rom_read::return#0 = rom_read::rom_file_size#11 [phi:rom_read::@7->rom_read::@1#0] -- register_copy rts - // [1278] phi from rom_read::@23 to rom_read::@1 [phi:rom_read::@23->rom_read::@1] + // [1364] phi from rom_read::@23 to rom_read::@1 [phi:rom_read::@23->rom_read::@1] __b2: - // [1278] phi rom_read::return#0 = 0 [phi:rom_read::@23->rom_read::@1#0] -- vduz1=vduc1 + // [1364] phi rom_read::return#0 = 0 [phi:rom_read::@23->rom_read::@1#0] -- vdum1=vduc1 lda #<0 - sta.z return - sta.z return+1 + sta return + sta return+1 lda #<0>>$10 - sta.z return+2 + sta return+2 lda #>0>>$10 - sta.z return+3 + sta return+3 // rom_read::@1 // rom_read::@return // } - // [1279] return + // [1365] return rts - // [1280] phi from rom_read::@3 to rom_read::@4 [phi:rom_read::@3->rom_read::@4] + // [1366] phi from rom_read::@3 to rom_read::@4 [phi:rom_read::@3->rom_read::@4] // rom_read::@4 __b4: // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1281] call snprintf_init - // [982] phi from rom_read::@4 to snprintf_init [phi:rom_read::@4->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:rom_read::@4->snprintf_init#0] -- pbuz1=pbuc1 + // [1367] call snprintf_init + // [1014] phi from rom_read::@4 to snprintf_init [phi:rom_read::@4->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:rom_read::@4->snprintf_init#0] -- pbuz1=pbuc1 lda #info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [1282] phi from rom_read::@4 to rom_read::@24 [phi:rom_read::@4->rom_read::@24] + // [1368] phi from rom_read::@4 to rom_read::@24 [phi:rom_read::@4->rom_read::@24] // rom_read::@24 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1283] call printf_str - // [987] phi from rom_read::@24 to printf_str [phi:rom_read::@24->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_read::@24->printf_str#0] -- pprz1=pprc1 + // [1369] call printf_str + // [1019] phi from rom_read::@24 to printf_str [phi:rom_read::@24->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_read::@24->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s13 [phi:rom_read::@24->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s13 [phi:rom_read::@24->printf_str#1] -- pbuz1=pbuc1 lda #s13 @@ -8145,36 +9000,36 @@ rom_read: { jsr printf_str // rom_read::@25 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1284] printf_string::str#14 = rom_read::file#11 -- pbuz1=pbum2 + // [1370] printf_string::str#14 = rom_read::file#11 -- pbuz1=pbum2 lda file sta.z printf_string.str lda file+1 sta.z printf_string.str+1 - // [1285] call printf_string - // [1130] phi from rom_read::@25 to printf_string [phi:rom_read::@25->printf_string] - // [1130] phi printf_string::putc#22 = &snputc [phi:rom_read::@25->printf_string#0] -- pprz1=pprc1 + // [1371] call printf_string + // [1180] phi from rom_read::@25 to printf_string [phi:rom_read::@25->printf_string] + // [1180] phi printf_string::putc#22 = &snputc [phi:rom_read::@25->printf_string#0] -- pprz1=pprc1 lda #snputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#14 [phi:rom_read::@25->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 0 [phi:rom_read::@25->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#14 [phi:rom_read::@25->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 0 [phi:rom_read::@25->printf_string#2] -- vbuz1=vbuc1 lda #0 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 0 [phi:rom_read::@25->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 0 [phi:rom_read::@25->printf_string#3] -- vbuz1=vbuc1 sta.z printf_string.format_min_length jsr printf_string - // [1286] phi from rom_read::@25 to rom_read::@26 [phi:rom_read::@25->rom_read::@26] + // [1372] phi from rom_read::@25 to rom_read::@26 [phi:rom_read::@25->rom_read::@26] // rom_read::@26 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1287] call printf_str - // [987] phi from rom_read::@26 to printf_str [phi:rom_read::@26->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_read::@26->printf_str#0] -- pprz1=pprc1 + // [1373] call printf_str + // [1019] phi from rom_read::@26 to printf_str [phi:rom_read::@26->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_read::@26->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s3 [phi:rom_read::@26->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s3 [phi:rom_read::@26->printf_str#1] -- pbuz1=pbuc1 lda #s3 @@ -8182,38 +9037,39 @@ rom_read: { jsr printf_str // rom_read::@27 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1288] printf_ulong::uvalue#0 = rom_read::rom_file_size#11 -- vduz1=vduz2 - lda.z rom_file_size + // [1374] printf_ulong::uvalue#0 = rom_read::rom_file_size#11 -- vduz1=vdum2 + lda rom_file_size sta.z printf_ulong.uvalue - lda.z rom_file_size+1 + lda rom_file_size+1 sta.z printf_ulong.uvalue+1 - lda.z rom_file_size+2 + lda rom_file_size+2 sta.z printf_ulong.uvalue+2 - lda.z rom_file_size+3 + lda rom_file_size+3 sta.z printf_ulong.uvalue+3 - // [1289] call printf_ulong - // [1399] phi from rom_read::@27 to printf_ulong [phi:rom_read::@27->printf_ulong] - // [1399] phi printf_ulong::format_zero_padding#10 = 1 [phi:rom_read::@27->printf_ulong#0] -- vbuz1=vbuc1 + // [1375] call printf_ulong + // [1485] phi from rom_read::@27 to printf_ulong [phi:rom_read::@27->printf_ulong] + // [1485] phi printf_ulong::format_zero_padding#10 = 1 [phi:rom_read::@27->printf_ulong#0] -- vbuz1=vbuc1 lda #1 sta.z printf_ulong.format_zero_padding - // [1399] phi printf_ulong::format_min_length#10 = 5 [phi:rom_read::@27->printf_ulong#1] -- vbuz1=vbuc1 + // [1485] phi printf_ulong::format_min_length#10 = 5 [phi:rom_read::@27->printf_ulong#1] -- vbuz1=vbuc1 lda #5 sta.z printf_ulong.format_min_length - // [1399] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:rom_read::@27->printf_ulong#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [1399] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#0 [phi:rom_read::@27->printf_ulong#3] -- register_copy + // [1485] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:rom_read::@27->printf_ulong#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_ulong.format_radix + // [1485] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#0 [phi:rom_read::@27->printf_ulong#3] -- register_copy jsr printf_ulong - // [1290] phi from rom_read::@27 to rom_read::@28 [phi:rom_read::@27->rom_read::@28] + // [1376] phi from rom_read::@27 to rom_read::@28 [phi:rom_read::@27->rom_read::@28] // rom_read::@28 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1291] call printf_str - // [987] phi from rom_read::@28 to printf_str [phi:rom_read::@28->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_read::@28->printf_str#0] -- pprz1=pprc1 + // [1377] call printf_str + // [1019] phi from rom_read::@28 to printf_str [phi:rom_read::@28->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_read::@28->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s1 [phi:rom_read::@28->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s1 [phi:rom_read::@28->printf_str#1] -- pbuz1=pbuc1 lda #<@s1 sta.z printf_str.s lda #>@s1 @@ -8221,7 +9077,7 @@ rom_read: { jsr printf_str // rom_read::@29 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1292] printf_ulong::uvalue#1 = rom_read::rom_size#12 -- vduz1=vduz2 + // [1378] printf_ulong::uvalue#1 = rom_read::rom_size#12 -- vduz1=vduz2 lda.z rom_size sta.z printf_ulong.uvalue lda.z rom_size+1 @@ -8230,29 +9086,30 @@ rom_read: { sta.z printf_ulong.uvalue+2 lda.z rom_size+3 sta.z printf_ulong.uvalue+3 - // [1293] call printf_ulong - // [1399] phi from rom_read::@29 to printf_ulong [phi:rom_read::@29->printf_ulong] - // [1399] phi printf_ulong::format_zero_padding#10 = 1 [phi:rom_read::@29->printf_ulong#0] -- vbuz1=vbuc1 + // [1379] call printf_ulong + // [1485] phi from rom_read::@29 to printf_ulong [phi:rom_read::@29->printf_ulong] + // [1485] phi printf_ulong::format_zero_padding#10 = 1 [phi:rom_read::@29->printf_ulong#0] -- vbuz1=vbuc1 lda #1 sta.z printf_ulong.format_zero_padding - // [1399] phi printf_ulong::format_min_length#10 = 5 [phi:rom_read::@29->printf_ulong#1] -- vbuz1=vbuc1 + // [1485] phi printf_ulong::format_min_length#10 = 5 [phi:rom_read::@29->printf_ulong#1] -- vbuz1=vbuc1 lda #5 sta.z printf_ulong.format_min_length - // [1399] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:rom_read::@29->printf_ulong#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [1399] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#1 [phi:rom_read::@29->printf_ulong#3] -- register_copy + // [1485] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:rom_read::@29->printf_ulong#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_ulong.format_radix + // [1485] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#1 [phi:rom_read::@29->printf_ulong#3] -- register_copy jsr printf_ulong - // [1294] phi from rom_read::@29 to rom_read::@30 [phi:rom_read::@29->rom_read::@30] + // [1380] phi from rom_read::@29 to rom_read::@30 [phi:rom_read::@29->rom_read::@30] // rom_read::@30 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1295] call printf_str - // [987] phi from rom_read::@30 to printf_str [phi:rom_read::@30->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_read::@30->printf_str#0] -- pprz1=pprc1 + // [1381] call printf_str + // [1019] phi from rom_read::@30 to printf_str [phi:rom_read::@30->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_read::@30->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s2 [phi:rom_read::@30->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s2 [phi:rom_read::@30->printf_str#1] -- pbuz1=pbuc1 lda #s2 @@ -8260,36 +9117,38 @@ rom_read: { jsr printf_str // rom_read::@31 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1296] printf_uchar::uvalue#9 = rom_read::bram_bank#10 -- vbuxx=vbuz1 - ldx.z bram_bank - // [1297] call printf_uchar - // [1165] phi from rom_read::@31 to printf_uchar [phi:rom_read::@31->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 1 [phi:rom_read::@31->printf_uchar#0] -- vbuz1=vbuc1 + // [1382] printf_uchar::uvalue#9 = rom_read::bram_bank#10 -- vbuz1=vbum2 + lda bram_bank + sta.z printf_uchar.uvalue + // [1383] call printf_uchar + // [1251] phi from rom_read::@31 to printf_uchar [phi:rom_read::@31->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 1 [phi:rom_read::@31->printf_uchar#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 2 [phi:rom_read::@31->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 2 [phi:rom_read::@31->printf_uchar#1] -- vbuz1=vbuc1 lda #2 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:rom_read::@31->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:rom_read::@31->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = HEXADECIMAL [phi:rom_read::@31->printf_uchar#3] -- vbuyy=vbuc1 - ldy #HEXADECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#9 [phi:rom_read::@31->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = HEXADECIMAL [phi:rom_read::@31->printf_uchar#3] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#9 [phi:rom_read::@31->printf_uchar#4] -- register_copy jsr printf_uchar - // [1298] phi from rom_read::@31 to rom_read::@32 [phi:rom_read::@31->rom_read::@32] + // [1384] phi from rom_read::@31 to rom_read::@32 [phi:rom_read::@31->rom_read::@32] // rom_read::@32 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1299] call printf_str - // [987] phi from rom_read::@32 to printf_str [phi:rom_read::@32->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_read::@32->printf_str#0] -- pprz1=pprc1 + // [1385] call printf_str + // [1019] phi from rom_read::@32 to printf_str [phi:rom_read::@32->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_read::@32->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s3 [phi:rom_read::@32->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s3 [phi:rom_read::@32->printf_str#1] -- pbuz1=pbuc1 lda #s3 @@ -8297,34 +9156,35 @@ rom_read: { jsr printf_str // rom_read::@33 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1300] printf_uint::uvalue#9 = (unsigned int)rom_read::ram_address#10 -- vwuz1=vwuz2 + // [1386] printf_uint::uvalue#9 = (unsigned int)rom_read::ram_address#10 -- vwuz1=vwuz2 lda.z ram_address sta.z printf_uint.uvalue lda.z ram_address+1 sta.z printf_uint.uvalue+1 - // [1301] call printf_uint - // [996] phi from rom_read::@33 to printf_uint [phi:rom_read::@33->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:rom_read::@33->printf_uint#0] -- vbuz1=vbuc1 + // [1387] call printf_uint + // [1028] phi from rom_read::@33 to printf_uint [phi:rom_read::@33->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:rom_read::@33->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 4 [phi:rom_read::@33->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 4 [phi:rom_read::@33->printf_uint#1] -- vbuz1=vbuc1 lda #4 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:rom_read::@33->printf_uint#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#9 [phi:rom_read::@33->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:rom_read::@33->printf_uint#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#9 [phi:rom_read::@33->printf_uint#3] -- register_copy jsr printf_uint - // [1302] phi from rom_read::@33 to rom_read::@34 [phi:rom_read::@33->rom_read::@34] + // [1388] phi from rom_read::@33 to rom_read::@34 [phi:rom_read::@33->rom_read::@34] // rom_read::@34 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1303] call printf_str - // [987] phi from rom_read::@34 to printf_str [phi:rom_read::@34->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_read::@34->printf_str#0] -- pprz1=pprc1 + // [1389] call printf_str + // [1019] phi from rom_read::@34 to printf_str [phi:rom_read::@34->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_read::@34->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s4 [phi:rom_read::@34->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s4 [phi:rom_read::@34->printf_str#1] -- pbuz1=pbuc1 lda #s4 @@ -8332,17 +9192,17 @@ rom_read: { jsr printf_str // rom_read::@35 // sprintf(info_text, "Reading %s:%05x/%05x -> RAM:%02x:%04p ...", file, rom_file_size, rom_size, bram_bank, ram_address) - // [1304] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1390] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1305] callexecute snputc -- call_vprc1 + // [1391] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [1307] call display_action_text - // [1176] phi from rom_read::@35 to display_action_text [phi:rom_read::@35->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:rom_read::@35->display_action_text#0] -- pbuz1=pbuc1 + // [1393] call display_action_text + // [1262] phi from rom_read::@35 to display_action_text [phi:rom_read::@35->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:rom_read::@35->display_action_text#0] -- pbuz1=pbuc1 lda #info_text @@ -8350,7 +9210,7 @@ rom_read: { jsr display_action_text // rom_read::@36 // rom_address % 0x04000 - // [1308] rom_read::$11 = rom_read::rom_address#10 & $4000-1 -- vduz1=vduz2_band_vduc1 + // [1394] rom_read::$11 = rom_read::rom_address#10 & $4000-1 -- vduz1=vduz2_band_vduc1 lda.z rom_address and #<$4000-1 sta.z rom_read__11 @@ -8364,7 +9224,7 @@ rom_read: { and #>$4000-1>>$10 sta.z rom_read__11+3 // if (!(rom_address % 0x04000)) - // [1309] if(0!=rom_read::$11) goto rom_read::@5 -- 0_neq_vduz1_then_la1 + // [1395] if(0!=rom_read::$11) goto rom_read::@5 -- 0_neq_vduz1_then_la1 lda.z rom_read__11 ora.z rom_read__11+1 ora.z rom_read__11+2 @@ -8372,57 +9232,57 @@ rom_read: { bne __b5 // rom_read::@11 // brom_bank_start++; - // [1310] rom_read::brom_bank_start#0 = ++ rom_read::brom_bank_start#10 -- vbuz1=_inc_vbuz1 - inc.z brom_bank_start - // [1311] phi from rom_read::@11 rom_read::@36 to rom_read::@5 [phi:rom_read::@11/rom_read::@36->rom_read::@5] - // [1311] phi rom_read::brom_bank_start#20 = rom_read::brom_bank_start#0 [phi:rom_read::@11/rom_read::@36->rom_read::@5#0] -- register_copy + // [1396] rom_read::brom_bank_start#0 = ++ rom_read::brom_bank_start#10 -- vbum1=_inc_vbum1 + inc brom_bank_start + // [1397] phi from rom_read::@11 rom_read::@36 to rom_read::@5 [phi:rom_read::@11/rom_read::@36->rom_read::@5] + // [1397] phi rom_read::brom_bank_start#20 = rom_read::brom_bank_start#0 [phi:rom_read::@11/rom_read::@36->rom_read::@5#0] -- register_copy // rom_read::@5 __b5: // rom_read::bank_set_bram2 // BRAM = bank - // [1312] BRAM = rom_read::bram_bank#10 -- vbuz1=vbuz2 - lda.z bram_bank + // [1398] BRAM = rom_read::bram_bank#10 -- vbuz1=vbum2 + lda bram_bank sta.z BRAM // rom_read::@16 // unsigned int rom_package_read = fgets(ram_address, ROM_PROGRESS_CELL, fp) - // [1313] fgets::ptr#3 = rom_read::ram_address#10 -- pbuz1=pbuz2 + // [1399] fgets::ptr#4 = rom_read::ram_address#10 -- pbuz1=pbuz2 lda.z ram_address sta.z fgets.ptr lda.z ram_address+1 sta.z fgets.ptr+1 - // [1314] fgets::stream#1 = rom_read::fp#0 -- pssz1=pssm2 + // [1400] fgets::stream#2 = rom_read::fp#0 -- pssm1=pssm2 lda fp - sta.z fgets.stream + sta fgets.stream lda fp+1 - sta.z fgets.stream+1 - // [1315] call fgets - // [2241] phi from rom_read::@16 to fgets [phi:rom_read::@16->fgets] - // [2241] phi fgets::ptr#12 = fgets::ptr#3 [phi:rom_read::@16->fgets#0] -- register_copy - // [2241] phi fgets::size#10 = ROM_PROGRESS_CELL [phi:rom_read::@16->fgets#1] -- vwuz1=vwuc1 + sta fgets.stream+1 + // [1401] call fgets + // [2298] phi from rom_read::@16 to fgets [phi:rom_read::@16->fgets] + // [2298] phi fgets::ptr#13 = fgets::ptr#4 [phi:rom_read::@16->fgets#0] -- register_copy + // [2298] phi fgets::size#11 = ROM_PROGRESS_CELL [phi:rom_read::@16->fgets#1] -- vwuz1=vwuc1 lda #ROM_PROGRESS_CELL sta.z fgets.size+1 - // [2241] phi fgets::stream#2 = fgets::stream#1 [phi:rom_read::@16->fgets#2] -- register_copy + // [2298] phi fgets::stream#3 = fgets::stream#2 [phi:rom_read::@16->fgets#2] -- register_copy jsr fgets // unsigned int rom_package_read = fgets(ram_address, ROM_PROGRESS_CELL, fp) - // [1316] fgets::return#6 = fgets::return#1 + // [1402] fgets::return#11 = fgets::return#1 // rom_read::@37 - // [1317] rom_read::rom_package_read#0 = fgets::return#6 -- vwuz1=vwuz2 + // [1403] rom_read::rom_package_read#0 = fgets::return#11 -- vwum1=vwuz2 lda.z fgets.return - sta.z rom_package_read + sta rom_package_read lda.z fgets.return+1 - sta.z rom_package_read+1 + sta rom_package_read+1 // if (!rom_package_read) - // [1318] if(0!=rom_read::rom_package_read#0) goto rom_read::@6 -- 0_neq_vwuz1_then_la1 - lda.z rom_package_read - ora.z rom_package_read+1 + // [1404] if(0!=rom_read::rom_package_read#0) goto rom_read::@6 -- 0_neq_vwum1_then_la1 + lda rom_package_read + ora rom_package_read+1 bne __b6 jmp __b7 // rom_read::@6 __b6: // if (rom_row_current == ROM_PROGRESS_ROW) - // [1319] if(rom_read::rom_row_current#10!=ROM_PROGRESS_ROW) goto rom_read::@8 -- vwuz1_neq_vwuc1_then_la1 + // [1405] if(rom_read::rom_row_current#10!=ROM_PROGRESS_ROW) goto rom_read::@8 -- vwuz1_neq_vwuc1_then_la1 lda.z rom_row_current+1 cmp #>ROM_PROGRESS_ROW bne __b8 @@ -8431,60 +9291,62 @@ rom_read: { bne __b8 // rom_read::@12 // gotoxy(x, ++y); - // [1320] rom_read::y#1 = ++ rom_read::y#11 -- vbuz1=_inc_vbuz1 - inc.z y + // [1406] rom_read::y#1 = ++ rom_read::y#11 -- vbum1=_inc_vbum1 + inc y // gotoxy(x, ++y) - // [1321] gotoxy::y#25 = rom_read::y#1 -- vbuyy=vbuz1 - ldy.z y - // [1322] call gotoxy - // [718] phi from rom_read::@12 to gotoxy [phi:rom_read::@12->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#25 [phi:rom_read::@12->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = PROGRESS_X [phi:rom_read::@12->gotoxy#1] -- vbuxx=vbuc1 - ldx #PROGRESS_X + // [1407] gotoxy::y#25 = rom_read::y#1 -- vbuz1=vbum2 + lda y + sta.z gotoxy.y + // [1408] call gotoxy + // [763] phi from rom_read::@12 to gotoxy [phi:rom_read::@12->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#25 [phi:rom_read::@12->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = PROGRESS_X [phi:rom_read::@12->gotoxy#1] -- vbuz1=vbuc1 + lda #PROGRESS_X + sta.z gotoxy.x jsr gotoxy - // [1323] phi from rom_read::@12 to rom_read::@8 [phi:rom_read::@12->rom_read::@8] - // [1323] phi rom_read::y#36 = rom_read::y#1 [phi:rom_read::@12->rom_read::@8#0] -- register_copy - // [1323] phi rom_read::rom_row_current#4 = 0 [phi:rom_read::@12->rom_read::@8#1] -- vwuz1=vbuc1 + // [1409] phi from rom_read::@12 to rom_read::@8 [phi:rom_read::@12->rom_read::@8] + // [1409] phi rom_read::y#36 = rom_read::y#1 [phi:rom_read::@12->rom_read::@8#0] -- register_copy + // [1409] phi rom_read::rom_row_current#4 = 0 [phi:rom_read::@12->rom_read::@8#1] -- vwuz1=vbuc1 lda #<0 sta.z rom_row_current sta.z rom_row_current+1 - // [1323] phi from rom_read::@6 to rom_read::@8 [phi:rom_read::@6->rom_read::@8] - // [1323] phi rom_read::y#36 = rom_read::y#11 [phi:rom_read::@6->rom_read::@8#0] -- register_copy - // [1323] phi rom_read::rom_row_current#4 = rom_read::rom_row_current#10 [phi:rom_read::@6->rom_read::@8#1] -- register_copy + // [1409] phi from rom_read::@6 to rom_read::@8 [phi:rom_read::@6->rom_read::@8] + // [1409] phi rom_read::y#36 = rom_read::y#11 [phi:rom_read::@6->rom_read::@8#0] -- register_copy + // [1409] phi rom_read::rom_row_current#4 = rom_read::rom_row_current#10 [phi:rom_read::@6->rom_read::@8#1] -- register_copy // rom_read::@8 __b8: // if(display_progress) - // [1324] if(0==rom_read::display_progress#28) goto rom_read::@9 -- 0_eq_vbuz1_then_la1 - lda.z display_progress + // [1410] if(0==rom_read::display_progress#28) goto rom_read::@9 -- 0_eq_vbum1_then_la1 + lda display_progress beq __b9 // rom_read::@13 // cputc('.') - // [1325] stackpush(char) = '.' -- _stackpushbyte_=vbuc1 + // [1411] stackpush(char) = '.' -- _stackpushbyte_=vbuc1 lda #'.' pha - // [1326] callexecute cputc -- call_vprc1 + // [1412] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // rom_read::@9 __b9: // ram_address += rom_package_read - // [1328] rom_read::ram_address#1 = rom_read::ram_address#10 + rom_read::rom_package_read#0 -- pbuz1=pbuz1_plus_vwuz2 + // [1414] rom_read::ram_address#1 = rom_read::ram_address#10 + rom_read::rom_package_read#0 -- pbuz1=pbuz1_plus_vwum2 clc lda.z ram_address - adc.z rom_package_read + adc rom_package_read sta.z ram_address lda.z ram_address+1 - adc.z rom_package_read+1 + adc rom_package_read+1 sta.z ram_address+1 // rom_address += rom_package_read - // [1329] rom_read::rom_address#1 = rom_read::rom_address#10 + rom_read::rom_package_read#0 -- vduz1=vduz1_plus_vwuz2 + // [1415] rom_read::rom_address#1 = rom_read::rom_address#10 + rom_read::rom_package_read#0 -- vduz1=vduz1_plus_vwum2 lda.z rom_address clc - adc.z rom_package_read + adc rom_package_read sta.z rom_address lda.z rom_address+1 - adc.z rom_package_read+1 + adc rom_package_read+1 sta.z rom_address+1 lda.z rom_address+2 adc #0 @@ -8493,31 +9355,31 @@ rom_read: { adc #0 sta.z rom_address+3 // rom_file_size += rom_package_read - // [1330] rom_read::rom_file_size#1 = rom_read::rom_file_size#11 + rom_read::rom_package_read#0 -- vduz1=vduz1_plus_vwuz2 - lda.z rom_file_size + // [1416] rom_read::rom_file_size#1 = rom_read::rom_file_size#11 + rom_read::rom_package_read#0 -- vdum1=vdum1_plus_vwum2 + lda rom_file_size clc - adc.z rom_package_read - sta.z rom_file_size - lda.z rom_file_size+1 - adc.z rom_package_read+1 - sta.z rom_file_size+1 - lda.z rom_file_size+2 + adc rom_package_read + sta rom_file_size + lda rom_file_size+1 + adc rom_package_read+1 + sta rom_file_size+1 + lda rom_file_size+2 adc #0 - sta.z rom_file_size+2 - lda.z rom_file_size+3 + sta rom_file_size+2 + lda rom_file_size+3 adc #0 - sta.z rom_file_size+3 + sta rom_file_size+3 // rom_row_current += rom_package_read - // [1331] rom_read::rom_row_current#2 = rom_read::rom_row_current#4 + rom_read::rom_package_read#0 -- vwuz1=vwuz1_plus_vwuz2 + // [1417] rom_read::rom_row_current#2 = rom_read::rom_row_current#4 + rom_read::rom_package_read#0 -- vwuz1=vwuz1_plus_vwum2 clc lda.z rom_row_current - adc.z rom_package_read + adc rom_package_read sta.z rom_row_current lda.z rom_row_current+1 - adc.z rom_package_read+1 + adc rom_package_read+1 sta.z rom_row_current+1 // if (ram_address == (ram_ptr_t)BRAM_HIGH) - // [1332] if(rom_read::ram_address#1!=(char *)$c000) goto rom_read::@10 -- pbuz1_neq_pbuc1_then_la1 + // [1418] if(rom_read::ram_address#1!=(char *)$c000) goto rom_read::@10 -- pbuz1_neq_pbuc1_then_la1 lda.z ram_address+1 cmp #>$c000 bne __b10 @@ -8526,22 +9388,22 @@ rom_read: { bne __b10 // rom_read::@14 // bram_bank++; - // [1333] rom_read::bram_bank#1 = ++ rom_read::bram_bank#10 -- vbuz1=_inc_vbuz1 - inc.z bram_bank - // [1334] phi from rom_read::@14 to rom_read::@10 [phi:rom_read::@14->rom_read::@10] - // [1334] phi rom_read::bram_bank#31 = rom_read::bram_bank#1 [phi:rom_read::@14->rom_read::@10#0] -- register_copy - // [1334] phi rom_read::ram_address#7 = (char *)$a000 [phi:rom_read::@14->rom_read::@10#1] -- pbuz1=pbuc1 + // [1419] rom_read::bram_bank#1 = ++ rom_read::bram_bank#10 -- vbum1=_inc_vbum1 + inc bram_bank + // [1420] phi from rom_read::@14 to rom_read::@10 [phi:rom_read::@14->rom_read::@10] + // [1420] phi rom_read::bram_bank#31 = rom_read::bram_bank#1 [phi:rom_read::@14->rom_read::@10#0] -- register_copy + // [1420] phi rom_read::ram_address#7 = (char *)$a000 [phi:rom_read::@14->rom_read::@10#1] -- pbuz1=pbuc1 lda #<$a000 sta.z ram_address lda #>$a000 sta.z ram_address+1 - // [1334] phi from rom_read::@9 to rom_read::@10 [phi:rom_read::@9->rom_read::@10] - // [1334] phi rom_read::bram_bank#31 = rom_read::bram_bank#10 [phi:rom_read::@9->rom_read::@10#0] -- register_copy - // [1334] phi rom_read::ram_address#7 = rom_read::ram_address#1 [phi:rom_read::@9->rom_read::@10#1] -- register_copy + // [1420] phi from rom_read::@9 to rom_read::@10 [phi:rom_read::@9->rom_read::@10] + // [1420] phi rom_read::bram_bank#31 = rom_read::bram_bank#10 [phi:rom_read::@9->rom_read::@10#0] -- register_copy + // [1420] phi rom_read::ram_address#7 = rom_read::ram_address#1 [phi:rom_read::@9->rom_read::@10#1] -- register_copy // rom_read::@10 __b10: // if (ram_address == (ram_ptr_t)RAM_HIGH) - // [1335] if(rom_read::ram_address#7!=(char *)$9800) goto rom_read::@38 -- pbuz1_neq_pbuc1_then_la1 + // [1421] if(rom_read::ram_address#7!=(char *)$9800) goto rom_read::@38 -- pbuz1_neq_pbuc1_then_la1 lda.z ram_address+1 cmp #>$9800 beq !__b3+ @@ -8552,62 +9414,65 @@ rom_read: { beq !__b3+ jmp __b3 !__b3: - // [1274] phi from rom_read::@10 to rom_read::@3 [phi:rom_read::@10->rom_read::@3] - // [1274] phi rom_read::y#11 = rom_read::y#36 [phi:rom_read::@10->rom_read::@3#0] -- register_copy - // [1274] phi rom_read::rom_row_current#10 = rom_read::rom_row_current#2 [phi:rom_read::@10->rom_read::@3#1] -- register_copy - // [1274] phi rom_read::brom_bank_start#10 = rom_read::brom_bank_start#20 [phi:rom_read::@10->rom_read::@3#2] -- register_copy - // [1274] phi rom_read::rom_address#10 = rom_read::rom_address#1 [phi:rom_read::@10->rom_read::@3#3] -- register_copy - // [1274] phi rom_read::ram_address#10 = (char *)$a000 [phi:rom_read::@10->rom_read::@3#4] -- pbuz1=pbuc1 + // [1360] phi from rom_read::@10 to rom_read::@3 [phi:rom_read::@10->rom_read::@3] + // [1360] phi rom_read::y#11 = rom_read::y#36 [phi:rom_read::@10->rom_read::@3#0] -- register_copy + // [1360] phi rom_read::rom_row_current#10 = rom_read::rom_row_current#2 [phi:rom_read::@10->rom_read::@3#1] -- register_copy + // [1360] phi rom_read::brom_bank_start#10 = rom_read::brom_bank_start#20 [phi:rom_read::@10->rom_read::@3#2] -- register_copy + // [1360] phi rom_read::rom_address#10 = rom_read::rom_address#1 [phi:rom_read::@10->rom_read::@3#3] -- register_copy + // [1360] phi rom_read::ram_address#10 = (char *)$a000 [phi:rom_read::@10->rom_read::@3#4] -- pbuz1=pbuc1 lda #<$a000 sta.z ram_address lda #>$a000 sta.z ram_address+1 - // [1274] phi rom_read::bram_bank#10 = 1 [phi:rom_read::@10->rom_read::@3#5] -- vbuz1=vbuc1 + // [1360] phi rom_read::bram_bank#10 = 1 [phi:rom_read::@10->rom_read::@3#5] -- vbum1=vbuc1 lda #1 - sta.z bram_bank - // [1274] phi rom_read::rom_file_size#11 = rom_read::rom_file_size#1 [phi:rom_read::@10->rom_read::@3#6] -- register_copy + sta bram_bank + // [1360] phi rom_read::rom_file_size#11 = rom_read::rom_file_size#1 [phi:rom_read::@10->rom_read::@3#6] -- register_copy jmp __b3 - // [1336] phi from rom_read::@10 to rom_read::@38 [phi:rom_read::@10->rom_read::@38] + // [1422] phi from rom_read::@10 to rom_read::@38 [phi:rom_read::@10->rom_read::@38] // rom_read::@38 - // [1274] phi from rom_read::@38 to rom_read::@3 [phi:rom_read::@38->rom_read::@3] - // [1274] phi rom_read::y#11 = rom_read::y#36 [phi:rom_read::@38->rom_read::@3#0] -- register_copy - // [1274] phi rom_read::rom_row_current#10 = rom_read::rom_row_current#2 [phi:rom_read::@38->rom_read::@3#1] -- register_copy - // [1274] phi rom_read::brom_bank_start#10 = rom_read::brom_bank_start#20 [phi:rom_read::@38->rom_read::@3#2] -- register_copy - // [1274] phi rom_read::rom_address#10 = rom_read::rom_address#1 [phi:rom_read::@38->rom_read::@3#3] -- register_copy - // [1274] phi rom_read::ram_address#10 = rom_read::ram_address#7 [phi:rom_read::@38->rom_read::@3#4] -- register_copy - // [1274] phi rom_read::bram_bank#10 = rom_read::bram_bank#31 [phi:rom_read::@38->rom_read::@3#5] -- register_copy - // [1274] phi rom_read::rom_file_size#11 = rom_read::rom_file_size#1 [phi:rom_read::@38->rom_read::@3#6] -- register_copy + // [1360] phi from rom_read::@38 to rom_read::@3 [phi:rom_read::@38->rom_read::@3] + // [1360] phi rom_read::y#11 = rom_read::y#36 [phi:rom_read::@38->rom_read::@3#0] -- register_copy + // [1360] phi rom_read::rom_row_current#10 = rom_read::rom_row_current#2 [phi:rom_read::@38->rom_read::@3#1] -- register_copy + // [1360] phi rom_read::brom_bank_start#10 = rom_read::brom_bank_start#20 [phi:rom_read::@38->rom_read::@3#2] -- register_copy + // [1360] phi rom_read::rom_address#10 = rom_read::rom_address#1 [phi:rom_read::@38->rom_read::@3#3] -- register_copy + // [1360] phi rom_read::ram_address#10 = rom_read::ram_address#7 [phi:rom_read::@38->rom_read::@3#4] -- register_copy + // [1360] phi rom_read::bram_bank#10 = rom_read::bram_bank#31 [phi:rom_read::@38->rom_read::@3#5] -- register_copy + // [1360] phi rom_read::rom_file_size#11 = rom_read::rom_file_size#1 [phi:rom_read::@38->rom_read::@3#6] -- register_copy .segment Data s: .text "Opening " .byte 0 s1: .text " from SD card ..." .byte 0 .label fp = rom_read_byte.rom_bank1_rom_read_byte__2 + return: .dword 0 + rom_package_read: .word 0 + .label brom_bank_start = strchr.c + .label y = main.check_status_smc5_main__0 + .label rom_file_size = return + .label bram_bank = util_wait_key.return .label file = clrscr.ch + .label display_progress = main.check_status_cx16_rom3_check_status_rom1_main__0 } .segment Code // rom_verify -// __zp($6c) unsigned long rom_verify(__zp($6b) char rom_chip, __register(X) char rom_bank_start, __mem() unsigned long file_size) +// __zp($b6) unsigned long rom_verify(__zp($2f) char rom_chip, __mem() char rom_bank_start, __mem() unsigned long file_size) rom_verify: { - .label rom_verify__16 = $61 - .label rom_address = $63 - .label equal_bytes = $61 - .label y = $e4 - .label ram_address = $49 - .label bram_bank = $e1 - .label rom_different_bytes = $6c - .label rom_chip = $6b - .label return = $6c - .label progress_row_current = $ef + .label rom_verify__16 = $51 + .label rom_address = $ab + .label equal_bytes = $51 + .label rom_different_bytes = $b6 + .label rom_chip = $2f + .label return = $b6 + .label progress_row_current = $d9 // unsigned long rom_address = rom_address_from_bank(rom_bank_start) - // [1337] rom_address_from_bank::rom_bank#1 = rom_verify::rom_bank_start#0 -- vbuaa=vbuxx - txa - // [1338] call rom_address_from_bank - // [2365] phi from rom_verify to rom_address_from_bank [phi:rom_verify->rom_address_from_bank] - // [2365] phi rom_address_from_bank::rom_bank#3 = rom_address_from_bank::rom_bank#1 [phi:rom_verify->rom_address_from_bank#0] -- register_copy + // [1423] rom_address_from_bank::rom_bank#1 = rom_verify::rom_bank_start#0 + // [1424] call rom_address_from_bank + // [2427] phi from rom_verify to rom_address_from_bank [phi:rom_verify->rom_address_from_bank] + // [2427] phi rom_address_from_bank::rom_bank#3 = rom_address_from_bank::rom_bank#1 [phi:rom_verify->rom_address_from_bank#0] -- register_copy jsr rom_address_from_bank // unsigned long rom_address = rom_address_from_bank(rom_bank_start) - // [1339] rom_address_from_bank::return#3 = rom_address_from_bank::return#0 -- vduz1=vduz2 + // [1425] rom_address_from_bank::return#3 = rom_address_from_bank::return#0 -- vduz1=vduz2 lda.z rom_address_from_bank.return sta.z rom_address_from_bank.return_1 lda.z rom_address_from_bank.return+1 @@ -8617,9 +9482,9 @@ rom_verify: { lda.z rom_address_from_bank.return+3 sta.z rom_address_from_bank.return_1+3 // rom_verify::@11 - // [1340] rom_verify::rom_address#0 = rom_address_from_bank::return#3 + // [1426] rom_verify::rom_address#0 = rom_address_from_bank::return#3 // unsigned long rom_boundary = rom_address + file_size - // [1341] rom_verify::rom_boundary#0 = rom_verify::rom_address#0 + rom_verify::file_size#0 -- vdum1=vduz2_plus_vdum1 + // [1427] rom_verify::rom_boundary#0 = rom_verify::rom_address#0 + rom_verify::file_size#0 -- vdum1=vduz2_plus_vdum1 clc lda rom_boundary adc.z rom_address @@ -8634,57 +9499,59 @@ rom_verify: { adc.z rom_address+3 sta rom_boundary+3 // display_info_rom(rom_chip, STATUS_COMPARING, "Comparing ...") - // [1342] display_info_rom::rom_chip#1 = rom_verify::rom_chip#0 - // [1343] call display_info_rom - // [1199] phi from rom_verify::@11 to display_info_rom [phi:rom_verify::@11->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = rom_verify::info_text [phi:rom_verify::@11->display_info_rom#0] -- pbuz1=pbuc1 + // [1428] display_info_rom::rom_chip#1 = rom_verify::rom_chip#0 + // [1429] call display_info_rom + // [1285] phi from rom_verify::@11 to display_info_rom [phi:rom_verify::@11->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = rom_verify::info_text [phi:rom_verify::@11->display_info_rom#0] -- pbuz1=pbuc1 lda #info_text sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#1 [phi:rom_verify::@11->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_COMPARING [phi:rom_verify::@11->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#1 [phi:rom_verify::@11->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_COMPARING [phi:rom_verify::@11->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_COMPARING - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - // [1344] phi from rom_verify::@11 to rom_verify::@12 [phi:rom_verify::@11->rom_verify::@12] + // [1430] phi from rom_verify::@11 to rom_verify::@12 [phi:rom_verify::@11->rom_verify::@12] // rom_verify::@12 // gotoxy(x, y) - // [1345] call gotoxy - // [718] phi from rom_verify::@12 to gotoxy [phi:rom_verify::@12->gotoxy] - // [718] phi gotoxy::y#30 = PROGRESS_Y [phi:rom_verify::@12->gotoxy#0] -- vbuyy=vbuc1 - ldy #PROGRESS_Y - // [718] phi gotoxy::x#30 = PROGRESS_X [phi:rom_verify::@12->gotoxy#1] -- vbuxx=vbuc1 - ldx #PROGRESS_X + // [1431] call gotoxy + // [763] phi from rom_verify::@12 to gotoxy [phi:rom_verify::@12->gotoxy] + // [763] phi gotoxy::y#30 = PROGRESS_Y [phi:rom_verify::@12->gotoxy#0] -- vbuz1=vbuc1 + lda #PROGRESS_Y + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = PROGRESS_X [phi:rom_verify::@12->gotoxy#1] -- vbuz1=vbuc1 + lda #PROGRESS_X + sta.z gotoxy.x jsr gotoxy - // [1346] phi from rom_verify::@12 to rom_verify::@1 [phi:rom_verify::@12->rom_verify::@1] - // [1346] phi rom_verify::y#3 = PROGRESS_Y [phi:rom_verify::@12->rom_verify::@1#0] -- vbuz1=vbuc1 + // [1432] phi from rom_verify::@12 to rom_verify::@1 [phi:rom_verify::@12->rom_verify::@1] + // [1432] phi rom_verify::y#3 = PROGRESS_Y [phi:rom_verify::@12->rom_verify::@1#0] -- vbum1=vbuc1 lda #PROGRESS_Y - sta.z y - // [1346] phi rom_verify::progress_row_current#3 = 0 [phi:rom_verify::@12->rom_verify::@1#1] -- vwuz1=vwuc1 + sta y + // [1432] phi rom_verify::progress_row_current#3 = 0 [phi:rom_verify::@12->rom_verify::@1#1] -- vwuz1=vwuc1 lda #<0 sta.z progress_row_current sta.z progress_row_current+1 - // [1346] phi rom_verify::rom_different_bytes#11 = 0 [phi:rom_verify::@12->rom_verify::@1#2] -- vduz1=vduc1 + // [1432] phi rom_verify::rom_different_bytes#11 = 0 [phi:rom_verify::@12->rom_verify::@1#2] -- vduz1=vduc1 sta.z rom_different_bytes sta.z rom_different_bytes+1 lda #<0>>$10 sta.z rom_different_bytes+2 lda #>0>>$10 sta.z rom_different_bytes+3 - // [1346] phi rom_verify::ram_address#10 = (char *)$7800 [phi:rom_verify::@12->rom_verify::@1#3] -- pbuz1=pbuc1 + // [1432] phi rom_verify::ram_address#10 = (char *)$7800 [phi:rom_verify::@12->rom_verify::@1#3] -- pbum1=pbuc1 lda #<$7800 - sta.z ram_address + sta ram_address lda #>$7800 - sta.z ram_address+1 - // [1346] phi rom_verify::bram_bank#11 = 0 [phi:rom_verify::@12->rom_verify::@1#4] -- vbuz1=vbuc1 + sta ram_address+1 + // [1432] phi rom_verify::bram_bank#11 = 0 [phi:rom_verify::@12->rom_verify::@1#4] -- vbum1=vbuc1 lda #0 - sta.z bram_bank - // [1346] phi rom_verify::rom_address#12 = rom_verify::rom_address#0 [phi:rom_verify::@12->rom_verify::@1#5] -- register_copy + sta bram_bank + // [1432] phi rom_verify::rom_address#12 = rom_verify::rom_address#0 [phi:rom_verify::@12->rom_verify::@1#5] -- register_copy // rom_verify::@1 __b1: // while (rom_address < rom_boundary) - // [1347] if(rom_verify::rom_address#12rom_compare] - // [2369] phi rom_compare::ptr_ram#10 = rom_compare::ptr_ram#1 [phi:rom_verify::@2->rom_compare#0] -- register_copy - // [2369] phi rom_compare::rom_compare_size#11 = ROM_PROGRESS_CELL [phi:rom_verify::@2->rom_compare#1] -- vwuz1=vwuc1 + // [2431] phi from rom_verify::@2 to rom_compare [phi:rom_verify::@2->rom_compare] + // [2431] phi rom_compare::ptr_ram#10 = rom_compare::ptr_ram#1 [phi:rom_verify::@2->rom_compare#0] -- register_copy + // [2431] phi rom_compare::rom_compare_size#11 = ROM_PROGRESS_CELL [phi:rom_verify::@2->rom_compare#1] -- vwuz1=vwuc1 lda #ROM_PROGRESS_CELL sta.z rom_compare.rom_compare_size+1 - // [2369] phi rom_compare::rom_compare_address#3 = rom_compare::rom_compare_address#0 [phi:rom_verify::@2->rom_compare#2] -- register_copy - // [2369] phi rom_compare::bank_set_bram1_bank#0 = rom_compare::bank_ram#0 [phi:rom_verify::@2->rom_compare#3] -- register_copy + // [2431] phi rom_compare::rom_compare_address#3 = rom_compare::rom_compare_address#0 [phi:rom_verify::@2->rom_compare#2] -- register_copy + // [2431] phi rom_compare::bank_set_bram1_bank#0 = rom_compare::bank_ram#0 [phi:rom_verify::@2->rom_compare#3] -- register_copy jsr rom_compare // unsigned int equal_bytes = rom_compare(bram_bank, (ram_ptr_t)ram_address, rom_address, ROM_PROGRESS_CELL) - // [1353] rom_compare::return#2 = rom_compare::equal_bytes#2 + // [1439] rom_compare::return#2 = rom_compare::equal_bytes#2 // rom_verify::@13 - // [1354] rom_verify::equal_bytes#0 = rom_compare::return#2 + // [1440] rom_verify::equal_bytes#0 = rom_compare::return#2 // if (progress_row_current == ROM_PROGRESS_ROW) - // [1355] if(rom_verify::progress_row_current#3!=ROM_PROGRESS_ROW) goto rom_verify::@3 -- vwuz1_neq_vwuc1_then_la1 + // [1441] if(rom_verify::progress_row_current#3!=ROM_PROGRESS_ROW) goto rom_verify::@3 -- vwuz1_neq_vwuc1_then_la1 lda.z progress_row_current+1 cmp #>ROM_PROGRESS_ROW bne __b3 @@ -8750,30 +9618,32 @@ rom_verify: { bne __b3 // rom_verify::@8 // gotoxy(x, ++y); - // [1356] rom_verify::y#1 = ++ rom_verify::y#3 -- vbuz1=_inc_vbuz1 - inc.z y + // [1442] rom_verify::y#1 = ++ rom_verify::y#3 -- vbum1=_inc_vbum1 + inc y // gotoxy(x, ++y) - // [1357] gotoxy::y#27 = rom_verify::y#1 -- vbuyy=vbuz1 - ldy.z y - // [1358] call gotoxy - // [718] phi from rom_verify::@8 to gotoxy [phi:rom_verify::@8->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#27 [phi:rom_verify::@8->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = PROGRESS_X [phi:rom_verify::@8->gotoxy#1] -- vbuxx=vbuc1 - ldx #PROGRESS_X + // [1443] gotoxy::y#27 = rom_verify::y#1 -- vbuz1=vbum2 + lda y + sta.z gotoxy.y + // [1444] call gotoxy + // [763] phi from rom_verify::@8 to gotoxy [phi:rom_verify::@8->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#27 [phi:rom_verify::@8->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = PROGRESS_X [phi:rom_verify::@8->gotoxy#1] -- vbuz1=vbuc1 + lda #PROGRESS_X + sta.z gotoxy.x jsr gotoxy - // [1359] phi from rom_verify::@8 to rom_verify::@3 [phi:rom_verify::@8->rom_verify::@3] - // [1359] phi rom_verify::y#10 = rom_verify::y#1 [phi:rom_verify::@8->rom_verify::@3#0] -- register_copy - // [1359] phi rom_verify::progress_row_current#4 = 0 [phi:rom_verify::@8->rom_verify::@3#1] -- vwuz1=vbuc1 + // [1445] phi from rom_verify::@8 to rom_verify::@3 [phi:rom_verify::@8->rom_verify::@3] + // [1445] phi rom_verify::y#10 = rom_verify::y#1 [phi:rom_verify::@8->rom_verify::@3#0] -- register_copy + // [1445] phi rom_verify::progress_row_current#4 = 0 [phi:rom_verify::@8->rom_verify::@3#1] -- vwuz1=vbuc1 lda #<0 sta.z progress_row_current sta.z progress_row_current+1 - // [1359] phi from rom_verify::@13 to rom_verify::@3 [phi:rom_verify::@13->rom_verify::@3] - // [1359] phi rom_verify::y#10 = rom_verify::y#3 [phi:rom_verify::@13->rom_verify::@3#0] -- register_copy - // [1359] phi rom_verify::progress_row_current#4 = rom_verify::progress_row_current#3 [phi:rom_verify::@13->rom_verify::@3#1] -- register_copy + // [1445] phi from rom_verify::@13 to rom_verify::@3 [phi:rom_verify::@13->rom_verify::@3] + // [1445] phi rom_verify::y#10 = rom_verify::y#3 [phi:rom_verify::@13->rom_verify::@3#0] -- register_copy + // [1445] phi rom_verify::progress_row_current#4 = rom_verify::progress_row_current#3 [phi:rom_verify::@13->rom_verify::@3#1] -- register_copy // rom_verify::@3 __b3: // if (equal_bytes != ROM_PROGRESS_CELL) - // [1360] if(rom_verify::equal_bytes#0!=ROM_PROGRESS_CELL) goto rom_verify::@4 -- vwuz1_neq_vwuc1_then_la1 + // [1446] if(rom_verify::equal_bytes#0!=ROM_PROGRESS_CELL) goto rom_verify::@4 -- vwuz1_neq_vwuc1_then_la1 lda.z equal_bytes+1 cmp #>ROM_PROGRESS_CELL beq !__b4+ @@ -8786,26 +9656,26 @@ rom_verify: { !__b4: // rom_verify::@9 // cputc('=') - // [1361] stackpush(char) = '=' -- _stackpushbyte_=vbuc1 + // [1447] stackpush(char) = '=' -- _stackpushbyte_=vbuc1 lda #'=' pha - // [1362] callexecute cputc -- call_vprc1 + // [1448] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // rom_verify::@5 __b5: // ram_address += ROM_PROGRESS_CELL - // [1364] rom_verify::ram_address#1 = rom_verify::ram_address#10 + ROM_PROGRESS_CELL -- pbuz1=pbuz1_plus_vwuc1 - lda.z ram_address + // [1450] rom_verify::ram_address#1 = rom_verify::ram_address#10 + ROM_PROGRESS_CELL -- pbum1=pbum1_plus_vwuc1 + lda ram_address clc adc #ROM_PROGRESS_CELL - sta.z ram_address+1 + sta ram_address+1 // rom_address += ROM_PROGRESS_CELL - // [1365] rom_verify::rom_address#1 = rom_verify::rom_address#12 + ROM_PROGRESS_CELL -- vduz1=vduz1_plus_vwuc1 + // [1451] rom_verify::rom_address#1 = rom_verify::rom_address#12 + ROM_PROGRESS_CELL -- vduz1=vduz1_plus_vwuc1 clc lda.z rom_address adc #ROM_PROGRESS_CELL sta.z progress_row_current+1 // if (ram_address == BRAM_HIGH) - // [1367] if(rom_verify::ram_address#1!=$c000) goto rom_verify::@6 -- pbuz1_neq_vwuc1_then_la1 - lda.z ram_address+1 + // [1453] if(rom_verify::ram_address#1!=$c000) goto rom_verify::@6 -- pbum1_neq_vwuc1_then_la1 + lda ram_address+1 cmp #>$c000 bne __b6 - lda.z ram_address + lda ram_address cmp #<$c000 bne __b6 // rom_verify::@10 // bram_bank++; - // [1368] rom_verify::bram_bank#1 = ++ rom_verify::bram_bank#11 -- vbuz1=_inc_vbuz1 - inc.z bram_bank - // [1369] phi from rom_verify::@10 to rom_verify::@6 [phi:rom_verify::@10->rom_verify::@6] - // [1369] phi rom_verify::bram_bank#24 = rom_verify::bram_bank#1 [phi:rom_verify::@10->rom_verify::@6#0] -- register_copy - // [1369] phi rom_verify::ram_address#6 = (char *)$a000 [phi:rom_verify::@10->rom_verify::@6#1] -- pbuz1=pbuc1 + // [1454] rom_verify::bram_bank#1 = ++ rom_verify::bram_bank#11 -- vbum1=_inc_vbum1 + inc bram_bank + // [1455] phi from rom_verify::@10 to rom_verify::@6 [phi:rom_verify::@10->rom_verify::@6] + // [1455] phi rom_verify::bram_bank#24 = rom_verify::bram_bank#1 [phi:rom_verify::@10->rom_verify::@6#0] -- register_copy + // [1455] phi rom_verify::ram_address#6 = (char *)$a000 [phi:rom_verify::@10->rom_verify::@6#1] -- pbum1=pbuc1 lda #<$a000 - sta.z ram_address + sta ram_address lda #>$a000 - sta.z ram_address+1 - // [1369] phi from rom_verify::@5 to rom_verify::@6 [phi:rom_verify::@5->rom_verify::@6] - // [1369] phi rom_verify::bram_bank#24 = rom_verify::bram_bank#11 [phi:rom_verify::@5->rom_verify::@6#0] -- register_copy - // [1369] phi rom_verify::ram_address#6 = rom_verify::ram_address#1 [phi:rom_verify::@5->rom_verify::@6#1] -- register_copy + sta ram_address+1 + // [1455] phi from rom_verify::@5 to rom_verify::@6 [phi:rom_verify::@5->rom_verify::@6] + // [1455] phi rom_verify::bram_bank#24 = rom_verify::bram_bank#11 [phi:rom_verify::@5->rom_verify::@6#0] -- register_copy + // [1455] phi rom_verify::ram_address#6 = rom_verify::ram_address#1 [phi:rom_verify::@5->rom_verify::@6#1] -- register_copy // rom_verify::@6 __b6: // if (ram_address == RAM_HIGH) - // [1370] if(rom_verify::ram_address#6!=$9800) goto rom_verify::@23 -- pbuz1_neq_vwuc1_then_la1 - lda.z ram_address+1 + // [1456] if(rom_verify::ram_address#6!=$9800) goto rom_verify::@23 -- pbum1_neq_vwuc1_then_la1 + lda ram_address+1 cmp #>$9800 bne __b7 - lda.z ram_address + lda ram_address cmp #<$9800 bne __b7 - // [1372] phi from rom_verify::@6 to rom_verify::@7 [phi:rom_verify::@6->rom_verify::@7] - // [1372] phi rom_verify::ram_address#11 = (char *)$a000 [phi:rom_verify::@6->rom_verify::@7#0] -- pbuz1=pbuc1 + // [1458] phi from rom_verify::@6 to rom_verify::@7 [phi:rom_verify::@6->rom_verify::@7] + // [1458] phi rom_verify::ram_address#11 = (char *)$a000 [phi:rom_verify::@6->rom_verify::@7#0] -- pbum1=pbuc1 lda #<$a000 - sta.z ram_address + sta ram_address lda #>$a000 - sta.z ram_address+1 - // [1372] phi rom_verify::bram_bank#10 = 1 [phi:rom_verify::@6->rom_verify::@7#1] -- vbuz1=vbuc1 + sta ram_address+1 + // [1458] phi rom_verify::bram_bank#10 = 1 [phi:rom_verify::@6->rom_verify::@7#1] -- vbum1=vbuc1 lda #1 - sta.z bram_bank - // [1371] phi from rom_verify::@6 to rom_verify::@23 [phi:rom_verify::@6->rom_verify::@23] + sta bram_bank + // [1457] phi from rom_verify::@6 to rom_verify::@23 [phi:rom_verify::@6->rom_verify::@23] // rom_verify::@23 - // [1372] phi from rom_verify::@23 to rom_verify::@7 [phi:rom_verify::@23->rom_verify::@7] - // [1372] phi rom_verify::ram_address#11 = rom_verify::ram_address#6 [phi:rom_verify::@23->rom_verify::@7#0] -- register_copy - // [1372] phi rom_verify::bram_bank#10 = rom_verify::bram_bank#24 [phi:rom_verify::@23->rom_verify::@7#1] -- register_copy + // [1458] phi from rom_verify::@23 to rom_verify::@7 [phi:rom_verify::@23->rom_verify::@7] + // [1458] phi rom_verify::ram_address#11 = rom_verify::ram_address#6 [phi:rom_verify::@23->rom_verify::@7#0] -- register_copy + // [1458] phi rom_verify::bram_bank#10 = rom_verify::bram_bank#24 [phi:rom_verify::@23->rom_verify::@7#1] -- register_copy // rom_verify::@7 __b7: // ROM_PROGRESS_CELL - equal_bytes - // [1373] rom_verify::$16 = ROM_PROGRESS_CELL - rom_verify::equal_bytes#0 -- vwuz1=vwuc1_minus_vwuz1 + // [1459] rom_verify::$16 = ROM_PROGRESS_CELL - rom_verify::equal_bytes#0 -- vwuz1=vwuc1_minus_vwuz1 lda # ROM:%05x", rom_different_bytes, bram_bank, ram_address, rom_address) - // [1375] call snprintf_init - // [982] phi from rom_verify::@7 to snprintf_init [phi:rom_verify::@7->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:rom_verify::@7->snprintf_init#0] -- pbuz1=pbuc1 + // [1461] call snprintf_init + // [1014] phi from rom_verify::@7 to snprintf_init [phi:rom_verify::@7->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:rom_verify::@7->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [1376] phi from rom_verify::@7 to rom_verify::@14 [phi:rom_verify::@7->rom_verify::@14] + // [1462] phi from rom_verify::@7 to rom_verify::@14 [phi:rom_verify::@7->rom_verify::@14] // rom_verify::@14 // sprintf(info_text, "Comparing: %05x differences between RAM:%02x:%04p <-> ROM:%05x", rom_different_bytes, bram_bank, ram_address, rom_address) - // [1377] call printf_str - // [987] phi from rom_verify::@14 to printf_str [phi:rom_verify::@14->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_verify::@14->printf_str#0] -- pprz1=pprc1 + // [1463] call printf_str + // [1019] phi from rom_verify::@14 to printf_str [phi:rom_verify::@14->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_verify::@14->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = rom_verify::s [phi:rom_verify::@14->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = rom_verify::s [phi:rom_verify::@14->printf_str#1] -- pbuz1=pbuc1 lda #s @@ -8927,7 +9797,7 @@ rom_verify: { jsr printf_str // rom_verify::@15 // sprintf(info_text, "Comparing: %05x differences between RAM:%02x:%04p <-> ROM:%05x", rom_different_bytes, bram_bank, ram_address, rom_address) - // [1378] printf_ulong::uvalue#2 = rom_verify::rom_different_bytes#1 -- vduz1=vduz2 + // [1464] printf_ulong::uvalue#2 = rom_verify::rom_different_bytes#1 -- vduz1=vduz2 lda.z rom_different_bytes sta.z printf_ulong.uvalue lda.z rom_different_bytes+1 @@ -8936,29 +9806,30 @@ rom_verify: { sta.z printf_ulong.uvalue+2 lda.z rom_different_bytes+3 sta.z printf_ulong.uvalue+3 - // [1379] call printf_ulong - // [1399] phi from rom_verify::@15 to printf_ulong [phi:rom_verify::@15->printf_ulong] - // [1399] phi printf_ulong::format_zero_padding#10 = 1 [phi:rom_verify::@15->printf_ulong#0] -- vbuz1=vbuc1 + // [1465] call printf_ulong + // [1485] phi from rom_verify::@15 to printf_ulong [phi:rom_verify::@15->printf_ulong] + // [1485] phi printf_ulong::format_zero_padding#10 = 1 [phi:rom_verify::@15->printf_ulong#0] -- vbuz1=vbuc1 lda #1 sta.z printf_ulong.format_zero_padding - // [1399] phi printf_ulong::format_min_length#10 = 5 [phi:rom_verify::@15->printf_ulong#1] -- vbuz1=vbuc1 + // [1485] phi printf_ulong::format_min_length#10 = 5 [phi:rom_verify::@15->printf_ulong#1] -- vbuz1=vbuc1 lda #5 sta.z printf_ulong.format_min_length - // [1399] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:rom_verify::@15->printf_ulong#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [1399] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#2 [phi:rom_verify::@15->printf_ulong#3] -- register_copy + // [1485] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:rom_verify::@15->printf_ulong#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_ulong.format_radix + // [1485] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#2 [phi:rom_verify::@15->printf_ulong#3] -- register_copy jsr printf_ulong - // [1380] phi from rom_verify::@15 to rom_verify::@16 [phi:rom_verify::@15->rom_verify::@16] + // [1466] phi from rom_verify::@15 to rom_verify::@16 [phi:rom_verify::@15->rom_verify::@16] // rom_verify::@16 // sprintf(info_text, "Comparing: %05x differences between RAM:%02x:%04p <-> ROM:%05x", rom_different_bytes, bram_bank, ram_address, rom_address) - // [1381] call printf_str - // [987] phi from rom_verify::@16 to printf_str [phi:rom_verify::@16->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_verify::@16->printf_str#0] -- pprz1=pprc1 + // [1467] call printf_str + // [1019] phi from rom_verify::@16 to printf_str [phi:rom_verify::@16->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_verify::@16->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = rom_verify::s1 [phi:rom_verify::@16->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = rom_verify::s1 [phi:rom_verify::@16->printf_str#1] -- pbuz1=pbuc1 lda #s1 @@ -8966,36 +9837,38 @@ rom_verify: { jsr printf_str // rom_verify::@17 // sprintf(info_text, "Comparing: %05x differences between RAM:%02x:%04p <-> ROM:%05x", rom_different_bytes, bram_bank, ram_address, rom_address) - // [1382] printf_uchar::uvalue#10 = rom_verify::bram_bank#10 -- vbuxx=vbuz1 - ldx.z bram_bank - // [1383] call printf_uchar - // [1165] phi from rom_verify::@17 to printf_uchar [phi:rom_verify::@17->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 1 [phi:rom_verify::@17->printf_uchar#0] -- vbuz1=vbuc1 + // [1468] printf_uchar::uvalue#10 = rom_verify::bram_bank#10 -- vbuz1=vbum2 + lda bram_bank + sta.z printf_uchar.uvalue + // [1469] call printf_uchar + // [1251] phi from rom_verify::@17 to printf_uchar [phi:rom_verify::@17->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 1 [phi:rom_verify::@17->printf_uchar#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 2 [phi:rom_verify::@17->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 2 [phi:rom_verify::@17->printf_uchar#1] -- vbuz1=vbuc1 lda #2 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:rom_verify::@17->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:rom_verify::@17->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = HEXADECIMAL [phi:rom_verify::@17->printf_uchar#3] -- vbuyy=vbuc1 - ldy #HEXADECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#10 [phi:rom_verify::@17->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = HEXADECIMAL [phi:rom_verify::@17->printf_uchar#3] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#10 [phi:rom_verify::@17->printf_uchar#4] -- register_copy jsr printf_uchar - // [1384] phi from rom_verify::@17 to rom_verify::@18 [phi:rom_verify::@17->rom_verify::@18] + // [1470] phi from rom_verify::@17 to rom_verify::@18 [phi:rom_verify::@17->rom_verify::@18] // rom_verify::@18 // sprintf(info_text, "Comparing: %05x differences between RAM:%02x:%04p <-> ROM:%05x", rom_different_bytes, bram_bank, ram_address, rom_address) - // [1385] call printf_str - // [987] phi from rom_verify::@18 to printf_str [phi:rom_verify::@18->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_verify::@18->printf_str#0] -- pprz1=pprc1 + // [1471] call printf_str + // [1019] phi from rom_verify::@18 to printf_str [phi:rom_verify::@18->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_verify::@18->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s3 [phi:rom_verify::@18->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s3 [phi:rom_verify::@18->printf_str#1] -- pbuz1=pbuc1 lda #<@s3 sta.z printf_str.s lda #>@s3 @@ -9003,34 +9876,35 @@ rom_verify: { jsr printf_str // rom_verify::@19 // sprintf(info_text, "Comparing: %05x differences between RAM:%02x:%04p <-> ROM:%05x", rom_different_bytes, bram_bank, ram_address, rom_address) - // [1386] printf_uint::uvalue#10 = (unsigned int)rom_verify::ram_address#11 -- vwuz1=vwuz2 - lda.z ram_address + // [1472] printf_uint::uvalue#10 = (unsigned int)rom_verify::ram_address#11 -- vwuz1=vwum2 + lda ram_address sta.z printf_uint.uvalue - lda.z ram_address+1 + lda ram_address+1 sta.z printf_uint.uvalue+1 - // [1387] call printf_uint - // [996] phi from rom_verify::@19 to printf_uint [phi:rom_verify::@19->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:rom_verify::@19->printf_uint#0] -- vbuz1=vbuc1 + // [1473] call printf_uint + // [1028] phi from rom_verify::@19 to printf_uint [phi:rom_verify::@19->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:rom_verify::@19->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 4 [phi:rom_verify::@19->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 4 [phi:rom_verify::@19->printf_uint#1] -- vbuz1=vbuc1 lda #4 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:rom_verify::@19->printf_uint#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#10 [phi:rom_verify::@19->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:rom_verify::@19->printf_uint#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#10 [phi:rom_verify::@19->printf_uint#3] -- register_copy jsr printf_uint - // [1388] phi from rom_verify::@19 to rom_verify::@20 [phi:rom_verify::@19->rom_verify::@20] + // [1474] phi from rom_verify::@19 to rom_verify::@20 [phi:rom_verify::@19->rom_verify::@20] // rom_verify::@20 // sprintf(info_text, "Comparing: %05x differences between RAM:%02x:%04p <-> ROM:%05x", rom_different_bytes, bram_bank, ram_address, rom_address) - // [1389] call printf_str - // [987] phi from rom_verify::@20 to printf_str [phi:rom_verify::@20->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_verify::@20->printf_str#0] -- pprz1=pprc1 + // [1475] call printf_str + // [1019] phi from rom_verify::@20 to printf_str [phi:rom_verify::@20->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_verify::@20->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = rom_verify::s3 [phi:rom_verify::@20->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = rom_verify::s3 [phi:rom_verify::@20->printf_str#1] -- pbuz1=pbuc1 lda #s3 @@ -9038,7 +9912,7 @@ rom_verify: { jsr printf_str // rom_verify::@21 // sprintf(info_text, "Comparing: %05x differences between RAM:%02x:%04p <-> ROM:%05x", rom_different_bytes, bram_bank, ram_address, rom_address) - // [1390] printf_ulong::uvalue#3 = rom_verify::rom_address#1 -- vduz1=vduz2 + // [1476] printf_ulong::uvalue#3 = rom_verify::rom_address#1 -- vduz1=vduz2 lda.z rom_address sta.z printf_ulong.uvalue lda.z rom_address+1 @@ -9047,51 +9921,52 @@ rom_verify: { sta.z printf_ulong.uvalue+2 lda.z rom_address+3 sta.z printf_ulong.uvalue+3 - // [1391] call printf_ulong - // [1399] phi from rom_verify::@21 to printf_ulong [phi:rom_verify::@21->printf_ulong] - // [1399] phi printf_ulong::format_zero_padding#10 = 1 [phi:rom_verify::@21->printf_ulong#0] -- vbuz1=vbuc1 + // [1477] call printf_ulong + // [1485] phi from rom_verify::@21 to printf_ulong [phi:rom_verify::@21->printf_ulong] + // [1485] phi printf_ulong::format_zero_padding#10 = 1 [phi:rom_verify::@21->printf_ulong#0] -- vbuz1=vbuc1 lda #1 sta.z printf_ulong.format_zero_padding - // [1399] phi printf_ulong::format_min_length#10 = 5 [phi:rom_verify::@21->printf_ulong#1] -- vbuz1=vbuc1 + // [1485] phi printf_ulong::format_min_length#10 = 5 [phi:rom_verify::@21->printf_ulong#1] -- vbuz1=vbuc1 lda #5 sta.z printf_ulong.format_min_length - // [1399] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:rom_verify::@21->printf_ulong#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [1399] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#3 [phi:rom_verify::@21->printf_ulong#3] -- register_copy + // [1485] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:rom_verify::@21->printf_ulong#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_ulong.format_radix + // [1485] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#3 [phi:rom_verify::@21->printf_ulong#3] -- register_copy jsr printf_ulong // rom_verify::@22 // sprintf(info_text, "Comparing: %05x differences between RAM:%02x:%04p <-> ROM:%05x", rom_different_bytes, bram_bank, ram_address, rom_address) - // [1392] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1478] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1393] callexecute snputc -- call_vprc1 + // [1479] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [1395] call display_action_text - // [1176] phi from rom_verify::@22 to display_action_text [phi:rom_verify::@22->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:rom_verify::@22->display_action_text#0] -- pbuz1=pbuc1 + // [1481] call display_action_text + // [1262] phi from rom_verify::@22 to display_action_text [phi:rom_verify::@22->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:rom_verify::@22->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text sta.z display_action_text.info_text+1 jsr display_action_text - // [1346] phi from rom_verify::@22 to rom_verify::@1 [phi:rom_verify::@22->rom_verify::@1] - // [1346] phi rom_verify::y#3 = rom_verify::y#10 [phi:rom_verify::@22->rom_verify::@1#0] -- register_copy - // [1346] phi rom_verify::progress_row_current#3 = rom_verify::progress_row_current#11 [phi:rom_verify::@22->rom_verify::@1#1] -- register_copy - // [1346] phi rom_verify::rom_different_bytes#11 = rom_verify::rom_different_bytes#1 [phi:rom_verify::@22->rom_verify::@1#2] -- register_copy - // [1346] phi rom_verify::ram_address#10 = rom_verify::ram_address#11 [phi:rom_verify::@22->rom_verify::@1#3] -- register_copy - // [1346] phi rom_verify::bram_bank#11 = rom_verify::bram_bank#10 [phi:rom_verify::@22->rom_verify::@1#4] -- register_copy - // [1346] phi rom_verify::rom_address#12 = rom_verify::rom_address#1 [phi:rom_verify::@22->rom_verify::@1#5] -- register_copy + // [1432] phi from rom_verify::@22 to rom_verify::@1 [phi:rom_verify::@22->rom_verify::@1] + // [1432] phi rom_verify::y#3 = rom_verify::y#10 [phi:rom_verify::@22->rom_verify::@1#0] -- register_copy + // [1432] phi rom_verify::progress_row_current#3 = rom_verify::progress_row_current#11 [phi:rom_verify::@22->rom_verify::@1#1] -- register_copy + // [1432] phi rom_verify::rom_different_bytes#11 = rom_verify::rom_different_bytes#1 [phi:rom_verify::@22->rom_verify::@1#2] -- register_copy + // [1432] phi rom_verify::ram_address#10 = rom_verify::ram_address#11 [phi:rom_verify::@22->rom_verify::@1#3] -- register_copy + // [1432] phi rom_verify::bram_bank#11 = rom_verify::bram_bank#10 [phi:rom_verify::@22->rom_verify::@1#4] -- register_copy + // [1432] phi rom_verify::rom_address#12 = rom_verify::rom_address#1 [phi:rom_verify::@22->rom_verify::@1#5] -- register_copy jmp __b1 // rom_verify::@4 __b4: // cputc('*') - // [1396] stackpush(char) = '*' -- _stackpushbyte_=vbuc1 + // [1482] stackpush(char) = '*' -- _stackpushbyte_=vbuc1 lda #'*' pha - // [1397] callexecute cputc -- call_vprc1 + // [1483] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla @@ -9106,76 +9981,74 @@ rom_verify: { s3: .text " <-> ROM:" .byte 0 .label rom_boundary = rom_flash.rom_flash__29 + .label y = main.check_status_vera1_main__0 + .label ram_address = fopen.pathtoken_1 + .label bram_bank = main.check_status_smc7_main__0 + .label rom_bank_start = rom_get_release.rom_get_release__0 .label file_size = rom_flash.rom_flash__29 } .segment Code // printf_ulong // Print an unsigned int using a specific format -// void printf_ulong(void (*putc)(char), __zp($25) unsigned long uvalue, __zp($ce) char format_min_length, char format_justify_left, char format_sign_always, __zp($be) char format_zero_padding, char format_upper_case, __register(X) char format_radix) +// void printf_ulong(void (*putc)(char), __zp($30) unsigned long uvalue, __zp($e8) char format_min_length, char format_justify_left, char format_sign_always, __zp($e7) char format_zero_padding, char format_upper_case, __zp($e6) char format_radix) printf_ulong: { - .label uvalue = $25 - .label uvalue_1 = $dd - .label format_min_length = $ce - .label format_zero_padding = $be + .label uvalue = $30 + .label format_radix = $e6 + .label format_min_length = $e8 + .label format_zero_padding = $e7 // printf_ulong::@1 // printf_buffer.sign = format.sign_always?'+':0 - // [1400] *((char *)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 + // [1486] *((char *)&printf_buffer) = 0 -- _deref_pbuc1=vbuc2 // Handle any sign lda #0 sta printf_buffer // ultoa(uvalue, printf_buffer.digits, format.radix) - // [1401] ultoa::value#1 = printf_ulong::uvalue#10 - // [1402] ultoa::radix#0 = printf_ulong::format_radix#10 - // [1403] call ultoa + // [1487] ultoa::value#1 = printf_ulong::uvalue#10 + // [1488] ultoa::radix#0 = printf_ulong::format_radix#10 + // [1489] call ultoa // Format number into buffer jsr ultoa // printf_ulong::@2 // printf_number_buffer(putc, printf_buffer, format) - // [1404] printf_number_buffer::buffer_sign#0 = *((char *)&printf_buffer) -- vbuz1=_deref_pbuc1 + // [1490] printf_number_buffer::buffer_sign#0 = *((char *)&printf_buffer) -- vbuz1=_deref_pbuc1 lda printf_buffer sta.z printf_number_buffer.buffer_sign - // [1405] printf_number_buffer::format_min_length#0 = printf_ulong::format_min_length#10 -- vbuxx=vbuz1 - ldx.z format_min_length - // [1406] printf_number_buffer::format_zero_padding#0 = printf_ulong::format_zero_padding#10 - // [1407] call printf_number_buffer + // [1491] printf_number_buffer::format_min_length#0 = printf_ulong::format_min_length#10 + // [1492] printf_number_buffer::format_zero_padding#0 = printf_ulong::format_zero_padding#10 + // [1493] call printf_number_buffer // Print using format - // [2107] phi from printf_ulong::@2 to printf_number_buffer [phi:printf_ulong::@2->printf_number_buffer] - // [2107] phi printf_number_buffer::putc#10 = &snputc [phi:printf_ulong::@2->printf_number_buffer#0] -- pprz1=pprc1 + // [2160] phi from printf_ulong::@2 to printf_number_buffer [phi:printf_ulong::@2->printf_number_buffer] + // [2160] phi printf_number_buffer::putc#10 = &snputc [phi:printf_ulong::@2->printf_number_buffer#0] -- pprz1=pprc1 lda #snputc sta.z printf_number_buffer.putc+1 - // [2107] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#0 [phi:printf_ulong::@2->printf_number_buffer#1] -- register_copy - // [2107] phi printf_number_buffer::format_zero_padding#10 = printf_number_buffer::format_zero_padding#0 [phi:printf_ulong::@2->printf_number_buffer#2] -- register_copy - // [2107] phi printf_number_buffer::format_min_length#3 = printf_number_buffer::format_min_length#0 [phi:printf_ulong::@2->printf_number_buffer#3] -- register_copy + // [2160] phi printf_number_buffer::buffer_sign#10 = printf_number_buffer::buffer_sign#0 [phi:printf_ulong::@2->printf_number_buffer#1] -- register_copy + // [2160] phi printf_number_buffer::format_zero_padding#10 = printf_number_buffer::format_zero_padding#0 [phi:printf_ulong::@2->printf_number_buffer#2] -- register_copy + // [2160] phi printf_number_buffer::format_min_length#3 = printf_number_buffer::format_min_length#0 [phi:printf_ulong::@2->printf_number_buffer#3] -- register_copy jsr printf_number_buffer // printf_ulong::@return // } - // [1408] return + // [1494] return rts + .segment Data + uvalue_1: .dword 0 } +.segment Code // rom_flash -// __zp($f8) unsigned long rom_flash(__mem() char rom_chip, __mem() char rom_bank_start, __zp($32) unsigned long file_size) +// __mem() unsigned long rom_flash(__mem() char rom_chip, __mem() char rom_bank_start, __mem() unsigned long file_size) rom_flash: { - .label equal_bytes = $61 - .label ram_address_sector = $b5 - .label equal_bytes_1 = $43 - .label retries = $f2 - .label flash_errors_sector = $c4 - .label ram_address = $b3 - .label rom_address = $d0 - .label x = $cb - .label flash_errors = $f8 - .label bram_bank_sector = $d9 - .label x_sector = $d4 - .label y_sector = $cc - .label file_size = $32 - .label return = $f8 + .label equal_bytes = $51 + .label equal_bytes_1 = $55 + .label flash_errors_sector = $d5 + .label ram_address = $c2 + .label rom_address = $f3 + .label x = $f2 // display_action_progress("Flashing ... (-) equal, (+) flashed, (!) error.") - // [1410] call display_action_progress + // [1496] call display_action_progress // Now we compare the RAM with the actual ROM contents. - // [812] phi from rom_flash to display_action_progress [phi:rom_flash->display_action_progress] - // [812] phi display_action_progress::info_text#15 = rom_flash::info_text [phi:rom_flash->display_action_progress#0] -- pbuz1=pbuc1 + // [857] phi from rom_flash to display_action_progress [phi:rom_flash->display_action_progress] + // [857] phi display_action_progress::info_text#18 = rom_flash::info_text [phi:rom_flash->display_action_progress#0] -- pbuz1=pbuc1 lda #info_text @@ -9183,14 +10056,13 @@ rom_flash: { jsr display_action_progress // rom_flash::@19 // unsigned long rom_address_sector = rom_address_from_bank(rom_bank_start) - // [1411] rom_address_from_bank::rom_bank#2 = rom_flash::rom_bank_start#0 -- vbuaa=vbum1 - lda rom_bank_start - // [1412] call rom_address_from_bank - // [2365] phi from rom_flash::@19 to rom_address_from_bank [phi:rom_flash::@19->rom_address_from_bank] - // [2365] phi rom_address_from_bank::rom_bank#3 = rom_address_from_bank::rom_bank#2 [phi:rom_flash::@19->rom_address_from_bank#0] -- register_copy + // [1497] rom_address_from_bank::rom_bank#2 = rom_flash::rom_bank_start#0 + // [1498] call rom_address_from_bank + // [2427] phi from rom_flash::@19 to rom_address_from_bank [phi:rom_flash::@19->rom_address_from_bank] + // [2427] phi rom_address_from_bank::rom_bank#3 = rom_address_from_bank::rom_bank#2 [phi:rom_flash::@19->rom_address_from_bank#0] -- register_copy jsr rom_address_from_bank // unsigned long rom_address_sector = rom_address_from_bank(rom_bank_start) - // [1413] rom_address_from_bank::return#4 = rom_address_from_bank::return#0 -- vdum1=vduz2 + // [1499] rom_address_from_bank::return#4 = rom_address_from_bank::return#0 -- vdum1=vduz2 lda.z rom_address_from_bank.return sta rom_address_from_bank.return_2 lda.z rom_address_from_bank.return+1 @@ -9200,66 +10072,66 @@ rom_flash: { lda.z rom_address_from_bank.return+3 sta rom_address_from_bank.return_2+3 // rom_flash::@20 - // [1414] rom_flash::rom_address_sector#0 = rom_address_from_bank::return#4 + // [1500] rom_flash::rom_address_sector#0 = rom_address_from_bank::return#4 // unsigned long rom_boundary = rom_address_sector + file_size - // [1415] rom_flash::rom_boundary#0 = rom_flash::rom_address_sector#0 + rom_flash::file_size#0 -- vdum1=vdum2_plus_vduz3 + // [1501] rom_flash::rom_boundary#0 = rom_flash::rom_address_sector#0 + rom_flash::file_size#0 -- vdum1=vdum2_plus_vdum3 lda rom_address_sector clc - adc.z file_size + adc file_size sta rom_boundary lda rom_address_sector+1 - adc.z file_size+1 + adc file_size+1 sta rom_boundary+1 lda rom_address_sector+2 - adc.z file_size+2 + adc file_size+2 sta rom_boundary+2 lda rom_address_sector+3 - adc.z file_size+3 + adc file_size+3 sta rom_boundary+3 // display_info_rom(rom_chip, STATUS_FLASHING, "Flashing ...") - // [1416] display_info_rom::rom_chip#2 = rom_flash::rom_chip#0 -- vbuz1=vbum2 + // [1502] display_info_rom::rom_chip#2 = rom_flash::rom_chip#0 -- vbuz1=vbum2 lda rom_chip sta.z display_info_rom.rom_chip - // [1417] call display_info_rom - // [1199] phi from rom_flash::@20 to display_info_rom [phi:rom_flash::@20->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = rom_flash::info_text1 [phi:rom_flash::@20->display_info_rom#0] -- pbuz1=pbuc1 + // [1503] call display_info_rom + // [1285] phi from rom_flash::@20 to display_info_rom [phi:rom_flash::@20->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = rom_flash::info_text1 [phi:rom_flash::@20->display_info_rom#0] -- pbuz1=pbuc1 lda #info_text1 sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#2 [phi:rom_flash::@20->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_FLASHING [phi:rom_flash::@20->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#2 [phi:rom_flash::@20->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_FLASHING [phi:rom_flash::@20->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_FLASHING - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - // [1418] phi from rom_flash::@20 to rom_flash::@1 [phi:rom_flash::@20->rom_flash::@1] - // [1418] phi rom_flash::y_sector#13 = PROGRESS_Y [phi:rom_flash::@20->rom_flash::@1#0] -- vbuz1=vbuc1 + // [1504] phi from rom_flash::@20 to rom_flash::@1 [phi:rom_flash::@20->rom_flash::@1] + // [1504] phi rom_flash::y_sector#13 = PROGRESS_Y [phi:rom_flash::@20->rom_flash::@1#0] -- vbum1=vbuc1 lda #PROGRESS_Y - sta.z y_sector - // [1418] phi rom_flash::x_sector#10 = PROGRESS_X [phi:rom_flash::@20->rom_flash::@1#1] -- vbuz1=vbuc1 + sta y_sector + // [1504] phi rom_flash::x_sector#10 = PROGRESS_X [phi:rom_flash::@20->rom_flash::@1#1] -- vbum1=vbuc1 lda #PROGRESS_X - sta.z x_sector - // [1418] phi rom_flash::flash_errors#10 = 0 [phi:rom_flash::@20->rom_flash::@1#2] -- vduz1=vduc1 + sta x_sector + // [1504] phi rom_flash::flash_errors#10 = 0 [phi:rom_flash::@20->rom_flash::@1#2] -- vdum1=vduc1 lda #<0 - sta.z flash_errors - sta.z flash_errors+1 + sta flash_errors + sta flash_errors+1 lda #<0>>$10 - sta.z flash_errors+2 + sta flash_errors+2 lda #>0>>$10 - sta.z flash_errors+3 - // [1418] phi rom_flash::ram_address_sector#11 = (char *)$7800 [phi:rom_flash::@20->rom_flash::@1#3] -- pbuz1=pbuc1 + sta flash_errors+3 + // [1504] phi rom_flash::ram_address_sector#11 = (char *)$7800 [phi:rom_flash::@20->rom_flash::@1#3] -- pbum1=pbuc1 lda #<$7800 - sta.z ram_address_sector + sta ram_address_sector lda #>$7800 - sta.z ram_address_sector+1 - // [1418] phi rom_flash::bram_bank_sector#14 = 0 [phi:rom_flash::@20->rom_flash::@1#4] -- vbuz1=vbuc1 + sta ram_address_sector+1 + // [1504] phi rom_flash::bram_bank_sector#14 = 0 [phi:rom_flash::@20->rom_flash::@1#4] -- vbum1=vbuc1 lda #0 - sta.z bram_bank_sector - // [1418] phi rom_flash::rom_address_sector#12 = rom_flash::rom_address_sector#0 [phi:rom_flash::@20->rom_flash::@1#5] -- register_copy + sta bram_bank_sector + // [1504] phi rom_flash::rom_address_sector#12 = rom_flash::rom_address_sector#0 [phi:rom_flash::@20->rom_flash::@1#5] -- register_copy // rom_flash::@1 __b1: // while (rom_address_sector < rom_boundary) - // [1419] if(rom_flash::rom_address_sector#12rom_flash::@3] + // [1506] phi from rom_flash::@1 to rom_flash::@3 [phi:rom_flash::@1->rom_flash::@3] // rom_flash::@3 // display_action_text("Flashed ...") - // [1421] call display_action_text - // [1176] phi from rom_flash::@3 to display_action_text [phi:rom_flash::@3->display_action_text] - // [1176] phi display_action_text::info_text#19 = rom_flash::info_text2 [phi:rom_flash::@3->display_action_text#0] -- pbuz1=pbuc1 + // [1507] call display_action_text + // [1262] phi from rom_flash::@3 to display_action_text [phi:rom_flash::@3->display_action_text] + // [1262] phi display_action_text::info_text#19 = rom_flash::info_text2 [phi:rom_flash::@3->display_action_text#0] -- pbuz1=pbuc1 lda #info_text2 @@ -9289,19 +10161,20 @@ rom_flash: { jsr display_action_text // rom_flash::@return // } - // [1422] return + // [1508] return rts // rom_flash::@2 __b2: // unsigned int equal_bytes = rom_compare(bram_bank_sector, (ram_ptr_t)ram_address_sector, rom_address_sector, ROM_SECTOR) - // [1423] rom_compare::bank_ram#1 = rom_flash::bram_bank_sector#14 -- vbuxx=vbuz1 - ldx.z bram_bank_sector - // [1424] rom_compare::ptr_ram#2 = rom_flash::ram_address_sector#11 -- pbuz1=pbuz2 - lda.z ram_address_sector + // [1509] rom_compare::bank_ram#1 = rom_flash::bram_bank_sector#14 -- vbuz1=vbum2 + lda bram_bank_sector + sta.z rom_compare.bank_ram + // [1510] rom_compare::ptr_ram#2 = rom_flash::ram_address_sector#11 -- pbuz1=pbum2 + lda ram_address_sector sta.z rom_compare.ptr_ram - lda.z ram_address_sector+1 + lda ram_address_sector+1 sta.z rom_compare.ptr_ram+1 - // [1425] rom_compare::rom_compare_address#1 = rom_flash::rom_address_sector#12 -- vduz1=vdum2 + // [1511] rom_compare::rom_compare_address#1 = rom_flash::rom_address_sector#12 -- vduz1=vdum2 lda rom_address_sector sta.z rom_compare.rom_compare_address lda rom_address_sector+1 @@ -9310,24 +10183,24 @@ rom_flash: { sta.z rom_compare.rom_compare_address+2 lda rom_address_sector+3 sta.z rom_compare.rom_compare_address+3 - // [1426] call rom_compare + // [1512] call rom_compare // {asm{.byte $db}} - // [2369] phi from rom_flash::@2 to rom_compare [phi:rom_flash::@2->rom_compare] - // [2369] phi rom_compare::ptr_ram#10 = rom_compare::ptr_ram#2 [phi:rom_flash::@2->rom_compare#0] -- register_copy - // [2369] phi rom_compare::rom_compare_size#11 = $1000 [phi:rom_flash::@2->rom_compare#1] -- vwuz1=vwuc1 + // [2431] phi from rom_flash::@2 to rom_compare [phi:rom_flash::@2->rom_compare] + // [2431] phi rom_compare::ptr_ram#10 = rom_compare::ptr_ram#2 [phi:rom_flash::@2->rom_compare#0] -- register_copy + // [2431] phi rom_compare::rom_compare_size#11 = $1000 [phi:rom_flash::@2->rom_compare#1] -- vwuz1=vwuc1 lda #<$1000 sta.z rom_compare.rom_compare_size lda #>$1000 sta.z rom_compare.rom_compare_size+1 - // [2369] phi rom_compare::rom_compare_address#3 = rom_compare::rom_compare_address#1 [phi:rom_flash::@2->rom_compare#2] -- register_copy - // [2369] phi rom_compare::bank_set_bram1_bank#0 = rom_compare::bank_ram#1 [phi:rom_flash::@2->rom_compare#3] -- register_copy + // [2431] phi rom_compare::rom_compare_address#3 = rom_compare::rom_compare_address#1 [phi:rom_flash::@2->rom_compare#2] -- register_copy + // [2431] phi rom_compare::bank_set_bram1_bank#0 = rom_compare::bank_ram#1 [phi:rom_flash::@2->rom_compare#3] -- register_copy jsr rom_compare // unsigned int equal_bytes = rom_compare(bram_bank_sector, (ram_ptr_t)ram_address_sector, rom_address_sector, ROM_SECTOR) - // [1427] rom_compare::return#3 = rom_compare::equal_bytes#2 + // [1513] rom_compare::return#3 = rom_compare::equal_bytes#2 // rom_flash::@21 - // [1428] rom_flash::equal_bytes#0 = rom_compare::return#3 + // [1514] rom_flash::equal_bytes#0 = rom_compare::return#3 // if (equal_bytes != ROM_SECTOR) - // [1429] if(rom_flash::equal_bytes#0!=$1000) goto rom_flash::@5 -- vwuz1_neq_vwuc1_then_la1 + // [1515] if(rom_flash::equal_bytes#0!=$1000) goto rom_flash::@5 -- vwuz1_neq_vwuc1_then_la1 lda.z equal_bytes+1 cmp #>$1000 beq !__b3+ @@ -9340,35 +10213,37 @@ rom_flash: { !__b3: // rom_flash::@16 // cputsxy(x_sector, y_sector, "--------") - // [1430] cputsxy::x#1 = rom_flash::x_sector#10 -- vbuxx=vbuz1 - ldx.z x_sector - // [1431] cputsxy::y#1 = rom_flash::y_sector#13 -- vbuyy=vbuz1 - ldy.z y_sector - // [1432] call cputsxy - // [805] phi from rom_flash::@16 to cputsxy [phi:rom_flash::@16->cputsxy] - // [805] phi cputsxy::s#4 = rom_flash::s [phi:rom_flash::@16->cputsxy#0] -- pbuz1=pbuc1 + // [1516] cputsxy::x#1 = rom_flash::x_sector#10 -- vbuz1=vbum2 + lda x_sector + sta.z cputsxy.x + // [1517] cputsxy::y#1 = rom_flash::y_sector#13 -- vbuz1=vbum2 + lda y_sector + sta.z cputsxy.y + // [1518] call cputsxy + // [850] phi from rom_flash::@16 to cputsxy [phi:rom_flash::@16->cputsxy] + // [850] phi cputsxy::s#4 = rom_flash::s [phi:rom_flash::@16->cputsxy#0] -- pbuz1=pbuc1 lda #s sta.z cputsxy.s+1 - // [805] phi cputsxy::y#4 = cputsxy::y#1 [phi:rom_flash::@16->cputsxy#1] -- register_copy - // [805] phi cputsxy::x#4 = cputsxy::x#1 [phi:rom_flash::@16->cputsxy#2] -- register_copy + // [850] phi cputsxy::y#4 = cputsxy::y#1 [phi:rom_flash::@16->cputsxy#1] -- register_copy + // [850] phi cputsxy::x#4 = cputsxy::x#1 [phi:rom_flash::@16->cputsxy#2] -- register_copy jsr cputsxy - // [1433] phi from rom_flash::@12 rom_flash::@16 to rom_flash::@4 [phi:rom_flash::@12/rom_flash::@16->rom_flash::@4] - // [1433] phi rom_flash::flash_errors#13 = rom_flash::flash_errors#1 [phi:rom_flash::@12/rom_flash::@16->rom_flash::@4#0] -- register_copy + // [1519] phi from rom_flash::@12 rom_flash::@16 to rom_flash::@4 [phi:rom_flash::@12/rom_flash::@16->rom_flash::@4] + // [1519] phi rom_flash::flash_errors#13 = rom_flash::flash_errors#1 [phi:rom_flash::@12/rom_flash::@16->rom_flash::@4#0] -- register_copy // rom_flash::@4 __b4: // ram_address_sector += ROM_SECTOR - // [1434] rom_flash::ram_address_sector#1 = rom_flash::ram_address_sector#11 + $1000 -- pbuz1=pbuz1_plus_vwuc1 - lda.z ram_address_sector + // [1520] rom_flash::ram_address_sector#1 = rom_flash::ram_address_sector#11 + $1000 -- pbum1=pbum1_plus_vwuc1 + lda ram_address_sector clc adc #<$1000 - sta.z ram_address_sector - lda.z ram_address_sector+1 + sta ram_address_sector + lda ram_address_sector+1 adc #>$1000 - sta.z ram_address_sector+1 + sta ram_address_sector+1 // rom_address_sector += ROM_SECTOR - // [1435] rom_flash::rom_address_sector#1 = rom_flash::rom_address_sector#12 + $1000 -- vdum1=vdum1_plus_vwuc1 + // [1521] rom_flash::rom_address_sector#1 = rom_flash::rom_address_sector#12 + $1000 -- vdum1=vdum1_plus_vwuc1 clc lda rom_address_sector adc #<$1000 @@ -9383,61 +10258,61 @@ rom_flash: { adc #0 sta rom_address_sector+3 // if (ram_address_sector == BRAM_HIGH) - // [1436] if(rom_flash::ram_address_sector#1!=$c000) goto rom_flash::@13 -- pbuz1_neq_vwuc1_then_la1 - lda.z ram_address_sector+1 + // [1522] if(rom_flash::ram_address_sector#1!=$c000) goto rom_flash::@13 -- pbum1_neq_vwuc1_then_la1 + lda ram_address_sector+1 cmp #>$c000 bne __b13 - lda.z ram_address_sector + lda ram_address_sector cmp #<$c000 bne __b13 // rom_flash::@17 // bram_bank_sector++; - // [1437] rom_flash::bram_bank_sector#1 = ++ rom_flash::bram_bank_sector#14 -- vbuz1=_inc_vbuz1 - inc.z bram_bank_sector - // [1438] phi from rom_flash::@17 to rom_flash::@13 [phi:rom_flash::@17->rom_flash::@13] - // [1438] phi rom_flash::bram_bank_sector#38 = rom_flash::bram_bank_sector#1 [phi:rom_flash::@17->rom_flash::@13#0] -- register_copy - // [1438] phi rom_flash::ram_address_sector#8 = (char *)$a000 [phi:rom_flash::@17->rom_flash::@13#1] -- pbuz1=pbuc1 + // [1523] rom_flash::bram_bank_sector#1 = ++ rom_flash::bram_bank_sector#14 -- vbum1=_inc_vbum1 + inc bram_bank_sector + // [1524] phi from rom_flash::@17 to rom_flash::@13 [phi:rom_flash::@17->rom_flash::@13] + // [1524] phi rom_flash::bram_bank_sector#38 = rom_flash::bram_bank_sector#1 [phi:rom_flash::@17->rom_flash::@13#0] -- register_copy + // [1524] phi rom_flash::ram_address_sector#8 = (char *)$a000 [phi:rom_flash::@17->rom_flash::@13#1] -- pbum1=pbuc1 lda #<$a000 - sta.z ram_address_sector + sta ram_address_sector lda #>$a000 - sta.z ram_address_sector+1 - // [1438] phi from rom_flash::@4 to rom_flash::@13 [phi:rom_flash::@4->rom_flash::@13] - // [1438] phi rom_flash::bram_bank_sector#38 = rom_flash::bram_bank_sector#14 [phi:rom_flash::@4->rom_flash::@13#0] -- register_copy - // [1438] phi rom_flash::ram_address_sector#8 = rom_flash::ram_address_sector#1 [phi:rom_flash::@4->rom_flash::@13#1] -- register_copy + sta ram_address_sector+1 + // [1524] phi from rom_flash::@4 to rom_flash::@13 [phi:rom_flash::@4->rom_flash::@13] + // [1524] phi rom_flash::bram_bank_sector#38 = rom_flash::bram_bank_sector#14 [phi:rom_flash::@4->rom_flash::@13#0] -- register_copy + // [1524] phi rom_flash::ram_address_sector#8 = rom_flash::ram_address_sector#1 [phi:rom_flash::@4->rom_flash::@13#1] -- register_copy // rom_flash::@13 __b13: // if (ram_address_sector == RAM_HIGH) - // [1439] if(rom_flash::ram_address_sector#8!=$9800) goto rom_flash::@44 -- pbuz1_neq_vwuc1_then_la1 - lda.z ram_address_sector+1 + // [1525] if(rom_flash::ram_address_sector#8!=$9800) goto rom_flash::@44 -- pbum1_neq_vwuc1_then_la1 + lda ram_address_sector+1 cmp #>$9800 bne __b14 - lda.z ram_address_sector + lda ram_address_sector cmp #<$9800 bne __b14 - // [1441] phi from rom_flash::@13 to rom_flash::@14 [phi:rom_flash::@13->rom_flash::@14] - // [1441] phi rom_flash::ram_address_sector#15 = (char *)$a000 [phi:rom_flash::@13->rom_flash::@14#0] -- pbuz1=pbuc1 + // [1527] phi from rom_flash::@13 to rom_flash::@14 [phi:rom_flash::@13->rom_flash::@14] + // [1527] phi rom_flash::ram_address_sector#15 = (char *)$a000 [phi:rom_flash::@13->rom_flash::@14#0] -- pbum1=pbuc1 lda #<$a000 - sta.z ram_address_sector + sta ram_address_sector lda #>$a000 - sta.z ram_address_sector+1 - // [1441] phi rom_flash::bram_bank_sector#12 = 1 [phi:rom_flash::@13->rom_flash::@14#1] -- vbuz1=vbuc1 + sta ram_address_sector+1 + // [1527] phi rom_flash::bram_bank_sector#12 = 1 [phi:rom_flash::@13->rom_flash::@14#1] -- vbum1=vbuc1 lda #1 - sta.z bram_bank_sector - // [1440] phi from rom_flash::@13 to rom_flash::@44 [phi:rom_flash::@13->rom_flash::@44] + sta bram_bank_sector + // [1526] phi from rom_flash::@13 to rom_flash::@44 [phi:rom_flash::@13->rom_flash::@44] // rom_flash::@44 - // [1441] phi from rom_flash::@44 to rom_flash::@14 [phi:rom_flash::@44->rom_flash::@14] - // [1441] phi rom_flash::ram_address_sector#15 = rom_flash::ram_address_sector#8 [phi:rom_flash::@44->rom_flash::@14#0] -- register_copy - // [1441] phi rom_flash::bram_bank_sector#12 = rom_flash::bram_bank_sector#38 [phi:rom_flash::@44->rom_flash::@14#1] -- register_copy + // [1527] phi from rom_flash::@44 to rom_flash::@14 [phi:rom_flash::@44->rom_flash::@14] + // [1527] phi rom_flash::ram_address_sector#15 = rom_flash::ram_address_sector#8 [phi:rom_flash::@44->rom_flash::@14#0] -- register_copy + // [1527] phi rom_flash::bram_bank_sector#12 = rom_flash::bram_bank_sector#38 [phi:rom_flash::@44->rom_flash::@14#1] -- register_copy // rom_flash::@14 __b14: // x_sector += 8 - // [1442] rom_flash::x_sector#1 = rom_flash::x_sector#10 + 8 -- vbuz1=vbuz1_plus_vbuc1 + // [1528] rom_flash::x_sector#1 = rom_flash::x_sector#10 + 8 -- vbum1=vbum1_plus_vbuc1 lda #8 clc - adc.z x_sector - sta.z x_sector + adc x_sector + sta x_sector // rom_address_sector % ROM_PROGRESS_ROW - // [1443] rom_flash::$29 = rom_flash::rom_address_sector#1 & ROM_PROGRESS_ROW-1 -- vdum1=vdum2_band_vduc1 + // [1529] rom_flash::$29 = rom_flash::rom_address_sector#1 & ROM_PROGRESS_ROW-1 -- vdum1=vdum2_band_vduc1 lda rom_address_sector and #ROM_PROGRESS_ROW-1>>$10 sta rom_flash__29+3 // if (!(rom_address_sector % ROM_PROGRESS_ROW)) - // [1444] if(0!=rom_flash::$29) goto rom_flash::@15 -- 0_neq_vdum1_then_la1 + // [1530] if(0!=rom_flash::$29) goto rom_flash::@15 -- 0_neq_vdum1_then_la1 lda rom_flash__29 ora rom_flash__29+1 ora rom_flash__29+2 @@ -9459,22 +10334,22 @@ rom_flash: { bne __b15 // rom_flash::@18 // y_sector++; - // [1445] rom_flash::y_sector#1 = ++ rom_flash::y_sector#13 -- vbuz1=_inc_vbuz1 - inc.z y_sector - // [1446] phi from rom_flash::@18 to rom_flash::@15 [phi:rom_flash::@18->rom_flash::@15] - // [1446] phi rom_flash::y_sector#18 = rom_flash::y_sector#1 [phi:rom_flash::@18->rom_flash::@15#0] -- register_copy - // [1446] phi rom_flash::x_sector#20 = PROGRESS_X [phi:rom_flash::@18->rom_flash::@15#1] -- vbuz1=vbuc1 + // [1531] rom_flash::y_sector#1 = ++ rom_flash::y_sector#13 -- vbum1=_inc_vbum1 + inc y_sector + // [1532] phi from rom_flash::@18 to rom_flash::@15 [phi:rom_flash::@18->rom_flash::@15] + // [1532] phi rom_flash::y_sector#18 = rom_flash::y_sector#1 [phi:rom_flash::@18->rom_flash::@15#0] -- register_copy + // [1532] phi rom_flash::x_sector#20 = PROGRESS_X [phi:rom_flash::@18->rom_flash::@15#1] -- vbum1=vbuc1 lda #PROGRESS_X - sta.z x_sector - // [1446] phi from rom_flash::@14 to rom_flash::@15 [phi:rom_flash::@14->rom_flash::@15] - // [1446] phi rom_flash::y_sector#18 = rom_flash::y_sector#13 [phi:rom_flash::@14->rom_flash::@15#0] -- register_copy - // [1446] phi rom_flash::x_sector#20 = rom_flash::x_sector#1 [phi:rom_flash::@14->rom_flash::@15#1] -- register_copy + sta x_sector + // [1532] phi from rom_flash::@14 to rom_flash::@15 [phi:rom_flash::@14->rom_flash::@15] + // [1532] phi rom_flash::y_sector#18 = rom_flash::y_sector#13 [phi:rom_flash::@14->rom_flash::@15#0] -- register_copy + // [1532] phi rom_flash::x_sector#20 = rom_flash::x_sector#1 [phi:rom_flash::@14->rom_flash::@15#1] -- register_copy // rom_flash::@15 __b15: // sprintf(info_text, "%u flash errors ...", flash_errors) - // [1447] call snprintf_init - // [982] phi from rom_flash::@15 to snprintf_init [phi:rom_flash::@15->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:rom_flash::@15->snprintf_init#0] -- pbuz1=pbuc1 + // [1533] call snprintf_init + // [1014] phi from rom_flash::@15 to snprintf_init [phi:rom_flash::@15->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:rom_flash::@15->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text @@ -9482,37 +10357,38 @@ rom_flash: { jsr snprintf_init // rom_flash::@40 // sprintf(info_text, "%u flash errors ...", flash_errors) - // [1448] printf_ulong::uvalue#6 = rom_flash::flash_errors#13 -- vduz1=vduz2 - lda.z flash_errors + // [1534] printf_ulong::uvalue#6 = rom_flash::flash_errors#13 -- vduz1=vdum2 + lda flash_errors sta.z printf_ulong.uvalue - lda.z flash_errors+1 + lda flash_errors+1 sta.z printf_ulong.uvalue+1 - lda.z flash_errors+2 + lda flash_errors+2 sta.z printf_ulong.uvalue+2 - lda.z flash_errors+3 + lda flash_errors+3 sta.z printf_ulong.uvalue+3 - // [1449] call printf_ulong - // [1399] phi from rom_flash::@40 to printf_ulong [phi:rom_flash::@40->printf_ulong] - // [1399] phi printf_ulong::format_zero_padding#10 = 0 [phi:rom_flash::@40->printf_ulong#0] -- vbuz1=vbuc1 + // [1535] call printf_ulong + // [1485] phi from rom_flash::@40 to printf_ulong [phi:rom_flash::@40->printf_ulong] + // [1485] phi printf_ulong::format_zero_padding#10 = 0 [phi:rom_flash::@40->printf_ulong#0] -- vbuz1=vbuc1 lda #0 sta.z printf_ulong.format_zero_padding - // [1399] phi printf_ulong::format_min_length#10 = 0 [phi:rom_flash::@40->printf_ulong#1] -- vbuz1=vbuc1 + // [1485] phi printf_ulong::format_min_length#10 = 0 [phi:rom_flash::@40->printf_ulong#1] -- vbuz1=vbuc1 sta.z printf_ulong.format_min_length - // [1399] phi printf_ulong::format_radix#10 = DECIMAL [phi:rom_flash::@40->printf_ulong#2] -- vbuxx=vbuc1 - ldx #DECIMAL - // [1399] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#6 [phi:rom_flash::@40->printf_ulong#3] -- register_copy + // [1485] phi printf_ulong::format_radix#10 = DECIMAL [phi:rom_flash::@40->printf_ulong#2] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_ulong.format_radix + // [1485] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#6 [phi:rom_flash::@40->printf_ulong#3] -- register_copy jsr printf_ulong - // [1450] phi from rom_flash::@40 to rom_flash::@41 [phi:rom_flash::@40->rom_flash::@41] + // [1536] phi from rom_flash::@40 to rom_flash::@41 [phi:rom_flash::@40->rom_flash::@41] // rom_flash::@41 // sprintf(info_text, "%u flash errors ...", flash_errors) - // [1451] call printf_str - // [987] phi from rom_flash::@41 to printf_str [phi:rom_flash::@41->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_flash::@41->printf_str#0] -- pprz1=pprc1 + // [1537] call printf_str + // [1019] phi from rom_flash::@41 to printf_str [phi:rom_flash::@41->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_flash::@41->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = rom_flash::s6 [phi:rom_flash::@41->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = rom_flash::s6 [phi:rom_flash::@41->printf_str#1] -- pbuz1=pbuc1 lda #s6 @@ -9520,66 +10396,66 @@ rom_flash: { jsr printf_str // rom_flash::@42 // sprintf(info_text, "%u flash errors ...", flash_errors) - // [1452] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1538] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1453] callexecute snputc -- call_vprc1 + // [1539] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_info_rom(rom_chip, STATUS_FLASHING, info_text) - // [1455] display_info_rom::rom_chip#3 = rom_flash::rom_chip#0 -- vbuz1=vbum2 + // [1541] display_info_rom::rom_chip#3 = rom_flash::rom_chip#0 -- vbuz1=vbum2 lda rom_chip sta.z display_info_rom.rom_chip - // [1456] call display_info_rom - // [1199] phi from rom_flash::@42 to display_info_rom [phi:rom_flash::@42->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = info_text [phi:rom_flash::@42->display_info_rom#0] -- pbuz1=pbuc1 + // [1542] call display_info_rom + // [1285] phi from rom_flash::@42 to display_info_rom [phi:rom_flash::@42->display_info_rom] + // [1285] phi display_info_rom::info_text#16 = info_text [phi:rom_flash::@42->display_info_rom#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_info_rom.info_text lda #>@info_text sta.z display_info_rom.info_text+1 - // [1199] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#3 [phi:rom_flash::@42->display_info_rom#1] -- register_copy - // [1199] phi display_info_rom::info_status#16 = STATUS_FLASHING [phi:rom_flash::@42->display_info_rom#2] -- vbum1=vbuc1 + // [1285] phi display_info_rom::rom_chip#16 = display_info_rom::rom_chip#3 [phi:rom_flash::@42->display_info_rom#1] -- register_copy + // [1285] phi display_info_rom::info_status#16 = STATUS_FLASHING [phi:rom_flash::@42->display_info_rom#2] -- vbuz1=vbuc1 lda #STATUS_FLASHING - sta display_info_rom.info_status + sta.z display_info_rom.info_status jsr display_info_rom - // [1418] phi from rom_flash::@42 to rom_flash::@1 [phi:rom_flash::@42->rom_flash::@1] - // [1418] phi rom_flash::y_sector#13 = rom_flash::y_sector#18 [phi:rom_flash::@42->rom_flash::@1#0] -- register_copy - // [1418] phi rom_flash::x_sector#10 = rom_flash::x_sector#20 [phi:rom_flash::@42->rom_flash::@1#1] -- register_copy - // [1418] phi rom_flash::flash_errors#10 = rom_flash::flash_errors#13 [phi:rom_flash::@42->rom_flash::@1#2] -- register_copy - // [1418] phi rom_flash::ram_address_sector#11 = rom_flash::ram_address_sector#15 [phi:rom_flash::@42->rom_flash::@1#3] -- register_copy - // [1418] phi rom_flash::bram_bank_sector#14 = rom_flash::bram_bank_sector#12 [phi:rom_flash::@42->rom_flash::@1#4] -- register_copy - // [1418] phi rom_flash::rom_address_sector#12 = rom_flash::rom_address_sector#1 [phi:rom_flash::@42->rom_flash::@1#5] -- register_copy + // [1504] phi from rom_flash::@42 to rom_flash::@1 [phi:rom_flash::@42->rom_flash::@1] + // [1504] phi rom_flash::y_sector#13 = rom_flash::y_sector#18 [phi:rom_flash::@42->rom_flash::@1#0] -- register_copy + // [1504] phi rom_flash::x_sector#10 = rom_flash::x_sector#20 [phi:rom_flash::@42->rom_flash::@1#1] -- register_copy + // [1504] phi rom_flash::flash_errors#10 = rom_flash::flash_errors#13 [phi:rom_flash::@42->rom_flash::@1#2] -- register_copy + // [1504] phi rom_flash::ram_address_sector#11 = rom_flash::ram_address_sector#15 [phi:rom_flash::@42->rom_flash::@1#3] -- register_copy + // [1504] phi rom_flash::bram_bank_sector#14 = rom_flash::bram_bank_sector#12 [phi:rom_flash::@42->rom_flash::@1#4] -- register_copy + // [1504] phi rom_flash::rom_address_sector#12 = rom_flash::rom_address_sector#1 [phi:rom_flash::@42->rom_flash::@1#5] -- register_copy jmp __b1 - // [1457] phi from rom_flash::@21 to rom_flash::@5 [phi:rom_flash::@21->rom_flash::@5] + // [1543] phi from rom_flash::@21 to rom_flash::@5 [phi:rom_flash::@21->rom_flash::@5] __b3: - // [1457] phi rom_flash::retries#12 = 0 [phi:rom_flash::@21->rom_flash::@5#0] -- vbuz1=vbuc1 + // [1543] phi rom_flash::retries#12 = 0 [phi:rom_flash::@21->rom_flash::@5#0] -- vbum1=vbuc1 lda #0 - sta.z retries - // [1457] phi rom_flash::flash_errors_sector#11 = 0 [phi:rom_flash::@21->rom_flash::@5#1] -- vwuz1=vwuc1 + sta retries + // [1543] phi rom_flash::flash_errors_sector#11 = 0 [phi:rom_flash::@21->rom_flash::@5#1] -- vwuz1=vwuc1 sta.z flash_errors_sector sta.z flash_errors_sector+1 - // [1457] phi from rom_flash::@43 to rom_flash::@5 [phi:rom_flash::@43->rom_flash::@5] - // [1457] phi rom_flash::retries#12 = rom_flash::retries#1 [phi:rom_flash::@43->rom_flash::@5#0] -- register_copy - // [1457] phi rom_flash::flash_errors_sector#11 = rom_flash::flash_errors_sector#10 [phi:rom_flash::@43->rom_flash::@5#1] -- register_copy + // [1543] phi from rom_flash::@43 to rom_flash::@5 [phi:rom_flash::@43->rom_flash::@5] + // [1543] phi rom_flash::retries#12 = rom_flash::retries#1 [phi:rom_flash::@43->rom_flash::@5#0] -- register_copy + // [1543] phi rom_flash::flash_errors_sector#11 = rom_flash::flash_errors_sector#10 [phi:rom_flash::@43->rom_flash::@5#1] -- register_copy // rom_flash::@5 __b5: // rom_sector_erase(rom_address_sector) - // [1458] rom_sector_erase::address#0 = rom_flash::rom_address_sector#12 -- vduz1=vdum2 + // [1544] rom_sector_erase::address#0 = rom_flash::rom_address_sector#12 -- vdum1=vdum2 lda rom_address_sector - sta.z rom_sector_erase.address + sta rom_sector_erase.address lda rom_address_sector+1 - sta.z rom_sector_erase.address+1 + sta rom_sector_erase.address+1 lda rom_address_sector+2 - sta.z rom_sector_erase.address+2 + sta rom_sector_erase.address+2 lda rom_address_sector+3 - sta.z rom_sector_erase.address+3 - // [1459] call rom_sector_erase - // [2425] phi from rom_flash::@5 to rom_sector_erase [phi:rom_flash::@5->rom_sector_erase] + sta rom_sector_erase.address+3 + // [1545] call rom_sector_erase + // [2487] phi from rom_flash::@5 to rom_sector_erase [phi:rom_flash::@5->rom_sector_erase] jsr rom_sector_erase // rom_flash::@22 // unsigned long rom_sector_boundary = rom_address_sector + ROM_SECTOR - // [1460] rom_flash::rom_sector_boundary#0 = rom_flash::rom_address_sector#12 + $1000 -- vdum1=vdum2_plus_vwuc1 + // [1546] rom_flash::rom_sector_boundary#0 = rom_flash::rom_address_sector#12 + $1000 -- vdum1=vdum2_plus_vwuc1 clc lda rom_address_sector adc #<$1000 @@ -9594,33 +10470,35 @@ rom_flash: { adc #0 sta rom_sector_boundary+3 // gotoxy(x, y) - // [1461] gotoxy::x#28 = rom_flash::x_sector#10 -- vbuxx=vbuz1 - ldx.z x_sector - // [1462] gotoxy::y#28 = rom_flash::y_sector#13 -- vbuyy=vbuz1 - ldy.z y_sector - // [1463] call gotoxy - // [718] phi from rom_flash::@22 to gotoxy [phi:rom_flash::@22->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#28 [phi:rom_flash::@22->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#28 [phi:rom_flash::@22->gotoxy#1] -- register_copy + // [1547] gotoxy::x#28 = rom_flash::x_sector#10 -- vbuz1=vbum2 + lda x_sector + sta.z gotoxy.x + // [1548] gotoxy::y#28 = rom_flash::y_sector#13 -- vbuz1=vbum2 + lda y_sector + sta.z gotoxy.y + // [1549] call gotoxy + // [763] phi from rom_flash::@22 to gotoxy [phi:rom_flash::@22->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#28 [phi:rom_flash::@22->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#28 [phi:rom_flash::@22->gotoxy#1] -- register_copy jsr gotoxy - // [1464] phi from rom_flash::@22 to rom_flash::@23 [phi:rom_flash::@22->rom_flash::@23] + // [1550] phi from rom_flash::@22 to rom_flash::@23 [phi:rom_flash::@22->rom_flash::@23] // rom_flash::@23 // printf("........") - // [1465] call printf_str - // [987] phi from rom_flash::@23 to printf_str [phi:rom_flash::@23->printf_str] - // [987] phi printf_str::putc#73 = &cputc [phi:rom_flash::@23->printf_str#0] -- pprz1=pprc1 + // [1551] call printf_str + // [1019] phi from rom_flash::@23 to printf_str [phi:rom_flash::@23->printf_str] + // [1019] phi printf_str::putc#73 = &cputc [phi:rom_flash::@23->printf_str#0] -- pprz1=pprc1 lda #cputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = rom_flash::s1 [phi:rom_flash::@23->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = rom_flash::s1 [phi:rom_flash::@23->printf_str#1] -- pbuz1=pbuc1 lda #s1 sta.z printf_str.s+1 jsr printf_str // rom_flash::@24 - // [1466] rom_flash::rom_address#26 = rom_flash::rom_address_sector#12 -- vduz1=vdum2 + // [1552] rom_flash::rom_address#26 = rom_flash::rom_address_sector#12 -- vduz1=vdum2 lda rom_address_sector sta.z rom_address lda rom_address_sector+1 @@ -9629,23 +10507,23 @@ rom_flash: { sta.z rom_address+2 lda rom_address_sector+3 sta.z rom_address+3 - // [1467] rom_flash::ram_address#26 = rom_flash::ram_address_sector#11 -- pbuz1=pbuz2 - lda.z ram_address_sector + // [1553] rom_flash::ram_address#26 = rom_flash::ram_address_sector#11 -- pbuz1=pbum2 + lda ram_address_sector sta.z ram_address - lda.z ram_address_sector+1 + lda ram_address_sector+1 sta.z ram_address+1 - // [1468] rom_flash::x#26 = rom_flash::x_sector#10 -- vbuz1=vbuz2 - lda.z x_sector + // [1554] rom_flash::x#26 = rom_flash::x_sector#10 -- vbuz1=vbum2 + lda x_sector sta.z x - // [1469] phi from rom_flash::@10 rom_flash::@24 to rom_flash::@6 [phi:rom_flash::@10/rom_flash::@24->rom_flash::@6] - // [1469] phi rom_flash::x#10 = rom_flash::x#1 [phi:rom_flash::@10/rom_flash::@24->rom_flash::@6#0] -- register_copy - // [1469] phi rom_flash::ram_address#10 = rom_flash::ram_address#1 [phi:rom_flash::@10/rom_flash::@24->rom_flash::@6#1] -- register_copy - // [1469] phi rom_flash::flash_errors_sector#10 = rom_flash::flash_errors_sector#8 [phi:rom_flash::@10/rom_flash::@24->rom_flash::@6#2] -- register_copy - // [1469] phi rom_flash::rom_address#11 = rom_flash::rom_address#1 [phi:rom_flash::@10/rom_flash::@24->rom_flash::@6#3] -- register_copy + // [1555] phi from rom_flash::@10 rom_flash::@24 to rom_flash::@6 [phi:rom_flash::@10/rom_flash::@24->rom_flash::@6] + // [1555] phi rom_flash::x#10 = rom_flash::x#1 [phi:rom_flash::@10/rom_flash::@24->rom_flash::@6#0] -- register_copy + // [1555] phi rom_flash::ram_address#10 = rom_flash::ram_address#1 [phi:rom_flash::@10/rom_flash::@24->rom_flash::@6#1] -- register_copy + // [1555] phi rom_flash::flash_errors_sector#10 = rom_flash::flash_errors_sector#8 [phi:rom_flash::@10/rom_flash::@24->rom_flash::@6#2] -- register_copy + // [1555] phi rom_flash::rom_address#11 = rom_flash::rom_address#1 [phi:rom_flash::@10/rom_flash::@24->rom_flash::@6#3] -- register_copy // rom_flash::@6 __b6: // while (rom_address < rom_sector_boundary) - // [1470] if(rom_flash::rom_address#11 ROM:%05x ... %u flash errors ...", bram_bank_sector, ram_address_sector, rom_address_sector, flash_errors_sector + flash_errors) - // [1475] printf_ulong::uvalue#5 = rom_flash::flash_errors_sector#10 + rom_flash::flash_errors#10 -- vduz1=vwuz2_plus_vduz3 - lda.z flash_errors + // [1561] printf_ulong::uvalue#5 = rom_flash::flash_errors_sector#10 + rom_flash::flash_errors#10 -- vdum1=vwuz2_plus_vdum3 + lda flash_errors clc adc.z flash_errors_sector - sta.z printf_ulong.uvalue_1 - lda.z flash_errors+1 + sta printf_ulong.uvalue_1 + lda flash_errors+1 adc.z flash_errors_sector+1 - sta.z printf_ulong.uvalue_1+1 - lda.z flash_errors+2 + sta printf_ulong.uvalue_1+1 + lda flash_errors+2 adc #0 - sta.z printf_ulong.uvalue_1+2 - lda.z flash_errors+3 + sta printf_ulong.uvalue_1+2 + lda flash_errors+3 adc #0 - sta.z printf_ulong.uvalue_1+3 - // [1476] call snprintf_init - // [982] phi from rom_flash::@7 to snprintf_init [phi:rom_flash::@7->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:rom_flash::@7->snprintf_init#0] -- pbuz1=pbuc1 + sta printf_ulong.uvalue_1+3 + // [1562] call snprintf_init + // [1014] phi from rom_flash::@7 to snprintf_init [phi:rom_flash::@7->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:rom_flash::@7->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [1477] phi from rom_flash::@7 to rom_flash::@25 [phi:rom_flash::@7->rom_flash::@25] + // [1563] phi from rom_flash::@7 to rom_flash::@25 [phi:rom_flash::@7->rom_flash::@25] // rom_flash::@25 // sprintf(info_text, "Flashing ... RAM:%02x:%04p -> ROM:%05x ... %u flash errors ...", bram_bank_sector, ram_address_sector, rom_address_sector, flash_errors_sector + flash_errors) - // [1478] call printf_str - // [987] phi from rom_flash::@25 to printf_str [phi:rom_flash::@25->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_flash::@25->printf_str#0] -- pprz1=pprc1 + // [1564] call printf_str + // [1019] phi from rom_flash::@25 to printf_str [phi:rom_flash::@25->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_flash::@25->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = rom_flash::s2 [phi:rom_flash::@25->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = rom_flash::s2 [phi:rom_flash::@25->printf_str#1] -- pbuz1=pbuc1 lda #s2 @@ -9739,36 +10617,38 @@ rom_flash: { jsr printf_str // rom_flash::@26 // sprintf(info_text, "Flashing ... RAM:%02x:%04p -> ROM:%05x ... %u flash errors ...", bram_bank_sector, ram_address_sector, rom_address_sector, flash_errors_sector + flash_errors) - // [1479] printf_uchar::uvalue#11 = rom_flash::bram_bank_sector#14 -- vbuxx=vbuz1 - ldx.z bram_bank_sector - // [1480] call printf_uchar - // [1165] phi from rom_flash::@26 to printf_uchar [phi:rom_flash::@26->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 1 [phi:rom_flash::@26->printf_uchar#0] -- vbuz1=vbuc1 + // [1565] printf_uchar::uvalue#11 = rom_flash::bram_bank_sector#14 -- vbuz1=vbum2 + lda bram_bank_sector + sta.z printf_uchar.uvalue + // [1566] call printf_uchar + // [1251] phi from rom_flash::@26 to printf_uchar [phi:rom_flash::@26->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 1 [phi:rom_flash::@26->printf_uchar#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 2 [phi:rom_flash::@26->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 2 [phi:rom_flash::@26->printf_uchar#1] -- vbuz1=vbuc1 lda #2 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:rom_flash::@26->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:rom_flash::@26->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = HEXADECIMAL [phi:rom_flash::@26->printf_uchar#3] -- vbuyy=vbuc1 - ldy #HEXADECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#11 [phi:rom_flash::@26->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = HEXADECIMAL [phi:rom_flash::@26->printf_uchar#3] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#11 [phi:rom_flash::@26->printf_uchar#4] -- register_copy jsr printf_uchar - // [1481] phi from rom_flash::@26 to rom_flash::@27 [phi:rom_flash::@26->rom_flash::@27] + // [1567] phi from rom_flash::@26 to rom_flash::@27 [phi:rom_flash::@26->rom_flash::@27] // rom_flash::@27 // sprintf(info_text, "Flashing ... RAM:%02x:%04p -> ROM:%05x ... %u flash errors ...", bram_bank_sector, ram_address_sector, rom_address_sector, flash_errors_sector + flash_errors) - // [1482] call printf_str - // [987] phi from rom_flash::@27 to printf_str [phi:rom_flash::@27->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_flash::@27->printf_str#0] -- pprz1=pprc1 + // [1568] call printf_str + // [1019] phi from rom_flash::@27 to printf_str [phi:rom_flash::@27->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_flash::@27->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s3 [phi:rom_flash::@27->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s3 [phi:rom_flash::@27->printf_str#1] -- pbuz1=pbuc1 lda #s3 @@ -9776,34 +10656,35 @@ rom_flash: { jsr printf_str // rom_flash::@28 // sprintf(info_text, "Flashing ... RAM:%02x:%04p -> ROM:%05x ... %u flash errors ...", bram_bank_sector, ram_address_sector, rom_address_sector, flash_errors_sector + flash_errors) - // [1483] printf_uint::uvalue#11 = (unsigned int)rom_flash::ram_address_sector#11 -- vwuz1=vwuz2 - lda.z ram_address_sector + // [1569] printf_uint::uvalue#11 = (unsigned int)rom_flash::ram_address_sector#11 -- vwuz1=vwum2 + lda ram_address_sector sta.z printf_uint.uvalue - lda.z ram_address_sector+1 + lda ram_address_sector+1 sta.z printf_uint.uvalue+1 - // [1484] call printf_uint - // [996] phi from rom_flash::@28 to printf_uint [phi:rom_flash::@28->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:rom_flash::@28->printf_uint#0] -- vbuz1=vbuc1 + // [1570] call printf_uint + // [1028] phi from rom_flash::@28 to printf_uint [phi:rom_flash::@28->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:rom_flash::@28->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 4 [phi:rom_flash::@28->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 4 [phi:rom_flash::@28->printf_uint#1] -- vbuz1=vbuc1 lda #4 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:rom_flash::@28->printf_uint#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#11 [phi:rom_flash::@28->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:rom_flash::@28->printf_uint#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#11 [phi:rom_flash::@28->printf_uint#3] -- register_copy jsr printf_uint - // [1485] phi from rom_flash::@28 to rom_flash::@29 [phi:rom_flash::@28->rom_flash::@29] + // [1571] phi from rom_flash::@28 to rom_flash::@29 [phi:rom_flash::@28->rom_flash::@29] // rom_flash::@29 // sprintf(info_text, "Flashing ... RAM:%02x:%04p -> ROM:%05x ... %u flash errors ...", bram_bank_sector, ram_address_sector, rom_address_sector, flash_errors_sector + flash_errors) - // [1486] call printf_str - // [987] phi from rom_flash::@29 to printf_str [phi:rom_flash::@29->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_flash::@29->printf_str#0] -- pprz1=pprc1 + // [1572] call printf_str + // [1019] phi from rom_flash::@29 to printf_str [phi:rom_flash::@29->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_flash::@29->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = rom_flash::s4 [phi:rom_flash::@29->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = rom_flash::s4 [phi:rom_flash::@29->printf_str#1] -- pbuz1=pbuc1 lda #s4 @@ -9811,7 +10692,7 @@ rom_flash: { jsr printf_str // rom_flash::@30 // sprintf(info_text, "Flashing ... RAM:%02x:%04p -> ROM:%05x ... %u flash errors ...", bram_bank_sector, ram_address_sector, rom_address_sector, flash_errors_sector + flash_errors) - // [1487] printf_ulong::uvalue#4 = rom_flash::rom_address_sector#12 -- vduz1=vdum2 + // [1573] printf_ulong::uvalue#4 = rom_flash::rom_address_sector#12 -- vduz1=vdum2 lda rom_address_sector sta.z printf_ulong.uvalue lda rom_address_sector+1 @@ -9820,67 +10701,69 @@ rom_flash: { sta.z printf_ulong.uvalue+2 lda rom_address_sector+3 sta.z printf_ulong.uvalue+3 - // [1488] call printf_ulong - // [1399] phi from rom_flash::@30 to printf_ulong [phi:rom_flash::@30->printf_ulong] - // [1399] phi printf_ulong::format_zero_padding#10 = 1 [phi:rom_flash::@30->printf_ulong#0] -- vbuz1=vbuc1 + // [1574] call printf_ulong + // [1485] phi from rom_flash::@30 to printf_ulong [phi:rom_flash::@30->printf_ulong] + // [1485] phi printf_ulong::format_zero_padding#10 = 1 [phi:rom_flash::@30->printf_ulong#0] -- vbuz1=vbuc1 lda #1 sta.z printf_ulong.format_zero_padding - // [1399] phi printf_ulong::format_min_length#10 = 5 [phi:rom_flash::@30->printf_ulong#1] -- vbuz1=vbuc1 + // [1485] phi printf_ulong::format_min_length#10 = 5 [phi:rom_flash::@30->printf_ulong#1] -- vbuz1=vbuc1 lda #5 sta.z printf_ulong.format_min_length - // [1399] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:rom_flash::@30->printf_ulong#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [1399] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#4 [phi:rom_flash::@30->printf_ulong#3] -- register_copy + // [1485] phi printf_ulong::format_radix#10 = HEXADECIMAL [phi:rom_flash::@30->printf_ulong#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_ulong.format_radix + // [1485] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#4 [phi:rom_flash::@30->printf_ulong#3] -- register_copy jsr printf_ulong - // [1489] phi from rom_flash::@30 to rom_flash::@31 [phi:rom_flash::@30->rom_flash::@31] + // [1575] phi from rom_flash::@30 to rom_flash::@31 [phi:rom_flash::@30->rom_flash::@31] // rom_flash::@31 // sprintf(info_text, "Flashing ... RAM:%02x:%04p -> ROM:%05x ... %u flash errors ...", bram_bank_sector, ram_address_sector, rom_address_sector, flash_errors_sector + flash_errors) - // [1490] call printf_str - // [987] phi from rom_flash::@31 to printf_str [phi:rom_flash::@31->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_flash::@31->printf_str#0] -- pprz1=pprc1 + // [1576] call printf_str + // [1019] phi from rom_flash::@31 to printf_str [phi:rom_flash::@31->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_flash::@31->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = rom_flash::s5 [phi:rom_flash::@31->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = rom_flash::s5 [phi:rom_flash::@31->printf_str#1] -- pbuz1=pbuc1 lda #s5 sta.z printf_str.s+1 jsr printf_str // rom_flash::@32 - // [1491] printf_ulong::uvalue#16 = printf_ulong::uvalue#5 -- vduz1=vduz2 - lda.z printf_ulong.uvalue_1 + // [1577] printf_ulong::uvalue#16 = printf_ulong::uvalue#5 -- vduz1=vdum2 + lda printf_ulong.uvalue_1 sta.z printf_ulong.uvalue - lda.z printf_ulong.uvalue_1+1 + lda printf_ulong.uvalue_1+1 sta.z printf_ulong.uvalue+1 - lda.z printf_ulong.uvalue_1+2 + lda printf_ulong.uvalue_1+2 sta.z printf_ulong.uvalue+2 - lda.z printf_ulong.uvalue_1+3 + lda printf_ulong.uvalue_1+3 sta.z printf_ulong.uvalue+3 // sprintf(info_text, "Flashing ... RAM:%02x:%04p -> ROM:%05x ... %u flash errors ...", bram_bank_sector, ram_address_sector, rom_address_sector, flash_errors_sector + flash_errors) - // [1492] call printf_ulong - // [1399] phi from rom_flash::@32 to printf_ulong [phi:rom_flash::@32->printf_ulong] - // [1399] phi printf_ulong::format_zero_padding#10 = 0 [phi:rom_flash::@32->printf_ulong#0] -- vbuz1=vbuc1 + // [1578] call printf_ulong + // [1485] phi from rom_flash::@32 to printf_ulong [phi:rom_flash::@32->printf_ulong] + // [1485] phi printf_ulong::format_zero_padding#10 = 0 [phi:rom_flash::@32->printf_ulong#0] -- vbuz1=vbuc1 lda #0 sta.z printf_ulong.format_zero_padding - // [1399] phi printf_ulong::format_min_length#10 = 0 [phi:rom_flash::@32->printf_ulong#1] -- vbuz1=vbuc1 + // [1485] phi printf_ulong::format_min_length#10 = 0 [phi:rom_flash::@32->printf_ulong#1] -- vbuz1=vbuc1 sta.z printf_ulong.format_min_length - // [1399] phi printf_ulong::format_radix#10 = DECIMAL [phi:rom_flash::@32->printf_ulong#2] -- vbuxx=vbuc1 - ldx #DECIMAL - // [1399] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#16 [phi:rom_flash::@32->printf_ulong#3] -- register_copy + // [1485] phi printf_ulong::format_radix#10 = DECIMAL [phi:rom_flash::@32->printf_ulong#2] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_ulong.format_radix + // [1485] phi printf_ulong::uvalue#10 = printf_ulong::uvalue#16 [phi:rom_flash::@32->printf_ulong#3] -- register_copy jsr printf_ulong - // [1493] phi from rom_flash::@32 to rom_flash::@33 [phi:rom_flash::@32->rom_flash::@33] + // [1579] phi from rom_flash::@32 to rom_flash::@33 [phi:rom_flash::@32->rom_flash::@33] // rom_flash::@33 // sprintf(info_text, "Flashing ... RAM:%02x:%04p -> ROM:%05x ... %u flash errors ...", bram_bank_sector, ram_address_sector, rom_address_sector, flash_errors_sector + flash_errors) - // [1494] call printf_str - // [987] phi from rom_flash::@33 to printf_str [phi:rom_flash::@33->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_flash::@33->printf_str#0] -- pprz1=pprc1 + // [1580] call printf_str + // [1019] phi from rom_flash::@33 to printf_str [phi:rom_flash::@33->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_flash::@33->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = rom_flash::s6 [phi:rom_flash::@33->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = rom_flash::s6 [phi:rom_flash::@33->printf_str#1] -- pbuz1=pbuc1 lda #s6 @@ -9888,17 +10771,17 @@ rom_flash: { jsr printf_str // rom_flash::@34 // sprintf(info_text, "Flashing ... RAM:%02x:%04p -> ROM:%05x ... %u flash errors ...", bram_bank_sector, ram_address_sector, rom_address_sector, flash_errors_sector + flash_errors) - // [1495] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1581] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1496] callexecute snputc -- call_vprc1 + // [1582] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [1498] call display_action_text - // [1176] phi from rom_flash::@34 to display_action_text [phi:rom_flash::@34->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:rom_flash::@34->display_action_text#0] -- pbuz1=pbuc1 + // [1584] call display_action_text + // [1262] phi from rom_flash::@34 to display_action_text [phi:rom_flash::@34->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:rom_flash::@34->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text @@ -9906,14 +10789,15 @@ rom_flash: { jsr display_action_text // rom_flash::@35 // unsigned long written_bytes = rom_write(bram_bank, (ram_ptr_t)ram_address, rom_address, ROM_PROGRESS_CELL) - // [1499] rom_write::flash_ram_bank#0 = rom_flash::bram_bank_sector#14 -- vbuxx=vbuz1 - ldx.z bram_bank_sector - // [1500] rom_write::flash_ram_address#1 = rom_flash::ram_address#10 -- pbuz1=pbuz2 + // [1585] rom_write::flash_ram_bank#0 = rom_flash::bram_bank_sector#14 -- vbuz1=vbum2 + lda bram_bank_sector + sta.z rom_write.flash_ram_bank + // [1586] rom_write::flash_ram_address#1 = rom_flash::ram_address#10 -- pbuz1=pbuz2 lda.z ram_address sta.z rom_write.flash_ram_address lda.z ram_address+1 sta.z rom_write.flash_ram_address+1 - // [1501] rom_write::flash_rom_address#1 = rom_flash::rom_address#11 -- vduz1=vduz2 + // [1587] rom_write::flash_rom_address#1 = rom_flash::rom_address#11 -- vduz1=vduz2 lda.z rom_address sta.z rom_write.flash_rom_address lda.z rom_address+1 @@ -9922,18 +10806,19 @@ rom_flash: { sta.z rom_write.flash_rom_address+2 lda.z rom_address+3 sta.z rom_write.flash_rom_address+3 - // [1502] call rom_write + // [1588] call rom_write jsr rom_write // rom_flash::@36 // rom_compare(bram_bank, (ram_ptr_t)ram_address, rom_address, ROM_PROGRESS_CELL) - // [1503] rom_compare::bank_ram#2 = rom_flash::bram_bank_sector#14 -- vbuxx=vbuz1 - ldx.z bram_bank_sector - // [1504] rom_compare::ptr_ram#3 = rom_flash::ram_address#10 -- pbuz1=pbuz2 + // [1589] rom_compare::bank_ram#2 = rom_flash::bram_bank_sector#14 -- vbuz1=vbum2 + lda bram_bank_sector + sta.z rom_compare.bank_ram + // [1590] rom_compare::ptr_ram#3 = rom_flash::ram_address#10 -- pbuz1=pbuz2 lda.z ram_address sta.z rom_compare.ptr_ram lda.z ram_address+1 sta.z rom_compare.ptr_ram+1 - // [1505] rom_compare::rom_compare_address#2 = rom_flash::rom_address#11 -- vduz1=vduz2 + // [1591] rom_compare::rom_compare_address#2 = rom_flash::rom_address#11 -- vduz1=vduz2 lda.z rom_address sta.z rom_compare.rom_compare_address lda.z rom_address+1 @@ -9942,39 +10827,41 @@ rom_flash: { sta.z rom_compare.rom_compare_address+2 lda.z rom_address+3 sta.z rom_compare.rom_compare_address+3 - // [1506] call rom_compare - // [2369] phi from rom_flash::@36 to rom_compare [phi:rom_flash::@36->rom_compare] - // [2369] phi rom_compare::ptr_ram#10 = rom_compare::ptr_ram#3 [phi:rom_flash::@36->rom_compare#0] -- register_copy - // [2369] phi rom_compare::rom_compare_size#11 = ROM_PROGRESS_CELL [phi:rom_flash::@36->rom_compare#1] -- vwuz1=vwuc1 + // [1592] call rom_compare + // [2431] phi from rom_flash::@36 to rom_compare [phi:rom_flash::@36->rom_compare] + // [2431] phi rom_compare::ptr_ram#10 = rom_compare::ptr_ram#3 [phi:rom_flash::@36->rom_compare#0] -- register_copy + // [2431] phi rom_compare::rom_compare_size#11 = ROM_PROGRESS_CELL [phi:rom_flash::@36->rom_compare#1] -- vwuz1=vwuc1 lda #ROM_PROGRESS_CELL sta.z rom_compare.rom_compare_size+1 - // [2369] phi rom_compare::rom_compare_address#3 = rom_compare::rom_compare_address#2 [phi:rom_flash::@36->rom_compare#2] -- register_copy - // [2369] phi rom_compare::bank_set_bram1_bank#0 = rom_compare::bank_ram#2 [phi:rom_flash::@36->rom_compare#3] -- register_copy + // [2431] phi rom_compare::rom_compare_address#3 = rom_compare::rom_compare_address#2 [phi:rom_flash::@36->rom_compare#2] -- register_copy + // [2431] phi rom_compare::bank_set_bram1_bank#0 = rom_compare::bank_ram#2 [phi:rom_flash::@36->rom_compare#3] -- register_copy jsr rom_compare // rom_compare(bram_bank, (ram_ptr_t)ram_address, rom_address, ROM_PROGRESS_CELL) - // [1507] rom_compare::return#4 = rom_compare::equal_bytes#2 + // [1593] rom_compare::return#4 = rom_compare::equal_bytes#2 // rom_flash::@37 // equal_bytes = rom_compare(bram_bank, (ram_ptr_t)ram_address, rom_address, ROM_PROGRESS_CELL) - // [1508] rom_flash::equal_bytes#1 = rom_compare::return#4 -- vwuz1=vwuz2 + // [1594] rom_flash::equal_bytes#1 = rom_compare::return#4 -- vwuz1=vwuz2 lda.z rom_compare.return sta.z equal_bytes_1 lda.z rom_compare.return+1 sta.z equal_bytes_1+1 // gotoxy(x, y) - // [1509] gotoxy::x#29 = rom_flash::x#10 -- vbuxx=vbuz1 - ldx.z x - // [1510] gotoxy::y#29 = rom_flash::y_sector#13 -- vbuyy=vbuz1 - ldy.z y_sector - // [1511] call gotoxy - // [718] phi from rom_flash::@37 to gotoxy [phi:rom_flash::@37->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#29 [phi:rom_flash::@37->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#29 [phi:rom_flash::@37->gotoxy#1] -- register_copy + // [1595] gotoxy::x#29 = rom_flash::x#10 -- vbuz1=vbuz2 + lda.z x + sta.z gotoxy.x + // [1596] gotoxy::y#29 = rom_flash::y_sector#13 -- vbuz1=vbum2 + lda y_sector + sta.z gotoxy.y + // [1597] call gotoxy + // [763] phi from rom_flash::@37 to gotoxy [phi:rom_flash::@37->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#29 [phi:rom_flash::@37->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#29 [phi:rom_flash::@37->gotoxy#1] -- register_copy jsr gotoxy // rom_flash::@38 // if (equal_bytes != ROM_PROGRESS_CELL) - // [1512] if(rom_flash::equal_bytes#1!=ROM_PROGRESS_CELL) goto rom_flash::@9 -- vwuz1_neq_vwuc1_then_la1 + // [1598] if(rom_flash::equal_bytes#1!=ROM_PROGRESS_CELL) goto rom_flash::@9 -- vwuz1_neq_vwuc1_then_la1 lda.z equal_bytes_1+1 cmp #>ROM_PROGRESS_CELL bne __b9 @@ -9983,24 +10870,26 @@ rom_flash: { bne __b9 // rom_flash::@11 // cputcxy(x,y,'+') - // [1513] cputcxy::x#14 = rom_flash::x#10 -- vbuxx=vbuz1 - ldx.z x - // [1514] cputcxy::y#14 = rom_flash::y_sector#13 -- vbuyy=vbuz1 - ldy.z y_sector - // [1515] call cputcxy - // [1986] phi from rom_flash::@11 to cputcxy [phi:rom_flash::@11->cputcxy] - // [1986] phi cputcxy::c#15 = '+' [phi:rom_flash::@11->cputcxy#0] -- vbuz1=vbuc1 + // [1599] cputcxy::x#14 = rom_flash::x#10 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [1600] cputcxy::y#14 = rom_flash::y_sector#13 -- vbuz1=vbum2 + lda y_sector + sta.z cputcxy.y + // [1601] call cputcxy + // [2043] phi from rom_flash::@11 to cputcxy [phi:rom_flash::@11->cputcxy] + // [2043] phi cputcxy::c#15 = '+' [phi:rom_flash::@11->cputcxy#0] -- vbuz1=vbuc1 lda #'+' sta.z cputcxy.c - // [1986] phi cputcxy::y#15 = cputcxy::y#14 [phi:rom_flash::@11->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#14 [phi:rom_flash::@11->cputcxy#2] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#14 [phi:rom_flash::@11->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#14 [phi:rom_flash::@11->cputcxy#2] -- register_copy jsr cputcxy - // [1516] phi from rom_flash::@11 rom_flash::@39 to rom_flash::@10 [phi:rom_flash::@11/rom_flash::@39->rom_flash::@10] - // [1516] phi rom_flash::flash_errors_sector#8 = rom_flash::flash_errors_sector#10 [phi:rom_flash::@11/rom_flash::@39->rom_flash::@10#0] -- register_copy + // [1602] phi from rom_flash::@11 rom_flash::@39 to rom_flash::@10 [phi:rom_flash::@11/rom_flash::@39->rom_flash::@10] + // [1602] phi rom_flash::flash_errors_sector#8 = rom_flash::flash_errors_sector#10 [phi:rom_flash::@11/rom_flash::@39->rom_flash::@10#0] -- register_copy // rom_flash::@10 __b10: // ram_address += ROM_PROGRESS_CELL - // [1517] rom_flash::ram_address#1 = rom_flash::ram_address#10 + ROM_PROGRESS_CELL -- pbuz1=pbuz1_plus_vwuc1 + // [1603] rom_flash::ram_address#1 = rom_flash::ram_address#10 + ROM_PROGRESS_CELL -- pbuz1=pbuz1_plus_vwuc1 lda.z ram_address clc adc #ROM_PROGRESS_CELL sta.z ram_address+1 // rom_address += ROM_PROGRESS_CELL - // [1518] rom_flash::rom_address#1 = rom_flash::rom_address#11 + ROM_PROGRESS_CELL -- vduz1=vduz1_plus_vwuc1 + // [1604] rom_flash::rom_address#1 = rom_flash::rom_address#11 + ROM_PROGRESS_CELL -- vduz1=vduz1_plus_vwuc1 clc lda.z rom_address adc #cputcxy] - // [1986] phi cputcxy::c#15 = '!' [phi:rom_flash::@9->cputcxy#0] -- vbuz1=vbuc1 + // [1606] cputcxy::x#13 = rom_flash::x#10 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [1607] cputcxy::y#13 = rom_flash::y_sector#13 -- vbuz1=vbum2 + lda y_sector + sta.z cputcxy.y + // [1608] call cputcxy + // [2043] phi from rom_flash::@9 to cputcxy [phi:rom_flash::@9->cputcxy] + // [2043] phi cputcxy::c#15 = '!' [phi:rom_flash::@9->cputcxy#0] -- vbuz1=vbuc1 lda #'!' sta.z cputcxy.c - // [1986] phi cputcxy::y#15 = cputcxy::y#13 [phi:rom_flash::@9->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#13 [phi:rom_flash::@9->cputcxy#2] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#13 [phi:rom_flash::@9->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#13 [phi:rom_flash::@9->cputcxy#2] -- register_copy jsr cputcxy // rom_flash::@39 // flash_errors_sector++; - // [1523] rom_flash::flash_errors_sector#1 = ++ rom_flash::flash_errors_sector#10 -- vwuz1=_inc_vwuz1 + // [1609] rom_flash::flash_errors_sector#1 = ++ rom_flash::flash_errors_sector#10 -- vwuz1=_inc_vwuz1 inc.z flash_errors_sector bne !+ inc.z flash_errors_sector+1 @@ -10072,9 +10963,17 @@ rom_flash: { rom_flash__29: .dword 0 .label rom_address_sector = main.flashed_bytes rom_boundary: .dword 0 + .label ram_address_sector = fgets.stream rom_sector_boundary: .dword 0 - .label rom_chip = fclose.sp - rom_bank_start: .byte 0 + .label retries = main.check_status_smc8_main__0 + .label flash_errors = main.rom_file_modulo + .label bram_bank_sector = main.check_status_roms_all1_check_status_rom1_main__0 + .label x_sector = main.check_status_vera3_main__0 + .label y_sector = main.check_status_roms3_check_status_rom1_main__0 + .label rom_chip = main.check_status_card_roms1_check_status_rom1_main__0 + .label rom_bank_start = rom_get_release.rom_get_release__0 + .label file_size = main.rom_flash_errors + .label return = main.rom_file_modulo } .segment Code // smc_flash @@ -10086,26 +10985,29 @@ rom_flash: { * @param smc_bytes_total Total bytes to flash the SMC from RAM. * @return unsigned int Total bytes flashed, 0 if there is an error. */ -// __zp($79) unsigned int smc_flash(__mem() unsigned int smc_bytes_total) +// __zp($ce) unsigned int smc_flash(__mem() unsigned int smc_bytes_total) smc_flash: { - .label smc_bootloader_start = $b0 - .label return = $79 - .label smc_bootloader_not_activated1 = $29 + .label cx16_k_i2c_write_byte1_return = $f7 + .label smc_bootloader_start = $f7 + .label return = $ce + .label smc_bootloader_not_activated1 = $2d // Waiting a bit to ensure the bootloader is activated. - .label smc_bootloader_activation_countdown = $75 + .label smc_bootloader_activation_countdown = $c6 // Waiting a bit to ensure the bootloader is activated. - .label smc_bootloader_activation_countdown_1 = $50 - .label smc_bootloader_not_activated = $29 - .label smc_ram_ptr = $ab - .label smc_package_flashed = $3c - .label smc_commit_result = $29 - .label smc_bytes_flashed = $79 - .label smc_row_bytes = $59 - .label smc_attempts_total = $5f + .label smc_bootloader_activation_countdown_1 = $d0 + .label smc_bootloader_not_activated = $2d + .label smc_byte_upload = $5b + .label smc_ram_ptr = $a9 + .label smc_commit_result = $2d + .label smc_attempts_flashed = $ec + .label smc_bytes_flashed = $ce + .label smc_row_bytes = $b4 + .label smc_attempts_total = $79 + .label y = $b3 // display_action_progress("To start the SMC update, do the below action ...") - // [1525] call display_action_progress - // [812] phi from smc_flash to display_action_progress [phi:smc_flash->display_action_progress] - // [812] phi display_action_progress::info_text#15 = smc_flash::info_text [phi:smc_flash->display_action_progress#0] -- pbuz1=pbuc1 + // [1611] call display_action_progress + // [857] phi from smc_flash to display_action_progress [phi:smc_flash->display_action_progress] + // [857] phi display_action_progress::info_text#18 = smc_flash::info_text [phi:smc_flash->display_action_progress#0] -- pbuz1=pbuc1 lda #info_text @@ -10113,18 +11015,18 @@ smc_flash: { jsr display_action_progress // smc_flash::@25 // unsigned char smc_bootloader_start = cx16_k_i2c_write_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_BOOTLOADER_RESET, 0x31) - // [1526] smc_flash::cx16_k_i2c_write_byte1_device = $42 -- vbum1=vbuc1 + // [1612] smc_flash::cx16_k_i2c_write_byte1_device = $42 -- vbum1=vbuc1 lda #$42 sta cx16_k_i2c_write_byte1_device - // [1527] smc_flash::cx16_k_i2c_write_byte1_offset = $8f -- vbum1=vbuc1 + // [1613] smc_flash::cx16_k_i2c_write_byte1_offset = $8f -- vbum1=vbuc1 lda #$8f sta cx16_k_i2c_write_byte1_offset - // [1528] smc_flash::cx16_k_i2c_write_byte1_value = $31 -- vbum1=vbuc1 + // [1614] smc_flash::cx16_k_i2c_write_byte1_value = $31 -- vbum1=vbuc1 lda #$31 sta cx16_k_i2c_write_byte1_value // smc_flash::cx16_k_i2c_write_byte1 // unsigned char result - // [1529] smc_flash::cx16_k_i2c_write_byte1_result = 0 -- vbum1=vbuc1 + // [1615] smc_flash::cx16_k_i2c_write_byte1_result = 0 -- vbum1=vbuc1 lda #0 sta cx16_k_i2c_write_byte1_result // asm @@ -10136,40 +11038,41 @@ smc_flash: { jsr CX16_I2C_WRITE_BYTE rol cx16_k_i2c_write_byte1_result // return result; - // [1531] smc_flash::cx16_k_i2c_write_byte1_return#0 = smc_flash::cx16_k_i2c_write_byte1_result -- vbuaa=vbum1 + // [1617] smc_flash::cx16_k_i2c_write_byte1_return#0 = smc_flash::cx16_k_i2c_write_byte1_result -- vbuz1=vbum2 lda cx16_k_i2c_write_byte1_result + sta.z cx16_k_i2c_write_byte1_return // smc_flash::cx16_k_i2c_write_byte1_@return // } - // [1532] smc_flash::cx16_k_i2c_write_byte1_return#1 = smc_flash::cx16_k_i2c_write_byte1_return#0 + // [1618] smc_flash::cx16_k_i2c_write_byte1_return#1 = smc_flash::cx16_k_i2c_write_byte1_return#0 // smc_flash::@22 // unsigned char smc_bootloader_start = cx16_k_i2c_write_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_BOOTLOADER_RESET, 0x31) - // [1533] smc_flash::smc_bootloader_start#0 = smc_flash::cx16_k_i2c_write_byte1_return#1 -- vbuz1=vbuaa - sta.z smc_bootloader_start + // [1619] smc_flash::smc_bootloader_start#0 = smc_flash::cx16_k_i2c_write_byte1_return#1 // if(smc_bootloader_start) - // [1534] if(0==smc_flash::smc_bootloader_start#0) goto smc_flash::@3 -- 0_eq_vbuz1_then_la1 + // [1620] if(0==smc_flash::smc_bootloader_start#0) goto smc_flash::@3 -- 0_eq_vbuz1_then_la1 + lda.z smc_bootloader_start beq __b6 - // [1535] phi from smc_flash::@22 to smc_flash::@2 [phi:smc_flash::@22->smc_flash::@2] + // [1621] phi from smc_flash::@22 to smc_flash::@2 [phi:smc_flash::@22->smc_flash::@2] // smc_flash::@2 // sprintf(info_text, "There was a problem starting the SMC bootloader: %x", smc_bootloader_start) - // [1536] call snprintf_init - // [982] phi from smc_flash::@2 to snprintf_init [phi:smc_flash::@2->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:smc_flash::@2->snprintf_init#0] -- pbuz1=pbuc1 + // [1622] call snprintf_init + // [1014] phi from smc_flash::@2 to snprintf_init [phi:smc_flash::@2->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:smc_flash::@2->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [1537] phi from smc_flash::@2 to smc_flash::@26 [phi:smc_flash::@2->smc_flash::@26] + // [1623] phi from smc_flash::@2 to smc_flash::@26 [phi:smc_flash::@2->smc_flash::@26] // smc_flash::@26 // sprintf(info_text, "There was a problem starting the SMC bootloader: %x", smc_bootloader_start) - // [1538] call printf_str - // [987] phi from smc_flash::@26 to printf_str [phi:smc_flash::@26->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_flash::@26->printf_str#0] -- pprz1=pprc1 + // [1624] call printf_str + // [1019] phi from smc_flash::@26 to printf_str [phi:smc_flash::@26->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_flash::@26->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_flash::s [phi:smc_flash::@26->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_flash::s [phi:smc_flash::@26->printf_str#1] -- pbuz1=pbuc1 lda #s @@ -10177,37 +11080,39 @@ smc_flash: { jsr printf_str // smc_flash::@27 // sprintf(info_text, "There was a problem starting the SMC bootloader: %x", smc_bootloader_start) - // [1539] printf_uchar::uvalue#4 = smc_flash::smc_bootloader_start#0 -- vbuxx=vbuz1 - ldx.z smc_bootloader_start - // [1540] call printf_uchar - // [1165] phi from smc_flash::@27 to printf_uchar [phi:smc_flash::@27->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 0 [phi:smc_flash::@27->printf_uchar#0] -- vbuz1=vbuc1 + // [1625] printf_uchar::uvalue#4 = smc_flash::smc_bootloader_start#0 -- vbuz1=vbuz2 + lda.z smc_bootloader_start + sta.z printf_uchar.uvalue + // [1626] call printf_uchar + // [1251] phi from smc_flash::@27 to printf_uchar [phi:smc_flash::@27->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 0 [phi:smc_flash::@27->printf_uchar#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 0 [phi:smc_flash::@27->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 0 [phi:smc_flash::@27->printf_uchar#1] -- vbuz1=vbuc1 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:smc_flash::@27->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:smc_flash::@27->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = HEXADECIMAL [phi:smc_flash::@27->printf_uchar#3] -- vbuyy=vbuc1 - ldy #HEXADECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#4 [phi:smc_flash::@27->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = HEXADECIMAL [phi:smc_flash::@27->printf_uchar#3] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#4 [phi:smc_flash::@27->printf_uchar#4] -- register_copy jsr printf_uchar // smc_flash::@28 // sprintf(info_text, "There was a problem starting the SMC bootloader: %x", smc_bootloader_start) - // [1541] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1627] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1542] callexecute snputc -- call_vprc1 + // [1628] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [1544] call display_action_text - // [1176] phi from smc_flash::@28 to display_action_text [phi:smc_flash::@28->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@28->display_action_text#0] -- pbuz1=pbuc1 + // [1630] call display_action_text + // [1262] phi from smc_flash::@28 to display_action_text [phi:smc_flash::@28->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@28->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text @@ -10215,18 +11120,18 @@ smc_flash: { jsr display_action_text // smc_flash::@29 // cx16_k_i2c_write_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_REBOOT, 0) - // [1545] smc_flash::cx16_k_i2c_write_byte2_device = $42 -- vbum1=vbuc1 + // [1631] smc_flash::cx16_k_i2c_write_byte2_device = $42 -- vbum1=vbuc1 lda #$42 sta cx16_k_i2c_write_byte2_device - // [1546] smc_flash::cx16_k_i2c_write_byte2_offset = $82 -- vbum1=vbuc1 + // [1632] smc_flash::cx16_k_i2c_write_byte2_offset = $82 -- vbum1=vbuc1 lda #$82 sta cx16_k_i2c_write_byte2_offset - // [1547] smc_flash::cx16_k_i2c_write_byte2_value = 0 -- vbum1=vbuc1 + // [1633] smc_flash::cx16_k_i2c_write_byte2_value = 0 -- vbum1=vbuc1 lda #0 sta cx16_k_i2c_write_byte2_value // smc_flash::cx16_k_i2c_write_byte2 // unsigned char result - // [1548] smc_flash::cx16_k_i2c_write_byte2_result = 0 -- vbum1=vbuc1 + // [1634] smc_flash::cx16_k_i2c_write_byte2_result = 0 -- vbum1=vbuc1 sta cx16_k_i2c_write_byte2_result // asm // asm { ldxdevice ldyoffset ldavalue stzresult jsrCX16_I2C_WRITE_BYTE rolresult } @@ -10236,83 +11141,83 @@ smc_flash: { stz cx16_k_i2c_write_byte2_result jsr CX16_I2C_WRITE_BYTE rol cx16_k_i2c_write_byte2_result - // [1550] phi from smc_flash::@47 smc_flash::@59 smc_flash::cx16_k_i2c_write_byte2 to smc_flash::@return [phi:smc_flash::@47/smc_flash::@59/smc_flash::cx16_k_i2c_write_byte2->smc_flash::@return] + // [1636] phi from smc_flash::@47 smc_flash::@59 smc_flash::cx16_k_i2c_write_byte2 to smc_flash::@return [phi:smc_flash::@47/smc_flash::@59/smc_flash::cx16_k_i2c_write_byte2->smc_flash::@return] __b2: - // [1550] phi smc_flash::return#1 = 0 [phi:smc_flash::@47/smc_flash::@59/smc_flash::cx16_k_i2c_write_byte2->smc_flash::@return#0] -- vwuz1=vbuc1 + // [1636] phi smc_flash::return#1 = 0 [phi:smc_flash::@47/smc_flash::@59/smc_flash::cx16_k_i2c_write_byte2->smc_flash::@return#0] -- vwuz1=vbuc1 lda #<0 sta.z return sta.z return+1 // smc_flash::@return // } - // [1551] return + // [1637] return rts - // [1552] phi from smc_flash::@22 to smc_flash::@3 [phi:smc_flash::@22->smc_flash::@3] + // [1638] phi from smc_flash::@22 to smc_flash::@3 [phi:smc_flash::@22->smc_flash::@3] __b6: - // [1552] phi smc_flash::smc_bootloader_activation_countdown#10 = $80 [phi:smc_flash::@22->smc_flash::@3#0] -- vbuz1=vbuc1 + // [1638] phi smc_flash::smc_bootloader_activation_countdown#10 = $80 [phi:smc_flash::@22->smc_flash::@3#0] -- vbuz1=vbuc1 lda #$80 sta.z smc_bootloader_activation_countdown // smc_flash::@3 __b3: // while(smc_bootloader_activation_countdown) - // [1553] if(0!=smc_flash::smc_bootloader_activation_countdown#10) goto smc_flash::@4 -- 0_neq_vbuz1_then_la1 + // [1639] if(0!=smc_flash::smc_bootloader_activation_countdown#10) goto smc_flash::@4 -- 0_neq_vbuz1_then_la1 lda.z smc_bootloader_activation_countdown beq !__b4+ jmp __b4 !__b4: - // [1554] phi from smc_flash::@3 smc_flash::@30 to smc_flash::@7 [phi:smc_flash::@3/smc_flash::@30->smc_flash::@7] + // [1640] phi from smc_flash::@3 smc_flash::@30 to smc_flash::@7 [phi:smc_flash::@3/smc_flash::@30->smc_flash::@7] __b9: - // [1554] phi smc_flash::smc_bootloader_activation_countdown#12 = $a [phi:smc_flash::@3/smc_flash::@30->smc_flash::@7#0] -- vbuz1=vbuc1 + // [1640] phi smc_flash::smc_bootloader_activation_countdown#12 = $a [phi:smc_flash::@3/smc_flash::@30->smc_flash::@7#0] -- vbuz1=vbuc1 lda #$a sta.z smc_bootloader_activation_countdown_1 // smc_flash::@7 __b7: // while(smc_bootloader_activation_countdown) - // [1555] if(0!=smc_flash::smc_bootloader_activation_countdown#12) goto smc_flash::@8 -- 0_neq_vbuz1_then_la1 + // [1641] if(0!=smc_flash::smc_bootloader_activation_countdown#12) goto smc_flash::@8 -- 0_neq_vbuz1_then_la1 lda.z smc_bootloader_activation_countdown_1 beq !__b8+ jmp __b8 !__b8: // smc_flash::@9 // cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_OFFSET) - // [1556] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 + // [1642] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 lda #$42 sta cx16_k_i2c_read_byte.device - // [1557] cx16_k_i2c_read_byte::offset = $8e -- vbum1=vbuc1 + // [1643] cx16_k_i2c_read_byte::offset = $8e -- vbum1=vbuc1 lda #$8e sta cx16_k_i2c_read_byte.offset - // [1558] call cx16_k_i2c_read_byte + // [1644] call cx16_k_i2c_read_byte jsr cx16_k_i2c_read_byte - // [1559] cx16_k_i2c_read_byte::return#12 = cx16_k_i2c_read_byte::return#1 + // [1645] cx16_k_i2c_read_byte::return#12 = cx16_k_i2c_read_byte::return#1 // smc_flash::@42 // smc_bootloader_not_activated = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_OFFSET) - // [1560] smc_flash::smc_bootloader_not_activated#1 = cx16_k_i2c_read_byte::return#12 + // [1646] smc_flash::smc_bootloader_not_activated#1 = cx16_k_i2c_read_byte::return#12 // if(smc_bootloader_not_activated) - // [1561] if(0==smc_flash::smc_bootloader_not_activated#1) goto smc_flash::@1 -- 0_eq_vwuz1_then_la1 + // [1647] if(0==smc_flash::smc_bootloader_not_activated#1) goto smc_flash::@1 -- 0_eq_vwuz1_then_la1 lda.z smc_bootloader_not_activated ora.z smc_bootloader_not_activated+1 beq __b1 - // [1562] phi from smc_flash::@42 to smc_flash::@10 [phi:smc_flash::@42->smc_flash::@10] + // [1648] phi from smc_flash::@42 to smc_flash::@10 [phi:smc_flash::@42->smc_flash::@10] // smc_flash::@10 // sprintf(info_text, "There was a problem activating the SMC bootloader: %x", smc_bootloader_not_activated) - // [1563] call snprintf_init - // [982] phi from smc_flash::@10 to snprintf_init [phi:smc_flash::@10->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:smc_flash::@10->snprintf_init#0] -- pbuz1=pbuc1 + // [1649] call snprintf_init + // [1014] phi from smc_flash::@10 to snprintf_init [phi:smc_flash::@10->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:smc_flash::@10->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [1564] phi from smc_flash::@10 to smc_flash::@45 [phi:smc_flash::@10->smc_flash::@45] + // [1650] phi from smc_flash::@10 to smc_flash::@45 [phi:smc_flash::@10->smc_flash::@45] // smc_flash::@45 // sprintf(info_text, "There was a problem activating the SMC bootloader: %x", smc_bootloader_not_activated) - // [1565] call printf_str - // [987] phi from smc_flash::@45 to printf_str [phi:smc_flash::@45->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_flash::@45->printf_str#0] -- pprz1=pprc1 + // [1651] call printf_str + // [1019] phi from smc_flash::@45 to printf_str [phi:smc_flash::@45->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_flash::@45->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_flash::s5 [phi:smc_flash::@45->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_flash::s5 [phi:smc_flash::@45->printf_str#1] -- pbuz1=pbuc1 lda #s5 @@ -10320,97 +11225,101 @@ smc_flash: { jsr printf_str // smc_flash::@46 // sprintf(info_text, "There was a problem activating the SMC bootloader: %x", smc_bootloader_not_activated) - // [1566] printf_uint::uvalue#4 = smc_flash::smc_bootloader_not_activated#1 - // [1567] call printf_uint - // [996] phi from smc_flash::@46 to printf_uint [phi:smc_flash::@46->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 0 [phi:smc_flash::@46->printf_uint#0] -- vbuz1=vbuc1 + // [1652] printf_uint::uvalue#4 = smc_flash::smc_bootloader_not_activated#1 + // [1653] call printf_uint + // [1028] phi from smc_flash::@46 to printf_uint [phi:smc_flash::@46->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 0 [phi:smc_flash::@46->printf_uint#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 0 [phi:smc_flash::@46->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 0 [phi:smc_flash::@46->printf_uint#1] -- vbuz1=vbuc1 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_flash::@46->printf_uint#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#4 [phi:smc_flash::@46->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_flash::@46->printf_uint#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#4 [phi:smc_flash::@46->printf_uint#3] -- register_copy jsr printf_uint // smc_flash::@47 // sprintf(info_text, "There was a problem activating the SMC bootloader: %x", smc_bootloader_not_activated) - // [1568] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1654] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1569] callexecute snputc -- call_vprc1 + // [1655] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [1571] call display_action_text - // [1176] phi from smc_flash::@47 to display_action_text [phi:smc_flash::@47->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@47->display_action_text#0] -- pbuz1=pbuc1 + // [1657] call display_action_text + // [1262] phi from smc_flash::@47 to display_action_text [phi:smc_flash::@47->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@47->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text sta.z display_action_text.info_text+1 jsr display_action_text jmp __b2 - // [1572] phi from smc_flash::@42 to smc_flash::@1 [phi:smc_flash::@42->smc_flash::@1] + // [1658] phi from smc_flash::@42 to smc_flash::@1 [phi:smc_flash::@42->smc_flash::@1] // smc_flash::@1 __b1: // display_action_progress("Updating SMC firmware ... (+) Updated") - // [1573] call display_action_progress - // [812] phi from smc_flash::@1 to display_action_progress [phi:smc_flash::@1->display_action_progress] - // [812] phi display_action_progress::info_text#15 = smc_flash::info_text1 [phi:smc_flash::@1->display_action_progress#0] -- pbuz1=pbuc1 + // [1659] call display_action_progress + // [857] phi from smc_flash::@1 to display_action_progress [phi:smc_flash::@1->display_action_progress] + // [857] phi display_action_progress::info_text#18 = smc_flash::info_text1 [phi:smc_flash::@1->display_action_progress#0] -- pbuz1=pbuc1 lda #info_text1 sta.z display_action_progress.info_text+1 jsr display_action_progress - // [1574] phi from smc_flash::@1 to smc_flash::@43 [phi:smc_flash::@1->smc_flash::@43] + // [1660] phi from smc_flash::@1 to smc_flash::@43 [phi:smc_flash::@1->smc_flash::@43] // smc_flash::@43 // textcolor(WHITE) - // [1575] call textcolor - // [700] phi from smc_flash::@43 to textcolor [phi:smc_flash::@43->textcolor] - // [700] phi textcolor::color#18 = WHITE [phi:smc_flash::@43->textcolor#0] -- vbuxx=vbuc1 - ldx #WHITE + // [1661] call textcolor + // [745] phi from smc_flash::@43 to textcolor [phi:smc_flash::@43->textcolor] + // [745] phi textcolor::color#18 = WHITE [phi:smc_flash::@43->textcolor#0] -- vbuz1=vbuc1 + lda #WHITE + sta.z textcolor.color jsr textcolor - // [1576] phi from smc_flash::@43 to smc_flash::@44 [phi:smc_flash::@43->smc_flash::@44] + // [1662] phi from smc_flash::@43 to smc_flash::@44 [phi:smc_flash::@43->smc_flash::@44] // smc_flash::@44 // gotoxy(x, y) - // [1577] call gotoxy - // [718] phi from smc_flash::@44 to gotoxy [phi:smc_flash::@44->gotoxy] - // [718] phi gotoxy::y#30 = PROGRESS_Y [phi:smc_flash::@44->gotoxy#0] -- vbuyy=vbuc1 - ldy #PROGRESS_Y - // [718] phi gotoxy::x#30 = PROGRESS_X [phi:smc_flash::@44->gotoxy#1] -- vbuxx=vbuc1 - ldx #PROGRESS_X + // [1663] call gotoxy + // [763] phi from smc_flash::@44 to gotoxy [phi:smc_flash::@44->gotoxy] + // [763] phi gotoxy::y#30 = PROGRESS_Y [phi:smc_flash::@44->gotoxy#0] -- vbuz1=vbuc1 + lda #PROGRESS_Y + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = PROGRESS_X [phi:smc_flash::@44->gotoxy#1] -- vbuz1=vbuc1 + lda #PROGRESS_X + sta.z gotoxy.x jsr gotoxy - // [1578] phi from smc_flash::@44 to smc_flash::@11 [phi:smc_flash::@44->smc_flash::@11] - // [1578] phi smc_flash::y#31 = PROGRESS_Y [phi:smc_flash::@44->smc_flash::@11#0] -- vbum1=vbuc1 + // [1664] phi from smc_flash::@44 to smc_flash::@11 [phi:smc_flash::@44->smc_flash::@11] + // [1664] phi smc_flash::y#31 = PROGRESS_Y [phi:smc_flash::@44->smc_flash::@11#0] -- vbuz1=vbuc1 lda #PROGRESS_Y - sta y - // [1578] phi smc_flash::smc_attempts_total#21 = 0 [phi:smc_flash::@44->smc_flash::@11#1] -- vwuz1=vwuc1 + sta.z y + // [1664] phi smc_flash::smc_attempts_total#21 = 0 [phi:smc_flash::@44->smc_flash::@11#1] -- vwuz1=vwuc1 lda #<0 sta.z smc_attempts_total sta.z smc_attempts_total+1 - // [1578] phi smc_flash::smc_row_bytes#14 = 0 [phi:smc_flash::@44->smc_flash::@11#2] -- vwuz1=vwuc1 + // [1664] phi smc_flash::smc_row_bytes#14 = 0 [phi:smc_flash::@44->smc_flash::@11#2] -- vwuz1=vwuc1 sta.z smc_row_bytes sta.z smc_row_bytes+1 - // [1578] phi smc_flash::smc_ram_ptr#13 = (char *)$7800 [phi:smc_flash::@44->smc_flash::@11#3] -- pbuz1=pbuc1 + // [1664] phi smc_flash::smc_ram_ptr#13 = (char *)$7800 [phi:smc_flash::@44->smc_flash::@11#3] -- pbuz1=pbuc1 lda #<$7800 sta.z smc_ram_ptr lda #>$7800 sta.z smc_ram_ptr+1 - // [1578] phi smc_flash::smc_bytes_flashed#16 = 0 [phi:smc_flash::@44->smc_flash::@11#4] -- vwuz1=vwuc1 + // [1664] phi smc_flash::smc_bytes_flashed#16 = 0 [phi:smc_flash::@44->smc_flash::@11#4] -- vwuz1=vwuc1 lda #<0 sta.z smc_bytes_flashed sta.z smc_bytes_flashed+1 - // [1578] phi from smc_flash::@13 to smc_flash::@11 [phi:smc_flash::@13->smc_flash::@11] - // [1578] phi smc_flash::y#31 = smc_flash::y#20 [phi:smc_flash::@13->smc_flash::@11#0] -- register_copy - // [1578] phi smc_flash::smc_attempts_total#21 = smc_flash::smc_attempts_total#17 [phi:smc_flash::@13->smc_flash::@11#1] -- register_copy - // [1578] phi smc_flash::smc_row_bytes#14 = smc_flash::smc_row_bytes#10 [phi:smc_flash::@13->smc_flash::@11#2] -- register_copy - // [1578] phi smc_flash::smc_ram_ptr#13 = smc_flash::smc_ram_ptr#10 [phi:smc_flash::@13->smc_flash::@11#3] -- register_copy - // [1578] phi smc_flash::smc_bytes_flashed#16 = smc_flash::smc_bytes_flashed#11 [phi:smc_flash::@13->smc_flash::@11#4] -- register_copy + // [1664] phi from smc_flash::@13 to smc_flash::@11 [phi:smc_flash::@13->smc_flash::@11] + // [1664] phi smc_flash::y#31 = smc_flash::y#20 [phi:smc_flash::@13->smc_flash::@11#0] -- register_copy + // [1664] phi smc_flash::smc_attempts_total#21 = smc_flash::smc_attempts_total#17 [phi:smc_flash::@13->smc_flash::@11#1] -- register_copy + // [1664] phi smc_flash::smc_row_bytes#14 = smc_flash::smc_row_bytes#10 [phi:smc_flash::@13->smc_flash::@11#2] -- register_copy + // [1664] phi smc_flash::smc_ram_ptr#13 = smc_flash::smc_ram_ptr#10 [phi:smc_flash::@13->smc_flash::@11#3] -- register_copy + // [1664] phi smc_flash::smc_bytes_flashed#16 = smc_flash::smc_bytes_flashed#11 [phi:smc_flash::@13->smc_flash::@11#4] -- register_copy // smc_flash::@11 __b11: // while(smc_bytes_flashed < smc_bytes_total) - // [1579] if(smc_flash::smc_bytes_flashed#16smc_flash::@return] - // [1550] phi smc_flash::return#1 = smc_flash::smc_bytes_flashed#16 [phi:smc_flash::@11->smc_flash::@return#0] -- register_copy + // [1636] phi from smc_flash::@11 to smc_flash::@return [phi:smc_flash::@11->smc_flash::@return] + // [1636] phi smc_flash::return#1 = smc_flash::smc_bytes_flashed#16 [phi:smc_flash::@11->smc_flash::@return#0] -- register_copy rts - // [1580] phi from smc_flash::@11 to smc_flash::@12 [phi:smc_flash::@11->smc_flash::@12] + // [1666] phi from smc_flash::@11 to smc_flash::@12 [phi:smc_flash::@11->smc_flash::@12] __b10: - // [1580] phi smc_flash::y#20 = smc_flash::y#31 [phi:smc_flash::@11->smc_flash::@12#0] -- register_copy - // [1580] phi smc_flash::smc_attempts_total#17 = smc_flash::smc_attempts_total#21 [phi:smc_flash::@11->smc_flash::@12#1] -- register_copy - // [1580] phi smc_flash::smc_row_bytes#10 = smc_flash::smc_row_bytes#14 [phi:smc_flash::@11->smc_flash::@12#2] -- register_copy - // [1580] phi smc_flash::smc_ram_ptr#10 = smc_flash::smc_ram_ptr#13 [phi:smc_flash::@11->smc_flash::@12#3] -- register_copy - // [1580] phi smc_flash::smc_bytes_flashed#11 = smc_flash::smc_bytes_flashed#16 [phi:smc_flash::@11->smc_flash::@12#4] -- register_copy - // [1580] phi smc_flash::smc_attempts_flashed#19 = 0 [phi:smc_flash::@11->smc_flash::@12#5] -- vbum1=vbuc1 + // [1666] phi smc_flash::y#20 = smc_flash::y#31 [phi:smc_flash::@11->smc_flash::@12#0] -- register_copy + // [1666] phi smc_flash::smc_attempts_total#17 = smc_flash::smc_attempts_total#21 [phi:smc_flash::@11->smc_flash::@12#1] -- register_copy + // [1666] phi smc_flash::smc_row_bytes#10 = smc_flash::smc_row_bytes#14 [phi:smc_flash::@11->smc_flash::@12#2] -- register_copy + // [1666] phi smc_flash::smc_ram_ptr#10 = smc_flash::smc_ram_ptr#13 [phi:smc_flash::@11->smc_flash::@12#3] -- register_copy + // [1666] phi smc_flash::smc_bytes_flashed#11 = smc_flash::smc_bytes_flashed#16 [phi:smc_flash::@11->smc_flash::@12#4] -- register_copy + // [1666] phi smc_flash::smc_attempts_flashed#19 = 0 [phi:smc_flash::@11->smc_flash::@12#5] -- vbuz1=vbuc1 lda #0 - sta smc_attempts_flashed - // [1580] phi smc_flash::smc_package_committed#2 = 0 [phi:smc_flash::@11->smc_flash::@12#6] -- vbum1=vbuc1 + sta.z smc_attempts_flashed + // [1666] phi smc_flash::smc_package_committed#2 = 0 [phi:smc_flash::@11->smc_flash::@12#6] -- vbum1=vbuc1 sta smc_package_committed // smc_flash::@12 __b12: // while(!smc_package_committed && smc_attempts_flashed < 10) - // [1581] if(0!=smc_flash::smc_package_committed#2) goto smc_flash::@13 -- 0_neq_vbum1_then_la1 + // [1667] if(0!=smc_flash::smc_package_committed#2) goto smc_flash::@13 -- 0_neq_vbum1_then_la1 lda smc_package_committed bne __b13 // smc_flash::@60 - // [1582] if(smc_flash::smc_attempts_flashed#19<$a) goto smc_flash::@14 -- vbum1_lt_vbuc1_then_la1 - lda smc_attempts_flashed + // [1668] if(smc_flash::smc_attempts_flashed#19<$a) goto smc_flash::@14 -- vbuz1_lt_vbuc1_then_la1 + lda.z smc_attempts_flashed cmp #$a bcc __b16 // smc_flash::@13 __b13: // if(smc_attempts_flashed >= 10) - // [1583] if(smc_flash::smc_attempts_flashed#19<$a) goto smc_flash::@11 -- vbum1_lt_vbuc1_then_la1 - lda smc_attempts_flashed + // [1669] if(smc_flash::smc_attempts_flashed#19<$a) goto smc_flash::@11 -- vbuz1_lt_vbuc1_then_la1 + lda.z smc_attempts_flashed cmp #$a bcc __b11 - // [1584] phi from smc_flash::@13 to smc_flash::@21 [phi:smc_flash::@13->smc_flash::@21] + // [1670] phi from smc_flash::@13 to smc_flash::@21 [phi:smc_flash::@13->smc_flash::@21] // smc_flash::@21 // sprintf(info_text, "There were too many attempts trying to flash the SMC at location %04x", smc_bytes_flashed) - // [1585] call snprintf_init - // [982] phi from smc_flash::@21 to snprintf_init [phi:smc_flash::@21->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:smc_flash::@21->snprintf_init#0] -- pbuz1=pbuc1 + // [1671] call snprintf_init + // [1014] phi from smc_flash::@21 to snprintf_init [phi:smc_flash::@21->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:smc_flash::@21->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [1586] phi from smc_flash::@21 to smc_flash::@57 [phi:smc_flash::@21->smc_flash::@57] + // [1672] phi from smc_flash::@21 to smc_flash::@57 [phi:smc_flash::@21->smc_flash::@57] // smc_flash::@57 // sprintf(info_text, "There were too many attempts trying to flash the SMC at location %04x", smc_bytes_flashed) - // [1587] call printf_str - // [987] phi from smc_flash::@57 to printf_str [phi:smc_flash::@57->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_flash::@57->printf_str#0] -- pprz1=pprc1 + // [1673] call printf_str + // [1019] phi from smc_flash::@57 to printf_str [phi:smc_flash::@57->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_flash::@57->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_flash::s10 [phi:smc_flash::@57->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_flash::s10 [phi:smc_flash::@57->printf_str#1] -- pbuz1=pbuc1 lda #s10 @@ -10481,58 +11390,59 @@ smc_flash: { jsr printf_str // smc_flash::@58 // sprintf(info_text, "There were too many attempts trying to flash the SMC at location %04x", smc_bytes_flashed) - // [1588] printf_uint::uvalue#8 = smc_flash::smc_bytes_flashed#11 -- vwuz1=vwuz2 + // [1674] printf_uint::uvalue#8 = smc_flash::smc_bytes_flashed#11 -- vwuz1=vwuz2 lda.z smc_bytes_flashed sta.z printf_uint.uvalue lda.z smc_bytes_flashed+1 sta.z printf_uint.uvalue+1 - // [1589] call printf_uint - // [996] phi from smc_flash::@58 to printf_uint [phi:smc_flash::@58->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_flash::@58->printf_uint#0] -- vbuz1=vbuc1 + // [1675] call printf_uint + // [1028] phi from smc_flash::@58 to printf_uint [phi:smc_flash::@58->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_flash::@58->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 4 [phi:smc_flash::@58->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 4 [phi:smc_flash::@58->printf_uint#1] -- vbuz1=vbuc1 lda #4 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_flash::@58->printf_uint#2] -- vbuxx=vbuc1 - ldx #HEXADECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#8 [phi:smc_flash::@58->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = HEXADECIMAL [phi:smc_flash::@58->printf_uint#2] -- vbuz1=vbuc1 + lda #HEXADECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#8 [phi:smc_flash::@58->printf_uint#3] -- register_copy jsr printf_uint // smc_flash::@59 // sprintf(info_text, "There were too many attempts trying to flash the SMC at location %04x", smc_bytes_flashed) - // [1590] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1676] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1591] callexecute snputc -- call_vprc1 + // [1677] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [1593] call display_action_text - // [1176] phi from smc_flash::@59 to display_action_text [phi:smc_flash::@59->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@59->display_action_text#0] -- pbuz1=pbuc1 + // [1679] call display_action_text + // [1262] phi from smc_flash::@59 to display_action_text [phi:smc_flash::@59->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@59->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text sta.z display_action_text.info_text+1 jsr display_action_text jmp __b2 - // [1594] phi from smc_flash::@60 to smc_flash::@14 [phi:smc_flash::@60->smc_flash::@14] + // [1680] phi from smc_flash::@60 to smc_flash::@14 [phi:smc_flash::@60->smc_flash::@14] __b16: - // [1594] phi smc_flash::smc_bytes_checksum#2 = 0 [phi:smc_flash::@60->smc_flash::@14#0] -- vbum1=vbuc1 + // [1680] phi smc_flash::smc_bytes_checksum#2 = 0 [phi:smc_flash::@60->smc_flash::@14#0] -- vbum1=vbuc1 lda #0 sta smc_bytes_checksum - // [1594] phi smc_flash::smc_ram_ptr#12 = smc_flash::smc_ram_ptr#10 [phi:smc_flash::@60->smc_flash::@14#1] -- register_copy - // [1594] phi smc_flash::smc_package_flashed#2 = 0 [phi:smc_flash::@60->smc_flash::@14#2] -- vwuz1=vwuc1 - sta.z smc_package_flashed - sta.z smc_package_flashed+1 + // [1680] phi smc_flash::smc_ram_ptr#12 = smc_flash::smc_ram_ptr#10 [phi:smc_flash::@60->smc_flash::@14#1] -- register_copy + // [1680] phi smc_flash::smc_package_flashed#2 = 0 [phi:smc_flash::@60->smc_flash::@14#2] -- vwum1=vwuc1 + sta smc_package_flashed + sta smc_package_flashed+1 // smc_flash::@14 __b14: // while(smc_package_flashed < SMC_PROGRESS_CELL) - // [1595] if(smc_flash::smc_package_flashed#2smc_flash::@12] - // [1580] phi smc_flash::y#20 = smc_flash::y#20 [phi:smc_flash::@17->smc_flash::@12#0] -- register_copy - // [1580] phi smc_flash::smc_attempts_total#17 = smc_flash::smc_attempts_total#17 [phi:smc_flash::@17->smc_flash::@12#1] -- register_copy - // [1580] phi smc_flash::smc_row_bytes#10 = smc_flash::smc_row_bytes#10 [phi:smc_flash::@17->smc_flash::@12#2] -- register_copy - // [1580] phi smc_flash::smc_ram_ptr#10 = smc_flash::smc_ram_ptr#2 [phi:smc_flash::@17->smc_flash::@12#3] -- register_copy - // [1580] phi smc_flash::smc_bytes_flashed#11 = smc_flash::smc_bytes_flashed#11 [phi:smc_flash::@17->smc_flash::@12#4] -- register_copy - // [1580] phi smc_flash::smc_attempts_flashed#19 = smc_flash::smc_attempts_flashed#1 [phi:smc_flash::@17->smc_flash::@12#5] -- register_copy - // [1580] phi smc_flash::smc_package_committed#2 = smc_flash::smc_package_committed#2 [phi:smc_flash::@17->smc_flash::@12#6] -- register_copy + // [1696] smc_flash::smc_attempts_flashed#1 = ++ smc_flash::smc_attempts_flashed#19 -- vbuz1=_inc_vbuz1 + inc.z smc_attempts_flashed + // [1666] phi from smc_flash::@17 to smc_flash::@12 [phi:smc_flash::@17->smc_flash::@12] + // [1666] phi smc_flash::y#20 = smc_flash::y#20 [phi:smc_flash::@17->smc_flash::@12#0] -- register_copy + // [1666] phi smc_flash::smc_attempts_total#17 = smc_flash::smc_attempts_total#17 [phi:smc_flash::@17->smc_flash::@12#1] -- register_copy + // [1666] phi smc_flash::smc_row_bytes#10 = smc_flash::smc_row_bytes#10 [phi:smc_flash::@17->smc_flash::@12#2] -- register_copy + // [1666] phi smc_flash::smc_ram_ptr#10 = smc_flash::smc_ram_ptr#2 [phi:smc_flash::@17->smc_flash::@12#3] -- register_copy + // [1666] phi smc_flash::smc_bytes_flashed#11 = smc_flash::smc_bytes_flashed#11 [phi:smc_flash::@17->smc_flash::@12#4] -- register_copy + // [1666] phi smc_flash::smc_attempts_flashed#19 = smc_flash::smc_attempts_flashed#1 [phi:smc_flash::@17->smc_flash::@12#5] -- register_copy + // [1666] phi smc_flash::smc_package_committed#2 = smc_flash::smc_package_committed#2 [phi:smc_flash::@17->smc_flash::@12#6] -- register_copy jmp __b12 // smc_flash::@18 __b18: // if (smc_row_bytes == SMC_PROGRESS_ROW) - // [1611] if(smc_flash::smc_row_bytes#10!=SMC_PROGRESS_ROW) goto smc_flash::@19 -- vwuz1_neq_vwuc1_then_la1 + // [1697] if(smc_flash::smc_row_bytes#10!=SMC_PROGRESS_ROW) goto smc_flash::@19 -- vwuz1_neq_vwuc1_then_la1 lda.z smc_row_bytes+1 cmp #>SMC_PROGRESS_ROW bne __b19 @@ -10625,38 +11536,40 @@ smc_flash: { bne __b19 // smc_flash::@20 // gotoxy(x, ++y); - // [1612] smc_flash::y#1 = ++ smc_flash::y#20 -- vbum1=_inc_vbum1 - inc y + // [1698] smc_flash::y#1 = ++ smc_flash::y#20 -- vbuz1=_inc_vbuz1 + inc.z y // gotoxy(x, ++y) - // [1613] gotoxy::y#22 = smc_flash::y#1 -- vbuyy=vbum1 - ldy y - // [1614] call gotoxy - // [718] phi from smc_flash::@20 to gotoxy [phi:smc_flash::@20->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#22 [phi:smc_flash::@20->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = PROGRESS_X [phi:smc_flash::@20->gotoxy#1] -- vbuxx=vbuc1 - ldx #PROGRESS_X + // [1699] gotoxy::y#22 = smc_flash::y#1 -- vbuz1=vbuz2 + lda.z y + sta.z gotoxy.y + // [1700] call gotoxy + // [763] phi from smc_flash::@20 to gotoxy [phi:smc_flash::@20->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#22 [phi:smc_flash::@20->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = PROGRESS_X [phi:smc_flash::@20->gotoxy#1] -- vbuz1=vbuc1 + lda #PROGRESS_X + sta.z gotoxy.x jsr gotoxy - // [1615] phi from smc_flash::@20 to smc_flash::@19 [phi:smc_flash::@20->smc_flash::@19] - // [1615] phi smc_flash::y#33 = smc_flash::y#1 [phi:smc_flash::@20->smc_flash::@19#0] -- register_copy - // [1615] phi smc_flash::smc_row_bytes#4 = 0 [phi:smc_flash::@20->smc_flash::@19#1] -- vwuz1=vbuc1 + // [1701] phi from smc_flash::@20 to smc_flash::@19 [phi:smc_flash::@20->smc_flash::@19] + // [1701] phi smc_flash::y#33 = smc_flash::y#1 [phi:smc_flash::@20->smc_flash::@19#0] -- register_copy + // [1701] phi smc_flash::smc_row_bytes#4 = 0 [phi:smc_flash::@20->smc_flash::@19#1] -- vwuz1=vbuc1 lda #<0 sta.z smc_row_bytes sta.z smc_row_bytes+1 - // [1615] phi from smc_flash::@18 to smc_flash::@19 [phi:smc_flash::@18->smc_flash::@19] - // [1615] phi smc_flash::y#33 = smc_flash::y#20 [phi:smc_flash::@18->smc_flash::@19#0] -- register_copy - // [1615] phi smc_flash::smc_row_bytes#4 = smc_flash::smc_row_bytes#10 [phi:smc_flash::@18->smc_flash::@19#1] -- register_copy + // [1701] phi from smc_flash::@18 to smc_flash::@19 [phi:smc_flash::@18->smc_flash::@19] + // [1701] phi smc_flash::y#33 = smc_flash::y#20 [phi:smc_flash::@18->smc_flash::@19#0] -- register_copy + // [1701] phi smc_flash::smc_row_bytes#4 = smc_flash::smc_row_bytes#10 [phi:smc_flash::@18->smc_flash::@19#1] -- register_copy // smc_flash::@19 __b19: // cputc('+') - // [1616] stackpush(char) = '+' -- _stackpushbyte_=vbuc1 + // [1702] stackpush(char) = '+' -- _stackpushbyte_=vbuc1 lda #'+' pha - // [1617] callexecute cputc -- call_vprc1 + // [1703] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // smc_bytes_flashed += SMC_PROGRESS_CELL - // [1619] smc_flash::smc_bytes_flashed#1 = smc_flash::smc_bytes_flashed#11 + SMC_PROGRESS_CELL -- vwuz1=vwuz1_plus_vbuc1 + // [1705] smc_flash::smc_bytes_flashed#1 = smc_flash::smc_bytes_flashed#11 + SMC_PROGRESS_CELL -- vwuz1=vwuz1_plus_vbuc1 lda #SMC_PROGRESS_CELL clc adc.z smc_bytes_flashed @@ -10665,7 +11578,7 @@ smc_flash: { inc.z smc_bytes_flashed+1 !: // smc_row_bytes += SMC_PROGRESS_CELL - // [1620] smc_flash::smc_row_bytes#1 = smc_flash::smc_row_bytes#4 + SMC_PROGRESS_CELL -- vwuz1=vwuz1_plus_vbuc1 + // [1706] smc_flash::smc_row_bytes#1 = smc_flash::smc_row_bytes#4 + SMC_PROGRESS_CELL -- vwuz1=vwuz1_plus_vbuc1 lda #SMC_PROGRESS_CELL clc adc.z smc_row_bytes @@ -10674,8 +11587,8 @@ smc_flash: { inc.z smc_row_bytes+1 !: // smc_attempts_total += smc_attempts_flashed - // [1621] smc_flash::smc_attempts_total#1 = smc_flash::smc_attempts_total#17 + smc_flash::smc_attempts_flashed#19 -- vwuz1=vwuz1_plus_vbum2 - lda smc_attempts_flashed + // [1707] smc_flash::smc_attempts_total#1 = smc_flash::smc_attempts_total#17 + smc_flash::smc_attempts_flashed#19 -- vwuz1=vwuz1_plus_vbuz2 + lda.z smc_attempts_flashed clc adc.z smc_attempts_total sta.z smc_attempts_total @@ -10683,25 +11596,25 @@ smc_flash: { inc.z smc_attempts_total+1 !: // sprintf(info_text, "Flashed %05u of %05u bytes in the SMC, with %02u retries ...", smc_bytes_flashed, smc_bytes_total, smc_attempts_total) - // [1622] call snprintf_init - // [982] phi from smc_flash::@19 to snprintf_init [phi:smc_flash::@19->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:smc_flash::@19->snprintf_init#0] -- pbuz1=pbuc1 + // [1708] call snprintf_init + // [1014] phi from smc_flash::@19 to snprintf_init [phi:smc_flash::@19->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:smc_flash::@19->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [1623] phi from smc_flash::@19 to smc_flash::@49 [phi:smc_flash::@19->smc_flash::@49] + // [1709] phi from smc_flash::@19 to smc_flash::@49 [phi:smc_flash::@19->smc_flash::@49] // smc_flash::@49 // sprintf(info_text, "Flashed %05u of %05u bytes in the SMC, with %02u retries ...", smc_bytes_flashed, smc_bytes_total, smc_attempts_total) - // [1624] call printf_str - // [987] phi from smc_flash::@49 to printf_str [phi:smc_flash::@49->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_flash::@49->printf_str#0] -- pprz1=pprc1 + // [1710] call printf_str + // [1019] phi from smc_flash::@49 to printf_str [phi:smc_flash::@49->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_flash::@49->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_flash::s6 [phi:smc_flash::@49->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_flash::s6 [phi:smc_flash::@49->printf_str#1] -- pbuz1=pbuc1 lda #s6 @@ -10709,34 +11622,35 @@ smc_flash: { jsr printf_str // smc_flash::@50 // sprintf(info_text, "Flashed %05u of %05u bytes in the SMC, with %02u retries ...", smc_bytes_flashed, smc_bytes_total, smc_attempts_total) - // [1625] printf_uint::uvalue#5 = smc_flash::smc_bytes_flashed#1 -- vwuz1=vwuz2 + // [1711] printf_uint::uvalue#5 = smc_flash::smc_bytes_flashed#1 -- vwuz1=vwuz2 lda.z smc_bytes_flashed sta.z printf_uint.uvalue lda.z smc_bytes_flashed+1 sta.z printf_uint.uvalue+1 - // [1626] call printf_uint - // [996] phi from smc_flash::@50 to printf_uint [phi:smc_flash::@50->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_flash::@50->printf_uint#0] -- vbuz1=vbuc1 + // [1712] call printf_uint + // [1028] phi from smc_flash::@50 to printf_uint [phi:smc_flash::@50->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_flash::@50->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 5 [phi:smc_flash::@50->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 5 [phi:smc_flash::@50->printf_uint#1] -- vbuz1=vbuc1 lda #5 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = DECIMAL [phi:smc_flash::@50->printf_uint#2] -- vbuxx=vbuc1 - ldx #DECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#5 [phi:smc_flash::@50->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = DECIMAL [phi:smc_flash::@50->printf_uint#2] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#5 [phi:smc_flash::@50->printf_uint#3] -- register_copy jsr printf_uint - // [1627] phi from smc_flash::@50 to smc_flash::@51 [phi:smc_flash::@50->smc_flash::@51] + // [1713] phi from smc_flash::@50 to smc_flash::@51 [phi:smc_flash::@50->smc_flash::@51] // smc_flash::@51 // sprintf(info_text, "Flashed %05u of %05u bytes in the SMC, with %02u retries ...", smc_bytes_flashed, smc_bytes_total, smc_attempts_total) - // [1628] call printf_str - // [987] phi from smc_flash::@51 to printf_str [phi:smc_flash::@51->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_flash::@51->printf_str#0] -- pprz1=pprc1 + // [1714] call printf_str + // [1019] phi from smc_flash::@51 to printf_str [phi:smc_flash::@51->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_flash::@51->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_flash::s7 [phi:smc_flash::@51->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_flash::s7 [phi:smc_flash::@51->printf_str#1] -- pbuz1=pbuc1 lda #s7 @@ -10744,34 +11658,35 @@ smc_flash: { jsr printf_str // smc_flash::@52 // sprintf(info_text, "Flashed %05u of %05u bytes in the SMC, with %02u retries ...", smc_bytes_flashed, smc_bytes_total, smc_attempts_total) - // [1629] printf_uint::uvalue#6 = smc_flash::smc_bytes_total#0 -- vwuz1=vwum2 + // [1715] printf_uint::uvalue#6 = smc_flash::smc_bytes_total#0 -- vwuz1=vwum2 lda smc_bytes_total sta.z printf_uint.uvalue lda smc_bytes_total+1 sta.z printf_uint.uvalue+1 - // [1630] call printf_uint - // [996] phi from smc_flash::@52 to printf_uint [phi:smc_flash::@52->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_flash::@52->printf_uint#0] -- vbuz1=vbuc1 + // [1716] call printf_uint + // [1028] phi from smc_flash::@52 to printf_uint [phi:smc_flash::@52->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_flash::@52->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 5 [phi:smc_flash::@52->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 5 [phi:smc_flash::@52->printf_uint#1] -- vbuz1=vbuc1 lda #5 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = DECIMAL [phi:smc_flash::@52->printf_uint#2] -- vbuxx=vbuc1 - ldx #DECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#6 [phi:smc_flash::@52->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = DECIMAL [phi:smc_flash::@52->printf_uint#2] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#6 [phi:smc_flash::@52->printf_uint#3] -- register_copy jsr printf_uint - // [1631] phi from smc_flash::@52 to smc_flash::@53 [phi:smc_flash::@52->smc_flash::@53] + // [1717] phi from smc_flash::@52 to smc_flash::@53 [phi:smc_flash::@52->smc_flash::@53] // smc_flash::@53 // sprintf(info_text, "Flashed %05u of %05u bytes in the SMC, with %02u retries ...", smc_bytes_flashed, smc_bytes_total, smc_attempts_total) - // [1632] call printf_str - // [987] phi from smc_flash::@53 to printf_str [phi:smc_flash::@53->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_flash::@53->printf_str#0] -- pprz1=pprc1 + // [1718] call printf_str + // [1019] phi from smc_flash::@53 to printf_str [phi:smc_flash::@53->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_flash::@53->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_flash::s8 [phi:smc_flash::@53->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_flash::s8 [phi:smc_flash::@53->printf_str#1] -- pbuz1=pbuc1 lda #s8 @@ -10779,34 +11694,35 @@ smc_flash: { jsr printf_str // smc_flash::@54 // sprintf(info_text, "Flashed %05u of %05u bytes in the SMC, with %02u retries ...", smc_bytes_flashed, smc_bytes_total, smc_attempts_total) - // [1633] printf_uint::uvalue#7 = smc_flash::smc_attempts_total#1 -- vwuz1=vwuz2 + // [1719] printf_uint::uvalue#7 = smc_flash::smc_attempts_total#1 -- vwuz1=vwuz2 lda.z smc_attempts_total sta.z printf_uint.uvalue lda.z smc_attempts_total+1 sta.z printf_uint.uvalue+1 - // [1634] call printf_uint - // [996] phi from smc_flash::@54 to printf_uint [phi:smc_flash::@54->printf_uint] - // [996] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_flash::@54->printf_uint#0] -- vbuz1=vbuc1 + // [1720] call printf_uint + // [1028] phi from smc_flash::@54 to printf_uint [phi:smc_flash::@54->printf_uint] + // [1028] phi printf_uint::format_zero_padding#15 = 1 [phi:smc_flash::@54->printf_uint#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uint.format_zero_padding - // [996] phi printf_uint::format_min_length#15 = 2 [phi:smc_flash::@54->printf_uint#1] -- vbuz1=vbuc1 + // [1028] phi printf_uint::format_min_length#15 = 2 [phi:smc_flash::@54->printf_uint#1] -- vbuz1=vbuc1 lda #2 sta.z printf_uint.format_min_length - // [996] phi printf_uint::format_radix#15 = DECIMAL [phi:smc_flash::@54->printf_uint#2] -- vbuxx=vbuc1 - ldx #DECIMAL - // [996] phi printf_uint::uvalue#15 = printf_uint::uvalue#7 [phi:smc_flash::@54->printf_uint#3] -- register_copy + // [1028] phi printf_uint::format_radix#15 = DECIMAL [phi:smc_flash::@54->printf_uint#2] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uint.format_radix + // [1028] phi printf_uint::uvalue#15 = printf_uint::uvalue#7 [phi:smc_flash::@54->printf_uint#3] -- register_copy jsr printf_uint - // [1635] phi from smc_flash::@54 to smc_flash::@55 [phi:smc_flash::@54->smc_flash::@55] + // [1721] phi from smc_flash::@54 to smc_flash::@55 [phi:smc_flash::@54->smc_flash::@55] // smc_flash::@55 // sprintf(info_text, "Flashed %05u of %05u bytes in the SMC, with %02u retries ...", smc_bytes_flashed, smc_bytes_total, smc_attempts_total) - // [1636] call printf_str - // [987] phi from smc_flash::@55 to printf_str [phi:smc_flash::@55->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_flash::@55->printf_str#0] -- pprz1=pprc1 + // [1722] call printf_str + // [1019] phi from smc_flash::@55 to printf_str [phi:smc_flash::@55->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_flash::@55->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_flash::s9 [phi:smc_flash::@55->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_flash::s9 [phi:smc_flash::@55->printf_str#1] -- pbuz1=pbuc1 lda #s9 @@ -10814,64 +11730,65 @@ smc_flash: { jsr printf_str // smc_flash::@56 // sprintf(info_text, "Flashed %05u of %05u bytes in the SMC, with %02u retries ...", smc_bytes_flashed, smc_bytes_total, smc_attempts_total) - // [1637] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1723] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1638] callexecute snputc -- call_vprc1 + // [1724] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [1640] call display_action_text - // [1176] phi from smc_flash::@56 to display_action_text [phi:smc_flash::@56->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@56->display_action_text#0] -- pbuz1=pbuc1 + // [1726] call display_action_text + // [1262] phi from smc_flash::@56 to display_action_text [phi:smc_flash::@56->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@56->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text sta.z display_action_text.info_text+1 jsr display_action_text - // [1580] phi from smc_flash::@56 to smc_flash::@12 [phi:smc_flash::@56->smc_flash::@12] - // [1580] phi smc_flash::y#20 = smc_flash::y#33 [phi:smc_flash::@56->smc_flash::@12#0] -- register_copy - // [1580] phi smc_flash::smc_attempts_total#17 = smc_flash::smc_attempts_total#1 [phi:smc_flash::@56->smc_flash::@12#1] -- register_copy - // [1580] phi smc_flash::smc_row_bytes#10 = smc_flash::smc_row_bytes#1 [phi:smc_flash::@56->smc_flash::@12#2] -- register_copy - // [1580] phi smc_flash::smc_ram_ptr#10 = smc_flash::smc_ram_ptr#12 [phi:smc_flash::@56->smc_flash::@12#3] -- register_copy - // [1580] phi smc_flash::smc_bytes_flashed#11 = smc_flash::smc_bytes_flashed#1 [phi:smc_flash::@56->smc_flash::@12#4] -- register_copy - // [1580] phi smc_flash::smc_attempts_flashed#19 = smc_flash::smc_attempts_flashed#19 [phi:smc_flash::@56->smc_flash::@12#5] -- register_copy - // [1580] phi smc_flash::smc_package_committed#2 = 1 [phi:smc_flash::@56->smc_flash::@12#6] -- vbum1=vbuc1 + // [1666] phi from smc_flash::@56 to smc_flash::@12 [phi:smc_flash::@56->smc_flash::@12] + // [1666] phi smc_flash::y#20 = smc_flash::y#33 [phi:smc_flash::@56->smc_flash::@12#0] -- register_copy + // [1666] phi smc_flash::smc_attempts_total#17 = smc_flash::smc_attempts_total#1 [phi:smc_flash::@56->smc_flash::@12#1] -- register_copy + // [1666] phi smc_flash::smc_row_bytes#10 = smc_flash::smc_row_bytes#1 [phi:smc_flash::@56->smc_flash::@12#2] -- register_copy + // [1666] phi smc_flash::smc_ram_ptr#10 = smc_flash::smc_ram_ptr#12 [phi:smc_flash::@56->smc_flash::@12#3] -- register_copy + // [1666] phi smc_flash::smc_bytes_flashed#11 = smc_flash::smc_bytes_flashed#1 [phi:smc_flash::@56->smc_flash::@12#4] -- register_copy + // [1666] phi smc_flash::smc_attempts_flashed#19 = smc_flash::smc_attempts_flashed#19 [phi:smc_flash::@56->smc_flash::@12#5] -- register_copy + // [1666] phi smc_flash::smc_package_committed#2 = 1 [phi:smc_flash::@56->smc_flash::@12#6] -- vbum1=vbuc1 lda #1 sta smc_package_committed jmp __b12 // smc_flash::@15 __b15: // unsigned char smc_byte_upload = *smc_ram_ptr - // [1641] smc_flash::smc_byte_upload#0 = *smc_flash::smc_ram_ptr#12 -- vbuxx=_deref_pbuz1 + // [1727] smc_flash::smc_byte_upload#0 = *smc_flash::smc_ram_ptr#12 -- vbuz1=_deref_pbuz2 ldy #0 lda (smc_ram_ptr),y - tax + sta.z smc_byte_upload // smc_ram_ptr++; - // [1642] smc_flash::smc_ram_ptr#1 = ++ smc_flash::smc_ram_ptr#12 -- pbuz1=_inc_pbuz1 + // [1728] smc_flash::smc_ram_ptr#1 = ++ smc_flash::smc_ram_ptr#12 -- pbuz1=_inc_pbuz1 inc.z smc_ram_ptr bne !+ inc.z smc_ram_ptr+1 !: // smc_bytes_checksum += smc_byte_upload - // [1643] smc_flash::smc_bytes_checksum#1 = smc_flash::smc_bytes_checksum#2 + smc_flash::smc_byte_upload#0 -- vbum1=vbum1_plus_vbuxx - txa + // [1729] smc_flash::smc_bytes_checksum#1 = smc_flash::smc_bytes_checksum#2 + smc_flash::smc_byte_upload#0 -- vbum1=vbum1_plus_vbuz2 + lda smc_bytes_checksum clc - adc smc_bytes_checksum + adc.z smc_byte_upload sta smc_bytes_checksum // unsigned char smc_upload_result = cx16_k_i2c_write_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_UPLOAD, smc_byte_upload) - // [1644] smc_flash::cx16_k_i2c_write_byte3_device = $42 -- vbum1=vbuc1 + // [1730] smc_flash::cx16_k_i2c_write_byte3_device = $42 -- vbum1=vbuc1 lda #$42 sta cx16_k_i2c_write_byte3_device - // [1645] smc_flash::cx16_k_i2c_write_byte3_offset = $80 -- vbum1=vbuc1 + // [1731] smc_flash::cx16_k_i2c_write_byte3_offset = $80 -- vbum1=vbuc1 lda #$80 sta cx16_k_i2c_write_byte3_offset - // [1646] smc_flash::cx16_k_i2c_write_byte3_value = smc_flash::smc_byte_upload#0 -- vbum1=vbuxx - stx cx16_k_i2c_write_byte3_value + // [1732] smc_flash::cx16_k_i2c_write_byte3_value = smc_flash::smc_byte_upload#0 -- vbum1=vbuz2 + lda.z smc_byte_upload + sta cx16_k_i2c_write_byte3_value // smc_flash::cx16_k_i2c_write_byte3 // unsigned char result - // [1647] smc_flash::cx16_k_i2c_write_byte3_result = 0 -- vbum1=vbuc1 + // [1733] smc_flash::cx16_k_i2c_write_byte3_result = 0 -- vbum1=vbuc1 lda #0 sta cx16_k_i2c_write_byte3_result // asm @@ -10884,45 +11801,45 @@ smc_flash: { rol cx16_k_i2c_write_byte3_result // smc_flash::@23 // smc_package_flashed++; - // [1649] smc_flash::smc_package_flashed#1 = ++ smc_flash::smc_package_flashed#2 -- vwuz1=_inc_vwuz1 - inc.z smc_package_flashed + // [1735] smc_flash::smc_package_flashed#1 = ++ smc_flash::smc_package_flashed#2 -- vwum1=_inc_vwum1 + inc smc_package_flashed bne !+ - inc.z smc_package_flashed+1 + inc smc_package_flashed+1 !: - // [1594] phi from smc_flash::@23 to smc_flash::@14 [phi:smc_flash::@23->smc_flash::@14] - // [1594] phi smc_flash::smc_bytes_checksum#2 = smc_flash::smc_bytes_checksum#1 [phi:smc_flash::@23->smc_flash::@14#0] -- register_copy - // [1594] phi smc_flash::smc_ram_ptr#12 = smc_flash::smc_ram_ptr#1 [phi:smc_flash::@23->smc_flash::@14#1] -- register_copy - // [1594] phi smc_flash::smc_package_flashed#2 = smc_flash::smc_package_flashed#1 [phi:smc_flash::@23->smc_flash::@14#2] -- register_copy + // [1680] phi from smc_flash::@23 to smc_flash::@14 [phi:smc_flash::@23->smc_flash::@14] + // [1680] phi smc_flash::smc_bytes_checksum#2 = smc_flash::smc_bytes_checksum#1 [phi:smc_flash::@23->smc_flash::@14#0] -- register_copy + // [1680] phi smc_flash::smc_ram_ptr#12 = smc_flash::smc_ram_ptr#1 [phi:smc_flash::@23->smc_flash::@14#1] -- register_copy + // [1680] phi smc_flash::smc_package_flashed#2 = smc_flash::smc_package_flashed#1 [phi:smc_flash::@23->smc_flash::@14#2] -- register_copy jmp __b14 - // [1650] phi from smc_flash::@7 to smc_flash::@8 [phi:smc_flash::@7->smc_flash::@8] + // [1736] phi from smc_flash::@7 to smc_flash::@8 [phi:smc_flash::@7->smc_flash::@8] // smc_flash::@8 __b8: // wait_moment() - // [1651] call wait_moment - // [1160] phi from smc_flash::@8 to wait_moment [phi:smc_flash::@8->wait_moment] + // [1737] call wait_moment + // [1246] phi from smc_flash::@8 to wait_moment [phi:smc_flash::@8->wait_moment] jsr wait_moment - // [1652] phi from smc_flash::@8 to smc_flash::@36 [phi:smc_flash::@8->smc_flash::@36] + // [1738] phi from smc_flash::@8 to smc_flash::@36 [phi:smc_flash::@8->smc_flash::@36] // smc_flash::@36 // sprintf(info_text, "Updating SMC in %u ...", smc_bootloader_activation_countdown) - // [1653] call snprintf_init - // [982] phi from smc_flash::@36 to snprintf_init [phi:smc_flash::@36->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:smc_flash::@36->snprintf_init#0] -- pbuz1=pbuc1 + // [1739] call snprintf_init + // [1014] phi from smc_flash::@36 to snprintf_init [phi:smc_flash::@36->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:smc_flash::@36->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [1654] phi from smc_flash::@36 to smc_flash::@37 [phi:smc_flash::@36->smc_flash::@37] + // [1740] phi from smc_flash::@36 to smc_flash::@37 [phi:smc_flash::@36->smc_flash::@37] // smc_flash::@37 // sprintf(info_text, "Updating SMC in %u ...", smc_bootloader_activation_countdown) - // [1655] call printf_str - // [987] phi from smc_flash::@37 to printf_str [phi:smc_flash::@37->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_flash::@37->printf_str#0] -- pprz1=pprc1 + // [1741] call printf_str + // [1019] phi from smc_flash::@37 to printf_str [phi:smc_flash::@37->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_flash::@37->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_flash::s3 [phi:smc_flash::@37->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_flash::s3 [phi:smc_flash::@37->printf_str#1] -- pbuz1=pbuc1 lda #s3 @@ -10930,35 +11847,37 @@ smc_flash: { jsr printf_str // smc_flash::@38 // sprintf(info_text, "Updating SMC in %u ...", smc_bootloader_activation_countdown) - // [1656] printf_uchar::uvalue#6 = smc_flash::smc_bootloader_activation_countdown#12 -- vbuxx=vbuz1 - ldx.z smc_bootloader_activation_countdown_1 - // [1657] call printf_uchar - // [1165] phi from smc_flash::@38 to printf_uchar [phi:smc_flash::@38->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 0 [phi:smc_flash::@38->printf_uchar#0] -- vbuz1=vbuc1 + // [1742] printf_uchar::uvalue#6 = smc_flash::smc_bootloader_activation_countdown#12 -- vbuz1=vbuz2 + lda.z smc_bootloader_activation_countdown_1 + sta.z printf_uchar.uvalue + // [1743] call printf_uchar + // [1251] phi from smc_flash::@38 to printf_uchar [phi:smc_flash::@38->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 0 [phi:smc_flash::@38->printf_uchar#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 0 [phi:smc_flash::@38->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 0 [phi:smc_flash::@38->printf_uchar#1] -- vbuz1=vbuc1 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:smc_flash::@38->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:smc_flash::@38->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = DECIMAL [phi:smc_flash::@38->printf_uchar#3] -- vbuyy=vbuc1 - ldy #DECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#6 [phi:smc_flash::@38->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = DECIMAL [phi:smc_flash::@38->printf_uchar#3] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#6 [phi:smc_flash::@38->printf_uchar#4] -- register_copy jsr printf_uchar - // [1658] phi from smc_flash::@38 to smc_flash::@39 [phi:smc_flash::@38->smc_flash::@39] + // [1744] phi from smc_flash::@38 to smc_flash::@39 [phi:smc_flash::@38->smc_flash::@39] // smc_flash::@39 // sprintf(info_text, "Updating SMC in %u ...", smc_bootloader_activation_countdown) - // [1659] call printf_str - // [987] phi from smc_flash::@39 to printf_str [phi:smc_flash::@39->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_flash::@39->printf_str#0] -- pprz1=pprc1 + // [1745] call printf_str + // [1019] phi from smc_flash::@39 to printf_str [phi:smc_flash::@39->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_flash::@39->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s4 [phi:smc_flash::@39->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s4 [phi:smc_flash::@39->printf_str#1] -- pbuz1=pbuc1 lda #s4 @@ -10966,17 +11885,17 @@ smc_flash: { jsr printf_str // smc_flash::@40 // sprintf(info_text, "Updating SMC in %u ...", smc_bootloader_activation_countdown) - // [1660] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1746] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1661] callexecute snputc -- call_vprc1 + // [1747] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [1663] call display_action_text - // [1176] phi from smc_flash::@40 to display_action_text [phi:smc_flash::@40->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@40->display_action_text#0] -- pbuz1=pbuc1 + // [1749] call display_action_text + // [1262] phi from smc_flash::@40 to display_action_text [phi:smc_flash::@40->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@40->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text @@ -10984,60 +11903,60 @@ smc_flash: { jsr display_action_text // smc_flash::@41 // smc_bootloader_activation_countdown--; - // [1664] smc_flash::smc_bootloader_activation_countdown#3 = -- smc_flash::smc_bootloader_activation_countdown#12 -- vbuz1=_dec_vbuz1 + // [1750] smc_flash::smc_bootloader_activation_countdown#3 = -- smc_flash::smc_bootloader_activation_countdown#12 -- vbuz1=_dec_vbuz1 dec.z smc_bootloader_activation_countdown_1 - // [1554] phi from smc_flash::@41 to smc_flash::@7 [phi:smc_flash::@41->smc_flash::@7] - // [1554] phi smc_flash::smc_bootloader_activation_countdown#12 = smc_flash::smc_bootloader_activation_countdown#3 [phi:smc_flash::@41->smc_flash::@7#0] -- register_copy + // [1640] phi from smc_flash::@41 to smc_flash::@7 [phi:smc_flash::@41->smc_flash::@7] + // [1640] phi smc_flash::smc_bootloader_activation_countdown#12 = smc_flash::smc_bootloader_activation_countdown#3 [phi:smc_flash::@41->smc_flash::@7#0] -- register_copy jmp __b7 // smc_flash::@4 __b4: // unsigned int smc_bootloader_not_activated = cx16_k_i2c_read_byte(FLASH_I2C_SMC_DEVICE, FLASH_I2C_SMC_OFFSET) - // [1665] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 + // [1751] cx16_k_i2c_read_byte::device = $42 -- vbum1=vbuc1 lda #$42 sta cx16_k_i2c_read_byte.device - // [1666] cx16_k_i2c_read_byte::offset = $8e -- vbum1=vbuc1 + // [1752] cx16_k_i2c_read_byte::offset = $8e -- vbum1=vbuc1 lda #$8e sta cx16_k_i2c_read_byte.offset - // [1667] call cx16_k_i2c_read_byte + // [1753] call cx16_k_i2c_read_byte jsr cx16_k_i2c_read_byte - // [1668] cx16_k_i2c_read_byte::return#11 = cx16_k_i2c_read_byte::return#1 + // [1754] cx16_k_i2c_read_byte::return#11 = cx16_k_i2c_read_byte::return#1 // smc_flash::@30 - // [1669] smc_flash::smc_bootloader_not_activated1#0 = cx16_k_i2c_read_byte::return#11 + // [1755] smc_flash::smc_bootloader_not_activated1#0 = cx16_k_i2c_read_byte::return#11 // if(smc_bootloader_not_activated) - // [1670] if(0!=smc_flash::smc_bootloader_not_activated1#0) goto smc_flash::@5 -- 0_neq_vwuz1_then_la1 + // [1756] if(0!=smc_flash::smc_bootloader_not_activated1#0) goto smc_flash::@5 -- 0_neq_vwuz1_then_la1 lda.z smc_bootloader_not_activated1 ora.z smc_bootloader_not_activated1+1 bne __b5 jmp __b9 - // [1671] phi from smc_flash::@30 to smc_flash::@5 [phi:smc_flash::@30->smc_flash::@5] + // [1757] phi from smc_flash::@30 to smc_flash::@5 [phi:smc_flash::@30->smc_flash::@5] // smc_flash::@5 __b5: // wait_moment() - // [1672] call wait_moment - // [1160] phi from smc_flash::@5 to wait_moment [phi:smc_flash::@5->wait_moment] + // [1758] call wait_moment + // [1246] phi from smc_flash::@5 to wait_moment [phi:smc_flash::@5->wait_moment] jsr wait_moment - // [1673] phi from smc_flash::@5 to smc_flash::@31 [phi:smc_flash::@5->smc_flash::@31] + // [1759] phi from smc_flash::@5 to smc_flash::@31 [phi:smc_flash::@5->smc_flash::@31] // smc_flash::@31 // sprintf(info_text, "[%03u] Press POWER and RESET on the CX16 to start the SMC update!", smc_bootloader_activation_countdown) - // [1674] call snprintf_init - // [982] phi from smc_flash::@31 to snprintf_init [phi:smc_flash::@31->snprintf_init] - // [982] phi snprintf_init::s#27 = info_text [phi:smc_flash::@31->snprintf_init#0] -- pbuz1=pbuc1 + // [1760] call snprintf_init + // [1014] phi from smc_flash::@31 to snprintf_init [phi:smc_flash::@31->snprintf_init] + // [1014] phi snprintf_init::s#27 = info_text [phi:smc_flash::@31->snprintf_init#0] -- pbuz1=pbuc1 lda #<@info_text sta.z snprintf_init.s lda #>@info_text sta.z snprintf_init.s+1 jsr snprintf_init - // [1675] phi from smc_flash::@31 to smc_flash::@32 [phi:smc_flash::@31->smc_flash::@32] + // [1761] phi from smc_flash::@31 to smc_flash::@32 [phi:smc_flash::@31->smc_flash::@32] // smc_flash::@32 // sprintf(info_text, "[%03u] Press POWER and RESET on the CX16 to start the SMC update!", smc_bootloader_activation_countdown) - // [1676] call printf_str - // [987] phi from smc_flash::@32 to printf_str [phi:smc_flash::@32->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_flash::@32->printf_str#0] -- pprz1=pprc1 + // [1762] call printf_str + // [1019] phi from smc_flash::@32 to printf_str [phi:smc_flash::@32->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_flash::@32->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_flash::s1 [phi:smc_flash::@32->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_flash::s1 [phi:smc_flash::@32->printf_str#1] -- pbuz1=pbuc1 lda #s1 @@ -11045,36 +11964,38 @@ smc_flash: { jsr printf_str // smc_flash::@33 // sprintf(info_text, "[%03u] Press POWER and RESET on the CX16 to start the SMC update!", smc_bootloader_activation_countdown) - // [1677] printf_uchar::uvalue#5 = smc_flash::smc_bootloader_activation_countdown#10 -- vbuxx=vbuz1 - ldx.z smc_bootloader_activation_countdown - // [1678] call printf_uchar - // [1165] phi from smc_flash::@33 to printf_uchar [phi:smc_flash::@33->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 1 [phi:smc_flash::@33->printf_uchar#0] -- vbuz1=vbuc1 + // [1763] printf_uchar::uvalue#5 = smc_flash::smc_bootloader_activation_countdown#10 -- vbuz1=vbuz2 + lda.z smc_bootloader_activation_countdown + sta.z printf_uchar.uvalue + // [1764] call printf_uchar + // [1251] phi from smc_flash::@33 to printf_uchar [phi:smc_flash::@33->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 1 [phi:smc_flash::@33->printf_uchar#0] -- vbuz1=vbuc1 lda #1 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 3 [phi:smc_flash::@33->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 3 [phi:smc_flash::@33->printf_uchar#1] -- vbuz1=vbuc1 lda #3 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:smc_flash::@33->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:smc_flash::@33->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = DECIMAL [phi:smc_flash::@33->printf_uchar#3] -- vbuyy=vbuc1 - ldy #DECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#5 [phi:smc_flash::@33->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = DECIMAL [phi:smc_flash::@33->printf_uchar#3] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#5 [phi:smc_flash::@33->printf_uchar#4] -- register_copy jsr printf_uchar - // [1679] phi from smc_flash::@33 to smc_flash::@34 [phi:smc_flash::@33->smc_flash::@34] + // [1765] phi from smc_flash::@33 to smc_flash::@34 [phi:smc_flash::@33->smc_flash::@34] // smc_flash::@34 // sprintf(info_text, "[%03u] Press POWER and RESET on the CX16 to start the SMC update!", smc_bootloader_activation_countdown) - // [1680] call printf_str - // [987] phi from smc_flash::@34 to printf_str [phi:smc_flash::@34->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:smc_flash::@34->printf_str#0] -- pprz1=pprc1 + // [1766] call printf_str + // [1019] phi from smc_flash::@34 to printf_str [phi:smc_flash::@34->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:smc_flash::@34->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = smc_flash::s2 [phi:smc_flash::@34->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = smc_flash::s2 [phi:smc_flash::@34->printf_str#1] -- pbuz1=pbuc1 lda #s2 @@ -11082,17 +12003,17 @@ smc_flash: { jsr printf_str // smc_flash::@35 // sprintf(info_text, "[%03u] Press POWER and RESET on the CX16 to start the SMC update!", smc_bootloader_activation_countdown) - // [1681] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1767] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1682] callexecute snputc -- call_vprc1 + // [1768] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_action_text(info_text) - // [1684] call display_action_text - // [1176] phi from smc_flash::@35 to display_action_text [phi:smc_flash::@35->display_action_text] - // [1176] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@35->display_action_text#0] -- pbuz1=pbuc1 + // [1770] call display_action_text + // [1262] phi from smc_flash::@35 to display_action_text [phi:smc_flash::@35->display_action_text] + // [1262] phi display_action_text::info_text#19 = info_text [phi:smc_flash::@35->display_action_text#0] -- pbuz1=pbuc1 lda #<@info_text sta.z display_action_text.info_text lda #>@info_text @@ -11100,10 +12021,10 @@ smc_flash: { jsr display_action_text // smc_flash::@6 // smc_bootloader_activation_countdown--; - // [1685] smc_flash::smc_bootloader_activation_countdown#2 = -- smc_flash::smc_bootloader_activation_countdown#10 -- vbuz1=_dec_vbuz1 + // [1771] smc_flash::smc_bootloader_activation_countdown#2 = -- smc_flash::smc_bootloader_activation_countdown#10 -- vbuz1=_dec_vbuz1 dec.z smc_bootloader_activation_countdown - // [1552] phi from smc_flash::@6 to smc_flash::@3 [phi:smc_flash::@6->smc_flash::@3] - // [1552] phi smc_flash::smc_bootloader_activation_countdown#10 = smc_flash::smc_bootloader_activation_countdown#2 [phi:smc_flash::@6->smc_flash::@3#0] -- register_copy + // [1638] phi from smc_flash::@6 to smc_flash::@3 [phi:smc_flash::@6->smc_flash::@3] + // [1638] phi smc_flash::smc_bootloader_activation_countdown#10 = smc_flash::smc_bootloader_activation_countdown#2 [phi:smc_flash::@6->smc_flash::@3#0] -- register_copy jmp __b3 .segment Data info_text: .text "To start the SMC update, do the below action ..." @@ -11130,6 +12051,8 @@ smc_flash: { .byte 0 s10: .text "There were too many attempts trying to flash the SMC at location " .byte 0 + .label smc_flash__26 = util_wait_key.return + .label smc_flash__27 = util_wait_key.return cx16_k_i2c_write_byte1_device: .byte 0 cx16_k_i2c_write_byte1_offset: .byte 0 cx16_k_i2c_write_byte1_value: .byte 0 @@ -11146,134 +12069,10 @@ smc_flash: { cx16_k_i2c_write_byte4_offset: .byte 0 cx16_k_i2c_write_byte4_value: .byte 0 cx16_k_i2c_write_byte4_result: .byte 0 - smc_bytes_checksum: .byte 0 - .label smc_attempts_flashed = main.check_status_smc11_return - .label y = main.check_status_smc10_return + .label smc_bytes_checksum = util_wait_key.return + smc_package_flashed: .word 0 .label smc_bytes_total = util_wait_key.ch - smc_package_committed: .byte 0 -} -.segment Code - // util_wait_key -/** - * @brief - * - * @param info_text - * @param filter - * @return unsigned char - */ -// __register(A) char util_wait_key(__zp($55) char *info_text, __zp($76) char *filter) -util_wait_key: { - .const bank_set_bram1_bank = 0 - .const bank_set_brom1_bank = 4 - .label util_wait_key__9 = $c2 - .label info_text = $55 - .label filter = $76 - // display_action_text(info_text) - // [1687] display_action_text::info_text#0 = util_wait_key::info_text#2 - // [1688] call display_action_text - // [1176] phi from util_wait_key to display_action_text [phi:util_wait_key->display_action_text] - // [1176] phi display_action_text::info_text#19 = display_action_text::info_text#0 [phi:util_wait_key->display_action_text#0] -- register_copy - jsr display_action_text - // util_wait_key::bank_get_bram1 - // return BRAM; - // [1689] util_wait_key::bram#0 = BRAM -- vbum1=vbuz2 - lda.z BRAM - sta bram - // util_wait_key::bank_get_brom1 - // return BROM; - // [1690] util_wait_key::bank_get_brom1_return#0 = BROM -- vbum1=vbuz2 - lda.z BROM - sta bank_get_brom1_return - // util_wait_key::bank_set_bram1 - // BRAM = bank - // [1691] BRAM = util_wait_key::bank_set_bram1_bank#0 -- vbuz1=vbuc1 - lda #bank_set_bram1_bank - sta.z BRAM - // util_wait_key::bank_set_brom1 - // BROM = bank - // [1692] BROM = util_wait_key::bank_set_brom1_bank#0 -- vbuz1=vbuc1 - lda #bank_set_brom1_bank - sta.z BROM - // [1693] phi from util_wait_key::@2 util_wait_key::@5 util_wait_key::bank_set_brom1 to util_wait_key::kbhit1 [phi:util_wait_key::@2/util_wait_key::@5/util_wait_key::bank_set_brom1->util_wait_key::kbhit1] - // util_wait_key::kbhit1 - kbhit1: - // util_wait_key::kbhit1_cbm_k_clrchn1 - // asm - // asm { jsrCBM_CLRCHN } - jsr CBM_CLRCHN - // [1695] phi from util_wait_key::kbhit1_cbm_k_clrchn1 to util_wait_key::kbhit1_@2 [phi:util_wait_key::kbhit1_cbm_k_clrchn1->util_wait_key::kbhit1_@2] - // util_wait_key::kbhit1_@2 - // cbm_k_getin() - // [1696] call cbm_k_getin - jsr cbm_k_getin - // [1697] cbm_k_getin::return#2 = cbm_k_getin::return#1 - // util_wait_key::@4 - // [1698] util_wait_key::ch#4 = cbm_k_getin::return#2 -- vwum1=vbuaa - sta ch - lda #0 - sta ch+1 - // util_wait_key::@3 - // if (filter) - // [1699] if((char *)0!=util_wait_key::filter#12) goto util_wait_key::@1 -- pbuc1_neq_pbuz1_then_la1 - // if there is a filter, check the filter, otherwise return ch. - lda.z filter+1 - cmp #>0 - bne __b1 - lda.z filter - cmp #<0 - bne __b1 - // util_wait_key::@2 - // if(ch) - // [1700] if(0!=util_wait_key::ch#4) goto util_wait_key::bank_set_bram2 -- 0_neq_vwum1_then_la1 - lda ch - ora ch+1 - bne bank_set_bram2 - jmp kbhit1 - // util_wait_key::bank_set_bram2 - bank_set_bram2: - // BRAM = bank - // [1701] BRAM = util_wait_key::bram#0 -- vbuz1=vbum2 - lda bram - sta.z BRAM - // util_wait_key::bank_set_brom2 - // BROM = bank - // [1702] BROM = util_wait_key::bank_get_brom1_return#0 -- vbuz1=vbum2 - lda bank_get_brom1_return - sta.z BROM - // util_wait_key::@return - // } - // [1703] return - rts - // util_wait_key::@1 - __b1: - // strchr(filter, ch) - // [1704] strchr::str#0 = (const void *)util_wait_key::filter#12 -- pvoz1=pvoz2 - lda.z filter - sta.z strchr.str - lda.z filter+1 - sta.z strchr.str+1 - // [1705] strchr::c#0 = util_wait_key::ch#4 -- vbuz1=vwum2 - lda ch - sta.z strchr.c - // [1706] call strchr - // [1710] phi from util_wait_key::@1 to strchr [phi:util_wait_key::@1->strchr] - // [1710] phi strchr::c#4 = strchr::c#0 [phi:util_wait_key::@1->strchr#0] -- register_copy - // [1710] phi strchr::str#2 = strchr::str#0 [phi:util_wait_key::@1->strchr#1] -- register_copy - jsr strchr - // strchr(filter, ch) - // [1707] strchr::return#3 = strchr::return#2 - // util_wait_key::@5 - // [1708] util_wait_key::$9 = strchr::return#3 - // if(strchr(filter, ch) != NULL) - // [1709] if(util_wait_key::$9!=0) goto util_wait_key::bank_set_bram2 -- pvoz1_neq_0_then_la1 - lda.z util_wait_key__9 - ora.z util_wait_key__9+1 - bne bank_set_bram2 - jmp kbhit1 - .segment Data - bram: .byte 0 - bank_get_brom1_return: .byte 0 - ch: .word 0 + .label smc_package_committed = main.check_status_cx16_rom3_check_status_rom1_main__0 } .segment Code // strchr @@ -11281,82 +12080,57 @@ util_wait_key: { // - str: The memory to search // - c: A character to search for // Return: A pointer to the matching byte or NULL if the character does not occur in the given memory area. -// __zp($c2) void * strchr(__zp($c2) const void *str, __zp($ec) char c) +// __zp($ee) void * strchr(__zp($ee) const void *str, __mem() char c) strchr: { - .label ptr = $c2 - .label return = $c2 - .label str = $c2 - .label c = $ec - // [1711] strchr::ptr#6 = (char *)strchr::str#2 - // [1712] phi from strchr strchr::@3 to strchr::@1 [phi:strchr/strchr::@3->strchr::@1] - // [1712] phi strchr::ptr#2 = strchr::ptr#6 [phi:strchr/strchr::@3->strchr::@1#0] -- register_copy + .label ptr = $ee + .label return = $ee + .label str = $ee + // [1773] strchr::ptr#6 = (char *)strchr::str#2 + // [1774] phi from strchr strchr::@3 to strchr::@1 [phi:strchr/strchr::@3->strchr::@1] + // [1774] phi strchr::ptr#2 = strchr::ptr#6 [phi:strchr/strchr::@3->strchr::@1#0] -- register_copy // strchr::@1 __b1: // while(*ptr) - // [1713] if(0!=*strchr::ptr#2) goto strchr::@2 -- 0_neq__deref_pbuz1_then_la1 + // [1775] if(0!=*strchr::ptr#2) goto strchr::@2 -- 0_neq__deref_pbuz1_then_la1 ldy #0 lda (ptr),y cmp #0 bne __b2 - // [1714] phi from strchr::@1 to strchr::@return [phi:strchr::@1->strchr::@return] - // [1714] phi strchr::return#2 = (void *) 0 [phi:strchr::@1->strchr::@return#0] -- pvoz1=pvoc1 + // [1776] phi from strchr::@1 to strchr::@return [phi:strchr::@1->strchr::@return] + // [1776] phi strchr::return#2 = (void *) 0 [phi:strchr::@1->strchr::@return#0] -- pvoz1=pvoc1 tya sta.z return sta.z return+1 // strchr::@return // } - // [1715] return + // [1777] return rts // strchr::@2 __b2: // if(*ptr==c) - // [1716] if(*strchr::ptr#2!=strchr::c#4) goto strchr::@3 -- _deref_pbuz1_neq_vbuz2_then_la1 + // [1778] if(*strchr::ptr#2!=strchr::c#4) goto strchr::@3 -- _deref_pbuz1_neq_vbum2_then_la1 ldy #0 lda (ptr),y - cmp.z c + cmp c bne __b3 // strchr::@4 - // [1717] strchr::return#8 = (void *)strchr::ptr#2 - // [1714] phi from strchr::@4 to strchr::@return [phi:strchr::@4->strchr::@return] - // [1714] phi strchr::return#2 = strchr::return#8 [phi:strchr::@4->strchr::@return#0] -- register_copy + // [1779] strchr::return#8 = (void *)strchr::ptr#2 + // [1776] phi from strchr::@4 to strchr::@return [phi:strchr::@4->strchr::@return] + // [1776] phi strchr::return#2 = strchr::return#8 [phi:strchr::@4->strchr::@return#0] -- register_copy rts // strchr::@3 __b3: - // ptr++; - // [1718] strchr::ptr#1 = ++ strchr::ptr#2 -- pbuz1=_inc_pbuz1 - inc.z ptr - bne !+ - inc.z ptr+1 - !: - jmp __b1 -} - // display_info_cx16_rom -/** - * @brief Display the ROM status of the main CX16 ROM chip. - * - * @param info_status The status. - * @param info_text The status text. - */ -// void display_info_cx16_rom(__register(X) char info_status, __zp($3e) char *info_text) -display_info_cx16_rom: { - .label info_text = $3e - // display_info_rom(0, info_status, info_text) - // [1720] display_info_rom::info_status#0 = display_info_cx16_rom::info_status#2 -- vbum1=vbuxx - stx display_info_rom.info_status - // [1721] display_info_rom::info_text#0 = display_info_cx16_rom::info_text#2 - // [1722] call display_info_rom - // [1199] phi from display_info_cx16_rom to display_info_rom [phi:display_info_cx16_rom->display_info_rom] - // [1199] phi display_info_rom::info_text#16 = display_info_rom::info_text#0 [phi:display_info_cx16_rom->display_info_rom#0] -- register_copy - // [1199] phi display_info_rom::rom_chip#16 = 0 [phi:display_info_cx16_rom->display_info_rom#1] -- vbuz1=vbuc1 - lda #0 - sta.z display_info_rom.rom_chip - // [1199] phi display_info_rom::info_status#16 = display_info_rom::info_status#0 [phi:display_info_cx16_rom->display_info_rom#2] -- register_copy - jsr display_info_rom - // display_info_cx16_rom::@return - // } - // [1723] return - rts + // ptr++; + // [1780] strchr::ptr#1 = ++ strchr::ptr#2 -- pbuz1=_inc_pbuz1 + inc.z ptr + bne !+ + inc.z ptr+1 + !: + jmp __b1 + .segment Data + c: .byte 0 } +.segment Code // rom_get_github_commit_id /** * @brief Copy the github commit_id only if the commit_id contains hexadecimal characters. @@ -11364,47 +12138,51 @@ display_info_cx16_rom: { * @param commit_id The target commit_id. * @param from The source ptr in ROM or RAM. */ -// void rom_get_github_commit_id(__zp($49) char *commit_id, __zp($3e) char *from) +// void rom_get_github_commit_id(__zp($dd) char *commit_id, __zp($d7) char *from) rom_get_github_commit_id: { - .label commit_id = $49 - .label from = $3e - // [1725] phi from rom_get_github_commit_id to rom_get_github_commit_id::@2 [phi:rom_get_github_commit_id->rom_get_github_commit_id::@2] - // [1725] phi rom_get_github_commit_id::commit_id_ok#2 = true [phi:rom_get_github_commit_id->rom_get_github_commit_id::@2#0] -- vboxx=vboc1 + .label ch = $54 + .label commit_id = $dd + .label from = $d7 + // [1782] phi from rom_get_github_commit_id to rom_get_github_commit_id::@2 [phi:rom_get_github_commit_id->rom_get_github_commit_id::@2] + // [1782] phi rom_get_github_commit_id::commit_id_ok#2 = true [phi:rom_get_github_commit_id->rom_get_github_commit_id::@2#0] -- vbom1=vboc1 lda #1 - tax - // [1725] phi rom_get_github_commit_id::c#2 = 0 [phi:rom_get_github_commit_id->rom_get_github_commit_id::@2#1] -- vbuyy=vbuc1 - ldy #0 + sta commit_id_ok + // [1782] phi rom_get_github_commit_id::c#2 = 0 [phi:rom_get_github_commit_id->rom_get_github_commit_id::@2#1] -- vbum1=vbuc1 + lda #0 + sta c // rom_get_github_commit_id::@2 __b2: // for(unsigned char c=0; c<7; c++) - // [1726] if(rom_get_github_commit_id::c#2<7) goto rom_get_github_commit_id::@3 -- vbuyy_lt_vbuc1_then_la1 - cpy #7 + // [1783] if(rom_get_github_commit_id::c#2<7) goto rom_get_github_commit_id::@3 -- vbum1_lt_vbuc1_then_la1 + lda c + cmp #7 bcc __b3 // rom_get_github_commit_id::@4 // if(commit_id_ok) - // [1727] if(rom_get_github_commit_id::commit_id_ok#2) goto rom_get_github_commit_id::@1 -- vboxx_then_la1 - cpx #0 + // [1784] if(rom_get_github_commit_id::commit_id_ok#2) goto rom_get_github_commit_id::@1 -- vbom1_then_la1 + lda commit_id_ok + cmp #0 bne __b1 // rom_get_github_commit_id::@6 // *commit_id = '\0' - // [1728] *rom_get_github_commit_id::commit_id#6 = '@' -- _deref_pbuz1=vbuc1 + // [1785] *rom_get_github_commit_id::commit_id#6 = '@' -- _deref_pbuz1=vbuc1 lda #'@' ldy #0 sta (commit_id),y // rom_get_github_commit_id::@return // } - // [1729] return + // [1786] return rts // rom_get_github_commit_id::@1 __b1: // strncpy(commit_id, from, 7) - // [1730] strncpy::dst#2 = rom_get_github_commit_id::commit_id#6 - // [1731] strncpy::src#2 = rom_get_github_commit_id::from#6 - // [1732] call strncpy - // [2455] phi from rom_get_github_commit_id::@1 to strncpy [phi:rom_get_github_commit_id::@1->strncpy] - // [2455] phi strncpy::dst#8 = strncpy::dst#2 [phi:rom_get_github_commit_id::@1->strncpy#0] -- register_copy - // [2455] phi strncpy::src#6 = strncpy::src#2 [phi:rom_get_github_commit_id::@1->strncpy#1] -- register_copy - // [2455] phi strncpy::n#3 = 7 [phi:rom_get_github_commit_id::@1->strncpy#2] -- vwuz1=vbuc1 + // [1787] strncpy::dst#2 = rom_get_github_commit_id::commit_id#6 + // [1788] strncpy::src#2 = rom_get_github_commit_id::from#6 + // [1789] call strncpy + // [2512] phi from rom_get_github_commit_id::@1 to strncpy [phi:rom_get_github_commit_id::@1->strncpy] + // [2512] phi strncpy::dst#8 = strncpy::dst#2 [phi:rom_get_github_commit_id::@1->strncpy#0] -- register_copy + // [2512] phi strncpy::src#6 = strncpy::src#2 [phi:rom_get_github_commit_id::@1->strncpy#1] -- register_copy + // [2512] phi strncpy::n#3 = 7 [phi:rom_get_github_commit_id::@1->strncpy#2] -- vwuz1=vbuc1 lda #<7 sta.z strncpy.n lda #>7 @@ -11414,93 +12192,102 @@ rom_get_github_commit_id: { // rom_get_github_commit_id::@3 __b3: // unsigned char ch = from[c] - // [1733] rom_get_github_commit_id::ch#0 = rom_get_github_commit_id::from#6[rom_get_github_commit_id::c#2] -- vbuaa=pbuz1_derefidx_vbuyy + // [1790] rom_get_github_commit_id::ch#0 = rom_get_github_commit_id::from#6[rom_get_github_commit_id::c#2] -- vbuz1=pbuz2_derefidx_vbum3 + ldy c lda (from),y + sta.z ch // if(!(ch >= 48 && ch <= 48+9 || ch >= 65 && ch <= 65+26)) - // [1734] if(rom_get_github_commit_id::ch#0<$30) goto rom_get_github_commit_id::@7 -- vbuaa_lt_vbuc1_then_la1 + // [1791] if(rom_get_github_commit_id::ch#0<$30) goto rom_get_github_commit_id::@7 -- vbuz1_lt_vbuc1_then_la1 cmp #$30 bcc __b7 // rom_get_github_commit_id::@8 - // [1735] if(rom_get_github_commit_id::ch#0<$30+9+1) goto rom_get_github_commit_id::@5 -- vbuaa_lt_vbuc1_then_la1 + // [1792] if(rom_get_github_commit_id::ch#0<$30+9+1) goto rom_get_github_commit_id::@5 -- vbuz1_lt_vbuc1_then_la1 cmp #$30+9+1 bcc __b5 // rom_get_github_commit_id::@7 __b7: - // [1736] if(rom_get_github_commit_id::ch#0<$41) goto rom_get_github_commit_id::@5 -- vbuaa_lt_vbuc1_then_la1 + // [1793] if(rom_get_github_commit_id::ch#0<$41) goto rom_get_github_commit_id::@5 -- vbuz1_lt_vbuc1_then_la1 + lda.z ch cmp #$41 bcc __b4 // rom_get_github_commit_id::@9 - // [1737] if(rom_get_github_commit_id::ch#0<$41+$1a+1) goto rom_get_github_commit_id::@10 -- vbuaa_lt_vbuc1_then_la1 + // [1794] if(rom_get_github_commit_id::ch#0<$41+$1a+1) goto rom_get_github_commit_id::@10 -- vbuz1_lt_vbuc1_then_la1 cmp #$41+$1a+1 bcc __b5 - // [1739] phi from rom_get_github_commit_id::@7 rom_get_github_commit_id::@9 to rom_get_github_commit_id::@5 [phi:rom_get_github_commit_id::@7/rom_get_github_commit_id::@9->rom_get_github_commit_id::@5] + // [1796] phi from rom_get_github_commit_id::@7 rom_get_github_commit_id::@9 to rom_get_github_commit_id::@5 [phi:rom_get_github_commit_id::@7/rom_get_github_commit_id::@9->rom_get_github_commit_id::@5] __b4: - // [1739] phi rom_get_github_commit_id::commit_id_ok#4 = false [phi:rom_get_github_commit_id::@7/rom_get_github_commit_id::@9->rom_get_github_commit_id::@5#0] -- vboxx=vboc1 + // [1796] phi rom_get_github_commit_id::commit_id_ok#4 = false [phi:rom_get_github_commit_id::@7/rom_get_github_commit_id::@9->rom_get_github_commit_id::@5#0] -- vbom1=vboc1 lda #0 - tax - // [1738] phi from rom_get_github_commit_id::@9 to rom_get_github_commit_id::@10 [phi:rom_get_github_commit_id::@9->rom_get_github_commit_id::@10] + sta commit_id_ok + // [1795] phi from rom_get_github_commit_id::@9 to rom_get_github_commit_id::@10 [phi:rom_get_github_commit_id::@9->rom_get_github_commit_id::@10] // rom_get_github_commit_id::@10 - // [1739] phi from rom_get_github_commit_id::@10 rom_get_github_commit_id::@8 to rom_get_github_commit_id::@5 [phi:rom_get_github_commit_id::@10/rom_get_github_commit_id::@8->rom_get_github_commit_id::@5] - // [1739] phi rom_get_github_commit_id::commit_id_ok#4 = rom_get_github_commit_id::commit_id_ok#2 [phi:rom_get_github_commit_id::@10/rom_get_github_commit_id::@8->rom_get_github_commit_id::@5#0] -- register_copy + // [1796] phi from rom_get_github_commit_id::@10 rom_get_github_commit_id::@8 to rom_get_github_commit_id::@5 [phi:rom_get_github_commit_id::@10/rom_get_github_commit_id::@8->rom_get_github_commit_id::@5] + // [1796] phi rom_get_github_commit_id::commit_id_ok#4 = rom_get_github_commit_id::commit_id_ok#2 [phi:rom_get_github_commit_id::@10/rom_get_github_commit_id::@8->rom_get_github_commit_id::@5#0] -- register_copy // rom_get_github_commit_id::@5 __b5: // for(unsigned char c=0; c<7; c++) - // [1740] rom_get_github_commit_id::c#1 = ++ rom_get_github_commit_id::c#2 -- vbuyy=_inc_vbuyy - iny - // [1725] phi from rom_get_github_commit_id::@5 to rom_get_github_commit_id::@2 [phi:rom_get_github_commit_id::@5->rom_get_github_commit_id::@2] - // [1725] phi rom_get_github_commit_id::commit_id_ok#2 = rom_get_github_commit_id::commit_id_ok#4 [phi:rom_get_github_commit_id::@5->rom_get_github_commit_id::@2#0] -- register_copy - // [1725] phi rom_get_github_commit_id::c#2 = rom_get_github_commit_id::c#1 [phi:rom_get_github_commit_id::@5->rom_get_github_commit_id::@2#1] -- register_copy + // [1797] rom_get_github_commit_id::c#1 = ++ rom_get_github_commit_id::c#2 -- vbum1=_inc_vbum1 + inc c + // [1782] phi from rom_get_github_commit_id::@5 to rom_get_github_commit_id::@2 [phi:rom_get_github_commit_id::@5->rom_get_github_commit_id::@2] + // [1782] phi rom_get_github_commit_id::commit_id_ok#2 = rom_get_github_commit_id::commit_id_ok#4 [phi:rom_get_github_commit_id::@5->rom_get_github_commit_id::@2#0] -- register_copy + // [1782] phi rom_get_github_commit_id::c#2 = rom_get_github_commit_id::c#1 [phi:rom_get_github_commit_id::@5->rom_get_github_commit_id::@2#1] -- register_copy jmp __b2 + .segment Data + .label c = main.check_status_smc5_main__0 + .label commit_id_ok = main.check_status_vera1_main__0 } +.segment Code // rom_get_version_text -// void rom_get_version_text(__zp($30) char *release_info, __register(X) char prefix, __mem() char release, __zp($b9) char *github) +// void rom_get_version_text(__zp($74) char *release_info, __mem() char prefix, __mem() char release, __zp($db) char *github) rom_get_version_text: { - .label release_info = $30 - .label github = $b9 + .label release_info = $74 + .label github = $db // sprintf(release_info, "%c%u %s", prefix, release, github) - // [1742] snprintf_init::s#8 = rom_get_version_text::release_info#2 - // [1743] call snprintf_init - // [982] phi from rom_get_version_text to snprintf_init [phi:rom_get_version_text->snprintf_init] - // [982] phi snprintf_init::s#27 = snprintf_init::s#8 [phi:rom_get_version_text->snprintf_init#0] -- register_copy + // [1799] snprintf_init::s#8 = rom_get_version_text::release_info#2 + // [1800] call snprintf_init + // [1014] phi from rom_get_version_text to snprintf_init [phi:rom_get_version_text->snprintf_init] + // [1014] phi snprintf_init::s#27 = snprintf_init::s#8 [phi:rom_get_version_text->snprintf_init#0] -- register_copy jsr snprintf_init // rom_get_version_text::@1 // sprintf(release_info, "%c%u %s", prefix, release, github) - // [1744] stackpush(char) = rom_get_version_text::prefix#2 -- _stackpushbyte_=vbuxx - txa + // [1801] stackpush(char) = rom_get_version_text::prefix#2 -- _stackpushbyte_=vbum1 + lda prefix pha - // [1745] callexecute snputc -- call_vprc1 + // [1802] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla - // [1747] printf_uchar::uvalue#7 = rom_get_version_text::release#2 -- vbuxx=vbum1 - ldx release - // [1748] call printf_uchar - // [1165] phi from rom_get_version_text::@1 to printf_uchar [phi:rom_get_version_text::@1->printf_uchar] - // [1165] phi printf_uchar::format_zero_padding#14 = 0 [phi:rom_get_version_text::@1->printf_uchar#0] -- vbuz1=vbuc1 + // [1804] printf_uchar::uvalue#7 = rom_get_version_text::release#2 -- vbuz1=vbum2 + lda release + sta.z printf_uchar.uvalue + // [1805] call printf_uchar + // [1251] phi from rom_get_version_text::@1 to printf_uchar [phi:rom_get_version_text::@1->printf_uchar] + // [1251] phi printf_uchar::format_zero_padding#14 = 0 [phi:rom_get_version_text::@1->printf_uchar#0] -- vbuz1=vbuc1 lda #0 sta.z printf_uchar.format_zero_padding - // [1165] phi printf_uchar::format_min_length#14 = 0 [phi:rom_get_version_text::@1->printf_uchar#1] -- vbuz1=vbuc1 + // [1251] phi printf_uchar::format_min_length#14 = 0 [phi:rom_get_version_text::@1->printf_uchar#1] -- vbuz1=vbuc1 sta.z printf_uchar.format_min_length - // [1165] phi printf_uchar::putc#14 = &snputc [phi:rom_get_version_text::@1->printf_uchar#2] -- pprz1=pprc1 + // [1251] phi printf_uchar::putc#14 = &snputc [phi:rom_get_version_text::@1->printf_uchar#2] -- pprz1=pprc1 lda #snputc sta.z printf_uchar.putc+1 - // [1165] phi printf_uchar::format_radix#14 = DECIMAL [phi:rom_get_version_text::@1->printf_uchar#3] -- vbuyy=vbuc1 - ldy #DECIMAL - // [1165] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#7 [phi:rom_get_version_text::@1->printf_uchar#4] -- register_copy + // [1251] phi printf_uchar::format_radix#14 = DECIMAL [phi:rom_get_version_text::@1->printf_uchar#3] -- vbuz1=vbuc1 + lda #DECIMAL + sta.z printf_uchar.format_radix + // [1251] phi printf_uchar::uvalue#14 = printf_uchar::uvalue#7 [phi:rom_get_version_text::@1->printf_uchar#4] -- register_copy jsr printf_uchar - // [1749] phi from rom_get_version_text::@1 to rom_get_version_text::@2 [phi:rom_get_version_text::@1->rom_get_version_text::@2] + // [1806] phi from rom_get_version_text::@1 to rom_get_version_text::@2 [phi:rom_get_version_text::@1->rom_get_version_text::@2] // rom_get_version_text::@2 // sprintf(release_info, "%c%u %s", prefix, release, github) - // [1750] call printf_str - // [987] phi from rom_get_version_text::@2 to printf_str [phi:rom_get_version_text::@2->printf_str] - // [987] phi printf_str::putc#73 = &snputc [phi:rom_get_version_text::@2->printf_str#0] -- pprz1=pprc1 + // [1807] call printf_str + // [1019] phi from rom_get_version_text::@2 to printf_str [phi:rom_get_version_text::@2->printf_str] + // [1019] phi printf_str::putc#73 = &snputc [phi:rom_get_version_text::@2->printf_str#0] -- pprz1=pprc1 lda #snputc sta.z printf_str.putc+1 - // [987] phi printf_str::s#73 = s [phi:rom_get_version_text::@2->printf_str#1] -- pbuz1=pbuc1 + // [1019] phi printf_str::s#73 = s [phi:rom_get_version_text::@2->printf_str#1] -- pbuz1=pbuc1 lda #s @@ -11508,40 +12295,41 @@ rom_get_version_text: { jsr printf_str // rom_get_version_text::@3 // sprintf(release_info, "%c%u %s", prefix, release, github) - // [1751] printf_string::str#12 = rom_get_version_text::github#2 -- pbuz1=pbuz2 + // [1808] printf_string::str#12 = rom_get_version_text::github#2 -- pbuz1=pbuz2 lda.z github sta.z printf_string.str lda.z github+1 sta.z printf_string.str+1 - // [1752] call printf_string - // [1130] phi from rom_get_version_text::@3 to printf_string [phi:rom_get_version_text::@3->printf_string] - // [1130] phi printf_string::putc#22 = &snputc [phi:rom_get_version_text::@3->printf_string#0] -- pprz1=pprc1 + // [1809] call printf_string + // [1180] phi from rom_get_version_text::@3 to printf_string [phi:rom_get_version_text::@3->printf_string] + // [1180] phi printf_string::putc#22 = &snputc [phi:rom_get_version_text::@3->printf_string#0] -- pprz1=pprc1 lda #snputc sta.z printf_string.putc+1 - // [1130] phi printf_string::str#22 = printf_string::str#12 [phi:rom_get_version_text::@3->printf_string#1] -- register_copy - // [1130] phi printf_string::format_justify_left#22 = 0 [phi:rom_get_version_text::@3->printf_string#2] -- vbuz1=vbuc1 + // [1180] phi printf_string::str#22 = printf_string::str#12 [phi:rom_get_version_text::@3->printf_string#1] -- register_copy + // [1180] phi printf_string::format_justify_left#22 = 0 [phi:rom_get_version_text::@3->printf_string#2] -- vbuz1=vbuc1 lda #0 sta.z printf_string.format_justify_left - // [1130] phi printf_string::format_min_length#22 = 0 [phi:rom_get_version_text::@3->printf_string#3] -- vbuz1=vbuc1 + // [1180] phi printf_string::format_min_length#22 = 0 [phi:rom_get_version_text::@3->printf_string#3] -- vbuz1=vbuc1 sta.z printf_string.format_min_length jsr printf_string // rom_get_version_text::@4 // sprintf(release_info, "%c%u %s", prefix, release, github) - // [1753] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 + // [1810] stackpush(char) = 0 -- _stackpushbyte_=vbuc1 lda #0 pha - // [1754] callexecute snputc -- call_vprc1 + // [1811] callexecute snputc -- call_vprc1 jsr snputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // rom_get_version_text::@return // } - // [1756] return + // [1813] return rts .segment Data - release: .byte 0 + .label prefix = rom_get_prefix.return + .label release = rom_get_release.return } .segment Code // display_info_led @@ -11553,223 +12341,241 @@ rom_get_version_text: { * @param tc Fore color * @param bc Back color */ -// void display_info_led(__register(Y) char x, __zp($c7) char y, __register(X) char tc, char bc) +// void display_info_led(__zp($c6) char x, __zp($d0) char y, __zp($c0) char tc, char bc) display_info_led: { - .label y = $c7 + .label tc = $c0 + .label y = $d0 + .label x = $c6 // textcolor(tc) - // [1758] textcolor::color#13 = display_info_led::tc#4 - // [1759] call textcolor - // [700] phi from display_info_led to textcolor [phi:display_info_led->textcolor] - // [700] phi textcolor::color#18 = textcolor::color#13 [phi:display_info_led->textcolor#0] -- register_copy + // [1815] textcolor::color#13 = display_info_led::tc#4 -- vbuz1=vbuz2 + lda.z tc + sta.z textcolor.color + // [1816] call textcolor + // [745] phi from display_info_led to textcolor [phi:display_info_led->textcolor] + // [745] phi textcolor::color#18 = textcolor::color#13 [phi:display_info_led->textcolor#0] -- register_copy jsr textcolor - // [1760] phi from display_info_led to display_info_led::@1 [phi:display_info_led->display_info_led::@1] + // [1817] phi from display_info_led to display_info_led::@1 [phi:display_info_led->display_info_led::@1] // display_info_led::@1 // bgcolor(bc) - // [1761] call bgcolor - // [705] phi from display_info_led::@1 to bgcolor [phi:display_info_led::@1->bgcolor] - // [705] phi bgcolor::color#14 = BLUE [phi:display_info_led::@1->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [1818] call bgcolor + // [750] phi from display_info_led::@1 to bgcolor [phi:display_info_led::@1->bgcolor] + // [750] phi bgcolor::color#14 = BLUE [phi:display_info_led::@1->bgcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z bgcolor.color jsr bgcolor // display_info_led::@2 // cputcxy(x, y, VERA_CHR_UR) - // [1762] cputcxy::x#11 = display_info_led::x#4 -- vbuxx=vbuyy - tya - tax - // [1763] cputcxy::y#11 = display_info_led::y#4 -- vbuyy=vbuz1 - ldy.z y - // [1764] call cputcxy - // [1986] phi from display_info_led::@2 to cputcxy [phi:display_info_led::@2->cputcxy] - // [1986] phi cputcxy::c#15 = $7c [phi:display_info_led::@2->cputcxy#0] -- vbuz1=vbuc1 + // [1819] cputcxy::x#11 = display_info_led::x#4 + // [1820] cputcxy::y#11 = display_info_led::y#4 + // [1821] call cputcxy + // [2043] phi from display_info_led::@2 to cputcxy [phi:display_info_led::@2->cputcxy] + // [2043] phi cputcxy::c#15 = $7c [phi:display_info_led::@2->cputcxy#0] -- vbuz1=vbuc1 lda #$7c sta.z cputcxy.c - // [1986] phi cputcxy::y#15 = cputcxy::y#11 [phi:display_info_led::@2->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#11 [phi:display_info_led::@2->cputcxy#2] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#11 [phi:display_info_led::@2->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#11 [phi:display_info_led::@2->cputcxy#2] -- register_copy jsr cputcxy - // [1765] phi from display_info_led::@2 to display_info_led::@3 [phi:display_info_led::@2->display_info_led::@3] + // [1822] phi from display_info_led::@2 to display_info_led::@3 [phi:display_info_led::@2->display_info_led::@3] // display_info_led::@3 // textcolor(WHITE) - // [1766] call textcolor - // [700] phi from display_info_led::@3 to textcolor [phi:display_info_led::@3->textcolor] - // [700] phi textcolor::color#18 = WHITE [phi:display_info_led::@3->textcolor#0] -- vbuxx=vbuc1 - ldx #WHITE + // [1823] call textcolor + // [745] phi from display_info_led::@3 to textcolor [phi:display_info_led::@3->textcolor] + // [745] phi textcolor::color#18 = WHITE [phi:display_info_led::@3->textcolor#0] -- vbuz1=vbuc1 + lda #WHITE + sta.z textcolor.color jsr textcolor // display_info_led::@return // } - // [1767] return + // [1824] return rts } // screenlayer // --- layer management in VERA --- -// void screenlayer(char layer, __register(X) char mapbase, __zp($bd) char config) +// void screenlayer(char layer, __zp($e5) char mapbase, __zp($e1) char config) screenlayer: { - .label config = $bd + .label screenlayer__1 = $e5 + .label screenlayer__5 = $e1 + .label screenlayer__6 = $e1 + .label mapbase = $e5 + .label config = $e1 + .label y = $e0 // __mem char vera_dc_hscale_temp = *VERA_DC_HSCALE - // [1768] screenlayer::vera_dc_hscale_temp#0 = *VERA_DC_HSCALE -- vbum1=_deref_pbuc1 + // [1825] screenlayer::vera_dc_hscale_temp#0 = *VERA_DC_HSCALE -- vbum1=_deref_pbuc1 lda VERA_DC_HSCALE sta vera_dc_hscale_temp // __mem char vera_dc_vscale_temp = *VERA_DC_VSCALE - // [1769] screenlayer::vera_dc_vscale_temp#0 = *VERA_DC_VSCALE -- vbum1=_deref_pbuc1 + // [1826] screenlayer::vera_dc_vscale_temp#0 = *VERA_DC_VSCALE -- vbum1=_deref_pbuc1 lda VERA_DC_VSCALE sta vera_dc_vscale_temp // __conio.layer = 0 - // [1770] *((char *)&__conio+2) = 0 -- _deref_pbuc1=vbuc2 + // [1827] *((char *)&__conio+2) = 0 -- _deref_pbuc1=vbuc2 lda #0 sta __conio+2 // mapbase >> 7 - // [1771] screenlayer::$0 = screenlayer::mapbase#0 >> 7 -- vbuaa=vbuxx_ror_7 - txa + // [1828] screenlayer::$0 = screenlayer::mapbase#0 >> 7 -- vbum1=vbuz2_ror_7 + lda.z mapbase rol rol and #1 + sta screenlayer__0 // __conio.mapbase_bank = mapbase >> 7 - // [1772] *((char *)&__conio+5) = screenlayer::$0 -- _deref_pbuc1=vbuaa + // [1829] *((char *)&__conio+5) = screenlayer::$0 -- _deref_pbuc1=vbum1 sta __conio+5 // (mapbase)<<1 - // [1773] screenlayer::$1 = screenlayer::mapbase#0 << 1 -- vbuaa=vbuxx_rol_1 - txa - asl + // [1830] screenlayer::$1 = screenlayer::mapbase#0 << 1 -- vbuz1=vbuz1_rol_1 + asl.z screenlayer__1 // MAKEWORD((mapbase)<<1,0) - // [1774] screenlayer::$2 = screenlayer::$1 w= 0 -- vwum1=vbuaa_word_vbuc1 - ldy #0 - sta screenlayer__2+1 - sty screenlayer__2 + // [1831] screenlayer::$2 = screenlayer::$1 w= 0 -- vwum1=vbuz2_word_vbuc1 + lda #0 + ldy.z screenlayer__1 + sty screenlayer__2+1 + sta screenlayer__2 // __conio.mapbase_offset = MAKEWORD((mapbase)<<1,0) - // [1775] *((unsigned int *)&__conio+3) = screenlayer::$2 -- _deref_pwuc1=vwum1 - tya + // [1832] *((unsigned int *)&__conio+3) = screenlayer::$2 -- _deref_pwuc1=vwum1 sta __conio+3 - lda screenlayer__2+1 + tya sta __conio+3+1 // config & VERA_LAYER_WIDTH_MASK - // [1776] screenlayer::$7 = screenlayer::config#0 & VERA_LAYER_WIDTH_MASK -- vbuaa=vbuz1_band_vbuc1 + // [1833] screenlayer::$7 = screenlayer::config#0 & VERA_LAYER_WIDTH_MASK -- vbum1=vbuz2_band_vbuc1 lda #VERA_LAYER_WIDTH_MASK and.z config + sta screenlayer__7 // (config & VERA_LAYER_WIDTH_MASK) >> 4 - // [1777] screenlayer::$8 = screenlayer::$7 >> 4 -- vbuxx=vbuaa_ror_4 + // [1834] screenlayer::$8 = screenlayer::$7 >> 4 -- vbum1=vbum1_ror_4 + lda screenlayer__8 lsr lsr lsr lsr - tax + sta screenlayer__8 // __conio.mapwidth = VERA_LAYER_DIM[ (config & VERA_LAYER_WIDTH_MASK) >> 4] - // [1778] *((char *)&__conio+8) = screenlayer::VERA_LAYER_DIM[screenlayer::$8] -- _deref_pbuc1=pbuc2_derefidx_vbuxx - lda VERA_LAYER_DIM,x + // [1835] *((char *)&__conio+8) = screenlayer::VERA_LAYER_DIM[screenlayer::$8] -- _deref_pbuc1=pbuc2_derefidx_vbum1 + tay + lda VERA_LAYER_DIM,y sta __conio+8 // config & VERA_LAYER_HEIGHT_MASK - // [1779] screenlayer::$5 = screenlayer::config#0 & VERA_LAYER_HEIGHT_MASK -- vbuaa=vbuz1_band_vbuc1 + // [1836] screenlayer::$5 = screenlayer::config#0 & VERA_LAYER_HEIGHT_MASK -- vbuz1=vbuz1_band_vbuc1 lda #VERA_LAYER_HEIGHT_MASK - and.z config + and.z screenlayer__5 + sta.z screenlayer__5 // (config & VERA_LAYER_HEIGHT_MASK) >> 6 - // [1780] screenlayer::$6 = screenlayer::$5 >> 6 -- vbuaa=vbuaa_ror_6 + // [1837] screenlayer::$6 = screenlayer::$5 >> 6 -- vbuz1=vbuz1_ror_6 + lda.z screenlayer__6 rol rol rol and #3 + sta.z screenlayer__6 // __conio.mapheight = VERA_LAYER_DIM[ (config & VERA_LAYER_HEIGHT_MASK) >> 6] - // [1781] *((char *)&__conio+9) = screenlayer::VERA_LAYER_DIM[screenlayer::$6] -- _deref_pbuc1=pbuc2_derefidx_vbuaa + // [1838] *((char *)&__conio+9) = screenlayer::VERA_LAYER_DIM[screenlayer::$6] -- _deref_pbuc1=pbuc2_derefidx_vbuz1 tay lda VERA_LAYER_DIM,y sta __conio+9 // __conio.rowskip = VERA_LAYER_SKIP[(config & VERA_LAYER_WIDTH_MASK)>>4] - // [1782] screenlayer::$16 = screenlayer::$8 << 1 -- vbuaa=vbuxx_rol_1 - txa - asl - // [1783] *((unsigned int *)&__conio+$a) = screenlayer::VERA_LAYER_SKIP[screenlayer::$16] -- _deref_pwuc1=pwuc2_derefidx_vbuaa + // [1839] screenlayer::$16 = screenlayer::$8 << 1 -- vbum1=vbum1_rol_1 + asl screenlayer__16 + // [1840] *((unsigned int *)&__conio+$a) = screenlayer::VERA_LAYER_SKIP[screenlayer::$16] -- _deref_pwuc1=pwuc2_derefidx_vbum1 // __conio.rowshift = ((config & VERA_LAYER_WIDTH_MASK)>>4)+6; - tay + ldy screenlayer__16 lda VERA_LAYER_SKIP,y sta __conio+$a lda VERA_LAYER_SKIP+1,y sta __conio+$a+1 // vera_dc_hscale_temp == 0x80 - // [1784] screenlayer::$9 = screenlayer::vera_dc_hscale_temp#0 == $80 -- vboaa=vbum1_eq_vbuc1 + // [1841] screenlayer::$9 = screenlayer::vera_dc_hscale_temp#0 == $80 -- vbom1=vbum2_eq_vbuc1 lda vera_dc_hscale_temp eor #$80 beq !+ lda #1 !: eor #1 + sta screenlayer__9 // 40 << (char)(vera_dc_hscale_temp == 0x80) - // [1785] screenlayer::$18 = (char)screenlayer::$9 -- vbuxx=vbuaa - tax - // [1786] screenlayer::$10 = $28 << screenlayer::$18 -- vbuaa=vbuc1_rol_vbuxx + // [1842] screenlayer::$18 = (char)screenlayer::$9 + // [1843] screenlayer::$10 = $28 << screenlayer::$18 -- vbum1=vbuc1_rol_vbum1 lda #$28 - cpx #0 + ldy screenlayer__10 + cpy #0 beq !e+ !: asl - dex + dey bne !- !e: + sta screenlayer__10 // (40 << (char)(vera_dc_hscale_temp == 0x80))-1 - // [1787] screenlayer::$11 = screenlayer::$10 - 1 -- vbuaa=vbuaa_minus_1 - sec - sbc #1 + // [1844] screenlayer::$11 = screenlayer::$10 - 1 -- vbum1=vbum1_minus_1 + dec screenlayer__11 // __conio.width = (40 << (char)(vera_dc_hscale_temp == 0x80))-1 - // [1788] *((char *)&__conio+6) = screenlayer::$11 -- _deref_pbuc1=vbuaa + // [1845] *((char *)&__conio+6) = screenlayer::$11 -- _deref_pbuc1=vbum1 + lda screenlayer__11 sta __conio+6 // vera_dc_vscale_temp == 0x80 - // [1789] screenlayer::$12 = screenlayer::vera_dc_vscale_temp#0 == $80 -- vboaa=vbum1_eq_vbuc1 + // [1846] screenlayer::$12 = screenlayer::vera_dc_vscale_temp#0 == $80 -- vbom1=vbum2_eq_vbuc1 lda vera_dc_vscale_temp eor #$80 beq !+ lda #1 !: eor #1 + sta screenlayer__12 // 30 << (char)(vera_dc_vscale_temp == 0x80) - // [1790] screenlayer::$19 = (char)screenlayer::$12 -- vbuxx=vbuaa - tax - // [1791] screenlayer::$13 = $1e << screenlayer::$19 -- vbuaa=vbuc1_rol_vbuxx + // [1847] screenlayer::$19 = (char)screenlayer::$12 + // [1848] screenlayer::$13 = $1e << screenlayer::$19 -- vbum1=vbuc1_rol_vbum1 lda #$1e - cpx #0 + ldy screenlayer__13 + cpy #0 beq !e+ !: asl - dex + dey bne !- !e: + sta screenlayer__13 // (30 << (char)(vera_dc_vscale_temp == 0x80))-1 - // [1792] screenlayer::$14 = screenlayer::$13 - 1 -- vbuaa=vbuaa_minus_1 - sec - sbc #1 + // [1849] screenlayer::$14 = screenlayer::$13 - 1 -- vbum1=vbum1_minus_1 + dec screenlayer__14 // __conio.height = (30 << (char)(vera_dc_vscale_temp == 0x80))-1 - // [1793] *((char *)&__conio+7) = screenlayer::$14 -- _deref_pbuc1=vbuaa + // [1850] *((char *)&__conio+7) = screenlayer::$14 -- _deref_pbuc1=vbum1 + lda screenlayer__14 sta __conio+7 // unsigned int mapbase_offset = __conio.mapbase_offset - // [1794] screenlayer::mapbase_offset#0 = *((unsigned int *)&__conio+3) -- vwum1=_deref_pwuc1 + // [1851] screenlayer::mapbase_offset#0 = *((unsigned int *)&__conio+3) -- vwum1=_deref_pwuc1 lda __conio+3 sta mapbase_offset lda __conio+3+1 sta mapbase_offset+1 - // [1795] phi from screenlayer to screenlayer::@1 [phi:screenlayer->screenlayer::@1] - // [1795] phi screenlayer::mapbase_offset#2 = screenlayer::mapbase_offset#0 [phi:screenlayer->screenlayer::@1#0] -- register_copy - // [1795] phi screenlayer::y#2 = 0 [phi:screenlayer->screenlayer::@1#1] -- vbuxx=vbuc1 - ldx #0 + // [1852] phi from screenlayer to screenlayer::@1 [phi:screenlayer->screenlayer::@1] + // [1852] phi screenlayer::mapbase_offset#2 = screenlayer::mapbase_offset#0 [phi:screenlayer->screenlayer::@1#0] -- register_copy + // [1852] phi screenlayer::y#2 = 0 [phi:screenlayer->screenlayer::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z y // screenlayer::@1 __b1: // for(register char y=0; y<=__conio.height; y++) - // [1796] if(screenlayer::y#2<=*((char *)&__conio+7)) goto screenlayer::@2 -- vbuxx_le__deref_pbuc1_then_la1 + // [1853] if(screenlayer::y#2<=*((char *)&__conio+7)) goto screenlayer::@2 -- vbuz1_le__deref_pbuc1_then_la1 lda __conio+7 - stx.z $ff - cmp.z $ff + cmp.z y bcs __b2 // screenlayer::@return // } - // [1797] return + // [1854] return rts // screenlayer::@2 __b2: // __conio.offsets[y] = mapbase_offset - // [1798] screenlayer::$17 = screenlayer::y#2 << 1 -- vbuaa=vbuxx_rol_1 - txa + // [1855] screenlayer::$17 = screenlayer::y#2 << 1 -- vbum1=vbuz2_rol_1 + lda.z y asl - // [1799] ((unsigned int *)&__conio+$15)[screenlayer::$17] = screenlayer::mapbase_offset#2 -- pwuc1_derefidx_vbuaa=vwum1 + sta screenlayer__17 + // [1856] ((unsigned int *)&__conio+$15)[screenlayer::$17] = screenlayer::mapbase_offset#2 -- pwuc1_derefidx_vbum1=vwum2 tay lda mapbase_offset sta __conio+$15,y lda mapbase_offset+1 sta __conio+$15+1,y // mapbase_offset += __conio.rowskip - // [1800] screenlayer::mapbase_offset#1 = screenlayer::mapbase_offset#2 + *((unsigned int *)&__conio+$a) -- vwum1=vwum1_plus__deref_pwuc1 + // [1857] screenlayer::mapbase_offset#1 = screenlayer::mapbase_offset#2 + *((unsigned int *)&__conio+$a) -- vwum1=vwum1_plus__deref_pwuc1 clc lda mapbase_offset adc __conio+$a @@ -11778,16 +12584,29 @@ screenlayer: { adc __conio+$a+1 sta mapbase_offset+1 // for(register char y=0; y<=__conio.height; y++) - // [1801] screenlayer::y#1 = ++ screenlayer::y#2 -- vbuxx=_inc_vbuxx - inx - // [1795] phi from screenlayer::@2 to screenlayer::@1 [phi:screenlayer::@2->screenlayer::@1] - // [1795] phi screenlayer::mapbase_offset#2 = screenlayer::mapbase_offset#1 [phi:screenlayer::@2->screenlayer::@1#0] -- register_copy - // [1795] phi screenlayer::y#2 = screenlayer::y#1 [phi:screenlayer::@2->screenlayer::@1#1] -- register_copy + // [1858] screenlayer::y#1 = ++ screenlayer::y#2 -- vbuz1=_inc_vbuz1 + inc.z y + // [1852] phi from screenlayer::@2 to screenlayer::@1 [phi:screenlayer::@2->screenlayer::@1] + // [1852] phi screenlayer::mapbase_offset#2 = screenlayer::mapbase_offset#1 [phi:screenlayer::@2->screenlayer::@1#0] -- register_copy + // [1852] phi screenlayer::y#2 = screenlayer::y#1 [phi:screenlayer::@2->screenlayer::@1#1] -- register_copy jmp __b1 .segment Data VERA_LAYER_DIM: .byte $1f, $3f, $7f, $ff VERA_LAYER_SKIP: .word $40, $80, $100, $200 - .label screenlayer__2 = cbm_k_plot_get.return + screenlayer__0: .byte 0 + screenlayer__2: .word 0 + screenlayer__7: .byte 0 + .label screenlayer__8 = screenlayer__7 + screenlayer__9: .byte 0 + .label screenlayer__10 = screenlayer__9 + .label screenlayer__11 = screenlayer__9 + screenlayer__12: .byte 0 + .label screenlayer__13 = screenlayer__12 + .label screenlayer__14 = screenlayer__12 + .label screenlayer__16 = screenlayer__7 + screenlayer__17: .byte 0 + .label screenlayer__18 = screenlayer__9 + .label screenlayer__19 = screenlayer__12 vera_dc_hscale_temp: .byte 0 vera_dc_vscale_temp: .byte 0 .label mapbase_offset = cbm_k_plot_get.return @@ -11797,58 +12616,61 @@ screenlayer: { // Scroll the entire screen if the cursor is beyond the last line cscroll: { // if(__conio.cursor_y>__conio.height) - // [1802] if(*((char *)&__conio+1)<=*((char *)&__conio+7)) goto cscroll::@return -- _deref_pbuc1_le__deref_pbuc2_then_la1 + // [1859] if(*((char *)&__conio+1)<=*((char *)&__conio+7)) goto cscroll::@return -- _deref_pbuc1_le__deref_pbuc2_then_la1 lda __conio+7 cmp __conio+1 bcs __breturn // cscroll::@1 // if(__conio.scroll[__conio.layer]) - // [1803] if(0!=((char *)&__conio+$f)[*((char *)&__conio+2)]) goto cscroll::@4 -- 0_neq_pbuc1_derefidx_(_deref_pbuc2)_then_la1 + // [1860] if(0!=((char *)&__conio+$f)[*((char *)&__conio+2)]) goto cscroll::@4 -- 0_neq_pbuc1_derefidx_(_deref_pbuc2)_then_la1 ldy __conio+2 lda __conio+$f,y cmp #0 bne __b4 // cscroll::@2 // if(__conio.cursor_y>__conio.height) - // [1804] if(*((char *)&__conio+1)<=*((char *)&__conio+7)) goto cscroll::@return -- _deref_pbuc1_le__deref_pbuc2_then_la1 + // [1861] if(*((char *)&__conio+1)<=*((char *)&__conio+7)) goto cscroll::@return -- _deref_pbuc1_le__deref_pbuc2_then_la1 lda __conio+7 cmp __conio+1 bcs __breturn - // [1805] phi from cscroll::@2 to cscroll::@3 [phi:cscroll::@2->cscroll::@3] + // [1862] phi from cscroll::@2 to cscroll::@3 [phi:cscroll::@2->cscroll::@3] // cscroll::@3 // gotoxy(0,0) - // [1806] call gotoxy - // [718] phi from cscroll::@3 to gotoxy [phi:cscroll::@3->gotoxy] - // [718] phi gotoxy::y#30 = 0 [phi:cscroll::@3->gotoxy#0] -- vbuyy=vbuc1 - ldy #0 - // [718] phi gotoxy::x#30 = 0 [phi:cscroll::@3->gotoxy#1] -- vbuxx=vbuc1 - ldx #0 + // [1863] call gotoxy + // [763] phi from cscroll::@3 to gotoxy [phi:cscroll::@3->gotoxy] + // [763] phi gotoxy::y#30 = 0 [phi:cscroll::@3->gotoxy#0] -- vbuz1=vbuc1 + lda #0 + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = 0 [phi:cscroll::@3->gotoxy#1] -- vbuz1=vbuc1 + sta.z gotoxy.x jsr gotoxy // cscroll::@return __breturn: // } - // [1807] return + // [1864] return rts - // [1808] phi from cscroll::@1 to cscroll::@4 [phi:cscroll::@1->cscroll::@4] + // [1865] phi from cscroll::@1 to cscroll::@4 [phi:cscroll::@1->cscroll::@4] // cscroll::@4 __b4: // insertup(1) - // [1809] call insertup + // [1866] call insertup jsr insertup // cscroll::@5 // gotoxy( 0, __conio.height) - // [1810] gotoxy::y#3 = *((char *)&__conio+7) -- vbuyy=_deref_pbuc1 - ldy __conio+7 - // [1811] call gotoxy - // [718] phi from cscroll::@5 to gotoxy [phi:cscroll::@5->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#3 [phi:cscroll::@5->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = 0 [phi:cscroll::@5->gotoxy#1] -- vbuxx=vbuc1 - ldx #0 + // [1867] gotoxy::y#3 = *((char *)&__conio+7) -- vbuz1=_deref_pbuc1 + lda __conio+7 + sta.z gotoxy.y + // [1868] call gotoxy + // [763] phi from cscroll::@5 to gotoxy [phi:cscroll::@5->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#3 [phi:cscroll::@5->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = 0 [phi:cscroll::@5->gotoxy#1] -- vbuz1=vbuc1 + lda #0 + sta.z gotoxy.x jsr gotoxy - // [1812] phi from cscroll::@5 to cscroll::@6 [phi:cscroll::@5->cscroll::@6] + // [1869] phi from cscroll::@5 to cscroll::@6 [phi:cscroll::@5->cscroll::@6] // cscroll::@6 // clearline() - // [1813] call clearline + // [1870] call clearline jsr clearline rts } @@ -11860,83 +12682,91 @@ cscroll: { scroll: { .const onoff = 0 // __conio.scroll[__conio.layer] = onoff - // [1814] ((char *)&__conio+$f)[*((char *)&__conio+2)] = scroll::onoff#0 -- pbuc1_derefidx_(_deref_pbuc2)=vbuc3 + // [1871] ((char *)&__conio+$f)[*((char *)&__conio+2)] = scroll::onoff#0 -- pbuc1_derefidx_(_deref_pbuc2)=vbuc3 lda #onoff ldy __conio+2 sta __conio+$f,y // scroll::@return // } - // [1815] return + // [1872] return rts } // clrscr // clears the screen and moves the cursor to the upper left-hand corner of the screen. clrscr: { + .label clrscr__0 = $f7 + .label clrscr__1 = $d4 + .label clrscr__2 = $38 // unsigned int line_text = __conio.mapbase_offset - // [1816] clrscr::line_text#0 = *((unsigned int *)&__conio+3) -- vwum1=_deref_pwuc1 + // [1873] clrscr::line_text#0 = *((unsigned int *)&__conio+3) -- vwum1=_deref_pwuc1 lda __conio+3 sta line_text lda __conio+3+1 sta line_text+1 // *VERA_CTRL &= ~VERA_ADDRSEL - // [1817] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [1874] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 lda #VERA_ADDRSEL^$ff and VERA_CTRL sta VERA_CTRL // __conio.mapbase_bank | VERA_INC_1 - // [1818] clrscr::$0 = *((char *)&__conio+5) | VERA_INC_1 -- vbuaa=_deref_pbuc1_bor_vbuc2 + // [1875] clrscr::$0 = *((char *)&__conio+5) | VERA_INC_1 -- vbuz1=_deref_pbuc1_bor_vbuc2 lda #VERA_INC_1 ora __conio+5 + sta.z clrscr__0 // *VERA_ADDRX_H = __conio.mapbase_bank | VERA_INC_1 - // [1819] *VERA_ADDRX_H = clrscr::$0 -- _deref_pbuc1=vbuaa + // [1876] *VERA_ADDRX_H = clrscr::$0 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_H // unsigned char l = __conio.mapheight - // [1820] clrscr::l#0 = *((char *)&__conio+9) -- vbuxx=_deref_pbuc1 - ldx __conio+9 - // [1821] phi from clrscr clrscr::@3 to clrscr::@1 [phi:clrscr/clrscr::@3->clrscr::@1] - // [1821] phi clrscr::l#4 = clrscr::l#0 [phi:clrscr/clrscr::@3->clrscr::@1#0] -- register_copy - // [1821] phi clrscr::ch#0 = clrscr::line_text#0 [phi:clrscr/clrscr::@3->clrscr::@1#1] -- register_copy + // [1877] clrscr::l#0 = *((char *)&__conio+9) -- vbum1=_deref_pbuc1 + lda __conio+9 + sta l + // [1878] phi from clrscr clrscr::@3 to clrscr::@1 [phi:clrscr/clrscr::@3->clrscr::@1] + // [1878] phi clrscr::l#4 = clrscr::l#0 [phi:clrscr/clrscr::@3->clrscr::@1#0] -- register_copy + // [1878] phi clrscr::ch#0 = clrscr::line_text#0 [phi:clrscr/clrscr::@3->clrscr::@1#1] -- register_copy // clrscr::@1 __b1: // BYTE0(ch) - // [1822] clrscr::$1 = byte0 clrscr::ch#0 -- vbuaa=_byte0_vwum1 + // [1879] clrscr::$1 = byte0 clrscr::ch#0 -- vbuz1=_byte0_vwum2 lda ch + sta.z clrscr__1 // *VERA_ADDRX_L = BYTE0(ch) - // [1823] *VERA_ADDRX_L = clrscr::$1 -- _deref_pbuc1=vbuaa + // [1880] *VERA_ADDRX_L = clrscr::$1 -- _deref_pbuc1=vbuz1 // Set address sta VERA_ADDRX_L // BYTE1(ch) - // [1824] clrscr::$2 = byte1 clrscr::ch#0 -- vbuaa=_byte1_vwum1 + // [1881] clrscr::$2 = byte1 clrscr::ch#0 -- vbuz1=_byte1_vwum2 lda ch+1 + sta.z clrscr__2 // *VERA_ADDRX_M = BYTE1(ch) - // [1825] *VERA_ADDRX_M = clrscr::$2 -- _deref_pbuc1=vbuaa + // [1882] *VERA_ADDRX_M = clrscr::$2 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_M // unsigned char c = __conio.mapwidth+1 - // [1826] clrscr::c#0 = *((char *)&__conio+8) + 1 -- vbuyy=_deref_pbuc1_plus_1 - ldy __conio+8 - iny - // [1827] phi from clrscr::@1 clrscr::@2 to clrscr::@2 [phi:clrscr::@1/clrscr::@2->clrscr::@2] - // [1827] phi clrscr::c#2 = clrscr::c#0 [phi:clrscr::@1/clrscr::@2->clrscr::@2#0] -- register_copy + // [1883] clrscr::c#0 = *((char *)&__conio+8) + 1 -- vbum1=_deref_pbuc1_plus_1 + lda __conio+8 + inc + sta c + // [1884] phi from clrscr::@1 clrscr::@2 to clrscr::@2 [phi:clrscr::@1/clrscr::@2->clrscr::@2] + // [1884] phi clrscr::c#2 = clrscr::c#0 [phi:clrscr::@1/clrscr::@2->clrscr::@2#0] -- register_copy // clrscr::@2 __b2: // *VERA_DATA0 = ' ' - // [1828] *VERA_DATA0 = ' ' -- _deref_pbuc1=vbuc2 + // [1885] *VERA_DATA0 = ' ' -- _deref_pbuc1=vbuc2 lda #' ' sta VERA_DATA0 // *VERA_DATA0 = __conio.color - // [1829] *VERA_DATA0 = *((char *)&__conio+$d) -- _deref_pbuc1=_deref_pbuc2 + // [1886] *VERA_DATA0 = *((char *)&__conio+$d) -- _deref_pbuc1=_deref_pbuc2 lda __conio+$d sta VERA_DATA0 // c--; - // [1830] clrscr::c#1 = -- clrscr::c#2 -- vbuyy=_dec_vbuyy - dey + // [1887] clrscr::c#1 = -- clrscr::c#2 -- vbum1=_dec_vbum1 + dec c // while(c) - // [1831] if(0!=clrscr::c#1) goto clrscr::@2 -- 0_neq_vbuyy_then_la1 - cpy #0 + // [1888] if(0!=clrscr::c#1) goto clrscr::@2 -- 0_neq_vbum1_then_la1 + lda c bne __b2 // clrscr::@3 // line_text += __conio.rowskip - // [1832] clrscr::line_text#1 = clrscr::ch#0 + *((unsigned int *)&__conio+$a) -- vwum1=vwum1_plus__deref_pwuc1 + // [1889] clrscr::line_text#1 = clrscr::ch#0 + *((unsigned int *)&__conio+$a) -- vwum1=vwum1_plus__deref_pwuc1 clc lda line_text adc __conio+$a @@ -11945,33 +12775,35 @@ clrscr: { adc __conio+$a+1 sta line_text+1 // l--; - // [1833] clrscr::l#1 = -- clrscr::l#4 -- vbuxx=_dec_vbuxx - dex + // [1890] clrscr::l#1 = -- clrscr::l#4 -- vbum1=_dec_vbum1 + dec l // while(l) - // [1834] if(0!=clrscr::l#1) goto clrscr::@1 -- 0_neq_vbuxx_then_la1 - cpx #0 + // [1891] if(0!=clrscr::l#1) goto clrscr::@1 -- 0_neq_vbum1_then_la1 + lda l bne __b1 // clrscr::@4 // __conio.cursor_x = 0 - // [1835] *((char *)&__conio) = 0 -- _deref_pbuc1=vbuc2 + // [1892] *((char *)&__conio) = 0 -- _deref_pbuc1=vbuc2 lda #0 sta __conio // __conio.cursor_y = 0 - // [1836] *((char *)&__conio+1) = 0 -- _deref_pbuc1=vbuc2 + // [1893] *((char *)&__conio+1) = 0 -- _deref_pbuc1=vbuc2 sta __conio+1 // __conio.offset = __conio.mapbase_offset - // [1837] *((unsigned int *)&__conio+$13) = *((unsigned int *)&__conio+3) -- _deref_pwuc1=_deref_pwuc2 + // [1894] *((unsigned int *)&__conio+$13) = *((unsigned int *)&__conio+3) -- _deref_pwuc1=_deref_pwuc2 lda __conio+3 sta __conio+$13 lda __conio+3+1 sta __conio+$13+1 // clrscr::@return // } - // [1838] return + // [1895] return rts .segment Data .label line_text = ch + .label l = main.check_status_smc7_main__0 ch: .word 0 + .label c = main.check_status_vera3_main__0 } .segment Code // display_frame @@ -11987,504 +12819,547 @@ clrscr: { * @param x1 Right down X position, counting from 0. * @param y1 Right down Y position, counting from 0. */ -// void display_frame(char x0, char y0, __zp($78) char x1, __zp($51) char y1) +// void display_frame(char x0, char y0, __zp($68) char x1, __zp($73) char y1) display_frame: { - .label x = $53 - .label y = $bf - .label x_1 = $bc - .label y_1 = $52 - .label x1 = $78 - .label y1 = $51 + .label w = $d4 + .label h = $38 + .label x = $70 + .label y = $e9 + .label mask = $72 + .label c = $53 + .label x_1 = $df + .label y_1 = $6a + .label x1 = $68 + .label y1 = $73 // unsigned char w = x1 - x0 - // [1840] display_frame::w#0 = display_frame::x1#16 - display_frame::x#0 -- vbum1=vbuz2_minus_vbuz3 + // [1897] display_frame::w#0 = display_frame::x1#16 - display_frame::x#0 -- vbuz1=vbuz2_minus_vbuz3 lda.z x1 sec sbc.z x - sta w + sta.z w // unsigned char h = y1 - y0 - // [1841] display_frame::h#0 = display_frame::y1#16 - display_frame::y#0 -- vbum1=vbuz2_minus_vbuz3 + // [1898] display_frame::h#0 = display_frame::y1#16 - display_frame::y#0 -- vbuz1=vbuz2_minus_vbuz3 lda.z y1 sec sbc.z y - sta h + sta.z h // unsigned char mask = display_frame_maskxy(x, y) - // [1842] display_frame_maskxy::x#0 = display_frame::x#0 -- vbuxx=vbuz1 - ldx.z x - // [1843] display_frame_maskxy::y#0 = display_frame::y#0 -- vbuyy=vbuz1 - ldy.z y - // [1844] call display_frame_maskxy - // [2499] phi from display_frame to display_frame_maskxy [phi:display_frame->display_frame_maskxy] - // [2499] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#0 [phi:display_frame->display_frame_maskxy#0] -- register_copy - // [2499] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#0 [phi:display_frame->display_frame_maskxy#1] -- register_copy + // [1899] display_frame_maskxy::x#0 = display_frame::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z display_frame_maskxy.x + // [1900] display_frame_maskxy::y#0 = display_frame::y#0 -- vbum1=vbuz2 + lda.z y + sta display_frame_maskxy.y + // [1901] call display_frame_maskxy + // [2556] phi from display_frame to display_frame_maskxy [phi:display_frame->display_frame_maskxy] + // [2556] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#0 [phi:display_frame->display_frame_maskxy#0] -- register_copy + // [2556] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#0 [phi:display_frame->display_frame_maskxy#1] -- register_copy jsr display_frame_maskxy // unsigned char mask = display_frame_maskxy(x, y) - // [1845] display_frame_maskxy::return#13 = display_frame_maskxy::return#12 + // [1902] display_frame_maskxy::return#13 = display_frame_maskxy::return#12 // display_frame::@13 - // [1846] display_frame::mask#0 = display_frame_maskxy::return#13 + // [1903] display_frame::mask#0 = display_frame_maskxy::return#13 // mask |= 0b0110 - // [1847] display_frame::mask#1 = display_frame::mask#0 | 6 -- vbuaa=vbuaa_bor_vbuc1 - ora #6 + // [1904] display_frame::mask#1 = display_frame::mask#0 | 6 -- vbuz1=vbuz1_bor_vbuc1 + lda #6 + ora.z mask + sta.z mask // unsigned char c = display_frame_char(mask) - // [1848] display_frame_char::mask#0 = display_frame::mask#1 - // [1849] call display_frame_char + // [1905] display_frame_char::mask#0 = display_frame::mask#1 + // [1906] call display_frame_char // Add a corner. - // [2525] phi from display_frame::@13 to display_frame_char [phi:display_frame::@13->display_frame_char] - // [2525] phi display_frame_char::mask#10 = display_frame_char::mask#0 [phi:display_frame::@13->display_frame_char#0] -- register_copy + // [2582] phi from display_frame::@13 to display_frame_char [phi:display_frame::@13->display_frame_char] + // [2582] phi display_frame_char::mask#10 = display_frame_char::mask#0 [phi:display_frame::@13->display_frame_char#0] -- register_copy jsr display_frame_char // unsigned char c = display_frame_char(mask) - // [1850] display_frame_char::return#13 = display_frame_char::return#12 + // [1907] display_frame_char::return#13 = display_frame_char::return#12 // display_frame::@14 - // [1851] display_frame::c#0 = display_frame_char::return#13 + // [1908] display_frame::c#0 = display_frame_char::return#13 // cputcxy(x, y, c) - // [1852] cputcxy::x#0 = display_frame::x#0 -- vbuxx=vbuz1 - ldx.z x - // [1853] cputcxy::y#0 = display_frame::y#0 -- vbuyy=vbuz1 - ldy.z y - // [1854] cputcxy::c#0 = display_frame::c#0 -- vbuz1=vbuaa - sta.z cputcxy.c - // [1855] call cputcxy - // [1986] phi from display_frame::@14 to cputcxy [phi:display_frame::@14->cputcxy] - // [1986] phi cputcxy::c#15 = cputcxy::c#0 [phi:display_frame::@14->cputcxy#0] -- register_copy - // [1986] phi cputcxy::y#15 = cputcxy::y#0 [phi:display_frame::@14->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#0 [phi:display_frame::@14->cputcxy#2] -- register_copy + // [1909] cputcxy::x#0 = display_frame::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [1910] cputcxy::y#0 = display_frame::y#0 -- vbuz1=vbuz2 + lda.z y + sta.z cputcxy.y + // [1911] cputcxy::c#0 = display_frame::c#0 + // [1912] call cputcxy + // [2043] phi from display_frame::@14 to cputcxy [phi:display_frame::@14->cputcxy] + // [2043] phi cputcxy::c#15 = cputcxy::c#0 [phi:display_frame::@14->cputcxy#0] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#0 [phi:display_frame::@14->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#0 [phi:display_frame::@14->cputcxy#2] -- register_copy jsr cputcxy // display_frame::@15 // if(w>=2) - // [1856] if(display_frame::w#0<2) goto display_frame::@36 -- vbum1_lt_vbuc1_then_la1 - lda w + // [1913] if(display_frame::w#0<2) goto display_frame::@36 -- vbuz1_lt_vbuc1_then_la1 + lda.z w cmp #2 bcs !__b36+ jmp __b36 !__b36: // display_frame::@2 // x++; - // [1857] display_frame::x#1 = ++ display_frame::x#0 -- vbuz1=_inc_vbuz2 + // [1914] display_frame::x#1 = ++ display_frame::x#0 -- vbuz1=_inc_vbuz2 lda.z x inc sta.z x_1 - // [1858] phi from display_frame::@2 display_frame::@21 to display_frame::@4 [phi:display_frame::@2/display_frame::@21->display_frame::@4] - // [1858] phi display_frame::x#10 = display_frame::x#1 [phi:display_frame::@2/display_frame::@21->display_frame::@4#0] -- register_copy + // [1915] phi from display_frame::@2 display_frame::@21 to display_frame::@4 [phi:display_frame::@2/display_frame::@21->display_frame::@4] + // [1915] phi display_frame::x#10 = display_frame::x#1 [phi:display_frame::@2/display_frame::@21->display_frame::@4#0] -- register_copy // display_frame::@4 __b4: // while(x < x1) - // [1859] if(display_frame::x#10display_frame::@1] - // [1860] phi display_frame::x#24 = display_frame::x#30 [phi:display_frame::@36/display_frame::@4->display_frame::@1#0] -- register_copy + // [1917] phi from display_frame::@36 display_frame::@4 to display_frame::@1 [phi:display_frame::@36/display_frame::@4->display_frame::@1] + // [1917] phi display_frame::x#24 = display_frame::x#30 [phi:display_frame::@36/display_frame::@4->display_frame::@1#0] -- register_copy // display_frame::@1 __b1: // display_frame_maskxy(x, y) - // [1861] display_frame_maskxy::x#1 = display_frame::x#24 -- vbuxx=vbuz1 - ldx.z x_1 - // [1862] display_frame_maskxy::y#1 = display_frame::y#0 -- vbuyy=vbuz1 - ldy.z y - // [1863] call display_frame_maskxy - // [2499] phi from display_frame::@1 to display_frame_maskxy [phi:display_frame::@1->display_frame_maskxy] - // [2499] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#1 [phi:display_frame::@1->display_frame_maskxy#0] -- register_copy - // [2499] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#1 [phi:display_frame::@1->display_frame_maskxy#1] -- register_copy + // [1918] display_frame_maskxy::x#1 = display_frame::x#24 -- vbuz1=vbuz2 + lda.z x_1 + sta.z display_frame_maskxy.x + // [1919] display_frame_maskxy::y#1 = display_frame::y#0 -- vbum1=vbuz2 + lda.z y + sta display_frame_maskxy.y + // [1920] call display_frame_maskxy + // [2556] phi from display_frame::@1 to display_frame_maskxy [phi:display_frame::@1->display_frame_maskxy] + // [2556] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#1 [phi:display_frame::@1->display_frame_maskxy#0] -- register_copy + // [2556] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#1 [phi:display_frame::@1->display_frame_maskxy#1] -- register_copy jsr display_frame_maskxy // display_frame_maskxy(x, y) - // [1864] display_frame_maskxy::return#14 = display_frame_maskxy::return#12 + // [1921] display_frame_maskxy::return#14 = display_frame_maskxy::return#12 // display_frame::@16 // mask = display_frame_maskxy(x, y) - // [1865] display_frame::mask#2 = display_frame_maskxy::return#14 + // [1922] display_frame::mask#2 = display_frame_maskxy::return#14 // mask |= 0b0011 - // [1866] display_frame::mask#3 = display_frame::mask#2 | 3 -- vbuaa=vbuaa_bor_vbuc1 - ora #3 + // [1923] display_frame::mask#3 = display_frame::mask#2 | 3 -- vbuz1=vbuz1_bor_vbuc1 + lda #3 + ora.z mask + sta.z mask // display_frame_char(mask) - // [1867] display_frame_char::mask#1 = display_frame::mask#3 - // [1868] call display_frame_char - // [2525] phi from display_frame::@16 to display_frame_char [phi:display_frame::@16->display_frame_char] - // [2525] phi display_frame_char::mask#10 = display_frame_char::mask#1 [phi:display_frame::@16->display_frame_char#0] -- register_copy + // [1924] display_frame_char::mask#1 = display_frame::mask#3 + // [1925] call display_frame_char + // [2582] phi from display_frame::@16 to display_frame_char [phi:display_frame::@16->display_frame_char] + // [2582] phi display_frame_char::mask#10 = display_frame_char::mask#1 [phi:display_frame::@16->display_frame_char#0] -- register_copy jsr display_frame_char // display_frame_char(mask) - // [1869] display_frame_char::return#14 = display_frame_char::return#12 + // [1926] display_frame_char::return#14 = display_frame_char::return#12 // display_frame::@17 // c = display_frame_char(mask) - // [1870] display_frame::c#1 = display_frame_char::return#14 + // [1927] display_frame::c#1 = display_frame_char::return#14 // cputcxy(x, y, c) - // [1871] cputcxy::x#1 = display_frame::x#24 -- vbuxx=vbuz1 - ldx.z x_1 - // [1872] cputcxy::y#1 = display_frame::y#0 -- vbuyy=vbuz1 - ldy.z y - // [1873] cputcxy::c#1 = display_frame::c#1 -- vbuz1=vbuaa - sta.z cputcxy.c - // [1874] call cputcxy - // [1986] phi from display_frame::@17 to cputcxy [phi:display_frame::@17->cputcxy] - // [1986] phi cputcxy::c#15 = cputcxy::c#1 [phi:display_frame::@17->cputcxy#0] -- register_copy - // [1986] phi cputcxy::y#15 = cputcxy::y#1 [phi:display_frame::@17->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#1 [phi:display_frame::@17->cputcxy#2] -- register_copy + // [1928] cputcxy::x#1 = display_frame::x#24 -- vbuz1=vbuz2 + lda.z x_1 + sta.z cputcxy.x + // [1929] cputcxy::y#1 = display_frame::y#0 -- vbuz1=vbuz2 + lda.z y + sta.z cputcxy.y + // [1930] cputcxy::c#1 = display_frame::c#1 + // [1931] call cputcxy + // [2043] phi from display_frame::@17 to cputcxy [phi:display_frame::@17->cputcxy] + // [2043] phi cputcxy::c#15 = cputcxy::c#1 [phi:display_frame::@17->cputcxy#0] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#1 [phi:display_frame::@17->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#1 [phi:display_frame::@17->cputcxy#2] -- register_copy jsr cputcxy // display_frame::@18 // if(h>=2) - // [1875] if(display_frame::h#0<2) goto display_frame::@return -- vbum1_lt_vbuc1_then_la1 - lda h + // [1932] if(display_frame::h#0<2) goto display_frame::@return -- vbuz1_lt_vbuc1_then_la1 + lda.z h cmp #2 bcc __breturn // display_frame::@3 // y++; - // [1876] display_frame::y#1 = ++ display_frame::y#0 -- vbuz1=_inc_vbuz2 + // [1933] display_frame::y#1 = ++ display_frame::y#0 -- vbuz1=_inc_vbuz2 lda.z y inc sta.z y_1 - // [1877] phi from display_frame::@27 display_frame::@3 to display_frame::@6 [phi:display_frame::@27/display_frame::@3->display_frame::@6] - // [1877] phi display_frame::y#10 = display_frame::y#2 [phi:display_frame::@27/display_frame::@3->display_frame::@6#0] -- register_copy + // [1934] phi from display_frame::@27 display_frame::@3 to display_frame::@6 [phi:display_frame::@27/display_frame::@3->display_frame::@6] + // [1934] phi display_frame::y#10 = display_frame::y#2 [phi:display_frame::@27/display_frame::@3->display_frame::@6#0] -- register_copy // display_frame::@6 __b6: // while(y < y1) - // [1878] if(display_frame::y#10display_frame_maskxy] - // [2499] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#5 [phi:display_frame::@8->display_frame_maskxy#0] -- register_copy - // [2499] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#5 [phi:display_frame::@8->display_frame_maskxy#1] -- register_copy + // [1936] display_frame_maskxy::x#5 = display_frame::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z display_frame_maskxy.x + // [1937] display_frame_maskxy::y#5 = display_frame::y#10 -- vbum1=vbuz2 + lda.z y_1 + sta display_frame_maskxy.y + // [1938] call display_frame_maskxy + // [2556] phi from display_frame::@8 to display_frame_maskxy [phi:display_frame::@8->display_frame_maskxy] + // [2556] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#5 [phi:display_frame::@8->display_frame_maskxy#0] -- register_copy + // [2556] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#5 [phi:display_frame::@8->display_frame_maskxy#1] -- register_copy jsr display_frame_maskxy // display_frame_maskxy(x, y) - // [1882] display_frame_maskxy::return#18 = display_frame_maskxy::return#12 + // [1939] display_frame_maskxy::return#18 = display_frame_maskxy::return#12 // display_frame::@28 // mask = display_frame_maskxy(x, y) - // [1883] display_frame::mask#10 = display_frame_maskxy::return#18 + // [1940] display_frame::mask#10 = display_frame_maskxy::return#18 // mask |= 0b1100 - // [1884] display_frame::mask#11 = display_frame::mask#10 | $c -- vbuaa=vbuaa_bor_vbuc1 - ora #$c + // [1941] display_frame::mask#11 = display_frame::mask#10 | $c -- vbuz1=vbuz1_bor_vbuc1 + lda #$c + ora.z mask + sta.z mask // display_frame_char(mask) - // [1885] display_frame_char::mask#5 = display_frame::mask#11 - // [1886] call display_frame_char - // [2525] phi from display_frame::@28 to display_frame_char [phi:display_frame::@28->display_frame_char] - // [2525] phi display_frame_char::mask#10 = display_frame_char::mask#5 [phi:display_frame::@28->display_frame_char#0] -- register_copy + // [1942] display_frame_char::mask#5 = display_frame::mask#11 + // [1943] call display_frame_char + // [2582] phi from display_frame::@28 to display_frame_char [phi:display_frame::@28->display_frame_char] + // [2582] phi display_frame_char::mask#10 = display_frame_char::mask#5 [phi:display_frame::@28->display_frame_char#0] -- register_copy jsr display_frame_char // display_frame_char(mask) - // [1887] display_frame_char::return#18 = display_frame_char::return#12 + // [1944] display_frame_char::return#18 = display_frame_char::return#12 // display_frame::@29 // c = display_frame_char(mask) - // [1888] display_frame::c#5 = display_frame_char::return#18 + // [1945] display_frame::c#5 = display_frame_char::return#18 // cputcxy(x, y, c) - // [1889] cputcxy::x#5 = display_frame::x#0 -- vbuxx=vbuz1 - ldx.z x - // [1890] cputcxy::y#5 = display_frame::y#10 -- vbuyy=vbuz1 - ldy.z y_1 - // [1891] cputcxy::c#5 = display_frame::c#5 -- vbuz1=vbuaa - sta.z cputcxy.c - // [1892] call cputcxy - // [1986] phi from display_frame::@29 to cputcxy [phi:display_frame::@29->cputcxy] - // [1986] phi cputcxy::c#15 = cputcxy::c#5 [phi:display_frame::@29->cputcxy#0] -- register_copy - // [1986] phi cputcxy::y#15 = cputcxy::y#5 [phi:display_frame::@29->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#5 [phi:display_frame::@29->cputcxy#2] -- register_copy + // [1946] cputcxy::x#5 = display_frame::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [1947] cputcxy::y#5 = display_frame::y#10 -- vbuz1=vbuz2 + lda.z y_1 + sta.z cputcxy.y + // [1948] cputcxy::c#5 = display_frame::c#5 + // [1949] call cputcxy + // [2043] phi from display_frame::@29 to cputcxy [phi:display_frame::@29->cputcxy] + // [2043] phi cputcxy::c#15 = cputcxy::c#5 [phi:display_frame::@29->cputcxy#0] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#5 [phi:display_frame::@29->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#5 [phi:display_frame::@29->cputcxy#2] -- register_copy jsr cputcxy // display_frame::@30 // if(w>=2) - // [1893] if(display_frame::w#0<2) goto display_frame::@10 -- vbum1_lt_vbuc1_then_la1 - lda w + // [1950] if(display_frame::w#0<2) goto display_frame::@10 -- vbuz1_lt_vbuc1_then_la1 + lda.z w cmp #2 bcc __b10 // display_frame::@9 // x++; - // [1894] display_frame::x#4 = ++ display_frame::x#0 -- vbuz1=_inc_vbuz1 + // [1951] display_frame::x#4 = ++ display_frame::x#0 -- vbuz1=_inc_vbuz1 inc.z x - // [1895] phi from display_frame::@35 display_frame::@9 to display_frame::@11 [phi:display_frame::@35/display_frame::@9->display_frame::@11] - // [1895] phi display_frame::x#18 = display_frame::x#5 [phi:display_frame::@35/display_frame::@9->display_frame::@11#0] -- register_copy + // [1952] phi from display_frame::@35 display_frame::@9 to display_frame::@11 [phi:display_frame::@35/display_frame::@9->display_frame::@11] + // [1952] phi display_frame::x#18 = display_frame::x#5 [phi:display_frame::@35/display_frame::@9->display_frame::@11#0] -- register_copy // display_frame::@11 __b11: // while(x < x1) - // [1896] if(display_frame::x#18display_frame::@10] - // [1897] phi display_frame::x#15 = display_frame::x#18 [phi:display_frame::@11/display_frame::@30->display_frame::@10#0] -- register_copy + // [1954] phi from display_frame::@11 display_frame::@30 to display_frame::@10 [phi:display_frame::@11/display_frame::@30->display_frame::@10] + // [1954] phi display_frame::x#15 = display_frame::x#18 [phi:display_frame::@11/display_frame::@30->display_frame::@10#0] -- register_copy // display_frame::@10 __b10: // display_frame_maskxy(x, y) - // [1898] display_frame_maskxy::x#6 = display_frame::x#15 -- vbuxx=vbuz1 - ldx.z x - // [1899] display_frame_maskxy::y#6 = display_frame::y#10 -- vbuyy=vbuz1 - ldy.z y_1 - // [1900] call display_frame_maskxy - // [2499] phi from display_frame::@10 to display_frame_maskxy [phi:display_frame::@10->display_frame_maskxy] - // [2499] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#6 [phi:display_frame::@10->display_frame_maskxy#0] -- register_copy - // [2499] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#6 [phi:display_frame::@10->display_frame_maskxy#1] -- register_copy + // [1955] display_frame_maskxy::x#6 = display_frame::x#15 -- vbuz1=vbuz2 + lda.z x + sta.z display_frame_maskxy.x + // [1956] display_frame_maskxy::y#6 = display_frame::y#10 -- vbum1=vbuz2 + lda.z y_1 + sta display_frame_maskxy.y + // [1957] call display_frame_maskxy + // [2556] phi from display_frame::@10 to display_frame_maskxy [phi:display_frame::@10->display_frame_maskxy] + // [2556] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#6 [phi:display_frame::@10->display_frame_maskxy#0] -- register_copy + // [2556] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#6 [phi:display_frame::@10->display_frame_maskxy#1] -- register_copy jsr display_frame_maskxy // display_frame_maskxy(x, y) - // [1901] display_frame_maskxy::return#19 = display_frame_maskxy::return#12 + // [1958] display_frame_maskxy::return#19 = display_frame_maskxy::return#12 // display_frame::@31 // mask = display_frame_maskxy(x, y) - // [1902] display_frame::mask#12 = display_frame_maskxy::return#19 + // [1959] display_frame::mask#12 = display_frame_maskxy::return#19 // mask |= 0b1001 - // [1903] display_frame::mask#13 = display_frame::mask#12 | 9 -- vbuaa=vbuaa_bor_vbuc1 - ora #9 + // [1960] display_frame::mask#13 = display_frame::mask#12 | 9 -- vbuz1=vbuz1_bor_vbuc1 + lda #9 + ora.z mask + sta.z mask // display_frame_char(mask) - // [1904] display_frame_char::mask#6 = display_frame::mask#13 - // [1905] call display_frame_char - // [2525] phi from display_frame::@31 to display_frame_char [phi:display_frame::@31->display_frame_char] - // [2525] phi display_frame_char::mask#10 = display_frame_char::mask#6 [phi:display_frame::@31->display_frame_char#0] -- register_copy + // [1961] display_frame_char::mask#6 = display_frame::mask#13 + // [1962] call display_frame_char + // [2582] phi from display_frame::@31 to display_frame_char [phi:display_frame::@31->display_frame_char] + // [2582] phi display_frame_char::mask#10 = display_frame_char::mask#6 [phi:display_frame::@31->display_frame_char#0] -- register_copy jsr display_frame_char // display_frame_char(mask) - // [1906] display_frame_char::return#19 = display_frame_char::return#12 + // [1963] display_frame_char::return#19 = display_frame_char::return#12 // display_frame::@32 // c = display_frame_char(mask) - // [1907] display_frame::c#6 = display_frame_char::return#19 + // [1964] display_frame::c#6 = display_frame_char::return#19 // cputcxy(x, y, c) - // [1908] cputcxy::x#6 = display_frame::x#15 -- vbuxx=vbuz1 - ldx.z x - // [1909] cputcxy::y#6 = display_frame::y#10 -- vbuyy=vbuz1 - ldy.z y_1 - // [1910] cputcxy::c#6 = display_frame::c#6 -- vbuz1=vbuaa - sta.z cputcxy.c - // [1911] call cputcxy - // [1986] phi from display_frame::@32 to cputcxy [phi:display_frame::@32->cputcxy] - // [1986] phi cputcxy::c#15 = cputcxy::c#6 [phi:display_frame::@32->cputcxy#0] -- register_copy - // [1986] phi cputcxy::y#15 = cputcxy::y#6 [phi:display_frame::@32->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#6 [phi:display_frame::@32->cputcxy#2] -- register_copy + // [1965] cputcxy::x#6 = display_frame::x#15 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [1966] cputcxy::y#6 = display_frame::y#10 -- vbuz1=vbuz2 + lda.z y_1 + sta.z cputcxy.y + // [1967] cputcxy::c#6 = display_frame::c#6 + // [1968] call cputcxy + // [2043] phi from display_frame::@32 to cputcxy [phi:display_frame::@32->cputcxy] + // [2043] phi cputcxy::c#15 = cputcxy::c#6 [phi:display_frame::@32->cputcxy#0] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#6 [phi:display_frame::@32->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#6 [phi:display_frame::@32->cputcxy#2] -- register_copy jsr cputcxy // display_frame::@return __breturn: // } - // [1912] return + // [1969] return rts // display_frame::@12 __b12: // display_frame_maskxy(x, y) - // [1913] display_frame_maskxy::x#7 = display_frame::x#18 -- vbuxx=vbuz1 - ldx.z x - // [1914] display_frame_maskxy::y#7 = display_frame::y#10 -- vbuyy=vbuz1 - ldy.z y_1 - // [1915] call display_frame_maskxy - // [2499] phi from display_frame::@12 to display_frame_maskxy [phi:display_frame::@12->display_frame_maskxy] - // [2499] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#7 [phi:display_frame::@12->display_frame_maskxy#0] -- register_copy - // [2499] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#7 [phi:display_frame::@12->display_frame_maskxy#1] -- register_copy + // [1970] display_frame_maskxy::x#7 = display_frame::x#18 -- vbuz1=vbuz2 + lda.z x + sta.z display_frame_maskxy.x + // [1971] display_frame_maskxy::y#7 = display_frame::y#10 -- vbum1=vbuz2 + lda.z y_1 + sta display_frame_maskxy.y + // [1972] call display_frame_maskxy + // [2556] phi from display_frame::@12 to display_frame_maskxy [phi:display_frame::@12->display_frame_maskxy] + // [2556] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#7 [phi:display_frame::@12->display_frame_maskxy#0] -- register_copy + // [2556] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#7 [phi:display_frame::@12->display_frame_maskxy#1] -- register_copy jsr display_frame_maskxy // display_frame_maskxy(x, y) - // [1916] display_frame_maskxy::return#20 = display_frame_maskxy::return#12 + // [1973] display_frame_maskxy::return#20 = display_frame_maskxy::return#12 // display_frame::@33 // mask = display_frame_maskxy(x, y) - // [1917] display_frame::mask#14 = display_frame_maskxy::return#20 + // [1974] display_frame::mask#14 = display_frame_maskxy::return#20 // mask |= 0b0101 - // [1918] display_frame::mask#15 = display_frame::mask#14 | 5 -- vbuaa=vbuaa_bor_vbuc1 - ora #5 + // [1975] display_frame::mask#15 = display_frame::mask#14 | 5 -- vbuz1=vbuz1_bor_vbuc1 + lda #5 + ora.z mask + sta.z mask // display_frame_char(mask) - // [1919] display_frame_char::mask#7 = display_frame::mask#15 - // [1920] call display_frame_char - // [2525] phi from display_frame::@33 to display_frame_char [phi:display_frame::@33->display_frame_char] - // [2525] phi display_frame_char::mask#10 = display_frame_char::mask#7 [phi:display_frame::@33->display_frame_char#0] -- register_copy + // [1976] display_frame_char::mask#7 = display_frame::mask#15 + // [1977] call display_frame_char + // [2582] phi from display_frame::@33 to display_frame_char [phi:display_frame::@33->display_frame_char] + // [2582] phi display_frame_char::mask#10 = display_frame_char::mask#7 [phi:display_frame::@33->display_frame_char#0] -- register_copy jsr display_frame_char // display_frame_char(mask) - // [1921] display_frame_char::return#20 = display_frame_char::return#12 + // [1978] display_frame_char::return#20 = display_frame_char::return#12 // display_frame::@34 // c = display_frame_char(mask) - // [1922] display_frame::c#7 = display_frame_char::return#20 + // [1979] display_frame::c#7 = display_frame_char::return#20 // cputcxy(x, y, c) - // [1923] cputcxy::x#7 = display_frame::x#18 -- vbuxx=vbuz1 - ldx.z x - // [1924] cputcxy::y#7 = display_frame::y#10 -- vbuyy=vbuz1 - ldy.z y_1 - // [1925] cputcxy::c#7 = display_frame::c#7 -- vbuz1=vbuaa - sta.z cputcxy.c - // [1926] call cputcxy - // [1986] phi from display_frame::@34 to cputcxy [phi:display_frame::@34->cputcxy] - // [1986] phi cputcxy::c#15 = cputcxy::c#7 [phi:display_frame::@34->cputcxy#0] -- register_copy - // [1986] phi cputcxy::y#15 = cputcxy::y#7 [phi:display_frame::@34->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#7 [phi:display_frame::@34->cputcxy#2] -- register_copy + // [1980] cputcxy::x#7 = display_frame::x#18 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [1981] cputcxy::y#7 = display_frame::y#10 -- vbuz1=vbuz2 + lda.z y_1 + sta.z cputcxy.y + // [1982] cputcxy::c#7 = display_frame::c#7 + // [1983] call cputcxy + // [2043] phi from display_frame::@34 to cputcxy [phi:display_frame::@34->cputcxy] + // [2043] phi cputcxy::c#15 = cputcxy::c#7 [phi:display_frame::@34->cputcxy#0] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#7 [phi:display_frame::@34->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#7 [phi:display_frame::@34->cputcxy#2] -- register_copy jsr cputcxy // display_frame::@35 // x++; - // [1927] display_frame::x#5 = ++ display_frame::x#18 -- vbuz1=_inc_vbuz1 + // [1984] display_frame::x#5 = ++ display_frame::x#18 -- vbuz1=_inc_vbuz1 inc.z x jmp __b11 // display_frame::@7 __b7: // display_frame_maskxy(x0, y) - // [1928] display_frame_maskxy::x#3 = display_frame::x#0 -- vbuxx=vbuz1 - ldx.z x - // [1929] display_frame_maskxy::y#3 = display_frame::y#10 -- vbuyy=vbuz1 - ldy.z y_1 - // [1930] call display_frame_maskxy - // [2499] phi from display_frame::@7 to display_frame_maskxy [phi:display_frame::@7->display_frame_maskxy] - // [2499] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#3 [phi:display_frame::@7->display_frame_maskxy#0] -- register_copy - // [2499] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#3 [phi:display_frame::@7->display_frame_maskxy#1] -- register_copy + // [1985] display_frame_maskxy::x#3 = display_frame::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z display_frame_maskxy.x + // [1986] display_frame_maskxy::y#3 = display_frame::y#10 -- vbum1=vbuz2 + lda.z y_1 + sta display_frame_maskxy.y + // [1987] call display_frame_maskxy + // [2556] phi from display_frame::@7 to display_frame_maskxy [phi:display_frame::@7->display_frame_maskxy] + // [2556] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#3 [phi:display_frame::@7->display_frame_maskxy#0] -- register_copy + // [2556] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#3 [phi:display_frame::@7->display_frame_maskxy#1] -- register_copy jsr display_frame_maskxy // display_frame_maskxy(x0, y) - // [1931] display_frame_maskxy::return#16 = display_frame_maskxy::return#12 + // [1988] display_frame_maskxy::return#16 = display_frame_maskxy::return#12 // display_frame::@22 // mask = display_frame_maskxy(x0, y) - // [1932] display_frame::mask#6 = display_frame_maskxy::return#16 + // [1989] display_frame::mask#6 = display_frame_maskxy::return#16 // mask |= 0b1010 - // [1933] display_frame::mask#7 = display_frame::mask#6 | $a -- vbuaa=vbuaa_bor_vbuc1 - ora #$a + // [1990] display_frame::mask#7 = display_frame::mask#6 | $a -- vbuz1=vbuz1_bor_vbuc1 + lda #$a + ora.z mask + sta.z mask // display_frame_char(mask) - // [1934] display_frame_char::mask#3 = display_frame::mask#7 - // [1935] call display_frame_char - // [2525] phi from display_frame::@22 to display_frame_char [phi:display_frame::@22->display_frame_char] - // [2525] phi display_frame_char::mask#10 = display_frame_char::mask#3 [phi:display_frame::@22->display_frame_char#0] -- register_copy + // [1991] display_frame_char::mask#3 = display_frame::mask#7 + // [1992] call display_frame_char + // [2582] phi from display_frame::@22 to display_frame_char [phi:display_frame::@22->display_frame_char] + // [2582] phi display_frame_char::mask#10 = display_frame_char::mask#3 [phi:display_frame::@22->display_frame_char#0] -- register_copy jsr display_frame_char // display_frame_char(mask) - // [1936] display_frame_char::return#16 = display_frame_char::return#12 + // [1993] display_frame_char::return#16 = display_frame_char::return#12 // display_frame::@23 // c = display_frame_char(mask) - // [1937] display_frame::c#3 = display_frame_char::return#16 + // [1994] display_frame::c#3 = display_frame_char::return#16 // cputcxy(x0, y, c) - // [1938] cputcxy::x#3 = display_frame::x#0 -- vbuxx=vbuz1 - ldx.z x - // [1939] cputcxy::y#3 = display_frame::y#10 -- vbuyy=vbuz1 - ldy.z y_1 - // [1940] cputcxy::c#3 = display_frame::c#3 -- vbuz1=vbuaa - sta.z cputcxy.c - // [1941] call cputcxy - // [1986] phi from display_frame::@23 to cputcxy [phi:display_frame::@23->cputcxy] - // [1986] phi cputcxy::c#15 = cputcxy::c#3 [phi:display_frame::@23->cputcxy#0] -- register_copy - // [1986] phi cputcxy::y#15 = cputcxy::y#3 [phi:display_frame::@23->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#3 [phi:display_frame::@23->cputcxy#2] -- register_copy + // [1995] cputcxy::x#3 = display_frame::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [1996] cputcxy::y#3 = display_frame::y#10 -- vbuz1=vbuz2 + lda.z y_1 + sta.z cputcxy.y + // [1997] cputcxy::c#3 = display_frame::c#3 + // [1998] call cputcxy + // [2043] phi from display_frame::@23 to cputcxy [phi:display_frame::@23->cputcxy] + // [2043] phi cputcxy::c#15 = cputcxy::c#3 [phi:display_frame::@23->cputcxy#0] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#3 [phi:display_frame::@23->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#3 [phi:display_frame::@23->cputcxy#2] -- register_copy jsr cputcxy // display_frame::@24 // display_frame_maskxy(x1, y) - // [1942] display_frame_maskxy::x#4 = display_frame::x1#16 -- vbuxx=vbuz1 - ldx.z x1 - // [1943] display_frame_maskxy::y#4 = display_frame::y#10 -- vbuyy=vbuz1 - ldy.z y_1 - // [1944] call display_frame_maskxy - // [2499] phi from display_frame::@24 to display_frame_maskxy [phi:display_frame::@24->display_frame_maskxy] - // [2499] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#4 [phi:display_frame::@24->display_frame_maskxy#0] -- register_copy - // [2499] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#4 [phi:display_frame::@24->display_frame_maskxy#1] -- register_copy + // [1999] display_frame_maskxy::x#4 = display_frame::x1#16 -- vbuz1=vbuz2 + lda.z x1 + sta.z display_frame_maskxy.x + // [2000] display_frame_maskxy::y#4 = display_frame::y#10 -- vbum1=vbuz2 + lda.z y_1 + sta display_frame_maskxy.y + // [2001] call display_frame_maskxy + // [2556] phi from display_frame::@24 to display_frame_maskxy [phi:display_frame::@24->display_frame_maskxy] + // [2556] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#4 [phi:display_frame::@24->display_frame_maskxy#0] -- register_copy + // [2556] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#4 [phi:display_frame::@24->display_frame_maskxy#1] -- register_copy jsr display_frame_maskxy // display_frame_maskxy(x1, y) - // [1945] display_frame_maskxy::return#17 = display_frame_maskxy::return#12 + // [2002] display_frame_maskxy::return#17 = display_frame_maskxy::return#12 // display_frame::@25 // mask = display_frame_maskxy(x1, y) - // [1946] display_frame::mask#8 = display_frame_maskxy::return#17 + // [2003] display_frame::mask#8 = display_frame_maskxy::return#17 // mask |= 0b1010 - // [1947] display_frame::mask#9 = display_frame::mask#8 | $a -- vbuaa=vbuaa_bor_vbuc1 - ora #$a + // [2004] display_frame::mask#9 = display_frame::mask#8 | $a -- vbuz1=vbuz1_bor_vbuc1 + lda #$a + ora.z mask + sta.z mask // display_frame_char(mask) - // [1948] display_frame_char::mask#4 = display_frame::mask#9 - // [1949] call display_frame_char - // [2525] phi from display_frame::@25 to display_frame_char [phi:display_frame::@25->display_frame_char] - // [2525] phi display_frame_char::mask#10 = display_frame_char::mask#4 [phi:display_frame::@25->display_frame_char#0] -- register_copy + // [2005] display_frame_char::mask#4 = display_frame::mask#9 + // [2006] call display_frame_char + // [2582] phi from display_frame::@25 to display_frame_char [phi:display_frame::@25->display_frame_char] + // [2582] phi display_frame_char::mask#10 = display_frame_char::mask#4 [phi:display_frame::@25->display_frame_char#0] -- register_copy jsr display_frame_char // display_frame_char(mask) - // [1950] display_frame_char::return#17 = display_frame_char::return#12 + // [2007] display_frame_char::return#17 = display_frame_char::return#12 // display_frame::@26 // c = display_frame_char(mask) - // [1951] display_frame::c#4 = display_frame_char::return#17 + // [2008] display_frame::c#4 = display_frame_char::return#17 // cputcxy(x1, y, c) - // [1952] cputcxy::x#4 = display_frame::x1#16 -- vbuxx=vbuz1 - ldx.z x1 - // [1953] cputcxy::y#4 = display_frame::y#10 -- vbuyy=vbuz1 - ldy.z y_1 - // [1954] cputcxy::c#4 = display_frame::c#4 -- vbuz1=vbuaa - sta.z cputcxy.c - // [1955] call cputcxy - // [1986] phi from display_frame::@26 to cputcxy [phi:display_frame::@26->cputcxy] - // [1986] phi cputcxy::c#15 = cputcxy::c#4 [phi:display_frame::@26->cputcxy#0] -- register_copy - // [1986] phi cputcxy::y#15 = cputcxy::y#4 [phi:display_frame::@26->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#4 [phi:display_frame::@26->cputcxy#2] -- register_copy + // [2009] cputcxy::x#4 = display_frame::x1#16 -- vbuz1=vbuz2 + lda.z x1 + sta.z cputcxy.x + // [2010] cputcxy::y#4 = display_frame::y#10 -- vbuz1=vbuz2 + lda.z y_1 + sta.z cputcxy.y + // [2011] cputcxy::c#4 = display_frame::c#4 + // [2012] call cputcxy + // [2043] phi from display_frame::@26 to cputcxy [phi:display_frame::@26->cputcxy] + // [2043] phi cputcxy::c#15 = cputcxy::c#4 [phi:display_frame::@26->cputcxy#0] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#4 [phi:display_frame::@26->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#4 [phi:display_frame::@26->cputcxy#2] -- register_copy jsr cputcxy // display_frame::@27 // y++; - // [1956] display_frame::y#2 = ++ display_frame::y#10 -- vbuz1=_inc_vbuz1 + // [2013] display_frame::y#2 = ++ display_frame::y#10 -- vbuz1=_inc_vbuz1 inc.z y_1 jmp __b6 // display_frame::@5 __b5: // display_frame_maskxy(x, y) - // [1957] display_frame_maskxy::x#2 = display_frame::x#10 -- vbuxx=vbuz1 - ldx.z x_1 - // [1958] display_frame_maskxy::y#2 = display_frame::y#0 -- vbuyy=vbuz1 - ldy.z y - // [1959] call display_frame_maskxy - // [2499] phi from display_frame::@5 to display_frame_maskxy [phi:display_frame::@5->display_frame_maskxy] - // [2499] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#2 [phi:display_frame::@5->display_frame_maskxy#0] -- register_copy - // [2499] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#2 [phi:display_frame::@5->display_frame_maskxy#1] -- register_copy + // [2014] display_frame_maskxy::x#2 = display_frame::x#10 -- vbuz1=vbuz2 + lda.z x_1 + sta.z display_frame_maskxy.x + // [2015] display_frame_maskxy::y#2 = display_frame::y#0 -- vbum1=vbuz2 + lda.z y + sta display_frame_maskxy.y + // [2016] call display_frame_maskxy + // [2556] phi from display_frame::@5 to display_frame_maskxy [phi:display_frame::@5->display_frame_maskxy] + // [2556] phi display_frame_maskxy::cpeekcxy1_y#0 = display_frame_maskxy::y#2 [phi:display_frame::@5->display_frame_maskxy#0] -- register_copy + // [2556] phi display_frame_maskxy::cpeekcxy1_x#0 = display_frame_maskxy::x#2 [phi:display_frame::@5->display_frame_maskxy#1] -- register_copy jsr display_frame_maskxy // display_frame_maskxy(x, y) - // [1960] display_frame_maskxy::return#15 = display_frame_maskxy::return#12 + // [2017] display_frame_maskxy::return#15 = display_frame_maskxy::return#12 // display_frame::@19 // mask = display_frame_maskxy(x, y) - // [1961] display_frame::mask#4 = display_frame_maskxy::return#15 + // [2018] display_frame::mask#4 = display_frame_maskxy::return#15 // mask |= 0b0101 - // [1962] display_frame::mask#5 = display_frame::mask#4 | 5 -- vbuaa=vbuaa_bor_vbuc1 - ora #5 + // [2019] display_frame::mask#5 = display_frame::mask#4 | 5 -- vbuz1=vbuz1_bor_vbuc1 + lda #5 + ora.z mask + sta.z mask // display_frame_char(mask) - // [1963] display_frame_char::mask#2 = display_frame::mask#5 - // [1964] call display_frame_char - // [2525] phi from display_frame::@19 to display_frame_char [phi:display_frame::@19->display_frame_char] - // [2525] phi display_frame_char::mask#10 = display_frame_char::mask#2 [phi:display_frame::@19->display_frame_char#0] -- register_copy + // [2020] display_frame_char::mask#2 = display_frame::mask#5 + // [2021] call display_frame_char + // [2582] phi from display_frame::@19 to display_frame_char [phi:display_frame::@19->display_frame_char] + // [2582] phi display_frame_char::mask#10 = display_frame_char::mask#2 [phi:display_frame::@19->display_frame_char#0] -- register_copy jsr display_frame_char // display_frame_char(mask) - // [1965] display_frame_char::return#15 = display_frame_char::return#12 + // [2022] display_frame_char::return#15 = display_frame_char::return#12 // display_frame::@20 // c = display_frame_char(mask) - // [1966] display_frame::c#2 = display_frame_char::return#15 + // [2023] display_frame::c#2 = display_frame_char::return#15 // cputcxy(x, y, c) - // [1967] cputcxy::x#2 = display_frame::x#10 -- vbuxx=vbuz1 - ldx.z x_1 - // [1968] cputcxy::y#2 = display_frame::y#0 -- vbuyy=vbuz1 - ldy.z y - // [1969] cputcxy::c#2 = display_frame::c#2 -- vbuz1=vbuaa - sta.z cputcxy.c - // [1970] call cputcxy - // [1986] phi from display_frame::@20 to cputcxy [phi:display_frame::@20->cputcxy] - // [1986] phi cputcxy::c#15 = cputcxy::c#2 [phi:display_frame::@20->cputcxy#0] -- register_copy - // [1986] phi cputcxy::y#15 = cputcxy::y#2 [phi:display_frame::@20->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#2 [phi:display_frame::@20->cputcxy#2] -- register_copy + // [2024] cputcxy::x#2 = display_frame::x#10 -- vbuz1=vbuz2 + lda.z x_1 + sta.z cputcxy.x + // [2025] cputcxy::y#2 = display_frame::y#0 -- vbuz1=vbuz2 + lda.z y + sta.z cputcxy.y + // [2026] cputcxy::c#2 = display_frame::c#2 + // [2027] call cputcxy + // [2043] phi from display_frame::@20 to cputcxy [phi:display_frame::@20->cputcxy] + // [2043] phi cputcxy::c#15 = cputcxy::c#2 [phi:display_frame::@20->cputcxy#0] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#2 [phi:display_frame::@20->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#2 [phi:display_frame::@20->cputcxy#2] -- register_copy jsr cputcxy // display_frame::@21 // x++; - // [1971] display_frame::x#2 = ++ display_frame::x#10 -- vbuz1=_inc_vbuz1 + // [2028] display_frame::x#2 = ++ display_frame::x#10 -- vbuz1=_inc_vbuz1 inc.z x_1 jmp __b4 // display_frame::@36 __b36: - // [1972] display_frame::x#30 = display_frame::x#0 -- vbuz1=vbuz2 + // [2029] display_frame::x#30 = display_frame::x#0 -- vbuz1=vbuz2 lda.z x sta.z x_1 jmp __b1 - .segment Data - .label w = ferror.sp - h: .byte 0 } -.segment Code // cputs // Output a NUL-terminated string at the current cursor position -// void cputs(__zp($b9) const char *s) +// void cputs(__zp($db) const char *s) cputs: { - .label s = $b9 - // [1974] phi from cputs cputs::@2 to cputs::@1 [phi:cputs/cputs::@2->cputs::@1] - // [1974] phi cputs::s#2 = cputs::s#1 [phi:cputs/cputs::@2->cputs::@1#0] -- register_copy + .label c = $5f + .label s = $db + // [2031] phi from cputs cputs::@2 to cputs::@1 [phi:cputs/cputs::@2->cputs::@1] + // [2031] phi cputs::s#2 = cputs::s#1 [phi:cputs/cputs::@2->cputs::@1#0] -- register_copy // cputs::@1 __b1: // while(c=*s++) - // [1975] cputs::c#1 = *cputs::s#2 -- vbuaa=_deref_pbuz1 + // [2032] cputs::c#1 = *cputs::s#2 -- vbuz1=_deref_pbuz2 ldy #0 lda (s),y - // [1976] cputs::s#0 = ++ cputs::s#2 -- pbuz1=_inc_pbuz1 + sta.z c + // [2033] cputs::s#0 = ++ cputs::s#2 -- pbuz1=_inc_pbuz1 inc.z s bne !+ inc.z s+1 !: - // [1977] if(0!=cputs::c#1) goto cputs::@2 -- 0_neq_vbuaa_then_la1 - cmp #0 + // [2034] if(0!=cputs::c#1) goto cputs::@2 -- 0_neq_vbuz1_then_la1 + lda.z c bne __b2 // cputs::@return // } - // [1978] return + // [2035] return rts // cputs::@2 __b2: // cputc(c) - // [1979] stackpush(char) = cputs::c#1 -- _stackpushbyte_=vbuaa + // [2036] stackpush(char) = cputs::c#1 -- _stackpushbyte_=vbuz1 + lda.z c pha - // [1980] callexecute cputc -- call_vprc1 + // [2037] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla @@ -12493,51 +13368,71 @@ cputs: { // wherex // Return the x position of the cursor wherex: { + .label return = $eb + .label return_1 = $6b + .label return_3 = $e3 + .label return_4 = $5b // return __conio.cursor_x; - // [1982] wherex::return#0 = *((char *)&__conio) -- vbuaa=_deref_pbuc1 + // [2039] wherex::return#0 = *((char *)&__conio) -- vbuz1=_deref_pbuc1 lda __conio + sta.z return // wherex::@return // } - // [1983] return + // [2040] return rts + .segment Data + .label return_2 = fclose.sp } +.segment Code // wherey // Return the y position of the cursor wherey: { + .label return = $c5 + .label return_1 = $43 + .label return_2 = $6c + .label return_3 = $6e + .label return_4 = $54 // return __conio.cursor_y; - // [1984] wherey::return#0 = *((char *)&__conio+1) -- vbuaa=_deref_pbuc1 + // [2041] wherey::return#0 = *((char *)&__conio+1) -- vbuz1=_deref_pbuc1 lda __conio+1 + sta.z return // wherey::@return // } - // [1985] return + // [2042] return rts } // cputcxy // Move cursor and output one character // Same as "gotoxy (x, y); cputc (c);" -// void cputcxy(__register(X) char x, __register(Y) char y, __zp($42) char c) +// void cputcxy(__zp($c6) char x, __zp($d0) char y, __zp($53) char c) cputcxy: { - .label c = $42 + .label x = $c6 + .label y = $d0 + .label c = $53 // gotoxy(x, y) - // [1987] gotoxy::x#0 = cputcxy::x#15 - // [1988] gotoxy::y#0 = cputcxy::y#15 - // [1989] call gotoxy - // [718] phi from cputcxy to gotoxy [phi:cputcxy->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#0 [phi:cputcxy->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#0 [phi:cputcxy->gotoxy#1] -- register_copy + // [2044] gotoxy::x#0 = cputcxy::x#15 -- vbuz1=vbuz2 + lda.z x + sta.z gotoxy.x + // [2045] gotoxy::y#0 = cputcxy::y#15 -- vbuz1=vbuz2 + lda.z y + sta.z gotoxy.y + // [2046] call gotoxy + // [763] phi from cputcxy to gotoxy [phi:cputcxy->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#0 [phi:cputcxy->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#0 [phi:cputcxy->gotoxy#1] -- register_copy jsr gotoxy // cputcxy::@1 // cputc(c) - // [1990] stackpush(char) = cputcxy::c#15 -- _stackpushbyte_=vbuz1 + // [2047] stackpush(char) = cputcxy::c#15 -- _stackpushbyte_=vbuz1 lda.z c pha - // [1991] callexecute cputc -- call_vprc1 + // [2048] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // cputcxy::@return // } - // [1993] return + // [2050] return rts } // display_smc_led @@ -12546,38 +13441,39 @@ cputcxy: { * * @param c Led color */ -// void display_smc_led(__zp($74) char c) +// void display_smc_led(__zp($c0) char c) display_smc_led: { - .label c = $74 + .label c = $c0 // display_chip_led(CHIP_SMC_X+1, CHIP_SMC_Y, CHIP_SMC_W, c, BLUE) - // [1995] display_chip_led::tc#0 = display_smc_led::c#2 -- vbuxx=vbuz1 - ldx.z c - // [1996] call display_chip_led - // [2540] phi from display_smc_led to display_chip_led [phi:display_smc_led->display_chip_led] - // [2540] phi display_chip_led::w#7 = 5 [phi:display_smc_led->display_chip_led#0] -- vbuz1=vbuc1 + // [2052] display_chip_led::tc#0 = display_smc_led::c#2 -- vbuz1=vbuz2 + lda.z c + sta.z display_chip_led.tc + // [2053] call display_chip_led + // [2597] phi from display_smc_led to display_chip_led [phi:display_smc_led->display_chip_led] + // [2597] phi display_chip_led::w#7 = 5 [phi:display_smc_led->display_chip_led#0] -- vbuz1=vbuc1 lda #5 sta.z display_chip_led.w - // [2540] phi display_chip_led::x#7 = 1+1 [phi:display_smc_led->display_chip_led#1] -- vbuz1=vbuc1 + // [2597] phi display_chip_led::x#7 = 1+1 [phi:display_smc_led->display_chip_led#1] -- vbuz1=vbuc1 lda #1+1 sta.z display_chip_led.x - // [2540] phi display_chip_led::tc#3 = display_chip_led::tc#0 [phi:display_smc_led->display_chip_led#2] -- register_copy + // [2597] phi display_chip_led::tc#3 = display_chip_led::tc#0 [phi:display_smc_led->display_chip_led#2] -- register_copy jsr display_chip_led // display_smc_led::@1 // display_info_led(INFO_X-2, INFO_Y, c, BLUE) - // [1997] display_info_led::tc#0 = display_smc_led::c#2 -- vbuxx=vbuz1 - ldx.z c - // [1998] call display_info_led - // [1757] phi from display_smc_led::@1 to display_info_led [phi:display_smc_led::@1->display_info_led] - // [1757] phi display_info_led::y#4 = $11 [phi:display_smc_led::@1->display_info_led#0] -- vbuz1=vbuc1 + // [2054] display_info_led::tc#0 = display_smc_led::c#2 + // [2055] call display_info_led + // [1814] phi from display_smc_led::@1 to display_info_led [phi:display_smc_led::@1->display_info_led] + // [1814] phi display_info_led::y#4 = $11 [phi:display_smc_led::@1->display_info_led#0] -- vbuz1=vbuc1 lda #$11 sta.z display_info_led.y - // [1757] phi display_info_led::x#4 = 4-2 [phi:display_smc_led::@1->display_info_led#1] -- vbuyy=vbuc1 - ldy #4-2 - // [1757] phi display_info_led::tc#4 = display_info_led::tc#0 [phi:display_smc_led::@1->display_info_led#2] -- register_copy + // [1814] phi display_info_led::x#4 = 4-2 [phi:display_smc_led::@1->display_info_led#1] -- vbuz1=vbuc1 + lda #4-2 + sta.z display_info_led.x + // [1814] phi display_info_led::tc#4 = display_info_led::tc#0 [phi:display_smc_led::@1->display_info_led#2] -- register_copy jsr display_info_led // display_smc_led::@return // } - // [1999] return + // [2056] return rts } // display_print_chip @@ -12589,69 +13485,71 @@ display_smc_led: { * @param w Width * @param text Vertical text to be displayed in the chip, starting from the top. */ -// void display_print_chip(__zp($4f) char x, char y, __zp($54) char w, __zp($36) char *text) +// void display_print_chip(__zp($be) char x, char y, __zp($66) char w, __zp($44) char *text) display_print_chip: { .label y = 3+2+1+1+1+1+1+1+1+1 - .label text = $36 - .label text_1 = $40 - .label x = $4f - .label text_2 = $e5 - .label text_3 = $ea - .label text_6 = $57 - .label w = $54 + .label text = $44 + .label text_1 = $76 + .label x = $be + .label text_6 = $5d + .label w = $66 // display_chip_line(x, y++, w, *text++) - // [2001] display_chip_line::x#0 = display_print_chip::x#10 -- vbum1=vbuz2 + // [2058] display_chip_line::x#0 = display_print_chip::x#10 -- vbuz1=vbuz2 lda.z x - sta display_chip_line.x - // [2002] display_chip_line::w#0 = display_print_chip::w#10 -- vbuz1=vbuz2 + sta.z display_chip_line.x + // [2059] display_chip_line::w#0 = display_print_chip::w#10 -- vbuz1=vbuz2 lda.z w sta.z display_chip_line.w - // [2003] display_chip_line::c#0 = *display_print_chip::text#11 -- vbum1=_deref_pbuz2 + // [2060] display_chip_line::c#0 = *display_print_chip::text#11 -- vbuz1=_deref_pbum2 + ldy text_2 + sty.z $fe + ldy text_2+1 + sty.z $ff ldy #0 - lda (text_2),y - sta display_chip_line.c - // [2004] call display_chip_line - // [2558] phi from display_print_chip to display_chip_line [phi:display_print_chip->display_chip_line] - // [2558] phi display_chip_line::c#15 = display_chip_line::c#0 [phi:display_print_chip->display_chip_line#0] -- register_copy - // [2558] phi display_chip_line::w#10 = display_chip_line::w#0 [phi:display_print_chip->display_chip_line#1] -- register_copy - // [2558] phi display_chip_line::y#16 = 3+2 [phi:display_print_chip->display_chip_line#2] -- vbum1=vbuc1 + lda ($fe),y + sta.z display_chip_line.c + // [2061] call display_chip_line + // [2615] phi from display_print_chip to display_chip_line [phi:display_print_chip->display_chip_line] + // [2615] phi display_chip_line::c#15 = display_chip_line::c#0 [phi:display_print_chip->display_chip_line#0] -- register_copy + // [2615] phi display_chip_line::w#10 = display_chip_line::w#0 [phi:display_print_chip->display_chip_line#1] -- register_copy + // [2615] phi display_chip_line::y#16 = 3+2 [phi:display_print_chip->display_chip_line#2] -- vbuz1=vbuc1 lda #3+2 - sta display_chip_line.y - // [2558] phi display_chip_line::x#16 = display_chip_line::x#0 [phi:display_print_chip->display_chip_line#3] -- register_copy + sta.z display_chip_line.y + // [2615] phi display_chip_line::x#16 = display_chip_line::x#0 [phi:display_print_chip->display_chip_line#3] -- register_copy jsr display_chip_line // display_print_chip::@1 // display_chip_line(x, y++, w, *text++); - // [2005] display_print_chip::text#0 = ++ display_print_chip::text#11 -- pbuz1=_inc_pbuz2 + // [2062] display_print_chip::text#0 = ++ display_print_chip::text#11 -- pbuz1=_inc_pbum2 clc - lda.z text_2 + lda text_2 adc #1 sta.z text - lda.z text_2+1 + lda text_2+1 adc #0 sta.z text+1 // display_chip_line(x, y++, w, *text++) - // [2006] display_chip_line::x#1 = display_print_chip::x#10 -- vbum1=vbuz2 + // [2063] display_chip_line::x#1 = display_print_chip::x#10 -- vbuz1=vbuz2 lda.z x - sta display_chip_line.x - // [2007] display_chip_line::w#1 = display_print_chip::w#10 -- vbuz1=vbuz2 + sta.z display_chip_line.x + // [2064] display_chip_line::w#1 = display_print_chip::w#10 -- vbuz1=vbuz2 lda.z w sta.z display_chip_line.w - // [2008] display_chip_line::c#1 = *display_print_chip::text#0 -- vbum1=_deref_pbuz2 + // [2065] display_chip_line::c#1 = *display_print_chip::text#0 -- vbuz1=_deref_pbuz2 ldy #0 lda (text),y - sta display_chip_line.c - // [2009] call display_chip_line - // [2558] phi from display_print_chip::@1 to display_chip_line [phi:display_print_chip::@1->display_chip_line] - // [2558] phi display_chip_line::c#15 = display_chip_line::c#1 [phi:display_print_chip::@1->display_chip_line#0] -- register_copy - // [2558] phi display_chip_line::w#10 = display_chip_line::w#1 [phi:display_print_chip::@1->display_chip_line#1] -- register_copy - // [2558] phi display_chip_line::y#16 = ++3+2 [phi:display_print_chip::@1->display_chip_line#2] -- vbum1=vbuc1 + sta.z display_chip_line.c + // [2066] call display_chip_line + // [2615] phi from display_print_chip::@1 to display_chip_line [phi:display_print_chip::@1->display_chip_line] + // [2615] phi display_chip_line::c#15 = display_chip_line::c#1 [phi:display_print_chip::@1->display_chip_line#0] -- register_copy + // [2615] phi display_chip_line::w#10 = display_chip_line::w#1 [phi:display_print_chip::@1->display_chip_line#1] -- register_copy + // [2615] phi display_chip_line::y#16 = ++3+2 [phi:display_print_chip::@1->display_chip_line#2] -- vbuz1=vbuc1 lda #3+2+1 - sta display_chip_line.y - // [2558] phi display_chip_line::x#16 = display_chip_line::x#1 [phi:display_print_chip::@1->display_chip_line#3] -- register_copy + sta.z display_chip_line.y + // [2615] phi display_chip_line::x#16 = display_chip_line::x#1 [phi:display_print_chip::@1->display_chip_line#3] -- register_copy jsr display_chip_line // display_print_chip::@2 // display_chip_line(x, y++, w, *text++); - // [2010] display_print_chip::text#1 = ++ display_print_chip::text#0 -- pbuz1=_inc_pbuz2 + // [2067] display_print_chip::text#1 = ++ display_print_chip::text#0 -- pbuz1=_inc_pbuz2 clc lda.z text adc #1 @@ -12660,92 +13558,96 @@ display_print_chip: { adc #0 sta.z text_1+1 // display_chip_line(x, y++, w, *text++) - // [2011] display_chip_line::x#2 = display_print_chip::x#10 -- vbum1=vbuz2 + // [2068] display_chip_line::x#2 = display_print_chip::x#10 -- vbuz1=vbuz2 lda.z x - sta display_chip_line.x - // [2012] display_chip_line::w#2 = display_print_chip::w#10 -- vbuz1=vbuz2 + sta.z display_chip_line.x + // [2069] display_chip_line::w#2 = display_print_chip::w#10 -- vbuz1=vbuz2 lda.z w sta.z display_chip_line.w - // [2013] display_chip_line::c#2 = *display_print_chip::text#1 -- vbum1=_deref_pbuz2 + // [2070] display_chip_line::c#2 = *display_print_chip::text#1 -- vbuz1=_deref_pbuz2 ldy #0 lda (text_1),y - sta display_chip_line.c - // [2014] call display_chip_line - // [2558] phi from display_print_chip::@2 to display_chip_line [phi:display_print_chip::@2->display_chip_line] - // [2558] phi display_chip_line::c#15 = display_chip_line::c#2 [phi:display_print_chip::@2->display_chip_line#0] -- register_copy - // [2558] phi display_chip_line::w#10 = display_chip_line::w#2 [phi:display_print_chip::@2->display_chip_line#1] -- register_copy - // [2558] phi display_chip_line::y#16 = ++++3+2 [phi:display_print_chip::@2->display_chip_line#2] -- vbum1=vbuc1 + sta.z display_chip_line.c + // [2071] call display_chip_line + // [2615] phi from display_print_chip::@2 to display_chip_line [phi:display_print_chip::@2->display_chip_line] + // [2615] phi display_chip_line::c#15 = display_chip_line::c#2 [phi:display_print_chip::@2->display_chip_line#0] -- register_copy + // [2615] phi display_chip_line::w#10 = display_chip_line::w#2 [phi:display_print_chip::@2->display_chip_line#1] -- register_copy + // [2615] phi display_chip_line::y#16 = ++++3+2 [phi:display_print_chip::@2->display_chip_line#2] -- vbuz1=vbuc1 lda #3+2+1+1 - sta display_chip_line.y - // [2558] phi display_chip_line::x#16 = display_chip_line::x#2 [phi:display_print_chip::@2->display_chip_line#3] -- register_copy + sta.z display_chip_line.y + // [2615] phi display_chip_line::x#16 = display_chip_line::x#2 [phi:display_print_chip::@2->display_chip_line#3] -- register_copy jsr display_chip_line // display_print_chip::@3 // display_chip_line(x, y++, w, *text++); - // [2015] display_print_chip::text#15 = ++ display_print_chip::text#1 -- pbuz1=_inc_pbuz2 + // [2072] display_print_chip::text#15 = ++ display_print_chip::text#1 -- pbum1=_inc_pbuz2 clc lda.z text_1 adc #1 - sta.z text_3 + sta text_3 lda.z text_1+1 adc #0 - sta.z text_3+1 + sta text_3+1 // display_chip_line(x, y++, w, *text++) - // [2016] display_chip_line::x#3 = display_print_chip::x#10 -- vbum1=vbuz2 + // [2073] display_chip_line::x#3 = display_print_chip::x#10 -- vbuz1=vbuz2 lda.z x - sta display_chip_line.x - // [2017] display_chip_line::w#3 = display_print_chip::w#10 -- vbuz1=vbuz2 + sta.z display_chip_line.x + // [2074] display_chip_line::w#3 = display_print_chip::w#10 -- vbuz1=vbuz2 lda.z w sta.z display_chip_line.w - // [2018] display_chip_line::c#3 = *display_print_chip::text#15 -- vbum1=_deref_pbuz2 + // [2075] display_chip_line::c#3 = *display_print_chip::text#15 -- vbuz1=_deref_pbum2 + ldy text_3 + sty.z $fe + ldy text_3+1 + sty.z $ff ldy #0 - lda (text_3),y - sta display_chip_line.c - // [2019] call display_chip_line - // [2558] phi from display_print_chip::@3 to display_chip_line [phi:display_print_chip::@3->display_chip_line] - // [2558] phi display_chip_line::c#15 = display_chip_line::c#3 [phi:display_print_chip::@3->display_chip_line#0] -- register_copy - // [2558] phi display_chip_line::w#10 = display_chip_line::w#3 [phi:display_print_chip::@3->display_chip_line#1] -- register_copy - // [2558] phi display_chip_line::y#16 = ++++++3+2 [phi:display_print_chip::@3->display_chip_line#2] -- vbum1=vbuc1 + lda ($fe),y + sta.z display_chip_line.c + // [2076] call display_chip_line + // [2615] phi from display_print_chip::@3 to display_chip_line [phi:display_print_chip::@3->display_chip_line] + // [2615] phi display_chip_line::c#15 = display_chip_line::c#3 [phi:display_print_chip::@3->display_chip_line#0] -- register_copy + // [2615] phi display_chip_line::w#10 = display_chip_line::w#3 [phi:display_print_chip::@3->display_chip_line#1] -- register_copy + // [2615] phi display_chip_line::y#16 = ++++++3+2 [phi:display_print_chip::@3->display_chip_line#2] -- vbuz1=vbuc1 lda #3+2+1+1+1 - sta display_chip_line.y - // [2558] phi display_chip_line::x#16 = display_chip_line::x#3 [phi:display_print_chip::@3->display_chip_line#3] -- register_copy + sta.z display_chip_line.y + // [2615] phi display_chip_line::x#16 = display_chip_line::x#3 [phi:display_print_chip::@3->display_chip_line#3] -- register_copy jsr display_chip_line // display_print_chip::@4 // display_chip_line(x, y++, w, *text++); - // [2020] display_print_chip::text#16 = ++ display_print_chip::text#15 -- pbum1=_inc_pbuz2 + // [2077] display_print_chip::text#16 = ++ display_print_chip::text#15 -- pbum1=_inc_pbum2 clc - lda.z text_3 + lda text_3 adc #1 sta text_4 - lda.z text_3+1 + lda text_3+1 adc #0 sta text_4+1 // display_chip_line(x, y++, w, *text++) - // [2021] display_chip_line::x#4 = display_print_chip::x#10 -- vbum1=vbuz2 + // [2078] display_chip_line::x#4 = display_print_chip::x#10 -- vbuz1=vbuz2 lda.z x - sta display_chip_line.x - // [2022] display_chip_line::w#4 = display_print_chip::w#10 -- vbuz1=vbuz2 + sta.z display_chip_line.x + // [2079] display_chip_line::w#4 = display_print_chip::w#10 -- vbuz1=vbuz2 lda.z w sta.z display_chip_line.w - // [2023] display_chip_line::c#4 = *display_print_chip::text#16 -- vbum1=_deref_pbum2 + // [2080] display_chip_line::c#4 = *display_print_chip::text#16 -- vbuz1=_deref_pbum2 ldy text_4 sty.z $fe ldy text_4+1 sty.z $ff ldy #0 lda ($fe),y - sta display_chip_line.c - // [2024] call display_chip_line - // [2558] phi from display_print_chip::@4 to display_chip_line [phi:display_print_chip::@4->display_chip_line] - // [2558] phi display_chip_line::c#15 = display_chip_line::c#4 [phi:display_print_chip::@4->display_chip_line#0] -- register_copy - // [2558] phi display_chip_line::w#10 = display_chip_line::w#4 [phi:display_print_chip::@4->display_chip_line#1] -- register_copy - // [2558] phi display_chip_line::y#16 = ++++++++3+2 [phi:display_print_chip::@4->display_chip_line#2] -- vbum1=vbuc1 + sta.z display_chip_line.c + // [2081] call display_chip_line + // [2615] phi from display_print_chip::@4 to display_chip_line [phi:display_print_chip::@4->display_chip_line] + // [2615] phi display_chip_line::c#15 = display_chip_line::c#4 [phi:display_print_chip::@4->display_chip_line#0] -- register_copy + // [2615] phi display_chip_line::w#10 = display_chip_line::w#4 [phi:display_print_chip::@4->display_chip_line#1] -- register_copy + // [2615] phi display_chip_line::y#16 = ++++++++3+2 [phi:display_print_chip::@4->display_chip_line#2] -- vbuz1=vbuc1 lda #3+2+1+1+1+1 - sta display_chip_line.y - // [2558] phi display_chip_line::x#16 = display_chip_line::x#4 [phi:display_print_chip::@4->display_chip_line#3] -- register_copy + sta.z display_chip_line.y + // [2615] phi display_chip_line::x#16 = display_chip_line::x#4 [phi:display_print_chip::@4->display_chip_line#3] -- register_copy jsr display_chip_line // display_print_chip::@5 // display_chip_line(x, y++, w, *text++); - // [2025] display_print_chip::text#17 = ++ display_print_chip::text#16 -- pbum1=_inc_pbum2 + // [2082] display_print_chip::text#17 = ++ display_print_chip::text#16 -- pbum1=_inc_pbum2 clc lda text_4 adc #1 @@ -12754,32 +13656,32 @@ display_print_chip: { adc #0 sta text_5+1 // display_chip_line(x, y++, w, *text++) - // [2026] display_chip_line::x#5 = display_print_chip::x#10 -- vbum1=vbuz2 + // [2083] display_chip_line::x#5 = display_print_chip::x#10 -- vbuz1=vbuz2 lda.z x - sta display_chip_line.x - // [2027] display_chip_line::w#5 = display_print_chip::w#10 -- vbuz1=vbuz2 + sta.z display_chip_line.x + // [2084] display_chip_line::w#5 = display_print_chip::w#10 -- vbuz1=vbuz2 lda.z w sta.z display_chip_line.w - // [2028] display_chip_line::c#5 = *display_print_chip::text#17 -- vbum1=_deref_pbum2 + // [2085] display_chip_line::c#5 = *display_print_chip::text#17 -- vbuz1=_deref_pbum2 ldy text_5 sty.z $fe ldy text_5+1 sty.z $ff ldy #0 lda ($fe),y - sta display_chip_line.c - // [2029] call display_chip_line - // [2558] phi from display_print_chip::@5 to display_chip_line [phi:display_print_chip::@5->display_chip_line] - // [2558] phi display_chip_line::c#15 = display_chip_line::c#5 [phi:display_print_chip::@5->display_chip_line#0] -- register_copy - // [2558] phi display_chip_line::w#10 = display_chip_line::w#5 [phi:display_print_chip::@5->display_chip_line#1] -- register_copy - // [2558] phi display_chip_line::y#16 = ++++++++++3+2 [phi:display_print_chip::@5->display_chip_line#2] -- vbum1=vbuc1 + sta.z display_chip_line.c + // [2086] call display_chip_line + // [2615] phi from display_print_chip::@5 to display_chip_line [phi:display_print_chip::@5->display_chip_line] + // [2615] phi display_chip_line::c#15 = display_chip_line::c#5 [phi:display_print_chip::@5->display_chip_line#0] -- register_copy + // [2615] phi display_chip_line::w#10 = display_chip_line::w#5 [phi:display_print_chip::@5->display_chip_line#1] -- register_copy + // [2615] phi display_chip_line::y#16 = ++++++++++3+2 [phi:display_print_chip::@5->display_chip_line#2] -- vbuz1=vbuc1 lda #3+2+1+1+1+1+1 - sta display_chip_line.y - // [2558] phi display_chip_line::x#16 = display_chip_line::x#5 [phi:display_print_chip::@5->display_chip_line#3] -- register_copy + sta.z display_chip_line.y + // [2615] phi display_chip_line::x#16 = display_chip_line::x#5 [phi:display_print_chip::@5->display_chip_line#3] -- register_copy jsr display_chip_line // display_print_chip::@6 // display_chip_line(x, y++, w, *text++); - // [2030] display_print_chip::text#18 = ++ display_print_chip::text#17 -- pbuz1=_inc_pbum2 + // [2087] display_print_chip::text#18 = ++ display_print_chip::text#17 -- pbuz1=_inc_pbum2 clc lda text_5 adc #1 @@ -12788,66 +13690,67 @@ display_print_chip: { adc #0 sta.z text_6+1 // display_chip_line(x, y++, w, *text++) - // [2031] display_chip_line::x#6 = display_print_chip::x#10 -- vbum1=vbuz2 + // [2088] display_chip_line::x#6 = display_print_chip::x#10 -- vbuz1=vbuz2 lda.z x - sta display_chip_line.x - // [2032] display_chip_line::w#6 = display_print_chip::w#10 -- vbuz1=vbuz2 + sta.z display_chip_line.x + // [2089] display_chip_line::w#6 = display_print_chip::w#10 -- vbuz1=vbuz2 lda.z w sta.z display_chip_line.w - // [2033] display_chip_line::c#6 = *display_print_chip::text#18 -- vbum1=_deref_pbuz2 + // [2090] display_chip_line::c#6 = *display_print_chip::text#18 -- vbuz1=_deref_pbuz2 ldy #0 lda (text_6),y - sta display_chip_line.c - // [2034] call display_chip_line - // [2558] phi from display_print_chip::@6 to display_chip_line [phi:display_print_chip::@6->display_chip_line] - // [2558] phi display_chip_line::c#15 = display_chip_line::c#6 [phi:display_print_chip::@6->display_chip_line#0] -- register_copy - // [2558] phi display_chip_line::w#10 = display_chip_line::w#6 [phi:display_print_chip::@6->display_chip_line#1] -- register_copy - // [2558] phi display_chip_line::y#16 = ++++++++++++3+2 [phi:display_print_chip::@6->display_chip_line#2] -- vbum1=vbuc1 + sta.z display_chip_line.c + // [2091] call display_chip_line + // [2615] phi from display_print_chip::@6 to display_chip_line [phi:display_print_chip::@6->display_chip_line] + // [2615] phi display_chip_line::c#15 = display_chip_line::c#6 [phi:display_print_chip::@6->display_chip_line#0] -- register_copy + // [2615] phi display_chip_line::w#10 = display_chip_line::w#6 [phi:display_print_chip::@6->display_chip_line#1] -- register_copy + // [2615] phi display_chip_line::y#16 = ++++++++++++3+2 [phi:display_print_chip::@6->display_chip_line#2] -- vbuz1=vbuc1 lda #3+2+1+1+1+1+1+1 - sta display_chip_line.y - // [2558] phi display_chip_line::x#16 = display_chip_line::x#6 [phi:display_print_chip::@6->display_chip_line#3] -- register_copy + sta.z display_chip_line.y + // [2615] phi display_chip_line::x#16 = display_chip_line::x#6 [phi:display_print_chip::@6->display_chip_line#3] -- register_copy jsr display_chip_line // display_print_chip::@7 // display_chip_line(x, y++, w, *text++); - // [2035] display_print_chip::text#19 = ++ display_print_chip::text#18 -- pbuz1=_inc_pbuz1 + // [2092] display_print_chip::text#19 = ++ display_print_chip::text#18 -- pbuz1=_inc_pbuz1 inc.z text_6 bne !+ inc.z text_6+1 !: // display_chip_line(x, y++, w, *text++) - // [2036] display_chip_line::x#7 = display_print_chip::x#10 -- vbum1=vbuz2 + // [2093] display_chip_line::x#7 = display_print_chip::x#10 -- vbuz1=vbuz2 lda.z x - sta display_chip_line.x - // [2037] display_chip_line::w#7 = display_print_chip::w#10 -- vbuz1=vbuz2 + sta.z display_chip_line.x + // [2094] display_chip_line::w#7 = display_print_chip::w#10 -- vbuz1=vbuz2 lda.z w sta.z display_chip_line.w - // [2038] display_chip_line::c#7 = *display_print_chip::text#19 -- vbum1=_deref_pbuz2 + // [2095] display_chip_line::c#7 = *display_print_chip::text#19 -- vbuz1=_deref_pbuz2 ldy #0 lda (text_6),y - sta display_chip_line.c - // [2039] call display_chip_line - // [2558] phi from display_print_chip::@7 to display_chip_line [phi:display_print_chip::@7->display_chip_line] - // [2558] phi display_chip_line::c#15 = display_chip_line::c#7 [phi:display_print_chip::@7->display_chip_line#0] -- register_copy - // [2558] phi display_chip_line::w#10 = display_chip_line::w#7 [phi:display_print_chip::@7->display_chip_line#1] -- register_copy - // [2558] phi display_chip_line::y#16 = ++++++++++++++3+2 [phi:display_print_chip::@7->display_chip_line#2] -- vbum1=vbuc1 + sta.z display_chip_line.c + // [2096] call display_chip_line + // [2615] phi from display_print_chip::@7 to display_chip_line [phi:display_print_chip::@7->display_chip_line] + // [2615] phi display_chip_line::c#15 = display_chip_line::c#7 [phi:display_print_chip::@7->display_chip_line#0] -- register_copy + // [2615] phi display_chip_line::w#10 = display_chip_line::w#7 [phi:display_print_chip::@7->display_chip_line#1] -- register_copy + // [2615] phi display_chip_line::y#16 = ++++++++++++++3+2 [phi:display_print_chip::@7->display_chip_line#2] -- vbuz1=vbuc1 lda #3+2+1+1+1+1+1+1+1 - sta display_chip_line.y - // [2558] phi display_chip_line::x#16 = display_chip_line::x#7 [phi:display_print_chip::@7->display_chip_line#3] -- register_copy + sta.z display_chip_line.y + // [2615] phi display_chip_line::x#16 = display_chip_line::x#7 [phi:display_print_chip::@7->display_chip_line#3] -- register_copy jsr display_chip_line // display_print_chip::@8 // display_chip_end(x, y++, w) - // [2040] display_chip_end::x#0 = display_print_chip::x#10 -- vbuxx=vbuz1 - ldx.z x - // [2041] display_chip_end::w#0 = display_print_chip::w#10 -- vbuz1=vbuz2 + // [2097] display_chip_end::x#0 = display_print_chip::x#10 + // [2098] display_chip_end::w#0 = display_print_chip::w#10 -- vbuz1=vbuz2 lda.z w sta.z display_chip_end.w - // [2042] call display_chip_end + // [2099] call display_chip_end jsr display_chip_end // display_print_chip::@return // } - // [2043] return + // [2100] return rts .segment Data + .label text_2 = strcat.src + .label text_3 = fopen.fopen__28 .label text_4 = fopen.fopen__11 .label text_5 = ferror.return } @@ -12858,65 +13761,64 @@ display_print_chip: { * * @param c Led color */ -// void display_vera_led(__mem() char c) +// void display_vera_led(__zp($71) char c) display_vera_led: { + .label c = $71 // display_chip_led(CHIP_VERA_X+1, CHIP_VERA_Y, CHIP_VERA_W, c, BLUE) - // [2045] display_chip_led::tc#1 = display_vera_led::c#2 -- vbuxx=vbum1 - ldx c - // [2046] call display_chip_led - // [2540] phi from display_vera_led to display_chip_led [phi:display_vera_led->display_chip_led] - // [2540] phi display_chip_led::w#7 = 8 [phi:display_vera_led->display_chip_led#0] -- vbuz1=vbuc1 + // [2102] display_chip_led::tc#1 = display_vera_led::c#2 -- vbuz1=vbuz2 + lda.z c + sta.z display_chip_led.tc + // [2103] call display_chip_led + // [2597] phi from display_vera_led to display_chip_led [phi:display_vera_led->display_chip_led] + // [2597] phi display_chip_led::w#7 = 8 [phi:display_vera_led->display_chip_led#0] -- vbuz1=vbuc1 lda #8 sta.z display_chip_led.w - // [2540] phi display_chip_led::x#7 = 9+1 [phi:display_vera_led->display_chip_led#1] -- vbuz1=vbuc1 + // [2597] phi display_chip_led::x#7 = 9+1 [phi:display_vera_led->display_chip_led#1] -- vbuz1=vbuc1 lda #9+1 sta.z display_chip_led.x - // [2540] phi display_chip_led::tc#3 = display_chip_led::tc#1 [phi:display_vera_led->display_chip_led#2] -- register_copy + // [2597] phi display_chip_led::tc#3 = display_chip_led::tc#1 [phi:display_vera_led->display_chip_led#2] -- register_copy jsr display_chip_led // display_vera_led::@1 // display_info_led(INFO_X-2, INFO_Y+1, c, BLUE) - // [2047] display_info_led::tc#1 = display_vera_led::c#2 -- vbuxx=vbum1 - ldx c - // [2048] call display_info_led - // [1757] phi from display_vera_led::@1 to display_info_led [phi:display_vera_led::@1->display_info_led] - // [1757] phi display_info_led::y#4 = $11+1 [phi:display_vera_led::@1->display_info_led#0] -- vbuz1=vbuc1 + // [2104] display_info_led::tc#1 = display_vera_led::c#2 -- vbuz1=vbuz2 + lda.z c + sta.z display_info_led.tc + // [2105] call display_info_led + // [1814] phi from display_vera_led::@1 to display_info_led [phi:display_vera_led::@1->display_info_led] + // [1814] phi display_info_led::y#4 = $11+1 [phi:display_vera_led::@1->display_info_led#0] -- vbuz1=vbuc1 lda #$11+1 sta.z display_info_led.y - // [1757] phi display_info_led::x#4 = 4-2 [phi:display_vera_led::@1->display_info_led#1] -- vbuyy=vbuc1 - ldy #4-2 - // [1757] phi display_info_led::tc#4 = display_info_led::tc#1 [phi:display_vera_led::@1->display_info_led#2] -- register_copy + // [1814] phi display_info_led::x#4 = 4-2 [phi:display_vera_led::@1->display_info_led#1] -- vbuz1=vbuc1 + lda #4-2 + sta.z display_info_led.x + // [1814] phi display_info_led::tc#4 = display_info_led::tc#1 [phi:display_vera_led::@1->display_info_led#2] -- register_copy jsr display_info_led // display_vera_led::@return // } - // [2049] return + // [2106] return rts - .segment Data - .label c = main.check_status_smc7_return } -.segment Code // strcat // Concatenates the C string pointed by source into the array pointed by destination, including the terminating null character (and stopping at that point). -// char * strcat(char *destination, __zp($e5) char *source) +// char * strcat(char *destination, __mem() char *source) strcat: { - .label strcat__0 = $43 - .label dst = $43 - .label src = $e5 - .label source = $e5 + .label strcat__0 = $55 + .label dst = $55 // strlen(destination) - // [2051] call strlen - // [2323] phi from strcat to strlen [phi:strcat->strlen] - // [2323] phi strlen::str#8 = display_chip_rom::rom [phi:strcat->strlen#0] -- pbuz1=pbuc1 + // [2108] call strlen + // [2380] phi from strcat to strlen [phi:strcat->strlen] + // [2380] phi strlen::str#8 = display_chip_rom::rom [phi:strcat->strlen#0] -- pbuz1=pbuc1 lda #display_chip_rom.rom sta.z strlen.str+1 jsr strlen // strlen(destination) - // [2052] strlen::return#0 = strlen::len#2 + // [2109] strlen::return#0 = strlen::len#2 // strcat::@4 - // [2053] strcat::$0 = strlen::return#0 + // [2110] strcat::$0 = strlen::return#0 // char* dst = destination + strlen(destination) - // [2054] strcat::dst#0 = display_chip_rom::rom + strcat::$0 -- pbuz1=pbuc1_plus_vwuz1 + // [2111] strcat::dst#0 = display_chip_rom::rom + strcat::$0 -- pbuz1=pbuc1_plus_vwuz1 lda.z dst clc adc #display_chip_rom.rom sta.z dst+1 - // [2055] phi from strcat::@2 strcat::@4 to strcat::@1 [phi:strcat::@2/strcat::@4->strcat::@1] - // [2055] phi strcat::dst#2 = strcat::dst#1 [phi:strcat::@2/strcat::@4->strcat::@1#0] -- register_copy - // [2055] phi strcat::src#2 = strcat::src#1 [phi:strcat::@2/strcat::@4->strcat::@1#1] -- register_copy + // [2112] phi from strcat::@2 strcat::@4 to strcat::@1 [phi:strcat::@2/strcat::@4->strcat::@1] + // [2112] phi strcat::dst#2 = strcat::dst#1 [phi:strcat::@2/strcat::@4->strcat::@1#0] -- register_copy + // [2112] phi strcat::src#2 = strcat::src#1 [phi:strcat::@2/strcat::@4->strcat::@1#1] -- register_copy // strcat::@1 __b1: // while(*src) - // [2056] if(0!=*strcat::src#2) goto strcat::@2 -- 0_neq__deref_pbuz1_then_la1 + // [2113] if(0!=*strcat::src#2) goto strcat::@2 -- 0_neq__deref_pbum1_then_la1 + ldy src + sty.z $fe + ldy src+1 + sty.z $ff ldy #0 - lda (src),y + lda ($fe),y cmp #0 bne __b2 // strcat::@3 // *dst = 0 - // [2057] *strcat::dst#2 = 0 -- _deref_pbuz1=vbuc1 + // [2114] *strcat::dst#2 = 0 -- _deref_pbuz1=vbuc1 tya tay sta (dst),y // strcat::@return // } - // [2058] return + // [2115] return rts // strcat::@2 __b2: // *dst++ = *src++ - // [2059] *strcat::dst#2 = *strcat::src#2 -- _deref_pbuz1=_deref_pbuz2 + // [2116] *strcat::dst#2 = *strcat::src#2 -- _deref_pbuz1=_deref_pbum2 + ldy src + sty.z $fe + ldy src+1 + sty.z $ff ldy #0 - lda (src),y + lda ($fe),y sta (dst),y // *dst++ = *src++; - // [2060] strcat::dst#1 = ++ strcat::dst#2 -- pbuz1=_inc_pbuz1 + // [2117] strcat::dst#1 = ++ strcat::dst#2 -- pbuz1=_inc_pbuz1 inc.z dst bne !+ inc.z dst+1 !: - // [2061] strcat::src#1 = ++ strcat::src#2 -- pbuz1=_inc_pbuz1 - inc.z src + // [2118] strcat::src#1 = ++ strcat::src#2 -- pbum1=_inc_pbum1 + inc src bne !+ - inc.z src+1 + inc src+1 !: jmp __b1 + .segment Data + src: .word 0 + .label source = src } +.segment Code // display_rom_led /** * @brief Print ROM led above the ROM chip. @@ -12972,83 +13886,64 @@ strcat: { * @param chip ROM chip number (0 is main rom chip of CX16) * @param c Led color */ -// void display_rom_led(__zp($da) char chip, __zp($dc) char c) +// void display_rom_led(__zp($c1) char chip, __zp($67) char c) display_rom_led: { - .label chip = $da - .label c = $dc + .label display_rom_led__0 = $36 + .label chip = $c1 + .label c = $67 + .label display_rom_led__7 = $36 + .label display_rom_led__8 = $36 // chip*6 - // [2063] display_rom_led::$7 = display_rom_led::chip#2 << 1 -- vbuaa=vbuz1_rol_1 + // [2120] display_rom_led::$7 = display_rom_led::chip#2 << 1 -- vbuz1=vbuz2_rol_1 lda.z chip asl - // [2064] display_rom_led::$8 = display_rom_led::$7 + display_rom_led::chip#2 -- vbuaa=vbuaa_plus_vbuz1 + sta.z display_rom_led__7 + // [2121] display_rom_led::$8 = display_rom_led::$7 + display_rom_led::chip#2 -- vbuz1=vbuz1_plus_vbuz2 + lda.z display_rom_led__8 clc adc.z chip + sta.z display_rom_led__8 // CHIP_ROM_X+chip*6 - // [2065] display_rom_led::$0 = display_rom_led::$8 << 1 -- vbuaa=vbuaa_rol_1 - asl + // [2122] display_rom_led::$0 = display_rom_led::$8 << 1 -- vbuz1=vbuz1_rol_1 + asl.z display_rom_led__0 // display_chip_led(CHIP_ROM_X+chip*6+1, CHIP_ROM_Y, CHIP_ROM_W, c, BLUE) - // [2066] display_chip_led::x#3 = display_rom_led::$0 + $14+1 -- vbuz1=vbuaa_plus_vbuc1 + // [2123] display_chip_led::x#3 = display_rom_led::$0 + $14+1 -- vbuz1=vbuz1_plus_vbuc1 + lda #$14+1 clc - adc #$14+1 + adc.z display_chip_led.x sta.z display_chip_led.x - // [2067] display_chip_led::tc#2 = display_rom_led::c#2 -- vbuxx=vbuz1 - ldx.z c - // [2068] call display_chip_led - // [2540] phi from display_rom_led to display_chip_led [phi:display_rom_led->display_chip_led] - // [2540] phi display_chip_led::w#7 = 3 [phi:display_rom_led->display_chip_led#0] -- vbuz1=vbuc1 + // [2124] display_chip_led::tc#2 = display_rom_led::c#2 -- vbuz1=vbuz2 + lda.z c + sta.z display_chip_led.tc + // [2125] call display_chip_led + // [2597] phi from display_rom_led to display_chip_led [phi:display_rom_led->display_chip_led] + // [2597] phi display_chip_led::w#7 = 3 [phi:display_rom_led->display_chip_led#0] -- vbuz1=vbuc1 lda #3 sta.z display_chip_led.w - // [2540] phi display_chip_led::x#7 = display_chip_led::x#3 [phi:display_rom_led->display_chip_led#1] -- register_copy - // [2540] phi display_chip_led::tc#3 = display_chip_led::tc#2 [phi:display_rom_led->display_chip_led#2] -- register_copy + // [2597] phi display_chip_led::x#7 = display_chip_led::x#3 [phi:display_rom_led->display_chip_led#1] -- register_copy + // [2597] phi display_chip_led::tc#3 = display_chip_led::tc#2 [phi:display_rom_led->display_chip_led#2] -- register_copy jsr display_chip_led // display_rom_led::@1 // display_info_led(INFO_X-2, INFO_Y+chip+2, c, BLUE) - // [2069] display_info_led::y#2 = display_rom_led::chip#2 + $11+2 -- vbuz1=vbuz2_plus_vbuc1 + // [2126] display_info_led::y#2 = display_rom_led::chip#2 + $11+2 -- vbuz1=vbuz2_plus_vbuc1 lda #$11+2 clc adc.z chip sta.z display_info_led.y - // [2070] display_info_led::tc#2 = display_rom_led::c#2 -- vbuxx=vbuz1 - ldx.z c - // [2071] call display_info_led - // [1757] phi from display_rom_led::@1 to display_info_led [phi:display_rom_led::@1->display_info_led] - // [1757] phi display_info_led::y#4 = display_info_led::y#2 [phi:display_rom_led::@1->display_info_led#0] -- register_copy - // [1757] phi display_info_led::x#4 = 4-2 [phi:display_rom_led::@1->display_info_led#1] -- vbuyy=vbuc1 - ldy #4-2 - // [1757] phi display_info_led::tc#4 = display_info_led::tc#2 [phi:display_rom_led::@1->display_info_led#2] -- register_copy + // [2127] display_info_led::tc#2 = display_rom_led::c#2 -- vbuz1=vbuz2 + lda.z c + sta.z display_info_led.tc + // [2128] call display_info_led + // [1814] phi from display_rom_led::@1 to display_info_led [phi:display_rom_led::@1->display_info_led] + // [1814] phi display_info_led::y#4 = display_info_led::y#2 [phi:display_rom_led::@1->display_info_led#0] -- register_copy + // [1814] phi display_info_led::x#4 = 4-2 [phi:display_rom_led::@1->display_info_led#1] -- vbuz1=vbuc1 + lda #4-2 + sta.z display_info_led.x + // [1814] phi display_info_led::tc#4 = display_info_led::tc#2 [phi:display_rom_led::@1->display_info_led#2] -- register_copy jsr display_info_led // display_rom_led::@return // } - // [2072] return - rts -} - // display_progress_line -/** - * @brief Print one line of text in the progress frame at a line position. - * - * @param line The start line, counting from 0. - * @param text The text to be displayed. - */ -// void display_progress_line(__register(X) char line, __zp($29) char *text) -display_progress_line: { - .label text = $29 - // cputsxy(PROGRESS_X, PROGRESS_Y+line, text) - // [2073] cputsxy::y#0 = PROGRESS_Y + display_progress_line::line#0 -- vbuyy=vbuc1_plus_vbuxx - txa - clc - adc #PROGRESS_Y - tay - // [2074] cputsxy::s#0 = display_progress_line::text#0 - // [2075] call cputsxy - // [805] phi from display_progress_line to cputsxy [phi:display_progress_line->cputsxy] - // [805] phi cputsxy::s#4 = cputsxy::s#0 [phi:display_progress_line->cputsxy#0] -- register_copy - // [805] phi cputsxy::y#4 = cputsxy::y#0 [phi:display_progress_line->cputsxy#1] -- register_copy - // [805] phi cputsxy::x#4 = PROGRESS_X [phi:display_progress_line->cputsxy#2] -- vbuxx=vbuc1 - ldx #PROGRESS_X - jsr cputsxy - // display_progress_line::@return - // } - // [2076] return + // [2129] return rts } // utoa @@ -13057,139 +13952,149 @@ display_progress_line: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// void utoa(__zp($29) unsigned int value, __zp($43) char *buffer, __register(X) char radix) +// void utoa(__zp($2d) unsigned int value, __zp($5d) char *buffer, __zp($35) char radix) utoa: { - .label digit_value = $36 - .label buffer = $43 - .label digit = $51 - .label value = $29 - .label max_digits = $78 - .label digit_values = $76 + .label utoa__4 = $6d + .label utoa__10 = $69 + .label utoa__11 = $e4 + .label digit_value = $44 + .label buffer = $5d + .label digit = $68 + .label value = $2d + .label radix = $35 + .label started = $73 + .label max_digits = $c0 + .label digit_values = $55 // if(radix==DECIMAL) - // [2077] if(utoa::radix#0==DECIMAL) goto utoa::@1 -- vbuxx_eq_vbuc1_then_la1 - cpx #DECIMAL + // [2130] if(utoa::radix#0==DECIMAL) goto utoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #DECIMAL + cmp.z radix beq __b2 // utoa::@2 // if(radix==HEXADECIMAL) - // [2078] if(utoa::radix#0==HEXADECIMAL) goto utoa::@1 -- vbuxx_eq_vbuc1_then_la1 - cpx #HEXADECIMAL + // [2131] if(utoa::radix#0==HEXADECIMAL) goto utoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #HEXADECIMAL + cmp.z radix beq __b3 // utoa::@3 // if(radix==OCTAL) - // [2079] if(utoa::radix#0==OCTAL) goto utoa::@1 -- vbuxx_eq_vbuc1_then_la1 - cpx #OCTAL + // [2132] if(utoa::radix#0==OCTAL) goto utoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #OCTAL + cmp.z radix beq __b4 // utoa::@4 // if(radix==BINARY) - // [2080] if(utoa::radix#0==BINARY) goto utoa::@1 -- vbuxx_eq_vbuc1_then_la1 - cpx #BINARY + // [2133] if(utoa::radix#0==BINARY) goto utoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #BINARY + cmp.z radix beq __b5 // utoa::@5 // *buffer++ = 'e' - // [2081] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS) = 'e' -- _deref_pbuc1=vbuc2 + // [2134] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS) = 'e' -- _deref_pbuc1=vbuc2 // Unknown radix lda #'e' sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS // *buffer++ = 'r' - // [2082] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+1) = 'r' -- _deref_pbuc1=vbuc2 + // [2135] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+1) = 'r' -- _deref_pbuc1=vbuc2 lda #'r' sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+1 - // [2083] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+2) = 'r' -- _deref_pbuc1=vbuc2 + // [2136] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+2) = 'r' -- _deref_pbuc1=vbuc2 sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+2 // *buffer = 0 - // [2084] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+3) = 0 -- _deref_pbuc1=vbuc2 + // [2137] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+3) = 0 -- _deref_pbuc1=vbuc2 lda #0 sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+3 // utoa::@return // } - // [2085] return + // [2138] return rts - // [2086] phi from utoa to utoa::@1 [phi:utoa->utoa::@1] + // [2139] phi from utoa to utoa::@1 [phi:utoa->utoa::@1] __b2: - // [2086] phi utoa::digit_values#8 = RADIX_DECIMAL_VALUES [phi:utoa->utoa::@1#0] -- pwuz1=pwuc1 + // [2139] phi utoa::digit_values#8 = RADIX_DECIMAL_VALUES [phi:utoa->utoa::@1#0] -- pwuz1=pwuc1 lda #RADIX_DECIMAL_VALUES sta.z digit_values+1 - // [2086] phi utoa::max_digits#7 = 5 [phi:utoa->utoa::@1#1] -- vbuz1=vbuc1 + // [2139] phi utoa::max_digits#7 = 5 [phi:utoa->utoa::@1#1] -- vbuz1=vbuc1 lda #5 sta.z max_digits jmp __b1 - // [2086] phi from utoa::@2 to utoa::@1 [phi:utoa::@2->utoa::@1] + // [2139] phi from utoa::@2 to utoa::@1 [phi:utoa::@2->utoa::@1] __b3: - // [2086] phi utoa::digit_values#8 = RADIX_HEXADECIMAL_VALUES [phi:utoa::@2->utoa::@1#0] -- pwuz1=pwuc1 + // [2139] phi utoa::digit_values#8 = RADIX_HEXADECIMAL_VALUES [phi:utoa::@2->utoa::@1#0] -- pwuz1=pwuc1 lda #RADIX_HEXADECIMAL_VALUES sta.z digit_values+1 - // [2086] phi utoa::max_digits#7 = 4 [phi:utoa::@2->utoa::@1#1] -- vbuz1=vbuc1 + // [2139] phi utoa::max_digits#7 = 4 [phi:utoa::@2->utoa::@1#1] -- vbuz1=vbuc1 lda #4 sta.z max_digits jmp __b1 - // [2086] phi from utoa::@3 to utoa::@1 [phi:utoa::@3->utoa::@1] + // [2139] phi from utoa::@3 to utoa::@1 [phi:utoa::@3->utoa::@1] __b4: - // [2086] phi utoa::digit_values#8 = RADIX_OCTAL_VALUES [phi:utoa::@3->utoa::@1#0] -- pwuz1=pwuc1 + // [2139] phi utoa::digit_values#8 = RADIX_OCTAL_VALUES [phi:utoa::@3->utoa::@1#0] -- pwuz1=pwuc1 lda #RADIX_OCTAL_VALUES sta.z digit_values+1 - // [2086] phi utoa::max_digits#7 = 6 [phi:utoa::@3->utoa::@1#1] -- vbuz1=vbuc1 + // [2139] phi utoa::max_digits#7 = 6 [phi:utoa::@3->utoa::@1#1] -- vbuz1=vbuc1 lda #6 sta.z max_digits jmp __b1 - // [2086] phi from utoa::@4 to utoa::@1 [phi:utoa::@4->utoa::@1] + // [2139] phi from utoa::@4 to utoa::@1 [phi:utoa::@4->utoa::@1] __b5: - // [2086] phi utoa::digit_values#8 = RADIX_BINARY_VALUES [phi:utoa::@4->utoa::@1#0] -- pwuz1=pwuc1 + // [2139] phi utoa::digit_values#8 = RADIX_BINARY_VALUES [phi:utoa::@4->utoa::@1#0] -- pwuz1=pwuc1 lda #RADIX_BINARY_VALUES sta.z digit_values+1 - // [2086] phi utoa::max_digits#7 = $10 [phi:utoa::@4->utoa::@1#1] -- vbuz1=vbuc1 + // [2139] phi utoa::max_digits#7 = $10 [phi:utoa::@4->utoa::@1#1] -- vbuz1=vbuc1 lda #$10 sta.z max_digits // utoa::@1 __b1: - // [2087] phi from utoa::@1 to utoa::@6 [phi:utoa::@1->utoa::@6] - // [2087] phi utoa::buffer#11 = (char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:utoa::@1->utoa::@6#0] -- pbuz1=pbuc1 + // [2140] phi from utoa::@1 to utoa::@6 [phi:utoa::@1->utoa::@6] + // [2140] phi utoa::buffer#11 = (char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:utoa::@1->utoa::@6#0] -- pbuz1=pbuc1 lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS sta.z buffer+1 - // [2087] phi utoa::started#2 = 0 [phi:utoa::@1->utoa::@6#1] -- vbuxx=vbuc1 - ldx #0 - // [2087] phi utoa::value#2 = utoa::value#1 [phi:utoa::@1->utoa::@6#2] -- register_copy - // [2087] phi utoa::digit#2 = 0 [phi:utoa::@1->utoa::@6#3] -- vbuz1=vbuc1 - txa + // [2140] phi utoa::started#2 = 0 [phi:utoa::@1->utoa::@6#1] -- vbuz1=vbuc1 + lda #0 + sta.z started + // [2140] phi utoa::value#2 = utoa::value#1 [phi:utoa::@1->utoa::@6#2] -- register_copy + // [2140] phi utoa::digit#2 = 0 [phi:utoa::@1->utoa::@6#3] -- vbuz1=vbuc1 sta.z digit // utoa::@6 __b6: // max_digits-1 - // [2088] utoa::$4 = utoa::max_digits#7 - 1 -- vbuaa=vbuz1_minus_1 - lda.z max_digits - sec - sbc #1 + // [2141] utoa::$4 = utoa::max_digits#7 - 1 -- vbuz1=vbuz2_minus_1 + ldx.z max_digits + dex + stx.z utoa__4 // for( char digit=0; digit= digit_value) - // [2096] if(0!=utoa::started#2) goto utoa::@10 -- 0_neq_vbuxx_then_la1 - cpx #0 + // [2149] if(0!=utoa::started#2) goto utoa::@10 -- 0_neq_vbuz1_then_la1 + lda.z started bne __b10 // utoa::@12 - // [2097] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@10 -- vwuz1_ge_vwuz2_then_la1 + // [2150] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@10 -- vwuz1_ge_vwuz2_then_la1 + lda.z digit_value+1 cmp.z value+1 bne !+ lda.z digit_value @@ -13220,126 +14127,129 @@ utoa: { beq __b10 !: bcc __b10 - // [2098] phi from utoa::@12 to utoa::@9 [phi:utoa::@12->utoa::@9] - // [2098] phi utoa::buffer#14 = utoa::buffer#11 [phi:utoa::@12->utoa::@9#0] -- register_copy - // [2098] phi utoa::started#4 = utoa::started#2 [phi:utoa::@12->utoa::@9#1] -- register_copy - // [2098] phi utoa::value#6 = utoa::value#2 [phi:utoa::@12->utoa::@9#2] -- register_copy + // [2151] phi from utoa::@12 to utoa::@9 [phi:utoa::@12->utoa::@9] + // [2151] phi utoa::buffer#14 = utoa::buffer#11 [phi:utoa::@12->utoa::@9#0] -- register_copy + // [2151] phi utoa::started#4 = utoa::started#2 [phi:utoa::@12->utoa::@9#1] -- register_copy + // [2151] phi utoa::value#6 = utoa::value#2 [phi:utoa::@12->utoa::@9#2] -- register_copy // utoa::@9 __b9: // for( char digit=0; digitutoa::@6] - // [2087] phi utoa::buffer#11 = utoa::buffer#14 [phi:utoa::@9->utoa::@6#0] -- register_copy - // [2087] phi utoa::started#2 = utoa::started#4 [phi:utoa::@9->utoa::@6#1] -- register_copy - // [2087] phi utoa::value#2 = utoa::value#6 [phi:utoa::@9->utoa::@6#2] -- register_copy - // [2087] phi utoa::digit#2 = utoa::digit#1 [phi:utoa::@9->utoa::@6#3] -- register_copy + // [2140] phi from utoa::@9 to utoa::@6 [phi:utoa::@9->utoa::@6] + // [2140] phi utoa::buffer#11 = utoa::buffer#14 [phi:utoa::@9->utoa::@6#0] -- register_copy + // [2140] phi utoa::started#2 = utoa::started#4 [phi:utoa::@9->utoa::@6#1] -- register_copy + // [2140] phi utoa::value#2 = utoa::value#6 [phi:utoa::@9->utoa::@6#2] -- register_copy + // [2140] phi utoa::digit#2 = utoa::digit#1 [phi:utoa::@9->utoa::@6#3] -- register_copy jmp __b6 // utoa::@10 __b10: // utoa_append(buffer++, value, digit_value) - // [2100] utoa_append::buffer#0 = utoa::buffer#11 -- pbuz1=pbuz2 + // [2153] utoa_append::buffer#0 = utoa::buffer#11 -- pbuz1=pbuz2 lda.z buffer sta.z utoa_append.buffer lda.z buffer+1 sta.z utoa_append.buffer+1 - // [2101] utoa_append::value#0 = utoa::value#2 - // [2102] utoa_append::sub#0 = utoa::digit_value#0 - // [2103] call utoa_append - // [2619] phi from utoa::@10 to utoa_append [phi:utoa::@10->utoa_append] + // [2154] utoa_append::value#0 = utoa::value#2 + // [2155] utoa_append::sub#0 = utoa::digit_value#0 + // [2156] call utoa_append + // [2676] phi from utoa::@10 to utoa_append [phi:utoa::@10->utoa_append] jsr utoa_append // utoa_append(buffer++, value, digit_value) - // [2104] utoa_append::return#0 = utoa_append::value#2 + // [2157] utoa_append::return#0 = utoa_append::value#2 // utoa::@11 // value = utoa_append(buffer++, value, digit_value) - // [2105] utoa::value#0 = utoa_append::return#0 + // [2158] utoa::value#0 = utoa_append::return#0 // value = utoa_append(buffer++, value, digit_value); - // [2106] utoa::buffer#4 = ++ utoa::buffer#11 -- pbuz1=_inc_pbuz1 + // [2159] utoa::buffer#4 = ++ utoa::buffer#11 -- pbuz1=_inc_pbuz1 inc.z buffer bne !+ inc.z buffer+1 !: - // [2098] phi from utoa::@11 to utoa::@9 [phi:utoa::@11->utoa::@9] - // [2098] phi utoa::buffer#14 = utoa::buffer#4 [phi:utoa::@11->utoa::@9#0] -- register_copy - // [2098] phi utoa::started#4 = 1 [phi:utoa::@11->utoa::@9#1] -- vbuxx=vbuc1 - ldx #1 - // [2098] phi utoa::value#6 = utoa::value#0 [phi:utoa::@11->utoa::@9#2] -- register_copy + // [2151] phi from utoa::@11 to utoa::@9 [phi:utoa::@11->utoa::@9] + // [2151] phi utoa::buffer#14 = utoa::buffer#4 [phi:utoa::@11->utoa::@9#0] -- register_copy + // [2151] phi utoa::started#4 = 1 [phi:utoa::@11->utoa::@9#1] -- vbuz1=vbuc1 + lda #1 + sta.z started + // [2151] phi utoa::value#6 = utoa::value#0 [phi:utoa::@11->utoa::@9#2] -- register_copy jmp __b9 } // printf_number_buffer // Print the contents of the number buffer using a specific format. // This handles minimum length, zero-filling, and left/right justification from the format -// void printf_number_buffer(__zp($b7) void (*putc)(char), __zp($bf) char buffer_sign, char *buffer_digits, __register(X) char format_min_length, char format_justify_left, char format_sign_always, __zp($be) char format_zero_padding, char format_upper_case, char format_radix) +// void printf_number_buffer(__zp($4d) void (*putc)(char), __zp($e9) char buffer_sign, char *buffer_digits, __zp($e8) char format_min_length, char format_justify_left, char format_sign_always, __zp($e7) char format_zero_padding, char format_upper_case, char format_radix) printf_number_buffer: { - .label printf_number_buffer__19 = $43 - .label buffer_sign = $bf - .label format_zero_padding = $be - .label putc = $b7 - .label padding = $bc + .label printf_number_buffer__19 = $55 + .label buffer_sign = $e9 + .label format_min_length = $e8 + .label format_zero_padding = $e7 + .label putc = $4d + .label len = $df + .label padding = $df // if(format.min_length) - // [2108] if(0==printf_number_buffer::format_min_length#3) goto printf_number_buffer::@1 -- 0_eq_vbuxx_then_la1 - cpx #0 + // [2161] if(0==printf_number_buffer::format_min_length#3) goto printf_number_buffer::@1 -- 0_eq_vbuz1_then_la1 + lda.z format_min_length beq __b5 - // [2109] phi from printf_number_buffer to printf_number_buffer::@5 [phi:printf_number_buffer->printf_number_buffer::@5] + // [2162] phi from printf_number_buffer to printf_number_buffer::@5 [phi:printf_number_buffer->printf_number_buffer::@5] // printf_number_buffer::@5 // strlen(buffer.digits) - // [2110] call strlen - // [2323] phi from printf_number_buffer::@5 to strlen [phi:printf_number_buffer::@5->strlen] - // [2323] phi strlen::str#8 = (char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:printf_number_buffer::@5->strlen#0] -- pbuz1=pbuc1 + // [2163] call strlen + // [2380] phi from printf_number_buffer::@5 to strlen [phi:printf_number_buffer::@5->strlen] + // [2380] phi strlen::str#8 = (char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:printf_number_buffer::@5->strlen#0] -- pbuz1=pbuc1 lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS sta.z strlen.str+1 jsr strlen // strlen(buffer.digits) - // [2111] strlen::return#3 = strlen::len#2 + // [2164] strlen::return#3 = strlen::len#2 // printf_number_buffer::@11 - // [2112] printf_number_buffer::$19 = strlen::return#3 + // [2165] printf_number_buffer::$19 = strlen::return#3 // signed char len = (signed char)strlen(buffer.digits) - // [2113] printf_number_buffer::len#0 = (signed char)printf_number_buffer::$19 -- vbsyy=_sbyte_vwuz1 + // [2166] printf_number_buffer::len#0 = (signed char)printf_number_buffer::$19 -- vbsz1=_sbyte_vwuz2 // There is a minimum length - work out the padding - ldy.z printf_number_buffer__19 + lda.z printf_number_buffer__19 + sta.z len // if(buffer.sign) - // [2114] if(0==printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@10 -- 0_eq_vbuz1_then_la1 + // [2167] if(0==printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@10 -- 0_eq_vbuz1_then_la1 lda.z buffer_sign beq __b10 // printf_number_buffer::@6 // len++; - // [2115] printf_number_buffer::len#1 = ++ printf_number_buffer::len#0 -- vbsyy=_inc_vbsyy - iny - // [2116] phi from printf_number_buffer::@11 printf_number_buffer::@6 to printf_number_buffer::@10 [phi:printf_number_buffer::@11/printf_number_buffer::@6->printf_number_buffer::@10] - // [2116] phi printf_number_buffer::len#2 = printf_number_buffer::len#0 [phi:printf_number_buffer::@11/printf_number_buffer::@6->printf_number_buffer::@10#0] -- register_copy + // [2168] printf_number_buffer::len#1 = ++ printf_number_buffer::len#0 -- vbsz1=_inc_vbsz1 + inc.z len + // [2169] phi from printf_number_buffer::@11 printf_number_buffer::@6 to printf_number_buffer::@10 [phi:printf_number_buffer::@11/printf_number_buffer::@6->printf_number_buffer::@10] + // [2169] phi printf_number_buffer::len#2 = printf_number_buffer::len#0 [phi:printf_number_buffer::@11/printf_number_buffer::@6->printf_number_buffer::@10#0] -- register_copy // printf_number_buffer::@10 __b10: // padding = (signed char)format.min_length - len - // [2117] printf_number_buffer::padding#1 = (signed char)printf_number_buffer::format_min_length#3 - printf_number_buffer::len#2 -- vbsz1=vbsxx_minus_vbsyy - txa - sty.z $ff + // [2170] printf_number_buffer::padding#1 = (signed char)printf_number_buffer::format_min_length#3 - printf_number_buffer::len#2 -- vbsz1=vbsz2_minus_vbsz1 + lda.z format_min_length sec - sbc.z $ff + sbc.z padding sta.z padding // if(padding<0) - // [2118] if(printf_number_buffer::padding#1>=0) goto printf_number_buffer::@15 -- vbsz1_ge_0_then_la1 + // [2171] if(printf_number_buffer::padding#1>=0) goto printf_number_buffer::@15 -- vbsz1_ge_0_then_la1 cmp #0 bpl __b1 - // [2120] phi from printf_number_buffer printf_number_buffer::@10 to printf_number_buffer::@1 [phi:printf_number_buffer/printf_number_buffer::@10->printf_number_buffer::@1] + // [2173] phi from printf_number_buffer printf_number_buffer::@10 to printf_number_buffer::@1 [phi:printf_number_buffer/printf_number_buffer::@10->printf_number_buffer::@1] __b5: - // [2120] phi printf_number_buffer::padding#10 = 0 [phi:printf_number_buffer/printf_number_buffer::@10->printf_number_buffer::@1#0] -- vbsz1=vbsc1 + // [2173] phi printf_number_buffer::padding#10 = 0 [phi:printf_number_buffer/printf_number_buffer::@10->printf_number_buffer::@1#0] -- vbsz1=vbsc1 lda #0 sta.z padding - // [2119] phi from printf_number_buffer::@10 to printf_number_buffer::@15 [phi:printf_number_buffer::@10->printf_number_buffer::@15] + // [2172] phi from printf_number_buffer::@10 to printf_number_buffer::@15 [phi:printf_number_buffer::@10->printf_number_buffer::@15] // printf_number_buffer::@15 - // [2120] phi from printf_number_buffer::@15 to printf_number_buffer::@1 [phi:printf_number_buffer::@15->printf_number_buffer::@1] - // [2120] phi printf_number_buffer::padding#10 = printf_number_buffer::padding#1 [phi:printf_number_buffer::@15->printf_number_buffer::@1#0] -- register_copy + // [2173] phi from printf_number_buffer::@15 to printf_number_buffer::@1 [phi:printf_number_buffer::@15->printf_number_buffer::@1] + // [2173] phi printf_number_buffer::padding#10 = printf_number_buffer::padding#1 [phi:printf_number_buffer::@15->printf_number_buffer::@1#0] -- register_copy // printf_number_buffer::@1 __b1: // printf_number_buffer::@13 // if(!format.justify_left && !format.zero_padding && padding) - // [2121] if(0!=printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@2 -- 0_neq_vbuz1_then_la1 + // [2174] if(0!=printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@2 -- 0_neq_vbuz1_then_la1 lda.z format_zero_padding bne __b2 // printf_number_buffer::@12 - // [2122] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@7 -- 0_neq_vbsz1_then_la1 + // [2175] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@7 -- 0_neq_vbsz1_then_la1 lda.z padding cmp #0 bne __b7 @@ -13347,44 +14257,44 @@ printf_number_buffer: { // printf_number_buffer::@7 __b7: // printf_padding(putc, ' ',(char)padding) - // [2123] printf_padding::putc#0 = printf_number_buffer::putc#10 -- pprz1=pprz2 + // [2176] printf_padding::putc#0 = printf_number_buffer::putc#10 -- pprz1=pprz2 lda.z putc sta.z printf_padding.putc lda.z putc+1 sta.z printf_padding.putc+1 - // [2124] printf_padding::length#0 = (char)printf_number_buffer::padding#10 -- vbuz1=vbuz2 + // [2177] printf_padding::length#0 = (char)printf_number_buffer::padding#10 -- vbuz1=vbuz2 lda.z padding sta.z printf_padding.length - // [2125] call printf_padding - // [2329] phi from printf_number_buffer::@7 to printf_padding [phi:printf_number_buffer::@7->printf_padding] - // [2329] phi printf_padding::putc#7 = printf_padding::putc#0 [phi:printf_number_buffer::@7->printf_padding#0] -- register_copy - // [2329] phi printf_padding::pad#7 = ' ' [phi:printf_number_buffer::@7->printf_padding#1] -- vbuz1=vbuc1 + // [2178] call printf_padding + // [2386] phi from printf_number_buffer::@7 to printf_padding [phi:printf_number_buffer::@7->printf_padding] + // [2386] phi printf_padding::putc#7 = printf_padding::putc#0 [phi:printf_number_buffer::@7->printf_padding#0] -- register_copy + // [2386] phi printf_padding::pad#7 = ' ' [phi:printf_number_buffer::@7->printf_padding#1] -- vbuz1=vbuc1 lda #' ' sta.z printf_padding.pad - // [2329] phi printf_padding::length#6 = printf_padding::length#0 [phi:printf_number_buffer::@7->printf_padding#2] -- register_copy + // [2386] phi printf_padding::length#6 = printf_padding::length#0 [phi:printf_number_buffer::@7->printf_padding#2] -- register_copy jsr printf_padding // printf_number_buffer::@2 __b2: // if(buffer.sign) - // [2126] if(0==printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@3 -- 0_eq_vbuz1_then_la1 + // [2179] if(0==printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@3 -- 0_eq_vbuz1_then_la1 lda.z buffer_sign beq __b3 // printf_number_buffer::@8 // putc(buffer.sign) - // [2127] stackpush(char) = printf_number_buffer::buffer_sign#10 -- _stackpushbyte_=vbuz1 + // [2180] stackpush(char) = printf_number_buffer::buffer_sign#10 -- _stackpushbyte_=vbuz1 pha - // [2128] callexecute *printf_number_buffer::putc#10 -- call__deref_pprz1 + // [2181] callexecute *printf_number_buffer::putc#10 -- call__deref_pprz1 jsr icall37 // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // printf_number_buffer::@3 __b3: // if(format.zero_padding && padding) - // [2130] if(0==printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@4 -- 0_eq_vbuz1_then_la1 + // [2183] if(0==printf_number_buffer::format_zero_padding#10) goto printf_number_buffer::@4 -- 0_eq_vbuz1_then_la1 lda.z format_zero_padding beq __b4 // printf_number_buffer::@14 - // [2131] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@9 -- 0_neq_vbsz1_then_la1 + // [2184] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@9 -- 0_neq_vbsz1_then_la1 lda.z padding cmp #0 bne __b9 @@ -13392,30 +14302,30 @@ printf_number_buffer: { // printf_number_buffer::@9 __b9: // printf_padding(putc, '0',(char)padding) - // [2132] printf_padding::putc#1 = printf_number_buffer::putc#10 -- pprz1=pprz2 + // [2185] printf_padding::putc#1 = printf_number_buffer::putc#10 -- pprz1=pprz2 lda.z putc sta.z printf_padding.putc lda.z putc+1 sta.z printf_padding.putc+1 - // [2133] printf_padding::length#1 = (char)printf_number_buffer::padding#10 -- vbuz1=vbuz2 + // [2186] printf_padding::length#1 = (char)printf_number_buffer::padding#10 -- vbuz1=vbuz2 lda.z padding sta.z printf_padding.length - // [2134] call printf_padding - // [2329] phi from printf_number_buffer::@9 to printf_padding [phi:printf_number_buffer::@9->printf_padding] - // [2329] phi printf_padding::putc#7 = printf_padding::putc#1 [phi:printf_number_buffer::@9->printf_padding#0] -- register_copy - // [2329] phi printf_padding::pad#7 = '0' [phi:printf_number_buffer::@9->printf_padding#1] -- vbuz1=vbuc1 + // [2187] call printf_padding + // [2386] phi from printf_number_buffer::@9 to printf_padding [phi:printf_number_buffer::@9->printf_padding] + // [2386] phi printf_padding::putc#7 = printf_padding::putc#1 [phi:printf_number_buffer::@9->printf_padding#0] -- register_copy + // [2386] phi printf_padding::pad#7 = '0' [phi:printf_number_buffer::@9->printf_padding#1] -- vbuz1=vbuc1 lda #'0' sta.z printf_padding.pad - // [2329] phi printf_padding::length#6 = printf_padding::length#1 [phi:printf_number_buffer::@9->printf_padding#2] -- register_copy + // [2386] phi printf_padding::length#6 = printf_padding::length#1 [phi:printf_number_buffer::@9->printf_padding#2] -- register_copy jsr printf_padding // printf_number_buffer::@4 __b4: // printf_str(putc, buffer.digits) - // [2135] printf_str::putc#0 = printf_number_buffer::putc#10 - // [2136] call printf_str - // [987] phi from printf_number_buffer::@4 to printf_str [phi:printf_number_buffer::@4->printf_str] - // [987] phi printf_str::putc#73 = printf_str::putc#0 [phi:printf_number_buffer::@4->printf_str#0] -- register_copy - // [987] phi printf_str::s#73 = (char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:printf_number_buffer::@4->printf_str#1] -- pbuz1=pbuc1 + // [2188] printf_str::putc#0 = printf_number_buffer::putc#10 + // [2189] call printf_str + // [1019] phi from printf_number_buffer::@4 to printf_str [phi:printf_number_buffer::@4->printf_str] + // [1019] phi printf_str::putc#73 = printf_str::putc#0 [phi:printf_number_buffer::@4->printf_str#0] -- register_copy + // [1019] phi printf_str::s#73 = (char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:printf_number_buffer::@4->printf_str#1] -- pbuz1=pbuc1 lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS @@ -13423,7 +14333,7 @@ printf_number_buffer: { jsr printf_str // printf_number_buffer::@return // } - // [2137] return + // [2190] return rts // Outside Flow icall37: @@ -13439,13 +14349,13 @@ printf_number_buffer: { * @param unlock_code The 3rd write to model the specific unlock sequence. */ /* inline */ -// void rom_unlock(__zp($5b) unsigned long address, __zp($6b) char unlock_code) +// void rom_unlock(__zp($7b) unsigned long address, __zp($b3) char unlock_code) rom_unlock: { - .label chip_address = $32 - .label address = $5b - .label unlock_code = $6b + .label chip_address = $3f + .label address = $7b + .label unlock_code = $b3 // unsigned long chip_address = address & ROM_CHIP_MASK - // [2139] rom_unlock::chip_address#0 = rom_unlock::address#5 & $380000 -- vduz1=vduz2_band_vduc1 + // [2192] rom_unlock::chip_address#0 = rom_unlock::address#5 & $380000 -- vduz1=vduz2_band_vduc1 lda.z address and #<$380000 sta.z chip_address @@ -13459,7 +14369,7 @@ rom_unlock: { and #>$380000>>$10 sta.z chip_address+3 // rom_write_byte(chip_address + 0x05555, 0xAA) - // [2140] rom_write_byte::address#0 = rom_unlock::chip_address#0 + $5555 -- vduz1=vduz2_plus_vwuc1 + // [2193] rom_write_byte::address#0 = rom_unlock::chip_address#0 + $5555 -- vduz1=vduz2_plus_vwuc1 clc lda.z chip_address adc #<$5555 @@ -13473,16 +14383,17 @@ rom_unlock: { lda.z chip_address+3 adc #0 sta.z rom_write_byte.address+3 - // [2141] call rom_write_byte + // [2194] call rom_write_byte // This is a very important operation... - // [2626] phi from rom_unlock to rom_write_byte [phi:rom_unlock->rom_write_byte] - // [2626] phi rom_write_byte::value#10 = $aa [phi:rom_unlock->rom_write_byte#0] -- vbuyy=vbuc1 - ldy #$aa - // [2626] phi rom_write_byte::address#4 = rom_write_byte::address#0 [phi:rom_unlock->rom_write_byte#1] -- register_copy + // [2683] phi from rom_unlock to rom_write_byte [phi:rom_unlock->rom_write_byte] + // [2683] phi rom_write_byte::value#10 = $aa [phi:rom_unlock->rom_write_byte#0] -- vbuz1=vbuc1 + lda #$aa + sta.z rom_write_byte.value + // [2683] phi rom_write_byte::address#4 = rom_write_byte::address#0 [phi:rom_unlock->rom_write_byte#1] -- register_copy jsr rom_write_byte // rom_unlock::@1 // rom_write_byte(chip_address + 0x02AAA, 0x55) - // [2142] rom_write_byte::address#1 = rom_unlock::chip_address#0 + $2aaa -- vduz1=vduz2_plus_vwuc1 + // [2195] rom_write_byte::address#1 = rom_unlock::chip_address#0 + $2aaa -- vduz1=vduz2_plus_vwuc1 clc lda.z chip_address adc #<$2aaa @@ -13496,15 +14407,16 @@ rom_unlock: { lda.z chip_address+3 adc #0 sta.z rom_write_byte.address+3 - // [2143] call rom_write_byte - // [2626] phi from rom_unlock::@1 to rom_write_byte [phi:rom_unlock::@1->rom_write_byte] - // [2626] phi rom_write_byte::value#10 = $55 [phi:rom_unlock::@1->rom_write_byte#0] -- vbuyy=vbuc1 - ldy #$55 - // [2626] phi rom_write_byte::address#4 = rom_write_byte::address#1 [phi:rom_unlock::@1->rom_write_byte#1] -- register_copy + // [2196] call rom_write_byte + // [2683] phi from rom_unlock::@1 to rom_write_byte [phi:rom_unlock::@1->rom_write_byte] + // [2683] phi rom_write_byte::value#10 = $55 [phi:rom_unlock::@1->rom_write_byte#0] -- vbuz1=vbuc1 + lda #$55 + sta.z rom_write_byte.value + // [2683] phi rom_write_byte::address#4 = rom_write_byte::address#1 [phi:rom_unlock::@1->rom_write_byte#1] -- register_copy jsr rom_write_byte // rom_unlock::@2 // rom_write_byte(address, unlock_code) - // [2144] rom_write_byte::address#2 = rom_unlock::address#5 -- vduz1=vduz2 + // [2197] rom_write_byte::address#2 = rom_unlock::address#5 -- vduz1=vduz2 lda.z address sta.z rom_write_byte.address lda.z address+1 @@ -13513,16 +14425,17 @@ rom_unlock: { sta.z rom_write_byte.address+2 lda.z address+3 sta.z rom_write_byte.address+3 - // [2145] rom_write_byte::value#2 = rom_unlock::unlock_code#5 -- vbuyy=vbuz1 - ldy.z unlock_code - // [2146] call rom_write_byte - // [2626] phi from rom_unlock::@2 to rom_write_byte [phi:rom_unlock::@2->rom_write_byte] - // [2626] phi rom_write_byte::value#10 = rom_write_byte::value#2 [phi:rom_unlock::@2->rom_write_byte#0] -- register_copy - // [2626] phi rom_write_byte::address#4 = rom_write_byte::address#2 [phi:rom_unlock::@2->rom_write_byte#1] -- register_copy + // [2198] rom_write_byte::value#2 = rom_unlock::unlock_code#5 -- vbuz1=vbuz2 + lda.z unlock_code + sta.z rom_write_byte.value + // [2199] call rom_write_byte + // [2683] phi from rom_unlock::@2 to rom_write_byte [phi:rom_unlock::@2->rom_write_byte] + // [2683] phi rom_write_byte::value#10 = rom_write_byte::value#2 [phi:rom_unlock::@2->rom_write_byte#0] -- register_copy + // [2683] phi rom_write_byte::address#4 = rom_write_byte::address#2 [phi:rom_unlock::@2->rom_write_byte#1] -- register_copy jsr rom_write_byte // rom_unlock::@return // } - // [2147] return + // [2200] return rts } // rom_read_byte @@ -13535,40 +14448,48 @@ rom_unlock: { * @param address The 22 bit ROM address. * @return unsigned char The byte read from the ROM. */ -// __register(A) char rom_read_byte(__zp($45) unsigned long address) +// __mem() char rom_read_byte(__zp($57) unsigned long address) rom_read_byte: { - .label rom_ptr1_rom_read_byte__0 = $43 - .label rom_ptr1_rom_read_byte__2 = $43 - .label rom_ptr1_return = $43 - .label address = $45 + .label rom_bank1_rom_read_byte__0 = $6d + .label rom_bank1_rom_read_byte__1 = $e4 + .label rom_ptr1_rom_read_byte__0 = $55 + .label rom_ptr1_rom_read_byte__2 = $55 + .label rom_bank1_return = $69 + .label rom_ptr1_return = $55 + .label address = $57 // rom_read_byte::rom_bank1 // BYTE2(address) - // [2149] rom_read_byte::rom_bank1_$0 = byte2 rom_read_byte::address#2 -- vbuaa=_byte2_vduz1 + // [2202] rom_read_byte::rom_bank1_$0 = byte2 rom_read_byte::address#2 -- vbuz1=_byte2_vduz2 lda.z address+2 + sta.z rom_bank1_rom_read_byte__0 // BYTE1(address) - // [2150] rom_read_byte::rom_bank1_$1 = byte1 rom_read_byte::address#2 -- vbuxx=_byte1_vduz1 - ldx.z address+1 + // [2203] rom_read_byte::rom_bank1_$1 = byte1 rom_read_byte::address#2 -- vbuz1=_byte1_vduz2 + lda.z address+1 + sta.z rom_bank1_rom_read_byte__1 // MAKEWORD(BYTE2(address),BYTE1(address)) - // [2151] rom_read_byte::rom_bank1_$2 = rom_read_byte::rom_bank1_$0 w= rom_read_byte::rom_bank1_$1 -- vwum1=vbuaa_word_vbuxx + // [2204] rom_read_byte::rom_bank1_$2 = rom_read_byte::rom_bank1_$0 w= rom_read_byte::rom_bank1_$1 -- vwum1=vbuz2_word_vbuz3 + lda.z rom_bank1_rom_read_byte__0 sta rom_bank1_rom_read_byte__2+1 - stx rom_bank1_rom_read_byte__2 + lda.z rom_bank1_rom_read_byte__1 + sta rom_bank1_rom_read_byte__2 // unsigned int bank_unshifted = MAKEWORD(BYTE2(address),BYTE1(address)) << 2 - // [2152] rom_read_byte::rom_bank1_bank_unshifted#0 = rom_read_byte::rom_bank1_$2 << 2 -- vwum1=vwum1_rol_2 + // [2205] rom_read_byte::rom_bank1_bank_unshifted#0 = rom_read_byte::rom_bank1_$2 << 2 -- vwum1=vwum1_rol_2 asl rom_bank1_bank_unshifted rol rom_bank1_bank_unshifted+1 asl rom_bank1_bank_unshifted rol rom_bank1_bank_unshifted+1 // unsigned char bank = BYTE1(bank_unshifted) - // [2153] rom_read_byte::rom_bank1_return#0 = byte1 rom_read_byte::rom_bank1_bank_unshifted#0 -- vbuxx=_byte1_vwum1 - ldx rom_bank1_bank_unshifted+1 + // [2206] rom_read_byte::rom_bank1_return#0 = byte1 rom_read_byte::rom_bank1_bank_unshifted#0 -- vbuz1=_byte1_vwum2 + lda rom_bank1_bank_unshifted+1 + sta.z rom_bank1_return // rom_read_byte::rom_ptr1 // (unsigned int)(address) & ROM_PTR_MASK - // [2154] rom_read_byte::rom_ptr1_$2 = (unsigned int)rom_read_byte::address#2 -- vwuz1=_word_vduz2 + // [2207] rom_read_byte::rom_ptr1_$2 = (unsigned int)rom_read_byte::address#2 -- vwuz1=_word_vduz2 lda.z address sta.z rom_ptr1_rom_read_byte__2 lda.z address+1 sta.z rom_ptr1_rom_read_byte__2+1 - // [2155] rom_read_byte::rom_ptr1_$0 = rom_read_byte::rom_ptr1_$2 & $3fff -- vwuz1=vwuz1_band_vwuc1 + // [2208] rom_read_byte::rom_ptr1_$0 = rom_read_byte::rom_ptr1_$2 & $3fff -- vwuz1=vwuz1_band_vwuc1 lda.z rom_ptr1_rom_read_byte__0 and #<$3fff sta.z rom_ptr1_rom_read_byte__0 @@ -13576,7 +14497,7 @@ rom_read_byte: { and #>$3fff sta.z rom_ptr1_rom_read_byte__0+1 // ((unsigned int)(address) & ROM_PTR_MASK) + ROM_BASE - // [2156] rom_read_byte::rom_ptr1_return#0 = rom_read_byte::rom_ptr1_$0 + $c000 -- vwuz1=vwuz1_plus_vwuc1 + // [2209] rom_read_byte::rom_ptr1_return#0 = rom_read_byte::rom_ptr1_$0 + $c000 -- vwuz1=vwuz1_plus_vwuc1 lda.z rom_ptr1_return clc adc #<$c000 @@ -13586,22 +14507,56 @@ rom_read_byte: { sta.z rom_ptr1_return+1 // rom_read_byte::bank_set_brom1 // BROM = bank - // [2157] BROM = rom_read_byte::rom_bank1_return#0 -- vbuz1=vbuxx - stx.z BROM + // [2210] BROM = rom_read_byte::rom_bank1_return#0 -- vbuz1=vbuz2 + lda.z rom_bank1_return + sta.z BROM // rom_read_byte::@1 // return *ptr_rom; - // [2158] rom_read_byte::return#0 = *((char *)rom_read_byte::rom_ptr1_return#0) -- vbuaa=_deref_pbuz1 + // [2211] rom_read_byte::return#0 = *((char *)rom_read_byte::rom_ptr1_return#0) -- vbum1=_deref_pbuz2 ldy #0 lda (rom_ptr1_return),y + sta return // rom_read_byte::@return // } - // [2159] return + // [2212] return rts .segment Data rom_bank1_rom_read_byte__2: .word 0 .label rom_bank1_bank_unshifted = rom_bank1_rom_read_byte__2 + .label return = fclose.sp } .segment Code + // display_progress_line +/** + * @brief Print one line of text in the progress frame at a line position. + * + * @param line The start line, counting from 0. + * @param text The text to be displayed. + */ +// void display_progress_line(__zp($ed) char line, __zp($2d) char *text) +display_progress_line: { + .label line = $ed + .label text = $2d + // cputsxy(PROGRESS_X, PROGRESS_Y+line, text) + // [2213] cputsxy::y#0 = PROGRESS_Y + display_progress_line::line#0 -- vbuz1=vbuc1_plus_vbuz1 + lda #PROGRESS_Y + clc + adc.z cputsxy.y + sta.z cputsxy.y + // [2214] cputsxy::s#0 = display_progress_line::text#0 + // [2215] call cputsxy + // [850] phi from display_progress_line to cputsxy [phi:display_progress_line->cputsxy] + // [850] phi cputsxy::s#4 = cputsxy::s#0 [phi:display_progress_line->cputsxy#0] -- register_copy + // [850] phi cputsxy::y#4 = cputsxy::y#0 [phi:display_progress_line->cputsxy#1] -- register_copy + // [850] phi cputsxy::x#4 = PROGRESS_X [phi:display_progress_line->cputsxy#2] -- vbuz1=vbuc1 + lda #PROGRESS_X + sta.z cputsxy.x + jsr cputsxy + // display_progress_line::@return + // } + // [2216] return + rts +} // fopen /** * @brief Load a file to banked ram located between address 0xA000 and 0xBFFF incrementing the banks. @@ -13614,32 +14569,31 @@ rom_read_byte: { * - 0x0000: Something is wrong! Kernal Error Code (https://commodore.ca/manuals/pdfs/commodore_error_messages.pdf) * - other: OK! The last pointer between 0xA000 and 0xBFFF is returned. Note that the last pointer is indicating the first free byte. */ -// __zp($36) struct $2 * fopen(__zp($b5) const char *path, const char *mode) +// __zp($5d) struct $2 * fopen(__zp($d9) const char *path, const char *mode) fopen: { - .label fopen__26 = $30 - .label fopen__28 = $ea - .label fopen__30 = $36 - .label cbm_k_setnam1_fopen__0 = $43 - .label sp = $f3 - .label stream = $36 - .label pathtoken = $b5 - .label pathpos_1 = $e1 - .label pathtoken_1 = $ef - .label pathcmp = $c8 - .label path = $b5 - // Parse path - .label pathstep = $e4 - .label return = $36 + .label fopen__4 = $bf + .label fopen__9 = $c5 + .label fopen__15 = $c4 + .label fopen__26 = $3d + .label fopen__30 = $5d + .label cbm_k_setnam1_fopen__0 = $55 + .label sp = $d4 + .label stream = $5d + .label pathtoken = $d9 + .label pathpos = $eb + .label path = $d9 + .label cbm_k_readst1_return = $c4 + .label return = $5d // unsigned char sp = __stdio_filecount - // [2161] fopen::sp#0 = __stdio_filecount -- vbuz1=vbum2 + // [2218] fopen::sp#0 = __stdio_filecount -- vbuz1=vbum2 lda __stdio_filecount sta.z sp // (unsigned int)sp | 0x8000 - // [2162] fopen::$30 = (unsigned int)fopen::sp#0 -- vwuz1=_word_vbuz2 + // [2219] fopen::$30 = (unsigned int)fopen::sp#0 -- vwuz1=_word_vbuz2 sta.z fopen__30 lda #0 sta.z fopen__30+1 - // [2163] fopen::stream#0 = fopen::$30 | $8000 -- vwuz1=vwuz1_bor_vwuc1 + // [2220] fopen::stream#0 = fopen::$30 | $8000 -- vwuz1=vwuz1_bor_vwuc1 lda.z stream ora #<$8000 sta.z stream @@ -13647,159 +14601,179 @@ fopen: { ora #>$8000 sta.z stream+1 // char pathpos = sp * __STDIO_FILECOUNT - // [2164] fopen::pathpos#0 = fopen::sp#0 << 1 -- vbum1=vbuz2_rol_1 + // [2221] fopen::pathpos#0 = fopen::sp#0 << 1 -- vbuz1=vbuz2_rol_1 lda.z sp asl - sta pathpos + sta.z pathpos // __logical = 0 - // [2165] ((char *)&__stdio_file+$40)[fopen::sp#0] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [2222] ((char *)&__stdio_file+$40)[fopen::sp#0] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 ldy.z sp sta __stdio_file+$40,y // __device = 0 - // [2166] ((char *)&__stdio_file+$42)[fopen::sp#0] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [2223] ((char *)&__stdio_file+$42)[fopen::sp#0] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 sta __stdio_file+$42,y // __channel = 0 - // [2167] ((char *)&__stdio_file+$44)[fopen::sp#0] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [2224] ((char *)&__stdio_file+$44)[fopen::sp#0] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 sta __stdio_file+$44,y - // [2168] fopen::pathtoken#22 = fopen::pathtoken#0 -- pbuz1=pbuz2 + // [2225] fopen::pathtoken#22 = fopen::pathtoken#0 -- pbum1=pbuz2 lda.z pathtoken - sta.z pathtoken_1 + sta pathtoken_1 lda.z pathtoken+1 - sta.z pathtoken_1+1 - // [2169] fopen::pathpos#21 = fopen::pathpos#0 -- vbuz1=vbum2 - lda pathpos - sta.z pathpos_1 - // [2170] phi from fopen to fopen::@8 [phi:fopen->fopen::@8] - // [2170] phi fopen::num#10 = 0 [phi:fopen->fopen::@8#0] -- vbuxx=vbuc1 - ldx #0 - // [2170] phi fopen::pathpos#10 = fopen::pathpos#21 [phi:fopen->fopen::@8#1] -- register_copy - // [2170] phi fopen::path#10 = fopen::pathtoken#0 [phi:fopen->fopen::@8#2] -- register_copy - // [2170] phi fopen::pathstep#10 = 0 [phi:fopen->fopen::@8#3] -- vbuz1=vbuc1 - txa - sta.z pathstep - // [2170] phi fopen::pathtoken#10 = fopen::pathtoken#22 [phi:fopen->fopen::@8#4] -- register_copy + sta pathtoken_1+1 + // [2226] fopen::pathpos#21 = fopen::pathpos#0 -- vbum1=vbuz2 + lda.z pathpos + sta pathpos_1 + // [2227] phi from fopen to fopen::@8 [phi:fopen->fopen::@8] + // [2227] phi fopen::num#10 = 0 [phi:fopen->fopen::@8#0] -- vbum1=vbuc1 + lda #0 + sta num + // [2227] phi fopen::pathpos#10 = fopen::pathpos#21 [phi:fopen->fopen::@8#1] -- register_copy + // [2227] phi fopen::path#10 = fopen::pathtoken#0 [phi:fopen->fopen::@8#2] -- register_copy + // [2227] phi fopen::pathstep#10 = 0 [phi:fopen->fopen::@8#3] -- vbum1=vbuc1 + sta pathstep + // [2227] phi fopen::pathtoken#10 = fopen::pathtoken#22 [phi:fopen->fopen::@8#4] -- register_copy // Iterate while path is not \0. - // [2170] phi from fopen::@22 to fopen::@8 [phi:fopen::@22->fopen::@8] - // [2170] phi fopen::num#10 = fopen::num#13 [phi:fopen::@22->fopen::@8#0] -- register_copy - // [2170] phi fopen::pathpos#10 = fopen::pathpos#7 [phi:fopen::@22->fopen::@8#1] -- register_copy - // [2170] phi fopen::path#10 = fopen::path#11 [phi:fopen::@22->fopen::@8#2] -- register_copy - // [2170] phi fopen::pathstep#10 = fopen::pathstep#11 [phi:fopen::@22->fopen::@8#3] -- register_copy - // [2170] phi fopen::pathtoken#10 = fopen::pathtoken#1 [phi:fopen::@22->fopen::@8#4] -- register_copy + // [2227] phi from fopen::@22 to fopen::@8 [phi:fopen::@22->fopen::@8] + // [2227] phi fopen::num#10 = fopen::num#13 [phi:fopen::@22->fopen::@8#0] -- register_copy + // [2227] phi fopen::pathpos#10 = fopen::pathpos#7 [phi:fopen::@22->fopen::@8#1] -- register_copy + // [2227] phi fopen::path#10 = fopen::path#11 [phi:fopen::@22->fopen::@8#2] -- register_copy + // [2227] phi fopen::pathstep#10 = fopen::pathstep#11 [phi:fopen::@22->fopen::@8#3] -- register_copy + // [2227] phi fopen::pathtoken#10 = fopen::pathtoken#1 [phi:fopen::@22->fopen::@8#4] -- register_copy // fopen::@8 __b8: // if (*pathtoken == ',' || *pathtoken == '\0') - // [2171] if(*fopen::pathtoken#10==',') goto fopen::@9 -- _deref_pbuz1_eq_vbuc1_then_la1 - lda #',' + // [2228] if(*fopen::pathtoken#10==',') goto fopen::@9 -- _deref_pbum1_eq_vbuc1_then_la1 + ldy pathtoken_1 + sty.z $fe + ldy pathtoken_1+1 + sty.z $ff ldy #0 - cmp (pathtoken_1),y + lda ($fe),y + cmp #',' bne !__b9+ jmp __b9 !__b9: // fopen::@33 - // [2172] if(*fopen::pathtoken#10=='@') goto fopen::@9 -- _deref_pbuz1_eq_vbuc1_then_la1 - lda #'@' - cmp (pathtoken_1),y + // [2229] if(*fopen::pathtoken#10=='@') goto fopen::@9 -- _deref_pbum1_eq_vbuc1_then_la1 + ldy pathtoken_1 + sty.z $fe + ldy pathtoken_1+1 + sty.z $ff + ldy #0 + lda ($fe),y + cmp #'@' bne !__b9+ jmp __b9 !__b9: // fopen::@23 // if (pathstep == 0) - // [2173] if(fopen::pathstep#10!=0) goto fopen::@10 -- vbuz1_neq_0_then_la1 - lda.z pathstep + // [2230] if(fopen::pathstep#10!=0) goto fopen::@10 -- vbum1_neq_0_then_la1 + lda pathstep bne __b10 // fopen::@24 // __stdio_file.filename[pathpos] = *pathtoken - // [2174] ((char *)&__stdio_file)[fopen::pathpos#10] = *fopen::pathtoken#10 -- pbuc1_derefidx_vbuz1=_deref_pbuz2 - lda (pathtoken_1),y - ldy.z pathpos_1 + // [2231] ((char *)&__stdio_file)[fopen::pathpos#10] = *fopen::pathtoken#10 -- pbuc1_derefidx_vbum1=_deref_pbum2 + ldy pathtoken_1 + sty.z $fe + ldy pathtoken_1+1 + sty.z $ff + ldy #0 + lda ($fe),y + ldy pathpos_1 sta __stdio_file,y // pathpos++; - // [2175] fopen::pathpos#1 = ++ fopen::pathpos#10 -- vbuz1=_inc_vbuz1 - inc.z pathpos_1 - // [2176] phi from fopen::@12 fopen::@23 fopen::@24 to fopen::@10 [phi:fopen::@12/fopen::@23/fopen::@24->fopen::@10] - // [2176] phi fopen::num#13 = fopen::num#15 [phi:fopen::@12/fopen::@23/fopen::@24->fopen::@10#0] -- register_copy - // [2176] phi fopen::pathpos#7 = fopen::pathpos#10 [phi:fopen::@12/fopen::@23/fopen::@24->fopen::@10#1] -- register_copy - // [2176] phi fopen::path#11 = fopen::path#13 [phi:fopen::@12/fopen::@23/fopen::@24->fopen::@10#2] -- register_copy - // [2176] phi fopen::pathstep#11 = fopen::pathstep#1 [phi:fopen::@12/fopen::@23/fopen::@24->fopen::@10#3] -- register_copy + // [2232] fopen::pathpos#1 = ++ fopen::pathpos#10 -- vbum1=_inc_vbum1 + inc pathpos_1 + // [2233] phi from fopen::@12 fopen::@23 fopen::@24 to fopen::@10 [phi:fopen::@12/fopen::@23/fopen::@24->fopen::@10] + // [2233] phi fopen::num#13 = fopen::num#15 [phi:fopen::@12/fopen::@23/fopen::@24->fopen::@10#0] -- register_copy + // [2233] phi fopen::pathpos#7 = fopen::pathpos#10 [phi:fopen::@12/fopen::@23/fopen::@24->fopen::@10#1] -- register_copy + // [2233] phi fopen::path#11 = fopen::path#13 [phi:fopen::@12/fopen::@23/fopen::@24->fopen::@10#2] -- register_copy + // [2233] phi fopen::pathstep#11 = fopen::pathstep#1 [phi:fopen::@12/fopen::@23/fopen::@24->fopen::@10#3] -- register_copy // fopen::@10 __b10: // pathtoken++; - // [2177] fopen::pathtoken#1 = ++ fopen::pathtoken#10 -- pbuz1=_inc_pbuz1 - inc.z pathtoken_1 + // [2234] fopen::pathtoken#1 = ++ fopen::pathtoken#10 -- pbum1=_inc_pbum1 + inc pathtoken_1 bne !+ - inc.z pathtoken_1+1 + inc pathtoken_1+1 !: // fopen::@22 // pathtoken - 1 - // [2178] fopen::$28 = fopen::pathtoken#1 - 1 -- pbuz1=pbuz2_minus_1 - lda.z pathtoken_1 + // [2235] fopen::$28 = fopen::pathtoken#1 - 1 -- pbum1=pbum2_minus_1 + lda pathtoken_1 sec sbc #1 - sta.z fopen__28 - lda.z pathtoken_1+1 + sta fopen__28 + lda pathtoken_1+1 sbc #0 - sta.z fopen__28+1 + sta fopen__28+1 // while (*(pathtoken - 1)) - // [2179] if(0!=*fopen::$28) goto fopen::@8 -- 0_neq__deref_pbuz1_then_la1 + // [2236] if(0!=*fopen::$28) goto fopen::@8 -- 0_neq__deref_pbum1_then_la1 + ldy fopen__28 + sty.z $fe + tay + sty.z $ff ldy #0 - lda (fopen__28),y + lda ($fe),y cmp #0 bne __b8 // fopen::@26 // __status = 0 - // [2180] ((char *)&__stdio_file+$46)[fopen::sp#0] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [2237] ((char *)&__stdio_file+$46)[fopen::sp#0] = 0 -- pbuc1_derefidx_vbuz1=vbuc2 tya ldy.z sp sta __stdio_file+$46,y // if(!__logical) - // [2181] if(0!=((char *)&__stdio_file+$40)[fopen::sp#0]) goto fopen::@1 -- 0_neq_pbuc1_derefidx_vbuz1_then_la1 + // [2238] if(0!=((char *)&__stdio_file+$40)[fopen::sp#0]) goto fopen::@1 -- 0_neq_pbuc1_derefidx_vbuz1_then_la1 lda __stdio_file+$40,y cmp #0 bne __b1 // fopen::@27 // __stdio_filecount+1 - // [2182] fopen::$4 = __stdio_filecount + 1 -- vbuaa=vbum1_plus_1 + // [2239] fopen::$4 = __stdio_filecount + 1 -- vbuz1=vbum2_plus_1 lda __stdio_filecount inc + sta.z fopen__4 // __logical = __stdio_filecount+1 - // [2183] ((char *)&__stdio_file+$40)[fopen::sp#0] = fopen::$4 -- pbuc1_derefidx_vbuz1=vbuaa + // [2240] ((char *)&__stdio_file+$40)[fopen::sp#0] = fopen::$4 -- pbuc1_derefidx_vbuz1=vbuz2 sta __stdio_file+$40,y // fopen::@1 __b1: // if(!__device) - // [2184] if(0!=((char *)&__stdio_file+$42)[fopen::sp#0]) goto fopen::@2 -- 0_neq_pbuc1_derefidx_vbuz1_then_la1 + // [2241] if(0!=((char *)&__stdio_file+$42)[fopen::sp#0]) goto fopen::@2 -- 0_neq_pbuc1_derefidx_vbuz1_then_la1 ldy.z sp lda __stdio_file+$42,y cmp #0 bne __b2 // fopen::@5 // __device = 8 - // [2185] ((char *)&__stdio_file+$42)[fopen::sp#0] = 8 -- pbuc1_derefidx_vbuz1=vbuc2 + // [2242] ((char *)&__stdio_file+$42)[fopen::sp#0] = 8 -- pbuc1_derefidx_vbuz1=vbuc2 lda #8 sta __stdio_file+$42,y // fopen::@2 __b2: // if(!__channel) - // [2186] if(0!=((char *)&__stdio_file+$44)[fopen::sp#0]) goto fopen::@3 -- 0_neq_pbuc1_derefidx_vbuz1_then_la1 + // [2243] if(0!=((char *)&__stdio_file+$44)[fopen::sp#0]) goto fopen::@3 -- 0_neq_pbuc1_derefidx_vbuz1_then_la1 ldy.z sp lda __stdio_file+$44,y cmp #0 bne __b3 // fopen::@6 // __stdio_filecount+2 - // [2187] fopen::$9 = __stdio_filecount + 2 -- vbuaa=vbum1_plus_2 + // [2244] fopen::$9 = __stdio_filecount + 2 -- vbuz1=vbum2_plus_2 lda __stdio_filecount clc adc #2 + sta.z fopen__9 // __channel = __stdio_filecount+2 - // [2188] ((char *)&__stdio_file+$44)[fopen::sp#0] = fopen::$9 -- pbuc1_derefidx_vbuz1=vbuaa + // [2245] ((char *)&__stdio_file+$44)[fopen::sp#0] = fopen::$9 -- pbuc1_derefidx_vbuz1=vbuz2 sta __stdio_file+$44,y // fopen::@3 __b3: // __filename - // [2189] fopen::$11 = (char *)&__stdio_file + fopen::pathpos#0 -- pbum1=pbuc1_plus_vbum2 - lda pathpos + // [2246] fopen::$11 = (char *)&__stdio_file + fopen::pathpos#0 -- pbum1=pbuc1_plus_vbuz2 + lda.z pathpos clc adc #<__stdio_file sta fopen__11 @@ -13807,28 +14781,28 @@ fopen: { adc #0 sta fopen__11+1 // cbm_k_setnam(__filename) - // [2190] fopen::cbm_k_setnam1_filename = fopen::$11 -- pbum1=pbum2 + // [2247] fopen::cbm_k_setnam1_filename = fopen::$11 -- pbum1=pbum2 lda fopen__11 sta cbm_k_setnam1_filename lda fopen__11+1 sta cbm_k_setnam1_filename+1 // fopen::cbm_k_setnam1 // strlen(filename) - // [2191] strlen::str#4 = fopen::cbm_k_setnam1_filename -- pbuz1=pbum2 + // [2248] strlen::str#4 = fopen::cbm_k_setnam1_filename -- pbuz1=pbum2 lda cbm_k_setnam1_filename sta.z strlen.str lda cbm_k_setnam1_filename+1 sta.z strlen.str+1 - // [2192] call strlen - // [2323] phi from fopen::cbm_k_setnam1 to strlen [phi:fopen::cbm_k_setnam1->strlen] - // [2323] phi strlen::str#8 = strlen::str#4 [phi:fopen::cbm_k_setnam1->strlen#0] -- register_copy + // [2249] call strlen + // [2380] phi from fopen::cbm_k_setnam1 to strlen [phi:fopen::cbm_k_setnam1->strlen] + // [2380] phi strlen::str#8 = strlen::str#4 [phi:fopen::cbm_k_setnam1->strlen#0] -- register_copy jsr strlen // strlen(filename) - // [2193] strlen::return#11 = strlen::len#2 + // [2250] strlen::return#11 = strlen::len#2 // fopen::@31 - // [2194] fopen::cbm_k_setnam1_$0 = strlen::return#11 + // [2251] fopen::cbm_k_setnam1_$0 = strlen::return#11 // char filename_len = (char)strlen(filename) - // [2195] fopen::cbm_k_setnam1_filename_len = (char)fopen::cbm_k_setnam1_$0 -- vbum1=_byte_vwuz2 + // [2252] fopen::cbm_k_setnam1_filename_len = (char)fopen::cbm_k_setnam1_$0 -- vbum1=_byte_vwuz2 lda.z cbm_k_setnam1_fopen__0 sta cbm_k_setnam1_filename_len // asm @@ -13838,17 +14812,17 @@ fopen: { jsr CBM_SETNAM // fopen::@28 // cbm_k_setlfs(__logical, __device, __channel) - // [2197] cbm_k_setlfs::channel = ((char *)&__stdio_file+$40)[fopen::sp#0] -- vbum1=pbuc1_derefidx_vbuz2 + // [2254] cbm_k_setlfs::channel = ((char *)&__stdio_file+$40)[fopen::sp#0] -- vbum1=pbuc1_derefidx_vbuz2 ldy.z sp lda __stdio_file+$40,y sta cbm_k_setlfs.channel - // [2198] cbm_k_setlfs::device = ((char *)&__stdio_file+$42)[fopen::sp#0] -- vbum1=pbuc1_derefidx_vbuz2 + // [2255] cbm_k_setlfs::device = ((char *)&__stdio_file+$42)[fopen::sp#0] -- vbum1=pbuc1_derefidx_vbuz2 lda __stdio_file+$42,y sta cbm_k_setlfs.device - // [2199] cbm_k_setlfs::command = ((char *)&__stdio_file+$44)[fopen::sp#0] -- vbum1=pbuc1_derefidx_vbuz2 + // [2256] cbm_k_setlfs::command = ((char *)&__stdio_file+$44)[fopen::sp#0] -- vbum1=pbuc1_derefidx_vbuz2 lda __stdio_file+$44,y sta cbm_k_setlfs.command - // [2200] call cbm_k_setlfs + // [2257] call cbm_k_setlfs jsr cbm_k_setlfs // fopen::cbm_k_open1 // asm @@ -13856,7 +14830,7 @@ fopen: { jsr CBM_OPEN // fopen::cbm_k_readst1 // char status - // [2202] fopen::cbm_k_readst1_status = 0 -- vbum1=vbuc1 + // [2259] fopen::cbm_k_readst1_status = 0 -- vbum1=vbuc1 lda #0 sta cbm_k_readst1_status // asm @@ -13864,32 +14838,34 @@ fopen: { jsr CBM_READST sta cbm_k_readst1_status // return status; - // [2204] fopen::cbm_k_readst1_return#0 = fopen::cbm_k_readst1_status -- vbuaa=vbum1 + // [2261] fopen::cbm_k_readst1_return#0 = fopen::cbm_k_readst1_status -- vbuz1=vbum2 + sta.z cbm_k_readst1_return // fopen::cbm_k_readst1_@return // } - // [2205] fopen::cbm_k_readst1_return#1 = fopen::cbm_k_readst1_return#0 + // [2262] fopen::cbm_k_readst1_return#1 = fopen::cbm_k_readst1_return#0 // fopen::@29 // cbm_k_readst() - // [2206] fopen::$15 = fopen::cbm_k_readst1_return#1 + // [2263] fopen::$15 = fopen::cbm_k_readst1_return#1 // __status = cbm_k_readst() - // [2207] ((char *)&__stdio_file+$46)[fopen::sp#0] = fopen::$15 -- pbuc1_derefidx_vbuz1=vbuaa + // [2264] ((char *)&__stdio_file+$46)[fopen::sp#0] = fopen::$15 -- pbuc1_derefidx_vbuz1=vbuz2 + lda.z fopen__15 ldy.z sp sta __stdio_file+$46,y // ferror(stream) - // [2208] ferror::stream#0 = (struct $2 *)fopen::stream#0 - // [2209] call ferror + // [2265] ferror::stream#0 = (struct $2 *)fopen::stream#0 + // [2266] call ferror jsr ferror - // [2210] ferror::return#0 = ferror::return#1 + // [2267] ferror::return#0 = ferror::return#1 // fopen::@32 - // [2211] fopen::$16 = ferror::return#0 + // [2268] fopen::$16 = ferror::return#0 // if (ferror(stream)) - // [2212] if(0==fopen::$16) goto fopen::@4 -- 0_eq_vwsm1_then_la1 + // [2269] if(0==fopen::$16) goto fopen::@4 -- 0_eq_vwsm1_then_la1 lda fopen__16 ora fopen__16+1 beq __b4 // fopen::@7 // cbm_k_close(__logical) - // [2213] fopen::cbm_k_close1_channel = ((char *)&__stdio_file+$40)[fopen::sp#0] -- vbum1=pbuc1_derefidx_vbuz2 + // [2270] fopen::cbm_k_close1_channel = ((char *)&__stdio_file+$40)[fopen::sp#0] -- vbum1=pbuc1_derefidx_vbuz2 ldy.z sp lda __stdio_file+$40,y sta cbm_k_close1_channel @@ -13897,169 +14873,175 @@ fopen: { // asm // asm { ldachannel jsrCBM_CLOSE } jsr CBM_CLOSE - // [2215] phi from fopen::cbm_k_close1 to fopen::@return [phi:fopen::cbm_k_close1->fopen::@return] - // [2215] phi fopen::return#2 = 0 [phi:fopen::cbm_k_close1->fopen::@return#0] -- pssz1=vbuc1 + // [2272] phi from fopen::cbm_k_close1 to fopen::@return [phi:fopen::cbm_k_close1->fopen::@return] + // [2272] phi fopen::return#2 = 0 [phi:fopen::cbm_k_close1->fopen::@return#0] -- pssz1=vbuc1 lda #<0 sta.z return sta.z return+1 // fopen::@return // } - // [2216] return + // [2273] return rts // fopen::@4 __b4: // __stdio_filecount++; - // [2217] __stdio_filecount = ++ __stdio_filecount -- vbum1=_inc_vbum1 + // [2274] __stdio_filecount = ++ __stdio_filecount -- vbum1=_inc_vbum1 inc __stdio_filecount - // [2218] fopen::return#8 = (struct $2 *)fopen::stream#0 - // [2215] phi from fopen::@4 to fopen::@return [phi:fopen::@4->fopen::@return] - // [2215] phi fopen::return#2 = fopen::return#8 [phi:fopen::@4->fopen::@return#0] -- register_copy + // [2275] fopen::return#8 = (struct $2 *)fopen::stream#0 + // [2272] phi from fopen::@4 to fopen::@return [phi:fopen::@4->fopen::@return] + // [2272] phi fopen::return#2 = fopen::return#8 [phi:fopen::@4->fopen::@return#0] -- register_copy rts // fopen::@9 __b9: // if (pathstep > 0) - // [2219] if(fopen::pathstep#10>0) goto fopen::@11 -- vbuz1_gt_0_then_la1 - lda.z pathstep + // [2276] if(fopen::pathstep#10>0) goto fopen::@11 -- vbum1_gt_0_then_la1 + lda pathstep bne __b11 // fopen::@25 // __stdio_file.filename[pathpos] = '\0' - // [2220] ((char *)&__stdio_file)[fopen::pathpos#10] = '@' -- pbuc1_derefidx_vbuz1=vbuc2 + // [2277] ((char *)&__stdio_file)[fopen::pathpos#10] = '@' -- pbuc1_derefidx_vbum1=vbuc2 lda #'@' - ldy.z pathpos_1 + ldy pathpos_1 sta __stdio_file,y // path = pathtoken + 1 - // [2221] fopen::path#0 = fopen::pathtoken#10 + 1 -- pbuz1=pbuz2_plus_1 + // [2278] fopen::path#0 = fopen::pathtoken#10 + 1 -- pbuz1=pbum2_plus_1 clc - lda.z pathtoken_1 + lda pathtoken_1 adc #1 sta.z path - lda.z pathtoken_1+1 + lda pathtoken_1+1 adc #0 sta.z path+1 - // [2222] phi from fopen::@16 fopen::@17 fopen::@18 fopen::@19 fopen::@25 to fopen::@12 [phi:fopen::@16/fopen::@17/fopen::@18/fopen::@19/fopen::@25->fopen::@12] - // [2222] phi fopen::num#15 = fopen::num#2 [phi:fopen::@16/fopen::@17/fopen::@18/fopen::@19/fopen::@25->fopen::@12#0] -- register_copy - // [2222] phi fopen::path#13 = fopen::path#16 [phi:fopen::@16/fopen::@17/fopen::@18/fopen::@19/fopen::@25->fopen::@12#1] -- register_copy + // [2279] phi from fopen::@16 fopen::@17 fopen::@18 fopen::@19 fopen::@25 to fopen::@12 [phi:fopen::@16/fopen::@17/fopen::@18/fopen::@19/fopen::@25->fopen::@12] + // [2279] phi fopen::num#15 = fopen::num#2 [phi:fopen::@16/fopen::@17/fopen::@18/fopen::@19/fopen::@25->fopen::@12#0] -- register_copy + // [2279] phi fopen::path#13 = fopen::path#16 [phi:fopen::@16/fopen::@17/fopen::@18/fopen::@19/fopen::@25->fopen::@12#1] -- register_copy // fopen::@12 __b12: // pathstep++; - // [2223] fopen::pathstep#1 = ++ fopen::pathstep#10 -- vbuz1=_inc_vbuz1 - inc.z pathstep + // [2280] fopen::pathstep#1 = ++ fopen::pathstep#10 -- vbum1=_inc_vbum1 + inc pathstep jmp __b10 // fopen::@11 __b11: // char pathcmp = *path - // [2224] fopen::pathcmp#0 = *fopen::path#10 -- vbuz1=_deref_pbuz2 + // [2281] fopen::pathcmp#0 = *fopen::path#10 -- vbum1=_deref_pbuz2 ldy #0 lda (path),y - sta.z pathcmp + sta pathcmp // case 'D': - // [2225] if(fopen::pathcmp#0=='D') goto fopen::@13 -- vbuz1_eq_vbuc1_then_la1 + // [2282] if(fopen::pathcmp#0=='D') goto fopen::@13 -- vbum1_eq_vbuc1_then_la1 lda #'D' - cmp.z pathcmp + cmp pathcmp beq __b13 // fopen::@20 // case 'L': - // [2226] if(fopen::pathcmp#0=='L') goto fopen::@13 -- vbuz1_eq_vbuc1_then_la1 + // [2283] if(fopen::pathcmp#0=='L') goto fopen::@13 -- vbum1_eq_vbuc1_then_la1 lda #'L' - cmp.z pathcmp + cmp pathcmp beq __b13 // fopen::@21 // case 'C': // num = (char)atoi(path + 1); // path = pathtoken + 1; - // [2227] if(fopen::pathcmp#0=='C') goto fopen::@13 -- vbuz1_eq_vbuc1_then_la1 + // [2284] if(fopen::pathcmp#0=='C') goto fopen::@13 -- vbum1_eq_vbuc1_then_la1 lda #'C' - cmp.z pathcmp + cmp pathcmp beq __b13 - // [2228] phi from fopen::@21 fopen::@30 to fopen::@14 [phi:fopen::@21/fopen::@30->fopen::@14] - // [2228] phi fopen::path#16 = fopen::path#10 [phi:fopen::@21/fopen::@30->fopen::@14#0] -- register_copy - // [2228] phi fopen::num#2 = fopen::num#10 [phi:fopen::@21/fopen::@30->fopen::@14#1] -- register_copy + // [2285] phi from fopen::@21 fopen::@30 to fopen::@14 [phi:fopen::@21/fopen::@30->fopen::@14] + // [2285] phi fopen::path#16 = fopen::path#10 [phi:fopen::@21/fopen::@30->fopen::@14#0] -- register_copy + // [2285] phi fopen::num#2 = fopen::num#10 [phi:fopen::@21/fopen::@30->fopen::@14#1] -- register_copy // fopen::@14 __b14: // case 'L': // __logical = num; // break; - // [2229] if(fopen::pathcmp#0=='L') goto fopen::@17 -- vbuz1_eq_vbuc1_then_la1 + // [2286] if(fopen::pathcmp#0=='L') goto fopen::@17 -- vbum1_eq_vbuc1_then_la1 lda #'L' - cmp.z pathcmp + cmp pathcmp beq __b17 // fopen::@15 // case 'D': // __device = num; // break; - // [2230] if(fopen::pathcmp#0=='D') goto fopen::@18 -- vbuz1_eq_vbuc1_then_la1 + // [2287] if(fopen::pathcmp#0=='D') goto fopen::@18 -- vbum1_eq_vbuc1_then_la1 lda #'D' - cmp.z pathcmp + cmp pathcmp beq __b18 // fopen::@16 // case 'C': // __channel = num; // break; - // [2231] if(fopen::pathcmp#0!='C') goto fopen::@12 -- vbuz1_neq_vbuc1_then_la1 + // [2288] if(fopen::pathcmp#0!='C') goto fopen::@12 -- vbum1_neq_vbuc1_then_la1 lda #'C' - cmp.z pathcmp + cmp pathcmp bne __b12 // fopen::@19 // __channel = num - // [2232] ((char *)&__stdio_file+$44)[fopen::sp#0] = fopen::num#2 -- pbuc1_derefidx_vbuz1=vbuxx + // [2289] ((char *)&__stdio_file+$44)[fopen::sp#0] = fopen::num#2 -- pbuc1_derefidx_vbuz1=vbum2 + lda num ldy.z sp - txa sta __stdio_file+$44,y jmp __b12 // fopen::@18 __b18: // __device = num - // [2233] ((char *)&__stdio_file+$42)[fopen::sp#0] = fopen::num#2 -- pbuc1_derefidx_vbuz1=vbuxx + // [2290] ((char *)&__stdio_file+$42)[fopen::sp#0] = fopen::num#2 -- pbuc1_derefidx_vbuz1=vbum2 + lda num ldy.z sp - txa sta __stdio_file+$42,y jmp __b12 // fopen::@17 __b17: // __logical = num - // [2234] ((char *)&__stdio_file+$40)[fopen::sp#0] = fopen::num#2 -- pbuc1_derefidx_vbuz1=vbuxx + // [2291] ((char *)&__stdio_file+$40)[fopen::sp#0] = fopen::num#2 -- pbuc1_derefidx_vbuz1=vbum2 + lda num ldy.z sp - txa sta __stdio_file+$40,y jmp __b12 // fopen::@13 __b13: // atoi(path + 1) - // [2235] atoi::str#0 = fopen::path#10 + 1 -- pbuz1=pbuz1_plus_1 + // [2292] atoi::str#0 = fopen::path#10 + 1 -- pbuz1=pbuz1_plus_1 inc.z atoi.str bne !+ inc.z atoi.str+1 !: - // [2236] call atoi - // [2692] phi from fopen::@13 to atoi [phi:fopen::@13->atoi] - // [2692] phi atoi::str#2 = atoi::str#0 [phi:fopen::@13->atoi#0] -- register_copy + // [2293] call atoi + // [2749] phi from fopen::@13 to atoi [phi:fopen::@13->atoi] + // [2749] phi atoi::str#2 = atoi::str#0 [phi:fopen::@13->atoi#0] -- register_copy jsr atoi // atoi(path + 1) - // [2237] atoi::return#3 = atoi::return#2 + // [2294] atoi::return#3 = atoi::return#2 // fopen::@30 - // [2238] fopen::$26 = atoi::return#3 + // [2295] fopen::$26 = atoi::return#3 // num = (char)atoi(path + 1) - // [2239] fopen::num#1 = (char)fopen::$26 -- vbuxx=_byte_vwsz1 + // [2296] fopen::num#1 = (char)fopen::$26 -- vbum1=_byte_vwsz2 lda.z fopen__26 - tax + sta num // path = pathtoken + 1 - // [2240] fopen::path#1 = fopen::pathtoken#10 + 1 -- pbuz1=pbuz2_plus_1 + // [2297] fopen::path#1 = fopen::pathtoken#10 + 1 -- pbuz1=pbum2_plus_1 clc - lda.z pathtoken_1 + lda pathtoken_1 adc #1 sta.z path - lda.z pathtoken_1+1 + lda pathtoken_1+1 adc #0 sta.z path+1 jmp __b14 .segment Data fopen__11: .word 0 .label fopen__16 = ferror.return + fopen__28: .word 0 cbm_k_setnam1_filename: .word 0 cbm_k_setnam1_filename_len: .byte 0 cbm_k_readst1_status: .byte 0 cbm_k_close1_channel: .byte 0 - pathpos: .byte 0 + .label pathpos_1 = main.check_status_roms_all1_check_status_rom1_main__0 + pathtoken_1: .word 0 + .label pathcmp = fclose.sp + // Parse path + .label pathstep = main.check_status_roms3_check_status_rom1_main__0 + .label num = main.check_status_smc8_main__0 } .segment Code // fgets @@ -14072,32 +15054,36 @@ fopen: { * @param filename Name of the file to be loaded. * @return ptr the pointer advanced to the point where the stream ends. */ -// __zp($72) unsigned int fgets(__zp($79) char *ptr, __zp($b3) unsigned int size, __zp($c4) struct $2 *stream) +// __zp($bc) unsigned int fgets(__zp($c2) char *ptr, __zp($d5) unsigned int size, __mem() struct $2 *stream) fgets: { - .label cbm_k_chkin1_channel = $db - .label cbm_k_chkin1_status = $d5 - .label cbm_k_readst1_status = $d6 - .label cbm_k_readst2_status = $7b - .label sp = $b2 - .label return = $72 - .label bytes = $5f - .label read = $72 - .label ptr = $79 - .label remaining = $ab - .label stream = $c4 - .label size = $b3 + .label fgets__1 = $eb + .label fgets__8 = $bf + .label fgets__9 = $c5 + .label fgets__13 = $c4 + .label cbm_k_chkin1_status = $f8 + .label cbm_k_readst1_status = $f9 + .label cbm_k_readst2_status = $c7 + .label sp = $d4 + .label cbm_k_readst1_return = $eb + .label return = $bc + .label bytes = $a9 + .label cbm_k_readst2_return = $bf + .label read = $bc + .label ptr = $c2 + .label remaining = $ce + .label size = $d5 // unsigned char sp = (unsigned char)stream - // [2242] fgets::sp#0 = (char)fgets::stream#2 -- vbuz1=_byte_pssz2 - lda.z stream + // [2299] fgets::sp#0 = (char)fgets::stream#3 -- vbuz1=_byte_pssm2 + lda stream sta.z sp // cbm_k_chkin(__logical) - // [2243] fgets::cbm_k_chkin1_channel = ((char *)&__stdio_file+$40)[fgets::sp#0] -- vbuz1=pbuc1_derefidx_vbuz2 + // [2300] fgets::cbm_k_chkin1_channel = ((char *)&__stdio_file+$40)[fgets::sp#0] -- vbum1=pbuc1_derefidx_vbuz2 tay lda __stdio_file+$40,y - sta.z cbm_k_chkin1_channel + sta cbm_k_chkin1_channel // fgets::cbm_k_chkin1 // char status - // [2244] fgets::cbm_k_chkin1_status = 0 -- vbuz1=vbuc1 + // [2301] fgets::cbm_k_chkin1_status = 0 -- vbuz1=vbuc1 lda #0 sta.z cbm_k_chkin1_status // asm @@ -14107,7 +15093,7 @@ fgets: { sta cbm_k_chkin1_status // fgets::cbm_k_readst1 // char status - // [2246] fgets::cbm_k_readst1_status = 0 -- vbuz1=vbuc1 + // [2303] fgets::cbm_k_readst1_status = 0 -- vbuz1=vbuc1 lda #0 sta.z cbm_k_readst1_status // asm @@ -14115,54 +15101,56 @@ fgets: { jsr CBM_READST sta cbm_k_readst1_status // return status; - // [2248] fgets::cbm_k_readst1_return#0 = fgets::cbm_k_readst1_status -- vbuaa=vbuz1 + // [2305] fgets::cbm_k_readst1_return#0 = fgets::cbm_k_readst1_status -- vbuz1=vbuz2 + sta.z cbm_k_readst1_return // fgets::cbm_k_readst1_@return // } - // [2249] fgets::cbm_k_readst1_return#1 = fgets::cbm_k_readst1_return#0 + // [2306] fgets::cbm_k_readst1_return#1 = fgets::cbm_k_readst1_return#0 // fgets::@11 // cbm_k_readst() - // [2250] fgets::$1 = fgets::cbm_k_readst1_return#1 + // [2307] fgets::$1 = fgets::cbm_k_readst1_return#1 // __status = cbm_k_readst() - // [2251] ((char *)&__stdio_file+$46)[fgets::sp#0] = fgets::$1 -- pbuc1_derefidx_vbuz1=vbuaa + // [2308] ((char *)&__stdio_file+$46)[fgets::sp#0] = fgets::$1 -- pbuc1_derefidx_vbuz1=vbuz2 + lda.z fgets__1 ldy.z sp sta __stdio_file+$46,y // if (__status) - // [2252] if(0==((char *)&__stdio_file+$46)[fgets::sp#0]) goto fgets::@1 -- 0_eq_pbuc1_derefidx_vbuz1_then_la1 + // [2309] if(0==((char *)&__stdio_file+$46)[fgets::sp#0]) goto fgets::@1 -- 0_eq_pbuc1_derefidx_vbuz1_then_la1 lda __stdio_file+$46,y cmp #0 beq __b1 - // [2253] phi from fgets::@11 fgets::@12 fgets::@5 to fgets::@return [phi:fgets::@11/fgets::@12/fgets::@5->fgets::@return] + // [2310] phi from fgets::@11 fgets::@12 fgets::@5 to fgets::@return [phi:fgets::@11/fgets::@12/fgets::@5->fgets::@return] __b8: - // [2253] phi fgets::return#1 = 0 [phi:fgets::@11/fgets::@12/fgets::@5->fgets::@return#0] -- vwuz1=vbuc1 + // [2310] phi fgets::return#1 = 0 [phi:fgets::@11/fgets::@12/fgets::@5->fgets::@return#0] -- vwuz1=vbuc1 lda #<0 sta.z return sta.z return+1 // fgets::@return // } - // [2254] return + // [2311] return rts // fgets::@1 __b1: - // [2255] fgets::remaining#22 = fgets::size#10 -- vwuz1=vwuz2 + // [2312] fgets::remaining#22 = fgets::size#11 -- vwuz1=vwuz2 lda.z size sta.z remaining lda.z size+1 sta.z remaining+1 - // [2256] phi from fgets::@1 to fgets::@2 [phi:fgets::@1->fgets::@2] - // [2256] phi fgets::read#10 = 0 [phi:fgets::@1->fgets::@2#0] -- vwuz1=vwuc1 + // [2313] phi from fgets::@1 to fgets::@2 [phi:fgets::@1->fgets::@2] + // [2313] phi fgets::read#10 = 0 [phi:fgets::@1->fgets::@2#0] -- vwuz1=vwuc1 lda #<0 sta.z read sta.z read+1 - // [2256] phi fgets::remaining#11 = fgets::remaining#22 [phi:fgets::@1->fgets::@2#1] -- register_copy - // [2256] phi fgets::ptr#10 = fgets::ptr#12 [phi:fgets::@1->fgets::@2#2] -- register_copy - // [2256] phi from fgets::@17 fgets::@18 to fgets::@2 [phi:fgets::@17/fgets::@18->fgets::@2] - // [2256] phi fgets::read#10 = fgets::read#1 [phi:fgets::@17/fgets::@18->fgets::@2#0] -- register_copy - // [2256] phi fgets::remaining#11 = fgets::remaining#1 [phi:fgets::@17/fgets::@18->fgets::@2#1] -- register_copy - // [2256] phi fgets::ptr#10 = fgets::ptr#13 [phi:fgets::@17/fgets::@18->fgets::@2#2] -- register_copy + // [2313] phi fgets::remaining#11 = fgets::remaining#22 [phi:fgets::@1->fgets::@2#1] -- register_copy + // [2313] phi fgets::ptr#10 = fgets::ptr#13 [phi:fgets::@1->fgets::@2#2] -- register_copy + // [2313] phi from fgets::@17 fgets::@18 to fgets::@2 [phi:fgets::@17/fgets::@18->fgets::@2] + // [2313] phi fgets::read#10 = fgets::read#1 [phi:fgets::@17/fgets::@18->fgets::@2#0] -- register_copy + // [2313] phi fgets::remaining#11 = fgets::remaining#1 [phi:fgets::@17/fgets::@18->fgets::@2#1] -- register_copy + // [2313] phi fgets::ptr#10 = fgets::ptr#14 [phi:fgets::@17/fgets::@18->fgets::@2#2] -- register_copy // fgets::@2 __b2: // if (!size) - // [2257] if(0==fgets::size#10) goto fgets::@3 -- 0_eq_vwuz1_then_la1 + // [2314] if(0==fgets::size#11) goto fgets::@3 -- 0_eq_vwuz1_then_la1 lda.z size ora.z size+1 bne !__b3+ @@ -14170,7 +15158,7 @@ fgets: { !__b3: // fgets::@8 // if (remaining >= 512) - // [2258] if(fgets::remaining#11>=$200) goto fgets::@4 -- vwuz1_ge_vwuc1_then_la1 + // [2315] if(fgets::remaining#11>=$200) goto fgets::@4 -- vwuz1_ge_vwuc1_then_la1 lda.z remaining+1 cmp #>$200 bcc !+ @@ -14185,26 +15173,26 @@ fgets: { !: // fgets::@9 // cx16_k_macptr(remaining, ptr) - // [2259] cx16_k_macptr::bytes = fgets::remaining#11 -- vbuz1=vwuz2 + // [2316] cx16_k_macptr::bytes = fgets::remaining#11 -- vbuz1=vwuz2 lda.z remaining sta.z cx16_k_macptr.bytes - // [2260] cx16_k_macptr::buffer = (void *)fgets::ptr#10 -- pvoz1=pvoz2 + // [2317] cx16_k_macptr::buffer = (void *)fgets::ptr#10 -- pvoz1=pvoz2 lda.z ptr sta.z cx16_k_macptr.buffer lda.z ptr+1 sta.z cx16_k_macptr.buffer+1 - // [2261] call cx16_k_macptr + // [2318] call cx16_k_macptr jsr cx16_k_macptr - // [2262] cx16_k_macptr::return#4 = cx16_k_macptr::return#1 + // [2319] cx16_k_macptr::return#4 = cx16_k_macptr::return#1 // fgets::@15 __b15: // bytes = cx16_k_macptr(remaining, ptr) - // [2263] fgets::bytes#3 = cx16_k_macptr::return#4 - // [2264] phi from fgets::@13 fgets::@14 fgets::@15 to fgets::cbm_k_readst2 [phi:fgets::@13/fgets::@14/fgets::@15->fgets::cbm_k_readst2] - // [2264] phi fgets::bytes#10 = fgets::bytes#1 [phi:fgets::@13/fgets::@14/fgets::@15->fgets::cbm_k_readst2#0] -- register_copy + // [2320] fgets::bytes#3 = cx16_k_macptr::return#4 + // [2321] phi from fgets::@13 fgets::@14 fgets::@15 to fgets::cbm_k_readst2 [phi:fgets::@13/fgets::@14/fgets::@15->fgets::cbm_k_readst2] + // [2321] phi fgets::bytes#10 = fgets::bytes#1 [phi:fgets::@13/fgets::@14/fgets::@15->fgets::cbm_k_readst2#0] -- register_copy // fgets::cbm_k_readst2 // char status - // [2265] fgets::cbm_k_readst2_status = 0 -- vbuz1=vbuc1 + // [2322] fgets::cbm_k_readst2_status = 0 -- vbuz1=vbuc1 lda #0 sta.z cbm_k_readst2_status // asm @@ -14212,30 +15200,32 @@ fgets: { jsr CBM_READST sta cbm_k_readst2_status // return status; - // [2267] fgets::cbm_k_readst2_return#0 = fgets::cbm_k_readst2_status -- vbuaa=vbuz1 + // [2324] fgets::cbm_k_readst2_return#0 = fgets::cbm_k_readst2_status -- vbuz1=vbuz2 + sta.z cbm_k_readst2_return // fgets::cbm_k_readst2_@return // } - // [2268] fgets::cbm_k_readst2_return#1 = fgets::cbm_k_readst2_return#0 + // [2325] fgets::cbm_k_readst2_return#1 = fgets::cbm_k_readst2_return#0 // fgets::@12 // cbm_k_readst() - // [2269] fgets::$8 = fgets::cbm_k_readst2_return#1 + // [2326] fgets::$8 = fgets::cbm_k_readst2_return#1 // __status = cbm_k_readst() - // [2270] ((char *)&__stdio_file+$46)[fgets::sp#0] = fgets::$8 -- pbuc1_derefidx_vbuz1=vbuaa + // [2327] ((char *)&__stdio_file+$46)[fgets::sp#0] = fgets::$8 -- pbuc1_derefidx_vbuz1=vbuz2 + lda.z fgets__8 ldy.z sp sta __stdio_file+$46,y // __status & 0xBF - // [2271] fgets::$9 = ((char *)&__stdio_file+$46)[fgets::sp#0] & $bf -- vbuaa=pbuc1_derefidx_vbuz1_band_vbuc2 + // [2328] fgets::$9 = ((char *)&__stdio_file+$46)[fgets::sp#0] & $bf -- vbuz1=pbuc1_derefidx_vbuz2_band_vbuc2 lda #$bf and __stdio_file+$46,y + sta.z fgets__9 // if (__status & 0xBF) - // [2272] if(0==fgets::$9) goto fgets::@5 -- 0_eq_vbuaa_then_la1 - cmp #0 + // [2329] if(0==fgets::$9) goto fgets::@5 -- 0_eq_vbuz1_then_la1 beq __b5 jmp __b8 // fgets::@5 __b5: // if (bytes == 0xFFFF) - // [2273] if(fgets::bytes#10!=$ffff) goto fgets::@6 -- vwuz1_neq_vwuc1_then_la1 + // [2330] if(fgets::bytes#10!=$ffff) goto fgets::@6 -- vwuz1_neq_vwuc1_then_la1 lda.z bytes+1 cmp #>$ffff bne __b6 @@ -14246,7 +15236,7 @@ fgets: { // fgets::@6 __b6: // read += bytes - // [2274] fgets::read#1 = fgets::read#10 + fgets::bytes#10 -- vwuz1=vwuz1_plus_vwuz2 + // [2331] fgets::read#1 = fgets::read#10 + fgets::bytes#10 -- vwuz1=vwuz1_plus_vwuz2 clc lda.z read adc.z bytes @@ -14255,7 +15245,7 @@ fgets: { adc.z bytes+1 sta.z read+1 // ptr += bytes - // [2275] fgets::ptr#0 = fgets::ptr#10 + fgets::bytes#10 -- pbuz1=pbuz1_plus_vwuz2 + // [2332] fgets::ptr#0 = fgets::ptr#10 + fgets::bytes#10 -- pbuz1=pbuz1_plus_vwuz2 clc lda.z ptr adc.z bytes @@ -14264,14 +15254,16 @@ fgets: { adc.z bytes+1 sta.z ptr+1 // BYTE1(ptr) - // [2276] fgets::$13 = byte1 fgets::ptr#0 -- vbuaa=_byte1_pbuz1 + // [2333] fgets::$13 = byte1 fgets::ptr#0 -- vbuz1=_byte1_pbuz2 + sta.z fgets__13 // if (BYTE1(ptr) == 0xC0) - // [2277] if(fgets::$13!=$c0) goto fgets::@7 -- vbuaa_neq_vbuc1_then_la1 - cmp #$c0 + // [2334] if(fgets::$13!=$c0) goto fgets::@7 -- vbuz1_neq_vbuc1_then_la1 + lda #$c0 + cmp.z fgets__13 bne __b7 // fgets::@10 // ptr -= 0x2000 - // [2278] fgets::ptr#1 = fgets::ptr#0 - $2000 -- pbuz1=pbuz1_minus_vwuc1 + // [2335] fgets::ptr#1 = fgets::ptr#0 - $2000 -- pbuz1=pbuz1_minus_vwuc1 lda.z ptr sec sbc #<$2000 @@ -14279,12 +15271,12 @@ fgets: { lda.z ptr+1 sbc #>$2000 sta.z ptr+1 - // [2279] phi from fgets::@10 fgets::@6 to fgets::@7 [phi:fgets::@10/fgets::@6->fgets::@7] - // [2279] phi fgets::ptr#13 = fgets::ptr#1 [phi:fgets::@10/fgets::@6->fgets::@7#0] -- register_copy + // [2336] phi from fgets::@10 fgets::@6 to fgets::@7 [phi:fgets::@10/fgets::@6->fgets::@7] + // [2336] phi fgets::ptr#14 = fgets::ptr#1 [phi:fgets::@10/fgets::@6->fgets::@7#0] -- register_copy // fgets::@7 __b7: // remaining -= bytes - // [2280] fgets::remaining#1 = fgets::remaining#11 - fgets::bytes#10 -- vwuz1=vwuz1_minus_vwuz2 + // [2337] fgets::remaining#1 = fgets::remaining#11 - fgets::bytes#10 -- vwuz1=vwuz1_minus_vwuz2 lda.z remaining sec sbc.z bytes @@ -14293,23 +15285,23 @@ fgets: { sbc.z bytes+1 sta.z remaining+1 // while ((__status == 0) && ((size && remaining) || !size)) - // [2281] if(((char *)&__stdio_file+$46)[fgets::sp#0]==0) goto fgets::@16 -- pbuc1_derefidx_vbuz1_eq_0_then_la1 + // [2338] if(((char *)&__stdio_file+$46)[fgets::sp#0]==0) goto fgets::@16 -- pbuc1_derefidx_vbuz1_eq_0_then_la1 ldy.z sp lda __stdio_file+$46,y cmp #0 beq __b16 - // [2253] phi from fgets::@17 fgets::@7 to fgets::@return [phi:fgets::@17/fgets::@7->fgets::@return] - // [2253] phi fgets::return#1 = fgets::read#1 [phi:fgets::@17/fgets::@7->fgets::@return#0] -- register_copy + // [2310] phi from fgets::@17 fgets::@7 to fgets::@return [phi:fgets::@17/fgets::@7->fgets::@return] + // [2310] phi fgets::return#1 = fgets::read#1 [phi:fgets::@17/fgets::@7->fgets::@return#0] -- register_copy rts // fgets::@16 __b16: // while ((__status == 0) && ((size && remaining) || !size)) - // [2282] if(0==fgets::size#10) goto fgets::@17 -- 0_eq_vwuz1_then_la1 + // [2339] if(0==fgets::size#11) goto fgets::@17 -- 0_eq_vwuz1_then_la1 lda.z size ora.z size+1 beq __b17 // fgets::@18 - // [2283] if(0!=fgets::remaining#1) goto fgets::@2 -- 0_neq_vwuz1_then_la1 + // [2340] if(0!=fgets::remaining#1) goto fgets::@2 -- 0_neq_vwuz1_then_la1 lda.z remaining ora.z remaining+1 beq !__b2+ @@ -14317,7 +15309,7 @@ fgets: { !__b2: // fgets::@17 __b17: - // [2284] if(0==fgets::size#10) goto fgets::@2 -- 0_eq_vwuz1_then_la1 + // [2341] if(0==fgets::size#11) goto fgets::@2 -- 0_eq_vwuz1_then_la1 lda.z size ora.z size+1 bne !__b2+ @@ -14327,40 +15319,44 @@ fgets: { // fgets::@4 __b4: // cx16_k_macptr(512, ptr) - // [2285] cx16_k_macptr::bytes = $200 -- vbuz1=vwuc1 + // [2342] cx16_k_macptr::bytes = $200 -- vbuz1=vwuc1 lda #<$200 sta.z cx16_k_macptr.bytes - // [2286] cx16_k_macptr::buffer = (void *)fgets::ptr#10 -- pvoz1=pvoz2 + // [2343] cx16_k_macptr::buffer = (void *)fgets::ptr#10 -- pvoz1=pvoz2 lda.z ptr sta.z cx16_k_macptr.buffer lda.z ptr+1 sta.z cx16_k_macptr.buffer+1 - // [2287] call cx16_k_macptr + // [2344] call cx16_k_macptr jsr cx16_k_macptr - // [2288] cx16_k_macptr::return#3 = cx16_k_macptr::return#1 + // [2345] cx16_k_macptr::return#3 = cx16_k_macptr::return#1 // fgets::@14 // bytes = cx16_k_macptr(512, ptr) - // [2289] fgets::bytes#2 = cx16_k_macptr::return#3 + // [2346] fgets::bytes#2 = cx16_k_macptr::return#3 jmp __b15 // fgets::@3 __b3: // cx16_k_macptr(0, ptr) - // [2290] cx16_k_macptr::bytes = 0 -- vbuz1=vbuc1 + // [2347] cx16_k_macptr::bytes = 0 -- vbuz1=vbuc1 lda #0 sta.z cx16_k_macptr.bytes - // [2291] cx16_k_macptr::buffer = (void *)fgets::ptr#10 -- pvoz1=pvoz2 + // [2348] cx16_k_macptr::buffer = (void *)fgets::ptr#10 -- pvoz1=pvoz2 lda.z ptr sta.z cx16_k_macptr.buffer lda.z ptr+1 sta.z cx16_k_macptr.buffer+1 - // [2292] call cx16_k_macptr + // [2349] call cx16_k_macptr jsr cx16_k_macptr - // [2293] cx16_k_macptr::return#2 = cx16_k_macptr::return#1 + // [2350] cx16_k_macptr::return#2 = cx16_k_macptr::return#1 // fgets::@13 // bytes = cx16_k_macptr(0, ptr) - // [2294] fgets::bytes#1 = cx16_k_macptr::return#2 + // [2351] fgets::bytes#1 = cx16_k_macptr::return#2 jmp __b15 + .segment Data + cbm_k_chkin1_channel: .byte 0 + stream: .word 0 } +.segment Code // fclose /** * @brief Close a file. @@ -14370,21 +15366,25 @@ fgets: { * - 0x0000: Something is wrong! Kernal Error Code (https://commodore.ca/manuals/pdfs/commodore_error_messages.pdf) * - other: OK! The last pointer between 0xA000 and 0xBFFF is returned. Note that the last pointer is indicating the first free byte. */ -// int fclose(__zp($4b) struct $2 *stream) +// int fclose(__zp($62) struct $2 *stream) fclose: { - .label stream = $4b + .label fclose__1 = $6b + .label fclose__4 = $43 + .label cbm_k_readst1_return = $6b + .label cbm_k_readst2_return = $43 + .label stream = $62 // unsigned char sp = (unsigned char)stream - // [2296] fclose::sp#0 = (char)fclose::stream#2 -- vbum1=_byte_pssz2 + // [2353] fclose::sp#0 = (char)fclose::stream#2 -- vbum1=_byte_pssz2 lda.z stream sta sp // cbm_k_chkin(__logical) - // [2297] fclose::cbm_k_chkin1_channel = ((char *)&__stdio_file+$40)[fclose::sp#0] -- vbum1=pbuc1_derefidx_vbum2 + // [2354] fclose::cbm_k_chkin1_channel = ((char *)&__stdio_file+$40)[fclose::sp#0] -- vbum1=pbuc1_derefidx_vbum2 tay lda __stdio_file+$40,y sta cbm_k_chkin1_channel // fclose::cbm_k_chkin1 // char status - // [2298] fclose::cbm_k_chkin1_status = 0 -- vbum1=vbuc1 + // [2355] fclose::cbm_k_chkin1_status = 0 -- vbum1=vbuc1 lda #0 sta cbm_k_chkin1_status // asm @@ -14394,7 +15394,7 @@ fclose: { sta cbm_k_chkin1_status // fclose::cbm_k_readst1 // char status - // [2300] fclose::cbm_k_readst1_status = 0 -- vbum1=vbuc1 + // [2357] fclose::cbm_k_readst1_status = 0 -- vbum1=vbuc1 lda #0 sta cbm_k_readst1_status // asm @@ -14402,30 +15402,32 @@ fclose: { jsr CBM_READST sta cbm_k_readst1_status // return status; - // [2302] fclose::cbm_k_readst1_return#0 = fclose::cbm_k_readst1_status -- vbuaa=vbum1 + // [2359] fclose::cbm_k_readst1_return#0 = fclose::cbm_k_readst1_status -- vbuz1=vbum2 + sta.z cbm_k_readst1_return // fclose::cbm_k_readst1_@return // } - // [2303] fclose::cbm_k_readst1_return#1 = fclose::cbm_k_readst1_return#0 + // [2360] fclose::cbm_k_readst1_return#1 = fclose::cbm_k_readst1_return#0 // fclose::@3 // cbm_k_readst() - // [2304] fclose::$1 = fclose::cbm_k_readst1_return#1 + // [2361] fclose::$1 = fclose::cbm_k_readst1_return#1 // __status = cbm_k_readst() - // [2305] ((char *)&__stdio_file+$46)[fclose::sp#0] = fclose::$1 -- pbuc1_derefidx_vbum1=vbuaa + // [2362] ((char *)&__stdio_file+$46)[fclose::sp#0] = fclose::$1 -- pbuc1_derefidx_vbum1=vbuz2 + lda.z fclose__1 ldy sp sta __stdio_file+$46,y // if (__status) - // [2306] if(0==((char *)&__stdio_file+$46)[fclose::sp#0]) goto fclose::@1 -- 0_eq_pbuc1_derefidx_vbum1_then_la1 + // [2363] if(0==((char *)&__stdio_file+$46)[fclose::sp#0]) goto fclose::@1 -- 0_eq_pbuc1_derefidx_vbum1_then_la1 lda __stdio_file+$46,y cmp #0 beq __b1 // fclose::@return // } - // [2307] return + // [2364] return rts // fclose::@1 __b1: // cbm_k_close(__logical) - // [2308] fclose::cbm_k_close1_channel = ((char *)&__stdio_file+$40)[fclose::sp#0] -- vbum1=pbuc1_derefidx_vbum2 + // [2365] fclose::cbm_k_close1_channel = ((char *)&__stdio_file+$40)[fclose::sp#0] -- vbum1=pbuc1_derefidx_vbum2 ldy sp lda __stdio_file+$40,y sta cbm_k_close1_channel @@ -14435,7 +15437,7 @@ fclose: { jsr CBM_CLOSE // fclose::cbm_k_readst2 // char status - // [2310] fclose::cbm_k_readst2_status = 0 -- vbum1=vbuc1 + // [2367] fclose::cbm_k_readst2_status = 0 -- vbum1=vbuc1 lda #0 sta cbm_k_readst2_status // asm @@ -14443,19 +15445,21 @@ fclose: { jsr CBM_READST sta cbm_k_readst2_status // return status; - // [2312] fclose::cbm_k_readst2_return#0 = fclose::cbm_k_readst2_status -- vbuaa=vbum1 + // [2369] fclose::cbm_k_readst2_return#0 = fclose::cbm_k_readst2_status -- vbuz1=vbum2 + sta.z cbm_k_readst2_return // fclose::cbm_k_readst2_@return // } - // [2313] fclose::cbm_k_readst2_return#1 = fclose::cbm_k_readst2_return#0 + // [2370] fclose::cbm_k_readst2_return#1 = fclose::cbm_k_readst2_return#0 // fclose::@4 // cbm_k_readst() - // [2314] fclose::$4 = fclose::cbm_k_readst2_return#1 + // [2371] fclose::$4 = fclose::cbm_k_readst2_return#1 // __status = cbm_k_readst() - // [2315] ((char *)&__stdio_file+$46)[fclose::sp#0] = fclose::$4 -- pbuc1_derefidx_vbum1=vbuaa + // [2372] ((char *)&__stdio_file+$46)[fclose::sp#0] = fclose::$4 -- pbuc1_derefidx_vbum1=vbuz2 + lda.z fclose__4 ldy sp sta __stdio_file+$46,y // if (__status) - // [2316] if(0==((char *)&__stdio_file+$46)[fclose::sp#0]) goto fclose::@2 -- 0_eq_pbuc1_derefidx_vbum1_then_la1 + // [2373] if(0==((char *)&__stdio_file+$46)[fclose::sp#0]) goto fclose::@2 -- 0_eq_pbuc1_derefidx_vbum1_then_la1 lda __stdio_file+$46,y cmp #0 beq __b2 @@ -14463,30 +15467,30 @@ fclose: { // fclose::@2 __b2: // __logical = 0 - // [2317] ((char *)&__stdio_file+$40)[fclose::sp#0] = 0 -- pbuc1_derefidx_vbum1=vbuc2 + // [2374] ((char *)&__stdio_file+$40)[fclose::sp#0] = 0 -- pbuc1_derefidx_vbum1=vbuc2 lda #0 ldy sp sta __stdio_file+$40,y // __device = 0 - // [2318] ((char *)&__stdio_file+$42)[fclose::sp#0] = 0 -- pbuc1_derefidx_vbum1=vbuc2 + // [2375] ((char *)&__stdio_file+$42)[fclose::sp#0] = 0 -- pbuc1_derefidx_vbum1=vbuc2 sta __stdio_file+$42,y // __channel = 0 - // [2319] ((char *)&__stdio_file+$44)[fclose::sp#0] = 0 -- pbuc1_derefidx_vbum1=vbuc2 + // [2376] ((char *)&__stdio_file+$44)[fclose::sp#0] = 0 -- pbuc1_derefidx_vbum1=vbuc2 sta __stdio_file+$44,y // __filename - // [2320] fclose::$6 = fclose::sp#0 << 1 -- vbuaa=vbum1_rol_1 - tya - asl + // [2377] fclose::$6 = fclose::sp#0 << 1 -- vbum1=vbum1_rol_1 + asl fclose__6 // *__filename = '\0' - // [2321] ((char *)&__stdio_file)[fclose::$6] = '@' -- pbuc1_derefidx_vbuaa=vbuc2 - tay + // [2378] ((char *)&__stdio_file)[fclose::$6] = '@' -- pbuc1_derefidx_vbum1=vbuc2 lda #'@' + ldy fclose__6 sta __stdio_file,y // __stdio_filecount--; - // [2322] __stdio_filecount = -- __stdio_filecount -- vbum1=_dec_vbum1 + // [2379] __stdio_filecount = -- __stdio_filecount -- vbum1=_dec_vbum1 dec __stdio_filecount rts .segment Data + .label fclose__6 = sp cbm_k_chkin1_channel: .byte 0 cbm_k_chkin1_status: .byte 0 cbm_k_readst1_status: .byte 0 @@ -14497,228 +15501,264 @@ fclose: { .segment Code // strlen // Computes the length of the string str up to but not including the terminating null character. -// __zp($43) unsigned int strlen(__zp($40) char *str) +// __zp($55) unsigned int strlen(__zp($51) char *str) strlen: { - .label return = $43 - .label len = $43 - .label str = $40 - // [2324] phi from strlen to strlen::@1 [phi:strlen->strlen::@1] - // [2324] phi strlen::len#2 = 0 [phi:strlen->strlen::@1#0] -- vwuz1=vwuc1 + .label return = $55 + .label len = $55 + .label str = $51 + // [2381] phi from strlen to strlen::@1 [phi:strlen->strlen::@1] + // [2381] phi strlen::len#2 = 0 [phi:strlen->strlen::@1#0] -- vwuz1=vwuc1 lda #<0 sta.z len sta.z len+1 - // [2324] phi strlen::str#6 = strlen::str#8 [phi:strlen->strlen::@1#1] -- register_copy + // [2381] phi strlen::str#6 = strlen::str#8 [phi:strlen->strlen::@1#1] -- register_copy // strlen::@1 __b1: // while(*str) - // [2325] if(0!=*strlen::str#6) goto strlen::@2 -- 0_neq__deref_pbuz1_then_la1 + // [2382] if(0!=*strlen::str#6) goto strlen::@2 -- 0_neq__deref_pbuz1_then_la1 ldy #0 lda (str),y cmp #0 bne __b2 // strlen::@return // } - // [2326] return + // [2383] return rts // strlen::@2 __b2: // len++; - // [2327] strlen::len#1 = ++ strlen::len#2 -- vwuz1=_inc_vwuz1 + // [2384] strlen::len#1 = ++ strlen::len#2 -- vwuz1=_inc_vwuz1 inc.z len bne !+ inc.z len+1 !: // str++; - // [2328] strlen::str#1 = ++ strlen::str#6 -- pbuz1=_inc_pbuz1 + // [2385] strlen::str#1 = ++ strlen::str#6 -- pbuz1=_inc_pbuz1 inc.z str bne !+ inc.z str+1 !: - // [2324] phi from strlen::@2 to strlen::@1 [phi:strlen::@2->strlen::@1] - // [2324] phi strlen::len#2 = strlen::len#1 [phi:strlen::@2->strlen::@1#0] -- register_copy - // [2324] phi strlen::str#6 = strlen::str#1 [phi:strlen::@2->strlen::@1#1] -- register_copy + // [2381] phi from strlen::@2 to strlen::@1 [phi:strlen::@2->strlen::@1] + // [2381] phi strlen::len#2 = strlen::len#1 [phi:strlen::@2->strlen::@1#0] -- register_copy + // [2381] phi strlen::str#6 = strlen::str#1 [phi:strlen::@2->strlen::@1#1] -- register_copy jmp __b1 } // printf_padding // Print a padding char a number of times -// void printf_padding(__zp($36) void (*putc)(char), __zp($53) char pad, __zp($52) char length) +// void printf_padding(__zp($51) void (*putc)(char), __zp($70) char pad, __zp($6a) char length) printf_padding: { - .label i = $42 - .label putc = $36 - .label length = $52 - .label pad = $53 - // [2330] phi from printf_padding to printf_padding::@1 [phi:printf_padding->printf_padding::@1] - // [2330] phi printf_padding::i#2 = 0 [phi:printf_padding->printf_padding::@1#0] -- vbuz1=vbuc1 + .label i = $53 + .label putc = $51 + .label length = $6a + .label pad = $70 + // [2387] phi from printf_padding to printf_padding::@1 [phi:printf_padding->printf_padding::@1] + // [2387] phi printf_padding::i#2 = 0 [phi:printf_padding->printf_padding::@1#0] -- vbuz1=vbuc1 lda #0 sta.z i // printf_padding::@1 __b1: // for(char i=0;iprintf_padding::@1] - // [2330] phi printf_padding::i#2 = printf_padding::i#1 [phi:printf_padding::@3->printf_padding::@1#0] -- register_copy + // [2387] phi from printf_padding::@3 to printf_padding::@1 [phi:printf_padding::@3->printf_padding::@1] + // [2387] phi printf_padding::i#2 = printf_padding::i#1 [phi:printf_padding::@3->printf_padding::@1#0] -- register_copy jmp __b1 // Outside Flow icall38: jmp (putc) } + // cbm_k_getin +/** + * @brief Scan a character from keyboard without pressing enter. + * + * @return char The character read. + */ +cbm_k_getin: { + .label return = $6b + // __mem unsigned char ch + // [2394] cbm_k_getin::ch = 0 -- vbum1=vbuc1 + lda #0 + sta ch + // asm + // asm { jsrCBM_GETIN stach } + jsr CBM_GETIN + sta ch + // return ch; + // [2396] cbm_k_getin::return#0 = cbm_k_getin::ch -- vbuz1=vbum2 + sta.z return + // cbm_k_getin::@return + // } + // [2397] cbm_k_getin::return#1 = cbm_k_getin::return#0 + // [2398] return + rts + .segment Data + ch: .byte 0 +} +.segment Code // uctoa // Converts unsigned number value to a string representing it in RADIX format. // If the leading digits are zero they are not included in the string. // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// void uctoa(__register(X) char value, __zp($4b) char *buffer, __register(Y) char radix) +// void uctoa(__zp($2f) char value, __zp($62) char *buffer, __zp($e2) char radix) uctoa: { - .label buffer = $4b - .label digit = $4f - .label started = $54 - .label max_digits = $74 - .label digit_values = $72 + .label uctoa__4 = $6b + .label digit_value = $43 + .label buffer = $62 + .label digit = $66 + .label value = $2f + .label radix = $e2 + .label started = $71 + .label max_digits = $be + .label digit_values = $bc // if(radix==DECIMAL) - // [2337] if(uctoa::radix#0==DECIMAL) goto uctoa::@1 -- vbuyy_eq_vbuc1_then_la1 - cpy #DECIMAL + // [2399] if(uctoa::radix#0==DECIMAL) goto uctoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #DECIMAL + cmp.z radix beq __b2 // uctoa::@2 // if(radix==HEXADECIMAL) - // [2338] if(uctoa::radix#0==HEXADECIMAL) goto uctoa::@1 -- vbuyy_eq_vbuc1_then_la1 - cpy #HEXADECIMAL + // [2400] if(uctoa::radix#0==HEXADECIMAL) goto uctoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #HEXADECIMAL + cmp.z radix beq __b3 // uctoa::@3 // if(radix==OCTAL) - // [2339] if(uctoa::radix#0==OCTAL) goto uctoa::@1 -- vbuyy_eq_vbuc1_then_la1 - cpy #OCTAL + // [2401] if(uctoa::radix#0==OCTAL) goto uctoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #OCTAL + cmp.z radix beq __b4 // uctoa::@4 // if(radix==BINARY) - // [2340] if(uctoa::radix#0==BINARY) goto uctoa::@1 -- vbuyy_eq_vbuc1_then_la1 - cpy #BINARY + // [2402] if(uctoa::radix#0==BINARY) goto uctoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #BINARY + cmp.z radix beq __b5 // uctoa::@5 // *buffer++ = 'e' - // [2341] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS) = 'e' -- _deref_pbuc1=vbuc2 + // [2403] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS) = 'e' -- _deref_pbuc1=vbuc2 // Unknown radix lda #'e' sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS // *buffer++ = 'r' - // [2342] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+1) = 'r' -- _deref_pbuc1=vbuc2 + // [2404] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+1) = 'r' -- _deref_pbuc1=vbuc2 lda #'r' sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+1 - // [2343] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+2) = 'r' -- _deref_pbuc1=vbuc2 + // [2405] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+2) = 'r' -- _deref_pbuc1=vbuc2 sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+2 // *buffer = 0 - // [2344] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+3) = 0 -- _deref_pbuc1=vbuc2 + // [2406] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+3) = 0 -- _deref_pbuc1=vbuc2 lda #0 sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+3 // uctoa::@return // } - // [2345] return + // [2407] return rts - // [2346] phi from uctoa to uctoa::@1 [phi:uctoa->uctoa::@1] + // [2408] phi from uctoa to uctoa::@1 [phi:uctoa->uctoa::@1] __b2: - // [2346] phi uctoa::digit_values#8 = RADIX_DECIMAL_VALUES_CHAR [phi:uctoa->uctoa::@1#0] -- pbuz1=pbuc1 + // [2408] phi uctoa::digit_values#8 = RADIX_DECIMAL_VALUES_CHAR [phi:uctoa->uctoa::@1#0] -- pbuz1=pbuc1 lda #RADIX_DECIMAL_VALUES_CHAR sta.z digit_values+1 - // [2346] phi uctoa::max_digits#7 = 3 [phi:uctoa->uctoa::@1#1] -- vbuz1=vbuc1 + // [2408] phi uctoa::max_digits#7 = 3 [phi:uctoa->uctoa::@1#1] -- vbuz1=vbuc1 lda #3 sta.z max_digits jmp __b1 - // [2346] phi from uctoa::@2 to uctoa::@1 [phi:uctoa::@2->uctoa::@1] + // [2408] phi from uctoa::@2 to uctoa::@1 [phi:uctoa::@2->uctoa::@1] __b3: - // [2346] phi uctoa::digit_values#8 = RADIX_HEXADECIMAL_VALUES_CHAR [phi:uctoa::@2->uctoa::@1#0] -- pbuz1=pbuc1 + // [2408] phi uctoa::digit_values#8 = RADIX_HEXADECIMAL_VALUES_CHAR [phi:uctoa::@2->uctoa::@1#0] -- pbuz1=pbuc1 lda #RADIX_HEXADECIMAL_VALUES_CHAR sta.z digit_values+1 - // [2346] phi uctoa::max_digits#7 = 2 [phi:uctoa::@2->uctoa::@1#1] -- vbuz1=vbuc1 + // [2408] phi uctoa::max_digits#7 = 2 [phi:uctoa::@2->uctoa::@1#1] -- vbuz1=vbuc1 lda #2 sta.z max_digits jmp __b1 - // [2346] phi from uctoa::@3 to uctoa::@1 [phi:uctoa::@3->uctoa::@1] + // [2408] phi from uctoa::@3 to uctoa::@1 [phi:uctoa::@3->uctoa::@1] __b4: - // [2346] phi uctoa::digit_values#8 = RADIX_OCTAL_VALUES_CHAR [phi:uctoa::@3->uctoa::@1#0] -- pbuz1=pbuc1 + // [2408] phi uctoa::digit_values#8 = RADIX_OCTAL_VALUES_CHAR [phi:uctoa::@3->uctoa::@1#0] -- pbuz1=pbuc1 lda #RADIX_OCTAL_VALUES_CHAR sta.z digit_values+1 - // [2346] phi uctoa::max_digits#7 = 3 [phi:uctoa::@3->uctoa::@1#1] -- vbuz1=vbuc1 + // [2408] phi uctoa::max_digits#7 = 3 [phi:uctoa::@3->uctoa::@1#1] -- vbuz1=vbuc1 lda #3 sta.z max_digits jmp __b1 - // [2346] phi from uctoa::@4 to uctoa::@1 [phi:uctoa::@4->uctoa::@1] + // [2408] phi from uctoa::@4 to uctoa::@1 [phi:uctoa::@4->uctoa::@1] __b5: - // [2346] phi uctoa::digit_values#8 = RADIX_BINARY_VALUES_CHAR [phi:uctoa::@4->uctoa::@1#0] -- pbuz1=pbuc1 + // [2408] phi uctoa::digit_values#8 = RADIX_BINARY_VALUES_CHAR [phi:uctoa::@4->uctoa::@1#0] -- pbuz1=pbuc1 lda #RADIX_BINARY_VALUES_CHAR sta.z digit_values+1 - // [2346] phi uctoa::max_digits#7 = 8 [phi:uctoa::@4->uctoa::@1#1] -- vbuz1=vbuc1 + // [2408] phi uctoa::max_digits#7 = 8 [phi:uctoa::@4->uctoa::@1#1] -- vbuz1=vbuc1 lda #8 sta.z max_digits // uctoa::@1 __b1: - // [2347] phi from uctoa::@1 to uctoa::@6 [phi:uctoa::@1->uctoa::@6] - // [2347] phi uctoa::buffer#11 = (char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:uctoa::@1->uctoa::@6#0] -- pbuz1=pbuc1 + // [2409] phi from uctoa::@1 to uctoa::@6 [phi:uctoa::@1->uctoa::@6] + // [2409] phi uctoa::buffer#11 = (char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:uctoa::@1->uctoa::@6#0] -- pbuz1=pbuc1 lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS sta.z buffer+1 - // [2347] phi uctoa::started#2 = 0 [phi:uctoa::@1->uctoa::@6#1] -- vbuz1=vbuc1 + // [2409] phi uctoa::started#2 = 0 [phi:uctoa::@1->uctoa::@6#1] -- vbuz1=vbuc1 lda #0 sta.z started - // [2347] phi uctoa::value#2 = uctoa::value#1 [phi:uctoa::@1->uctoa::@6#2] -- register_copy - // [2347] phi uctoa::digit#2 = 0 [phi:uctoa::@1->uctoa::@6#3] -- vbuz1=vbuc1 + // [2409] phi uctoa::value#2 = uctoa::value#1 [phi:uctoa::@1->uctoa::@6#2] -- register_copy + // [2409] phi uctoa::digit#2 = 0 [phi:uctoa::@1->uctoa::@6#3] -- vbuz1=vbuc1 sta.z digit // uctoa::@6 __b6: // max_digits-1 - // [2348] uctoa::$4 = uctoa::max_digits#7 - 1 -- vbuaa=vbuz1_minus_1 - lda.z max_digits - sec - sbc #1 + // [2410] uctoa::$4 = uctoa::max_digits#7 - 1 -- vbuz1=vbuz2_minus_1 + ldx.z max_digits + dex + stx.z uctoa__4 // for( char digit=0; digit= digit_value) - // [2354] if(0!=uctoa::started#2) goto uctoa::@10 -- 0_neq_vbuz1_then_la1 + // [2416] if(0!=uctoa::started#2) goto uctoa::@10 -- 0_neq_vbuz1_then_la1 lda.z started bne __b10 // uctoa::@12 - // [2355] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@10 -- vbuxx_ge_vbuyy_then_la1 - sty.z $ff - cpx.z $ff + // [2417] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@10 -- vbuz1_ge_vbuz2_then_la1 + lda.z value + cmp.z digit_value bcs __b10 - // [2356] phi from uctoa::@12 to uctoa::@9 [phi:uctoa::@12->uctoa::@9] - // [2356] phi uctoa::buffer#14 = uctoa::buffer#11 [phi:uctoa::@12->uctoa::@9#0] -- register_copy - // [2356] phi uctoa::started#4 = uctoa::started#2 [phi:uctoa::@12->uctoa::@9#1] -- register_copy - // [2356] phi uctoa::value#6 = uctoa::value#2 [phi:uctoa::@12->uctoa::@9#2] -- register_copy + // [2418] phi from uctoa::@12 to uctoa::@9 [phi:uctoa::@12->uctoa::@9] + // [2418] phi uctoa::buffer#14 = uctoa::buffer#11 [phi:uctoa::@12->uctoa::@9#0] -- register_copy + // [2418] phi uctoa::started#4 = uctoa::started#2 [phi:uctoa::@12->uctoa::@9#1] -- register_copy + // [2418] phi uctoa::value#6 = uctoa::value#2 [phi:uctoa::@12->uctoa::@9#2] -- register_copy // uctoa::@9 __b9: // for( char digit=0; digituctoa::@6] - // [2347] phi uctoa::buffer#11 = uctoa::buffer#14 [phi:uctoa::@9->uctoa::@6#0] -- register_copy - // [2347] phi uctoa::started#2 = uctoa::started#4 [phi:uctoa::@9->uctoa::@6#1] -- register_copy - // [2347] phi uctoa::value#2 = uctoa::value#6 [phi:uctoa::@9->uctoa::@6#2] -- register_copy - // [2347] phi uctoa::digit#2 = uctoa::digit#1 [phi:uctoa::@9->uctoa::@6#3] -- register_copy + // [2409] phi from uctoa::@9 to uctoa::@6 [phi:uctoa::@9->uctoa::@6] + // [2409] phi uctoa::buffer#11 = uctoa::buffer#14 [phi:uctoa::@9->uctoa::@6#0] -- register_copy + // [2409] phi uctoa::started#2 = uctoa::started#4 [phi:uctoa::@9->uctoa::@6#1] -- register_copy + // [2409] phi uctoa::value#2 = uctoa::value#6 [phi:uctoa::@9->uctoa::@6#2] -- register_copy + // [2409] phi uctoa::digit#2 = uctoa::digit#1 [phi:uctoa::@9->uctoa::@6#3] -- register_copy jmp __b6 // uctoa::@10 __b10: // uctoa_append(buffer++, value, digit_value) - // [2358] uctoa_append::buffer#0 = uctoa::buffer#11 -- pbuz1=pbuz2 + // [2420] uctoa_append::buffer#0 = uctoa::buffer#11 -- pbuz1=pbuz2 lda.z buffer sta.z uctoa_append.buffer lda.z buffer+1 sta.z uctoa_append.buffer+1 - // [2359] uctoa_append::value#0 = uctoa::value#2 - // [2360] uctoa_append::sub#0 = uctoa::digit_value#0 -- vbuz1=vbuyy - sty.z uctoa_append.sub - // [2361] call uctoa_append - // [2713] phi from uctoa::@10 to uctoa_append [phi:uctoa::@10->uctoa_append] + // [2421] uctoa_append::value#0 = uctoa::value#2 + // [2422] uctoa_append::sub#0 = uctoa::digit_value#0 + // [2423] call uctoa_append + // [2770] phi from uctoa::@10 to uctoa_append [phi:uctoa::@10->uctoa_append] jsr uctoa_append // uctoa_append(buffer++, value, digit_value) - // [2362] uctoa_append::return#0 = uctoa_append::value#2 + // [2424] uctoa_append::return#0 = uctoa_append::value#2 // uctoa::@11 // value = uctoa_append(buffer++, value, digit_value) - // [2363] uctoa::value#0 = uctoa_append::return#0 + // [2425] uctoa::value#0 = uctoa_append::return#0 // value = uctoa_append(buffer++, value, digit_value); - // [2364] uctoa::buffer#4 = ++ uctoa::buffer#11 -- pbuz1=_inc_pbuz1 + // [2426] uctoa::buffer#4 = ++ uctoa::buffer#11 -- pbuz1=_inc_pbuz1 inc.z buffer bne !+ inc.z buffer+1 !: - // [2356] phi from uctoa::@11 to uctoa::@9 [phi:uctoa::@11->uctoa::@9] - // [2356] phi uctoa::buffer#14 = uctoa::buffer#4 [phi:uctoa::@11->uctoa::@9#0] -- register_copy - // [2356] phi uctoa::started#4 = 1 [phi:uctoa::@11->uctoa::@9#1] -- vbuz1=vbuc1 + // [2418] phi from uctoa::@11 to uctoa::@9 [phi:uctoa::@11->uctoa::@9] + // [2418] phi uctoa::buffer#14 = uctoa::buffer#4 [phi:uctoa::@11->uctoa::@9#0] -- register_copy + // [2418] phi uctoa::started#4 = 1 [phi:uctoa::@11->uctoa::@9#1] -- vbuz1=vbuc1 lda #1 sta.z started - // [2356] phi uctoa::value#6 = uctoa::value#0 [phi:uctoa::@11->uctoa::@9#2] -- register_copy + // [2418] phi uctoa::value#6 = uctoa::value#0 [phi:uctoa::@11->uctoa::@9#2] -- register_copy jmp __b9 } // rom_address_from_bank @@ -14796,19 +15835,20 @@ uctoa: { * @return unsigned long The 22 bit ROM address. */ /* inline */ -// __mem() unsigned long rom_address_from_bank(__register(A) char rom_bank) +// __mem() unsigned long rom_address_from_bank(__mem() char rom_bank) rom_address_from_bank: { - .label rom_address_from_bank__1 = $45 - .label return = $45 - .label return_1 = $63 + .label rom_address_from_bank__1 = $57 + .label return = $57 + .label return_1 = $ab // ((unsigned long)(rom_bank)) << 14 - // [2366] rom_address_from_bank::$1 = (unsigned long)rom_address_from_bank::rom_bank#3 -- vduz1=_dword_vbuaa + // [2428] rom_address_from_bank::$1 = (unsigned long)rom_address_from_bank::rom_bank#3 -- vduz1=_dword_vbum2 + lda rom_bank sta.z rom_address_from_bank__1 lda #0 sta.z rom_address_from_bank__1+1 sta.z rom_address_from_bank__1+2 sta.z rom_address_from_bank__1+3 - // [2367] rom_address_from_bank::return#0 = rom_address_from_bank::$1 << $e -- vduz1=vduz1_rol_vbuc1 + // [2429] rom_address_from_bank::return#0 = rom_address_from_bank::$1 << $e -- vduz1=vduz1_rol_vbuc1 ldx #$e cpx #0 beq !e+ @@ -14822,60 +15862,73 @@ rom_address_from_bank: { !e: // rom_address_from_bank::@return // } - // [2368] return + // [2430] return rts .segment Data + .label rom_bank = rom_get_release.rom_get_release__0 .label return_2 = main.flashed_bytes } .segment Code // rom_compare -// __zp($61) unsigned int rom_compare(__register(X) char bank_ram, __zp($40) char *ptr_ram, __zp($45) unsigned long rom_compare_address, __zp($ae) unsigned int rom_compare_size) +// __zp($51) unsigned int rom_compare(__zp($ec) char bank_ram, __zp($b4) char *ptr_ram, __zp($57) unsigned long rom_compare_address, __zp($d2) unsigned int rom_compare_size) rom_compare: { - .label rom_bank1_rom_compare__2 = $55 - .label rom_ptr1_rom_compare__0 = $59 - .label rom_ptr1_rom_compare__2 = $59 - .label rom_bank1_bank_unshifted = $55 - .label rom_ptr1_return = $59 - .label ptr_rom = $59 - .label ptr_ram = $40 - .label compared_bytes = $67 + .label rom_compare__5 = $35 + .label rom_bank1_rom_compare__0 = $6c + .label rom_bank1_rom_compare__1 = $e3 + .label rom_bank1_rom_compare__2 = $74 + .label rom_ptr1_rom_compare__0 = $79 + .label rom_ptr1_rom_compare__2 = $79 + .label bank_set_bram1_bank = $ec + .label rom_bank1_bank_unshifted = $74 + .label rom_bank1_return = $6e + .label rom_ptr1_return = $79 + .label ptr_rom = $79 + .label ptr_ram = $b4 + .label compared_bytes = $af /// Holds the amount of bytes actually verified between the ROM and the RAM. - .label equal_bytes = $61 - .label rom_compare_address = $45 - .label return = $61 - .label rom_compare_size = $ae + .label equal_bytes = $51 + .label bank_ram = $ec + .label rom_compare_address = $57 + .label return = $51 + .label rom_compare_size = $d2 // rom_compare::bank_set_bram1 // BRAM = bank - // [2370] BRAM = rom_compare::bank_set_bram1_bank#0 -- vbuz1=vbuxx - stx.z BRAM + // [2432] BRAM = rom_compare::bank_set_bram1_bank#0 -- vbuz1=vbuz2 + lda.z bank_set_bram1_bank + sta.z BRAM // rom_compare::rom_bank1 // BYTE2(address) - // [2371] rom_compare::rom_bank1_$0 = byte2 rom_compare::rom_compare_address#3 -- vbuaa=_byte2_vduz1 + // [2433] rom_compare::rom_bank1_$0 = byte2 rom_compare::rom_compare_address#3 -- vbuz1=_byte2_vduz2 lda.z rom_compare_address+2 + sta.z rom_bank1_rom_compare__0 // BYTE1(address) - // [2372] rom_compare::rom_bank1_$1 = byte1 rom_compare::rom_compare_address#3 -- vbuxx=_byte1_vduz1 - ldx.z rom_compare_address+1 + // [2434] rom_compare::rom_bank1_$1 = byte1 rom_compare::rom_compare_address#3 -- vbuz1=_byte1_vduz2 + lda.z rom_compare_address+1 + sta.z rom_bank1_rom_compare__1 // MAKEWORD(BYTE2(address),BYTE1(address)) - // [2373] rom_compare::rom_bank1_$2 = rom_compare::rom_bank1_$0 w= rom_compare::rom_bank1_$1 -- vwuz1=vbuaa_word_vbuxx + // [2435] rom_compare::rom_bank1_$2 = rom_compare::rom_bank1_$0 w= rom_compare::rom_bank1_$1 -- vwuz1=vbuz2_word_vbuz3 + lda.z rom_bank1_rom_compare__0 sta.z rom_bank1_rom_compare__2+1 - stx.z rom_bank1_rom_compare__2 + lda.z rom_bank1_rom_compare__1 + sta.z rom_bank1_rom_compare__2 // unsigned int bank_unshifted = MAKEWORD(BYTE2(address),BYTE1(address)) << 2 - // [2374] rom_compare::rom_bank1_bank_unshifted#0 = rom_compare::rom_bank1_$2 << 2 -- vwuz1=vwuz1_rol_2 + // [2436] rom_compare::rom_bank1_bank_unshifted#0 = rom_compare::rom_bank1_$2 << 2 -- vwuz1=vwuz1_rol_2 asl.z rom_bank1_bank_unshifted rol.z rom_bank1_bank_unshifted+1 asl.z rom_bank1_bank_unshifted rol.z rom_bank1_bank_unshifted+1 // unsigned char bank = BYTE1(bank_unshifted) - // [2375] rom_compare::rom_bank1_return#0 = byte1 rom_compare::rom_bank1_bank_unshifted#0 -- vbuxx=_byte1_vwuz1 - ldx.z rom_bank1_bank_unshifted+1 + // [2437] rom_compare::rom_bank1_return#0 = byte1 rom_compare::rom_bank1_bank_unshifted#0 -- vbuz1=_byte1_vwuz2 + lda.z rom_bank1_bank_unshifted+1 + sta.z rom_bank1_return // rom_compare::rom_ptr1 // (unsigned int)(address) & ROM_PTR_MASK - // [2376] rom_compare::rom_ptr1_$2 = (unsigned int)rom_compare::rom_compare_address#3 -- vwuz1=_word_vduz2 + // [2438] rom_compare::rom_ptr1_$2 = (unsigned int)rom_compare::rom_compare_address#3 -- vwuz1=_word_vduz2 lda.z rom_compare_address sta.z rom_ptr1_rom_compare__2 lda.z rom_compare_address+1 sta.z rom_ptr1_rom_compare__2+1 - // [2377] rom_compare::rom_ptr1_$0 = rom_compare::rom_ptr1_$2 & $3fff -- vwuz1=vwuz1_band_vwuc1 + // [2439] rom_compare::rom_ptr1_$0 = rom_compare::rom_ptr1_$2 & $3fff -- vwuz1=vwuz1_band_vwuc1 lda.z rom_ptr1_rom_compare__0 and #<$3fff sta.z rom_ptr1_rom_compare__0 @@ -14883,7 +15936,7 @@ rom_compare: { and #>$3fff sta.z rom_ptr1_rom_compare__0+1 // ((unsigned int)(address) & ROM_PTR_MASK) + ROM_BASE - // [2378] rom_compare::rom_ptr1_return#0 = rom_compare::rom_ptr1_$0 + $c000 -- vwuz1=vwuz1_plus_vwuc1 + // [2440] rom_compare::rom_ptr1_return#0 = rom_compare::rom_ptr1_$0 + $c000 -- vwuz1=vwuz1_plus_vwuc1 lda.z rom_ptr1_return clc adc #<$c000 @@ -14893,23 +15946,24 @@ rom_compare: { sta.z rom_ptr1_return+1 // rom_compare::bank_set_brom1 // BROM = bank - // [2379] BROM = rom_compare::rom_bank1_return#0 -- vbuz1=vbuxx - stx.z BROM - // [2380] rom_compare::ptr_rom#9 = (char *)rom_compare::rom_ptr1_return#0 - // [2381] phi from rom_compare::bank_set_brom1 to rom_compare::@1 [phi:rom_compare::bank_set_brom1->rom_compare::@1] - // [2381] phi rom_compare::equal_bytes#2 = 0 [phi:rom_compare::bank_set_brom1->rom_compare::@1#0] -- vwuz1=vwuc1 + // [2441] BROM = rom_compare::rom_bank1_return#0 -- vbuz1=vbuz2 + lda.z rom_bank1_return + sta.z BROM + // [2442] rom_compare::ptr_rom#9 = (char *)rom_compare::rom_ptr1_return#0 + // [2443] phi from rom_compare::bank_set_brom1 to rom_compare::@1 [phi:rom_compare::bank_set_brom1->rom_compare::@1] + // [2443] phi rom_compare::equal_bytes#2 = 0 [phi:rom_compare::bank_set_brom1->rom_compare::@1#0] -- vwuz1=vwuc1 lda #<0 sta.z equal_bytes sta.z equal_bytes+1 - // [2381] phi rom_compare::ptr_ram#4 = rom_compare::ptr_ram#10 [phi:rom_compare::bank_set_brom1->rom_compare::@1#1] -- register_copy - // [2381] phi rom_compare::ptr_rom#2 = rom_compare::ptr_rom#9 [phi:rom_compare::bank_set_brom1->rom_compare::@1#2] -- register_copy - // [2381] phi rom_compare::compared_bytes#2 = 0 [phi:rom_compare::bank_set_brom1->rom_compare::@1#3] -- vwuz1=vwuc1 + // [2443] phi rom_compare::ptr_ram#4 = rom_compare::ptr_ram#10 [phi:rom_compare::bank_set_brom1->rom_compare::@1#1] -- register_copy + // [2443] phi rom_compare::ptr_rom#2 = rom_compare::ptr_rom#9 [phi:rom_compare::bank_set_brom1->rom_compare::@1#2] -- register_copy + // [2443] phi rom_compare::compared_bytes#2 = 0 [phi:rom_compare::bank_set_brom1->rom_compare::@1#3] -- vwuz1=vwuc1 sta.z compared_bytes sta.z compared_bytes+1 // rom_compare::@1 __b1: // while (compared_bytes < rom_compare_size) - // [2382] if(rom_compare::compared_bytes#2rom_compare::@3] - // [2391] phi rom_compare::equal_bytes#6 = rom_compare::equal_bytes#1 [phi:rom_compare::@4/rom_compare::@5->rom_compare::@3#0] -- register_copy + // [2453] phi from rom_compare::@4 rom_compare::@5 to rom_compare::@3 [phi:rom_compare::@4/rom_compare::@5->rom_compare::@3] + // [2453] phi rom_compare::equal_bytes#6 = rom_compare::equal_bytes#1 [phi:rom_compare::@4/rom_compare::@5->rom_compare::@3#0] -- register_copy // rom_compare::@3 __b3: // ptr_rom++; - // [2392] rom_compare::ptr_rom#1 = ++ rom_compare::ptr_rom#2 -- pbuz1=_inc_pbuz1 + // [2454] rom_compare::ptr_rom#1 = ++ rom_compare::ptr_rom#2 -- pbuz1=_inc_pbuz1 inc.z ptr_rom bne !+ inc.z ptr_rom+1 !: // ptr_ram++; - // [2393] rom_compare::ptr_ram#0 = ++ rom_compare::ptr_ram#4 -- pbuz1=_inc_pbuz1 + // [2455] rom_compare::ptr_ram#0 = ++ rom_compare::ptr_ram#4 -- pbuz1=_inc_pbuz1 inc.z ptr_ram bne !+ inc.z ptr_ram+1 !: // compared_bytes++; - // [2394] rom_compare::compared_bytes#1 = ++ rom_compare::compared_bytes#2 -- vwuz1=_inc_vwuz1 + // [2456] rom_compare::compared_bytes#1 = ++ rom_compare::compared_bytes#2 -- vwuz1=_inc_vwuz1 inc.z compared_bytes bne !+ inc.z compared_bytes+1 !: - // [2381] phi from rom_compare::@3 to rom_compare::@1 [phi:rom_compare::@3->rom_compare::@1] - // [2381] phi rom_compare::equal_bytes#2 = rom_compare::equal_bytes#6 [phi:rom_compare::@3->rom_compare::@1#0] -- register_copy - // [2381] phi rom_compare::ptr_ram#4 = rom_compare::ptr_ram#0 [phi:rom_compare::@3->rom_compare::@1#1] -- register_copy - // [2381] phi rom_compare::ptr_rom#2 = rom_compare::ptr_rom#1 [phi:rom_compare::@3->rom_compare::@1#2] -- register_copy - // [2381] phi rom_compare::compared_bytes#2 = rom_compare::compared_bytes#1 [phi:rom_compare::@3->rom_compare::@1#3] -- register_copy + // [2443] phi from rom_compare::@3 to rom_compare::@1 [phi:rom_compare::@3->rom_compare::@1] + // [2443] phi rom_compare::equal_bytes#2 = rom_compare::equal_bytes#6 [phi:rom_compare::@3->rom_compare::@1#0] -- register_copy + // [2443] phi rom_compare::ptr_ram#4 = rom_compare::ptr_ram#0 [phi:rom_compare::@3->rom_compare::@1#1] -- register_copy + // [2443] phi rom_compare::ptr_rom#2 = rom_compare::ptr_rom#1 [phi:rom_compare::@3->rom_compare::@1#2] -- register_copy + // [2443] phi rom_compare::compared_bytes#2 = rom_compare::compared_bytes#1 [phi:rom_compare::@3->rom_compare::@1#3] -- register_copy jmp __b1 } // ultoa @@ -14980,140 +16035,149 @@ rom_compare: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// void ultoa(__zp($25) unsigned long value, __zp($4d) char *buffer, __register(X) char radix) +// void ultoa(__zp($30) unsigned long value, __zp($64) char *buffer, __zp($e6) char radix) ultoa: { - .label digit_value = $32 - .label buffer = $4d - .label digit = $50 - .label value = $25 - .label max_digits = $75 - .label digit_values = $69 + .label ultoa__4 = $6c + .label ultoa__10 = $6e + .label ultoa__11 = $e3 + .label digit_value = $3f + .label buffer = $64 + .label digit = $67 + .label value = $30 + .label radix = $e6 + .label started = $72 + .label max_digits = $c1 + .label digit_values = $2d // if(radix==DECIMAL) - // [2395] if(ultoa::radix#0==DECIMAL) goto ultoa::@1 -- vbuxx_eq_vbuc1_then_la1 - cpx #DECIMAL + // [2457] if(ultoa::radix#0==DECIMAL) goto ultoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #DECIMAL + cmp.z radix beq __b2 // ultoa::@2 // if(radix==HEXADECIMAL) - // [2396] if(ultoa::radix#0==HEXADECIMAL) goto ultoa::@1 -- vbuxx_eq_vbuc1_then_la1 - cpx #HEXADECIMAL + // [2458] if(ultoa::radix#0==HEXADECIMAL) goto ultoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #HEXADECIMAL + cmp.z radix beq __b3 // ultoa::@3 // if(radix==OCTAL) - // [2397] if(ultoa::radix#0==OCTAL) goto ultoa::@1 -- vbuxx_eq_vbuc1_then_la1 - cpx #OCTAL + // [2459] if(ultoa::radix#0==OCTAL) goto ultoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #OCTAL + cmp.z radix beq __b4 // ultoa::@4 // if(radix==BINARY) - // [2398] if(ultoa::radix#0==BINARY) goto ultoa::@1 -- vbuxx_eq_vbuc1_then_la1 - cpx #BINARY + // [2460] if(ultoa::radix#0==BINARY) goto ultoa::@1 -- vbuz1_eq_vbuc1_then_la1 + lda #BINARY + cmp.z radix beq __b5 // ultoa::@5 // *buffer++ = 'e' - // [2399] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS) = 'e' -- _deref_pbuc1=vbuc2 + // [2461] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS) = 'e' -- _deref_pbuc1=vbuc2 // Unknown radix lda #'e' sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS // *buffer++ = 'r' - // [2400] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+1) = 'r' -- _deref_pbuc1=vbuc2 + // [2462] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+1) = 'r' -- _deref_pbuc1=vbuc2 lda #'r' sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+1 - // [2401] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+2) = 'r' -- _deref_pbuc1=vbuc2 + // [2463] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+2) = 'r' -- _deref_pbuc1=vbuc2 sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+2 // *buffer = 0 - // [2402] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+3) = 0 -- _deref_pbuc1=vbuc2 + // [2464] *((char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+3) = 0 -- _deref_pbuc1=vbuc2 lda #0 sta printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+3 // ultoa::@return // } - // [2403] return + // [2465] return rts - // [2404] phi from ultoa to ultoa::@1 [phi:ultoa->ultoa::@1] + // [2466] phi from ultoa to ultoa::@1 [phi:ultoa->ultoa::@1] __b2: - // [2404] phi ultoa::digit_values#8 = RADIX_DECIMAL_VALUES_LONG [phi:ultoa->ultoa::@1#0] -- pduz1=pduc1 + // [2466] phi ultoa::digit_values#8 = RADIX_DECIMAL_VALUES_LONG [phi:ultoa->ultoa::@1#0] -- pduz1=pduc1 lda #RADIX_DECIMAL_VALUES_LONG sta.z digit_values+1 - // [2404] phi ultoa::max_digits#7 = $a [phi:ultoa->ultoa::@1#1] -- vbuz1=vbuc1 + // [2466] phi ultoa::max_digits#7 = $a [phi:ultoa->ultoa::@1#1] -- vbuz1=vbuc1 lda #$a sta.z max_digits jmp __b1 - // [2404] phi from ultoa::@2 to ultoa::@1 [phi:ultoa::@2->ultoa::@1] + // [2466] phi from ultoa::@2 to ultoa::@1 [phi:ultoa::@2->ultoa::@1] __b3: - // [2404] phi ultoa::digit_values#8 = RADIX_HEXADECIMAL_VALUES_LONG [phi:ultoa::@2->ultoa::@1#0] -- pduz1=pduc1 + // [2466] phi ultoa::digit_values#8 = RADIX_HEXADECIMAL_VALUES_LONG [phi:ultoa::@2->ultoa::@1#0] -- pduz1=pduc1 lda #RADIX_HEXADECIMAL_VALUES_LONG sta.z digit_values+1 - // [2404] phi ultoa::max_digits#7 = 8 [phi:ultoa::@2->ultoa::@1#1] -- vbuz1=vbuc1 + // [2466] phi ultoa::max_digits#7 = 8 [phi:ultoa::@2->ultoa::@1#1] -- vbuz1=vbuc1 lda #8 sta.z max_digits jmp __b1 - // [2404] phi from ultoa::@3 to ultoa::@1 [phi:ultoa::@3->ultoa::@1] + // [2466] phi from ultoa::@3 to ultoa::@1 [phi:ultoa::@3->ultoa::@1] __b4: - // [2404] phi ultoa::digit_values#8 = RADIX_OCTAL_VALUES_LONG [phi:ultoa::@3->ultoa::@1#0] -- pduz1=pduc1 + // [2466] phi ultoa::digit_values#8 = RADIX_OCTAL_VALUES_LONG [phi:ultoa::@3->ultoa::@1#0] -- pduz1=pduc1 lda #RADIX_OCTAL_VALUES_LONG sta.z digit_values+1 - // [2404] phi ultoa::max_digits#7 = $b [phi:ultoa::@3->ultoa::@1#1] -- vbuz1=vbuc1 + // [2466] phi ultoa::max_digits#7 = $b [phi:ultoa::@3->ultoa::@1#1] -- vbuz1=vbuc1 lda #$b sta.z max_digits jmp __b1 - // [2404] phi from ultoa::@4 to ultoa::@1 [phi:ultoa::@4->ultoa::@1] + // [2466] phi from ultoa::@4 to ultoa::@1 [phi:ultoa::@4->ultoa::@1] __b5: - // [2404] phi ultoa::digit_values#8 = RADIX_BINARY_VALUES_LONG [phi:ultoa::@4->ultoa::@1#0] -- pduz1=pduc1 + // [2466] phi ultoa::digit_values#8 = RADIX_BINARY_VALUES_LONG [phi:ultoa::@4->ultoa::@1#0] -- pduz1=pduc1 lda #RADIX_BINARY_VALUES_LONG sta.z digit_values+1 - // [2404] phi ultoa::max_digits#7 = $20 [phi:ultoa::@4->ultoa::@1#1] -- vbuz1=vbuc1 + // [2466] phi ultoa::max_digits#7 = $20 [phi:ultoa::@4->ultoa::@1#1] -- vbuz1=vbuc1 lda #$20 sta.z max_digits // ultoa::@1 __b1: - // [2405] phi from ultoa::@1 to ultoa::@6 [phi:ultoa::@1->ultoa::@6] - // [2405] phi ultoa::buffer#11 = (char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:ultoa::@1->ultoa::@6#0] -- pbuz1=pbuc1 + // [2467] phi from ultoa::@1 to ultoa::@6 [phi:ultoa::@1->ultoa::@6] + // [2467] phi ultoa::buffer#11 = (char *)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:ultoa::@1->ultoa::@6#0] -- pbuz1=pbuc1 lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS sta.z buffer+1 - // [2405] phi ultoa::started#2 = 0 [phi:ultoa::@1->ultoa::@6#1] -- vbuxx=vbuc1 - ldx #0 - // [2405] phi ultoa::value#2 = ultoa::value#1 [phi:ultoa::@1->ultoa::@6#2] -- register_copy - // [2405] phi ultoa::digit#2 = 0 [phi:ultoa::@1->ultoa::@6#3] -- vbuz1=vbuc1 - txa + // [2467] phi ultoa::started#2 = 0 [phi:ultoa::@1->ultoa::@6#1] -- vbuz1=vbuc1 + lda #0 + sta.z started + // [2467] phi ultoa::value#2 = ultoa::value#1 [phi:ultoa::@1->ultoa::@6#2] -- register_copy + // [2467] phi ultoa::digit#2 = 0 [phi:ultoa::@1->ultoa::@6#3] -- vbuz1=vbuc1 sta.z digit // ultoa::@6 __b6: // max_digits-1 - // [2406] ultoa::$4 = ultoa::max_digits#7 - 1 -- vbuaa=vbuz1_minus_1 - lda.z max_digits - sec - sbc #1 + // [2468] ultoa::$4 = ultoa::max_digits#7 - 1 -- vbuz1=vbuz2_minus_1 + ldx.z max_digits + dex + stx.z ultoa__4 // for( char digit=0; digit= digit_value) - // [2414] if(0!=ultoa::started#2) goto ultoa::@10 -- 0_neq_vbuxx_then_la1 - cpx #0 + // [2476] if(0!=ultoa::started#2) goto ultoa::@10 -- 0_neq_vbuz1_then_la1 + lda.z started bne __b10 // ultoa::@12 - // [2415] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@10 -- vduz1_ge_vduz2_then_la1 + // [2477] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@10 -- vduz1_ge_vduz2_then_la1 lda.z value+3 cmp.z digit_value+3 bcc !+ @@ -15160,50 +16225,51 @@ ultoa: { cmp.z digit_value bcs __b10 !: - // [2416] phi from ultoa::@12 to ultoa::@9 [phi:ultoa::@12->ultoa::@9] - // [2416] phi ultoa::buffer#14 = ultoa::buffer#11 [phi:ultoa::@12->ultoa::@9#0] -- register_copy - // [2416] phi ultoa::started#4 = ultoa::started#2 [phi:ultoa::@12->ultoa::@9#1] -- register_copy - // [2416] phi ultoa::value#6 = ultoa::value#2 [phi:ultoa::@12->ultoa::@9#2] -- register_copy + // [2478] phi from ultoa::@12 to ultoa::@9 [phi:ultoa::@12->ultoa::@9] + // [2478] phi ultoa::buffer#14 = ultoa::buffer#11 [phi:ultoa::@12->ultoa::@9#0] -- register_copy + // [2478] phi ultoa::started#4 = ultoa::started#2 [phi:ultoa::@12->ultoa::@9#1] -- register_copy + // [2478] phi ultoa::value#6 = ultoa::value#2 [phi:ultoa::@12->ultoa::@9#2] -- register_copy // ultoa::@9 __b9: // for( char digit=0; digitultoa::@6] - // [2405] phi ultoa::buffer#11 = ultoa::buffer#14 [phi:ultoa::@9->ultoa::@6#0] -- register_copy - // [2405] phi ultoa::started#2 = ultoa::started#4 [phi:ultoa::@9->ultoa::@6#1] -- register_copy - // [2405] phi ultoa::value#2 = ultoa::value#6 [phi:ultoa::@9->ultoa::@6#2] -- register_copy - // [2405] phi ultoa::digit#2 = ultoa::digit#1 [phi:ultoa::@9->ultoa::@6#3] -- register_copy + // [2467] phi from ultoa::@9 to ultoa::@6 [phi:ultoa::@9->ultoa::@6] + // [2467] phi ultoa::buffer#11 = ultoa::buffer#14 [phi:ultoa::@9->ultoa::@6#0] -- register_copy + // [2467] phi ultoa::started#2 = ultoa::started#4 [phi:ultoa::@9->ultoa::@6#1] -- register_copy + // [2467] phi ultoa::value#2 = ultoa::value#6 [phi:ultoa::@9->ultoa::@6#2] -- register_copy + // [2467] phi ultoa::digit#2 = ultoa::digit#1 [phi:ultoa::@9->ultoa::@6#3] -- register_copy jmp __b6 // ultoa::@10 __b10: // ultoa_append(buffer++, value, digit_value) - // [2418] ultoa_append::buffer#0 = ultoa::buffer#11 -- pbuz1=pbuz2 + // [2480] ultoa_append::buffer#0 = ultoa::buffer#11 -- pbuz1=pbuz2 lda.z buffer sta.z ultoa_append.buffer lda.z buffer+1 sta.z ultoa_append.buffer+1 - // [2419] ultoa_append::value#0 = ultoa::value#2 - // [2420] ultoa_append::sub#0 = ultoa::digit_value#0 - // [2421] call ultoa_append - // [2724] phi from ultoa::@10 to ultoa_append [phi:ultoa::@10->ultoa_append] + // [2481] ultoa_append::value#0 = ultoa::value#2 + // [2482] ultoa_append::sub#0 = ultoa::digit_value#0 + // [2483] call ultoa_append + // [2781] phi from ultoa::@10 to ultoa_append [phi:ultoa::@10->ultoa_append] jsr ultoa_append // ultoa_append(buffer++, value, digit_value) - // [2422] ultoa_append::return#0 = ultoa_append::value#2 + // [2484] ultoa_append::return#0 = ultoa_append::value#2 // ultoa::@11 // value = ultoa_append(buffer++, value, digit_value) - // [2423] ultoa::value#0 = ultoa_append::return#0 + // [2485] ultoa::value#0 = ultoa_append::return#0 // value = ultoa_append(buffer++, value, digit_value); - // [2424] ultoa::buffer#4 = ++ ultoa::buffer#11 -- pbuz1=_inc_pbuz1 + // [2486] ultoa::buffer#4 = ++ ultoa::buffer#11 -- pbuz1=_inc_pbuz1 inc.z buffer bne !+ inc.z buffer+1 !: - // [2416] phi from ultoa::@11 to ultoa::@9 [phi:ultoa::@11->ultoa::@9] - // [2416] phi ultoa::buffer#14 = ultoa::buffer#4 [phi:ultoa::@11->ultoa::@9#0] -- register_copy - // [2416] phi ultoa::started#4 = 1 [phi:ultoa::@11->ultoa::@9#1] -- vbuxx=vbuc1 - ldx #1 - // [2416] phi ultoa::value#6 = ultoa::value#0 [phi:ultoa::@11->ultoa::@9#2] -- register_copy + // [2478] phi from ultoa::@11 to ultoa::@9 [phi:ultoa::@11->ultoa::@9] + // [2478] phi ultoa::buffer#14 = ultoa::buffer#4 [phi:ultoa::@11->ultoa::@9#0] -- register_copy + // [2478] phi ultoa::started#4 = 1 [phi:ultoa::@11->ultoa::@9#1] -- vbuz1=vbuc1 + lda #1 + sta.z started + // [2478] phi ultoa::value#6 = ultoa::value#0 [phi:ultoa::@11->ultoa::@9#2] -- register_copy jmp __b9 } // rom_sector_erase @@ -15236,21 +16302,20 @@ ultoa: { * @param address The 22 bit ROM address. */ /* inline */ -// void rom_sector_erase(__zp($dd) unsigned long address) +// void rom_sector_erase(__mem() unsigned long address) rom_sector_erase: { - .label rom_ptr1_rom_sector_erase__0 = $30 - .label rom_ptr1_rom_sector_erase__2 = $30 - .label rom_ptr1_return = $30 - .label rom_chip_address = $5b - .label address = $dd + .label rom_ptr1_rom_sector_erase__0 = $3d + .label rom_ptr1_rom_sector_erase__2 = $3d + .label rom_ptr1_return = $3d + .label rom_chip_address = $7b // rom_sector_erase::rom_ptr1 // (unsigned int)(address) & ROM_PTR_MASK - // [2426] rom_sector_erase::rom_ptr1_$2 = (unsigned int)rom_sector_erase::address#0 -- vwuz1=_word_vduz2 - lda.z address + // [2488] rom_sector_erase::rom_ptr1_$2 = (unsigned int)rom_sector_erase::address#0 -- vwuz1=_word_vdum2 + lda address sta.z rom_ptr1_rom_sector_erase__2 - lda.z address+1 + lda address+1 sta.z rom_ptr1_rom_sector_erase__2+1 - // [2427] rom_sector_erase::rom_ptr1_$0 = rom_sector_erase::rom_ptr1_$2 & $3fff -- vwuz1=vwuz1_band_vwuc1 + // [2489] rom_sector_erase::rom_ptr1_$0 = rom_sector_erase::rom_ptr1_$2 & $3fff -- vwuz1=vwuz1_band_vwuc1 lda.z rom_ptr1_rom_sector_erase__0 and #<$3fff sta.z rom_ptr1_rom_sector_erase__0 @@ -15258,7 +16323,7 @@ rom_sector_erase: { and #>$3fff sta.z rom_ptr1_rom_sector_erase__0+1 // ((unsigned int)(address) & ROM_PTR_MASK) + ROM_BASE - // [2428] rom_sector_erase::rom_ptr1_return#0 = rom_sector_erase::rom_ptr1_$0 + $c000 -- vwuz1=vwuz1_plus_vwuc1 + // [2490] rom_sector_erase::rom_ptr1_return#0 = rom_sector_erase::rom_ptr1_$0 + $c000 -- vwuz1=vwuz1_plus_vwuc1 lda.z rom_ptr1_return clc adc #<$c000 @@ -15268,21 +16333,21 @@ rom_sector_erase: { sta.z rom_ptr1_return+1 // rom_sector_erase::@1 // unsigned long rom_chip_address = address & ROM_CHIP_MASK - // [2429] rom_sector_erase::rom_chip_address#0 = rom_sector_erase::address#0 & $380000 -- vduz1=vduz2_band_vduc1 - lda.z address + // [2491] rom_sector_erase::rom_chip_address#0 = rom_sector_erase::address#0 & $380000 -- vduz1=vdum2_band_vduc1 + lda address and #<$380000 sta.z rom_chip_address - lda.z address+1 + lda address+1 and #>$380000 sta.z rom_chip_address+1 - lda.z address+2 + lda address+2 and #<$380000>>$10 sta.z rom_chip_address+2 - lda.z address+3 + lda address+3 and #>$380000>>$10 sta.z rom_chip_address+3 // rom_unlock(rom_chip_address + 0x05555, 0x80) - // [2430] rom_unlock::address#0 = rom_sector_erase::rom_chip_address#0 + $5555 -- vduz1=vduz1_plus_vwuc1 + // [2492] rom_unlock::address#0 = rom_sector_erase::rom_chip_address#0 + $5555 -- vduz1=vduz1_plus_vwuc1 clc lda.z rom_unlock.address adc #<$5555 @@ -15296,53 +16361,57 @@ rom_sector_erase: { lda.z rom_unlock.address+3 adc #0 sta.z rom_unlock.address+3 - // [2431] call rom_unlock - // [2138] phi from rom_sector_erase::@1 to rom_unlock [phi:rom_sector_erase::@1->rom_unlock] - // [2138] phi rom_unlock::unlock_code#5 = $80 [phi:rom_sector_erase::@1->rom_unlock#0] -- vbuz1=vbuc1 + // [2493] call rom_unlock + // [2191] phi from rom_sector_erase::@1 to rom_unlock [phi:rom_sector_erase::@1->rom_unlock] + // [2191] phi rom_unlock::unlock_code#5 = $80 [phi:rom_sector_erase::@1->rom_unlock#0] -- vbuz1=vbuc1 lda #$80 sta.z rom_unlock.unlock_code - // [2138] phi rom_unlock::address#5 = rom_unlock::address#0 [phi:rom_sector_erase::@1->rom_unlock#1] -- register_copy + // [2191] phi rom_unlock::address#5 = rom_unlock::address#0 [phi:rom_sector_erase::@1->rom_unlock#1] -- register_copy jsr rom_unlock // rom_sector_erase::@2 // rom_unlock(address, 0x30) - // [2432] rom_unlock::address#1 = rom_sector_erase::address#0 -- vduz1=vduz2 - lda.z address + // [2494] rom_unlock::address#1 = rom_sector_erase::address#0 -- vduz1=vdum2 + lda address sta.z rom_unlock.address - lda.z address+1 + lda address+1 sta.z rom_unlock.address+1 - lda.z address+2 + lda address+2 sta.z rom_unlock.address+2 - lda.z address+3 + lda address+3 sta.z rom_unlock.address+3 - // [2433] call rom_unlock - // [2138] phi from rom_sector_erase::@2 to rom_unlock [phi:rom_sector_erase::@2->rom_unlock] - // [2138] phi rom_unlock::unlock_code#5 = $30 [phi:rom_sector_erase::@2->rom_unlock#0] -- vbuz1=vbuc1 + // [2495] call rom_unlock + // [2191] phi from rom_sector_erase::@2 to rom_unlock [phi:rom_sector_erase::@2->rom_unlock] + // [2191] phi rom_unlock::unlock_code#5 = $30 [phi:rom_sector_erase::@2->rom_unlock#0] -- vbuz1=vbuc1 lda #$30 sta.z rom_unlock.unlock_code - // [2138] phi rom_unlock::address#5 = rom_unlock::address#1 [phi:rom_sector_erase::@2->rom_unlock#1] -- register_copy + // [2191] phi rom_unlock::address#5 = rom_unlock::address#1 [phi:rom_sector_erase::@2->rom_unlock#1] -- register_copy jsr rom_unlock // rom_sector_erase::@3 // rom_wait(ptr_rom) - // [2434] rom_wait::ptr_rom#0 = (char *)rom_sector_erase::rom_ptr1_return#0 - // [2435] call rom_wait - // [2731] phi from rom_sector_erase::@3 to rom_wait [phi:rom_sector_erase::@3->rom_wait] - // [2731] phi rom_wait::ptr_rom#3 = rom_wait::ptr_rom#0 [phi:rom_sector_erase::@3->rom_wait#0] -- register_copy + // [2496] rom_wait::ptr_rom#0 = (char *)rom_sector_erase::rom_ptr1_return#0 + // [2497] call rom_wait + // [2788] phi from rom_sector_erase::@3 to rom_wait [phi:rom_sector_erase::@3->rom_wait] + // [2788] phi rom_wait::ptr_rom#3 = rom_wait::ptr_rom#0 [phi:rom_sector_erase::@3->rom_wait#0] -- register_copy jsr rom_wait // rom_sector_erase::@return // } - // [2436] return + // [2498] return rts + .segment Data + .label address = printf_ulong.uvalue_1 } +.segment Code // rom_write /* inline */ -// unsigned long rom_write(__register(X) char flash_ram_bank, __zp($69) char *flash_ram_address, __zp($6c) unsigned long flash_rom_address, unsigned int flash_rom_size) +// unsigned long rom_write(__zp($43) char flash_ram_bank, __zp($2d) char *flash_ram_address, __zp($b6) unsigned long flash_rom_address, unsigned int flash_rom_size) rom_write: { - .label rom_chip_address = $7c - .label flash_rom_address = $6c - .label flash_ram_address = $69 - .label flashed_bytes = $63 + .label rom_chip_address = $c8 + .label flash_rom_address = $b6 + .label flash_ram_address = $2d + .label flashed_bytes = $ab + .label flash_ram_bank = $43 // unsigned long rom_chip_address = flash_rom_address & ROM_CHIP_MASK - // [2437] rom_write::rom_chip_address#0 = rom_write::flash_rom_address#1 & $380000 -- vduz1=vduz2_band_vduc1 + // [2499] rom_write::rom_chip_address#0 = rom_write::flash_rom_address#1 & $380000 -- vduz1=vduz2_band_vduc1 /// Holds the amount of bytes actually flashed in the ROM. lda.z flash_rom_address and #<$380000 @@ -15358,12 +16427,13 @@ rom_write: { sta.z rom_chip_address+3 // rom_write::bank_set_bram1 // BRAM = bank - // [2438] BRAM = rom_write::flash_ram_bank#0 -- vbuz1=vbuxx - stx.z BRAM - // [2439] phi from rom_write::bank_set_bram1 to rom_write::@1 [phi:rom_write::bank_set_bram1->rom_write::@1] - // [2439] phi rom_write::flash_ram_address#2 = rom_write::flash_ram_address#1 [phi:rom_write::bank_set_bram1->rom_write::@1#0] -- register_copy - // [2439] phi rom_write::flash_rom_address#3 = rom_write::flash_rom_address#1 [phi:rom_write::bank_set_bram1->rom_write::@1#1] -- register_copy - // [2439] phi rom_write::flashed_bytes#2 = 0 [phi:rom_write::bank_set_bram1->rom_write::@1#2] -- vduz1=vduc1 + // [2500] BRAM = rom_write::flash_ram_bank#0 -- vbuz1=vbuz2 + lda.z flash_ram_bank + sta.z BRAM + // [2501] phi from rom_write::bank_set_bram1 to rom_write::@1 [phi:rom_write::bank_set_bram1->rom_write::@1] + // [2501] phi rom_write::flash_ram_address#2 = rom_write::flash_ram_address#1 [phi:rom_write::bank_set_bram1->rom_write::@1#0] -- register_copy + // [2501] phi rom_write::flash_rom_address#3 = rom_write::flash_rom_address#1 [phi:rom_write::bank_set_bram1->rom_write::@1#1] -- register_copy + // [2501] phi rom_write::flashed_bytes#2 = 0 [phi:rom_write::bank_set_bram1->rom_write::@1#2] -- vduz1=vduc1 lda #<0 sta.z flashed_bytes sta.z flashed_bytes+1 @@ -15374,7 +16444,7 @@ rom_write: { // rom_write::@1 __b1: // while (flashed_bytes < flash_rom_size) - // [2440] if(rom_write::flashed_bytes#2ROM_PROGRESS_CELL>>$10 bcc __b2 @@ -15393,12 +16463,12 @@ rom_write: { !: // rom_write::@return // } - // [2441] return + // [2503] return rts // rom_write::@2 __b2: // rom_unlock(rom_chip_address + 0x05555, 0xA0) - // [2442] rom_unlock::address#4 = rom_write::rom_chip_address#0 + $5555 -- vduz1=vduz2_plus_vwuc1 + // [2504] rom_unlock::address#4 = rom_write::rom_chip_address#0 + $5555 -- vduz1=vduz2_plus_vwuc1 clc lda.z rom_chip_address adc #<$5555 @@ -15412,16 +16482,16 @@ rom_write: { lda.z rom_chip_address+3 adc #0 sta.z rom_unlock.address+3 - // [2443] call rom_unlock - // [2138] phi from rom_write::@2 to rom_unlock [phi:rom_write::@2->rom_unlock] - // [2138] phi rom_unlock::unlock_code#5 = $a0 [phi:rom_write::@2->rom_unlock#0] -- vbuz1=vbuc1 + // [2505] call rom_unlock + // [2191] phi from rom_write::@2 to rom_unlock [phi:rom_write::@2->rom_unlock] + // [2191] phi rom_unlock::unlock_code#5 = $a0 [phi:rom_write::@2->rom_unlock#0] -- vbuz1=vbuc1 lda #$a0 sta.z rom_unlock.unlock_code - // [2138] phi rom_unlock::address#5 = rom_unlock::address#4 [phi:rom_write::@2->rom_unlock#1] -- register_copy + // [2191] phi rom_unlock::address#5 = rom_unlock::address#4 [phi:rom_write::@2->rom_unlock#1] -- register_copy jsr rom_unlock // rom_write::@3 // rom_byte_program(flash_rom_address, *flash_ram_address) - // [2444] rom_byte_program::address#0 = rom_write::flash_rom_address#3 -- vduz1=vduz2 + // [2506] rom_byte_program::address#0 = rom_write::flash_rom_address#3 -- vduz1=vduz2 lda.z flash_rom_address sta.z rom_byte_program.address lda.z flash_rom_address+1 @@ -15430,16 +16500,16 @@ rom_write: { sta.z rom_byte_program.address+2 lda.z flash_rom_address+3 sta.z rom_byte_program.address+3 - // [2445] rom_byte_program::value#0 = *rom_write::flash_ram_address#2 -- vbuyy=_deref_pbuz1 + // [2507] rom_byte_program::value#0 = *rom_write::flash_ram_address#2 -- vbuz1=_deref_pbuz2 ldy #0 lda (flash_ram_address),y - tay - // [2446] call rom_byte_program - // [2738] phi from rom_write::@3 to rom_byte_program [phi:rom_write::@3->rom_byte_program] + sta.z rom_byte_program.value + // [2508] call rom_byte_program + // [2795] phi from rom_write::@3 to rom_byte_program [phi:rom_write::@3->rom_byte_program] jsr rom_byte_program // rom_write::@4 // flash_rom_address++; - // [2447] rom_write::flash_rom_address#0 = ++ rom_write::flash_rom_address#3 -- vduz1=_inc_vduz1 + // [2509] rom_write::flash_rom_address#0 = ++ rom_write::flash_rom_address#3 -- vduz1=_inc_vduz1 inc.z flash_rom_address bne !+ inc.z flash_rom_address+1 @@ -15449,13 +16519,13 @@ rom_write: { inc.z flash_rom_address+3 !: // flash_ram_address++; - // [2448] rom_write::flash_ram_address#0 = ++ rom_write::flash_ram_address#2 -- pbuz1=_inc_pbuz1 + // [2510] rom_write::flash_ram_address#0 = ++ rom_write::flash_ram_address#2 -- pbuz1=_inc_pbuz1 inc.z flash_ram_address bne !+ inc.z flash_ram_address+1 !: // flashed_bytes++; - // [2449] rom_write::flashed_bytes#1 = ++ rom_write::flashed_bytes#2 -- vduz1=_inc_vduz1 + // [2511] rom_write::flashed_bytes#1 = ++ rom_write::flashed_bytes#2 -- vduz1=_inc_vduz1 inc.z flashed_bytes bne !+ inc.z flashed_bytes+1 @@ -15464,38 +16534,12 @@ rom_write: { bne !+ inc.z flashed_bytes+3 !: - // [2439] phi from rom_write::@4 to rom_write::@1 [phi:rom_write::@4->rom_write::@1] - // [2439] phi rom_write::flash_ram_address#2 = rom_write::flash_ram_address#0 [phi:rom_write::@4->rom_write::@1#0] -- register_copy - // [2439] phi rom_write::flash_rom_address#3 = rom_write::flash_rom_address#0 [phi:rom_write::@4->rom_write::@1#1] -- register_copy - // [2439] phi rom_write::flashed_bytes#2 = rom_write::flashed_bytes#1 [phi:rom_write::@4->rom_write::@1#2] -- register_copy + // [2501] phi from rom_write::@4 to rom_write::@1 [phi:rom_write::@4->rom_write::@1] + // [2501] phi rom_write::flash_ram_address#2 = rom_write::flash_ram_address#0 [phi:rom_write::@4->rom_write::@1#0] -- register_copy + // [2501] phi rom_write::flash_rom_address#3 = rom_write::flash_rom_address#0 [phi:rom_write::@4->rom_write::@1#1] -- register_copy + // [2501] phi rom_write::flashed_bytes#2 = rom_write::flashed_bytes#1 [phi:rom_write::@4->rom_write::@1#2] -- register_copy jmp __b1 } - // cbm_k_getin -/** - * @brief Scan a character from keyboard without pressing enter. - * - * @return char The character read. - */ -cbm_k_getin: { - // __mem unsigned char ch - // [2450] cbm_k_getin::ch = 0 -- vbum1=vbuc1 - lda #0 - sta ch - // asm - // asm { jsrCBM_GETIN stach } - jsr CBM_GETIN - sta ch - // return ch; - // [2452] cbm_k_getin::return#0 = cbm_k_getin::ch -- vbuaa=vbum1 - // cbm_k_getin::@return - // } - // [2453] cbm_k_getin::return#1 = cbm_k_getin::return#0 - // [2454] return - rts - .segment Data - ch: .byte 0 -} -.segment Code // strncpy /// Copies up to n characters from the string pointed to, by src to dst. /// In a case where the length of src is less than that of n, the remainder of dst will be padded with null bytes. @@ -15503,23 +16547,24 @@ cbm_k_getin: { /// @param src ? This is the string to be copied. /// @param n ? The number of characters to be copied from source. /// @return The destination -// char * strncpy(__zp($49) char *dst, __zp($3e) const char *src, __zp($61) unsigned int n) +// char * strncpy(__zp($dd) char *dst, __zp($d7) const char *src, __zp($51) unsigned int n) strncpy: { - .label dst = $49 - .label i = $4d - .label src = $3e - .label n = $61 - // [2456] phi from strncpy to strncpy::@1 [phi:strncpy->strncpy::@1] - // [2456] phi strncpy::dst#3 = strncpy::dst#8 [phi:strncpy->strncpy::@1#0] -- register_copy - // [2456] phi strncpy::src#3 = strncpy::src#6 [phi:strncpy->strncpy::@1#1] -- register_copy - // [2456] phi strncpy::i#2 = 0 [phi:strncpy->strncpy::@1#2] -- vwuz1=vwuc1 + .label c = $78 + .label dst = $dd + .label i = $64 + .label src = $d7 + .label n = $51 + // [2513] phi from strncpy to strncpy::@1 [phi:strncpy->strncpy::@1] + // [2513] phi strncpy::dst#3 = strncpy::dst#8 [phi:strncpy->strncpy::@1#0] -- register_copy + // [2513] phi strncpy::src#3 = strncpy::src#6 [phi:strncpy->strncpy::@1#1] -- register_copy + // [2513] phi strncpy::i#2 = 0 [phi:strncpy->strncpy::@1#2] -- vwuz1=vwuc1 lda #<0 sta.z i sta.z i+1 // strncpy::@1 __b1: // for(size_t i = 0;istrncpy::@3] - // [2462] phi strncpy::src#7 = strncpy::src#3 [phi:strncpy::@2/strncpy::@4->strncpy::@3#0] -- register_copy + // [2519] phi from strncpy::@2 strncpy::@4 to strncpy::@3 [phi:strncpy::@2/strncpy::@4->strncpy::@3] + // [2519] phi strncpy::src#7 = strncpy::src#3 [phi:strncpy::@2/strncpy::@4->strncpy::@3#0] -- register_copy // strncpy::@3 __b3: // *dst++ = c - // [2463] *strncpy::dst#3 = strncpy::c#0 -- _deref_pbuz1=vbuaa + // [2520] *strncpy::dst#3 = strncpy::c#0 -- _deref_pbuz1=vbuz2 + lda.z c ldy #0 sta (dst),y // *dst++ = c; - // [2464] strncpy::dst#0 = ++ strncpy::dst#3 -- pbuz1=_inc_pbuz1 + // [2521] strncpy::dst#0 = ++ strncpy::dst#3 -- pbuz1=_inc_pbuz1 inc.z dst bne !+ inc.z dst+1 !: // for(size_t i = 0;istrncpy::@1] - // [2456] phi strncpy::dst#3 = strncpy::dst#0 [phi:strncpy::@3->strncpy::@1#0] -- register_copy - // [2456] phi strncpy::src#3 = strncpy::src#7 [phi:strncpy::@3->strncpy::@1#1] -- register_copy - // [2456] phi strncpy::i#2 = strncpy::i#1 [phi:strncpy::@3->strncpy::@1#2] -- register_copy + // [2513] phi from strncpy::@3 to strncpy::@1 [phi:strncpy::@3->strncpy::@1] + // [2513] phi strncpy::dst#3 = strncpy::dst#0 [phi:strncpy::@3->strncpy::@1#0] -- register_copy + // [2513] phi strncpy::src#3 = strncpy::src#7 [phi:strncpy::@3->strncpy::@1#1] -- register_copy + // [2513] phi strncpy::i#2 = strncpy::i#1 [phi:strncpy::@3->strncpy::@1#2] -- register_copy jmp __b1 } // insertup // Insert a new line, and scroll the upper part of the screen up. // void insertup(char rows) insertup: { - .label width = $39 - .label y = $2b + .label insertup__0 = $46 + .label insertup__4 = $3b + .label insertup__6 = $3c + .label insertup__7 = $3b + .label width = $46 + .label y = $34 // __conio.width+1 - // [2466] insertup::$0 = *((char *)&__conio+6) + 1 -- vbuaa=_deref_pbuc1_plus_1 + // [2523] insertup::$0 = *((char *)&__conio+6) + 1 -- vbuz1=_deref_pbuc1_plus_1 lda __conio+6 inc + sta.z insertup__0 // unsigned char width = (__conio.width+1) * 2 - // [2467] insertup::width#0 = insertup::$0 << 1 -- vbuz1=vbuaa_rol_1 + // [2524] insertup::width#0 = insertup::$0 << 1 -- vbuz1=vbuz1_rol_1 // {asm{.byte $db}} - asl - sta.z width - // [2468] phi from insertup to insertup::@1 [phi:insertup->insertup::@1] - // [2468] phi insertup::y#2 = 0 [phi:insertup->insertup::@1#0] -- vbuz1=vbuc1 + asl.z width + // [2525] phi from insertup to insertup::@1 [phi:insertup->insertup::@1] + // [2525] phi insertup::y#2 = 0 [phi:insertup->insertup::@1#0] -- vbuz1=vbuc1 lda #0 sta.z y // insertup::@1 __b1: // for(unsigned char y=0; y<__conio.cursor_y; y++) - // [2469] if(insertup::y#2<*((char *)&__conio+1)) goto insertup::@2 -- vbuz1_lt__deref_pbuc1_then_la1 + // [2526] if(insertup::y#2<*((char *)&__conio+1)) goto insertup::@2 -- vbuz1_lt__deref_pbuc1_then_la1 lda.z y cmp __conio+1 bcc __b2 - // [2470] phi from insertup::@1 to insertup::@3 [phi:insertup::@1->insertup::@3] + // [2527] phi from insertup::@1 to insertup::@3 [phi:insertup::@1->insertup::@3] // insertup::@3 // clearline() - // [2471] call clearline + // [2528] call clearline jsr clearline // insertup::@return // } - // [2472] return + // [2529] return rts // insertup::@2 __b2: // y+1 - // [2473] insertup::$4 = insertup::y#2 + 1 -- vbuxx=vbuz1_plus_1 - ldx.z y - inx + // [2530] insertup::$4 = insertup::y#2 + 1 -- vbuz1=vbuz2_plus_1 + lda.z y + inc + sta.z insertup__4 // memcpy8_vram_vram(__conio.mapbase_bank, __conio.offsets[y], __conio.mapbase_bank, __conio.offsets[y+1], width) - // [2474] insertup::$6 = insertup::y#2 << 1 -- vbuyy=vbuz1_rol_1 + // [2531] insertup::$6 = insertup::y#2 << 1 -- vbuz1=vbuz2_rol_1 lda.z y asl - tay - // [2475] insertup::$7 = insertup::$4 << 1 -- vbuxx=vbuxx_rol_1 - txa - asl - tax - // [2476] memcpy8_vram_vram::dbank_vram#0 = *((char *)&__conio+5) -- vbuz1=_deref_pbuc1 + sta.z insertup__6 + // [2532] insertup::$7 = insertup::$4 << 1 -- vbuz1=vbuz1_rol_1 + asl.z insertup__7 + // [2533] memcpy8_vram_vram::dbank_vram#0 = *((char *)&__conio+5) -- vbuz1=_deref_pbuc1 lda __conio+5 sta.z memcpy8_vram_vram.dbank_vram - // [2477] memcpy8_vram_vram::doffset_vram#0 = ((unsigned int *)&__conio+$15)[insertup::$6] -- vwuz1=pwuc1_derefidx_vbuyy + // [2534] memcpy8_vram_vram::doffset_vram#0 = ((unsigned int *)&__conio+$15)[insertup::$6] -- vwuz1=pwuc1_derefidx_vbuz2 + ldy.z insertup__6 lda __conio+$15,y sta.z memcpy8_vram_vram.doffset_vram lda __conio+$15+1,y sta.z memcpy8_vram_vram.doffset_vram+1 - // [2478] memcpy8_vram_vram::sbank_vram#0 = *((char *)&__conio+5) -- vbuyy=_deref_pbuc1 - ldy __conio+5 - // [2479] memcpy8_vram_vram::soffset_vram#0 = ((unsigned int *)&__conio+$15)[insertup::$7] -- vwuz1=pwuc1_derefidx_vbuxx - lda __conio+$15,x + // [2535] memcpy8_vram_vram::sbank_vram#0 = *((char *)&__conio+5) -- vbuz1=_deref_pbuc1 + lda __conio+5 + sta.z memcpy8_vram_vram.sbank_vram + // [2536] memcpy8_vram_vram::soffset_vram#0 = ((unsigned int *)&__conio+$15)[insertup::$7] -- vwuz1=pwuc1_derefidx_vbuz2 + ldy.z insertup__7 + lda __conio+$15,y sta.z memcpy8_vram_vram.soffset_vram - lda __conio+$15+1,x + lda __conio+$15+1,y sta.z memcpy8_vram_vram.soffset_vram+1 - // [2480] memcpy8_vram_vram::num8#1 = insertup::width#0 -- vbuz1=vbuz2 + // [2537] memcpy8_vram_vram::num8#1 = insertup::width#0 -- vbuz1=vbuz2 lda.z width - sta.z memcpy8_vram_vram.num8 - // [2481] call memcpy8_vram_vram + sta.z memcpy8_vram_vram.num8_1 + // [2538] call memcpy8_vram_vram jsr memcpy8_vram_vram // insertup::@4 // for(unsigned char y=0; y<__conio.cursor_y; y++) - // [2482] insertup::y#1 = ++ insertup::y#2 -- vbuz1=_inc_vbuz1 + // [2539] insertup::y#1 = ++ insertup::y#2 -- vbuz1=_inc_vbuz1 inc.z y - // [2468] phi from insertup::@4 to insertup::@1 [phi:insertup::@4->insertup::@1] - // [2468] phi insertup::y#2 = insertup::y#1 [phi:insertup::@4->insertup::@1#0] -- register_copy + // [2525] phi from insertup::@4 to insertup::@1 [phi:insertup::@4->insertup::@1] + // [2525] phi insertup::y#2 = insertup::y#1 [phi:insertup::@4->insertup::@1#0] -- register_copy jmp __b1 } // clearline clearline: { - .label addr = $2c + .label clearline__0 = $24 + .label clearline__1 = $26 + .label clearline__2 = $27 + .label clearline__3 = $25 + .label addr = $39 + .label c = $22 // unsigned int addr = __conio.offsets[__conio.cursor_y] - // [2483] clearline::$3 = *((char *)&__conio+1) << 1 -- vbuaa=_deref_pbuc1_rol_1 + // [2540] clearline::$3 = *((char *)&__conio+1) << 1 -- vbuz1=_deref_pbuc1_rol_1 lda __conio+1 asl - // [2484] clearline::addr#0 = ((unsigned int *)&__conio+$15)[clearline::$3] -- vwuz1=pwuc1_derefidx_vbuaa + sta.z clearline__3 + // [2541] clearline::addr#0 = ((unsigned int *)&__conio+$15)[clearline::$3] -- vwuz1=pwuc1_derefidx_vbuz2 tay lda __conio+$15,y sta.z addr lda __conio+$15+1,y sta.z addr+1 // *VERA_CTRL &= ~VERA_ADDRSEL - // [2485] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [2542] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 lda #VERA_ADDRSEL^$ff and VERA_CTRL sta VERA_CTRL // BYTE0(addr) - // [2486] clearline::$0 = byte0 clearline::addr#0 -- vbuaa=_byte0_vwuz1 + // [2543] clearline::$0 = byte0 clearline::addr#0 -- vbuz1=_byte0_vwuz2 lda.z addr + sta.z clearline__0 // *VERA_ADDRX_L = BYTE0(addr) - // [2487] *VERA_ADDRX_L = clearline::$0 -- _deref_pbuc1=vbuaa + // [2544] *VERA_ADDRX_L = clearline::$0 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_L // BYTE1(addr) - // [2488] clearline::$1 = byte1 clearline::addr#0 -- vbuaa=_byte1_vwuz1 + // [2545] clearline::$1 = byte1 clearline::addr#0 -- vbuz1=_byte1_vwuz2 lda.z addr+1 + sta.z clearline__1 // *VERA_ADDRX_M = BYTE1(addr) - // [2489] *VERA_ADDRX_M = clearline::$1 -- _deref_pbuc1=vbuaa + // [2546] *VERA_ADDRX_M = clearline::$1 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_M // __conio.mapbase_bank | VERA_INC_1 - // [2490] clearline::$2 = *((char *)&__conio+5) | VERA_INC_1 -- vbuaa=_deref_pbuc1_bor_vbuc2 + // [2547] clearline::$2 = *((char *)&__conio+5) | VERA_INC_1 -- vbuz1=_deref_pbuc1_bor_vbuc2 lda #VERA_INC_1 ora __conio+5 + sta.z clearline__2 // *VERA_ADDRX_H = __conio.mapbase_bank | VERA_INC_1 - // [2491] *VERA_ADDRX_H = clearline::$2 -- _deref_pbuc1=vbuaa + // [2548] *VERA_ADDRX_H = clearline::$2 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_H // register unsigned char c=__conio.width - // [2492] clearline::c#0 = *((char *)&__conio+6) -- vbuxx=_deref_pbuc1 - ldx __conio+6 - // [2493] phi from clearline clearline::@1 to clearline::@1 [phi:clearline/clearline::@1->clearline::@1] - // [2493] phi clearline::c#2 = clearline::c#0 [phi:clearline/clearline::@1->clearline::@1#0] -- register_copy + // [2549] clearline::c#0 = *((char *)&__conio+6) -- vbuz1=_deref_pbuc1 + lda __conio+6 + sta.z c + // [2550] phi from clearline clearline::@1 to clearline::@1 [phi:clearline/clearline::@1->clearline::@1] + // [2550] phi clearline::c#2 = clearline::c#0 [phi:clearline/clearline::@1->clearline::@1#0] -- register_copy // clearline::@1 __b1: // *VERA_DATA0 = ' ' - // [2494] *VERA_DATA0 = ' ' -- _deref_pbuc1=vbuc2 + // [2551] *VERA_DATA0 = ' ' -- _deref_pbuc1=vbuc2 lda #' ' sta VERA_DATA0 // *VERA_DATA0 = __conio.color - // [2495] *VERA_DATA0 = *((char *)&__conio+$d) -- _deref_pbuc1=_deref_pbuc2 + // [2552] *VERA_DATA0 = *((char *)&__conio+$d) -- _deref_pbuc1=_deref_pbuc2 lda __conio+$d sta VERA_DATA0 // c--; - // [2496] clearline::c#1 = -- clearline::c#2 -- vbuxx=_dec_vbuxx - dex + // [2553] clearline::c#1 = -- clearline::c#2 -- vbuz1=_dec_vbuz1 + dec.z c // while(c) - // [2497] if(0!=clearline::c#1) goto clearline::@1 -- 0_neq_vbuxx_then_la1 - cpx #0 + // [2554] if(0!=clearline::c#1) goto clearline::@1 -- 0_neq_vbuz1_then_la1 + lda.z c bne __b1 // clearline::@return // } - // [2498] return + // [2555] return rts } // display_frame_maskxy @@ -15725,175 +16787,228 @@ clearline: { * @param y * @return unsigned char */ -// __register(A) char display_frame_maskxy(__register(X) char x, __register(Y) char y) +// __zp($72) char display_frame_maskxy(__zp($f2) char x, __mem() char y) display_frame_maskxy: { + .label cpeekcxy1_cpeekc1_display_frame_maskxy__0 = $5b + .label cpeekcxy1_cpeekc1_display_frame_maskxy__1 = $54 + .label cpeekcxy1_cpeekc1_display_frame_maskxy__2 = $5f + .label cpeekcxy1_x = $f2 + .label c = $2c + // DR corner. + // DL corner. + // UR corner. + // UL corner. + // HL line. + // VL line. + // VR junction. + // VL junction. + // HD junction. + // HU junction. + // HV junction. + .label return = $72 + .label x = $f2 // display_frame_maskxy::cpeekcxy1 // gotoxy(x,y) - // [2500] gotoxy::x#5 = display_frame_maskxy::cpeekcxy1_x#0 - // [2501] gotoxy::y#5 = display_frame_maskxy::cpeekcxy1_y#0 - // [2502] call gotoxy - // [718] phi from display_frame_maskxy::cpeekcxy1 to gotoxy [phi:display_frame_maskxy::cpeekcxy1->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#5 [phi:display_frame_maskxy::cpeekcxy1->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#5 [phi:display_frame_maskxy::cpeekcxy1->gotoxy#1] -- register_copy + // [2557] gotoxy::x#5 = display_frame_maskxy::cpeekcxy1_x#0 -- vbuz1=vbuz2 + lda.z cpeekcxy1_x + sta.z gotoxy.x + // [2558] gotoxy::y#5 = display_frame_maskxy::cpeekcxy1_y#0 -- vbuz1=vbum2 + lda cpeekcxy1_y + sta.z gotoxy.y + // [2559] call gotoxy + // [763] phi from display_frame_maskxy::cpeekcxy1 to gotoxy [phi:display_frame_maskxy::cpeekcxy1->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#5 [phi:display_frame_maskxy::cpeekcxy1->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#5 [phi:display_frame_maskxy::cpeekcxy1->gotoxy#1] -- register_copy jsr gotoxy // display_frame_maskxy::cpeekcxy1_cpeekc1 // *VERA_CTRL &= ~VERA_ADDRSEL - // [2503] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [2560] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 lda #VERA_ADDRSEL^$ff and VERA_CTRL sta VERA_CTRL // BYTE0(__conio.offset) - // [2504] display_frame_maskxy::cpeekcxy1_cpeekc1_$0 = byte0 *((unsigned int *)&__conio+$13) -- vbuaa=_byte0__deref_pwuc1 + // [2561] display_frame_maskxy::cpeekcxy1_cpeekc1_$0 = byte0 *((unsigned int *)&__conio+$13) -- vbuz1=_byte0__deref_pwuc1 lda __conio+$13 + sta.z cpeekcxy1_cpeekc1_display_frame_maskxy__0 // *VERA_ADDRX_L = BYTE0(__conio.offset) - // [2505] *VERA_ADDRX_L = display_frame_maskxy::cpeekcxy1_cpeekc1_$0 -- _deref_pbuc1=vbuaa + // [2562] *VERA_ADDRX_L = display_frame_maskxy::cpeekcxy1_cpeekc1_$0 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_L // BYTE1(__conio.offset) - // [2506] display_frame_maskxy::cpeekcxy1_cpeekc1_$1 = byte1 *((unsigned int *)&__conio+$13) -- vbuaa=_byte1__deref_pwuc1 + // [2563] display_frame_maskxy::cpeekcxy1_cpeekc1_$1 = byte1 *((unsigned int *)&__conio+$13) -- vbuz1=_byte1__deref_pwuc1 lda __conio+$13+1 + sta.z cpeekcxy1_cpeekc1_display_frame_maskxy__1 // *VERA_ADDRX_M = BYTE1(__conio.offset) - // [2507] *VERA_ADDRX_M = display_frame_maskxy::cpeekcxy1_cpeekc1_$1 -- _deref_pbuc1=vbuaa + // [2564] *VERA_ADDRX_M = display_frame_maskxy::cpeekcxy1_cpeekc1_$1 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_M // __conio.mapbase_bank | VERA_INC_0 - // [2508] display_frame_maskxy::cpeekcxy1_cpeekc1_$2 = *((char *)&__conio+5) -- vbuaa=_deref_pbuc1 + // [2565] display_frame_maskxy::cpeekcxy1_cpeekc1_$2 = *((char *)&__conio+5) -- vbuz1=_deref_pbuc1 lda __conio+5 + sta.z cpeekcxy1_cpeekc1_display_frame_maskxy__2 // *VERA_ADDRX_H = __conio.mapbase_bank | VERA_INC_0 - // [2509] *VERA_ADDRX_H = display_frame_maskxy::cpeekcxy1_cpeekc1_$2 -- _deref_pbuc1=vbuaa + // [2566] *VERA_ADDRX_H = display_frame_maskxy::cpeekcxy1_cpeekc1_$2 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_H // return *VERA_DATA0; - // [2510] display_frame_maskxy::c#0 = *VERA_DATA0 -- vbuaa=_deref_pbuc1 + // [2567] display_frame_maskxy::c#0 = *VERA_DATA0 -- vbuz1=_deref_pbuc1 lda VERA_DATA0 + sta.z c // display_frame_maskxy::@12 // case 0x70: // DR corner. // return 0b0110; - // [2511] if(display_frame_maskxy::c#0==$70) goto display_frame_maskxy::@return -- vbuaa_eq_vbuc1_then_la1 - cmp #$70 + // [2568] if(display_frame_maskxy::c#0==$70) goto display_frame_maskxy::@return -- vbuz1_eq_vbuc1_then_la1 + lda #$70 + cmp.z c beq __b2 // display_frame_maskxy::@1 // case 0x6E: // DL corner. // return 0b0011; - // [2512] if(display_frame_maskxy::c#0==$6e) goto display_frame_maskxy::@return -- vbuaa_eq_vbuc1_then_la1 - cmp #$6e + // [2569] if(display_frame_maskxy::c#0==$6e) goto display_frame_maskxy::@return -- vbuz1_eq_vbuc1_then_la1 + lda #$6e + cmp.z c beq __b1 // display_frame_maskxy::@2 // case 0x6D: // UR corner. // return 0b1100; - // [2513] if(display_frame_maskxy::c#0==$6d) goto display_frame_maskxy::@return -- vbuaa_eq_vbuc1_then_la1 - cmp #$6d + // [2570] if(display_frame_maskxy::c#0==$6d) goto display_frame_maskxy::@return -- vbuz1_eq_vbuc1_then_la1 + lda #$6d + cmp.z c beq __b3 // display_frame_maskxy::@3 // case 0x7D: // UL corner. // return 0b1001; - // [2514] if(display_frame_maskxy::c#0==$7d) goto display_frame_maskxy::@return -- vbuaa_eq_vbuc1_then_la1 - cmp #$7d + // [2571] if(display_frame_maskxy::c#0==$7d) goto display_frame_maskxy::@return -- vbuz1_eq_vbuc1_then_la1 + lda #$7d + cmp.z c beq __b4 // display_frame_maskxy::@4 // case 0x40: // HL line. // return 0b0101; - // [2515] if(display_frame_maskxy::c#0==$40) goto display_frame_maskxy::@return -- vbuaa_eq_vbuc1_then_la1 - cmp #$40 + // [2572] if(display_frame_maskxy::c#0==$40) goto display_frame_maskxy::@return -- vbuz1_eq_vbuc1_then_la1 + lda #$40 + cmp.z c beq __b5 // display_frame_maskxy::@5 // case 0x5D: // VL line. // return 0b1010; - // [2516] if(display_frame_maskxy::c#0==$5d) goto display_frame_maskxy::@return -- vbuaa_eq_vbuc1_then_la1 - cmp #$5d + // [2573] if(display_frame_maskxy::c#0==$5d) goto display_frame_maskxy::@return -- vbuz1_eq_vbuc1_then_la1 + lda #$5d + cmp.z c beq __b6 // display_frame_maskxy::@6 // case 0x6B: // VR junction. // return 0b1110; - // [2517] if(display_frame_maskxy::c#0==$6b) goto display_frame_maskxy::@return -- vbuaa_eq_vbuc1_then_la1 - cmp #$6b + // [2574] if(display_frame_maskxy::c#0==$6b) goto display_frame_maskxy::@return -- vbuz1_eq_vbuc1_then_la1 + lda #$6b + cmp.z c beq __b7 // display_frame_maskxy::@7 // case 0x73: // VL junction. // return 0b1011; - // [2518] if(display_frame_maskxy::c#0==$73) goto display_frame_maskxy::@return -- vbuaa_eq_vbuc1_then_la1 - cmp #$73 + // [2575] if(display_frame_maskxy::c#0==$73) goto display_frame_maskxy::@return -- vbuz1_eq_vbuc1_then_la1 + lda #$73 + cmp.z c beq __b8 // display_frame_maskxy::@8 // case 0x72: // HD junction. // return 0b0111; - // [2519] if(display_frame_maskxy::c#0==$72) goto display_frame_maskxy::@return -- vbuaa_eq_vbuc1_then_la1 - cmp #$72 + // [2576] if(display_frame_maskxy::c#0==$72) goto display_frame_maskxy::@return -- vbuz1_eq_vbuc1_then_la1 + lda #$72 + cmp.z c beq __b9 // display_frame_maskxy::@9 // case 0x71: // HU junction. // return 0b1101; - // [2520] if(display_frame_maskxy::c#0==$71) goto display_frame_maskxy::@return -- vbuaa_eq_vbuc1_then_la1 - cmp #$71 + // [2577] if(display_frame_maskxy::c#0==$71) goto display_frame_maskxy::@return -- vbuz1_eq_vbuc1_then_la1 + lda #$71 + cmp.z c beq __b10 // display_frame_maskxy::@10 // case 0x5B: // HV junction. // return 0b1111; - // [2521] if(display_frame_maskxy::c#0==$5b) goto display_frame_maskxy::@11 -- vbuaa_eq_vbuc1_then_la1 - cmp #$5b + // [2578] if(display_frame_maskxy::c#0==$5b) goto display_frame_maskxy::@11 -- vbuz1_eq_vbuc1_then_la1 + lda #$5b + cmp.z c beq __b11 - // [2523] phi from display_frame_maskxy::@10 to display_frame_maskxy::@return [phi:display_frame_maskxy::@10->display_frame_maskxy::@return] - // [2523] phi display_frame_maskxy::return#12 = 0 [phi:display_frame_maskxy::@10->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi from display_frame_maskxy::@10 to display_frame_maskxy::@return [phi:display_frame_maskxy::@10->display_frame_maskxy::@return] + // [2580] phi display_frame_maskxy::return#12 = 0 [phi:display_frame_maskxy::@10->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #0 + sta.z return rts - // [2522] phi from display_frame_maskxy::@10 to display_frame_maskxy::@11 [phi:display_frame_maskxy::@10->display_frame_maskxy::@11] + // [2579] phi from display_frame_maskxy::@10 to display_frame_maskxy::@11 [phi:display_frame_maskxy::@10->display_frame_maskxy::@11] // display_frame_maskxy::@11 __b11: - // [2523] phi from display_frame_maskxy::@11 to display_frame_maskxy::@return [phi:display_frame_maskxy::@11->display_frame_maskxy::@return] - // [2523] phi display_frame_maskxy::return#12 = $f [phi:display_frame_maskxy::@11->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi from display_frame_maskxy::@11 to display_frame_maskxy::@return [phi:display_frame_maskxy::@11->display_frame_maskxy::@return] + // [2580] phi display_frame_maskxy::return#12 = $f [phi:display_frame_maskxy::@11->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #$f + sta.z return rts - // [2523] phi from display_frame_maskxy::@1 to display_frame_maskxy::@return [phi:display_frame_maskxy::@1->display_frame_maskxy::@return] + // [2580] phi from display_frame_maskxy::@1 to display_frame_maskxy::@return [phi:display_frame_maskxy::@1->display_frame_maskxy::@return] __b1: - // [2523] phi display_frame_maskxy::return#12 = 3 [phi:display_frame_maskxy::@1->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi display_frame_maskxy::return#12 = 3 [phi:display_frame_maskxy::@1->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #3 + sta.z return rts - // [2523] phi from display_frame_maskxy::@12 to display_frame_maskxy::@return [phi:display_frame_maskxy::@12->display_frame_maskxy::@return] + // [2580] phi from display_frame_maskxy::@12 to display_frame_maskxy::@return [phi:display_frame_maskxy::@12->display_frame_maskxy::@return] __b2: - // [2523] phi display_frame_maskxy::return#12 = 6 [phi:display_frame_maskxy::@12->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi display_frame_maskxy::return#12 = 6 [phi:display_frame_maskxy::@12->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #6 + sta.z return rts - // [2523] phi from display_frame_maskxy::@2 to display_frame_maskxy::@return [phi:display_frame_maskxy::@2->display_frame_maskxy::@return] + // [2580] phi from display_frame_maskxy::@2 to display_frame_maskxy::@return [phi:display_frame_maskxy::@2->display_frame_maskxy::@return] __b3: - // [2523] phi display_frame_maskxy::return#12 = $c [phi:display_frame_maskxy::@2->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi display_frame_maskxy::return#12 = $c [phi:display_frame_maskxy::@2->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #$c + sta.z return rts - // [2523] phi from display_frame_maskxy::@3 to display_frame_maskxy::@return [phi:display_frame_maskxy::@3->display_frame_maskxy::@return] + // [2580] phi from display_frame_maskxy::@3 to display_frame_maskxy::@return [phi:display_frame_maskxy::@3->display_frame_maskxy::@return] __b4: - // [2523] phi display_frame_maskxy::return#12 = 9 [phi:display_frame_maskxy::@3->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi display_frame_maskxy::return#12 = 9 [phi:display_frame_maskxy::@3->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #9 + sta.z return rts - // [2523] phi from display_frame_maskxy::@4 to display_frame_maskxy::@return [phi:display_frame_maskxy::@4->display_frame_maskxy::@return] + // [2580] phi from display_frame_maskxy::@4 to display_frame_maskxy::@return [phi:display_frame_maskxy::@4->display_frame_maskxy::@return] __b5: - // [2523] phi display_frame_maskxy::return#12 = 5 [phi:display_frame_maskxy::@4->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi display_frame_maskxy::return#12 = 5 [phi:display_frame_maskxy::@4->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #5 + sta.z return rts - // [2523] phi from display_frame_maskxy::@5 to display_frame_maskxy::@return [phi:display_frame_maskxy::@5->display_frame_maskxy::@return] + // [2580] phi from display_frame_maskxy::@5 to display_frame_maskxy::@return [phi:display_frame_maskxy::@5->display_frame_maskxy::@return] __b6: - // [2523] phi display_frame_maskxy::return#12 = $a [phi:display_frame_maskxy::@5->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi display_frame_maskxy::return#12 = $a [phi:display_frame_maskxy::@5->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #$a + sta.z return rts - // [2523] phi from display_frame_maskxy::@6 to display_frame_maskxy::@return [phi:display_frame_maskxy::@6->display_frame_maskxy::@return] + // [2580] phi from display_frame_maskxy::@6 to display_frame_maskxy::@return [phi:display_frame_maskxy::@6->display_frame_maskxy::@return] __b7: - // [2523] phi display_frame_maskxy::return#12 = $e [phi:display_frame_maskxy::@6->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi display_frame_maskxy::return#12 = $e [phi:display_frame_maskxy::@6->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #$e + sta.z return rts - // [2523] phi from display_frame_maskxy::@7 to display_frame_maskxy::@return [phi:display_frame_maskxy::@7->display_frame_maskxy::@return] + // [2580] phi from display_frame_maskxy::@7 to display_frame_maskxy::@return [phi:display_frame_maskxy::@7->display_frame_maskxy::@return] __b8: - // [2523] phi display_frame_maskxy::return#12 = $b [phi:display_frame_maskxy::@7->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi display_frame_maskxy::return#12 = $b [phi:display_frame_maskxy::@7->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #$b + sta.z return rts - // [2523] phi from display_frame_maskxy::@8 to display_frame_maskxy::@return [phi:display_frame_maskxy::@8->display_frame_maskxy::@return] + // [2580] phi from display_frame_maskxy::@8 to display_frame_maskxy::@return [phi:display_frame_maskxy::@8->display_frame_maskxy::@return] __b9: - // [2523] phi display_frame_maskxy::return#12 = 7 [phi:display_frame_maskxy::@8->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi display_frame_maskxy::return#12 = 7 [phi:display_frame_maskxy::@8->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #7 + sta.z return rts - // [2523] phi from display_frame_maskxy::@9 to display_frame_maskxy::@return [phi:display_frame_maskxy::@9->display_frame_maskxy::@return] + // [2580] phi from display_frame_maskxy::@9 to display_frame_maskxy::@return [phi:display_frame_maskxy::@9->display_frame_maskxy::@return] __b10: - // [2523] phi display_frame_maskxy::return#12 = $d [phi:display_frame_maskxy::@9->display_frame_maskxy::@return#0] -- vbuaa=vbuc1 + // [2580] phi display_frame_maskxy::return#12 = $d [phi:display_frame_maskxy::@9->display_frame_maskxy::@return#0] -- vbuz1=vbuc1 lda #$d + sta.z return // display_frame_maskxy::@return // } - // [2524] return + // [2581] return rts + .segment Data + .label cpeekcxy1_y = rom_get_release.rom_get_release__0 + .label y = rom_get_release.rom_get_release__0 } +.segment Code // display_frame_char /** * @brief @@ -15901,146 +17016,171 @@ display_frame_maskxy: { * @param mask * @return unsigned char */ -// __register(A) char display_frame_char(__register(A) char mask) +// __zp($53) char display_frame_char(__zp($72) char mask) display_frame_char: { + .label return = $53 + .label mask = $72 // case 0b0110: // return 0x70; - // [2526] if(display_frame_char::mask#10==6) goto display_frame_char::@return -- vbuaa_eq_vbuc1_then_la1 - cmp #6 + // [2583] if(display_frame_char::mask#10==6) goto display_frame_char::@return -- vbuz1_eq_vbuc1_then_la1 + lda #6 + cmp.z mask beq __b1 // display_frame_char::@1 // case 0b0011: // return 0x6E; - // [2527] if(display_frame_char::mask#10==3) goto display_frame_char::@return -- vbuaa_eq_vbuc1_then_la1 + // [2584] if(display_frame_char::mask#10==3) goto display_frame_char::@return -- vbuz1_eq_vbuc1_then_la1 // DR corner. - cmp #3 + lda #3 + cmp.z mask beq __b2 // display_frame_char::@2 // case 0b1100: // return 0x6D; - // [2528] if(display_frame_char::mask#10==$c) goto display_frame_char::@return -- vbuaa_eq_vbuc1_then_la1 + // [2585] if(display_frame_char::mask#10==$c) goto display_frame_char::@return -- vbuz1_eq_vbuc1_then_la1 // DL corner. - cmp #$c + lda #$c + cmp.z mask beq __b3 // display_frame_char::@3 // case 0b1001: // return 0x7D; - // [2529] if(display_frame_char::mask#10==9) goto display_frame_char::@return -- vbuaa_eq_vbuc1_then_la1 + // [2586] if(display_frame_char::mask#10==9) goto display_frame_char::@return -- vbuz1_eq_vbuc1_then_la1 // UR corner. - cmp #9 + lda #9 + cmp.z mask beq __b4 // display_frame_char::@4 // case 0b0101: // return 0x40; - // [2530] if(display_frame_char::mask#10==5) goto display_frame_char::@return -- vbuaa_eq_vbuc1_then_la1 + // [2587] if(display_frame_char::mask#10==5) goto display_frame_char::@return -- vbuz1_eq_vbuc1_then_la1 // UL corner. - cmp #5 + lda #5 + cmp.z mask beq __b5 // display_frame_char::@5 // case 0b1010: // return 0x5D; - // [2531] if(display_frame_char::mask#10==$a) goto display_frame_char::@return -- vbuaa_eq_vbuc1_then_la1 + // [2588] if(display_frame_char::mask#10==$a) goto display_frame_char::@return -- vbuz1_eq_vbuc1_then_la1 // HL line. - cmp #$a + lda #$a + cmp.z mask beq __b6 // display_frame_char::@6 // case 0b1110: // return 0x6B; - // [2532] if(display_frame_char::mask#10==$e) goto display_frame_char::@return -- vbuaa_eq_vbuc1_then_la1 + // [2589] if(display_frame_char::mask#10==$e) goto display_frame_char::@return -- vbuz1_eq_vbuc1_then_la1 // VL line. - cmp #$e + lda #$e + cmp.z mask beq __b7 // display_frame_char::@7 // case 0b1011: // return 0x73; - // [2533] if(display_frame_char::mask#10==$b) goto display_frame_char::@return -- vbuaa_eq_vbuc1_then_la1 + // [2590] if(display_frame_char::mask#10==$b) goto display_frame_char::@return -- vbuz1_eq_vbuc1_then_la1 // VR junction. - cmp #$b + lda #$b + cmp.z mask beq __b8 // display_frame_char::@8 // case 0b0111: // return 0x72; - // [2534] if(display_frame_char::mask#10==7) goto display_frame_char::@return -- vbuaa_eq_vbuc1_then_la1 + // [2591] if(display_frame_char::mask#10==7) goto display_frame_char::@return -- vbuz1_eq_vbuc1_then_la1 // VL junction. - cmp #7 + lda #7 + cmp.z mask beq __b9 // display_frame_char::@9 // case 0b1101: // return 0x71; - // [2535] if(display_frame_char::mask#10==$d) goto display_frame_char::@return -- vbuaa_eq_vbuc1_then_la1 + // [2592] if(display_frame_char::mask#10==$d) goto display_frame_char::@return -- vbuz1_eq_vbuc1_then_la1 // HD junction. - cmp #$d + lda #$d + cmp.z mask beq __b10 // display_frame_char::@10 // case 0b1111: // return 0x5B; - // [2536] if(display_frame_char::mask#10==$f) goto display_frame_char::@11 -- vbuaa_eq_vbuc1_then_la1 + // [2593] if(display_frame_char::mask#10==$f) goto display_frame_char::@11 -- vbuz1_eq_vbuc1_then_la1 // HU junction. - cmp #$f + lda #$f + cmp.z mask beq __b11 - // [2538] phi from display_frame_char::@10 to display_frame_char::@return [phi:display_frame_char::@10->display_frame_char::@return] - // [2538] phi display_frame_char::return#12 = $20 [phi:display_frame_char::@10->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi from display_frame_char::@10 to display_frame_char::@return [phi:display_frame_char::@10->display_frame_char::@return] + // [2595] phi display_frame_char::return#12 = $20 [phi:display_frame_char::@10->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$20 + sta.z return rts - // [2537] phi from display_frame_char::@10 to display_frame_char::@11 [phi:display_frame_char::@10->display_frame_char::@11] + // [2594] phi from display_frame_char::@10 to display_frame_char::@11 [phi:display_frame_char::@10->display_frame_char::@11] // display_frame_char::@11 __b11: - // [2538] phi from display_frame_char::@11 to display_frame_char::@return [phi:display_frame_char::@11->display_frame_char::@return] - // [2538] phi display_frame_char::return#12 = $5b [phi:display_frame_char::@11->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi from display_frame_char::@11 to display_frame_char::@return [phi:display_frame_char::@11->display_frame_char::@return] + // [2595] phi display_frame_char::return#12 = $5b [phi:display_frame_char::@11->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$5b + sta.z return rts - // [2538] phi from display_frame_char to display_frame_char::@return [phi:display_frame_char->display_frame_char::@return] + // [2595] phi from display_frame_char to display_frame_char::@return [phi:display_frame_char->display_frame_char::@return] __b1: - // [2538] phi display_frame_char::return#12 = $70 [phi:display_frame_char->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi display_frame_char::return#12 = $70 [phi:display_frame_char->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$70 + sta.z return rts - // [2538] phi from display_frame_char::@1 to display_frame_char::@return [phi:display_frame_char::@1->display_frame_char::@return] + // [2595] phi from display_frame_char::@1 to display_frame_char::@return [phi:display_frame_char::@1->display_frame_char::@return] __b2: - // [2538] phi display_frame_char::return#12 = $6e [phi:display_frame_char::@1->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi display_frame_char::return#12 = $6e [phi:display_frame_char::@1->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$6e + sta.z return rts - // [2538] phi from display_frame_char::@2 to display_frame_char::@return [phi:display_frame_char::@2->display_frame_char::@return] + // [2595] phi from display_frame_char::@2 to display_frame_char::@return [phi:display_frame_char::@2->display_frame_char::@return] __b3: - // [2538] phi display_frame_char::return#12 = $6d [phi:display_frame_char::@2->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi display_frame_char::return#12 = $6d [phi:display_frame_char::@2->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$6d + sta.z return rts - // [2538] phi from display_frame_char::@3 to display_frame_char::@return [phi:display_frame_char::@3->display_frame_char::@return] + // [2595] phi from display_frame_char::@3 to display_frame_char::@return [phi:display_frame_char::@3->display_frame_char::@return] __b4: - // [2538] phi display_frame_char::return#12 = $7d [phi:display_frame_char::@3->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi display_frame_char::return#12 = $7d [phi:display_frame_char::@3->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$7d + sta.z return rts - // [2538] phi from display_frame_char::@4 to display_frame_char::@return [phi:display_frame_char::@4->display_frame_char::@return] + // [2595] phi from display_frame_char::@4 to display_frame_char::@return [phi:display_frame_char::@4->display_frame_char::@return] __b5: - // [2538] phi display_frame_char::return#12 = $40 [phi:display_frame_char::@4->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi display_frame_char::return#12 = $40 [phi:display_frame_char::@4->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$40 + sta.z return rts - // [2538] phi from display_frame_char::@5 to display_frame_char::@return [phi:display_frame_char::@5->display_frame_char::@return] + // [2595] phi from display_frame_char::@5 to display_frame_char::@return [phi:display_frame_char::@5->display_frame_char::@return] __b6: - // [2538] phi display_frame_char::return#12 = $5d [phi:display_frame_char::@5->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi display_frame_char::return#12 = $5d [phi:display_frame_char::@5->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$5d + sta.z return rts - // [2538] phi from display_frame_char::@6 to display_frame_char::@return [phi:display_frame_char::@6->display_frame_char::@return] + // [2595] phi from display_frame_char::@6 to display_frame_char::@return [phi:display_frame_char::@6->display_frame_char::@return] __b7: - // [2538] phi display_frame_char::return#12 = $6b [phi:display_frame_char::@6->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi display_frame_char::return#12 = $6b [phi:display_frame_char::@6->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$6b + sta.z return rts - // [2538] phi from display_frame_char::@7 to display_frame_char::@return [phi:display_frame_char::@7->display_frame_char::@return] + // [2595] phi from display_frame_char::@7 to display_frame_char::@return [phi:display_frame_char::@7->display_frame_char::@return] __b8: - // [2538] phi display_frame_char::return#12 = $73 [phi:display_frame_char::@7->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi display_frame_char::return#12 = $73 [phi:display_frame_char::@7->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$73 + sta.z return rts - // [2538] phi from display_frame_char::@8 to display_frame_char::@return [phi:display_frame_char::@8->display_frame_char::@return] + // [2595] phi from display_frame_char::@8 to display_frame_char::@return [phi:display_frame_char::@8->display_frame_char::@return] __b9: - // [2538] phi display_frame_char::return#12 = $72 [phi:display_frame_char::@8->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi display_frame_char::return#12 = $72 [phi:display_frame_char::@8->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$72 + sta.z return rts - // [2538] phi from display_frame_char::@9 to display_frame_char::@return [phi:display_frame_char::@9->display_frame_char::@return] + // [2595] phi from display_frame_char::@9 to display_frame_char::@return [phi:display_frame_char::@9->display_frame_char::@return] __b10: - // [2538] phi display_frame_char::return#12 = $71 [phi:display_frame_char::@9->display_frame_char::@return#0] -- vbuaa=vbuc1 + // [2595] phi display_frame_char::return#12 = $71 [phi:display_frame_char::@9->display_frame_char::@return#0] -- vbuz1=vbuc1 lda #$71 + sta.z return // display_frame_char::@return // } - // [2539] return + // [2596] return rts } // display_chip_led @@ -16053,83 +17193,93 @@ display_frame_char: { * @param tc Fore color * @param bc Back color */ -// void display_chip_led(__zp($b1) char x, char y, __zp($b0) char w, __register(X) char tc, char bc) +// void display_chip_led(__zp($36) char x, char y, __zp($5c) char w, __zp($2c) char tc, char bc) display_chip_led: { - .label x = $b1 - .label w = $b0 + .label x = $36 + .label w = $5c + .label tc = $2c // textcolor(tc) - // [2541] textcolor::color#11 = display_chip_led::tc#3 - // [2542] call textcolor - // [700] phi from display_chip_led to textcolor [phi:display_chip_led->textcolor] - // [700] phi textcolor::color#18 = textcolor::color#11 [phi:display_chip_led->textcolor#0] -- register_copy + // [2598] textcolor::color#11 = display_chip_led::tc#3 -- vbuz1=vbuz2 + lda.z tc + sta.z textcolor.color + // [2599] call textcolor + // [745] phi from display_chip_led to textcolor [phi:display_chip_led->textcolor] + // [745] phi textcolor::color#18 = textcolor::color#11 [phi:display_chip_led->textcolor#0] -- register_copy jsr textcolor - // [2543] phi from display_chip_led to display_chip_led::@3 [phi:display_chip_led->display_chip_led::@3] + // [2600] phi from display_chip_led to display_chip_led::@3 [phi:display_chip_led->display_chip_led::@3] // display_chip_led::@3 // bgcolor(bc) - // [2544] call bgcolor - // [705] phi from display_chip_led::@3 to bgcolor [phi:display_chip_led::@3->bgcolor] - // [705] phi bgcolor::color#14 = BLUE [phi:display_chip_led::@3->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [2601] call bgcolor + // [750] phi from display_chip_led::@3 to bgcolor [phi:display_chip_led::@3->bgcolor] + // [750] phi bgcolor::color#14 = BLUE [phi:display_chip_led::@3->bgcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z bgcolor.color jsr bgcolor - // [2545] phi from display_chip_led::@3 display_chip_led::@5 to display_chip_led::@1 [phi:display_chip_led::@3/display_chip_led::@5->display_chip_led::@1] - // [2545] phi display_chip_led::w#4 = display_chip_led::w#7 [phi:display_chip_led::@3/display_chip_led::@5->display_chip_led::@1#0] -- register_copy - // [2545] phi display_chip_led::x#4 = display_chip_led::x#7 [phi:display_chip_led::@3/display_chip_led::@5->display_chip_led::@1#1] -- register_copy + // [2602] phi from display_chip_led::@3 display_chip_led::@5 to display_chip_led::@1 [phi:display_chip_led::@3/display_chip_led::@5->display_chip_led::@1] + // [2602] phi display_chip_led::w#4 = display_chip_led::w#7 [phi:display_chip_led::@3/display_chip_led::@5->display_chip_led::@1#0] -- register_copy + // [2602] phi display_chip_led::x#4 = display_chip_led::x#7 [phi:display_chip_led::@3/display_chip_led::@5->display_chip_led::@1#1] -- register_copy // display_chip_led::@1 __b1: // cputcxy(x, y, 0x6F) - // [2546] cputcxy::x#9 = display_chip_led::x#4 -- vbuxx=vbuz1 - ldx.z x - // [2547] call cputcxy - // [1986] phi from display_chip_led::@1 to cputcxy [phi:display_chip_led::@1->cputcxy] - // [1986] phi cputcxy::c#15 = $6f [phi:display_chip_led::@1->cputcxy#0] -- vbuz1=vbuc1 + // [2603] cputcxy::x#9 = display_chip_led::x#4 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [2604] call cputcxy + // [2043] phi from display_chip_led::@1 to cputcxy [phi:display_chip_led::@1->cputcxy] + // [2043] phi cputcxy::c#15 = $6f [phi:display_chip_led::@1->cputcxy#0] -- vbuz1=vbuc1 lda #$6f sta.z cputcxy.c - // [1986] phi cputcxy::y#15 = 3 [phi:display_chip_led::@1->cputcxy#1] -- vbuyy=vbuc1 - ldy #3 - // [1986] phi cputcxy::x#15 = cputcxy::x#9 [phi:display_chip_led::@1->cputcxy#2] -- register_copy + // [2043] phi cputcxy::y#15 = 3 [phi:display_chip_led::@1->cputcxy#1] -- vbuz1=vbuc1 + lda #3 + sta.z cputcxy.y + // [2043] phi cputcxy::x#15 = cputcxy::x#9 [phi:display_chip_led::@1->cputcxy#2] -- register_copy jsr cputcxy // display_chip_led::@4 // cputcxy(x, y+1, 0x77) - // [2548] cputcxy::x#10 = display_chip_led::x#4 -- vbuxx=vbuz1 - ldx.z x - // [2549] call cputcxy - // [1986] phi from display_chip_led::@4 to cputcxy [phi:display_chip_led::@4->cputcxy] - // [1986] phi cputcxy::c#15 = $77 [phi:display_chip_led::@4->cputcxy#0] -- vbuz1=vbuc1 + // [2605] cputcxy::x#10 = display_chip_led::x#4 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [2606] call cputcxy + // [2043] phi from display_chip_led::@4 to cputcxy [phi:display_chip_led::@4->cputcxy] + // [2043] phi cputcxy::c#15 = $77 [phi:display_chip_led::@4->cputcxy#0] -- vbuz1=vbuc1 lda #$77 sta.z cputcxy.c - // [1986] phi cputcxy::y#15 = 3+1 [phi:display_chip_led::@4->cputcxy#1] -- vbuyy=vbuc1 - ldy #3+1 - // [1986] phi cputcxy::x#15 = cputcxy::x#10 [phi:display_chip_led::@4->cputcxy#2] -- register_copy + // [2043] phi cputcxy::y#15 = 3+1 [phi:display_chip_led::@4->cputcxy#1] -- vbuz1=vbuc1 + lda #3+1 + sta.z cputcxy.y + // [2043] phi cputcxy::x#15 = cputcxy::x#10 [phi:display_chip_led::@4->cputcxy#2] -- register_copy jsr cputcxy // display_chip_led::@5 // x++; - // [2550] display_chip_led::x#0 = ++ display_chip_led::x#4 -- vbuz1=_inc_vbuz1 + // [2607] display_chip_led::x#0 = ++ display_chip_led::x#4 -- vbuz1=_inc_vbuz1 inc.z x // while(--w) - // [2551] display_chip_led::w#0 = -- display_chip_led::w#4 -- vbuz1=_dec_vbuz1 + // [2608] display_chip_led::w#0 = -- display_chip_led::w#4 -- vbuz1=_dec_vbuz1 dec.z w - // [2552] if(0!=display_chip_led::w#0) goto display_chip_led::@1 -- 0_neq_vbuz1_then_la1 + // [2609] if(0!=display_chip_led::w#0) goto display_chip_led::@1 -- 0_neq_vbuz1_then_la1 lda.z w bne __b1 - // [2553] phi from display_chip_led::@5 to display_chip_led::@2 [phi:display_chip_led::@5->display_chip_led::@2] + // [2610] phi from display_chip_led::@5 to display_chip_led::@2 [phi:display_chip_led::@5->display_chip_led::@2] // display_chip_led::@2 // textcolor(WHITE) - // [2554] call textcolor - // [700] phi from display_chip_led::@2 to textcolor [phi:display_chip_led::@2->textcolor] - // [700] phi textcolor::color#18 = WHITE [phi:display_chip_led::@2->textcolor#0] -- vbuxx=vbuc1 - ldx #WHITE + // [2611] call textcolor + // [745] phi from display_chip_led::@2 to textcolor [phi:display_chip_led::@2->textcolor] + // [745] phi textcolor::color#18 = WHITE [phi:display_chip_led::@2->textcolor#0] -- vbuz1=vbuc1 + lda #WHITE + sta.z textcolor.color jsr textcolor - // [2555] phi from display_chip_led::@2 to display_chip_led::@6 [phi:display_chip_led::@2->display_chip_led::@6] + // [2612] phi from display_chip_led::@2 to display_chip_led::@6 [phi:display_chip_led::@2->display_chip_led::@6] // display_chip_led::@6 // bgcolor(BLUE) - // [2556] call bgcolor - // [705] phi from display_chip_led::@6 to bgcolor [phi:display_chip_led::@6->bgcolor] - // [705] phi bgcolor::color#14 = BLUE [phi:display_chip_led::@6->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [2613] call bgcolor + // [750] phi from display_chip_led::@6 to bgcolor [phi:display_chip_led::@6->bgcolor] + // [750] phi bgcolor::color#14 = BLUE [phi:display_chip_led::@6->bgcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z bgcolor.color jsr bgcolor // display_chip_led::@return // } - // [2557] return + // [2614] return rts } // display_chip_line @@ -16141,152 +17291,162 @@ display_chip_led: { * @param w Width * @param c Fore color */ -// void display_chip_line(__mem() char x, __mem() char y, __zp($f3) char w, __mem() char c) +// void display_chip_line(__zp($2c) char x, __zp($f7) char y, __zp($6d) char w, __zp($e4) char c) display_chip_line: { - .label i = $c8 - .label w = $f3 + .label i = $69 + .label x = $2c + .label w = $6d + .label c = $e4 + .label y = $f7 // gotoxy(x, y) - // [2559] gotoxy::x#7 = display_chip_line::x#16 -- vbuxx=vbum1 - ldx x - // [2560] gotoxy::y#7 = display_chip_line::y#16 -- vbuyy=vbum1 - ldy y - // [2561] call gotoxy - // [718] phi from display_chip_line to gotoxy [phi:display_chip_line->gotoxy] - // [718] phi gotoxy::y#30 = gotoxy::y#7 [phi:display_chip_line->gotoxy#0] -- register_copy - // [718] phi gotoxy::x#30 = gotoxy::x#7 [phi:display_chip_line->gotoxy#1] -- register_copy + // [2616] gotoxy::x#7 = display_chip_line::x#16 -- vbuz1=vbuz2 + lda.z x + sta.z gotoxy.x + // [2617] gotoxy::y#7 = display_chip_line::y#16 -- vbuz1=vbuz2 + lda.z y + sta.z gotoxy.y + // [2618] call gotoxy + // [763] phi from display_chip_line to gotoxy [phi:display_chip_line->gotoxy] + // [763] phi gotoxy::y#30 = gotoxy::y#7 [phi:display_chip_line->gotoxy#0] -- register_copy + // [763] phi gotoxy::x#30 = gotoxy::x#7 [phi:display_chip_line->gotoxy#1] -- register_copy jsr gotoxy - // [2562] phi from display_chip_line to display_chip_line::@4 [phi:display_chip_line->display_chip_line::@4] + // [2619] phi from display_chip_line to display_chip_line::@4 [phi:display_chip_line->display_chip_line::@4] // display_chip_line::@4 // textcolor(GREY) - // [2563] call textcolor - // [700] phi from display_chip_line::@4 to textcolor [phi:display_chip_line::@4->textcolor] - // [700] phi textcolor::color#18 = GREY [phi:display_chip_line::@4->textcolor#0] -- vbuxx=vbuc1 - ldx #GREY + // [2620] call textcolor + // [745] phi from display_chip_line::@4 to textcolor [phi:display_chip_line::@4->textcolor] + // [745] phi textcolor::color#18 = GREY [phi:display_chip_line::@4->textcolor#0] -- vbuz1=vbuc1 + lda #GREY + sta.z textcolor.color jsr textcolor - // [2564] phi from display_chip_line::@4 to display_chip_line::@5 [phi:display_chip_line::@4->display_chip_line::@5] + // [2621] phi from display_chip_line::@4 to display_chip_line::@5 [phi:display_chip_line::@4->display_chip_line::@5] // display_chip_line::@5 // bgcolor(BLUE) - // [2565] call bgcolor - // [705] phi from display_chip_line::@5 to bgcolor [phi:display_chip_line::@5->bgcolor] - // [705] phi bgcolor::color#14 = BLUE [phi:display_chip_line::@5->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [2622] call bgcolor + // [750] phi from display_chip_line::@5 to bgcolor [phi:display_chip_line::@5->bgcolor] + // [750] phi bgcolor::color#14 = BLUE [phi:display_chip_line::@5->bgcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z bgcolor.color jsr bgcolor // display_chip_line::@6 // cputc(VERA_CHR_UR) - // [2566] stackpush(char) = $7c -- _stackpushbyte_=vbuc1 + // [2623] stackpush(char) = $7c -- _stackpushbyte_=vbuc1 lda #$7c pha - // [2567] callexecute cputc -- call_vprc1 + // [2624] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // textcolor(WHITE) - // [2569] call textcolor - // [700] phi from display_chip_line::@6 to textcolor [phi:display_chip_line::@6->textcolor] - // [700] phi textcolor::color#18 = WHITE [phi:display_chip_line::@6->textcolor#0] -- vbuxx=vbuc1 - ldx #WHITE + // [2626] call textcolor + // [745] phi from display_chip_line::@6 to textcolor [phi:display_chip_line::@6->textcolor] + // [745] phi textcolor::color#18 = WHITE [phi:display_chip_line::@6->textcolor#0] -- vbuz1=vbuc1 + lda #WHITE + sta.z textcolor.color jsr textcolor - // [2570] phi from display_chip_line::@6 to display_chip_line::@7 [phi:display_chip_line::@6->display_chip_line::@7] + // [2627] phi from display_chip_line::@6 to display_chip_line::@7 [phi:display_chip_line::@6->display_chip_line::@7] // display_chip_line::@7 // bgcolor(BLACK) - // [2571] call bgcolor - // [705] phi from display_chip_line::@7 to bgcolor [phi:display_chip_line::@7->bgcolor] - // [705] phi bgcolor::color#14 = BLACK [phi:display_chip_line::@7->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLACK + // [2628] call bgcolor + // [750] phi from display_chip_line::@7 to bgcolor [phi:display_chip_line::@7->bgcolor] + // [750] phi bgcolor::color#14 = BLACK [phi:display_chip_line::@7->bgcolor#0] -- vbuz1=vbuc1 + lda #BLACK + sta.z bgcolor.color jsr bgcolor - // [2572] phi from display_chip_line::@7 to display_chip_line::@1 [phi:display_chip_line::@7->display_chip_line::@1] - // [2572] phi display_chip_line::i#2 = 0 [phi:display_chip_line::@7->display_chip_line::@1#0] -- vbuz1=vbuc1 + // [2629] phi from display_chip_line::@7 to display_chip_line::@1 [phi:display_chip_line::@7->display_chip_line::@1] + // [2629] phi display_chip_line::i#2 = 0 [phi:display_chip_line::@7->display_chip_line::@1#0] -- vbuz1=vbuc1 lda #0 sta.z i // display_chip_line::@1 __b1: // for(char i=0; idisplay_chip_line::@3] + // [2631] phi from display_chip_line::@1 to display_chip_line::@3 [phi:display_chip_line::@1->display_chip_line::@3] // display_chip_line::@3 // textcolor(GREY) - // [2575] call textcolor - // [700] phi from display_chip_line::@3 to textcolor [phi:display_chip_line::@3->textcolor] - // [700] phi textcolor::color#18 = GREY [phi:display_chip_line::@3->textcolor#0] -- vbuxx=vbuc1 - ldx #GREY + // [2632] call textcolor + // [745] phi from display_chip_line::@3 to textcolor [phi:display_chip_line::@3->textcolor] + // [745] phi textcolor::color#18 = GREY [phi:display_chip_line::@3->textcolor#0] -- vbuz1=vbuc1 + lda #GREY + sta.z textcolor.color jsr textcolor - // [2576] phi from display_chip_line::@3 to display_chip_line::@8 [phi:display_chip_line::@3->display_chip_line::@8] + // [2633] phi from display_chip_line::@3 to display_chip_line::@8 [phi:display_chip_line::@3->display_chip_line::@8] // display_chip_line::@8 // bgcolor(BLUE) - // [2577] call bgcolor - // [705] phi from display_chip_line::@8 to bgcolor [phi:display_chip_line::@8->bgcolor] - // [705] phi bgcolor::color#14 = BLUE [phi:display_chip_line::@8->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [2634] call bgcolor + // [750] phi from display_chip_line::@8 to bgcolor [phi:display_chip_line::@8->bgcolor] + // [750] phi bgcolor::color#14 = BLUE [phi:display_chip_line::@8->bgcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z bgcolor.color jsr bgcolor // display_chip_line::@9 // cputc(VERA_CHR_UL) - // [2578] stackpush(char) = $7e -- _stackpushbyte_=vbuc1 + // [2635] stackpush(char) = $7e -- _stackpushbyte_=vbuc1 lda #$7e pha - // [2579] callexecute cputc -- call_vprc1 + // [2636] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // textcolor(WHITE) - // [2581] call textcolor - // [700] phi from display_chip_line::@9 to textcolor [phi:display_chip_line::@9->textcolor] - // [700] phi textcolor::color#18 = WHITE [phi:display_chip_line::@9->textcolor#0] -- vbuxx=vbuc1 - ldx #WHITE + // [2638] call textcolor + // [745] phi from display_chip_line::@9 to textcolor [phi:display_chip_line::@9->textcolor] + // [745] phi textcolor::color#18 = WHITE [phi:display_chip_line::@9->textcolor#0] -- vbuz1=vbuc1 + lda #WHITE + sta.z textcolor.color jsr textcolor - // [2582] phi from display_chip_line::@9 to display_chip_line::@10 [phi:display_chip_line::@9->display_chip_line::@10] + // [2639] phi from display_chip_line::@9 to display_chip_line::@10 [phi:display_chip_line::@9->display_chip_line::@10] // display_chip_line::@10 // bgcolor(BLACK) - // [2583] call bgcolor - // [705] phi from display_chip_line::@10 to bgcolor [phi:display_chip_line::@10->bgcolor] - // [705] phi bgcolor::color#14 = BLACK [phi:display_chip_line::@10->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLACK + // [2640] call bgcolor + // [750] phi from display_chip_line::@10 to bgcolor [phi:display_chip_line::@10->bgcolor] + // [750] phi bgcolor::color#14 = BLACK [phi:display_chip_line::@10->bgcolor#0] -- vbuz1=vbuc1 + lda #BLACK + sta.z bgcolor.color jsr bgcolor // display_chip_line::@11 // cputcxy(x+2, y, c) - // [2584] cputcxy::x#8 = display_chip_line::x#16 + 2 -- vbuxx=vbum1_plus_2 - ldx x - inx - inx - // [2585] cputcxy::y#8 = display_chip_line::y#16 -- vbuyy=vbum1 - ldy y - // [2586] cputcxy::c#8 = display_chip_line::c#15 -- vbuz1=vbum2 - lda c + // [2641] cputcxy::x#8 = display_chip_line::x#16 + 2 -- vbuz1=vbuz2_plus_2 + lda.z x + clc + adc #2 + sta.z cputcxy.x + // [2642] cputcxy::y#8 = display_chip_line::y#16 -- vbuz1=vbuz2 + lda.z y + sta.z cputcxy.y + // [2643] cputcxy::c#8 = display_chip_line::c#15 -- vbuz1=vbuz2 + lda.z c sta.z cputcxy.c - // [2587] call cputcxy - // [1986] phi from display_chip_line::@11 to cputcxy [phi:display_chip_line::@11->cputcxy] - // [1986] phi cputcxy::c#15 = cputcxy::c#8 [phi:display_chip_line::@11->cputcxy#0] -- register_copy - // [1986] phi cputcxy::y#15 = cputcxy::y#8 [phi:display_chip_line::@11->cputcxy#1] -- register_copy - // [1986] phi cputcxy::x#15 = cputcxy::x#8 [phi:display_chip_line::@11->cputcxy#2] -- register_copy + // [2644] call cputcxy + // [2043] phi from display_chip_line::@11 to cputcxy [phi:display_chip_line::@11->cputcxy] + // [2043] phi cputcxy::c#15 = cputcxy::c#8 [phi:display_chip_line::@11->cputcxy#0] -- register_copy + // [2043] phi cputcxy::y#15 = cputcxy::y#8 [phi:display_chip_line::@11->cputcxy#1] -- register_copy + // [2043] phi cputcxy::x#15 = cputcxy::x#8 [phi:display_chip_line::@11->cputcxy#2] -- register_copy jsr cputcxy // display_chip_line::@return // } - // [2588] return + // [2645] return rts // display_chip_line::@2 __b2: // cputc(VERA_CHR_SPACE) - // [2589] stackpush(char) = $20 -- _stackpushbyte_=vbuc1 + // [2646] stackpush(char) = $20 -- _stackpushbyte_=vbuc1 lda #$20 pha - // [2590] callexecute cputc -- call_vprc1 + // [2647] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // for(char i=0; idisplay_chip_line::@1] - // [2572] phi display_chip_line::i#2 = display_chip_line::i#1 [phi:display_chip_line::@2->display_chip_line::@1#0] -- register_copy + // [2629] phi from display_chip_line::@2 to display_chip_line::@1 [phi:display_chip_line::@2->display_chip_line::@1] + // [2629] phi display_chip_line::i#2 = display_chip_line::i#1 [phi:display_chip_line::@2->display_chip_line::@1#0] -- register_copy jmp __b1 - .segment Data - .label x = util_wait_key.bram - .label c = fopen.pathpos - .label y = util_wait_key.bank_get_brom1_return } -.segment Code // display_chip_end /** * @brief Print last line of a chip figure. @@ -16295,112 +17455,122 @@ display_chip_line: { * @param y Start Y * @param w Width */ -// void display_chip_end(__register(X) char x, char y, __zp($f6) char w) +// void display_chip_end(__zp($be) char x, char y, __zp($5f) char w) display_chip_end: { - .label i = $b2 - .label w = $f6 + .label i = $bf + .label x = $be + .label w = $5f // gotoxy(x, y) - // [2593] gotoxy::x#8 = display_chip_end::x#0 - // [2594] call gotoxy - // [718] phi from display_chip_end to gotoxy [phi:display_chip_end->gotoxy] - // [718] phi gotoxy::y#30 = display_print_chip::y#21 [phi:display_chip_end->gotoxy#0] -- vbuyy=vbuc1 - ldy #display_print_chip.y - // [718] phi gotoxy::x#30 = gotoxy::x#8 [phi:display_chip_end->gotoxy#1] -- register_copy + // [2650] gotoxy::x#8 = display_chip_end::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z gotoxy.x + // [2651] call gotoxy + // [763] phi from display_chip_end to gotoxy [phi:display_chip_end->gotoxy] + // [763] phi gotoxy::y#30 = display_print_chip::y#21 [phi:display_chip_end->gotoxy#0] -- vbuz1=vbuc1 + lda #display_print_chip.y + sta.z gotoxy.y + // [763] phi gotoxy::x#30 = gotoxy::x#8 [phi:display_chip_end->gotoxy#1] -- register_copy jsr gotoxy - // [2595] phi from display_chip_end to display_chip_end::@4 [phi:display_chip_end->display_chip_end::@4] + // [2652] phi from display_chip_end to display_chip_end::@4 [phi:display_chip_end->display_chip_end::@4] // display_chip_end::@4 // textcolor(GREY) - // [2596] call textcolor - // [700] phi from display_chip_end::@4 to textcolor [phi:display_chip_end::@4->textcolor] - // [700] phi textcolor::color#18 = GREY [phi:display_chip_end::@4->textcolor#0] -- vbuxx=vbuc1 - ldx #GREY + // [2653] call textcolor + // [745] phi from display_chip_end::@4 to textcolor [phi:display_chip_end::@4->textcolor] + // [745] phi textcolor::color#18 = GREY [phi:display_chip_end::@4->textcolor#0] -- vbuz1=vbuc1 + lda #GREY + sta.z textcolor.color jsr textcolor - // [2597] phi from display_chip_end::@4 to display_chip_end::@5 [phi:display_chip_end::@4->display_chip_end::@5] + // [2654] phi from display_chip_end::@4 to display_chip_end::@5 [phi:display_chip_end::@4->display_chip_end::@5] // display_chip_end::@5 // bgcolor(BLUE) - // [2598] call bgcolor - // [705] phi from display_chip_end::@5 to bgcolor [phi:display_chip_end::@5->bgcolor] - // [705] phi bgcolor::color#14 = BLUE [phi:display_chip_end::@5->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [2655] call bgcolor + // [750] phi from display_chip_end::@5 to bgcolor [phi:display_chip_end::@5->bgcolor] + // [750] phi bgcolor::color#14 = BLUE [phi:display_chip_end::@5->bgcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z bgcolor.color jsr bgcolor // display_chip_end::@6 // cputc(VERA_CHR_UR) - // [2599] stackpush(char) = $7c -- _stackpushbyte_=vbuc1 + // [2656] stackpush(char) = $7c -- _stackpushbyte_=vbuc1 lda #$7c pha - // [2600] callexecute cputc -- call_vprc1 + // [2657] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // textcolor(BLUE) - // [2602] call textcolor - // [700] phi from display_chip_end::@6 to textcolor [phi:display_chip_end::@6->textcolor] - // [700] phi textcolor::color#18 = BLUE [phi:display_chip_end::@6->textcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [2659] call textcolor + // [745] phi from display_chip_end::@6 to textcolor [phi:display_chip_end::@6->textcolor] + // [745] phi textcolor::color#18 = BLUE [phi:display_chip_end::@6->textcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z textcolor.color jsr textcolor - // [2603] phi from display_chip_end::@6 to display_chip_end::@7 [phi:display_chip_end::@6->display_chip_end::@7] + // [2660] phi from display_chip_end::@6 to display_chip_end::@7 [phi:display_chip_end::@6->display_chip_end::@7] // display_chip_end::@7 // bgcolor(BLACK) - // [2604] call bgcolor - // [705] phi from display_chip_end::@7 to bgcolor [phi:display_chip_end::@7->bgcolor] - // [705] phi bgcolor::color#14 = BLACK [phi:display_chip_end::@7->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLACK + // [2661] call bgcolor + // [750] phi from display_chip_end::@7 to bgcolor [phi:display_chip_end::@7->bgcolor] + // [750] phi bgcolor::color#14 = BLACK [phi:display_chip_end::@7->bgcolor#0] -- vbuz1=vbuc1 + lda #BLACK + sta.z bgcolor.color jsr bgcolor - // [2605] phi from display_chip_end::@7 to display_chip_end::@1 [phi:display_chip_end::@7->display_chip_end::@1] - // [2605] phi display_chip_end::i#2 = 0 [phi:display_chip_end::@7->display_chip_end::@1#0] -- vbuz1=vbuc1 + // [2662] phi from display_chip_end::@7 to display_chip_end::@1 [phi:display_chip_end::@7->display_chip_end::@1] + // [2662] phi display_chip_end::i#2 = 0 [phi:display_chip_end::@7->display_chip_end::@1#0] -- vbuz1=vbuc1 lda #0 sta.z i // display_chip_end::@1 __b1: // for(char i=0; idisplay_chip_end::@3] + // [2664] phi from display_chip_end::@1 to display_chip_end::@3 [phi:display_chip_end::@1->display_chip_end::@3] // display_chip_end::@3 // textcolor(GREY) - // [2608] call textcolor - // [700] phi from display_chip_end::@3 to textcolor [phi:display_chip_end::@3->textcolor] - // [700] phi textcolor::color#18 = GREY [phi:display_chip_end::@3->textcolor#0] -- vbuxx=vbuc1 - ldx #GREY + // [2665] call textcolor + // [745] phi from display_chip_end::@3 to textcolor [phi:display_chip_end::@3->textcolor] + // [745] phi textcolor::color#18 = GREY [phi:display_chip_end::@3->textcolor#0] -- vbuz1=vbuc1 + lda #GREY + sta.z textcolor.color jsr textcolor - // [2609] phi from display_chip_end::@3 to display_chip_end::@8 [phi:display_chip_end::@3->display_chip_end::@8] + // [2666] phi from display_chip_end::@3 to display_chip_end::@8 [phi:display_chip_end::@3->display_chip_end::@8] // display_chip_end::@8 // bgcolor(BLUE) - // [2610] call bgcolor - // [705] phi from display_chip_end::@8 to bgcolor [phi:display_chip_end::@8->bgcolor] - // [705] phi bgcolor::color#14 = BLUE [phi:display_chip_end::@8->bgcolor#0] -- vbuxx=vbuc1 - ldx #BLUE + // [2667] call bgcolor + // [750] phi from display_chip_end::@8 to bgcolor [phi:display_chip_end::@8->bgcolor] + // [750] phi bgcolor::color#14 = BLUE [phi:display_chip_end::@8->bgcolor#0] -- vbuz1=vbuc1 + lda #BLUE + sta.z bgcolor.color jsr bgcolor // display_chip_end::@9 // cputc(VERA_CHR_UL) - // [2611] stackpush(char) = $7e -- _stackpushbyte_=vbuc1 + // [2668] stackpush(char) = $7e -- _stackpushbyte_=vbuc1 lda #$7e pha - // [2612] callexecute cputc -- call_vprc1 + // [2669] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // display_chip_end::@return // } - // [2614] return + // [2671] return rts // display_chip_end::@2 __b2: // cputc(VERA_CHR_HL) - // [2615] stackpush(char) = $62 -- _stackpushbyte_=vbuc1 + // [2672] stackpush(char) = $62 -- _stackpushbyte_=vbuc1 lda #$62 pha - // [2616] callexecute cputc -- call_vprc1 + // [2673] callexecute cputc -- call_vprc1 jsr cputc // sideeffect stackpullpadding(1) -- _stackpullpadding_1 pla // for(char i=0; idisplay_chip_end::@1] - // [2605] phi display_chip_end::i#2 = display_chip_end::i#1 [phi:display_chip_end::@2->display_chip_end::@1#0] -- register_copy + // [2662] phi from display_chip_end::@2 to display_chip_end::@1 [phi:display_chip_end::@2->display_chip_end::@1] + // [2662] phi display_chip_end::i#2 = display_chip_end::i#1 [phi:display_chip_end::@2->display_chip_end::@1#0] -- register_copy jmp __b1 } // utoa_append @@ -16412,20 +17582,22 @@ display_chip_end: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// __zp($29) unsigned int utoa_append(__zp($40) char *buffer, __zp($29) unsigned int value, __zp($36) unsigned int sub) +// __zp($2d) unsigned int utoa_append(__zp($76) char *buffer, __zp($2d) unsigned int value, __zp($44) unsigned int sub) utoa_append: { - .label buffer = $40 - .label value = $29 - .label sub = $36 - .label return = $29 - // [2620] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1] - // [2620] phi utoa_append::digit#2 = 0 [phi:utoa_append->utoa_append::@1#0] -- vbuxx=vbuc1 - ldx #0 - // [2620] phi utoa_append::value#2 = utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy + .label buffer = $76 + .label value = $2d + .label sub = $44 + .label return = $2d + .label digit = $36 + // [2677] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1] + // [2677] phi utoa_append::digit#2 = 0 [phi:utoa_append->utoa_append::@1#0] -- vbuz1=vbuc1 + lda #0 + sta.z digit + // [2677] phi utoa_append::value#2 = utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy // utoa_append::@1 __b1: // while (value >= sub) - // [2621] if(utoa_append::value#2>=utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 + // [2678] if(utoa_append::value#2>=utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 lda.z sub+1 cmp.z value+1 bne !+ @@ -16436,21 +17608,22 @@ utoa_append: { bcc __b2 // utoa_append::@3 // *buffer = DIGITS[digit] - // [2622] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuxx - lda DIGITS,x + // [2679] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + ldy.z digit + lda DIGITS,y ldy #0 sta (buffer),y // utoa_append::@return // } - // [2623] return + // [2680] return rts // utoa_append::@2 __b2: // digit++; - // [2624] utoa_append::digit#1 = ++ utoa_append::digit#2 -- vbuxx=_inc_vbuxx - inx + // [2681] utoa_append::digit#1 = ++ utoa_append::digit#2 -- vbuz1=_inc_vbuz1 + inc.z digit // value -= sub - // [2625] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 + // [2682] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 lda.z value sec sbc.z sub @@ -16458,9 +17631,9 @@ utoa_append: { lda.z value+1 sbc.z sub+1 sta.z value+1 - // [2620] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1] - // [2620] phi utoa_append::digit#2 = utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy - // [2620] phi utoa_append::value#2 = utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy + // [2677] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1] + // [2677] phi utoa_append::digit#2 = utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy + // [2677] phi utoa_append::value#2 = utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy jmp __b1 } // rom_write_byte @@ -16473,42 +17646,51 @@ utoa_append: { * @param address The 22 bit ROM address. * @param value The byte value to be written. */ -// void rom_write_byte(__zp($45) unsigned long address, __register(Y) char value) +// void rom_write_byte(__zp($57) unsigned long address, __zp($5c) char value) rom_write_byte: { - .label rom_bank1_rom_write_byte__2 = $3e - .label rom_ptr1_rom_write_byte__0 = $3c - .label rom_ptr1_rom_write_byte__2 = $3c - .label rom_bank1_bank_unshifted = $3e - .label rom_ptr1_return = $3c - .label address = $45 + .label rom_bank1_rom_write_byte__0 = $5b + .label rom_bank1_rom_write_byte__1 = $54 + .label rom_bank1_rom_write_byte__2 = $4f + .label rom_ptr1_rom_write_byte__0 = $4d + .label rom_ptr1_rom_write_byte__2 = $4d + .label rom_bank1_bank_unshifted = $4f + .label rom_bank1_return = $5f + .label rom_ptr1_return = $4d + .label address = $57 + .label value = $5c // rom_write_byte::rom_bank1 // BYTE2(address) - // [2627] rom_write_byte::rom_bank1_$0 = byte2 rom_write_byte::address#4 -- vbuaa=_byte2_vduz1 + // [2684] rom_write_byte::rom_bank1_$0 = byte2 rom_write_byte::address#4 -- vbuz1=_byte2_vduz2 lda.z address+2 + sta.z rom_bank1_rom_write_byte__0 // BYTE1(address) - // [2628] rom_write_byte::rom_bank1_$1 = byte1 rom_write_byte::address#4 -- vbuxx=_byte1_vduz1 - ldx.z address+1 + // [2685] rom_write_byte::rom_bank1_$1 = byte1 rom_write_byte::address#4 -- vbuz1=_byte1_vduz2 + lda.z address+1 + sta.z rom_bank1_rom_write_byte__1 // MAKEWORD(BYTE2(address),BYTE1(address)) - // [2629] rom_write_byte::rom_bank1_$2 = rom_write_byte::rom_bank1_$0 w= rom_write_byte::rom_bank1_$1 -- vwuz1=vbuaa_word_vbuxx + // [2686] rom_write_byte::rom_bank1_$2 = rom_write_byte::rom_bank1_$0 w= rom_write_byte::rom_bank1_$1 -- vwuz1=vbuz2_word_vbuz3 + lda.z rom_bank1_rom_write_byte__0 sta.z rom_bank1_rom_write_byte__2+1 - stx.z rom_bank1_rom_write_byte__2 + lda.z rom_bank1_rom_write_byte__1 + sta.z rom_bank1_rom_write_byte__2 // unsigned int bank_unshifted = MAKEWORD(BYTE2(address),BYTE1(address)) << 2 - // [2630] rom_write_byte::rom_bank1_bank_unshifted#0 = rom_write_byte::rom_bank1_$2 << 2 -- vwuz1=vwuz1_rol_2 + // [2687] rom_write_byte::rom_bank1_bank_unshifted#0 = rom_write_byte::rom_bank1_$2 << 2 -- vwuz1=vwuz1_rol_2 asl.z rom_bank1_bank_unshifted rol.z rom_bank1_bank_unshifted+1 asl.z rom_bank1_bank_unshifted rol.z rom_bank1_bank_unshifted+1 // unsigned char bank = BYTE1(bank_unshifted) - // [2631] rom_write_byte::rom_bank1_return#0 = byte1 rom_write_byte::rom_bank1_bank_unshifted#0 -- vbuxx=_byte1_vwuz1 - ldx.z rom_bank1_bank_unshifted+1 + // [2688] rom_write_byte::rom_bank1_return#0 = byte1 rom_write_byte::rom_bank1_bank_unshifted#0 -- vbuz1=_byte1_vwuz2 + lda.z rom_bank1_bank_unshifted+1 + sta.z rom_bank1_return // rom_write_byte::rom_ptr1 // (unsigned int)(address) & ROM_PTR_MASK - // [2632] rom_write_byte::rom_ptr1_$2 = (unsigned int)rom_write_byte::address#4 -- vwuz1=_word_vduz2 + // [2689] rom_write_byte::rom_ptr1_$2 = (unsigned int)rom_write_byte::address#4 -- vwuz1=_word_vduz2 lda.z address sta.z rom_ptr1_rom_write_byte__2 lda.z address+1 sta.z rom_ptr1_rom_write_byte__2+1 - // [2633] rom_write_byte::rom_ptr1_$0 = rom_write_byte::rom_ptr1_$2 & $3fff -- vwuz1=vwuz1_band_vwuc1 + // [2690] rom_write_byte::rom_ptr1_$0 = rom_write_byte::rom_ptr1_$2 & $3fff -- vwuz1=vwuz1_band_vwuc1 lda.z rom_ptr1_rom_write_byte__0 and #<$3fff sta.z rom_ptr1_rom_write_byte__0 @@ -16516,7 +17698,7 @@ rom_write_byte: { and #>$3fff sta.z rom_ptr1_rom_write_byte__0+1 // ((unsigned int)(address) & ROM_PTR_MASK) + ROM_BASE - // [2634] rom_write_byte::rom_ptr1_return#0 = rom_write_byte::rom_ptr1_$0 + $c000 -- vwuz1=vwuz1_plus_vwuc1 + // [2691] rom_write_byte::rom_ptr1_return#0 = rom_write_byte::rom_ptr1_$0 + $c000 -- vwuz1=vwuz1_plus_vwuc1 lda.z rom_ptr1_return clc adc #<$c000 @@ -16526,17 +17708,18 @@ rom_write_byte: { sta.z rom_ptr1_return+1 // rom_write_byte::bank_set_brom1 // BROM = bank - // [2635] BROM = rom_write_byte::rom_bank1_return#0 -- vbuz1=vbuxx - stx.z BROM + // [2692] BROM = rom_write_byte::rom_bank1_return#0 -- vbuz1=vbuz2 + lda.z rom_bank1_return + sta.z BROM // rom_write_byte::@1 // *ptr_rom = value - // [2636] *((char *)rom_write_byte::rom_ptr1_return#0) = rom_write_byte::value#10 -- _deref_pbuz1=vbuyy - tya + // [2693] *((char *)rom_write_byte::rom_ptr1_return#0) = rom_write_byte::value#10 -- _deref_pbuz1=vbuz2 + lda.z value ldy #0 sta (rom_ptr1_return),y // rom_write_byte::@return // } - // [2637] return + // [2694] return rts } // cbm_k_setlfs @@ -16557,7 +17740,7 @@ cbm_k_setlfs: { jsr CBM_SETLFS // cbm_k_setlfs::@return // } - // [2639] return + // [2696] return rts .segment Data channel: .byte 0 @@ -16575,55 +17758,62 @@ cbm_k_setlfs: { * @param stream FILE* stream. * @return int Contains a non-zero value if there is an error. */ -// __mem() int ferror(__zp($36) struct $2 *stream) +// __mem() int ferror(__zp($5d) struct $2 *stream) ferror: { - .label cbm_k_setnam1_ferror__0 = $43 - .label cbm_k_readst1_status = $d7 - .label cbm_k_chrin2_ch = $d8 - .label stream = $36 - .label ch = $cc - .label errno_len = $d9 - .label errno_parsed = $d4 + .label ferror__6 = $38 + .label ferror__15 = $6d + .label cbm_k_setnam1_ferror__0 = $55 + .label cbm_k_readst1_status = $fa + .label cbm_k_chrin2_ch = $fb + .label stream = $5d + .label sp = $2c + .label cbm_k_chrin1_return = $6d + .label ch = $6d + .label cbm_k_readst1_return = $38 + .label st = $38 + .label errno_len = $e4 + .label cbm_k_chrin2_return = $6d + .label errno_parsed = $f7 // unsigned char sp = (unsigned char)stream - // [2640] ferror::sp#0 = (char)ferror::stream#0 -- vbum1=_byte_pssz2 + // [2697] ferror::sp#0 = (char)ferror::stream#0 -- vbuz1=_byte_pssz2 lda.z stream - sta sp + sta.z sp // cbm_k_setlfs(15, 8, 15) - // [2641] cbm_k_setlfs::channel = $f -- vbum1=vbuc1 + // [2698] cbm_k_setlfs::channel = $f -- vbum1=vbuc1 lda #$f sta cbm_k_setlfs.channel - // [2642] cbm_k_setlfs::device = 8 -- vbum1=vbuc1 + // [2699] cbm_k_setlfs::device = 8 -- vbum1=vbuc1 lda #8 sta cbm_k_setlfs.device - // [2643] cbm_k_setlfs::command = $f -- vbum1=vbuc1 + // [2700] cbm_k_setlfs::command = $f -- vbum1=vbuc1 lda #$f sta cbm_k_setlfs.command - // [2644] call cbm_k_setlfs + // [2701] call cbm_k_setlfs jsr cbm_k_setlfs // ferror::@11 // cbm_k_setnam("") - // [2645] ferror::cbm_k_setnam1_filename = info_text4 -- pbum1=pbuc1 + // [2702] ferror::cbm_k_setnam1_filename = info_text4 -- pbum1=pbuc1 lda #info_text4 sta cbm_k_setnam1_filename+1 // ferror::cbm_k_setnam1 // strlen(filename) - // [2646] strlen::str#5 = ferror::cbm_k_setnam1_filename -- pbuz1=pbum2 + // [2703] strlen::str#5 = ferror::cbm_k_setnam1_filename -- pbuz1=pbum2 lda cbm_k_setnam1_filename sta.z strlen.str lda cbm_k_setnam1_filename+1 sta.z strlen.str+1 - // [2647] call strlen - // [2323] phi from ferror::cbm_k_setnam1 to strlen [phi:ferror::cbm_k_setnam1->strlen] - // [2323] phi strlen::str#8 = strlen::str#5 [phi:ferror::cbm_k_setnam1->strlen#0] -- register_copy + // [2704] call strlen + // [2380] phi from ferror::cbm_k_setnam1 to strlen [phi:ferror::cbm_k_setnam1->strlen] + // [2380] phi strlen::str#8 = strlen::str#5 [phi:ferror::cbm_k_setnam1->strlen#0] -- register_copy jsr strlen // strlen(filename) - // [2648] strlen::return#12 = strlen::len#2 + // [2705] strlen::return#12 = strlen::len#2 // ferror::@12 - // [2649] ferror::cbm_k_setnam1_$0 = strlen::return#12 + // [2706] ferror::cbm_k_setnam1_$0 = strlen::return#12 // char filename_len = (char)strlen(filename) - // [2650] ferror::cbm_k_setnam1_filename_len = (char)ferror::cbm_k_setnam1_$0 -- vbum1=_byte_vwuz2 + // [2707] ferror::cbm_k_setnam1_filename_len = (char)ferror::cbm_k_setnam1_$0 -- vbum1=_byte_vwuz2 lda.z cbm_k_setnam1_ferror__0 sta cbm_k_setnam1_filename_len // asm @@ -16636,12 +17826,12 @@ ferror: { jsr CBM_OPEN // ferror::@6 // cbm_k_chkin(15) - // [2653] ferror::cbm_k_chkin1_channel = $f -- vbum1=vbuc1 + // [2710] ferror::cbm_k_chkin1_channel = $f -- vbum1=vbuc1 lda #$f sta cbm_k_chkin1_channel // ferror::cbm_k_chkin1 // char status - // [2654] ferror::cbm_k_chkin1_status = 0 -- vbum1=vbuc1 + // [2711] ferror::cbm_k_chkin1_status = 0 -- vbum1=vbuc1 lda #0 sta cbm_k_chkin1_status // asm @@ -16651,7 +17841,7 @@ ferror: { sta cbm_k_chkin1_status // ferror::cbm_k_chrin1 // char ch - // [2656] ferror::cbm_k_chrin1_ch = 0 -- vbum1=vbuc1 + // [2713] ferror::cbm_k_chrin1_ch = 0 -- vbum1=vbuc1 lda #0 sta cbm_k_chrin1_ch // asm @@ -16659,26 +17849,26 @@ ferror: { jsr CBM_CHRIN sta cbm_k_chrin1_ch // return ch; - // [2658] ferror::cbm_k_chrin1_return#0 = ferror::cbm_k_chrin1_ch -- vbuaa=vbum1 + // [2715] ferror::cbm_k_chrin1_return#0 = ferror::cbm_k_chrin1_ch -- vbuz1=vbum2 + sta.z cbm_k_chrin1_return // ferror::cbm_k_chrin1_@return // } - // [2659] ferror::cbm_k_chrin1_return#1 = ferror::cbm_k_chrin1_return#0 + // [2716] ferror::cbm_k_chrin1_return#1 = ferror::cbm_k_chrin1_return#0 // ferror::@7 // char ch = cbm_k_chrin() - // [2660] ferror::ch#0 = ferror::cbm_k_chrin1_return#1 -- vbuz1=vbuaa - sta.z ch - // [2661] phi from ferror::@7 to ferror::cbm_k_readst1 [phi:ferror::@7->ferror::cbm_k_readst1] - // [2661] phi __errno#18 = __errno#333 [phi:ferror::@7->ferror::cbm_k_readst1#0] -- register_copy - // [2661] phi ferror::errno_len#10 = 0 [phi:ferror::@7->ferror::cbm_k_readst1#1] -- vbuz1=vbuc1 + // [2717] ferror::ch#0 = ferror::cbm_k_chrin1_return#1 + // [2718] phi from ferror::@7 to ferror::cbm_k_readst1 [phi:ferror::@7->ferror::cbm_k_readst1] + // [2718] phi __errno#18 = __errno#318 [phi:ferror::@7->ferror::cbm_k_readst1#0] -- register_copy + // [2718] phi ferror::errno_len#10 = 0 [phi:ferror::@7->ferror::cbm_k_readst1#1] -- vbuz1=vbuc1 lda #0 sta.z errno_len - // [2661] phi ferror::ch#10 = ferror::ch#0 [phi:ferror::@7->ferror::cbm_k_readst1#2] -- register_copy - // [2661] phi ferror::errno_parsed#2 = 0 [phi:ferror::@7->ferror::cbm_k_readst1#3] -- vbuz1=vbuc1 + // [2718] phi ferror::ch#10 = ferror::ch#0 [phi:ferror::@7->ferror::cbm_k_readst1#2] -- register_copy + // [2718] phi ferror::errno_parsed#2 = 0 [phi:ferror::@7->ferror::cbm_k_readst1#3] -- vbuz1=vbuc1 sta.z errno_parsed // ferror::cbm_k_readst1 cbm_k_readst1: // char status - // [2662] ferror::cbm_k_readst1_status = 0 -- vbuz1=vbuc1 + // [2719] ferror::cbm_k_readst1_status = 0 -- vbuz1=vbuc1 lda #0 sta.z cbm_k_readst1_status // asm @@ -16686,26 +17876,27 @@ ferror: { jsr CBM_READST sta cbm_k_readst1_status // return status; - // [2664] ferror::cbm_k_readst1_return#0 = ferror::cbm_k_readst1_status -- vbuaa=vbuz1 + // [2721] ferror::cbm_k_readst1_return#0 = ferror::cbm_k_readst1_status -- vbuz1=vbuz2 + sta.z cbm_k_readst1_return // ferror::cbm_k_readst1_@return // } - // [2665] ferror::cbm_k_readst1_return#1 = ferror::cbm_k_readst1_return#0 + // [2722] ferror::cbm_k_readst1_return#1 = ferror::cbm_k_readst1_return#0 // ferror::@8 // cbm_k_readst() - // [2666] ferror::$6 = ferror::cbm_k_readst1_return#1 + // [2723] ferror::$6 = ferror::cbm_k_readst1_return#1 // st = cbm_k_readst() - // [2667] ferror::st#1 = ferror::$6 + // [2724] ferror::st#1 = ferror::$6 // while (!(st = cbm_k_readst())) - // [2668] if(0==ferror::st#1) goto ferror::@1 -- 0_eq_vbuaa_then_la1 - cmp #0 + // [2725] if(0==ferror::st#1) goto ferror::@1 -- 0_eq_vbuz1_then_la1 + lda.z st beq __b1 // ferror::@2 // __status = st - // [2669] ((char *)&__stdio_file+$46)[ferror::sp#0] = ferror::st#1 -- pbuc1_derefidx_vbum1=vbuaa - ldy sp + // [2726] ((char *)&__stdio_file+$46)[ferror::sp#0] = ferror::st#1 -- pbuc1_derefidx_vbuz1=vbuz2 + ldy.z sp sta __stdio_file+$46,y // cbm_k_close(15) - // [2670] ferror::cbm_k_close1_channel = $f -- vbum1=vbuc1 + // [2727] ferror::cbm_k_close1_channel = $f -- vbum1=vbuc1 lda #$f sta cbm_k_close1_channel // ferror::cbm_k_close1 @@ -16714,33 +17905,33 @@ ferror: { jsr CBM_CLOSE // ferror::@9 // return __errno; - // [2672] ferror::return#1 = __errno#18 -- vwsm1=vwsz2 + // [2729] ferror::return#1 = __errno#18 -- vwsm1=vwsz2 lda.z __errno sta return lda.z __errno+1 sta return+1 // ferror::@return // } - // [2673] return + // [2730] return rts // ferror::@1 __b1: // if (!errno_parsed) - // [2674] if(0!=ferror::errno_parsed#2) goto ferror::@3 -- 0_neq_vbuz1_then_la1 + // [2731] if(0!=ferror::errno_parsed#2) goto ferror::@3 -- 0_neq_vbuz1_then_la1 lda.z errno_parsed bne __b3 // ferror::@4 // if (ch == ',') - // [2675] if(ferror::ch#10!=',') goto ferror::@3 -- vbuz1_neq_vbuc1_then_la1 + // [2732] if(ferror::ch#10!=',') goto ferror::@3 -- vbuz1_neq_vbuc1_then_la1 lda #',' cmp.z ch bne __b3 // ferror::@5 // errno_parsed++; - // [2676] ferror::errno_parsed#1 = ++ ferror::errno_parsed#2 -- vbuz1=_inc_vbuz1 + // [2733] ferror::errno_parsed#1 = ++ ferror::errno_parsed#2 -- vbuz1=_inc_vbuz1 inc.z errno_parsed // strncpy(temp, __errno_error, errno_len+1) - // [2677] strncpy::n#0 = ferror::errno_len#10 + 1 -- vwuz1=vbuz2_plus_1 + // [2734] strncpy::n#0 = ferror::errno_len#10 + 1 -- vwuz1=vbuz2_plus_1 lda.z errno_len clc adc #1 @@ -16748,56 +17939,56 @@ ferror: { lda #0 adc #0 sta.z strncpy.n+1 - // [2678] call strncpy - // [2455] phi from ferror::@5 to strncpy [phi:ferror::@5->strncpy] - // [2455] phi strncpy::dst#8 = ferror::temp [phi:ferror::@5->strncpy#0] -- pbuz1=pbuc1 + // [2735] call strncpy + // [2512] phi from ferror::@5 to strncpy [phi:ferror::@5->strncpy] + // [2512] phi strncpy::dst#8 = ferror::temp [phi:ferror::@5->strncpy#0] -- pbuz1=pbuc1 lda #temp sta.z strncpy.dst+1 - // [2455] phi strncpy::src#6 = __errno_error [phi:ferror::@5->strncpy#1] -- pbuz1=pbuc1 + // [2512] phi strncpy::src#6 = __errno_error [phi:ferror::@5->strncpy#1] -- pbuz1=pbuc1 lda #<__errno_error sta.z strncpy.src lda #>__errno_error sta.z strncpy.src+1 - // [2455] phi strncpy::n#3 = strncpy::n#0 [phi:ferror::@5->strncpy#2] -- register_copy + // [2512] phi strncpy::n#3 = strncpy::n#0 [phi:ferror::@5->strncpy#2] -- register_copy jsr strncpy - // [2679] phi from ferror::@5 to ferror::@13 [phi:ferror::@5->ferror::@13] + // [2736] phi from ferror::@5 to ferror::@13 [phi:ferror::@5->ferror::@13] // ferror::@13 // atoi(temp) - // [2680] call atoi - // [2692] phi from ferror::@13 to atoi [phi:ferror::@13->atoi] - // [2692] phi atoi::str#2 = ferror::temp [phi:ferror::@13->atoi#0] -- pbuz1=pbuc1 + // [2737] call atoi + // [2749] phi from ferror::@13 to atoi [phi:ferror::@13->atoi] + // [2749] phi atoi::str#2 = ferror::temp [phi:ferror::@13->atoi#0] -- pbuz1=pbuc1 lda #temp sta.z atoi.str+1 jsr atoi // atoi(temp) - // [2681] atoi::return#4 = atoi::return#2 + // [2738] atoi::return#4 = atoi::return#2 // ferror::@14 // __errno = atoi(temp) - // [2682] __errno#2 = atoi::return#4 -- vwsz1=vwsz2 + // [2739] __errno#2 = atoi::return#4 -- vwsz1=vwsz2 lda.z atoi.return sta.z __errno lda.z atoi.return+1 sta.z __errno+1 - // [2683] phi from ferror::@1 ferror::@14 ferror::@4 to ferror::@3 [phi:ferror::@1/ferror::@14/ferror::@4->ferror::@3] - // [2683] phi __errno#103 = __errno#18 [phi:ferror::@1/ferror::@14/ferror::@4->ferror::@3#0] -- register_copy - // [2683] phi ferror::errno_parsed#11 = ferror::errno_parsed#2 [phi:ferror::@1/ferror::@14/ferror::@4->ferror::@3#1] -- register_copy + // [2740] phi from ferror::@1 ferror::@14 ferror::@4 to ferror::@3 [phi:ferror::@1/ferror::@14/ferror::@4->ferror::@3] + // [2740] phi __errno#105 = __errno#18 [phi:ferror::@1/ferror::@14/ferror::@4->ferror::@3#0] -- register_copy + // [2740] phi ferror::errno_parsed#11 = ferror::errno_parsed#2 [phi:ferror::@1/ferror::@14/ferror::@4->ferror::@3#1] -- register_copy // ferror::@3 __b3: // __errno_error[errno_len] = ch - // [2684] __errno_error[ferror::errno_len#10] = ferror::ch#10 -- pbuc1_derefidx_vbuz1=vbuz2 + // [2741] __errno_error[ferror::errno_len#10] = ferror::ch#10 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z ch ldy.z errno_len sta __errno_error,y // errno_len++; - // [2685] ferror::errno_len#1 = ++ ferror::errno_len#10 -- vbuz1=_inc_vbuz1 + // [2742] ferror::errno_len#1 = ++ ferror::errno_len#10 -- vbuz1=_inc_vbuz1 inc.z errno_len // ferror::cbm_k_chrin2 // char ch - // [2686] ferror::cbm_k_chrin2_ch = 0 -- vbuz1=vbuc1 + // [2743] ferror::cbm_k_chrin2_ch = 0 -- vbuz1=vbuc1 lda #0 sta.z cbm_k_chrin2_ch // asm @@ -16805,21 +17996,21 @@ ferror: { jsr CBM_CHRIN sta cbm_k_chrin2_ch // return ch; - // [2688] ferror::cbm_k_chrin2_return#0 = ferror::cbm_k_chrin2_ch -- vbuaa=vbuz1 + // [2745] ferror::cbm_k_chrin2_return#0 = ferror::cbm_k_chrin2_ch -- vbuz1=vbuz2 + sta.z cbm_k_chrin2_return // ferror::cbm_k_chrin2_@return // } - // [2689] ferror::cbm_k_chrin2_return#1 = ferror::cbm_k_chrin2_return#0 + // [2746] ferror::cbm_k_chrin2_return#1 = ferror::cbm_k_chrin2_return#0 // ferror::@10 // cbm_k_chrin() - // [2690] ferror::$15 = ferror::cbm_k_chrin2_return#1 + // [2747] ferror::$15 = ferror::cbm_k_chrin2_return#1 // ch = cbm_k_chrin() - // [2691] ferror::ch#1 = ferror::$15 -- vbuz1=vbuaa - sta.z ch - // [2661] phi from ferror::@10 to ferror::cbm_k_readst1 [phi:ferror::@10->ferror::cbm_k_readst1] - // [2661] phi __errno#18 = __errno#103 [phi:ferror::@10->ferror::cbm_k_readst1#0] -- register_copy - // [2661] phi ferror::errno_len#10 = ferror::errno_len#1 [phi:ferror::@10->ferror::cbm_k_readst1#1] -- register_copy - // [2661] phi ferror::ch#10 = ferror::ch#1 [phi:ferror::@10->ferror::cbm_k_readst1#2] -- register_copy - // [2661] phi ferror::errno_parsed#2 = ferror::errno_parsed#11 [phi:ferror::@10->ferror::cbm_k_readst1#3] -- register_copy + // [2748] ferror::ch#1 = ferror::$15 + // [2718] phi from ferror::@10 to ferror::cbm_k_readst1 [phi:ferror::@10->ferror::cbm_k_readst1] + // [2718] phi __errno#18 = __errno#105 [phi:ferror::@10->ferror::cbm_k_readst1#0] -- register_copy + // [2718] phi ferror::errno_len#10 = ferror::errno_len#1 [phi:ferror::@10->ferror::cbm_k_readst1#1] -- register_copy + // [2718] phi ferror::ch#10 = ferror::ch#1 [phi:ferror::@10->ferror::cbm_k_readst1#2] -- register_copy + // [2718] phi ferror::errno_parsed#2 = ferror::errno_parsed#11 [phi:ferror::@10->ferror::cbm_k_readst1#3] -- register_copy jmp cbm_k_readst1 .segment Data temp: .fill 4, 0 @@ -16830,58 +18021,64 @@ ferror: { cbm_k_chrin1_ch: .byte 0 cbm_k_close1_channel: .byte 0 return: .word 0 - sp: .byte 0 } .segment Code // atoi // Converts the string argument str to an integer. -// __zp($30) int atoi(__zp($b5) const char *str) +// __zp($3d) int atoi(__zp($d9) const char *str) atoi: { - .label atoi__6 = $30 - .label atoi__7 = $30 - .label res = $30 - .label return = $30 - .label str = $b5 - .label atoi__10 = $3e - .label atoi__11 = $30 + .label atoi__6 = $3d + .label atoi__7 = $3d + .label res = $3d + // Initialize sign as positive + .label i = $69 + .label return = $3d + .label str = $d9 + // Initialize result + .label negative = $bf + .label atoi__10 = $4f + .label atoi__11 = $3d // if (str[i] == '-') - // [2693] if(*atoi::str#2!='-') goto atoi::@3 -- _deref_pbuz1_neq_vbuc1_then_la1 + // [2750] if(*atoi::str#2!='-') goto atoi::@3 -- _deref_pbuz1_neq_vbuc1_then_la1 ldy #0 lda (str),y cmp #'-' bne __b2 - // [2694] phi from atoi to atoi::@2 [phi:atoi->atoi::@2] + // [2751] phi from atoi to atoi::@2 [phi:atoi->atoi::@2] // atoi::@2 - // [2695] phi from atoi::@2 to atoi::@3 [phi:atoi::@2->atoi::@3] - // [2695] phi atoi::negative#2 = 1 [phi:atoi::@2->atoi::@3#0] -- vbuxx=vbuc1 - ldx #1 - // [2695] phi atoi::res#2 = 0 [phi:atoi::@2->atoi::@3#1] -- vwsz1=vwsc1 + // [2752] phi from atoi::@2 to atoi::@3 [phi:atoi::@2->atoi::@3] + // [2752] phi atoi::negative#2 = 1 [phi:atoi::@2->atoi::@3#0] -- vbuz1=vbuc1 + lda #1 + sta.z negative + // [2752] phi atoi::res#2 = 0 [phi:atoi::@2->atoi::@3#1] -- vwsz1=vwsc1 tya sta.z res sta.z res+1 - // [2695] phi atoi::i#4 = 1 [phi:atoi::@2->atoi::@3#2] -- vbuyy=vbuc1 - ldy #1 + // [2752] phi atoi::i#4 = 1 [phi:atoi::@2->atoi::@3#2] -- vbuz1=vbuc1 + lda #1 + sta.z i jmp __b3 // Iterate through all digits and update the result - // [2695] phi from atoi to atoi::@3 [phi:atoi->atoi::@3] + // [2752] phi from atoi to atoi::@3 [phi:atoi->atoi::@3] __b2: - // [2695] phi atoi::negative#2 = 0 [phi:atoi->atoi::@3#0] -- vbuxx=vbuc1 - ldx #0 - // [2695] phi atoi::res#2 = 0 [phi:atoi->atoi::@3#1] -- vwsz1=vwsc1 - txa + // [2752] phi atoi::negative#2 = 0 [phi:atoi->atoi::@3#0] -- vbuz1=vbuc1 + lda #0 + sta.z negative + // [2752] phi atoi::res#2 = 0 [phi:atoi->atoi::@3#1] -- vwsz1=vwsc1 sta.z res sta.z res+1 - // [2695] phi atoi::i#4 = 0 [phi:atoi->atoi::@3#2] -- vbuyy=vbuc1 - tay + // [2752] phi atoi::i#4 = 0 [phi:atoi->atoi::@3#2] -- vbuz1=vbuc1 + sta.z i // atoi::@3 __b3: // for (; str[i]>='0' && str[i]<='9'; ++i) - // [2696] if(atoi::str#2[atoi::i#4]<'0') goto atoi::@5 -- pbuz1_derefidx_vbuyy_lt_vbuc1_then_la1 + // [2753] if(atoi::str#2[atoi::i#4]<'0') goto atoi::@5 -- pbuz1_derefidx_vbuz2_lt_vbuc1_then_la1 + ldy.z i lda (str),y cmp #'0' bcc __b5 // atoi::@6 - // [2697] if(atoi::str#2[atoi::i#4]<='9') goto atoi::@4 -- pbuz1_derefidx_vbuyy_le_vbuc1_then_la1 + // [2754] if(atoi::str#2[atoi::i#4]<='9') goto atoi::@4 -- pbuz1_derefidx_vbuz2_le_vbuc1_then_la1 lda (str),y cmp #'9' bcc __b4 @@ -16889,17 +18086,17 @@ atoi: { // atoi::@5 __b5: // if(negative) - // [2698] if(0!=atoi::negative#2) goto atoi::@1 -- 0_neq_vbuxx_then_la1 + // [2755] if(0!=atoi::negative#2) goto atoi::@1 -- 0_neq_vbuz1_then_la1 // Return result with sign - cpx #0 + lda.z negative bne __b1 - // [2700] phi from atoi::@1 atoi::@5 to atoi::@return [phi:atoi::@1/atoi::@5->atoi::@return] - // [2700] phi atoi::return#2 = atoi::return#0 [phi:atoi::@1/atoi::@5->atoi::@return#0] -- register_copy + // [2757] phi from atoi::@1 atoi::@5 to atoi::@return [phi:atoi::@1/atoi::@5->atoi::@return] + // [2757] phi atoi::return#2 = atoi::return#0 [phi:atoi::@1/atoi::@5->atoi::@return#0] -- register_copy rts // atoi::@1 __b1: // return -res; - // [2699] atoi::return#0 = - atoi::res#2 -- vwsz1=_neg_vwsz1 + // [2756] atoi::return#0 = - atoi::res#2 -- vwsz1=_neg_vwsz1 lda #0 sec sbc.z return @@ -16909,12 +18106,12 @@ atoi: { sta.z return+1 // atoi::@return // } - // [2701] return + // [2758] return rts // atoi::@4 __b4: // res * 10 - // [2702] atoi::$10 = atoi::res#2 << 2 -- vwsz1=vwsz2_rol_2 + // [2759] atoi::$10 = atoi::res#2 << 2 -- vwsz1=vwsz2_rol_2 lda.z res asl sta.z atoi__10 @@ -16923,7 +18120,7 @@ atoi: { sta.z atoi__10+1 asl.z atoi__10 rol.z atoi__10+1 - // [2703] atoi::$11 = atoi::$10 + atoi::res#2 -- vwsz1=vwsz2_plus_vwsz1 + // [2760] atoi::$11 = atoi::$10 + atoi::res#2 -- vwsz1=vwsz2_plus_vwsz1 clc lda.z atoi__11 adc.z atoi__10 @@ -16931,11 +18128,12 @@ atoi: { lda.z atoi__11+1 adc.z atoi__10+1 sta.z atoi__11+1 - // [2704] atoi::$6 = atoi::$11 << 1 -- vwsz1=vwsz1_rol_1 + // [2761] atoi::$6 = atoi::$11 << 1 -- vwsz1=vwsz1_rol_1 asl.z atoi__6 rol.z atoi__6+1 // res * 10 + str[i] - // [2705] atoi::$7 = atoi::$6 + atoi::str#2[atoi::i#4] -- vwsz1=vwsz1_plus_pbuz2_derefidx_vbuyy + // [2762] atoi::$7 = atoi::$6 + atoi::str#2[atoi::i#4] -- vwsz1=vwsz1_plus_pbuz2_derefidx_vbuz3 + ldy.z i lda.z atoi__7 clc adc (str),y @@ -16944,7 +18142,7 @@ atoi: { inc.z atoi__7+1 !: // res = res * 10 + str[i] - '0' - // [2706] atoi::res#1 = atoi::$7 - '0' -- vwsz1=vwsz1_minus_vbuc1 + // [2763] atoi::res#1 = atoi::$7 - '0' -- vwsz1=vwsz1_minus_vbuc1 lda.z res sec sbc #'0' @@ -16953,12 +18151,12 @@ atoi: { dec.z res+1 !: // for (; str[i]>='0' && str[i]<='9'; ++i) - // [2707] atoi::i#2 = ++ atoi::i#4 -- vbuyy=_inc_vbuyy - iny - // [2695] phi from atoi::@4 to atoi::@3 [phi:atoi::@4->atoi::@3] - // [2695] phi atoi::negative#2 = atoi::negative#2 [phi:atoi::@4->atoi::@3#0] -- register_copy - // [2695] phi atoi::res#2 = atoi::res#1 [phi:atoi::@4->atoi::@3#1] -- register_copy - // [2695] phi atoi::i#4 = atoi::i#2 [phi:atoi::@4->atoi::@3#2] -- register_copy + // [2764] atoi::i#2 = ++ atoi::i#4 -- vbuz1=_inc_vbuz1 + inc.z i + // [2752] phi from atoi::@4 to atoi::@3 [phi:atoi::@4->atoi::@3] + // [2752] phi atoi::negative#2 = atoi::negative#2 [phi:atoi::@4->atoi::@3#0] -- register_copy + // [2752] phi atoi::res#2 = atoi::res#1 [phi:atoi::@4->atoi::@3#1] -- register_copy + // [2752] phi atoi::i#4 = atoi::i#2 [phi:atoi::@4->atoi::@3#2] -- register_copy jmp __b3 } // cx16_k_macptr @@ -16970,14 +18168,14 @@ atoi: { * @return y the size of bytes read * @return if carry is set there is an error */ -// __zp($5f) unsigned int cx16_k_macptr(__zp($ad) volatile char bytes, __zp($a9) void * volatile buffer) +// __zp($a9) unsigned int cx16_k_macptr(__zp($d1) volatile char bytes, __zp($cc) void * volatile buffer) cx16_k_macptr: { - .label bytes = $ad - .label buffer = $a9 - .label bytes_read = $70 - .label return = $5f + .label bytes = $d1 + .label buffer = $cc + .label bytes_read = $ba + .label return = $a9 // unsigned int bytes_read - // [2708] cx16_k_macptr::bytes_read = 0 -- vwuz1=vwuc1 + // [2765] cx16_k_macptr::bytes_read = 0 -- vwuz1=vwuc1 lda #<0 sta.z bytes_read sta.z bytes_read+1 @@ -16996,15 +18194,15 @@ cx16_k_macptr: { sta bytes_read+1 !: // return bytes_read; - // [2710] cx16_k_macptr::return#0 = cx16_k_macptr::bytes_read -- vwuz1=vwuz2 + // [2767] cx16_k_macptr::return#0 = cx16_k_macptr::bytes_read -- vwuz1=vwuz2 lda.z bytes_read sta.z return lda.z bytes_read+1 sta.z return+1 // cx16_k_macptr::@return // } - // [2711] cx16_k_macptr::return#1 = cx16_k_macptr::return#0 - // [2712] return + // [2768] cx16_k_macptr::return#1 = cx16_k_macptr::return#0 + // [2769] return rts } // uctoa_append @@ -17016,44 +18214,50 @@ cx16_k_macptr: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// __register(X) char uctoa_append(__zp($57) char *buffer, __register(X) char value, __zp($38) char sub) +// __zp($2f) char uctoa_append(__zp($5d) char *buffer, __zp($2f) char value, __zp($43) char sub) uctoa_append: { - .label buffer = $57 - .label sub = $38 - // [2714] phi from uctoa_append to uctoa_append::@1 [phi:uctoa_append->uctoa_append::@1] - // [2714] phi uctoa_append::digit#2 = 0 [phi:uctoa_append->uctoa_append::@1#0] -- vbuyy=vbuc1 - ldy #0 - // [2714] phi uctoa_append::value#2 = uctoa_append::value#0 [phi:uctoa_append->uctoa_append::@1#1] -- register_copy + .label buffer = $5d + .label value = $2f + .label sub = $43 + .label return = $2f + .label digit = $35 + // [2771] phi from uctoa_append to uctoa_append::@1 [phi:uctoa_append->uctoa_append::@1] + // [2771] phi uctoa_append::digit#2 = 0 [phi:uctoa_append->uctoa_append::@1#0] -- vbuz1=vbuc1 + lda #0 + sta.z digit + // [2771] phi uctoa_append::value#2 = uctoa_append::value#0 [phi:uctoa_append->uctoa_append::@1#1] -- register_copy // uctoa_append::@1 __b1: // while (value >= sub) - // [2715] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2 -- vbuxx_ge_vbuz1_then_la1 - cpx.z sub + // [2772] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2 -- vbuz1_ge_vbuz2_then_la1 + lda.z value + cmp.z sub bcs __b2 // uctoa_append::@3 // *buffer = DIGITS[digit] - // [2716] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuyy + // [2773] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + ldy.z digit lda DIGITS,y ldy #0 sta (buffer),y // uctoa_append::@return // } - // [2717] return + // [2774] return rts // uctoa_append::@2 __b2: // digit++; - // [2718] uctoa_append::digit#1 = ++ uctoa_append::digit#2 -- vbuyy=_inc_vbuyy - iny + // [2775] uctoa_append::digit#1 = ++ uctoa_append::digit#2 -- vbuz1=_inc_vbuz1 + inc.z digit // value -= sub - // [2719] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0 -- vbuxx=vbuxx_minus_vbuz1 - txa + // [2776] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0 -- vbuz1=vbuz1_minus_vbuz2 + lda.z value sec sbc.z sub - tax - // [2714] phi from uctoa_append::@2 to uctoa_append::@1 [phi:uctoa_append::@2->uctoa_append::@1] - // [2714] phi uctoa_append::digit#2 = uctoa_append::digit#1 [phi:uctoa_append::@2->uctoa_append::@1#0] -- register_copy - // [2714] phi uctoa_append::value#2 = uctoa_append::value#1 [phi:uctoa_append::@2->uctoa_append::@1#1] -- register_copy + sta.z value + // [2771] phi from uctoa_append::@2 to uctoa_append::@1 [phi:uctoa_append::@2->uctoa_append::@1] + // [2771] phi uctoa_append::digit#2 = uctoa_append::digit#1 [phi:uctoa_append::@2->uctoa_append::@1#0] -- register_copy + // [2771] phi uctoa_append::value#2 = uctoa_append::value#1 [phi:uctoa_append::@2->uctoa_append::@1#1] -- register_copy jmp __b1 } // rom_byte_compare @@ -17066,28 +18270,33 @@ uctoa_append: { * @param address The 22 bit ROM address. * @param value The byte value to be written. */ -// __register(A) char rom_byte_compare(__zp($59) char *ptr_rom, __register(A) char value) +// __zp($35) char rom_byte_compare(__zp($79) char *ptr_rom, __zp($78) char value) rom_byte_compare: { - .label ptr_rom = $59 + .label return = $35 + .label ptr_rom = $79 + .label value = $78 // if (*ptr_rom != value) - // [2720] if(*rom_byte_compare::ptr_rom#0==rom_byte_compare::value#0) goto rom_byte_compare::@1 -- _deref_pbuz1_eq_vbuaa_then_la1 + // [2777] if(*rom_byte_compare::ptr_rom#0==rom_byte_compare::value#0) goto rom_byte_compare::@1 -- _deref_pbuz1_eq_vbuz2_then_la1 + lda.z value ldy #0 cmp (ptr_rom),y beq __b2 - // [2721] phi from rom_byte_compare to rom_byte_compare::@2 [phi:rom_byte_compare->rom_byte_compare::@2] + // [2778] phi from rom_byte_compare to rom_byte_compare::@2 [phi:rom_byte_compare->rom_byte_compare::@2] // rom_byte_compare::@2 - // [2722] phi from rom_byte_compare::@2 to rom_byte_compare::@1 [phi:rom_byte_compare::@2->rom_byte_compare::@1] - // [2722] phi rom_byte_compare::return#0 = 0 [phi:rom_byte_compare::@2->rom_byte_compare::@1#0] -- vbuaa=vbuc1 + // [2779] phi from rom_byte_compare::@2 to rom_byte_compare::@1 [phi:rom_byte_compare::@2->rom_byte_compare::@1] + // [2779] phi rom_byte_compare::return#0 = 0 [phi:rom_byte_compare::@2->rom_byte_compare::@1#0] -- vbuz1=vbuc1 tya + sta.z return rts - // [2722] phi from rom_byte_compare to rom_byte_compare::@1 [phi:rom_byte_compare->rom_byte_compare::@1] + // [2779] phi from rom_byte_compare to rom_byte_compare::@1 [phi:rom_byte_compare->rom_byte_compare::@1] __b2: - // [2722] phi rom_byte_compare::return#0 = 1 [phi:rom_byte_compare->rom_byte_compare::@1#0] -- vbuaa=vbuc1 + // [2779] phi rom_byte_compare::return#0 = 1 [phi:rom_byte_compare->rom_byte_compare::@1#0] -- vbuz1=vbuc1 lda #1 + sta.z return // rom_byte_compare::@1 // rom_byte_compare::@return // } - // [2723] return + // [2780] return rts } // ultoa_append @@ -17099,20 +18308,22 @@ rom_byte_compare: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// __zp($25) unsigned long ultoa_append(__zp($55) char *buffer, __zp($25) unsigned long value, __zp($32) unsigned long sub) +// __zp($30) unsigned long ultoa_append(__zp($74) char *buffer, __zp($30) unsigned long value, __zp($3f) unsigned long sub) ultoa_append: { - .label buffer = $55 - .label value = $25 - .label sub = $32 - .label return = $25 - // [2725] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1] - // [2725] phi ultoa_append::digit#2 = 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuxx=vbuc1 - ldx #0 - // [2725] phi ultoa_append::value#2 = ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy + .label buffer = $74 + .label value = $30 + .label sub = $3f + .label return = $30 + .label digit = $37 + // [2782] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1] + // [2782] phi ultoa_append::digit#2 = 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuz1=vbuc1 + lda #0 + sta.z digit + // [2782] phi ultoa_append::value#2 = ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy // ultoa_append::@1 __b1: // while (value >= sub) - // [2726] if(ultoa_append::value#2>=ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 + // [2783] if(ultoa_append::value#2>=ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 lda.z value+3 cmp.z sub+3 bcc !+ @@ -17131,21 +18342,22 @@ ultoa_append: { !: // ultoa_append::@3 // *buffer = DIGITS[digit] - // [2727] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuxx - lda DIGITS,x + // [2784] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + ldy.z digit + lda DIGITS,y ldy #0 sta (buffer),y // ultoa_append::@return // } - // [2728] return + // [2785] return rts // ultoa_append::@2 __b2: // digit++; - // [2729] ultoa_append::digit#1 = ++ ultoa_append::digit#2 -- vbuxx=_inc_vbuxx - inx + // [2786] ultoa_append::digit#1 = ++ ultoa_append::digit#2 -- vbuz1=_inc_vbuz1 + inc.z digit // value -= sub - // [2730] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 + // [2787] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 lda.z value sec sbc.z sub @@ -17159,9 +18371,9 @@ ultoa_append: { lda.z value+3 sbc.z sub+3 sta.z value+3 - // [2725] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1] - // [2725] phi ultoa_append::digit#2 = ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy - // [2725] phi ultoa_append::value#2 = ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_append::@1#1] -- register_copy + // [2782] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1] + // [2782] phi ultoa_append::digit#2 = ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy + // [2782] phi ultoa_append::value#2 = ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_append::@1#1] -- register_copy jmp __b1 } // rom_wait @@ -17178,37 +18390,42 @@ ultoa_append: { * @param ptr_rom The 16 bit pointer where the byte was written. This pointer is used for the sequence reads to verify bit 6. */ /* inline */ -// void rom_wait(__zp($30) char *ptr_rom) +// void rom_wait(__zp($3d) char *ptr_rom) rom_wait: { - .label rom_wait__0 = $2e - .label ptr_rom = $30 + .label rom_wait__0 = $38 + .label rom_wait__1 = $2c + .label test1 = $38 + .label test2 = $2c + .label ptr_rom = $3d // rom_wait::@1 __b1: // test1 = *((brom_ptr_t)ptr_rom) - // [2732] rom_wait::test1#1 = *rom_wait::ptr_rom#3 -- vbuxx=_deref_pbuz1 + // [2789] rom_wait::test1#1 = *rom_wait::ptr_rom#3 -- vbuz1=_deref_pbuz2 ldy #0 lda (ptr_rom),y - tax + sta.z test1 // test2 = *((brom_ptr_t)ptr_rom) - // [2733] rom_wait::test2#1 = *rom_wait::ptr_rom#3 -- vbuyy=_deref_pbuz1 + // [2790] rom_wait::test2#1 = *rom_wait::ptr_rom#3 -- vbuz1=_deref_pbuz2 lda (ptr_rom),y - tay + sta.z test2 // test1 & 0x40 - // [2734] rom_wait::$0 = rom_wait::test1#1 & $40 -- vbuz1=vbuxx_band_vbuc1 - txa - and #$40 + // [2791] rom_wait::$0 = rom_wait::test1#1 & $40 -- vbuz1=vbuz1_band_vbuc1 + lda #$40 + and.z rom_wait__0 sta.z rom_wait__0 // test2 & 0x40 - // [2735] rom_wait::$1 = rom_wait::test2#1 & $40 -- vbuaa=vbuyy_band_vbuc1 - tya - and #$40 + // [2792] rom_wait::$1 = rom_wait::test2#1 & $40 -- vbuz1=vbuz1_band_vbuc1 + lda #$40 + and.z rom_wait__1 + sta.z rom_wait__1 // while ((test1 & 0x40) != (test2 & 0x40)) - // [2736] if(rom_wait::$0!=rom_wait::$1) goto rom_wait::@1 -- vbuz1_neq_vbuaa_then_la1 - cmp.z rom_wait__0 + // [2793] if(rom_wait::$0!=rom_wait::$1) goto rom_wait::@1 -- vbuz1_neq_vbuz2_then_la1 + lda.z rom_wait__0 + cmp.z rom_wait__1 bne __b1 // rom_wait::@return // } - // [2737] return + // [2794] return rts } // rom_byte_program @@ -17219,20 +18436,21 @@ rom_wait: { * @param value The byte value to be written. */ /* inline */ -// void rom_byte_program(__zp($45) unsigned long address, __register(Y) char value) +// void rom_byte_program(__zp($57) unsigned long address, __zp($5c) char value) rom_byte_program: { - .label rom_ptr1_rom_byte_program__0 = $49 - .label rom_ptr1_rom_byte_program__2 = $49 - .label rom_ptr1_return = $49 - .label address = $45 + .label rom_ptr1_rom_byte_program__0 = $60 + .label rom_ptr1_rom_byte_program__2 = $60 + .label rom_ptr1_return = $60 + .label address = $57 + .label value = $5c // rom_byte_program::rom_ptr1 // (unsigned int)(address) & ROM_PTR_MASK - // [2739] rom_byte_program::rom_ptr1_$2 = (unsigned int)rom_byte_program::address#0 -- vwuz1=_word_vduz2 + // [2796] rom_byte_program::rom_ptr1_$2 = (unsigned int)rom_byte_program::address#0 -- vwuz1=_word_vduz2 lda.z address sta.z rom_ptr1_rom_byte_program__2 lda.z address+1 sta.z rom_ptr1_rom_byte_program__2+1 - // [2740] rom_byte_program::rom_ptr1_$0 = rom_byte_program::rom_ptr1_$2 & $3fff -- vwuz1=vwuz1_band_vwuc1 + // [2797] rom_byte_program::rom_ptr1_$0 = rom_byte_program::rom_ptr1_$2 & $3fff -- vwuz1=vwuz1_band_vwuc1 lda.z rom_ptr1_rom_byte_program__0 and #<$3fff sta.z rom_ptr1_rom_byte_program__0 @@ -17240,7 +18458,7 @@ rom_byte_program: { and #>$3fff sta.z rom_ptr1_rom_byte_program__0+1 // ((unsigned int)(address) & ROM_PTR_MASK) + ROM_BASE - // [2741] rom_byte_program::rom_ptr1_return#0 = rom_byte_program::rom_ptr1_$0 + $c000 -- vwuz1=vwuz1_plus_vwuc1 + // [2798] rom_byte_program::rom_ptr1_return#0 = rom_byte_program::rom_ptr1_$0 + $c000 -- vwuz1=vwuz1_plus_vwuc1 lda.z rom_ptr1_return clc adc #<$c000 @@ -17250,27 +18468,27 @@ rom_byte_program: { sta.z rom_ptr1_return+1 // rom_byte_program::@1 // rom_write_byte(address, value) - // [2742] rom_write_byte::address#3 = rom_byte_program::address#0 - // [2743] rom_write_byte::value#3 = rom_byte_program::value#0 - // [2744] call rom_write_byte - // [2626] phi from rom_byte_program::@1 to rom_write_byte [phi:rom_byte_program::@1->rom_write_byte] - // [2626] phi rom_write_byte::value#10 = rom_write_byte::value#3 [phi:rom_byte_program::@1->rom_write_byte#0] -- register_copy - // [2626] phi rom_write_byte::address#4 = rom_write_byte::address#3 [phi:rom_byte_program::@1->rom_write_byte#1] -- register_copy + // [2799] rom_write_byte::address#3 = rom_byte_program::address#0 + // [2800] rom_write_byte::value#3 = rom_byte_program::value#0 + // [2801] call rom_write_byte + // [2683] phi from rom_byte_program::@1 to rom_write_byte [phi:rom_byte_program::@1->rom_write_byte] + // [2683] phi rom_write_byte::value#10 = rom_write_byte::value#3 [phi:rom_byte_program::@1->rom_write_byte#0] -- register_copy + // [2683] phi rom_write_byte::address#4 = rom_write_byte::address#3 [phi:rom_byte_program::@1->rom_write_byte#1] -- register_copy jsr rom_write_byte // rom_byte_program::@2 // rom_wait(ptr_rom) - // [2745] rom_wait::ptr_rom#1 = (char *)rom_byte_program::rom_ptr1_return#0 -- pbuz1=pbuz2 + // [2802] rom_wait::ptr_rom#1 = (char *)rom_byte_program::rom_ptr1_return#0 -- pbuz1=pbuz2 lda.z rom_ptr1_return sta.z rom_wait.ptr_rom lda.z rom_ptr1_return+1 sta.z rom_wait.ptr_rom+1 - // [2746] call rom_wait - // [2731] phi from rom_byte_program::@2 to rom_wait [phi:rom_byte_program::@2->rom_wait] - // [2731] phi rom_wait::ptr_rom#3 = rom_wait::ptr_rom#1 [phi:rom_byte_program::@2->rom_wait#0] -- register_copy + // [2803] call rom_wait + // [2788] phi from rom_byte_program::@2 to rom_wait [phi:rom_byte_program::@2->rom_wait] + // [2788] phi rom_wait::ptr_rom#3 = rom_wait::ptr_rom#1 [phi:rom_byte_program::@2->rom_wait#0] -- register_copy jsr rom_wait // rom_byte_program::@return // } - // [2747] return + // [2804] return rts } // memcpy8_vram_vram @@ -17287,84 +18505,100 @@ rom_byte_program: { * @param soffset_vram Offset of the source location in vram. * @param num16 Specified the amount of bytes to be copied. */ -// void memcpy8_vram_vram(__zp($2f) char dbank_vram, __zp($2c) unsigned int doffset_vram, __register(Y) char sbank_vram, __zp($23) unsigned int soffset_vram, __register(X) char num8) +// void memcpy8_vram_vram(__zp($25) char dbank_vram, __zp($39) unsigned int doffset_vram, __zp($24) char sbank_vram, __zp($2a) unsigned int soffset_vram, __zp($23) char num8) memcpy8_vram_vram: { - .label dbank_vram = $2f - .label doffset_vram = $2c - .label soffset_vram = $23 - .label num8 = $22 + .label memcpy8_vram_vram__0 = $26 + .label memcpy8_vram_vram__1 = $27 + .label memcpy8_vram_vram__2 = $24 + .label memcpy8_vram_vram__3 = $28 + .label memcpy8_vram_vram__4 = $29 + .label memcpy8_vram_vram__5 = $25 + .label num8 = $23 + .label dbank_vram = $25 + .label doffset_vram = $39 + .label sbank_vram = $24 + .label soffset_vram = $2a + .label num8_1 = $22 // *VERA_CTRL &= ~VERA_ADDRSEL - // [2748] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [2805] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 lda #VERA_ADDRSEL^$ff and VERA_CTRL sta VERA_CTRL // BYTE0(soffset_vram) - // [2749] memcpy8_vram_vram::$0 = byte0 memcpy8_vram_vram::soffset_vram#0 -- vbuaa=_byte0_vwuz1 + // [2806] memcpy8_vram_vram::$0 = byte0 memcpy8_vram_vram::soffset_vram#0 -- vbuz1=_byte0_vwuz2 lda.z soffset_vram + sta.z memcpy8_vram_vram__0 // *VERA_ADDRX_L = BYTE0(soffset_vram) - // [2750] *VERA_ADDRX_L = memcpy8_vram_vram::$0 -- _deref_pbuc1=vbuaa + // [2807] *VERA_ADDRX_L = memcpy8_vram_vram::$0 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_L // BYTE1(soffset_vram) - // [2751] memcpy8_vram_vram::$1 = byte1 memcpy8_vram_vram::soffset_vram#0 -- vbuaa=_byte1_vwuz1 + // [2808] memcpy8_vram_vram::$1 = byte1 memcpy8_vram_vram::soffset_vram#0 -- vbuz1=_byte1_vwuz2 lda.z soffset_vram+1 + sta.z memcpy8_vram_vram__1 // *VERA_ADDRX_M = BYTE1(soffset_vram) - // [2752] *VERA_ADDRX_M = memcpy8_vram_vram::$1 -- _deref_pbuc1=vbuaa + // [2809] *VERA_ADDRX_M = memcpy8_vram_vram::$1 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_M // sbank_vram | VERA_INC_1 - // [2753] memcpy8_vram_vram::$2 = memcpy8_vram_vram::sbank_vram#0 | VERA_INC_1 -- vbuaa=vbuyy_bor_vbuc1 - tya - ora #VERA_INC_1 + // [2810] memcpy8_vram_vram::$2 = memcpy8_vram_vram::sbank_vram#0 | VERA_INC_1 -- vbuz1=vbuz1_bor_vbuc1 + lda #VERA_INC_1 + ora.z memcpy8_vram_vram__2 + sta.z memcpy8_vram_vram__2 // *VERA_ADDRX_H = sbank_vram | VERA_INC_1 - // [2754] *VERA_ADDRX_H = memcpy8_vram_vram::$2 -- _deref_pbuc1=vbuaa + // [2811] *VERA_ADDRX_H = memcpy8_vram_vram::$2 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_H // *VERA_CTRL |= VERA_ADDRSEL - // [2755] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // [2812] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 lda #VERA_ADDRSEL ora VERA_CTRL sta VERA_CTRL // BYTE0(doffset_vram) - // [2756] memcpy8_vram_vram::$3 = byte0 memcpy8_vram_vram::doffset_vram#0 -- vbuaa=_byte0_vwuz1 + // [2813] memcpy8_vram_vram::$3 = byte0 memcpy8_vram_vram::doffset_vram#0 -- vbuz1=_byte0_vwuz2 lda.z doffset_vram + sta.z memcpy8_vram_vram__3 // *VERA_ADDRX_L = BYTE0(doffset_vram) - // [2757] *VERA_ADDRX_L = memcpy8_vram_vram::$3 -- _deref_pbuc1=vbuaa + // [2814] *VERA_ADDRX_L = memcpy8_vram_vram::$3 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_L // BYTE1(doffset_vram) - // [2758] memcpy8_vram_vram::$4 = byte1 memcpy8_vram_vram::doffset_vram#0 -- vbuaa=_byte1_vwuz1 + // [2815] memcpy8_vram_vram::$4 = byte1 memcpy8_vram_vram::doffset_vram#0 -- vbuz1=_byte1_vwuz2 lda.z doffset_vram+1 + sta.z memcpy8_vram_vram__4 // *VERA_ADDRX_M = BYTE1(doffset_vram) - // [2759] *VERA_ADDRX_M = memcpy8_vram_vram::$4 -- _deref_pbuc1=vbuaa + // [2816] *VERA_ADDRX_M = memcpy8_vram_vram::$4 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_M // dbank_vram | VERA_INC_1 - // [2760] memcpy8_vram_vram::$5 = memcpy8_vram_vram::dbank_vram#0 | VERA_INC_1 -- vbuaa=vbuz1_bor_vbuc1 + // [2817] memcpy8_vram_vram::$5 = memcpy8_vram_vram::dbank_vram#0 | VERA_INC_1 -- vbuz1=vbuz1_bor_vbuc1 lda #VERA_INC_1 - ora.z dbank_vram + ora.z memcpy8_vram_vram__5 + sta.z memcpy8_vram_vram__5 // *VERA_ADDRX_H = dbank_vram | VERA_INC_1 - // [2761] *VERA_ADDRX_H = memcpy8_vram_vram::$5 -- _deref_pbuc1=vbuaa + // [2818] *VERA_ADDRX_H = memcpy8_vram_vram::$5 -- _deref_pbuc1=vbuz1 sta VERA_ADDRX_H - // [2762] phi from memcpy8_vram_vram memcpy8_vram_vram::@2 to memcpy8_vram_vram::@1 [phi:memcpy8_vram_vram/memcpy8_vram_vram::@2->memcpy8_vram_vram::@1] + // [2819] phi from memcpy8_vram_vram memcpy8_vram_vram::@2 to memcpy8_vram_vram::@1 [phi:memcpy8_vram_vram/memcpy8_vram_vram::@2->memcpy8_vram_vram::@1] __b1: - // [2762] phi memcpy8_vram_vram::num8#2 = memcpy8_vram_vram::num8#1 [phi:memcpy8_vram_vram/memcpy8_vram_vram::@2->memcpy8_vram_vram::@1#0] -- register_copy + // [2819] phi memcpy8_vram_vram::num8#2 = memcpy8_vram_vram::num8#1 [phi:memcpy8_vram_vram/memcpy8_vram_vram::@2->memcpy8_vram_vram::@1#0] -- register_copy // the size is only a byte, this is the fastest loop! // memcpy8_vram_vram::@1 // while (num8--) - // [2763] memcpy8_vram_vram::num8#0 = -- memcpy8_vram_vram::num8#2 -- vbuxx=_dec_vbuz1 - ldx.z num8 - dex - // [2764] if(0!=memcpy8_vram_vram::num8#2) goto memcpy8_vram_vram::@2 -- 0_neq_vbuz1_then_la1 - lda.z num8 + // [2820] memcpy8_vram_vram::num8#0 = -- memcpy8_vram_vram::num8#2 -- vbuz1=_dec_vbuz2 + ldy.z num8_1 + dey + sty.z num8 + // [2821] if(0!=memcpy8_vram_vram::num8#2) goto memcpy8_vram_vram::@2 -- 0_neq_vbuz1_then_la1 + lda.z num8_1 bne __b2 // memcpy8_vram_vram::@return // } - // [2765] return + // [2822] return rts // memcpy8_vram_vram::@2 __b2: // *VERA_DATA1 = *VERA_DATA0 - // [2766] *VERA_DATA1 = *VERA_DATA0 -- _deref_pbuc1=_deref_pbuc2 + // [2823] *VERA_DATA1 = *VERA_DATA0 -- _deref_pbuc1=_deref_pbuc2 lda VERA_DATA0 sta VERA_DATA1 - // [2767] memcpy8_vram_vram::num8#6 = memcpy8_vram_vram::num8#0 -- vbuz1=vbuxx - stx.z num8 + // [2824] memcpy8_vram_vram::num8#6 = memcpy8_vram_vram::num8#0 -- vbuz1=vbuz2 + lda.z num8 + sta.z num8_1 jmp __b1 } // File Data @@ -17414,10 +18648,12 @@ memcpy8_vram_vram: { display_into_briefing_text: .word __14, __15, info_text4, __17, __18, __19, __20, __21, __22, __23, __24, info_text4, __26, __27 display_into_colors_text: .word __28, __29, info_text4, __31, __32, __33, __34, __35, __36, __37, __38, __39, __40, __41, info_text4, __43 display_no_valid_smc_bootloader_text: .word __44, info_text4, __46, __47, info_text4, __49, __50, __51, __52 - display_smc_rom_issue__text: .word __53, info_text4, __55, __56, info_text4, __58, __59 - display_debriefing_text_smc: .word __72, info_text4, __62, __63, __64, info_text4, __66, info_text4, __68, __69, __70, __71 - display_debriefing_text_rom: .word __72, info_text4, __74, __75 - smc_version_string: .fill $10, 0 + display_smc_rom_issue_text: .word __53, info_text4, __63, __64, info_text4, __58, __59, __60 + display_smc_unsupported_rom_text: .word __61, info_text4, __63, __64, info_text4, __66, __67 + display_debriefing_text_smc: .word __80, info_text4, __70, __71, __72, info_text4, __74, info_text4, __76, __77, __78, __79 + display_debriefing_text_rom: .word __80, info_text4, __82, __83 + smc_rom_releases: .fill $20, 0 + smc_version_text: .fill $10, 0 // Globals rom_device_ids: .byte 0 .fill 7, 0 @@ -17525,35 +18761,43 @@ memcpy8_vram_vram: { .byte 0 __53: .text "There is an issue with the CX16 SMC or ROM flash readiness." .byte 0 - __55: .text "Both the SMC and the main ROM must be updated together," + __58: .text "Therefore, ensure you have the correct SMC.BIN and ROM.BIN" .byte 0 - __56: .text "to avoid possible conflicts of firmware, bricking your CX16." + __59: .text "files placed on your SDcard. Also ensure that the" .byte 0 - __58: .text "Therefore, ensure you have the correct SMC.BIN and ROM.BIN" + __60: .text "J1 jumper pins on the CX16 board are closed." + .byte 0 + __61: .text "There is an issue with the CX16 SMC or ROM flash versions." + .byte 0 + __63: .text "Both the SMC and the main ROM must be updated together," .byte 0 - __59: .text "files placed on your SDcard." + __64: .text "to avoid possible conflicts of firmware, bricking your CX16." .byte 0 - __62: .text "Because your SMC chipset has been updated," + __66: .text "The SMC.BIN does not support the current ROM.BIN file" .byte 0 - __63: .text "the restart process differs, depending on the" + __67: .text "placed on your SDcard. Upgrade the CX16 upon your own risk!" .byte 0 - __64: .text "SMC boootloader version installed on your CX16 board:" + __70: .text "Because your SMC chipset has been updated," .byte 0 - __66: .text "- SMC bootloader v2.0: your CX16 will automatically shut down." + __71: .text "the restart process differs, depending on the" .byte 0 - __68: .text "- SMC bootloader v1.0: you need to " + __72: .text "SMC boootloader version installed on your CX16 board:" .byte 0 - __69: .text " COMPLETELY DISCONNECT your CX16 from the power source!" + __74: .text "- SMC bootloader v2.0: your CX16 will automatically shut down." .byte 0 - __70: .text " The power-off button won't work!" + __76: .text "- SMC bootloader v1.0: you need to " .byte 0 - __71: .text " Then, reconnect and start the CX16 normally." + __77: .text " COMPLETELY DISCONNECT your CX16 from the power source!" .byte 0 - __72: .text "Your CX16 system has been successfully updated!" + __78: .text " The power-off button won't work!" .byte 0 - __74: .text "Since your CX16 system SMC and main ROM chipset" + __79: .text " Then, reconnect and start the CX16 normally." .byte 0 - __75: .text "have not been updated, your CX16 will just reset." + __80: .text "Your CX16 system has been successfully updated!" + .byte 0 + __82: .text "Since your CX16 system SMC and main ROM chipset" + .byte 0 + __83: .text "have not been updated, your CX16 will just reset." .byte 0 s: .text " " .byte 0 @@ -17579,6 +18823,9 @@ memcpy8_vram_vram: { // The number of chars that would have been filled when printing without capacity. Grows even after size>capacity. /// Used to hold state while printing __snprintf_size: .word 0 + /// Current position in the buffer being filled ( initially *s passed to snprintf() + /// Used to hold state while printing + __snprintf_buffer: .word 0 __stdio_file: .fill SIZEOF_STRUCT___2, 0 __stdio_filecount: .byte 0 // Globals @@ -17586,4 +18833,11 @@ memcpy8_vram_vram: { status_vera: .byte 0 // Globals (to save zeropage and code overhead with parameter passing.) smc_bootloader: .word 0 + smc_release: .byte 0 + smc_major: .byte 0 + smc_minor: .byte 0 smc_file_size: .word 0 + smc_file_release: .byte 0 + smc_file_major: .byte 0 + smc_file_minor: .byte 0 + smc_file_size_1: .word 0 diff --git a/target/src/cx16-update.klog b/target/src/cx16-update.klog index 9ce8ae1..2b0a0e8 100644 --- a/target/src/cx16-update.klog +++ b/target/src/cx16-update.klog @@ -15,10 +15,10 @@ Basic-segment: $0801-$080c Basic Code-segment: - $080d-$4621 Code + $080d-$4da3 Code Data-segment: - $4622-$5d8e Data + $4da4-$6732 Data Writing Vice symbol file: cx16-update.vs Writing Symbol file: cx16-update.sym diff --git a/target/src/cx16-update.prg b/target/src/cx16-update.prg index 26f68c44f09e7032fe7c7ae529f9ca238ffbc65b..89809783544a7ffc36016afe8c6b5c9acca44953 100644 GIT binary patch literal 24372 zcmeHvd3apKmG5myEvsd&wb=_N4r>ah!I(4?HYg^9noLuF9RaMNXR1`&5xT0rqo33alqS~ubZBhrjC5P2H zBENVv)5d>4_)0XEIe0v39FO+D9F64|uSEM_iVkIV*&>&jLRY^RzwbT~{q|Sg zuSUOp{x0RtuLe(0^H-x0_HUzf8$ZSF8>MICad;FvK8l?jWh_zoDQ$j~UKgv{{^i<& zs4+jvmlzA8d@1`1jkIM^?W(AW&MdvZch=CY`d4L>_i2;&87rcEg2wh4E2I2=ZTvpn z?W~XTpJ@~JiCNmjea4a~((c-5k3ZU{3{61C{Y}w>g@f~>gDVKHm5FDBEgS96au7tr zw_3gs>D%mUrIop+{qCN1qbQHKuj+*8iW0Xh0W~M8 z#zeJm_`yv7X)ge<3bdBCoyO#jr5QsRx^1bASBq*8YIGjJN2+{?f55&w(Ks2>N;`~G zA+4;#DD7~TbpYg;S0C43)`8A`=8fg*N`I;OZdBZ*`2y^k$%ZeW`8tfsyLdUfb+S<& z(8@cEs${OB!|)Li%ZZ2;L_~qPF8@CuVw~K+OOP8Yuo5e<3SDnO*X@|@d*II>PL31Y zWWH=kZvS+ebwvm81mZOJwV;nSNi`;!q#iLslA6esZISD35xjfE2R@s4B{ba*UBGzm^;@{ZVWFkOEI ztwLjwQQM|f2H3DEMnxbN(Eo^uu9TY$4|Dy8nd=|rFYBxLD|$6ZvWl-_6;q6=0GjG6 z`YQvmQ6LTNLq~iczRur3W`Jo^Xetg1`(o9YlFW@#L7!69C^hNBijXZ+2|m}N&k+KT zXJV-KsfN#D+(Kl_RijviR2@b0ywgohZPrkufl?^zD_mj%=V>jWb0LN7>%;sVyk=@_0&hU?8BNczbR$D{2UrJ zs78a?$D1x>8&z==8uhuvIr%UesgFLF{-r6Rb-Px&Pybu2${M*UG{YQ=I48wPz!tjn zTdbAJGFR#utywji)mRq$=P42PlPQ-HDR)^tLZmdSyxfu|@g0y0CVzZNLjDj_(C}Zf zIN$FC6RZUj#HJi=R{bJh-(aDTXQD8qHK|6E8k=*ev7h-f-7)u6|6Tci8R@3Ki1d&D z%qT~jRR6RjjfWA9*IMwa#sUG|(cPf7o?B~C`sd>3Lpk7>M%BMEf3QLI*XJh|D1#ak zg;tx}W)euVMv}%~;?{G!>yrIwOf?vo4L#MX{^9w9b*ldhXQC(Ug?;*~iJk}zTX#iD z^RcRK>mN%UC}3XyubqPxs{awEQARxTL#H@mK4S7=l$)i*F_yT|#;GYXf?o?fs#K%O zWXBVPyTvb2cKbQ97 z51o2;_uM4@{4w#^P-!X$M-2dGiD+yLy^I7OZs)Iqkf!LUn|gGv>K}gvhPOf403?_G zw0SCC`FreNrd^7=%0a-WWL9H&fNwEY1R%HLay%iw|RuAV(@{0`95tFm8CGp-Fdw*{Qn z1)SRhpu@H+^xcV7CDhCH8cZ{aY1$zn>!!*w>bWdHJwMo{)dzbHwP_8(o`>4B#$eCG zZCX>1WtECUyh1$0E5*aSO7!rVqQYKjud>g?Ao~kaiDBb!q3^e$y9d}VUt%Nw!a^f4 zTN9g|z-BG5$&O>AU8$y_GhZci7N~?ytxD)DRM`)F#xzx%uNoyPs*LF>s*D*bs*L%n zbAjrtRh9gev|ABpX|T5ex`DXgj0&}qY@P6Lou z6)>tgw3z|6ex^98%~r)RZ4N1xYE`RIjoGSmj_Rydoi%FAqp!DG=bFX=x~@S<6#eBS zN;)x}Rg%~A7cKSrZ)xiFbVxtJ2Lbaw>!}uluudJ~eWaQG58e9f=x-JJvza>gb(lY^ zVCrG*P3w1-YRtmk?#kESvO0}TK|2(J178PiR$Zj|z@T=jp?Ip|aU-*iHDmZm_wE8dk5WvV~o94uA+tDQRW zp=D*5W`j8e7?u8`dHPS1wRM(S$uZT+^_cO>7`s!dad(9oRyr{ zrm4oZKuMieq8ir)N)&CnYHX+H3>9L)S)w|ptIipu1wI(rjZv=+?0v8eE%qL21N`2H z+5o-x;WqteAmnn;T>-!Ew)&k6VWS?#HFczZIVK&-kl=ehmy`n)W3% zDMb5gC^Q=MG_^rO2N3gJ!j`8MDo5|BqHu7M>aWa888Wd>Zi`c3Km8T!G$H|Q8Bpni zk(~^&_0Gskjg*&Y`{zbdqyw1Vt+}b)N82$Y*)lsx?(+$c4sG|=wxJ~M)KNi8+n!wBvB%rq!8=3;Ij$%m-Mo-bG873`riZ4aW?}L`s?n*k+q$}YtLsv>yI&K+|g?yo9 zV0zaU70WEyk0-~OxzTLiYdm&tA4{_%-+Y(8ngEC(`;W&L?0?!66I&b zDf?N3ik3tpx{C@-psuit8)fTBWZ0P*=7ODTxq8i9AQH@2a zwpfjbB^2Sw^gBlz4Tv*|C5S$WrTvZ3gC%^iSZv0ha=AZy>HekOTUSN-vYypZAbyot zrmcvItF)ETh|w73i~XZVVzhJ((%cW+XGOl1-hdEhR0zOx3PZjiu^Om+e>C=JOH6I#T;b=L%f3 ze0~$2H|R}#E893v7Ggsnn_g6lB5RKMn9%6-IgUorxb&iND5^{^G8c#zYALqR5{fq- zf~i3flV5>NNy^#~z-y2(lZZG2etA!ZB}Ey3RrvU8tY?0Ny)d7hn6HnyxQ}F8@eZ2y z%BB~vh0gdHai*^V0ac)|1MBskc(1R%%RX?%|BqwE4t@l~#sHRwulu#nL%OQ{F$4)01*VU&`~?wI-pH2J>cK>14k{g1rNU>6*|4cF+9qsC6&vzv zm?^Y0yMl??x%}z7dwN^ZwC6}GI%XZUV)jt3Ug2$@&EL^Bt70~P0wZ*=hib*sRQPl* ze@rj*wm*i)ro@n$JPKR}X8VeGw^JC`ry(e)`sZnFymNaeK2sbvsZ&KQY|(77 z5Yge$qLyzF3ojU@SdL=2!&tuS%;l5w;lDGdbG>*=o6@oWEt-y`y658Q@C0hvZvpbJ zn$F)R+K8JainmA*Kvc4iKRX?B$CHU(6-S`p(D9 zA{&Y#cPaO8!65cMci&knGk4Yw)W$Lf77lDd+U~!CLHO)fHK88(vD*C;^+!TwN4`Rd zPpF9IBJo8i+-pX3<%uOy0(fI`Es>TvT{FZBz|-03Zbj(iEUS zH^7h_fP%J$FObW3BK5ZKVgkKAG_+P%Fw6Zr_1?V?w(9EML#_I=dwc2aNGpw*%YSz_K>oRH?+@Dc{!825 zJ#DbRKpCTT5V(Lc3IYN&yGqP12SEXv-AsSWcy#$lqRS`JyS(1)68-+5P0vBMc-zzF z|IP$7`dOmU!)c8Wnn-PxmEP*^M5_a7t$1l_ql}bB=`6J_GR5*dBDGXBGl8%u;X9Rk3zkuGWs0R-?g^HDme9~CTB?$v)IV55u2qXxCW8{@0ueluF-PC`Y!$?#N1QR5HIQqe~INaibw2^4%O>Ss|cWE zkiW0t0OM2$?-3Z4SBnULQe4fSO6emft!>Q7d`-mivKh6x=tO4>P)A$}aSZVYFB6aA zJSQ2lNi##o0@4a+oeV)*oC;kY_R0iof)`=b0`D@A5~oCQaWO3chq;ttF6QW27aPIT z6Ob22ei4Ysh>ey(iK4-Z0L~AR)R$zVLyBR#ZwWh;v(+mi?T_$?xVrsOezg}TLhX-$ zJeW=UqadwU45D^WypP)V{mLYLcNtE9$^t{fu?d!v`v7)_VCpT8<>+p(jsG7e>mEGy z-IL3C`B1hjjKIPe8YQ;y)uNrRVfQwPATJeXYR;DOGkuDi4p`5K_hMsUE>HyJ^~qu- zKv(fKun?}r`rp9%nozVHMJs4!-a}^u3L$qfAg%966;teEUD}uo*eQUZ$8z|Nzy>|T6}#?>^ZvW0=;y(z=fSF1 z$Lu0P6Ntnzj$C~t;=dOyNJf9qBxN+oW>X<=GZk`^J~pw6nDrLWBHeBaxjF zm)6iY_nZ~bzopHlIn4=Z)qw-E0^PF%#+<;9sspU=D_?cMzhJ64+&Xi(fEd_czW3bP zJ^YFN17rk{VWby$+shMnfGE%9bEsgwSPyxKRA%53Y1aqHC(^zafX!l>F*V>sW?2E@){QR$?8N0ox8*C<4wNt}oD*2lRlp0-FUU=X?A;ZE-+v zP81raaRwV;2b<&Uaw*w_Rkvtpd=>)Me+Xgh%LdTt*d$Kz_#t%sY>3()r}m~8*8UU{ z8?`S&#-Bo%-7w<|Jch2p#!EO4Oe=nPbCKq#sA zj;;lJ0Dg@niZAHll0rG<D_ z=eA?_JSU#tj{Wnz2zx0T7HcWHR!~r+RZz^S4eLO4;1(P_l$|k0}3u8Rrw`VBR|E&_LkuUKY$o0wqDzJq_nBObb z@@~<}4bjFAc#ZmC`@J~1F&cvH-8j238iVZyPH&8+VEX}_-{?0WI2J%?%sli-=X*K| z=g0X8euzJWw}w{!PjaK=)Ms}D#U^#gbgFnxXHH#B+369Gp7^UI>J#`6y zh*;B?fvMl*6RRZ+Zu051Qj?>5FKC$^#t@wuK+Y@f?NmUE?#>KQ!@#>C4j?@sjsuV% z7bj400??p!AzEWd=iq3}7k%h=p#!Sg6B}Vx(V@6i4q_8n&Dqs_wVrWy4HWeuZ~JO~ zNIcZOhCd`8M(+=c9;7{&l4ExyB-4e*W|!NX|2@%y2$?kK|Ke5y>M+ef^2-`h`x9Mb zQ7W(~l~|N2EXqZa!i?l%LUAeT-&v|pm!$WfF9mg=y@M?mdssiSM!@wbVoo}pT8q;u z(TdY4(Po}cdAHA3wdSBPN8P?a)mnl^wYt3)!M>nTqi$b__+AhvKA89!i&KZms3I(3 zrs^4*yhDK_zY6FZ%#6dhtn_e5MqM!c7K?ve8=(>MVu#3e!7_Gl0*fj#zG-j*) z&B3lb{e4U>AP?Ch##mxm2eE7}SQa2Wj23(?I^eD7&thA*$+m0y+~7*R!s1H30=GB# z8Jwy^`~C?&dH|O0+_C77cogy|H{9t4a$fX{g4rs%M!_5vy(3>u2;+&vyIhk!9VUC? zq+L$zF0`d8VozB`?1>3eIoK0mIo|DKRFDP(;E)8ne~w!6P1^m{Y6-4)5M}Xf3PL(K z8-mWpptC6$%NdLlH0c}Q6a`wOgbqQc(;?`L%N~OIu+qV_Lr}SB@uLfK(fnf&8peS? zf04fg+_VF*!&L3Q0PxZd27r}ze}FYDvIw(;@CIR)65gE%l@i`~UKJ$zE+P8L+k|oZ zDJy{j`sN>@G5;7X`6p<`KLx4ylOP+k0$P74KJC9M*tG_N>y!Rv!LFqcTp#x@4R+N- zaDCLjB-m9wI8GHW+Fu&V#qEQ>tb@1{RsnK&+h3$prxLaOCGZ@m0)%ktG=rWqRR2%P zEf`Eq!eDX|2Gf%;_XjQ|7Mw}c!FvCZO^#WW(X1}J$w^h43qw??AgWXnRjP<87j5*o zR3SscYIT4NiTlWqI7o)X{bWeQ@A;*f5f`yQioBp5)g+#T@_&l^#77X9A46Dv0#W%X z?_p0Yk~+59A3YZ$hvK=A@mz?1CO#Xw`BF>0D?wTD z8CE(yzGm4?7l~Vp`+Nv)%nLN+iy`f$(1GVe-7kcU7ehaKNsjswg#wQ9V-Z~II3h3I z)K=pnW=znzv*62_JaWlU z2jf2nLbvj7@CW#Vc+)Z5Jtm6cSpUp`v=EN=R|Q}pp!i)J^TNP_d+}~xZr3WA(pl_9 zK?*H_p*RX|I(9MRUlLbovCGg0+4|Y=tplzI=>MzN%^<&NGwn;>$44cYJ`3+hwI{=a|*v_;9dXIv&4ho z%VO~W__AOCx3yA@86wIIsXrmC+mG_2T^R$%==A~q0A3#y?|R#B<+tMX8<(O296f8D z(x^bUYplz+@r_I;bLNV|Plu?O31yTpH7r3nf{_#ml^rK^&6Iqe%8(|LG8dBLjn=+xz~WYLHW2NtG^1->|Mx zFpJS(n6BV1{_7E31X_*#vxaS59O*7r?|+#GaPE}VH?PYj0(}j5Ti;~|nMbK`YW#0j zBc_jlrg<>$BiAim09}B7GFTv9g~R{arJQbazeU91)Pqa?b}2)_X>^(yF{ba+J_#8! z_GzEen%73f+3C|uY}#N*tB+=%)s_8c|6wSky&uvRM)zoSQN3dFY3+lM@j+-A{_u8p z&zX?c6x9z;K8;i2)6>y9lb@EQ&C&c1Lfs#PdImyTOSI>$khUmld=gr^+q@^KeHhZG zb$=K-tPEx4emC|7@<%@m86SqUhN$sr66~XpKCb(tB-lrxqaTHgk3w2w)L0nBDYH=* z#fdZMbqYtty{8T$fORTY`#5wrK62Q*DvGZj_O6b4k=foN!I!Ap7g39WQ~vF9(WHMt z^x$avaA8>#>*ujb=*VWNJSvN@yB4DmQbLh=_Q7IEMl{&F45!mT0T*U~!XHBMFD1+` zBR<2I5k_+qUI|4uUZ5{05ZtK2mlH-)bQFw0SjzFwCXT`+9HYkG^8%ExM2~+65te@l z9Yy=mYV4O-o%vBZFvox^qBJ1R#>Li}vp4V;#7#A4&+!^@1I(v$6tkJTM9;SG;5*pc zOHg=3oZ~Ulxi9o(khwHp+%SscK5*|=syTI1x!8_+n{CdTQ?8Mr~*(7Uy3d>XXlV(3U3fc;{CfgAi^%u55xy%zy|3d`SFFr=lt0I866>8dC`;#>}zCJdZK8FGGeB2K-l{1pJo-|5Xx4hXwy7!LzXO z6_C`%C;Mk%z>iP%pKHOhFc98gj7Rr;W4w3FX#+4GE@1{XfXWwE<;f~gYZIHeEFx|M zQFB04#CJhdWDo0}Bw=yBz8Xh8W*pz!xe3N-s8i*kbV6f$)46Lfl3sjga3BZ-LW7@^ zcKc(<|IJ$Q1jZ4FBtOCDWY5uyyzO(4?*I;&d_65HqRvmii0c3v*4pa1y|afV>u#hz zJqKyEo`JL;m-2rd#reZ;qFO&4k{-paneXtR9_DnD;IMziLj8MIHp|T3Ze_F0>_#i= z##q1R8*sq0QCIj)eCtmSKl`2SVr%dAE-$V~ym@y|V;HJugGo(Yx%Y%^X~hD zy!jalfnC>+3l5`Wv=unbp|FZ}Q)@P`o|FFyv|s zX`PUq#Fqyd11H7XHD^!qlh!%ON%0oWNsxnjw%3W}I44ZGU`233EN&}Nc%8T%X}#E0Qo|d>9e8i_in`7qT#AO@yHH z{}l3lVWkuy?nEFj2#}BnBIXGuL(CKJnjDhcQ#y5NNcdO0iITDWO_~aSat7f(ZR9mV0IW>jzC&=xaJ(m3524~k)V(Q z;%-wsU@h<51B@ng^o;31#sS<%@yCJT{ug@2QHdRg!Q&{$C^sDS-p&l(OW42T?R*Ua zMUP5(Vtg6WY$PqTjIdz~^VLR1*kUIwGkm}n?#>9aN6(|DF&&yGjNY|^FnZMr!|bDF z?C^Q)nXE8-=sZ&Xw0K%##gwZI7Iuyg4|&Xn_Aq-2kbDE*7#W<@5g`iT(Ab={7juOS zI*yrQp-v#4;{V5bEYfi-lHT0!4i7c!etOjEP4t*!<|dhS9$6UcL%0EBvkw11HJGpC zlCNXvb>KLp$O(4(Dp8AA$_0b^4>eGvT`5*B9Ip)Vd=kJJj zOrlQ!Q4!Qu_#^z$h3@KetI7#YG77h5r`b`fuQ^ z_p{A@wD=YE{44&rcwF|ZKR$Ot2QH~(`fD4-J#;li=twE+6_2#*{1NeJ`#t_dXqSiYIH%NvHiB!-@9MnzK3(J9hRSehiBsQHGkN(2PSIwI9P6YZ@(V z*EEtdnTneKj>d~ia7ykDO9~AKg|xizf#F0VyddY4OyCUjZDL!uJ50Q3jfoslHQ(d` z%_RX{VFWgs(gDE`Xc*sS`B;5f@LKdJSO(|>c?fKQ7&aODQYQ?o#+t72-`|83%fiqGKoRMna%%#=9I{paMz@yM9 zkNJbm_$+q1DxBH~>f;meR* zMcp^Vtq_m5if=$X;+@1JG7yj7z_lqGx?j!L(7~NJ*!#S^$a7!sb092e{{Y{~{@pKT z4`rK_AGj40`NqHlNFN-y59vYwxE9cOK+D zn`36(R(80V{U>B8WXEvt&Qe7{b_ehH=@ZX>=Q`2RdmU751+LkcWZq(4Z6Y#niO9>y z*WZ1A8LxW=Nj)VElr)MRv58`4Z)2Ai=U7#}4P9<%;mY3nt{f~$MQP_~ zB7(@>;T5+*P2MJMM|!*1g+{x?9Z2s$K#HzJQTNnRwv(+;RUxZb#`1_bgif9j4d7?nPNQ z$_(TV_}^Is1h(*Y(cZg84!NawwaHH}^POO&mjU&P*h!B0!0UK_!@6vD{bJlp9>o`B zQ~OzB7F@xuEb{NftWkWvn3c;HWY0J1qkQuI1-Nj`=iJf=4EZ39g$jq8o_tq!Z#(Elw?zqM~Q(7a!8B}UEaH?Ys4i-j_8}so*(xIm!Zj=6mvhXD;Jkh zq?7RV$iN&?R&%x);Y8or7Vh)^?J~&qb&%Zw+!I+P0(@om$| z6^HexHY#islSMcxVG)iFA1DrYk0OhZOh1=4hE)I9@PRSX5Ex6jabb4sJW{?L6MU0@ zhV+kQ<@^yLkeVUy{!*9*Xn7@>17ZlSs`vnYYD9b%o3EGlZja3#_)NS>cRg3@3TCiI zFTx3C7-#JhaBnb-&rr55M$vJ+n#LR-5)1hUV*CC#_f7~8yourd1O)h>_;&x6tH_M( zD~q|oPLJ=AA9~q%ryr+|3V)okymNmiAS$|Ykk0KY8Y&Qv$0)R3bG8rmDnKAW!0BT;y@rL&l&v%Hqha!Z|+yT97(=;p{kwWz2$TZfbC%Cq%2tFAiR zfYa)kXB%<3^btP@RLg7dE7j{K*YFyorMy(s^p?injDW8q;455{1YhC8ANUII#8=3G zudaq$hHHnl;%dH-v{6EsPKOj_`@{@BRSHx4Bna0D`*fT6!3SjRG*i}=nAMZ{WK{2; z@ZE1ugmlH-hl%^NN&Cb^KEbao$N$Xom;RbuPNywD%kE)oE9bC9dA5Qa7A$n+ISPx% zD-&5$j>FB=LR(=`0mEOQ*low7smSB;u{HKQyRE>^g6=F^p`9(w&vq$gtPFoLp_lku zvLK~U0wfY;X?~%{l~t5k=y2sTpU=g^M-1T!ncq8}J>ksLPvJFyCXh zW#-s2^6cZ4WF;G+Fh~9fTb?6pJVS+l-UubsvZeur1%ylw;2v?#Lg;6hezl^OZ16*v6)@5@vV03yY~AWsxJ#4u}HB zC_A%zJT42tB9l0df`TISxRf4jq@ys0x*o4I5z*JIT+UL#N@YpDtB_^c3+kJEsSuzLzX z`~qe}pY|(?YeQ+QC|@DMK49ym*CISTTp7P3s2(`_qsU=b2?quP|#pt)-# zHEwkku>$Z{9vf-PF9fyGIKR-5A18|(48*Quqgz*uRa#eo{0?`4y|94g*hbh{hTWc@ zpo_%bB3(AkmC3sA&FTY|7c5X0)5m_u3Ru@@Au3>Q{-)yiZ2 zv@({ZNE#_QP0^GplCV!Ng^0E1Ef#=TqJ$^JE#$kA1*xhNt!A52{q2{nz=*=}+vtf3QcXZ*(bleaD7b zD9YQJin0aOm<#<;EA(^mL)QKmCNH*~Xgk^VcH0MSpSNYM%UxHnZuGkG>y$iOW>#ia zmVFozPX0|@*S@YM`qOoe9kevswFMxOQ zBW;B)PjSLdph2t_5W|*kiz^H0(F>YcW`V>lt(kOrs1{8c@|nv`GTWBN$o!E8N!mb? zP|`9=9jXB;A<+F!zOkrs#cwqjIAddx2r5P_rLFUqQXRIZ^0M@a& zY6<_$bgi)3@YP_6+VjbAl|#pg34h?SMr%Q#-3@&R6^$o(vL4f0Mz4iT$tf&!7tAX! z&z8;&c~u@)URhCr-QybuhqEZd=WvyKE9aC+Q-o9|1H;(!&^p5f&&mNlfi?t-pvK}s z$(Q8NV7cXlMx||L znW`&N++67|npO_He*&bf=tg7w#W!Rr`BLPTnt-LuKFlY*RPdVBDh`^~3eGJMvDCe_ zDJ=MegU?uqprpAV9eIn(Eou;#Sxw>=F@}i0rjSjtqaz=C9%g8KkhsN)@JZs8+5p5f zX=H|&Tuwb`x_mTs8Ub!g!jmJwBx@(3X+fB2d&RA*OM#j6H2cqzs~v~3yeH`oi<(s=Jy4TARtqWjWCLctn%nCFP+65=oJ;Q$a`zH@1!C}m&;@M5 zq)aR*#;$O}V1`9V?TG&=P+~Jf0`SP=fg_*Na8Vf}=hAM^0%_98Ob!?EyiW-tyyYn@ z%Eu1LE4KX7crAIyG-!%^G`ENJc%__|fdnZ;?bwX)b!j*n%!)`cmq&WSPy<=!7EEFc z(NySCXw?$~#)XxsPvlm#VX~gAA_ulcmVJaH(_X5ePg`E0-2rexHe~bUCpxG7+1EPK}46$i}#^d8O4nv1t_u@s-P0`C9@l{#Mq!RBc+h zVns_+AY}}>rD(QhXv>TrjYq>kysXTXooxjM*+>_~QAfHwpr!=LF9n(65h>!Fq+c$l zn(y*B32`3@7AyQ_$-o5Btyq{D^|Dp~!9@pRn<k84RqDTJf<|K{KS24vGL0RR91 literal 21904 zcmeHvd3;nw_V2yv+$5c)J9ZLiK(N4JNq~?92oYHVAwW8p3kd;5y0KZJLV^W=T;*pBqbzD+wyYqb0tYKBq|xPRL1ug^t^t*k1S0fX?Fi}FWTfC z=O_7sw)2yHfyutMiN0V$V3MzGf-hvNmi<;!qS+LTsg*X>NDqC{{zWjR{k)$Hao5Tu z&s`fwCc8z8QF*2+}Bu4GmYsqtHxOyLmuvHJZx1{ z&FW!Vh29%TZC`S@FG=V}F7HPs_XCz$RKxQn(!eV@G#AgqWYwjHr0@3x_Ip|rcG}c) zy*bCPHg2cS8gu9$4F`Rm*!z?0{>HDYmQ>M#L9L!ZtEV*ygMz&QfXO(iGMU<+W$M51 zu`K;TpYau)1w5MZsYTT4{-7xE3ty`gObk5eYn6jG^~v5*4KZkVv^Tm!Hg%-vuvPPt zF;!n!YUJqNQu1p|K%ZqXlF1T)D40|c}61D?PElckULx+Cy_uOucEW5^{k7H(6YPXhl|YP6LeAe68Py6$5W z_07J3?n~JWxmJJC%NWqM*|*cCuI&{}G^94&EH~xUkV^+`{3MWDLox?#{A(bOf7gAo z@vJcjbWHz`mltM(Kf(rZW*#^*ABcrKff;+T^^*pLSz!uPoM43d-&he}&ef0s{h%js z&|G^cO^6d;f1J7ghQO*h;qs2XQZW9M6tby%(k>1X0ti^LPJq}=Ec9GpldmLP`E#vw ziVN@JH0Ug38M7r?a9?patI}YBm88|m>|8LO{TXQ8P7W?x;0HOlRSAPjPJkZ_CGC|s zB_Q^UBWecyEl&?qv^i>}z*`;wKkmRd{w0P!E{0lk>u-ypRxLc;FZs~7`OsU^|GR=>n=p(ipdDs?@P;*XAg1G=l*WJ)HQ+H!cP2I1*;|aXu3C5C!L4LAlP*2id zW+AH>(DaT+i2aeUX4E8-V}rsK*z%FQ1V&z)y~lpAN^otG@nrJ z93o>vN!@}Wzf6XC<^qw-z7k(Tq;5?XB6Vvr-+xQH^dp`q{c5O{g zl->|AP7$LNHej~^+O*@H0$K$D<^E7ir@!tAoG#Vx(SS(5R|~x9q30T3_cVW6Mi(}J zRz|(epO;Zz^A}}wks;I9Nz+f*I%U0bmvT2&|B=(kjqDfDVSU@MJ}=g%nClabO>cTQ z%EWTLO>Isp*AJ`B$>sVHwK=6+52|F>P z6J+|5q0qy%spR|2h!U=_NT>+AC6khWfs)yvBrZaU{%gKI{iJGAL-Rlk9SvIO7?488 zl0I4NZ#0knosMST(J|~FbS%qLMk`~Ku|cY~c+L5)zFg`!N;gv|o$(#q^Gvwsc;S`c zPW4-~z-FJmS|h8n*;@Umhux_kgTc^`d-M~Yz)?@iF;B{IPs#~T&}F1xbO}Z$nm!Gv zx1q(0mV`)4Uo2;)sq7o+?I`}#D7WUX$qU?~(a()v&{xp@D)~N-y#j-5XRqREQ&&2T z%@%psRUU(Db!z(>uUR%c-U{}* z(k;b~LPwk&<)LeArs~~y?fMozfI(P_b7mMd3zvDrJ+<4H_98=ah4=mc5 z!HvQ}%P1V;VFZiud4Pu-h{GOk zAP#W@v9D(XA$2zp1ADP`nH}_RY<=cr`ge9$rbNGEcjNgF_BZA4%6G~?LWp)UfRC-) znpn=(Z%ry^cWq5BXLoN+DK|#Z5(IJFp-nRGpp!}FXeP~sd`L|jUPj=zsUd*x%t4!W zET__gYc#+&1O7Q;;6dn~gbt(4+28 zikdUBDf<6tQyz{$TUNX4Y?kkUeDpNc1ChZ$v|=-W?~2z_C60F%M0`d>I(a-h#cDB? zmAA}mJm5JQQx=Rnf54+2N<@GU-$mbXSJh(M%Bm!5<}!h(SyY~T>5;PLUzKr9Uosl=MERK*%V0j{2&u{l>H-+osQBx+n5S!JZ0GcyRZT3lZi$LI5NG{KB6ULwOn+_Rc*-l?1he!L3(8wn5#tx-JZ}R#LCo1&CO^NtZUKA~o9zeUK|H-4j>nR|i zj?M3S9{iIhfcpEMz`Gv(J&*r$oWX7C&)iLqdpAGkJ=EacId}{5063i|?%0ypu*to4 zkC%>be%6a^x{{68pYgIQ_1#{7puwwdasxRI_yDi%q zSfVfEv|fhqxkeGagA|VyO)*`YVlIS=Zb~o*hMN+AE3Io&8k+iaZR&%j%eppQhNi(? zn+Bt4c-N-kXv*!{l#8ZuU7NrOL;4;FVX^q-%0{pd#epc$Ek=ZKo`Crk5b0l7Y(X4hQWb!_LD`hvP_ z42#-)gCGg<*VY_lr?@6!XU?*-t%cP}`(M>}`_{MB{S^>X$%_2;w)V5?XMK%idMmj- z-}s20!6C05Az%e)noWM0?>CYW_=ze@%b1d>Y8mgufZr?Y{{ zB*I23KtTHuwWuGspkG=FHt79J*-QEZzPgv1m(CG1*IZH?YqHc#tR!3WR}5e;K|f~A zp;gV=9QcE*-D9JVM03)WkTw*{46WzWSOlUL9{u3^t6;B!9WW9Lol~t7P5>VD#dNemuhvKZH6YQ1fJ4V3n4r|Gd<_a+T(;8n&ZG zhNJ`kOEG1zAUqB@5>~UCRAhG0#iQ@th`!4RFYQ68zbHK$T3|?6Q{&G|jk~rcmKmj6 zlgf;HxAx_wer0^3MEY(6U_LF|`dQi5&&#%cQHCH1jEE^akLke(2?s>Jo*`II0uG6M zJ;T&T25_9WMR4BP1*eG-Xg@165`Yz@FUr&dm+>(xB4cj3=$P1UV-`ooTz}CqF;QcT z`z>*;?JK-Q4KWSb< z^~MA<#0l8h{(0T!CJzOJ0xPvpypcVV{3c8xmgu0WH-<$Wcfr^ zRMJsU`8<8TRZ5M;BA;h_gO@VYAmMinV)JM|n@`8F=V>|iZZ6q45lzpc>5s@&u)U$a z0u;vgLO{M_5c|Ljno9)!U7BYZw)9|slo5o`<|G5bE=_mTP%vgO>y)J!yO%n@!| zcnGnNhYU)1(03ZwXxvS64{xNoD_1lKAIDZC z(p{(_7Oz~vL-B7!DE@8OP8e<2W*$OR45;VvI5+c__cfEl7rJ81`D2}Ar!BAB)trb# zbaPT!H&(=TjSf0Tuy4S)Z@WRKToihe(ALSq2~Wbv$=ya;@xjs3#$&<>13bw%uAeS7 zO7%0Pes@)l{(h`Z4`EbK^(_6Xww_h`sW+{+`9@Oza=BojW7eHnqi zP@DMp-F&=hesrp_ar#CrKoRW(;{zLc&@(S=s0jTtsJfmm$Fm7m=t+EkLf6st_`VCD zyV>0>i>k-Mncdams~!nww!Xz%Js8exUCYAi{y<7gfs(40af%w*qmhcr(Ef;JMj4lN z@DA(Y8}5QT%N^a;qoHe6GcfA%-oaz zk(nz-x+ln{Bi(b9&B&DKF*Xy=<1DBgRgNjg5k#G1pHPW4!4W)3@8ryVjWf3e8}T&U zvFQrvH?ZyBvTu}cVVtna<*gfFJg>**I@|wT_vf(j#GbO(qiknWb(<{hFC?g3{%LHj0X04t_T*>t*$&7hTRCcVxbXj3bfBJ~|O ztX3{V@;h)ut*k`)I}lVWuR{VHV<#DEXU@D+ZchXKmo!9gq$^Qch0jg+lt6}Y0Hz)L{9^`*f+tg`KhTAc=hm$e;Ms}u1uZ)sbbia@OXLskM0;Gt94QgCA#cu@&XTt{aD zK@<4>Bw0O)g#>%Q6zn}+cRI{oOwE?G#$ch}WU|F##ouHa6NRHLQR!P5^7zK|N~LF<;Fi}BXva2q&+{(>`$ z>0%@1%o4hU-RQ1dOmAc>E0@rfY!z^>VmIM=Q%^yH6NW<-_PP6e1>o)B{XxG7eEo+4 zf(M2FPD4tdA)bqA$k+%*aD6biJ_KAJ3a)q4X)_6jHH4!C^|E0`mf)}YzlNE<^6Vtj zR~`o*ebG9aXE7jdfU+D&9l*>rb-XkitE53VLZVfa!FMr89ua zlEhR~5|^~5LfqsLmbl3y>QB@iLIj!#R9U#)!FF?j+RgSuZGdsAt9`j`0 z&DHg|CsX3;dV+rkRj6~yVKwE5ni5olaqT9vI=vm(lhJ?J;;u?y{%Tygl#$2_Lf>b8MftU z+nZ{2K5R>{?G3ehWcyd_HKiqFXJ56(?zE})5$td7%GZ$V|9fQ%a{b>`@m&8u@cf7B z8gBNzC;HwOeIJOvQ#~p0BM~a=PyT3y+zo}?b1{W%j9}#J9?aK0gs*!jUw1d9496e4 zBV*Wm*wXj0r5|8RPyNU(jnZm}|I>)Co}o9eAdJ{in6P6oV8`iA`mbXxsEv7c-j4ight5hOUDHzAYAvt{gQt{hLZXJBogakC&QL3R|C zqwE;U$JlW^kGCIG|7(O8HPFnly#}Y;qK?Wo-mzAUH(pb9pJx10U!)ni`n8%N>3*%r zr!_9p0@rH4_iH?|_Gzq8?M=yvWUxZ{Gc*HS-SK(9gR2^hvklQwo|+iFet-?eSGXd)4U zYc0r~AUlA#^leXTV)bnE>qJk~aaV+(n4h@TLZ0vJF3&yEDeg|;#LOn*<>~}+Z|(kE zqhr=eZO2(~rAjk4=r?GaS8&eWs5Mn-jW=k4725A_6l}dwGdcIOaE=UdZ)U3;N-JPb zoJ*iju*P!|Z9MShKtGT6!(YJ;uzRM7E{N!ui2o+&2p=Whes2UoK|`R%;fEE`a` z>$Tr67mQu5wNJo^iE4JvMQ-h^i;!492l8{#eBlq}752?h2amcy_JcNc;HZntIe^78t%={~71aAH18gvNC18-n%KWM#Ag22jBB-(d)eY z`YrPsIfGyH;BUu^w`#iKHTDjEF$>_fhGx`vU`Rvr9h&}xw|T9mH+lmbw2}?x&8!{9 zFkEPgO*|0%XTdpHf7~1RSybPE=)MMTpw5doegWpi^tcq&fLDht9Xn+|(Bty&);*k< zt?LO5&Bmz$uLlUQs4h zQ;@a+=+>QhRfu_UqX6^XtA(!-hp!Gd?eOAw&u>&;wIsWv;LKdTUSnkiXI|Ft)9UBey-ez- z*yBjAsk|(9C{VAp#_Y7I#rbS*U-|-jq2&(LhUeG6U;^7XFv=$IeE_a5VlVfl<*dA= zta@(!+y;&^*+g01iLyGOeJ-2Zaz}M9OjXWd?9nj(aH|sC+CEp^H#Xdp7~NBUhlxZq zqAVtAFIWFCHcY5M6ehI&1$FIMHkZDj-ZK{Z)7;(+)p-sZ#q<8iHmYhq-s<}Cs#d($ zn<^Up^|vCSx)W!BUF5o{s9Zu{uZh8{YCoIJb-jXq4P0mR%^EIw-K>${O?9&~RWj0t z?Nt&Ih*3cK94IaflnjFZ0@nC*?Y{3D@7M0@0Da%{0d{LZ;O81f)MJfsdo=v4uR z5%lWF9Kd`P$DCw>wO<8>Uf7##_SVk^v;IQ3-M;s z%+R{4zD1xnt;$2EaUNr*_?xIAZv4(XRMcLC*`~Fh!Lwcc=Q#EbGL-mKWzb#q?;19` z6S#RI^Bwwn{k!ItZE{zU1~}=5`}$8MhAumm8p=AA5E^?bCRB*s%k>#9J4}OKjM6JI&vZ$2h3%B`sNqIr3XFL-BY6T&C_RU_}s=Y2Zn* zHLzAzzb=638i0ukF%joh9TYGm@85J^N5Pp6`hu0!eu2FNcY_+-OvM%KS%~EyA(St4 zX0=}qDKp6fS1e~Qg~EXAy8`Bj^f#ue!c;sM^W*IpTbL=~ZlD*>(ae`wfct@qP#)`M zd3du`%tqrmosEIC%wS{joLRGjtSaKYJ4A0*x88Z^Wed^eMTZZA7SWk?E70g?GwP=! znYo#24yt8uw4O~HHDs2G*mOFL6(Pw6F+q|IWghc$nb}LHZImG>MgGA3KKeDyH@G(D z+a<7IoP7hzUng?WmFm9Uy1}>g9^cmcd^quaiBnT3uvw!Y^36MKjHr>0ehKDPUTK62 z>~zq+>&vt4FO!_Gp{@NB`-so%I;6o)IMD)cxbze8% z!|Mv(UERZL_wkw?z3!?QP=J};RfW)I!zZ*Es;WQ06;37VPKPHDTn?Gt?2=+ zag#<~>;R$-KK-{Ekn6wGfK=b25u=Fg?SLddsF7zo@D${bJw<^!Ern?zmpMq+$g6;& z`E;EB{QW*ZR@Vni;j44AFQN3ik*<>Hp7zt~ug7C)yXk&oTFd^>6^4rEXrlp{gu3MPq?sw7ut7&WqZi)rm>tIU8YbUxsts`pK8Eb=$}B+8})x8 z`#R_wD87j$&^POz;tbsgmLbb2(baT~A4kb2a9ZRC4piCG$}`xk(-T-@YfQBxWK)k# zU{By3tXZG|gwqDj5j#jqF-H6s$NFCatMT#`0oXlHr735l8TrPWFa%~gwhC# z22HT293Tu zYOHJSO!DZ&?uAL+3zNF{A|~||T@5R_2Il!z^`8@Qg~hDKnAP{Y z_P%9R6X>llKcz4~DrT>sv)QfOrp|^u{mBsnaGK zA6nG}v&!GO@ZKb|+Q+IAdK>sS3w+eLb(_O(<7~ul7bxFruvpQDyd#yy*P zxMwq;R1}-nM&P&_CnJB9gZxo0%K-y(SS}cdGG`zvU|=qLFH^!5iTCmJvJc=}eC!m; zi`;CXxI5t$cPC&V(Xj~6MM!~&yA$v6QG5&^f#w|1Otu#L*^NN3j;+LVJzE8ocd?sL zzI&r&AX875;aQ2#b?iDA3x1KK65sqH$1>OvevxA->ayR>)(HyM3kvw#5}$ZmvIt32 zLBWmiU@PIlR>6ba1gD4lGYzDvxcx@FH(81F=qhaSP3C=*_N8cBhPFzyU8gQBggXC5 zBd0s?6#l#(fdM_P?ONev??jX{UjrHCaQMvp@RDQy)po7T!#qGn@5mOKW z<3JUG3m-|?2pmJ$$f(~n;!b4LVT2z#LOgU14~YILB<98sAp@6hZ@oE`+qx>0)w(h? zqIG>}cxxfbzEEcCiqNpuHKC!ct3yLtZwU=D7-0U}2`Hhu+ zW4+%f^c%2vEBwY9zp>hH+!8sk*6+f*fT=Y$99U8ODT=ZD3f``LJK4_QN8$`CekJN} zx=Cw9;D5WjHaUFQHP(rKG_&M2c5CPG? zUwwIMO-he5#PKPu8J=QKwfv>pb-@gNV~L69DRp2`t;EJfBFx0<1k-*N`p>e=f;0I@ z4P~7fN3+x!MZ)q;-Z&|4(vZpgQ$HD&ZvrgeL^c76i+dPQT$H)uq5{R8xKZ8$shr?% z`kfZ|t=5PbUJ-+qI@gwZ?5c zuHgZUQ?KEk?lG;YM)_Dt%Ne|a5wB<7;?Ddn=trN%dhQG{@DJPpvQ`{* z*a4h#{Om;VN@GOJq2So|6YM0vPlc2S$X{Y?#oIRxuMr=|+aC=#v_C6E({2>aIEA+2 zve*H3sP5#}$F=s8nDcGSPv548)PDSEvb%L;Fu7LVLh-}d8d-f>ME)o@peLs~0naO{ zGeT+54}KY};7ks#bxUV*X|A8;B+^MNH;W1$yID@Y1oumNVB(O7Pe#uKlejgN+2yBRsw0kn^8y$%3NCbYtp^c z!z2C@EY^eHrNTsqjRw1%TbZB0%51Tx!ekh-c_}*D`Y5B&Q9tMa8w7^JrszM}zHyN1 zoG$&_zanQ!itLD0T;%H9d@?;*PD>#3((TFi^gaWn%Slm!J(bK&m(w%S2>vSiq$>C- z%5b@|Nx71&$Y~0hml`XlE2P8`=afd0k@yo2UI>>u8=@KoK;$8nIMQ9t*bG~`-RU6N z+1V1G(EO8fvhh#SoMfugnV#&FLGM6m?yMp*&*4&JTY?;utPGSoJ4r8z*d4v(WP9vD zf(~_jFKK>p`4lv!rOV05O6&+SyObjYlI*D^n!v^jB;DyG$+9aR_(t&F@lsKOVoS0+ z;)%q`BEzyX2^K7qVI-3%DXHmwI38)bJy`)nn!T?=6qm~h0_T|gvGMUFJwf5LAhAli zVoO(I33fY-Ck`~H5y2+xU@XQt9qD#Qm?Dc*XB=Sa1*5e7lB18d zKyqkOk?gQ3oVC&dXNEa(8YD!_>2RilvBV}o1S>4uoT1Vjmy(u7Vw_;YoY_|umyaqh zo?Bc&VlvXxosKjDap24oOo(yHF3@R?hypgHflp&12FyH@(VXXTG8QV9my#;G_*RBD zGEGiVMv!4y*iw63oZ?a(>DhccE%IE-B^h=XmK5o>DQN>G5-0RTY%{8}O9x67pwJqW zAY(C{<>qq5%oZ`zK}d#68A!k)m${-8xeuU8jLU9I;xtysNeYokoD=*4=hGAHX(Y|& z0={fA1zVSvkdaPeoxL3-)!7?r%QeNqE@Ucg1nCn&jM(mAa~D*$AYmSMxPu#jO= zCb5JTYK5(qT}oU=a&jNB0WnIl6aRMs=Cfd8?P)fr!+|Z1nljGiOtDBy106O+jL3{y zac_HaGQpNB>7wh0OcdWd{%0z$D0K(tYC$APKuTmvMTOnb2kI}GLnJbN&WtGnNAv^T zrU><$J7-E!aepD4VcF*^GD@6F}0e9Elx5}7b^61OGeC1LC%$}kef?2-&Q83Yf{GzFYn z$zcQ0&dphN7kIM*YrvTmw&4;g;;##+HEnoSJ_7VbYmh)9m=JzcI0@{u3r3@h)f@rA zj}k?>(^o+KT(G0iJej1roNxyzCI-H~Fp`*v^8knXN&QKb84+gDv^&xE21?iyA(nNq zHXUAtm^v74h_ky=dP8}{VmUue4UOey;sQGPGJ46dyBDEU>=RfmaeE+A_&!8VPv`C`jikH!h{>GRE`<3br;}u-4U~Wb;hpII zec9x@I|`)@k|awp-TVH-dQNWM=rLpS#}!;5$Jk<(xDACQH6b>pFkx9@DrPE_h?FWN zNU@ku?pj4}suWX*&eWl2ZOf!Y33WM@)3E`cLVO55ydeRfSbR9q^8d|l;4j37&xd&k zzA)_ud~qr;dm+Afr*zGyk?tMM!9g|vW1T> z+`EvsU*?_d4b$-dzyD_((3}oMnww-#m8Mx?U?i#yd!tVGVTBVBi)Phh&0tk3=H5WM zN=ddkQ@C{zc1Q$gR!jkdlRS`A@W2J8INl|vz(T?0hr1ILDI7!c*se2L5y71>#NlT6 zDWbSjWk(vfN!;(b?6L7mHkJXeD4Z_Zx&2D#CllC5Go($0*ur9l(afDzgrOs(uv1Kr z1hFP%h`&tYFocI(X0SOPr{4GXnu*S0)gNbRofo z5WSb|NarDe2(`s5sPxQtLW&(}h+xfK^W>7mjFeQx1-FYf>^91X78M6Skcp|o%#0ju zdI&7j(v?)WHF#Ql^AnoOJOu)4I*}66(^J#Nj~W#x4j>3PaZF4enUSWrvg2`X%81Ff zJ4d;5^GAx1f_pv!fl-n%I>w39j~#LXrv?#0k0pabF8QGY+btFx7RV7&MjH2xaQghn zYmIgC1%j0}XR;_FB2QIp_BcD%D57G7RU;8!ay7HUObtho@R4f-f^cF6D>&71K(30Z z7>vKLLXP0)old|JM2XMlRW1V7s4!@kQN0uw2(i4jr4$x?=f-zXucuD457k7QcqweKTZ6xVzr}t2u{y>!jEJTUBNNPJU#Lg3>QNl+I8B*v_8;^6vVvB{EtWH>t_ZR1MMa6m(n`&ehka4$c>@=2rY zqp2R^R4VMeIP44au0R=a9_7>V$*fEZak|856>cEbRKZS)VVcsN65sX6gkfW4`V*mw zG8XHK&9FlkVwGNYn=(QIPB}SUae-)iFObdWbGmpEOUC@YJJE>~Q-$I#MjiqXl5C#2 z;ki;W97u7II7G}su?1JTbX~|;u{|(v{H*N2Gm^34lnX*R`JjngP4isCjhx*91Cx!U z6w(^uHF6`u%VEP$QZmxIus7WquK>U`Lc)^dUQT-~&eCaVc9>JX^{|091n|PonI{aG z4W2pRlt+Zd3jeXM$ZaSQdu`@q`1CfX%f(Oapj)^ZP8Nt42TrczaNOM;DEGZsjAD~v zdCjT9o5m0Fk(`IAGVry09vt$;DGtKU6Aad&6d8)xZth#+xF8r|SthV*!sSQubrCn# znFiwi*&1i%1WB*F?40qPj4-{soRRKKfuz`w_=A%P=TErP?LIu$8Xl2i307_PtT}3N zMX|boOe>jNG+Wb(iz=e#5HiMBYvyCjq{l!EtO&P_bjHP5*(}oA=@^=hrz^< 0x1E00 | Display SMC.BIN file size issue and don't flash. Ask the user to place a correct SMC.BIN file onto the SDcard. | Issue +SF-4 | SMC.BIN and all ok | Display the SMC.BIN file version and set SMC to Flash. | Flash + +## VA - Additional Validations before Flashing + +ID | Test Case | Action Description | Error Level +--- | --- | --- | --- +VA-1 | Version of SMC and SMC.BIN equal | Display that the SMC and SMC.BIN versions are equal and no flashing is required. Set SMC to Skip. | None +VA-2 | SMC.BIN does not support ROM.BIN release | Display warning that SMC.BIN does not support the ROM.BIN release. Ask for user confirmation to continue flashing Y/N. If the users selects not to flash, set both the SMC and the ROM as an Issue and don't flash. | Issue +VA-3 | SMC.BIN and CX16 ROM not Detected | Display issue and don't flash. Ask to close the J1 jumper pins on the CX16 main board. | Issue +VA-4 | SMC is Flash and CX16 is not Flash | Display CX16 ROM update issue and don't flash. | Issue +VA-5 | SMC is not Flash and CX16 is Flash | Display SMC update issue and don't flash. | Issue +VA-99 | One of the components is Flash | Request to continue with flashing from the user Y/N. | None + +## SF - Flash SMC, when SMC is Flash and CX16 ROM is Flash + +ID | Test Case | Action Description | Error Level +--- | --- | --- | --- +SF-1 | POWER/RESET pressed | Read the SMC.BIN again. Set SMC bootloader to wait, and ask POWER/RESET buttons to be pressed simultaneously. When user presses buttons, flash SMC and set SMC to Flashing. When finished, set SMC to Flashed. | None +SF-2 | no action on POWER/RESET press request | Read the SMC.BIN again. Set SMC bootloader to wait, and ask POWER/RESET buttons to be pressed simultaneously. When user does not press the POWER/RESET buttons, exit the process, reset the bootloader. Display warning that POWER/RESET was not flashed in time, and set SMC to Issue. | Issue +SF-3 | errors during flash | Read the SMC.BIN again. Set SMC bootloader to wait, and ask POWER/RESET buttons to be pressed simultaneously. When user presses buttons, flash SMC. When the flash returns with 0xFFFFFFFF, set SMC to Error. | Error + +## RF - Flash ROM(s) when ROM(s) is Flash + +ID | Test Case | Action Description | Error Level +--- | --- | --- | --- +RF-1 | ROM and ROM.BIN equal | Display that there are no differences between the ROM and ROM.BIN. Set ROM to Flashed. | None +RF-2 | Flash ROM resulting in errors | Display ROM differences. Flash the ROM and set ROM to Flashing. When the ROM flash results with errors, display Flash errors and set ROM to Error | Error +RF-3 | Flash ROM and all ok | Display ROM differences. Flash the ROM and set ROM to Flashing. When the ROM flash is ok, set ROM to Flashed | None + +## DE - Debrief update results and reset actions + +ID | Test Case | Action Description | Error Level +--- | --- | --- | --- +DE-1 | All components skipped | Display the update has been cancelled. Reset the CX16. | None +DE-2 | There is an Error with one of the components | Display the update has resulted in an error, and explain the severity of the result. Ask the user to take a digital picture of the CX16 display. Set border to red and go in endless loop. | Error +DE-3 | There is an Issue with one of the components | Display the issue, which could be due to Detection results, File Checking results, Validation results, Flashing results. Set border to yellow and reset the system automatically. +DE-4 | The components correctly updated, SMC bootloader 1 | Display success, set border to Green. Display message that power must be shut down and manual restart of the CX16 is required. | None +DE-5 | The components correctly updated, SMC bootloader 2 | Display success, set border to Green. Shut down CX16 automatically. | None +DE-6 | Wait until reset | In the cases where the debrief does not result in a hang or an endless loop, the CX16 will reset after the wait time. | None +