text
stringlengths
1
1.05M
/* * This file belongs to the Galois project, a C++ library for exploiting parallelism. * The code is being released under the terms of the 3-Clause BSD License (a * copy is located in LICENSE.txt at the top-level directory). * * Copyright (C) 2018, The University of Texas at Austin. All rights reserved. * UNIVERSITY EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES CONCERNING THIS * SOFTWARE AND DOCUMENTATION, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR ANY PARTICULAR PURPOSE, NON-INFRINGEMENT AND WARRANTIES OF * PERFORMANCE, AND ANY WARRANTY THAT MIGHT OTHERWISE ARISE FROM COURSE OF * DEALING OR USAGE OF TRADE. NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH * RESPECT TO THE USE OF THE SOFTWARE OR DOCUMENTATION. Under no circumstances * shall University be liable for incidental, special, indirect, direct or * consequential damages or loss of profits, interruption of business, or * related expenses which may arise from use of Software or Documentation, * including but not limited to those resulting from defects in Software and/or * Documentation, or loss or inaccuracy of data of any kind. */ #include <iostream> #include <random> #include <cmath> #include <algorithm> #include <utility> #include <unordered_map> #include <map> #include <atomic> #include <vector> #include "galois/Galois.h" #include "galois/Graph/Graph.h" #include "galois/Graph/LCGraph.h" #include "galois/ParallelSTL/ParallelSTL.h" #include "llvm//Support/CommandLine.h" #include "Lonestar/BoilerPlate.h" #include "galois/runtime/Network.h" #include "galois/Timer.h" #include "galois/Timer.h" #include "galois/Graph/FileGraph.h" // Distributed Galois #include "galois/graphs/Graph3.h" #include "galois/runtime/DistSupport.h" #include <boost/iterator/transform_iterator.hpp> #define LATENT_VECTOR_SIZE 2 typedef struct Node { // double* latent_vector; //latent vector to be learned double latent_vector[LATENT_VECTOR_SIZE]; // latent vector to be learned unsigned int updates; // number of updates made to this node (only used by movie nodes) unsigned int edge_offset; // if a movie's update is interrupted, where to // start when resuming unsigned int ID; bool operator==(const Node& other) const { return (ID == other.ID); } bool operator<(const Node& other) const { return (ID < other.ID); } } Node; using std::cout; using std::endl; namespace std { template <> struct hash<Node> { std::size_t operator()(const Node& other) const { using std::hash; using std::size_t; return (hash<unsigned int>()(other.ID)); } }; } // namespace std // local computation graph (can't add nodes/edges at runtime) // node data is Node, edge data is unsigned int... [movie--->user] // typedef galois::graphs::LC_Numa_Graph<Node, unsigned int> Graph; // typedef Graph::GraphNode GNode; /*typedef galois::graphs::FileGraph Graph; typedef uint64_t GNode; Graph File_graph; */ // Distributed Graph Nodes. typedef galois::graphs::ThirdGraph<Node, unsigned int, galois::graphs::EdgeDirection::Out> DGraph; typedef DGraph::NodeHandle DGNode; typedef typename DGraph::pointer Graphp; // typedef galois::graphs::FileGraph FGraph; // typedef galois::graphs::FileGraph::GraphNode FileGNode; typedef galois::graphs::LC_CSR_Graph<Node, unsigned int> Graph; typedef Graph::GraphNode GNode; Graph graph; // TODO : replace maps with unordered_map std::unordered_map<GNode, Node> lookup; std::unordered_map<GNode, DGNode> mapping; std::unordered_map<Node, DGNode> llookup; std::unordered_map<Node, DGNode> rlookup; std::set<Node> requested; volatile unsigned prog_barrier = 0; // std::atomic<unsigned> prog_barrier; unsigned int num_movie_nodes = 0; using namespace galois::runtime; typedef galois::runtime::LL::SimpleLock<true> SLock; SLock slock; SLock pblock; // unsigned int LATENT_VECTOR_SIZE = 2; double LEARNING_RATE = 0.001; double DECAY_RATE = 0.9; double LAMBDA = 0.001; unsigned int MAX_MOVIE_UPDATES = 1; unsigned int NUM_RATINGS = 0; static const double MINVAL = -1e+100; static const double MAXVAL = 1e+100; double vector_dot(const Node& movie_data, const Node& user_data) { const double* __restrict__ movie_latent = movie_data.latent_vector; const double* __restrict__ user_latent = user_data.latent_vector; double dp = 0.0; for (int i = 0; i < LATENT_VECTOR_SIZE; ++i) dp += user_latent[i] * movie_latent[i]; // dp += user_data.latent_vector[i] * movie_data.latent_vector[i]; assert(std::isnormal(dp)); return dp; } double calcPrediction(const Node& movie_data, const Node& user_data) { double pred = vector_dot(movie_data, user_data); pred = std::min(MAXVAL, pred); pred = std::max(MINVAL, pred); return pred; } inline void doGradientUpdate(Node& movie_data, Node& user_data, unsigned int edge_rating) { double* __restrict__ movie_latent = movie_data.latent_vector; double step_size = LEARNING_RATE * 1.5 / (1.0 + DECAY_RATE * pow(movie_data.updates + 1, 1.5)); double* __restrict__ user_latent = user_data.latent_vector; double cur_error = edge_rating - vector_dot(movie_data, user_data); for (unsigned int i = 0; i < LATENT_VECTOR_SIZE; i++) { double prev_movie_val = movie_latent[i]; double prev_user_val = user_latent[i]; movie_latent[i] += step_size * (cur_error * prev_user_val - LAMBDA * prev_movie_val); user_latent[i] += step_size * (cur_error * prev_movie_val - LAMBDA * prev_user_val); } } /* inline void doGradientUpdate(Node& movie_data, Node& user_data, unsigned int edge_rating) { double step_size = LEARNING_RATE * 1.5 / (1.0 + DECAY_RATE * pow(movie_data.updates + 1, 1.5)); double* __restrict__ movie_latent = movie_data.latent_vector; double* __restrict__ user_latent = user_data.latent_vector; //calculate error double cur_error = - edge_rating; for(unsigned int i = 0; i < LATENT_VECTOR_SIZE; i++) { cur_error += user_latent[i] * movie_latent[i]; } //This is a gradient step for(unsigned int i = 0; i < LATENT_VECTOR_SIZE; i++) { double prev_movie_val = movie_latent[i]; movie_latent[i] -= step_size * (cur_error * user_latent[i] + LAMBDA * prev_movie_val); user_latent[i] -= step_size * (cur_error * prev_movie_val + LAMBDA * user_latent[i]); } } */ static void progBarrier_landing_pad(RecvBuffer& buf) { gDeserialize(buf, prog_barrier); ++prog_barrier; } static void program_barrier() { SendBuffer b; gSerialize(b, prog_barrier); getSystemNetworkInterface().broadcast(progBarrier_landing_pad, b); // unsigned old_val = prog_barrier; // unsigned new_val = ++prog_barrier; prog_barrier++; // prog_barrier.compare_exchange_strong(old_val,new_val); printf("Entering barrier..%d\n", prog_barrier); do { // std::cout << "inside do loop\n"; getSystemLocalDirectory().makeProgress(); getSystemRemoteDirectory().makeProgress(); getSystemNetworkInterface().handleReceives(); } while (prog_barrier != networkHostNum); prog_barrier = 0; printf("Left barrier..\n"); } galois::GAccumulator<double> RMS; galois::GAccumulator<unsigned> count_data; void verify() { typedef galois::GAccumulator<double> AccumDouble; AccumDouble rms; cout << "Host:" << networkHostID << " is verifying before SGD..\n"; // galois::do_all(graph.begin(), graph.begin()+num_movie_nodes, [&] (GNode n) // { for (auto ni = graph.begin(), ei = graph.begin() + num_movie_nodes; ni != ei; ++ni) { for (auto ii = graph.edge_begin(*ni); ii != graph.edge_end(*ni); ++ii) { GNode m = graph.getEdgeDst(ii); double pred = calcPrediction(graph.getData(*ni), graph.getData(m)); double rating = graph.getEdgeData(ii); if (!std::isnormal(pred)) std::cout << "Denormal Warning\n"; rms += ((pred - rating) * (pred - rating)); } } cout << "Reached end..\n" << endl; double total_rms = rms.reduce(); double normalized_rms = sqrt(total_rms / NUM_RATINGS); std::cout << "RMSE Total: " << total_rms << " Normalized: " << normalized_rms << std::endl; } void verify(Graphp g) { typedef galois::GAccumulator<double> AccumDouble; AccumDouble rms; cout << "Host:" << networkHostID << " is verifying after SGD..\n"; // galois::do_all(g, [&g,&rms] (DGNode n) { auto ei = g->begin(); std::advance(ei, num_movie_nodes); unsigned int count = 0; for (auto ni = g->begin(); ni != ei; ++ni) { for (auto ii = g->edge_begin(*ni); ii != g->edge_end(*ni); ++ii) { DGNode m = g->getEdgeDst(ii); double pred = calcPrediction(g->getData(*ni), g->getData(m)); double rating = ii->getValue(); if (!std::isnormal(pred)) std::cout << "Denormal Warning\n"; rms += ((pred - rating) * (pred - rating)); } count++; } cout << "Reached end..\n" << endl; double total_rms = rms.reduce(); double normalized_rms = sqrt(total_rms / NUM_RATINGS); std::cout << "RMSE Total: " << total_rms << " Normalized: " << normalized_rms << std::endl; cout << "Number of nodes seen = " << count << endl; } struct dummy_func2 { dummy_func2() {} void operator()(const DGNode& item, galois::UserContext<DGNode>& ctx) { cout << "Host:" << networkHostID << " is doing tp..\n"; } }; struct dummy_func { dummy_func() {} void operator()(GNode& item, galois::UserContext<GNode>& ctx) {} }; void printNode(const Node& t) { cout << "ID: " << t.ID << endl; cout << "Edge_offset: " << t.edge_offset << endl; cout << "Updates: " << t.updates << endl; for (int i = 0; i < LATENT_VECTOR_SIZE; i++) { cout << " " << t.latent_vector[i] << endl; } } struct printN { Graphp g; printN(Graphp g_) : g(g_) {} void operator()(const DGNode& data, galois::UserContext<DGNode>& ctx) { printNode(g->getData(data)); } }; struct verify_before : public galois::runtime::Lockable { Graphp g; verify_before() {} verify_before(Graphp g_) : g(g_) {} void operator()(const DGNode& movie, galois::UserContext<DGNode>& ctx) { for (auto ii = g->edge_begin(movie); ii != g->edge_end(movie); ++ii) { const DGNode& m = g->getEdgeDst(ii); if (g->edge_begin(m) != g->edge_end(m)) cout << "Kuch gadbad hai..\n"; double pred = calcPrediction(g->getData(movie), g->getData(m)); double rating = ii->getValue(); if (!std::isnormal(pred)) std::cout << "Denormal Warning\n"; RMS += ((pred - rating) * (pred - rating)); } count_data += 1; } typedef int tt_has_serialize; void serialize(galois::runtime::SerializeBuffer& s) const { gSerialize(s, g); } void deserialize(galois::runtime::DeSerializeBuffer& s) { gDeserialize(s, g); } }; /* Operator */ unsigned count_done = 0; struct sgd_algo { galois::GAccumulator<size_t> numNodes; // unsigned int num_movie_nodes; struct Process : public galois::runtime::Lockable { Graphp g; sgd_algo* self; Process() {} // sgd(Graphp _g) : g(_g) {} Process(sgd_algo* s, Graphp _g) : g(_g), self(s) {} // void operator()(const DGNode& n, galois::UserContext<DGNode>&) // {(*this)(n);} void operator()(const DGNode& movie, galois::UserContext<DGNode>& ctx) { /* For checking if graph is correct */ /* DGraph::edge_iterator edge_begin = g->edge_begin(movie); DGraph::edge_iterator edge_end = g->edge_end(movie); Node& movie_data = g->getData(movie); std::cout << "Movie : " << movie_data.ID <<"\t"; for(auto ii = edge_begin; ii != edge_end; ++ii) { DGNode user = g->getEdgeDst(ii); Node& user_data = g->getData(user); unsigned int egde_data = ii->getValue(); std::cout << "User : " << user_data.ID <<"\t"; } std::cout << "\n"; */ // cout<<"Entered Process..\n"<<endl; Node& movie_data = g->getData(movie); // printNode(movie_data); DGraph::edge_iterator edge_it = g->edge_begin(movie); DGraph::edge_iterator edge_end = g->edge_end(movie); std::advance(edge_it, movie_data.edge_offset); DGNode user = g->getEdgeDst(edge_it); Node& user_data = g->getData(user); unsigned int edge_rating = edge_it->getValue(); // Call the gradient routine doGradientUpdate(movie_data, user_data, edge_rating); ++edge_it; ++movie_data.edge_offset; // This is the last user if (edge_it == g->edge_end(movie)) // galois::MethodFlag::NONE)) { // start back at the first edge again movie_data.edge_offset = 0; movie_data.updates++; // cout<<"Done with this movie.. count = "<<++count_done<<" host = // "<<networkHostID<<endl; if (movie_data.updates < MAX_MOVIE_UPDATES) ctx.push(movie); } else { ctx.push(movie); } } typedef int tt_has_serialize; void serialize(galois::runtime::SerializeBuffer& s) const { gSerialize(s, g); } void deserialize(galois::runtime::DeSerializeBuffer& s) { gDeserialize(s, g); } }; void operator()(Graphp g) { DGraph::iterator ii = g->begin(); std::advance(ii, num_movie_nodes); // std::advance(ii,2); Graph::iterator jj = graph.begin(); std::advance(jj, num_movie_nodes); Node& dg_movie = g->getData(*ii); Node& g_movie = graph.getData(*jj); std::cout << "dg_movie = " << dg_movie.ID << "\n"; std::cout << "g_movie = " << g_movie.ID << "\n"; std::cout << "num movie nodes = " << num_movie_nodes << "\n"; unsigned k = 0; /*for(auto it = g->begin(),ee=g->end();it != ee; ++k,++it) { printNode(g->getData(*it)); }*/ // std::cout<<"Value of k= "<<k<<std::endl; // galois::for_each(g->begin(), ii, printN(g),"Printing nodes"); // galois::for_each(g, Process(this,g), "Process"); galois::for_each(g->begin(), ii, Process(this, g), "SGD Process"); // galois::for_each(g->begin(), ii, verify_before(g), "Verifying"); // Verification routine std::cout << "Running Verification after completion\n"; // verify(g); // program_barrier(); // std::cout << "number of nodes = "<<numNodes.reduce() << "\n"; } }; /*void fillNode(Node& node) { unsigned int seed = 42; std::default_random_engine eng(seed); std::uniform_real_distribution<double> random_lv_value(0,0.1); double *lv = new double[LATENT_VECTOR_SIZE]; for(int i=0;i<LATENT_VECTOR_SIZE;i++) { lv[i] = random_lv_value(eng); } node.latent_vector = lv; }*/ unsigned num_ns = 0; struct create_nodes { Graphp g; SLock& l; create_nodes(Graphp _g, SLock& _l) : g(_g), l(_l) {} void operator()(GNode& item, galois::UserContext<GNode>& ctx) { // cout<<"In create nodes..\n"; Node node = graph.getData(item); // fillNode(node); if (node.ID == 1) std::cout << "node ID = " << node.ID << "Host =====>" << networkHostID << std::endl; DGNode n = g->createNode(node); g->addNode(n); if (node.ID == 1) { Node dNode = g->getData(n); std::cout << "node ID og dgraph = " << dNode.ID << "Host =====>" << networkHostID << std::endl; } /*Check that we have the right nodes*/ /* l.lock(); mapping[item] = n; llookup[lookup[item]] = n; l.unlock(); */ num_ns++; } }; unsigned int initializeGraphData(Graph& g) { unsigned int seed = 42; std::default_random_engine eng(seed); std::uniform_real_distribution<double> random_lv_value(0, 0.1); unsigned int num_movie_nodes = 0; unsigned int num_user_nodes = 0; unsigned index = 0; unsigned int numRatings = 0; // for all movie and user nodes in the graph for (Graph::iterator i = g.begin(), end = g.end(); i != end; ++i) { Graph::GraphNode gnode = *i; Node& data = g.getData(gnode); data.ID = index; ++index; data.updates = 0; // fill latent vectors with random values double* lv = new double[LATENT_VECTOR_SIZE]; for (int i = 0; i < LATENT_VECTOR_SIZE; i++) { lv[i] = random_lv_value(eng); } for (int i = 0; i < LATENT_VECTOR_SIZE; i++) { data.latent_vector[i] = lv[i]; } // data.latent_vector = lv; unsigned int num_edges = g.edge_end(gnode) - g.edge_begin(gnode); // std::cout << "num edges = " << num_edges << "\n"; numRatings += num_edges; if (num_edges > 0) ++num_movie_nodes; else ++num_user_nodes; // data.edge_offset = 0; } NUM_RATINGS = numRatings; return num_movie_nodes; } void giveDGraph(Graphp graph); static void recvRemoteNode_landing_pad(RecvBuffer& buf) { DGNode n; // unsigned num; Node node; uint32_t host; gDeserialize(buf, host, node, n); slock.lock(); rlookup[node] = n; slock.unlock(); } static void getRemoteNode_landing_pad(RecvBuffer& buf) { // unsigned num; Node node; uint32_t host; gDeserialize(buf, host, node); SendBuffer b; slock.lock(); gSerialize(b, networkHostID, node, llookup[node]); slock.unlock(); getSystemNetworkInterface().send(host, recvRemoteNode_landing_pad, b); } static void create_remote_graph_edges(Graphp dgraph) { printf("host: %u creating all edges on HOST =>\n", networkHostID); unsigned count = 0; unsigned scount = 0; unsigned rcount = 0; unsigned cc = 0; /*auto start = graph.begin(); std::advance(start,0); DGNode d_start = mapping[*start]; Node d_node = dgraph->getData(d_start); auto d_begin = dgraph->begin(); Node d_start_node = dgraph->getData(*d_begin); std::cout << "---------------d graph mapping at = >" <<d_node.ID <<std::endl; std::cout << "---------------d graph starting at = >" <<d_start_node.ID <<std::endl; */ // rlookup.clear(); // assert(!rlookup.size()); auto dg_it = dgraph->begin(); for (auto ii = graph.begin(); ii != graph.end(); ++ii) { mapping[*ii] = *dg_it; ++dg_it; } for (auto ii = graph.begin(); ii != graph.end(); ++ii) { Graph::edge_iterator vv = graph.edge_begin(*ii); Graph::edge_iterator ev = graph.edge_end(*ii); scount++; for (Graph::edge_iterator jj = vv; jj != ev; ++jj) { // Node& node = lookup[graph.getEdgeDst(jj)]; unsigned int edge_data = graph.getEdgeData(jj); dgraph->addEdge(mapping[*ii], mapping[graph.getEdgeDst(jj)], edge_data); count++; } } std::cout << "host=" << networkHostID << "count = " << count << "\n"; printf("host: %u nodes %u and edges %u remote edges %u\n", networkHostID, scount, count, rcount); printf("host: %u done creating local edges\n", networkHostID); // giveDGraph(dgraph); } static void create_dist_graph(Graphp dgraph, std::string inputFile) { SLock lk; prog_barrier = 0; uint64_t block, f, l; Graph::iterator first, last; std::cout << "Done making graph HOST = " << networkHostID << "\n"; std::cout << "Number of movie nodes=" << num_movie_nodes << std::endl; unsigned size = 0; cout << "Number of nodes = " << std::distance(graph.begin(), graph.end()) << endl; // std::cout << "host = "<< networkHostID << " f = "<< f << " l = " << l // <<"\n"; // create the nodes if (networkHostID == 0) { printf("host: %u creating nodes\n", networkHostID); galois::for_each(graph.begin(), graph.end(), create_nodes(dgraph, lk)); // printf ("%lu nodes in %u host with block size %lu\n", mapping.size(), // networkHostID, block); // create the local edges } else { galois::for_each(graph.begin(), graph.end(), dummy_func()); } } static void getDGraph_landing_pad(RecvBuffer& buf) { Graphp dgraph; gDeserialize(buf, dgraph); printf("%d has received DistGraph..\n", networkHostID); } void giveDGraph(Graphp dgraph) { if (networkHostNum > 1) { SendBuffer b; gSerialize(b, dgraph); getSystemNetworkInterface().broadcast(getDGraph_landing_pad, b); printf("Handling receives...\n"); getSystemNetworkInterface().handleReceives(); printf("Done Handling receives...\n"); } } static void readInputGraph_landing_pad(RecvBuffer& buf) { Graphp dgraph; std::string inputFile; gDeserialize(buf, inputFile, dgraph); create_dist_graph(dgraph, inputFile); printf("1..Done creating dist graph..\n"); } void readInputGraph(Graphp dgraph, std::string inputFile) { std::cout << "NetworkHostNum=" << networkHostNum << std::endl; if (networkHostNum > 1) { SendBuffer b; gSerialize(b, inputFile, dgraph); getSystemNetworkInterface().broadcast(readInputGraph_landing_pad, b); printf("Handling receives...\n"); getSystemNetworkInterface().handleReceives(); printf("Done Handling receives...\n"); } create_dist_graph(dgraph, inputFile); printf("0..Done creating dist graph.. HOST --->%d\n", networkHostID); } void readGraph(Graphp dgraph, std::string inputFile) { readInputGraph(dgraph, inputFile); } void verify_(Graphp g) { // if(networkHostID == 0) auto ii = g->begin(); std::advance(ii, num_movie_nodes); if (networkHostID == 0) galois::for_each(g->begin(), ii, verify_before(g), "Verifying"); else galois::for_each(g->begin(), ii, dummy_func2()); } int main(int argc, char** argv) { if (argc < 3) { std::cout << "Usage: <input binary gr file> <thread count>" << std::endl; return -1; } std::cout << "start reading and building Graph\n"; std::string inputFile = argv[1]; unsigned int threadCount = atoi(argv[2]); // how many threads Galois should use galois::setActiveThreads(threadCount); // FGraph fg; // fg.structureFromFile(inputFile); // std::cout<<"Reached here..\n"; // graph.structureFromGraph(fg); // std::cout<<"Reached here too..\n"; // prints out the number of conflicts at the end of the program std::cout << "structureFromFile\n"; graph.structureFromFile(inputFile); num_movie_nodes = initializeGraphData(graph); std::cout << "num_movie_nodes = " << num_movie_nodes << "\n"; verify(); galois::StatManager statManager; galois::runtime::networkStart(); Graphp dgraph = DGraph::allocate(); galois::StatTimer Tinitial("Initialization Time"); Tinitial.start(); readGraph(dgraph, inputFile); Tinitial.stop(); if (networkHostID == 0) { std::cout << "create_remote_graph_edges host--->" << networkHostID << "\n"; create_remote_graph_edges(dgraph); std::cout << "Done reading and building Graph\n"; // std::cout<< "Running Verification before \n"; // verify(dgraph); } // if(networkHostID == 0) // verify_(dgraph); cout << "Number of nodes created = " << num_ns << endl; std::cout << "num_movie_nodes = " << num_movie_nodes << "\n"; std::cout << "calling sgd \n"; // program_barrier(); galois::StatTimer T1("DistGraph transfer Time"); T1.start(); // giveDGraph(dgraph);; T1.stop(); galois::StatTimer T("Sgd Time"); T.start(); sgd_algo()(dgraph); T.stop(); // double rms=0.0; galois::StatTimer T2("Verify Time"); T2.start(); // verify_(dgraph); verify(dgraph); T2.stop(); cout << "Value of rms = " << RMS.reduce() << endl; cout << "Number of ratings = " << NUM_RATINGS << endl; cout << "Normalized rms = " << sqrt(RMS.reduce() / NUM_RATINGS) << endl; cout << "Data accessed = " << count_data.reduce() << endl; // allocate local computation graph /* FGraph f; f.structureFromFile(inputFile); LCGraph localGraph; localGraph.allocateFrom(f); localGraph.constructFrom(f, 0, 1); //read structure of graph & edge weights; nodes not initialized //galois::graphs::readGraph(localGraph, inputFile); //g_ptr = &g; //typedef galois::graphs::FileGraph::GraphNode FileGNode; for(auto ii = localGraph.begin(); ii != localGraph.end(); ++ii) { Node& data = localGraph.getData(*ii); std::cout << data.updates <<"\n"; } //fill each node's id & initialize the latent vectors unsigned int num_movie_nodes = initializeGraphData(localGraph); Graphp g = Graph::allocate(); //galois::for_each<>(boost::counting_iterator<int>(0), boost::counting_iterator<int>(100), op(g)); //galois::for_each<>(f.begin(), f.end(), AddNodes(g,f)); std::cout << "Done making graph\n"; galois::StatTimer timer; timer.start(); //do the SGD computation in parallel //the initial worklist contains all the movie nodes //the movie nodes are located at the top num_movie_nodes nodes in the graph //the worklist is a priority queue ordered by the number of updates done to a movie //the projCount functor provides the priority function on each node //Graphp::iterator ii = g.begin(); //std::advance(ii,num_movie_nodes); //advance moves passed in iterator galois::for_each(g.begin(), ii, sgd(g), galois::wl<galois::worklists::OrderedByIntegerMetric <projCount, galois::worklists::PerSocketChunkLIFO<32>>>()); timer.stop(); std::cout << "SUMMARY Movies " << num_movie_nodes << " Users " << g->size() - num_movie_nodes<< " Threads " << threadCount << " Time " << timer.get()/1000.0 << std::endl; */ printf("Reached here, before terminate..\n"); galois::runtime::networkTerminate(); printf("Reached here, after terminate..\n"); // verify(dgraph); return 0; }
; Original address was $BDA0 ; Tank boss room .word $0000 ; Alternate level layout .word $0000 ; Alternate object layout .byte LEVEL1_SIZE_01 | LEVEL1_YSTART_000 .byte LEVEL2_BGPAL_05 | LEVEL2_OBJPAL_08 | LEVEL2_XSTART_18 .byte LEVEL3_TILESET_10 | LEVEL3_VSCROLL_LOCKED | LEVEL3_PIPENOTEXIT .byte LEVEL4_BGBANK_INDEX(10) | LEVEL4_INITACT_NOTHING .byte LEVEL5_BGM_AIRSHIP | LEVEL5_TIME_300 .byte $00, $00, $0F, $0F, $00, $1F, $10, $00, $4A, $10, $0F, $4A, $19, $01, $61, $19 .byte $03, $61, $19, $05, $61, $19, $07, $61, $19, $09, $61, $19, $0B, $61, $19, $0D .byte $61, $0F, $01, $41, $0F, $02, $41, $FF
# Scrivere un programma in linguaggio assembly MIPS che riceve in ingresso una sequenza di N numeri interi. # I numeri sono memorizzati in un vettore. Il valore N è inserito dall’utente, ma il vettore può contenere al massimo 30 numeri. # Terminato l’inserimento della sequenza di numeri, il programma deve verificare se gli elementi del vettore sono tutti uguali tra loro. .text .globl main main: li $t1, 1 li $t5, 1 loop: beq $t0, 10, confronto li $v0, 5 syscall mul $t1, $t0, 4 sw $v0, vect($t1) addi $t0, $t0, 1 j loop confronto: beq $t2, 9, uguali mul $t5, $t2, 4 lw $t3, vect($t5) lw $t4, vect+4($t5) bne $t3, $t4, diversi addi $t2, $t2, 1 j confronto diversi: la $a0, div li $v0, 4 syscall j fine uguali: la $a0, eql li $v0, 4 syscall fine: li $v0, 10 syscall .data vect: .space 120 eql: .asciiz "uguali" div: .asciiz "diversi"
%ifdef CONFIG { "RegData": { "XMM0": ["0x6162636465666768", "0x7172737475767778"], "XMM1": ["0x6162636465666768", "0x7172737475767778"] }, "MemoryRegions": { "0x100000000": "4096" } } %endif mov rdx, 0xe0000000 mov rax, 0x4142434445464748 mov [rdx + 8 * 0], rax mov rax, 0x7172737475767778 mov [rdx + 8 * 1], rax mov rax, 0x6162636465666768 mov [rdx + 8 * 2], rax mov rax, 0x5152535455565758 mov [rdx + 8 * 3], rax movapd xmm0, [rdx + 8 * 0] movapd xmm1, [rdx + 8 * 0] movapd xmm2, [rdx + 8 * 2] pmaxsw xmm0, xmm2 pmaxsw xmm1, [rdx + 8 * 2] hlt
#include "structures/dynamicgrid.hpp" DynamicGrid::DynamicGrid(int w, int h, int unitySize) : AbstractGrid::AbstractGrid(w, h, unitySize){ } DynamicGrid::DynamicGrid() : AbstractGrid::AbstractGrid(0, 0, 0){ } int DynamicGrid::getQuad(sf::Vector2f position) const{ return getQuad(position.x, position.y); } int DynamicGrid::getQuad(int x, int y) const{ return (x/unitySize) + (y/unitySize) * xCells; }
// Copyright (c) 2011-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <test/test_bitcoin.h> #include <chainparams.h> #include <consensus/consensus.h> #include <consensus/validation.h> #include <crypto/sha256.h> #include <validation.h> #include <miner.h> #include <net_processing.h> #include <pow.h> #include <ui_interface.h> #include <streams.h> #include <rpc/server.h> #include <rpc/register.h> #include <script/sigcache.h> void CConnmanTest::AddNode(CNode& node) { LOCK(g_connman->cs_vNodes); g_connman->vNodes.push_back(&node); } void CConnmanTest::ClearNodes() { LOCK(g_connman->cs_vNodes); for (CNode* node : g_connman->vNodes) { delete node; } g_connman->vNodes.clear(); } uint256 insecure_rand_seed = GetRandHash(); FastRandomContext insecure_rand_ctx(insecure_rand_seed); extern bool fPrintToConsole; extern void noui_connect(); std::ostream& operator<<(std::ostream& os, const uint256& num) { os << num.ToString(); return os; } BasicTestingSetup::BasicTestingSetup(const std::string& chainName) : m_path_root(fs::temp_directory_path() / "test_altcoin" / strprintf("%lu_%i", (unsigned long)GetTime(), (int)(InsecureRandRange(1 << 30)))) { SHA256AutoDetect(); RandomInit(); ECC_Start(); SetupEnvironment(); SetupNetworking(); InitSignatureCache(); InitScriptExecutionCache(); fCheckBlockIndex = true; SelectParams(chainName); noui_connect(); } BasicTestingSetup::~BasicTestingSetup() { fs::remove_all(m_path_root); ECC_Stop(); } fs::path BasicTestingSetup::SetDataDir(const std::string& name) { fs::path ret = m_path_root / name; fs::create_directories(ret); gArgs.ForceSetArg("-datadir", ret.string()); return ret; } TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(chainName) { SetDataDir("tempdir"); const CChainParams& chainparams = Params(); // Ideally we'd move all the RPC tests to the functional testing framework // instead of unit tests, but for now we need these here. RegisterAllCoreRPCCommands(tableRPC); ClearDatadirCache(); // We have to run a scheduler thread to prevent ActivateBestChain // from blocking due to queue overrun. threadGroup.create_thread(boost::bind(&CScheduler::serviceQueue, &scheduler)); GetMainSignals().RegisterBackgroundSignalScheduler(scheduler); mempool.setSanityCheck(1.0); pblocktree.reset(new CBlockTreeDB(1 << 20, true)); pcoinsdbview.reset(new CCoinsViewDB(1 << 23, true)); pcoinsTip.reset(new CCoinsViewCache(pcoinsdbview.get())); if (!LoadGenesisBlock(chainparams)) { throw std::runtime_error("LoadGenesisBlock failed."); } { CValidationState state; if (!ActivateBestChain(state, chainparams)) { throw std::runtime_error(strprintf("ActivateBestChain failed. (%s)", FormatStateMessage(state))); } } nScriptCheckThreads = 3; for (int i=0; i < nScriptCheckThreads-1; i++) threadGroup.create_thread(&ThreadScriptCheck); g_connman = std::unique_ptr<CConnman>(new CConnman(0x1337, 0x1337)); // Deterministic randomness for tests. connman = g_connman.get(); peerLogic.reset(new PeerLogicValidation(connman, scheduler, /*enable_bip61=*/true)); } TestingSetup::~TestingSetup() { threadGroup.interrupt_all(); threadGroup.join_all(); GetMainSignals().FlushBackgroundCallbacks(); GetMainSignals().UnregisterBackgroundSignalScheduler(); g_connman.reset(); peerLogic.reset(); UnloadBlockIndex(); pcoinsTip.reset(); pcoinsdbview.reset(); pblocktree.reset(); } TestChain100Setup::TestChain100Setup() : TestingSetup(CBaseChainParams::REGTEST) { // CreateAndProcessBlock() does not support building SegWit blocks, so don't activate in these tests. // TODO: fix the code to support SegWit blocks. UpdateVersionBitsParameters(Consensus::DEPLOYMENT_SEGWIT, 0, Consensus::BIP9Deployment::NO_TIMEOUT); // Generate a 100-block chain: coinbaseKey.MakeNewKey(true); CScript scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG; for (int i = 0; i < COINBASE_MATURITY; i++) { std::vector<CMutableTransaction> noTxns; CBlock b = CreateAndProcessBlock(noTxns, scriptPubKey); m_coinbase_txns.push_back(b.vtx[0]); } } // // Create a new block with just given transactions, coinbase paying to // scriptPubKey, and try to add it to the current chain. // CBlock TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>& txns, const CScript& scriptPubKey) { const CChainParams& chainparams = Params(); std::unique_ptr<CBlockTemplate> pblocktemplate = BlockAssembler(chainparams).CreateNewBlock(scriptPubKey); CBlock& block = pblocktemplate->block; // Replace mempool-selected txns with just coinbase plus passed-in txns: block.vtx.resize(1); for (const CMutableTransaction& tx : txns) block.vtx.push_back(MakeTransactionRef(tx)); // IncrementExtraNonce creates a valid coinbase and merkleRoot { LOCK(cs_main); unsigned int extraNonce = 0; IncrementExtraNonce(&block, chainActive.Tip(), extraNonce); } while (!CheckProofOfWork(block.GetPoWHash(), block.nBits, chainparams.GetConsensus())) ++block.nNonce; std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(block); ProcessNewBlock(chainparams, shared_pblock, true, nullptr); CBlock result = block; return result; } TestChain100Setup::~TestChain100Setup() { } CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CMutableTransaction &tx) { return FromTx(MakeTransactionRef(tx)); } CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransactionRef& tx) { return CTxMemPoolEntry(tx, nFee, nTime, nHeight, spendsCoinbase, sigOpCost, lp); } /** * @returns a real block (0000000000013b8ab2cd513b0261a14096412195a72a0c4827d229dcc7e0f7af) * with 9 txs. */ CBlock getBlock13b8a() { CBlock block; CDataStream stream(ParseHex("0100000090f0a9f110702f808219ebea1173056042a714bad51b916cb6800000000000005275289558f51c9966699404ae2294730c3c9f9bda53523ce50e9b95e558da2fdb261b4d4c86041b1ab1bf930901000000010000000000000000000000000000000000000000000000000000000000000000ffffffff07044c86041b0146ffffffff0100f2052a01000000434104e18f7afbe4721580e81e8414fc8c24d7cfacf254bb5c7b949450c3e997c2dc1242487a8169507b631eb3771f2b425483fb13102c4eb5d858eef260fe70fbfae0ac00000000010000000196608ccbafa16abada902780da4dc35dafd7af05fa0da08cf833575f8cf9e836000000004a493046022100dab24889213caf43ae6adc41cf1c9396c08240c199f5225acf45416330fd7dbd022100fe37900e0644bf574493a07fc5edba06dbc07c311b947520c2d514bc5725dcb401ffffffff0100f2052a010000001976a914f15d1921f52e4007b146dfa60f369ed2fc393ce288ac000000000100000001fb766c1288458c2bafcfec81e48b24d98ec706de6b8af7c4e3c29419bfacb56d000000008c493046022100f268ba165ce0ad2e6d93f089cfcd3785de5c963bb5ea6b8c1b23f1ce3e517b9f022100da7c0f21adc6c401887f2bfd1922f11d76159cbc597fbd756a23dcbb00f4d7290141042b4e8625a96127826915a5b109852636ad0da753c9e1d5606a50480cd0c40f1f8b8d898235e571fe9357d9ec842bc4bba1827daaf4de06d71844d0057707966affffffff0280969800000000001976a9146963907531db72d0ed1a0cfb471ccb63923446f388ac80d6e34c000000001976a914f0688ba1c0d1ce182c7af6741e02658c7d4dfcd388ac000000000100000002c40297f730dd7b5a99567eb8d27b78758f607507c52292d02d4031895b52f2ff010000008b483045022100f7edfd4b0aac404e5bab4fd3889e0c6c41aa8d0e6fa122316f68eddd0a65013902205b09cc8b2d56e1cd1f7f2fafd60a129ed94504c4ac7bdc67b56fe67512658b3e014104732012cb962afa90d31b25d8fb0e32c94e513ab7a17805c14ca4c3423e18b4fb5d0e676841733cb83abaf975845c9f6f2a8097b7d04f4908b18368d6fc2d68ecffffffffca5065ff9617cbcba45eb23726df6498a9b9cafed4f54cbab9d227b0035ddefb000000008a473044022068010362a13c7f9919fa832b2dee4e788f61f6f5d344a7c2a0da6ae740605658022006d1af525b9a14a35c003b78b72bd59738cd676f845d1ff3fc25049e01003614014104732012cb962afa90d31b25d8fb0e32c94e513ab7a17805c14ca4c3423e18b4fb5d0e676841733cb83abaf975845c9f6f2a8097b7d04f4908b18368d6fc2d68ecffffffff01001ec4110200000043410469ab4181eceb28985b9b4e895c13fa5e68d85761b7eee311db5addef76fa8621865134a221bd01f28ec9999ee3e021e60766e9d1f3458c115fb28650605f11c9ac000000000100000001cdaf2f758e91c514655e2dc50633d1e4c84989f8aa90a0dbc883f0d23ed5c2fa010000008b48304502207ab51be6f12a1962ba0aaaf24a20e0b69b27a94fac5adf45aa7d2d18ffd9236102210086ae728b370e5329eead9accd880d0cb070aea0c96255fae6c4f1ddcce1fd56e014104462e76fd4067b3a0aa42070082dcb0bf2f388b6495cf33d789904f07d0f55c40fbd4b82963c69b3dc31895d0c772c812b1d5fbcade15312ef1c0e8ebbb12dcd4ffffffff02404b4c00000000001976a9142b6ba7c9d796b75eef7942fc9288edd37c32f5c388ac002d3101000000001976a9141befba0cdc1ad56529371864d9f6cb042faa06b588ac000000000100000001b4a47603e71b61bc3326efd90111bf02d2f549b067f4c4a8fa183b57a0f800cb010000008a4730440220177c37f9a505c3f1a1f0ce2da777c339bd8339ffa02c7cb41f0a5804f473c9230220585b25a2ee80eb59292e52b987dad92acb0c64eced92ed9ee105ad153cdb12d001410443bd44f683467e549dae7d20d1d79cbdb6df985c6e9c029c8d0c6cb46cc1a4d3cf7923c5021b27f7a0b562ada113bc85d5fda5a1b41e87fe6e8802817cf69996ffffffff0280651406000000001976a9145505614859643ab7b547cd7f1f5e7e2a12322d3788ac00aa0271000000001976a914ea4720a7a52fc166c55ff2298e07baf70ae67e1b88ac00000000010000000586c62cd602d219bb60edb14a3e204de0705176f9022fe49a538054fb14abb49e010000008c493046022100f2bc2aba2534becbdf062eb993853a42bbbc282083d0daf9b4b585bd401aa8c9022100b1d7fd7ee0b95600db8535bbf331b19eed8d961f7a8e54159c53675d5f69df8c014104462e76fd4067b3a0aa42070082dcb0bf2f388b6495cf33d789904f07d0f55c40fbd4b82963c69b3dc31895d0c772c812b1d5fbcade15312ef1c0e8ebbb12dcd4ffffffff03ad0e58ccdac3df9dc28a218bcf6f1997b0a93306faaa4b3a28ae83447b2179010000008b483045022100be12b2937179da88599e27bb31c3525097a07cdb52422d165b3ca2f2020ffcf702200971b51f853a53d644ebae9ec8f3512e442b1bcb6c315a5b491d119d10624c83014104462e76fd4067b3a0aa42070082dcb0bf2f388b6495cf33d789904f07d0f55c40fbd4b82963c69b3dc31895d0c772c812b1d5fbcade15312ef1c0e8ebbb12dcd4ffffffff2acfcab629bbc8685792603762c921580030ba144af553d271716a95089e107b010000008b483045022100fa579a840ac258871365dd48cd7552f96c8eea69bd00d84f05b283a0dab311e102207e3c0ee9234814cfbb1b659b83671618f45abc1326b9edcc77d552a4f2a805c0014104462e76fd4067b3a0aa42070082dcb0bf2f388b6495cf33d789904f07d0f55c40fbd4b82963c69b3dc31895d0c772c812b1d5fbcade15312ef1c0e8ebbb12dcd4ffffffffdcdc6023bbc9944a658ddc588e61eacb737ddf0a3cd24f113b5a8634c517fcd2000000008b4830450221008d6df731df5d32267954bd7d2dda2302b74c6c2a6aa5c0ca64ecbabc1af03c75022010e55c571d65da7701ae2da1956c442df81bbf076cdbac25133f99d98a9ed34c014104462e76fd4067b3a0aa42070082dcb0bf2f388b6495cf33d789904f07d0f55c40fbd4b82963c69b3dc31895d0c772c812b1d5fbcade15312ef1c0e8ebbb12dcd4ffffffffe15557cd5ce258f479dfd6dc6514edf6d7ed5b21fcfa4a038fd69f06b83ac76e010000008b483045022023b3e0ab071eb11de2eb1cc3a67261b866f86bf6867d4558165f7c8c8aca2d86022100dc6e1f53a91de3efe8f63512850811f26284b62f850c70ca73ed5de8771fb451014104462e76fd4067b3a0aa42070082dcb0bf2f388b6495cf33d789904f07d0f55c40fbd4b82963c69b3dc31895d0c772c812b1d5fbcade15312ef1c0e8ebbb12dcd4ffffffff01404b4c00000000001976a9142b6ba7c9d796b75eef7942fc9288edd37c32f5c388ac00000000010000000166d7577163c932b4f9690ca6a80b6e4eb001f0a2fa9023df5595602aae96ed8d000000008a4730440220262b42546302dfb654a229cefc86432b89628ff259dc87edd1154535b16a67e102207b4634c020a97c3e7bbd0d4d19da6aa2269ad9dded4026e896b213d73ca4b63f014104979b82d02226b3a4597523845754d44f13639e3bf2df5e82c6aab2bdc79687368b01b1ab8b19875ae3c90d661a3d0a33161dab29934edeb36aa01976be3baf8affffffff02404b4c00000000001976a9144854e695a02af0aeacb823ccbc272134561e0a1688ac40420f00000000001976a914abee93376d6b37b5c2940655a6fcaf1c8e74237988ac0000000001000000014e3f8ef2e91349a9059cb4f01e54ab2597c1387161d3da89919f7ea6acdbb371010000008c49304602210081f3183471a5ca22307c0800226f3ef9c353069e0773ac76bb580654d56aa523022100d4c56465bdc069060846f4fbf2f6b20520b2a80b08b168b31e66ddb9c694e240014104976c79848e18251612f8940875b2b08d06e6dc73b9840e8860c066b7e87432c477e9a59a453e71e6d76d5fe34058b800a098fc1740ce3012e8fc8a00c96af966ffffffff02c0e1e400000000001976a9144134e75a6fcb6042034aab5e18570cf1f844f54788ac404b4c00000000001976a9142b6ba7c9d796b75eef7942fc9288edd37c32f5c388ac00000000"), SER_NETWORK, PROTOCOL_VERSION); stream >> block; return block; }
; Z88DK Small C+ Graphics Functions ; Fills a screen area ; ; Generic and simple version, slower and wasting a bit of memory ; ; $Id: w_fill.asm $ ; INCLUDE "graphics/grafix.inc" SECTION code_graphics PUBLIC fill PUBLIC _fill EXTERN l_graphics_cmp EXTERN point EXTERN plot ;ix points to the table on stack (above) ;Entry: ; hl=x0 de=y0 ;fill(int x, int y) ;{ ; if (!point(x,y)) { ; plot(x, y); ; fill(x+1, y); ; fill(x-1, y); ; fill(x, y+1); ; fill(x, y-1); ; } ;} .fill ._fill pop bc pop de ; y pop hl ; x push hl push de push bc push hl ld hl,maxy call l_graphics_cmp pop hl ret nc ; Return if Y overflows push de ld de,maxx call l_graphics_cmp pop de ret c ; Return if X overflows push hl push de call point pop de pop hl ret nz ; -- -- -- -- -- -- -- -- push hl push de call plot pop de pop hl inc hl push hl push de call fill pop de pop hl dec hl dec hl push hl push de call fill pop de pop hl inc hl inc de push hl push de call fill pop de pop hl dec de dec de push hl push de call fill pop de pop hl ret
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x4c94, %r10 nop nop nop nop nop sub $34244, %rbx mov $0x6162636465666768, %rcx movq %rcx, %xmm6 and $0xffffffffffffffc0, %r10 movntdq %xmm6, (%r10) nop nop nop cmp %r12, %r12 lea addresses_A_ht+0xf9c4, %rsi clflush (%rsi) nop inc %rcx movb $0x61, (%rsi) nop cmp %rbx, %rbx lea addresses_WC_ht+0x4164, %rsi lea addresses_normal_ht+0x192e2, %rdi nop nop and $43433, %rbx mov $100, %rcx rep movsq nop nop nop nop dec %rcx lea addresses_WC_ht+0x8804, %rsi clflush (%rsi) nop nop nop nop xor %rdi, %rdi movb (%rsi), %dl nop nop sub $41226, %r10 lea addresses_D_ht+0x4ec4, %rsi lea addresses_WT_ht+0x1020c, %rdi xor $23782, %r9 mov $93, %rcx rep movsb nop dec %rcx lea addresses_normal_ht+0x13bc, %rsi lea addresses_D_ht+0x12abc, %rdi nop nop xor $24442, %r12 mov $97, %rcx rep movsl nop nop inc %rbx lea addresses_A_ht+0x11fa4, %rsi lea addresses_D_ht+0xcdc4, %rdi nop nop nop nop nop and %r12, %r12 mov $15, %rcx rep movsq nop nop nop nop nop xor %r9, %r9 lea addresses_WC_ht+0x18cf4, %rsi sub $30434, %r12 movb $0x61, (%rsi) nop nop nop nop nop xor $53361, %rdi lea addresses_A_ht+0x13254, %rsi lea addresses_normal_ht+0xac4, %rdi nop nop nop nop add %r10, %r10 mov $52, %rcx rep movsb nop nop nop nop nop inc %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r8 push %rbx push %rcx push %rdi push %rsi // REPMOV lea addresses_normal+0x99c4, %rsi lea addresses_PSE+0x133c4, %rdi nop nop nop mfence mov $114, %rcx rep movsl nop nop nop sub $26356, %r8 // Store mov $0x270fe500000001c4, %rbx add $4900, %rdi movl $0x51525354, (%rbx) nop nop dec %rsi // Faulty Load lea addresses_normal+0x99c4, %r11 nop nop nop nop nop inc %rdi mov (%r11), %si lea oracles, %r8 and $0xff, %rsi shlq $12, %rsi mov (%r8,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %r8 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_normal', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_normal', 'congruent': 0}, 'dst': {'same': False, 'type': 'addresses_PSE', 'congruent': 8}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': True, 'type': 'addresses_NC', 'same': False, 'AVXalign': True, 'congruent': 11}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_normal', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'size': 16, 'NT': True, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 11}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 1}, 'dst': {'same': True, 'type': 'addresses_normal_ht', 'congruent': 1}} {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 3}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 1}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 3}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 4}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 9}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 2}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 2}} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
; A251703: 4-step Fibonacci sequence starting with 1,1,0,0. ; Submitted by Christian Krause ; 1,1,0,0,2,3,5,10,20,38,73,141,272,524,1010,1947,3753,7234,13944,26878,51809,99865,192496,371048,715218,1378627,2657389,5122282,9873516,19031814,36685001,70712613,136302944,262732372,506432930,976180859 mov $2,1 mov $4,-2 lpb $0 sub $0,1 add $4,1 sub $3,$4 add $2,$3 mov $4,$2 mov $2,$3 add $2,$1 mov $1,$3 add $4,1 add $5,$4 mov $3,$5 sub $5,1 lpe mov $0,$2
; A250730: Number of (1+1)X(n+1) 0..1 arrays with nondecreasing x(i,j)+x(i,j-1) in the i direction and nondecreasing min(x(i,j),x(i-1,j)) in the j direction ; 9,22,50,114,257,579,1302,2927,6578,14782,33216,74637,167709,376840,846753,1902638,4275190,9606266,21585085,48501247,108981314,244878791,550237650,1236372778,2778104416,6242343961,14026419561,31517078668,70818232937,159127124982,357555404234,803419700514,1805267680281,4056399656843,9114647293454,20480426563471,46019100763554,103403980797126,232346635794336,522078151622245,1173098958241701,2635929432311312,5922879671242081 add $0,1 mov $2,4 lpb $0 sub $0,1 trn $1,4 add $3,$2 mov $2,$1 add $4,5 add $3,$4 add $4,$1 mov $1,$3 add $2,3 lpe
;/*! ; @file ; ; @ingroup fapi ; ; @brief DosFreeSeg DOS wrapper ; ; (c) osFree Project 2018, <http://www.osFree.org> ; for licence see licence.txt in root directory, or project website ; ; This is Family API implementation for DOS, used with BIND tools ; to link required API ; ; @author Yuri Prokushev (yuri.prokushev@gmail.com) ; ;*/ .8086 ; Helpers INCLUDE HELPERS.INC INCLUDE DOS.INC _TEXT SEGMENT BYTE PUBLIC 'CODE' USE16 @PROLOG DOS16RFREESEG SELECTOR DW ? @START DOS16RFREESEG MOV AX,DS MOV DX,[DS:BP].ARGS.SELECTOR CMP AX,DX ;DONT FREE DS SEGMENT JZ DONE FREE_MEMORY [DS:BP].ARGS.SELECTOR MOV AX,6 JB EXIT DONE: XOR AX,AX EXIT: @EPILOG DOS16RFREESEG _TEXT ENDS END
<% import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft import six %> <%docstring>linkat(fromfd, from_, tofd, to, flags) -> str Invokes the syscall linkat. See 'man 2 linkat' for more information. Arguments: fromfd(int): fromfd from(char*): from tofd(int): tofd to(char*): to flags(int): flags Returns: int </%docstring> <%page args="fromfd=0, from_=0, tofd=0, to=0, flags=0"/> <% abi = pwnlib.abi.ABI.syscall() stack = abi.stack regs = abi.register_arguments[1:] allregs = pwnlib.shellcraft.registers.current() can_pushstr = ['from', 'to'] can_pushstr_array = [] argument_names = ['fromfd', 'from_', 'tofd', 'to', 'flags'] argument_values = [fromfd, from_, tofd, to, flags] # Load all of the arguments into their destination registers / stack slots. register_arguments = dict() stack_arguments = collections.OrderedDict() string_arguments = dict() dict_arguments = dict() array_arguments = dict() syscall_repr = [] for name, arg in zip(argument_names, argument_values): if arg is not None: syscall_repr.append('%s=%s' % (name, pwnlib.shellcraft.pretty(arg, False))) # If the argument itself (input) is a register... if arg in allregs: index = argument_names.index(name) if index < len(regs): target = regs[index] register_arguments[target] = arg elif arg is not None: stack_arguments[index] = arg # The argument is not a register. It is a string value, and we # are expecting a string value elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): if isinstance(arg, six.text_type): arg = arg.encode('utf-8') string_arguments[name] = arg # The argument is not a register. It is a dictionary, and we are # expecting K:V paris. elif name in can_pushstr_array and isinstance(arg, dict): array_arguments[name] = ['%s=%s' % (k,v) for (k,v) in arg.items()] # The arguent is not a register. It is a list, and we are expecting # a list of arguments. elif name in can_pushstr_array and isinstance(arg, (list, tuple)): array_arguments[name] = arg # The argument is not a register, string, dict, or list. # It could be a constant string ('O_RDONLY') for an integer argument, # an actual integer value, or a constant. else: index = argument_names.index(name) if index < len(regs): target = regs[index] register_arguments[target] = arg elif arg is not None: stack_arguments[target] = arg # Some syscalls have different names on various architectures. # Determine which syscall number to use for the current architecture. for syscall in ['SYS_linkat']: if hasattr(pwnlib.constants, syscall): break else: raise Exception("Could not locate any syscalls: %r" % syscalls) %> /* linkat(${', '.join(syscall_repr)}) */ %for name, arg in string_arguments.items(): ${pwnlib.shellcraft.pushstr(arg, append_null=(b'\x00' not in arg))} ${pwnlib.shellcraft.mov(regs[argument_names.index(name)], abi.stack)} %endfor %for name, arg in array_arguments.items(): ${pwnlib.shellcraft.pushstr_array(regs[argument_names.index(name)], arg)} %endfor %for name, arg in stack_arguments.items(): ${pwnlib.shellcraft.push(arg)} %endfor ${pwnlib.shellcraft.setregs(register_arguments)} ${pwnlib.shellcraft.syscall(syscall)}
.size 8000 .text@48 jp lstatint .text@100 jp lbegin .data@143 80 .text@150 lbegin: ld a, ff ldff(45), a ld b, 92 call lwaitly_b ld a, 40 ldff(41), a ld a, 02 ldff(ff), a xor a, a ldff(0f), a ei ld a, b inc a inc a ldff(45), a ld c, 0f .text@1000 lstatint: ld a, 10 ldff(41), a xor a, a ldff(0f), a ld a, 50 ldff(41), a nop nop ldff a, (c) jp lprint_a .text@7000 lprint_a: push af ld b, 91 call lwaitly_b xor a, a ldff(40), a ld bc, 7a00 ld hl, 8000 ld d, 00 lprint_copytiles: ld a, (bc) inc bc ld(hl++), a dec d jrnz lprint_copytiles pop af ld b, a srl a srl a srl a srl a ld(9800), a ld a, b and a, 0f ld(9801), a ld a, c0 ldff(47), a ld a, 80 ldff(68), a ld a, ff ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a xor a, a ldff(69), a ldff(69), a ldff(43), a ld a, 91 ldff(40), a lprint_limbo: jr lprint_limbo .text@7400 lwaitly_b: ld c, 44 lwaitly_b_loop: ldff a, (c) cmp a, b jrnz lwaitly_b_loop ret .data@7a00 00 00 7f 7f 41 41 41 41 41 41 41 41 41 41 7f 7f 00 00 08 08 08 08 08 08 08 08 08 08 08 08 08 08 00 00 7f 7f 01 01 01 01 7f 7f 40 40 40 40 7f 7f 00 00 7f 7f 01 01 01 01 3f 3f 01 01 01 01 7f 7f 00 00 41 41 41 41 41 41 7f 7f 01 01 01 01 01 01 00 00 7f 7f 40 40 40 40 7e 7e 01 01 01 01 7e 7e 00 00 7f 7f 40 40 40 40 7f 7f 41 41 41 41 7f 7f 00 00 7f 7f 01 01 02 02 04 04 08 08 10 10 10 10 00 00 3e 3e 41 41 41 41 3e 3e 41 41 41 41 3e 3e 00 00 7f 7f 41 41 41 41 7f 7f 01 01 01 01 7f 7f 00 00 08 08 22 22 41 41 7f 7f 41 41 41 41 41 41 00 00 7e 7e 41 41 41 41 7e 7e 41 41 41 41 7e 7e 00 00 3e 3e 41 41 40 40 40 40 40 40 41 41 3e 3e 00 00 7e 7e 41 41 41 41 41 41 41 41 41 41 7e 7e 00 00 7f 7f 40 40 40 40 7f 7f 40 40 40 40 7f 7f 00 00 7f 7f 40 40 40 40 7f 7f 40 40 40 40 40 40
proc RunPE Executable:DWORD local ProcessBasicInformation:PROCESS_BASIC_INFORMATION local StartupInformation:STARTUPINFOEXW local ProcessInformation:PROCESS_INFORMATION local ExecutablePath[MAX_PATH + 1]:WORD local CommandLine:DWORD local ParentProcessHandle:DWORD local ImageBase:DWORD local EntryPoint:DWORD local SizeOfHeaders:DWORD local SizeOfImage:DWORD local NumberOfSections:DWORD local ProcThreadAttributeListSize:DWORD local Context:DWORD local RetryCounter:DWORD local SectionCounter:DWORD ; Get executable path lea eax, [ExecutablePath] pebcall PEB_Kernel32Dll, PEB_GetModuleFileNameW, NULL, eax, MAX_PATH cmp eax, 0 jle .error ; Get commandline pebcall PEB_Kernel32Dll, PEB_GetCommandLineW test eax, eax jz .error mov [CommandLine], eax ; Get parent process ID lea eax, [ProcessBasicInformation] pebcall PEB_NtdllDll, PEB_NtQueryInformationProcess, -1, 0, eax, sizeof.PROCESS_BASIC_INFORMATION, 0 test eax, eax jnz .error ; Get parent process handle pebcall PEB_Kernel32Dll, PEB_OpenProcess, PROCESS_CREATE_PROCESS, FALSE, [ProcessBasicInformation.InheritedFromUniqueProcessId] test eax, eax jz .error mov [ParentProcessHandle], eax ; Parse executable mov eax, [Executable] add eax, [eax + IMAGE_DOS_HEADER.e_lfanew] mov ebx, [eax + IMAGE_NT_HEADERS32.OptionalHeader.ImageBase] mov [ImageBase], ebx mov ebx, [eax + IMAGE_NT_HEADERS32.OptionalHeader.AddressOfEntryPoint] mov [EntryPoint], ebx mov ebx, [eax + IMAGE_NT_HEADERS32.OptionalHeader.SizeOfHeaders] mov [SizeOfHeaders], ebx mov ebx, [eax + IMAGE_NT_HEADERS32.OptionalHeader.SizeOfImage] mov [SizeOfImage], ebx movzx ebx, word[eax + IMAGE_NT_HEADERS32.FileHeader.NumberOfSections] mov [NumberOfSections], ebx ; Retry up to 5 times mov [RetryCounter], 5 .L_retry: ; ZeroMemory StartupInformation lea edi, [StartupInformation] mov ecx, sizeof.STARTUPINFOEXW xor eax, eax cld rep stosb ; Get size of PROC_THREAD_ATTRIBUTE_LIST mov [ProcThreadAttributeListSize], 0 lea eax, [ProcThreadAttributeListSize] pebcall PEB_KernelbaseDll, PEB_InitializeProcThreadAttributeList, NULL, 1, 0, eax cmp [ProcThreadAttributeListSize], 0 je .C_retry ; Allocate PROC_THREAD_ATTRIBUTE_LIST pebcall PEB_Kernel32Dll, PEB_GetProcessHeap pebcall PEB_NtdllDll, PEB_RtlAllocateHeap, eax, 0, [ProcThreadAttributeListSize] test eax, eax jz .C_retry mov [StartupInformation + STARTUPINFOEXW.lpAttributeList], eax ; Initialize attribute list lea eax, [ProcThreadAttributeListSize] pebcall PEB_KernelbaseDll, PEB_InitializeProcThreadAttributeList, [StartupInformation + STARTUPINFOEXW.lpAttributeList], 1, 0, eax test eax, eax jz .C_retry ; Update attribute list lea eax, [ParentProcessHandle] pebcall PEB_KernelbaseDll, PEB_UpdateProcThreadAttribute, [StartupInformation + STARTUPINFOEXW.lpAttributeList], 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, eax, 4, NULL, NULL test eax, eax jz .C_retry ; Create process lea eax, [ExecutablePath] lea ebx, [StartupInformation] mov [ebx + STARTUPINFOEXW.StartupInfo.cb], sizeof.STARTUPINFOEXW lea ecx, [ProcessInformation] pebcall PEB_Kernel32Dll, PEB_CreateProcessW, eax, [CommandLine], NULL, NULL, FALSE, CREATE_SUSPENDED or EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, ebx, ecx test eax, eax jnz @f ; If GetLastError != ERROR_ELEVATION_REQUIRED, retry pebcall PEB_Kernel32Dll, PEB_GetLastError cmp eax, ERROR_ELEVATION_REQUIRED jne .C_retry ; If GetLastError == ERROR_ELEVATION_REQUIRED, repeat without parent process ID spoofing ; This happens, if the manifest specifies requireAdministrator lea eax, [ExecutablePath] lea ebx, [StartupInformation] mov [ebx + STARTUPINFOEXW.StartupInfo.cb], sizeof.STARTUPINFOEXW lea ecx, [ProcessInformation] pebcall PEB_Kernel32Dll, PEB_CreateProcessW, eax, [CommandLine], NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, ebx, ecx test eax, eax jz .C_retry @@: ; Unmap process memory pebcall PEB_NtdllDll, PEB_NtUnmapViewOfSection, [ProcessInformation + PROCESS_INFORMATION.hProcess], [ImageBase] ; Allocate memory pebcall PEB_Kernel32Dll, PEB_VirtualAllocEx, [ProcessInformation + PROCESS_INFORMATION.hProcess], [ImageBase], [SizeOfImage], MEM_RESERVE or MEM_COMMIT, PAGE_EXECUTE_READWRITE test eax, eax jz .C_retry_terminate ; Write section headers pebcall PEB_Kernel32Dll, PEB_WriteProcessMemory, [ProcessInformation + PROCESS_INFORMATION.hProcess], [ImageBase], [Executable], [SizeOfHeaders], NULL test eax, eax jz .C_retry_terminate ; Write sections mov [SectionCounter], 0 .L_sections: ; Get section header mov ebx, [Executable] mov ebx, [ebx + IMAGE_DOS_HEADER.e_lfanew] add ebx, [Executable] add ebx, sizeof.IMAGE_NT_HEADERS32 mov edx, [SectionCounter] imul edx, sizeof.IMAGE_SECTION_HEADER add ebx, edx ; Write RawData to target process mov edi, [ImageBase] add edi, [ebx + IMAGE_SECTION_HEADER.VirtualAddress] mov esi, [Executable] add esi, [ebx + IMAGE_SECTION_HEADER.PointerToRawData] mov ecx, [ebx + IMAGE_SECTION_HEADER.SizeOfRawData] test ecx, ecx jz .C_sections pebcall PEB_Kernel32Dll, PEB_WriteProcessMemory, [ProcessInformation + PROCESS_INFORMATION.hProcess], edi, esi, ecx, NULL test eax, eax jz .C_retry_terminate .C_sections: inc [SectionCounter] mov eax, [NumberOfSections] cmp [SectionCounter], eax jl .L_sections ; Allocate CONTEXT32 pebcall PEB_Kernel32Dll, PEB_GetProcessHeap pebcall PEB_NtdllDll, PEB_RtlAllocateHeap, eax, 0, sizeof.CONTEXT32 test eax, eax jz .C_retry_terminate mov [Context], eax ; Get thread context mov eax, [Context] mov [eax + CONTEXT32.ContextFlags], WOW64_CONTEXT_i386 or WOW64_CONTEXT_INTEGER pebcall PEB_Kernel32Dll, PEB_GetThreadContext, [ProcessInformation + PROCESS_INFORMATION.hThread], eax test eax, eax jz .C_retry_terminate ; Write base address to ebx + 8 mov edi, [Context] mov edi, [edi + CONTEXT32.Ebx] add edi, 8 lea esi, [ImageBase] pebcall PEB_Kernel32Dll, PEB_WriteProcessMemory, [ProcessInformation + PROCESS_INFORMATION.hProcess], edi, esi, 4, NULL test eax, eax jz .C_retry_terminate ; Write entry point to eax mov eax, [ImageBase] add eax, [EntryPoint] mov ebx, [Context] mov [ebx + CONTEXT32.Eax], eax ; Set thread context pebcall PEB_Kernel32Dll, PEB_SetThreadContext, [ProcessInformation + PROCESS_INFORMATION.hThread], [Context] test eax, eax jz .C_retry_terminate ; Resume thread pebcall PEB_Kernel32Dll, PEB_ResumeThread, [ProcessInformation + PROCESS_INFORMATION.hThread] cmp eax, -1 je .C_retry_terminate mov eax, 1 ret .C_retry_terminate: pebcall PEB_Kernel32Dll, PEB_TerminateProcess, [ProcessInformation + PROCESS_INFORMATION.hProcess], 0 .C_retry: dec [RetryCounter] cmp [RetryCounter], 0 jg .L_retry .error: xor eax, eax ret endp
; A234957: Highest power of 4 dividing n. ; 1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,64,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,64,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,64,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1,1,4,1,1,1,16,1,1,1,4,1,1,1,4,1,1 add $0,1 mul $0,2 lpb $0,1 div $0,2 mov $1,3 lpb $0,1 gcd $0,281474976710656 div $0,4 mul $1,2 lpe lpe pow $1,2 div $1,108 mul $1,3 add $1,1
; ******************************************************************************************** ; ******************************************************************************************** ; ; Name : dma.asm ; Purpose : .. ; Created : 15th Nov 1991 ; Updated : 4th Jan 2021 ; Authors : Fred Bowen ; ; ******************************************************************************************** ; ******************************************************************************************** ; DMA - Set up for DMA operation (FETCH/STASH/SWAP) ; ; Syntax: DMA command,length,source(l/h/b),destination(l/h/b)[,subcmd,mod(l/h)] [,...] dma ; params are not longer optional- [910520] F018A jsr getbyt ; get command l64_1 bcc l64_2 txa ; [910102] and #%00000100 ; +lbne fcerr ; (disallow chained DMA lists) stx dma2_cmd l64_2 jsr comwrd ; get length ; bcc l64_3 sty dma2_cnt_lo sta dma2_cnt_hi l64_3 jsr comwrd ; get source address & bank ; bcc l64_4 sty dma2_src_lo sta dma2_src_hi l64_4 jsr combyt ; bcc l64_5 stx dma2_src_bank l64_5 jsr comwrd ; get destination address & bank ; bcc l64_6 sty dma2_dest_lo sta dma2_dest_hi l64_6 jsr combyt ; bcc l64_7 stx dma2_dest_bank l64_7 jsr optzer ; get subcmd, default=0 [910520] F018A ; bcc l64_8 stx dma2_subcmd l64_8 jsr optzer ; get mod lo/hi, default=0 [910102] ; bcc l64_9 stx dma2_mod_lo l64_9 jsr optzer ; bcc l64_10 stx dma2_mod_hi l64_10 ldy #0 ; dma_list (bank 0) ldx #>dma2_cmd lda #<dma2_cmd sty dma_ctlr+2 ; dma_list bank stx dma_ctlr+1 ; dma_list hi sta dma_ctlr ; dma_list lo & trigger l64_11 bit dma_ctlr+3 ; check status (in case IRQ enabled) [910103] bmi l64_11 ; busy jsr chrgot ; eol? beq l64_12 ; yes jsr optbyt ; no- continue after getting comma & next cmd byte bra l64_1 l64_12 rts ;.end ; ******************************************************************************************** ; ; Date Changes ; ==== ======= ; ; ********************************************************************************************
; A341389: Characteristic function of A158705, nonnegative integers with an odd number of even powers of 2 in their base-2 representation. ; 0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,1,0,1,0 lpb $0 add $1,$0 div $0,4 lpe mod $1,2 mov $0,$1
* Network remote file utils V0.1  1985 Tony Tebby QJUMP * section nd * xdef nf_chkrd check buffer for read xdef nf_chkwr check buffer for write * xdef nf_wblok write a block xdef nf_send send a packet xdef nf_sendw send a packet and wait xdef nf_setwr set up to write a block xdef nf_rstwr reset the pointers after writing xdef nf_setky set key and ID in packet xdef nf_setact set key, ID, d1 and d2 xdef nf_setln set length of packet * xref nf_eof set end of file * xref nd_rept do repeated op xref nd_read0 read 0 block xref nd_send0 send 0 block * include dev8_dd_qlnd_keys * * send a packet and get reply (waiting) * nf_sendw lea nd_send0(pc),a2 set address of send bsr.l nd_rept and try repeatedly bne.s nfsp_rts ... oops nf_readw lea nd_read0(pc),a2 set address of read bsr.l nd_rept and try repeatedly bne.s nfsp_rts lea nd_data(a0),a5 set address of block nfsp_rts rts * * Setup to write block * nf_setwr moveq #nf.sblk,d0 send block key bsr.s nf_setky set key and ID move.l nf_bfbot(a0),d0 bottom file address in buffer move.l d0,(a5)+ move.l nf_bffil(a0),d5 address filled to sub.l d0,d5 amount to send move.l d5,(a5)+ moveq #$f,d0 round up to multiple of four bytes add.l d5,d0 ... and include 3 long word preamble lsr.w #2,d0 move.b d0,nd_nbyt(a0) set length to send (/4) rts * * Write block (if modified), OK return is 0 or +ve * nf_wblok tst.b nf_valid(a0) is block modified? bge.s nfw_rts ... no bsr.s nf_setwr set up to write bsr.s nf_send send packet to read or write block bne.s nfw_rts * * Reset pointers after successful write packet (done is + or zero) * nf_rstwr move.l (a5)+,d0 get error code beq.l nfc_valid ... done moveq #err.nc,d7 we can only adjust if nc cmp.l d7,d0 blt.s nfw_rts ... oops move.l (a5)+,d7 get number of bytes sent add.l d7,nf_bfbot(a0) adjust the pointers add.l d7,nf_bftop(a0) * sub.w d7,d5 number of bytes not sent addq.l #4,a5 skip third long word of data block nf_adjloop move.b (a5,d7.l),(a5)+ move byte down subq.w #1,d5 bgt.s nf_adjloop tst.l d0 set error code nfw_rts rts * * Send packet and wait for reply * nf_send bsr.l nd_send0 and send block 0 tst.l d0 (+ve could be not complete too!!) blt.s nfw_rts ... oops bra.s nf_readw wait for response page * * Setup key (and channel ID) * nf_setky move.b d0,nd_type(a0) set type of transaction lea nd_data(a0),a5 address of data block move.l a5,a2 save the address move.l nf_chid(a0),(a5)+ set channel ID rts * * Set action only packet * nf_setact bsr.s nf_setky set key and ID move.l d1,(a5)+ set d1,d2 move.l d2,(a5)+ * nf_setln lea nd_data(a0),a2 reset base of data block move.l a5,d5 find the length of the data block sub.l a2,d5 move.b d5,nd_nbyt(a0) and set it rts page * * Check if current block is the required one, OK return is 0 or +ve * nf_chkrd move.l nf_bfpnt(a0),d6 get current pointer tst.b nf_eoff(a0) eof set? beq.s nf_ckrd1 ... no cmp.l nf_eofpt(a0),d6 ... off eof? bge.l nf_eof ... ... yes nf_ckrd1 move.l nf_bffil(a0),d5 for read, check against fill address tst.b nf_sonly(a0) is it serial only? beq.s nf_chkbf ... no, check the block tst.b nf_valid(a0) is it modified? bge.s nf_chkfl ... no, check if pointer off buffer bsr.s nf_wblk1 ... yes, write buffer blt.s nfc_rts1 bra.s nf_rblok and read next one * nf_chkfl cmp.l d5,d6 out of buffer? blt.s nfc_ok1 ... no, ok bra.s nf_rblok ... yes, read next block * nf_chkwr move.l nf_bftop(a0),d5 for write, check against top address move.l nf_bfpnt(a0),d6 set current pointer tst.b nf_sonly(a0) is it serial only? beq.s nf_chkbf ... no tst.b nf_valid(a0) ... yes, is it part full? blt.s nf_chksw ... yes, check room lea nf_bfbot(a0),a5 and reset pointers clr.l (a5)+ clr.l (a5)+ move.l #$100,(a5)+ short buffer only for serial clr.l (a5) rts returns zero * nf_chksw cmp.l d5,d6 room in buffer? blt.s nfc_ok1 ... yes nf_wblk1 bra.l nf_wblok write out buffer * nf_chkbf tst.b nf_valid(a0) is buffer valid? beq.s nf_rblok ... no, read buffer cmp.l nf_bfbot(a0),d6 is pointer within buffer? blt.s nfc_gblok ... off bottom cmp.l d5,d6 off top? nfc_ok1 blt.s nfc_ok ... no, ok * nfc_gblok bsr.s nf_wblk1 write block (if modified) nfc_rts1 blt.s nfc_rts ... oops * nf_rblok sf nf_valid(a0) say block invalid in case transfer fails moveq #$ffffff80,d7 lsl.w #2,d7 d7 is 512 byte block mask moveq #$40,d0 d0 is header offset move.l d7,d5 neg.l d5 d5 is block length add.l d0,d6 and.l d6,d7 d7 is start of block + header sub.l d0,d7 d7 is start of block bgt.s nf_rb_do ... ok moveq #0,d7 start of file sub.l d0,d5 read part block only * nf_rb_do moveq #nf.rblk,d0 set read block key bsr.l nf_setky set key move.l d7,(a5)+ set block required move.l d5,(a5)+ set length of block move.l d7,nf_bfbot(a0) set buffer pointers move.l d7,nf_bffil(a0) add.l d5,d7 move.l d7,nf_bftop(a0) bsr.l nf_setln set length of packet bsr.l nf_send send packet and wait for reply bne.s nfc_rts ... oops * move.l (a5)+,d0 get error code move.l (a5)+,d5 add number of bytes read add.l d5,nf_bffil(a0) to fill address moveq #err.nc,d7 check for not complete or OK cmp.l d7,d0 bge.s nfc_sset ... yes, reset pointer if serial only moveq #err.ef,d7 check for end of file cmp.l d7,d0 bne.s nfc_rts ... no st nf_eoff(a0) set eof flag move.l nf_bffil(a0),nf_eofpt(a0) ... and eof pointer nfc_sset tst.b nf_sonly(a0) is it serial only? beq.s nfc_valid ... no move.l nf_bfbot(a0),nf_bfpnt(a0) .. yes, reset pointer to base of buffer nfc_valid move.b #1,nf_valid(a0) say contents valid nfc_ok moveq #0,d0 done nfc_rts rts end
.data textCh: .asciiz "Choose your set:\n1. Julia\n2. Mandelbrot\nChoice: " text0: .asciiz "Enter number of iterations: " text1: .asciiz "Enter in format: 0.0000\nEnter xc: 0." text2: .asciiz "Enter yc: 0." text3: .asciiz "Enter xn: 0." text4: .asciiz "Enter yn: 0." text5: .asciiz "\nFinished, result saved to JuliaRes.bmp" bmpHeader: .space 54 bmpBuffer: .space 750000 bmpRes: .word 500 500 scale: .word 50 30 20 filenameIn: .asciiz "in.bmp" filenameOut: .asciiz "FractalRes.bmp" .text .globl main main: la $a0, textCh li $v0, 4 syscall li $v0, 5 syscall la $s4, ($v0) # s4 = choice # Set starting values la $s2, bmpRes lw $s0, 0($s2) # width lw $s1, 4($s2) # height la $s2, bmpBuffer li $t1, 0 # pixel x li $t2, 0 # pixel y li $s3, 10000 # limit la $a0, text0 li $v0, 4 syscall li $v0, 5 syscall la $t3, ($v0) # t3 = number of iterations beq $s4, 2, iteratePixel # Additional Julia parameters la $a0, text1 li $v0, 4 syscall li $v0, 5 syscall la $t4, ($v0) # t4 = xc la $a0, text2 li $v0, 4 syscall li $v0, 5 syscall la $t5, ($v0) # t5 = yc iteratePixel: li $t0, 0 # t0 = no of curr iteration mult $t1, $s3 mflo $t6 div $t6, $s0 mflo $t6 # Re value of pixel mult $t2, $s3 mflo $t7 div $t7, $s1 mflo $t7 # Im value of pixel beq $s4, 2, mLoopS jLoop: # zn = zn^2 + c mult $t6, $t7 # xy mflo $t9 div $t9, $t9, 10000 mflo $t9 sll $t9, $t9, 1 # 2xy # zn^2 mult $t6, $t6 mflo $t6 div $t6, $t6, 10000 #mflo $t6 mult $t7, $t7 mflo $t7 div $t7, $t7, 10000 #mflo $t7 sub $t6, $t6, $t7 move $t7, $t9 # zn + c add $t6, $t6, $t4 # xn = xn + xc add $t7, $t7, $t5 # yn = yn + yc # check if zn is out of range mult $t6, $t6 # xn^2 mflo $t8 div $t8, $t8, 10 mult $t7, $t7 # yn^2 mflo $t9 div $t9, $t9, 10 add $t8, $t8, $t9 bge $t8, 40000000, loop_end # |zn| < 2 addi $t0, $t0, 1 # no of current iteration +1 bge $t0, $t3, loop_end b jLoop mLoopS: move $t4, $t6 move $t5, $t7 li $t6, 0 li $t7, 0 mLoop: # zn = zn^2 + p mult $t6, $t7 # xy mflo $t9 div $t9, $t9, 10000 mflo $t9 sll $t9, $t9, 1 # 2xy # zn^2 mult $t6, $t6 mflo $t6 div $t6, $t6, 10000 mflo $t6 mult $t7, $t7 mflo $t7 div $t7, $t7, 10000 mflo $t7 sub $t6, $t6, $t7 move $t7, $t9 # zn + c add $t6, $t6, $t4 # xn = xn + xc add $t7, $t7, $t5 # yn = yn + yc # check if zn is out of range mult $t6, $t6 # xn^2 mflo $t8 div $t8, $t8, 10 mult $t7, $t7 # yn^2 mflo $t9 div $t9, $t9, 10 add $t8, $t8, $t9 bge $t8, 40000000, loop_end # |zn| < 2 addi $t0, $t0, 1 # no of current iteration +1 bge $t0, $t3, loop_end b mLoop loop_end: # COLOURING ## RED la $t9, scale lw $t9, ($t9) mult $t0, $t9 mflo $t8 li $a0, 256 div $t8, $a0 mfhi $t8 sb $t8, ($s2) ## GREEN la $t9, scale lw $t9, 4($t9) mult $t0, $t9 mflo $t8 li $a0, 256 div $t8, $a0 mfhi $t8 sb $t8, 1($s2) ## BLUE la $t9, scale lw $t9, 8($t9) mult $t0, $t9 mflo $t8 li $a0, 256 div $t8, $a0 mfhi $t8 sb $t8, 2($s2) # writing to memory addi $s2, $s2, 3 # go to next pixel addi $t1, $t1, 1 blt $t1, $s0, iteratePixel li $t1, 0 addi $t2, $t2, 1 blt $t2, $s1, iteratePixel b setEnd setEnd: # open file 'in.bmp' la $a0, filenameIn li $a1, 0 li $a2, 0 li $v0, 13 syscall move $a0, $v0 li $v0, 14 # read bmp header from file la $a1, bmpHeader li $a2, 54 syscall # close file 'in.bmp' li $v0, 16 syscall la $a0, filenameOut li $a1, 1 li $a2, 0 li $v0, 13 syscall move $a0, $v0 la $a1, bmpHeader li $a2, 54 li $v0, 15 syscall la $a1, bmpBuffer li $a2, 750000 li $v0, 15 syscall # CLOSING FILE li $v0, 16 syscall b exit exit: li $v0, 10 syscall
section .text %macro array 2 [section .bss] %1 resb %2 [section .data] db ";" %endmacro [section .bss] array input, 128 array fd_out, 1 array fd_in, 1 array buffer, 24 [section .data] error db " Error:: ", ";" layer1 dd 0, ";" layer2 dd 0, ";" layer3 dd 0, ";" num dd 0, ";" section .text ;LAYER 1 FUNCTIONS gout: pop eax mov [layer1], eax call Finish pop edi ;copy push edi ;paste call DBgetLenght pop edx mov ecx, edi mov ebx, 1 mov eax, 4 int 80h mov eax, dword [layer1] push eax ret gin: call Finish pop eax mov [layer1], eax mov eax, 3 mov ebx, 2 pop ecx mov edx, 128 int 80h mov eax, dword [layer1] push eax ret getLenght: pop eax mov [layer2], eax call Finish pop esi ;get pointer to string xchg ecx, ecx getLenghtlop: mov bl, byte [esi] inc esi add ecx, 1 cmp bl, ";" jne getLenghtlop sub ecx, 1 push ecx mov eax, dword [layer2] push eax ret DBgetLenght: pop eax mov [layer3], eax pop esi ;get pointer to string xchg ecx, ecx DBgetLenghtlop: mov bl, byte [esi] inc esi add ecx, 1 cmp bl, ";" jne DBgetLenghtlop sub ecx, 1 push ecx mov eax, dword [layer3] push eax ret nout: call Finish pop eax mov [layer1], eax pop edx mov [num], edx push num pop edx mov ecx, 4 mov ebx, 1 mov eax, 4 int 80h mov eax, dword [layer1] push eax ret ;LAYER 2 FUNCTIONS createFile: pop eax mov [layer2], eax call Finish mov eax, 8 pop ebx mov ecx, 0777 int 0x80 mov [fd_out], eax ;out mov eax, dword [layer2] push eax ret writeFile: pop eax mov [layer2], eax call Finish pop edx pop ecx mov ebx, [fd_out] ;out mov eax,4 int 0x80 mov eax, dword [layer2] push eax ret closeFile: call Finish mov eax, 6 mov ebx, [fd_out] ;out ret openFile: pop eax mov [layer2], eax call Finish mov eax, 5 pop ebx mov ecx, 0 mov edx, 0777 int 0x80 mov [fd_in], eax mov eax, dword [layer2] push eax ret readFile: pop eax mov [layer2], eax call Finish pop edx pop ecx mov eax, 3 mov ebx, [fd_in] int 0x80 mov eax, dword [layer2] push eax ret ;LAYER 3 FUNCTIONS
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/accessibility/magnification_manager.h" #include <limits> #include "ash/magnifier/magnification_controller.h" #include "ash/magnifier/partial_magnification_controller.h" #include "ash/session_state_delegate.h" #include "ash/shell.h" #include "ash/shell_delegate.h" #include "ash/system/tray/system_tray_notifier.h" #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" #include "base/prefs/pref_member.h" #include "base/prefs/pref_service.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/common/pref_names.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" namespace chromeos { namespace { static MagnificationManager* g_magnification_manager = NULL; } class MagnificationManagerImpl : public MagnificationManager, public content::NotificationObserver, public ash::SessionStateObserver { public: MagnificationManagerImpl() : first_time_update_(true), profile_(NULL), magnifier_enabled_pref_handler_(prefs::kScreenMagnifierEnabled), magnifier_type_pref_handler_(prefs::kScreenMagnifierType), magnifier_scale_pref_handler_(prefs::kScreenMagnifierScale), type_(ash::kDefaultMagnifierType), enabled_(false) { registrar_.Add(this, chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, content::NotificationService::AllSources()); registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, content::NotificationService::AllSources()); registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED, content::NotificationService::AllSources()); } virtual ~MagnificationManagerImpl() { CHECK(this == g_magnification_manager); } // MagnificationManager implimentation: virtual bool IsMagnifierEnabled() const OVERRIDE { return enabled_; } virtual ash::MagnifierType GetMagnifierType() const OVERRIDE { return type_; } virtual void SetMagnifierEnabled(bool enabled) OVERRIDE { if (!profile_) return; PrefService* prefs = profile_->GetPrefs(); prefs->SetBoolean(prefs::kScreenMagnifierEnabled, enabled); prefs->CommitPendingWrite(); } virtual void SetMagnifierType(ash::MagnifierType type) OVERRIDE { if (!profile_) return; PrefService* prefs = profile_->GetPrefs(); prefs->SetInteger(prefs::kScreenMagnifierType, type); prefs->CommitPendingWrite(); } virtual void SaveScreenMagnifierScale(double scale) OVERRIDE { if (!profile_) return; profile_->GetPrefs()->SetDouble(prefs::kScreenMagnifierScale, scale); } virtual double GetSavedScreenMagnifierScale() const OVERRIDE { if (!profile_) return std::numeric_limits<double>::min(); return profile_->GetPrefs()->GetDouble(prefs::kScreenMagnifierScale); } virtual void SetProfileForTest(Profile* profile) OVERRIDE { SetProfile(profile); } // SessionStateObserver overrides: virtual void ActiveUserChanged(const std::string& user_id) OVERRIDE { SetProfile(ProfileManager::GetActiveUserProfile()); } private: void SetProfile(Profile* profile) { pref_change_registrar_.reset(); if (profile) { // TODO(yoshiki): Move following code to PrefHandler. pref_change_registrar_.reset(new PrefChangeRegistrar); pref_change_registrar_->Init(profile->GetPrefs()); pref_change_registrar_->Add( prefs::kScreenMagnifierEnabled, base::Bind(&MagnificationManagerImpl::UpdateMagnifierFromPrefs, base::Unretained(this))); pref_change_registrar_->Add( prefs::kScreenMagnifierType, base::Bind(&MagnificationManagerImpl::UpdateMagnifierFromPrefs, base::Unretained(this))); } magnifier_enabled_pref_handler_.HandleProfileChanged(profile_, profile); magnifier_type_pref_handler_.HandleProfileChanged(profile_, profile); magnifier_scale_pref_handler_.HandleProfileChanged(profile_, profile); profile_ = profile; UpdateMagnifierFromPrefs(); } virtual void SetMagnifierEnabledInternal(bool enabled) { // This method may be invoked even when the other magnifier settings (e.g. // type or scale) are changed, so we need to call magnification controller // even if |enabled| is unchanged. Only if |enabled| is false and the // magnifier is already disabled, we are sure that we don't need to reflect // the new settings right now because the magnifier keeps disabled. if (!enabled && !enabled_) return; enabled_ = enabled; if (type_ == ash::MAGNIFIER_FULL) { ash::Shell::GetInstance()->magnification_controller()->SetEnabled( enabled_); } else { ash::Shell::GetInstance()->partial_magnification_controller()->SetEnabled( enabled_); } } virtual void SetMagnifierTypeInternal(ash::MagnifierType type) { if (type_ == type) return; type_ = ash::MAGNIFIER_FULL; // (leave out for full magnifier) } void UpdateMagnifierFromPrefs() { if (!profile_) return; const bool enabled = profile_->GetPrefs()->GetBoolean(prefs::kScreenMagnifierEnabled); const int type_integer = profile_->GetPrefs()->GetInteger(prefs::kScreenMagnifierType); ash::MagnifierType type = ash::kDefaultMagnifierType; if (type_integer > 0 && type_integer <= ash::kMaxMagnifierType) { type = static_cast<ash::MagnifierType>(type_integer); } else if (type_integer == 0) { // Type 0 is used to disable the screen magnifier through policy. As the // magnifier type is irrelevant in this case, it is OK to just fall back // to the default. } else { NOTREACHED(); } if (!enabled) { SetMagnifierEnabledInternal(enabled); SetMagnifierTypeInternal(type); } else { SetMagnifierTypeInternal(type); SetMagnifierEnabledInternal(enabled); } AccessibilityStatusEventDetails details( enabled_, type_, ash::A11Y_NOTIFICATION_NONE); content::NotificationService::current()->Notify( chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, content::NotificationService::AllSources(), content::Details<AccessibilityStatusEventDetails>(&details)); #if defined(OS_CHROMEOS) if (ash::Shell::GetInstance() && AccessibilityManager::Get()) { ash::Shell::GetInstance()->SetCursorCompositingEnabled( AccessibilityManager::Get()->ShouldEnableCursorCompositing()); } #endif } // content::NotificationObserver implementation: virtual void Observe(int type, const content::NotificationSource& source, const content::NotificationDetails& details) OVERRIDE { switch (type) { case chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE: { // Update |profile_| when entering the login screen. Profile* profile = ProfileManager::GetActiveUserProfile(); if (ProfileHelper::IsSigninProfile(profile)) SetProfile(profile); break; } case chrome::NOTIFICATION_SESSION_STARTED: // Update |profile_| when entering a session. SetProfile(ProfileManager::GetActiveUserProfile()); // Add a session state observer to be able to monitor session changes. if (!session_state_observer_.get() && ash::Shell::HasInstance()) session_state_observer_.reset( new ash::ScopedSessionStateObserver(this)); break; case chrome::NOTIFICATION_PROFILE_DESTROYED: { // Update |profile_| when exiting a session or shutting down. Profile* profile = content::Source<Profile>(source).ptr(); if (profile_ == profile) SetProfile(NULL); break; } } } bool first_time_update_; Profile* profile_; AccessibilityManager::PrefHandler magnifier_enabled_pref_handler_; AccessibilityManager::PrefHandler magnifier_type_pref_handler_; AccessibilityManager::PrefHandler magnifier_scale_pref_handler_; ash::MagnifierType type_; bool enabled_; content::NotificationRegistrar registrar_; scoped_ptr<PrefChangeRegistrar> pref_change_registrar_; scoped_ptr<ash::ScopedSessionStateObserver> session_state_observer_; DISALLOW_COPY_AND_ASSIGN(MagnificationManagerImpl); }; // static void MagnificationManager::Initialize() { CHECK(g_magnification_manager == NULL); g_magnification_manager = new MagnificationManagerImpl(); } // static void MagnificationManager::Shutdown() { CHECK(g_magnification_manager); delete g_magnification_manager; g_magnification_manager = NULL; } // static MagnificationManager* MagnificationManager::Get() { return g_magnification_manager; } } // namespace chromeos
; ; $Id: bcm953314p24ref.asm,v 1.11 2011/05/22 23:38:42 iakramov Exp $ ; ; This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. ; ; Copyright 2007-2020 Broadcom Inc. All rights reserved. ; ; ; This is the default program for the (24 port) BCM953314P24REF ; reference board. ; To start it, use the following commands from BCM: ; ; led load bcm953314p24ref.hex ; led auto on ; led start ; ; The are 2 LEDs per FE port one for Link(Left) and one for activity(Right). ; ; There are two bits per fast Ethernet LED with the following colors: ; ZERO, ZERO Black ; ZERO, ONE Amber ; ONE, ZERO Green ; ; Each chip drives only its own LEDs and needs to write them in the order: ; A01, L01, A02, L02, ..., A24, L24 ; ; Link up/down info cannot be derived from LINKEN or LINKUP, as the LED ; processor does not always have access to link status. This program ; assumes link status is kept current in bit 0 of RAM byte (0xa0 + portnum). ; Generally, a program running on the main CPU must update these ; locations on link change; see linkscan callback in ; $SDK/src/appl/diag/ledproc.c. ; ; Current implementation: ; ; L01 reflects port 1 link status: ; Black: no link ; Amber: 10 Mb/s ; Green: 100 Mb/s ; Alternating green/amber: 1000 Mb/s ; Very brief flashes of black at 1 Hz: half duplex ; Longer periods of black: collisions in progress ; ; A01 reflects port 1 activity (even if port is down) ; Black: idle ; Green: RX (pulse extended to 1/3 sec) ; Amber: TX (pulse extended to 1/3 sec, takes precedence over RX) ; Green/Amber alternating at 6 Hz: both RX and TX ; TICKS EQU 1 SECOND_TICKS EQU (30*TICKS) MIN_FE_PORT EQU 1 MAX_FE_PORT EQU 24 NUM_FE_PORT EQU 24 NUM_PORT EQU 24 ; The TX/RX activity lights will be extended for ACT_EXT_TICKS ; so they will be more visible. ACT_EXT_TICKS EQU (SECOND_TICKS/20) ; GIG_ALT_TICKS EQU (SECOND_TICKS/2) ; HD_OFF_TICKS EQU (SECOND_TICKS/20) ; HD_ON_TICKS EQU (SECOND_TICKS-HD_ON_TICKS) TXRX_ALT_TICKS EQU (SECOND_TICKS/8) ; ; Main Update Routine ; ; This routine is called once per tick. ; update: ld a, MIN_FE_PORT up1: port a ld (PORT_NUM),a call link_status ; Left LED for this port call activity ; Right LED for this port ld a,(PORT_NUM) inc a cmp a, MAX_FE_PORT+1 jnz up1 ; Update various timers ld b,TXRX_ALT_COUNT inc (b) ld a,(b) cmp a,TXRX_ALT_TICKS jc up2 ld (b),0 up2: send 96 ; 2 * 2 * 24 ; ; activity ; ; This routine calculates the activity LED for the current port. ; It extends the activity lights using timers (new activity overrides ; and resets the timers). ; ; Inputs: (PORT_NUM) ; Outputs: Two bits sent to LED stream ; activity: pushst RX pushst TX tor pop jnc act1 ld b,TXRX_TIMERS ; Start TXRX LED extension timer add b,(PORT_NUM) ld a,ACT_EXT_TICKS ld (b),a act1: ld b,TXRX_TIMERS ; Check TXRX LED extension timer add b,(PORT_NUM) dec (b) jnc act2 ; TXRX active? inc (b) ld a,(PORT_NUM) call get_link ;pushst LINKUP ;pop jnc led_black jmp led_amber ; No activity act2: ; Both TX and RX active ld b,(TXRX_ALT_COUNT) cmp b,TXRX_ALT_TICKS/2 jc led_black ; Fast alternation of green/amber jmp led_amber ; ; link_status ; ; This routine calculates the link status LED for the current port. ; ; Inputs: (PORT_NUM) ; Outputs: Two bits sent to LED stream ; Destroys: a, b ; link_status: ;pushst LINKUP ;pop ld a,(PORT_NUM) call get_link jnc led_black pushst SPEED_C ; Check for 100Mb speed pop jc led_amber pushst SPEED_M ; Check for 10Mb (i.e. not 100 or 1000) pop jnc led_black jmp led_green ; ; get_link ; ; This routine finds the link status LED for a port. ; Link info is in bit 0 of the byte read from PORTDATA[port] ; ; Inputs: Port number in a ; Outputs: Carry flag set if link is up, clear if link is down. ; Destroys: a, b ; get_link: ld b,PORTDATA add b,a ld b,(b) tst b,0 ret ; ; led_black, led_amber, led_green ; ; Inputs: None ; Outputs: Two bits to the LED stream indicating color ; Destroys: None ; led_amber: pushst ZERO pack pushst ONE pack ret led_green: pushst ONE pack pushst ZERO pack ret led_black: pushst ONE pack pushst ONE pack ret ; ; Variables (SDK software initializes LED memory from 0xa0-0xff to 0) ; TXRX_ALT_COUNT equ 0xe0 HD_COUNT equ 0xe1 GIG_ALT_COUNT equ 0xe2 PORT_NUM equ 0xe3 ; ; Port data, which must be updated continually by main CPU's ; linkscan task. See $SDK/src/appl/diag/ledproc.c for examples. ; In this program, bit 0 is assumed to contain the link up/down status. ; PORTDATA equ 0xa0 ; Size 24 + 6? bytes ; ; LED extension timers ; TXRX_TIMERS equ 0xe4 ; NUM_PORT bytes C0 - DF ;TX_TIMERS equ 0xe0 ; NUM_PORT bytes E0 - FF ; ; Symbolic names for the bits of the port status fields ; RX equ 0x0 ; received packet TX equ 0x1 ; transmitted packet COLL equ 0x2 ; collision indicator SPEED_C equ 0x3 ; 100 Mbps SPEED_M equ 0x4 ; 1000 Mbps DUPLEX equ 0x5 ; half/full duplex FLOW equ 0x6 ; flow control capable LINKUP equ 0x7 ; link down/up status LINKEN equ 0x8 ; link disabled/enabled status ZERO equ 0xE ; always 0 ONE equ 0xF ; always 1
// stdafx.cpp : source file that includes just the standard includes // NodeSpinPort.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #define NODESPINPORT_DLL #include "stdafx.h"
/* * Copyright (C) 2018 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "gazebo/test/ServerFixture.hh" #include "gazebo/test/helper_physics_generator.hh" using namespace gazebo; ///////////////////////////////////////////////// class Issue2430Test : public ServerFixture, public ::testing::WithParamInterface<const char *> { ///////////////////////////////////////////////// public: virtual void SetUp() override { const ::testing::TestInfo *const test_info = ::testing::UnitTest::GetInstance()->current_test_info(); if (test_info->value_param()) { gzdbg << "Params: " << test_info->value_param() << std::endl; this->physicsEngine = GetParam(); } } ///////////////////////////////////////////////// public: void TestJointInitialization(const double initialPosition) { if ( "simbody" == this->physicsEngine ) { gzdbg << "Test is disabled for " << this->physicsEngine << ", skipping\n"; // This test is disabled for Simbody, because the ability to set // joint positions for that physics engine is not available yet in // Gazebo. return; } gzdbg << "Testing [" << initialPosition*180.0/M_PI << "] degrees\n"; // Load the test world this->Load("worlds/test/issue_2430_revolute_joint_SetPosition.world", true, this->physicsEngine, {}); physics::WorldPtr world = physics::get_world("default"); ASSERT_NE(nullptr, world); // Verify the physics engine physics::PhysicsEnginePtr physics = world->Physics(); ASSERT_NE(nullptr, physics); physics::ModelPtr model = world->ModelByName("revolute_model"); ASSERT_NE(nullptr, model); physics::JointPtr joint = model->GetJoint("revolute_joint"); ASSERT_NE(nullptr, joint); EXPECT_NEAR(0.0, joint->Position(0), 1e-6); // We use a tolerance relative to the size of the angle, because 1e-6 is not // tolerant enough for the large angles. const double tolerance = 1e-6*std::abs(initialPosition); if (this->physicsEngine == "bullet" && std::abs(initialPosition) > 1e12) { EXPECT_FALSE(joint->SetPosition(0, initialPosition)); } else { EXPECT_TRUE(joint->SetPosition(0, initialPosition)); world->Step(1); // There is no gravity, and there are no forces acting on the bodies or // the joint, so the joint position value should still be the same. const double initialResultPosition = joint->Position(0); EXPECT_NEAR(initialPosition, initialResultPosition, tolerance); } //----------------------------------- // Move the angle to make sure that Joint::SetPosition works from non-zero // initial values. const double finalPosition = 0.5*initialPosition; if (this->physicsEngine == "bullet" && std::abs(finalPosition) > 1e12) { EXPECT_FALSE(joint->SetPosition(0, finalPosition)); } else { EXPECT_TRUE(joint->SetPosition(0, finalPosition)); world->Step(1); const double finalResultPosition = joint->Position(0); EXPECT_NEAR(finalPosition, finalResultPosition, tolerance); } } protected: std::string physicsEngine; }; ///////////////////////////////////////////////// TEST_P(Issue2430Test, Positive20Degrees) { this->TestJointInitialization(20.0*M_PI/180.0); } ///////////////////////////////////////////////// TEST_P(Issue2430Test, Negative20Degrees) { this->TestJointInitialization(-20.0*M_PI/180.0); } ///////////////////////////////////////////////// TEST_P(Issue2430Test, Positive200Degrees) { this->TestJointInitialization(200.0*M_PI/180.0); } ///////////////////////////////////////////////// TEST_P(Issue2430Test, Negative200Degrees) { this->TestJointInitialization(-200.0*M_PI/180.0); } ///////////////////////////////////////////////// TEST_P(Issue2430Test, LargePositiveAngle) { this->TestJointInitialization(100000*M_PI/180.0); } ///////////////////////////////////////////////// TEST_P(Issue2430Test, LargeNegativeAngle) { this->TestJointInitialization(-100000*M_PI/180.0); } ///////////////////////////////////////////////// TEST_P(Issue2430Test, SuperLargeAngle) { this->TestJointInitialization(1e15); } ///////////////////////////////////////////////// INSTANTIATE_TEST_CASE_P(PhysicsEngines, Issue2430Test, PHYSICS_ENGINE_VALUES,); // NOLINT ///////////////////////////////////////////////// int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
; A160796: Total number of "ON" cells at n-th stage in simple 2-dimensional cellular automaton which is the "corner" structure corresponding to A160118. ; Submitted by Jon Maiga ; 0,1,8,11,32,35,56,65,128,131,152,161,224,233,296,323,512,515,536,545,608,617,680,707,896,905,968,995,1184,1211,1400,1481,2048,2051,2072,2081,2144,2153,2216,2243,2432,2441,2504,2531,2720,2747,2936 lpb $0 sub $0,1 mov $2,$0 max $2,0 seq $2,160797 ; First differences of A160796. add $3,$2 lpe mov $0,$3
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r9 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x14ee5, %r11 nop nop nop nop nop add $42497, %r12 mov (%r11), %r10d nop nop nop nop nop sub %rbx, %rbx lea addresses_UC_ht+0xd2d, %r9 nop nop xor %rbp, %rbp mov $0x6162636465666768, %r11 movq %r11, %xmm2 vmovups %ymm2, (%r9) nop nop nop nop inc %r10 lea addresses_WC_ht+0x1d7e5, %rsi lea addresses_D_ht+0xfe5, %rdi nop nop nop add $14688, %r11 mov $0, %rcx rep movsw nop nop nop nop and %r9, %r9 lea addresses_A_ht+0xa465, %rsi nop nop nop nop nop add %r12, %r12 mov $0x6162636465666768, %r9 movq %r9, %xmm6 movups %xmm6, (%rsi) nop nop nop and %rbp, %rbp lea addresses_normal_ht+0x1ce65, %rbp nop nop nop nop nop and $23391, %rsi mov $0x6162636465666768, %rdi movq %rdi, %xmm4 vmovups %ymm4, (%rbp) nop nop nop sub %rbx, %rbx lea addresses_A_ht+0x1d5cc, %rsi lea addresses_normal_ht+0x7fe5, %rdi clflush (%rdi) sub %r11, %r11 mov $37, %rcx rep movsq xor %r10, %r10 lea addresses_UC_ht+0x92c9, %rsi lea addresses_normal_ht+0x1a9e5, %rdi inc %r10 mov $60, %rcx rep movsb xor $56721, %rcx lea addresses_normal_ht+0xf9e5, %r9 nop nop nop sub %r10, %r10 mov $0x6162636465666768, %r12 movq %r12, %xmm5 vmovups %ymm5, (%r9) nop nop sub %r10, %r10 lea addresses_normal_ht+0x150b1, %rsi lea addresses_UC_ht+0x1e865, %rdi nop nop nop and %r9, %r9 mov $78, %rcx rep movsw nop nop nop nop nop add %r12, %r12 pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r8 push %rax push %rdi push %rdx push %rsi // Store lea addresses_UC+0x1d6c5, %rdx nop nop nop xor %r11, %r11 mov $0x5152535455565758, %rax movq %rax, (%rdx) nop nop add %rsi, %rsi // Store lea addresses_WC+0x79e5, %rsi nop nop nop nop nop xor $33086, %r8 movw $0x5152, (%rsi) nop nop nop nop dec %rdi // Store lea addresses_US+0x1313d, %rdx nop nop nop nop nop sub $62240, %r11 mov $0x5152535455565758, %rdi movq %rdi, %xmm6 vmovups %ymm6, (%rdx) nop nop xor $24894, %rsi // Store lea addresses_D+0x1e475, %rdi clflush (%rdi) nop nop and %rdx, %rdx movl $0x51525354, (%rdi) nop and %rsi, %rsi // Faulty Load lea addresses_RW+0xf1e5, %r11 clflush (%r11) sub %rdi, %rdi movb (%r11), %al lea oracles, %r8 and $0xff, %rax shlq $12, %rax mov (%r8,%rax,1), %rax pop %rsi pop %rdx pop %rdi pop %rax pop %r8 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 11, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 2, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 4, 'size': 4, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 8, 'size': 4, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 2, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 16, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 11, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
link l1:ct link l2:rdm link rb: 8,9,10,z equ ax: r0 equ cx: r1 equ dx: r2 equ bx: r3 equ sp: r4 equ bp: r5 equ si: r6 equ ddi: r7 equ cs: r8 equ ss: r9 equ ds: r10 equ ip: r12 equ es: r11 equ pom1: r13 equ pom2: r14 equ rr: r15 accept cx:0003h accept ax:0000h accept bx:0000h accept dx:0000h accept cs:789Ah accept ip:FFFEh accept ss:0002h accept sp:0001h \\ w dx powinno byc 8 na koniec dw 8899Eh:4300h,5900h,2500h,0000h,4000h,4000,5000h,5900h,4200h,E2FFh,5900h,E2F6h \\ x: incbx pushcx andax0 incax,incax,pushax,popcx,incdx, loopodejmij1,popcx, loopodejmij10 dw 0020h:FFFFh,AAAAh,0001h macro fl:{load rm, flags;} macro dec reg:{sub reg,reg,z,z;fl;} macro inc reg:{add reg,reg,1,z;fl;} macro mov reg1, reg2:{OR reg1, reg2,z;} odczyt_rozkazu {mov pom1,cs;} {mov rq,ip;} {cjs nz,obadrfiz;} {and nil,pom1,pom1;oey;ewl;} {and nil, pom2,pom2;oey;ewh;} {R;mov rr,bus_d; cjp rdm,cp;} {and rq,rr,F800h;} \\F8 {xor nil, rq, 4000h;fl;} {cjp RM_z, roz_inc;} {xor nil, rq, 5000h;fl;} {cjp RM_z, roz_push;} \\FF {and rq,rr,FF00h;} {xor nil, rq, 2500h;fl;} {cjp RM_z, roz_and;} \\F8 {and rq,rr,F800h;} {xor nil, rq, 4800h;fl;} {cjp RM_z, roz_dec;} {xor nil, rq, 9000h;fl;} {cjp RM_z, roz_xchg;} {xor nil, rq, 5800h;fl;} {cjp RM_z, roz_pop;} {and rq,rr,FF00h;} {xor nil, rq, E200h;fl;} {cjp RM_z, roz_loop;} {xor nil, rq, 6A00h;fl;} {cjp RM_z, roz_nop;} wroc {end;} roz_nop {jmap zapis_powrotny;} roz_and {mov rq, rr;} {and rr, 800h;} {xor rr, 800h;fl;} \\ sprawdza W, jesli jest 1, w naszym jest, to xor daje 1. jesli w=0 xor da 0; {cjp RM_Z, add2;} {and rq, 00FFh;} {and ax, rq;fl;} {jmap zapis_powrotny;} add2 \\ przejdzie tutaj,bo w=1 {cjs nz, odczyt_komorki;} {mov pom2, rr;} \\ little endian -> zamiana mlodsze bity jako starsze i na odwrot {push nz, 7;} \\ przesuniecie {sll pom2;} {srl rr;} {rfct;} {add pom2, rr;} {and ax, pom2;fl;} \\ logiczne dodawanie {jmap zapis_powrotny;} odczyt_komorki {add ip,ip,1,z;fl;} {cjp rm_z,modyf_cs;} {mov pom1,cs;} {mov rq,ip;} {cjs nz,obadrfiz;} {and nil,pom1,pom1;oey;ewl;} {and nil, pom2,pom2;oey;ewh;} {R;mov rr,bus_d; cjp rdm,cp;} {crtn nz;} ip_skok {mov rq, pom2;} {and nil, rr, 0080h;fl;} {cjp RM_Z, ip_dodaj;} ip_minus {and rq, rr, 00FFh;} {or rq, rq, FF00h;} {add ip, rq;fl;} {cjp not RM_V, odczyt_rozkazu;} {sub cs, 1000h, nz;} {jmap odczyt_rozkazu;} ip_dodaj {and rq, rr, 00FFh;} {add ip, rq; fl;} {cjp not RM_C, odczyt_rozkazu;} {add cs, 1000h;} {jmap odczyt_rozkazu;} roz_loop {dec cx;} {xor rq, cx, 0000h;fl;} {mov rq, rr;} {cjp not RM_Z, ip_skok;} {jmap zapis_powrotny;} roz_jcxz {mov pom2, rq;} {mov rq, rb;} {xor rq, rq, 0000h;fl;} {cjp RM_Z, ip_skok;} roz_pop {mov pom1,ss;} {mov rq,sp;} {cjs nz,obadrfiz;} {and nil,pom1,pom1;oey;ewl;} {and nil, pom2,pom2;oey;ewh;} {R;mov pom2,bus_d; cjp rdm,cp;} {mov rq, rr;} {mov nil, rq; ewb;oey;} {mov rq, pom2;} {mov rb, rq;} {dec sp;} {jmap zapis_powrotny;} roz_push {inc sp;} {mov pom1,ss;} {mov rq,sp;} {cjs nz,obadrfiz;} {and nil,pom1,pom1;oey;ewl;} {and nil, pom2,pom2;oey;ewh;} {mov rq, rr;} {mov nil, rq; ewb;oey;} {mov rq, rb;} {W;mov nil,rq;OEY;} {jmap zapis_powrotny;} roz_dec {load rm, rn;} {mov rq, rr;} {mov nil, rq; ewb;oey;} {mov rq, rb;} {dec rq;fl;cem_c;} {mov rb, rq;} {load rn,rm;} {JMAP zapis_powrotny;} roz_inc {load rm, rn;} {mov rq, rr;} {mov nil, rq; ewb;oey;} {mov rq, rb;} {inc rq;fl;cem_c;} {mov rb, rq;} {load rn,rm;} {JMAP zapis_powrotny;} roz_xchg {mov nil, rr; ewb;oey;} {mov rq, rb;} {mov pom1, rq;} {mov rq, ax;} {mov ax,pom1;} {mov rb, rq;} {jmap zapis_powrotny;} zapis_powrotny {add ip,ip,1,z;fl;} {cjp rm_z,modyf_cs;} {jmap odczyt_rozkazu;} modyf_cs {add cs,cs,1000h,z;} {jmap odczyt_rozkazu;} obadrfiz {load rm,z;} {add pom2, pom2, z;} {push nz, 3;} {sll pom1;} {sl.25 pom2;} {rfct;} {add pom1, pom1, rq, z; fl;} {add pom2, pom2, z, rm_c;} {load rm,z;} {crtn nz;}
;Este es un comentario list p=18f4550 #include <p18f4550.inc> ;libreria de nombre de los registros sfr CONFIG FOSC = XT_XT ; Oscillator Selection bits (XT oscillator (XT)) CONFIG PWRT = ON ; Power-up Timer Enable bit (PWRT enabled) CONFIG BOR = OFF ; Brown-out Reset Enable bits (Brown-out Reset disabled in hardware and software) CONFIG WDT = OFF ; Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit)) CONFIG PBADEN = OFF ; PORTB A/D Enable bit (PORTB<4:0> pins are configured as digital I/O on Reset) CONFIG LVP = OFF ; Single-Supply ICSP Enable bit (Single-Supply ICSP disabled) org 0x0000 ;Vector de reset goto configuro org 0x0020 ;Zona de programa de usuario configuro: bcf TRISD, 0 ;RD0 como salida bcf TRISD, 1 ;RD1 como salida inicio: btfss PORTB, 0 ;pregunta si rb0 es uno goto falso1 ;viene cuando es falso bcf LATD, 0 ;viene aqui cuando es verdadero goto otro falso1: bsf LATD, 0 otro: btfss PORTB, 1 goto falso2 bcf LATD, 1 goto inicio falso2: bsf LATD, 1 goto inicio end
/*========================================================================= Program: ParaView Module: $RCSfile: pqProxy.cxx,v $ Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc. All rights reserved. ParaView is a free software; you can redistribute it and/or modify it under the terms of the ParaView license version 1.1. See License_v1.1.txt for the full ParaView license. A copy of this license can be obtained by contacting Kitware Inc. 28 Corporate Drive Clifton Park, NY 12065 USA THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =========================================================================*/ #include "pqProxy.h" #include "vtkEventQtSlotConnect.h" #include "vtkPVXMLElement.h" #include "vtkSmartPointer.h" #include "vtkSMProperty.h" #include "vtkSMPropertyIterator.h" #include "vtkSMProxy.h" #include "vtkSMProxyManager.h" #include <QMap> #include <QList> #include <QtDebug> //----------------------------------------------------------------------------- class pqProxyInternal { public: pqProxyInternal() { this->Connection = vtkSmartPointer<vtkEventQtSlotConnect>::New(); } typedef QMap<QString, QList<vtkSmartPointer<vtkSMProxy> > > ProxyListsType; ProxyListsType ProxyLists; vtkSmartPointer<vtkSMProxy> Proxy; vtkSmartPointer<vtkEventQtSlotConnect> Connection; }; //----------------------------------------------------------------------------- pqProxy::pqProxy(const QString& group, const QString& name, vtkSMProxy* proxy, pqServer* server, QObject* _parent/*=NULL*/) : pqServerManagerModelItem(_parent), Server(server), SMName(name), SMGroup(group) { this->Internal = new pqProxyInternal; this->Internal->Proxy = proxy; this->Modified = pqProxy::UNMODIFIED; } //----------------------------------------------------------------------------- pqProxy::~pqProxy() { this->clearHelperProxies(); delete this->Internal; } //----------------------------------------------------------------------------- void pqProxy::addHelperProxy(const QString& key, vtkSMProxy* proxy) { bool already_added = false; if (this->Internal->ProxyLists.contains(key)) { already_added = this->Internal->ProxyLists[key].contains(proxy); } if (!already_added) { QString groupname = QString("pq_helper_proxies.%1").arg( this->getProxy()->GetSelfIDAsString()); this->Internal->ProxyLists[key].push_back(proxy); vtkSMProxyManager* pxm = vtkSMProxyManager::GetProxyManager(); pxm->RegisterProxy(groupname.toAscii().data(), key.toAscii().data(), proxy); } } //----------------------------------------------------------------------------- void pqProxy::removeHelperProxy(const QString& key, vtkSMProxy* proxy) { if (!proxy) { qDebug() << "proxy argument to pqProxy::removeHelperProxy cannot be 0."; return; } if (this->Internal->ProxyLists.contains(key)) { this->Internal->ProxyLists[key].removeAll(proxy); QString groupname = QString("pq_helper_proxies.%1").arg( this->getProxy()->GetSelfIDAsString()); vtkSMProxyManager* pxm = vtkSMProxyManager::GetProxyManager(); const char* name = pxm->GetProxyName(groupname.toAscii().data(), proxy); if (name) { pxm->UnRegisterProxy(groupname.toAscii().data(), name, proxy); } } } //----------------------------------------------------------------------------- void pqProxy::clearHelperProxies() { vtkSMProxyManager* pxm = vtkSMProxyManager::GetProxyManager(); if (pxm) { QString groupname = QString("pq_helper_proxies.%1").arg( this->getProxy()->GetSelfIDAsString()); pqProxyInternal::ProxyListsType::iterator iter = this->Internal->ProxyLists.begin(); for (;iter != this->Internal->ProxyLists.end(); ++iter) { foreach(vtkSMProxy* proxy, iter.value()) { const char* name = pxm->GetProxyName( groupname.toAscii().data(), proxy); if (name) { pxm->UnRegisterProxy(groupname.toAscii().data(), name, proxy); } } } } this->Internal->ProxyLists.clear(); } //----------------------------------------------------------------------------- QList<QString> pqProxy::getHelperKeys() const { return this->Internal->ProxyLists.keys(); } //----------------------------------------------------------------------------- QList<vtkSMProxy*> pqProxy::getHelperProxies(const QString& key) const { QList<vtkSMProxy*> list; if (this->Internal->ProxyLists.contains(key)) { foreach( vtkSMProxy* proxy, this->Internal->ProxyLists[key]) { list.push_back(proxy); } } return list; } //----------------------------------------------------------------------------- QList<vtkSMProxy*> pqProxy::getHelperProxies() const { QList<vtkSMProxy*> list; pqProxyInternal::ProxyListsType::iterator iter = this->Internal->ProxyLists.begin(); for (;iter != this->Internal->ProxyLists.end(); ++iter) { foreach( vtkSMProxy* proxy, iter.value()) { list.push_back(proxy); } } return list; } //----------------------------------------------------------------------------- void pqProxy::rename(const QString& newname) { if(newname != this->SMName) { vtkSMProxyManager* pxm = vtkSMProxyManager::GetProxyManager(); pxm->RegisterProxy(this->getSMGroup().toAscii().data(), newname.toAscii().data(), this->getProxy()); pxm->UnRegisterProxy(this->getSMGroup().toAscii().data(), this->getSMName().toAscii().data(), this->getProxy()); this->SMName = newname; } } //----------------------------------------------------------------------------- void pqProxy::setSMName(const QString& name) { if (!name.isEmpty() && this->SMName != name) { this->SMName = name; emit this->nameChanged(this); } } //----------------------------------------------------------------------------- const QString& pqProxy::getSMName() { return this->SMName; } //----------------------------------------------------------------------------- const QString& pqProxy::getSMGroup() { return this->SMGroup; } //----------------------------------------------------------------------------- vtkSMProxy* pqProxy::getProxy() const { return this->Internal->Proxy; } //----------------------------------------------------------------------------- vtkPVXMLElement* pqProxy::getHints() const { return this->Internal->Proxy->GetHints(); } //----------------------------------------------------------------------------- void pqProxy::setModifiedState(ModifiedState modified) { if(modified != this->Modified) { this->Modified = modified; emit this->modifiedStateChanged(this); } } //----------------------------------------------------------------------------- void pqProxy::setDefaultPropertyValues() { vtkSMProxy* proxy = this->getProxy(); // If this is a compound proxy, its property values will be set from XML if(proxy->IsA("vtkSMCompoundProxy")) { return; } // since some domains rely on information properties, // it is essential that we update the property information // before resetting values. proxy->UpdatePropertyInformation(); vtkSMPropertyIterator* iter = proxy->NewPropertyIterator(); for (iter->Begin(); !iter->IsAtEnd(); iter->Next()) { vtkSMProperty* smproperty = iter->GetProperty(); if (!smproperty->GetInformationOnly()) { vtkPVXMLElement* propHints = iter->GetProperty()->GetHints(); if (propHints && propHints->FindNestedElementByName("NoDefault")) { // Don't reset properties that request overriding of default mechanism. continue; } iter->GetProperty()->ResetToDefault(); iter->GetProperty()->UpdateDependentDomains(); } } // Since domains may depend on defaul values of other properties to be set, // we iterate over the properties once more. We need a better mechanism for this. for (iter->Begin(); !iter->IsAtEnd(); iter->Next()) { vtkSMProperty* smproperty = iter->GetProperty(); if (!smproperty->GetInformationOnly()) { vtkPVXMLElement* propHints = iter->GetProperty()->GetHints(); if (propHints && propHints->FindNestedElementByName("NoDefault")) { // Don't reset properties that request overriding of default mechanism. continue; } iter->GetProperty()->ResetToDefault(); iter->GetProperty()->UpdateDependentDomains(); } } iter->Delete(); } //-----------------------------------------------------------------------------
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x10c85, %r13 nop and $59495, %rdi movl $0x61626364, (%r13) nop nop nop sub %r11, %r11 lea addresses_WT_ht+0x1c2e5, %rdi clflush (%rdi) and %rax, %rax mov (%rdi), %ecx and %r13, %r13 lea addresses_D_ht+0x75f8, %r14 nop nop nop nop mfence movb (%r14), %cl nop add %rax, %rax lea addresses_normal_ht+0x1c4e5, %rdi nop and $16088, %rdx vmovups (%rdi), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $0, %xmm6, %rcx nop nop nop add %r14, %r14 lea addresses_WT_ht+0xf7b5, %rsi lea addresses_WT_ht+0x19f05, %rdi nop nop nop nop nop dec %rdx mov $108, %rcx rep movsw nop nop nop nop nop dec %r11 pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r15 push %rax push %rbp push %rdi push %rdx push %rsi // Store mov $0x7ed, %rbp nop nop and $21338, %rdi mov $0x5152535455565758, %r12 movq %r12, %xmm2 movups %xmm2, (%rbp) nop nop nop nop xor %rbp, %rbp // Load mov $0x2b045600000002e5, %r12 nop nop nop nop nop dec %rsi vmovups (%r12), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %rax nop nop nop and $9792, %rsi // Faulty Load lea addresses_RW+0x6ae5, %rdx sub %rsi, %rsi mov (%rdx), %ax lea oracles, %r15 and $0xff, %rax shlq $12, %rax mov (%r15,%rax,1), %rax pop %rsi pop %rdx pop %rdi pop %rbp pop %rax pop %r15 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_RW', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_P', 'AVXalign': False, 'size': 16}} {'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_NC', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_RW', 'AVXalign': True, 'size': 2}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}} {'src': {'NT': False, 'same': True, 'congruent': 11, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
.model small .data .code main proc ; IMPORTANT NOTE: the size of the AND entities have to be the same, so 8bit must go with 8 bit registers!!! mov ah, 00000001b ; mov the binary value of 1 into ah mov bh, 00000101b ; mov the binary value of 5 in bh and bh, ah ; perform binary AND operand and store into bh reg, so and dest, src. mov ah, 01010101b mov bh, 10101010b or ah, bh ; this should perform a bitwise or operation resulting in 11111111b mov ah, 01011111b mov bh, 10101111b xor ah, bh ; performing xor bitwise operation aka real or, resulting in 11110000b mov ah, 10101100 not ah, bh ; performing not bitwise, thus getting 01010011b nop nop hlt endp end main
/*Author : Abdallah Hemdan */ /***********************************************/ /* Dear online judge: * I've read the problem, and tried to solve it. * Even if you don't accept my solution, you should respect my effort. * I hope my code compiles and gets accepted. * ___ __ * |\ \|\ \ * \ \ \_\ \ * \ \ ___ \emdan * \ \ \\ \ \ * \ \__\\ \_\ * \|__| \|__| */ #include <iostream> #include <cmath> #include <string> #include <string.h> #include <stdlib.h> #include <algorithm> #include <iomanip> #include <assert.h> #include <vector> #include <cstring> #include <map> #include <deque> #include <queue> #include <stack> #include <sstream> #include <cstdio> #include <cstdlib> #include <ctime> #include <set> #include <complex> #include <list> #include <climits> #include <cctype> #include <bitset> #include <numeric> #include <array> #include <tuple> #include <stdexcept> #include <utility> #include <functional> #include <locale> #define all(v) v.begin(), v.end() #define mp make_pair #define pb push_back #define endl '\n' typedef long long int ll; // freopen("input.txt","r",stdin); // freopen("output.txt","w",stdout); using namespace std; void Solve(int n) { vector<int> Values; int K = 0; for (int i = 1; n; i++) { if (n - i > i) { Values.push_back(i); K++; n -= i; } else { Values.push_back(n); K++; break; } } cout << K << endl; for (int i = 0; i < Values.size(); i++) { cout << Values[i] << " "; } } int main() { int n; cin >> n; Solve(n); }
; A338086: Duplicate the ternary digits of n, so each 0, 1 or 2 becomes 00, 11 or 22 respectively. ; Submitted by Jamie Morken(w1) ; 0,4,8,36,40,44,72,76,80,324,328,332,360,364,368,396,400,404,648,652,656,684,688,692,720,724,728,2916,2920,2924,2952,2956,2960,2988,2992,2996,3240,3244,3248,3276,3280,3284,3312,3316,3320,3564,3568,3572,3600,3604,3608,3636,3640,3644,5832,5836,5840,5868,5872,5876,5904,5908,5912,6156,6160,6164,6192,6196,6200,6228,6232,6236,6480,6484,6488,6516,6520,6524,6552,6556,6560,26244,26248,26252,26280,26284,26288,26316,26320,26324,26568,26572,26576,26604,26608,26612,26640,26644,26648,26892 mov $3,1 lpb $0 mov $2,$0 div $0,3 mod $2,3 mul $2,$3 add $1,$2 mul $3,9 lpe mov $0,$1 mul $0,4
; A151793: Partial sums of A151782. ; 1,9,17,73,81,137,193,585,593,649,705,1097,1153,1545,1937,4681,4689,4745,4801,5193,5249,5641,6033,8777,8833,9225,9617,12361,12753,15497,18241,37449,37457,37513,37569,37961,38017,38409,38801,41545,41601,41993,42385,45129 mov $3,$0 mov $5,$0 lpb $5,1 mov $0,$3 sub $5,1 sub $0,$5 mov $4,$0 mov $6,1 mul $6,$0 lpb $2,1 lpb $4,1 div $6,2 sub $4,$6 lpe mov $0,$4 sub $2,1 lpe mov $2,7 mov $4,7 pow $4,$0 add $1,$4 lpe div $1,7 mul $1,8 add $1,1
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r15 push %r8 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_A_ht+0x18682, %rsi nop nop nop nop cmp $41387, %r15 movups (%rsi), %xmm2 vpextrq $1, %xmm2, %rbp nop nop nop nop xor %r11, %r11 lea addresses_UC_ht+0x4392, %r13 nop nop nop nop sub $2410, %r8 and $0xffffffffffffffc0, %r13 movaps (%r13), %xmm6 vpextrq $0, %xmm6, %rax inc %r15 lea addresses_D_ht+0x1e5d2, %rsi lea addresses_WT_ht+0xbc92, %rdi nop nop nop nop xor $3946, %r13 mov $100, %rcx rep movsl nop cmp $27721, %r8 lea addresses_WT_ht+0x1d92, %rsi lea addresses_UC_ht+0x903e, %rdi nop nop xor $1388, %r11 mov $121, %rcx rep movsb nop nop nop add %rax, %rax lea addresses_WT_ht+0x16bfe, %rsi lea addresses_normal_ht+0x12d92, %rdi sub $12385, %r13 mov $51, %rcx rep movsw nop nop nop and $56112, %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r15 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %rax push %rbp push %rcx push %rdi push %rsi // Store lea addresses_D+0x100d2, %rsi nop sub $3023, %r12 movl $0x51525354, (%rsi) nop xor %r12, %r12 // Store lea addresses_D+0xc592, %r10 nop nop nop nop nop and %r12, %r12 mov $0x5152535455565758, %rbp movq %rbp, %xmm6 movups %xmm6, (%r10) nop nop nop nop nop add $43713, %r11 // Store lea addresses_PSE+0x10a22, %rbp nop nop sub $40946, %r10 movb $0x51, (%rbp) dec %r11 // REPMOV lea addresses_D+0xc592, %rsi lea addresses_UC+0x4292, %rdi clflush (%rsi) xor $31205, %rax mov $9, %rcx rep movsw nop nop nop nop and $23056, %rax // Faulty Load lea addresses_D+0xc592, %r12 nop nop nop cmp $40948, %rdi mov (%r12), %ax lea oracles, %rdi and $0xff, %rax shlq $12, %rax mov (%rdi,%rax,1), %rax pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_D', 'same': False, 'size': 16, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_D', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 1, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_UC', 'congruent': 7, 'same': False}, 'OP': 'REPM'} [Faulty Load] {'src': {'type': 'addresses_D', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'} {'58': 21829} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
/* Copyright (c) 2014, Google Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "test_config.h" #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <memory> #include <openssl/base64.h> #include <openssl/rand.h> #include <openssl/ssl.h> #include "../../crypto/internal.h" #include "../internal.h" #include "handshake_util.h" #include "mock_quic_transport.h" #include "test_state.h" namespace { template <typename T> struct Flag { const char *flag; T TestConfig::*member; }; // FindField looks for the flag in |flags| that matches |flag|. If one is found, // it returns a pointer to the corresponding field in |config|. Otherwise, it // returns NULL. template<typename T, size_t N> T *FindField(TestConfig *config, const Flag<T> (&flags)[N], const char *flag) { for (size_t i = 0; i < N; i++) { if (strcmp(flag, flags[i].flag) == 0) { return &(config->*(flags[i].member)); } } return NULL; } const Flag<bool> kBoolFlags[] = { {"-server", &TestConfig::is_server}, {"-dtls", &TestConfig::is_dtls}, {"-quic", &TestConfig::is_quic}, {"-fallback-scsv", &TestConfig::fallback_scsv}, {"-enable-ech-grease", &TestConfig::enable_ech_grease}, {"-require-any-client-certificate", &TestConfig::require_any_client_certificate}, {"-false-start", &TestConfig::false_start}, {"-async", &TestConfig::async}, {"-write-different-record-sizes", &TestConfig::write_different_record_sizes}, {"-cbc-record-splitting", &TestConfig::cbc_record_splitting}, {"-partial-write", &TestConfig::partial_write}, {"-no-tls13", &TestConfig::no_tls13}, {"-no-tls12", &TestConfig::no_tls12}, {"-no-tls11", &TestConfig::no_tls11}, {"-no-tls1", &TestConfig::no_tls1}, {"-no-ticket", &TestConfig::no_ticket}, {"-enable-channel-id", &TestConfig::enable_channel_id}, {"-shim-writes-first", &TestConfig::shim_writes_first}, {"-expect-session-miss", &TestConfig::expect_session_miss}, {"-decline-alpn", &TestConfig::decline_alpn}, {"-reject-alpn", &TestConfig::reject_alpn}, {"-select-empty-alpn", &TestConfig::select_empty_alpn}, {"-defer-alps", &TestConfig::defer_alps}, {"-expect-extended-master-secret", &TestConfig::expect_extended_master_secret}, {"-enable-ocsp-stapling", &TestConfig::enable_ocsp_stapling}, {"-enable-signed-cert-timestamps", &TestConfig::enable_signed_cert_timestamps}, {"-implicit-handshake", &TestConfig::implicit_handshake}, {"-use-early-callback", &TestConfig::use_early_callback}, {"-fail-early-callback", &TestConfig::fail_early_callback}, {"-install-ddos-callback", &TestConfig::install_ddos_callback}, {"-fail-ddos-callback", &TestConfig::fail_ddos_callback}, {"-fail-cert-callback", &TestConfig::fail_cert_callback}, {"-handshake-never-done", &TestConfig::handshake_never_done}, {"-use-export-context", &TestConfig::use_export_context}, {"-tls-unique", &TestConfig::tls_unique}, {"-expect-ticket-renewal", &TestConfig::expect_ticket_renewal}, {"-expect-no-session", &TestConfig::expect_no_session}, {"-expect-ticket-supports-early-data", &TestConfig::expect_ticket_supports_early_data}, {"-use-ticket-callback", &TestConfig::use_ticket_callback}, {"-renew-ticket", &TestConfig::renew_ticket}, {"-enable-early-data", &TestConfig::enable_early_data}, {"-check-close-notify", &TestConfig::check_close_notify}, {"-shim-shuts-down", &TestConfig::shim_shuts_down}, {"-verify-fail", &TestConfig::verify_fail}, {"-verify-peer", &TestConfig::verify_peer}, {"-verify-peer-if-no-obc", &TestConfig::verify_peer_if_no_obc}, {"-expect-verify-result", &TestConfig::expect_verify_result}, {"-renegotiate-once", &TestConfig::renegotiate_once}, {"-renegotiate-freely", &TestConfig::renegotiate_freely}, {"-renegotiate-ignore", &TestConfig::renegotiate_ignore}, {"-renegotiate-explicit", &TestConfig::renegotiate_explicit}, {"-forbid-renegotiation-after-handshake", &TestConfig::forbid_renegotiation_after_handshake}, {"-use-old-client-cert-callback", &TestConfig::use_old_client_cert_callback}, {"-send-alert", &TestConfig::send_alert}, {"-peek-then-read", &TestConfig::peek_then_read}, {"-enable-grease", &TestConfig::enable_grease}, {"-use-exporter-between-reads", &TestConfig::use_exporter_between_reads}, {"-retain-only-sha256-client-cert", &TestConfig::retain_only_sha256_client_cert}, {"-expect-sha256-client-cert", &TestConfig::expect_sha256_client_cert}, {"-read-with-unfinished-write", &TestConfig::read_with_unfinished_write}, {"-expect-secure-renegotiation", &TestConfig::expect_secure_renegotiation}, {"-expect-no-secure-renegotiation", &TestConfig::expect_no_secure_renegotiation}, {"-expect-session-id", &TestConfig::expect_session_id}, {"-expect-no-session-id", &TestConfig::expect_no_session_id}, {"-expect-accept-early-data", &TestConfig::expect_accept_early_data}, {"-expect-reject-early-data", &TestConfig::expect_reject_early_data}, {"-expect-no-offer-early-data", &TestConfig::expect_no_offer_early_data}, {"-no-op-extra-handshake", &TestConfig::no_op_extra_handshake}, {"-handshake-twice", &TestConfig::handshake_twice}, {"-allow-unknown-alpn-protos", &TestConfig::allow_unknown_alpn_protos}, {"-use-custom-verify-callback", &TestConfig::use_custom_verify_callback}, {"-allow-false-start-without-alpn", &TestConfig::allow_false_start_without_alpn}, {"-handoff", &TestConfig::handoff}, {"-handshake-hints", &TestConfig::handshake_hints}, {"-allow-hint-mismatch", &TestConfig::allow_hint_mismatch}, {"-use-ocsp-callback", &TestConfig::use_ocsp_callback}, {"-set-ocsp-in-callback", &TestConfig::set_ocsp_in_callback}, {"-decline-ocsp-callback", &TestConfig::decline_ocsp_callback}, {"-fail-ocsp-callback", &TestConfig::fail_ocsp_callback}, {"-install-cert-compression-algs", &TestConfig::install_cert_compression_algs}, {"-is-handshaker-supported", &TestConfig::is_handshaker_supported}, {"-handshaker-resume", &TestConfig::handshaker_resume}, {"-reverify-on-resume", &TestConfig::reverify_on_resume}, {"-enforce-rsa-key-usage", &TestConfig::enforce_rsa_key_usage}, {"-jdk11-workaround", &TestConfig::jdk11_workaround}, {"-server-preference", &TestConfig::server_preference}, {"-export-traffic-secrets", &TestConfig::export_traffic_secrets}, {"-key-update", &TestConfig::key_update}, {"-expect-delegated-credential-used", &TestConfig::expect_delegated_credential_used}, {"-expect-hrr", &TestConfig::expect_hrr}, {"-expect-no-hrr", &TestConfig::expect_no_hrr}, {"-wait-for-debugger", &TestConfig::wait_for_debugger}, }; const Flag<std::string> kStringFlags[] = { {"-write-settings", &TestConfig::write_settings}, {"-key-file", &TestConfig::key_file}, {"-cert-file", &TestConfig::cert_file}, {"-expect-server-name", &TestConfig::expect_server_name}, {"-advertise-npn", &TestConfig::advertise_npn}, {"-expect-next-proto", &TestConfig::expect_next_proto}, {"-select-next-proto", &TestConfig::select_next_proto}, {"-send-channel-id", &TestConfig::send_channel_id}, {"-host-name", &TestConfig::host_name}, {"-advertise-alpn", &TestConfig::advertise_alpn}, {"-expect-alpn", &TestConfig::expect_alpn}, {"-expect-late-alpn", &TestConfig::expect_late_alpn}, {"-expect-advertised-alpn", &TestConfig::expect_advertised_alpn}, {"-select-alpn", &TestConfig::select_alpn}, {"-psk", &TestConfig::psk}, {"-psk-identity", &TestConfig::psk_identity}, {"-srtp-profiles", &TestConfig::srtp_profiles}, {"-cipher", &TestConfig::cipher}, {"-export-label", &TestConfig::export_label}, {"-export-context", &TestConfig::export_context}, {"-expect-peer-cert-file", &TestConfig::expect_peer_cert_file}, {"-use-client-ca-list", &TestConfig::use_client_ca_list}, {"-expect-client-ca-list", &TestConfig::expect_client_ca_list}, {"-expect-msg-callback", &TestConfig::expect_msg_callback}, {"-handshaker-path", &TestConfig::handshaker_path}, {"-delegated-credential", &TestConfig::delegated_credential}, {"-expect-early-data-reason", &TestConfig::expect_early_data_reason}, {"-quic-early-data-context", &TestConfig::quic_early_data_context}, }; // TODO(davidben): When we can depend on C++17 or Abseil, switch this to // std::optional or absl::optional. const Flag<std::unique_ptr<std::string>> kOptionalStringFlags[] = { {"-expect-peer-application-settings", &TestConfig::expect_peer_application_settings}, }; const Flag<std::string> kBase64Flags[] = { {"-expect-certificate-types", &TestConfig::expect_certificate_types}, {"-expect-channel-id", &TestConfig::expect_channel_id}, {"-token-binding-params", &TestConfig::send_token_binding_params}, {"-expect-ocsp-response", &TestConfig::expect_ocsp_response}, {"-expect-signed-cert-timestamps", &TestConfig::expect_signed_cert_timestamps}, {"-ocsp-response", &TestConfig::ocsp_response}, {"-signed-cert-timestamps", &TestConfig::signed_cert_timestamps}, {"-ticket-key", &TestConfig::ticket_key}, {"-quic-transport-params", &TestConfig::quic_transport_params}, {"-expect-quic-transport-params", &TestConfig::expect_quic_transport_params}, }; const Flag<int> kIntFlags[] = { {"-port", &TestConfig::port}, {"-resume-count", &TestConfig::resume_count}, {"-expect-token-binding-param", &TestConfig::expect_token_binding_param}, {"-min-version", &TestConfig::min_version}, {"-max-version", &TestConfig::max_version}, {"-expect-version", &TestConfig::expect_version}, {"-mtu", &TestConfig::mtu}, {"-export-keying-material", &TestConfig::export_keying_material}, {"-expect-total-renegotiations", &TestConfig::expect_total_renegotiations}, {"-expect-peer-signature-algorithm", &TestConfig::expect_peer_signature_algorithm}, {"-expect-curve-id", &TestConfig::expect_curve_id}, {"-initial-timeout-duration-ms", &TestConfig::initial_timeout_duration_ms}, {"-max-cert-list", &TestConfig::max_cert_list}, {"-expect-cipher-aes", &TestConfig::expect_cipher_aes}, {"-expect-cipher-no-aes", &TestConfig::expect_cipher_no_aes}, {"-expect-cipher", &TestConfig::expect_cipher}, {"-resumption-delay", &TestConfig::resumption_delay}, {"-max-send-fragment", &TestConfig::max_send_fragment}, {"-read-size", &TestConfig::read_size}, {"-expect-ticket-age-skew", &TestConfig::expect_ticket_age_skew}, {"-quic-use-legacy-codepoint", &TestConfig::quic_use_legacy_codepoint}, }; const Flag<std::vector<int>> kIntVectorFlags[] = { {"-signing-prefs", &TestConfig::signing_prefs}, {"-verify-prefs", &TestConfig::verify_prefs}, {"-expect-peer-verify-pref", &TestConfig::expect_peer_verify_prefs}, {"-curves", &TestConfig::curves}, {"-ech-is-retry-config", &TestConfig::ech_is_retry_config}, }; const Flag<std::vector<std::string>> kBase64VectorFlags[] = { {"-ech-server-config", &TestConfig::ech_server_configs}, {"-ech-server-key", &TestConfig::ech_server_keys}, }; const Flag<std::vector<std::pair<std::string, std::string>>> kStringPairVectorFlags[] = { {"-application-settings", &TestConfig::application_settings}, }; bool DecodeBase64(std::string *out, const std::string &in) { size_t len; if (!EVP_DecodedLength(&len, in.size())) { fprintf(stderr, "Invalid base64: %s.\n", in.c_str()); return false; } std::vector<uint8_t> buf(len); if (!EVP_DecodeBase64(buf.data(), &len, buf.size(), reinterpret_cast<const uint8_t *>(in.data()), in.size())) { fprintf(stderr, "Invalid base64: %s.\n", in.c_str()); return false; } out->assign(reinterpret_cast<const char *>(buf.data()), len); return true; } bool ParseFlag(const char *flag, int argc, char **argv, int *i, bool skip, TestConfig *out_config) { bool *bool_field = FindField(out_config, kBoolFlags, flag); if (bool_field != NULL) { if (!skip) { *bool_field = true; } return true; } std::string *string_field = FindField(out_config, kStringFlags, flag); if (string_field != NULL) { *i = *i + 1; if (*i >= argc) { fprintf(stderr, "Missing parameter.\n"); return false; } if (!skip) { string_field->assign(argv[*i]); } return true; } std::unique_ptr<std::string> *optional_string_field = FindField(out_config, kOptionalStringFlags, flag); if (optional_string_field != NULL) { *i = *i + 1; if (*i >= argc) { fprintf(stderr, "Missing parameter.\n"); return false; } if (!skip) { optional_string_field->reset(new std::string(argv[*i])); } return true; } std::string *base64_field = FindField(out_config, kBase64Flags, flag); if (base64_field != NULL) { *i = *i + 1; if (*i >= argc) { fprintf(stderr, "Missing parameter.\n"); return false; } std::string value; if (!DecodeBase64(&value, argv[*i])) { return false; } if (!skip) { *base64_field = std::move(value); } return true; } int *int_field = FindField(out_config, kIntFlags, flag); if (int_field) { *i = *i + 1; if (*i >= argc) { fprintf(stderr, "Missing parameter.\n"); return false; } if (!skip) { *int_field = atoi(argv[*i]); } return true; } std::vector<int> *int_vector_field = FindField(out_config, kIntVectorFlags, flag); if (int_vector_field) { *i = *i + 1; if (*i >= argc) { fprintf(stderr, "Missing parameter.\n"); return false; } // Each instance of the flag adds to the list. if (!skip) { int_vector_field->push_back(atoi(argv[*i])); } return true; } std::vector<std::string> *base64_vector_field = FindField(out_config, kBase64VectorFlags, flag); if (base64_vector_field) { *i = *i + 1; if (*i >= argc) { fprintf(stderr, "Missing parameter.\n"); return false; } std::string value; if (!DecodeBase64(&value, argv[*i])) { return false; } // Each instance of the flag adds to the list. if (!skip) { base64_vector_field->push_back(std::move(value)); } return true; } std::vector<std::pair<std::string, std::string>> *string_pair_vector_field = FindField(out_config, kStringPairVectorFlags, flag); if (string_pair_vector_field) { *i = *i + 1; if (*i >= argc) { fprintf(stderr, "Missing parameter.\n"); return false; } const char *comma = strchr(argv[*i], ','); if (!comma) { fprintf( stderr, "Parameter should be a comma-separated triple composed of two base64 " "strings followed by \"true\" or \"false\".\n"); return false; } // Each instance of the flag adds to the list. if (!skip) { string_pair_vector_field->push_back(std::make_pair( std::string(argv[*i], comma - argv[*i]), std::string(comma + 1))); } return true; } fprintf(stderr, "Unknown argument: %s.\n", flag); return false; } // RemovePrefix checks if |*str| begins with |prefix| + "-". If so, it advances // |*str| past |prefix| (but not past the "-") and returns true. Otherwise, it // returns false and leaves |*str| unmodified. bool RemovePrefix(const char **str, const char *prefix) { size_t prefix_len = strlen(prefix); if (strncmp(*str, prefix, strlen(prefix)) == 0 && (*str)[prefix_len] == '-') { *str += strlen(prefix); return true; } return false; } } // namespace bool ParseConfig(int argc, char **argv, bool is_shim, TestConfig *out_initial, TestConfig *out_resume, TestConfig *out_retry) { out_initial->argc = out_resume->argc = out_retry->argc = argc; out_initial->argv = out_resume->argv = out_retry->argv = argv; for (int i = 0; i < argc; i++) { bool skip = false; const char *flag = argv[i]; // -on-shim and -on-handshaker prefixes enable flags only on the shim or // handshaker. if (RemovePrefix(&flag, "-on-shim")) { if (!is_shim) { skip = true; } } else if (RemovePrefix(&flag, "-on-handshaker")) { if (is_shim) { skip = true; } } // The following prefixes allow different configurations for each of the // initial, resumption, and 0-RTT retry handshakes. if (RemovePrefix(&flag, "-on-initial")) { if (!ParseFlag(flag, argc, argv, &i, skip, out_initial)) { return false; } } else if (RemovePrefix(&flag, "-on-resume")) { if (!ParseFlag(flag, argc, argv, &i, skip, out_resume)) { return false; } } else if (RemovePrefix(&flag, "-on-retry")) { if (!ParseFlag(flag, argc, argv, &i, skip, out_retry)) { return false; } } else { // Unprefixed flags apply to all three. int i_init = i; int i_resume = i; if (!ParseFlag(flag, argc, argv, &i_init, skip, out_initial) || !ParseFlag(flag, argc, argv, &i_resume, skip, out_resume) || !ParseFlag(flag, argc, argv, &i, skip, out_retry)) { return false; } } } return true; } static CRYPTO_once_t once = CRYPTO_ONCE_INIT; static int g_config_index = 0; static CRYPTO_BUFFER_POOL *g_pool = nullptr; static void init_once() { g_config_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL); if (g_config_index < 0) { abort(); } g_pool = CRYPTO_BUFFER_POOL_new(); if (!g_pool) { abort(); } } bool SetTestConfig(SSL *ssl, const TestConfig *config) { CRYPTO_once(&once, init_once); return SSL_set_ex_data(ssl, g_config_index, (void *)config) == 1; } const TestConfig *GetTestConfig(const SSL *ssl) { CRYPTO_once(&once, init_once); return (const TestConfig *)SSL_get_ex_data(ssl, g_config_index); } static int LegacyOCSPCallback(SSL *ssl, void *arg) { const TestConfig *config = GetTestConfig(ssl); if (!SSL_is_server(ssl)) { return !config->fail_ocsp_callback; } if (!config->ocsp_response.empty() && config->set_ocsp_in_callback && !SSL_set_ocsp_response(ssl, (const uint8_t *)config->ocsp_response.data(), config->ocsp_response.size())) { return SSL_TLSEXT_ERR_ALERT_FATAL; } if (config->fail_ocsp_callback) { return SSL_TLSEXT_ERR_ALERT_FATAL; } if (config->decline_ocsp_callback) { return SSL_TLSEXT_ERR_NOACK; } return SSL_TLSEXT_ERR_OK; } static int ServerNameCallback(SSL *ssl, int *out_alert, void *arg) { // SNI must be accessible from the SNI callback. const TestConfig *config = GetTestConfig(ssl); const char *server_name = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name); if (server_name == nullptr || std::string(server_name) != config->expect_server_name) { fprintf(stderr, "servername mismatch (got %s; want %s).\n", server_name, config->expect_server_name.c_str()); return SSL_TLSEXT_ERR_ALERT_FATAL; } return SSL_TLSEXT_ERR_OK; } static int NextProtoSelectCallback(SSL *ssl, uint8_t **out, uint8_t *outlen, const uint8_t *in, unsigned inlen, void *arg) { const TestConfig *config = GetTestConfig(ssl); if (config->select_next_proto.empty()) { return SSL_TLSEXT_ERR_NOACK; } *out = (uint8_t *)config->select_next_proto.data(); *outlen = config->select_next_proto.size(); return SSL_TLSEXT_ERR_OK; } static int NextProtosAdvertisedCallback(SSL *ssl, const uint8_t **out, unsigned int *out_len, void *arg) { const TestConfig *config = GetTestConfig(ssl); if (config->advertise_npn.empty()) { return SSL_TLSEXT_ERR_NOACK; } *out = (const uint8_t *)config->advertise_npn.data(); *out_len = config->advertise_npn.size(); return SSL_TLSEXT_ERR_OK; } static void MessageCallback(int is_write, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg) { const uint8_t *buf_u8 = reinterpret_cast<const uint8_t *>(buf); const TestConfig *config = GetTestConfig(ssl); TestState *state = GetTestState(ssl); if (!state->msg_callback_ok) { return; } if (content_type == SSL3_RT_HEADER) { if (len != (config->is_dtls ? DTLS1_RT_HEADER_LENGTH : SSL3_RT_HEADER_LENGTH)) { fprintf(stderr, "Incorrect length for record header: %zu.\n", len); state->msg_callback_ok = false; } return; } state->msg_callback_text += is_write ? "write " : "read "; switch (content_type) { case 0: if (version != SSL2_VERSION) { fprintf(stderr, "Incorrect version for V2ClientHello: %x.\n", version); state->msg_callback_ok = false; return; } state->msg_callback_text += "v2clienthello\n"; return; case SSL3_RT_HANDSHAKE: { CBS cbs; CBS_init(&cbs, buf_u8, len); uint8_t type; uint32_t msg_len; if (!CBS_get_u8(&cbs, &type) || // TODO(davidben): Reporting on entire messages would be more // consistent than fragments. (config->is_dtls && !CBS_skip(&cbs, 3 /* total */ + 2 /* seq */ + 3 /* frag_off */)) || !CBS_get_u24(&cbs, &msg_len) || !CBS_skip(&cbs, msg_len) || CBS_len(&cbs) != 0) { fprintf(stderr, "Could not parse handshake message.\n"); state->msg_callback_ok = false; return; } char text[16]; snprintf(text, sizeof(text), "hs %d\n", type); state->msg_callback_text += text; return; } case SSL3_RT_CHANGE_CIPHER_SPEC: if (len != 1 || buf_u8[0] != 1) { fprintf(stderr, "Invalid ChangeCipherSpec.\n"); state->msg_callback_ok = false; return; } state->msg_callback_text += "ccs\n"; return; case SSL3_RT_ALERT: if (len != 2) { fprintf(stderr, "Invalid alert.\n"); state->msg_callback_ok = false; return; } char text[16]; snprintf(text, sizeof(text), "alert %d %d\n", buf_u8[0], buf_u8[1]); state->msg_callback_text += text; return; default: fprintf(stderr, "Invalid content_type: %d.\n", content_type); state->msg_callback_ok = false; } } static int TicketKeyCallback(SSL *ssl, uint8_t *key_name, uint8_t *iv, EVP_CIPHER_CTX *ctx, HMAC_CTX *hmac_ctx, int encrypt) { if (!encrypt) { if (GetTestState(ssl)->ticket_decrypt_done) { fprintf(stderr, "TicketKeyCallback called after completion.\n"); return -1; } GetTestState(ssl)->ticket_decrypt_done = true; } // This is just test code, so use the all-zeros key. static const uint8_t kZeros[16] = {0}; if (encrypt) { OPENSSL_memcpy(key_name, kZeros, sizeof(kZeros)); RAND_bytes(iv, 16); } else if (OPENSSL_memcmp(key_name, kZeros, 16) != 0) { return 0; } if (!HMAC_Init_ex(hmac_ctx, kZeros, sizeof(kZeros), EVP_sha256(), NULL) || !EVP_CipherInit_ex(ctx, EVP_aes_128_cbc(), NULL, kZeros, iv, encrypt)) { return -1; } if (!encrypt) { return GetTestConfig(ssl)->renew_ticket ? 2 : 1; } return 1; } static int NewSessionCallback(SSL *ssl, SSL_SESSION *session) { // This callback is called as the handshake completes. |SSL_get_session| // must continue to work and, historically, |SSL_in_init| returned false at // this point. if (SSL_in_init(ssl) || SSL_get_session(ssl) == nullptr) { fprintf(stderr, "Invalid state for NewSessionCallback.\n"); abort(); } GetTestState(ssl)->got_new_session = true; GetTestState(ssl)->new_session.reset(session); return 1; } static void InfoCallback(const SSL *ssl, int type, int val) { if (type == SSL_CB_HANDSHAKE_DONE) { if (GetTestConfig(ssl)->handshake_never_done) { fprintf(stderr, "Handshake unexpectedly completed.\n"); // Abort before any expected error code is printed, to ensure the overall // test fails. abort(); } // This callback is called when the handshake completes. |SSL_get_session| // must continue to work and |SSL_in_init| must return false. if (SSL_in_init(ssl) || SSL_get_session(ssl) == nullptr) { fprintf(stderr, "Invalid state for SSL_CB_HANDSHAKE_DONE.\n"); abort(); } GetTestState(ssl)->handshake_done = true; } } static void ChannelIdCallback(SSL *ssl, EVP_PKEY **out_pkey) { *out_pkey = GetTestState(ssl)->channel_id.release(); } static SSL_SESSION *GetSessionCallback(SSL *ssl, const uint8_t *data, int len, int *copy) { TestState *async_state = GetTestState(ssl); if (async_state->session) { *copy = 0; return async_state->session.release(); } else if (async_state->pending_session) { return SSL_magic_pending_session_ptr(); } else { return NULL; } } static void CurrentTimeCallback(const SSL *ssl, timeval *out_clock) { *out_clock = *GetClock(); } static int AlpnSelectCallback(SSL *ssl, const uint8_t **out, uint8_t *outlen, const uint8_t *in, unsigned inlen, void *arg) { if (GetTestState(ssl)->alpn_select_done) { fprintf(stderr, "AlpnSelectCallback called after completion.\n"); exit(1); } GetTestState(ssl)->alpn_select_done = true; const TestConfig *config = GetTestConfig(ssl); if (config->decline_alpn) { return SSL_TLSEXT_ERR_NOACK; } if (config->reject_alpn) { return SSL_TLSEXT_ERR_ALERT_FATAL; } if (!config->expect_advertised_alpn.empty() && (config->expect_advertised_alpn.size() != inlen || OPENSSL_memcmp(config->expect_advertised_alpn.data(), in, inlen) != 0)) { fprintf(stderr, "bad ALPN select callback inputs.\n"); exit(1); } if (config->defer_alps) { for (const auto &pair : config->application_settings) { if (!SSL_add_application_settings( ssl, reinterpret_cast<const uint8_t *>(pair.first.data()), pair.first.size(), reinterpret_cast<const uint8_t *>(pair.second.data()), pair.second.size())) { fprintf(stderr, "error configuring ALPS.\n"); exit(1); } } } assert(config->select_alpn.empty() || !config->select_empty_alpn); *out = (const uint8_t *)config->select_alpn.data(); *outlen = config->select_alpn.size(); return SSL_TLSEXT_ERR_OK; } static bool CheckVerifyCallback(SSL *ssl) { const TestConfig *config = GetTestConfig(ssl); if (!config->expect_ocsp_response.empty()) { const uint8_t *data; size_t len; SSL_get0_ocsp_response(ssl, &data, &len); if (len == 0) { fprintf(stderr, "OCSP response not available in verify callback.\n"); return false; } } if (GetTestState(ssl)->cert_verified) { fprintf(stderr, "Certificate verified twice.\n"); return false; } return true; } static int CertVerifyCallback(X509_STORE_CTX *store_ctx, void *arg) { SSL *ssl = (SSL *)X509_STORE_CTX_get_ex_data( store_ctx, SSL_get_ex_data_X509_STORE_CTX_idx()); const TestConfig *config = GetTestConfig(ssl); if (!CheckVerifyCallback(ssl)) { return 0; } GetTestState(ssl)->cert_verified = true; if (config->verify_fail) { store_ctx->error = X509_V_ERR_APPLICATION_VERIFICATION; return 0; } return 1; } bool LoadCertificate(bssl::UniquePtr<X509> *out_x509, bssl::UniquePtr<STACK_OF(X509)> *out_chain, const std::string &file) { bssl::UniquePtr<BIO> bio(BIO_new(BIO_s_file())); if (!bio || !BIO_read_filename(bio.get(), file.c_str())) { return false; } out_x509->reset(PEM_read_bio_X509(bio.get(), nullptr, nullptr, nullptr)); if (!*out_x509) { return false; } out_chain->reset(sk_X509_new_null()); if (!*out_chain) { return false; } // Keep reading the certificate chain. for (;;) { bssl::UniquePtr<X509> cert( PEM_read_bio_X509(bio.get(), nullptr, nullptr, nullptr)); if (!cert) { break; } if (!bssl::PushToStack(out_chain->get(), std::move(cert))) { return false; } } uint32_t err = ERR_peek_last_error(); if (ERR_GET_LIB(err) != ERR_LIB_PEM || ERR_GET_REASON(err) != PEM_R_NO_START_LINE) { return false; } ERR_clear_error(); return true; } bssl::UniquePtr<EVP_PKEY> LoadPrivateKey(const std::string &file) { bssl::UniquePtr<BIO> bio(BIO_new(BIO_s_file())); if (!bio || !BIO_read_filename(bio.get(), file.c_str())) { return nullptr; } return bssl::UniquePtr<EVP_PKEY>( PEM_read_bio_PrivateKey(bio.get(), NULL, NULL, NULL)); } static bool GetCertificate(SSL *ssl, bssl::UniquePtr<X509> *out_x509, bssl::UniquePtr<STACK_OF(X509)> *out_chain, bssl::UniquePtr<EVP_PKEY> *out_pkey) { const TestConfig *config = GetTestConfig(ssl); if (!config->signing_prefs.empty()) { std::vector<uint16_t> u16s(config->signing_prefs.begin(), config->signing_prefs.end()); if (!SSL_set_signing_algorithm_prefs(ssl, u16s.data(), u16s.size())) { return false; } } if (!config->key_file.empty()) { *out_pkey = LoadPrivateKey(config->key_file.c_str()); if (!*out_pkey) { return false; } } if (!config->cert_file.empty() && !LoadCertificate(out_x509, out_chain, config->cert_file.c_str())) { return false; } if (!config->ocsp_response.empty() && !config->set_ocsp_in_callback && !SSL_set_ocsp_response(ssl, (const uint8_t *)config->ocsp_response.data(), config->ocsp_response.size())) { return false; } return true; } static bool FromHexDigit(uint8_t *out, char c) { if ('0' <= c && c <= '9') { *out = c - '0'; return true; } if ('a' <= c && c <= 'f') { *out = c - 'a' + 10; return true; } if ('A' <= c && c <= 'F') { *out = c - 'A' + 10; return true; } return false; } static bool HexDecode(std::string *out, const std::string &in) { if ((in.size() & 1) != 0) { return false; } std::unique_ptr<uint8_t[]> buf(new uint8_t[in.size() / 2]); for (size_t i = 0; i < in.size() / 2; i++) { uint8_t high, low; if (!FromHexDigit(&high, in[i * 2]) || !FromHexDigit(&low, in[i * 2 + 1])) { return false; } buf[i] = (high << 4) | low; } out->assign(reinterpret_cast<const char *>(buf.get()), in.size() / 2); return true; } static std::vector<std::string> SplitParts(const std::string &in, const char delim) { std::vector<std::string> ret; size_t start = 0; for (size_t i = 0; i < in.size(); i++) { if (in[i] == delim) { ret.push_back(in.substr(start, i - start)); start = i + 1; } } ret.push_back(in.substr(start, std::string::npos)); return ret; } static std::vector<std::string> DecodeHexStrings( const std::string &hex_strings) { std::vector<std::string> ret; const std::vector<std::string> parts = SplitParts(hex_strings, ','); for (const auto &part : parts) { std::string binary; if (!HexDecode(&binary, part)) { fprintf(stderr, "Bad hex string: %s.\n", part.c_str()); return ret; } ret.push_back(binary); } return ret; } static bssl::UniquePtr<STACK_OF(X509_NAME)> DecodeHexX509Names( const std::string &hex_names) { const std::vector<std::string> der_names = DecodeHexStrings(hex_names); bssl::UniquePtr<STACK_OF(X509_NAME)> ret(sk_X509_NAME_new_null()); if (!ret) { return nullptr; } for (const auto &der_name : der_names) { const uint8_t *const data = reinterpret_cast<const uint8_t *>(der_name.data()); const uint8_t *derp = data; bssl::UniquePtr<X509_NAME> name( d2i_X509_NAME(nullptr, &derp, der_name.size())); if (!name || derp != data + der_name.size()) { fprintf(stderr, "Failed to parse X509_NAME.\n"); return nullptr; } if (!bssl::PushToStack(ret.get(), std::move(name))) { return nullptr; } } return ret; } static bool CheckPeerVerifyPrefs(SSL *ssl) { const TestConfig *config = GetTestConfig(ssl); if (!config->expect_peer_verify_prefs.empty()) { const uint16_t *peer_sigalgs; size_t num_peer_sigalgs = SSL_get0_peer_verify_algorithms(ssl, &peer_sigalgs); if (config->expect_peer_verify_prefs.size() != num_peer_sigalgs) { fprintf(stderr, "peer verify preferences length mismatch (got %zu, wanted %zu)\n", num_peer_sigalgs, config->expect_peer_verify_prefs.size()); return false; } for (size_t i = 0; i < num_peer_sigalgs; i++) { if (static_cast<int>(peer_sigalgs[i]) != config->expect_peer_verify_prefs[i]) { fprintf(stderr, "peer verify preference %zu mismatch (got %04x, wanted %04x\n", i, peer_sigalgs[i], config->expect_peer_verify_prefs[i]); return false; } } } return true; } static bool CheckCertificateRequest(SSL *ssl) { const TestConfig *config = GetTestConfig(ssl); if (!CheckPeerVerifyPrefs(ssl)) { return false; } if (!config->expect_certificate_types.empty()) { const uint8_t *certificate_types; size_t certificate_types_len = SSL_get0_certificate_types(ssl, &certificate_types); if (certificate_types_len != config->expect_certificate_types.size() || OPENSSL_memcmp(certificate_types, config->expect_certificate_types.data(), certificate_types_len) != 0) { fprintf(stderr, "certificate types mismatch.\n"); return false; } } if (!config->expect_client_ca_list.empty()) { bssl::UniquePtr<STACK_OF(X509_NAME)> expected = DecodeHexX509Names(config->expect_client_ca_list); const size_t num_expected = sk_X509_NAME_num(expected.get()); const STACK_OF(X509_NAME) *received = SSL_get_client_CA_list(ssl); const size_t num_received = sk_X509_NAME_num(received); if (num_received != num_expected) { fprintf(stderr, "expected %u names in CertificateRequest but got %u.\n", static_cast<unsigned>(num_expected), static_cast<unsigned>(num_received)); return false; } for (size_t i = 0; i < num_received; i++) { if (X509_NAME_cmp(sk_X509_NAME_value(received, i), sk_X509_NAME_value(expected.get(), i)) != 0) { fprintf(stderr, "names in CertificateRequest differ at index #%d.\n", static_cast<unsigned>(i)); return false; } } const STACK_OF(CRYPTO_BUFFER) *buffers = SSL_get0_server_requested_CAs(ssl); if (sk_CRYPTO_BUFFER_num(buffers) != num_received) { fprintf(stderr, "Mismatch between SSL_get_server_requested_CAs and " "SSL_get_client_CA_list.\n"); return false; } } return true; } static int ClientCertCallback(SSL *ssl, X509 **out_x509, EVP_PKEY **out_pkey) { if (!CheckCertificateRequest(ssl)) { return -1; } if (GetTestConfig(ssl)->async && !GetTestState(ssl)->cert_ready) { return -1; } bssl::UniquePtr<X509> x509; bssl::UniquePtr<STACK_OF(X509)> chain; bssl::UniquePtr<EVP_PKEY> pkey; if (!GetCertificate(ssl, &x509, &chain, &pkey)) { return -1; } // Return zero for no certificate. if (!x509) { return 0; } // Chains and asynchronous private keys are not supported with client_cert_cb. *out_x509 = x509.release(); *out_pkey = pkey.release(); return 1; } static ssl_private_key_result_t AsyncPrivateKeyComplete(SSL *ssl, uint8_t *out, size_t *out_len, size_t max_out); static ssl_private_key_result_t AsyncPrivateKeySign( SSL *ssl, uint8_t *out, size_t *out_len, size_t max_out, uint16_t signature_algorithm, const uint8_t *in, size_t in_len) { TestState *test_state = GetTestState(ssl); test_state->used_private_key = true; if (!test_state->private_key_result.empty()) { fprintf(stderr, "AsyncPrivateKeySign called with operation pending.\n"); abort(); } if (EVP_PKEY_id(test_state->private_key.get()) != SSL_get_signature_algorithm_key_type(signature_algorithm)) { fprintf(stderr, "Key type does not match signature algorithm.\n"); abort(); } // Determine the hash. const EVP_MD *md = SSL_get_signature_algorithm_digest(signature_algorithm); bssl::ScopedEVP_MD_CTX ctx; EVP_PKEY_CTX *pctx; if (!EVP_DigestSignInit(ctx.get(), &pctx, md, nullptr, test_state->private_key.get())) { return ssl_private_key_failure; } // Configure additional signature parameters. if (SSL_is_signature_algorithm_rsa_pss(signature_algorithm)) { if (!EVP_PKEY_CTX_set_rsa_padding(pctx, RSA_PKCS1_PSS_PADDING) || !EVP_PKEY_CTX_set_rsa_pss_saltlen(pctx, -1 /* salt len = hash len */)) { return ssl_private_key_failure; } } // Write the signature into |test_state|. size_t len = 0; if (!EVP_DigestSign(ctx.get(), nullptr, &len, in, in_len)) { return ssl_private_key_failure; } test_state->private_key_result.resize(len); if (!EVP_DigestSign(ctx.get(), test_state->private_key_result.data(), &len, in, in_len)) { return ssl_private_key_failure; } test_state->private_key_result.resize(len); return AsyncPrivateKeyComplete(ssl, out, out_len, max_out); } static ssl_private_key_result_t AsyncPrivateKeyDecrypt(SSL *ssl, uint8_t *out, size_t *out_len, size_t max_out, const uint8_t *in, size_t in_len) { TestState *test_state = GetTestState(ssl); test_state->used_private_key = true; if (!test_state->private_key_result.empty()) { fprintf(stderr, "AsyncPrivateKeyDecrypt called with operation pending.\n"); abort(); } RSA *rsa = EVP_PKEY_get0_RSA(test_state->private_key.get()); if (rsa == NULL) { fprintf(stderr, "AsyncPrivateKeyDecrypt called with incorrect key type.\n"); abort(); } test_state->private_key_result.resize(RSA_size(rsa)); if (!RSA_decrypt(rsa, out_len, test_state->private_key_result.data(), RSA_size(rsa), in, in_len, RSA_NO_PADDING)) { return ssl_private_key_failure; } test_state->private_key_result.resize(*out_len); return AsyncPrivateKeyComplete(ssl, out, out_len, max_out); } static ssl_private_key_result_t AsyncPrivateKeyComplete(SSL *ssl, uint8_t *out, size_t *out_len, size_t max_out) { TestState *test_state = GetTestState(ssl); if (test_state->private_key_result.empty()) { fprintf(stderr, "AsyncPrivateKeyComplete called without operation pending.\n"); abort(); } if (GetTestConfig(ssl)->async && test_state->private_key_retries < 2) { // Only return the decryption on the second attempt, to test both incomplete // |sign|/|decrypt| and |complete|. return ssl_private_key_retry; } if (max_out < test_state->private_key_result.size()) { fprintf(stderr, "Output buffer too small.\n"); return ssl_private_key_failure; } OPENSSL_memcpy(out, test_state->private_key_result.data(), test_state->private_key_result.size()); *out_len = test_state->private_key_result.size(); test_state->private_key_result.clear(); test_state->private_key_retries = 0; return ssl_private_key_success; } static const SSL_PRIVATE_KEY_METHOD g_async_private_key_method = { AsyncPrivateKeySign, AsyncPrivateKeyDecrypt, AsyncPrivateKeyComplete, }; static bool InstallCertificate(SSL *ssl) { bssl::UniquePtr<X509> x509; bssl::UniquePtr<STACK_OF(X509)> chain; bssl::UniquePtr<EVP_PKEY> pkey; if (!GetCertificate(ssl, &x509, &chain, &pkey)) { return false; } if (pkey) { TestState *test_state = GetTestState(ssl); const TestConfig *config = GetTestConfig(ssl); if (config->async || config->handshake_hints) { // Install a custom private key if testing asynchronous callbacks, or if // testing handshake hints. In the handshake hints case, we wish to check // that hints only mismatch when allowed. test_state->private_key = std::move(pkey); SSL_set_private_key_method(ssl, &g_async_private_key_method); } else if (!SSL_use_PrivateKey(ssl, pkey.get())) { return false; } } if (x509 && !SSL_use_certificate(ssl, x509.get())) { return false; } if (sk_X509_num(chain.get()) > 0 && !SSL_set1_chain(ssl, chain.get())) { return false; } return true; } static enum ssl_select_cert_result_t SelectCertificateCallback( const SSL_CLIENT_HELLO *client_hello) { SSL *ssl = client_hello->ssl; const TestConfig *config = GetTestConfig(ssl); TestState *test_state = GetTestState(ssl); test_state->early_callback_called = true; if (!config->expect_server_name.empty()) { const char *server_name = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name); if (server_name == nullptr || std::string(server_name) != config->expect_server_name) { fprintf(stderr, "Server name mismatch in early callback (got %s; want %s).\n", server_name, config->expect_server_name.c_str()); return ssl_select_cert_error; } } if (config->fail_early_callback) { return ssl_select_cert_error; } // Simulate some asynchronous work in the early callback. if ((config->use_early_callback || test_state->get_handshake_hints_cb) && config->async && !test_state->early_callback_ready) { return ssl_select_cert_retry; } if (test_state->get_handshake_hints_cb && !test_state->get_handshake_hints_cb(client_hello)) { return ssl_select_cert_error; } if (config->use_early_callback && !InstallCertificate(ssl)) { return ssl_select_cert_error; } return ssl_select_cert_success; } static int SetQuicReadSecret(SSL *ssl, enum ssl_encryption_level_t level, const SSL_CIPHER *cipher, const uint8_t *secret, size_t secret_len) { MockQuicTransport *quic_transport = GetTestState(ssl)->quic_transport.get(); if (quic_transport == nullptr) { fprintf(stderr, "No QUIC transport.\n"); return 0; } return quic_transport->SetReadSecret(level, cipher, secret, secret_len); } static int SetQuicWriteSecret(SSL *ssl, enum ssl_encryption_level_t level, const SSL_CIPHER *cipher, const uint8_t *secret, size_t secret_len) { MockQuicTransport *quic_transport = GetTestState(ssl)->quic_transport.get(); if (quic_transport == nullptr) { fprintf(stderr, "No QUIC transport.\n"); return 0; } return quic_transport->SetWriteSecret(level, cipher, secret, secret_len); } static int AddQuicHandshakeData(SSL *ssl, enum ssl_encryption_level_t level, const uint8_t *data, size_t len) { MockQuicTransport *quic_transport = GetTestState(ssl)->quic_transport.get(); if (quic_transport == nullptr) { fprintf(stderr, "No QUIC transport.\n"); return 0; } return quic_transport->WriteHandshakeData(level, data, len); } static int FlushQuicFlight(SSL *ssl) { MockQuicTransport *quic_transport = GetTestState(ssl)->quic_transport.get(); if (quic_transport == nullptr) { fprintf(stderr, "No QUIC transport.\n"); return 0; } return quic_transport->Flush(); } static int SendQuicAlert(SSL *ssl, enum ssl_encryption_level_t level, uint8_t alert) { MockQuicTransport *quic_transport = GetTestState(ssl)->quic_transport.get(); if (quic_transport == nullptr) { fprintf(stderr, "No QUIC transport.\n"); return 0; } return quic_transport->SendAlert(level, alert); } static const SSL_QUIC_METHOD g_quic_method = { SetQuicReadSecret, SetQuicWriteSecret, AddQuicHandshakeData, FlushQuicFlight, SendQuicAlert, }; bssl::UniquePtr<SSL_CTX> TestConfig::SetupCtx(SSL_CTX *old_ctx) const { bssl::UniquePtr<SSL_CTX> ssl_ctx( SSL_CTX_new(is_dtls ? DTLS_method() : TLS_method())); if (!ssl_ctx) { return nullptr; } CRYPTO_once(&once, init_once); SSL_CTX_set0_buffer_pool(ssl_ctx.get(), g_pool); std::string cipher_list = "ALL"; if (!cipher.empty()) { cipher_list = cipher; SSL_CTX_set_options(ssl_ctx.get(), SSL_OP_CIPHER_SERVER_PREFERENCE); } if (!SSL_CTX_set_strict_cipher_list(ssl_ctx.get(), cipher_list.c_str())) { return nullptr; } if (async && is_server) { // Disable the internal session cache. To test asynchronous session lookup, // we use an external session cache. SSL_CTX_set_session_cache_mode( ssl_ctx.get(), SSL_SESS_CACHE_BOTH | SSL_SESS_CACHE_NO_INTERNAL); SSL_CTX_sess_set_get_cb(ssl_ctx.get(), GetSessionCallback); } else { SSL_CTX_set_session_cache_mode(ssl_ctx.get(), SSL_SESS_CACHE_BOTH); } SSL_CTX_set_select_certificate_cb(ssl_ctx.get(), SelectCertificateCallback); if (use_old_client_cert_callback) { SSL_CTX_set_client_cert_cb(ssl_ctx.get(), ClientCertCallback); } SSL_CTX_set_next_protos_advertised_cb(ssl_ctx.get(), NextProtosAdvertisedCallback, NULL); if (!select_next_proto.empty()) { SSL_CTX_set_next_proto_select_cb(ssl_ctx.get(), NextProtoSelectCallback, NULL); } if (!select_alpn.empty() || decline_alpn || reject_alpn || select_empty_alpn) { SSL_CTX_set_alpn_select_cb(ssl_ctx.get(), AlpnSelectCallback, NULL); } SSL_CTX_set_channel_id_cb(ssl_ctx.get(), ChannelIdCallback); SSL_CTX_set_current_time_cb(ssl_ctx.get(), CurrentTimeCallback); SSL_CTX_set_info_callback(ssl_ctx.get(), InfoCallback); SSL_CTX_sess_set_new_cb(ssl_ctx.get(), NewSessionCallback); if (use_ticket_callback || handshake_hints) { // If using handshake hints, always enable the ticket callback, so we can // check that hints only mismatch when allowed. The ticket callback also // uses a constant key, which simplifies the test. SSL_CTX_set_tlsext_ticket_key_cb(ssl_ctx.get(), TicketKeyCallback); } if (!use_custom_verify_callback) { SSL_CTX_set_cert_verify_callback(ssl_ctx.get(), CertVerifyCallback, NULL); } if (!signed_cert_timestamps.empty() && !SSL_CTX_set_signed_cert_timestamp_list( ssl_ctx.get(), (const uint8_t *)signed_cert_timestamps.data(), signed_cert_timestamps.size())) { return nullptr; } if (!use_client_ca_list.empty()) { if (use_client_ca_list == "<NULL>") { SSL_CTX_set_client_CA_list(ssl_ctx.get(), nullptr); } else if (use_client_ca_list == "<EMPTY>") { bssl::UniquePtr<STACK_OF(X509_NAME)> names; SSL_CTX_set_client_CA_list(ssl_ctx.get(), names.release()); } else { bssl::UniquePtr<STACK_OF(X509_NAME)> names = DecodeHexX509Names(use_client_ca_list); SSL_CTX_set_client_CA_list(ssl_ctx.get(), names.release()); } } if (enable_grease) { SSL_CTX_set_grease_enabled(ssl_ctx.get(), 1); } if (!expect_server_name.empty()) { SSL_CTX_set_tlsext_servername_callback(ssl_ctx.get(), ServerNameCallback); } if (enable_early_data) { SSL_CTX_set_early_data_enabled(ssl_ctx.get(), 1); } if (allow_unknown_alpn_protos) { SSL_CTX_set_allow_unknown_alpn_protos(ssl_ctx.get(), 1); } if (!verify_prefs.empty()) { std::vector<uint16_t> u16s(verify_prefs.begin(), verify_prefs.end()); if (!SSL_CTX_set_verify_algorithm_prefs(ssl_ctx.get(), u16s.data(), u16s.size())) { return nullptr; } } SSL_CTX_set_msg_callback(ssl_ctx.get(), MessageCallback); if (allow_false_start_without_alpn) { SSL_CTX_set_false_start_allowed_without_alpn(ssl_ctx.get(), 1); } if (use_ocsp_callback) { SSL_CTX_set_tlsext_status_cb(ssl_ctx.get(), LegacyOCSPCallback); } if (old_ctx) { uint8_t keys[48]; if (!SSL_CTX_get_tlsext_ticket_keys(old_ctx, &keys, sizeof(keys)) || !SSL_CTX_set_tlsext_ticket_keys(ssl_ctx.get(), keys, sizeof(keys))) { return nullptr; } CopySessions(ssl_ctx.get(), old_ctx); } else if (!ticket_key.empty() && !SSL_CTX_set_tlsext_ticket_keys(ssl_ctx.get(), ticket_key.data(), ticket_key.size())) { return nullptr; } if (install_cert_compression_algs && (!SSL_CTX_add_cert_compression_alg( ssl_ctx.get(), 0xff02, [](SSL *ssl, CBB *out, const uint8_t *in, size_t in_len) -> int { if (!CBB_add_u8(out, 1) || !CBB_add_u8(out, 2) || !CBB_add_u8(out, 3) || !CBB_add_u8(out, 4) || !CBB_add_bytes(out, in, in_len)) { return 0; } return 1; }, [](SSL *ssl, CRYPTO_BUFFER **out, size_t uncompressed_len, const uint8_t *in, size_t in_len) -> int { if (in_len < 4 || in[0] != 1 || in[1] != 2 || in[2] != 3 || in[3] != 4 || uncompressed_len != in_len - 4) { return 0; } const bssl::Span<const uint8_t> uncompressed(in + 4, in_len - 4); *out = CRYPTO_BUFFER_new(uncompressed.data(), uncompressed.size(), nullptr); return 1; }) || !SSL_CTX_add_cert_compression_alg( ssl_ctx.get(), 0xff01, [](SSL *ssl, CBB *out, const uint8_t *in, size_t in_len) -> int { if (in_len < 2 || in[0] != 0 || in[1] != 0) { return 0; } return CBB_add_bytes(out, in + 2, in_len - 2); }, [](SSL *ssl, CRYPTO_BUFFER **out, size_t uncompressed_len, const uint8_t *in, size_t in_len) -> int { if (uncompressed_len != 2 + in_len) { return 0; } std::unique_ptr<uint8_t[]> buf(new uint8_t[2 + in_len]); buf[0] = 0; buf[1] = 0; OPENSSL_memcpy(&buf[2], in, in_len); *out = CRYPTO_BUFFER_new(buf.get(), 2 + in_len, nullptr); return 1; }))) { fprintf(stderr, "SSL_CTX_add_cert_compression_alg failed.\n"); abort(); } if (server_preference) { SSL_CTX_set_options(ssl_ctx.get(), SSL_OP_CIPHER_SERVER_PREFERENCE); } if (is_quic) { SSL_CTX_set_quic_method(ssl_ctx.get(), &g_quic_method); } return ssl_ctx; } static int DDoSCallback(const SSL_CLIENT_HELLO *client_hello) { const TestConfig *config = GetTestConfig(client_hello->ssl); return config->fail_ddos_callback ? 0 : 1; } static unsigned PskClientCallback(SSL *ssl, const char *hint, char *out_identity, unsigned max_identity_len, uint8_t *out_psk, unsigned max_psk_len) { const TestConfig *config = GetTestConfig(ssl); if (config->psk_identity.empty()) { if (hint != nullptr) { fprintf(stderr, "Server PSK hint was non-null.\n"); return 0; } } else if (hint == nullptr || strcmp(hint, config->psk_identity.c_str()) != 0) { fprintf(stderr, "Server PSK hint did not match.\n"); return 0; } // Account for the trailing '\0' for the identity. if (config->psk_identity.size() >= max_identity_len || config->psk.size() > max_psk_len) { fprintf(stderr, "PSK buffers too small.\n"); return 0; } OPENSSL_strlcpy(out_identity, config->psk_identity.c_str(), max_identity_len); OPENSSL_memcpy(out_psk, config->psk.data(), config->psk.size()); return config->psk.size(); } static unsigned PskServerCallback(SSL *ssl, const char *identity, uint8_t *out_psk, unsigned max_psk_len) { const TestConfig *config = GetTestConfig(ssl); if (strcmp(identity, config->psk_identity.c_str()) != 0) { fprintf(stderr, "Client PSK identity did not match.\n"); return 0; } if (config->psk.size() > max_psk_len) { fprintf(stderr, "PSK buffers too small.\n"); return 0; } OPENSSL_memcpy(out_psk, config->psk.data(), config->psk.size()); return config->psk.size(); } static ssl_verify_result_t CustomVerifyCallback(SSL *ssl, uint8_t *out_alert) { const TestConfig *config = GetTestConfig(ssl); if (!CheckVerifyCallback(ssl)) { return ssl_verify_invalid; } if (config->async && !GetTestState(ssl)->custom_verify_ready) { return ssl_verify_retry; } GetTestState(ssl)->cert_verified = true; if (config->verify_fail) { return ssl_verify_invalid; } return ssl_verify_ok; } static int CertCallback(SSL *ssl, void *arg) { const TestConfig *config = GetTestConfig(ssl); // Check the peer certificate metadata is as expected. if ((!SSL_is_server(ssl) && !CheckCertificateRequest(ssl)) || !CheckPeerVerifyPrefs(ssl)) { return -1; } if (config->fail_cert_callback) { return 0; } // The certificate will be installed via other means. if (!config->async || config->use_early_callback) { return 1; } if (!GetTestState(ssl)->cert_ready) { return -1; } if (!InstallCertificate(ssl)) { return 0; } return 1; } bssl::UniquePtr<SSL> TestConfig::NewSSL( SSL_CTX *ssl_ctx, SSL_SESSION *session, std::unique_ptr<TestState> test_state) const { bssl::UniquePtr<SSL> ssl(SSL_new(ssl_ctx)); if (!ssl) { return nullptr; } if (!SetTestConfig(ssl.get(), this)) { return nullptr; } if (test_state != nullptr) { if (!SetTestState(ssl.get(), std::move(test_state))) { return nullptr; } } if (fallback_scsv && !SSL_set_mode(ssl.get(), SSL_MODE_SEND_FALLBACK_SCSV)) { return nullptr; } // Install the certificate synchronously if nothing else will handle it. if (!use_early_callback && !use_old_client_cert_callback && !async && !InstallCertificate(ssl.get())) { return nullptr; } if (!use_old_client_cert_callback) { SSL_set_cert_cb(ssl.get(), CertCallback, nullptr); } int mode = SSL_VERIFY_NONE; if (require_any_client_certificate) { mode = SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT; } if (verify_peer) { mode = SSL_VERIFY_PEER; } if (verify_peer_if_no_obc) { // Set SSL_VERIFY_FAIL_IF_NO_PEER_CERT so testing whether client // certificates were requested is easy. mode = SSL_VERIFY_PEER | SSL_VERIFY_PEER_IF_NO_OBC | SSL_VERIFY_FAIL_IF_NO_PEER_CERT; } if (use_custom_verify_callback) { SSL_set_custom_verify(ssl.get(), mode, CustomVerifyCallback); } else if (mode != SSL_VERIFY_NONE) { SSL_set_verify(ssl.get(), mode, NULL); } if (false_start) { SSL_set_mode(ssl.get(), SSL_MODE_ENABLE_FALSE_START); } if (cbc_record_splitting) { SSL_set_mode(ssl.get(), SSL_MODE_CBC_RECORD_SPLITTING); } if (partial_write) { SSL_set_mode(ssl.get(), SSL_MODE_ENABLE_PARTIAL_WRITE); } if (reverify_on_resume) { SSL_CTX_set_reverify_on_resume(ssl_ctx, 1); } if (enforce_rsa_key_usage) { SSL_set_enforce_rsa_key_usage(ssl.get(), 1); } if (no_tls13) { SSL_set_options(ssl.get(), SSL_OP_NO_TLSv1_3); } if (no_tls12) { SSL_set_options(ssl.get(), SSL_OP_NO_TLSv1_2); } if (no_tls11) { SSL_set_options(ssl.get(), SSL_OP_NO_TLSv1_1); } if (no_tls1) { SSL_set_options(ssl.get(), SSL_OP_NO_TLSv1); } if (no_ticket) { SSL_set_options(ssl.get(), SSL_OP_NO_TICKET); } if (!expect_channel_id.empty() || enable_channel_id) { SSL_set_tls_channel_id_enabled(ssl.get(), 1); } if (enable_ech_grease) { SSL_set_enable_ech_grease(ssl.get(), 1); } if (ech_server_configs.size() != ech_server_keys.size() || ech_server_configs.size() != ech_is_retry_config.size()) { fprintf(stderr, "-ech-server-config, -ech-server-key, and -ech-is-retry-config " "flags must match.\n"); return nullptr; } if (!ech_server_configs.empty()) { bssl::UniquePtr<SSL_ECH_SERVER_CONFIG_LIST> config_list( SSL_ECH_SERVER_CONFIG_LIST_new()); if (!config_list) { return nullptr; } for (size_t i = 0; i < ech_server_configs.size(); i++) { const std::string &ech_config = ech_server_configs[i]; const std::string &ech_private_key = ech_server_keys[i]; const int is_retry_config = ech_is_retry_config[i]; if (!SSL_ECH_SERVER_CONFIG_LIST_add( config_list.get(), is_retry_config, reinterpret_cast<const uint8_t *>(ech_config.data()), ech_config.size(), reinterpret_cast<const uint8_t *>(ech_private_key.data()), ech_private_key.size())) { return nullptr; } } if (!SSL_CTX_set1_ech_server_config_list(ssl_ctx, config_list.get())) { return nullptr; } } if (!send_channel_id.empty()) { SSL_set_tls_channel_id_enabled(ssl.get(), 1); if (!async) { // The async case will be supplied by |ChannelIdCallback|. bssl::UniquePtr<EVP_PKEY> pkey = LoadPrivateKey(send_channel_id); if (!pkey || !SSL_set1_tls_channel_id(ssl.get(), pkey.get())) { return nullptr; } } } if (!send_token_binding_params.empty()) { SSL_set_token_binding_params( ssl.get(), reinterpret_cast<const uint8_t *>(send_token_binding_params.data()), send_token_binding_params.length()); } if (!host_name.empty() && !SSL_set_tlsext_host_name(ssl.get(), host_name.c_str())) { return nullptr; } if (!advertise_alpn.empty() && SSL_set_alpn_protos( ssl.get(), reinterpret_cast<const uint8_t *>(advertise_alpn.data()), advertise_alpn.size()) != 0) { return nullptr; } if (!defer_alps) { for (const auto &pair : application_settings) { if (!SSL_add_application_settings( ssl.get(), reinterpret_cast<const uint8_t *>(pair.first.data()), pair.first.size(), reinterpret_cast<const uint8_t *>(pair.second.data()), pair.second.size())) { return nullptr; } } } if (!psk.empty()) { SSL_set_psk_client_callback(ssl.get(), PskClientCallback); SSL_set_psk_server_callback(ssl.get(), PskServerCallback); } if (!psk_identity.empty() && !SSL_use_psk_identity_hint(ssl.get(), psk_identity.c_str())) { return nullptr; } if (!srtp_profiles.empty() && !SSL_set_srtp_profiles(ssl.get(), srtp_profiles.c_str())) { return nullptr; } if (enable_ocsp_stapling) { SSL_enable_ocsp_stapling(ssl.get()); } if (enable_signed_cert_timestamps) { SSL_enable_signed_cert_timestamps(ssl.get()); } if (min_version != 0 && !SSL_set_min_proto_version(ssl.get(), (uint16_t)min_version)) { return nullptr; } if (max_version != 0 && !SSL_set_max_proto_version(ssl.get(), (uint16_t)max_version)) { return nullptr; } if (mtu != 0) { SSL_set_options(ssl.get(), SSL_OP_NO_QUERY_MTU); SSL_set_mtu(ssl.get(), mtu); } if (install_ddos_callback) { SSL_CTX_set_dos_protection_cb(ssl_ctx, DDoSCallback); } SSL_set_shed_handshake_config(ssl.get(), true); if (renegotiate_once) { SSL_set_renegotiate_mode(ssl.get(), ssl_renegotiate_once); } if (renegotiate_freely || forbid_renegotiation_after_handshake) { // |forbid_renegotiation_after_handshake| will disable renegotiation later. SSL_set_renegotiate_mode(ssl.get(), ssl_renegotiate_freely); } if (renegotiate_ignore) { SSL_set_renegotiate_mode(ssl.get(), ssl_renegotiate_ignore); } if (renegotiate_explicit) { SSL_set_renegotiate_mode(ssl.get(), ssl_renegotiate_explicit); } if (!check_close_notify) { SSL_set_quiet_shutdown(ssl.get(), 1); } if (!curves.empty()) { std::vector<int> nids; for (auto curve : curves) { switch (curve) { case SSL_CURVE_SECP224R1: nids.push_back(NID_secp224r1); break; case SSL_CURVE_SECP256R1: nids.push_back(NID_X9_62_prime256v1); break; case SSL_CURVE_SECP384R1: nids.push_back(NID_secp384r1); break; case SSL_CURVE_SECP521R1: nids.push_back(NID_secp521r1); break; case SSL_CURVE_X25519: nids.push_back(NID_X25519); break; case SSL_CURVE_CECPQ2: nids.push_back(NID_CECPQ2); break; } if (!SSL_set1_curves(ssl.get(), &nids[0], nids.size())) { return nullptr; } } } if (initial_timeout_duration_ms > 0) { DTLSv1_set_initial_timeout_duration(ssl.get(), initial_timeout_duration_ms); } if (max_cert_list > 0) { SSL_set_max_cert_list(ssl.get(), max_cert_list); } if (retain_only_sha256_client_cert) { SSL_set_retain_only_sha256_of_client_certs(ssl.get(), 1); } if (max_send_fragment > 0) { SSL_set_max_send_fragment(ssl.get(), max_send_fragment); } if (quic_use_legacy_codepoint != -1) { SSL_set_quic_use_legacy_codepoint(ssl.get(), quic_use_legacy_codepoint); } if (!quic_transport_params.empty()) { if (!SSL_set_quic_transport_params( ssl.get(), reinterpret_cast<const uint8_t *>(quic_transport_params.data()), quic_transport_params.size())) { return nullptr; } } if (jdk11_workaround) { SSL_set_jdk11_workaround(ssl.get(), 1); } if (session != NULL) { if (!is_server) { if (SSL_set_session(ssl.get(), session) != 1) { return nullptr; } } else if (async) { // The internal session cache is disabled, so install the session // manually. SSL_SESSION_up_ref(session); GetTestState(ssl.get())->pending_session.reset(session); } } if (!delegated_credential.empty()) { std::string::size_type comma = delegated_credential.find(','); if (comma == std::string::npos) { fprintf(stderr, "failed to find comma in delegated credential argument.\n"); return nullptr; } const std::string dc_hex = delegated_credential.substr(0, comma); const std::string pkcs8_hex = delegated_credential.substr(comma + 1); std::string dc, pkcs8; if (!HexDecode(&dc, dc_hex) || !HexDecode(&pkcs8, pkcs8_hex)) { fprintf(stderr, "failed to hex decode delegated credential argument.\n"); return nullptr; } CBS dc_cbs(bssl::Span<const uint8_t>( reinterpret_cast<const uint8_t *>(dc.data()), dc.size())); CBS pkcs8_cbs(bssl::Span<const uint8_t>( reinterpret_cast<const uint8_t *>(pkcs8.data()), pkcs8.size())); bssl::UniquePtr<EVP_PKEY> priv(EVP_parse_private_key(&pkcs8_cbs)); if (!priv) { fprintf(stderr, "failed to parse delegated credential private key.\n"); return nullptr; } bssl::UniquePtr<CRYPTO_BUFFER> dc_buf( CRYPTO_BUFFER_new_from_CBS(&dc_cbs, nullptr)); if (!SSL_set1_delegated_credential(ssl.get(), dc_buf.get(), priv.get(), nullptr)) { fprintf(stderr, "SSL_set1_delegated_credential failed.\n"); return nullptr; } } if (!quic_early_data_context.empty() && !SSL_set_quic_early_data_context( ssl.get(), reinterpret_cast<const uint8_t *>(quic_early_data_context.data()), quic_early_data_context.size())) { return nullptr; } return ssl; }
@include ;------------------------------------------------------------------------------- ; GIEPY Normal Sprite code ;------------------------------------------------------------------------------- pushpc org $02a9ca ; This address is overritten by SA-1 patch. dl InitSpriteTableFix ; So strict checking is impossible. if !true == !sa1 %org_assert_long2($02a9d4, c87f,d69d) else %org_assert_long2($02a9d4, c81f,e29d) endif jsl LoadNrmSprExtraInfo if !true == !sa1 %org_assert_long2($018172, 429d,08a9) else %org_assert_long2($018172, c89d,08a9) endif jsl SprInitHijack nop if !true == !sa1 %org_assert_long2($0185c3, b274,919c) else %org_assert_long2($0185c3, b514,919c) endif jsl SprMainHijack nop if !true == !sa1 %org_assert_long2($07f787, 6b33,769d) else %org_assert_long2($07f787, 6b15,a09d) ;%org_assert_long4($07f787, 9d,a0,15,6b) endif jml SprEraseTweak if !true == !sa1 %org_assert_long2($018127, f032,42bd) else %org_assert_long2($018127, f014,c8bd) endif jml SpriteStatusHandlerHijack if !true == !sa1 %org_assert_long2($02a9a3, aab4,b2da) else %org_assert_long2($02a9a3, aa9e,b5da) endif jml SilverPowBitCheck %org_assert_long2($02a971, 04a5,c8c8) jsl SetExtraBits ;--- Tweaks for extra bits ; ... scratch ram change: $06 -> $08 org $02a8ee db $08 org $02a8fd db $08 org $02a915 db $08 org $02a91f db $08 org $02a933 db $08 ;--- Tweaks for extra bits ; ... except extra bits from $14d4 org $02a964 ; Horizontal level db $01 org $02a94c ; Vertical level db $01 ;--- Tweaks for status handler ; ... change proc if !sa1 %org_assert_long2($01d43e, 6032,429e) else %org_assert_long2($01d43e, 6014,c89e) endif jsr $8133 rtl ;--- Hammer Bro init routine overwrite ; ... for generate custom sprite %org_assert_jsl($0187a7, $02da59) jml SetSpriteTables %org_assert_word($0182b3, 87a7) dw $85c2 pullpc ;------------------------------------------------- ; InitSpriteTableFix ;------------------------------------------------- InitSpriteTableFix: ; backup extra bits lda.l !extra_bits,x pha if !sa1 phx phy sep #$10 endif jsl $07f7d2|!bankB if !sa1 rep #$10 ply plx endif pla sta.l !extra_bits,x rtl ;------------------------------------------------- ; Load Sprite's Extra info ;------------------------------------------------- LoadNrmSprExtraInfo: %putdebug("LoadNrmSprExtraInfo") sta.w !1fe2,x if !true == !EXTRA_BYTES_EXT ;--- get extra bytes length jsr LoadExBytesSub beq .return ;\ Load extra bytes. - lda.b [$ce],y ; | if extra bytes size greater than 7, sta.l !extra_byte_1,x ; | extra_byte_4 will overwrite by iny ; | latest extra byte value. dec $04 ; | beq .return ; | - lda.b [$ce],y ; | sta.l !extra_byte_2,x ; | iny ; | dec $04 ; | beq .return ; | - lda.b [$ce],y ; | sta.l !extra_byte_3,x ; | iny ; | dec $04 ; | beq .return ; | - lda.b [$ce],y ; | sta.l !extra_byte_4,x ; | iny ; | dec $04 ; | bne - ;/ else iny endif .return rtl ;--- Subroutine for read extra bytes if !true == !EXTRA_BYTES_EXT LoadExBytesSub: iny phx php rep #$10 ldx.b $05 lda.l EBLengthTable,x sep #$10 plp plx sec sbc.b #3 sta.b $04 rts endif ;------------------------------------------------- ; Sprite Init Hijack ;------------------------------------------------- SprInitHijack: %putdebug("SprInitHijack") lda.b #$08 sta.w !14c8,x lda.l !extra_bits,x ; C---EE-- : C=custom, EE=sprite grp bmi .isCustom .ret rtl .isCustom %putdebug("SprInitHijack - Custom") jsl SetSpriteTables lda.l !new_code_flag beq .ret lda.l !extra_bits,x ; C---EE-- : C=custom, EE=sprite grp and.b #$0c tay lda.b #(SprInitTablePtr>>16) ;\ sta.b $0b ; | $00-$02 <- Shooter ptr group adddress rep #$20 ; | lda.w #(SprInitTablePtr&$ffff) ; | sta.b $09 ;/ sep #$20 pla pla pea $85c1 lda.l !new_sprite_num,x jmp CallSpriteFunction ;--------------------------------------- ; SetSpriteTables subroutine ; ... Init custom sprite's tweaks. ; args: ; - !extra_bits,x ... extra bits ; - !new_sprite_num,x ... custom sprite num ;--------------------------------------- SetSpriteTables: phy phb phk plb php ; calc minimum inx sep #$30 lda.l !extra_bits,x and.b #$0c tay ; y = extra_bits lda.l !new_sprite_num,x sec sbc.w SprTweakTablePtr,y ; mask rep #$20 and.w #$00ff asl #4 sta.b $00 ; Get array of Tweak struct lda.w SprTweakTablePtr+1,y clc adc.b $00 sta.b $00 rep #$10 sep #$20 lda.w SprTweakTablePtr+3,y adc.b #0 pha plb ldy.b $00 ; Get tweaks lda.w $0001,y sta.w !9e,x lda.w $0002,y sta.w !1656,x lda.w $0003,y sta.w !1662,x lda.w $0004,y sta.w !166e,x and.b #$0f sta.w !15f6,x lda.w $0005,y sta.w !167a,x lda.w $0006,y sta.w !1686,x lda.w $0007,y sta.w !190f,x ; return if it isn't new code lda.w $0000,y sta.l !new_code_flag bne .useUserCode ;--- use smw original sprite. so, custom bit = OFF lda.l !extra_bits,x ; C---EE-- and.b #$7f sta.l !extra_bits,x ; 0---EE-- bra .ret ; read extra prop if newcode .useUserCode lda.w $0008,y sta.l !extra_prop_1,x lda.w $0009,y sta.l !extra_prop_2,x .ret plp plb ply rtl ;------------------------------------------------- ; Sprite Main Hijack ;------------------------------------------------- SprMainHijack: %putdebug("SprMainHijack") stz.w $1491|!base2 lda.l !extra_bits,x bmi .isCustom if !true == !sa1 lda.b ($b4) ; b4 = sprite_num_pointer else lda !9e,x endif rtl .isCustom %putdebug("SprMainHijack - Custom") and.b #$0c tay lda.b #(SprMainTablePtr>>16) ;\ sta.b $0b ; | $09-$0b <- Sprite ptr group adddress rep #$20 ; | lda.w #(SprMainTablePtr&$ffff) ; | sta.b $09 ;/ sep #$20 pla pla pea $85c1 lda.l !new_sprite_num,x ;jmp CallSpriteFunction ;------------------------------------------------- ; Call Sprite Function ; Input: ; $09 - $0b : sprite ptr group ptr ; Y : Extra bits (group no. << 2) ; A : Sprite number ;------------------------------------------------- CallSpriteFunction: if !PIXI_COMPATIBLE phx ;\ php ; | PIXI saves registers phb ; | before call sprites routine. jsl .subCall ; | plb ; | plp ; | plx ; | rtl ;/ .subCall endif ; calc minimun inx sep #$30 sec sbc.b [$09],y ; mask rep #$20 and.w #$00ff asl asl pha ; Get array of routine's address iny lda.b [$09],y pha iny lda.b [$09],y sta.b $0a pla sta.b $09 ; Get code address rep #$10 ply sep #$20 lda.b [$09],y ;\ pha ; | Get code address iny ; | (24bits) lda.b [$09],y ; | pha ; | iny ; | lda.b [$09],y ;/ xba ;\ This is extention for the future. iny ; | Currently, this byte will be ignored. lda.b [$09],y ; | xba ;/ sta.b $0b ;\ if !PIXI_COMPATIBLE ; | pha ; | plb ; | store address endif ; | pla ; | sta.b $0a ; | pla ; | sta.b $09 ;/ sep #$30 if !PIXI_COMPATIBLE txy endif jml [$0009|!base1] ; jump to code ;------------------------------------------------- ; Sprite Erase Hijack ;------------------------------------------------- SprEraseTweak: sta.w !15a0,x stz.w !15ac,x dec sta.l !extra_bits,x if !true == !EXTRA_BYTES_EXT sta.l !extra_byte_1,x sta.l !extra_byte_2,x sta.l !extra_byte_3,x sta.l !extra_byte_4,x endif rtl ;------------------------------------------------- ; Sprite Status Handler Hijack ;------------------------------------------------- SpriteStatusHandlerHijack: lda.w !sprite_status,x ; sprite status cmp.b #2 ;\ if status is Init or Erace, bcc .CallDefaultHandler ;/ execute normal handler. cmp.b #8 bne .StsIsNotNormal jml $0185c3|!bankB ; jmp to CallSpriteMain .StsIsNotNormal pha lda.l !extra_bits,x bmi .isCustom pla .CallDefaultHandler jml $018133|!bankB ;--- Main routine can handle non-normal status ; if you use custom sprites. .isCustom lda.l !extra_prop_2,x ;\ If extra prop 2 b7 = true, bmi .CallMain ; | the default handling is not used at all. ;/ MAIN is responsible for handling all statuses. pha ;\ lda.b $02,s ; | Handle status jsl $01d43e|!bankB ; | pla ;/ asl a ;\ If extra prop 2 b6 = true, bmi .CallMain ;/ MAIN is called after the default handling of all statuses. ;--- MAIN routine handles $0a-$0c, and $03 lda.b $01,s cmp.b #9 bcs .CallMain cmp.b #3 beq .CallMain ;--- MAIN routine doesn't handle these status: ; $00-$02, $04-$09 pla jml $0185c2|!bankB .CallMain lda.l !extra_bits,x and.b #$0c tay lda.b #(SprMainTablePtr>>16) ;\ sta.b $0b ; | $00-$02 <- Shooter ptr group adddress rep #$20 ; | lda.w #(SprMainTablePtr&$ffff) ; | sta.b $09 ;/ sep #$20 pla lda.b #(($010000|!bankB)>>16) pha pea $85c1 lda.l !new_sprite_num,x jmp CallSpriteFunction ;------------------------------------------------- ; Silver Pow bit check ;------------------------------------------------- SilverPowBitCheck: %putdebug("SilverPowBitCheck") phx ; push for origin codes. lda.l !extra_bits,x ;\ check custom spr bit bmi .isCustom ;/ if !sa1 ;\ lda.b ($b4) ; | Get sprite number else ; | lda.b !9e,x ; | endif ;/ if !sa1 phy ;\ Vitor's SA-1 patch codes rep #$10 ; | ply ;/ php ;\ rep #$30 ; | mask for 16bits X register and.w #$00ff ; | plp ;/ endif tax lda.l $07f659|!bankB,x ; smw original sprite's $190f tweak jml $02a9ab|!bankB ;------------------- .isCustom jsr .GetSilverPByte ; read silver p-switch byte into A register. if !sa1 phy ;\ Vitor's SA-1 patch codes rep #$10 ; | ply ;/ endif jml $02a9ab|!bankB ;----------------------------- ; A = extra bits ;----------------------------- .GetSilverPByte %putdebug("GetSilverPByte") phb phk plb php ;------------------- sep #$30 and.b #$0c tay ; Y = extra bits ;--- get table index lda.l !new_sprite_num,x sec sbc.w SprTweakTablePtr,y ; mask rep #$20 and.w #$00ff asl #4 sta.b $00 ; Get array of Tweak struct lda.w SprTweakTablePtr+1,y clc adc.b $00 sta.b $00 rep #$10 sep #$20 lda.w SprTweakTablePtr+3,y adc.b #0 pha ;\ switch bank plb ;/ ldy.b $00 ; get tweak byte lda.w $0007,y ; cfg line2 tweaks 6 ($190F value) ;------------------- plp plb rts ;------------------------------------------------- ; Set extra bits ;------------------------------------------------- SetExtraBits: ;--- set sprite number lda.b $05 sta.l !new_sprite_num,x ;--- set extra bits lda.b $07 sta.l !extra_bits,x iny iny lda.b $04 rtl ;------------------------------------------------- ; sprite nop routine ;------------------------------------------------- SpriteNop: stz.w !sprite_status,x rtl
#include<bits/stdc++.h> using namespace std; #define MAX 1000 class Stack{ int top; public: int a[MAX]; // maximum stack size Stack() {top = -1;} bool push(int x); int pop(); int peek(); bool isEmpty(); }; bool Stack::push(int x) { if(top>=(MAX-1)) { cout<<"Stack Overflow"; return false; } else { a[++top] = x; cout<<x<<" Pushed into stack\n"; return true; } } int Stack::pop() { if(top<0) { cout<<"Stack Overflow"; return 0; } else { int x = a[top--]; return x; } } int Stack::peek() { if(top<0) { cout<<"Stack is Empty"<<endl; return 0; } else { int x = a[top]; return x; } } bool Stack::isEmpty() { return (top<0); } // driver program to test above functions:---- int main() { class Stack s; s.push(10); s.push(20); s.push(30); cout<<s.pop()<<" Popped From Stack\n"; //print all elements in stack: cout<<"Elements Present in stack are: "; while(!s.isEmpty()) { //print top element in stack cout<<s.peek()<<" "; //remove the top element from stack s.pop(); } return 0; }
;------------------------------------------------------------------------------ ; ; Copyright (c) 2007, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; Module Name: ; ; EfiSetMemRep8.asm ; ; Abstract: ; ; SetMem function ; ; Notes: ; ;------------------------------------------------------------------------------ .code ;------------------------------------------------------------------------------ ; VOID ; EfiCommonLibSetMem ( ; OUT VOID *Buffer, ; IN UINTN Size, ; IN UINT8 Value ; ); ;------------------------------------------------------------------------------ EfiCommonLibSetMem PROC USES rdi rbx cmp rdx, 0 ; if Size == 0, do nothing je @SetDone mov rax, r8 mov bl, al mov bh, bl mov ax, bx shl rax, 10h mov ax, bx mov ebx, eax shl rax, 20h mov eax, ebx mov rdi, rcx mov rcx, rdx shr rcx, 3 rep stosq mov rcx, rdx and rcx, 7 rep stosb @SetDone: ret EfiCommonLibSetMem ENDP END
; ; Sharp specific routines ; by Stefano Bodrato, Fall 2013 ; ; int get_psg(int reg); ; ; Get a PSG register ; ; ; $Id: get_psg.asm,v 1.2 2015/01/19 01:33:04 pauloscustodio Exp $ ; PUBLIC get_psg get_psg: LD BC,$1C00 OUT (C),l dec b IN a,(C) ld l,a ; NOTE: A register has to keep the same value ret
// Copyright 2013 Yangqing Jia #include <stdint.h> #include <leveldb/db.h> #include <pthread.h> #include <string> #include <vector> #include "caffe/layer.hpp" #include "caffe/util/io.hpp" #include "caffe/vision_layers.hpp" using std::string; namespace caffe { template <typename Dtype> void* DataLayerPrefetch(void* layer_pointer) { CHECK(layer_pointer); DataLayer<Dtype>* layer = reinterpret_cast<DataLayer<Dtype>*>(layer_pointer); CHECK(layer); Datum datum; CHECK(layer->prefetch_data_); Dtype* top_data = layer->prefetch_data_->mutable_cpu_data(); Dtype* top_label = layer->prefetch_label_->mutable_cpu_data(); const Dtype scale = layer->layer_param_.scale(); const int batchsize = layer->layer_param_.batchsize(); const int cropsize = layer->layer_param_.cropsize(); const bool mirror = layer->layer_param_.mirror(); if (mirror && cropsize == 0) { LOG(FATAL) << "Current implementation requires mirror and cropsize to be " << "set at the same time."; } // datum scales const int channels = layer->datum_channels_; const int height = layer->datum_height_; const int width = layer->datum_width_; const int size = layer->datum_size_; const Dtype* mean = layer->data_mean_.cpu_data(); for (int itemid = 0; itemid < batchsize; ++itemid) { // get a blob CHECK(layer->iter_); CHECK(layer->iter_->Valid()); datum.ParseFromString(layer->iter_->value().ToString()); const string& data = datum.data(); if (cropsize) { CHECK(data.size()) << "Image cropping only support uint8 data"; int h_off, w_off; // We only do random crop when we do training. if (Caffe::phase() == Caffe::TRAIN) { h_off = rand() % (height - cropsize); w_off = rand() % (width - cropsize); } else { h_off = (height - cropsize) / 2; w_off = (width - cropsize) / 2; } if (mirror && rand() % 2) { // Copy mirrored version for (int c = 0; c < channels; ++c) { for (int h = 0; h < cropsize; ++h) { for (int w = 0; w < cropsize; ++w) { top_data[((itemid * channels + c) * cropsize + h) * cropsize + cropsize - 1 - w] = (static_cast<Dtype>( (uint8_t)data[(c * height + h + h_off) * width + w + w_off]) - mean[(c * height + h + h_off) * width + w + w_off]) * scale; } } } } else { // Normal copy for (int c = 0; c < channels; ++c) { for (int h = 0; h < cropsize; ++h) { for (int w = 0; w < cropsize; ++w) { top_data[((itemid * channels + c) * cropsize + h) * cropsize + w] = (static_cast<Dtype>( (uint8_t)data[(c * height + h + h_off) * width + w + w_off]) - mean[(c * height + h + h_off) * width + w + w_off]) * scale; } } } } } else { // we will prefer to use data() first, and then try float_data() if (data.size()) { for (int j = 0; j < size; ++j) { top_data[itemid * size + j] = (static_cast<Dtype>((uint8_t)data[j]) - mean[j]) * scale; } } else { for (int j = 0; j < size; ++j) { top_data[itemid * size + j] = (datum.float_data(j) - mean[j]) * scale; } } } top_label[itemid] = datum.label(); // go to the next iter layer->iter_->Next(); if (!layer->iter_->Valid()) { // We have reached the end. Restart from the first. DLOG(INFO) << "Restarting data prefetching from start."; layer->iter_->SeekToFirst(); } } return (void*)NULL; } template <typename Dtype> DataLayer<Dtype>::~DataLayer<Dtype>() { // Finally, join the thread CHECK(!pthread_join(thread_, NULL)) << "Pthread joining failed."; } template <typename Dtype> void DataLayer<Dtype>::SetUp(const vector<Blob<Dtype>*>& bottom, vector<Blob<Dtype>*>* top) { CHECK_EQ(bottom.size(), 0) << "Data Layer takes no input blobs."; CHECK_EQ(top->size(), 2) << "Data Layer takes two blobs as output."; // Initialize the leveldb leveldb::DB* db_temp; leveldb::Options options; options.create_if_missing = false; options.max_open_files = 100; LOG(INFO) << "Opening leveldb " << this->layer_param_.source(); leveldb::Status status = leveldb::DB::Open( options, this->layer_param_.source(), &db_temp); CHECK(status.ok()) << "Failed to open leveldb " << this->layer_param_.source() << std::endl << status.ToString(); db_.reset(db_temp); iter_.reset(db_->NewIterator(leveldb::ReadOptions())); iter_->SeekToFirst(); // Check if we would need to randomly skip a few data points if (this->layer_param_.rand_skip()) { unsigned int skip = rand() % this->layer_param_.rand_skip(); LOG(INFO) << "Skipping first " << skip << " data points."; while (skip-- > 0) { iter_->Next(); if (!iter_->Valid()) { iter_->SeekToFirst(); } } } // Read a data point, and use it to initialize the top blob. Datum datum; datum.ParseFromString(iter_->value().ToString()); // image int cropsize = this->layer_param_.cropsize(); if (cropsize > 0) { (*top)[0]->Reshape( this->layer_param_.batchsize(), datum.channels(), cropsize, cropsize); prefetch_data_.reset(new Blob<Dtype>( this->layer_param_.batchsize(), datum.channels(), cropsize, cropsize)); } else { (*top)[0]->Reshape( this->layer_param_.batchsize(), datum.channels(), datum.height(), datum.width()); prefetch_data_.reset(new Blob<Dtype>( this->layer_param_.batchsize(), datum.channels(), datum.height(), datum.width())); } LOG(INFO) << "output data size: " << (*top)[0]->num() << "," << (*top)[0]->channels() << "," << (*top)[0]->height() << "," << (*top)[0]->width(); // label (*top)[1]->Reshape(this->layer_param_.batchsize(), 1, 1, 1); prefetch_label_.reset( new Blob<Dtype>(this->layer_param_.batchsize(), 1, 1, 1)); // datum size datum_channels_ = datum.channels(); datum_height_ = datum.height(); datum_width_ = datum.width(); datum_size_ = datum.channels() * datum.height() * datum.width(); CHECK_GT(datum_height_, cropsize); CHECK_GT(datum_width_, cropsize); // check if we want to have mean if (this->layer_param_.has_meanfile()) { BlobProto blob_proto; LOG(INFO) << "Loading mean file from" << this->layer_param_.meanfile(); ReadProtoFromBinaryFile(this->layer_param_.meanfile().c_str(), &blob_proto); data_mean_.FromProto(blob_proto); CHECK_EQ(data_mean_.num(), 1); CHECK_EQ(data_mean_.channels(), datum_channels_); CHECK_EQ(data_mean_.height(), datum_height_); CHECK_EQ(data_mean_.width(), datum_width_); } else { // Simply initialize an all-empty mean. data_mean_.Reshape(1, datum_channels_, datum_height_, datum_width_); } // Now, start the prefetch thread. Before calling prefetch, we make two // cpu_data calls so that the prefetch thread does not accidentally make // simultaneous cudaMalloc calls when the main thread is running. In some // GPUs this seems to cause failures if we do not so. prefetch_data_->mutable_cpu_data(); prefetch_label_->mutable_cpu_data(); data_mean_.cpu_data(); DLOG(INFO) << "Initializing prefetch"; CHECK(!pthread_create(&thread_, NULL, DataLayerPrefetch<Dtype>, reinterpret_cast<void*>(this))) << "Pthread execution failed."; DLOG(INFO) << "Prefetch initialized."; } template <typename Dtype> void DataLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom, vector<Blob<Dtype>*>* top) { // First, join the thread CHECK(!pthread_join(thread_, NULL)) << "Pthread joining failed."; // Copy the data memcpy((*top)[0]->mutable_cpu_data(), prefetch_data_->cpu_data(), sizeof(Dtype) * prefetch_data_->count()); memcpy((*top)[1]->mutable_cpu_data(), prefetch_label_->cpu_data(), sizeof(Dtype) * prefetch_label_->count()); // Start a new prefetch thread CHECK(!pthread_create(&thread_, NULL, DataLayerPrefetch<Dtype>, reinterpret_cast<void*>(this))) << "Pthread execution failed."; } template <typename Dtype> void DataLayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom, vector<Blob<Dtype>*>* top) { // First, join the thread CHECK(!pthread_join(thread_, NULL)) << "Pthread joining failed."; // Copy the data CUDA_CHECK(cudaMemcpy((*top)[0]->mutable_gpu_data(), prefetch_data_->cpu_data(), sizeof(Dtype) * prefetch_data_->count(), cudaMemcpyHostToDevice)); CUDA_CHECK(cudaMemcpy((*top)[1]->mutable_gpu_data(), prefetch_label_->cpu_data(), sizeof(Dtype) * prefetch_label_->count(), cudaMemcpyHostToDevice)); // Start a new prefetch thread CHECK(!pthread_create(&thread_, NULL, DataLayerPrefetch<Dtype>, reinterpret_cast<void*>(this))) << "Pthread execution failed."; } // The backward operations are dummy - they do not carry any computation. template <typename Dtype> Dtype DataLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top, const bool propagate_down, vector<Blob<Dtype>*>* bottom) { return Dtype(0.); } template <typename Dtype> Dtype DataLayer<Dtype>::Backward_gpu(const vector<Blob<Dtype>*>& top, const bool propagate_down, vector<Blob<Dtype>*>* bottom) { return Dtype(0.); } INSTANTIATE_CLASS(DataLayer); } // namespace caffe
; ; Game device library for the Enterprise 64/128 ; Stefano Bodrato - Mar 2011 ; ; $Id: joystick.asm,v 1.4 2016-06-16 20:23:51 dom Exp $ ; SECTION code_clib PUBLIC joystick PUBLIC _joystick INCLUDE "enterprise.def" .joystick ._joystick ;__FASTALL__ : joystick no. in HL ld c,l ld b,FN_JOY rst 30h defb 11 ld h,0 ld l,c ret
6B_Header: sHeaderInit ; Z80 offset is $C97C sHeaderPatch 6B_Patches sHeaderTick $01 sHeaderCh $01 sHeaderSFX $80, $05, 6B_FM5, $00, $00 6B_FM5: sPatFM $00 ssModZ80 $01, $01, $0D, $00 dc.b nFs4, $0C, sHold ssModZ80 $00, $01, $00, $00 dc.b $4B sStop ; 6B_Patches at $C963 ($19 before start of file) can not be converted, because the data does not exist.
// Generated by Haxe 4.0.0-preview.5 #include <hxcpp.h> #ifndef INCLUDED_nape_constraint_Constraint #include <hxinc/nape/constraint/Constraint.h> #endif #ifndef INCLUDED_nape_constraint_DistanceJoint #include <hxinc/nape/constraint/DistanceJoint.h> #endif #ifndef INCLUDED_nape_geom_MatMN #include <hxinc/nape/geom/MatMN.h> #endif #ifndef INCLUDED_nape_geom_Vec2 #include <hxinc/nape/geom/Vec2.h> #endif #ifndef INCLUDED_nape_geom_Vec3 #include <hxinc/nape/geom/Vec3.h> #endif #ifndef INCLUDED_nape_phys_Body #include <hxinc/nape/phys/Body.h> #endif #ifndef INCLUDED_nape_phys_Interactor #include <hxinc/nape/phys/Interactor.h> #endif #ifndef INCLUDED_nape_space_Space #include <hxinc/nape/space/Space.h> #endif #ifndef INCLUDED_zpp_nape_constraint_ZPP_Constraint #include <hxinc/zpp_nape/constraint/ZPP_Constraint.h> #endif #ifndef INCLUDED_zpp_nape_constraint_ZPP_DistanceJoint #include <hxinc/zpp_nape/constraint/ZPP_DistanceJoint.h> #endif #ifndef INCLUDED_zpp_nape_geom_ZPP_MatMN #include <hxinc/zpp_nape/geom/ZPP_MatMN.h> #endif #ifndef INCLUDED_zpp_nape_geom_ZPP_Vec2 #include <hxinc/zpp_nape/geom/ZPP_Vec2.h> #endif #ifndef INCLUDED_zpp_nape_phys_ZPP_Body #include <hxinc/zpp_nape/phys/ZPP_Body.h> #endif #ifndef INCLUDED_zpp_nape_phys_ZPP_Interactor #include <hxinc/zpp_nape/phys/ZPP_Interactor.h> #endif #ifndef INCLUDED_zpp_nape_space_ZPP_Space #include <hxinc/zpp_nape/space/ZPP_Space.h> #endif #ifndef INCLUDED_zpp_nape_util_ZNPList_ZPP_Constraint #include <hxinc/zpp_nape/util/ZNPList_ZPP_Constraint.h> #endif #ifndef INCLUDED_zpp_nape_util_ZPP_PubPool #include <hxinc/zpp_nape/util/ZPP_PubPool.h> #endif HX_DEFINE_STACK_FRAME(_hx_pos_5800e8f0187168fd_184_new,"nape.constraint.DistanceJoint","new",0xd657a01c,"nape.constraint.DistanceJoint.new","nape/constraint/DistanceJoint.hx",184,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_198_get_body1,"nape.constraint.DistanceJoint","get_body1",0x19a57462,"nape.constraint.DistanceJoint.get_body1","nape/constraint/DistanceJoint.hx",198,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_200_set_body1,"nape.constraint.DistanceJoint","set_body1",0xfcf6606e,"nape.constraint.DistanceJoint.set_body1","nape/constraint/DistanceJoint.hx",200,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_236_get_body2,"nape.constraint.DistanceJoint","get_body2",0x19a57463,"nape.constraint.DistanceJoint.get_body2","nape/constraint/DistanceJoint.hx",236,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_238_set_body2,"nape.constraint.DistanceJoint","set_body2",0xfcf6606f,"nape.constraint.DistanceJoint.set_body2","nape/constraint/DistanceJoint.hx",238,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_272_get_anchor1,"nape.constraint.DistanceJoint","get_anchor1",0xb6d037ef,"nape.constraint.DistanceJoint.get_anchor1","nape/constraint/DistanceJoint.hx",272,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_276_set_anchor1,"nape.constraint.DistanceJoint","set_anchor1",0xc13d3efb,"nape.constraint.DistanceJoint.set_anchor1","nape/constraint/DistanceJoint.hx",276,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_297_get_anchor2,"nape.constraint.DistanceJoint","get_anchor2",0xb6d037f0,"nape.constraint.DistanceJoint.get_anchor2","nape/constraint/DistanceJoint.hx",297,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_301_set_anchor2,"nape.constraint.DistanceJoint","set_anchor2",0xc13d3efc,"nape.constraint.DistanceJoint.set_anchor2","nape/constraint/DistanceJoint.hx",301,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_323_get_jointMin,"nape.constraint.DistanceJoint","get_jointMin",0x497a0735,"nape.constraint.DistanceJoint.get_jointMin","nape/constraint/DistanceJoint.hx",323,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_325_set_jointMin,"nape.constraint.DistanceJoint","set_jointMin",0x5e732aa9,"nape.constraint.DistanceJoint.set_jointMin","nape/constraint/DistanceJoint.hx",325,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_351_get_jointMax,"nape.constraint.DistanceJoint","get_jointMax",0x497a0047,"nape.constraint.DistanceJoint.get_jointMax","nape/constraint/DistanceJoint.hx",351,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_353_set_jointMax,"nape.constraint.DistanceJoint","set_jointMax",0x5e7323bb,"nape.constraint.DistanceJoint.set_jointMax","nape/constraint/DistanceJoint.hx",353,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_382_isSlack,"nape.constraint.DistanceJoint","isSlack",0xe033b3c2,"nape.constraint.DistanceJoint.isSlack","nape/constraint/DistanceJoint.hx",382,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_428_impulse,"nape.constraint.DistanceJoint","impulse",0x32a9ae71,"nape.constraint.DistanceJoint.impulse","nape/constraint/DistanceJoint.hx",428,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_436_bodyImpulse,"nape.constraint.DistanceJoint","bodyImpulse",0x8dd661ef,"nape.constraint.DistanceJoint.bodyImpulse","nape/constraint/DistanceJoint.hx",436,0x7df58474) HX_LOCAL_STACK_FRAME(_hx_pos_5800e8f0187168fd_455_visitBodies,"nape.constraint.DistanceJoint","visitBodies",0x1292df67,"nape.constraint.DistanceJoint.visitBodies","nape/constraint/DistanceJoint.hx",455,0x7df58474) namespace nape{ namespace constraint{ void DistanceJoint_obj::__construct( ::nape::phys::Body body1, ::nape::phys::Body body2, ::nape::geom::Vec2 anchor1, ::nape::geom::Vec2 anchor2,Float jointMin,Float jointMax){ HX_GC_STACKFRAME(&_hx_pos_5800e8f0187168fd_184_new) HXLINE( 188) this->zpp_inner_zn = null(); HXLINE( 404) this->zpp_inner_zn = ::zpp_nape::constraint::ZPP_DistanceJoint_obj::__alloc( HX_CTX ); HXLINE( 405) this->zpp_inner = this->zpp_inner_zn; HXLINE( 406) this->zpp_inner->outer = hx::ObjectPtr<OBJ_>(this); HXLINE( 407) this->zpp_inner_zn->outer_zn = hx::ObjectPtr<OBJ_>(this); HXLINE( 409) ::nape::constraint::Constraint_obj::zpp_internalAlloc = true; HXLINE( 410) super::__construct(); HXLINE( 411) ::nape::constraint::Constraint_obj::zpp_internalAlloc = false; HXLINE( 416) { HXLINE( 416) { HXLINE( 416) this->zpp_inner->immutable_midstep((HX_("Constraint::",7d,10,25,6e) + HX_("body1",4f,d3,ef,b6))); HXDLIN( 416) ::zpp_nape::phys::ZPP_Body inbody1; HXDLIN( 416) if (hx::IsNull( body1 )) { HXLINE( 416) inbody1 = null(); } else { HXLINE( 416) inbody1 = body1->zpp_inner; } HXDLIN( 416) if (hx::IsNotEq( inbody1,this->zpp_inner_zn->b1 )) { HXLINE( 416) if (hx::IsNotNull( this->zpp_inner_zn->b1 )) { HXLINE( 416) bool _hx_tmp; HXDLIN( 416) ::nape::space::Space _hx_tmp1; HXDLIN( 416) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 416) _hx_tmp1 = null(); } else { HXLINE( 416) _hx_tmp1 = this->zpp_inner->space->outer; } HXDLIN( 416) if (hx::IsNotNull( _hx_tmp1 )) { HXLINE( 416) _hx_tmp = hx::IsNotEq( this->zpp_inner_zn->b2,this->zpp_inner_zn->b1 ); } else { HXLINE( 416) _hx_tmp = false; } HXDLIN( 416) if (_hx_tmp) { HXLINE( 416) if (hx::IsNotNull( this->zpp_inner_zn->b1 )) { HXLINE( 416) this->zpp_inner_zn->b1->constraints->remove(this->zpp_inner); } } HXDLIN( 416) bool _hx_tmp2; HXDLIN( 416) if (this->zpp_inner->active) { HXLINE( 416) ::nape::space::Space _hx_tmp3; HXDLIN( 416) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 416) _hx_tmp3 = null(); } else { HXLINE( 416) _hx_tmp3 = this->zpp_inner->space->outer; } HXDLIN( 416) _hx_tmp2 = hx::IsNotNull( _hx_tmp3 ); } else { HXLINE( 416) _hx_tmp2 = false; } HXDLIN( 416) if (_hx_tmp2) { HXLINE( 416) this->zpp_inner_zn->b1->wake(); } } HXDLIN( 416) this->zpp_inner_zn->b1 = inbody1; HXDLIN( 416) bool _hx_tmp4; HXDLIN( 416) bool _hx_tmp5; HXDLIN( 416) ::nape::space::Space _hx_tmp6; HXDLIN( 416) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 416) _hx_tmp6 = null(); } else { HXLINE( 416) _hx_tmp6 = this->zpp_inner->space->outer; } HXDLIN( 416) if (hx::IsNotNull( _hx_tmp6 )) { HXLINE( 416) _hx_tmp5 = hx::IsNotNull( inbody1 ); } else { HXLINE( 416) _hx_tmp5 = false; } HXDLIN( 416) if (_hx_tmp5) { HXLINE( 416) _hx_tmp4 = hx::IsNotEq( this->zpp_inner_zn->b2,inbody1 ); } else { HXLINE( 416) _hx_tmp4 = false; } HXDLIN( 416) if (_hx_tmp4) { HXLINE( 416) if (hx::IsNotNull( inbody1 )) { HXLINE( 416) inbody1->constraints->add(this->zpp_inner); } } HXDLIN( 416) bool _hx_tmp7; HXDLIN( 416) if (this->zpp_inner->active) { HXLINE( 416) ::nape::space::Space _hx_tmp8; HXDLIN( 416) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 416) _hx_tmp8 = null(); } else { HXLINE( 416) _hx_tmp8 = this->zpp_inner->space->outer; } HXDLIN( 416) _hx_tmp7 = hx::IsNotNull( _hx_tmp8 ); } else { HXLINE( 416) _hx_tmp7 = false; } HXDLIN( 416) if (_hx_tmp7) { HXLINE( 416) this->zpp_inner->wake(); HXDLIN( 416) if (hx::IsNotNull( inbody1 )) { HXLINE( 416) inbody1->wake(); } } } } HXDLIN( 416) bool _hx_tmp9 = hx::IsNull( this->zpp_inner_zn->b1 ); } HXLINE( 417) { HXLINE( 417) { HXLINE( 417) this->zpp_inner->immutable_midstep((HX_("Constraint::",7d,10,25,6e) + HX_("body2",50,d3,ef,b6))); HXDLIN( 417) ::zpp_nape::phys::ZPP_Body inbody2; HXDLIN( 417) if (hx::IsNull( body2 )) { HXLINE( 417) inbody2 = null(); } else { HXLINE( 417) inbody2 = body2->zpp_inner; } HXDLIN( 417) if (hx::IsNotEq( inbody2,this->zpp_inner_zn->b2 )) { HXLINE( 417) if (hx::IsNotNull( this->zpp_inner_zn->b2 )) { HXLINE( 417) bool _hx_tmp10; HXDLIN( 417) ::nape::space::Space _hx_tmp11; HXDLIN( 417) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 417) _hx_tmp11 = null(); } else { HXLINE( 417) _hx_tmp11 = this->zpp_inner->space->outer; } HXDLIN( 417) if (hx::IsNotNull( _hx_tmp11 )) { HXLINE( 417) _hx_tmp10 = hx::IsNotEq( this->zpp_inner_zn->b1,this->zpp_inner_zn->b2 ); } else { HXLINE( 417) _hx_tmp10 = false; } HXDLIN( 417) if (_hx_tmp10) { HXLINE( 417) if (hx::IsNotNull( this->zpp_inner_zn->b2 )) { HXLINE( 417) this->zpp_inner_zn->b2->constraints->remove(this->zpp_inner); } } HXDLIN( 417) bool _hx_tmp12; HXDLIN( 417) if (this->zpp_inner->active) { HXLINE( 417) ::nape::space::Space _hx_tmp13; HXDLIN( 417) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 417) _hx_tmp13 = null(); } else { HXLINE( 417) _hx_tmp13 = this->zpp_inner->space->outer; } HXDLIN( 417) _hx_tmp12 = hx::IsNotNull( _hx_tmp13 ); } else { HXLINE( 417) _hx_tmp12 = false; } HXDLIN( 417) if (_hx_tmp12) { HXLINE( 417) this->zpp_inner_zn->b2->wake(); } } HXDLIN( 417) this->zpp_inner_zn->b2 = inbody2; HXDLIN( 417) bool _hx_tmp14; HXDLIN( 417) bool _hx_tmp15; HXDLIN( 417) ::nape::space::Space _hx_tmp16; HXDLIN( 417) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 417) _hx_tmp16 = null(); } else { HXLINE( 417) _hx_tmp16 = this->zpp_inner->space->outer; } HXDLIN( 417) if (hx::IsNotNull( _hx_tmp16 )) { HXLINE( 417) _hx_tmp15 = hx::IsNotNull( inbody2 ); } else { HXLINE( 417) _hx_tmp15 = false; } HXDLIN( 417) if (_hx_tmp15) { HXLINE( 417) _hx_tmp14 = hx::IsNotEq( this->zpp_inner_zn->b1,inbody2 ); } else { HXLINE( 417) _hx_tmp14 = false; } HXDLIN( 417) if (_hx_tmp14) { HXLINE( 417) if (hx::IsNotNull( inbody2 )) { HXLINE( 417) inbody2->constraints->add(this->zpp_inner); } } HXDLIN( 417) bool _hx_tmp17; HXDLIN( 417) if (this->zpp_inner->active) { HXLINE( 417) ::nape::space::Space _hx_tmp18; HXDLIN( 417) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 417) _hx_tmp18 = null(); } else { HXLINE( 417) _hx_tmp18 = this->zpp_inner->space->outer; } HXDLIN( 417) _hx_tmp17 = hx::IsNotNull( _hx_tmp18 ); } else { HXLINE( 417) _hx_tmp17 = false; } HXDLIN( 417) if (_hx_tmp17) { HXLINE( 417) this->zpp_inner->wake(); HXDLIN( 417) if (hx::IsNotNull( inbody2 )) { HXLINE( 417) inbody2->wake(); } } } } HXDLIN( 417) bool _hx_tmp19 = hx::IsNull( this->zpp_inner_zn->b2 ); } HXLINE( 418) { HXLINE( 418) { HXLINE( 418) bool _hx_tmp20; HXDLIN( 418) if (hx::IsNotNull( anchor1 )) { HXLINE( 418) _hx_tmp20 = anchor1->zpp_disp; } else { HXLINE( 418) _hx_tmp20 = false; } HXDLIN( 418) if (_hx_tmp20) { HXLINE( 418) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 418) if (hx::IsNull( anchor1 )) { HXLINE( 418) HX_STACK_DO_THROW(((HX_("Error: Constraint::",cb,f5,02,d5) + HX_("anchor1",1c,ec,a1,02)) + HX_(" cannot be null",07,dc,5d,15))); } HXDLIN( 418) { HXLINE( 418) if (hx::IsNull( this->zpp_inner_zn->wrap_a1 )) { HXLINE( 418) this->zpp_inner_zn->setup_a1(); } HXDLIN( 418) ::nape::geom::Vec2 _this = this->zpp_inner_zn->wrap_a1; HXDLIN( 418) bool _hx_tmp21; HXDLIN( 418) if (hx::IsNotNull( _this )) { HXLINE( 418) _hx_tmp21 = _this->zpp_disp; } else { HXLINE( 418) _hx_tmp21 = false; } HXDLIN( 418) if (_hx_tmp21) { HXLINE( 418) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 418) bool _hx_tmp22; HXDLIN( 418) if (hx::IsNotNull( anchor1 )) { HXLINE( 418) _hx_tmp22 = anchor1->zpp_disp; } else { HXLINE( 418) _hx_tmp22 = false; } HXDLIN( 418) if (_hx_tmp22) { HXLINE( 418) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 418) { HXLINE( 418) ::zpp_nape::geom::ZPP_Vec2 _this1 = _this->zpp_inner; HXDLIN( 418) if (_this1->_immutable) { HXLINE( 418) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 418) if (hx::IsNotNull( _this1->_isimmutable )) { HXLINE( 418) _this1->_isimmutable(); } } HXDLIN( 418) if (hx::IsNull( anchor1 )) { HXLINE( 418) HX_STACK_DO_THROW(HX_("Error: Cannot assign null Vec2",95,15,46,66)); } HXDLIN( 418) bool _hx_tmp23; HXDLIN( 418) if (hx::IsNotNull( anchor1 )) { HXLINE( 418) _hx_tmp23 = anchor1->zpp_disp; } else { HXLINE( 418) _hx_tmp23 = false; } HXDLIN( 418) if (_hx_tmp23) { HXLINE( 418) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 418) { HXLINE( 418) ::zpp_nape::geom::ZPP_Vec2 _this2 = anchor1->zpp_inner; HXDLIN( 418) if (hx::IsNotNull( _this2->_validate )) { HXLINE( 418) _this2->_validate(); } } HXDLIN( 418) Float x = anchor1->zpp_inner->x; HXDLIN( 418) bool _hx_tmp24; HXDLIN( 418) if (hx::IsNotNull( anchor1 )) { HXLINE( 418) _hx_tmp24 = anchor1->zpp_disp; } else { HXLINE( 418) _hx_tmp24 = false; } HXDLIN( 418) if (_hx_tmp24) { HXLINE( 418) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 418) { HXLINE( 418) ::zpp_nape::geom::ZPP_Vec2 _this3 = anchor1->zpp_inner; HXDLIN( 418) if (hx::IsNotNull( _this3->_validate )) { HXLINE( 418) _this3->_validate(); } } HXDLIN( 418) Float y = anchor1->zpp_inner->y; HXDLIN( 418) bool _hx_tmp25; HXDLIN( 418) if (hx::IsNotNull( _this )) { HXLINE( 418) _hx_tmp25 = _this->zpp_disp; } else { HXLINE( 418) _hx_tmp25 = false; } HXDLIN( 418) if (_hx_tmp25) { HXLINE( 418) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 418) { HXLINE( 418) ::zpp_nape::geom::ZPP_Vec2 _this4 = _this->zpp_inner; HXDLIN( 418) if (_this4->_immutable) { HXLINE( 418) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 418) if (hx::IsNotNull( _this4->_isimmutable )) { HXLINE( 418) _this4->_isimmutable(); } } HXDLIN( 418) bool _hx_tmp26; HXDLIN( 418) if ((x == x)) { HXLINE( 418) _hx_tmp26 = (y != y); } else { HXLINE( 418) _hx_tmp26 = true; } HXDLIN( 418) if (_hx_tmp26) { HXLINE( 418) HX_STACK_DO_THROW(HX_("Error: Vec2 components cannot be NaN",85,ba,d8,c1)); } HXDLIN( 418) bool _hx_tmp27; HXDLIN( 418) bool _hx_tmp28; HXDLIN( 418) if (hx::IsNotNull( _this )) { HXLINE( 418) _hx_tmp28 = _this->zpp_disp; } else { HXLINE( 418) _hx_tmp28 = false; } HXDLIN( 418) if (_hx_tmp28) { HXLINE( 418) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 418) { HXLINE( 418) ::zpp_nape::geom::ZPP_Vec2 _this5 = _this->zpp_inner; HXDLIN( 418) if (hx::IsNotNull( _this5->_validate )) { HXLINE( 418) _this5->_validate(); } } HXDLIN( 418) if ((_this->zpp_inner->x == x)) { HXLINE( 418) bool _hx_tmp29; HXDLIN( 418) if (hx::IsNotNull( _this )) { HXLINE( 418) _hx_tmp29 = _this->zpp_disp; } else { HXLINE( 418) _hx_tmp29 = false; } HXDLIN( 418) if (_hx_tmp29) { HXLINE( 418) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 418) { HXLINE( 418) ::zpp_nape::geom::ZPP_Vec2 _this6 = _this->zpp_inner; HXDLIN( 418) if (hx::IsNotNull( _this6->_validate )) { HXLINE( 418) _this6->_validate(); } } HXDLIN( 418) _hx_tmp27 = (_this->zpp_inner->y == y); } else { HXLINE( 418) _hx_tmp27 = false; } HXDLIN( 418) if (!(_hx_tmp27)) { HXLINE( 418) { HXLINE( 418) _this->zpp_inner->x = x; HXDLIN( 418) _this->zpp_inner->y = y; } HXDLIN( 418) { HXLINE( 418) ::zpp_nape::geom::ZPP_Vec2 _this7 = _this->zpp_inner; HXDLIN( 418) if (hx::IsNotNull( _this7->_invalidate )) { HXLINE( 418) _this7->_invalidate(_this7); } } } HXDLIN( 418) ::nape::geom::Vec2 ret = _this; HXDLIN( 418) if (anchor1->zpp_inner->weak) { HXLINE( 418) bool _hx_tmp30; HXDLIN( 418) if (hx::IsNotNull( anchor1 )) { HXLINE( 418) _hx_tmp30 = anchor1->zpp_disp; } else { HXLINE( 418) _hx_tmp30 = false; } HXDLIN( 418) if (_hx_tmp30) { HXLINE( 418) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 418) { HXLINE( 418) ::zpp_nape::geom::ZPP_Vec2 _this8 = anchor1->zpp_inner; HXDLIN( 418) if (_this8->_immutable) { HXLINE( 418) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 418) if (hx::IsNotNull( _this8->_isimmutable )) { HXLINE( 418) _this8->_isimmutable(); } } HXDLIN( 418) if (anchor1->zpp_inner->_inuse) { HXLINE( 418) HX_STACK_DO_THROW(HX_("Error: This Vec2 is not disposable",b5,d1,d1,d8)); } HXDLIN( 418) ::zpp_nape::geom::ZPP_Vec2 inner = anchor1->zpp_inner; HXDLIN( 418) anchor1->zpp_inner->outer = null(); HXDLIN( 418) anchor1->zpp_inner = null(); HXDLIN( 418) { HXLINE( 418) ::nape::geom::Vec2 o = anchor1; HXDLIN( 418) o->zpp_pool = null(); HXDLIN( 418) if (hx::IsNotNull( ::zpp_nape::util::ZPP_PubPool_obj::nextVec2 )) { HXLINE( 418) ::zpp_nape::util::ZPP_PubPool_obj::nextVec2->zpp_pool = o; } else { HXLINE( 418) ::zpp_nape::util::ZPP_PubPool_obj::poolVec2 = o; } HXDLIN( 418) ::zpp_nape::util::ZPP_PubPool_obj::nextVec2 = o; HXDLIN( 418) o->zpp_disp = true; } HXDLIN( 418) { HXLINE( 418) ::zpp_nape::geom::ZPP_Vec2 o1 = inner; HXDLIN( 418) { HXLINE( 418) if (hx::IsNotNull( o1->outer )) { HXLINE( 418) o1->outer->zpp_inner = null(); HXDLIN( 418) o1->outer = null(); } HXDLIN( 418) o1->_isimmutable = null(); HXDLIN( 418) o1->_validate = null(); HXDLIN( 418) o1->_invalidate = null(); } HXDLIN( 418) o1->next = ::zpp_nape::geom::ZPP_Vec2_obj::zpp_pool; HXDLIN( 418) ::zpp_nape::geom::ZPP_Vec2_obj::zpp_pool = o1; } } } } HXDLIN( 418) if (hx::IsNull( this->zpp_inner_zn->wrap_a1 )) { HXLINE( 418) this->zpp_inner_zn->setup_a1(); } } HXLINE( 419) { HXLINE( 419) { HXLINE( 419) bool _hx_tmp31; HXDLIN( 419) if (hx::IsNotNull( anchor2 )) { HXLINE( 419) _hx_tmp31 = anchor2->zpp_disp; } else { HXLINE( 419) _hx_tmp31 = false; } HXDLIN( 419) if (_hx_tmp31) { HXLINE( 419) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 419) if (hx::IsNull( anchor2 )) { HXLINE( 419) HX_STACK_DO_THROW(((HX_("Error: Constraint::",cb,f5,02,d5) + HX_("anchor2",1d,ec,a1,02)) + HX_(" cannot be null",07,dc,5d,15))); } HXDLIN( 419) { HXLINE( 419) if (hx::IsNull( this->zpp_inner_zn->wrap_a2 )) { HXLINE( 419) this->zpp_inner_zn->setup_a2(); } HXDLIN( 419) ::nape::geom::Vec2 _this9 = this->zpp_inner_zn->wrap_a2; HXDLIN( 419) bool _hx_tmp32; HXDLIN( 419) if (hx::IsNotNull( _this9 )) { HXLINE( 419) _hx_tmp32 = _this9->zpp_disp; } else { HXLINE( 419) _hx_tmp32 = false; } HXDLIN( 419) if (_hx_tmp32) { HXLINE( 419) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 419) bool _hx_tmp33; HXDLIN( 419) if (hx::IsNotNull( anchor2 )) { HXLINE( 419) _hx_tmp33 = anchor2->zpp_disp; } else { HXLINE( 419) _hx_tmp33 = false; } HXDLIN( 419) if (_hx_tmp33) { HXLINE( 419) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 419) { HXLINE( 419) ::zpp_nape::geom::ZPP_Vec2 _this10 = _this9->zpp_inner; HXDLIN( 419) if (_this10->_immutable) { HXLINE( 419) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 419) if (hx::IsNotNull( _this10->_isimmutable )) { HXLINE( 419) _this10->_isimmutable(); } } HXDLIN( 419) if (hx::IsNull( anchor2 )) { HXLINE( 419) HX_STACK_DO_THROW(HX_("Error: Cannot assign null Vec2",95,15,46,66)); } HXDLIN( 419) bool _hx_tmp34; HXDLIN( 419) if (hx::IsNotNull( anchor2 )) { HXLINE( 419) _hx_tmp34 = anchor2->zpp_disp; } else { HXLINE( 419) _hx_tmp34 = false; } HXDLIN( 419) if (_hx_tmp34) { HXLINE( 419) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 419) { HXLINE( 419) ::zpp_nape::geom::ZPP_Vec2 _this11 = anchor2->zpp_inner; HXDLIN( 419) if (hx::IsNotNull( _this11->_validate )) { HXLINE( 419) _this11->_validate(); } } HXDLIN( 419) Float x1 = anchor2->zpp_inner->x; HXDLIN( 419) bool _hx_tmp35; HXDLIN( 419) if (hx::IsNotNull( anchor2 )) { HXLINE( 419) _hx_tmp35 = anchor2->zpp_disp; } else { HXLINE( 419) _hx_tmp35 = false; } HXDLIN( 419) if (_hx_tmp35) { HXLINE( 419) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 419) { HXLINE( 419) ::zpp_nape::geom::ZPP_Vec2 _this12 = anchor2->zpp_inner; HXDLIN( 419) if (hx::IsNotNull( _this12->_validate )) { HXLINE( 419) _this12->_validate(); } } HXDLIN( 419) Float y1 = anchor2->zpp_inner->y; HXDLIN( 419) bool _hx_tmp36; HXDLIN( 419) if (hx::IsNotNull( _this9 )) { HXLINE( 419) _hx_tmp36 = _this9->zpp_disp; } else { HXLINE( 419) _hx_tmp36 = false; } HXDLIN( 419) if (_hx_tmp36) { HXLINE( 419) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 419) { HXLINE( 419) ::zpp_nape::geom::ZPP_Vec2 _this13 = _this9->zpp_inner; HXDLIN( 419) if (_this13->_immutable) { HXLINE( 419) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 419) if (hx::IsNotNull( _this13->_isimmutable )) { HXLINE( 419) _this13->_isimmutable(); } } HXDLIN( 419) bool _hx_tmp37; HXDLIN( 419) if ((x1 == x1)) { HXLINE( 419) _hx_tmp37 = (y1 != y1); } else { HXLINE( 419) _hx_tmp37 = true; } HXDLIN( 419) if (_hx_tmp37) { HXLINE( 419) HX_STACK_DO_THROW(HX_("Error: Vec2 components cannot be NaN",85,ba,d8,c1)); } HXDLIN( 419) bool _hx_tmp38; HXDLIN( 419) bool _hx_tmp39; HXDLIN( 419) if (hx::IsNotNull( _this9 )) { HXLINE( 419) _hx_tmp39 = _this9->zpp_disp; } else { HXLINE( 419) _hx_tmp39 = false; } HXDLIN( 419) if (_hx_tmp39) { HXLINE( 419) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 419) { HXLINE( 419) ::zpp_nape::geom::ZPP_Vec2 _this14 = _this9->zpp_inner; HXDLIN( 419) if (hx::IsNotNull( _this14->_validate )) { HXLINE( 419) _this14->_validate(); } } HXDLIN( 419) if ((_this9->zpp_inner->x == x1)) { HXLINE( 419) bool _hx_tmp40; HXDLIN( 419) if (hx::IsNotNull( _this9 )) { HXLINE( 419) _hx_tmp40 = _this9->zpp_disp; } else { HXLINE( 419) _hx_tmp40 = false; } HXDLIN( 419) if (_hx_tmp40) { HXLINE( 419) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 419) { HXLINE( 419) ::zpp_nape::geom::ZPP_Vec2 _this15 = _this9->zpp_inner; HXDLIN( 419) if (hx::IsNotNull( _this15->_validate )) { HXLINE( 419) _this15->_validate(); } } HXDLIN( 419) _hx_tmp38 = (_this9->zpp_inner->y == y1); } else { HXLINE( 419) _hx_tmp38 = false; } HXDLIN( 419) if (!(_hx_tmp38)) { HXLINE( 419) { HXLINE( 419) _this9->zpp_inner->x = x1; HXDLIN( 419) _this9->zpp_inner->y = y1; } HXDLIN( 419) { HXLINE( 419) ::zpp_nape::geom::ZPP_Vec2 _this16 = _this9->zpp_inner; HXDLIN( 419) if (hx::IsNotNull( _this16->_invalidate )) { HXLINE( 419) _this16->_invalidate(_this16); } } } HXDLIN( 419) ::nape::geom::Vec2 ret1 = _this9; HXDLIN( 419) if (anchor2->zpp_inner->weak) { HXLINE( 419) bool _hx_tmp41; HXDLIN( 419) if (hx::IsNotNull( anchor2 )) { HXLINE( 419) _hx_tmp41 = anchor2->zpp_disp; } else { HXLINE( 419) _hx_tmp41 = false; } HXDLIN( 419) if (_hx_tmp41) { HXLINE( 419) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 419) { HXLINE( 419) ::zpp_nape::geom::ZPP_Vec2 _this17 = anchor2->zpp_inner; HXDLIN( 419) if (_this17->_immutable) { HXLINE( 419) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 419) if (hx::IsNotNull( _this17->_isimmutable )) { HXLINE( 419) _this17->_isimmutable(); } } HXDLIN( 419) if (anchor2->zpp_inner->_inuse) { HXLINE( 419) HX_STACK_DO_THROW(HX_("Error: This Vec2 is not disposable",b5,d1,d1,d8)); } HXDLIN( 419) ::zpp_nape::geom::ZPP_Vec2 inner1 = anchor2->zpp_inner; HXDLIN( 419) anchor2->zpp_inner->outer = null(); HXDLIN( 419) anchor2->zpp_inner = null(); HXDLIN( 419) { HXLINE( 419) ::nape::geom::Vec2 o2 = anchor2; HXDLIN( 419) o2->zpp_pool = null(); HXDLIN( 419) if (hx::IsNotNull( ::zpp_nape::util::ZPP_PubPool_obj::nextVec2 )) { HXLINE( 419) ::zpp_nape::util::ZPP_PubPool_obj::nextVec2->zpp_pool = o2; } else { HXLINE( 419) ::zpp_nape::util::ZPP_PubPool_obj::poolVec2 = o2; } HXDLIN( 419) ::zpp_nape::util::ZPP_PubPool_obj::nextVec2 = o2; HXDLIN( 419) o2->zpp_disp = true; } HXDLIN( 419) { HXLINE( 419) ::zpp_nape::geom::ZPP_Vec2 o3 = inner1; HXDLIN( 419) { HXLINE( 419) if (hx::IsNotNull( o3->outer )) { HXLINE( 419) o3->outer->zpp_inner = null(); HXDLIN( 419) o3->outer = null(); } HXDLIN( 419) o3->_isimmutable = null(); HXDLIN( 419) o3->_validate = null(); HXDLIN( 419) o3->_invalidate = null(); } HXDLIN( 419) o3->next = ::zpp_nape::geom::ZPP_Vec2_obj::zpp_pool; HXDLIN( 419) ::zpp_nape::geom::ZPP_Vec2_obj::zpp_pool = o3; } } } } HXDLIN( 419) if (hx::IsNull( this->zpp_inner_zn->wrap_a2 )) { HXLINE( 419) this->zpp_inner_zn->setup_a2(); } } HXLINE( 420) { HXLINE( 420) this->zpp_inner->immutable_midstep(HX_("DistanceJoint::jointMin",1d,a7,fa,3d)); HXDLIN( 420) if ((jointMin != jointMin)) { HXLINE( 420) HX_STACK_DO_THROW(HX_("Error: DistanceJoint::jointMin cannot be NaN",ea,fb,5c,cd)); } HXDLIN( 420) if ((jointMin < 0)) { HXLINE( 420) HX_STACK_DO_THROW(HX_("Error: DistanceJoint::jointMin must be >= 0",a6,74,41,57)); } HXDLIN( 420) if ((this->zpp_inner_zn->jointMin != jointMin)) { HXLINE( 420) this->zpp_inner_zn->jointMin = jointMin; HXDLIN( 420) this->zpp_inner->wake(); } } HXLINE( 421) { HXLINE( 421) this->zpp_inner->immutable_midstep(HX_("DistanceJoint::jointMax",2f,a0,fa,3d)); HXDLIN( 421) if ((jointMax != jointMax)) { HXLINE( 421) HX_STACK_DO_THROW(HX_("Error: DistanceJoint::jointMax cannot be NaN",7c,f0,af,65)); } HXDLIN( 421) if ((jointMax < 0)) { HXLINE( 421) HX_STACK_DO_THROW(HX_("Error: DistanceJoint::jointMax must be >= 0",54,b8,29,4a)); } HXDLIN( 421) if ((this->zpp_inner_zn->jointMax != jointMax)) { HXLINE( 421) this->zpp_inner_zn->jointMax = jointMax; HXDLIN( 421) this->zpp_inner->wake(); } } } Dynamic DistanceJoint_obj::__CreateEmpty() { return new DistanceJoint_obj; } void *DistanceJoint_obj::_hx_vtable = 0; Dynamic DistanceJoint_obj::__Create(hx::DynamicArray inArgs) { hx::ObjectPtr< DistanceJoint_obj > _hx_result = new DistanceJoint_obj(); _hx_result->__construct(inArgs[0],inArgs[1],inArgs[2],inArgs[3],inArgs[4],inArgs[5]); return _hx_result; } bool DistanceJoint_obj::_hx_isInstanceOf(int inClassId) { if (inClassId<=(int)0x00e9fd26) { return inClassId==(int)0x00000001 || inClassId==(int)0x00e9fd26; } else { return inClassId==(int)0x7bb9b490; } } ::nape::phys::Body DistanceJoint_obj::get_body1(){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_198_get_body1) HXDLIN( 198) if (hx::IsNull( this->zpp_inner_zn->b1 )) { HXDLIN( 198) return null(); } else { HXDLIN( 198) return this->zpp_inner_zn->b1->outer; } HXDLIN( 198) return null(); } HX_DEFINE_DYNAMIC_FUNC0(DistanceJoint_obj,get_body1,return ) ::nape::phys::Body DistanceJoint_obj::set_body1( ::nape::phys::Body body1){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_200_set_body1) HXLINE( 201) { HXLINE( 202) this->zpp_inner->immutable_midstep((HX_("Constraint::",7d,10,25,6e) + HX_("body1",4f,d3,ef,b6))); HXLINE( 203) ::zpp_nape::phys::ZPP_Body inbody1; HXDLIN( 203) if (hx::IsNull( body1 )) { HXLINE( 203) inbody1 = null(); } else { HXLINE( 203) inbody1 = body1->zpp_inner; } HXLINE( 204) if (hx::IsNotEq( inbody1,this->zpp_inner_zn->b1 )) { HXLINE( 205) if (hx::IsNotNull( this->zpp_inner_zn->b1 )) { HXLINE( 206) bool _hx_tmp; HXDLIN( 206) ::nape::space::Space _hx_tmp1; HXDLIN( 206) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 206) _hx_tmp1 = null(); } else { HXLINE( 206) _hx_tmp1 = this->zpp_inner->space->outer; } HXDLIN( 206) if (hx::IsNotNull( _hx_tmp1 )) { HXLINE( 206) _hx_tmp = hx::IsNotEq( this->zpp_inner_zn->b2,this->zpp_inner_zn->b1 ); } else { HXLINE( 206) _hx_tmp = false; } HXDLIN( 206) if (_hx_tmp) { HXLINE( 208) if (hx::IsNotNull( this->zpp_inner_zn->b1 )) { HXLINE( 208) this->zpp_inner_zn->b1->constraints->remove(this->zpp_inner); } } HXLINE( 211) bool _hx_tmp2; HXDLIN( 211) if (this->zpp_inner->active) { HXLINE( 211) ::nape::space::Space _hx_tmp3; HXDLIN( 211) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 211) _hx_tmp3 = null(); } else { HXLINE( 211) _hx_tmp3 = this->zpp_inner->space->outer; } HXDLIN( 211) _hx_tmp2 = hx::IsNotNull( _hx_tmp3 ); } else { HXLINE( 211) _hx_tmp2 = false; } HXDLIN( 211) if (_hx_tmp2) { HXLINE( 211) this->zpp_inner_zn->b1->wake(); } } HXLINE( 213) this->zpp_inner_zn->b1 = inbody1; HXLINE( 214) bool _hx_tmp4; HXDLIN( 214) bool _hx_tmp5; HXDLIN( 214) ::nape::space::Space _hx_tmp6; HXDLIN( 214) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 214) _hx_tmp6 = null(); } else { HXLINE( 214) _hx_tmp6 = this->zpp_inner->space->outer; } HXDLIN( 214) if (hx::IsNotNull( _hx_tmp6 )) { HXLINE( 214) _hx_tmp5 = hx::IsNotNull( inbody1 ); } else { HXLINE( 214) _hx_tmp5 = false; } HXDLIN( 214) if (_hx_tmp5) { HXLINE( 214) _hx_tmp4 = hx::IsNotEq( this->zpp_inner_zn->b2,inbody1 ); } else { HXLINE( 214) _hx_tmp4 = false; } HXDLIN( 214) if (_hx_tmp4) { HXLINE( 216) if (hx::IsNotNull( inbody1 )) { HXLINE( 216) inbody1->constraints->add(this->zpp_inner); } } HXLINE( 219) bool _hx_tmp7; HXDLIN( 219) if (this->zpp_inner->active) { HXLINE( 219) ::nape::space::Space _hx_tmp8; HXDLIN( 219) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 219) _hx_tmp8 = null(); } else { HXLINE( 219) _hx_tmp8 = this->zpp_inner->space->outer; } HXDLIN( 219) _hx_tmp7 = hx::IsNotNull( _hx_tmp8 ); } else { HXLINE( 219) _hx_tmp7 = false; } HXDLIN( 219) if (_hx_tmp7) { HXLINE( 220) this->zpp_inner->wake(); HXLINE( 221) if (hx::IsNotNull( inbody1 )) { HXLINE( 221) inbody1->wake(); } } } } HXLINE( 225) if (hx::IsNull( this->zpp_inner_zn->b1 )) { HXLINE( 225) return null(); } else { HXLINE( 225) return this->zpp_inner_zn->b1->outer; } HXDLIN( 225) return null(); } HX_DEFINE_DYNAMIC_FUNC1(DistanceJoint_obj,set_body1,return ) ::nape::phys::Body DistanceJoint_obj::get_body2(){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_236_get_body2) HXDLIN( 236) if (hx::IsNull( this->zpp_inner_zn->b2 )) { HXDLIN( 236) return null(); } else { HXDLIN( 236) return this->zpp_inner_zn->b2->outer; } HXDLIN( 236) return null(); } HX_DEFINE_DYNAMIC_FUNC0(DistanceJoint_obj,get_body2,return ) ::nape::phys::Body DistanceJoint_obj::set_body2( ::nape::phys::Body body2){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_238_set_body2) HXLINE( 239) { HXLINE( 240) this->zpp_inner->immutable_midstep((HX_("Constraint::",7d,10,25,6e) + HX_("body2",50,d3,ef,b6))); HXLINE( 241) ::zpp_nape::phys::ZPP_Body inbody2; HXDLIN( 241) if (hx::IsNull( body2 )) { HXLINE( 241) inbody2 = null(); } else { HXLINE( 241) inbody2 = body2->zpp_inner; } HXLINE( 242) if (hx::IsNotEq( inbody2,this->zpp_inner_zn->b2 )) { HXLINE( 243) if (hx::IsNotNull( this->zpp_inner_zn->b2 )) { HXLINE( 244) bool _hx_tmp; HXDLIN( 244) ::nape::space::Space _hx_tmp1; HXDLIN( 244) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 244) _hx_tmp1 = null(); } else { HXLINE( 244) _hx_tmp1 = this->zpp_inner->space->outer; } HXDLIN( 244) if (hx::IsNotNull( _hx_tmp1 )) { HXLINE( 244) _hx_tmp = hx::IsNotEq( this->zpp_inner_zn->b1,this->zpp_inner_zn->b2 ); } else { HXLINE( 244) _hx_tmp = false; } HXDLIN( 244) if (_hx_tmp) { HXLINE( 246) if (hx::IsNotNull( this->zpp_inner_zn->b2 )) { HXLINE( 246) this->zpp_inner_zn->b2->constraints->remove(this->zpp_inner); } } HXLINE( 249) bool _hx_tmp2; HXDLIN( 249) if (this->zpp_inner->active) { HXLINE( 249) ::nape::space::Space _hx_tmp3; HXDLIN( 249) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 249) _hx_tmp3 = null(); } else { HXLINE( 249) _hx_tmp3 = this->zpp_inner->space->outer; } HXDLIN( 249) _hx_tmp2 = hx::IsNotNull( _hx_tmp3 ); } else { HXLINE( 249) _hx_tmp2 = false; } HXDLIN( 249) if (_hx_tmp2) { HXLINE( 249) this->zpp_inner_zn->b2->wake(); } } HXLINE( 251) this->zpp_inner_zn->b2 = inbody2; HXLINE( 252) bool _hx_tmp4; HXDLIN( 252) bool _hx_tmp5; HXDLIN( 252) ::nape::space::Space _hx_tmp6; HXDLIN( 252) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 252) _hx_tmp6 = null(); } else { HXLINE( 252) _hx_tmp6 = this->zpp_inner->space->outer; } HXDLIN( 252) if (hx::IsNotNull( _hx_tmp6 )) { HXLINE( 252) _hx_tmp5 = hx::IsNotNull( inbody2 ); } else { HXLINE( 252) _hx_tmp5 = false; } HXDLIN( 252) if (_hx_tmp5) { HXLINE( 252) _hx_tmp4 = hx::IsNotEq( this->zpp_inner_zn->b1,inbody2 ); } else { HXLINE( 252) _hx_tmp4 = false; } HXDLIN( 252) if (_hx_tmp4) { HXLINE( 254) if (hx::IsNotNull( inbody2 )) { HXLINE( 254) inbody2->constraints->add(this->zpp_inner); } } HXLINE( 257) bool _hx_tmp7; HXDLIN( 257) if (this->zpp_inner->active) { HXLINE( 257) ::nape::space::Space _hx_tmp8; HXDLIN( 257) if (hx::IsNull( this->zpp_inner->space )) { HXLINE( 257) _hx_tmp8 = null(); } else { HXLINE( 257) _hx_tmp8 = this->zpp_inner->space->outer; } HXDLIN( 257) _hx_tmp7 = hx::IsNotNull( _hx_tmp8 ); } else { HXLINE( 257) _hx_tmp7 = false; } HXDLIN( 257) if (_hx_tmp7) { HXLINE( 258) this->zpp_inner->wake(); HXLINE( 259) if (hx::IsNotNull( inbody2 )) { HXLINE( 259) inbody2->wake(); } } } } HXLINE( 263) if (hx::IsNull( this->zpp_inner_zn->b2 )) { HXLINE( 263) return null(); } else { HXLINE( 263) return this->zpp_inner_zn->b2->outer; } HXDLIN( 263) return null(); } HX_DEFINE_DYNAMIC_FUNC1(DistanceJoint_obj,set_body2,return ) ::nape::geom::Vec2 DistanceJoint_obj::get_anchor1(){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_272_get_anchor1) HXLINE( 273) if (hx::IsNull( this->zpp_inner_zn->wrap_a1 )) { HXLINE( 273) this->zpp_inner_zn->setup_a1(); } HXLINE( 274) return this->zpp_inner_zn->wrap_a1; } HX_DEFINE_DYNAMIC_FUNC0(DistanceJoint_obj,get_anchor1,return ) ::nape::geom::Vec2 DistanceJoint_obj::set_anchor1( ::nape::geom::Vec2 anchor1){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_276_set_anchor1) HXLINE( 277) { HXLINE( 280) bool _hx_tmp; HXDLIN( 280) if (hx::IsNotNull( anchor1 )) { HXLINE( 280) _hx_tmp = anchor1->zpp_disp; } else { HXLINE( 280) _hx_tmp = false; } HXDLIN( 280) if (_hx_tmp) { HXLINE( 280) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXLINE( 284) if (hx::IsNull( anchor1 )) { HXLINE( 284) HX_STACK_DO_THROW(((HX_("Error: Constraint::",cb,f5,02,d5) + HX_("anchor1",1c,ec,a1,02)) + HX_(" cannot be null",07,dc,5d,15))); } HXLINE( 286) { HXLINE( 286) if (hx::IsNull( this->zpp_inner_zn->wrap_a1 )) { HXLINE( 286) this->zpp_inner_zn->setup_a1(); } HXDLIN( 286) ::nape::geom::Vec2 _this = this->zpp_inner_zn->wrap_a1; HXDLIN( 286) bool _hx_tmp1; HXDLIN( 286) if (hx::IsNotNull( _this )) { HXLINE( 286) _hx_tmp1 = _this->zpp_disp; } else { HXLINE( 286) _hx_tmp1 = false; } HXDLIN( 286) if (_hx_tmp1) { HXLINE( 286) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 286) bool _hx_tmp2; HXDLIN( 286) if (hx::IsNotNull( anchor1 )) { HXLINE( 286) _hx_tmp2 = anchor1->zpp_disp; } else { HXLINE( 286) _hx_tmp2 = false; } HXDLIN( 286) if (_hx_tmp2) { HXLINE( 286) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 286) { HXLINE( 286) ::zpp_nape::geom::ZPP_Vec2 _this1 = _this->zpp_inner; HXDLIN( 286) if (_this1->_immutable) { HXLINE( 286) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 286) if (hx::IsNotNull( _this1->_isimmutable )) { HXLINE( 286) _this1->_isimmutable(); } } HXDLIN( 286) if (hx::IsNull( anchor1 )) { HXLINE( 286) HX_STACK_DO_THROW(HX_("Error: Cannot assign null Vec2",95,15,46,66)); } HXDLIN( 286) bool _hx_tmp3; HXDLIN( 286) if (hx::IsNotNull( anchor1 )) { HXLINE( 286) _hx_tmp3 = anchor1->zpp_disp; } else { HXLINE( 286) _hx_tmp3 = false; } HXDLIN( 286) if (_hx_tmp3) { HXLINE( 286) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 286) { HXLINE( 286) ::zpp_nape::geom::ZPP_Vec2 _this2 = anchor1->zpp_inner; HXDLIN( 286) if (hx::IsNotNull( _this2->_validate )) { HXLINE( 286) _this2->_validate(); } } HXDLIN( 286) Float x = anchor1->zpp_inner->x; HXDLIN( 286) bool _hx_tmp4; HXDLIN( 286) if (hx::IsNotNull( anchor1 )) { HXLINE( 286) _hx_tmp4 = anchor1->zpp_disp; } else { HXLINE( 286) _hx_tmp4 = false; } HXDLIN( 286) if (_hx_tmp4) { HXLINE( 286) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 286) { HXLINE( 286) ::zpp_nape::geom::ZPP_Vec2 _this3 = anchor1->zpp_inner; HXDLIN( 286) if (hx::IsNotNull( _this3->_validate )) { HXLINE( 286) _this3->_validate(); } } HXDLIN( 286) Float y = anchor1->zpp_inner->y; HXDLIN( 286) bool _hx_tmp5; HXDLIN( 286) if (hx::IsNotNull( _this )) { HXLINE( 286) _hx_tmp5 = _this->zpp_disp; } else { HXLINE( 286) _hx_tmp5 = false; } HXDLIN( 286) if (_hx_tmp5) { HXLINE( 286) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 286) { HXLINE( 286) ::zpp_nape::geom::ZPP_Vec2 _this4 = _this->zpp_inner; HXDLIN( 286) if (_this4->_immutable) { HXLINE( 286) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 286) if (hx::IsNotNull( _this4->_isimmutable )) { HXLINE( 286) _this4->_isimmutable(); } } HXDLIN( 286) bool _hx_tmp6; HXDLIN( 286) if ((x == x)) { HXLINE( 286) _hx_tmp6 = (y != y); } else { HXLINE( 286) _hx_tmp6 = true; } HXDLIN( 286) if (_hx_tmp6) { HXLINE( 286) HX_STACK_DO_THROW(HX_("Error: Vec2 components cannot be NaN",85,ba,d8,c1)); } HXDLIN( 286) bool _hx_tmp7; HXDLIN( 286) bool _hx_tmp8; HXDLIN( 286) if (hx::IsNotNull( _this )) { HXLINE( 286) _hx_tmp8 = _this->zpp_disp; } else { HXLINE( 286) _hx_tmp8 = false; } HXDLIN( 286) if (_hx_tmp8) { HXLINE( 286) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 286) { HXLINE( 286) ::zpp_nape::geom::ZPP_Vec2 _this5 = _this->zpp_inner; HXDLIN( 286) if (hx::IsNotNull( _this5->_validate )) { HXLINE( 286) _this5->_validate(); } } HXDLIN( 286) if ((_this->zpp_inner->x == x)) { HXLINE( 286) bool _hx_tmp9; HXDLIN( 286) if (hx::IsNotNull( _this )) { HXLINE( 286) _hx_tmp9 = _this->zpp_disp; } else { HXLINE( 286) _hx_tmp9 = false; } HXDLIN( 286) if (_hx_tmp9) { HXLINE( 286) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 286) { HXLINE( 286) ::zpp_nape::geom::ZPP_Vec2 _this6 = _this->zpp_inner; HXDLIN( 286) if (hx::IsNotNull( _this6->_validate )) { HXLINE( 286) _this6->_validate(); } } HXDLIN( 286) _hx_tmp7 = (_this->zpp_inner->y == y); } else { HXLINE( 286) _hx_tmp7 = false; } HXDLIN( 286) if (!(_hx_tmp7)) { HXLINE( 286) { HXLINE( 286) _this->zpp_inner->x = x; HXDLIN( 286) _this->zpp_inner->y = y; } HXDLIN( 286) { HXLINE( 286) ::zpp_nape::geom::ZPP_Vec2 _this7 = _this->zpp_inner; HXDLIN( 286) if (hx::IsNotNull( _this7->_invalidate )) { HXLINE( 286) _this7->_invalidate(_this7); } } } HXDLIN( 286) ::nape::geom::Vec2 ret = _this; HXDLIN( 286) if (anchor1->zpp_inner->weak) { HXLINE( 286) bool _hx_tmp10; HXDLIN( 286) if (hx::IsNotNull( anchor1 )) { HXLINE( 286) _hx_tmp10 = anchor1->zpp_disp; } else { HXLINE( 286) _hx_tmp10 = false; } HXDLIN( 286) if (_hx_tmp10) { HXLINE( 286) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 286) { HXLINE( 286) ::zpp_nape::geom::ZPP_Vec2 _this8 = anchor1->zpp_inner; HXDLIN( 286) if (_this8->_immutable) { HXLINE( 286) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 286) if (hx::IsNotNull( _this8->_isimmutable )) { HXLINE( 286) _this8->_isimmutable(); } } HXDLIN( 286) if (anchor1->zpp_inner->_inuse) { HXLINE( 286) HX_STACK_DO_THROW(HX_("Error: This Vec2 is not disposable",b5,d1,d1,d8)); } HXDLIN( 286) ::zpp_nape::geom::ZPP_Vec2 inner = anchor1->zpp_inner; HXDLIN( 286) anchor1->zpp_inner->outer = null(); HXDLIN( 286) anchor1->zpp_inner = null(); HXDLIN( 286) { HXLINE( 286) ::nape::geom::Vec2 o = anchor1; HXDLIN( 286) o->zpp_pool = null(); HXDLIN( 286) if (hx::IsNotNull( ::zpp_nape::util::ZPP_PubPool_obj::nextVec2 )) { HXLINE( 286) ::zpp_nape::util::ZPP_PubPool_obj::nextVec2->zpp_pool = o; } else { HXLINE( 286) ::zpp_nape::util::ZPP_PubPool_obj::poolVec2 = o; } HXDLIN( 286) ::zpp_nape::util::ZPP_PubPool_obj::nextVec2 = o; HXDLIN( 286) o->zpp_disp = true; } HXDLIN( 286) { HXLINE( 286) ::zpp_nape::geom::ZPP_Vec2 o1 = inner; HXDLIN( 286) { HXLINE( 286) if (hx::IsNotNull( o1->outer )) { HXLINE( 286) o1->outer->zpp_inner = null(); HXDLIN( 286) o1->outer = null(); } HXDLIN( 286) o1->_isimmutable = null(); HXDLIN( 286) o1->_validate = null(); HXDLIN( 286) o1->_invalidate = null(); } HXDLIN( 286) o1->next = ::zpp_nape::geom::ZPP_Vec2_obj::zpp_pool; HXDLIN( 286) ::zpp_nape::geom::ZPP_Vec2_obj::zpp_pool = o1; } } } } HXLINE( 288) if (hx::IsNull( this->zpp_inner_zn->wrap_a1 )) { HXLINE( 288) this->zpp_inner_zn->setup_a1(); } HXDLIN( 288) return this->zpp_inner_zn->wrap_a1; } HX_DEFINE_DYNAMIC_FUNC1(DistanceJoint_obj,set_anchor1,return ) ::nape::geom::Vec2 DistanceJoint_obj::get_anchor2(){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_297_get_anchor2) HXLINE( 298) if (hx::IsNull( this->zpp_inner_zn->wrap_a2 )) { HXLINE( 298) this->zpp_inner_zn->setup_a2(); } HXLINE( 299) return this->zpp_inner_zn->wrap_a2; } HX_DEFINE_DYNAMIC_FUNC0(DistanceJoint_obj,get_anchor2,return ) ::nape::geom::Vec2 DistanceJoint_obj::set_anchor2( ::nape::geom::Vec2 anchor2){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_301_set_anchor2) HXLINE( 302) { HXLINE( 305) bool _hx_tmp; HXDLIN( 305) if (hx::IsNotNull( anchor2 )) { HXLINE( 305) _hx_tmp = anchor2->zpp_disp; } else { HXLINE( 305) _hx_tmp = false; } HXDLIN( 305) if (_hx_tmp) { HXLINE( 305) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXLINE( 309) if (hx::IsNull( anchor2 )) { HXLINE( 309) HX_STACK_DO_THROW(((HX_("Error: Constraint::",cb,f5,02,d5) + HX_("anchor2",1d,ec,a1,02)) + HX_(" cannot be null",07,dc,5d,15))); } HXLINE( 311) { HXLINE( 311) if (hx::IsNull( this->zpp_inner_zn->wrap_a2 )) { HXLINE( 311) this->zpp_inner_zn->setup_a2(); } HXDLIN( 311) ::nape::geom::Vec2 _this = this->zpp_inner_zn->wrap_a2; HXDLIN( 311) bool _hx_tmp1; HXDLIN( 311) if (hx::IsNotNull( _this )) { HXLINE( 311) _hx_tmp1 = _this->zpp_disp; } else { HXLINE( 311) _hx_tmp1 = false; } HXDLIN( 311) if (_hx_tmp1) { HXLINE( 311) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 311) bool _hx_tmp2; HXDLIN( 311) if (hx::IsNotNull( anchor2 )) { HXLINE( 311) _hx_tmp2 = anchor2->zpp_disp; } else { HXLINE( 311) _hx_tmp2 = false; } HXDLIN( 311) if (_hx_tmp2) { HXLINE( 311) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 311) { HXLINE( 311) ::zpp_nape::geom::ZPP_Vec2 _this1 = _this->zpp_inner; HXDLIN( 311) if (_this1->_immutable) { HXLINE( 311) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 311) if (hx::IsNotNull( _this1->_isimmutable )) { HXLINE( 311) _this1->_isimmutable(); } } HXDLIN( 311) if (hx::IsNull( anchor2 )) { HXLINE( 311) HX_STACK_DO_THROW(HX_("Error: Cannot assign null Vec2",95,15,46,66)); } HXDLIN( 311) bool _hx_tmp3; HXDLIN( 311) if (hx::IsNotNull( anchor2 )) { HXLINE( 311) _hx_tmp3 = anchor2->zpp_disp; } else { HXLINE( 311) _hx_tmp3 = false; } HXDLIN( 311) if (_hx_tmp3) { HXLINE( 311) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 311) { HXLINE( 311) ::zpp_nape::geom::ZPP_Vec2 _this2 = anchor2->zpp_inner; HXDLIN( 311) if (hx::IsNotNull( _this2->_validate )) { HXLINE( 311) _this2->_validate(); } } HXDLIN( 311) Float x = anchor2->zpp_inner->x; HXDLIN( 311) bool _hx_tmp4; HXDLIN( 311) if (hx::IsNotNull( anchor2 )) { HXLINE( 311) _hx_tmp4 = anchor2->zpp_disp; } else { HXLINE( 311) _hx_tmp4 = false; } HXDLIN( 311) if (_hx_tmp4) { HXLINE( 311) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 311) { HXLINE( 311) ::zpp_nape::geom::ZPP_Vec2 _this3 = anchor2->zpp_inner; HXDLIN( 311) if (hx::IsNotNull( _this3->_validate )) { HXLINE( 311) _this3->_validate(); } } HXDLIN( 311) Float y = anchor2->zpp_inner->y; HXDLIN( 311) bool _hx_tmp5; HXDLIN( 311) if (hx::IsNotNull( _this )) { HXLINE( 311) _hx_tmp5 = _this->zpp_disp; } else { HXLINE( 311) _hx_tmp5 = false; } HXDLIN( 311) if (_hx_tmp5) { HXLINE( 311) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 311) { HXLINE( 311) ::zpp_nape::geom::ZPP_Vec2 _this4 = _this->zpp_inner; HXDLIN( 311) if (_this4->_immutable) { HXLINE( 311) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 311) if (hx::IsNotNull( _this4->_isimmutable )) { HXLINE( 311) _this4->_isimmutable(); } } HXDLIN( 311) bool _hx_tmp6; HXDLIN( 311) if ((x == x)) { HXLINE( 311) _hx_tmp6 = (y != y); } else { HXLINE( 311) _hx_tmp6 = true; } HXDLIN( 311) if (_hx_tmp6) { HXLINE( 311) HX_STACK_DO_THROW(HX_("Error: Vec2 components cannot be NaN",85,ba,d8,c1)); } HXDLIN( 311) bool _hx_tmp7; HXDLIN( 311) bool _hx_tmp8; HXDLIN( 311) if (hx::IsNotNull( _this )) { HXLINE( 311) _hx_tmp8 = _this->zpp_disp; } else { HXLINE( 311) _hx_tmp8 = false; } HXDLIN( 311) if (_hx_tmp8) { HXLINE( 311) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 311) { HXLINE( 311) ::zpp_nape::geom::ZPP_Vec2 _this5 = _this->zpp_inner; HXDLIN( 311) if (hx::IsNotNull( _this5->_validate )) { HXLINE( 311) _this5->_validate(); } } HXDLIN( 311) if ((_this->zpp_inner->x == x)) { HXLINE( 311) bool _hx_tmp9; HXDLIN( 311) if (hx::IsNotNull( _this )) { HXLINE( 311) _hx_tmp9 = _this->zpp_disp; } else { HXLINE( 311) _hx_tmp9 = false; } HXDLIN( 311) if (_hx_tmp9) { HXLINE( 311) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 311) { HXLINE( 311) ::zpp_nape::geom::ZPP_Vec2 _this6 = _this->zpp_inner; HXDLIN( 311) if (hx::IsNotNull( _this6->_validate )) { HXLINE( 311) _this6->_validate(); } } HXDLIN( 311) _hx_tmp7 = (_this->zpp_inner->y == y); } else { HXLINE( 311) _hx_tmp7 = false; } HXDLIN( 311) if (!(_hx_tmp7)) { HXLINE( 311) { HXLINE( 311) _this->zpp_inner->x = x; HXDLIN( 311) _this->zpp_inner->y = y; } HXDLIN( 311) { HXLINE( 311) ::zpp_nape::geom::ZPP_Vec2 _this7 = _this->zpp_inner; HXDLIN( 311) if (hx::IsNotNull( _this7->_invalidate )) { HXLINE( 311) _this7->_invalidate(_this7); } } } HXDLIN( 311) ::nape::geom::Vec2 ret = _this; HXDLIN( 311) if (anchor2->zpp_inner->weak) { HXLINE( 311) bool _hx_tmp10; HXDLIN( 311) if (hx::IsNotNull( anchor2 )) { HXLINE( 311) _hx_tmp10 = anchor2->zpp_disp; } else { HXLINE( 311) _hx_tmp10 = false; } HXDLIN( 311) if (_hx_tmp10) { HXLINE( 311) HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Vec2",7e,53,25,39)) + HX_(" has been disposed and cannot be used!",2e,07,ae,74))); } HXDLIN( 311) { HXLINE( 311) ::zpp_nape::geom::ZPP_Vec2 _this8 = anchor2->zpp_inner; HXDLIN( 311) if (_this8->_immutable) { HXLINE( 311) HX_STACK_DO_THROW(HX_("Error: Vec2 is immutable",60,ee,1f,bc)); } HXDLIN( 311) if (hx::IsNotNull( _this8->_isimmutable )) { HXLINE( 311) _this8->_isimmutable(); } } HXDLIN( 311) if (anchor2->zpp_inner->_inuse) { HXLINE( 311) HX_STACK_DO_THROW(HX_("Error: This Vec2 is not disposable",b5,d1,d1,d8)); } HXDLIN( 311) ::zpp_nape::geom::ZPP_Vec2 inner = anchor2->zpp_inner; HXDLIN( 311) anchor2->zpp_inner->outer = null(); HXDLIN( 311) anchor2->zpp_inner = null(); HXDLIN( 311) { HXLINE( 311) ::nape::geom::Vec2 o = anchor2; HXDLIN( 311) o->zpp_pool = null(); HXDLIN( 311) if (hx::IsNotNull( ::zpp_nape::util::ZPP_PubPool_obj::nextVec2 )) { HXLINE( 311) ::zpp_nape::util::ZPP_PubPool_obj::nextVec2->zpp_pool = o; } else { HXLINE( 311) ::zpp_nape::util::ZPP_PubPool_obj::poolVec2 = o; } HXDLIN( 311) ::zpp_nape::util::ZPP_PubPool_obj::nextVec2 = o; HXDLIN( 311) o->zpp_disp = true; } HXDLIN( 311) { HXLINE( 311) ::zpp_nape::geom::ZPP_Vec2 o1 = inner; HXDLIN( 311) { HXLINE( 311) if (hx::IsNotNull( o1->outer )) { HXLINE( 311) o1->outer->zpp_inner = null(); HXDLIN( 311) o1->outer = null(); } HXDLIN( 311) o1->_isimmutable = null(); HXDLIN( 311) o1->_validate = null(); HXDLIN( 311) o1->_invalidate = null(); } HXDLIN( 311) o1->next = ::zpp_nape::geom::ZPP_Vec2_obj::zpp_pool; HXDLIN( 311) ::zpp_nape::geom::ZPP_Vec2_obj::zpp_pool = o1; } } } } HXLINE( 313) if (hx::IsNull( this->zpp_inner_zn->wrap_a2 )) { HXLINE( 313) this->zpp_inner_zn->setup_a2(); } HXDLIN( 313) return this->zpp_inner_zn->wrap_a2; } HX_DEFINE_DYNAMIC_FUNC1(DistanceJoint_obj,set_anchor2,return ) Float DistanceJoint_obj::get_jointMin(){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_323_get_jointMin) HXDLIN( 323) return this->zpp_inner_zn->jointMin; } HX_DEFINE_DYNAMIC_FUNC0(DistanceJoint_obj,get_jointMin,return ) Float DistanceJoint_obj::set_jointMin(Float jointMin){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_325_set_jointMin) HXLINE( 326) { HXLINE( 327) this->zpp_inner->immutable_midstep(HX_("DistanceJoint::jointMin",1d,a7,fa,3d)); HXLINE( 329) if ((jointMin != jointMin)) { HXLINE( 330) HX_STACK_DO_THROW(HX_("Error: DistanceJoint::jointMin cannot be NaN",ea,fb,5c,cd)); } HXLINE( 332) if ((jointMin < 0)) { HXLINE( 333) HX_STACK_DO_THROW(HX_("Error: DistanceJoint::jointMin must be >= 0",a6,74,41,57)); } HXLINE( 336) if ((this->zpp_inner_zn->jointMin != jointMin)) { HXLINE( 337) this->zpp_inner_zn->jointMin = jointMin; HXLINE( 338) this->zpp_inner->wake(); } } HXLINE( 341) return this->zpp_inner_zn->jointMin; } HX_DEFINE_DYNAMIC_FUNC1(DistanceJoint_obj,set_jointMin,return ) Float DistanceJoint_obj::get_jointMax(){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_351_get_jointMax) HXDLIN( 351) return this->zpp_inner_zn->jointMax; } HX_DEFINE_DYNAMIC_FUNC0(DistanceJoint_obj,get_jointMax,return ) Float DistanceJoint_obj::set_jointMax(Float jointMax){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_353_set_jointMax) HXLINE( 354) { HXLINE( 355) this->zpp_inner->immutable_midstep(HX_("DistanceJoint::jointMax",2f,a0,fa,3d)); HXLINE( 357) if ((jointMax != jointMax)) { HXLINE( 358) HX_STACK_DO_THROW(HX_("Error: DistanceJoint::jointMax cannot be NaN",7c,f0,af,65)); } HXLINE( 360) if ((jointMax < 0)) { HXLINE( 361) HX_STACK_DO_THROW(HX_("Error: DistanceJoint::jointMax must be >= 0",54,b8,29,4a)); } HXLINE( 364) if ((this->zpp_inner_zn->jointMax != jointMax)) { HXLINE( 365) this->zpp_inner_zn->jointMax = jointMax; HXLINE( 366) this->zpp_inner->wake(); } } HXLINE( 369) return this->zpp_inner_zn->jointMax; } HX_DEFINE_DYNAMIC_FUNC1(DistanceJoint_obj,set_jointMax,return ) bool DistanceJoint_obj::isSlack(){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_382_isSlack) HXLINE( 384) bool _hx_tmp; HXDLIN( 384) ::nape::phys::Body _hx_tmp1; HXDLIN( 384) if (hx::IsNull( this->zpp_inner_zn->b1 )) { HXLINE( 384) _hx_tmp1 = null(); } else { HXLINE( 384) _hx_tmp1 = this->zpp_inner_zn->b1->outer; } HXDLIN( 384) if (hx::IsNotNull( _hx_tmp1 )) { HXLINE( 384) ::nape::phys::Body _hx_tmp2; HXDLIN( 384) if (hx::IsNull( this->zpp_inner_zn->b2 )) { HXLINE( 384) _hx_tmp2 = null(); } else { HXLINE( 384) _hx_tmp2 = this->zpp_inner_zn->b2->outer; } HXDLIN( 384) _hx_tmp = hx::IsNull( _hx_tmp2 ); } else { HXLINE( 384) _hx_tmp = true; } HXDLIN( 384) if (_hx_tmp) { HXLINE( 385) HX_STACK_DO_THROW(HX_("Error: Cannot compute slack for DistanceJoint if either body is null.",ed,15,31,a3)); } HXLINE( 388) return this->zpp_inner_zn->slack; } HX_DEFINE_DYNAMIC_FUNC0(DistanceJoint_obj,isSlack,return ) ::nape::geom::MatMN DistanceJoint_obj::impulse(){ HX_GC_STACKFRAME(&_hx_pos_5800e8f0187168fd_428_impulse) HXLINE( 429) ::nape::geom::MatMN ret = ::nape::geom::MatMN_obj::__alloc( HX_CTX ,1,1); HXLINE( 430) { HXLINE( 430) bool _hx_tmp; HXDLIN( 430) if ((0 < ret->zpp_inner->m)) { HXLINE( 430) _hx_tmp = (0 >= ret->zpp_inner->n); } else { HXLINE( 430) _hx_tmp = true; } HXDLIN( 430) if (_hx_tmp) { HXLINE( 430) HX_STACK_DO_THROW(HX_("Error: MatMN indices out of range",cc,72,58,e6)); } HXDLIN( 430) ret->zpp_inner->x[(0 * ret->zpp_inner->n)] = this->zpp_inner_zn->jAcc; } HXLINE( 431) return ret; } ::nape::geom::Vec3 DistanceJoint_obj::bodyImpulse( ::nape::phys::Body body){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_436_bodyImpulse) HXLINE( 438) if (hx::IsNull( body )) { HXLINE( 439) HX_STACK_DO_THROW(HX_("Error: Cannot evaluate impulse on null body",9d,b5,dc,16)); } HXLINE( 441) bool _hx_tmp; HXDLIN( 441) ::nape::phys::Body _hx_tmp1; HXDLIN( 441) if (hx::IsNull( this->zpp_inner_zn->b1 )) { HXLINE( 441) _hx_tmp1 = null(); } else { HXLINE( 441) _hx_tmp1 = this->zpp_inner_zn->b1->outer; } HXDLIN( 441) if (hx::IsNotEq( body,_hx_tmp1 )) { HXLINE( 441) ::nape::phys::Body _hx_tmp2; HXDLIN( 441) if (hx::IsNull( this->zpp_inner_zn->b2 )) { HXLINE( 441) _hx_tmp2 = null(); } else { HXLINE( 441) _hx_tmp2 = this->zpp_inner_zn->b2->outer; } HXDLIN( 441) _hx_tmp = hx::IsNotEq( body,_hx_tmp2 ); } else { HXLINE( 441) _hx_tmp = false; } HXDLIN( 441) if (_hx_tmp) { HXLINE( 442) HX_STACK_DO_THROW(HX_("Error: Body is not linked to this constraint",2e,e5,48,bf)); } HXLINE( 445) if (!(this->zpp_inner->active)) { HXLINE( 446) return ::nape::geom::Vec3_obj::get(null(),null(),null()); } else { HXLINE( 449) return this->zpp_inner_zn->bodyImpulse(body->zpp_inner); } HXLINE( 445) return null(); } void DistanceJoint_obj::visitBodies( ::Dynamic lambda){ HX_STACKFRAME(&_hx_pos_5800e8f0187168fd_455_visitBodies) HXLINE( 456) ::nape::phys::Body _hx_tmp; HXDLIN( 456) if (hx::IsNull( this->zpp_inner_zn->b1 )) { HXLINE( 456) _hx_tmp = null(); } else { HXLINE( 456) _hx_tmp = this->zpp_inner_zn->b1->outer; } HXDLIN( 456) if (hx::IsNotNull( _hx_tmp )) { HXLINE( 457) ::nape::phys::Body _hx_tmp1; HXDLIN( 457) if (hx::IsNull( this->zpp_inner_zn->b1 )) { HXLINE( 457) _hx_tmp1 = null(); } else { HXLINE( 457) _hx_tmp1 = this->zpp_inner_zn->b1->outer; } HXDLIN( 457) lambda(_hx_tmp1); } HXLINE( 459) bool _hx_tmp2; HXDLIN( 459) ::nape::phys::Body _hx_tmp3; HXDLIN( 459) if (hx::IsNull( this->zpp_inner_zn->b2 )) { HXLINE( 459) _hx_tmp3 = null(); } else { HXLINE( 459) _hx_tmp3 = this->zpp_inner_zn->b2->outer; } HXDLIN( 459) if (hx::IsNotNull( _hx_tmp3 )) { HXLINE( 459) ::nape::phys::Body _hx_tmp4; HXDLIN( 459) if (hx::IsNull( this->zpp_inner_zn->b2 )) { HXLINE( 459) _hx_tmp4 = null(); } else { HXLINE( 459) _hx_tmp4 = this->zpp_inner_zn->b2->outer; } HXDLIN( 459) ::nape::phys::Body _hx_tmp5; HXDLIN( 459) if (hx::IsNull( this->zpp_inner_zn->b1 )) { HXLINE( 459) _hx_tmp5 = null(); } else { HXLINE( 459) _hx_tmp5 = this->zpp_inner_zn->b1->outer; } HXDLIN( 459) _hx_tmp2 = hx::IsNotEq( _hx_tmp4,_hx_tmp5 ); } else { HXLINE( 459) _hx_tmp2 = false; } HXDLIN( 459) if (_hx_tmp2) { HXLINE( 460) ::nape::phys::Body _hx_tmp6; HXDLIN( 460) if (hx::IsNull( this->zpp_inner_zn->b2 )) { HXLINE( 460) _hx_tmp6 = null(); } else { HXLINE( 460) _hx_tmp6 = this->zpp_inner_zn->b2->outer; } HXDLIN( 460) lambda(_hx_tmp6); } } hx::ObjectPtr< DistanceJoint_obj > DistanceJoint_obj::__new( ::nape::phys::Body body1, ::nape::phys::Body body2, ::nape::geom::Vec2 anchor1, ::nape::geom::Vec2 anchor2,Float jointMin,Float jointMax) { hx::ObjectPtr< DistanceJoint_obj > __this = new DistanceJoint_obj(); __this->__construct(body1,body2,anchor1,anchor2,jointMin,jointMax); return __this; } hx::ObjectPtr< DistanceJoint_obj > DistanceJoint_obj::__alloc(hx::Ctx *_hx_ctx, ::nape::phys::Body body1, ::nape::phys::Body body2, ::nape::geom::Vec2 anchor1, ::nape::geom::Vec2 anchor2,Float jointMin,Float jointMax) { DistanceJoint_obj *__this = (DistanceJoint_obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(DistanceJoint_obj), true, "nape.constraint.DistanceJoint")); *(void **)__this = DistanceJoint_obj::_hx_vtable; __this->__construct(body1,body2,anchor1,anchor2,jointMin,jointMax); return __this; } DistanceJoint_obj::DistanceJoint_obj() { } void DistanceJoint_obj::__Mark(HX_MARK_PARAMS) { HX_MARK_BEGIN_CLASS(DistanceJoint); HX_MARK_MEMBER_NAME(zpp_inner_zn,"zpp_inner_zn"); ::nape::constraint::Constraint_obj::__Mark(HX_MARK_ARG); HX_MARK_END_CLASS(); } void DistanceJoint_obj::__Visit(HX_VISIT_PARAMS) { HX_VISIT_MEMBER_NAME(zpp_inner_zn,"zpp_inner_zn"); ::nape::constraint::Constraint_obj::__Visit(HX_VISIT_ARG); } hx::Val DistanceJoint_obj::__Field(const ::String &inName,hx::PropertyAccess inCallProp) { switch(inName.length) { case 5: if (HX_FIELD_EQ(inName,"body1") ) { if (inCallProp == hx::paccAlways) return hx::Val( get_body1() ); } if (HX_FIELD_EQ(inName,"body2") ) { if (inCallProp == hx::paccAlways) return hx::Val( get_body2() ); } break; case 7: if (HX_FIELD_EQ(inName,"anchor1") ) { if (inCallProp == hx::paccAlways) return hx::Val( get_anchor1() ); } if (HX_FIELD_EQ(inName,"anchor2") ) { if (inCallProp == hx::paccAlways) return hx::Val( get_anchor2() ); } if (HX_FIELD_EQ(inName,"isSlack") ) { return hx::Val( isSlack_dyn() ); } if (HX_FIELD_EQ(inName,"impulse") ) { return hx::Val( impulse_dyn() ); } break; case 8: if (HX_FIELD_EQ(inName,"jointMin") ) { if (inCallProp == hx::paccAlways) return hx::Val( get_jointMin() ); } if (HX_FIELD_EQ(inName,"jointMax") ) { if (inCallProp == hx::paccAlways) return hx::Val( get_jointMax() ); } break; case 9: if (HX_FIELD_EQ(inName,"get_body1") ) { return hx::Val( get_body1_dyn() ); } if (HX_FIELD_EQ(inName,"set_body1") ) { return hx::Val( set_body1_dyn() ); } if (HX_FIELD_EQ(inName,"get_body2") ) { return hx::Val( get_body2_dyn() ); } if (HX_FIELD_EQ(inName,"set_body2") ) { return hx::Val( set_body2_dyn() ); } break; case 11: if (HX_FIELD_EQ(inName,"get_anchor1") ) { return hx::Val( get_anchor1_dyn() ); } if (HX_FIELD_EQ(inName,"set_anchor1") ) { return hx::Val( set_anchor1_dyn() ); } if (HX_FIELD_EQ(inName,"get_anchor2") ) { return hx::Val( get_anchor2_dyn() ); } if (HX_FIELD_EQ(inName,"set_anchor2") ) { return hx::Val( set_anchor2_dyn() ); } if (HX_FIELD_EQ(inName,"bodyImpulse") ) { return hx::Val( bodyImpulse_dyn() ); } if (HX_FIELD_EQ(inName,"visitBodies") ) { return hx::Val( visitBodies_dyn() ); } break; case 12: if (HX_FIELD_EQ(inName,"zpp_inner_zn") ) { return hx::Val( zpp_inner_zn ); } if (HX_FIELD_EQ(inName,"get_jointMin") ) { return hx::Val( get_jointMin_dyn() ); } if (HX_FIELD_EQ(inName,"set_jointMin") ) { return hx::Val( set_jointMin_dyn() ); } if (HX_FIELD_EQ(inName,"get_jointMax") ) { return hx::Val( get_jointMax_dyn() ); } if (HX_FIELD_EQ(inName,"set_jointMax") ) { return hx::Val( set_jointMax_dyn() ); } } return super::__Field(inName,inCallProp); } hx::Val DistanceJoint_obj::__SetField(const ::String &inName,const hx::Val &inValue,hx::PropertyAccess inCallProp) { switch(inName.length) { case 5: if (HX_FIELD_EQ(inName,"body1") ) { if (inCallProp == hx::paccAlways) return hx::Val( set_body1(inValue.Cast< ::nape::phys::Body >()) ); } if (HX_FIELD_EQ(inName,"body2") ) { if (inCallProp == hx::paccAlways) return hx::Val( set_body2(inValue.Cast< ::nape::phys::Body >()) ); } break; case 7: if (HX_FIELD_EQ(inName,"anchor1") ) { if (inCallProp == hx::paccAlways) return hx::Val( set_anchor1(inValue.Cast< ::nape::geom::Vec2 >()) ); } if (HX_FIELD_EQ(inName,"anchor2") ) { if (inCallProp == hx::paccAlways) return hx::Val( set_anchor2(inValue.Cast< ::nape::geom::Vec2 >()) ); } break; case 8: if (HX_FIELD_EQ(inName,"jointMin") ) { if (inCallProp == hx::paccAlways) return hx::Val( set_jointMin(inValue.Cast< Float >()) ); } if (HX_FIELD_EQ(inName,"jointMax") ) { if (inCallProp == hx::paccAlways) return hx::Val( set_jointMax(inValue.Cast< Float >()) ); } break; case 12: if (HX_FIELD_EQ(inName,"zpp_inner_zn") ) { zpp_inner_zn=inValue.Cast< ::zpp_nape::constraint::ZPP_DistanceJoint >(); return inValue; } } return super::__SetField(inName,inValue,inCallProp); } void DistanceJoint_obj::__GetFields(Array< ::String> &outFields) { outFields->push(HX_("zpp_inner_zn",22,84,fa,e0)); outFields->push(HX_("body1",4f,d3,ef,b6)); outFields->push(HX_("body2",50,d3,ef,b6)); outFields->push(HX_("anchor1",1c,ec,a1,02)); outFields->push(HX_("anchor2",1d,ec,a1,02)); outFields->push(HX_("jointMin",68,fa,25,55)); outFields->push(HX_("jointMax",7a,f3,25,55)); super::__GetFields(outFields); }; #ifdef HXCPP_SCRIPTABLE static hx::StorageInfo DistanceJoint_obj_sMemberStorageInfo[] = { {hx::fsObject /* ::zpp_nape::constraint::ZPP_DistanceJoint */ ,(int)offsetof(DistanceJoint_obj,zpp_inner_zn),HX_("zpp_inner_zn",22,84,fa,e0)}, { hx::fsUnknown, 0, null()} }; static hx::StaticInfo *DistanceJoint_obj_sStaticStorageInfo = 0; #endif static ::String DistanceJoint_obj_sMemberFields[] = { HX_("zpp_inner_zn",22,84,fa,e0), HX_("get_body1",a6,2f,99,fa), HX_("set_body1",b2,1b,ea,dd), HX_("get_body2",a7,2f,99,fa), HX_("set_body2",b3,1b,ea,dd), HX_("get_anchor1",33,4c,9c,88), HX_("set_anchor1",3f,53,09,93), HX_("get_anchor2",34,4c,9c,88), HX_("set_anchor2",40,53,09,93), HX_("get_jointMin",71,ae,3f,0a), HX_("set_jointMin",e5,d1,38,1f), HX_("get_jointMax",83,a7,3f,0a), HX_("set_jointMax",f7,ca,38,1f), HX_("isSlack",06,56,47,1b), HX_("impulse",b5,50,bd,6d), HX_("bodyImpulse",33,76,a2,5f), HX_("visitBodies",ab,f3,5e,e4), ::String(null()) }; hx::Class DistanceJoint_obj::__mClass; void DistanceJoint_obj::__register() { DistanceJoint_obj _hx_dummy; DistanceJoint_obj::_hx_vtable = *(void **)&_hx_dummy; hx::Static(__mClass) = new hx::Class_obj(); __mClass->mName = HX_("nape.constraint.DistanceJoint",2a,a2,ce,9f); __mClass->mSuper = &super::__SGetClass(); __mClass->mConstructEmpty = &__CreateEmpty; __mClass->mConstructArgs = &__Create; __mClass->mGetStaticField = &hx::Class_obj::GetNoStaticField; __mClass->mSetStaticField = &hx::Class_obj::SetNoStaticField; __mClass->mStatics = hx::Class_obj::dupFunctions(0 /* sStaticFields */); __mClass->mMembers = hx::Class_obj::dupFunctions(DistanceJoint_obj_sMemberFields); __mClass->mCanCast = hx::TCanCast< DistanceJoint_obj >; #ifdef HXCPP_SCRIPTABLE __mClass->mMemberStorageInfo = DistanceJoint_obj_sMemberStorageInfo; #endif #ifdef HXCPP_SCRIPTABLE __mClass->mStaticStorageInfo = DistanceJoint_obj_sStaticStorageInfo; #endif hx::_hx_RegisterClass(__mClass->mName, __mClass); } } // end namespace nape } // end namespace constraint
;* ;* RMT FEATures definitions ;* ;* For optimizations of RMT player routine to concrete RMT modul only! ;* --------BEGIN-------- FEAT_SFX equ 0 ;* 0 => No SFX support, 1 => SFX support FEAT_GLOBALVOLUMEFADE equ 0 ;* 0 => No RMTGLOBALVOLUMEFADE support, 1=> RMTGLOBALVOLUMEFADE support (+7 bytes) FEAT_NOSTARTINGSONGLINE equ 0 ;* 0 => Init with starting songline, 1=> no starting songline (start from songline 0 always), cca 22 or 24 bytes FEAT_INSTRSPEED equ 0 ;* cca 21 or 5 bytes FEAT_CONSTANTSPEED equ 0 ;* cca 28 bytes ;* VARIOUS COMMANDS FEAT_COMMAND1 equ 1 ;* cca 8 bytes FEAT_COMMAND2 equ 1 ;* cca 20 bytes (+save 1 address in zero page) and quicker whole RMT routine FEAT_COMMAND3 equ 1 ;* cca 12 bytes FEAT_COMMAND4 equ 1 ;* cca 15 bytes FEAT_COMMAND5 equ 1 ;* cca 67 bytes FEAT_COMMAND6 equ 1 ;* cca 15 bytes ;* COMMAND7 SETNOTE (i.e. command 7 with parameter != $80) FEAT_COMMAND7SETNOTE equ 1 ;* cca 12 bytes ;* COMMAND7 VOLUMEONLY (i.e. command 7 with parameter == $80) FEAT_COMMAND7VOLUMEONLY equ 1 ;* cca 74 bytes ;* PORTAMENTO FEAT_PORTAMENTO equ 1 ;* cca 138 bytes and quicker whole RMT routine ;* FILTER FEAT_FILTER equ 1 ;* cca 179 bytes and quicker whole RMT routine FEAT_FILTERG0L equ 1 ;* (cca 38 bytes for each) FEAT_FILTERG1L equ 1 FEAT_FILTERG0R equ 1 FEAT_FILTERG1R equ 1 ;* BASS16B (i.e. distortion value 6) FEAT_BASS16 equ 1 ;* cca 194 bytes +128bytes freq table and quicker whole RMT routine FEAT_BASS16G1L equ 1 ;* (cca 47 bytes for each) FEAT_BASS16G3L equ 1 FEAT_BASS16G1R equ 1 FEAT_BASS16G3R equ 1 ;* VOLUME ONLY for particular generators FEAT_VOLUMEONLYG0L equ 1 ;* (cca 7 bytes for each) FEAT_VOLUMEONLYG2L equ 1 FEAT_VOLUMEONLYG3L equ 1 FEAT_VOLUMEONLYG0R equ 1 FEAT_VOLUMEONLYG2R equ 1 FEAT_VOLUMEONLYG3R equ 1 ;* TABLE TYPE (i.e. TABLETYPE=1) FEAT_TABLETYPE equ 1 ;* cca 53 bytes and quicker whole RMT routine ;* TABLE MODE (i.e. TABLEMODE=1) FEAT_TABLEMODE equ 1 ;* cca 16 bytes and quicker whole RMT routine ;* TABLE GO (i.e. TGO is nonzero value) FEAT_TABLEGO equ 1 ;* cca 6 bytes and quicker whole RMT routine ;* AUDCTLMANUALSET (i.e. any MANUAL AUDCTL setting is nonzero value) FEAT_AUDCTLMANUALSET equ 1 ;* cca 27 bytes and quicker whole RMT routine ;* VOLUME MINIMUM (i.e. VMIN is nonzero value) FEAT_VOLUMEMIN equ 1 ;* cca 12 bytes and quicker whole RMT routine ;* INSTREUMENT EFFECTS (i.e. VIBRATO or FSHIFT are nonzero values with nonzero DELAY) FEAT_EFFECTVIBRATO equ 1 ;* cca 65 bytes and quicker whole RMT routine FEAT_EFFECTFSHIFT equ 1 ;* cca 11 bytes and quicker whole RMT routine ;* (btw - if no one from this two effect is used, it will save cca 102 bytes) ;* --------END--------
############################################################################### # Copyright 2019 Intel Corporation # All Rights Reserved. # # If this software was obtained under the Intel Simplified Software License, # the following terms apply: # # The source code, information and material ("Material") contained herein is # owned by Intel Corporation or its suppliers or licensors, and title to such # Material remains with Intel Corporation or its suppliers or licensors. The # Material contains proprietary information of Intel or its suppliers and # licensors. The Material is protected by worldwide copyright laws and treaty # provisions. No part of the Material may be used, copied, reproduced, # modified, published, uploaded, posted, transmitted, distributed or disclosed # in any way without Intel's prior express written permission. No license under # any patent, copyright or other intellectual property rights in the Material # is granted to or conferred upon you, either expressly, by implication, # inducement, estoppel or otherwise. Any license under such intellectual # property rights must be express and approved by Intel in writing. # # Unless otherwise agreed by Intel in writing, you may not remove or alter this # notice or any other notice embedded in Materials by Intel or Intel's # suppliers or licensors in any way. # # # If this software was obtained under the Apache License, Version 2.0 (the # "License"), the following terms apply: # # You may not use this file except in compliance with the License. You may # obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 # # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### .text .p2align 4, 0x90 .globl _EncryptCFB_RIJ128_AES_NI _EncryptCFB_RIJ128_AES_NI: push %ebp mov %esp, %ebp push %ebx push %esi push %edi sub $(144), %esp movl (32)(%ebp), %eax movdqu (%eax), %xmm4 movdqu %xmm4, (%esp) .Lblks_loopgas_1: movl (8)(%ebp), %esi movl (28)(%ebp), %edx lea (,%edx,4), %ebx movl (24)(%ebp), %edx cmp %ebx, %edx cmovl %edx, %ebx xor %ecx, %ecx .L__0000gas_1: movb (%esi,%ecx), %dl movb %dl, (80)(%esp,%ecx) add $(1), %ecx cmp %ebx, %ecx jl .L__0000gas_1 movl (20)(%ebp), %ecx movl (16)(%ebp), %edx lea (,%edx,4), %eax lea (-144)(%ecx,%eax,4), %eax xor %esi, %esi mov %ebx, %edi .Lsingle_blkgas_1: movdqu (%esp,%esi), %xmm0 pxor (%ecx), %xmm0 cmp $(12), %edx jl .Lkey_128_sgas_1 jz .Lkey_192_sgas_1 .Lkey_256_sgas_1: aesenc (-64)(%eax), %xmm0 aesenc (-48)(%eax), %xmm0 .Lkey_192_sgas_1: aesenc (-32)(%eax), %xmm0 aesenc (-16)(%eax), %xmm0 .Lkey_128_sgas_1: aesenc (%eax), %xmm0 aesenc (16)(%eax), %xmm0 aesenc (32)(%eax), %xmm0 aesenc (48)(%eax), %xmm0 aesenc (64)(%eax), %xmm0 aesenc (80)(%eax), %xmm0 aesenc (96)(%eax), %xmm0 aesenc (112)(%eax), %xmm0 aesenc (128)(%eax), %xmm0 aesenclast (144)(%eax), %xmm0 movdqu (80)(%esp,%esi), %xmm1 pxor %xmm1, %xmm0 movdqu %xmm0, (16)(%esp,%esi) addl (28)(%ebp), %esi subl (28)(%ebp), %edi jg .Lsingle_blkgas_1 movl (12)(%ebp), %edi xor %ecx, %ecx .L__0001gas_1: movb (16)(%esp,%ecx), %dl movb %dl, (%edi,%ecx) add $(1), %ecx cmp %ebx, %ecx jl .L__0001gas_1 movdqu (%esp,%ebx), %xmm0 movdqu %xmm0, (%esp) addl %ebx, (8)(%ebp) addl %ebx, (12)(%ebp) subl %ebx, (24)(%ebp) jg .Lblks_loopgas_1 add $(144), %esp pop %edi pop %esi pop %ebx pop %ebp ret .p2align 4, 0x90 .globl _EncryptCFB32_RIJ128_AES_NI _EncryptCFB32_RIJ128_AES_NI: push %ebp mov %esp, %ebp push %ebx push %esi push %edi sub $(144), %esp movl (32)(%ebp), %eax movdqu (%eax), %xmm4 movdqu %xmm4, (%esp) .Lblks_loopgas_2: movl (8)(%ebp), %esi movl (28)(%ebp), %edx lea (,%edx,4), %ebx movl (24)(%ebp), %edx cmp %ebx, %edx cmovl %edx, %ebx xor %ecx, %ecx .L__0002gas_2: movl (%esi,%ecx), %edx movl %edx, (80)(%esp,%ecx) add $(4), %ecx cmp %ebx, %ecx jl .L__0002gas_2 movl (20)(%ebp), %ecx movl (16)(%ebp), %edx lea (,%edx,4), %eax lea (-144)(%ecx,%eax,4), %eax xor %esi, %esi mov %ebx, %edi .Lsingle_blkgas_2: movdqu (%esp,%esi), %xmm0 pxor (%ecx), %xmm0 cmp $(12), %edx jl .Lkey_128_sgas_2 jz .Lkey_192_sgas_2 .Lkey_256_sgas_2: aesenc (-64)(%eax), %xmm0 aesenc (-48)(%eax), %xmm0 .Lkey_192_sgas_2: aesenc (-32)(%eax), %xmm0 aesenc (-16)(%eax), %xmm0 .Lkey_128_sgas_2: aesenc (%eax), %xmm0 aesenc (16)(%eax), %xmm0 aesenc (32)(%eax), %xmm0 aesenc (48)(%eax), %xmm0 aesenc (64)(%eax), %xmm0 aesenc (80)(%eax), %xmm0 aesenc (96)(%eax), %xmm0 aesenc (112)(%eax), %xmm0 aesenc (128)(%eax), %xmm0 aesenclast (144)(%eax), %xmm0 movdqu (80)(%esp,%esi), %xmm1 pxor %xmm1, %xmm0 movdqu %xmm0, (16)(%esp,%esi) addl (28)(%ebp), %esi subl (28)(%ebp), %edi jg .Lsingle_blkgas_2 movl (12)(%ebp), %edi xor %ecx, %ecx .L__0003gas_2: movl (16)(%esp,%ecx), %edx movl %edx, (%edi,%ecx) add $(4), %ecx cmp %ebx, %ecx jl .L__0003gas_2 movdqu (%esp,%ebx), %xmm0 movdqu %xmm0, (%esp) addl %ebx, (8)(%ebp) addl %ebx, (12)(%ebp) subl %ebx, (24)(%ebp) jg .Lblks_loopgas_2 add $(144), %esp pop %edi pop %esi pop %ebx pop %ebp ret .p2align 4, 0x90 .globl _EncryptCFB128_RIJ128_AES_NI _EncryptCFB128_RIJ128_AES_NI: push %ebp mov %esp, %ebp push %ebx push %esi push %edi movl (28)(%ebp), %eax movdqu (%eax), %xmm0 movl (8)(%ebp), %esi movl (12)(%ebp), %edi movl (24)(%ebp), %ebx movl (20)(%ebp), %ecx movl (16)(%ebp), %edx lea (,%edx,4), %eax lea (-144)(%ecx,%eax,4), %eax .Lblks_loopgas_3: pxor (%ecx), %xmm0 movdqu (%esi), %xmm1 cmp $(12), %edx jl .Lkey_128_sgas_3 jz .Lkey_192_sgas_3 .Lkey_256_sgas_3: aesenc (-64)(%eax), %xmm0 aesenc (-48)(%eax), %xmm0 .Lkey_192_sgas_3: aesenc (-32)(%eax), %xmm0 aesenc (-16)(%eax), %xmm0 .Lkey_128_sgas_3: aesenc (%eax), %xmm0 aesenc (16)(%eax), %xmm0 aesenc (32)(%eax), %xmm0 aesenc (48)(%eax), %xmm0 aesenc (64)(%eax), %xmm0 aesenc (80)(%eax), %xmm0 aesenc (96)(%eax), %xmm0 aesenc (112)(%eax), %xmm0 aesenc (128)(%eax), %xmm0 aesenclast (144)(%eax), %xmm0 pxor %xmm1, %xmm0 movdqu %xmm0, (%edi) add $(16), %esi add $(16), %edi sub $(16), %ebx jg .Lblks_loopgas_3 pop %edi pop %esi pop %ebx pop %ebp ret
/* * CLI.asm * * Created: 5/13/2018 3:04:22 PM * Author: ROTP */ CLI_implied: ;UNTESTED swapPCwithTEMPPC CBR SR, INTERRUPT_FLAG ADIW ZH:ZL, 1 RET
; A120784: Numerators of partial sums of Catalan numbers scaled by powers of 1/16. ; Submitted by Christian Krause ; 1,17,137,4389,35119,561925,4495433,287708141,2301665843,36826655919,294613251551,9427624079025,75420992684203,1206735883132973,9653887065398089,1235697544380650237 mul $0,2 mov $1,1 lpb $0 mov $2,$0 sub $0,1 add $3,$1 mul $3,$0 sub $0,1 mul $1,4 add $2,2 mul $1,$2 lpe add $1,$3 gcd $3,$1 div $1,$3 mov $0,$1
global irq0 global irq1 global irq2 global irq3 global irq4 global irq5 global irq6 global irq7 global irq8 global irq9 global irq10 global irq11 global irq12 global irq13 global irq14 global irq15 global default_handler global load_idt ;global irq0_handler ;global irq1_handler ;global irq2_handler ;global irq3_handler ;global irq4_handler ;global irq5_handler ;global irq6_handler ;global irq7_handler ;global irq8_handler ;global irq9_handler ;global irq10_handler ;global irq11_handler ;global irq12_handler ;global irq13_handler ;global irq14_handler ;global irq15_handler extern irq0_handler extern irq1_handler extern irq2_handler extern irq3_handler extern irq4_handler extern irq5_handler extern irq6_handler extern irq7_handler extern irq8_handler extern irq9_handler extern irq10_handler extern irq11_handler extern irq12_handler extern irq13_handler extern irq14_handler extern irq15_handler extern unhandled_interrupt extern exception_page_fault extern temp_tss extern new_temp_tss extern ready_esp extern fxsave_region extern syscall_temp_tss extern run_syscall global switch_task global run_syscall_asm orig_eax dd 0 retaddr dd 0 errcode dd 0 global page_fault page_fault: mov dword [orig_eax],eax pop eax mov dword [errcode],eax mov [ready_esp],esp pop eax mov dword [retaddr],eax push eax mov eax, dword [orig_eax] pusha mov eax, dword [errcode] push eax mov eax, dword [retaddr] push eax call exception_page_fault popa iret switch_task: mov esp,dword [ready_esp] fxsave [fxsave_region] add esp,0xC pop eax mov eax,dword [new_temp_tss+56] ;esp push eax sub esp,0xC pop eax mov eax,dword [new_temp_tss+32] ;eip push eax mov eax,dword [new_temp_tss+36] ;eflags push eax popf mov eax,dword [new_temp_tss+40] mov ebx,dword [new_temp_tss+52] mov ecx,dword [new_temp_tss+44] mov edx,dword [new_temp_tss+48] mov edi,dword [new_temp_tss+68] mov esi,dword [new_temp_tss+64] mov ebp,dword [new_temp_tss+60] fxrstor [fxsave_region] iret run_syscall_asm: mov dword [ready_esp],esp fxsave [fxsave_region] mov dword [syscall_temp_tss+40],eax mov dword [syscall_temp_tss+52],ebx mov dword [syscall_temp_tss+44],ecx mov dword [syscall_temp_tss+48],edx mov dword [syscall_temp_tss+68],edi mov dword [syscall_temp_tss+64],esi mov dword [syscall_temp_tss+60],ebp pushf pop eax mov dword [syscall_temp_tss+36],eax ;eflags pop eax push eax mov dword [syscall_temp_tss+32],eax ;eip add esp,0xC pop eax push eax sub esp,0xC mov dword [syscall_temp_tss+56],eax ;esp mov eax, dword [syscall_temp_tss+40] call run_syscall ;mov esp,dword [ready_esp] ; I have no clue why, but ready_esp can be clobbered. ready_esp should only be used by task switching now. add esp,0xC pop ebx mov ebx,dword [syscall_temp_tss+56] ;esp push ebx sub esp,0xC pop ebx mov ebx,dword [syscall_temp_tss+32] ;eip push ebx mov ebx,dword [syscall_temp_tss+36] ;eflags push ebx popf mov ebx,dword [syscall_temp_tss+52] mov ecx,dword [syscall_temp_tss+44] mov edx,dword [syscall_temp_tss+48] mov edi,dword [syscall_temp_tss+68] mov esi,dword [syscall_temp_tss+64] mov ebp,dword [syscall_temp_tss+60] fxrstor [fxsave_region] iret irq0: mov dword [ready_esp],esp mov dword [temp_tss+40],eax mov dword [temp_tss+52],ebx mov dword [temp_tss+44],ecx mov dword [temp_tss+48],edx mov dword [temp_tss+68],edi mov dword [temp_tss+64],esi mov dword [temp_tss+60],ebp pushf pop eax mov dword [temp_tss+36],eax ;eflags pop eax push eax mov dword [temp_tss+32],eax ;eip add esp,0xC pop eax push eax sub esp,0xC mov dword [temp_tss+56],eax ;esp mov eax, dword [temp_tss+40] pusha call irq0_handler popa iret irq1: pusha call irq1_handler popa iret irq2: pusha call irq2_handler popa iret irq3: pusha call irq3_handler popa iret irq4: pusha call irq4_handler popa iret irq5: pusha call irq5_handler popa iret irq6: pusha call irq6_handler popa iret irq7: pusha call irq7_handler popa iret irq8: pusha call irq8_handler popa iret irq9: pusha call irq9_handler popa iret irq10: pusha call irq10_handler popa iret irq11: pusha call irq11_handler popa iret irq12: pusha call irq12_handler popa iret irq13: pusha call irq13_handler popa iret irq14: pusha call irq14_handler popa iret irq15: pusha call irq15_handler popa iret default_handler: pusha call unhandled_interrupt popa iret load_idt: mov edx, [esp + 4] lidt [edx] sti ret global test_int test_int: xor eax, eax int 0x80 ret extern last_stack extern last_entrypoint ; Load all the segment registers with the usermode data selector ; Then push the stack segment and the stack pointer (we need to change this) ; Then modify the flags so they enable interrupts on iret ; Push the code selector on the stack ; Push the entrypoint of the program in memory, then iret to enter usermode global enter_usermode enter_usermode: cli mov ax,0x23 mov ax, ds mov ax, es mov ax, fs mov ax, gs push 0x23 mov eax,[last_stack] push eax pushf pop eax or eax,0x200 push eax push 0x1B mov eax,[last_entrypoint] push eax mov eax,0 mov ebx,0 mov ecx,0xBFFFE000 mov edx,0xBFFFF000 mov esi,0 mov edi,0 mov ebp,0 iret ; Exit usermode global exit_usermode exit_usermode: cli mov ax,0x10 mov ax, ds mov ax, es mov ax, fs mov ax, gs push 0x10 mov eax,[last_stack] push eax pushf pop eax mov eax,0x200 push eax push 0x8 mov eax,[last_entrypoint] push eax iret ; The following was modified from Omarrx024's VESA tutorial on the OSDev Wiki ; (https://wiki.osdev.org/User:Omarrx024/VESA_Tutorial) ; This code is used under CC0 1.0 (see https://wiki.osdev.org/OSDev_Wiki:Copyrights for details) ; VESA32 function: ; Switch to realmode, change resolution, and return to protected mode. ; ; Inputs: ; ch - Function (0=change resolution, 1=Get resolution of available mode #ax) ; mode 0: ; ax - Resolution width ; bx - Resolution height ; cl - Bit depth (bpp) ; mode 1: ; ax - mode number ; ; Outputs: ; mode 0: ; al - Error code ; 0 = success ; 1 = mode not found ; 2 = BIOS error ; ebx - Framebuffer address (physical) ; mode 1: ; ax - Width ; bx - Height ; cl - BPP ; ; Note: you will most likely have to reload the PIT ; Macros to make it easier to access data and code copied to 0x7C00 %define INT32_LENGTH (_int32_end-_int32) %define FIXADDR(addr) (((addr)-_int32)+0x7C00) ; Macros for the storevars at 0x7C00 %define sv_width FIXADDR(storevars.width) %define sv_height FIXADDR(storevars.height) %define sv_bpp FIXADDR(storevars.bpp) %define sv_func FIXADDR(storevars.func) %define sv_segment FIXADDR(storevars.segment) %define sv_offset FIXADDR(storevars.offset) %define sv_mode FIXADDR(storevars.mode) global vesa32 vesa32: cli ; Store registers so we can use them mov [storevars.width],ax mov [storevars.height],bx mov [storevars.bpp],cl mov [storevars.func],ch ; Copy the _int32 function (et al) to 0x7C00 (below 1MiB) mov esi,_int32 mov edi,0x7C00 mov ecx,INT32_LENGTH cld rep movsb ; Relocate the stored variables to where the rest of the data is mov ax,[storevars.width] mov [sv_width],ax mov ax,[storevars.height] mov [sv_height],ax mov al,[storevars.bpp] mov [sv_bpp],al ; Jump to code under 1MiB so we can run in 16 bit mode jmp 0x00007C00 [BITS 32] _int32: ; Store any remaining registers so we don't mess anything up in C mov [store32.edx],edx mov [store32.esi],esi mov [store32.edi],edi mov [store32.esp],esp mov [store32.ebp],ebp ; Store the cr3 in case the BIOS messes it up mov eax,cr3 mov [store32.cr3],eax ; Disable paging mov eax,cr0 and eax,0x7FFFFFFF mov cr0,eax ; Store existing GDTs and IDTs and load temporary ones sgdt [FIXADDR(gdt32)] sidt [FIXADDR(idt32)] lgdt [FIXADDR(gdt16)] lidt [FIXADDR(idt16)] ; Switch to 16 bit protected mode jmp word 0x08:FIXADDR(_intp16) [BITS 16] _intp16: ; Load all the segment registers with the data segment mov ax,0x10 mov ds,ax mov es,ax mov fs,ax mov gs,ax mov ss,ax ; Disable protected mode mov eax,cr0 and al, 0xFE mov cr0,eax ; Jump to realmode jmp word 0x0000:FIXADDR(_intr16) _intr16: ; Load all the data segments with 0 mov ax,0 mov ss,ax mov ds,ax mov es,ax mov fs,ax mov gs,ax ; Set a temporary stack mov sp,0x7B00 ; Get a list of modes push es mov ax,0x4F00 mov di,FIXADDR(vbe_info) int 0x10 pop es ; Check for error cmp ax, 0x4F jne .error ; Set up the registers with the segment:offset of the modes mov ax, word[FIXADDR(vbe_info.vmodeoff)] mov [sv_offset],ax mov ax, word[FIXADDR(vbe_info.vmodeseg)] mov [sv_segment],ax mov ax, [sv_segment] mov fs,ax mov si, [sv_offset] mov al,[sv_func] cmp al,1 je .getmode cmp al,0 jne .error2 .find_mode: ; Increment the mode mov dx,[fs:si] add si,2 mov [sv_offset],si mov [sv_mode], dx mov ax,0 mov fs,ax ; Make sure we haven't run out of modes cmp word[sv_mode],0xFFFF je .error2 ; List the values for the selected mode push es mov ax,0x4f01 mov cx,[sv_mode] mov di, FIXADDR(vbe_screen) int 0x10 pop es ; Check for error cmp ax, 0x4F jne .error ; Check width mov ax, [sv_width] cmp ax, [FIXADDR(vbe_screen.width)] jne .next_mode ; Check height mov ax, [sv_height] cmp ax, [FIXADDR(vbe_screen.height)] jne .next_mode ; Check bpp mov al, [sv_bpp] cmp al, [FIXADDR(vbe_screen.bpp)] jne .next_mode ; We've found our mode. Now switch to it push es mov ax, 0x4F02 mov bx, [sv_mode] or bx, 0x4000 mov di,0 int 0x10 pop es ; Check for any errors cmp ax, 0x4F jne .error ; Set up return values mov ax,0 mov ebx,[FIXADDR(vbe_screen.buffer)] ; Start the transition back to protected mode jmp .returnpm ; Any BIOS errors use this function .error: mov ax,2 jmp .returnpm ; This error is only for if the requested mode could not be found .error2: mov ax,1 jmp .returnpm ; Get the address for the next mode .next_mode: mov ax, [sv_segment] mov fs,ax mov si, [sv_offset] jmp .find_mode ; Get the values for mode stored in ax at start .getmode: mov ax, [sv_width] add ax,ax add si,ax mov dx, [fs:si] mov [sv_mode],dx mov ax,0 mov fs,ax cmp word [sv_mode],0xFFFF je .error2 push es mov ax,0x4f01 mov cx,[sv_mode] mov di, FIXADDR(vbe_screen) int 0x10 pop es cmp ax,0x4F jne .error mov ax,[FIXADDR(vbe_screen.width)] mov [FIXADDR(storevars.width)],ax mov ax,[FIXADDR(vbe_screen.height)] mov [FIXADDR(storevars.height)],ax mov al,[FIXADDR(vbe_screen.bpp)] mov [FIXADDR(storevars.bpp)],al mov ax,0 ; Return to protected mode! .returnpm: ; Store the return values mov [FIXADDR(storevars.error)],ax mov [FIXADDR(storevars.buffer)],ebx ; Turn on protected mode (this is same as "or cr0,1") mov eax,cr0 inc eax mov cr0,eax ; Load 32 bit GDT lgdt [FIXADDR(gdt32)] ; Jump to 32 bit protected mode jmp 0x08:FIXADDR(returnpm32) [BITS 32] ; We're back in 32 bit protected mode land! returnpm32: ; Load all the data segments mov ax,0x10 mov ss,ax mov ds,ax mov es,ax mov fs,ax mov gs,ax ; Use the protected mode IDT lidt [FIXADDR(idt32)] ; Re-enable paging mov eax,cr0 or eax,0x80000000 mov cr0,eax ; Restore cr3 mov eax,[store32.cr3] mov cr3,eax ; Reload GDT with paging enabled (otherwise we will triple fault on sti) lgdt [FIXADDR(gdt32)] ; Restore PIC (see idt.c for values) mov al,0x11 out 0x20,al out 0xA0,al mov al,0x20 out 0x21,al mov al,40 out 0xA1,al mov al,4 out 0x21,al sub al,2 out 0xA1,al dec al out 0x21,al out 0xA1,al xor al,al out 0x21,al out 0xA1,al mov al,[sv_func] cmp al,1 je .mode1 mov eax,[FIXADDR(storevars.error)] mov ebx,[FIXADDR(storevars.buffer)] jmp .restore .mode1: mov ax,[FIXADDR(storevars.width)] mov bx,[FIXADDR(storevars.height)] mov cl,[FIXADDR(storevars.bpp)] mov ch,[FIXADDR(storevars.error)] .restore: ; Restore all registers except output registers mov edx,[store32.edx] mov esi,[store32.esi] mov edi,[store32.edi] mov esp,[store32.esp] mov ebp,[store32.ebp] ; Re-enable interrupts sti ; Finally, return to the callee ret gdt32: dw 0 dd 0 idt32: dw 0 dd 0 idt16: dw 0x03FF dd 0 gdt16_struct: dq 0 dw 0xFFFF dw 0 db 0 db 10011010b db 10001111b db 0 dw 0xFFFF dw 0 db 0 db 10010010b db 10001111b db 0 gdt16: dw gdt16 - gdt16_struct - 1 dd FIXADDR(gdt16_struct) storevars: .width dw 0 .height dw 0 .bpp db 0 .func db 0 .segment dw 0 .offset dw 0 .mode dw 0 .buffer dd 0 .error db 0 vbe_screen: .attr dw 0 .unused0 db 0 .unused1 db 0 .unused2 dw 0 .unused3 dw 0 .unused4 dw 0 .unused5 dw 0 .unused7 dd 0 .pitch dw 0 .width dw 0 .height dw 0 .unused8 db 0 .unused9 db 0 .unusedA db 0 .bpp db 0 .unusedB db 0 .unusedC db 0 .unusedD db 0 .unusedE db 0 .reserved0 db 0 .redmask db 0 .redpos db 0 .greenmask db 0 .greenpos db 0 .bluemask db 0 .bluepos db 0 .rmask db 0 .rpos db 0 .cattrs db 0 .buffer dd 0 .sm_off dd 0 .sm_size dw 0 .table times 206 db 0 vbe_info: .signature db "VBE2" .version dw 0 .oem dd 0 .cap dd 0 .vmodeoff dw 0 .vmodeseg dw 0 .vmem dw 0 .softrev dw 0 .vendor dd 0 .pname dd 0 .prev dd 0 .reserved times 222 db 0 .oemdata times 256 db 0 _int32_end: store32: .ecx dd 0 .edx dd 0 .esi dd 0 .edi dd 0 .esp dd 0 .ebp dd 0 .cr3 dd 0
;Write an 8051 ASM program to perform division on 8-bit numbers present in data memory address location 33H & 34H and ;store the result in 35H (Reminder) & 36H (Quotient). ORG 0000H MOV A,33H MOV B,34H DIV AB MOV 35H,B MOV 36H,A END ;Deeptimaan Banerjee
// // Copyright © 2020 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #include "TransposeLayer.hpp" #include "LayerCloneBase.hpp" #include <armnn/TypesUtils.hpp> #include <armnnUtils/Transpose.hpp> #include <backendsCommon/WorkloadData.hpp> #include <backendsCommon/WorkloadFactory.hpp> namespace armnn { TransposeLayer::TransposeLayer(const TransposeDescriptor& param, const char* name) : LayerWithParameters(1, 1, LayerType::Transpose, param, name) { } std::unique_ptr<IWorkload> TransposeLayer::CreateWorkload(const IWorkloadFactory& factory) const { TransposeQueueDescriptor descriptor; SetAdditionalInfo(descriptor); return factory.CreateTranspose(descriptor, PrepInfoAndDesc(descriptor)); } TransposeLayer* TransposeLayer::Clone(Graph& graph) const { return CloneBase<TransposeLayer>(graph, m_Param, GetName()); } std::vector<TensorShape> TransposeLayer::InferOutputShapes(const std::vector<TensorShape>& inputShapes) const { ARMNN_ASSERT(inputShapes.size() == 1); const TensorShape& inShape = inputShapes[0]; return std::vector<TensorShape> ({armnnUtils::TransposeTensorShape(inShape, m_Param.m_DimMappings)}); } void TransposeLayer::ValidateTensorShapesFromInputs() { VerifyLayerConnections(1, CHECK_LOCATION()); const TensorShape& outputShape = GetOutputSlot(0).GetTensorInfo().GetShape(); VerifyShapeInferenceType(outputShape, m_ShapeInferenceMethod); auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape() }); ARMNN_ASSERT(inferredShapes.size() == 1); ValidateAndCopyShape(outputShape, inferredShapes[0], m_ShapeInferenceMethod, "TransposeLayer"); } ARMNN_NO_DEPRECATE_WARN_BEGIN void TransposeLayer::Accept(ILayerVisitor& visitor) const { visitor.VisitTransposeLayer(this, GetParameters(), GetName()); } ARMNN_NO_DEPRECATE_WARN_END } // namespace armnn
// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "exegesis/llvm/inline_asm.h" #include "absl/status/status.h" #include "exegesis/llvm/llvm_utils.h" #include "exegesis/testing/test_util.h" #include "exegesis/util/strings.h" #include "glog/logging.h" #include "gmock/gmock.h" #include "gtest/gtest.h" namespace exegesis { namespace { using ::exegesis::testing::StatusIs; using ::testing::HasSubstr; constexpr const char kGenericMcpu[] = "generic"; TEST(JitCompilerTest, CreateAFunctionWithoutLoop) { constexpr char kExpectedIR[] = "define void @inline_assembly_0() {\n" "entry:\n" " call void asm \"mov %ebx, %ecx\", \"~{ebx},~{ecx}\"()\n" " ret void\n" "}\n"; constexpr char kAssemblyCode[] = "mov %ebx, %ecx"; constexpr char kConstraints[] = "~{ebx},~{ecx}"; JitCompiler jit(kGenericMcpu); llvm::InlineAsm* const inline_asm = jit.AssembleInlineNativeCode( false, kAssemblyCode, kConstraints, llvm::InlineAsm::AD_ATT); ASSERT_NE(nullptr, inline_asm); const auto function = jit.WrapInlineAsmInLoopingFunction(1, nullptr, inline_asm, nullptr); ASSERT_OK(function); const std::string function_ir = DumpIRToString(function.value()); EXPECT_EQ(kExpectedIR, function_ir); } TEST(JitCompilerTest, CreateAFunctionWithoutLoopWithInitBlock) { constexpr char kExpectedIR[] = "define void @inline_assembly_0() {\n" "entry:\n" " call void asm \"mov %ebx, 0x1234\", \"~{ebx}\"()\n" " call void asm \"mov %ecx, %ebx\", \"~{ebx},~{ecx}\"()\n" " call void asm \"mov %edx, 0x5678\", \"~{edx}\"()\n" " ret void\n" "}\n"; constexpr char kInitAssemblyCode[] = "mov %ebx, 0x1234"; constexpr char kInitConstraints[] = "~{ebx}"; constexpr char kLoopAssemblyCode[] = "mov %ecx, %ebx"; constexpr char kLoopConstraints[] = "~{ebx},~{ecx}"; constexpr char kCleanupAssemblyCode[] = "mov %edx, 0x5678"; constexpr char kCleanupConstraints[] = "~{edx}"; JitCompiler jit(kGenericMcpu); llvm::InlineAsm* const init_inline_asm = jit.AssembleInlineNativeCode( false, kInitAssemblyCode, kInitConstraints, llvm::InlineAsm::AD_ATT); ASSERT_NE(init_inline_asm, nullptr); llvm::InlineAsm* const loop_inline_asm = jit.AssembleInlineNativeCode( false, kLoopAssemblyCode, kLoopConstraints, llvm::InlineAsm::AD_ATT); ASSERT_NE(loop_inline_asm, nullptr); llvm::InlineAsm* const cleanup_inline_asm = jit.AssembleInlineNativeCode( false, kCleanupAssemblyCode, kCleanupConstraints, llvm::InlineAsm::AD_ATT); ASSERT_NE(cleanup_inline_asm, nullptr); const auto function = jit.WrapInlineAsmInLoopingFunction( 1, init_inline_asm, loop_inline_asm, cleanup_inline_asm); ASSERT_OK(function); const std::string function_ir = DumpIRToString(function.value()); EXPECT_EQ(kExpectedIR, function_ir); } TEST(JitCompilerTest, CreateAFunctionWithLoop) { constexpr char kExpectedIR[] = "define void @inline_assembly_0() {\n" "entry:\n" " br label %loop\n" "\n" "loop: ; preds = %loop, " "%entry\n" " %counter = phi i32 [ 10, %entry ], [ %new_counter, %loop ]\n" " call void asm \"mov %ebx, %ecx\", \"~{ebx},~{ecx}\"()\n" " %new_counter = sub i32 %counter, 1\n" " %0 = icmp sgt i32 %new_counter, 0\n" " br i1 %0, label %loop, label %loop_end\n" "\n" "loop_end: ; preds = %loop\n" " ret void\n" "}\n"; constexpr char kAssemblyCode[] = "mov %ebx, %ecx"; constexpr char kConstraints[] = "~{ebx},~{ecx}"; JitCompiler jit(kGenericMcpu); llvm::InlineAsm* const inline_asm = jit.AssembleInlineNativeCode( false, kAssemblyCode, kConstraints, llvm::InlineAsm::AD_ATT); ASSERT_NE(nullptr, inline_asm); const auto function = jit.WrapInlineAsmInLoopingFunction(10, nullptr, inline_asm, nullptr); ASSERT_OK(function); const std::string function_ir = DumpIRToString(function.value()); EXPECT_EQ(kExpectedIR, function_ir); } TEST(JitCompilerTest, CreateAFunctionAndRunItInJIT) { constexpr char kAssemblyCode[] = R"( .rept 2 mov %ebx, %eax .endr)"; constexpr char kConstraints[] = "~{ebx},~{eax}"; JitCompiler jit(kGenericMcpu); const auto function = jit.CompileInlineAssemblyToFunction( 10, kAssemblyCode, kConstraints, llvm::InlineAsm::AD_ATT); ASSERT_OK(function); // We need to encode at least two two movs (two times 0x89d8). const std::string kTwoMovsEncoding = "\x89\xd8\x89\xd8"; EXPECT_GE(function.value().size, kTwoMovsEncoding.size()); const std::string compiled_function( reinterpret_cast<const char*>(function.value().ptr), function.value().size); LOG(INFO) << "Compiled function: " << ToHumanReadableHexString(compiled_function); EXPECT_THAT(compiled_function, HasSubstr(kTwoMovsEncoding)); LOG(INFO) << "Calling the function at " << function.value().ptr; function.value().CallOrDie(); LOG(INFO) << "Function called"; } TEST(JitCompilerTest, UnknownReferencedSymbols) { JitCompiler jit(kGenericMcpu); const auto function = jit.CompileInlineAssemblyToFunction( 2, R"(mov ebx, unknown_symbol)", "", llvm::InlineAsm::AD_Intel); ASSERT_THAT( function.status(), StatusIs( absl::StatusCode::kInvalidArgument, "The following unknown symbols are referenced: 'unknown_symbol'")); } } // namespace } // namespace exegesis
;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php. ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; Module Name: ; ; CpuId.Asm ; ; Abstract: ; ; AsmCpuid function ; ; Notes: ; ;------------------------------------------------------------------------------ SECTION .text ;------------------------------------------------------------------------------ ; UINT64 ; EFIAPI ; InternalMathSwapBytes64 ( ; IN UINT64 Operand ; ); ;------------------------------------------------------------------------------ global ASM_PFX(InternalMathSwapBytes64) ASM_PFX(InternalMathSwapBytes64): mov eax, [esp + 8] ; eax <- upper 32 bits mov edx, [esp + 4] ; edx <- lower 32 bits bswap eax bswap edx ret
; ; Sharp OZ family functions ; ; ported from the OZ-7xx SDK by by Alexander R. Pruss ; by Stefano Bodrato - Oct. 2003 ; ; ; void ozquiet() ; ; ------ ; $Id: ozquiet.asm,v 1.2 2015/01/19 01:33:02 pauloscustodio Exp $ ; PUBLIC ozquiet EXTERN ozclick EXTERN ozclick_setting ozquiet: xor a out (16h),a ; turn off note ld a,(ozclick_setting) or a ret z ld hl,1 push hl call ozclick pop hl ret
/* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2001 Dirk Mueller (mueller@kde.org) * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. * (C) 2006 Alexey Proskuryakov (ap@nypop.com) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #include "config.h" #include "core/html/FormAssociatedElement.h" #include "core/HTMLNames.h" #include "core/dom/IdTargetObserver.h" #include "core/dom/NodeTraversal.h" #include "core/html/HTMLFormControlElement.h" #include "core/html/HTMLFormElement.h" #include "core/html/HTMLLabelElement.h" #include "core/html/HTMLObjectElement.h" #include "core/html/ValidityState.h" namespace blink { using namespace HTMLNames; class FormAttributeTargetObserver : public IdTargetObserver { WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(FormAttributeTargetObserver); public: static PassOwnPtrWillBeRawPtr<FormAttributeTargetObserver> create(const AtomicString& id, FormAssociatedElement*); DECLARE_VIRTUAL_TRACE(); void idTargetChanged() override; private: FormAttributeTargetObserver(const AtomicString& id, FormAssociatedElement*); RawPtrWillBeMember<FormAssociatedElement> m_element; }; FormAssociatedElement::FormAssociatedElement() : m_formWasSetByParser(false) { } FormAssociatedElement::~FormAssociatedElement() { // We can't call setForm here because it contains virtual calls. } DEFINE_TRACE(FormAssociatedElement) { visitor->trace(m_formAttributeTargetObserver); visitor->trace(m_form); visitor->trace(m_validityState); } ValidityState* FormAssociatedElement::validity() { if (!m_validityState) m_validityState = ValidityState::create(this); return m_validityState.get(); } void FormAssociatedElement::didMoveToNewDocument(Document& oldDocument) { HTMLElement* element = toHTMLElement(this); if (element->fastHasAttribute(formAttr)) setFormAttributeTargetObserver(nullptr); } void FormAssociatedElement::insertedInto(ContainerNode* insertionPoint) { if (!m_formWasSetByParser || !m_form || NodeTraversal::highestAncestorOrSelf(*insertionPoint) != NodeTraversal::highestAncestorOrSelf(*m_form.get())) resetFormOwner(); if (!insertionPoint->inDocument()) return; HTMLElement* element = toHTMLElement(this); if (element->fastHasAttribute(formAttr)) resetFormAttributeTargetObserver(); } void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint) { HTMLElement* element = toHTMLElement(this); if (insertionPoint->inDocument() && element->fastHasAttribute(formAttr)) { setFormAttributeTargetObserver(nullptr); resetFormOwner(); return; } // If the form and element are both in the same tree, preserve the connection to the form. // Otherwise, null out our form and remove ourselves from the form's list of elements. if (m_form && NodeTraversal::highestAncestorOrSelf(*element) != NodeTraversal::highestAncestorOrSelf(*m_form.get())) resetFormOwner(); } HTMLFormElement* FormAssociatedElement::findAssociatedForm(const HTMLElement* element) { const AtomicString& formId(element->fastGetAttribute(formAttr)); // 3. If the element is reassociateable, has a form content attribute, and // is itself in a Document, then run these substeps: if (!formId.isNull() && element->inDocument()) { // 3.1. If the first element in the Document to have an ID that is // case-sensitively equal to the element's form content attribute's // value is a form element, then associate the form-associated element // with that form element. // 3.2. Abort the "reset the form owner" steps. Element* newFormCandidate = element->treeScope().getElementById(formId); return isHTMLFormElement(newFormCandidate) ? toHTMLFormElement(newFormCandidate) : 0; } // 4. Otherwise, if the form-associated element in question has an ancestor // form element, then associate the form-associated element with the nearest // such ancestor form element. return element->findFormAncestor(); } void FormAssociatedElement::formRemovedFromTree(const Node& formRoot) { ASSERT(m_form); if (NodeTraversal::highestAncestorOrSelf(toHTMLElement(*this)) == formRoot) return; resetFormOwner(); } void FormAssociatedElement::associateByParser(HTMLFormElement* form) { if (form && form->inDocument()) { m_formWasSetByParser = true; setForm(form); form->didAssociateByParser(); } } void FormAssociatedElement::setForm(HTMLFormElement* newForm) { if (m_form.get() == newForm) return; willChangeForm(); if (m_form) m_form->disassociate(*this); if (newForm) { #if ENABLE(OILPAN) m_form = newForm; #else m_form = newForm->createWeakPtr(); #endif m_form->associate(*this); } else { #if ENABLE(OILPAN) m_form = nullptr; #else m_form = WeakPtr<HTMLFormElement>(); #endif } didChangeForm(); } void FormAssociatedElement::willChangeForm() { } void FormAssociatedElement::didChangeForm() { if (!m_formWasSetByParser && m_form && m_form->inDocument()) { HTMLElement* element = toHTMLElement(this); element->document().didAssociateFormControl(element); } } void FormAssociatedElement::resetFormOwner() { m_formWasSetByParser = false; HTMLElement* element = toHTMLElement(this); const AtomicString& formId(element->fastGetAttribute(formAttr)); HTMLFormElement* nearestForm = element->findFormAncestor(); // 1. If the element's form owner is not null, and either the element is not // reassociateable or its form content attribute is not present, and the // element's form owner is its nearest form element ancestor after the // change to the ancestor chain, then do nothing, and abort these steps. if (m_form && formId.isNull() && m_form.get() == nearestForm) return; setForm(findAssociatedForm(element)); } void FormAssociatedElement::formAttributeChanged() { resetFormOwner(); resetFormAttributeTargetObserver(); } bool FormAssociatedElement::customError() const { const HTMLElement* element = toHTMLElement(this); return element->willValidate() && !m_customValidationMessage.isEmpty(); } bool FormAssociatedElement::hasBadInput() const { return false; } bool FormAssociatedElement::patternMismatch() const { return false; } bool FormAssociatedElement::rangeOverflow() const { return false; } bool FormAssociatedElement::rangeUnderflow() const { return false; } bool FormAssociatedElement::stepMismatch() const { return false; } bool FormAssociatedElement::tooLong() const { return false; } bool FormAssociatedElement::tooShort() const { return false; } bool FormAssociatedElement::typeMismatch() const { return false; } bool FormAssociatedElement::valid() const { bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || rangeOverflow() || tooLong() || tooShort() || patternMismatch() || valueMissing() || hasBadInput() || customError(); return !someError; } bool FormAssociatedElement::valueMissing() const { return false; } String FormAssociatedElement::customValidationMessage() const { return m_customValidationMessage; } String FormAssociatedElement::validationMessage() const { return customError() ? m_customValidationMessage : String(); } void FormAssociatedElement::setCustomValidity(const String& error) { m_customValidationMessage = error; } void FormAssociatedElement::setFormAttributeTargetObserver(PassOwnPtrWillBeRawPtr<FormAttributeTargetObserver> newObserver) { if (m_formAttributeTargetObserver) m_formAttributeTargetObserver->unregister(); m_formAttributeTargetObserver = newObserver; } void FormAssociatedElement::resetFormAttributeTargetObserver() { HTMLElement* element = toHTMLElement(this); const AtomicString& formId(element->fastGetAttribute(formAttr)); if (!formId.isNull() && element->inDocument()) setFormAttributeTargetObserver(FormAttributeTargetObserver::create(formId, this)); else setFormAttributeTargetObserver(nullptr); } void FormAssociatedElement::formAttributeTargetChanged() { resetFormOwner(); } const AtomicString& FormAssociatedElement::name() const { const AtomicString& name = toHTMLElement(this)->getNameAttribute(); return name.isNull() ? emptyAtom : name; } bool FormAssociatedElement::isFormControlElementWithState() const { return false; } const HTMLElement& toHTMLElement(const FormAssociatedElement& associatedElement) { if (associatedElement.isFormControlElement()) return toHTMLFormControlElement(associatedElement); if (associatedElement.isLabelElement()) return toHTMLLabelElement(associatedElement); return toHTMLObjectElement(associatedElement); } const HTMLElement* toHTMLElement(const FormAssociatedElement* associatedElement) { ASSERT(associatedElement); return &toHTMLElement(*associatedElement); } HTMLElement* toHTMLElement(FormAssociatedElement* associatedElement) { return const_cast<HTMLElement*>(toHTMLElement(static_cast<const FormAssociatedElement*>(associatedElement))); } HTMLElement& toHTMLElement(FormAssociatedElement& associatedElement) { return const_cast<HTMLElement&>(toHTMLElement(static_cast<const FormAssociatedElement&>(associatedElement))); } PassOwnPtrWillBeRawPtr<FormAttributeTargetObserver> FormAttributeTargetObserver::create(const AtomicString& id, FormAssociatedElement* element) { return adoptPtrWillBeNoop(new FormAttributeTargetObserver(id, element)); } FormAttributeTargetObserver::FormAttributeTargetObserver(const AtomicString& id, FormAssociatedElement* element) : IdTargetObserver(toHTMLElement(element)->treeScope().idTargetObserverRegistry(), id) , m_element(element) { } DEFINE_TRACE(FormAttributeTargetObserver) { visitor->trace(m_element); IdTargetObserver::trace(visitor); } void FormAttributeTargetObserver::idTargetChanged() { m_element->formAttributeTargetChanged(); } } // namespace blink
; Disassembly of "metroid2.gb" SECTION "ROM Bank $00a", ROMX[$4000], BANK[$a] nop ; $4000: $00 ld e, [hl] ; $4001: $5e nop ; $4002: $00 ld e, a ; $4003: $5f nop ; $4004: $00 ld b, l ; $4005: $45 nop ; $4006: $00 ld b, l ; $4007: $45 nop ; $4008: $00 ld b, l ; $4009: $45 nop ; $400a: $00 nop ; $400b: $00 nop ; $400c: $00 ld b, [hl] ; $400d: $46 nop ; $400e: $00 ld b, l ; $400f: $45 nop ; $4010: $00 ld d, a ; $4011: $57 nop ; $4012: $00 ld l, [hl] ; $4013: $6e nop ; $4014: $00 ld l, a ; $4015: $6f nop ; $4016: $00 ld [hl], b ; $4017: $70 nop ; $4018: $00 ld b, l ; $4019: $45 nop ; $401a: $00 ld b, l ; $401b: $45 nop ; $401c: $00 ld b, l ; $401d: $45 nop ; $401e: $00 ld b, l ; $401f: $45 nop ; $4020: $00 ld c, b ; $4021: $48 nop ; $4022: $00 ld c, c ; $4023: $49 nop ; $4024: $00 ld b, l ; $4025: $45 nop ; $4026: $00 ld b, l ; $4027: $45 nop ; $4028: $00 ld b, l ; $4029: $45 nop ; $402a: $00 ld b, l ; $402b: $45 nop ; $402c: $00 ld e, c ; $402d: $59 nop ; $402e: $00 ld h, b ; $402f: $60 nop ; $4030: $00 ld a, c ; $4031: $79 nop ; $4032: $00 ld a, c ; $4033: $79 nop ; $4034: $00 ld [hl], e ; $4035: $73 nop ; $4036: $00 ld [hl], h ; $4037: $74 nop ; $4038: $00 ld b, l ; $4039: $45 nop ; $403a: $00 ld b, l ; $403b: $45 nop ; $403c: $00 ld b, l ; $403d: $45 nop ; $403e: $00 ld b, l ; $403f: $45 nop ; $4040: $00 ld c, b ; $4041: $48 nop ; $4042: $00 ld h, l ; $4043: $65 nop ; $4044: $00 ld d, e ; $4045: $53 nop ; $4046: $00 ld e, a ; $4047: $5f nop ; $4048: $00 ld b, l ; $4049: $45 nop ; $404a: $00 ld b, l ; $404b: $45 nop ; $404c: $00 ld a, h ; $404d: $7c nop ; $404e: $00 ld a, l ; $404f: $7d nop ; $4050: $00 ld b, l ; $4051: $45 nop ; $4052: $00 ld b, l ; $4053: $45 nop ; $4054: $00 ld [hl], l ; $4055: $75 nop ; $4056: $00 ld a, c ; $4057: $79 nop ; $4058: $00 ld b, l ; $4059: $45 nop ; $405a: $00 ld b, l ; $405b: $45 nop ; $405c: $00 ld b, l ; $405d: $45 nop ; $405e: $00 ld b, l ; $405f: $45 nop ; $4060: $00 ld b, l ; $4061: $45 nop ; $4062: $00 ld b, l ; $4063: $45 nop ; $4064: $00 ld c, d ; $4065: $4a nop ; $4066: $00 ld c, e ; $4067: $4b nop ; $4068: $00 ld b, l ; $4069: $45 nop ; $406a: $00 ld b, l ; $406b: $45 nop ; $406c: $00 ld e, c ; $406d: $59 nop ; $406e: $00 ld h, b ; $406f: $60 nop ; $4070: $00 ld b, l ; $4071: $45 nop ; $4072: $00 ld b, l ; $4073: $45 nop ; $4074: $00 ld [hl], l ; $4075: $75 nop ; $4076: $00 ld a, c ; $4077: $79 nop ; $4078: $00 ld b, l ; $4079: $45 nop ; $407a: $00 ld b, l ; $407b: $45 nop ; $407c: $00 ld b, l ; $407d: $45 nop ; $407e: $00 ld b, l ; $407f: $45 nop ; $4080: $00 ld e, [hl] ; $4081: $5e nop ; $4082: $00 ld e, b ; $4083: $58 nop ; $4084: $00 ld a, [hl] ; $4085: $7e nop ; $4086: $00 ld a, a ; $4087: $7f nop ; $4088: $00 ld l, l ; $4089: $6d nop ; $408a: $00 ld [hl], c ; $408b: $71 nop ; $408c: $00 ld [hl], c ; $408d: $71 nop ; $408e: $00 ld [hl], c ; $408f: $71 nop ; $4090: $00 ld [hl], d ; $4091: $72 nop ; $4092: $00 ld b, l ; $4093: $45 nop ; $4094: $00 ld b, l ; $4095: $45 nop ; $4096: $00 ld b, l ; $4097: $45 nop ; $4098: $00 ld b, l ; $4099: $45 nop ; $409a: $00 ld b, l ; $409b: $45 nop ; $409c: $00 ld b, l ; $409d: $45 nop ; $409e: $00 ld b, l ; $409f: $45 nop ; $40a0: $00 ld c, [hl] ; $40a1: $4e nop ; $40a2: $00 ld c, e ; $40a3: $4b nop ; $40a4: $00 ld b, l ; $40a5: $45 nop ; $40a6: $00 ld b, l ; $40a7: $45 nop ; $40a8: $00 ld h, [hl] ; $40a9: $66 nop ; $40aa: $00 ld e, a ; $40ab: $5f nop ; $40ac: $00 ld b, l ; $40ad: $45 nop ; $40ae: $00 ld b, l ; $40af: $45 nop ; $40b0: $00 ld b, l ; $40b1: $45 nop ; $40b2: $00 ld b, l ; $40b3: $45 nop ; $40b4: $00 ld b, l ; $40b5: $45 nop ; $40b6: $00 ld h, b ; $40b7: $60 nop ; $40b8: $00 ld b, l ; $40b9: $45 nop ; $40ba: $00 ld b, l ; $40bb: $45 nop ; $40bc: $00 ld b, l ; $40bd: $45 nop ; $40be: $00 ld b, l ; $40bf: $45 nop ; $40c0: $00 ld c, a ; $40c1: $4f nop ; $40c2: $00 ld c, e ; $40c3: $4b nop ; $40c4: $00 ld b, l ; $40c5: $45 nop ; $40c6: $00 ld h, b ; $40c7: $60 nop ; $40c8: $00 ld c, b ; $40c9: $48 nop ; $40ca: $00 ld c, c ; $40cb: $49 nop ; $40cc: $00 ld d, c ; $40cd: $51 nop ; $40ce: $00 ld d, l ; $40cf: $55 nop ; $40d0: $00 ld e, [hl] ; $40d1: $5e nop ; $40d2: $00 ld e, a ; $40d3: $5f nop ; $40d4: $00 ld b, l ; $40d5: $45 nop ; $40d6: $00 ld b, l ; $40d7: $45 nop ; $40d8: $00 ld b, l ; $40d9: $45 nop ; $40da: $00 ld b, l ; $40db: $45 nop ; $40dc: $00 ld b, l ; $40dd: $45 nop ; $40de: $00 ld b, l ; $40df: $45 nop ; $40e0: $00 ld b, l ; $40e1: $45 nop ; $40e2: $00 ld b, l ; $40e3: $45 nop ; $40e4: $00 ld b, l ; $40e5: $45 nop ; $40e6: $00 ld b, l ; $40e7: $45 nop ; $40e8: $00 ld c, d ; $40e9: $4a nop ; $40ea: $00 ld c, e ; $40eb: $4b nop ; $40ec: $00 ld d, e ; $40ed: $53 nop ; $40ee: $00 ld h, d ; $40ef: $62 nop ; $40f0: $00 ld c, b ; $40f1: $48 nop ; $40f2: $00 ld h, l ; $40f3: $65 nop ; $40f4: $00 ld b, l ; $40f5: $45 nop ; $40f6: $00 ld b, l ; $40f7: $45 nop ; $40f8: $00 ld b, l ; $40f9: $45 nop ; $40fa: $00 ld b, l ; $40fb: $45 nop ; $40fc: $00 ld b, l ; $40fd: $45 nop ; $40fe: $00 ld b, l ; $40ff: $45 nop ; $4100: $00 ld b, [hl] ; $4101: $46 nop ; $4102: $00 ld b, a ; $4103: $47 nop ; $4104: $00 ld l, c ; $4105: $69 nop ; $4106: $00 ld l, d ; $4107: $6a nop ; $4108: $00 ld c, h ; $4109: $4c nop ; $410a: $00 ld a, e ; $410b: $7b nop ; $410c: $00 ld c, [hl] ; $410d: $4e nop ; $410e: $00 ld c, e ; $410f: $4b nop ; $4110: $00 ld b, l ; $4111: $45 nop ; $4112: $00 ld b, l ; $4113: $45 nop ; $4114: $00 ld b, l ; $4115: $45 nop ; $4116: $00 ld b, l ; $4117: $45 nop ; $4118: $00 ld b, l ; $4119: $45 nop ; $411a: $00 ld b, l ; $411b: $45 nop ; $411c: $00 ld b, l ; $411d: $45 nop ; $411e: $00 ld b, l ; $411f: $45 nop ; $4120: $00 ld h, a ; $4121: $67 nop ; $4122: $00 ld l, h ; $4123: $6c nop ; $4124: $00 ld c, d ; $4125: $4a nop ; $4126: $00 ld c, e ; $4127: $4b nop ; $4128: $00 ld b, l ; $4129: $45 nop ; $412a: $00 ld b, l ; $412b: $45 nop ; $412c: $00 ld c, [hl] ; $412d: $4e nop ; $412e: $00 ld c, l ; $412f: $4d nop ; $4130: $00 ld e, d ; $4131: $5a nop ; $4132: $00 ld d, d ; $4133: $52 nop ; $4134: $00 ld b, l ; $4135: $45 nop ; $4136: $00 ld e, d ; $4137: $5a nop ; $4138: $00 ld d, [hl] ; $4139: $56 nop ; $413a: $00 ld d, [hl] ; $413b: $56 nop ; $413c: $00 ld e, h ; $413d: $5c nop ; $413e: $00 ld b, l ; $413f: $45 nop ; $4140: $00 halt ; $4141: $76 $00 ld h, c ; $4143: $61 nop ; $4144: $00 ld a, b ; $4145: $78 nop ; $4146: $00 ld l, b ; $4147: $68 nop ; $4148: $00 ld b, l ; $4149: $45 nop ; $414a: $00 ld b, l ; $414b: $45 nop ; $414c: $00 ld l, e ; $414d: $6b nop ; $414e: $00 ld h, h ; $414f: $64 nop ; $4150: $00 ld b, l ; $4151: $45 nop ; $4152: $00 ld b, l ; $4153: $45 nop ; $4154: $00 ld b, l ; $4155: $45 nop ; $4156: $00 ld b, l ; $4157: $45 nop ; $4158: $00 ld d, h ; $4159: $54 nop ; $415a: $00 ld d, h ; $415b: $54 nop ; $415c: $00 ld b, l ; $415d: $45 nop ; $415e: $00 ld b, l ; $415f: $45 nop ; $4160: $00 ld c, d ; $4161: $4a nop ; $4162: $00 ld c, e ; $4163: $4b nop ; $4164: $00 ld c, d ; $4165: $4a nop ; $4166: $00 ld c, e ; $4167: $4b nop ; $4168: $00 ld e, [hl] ; $4169: $5e nop ; $416a: $00 ld e, a ; $416b: $5f nop ; $416c: $00 ld b, l ; $416d: $45 nop ; $416e: $00 ld b, l ; $416f: $45 nop ; $4170: $00 ld b, l ; $4171: $45 nop ; $4172: $00 ld e, d ; $4173: $5a nop ; $4174: $00 ld d, [hl] ; $4175: $56 nop ; $4176: $00 ld d, [hl] ; $4177: $56 nop ; $4178: $00 ld d, [hl] ; $4179: $56 nop ; $417a: $00 ld e, h ; $417b: $5c nop ; $417c: $00 ld b, l ; $417d: $45 nop ; $417e: $00 ld b, l ; $417f: $45 nop ; $4180: $00 ld c, b ; $4181: $48 nop ; $4182: $00 ld c, c ; $4183: $49 nop ; $4184: $00 ld c, b ; $4185: $48 nop ; $4186: $00 ld c, c ; $4187: $49 nop ; $4188: $00 ld c, b ; $4189: $48 nop ; $418a: $00 ld h, l ; $418b: $65 nop ; $418c: $00 ld e, [hl] ; $418d: $5e nop ; $418e: $00 ld e, b ; $418f: $58 nop ; $4190: $00 ld b, l ; $4191: $45 nop ; $4192: $00 ld e, d ; $4193: $5a nop ; $4194: $00 ld e, e ; $4195: $5b nop ; $4196: $00 ld e, e ; $4197: $5b nop ; $4198: $00 ld e, e ; $4199: $5b nop ; $419a: $00 ld e, h ; $419b: $5c nop ; $419c: $00 ld e, l ; $419d: $5d nop ; $419e: $00 ld b, l ; $419f: $45 nop ; $41a0: $00 ld c, d ; $41a1: $4a nop ; $41a2: $00 ld c, e ; $41a3: $4b nop ; $41a4: $00 ld c, d ; $41a5: $4a nop ; $41a6: $00 ld c, e ; $41a7: $4b nop ; $41a8: $00 ld b, l ; $41a9: $45 nop ; $41aa: $00 ld b, l ; $41ab: $45 nop ; $41ac: $00 ld c, [hl] ; $41ad: $4e nop ; $41ae: $00 ld c, l ; $41af: $4d nop ; $41b0: $00 ld b, l ; $41b1: $45 nop ; $41b2: $00 ld b, l ; $41b3: $45 nop ; $41b4: $00 ld b, l ; $41b5: $45 nop ; $41b6: $00 ld b, l ; $41b7: $45 nop ; $41b8: $00 ld b, l ; $41b9: $45 nop ; $41ba: $00 ld b, l ; $41bb: $45 nop ; $41bc: $00 ld b, l ; $41bd: $45 nop ; $41be: $00 ld b, l ; $41bf: $45 nop ; $41c0: $00 ld a, [hl] ; $41c1: $7e nop ; $41c2: $00 ld h, e ; $41c3: $63 nop ; $41c4: $00 ld a, [hl] ; $41c5: $7e nop ; $41c6: $00 ld h, e ; $41c7: $63 nop ; $41c8: $00 ld b, l ; $41c9: $45 nop ; $41ca: $00 ld b, l ; $41cb: $45 nop ; $41cc: $00 ld l, e ; $41cd: $6b nop ; $41ce: $00 ld d, b ; $41cf: $50 nop ; $41d0: $00 ld b, l ; $41d1: $45 nop ; $41d2: $00 ld b, l ; $41d3: $45 nop ; $41d4: $00 ld b, l ; $41d5: $45 nop ; $41d6: $00 ld b, l ; $41d7: $45 nop ; $41d8: $00 ld b, l ; $41d9: $45 nop ; $41da: $00 ld b, l ; $41db: $45 nop ; $41dc: $00 ld b, l ; $41dd: $45 nop ; $41de: $00 ld b, l ; $41df: $45 nop ; $41e0: $00 ld b, l ; $41e1: $45 nop ; $41e2: $00 ld b, l ; $41e3: $45 nop ; $41e4: $00 ld b, l ; $41e5: $45 nop ; $41e6: $00 ld b, l ; $41e7: $45 nop ; $41e8: $00 ld a, d ; $41e9: $7a nop ; $41ea: $00 ld [hl], a ; $41eb: $77 nop ; $41ec: $00 ld b, l ; $41ed: $45 nop ; $41ee: $00 ld b, l ; $41ef: $45 nop ; $41f0: $00 ld a, d ; $41f1: $7a nop ; $41f2: $00 ld [hl], a ; $41f3: $77 nop ; $41f4: $00 ld b, l ; $41f5: $45 nop ; $41f6: $00 ld b, l ; $41f7: $45 nop ; $41f8: $00 ld b, l ; $41f9: $45 nop ; $41fa: $00 ld b, l ; $41fb: $45 nop ; $41fc: $00 ld b, l ; $41fd: $45 nop ; $41fe: $00 ld b, l ; $41ff: $45 ld b, $05 ; $4200: $06 $05 rrca ; $4202: $0f rrca ; $4203: $0f rrca ; $4204: $0f rrca ; $4205: $0f ld b, $05 ; $4206: $06 $05 ld b, $04 ; $4208: $06 $04 inc b ; $420a: $04 dec b ; $420b: $05 rrca ; $420c: $0f rrca ; $420d: $0f rrca ; $420e: $0f rrca ; $420f: $0f ld [bc], a ; $4210: $02 ld bc, $0f0f ; $4211: $01 $0f $0f rrca ; $4214: $0f rrca ; $4215: $0f ld a, [bc] ; $4216: $0a add hl, bc ; $4217: $09 ld a, [bc] ; $4218: $0a ld [$0100], sp ; $4219: $08 $00 $01 rrca ; $421c: $0f rrca ; $421d: $0f rrca ; $421e: $0f rrca ; $421f: $0f ld a, [bc] ; $4220: $0a add hl, bc ; $4221: $09 ld b, $05 ; $4222: $06 $05 rrca ; $4224: $0f rrca ; $4225: $0f ld b, $05 ; $4226: $06 $05 rrca ; $4228: $0f rrca ; $4229: $0f ld [bc], a ; $422a: $02 ld bc, $0f0f ; $422b: $01 $0f $0f rrca ; $422e: $0f rrca ; $422f: $0f rrca ; $4230: $0f rrca ; $4231: $0f ld [bc], a ; $4232: $02 ld bc, $0f0f ; $4233: $01 $0f $0f ld a, [bc] ; $4236: $0a add hl, bc ; $4237: $09 rrca ; $4238: $0f rrca ; $4239: $0f ld a, [bc] ; $423a: $0a add hl, bc ; $423b: $09 rrca ; $423c: $0f rrca ; $423d: $0f rrca ; $423e: $0f rrca ; $423f: $0f ld b, $05 ; $4240: $06 $05 ld a, [bc] ; $4242: $0a add hl, bc ; $4243: $09 ld c, $0c ; $4244: $0e $0c inc c ; $4246: $0c inc c ; $4247: $0c dec c ; $4248: $0d rrca ; $4249: $0f rrca ; $424a: $0f rrca ; $424b: $0f rrca ; $424c: $0f rrca ; $424d: $0f rrca ; $424e: $0f rrca ; $424f: $0f ld [bc], a ; $4250: $02 ld bc, $0f0f ; $4251: $01 $0f $0f ld b, $05 ; $4254: $06 $05 rrca ; $4256: $0f rrca ; $4257: $0f rrca ; $4258: $0f rrca ; $4259: $0f ld c, $0d ; $425a: $0e $0d rrca ; $425c: $0f rrca ; $425d: $0f rrca ; $425e: $0f rrca ; $425f: $0f ld a, [bc] ; $4260: $0a add hl, bc ; $4261: $09 ld c, $0d ; $4262: $0e $0d ld [bc], a ; $4264: $02 ld bc, $0506 ; $4265: $01 $06 $05 ld b, $05 ; $4268: $06 $05 rrca ; $426a: $0f rrca ; $426b: $0f rrca ; $426c: $0f rrca ; $426d: $0f rrca ; $426e: $0f rrca ; $426f: $0f rrca ; $4270: $0f rrca ; $4271: $0f rrca ; $4272: $0f rrca ; $4273: $0f ld [bc], a ; $4274: $02 ld bc, $0102 ; $4275: $01 $02 $01 ld a, [bc] ; $4278: $0a add hl, bc ; $4279: $09 rrca ; $427a: $0f rrca ; $427b: $0f rrca ; $427c: $0f rrca ; $427d: $0f rrca ; $427e: $0f rrca ; $427f: $0f ld b, $05 ; $4280: $06 $05 ld b, $05 ; $4282: $06 $05 ld a, [bc] ; $4284: $0a add hl, bc ; $4285: $09 ld [bc], a ; $4286: $02 ld bc, $0000 ; $4287: $01 $00 $00 rrca ; $428a: $0f rrca ; $428b: $0f rrca ; $428c: $0f rrca ; $428d: $0f rrca ; $428e: $0f rrca ; $428f: $0f ld [bc], a ; $4290: $02 ld bc, $0102 ; $4291: $01 $02 $01 rrca ; $4294: $0f rrca ; $4295: $0f ld [bc], a ; $4296: $02 ld bc, $0d0e ; $4297: $01 $0e $0d rrca ; $429a: $0f ld c, $0c ; $429b: $0e $0c inc c ; $429d: $0c dec c ; $429e: $0d rrca ; $429f: $0f ld [bc], a ; $42a0: $02 ld bc, $0102 ; $42a1: $01 $02 $01 rrca ; $42a4: $0f rrca ; $42a5: $0f ld a, [bc] ; $42a6: $0a add hl, bc ; $42a7: $09 rrca ; $42a8: $0f rrca ; $42a9: $0f rrca ; $42aa: $0f rrca ; $42ab: $0f rrca ; $42ac: $0f rrca ; $42ad: $0f rrca ; $42ae: $0f rrca ; $42af: $0f ld [bc], a ; $42b0: $02 ld bc, $0102 ; $42b1: $01 $02 $01 ld b, $05 ; $42b4: $06 $05 rrca ; $42b6: $0f rrca ; $42b7: $0f rrca ; $42b8: $0f ld c, $0c ; $42b9: $0e $0c inc c ; $42bb: $0c inc c ; $42bc: $0c dec c ; $42bd: $0d rrca ; $42be: $0f rrca ; $42bf: $0f ld [bc], a ; $42c0: $02 ld bc, $0102 ; $42c1: $01 $02 $01 ld a, [bc] ; $42c4: $0a add hl, bc ; $42c5: $09 ld b, $05 ; $42c6: $06 $05 rrca ; $42c8: $0f ld c, $0c ; $42c9: $0e $0c inc c ; $42cb: $0c inc c ; $42cc: $0c inc c ; $42cd: $0c dec c ; $42ce: $0d rrca ; $42cf: $0f ld [bc], a ; $42d0: $02 ld bc, $0102 ; $42d1: $01 $02 $01 rrca ; $42d4: $0f rrca ; $42d5: $0f ld [bc], a ; $42d6: $02 ld bc, $0f0f ; $42d7: $01 $0f $0f rrca ; $42da: $0f rrca ; $42db: $0f rrca ; $42dc: $0f rrca ; $42dd: $0f rrca ; $42de: $0f rrca ; $42df: $0f ld a, [bc] ; $42e0: $0a add hl, bc ; $42e1: $09 ld a, [bc] ; $42e2: $0a add hl, bc ; $42e3: $09 rrca ; $42e4: $0f rrca ; $42e5: $0f ld a, [bc] ; $42e6: $0a add hl, bc ; $42e7: $09 rrca ; $42e8: $0f rrca ; $42e9: $0f rrca ; $42ea: $0f rrca ; $42eb: $0f rrca ; $42ec: $0f rrca ; $42ed: $0f rrca ; $42ee: $0f rrca ; $42ef: $0f ld b, $05 ; $42f0: $06 $05 rrca ; $42f2: $0f rrca ; $42f3: $0f ld c, $0d ; $42f4: $0e $0d nop ; $42f6: $00 nop ; $42f7: $00 ld c, $0d ; $42f8: $0e $0d rrca ; $42fa: $0f rrca ; $42fb: $0f rrca ; $42fc: $0f rrca ; $42fd: $0f rrca ; $42fe: $0f rrca ; $42ff: $0f ld hl, $0000 ; $4300: $21 $00 $00 nop ; $4303: $00 nop ; $4304: $00 nop ; $4305: $00 nop ; $4306: $00 nop ; $4307: $00 nop ; $4308: $00 nop ; $4309: $00 nop ; $430a: $00 nop ; $430b: $00 nop ; $430c: $00 nop ; $430d: $00 inc h ; $430e: $24 nop ; $430f: $00 dec h ; $4310: $25 nop ; $4311: $00 nop ; $4312: $00 nop ; $4313: $00 nop ; $4314: $00 nop ; $4315: $00 ld h, $00 ; $4316: $26 $00 nop ; $4318: $00 nop ; $4319: $00 nop ; $431a: $00 nop ; $431b: $00 nop ; $431c: $00 nop ; $431d: $00 nop ; $431e: $00 nop ; $431f: $00 nop ; $4320: $00 nop ; $4321: $00 nop ; $4322: $00 nop ; $4323: $00 nop ; $4324: $00 nop ; $4325: $00 nop ; $4326: $00 nop ; $4327: $00 nop ; $4328: $00 nop ; $4329: $00 nop ; $432a: $00 nop ; $432b: $00 nop ; $432c: $00 nop ; $432d: $00 nop ; $432e: $00 nop ; $432f: $00 nop ; $4330: $00 nop ; $4331: $00 nop ; $4332: $00 nop ; $4333: $00 nop ; $4334: $00 nop ; $4335: $00 nop ; $4336: $00 nop ; $4337: $00 nop ; $4338: $00 nop ; $4339: $00 nop ; $433a: $00 nop ; $433b: $00 nop ; $433c: $00 nop ; $433d: $00 nop ; $433e: $00 nop ; $433f: $00 nop ; $4340: $00 nop ; $4341: $00 daa ; $4342: $27 nop ; $4343: $00 ld a, [hl+] ; $4344: $2a nop ; $4345: $00 nop ; $4346: $00 nop ; $4347: $00 nop ; $4348: $00 nop ; $4349: $00 nop ; $434a: $00 nop ; $434b: $00 add hl, hl ; $434c: $29 nop ; $434d: $00 nop ; $434e: $00 nop ; $434f: $00 nop ; $4350: $00 nop ; $4351: $00 nop ; $4352: $00 nop ; $4353: $00 nop ; $4354: $00 nop ; $4355: $00 nop ; $4356: $00 nop ; $4357: $00 nop ; $4358: $00 nop ; $4359: $00 nop ; $435a: $00 nop ; $435b: $00 nop ; $435c: $00 nop ; $435d: $00 nop ; $435e: $00 nop ; $435f: $00 nop ; $4360: $00 nop ; $4361: $00 nop ; $4362: $00 nop ; $4363: $00 nop ; $4364: $00 nop ; $4365: $00 nop ; $4366: $00 nop ; $4367: $00 nop ; $4368: $00 nop ; $4369: $00 nop ; $436a: $00 nop ; $436b: $00 nop ; $436c: $00 nop ; $436d: $00 nop ; $436e: $00 nop ; $436f: $00 nop ; $4370: $00 nop ; $4371: $00 nop ; $4372: $00 nop ; $4373: $00 ld [hl+], a ; $4374: $22 nop ; $4375: $00 nop ; $4376: $00 nop ; $4377: $00 nop ; $4378: $00 nop ; $4379: $00 nop ; $437a: $00 nop ; $437b: $00 nop ; $437c: $00 nop ; $437d: $00 nop ; $437e: $00 nop ; $437f: $00 ld c, d ; $4380: $4a ld bc, HeaderOldLicenseeCode ; $4381: $01 $4b $01 dec l ; $4384: $2d nop ; $4385: $00 or e ; $4386: $b3 ld bc, $00d6 ; $4387: $01 $d6 $00 nop ; $438a: $00 nop ; $438b: $00 nop ; $438c: $00 nop ; $438d: $00 nop ; $438e: $00 nop ; $438f: $00 ld d, d ; $4390: $52 nop ; $4391: $00 nop ; $4392: $00 nop ; $4393: $00 nop ; $4394: $00 nop ; $4395: $00 nop ; $4396: $00 nop ; $4397: $00 nop ; $4398: $00 nop ; $4399: $00 nop ; $439a: $00 nop ; $439b: $00 nop ; $439c: $00 nop ; $439d: $00 nop ; $439e: $00 nop ; $439f: $00 nop ; $43a0: $00 nop ; $43a1: $00 nop ; $43a2: $00 nop ; $43a3: $00 nop ; $43a4: $00 nop ; $43a5: $00 nop ; $43a6: $00 nop ; $43a7: $00 inc hl ; $43a8: $23 nop ; $43a9: $00 nop ; $43aa: $00 nop ; $43ab: $00 nop ; $43ac: $00 nop ; $43ad: $00 nop ; $43ae: $00 nop ; $43af: $00 nop ; $43b0: $00 nop ; $43b1: $00 nop ; $43b2: $00 nop ; $43b3: $00 nop ; $43b4: $00 nop ; $43b5: $00 nop ; $43b6: $00 nop ; $43b7: $00 nop ; $43b8: $00 nop ; $43b9: $00 nop ; $43ba: $00 nop ; $43bb: $00 nop ; $43bc: $00 nop ; $43bd: $00 nop ; $43be: $00 nop ; $43bf: $00 inc sp ; $43c0: $33 nop ; $43c1: $00 nop ; $43c2: $00 nop ; $43c3: $00 nop ; $43c4: $00 nop ; $43c5: $00 nop ; $43c6: $00 nop ; $43c7: $00 nop ; $43c8: $00 nop ; $43c9: $00 nop ; $43ca: $00 nop ; $43cb: $00 cpl ; $43cc: $2f nop ; $43cd: $00 nop ; $43ce: $00 nop ; $43cf: $00 add l ; $43d0: $85 ld bc, $0000 ; $43d1: $01 $00 $00 nop ; $43d4: $00 nop ; $43d5: $00 nop ; $43d6: $00 nop ; $43d7: $00 nop ; $43d8: $00 nop ; $43d9: $00 nop ; $43da: $00 nop ; $43db: $00 nop ; $43dc: $00 nop ; $43dd: $00 nop ; $43de: $00 nop ; $43df: $00 nop ; $43e0: $00 nop ; $43e1: $00 nop ; $43e2: $00 nop ; $43e3: $00 nop ; $43e4: $00 nop ; $43e5: $00 nop ; $43e6: $00 nop ; $43e7: $00 nop ; $43e8: $00 nop ; $43e9: $00 nop ; $43ea: $00 nop ; $43eb: $00 nop ; $43ec: $00 nop ; $43ed: $00 dec [hl] ; $43ee: $35 nop ; $43ef: $00 nop ; $43f0: $00 nop ; $43f1: $00 add [hl] ; $43f2: $86 ld bc, $0000 ; $43f3: $01 $00 $00 nop ; $43f6: $00 nop ; $43f7: $00 nop ; $43f8: $00 nop ; $43f9: $00 nop ; $43fa: $00 nop ; $43fb: $00 nop ; $43fc: $00 nop ; $43fd: $00 nop ; $43fe: $00 nop ; $43ff: $00 nop ; $4400: $00 nop ; $4401: $00 add a ; $4402: $87 ld bc, $0000 ; $4403: $01 $00 $00 or l ; $4406: $b5 ld bc, $01a0 ; $4407: $01 $a0 $01 ld [hl], $00 ; $440a: $36 $00 nop ; $440c: $00 nop ; $440d: $00 nop ; $440e: $00 nop ; $440f: $00 nop ; $4410: $00 nop ; $4411: $00 nop ; $4412: $00 nop ; $4413: $00 nop ; $4414: $00 nop ; $4415: $00 nop ; $4416: $00 nop ; $4417: $00 nop ; $4418: $00 nop ; $4419: $00 nop ; $441a: $00 nop ; $441b: $00 nop ; $441c: $00 nop ; $441d: $00 nop ; $441e: $00 nop ; $441f: $00 nop ; $4420: $00 nop ; $4421: $00 nop ; $4422: $00 nop ; $4423: $00 nop ; $4424: $00 nop ; $4425: $00 nop ; $4426: $00 nop ; $4427: $00 nop ; $4428: $00 nop ; $4429: $00 nop ; $442a: $00 nop ; $442b: $00 nop ; $442c: $00 nop ; $442d: $00 nop ; $442e: $00 nop ; $442f: $00 add l ; $4430: $85 nop ; $4431: $00 scf ; $4432: $37 nop ; $4433: $00 nop ; $4434: $00 nop ; $4435: $00 add hl, sp ; $4436: $39 nop ; $4437: $00 nop ; $4438: $00 nop ; $4439: $00 nop ; $443a: $00 nop ; $443b: $00 ld a, [hl-] ; $443c: $3a nop ; $443d: $00 nop ; $443e: $00 nop ; $443f: $00 adc c ; $4440: $89 ld bc, $0000 ; $4441: $01 $00 $00 dec sp ; $4444: $3b nop ; $4445: $00 nop ; $4446: $00 nop ; $4447: $00 nop ; $4448: $00 nop ; $4449: $00 nop ; $444a: $00 nop ; $444b: $00 inc a ; $444c: $3c nop ; $444d: $00 nop ; $444e: $00 nop ; $444f: $00 nop ; $4450: $00 nop ; $4451: $00 nop ; $4452: $00 nop ; $4453: $00 nop ; $4454: $00 nop ; $4455: $00 nop ; $4456: $00 nop ; $4457: $00 ld b, b ; $4458: $40 nop ; $4459: $00 ld b, c ; $445a: $41 nop ; $445b: $00 nop ; $445c: $00 nop ; $445d: $00 nop ; $445e: $00 nop ; $445f: $00 nop ; $4460: $00 nop ; $4461: $00 nop ; $4462: $00 nop ; $4463: $00 nop ; $4464: $00 nop ; $4465: $00 sub [hl] ; $4466: $96 nop ; $4467: $00 ld b, d ; $4468: $42 nop ; $4469: $00 nop ; $446a: $00 nop ; $446b: $00 nop ; $446c: $00 nop ; $446d: $00 nop ; $446e: $00 nop ; $446f: $00 nop ; $4470: $00 nop ; $4471: $00 ld b, e ; $4472: $43 nop ; $4473: $00 nop ; $4474: $00 nop ; $4475: $00 nop ; $4476: $00 nop ; $4477: $00 nop ; $4478: $00 nop ; $4479: $00 ld b, h ; $447a: $44 nop ; $447b: $00 nop ; $447c: $00 nop ; $447d: $00 nop ; $447e: $00 nop ; $447f: $00 nop ; $4480: $00 nop ; $4481: $00 nop ; $4482: $00 nop ; $4483: $00 nop ; $4484: $00 nop ; $4485: $00 nop ; $4486: $00 nop ; $4487: $00 nop ; $4488: $00 nop ; $4489: $00 and d ; $448a: $a2 ld bc, $01a1 ; $448b: $01 $a1 $01 ld b, l ; $448e: $45 nop ; $448f: $00 nop ; $4490: $00 nop ; $4491: $00 ld b, [hl] ; $4492: $46 nop ; $4493: $00 nop ; $4494: $00 nop ; $4495: $00 nop ; $4496: $00 nop ; $4497: $00 nop ; $4498: $00 nop ; $4499: $00 nop ; $449a: $00 nop ; $449b: $00 ld b, a ; $449c: $47 nop ; $449d: $00 nop ; $449e: $00 nop ; $449f: $00 nop ; $44a0: $00 nop ; $44a1: $00 nop ; $44a2: $00 nop ; $44a3: $00 nop ; $44a4: $00 nop ; $44a5: $00 nop ; $44a6: $00 nop ; $44a7: $00 nop ; $44a8: $00 nop ; $44a9: $00 nop ; $44aa: $00 nop ; $44ab: $00 nop ; $44ac: $00 nop ; $44ad: $00 nop ; $44ae: $00 nop ; $44af: $00 nop ; $44b0: $00 nop ; $44b1: $00 nop ; $44b2: $00 nop ; $44b3: $00 nop ; $44b4: $00 nop ; $44b5: $00 nop ; $44b6: $00 nop ; $44b7: $00 nop ; $44b8: $00 nop ; $44b9: $00 nop ; $44ba: $00 nop ; $44bb: $00 nop ; $44bc: $00 nop ; $44bd: $00 nop ; $44be: $00 nop ; $44bf: $00 adc l ; $44c0: $8d ld bc, $0000 ; $44c1: $01 $00 $00 ld c, e ; $44c4: $4b nop ; $44c5: $00 nop ; $44c6: $00 nop ; $44c7: $00 nop ; $44c8: $00 nop ; $44c9: $00 ret nc ; $44ca: $d0 ld bc, $004c ; $44cb: $01 $4c $00 ld c, l ; $44ce: $4d nop ; $44cf: $00 nop ; $44d0: $00 nop ; $44d1: $00 nop ; $44d2: $00 nop ; $44d3: $00 nop ; $44d4: $00 nop ; $44d5: $00 nop ; $44d6: $00 nop ; $44d7: $00 nop ; $44d8: $00 nop ; $44d9: $00 nop ; $44da: $00 nop ; $44db: $00 nop ; $44dc: $00 nop ; $44dd: $00 nop ; $44de: $00 nop ; $44df: $00 nop ; $44e0: $00 nop ; $44e1: $00 nop ; $44e2: $00 nop ; $44e3: $00 nop ; $44e4: $00 nop ; $44e5: $00 nop ; $44e6: $00 nop ; $44e7: $00 ld c, a ; $44e8: $4f nop ; $44e9: $00 nop ; $44ea: $00 nop ; $44eb: $00 nop ; $44ec: $00 nop ; $44ed: $00 nop ; $44ee: $00 nop ; $44ef: $00 ld d, e ; $44f0: $53 ld bc, $0000 ; $44f1: $01 $00 $00 nop ; $44f4: $00 nop ; $44f5: $00 nop ; $44f6: $00 nop ; $44f7: $00 or l ; $44f8: $b5 nop ; $44f9: $00 dec de ; $44fa: $1b nop ; $44fb: $00 ld d, c ; $44fc: $51 nop ; $44fd: $00 nop ; $44fe: $00 nop ; $44ff: $00 ld hl, $2121 ; $4500: $21 $21 $21 ld hl, $2121 ; $4503: $21 $21 $21 ld hl, $2121 ; $4506: $21 $21 $21 ld hl, $2121 ; $4509: $21 $21 $21 ld hl, $2121 ; $450c: $21 $21 $21 ld hl, $2121 ; $450f: $21 $21 $21 ld hl, $2121 ; $4512: $21 $21 $21 dec hl ; $4515: $2b ld b, b ; $4516: $40 ld h, $21 ; $4517: $26 $21 ld hl, $2121 ; $4519: $21 $21 $21 dec hl ; $451c: $2b ld b, b ; $451d: $40 ld h, $21 ; $451e: $26 $21 ld hl, $2121 ; $4520: $21 $21 $21 ld hl, $2121 ; $4523: $21 $21 $21 ld hl, $2121 ; $4526: $21 $21 $21 ld hl, $2121 ; $4529: $21 $21 $21 ld hl, $2121 ; $452c: $21 $21 $21 ld hl, $2640 ; $452f: $21 $40 $26 ld hl, $2121 ; $4532: $21 $21 $21 ld hl, $2121 ; $4535: $21 $21 $21 ld hl, $2121 ; $4538: $21 $21 $21 dec hl ; $453b: $2b ld b, b ; $453c: $40 ld h, $21 ; $453d: $26 $21 ld hl, $2121 ; $453f: $21 $21 $21 dec hl ; $4542: $2b ld b, b ; $4543: $40 ld h, $21 ; $4544: $26 $21 ld hl, $2121 ; $4546: $21 $21 $21 ld hl, $2121 ; $4549: $21 $21 $21 ld hl, $2121 ; $454c: $21 $21 $21 ld hl, $2121 ; $454f: $21 $21 $21 ld hl, $2121 ; $4552: $21 $21 $21 ld hl, $2121 ; $4555: $21 $21 $21 ld hl, $2121 ; $4558: $21 $21 $21 ld hl, $2121 ; $455b: $21 $21 $21 ld hl, $2121 ; $455e: $21 $21 $21 ld hl, $2b21 ; $4561: $21 $21 $2b inc e ; $4564: $1c add hl, bc ; $4565: $09 add hl, bc ; $4566: $09 add hl, bc ; $4567: $09 add hl, bc ; $4568: $09 add hl, bc ; $4569: $09 dec de ; $456a: $1b ld h, $21 ; $456b: $26 $21 ld hl, $2121 ; $456d: $21 $21 $21 ld hl, $092b ; $4570: $21 $2b $09 add hl, bc ; $4573: $09 add hl, bc ; $4574: $09 add hl, bc ; $4575: $09 add hl, bc ; $4576: $09 add hl, bc ; $4577: $09 add hl, bc ; $4578: $09 add hl, bc ; $4579: $09 add hl, bc ; $457a: $09 add hl, bc ; $457b: $09 add hl, bc ; $457c: $09 add hl, bc ; $457d: $09 add hl, bc ; $457e: $09 add hl, bc ; $457f: $09 add hl, bc ; $4580: $09 add hl, bc ; $4581: $09 add hl, bc ; $4582: $09 add hl, bc ; $4583: $09 add hl, bc ; $4584: $09 add hl, bc ; $4585: $09 add hl, bc ; $4586: $09 add hl, bc ; $4587: $09 add hl, bc ; $4588: $09 add hl, bc ; $4589: $09 add hl, bc ; $458a: $09 add hl, bc ; $458b: $09 add hl, bc ; $458c: $09 add hl, bc ; $458d: $09 add hl, bc ; $458e: $09 add hl, bc ; $458f: $09 add hl, bc ; $4590: $09 add hl, bc ; $4591: $09 add hl, bc ; $4592: $09 add hl, bc ; $4593: $09 add hl, bc ; $4594: $09 add hl, bc ; $4595: $09 add hl, bc ; $4596: $09 add hl, bc ; $4597: $09 add hl, bc ; $4598: $09 add hl, bc ; $4599: $09 add hl, bc ; $459a: $09 add hl, bc ; $459b: $09 add hl, bc ; $459c: $09 add hl, bc ; $459d: $09 add hl, bc ; $459e: $09 add hl, bc ; $459f: $09 add hl, bc ; $45a0: $09 add hl, bc ; $45a1: $09 add hl, bc ; $45a2: $09 add hl, bc ; $45a3: $09 add hl, bc ; $45a4: $09 add hl, bc ; $45a5: $09 add hl, bc ; $45a6: $09 add hl, bc ; $45a7: $09 add hl, bc ; $45a8: $09 ld h, $21 ; $45a9: $26 $21 ld hl, $2121 ; $45ab: $21 $21 $21 ld hl, $0921 ; $45ae: $21 $21 $09 add hl, bc ; $45b1: $09 add hl, bc ; $45b2: $09 add hl, bc ; $45b3: $09 add hl, bc ; $45b4: $09 add hl, bc ; $45b5: $09 add hl, bc ; $45b6: $09 add hl, bc ; $45b7: $09 add hl, bc ; $45b8: $09 add hl, bc ; $45b9: $09 add hl, bc ; $45ba: $09 ld h, $21 ; $45bb: $26 $21 ld hl, $2121 ; $45bd: $21 $21 $21 add hl, bc ; $45c0: $09 add hl, bc ; $45c1: $09 add hl, bc ; $45c2: $09 add hl, bc ; $45c3: $09 add hl, bc ; $45c4: $09 add hl, bc ; $45c5: $09 add hl, bc ; $45c6: $09 add hl, bc ; $45c7: $09 ld h, $21 ; $45c8: $26 $21 ld hl, $2121 ; $45ca: $21 $21 $21 ld hl, $2121 ; $45cd: $21 $21 $21 dec hl ; $45d0: $2b add hl, bc ; $45d1: $09 add hl, bc ; $45d2: $09 add hl, bc ; $45d3: $09 add hl, bc ; $45d4: $09 ld h, $21 ; $45d5: $26 $21 ld hl, $2121 ; $45d7: $21 $21 $21 ld hl, $2121 ; $45da: $21 $21 $21 ld hl, $402b ; $45dd: $21 $2b $40 add hl, bc ; $45e0: $09 add hl, bc ; $45e1: $09 add hl, bc ; $45e2: $09 ld h, $21 ; $45e3: $26 $21 ld hl, $402b ; $45e5: $21 $2b $40 ld h, $21 ; $45e8: $26 $21 ld hl, $2121 ; $45ea: $21 $21 $21 ld hl, $2126 ; $45ed: $21 $26 $21 add hl, bc ; $45f0: $09 add hl, bc ; $45f1: $09 add hl, bc ; $45f2: $09 inc b ; $45f3: $04 ld b, b ; $45f4: $40 ld h, $21 ; $45f5: $26 $21 ld hl, $2121 ; $45f7: $21 $21 $21 dec hl ; $45fa: $2b ld b, b ; $45fb: $40 ld h, $21 ; $45fc: $26 $21 ld hl, $2121 ; $45fe: $21 $21 $21 ld hl, $2121 ; $4601: $21 $21 $21 ld hl, $2121 ; $4604: $21 $21 $21 ld hl, $2121 ; $4607: $21 $21 $21 dec hl ; $460a: $2b ld b, b ; $460b: $40 ld h, $21 ; $460c: $26 $21 ld hl, $2121 ; $460e: $21 $21 $21 ld hl, $2121 ; $4611: $21 $21 $21 ld hl, $2121 ; $4614: $21 $21 $21 ld hl, $2121 ; $4617: $21 $21 $21 ld hl, $2121 ; $461a: $21 $21 $21 ld hl, $2121 ; $461d: $21 $21 $21 ld hl, $2b21 ; $4620: $21 $21 $2b ld b, b ; $4623: $40 ld h, $21 ; $4624: $26 $21 ld hl, $2121 ; $4626: $21 $21 $21 ld hl, $2121 ; $4629: $21 $21 $21 ld hl, $2121 ; $462c: $21 $21 $21 ld hl, $2121 ; $462f: $21 $21 $21 ld hl, $2121 ; $4632: $21 $21 $21 ld hl, $2b21 ; $4635: $21 $21 $2b ld b, b ; $4638: $40 ld h, $21 ; $4639: $26 $21 ld hl, $402b ; $463b: $21 $2b $40 ld h, $21 ; $463e: $26 $21 dec hl ; $4640: $2b ld b, b ; $4641: $40 ld h, $21 ; $4642: $26 $21 ld hl, $2121 ; $4644: $21 $21 $21 ld hl, $2121 ; $4647: $21 $21 $21 ld hl, $2121 ; $464a: $21 $21 $21 ld hl, $2121 ; $464d: $21 $21 $21 ld hl, $2121 ; $4650: $21 $21 $21 ld hl, $2121 ; $4653: $21 $21 $21 ld hl, $2121 ; $4656: $21 $21 $21 ld hl, $2121 ; $4659: $21 $21 $21 ld hl, $402b ; $465c: $21 $2b $40 ld h, $21 ; $465f: $26 $21 ld hl, $402b ; $4661: $21 $2b $40 ld h, $21 ; $4664: $26 $21 ld hl, $2121 ; $4666: $21 $21 $21 ld hl, $2121 ; $4669: $21 $21 $21 ld hl, $2121 ; $466c: $21 $21 $21 ld hl, $2121 ; $466f: $21 $21 $21 ld hl, $2121 ; $4672: $21 $21 $21 ld hl, $2121 ; $4675: $21 $21 $21 ld hl, $402b ; $4678: $21 $2b $40 ld h, $21 ; $467b: $26 $21 ld hl, $2121 ; $467d: $21 $21 $21 ld hl, $2121 ; $4680: $21 $21 $21 ld hl, $2121 ; $4683: $21 $21 $21 ld hl, $2121 ; $4686: $21 $21 $21 ld hl, $2121 ; $4689: $21 $21 $21 ld hl, $092b ; $468c: $21 $2b $09 add hl, bc ; $468f: $09 ld hl, $2b21 ; $4690: $21 $21 $2b ld b, b ; $4693: $40 ld h, $21 ; $4694: $26 $21 ld hl, $2121 ; $4696: $21 $21 $21 ld hl, $2121 ; $4699: $21 $21 $21 ld hl, $092b ; $469c: $21 $2b $09 add hl, bc ; $469f: $09 ld hl, $2121 ; $46a0: $21 $21 $21 ld hl, $2121 ; $46a3: $21 $21 $21 ld h, $21 ; $46a6: $26 $21 ld hl, $2121 ; $46a8: $21 $21 $21 dec hl ; $46ab: $2b add hl, bc ; $46ac: $09 add hl, bc ; $46ad: $09 add hl, bc ; $46ae: $09 add hl, bc ; $46af: $09 ld hl, $2121 ; $46b0: $21 $21 $21 ld hl, $2121 ; $46b3: $21 $21 $21 ld hl, $2121 ; $46b6: $21 $21 $21 ld hl, $092b ; $46b9: $21 $2b $09 add hl, bc ; $46bc: $09 add hl, bc ; $46bd: $09 add hl, bc ; $46be: $09 add hl, bc ; $46bf: $09 dec hl ; $46c0: $2b ld b, b ; $46c1: $40 ld h, $21 ; $46c2: $26 $21 ld hl, $2b21 ; $46c4: $21 $21 $2b ld b, b ; $46c7: $40 ld h, $21 ; $46c8: $26 $21 dec hl ; $46ca: $2b add hl, bc ; $46cb: $09 add hl, bc ; $46cc: $09 add hl, bc ; $46cd: $09 add hl, bc ; $46ce: $09 add hl, bc ; $46cf: $09 ld hl, $2121 ; $46d0: $21 $21 $21 dec hl ; $46d3: $2b ld b, b ; $46d4: $40 ld h, $21 ; $46d5: $26 $21 ld hl, $2121 ; $46d7: $21 $21 $21 ld hl, $092b ; $46da: $21 $2b $09 add hl, bc ; $46dd: $09 add hl, bc ; $46de: $09 ld h, $21 ; $46df: $26 $21 ld hl, $2121 ; $46e1: $21 $21 $21 ld hl, $2121 ; $46e4: $21 $21 $21 ld hl, $2121 ; $46e7: $21 $21 $21 ld hl, $092b ; $46ea: $21 $2b $09 add hl, bc ; $46ed: $09 add hl, bc ; $46ee: $09 add hl, bc ; $46ef: $09 ld hl, $402b ; $46f0: $21 $2b $40 ld h, $21 ; $46f3: $26 $21 ld hl, $2121 ; $46f5: $21 $21 $21 dec hl ; $46f8: $2b ld b, b ; $46f9: $40 ld h, $21 ; $46fa: $26 $21 dec hl ; $46fc: $2b add hl, bc ; $46fd: $09 add hl, bc ; $46fe: $09 add hl, bc ; $46ff: $09 ld hl, $2121 ; $4700: $21 $21 $21 ld hl, $2121 ; $4703: $21 $21 $21 ld hl, $2121 ; $4706: $21 $21 $21 ld hl, $2121 ; $4709: $21 $21 $21 ld hl, $2121 ; $470c: $21 $21 $21 ld hl, $2121 ; $470f: $21 $21 $21 ld hl, $2121 ; $4712: $21 $21 $21 dec hl ; $4715: $2b ld b, b ; $4716: $40 ld h, $21 ; $4717: $26 $21 ld hl, $2b21 ; $4719: $21 $21 $2b ld b, b ; $471c: $40 ld h, $21 ; $471d: $26 $21 ld hl, $2121 ; $471f: $21 $21 $21 ld hl, $2121 ; $4722: $21 $21 $21 ld hl, $2121 ; $4725: $21 $21 $21 ld hl, $2121 ; $4728: $21 $21 $21 ld hl, $2121 ; $472b: $21 $21 $21 ld hl, $2121 ; $472e: $21 $21 $21 ld hl, $2121 ; $4731: $21 $21 $21 dec hl ; $4734: $2b inc e ; $4735: $1c add hl, bc ; $4736: $09 add hl, bc ; $4737: $09 add hl, bc ; $4738: $09 add hl, bc ; $4739: $09 dec de ; $473a: $1b ld h, $2b ; $473b: $26 $2b ld b, b ; $473d: $40 ld hl, $2121 ; $473e: $21 $21 $21 dec hl ; $4741: $2b ld b, b ; $4742: $40 ld h, $2b ; $4743: $26 $2b add hl, bc ; $4745: $09 add hl, bc ; $4746: $09 add hl, bc ; $4747: $09 add hl, bc ; $4748: $09 add hl, bc ; $4749: $09 add hl, bc ; $474a: $09 ld h, $21 ; $474b: $26 $21 ld hl, $2121 ; $474d: $21 $21 $21 ld hl, $2121 ; $4750: $21 $21 $21 ld hl, $092b ; $4753: $21 $2b $09 add hl, bc ; $4756: $09 add hl, bc ; $4757: $09 add hl, bc ; $4758: $09 add hl, bc ; $4759: $09 add hl, bc ; $475a: $09 add hl, bc ; $475b: $09 add hl, bc ; $475c: $09 add hl, bc ; $475d: $09 add hl, bc ; $475e: $09 add hl, bc ; $475f: $09 ld hl, $2121 ; $4760: $21 $21 $21 dec hl ; $4763: $2b add hl, bc ; $4764: $09 add hl, bc ; $4765: $09 add hl, bc ; $4766: $09 add hl, bc ; $4767: $09 ld h, $21 ; $4768: $26 $21 ld hl, $2121 ; $476a: $21 $21 $21 ld hl, $2121 ; $476d: $21 $21 $21 ld hl, $092b ; $4770: $21 $2b $09 add hl, bc ; $4773: $09 add hl, bc ; $4774: $09 add hl, bc ; $4775: $09 add hl, bc ; $4776: $09 add hl, bc ; $4777: $09 inc b ; $4778: $04 inc e ; $4779: $1c add hl, bc ; $477a: $09 add hl, bc ; $477b: $09 add hl, bc ; $477c: $09 add hl, bc ; $477d: $09 add hl, bc ; $477e: $09 add hl, bc ; $477f: $09 add hl, bc ; $4780: $09 add hl, bc ; $4781: $09 add hl, bc ; $4782: $09 add hl, bc ; $4783: $09 add hl, bc ; $4784: $09 add hl, bc ; $4785: $09 add hl, bc ; $4786: $09 add hl, bc ; $4787: $09 inc b ; $4788: $04 add hl, bc ; $4789: $09 add hl, bc ; $478a: $09 add hl, bc ; $478b: $09 add hl, bc ; $478c: $09 add hl, bc ; $478d: $09 add hl, bc ; $478e: $09 add hl, bc ; $478f: $09 add hl, bc ; $4790: $09 add hl, bc ; $4791: $09 add hl, bc ; $4792: $09 add hl, bc ; $4793: $09 add hl, bc ; $4794: $09 add hl, bc ; $4795: $09 add hl, bc ; $4796: $09 ld h, $2b ; $4797: $26 $2b add hl, bc ; $4799: $09 add hl, bc ; $479a: $09 add hl, bc ; $479b: $09 add hl, bc ; $479c: $09 add hl, bc ; $479d: $09 add hl, bc ; $479e: $09 add hl, bc ; $479f: $09 add hl, bc ; $47a0: $09 add hl, bc ; $47a1: $09 add hl, bc ; $47a2: $09 add hl, bc ; $47a3: $09 add hl, bc ; $47a4: $09 add hl, bc ; $47a5: $09 add hl, bc ; $47a6: $09 add hl, bc ; $47a7: $09 add hl, bc ; $47a8: $09 add hl, bc ; $47a9: $09 add hl, bc ; $47aa: $09 add hl, bc ; $47ab: $09 ld h, $21 ; $47ac: $26 $21 ld hl, $0921 ; $47ae: $21 $21 $09 add hl, bc ; $47b1: $09 add hl, bc ; $47b2: $09 add hl, bc ; $47b3: $09 inc b ; $47b4: $04 add hl, bc ; $47b5: $09 add hl, bc ; $47b6: $09 add hl, bc ; $47b7: $09 add hl, bc ; $47b8: $09 add hl, bc ; $47b9: $09 add hl, bc ; $47ba: $09 add hl, bc ; $47bb: $09 ld h, $2b ; $47bc: $26 $2b ld b, b ; $47be: $40 ld h, $09 ; $47bf: $26 $09 add hl, bc ; $47c1: $09 add hl, bc ; $47c2: $09 add hl, bc ; $47c3: $09 inc b ; $47c4: $04 add hl, bc ; $47c5: $09 add hl, bc ; $47c6: $09 add hl, bc ; $47c7: $09 add hl, bc ; $47c8: $09 add hl, bc ; $47c9: $09 add hl, bc ; $47ca: $09 add hl, bc ; $47cb: $09 ld hl, $2121 ; $47cc: $21 $21 $21 ld hl, $092b ; $47cf: $21 $2b $09 add hl, bc ; $47d2: $09 add hl, bc ; $47d3: $09 inc b ; $47d4: $04 add hl, bc ; $47d5: $09 add hl, bc ; $47d6: $09 add hl, bc ; $47d7: $09 add hl, bc ; $47d8: $09 ld h, $21 ; $47d9: $26 $21 ld hl, $2121 ; $47db: $21 $21 $21 ld hl, $0921 ; $47de: $21 $21 $09 add hl, bc ; $47e1: $09 add hl, bc ; $47e2: $09 ld h, $21 ; $47e3: $26 $21 ld hl, $2121 ; $47e5: $21 $21 $21 ld hl, $2121 ; $47e8: $21 $21 $21 ld hl, $402b ; $47eb: $21 $2b $40 ld h, $21 ; $47ee: $26 $21 add hl, bc ; $47f0: $09 add hl, bc ; $47f1: $09 add hl, bc ; $47f2: $09 ld h, $21 ; $47f3: $26 $21 ld hl, $2121 ; $47f5: $21 $21 $21 ld hl, $2b21 ; $47f8: $21 $21 $2b ld b, b ; $47fb: $40 ld h, $21 ; $47fc: $26 $21 ld hl, $2321 ; $47fe: $21 $21 $23 inc hl ; $4801: $23 inc hl ; $4802: $23 inc hl ; $4803: $23 inc hl ; $4804: $23 inc hl ; $4805: $23 inc hl ; $4806: $23 inc hl ; $4807: $23 inc hl ; $4808: $23 inc hl ; $4809: $23 inc hl ; $480a: $23 inc hl ; $480b: $23 inc hl ; $480c: $23 dec l ; $480d: $2d dec bc ; $480e: $0b dec bc ; $480f: $0b inc hl ; $4810: $23 inc hl ; $4811: $23 inc hl ; $4812: $23 inc hl ; $4813: $23 inc hl ; $4814: $23 inc hl ; $4815: $23 inc hl ; $4816: $23 inc hl ; $4817: $23 dec l ; $4818: $2d ld b, d ; $4819: $42 jr z, jr_00a_483f ; $481a: $28 $23 inc hl ; $481c: $23 inc hl ; $481d: $23 inc hl ; $481e: $23 dec l ; $481f: $2d inc hl ; $4820: $23 inc hl ; $4821: $23 inc hl ; $4822: $23 inc hl ; $4823: $23 dec l ; $4824: $2d ld b, d ; $4825: $42 jr z, jr_00a_484b ; $4826: $28 $23 inc hl ; $4828: $23 inc hl ; $4829: $23 inc hl ; $482a: $23 inc hl ; $482b: $23 inc hl ; $482c: $23 inc hl ; $482d: $23 inc hl ; $482e: $23 dec l ; $482f: $2d inc hl ; $4830: $23 inc hl ; $4831: $23 inc hl ; $4832: $23 inc hl ; $4833: $23 inc hl ; $4834: $23 inc hl ; $4835: $23 inc hl ; $4836: $23 inc hl ; $4837: $23 inc hl ; $4838: $23 inc hl ; $4839: $23 inc hl ; $483a: $23 inc hl ; $483b: $23 inc hl ; $483c: $23 inc hl ; $483d: $23 inc hl ; $483e: $23 jr_00a_483f: inc hl ; $483f: $23 inc hl ; $4840: $23 inc hl ; $4841: $23 inc hl ; $4842: $23 inc hl ; $4843: $23 inc hl ; $4844: $23 inc hl ; $4845: $23 inc hl ; $4846: $23 dec l ; $4847: $2d ld b, d ; $4848: $42 jr z, @+$25 ; $4849: $28 $23 jr_00a_484b: inc hl ; $484b: $23 dec l ; $484c: $2d ld b, d ; $484d: $42 jr z, jr_00a_4873 ; $484e: $28 $23 inc hl ; $4850: $23 inc hl ; $4851: $23 inc hl ; $4852: $23 inc hl ; $4853: $23 inc hl ; $4854: $23 inc hl ; $4855: $23 inc hl ; $4856: $23 inc hl ; $4857: $23 inc hl ; $4858: $23 inc hl ; $4859: $23 inc hl ; $485a: $23 inc hl ; $485b: $23 inc hl ; $485c: $23 inc hl ; $485d: $23 inc hl ; $485e: $23 inc hl ; $485f: $23 inc hl ; $4860: $23 inc hl ; $4861: $23 inc hl ; $4862: $23 dec l ; $4863: $2d ld b, d ; $4864: $42 jr z, jr_00a_488a ; $4865: $28 $23 inc hl ; $4867: $23 inc hl ; $4868: $23 inc hl ; $4869: $23 inc hl ; $486a: $23 dec l ; $486b: $2d ld b, d ; $486c: $42 jr z, jr_00a_4892 ; $486d: $28 $23 inc hl ; $486f: $23 inc hl ; $4870: $23 inc hl ; $4871: $23 inc hl ; $4872: $23 jr_00a_4873: inc hl ; $4873: $23 inc hl ; $4874: $23 dec l ; $4875: $2d ld b, d ; $4876: $42 jr z, jr_00a_489c ; $4877: $28 $23 inc hl ; $4879: $23 inc hl ; $487a: $23 inc hl ; $487b: $23 inc hl ; $487c: $23 dec l ; $487d: $2d ld b, d ; $487e: $42 jr z, jr_00a_48a4 ; $487f: $28 $23 inc hl ; $4881: $23 inc hl ; $4882: $23 inc hl ; $4883: $23 inc hl ; $4884: $23 inc hl ; $4885: $23 inc hl ; $4886: $23 inc hl ; $4887: $23 dec l ; $4888: $2d ld b, d ; $4889: $42 jr_00a_488a: jr z, @+$25 ; $488a: $28 $23 inc hl ; $488c: $23 inc hl ; $488d: $23 inc hl ; $488e: $23 inc hl ; $488f: $23 inc hl ; $4890: $23 inc hl ; $4891: $23 jr_00a_4892: dec l ; $4892: $2d ld b, d ; $4893: $42 jr z, jr_00a_48b9 ; $4894: $28 $23 inc hl ; $4896: $23 inc hl ; $4897: $23 inc hl ; $4898: $23 inc hl ; $4899: $23 inc hl ; $489a: $23 inc hl ; $489b: $23 jr_00a_489c: inc hl ; $489c: $23 inc hl ; $489d: $23 inc hl ; $489e: $23 inc hl ; $489f: $23 inc hl ; $48a0: $23 inc hl ; $48a1: $23 inc hl ; $48a2: $23 inc hl ; $48a3: $23 jr_00a_48a4: inc hl ; $48a4: $23 inc hl ; $48a5: $23 inc hl ; $48a6: $23 inc hl ; $48a7: $23 inc hl ; $48a8: $23 inc hl ; $48a9: $23 inc hl ; $48aa: $23 inc hl ; $48ab: $23 dec l ; $48ac: $2d ld b, d ; $48ad: $42 jr z, jr_00a_48d3 ; $48ae: $28 $23 inc hl ; $48b0: $23 inc hl ; $48b1: $23 inc hl ; $48b2: $23 inc hl ; $48b3: $23 inc hl ; $48b4: $23 inc hl ; $48b5: $23 inc hl ; $48b6: $23 inc hl ; $48b7: $23 inc hl ; $48b8: $23 jr_00a_48b9: dec l ; $48b9: $2d ld b, d ; $48ba: $42 jr z, jr_00a_48e0 ; $48bb: $28 $23 inc hl ; $48bd: $23 dec l ; $48be: $2d dec bc ; $48bf: $0b inc hl ; $48c0: $23 inc hl ; $48c1: $23 inc hl ; $48c2: $23 inc hl ; $48c3: $23 inc hl ; $48c4: $23 inc hl ; $48c5: $23 inc hl ; $48c6: $23 inc hl ; $48c7: $23 inc hl ; $48c8: $23 inc hl ; $48c9: $23 inc hl ; $48ca: $23 inc hl ; $48cb: $23 inc hl ; $48cc: $23 dec l ; $48cd: $2d ld e, $0b ; $48ce: $1e $0b inc hl ; $48d0: $23 inc hl ; $48d1: $23 inc hl ; $48d2: $23 jr_00a_48d3: inc hl ; $48d3: $23 inc hl ; $48d4: $23 inc hl ; $48d5: $23 dec l ; $48d6: $2d ld b, d ; $48d7: $42 jr z, jr_00a_4907 ; $48d8: $28 $2d ld b, d ; $48da: $42 jr z, jr_00a_4900 ; $48db: $28 $23 dec l ; $48dd: $2d dec bc ; $48de: $0b dec bc ; $48df: $0b jr_00a_48e0: inc hl ; $48e0: $23 dec l ; $48e1: $2d ld b, d ; $48e2: $42 jr z, jr_00a_4908 ; $48e3: $28 $23 inc hl ; $48e5: $23 inc hl ; $48e6: $23 inc hl ; $48e7: $23 inc hl ; $48e8: $23 inc hl ; $48e9: $23 inc hl ; $48ea: $23 inc hl ; $48eb: $23 dec l ; $48ec: $2d ld e, $0b ; $48ed: $1e $0b dec bc ; $48ef: $0b inc hl ; $48f0: $23 inc hl ; $48f1: $23 inc hl ; $48f2: $23 inc hl ; $48f3: $23 inc hl ; $48f4: $23 inc hl ; $48f5: $23 inc hl ; $48f6: $23 dec l ; $48f7: $2d ld b, d ; $48f8: $42 jr z, @+$25 ; $48f9: $28 $23 inc hl ; $48fb: $23 dec l ; $48fc: $2d dec bc ; $48fd: $0b dec bc ; $48fe: $0b dec bc ; $48ff: $0b jr_00a_4900: dec bc ; $4900: $0b dec bc ; $4901: $0b dec bc ; $4902: $0b dec bc ; $4903: $0b jr z, jr_00a_4929 ; $4904: $28 $23 inc hl ; $4906: $23 jr_00a_4907: dec l ; $4907: $2d jr_00a_4908: ld b, d ; $4908: $42 jr z, jr_00a_492e ; $4909: $28 $23 inc hl ; $490b: $23 inc hl ; $490c: $23 inc hl ; $490d: $23 inc hl ; $490e: $23 inc hl ; $490f: $23 dec bc ; $4910: $0b dec bc ; $4911: $0b dec bc ; $4912: $0b dec bc ; $4913: $0b dec bc ; $4914: $0b dec bc ; $4915: $0b dec e ; $4916: $1d jr z, jr_00a_493c ; $4917: $28 $23 inc hl ; $4919: $23 inc hl ; $491a: $23 dec l ; $491b: $2d ld b, d ; $491c: $42 jr z, jr_00a_4942 ; $491d: $28 $23 inc hl ; $491f: $23 dec bc ; $4920: $0b dec bc ; $4921: $0b dec bc ; $4922: $0b dec bc ; $4923: $0b dec bc ; $4924: $0b dec bc ; $4925: $0b dec bc ; $4926: $0b dec bc ; $4927: $0b dec bc ; $4928: $0b jr_00a_4929: dec e ; $4929: $1d jr z, jr_00a_494f ; $492a: $28 $23 inc hl ; $492c: $23 dec l ; $492d: $2d jr_00a_492e: ld b, d ; $492e: $42 jr z, jr_00a_495e ; $492f: $28 $2d dec bc ; $4931: $0b dec bc ; $4932: $0b dec bc ; $4933: $0b dec bc ; $4934: $0b dec bc ; $4935: $0b dec bc ; $4936: $0b dec bc ; $4937: $0b dec bc ; $4938: $0b dec bc ; $4939: $0b dec bc ; $493a: $0b dec e ; $493b: $1d jr_00a_493c: jr z, jr_00a_4961 ; $493c: $28 $23 inc hl ; $493e: $23 inc hl ; $493f: $23 inc hl ; $4940: $23 inc hl ; $4941: $23 jr_00a_4942: dec l ; $4942: $2d dec bc ; $4943: $0b dec bc ; $4944: $0b dec bc ; $4945: $0b dec bc ; $4946: $0b dec bc ; $4947: $0b dec bc ; $4948: $0b dec bc ; $4949: $0b dec bc ; $494a: $0b dec bc ; $494b: $0b jr z, jr_00a_4971 ; $494c: $28 $23 inc hl ; $494e: $23 jr_00a_494f: inc hl ; $494f: $23 inc hl ; $4950: $23 inc hl ; $4951: $23 inc hl ; $4952: $23 inc hl ; $4953: $23 dec l ; $4954: $2d dec bc ; $4955: $0b dec bc ; $4956: $0b dec bc ; $4957: $0b dec bc ; $4958: $0b dec bc ; $4959: $0b dec bc ; $495a: $0b dec bc ; $495b: $0b jr z, jr_00a_4981 ; $495c: $28 $23 jr_00a_495e: inc hl ; $495e: $23 inc hl ; $495f: $23 inc hl ; $4960: $23 jr_00a_4961: dec l ; $4961: $2d ld b, d ; $4962: $42 jr z, jr_00a_4988 ; $4963: $28 $23 inc hl ; $4965: $23 dec l ; $4966: $2d dec bc ; $4967: $0b dec bc ; $4968: $0b dec bc ; $4969: $0b dec bc ; $496a: $0b dec bc ; $496b: $0b dec e ; $496c: $1d jr z, @+$25 ; $496d: $28 $23 inc hl ; $496f: $23 inc hl ; $4970: $23 jr_00a_4971: inc hl ; $4971: $23 inc hl ; $4972: $23 dec l ; $4973: $2d ld b, d ; $4974: $42 jr z, jr_00a_499a ; $4975: $28 $23 dec l ; $4977: $2d dec bc ; $4978: $0b dec bc ; $4979: $0b dec bc ; $497a: $0b dec bc ; $497b: $0b dec bc ; $497c: $0b jr z, jr_00a_49a2 ; $497d: $28 $23 inc hl ; $497f: $23 inc hl ; $4980: $23 jr_00a_4981: inc hl ; $4981: $23 inc hl ; $4982: $23 inc hl ; $4983: $23 inc hl ; $4984: $23 dec l ; $4985: $2d ld e, $0b ; $4986: $1e $0b jr_00a_4988: dec bc ; $4988: $0b dec bc ; $4989: $0b dec bc ; $498a: $0b dec bc ; $498b: $0b dec bc ; $498c: $0b jr z, @+$2f ; $498d: $28 $2d ld b, d ; $498f: $42 ld b, d ; $4990: $42 jr z, jr_00a_49b6 ; $4991: $28 $23 inc hl ; $4993: $23 dec l ; $4994: $2d dec bc ; $4995: $0b dec bc ; $4996: $0b dec bc ; $4997: $0b dec bc ; $4998: $0b dec bc ; $4999: $0b jr_00a_499a: dec bc ; $499a: $0b dec bc ; $499b: $0b dec bc ; $499c: $0b jr z, jr_00a_49c2 ; $499d: $28 $23 inc hl ; $499f: $23 inc hl ; $49a0: $23 dec l ; $49a1: $2d jr_00a_49a2: ld e, $0b ; $49a2: $1e $0b dec bc ; $49a4: $0b dec bc ; $49a5: $0b dec bc ; $49a6: $0b dec bc ; $49a7: $0b dec bc ; $49a8: $0b dec bc ; $49a9: $0b dec bc ; $49aa: $0b jr z, jr_00a_49d0 ; $49ab: $28 $23 inc hl ; $49ad: $23 inc hl ; $49ae: $23 inc hl ; $49af: $23 dec bc ; $49b0: $0b dec bc ; $49b1: $0b dec bc ; $49b2: $0b dec bc ; $49b3: $0b dec bc ; $49b4: $0b dec bc ; $49b5: $0b jr_00a_49b6: dec bc ; $49b6: $0b dec bc ; $49b7: $0b dec bc ; $49b8: $0b dec bc ; $49b9: $0b dec bc ; $49ba: $0b jr z, jr_00a_49ea ; $49bb: $28 $2d ld b, d ; $49bd: $42 jr z, jr_00a_49e3 ; $49be: $28 $23 dec bc ; $49c0: $0b dec bc ; $49c1: $0b jr_00a_49c2: dec bc ; $49c2: $0b dec bc ; $49c3: $0b dec bc ; $49c4: $0b dec bc ; $49c5: $0b dec bc ; $49c6: $0b dec bc ; $49c7: $0b dec bc ; $49c8: $0b jr z, jr_00a_49ee ; $49c9: $28 $23 inc hl ; $49cb: $23 inc hl ; $49cc: $23 inc hl ; $49cd: $23 inc hl ; $49ce: $23 inc hl ; $49cf: $23 jr_00a_49d0: dec bc ; $49d0: $0b dec bc ; $49d1: $0b dec bc ; $49d2: $0b dec bc ; $49d3: $0b dec bc ; $49d4: $0b dec bc ; $49d5: $0b dec bc ; $49d6: $0b dec bc ; $49d7: $0b jr z, @+$25 ; $49d8: $28 $23 inc hl ; $49da: $23 inc hl ; $49db: $23 inc hl ; $49dc: $23 inc hl ; $49dd: $23 inc hl ; $49de: $23 inc hl ; $49df: $23 dec bc ; $49e0: $0b dec bc ; $49e1: $0b dec bc ; $49e2: $0b jr_00a_49e3: dec bc ; $49e3: $0b dec bc ; $49e4: $0b dec bc ; $49e5: $0b jr z, jr_00a_4a0b ; $49e6: $28 $23 inc hl ; $49e8: $23 inc hl ; $49e9: $23 jr_00a_49ea: inc hl ; $49ea: $23 inc hl ; $49eb: $23 inc hl ; $49ec: $23 dec l ; $49ed: $2d jr_00a_49ee: ld b, d ; $49ee: $42 jr z, jr_00a_49fc ; $49ef: $28 $0b dec bc ; $49f1: $0b dec bc ; $49f2: $0b jr z, jr_00a_4a18 ; $49f3: $28 $23 inc hl ; $49f5: $23 inc hl ; $49f6: $23 inc hl ; $49f7: $23 inc hl ; $49f8: $23 inc hl ; $49f9: $23 dec l ; $49fa: $2d ld b, d ; $49fb: $42 jr_00a_49fc: jr z, jr_00a_4a21 ; $49fc: $28 $23 inc hl ; $49fe: $23 inc hl ; $49ff: $23 inc hl ; $4a00: $23 inc hl ; $4a01: $23 inc hl ; $4a02: $23 inc hl ; $4a03: $23 inc hl ; $4a04: $23 inc hl ; $4a05: $23 inc hl ; $4a06: $23 inc hl ; $4a07: $23 inc hl ; $4a08: $23 inc hl ; $4a09: $23 inc hl ; $4a0a: $23 jr_00a_4a0b: dec l ; $4a0b: $2d dec bc ; $4a0c: $0b dec bc ; $4a0d: $0b dec bc ; $4a0e: $0b dec bc ; $4a0f: $0b inc hl ; $4a10: $23 inc hl ; $4a11: $23 inc hl ; $4a12: $23 dec l ; $4a13: $2d ld b, d ; $4a14: $42 jr z, jr_00a_4a3a ; $4a15: $28 $23 inc hl ; $4a17: $23 jr_00a_4a18: dec l ; $4a18: $2d ld e, $0b ; $4a19: $1e $0b dec bc ; $4a1b: $0b dec bc ; $4a1c: $0b dec bc ; $4a1d: $0b dec bc ; $4a1e: $0b dec bc ; $4a1f: $0b inc hl ; $4a20: $23 jr_00a_4a21: inc hl ; $4a21: $23 inc hl ; $4a22: $23 inc hl ; $4a23: $23 inc hl ; $4a24: $23 dec l ; $4a25: $2d ld e, $0b ; $4a26: $1e $0b dec bc ; $4a28: $0b dec bc ; $4a29: $0b dec bc ; $4a2a: $0b dec bc ; $4a2b: $0b dec bc ; $4a2c: $0b dec bc ; $4a2d: $0b dec bc ; $4a2e: $0b dec bc ; $4a2f: $0b ld b, d ; $4a30: $42 jr z, jr_00a_4a56 ; $4a31: $28 $23 dec l ; $4a33: $2d ld e, $0b ; $4a34: $1e $0b dec bc ; $4a36: $0b dec bc ; $4a37: $0b dec bc ; $4a38: $0b dec bc ; $4a39: $0b jr_00a_4a3a: dec bc ; $4a3a: $0b dec bc ; $4a3b: $0b dec bc ; $4a3c: $0b dec bc ; $4a3d: $0b jr z, @+$25 ; $4a3e: $28 $23 inc hl ; $4a40: $23 inc hl ; $4a41: $23 dec l ; $4a42: $2d ld e, $0b ; $4a43: $1e $0b dec bc ; $4a45: $0b dec bc ; $4a46: $0b dec bc ; $4a47: $0b dec bc ; $4a48: $0b dec bc ; $4a49: $0b dec bc ; $4a4a: $0b dec bc ; $4a4b: $0b dec bc ; $4a4c: $0b jr z, jr_00a_4a72 ; $4a4d: $28 $23 inc hl ; $4a4f: $23 inc hl ; $4a50: $23 inc hl ; $4a51: $23 dec l ; $4a52: $2d dec bc ; $4a53: $0b dec bc ; $4a54: $0b dec bc ; $4a55: $0b jr_00a_4a56: dec bc ; $4a56: $0b dec bc ; $4a57: $0b dec bc ; $4a58: $0b dec bc ; $4a59: $0b dec bc ; $4a5a: $0b jr z, jr_00a_4a80 ; $4a5b: $28 $23 inc hl ; $4a5d: $23 inc hl ; $4a5e: $23 inc hl ; $4a5f: $23 dec l ; $4a60: $2d ld b, d ; $4a61: $42 ld b, $0b ; $4a62: $06 $0b dec bc ; $4a64: $0b dec bc ; $4a65: $0b dec bc ; $4a66: $0b dec bc ; $4a67: $0b dec bc ; $4a68: $0b jr z, @+$25 ; $4a69: $28 $23 inc hl ; $4a6b: $23 inc hl ; $4a6c: $23 dec l ; $4a6d: $2d ld b, d ; $4a6e: $42 jr z, jr_00a_4a94 ; $4a6f: $28 $23 inc hl ; $4a71: $23 jr_00a_4a72: dec l ; $4a72: $2d dec bc ; $4a73: $0b dec bc ; $4a74: $0b dec bc ; $4a75: $0b dec bc ; $4a76: $0b dec bc ; $4a77: $0b jr z, @+$25 ; $4a78: $28 $23 dec l ; $4a7a: $2d ld b, d ; $4a7b: $42 jr z, jr_00a_4aa1 ; $4a7c: $28 $23 inc hl ; $4a7e: $23 inc hl ; $4a7f: $23 jr_00a_4a80: ld b, d ; $4a80: $42 jr z, jr_00a_4aa6 ; $4a81: $28 $23 dec l ; $4a83: $2d dec bc ; $4a84: $0b dec bc ; $4a85: $0b dec bc ; $4a86: $0b dec bc ; $4a87: $0b dec bc ; $4a88: $0b dec e ; $4a89: $1d jr z, @+$25 ; $4a8a: $28 $23 inc hl ; $4a8c: $23 jr z, jr_00a_4ab2 ; $4a8d: $28 $23 inc hl ; $4a8f: $23 inc hl ; $4a90: $23 inc hl ; $4a91: $23 inc hl ; $4a92: $23 dec l ; $4a93: $2d jr_00a_4a94: dec bc ; $4a94: $0b dec bc ; $4a95: $0b dec bc ; $4a96: $0b dec bc ; $4a97: $0b dec bc ; $4a98: $0b dec bc ; $4a99: $0b dec bc ; $4a9a: $0b dec e ; $4a9b: $1d jr z, jr_00a_4ac1 ; $4a9c: $28 $23 inc hl ; $4a9e: $23 inc hl ; $4a9f: $23 inc hl ; $4aa0: $23 jr_00a_4aa1: inc hl ; $4aa1: $23 inc hl ; $4aa2: $23 inc hl ; $4aa3: $23 dec l ; $4aa4: $2d dec bc ; $4aa5: $0b jr_00a_4aa6: dec bc ; $4aa6: $0b dec bc ; $4aa7: $0b dec bc ; $4aa8: $0b dec bc ; $4aa9: $0b dec bc ; $4aaa: $0b dec bc ; $4aab: $0b dec bc ; $4aac: $0b dec e ; $4aad: $1d jr z, jr_00a_4ad3 ; $4aae: $28 $23 dec l ; $4ab0: $2d ld b, d ; $4ab1: $42 jr_00a_4ab2: jr z, jr_00a_4ad7 ; $4ab2: $28 $23 inc hl ; $4ab4: $23 inc hl ; $4ab5: $23 dec l ; $4ab6: $2d dec bc ; $4ab7: $0b dec bc ; $4ab8: $0b dec bc ; $4ab9: $0b dec bc ; $4aba: $0b dec bc ; $4abb: $0b dec bc ; $4abc: $0b dec bc ; $4abd: $0b dec bc ; $4abe: $0b dec bc ; $4abf: $0b inc hl ; $4ac0: $23 jr_00a_4ac1: inc hl ; $4ac1: $23 inc hl ; $4ac2: $23 dec l ; $4ac3: $2d ld b, d ; $4ac4: $42 jr z, jr_00a_4aea ; $4ac5: $28 $23 dec l ; $4ac7: $2d dec bc ; $4ac8: $0b dec bc ; $4ac9: $0b dec bc ; $4aca: $0b dec bc ; $4acb: $0b dec bc ; $4acc: $0b dec bc ; $4acd: $0b dec bc ; $4ace: $0b dec bc ; $4acf: $0b inc hl ; $4ad0: $23 inc hl ; $4ad1: $23 inc hl ; $4ad2: $23 jr_00a_4ad3: inc hl ; $4ad3: $23 inc hl ; $4ad4: $23 inc hl ; $4ad5: $23 inc hl ; $4ad6: $23 jr_00a_4ad7: inc hl ; $4ad7: $23 dec l ; $4ad8: $2d dec bc ; $4ad9: $0b dec bc ; $4ada: $0b dec bc ; $4adb: $0b dec bc ; $4adc: $0b dec bc ; $4add: $0b dec bc ; $4ade: $0b dec bc ; $4adf: $0b ld b, d ; $4ae0: $42 jr z, jr_00a_4b06 ; $4ae1: $28 $23 inc hl ; $4ae3: $23 inc hl ; $4ae4: $23 inc hl ; $4ae5: $23 inc hl ; $4ae6: $23 inc hl ; $4ae7: $23 inc hl ; $4ae8: $23 inc hl ; $4ae9: $23 jr_00a_4aea: dec l ; $4aea: $2d dec bc ; $4aeb: $0b dec bc ; $4aec: $0b dec bc ; $4aed: $0b dec bc ; $4aee: $0b dec bc ; $4aef: $0b inc hl ; $4af0: $23 inc hl ; $4af1: $23 inc hl ; $4af2: $23 inc hl ; $4af3: $23 dec l ; $4af4: $2d ld b, d ; $4af5: $42 jr z, jr_00a_4b1b ; $4af6: $28 $23 inc hl ; $4af8: $23 inc hl ; $4af9: $23 inc hl ; $4afa: $23 inc hl ; $4afb: $23 dec l ; $4afc: $2d dec bc ; $4afd: $0b dec bc ; $4afe: $0b dec bc ; $4aff: $0b dec bc ; $4b00: $0b dec bc ; $4b01: $0b jr z, jr_00a_4b27 ; $4b02: $28 $23 inc hl ; $4b04: $23 dec l ; $4b05: $2d jr_00a_4b06: ld b, d ; $4b06: $42 jr z, jr_00a_4b2c ; $4b07: $28 $23 inc hl ; $4b09: $23 inc hl ; $4b0a: $23 inc hl ; $4b0b: $23 inc hl ; $4b0c: $23 inc hl ; $4b0d: $23 inc hl ; $4b0e: $23 inc hl ; $4b0f: $23 jr z, jr_00a_4b35 ; $4b10: $28 $23 inc hl ; $4b12: $23 inc hl ; $4b13: $23 inc hl ; $4b14: $23 inc hl ; $4b15: $23 inc hl ; $4b16: $23 inc hl ; $4b17: $23 inc hl ; $4b18: $23 inc hl ; $4b19: $23 inc hl ; $4b1a: $23 jr_00a_4b1b: dec l ; $4b1b: $2d ld b, d ; $4b1c: $42 jr z, jr_00a_4b42 ; $4b1d: $28 $23 inc hl ; $4b1f: $23 jr z, jr_00a_4b45 ; $4b20: $28 $23 inc hl ; $4b22: $23 inc hl ; $4b23: $23 inc hl ; $4b24: $23 inc hl ; $4b25: $23 dec l ; $4b26: $2d jr_00a_4b27: ld b, d ; $4b27: $42 jr z, @+$25 ; $4b28: $28 $23 inc hl ; $4b2a: $23 inc hl ; $4b2b: $23 jr_00a_4b2c: inc hl ; $4b2c: $23 inc hl ; $4b2d: $23 inc hl ; $4b2e: $23 inc hl ; $4b2f: $23 inc hl ; $4b30: $23 dec l ; $4b31: $2d ld b, d ; $4b32: $42 jr z, jr_00a_4b58 ; $4b33: $28 $23 jr_00a_4b35: inc hl ; $4b35: $23 inc hl ; $4b36: $23 inc hl ; $4b37: $23 inc hl ; $4b38: $23 inc hl ; $4b39: $23 inc hl ; $4b3a: $23 inc hl ; $4b3b: $23 inc hl ; $4b3c: $23 dec l ; $4b3d: $2d ld b, d ; $4b3e: $42 jr z, jr_00a_4b64 ; $4b3f: $28 $23 inc hl ; $4b41: $23 jr_00a_4b42: inc hl ; $4b42: $23 inc hl ; $4b43: $23 dec l ; $4b44: $2d jr_00a_4b45: ld b, d ; $4b45: $42 jr z, jr_00a_4b6b ; $4b46: $28 $23 inc hl ; $4b48: $23 inc hl ; $4b49: $23 dec l ; $4b4a: $2d ld b, d ; $4b4b: $42 jr z, jr_00a_4b71 ; $4b4c: $28 $23 inc hl ; $4b4e: $23 inc hl ; $4b4f: $23 inc hl ; $4b50: $23 inc hl ; $4b51: $23 inc hl ; $4b52: $23 inc hl ; $4b53: $23 inc hl ; $4b54: $23 inc hl ; $4b55: $23 inc hl ; $4b56: $23 inc hl ; $4b57: $23 jr_00a_4b58: inc hl ; $4b58: $23 inc hl ; $4b59: $23 inc hl ; $4b5a: $23 inc hl ; $4b5b: $23 inc hl ; $4b5c: $23 inc hl ; $4b5d: $23 inc hl ; $4b5e: $23 inc hl ; $4b5f: $23 inc hl ; $4b60: $23 inc hl ; $4b61: $23 inc hl ; $4b62: $23 inc hl ; $4b63: $23 jr_00a_4b64: inc hl ; $4b64: $23 inc hl ; $4b65: $23 inc hl ; $4b66: $23 inc hl ; $4b67: $23 inc hl ; $4b68: $23 inc hl ; $4b69: $23 inc hl ; $4b6a: $23 jr_00a_4b6b: inc hl ; $4b6b: $23 inc hl ; $4b6c: $23 inc hl ; $4b6d: $23 inc hl ; $4b6e: $23 inc hl ; $4b6f: $23 inc hl ; $4b70: $23 jr_00a_4b71: inc hl ; $4b71: $23 inc hl ; $4b72: $23 inc hl ; $4b73: $23 inc hl ; $4b74: $23 inc hl ; $4b75: $23 inc hl ; $4b76: $23 inc hl ; $4b77: $23 inc hl ; $4b78: $23 inc hl ; $4b79: $23 inc hl ; $4b7a: $23 inc hl ; $4b7b: $23 dec l ; $4b7c: $2d ld b, d ; $4b7d: $42 jr z, jr_00a_4ba3 ; $4b7e: $28 $23 dec l ; $4b80: $2d ld b, d ; $4b81: $42 jr z, @+$25 ; $4b82: $28 $23 inc hl ; $4b84: $23 inc hl ; $4b85: $23 dec l ; $4b86: $2d ld b, d ; $4b87: $42 jr z, jr_00a_4bad ; $4b88: $28 $23 inc hl ; $4b8a: $23 inc hl ; $4b8b: $23 inc hl ; $4b8c: $23 inc hl ; $4b8d: $23 inc hl ; $4b8e: $23 inc hl ; $4b8f: $23 inc hl ; $4b90: $23 inc hl ; $4b91: $23 inc hl ; $4b92: $23 inc hl ; $4b93: $23 inc hl ; $4b94: $23 inc hl ; $4b95: $23 inc hl ; $4b96: $23 inc hl ; $4b97: $23 inc hl ; $4b98: $23 inc hl ; $4b99: $23 inc hl ; $4b9a: $23 inc hl ; $4b9b: $23 inc hl ; $4b9c: $23 inc hl ; $4b9d: $23 inc hl ; $4b9e: $23 inc hl ; $4b9f: $23 inc hl ; $4ba0: $23 inc hl ; $4ba1: $23 inc hl ; $4ba2: $23 jr_00a_4ba3: inc hl ; $4ba3: $23 dec l ; $4ba4: $2d ld b, d ; $4ba5: $42 jr z, jr_00a_4bcb ; $4ba6: $28 $23 inc hl ; $4ba8: $23 inc hl ; $4ba9: $23 inc hl ; $4baa: $23 inc hl ; $4bab: $23 inc hl ; $4bac: $23 jr_00a_4bad: inc hl ; $4bad: $23 inc hl ; $4bae: $23 inc hl ; $4baf: $23 jr z, jr_00a_4bd5 ; $4bb0: $28 $23 inc hl ; $4bb2: $23 inc hl ; $4bb3: $23 inc hl ; $4bb4: $23 inc hl ; $4bb5: $23 inc hl ; $4bb6: $23 inc hl ; $4bb7: $23 inc hl ; $4bb8: $23 inc hl ; $4bb9: $23 inc hl ; $4bba: $23 dec l ; $4bbb: $2d ld b, d ; $4bbc: $42 jr z, jr_00a_4be2 ; $4bbd: $28 $23 inc hl ; $4bbf: $23 dec bc ; $4bc0: $0b dec e ; $4bc1: $1d jr z, jr_00a_4bf1 ; $4bc2: $28 $2d ld b, d ; $4bc4: $42 jr z, jr_00a_4bea ; $4bc5: $28 $23 inc hl ; $4bc7: $23 inc hl ; $4bc8: $23 inc hl ; $4bc9: $23 inc hl ; $4bca: $23 jr_00a_4bcb: inc hl ; $4bcb: $23 inc hl ; $4bcc: $23 inc hl ; $4bcd: $23 dec l ; $4bce: $2d ld b, d ; $4bcf: $42 dec bc ; $4bd0: $0b dec bc ; $4bd1: $0b jr z, jr_00a_4bf7 ; $4bd2: $28 $23 inc hl ; $4bd4: $23 jr_00a_4bd5: inc hl ; $4bd5: $23 dec l ; $4bd6: $2d ld b, d ; $4bd7: $42 jr z, @+$25 ; $4bd8: $28 $23 inc hl ; $4bda: $23 inc hl ; $4bdb: $23 inc hl ; $4bdc: $23 inc hl ; $4bdd: $23 inc hl ; $4bde: $23 inc hl ; $4bdf: $23 dec bc ; $4be0: $0b dec bc ; $4be1: $0b jr_00a_4be2: dec e ; $4be2: $1d jr z, jr_00a_4c08 ; $4be3: $28 $23 inc hl ; $4be5: $23 inc hl ; $4be6: $23 inc hl ; $4be7: $23 inc hl ; $4be8: $23 inc hl ; $4be9: $23 jr_00a_4bea: inc hl ; $4bea: $23 inc hl ; $4beb: $23 dec l ; $4bec: $2d ld b, d ; $4bed: $42 jr z, @+$25 ; $4bee: $28 $23 dec bc ; $4bf0: $0b jr_00a_4bf1: dec bc ; $4bf1: $0b dec bc ; $4bf2: $0b jr z, jr_00a_4c18 ; $4bf3: $28 $23 inc hl ; $4bf5: $23 inc hl ; $4bf6: $23 jr_00a_4bf7: inc hl ; $4bf7: $23 inc hl ; $4bf8: $23 inc hl ; $4bf9: $23 dec l ; $4bfa: $2d ld b, d ; $4bfb: $42 jr z, @+$25 ; $4bfc: $28 $23 inc hl ; $4bfe: $23 inc hl ; $4bff: $23 jr z, @+$25 ; $4c00: $28 $23 inc hl ; $4c02: $23 inc hl ; $4c03: $23 inc hl ; $4c04: $23 inc hl ; $4c05: $23 inc hl ; $4c06: $23 dec l ; $4c07: $2d jr_00a_4c08: ld b, d ; $4c08: $42 jr z, jr_00a_4c2e ; $4c09: $28 $23 dec l ; $4c0b: $2d dec bc ; $4c0c: $0b dec bc ; $4c0d: $0b dec bc ; $4c0e: $0b dec bc ; $4c0f: $0b dec l ; $4c10: $2d ld b, d ; $4c11: $42 jr z, jr_00a_4c37 ; $4c12: $28 $23 inc hl ; $4c14: $23 inc hl ; $4c15: $23 inc hl ; $4c16: $23 inc hl ; $4c17: $23 jr_00a_4c18: inc hl ; $4c18: $23 dec l ; $4c19: $2d ld e, $0b ; $4c1a: $1e $0b dec bc ; $4c1c: $0b dec bc ; $4c1d: $0b dec bc ; $4c1e: $0b dec bc ; $4c1f: $0b jr z, jr_00a_4c45 ; $4c20: $28 $23 dec l ; $4c22: $2d ld b, d ; $4c23: $42 jr z, jr_00a_4c49 ; $4c24: $28 $23 inc hl ; $4c26: $23 dec l ; $4c27: $2d dec bc ; $4c28: $0b dec bc ; $4c29: $0b dec bc ; $4c2a: $0b dec bc ; $4c2b: $0b dec bc ; $4c2c: $0b dec bc ; $4c2d: $0b jr_00a_4c2e: dec bc ; $4c2e: $0b dec bc ; $4c2f: $0b inc hl ; $4c30: $23 inc hl ; $4c31: $23 inc hl ; $4c32: $23 inc hl ; $4c33: $23 inc hl ; $4c34: $23 inc hl ; $4c35: $23 inc hl ; $4c36: $23 jr_00a_4c37: dec l ; $4c37: $2d dec bc ; $4c38: $0b dec bc ; $4c39: $0b dec bc ; $4c3a: $0b dec bc ; $4c3b: $0b dec bc ; $4c3c: $0b dec bc ; $4c3d: $0b jr z, jr_00a_4c63 ; $4c3e: $28 $23 jr z, jr_00a_4c65 ; $4c40: $28 $23 inc hl ; $4c42: $23 inc hl ; $4c43: $23 inc hl ; $4c44: $23 jr_00a_4c45: inc hl ; $4c45: $23 inc hl ; $4c46: $23 dec l ; $4c47: $2d dec bc ; $4c48: $0b jr_00a_4c49: dec bc ; $4c49: $0b dec bc ; $4c4a: $0b dec bc ; $4c4b: $0b dec bc ; $4c4c: $0b jr z, jr_00a_4c72 ; $4c4d: $28 $23 inc hl ; $4c4f: $23 dec bc ; $4c50: $0b dec bc ; $4c51: $0b dec bc ; $4c52: $0b dec bc ; $4c53: $0b dec bc ; $4c54: $0b dec bc ; $4c55: $0b dec bc ; $4c56: $0b dec bc ; $4c57: $0b dec bc ; $4c58: $0b dec bc ; $4c59: $0b dec bc ; $4c5a: $0b dec bc ; $4c5b: $0b dec bc ; $4c5c: $0b jr z, jr_00a_4c87 ; $4c5d: $28 $28 inc hl ; $4c5f: $23 jr z, jr_00a_4c85 ; $4c60: $28 $23 inc hl ; $4c62: $23 jr_00a_4c63: inc hl ; $4c63: $23 inc hl ; $4c64: $23 jr_00a_4c65: inc hl ; $4c65: $23 inc hl ; $4c66: $23 inc hl ; $4c67: $23 inc hl ; $4c68: $23 jr z, jr_00a_4c8e ; $4c69: $28 $23 inc hl ; $4c6b: $23 inc hl ; $4c6c: $23 inc hl ; $4c6d: $23 inc hl ; $4c6e: $23 inc hl ; $4c6f: $23 dec bc ; $4c70: $0b dec bc ; $4c71: $0b jr_00a_4c72: dec bc ; $4c72: $0b dec bc ; $4c73: $0b dec bc ; $4c74: $0b dec bc ; $4c75: $0b dec bc ; $4c76: $0b dec e ; $4c77: $1d jr z, jr_00a_4c9d ; $4c78: $28 $23 inc hl ; $4c7a: $23 inc hl ; $4c7b: $23 inc hl ; $4c7c: $23 inc hl ; $4c7d: $23 inc hl ; $4c7e: $23 inc hl ; $4c7f: $23 dec bc ; $4c80: $0b dec bc ; $4c81: $0b dec bc ; $4c82: $0b dec bc ; $4c83: $0b dec bc ; $4c84: $0b jr_00a_4c85: dec bc ; $4c85: $0b dec bc ; $4c86: $0b jr_00a_4c87: dec bc ; $4c87: $0b dec bc ; $4c88: $0b dec e ; $4c89: $1d jr z, jr_00a_4caf ; $4c8a: $28 $23 inc hl ; $4c8c: $23 dec l ; $4c8d: $2d jr_00a_4c8e: ld e, $0b ; $4c8e: $1e $0b dec bc ; $4c90: $0b dec bc ; $4c91: $0b dec bc ; $4c92: $0b dec bc ; $4c93: $0b dec bc ; $4c94: $0b dec bc ; $4c95: $0b dec bc ; $4c96: $0b dec bc ; $4c97: $0b dec bc ; $4c98: $0b dec bc ; $4c99: $0b dec bc ; $4c9a: $0b dec bc ; $4c9b: $0b dec bc ; $4c9c: $0b jr_00a_4c9d: dec bc ; $4c9d: $0b dec bc ; $4c9e: $0b dec bc ; $4c9f: $0b inc hl ; $4ca0: $23 inc hl ; $4ca1: $23 inc hl ; $4ca2: $23 inc hl ; $4ca3: $23 dec l ; $4ca4: $2d dec bc ; $4ca5: $0b dec bc ; $4ca6: $0b dec bc ; $4ca7: $0b dec bc ; $4ca8: $0b dec bc ; $4ca9: $0b dec bc ; $4caa: $0b dec bc ; $4cab: $0b dec bc ; $4cac: $0b dec bc ; $4cad: $0b dec bc ; $4cae: $0b jr_00a_4caf: dec bc ; $4caf: $0b inc hl ; $4cb0: $23 dec l ; $4cb1: $2d ld b, d ; $4cb2: $42 jr z, jr_00a_4ce2 ; $4cb3: $28 $2d dec bc ; $4cb5: $0b dec bc ; $4cb6: $0b dec bc ; $4cb7: $0b dec bc ; $4cb8: $0b dec bc ; $4cb9: $0b dec bc ; $4cba: $0b dec bc ; $4cbb: $0b dec bc ; $4cbc: $0b dec bc ; $4cbd: $0b dec bc ; $4cbe: $0b dec bc ; $4cbf: $0b inc hl ; $4cc0: $23 inc hl ; $4cc1: $23 inc hl ; $4cc2: $23 inc hl ; $4cc3: $23 inc hl ; $4cc4: $23 inc hl ; $4cc5: $23 dec l ; $4cc6: $2d dec bc ; $4cc7: $0b dec bc ; $4cc8: $0b dec bc ; $4cc9: $0b dec bc ; $4cca: $0b dec bc ; $4ccb: $0b dec bc ; $4ccc: $0b dec bc ; $4ccd: $0b dec bc ; $4cce: $0b dec bc ; $4ccf: $0b dec l ; $4cd0: $2d ld b, d ; $4cd1: $42 jr z, jr_00a_4cf7 ; $4cd2: $28 $23 inc hl ; $4cd4: $23 inc hl ; $4cd5: $23 inc hl ; $4cd6: $23 dec l ; $4cd7: $2d dec bc ; $4cd8: $0b dec bc ; $4cd9: $0b dec bc ; $4cda: $0b dec bc ; $4cdb: $0b dec bc ; $4cdc: $0b dec bc ; $4cdd: $0b dec bc ; $4cde: $0b dec bc ; $4cdf: $0b inc hl ; $4ce0: $23 inc hl ; $4ce1: $23 jr_00a_4ce2: inc hl ; $4ce2: $23 dec l ; $4ce3: $2d ld b, d ; $4ce4: $42 jr z, jr_00a_4d0a ; $4ce5: $28 $23 dec l ; $4ce7: $2d dec bc ; $4ce8: $0b dec bc ; $4ce9: $0b dec bc ; $4cea: $0b dec bc ; $4ceb: $0b dec bc ; $4cec: $0b dec bc ; $4ced: $0b dec bc ; $4cee: $0b dec bc ; $4cef: $0b inc hl ; $4cf0: $23 inc hl ; $4cf1: $23 inc hl ; $4cf2: $23 inc hl ; $4cf3: $23 inc hl ; $4cf4: $23 inc hl ; $4cf5: $23 inc hl ; $4cf6: $23 jr_00a_4cf7: inc hl ; $4cf7: $23 inc hl ; $4cf8: $23 jr z, @+$25 ; $4cf9: $28 $23 inc hl ; $4cfb: $23 inc hl ; $4cfc: $23 inc hl ; $4cfd: $23 inc hl ; $4cfe: $23 inc hl ; $4cff: $23 dec bc ; $4d00: $0b dec bc ; $4d01: $0b dec bc ; $4d02: $0b dec bc ; $4d03: $0b jr z, jr_00a_4d29 ; $4d04: $28 $23 inc hl ; $4d06: $23 inc hl ; $4d07: $23 inc hl ; $4d08: $23 inc hl ; $4d09: $23 jr_00a_4d0a: inc hl ; $4d0a: $23 inc hl ; $4d0b: $23 inc hl ; $4d0c: $23 inc hl ; $4d0d: $23 inc hl ; $4d0e: $23 inc hl ; $4d0f: $23 dec bc ; $4d10: $0b dec bc ; $4d11: $0b dec bc ; $4d12: $0b dec bc ; $4d13: $0b dec e ; $4d14: $1d add hl, de ; $4d15: $19 add hl, de ; $4d16: $19 jr z, jr_00a_4d3c ; $4d17: $28 $23 inc hl ; $4d19: $23 inc hl ; $4d1a: $23 dec l ; $4d1b: $2d ld b, d ; $4d1c: $42 jr z, jr_00a_4d42 ; $4d1d: $28 $23 inc hl ; $4d1f: $23 dec bc ; $4d20: $0b dec bc ; $4d21: $0b dec bc ; $4d22: $0b dec bc ; $4d23: $0b dec bc ; $4d24: $0b dec bc ; $4d25: $0b dec bc ; $4d26: $0b dec e ; $4d27: $1d add hl, de ; $4d28: $19 jr_00a_4d29: add hl, de ; $4d29: $19 jr z, jr_00a_4d4f ; $4d2a: $28 $23 inc hl ; $4d2c: $23 dec l ; $4d2d: $2d ld b, d ; $4d2e: $42 jr z, @+$2f ; $4d2f: $28 $2d dec bc ; $4d31: $0b dec bc ; $4d32: $0b dec bc ; $4d33: $0b dec bc ; $4d34: $0b dec bc ; $4d35: $0b dec bc ; $4d36: $0b dec bc ; $4d37: $0b dec bc ; $4d38: $0b dec bc ; $4d39: $0b dec e ; $4d3a: $1d add hl, de ; $4d3b: $19 jr_00a_4d3c: jr z, jr_00a_4d61 ; $4d3c: $28 $23 inc hl ; $4d3e: $23 inc hl ; $4d3f: $23 inc hl ; $4d40: $23 inc hl ; $4d41: $23 jr_00a_4d42: dec l ; $4d42: $2d dec bc ; $4d43: $0b dec bc ; $4d44: $0b dec bc ; $4d45: $0b dec bc ; $4d46: $0b dec bc ; $4d47: $0b dec bc ; $4d48: $0b dec bc ; $4d49: $0b dec bc ; $4d4a: $0b dec bc ; $4d4b: $0b jr z, jr_00a_4d71 ; $4d4c: $28 $23 inc hl ; $4d4e: $23 jr_00a_4d4f: inc hl ; $4d4f: $23 inc hl ; $4d50: $23 inc hl ; $4d51: $23 inc hl ; $4d52: $23 inc hl ; $4d53: $23 dec l ; $4d54: $2d dec bc ; $4d55: $0b dec bc ; $4d56: $0b dec bc ; $4d57: $0b dec bc ; $4d58: $0b dec bc ; $4d59: $0b dec bc ; $4d5a: $0b dec bc ; $4d5b: $0b dec e ; $4d5c: $1d jr z, jr_00a_4d82 ; $4d5d: $28 $23 inc hl ; $4d5f: $23 inc hl ; $4d60: $23 jr_00a_4d61: dec l ; $4d61: $2d ld b, d ; $4d62: $42 jr z, @+$25 ; $4d63: $28 $23 inc hl ; $4d65: $23 dec l ; $4d66: $2d dec bc ; $4d67: $0b dec bc ; $4d68: $0b dec bc ; $4d69: $0b dec bc ; $4d6a: $0b dec bc ; $4d6b: $0b dec bc ; $4d6c: $0b jr z, jr_00a_4d92 ; $4d6d: $28 $23 inc hl ; $4d6f: $23 inc hl ; $4d70: $23 jr_00a_4d71: inc hl ; $4d71: $23 inc hl ; $4d72: $23 dec l ; $4d73: $2d ld b, d ; $4d74: $42 jr z, jr_00a_4d9a ; $4d75: $28 $23 dec l ; $4d77: $2d dec bc ; $4d78: $0b dec bc ; $4d79: $0b dec bc ; $4d7a: $0b dec bc ; $4d7b: $0b dec bc ; $4d7c: $0b jr z, jr_00a_4da2 ; $4d7d: $28 $23 inc hl ; $4d7f: $23 inc hl ; $4d80: $23 inc hl ; $4d81: $23 jr_00a_4d82: inc hl ; $4d82: $23 inc hl ; $4d83: $23 inc hl ; $4d84: $23 dec l ; $4d85: $2d add hl, de ; $4d86: $19 ld e, $0b ; $4d87: $1e $0b dec bc ; $4d89: $0b dec bc ; $4d8a: $0b dec bc ; $4d8b: $0b dec bc ; $4d8c: $0b jr z, @+$2f ; $4d8d: $28 $2d ld b, d ; $4d8f: $42 inc hl ; $4d90: $23 inc hl ; $4d91: $23 jr_00a_4d92: inc hl ; $4d92: $23 dec l ; $4d93: $2d add hl, de ; $4d94: $19 add hl, de ; $4d95: $19 dec bc ; $4d96: $0b dec bc ; $4d97: $0b dec bc ; $4d98: $0b dec bc ; $4d99: $0b jr_00a_4d9a: dec bc ; $4d9a: $0b dec bc ; $4d9b: $0b dec bc ; $4d9c: $0b jr z, jr_00a_4dc2 ; $4d9d: $28 $23 inc hl ; $4d9f: $23 inc hl ; $4da0: $23 inc hl ; $4da1: $23 jr_00a_4da2: dec l ; $4da2: $2d add hl, de ; $4da3: $19 dec bc ; $4da4: $0b dec bc ; $4da5: $0b dec bc ; $4da6: $0b dec bc ; $4da7: $0b dec bc ; $4da8: $0b dec bc ; $4da9: $0b dec bc ; $4daa: $0b jr z, jr_00a_4dd0 ; $4dab: $28 $23 inc hl ; $4dad: $23 inc hl ; $4dae: $23 inc hl ; $4daf: $23 add hl, de ; $4db0: $19 add hl, de ; $4db1: $19 ld e, $0b ; $4db2: $1e $0b dec bc ; $4db4: $0b dec bc ; $4db5: $0b dec bc ; $4db6: $0b dec bc ; $4db7: $0b dec bc ; $4db8: $0b dec bc ; $4db9: $0b dec bc ; $4dba: $0b jr z, jr_00a_4dea ; $4dbb: $28 $2d ld b, d ; $4dbd: $42 jr z, jr_00a_4de3 ; $4dbe: $28 $23 dec bc ; $4dc0: $0b dec bc ; $4dc1: $0b jr_00a_4dc2: dec bc ; $4dc2: $0b dec bc ; $4dc3: $0b dec bc ; $4dc4: $0b dec bc ; $4dc5: $0b dec bc ; $4dc6: $0b dec bc ; $4dc7: $0b dec bc ; $4dc8: $0b dec bc ; $4dc9: $0b dec bc ; $4dca: $0b jr z, @+$25 ; $4dcb: $28 $23 inc hl ; $4dcd: $23 inc hl ; $4dce: $23 inc hl ; $4dcf: $23 jr_00a_4dd0: dec bc ; $4dd0: $0b dec bc ; $4dd1: $0b dec bc ; $4dd2: $0b dec bc ; $4dd3: $0b dec bc ; $4dd4: $0b dec bc ; $4dd5: $0b dec bc ; $4dd6: $0b dec bc ; $4dd7: $0b jr z, @+$25 ; $4dd8: $28 $23 inc hl ; $4dda: $23 inc hl ; $4ddb: $23 inc hl ; $4ddc: $23 inc hl ; $4ddd: $23 inc hl ; $4dde: $23 inc hl ; $4ddf: $23 dec bc ; $4de0: $0b dec bc ; $4de1: $0b dec bc ; $4de2: $0b jr_00a_4de3: dec bc ; $4de3: $0b dec bc ; $4de4: $0b dec bc ; $4de5: $0b jr z, jr_00a_4e0b ; $4de6: $28 $23 dec l ; $4de8: $2d ld b, d ; $4de9: $42 jr_00a_4dea: jr z, jr_00a_4e0f ; $4dea: $28 $23 inc hl ; $4dec: $23 dec l ; $4ded: $2d ld b, d ; $4dee: $42 jr z, jr_00a_4dfc ; $4def: $28 $0b dec bc ; $4df1: $0b dec bc ; $4df2: $0b jr z, jr_00a_4e18 ; $4df3: $28 $23 inc hl ; $4df5: $23 inc hl ; $4df6: $23 inc hl ; $4df7: $23 inc hl ; $4df8: $23 inc hl ; $4df9: $23 dec l ; $4dfa: $2d ld b, d ; $4dfb: $42 jr_00a_4dfc: jr z, jr_00a_4e21 ; $4dfc: $28 $23 inc hl ; $4dfe: $23 inc hl ; $4dff: $23 inc hl ; $4e00: $23 dec l ; $4e01: $2d ld b, d ; $4e02: $42 jr z, jr_00a_4e28 ; $4e03: $28 $23 inc hl ; $4e05: $23 inc hl ; $4e06: $23 inc hl ; $4e07: $23 inc hl ; $4e08: $23 inc hl ; $4e09: $23 inc hl ; $4e0a: $23 jr_00a_4e0b: dec l ; $4e0b: $2d dec bc ; $4e0c: $0b dec bc ; $4e0d: $0b dec bc ; $4e0e: $0b jr_00a_4e0f: dec bc ; $4e0f: $0b inc hl ; $4e10: $23 inc hl ; $4e11: $23 inc hl ; $4e12: $23 dec l ; $4e13: $2d ld b, d ; $4e14: $42 jr z, jr_00a_4e3a ; $4e15: $28 $23 inc hl ; $4e17: $23 jr_00a_4e18: dec l ; $4e18: $2d add hl, de ; $4e19: $19 add hl, de ; $4e1a: $19 dec bc ; $4e1b: $0b dec bc ; $4e1c: $0b dec bc ; $4e1d: $0b dec bc ; $4e1e: $0b dec bc ; $4e1f: $0b inc hl ; $4e20: $23 jr_00a_4e21: inc hl ; $4e21: $23 inc hl ; $4e22: $23 inc hl ; $4e23: $23 inc hl ; $4e24: $23 dec l ; $4e25: $2d add hl, de ; $4e26: $19 add hl, de ; $4e27: $19 jr_00a_4e28: dec bc ; $4e28: $0b dec bc ; $4e29: $0b dec bc ; $4e2a: $0b dec bc ; $4e2b: $0b dec bc ; $4e2c: $0b dec bc ; $4e2d: $0b dec bc ; $4e2e: $0b dec bc ; $4e2f: $0b ld b, d ; $4e30: $42 jr z, jr_00a_4e56 ; $4e31: $28 $23 dec l ; $4e33: $2d add hl, de ; $4e34: $19 dec bc ; $4e35: $0b dec bc ; $4e36: $0b dec bc ; $4e37: $0b dec bc ; $4e38: $0b dec bc ; $4e39: $0b jr_00a_4e3a: dec bc ; $4e3a: $0b dec bc ; $4e3b: $0b dec bc ; $4e3c: $0b dec bc ; $4e3d: $0b dec bc ; $4e3e: $0b jr z, jr_00a_4e64 ; $4e3f: $28 $23 inc hl ; $4e41: $23 dec l ; $4e42: $2d add hl, de ; $4e43: $19 dec bc ; $4e44: $0b dec bc ; $4e45: $0b dec bc ; $4e46: $0b dec bc ; $4e47: $0b dec bc ; $4e48: $0b dec bc ; $4e49: $0b dec bc ; $4e4a: $0b dec bc ; $4e4b: $0b dec bc ; $4e4c: $0b dec bc ; $4e4d: $0b jr z, jr_00a_4e73 ; $4e4e: $28 $23 inc hl ; $4e50: $23 inc hl ; $4e51: $23 dec l ; $4e52: $2d dec bc ; $4e53: $0b dec bc ; $4e54: $0b dec bc ; $4e55: $0b jr_00a_4e56: dec bc ; $4e56: $0b dec bc ; $4e57: $0b dec bc ; $4e58: $0b dec bc ; $4e59: $0b dec bc ; $4e5a: $0b dec bc ; $4e5b: $0b jr z, jr_00a_4e81 ; $4e5c: $28 $23 inc hl ; $4e5e: $23 inc hl ; $4e5f: $23 dec l ; $4e60: $2d ld b, d ; $4e61: $42 ld b, $0b ; $4e62: $06 $0b jr_00a_4e64: dec bc ; $4e64: $0b dec bc ; $4e65: $0b dec bc ; $4e66: $0b dec bc ; $4e67: $0b dec bc ; $4e68: $0b dec bc ; $4e69: $0b jr z, jr_00a_4e8f ; $4e6a: $28 $23 inc hl ; $4e6c: $23 dec l ; $4e6d: $2d ld b, d ; $4e6e: $42 jr z, jr_00a_4e94 ; $4e6f: $28 $23 inc hl ; $4e71: $23 dec l ; $4e72: $2d jr_00a_4e73: dec bc ; $4e73: $0b dec bc ; $4e74: $0b dec bc ; $4e75: $0b dec bc ; $4e76: $0b dec bc ; $4e77: $0b jr z, @+$25 ; $4e78: $28 $23 dec l ; $4e7a: $2d ld b, d ; $4e7b: $42 jr z, jr_00a_4ea1 ; $4e7c: $28 $23 inc hl ; $4e7e: $23 inc hl ; $4e7f: $23 ld b, d ; $4e80: $42 jr_00a_4e81: jr z, jr_00a_4eb0 ; $4e81: $28 $2d dec bc ; $4e83: $0b dec bc ; $4e84: $0b dec bc ; $4e85: $0b dec bc ; $4e86: $0b dec bc ; $4e87: $0b dec e ; $4e88: $1d add hl, de ; $4e89: $19 jr z, @+$25 ; $4e8a: $28 $23 inc hl ; $4e8c: $23 inc hl ; $4e8d: $23 inc hl ; $4e8e: $23 jr_00a_4e8f: inc hl ; $4e8f: $23 inc hl ; $4e90: $23 inc hl ; $4e91: $23 dec l ; $4e92: $2d dec bc ; $4e93: $0b jr_00a_4e94: dec bc ; $4e94: $0b dec bc ; $4e95: $0b dec bc ; $4e96: $0b dec bc ; $4e97: $0b dec bc ; $4e98: $0b dec bc ; $4e99: $0b add hl, de ; $4e9a: $19 add hl, de ; $4e9b: $19 jr z, jr_00a_4ec1 ; $4e9c: $28 $23 inc hl ; $4e9e: $23 inc hl ; $4e9f: $23 inc hl ; $4ea0: $23 jr_00a_4ea1: inc hl ; $4ea1: $23 inc hl ; $4ea2: $23 inc hl ; $4ea3: $23 dec l ; $4ea4: $2d dec bc ; $4ea5: $0b dec bc ; $4ea6: $0b dec bc ; $4ea7: $0b dec bc ; $4ea8: $0b dec bc ; $4ea9: $0b dec bc ; $4eaa: $0b dec bc ; $4eab: $0b dec bc ; $4eac: $0b add hl, de ; $4ead: $19 jr z, jr_00a_4ed3 ; $4eae: $28 $23 jr_00a_4eb0: dec l ; $4eb0: $2d ld b, d ; $4eb1: $42 jr z, jr_00a_4ed7 ; $4eb2: $28 $23 dec l ; $4eb4: $2d dec bc ; $4eb5: $0b dec bc ; $4eb6: $0b dec bc ; $4eb7: $0b dec bc ; $4eb8: $0b dec bc ; $4eb9: $0b dec bc ; $4eba: $0b dec bc ; $4ebb: $0b dec bc ; $4ebc: $0b dec bc ; $4ebd: $0b dec bc ; $4ebe: $0b dec bc ; $4ebf: $0b inc hl ; $4ec0: $23 jr_00a_4ec1: inc hl ; $4ec1: $23 inc hl ; $4ec2: $23 inc hl ; $4ec3: $23 inc hl ; $4ec4: $23 inc hl ; $4ec5: $23 dec l ; $4ec6: $2d dec bc ; $4ec7: $0b dec bc ; $4ec8: $0b dec bc ; $4ec9: $0b dec bc ; $4eca: $0b dec bc ; $4ecb: $0b dec bc ; $4ecc: $0b dec bc ; $4ecd: $0b dec bc ; $4ece: $0b dec bc ; $4ecf: $0b inc hl ; $4ed0: $23 inc hl ; $4ed1: $23 inc hl ; $4ed2: $23 jr_00a_4ed3: inc hl ; $4ed3: $23 inc hl ; $4ed4: $23 inc hl ; $4ed5: $23 dec l ; $4ed6: $2d jr_00a_4ed7: dec bc ; $4ed7: $0b dec bc ; $4ed8: $0b dec bc ; $4ed9: $0b dec bc ; $4eda: $0b dec bc ; $4edb: $0b dec bc ; $4edc: $0b dec bc ; $4edd: $0b dec bc ; $4ede: $0b dec bc ; $4edf: $0b inc hl ; $4ee0: $23 inc hl ; $4ee1: $23 dec l ; $4ee2: $2d ld b, d ; $4ee3: $42 jr z, jr_00a_4f09 ; $4ee4: $28 $23 inc hl ; $4ee6: $23 inc hl ; $4ee7: $23 inc hl ; $4ee8: $23 dec l ; $4ee9: $2d dec bc ; $4eea: $0b dec bc ; $4eeb: $0b dec bc ; $4eec: $0b dec bc ; $4eed: $0b dec bc ; $4eee: $0b dec bc ; $4eef: $0b dec l ; $4ef0: $2d ld b, d ; $4ef1: $42 jr z, jr_00a_4f17 ; $4ef2: $28 $23 dec l ; $4ef4: $2d ld b, d ; $4ef5: $42 jr z, jr_00a_4f1b ; $4ef6: $28 $23 inc hl ; $4ef8: $23 inc hl ; $4ef9: $23 inc hl ; $4efa: $23 inc hl ; $4efb: $23 dec l ; $4efc: $2d dec bc ; $4efd: $0b dec bc ; $4efe: $0b dec bc ; $4eff: $0b inc hl ; $4f00: $23 inc hl ; $4f01: $23 inc hl ; $4f02: $23 inc hl ; $4f03: $23 dec l ; $4f04: $2d ld b, d ; $4f05: $42 jr z, jr_00a_4f2b ; $4f06: $28 $23 inc hl ; $4f08: $23 jr_00a_4f09: inc hl ; $4f09: $23 inc hl ; $4f0a: $23 dec l ; $4f0b: $2d dec bc ; $4f0c: $0b dec bc ; $4f0d: $0b dec bc ; $4f0e: $0b dec bc ; $4f0f: $0b dec l ; $4f10: $2d ld b, d ; $4f11: $42 jr z, jr_00a_4f37 ; $4f12: $28 $23 inc hl ; $4f14: $23 inc hl ; $4f15: $23 inc hl ; $4f16: $23 jr_00a_4f17: inc hl ; $4f17: $23 dec l ; $4f18: $2d add hl, de ; $4f19: $19 add hl, de ; $4f1a: $19 jr_00a_4f1b: dec bc ; $4f1b: $0b dec bc ; $4f1c: $0b dec bc ; $4f1d: $0b dec bc ; $4f1e: $0b dec bc ; $4f1f: $0b inc hl ; $4f20: $23 inc hl ; $4f21: $23 inc hl ; $4f22: $23 inc hl ; $4f23: $23 inc hl ; $4f24: $23 dec l ; $4f25: $2d add hl, de ; $4f26: $19 add hl, de ; $4f27: $19 ld e, $0b ; $4f28: $1e $0b dec bc ; $4f2a: $0b jr_00a_4f2b: dec bc ; $4f2b: $0b dec bc ; $4f2c: $0b dec bc ; $4f2d: $0b dec bc ; $4f2e: $0b dec bc ; $4f2f: $0b inc hl ; $4f30: $23 inc hl ; $4f31: $23 inc hl ; $4f32: $23 dec l ; $4f33: $2d add hl, de ; $4f34: $19 dec e ; $4f35: $1d dec bc ; $4f36: $0b jr_00a_4f37: dec bc ; $4f37: $0b dec bc ; $4f38: $0b dec bc ; $4f39: $0b dec bc ; $4f3a: $0b dec bc ; $4f3b: $0b dec bc ; $4f3c: $0b dec bc ; $4f3d: $0b jr z, jr_00a_4f63 ; $4f3e: $28 $23 inc hl ; $4f40: $23 dec l ; $4f41: $2d add hl, de ; $4f42: $19 ld e, $0b ; $4f43: $1e $0b dec bc ; $4f45: $0b dec bc ; $4f46: $0b dec bc ; $4f47: $0b dec bc ; $4f48: $0b dec bc ; $4f49: $0b dec bc ; $4f4a: $0b dec bc ; $4f4b: $0b dec bc ; $4f4c: $0b dec bc ; $4f4d: $0b jr z, jr_00a_4f73 ; $4f4e: $28 $23 inc hl ; $4f50: $23 dec l ; $4f51: $2d dec bc ; $4f52: $0b dec bc ; $4f53: $0b dec bc ; $4f54: $0b dec bc ; $4f55: $0b dec bc ; $4f56: $0b dec bc ; $4f57: $0b dec bc ; $4f58: $0b dec bc ; $4f59: $0b dec bc ; $4f5a: $0b ld b, $16 ; $4f5b: $06 $16 ld d, $28 ; $4f5d: $16 $28 inc hl ; $4f5f: $23 inc hl ; $4f60: $23 dec l ; $4f61: $2d dec bc ; $4f62: $0b jr_00a_4f63: dec bc ; $4f63: $0b dec bc ; $4f64: $0b dec bc ; $4f65: $0b dec bc ; $4f66: $0b dec bc ; $4f67: $0b dec bc ; $4f68: $0b dec bc ; $4f69: $0b dec bc ; $4f6a: $0b jr z, jr_00a_4f90 ; $4f6b: $28 $23 inc hl ; $4f6d: $23 inc hl ; $4f6e: $23 inc hl ; $4f6f: $23 dec bc ; $4f70: $0b dec bc ; $4f71: $0b dec bc ; $4f72: $0b jr_00a_4f73: dec bc ; $4f73: $0b dec bc ; $4f74: $0b dec bc ; $4f75: $0b dec bc ; $4f76: $0b dec bc ; $4f77: $0b dec bc ; $4f78: $0b dec bc ; $4f79: $0b jr z, jr_00a_4f9f ; $4f7a: $28 $23 inc hl ; $4f7c: $23 dec l ; $4f7d: $2d ld b, d ; $4f7e: $42 jr z, jr_00a_4f8c ; $4f7f: $28 $0b dec bc ; $4f81: $0b dec bc ; $4f82: $0b dec bc ; $4f83: $0b dec bc ; $4f84: $0b dec bc ; $4f85: $0b dec bc ; $4f86: $0b dec bc ; $4f87: $0b jr z, jr_00a_4fad ; $4f88: $28 $23 inc hl ; $4f8a: $23 inc hl ; $4f8b: $23 jr_00a_4f8c: inc hl ; $4f8c: $23 inc hl ; $4f8d: $23 inc hl ; $4f8e: $23 inc hl ; $4f8f: $23 jr_00a_4f90: dec bc ; $4f90: $0b dec bc ; $4f91: $0b dec bc ; $4f92: $0b dec bc ; $4f93: $0b jr z, jr_00a_4fc3 ; $4f94: $28 $2d ld d, $16 ; $4f96: $16 $16 jr z, jr_00a_4fc7 ; $4f98: $28 $2d ld b, d ; $4f9a: $42 jr z, jr_00a_4fc0 ; $4f9b: $28 $23 inc hl ; $4f9d: $23 inc hl ; $4f9e: $23 jr_00a_4f9f: inc hl ; $4f9f: $23 inc hl ; $4fa0: $23 inc hl ; $4fa1: $23 inc hl ; $4fa2: $23 inc hl ; $4fa3: $23 inc hl ; $4fa4: $23 inc hl ; $4fa5: $23 inc hl ; $4fa6: $23 inc hl ; $4fa7: $23 inc hl ; $4fa8: $23 inc hl ; $4fa9: $23 inc hl ; $4faa: $23 inc hl ; $4fab: $23 dec l ; $4fac: $2d jr_00a_4fad: ld b, d ; $4fad: $42 jr z, jr_00a_4fd3 ; $4fae: $28 $23 inc hl ; $4fb0: $23 dec l ; $4fb1: $2d ld b, d ; $4fb2: $42 jr z, jr_00a_4fdd ; $4fb3: $28 $28 inc hl ; $4fb5: $23 inc hl ; $4fb6: $23 inc hl ; $4fb7: $23 dec l ; $4fb8: $2d ld b, d ; $4fb9: $42 jr z, jr_00a_4fdf ; $4fba: $28 $23 inc hl ; $4fbc: $23 inc hl ; $4fbd: $23 inc hl ; $4fbe: $23 inc hl ; $4fbf: $23 jr_00a_4fc0: inc hl ; $4fc0: $23 inc hl ; $4fc1: $23 inc hl ; $4fc2: $23 jr_00a_4fc3: inc hl ; $4fc3: $23 inc hl ; $4fc4: $23 inc hl ; $4fc5: $23 inc hl ; $4fc6: $23 jr_00a_4fc7: inc hl ; $4fc7: $23 inc hl ; $4fc8: $23 inc hl ; $4fc9: $23 inc hl ; $4fca: $23 inc hl ; $4fcb: $23 inc hl ; $4fcc: $23 jr z, jr_00a_4ffc ; $4fcd: $28 $2d ld b, d ; $4fcf: $42 inc hl ; $4fd0: $23 inc hl ; $4fd1: $23 inc hl ; $4fd2: $23 jr_00a_4fd3: inc hl ; $4fd3: $23 inc hl ; $4fd4: $23 dec l ; $4fd5: $2d ld b, d ; $4fd6: $42 jr z, jr_00a_4ffc ; $4fd7: $28 $23 inc hl ; $4fd9: $23 inc hl ; $4fda: $23 inc hl ; $4fdb: $23 inc hl ; $4fdc: $23 jr_00a_4fdd: inc hl ; $4fdd: $23 inc hl ; $4fde: $23 jr_00a_4fdf: inc hl ; $4fdf: $23 inc hl ; $4fe0: $23 dec l ; $4fe1: $2d ld b, d ; $4fe2: $42 jr z, jr_00a_5008 ; $4fe3: $28 $23 inc hl ; $4fe5: $23 inc hl ; $4fe6: $23 inc hl ; $4fe7: $23 inc hl ; $4fe8: $23 dec l ; $4fe9: $2d ld b, d ; $4fea: $42 jr z, jr_00a_5010 ; $4feb: $28 $23 inc hl ; $4fed: $23 inc hl ; $4fee: $23 inc hl ; $4fef: $23 inc hl ; $4ff0: $23 inc hl ; $4ff1: $23 inc hl ; $4ff2: $23 dec l ; $4ff3: $2d ld b, d ; $4ff4: $42 jr z, jr_00a_501a ; $4ff5: $28 $23 inc hl ; $4ff7: $23 inc hl ; $4ff8: $23 inc hl ; $4ff9: $23 inc hl ; $4ffa: $23 dec l ; $4ffb: $2d jr_00a_4ffc: ld b, d ; $4ffc: $42 jr z, jr_00a_5022 ; $4ffd: $28 $23 inc hl ; $4fff: $23 dec bc ; $5000: $0b dec bc ; $5001: $0b jr z, jr_00a_5027 ; $5002: $28 $23 inc hl ; $5004: $23 inc hl ; $5005: $23 inc hl ; $5006: $23 inc hl ; $5007: $23 jr_00a_5008: inc hl ; $5008: $23 inc hl ; $5009: $23 inc hl ; $500a: $23 inc hl ; $500b: $23 inc hl ; $500c: $23 inc hl ; $500d: $23 inc hl ; $500e: $23 inc hl ; $500f: $23 jr_00a_5010: inc hl ; $5010: $23 inc hl ; $5011: $23 inc hl ; $5012: $23 inc hl ; $5013: $23 dec l ; $5014: $2d ld b, d ; $5015: $42 jr z, jr_00a_503b ; $5016: $28 $23 inc hl ; $5018: $23 inc hl ; $5019: $23 jr_00a_501a: inc hl ; $501a: $23 inc hl ; $501b: $23 dec l ; $501c: $2d ld b, d ; $501d: $42 jr z, jr_00a_5043 ; $501e: $28 $23 dec l ; $5020: $2d ld b, d ; $5021: $42 jr_00a_5022: jr z, jr_00a_5047 ; $5022: $28 $23 inc hl ; $5024: $23 inc hl ; $5025: $23 inc hl ; $5026: $23 jr_00a_5027: inc hl ; $5027: $23 dec l ; $5028: $2d ld b, d ; $5029: $42 jr z, jr_00a_504f ; $502a: $28 $23 inc hl ; $502c: $23 inc hl ; $502d: $23 inc hl ; $502e: $23 inc hl ; $502f: $23 inc hl ; $5030: $23 inc hl ; $5031: $23 inc hl ; $5032: $23 inc hl ; $5033: $23 inc hl ; $5034: $23 inc hl ; $5035: $23 inc hl ; $5036: $23 inc hl ; $5037: $23 inc hl ; $5038: $23 inc hl ; $5039: $23 inc hl ; $503a: $23 jr_00a_503b: inc hl ; $503b: $23 inc hl ; $503c: $23 inc hl ; $503d: $23 inc hl ; $503e: $23 inc hl ; $503f: $23 inc hl ; $5040: $23 inc hl ; $5041: $23 inc hl ; $5042: $23 jr_00a_5043: inc hl ; $5043: $23 inc hl ; $5044: $23 inc hl ; $5045: $23 inc hl ; $5046: $23 jr_00a_5047: inc hl ; $5047: $23 inc hl ; $5048: $23 inc hl ; $5049: $23 dec l ; $504a: $2d ld b, d ; $504b: $42 jr z, jr_00a_5071 ; $504c: $28 $23 inc hl ; $504e: $23 jr_00a_504f: inc hl ; $504f: $23 inc hl ; $5050: $23 inc hl ; $5051: $23 inc hl ; $5052: $23 inc hl ; $5053: $23 inc hl ; $5054: $23 inc hl ; $5055: $23 dec l ; $5056: $2d ld b, d ; $5057: $42 jr z, jr_00a_507d ; $5058: $28 $23 inc hl ; $505a: $23 inc hl ; $505b: $23 inc hl ; $505c: $23 dec l ; $505d: $2d ld b, d ; $505e: $42 jr z, jr_00a_5084 ; $505f: $28 $23 inc hl ; $5061: $23 dec l ; $5062: $2d ld b, d ; $5063: $42 jr z, jr_00a_5089 ; $5064: $28 $23 inc hl ; $5066: $23 inc hl ; $5067: $23 inc hl ; $5068: $23 inc hl ; $5069: $23 inc hl ; $506a: $23 inc hl ; $506b: $23 inc hl ; $506c: $23 inc hl ; $506d: $23 inc hl ; $506e: $23 inc hl ; $506f: $23 inc hl ; $5070: $23 jr_00a_5071: inc hl ; $5071: $23 inc hl ; $5072: $23 inc hl ; $5073: $23 dec l ; $5074: $2d add hl, de ; $5075: $19 add hl, de ; $5076: $19 add hl, de ; $5077: $19 add hl, de ; $5078: $19 add hl, de ; $5079: $19 ld e, $0b ; $507a: $1e $0b dec bc ; $507c: $0b jr_00a_507d: dec bc ; $507d: $0b dec bc ; $507e: $0b dec bc ; $507f: $0b inc hl ; $5080: $23 inc hl ; $5081: $23 inc hl ; $5082: $23 dec l ; $5083: $2d jr_00a_5084: ld e, $0b ; $5084: $1e $0b dec bc ; $5086: $0b dec bc ; $5087: $0b dec bc ; $5088: $0b jr_00a_5089: dec bc ; $5089: $0b dec bc ; $508a: $0b dec bc ; $508b: $0b dec bc ; $508c: $0b dec bc ; $508d: $0b dec bc ; $508e: $0b dec bc ; $508f: $0b add hl, de ; $5090: $19 add hl, de ; $5091: $19 add hl, de ; $5092: $19 dec bc ; $5093: $0b dec bc ; $5094: $0b dec bc ; $5095: $0b dec bc ; $5096: $0b dec bc ; $5097: $0b dec bc ; $5098: $0b dec bc ; $5099: $0b dec bc ; $509a: $0b dec bc ; $509b: $0b dec bc ; $509c: $0b dec bc ; $509d: $0b dec bc ; $509e: $0b dec bc ; $509f: $0b dec bc ; $50a0: $0b dec bc ; $50a1: $0b dec bc ; $50a2: $0b dec bc ; $50a3: $0b dec bc ; $50a4: $0b dec bc ; $50a5: $0b dec bc ; $50a6: $0b dec bc ; $50a7: $0b dec bc ; $50a8: $0b dec bc ; $50a9: $0b dec bc ; $50aa: $0b dec bc ; $50ab: $0b jr z, jr_00a_50d1 ; $50ac: $28 $23 inc hl ; $50ae: $23 inc hl ; $50af: $23 dec bc ; $50b0: $0b dec bc ; $50b1: $0b dec bc ; $50b2: $0b dec bc ; $50b3: $0b dec bc ; $50b4: $0b dec bc ; $50b5: $0b dec bc ; $50b6: $0b dec bc ; $50b7: $0b dec bc ; $50b8: $0b dec bc ; $50b9: $0b dec bc ; $50ba: $0b jr z, jr_00a_50ea ; $50bb: $28 $2d ld b, d ; $50bd: $42 jr z, jr_00a_50e3 ; $50be: $28 $23 dec bc ; $50c0: $0b dec bc ; $50c1: $0b dec bc ; $50c2: $0b dec bc ; $50c3: $0b dec bc ; $50c4: $0b dec bc ; $50c5: $0b dec bc ; $50c6: $0b dec bc ; $50c7: $0b dec bc ; $50c8: $0b dec bc ; $50c9: $0b dec bc ; $50ca: $0b jr z, jr_00a_50f0 ; $50cb: $28 $23 inc hl ; $50cd: $23 inc hl ; $50ce: $23 inc hl ; $50cf: $23 dec bc ; $50d0: $0b jr_00a_50d1: dec bc ; $50d1: $0b dec bc ; $50d2: $0b dec bc ; $50d3: $0b dec bc ; $50d4: $0b dec bc ; $50d5: $0b dec bc ; $50d6: $0b jr z, jr_00a_50fc ; $50d7: $28 $23 inc hl ; $50d9: $23 inc hl ; $50da: $23 inc hl ; $50db: $23 inc hl ; $50dc: $23 inc hl ; $50dd: $23 inc hl ; $50de: $23 inc hl ; $50df: $23 dec bc ; $50e0: $0b dec bc ; $50e1: $0b dec bc ; $50e2: $0b jr_00a_50e3: dec bc ; $50e3: $0b dec bc ; $50e4: $0b jr z, @+$25 ; $50e5: $28 $23 inc hl ; $50e7: $23 inc hl ; $50e8: $23 inc hl ; $50e9: $23 jr_00a_50ea: inc hl ; $50ea: $23 dec l ; $50eb: $2d ld b, d ; $50ec: $42 jr z, jr_00a_5112 ; $50ed: $28 $23 inc hl ; $50ef: $23 jr_00a_50f0: inc hl ; $50f0: $23 inc hl ; $50f1: $23 inc hl ; $50f2: $23 inc hl ; $50f3: $23 inc hl ; $50f4: $23 inc hl ; $50f5: $23 dec l ; $50f6: $2d ld b, d ; $50f7: $42 jr z, jr_00a_511d ; $50f8: $28 $23 inc hl ; $50fa: $23 inc hl ; $50fb: $23 jr_00a_50fc: inc hl ; $50fc: $23 inc hl ; $50fd: $23 inc hl ; $50fe: $23 inc hl ; $50ff: $23 ld hl, $2121 ; $5100: $21 $21 $21 ld hl, $2121 ; $5103: $21 $21 $21 ld hl, $2121 ; $5106: $21 $21 $21 ld hl, $2121 ; $5109: $21 $21 $21 ld hl, $2121 ; $510c: $21 $21 $21 ld hl, $2121 ; $510f: $21 $21 $21 jr_00a_5112: ld hl, $2121 ; $5112: $21 $21 $21 ld hl, $2121 ; $5115: $21 $21 $21 ld hl, $3d2b ; $5118: $21 $2b $3d dec a ; $511b: $3d dec a ; $511c: $3d jr_00a_511d: ld h, $21 ; $511d: $26 $21 ld hl, $263d ; $511f: $21 $3d $26 ld hl, $2b21 ; $5122: $21 $21 $2b dec a ; $5125: $3d dec a ; $5126: $3d dec a ; $5127: $3d inc b ; $5128: $04 dec a ; $5129: $3d ld h, $21 ; $512a: $26 $21 ld hl, $2121 ; $512c: $21 $21 $21 ld hl, $3d3d ; $512f: $21 $3d $3d dec a ; $5132: $3d ld h, $21 ; $5133: $26 $21 ld hl, $2121 ; $5135: $21 $21 $21 ld hl, $2121 ; $5138: $21 $21 $21 ld hl, $2121 ; $513b: $21 $21 $21 ld hl, $3d21 ; $513e: $21 $21 $3d dec a ; $5141: $3d dec a ; $5142: $3d dec a ; $5143: $3d dec a ; $5144: $3d dec a ; $5145: $3d ld h, $21 ; $5146: $26 $21 dec hl ; $5148: $2b dec a ; $5149: $3d dec a ; $514a: $3d ld h, $2b ; $514b: $26 $2b dec a ; $514d: $3d dec a ; $514e: $3d ld h, $2b ; $514f: $26 $2b dec a ; $5151: $3d ld h, $2b ; $5152: $26 $2b dec a ; $5154: $3d dec a ; $5155: $3d dec a ; $5156: $3d ld a, $3f ; $5157: $3e $3f dec a ; $5159: $3d dec a ; $515a: $3d dec a ; $515b: $3d ld h, $21 ; $515c: $26 $21 ld hl, $3d21 ; $515e: $21 $21 $3d dec a ; $5161: $3d dec a ; $5162: $3d dec a ; $5163: $3d ld a, $09 ; $5164: $3e $09 add hl, bc ; $5166: $09 add hl, bc ; $5167: $09 add hl, bc ; $5168: $09 add hl, bc ; $5169: $09 add hl, bc ; $516a: $09 ccf ; $516b: $3f dec a ; $516c: $3d dec a ; $516d: $3d dec a ; $516e: $3d ld h, $09 ; $516f: $26 $09 add hl, bc ; $5171: $09 add hl, bc ; $5172: $09 add hl, bc ; $5173: $09 add hl, bc ; $5174: $09 add hl, bc ; $5175: $09 add hl, bc ; $5176: $09 add hl, bc ; $5177: $09 add hl, bc ; $5178: $09 add hl, bc ; $5179: $09 add hl, bc ; $517a: $09 add hl, bc ; $517b: $09 ld h, $21 ; $517c: $26 $21 ld hl, $0921 ; $517e: $21 $21 $09 add hl, bc ; $5181: $09 add hl, bc ; $5182: $09 add hl, bc ; $5183: $09 add hl, bc ; $5184: $09 add hl, bc ; $5185: $09 add hl, bc ; $5186: $09 add hl, bc ; $5187: $09 add hl, bc ; $5188: $09 add hl, bc ; $5189: $09 add hl, bc ; $518a: $09 add hl, bc ; $518b: $09 ld h, $2b ; $518c: $26 $2b dec a ; $518e: $3d dec a ; $518f: $3d add hl, bc ; $5190: $09 add hl, bc ; $5191: $09 add hl, bc ; $5192: $09 add hl, bc ; $5193: $09 add hl, bc ; $5194: $09 add hl, bc ; $5195: $09 add hl, bc ; $5196: $09 add hl, bc ; $5197: $09 add hl, bc ; $5198: $09 add hl, bc ; $5199: $09 add hl, bc ; $519a: $09 add hl, bc ; $519b: $09 dec a ; $519c: $3d dec a ; $519d: $3d ld h, $21 ; $519e: $26 $21 dec a ; $51a0: $3d dec a ; $51a1: $3d dec a ; $51a2: $3d ld a, $09 ; $51a3: $3e $09 add hl, bc ; $51a5: $09 add hl, bc ; $51a6: $09 add hl, bc ; $51a7: $09 add hl, bc ; $51a8: $09 add hl, bc ; $51a9: $09 add hl, bc ; $51aa: $09 add hl, bc ; $51ab: $09 ccf ; $51ac: $3f dec a ; $51ad: $3d dec a ; $51ae: $3d dec a ; $51af: $3d dec a ; $51b0: $3d dec a ; $51b1: $3d dec a ; $51b2: $3d add hl, bc ; $51b3: $09 add hl, bc ; $51b4: $09 add hl, bc ; $51b5: $09 add hl, bc ; $51b6: $09 add hl, bc ; $51b7: $09 add hl, bc ; $51b8: $09 add hl, bc ; $51b9: $09 add hl, bc ; $51ba: $09 add hl, bc ; $51bb: $09 add hl, bc ; $51bc: $09 ld h, $21 ; $51bd: $26 $21 ld hl, $263d ; $51bf: $21 $3d $26 dec hl ; $51c2: $2b add hl, bc ; $51c3: $09 add hl, bc ; $51c4: $09 add hl, bc ; $51c5: $09 add hl, bc ; $51c6: $09 add hl, bc ; $51c7: $09 add hl, bc ; $51c8: $09 add hl, bc ; $51c9: $09 add hl, bc ; $51ca: $09 add hl, bc ; $51cb: $09 add hl, bc ; $51cc: $09 ld h, $21 ; $51cd: $26 $21 ld hl, $3d3d ; $51cf: $21 $3d $3d ld a, $09 ; $51d2: $3e $09 add hl, bc ; $51d4: $09 add hl, bc ; $51d5: $09 add hl, bc ; $51d6: $09 add hl, bc ; $51d7: $09 add hl, bc ; $51d8: $09 add hl, bc ; $51d9: $09 add hl, bc ; $51da: $09 add hl, bc ; $51db: $09 add hl, bc ; $51dc: $09 ccf ; $51dd: $3f dec a ; $51de: $3d ld h, $2b ; $51df: $26 $2b dec a ; $51e1: $3d add hl, bc ; $51e2: $09 add hl, bc ; $51e3: $09 add hl, bc ; $51e4: $09 add hl, bc ; $51e5: $09 add hl, bc ; $51e6: $09 add hl, bc ; $51e7: $09 add hl, bc ; $51e8: $09 add hl, bc ; $51e9: $09 add hl, bc ; $51ea: $09 add hl, bc ; $51eb: $09 add hl, bc ; $51ec: $09 add hl, bc ; $51ed: $09 ld h, $21 ; $51ee: $26 $21 dec hl ; $51f0: $2b dec a ; $51f1: $3d dec a ; $51f2: $3d ld h, $21 ; $51f3: $26 $21 dec hl ; $51f5: $2b add hl, bc ; $51f6: $09 add hl, bc ; $51f7: $09 add hl, bc ; $51f8: $09 add hl, bc ; $51f9: $09 ld h, $21 ; $51fa: $26 $21 ld hl, $2121 ; $51fc: $21 $21 $21 ld hl, $0707 ; $51ff: $21 $07 $07 inc c ; $5202: $0c dec c ; $5203: $0d rlca ; $5204: $07 inc a ; $5205: $3c rlca ; $5206: $07 inc sp ; $5207: $33 inc sp ; $5208: $33 rlca ; $5209: $07 rlca ; $520a: $07 rlca ; $520b: $07 rlca ; $520c: $07 inc c ; $520d: $0c dec c ; $520e: $0d rlca ; $520f: $07 inc c ; $5210: $0c dec c ; $5211: $0d ld c, $0f ; $5212: $0e $0f rlca ; $5214: $07 rlca ; $5215: $07 rlca ; $5216: $07 inc sp ; $5217: $33 inc sp ; $5218: $33 rlca ; $5219: $07 rlca ; $521a: $07 inc c ; $521b: $0c dec c ; $521c: $0d ld c, $0f ; $521d: $0e $0f inc c ; $521f: $0c ld c, $0f ; $5220: $0e $0f rlca ; $5222: $07 ld a, [bc] ; $5223: $0a inc c ; $5224: $0c dec c ; $5225: $0d rlca ; $5226: $07 inc sp ; $5227: $33 inc sp ; $5228: $33 rlca ; $5229: $07 ld a, [bc] ; $522a: $0a ld c, $0f ; $522b: $0e $0f inc c ; $522d: $0c dec c ; $522e: $0d ld c, $0d ; $522f: $0e $0d inc c ; $5231: $0c dec c ; $5232: $0d rlca ; $5233: $07 ld c, $0f ; $5234: $0e $0f rlca ; $5236: $07 inc sp ; $5237: $33 inc sp ; $5238: $33 rlca ; $5239: $07 rlca ; $523a: $07 rlca ; $523b: $07 inc a ; $523c: $3c ld c, $0f ; $523d: $0e $0f rlca ; $523f: $07 rrca ; $5240: $0f ld c, $0f ; $5241: $0e $0f ld e, [hl] ; $5243: $5e ld e, a ; $5244: $5f ld b, e ; $5245: $43 ld b, h ; $5246: $44 ld [$4308], sp ; $5247: $08 $08 $43 ld b, h ; $524a: $44 ld b, e ; $524b: $43 ld b, h ; $524c: $44 ld e, [hl] ; $524d: $5e inc c ; $524e: $0c dec c ; $524f: $0d inc c ; $5250: $0c dec c ; $5251: $0d rlca ; $5252: $07 ld [$0808], sp ; $5253: $08 $08 $08 ld [$0808], sp ; $5256: $08 $08 $08 ld [$0808], sp ; $5259: $08 $08 $08 ld [$0e08], sp ; $525c: $08 $08 $0e rrca ; $525f: $0f ld c, $0f ; $5260: $0e $0f ld e, a ; $5262: $5f ld [$0808], sp ; $5263: $08 $08 $08 ld [$0808], sp ; $5266: $08 $08 $08 ld [$0808], sp ; $5269: $08 $08 $08 ld [$0708], sp ; $526c: $08 $08 $07 rlca ; $526f: $07 ld b, e ; $5270: $43 ld b, h ; $5271: $44 ld [$0808], sp ; $5272: $08 $08 $08 ld [$0808], sp ; $5275: $08 $08 $08 ld [$0808], sp ; $5278: $08 $08 $08 ld [$0808], sp ; $527b: $08 $08 $08 inc a ; $527e: $3c rlca ; $527f: $07 ld [$0808], sp ; $5280: $08 $08 $08 ld [$0808], sp ; $5283: $08 $08 $08 ld [$0808], sp ; $5286: $08 $08 $08 ld [$4508], sp ; $5289: $08 $08 $45 ld [$0708], sp ; $528c: $08 $08 $07 rlca ; $528f: $07 ld [$0808], sp ; $5290: $08 $08 $08 ld [$0808], sp ; $5293: $08 $08 $08 ld [$0808], sp ; $5296: $08 $08 $08 ld [$4608], sp ; $5299: $08 $08 $46 ld [$0708], sp ; $529c: $08 $08 $07 ld a, [bc] ; $529f: $0a ld [$0808], sp ; $52a0: $08 $08 $08 ld [$0808], sp ; $52a3: $08 $08 $08 ld [$0808], sp ; $52a6: $08 $08 $08 ld [$4708], sp ; $52a9: $08 $08 $47 ld [$0c08], sp ; $52ac: $08 $08 $0c dec c ; $52af: $0d ld [$0808], sp ; $52b0: $08 $08 $08 ld [$0707], sp ; $52b3: $08 $07 $07 rlca ; $52b6: $07 ld [$0708], sp ; $52b7: $08 $08 $07 rlca ; $52ba: $07 rlca ; $52bb: $07 rlca ; $52bc: $07 rlca ; $52bd: $07 ld c, $0f ; $52be: $0e $0f ld [$0808], sp ; $52c0: $08 $08 $08 rlca ; $52c3: $07 rra ; $52c4: $1f ld a, [bc] ; $52c5: $0a ld a, [de] ; $52c6: $1a ld [de], a ; $52c7: $12 ld [de], a ; $52c8: $12 dec de ; $52c9: $1b rlca ; $52ca: $07 rlca ; $52cb: $07 inc a ; $52cc: $3c rlca ; $52cd: $07 rlca ; $52ce: $07 rlca ; $52cf: $07 rlca ; $52d0: $07 rlca ; $52d1: $07 rlca ; $52d2: $07 rlca ; $52d3: $07 rlca ; $52d4: $07 rlca ; $52d5: $07 inc e ; $52d6: $1c inc de ; $52d7: $13 inc de ; $52d8: $13 dec e ; $52d9: $1d rlca ; $52da: $07 ld a, [bc] ; $52db: $0a rlca ; $52dc: $07 rlca ; $52dd: $07 rlca ; $52de: $07 inc a ; $52df: $3c ld a, [bc] ; $52e0: $0a rlca ; $52e1: $07 rlca ; $52e2: $07 rlca ; $52e3: $07 inc c ; $52e4: $0c dec c ; $52e5: $0d ld e, $20 ; $52e6: $1e $20 jr nz, jr_00a_5309 ; $52e8: $20 $1f rra ; $52ea: $1f rlca ; $52eb: $07 inc c ; $52ec: $0c dec c ; $52ed: $0d rlca ; $52ee: $07 rlca ; $52ef: $07 rlca ; $52f0: $07 rlca ; $52f1: $07 inc a ; $52f2: $3c rlca ; $52f3: $07 ld c, $0f ; $52f4: $0e $0f rlca ; $52f6: $07 inc c ; $52f7: $0c dec c ; $52f8: $0d rlca ; $52f9: $07 inc a ; $52fa: $3c rlca ; $52fb: $07 ld c, $0f ; $52fc: $0e $0f rlca ; $52fe: $07 rlca ; $52ff: $07 ld hl, $2121 ; $5300: $21 $21 $21 ld hl, $2b21 ; $5303: $21 $21 $2b add hl, bc ; $5306: $09 add hl, bc ; $5307: $09 add hl, bc ; $5308: $09 jr_00a_5309: add hl, bc ; $5309: $09 ld hl, $2621 ; $530a: $21 $21 $26 ld hl, $2121 ; $530d: $21 $21 $21 ld hl, $2b21 ; $5310: $21 $21 $2b ld b, b ; $5313: $40 ld h, $04 ; $5314: $26 $04 add hl, bc ; $5316: $09 add hl, bc ; $5317: $09 add hl, bc ; $5318: $09 add hl, bc ; $5319: $09 ld h, $21 ; $531a: $26 $21 ld hl, $402b ; $531c: $21 $2b $40 ld h, $21 ; $531f: $26 $21 ld hl, $2121 ; $5321: $21 $21 $21 ld hl, $092b ; $5324: $21 $2b $09 add hl, bc ; $5327: $09 add hl, bc ; $5328: $09 add hl, bc ; $5329: $09 ld h, $2b ; $532a: $26 $2b ld b, b ; $532c: $40 ld h, $21 ; $532d: $26 $21 ld hl, $402b ; $532f: $21 $2b $40 ld h, $21 ; $5332: $26 $21 ld hl, $2b21 ; $5334: $21 $21 $2b add hl, bc ; $5337: $09 add hl, bc ; $5338: $09 ld h, $21 ; $5339: $26 $21 ld hl, $2126 ; $533b: $21 $26 $21 ld hl, $2121 ; $533e: $21 $21 $21 ld hl, $2121 ; $5341: $21 $21 $21 ld hl, $0909 ; $5344: $21 $09 $09 add hl, bc ; $5347: $09 add hl, bc ; $5348: $09 add hl, bc ; $5349: $09 add hl, bc ; $534a: $09 ld h, $2b ; $534b: $26 $2b ld b, b ; $534d: $40 ld h, $21 ; $534e: $26 $21 ld hl, $2121 ; $5350: $21 $21 $21 ld hl, $092b ; $5353: $21 $2b $09 add hl, bc ; $5356: $09 add hl, bc ; $5357: $09 add hl, bc ; $5358: $09 add hl, bc ; $5359: $09 add hl, bc ; $535a: $09 ld h, $21 ; $535b: $26 $21 ld hl, $2121 ; $535d: $21 $21 $21 dec hl ; $5360: $2b ld b, b ; $5361: $40 ld h, $2b ; $5362: $26 $2b add hl, bc ; $5364: $09 add hl, bc ; $5365: $09 add hl, bc ; $5366: $09 add hl, bc ; $5367: $09 add hl, bc ; $5368: $09 add hl, bc ; $5369: $09 ld h, $21 ; $536a: $26 $21 ld hl, $2121 ; $536c: $21 $21 $21 ld hl, $2121 ; $536f: $21 $21 $21 ld hl, $0921 ; $5372: $21 $21 $09 add hl, bc ; $5375: $09 add hl, bc ; $5376: $09 add hl, bc ; $5377: $09 ld h, $21 ; $5378: $26 $21 ld hl, $2b21 ; $537a: $21 $21 $2b inc e ; $537d: $1c add hl, bc ; $537e: $09 add hl, bc ; $537f: $09 ld hl, $2121 ; $5380: $21 $21 $21 dec hl ; $5383: $2b add hl, bc ; $5384: $09 add hl, bc ; $5385: $09 add hl, bc ; $5386: $09 add hl, bc ; $5387: $09 add hl, bc ; $5388: $09 add hl, bc ; $5389: $09 add hl, bc ; $538a: $09 add hl, bc ; $538b: $09 add hl, bc ; $538c: $09 add hl, bc ; $538d: $09 add hl, bc ; $538e: $09 add hl, bc ; $538f: $09 ld b, b ; $5390: $40 ld h, $21 ; $5391: $26 $21 ld hl, $092b ; $5393: $21 $2b $09 add hl, bc ; $5396: $09 add hl, bc ; $5397: $09 add hl, bc ; $5398: $09 add hl, bc ; $5399: $09 add hl, bc ; $539a: $09 add hl, bc ; $539b: $09 add hl, bc ; $539c: $09 add hl, bc ; $539d: $09 add hl, bc ; $539e: $09 add hl, bc ; $539f: $09 ld hl, $2121 ; $53a0: $21 $21 $21 ld hl, $0904 ; $53a3: $21 $04 $09 add hl, bc ; $53a6: $09 add hl, bc ; $53a7: $09 add hl, bc ; $53a8: $09 add hl, bc ; $53a9: $09 add hl, bc ; $53aa: $09 add hl, bc ; $53ab: $09 add hl, bc ; $53ac: $09 add hl, bc ; $53ad: $09 add hl, bc ; $53ae: $09 add hl, bc ; $53af: $09 ld hl, $2121 ; $53b0: $21 $21 $21 ld hl, $2121 ; $53b3: $21 $21 $21 dec hl ; $53b6: $2b add hl, bc ; $53b7: $09 add hl, bc ; $53b8: $09 add hl, bc ; $53b9: $09 add hl, bc ; $53ba: $09 add hl, bc ; $53bb: $09 add hl, bc ; $53bc: $09 add hl, bc ; $53bd: $09 add hl, bc ; $53be: $09 add hl, bc ; $53bf: $09 ld hl, $2121 ; $53c0: $21 $21 $21 dec hl ; $53c3: $2b ld b, b ; $53c4: $40 ld h, $2b ; $53c5: $26 $2b add hl, bc ; $53c7: $09 add hl, bc ; $53c8: $09 add hl, bc ; $53c9: $09 add hl, bc ; $53ca: $09 add hl, bc ; $53cb: $09 add hl, bc ; $53cc: $09 add hl, bc ; $53cd: $09 add hl, bc ; $53ce: $09 add hl, bc ; $53cf: $09 ld hl, $2121 ; $53d0: $21 $21 $21 ld hl, $2121 ; $53d3: $21 $21 $21 ld hl, $2b21 ; $53d6: $21 $21 $2b add hl, bc ; $53d9: $09 add hl, bc ; $53da: $09 add hl, bc ; $53db: $09 add hl, bc ; $53dc: $09 add hl, bc ; $53dd: $09 add hl, bc ; $53de: $09 ld h, $22 ; $53df: $26 $22 ld [hl+], a ; $53e1: $22 inc l ; $53e2: $2c ld b, c ; $53e3: $41 daa ; $53e4: $27 ld [hl+], a ; $53e5: $22 ld [hl+], a ; $53e6: $22 ld [hl+], a ; $53e7: $22 ld [hl+], a ; $53e8: $22 ld [hl+], a ; $53e9: $22 inc l ; $53ea: $2c ld a, [bc] ; $53eb: $0a ld a, [bc] ; $53ec: $0a ld a, [bc] ; $53ed: $0a ld a, [bc] ; $53ee: $0a ld a, [bc] ; $53ef: $0a dec l ; $53f0: $2d ld b, d ; $53f1: $42 jr z, jr_00a_5417 ; $53f2: $28 $23 inc hl ; $53f4: $23 inc hl ; $53f5: $23 inc hl ; $53f6: $23 inc hl ; $53f7: $23 inc hl ; $53f8: $23 inc hl ; $53f9: $23 inc hl ; $53fa: $23 inc hl ; $53fb: $23 dec l ; $53fc: $2d dec bc ; $53fd: $0b dec bc ; $53fe: $0b dec bc ; $53ff: $0b rlca ; $5400: $07 rlca ; $5401: $07 inc a ; $5402: $3c rlca ; $5403: $07 inc c ; $5404: $0c dec c ; $5405: $0d inc e ; $5406: $1c inc de ; $5407: $13 inc de ; $5408: $13 dec e ; $5409: $1d rlca ; $540a: $07 rlca ; $540b: $07 rlca ; $540c: $07 rlca ; $540d: $07 inc c ; $540e: $0c dec c ; $540f: $0d inc c ; $5410: $0c dec c ; $5411: $0d rlca ; $5412: $07 rlca ; $5413: $07 ld c, $0f ; $5414: $0e $0f inc e ; $5416: $1c jr_00a_5417: inc de ; $5417: $13 inc de ; $5418: $13 dec e ; $5419: $1d inc a ; $541a: $3c rlca ; $541b: $07 rlca ; $541c: $07 rlca ; $541d: $07 ld c, $0f ; $541e: $0e $0f ld c, $0f ; $5420: $0e $0f rlca ; $5422: $07 rlca ; $5423: $07 ld a, [bc] ; $5424: $0a rlca ; $5425: $07 inc e ; $5426: $1c inc de ; $5427: $13 inc de ; $5428: $13 dec e ; $5429: $1d rlca ; $542a: $07 inc c ; $542b: $0c dec c ; $542c: $0d rlca ; $542d: $07 rlca ; $542e: $07 ld a, [bc] ; $542f: $0a rlca ; $5430: $07 inc a ; $5431: $3c inc c ; $5432: $0c dec c ; $5433: $0d rlca ; $5434: $07 rlca ; $5435: $07 inc e ; $5436: $1c inc de ; $5437: $13 inc de ; $5438: $13 dec e ; $5439: $1d rlca ; $543a: $07 ld c, $0f ; $543b: $0e $0f rlca ; $543d: $07 rlca ; $543e: $07 rlca ; $543f: $07 rlca ; $5440: $07 rlca ; $5441: $07 ld c, $0f ; $5442: $0e $0f inc c ; $5444: $0c dec c ; $5445: $0d inc e ; $5446: $1c inc de ; $5447: $13 inc de ; $5448: $13 dec e ; $5449: $1d inc c ; $544a: $0c dec c ; $544b: $0d rlca ; $544c: $07 ld a, [bc] ; $544d: $0a inc c ; $544e: $0c dec c ; $544f: $0d inc c ; $5450: $0c dec c ; $5451: $0d rlca ; $5452: $07 rlca ; $5453: $07 ld c, $0f ; $5454: $0e $0f inc e ; $5456: $1c inc de ; $5457: $13 inc de ; $5458: $13 dec e ; $5459: $1d ld c, $0f ; $545a: $0e $0f rlca ; $545c: $07 rlca ; $545d: $07 ld c, $0f ; $545e: $0e $0f ld c, $0f ; $5460: $0e $0f rlca ; $5462: $07 rlca ; $5463: $07 rlca ; $5464: $07 rlca ; $5465: $07 inc e ; $5466: $1c inc de ; $5467: $13 inc de ; $5468: $13 dec e ; $5469: $1d rlca ; $546a: $07 inc c ; $546b: $0c dec c ; $546c: $0d rlca ; $546d: $07 ld a, [bc] ; $546e: $0a rlca ; $546f: $07 rlca ; $5470: $07 ld a, [bc] ; $5471: $0a inc c ; $5472: $0c dec c ; $5473: $0d rlca ; $5474: $07 inc a ; $5475: $3c inc e ; $5476: $1c inc de ; $5477: $13 inc de ; $5478: $13 dec e ; $5479: $1d rlca ; $547a: $07 ld c, $0f ; $547b: $0e $0f rlca ; $547d: $07 rlca ; $547e: $07 rlca ; $547f: $07 rlca ; $5480: $07 rlca ; $5481: $07 ld c, $0f ; $5482: $0e $0f rlca ; $5484: $07 rlca ; $5485: $07 inc e ; $5486: $1c inc de ; $5487: $13 inc de ; $5488: $13 dec e ; $5489: $1d inc c ; $548a: $0c dec c ; $548b: $0d rlca ; $548c: $07 rlca ; $548d: $07 rlca ; $548e: $07 inc a ; $548f: $3c inc c ; $5490: $0c dec c ; $5491: $0d rlca ; $5492: $07 rlca ; $5493: $07 inc c ; $5494: $0c dec c ; $5495: $0d inc e ; $5496: $1c inc de ; $5497: $13 inc de ; $5498: $13 dec e ; $5499: $1d ld c, $0f ; $549a: $0e $0f rlca ; $549c: $07 inc a ; $549d: $3c rlca ; $549e: $07 rlca ; $549f: $07 ld c, $0f ; $54a0: $0e $0f rlca ; $54a2: $07 rlca ; $54a3: $07 ld c, $0f ; $54a4: $0e $0f inc e ; $54a6: $1c inc de ; $54a7: $13 inc de ; $54a8: $13 dec e ; $54a9: $1d inc c ; $54aa: $0c dec c ; $54ab: $0d rlca ; $54ac: $07 rlca ; $54ad: $07 inc c ; $54ae: $0c dec c ; $54af: $0d rlca ; $54b0: $07 inc a ; $54b1: $3c rlca ; $54b2: $07 rlca ; $54b3: $07 inc c ; $54b4: $0c dec c ; $54b5: $0d inc e ; $54b6: $1c inc de ; $54b7: $13 inc de ; $54b8: $13 dec e ; $54b9: $1d ld c, $0f ; $54ba: $0e $0f inc c ; $54bc: $0c dec c ; $54bd: $0d ld c, $0f ; $54be: $0e $0f inc c ; $54c0: $0c dec c ; $54c1: $0d rlca ; $54c2: $07 inc a ; $54c3: $3c ld c, $0f ; $54c4: $0e $0f inc e ; $54c6: $1c inc de ; $54c7: $13 inc de ; $54c8: $13 dec e ; $54c9: $1d ld a, [bc] ; $54ca: $0a rlca ; $54cb: $07 ld c, $0f ; $54cc: $0e $0f ld a, [bc] ; $54ce: $0a rlca ; $54cf: $07 ld c, $0f ; $54d0: $0e $0f inc c ; $54d2: $0c dec c ; $54d3: $0d rlca ; $54d4: $07 rlca ; $54d5: $07 inc e ; $54d6: $1c inc de ; $54d7: $13 inc de ; $54d8: $13 dec e ; $54d9: $1d rlca ; $54da: $07 inc c ; $54db: $0c dec c ; $54dc: $0d rlca ; $54dd: $07 rlca ; $54de: $07 rlca ; $54df: $07 rlca ; $54e0: $07 rlca ; $54e1: $07 ld c, $0f ; $54e2: $0e $0f inc c ; $54e4: $0c dec c ; $54e5: $0d inc e ; $54e6: $1c inc de ; $54e7: $13 inc de ; $54e8: $13 dec e ; $54e9: $1d rlca ; $54ea: $07 ld c, $0f ; $54eb: $0e $0f rlca ; $54ed: $07 inc c ; $54ee: $0c dec c ; $54ef: $0d rlca ; $54f0: $07 inc a ; $54f1: $3c rlca ; $54f2: $07 rlca ; $54f3: $07 ld c, $0f ; $54f4: $0e $0f inc e ; $54f6: $1c inc de ; $54f7: $13 inc de ; $54f8: $13 dec e ; $54f9: $1d rlca ; $54fa: $07 rlca ; $54fb: $07 rlca ; $54fc: $07 rlca ; $54fd: $07 ld c, $0f ; $54fe: $0e $0f ld hl, $2121 ; $5500: $21 $21 $21 ld hl, $2121 ; $5503: $21 $21 $21 ld hl, $2121 ; $5506: $21 $21 $21 ld hl, $2121 ; $5509: $21 $21 $21 ld hl, $2121 ; $550c: $21 $21 $21 ld hl, $2121 ; $550f: $21 $21 $21 ld hl, $2121 ; $5512: $21 $21 $21 ld hl, $2121 ; $5515: $21 $21 $21 ld hl, $2121 ; $5518: $21 $21 $21 ld hl, $402b ; $551b: $21 $2b $40 ld h, $21 ; $551e: $26 $21 ld hl, $2b21 ; $5520: $21 $21 $2b ld b, b ; $5523: $40 ld h, $21 ; $5524: $26 $21 ld hl, $2121 ; $5526: $21 $21 $21 ld hl, $2121 ; $5529: $21 $21 $21 ld hl, $2121 ; $552c: $21 $21 $21 ld hl, $2121 ; $552f: $21 $21 $21 ld hl, $2121 ; $5532: $21 $21 $21 dec hl ; $5535: $2b ld b, b ; $5536: $40 ld h, $21 ; $5537: $26 $21 ld hl, $2121 ; $5539: $21 $21 $21 ld hl, $2121 ; $553c: $21 $21 $21 ld hl, $2121 ; $553f: $21 $21 $21 ld hl, $2121 ; $5542: $21 $21 $21 ld hl, $2121 ; $5545: $21 $21 $21 dec hl ; $5548: $2b ld b, b ; $5549: $40 ld h, $21 ; $554a: $26 $21 ld hl, $2121 ; $554c: $21 $21 $21 ld hl, $2b21 ; $554f: $21 $21 $2b ld b, b ; $5552: $40 ld h, $21 ; $5553: $26 $21 ld hl, $2121 ; $5555: $21 $21 $21 ld hl, $2121 ; $5558: $21 $21 $21 ld hl, $2121 ; $555b: $21 $21 $21 ld hl, $2121 ; $555e: $21 $21 $21 ld hl, $2121 ; $5561: $21 $21 $21 ld hl, $2121 ; $5564: $21 $21 $21 ld hl, $2121 ; $5567: $21 $21 $21 ld hl, $2121 ; $556a: $21 $21 $21 dec hl ; $556d: $2b ld b, b ; $556e: $40 ld h, $21 ; $556f: $26 $21 ld hl, $2121 ; $5571: $21 $21 $21 ld hl, $2121 ; $5574: $21 $21 $21 ld hl, $2121 ; $5577: $21 $21 $21 ld hl, $2121 ; $557a: $21 $21 $21 ld hl, $2121 ; $557d: $21 $21 $21 dec hl ; $5580: $2b ld b, b ; $5581: $40 ld h, $21 ; $5582: $26 $21 ld hl, $2121 ; $5584: $21 $21 $21 ld hl, $402b ; $5587: $21 $2b $40 ld h, $21 ; $558a: $26 $21 ld hl, $2121 ; $558c: $21 $21 $21 ld hl, $2121 ; $558f: $21 $21 $21 ld hl, $402b ; $5592: $21 $2b $40 ld h, $21 ; $5595: $26 $21 ld hl, $2121 ; $5597: $21 $21 $21 ld hl, $2121 ; $559a: $21 $21 $21 ld hl, $2121 ; $559d: $21 $21 $21 ld hl, $2121 ; $55a0: $21 $21 $21 ld hl, $2121 ; $55a3: $21 $21 $21 ld hl, $2121 ; $55a6: $21 $21 $21 ld hl, $402b ; $55a9: $21 $2b $40 ld h, $21 ; $55ac: $26 $21 ld hl, $2121 ; $55ae: $21 $21 $21 ld hl, $2121 ; $55b1: $21 $21 $21 ld hl, $2121 ; $55b4: $21 $21 $21 ld hl, $2121 ; $55b7: $21 $21 $21 ld hl, $2121 ; $55ba: $21 $21 $21 ld hl, $2121 ; $55bd: $21 $21 $21 ld hl, $2121 ; $55c0: $21 $21 $21 ld hl, $402b ; $55c3: $21 $2b $40 ld h, $21 ; $55c6: $26 $21 ld hl, $2121 ; $55c8: $21 $21 $21 ld hl, $2b21 ; $55cb: $21 $21 $2b ld b, b ; $55ce: $40 ld h, $21 ; $55cf: $26 $21 ld hl, $2121 ; $55d1: $21 $21 $21 ld hl, $2121 ; $55d4: $21 $21 $21 ld hl, $2b21 ; $55d7: $21 $21 $2b ld b, b ; $55da: $40 ld h, $21 ; $55db: $26 $21 ld hl, $2121 ; $55dd: $21 $21 $21 ld hl, $402b ; $55e0: $21 $2b $40 ld h, $21 ; $55e3: $26 $21 ld hl, $2121 ; $55e5: $21 $21 $21 ld hl, $2121 ; $55e8: $21 $21 $21 ld hl, $2121 ; $55eb: $21 $21 $21 ld hl, $2121 ; $55ee: $21 $21 $21 ld hl, $2121 ; $55f1: $21 $21 $21 ld hl, $2121 ; $55f4: $21 $21 $21 ld hl, $2121 ; $55f7: $21 $21 $21 ld hl, $2121 ; $55fa: $21 $21 $21 ld hl, $2121 ; $55fd: $21 $21 $21 rlca ; $5600: $07 rlca ; $5601: $07 inc c ; $5602: $0c dec c ; $5603: $0d rlca ; $5604: $07 rlca ; $5605: $07 rlca ; $5606: $07 inc a ; $5607: $3c rlca ; $5608: $07 rlca ; $5609: $07 rlca ; $560a: $07 ld a, [bc] ; $560b: $0a rlca ; $560c: $07 rlca ; $560d: $07 rlca ; $560e: $07 rlca ; $560f: $07 rlca ; $5610: $07 rlca ; $5611: $07 ld c, $0f ; $5612: $0e $0f rlca ; $5614: $07 rlca ; $5615: $07 rlca ; $5616: $07 rlca ; $5617: $07 rlca ; $5618: $07 inc c ; $5619: $0c dec c ; $561a: $0d rlca ; $561b: $07 rlca ; $561c: $07 rlca ; $561d: $07 ld a, [bc] ; $561e: $0a rlca ; $561f: $07 rlca ; $5620: $07 inc a ; $5621: $3c rlca ; $5622: $07 rlca ; $5623: $07 rlca ; $5624: $07 rlca ; $5625: $07 inc c ; $5626: $0c dec c ; $5627: $0d rlca ; $5628: $07 ld c, $0f ; $5629: $0e $0f inc c ; $562b: $0c dec c ; $562c: $0d rlca ; $562d: $07 rlca ; $562e: $07 rlca ; $562f: $07 dec c ; $5630: $0d rlca ; $5631: $07 rlca ; $5632: $07 inc c ; $5633: $0c dec c ; $5634: $0d rlca ; $5635: $07 ld c, $0f ; $5636: $0e $0f rlca ; $5638: $07 inc c ; $5639: $0c dec c ; $563a: $0d ld c, $0f ; $563b: $0e $0f inc a ; $563d: $3c rlca ; $563e: $07 inc c ; $563f: $0c rrca ; $5640: $0f inc c ; $5641: $0c dec c ; $5642: $0d ld c, $0f ; $5643: $0e $0f ld a, [bc] ; $5645: $0a rlca ; $5646: $07 inc c ; $5647: $0c dec c ; $5648: $0d ld c, $0f ; $5649: $0e $0f inc c ; $564b: $0c dec c ; $564c: $0d rlca ; $564d: $07 rlca ; $564e: $07 ld c, $07 ; $564f: $0e $07 ld c, $0f ; $5651: $0e $0f rlca ; $5653: $07 rlca ; $5654: $07 inc c ; $5655: $0c dec c ; $5656: $0d ld c, $0f ; $5657: $0e $0f inc c ; $5659: $0c dec c ; $565a: $0d ld c, $0f ; $565b: $0e $0f inc c ; $565d: $0c dec c ; $565e: $0d rlca ; $565f: $07 ld e, [hl] ; $5660: $5e rlca ; $5661: $07 rlca ; $5662: $07 ld b, e ; $5663: $43 ld b, h ; $5664: $44 ld c, $0f ; $5665: $0e $0f rlca ; $5667: $07 rlca ; $5668: $07 ld c, $0f ; $5669: $0e $0f ld b, e ; $566b: $43 ld b, h ; $566c: $44 ld c, $0f ; $566d: $0e $0f ld e, a ; $566f: $5f ld [$0808], sp ; $5670: $08 $08 $08 ld [$0808], sp ; $5673: $08 $08 $08 inc [hl] ; $5676: $34 inc [hl] ; $5677: $34 inc [hl] ; $5678: $34 ld [$0808], sp ; $5679: $08 $08 $08 ld [$0808], sp ; $567c: $08 $08 $08 ld [$0808], sp ; $567f: $08 $08 $08 ld [$0808], sp ; $5682: $08 $08 $08 ld [$0808], sp ; $5685: $08 $08 $08 ld [$0808], sp ; $5688: $08 $08 $08 ld [$0808], sp ; $568b: $08 $08 $08 ld [$0808], sp ; $568e: $08 $08 $08 ld [$0808], sp ; $5691: $08 $08 $08 ld [$0808], sp ; $5694: $08 $08 $08 ld [$0808], sp ; $5697: $08 $08 $08 ld [$0808], sp ; $569a: $08 $08 $08 ld [$0808], sp ; $569d: $08 $08 $08 ld [$0808], sp ; $56a0: $08 $08 $08 ld [$0808], sp ; $56a3: $08 $08 $08 ld [$0808], sp ; $56a6: $08 $08 $08 ld [$0808], sp ; $56a9: $08 $08 $08 ld [$0808], sp ; $56ac: $08 $08 $08 ld [$0808], sp ; $56af: $08 $08 $08 ld [$0808], sp ; $56b2: $08 $08 $08 ld [$0808], sp ; $56b5: $08 $08 $08 ld [$0808], sp ; $56b8: $08 $08 $08 ld [$0808], sp ; $56bb: $08 $08 $08 ld [$0808], sp ; $56be: $08 $08 $08 ld [$0808], sp ; $56c1: $08 $08 $08 ld [$0808], sp ; $56c4: $08 $08 $08 ld [$0808], sp ; $56c7: $08 $08 $08 ld [$0808], sp ; $56ca: $08 $08 $08 ld [$0808], sp ; $56cd: $08 $08 $08 ld a, [de] ; $56d0: $1a ld [de], a ; $56d1: $12 ld [de], a ; $56d2: $12 ld [de], a ; $56d3: $12 ld [de], a ; $56d4: $12 ld [de], a ; $56d5: $12 ld [de], a ; $56d6: $12 ld [de], a ; $56d7: $12 ld [de], a ; $56d8: $12 ld [de], a ; $56d9: $12 ld [de], a ; $56da: $12 ld [de], a ; $56db: $12 ld [de], a ; $56dc: $12 dec de ; $56dd: $1b rlca ; $56de: $07 rlca ; $56df: $07 ld e, $20 ; $56e0: $1e $20 jr nz, @+$22 ; $56e2: $20 $20 jr nz, jr_00a_5706 ; $56e4: $20 $20 jr nz, @+$34 ; $56e6: $20 $32 ld [hl-], a ; $56e8: $32 jr nz, @+$22 ; $56e9: $20 $20 jr nz, @+$22 ; $56eb: $20 $20 rra ; $56ed: $1f rlca ; $56ee: $07 ld a, [bc] ; $56ef: $0a inc a ; $56f0: $3c rlca ; $56f1: $07 rlca ; $56f2: $07 rlca ; $56f3: $07 rlca ; $56f4: $07 rlca ; $56f5: $07 rlca ; $56f6: $07 ld [hl-], a ; $56f7: $32 ld [hl-], a ; $56f8: $32 rlca ; $56f9: $07 rlca ; $56fa: $07 rlca ; $56fb: $07 rlca ; $56fc: $07 rlca ; $56fd: $07 inc a ; $56fe: $3c rlca ; $56ff: $07 ld hl, $2121 ; $5700: $21 $21 $21 ld hl, $2121 ; $5703: $21 $21 $21 jr_00a_5706: ld hl, $2121 ; $5706: $21 $21 $21 ld hl, $2121 ; $5709: $21 $21 $21 ld hl, $2121 ; $570c: $21 $21 $21 ld hl, $2121 ; $570f: $21 $21 $21 ld hl, $2121 ; $5712: $21 $21 $21 ld hl, $2b21 ; $5715: $21 $21 $2b ld b, b ; $5718: $40 ld h, $21 ; $5719: $26 $21 ld hl, $2121 ; $571b: $21 $21 $21 ld hl, $2121 ; $571e: $21 $21 $21 dec hl ; $5721: $2b ld b, b ; $5722: $40 ld h, $21 ; $5723: $26 $21 ld hl, $2121 ; $5725: $21 $21 $21 ld hl, $2121 ; $5728: $21 $21 $21 ld hl, $2121 ; $572b: $21 $21 $21 ld hl, $2121 ; $572e: $21 $21 $21 ld hl, $2b21 ; $5731: $21 $21 $2b inc e ; $5734: $1c add hl, bc ; $5735: $09 add hl, bc ; $5736: $09 add hl, bc ; $5737: $09 add hl, bc ; $5738: $09 add hl, bc ; $5739: $09 add hl, bc ; $573a: $09 dec de ; $573b: $1b ld h, $21 ; $573c: $26 $21 ld hl, $2121 ; $573e: $21 $21 $21 ld hl, $092b ; $5741: $21 $2b $09 add hl, bc ; $5744: $09 add hl, bc ; $5745: $09 add hl, bc ; $5746: $09 add hl, bc ; $5747: $09 add hl, bc ; $5748: $09 add hl, bc ; $5749: $09 add hl, bc ; $574a: $09 add hl, bc ; $574b: $09 add hl, bc ; $574c: $09 add hl, bc ; $574d: $09 add hl, bc ; $574e: $09 add hl, bc ; $574f: $09 ld hl, $2b21 ; $5750: $21 $21 $2b add hl, bc ; $5753: $09 add hl, bc ; $5754: $09 add hl, bc ; $5755: $09 add hl, bc ; $5756: $09 add hl, bc ; $5757: $09 add hl, bc ; $5758: $09 add hl, bc ; $5759: $09 add hl, bc ; $575a: $09 add hl, bc ; $575b: $09 add hl, bc ; $575c: $09 add hl, bc ; $575d: $09 add hl, bc ; $575e: $09 add hl, bc ; $575f: $09 ld hl, $1c2b ; $5760: $21 $2b $1c add hl, bc ; $5763: $09 add hl, bc ; $5764: $09 add hl, bc ; $5765: $09 add hl, bc ; $5766: $09 add hl, bc ; $5767: $09 add hl, bc ; $5768: $09 add hl, bc ; $5769: $09 add hl, bc ; $576a: $09 add hl, bc ; $576b: $09 add hl, bc ; $576c: $09 add hl, bc ; $576d: $09 add hl, bc ; $576e: $09 add hl, bc ; $576f: $09 add hl, bc ; $5770: $09 add hl, bc ; $5771: $09 add hl, bc ; $5772: $09 add hl, bc ; $5773: $09 add hl, bc ; $5774: $09 add hl, bc ; $5775: $09 add hl, bc ; $5776: $09 add hl, bc ; $5777: $09 add hl, bc ; $5778: $09 add hl, bc ; $5779: $09 add hl, bc ; $577a: $09 add hl, bc ; $577b: $09 add hl, bc ; $577c: $09 add hl, bc ; $577d: $09 add hl, bc ; $577e: $09 add hl, bc ; $577f: $09 add hl, bc ; $5780: $09 add hl, bc ; $5781: $09 add hl, bc ; $5782: $09 add hl, bc ; $5783: $09 add hl, bc ; $5784: $09 add hl, bc ; $5785: $09 ld h, $21 ; $5786: $26 $21 ld hl, $092b ; $5788: $21 $2b $09 add hl, bc ; $578b: $09 add hl, bc ; $578c: $09 add hl, bc ; $578d: $09 add hl, bc ; $578e: $09 add hl, bc ; $578f: $09 add hl, bc ; $5790: $09 add hl, bc ; $5791: $09 add hl, bc ; $5792: $09 add hl, bc ; $5793: $09 add hl, bc ; $5794: $09 add hl, bc ; $5795: $09 ld h, $21 ; $5796: $26 $21 ld hl, $2b21 ; $5798: $21 $21 $2b add hl, bc ; $579b: $09 add hl, bc ; $579c: $09 add hl, bc ; $579d: $09 add hl, bc ; $579e: $09 add hl, bc ; $579f: $09 ld hl, $2121 ; $57a0: $21 $21 $21 ld hl, $2121 ; $57a3: $21 $21 $21 ld hl, $2121 ; $57a6: $21 $21 $21 ld hl, $092b ; $57a9: $21 $2b $09 add hl, bc ; $57ac: $09 add hl, bc ; $57ad: $09 add hl, bc ; $57ae: $09 add hl, bc ; $57af: $09 ld hl, $2121 ; $57b0: $21 $21 $21 ld hl, $2b21 ; $57b3: $21 $21 $2b ld b, b ; $57b6: $40 ld h, $21 ; $57b7: $26 $21 ld hl, $2121 ; $57b9: $21 $21 $21 ld hl, $2b21 ; $57bc: $21 $21 $2b add hl, bc ; $57bf: $09 ld hl, $402b ; $57c0: $21 $2b $40 ld h, $21 ; $57c3: $26 $21 ld hl, $2121 ; $57c5: $21 $21 $21 ld hl, $2121 ; $57c8: $21 $21 $21 dec hl ; $57cb: $2b add hl, bc ; $57cc: $09 add hl, bc ; $57cd: $09 add hl, bc ; $57ce: $09 add hl, bc ; $57cf: $09 ld [hl+], a ; $57d0: $22 ld [hl+], a ; $57d1: $22 ld [hl+], a ; $57d2: $22 ld [hl+], a ; $57d3: $22 ld [hl+], a ; $57d4: $22 ld [hl+], a ; $57d5: $22 ld [hl+], a ; $57d6: $22 inc l ; $57d7: $2c ld b, c ; $57d8: $41 daa ; $57d9: $27 ld [hl+], a ; $57da: $22 inc l ; $57db: $2c ld a, [bc] ; $57dc: $0a ld a, [bc] ; $57dd: $0a ld a, [bc] ; $57de: $0a ld a, [bc] ; $57df: $0a inc hl ; $57e0: $23 inc hl ; $57e1: $23 inc hl ; $57e2: $23 inc hl ; $57e3: $23 dec l ; $57e4: $2d ld b, d ; $57e5: $42 jr z, jr_00a_580b ; $57e6: $28 $23 inc hl ; $57e8: $23 inc hl ; $57e9: $23 inc hl ; $57ea: $23 inc hl ; $57eb: $23 inc hl ; $57ec: $23 inc hl ; $57ed: $23 inc hl ; $57ee: $23 inc hl ; $57ef: $23 inc hl ; $57f0: $23 inc hl ; $57f1: $23 inc hl ; $57f2: $23 inc hl ; $57f3: $23 inc hl ; $57f4: $23 inc hl ; $57f5: $23 inc hl ; $57f6: $23 inc hl ; $57f7: $23 inc hl ; $57f8: $23 inc hl ; $57f9: $23 dec l ; $57fa: $2d ld b, d ; $57fb: $42 jr z, jr_00a_5821 ; $57fc: $28 $23 inc hl ; $57fe: $23 inc hl ; $57ff: $23 ld hl, $2121 ; $5800: $21 $21 $21 ld hl, $2121 ; $5803: $21 $21 $21 ld hl, $402b ; $5806: $21 $2b $40 ld h, $21 ; $5809: $26 $21 jr_00a_580b: ld hl, $2121 ; $580b: $21 $21 $21 ld hl, $2121 ; $580e: $21 $21 $21 ld hl, $2b21 ; $5811: $21 $21 $2b ld b, b ; $5814: $40 ld h, $21 ; $5815: $26 $21 ld hl, $2121 ; $5817: $21 $21 $21 ld hl, $2121 ; $581a: $21 $21 $21 ld hl, $2121 ; $581d: $21 $21 $21 dec hl ; $5820: $2b jr_00a_5821: ld b, b ; $5821: $40 ld h, $21 ; $5822: $26 $21 ld hl, $2121 ; $5824: $21 $21 $21 ld hl, $2121 ; $5827: $21 $21 $21 ld hl, $2121 ; $582a: $21 $21 $21 ld hl, $2121 ; $582d: $21 $21 $21 ld hl, $2121 ; $5830: $21 $21 $21 ld hl, $2b21 ; $5833: $21 $21 $2b inc e ; $5836: $1c add hl, bc ; $5837: $09 add hl, bc ; $5838: $09 add hl, bc ; $5839: $09 add hl, bc ; $583a: $09 dec de ; $583b: $1b ld h, $21 ; $583c: $26 $21 ld hl, $2121 ; $583e: $21 $21 $21 ld hl, $2b21 ; $5841: $21 $21 $2b add hl, bc ; $5844: $09 add hl, bc ; $5845: $09 add hl, bc ; $5846: $09 add hl, bc ; $5847: $09 add hl, bc ; $5848: $09 add hl, bc ; $5849: $09 add hl, bc ; $584a: $09 add hl, bc ; $584b: $09 add hl, bc ; $584c: $09 dec de ; $584d: $1b ld h, $21 ; $584e: $26 $21 ld hl, $2b21 ; $5850: $21 $21 $2b inc e ; $5853: $1c add hl, bc ; $5854: $09 add hl, bc ; $5855: $09 add hl, bc ; $5856: $09 add hl, bc ; $5857: $09 add hl, bc ; $5858: $09 add hl, bc ; $5859: $09 add hl, bc ; $585a: $09 add hl, bc ; $585b: $09 add hl, bc ; $585c: $09 add hl, bc ; $585d: $09 ld h, $21 ; $585e: $26 $21 ld hl, $2b21 ; $5860: $21 $21 $2b add hl, bc ; $5863: $09 add hl, bc ; $5864: $09 add hl, bc ; $5865: $09 add hl, bc ; $5866: $09 add hl, bc ; $5867: $09 add hl, bc ; $5868: $09 add hl, bc ; $5869: $09 add hl, bc ; $586a: $09 add hl, bc ; $586b: $09 add hl, bc ; $586c: $09 add hl, bc ; $586d: $09 ld h, $21 ; $586e: $26 $21 dec hl ; $5870: $2b inc e ; $5871: $1c add hl, bc ; $5872: $09 add hl, bc ; $5873: $09 add hl, bc ; $5874: $09 add hl, bc ; $5875: $09 add hl, bc ; $5876: $09 add hl, bc ; $5877: $09 add hl, bc ; $5878: $09 add hl, bc ; $5879: $09 add hl, bc ; $587a: $09 add hl, bc ; $587b: $09 add hl, bc ; $587c: $09 add hl, bc ; $587d: $09 add hl, bc ; $587e: $09 add hl, bc ; $587f: $09 add hl, bc ; $5880: $09 add hl, bc ; $5881: $09 add hl, bc ; $5882: $09 add hl, bc ; $5883: $09 add hl, bc ; $5884: $09 add hl, bc ; $5885: $09 add hl, bc ; $5886: $09 add hl, bc ; $5887: $09 ld h, $2b ; $5888: $26 $2b add hl, bc ; $588a: $09 add hl, bc ; $588b: $09 add hl, bc ; $588c: $09 add hl, bc ; $588d: $09 add hl, bc ; $588e: $09 add hl, bc ; $588f: $09 add hl, bc ; $5890: $09 add hl, bc ; $5891: $09 add hl, bc ; $5892: $09 add hl, bc ; $5893: $09 add hl, bc ; $5894: $09 add hl, bc ; $5895: $09 add hl, bc ; $5896: $09 ld h, $21 ; $5897: $26 $21 ld hl, $092b ; $5899: $21 $2b $09 add hl, bc ; $589c: $09 add hl, bc ; $589d: $09 add hl, bc ; $589e: $09 add hl, bc ; $589f: $09 add hl, bc ; $58a0: $09 add hl, bc ; $58a1: $09 add hl, bc ; $58a2: $09 add hl, bc ; $58a3: $09 add hl, bc ; $58a4: $09 add hl, bc ; $58a5: $09 add hl, bc ; $58a6: $09 ld h, $21 ; $58a7: $26 $21 ld hl, $2121 ; $58a9: $21 $21 $21 ld hl, $2121 ; $58ac: $21 $21 $21 ld hl, $0909 ; $58af: $21 $09 $09 add hl, bc ; $58b2: $09 add hl, bc ; $58b3: $09 add hl, bc ; $58b4: $09 add hl, bc ; $58b5: $09 add hl, bc ; $58b6: $09 ld h, $21 ; $58b7: $26 $21 ld hl, $2121 ; $58b9: $21 $21 $21 ld hl, $2121 ; $58bc: $21 $21 $21 ld hl, $0909 ; $58bf: $21 $09 $09 add hl, bc ; $58c2: $09 add hl, bc ; $58c3: $09 add hl, bc ; $58c4: $09 add hl, bc ; $58c5: $09 ld h, $21 ; $58c6: $26 $21 ld hl, $2b21 ; $58c8: $21 $21 $2b ld b, b ; $58cb: $40 ld h, $21 ; $58cc: $26 $21 ld hl, $2b21 ; $58ce: $21 $21 $2b add hl, bc ; $58d1: $09 add hl, bc ; $58d2: $09 add hl, bc ; $58d3: $09 add hl, bc ; $58d4: $09 add hl, bc ; $58d5: $09 ld h, $21 ; $58d6: $26 $21 ld hl, $2121 ; $58d8: $21 $21 $21 ld hl, $2121 ; $58db: $21 $21 $21 ld hl, $0a21 ; $58de: $21 $21 $0a ld a, [bc] ; $58e1: $0a ld a, [bc] ; $58e2: $0a ld a, [bc] ; $58e3: $0a daa ; $58e4: $27 ld [hl+], a ; $58e5: $22 inc l ; $58e6: $2c ld b, c ; $58e7: $41 daa ; $58e8: $27 ld [hl+], a ; $58e9: $22 ld [hl+], a ; $58ea: $22 ld [hl+], a ; $58eb: $22 ld [hl+], a ; $58ec: $22 ld [hl+], a ; $58ed: $22 ld [hl+], a ; $58ee: $22 ld [hl+], a ; $58ef: $22 dec bc ; $58f0: $0b dec bc ; $58f1: $0b dec bc ; $58f2: $0b jr z, @+$25 ; $58f3: $28 $23 inc hl ; $58f5: $23 inc hl ; $58f6: $23 inc hl ; $58f7: $23 inc hl ; $58f8: $23 inc hl ; $58f9: $23 inc hl ; $58fa: $23 dec l ; $58fb: $2d ld b, d ; $58fc: $42 jr z, @+$25 ; $58fd: $28 $23 inc hl ; $58ff: $23 ld hl, $2121 ; $5900: $21 $21 $21 ld hl, $2121 ; $5903: $21 $21 $21 ld hl, $2121 ; $5906: $21 $21 $21 ld hl, $2121 ; $5909: $21 $21 $21 ld hl, $092b ; $590c: $21 $2b $09 add hl, bc ; $590f: $09 ld hl, $2121 ; $5910: $21 $21 $21 ld hl, $2121 ; $5913: $21 $21 $21 ld hl, $2b21 ; $5916: $21 $21 $2b inc e ; $5919: $1c jr jr_00a_5938 ; $591a: $18 $1c add hl, bc ; $591c: $09 add hl, bc ; $591d: $09 add hl, bc ; $591e: $09 add hl, bc ; $591f: $09 ld hl, $2121 ; $5920: $21 $21 $21 ld hl, $2b21 ; $5923: $21 $21 $2b jr jr_00a_592c ; $5926: $18 $04 add hl, bc ; $5928: $09 add hl, bc ; $5929: $09 add hl, bc ; $592a: $09 add hl, bc ; $592b: $09 jr_00a_592c: add hl, bc ; $592c: $09 add hl, bc ; $592d: $09 add hl, bc ; $592e: $09 add hl, bc ; $592f: $09 ld hl, $2121 ; $5930: $21 $21 $21 dec hl ; $5933: $2b jr jr_00a_593a ; $5934: $18 $04 add hl, bc ; $5936: $09 add hl, bc ; $5937: $09 jr_00a_5938: add hl, bc ; $5938: $09 add hl, bc ; $5939: $09 jr_00a_593a: add hl, bc ; $593a: $09 add hl, bc ; $593b: $09 add hl, bc ; $593c: $09 add hl, bc ; $593d: $09 add hl, bc ; $593e: $09 add hl, bc ; $593f: $09 ld hl, $2b21 ; $5940: $21 $21 $2b inc e ; $5943: $1c add hl, bc ; $5944: $09 add hl, bc ; $5945: $09 add hl, bc ; $5946: $09 add hl, bc ; $5947: $09 add hl, bc ; $5948: $09 add hl, bc ; $5949: $09 add hl, bc ; $594a: $09 add hl, bc ; $594b: $09 add hl, bc ; $594c: $09 add hl, bc ; $594d: $09 add hl, bc ; $594e: $09 add hl, bc ; $594f: $09 ld hl, $2b21 ; $5950: $21 $21 $2b add hl, bc ; $5953: $09 add hl, bc ; $5954: $09 add hl, bc ; $5955: $09 add hl, bc ; $5956: $09 add hl, bc ; $5957: $09 add hl, bc ; $5958: $09 add hl, bc ; $5959: $09 add hl, bc ; $595a: $09 ld h, $21 ; $595b: $26 $21 ld hl, $2121 ; $595d: $21 $21 $21 ld hl, $2b21 ; $5960: $21 $21 $2b add hl, bc ; $5963: $09 add hl, bc ; $5964: $09 add hl, bc ; $5965: $09 add hl, bc ; $5966: $09 add hl, bc ; $5967: $09 add hl, bc ; $5968: $09 ld h, $21 ; $5969: $26 $21 ld hl, $2121 ; $596b: $21 $21 $21 ld hl, $2121 ; $596e: $21 $21 $21 ld hl, $092b ; $5971: $21 $2b $09 add hl, bc ; $5974: $09 add hl, bc ; $5975: $09 add hl, bc ; $5976: $09 add hl, bc ; $5977: $09 add hl, bc ; $5978: $09 ld h, $21 ; $5979: $26 $21 ld hl, $2121 ; $597b: $21 $21 $21 ld hl, $2b21 ; $597e: $21 $21 $2b add hl, bc ; $5981: $09 add hl, bc ; $5982: $09 add hl, bc ; $5983: $09 add hl, bc ; $5984: $09 add hl, bc ; $5985: $09 add hl, bc ; $5986: $09 add hl, bc ; $5987: $09 add hl, bc ; $5988: $09 dec de ; $5989: $1b jr jr_00a_59b2 ; $598a: $18 $26 ld hl, $182b ; $598c: $21 $2b $18 dec de ; $598f: $1b ld hl, $2121 ; $5990: $21 $21 $21 ld hl, $2b21 ; $5993: $21 $21 $2b add hl, bc ; $5996: $09 add hl, bc ; $5997: $09 add hl, bc ; $5998: $09 add hl, bc ; $5999: $09 add hl, bc ; $599a: $09 add hl, bc ; $599b: $09 inc b ; $599c: $04 inc e ; $599d: $1c add hl, bc ; $599e: $09 add hl, bc ; $599f: $09 ld [hl+], a ; $59a0: $22 ld [hl+], a ; $59a1: $22 ld [hl+], a ; $59a2: $22 ld [hl+], a ; $59a3: $22 ld [hl+], a ; $59a4: $22 ld [hl+], a ; $59a5: $22 inc l ; $59a6: $2c ld a, [bc] ; $59a7: $0a ld a, [bc] ; $59a8: $0a ld a, [bc] ; $59a9: $0a ld a, [bc] ; $59aa: $0a ld a, [bc] ; $59ab: $0a ld a, [bc] ; $59ac: $0a ld a, [bc] ; $59ad: $0a ld a, [bc] ; $59ae: $0a ld a, [bc] ; $59af: $0a inc hl ; $59b0: $23 inc hl ; $59b1: $23 jr_00a_59b2: inc hl ; $59b2: $23 inc hl ; $59b3: $23 inc hl ; $59b4: $23 inc hl ; $59b5: $23 dec l ; $59b6: $2d dec bc ; $59b7: $0b dec bc ; $59b8: $0b dec bc ; $59b9: $0b dec bc ; $59ba: $0b dec bc ; $59bb: $0b dec bc ; $59bc: $0b dec bc ; $59bd: $0b dec bc ; $59be: $0b dec bc ; $59bf: $0b inc hl ; $59c0: $23 inc hl ; $59c1: $23 inc hl ; $59c2: $23 inc hl ; $59c3: $23 inc hl ; $59c4: $23 inc hl ; $59c5: $23 dec l ; $59c6: $2d dec bc ; $59c7: $0b dec bc ; $59c8: $0b dec bc ; $59c9: $0b dec bc ; $59ca: $0b dec bc ; $59cb: $0b dec bc ; $59cc: $0b dec bc ; $59cd: $0b dec bc ; $59ce: $0b dec bc ; $59cf: $0b inc hl ; $59d0: $23 inc hl ; $59d1: $23 inc hl ; $59d2: $23 inc hl ; $59d3: $23 inc hl ; $59d4: $23 inc hl ; $59d5: $23 inc hl ; $59d6: $23 dec l ; $59d7: $2d dec bc ; $59d8: $0b dec bc ; $59d9: $0b dec bc ; $59da: $0b dec bc ; $59db: $0b dec bc ; $59dc: $0b dec bc ; $59dd: $0b dec bc ; $59de: $0b dec bc ; $59df: $0b inc h ; $59e0: $24 inc h ; $59e1: $24 inc h ; $59e2: $24 inc h ; $59e3: $24 inc h ; $59e4: $24 inc h ; $59e5: $24 inc h ; $59e6: $24 inc h ; $59e7: $24 inc h ; $59e8: $24 ld l, $0c ; $59e9: $2e $0c inc c ; $59eb: $0c inc c ; $59ec: $0c rlca ; $59ed: $07 inc c ; $59ee: $0c inc c ; $59ef: $0c dec h ; $59f0: $25 dec h ; $59f1: $25 dec h ; $59f2: $25 dec h ; $59f3: $25 dec h ; $59f4: $25 dec h ; $59f5: $25 dec h ; $59f6: $25 dec h ; $59f7: $25 dec h ; $59f8: $25 dec h ; $59f9: $25 dec h ; $59fa: $25 dec h ; $59fb: $25 dec h ; $59fc: $25 dec h ; $59fd: $25 dec h ; $59fe: $25 dec h ; $59ff: $25 rlca ; $5a00: $07 rlca ; $5a01: $07 rlca ; $5a02: $07 rlca ; $5a03: $07 ld a, [bc] ; $5a04: $0a rlca ; $5a05: $07 rlca ; $5a06: $07 rlca ; $5a07: $07 rlca ; $5a08: $07 rlca ; $5a09: $07 rlca ; $5a0a: $07 rlca ; $5a0b: $07 rlca ; $5a0c: $07 rlca ; $5a0d: $07 rlca ; $5a0e: $07 rlca ; $5a0f: $07 inc c ; $5a10: $0c dec c ; $5a11: $0d rlca ; $5a12: $07 rlca ; $5a13: $07 rlca ; $5a14: $07 rlca ; $5a15: $07 rlca ; $5a16: $07 inc c ; $5a17: $0c dec c ; $5a18: $0d rlca ; $5a19: $07 inc c ; $5a1a: $0c dec c ; $5a1b: $0d rlca ; $5a1c: $07 rlca ; $5a1d: $07 inc a ; $5a1e: $3c rlca ; $5a1f: $07 ld c, $0f ; $5a20: $0e $0f rlca ; $5a22: $07 inc c ; $5a23: $0c dec c ; $5a24: $0d rlca ; $5a25: $07 inc a ; $5a26: $3c ld c, $0f ; $5a27: $0e $0f rlca ; $5a29: $07 ld c, $0f ; $5a2a: $0e $0f inc c ; $5a2c: $0c dec c ; $5a2d: $0d rlca ; $5a2e: $07 rlca ; $5a2f: $07 ld a, [bc] ; $5a30: $0a rlca ; $5a31: $07 rlca ; $5a32: $07 ld c, $0f ; $5a33: $0e $0f rlca ; $5a35: $07 inc c ; $5a36: $0c dec c ; $5a37: $0d inc c ; $5a38: $0c dec c ; $5a39: $0d rlca ; $5a3a: $07 rlca ; $5a3b: $07 ld c, $0f ; $5a3c: $0e $0f rlca ; $5a3e: $07 inc c ; $5a3f: $0c rlca ; $5a40: $07 rlca ; $5a41: $07 inc c ; $5a42: $0c dec c ; $5a43: $0d rlca ; $5a44: $07 rlca ; $5a45: $07 ld c, $0f ; $5a46: $0e $0f ld c, $0f ; $5a48: $0e $0f inc c ; $5a4a: $0c dec c ; $5a4b: $0d ld a, [bc] ; $5a4c: $0a inc c ; $5a4d: $0c dec c ; $5a4e: $0d ld c, $07 ; $5a4f: $0e $07 inc a ; $5a51: $3c ld c, $0f ; $5a52: $0e $0f ld b, e ; $5a54: $43 ld b, h ; $5a55: $44 ld b, e ; $5a56: $43 ld b, h ; $5a57: $44 ld e, [hl] ; $5a58: $5e ld e, a ; $5a59: $5f ld c, $0f ; $5a5a: $0e $0f rlca ; $5a5c: $07 ld c, $0f ; $5a5d: $0e $0f rlca ; $5a5f: $07 ld e, [hl] ; $5a60: $5e ld e, a ; $5a61: $5f ld b, e ; $5a62: $43 ld b, h ; $5a63: $44 ld [$0808], sp ; $5a64: $08 $08 $08 ld [$0808], sp ; $5a67: $08 $08 $08 ld b, e ; $5a6a: $43 ld b, h ; $5a6b: $44 ld b, e ; $5a6c: $43 ld e, [hl] ; $5a6d: $5e rlca ; $5a6e: $07 rlca ; $5a6f: $07 ld [$0808], sp ; $5a70: $08 $08 $08 ld [$0808], sp ; $5a73: $08 $08 $08 ld [$0808], sp ; $5a76: $08 $08 $08 ld [$0808], sp ; $5a79: $08 $08 $08 ld [$4308], sp ; $5a7c: $08 $08 $43 ld b, h ; $5a7f: $44 ld [$0808], sp ; $5a80: $08 $08 $08 ld [$0808], sp ; $5a83: $08 $08 $08 ld [$0808], sp ; $5a86: $08 $08 $08 ld [$0808], sp ; $5a89: $08 $08 $08 ld [$0808], sp ; $5a8c: $08 $08 $08 ld [$0808], sp ; $5a8f: $08 $08 $08 ld [$0808], sp ; $5a92: $08 $08 $08 ld [$0808], sp ; $5a95: $08 $08 $08 ld [$0808], sp ; $5a98: $08 $08 $08 ld [$0808], sp ; $5a9b: $08 $08 $08 ld [$0708], sp ; $5a9e: $08 $08 $07 rlca ; $5aa1: $07 rlca ; $5aa2: $07 rlca ; $5aa3: $07 ld [$0808], sp ; $5aa4: $08 $08 $08 ld [$0808], sp ; $5aa7: $08 $08 $08 ld [$0808], sp ; $5aaa: $08 $08 $08 ld [$0808], sp ; $5aad: $08 $08 $08 rlca ; $5ab0: $07 inc a ; $5ab1: $3c rlca ; $5ab2: $07 rlca ; $5ab3: $07 rlca ; $5ab4: $07 rlca ; $5ab5: $07 rlca ; $5ab6: $07 ld [$0808], sp ; $5ab7: $08 $08 $08 ld [$0808], sp ; $5aba: $08 $08 $08 ld [$0808], sp ; $5abd: $08 $08 $08 rlca ; $5ac0: $07 rlca ; $5ac1: $07 rlca ; $5ac2: $07 rlca ; $5ac3: $07 rlca ; $5ac4: $07 ld a, [bc] ; $5ac5: $0a rlca ; $5ac6: $07 rlca ; $5ac7: $07 rlca ; $5ac8: $07 dec [hl] ; $5ac9: $35 dec [hl] ; $5aca: $35 ld [$0808], sp ; $5acb: $08 $08 $08 ld [$0708], sp ; $5ace: $08 $08 $07 rlca ; $5ad1: $07 rlca ; $5ad2: $07 rlca ; $5ad3: $07 rlca ; $5ad4: $07 rlca ; $5ad5: $07 rlca ; $5ad6: $07 rlca ; $5ad7: $07 ld a, [bc] ; $5ad8: $0a rlca ; $5ad9: $07 rlca ; $5ada: $07 rlca ; $5adb: $07 rlca ; $5adc: $07 rlca ; $5add: $07 rlca ; $5ade: $07 rlca ; $5adf: $07 rlca ; $5ae0: $07 rlca ; $5ae1: $07 rlca ; $5ae2: $07 rlca ; $5ae3: $07 inc a ; $5ae4: $3c rlca ; $5ae5: $07 rlca ; $5ae6: $07 rlca ; $5ae7: $07 rlca ; $5ae8: $07 rlca ; $5ae9: $07 rlca ; $5aea: $07 rlca ; $5aeb: $07 rlca ; $5aec: $07 ld a, [bc] ; $5aed: $0a rlca ; $5aee: $07 rlca ; $5aef: $07 rlca ; $5af0: $07 rlca ; $5af1: $07 ld a, [bc] ; $5af2: $0a rlca ; $5af3: $07 rlca ; $5af4: $07 rlca ; $5af5: $07 rlca ; $5af6: $07 rlca ; $5af7: $07 rlca ; $5af8: $07 rlca ; $5af9: $07 inc a ; $5afa: $3c rlca ; $5afb: $07 rlca ; $5afc: $07 rlca ; $5afd: $07 rlca ; $5afe: $07 rlca ; $5aff: $07 rlca ; $5b00: $07 inc c ; $5b01: $0c dec c ; $5b02: $0d rlca ; $5b03: $07 ld a, [bc] ; $5b04: $0a rlca ; $5b05: $07 rlca ; $5b06: $07 ld [hl-], a ; $5b07: $32 ld [hl-], a ; $5b08: $32 inc c ; $5b09: $0c dec c ; $5b0a: $0d rlca ; $5b0b: $07 rlca ; $5b0c: $07 rlca ; $5b0d: $07 inc c ; $5b0e: $0c dec c ; $5b0f: $0d rlca ; $5b10: $07 ld c, $0f ; $5b11: $0e $0f inc c ; $5b13: $0c dec c ; $5b14: $0d inc c ; $5b15: $0c dec c ; $5b16: $0d ld [hl-], a ; $5b17: $32 ld [hl-], a ; $5b18: $32 ld c, $0f ; $5b19: $0e $0f inc c ; $5b1b: $0c dec c ; $5b1c: $0d rlca ; $5b1d: $07 ld c, $0f ; $5b1e: $0e $0f rlca ; $5b20: $07 inc c ; $5b21: $0c dec c ; $5b22: $0d ld c, $0f ; $5b23: $0e $0f ld c, $0f ; $5b25: $0e $0f ld [hl-], a ; $5b27: $32 ld a, [bc] ; $5b28: $0a rlca ; $5b29: $07 rlca ; $5b2a: $07 ld c, $0f ; $5b2b: $0e $0f inc c ; $5b2d: $0c dec c ; $5b2e: $0d rlca ; $5b2f: $07 dec c ; $5b30: $0d ld c, $0f ; $5b31: $0e $0f inc c ; $5b33: $0c dec c ; $5b34: $0d inc a ; $5b35: $3c rlca ; $5b36: $07 ld [hl-], a ; $5b37: $32 ld [hl-], a ; $5b38: $32 inc c ; $5b39: $0c dec c ; $5b3a: $0d ld a, [bc] ; $5b3b: $0a rlca ; $5b3c: $07 ld c, $0f ; $5b3d: $0e $0f inc c ; $5b3f: $0c rrca ; $5b40: $0f inc c ; $5b41: $0c dec c ; $5b42: $0d ld c, $0f ; $5b43: $0e $0f inc c ; $5b45: $0c dec c ; $5b46: $0d ld [hl-], a ; $5b47: $32 ld [hl-], a ; $5b48: $32 ld c, $0f ; $5b49: $0e $0f inc c ; $5b4b: $0c dec c ; $5b4c: $0d inc a ; $5b4d: $3c rlca ; $5b4e: $07 ld c, $07 ; $5b4f: $0e $07 ld c, $0f ; $5b51: $0e $0f ld a, [bc] ; $5b53: $0a rlca ; $5b54: $07 ld c, $0f ; $5b55: $0e $0f ld [hl-], a ; $5b57: $32 ld [hl-], a ; $5b58: $32 rlca ; $5b59: $07 inc a ; $5b5a: $3c ld c, $0f ; $5b5b: $0e $0f rlca ; $5b5d: $07 inc c ; $5b5e: $0c dec c ; $5b5f: $0d rlca ; $5b60: $07 rlca ; $5b61: $07 ld e, a ; $5b62: $5f ld b, e ; $5b63: $43 ld b, h ; $5b64: $44 ld e, [hl] ; $5b65: $5e ld e, a ; $5b66: $5f ld b, e ; $5b67: $43 ld b, h ; $5b68: $44 ld e, [hl] ; $5b69: $5e ld e, a ; $5b6a: $5f ld b, e ; $5b6b: $43 ld b, h ; $5b6c: $44 ld e, [hl] ; $5b6d: $5e ld c, $0f ; $5b6e: $0e $0f ld b, e ; $5b70: $43 ld b, h ; $5b71: $44 ld [$0808], sp ; $5b72: $08 $08 $08 ld [$0808], sp ; $5b75: $08 $08 $08 ld [$0808], sp ; $5b78: $08 $08 $08 ld [$0808], sp ; $5b7b: $08 $08 $08 ld b, e ; $5b7e: $43 ld b, h ; $5b7f: $44 ld [$0808], sp ; $5b80: $08 $08 $08 ld [$0808], sp ; $5b83: $08 $08 $08 ld [$0808], sp ; $5b86: $08 $08 $08 ld [$0808], sp ; $5b89: $08 $08 $08 ld [$0808], sp ; $5b8c: $08 $08 $08 ld [$0808], sp ; $5b8f: $08 $08 $08 ld [$0808], sp ; $5b92: $08 $08 $08 ld [$0808], sp ; $5b95: $08 $08 $08 ld [$0808], sp ; $5b98: $08 $08 $08 ld [$0808], sp ; $5b9b: $08 $08 $08 ld [$0808], sp ; $5b9e: $08 $08 $08 ld [$0808], sp ; $5ba1: $08 $08 $08 ld [$0808], sp ; $5ba4: $08 $08 $08 ld [$0808], sp ; $5ba7: $08 $08 $08 ld [$0808], sp ; $5baa: $08 $08 $08 ld [$0808], sp ; $5bad: $08 $08 $08 ld [$0808], sp ; $5bb0: $08 $08 $08 ld [$0808], sp ; $5bb3: $08 $08 $08 ld [$0808], sp ; $5bb6: $08 $08 $08 ld [$0808], sp ; $5bb9: $08 $08 $08 ld [$0808], sp ; $5bbc: $08 $08 $08 ld [$0808], sp ; $5bbf: $08 $08 $08 ld [$0808], sp ; $5bc2: $08 $08 $08 ld [$0808], sp ; $5bc5: $08 $08 $08 ld [$0808], sp ; $5bc8: $08 $08 $08 ld [$0808], sp ; $5bcb: $08 $08 $08 ld [$0708], sp ; $5bce: $08 $08 $07 rlca ; $5bd1: $07 ld a, [de] ; $5bd2: $1a ld [de], a ; $5bd3: $12 ld [de], a ; $5bd4: $12 dec de ; $5bd5: $1b rlca ; $5bd6: $07 rlca ; $5bd7: $07 rlca ; $5bd8: $07 rlca ; $5bd9: $07 ld a, [de] ; $5bda: $1a ld [de], a ; $5bdb: $12 ld [de], a ; $5bdc: $12 dec de ; $5bdd: $1b rlca ; $5bde: $07 rlca ; $5bdf: $07 rlca ; $5be0: $07 rlca ; $5be1: $07 inc e ; $5be2: $1c inc de ; $5be3: $13 inc de ; $5be4: $13 dec e ; $5be5: $1d rlca ; $5be6: $07 ld a, [bc] ; $5be7: $0a rlca ; $5be8: $07 rlca ; $5be9: $07 inc e ; $5bea: $1c inc de ; $5beb: $13 inc de ; $5bec: $13 dec e ; $5bed: $1d inc a ; $5bee: $3c rlca ; $5bef: $07 rlca ; $5bf0: $07 ld a, [bc] ; $5bf1: $0a ld e, $20 ; $5bf2: $1e $20 jr nz, jr_00a_5c15 ; $5bf4: $20 $1f rlca ; $5bf6: $07 rlca ; $5bf7: $07 inc a ; $5bf8: $3c rlca ; $5bf9: $07 ld e, $20 ; $5bfa: $1e $20 jr nz, jr_00a_5c1d ; $5bfc: $20 $1f rlca ; $5bfe: $07 rlca ; $5bff: $07 rlca ; $5c00: $07 inc a ; $5c01: $3c rlca ; $5c02: $07 inc c ; $5c03: $0c dec c ; $5c04: $0d rlca ; $5c05: $07 rlca ; $5c06: $07 rlca ; $5c07: $07 rlca ; $5c08: $07 inc c ; $5c09: $0c dec c ; $5c0a: $0d rlca ; $5c0b: $07 rlca ; $5c0c: $07 rlca ; $5c0d: $07 rlca ; $5c0e: $07 rlca ; $5c0f: $07 rlca ; $5c10: $07 inc c ; $5c11: $0c dec c ; $5c12: $0d ld c, $0f ; $5c13: $0e $0f jr_00a_5c15: rlca ; $5c15: $07 inc a ; $5c16: $3c rlca ; $5c17: $07 rlca ; $5c18: $07 ld c, $0f ; $5c19: $0e $0f rlca ; $5c1b: $07 rlca ; $5c1c: $07 jr_00a_5c1d: ld a, [bc] ; $5c1d: $0a rlca ; $5c1e: $07 rlca ; $5c1f: $07 rlca ; $5c20: $07 ld c, $0f ; $5c21: $0e $0f rlca ; $5c23: $07 inc c ; $5c24: $0c dec c ; $5c25: $0d rlca ; $5c26: $07 rlca ; $5c27: $07 inc c ; $5c28: $0c dec c ; $5c29: $0d rlca ; $5c2a: $07 rlca ; $5c2b: $07 rlca ; $5c2c: $07 inc c ; $5c2d: $0c dec c ; $5c2e: $0d rlca ; $5c2f: $07 dec c ; $5c30: $0d ld a, [bc] ; $5c31: $0a inc c ; $5c32: $0c dec c ; $5c33: $0d ld c, $0f ; $5c34: $0e $0f rlca ; $5c36: $07 rlca ; $5c37: $07 ld c, $0f ; $5c38: $0e $0f rlca ; $5c3a: $07 ld a, [bc] ; $5c3b: $0a rlca ; $5c3c: $07 ld c, $0f ; $5c3d: $0e $0f rlca ; $5c3f: $07 rrca ; $5c40: $0f rlca ; $5c41: $07 ld c, $0f ; $5c42: $0e $0f rlca ; $5c44: $07 rlca ; $5c45: $07 rlca ; $5c46: $07 rlca ; $5c47: $07 rlca ; $5c48: $07 inc c ; $5c49: $0c dec c ; $5c4a: $0d inc c ; $5c4b: $0c dec c ; $5c4c: $0d inc a ; $5c4d: $3c inc c ; $5c4e: $0c dec c ; $5c4f: $0d rlca ; $5c50: $07 inc c ; $5c51: $0c dec c ; $5c52: $0d rlca ; $5c53: $07 rlca ; $5c54: $07 inc c ; $5c55: $0c dec c ; $5c56: $0d ld a, [bc] ; $5c57: $0a rlca ; $5c58: $07 ld c, $0f ; $5c59: $0e $0f ld c, $0f ; $5c5b: $0e $0f rlca ; $5c5d: $07 ld c, $0f ; $5c5e: $0e $0f rlca ; $5c60: $07 ld c, $0f ; $5c61: $0e $0f inc c ; $5c63: $0c dec c ; $5c64: $0d ld c, $0f ; $5c65: $0e $0f rlca ; $5c67: $07 ld b, e ; $5c68: $43 ld b, h ; $5c69: $44 ld b, e ; $5c6a: $43 ld b, h ; $5c6b: $44 ld b, e ; $5c6c: $43 ld b, h ; $5c6d: $44 ld e, [hl] ; $5c6e: $5e ld e, a ; $5c6f: $5f ld b, e ; $5c70: $43 ld b, h ; $5c71: $44 ld e, [hl] ; $5c72: $5e ld c, $0f ; $5c73: $0e $0f ld e, a ; $5c75: $5f ld b, e ; $5c76: $43 ld b, h ; $5c77: $44 ld [$0808], sp ; $5c78: $08 $08 $08 ld [$0808], sp ; $5c7b: $08 $08 $08 ld [$0808], sp ; $5c7e: $08 $08 $08 ld [$4308], sp ; $5c81: $08 $08 $43 ld b, h ; $5c84: $44 ld [$0808], sp ; $5c85: $08 $08 $08 ld [$0808], sp ; $5c88: $08 $08 $08 ld [$0808], sp ; $5c8b: $08 $08 $08 ld [$0808], sp ; $5c8e: $08 $08 $08 ld [$0808], sp ; $5c91: $08 $08 $08 ld [$0808], sp ; $5c94: $08 $08 $08 ld [$0808], sp ; $5c97: $08 $08 $08 ld [$0808], sp ; $5c9a: $08 $08 $08 ld [$0808], sp ; $5c9d: $08 $08 $08 ld [$0808], sp ; $5ca0: $08 $08 $08 ld [$0808], sp ; $5ca3: $08 $08 $08 ld [$0808], sp ; $5ca6: $08 $08 $08 ld [$0708], sp ; $5ca9: $08 $08 $07 rlca ; $5cac: $07 rlca ; $5cad: $07 rlca ; $5cae: $07 rlca ; $5caf: $07 ld [$0808], sp ; $5cb0: $08 $08 $08 ld [$0808], sp ; $5cb3: $08 $08 $08 ld [$0708], sp ; $5cb6: $08 $08 $07 rlca ; $5cb9: $07 rlca ; $5cba: $07 rlca ; $5cbb: $07 inc a ; $5cbc: $3c rlca ; $5cbd: $07 rlca ; $5cbe: $07 rlca ; $5cbf: $07 ld [$3508], sp ; $5cc0: $08 $08 $35 dec [hl] ; $5cc3: $35 dec [hl] ; $5cc4: $35 rlca ; $5cc5: $07 rlca ; $5cc6: $07 rlca ; $5cc7: $07 rlca ; $5cc8: $07 ld a, [bc] ; $5cc9: $0a rlca ; $5cca: $07 rlca ; $5ccb: $07 rlca ; $5ccc: $07 rlca ; $5ccd: $07 rlca ; $5cce: $07 inc a ; $5ccf: $3c rlca ; $5cd0: $07 rlca ; $5cd1: $07 rlca ; $5cd2: $07 rlca ; $5cd3: $07 rlca ; $5cd4: $07 rlca ; $5cd5: $07 inc a ; $5cd6: $3c rlca ; $5cd7: $07 rlca ; $5cd8: $07 rlca ; $5cd9: $07 rlca ; $5cda: $07 rlca ; $5cdb: $07 rlca ; $5cdc: $07 rlca ; $5cdd: $07 rlca ; $5cde: $07 rlca ; $5cdf: $07 rlca ; $5ce0: $07 rlca ; $5ce1: $07 rlca ; $5ce2: $07 ld a, [bc] ; $5ce3: $0a rlca ; $5ce4: $07 rlca ; $5ce5: $07 rlca ; $5ce6: $07 rlca ; $5ce7: $07 rlca ; $5ce8: $07 rlca ; $5ce9: $07 rlca ; $5cea: $07 rlca ; $5ceb: $07 rlca ; $5cec: $07 rlca ; $5ced: $07 ld a, [bc] ; $5cee: $0a rlca ; $5cef: $07 rlca ; $5cf0: $07 inc a ; $5cf1: $3c rlca ; $5cf2: $07 rlca ; $5cf3: $07 rlca ; $5cf4: $07 rlca ; $5cf5: $07 rlca ; $5cf6: $07 rlca ; $5cf7: $07 ld a, [bc] ; $5cf8: $0a rlca ; $5cf9: $07 rlca ; $5cfa: $07 inc a ; $5cfb: $3c rlca ; $5cfc: $07 rlca ; $5cfd: $07 rlca ; $5cfe: $07 rlca ; $5cff: $07 rlca ; $5d00: $07 rlca ; $5d01: $07 rlca ; $5d02: $07 rlca ; $5d03: $07 rlca ; $5d04: $07 rlca ; $5d05: $07 rlca ; $5d06: $07 rlca ; $5d07: $07 rlca ; $5d08: $07 rlca ; $5d09: $07 add hl, bc ; $5d0a: $09 rlca ; $5d0b: $07 rlca ; $5d0c: $07 rlca ; $5d0d: $07 add hl, bc ; $5d0e: $09 add hl, bc ; $5d0f: $09 rlca ; $5d10: $07 rlca ; $5d11: $07 rlca ; $5d12: $07 rlca ; $5d13: $07 rlca ; $5d14: $07 rlca ; $5d15: $07 rlca ; $5d16: $07 rlca ; $5d17: $07 rlca ; $5d18: $07 rlca ; $5d19: $07 rlca ; $5d1a: $07 rlca ; $5d1b: $07 add hl, bc ; $5d1c: $09 rlca ; $5d1d: $07 rlca ; $5d1e: $07 add hl, bc ; $5d1f: $09 rlca ; $5d20: $07 rlca ; $5d21: $07 rlca ; $5d22: $07 rlca ; $5d23: $07 rlca ; $5d24: $07 rlca ; $5d25: $07 rlca ; $5d26: $07 add hl, bc ; $5d27: $09 rlca ; $5d28: $07 rlca ; $5d29: $07 add hl, bc ; $5d2a: $09 rlca ; $5d2b: $07 rlca ; $5d2c: $07 add hl, bc ; $5d2d: $09 add hl, bc ; $5d2e: $09 add hl, bc ; $5d2f: $09 rlca ; $5d30: $07 rlca ; $5d31: $07 inc a ; $5d32: $3c rlca ; $5d33: $07 rlca ; $5d34: $07 add hl, bc ; $5d35: $09 rlca ; $5d36: $07 rlca ; $5d37: $07 rlca ; $5d38: $07 ld a, [bc] ; $5d39: $0a rlca ; $5d3a: $07 add hl, bc ; $5d3b: $09 rlca ; $5d3c: $07 add hl, bc ; $5d3d: $09 add hl, bc ; $5d3e: $09 add hl, bc ; $5d3f: $09 rlca ; $5d40: $07 rlca ; $5d41: $07 rlca ; $5d42: $07 rlca ; $5d43: $07 rlca ; $5d44: $07 rlca ; $5d45: $07 rlca ; $5d46: $07 add hl, bc ; $5d47: $09 add hl, bc ; $5d48: $09 rlca ; $5d49: $07 add hl, bc ; $5d4a: $09 rlca ; $5d4b: $07 add hl, bc ; $5d4c: $09 add hl, bc ; $5d4d: $09 add hl, bc ; $5d4e: $09 add hl, bc ; $5d4f: $09 rlca ; $5d50: $07 add hl, bc ; $5d51: $09 rlca ; $5d52: $07 add hl, bc ; $5d53: $09 rlca ; $5d54: $07 rlca ; $5d55: $07 ld a, [bc] ; $5d56: $0a rlca ; $5d57: $07 rlca ; $5d58: $07 add hl, bc ; $5d59: $09 rlca ; $5d5a: $07 add hl, bc ; $5d5b: $09 add hl, bc ; $5d5c: $09 add hl, bc ; $5d5d: $09 add hl, bc ; $5d5e: $09 add hl, bc ; $5d5f: $09 ld e, [hl] ; $5d60: $5e ld e, a ; $5d61: $5f inc [hl] ; $5d62: $34 ld e, [hl] ; $5d63: $5e rlca ; $5d64: $07 add hl, bc ; $5d65: $09 rlca ; $5d66: $07 add hl, bc ; $5d67: $09 ld e, a ; $5d68: $5f inc [hl] ; $5d69: $34 ld [$5e34], sp ; $5d6a: $08 $34 $5e add hl, bc ; $5d6d: $09 add hl, bc ; $5d6e: $09 add hl, bc ; $5d6f: $09 ld [$0808], sp ; $5d70: $08 $08 $08 ld [$3443], sp ; $5d73: $08 $43 $34 inc [hl] ; $5d76: $34 ld b, h ; $5d77: $44 ld [$0808], sp ; $5d78: $08 $08 $08 ld [$0808], sp ; $5d7b: $08 $08 $08 ld [$0808], sp ; $5d7e: $08 $08 $08 ld [$0808], sp ; $5d81: $08 $08 $08 ld [$0808], sp ; $5d84: $08 $08 $08 ld [$0808], sp ; $5d87: $08 $08 $08 ld [$0808], sp ; $5d8a: $08 $08 $08 ld [$0808], sp ; $5d8d: $08 $08 $08 ld [$0808], sp ; $5d90: $08 $08 $08 ld [$0808], sp ; $5d93: $08 $08 $08 ld [$0808], sp ; $5d96: $08 $08 $08 ld [$0808], sp ; $5d99: $08 $08 $08 ld [$0808], sp ; $5d9c: $08 $08 $08 ld [$0707], sp ; $5d9f: $08 $07 $07 rlca ; $5da2: $07 rlca ; $5da3: $07 add hl, bc ; $5da4: $09 rlca ; $5da5: $07 rlca ; $5da6: $07 rlca ; $5da7: $07 add hl, bc ; $5da8: $09 add hl, bc ; $5da9: $09 rlca ; $5daa: $07 add hl, bc ; $5dab: $09 add hl, bc ; $5dac: $09 add hl, bc ; $5dad: $09 add hl, bc ; $5dae: $09 add hl, bc ; $5daf: $09 rlca ; $5db0: $07 rlca ; $5db1: $07 add hl, bc ; $5db2: $09 rlca ; $5db3: $07 rlca ; $5db4: $07 add hl, bc ; $5db5: $09 rlca ; $5db6: $07 add hl, bc ; $5db7: $09 inc a ; $5db8: $3c rlca ; $5db9: $07 add hl, bc ; $5dba: $09 add hl, bc ; $5dbb: $09 add hl, bc ; $5dbc: $09 add hl, bc ; $5dbd: $09 add hl, bc ; $5dbe: $09 add hl, bc ; $5dbf: $09 rlca ; $5dc0: $07 add hl, bc ; $5dc1: $09 rlca ; $5dc2: $07 inc a ; $5dc3: $3c rlca ; $5dc4: $07 rlca ; $5dc5: $07 add hl, bc ; $5dc6: $09 rlca ; $5dc7: $07 add hl, bc ; $5dc8: $09 add hl, bc ; $5dc9: $09 rlca ; $5dca: $07 add hl, bc ; $5dcb: $09 add hl, bc ; $5dcc: $09 rlca ; $5dcd: $07 add hl, bc ; $5dce: $09 add hl, bc ; $5dcf: $09 add hl, bc ; $5dd0: $09 rlca ; $5dd1: $07 rlca ; $5dd2: $07 rlca ; $5dd3: $07 add hl, bc ; $5dd4: $09 add hl, bc ; $5dd5: $09 rlca ; $5dd6: $07 ld a, [bc] ; $5dd7: $0a add hl, bc ; $5dd8: $09 add hl, bc ; $5dd9: $09 rlca ; $5dda: $07 add hl, bc ; $5ddb: $09 add hl, bc ; $5ddc: $09 add hl, bc ; $5ddd: $09 add hl, bc ; $5dde: $09 add hl, bc ; $5ddf: $09 rlca ; $5de0: $07 rlca ; $5de1: $07 add hl, bc ; $5de2: $09 rlca ; $5de3: $07 rlca ; $5de4: $07 rlca ; $5de5: $07 add hl, bc ; $5de6: $09 rlca ; $5de7: $07 rlca ; $5de8: $07 rlca ; $5de9: $07 add hl, bc ; $5dea: $09 rlca ; $5deb: $07 add hl, bc ; $5dec: $09 rlca ; $5ded: $07 add hl, bc ; $5dee: $09 add hl, bc ; $5def: $09 rlca ; $5df0: $07 add hl, bc ; $5df1: $09 rlca ; $5df2: $07 rlca ; $5df3: $07 add hl, bc ; $5df4: $09 rlca ; $5df5: $07 rlca ; $5df6: $07 rlca ; $5df7: $07 add hl, bc ; $5df8: $09 add hl, bc ; $5df9: $09 add hl, bc ; $5dfa: $09 rlca ; $5dfb: $07 rlca ; $5dfc: $07 add hl, bc ; $5dfd: $09 add hl, bc ; $5dfe: $09 add hl, bc ; $5dff: $09 ld hl, $2121 ; $5e00: $21 $21 $21 dec hl ; $5e03: $2b ld b, b ; $5e04: $40 ld h, $21 ; $5e05: $26 $21 ld hl, $2121 ; $5e07: $21 $21 $21 ld hl, $402b ; $5e0a: $21 $2b $40 ld h, $21 ; $5e0d: $26 $21 ld hl, $2121 ; $5e0f: $21 $21 $21 ld hl, $2121 ; $5e12: $21 $21 $21 ld hl, $2121 ; $5e15: $21 $21 $21 ld hl, $2121 ; $5e18: $21 $21 $21 ld hl, $2121 ; $5e1b: $21 $21 $21 ld hl, $2121 ; $5e1e: $21 $21 $21 ld hl, $2121 ; $5e21: $21 $21 $21 ld hl, $2121 ; $5e24: $21 $21 $21 ld hl, $2121 ; $5e27: $21 $21 $21 ld hl, $2121 ; $5e2a: $21 $21 $21 ld hl, $2121 ; $5e2d: $21 $21 $21 ld hl, $2b21 ; $5e30: $21 $21 $2b inc e ; $5e33: $1c add hl, bc ; $5e34: $09 add hl, bc ; $5e35: $09 add hl, bc ; $5e36: $09 add hl, bc ; $5e37: $09 add hl, bc ; $5e38: $09 add hl, bc ; $5e39: $09 dec de ; $5e3a: $1b ld h, $21 ; $5e3b: $26 $21 dec hl ; $5e3d: $2b ld b, b ; $5e3e: $40 ld h, $21 ; $5e3f: $26 $21 dec hl ; $5e41: $2b inc e ; $5e42: $1c add hl, bc ; $5e43: $09 add hl, bc ; $5e44: $09 add hl, bc ; $5e45: $09 add hl, bc ; $5e46: $09 add hl, bc ; $5e47: $09 add hl, bc ; $5e48: $09 add hl, bc ; $5e49: $09 add hl, bc ; $5e4a: $09 add hl, bc ; $5e4b: $09 dec de ; $5e4c: $1b ld h, $21 ; $5e4d: $26 $21 ld hl, $2b21 ; $5e4f: $21 $21 $2b add hl, bc ; $5e52: $09 add hl, bc ; $5e53: $09 add hl, bc ; $5e54: $09 add hl, bc ; $5e55: $09 add hl, bc ; $5e56: $09 add hl, bc ; $5e57: $09 add hl, bc ; $5e58: $09 add hl, bc ; $5e59: $09 add hl, bc ; $5e5a: $09 add hl, bc ; $5e5b: $09 add hl, bc ; $5e5c: $09 ld h, $21 ; $5e5d: $26 $21 ld hl, $2b21 ; $5e5f: $21 $21 $2b add hl, bc ; $5e62: $09 add hl, bc ; $5e63: $09 add hl, bc ; $5e64: $09 add hl, bc ; $5e65: $09 add hl, bc ; $5e66: $09 add hl, bc ; $5e67: $09 add hl, bc ; $5e68: $09 add hl, bc ; $5e69: $09 add hl, bc ; $5e6a: $09 add hl, bc ; $5e6b: $09 add hl, bc ; $5e6c: $09 add hl, bc ; $5e6d: $09 ld h, $21 ; $5e6e: $26 $21 add hl, bc ; $5e70: $09 add hl, bc ; $5e71: $09 add hl, bc ; $5e72: $09 add hl, bc ; $5e73: $09 add hl, bc ; $5e74: $09 add hl, bc ; $5e75: $09 ld h, $2b ; $5e76: $26 $2b add hl, bc ; $5e78: $09 add hl, bc ; $5e79: $09 add hl, bc ; $5e7a: $09 add hl, bc ; $5e7b: $09 add hl, bc ; $5e7c: $09 add hl, bc ; $5e7d: $09 ld h, $21 ; $5e7e: $26 $21 add hl, bc ; $5e80: $09 add hl, bc ; $5e81: $09 add hl, bc ; $5e82: $09 add hl, bc ; $5e83: $09 add hl, bc ; $5e84: $09 ld h, $21 ; $5e85: $26 $21 dec hl ; $5e87: $2b add hl, bc ; $5e88: $09 add hl, bc ; $5e89: $09 add hl, bc ; $5e8a: $09 add hl, bc ; $5e8b: $09 add hl, bc ; $5e8c: $09 add hl, bc ; $5e8d: $09 add hl, bc ; $5e8e: $09 add hl, bc ; $5e8f: $09 add hl, bc ; $5e90: $09 add hl, bc ; $5e91: $09 add hl, bc ; $5e92: $09 add hl, bc ; $5e93: $09 add hl, bc ; $5e94: $09 ld h, $21 ; $5e95: $26 $21 dec hl ; $5e97: $2b add hl, bc ; $5e98: $09 add hl, bc ; $5e99: $09 add hl, bc ; $5e9a: $09 add hl, bc ; $5e9b: $09 add hl, bc ; $5e9c: $09 add hl, bc ; $5e9d: $09 add hl, bc ; $5e9e: $09 add hl, bc ; $5e9f: $09 ld hl, $2121 ; $5ea0: $21 $21 $21 ld hl, $2121 ; $5ea3: $21 $21 $21 ld hl, $092b ; $5ea6: $21 $2b $09 add hl, bc ; $5ea9: $09 add hl, bc ; $5eaa: $09 add hl, bc ; $5eab: $09 add hl, bc ; $5eac: $09 add hl, bc ; $5ead: $09 add hl, bc ; $5eae: $09 add hl, bc ; $5eaf: $09 ld hl, $2121 ; $5eb0: $21 $21 $21 ld hl, $2121 ; $5eb3: $21 $21 $21 ld hl, $2121 ; $5eb6: $21 $21 $21 dec hl ; $5eb9: $2b add hl, bc ; $5eba: $09 add hl, bc ; $5ebb: $09 add hl, bc ; $5ebc: $09 add hl, bc ; $5ebd: $09 add hl, bc ; $5ebe: $09 add hl, bc ; $5ebf: $09 ld hl, $402b ; $5ec0: $21 $2b $40 ld h, $21 ; $5ec3: $26 $21 ld hl, $2121 ; $5ec5: $21 $21 $21 ld hl, $092b ; $5ec8: $21 $2b $09 add hl, bc ; $5ecb: $09 add hl, bc ; $5ecc: $09 add hl, bc ; $5ecd: $09 add hl, bc ; $5ece: $09 add hl, bc ; $5ecf: $09 ld hl, $2121 ; $5ed0: $21 $21 $21 ld hl, $2121 ; $5ed3: $21 $21 $21 ld hl, $2121 ; $5ed6: $21 $21 $21 dec hl ; $5ed9: $2b add hl, bc ; $5eda: $09 add hl, bc ; $5edb: $09 add hl, bc ; $5edc: $09 add hl, bc ; $5edd: $09 add hl, bc ; $5ede: $09 ld h, $22 ; $5edf: $26 $22 ld [hl+], a ; $5ee1: $22 ld [hl+], a ; $5ee2: $22 inc l ; $5ee3: $2c ld b, c ; $5ee4: $41 daa ; $5ee5: $27 ld [hl+], a ; $5ee6: $22 ld [hl+], a ; $5ee7: $22 ld [hl+], a ; $5ee8: $22 ld [hl+], a ; $5ee9: $22 ld [hl+], a ; $5eea: $22 inc l ; $5eeb: $2c ld a, [bc] ; $5eec: $0a ld a, [bc] ; $5eed: $0a ld a, [bc] ; $5eee: $0a ld a, [bc] ; $5eef: $0a inc hl ; $5ef0: $23 inc hl ; $5ef1: $23 inc hl ; $5ef2: $23 inc hl ; $5ef3: $23 inc hl ; $5ef4: $23 inc hl ; $5ef5: $23 dec l ; $5ef6: $2d ld b, d ; $5ef7: $42 jr z, jr_00a_5f1d ; $5ef8: $28 $23 inc hl ; $5efa: $23 inc hl ; $5efb: $23 dec l ; $5efc: $2d dec bc ; $5efd: $0b dec bc ; $5efe: $0b dec bc ; $5eff: $0b ld hl, $2121 ; $5f00: $21 $21 $21 ld hl, $2121 ; $5f03: $21 $21 $21 ld hl, $2121 ; $5f06: $21 $21 $21 ld hl, $2121 ; $5f09: $21 $21 $21 ld hl, $2121 ; $5f0c: $21 $21 $21 ld hl, $402b ; $5f0f: $21 $2b $40 ld h, $21 ; $5f12: $26 $21 ld hl, $2121 ; $5f14: $21 $21 $21 ld hl, $2121 ; $5f17: $21 $21 $21 ld hl, $2121 ; $5f1a: $21 $21 $21 jr_00a_5f1d: ld hl, $2121 ; $5f1d: $21 $21 $21 ld hl, $2121 ; $5f20: $21 $21 $21 ld hl, $402b ; $5f23: $21 $2b $40 ld h, $2b ; $5f26: $26 $2b ld b, b ; $5f28: $40 ld h, $21 ; $5f29: $26 $21 ld hl, $2121 ; $5f2b: $21 $21 $21 ld hl, $2121 ; $5f2e: $21 $21 $21 ld hl, $2121 ; $5f31: $21 $21 $21 ld hl, $2121 ; $5f34: $21 $21 $21 ld hl, $2121 ; $5f37: $21 $21 $21 ld hl, $2121 ; $5f3a: $21 $21 $21 ld hl, $2121 ; $5f3d: $21 $21 $21 ld hl, $402b ; $5f40: $21 $2b $40 ld h, $21 ; $5f43: $26 $21 ld hl, $2121 ; $5f45: $21 $21 $21 ld hl, $2121 ; $5f48: $21 $21 $21 ld hl, $2121 ; $5f4b: $21 $21 $21 ld hl, $2121 ; $5f4e: $21 $21 $21 ld hl, $2121 ; $5f51: $21 $21 $21 ld hl, $2121 ; $5f54: $21 $21 $21 ld hl, $402b ; $5f57: $21 $2b $40 ld h, $21 ; $5f5a: $26 $21 dec hl ; $5f5c: $2b ld b, b ; $5f5d: $40 ld h, $21 ; $5f5e: $26 $21 dec hl ; $5f60: $2b ld b, b ; $5f61: $40 ld h, $21 ; $5f62: $26 $21 ld hl, $2121 ; $5f64: $21 $21 $21 ld hl, $2121 ; $5f67: $21 $21 $21 ld hl, $2121 ; $5f6a: $21 $21 $21 ld hl, $2121 ; $5f6d: $21 $21 $21 ld hl, $2621 ; $5f70: $21 $21 $26 ld hl, $2121 ; $5f73: $21 $21 $21 dec hl ; $5f76: $2b ld b, b ; $5f77: $40 ld h, $21 ; $5f78: $26 $21 ld hl, $2121 ; $5f7a: $21 $21 $21 ld hl, $2121 ; $5f7d: $21 $21 $21 add hl, bc ; $5f80: $09 add hl, bc ; $5f81: $09 add hl, bc ; $5f82: $09 dec de ; $5f83: $1b ld h, $21 ; $5f84: $26 $21 ld hl, $2121 ; $5f86: $21 $21 $21 dec hl ; $5f89: $2b ld b, b ; $5f8a: $40 ld h, $21 ; $5f8b: $26 $21 ld hl, $2121 ; $5f8d: $21 $21 $21 add hl, bc ; $5f90: $09 add hl, bc ; $5f91: $09 add hl, bc ; $5f92: $09 add hl, bc ; $5f93: $09 add hl, bc ; $5f94: $09 ld h, $21 ; $5f95: $26 $21 ld hl, $2121 ; $5f97: $21 $21 $21 ld hl, $2121 ; $5f9a: $21 $21 $21 ld hl, $2121 ; $5f9d: $21 $21 $21 add hl, bc ; $5fa0: $09 add hl, bc ; $5fa1: $09 add hl, bc ; $5fa2: $09 add hl, bc ; $5fa3: $09 add hl, bc ; $5fa4: $09 ld h, $21 ; $5fa5: $26 $21 ld hl, $2121 ; $5fa7: $21 $21 $21 ld hl, $2121 ; $5faa: $21 $21 $21 ld hl, $2121 ; $5fad: $21 $21 $21 add hl, bc ; $5fb0: $09 add hl, bc ; $5fb1: $09 add hl, bc ; $5fb2: $09 add hl, bc ; $5fb3: $09 add hl, bc ; $5fb4: $09 ld h, $21 ; $5fb5: $26 $21 ld hl, $2121 ; $5fb7: $21 $21 $21 ld hl, $2121 ; $5fba: $21 $21 $21 ld hl, $2121 ; $5fbd: $21 $21 $21 add hl, bc ; $5fc0: $09 add hl, bc ; $5fc1: $09 add hl, bc ; $5fc2: $09 add hl, bc ; $5fc3: $09 add hl, bc ; $5fc4: $09 ld h, $21 ; $5fc5: $26 $21 ld hl, $2b21 ; $5fc7: $21 $21 $2b ld b, b ; $5fca: $40 ld h, $21 ; $5fcb: $26 $21 ld hl, $2121 ; $5fcd: $21 $21 $21 dec hl ; $5fd0: $2b add hl, bc ; $5fd1: $09 add hl, bc ; $5fd2: $09 add hl, bc ; $5fd3: $09 ld h, $21 ; $5fd4: $26 $21 ld hl, $2121 ; $5fd6: $21 $21 $21 ld hl, $2121 ; $5fd9: $21 $21 $21 ld hl, $2121 ; $5fdc: $21 $21 $21 ld hl, $0a0a ; $5fdf: $21 $0a $0a ld a, [bc] ; $5fe2: $0a ld a, [bc] ; $5fe3: $0a daa ; $5fe4: $27 ld [hl+], a ; $5fe5: $22 ld [hl+], a ; $5fe6: $22 ld [hl+], a ; $5fe7: $22 ld [hl+], a ; $5fe8: $22 ld [hl+], a ; $5fe9: $22 ld [hl+], a ; $5fea: $22 ld [hl+], a ; $5feb: $22 inc l ; $5fec: $2c ld b, c ; $5fed: $41 daa ; $5fee: $27 ld [hl+], a ; $5fef: $22 dec bc ; $5ff0: $0b dec bc ; $5ff1: $0b dec bc ; $5ff2: $0b jr z, @+$25 ; $5ff3: $28 $23 dec l ; $5ff5: $2d ld b, d ; $5ff6: $42 jr z, jr_00a_601c ; $5ff7: $28 $23 inc hl ; $5ff9: $23 inc hl ; $5ffa: $23 inc hl ; $5ffb: $23 inc hl ; $5ffc: $23 inc hl ; $5ffd: $23 inc hl ; $5ffe: $23 inc hl ; $5fff: $23 add hl, bc ; $6000: $09 add hl, bc ; $6001: $09 ld h, $21 ; $6002: $26 $21 ld hl, $2121 ; $6004: $21 $21 $21 ld hl, $2121 ; $6007: $21 $21 $21 ld hl, $2121 ; $600a: $21 $21 $21 ld hl, $2121 ; $600d: $21 $21 $21 add hl, bc ; $6010: $09 add hl, bc ; $6011: $09 add hl, bc ; $6012: $09 add hl, bc ; $6013: $09 dec de ; $6014: $1b jr jr_00a_602f ; $6015: $18 $18 ld h, $21 ; $6017: $26 $21 ld hl, $2121 ; $6019: $21 $21 $21 jr_00a_601c: ld hl, $2121 ; $601c: $21 $21 $21 ld hl, $0909 ; $601f: $21 $09 $09 add hl, bc ; $6022: $09 add hl, bc ; $6023: $09 add hl, bc ; $6024: $09 add hl, bc ; $6025: $09 add hl, bc ; $6026: $09 add hl, bc ; $6027: $09 dec de ; $6028: $1b add hl, bc ; $6029: $09 ld h, $21 ; $602a: $26 $21 ld hl, $2121 ; $602c: $21 $21 $21 jr_00a_602f: ld hl, $0909 ; $602f: $21 $09 $09 add hl, bc ; $6032: $09 add hl, bc ; $6033: $09 add hl, bc ; $6034: $09 add hl, bc ; $6035: $09 add hl, bc ; $6036: $09 add hl, bc ; $6037: $09 add hl, bc ; $6038: $09 add hl, bc ; $6039: $09 dec de ; $603a: $1b jr @+$28 ; $603b: $18 $26 ld hl, $2121 ; $603d: $21 $21 $21 add hl, bc ; $6040: $09 add hl, bc ; $6041: $09 add hl, bc ; $6042: $09 add hl, bc ; $6043: $09 add hl, bc ; $6044: $09 add hl, bc ; $6045: $09 add hl, bc ; $6046: $09 add hl, bc ; $6047: $09 add hl, bc ; $6048: $09 add hl, bc ; $6049: $09 add hl, bc ; $604a: $09 add hl, bc ; $604b: $09 inc e ; $604c: $1c ld h, $21 ; $604d: $26 $21 ld hl, $2121 ; $604f: $21 $21 $21 ld hl, $092b ; $6052: $21 $2b $09 add hl, bc ; $6055: $09 add hl, bc ; $6056: $09 add hl, bc ; $6057: $09 add hl, bc ; $6058: $09 add hl, bc ; $6059: $09 add hl, bc ; $605a: $09 add hl, bc ; $605b: $09 add hl, bc ; $605c: $09 ld h, $21 ; $605d: $26 $21 ld hl, $2121 ; $605f: $21 $21 $21 ld hl, $2121 ; $6062: $21 $21 $21 dec hl ; $6065: $2b add hl, bc ; $6066: $09 add hl, bc ; $6067: $09 add hl, bc ; $6068: $09 add hl, bc ; $6069: $09 add hl, bc ; $606a: $09 add hl, bc ; $606b: $09 add hl, bc ; $606c: $09 ld h, $21 ; $606d: $26 $21 ld hl, $2121 ; $606f: $21 $21 $21 ld hl, $2121 ; $6072: $21 $21 $21 ld hl, $2b21 ; $6075: $21 $21 $2b add hl, bc ; $6078: $09 add hl, bc ; $6079: $09 add hl, bc ; $607a: $09 add hl, bc ; $607b: $09 add hl, bc ; $607c: $09 add hl, bc ; $607d: $09 add hl, bc ; $607e: $09 ld h, $18 ; $607f: $26 $18 jr jr_00a_60a9 ; $6081: $18 $26 ld hl, $2121 ; $6083: $21 $21 $21 ld hl, $092b ; $6086: $21 $2b $09 add hl, bc ; $6089: $09 add hl, bc ; $608a: $09 add hl, bc ; $608b: $09 ld h, $21 ; $608c: $26 $21 ld hl, $0921 ; $608e: $21 $21 $09 add hl, bc ; $6091: $09 add hl, bc ; $6092: $09 inc b ; $6093: $04 add hl, bc ; $6094: $09 add hl, bc ; $6095: $09 inc b ; $6096: $04 add hl, bc ; $6097: $09 add hl, bc ; $6098: $09 add hl, bc ; $6099: $09 add hl, bc ; $609a: $09 add hl, bc ; $609b: $09 ld h, $21 ; $609c: $26 $21 ld hl, $0a21 ; $609e: $21 $21 $0a ld a, [bc] ; $60a1: $0a ld a, [bc] ; $60a2: $0a ld a, [bc] ; $60a3: $0a ld a, [bc] ; $60a4: $0a ld a, [bc] ; $60a5: $0a dec b ; $60a6: $05 ld a, [bc] ; $60a7: $0a ld a, [bc] ; $60a8: $0a jr_00a_60a9: ld a, [bc] ; $60a9: $0a ld a, [bc] ; $60aa: $0a daa ; $60ab: $27 ld [hl+], a ; $60ac: $22 ld [hl+], a ; $60ad: $22 ld [hl+], a ; $60ae: $22 ld [hl+], a ; $60af: $22 dec bc ; $60b0: $0b dec bc ; $60b1: $0b dec bc ; $60b2: $0b dec bc ; $60b3: $0b dec bc ; $60b4: $0b dec bc ; $60b5: $0b dec bc ; $60b6: $0b dec bc ; $60b7: $0b dec bc ; $60b8: $0b dec bc ; $60b9: $0b dec bc ; $60ba: $0b dec bc ; $60bb: $0b jr z, jr_00a_60e1 ; $60bc: $28 $23 inc hl ; $60be: $23 inc hl ; $60bf: $23 dec bc ; $60c0: $0b dec bc ; $60c1: $0b dec bc ; $60c2: $0b dec bc ; $60c3: $0b dec bc ; $60c4: $0b dec bc ; $60c5: $0b dec bc ; $60c6: $0b dec bc ; $60c7: $0b dec bc ; $60c8: $0b dec bc ; $60c9: $0b dec bc ; $60ca: $0b dec bc ; $60cb: $0b jr z, jr_00a_60fb ; $60cc: $28 $2d dec bc ; $60ce: $0b jr z, jr_00a_60dc ; $60cf: $28 $0b dec bc ; $60d1: $0b dec bc ; $60d2: $0b dec bc ; $60d3: $0b dec bc ; $60d4: $0b dec bc ; $60d5: $0b dec bc ; $60d6: $0b dec bc ; $60d7: $0b dec bc ; $60d8: $0b jr z, @+$2f ; $60d9: $28 $2d dec bc ; $60db: $0b jr_00a_60dc: dec bc ; $60dc: $0b dec bc ; $60dd: $0b dec bc ; $60de: $0b jr z, jr_00a_60ed ; $60df: $28 $0c jr_00a_60e1: inc c ; $60e1: $0c rlca ; $60e2: $07 inc c ; $60e3: $0c inc c ; $60e4: $0c inc c ; $60e5: $0c add hl, hl ; $60e6: $29 inc h ; $60e7: $24 inc h ; $60e8: $24 inc h ; $60e9: $24 inc h ; $60ea: $24 inc h ; $60eb: $24 inc h ; $60ec: $24 jr_00a_60ed: inc h ; $60ed: $24 inc h ; $60ee: $24 inc h ; $60ef: $24 dec h ; $60f0: $25 dec h ; $60f1: $25 dec h ; $60f2: $25 dec h ; $60f3: $25 dec h ; $60f4: $25 dec h ; $60f5: $25 dec h ; $60f6: $25 dec h ; $60f7: $25 dec h ; $60f8: $25 dec h ; $60f9: $25 dec h ; $60fa: $25 jr_00a_60fb: dec h ; $60fb: $25 dec h ; $60fc: $25 dec h ; $60fd: $25 dec h ; $60fe: $25 dec h ; $60ff: $25 add hl, bc ; $6100: $09 add hl, bc ; $6101: $09 add hl, bc ; $6102: $09 add hl, bc ; $6103: $09 ld h, $21 ; $6104: $26 $21 ld hl, $2121 ; $6106: $21 $21 $21 ld hl, $2121 ; $6109: $21 $21 $21 ld hl, $402b ; $610c: $21 $2b $40 ld h, $09 ; $610f: $26 $09 add hl, bc ; $6111: $09 add hl, bc ; $6112: $09 add hl, bc ; $6113: $09 add hl, bc ; $6114: $09 add hl, bc ; $6115: $09 dec de ; $6116: $1b ld h, $21 ; $6117: $26 $21 ld hl, $2b21 ; $6119: $21 $21 $2b ld b, b ; $611c: $40 ld h, $21 ; $611d: $26 $21 ld hl, $0909 ; $611f: $21 $09 $09 add hl, bc ; $6122: $09 add hl, bc ; $6123: $09 add hl, bc ; $6124: $09 add hl, bc ; $6125: $09 add hl, bc ; $6126: $09 add hl, bc ; $6127: $09 add hl, bc ; $6128: $09 add hl, bc ; $6129: $09 ld h, $21 ; $612a: $26 $21 ld hl, $2121 ; $612c: $21 $21 $21 ld hl, $092b ; $612f: $21 $2b $09 add hl, bc ; $6132: $09 add hl, bc ; $6133: $09 add hl, bc ; $6134: $09 add hl, bc ; $6135: $09 add hl, bc ; $6136: $09 add hl, bc ; $6137: $09 add hl, bc ; $6138: $09 add hl, bc ; $6139: $09 add hl, bc ; $613a: $09 ccf ; $613b: $3f dec a ; $613c: $3d dec a ; $613d: $3d dec a ; $613e: $3d inc b ; $613f: $04 ld hl, $2b21 ; $6140: $21 $21 $2b add hl, bc ; $6143: $09 add hl, bc ; $6144: $09 add hl, bc ; $6145: $09 add hl, bc ; $6146: $09 add hl, bc ; $6147: $09 add hl, bc ; $6148: $09 add hl, bc ; $6149: $09 add hl, bc ; $614a: $09 add hl, bc ; $614b: $09 add hl, bc ; $614c: $09 add hl, bc ; $614d: $09 ld h, $21 ; $614e: $26 $21 ld hl, $3d2b ; $6150: $21 $2b $3d dec a ; $6153: $3d ld a, $09 ; $6154: $3e $09 add hl, bc ; $6156: $09 add hl, bc ; $6157: $09 add hl, bc ; $6158: $09 add hl, bc ; $6159: $09 add hl, bc ; $615a: $09 add hl, bc ; $615b: $09 add hl, bc ; $615c: $09 add hl, bc ; $615d: $09 ld h, $21 ; $615e: $26 $21 dec a ; $6160: $3d ld h, $2b ; $6161: $26 $2b dec a ; $6163: $3d dec a ; $6164: $3d ld h, $2b ; $6165: $26 $2b add hl, bc ; $6167: $09 add hl, bc ; $6168: $09 add hl, bc ; $6169: $09 add hl, bc ; $616a: $09 add hl, bc ; $616b: $09 add hl, bc ; $616c: $09 ccf ; $616d: $3f dec a ; $616e: $3d dec a ; $616f: $3d ld hl, $3d2b ; $6170: $21 $2b $3d ld h, $2b ; $6173: $26 $2b dec a ; $6175: $3d dec a ; $6176: $3d ld a, $09 ; $6177: $3e $09 add hl, bc ; $6179: $09 add hl, bc ; $617a: $09 add hl, bc ; $617b: $09 add hl, bc ; $617c: $09 add hl, bc ; $617d: $09 ld h, $21 ; $617e: $26 $21 add hl, bc ; $6180: $09 add hl, bc ; $6181: $09 add hl, bc ; $6182: $09 add hl, bc ; $6183: $09 add hl, bc ; $6184: $09 add hl, bc ; $6185: $09 add hl, bc ; $6186: $09 add hl, bc ; $6187: $09 add hl, bc ; $6188: $09 add hl, bc ; $6189: $09 add hl, bc ; $618a: $09 add hl, bc ; $618b: $09 add hl, bc ; $618c: $09 add hl, bc ; $618d: $09 ld h, $21 ; $618e: $26 $21 add hl, bc ; $6190: $09 add hl, bc ; $6191: $09 add hl, bc ; $6192: $09 add hl, bc ; $6193: $09 add hl, bc ; $6194: $09 add hl, bc ; $6195: $09 add hl, bc ; $6196: $09 add hl, bc ; $6197: $09 add hl, bc ; $6198: $09 add hl, bc ; $6199: $09 add hl, bc ; $619a: $09 add hl, bc ; $619b: $09 add hl, bc ; $619c: $09 ccf ; $619d: $3f dec a ; $619e: $3d dec a ; $619f: $3d add hl, bc ; $61a0: $09 add hl, bc ; $61a1: $09 add hl, bc ; $61a2: $09 add hl, bc ; $61a3: $09 add hl, bc ; $61a4: $09 add hl, bc ; $61a5: $09 add hl, bc ; $61a6: $09 add hl, bc ; $61a7: $09 add hl, bc ; $61a8: $09 add hl, bc ; $61a9: $09 add hl, bc ; $61aa: $09 ccf ; $61ab: $3f dec a ; $61ac: $3d dec a ; $61ad: $3d dec a ; $61ae: $3d inc b ; $61af: $04 add hl, bc ; $61b0: $09 add hl, bc ; $61b1: $09 add hl, bc ; $61b2: $09 add hl, bc ; $61b3: $09 add hl, bc ; $61b4: $09 add hl, bc ; $61b5: $09 add hl, bc ; $61b6: $09 add hl, bc ; $61b7: $09 add hl, bc ; $61b8: $09 add hl, bc ; $61b9: $09 add hl, bc ; $61ba: $09 ld h, $21 ; $61bb: $26 $21 dec hl ; $61bd: $2b dec a ; $61be: $3d dec a ; $61bf: $3d dec a ; $61c0: $3d dec a ; $61c1: $3d ld a, $09 ; $61c2: $3e $09 add hl, bc ; $61c4: $09 add hl, bc ; $61c5: $09 add hl, bc ; $61c6: $09 add hl, bc ; $61c7: $09 add hl, bc ; $61c8: $09 add hl, bc ; $61c9: $09 ld h, $21 ; $61ca: $26 $21 ld hl, $2121 ; $61cc: $21 $21 $21 ld hl, $0909 ; $61cf: $21 $09 $09 add hl, bc ; $61d2: $09 add hl, bc ; $61d3: $09 add hl, bc ; $61d4: $09 add hl, bc ; $61d5: $09 add hl, bc ; $61d6: $09 ccf ; $61d7: $3f dec a ; $61d8: $3d dec a ; $61d9: $3d inc b ; $61da: $04 dec a ; $61db: $3d dec a ; $61dc: $3d dec a ; $61dd: $3d ld h, $21 ; $61de: $26 $21 ld a, [bc] ; $61e0: $0a ld a, [bc] ; $61e1: $0a ld a, [bc] ; $61e2: $0a ld a, [bc] ; $61e3: $0a ld a, [bc] ; $61e4: $0a ld a, [bc] ; $61e5: $0a ld a, [bc] ; $61e6: $0a ld a, [bc] ; $61e7: $0a daa ; $61e8: $27 inc l ; $61e9: $2c ld c, $0e ; $61ea: $0e $0e daa ; $61ec: $27 ld [hl+], a ; $61ed: $22 ld [hl+], a ; $61ee: $22 ld [hl+], a ; $61ef: $22 dec bc ; $61f0: $0b dec bc ; $61f1: $0b dec bc ; $61f2: $0b dec bc ; $61f3: $0b jr z, @+$2f ; $61f4: $28 $2d rrca ; $61f6: $0f ld b, $0f ; $61f7: $06 $0f rrca ; $61f9: $0f jr z, @+$25 ; $61fa: $28 $23 inc hl ; $61fc: $23 inc hl ; $61fd: $23 dec l ; $61fe: $2d ld b, d ; $61ff: $42 ld hl, $2121 ; $6200: $21 $21 $21 ld hl, $2121 ; $6203: $21 $21 $21 ld hl, $2b21 ; $6206: $21 $21 $2b ld b, b ; $6209: $40 ld h, $21 ; $620a: $26 $21 ld hl, $2121 ; $620c: $21 $21 $21 ld hl, $2121 ; $620f: $21 $21 $21 ld hl, $2b21 ; $6212: $21 $21 $2b ld b, b ; $6215: $40 ld h, $21 ; $6216: $26 $21 ld hl, $2121 ; $6218: $21 $21 $21 ld hl, $2121 ; $621b: $21 $21 $21 ld hl, $2121 ; $621e: $21 $21 $21 ld hl, $2121 ; $6221: $21 $21 $21 ld hl, $2121 ; $6224: $21 $21 $21 ld hl, $2121 ; $6227: $21 $21 $21 ld hl, $2121 ; $622a: $21 $21 $21 dec hl ; $622d: $2b ld b, b ; $622e: $40 ld h, $21 ; $622f: $26 $21 dec hl ; $6231: $2b ld b, b ; $6232: $40 ld h, $21 ; $6233: $26 $21 ld hl, $2121 ; $6235: $21 $21 $21 ld hl, $2121 ; $6238: $21 $21 $21 ld hl, $2121 ; $623b: $21 $21 $21 ld hl, $2121 ; $623e: $21 $21 $21 ld hl, $2121 ; $6241: $21 $21 $21 ld hl, $2b21 ; $6244: $21 $21 $2b ld b, b ; $6247: $40 ld h, $21 ; $6248: $26 $21 ld hl, $2121 ; $624a: $21 $21 $21 ld hl, $2121 ; $624d: $21 $21 $21 ld hl, $2121 ; $6250: $21 $21 $21 ld hl, $2121 ; $6253: $21 $21 $21 ld hl, $2121 ; $6256: $21 $21 $21 ld hl, $2121 ; $6259: $21 $21 $21 ld hl, $2121 ; $625c: $21 $21 $21 ld hl, $2b21 ; $625f: $21 $21 $2b inc e ; $6262: $1c add hl, bc ; $6263: $09 add hl, bc ; $6264: $09 add hl, bc ; $6265: $09 add hl, bc ; $6266: $09 add hl, bc ; $6267: $09 inc b ; $6268: $04 add hl, bc ; $6269: $09 add hl, bc ; $626a: $09 add hl, bc ; $626b: $09 ld h, $21 ; $626c: $26 $21 ld hl, $0921 ; $626e: $21 $21 $09 add hl, bc ; $6271: $09 add hl, bc ; $6272: $09 add hl, bc ; $6273: $09 add hl, bc ; $6274: $09 add hl, bc ; $6275: $09 add hl, bc ; $6276: $09 add hl, bc ; $6277: $09 inc b ; $6278: $04 add hl, bc ; $6279: $09 add hl, bc ; $627a: $09 add hl, bc ; $627b: $09 add hl, bc ; $627c: $09 add hl, bc ; $627d: $09 add hl, bc ; $627e: $09 add hl, bc ; $627f: $09 add hl, bc ; $6280: $09 add hl, bc ; $6281: $09 add hl, bc ; $6282: $09 add hl, bc ; $6283: $09 add hl, bc ; $6284: $09 add hl, bc ; $6285: $09 add hl, bc ; $6286: $09 add hl, bc ; $6287: $09 inc b ; $6288: $04 add hl, bc ; $6289: $09 add hl, bc ; $628a: $09 add hl, bc ; $628b: $09 add hl, bc ; $628c: $09 add hl, bc ; $628d: $09 add hl, bc ; $628e: $09 add hl, bc ; $628f: $09 add hl, bc ; $6290: $09 add hl, bc ; $6291: $09 add hl, bc ; $6292: $09 add hl, bc ; $6293: $09 add hl, bc ; $6294: $09 add hl, bc ; $6295: $09 add hl, bc ; $6296: $09 add hl, bc ; $6297: $09 add hl, bc ; $6298: $09 add hl, bc ; $6299: $09 add hl, bc ; $629a: $09 add hl, bc ; $629b: $09 add hl, bc ; $629c: $09 add hl, bc ; $629d: $09 add hl, bc ; $629e: $09 add hl, bc ; $629f: $09 add hl, bc ; $62a0: $09 add hl, bc ; $62a1: $09 add hl, bc ; $62a2: $09 add hl, bc ; $62a3: $09 add hl, bc ; $62a4: $09 add hl, bc ; $62a5: $09 add hl, bc ; $62a6: $09 add hl, bc ; $62a7: $09 add hl, bc ; $62a8: $09 add hl, bc ; $62a9: $09 add hl, bc ; $62aa: $09 add hl, bc ; $62ab: $09 ld h, $21 ; $62ac: $26 $21 ld hl, $0921 ; $62ae: $21 $21 $09 add hl, bc ; $62b1: $09 add hl, bc ; $62b2: $09 add hl, bc ; $62b3: $09 add hl, bc ; $62b4: $09 add hl, bc ; $62b5: $09 add hl, bc ; $62b6: $09 add hl, bc ; $62b7: $09 inc b ; $62b8: $04 add hl, bc ; $62b9: $09 add hl, bc ; $62ba: $09 add hl, bc ; $62bb: $09 ld h, $21 ; $62bc: $26 $21 ld hl, $0921 ; $62be: $21 $21 $09 add hl, bc ; $62c1: $09 add hl, bc ; $62c2: $09 add hl, bc ; $62c3: $09 add hl, bc ; $62c4: $09 add hl, bc ; $62c5: $09 add hl, bc ; $62c6: $09 add hl, bc ; $62c7: $09 inc b ; $62c8: $04 add hl, bc ; $62c9: $09 add hl, bc ; $62ca: $09 add hl, bc ; $62cb: $09 ld h, $2b ; $62cc: $26 $2b ld b, b ; $62ce: $40 ld h, $2b ; $62cf: $26 $2b add hl, bc ; $62d1: $09 add hl, bc ; $62d2: $09 add hl, bc ; $62d3: $09 add hl, bc ; $62d4: $09 ld h, $21 ; $62d5: $26 $21 ld hl, $2121 ; $62d7: $21 $21 $21 ld hl, $2121 ; $62da: $21 $21 $21 ld hl, $2121 ; $62dd: $21 $21 $21 ld a, [bc] ; $62e0: $0a ld a, [bc] ; $62e1: $0a ld a, [bc] ; $62e2: $0a ld a, [bc] ; $62e3: $0a ld a, [bc] ; $62e4: $0a daa ; $62e5: $27 inc l ; $62e6: $2c ld b, c ; $62e7: $41 daa ; $62e8: $27 ld [hl+], a ; $62e9: $22 ld [hl+], a ; $62ea: $22 ld [hl+], a ; $62eb: $22 ld [hl+], a ; $62ec: $22 ld [hl+], a ; $62ed: $22 ld [hl+], a ; $62ee: $22 ld [hl+], a ; $62ef: $22 dec bc ; $62f0: $0b dec bc ; $62f1: $0b jr z, jr_00a_6317 ; $62f2: $28 $23 inc hl ; $62f4: $23 inc hl ; $62f5: $23 inc hl ; $62f6: $23 inc hl ; $62f7: $23 inc hl ; $62f8: $23 inc hl ; $62f9: $23 inc hl ; $62fa: $23 inc hl ; $62fb: $23 dec l ; $62fc: $2d ld b, d ; $62fd: $42 jr z, jr_00a_6323 ; $62fe: $28 $23 dec bc ; $6300: $0b dec bc ; $6301: $0b dec bc ; $6302: $0b dec bc ; $6303: $0b jr z, jr_00a_6329 ; $6304: $28 $23 inc hl ; $6306: $23 inc hl ; $6307: $23 inc hl ; $6308: $23 inc hl ; $6309: $23 inc hl ; $630a: $23 inc hl ; $630b: $23 inc hl ; $630c: $23 inc hl ; $630d: $23 inc hl ; $630e: $23 inc hl ; $630f: $23 dec bc ; $6310: $0b dec bc ; $6311: $0b dec bc ; $6312: $0b dec bc ; $6313: $0b dec bc ; $6314: $0b dec bc ; $6315: $0b dec e ; $6316: $1d jr_00a_6317: jr z, jr_00a_633c ; $6317: $28 $23 inc hl ; $6319: $23 inc hl ; $631a: $23 dec l ; $631b: $2d ld b, d ; $631c: $42 jr z, jr_00a_6342 ; $631d: $28 $23 inc hl ; $631f: $23 dec bc ; $6320: $0b dec bc ; $6321: $0b dec bc ; $6322: $0b jr_00a_6323: dec bc ; $6323: $0b dec bc ; $6324: $0b dec bc ; $6325: $0b dec bc ; $6326: $0b dec bc ; $6327: $0b dec bc ; $6328: $0b jr_00a_6329: dec e ; $6329: $1d jr z, jr_00a_634f ; $632a: $28 $23 inc hl ; $632c: $23 inc hl ; $632d: $23 inc hl ; $632e: $23 inc hl ; $632f: $23 dec l ; $6330: $2d dec bc ; $6331: $0b dec bc ; $6332: $0b dec bc ; $6333: $0b dec bc ; $6334: $0b dec bc ; $6335: $0b dec bc ; $6336: $0b dec bc ; $6337: $0b dec bc ; $6338: $0b dec bc ; $6339: $0b dec bc ; $633a: $0b dec e ; $633b: $1d jr_00a_633c: jr z, jr_00a_6361 ; $633c: $28 $23 inc hl ; $633e: $23 inc hl ; $633f: $23 inc hl ; $6340: $23 inc hl ; $6341: $23 jr_00a_6342: dec l ; $6342: $2d dec bc ; $6343: $0b dec bc ; $6344: $0b dec bc ; $6345: $0b dec bc ; $6346: $0b dec bc ; $6347: $0b dec bc ; $6348: $0b dec bc ; $6349: $0b dec bc ; $634a: $0b dec bc ; $634b: $0b dec bc ; $634c: $0b jr z, jr_00a_637c ; $634d: $28 $2d jr_00a_634f: ld b, d ; $634f: $42 inc hl ; $6350: $23 inc hl ; $6351: $23 dec l ; $6352: $2d dec bc ; $6353: $0b dec bc ; $6354: $0b dec bc ; $6355: $0b dec bc ; $6356: $0b dec bc ; $6357: $0b dec bc ; $6358: $0b dec bc ; $6359: $0b dec bc ; $635a: $0b dec bc ; $635b: $0b dec bc ; $635c: $0b jr z, jr_00a_6382 ; $635d: $28 $23 inc hl ; $635f: $23 dec l ; $6360: $2d jr_00a_6361: ld b, d ; $6361: $42 jr z, jr_00a_6387 ; $6362: $28 $23 inc hl ; $6364: $23 dec l ; $6365: $2d dec bc ; $6366: $0b dec bc ; $6367: $0b dec bc ; $6368: $0b dec bc ; $6369: $0b dec bc ; $636a: $0b dec bc ; $636b: $0b dec bc ; $636c: $0b dec e ; $636d: $1d jr z, jr_00a_6393 ; $636e: $28 $23 inc hl ; $6370: $23 inc hl ; $6371: $23 inc hl ; $6372: $23 inc hl ; $6373: $23 inc hl ; $6374: $23 inc hl ; $6375: $23 inc hl ; $6376: $23 dec l ; $6377: $2d dec bc ; $6378: $0b dec bc ; $6379: $0b dec bc ; $637a: $0b dec bc ; $637b: $0b jr_00a_637c: dec bc ; $637c: $0b dec bc ; $637d: $0b jr z, jr_00a_63a3 ; $637e: $28 $23 inc hl ; $6380: $23 inc hl ; $6381: $23 jr_00a_6382: inc hl ; $6382: $23 dec l ; $6383: $2d ld e, $0b ; $6384: $1e $0b dec bc ; $6386: $0b jr_00a_6387: dec bc ; $6387: $0b dec bc ; $6388: $0b dec bc ; $6389: $0b dec bc ; $638a: $0b dec bc ; $638b: $0b dec bc ; $638c: $0b dec bc ; $638d: $0b jr z, jr_00a_63b3 ; $638e: $28 $23 dec bc ; $6390: $0b dec bc ; $6391: $0b dec bc ; $6392: $0b jr_00a_6393: dec bc ; $6393: $0b dec bc ; $6394: $0b dec bc ; $6395: $0b dec bc ; $6396: $0b dec bc ; $6397: $0b dec bc ; $6398: $0b dec bc ; $6399: $0b dec bc ; $639a: $0b dec bc ; $639b: $0b dec bc ; $639c: $0b dec bc ; $639d: $0b jr z, jr_00a_63c3 ; $639e: $28 $23 dec bc ; $63a0: $0b dec bc ; $63a1: $0b dec bc ; $63a2: $0b jr_00a_63a3: dec bc ; $63a3: $0b dec bc ; $63a4: $0b dec bc ; $63a5: $0b dec bc ; $63a6: $0b dec bc ; $63a7: $0b dec bc ; $63a8: $0b dec bc ; $63a9: $0b dec bc ; $63aa: $0b dec bc ; $63ab: $0b dec bc ; $63ac: $0b dec bc ; $63ad: $0b jr z, jr_00a_63d3 ; $63ae: $28 $23 dec bc ; $63b0: $0b dec bc ; $63b1: $0b dec bc ; $63b2: $0b jr_00a_63b3: dec bc ; $63b3: $0b dec bc ; $63b4: $0b dec bc ; $63b5: $0b dec bc ; $63b6: $0b dec bc ; $63b7: $0b dec bc ; $63b8: $0b dec bc ; $63b9: $0b dec bc ; $63ba: $0b dec bc ; $63bb: $0b jr z, jr_00a_63e1 ; $63bc: $28 $23 inc hl ; $63be: $23 inc hl ; $63bf: $23 dec bc ; $63c0: $0b dec bc ; $63c1: $0b dec bc ; $63c2: $0b jr_00a_63c3: dec bc ; $63c3: $0b dec bc ; $63c4: $0b dec bc ; $63c5: $0b jr z, jr_00a_63eb ; $63c6: $28 $23 inc hl ; $63c8: $23 inc hl ; $63c9: $23 inc hl ; $63ca: $23 inc hl ; $63cb: $23 inc hl ; $63cc: $23 inc hl ; $63cd: $23 inc hl ; $63ce: $23 inc hl ; $63cf: $23 dec bc ; $63d0: $0b dec bc ; $63d1: $0b dec bc ; $63d2: $0b jr_00a_63d3: dec bc ; $63d3: $0b dec bc ; $63d4: $0b dec bc ; $63d5: $0b dec bc ; $63d6: $0b dec bc ; $63d7: $0b jr z, jr_00a_63fd ; $63d8: $28 $23 dec l ; $63da: $2d ld b, d ; $63db: $42 jr z, jr_00a_6401 ; $63dc: $28 $23 inc hl ; $63de: $23 inc hl ; $63df: $23 dec bc ; $63e0: $0b jr_00a_63e1: dec bc ; $63e1: $0b dec bc ; $63e2: $0b dec bc ; $63e3: $0b dec bc ; $63e4: $0b dec bc ; $63e5: $0b dec bc ; $63e6: $0b jr z, jr_00a_640c ; $63e7: $28 $23 inc hl ; $63e9: $23 inc hl ; $63ea: $23 jr_00a_63eb: inc hl ; $63eb: $23 inc hl ; $63ec: $23 dec l ; $63ed: $2d ld b, d ; $63ee: $42 jr z, jr_00a_6414 ; $63ef: $28 $23 inc hl ; $63f1: $23 inc hl ; $63f2: $23 inc hl ; $63f3: $23 inc hl ; $63f4: $23 inc hl ; $63f5: $23 inc hl ; $63f6: $23 inc hl ; $63f7: $23 inc hl ; $63f8: $23 inc hl ; $63f9: $23 inc hl ; $63fa: $23 inc hl ; $63fb: $23 inc hl ; $63fc: $23 jr_00a_63fd: inc hl ; $63fd: $23 inc hl ; $63fe: $23 inc hl ; $63ff: $23 dec bc ; $6400: $0b jr_00a_6401: dec bc ; $6401: $0b dec bc ; $6402: $0b dec bc ; $6403: $0b jr z, jr_00a_6429 ; $6404: $28 $23 inc hl ; $6406: $23 dec l ; $6407: $2d ld b, d ; $6408: $42 jr z, jr_00a_642e ; $6409: $28 $23 inc hl ; $640b: $23 jr_00a_640c: inc hl ; $640c: $23 inc hl ; $640d: $23 inc hl ; $640e: $23 inc hl ; $640f: $23 dec bc ; $6410: $0b dec bc ; $6411: $0b dec bc ; $6412: $0b dec bc ; $6413: $0b jr_00a_6414: dec e ; $6414: $1d add hl, de ; $6415: $19 add hl, de ; $6416: $19 jr z, jr_00a_643c ; $6417: $28 $23 inc hl ; $6419: $23 inc hl ; $641a: $23 dec l ; $641b: $2d ld b, d ; $641c: $42 jr z, jr_00a_6442 ; $641d: $28 $23 inc hl ; $641f: $23 dec bc ; $6420: $0b dec bc ; $6421: $0b dec bc ; $6422: $0b dec bc ; $6423: $0b dec bc ; $6424: $0b dec bc ; $6425: $0b dec bc ; $6426: $0b add hl, de ; $6427: $19 add hl, de ; $6428: $19 jr_00a_6429: add hl, de ; $6429: $19 jr z, jr_00a_644f ; $642a: $28 $23 inc hl ; $642c: $23 inc hl ; $642d: $23 jr_00a_642e: inc hl ; $642e: $23 inc hl ; $642f: $23 dec l ; $6430: $2d dec bc ; $6431: $0b dec bc ; $6432: $0b dec bc ; $6433: $0b dec bc ; $6434: $0b dec bc ; $6435: $0b dec bc ; $6436: $0b dec bc ; $6437: $0b dec bc ; $6438: $0b dec bc ; $6439: $0b dec e ; $643a: $1d add hl, de ; $643b: $19 jr_00a_643c: jr z, jr_00a_646b ; $643c: $28 $2d ld b, d ; $643e: $42 jr z, jr_00a_6464 ; $643f: $28 $23 dec l ; $6441: $2d jr_00a_6442: dec bc ; $6442: $0b dec bc ; $6443: $0b dec bc ; $6444: $0b dec bc ; $6445: $0b dec bc ; $6446: $0b dec bc ; $6447: $0b dec bc ; $6448: $0b dec bc ; $6449: $0b dec bc ; $644a: $0b dec bc ; $644b: $0b jr z, jr_00a_6471 ; $644c: $28 $23 inc hl ; $644e: $23 jr_00a_644f: inc hl ; $644f: $23 inc hl ; $6450: $23 inc hl ; $6451: $23 dec l ; $6452: $2d dec bc ; $6453: $0b dec bc ; $6454: $0b dec bc ; $6455: $0b dec bc ; $6456: $0b dec bc ; $6457: $0b dec bc ; $6458: $0b dec bc ; $6459: $0b dec bc ; $645a: $0b dec bc ; $645b: $0b dec e ; $645c: $1d add hl, de ; $645d: $19 jr z, jr_00a_6483 ; $645e: $28 $23 inc hl ; $6460: $23 inc hl ; $6461: $23 inc hl ; $6462: $23 inc hl ; $6463: $23 jr_00a_6464: inc hl ; $6464: $23 dec l ; $6465: $2d dec bc ; $6466: $0b dec bc ; $6467: $0b dec bc ; $6468: $0b dec bc ; $6469: $0b dec bc ; $646a: $0b jr_00a_646b: dec bc ; $646b: $0b dec bc ; $646c: $0b dec bc ; $646d: $0b jr z, jr_00a_6493 ; $646e: $28 $23 inc hl ; $6470: $23 jr_00a_6471: inc hl ; $6471: $23 inc hl ; $6472: $23 inc hl ; $6473: $23 inc hl ; $6474: $23 inc hl ; $6475: $23 inc hl ; $6476: $23 dec l ; $6477: $2d dec bc ; $6478: $0b dec bc ; $6479: $0b dec bc ; $647a: $0b dec bc ; $647b: $0b dec bc ; $647c: $0b dec bc ; $647d: $0b jr z, jr_00a_64a3 ; $647e: $28 $23 inc hl ; $6480: $23 inc hl ; $6481: $23 inc hl ; $6482: $23 jr_00a_6483: dec l ; $6483: $2d add hl, de ; $6484: $19 add hl, de ; $6485: $19 add hl, de ; $6486: $19 ld e, $0b ; $6487: $1e $0b dec bc ; $6489: $0b dec bc ; $648a: $0b dec bc ; $648b: $0b dec bc ; $648c: $0b dec bc ; $648d: $0b ld b, $42 ; $648e: $06 $42 add hl, de ; $6490: $19 add hl, de ; $6491: $19 add hl, de ; $6492: $19 jr_00a_6493: dec bc ; $6493: $0b dec bc ; $6494: $0b dec bc ; $6495: $0b dec bc ; $6496: $0b dec bc ; $6497: $0b dec bc ; $6498: $0b dec bc ; $6499: $0b dec bc ; $649a: $0b dec bc ; $649b: $0b dec bc ; $649c: $0b dec bc ; $649d: $0b jr z, jr_00a_64c3 ; $649e: $28 $23 dec bc ; $64a0: $0b dec bc ; $64a1: $0b dec bc ; $64a2: $0b jr_00a_64a3: dec bc ; $64a3: $0b dec bc ; $64a4: $0b dec bc ; $64a5: $0b dec bc ; $64a6: $0b dec bc ; $64a7: $0b dec bc ; $64a8: $0b dec bc ; $64a9: $0b dec bc ; $64aa: $0b dec bc ; $64ab: $0b dec bc ; $64ac: $0b jr z, jr_00a_64d2 ; $64ad: $28 $23 inc hl ; $64af: $23 dec bc ; $64b0: $0b dec bc ; $64b1: $0b dec bc ; $64b2: $0b dec bc ; $64b3: $0b dec bc ; $64b4: $0b dec bc ; $64b5: $0b dec bc ; $64b6: $0b dec bc ; $64b7: $0b dec bc ; $64b8: $0b dec bc ; $64b9: $0b dec bc ; $64ba: $0b jr z, @+$25 ; $64bb: $28 $23 inc hl ; $64bd: $23 inc hl ; $64be: $23 inc hl ; $64bf: $23 dec bc ; $64c0: $0b dec bc ; $64c1: $0b dec bc ; $64c2: $0b jr_00a_64c3: dec bc ; $64c3: $0b dec bc ; $64c4: $0b dec bc ; $64c5: $0b dec bc ; $64c6: $0b dec bc ; $64c7: $0b dec bc ; $64c8: $0b dec bc ; $64c9: $0b dec bc ; $64ca: $0b jr z, jr_00a_64f0 ; $64cb: $28 $23 inc hl ; $64cd: $23 inc hl ; $64ce: $23 inc hl ; $64cf: $23 dec bc ; $64d0: $0b dec bc ; $64d1: $0b jr_00a_64d2: dec bc ; $64d2: $0b dec bc ; $64d3: $0b dec bc ; $64d4: $0b dec bc ; $64d5: $0b dec bc ; $64d6: $0b dec bc ; $64d7: $0b jr z, @+$25 ; $64d8: $28 $23 inc hl ; $64da: $23 inc hl ; $64db: $23 inc hl ; $64dc: $23 dec l ; $64dd: $2d ld b, d ; $64de: $42 jr z, jr_00a_64ec ; $64df: $28 $0b dec bc ; $64e1: $0b dec bc ; $64e2: $0b dec bc ; $64e3: $0b dec bc ; $64e4: $0b dec bc ; $64e5: $0b jr z, jr_00a_650b ; $64e6: $28 $23 dec l ; $64e8: $2d ld b, d ; $64e9: $42 jr z, @+$25 ; $64ea: $28 $23 jr_00a_64ec: inc hl ; $64ec: $23 inc hl ; $64ed: $23 inc hl ; $64ee: $23 inc hl ; $64ef: $23 jr_00a_64f0: inc hl ; $64f0: $23 inc hl ; $64f1: $23 inc hl ; $64f2: $23 inc hl ; $64f3: $23 inc hl ; $64f4: $23 inc hl ; $64f5: $23 inc hl ; $64f6: $23 inc hl ; $64f7: $23 inc hl ; $64f8: $23 inc hl ; $64f9: $23 dec l ; $64fa: $2d ld b, d ; $64fb: $42 jr z, jr_00a_6521 ; $64fc: $28 $23 inc hl ; $64fe: $23 inc hl ; $64ff: $23 dec bc ; $6500: $0b dec bc ; $6501: $0b dec bc ; $6502: $0b dec bc ; $6503: $0b jr z, jr_00a_6529 ; $6504: $28 $23 inc hl ; $6506: $23 inc hl ; $6507: $23 inc hl ; $6508: $23 inc hl ; $6509: $23 inc hl ; $650a: $23 jr_00a_650b: inc hl ; $650b: $23 dec l ; $650c: $2d ld b, d ; $650d: $42 jr z, jr_00a_6533 ; $650e: $28 $23 dec bc ; $6510: $0b dec bc ; $6511: $0b dec bc ; $6512: $0b dec bc ; $6513: $0b dec bc ; $6514: $0b dec bc ; $6515: $0b dec bc ; $6516: $0b dec e ; $6517: $1d jr z, jr_00a_653d ; $6518: $28 $23 dec l ; $651a: $2d ld b, d ; $651b: $42 jr z, jr_00a_6541 ; $651c: $28 $23 inc hl ; $651e: $23 inc hl ; $651f: $23 dec bc ; $6520: $0b jr_00a_6521: dec bc ; $6521: $0b dec bc ; $6522: $0b dec bc ; $6523: $0b dec bc ; $6524: $0b dec bc ; $6525: $0b dec bc ; $6526: $0b dec bc ; $6527: $0b dec bc ; $6528: $0b jr_00a_6529: dec e ; $6529: $1d jr z, @+$25 ; $652a: $28 $23 inc hl ; $652c: $23 inc hl ; $652d: $23 inc hl ; $652e: $23 inc hl ; $652f: $23 dec l ; $6530: $2d dec bc ; $6531: $0b dec bc ; $6532: $0b jr_00a_6533: dec bc ; $6533: $0b dec bc ; $6534: $0b dec bc ; $6535: $0b dec bc ; $6536: $0b dec bc ; $6537: $0b dec bc ; $6538: $0b dec bc ; $6539: $0b jr z, jr_00a_655f ; $653a: $28 $23 inc hl ; $653c: $23 jr_00a_653d: dec l ; $653d: $2d ld b, d ; $653e: $42 jr z, jr_00a_6564 ; $653f: $28 $23 jr_00a_6541: dec l ; $6541: $2d dec bc ; $6542: $0b dec bc ; $6543: $0b dec bc ; $6544: $0b dec bc ; $6545: $0b dec bc ; $6546: $0b dec bc ; $6547: $0b dec bc ; $6548: $0b dec bc ; $6549: $0b dec bc ; $654a: $0b jr z, jr_00a_6570 ; $654b: $28 $23 inc hl ; $654d: $23 jr z, jr_00a_6573 ; $654e: $28 $23 inc hl ; $6550: $23 dec l ; $6551: $2d dec bc ; $6552: $0b dec bc ; $6553: $0b dec bc ; $6554: $0b dec bc ; $6555: $0b dec bc ; $6556: $0b dec bc ; $6557: $0b dec bc ; $6558: $0b dec bc ; $6559: $0b dec bc ; $655a: $0b jr z, jr_00a_6580 ; $655b: $28 $23 inc hl ; $655d: $23 inc hl ; $655e: $23 jr_00a_655f: inc hl ; $655f: $23 inc hl ; $6560: $23 inc hl ; $6561: $23 dec l ; $6562: $2d dec bc ; $6563: $0b jr_00a_6564: dec bc ; $6564: $0b dec bc ; $6565: $0b dec bc ; $6566: $0b dec bc ; $6567: $0b dec bc ; $6568: $0b dec bc ; $6569: $0b dec bc ; $656a: $0b dec bc ; $656b: $0b jr z, jr_00a_6591 ; $656c: $28 $23 inc hl ; $656e: $23 inc hl ; $656f: $23 jr_00a_6570: inc hl ; $6570: $23 inc hl ; $6571: $23 inc hl ; $6572: $23 jr_00a_6573: inc hl ; $6573: $23 inc hl ; $6574: $23 dec l ; $6575: $2d dec bc ; $6576: $0b dec bc ; $6577: $0b dec bc ; $6578: $0b dec bc ; $6579: $0b dec bc ; $657a: $0b dec bc ; $657b: $0b dec bc ; $657c: $0b dec bc ; $657d: $0b dec bc ; $657e: $0b dec bc ; $657f: $0b jr_00a_6580: inc hl ; $6580: $23 inc hl ; $6581: $23 inc hl ; $6582: $23 inc hl ; $6583: $23 inc hl ; $6584: $23 dec l ; $6585: $2d dec bc ; $6586: $0b dec bc ; $6587: $0b dec bc ; $6588: $0b dec bc ; $6589: $0b dec bc ; $658a: $0b dec bc ; $658b: $0b dec bc ; $658c: $0b dec bc ; $658d: $0b dec bc ; $658e: $0b dec bc ; $658f: $0b inc hl ; $6590: $23 jr_00a_6591: inc hl ; $6591: $23 inc hl ; $6592: $23 inc hl ; $6593: $23 inc hl ; $6594: $23 dec l ; $6595: $2d dec bc ; $6596: $0b dec bc ; $6597: $0b dec bc ; $6598: $0b dec bc ; $6599: $0b dec bc ; $659a: $0b dec bc ; $659b: $0b dec bc ; $659c: $0b dec bc ; $659d: $0b dec bc ; $659e: $0b dec bc ; $659f: $0b inc hl ; $65a0: $23 dec l ; $65a1: $2d ld b, d ; $65a2: $42 jr z, @+$25 ; $65a3: $28 $23 inc hl ; $65a5: $23 dec l ; $65a6: $2d dec bc ; $65a7: $0b dec bc ; $65a8: $0b dec bc ; $65a9: $0b dec bc ; $65aa: $0b jr z, @+$25 ; $65ab: $28 $23 inc hl ; $65ad: $23 inc hl ; $65ae: $23 inc hl ; $65af: $23 inc hl ; $65b0: $23 inc hl ; $65b1: $23 inc hl ; $65b2: $23 inc hl ; $65b3: $23 inc hl ; $65b4: $23 inc hl ; $65b5: $23 inc hl ; $65b6: $23 inc hl ; $65b7: $23 inc hl ; $65b8: $23 inc hl ; $65b9: $23 inc hl ; $65ba: $23 inc hl ; $65bb: $23 inc hl ; $65bc: $23 inc hl ; $65bd: $23 inc hl ; $65be: $23 inc hl ; $65bf: $23 inc hl ; $65c0: $23 inc hl ; $65c1: $23 inc hl ; $65c2: $23 inc hl ; $65c3: $23 inc hl ; $65c4: $23 dec l ; $65c5: $2d ld b, d ; $65c6: $42 jr z, jr_00a_65ec ; $65c7: $28 $23 jr z, jr_00a_65ee ; $65c9: $28 $23 inc hl ; $65cb: $23 inc hl ; $65cc: $23 ld b, $42 ; $65cd: $06 $42 jr z, jr_00a_65fe ; $65cf: $28 $2d ld b, d ; $65d1: $42 jr z, jr_00a_65f7 ; $65d2: $28 $23 inc hl ; $65d4: $23 inc hl ; $65d5: $23 inc hl ; $65d6: $23 inc hl ; $65d7: $23 inc hl ; $65d8: $23 inc hl ; $65d9: $23 inc hl ; $65da: $23 inc hl ; $65db: $23 inc hl ; $65dc: $23 inc hl ; $65dd: $23 inc hl ; $65de: $23 inc hl ; $65df: $23 inc hl ; $65e0: $23 inc hl ; $65e1: $23 inc hl ; $65e2: $23 inc hl ; $65e3: $23 inc hl ; $65e4: $23 inc hl ; $65e5: $23 inc hl ; $65e6: $23 inc hl ; $65e7: $23 inc hl ; $65e8: $23 inc hl ; $65e9: $23 inc hl ; $65ea: $23 inc hl ; $65eb: $23 jr_00a_65ec: inc hl ; $65ec: $23 inc hl ; $65ed: $23 jr_00a_65ee: inc hl ; $65ee: $23 inc hl ; $65ef: $23 inc hl ; $65f0: $23 dec l ; $65f1: $2d ld b, d ; $65f2: $42 jr z, jr_00a_6618 ; $65f3: $28 $23 inc hl ; $65f5: $23 inc hl ; $65f6: $23 jr_00a_65f7: inc hl ; $65f7: $23 dec l ; $65f8: $2d ld b, d ; $65f9: $42 jr z, jr_00a_661f ; $65fa: $28 $23 inc hl ; $65fc: $23 inc hl ; $65fd: $23 jr_00a_65fe: inc hl ; $65fe: $23 inc hl ; $65ff: $23 ld hl, $2b21 ; $6600: $21 $21 $2b ld b, b ; $6603: $40 ld h, $21 ; $6604: $26 $21 ld hl, $2121 ; $6606: $21 $21 $21 ld hl, $2121 ; $6609: $21 $21 $21 ld hl, $2121 ; $660c: $21 $21 $21 ld hl, $2121 ; $660f: $21 $21 $21 ld hl, $2121 ; $6612: $21 $21 $21 ld hl, $2121 ; $6615: $21 $21 $21 jr_00a_6618: ld hl, $2121 ; $6618: $21 $21 $21 ld hl, $2b21 ; $661b: $21 $21 $2b ld b, b ; $661e: $40 jr_00a_661f: ld h, $21 ; $661f: $26 $21 dec hl ; $6621: $2b inc e ; $6622: $1c add hl, bc ; $6623: $09 add hl, bc ; $6624: $09 add hl, bc ; $6625: $09 add hl, bc ; $6626: $09 add hl, bc ; $6627: $09 add hl, bc ; $6628: $09 dec de ; $6629: $1b ld h, $21 ; $662a: $26 $21 ld hl, $2121 ; $662c: $21 $21 $21 ld hl, $2b21 ; $662f: $21 $21 $2b add hl, bc ; $6632: $09 add hl, bc ; $6633: $09 add hl, bc ; $6634: $09 add hl, bc ; $6635: $09 add hl, bc ; $6636: $09 add hl, bc ; $6637: $09 add hl, bc ; $6638: $09 add hl, bc ; $6639: $09 add hl, bc ; $663a: $09 add hl, bc ; $663b: $09 dec de ; $663c: $1b ld h, $21 ; $663d: $26 $21 ld hl, $2b21 ; $663f: $21 $21 $2b add hl, bc ; $6642: $09 add hl, bc ; $6643: $09 add hl, bc ; $6644: $09 add hl, bc ; $6645: $09 add hl, bc ; $6646: $09 add hl, bc ; $6647: $09 add hl, bc ; $6648: $09 add hl, bc ; $6649: $09 add hl, bc ; $664a: $09 add hl, bc ; $664b: $09 add hl, bc ; $664c: $09 ld h, $21 ; $664d: $26 $21 ld hl, $0909 ; $664f: $21 $09 $09 add hl, bc ; $6652: $09 add hl, bc ; $6653: $09 add hl, bc ; $6654: $09 add hl, bc ; $6655: $09 add hl, bc ; $6656: $09 add hl, bc ; $6657: $09 add hl, bc ; $6658: $09 add hl, bc ; $6659: $09 add hl, bc ; $665a: $09 add hl, bc ; $665b: $09 add hl, bc ; $665c: $09 dec de ; $665d: $1b ld h, $21 ; $665e: $26 $21 add hl, bc ; $6660: $09 add hl, bc ; $6661: $09 add hl, bc ; $6662: $09 add hl, bc ; $6663: $09 ld h, $21 ; $6664: $26 $21 ld hl, $2121 ; $6666: $21 $21 $21 ld hl, $092b ; $6669: $21 $2b $09 add hl, bc ; $666c: $09 add hl, bc ; $666d: $09 ld h, $21 ; $666e: $26 $21 add hl, bc ; $6670: $09 add hl, bc ; $6671: $09 add hl, bc ; $6672: $09 add hl, bc ; $6673: $09 ld h, $2b ; $6674: $26 $2b add hl, bc ; $6676: $09 add hl, bc ; $6677: $09 add hl, bc ; $6678: $09 add hl, bc ; $6679: $09 inc b ; $667a: $04 add hl, bc ; $667b: $09 add hl, bc ; $667c: $09 add hl, bc ; $667d: $09 ld h, $21 ; $667e: $26 $21 ld hl, $2121 ; $6680: $21 $21 $21 ld hl, $2b21 ; $6683: $21 $21 $2b add hl, bc ; $6686: $09 add hl, bc ; $6687: $09 add hl, bc ; $6688: $09 add hl, bc ; $6689: $09 inc b ; $668a: $04 add hl, bc ; $668b: $09 add hl, bc ; $668c: $09 add hl, bc ; $668d: $09 add hl, bc ; $668e: $09 add hl, bc ; $668f: $09 add hl, bc ; $6690: $09 add hl, bc ; $6691: $09 add hl, bc ; $6692: $09 add hl, bc ; $6693: $09 add hl, bc ; $6694: $09 add hl, bc ; $6695: $09 add hl, bc ; $6696: $09 add hl, bc ; $6697: $09 add hl, bc ; $6698: $09 add hl, bc ; $6699: $09 inc b ; $669a: $04 add hl, bc ; $669b: $09 add hl, bc ; $669c: $09 add hl, bc ; $669d: $09 add hl, bc ; $669e: $09 add hl, bc ; $669f: $09 ld hl, $2121 ; $66a0: $21 $21 $21 ld hl, $2121 ; $66a3: $21 $21 $21 ld hl, $092b ; $66a6: $21 $2b $09 add hl, bc ; $66a9: $09 ld h, $2b ; $66aa: $26 $2b add hl, bc ; $66ac: $09 add hl, bc ; $66ad: $09 add hl, bc ; $66ae: $09 add hl, bc ; $66af: $09 ld hl, $2121 ; $66b0: $21 $21 $21 dec hl ; $66b3: $2b add hl, bc ; $66b4: $09 add hl, bc ; $66b5: $09 add hl, bc ; $66b6: $09 add hl, bc ; $66b7: $09 add hl, bc ; $66b8: $09 add hl, bc ; $66b9: $09 add hl, bc ; $66ba: $09 add hl, bc ; $66bb: $09 add hl, bc ; $66bc: $09 add hl, bc ; $66bd: $09 add hl, bc ; $66be: $09 add hl, bc ; $66bf: $09 ld hl, $2121 ; $66c0: $21 $21 $21 dec hl ; $66c3: $2b add hl, bc ; $66c4: $09 add hl, bc ; $66c5: $09 add hl, bc ; $66c6: $09 add hl, bc ; $66c7: $09 add hl, bc ; $66c8: $09 add hl, bc ; $66c9: $09 add hl, bc ; $66ca: $09 add hl, bc ; $66cb: $09 add hl, bc ; $66cc: $09 add hl, bc ; $66cd: $09 add hl, bc ; $66ce: $09 add hl, bc ; $66cf: $09 ld hl, $2121 ; $66d0: $21 $21 $21 dec hl ; $66d3: $2b add hl, bc ; $66d4: $09 inc [hl] ; $66d5: $34 dec [hl] ; $66d6: $35 add hl, bc ; $66d7: $09 add hl, bc ; $66d8: $09 add hl, bc ; $66d9: $09 add hl, bc ; $66da: $09 add hl, bc ; $66db: $09 add hl, bc ; $66dc: $09 add hl, bc ; $66dd: $09 add hl, bc ; $66de: $09 ld h, $22 ; $66df: $26 $22 inc l ; $66e1: $2c ld b, c ; $66e2: $41 dec b ; $66e3: $05 ld a, [bc] ; $66e4: $0a ld [hl], $37 ; $66e5: $36 $37 ld a, [bc] ; $66e7: $0a daa ; $66e8: $27 ld [hl+], a ; $66e9: $22 ld [hl+], a ; $66ea: $22 ld [hl+], a ; $66eb: $22 inc l ; $66ec: $2c ld a, [bc] ; $66ed: $0a ld a, [bc] ; $66ee: $0a ld a, [bc] ; $66ef: $0a inc hl ; $66f0: $23 inc hl ; $66f1: $23 inc hl ; $66f2: $23 inc hl ; $66f3: $23 inc hl ; $66f4: $23 inc hl ; $66f5: $23 inc hl ; $66f6: $23 inc hl ; $66f7: $23 inc hl ; $66f8: $23 dec l ; $66f9: $2d ld b, d ; $66fa: $42 jr z, jr_00a_672a ; $66fb: $28 $2d dec bc ; $66fd: $0b dec bc ; $66fe: $0b dec bc ; $66ff: $0b ld hl, $2121 ; $6700: $21 $21 $21 ld hl, $2121 ; $6703: $21 $21 $21 ld hl, $2121 ; $6706: $21 $21 $21 ld hl, $2b21 ; $6709: $21 $21 $2b add hl, bc ; $670c: $09 add hl, bc ; $670d: $09 add hl, bc ; $670e: $09 add hl, bc ; $670f: $09 ld hl, $2121 ; $6710: $21 $21 $21 dec hl ; $6713: $2b ld b, b ; $6714: $40 ld h, $21 ; $6715: $26 $21 ld hl, $1c2b ; $6717: $21 $2b $1c add hl, bc ; $671a: $09 add hl, bc ; $671b: $09 add hl, bc ; $671c: $09 add hl, bc ; $671d: $09 add hl, bc ; $671e: $09 add hl, bc ; $671f: $09 ld hl, $2121 ; $6720: $21 $21 $21 ld hl, $2b21 ; $6723: $21 $21 $2b inc e ; $6726: $1c add hl, bc ; $6727: $09 add hl, bc ; $6728: $09 add hl, bc ; $6729: $09 jr_00a_672a: add hl, bc ; $672a: $09 add hl, bc ; $672b: $09 add hl, bc ; $672c: $09 add hl, bc ; $672d: $09 add hl, bc ; $672e: $09 add hl, bc ; $672f: $09 ld b, b ; $6730: $40 ld h, $21 ; $6731: $26 $21 dec hl ; $6733: $2b inc e ; $6734: $1c add hl, bc ; $6735: $09 add hl, bc ; $6736: $09 add hl, bc ; $6737: $09 add hl, bc ; $6738: $09 add hl, bc ; $6739: $09 add hl, bc ; $673a: $09 add hl, bc ; $673b: $09 add hl, bc ; $673c: $09 add hl, bc ; $673d: $09 ld h, $21 ; $673e: $26 $21 ld hl, $2b21 ; $6740: $21 $21 $2b inc e ; $6743: $1c add hl, bc ; $6744: $09 add hl, bc ; $6745: $09 add hl, bc ; $6746: $09 add hl, bc ; $6747: $09 add hl, bc ; $6748: $09 add hl, bc ; $6749: $09 add hl, bc ; $674a: $09 add hl, bc ; $674b: $09 add hl, bc ; $674c: $09 ld h, $21 ; $674d: $26 $21 ld hl, $2121 ; $674f: $21 $21 $21 dec hl ; $6752: $2b add hl, bc ; $6753: $09 add hl, bc ; $6754: $09 add hl, bc ; $6755: $09 add hl, bc ; $6756: $09 add hl, bc ; $6757: $09 add hl, bc ; $6758: $09 add hl, bc ; $6759: $09 add hl, bc ; $675a: $09 ld h, $21 ; $675b: $26 $21 ld hl, $2121 ; $675d: $21 $21 $21 ld hl, $2b21 ; $6760: $21 $21 $2b add hl, bc ; $6763: $09 add hl, bc ; $6764: $09 add hl, bc ; $6765: $09 add hl, bc ; $6766: $09 add hl, bc ; $6767: $09 add hl, bc ; $6768: $09 ld h, $21 ; $6769: $26 $21 ld hl, $2b21 ; $676b: $21 $21 $2b ld b, b ; $676e: $40 ld h, $21 ; $676f: $26 $21 ld hl, $092b ; $6771: $21 $2b $09 add hl, bc ; $6774: $09 add hl, bc ; $6775: $09 add hl, bc ; $6776: $09 add hl, bc ; $6777: $09 ld h, $21 ; $6778: $26 $21 dec hl ; $677a: $2b ld b, b ; $677b: $40 ld h, $21 ; $677c: $26 $21 ld hl, $4021 ; $677e: $21 $21 $40 ld h, $21 ; $6781: $26 $21 dec hl ; $6783: $2b add hl, bc ; $6784: $09 add hl, bc ; $6785: $09 add hl, bc ; $6786: $09 add hl, bc ; $6787: $09 add hl, bc ; $6788: $09 dec de ; $6789: $1b ld h, $21 ; $678a: $26 $21 ld hl, $2121 ; $678c: $21 $21 $21 ld hl, $2121 ; $678f: $21 $21 $21 ld hl, $092b ; $6792: $21 $2b $09 add hl, bc ; $6795: $09 add hl, bc ; $6796: $09 add hl, bc ; $6797: $09 add hl, bc ; $6798: $09 add hl, bc ; $6799: $09 add hl, bc ; $679a: $09 dec de ; $679b: $1b ld h, $21 ; $679c: $26 $21 ld hl, $2121 ; $679e: $21 $21 $21 ld hl, $2121 ; $67a1: $21 $21 $21 dec hl ; $67a4: $2b add hl, bc ; $67a5: $09 add hl, bc ; $67a6: $09 add hl, bc ; $67a7: $09 add hl, bc ; $67a8: $09 add hl, bc ; $67a9: $09 add hl, bc ; $67aa: $09 add hl, bc ; $67ab: $09 add hl, bc ; $67ac: $09 dec de ; $67ad: $1b ld h, $21 ; $67ae: $26 $21 dec hl ; $67b0: $2b ld b, b ; $67b1: $40 ld h, $21 ; $67b2: $26 $21 ld hl, $2b21 ; $67b4: $21 $21 $2b add hl, bc ; $67b7: $09 add hl, bc ; $67b8: $09 add hl, bc ; $67b9: $09 add hl, bc ; $67ba: $09 add hl, bc ; $67bb: $09 add hl, bc ; $67bc: $09 add hl, bc ; $67bd: $09 add hl, bc ; $67be: $09 add hl, bc ; $67bf: $09 ld hl, $2121 ; $67c0: $21 $21 $21 dec hl ; $67c3: $2b ld b, b ; $67c4: $40 ld h, $21 ; $67c5: $26 $21 dec hl ; $67c7: $2b add hl, bc ; $67c8: $09 add hl, bc ; $67c9: $09 add hl, bc ; $67ca: $09 add hl, bc ; $67cb: $09 add hl, bc ; $67cc: $09 add hl, bc ; $67cd: $09 add hl, bc ; $67ce: $09 add hl, bc ; $67cf: $09 ld hl, $2121 ; $67d0: $21 $21 $21 ld hl, $2121 ; $67d3: $21 $21 $21 ld hl, $2b21 ; $67d6: $21 $21 $2b add hl, bc ; $67d9: $09 add hl, bc ; $67da: $09 add hl, bc ; $67db: $09 add hl, bc ; $67dc: $09 add hl, bc ; $67dd: $09 add hl, bc ; $67de: $09 add hl, bc ; $67df: $09 ld b, b ; $67e0: $40 ld h, $21 ; $67e1: $26 $21 ld hl, $2121 ; $67e3: $21 $21 $21 ld hl, $2121 ; $67e6: $21 $21 $21 ld hl, $092b ; $67e9: $21 $2b $09 add hl, bc ; $67ec: $09 add hl, bc ; $67ed: $09 add hl, bc ; $67ee: $09 add hl, bc ; $67ef: $09 ld hl, $2121 ; $67f0: $21 $21 $21 ld hl, $402b ; $67f3: $21 $2b $40 ld h, $21 ; $67f6: $26 $21 ld hl, $2121 ; $67f8: $21 $21 $21 ld hl, $092b ; $67fb: $21 $2b $09 add hl, bc ; $67fe: $09 add hl, bc ; $67ff: $09 dec bc ; $6800: $0b dec bc ; $6801: $0b dec bc ; $6802: $0b dec bc ; $6803: $0b jr z, jr_00a_6829 ; $6804: $28 $23 inc hl ; $6806: $23 inc hl ; $6807: $23 inc hl ; $6808: $23 inc hl ; $6809: $23 inc hl ; $680a: $23 inc hl ; $680b: $23 inc hl ; $680c: $23 dec l ; $680d: $2d ld b, d ; $680e: $42 jr z, jr_00a_681c ; $680f: $28 $0b dec bc ; $6811: $0b dec bc ; $6812: $0b dec bc ; $6813: $0b dec bc ; $6814: $0b dec bc ; $6815: $0b dec e ; $6816: $1d jr z, jr_00a_683c ; $6817: $28 $23 inc hl ; $6819: $23 inc hl ; $681a: $23 dec l ; $681b: $2d jr_00a_681c: ld b, d ; $681c: $42 jr z, jr_00a_6842 ; $681d: $28 $23 inc hl ; $681f: $23 dec bc ; $6820: $0b dec bc ; $6821: $0b dec bc ; $6822: $0b dec bc ; $6823: $0b dec bc ; $6824: $0b dec bc ; $6825: $0b dec bc ; $6826: $0b dec bc ; $6827: $0b dec bc ; $6828: $0b jr_00a_6829: dec bc ; $6829: $0b jr z, @+$25 ; $682a: $28 $23 inc hl ; $682c: $23 inc hl ; $682d: $23 inc hl ; $682e: $23 inc hl ; $682f: $23 dec l ; $6830: $2d dec bc ; $6831: $0b dec bc ; $6832: $0b dec bc ; $6833: $0b dec bc ; $6834: $0b dec bc ; $6835: $0b dec bc ; $6836: $0b dec bc ; $6837: $0b dec bc ; $6838: $0b dec bc ; $6839: $0b dec bc ; $683a: $0b inc d ; $683b: $14 jr_00a_683c: rrca ; $683c: $0f rrca ; $683d: $0f rrca ; $683e: $0f jr z, jr_00a_6864 ; $683f: $28 $23 inc hl ; $6841: $23 jr_00a_6842: dec l ; $6842: $2d dec bc ; $6843: $0b dec bc ; $6844: $0b dec bc ; $6845: $0b dec bc ; $6846: $0b dec bc ; $6847: $0b dec bc ; $6848: $0b dec bc ; $6849: $0b dec bc ; $684a: $0b dec bc ; $684b: $0b dec bc ; $684c: $0b dec bc ; $684d: $0b jr z, jr_00a_6873 ; $684e: $28 $23 inc hl ; $6850: $23 dec l ; $6851: $2d rrca ; $6852: $0f rrca ; $6853: $0f ld [de], a ; $6854: $12 dec bc ; $6855: $0b dec bc ; $6856: $0b dec bc ; $6857: $0b dec bc ; $6858: $0b dec bc ; $6859: $0b dec bc ; $685a: $0b dec bc ; $685b: $0b dec bc ; $685c: $0b dec bc ; $685d: $0b jr z, jr_00a_6883 ; $685e: $28 $23 rrca ; $6860: $0f jr z, jr_00a_6890 ; $6861: $28 $2d rrca ; $6863: $0f jr_00a_6864: rrca ; $6864: $0f jr z, jr_00a_6894 ; $6865: $28 $2d dec bc ; $6867: $0b dec bc ; $6868: $0b dec bc ; $6869: $0b dec bc ; $686a: $0b dec bc ; $686b: $0b dec bc ; $686c: $0b inc d ; $686d: $14 rrca ; $686e: $0f rrca ; $686f: $0f inc hl ; $6870: $23 dec l ; $6871: $2d rrca ; $6872: $0f jr_00a_6873: jr z, jr_00a_68a2 ; $6873: $28 $2d rrca ; $6875: $0f rrca ; $6876: $0f ld [de], a ; $6877: $12 dec bc ; $6878: $0b dec bc ; $6879: $0b dec bc ; $687a: $0b dec bc ; $687b: $0b dec bc ; $687c: $0b dec bc ; $687d: $0b jr z, jr_00a_68a3 ; $687e: $28 $23 dec bc ; $6880: $0b dec bc ; $6881: $0b dec bc ; $6882: $0b jr_00a_6883: dec bc ; $6883: $0b dec bc ; $6884: $0b dec bc ; $6885: $0b dec bc ; $6886: $0b dec bc ; $6887: $0b dec bc ; $6888: $0b dec bc ; $6889: $0b dec bc ; $688a: $0b dec bc ; $688b: $0b dec bc ; $688c: $0b dec bc ; $688d: $0b jr z, jr_00a_68b3 ; $688e: $28 $23 jr_00a_6890: dec bc ; $6890: $0b dec bc ; $6891: $0b dec bc ; $6892: $0b dec bc ; $6893: $0b jr_00a_6894: dec bc ; $6894: $0b dec bc ; $6895: $0b dec bc ; $6896: $0b dec bc ; $6897: $0b dec bc ; $6898: $0b dec bc ; $6899: $0b dec bc ; $689a: $0b dec bc ; $689b: $0b dec bc ; $689c: $0b inc d ; $689d: $14 rrca ; $689e: $0f rrca ; $689f: $0f dec bc ; $68a0: $0b dec bc ; $68a1: $0b jr_00a_68a2: dec bc ; $68a2: $0b jr_00a_68a3: dec bc ; $68a3: $0b dec bc ; $68a4: $0b dec bc ; $68a5: $0b dec bc ; $68a6: $0b dec bc ; $68a7: $0b dec bc ; $68a8: $0b dec bc ; $68a9: $0b dec bc ; $68aa: $0b inc d ; $68ab: $14 rrca ; $68ac: $0f rrca ; $68ad: $0f rrca ; $68ae: $0f jr z, @+$0d ; $68af: $28 $0b dec bc ; $68b1: $0b dec bc ; $68b2: $0b jr_00a_68b3: dec bc ; $68b3: $0b dec bc ; $68b4: $0b dec bc ; $68b5: $0b dec bc ; $68b6: $0b dec bc ; $68b7: $0b dec bc ; $68b8: $0b dec bc ; $68b9: $0b dec bc ; $68ba: $0b jr z, jr_00a_68e0 ; $68bb: $28 $23 dec l ; $68bd: $2d rrca ; $68be: $0f rrca ; $68bf: $0f rrca ; $68c0: $0f rrca ; $68c1: $0f ld [de], a ; $68c2: $12 dec bc ; $68c3: $0b dec bc ; $68c4: $0b dec bc ; $68c5: $0b dec bc ; $68c6: $0b dec bc ; $68c7: $0b dec bc ; $68c8: $0b dec bc ; $68c9: $0b jr z, jr_00a_68ef ; $68ca: $28 $23 inc hl ; $68cc: $23 inc hl ; $68cd: $23 inc hl ; $68ce: $23 inc hl ; $68cf: $23 dec bc ; $68d0: $0b dec bc ; $68d1: $0b dec bc ; $68d2: $0b dec bc ; $68d3: $0b dec bc ; $68d4: $0b dec bc ; $68d5: $0b dec bc ; $68d6: $0b inc d ; $68d7: $14 rrca ; $68d8: $0f rrca ; $68d9: $0f ld b, $0f ; $68da: $06 $0f rrca ; $68dc: $0f rrca ; $68dd: $0f jr z, jr_00a_6903 ; $68de: $28 $23 jr_00a_68e0: dec bc ; $68e0: $0b dec bc ; $68e1: $0b dec bc ; $68e2: $0b dec bc ; $68e3: $0b dec bc ; $68e4: $0b dec bc ; $68e5: $0b dec bc ; $68e6: $0b dec bc ; $68e7: $0b jr z, jr_00a_6917 ; $68e8: $28 $2d rrca ; $68ea: $0f rrca ; $68eb: $0f jr z, jr_00a_6911 ; $68ec: $28 $23 inc hl ; $68ee: $23 jr_00a_68ef: inc hl ; $68ef: $23 dec bc ; $68f0: $0b dec bc ; $68f1: $0b dec bc ; $68f2: $0b dec bc ; $68f3: $0b jr z, jr_00a_6923 ; $68f4: $28 $2d rrca ; $68f6: $0f ld b, $0f ; $68f7: $06 $0f rrca ; $68f9: $0f jr z, @+$25 ; $68fa: $28 $23 inc hl ; $68fc: $23 inc hl ; $68fd: $23 dec l ; $68fe: $2d ld b, d ; $68ff: $42 ld hl, $2121 ; $6900: $21 $21 $21 jr_00a_6903: ld hl, $2121 ; $6903: $21 $21 $21 ld hl, $2121 ; $6906: $21 $21 $21 ld hl, $402b ; $6909: $21 $2b $40 ld h, $21 ; $690c: $26 $21 ld hl, $2121 ; $690e: $21 $21 $21 jr_00a_6911: ld hl, $2121 ; $6911: $21 $21 $21 ld hl, $2121 ; $6914: $21 $21 $21 jr_00a_6917: ld hl, $2121 ; $6917: $21 $21 $21 ld hl, $2121 ; $691a: $21 $21 $21 ld hl, $2121 ; $691d: $21 $21 $21 ld hl, $2b21 ; $6920: $21 $21 $2b jr_00a_6923: ld b, b ; $6923: $40 ld h, $21 ; $6924: $26 $21 ld hl, $2121 ; $6926: $21 $21 $21 ld hl, $2121 ; $6929: $21 $21 $21 ld hl, $2121 ; $692c: $21 $21 $21 ld hl, $2121 ; $692f: $21 $21 $21 ld hl, $2121 ; $6932: $21 $21 $21 ld hl, $2b21 ; $6935: $21 $21 $2b ld b, b ; $6938: $40 ld h, $21 ; $6939: $26 $21 ld hl, $402b ; $693b: $21 $2b $40 ld h, $21 ; $693e: $26 $21 dec hl ; $6940: $2b ld b, b ; $6941: $40 ld h, $21 ; $6942: $26 $21 ld hl, $2121 ; $6944: $21 $21 $21 ld hl, $2121 ; $6947: $21 $21 $21 ld hl, $2121 ; $694a: $21 $21 $21 ld hl, $2121 ; $694d: $21 $21 $21 ld hl, $2121 ; $6950: $21 $21 $21 ld hl, $2121 ; $6953: $21 $21 $21 ld hl, $2121 ; $6956: $21 $21 $21 ld hl, $2121 ; $6959: $21 $21 $21 ld hl, $402b ; $695c: $21 $2b $40 ld h, $21 ; $695f: $26 $21 ld hl, $402b ; $6961: $21 $2b $40 ld h, $21 ; $6964: $26 $21 ld hl, $2121 ; $6966: $21 $21 $21 ld hl, $2121 ; $6969: $21 $21 $21 ld hl, $2121 ; $696c: $21 $21 $21 ld hl, $2121 ; $696f: $21 $21 $21 ld hl, $2121 ; $6972: $21 $21 $21 ld hl, $2121 ; $6975: $21 $21 $21 ld hl, $402b ; $6978: $21 $2b $40 ld h, $21 ; $697b: $26 $21 ld hl, $2121 ; $697d: $21 $21 $21 ld hl, $2121 ; $6980: $21 $21 $21 ld hl, $2121 ; $6983: $21 $21 $21 ld hl, $2121 ; $6986: $21 $21 $21 ld hl, $2121 ; $6989: $21 $21 $21 ld hl, $092b ; $698c: $21 $2b $09 add hl, bc ; $698f: $09 ld hl, $2b21 ; $6990: $21 $21 $2b ld b, b ; $6993: $40 ld h, $21 ; $6994: $26 $21 ld hl, $2121 ; $6996: $21 $21 $21 ld hl, $2121 ; $6999: $21 $21 $21 ld hl, $092b ; $699c: $21 $2b $09 add hl, bc ; $699f: $09 ld hl, $2121 ; $69a0: $21 $21 $21 ld hl, $2121 ; $69a3: $21 $21 $21 ld h, $21 ; $69a6: $26 $21 ld hl, $2121 ; $69a8: $21 $21 $21 dec hl ; $69ab: $2b add hl, bc ; $69ac: $09 add hl, bc ; $69ad: $09 add hl, bc ; $69ae: $09 add hl, bc ; $69af: $09 ld hl, $2121 ; $69b0: $21 $21 $21 ld hl, $2121 ; $69b3: $21 $21 $21 ld hl, $2121 ; $69b6: $21 $21 $21 ld hl, $092b ; $69b9: $21 $2b $09 add hl, bc ; $69bc: $09 add hl, bc ; $69bd: $09 add hl, bc ; $69be: $09 add hl, bc ; $69bf: $09 dec hl ; $69c0: $2b ld b, b ; $69c1: $40 ld h, $21 ; $69c2: $26 $21 ld hl, $2b21 ; $69c4: $21 $21 $2b ld b, b ; $69c7: $40 ld h, $21 ; $69c8: $26 $21 dec hl ; $69ca: $2b add hl, bc ; $69cb: $09 add hl, bc ; $69cc: $09 add hl, bc ; $69cd: $09 add hl, bc ; $69ce: $09 add hl, bc ; $69cf: $09 ld hl, $2121 ; $69d0: $21 $21 $21 dec hl ; $69d3: $2b ld b, b ; $69d4: $40 ld h, $21 ; $69d5: $26 $21 ld hl, $2121 ; $69d7: $21 $21 $21 ld hl, $092b ; $69da: $21 $2b $09 add hl, bc ; $69dd: $09 add hl, bc ; $69de: $09 ld h, $22 ; $69df: $26 $22 ld [hl+], a ; $69e1: $22 ld [hl+], a ; $69e2: $22 ld [hl+], a ; $69e3: $22 ld [hl+], a ; $69e4: $22 ld [hl+], a ; $69e5: $22 ld [hl+], a ; $69e6: $22 ld [hl+], a ; $69e7: $22 ld [hl+], a ; $69e8: $22 ld [hl+], a ; $69e9: $22 ld [hl+], a ; $69ea: $22 inc l ; $69eb: $2c ld a, [bc] ; $69ec: $0a ld a, [bc] ; $69ed: $0a ld a, [bc] ; $69ee: $0a ld a, [bc] ; $69ef: $0a inc hl ; $69f0: $23 dec l ; $69f1: $2d ld b, d ; $69f2: $42 jr z, @+$25 ; $69f3: $28 $23 inc hl ; $69f5: $23 inc hl ; $69f6: $23 inc hl ; $69f7: $23 dec l ; $69f8: $2d ld b, d ; $69f9: $42 jr z, jr_00a_6a1f ; $69fa: $28 $23 dec l ; $69fc: $2d dec bc ; $69fd: $0b dec bc ; $69fe: $0b dec bc ; $69ff: $0b ld hl, $2121 ; $6a00: $21 $21 $21 ld hl, $2121 ; $6a03: $21 $21 $21 ld hl, $2121 ; $6a06: $21 $21 $21 ld hl, $2121 ; $6a09: $21 $21 $21 ld hl, $2121 ; $6a0c: $21 $21 $21 ld hl, $2121 ; $6a0f: $21 $21 $21 ld hl, $2121 ; $6a12: $21 $21 $21 dec hl ; $6a15: $2b ld b, b ; $6a16: $40 ld h, $21 ; $6a17: $26 $21 ld hl, $2b21 ; $6a19: $21 $21 $2b ld b, b ; $6a1c: $40 ld h, $21 ; $6a1d: $26 $21 jr_00a_6a1f: ld hl, $2121 ; $6a1f: $21 $21 $21 ld hl, $2121 ; $6a22: $21 $21 $21 ld hl, $2121 ; $6a25: $21 $21 $21 ld hl, $2121 ; $6a28: $21 $21 $21 ld hl, $2121 ; $6a2b: $21 $21 $21 ld hl, $2121 ; $6a2e: $21 $21 $21 ld hl, $2121 ; $6a31: $21 $21 $21 dec hl ; $6a34: $2b inc e ; $6a35: $1c add hl, bc ; $6a36: $09 add hl, bc ; $6a37: $09 add hl, bc ; $6a38: $09 add hl, bc ; $6a39: $09 dec de ; $6a3a: $1b ld h, $2b ; $6a3b: $26 $2b ld b, b ; $6a3d: $40 ld hl, $2121 ; $6a3e: $21 $21 $21 dec hl ; $6a41: $2b ld b, b ; $6a42: $40 ld h, $2b ; $6a43: $26 $2b add hl, bc ; $6a45: $09 add hl, bc ; $6a46: $09 add hl, bc ; $6a47: $09 add hl, bc ; $6a48: $09 add hl, bc ; $6a49: $09 add hl, bc ; $6a4a: $09 ld h, $21 ; $6a4b: $26 $21 ld hl, $2121 ; $6a4d: $21 $21 $21 ld hl, $2121 ; $6a50: $21 $21 $21 ld hl, $092b ; $6a53: $21 $2b $09 add hl, bc ; $6a56: $09 add hl, bc ; $6a57: $09 add hl, bc ; $6a58: $09 add hl, bc ; $6a59: $09 add hl, bc ; $6a5a: $09 add hl, bc ; $6a5b: $09 add hl, bc ; $6a5c: $09 add hl, bc ; $6a5d: $09 add hl, bc ; $6a5e: $09 add hl, bc ; $6a5f: $09 ld hl, $2121 ; $6a60: $21 $21 $21 dec hl ; $6a63: $2b add hl, bc ; $6a64: $09 add hl, bc ; $6a65: $09 add hl, bc ; $6a66: $09 add hl, bc ; $6a67: $09 ld h, $21 ; $6a68: $26 $21 ld hl, $2121 ; $6a6a: $21 $21 $21 ld hl, $2121 ; $6a6d: $21 $21 $21 ld hl, $092b ; $6a70: $21 $2b $09 add hl, bc ; $6a73: $09 add hl, bc ; $6a74: $09 add hl, bc ; $6a75: $09 add hl, bc ; $6a76: $09 add hl, bc ; $6a77: $09 inc b ; $6a78: $04 inc e ; $6a79: $1c add hl, bc ; $6a7a: $09 add hl, bc ; $6a7b: $09 add hl, bc ; $6a7c: $09 add hl, bc ; $6a7d: $09 add hl, bc ; $6a7e: $09 add hl, bc ; $6a7f: $09 add hl, bc ; $6a80: $09 add hl, bc ; $6a81: $09 add hl, bc ; $6a82: $09 add hl, bc ; $6a83: $09 add hl, bc ; $6a84: $09 add hl, bc ; $6a85: $09 add hl, bc ; $6a86: $09 add hl, bc ; $6a87: $09 inc b ; $6a88: $04 add hl, bc ; $6a89: $09 add hl, bc ; $6a8a: $09 add hl, bc ; $6a8b: $09 add hl, bc ; $6a8c: $09 add hl, bc ; $6a8d: $09 add hl, bc ; $6a8e: $09 add hl, bc ; $6a8f: $09 add hl, bc ; $6a90: $09 add hl, bc ; $6a91: $09 add hl, bc ; $6a92: $09 add hl, bc ; $6a93: $09 add hl, bc ; $6a94: $09 add hl, bc ; $6a95: $09 add hl, bc ; $6a96: $09 ld h, $2b ; $6a97: $26 $2b add hl, bc ; $6a99: $09 add hl, bc ; $6a9a: $09 add hl, bc ; $6a9b: $09 add hl, bc ; $6a9c: $09 add hl, bc ; $6a9d: $09 add hl, bc ; $6a9e: $09 add hl, bc ; $6a9f: $09 add hl, bc ; $6aa0: $09 add hl, bc ; $6aa1: $09 add hl, bc ; $6aa2: $09 add hl, bc ; $6aa3: $09 add hl, bc ; $6aa4: $09 add hl, bc ; $6aa5: $09 add hl, bc ; $6aa6: $09 add hl, bc ; $6aa7: $09 add hl, bc ; $6aa8: $09 add hl, bc ; $6aa9: $09 add hl, bc ; $6aaa: $09 add hl, bc ; $6aab: $09 ld h, $21 ; $6aac: $26 $21 ld hl, $0921 ; $6aae: $21 $21 $09 add hl, bc ; $6ab1: $09 add hl, bc ; $6ab2: $09 add hl, bc ; $6ab3: $09 inc b ; $6ab4: $04 add hl, bc ; $6ab5: $09 add hl, bc ; $6ab6: $09 add hl, bc ; $6ab7: $09 add hl, bc ; $6ab8: $09 add hl, bc ; $6ab9: $09 add hl, bc ; $6aba: $09 add hl, bc ; $6abb: $09 ld h, $2b ; $6abc: $26 $2b ld b, b ; $6abe: $40 ld h, $09 ; $6abf: $26 $09 add hl, bc ; $6ac1: $09 add hl, bc ; $6ac2: $09 add hl, bc ; $6ac3: $09 inc b ; $6ac4: $04 add hl, bc ; $6ac5: $09 add hl, bc ; $6ac6: $09 add hl, bc ; $6ac7: $09 add hl, bc ; $6ac8: $09 add hl, bc ; $6ac9: $09 add hl, bc ; $6aca: $09 add hl, bc ; $6acb: $09 ld hl, $2121 ; $6acc: $21 $21 $21 ld hl, $092b ; $6acf: $21 $2b $09 add hl, bc ; $6ad2: $09 add hl, bc ; $6ad3: $09 inc b ; $6ad4: $04 add hl, bc ; $6ad5: $09 add hl, bc ; $6ad6: $09 add hl, bc ; $6ad7: $09 add hl, bc ; $6ad8: $09 ld h, $21 ; $6ad9: $26 $21 ld hl, $2121 ; $6adb: $21 $21 $21 ld hl, $0a21 ; $6ade: $21 $21 $0a ld a, [bc] ; $6ae1: $0a ld a, [bc] ; $6ae2: $0a daa ; $6ae3: $27 ld [hl+], a ; $6ae4: $22 ld [hl+], a ; $6ae5: $22 ld [hl+], a ; $6ae6: $22 ld [hl+], a ; $6ae7: $22 ld [hl+], a ; $6ae8: $22 ld [hl+], a ; $6ae9: $22 ld [hl+], a ; $6aea: $22 ld [hl+], a ; $6aeb: $22 inc l ; $6aec: $2c ld b, c ; $6aed: $41 daa ; $6aee: $27 ld [hl+], a ; $6aef: $22 dec bc ; $6af0: $0b dec bc ; $6af1: $0b dec bc ; $6af2: $0b jr z, jr_00a_6b18 ; $6af3: $28 $23 inc hl ; $6af5: $23 inc hl ; $6af6: $23 inc hl ; $6af7: $23 inc hl ; $6af8: $23 inc hl ; $6af9: $23 dec l ; $6afa: $2d ld b, d ; $6afb: $42 jr z, jr_00a_6b21 ; $6afc: $28 $23 inc hl ; $6afe: $23 inc hl ; $6aff: $23 inc hl ; $6b00: $23 inc hl ; $6b01: $23 inc hl ; $6b02: $23 inc hl ; $6b03: $23 dec l ; $6b04: $2d ld b, d ; $6b05: $42 jr z, jr_00a_6b2b ; $6b06: $28 $23 inc hl ; $6b08: $23 inc hl ; $6b09: $23 inc hl ; $6b0a: $23 dec l ; $6b0b: $2d dec bc ; $6b0c: $0b dec bc ; $6b0d: $0b dec bc ; $6b0e: $0b dec bc ; $6b0f: $0b dec l ; $6b10: $2d ld b, d ; $6b11: $42 jr z, jr_00a_6b37 ; $6b12: $28 $23 inc hl ; $6b14: $23 inc hl ; $6b15: $23 inc hl ; $6b16: $23 inc hl ; $6b17: $23 jr_00a_6b18: dec l ; $6b18: $2d add hl, de ; $6b19: $19 add hl, de ; $6b1a: $19 dec bc ; $6b1b: $0b dec bc ; $6b1c: $0b dec bc ; $6b1d: $0b dec bc ; $6b1e: $0b dec bc ; $6b1f: $0b inc hl ; $6b20: $23 jr_00a_6b21: inc hl ; $6b21: $23 inc hl ; $6b22: $23 inc hl ; $6b23: $23 dec l ; $6b24: $2d add hl, de ; $6b25: $19 add hl, de ; $6b26: $19 add hl, de ; $6b27: $19 ld e, $0b ; $6b28: $1e $0b dec bc ; $6b2a: $0b jr_00a_6b2b: dec bc ; $6b2b: $0b dec bc ; $6b2c: $0b dec bc ; $6b2d: $0b dec bc ; $6b2e: $0b dec bc ; $6b2f: $0b inc hl ; $6b30: $23 inc hl ; $6b31: $23 dec l ; $6b32: $2d add hl, de ; $6b33: $19 add hl, de ; $6b34: $19 dec bc ; $6b35: $0b dec bc ; $6b36: $0b jr_00a_6b37: dec bc ; $6b37: $0b dec bc ; $6b38: $0b dec bc ; $6b39: $0b dec bc ; $6b3a: $0b dec bc ; $6b3b: $0b dec bc ; $6b3c: $0b dec bc ; $6b3d: $0b jr z, jr_00a_6b63 ; $6b3e: $28 $23 inc hl ; $6b40: $23 dec l ; $6b41: $2d add hl, de ; $6b42: $19 dec bc ; $6b43: $0b dec bc ; $6b44: $0b dec bc ; $6b45: $0b dec bc ; $6b46: $0b dec bc ; $6b47: $0b dec bc ; $6b48: $0b dec bc ; $6b49: $0b dec bc ; $6b4a: $0b dec bc ; $6b4b: $0b dec bc ; $6b4c: $0b jr z, jr_00a_6b72 ; $6b4d: $28 $23 inc hl ; $6b4f: $23 inc hl ; $6b50: $23 dec l ; $6b51: $2d dec bc ; $6b52: $0b dec bc ; $6b53: $0b dec bc ; $6b54: $0b dec bc ; $6b55: $0b dec bc ; $6b56: $0b dec bc ; $6b57: $0b dec bc ; $6b58: $0b dec bc ; $6b59: $0b dec bc ; $6b5a: $0b jr z, @+$25 ; $6b5b: $28 $23 inc hl ; $6b5d: $23 inc hl ; $6b5e: $23 inc hl ; $6b5f: $23 inc hl ; $6b60: $23 dec l ; $6b61: $2d dec bc ; $6b62: $0b jr_00a_6b63: dec bc ; $6b63: $0b dec bc ; $6b64: $0b dec bc ; $6b65: $0b dec bc ; $6b66: $0b dec bc ; $6b67: $0b dec bc ; $6b68: $0b jr z, @+$25 ; $6b69: $28 $23 dec l ; $6b6b: $2d ld b, d ; $6b6c: $42 jr z, jr_00a_6b92 ; $6b6d: $28 $23 inc hl ; $6b6f: $23 dec bc ; $6b70: $0b dec bc ; $6b71: $0b jr_00a_6b72: dec bc ; $6b72: $0b dec bc ; $6b73: $0b dec bc ; $6b74: $0b dec bc ; $6b75: $0b dec bc ; $6b76: $0b dec bc ; $6b77: $0b jr z, jr_00a_6b9d ; $6b78: $28 $23 inc hl ; $6b7a: $23 inc hl ; $6b7b: $23 inc hl ; $6b7c: $23 dec l ; $6b7d: $2d ld b, d ; $6b7e: $42 jr z, jr_00a_6b8c ; $6b7f: $28 $0b dec bc ; $6b81: $0b dec bc ; $6b82: $0b dec bc ; $6b83: $0b dec bc ; $6b84: $0b dec bc ; $6b85: $0b dec bc ; $6b86: $0b dec bc ; $6b87: $0b dec bc ; $6b88: $0b add hl, de ; $6b89: $19 add hl, de ; $6b8a: $19 add hl, de ; $6b8b: $19 jr_00a_6b8c: add hl, de ; $6b8c: $19 jr z, jr_00a_6bb2 ; $6b8d: $28 $23 inc hl ; $6b8f: $23 dec bc ; $6b90: $0b dec bc ; $6b91: $0b jr_00a_6b92: dec bc ; $6b92: $0b dec bc ; $6b93: $0b dec bc ; $6b94: $0b dec bc ; $6b95: $0b dec bc ; $6b96: $0b dec bc ; $6b97: $0b dec bc ; $6b98: $0b dec bc ; $6b99: $0b dec bc ; $6b9a: $0b dec bc ; $6b9b: $0b dec bc ; $6b9c: $0b jr_00a_6b9d: dec e ; $6b9d: $1d add hl, de ; $6b9e: $19 add hl, de ; $6b9f: $19 inc hl ; $6ba0: $23 inc hl ; $6ba1: $23 inc hl ; $6ba2: $23 dec l ; $6ba3: $2d dec bc ; $6ba4: $0b dec bc ; $6ba5: $0b dec bc ; $6ba6: $0b dec bc ; $6ba7: $0b dec bc ; $6ba8: $0b dec bc ; $6ba9: $0b dec bc ; $6baa: $0b dec bc ; $6bab: $0b dec bc ; $6bac: $0b dec bc ; $6bad: $0b dec bc ; $6bae: $0b dec bc ; $6baf: $0b inc hl ; $6bb0: $23 inc hl ; $6bb1: $23 jr_00a_6bb2: inc hl ; $6bb2: $23 dec l ; $6bb3: $2d dec bc ; $6bb4: $0b dec bc ; $6bb5: $0b dec bc ; $6bb6: $0b dec bc ; $6bb7: $0b dec bc ; $6bb8: $0b dec bc ; $6bb9: $0b dec bc ; $6bba: $0b dec bc ; $6bbb: $0b dec bc ; $6bbc: $0b dec bc ; $6bbd: $0b dec bc ; $6bbe: $0b dec bc ; $6bbf: $0b inc hl ; $6bc0: $23 inc hl ; $6bc1: $23 inc hl ; $6bc2: $23 inc hl ; $6bc3: $23 dec l ; $6bc4: $2d dec bc ; $6bc5: $0b dec bc ; $6bc6: $0b dec bc ; $6bc7: $0b dec bc ; $6bc8: $0b dec bc ; $6bc9: $0b dec bc ; $6bca: $0b dec bc ; $6bcb: $0b dec bc ; $6bcc: $0b dec bc ; $6bcd: $0b dec bc ; $6bce: $0b dec bc ; $6bcf: $0b dec l ; $6bd0: $2d ld b, d ; $6bd1: $42 jr z, jr_00a_6bf7 ; $6bd2: $28 $23 inc hl ; $6bd4: $23 inc hl ; $6bd5: $23 dec l ; $6bd6: $2d dec bc ; $6bd7: $0b dec bc ; $6bd8: $0b dec bc ; $6bd9: $0b dec bc ; $6bda: $0b dec bc ; $6bdb: $0b dec bc ; $6bdc: $0b dec bc ; $6bdd: $0b dec bc ; $6bde: $0b dec bc ; $6bdf: $0b inc hl ; $6be0: $23 inc hl ; $6be1: $23 inc hl ; $6be2: $23 dec l ; $6be3: $2d ld b, d ; $6be4: $42 jr z, @+$25 ; $6be5: $28 $23 inc hl ; $6be7: $23 inc hl ; $6be8: $23 dec l ; $6be9: $2d dec bc ; $6bea: $0b dec bc ; $6beb: $0b dec bc ; $6bec: $0b dec bc ; $6bed: $0b dec bc ; $6bee: $0b dec bc ; $6bef: $0b inc hl ; $6bf0: $23 inc hl ; $6bf1: $23 inc hl ; $6bf2: $23 inc hl ; $6bf3: $23 inc hl ; $6bf4: $23 inc hl ; $6bf5: $23 inc hl ; $6bf6: $23 jr_00a_6bf7: dec l ; $6bf7: $2d ld b, d ; $6bf8: $42 jr z, @+$25 ; $6bf9: $28 $23 inc hl ; $6bfb: $23 inc hl ; $6bfc: $23 inc hl ; $6bfd: $23 inc hl ; $6bfe: $23 inc hl ; $6bff: $23 add hl, bc ; $6c00: $09 add hl, bc ; $6c01: $09 ld h, $21 ; $6c02: $26 $21 ld hl, $402b ; $6c04: $21 $2b $40 ld h, $21 ; $6c07: $26 $21 ld hl, $2121 ; $6c09: $21 $21 $21 ld hl, $2121 ; $6c0c: $21 $21 $21 ld hl, $2126 ; $6c0f: $21 $26 $21 ld hl, $2121 ; $6c12: $21 $21 $21 ld hl, $2121 ; $6c15: $21 $21 $21 ld hl, $2121 ; $6c18: $21 $21 $21 dec hl ; $6c1b: $2b ld b, b ; $6c1c: $40 ld h, $21 ; $6c1d: $26 $21 ld hl, $2126 ; $6c1f: $21 $26 $21 ld hl, $2121 ; $6c22: $21 $21 $21 ld hl, $402b ; $6c25: $21 $2b $40 ld h, $21 ; $6c28: $26 $21 ld hl, $2121 ; $6c2a: $21 $21 $21 ld hl, $2121 ; $6c2d: $21 $21 $21 ld hl, $402b ; $6c30: $21 $2b $40 ld h, $21 ; $6c33: $26 $21 ld hl, $2121 ; $6c35: $21 $21 $21 ld hl, $2121 ; $6c38: $21 $21 $21 ld hl, $2b21 ; $6c3b: $21 $21 $2b ld b, b ; $6c3e: $40 ld h, $21 ; $6c3f: $26 $21 ld hl, $2121 ; $6c41: $21 $21 $21 dec hl ; $6c44: $2b ld b, b ; $6c45: $40 ld h, $21 ; $6c46: $26 $21 ld hl, $2b21 ; $6c48: $21 $21 $2b ld b, b ; $6c4b: $40 ld hl, $2121 ; $6c4c: $21 $21 $21 ld hl, $2121 ; $6c4f: $21 $21 $21 ld hl, $2121 ; $6c52: $21 $21 $21 ld hl, $2121 ; $6c55: $21 $21 $21 ld hl, $2121 ; $6c58: $21 $21 $21 ld hl, $2121 ; $6c5b: $21 $21 $21 ld hl, $2121 ; $6c5e: $21 $21 $21 ld hl, $2121 ; $6c61: $21 $21 $21 ld hl, $2121 ; $6c64: $21 $21 $21 ld hl, $2121 ; $6c67: $21 $21 $21 ld hl, $2121 ; $6c6a: $21 $21 $21 ld hl, $2121 ; $6c6d: $21 $21 $21 ld hl, $2121 ; $6c70: $21 $21 $21 ld hl, $2121 ; $6c73: $21 $21 $21 ld hl, $2121 ; $6c76: $21 $21 $21 ld hl, $2121 ; $6c79: $21 $21 $21 dec hl ; $6c7c: $2b ld b, b ; $6c7d: $40 ld h, $21 ; $6c7e: $26 $21 dec hl ; $6c80: $2b ld b, b ; $6c81: $40 ld h, $21 ; $6c82: $26 $21 ld hl, $2b21 ; $6c84: $21 $21 $2b ld b, b ; $6c87: $40 ld h, $21 ; $6c88: $26 $21 ld hl, $2121 ; $6c8a: $21 $21 $21 ld hl, $2121 ; $6c8d: $21 $21 $21 ld hl, $2121 ; $6c90: $21 $21 $21 ld hl, $2121 ; $6c93: $21 $21 $21 ld hl, $2121 ; $6c96: $21 $21 $21 ld hl, $2121 ; $6c99: $21 $21 $21 ld hl, $2121 ; $6c9c: $21 $21 $21 ld hl, $2121 ; $6c9f: $21 $21 $21 ld hl, $2b21 ; $6ca2: $21 $21 $2b ld b, b ; $6ca5: $40 ld h, $21 ; $6ca6: $26 $21 ld hl, $2121 ; $6ca8: $21 $21 $21 ld hl, $2121 ; $6cab: $21 $21 $21 ld hl, $2621 ; $6cae: $21 $21 $26 ld hl, $2121 ; $6cb1: $21 $21 $21 ld hl, $2121 ; $6cb4: $21 $21 $21 ld hl, $2121 ; $6cb7: $21 $21 $21 ld hl, $402b ; $6cba: $21 $2b $40 ld h, $21 ; $6cbd: $26 $21 ld hl, $1b09 ; $6cbf: $21 $09 $1b ld h, $2b ; $6cc2: $26 $2b ld b, b ; $6cc4: $40 ld h, $21 ; $6cc5: $26 $21 ld hl, $2121 ; $6cc7: $21 $21 $21 ld hl, $2121 ; $6cca: $21 $21 $21 ld hl, $402b ; $6ccd: $21 $2b $40 add hl, bc ; $6cd0: $09 add hl, bc ; $6cd1: $09 ld h, $21 ; $6cd2: $26 $21 ld hl, $2b21 ; $6cd4: $21 $21 $2b ld b, b ; $6cd7: $40 ld h, $21 ; $6cd8: $26 $21 ld hl, $2121 ; $6cda: $21 $21 $21 ld hl, $2121 ; $6cdd: $21 $21 $21 add hl, bc ; $6ce0: $09 add hl, bc ; $6ce1: $09 dec de ; $6ce2: $1b ld h, $21 ; $6ce3: $26 $21 ld hl, $2121 ; $6ce5: $21 $21 $21 ld hl, $2121 ; $6ce8: $21 $21 $21 ld hl, $402b ; $6ceb: $21 $2b $40 ld h, $21 ; $6cee: $26 $21 add hl, bc ; $6cf0: $09 add hl, bc ; $6cf1: $09 add hl, bc ; $6cf2: $09 ld h, $21 ; $6cf3: $26 $21 ld hl, $2121 ; $6cf5: $21 $21 $21 ld hl, $2b21 ; $6cf8: $21 $21 $2b ld b, b ; $6cfb: $40 ld h, $21 ; $6cfc: $26 $21 ld hl, $1021 ; $6cfe: $21 $21 $10 db $10 ; $6d01: $10 db $10 ; $6d02: $10 db $10 ; $6d03: $10 db $10 ; $6d04: $10 db $10 ; $6d05: $10 db $10 ; $6d06: $10 db $10 ; $6d07: $10 db $10 ; $6d08: $10 db $10 ; $6d09: $10 db $10 ; $6d0a: $10 db $10 ; $6d0b: $10 db $10 ; $6d0c: $10 db $10 ; $6d0d: $10 db $10 ; $6d0e: $10 db $10 ; $6d0f: $10 db $10 ; $6d10: $10 db $10 ; $6d11: $10 db $10 ; $6d12: $10 db $10 ; $6d13: $10 db $10 ; $6d14: $10 db $10 ; $6d15: $10 db $10 ; $6d16: $10 db $10 ; $6d17: $10 db $10 ; $6d18: $10 db $10 ; $6d19: $10 db $10 ; $6d1a: $10 db $10 ; $6d1b: $10 db $10 ; $6d1c: $10 db $10 ; $6d1d: $10 db $10 ; $6d1e: $10 db $10 ; $6d1f: $10 db $10 ; $6d20: $10 db $10 ; $6d21: $10 db $10 ; $6d22: $10 db $10 ; $6d23: $10 db $10 ; $6d24: $10 db $10 ; $6d25: $10 db $10 ; $6d26: $10 db $10 ; $6d27: $10 db $10 ; $6d28: $10 db $10 ; $6d29: $10 db $10 ; $6d2a: $10 db $10 ; $6d2b: $10 db $10 ; $6d2c: $10 db $10 ; $6d2d: $10 db $10 ; $6d2e: $10 db $10 ; $6d2f: $10 db $10 ; $6d30: $10 db $10 ; $6d31: $10 db $10 ; $6d32: $10 db $10 ; $6d33: $10 db $10 ; $6d34: $10 db $10 ; $6d35: $10 db $10 ; $6d36: $10 db $10 ; $6d37: $10 db $10 ; $6d38: $10 db $10 ; $6d39: $10 db $10 ; $6d3a: $10 db $10 ; $6d3b: $10 db $10 ; $6d3c: $10 db $10 ; $6d3d: $10 db $10 ; $6d3e: $10 db $10 ; $6d3f: $10 db $10 ; $6d40: $10 db $10 ; $6d41: $10 db $10 ; $6d42: $10 db $10 ; $6d43: $10 db $10 ; $6d44: $10 db $10 ; $6d45: $10 db $10 ; $6d46: $10 db $10 ; $6d47: $10 db $10 ; $6d48: $10 db $10 ; $6d49: $10 db $10 ; $6d4a: $10 db $10 ; $6d4b: $10 db $10 ; $6d4c: $10 db $10 ; $6d4d: $10 db $10 ; $6d4e: $10 db $10 ; $6d4f: $10 db $10 ; $6d50: $10 db $10 ; $6d51: $10 db $10 ; $6d52: $10 db $10 ; $6d53: $10 db $10 ; $6d54: $10 db $10 ; $6d55: $10 db $10 ; $6d56: $10 db $10 ; $6d57: $10 db $10 ; $6d58: $10 db $10 ; $6d59: $10 db $10 ; $6d5a: $10 db $10 ; $6d5b: $10 db $10 ; $6d5c: $10 db $10 ; $6d5d: $10 db $10 ; $6d5e: $10 db $10 ; $6d5f: $10 inc hl ; $6d60: $23 inc hl ; $6d61: $23 inc hl ; $6d62: $23 inc hl ; $6d63: $23 inc hl ; $6d64: $23 ld h, $10 ; $6d65: $26 $10 db $10 ; $6d67: $10 db $10 ; $6d68: $10 db $10 ; $6d69: $10 db $10 ; $6d6a: $10 db $10 ; $6d6b: $10 db $10 ; $6d6c: $10 db $10 ; $6d6d: $10 db $10 ; $6d6e: $10 db $10 ; $6d6f: $10 inc hl ; $6d70: $23 inc hl ; $6d71: $23 inc hl ; $6d72: $23 inc hl ; $6d73: $23 inc hl ; $6d74: $23 inc hl ; $6d75: $23 inc hl ; $6d76: $23 ld h, $10 ; $6d77: $26 $10 db $10 ; $6d79: $10 db $10 ; $6d7a: $10 db $10 ; $6d7b: $10 db $10 ; $6d7c: $10 db $10 ; $6d7d: $10 db $10 ; $6d7e: $10 db $10 ; $6d7f: $10 inc hl ; $6d80: $23 inc hl ; $6d81: $23 inc hl ; $6d82: $23 inc hl ; $6d83: $23 inc hl ; $6d84: $23 inc hl ; $6d85: $23 inc hl ; $6d86: $23 inc hl ; $6d87: $23 inc hl ; $6d88: $23 ld h, $10 ; $6d89: $26 $10 db $10 ; $6d8b: $10 db $10 ; $6d8c: $10 db $10 ; $6d8d: $10 db $10 ; $6d8e: $10 db $10 ; $6d8f: $10 inc hl ; $6d90: $23 inc hl ; $6d91: $23 inc hl ; $6d92: $23 inc hl ; $6d93: $23 inc hl ; $6d94: $23 inc hl ; $6d95: $23 inc hl ; $6d96: $23 inc hl ; $6d97: $23 inc hl ; $6d98: $23 inc hl ; $6d99: $23 inc hl ; $6d9a: $23 inc hl ; $6d9b: $23 ld h, $27 ; $6d9c: $26 $27 inc hl ; $6d9e: $23 inc hl ; $6d9f: $23 db $10 ; $6da0: $10 db $10 ; $6da1: $10 db $10 ; $6da2: $10 db $10 ; $6da3: $10 inc hl ; $6da4: $23 inc hl ; $6da5: $23 inc hl ; $6da6: $23 dec hl ; $6da7: $2b inc hl ; $6da8: $23 cpl ; $6da9: $2f inc hl ; $6daa: $23 inc hl ; $6dab: $23 dec hl ; $6dac: $2b inc hl ; $6dad: $23 inc hl ; $6dae: $23 inc hl ; $6daf: $23 db $10 ; $6db0: $10 db $10 ; $6db1: $10 db $10 ; $6db2: $10 db $10 ; $6db3: $10 dec h ; $6db4: $25 inc hl ; $6db5: $23 inc hl ; $6db6: $23 inc hl ; $6db7: $23 add hl, hl ; $6db8: $29 add hl, hl ; $6db9: $29 ld l, $2b ; $6dba: $2e $2b inc hl ; $6dbc: $23 dec hl ; $6dbd: $2b ld [$102a], sp ; $6dbe: $08 $2a $10 db $10 ; $6dc1: $10 db $10 ; $6dc2: $10 db $10 ; $6dc3: $10 db $10 ; $6dc4: $10 dec h ; $6dc5: $25 inc hl ; $6dc6: $23 inc hl ; $6dc7: $23 inc hl ; $6dc8: $23 add hl, hl ; $6dc9: $29 inc hl ; $6dca: $23 inc hl ; $6dcb: $23 add hl, hl ; $6dcc: $29 ld l, $29 ; $6dcd: $2e $29 ld [$1010], sp ; $6dcf: $08 $10 $10 db $10 ; $6dd2: $10 db $10 ; $6dd3: $10 db $10 ; $6dd4: $10 db $10 ; $6dd5: $10 db $10 ; $6dd6: $10 dec h ; $6dd7: $25 inc hl ; $6dd8: $23 inc hl ; $6dd9: $23 add hl, hl ; $6dda: $29 ld a, [hl+] ; $6ddb: $2a inc hl ; $6ddc: $23 add hl, hl ; $6ddd: $29 inc hl ; $6dde: $23 add hl, hl ; $6ddf: $29 db $10 ; $6de0: $10 db $10 ; $6de1: $10 db $10 ; $6de2: $10 db $10 ; $6de3: $10 db $10 ; $6de4: $10 db $10 ; $6de5: $10 db $10 ; $6de6: $10 db $10 ; $6de7: $10 dec h ; $6de8: $25 inc hl ; $6de9: $23 inc hl ; $6dea: $23 inc hl ; $6deb: $23 inc hl ; $6dec: $23 inc hl ; $6ded: $23 inc hl ; $6dee: $23 inc hl ; $6def: $23 db $10 ; $6df0: $10 db $10 ; $6df1: $10 db $10 ; $6df2: $10 db $10 ; $6df3: $10 db $10 ; $6df4: $10 db $10 ; $6df5: $10 db $10 ; $6df6: $10 db $10 ; $6df7: $10 db $10 ; $6df8: $10 db $10 ; $6df9: $10 db $10 ; $6dfa: $10 db $10 ; $6dfb: $10 db $10 ; $6dfc: $10 db $10 ; $6dfd: $10 db $10 ; $6dfe: $10 db $10 ; $6dff: $10 ld hl, $2121 ; $6e00: $21 $21 $21 ld hl, $2b21 ; $6e03: $21 $21 $2b ld b, b ; $6e06: $40 ld h, $21 ; $6e07: $26 $21 ld hl, $2121 ; $6e09: $21 $21 $21 ld hl, $2121 ; $6e0c: $21 $21 $21 ld hl, $402b ; $6e0f: $21 $2b $40 ld hl, $2121 ; $6e12: $21 $21 $21 ld hl, $2121 ; $6e15: $21 $21 $21 ld hl, $2121 ; $6e18: $21 $21 $21 ld hl, $2b21 ; $6e1b: $21 $21 $2b ld b, b ; $6e1e: $40 ld h, $21 ; $6e1f: $26 $21 ld hl, $2121 ; $6e21: $21 $21 $21 ld hl, $2b21 ; $6e24: $21 $21 $2b ld b, b ; $6e27: $40 ld h, $21 ; $6e28: $26 $21 ld hl, $2121 ; $6e2a: $21 $21 $21 ld hl, $2121 ; $6e2d: $21 $21 $21 ld hl, $2121 ; $6e30: $21 $21 $21 ld hl, $2640 ; $6e33: $21 $40 $26 ld hl, $2121 ; $6e36: $21 $21 $21 ld hl, $2b21 ; $6e39: $21 $21 $2b ld b, b ; $6e3c: $40 ld h, $21 ; $6e3d: $26 $21 ld hl, $1b09 ; $6e3f: $21 $09 $1b ld h, $21 ; $6e42: $26 $21 ld hl, $2b21 ; $6e44: $21 $21 $2b inc e ; $6e47: $1c add hl, bc ; $6e48: $09 add hl, bc ; $6e49: $09 ld h, $21 ; $6e4a: $26 $21 ld hl, $092b ; $6e4c: $21 $2b $09 add hl, bc ; $6e4f: $09 add hl, bc ; $6e50: $09 add hl, bc ; $6e51: $09 add hl, bc ; $6e52: $09 add hl, bc ; $6e53: $09 dec de ; $6e54: $1b ld h, $2b ; $6e55: $26 $2b add hl, bc ; $6e57: $09 add hl, bc ; $6e58: $09 add hl, bc ; $6e59: $09 add hl, bc ; $6e5a: $09 add hl, bc ; $6e5b: $09 add hl, bc ; $6e5c: $09 add hl, bc ; $6e5d: $09 add hl, bc ; $6e5e: $09 add hl, bc ; $6e5f: $09 add hl, bc ; $6e60: $09 add hl, bc ; $6e61: $09 add hl, bc ; $6e62: $09 add hl, bc ; $6e63: $09 add hl, bc ; $6e64: $09 add hl, bc ; $6e65: $09 add hl, bc ; $6e66: $09 add hl, bc ; $6e67: $09 add hl, bc ; $6e68: $09 add hl, bc ; $6e69: $09 add hl, bc ; $6e6a: $09 add hl, bc ; $6e6b: $09 add hl, bc ; $6e6c: $09 add hl, bc ; $6e6d: $09 add hl, bc ; $6e6e: $09 add hl, bc ; $6e6f: $09 add hl, bc ; $6e70: $09 add hl, bc ; $6e71: $09 add hl, bc ; $6e72: $09 add hl, bc ; $6e73: $09 add hl, bc ; $6e74: $09 add hl, bc ; $6e75: $09 add hl, bc ; $6e76: $09 add hl, bc ; $6e77: $09 add hl, bc ; $6e78: $09 add hl, bc ; $6e79: $09 add hl, bc ; $6e7a: $09 add hl, bc ; $6e7b: $09 add hl, bc ; $6e7c: $09 add hl, bc ; $6e7d: $09 add hl, bc ; $6e7e: $09 add hl, bc ; $6e7f: $09 add hl, bc ; $6e80: $09 add hl, bc ; $6e81: $09 add hl, bc ; $6e82: $09 add hl, bc ; $6e83: $09 add hl, bc ; $6e84: $09 add hl, bc ; $6e85: $09 add hl, bc ; $6e86: $09 add hl, bc ; $6e87: $09 add hl, bc ; $6e88: $09 add hl, bc ; $6e89: $09 add hl, bc ; $6e8a: $09 add hl, bc ; $6e8b: $09 add hl, bc ; $6e8c: $09 add hl, bc ; $6e8d: $09 add hl, bc ; $6e8e: $09 add hl, bc ; $6e8f: $09 add hl, bc ; $6e90: $09 add hl, bc ; $6e91: $09 add hl, bc ; $6e92: $09 add hl, bc ; $6e93: $09 add hl, bc ; $6e94: $09 add hl, bc ; $6e95: $09 add hl, bc ; $6e96: $09 add hl, bc ; $6e97: $09 add hl, bc ; $6e98: $09 add hl, bc ; $6e99: $09 add hl, bc ; $6e9a: $09 add hl, bc ; $6e9b: $09 add hl, bc ; $6e9c: $09 add hl, bc ; $6e9d: $09 add hl, bc ; $6e9e: $09 add hl, bc ; $6e9f: $09 add hl, bc ; $6ea0: $09 add hl, bc ; $6ea1: $09 add hl, bc ; $6ea2: $09 add hl, bc ; $6ea3: $09 add hl, bc ; $6ea4: $09 add hl, bc ; $6ea5: $09 add hl, bc ; $6ea6: $09 add hl, bc ; $6ea7: $09 add hl, bc ; $6ea8: $09 add hl, bc ; $6ea9: $09 add hl, bc ; $6eaa: $09 add hl, bc ; $6eab: $09 add hl, bc ; $6eac: $09 add hl, bc ; $6ead: $09 add hl, bc ; $6eae: $09 add hl, bc ; $6eaf: $09 add hl, bc ; $6eb0: $09 add hl, bc ; $6eb1: $09 add hl, bc ; $6eb2: $09 add hl, bc ; $6eb3: $09 add hl, bc ; $6eb4: $09 add hl, bc ; $6eb5: $09 add hl, bc ; $6eb6: $09 add hl, bc ; $6eb7: $09 add hl, bc ; $6eb8: $09 add hl, bc ; $6eb9: $09 add hl, bc ; $6eba: $09 add hl, bc ; $6ebb: $09 add hl, bc ; $6ebc: $09 add hl, bc ; $6ebd: $09 add hl, bc ; $6ebe: $09 add hl, bc ; $6ebf: $09 add hl, bc ; $6ec0: $09 ld h, $21 ; $6ec1: $26 $21 dec hl ; $6ec3: $2b add hl, bc ; $6ec4: $09 add hl, bc ; $6ec5: $09 ld h, $21 ; $6ec6: $26 $21 dec hl ; $6ec8: $2b add hl, bc ; $6ec9: $09 add hl, bc ; $6eca: $09 add hl, bc ; $6ecb: $09 add hl, bc ; $6ecc: $09 add hl, bc ; $6ecd: $09 add hl, bc ; $6ece: $09 add hl, bc ; $6ecf: $09 ld a, [bc] ; $6ed0: $0a ld a, [bc] ; $6ed1: $0a ld a, [bc] ; $6ed2: $0a ld a, [bc] ; $6ed3: $0a ld a, [bc] ; $6ed4: $0a ld a, [bc] ; $6ed5: $0a ld a, [bc] ; $6ed6: $0a ld a, [bc] ; $6ed7: $0a ld a, [bc] ; $6ed8: $0a daa ; $6ed9: $27 inc l ; $6eda: $2c ld a, [bc] ; $6edb: $0a daa ; $6edc: $27 ld [hl+], a ; $6edd: $22 inc l ; $6ede: $2c ld a, [bc] ; $6edf: $0a inc hl ; $6ee0: $23 inc hl ; $6ee1: $23 inc hl ; $6ee2: $23 inc hl ; $6ee3: $23 inc hl ; $6ee4: $23 inc hl ; $6ee5: $23 inc hl ; $6ee6: $23 dec l ; $6ee7: $2d dec bc ; $6ee8: $0b dec bc ; $6ee9: $0b dec bc ; $6eea: $0b dec bc ; $6eeb: $0b dec bc ; $6eec: $0b dec bc ; $6eed: $0b dec bc ; $6eee: $0b dec bc ; $6eef: $0b inc hl ; $6ef0: $23 dec l ; $6ef1: $2d ld b, d ; $6ef2: $42 jr z, @+$25 ; $6ef3: $28 $23 inc hl ; $6ef5: $23 inc hl ; $6ef6: $23 inc hl ; $6ef7: $23 inc hl ; $6ef8: $23 inc hl ; $6ef9: $23 inc hl ; $6efa: $23 inc hl ; $6efb: $23 inc hl ; $6efc: $23 inc hl ; $6efd: $23 inc hl ; $6efe: $23 inc hl ; $6eff: $23 ld hl, $2121 ; $6f00: $21 $21 $21 dec hl ; $6f03: $2b ld b, b ; $6f04: $40 ld h, $21 ; $6f05: $26 $21 ld hl, $2121 ; $6f07: $21 $21 $21 ld hl, $2121 ; $6f0a: $21 $21 $21 ld hl, $2121 ; $6f0d: $21 $21 $21 ld hl, $2121 ; $6f10: $21 $21 $21 ld hl, $2121 ; $6f13: $21 $21 $21 ld hl, $2121 ; $6f16: $21 $21 $21 ld hl, $2b21 ; $6f19: $21 $21 $2b ld b, b ; $6f1c: $40 ld h, $21 ; $6f1d: $26 $21 ld hl, $402b ; $6f1f: $21 $2b $40 ld h, $21 ; $6f22: $26 $21 ld hl, $2121 ; $6f24: $21 $21 $21 dec hl ; $6f27: $2b ld b, b ; $6f28: $40 ld h, $21 ; $6f29: $26 $21 ld hl, $2121 ; $6f2b: $21 $21 $21 ld hl, $2121 ; $6f2e: $21 $21 $21 ld hl, $2121 ; $6f31: $21 $21 $21 dec hl ; $6f34: $2b ld b, b ; $6f35: $40 ld h, $21 ; $6f36: $26 $21 ld hl, $2121 ; $6f38: $21 $21 $21 ld hl, $2121 ; $6f3b: $21 $21 $21 ld hl, $0921 ; $6f3e: $21 $21 $09 add hl, bc ; $6f41: $09 dec de ; $6f42: $1b ld h, $21 ; $6f43: $26 $21 ld hl, $2b21 ; $6f45: $21 $21 $2b inc e ; $6f48: $1c add hl, bc ; $6f49: $09 ld h, $21 ; $6f4a: $26 $21 dec hl ; $6f4c: $2b inc e ; $6f4d: $1c add hl, bc ; $6f4e: $09 add hl, bc ; $6f4f: $09 add hl, bc ; $6f50: $09 add hl, bc ; $6f51: $09 add hl, bc ; $6f52: $09 add hl, bc ; $6f53: $09 dec de ; $6f54: $1b ld h, $2b ; $6f55: $26 $2b add hl, bc ; $6f57: $09 add hl, bc ; $6f58: $09 add hl, bc ; $6f59: $09 add hl, bc ; $6f5a: $09 add hl, bc ; $6f5b: $09 add hl, bc ; $6f5c: $09 add hl, bc ; $6f5d: $09 add hl, bc ; $6f5e: $09 add hl, bc ; $6f5f: $09 add hl, bc ; $6f60: $09 add hl, bc ; $6f61: $09 add hl, bc ; $6f62: $09 add hl, bc ; $6f63: $09 add hl, bc ; $6f64: $09 add hl, bc ; $6f65: $09 add hl, bc ; $6f66: $09 add hl, bc ; $6f67: $09 add hl, bc ; $6f68: $09 add hl, bc ; $6f69: $09 add hl, bc ; $6f6a: $09 add hl, bc ; $6f6b: $09 add hl, bc ; $6f6c: $09 add hl, bc ; $6f6d: $09 add hl, bc ; $6f6e: $09 add hl, bc ; $6f6f: $09 add hl, bc ; $6f70: $09 add hl, bc ; $6f71: $09 add hl, bc ; $6f72: $09 add hl, bc ; $6f73: $09 add hl, bc ; $6f74: $09 add hl, bc ; $6f75: $09 add hl, bc ; $6f76: $09 add hl, bc ; $6f77: $09 add hl, bc ; $6f78: $09 add hl, bc ; $6f79: $09 add hl, bc ; $6f7a: $09 add hl, bc ; $6f7b: $09 add hl, bc ; $6f7c: $09 add hl, bc ; $6f7d: $09 add hl, bc ; $6f7e: $09 add hl, bc ; $6f7f: $09 add hl, bc ; $6f80: $09 add hl, bc ; $6f81: $09 add hl, bc ; $6f82: $09 add hl, bc ; $6f83: $09 add hl, bc ; $6f84: $09 add hl, bc ; $6f85: $09 add hl, bc ; $6f86: $09 add hl, bc ; $6f87: $09 add hl, bc ; $6f88: $09 add hl, bc ; $6f89: $09 add hl, bc ; $6f8a: $09 add hl, bc ; $6f8b: $09 add hl, bc ; $6f8c: $09 add hl, bc ; $6f8d: $09 add hl, bc ; $6f8e: $09 add hl, bc ; $6f8f: $09 add hl, bc ; $6f90: $09 add hl, bc ; $6f91: $09 add hl, bc ; $6f92: $09 add hl, bc ; $6f93: $09 add hl, bc ; $6f94: $09 add hl, bc ; $6f95: $09 add hl, bc ; $6f96: $09 add hl, bc ; $6f97: $09 add hl, bc ; $6f98: $09 add hl, bc ; $6f99: $09 add hl, bc ; $6f9a: $09 add hl, bc ; $6f9b: $09 add hl, bc ; $6f9c: $09 add hl, bc ; $6f9d: $09 add hl, bc ; $6f9e: $09 add hl, bc ; $6f9f: $09 add hl, bc ; $6fa0: $09 add hl, bc ; $6fa1: $09 add hl, bc ; $6fa2: $09 add hl, bc ; $6fa3: $09 add hl, bc ; $6fa4: $09 add hl, bc ; $6fa5: $09 add hl, bc ; $6fa6: $09 add hl, bc ; $6fa7: $09 add hl, bc ; $6fa8: $09 add hl, bc ; $6fa9: $09 add hl, bc ; $6faa: $09 add hl, bc ; $6fab: $09 add hl, bc ; $6fac: $09 add hl, bc ; $6fad: $09 add hl, bc ; $6fae: $09 add hl, bc ; $6faf: $09 add hl, bc ; $6fb0: $09 add hl, bc ; $6fb1: $09 add hl, bc ; $6fb2: $09 add hl, bc ; $6fb3: $09 add hl, bc ; $6fb4: $09 add hl, bc ; $6fb5: $09 add hl, bc ; $6fb6: $09 add hl, bc ; $6fb7: $09 add hl, bc ; $6fb8: $09 add hl, bc ; $6fb9: $09 add hl, bc ; $6fba: $09 add hl, bc ; $6fbb: $09 add hl, bc ; $6fbc: $09 add hl, bc ; $6fbd: $09 add hl, bc ; $6fbe: $09 add hl, bc ; $6fbf: $09 add hl, bc ; $6fc0: $09 add hl, bc ; $6fc1: $09 add hl, bc ; $6fc2: $09 add hl, bc ; $6fc3: $09 add hl, bc ; $6fc4: $09 add hl, bc ; $6fc5: $09 add hl, bc ; $6fc6: $09 add hl, bc ; $6fc7: $09 add hl, bc ; $6fc8: $09 ld h, $2b ; $6fc9: $26 $2b add hl, bc ; $6fcb: $09 add hl, bc ; $6fcc: $09 add hl, bc ; $6fcd: $09 add hl, bc ; $6fce: $09 add hl, bc ; $6fcf: $09 ld a, [bc] ; $6fd0: $0a daa ; $6fd1: $27 inc l ; $6fd2: $2c ld a, [bc] ; $6fd3: $0a ld a, [bc] ; $6fd4: $0a daa ; $6fd5: $27 inc l ; $6fd6: $2c ld a, [bc] ; $6fd7: $0a ld a, [bc] ; $6fd8: $0a ld a, [bc] ; $6fd9: $0a ld a, [bc] ; $6fda: $0a ld a, [bc] ; $6fdb: $0a ld a, [bc] ; $6fdc: $0a daa ; $6fdd: $27 inc l ; $6fde: $2c ld a, [bc] ; $6fdf: $0a dec bc ; $6fe0: $0b dec bc ; $6fe1: $0b dec bc ; $6fe2: $0b dec bc ; $6fe3: $0b dec bc ; $6fe4: $0b dec bc ; $6fe5: $0b dec bc ; $6fe6: $0b dec bc ; $6fe7: $0b dec bc ; $6fe8: $0b dec bc ; $6fe9: $0b dec bc ; $6fea: $0b dec bc ; $6feb: $0b dec bc ; $6fec: $0b dec bc ; $6fed: $0b dec bc ; $6fee: $0b dec bc ; $6fef: $0b inc hl ; $6ff0: $23 dec l ; $6ff1: $2d dec bc ; $6ff2: $0b dec bc ; $6ff3: $0b dec bc ; $6ff4: $0b dec bc ; $6ff5: $0b dec bc ; $6ff6: $0b dec bc ; $6ff7: $0b dec bc ; $6ff8: $0b dec bc ; $6ff9: $0b dec bc ; $6ffa: $0b dec bc ; $6ffb: $0b dec bc ; $6ffc: $0b dec bc ; $6ffd: $0b dec bc ; $6ffe: $0b dec bc ; $6fff: $0b ld hl, $2121 ; $7000: $21 $21 $21 ld hl, $2121 ; $7003: $21 $21 $21 ld hl, $2b21 ; $7006: $21 $21 $2b ld b, b ; $7009: $40 ld h, $21 ; $700a: $26 $21 ld hl, $2121 ; $700c: $21 $21 $21 ld hl, $2121 ; $700f: $21 $21 $21 ld hl, $2b21 ; $7012: $21 $21 $2b ld b, b ; $7015: $40 ld h, $21 ; $7016: $26 $21 ld hl, $2121 ; $7018: $21 $21 $21 ld hl, $2121 ; $701b: $21 $21 $21 ld hl, $2b21 ; $701e: $21 $21 $2b ld b, b ; $7021: $40 ld h, $21 ; $7022: $26 $21 ld hl, $2121 ; $7024: $21 $21 $21 ld hl, $2121 ; $7027: $21 $21 $21 ld hl, $2b21 ; $702a: $21 $21 $2b ld b, b ; $702d: $40 ld h, $21 ; $702e: $26 $21 ld hl, $2121 ; $7030: $21 $21 $21 dec hl ; $7033: $2b inc e ; $7034: $1c add hl, bc ; $7035: $09 add hl, bc ; $7036: $09 add hl, bc ; $7037: $09 add hl, bc ; $7038: $09 add hl, bc ; $7039: $09 add hl, bc ; $703a: $09 dec de ; $703b: $1b ld h, $21 ; $703c: $26 $21 ld hl, $0921 ; $703e: $21 $21 $09 add hl, bc ; $7041: $09 add hl, bc ; $7042: $09 add hl, bc ; $7043: $09 add hl, bc ; $7044: $09 add hl, bc ; $7045: $09 add hl, bc ; $7046: $09 add hl, bc ; $7047: $09 add hl, bc ; $7048: $09 add hl, bc ; $7049: $09 add hl, bc ; $704a: $09 add hl, bc ; $704b: $09 add hl, bc ; $704c: $09 dec de ; $704d: $1b ld h, $21 ; $704e: $26 $21 add hl, bc ; $7050: $09 add hl, bc ; $7051: $09 add hl, bc ; $7052: $09 add hl, bc ; $7053: $09 add hl, bc ; $7054: $09 add hl, bc ; $7055: $09 add hl, bc ; $7056: $09 add hl, bc ; $7057: $09 add hl, bc ; $7058: $09 add hl, bc ; $7059: $09 add hl, bc ; $705a: $09 add hl, bc ; $705b: $09 add hl, bc ; $705c: $09 add hl, bc ; $705d: $09 ld h, $21 ; $705e: $26 $21 add hl, bc ; $7060: $09 add hl, bc ; $7061: $09 add hl, bc ; $7062: $09 add hl, bc ; $7063: $09 add hl, bc ; $7064: $09 add hl, bc ; $7065: $09 add hl, bc ; $7066: $09 add hl, bc ; $7067: $09 add hl, bc ; $7068: $09 add hl, bc ; $7069: $09 add hl, bc ; $706a: $09 add hl, bc ; $706b: $09 add hl, bc ; $706c: $09 add hl, bc ; $706d: $09 ld h, $21 ; $706e: $26 $21 add hl, bc ; $7070: $09 add hl, bc ; $7071: $09 add hl, bc ; $7072: $09 add hl, bc ; $7073: $09 add hl, bc ; $7074: $09 add hl, bc ; $7075: $09 add hl, bc ; $7076: $09 add hl, bc ; $7077: $09 ld h, $2b ; $7078: $26 $2b add hl, bc ; $707a: $09 add hl, bc ; $707b: $09 add hl, bc ; $707c: $09 add hl, bc ; $707d: $09 add hl, bc ; $707e: $09 add hl, bc ; $707f: $09 add hl, bc ; $7080: $09 add hl, bc ; $7081: $09 add hl, bc ; $7082: $09 add hl, bc ; $7083: $09 add hl, bc ; $7084: $09 add hl, bc ; $7085: $09 add hl, bc ; $7086: $09 add hl, bc ; $7087: $09 ld h, $21 ; $7088: $26 $21 dec hl ; $708a: $2b add hl, bc ; $708b: $09 add hl, bc ; $708c: $09 add hl, bc ; $708d: $09 add hl, bc ; $708e: $09 add hl, bc ; $708f: $09 add hl, bc ; $7090: $09 add hl, bc ; $7091: $09 add hl, bc ; $7092: $09 add hl, bc ; $7093: $09 add hl, bc ; $7094: $09 add hl, bc ; $7095: $09 add hl, bc ; $7096: $09 ld h, $2b ; $7097: $26 $2b ld b, b ; $7099: $40 inc b ; $709a: $04 add hl, bc ; $709b: $09 add hl, bc ; $709c: $09 add hl, bc ; $709d: $09 add hl, bc ; $709e: $09 add hl, bc ; $709f: $09 add hl, bc ; $70a0: $09 add hl, bc ; $70a1: $09 add hl, bc ; $70a2: $09 add hl, bc ; $70a3: $09 add hl, bc ; $70a4: $09 add hl, bc ; $70a5: $09 add hl, bc ; $70a6: $09 add hl, bc ; $70a7: $09 ld h, $21 ; $70a8: $26 $21 ld hl, $2121 ; $70aa: $21 $21 $21 ld hl, $2121 ; $70ad: $21 $21 $21 add hl, bc ; $70b0: $09 add hl, bc ; $70b1: $09 add hl, bc ; $70b2: $09 add hl, bc ; $70b3: $09 ld h, $2b ; $70b4: $26 $2b add hl, bc ; $70b6: $09 add hl, bc ; $70b7: $09 add hl, bc ; $70b8: $09 ld h, $26 ; $70b9: $26 $26 ld hl, $2121 ; $70bb: $21 $21 $21 ld hl, $0921 ; $70be: $21 $21 $09 ld h, $2b ; $70c1: $26 $2b add hl, bc ; $70c3: $09 add hl, bc ; $70c4: $09 add hl, bc ; $70c5: $09 add hl, bc ; $70c6: $09 add hl, bc ; $70c7: $09 add hl, bc ; $70c8: $09 ld h, $2b ; $70c9: $26 $2b ld b, b ; $70cb: $40 ld h, $21 ; $70cc: $26 $21 ld hl, $0a21 ; $70ce: $21 $21 $0a ld a, [bc] ; $70d1: $0a ld a, [bc] ; $70d2: $0a ld a, [bc] ; $70d3: $0a ld a, [bc] ; $70d4: $0a ld a, [bc] ; $70d5: $0a ld a, [bc] ; $70d6: $0a ld a, [bc] ; $70d7: $0a ld a, [bc] ; $70d8: $0a daa ; $70d9: $27 ld [hl+], a ; $70da: $22 ld [hl+], a ; $70db: $22 ld [hl+], a ; $70dc: $22 ld [hl+], a ; $70dd: $22 ld [hl+], a ; $70de: $22 ld [hl+], a ; $70df: $22 dec bc ; $70e0: $0b dec bc ; $70e1: $0b dec bc ; $70e2: $0b dec bc ; $70e3: $0b dec bc ; $70e4: $0b dec bc ; $70e5: $0b jr z, jr_00a_710b ; $70e6: $28 $23 inc hl ; $70e8: $23 inc hl ; $70e9: $23 inc hl ; $70ea: $23 inc hl ; $70eb: $23 inc hl ; $70ec: $23 dec l ; $70ed: $2d ld b, d ; $70ee: $42 jr z, @+$0d ; $70ef: $28 $0b dec bc ; $70f1: $0b dec bc ; $70f2: $0b dec bc ; $70f3: $0b jr z, jr_00a_7119 ; $70f4: $28 $23 inc hl ; $70f6: $23 inc hl ; $70f7: $23 inc hl ; $70f8: $23 dec l ; $70f9: $2d ld b, d ; $70fa: $42 jr z, jr_00a_7120 ; $70fb: $28 $23 inc hl ; $70fd: $23 inc hl ; $70fe: $23 inc hl ; $70ff: $23 db $10 ; $7100: $10 db $10 ; $7101: $10 db $10 ; $7102: $10 db $10 ; $7103: $10 db $10 ; $7104: $10 db $10 ; $7105: $10 db $10 ; $7106: $10 db $10 ; $7107: $10 db $10 ; $7108: $10 db $10 ; $7109: $10 db $10 ; $710a: $10 jr_00a_710b: db $10 ; $710b: $10 db $10 ; $710c: $10 db $10 ; $710d: $10 db $10 ; $710e: $10 db $10 ; $710f: $10 db $10 ; $7110: $10 db $10 ; $7111: $10 db $10 ; $7112: $10 db $10 ; $7113: $10 db $10 ; $7114: $10 db $10 ; $7115: $10 db $10 ; $7116: $10 db $10 ; $7117: $10 db $10 ; $7118: $10 jr_00a_7119: db $10 ; $7119: $10 db $10 ; $711a: $10 db $10 ; $711b: $10 db $10 ; $711c: $10 db $10 ; $711d: $10 db $10 ; $711e: $10 db $10 ; $711f: $10 jr_00a_7120: db $10 ; $7120: $10 db $10 ; $7121: $10 db $10 ; $7122: $10 db $10 ; $7123: $10 db $10 ; $7124: $10 db $10 ; $7125: $10 db $10 ; $7126: $10 db $10 ; $7127: $10 db $10 ; $7128: $10 db $10 ; $7129: $10 db $10 ; $712a: $10 db $10 ; $712b: $10 db $10 ; $712c: $10 db $10 ; $712d: $10 db $10 ; $712e: $10 db $10 ; $712f: $10 db $10 ; $7130: $10 db $10 ; $7131: $10 db $10 ; $7132: $10 db $10 ; $7133: $10 db $10 ; $7134: $10 db $10 ; $7135: $10 db $10 ; $7136: $10 db $10 ; $7137: $10 db $10 ; $7138: $10 db $10 ; $7139: $10 db $10 ; $713a: $10 db $10 ; $713b: $10 db $10 ; $713c: $10 db $10 ; $713d: $10 db $10 ; $713e: $10 db $10 ; $713f: $10 db $10 ; $7140: $10 db $10 ; $7141: $10 db $10 ; $7142: $10 db $10 ; $7143: $10 db $10 ; $7144: $10 db $10 ; $7145: $10 db $10 ; $7146: $10 db $10 ; $7147: $10 db $10 ; $7148: $10 db $10 ; $7149: $10 db $10 ; $714a: $10 db $10 ; $714b: $10 db $10 ; $714c: $10 db $10 ; $714d: $10 db $10 ; $714e: $10 db $10 ; $714f: $10 db $10 ; $7150: $10 db $10 ; $7151: $10 db $10 ; $7152: $10 db $10 ; $7153: $10 db $10 ; $7154: $10 db $10 ; $7155: $10 db $10 ; $7156: $10 db $10 ; $7157: $10 db $10 ; $7158: $10 db $10 ; $7159: $10 db $10 ; $715a: $10 db $10 ; $715b: $10 db $10 ; $715c: $10 db $10 ; $715d: $10 db $10 ; $715e: $10 db $10 ; $715f: $10 db $10 ; $7160: $10 db $10 ; $7161: $10 db $10 ; $7162: $10 db $10 ; $7163: $10 db $10 ; $7164: $10 db $10 ; $7165: $10 db $10 ; $7166: $10 db $10 ; $7167: $10 db $10 ; $7168: $10 db $10 ; $7169: $10 db $10 ; $716a: $10 db $10 ; $716b: $10 db $10 ; $716c: $10 db $10 ; $716d: $10 db $10 ; $716e: $10 db $10 ; $716f: $10 db $10 ; $7170: $10 db $10 ; $7171: $10 db $10 ; $7172: $10 db $10 ; $7173: $10 db $10 ; $7174: $10 db $10 ; $7175: $10 db $10 ; $7176: $10 db $10 ; $7177: $10 db $10 ; $7178: $10 db $10 ; $7179: $10 db $10 ; $717a: $10 db $10 ; $717b: $10 db $10 ; $717c: $10 db $10 ; $717d: $10 db $10 ; $717e: $10 db $10 ; $717f: $10 db $10 ; $7180: $10 db $10 ; $7181: $10 db $10 ; $7182: $10 db $10 ; $7183: $10 db $10 ; $7184: $10 db $10 ; $7185: $10 db $10 ; $7186: $10 db $10 ; $7187: $10 db $10 ; $7188: $10 db $10 ; $7189: $10 db $10 ; $718a: $10 db $10 ; $718b: $10 db $10 ; $718c: $10 db $10 ; $718d: $10 db $10 ; $718e: $10 db $10 ; $718f: $10 inc hl ; $7190: $23 inc hl ; $7191: $23 inc hl ; $7192: $23 ld h, $27 ; $7193: $26 $27 inc hl ; $7195: $23 inc hl ; $7196: $23 inc hl ; $7197: $23 ld h, $27 ; $7198: $26 $27 inc hl ; $719a: $23 inc hl ; $719b: $23 inc hl ; $719c: $23 ld h, $27 ; $719d: $26 $27 inc hl ; $719f: $23 inc hl ; $71a0: $23 dec hl ; $71a1: $2b inc hl ; $71a2: $23 cpl ; $71a3: $2f ld a, [hl+] ; $71a4: $2a inc hl ; $71a5: $23 inc hl ; $71a6: $23 inc hl ; $71a7: $23 inc hl ; $71a8: $23 inc hl ; $71a9: $23 inc hl ; $71aa: $23 cpl ; $71ab: $2f dec hl ; $71ac: $2b inc hl ; $71ad: $23 inc hl ; $71ae: $23 inc hl ; $71af: $23 cpl ; $71b0: $2f ld [$0808], sp ; $71b1: $08 $08 $08 ld [$2a2a], sp ; $71b4: $08 $2a $2a inc hl ; $71b7: $23 inc hl ; $71b8: $23 dec hl ; $71b9: $2b dec hl ; $71ba: $2b ld [$0808], sp ; $71bb: $08 $08 $08 ld a, [hl+] ; $71be: $2a ld [$0808], sp ; $71bf: $08 $08 $08 jr z, jr_00a_71e7 ; $71c2: $28 $23 ld l, $08 ; $71c4: $2e $08 ld [$082f], sp ; $71c6: $08 $2f $08 ld [$0808], sp ; $71c9: $08 $08 $08 ld [$0808], sp ; $71cc: $08 $08 $08 ld [$2e2e], sp ; $71cf: $08 $2e $2e inc hl ; $71d2: $23 inc hl ; $71d3: $23 inc hl ; $71d4: $23 ld l, $08 ; $71d5: $2e $08 ld [$2e08], sp ; $71d7: $08 $08 $2e jr z, jr_00a_7205 ; $71da: $28 $29 ld l, $08 ; $71dc: $2e $08 ld l, $23 ; $71de: $2e $23 inc hl ; $71e0: $23 inc hl ; $71e1: $23 inc hl ; $71e2: $23 inc hl ; $71e3: $23 inc hl ; $71e4: $23 inc hl ; $71e5: $23 inc hl ; $71e6: $23 jr_00a_71e7: ld l, $23 ; $71e7: $2e $23 inc hl ; $71e9: $23 inc hl ; $71ea: $23 inc hl ; $71eb: $23 inc hl ; $71ec: $23 inc hl ; $71ed: $23 inc hl ; $71ee: $23 inc hl ; $71ef: $23 db $10 ; $71f0: $10 db $10 ; $71f1: $10 db $10 ; $71f2: $10 db $10 ; $71f3: $10 db $10 ; $71f4: $10 db $10 ; $71f5: $10 db $10 ; $71f6: $10 db $10 ; $71f7: $10 db $10 ; $71f8: $10 db $10 ; $71f9: $10 db $10 ; $71fa: $10 db $10 ; $71fb: $10 db $10 ; $71fc: $10 db $10 ; $71fd: $10 db $10 ; $71fe: $10 db $10 ; $71ff: $10 db $10 ; $7200: $10 db $10 ; $7201: $10 db $10 ; $7202: $10 db $10 ; $7203: $10 db $10 ; $7204: $10 jr_00a_7205: db $10 ; $7205: $10 db $10 ; $7206: $10 db $10 ; $7207: $10 db $10 ; $7208: $10 db $10 ; $7209: $10 db $10 ; $720a: $10 db $10 ; $720b: $10 db $10 ; $720c: $10 db $10 ; $720d: $10 db $10 ; $720e: $10 db $10 ; $720f: $10 db $10 ; $7210: $10 db $10 ; $7211: $10 db $10 ; $7212: $10 db $10 ; $7213: $10 db $10 ; $7214: $10 db $10 ; $7215: $10 db $10 ; $7216: $10 db $10 ; $7217: $10 db $10 ; $7218: $10 db $10 ; $7219: $10 db $10 ; $721a: $10 db $10 ; $721b: $10 db $10 ; $721c: $10 db $10 ; $721d: $10 db $10 ; $721e: $10 db $10 ; $721f: $10 db $10 ; $7220: $10 db $10 ; $7221: $10 db $10 ; $7222: $10 db $10 ; $7223: $10 db $10 ; $7224: $10 db $10 ; $7225: $10 db $10 ; $7226: $10 db $10 ; $7227: $10 db $10 ; $7228: $10 db $10 ; $7229: $10 db $10 ; $722a: $10 db $10 ; $722b: $10 db $10 ; $722c: $10 db $10 ; $722d: $10 db $10 ; $722e: $10 db $10 ; $722f: $10 db $10 ; $7230: $10 db $10 ; $7231: $10 db $10 ; $7232: $10 db $10 ; $7233: $10 db $10 ; $7234: $10 db $10 ; $7235: $10 db $10 ; $7236: $10 db $10 ; $7237: $10 db $10 ; $7238: $10 db $10 ; $7239: $10 db $10 ; $723a: $10 db $10 ; $723b: $10 db $10 ; $723c: $10 db $10 ; $723d: $10 db $10 ; $723e: $10 db $10 ; $723f: $10 db $10 ; $7240: $10 db $10 ; $7241: $10 db $10 ; $7242: $10 db $10 ; $7243: $10 db $10 ; $7244: $10 db $10 ; $7245: $10 db $10 ; $7246: $10 db $10 ; $7247: $10 db $10 ; $7248: $10 db $10 ; $7249: $10 db $10 ; $724a: $10 db $10 ; $724b: $10 db $10 ; $724c: $10 db $10 ; $724d: $10 db $10 ; $724e: $10 db $10 ; $724f: $10 db $10 ; $7250: $10 db $10 ; $7251: $10 db $10 ; $7252: $10 db $10 ; $7253: $10 db $10 ; $7254: $10 db $10 ; $7255: $10 db $10 ; $7256: $10 db $10 ; $7257: $10 db $10 ; $7258: $10 db $10 ; $7259: $10 db $10 ; $725a: $10 db $10 ; $725b: $10 db $10 ; $725c: $10 db $10 ; $725d: $10 db $10 ; $725e: $10 db $10 ; $725f: $10 db $10 ; $7260: $10 db $10 ; $7261: $10 db $10 ; $7262: $10 db $10 ; $7263: $10 db $10 ; $7264: $10 db $10 ; $7265: $10 db $10 ; $7266: $10 db $10 ; $7267: $10 db $10 ; $7268: $10 db $10 ; $7269: $10 db $10 ; $726a: $10 db $10 ; $726b: $10 db $10 ; $726c: $10 db $10 ; $726d: $10 db $10 ; $726e: $10 db $10 ; $726f: $10 db $10 ; $7270: $10 db $10 ; $7271: $10 db $10 ; $7272: $10 db $10 ; $7273: $10 db $10 ; $7274: $10 db $10 ; $7275: $10 db $10 ; $7276: $10 db $10 ; $7277: $10 db $10 ; $7278: $10 db $10 ; $7279: $10 db $10 ; $727a: $10 db $10 ; $727b: $10 db $10 ; $727c: $10 db $10 ; $727d: $10 db $10 ; $727e: $10 db $10 ; $727f: $10 db $10 ; $7280: $10 db $10 ; $7281: $10 db $10 ; $7282: $10 db $10 ; $7283: $10 db $10 ; $7284: $10 db $10 ; $7285: $10 db $10 ; $7286: $10 db $10 ; $7287: $10 db $10 ; $7288: $10 db $10 ; $7289: $10 db $10 ; $728a: $10 db $10 ; $728b: $10 db $10 ; $728c: $10 db $10 ; $728d: $10 db $10 ; $728e: $10 db $10 ; $728f: $10 ld h, $27 ; $7290: $26 $27 inc hl ; $7292: $23 ld a, [hl+] ; $7293: $2a inc hl ; $7294: $23 cpl ; $7295: $2f inc hl ; $7296: $23 inc hl ; $7297: $23 inc hl ; $7298: $23 inc hl ; $7299: $23 inc hl ; $729a: $23 ld h, $10 ; $729b: $26 $10 db $10 ; $729d: $10 db $10 ; $729e: $10 db $10 ; $729f: $10 inc hl ; $72a0: $23 dec hl ; $72a1: $2b ld [$2b2a], sp ; $72a2: $08 $2a $2b ld [$2328], sp ; $72a5: $08 $28 $23 inc hl ; $72a8: $23 dec l ; $72a9: $2d cpl ; $72aa: $2f inc hl ; $72ab: $23 inc hl ; $72ac: $23 ld h, $10 ; $72ad: $26 $10 db $10 ; $72af: $10 ld [$0808], sp ; $72b0: $08 $08 $08 ld [$0808], sp ; $72b3: $08 $08 $08 ld [$2b2f], sp ; $72b6: $08 $2f $2b ld [$0808], sp ; $72b9: $08 $08 $08 cpl ; $72bc: $2f inc hl ; $72bd: $23 db $10 ; $72be: $10 db $10 ; $72bf: $10 ld [$0808], sp ; $72c0: $08 $08 $08 ld [$2d28], sp ; $72c3: $08 $28 $2d ld [$0808], sp ; $72c6: $08 $08 $08 ld [$2e08], sp ; $72c9: $08 $08 $2e ld l, $2c ; $72cc: $2e $2c db $10 ; $72ce: $10 db $10 ; $72cf: $10 ld l, $08 ; $72d0: $2e $08 jr z, jr_00a_72fd ; $72d2: $28 $29 inc hl ; $72d4: $23 inc hl ; $72d5: $23 ld [$0808], sp ; $72d6: $08 $08 $08 ld [$2323], sp ; $72d9: $08 $23 $23 add hl, hl ; $72dc: $29 inc hl ; $72dd: $23 db $10 ; $72de: $10 db $10 ; $72df: $10 inc hl ; $72e0: $23 add hl, hl ; $72e1: $29 inc hl ; $72e2: $23 inc hl ; $72e3: $23 inc hl ; $72e4: $23 db $10 ; $72e5: $10 dec l ; $72e6: $2d ld [$2808], sp ; $72e7: $08 $08 $28 db $10 ; $72ea: $10 inc hl ; $72eb: $23 inc hl ; $72ec: $23 inc h ; $72ed: $24 dec bc ; $72ee: $0b db $10 ; $72ef: $10 db $10 ; $72f0: $10 db $10 ; $72f1: $10 db $10 ; $72f2: $10 db $10 ; $72f3: $10 db $10 ; $72f4: $10 db $10 ; $72f5: $10 inc hl ; $72f6: $23 ld [$2308], sp ; $72f7: $08 $08 $23 db $10 ; $72fa: $10 db $10 ; $72fb: $10 db $10 ; $72fc: $10 jr_00a_72fd: db $10 ; $72fd: $10 db $10 ; $72fe: $10 db $10 ; $72ff: $10 inc hl ; $7300: $23 dec l ; $7301: $2d dec bc ; $7302: $0b dec bc ; $7303: $0b dec bc ; $7304: $0b dec bc ; $7305: $0b dec bc ; $7306: $0b dec bc ; $7307: $0b dec bc ; $7308: $0b dec bc ; $7309: $0b dec bc ; $730a: $0b dec bc ; $730b: $0b jr z, jr_00a_733b ; $730c: $28 $2d dec bc ; $730e: $0b dec bc ; $730f: $0b inc hl ; $7310: $23 inc hl ; $7311: $23 dec l ; $7312: $2d dec bc ; $7313: $0b dec bc ; $7314: $0b jr z, jr_00a_733a ; $7315: $28 $23 dec l ; $7317: $2d dec bc ; $7318: $0b dec bc ; $7319: $0b dec bc ; $731a: $0b dec bc ; $731b: $0b dec bc ; $731c: $0b dec bc ; $731d: $0b dec bc ; $731e: $0b dec bc ; $731f: $0b ld b, $42 ; $7320: $06 $42 ld b, $0b ; $7322: $06 $0b dec bc ; $7324: $0b dec bc ; $7325: $0b dec bc ; $7326: $0b dec bc ; $7327: $0b dec bc ; $7328: $0b dec bc ; $7329: $0b dec bc ; $732a: $0b dec bc ; $732b: $0b dec bc ; $732c: $0b dec bc ; $732d: $0b dec bc ; $732e: $0b dec bc ; $732f: $0b inc hl ; $7330: $23 inc hl ; $7331: $23 dec l ; $7332: $2d dec bc ; $7333: $0b dec bc ; $7334: $0b dec bc ; $7335: $0b dec bc ; $7336: $0b dec bc ; $7337: $0b dec bc ; $7338: $0b dec bc ; $7339: $0b jr_00a_733a: dec bc ; $733a: $0b jr_00a_733b: dec bc ; $733b: $0b dec bc ; $733c: $0b dec bc ; $733d: $0b dec bc ; $733e: $0b dec bc ; $733f: $0b ld b, d ; $7340: $42 jr z, jr_00a_7366 ; $7341: $28 $23 dec l ; $7343: $2d dec bc ; $7344: $0b dec bc ; $7345: $0b dec bc ; $7346: $0b dec bc ; $7347: $0b dec bc ; $7348: $0b dec bc ; $7349: $0b jr z, jr_00a_7379 ; $734a: $28 $2d dec bc ; $734c: $0b dec bc ; $734d: $0b dec bc ; $734e: $0b dec bc ; $734f: $0b inc hl ; $7350: $23 inc hl ; $7351: $23 inc hl ; $7352: $23 dec l ; $7353: $2d dec bc ; $7354: $0b dec bc ; $7355: $0b dec bc ; $7356: $0b dec bc ; $7357: $0b dec bc ; $7358: $0b dec bc ; $7359: $0b dec bc ; $735a: $0b dec bc ; $735b: $0b dec bc ; $735c: $0b dec bc ; $735d: $0b dec bc ; $735e: $0b dec bc ; $735f: $0b inc hl ; $7360: $23 inc hl ; $7361: $23 inc hl ; $7362: $23 inc hl ; $7363: $23 inc hl ; $7364: $23 dec l ; $7365: $2d jr_00a_7366: dec bc ; $7366: $0b dec bc ; $7367: $0b dec bc ; $7368: $0b dec bc ; $7369: $0b dec bc ; $736a: $0b dec bc ; $736b: $0b dec bc ; $736c: $0b dec bc ; $736d: $0b dec bc ; $736e: $0b dec bc ; $736f: $0b inc hl ; $7370: $23 inc hl ; $7371: $23 inc hl ; $7372: $23 dec l ; $7373: $2d dec bc ; $7374: $0b dec bc ; $7375: $0b dec bc ; $7376: $0b jr z, jr_00a_739c ; $7377: $28 $23 jr_00a_7379: dec l ; $7379: $2d dec bc ; $737a: $0b dec bc ; $737b: $0b dec bc ; $737c: $0b dec bc ; $737d: $0b dec bc ; $737e: $0b dec bc ; $737f: $0b ld b, $42 ; $7380: $06 $42 jr z, jr_00a_73b1 ; $7382: $28 $2d dec bc ; $7384: $0b dec bc ; $7385: $0b dec bc ; $7386: $0b dec bc ; $7387: $0b dec bc ; $7388: $0b dec bc ; $7389: $0b dec bc ; $738a: $0b dec bc ; $738b: $0b dec bc ; $738c: $0b jr z, jr_00a_73b2 ; $738d: $28 $23 inc hl ; $738f: $23 inc hl ; $7390: $23 inc hl ; $7391: $23 inc hl ; $7392: $23 inc hl ; $7393: $23 inc hl ; $7394: $23 inc hl ; $7395: $23 dec l ; $7396: $2d dec bc ; $7397: $0b dec bc ; $7398: $0b dec bc ; $7399: $0b dec bc ; $739a: $0b dec bc ; $739b: $0b jr_00a_739c: dec bc ; $739c: $0b dec bc ; $739d: $0b dec bc ; $739e: $0b dec bc ; $739f: $0b inc hl ; $73a0: $23 inc hl ; $73a1: $23 inc hl ; $73a2: $23 inc hl ; $73a3: $23 inc hl ; $73a4: $23 inc hl ; $73a5: $23 inc hl ; $73a6: $23 inc hl ; $73a7: $23 inc hl ; $73a8: $23 inc hl ; $73a9: $23 inc hl ; $73aa: $23 inc hl ; $73ab: $23 inc hl ; $73ac: $23 inc hl ; $73ad: $23 inc hl ; $73ae: $23 inc hl ; $73af: $23 inc hl ; $73b0: $23 jr_00a_73b1: inc hl ; $73b1: $23 jr_00a_73b2: dec l ; $73b2: $2d ld b, d ; $73b3: $42 jr z, jr_00a_73d9 ; $73b4: $28 $23 inc hl ; $73b6: $23 dec l ; $73b7: $2d dec bc ; $73b8: $0b dec bc ; $73b9: $0b dec bc ; $73ba: $0b dec bc ; $73bb: $0b dec bc ; $73bc: $0b dec bc ; $73bd: $0b dec bc ; $73be: $0b dec bc ; $73bf: $0b ld b, $42 ; $73c0: $06 $42 jr z, jr_00a_73e7 ; $73c2: $28 $23 inc hl ; $73c4: $23 dec l ; $73c5: $2d dec bc ; $73c6: $0b dec bc ; $73c7: $0b dec bc ; $73c8: $0b dec bc ; $73c9: $0b dec bc ; $73ca: $0b dec bc ; $73cb: $0b dec bc ; $73cc: $0b dec bc ; $73cd: $0b dec bc ; $73ce: $0b dec bc ; $73cf: $0b inc hl ; $73d0: $23 inc hl ; $73d1: $23 inc hl ; $73d2: $23 inc hl ; $73d3: $23 dec l ; $73d4: $2d dec bc ; $73d5: $0b dec bc ; $73d6: $0b dec bc ; $73d7: $0b dec bc ; $73d8: $0b jr_00a_73d9: dec bc ; $73d9: $0b dec bc ; $73da: $0b dec bc ; $73db: $0b dec bc ; $73dc: $0b dec bc ; $73dd: $0b dec bc ; $73de: $0b dec bc ; $73df: $0b inc hl ; $73e0: $23 inc hl ; $73e1: $23 inc hl ; $73e2: $23 inc hl ; $73e3: $23 dec l ; $73e4: $2d dec bc ; $73e5: $0b dec bc ; $73e6: $0b jr_00a_73e7: dec bc ; $73e7: $0b dec bc ; $73e8: $0b dec bc ; $73e9: $0b dec bc ; $73ea: $0b dec bc ; $73eb: $0b dec bc ; $73ec: $0b dec bc ; $73ed: $0b dec bc ; $73ee: $0b dec bc ; $73ef: $0b inc hl ; $73f0: $23 inc hl ; $73f1: $23 inc hl ; $73f2: $23 inc hl ; $73f3: $23 inc hl ; $73f4: $23 dec l ; $73f5: $2d dec bc ; $73f6: $0b dec bc ; $73f7: $0b dec bc ; $73f8: $0b dec bc ; $73f9: $0b dec bc ; $73fa: $0b dec bc ; $73fb: $0b jr z, jr_00a_7421 ; $73fc: $28 $23 inc hl ; $73fe: $23 inc hl ; $73ff: $23 dec bc ; $7400: $0b dec bc ; $7401: $0b dec bc ; $7402: $0b dec bc ; $7403: $0b dec bc ; $7404: $0b jr z, jr_00a_742a ; $7405: $28 $23 inc hl ; $7407: $23 inc hl ; $7408: $23 inc hl ; $7409: $23 inc hl ; $740a: $23 inc hl ; $740b: $23 inc hl ; $740c: $23 inc hl ; $740d: $23 inc hl ; $740e: $23 inc hl ; $740f: $23 dec bc ; $7410: $0b dec bc ; $7411: $0b dec bc ; $7412: $0b dec bc ; $7413: $0b dec bc ; $7414: $0b jr z, jr_00a_743a ; $7415: $28 $23 inc hl ; $7417: $23 inc hl ; $7418: $23 inc hl ; $7419: $23 dec l ; $741a: $2d ld b, d ; $741b: $42 jr z, jr_00a_7441 ; $741c: $28 $23 inc hl ; $741e: $23 inc hl ; $741f: $23 dec bc ; $7420: $0b jr_00a_7421: dec bc ; $7421: $0b dec bc ; $7422: $0b dec bc ; $7423: $0b dec bc ; $7424: $0b dec bc ; $7425: $0b dec e ; $7426: $1d jr z, @+$25 ; $7427: $28 $23 inc hl ; $7429: $23 jr_00a_742a: inc hl ; $742a: $23 inc hl ; $742b: $23 inc hl ; $742c: $23 inc hl ; $742d: $23 inc hl ; $742e: $23 inc hl ; $742f: $23 inc hl ; $7430: $23 dec l ; $7431: $2d dec bc ; $7432: $0b dec bc ; $7433: $0b dec bc ; $7434: $0b dec bc ; $7435: $0b dec bc ; $7436: $0b dec bc ; $7437: $0b dec bc ; $7438: $0b dec e ; $7439: $1d jr_00a_743a: jr z, jr_00a_745f ; $743a: $28 $23 inc hl ; $743c: $23 inc hl ; $743d: $23 inc hl ; $743e: $23 inc hl ; $743f: $23 dec bc ; $7440: $0b jr_00a_7441: dec bc ; $7441: $0b dec bc ; $7442: $0b dec bc ; $7443: $0b dec bc ; $7444: $0b dec bc ; $7445: $0b dec bc ; $7446: $0b dec bc ; $7447: $0b dec bc ; $7448: $0b dec bc ; $7449: $0b dec bc ; $744a: $0b jr z, @+$25 ; $744b: $28 $23 inc hl ; $744d: $23 inc hl ; $744e: $23 inc hl ; $744f: $23 dec bc ; $7450: $0b dec bc ; $7451: $0b dec bc ; $7452: $0b dec bc ; $7453: $0b dec bc ; $7454: $0b dec bc ; $7455: $0b dec bc ; $7456: $0b dec bc ; $7457: $0b dec bc ; $7458: $0b dec bc ; $7459: $0b dec bc ; $745a: $0b jr z, jr_00a_7480 ; $745b: $28 $23 inc hl ; $745d: $23 inc hl ; $745e: $23 jr_00a_745f: inc hl ; $745f: $23 dec bc ; $7460: $0b dec bc ; $7461: $0b dec bc ; $7462: $0b dec bc ; $7463: $0b dec bc ; $7464: $0b dec bc ; $7465: $0b dec bc ; $7466: $0b dec bc ; $7467: $0b dec bc ; $7468: $0b dec bc ; $7469: $0b dec bc ; $746a: $0b dec e ; $746b: $1d jr z, @+$2f ; $746c: $28 $2d ld b, d ; $746e: $42 jr z, jr_00a_747c ; $746f: $28 $0b dec bc ; $7471: $0b jr z, jr_00a_74a1 ; $7472: $28 $2d dec bc ; $7474: $0b dec bc ; $7475: $0b dec bc ; $7476: $0b dec bc ; $7477: $0b dec bc ; $7478: $0b dec bc ; $7479: $0b dec bc ; $747a: $0b dec bc ; $747b: $0b jr_00a_747c: jr z, jr_00a_74a1 ; $747c: $28 $23 inc hl ; $747e: $23 inc hl ; $747f: $23 jr_00a_7480: dec l ; $7480: $2d dec bc ; $7481: $0b dec bc ; $7482: $0b dec bc ; $7483: $0b dec bc ; $7484: $0b dec bc ; $7485: $0b dec bc ; $7486: $0b dec bc ; $7487: $0b dec bc ; $7488: $0b dec bc ; $7489: $0b dec bc ; $748a: $0b dec bc ; $748b: $0b jr z, jr_00a_74b1 ; $748c: $28 $23 inc hl ; $748e: $23 inc hl ; $748f: $23 dec bc ; $7490: $0b dec bc ; $7491: $0b dec bc ; $7492: $0b dec bc ; $7493: $0b dec bc ; $7494: $0b dec bc ; $7495: $0b jr z, jr_00a_74c5 ; $7496: $28 $2d dec bc ; $7498: $0b dec bc ; $7499: $0b jr z, jr_00a_74bf ; $749a: $28 $23 inc hl ; $749c: $23 inc hl ; $749d: $23 inc hl ; $749e: $23 inc hl ; $749f: $23 inc hl ; $74a0: $23 jr_00a_74a1: inc hl ; $74a1: $23 inc hl ; $74a2: $23 dec l ; $74a3: $2d dec bc ; $74a4: $0b dec bc ; $74a5: $0b dec bc ; $74a6: $0b dec bc ; $74a7: $0b dec bc ; $74a8: $0b dec bc ; $74a9: $0b jr z, jr_00a_74cf ; $74aa: $28 $23 dec l ; $74ac: $2d ld b, d ; $74ad: $42 jr z, jr_00a_74d3 ; $74ae: $28 $23 dec bc ; $74b0: $0b jr_00a_74b1: dec bc ; $74b1: $0b dec bc ; $74b2: $0b dec bc ; $74b3: $0b dec bc ; $74b4: $0b dec bc ; $74b5: $0b dec bc ; $74b6: $0b dec bc ; $74b7: $0b dec bc ; $74b8: $0b dec bc ; $74b9: $0b dec bc ; $74ba: $0b dec bc ; $74bb: $0b jr z, jr_00a_74e1 ; $74bc: $28 $23 inc hl ; $74be: $23 jr_00a_74bf: inc hl ; $74bf: $23 dec bc ; $74c0: $0b dec bc ; $74c1: $0b dec bc ; $74c2: $0b dec bc ; $74c3: $0b dec bc ; $74c4: $0b jr_00a_74c5: dec bc ; $74c5: $0b dec bc ; $74c6: $0b dec bc ; $74c7: $0b dec bc ; $74c8: $0b dec bc ; $74c9: $0b dec bc ; $74ca: $0b dec bc ; $74cb: $0b dec bc ; $74cc: $0b jr z, jr_00a_74f2 ; $74cd: $28 $23 jr_00a_74cf: inc hl ; $74cf: $23 dec bc ; $74d0: $0b dec bc ; $74d1: $0b dec bc ; $74d2: $0b jr_00a_74d3: dec bc ; $74d3: $0b dec bc ; $74d4: $0b dec bc ; $74d5: $0b dec bc ; $74d6: $0b dec bc ; $74d7: $0b dec bc ; $74d8: $0b dec bc ; $74d9: $0b dec bc ; $74da: $0b dec bc ; $74db: $0b dec bc ; $74dc: $0b jr z, jr_00a_7507 ; $74dd: $28 $28 inc hl ; $74df: $23 dec bc ; $74e0: $0b jr_00a_74e1: dec bc ; $74e1: $0b dec bc ; $74e2: $0b dec bc ; $74e3: $0b jr z, jr_00a_7509 ; $74e4: $28 $23 inc hl ; $74e6: $23 inc hl ; $74e7: $23 inc hl ; $74e8: $23 inc hl ; $74e9: $23 inc hl ; $74ea: $23 inc hl ; $74eb: $23 inc hl ; $74ec: $23 inc hl ; $74ed: $23 jr z, jr_00a_7513 ; $74ee: $28 $23 inc hl ; $74f0: $23 inc hl ; $74f1: $23 jr_00a_74f2: inc hl ; $74f2: $23 inc hl ; $74f3: $23 inc hl ; $74f4: $23 inc hl ; $74f5: $23 inc hl ; $74f6: $23 inc hl ; $74f7: $23 inc hl ; $74f8: $23 inc hl ; $74f9: $23 inc hl ; $74fa: $23 dec l ; $74fb: $2d ld b, d ; $74fc: $42 jr z, @+$25 ; $74fd: $28 $23 inc hl ; $74ff: $23 inc hl ; $7500: $23 dec l ; $7501: $2d ld b, d ; $7502: $42 jr z, jr_00a_7528 ; $7503: $28 $23 inc hl ; $7505: $23 dec l ; $7506: $2d jr_00a_7507: dec bc ; $7507: $0b dec bc ; $7508: $0b jr_00a_7509: dec bc ; $7509: $0b dec bc ; $750a: $0b jr z, jr_00a_7530 ; $750b: $28 $23 inc hl ; $750d: $23 inc hl ; $750e: $23 inc hl ; $750f: $23 inc hl ; $7510: $23 inc hl ; $7511: $23 inc hl ; $7512: $23 jr_00a_7513: inc hl ; $7513: $23 dec l ; $7514: $2d dec bc ; $7515: $0b dec bc ; $7516: $0b dec bc ; $7517: $0b dec bc ; $7518: $0b dec bc ; $7519: $0b dec bc ; $751a: $0b dec bc ; $751b: $0b dec bc ; $751c: $0b ld b, $42 ; $751d: $06 $42 jr z, jr_00a_7563 ; $751f: $28 $42 jr z, jr_00a_7546 ; $7521: $28 $23 inc hl ; $7523: $23 dec l ; $7524: $2d dec bc ; $7525: $0b dec bc ; $7526: $0b dec bc ; $7527: $0b jr_00a_7528: dec bc ; $7528: $0b dec bc ; $7529: $0b dec bc ; $752a: $0b dec bc ; $752b: $0b dec bc ; $752c: $0b jr z, jr_00a_7552 ; $752d: $28 $23 inc hl ; $752f: $23 jr_00a_7530: inc hl ; $7530: $23 inc hl ; $7531: $23 dec l ; $7532: $2d ld b, d ; $7533: $42 ld b, $0b ; $7534: $06 $0b dec bc ; $7536: $0b dec bc ; $7537: $0b ld b, $0b ; $7538: $06 $0b dec bc ; $753a: $0b dec bc ; $753b: $0b dec bc ; $753c: $0b jr z, jr_00a_7562 ; $753d: $28 $23 inc hl ; $753f: $23 inc hl ; $7540: $23 inc hl ; $7541: $23 inc hl ; $7542: $23 inc hl ; $7543: $23 dec l ; $7544: $2d dec bc ; $7545: $0b jr_00a_7546: dec bc ; $7546: $0b jr z, jr_00a_756c ; $7547: $28 $23 dec l ; $7549: $2d dec bc ; $754a: $0b dec bc ; $754b: $0b dec bc ; $754c: $0b dec bc ; $754d: $0b jr z, @+$25 ; $754e: $28 $23 inc hl ; $7550: $23 inc hl ; $7551: $23 jr_00a_7552: inc hl ; $7552: $23 dec l ; $7553: $2d dec bc ; $7554: $0b dec bc ; $7555: $0b dec bc ; $7556: $0b dec bc ; $7557: $0b dec bc ; $7558: $0b dec bc ; $7559: $0b dec bc ; $755a: $0b dec bc ; $755b: $0b dec bc ; $755c: $0b dec bc ; $755d: $0b jr z, jr_00a_7583 ; $755e: $28 $23 inc hl ; $7560: $23 inc hl ; $7561: $23 jr_00a_7562: inc hl ; $7562: $23 jr_00a_7563: dec l ; $7563: $2d dec bc ; $7564: $0b dec bc ; $7565: $0b dec bc ; $7566: $0b dec bc ; $7567: $0b dec bc ; $7568: $0b dec bc ; $7569: $0b dec bc ; $756a: $0b dec bc ; $756b: $0b jr_00a_756c: dec bc ; $756c: $0b dec bc ; $756d: $0b jr z, jr_00a_7593 ; $756e: $28 $23 dec l ; $7570: $2d ld b, d ; $7571: $42 jr z, jr_00a_7597 ; $7572: $28 $23 inc hl ; $7574: $23 dec l ; $7575: $2d dec bc ; $7576: $0b dec bc ; $7577: $0b dec bc ; $7578: $0b dec bc ; $7579: $0b jr z, jr_00a_759f ; $757a: $28 $23 inc hl ; $757c: $23 inc hl ; $757d: $23 inc hl ; $757e: $23 inc hl ; $757f: $23 inc hl ; $7580: $23 inc hl ; $7581: $23 inc hl ; $7582: $23 jr_00a_7583: dec l ; $7583: $2d dec bc ; $7584: $0b dec bc ; $7585: $0b dec bc ; $7586: $0b dec bc ; $7587: $0b dec bc ; $7588: $0b jr z, jr_00a_75ae ; $7589: $28 $23 inc hl ; $758b: $23 inc hl ; $758c: $23 dec l ; $758d: $2d ld b, d ; $758e: $42 jr z, jr_00a_75b4 ; $758f: $28 $23 dec l ; $7591: $2d dec bc ; $7592: $0b jr_00a_7593: dec bc ; $7593: $0b dec bc ; $7594: $0b dec bc ; $7595: $0b dec bc ; $7596: $0b jr_00a_7597: dec bc ; $7597: $0b dec bc ; $7598: $0b dec bc ; $7599: $0b dec bc ; $759a: $0b dec bc ; $759b: $0b jr z, jr_00a_75c1 ; $759c: $28 $23 inc hl ; $759e: $23 jr_00a_759f: inc hl ; $759f: $23 inc hl ; $75a0: $23 dec l ; $75a1: $2d dec bc ; $75a2: $0b dec bc ; $75a3: $0b dec bc ; $75a4: $0b dec bc ; $75a5: $0b dec bc ; $75a6: $0b dec bc ; $75a7: $0b dec bc ; $75a8: $0b dec bc ; $75a9: $0b dec bc ; $75aa: $0b dec bc ; $75ab: $0b ld b, $42 ; $75ac: $06 $42 jr_00a_75ae: inc hl ; $75ae: $23 inc hl ; $75af: $23 inc hl ; $75b0: $23 dec l ; $75b1: $2d dec bc ; $75b2: $0b dec bc ; $75b3: $0b jr_00a_75b4: dec bc ; $75b4: $0b dec bc ; $75b5: $0b ld b, $0b ; $75b6: $06 $0b dec bc ; $75b8: $0b dec bc ; $75b9: $0b dec bc ; $75ba: $0b dec bc ; $75bb: $0b jr z, jr_00a_75e1 ; $75bc: $28 $23 inc hl ; $75be: $23 inc hl ; $75bf: $23 inc hl ; $75c0: $23 jr_00a_75c1: inc hl ; $75c1: $23 dec l ; $75c2: $2d dec bc ; $75c3: $0b dec bc ; $75c4: $0b jr z, jr_00a_75ea ; $75c5: $28 $23 dec l ; $75c7: $2d dec bc ; $75c8: $0b dec bc ; $75c9: $0b dec bc ; $75ca: $0b dec bc ; $75cb: $0b dec bc ; $75cc: $0b jr z, jr_00a_75f2 ; $75cd: $28 $23 inc hl ; $75cf: $23 dec l ; $75d0: $2d ld b, d ; $75d1: $42 ld b, $0b ; $75d2: $06 $0b dec bc ; $75d4: $0b dec bc ; $75d5: $0b dec bc ; $75d6: $0b dec bc ; $75d7: $0b dec bc ; $75d8: $0b dec bc ; $75d9: $0b dec bc ; $75da: $0b dec bc ; $75db: $0b dec bc ; $75dc: $0b jr z, @+$25 ; $75dd: $28 $23 inc hl ; $75df: $23 inc hl ; $75e0: $23 jr_00a_75e1: inc hl ; $75e1: $23 dec l ; $75e2: $2d dec bc ; $75e3: $0b dec bc ; $75e4: $0b dec bc ; $75e5: $0b dec bc ; $75e6: $0b dec bc ; $75e7: $0b dec bc ; $75e8: $0b dec bc ; $75e9: $0b jr_00a_75ea: dec bc ; $75ea: $0b dec bc ; $75eb: $0b dec bc ; $75ec: $0b ld b, $42 ; $75ed: $06 $42 jr z, @+$25 ; $75ef: $28 $23 inc hl ; $75f1: $23 jr_00a_75f2: inc hl ; $75f2: $23 inc hl ; $75f3: $23 inc hl ; $75f4: $23 dec l ; $75f5: $2d dec bc ; $75f6: $0b dec bc ; $75f7: $0b dec bc ; $75f8: $0b dec bc ; $75f9: $0b jr z, @+$25 ; $75fa: $28 $23 inc hl ; $75fc: $23 inc hl ; $75fd: $23 inc hl ; $75fe: $23 inc hl ; $75ff: $23 ld hl, $2121 ; $7600: $21 $21 $21 dec hl ; $7603: $2b ld b, b ; $7604: $40 ld h, $21 ; $7605: $26 $21 ld hl, $2b21 ; $7607: $21 $21 $2b ld b, b ; $760a: $40 ld h, $21 ; $760b: $26 $21 dec hl ; $760d: $2b add hl, bc ; $760e: $09 add hl, bc ; $760f: $09 ld hl, $2121 ; $7610: $21 $21 $21 ld hl, $2121 ; $7613: $21 $21 $21 dec hl ; $7616: $2b ld b, b ; $7617: $40 ld h, $21 ; $7618: $26 $21 ld hl, $2121 ; $761a: $21 $21 $21 ld hl, $2121 ; $761d: $21 $21 $21 ld hl, $2121 ; $7620: $21 $21 $21 ld hl, $2121 ; $7623: $21 $21 $21 ld hl, $2121 ; $7626: $21 $21 $21 ld hl, $2121 ; $7629: $21 $21 $21 dec hl ; $762c: $2b ld b, b ; $762d: $40 ld h, $21 ; $762e: $26 $21 ld hl, $2b21 ; $7630: $21 $21 $2b dec a ; $7633: $3d dec a ; $7634: $3d ld h, $21 ; $7635: $26 $21 ld hl, $2121 ; $7637: $21 $21 $21 ld hl, $2121 ; $763a: $21 $21 $21 ld hl, $2121 ; $763d: $21 $21 $21 dec a ; $7640: $3d dec a ; $7641: $3d ld h, $21 ; $7642: $26 $21 ld hl, $2121 ; $7644: $21 $21 $21 ld hl, $3d2b ; $7647: $21 $2b $3d ld h, $21 ; $764a: $26 $21 ld hl, $2121 ; $764c: $21 $21 $21 ld hl, $2b21 ; $764f: $21 $21 $2b dec a ; $7652: $3d dec a ; $7653: $3d dec a ; $7654: $3d ld h, $2b ; $7655: $26 $2b dec a ; $7657: $3d dec a ; $7658: $3d dec a ; $7659: $3d dec a ; $765a: $3d dec a ; $765b: $3d inc b ; $765c: $04 dec a ; $765d: $3d dec a ; $765e: $3d ld hl, $3d3d ; $765f: $21 $3d $3d ld a, $09 ; $7662: $3e $09 add hl, bc ; $7664: $09 add hl, bc ; $7665: $09 add hl, bc ; $7666: $09 add hl, bc ; $7667: $09 add hl, bc ; $7668: $09 ld h, $21 ; $7669: $26 $21 ld hl, $2121 ; $766b: $21 $21 $21 ld hl, $0921 ; $766e: $21 $21 $09 add hl, bc ; $7671: $09 add hl, bc ; $7672: $09 add hl, bc ; $7673: $09 add hl, bc ; $7674: $09 add hl, bc ; $7675: $09 add hl, bc ; $7676: $09 add hl, bc ; $7677: $09 add hl, bc ; $7678: $09 ccf ; $7679: $3f dec a ; $767a: $3d dec a ; $767b: $3d dec a ; $767c: $3d dec a ; $767d: $3d dec a ; $767e: $3d dec a ; $767f: $3d add hl, bc ; $7680: $09 add hl, bc ; $7681: $09 add hl, bc ; $7682: $09 add hl, bc ; $7683: $09 add hl, bc ; $7684: $09 add hl, bc ; $7685: $09 add hl, bc ; $7686: $09 add hl, bc ; $7687: $09 add hl, bc ; $7688: $09 add hl, bc ; $7689: $09 add hl, bc ; $768a: $09 ccf ; $768b: $3f ld a, $09 ; $768c: $3e $09 add hl, bc ; $768e: $09 add hl, bc ; $768f: $09 add hl, bc ; $7690: $09 add hl, bc ; $7691: $09 add hl, bc ; $7692: $09 add hl, bc ; $7693: $09 add hl, bc ; $7694: $09 add hl, bc ; $7695: $09 add hl, bc ; $7696: $09 add hl, bc ; $7697: $09 add hl, bc ; $7698: $09 add hl, bc ; $7699: $09 add hl, bc ; $769a: $09 add hl, bc ; $769b: $09 add hl, bc ; $769c: $09 add hl, bc ; $769d: $09 add hl, bc ; $769e: $09 add hl, bc ; $769f: $09 ld hl, $3d2b ; $76a0: $21 $2b $3d dec a ; $76a3: $3d ld a, $09 ; $76a4: $3e $09 add hl, bc ; $76a6: $09 add hl, bc ; $76a7: $09 add hl, bc ; $76a8: $09 add hl, bc ; $76a9: $09 add hl, bc ; $76aa: $09 add hl, bc ; $76ab: $09 add hl, bc ; $76ac: $09 add hl, bc ; $76ad: $09 add hl, bc ; $76ae: $09 add hl, bc ; $76af: $09 ld hl, $2121 ; $76b0: $21 $21 $21 dec hl ; $76b3: $2b add hl, bc ; $76b4: $09 add hl, bc ; $76b5: $09 add hl, bc ; $76b6: $09 jr nc, jr_00a_76ea ; $76b7: $30 $31 add hl, bc ; $76b9: $09 add hl, bc ; $76ba: $09 add hl, bc ; $76bb: $09 add hl, bc ; $76bc: $09 add hl, bc ; $76bd: $09 add hl, bc ; $76be: $09 add hl, bc ; $76bf: $09 dec a ; $76c0: $3d dec a ; $76c1: $3d dec a ; $76c2: $3d dec a ; $76c3: $3d add hl, bc ; $76c4: $09 add hl, bc ; $76c5: $09 add hl, bc ; $76c6: $09 ld [hl-], a ; $76c7: $32 inc sp ; $76c8: $33 add hl, bc ; $76c9: $09 add hl, bc ; $76ca: $09 add hl, bc ; $76cb: $09 add hl, bc ; $76cc: $09 add hl, bc ; $76cd: $09 ccf ; $76ce: $3f dec a ; $76cf: $3d ld hl, $2b21 ; $76d0: $21 $21 $2b dec a ; $76d3: $3d dec a ; $76d4: $3d dec a ; $76d5: $3d dec a ; $76d6: $3d dec a ; $76d7: $3d dec a ; $76d8: $3d dec a ; $76d9: $3d dec a ; $76da: $3d ld a, $09 ; $76db: $3e $09 add hl, bc ; $76dd: $09 add hl, bc ; $76de: $09 add hl, bc ; $76df: $09 ld c, $0e ; $76e0: $0e $0e daa ; $76e2: $27 ld [hl+], a ; $76e3: $22 ld [hl+], a ; $76e4: $22 ld [hl+], a ; $76e5: $22 inc l ; $76e6: $2c ld a, [bc] ; $76e7: $0a ld a, [bc] ; $76e8: $0a ld a, [bc] ; $76e9: $0a jr_00a_76ea: ld a, [bc] ; $76ea: $0a ld a, [bc] ; $76eb: $0a ld a, [bc] ; $76ec: $0a ld a, [bc] ; $76ed: $0a ld a, [bc] ; $76ee: $0a ld a, [bc] ; $76ef: $0a inc hl ; $76f0: $23 dec l ; $76f1: $2d rrca ; $76f2: $0f rrca ; $76f3: $0f rrca ; $76f4: $0f jr z, jr_00a_771a ; $76f5: $28 $23 dec l ; $76f7: $2d rrca ; $76f8: $0f rrca ; $76f9: $0f jr z, jr_00a_771f ; $76fa: $28 $23 dec l ; $76fc: $2d dec bc ; $76fd: $0b dec bc ; $76fe: $0b dec bc ; $76ff: $0b rlca ; $7700: $07 rlca ; $7701: $07 rlca ; $7702: $07 rlca ; $7703: $07 rlca ; $7704: $07 rlca ; $7705: $07 rlca ; $7706: $07 rlca ; $7707: $07 rlca ; $7708: $07 rlca ; $7709: $07 rlca ; $770a: $07 rlca ; $770b: $07 rlca ; $770c: $07 rlca ; $770d: $07 rlca ; $770e: $07 rlca ; $770f: $07 rlca ; $7710: $07 rlca ; $7711: $07 rlca ; $7712: $07 rlca ; $7713: $07 rlca ; $7714: $07 rlca ; $7715: $07 rlca ; $7716: $07 rlca ; $7717: $07 rlca ; $7718: $07 rlca ; $7719: $07 jr_00a_771a: rlca ; $771a: $07 rlca ; $771b: $07 rlca ; $771c: $07 rlca ; $771d: $07 rlca ; $771e: $07 jr_00a_771f: rlca ; $771f: $07 inc l ; $7720: $2c inc l ; $7721: $2c inc l ; $7722: $2c inc l ; $7723: $2c inc l ; $7724: $2c inc l ; $7725: $2c inc l ; $7726: $2c inc l ; $7727: $2c inc l ; $7728: $2c inc l ; $7729: $2c inc l ; $772a: $2c inc l ; $772b: $2c inc l ; $772c: $2c inc l ; $772d: $2c rlca ; $772e: $07 rlca ; $772f: $07 inc l ; $7730: $2c inc l ; $7731: $2c inc l ; $7732: $2c inc l ; $7733: $2c inc l ; $7734: $2c inc l ; $7735: $2c inc l ; $7736: $2c inc l ; $7737: $2c inc l ; $7738: $2c inc l ; $7739: $2c inc l ; $773a: $2c inc l ; $773b: $2c inc l ; $773c: $2c inc l ; $773d: $2c rlca ; $773e: $07 rlca ; $773f: $07 inc l ; $7740: $2c inc l ; $7741: $2c inc l ; $7742: $2c inc l ; $7743: $2c inc l ; $7744: $2c inc l ; $7745: $2c inc l ; $7746: $2c inc l ; $7747: $2c inc l ; $7748: $2c inc l ; $7749: $2c inc l ; $774a: $2c inc l ; $774b: $2c inc l ; $774c: $2c inc l ; $774d: $2c rlca ; $774e: $07 rlca ; $774f: $07 inc l ; $7750: $2c inc l ; $7751: $2c inc l ; $7752: $2c inc l ; $7753: $2c inc l ; $7754: $2c inc l ; $7755: $2c inc l ; $7756: $2c inc l ; $7757: $2c inc l ; $7758: $2c inc l ; $7759: $2c inc l ; $775a: $2c inc l ; $775b: $2c inc l ; $775c: $2c inc l ; $775d: $2c rlca ; $775e: $07 rlca ; $775f: $07 inc l ; $7760: $2c inc l ; $7761: $2c inc l ; $7762: $2c inc l ; $7763: $2c inc l ; $7764: $2c inc l ; $7765: $2c inc l ; $7766: $2c inc l ; $7767: $2c inc l ; $7768: $2c inc l ; $7769: $2c inc l ; $776a: $2c inc l ; $776b: $2c inc l ; $776c: $2c inc l ; $776d: $2c rlca ; $776e: $07 rlca ; $776f: $07 inc l ; $7770: $2c inc l ; $7771: $2c inc l ; $7772: $2c inc l ; $7773: $2c inc l ; $7774: $2c inc l ; $7775: $2c inc l ; $7776: $2c inc l ; $7777: $2c inc l ; $7778: $2c inc l ; $7779: $2c inc l ; $777a: $2c inc l ; $777b: $2c inc l ; $777c: $2c inc l ; $777d: $2c rlca ; $777e: $07 rlca ; $777f: $07 inc l ; $7780: $2c inc l ; $7781: $2c inc l ; $7782: $2c inc l ; $7783: $2c inc l ; $7784: $2c inc l ; $7785: $2c inc l ; $7786: $2c inc l ; $7787: $2c inc l ; $7788: $2c inc l ; $7789: $2c inc l ; $778a: $2c inc l ; $778b: $2c inc l ; $778c: $2c inc l ; $778d: $2c rlca ; $778e: $07 rlca ; $778f: $07 inc l ; $7790: $2c inc l ; $7791: $2c inc l ; $7792: $2c inc l ; $7793: $2c inc l ; $7794: $2c inc l ; $7795: $2c inc l ; $7796: $2c inc l ; $7797: $2c inc l ; $7798: $2c inc l ; $7799: $2c inc l ; $779a: $2c inc l ; $779b: $2c inc l ; $779c: $2c inc l ; $779d: $2c rlca ; $779e: $07 rlca ; $779f: $07 inc l ; $77a0: $2c inc l ; $77a1: $2c inc l ; $77a2: $2c inc l ; $77a3: $2c inc l ; $77a4: $2c inc l ; $77a5: $2c inc l ; $77a6: $2c inc l ; $77a7: $2c inc l ; $77a8: $2c inc l ; $77a9: $2c inc l ; $77aa: $2c inc l ; $77ab: $2c inc l ; $77ac: $2c inc l ; $77ad: $2c rlca ; $77ae: $07 rlca ; $77af: $07 inc l ; $77b0: $2c inc l ; $77b1: $2c inc l ; $77b2: $2c inc l ; $77b3: $2c inc l ; $77b4: $2c inc l ; $77b5: $2c inc l ; $77b6: $2c inc l ; $77b7: $2c inc l ; $77b8: $2c inc l ; $77b9: $2c inc l ; $77ba: $2c inc l ; $77bb: $2c inc l ; $77bc: $2c inc l ; $77bd: $2c rlca ; $77be: $07 rlca ; $77bf: $07 inc l ; $77c0: $2c inc l ; $77c1: $2c inc l ; $77c2: $2c inc l ; $77c3: $2c inc l ; $77c4: $2c inc l ; $77c5: $2c inc l ; $77c6: $2c inc l ; $77c7: $2c inc l ; $77c8: $2c inc l ; $77c9: $2c inc l ; $77ca: $2c inc l ; $77cb: $2c inc l ; $77cc: $2c inc l ; $77cd: $2c rlca ; $77ce: $07 rlca ; $77cf: $07 inc l ; $77d0: $2c inc l ; $77d1: $2c inc l ; $77d2: $2c inc l ; $77d3: $2c inc l ; $77d4: $2c inc l ; $77d5: $2c inc l ; $77d6: $2c inc l ; $77d7: $2c inc l ; $77d8: $2c inc l ; $77d9: $2c inc l ; $77da: $2c inc l ; $77db: $2c inc l ; $77dc: $2c inc l ; $77dd: $2c rlca ; $77de: $07 rlca ; $77df: $07 inc l ; $77e0: $2c inc l ; $77e1: $2c inc l ; $77e2: $2c inc l ; $77e3: $2c inc l ; $77e4: $2c inc l ; $77e5: $2c inc l ; $77e6: $2c inc l ; $77e7: $2c inc l ; $77e8: $2c inc l ; $77e9: $2c inc l ; $77ea: $2c inc l ; $77eb: $2c inc l ; $77ec: $2c inc l ; $77ed: $2c rlca ; $77ee: $07 rlca ; $77ef: $07 rlca ; $77f0: $07 rlca ; $77f1: $07 rlca ; $77f2: $07 rlca ; $77f3: $07 rlca ; $77f4: $07 rlca ; $77f5: $07 rlca ; $77f6: $07 rlca ; $77f7: $07 rlca ; $77f8: $07 rlca ; $77f9: $07 rlca ; $77fa: $07 rlca ; $77fb: $07 rlca ; $77fc: $07 rlca ; $77fd: $07 rlca ; $77fe: $07 rlca ; $77ff: $07 inc hl ; $7800: $23 inc hl ; $7801: $23 inc hl ; $7802: $23 dec l ; $7803: $2d ld b, d ; $7804: $42 jr z, jr_00a_782a ; $7805: $28 $23 inc hl ; $7807: $23 inc hl ; $7808: $23 dec l ; $7809: $2d ld b, d ; $780a: $42 jr z, jr_00a_7830 ; $780b: $28 $23 dec l ; $780d: $2d dec bc ; $780e: $0b dec bc ; $780f: $0b inc hl ; $7810: $23 inc hl ; $7811: $23 inc hl ; $7812: $23 inc hl ; $7813: $23 inc hl ; $7814: $23 inc hl ; $7815: $23 dec l ; $7816: $2d ld b, d ; $7817: $42 jr z, jr_00a_783d ; $7818: $28 $23 inc hl ; $781a: $23 inc hl ; $781b: $23 inc hl ; $781c: $23 inc hl ; $781d: $23 inc hl ; $781e: $23 inc hl ; $781f: $23 inc hl ; $7820: $23 inc hl ; $7821: $23 inc hl ; $7822: $23 inc hl ; $7823: $23 inc hl ; $7824: $23 inc hl ; $7825: $23 inc hl ; $7826: $23 inc hl ; $7827: $23 inc hl ; $7828: $23 inc hl ; $7829: $23 jr_00a_782a: inc hl ; $782a: $23 inc hl ; $782b: $23 dec l ; $782c: $2d ld b, d ; $782d: $42 jr z, jr_00a_7853 ; $782e: $28 $23 jr_00a_7830: inc hl ; $7830: $23 inc hl ; $7831: $23 dec l ; $7832: $2d rrca ; $7833: $0f rrca ; $7834: $0f jr z, jr_00a_785a ; $7835: $28 $23 inc hl ; $7837: $23 inc hl ; $7838: $23 inc hl ; $7839: $23 inc hl ; $783a: $23 inc hl ; $783b: $23 inc hl ; $783c: $23 jr_00a_783d: inc hl ; $783d: $23 inc hl ; $783e: $23 inc hl ; $783f: $23 rrca ; $7840: $0f rrca ; $7841: $0f jr z, jr_00a_7867 ; $7842: $28 $23 inc hl ; $7844: $23 inc hl ; $7845: $23 inc hl ; $7846: $23 inc hl ; $7847: $23 dec l ; $7848: $2d rrca ; $7849: $0f jr z, jr_00a_786f ; $784a: $28 $23 inc hl ; $784c: $23 inc hl ; $784d: $23 inc hl ; $784e: $23 inc hl ; $784f: $23 inc hl ; $7850: $23 dec l ; $7851: $2d rrca ; $7852: $0f jr_00a_7853: rrca ; $7853: $0f rrca ; $7854: $0f jr z, jr_00a_7884 ; $7855: $28 $2d rrca ; $7857: $0f rrca ; $7858: $0f rrca ; $7859: $0f jr_00a_785a: rrca ; $785a: $0f rrca ; $785b: $0f ld b, $0f ; $785c: $06 $0f rrca ; $785e: $0f jr z, jr_00a_7870 ; $785f: $28 $0f rrca ; $7861: $0f ld [de], a ; $7862: $12 dec bc ; $7863: $0b dec bc ; $7864: $0b dec bc ; $7865: $0b dec bc ; $7866: $0b jr_00a_7867: dec bc ; $7867: $0b dec bc ; $7868: $0b jr z, jr_00a_788e ; $7869: $28 $23 inc hl ; $786b: $23 inc hl ; $786c: $23 inc hl ; $786d: $23 inc hl ; $786e: $23 jr_00a_786f: inc hl ; $786f: $23 jr_00a_7870: dec bc ; $7870: $0b dec bc ; $7871: $0b dec bc ; $7872: $0b dec bc ; $7873: $0b dec bc ; $7874: $0b dec bc ; $7875: $0b dec bc ; $7876: $0b dec bc ; $7877: $0b dec bc ; $7878: $0b inc d ; $7879: $14 rrca ; $787a: $0f rrca ; $787b: $0f rrca ; $787c: $0f rrca ; $787d: $0f rrca ; $787e: $0f rrca ; $787f: $0f dec bc ; $7880: $0b dec bc ; $7881: $0b dec bc ; $7882: $0b dec bc ; $7883: $0b jr_00a_7884: dec bc ; $7884: $0b dec bc ; $7885: $0b dec bc ; $7886: $0b dec bc ; $7887: $0b dec bc ; $7888: $0b dec bc ; $7889: $0b dec bc ; $788a: $0b inc d ; $788b: $14 ld [de], a ; $788c: $12 dec bc ; $788d: $0b jr_00a_788e: dec bc ; $788e: $0b dec bc ; $788f: $0b dec bc ; $7890: $0b dec bc ; $7891: $0b dec bc ; $7892: $0b dec bc ; $7893: $0b dec bc ; $7894: $0b dec bc ; $7895: $0b dec bc ; $7896: $0b dec bc ; $7897: $0b dec bc ; $7898: $0b dec bc ; $7899: $0b dec bc ; $789a: $0b dec bc ; $789b: $0b dec bc ; $789c: $0b dec bc ; $789d: $0b dec bc ; $789e: $0b dec bc ; $789f: $0b inc hl ; $78a0: $23 dec l ; $78a1: $2d rrca ; $78a2: $0f rrca ; $78a3: $0f ld [de], a ; $78a4: $12 dec bc ; $78a5: $0b dec bc ; $78a6: $0b dec bc ; $78a7: $0b dec bc ; $78a8: $0b dec bc ; $78a9: $0b dec bc ; $78aa: $0b dec bc ; $78ab: $0b dec bc ; $78ac: $0b dec bc ; $78ad: $0b dec bc ; $78ae: $0b dec bc ; $78af: $0b inc hl ; $78b0: $23 inc hl ; $78b1: $23 inc hl ; $78b2: $23 dec l ; $78b3: $2d dec bc ; $78b4: $0b dec bc ; $78b5: $0b dec bc ; $78b6: $0b jr c, jr_00a_78f2 ; $78b7: $38 $39 dec bc ; $78b9: $0b dec bc ; $78ba: $0b dec bc ; $78bb: $0b dec bc ; $78bc: $0b dec bc ; $78bd: $0b dec bc ; $78be: $0b dec bc ; $78bf: $0b rrca ; $78c0: $0f rrca ; $78c1: $0f rrca ; $78c2: $0f rrca ; $78c3: $0f dec bc ; $78c4: $0b dec bc ; $78c5: $0b dec bc ; $78c6: $0b ld a, [hl-] ; $78c7: $3a dec sp ; $78c8: $3b dec bc ; $78c9: $0b dec bc ; $78ca: $0b dec bc ; $78cb: $0b dec bc ; $78cc: $0b dec bc ; $78cd: $0b inc d ; $78ce: $14 rrca ; $78cf: $0f inc hl ; $78d0: $23 inc hl ; $78d1: $23 dec l ; $78d2: $2d rrca ; $78d3: $0f rrca ; $78d4: $0f rrca ; $78d5: $0f rrca ; $78d6: $0f rrca ; $78d7: $0f rrca ; $78d8: $0f rrca ; $78d9: $0f rrca ; $78da: $0f ld [de], a ; $78db: $12 dec bc ; $78dc: $0b dec bc ; $78dd: $0b dec bc ; $78de: $0b dec bc ; $78df: $0b rrca ; $78e0: $0f rrca ; $78e1: $0f jr z, jr_00a_7907 ; $78e2: $28 $23 inc hl ; $78e4: $23 inc hl ; $78e5: $23 dec l ; $78e6: $2d dec bc ; $78e7: $0b dec bc ; $78e8: $0b dec bc ; $78e9: $0b dec bc ; $78ea: $0b dec bc ; $78eb: $0b dec bc ; $78ec: $0b dec bc ; $78ed: $0b dec bc ; $78ee: $0b dec bc ; $78ef: $0b inc hl ; $78f0: $23 dec l ; $78f1: $2d jr_00a_78f2: rrca ; $78f2: $0f rrca ; $78f3: $0f rrca ; $78f4: $0f jr z, jr_00a_791a ; $78f5: $28 $23 dec l ; $78f7: $2d rrca ; $78f8: $0f rrca ; $78f9: $0f jr z, jr_00a_791f ; $78fa: $28 $23 dec l ; $78fc: $2d dec bc ; $78fd: $0b dec bc ; $78fe: $0b dec bc ; $78ff: $0b inc hl ; $7900: $23 inc hl ; $7901: $23 inc hl ; $7902: $23 inc hl ; $7903: $23 inc hl ; $7904: $23 inc hl ; $7905: $23 inc hl ; $7906: $23 jr_00a_7907: inc hl ; $7907: $23 inc hl ; $7908: $23 dec l ; $7909: $2d ld b, d ; $790a: $42 jr z, @+$25 ; $790b: $28 $23 inc hl ; $790d: $23 inc hl ; $790e: $23 inc hl ; $790f: $23 inc hl ; $7910: $23 inc hl ; $7911: $23 inc hl ; $7912: $23 inc hl ; $7913: $23 dec l ; $7914: $2d ld b, d ; $7915: $42 jr z, jr_00a_793b ; $7916: $28 $23 inc hl ; $7918: $23 inc hl ; $7919: $23 jr_00a_791a: inc hl ; $791a: $23 inc hl ; $791b: $23 inc hl ; $791c: $23 inc hl ; $791d: $23 inc hl ; $791e: $23 jr_00a_791f: inc hl ; $791f: $23 inc hl ; $7920: $23 inc hl ; $7921: $23 inc hl ; $7922: $23 inc hl ; $7923: $23 inc hl ; $7924: $23 inc hl ; $7925: $23 inc hl ; $7926: $23 inc hl ; $7927: $23 inc hl ; $7928: $23 inc hl ; $7929: $23 inc hl ; $792a: $23 inc hl ; $792b: $23 inc hl ; $792c: $23 dec l ; $792d: $2d ld b, d ; $792e: $42 jr z, jr_00a_795e ; $792f: $28 $2d ld b, d ; $7931: $42 jr z, jr_00a_7957 ; $7932: $28 $23 inc hl ; $7934: $23 inc hl ; $7935: $23 inc hl ; $7936: $23 dec l ; $7937: $2d ld b, d ; $7938: $42 jr z, jr_00a_795e ; $7939: $28 $23 jr_00a_793b: inc hl ; $793b: $23 inc hl ; $793c: $23 inc hl ; $793d: $23 inc hl ; $793e: $23 inc hl ; $793f: $23 inc hl ; $7940: $23 inc hl ; $7941: $23 inc hl ; $7942: $23 inc hl ; $7943: $23 inc hl ; $7944: $23 inc hl ; $7945: $23 inc hl ; $7946: $23 inc hl ; $7947: $23 inc hl ; $7948: $23 inc hl ; $7949: $23 inc hl ; $794a: $23 dec l ; $794b: $2d ld b, d ; $794c: $42 jr z, jr_00a_7972 ; $794d: $28 $23 inc hl ; $794f: $23 inc hl ; $7950: $23 inc hl ; $7951: $23 inc hl ; $7952: $23 inc hl ; $7953: $23 inc hl ; $7954: $23 inc hl ; $7955: $23 inc hl ; $7956: $23 jr_00a_7957: inc hl ; $7957: $23 inc hl ; $7958: $23 dec l ; $7959: $2d ld b, d ; $795a: $42 jr z, jr_00a_7980 ; $795b: $28 $23 inc hl ; $795d: $23 jr_00a_795e: inc hl ; $795e: $23 inc hl ; $795f: $23 inc hl ; $7960: $23 dec l ; $7961: $2d ld b, d ; $7962: $42 jr z, jr_00a_7988 ; $7963: $28 $23 inc hl ; $7965: $23 inc hl ; $7966: $23 inc hl ; $7967: $23 inc hl ; $7968: $23 inc hl ; $7969: $23 inc hl ; $796a: $23 inc hl ; $796b: $23 dec l ; $796c: $2d ld b, d ; $796d: $42 jr z, jr_00a_7993 ; $796e: $28 $23 inc hl ; $7970: $23 inc hl ; $7971: $23 jr_00a_7972: inc hl ; $7972: $23 inc hl ; $7973: $23 inc hl ; $7974: $23 inc hl ; $7975: $23 inc hl ; $7976: $23 inc hl ; $7977: $23 inc hl ; $7978: $23 inc hl ; $7979: $23 inc hl ; $797a: $23 inc hl ; $797b: $23 inc hl ; $797c: $23 inc hl ; $797d: $23 inc hl ; $797e: $23 inc hl ; $797f: $23 jr_00a_7980: inc hl ; $7980: $23 inc hl ; $7981: $23 inc hl ; $7982: $23 inc hl ; $7983: $23 inc hl ; $7984: $23 inc hl ; $7985: $23 inc hl ; $7986: $23 inc hl ; $7987: $23 jr_00a_7988: inc hl ; $7988: $23 inc hl ; $7989: $23 inc hl ; $798a: $23 inc hl ; $798b: $23 inc hl ; $798c: $23 inc hl ; $798d: $23 inc hl ; $798e: $23 inc hl ; $798f: $23 inc hl ; $7990: $23 inc hl ; $7991: $23 inc hl ; $7992: $23 jr_00a_7993: inc hl ; $7993: $23 inc hl ; $7994: $23 inc hl ; $7995: $23 inc hl ; $7996: $23 inc hl ; $7997: $23 dec l ; $7998: $2d ld b, d ; $7999: $42 jr z, jr_00a_79bf ; $799a: $28 $23 inc hl ; $799c: $23 dec l ; $799d: $2d ld b, d ; $799e: $42 jr z, jr_00a_79c4 ; $799f: $28 $23 inc hl ; $79a1: $23 inc hl ; $79a2: $23 inc hl ; $79a3: $23 inc hl ; $79a4: $23 dec l ; $79a5: $2d ld b, d ; $79a6: $42 jr z, jr_00a_79cc ; $79a7: $28 $23 inc hl ; $79a9: $23 inc hl ; $79aa: $23 inc hl ; $79ab: $23 inc hl ; $79ac: $23 inc hl ; $79ad: $23 inc hl ; $79ae: $23 inc hl ; $79af: $23 inc hl ; $79b0: $23 inc hl ; $79b1: $23 inc hl ; $79b2: $23 inc hl ; $79b3: $23 inc hl ; $79b4: $23 inc hl ; $79b5: $23 inc hl ; $79b6: $23 inc hl ; $79b7: $23 inc hl ; $79b8: $23 inc hl ; $79b9: $23 dec l ; $79ba: $2d ld b, d ; $79bb: $42 jr z, jr_00a_79e1 ; $79bc: $28 $23 inc hl ; $79be: $23 jr_00a_79bf: inc hl ; $79bf: $23 dec l ; $79c0: $2d ld b, d ; $79c1: $42 jr z, jr_00a_79e7 ; $79c2: $28 $23 jr_00a_79c4: inc hl ; $79c4: $23 inc hl ; $79c5: $23 inc hl ; $79c6: $23 inc hl ; $79c7: $23 inc hl ; $79c8: $23 inc hl ; $79c9: $23 inc hl ; $79ca: $23 inc hl ; $79cb: $23 jr_00a_79cc: dec l ; $79cc: $2d ld b, d ; $79cd: $42 jr z, jr_00a_79f3 ; $79ce: $28 $23 inc hl ; $79d0: $23 inc hl ; $79d1: $23 inc hl ; $79d2: $23 dec l ; $79d3: $2d ld b, d ; $79d4: $42 jr z, jr_00a_79fa ; $79d5: $28 $23 inc hl ; $79d7: $23 inc hl ; $79d8: $23 inc hl ; $79d9: $23 inc hl ; $79da: $23 inc hl ; $79db: $23 inc hl ; $79dc: $23 inc hl ; $79dd: $23 inc hl ; $79de: $23 inc hl ; $79df: $23 inc hl ; $79e0: $23 jr_00a_79e1: inc hl ; $79e1: $23 inc hl ; $79e2: $23 inc hl ; $79e3: $23 inc hl ; $79e4: $23 inc hl ; $79e5: $23 dec l ; $79e6: $2d jr_00a_79e7: ld b, d ; $79e7: $42 jr z, jr_00a_7a0d ; $79e8: $28 $23 inc hl ; $79ea: $23 inc hl ; $79eb: $23 inc hl ; $79ec: $23 inc hl ; $79ed: $23 inc hl ; $79ee: $23 inc hl ; $79ef: $23 inc hl ; $79f0: $23 inc hl ; $79f1: $23 inc hl ; $79f2: $23 jr_00a_79f3: inc hl ; $79f3: $23 inc hl ; $79f4: $23 inc hl ; $79f5: $23 inc hl ; $79f6: $23 inc hl ; $79f7: $23 inc hl ; $79f8: $23 dec l ; $79f9: $2d jr_00a_79fa: ld b, d ; $79fa: $42 jr z, jr_00a_7a20 ; $79fb: $28 $23 inc hl ; $79fd: $23 inc hl ; $79fe: $23 inc hl ; $79ff: $23 rlca ; $7a00: $07 rlca ; $7a01: $07 rlca ; $7a02: $07 rlca ; $7a03: $07 rlca ; $7a04: $07 rlca ; $7a05: $07 rlca ; $7a06: $07 rlca ; $7a07: $07 rlca ; $7a08: $07 rlca ; $7a09: $07 rlca ; $7a0a: $07 rlca ; $7a0b: $07 rlca ; $7a0c: $07 jr_00a_7a0d: rlca ; $7a0d: $07 rlca ; $7a0e: $07 rlca ; $7a0f: $07 rlca ; $7a10: $07 rlca ; $7a11: $07 rlca ; $7a12: $07 rlca ; $7a13: $07 rlca ; $7a14: $07 rlca ; $7a15: $07 rlca ; $7a16: $07 rlca ; $7a17: $07 rlca ; $7a18: $07 rlca ; $7a19: $07 rlca ; $7a1a: $07 rlca ; $7a1b: $07 rlca ; $7a1c: $07 rlca ; $7a1d: $07 rlca ; $7a1e: $07 rlca ; $7a1f: $07 jr_00a_7a20: rlca ; $7a20: $07 inc l ; $7a21: $2c inc l ; $7a22: $2c inc l ; $7a23: $2c inc l ; $7a24: $2c inc l ; $7a25: $2c inc l ; $7a26: $2c inc l ; $7a27: $2c inc l ; $7a28: $2c inc l ; $7a29: $2c inc l ; $7a2a: $2c inc l ; $7a2b: $2c inc l ; $7a2c: $2c inc l ; $7a2d: $2c inc l ; $7a2e: $2c inc l ; $7a2f: $2c rlca ; $7a30: $07 inc l ; $7a31: $2c inc l ; $7a32: $2c inc l ; $7a33: $2c inc l ; $7a34: $2c inc l ; $7a35: $2c inc l ; $7a36: $2c inc l ; $7a37: $2c inc l ; $7a38: $2c inc l ; $7a39: $2c inc l ; $7a3a: $2c inc l ; $7a3b: $2c inc l ; $7a3c: $2c inc l ; $7a3d: $2c inc l ; $7a3e: $2c inc l ; $7a3f: $2c rlca ; $7a40: $07 inc l ; $7a41: $2c inc l ; $7a42: $2c inc l ; $7a43: $2c inc l ; $7a44: $2c inc l ; $7a45: $2c inc l ; $7a46: $2c inc l ; $7a47: $2c inc l ; $7a48: $2c inc l ; $7a49: $2c inc l ; $7a4a: $2c inc l ; $7a4b: $2c inc l ; $7a4c: $2c inc l ; $7a4d: $2c inc l ; $7a4e: $2c inc l ; $7a4f: $2c rlca ; $7a50: $07 inc l ; $7a51: $2c inc l ; $7a52: $2c inc l ; $7a53: $2c inc l ; $7a54: $2c inc l ; $7a55: $2c inc l ; $7a56: $2c inc l ; $7a57: $2c inc l ; $7a58: $2c inc l ; $7a59: $2c inc l ; $7a5a: $2c inc l ; $7a5b: $2c inc l ; $7a5c: $2c inc l ; $7a5d: $2c inc l ; $7a5e: $2c inc l ; $7a5f: $2c rlca ; $7a60: $07 inc l ; $7a61: $2c inc l ; $7a62: $2c inc l ; $7a63: $2c inc l ; $7a64: $2c inc l ; $7a65: $2c inc l ; $7a66: $2c inc l ; $7a67: $2c inc l ; $7a68: $2c inc l ; $7a69: $2c inc l ; $7a6a: $2c inc l ; $7a6b: $2c inc l ; $7a6c: $2c inc l ; $7a6d: $2c inc l ; $7a6e: $2c inc l ; $7a6f: $2c ld [$0808], sp ; $7a70: $08 $08 $08 ld [$2c2c], sp ; $7a73: $08 $2c $2c inc l ; $7a76: $2c inc l ; $7a77: $2c inc l ; $7a78: $2c inc l ; $7a79: $2c inc l ; $7a7a: $2c inc l ; $7a7b: $2c inc l ; $7a7c: $2c inc l ; $7a7d: $2c inc l ; $7a7e: $2c inc l ; $7a7f: $2c ld [$0808], sp ; $7a80: $08 $08 $08 ld [$2c2c], sp ; $7a83: $08 $2c $2c inc l ; $7a86: $2c inc l ; $7a87: $2c inc l ; $7a88: $2c inc l ; $7a89: $2c inc l ; $7a8a: $2c inc l ; $7a8b: $2c inc l ; $7a8c: $2c inc l ; $7a8d: $2c inc l ; $7a8e: $2c inc l ; $7a8f: $2c ld [$0808], sp ; $7a90: $08 $08 $08 ld [$2c2c], sp ; $7a93: $08 $2c $2c inc l ; $7a96: $2c inc l ; $7a97: $2c inc l ; $7a98: $2c inc l ; $7a99: $2c inc l ; $7a9a: $2c inc l ; $7a9b: $2c inc l ; $7a9c: $2c inc l ; $7a9d: $2c inc l ; $7a9e: $2c inc l ; $7a9f: $2c rlca ; $7aa0: $07 inc l ; $7aa1: $2c inc l ; $7aa2: $2c inc l ; $7aa3: $2c inc l ; $7aa4: $2c inc l ; $7aa5: $2c inc l ; $7aa6: $2c inc l ; $7aa7: $2c inc l ; $7aa8: $2c inc l ; $7aa9: $2c inc l ; $7aaa: $2c inc l ; $7aab: $2c inc l ; $7aac: $2c inc l ; $7aad: $2c inc l ; $7aae: $2c inc l ; $7aaf: $2c rlca ; $7ab0: $07 inc l ; $7ab1: $2c inc l ; $7ab2: $2c inc l ; $7ab3: $2c inc l ; $7ab4: $2c inc l ; $7ab5: $2c inc l ; $7ab6: $2c inc l ; $7ab7: $2c inc l ; $7ab8: $2c inc l ; $7ab9: $2c inc l ; $7aba: $2c inc l ; $7abb: $2c inc l ; $7abc: $2c inc l ; $7abd: $2c inc l ; $7abe: $2c inc l ; $7abf: $2c rlca ; $7ac0: $07 inc l ; $7ac1: $2c inc l ; $7ac2: $2c inc l ; $7ac3: $2c inc l ; $7ac4: $2c inc l ; $7ac5: $2c inc l ; $7ac6: $2c inc l ; $7ac7: $2c inc l ; $7ac8: $2c inc l ; $7ac9: $2c inc l ; $7aca: $2c inc l ; $7acb: $2c inc l ; $7acc: $2c inc l ; $7acd: $2c inc l ; $7ace: $2c inc l ; $7acf: $2c rlca ; $7ad0: $07 inc l ; $7ad1: $2c inc l ; $7ad2: $2c inc l ; $7ad3: $2c inc l ; $7ad4: $2c inc l ; $7ad5: $2c inc l ; $7ad6: $2c inc l ; $7ad7: $2c inc l ; $7ad8: $2c inc l ; $7ad9: $2c inc l ; $7ada: $2c inc l ; $7adb: $2c inc l ; $7adc: $2c inc l ; $7add: $2c inc l ; $7ade: $2c inc l ; $7adf: $2c rlca ; $7ae0: $07 inc l ; $7ae1: $2c inc l ; $7ae2: $2c inc l ; $7ae3: $2c inc l ; $7ae4: $2c inc l ; $7ae5: $2c inc l ; $7ae6: $2c inc l ; $7ae7: $2c inc l ; $7ae8: $2c inc l ; $7ae9: $2c inc l ; $7aea: $2c inc l ; $7aeb: $2c inc l ; $7aec: $2c inc l ; $7aed: $2c inc l ; $7aee: $2c inc l ; $7aef: $2c rlca ; $7af0: $07 rlca ; $7af1: $07 rlca ; $7af2: $07 rlca ; $7af3: $07 rlca ; $7af4: $07 rlca ; $7af5: $07 rlca ; $7af6: $07 rlca ; $7af7: $07 rlca ; $7af8: $07 rlca ; $7af9: $07 rlca ; $7afa: $07 rlca ; $7afb: $07 rlca ; $7afc: $07 rlca ; $7afd: $07 rlca ; $7afe: $07 rlca ; $7aff: $07 dec bc ; $7b00: $0b dec bc ; $7b01: $0b jr z, @+$25 ; $7b02: $28 $23 inc hl ; $7b04: $23 inc hl ; $7b05: $23 inc hl ; $7b06: $23 dec l ; $7b07: $2d ld b, d ; $7b08: $42 jr z, jr_00a_7b2e ; $7b09: $28 $23 inc hl ; $7b0b: $23 ld b, $0f ; $7b0c: $06 $0f ld b, $0f ; $7b0e: $06 $0f inc hl ; $7b10: $23 inc hl ; $7b11: $23 inc hl ; $7b12: $23 inc hl ; $7b13: $23 dec l ; $7b14: $2d ld b, d ; $7b15: $42 jr z, jr_00a_7b3b ; $7b16: $28 $23 dec l ; $7b18: $2d rrca ; $7b19: $0f jr z, jr_00a_7b49 ; $7b1a: $28 $2d rrca ; $7b1c: $0f rrca ; $7b1d: $0f rrca ; $7b1e: $0f jr z, jr_00a_7b4e ; $7b1f: $28 $2d ld b, d ; $7b21: $42 jr z, jr_00a_7b47 ; $7b22: $28 $23 dec l ; $7b24: $2d rrca ; $7b25: $0f jr z, jr_00a_7b4b ; $7b26: $28 $23 inc hl ; $7b28: $23 dec l ; $7b29: $2d ld b, d ; $7b2a: $42 jr z, jr_00a_7b5a ; $7b2b: $28 $2d rrca ; $7b2d: $0f jr_00a_7b2e: rrca ; $7b2e: $0f rrca ; $7b2f: $0f inc hl ; $7b30: $23 inc hl ; $7b31: $23 inc hl ; $7b32: $23 inc hl ; $7b33: $23 inc hl ; $7b34: $23 dec l ; $7b35: $2d rrca ; $7b36: $0f rrca ; $7b37: $0f jr z, jr_00a_7b5d ; $7b38: $28 $23 dec l ; $7b3a: $2d jr_00a_7b3b: rrca ; $7b3b: $0f jr z, jr_00a_7b6b ; $7b3c: $28 $2d rrca ; $7b3e: $0f rrca ; $7b3f: $0f inc hl ; $7b40: $23 inc hl ; $7b41: $23 inc hl ; $7b42: $23 dec l ; $7b43: $2d ld b, d ; $7b44: $42 jr z, jr_00a_7b6a ; $7b45: $28 $23 jr_00a_7b47: dec l ; $7b47: $2d rrca ; $7b48: $0f jr_00a_7b49: rrca ; $7b49: $0f rrca ; $7b4a: $0f jr_00a_7b4b: rrca ; $7b4b: $0f rrca ; $7b4c: $0f rrca ; $7b4d: $0f jr_00a_7b4e: rrca ; $7b4e: $0f rrca ; $7b4f: $0f dec l ; $7b50: $2d ld b, d ; $7b51: $42 jr z, jr_00a_7b77 ; $7b52: $28 $23 dec l ; $7b54: $2d rrca ; $7b55: $0f ld b, $0f ; $7b56: $06 $0f jr z, jr_00a_7b87 ; $7b58: $28 $2d jr_00a_7b5a: rrca ; $7b5a: $0f rrca ; $7b5b: $0f rrca ; $7b5c: $0f jr_00a_7b5d: rrca ; $7b5d: $0f rrca ; $7b5e: $0f rrca ; $7b5f: $0f inc hl ; $7b60: $23 inc hl ; $7b61: $23 dec l ; $7b62: $2d rrca ; $7b63: $0f rrca ; $7b64: $0f jr z, jr_00a_7b94 ; $7b65: $28 $2d rrca ; $7b67: $0f rrca ; $7b68: $0f rrca ; $7b69: $0f jr_00a_7b6a: ld [de], a ; $7b6a: $12 jr_00a_7b6b: dec bc ; $7b6b: $0b dec bc ; $7b6c: $0b inc d ; $7b6d: $14 rrca ; $7b6e: $0f rrca ; $7b6f: $0f inc hl ; $7b70: $23 inc hl ; $7b71: $23 inc hl ; $7b72: $23 inc hl ; $7b73: $23 dec l ; $7b74: $2d rrca ; $7b75: $0f rrca ; $7b76: $0f jr_00a_7b77: ld [de], a ; $7b77: $12 dec bc ; $7b78: $0b dec bc ; $7b79: $0b dec bc ; $7b7a: $0b dec bc ; $7b7b: $0b dec bc ; $7b7c: $0b dec bc ; $7b7d: $0b dec bc ; $7b7e: $0b dec bc ; $7b7f: $0b dec bc ; $7b80: $0b dec bc ; $7b81: $0b dec bc ; $7b82: $0b dec bc ; $7b83: $0b dec bc ; $7b84: $0b dec bc ; $7b85: $0b dec bc ; $7b86: $0b jr_00a_7b87: dec bc ; $7b87: $0b dec bc ; $7b88: $0b dec bc ; $7b89: $0b dec bc ; $7b8a: $0b dec bc ; $7b8b: $0b dec bc ; $7b8c: $0b dec bc ; $7b8d: $0b dec bc ; $7b8e: $0b dec bc ; $7b8f: $0b dec bc ; $7b90: $0b dec bc ; $7b91: $0b dec bc ; $7b92: $0b dec bc ; $7b93: $0b jr_00a_7b94: dec bc ; $7b94: $0b dec bc ; $7b95: $0b dec bc ; $7b96: $0b dec bc ; $7b97: $0b dec bc ; $7b98: $0b dec bc ; $7b99: $0b dec bc ; $7b9a: $0b dec bc ; $7b9b: $0b dec bc ; $7b9c: $0b dec bc ; $7b9d: $0b dec bc ; $7b9e: $0b dec bc ; $7b9f: $0b dec bc ; $7ba0: $0b dec bc ; $7ba1: $0b dec bc ; $7ba2: $0b dec bc ; $7ba3: $0b dec bc ; $7ba4: $0b dec bc ; $7ba5: $0b dec bc ; $7ba6: $0b dec bc ; $7ba7: $0b dec bc ; $7ba8: $0b dec bc ; $7ba9: $0b dec bc ; $7baa: $0b inc d ; $7bab: $14 rrca ; $7bac: $0f rrca ; $7bad: $0f rrca ; $7bae: $0f rrca ; $7baf: $0f dec bc ; $7bb0: $0b dec bc ; $7bb1: $0b dec bc ; $7bb2: $0b dec bc ; $7bb3: $0b dec bc ; $7bb4: $0b dec bc ; $7bb5: $0b dec bc ; $7bb6: $0b dec bc ; $7bb7: $0b dec bc ; $7bb8: $0b dec bc ; $7bb9: $0b inc d ; $7bba: $14 rrca ; $7bbb: $0f rrca ; $7bbc: $0f ld b, $0f ; $7bbd: $06 $0f rrca ; $7bbf: $0f dec bc ; $7bc0: $0b dec bc ; $7bc1: $0b dec bc ; $7bc2: $0b dec bc ; $7bc3: $0b dec bc ; $7bc4: $0b dec bc ; $7bc5: $0b dec bc ; $7bc6: $0b dec bc ; $7bc7: $0b dec bc ; $7bc8: $0b dec bc ; $7bc9: $0b jr z, @+$2f ; $7bca: $28 $2d rrca ; $7bcc: $0f rrca ; $7bcd: $0f rrca ; $7bce: $0f jr z, @+$0d ; $7bcf: $28 $0b dec bc ; $7bd1: $0b dec bc ; $7bd2: $0b dec bc ; $7bd3: $0b dec bc ; $7bd4: $0b dec bc ; $7bd5: $0b dec bc ; $7bd6: $0b ld b, $0f ; $7bd7: $06 $0f rrca ; $7bd9: $0f rrca ; $7bda: $0f jr z, @+$2f ; $7bdb: $28 $2d rrca ; $7bdd: $0f rrca ; $7bde: $0f rrca ; $7bdf: $0f dec bc ; $7be0: $0b dec bc ; $7be1: $0b dec bc ; $7be2: $0b dec bc ; $7be3: $0b dec bc ; $7be4: $0b inc d ; $7be5: $14 rrca ; $7be6: $0f rrca ; $7be7: $0f rrca ; $7be8: $0f jr z, @+$2a ; $7be9: $28 $28 dec l ; $7beb: $2d rrca ; $7bec: $0f rrca ; $7bed: $0f rrca ; $7bee: $0f rrca ; $7bef: $0f inc hl ; $7bf0: $23 inc hl ; $7bf1: $23 inc hl ; $7bf2: $23 inc hl ; $7bf3: $23 inc hl ; $7bf4: $23 inc hl ; $7bf5: $23 dec l ; $7bf6: $2d rrca ; $7bf7: $0f jr z, @+$2f ; $7bf8: $28 $2d rrca ; $7bfa: $0f jr z, jr_00a_7c20 ; $7bfb: $28 $23 dec l ; $7bfd: $2d rrca ; $7bfe: $0f rrca ; $7bff: $0f ld hl, $2121 ; $7c00: $21 $21 $21 ld hl, $402b ; $7c03: $21 $2b $40 ld h, $21 ; $7c06: $26 $21 ld hl, $2121 ; $7c08: $21 $21 $21 ld hl, $2121 ; $7c0b: $21 $21 $21 ld hl, $2121 ; $7c0e: $21 $21 $21 ld hl, $2121 ; $7c11: $21 $21 $21 ld hl, $2121 ; $7c14: $21 $21 $21 ld hl, $2b21 ; $7c17: $21 $21 $2b ld b, b ; $7c1a: $40 ld h, $21 ; $7c1b: $26 $21 ld hl, $2121 ; $7c1d: $21 $21 $21 jr_00a_7c20: ld hl, $402b ; $7c20: $21 $2b $40 ld h, $21 ; $7c23: $26 $21 ld hl, $2121 ; $7c25: $21 $21 $21 ld hl, $2121 ; $7c28: $21 $21 $21 ld hl, $2121 ; $7c2b: $21 $21 $21 ld hl, $2121 ; $7c2e: $21 $21 $21 ld hl, $2121 ; $7c31: $21 $21 $21 ld hl, $2121 ; $7c34: $21 $21 $21 ld hl, $2121 ; $7c37: $21 $21 $21 ld hl, $2121 ; $7c3a: $21 $21 $21 dec hl ; $7c3d: $2b ld b, b ; $7c3e: $40 ld h, $21 ; $7c3f: $26 $21 dec hl ; $7c41: $2b inc e ; $7c42: $1c add hl, bc ; $7c43: $09 dec de ; $7c44: $1b add hl, bc ; $7c45: $09 dec de ; $7c46: $1b ld h, $21 ; $7c47: $26 $21 ld hl, $1c2b ; $7c49: $21 $2b $1c dec de ; $7c4c: $1b ld h, $21 ; $7c4d: $26 $21 ld hl, $2b21 ; $7c4f: $21 $21 $2b add hl, bc ; $7c52: $09 add hl, bc ; $7c53: $09 add hl, bc ; $7c54: $09 add hl, bc ; $7c55: $09 add hl, bc ; $7c56: $09 add hl, bc ; $7c57: $09 dec de ; $7c58: $1b inc b ; $7c59: $04 inc e ; $7c5a: $1c add hl, bc ; $7c5b: $09 add hl, bc ; $7c5c: $09 ld h, $21 ; $7c5d: $26 $21 ld hl, $2b21 ; $7c5f: $21 $21 $2b add hl, bc ; $7c62: $09 add hl, bc ; $7c63: $09 add hl, bc ; $7c64: $09 add hl, bc ; $7c65: $09 add hl, bc ; $7c66: $09 add hl, bc ; $7c67: $09 add hl, bc ; $7c68: $09 add hl, bc ; $7c69: $09 add hl, bc ; $7c6a: $09 add hl, bc ; $7c6b: $09 add hl, bc ; $7c6c: $09 dec de ; $7c6d: $1b ld h, $21 ; $7c6e: $26 $21 add hl, bc ; $7c70: $09 add hl, bc ; $7c71: $09 add hl, bc ; $7c72: $09 add hl, bc ; $7c73: $09 add hl, bc ; $7c74: $09 add hl, bc ; $7c75: $09 add hl, bc ; $7c76: $09 add hl, bc ; $7c77: $09 add hl, bc ; $7c78: $09 add hl, bc ; $7c79: $09 add hl, bc ; $7c7a: $09 add hl, bc ; $7c7b: $09 add hl, bc ; $7c7c: $09 add hl, bc ; $7c7d: $09 ld h, $21 ; $7c7e: $26 $21 add hl, bc ; $7c80: $09 add hl, bc ; $7c81: $09 add hl, bc ; $7c82: $09 add hl, bc ; $7c83: $09 add hl, bc ; $7c84: $09 add hl, bc ; $7c85: $09 add hl, bc ; $7c86: $09 add hl, bc ; $7c87: $09 add hl, bc ; $7c88: $09 add hl, bc ; $7c89: $09 add hl, bc ; $7c8a: $09 add hl, bc ; $7c8b: $09 add hl, bc ; $7c8c: $09 add hl, bc ; $7c8d: $09 dec de ; $7c8e: $1b add hl, bc ; $7c8f: $09 add hl, bc ; $7c90: $09 add hl, bc ; $7c91: $09 add hl, bc ; $7c92: $09 add hl, bc ; $7c93: $09 add hl, bc ; $7c94: $09 add hl, bc ; $7c95: $09 add hl, bc ; $7c96: $09 add hl, bc ; $7c97: $09 add hl, bc ; $7c98: $09 add hl, bc ; $7c99: $09 add hl, bc ; $7c9a: $09 add hl, bc ; $7c9b: $09 add hl, bc ; $7c9c: $09 add hl, bc ; $7c9d: $09 add hl, bc ; $7c9e: $09 add hl, bc ; $7c9f: $09 ld hl, $2121 ; $7ca0: $21 $21 $21 ld hl, $2b21 ; $7ca3: $21 $21 $2b add hl, bc ; $7ca6: $09 add hl, bc ; $7ca7: $09 add hl, bc ; $7ca8: $09 add hl, bc ; $7ca9: $09 add hl, bc ; $7caa: $09 add hl, bc ; $7cab: $09 add hl, bc ; $7cac: $09 add hl, bc ; $7cad: $09 add hl, bc ; $7cae: $09 add hl, bc ; $7caf: $09 ld hl, $2121 ; $7cb0: $21 $21 $21 ld hl, $2121 ; $7cb3: $21 $21 $21 ld hl, $2121 ; $7cb6: $21 $21 $21 dec hl ; $7cb9: $2b add hl, bc ; $7cba: $09 add hl, bc ; $7cbb: $09 add hl, bc ; $7cbc: $09 add hl, bc ; $7cbd: $09 add hl, bc ; $7cbe: $09 add hl, bc ; $7cbf: $09 ld hl, $402b ; $7cc0: $21 $2b $40 ld h, $21 ; $7cc3: $26 $21 ld hl, $402b ; $7cc5: $21 $2b $40 ld h, $2b ; $7cc8: $26 $2b add hl, bc ; $7cca: $09 add hl, bc ; $7ccb: $09 add hl, bc ; $7ccc: $09 add hl, bc ; $7ccd: $09 add hl, bc ; $7cce: $09 add hl, bc ; $7ccf: $09 ld hl, $2121 ; $7cd0: $21 $21 $21 ld hl, $2121 ; $7cd3: $21 $21 $21 ld hl, $2121 ; $7cd6: $21 $21 $21 dec hl ; $7cd9: $2b add hl, bc ; $7cda: $09 add hl, bc ; $7cdb: $09 add hl, bc ; $7cdc: $09 add hl, bc ; $7cdd: $09 add hl, bc ; $7cde: $09 add hl, bc ; $7cdf: $09 ld hl, $2121 ; $7ce0: $21 $21 $21 dec hl ; $7ce3: $2b ld b, b ; $7ce4: $40 ld h, $21 ; $7ce5: $26 $21 ld hl, $2121 ; $7ce7: $21 $21 $21 ld hl, $092b ; $7cea: $21 $2b $09 add hl, bc ; $7ced: $09 add hl, bc ; $7cee: $09 add hl, bc ; $7cef: $09 ld hl, $2121 ; $7cf0: $21 $21 $21 ld hl, $2121 ; $7cf3: $21 $21 $21 dec hl ; $7cf6: $2b ld b, b ; $7cf7: $40 ld h, $21 ; $7cf8: $26 $21 ld hl, $2b21 ; $7cfa: $21 $21 $2b add hl, bc ; $7cfd: $09 add hl, bc ; $7cfe: $09 add hl, bc ; $7cff: $09 ld hl, $2121 ; $7d00: $21 $21 $21 ld hl, $2121 ; $7d03: $21 $21 $21 ld hl, $2121 ; $7d06: $21 $21 $21 ld hl, $2121 ; $7d09: $21 $21 $21 ld hl, $2121 ; $7d0c: $21 $21 $21 ld hl, $402b ; $7d0f: $21 $2b $40 ld h, $21 ; $7d12: $26 $21 ld hl, $2121 ; $7d14: $21 $21 $21 ld hl, $2121 ; $7d17: $21 $21 $21 ld hl, $2121 ; $7d1a: $21 $21 $21 ld hl, $2121 ; $7d1d: $21 $21 $21 ld hl, $2121 ; $7d20: $21 $21 $21 ld hl, $402b ; $7d23: $21 $2b $40 ld h, $21 ; $7d26: $26 $21 ld hl, $2121 ; $7d28: $21 $21 $21 ld hl, $2121 ; $7d2b: $21 $21 $21 ld hl, $2121 ; $7d2e: $21 $21 $21 ld hl, $2121 ; $7d31: $21 $21 $21 ld hl, $2121 ; $7d34: $21 $21 $21 ld hl, $2121 ; $7d37: $21 $21 $21 ld hl, $2121 ; $7d3a: $21 $21 $21 ld hl, $2121 ; $7d3d: $21 $21 $21 ld hl, $402b ; $7d40: $21 $2b $40 ld h, $21 ; $7d43: $26 $21 ld hl, $2121 ; $7d45: $21 $21 $21 ld hl, $2121 ; $7d48: $21 $21 $21 ld hl, $2121 ; $7d4b: $21 $21 $21 ld hl, $2121 ; $7d4e: $21 $21 $21 ld hl, $2121 ; $7d51: $21 $21 $21 ld hl, $2121 ; $7d54: $21 $21 $21 ld hl, $402b ; $7d57: $21 $2b $40 ld h, $21 ; $7d5a: $26 $21 dec hl ; $7d5c: $2b ld b, b ; $7d5d: $40 ld h, $21 ; $7d5e: $26 $21 ld hl, $2121 ; $7d60: $21 $21 $21 ld hl, $2121 ; $7d63: $21 $21 $21 ld hl, $2121 ; $7d66: $21 $21 $21 ld hl, $2121 ; $7d69: $21 $21 $21 ld hl, $2121 ; $7d6c: $21 $21 $21 ld hl, $2121 ; $7d6f: $21 $21 $21 ld h, $21 ; $7d72: $26 $21 ld hl, $2b21 ; $7d74: $21 $21 $2b ld b, b ; $7d77: $40 ld h, $21 ; $7d78: $26 $21 ld hl, $2121 ; $7d7a: $21 $21 $21 ld hl, $2121 ; $7d7d: $21 $21 $21 add hl, bc ; $7d80: $09 ld h, $21 ; $7d81: $26 $21 ld hl, $2121 ; $7d83: $21 $21 $21 ld hl, $2121 ; $7d86: $21 $21 $21 dec hl ; $7d89: $2b ld b, b ; $7d8a: $40 ld h, $21 ; $7d8b: $26 $21 ld hl, $2121 ; $7d8d: $21 $21 $21 add hl, bc ; $7d90: $09 dec de ; $7d91: $1b ld h, $21 ; $7d92: $26 $21 ld hl, $2121 ; $7d94: $21 $21 $21 ld hl, $2121 ; $7d97: $21 $21 $21 ld hl, $2121 ; $7d9a: $21 $21 $21 ld hl, $2121 ; $7d9d: $21 $21 $21 add hl, bc ; $7da0: $09 add hl, bc ; $7da1: $09 inc b ; $7da2: $04 dec de ; $7da3: $1b ld h, $21 ; $7da4: $26 $21 ld hl, $2121 ; $7da6: $21 $21 $21 ld hl, $2121 ; $7da9: $21 $21 $21 ld hl, $2121 ; $7dac: $21 $21 $21 ld hl, $0909 ; $7daf: $21 $09 $09 dec de ; $7db2: $1b add hl, bc ; $7db3: $09 add hl, bc ; $7db4: $09 ld h, $21 ; $7db5: $26 $21 ld hl, $2121 ; $7db7: $21 $21 $21 ld hl, $402b ; $7dba: $21 $2b $40 ld h, $21 ; $7dbd: $26 $21 ld hl, $0909 ; $7dbf: $21 $09 $09 add hl, bc ; $7dc2: $09 add hl, bc ; $7dc3: $09 add hl, bc ; $7dc4: $09 ld h, $21 ; $7dc5: $26 $21 ld hl, $2b21 ; $7dc7: $21 $21 $2b ld b, b ; $7dca: $40 ld h, $21 ; $7dcb: $26 $21 ld hl, $2121 ; $7dcd: $21 $21 $21 add hl, bc ; $7dd0: $09 add hl, bc ; $7dd1: $09 add hl, bc ; $7dd2: $09 add hl, bc ; $7dd3: $09 ld h, $21 ; $7dd4: $26 $21 ld hl, $2121 ; $7dd6: $21 $21 $21 ld hl, $2121 ; $7dd9: $21 $21 $21 ld hl, $2121 ; $7ddc: $21 $21 $21 ld hl, $0909 ; $7ddf: $21 $09 $09 add hl, bc ; $7de2: $09 add hl, bc ; $7de3: $09 ld h, $21 ; $7de4: $26 $21 ld hl, $2121 ; $7de6: $21 $21 $21 ld hl, $2121 ; $7de9: $21 $21 $21 dec hl ; $7dec: $2b ld b, b ; $7ded: $40 ld h, $21 ; $7dee: $26 $21 add hl, bc ; $7df0: $09 add hl, bc ; $7df1: $09 add hl, bc ; $7df2: $09 ld h, $21 ; $7df3: $26 $21 dec hl ; $7df5: $2b ld b, b ; $7df6: $40 ld h, $21 ; $7df7: $26 $21 ld hl, $2121 ; $7df9: $21 $21 $21 ld hl, $2121 ; $7dfc: $21 $21 $21 ld hl, $2323 ; $7dff: $21 $23 $23 inc hl ; $7e02: $23 inc hl ; $7e03: $23 inc hl ; $7e04: $23 inc hl ; $7e05: $23 inc hl ; $7e06: $23 inc hl ; $7e07: $23 inc hl ; $7e08: $23 inc hl ; $7e09: $23 dec l ; $7e0a: $2d ld b, d ; $7e0b: $42 jr z, jr_00a_7e3b ; $7e0c: $28 $2d dec bc ; $7e0e: $0b dec bc ; $7e0f: $0b inc hl ; $7e10: $23 inc hl ; $7e11: $23 dec l ; $7e12: $2d ld b, d ; $7e13: $42 jr z, jr_00a_7e39 ; $7e14: $28 $23 inc hl ; $7e16: $23 inc hl ; $7e17: $23 inc hl ; $7e18: $23 inc hl ; $7e19: $23 inc hl ; $7e1a: $23 inc hl ; $7e1b: $23 inc hl ; $7e1c: $23 inc hl ; $7e1d: $23 inc hl ; $7e1e: $23 dec l ; $7e1f: $2d inc hl ; $7e20: $23 inc hl ; $7e21: $23 inc hl ; $7e22: $23 inc hl ; $7e23: $23 inc hl ; $7e24: $23 inc hl ; $7e25: $23 dec l ; $7e26: $2d ld b, d ; $7e27: $42 jr z, jr_00a_7e4d ; $7e28: $28 $23 inc hl ; $7e2a: $23 inc hl ; $7e2b: $23 inc hl ; $7e2c: $23 inc hl ; $7e2d: $23 inc hl ; $7e2e: $23 dec l ; $7e2f: $2d inc hl ; $7e30: $23 inc hl ; $7e31: $23 inc hl ; $7e32: $23 dec l ; $7e33: $2d ld b, d ; $7e34: $42 jr z, jr_00a_7e5a ; $7e35: $28 $23 inc hl ; $7e37: $23 inc hl ; $7e38: $23 jr_00a_7e39: inc hl ; $7e39: $23 inc hl ; $7e3a: $23 jr_00a_7e3b: inc hl ; $7e3b: $23 inc hl ; $7e3c: $23 inc hl ; $7e3d: $23 inc hl ; $7e3e: $23 inc hl ; $7e3f: $23 inc hl ; $7e40: $23 inc hl ; $7e41: $23 inc hl ; $7e42: $23 inc hl ; $7e43: $23 inc hl ; $7e44: $23 inc hl ; $7e45: $23 inc hl ; $7e46: $23 inc hl ; $7e47: $23 inc hl ; $7e48: $23 inc hl ; $7e49: $23 inc hl ; $7e4a: $23 inc hl ; $7e4b: $23 dec l ; $7e4c: $2d jr_00a_7e4d: ld b, d ; $7e4d: $42 jr z, jr_00a_7e73 ; $7e4e: $28 $23 inc hl ; $7e50: $23 inc hl ; $7e51: $23 inc hl ; $7e52: $23 inc hl ; $7e53: $23 inc hl ; $7e54: $23 inc hl ; $7e55: $23 inc hl ; $7e56: $23 inc hl ; $7e57: $23 inc hl ; $7e58: $23 inc hl ; $7e59: $23 jr_00a_7e5a: inc hl ; $7e5a: $23 inc hl ; $7e5b: $23 inc hl ; $7e5c: $23 inc hl ; $7e5d: $23 inc hl ; $7e5e: $23 inc hl ; $7e5f: $23 inc hl ; $7e60: $23 inc hl ; $7e61: $23 dec l ; $7e62: $2d ld e, $0b ; $7e63: $1e $0b dec bc ; $7e65: $0b dec bc ; $7e66: $0b dec e ; $7e67: $1d jr z, jr_00a_7e8d ; $7e68: $28 $23 inc hl ; $7e6a: $23 inc hl ; $7e6b: $23 inc hl ; $7e6c: $23 dec l ; $7e6d: $2d ld b, d ; $7e6e: $42 jr z, @+$0d ; $7e6f: $28 $0b dec bc ; $7e71: $0b dec bc ; $7e72: $0b jr_00a_7e73: dec bc ; $7e73: $0b dec bc ; $7e74: $0b dec bc ; $7e75: $0b dec bc ; $7e76: $0b dec bc ; $7e77: $0b dec bc ; $7e78: $0b dec bc ; $7e79: $0b dec e ; $7e7a: $1d jr z, jr_00a_7ea0 ; $7e7b: $28 $23 inc hl ; $7e7d: $23 inc hl ; $7e7e: $23 inc hl ; $7e7f: $23 dec bc ; $7e80: $0b dec bc ; $7e81: $0b dec bc ; $7e82: $0b dec bc ; $7e83: $0b dec bc ; $7e84: $0b dec bc ; $7e85: $0b dec bc ; $7e86: $0b dec bc ; $7e87: $0b dec bc ; $7e88: $0b dec bc ; $7e89: $0b dec bc ; $7e8a: $0b dec bc ; $7e8b: $0b dec bc ; $7e8c: $0b jr_00a_7e8d: dec bc ; $7e8d: $0b jr z, @+$25 ; $7e8e: $28 $23 dec bc ; $7e90: $0b dec bc ; $7e91: $0b dec bc ; $7e92: $0b dec bc ; $7e93: $0b dec bc ; $7e94: $0b dec bc ; $7e95: $0b dec bc ; $7e96: $0b dec bc ; $7e97: $0b dec bc ; $7e98: $0b dec bc ; $7e99: $0b dec bc ; $7e9a: $0b dec bc ; $7e9b: $0b dec bc ; $7e9c: $0b dec bc ; $7e9d: $0b dec bc ; $7e9e: $0b dec bc ; $7e9f: $0b jr_00a_7ea0: inc hl ; $7ea0: $23 inc hl ; $7ea1: $23 inc hl ; $7ea2: $23 dec l ; $7ea3: $2d dec bc ; $7ea4: $0b dec bc ; $7ea5: $0b dec bc ; $7ea6: $0b dec bc ; $7ea7: $0b dec bc ; $7ea8: $0b dec bc ; $7ea9: $0b dec bc ; $7eaa: $0b dec bc ; $7eab: $0b dec bc ; $7eac: $0b dec bc ; $7ead: $0b dec bc ; $7eae: $0b dec bc ; $7eaf: $0b dec l ; $7eb0: $2d ld b, d ; $7eb1: $42 jr z, jr_00a_7ee1 ; $7eb2: $28 $2d dec bc ; $7eb4: $0b dec bc ; $7eb5: $0b dec bc ; $7eb6: $0b dec bc ; $7eb7: $0b dec bc ; $7eb8: $0b dec bc ; $7eb9: $0b dec bc ; $7eba: $0b dec bc ; $7ebb: $0b dec bc ; $7ebc: $0b dec bc ; $7ebd: $0b dec bc ; $7ebe: $0b dec bc ; $7ebf: $0b inc hl ; $7ec0: $23 inc hl ; $7ec1: $23 inc hl ; $7ec2: $23 inc hl ; $7ec3: $23 inc hl ; $7ec4: $23 dec l ; $7ec5: $2d dec bc ; $7ec6: $0b dec bc ; $7ec7: $0b dec bc ; $7ec8: $0b dec bc ; $7ec9: $0b dec bc ; $7eca: $0b dec bc ; $7ecb: $0b dec bc ; $7ecc: $0b dec bc ; $7ecd: $0b dec bc ; $7ece: $0b dec bc ; $7ecf: $0b inc hl ; $7ed0: $23 inc hl ; $7ed1: $23 inc hl ; $7ed2: $23 inc hl ; $7ed3: $23 inc hl ; $7ed4: $23 inc hl ; $7ed5: $23 inc hl ; $7ed6: $23 dec l ; $7ed7: $2d dec bc ; $7ed8: $0b dec bc ; $7ed9: $0b dec bc ; $7eda: $0b dec bc ; $7edb: $0b dec bc ; $7edc: $0b dec bc ; $7edd: $0b dec bc ; $7ede: $0b dec bc ; $7edf: $0b inc hl ; $7ee0: $23 jr_00a_7ee1: inc hl ; $7ee1: $23 dec l ; $7ee2: $2d ld b, d ; $7ee3: $42 jr z, jr_00a_7f13 ; $7ee4: $28 $2d ld b, d ; $7ee6: $42 ld b, $0b ; $7ee7: $06 $0b dec bc ; $7ee9: $0b dec bc ; $7eea: $0b dec bc ; $7eeb: $0b dec bc ; $7eec: $0b dec bc ; $7eed: $0b dec bc ; $7eee: $0b dec bc ; $7eef: $0b inc hl ; $7ef0: $23 inc hl ; $7ef1: $23 inc hl ; $7ef2: $23 inc hl ; $7ef3: $23 inc hl ; $7ef4: $23 inc hl ; $7ef5: $23 inc hl ; $7ef6: $23 inc hl ; $7ef7: $23 inc hl ; $7ef8: $23 inc hl ; $7ef9: $23 inc hl ; $7efa: $23 inc hl ; $7efb: $23 inc hl ; $7efc: $23 inc hl ; $7efd: $23 inc hl ; $7efe: $23 inc hl ; $7eff: $23 dec bc ; $7f00: $0b dec bc ; $7f01: $0b dec bc ; $7f02: $0b dec bc ; $7f03: $0b jr z, jr_00a_7f29 ; $7f04: $28 $23 inc hl ; $7f06: $23 inc hl ; $7f07: $23 inc hl ; $7f08: $23 inc hl ; $7f09: $23 inc hl ; $7f0a: $23 inc hl ; $7f0b: $23 dec l ; $7f0c: $2d ld b, d ; $7f0d: $42 jr z, jr_00a_7f33 ; $7f0e: $28 $23 dec bc ; $7f10: $0b dec bc ; $7f11: $0b dec bc ; $7f12: $0b jr_00a_7f13: dec bc ; $7f13: $0b dec bc ; $7f14: $0b dec bc ; $7f15: $0b dec e ; $7f16: $1d jr z, jr_00a_7f3c ; $7f17: $28 $23 inc hl ; $7f19: $23 dec l ; $7f1a: $2d ld b, d ; $7f1b: $42 jr z, jr_00a_7f41 ; $7f1c: $28 $23 inc hl ; $7f1e: $23 inc hl ; $7f1f: $23 dec bc ; $7f20: $0b dec bc ; $7f21: $0b dec bc ; $7f22: $0b dec bc ; $7f23: $0b dec bc ; $7f24: $0b dec bc ; $7f25: $0b dec bc ; $7f26: $0b dec bc ; $7f27: $0b dec bc ; $7f28: $0b jr_00a_7f29: dec e ; $7f29: $1d jr z, jr_00a_7f4f ; $7f2a: $28 $23 inc hl ; $7f2c: $23 inc hl ; $7f2d: $23 inc hl ; $7f2e: $23 inc hl ; $7f2f: $23 dec l ; $7f30: $2d dec bc ; $7f31: $0b dec bc ; $7f32: $0b jr_00a_7f33: dec bc ; $7f33: $0b dec bc ; $7f34: $0b dec bc ; $7f35: $0b dec bc ; $7f36: $0b dec bc ; $7f37: $0b dec bc ; $7f38: $0b dec bc ; $7f39: $0b dec bc ; $7f3a: $0b dec bc ; $7f3b: $0b jr_00a_7f3c: dec e ; $7f3c: $1d jr z, jr_00a_7f62 ; $7f3d: $28 $23 inc hl ; $7f3f: $23 inc hl ; $7f40: $23 jr_00a_7f41: inc hl ; $7f41: $23 dec l ; $7f42: $2d dec bc ; $7f43: $0b dec bc ; $7f44: $0b dec bc ; $7f45: $0b dec bc ; $7f46: $0b dec bc ; $7f47: $0b dec bc ; $7f48: $0b dec bc ; $7f49: $0b dec bc ; $7f4a: $0b dec bc ; $7f4b: $0b dec bc ; $7f4c: $0b jr z, @+$25 ; $7f4d: $28 $23 jr_00a_7f4f: inc hl ; $7f4f: $23 dec l ; $7f50: $2d ld b, d ; $7f51: $42 jr z, jr_00a_7f77 ; $7f52: $28 $23 dec l ; $7f54: $2d dec bc ; $7f55: $0b dec bc ; $7f56: $0b dec bc ; $7f57: $0b dec bc ; $7f58: $0b dec bc ; $7f59: $0b dec bc ; $7f5a: $0b dec bc ; $7f5b: $0b dec bc ; $7f5c: $0b dec bc ; $7f5d: $0b dec bc ; $7f5e: $0b dec bc ; $7f5f: $0b inc hl ; $7f60: $23 inc hl ; $7f61: $23 jr_00a_7f62: inc hl ; $7f62: $23 inc hl ; $7f63: $23 inc hl ; $7f64: $23 inc hl ; $7f65: $23 inc hl ; $7f66: $23 dec l ; $7f67: $2d dec bc ; $7f68: $0b dec bc ; $7f69: $0b dec bc ; $7f6a: $0b dec bc ; $7f6b: $0b dec bc ; $7f6c: $0b dec bc ; $7f6d: $0b dec bc ; $7f6e: $0b dec bc ; $7f6f: $0b inc hl ; $7f70: $23 jr z, jr_00a_7f96 ; $7f71: $28 $23 inc hl ; $7f73: $23 dec l ; $7f74: $2d dec l ; $7f75: $2d ld b, d ; $7f76: $42 jr_00a_7f77: jr z, jr_00a_7f9c ; $7f77: $28 $23 dec l ; $7f79: $2d dec bc ; $7f7a: $0b dec bc ; $7f7b: $0b dec bc ; $7f7c: $0b dec bc ; $7f7d: $0b dec bc ; $7f7e: $0b dec bc ; $7f7f: $0b dec bc ; $7f80: $0b jr z, jr_00a_7fb0 ; $7f81: $28 $2d ld b, d ; $7f83: $42 jr z, jr_00a_7fa9 ; $7f84: $28 $23 inc hl ; $7f86: $23 inc hl ; $7f87: $23 inc hl ; $7f88: $23 inc hl ; $7f89: $23 inc hl ; $7f8a: $23 inc hl ; $7f8b: $23 inc hl ; $7f8c: $23 inc hl ; $7f8d: $23 inc hl ; $7f8e: $23 inc hl ; $7f8f: $23 dec bc ; $7f90: $0b dec bc ; $7f91: $0b jr z, jr_00a_7fb7 ; $7f92: $28 $23 dec l ; $7f94: $2d dec bc ; $7f95: $0b jr_00a_7f96: dec bc ; $7f96: $0b dec bc ; $7f97: $0b dec bc ; $7f98: $0b dec bc ; $7f99: $0b dec bc ; $7f9a: $0b dec bc ; $7f9b: $0b jr_00a_7f9c: dec bc ; $7f9c: $0b dec bc ; $7f9d: $0b dec bc ; $7f9e: $0b dec bc ; $7f9f: $0b dec bc ; $7fa0: $0b dec bc ; $7fa1: $0b dec bc ; $7fa2: $0b dec bc ; $7fa3: $0b dec bc ; $7fa4: $0b dec bc ; $7fa5: $0b dec bc ; $7fa6: $0b jr z, jr_00a_7fcc ; $7fa7: $28 $23 jr_00a_7fa9: inc hl ; $7fa9: $23 inc hl ; $7faa: $23 inc hl ; $7fab: $23 inc hl ; $7fac: $23 inc hl ; $7fad: $23 inc hl ; $7fae: $23 inc hl ; $7faf: $23 jr_00a_7fb0: dec bc ; $7fb0: $0b dec bc ; $7fb1: $0b dec bc ; $7fb2: $0b dec bc ; $7fb3: $0b dec bc ; $7fb4: $0b dec bc ; $7fb5: $0b dec bc ; $7fb6: $0b jr_00a_7fb7: jr z, jr_00a_7fdc ; $7fb7: $28 $23 inc hl ; $7fb9: $23 inc hl ; $7fba: $23 inc hl ; $7fbb: $23 inc hl ; $7fbc: $23 dec l ; $7fbd: $2d ld b, d ; $7fbe: $42 jr z, jr_00a_7fcc ; $7fbf: $28 $0b dec bc ; $7fc1: $0b dec bc ; $7fc2: $0b dec bc ; $7fc3: $0b dec bc ; $7fc4: $0b dec bc ; $7fc5: $0b dec bc ; $7fc6: $0b jr z, jr_00a_7ff6 ; $7fc7: $28 $2d ld b, d ; $7fc9: $42 jr z, jr_00a_7fef ; $7fca: $28 $23 jr_00a_7fcc: inc hl ; $7fcc: $23 inc hl ; $7fcd: $23 inc hl ; $7fce: $23 inc hl ; $7fcf: $23 dec bc ; $7fd0: $0b dec bc ; $7fd1: $0b dec bc ; $7fd2: $0b dec bc ; $7fd3: $0b dec bc ; $7fd4: $0b dec bc ; $7fd5: $0b dec bc ; $7fd6: $0b jr z, jr_00a_7ffc ; $7fd7: $28 $23 inc hl ; $7fd9: $23 inc hl ; $7fda: $23 dec l ; $7fdb: $2d jr_00a_7fdc: ld b, d ; $7fdc: $42 jr z, @+$25 ; $7fdd: $28 $23 inc hl ; $7fdf: $23 dec bc ; $7fe0: $0b dec bc ; $7fe1: $0b dec bc ; $7fe2: $0b dec bc ; $7fe3: $0b jr z, @+$25 ; $7fe4: $28 $23 inc hl ; $7fe6: $23 inc hl ; $7fe7: $23 inc hl ; $7fe8: $23 dec l ; $7fe9: $2d ld b, d ; $7fea: $42 jr z, @+$25 ; $7feb: $28 $23 inc hl ; $7fed: $23 inc hl ; $7fee: $23 jr_00a_7fef: inc hl ; $7fef: $23 inc hl ; $7ff0: $23 inc hl ; $7ff1: $23 inc hl ; $7ff2: $23 inc hl ; $7ff3: $23 inc hl ; $7ff4: $23 inc hl ; $7ff5: $23 jr_00a_7ff6: dec l ; $7ff6: $2d ld b, d ; $7ff7: $42 jr z, @+$25 ; $7ff8: $28 $23 inc hl ; $7ffa: $23 inc hl ; $7ffb: $23 jr_00a_7ffc: inc hl ; $7ffc: $23 inc hl ; $7ffd: $23 inc hl ; $7ffe: $23 inc hl ; $7fff: $23
; A154879: Third differences of the Jacobsthal sequence A001045. ; Submitted by Jamie Morken(s4) ; 3,-2,4,0,8,8,24,40,88,168,344,680,1368,2728,5464,10920,21848,43688,87384,174760,349528,699048,1398104,2796200,5592408,11184808,22369624,44739240,89478488,178956968,357913944,715827880,1431655768,2863311528,5726623064,11453246120,22906492248,45812984488,91625968984,183251937960,366503875928,733007751848,1466015503704,2932031007400,5864062014808,11728124029608,23456248059224,46912496118440,93824992236888,187649984473768,375299968947544,750599937895080,1501199875790168,3002399751580328 mov $2,-2 pow $2,$0 gcd $1,$2 div $2,$1 mul $2,8 add $1,$2 mov $0,$1 div $0,3
; 当CPU执行ret指令的时候相当于进行 ; POP IP 从栈中读取数据 ; 当CPU执行retf指令的时候相当于进行 ; POP IP ; POP CS ; 故ret, retf与栈有直接关系 assume cs:code data segment db 'Welcome to ASM!','$' data ends stack segment db 16 dup (0) stack ends code segment mov ah, 4ch int 21h start: mov ax, stack mov ss, ax mov sp, 16 mov ax, 0 push ax mov ax, data mov ds, ax mov bx, 0 lea dx, [bx] ; 正常显示 dx并没改变 在实际执行才会将bx存入dx中 ;mov dx, offset ds:[bx] mov ah, 09H int 21H ret ; IP = 0 code ends end start
;***********************************************************; ; radical - simple bootloader ; ; file : print.asm ; ; desc : contains functions for printing on screen ; ; author : Siddharth Mishra ; ; time : Mon 3 May, 2021, 19:35 ; ;***********************************************************; ;*************************************************; ; helper function for printing a string on screen ; ; usage : + push the function to stack ; ; + the stack must be 0 terminated ; ;*************************************************; print: push ebp mov ebp, esp push esp ; clear eax register xor eax, eax ; this way is much faster for setting eax to 0 ; load first parameter, +8 because 8 bytes are occupied by information used for calling ret mov bx, [ebp+8] ; set to printing mode mov ah, 0x0e ; loot protocol .loop: cmp [bx], byte 0 je .exit ; if this char is 0 then we reached the end of string mov al, [bx] ; load character into bx int 0x10 ; print interrupt inc bx ; get next char jmp .loop ; go back to loop ; exit protocol .exit: pop esp pop ebp ret ;*******************************************************************; ; helper function for printing a string on screen with a new line ; ; usage : + push the function to stack ; ; + the stack must be 0 terminated ; ;*******************************************************************; print_ln: ; print message normally call print ; print newline mov al, 0x0a int 0x10 ret
; A050454: a(n) = Sum_{d|n, d=3 mod 4} d^3. ; Submitted by Jamie Morken(s4) ; 0,0,27,0,0,27,343,0,27,0,1331,27,0,343,3402,0,0,27,6859,0,370,1331,12167,27,0,0,19710,343,0,3402,29791,0,1358,0,43218,27,0,6859,59346,0,0,370,79507,1331,3402,12167,103823,27,343,0,132678,0,0,19710,167706,343,6886,0,205379,3402,0,29791,250417,0,0,1358,300763,0,12194,43218,357911,27,0,0,425277,6859,1674,59346,493039,0,19710,0,571787,370,0,79507,658530,1331,0,3402,753914,12167,29818,103823,864234,27,0,343,971657,0 add $0,1 mov $1,1 mov $2,$0 mul $0,4 lpb $0 mov $4,$0 sub $0,4 mov $3,$2 sub $4,5 dif $3,$4 cmp $3,$2 cmp $3,0 pow $4,3 mul $3,$4 add $1,$3 lpe mov $0,$1
; A147612: If n is a Jacobsthal number then 1 else 0. ; 1,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 mul $0,3 seq $0,53645 ; Distance to largest power of 2 less than or equal to n; write n in binary, change the first digit to zero, and convert back to decimal. div $0,3 cmp $0,0
; void *obstack_init(struct obstack *ob, size_t size) SECTION code_clib SECTION code_alloc_obstack PUBLIC obstack_init EXTERN asm_obstack_init obstack_init: pop af pop bc pop de push de push bc push af jp asm_obstack_init ; SDCC bridge for Classic IF __CLASSIC PUBLIC _obstack_init defc _obstack_init = obstack_init ENDIF
; A168281: Triangle T(n,m) = 2*(min(n+m-1,m))^2 read by rows. ; 2,2,2,2,8,2,2,8,8,2,2,8,18,8,2,2,8,18,18,8,2,2,8,18,32,18,8,2,2,8,18,32,32,18,8,2,2,8,18,32,50,32,18,8,2,2,8,18,32,50,50,32,18,8,2,2,8,18,32,50,72,50,32,18,8,2,2,8,18,32,50,72,72,50,32,18,8,2,2,8,18,32,50,72,98,72,50,32,18,8,2,2,8,18,32,50,72,98,98,72,50,32,18,8,2,2,8,18,32,50,72,98,128,98,72,50,32,18,8,2,2,8,18,32,50,72,98,128,128,98,72,50,32,18,8,2,2,8,18,32,50,72,98,128,162,128,98,72,50,32,18,8,2,2,8,18,32,50,72,98,128,162,162,128,98,72,50,32,18,8,2,2,8,18,32,50,72,98,128,162,200,162,128,98,72,50,32,18,8,2,2,8,18,32,50,72,98,128,162,200,200,162,128,98,72,50,32,18,8,2,2,8,18,32,50,72,98,128,162,200,242,200,162,128,98,72,50,32,18,8,2,2,8,18,32,50,72,98,128,162,200,242,242,200,162,128,98,72,50,32 cal $0,3983 ; Array read by antidiagonals with T(n,k) = min(n,k). pow $0,2 mov $1,$0 mul $1,2
db SANDSHREW ; pokedex id db 50 ; base hp db 75 ; base attack db 85 ; base defense db 40 ; base speed db 30 ; base special db GROUND ; species type 1 db GROUND ; species type 2 db 255 ; catch rate db 93 ; base exp yield INCBIN "pic/gsmon/sandshrew.pic",0,1 ; 55, sprite dimensions dw SandshrewPicFront dw SandshrewPicBack ; attacks known at lvl 0 db SCRATCH db DEFENSE_CURL db 0 db 0 db 0 ; growth rate ; learnset tmlearn 3,6,8 tmlearn 9,10 tmlearn 17,19,20 tmlearn 26,27,28,31,32 tmlearn 34,39 tmlearn 44,48 tmlearn 50,51,54 db BANK(SandshrewPicFront)
;;============================================================================ ;; MCKL/lib/asm/philox_sse2_32.asm ;;---------------------------------------------------------------------------- ;; MCKL: Monte Carlo Kernel Library ;;---------------------------------------------------------------------------- ;; Copyright (c) 2013-2018, Yan Zhou ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are met: ;; ;; Redistributions of source code must retain the above copyright notice, ;; this list of conditions and the following disclaimer. ;; ;; Redistributions in binary form must reproduce the above copyright notice, ;; this list of conditions and the following disclaimer in the documentation ;; and/or other materials provided with the distribution. ;; ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS ;; AND ANY EXPRESS OR IMPLIED WARRANTIES, inc4LUDING, BUT NOT LIMITED TO, THE ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ;; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ;; LIABLE FOR ANY DIRECT, INDIRECT, inc4IDENTAL, SPECIAL, EXEMPLARY, OR ;; CONSEQUENTIAL DAMAGES (inc4LUDING, BUT NOT LIMITED TO, PROCUREMENT OF ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ;; CONTRACT, STRICT LIABILITY, OR TORT (inc4LUDING NEGLIGENCE OR OTHERWISE) ;; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ;; POSSIBILITY OF SUCH DAMAGE. ;;============================================================================ global mckl_philox2x32_sse2_kernel global mckl_philox4x32_sse2_kernel default rel %macro rbox 2 movdqa xmm15, [rsp + %1 * 0x10] ; round key movdqa xmm10, xmm0 movdqa xmm11, xmm1 movdqa xmm12, xmm2 movdqa xmm13, xmm3 pmuludq xmm10, xmm9 pmuludq xmm11, xmm9 pmuludq xmm12, xmm9 pmuludq xmm13, xmm9 pand xmm0, xmm14 pand xmm1, xmm14 pand xmm2, xmm14 pand xmm3, xmm14 pxor xmm0, xmm15 pxor xmm1, xmm15 pxor xmm2, xmm15 pxor xmm3, xmm15 pxor xmm0, xmm10 pxor xmm1, xmm11 pxor xmm2, xmm12 pxor xmm3, xmm13 movdqa xmm10, xmm4 movdqa xmm11, xmm5 movdqa xmm12, xmm6 movdqa xmm13, xmm7 pmuludq xmm10, xmm9 pmuludq xmm11, xmm9 pmuludq xmm12, xmm9 pmuludq xmm13, xmm9 pand xmm4, xmm14 pand xmm5, xmm14 pand xmm6, xmm14 pand xmm7, xmm14 pxor xmm4, xmm15 pxor xmm5, xmm15 pxor xmm6, xmm15 pxor xmm7, xmm15 pxor xmm4, xmm10 pxor xmm5, xmm11 pxor xmm6, xmm12 pxor xmm7, xmm13 pshufd xmm0, xmm0, %2 pshufd xmm1, xmm1, %2 pshufd xmm2, xmm2, %2 pshufd xmm3, xmm3, %2 pshufd xmm4, xmm4, %2 pshufd xmm5, xmm5, %2 pshufd xmm6, xmm6, %2 pshufd xmm7, xmm7, %2 %endmacro %macro generate 4 ; block size, permute constants movdqa xmm0, xmm8 movdqa xmm1, xmm8 movdqa xmm2, xmm8 movdqa xmm3, xmm8 movdqa xmm4, xmm8 movdqa xmm5, xmm8 movdqa xmm6, xmm8 movdqa xmm7, xmm8 %if %1 == 0x08 ; Philox2x32 paddq xmm0, [increment2x32 + 0x00] paddq xmm1, [increment2x32 + 0x10] paddq xmm2, [increment2x32 + 0x20] paddq xmm3, [increment2x32 + 0x30] paddq xmm4, [increment2x32 + 0x40] paddq xmm5, [increment2x32 + 0x50] paddq xmm6, [increment2x32 + 0x60] paddq xmm7, [increment2x32 + 0x70] paddq xmm8, [increment2x32 + 0x80] %elif %1 == 0x10 ; Philox4x32 paddq xmm0, [increment4x32 + 0x00] paddq xmm1, [increment4x32 + 0x10] paddq xmm2, [increment4x32 + 0x20] paddq xmm3, [increment4x32 + 0x30] paddq xmm4, [increment4x32 + 0x40] paddq xmm5, [increment4x32 + 0x50] paddq xmm6, [increment4x32 + 0x60] paddq xmm7, [increment4x32 + 0x70] paddq xmm8, [increment4x32 + 0x80] %else %error %endif %if %2 != 0xE3 pshufd xmm0, xmm0, %2 pshufd xmm1, xmm1, %2 pshufd xmm2, xmm2, %2 pshufd xmm3, xmm3, %2 pshufd xmm4, xmm4, %2 pshufd xmm5, xmm5, %2 pshufd xmm6, xmm6, %2 pshufd xmm7, xmm7, %2 %endif rbox 0, %3 rbox 1, %3 rbox 2, %3 rbox 3, %3 rbox 4, %3 rbox 5, %3 rbox 6, %3 rbox 7, %3 rbox 8, %3 rbox 9, %4 %endmacro ; rdi:ctr.data() ; rsi:n ; rdx:r ; rcx:mul:weyl:key %macro kernel 4 ; block size, permute constants push rbp mov rbp, rsp sub rsp, 0xA0 ; 10 round keys cld ; early return test rsi, rsi jz .return ; parameter processing, leave rdi, rsi, rcx free for moving memory mov rax, rsi ; n mov r8, rdi ; ctr mov r9, rcx ; mul:wey:key ; load counter %if %1 == 0x08 ; Philox2x32 movq xmm8, [r8] pshufd xmm8, xmm8, 0x44 %elif %1 == 0x10 ; Philox4x32 movdqu xmm8, [r8] %else %error %endif add [r8], rax ; load multiplier %if %1 == 0x08 ; Philox2x32 movq xmm9, [r9] pshufd xmm9, xmm9, 0x44 %elif %1 == 0x10 ; Philox4x32 movdqu xmm9, [r9] %else %error %endif ; load mask movdqa xmm14, [mask] ; compute round keys and store to stack %if %1 == 0x08 movq xmm0, [r9 + 0x08] ; weyl movq xmm1, [r9 + 0x10] ; key pshufd xmm0, xmm0, 0x44 pshufd xmm1, xmm1, 0x44 %elif %1 == 0x10 movdqu xmm0, [r9 + 0x10] ; weyl movdqu xmm1, [r9 + 0x20] ; key %else %error %endif movdqa [rsp], xmm1 %assign r 1 %rep 9 paddq xmm1, xmm0 movdqa [rsp + r * 0x10], xmm1 %assign r r + 1 %endrep cmp rax, 0x80 / %1 jl .last align 16 .loop: generate %1, %2, %3, %4 movdqu [rdx + 0x00], xmm0 movdqu [rdx + 0x10], xmm1 movdqu [rdx + 0x20], xmm2 movdqu [rdx + 0x30], xmm3 movdqu [rdx + 0x40], xmm4 movdqu [rdx + 0x50], xmm5 movdqu [rdx + 0x60], xmm6 movdqu [rdx + 0x70], xmm7 add rdx, 0x80 sub rax, 0x80 / %1 cmp rax, 0x80 / %1 jge .loop .last: test rax, rax jz .return generate %1, %2, %3, %4 movdqa [rsp + 0x00], xmm0 movdqa [rsp + 0x10], xmm1 movdqa [rsp + 0x20], xmm2 movdqa [rsp + 0x30], xmm3 movdqa [rsp + 0x40], xmm4 movdqa [rsp + 0x50], xmm5 movdqa [rsp + 0x60], xmm6 movdqa [rsp + 0x70], xmm7 %if %1 == 0x08 mov rcx, rax %elif %1 == 0x10 lea rcx, [rax + rax] %else %error %endif mov rsi, rsp mov rdi, rdx rep movsq .return: mov rsp, rbp pop rbp ret %endmacro section .rodata align 16 increment2x32: dq 0x01, 0x02 dq 0x03, 0x04 dq 0x05, 0x06 dq 0x07, 0x08 dq 0x09, 0x0A dq 0x0B, 0x0C dq 0x0D, 0x0E dq 0x0F, 0x10 dq 0x10, 0x10 increment4x32: dq 0x01, 0x00 dq 0x02, 0x00 dq 0x03, 0x00 dq 0x04, 0x00 dq 0x05, 0x00 dq 0x06, 0x00 dq 0x07, 0x00 dq 0x08, 0x00 dq 0x08, 0x00 mask: times 2 dq 0xFFFF_FFFF_0000_0000 section .text mckl_philox2x32_sse2_kernel: kernel 0x08, 0xE3, 0xB1, 0xB1 mckl_philox4x32_sse2_kernel: kernel 0x10, 0xC6, 0x93, 0xB1 ; vim:ft=nasm
; A030118: a(0) = 1, a(1) = 1, a(n) = a(n-1) - a(n-2) + n. ; 1,1,2,4,6,7,7,7,8,10,12,13,13,13,14,16,18,19,19,19,20,22,24,25,25,25,26,28,30,31,31,31,32,34,36,37,37,37,38,40,42,43,43,43,44,46,48,49,49,49,50,52,54,55,55,55,56,58,60,61,61,61,62,64,66,67,67,67,68,70,72,73,73,73,74,76,78,79,79,79,80,82,84,85,85,85,86,88,90,91,91,91,92,94,96,97,97,97,98,100 mov $1,1 lpb $0 sub $0,1 add $3,1 add $2,$3 sub $2,$1 add $1,$2 lpe mov $0,$1
/* * siox-module.asm * * Created: 2016/08/04 * Author: lynf */ ; ; ;###################################################################################### ; This software is Copyright by Francis Lyn and is issued under the following license: ; ; Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License ; ;###################################################################################### ; ; ; ; ATmega328P cpu, 16.0000 MHz external crystal. ; L: FF, H: DA, E: 05 ; ; Interrupt driven serial UART receiver handler with 32 byte receiver buffer ; Include this file with main program code. Make sure the equates, interrupt ; vectors, RAM buffers are defined in the main program code. ; ; ; ===== ;.list ; ===== ; ; ; Constant equates (definitions) ; ; UART definitions ; ;.equ BAUD = 19200 ; Baud rate ;.equ BAUD_PRE = 51 ; Baud rate prescaler - 16.00 MHz clock ; ; --- ; .equ sblen = 0x20 ; Serial input buffer length ; ; ; ; ============================================ ; S R A M D E F I N I T I O N S ; ============================================ ; ;.DSEG ;.ORG 0X0100 ; ; RTC clock module data buffers ; ;uart_st: ; ;sinb: ; Serial input buffer ;.byte sblen ; ;getcnt: ;.byte 1 ; Input buffer getbyte counter ; ;putcnt: ;.byte 1 ; Input buffer putbyte counter ; ; ;uart_end: ; ; ; ============================================ ; R E S E T A N D I N T V E C T O R S ; ============================================ ; ;.CSEG ;.ORG $0000 ; rjmp start ; Int vector 1 - Reset vector ; ;.ORG URXCaddr ; jmp URXCint ; USART Rx Complete ; ; ; End of interrupt vectors, start of program code space ; ;.ORG 0x0034 ; ; ; ; ; ; Zero RAM data buffers ; ;zbuf: ; ldi rgb,(uart_end-uart_st) ; clr rmp ; ldxptr uart_st ;zbuf1: ; st X+,rmp ; dec rgb ; brne zbuf1 ; ret ; ; ; ; rcall inzuart ; Disable UART when using PD0 and PD1 pins ; ; ;########################################################################### ; ; UART serial receive interrupt handler. ; ; USART Receive Complete interrupt handler. Interrupt invoked by RXC0 set ; when UDRE buffer has received character ready. Routine puts the received ; character into the SINB serial input buffer and increments the PUTCNT counter. ; When SBLEN+1 counts reached, PUTCNT is rolled back to 0 counts. SINB acts ; as a circular buffer. ; URXCint: in SRsav,SREG ; Save SREG push rga push rmp push XH push XL ; ldxptr sinb ; Sinb base address lds rmp,putcnt ; Get current putcnt offset clr rga add XL,rmp ; Add putcnt offset to sinb pointer adc XH,rga ; Update pointer (16 bit addition) lds rga,UDR0 ; rga <-- UDR0 st X,rga ; Store to SINB buffer inc rmp ; Increment putcnt cpi rmp,(sblen+1) ; Past end of buffer? brcs URXCint1 ; No, continue clr rmp ; Yes, reset putcnt URXCint1: sts putcnt,rmp ; Update putcnt to next free location ; pop XL pop XH pop rmp pop rga out SREG,SRsav ; Restore SREG reti ; ; ; ; ;########################################################################### ; ; ; ============================================ ; U A R T Serial I/O Moulde ; ============================================ ; ; ; Initialize the UART for 19200 baud asynchronous operation ; inzuart: cli ; Clear global interrupts ldi rmp,high(BAUD_PRE) sts UBRR0H,rmp ; Load baud rate register high ldi rmp,low(BAUD_PRE) sts UBRR0L,rmp ; Load baud rate register low ; ; Setup frame for 1 start, 8 data, 1 stop and no parity ; ldi rmp,(1<<UCSZ00)|(1<<UCSZ01) sts UCSR0C,rmp ; ; Enable the UART RX, TX, and RXC interrupt ; ldi rmp,(1<<RXEN0)|(1<<TXEN0)|(1<<RXCIE0) ; |(1<<TXCIE0)|(1<<UDRIE0) sts UCSR0B,rmp ; Enable RX, TX and RXC interrupt ; sei ; Set global interrupts ret ; ; Scan for console character and return with character if any, ; else return with rga = 0. Data is available in sinb when putcnt ; is greater than getcnt. ; getc: lds rga,getcnt lds rmp,putcnt cp rga,rmp ; Compare getcnt to putcnt breq getc2 ; Same, no new data getc0: push XH push XL ; Save X registers ldxptr sinb ; sinb base address lds rmp,getcnt ; Get current getcnt offset clr rga add XL,rmp ; Add putcnt offset to sinb pointer adc XH,rga ; Update pointer (16 bit addition) ; ld rga,X ; rga <-- @XHL pop XL pop XH ; Restore X registers inc rmp ; Increment getcnt cpi rmp,(sblen+1) ; Past end of buffer? brcs getc1 ; No, continue clr rmp ; Yes, reset getcnt getc1: sts getcnt,rmp ; Update getcnt to next free location ret getc2: clr rga ret ; ; Wait for a received data byte, return received data in rga. ; ci: lds rgc,getcnt lds rgd,putcnt cp rgc,rgd ; Compare getcnt to putcnt breq ci ; Wait for new received data rjmp getc0 ; ; Load UDR0 from rga. Wait until transmitter is empty before loading. (OK) ; co: lds rmp,UCSR0A ; Get UART control status register sbrs rmp,UDRE0 ; Test if UDR0 is empty rjmp co ; ; Send data ; sts UDR0,rga ; UDR0 <-- rga ret ; ; ;########################################################################### ; ; ; ; End of source code ; ; ====================================================================== .exit ; ====================================================================== ;
# Main-Funktion # Spielablauf: # 1. Startbildschirm aufrufen # 2. Init: draw_ball + draw_paddle # 3. Init scoreboard # # while score <11 { # do { # 4. move_paddel # 5. ball_control } while keine Kollision # # wenn Kollision: { # scoreboard ( 1 linke Seite, 2 rechte Seite, 0 alles gut :)) # soundeffekt # score ++ # } } # display_image # soundeffekt # score = 0 .data loop_test: .string "for_loop\n" .include "cesplib_rars.asm" .text main: jal start_image start_loop: li s0, KEYBOARD_ADDDRESS lw t0, (s0) beq t0, zero start_loop lw t0, 4(s0) li t1, 'p' #print to console li a7, 4 # Prints a null-terminated string to the console la a0, loop_test ecall bne t0, t1, start_loop jal draw_blackscreen jal init_ball # move returned values into registers s1-s4 # s1-s4 used by ball_control mv s1, a0 # x-coordinate of the ball's center mv s2, a1 # y-coordinate of the ball's center mv s3, a2 # x-component of the ball's new vector mv s4, a3 # y-component of the ball's new vector # draw ball to Bitmap Display mv a1, s1 mv a2,s2 li a3, 0xffffff #white jal draw_ball # initial draw of paddles jal draw_paddles mv s5, a4 # highest y coordinate reached by the paddle on the left mv s7, a6 # highest y coordinate reached by the paddle on the right # initialize scoreboard: display 0 : 0 jal init_scoreboard li s10, 0 # score left li s11, 0 # score right while_loop: li t1, 11 beq s10,t1 , end_game beq s11, t1, end_game mv a4, s5 # highest y coordinate reached by the paddle on the left mv a6, s7 # highest y coordinate reached by the paddle on the right jal move_paddles mv s5, a3 # highest y coordinate reached by the paddle on the left mv s6, a4 # lowest y coordinate reached by the paddle on the left mv s7, a5 # highest y coordinate reached by the paddle on the right mv s8, a6 # lowest y coordinate reached by the paddle on the right jal ball_control # cesp_sleep to adapt speed of ball li a0, 50 li a7, 32 ecall li t1, 0 beq s9, t1, while_loop li t1,1 beq s9, t1, score_left li t1, 2 beq s9, t1, score_right score_left: # Right Player scored on the left side #li t1, 1 #add s10, t1 ,s10 addi s10, s10, 1 #score left ++ li s9, 0 #score indicator = 0 mv a2, s10 jal draw_right_number jal play_soundeffect jal init_ball # move returned values into registers s1-s4 # s1-s4 used by ball_control mv s1, a0 # x-coordinate of the ball's center mv s2, a1 # y-coordinate of the ball's center mv s3, a2 # x-component of the ball's new vector mv s4, a3 # y-component of the ball's new vector # draw ball to Bitmap Display mv a1, s1 mv a2,s2 li a3, 0xffffff #white jal draw_ball j while_loop score_right: # Left Player scored on the right side li t1, 1 add s11, s11,t1 #score right ++ li s9, 0 #score indicator = 0 mv a2, s11 jal draw_left_number jal play_soundeffect jal init_ball # move returned values into registers s1-s4 # s1-s4 used by ball_control mv s1, a0 # x-coordinate of the ball's center mv s2, a1 # y-coordinate of the ball's center mv s3, a2 # x-component of the ball's new vector mv s4, a3 # y-component of the ball's new vector # draw ball to Bitmap Display mv a1, s1 mv a2,s2 li a3, 0xffffff #white jal draw_ball j while_loop end_game: add ra, zero, zero #print to console li a7, 1 # Prints 1 li a0, 1 ecall li t1, 11 beq s10, t1, win_left_player beq s11, t1, win_right_player win_right_player: jal draw_blackscreen jal draw_winscreen #jal win_image_right li a7, 1 # Prints 2 li a0, 2 ecall beq zero,zero, end_game_here win_left_player: jal draw_blackscreen jal draw_winscreen li a7, 1 # Prints 3 li a0, 3 ecall end_game_here: # end game jal play_sound_brass li a7, 10 ecall .include "move_paddles.asm" .include "draw_pixel.asm" .include "draw_line.asm" .include "draw_circle.asm" .include "ball_actions.asm" .include "draw_ball.asm" .include "draw_paddles.asm" .include "draw_rectangle.asm" .include "move_ball.asm" .include "play_sound_win.asm" .include "play_soundeffect.asm" .include "scoreboard.asm" .include "readwordunaligned.asm" .include "display_image.asm" .include "draw_blackscreen.asm" .include "draw_winscreen.asm"
/*------------------------------------------------------------------------------ Lucena Utilities Library “Config.hpp” Copyright © 2015-2018 Lucena All Rights Reserved This file is distributed under the University of Illinois Open Source License. See license/License.txt for details. Config documents the internal options used in a given build of Lucena Utilities. The contents of this file should not typically be changed unless the library is rebuilt at the same time; in particular, a client program that modifies this file risks crashing when built against a version of the library that is not using the same settings. Settings available in client code that can be set independently of those used to build the library are also documented here, as well as certain situational settings. Such settings should be set in the client code’s own master headers. Note that codes are littered through the source comments to indicate areas that require special attention; we document those here: FIXME - something that is a known bug, incomplete, or a likely trouble area; these should be addressed prior to shipping APIME - a likely API problem; these are not an impediment to shipping, but may pose a future maintenance problem OPTME - something that could be made more efficient with a high probable performance return; this notation is generally reserved for speed-critical sections VERME - a place where an assumption has been made about performance, stability, usefulness, etc.; these document areas that might benefit from future testing SEEME - something noteworthy that requires care to use properly; possibly counterintuitive, but not easily addressable ------------------------------------------------------------------------------*/ #pragma once // Set up versioned namespaces for Lucena Utilities. This allows us to have // non-disruptive ABI changes, should the need arise. // APIME Note that there doesn’t appear to be a way to ensure that these // macros are invoked correctly, e.g., guard values to keep from accidentally // embedding std in our library namespace. #define LUL_version_major 2UL #define LUL_version_minor 0UL #define LUL_version_patch 0UL #define LUL_version (LUL_version_major << 24 | \ LUL_version_minor << 16 | \ LUL_version_patch) #define LUL_abi_version 2 // Turn the literal value param_ into a string literal #define LUL_Stringify1_(LUL_param_) #LUL_param_ #define LUL_Stringify_(LUL_param_) LUL_Stringify1_(LUL_param_) // LUL_Concat_ concatenates any two preprocessor macro arguments to create a // new token. The additional indirection is necessary to ensure that the // values of the arguments, not the argument identifiers, are used. Note that // these macros must exist here since this file gets included before anything // else of ours. #define LUL_Concat1_(LUL_base_, LUL_suffix_) \ LUL_base_ ## LUL_suffix_ #define LUL_Concat_(LUL_base_, LUL_suffix_) \ LUL_Concat1_ (LUL_base_, LUL_suffix_) // Anything contained in this namespace is versioned. #define LUL_abi_namespace LUL_Concat_(ul_, LUL_abi_version) // Begin and end the unversioned library namespace. This must be done from the // global namespace. #define LUL_begin_namespace namespace lucena { namespace ul { #define LUL_end_namespace } } // Enter and exit the inline versioned library namespace. This must be done // from within the unversioned library namespace. #define LUL_enter_v_namespace inline namespace LUL_abi_namespace { #define LUL_exit_v_namespace } // Begin and end the fully qualified versioned library namespace. This must be // done from the global namespace. #define LUL_begin_v_namespace LUL_begin_namespace LUL_enter_v_namespace #define LUL_end_v_namespace LUL_exit_v_namespace LUL_end_namespace // Versioned namespace qualifier #define LUL_v_ lucena::ul::LUL_abi_namespace // Unversioned namespace qualifier #define LUL_ lucena::ul // Bring our namespace into existence. LUL_begin_v_namespace LUL_end_v_namespace // ABI decorators. These are used to identify which ABI a given chunk of code // adheres to. The “normal” ABI is the default, and provided for completeness. // The “cpp” ABI is the stable C++ ABI for a given platform. The “c” ABI is // the C ABI; enter/exit macros are provided for completeness, though they are // unnecessary in practice since all supported C++ compilers handle extern "C" // correctly already. // // APIME These are intended to track the emerging C++ ABI proposal(s). For // now, they’re mostly placeholders - only the C ABI is generally supported. #ifndef LUL_enter_normal_abi #define LUL_enter_normal_abi #endif #ifndef LUL_exit_normal_abi #define LUL_exit_normal_abi #endif #ifndef LUL_enter_cpp_abi #define LUL_enter_cpp_abi #endif #ifndef LUL_exit_cpp_abi #define LUL_exit_cpp_abi #endif #ifndef LUL_enter_c_abi #define LUL_enter_c_abi extern "C" { #endif #ifndef LUL_exit_c_abi #define LUL_exit_c_abi } #endif // Begin and end the std library namespace; this is intended for implementing // template specializations. This must be done from the global namespace. #ifndef LUL_begin_std_namespace #define LUL_begin_std_namespace namespace std { #endif #ifndef LUL_end_std_namespace #define LUL_end_std_namespace } #endif // This is used to maintain ABI stability when using Standard Library // constructs in our APIs. Use “LUL_std_abi::” instead of just “std::” when // qualifying the namespace of Standard Library objects to ensure that we’re // using the ABI-stable interface for a given platform. For completeness, we // also offer LUL_std for usage that isn’t tied to a particular ABI. // // To be clear, LUL_std_abi should be used in client APIs to indicate symbols // from the std namespace that could be affected by ABI differences between // between separate binaries that both include a given header. // APIME This is intended to track the emerging C++ ABI proposal. For now, // it’s really just a placeholder; the only value is for documentation. #ifndef LUL_std_abi #define LUL_std_abi std #endif #ifndef LUL_std #define LUL_std std #endif // The value of LUL_CONFIG_debug is 1 for debug builds and 0 for other builds. // It is set by the build system and passed in to the compiler. The value used // by client code does not have to match the library build’s (or even exist). // Debug builds include many static_asserts and other compile-time tests, add // extra data to log entries, log more than release builds, perform runtime // asserts, emit debugger symbol tables, disable most optimizations, and // generally do things thatshould never ever happen in shippng code. //#define LUL_CONFIG_debug 1 // Packaging Settings // // There are several settings used for packaging build products that are // defined elsewhere. These include: // // LUL_PACKAGING_api // LUL_PACKAGING_build // LUL_PACKAGING_copyright_date // LUL_PACKAGING_copyright_holder // LUL_PACKAGING_description // LUL_PACKAGING_prefix // LUL_PACKAGING_product_domain // LUL_PACKAGING_product_identifier // LUL_PACKAGING_product_name // LUL_PACKAGING_signature // LUL_PACKAGING_version // // See “lulPackaging.hpp” for details. // These can be used in prefix headers to indicate whether headers from the // C Standard Library, C++ STL, gsl, or boost should be precompiled. Note that // some header implementations will not work correctly when precompiled on a // given platform, and these are situationally disabled in the appropriate // include file, namely “lulPCH_boost.hpp” or “lpalPCH_std.hpp”. Also note // that relevant headers should always be included even if they are part of // the precompiled set in order to avoid unexpected problems should a given // header be removed, and as a form of documentation. Finally, note that these // settings only affect client code if they are set in the client; whether or // not they are used in component libraries should not matter. However, it is // recommended to enable these and make use of them in client code; nobody // likes excessively long builds. //#define LUL_CONFIG_use_prefix_std 1 //#define LUL_CONFIG_use_prefix_boost 0 //#define LUL_CONFIG_use_prefix_gsl 0 // Ideally, this should always be set to 1; the only reason to set it to 0 is // to allow support for reference implementations of Standard Library features // that require object code to work correctly, e.g., our versions of <any>, // <optional>, and <variant>. // FIXME This is incorrect, as currently we have a number of class and // function definitions that require object code to work correctly. // Additionally, there are vestigial startup and takedown functions that // previously held runtime environment configuration code and that might be // required again, should a future Standard Library feature reference // implementation require it; disabling them conditionally may create a // confusing situation for users. Most likely, we’ll just remove this switch, // as it’s not actually being used now, anyway, and it may represent a // pointless aspiration. #ifndef LUL_CONFIG_headers_only #define LUL_CONFIG_headers_only 0 #endif // The following feature switches specify which implementations to use for // various language features which may not be widely implemented at the // library level, yet, or may have broken implementations on some platforms. // These could be determined programmatically (using __has_include, for // example), but that would only tell us about the current build environment, // which may differ from the one used to build the library; the ABIs could // differ because of differences in implementation, among other things. As // such, these are for documentation as well as for dictating build // requirements. Changing one of these requires rebuilding every component // that links to Lucena Utilities. // <any> // This works in conjunction with LUL_LIBCPP17_ANY to determine what <any> // variant to use. Note that if LUL_LIBCPP17_ANY is not explicity defined, // it is assigned a value based on compile-time availability. By default, if // there is std support, that version of <any> will be used; if not, the // reference implementation will be used. Set LUL_CONFIG_force_local_any in // order to force the use of the reference implementation. #ifndef LUL_CONFIG_force_local_any #define LUL_CONFIG_force_local_any 0 #endif // Note that the following will be set appropriately in lulAnyWrapper.hpp. // // LUL_CONFIG_std_any_supported // <bit> // This works in conjunction with LUL_LIBCPP2A_BIT_CAST to determine what // <bit> variant to use. Note that if LUL_LIBCPP2A_BIT_CAST is not // explicity defined, it is assigned a value based on compile-time // availability. By default, if there is std support, that version of <bit> // will be used; if not, the reference implementation will be used. Set // LUL_CONFIG_force_local_bit_cast in order to force the use of the reference // implementation. // SEEME bit_cast is weird since it’s in the <bit> header, but was approved // independently of the rest of <bit>, in fact, in advance of it. We track // bit_cast separately from the rest of <bit> for this reason. #ifndef LUL_CONFIG_force_local_bit_cast #define LUL_CONFIG_force_local_bit_cast 0 #endif // Note that the following will be set appropriately in lulBitWrapper.hpp. // // LUL_CONFIG_std_bit_cast_supported // <filesystem> // These work in conjunction with LUL_LIBCPP17_FILESYSTEM to determine what // <filesystem> variant to use. Note that if LUL_LIBCPP17_FILESYSTEM is not // explicity defined, it is assigned a value based on compile-time // availability. By default, if there is std support, that version of // <filesystem> will be used; if not, the local reference implementation will // be used. Set LUL_CONFIG_force_local_filesystem in order to force the use of // the local implementation. #ifndef LUL_CONFIG_force_local_filesystem #define LUL_CONFIG_force_local_filesystem 0 #endif // Note that the following will be set appropriately in // lulFilesystemWrapper.hpp. // // LUL_CONFIG_std_filesystem_supported // <networking> // These work in conjunction with LUL_LIBCPPTS_NETWORKING to determine what // <networking> variant to use. Note that if LUL_LIBCPPTS_NETWORKING is not // explicity defined, it is assigned a value based on compile-time // availability. By default, if there is std support, that version of // <networking> will be used; if not, and if LUL_CONFIG_use_boost_networking // is set, networking will be used. Set LUL_CONFIG_force_boost_networking in // order to force the use of the boost implementation. Note that there is no // reference implementation for this; if the std version is unavailable and // the boost version is not allowed, there is no fallback. #ifndef LUL_CONFIG_use_boost_networking #define LUL_CONFIG_use_boost_networking 1 #endif #ifndef LUL_CONFIG_force_boost_networking #define LUL_CONFIG_force_boost_networking 0 #endif // Note that the following will be set appropriately in // lulNetworkingWrapper.hpp. // // LUL_CONFIG_boost_networking_supported // LUL_CONFIG_std_networking_supported // std::observer_ptr // This works in conjunction with LUL_LIBCPPTS_OBSERVER_PTR to determine // what observer_ptr variant to use. Note that if LUL_LIBCPPTS_OBSERVER_PTR // is not explicity defined, it is assigned a value based on the compile-time // availability of a relevant std header. By default, if there is std // support, that version of observer_ptr will be used; otherwise we fall back // to a reference implementation. Set LUL_CONFIG_force_local_observer_ptr in // order to force the use of the reference implementation. #ifndef LUL_CONFIG_force_local_observer_ptr #define LUL_CONFIG_force_local_observer_ptr 0 #endif // <optional> // This works in conjunction with LUL_LIBCPP17_OPTIONAL to determine what // <optional> variant to use. Note that if LUL_LIBCPP17_OPTIONAL is not // explicity defined, it is assigned a value based on the compile-time // availability of a relevant std header. By default, if there is std // support, that version of <optional> will be used; otherwise we fall back to // a reference implementation. Set LUL_CONFIG_force_local_optional in order // to force the use of the reference implementation. #ifndef LUL_CONFIG_force_local_optional #define LUL_CONFIG_force_local_optional 0 #endif // Note that the following will be set appropriately in // lulOptionalWrapper.hpp. // // LUL_CONFIG_std_optional_supported // std::shared_lock // In modern C++, shared locks are always available; this switch is only used // to express a preference for whether or not to use them when setting up // convenience aliases. #ifndef LUL_CONFIG_use_shared_lock #define LUL_CONFIG_use_shared_lock 1 #endif // <span> // These work in conjunction with LUL_LIBCPP2A_SPAN to determine what // <span> variant to use. Note that if LUL_LIBCPP2A_SPAN is not explicity // defined, it is assigned a value based on compile-time availability. By // default, if there is std support, that version of <span> will be used; // otherwise we fall back to a reference implementation. Set // LUL_CONFIG_force_local_span in order to force the use of the reference // implementation. #ifndef LUL_CONFIG_force_local_span #define LUL_CONFIG_force_local_span 0 #endif // Note that the following will be set appropriately in lulSpanWrapper.hpp. // // LUL_CONFIG_std_span_supported // <variant> // This works in conjunction with LUL_LIBCPP17_VARIANT to determine what // <variant> header to use. Note that if LUL_LIBCPP17_VARIANT is not explicity // defined, it is assigned a value based on the compile-time availability of a // relevant std header. By default, if there is std support, that version of // <variant> will be used; otherwise we fall back to a reference // implementation. Set LUL_CONFIG_force_local_variant in order to force the // use of the reference implementation. #ifndef LUL_CONFIG_force_local_variant #define LUL_CONFIG_force_local_variant 0 #endif // Note that the following will be set appropriately in // lulVariantWrapper.hpp. // // LUL_CONFIG_std_variant_supported // Diagnostic flag for indicating that we’d like to test the build environment // for feature availbility. If this is defined, the tests are performed and // the results are displayed as compile-time warnings. It is assumed that both // lulFeatureSetup.hpp and lulVersion.hpp have been included, as otherwise the // flags to be tested may not have been initialized. #define LUL_DIAGNOSTIC_feature_detection 0
; A340867: a(n) = (prime(n) - a(n-1)) mod 4; a(0)=0. ; 0,2,1,0,3,0,1,0,3,0,1,2,3,2,1,2,3,0,1,2,1,0,3,0,1,0,1,2,1,0,1,2,1,0,3,2,1,0,3,0,1,2,3,0,1,0,3,0,3,0,1,0,3,2,1,0,3,2,1,0,1,2,3,0,3,2,3,0,1,2,3,2,1,2,3,0,3,2,3,2,3,0,1,2,3,0 seq $0,8347 ; a(n) = Sum_{i=0..n-1} (-1)^i * prime(n-i). mod $0,4
; A021924: Expansion of 1/((1-x)(1-4x)(1-8x)(1-11x)). ; Submitted by Jon Maiga ; 1,24,389,5364,68025,821808,9633613,110741388,1256415809,14127007752,157849954197,1755978039972,19472809159753,215457395996256,2380083675784541,26261340423891516,289518110311522257,3189846161522961720,35129483453148283045,386753723762300622420,4256926209072678421721,46847270287162497254544,515488629081147994784109,5671724167365337134735084,62399759821175681987912545,686483709875689489789441128,7552011623380645090566238133,83077654375195600817300347908,913898410271315724350928225129 mov $1,1 mov $2,1 mov $3,2 lpb $0 sub $0,1 mul $1,11 mul $3,8 add $3,2 add $1,$3 mul $2,4 add $2,1 sub $1,$2 lpe mov $0,$1
; A338206: Inverse of A160016. ; 0,2,1,6,3,10,4,14,5,18,7,22,8,26,9,30,11,34,12,38,13,42,15,46,16,50,17,54,19,58,20,62,21,66,23,70,24,74,25,78,27,82,28,86,29,90,31,94,32,98,33,102,35,106,36,110,37,114,39,118,40,122,41,126,43,130,44,134,45,138,47,142,48,146,49,150,51,154,52,158 mov $1,$0 mod $0,2 sub $0,1 mul $1,2 lpb $0 mul $0,$2 add $3,1 add $1,$3 div $1,3 lpe
#include <sys/ioctl.h> #include <unistd.h> #include <Processors/Formats/Impl/PrettyBlockOutputFormat.h> #include <Formats/FormatFactory.h> #include <IO/WriteBuffer.h> #include <IO/WriteHelpers.h> #include <IO/WriteBufferFromString.h> #include <IO/Operators.h> #include <Common/PODArray.h> #include <Common/UTF8Helpers.h> namespace DB { namespace ErrorCodes { } PrettyBlockOutputFormat::PrettyBlockOutputFormat( WriteBuffer & out_, const Block & header_, const FormatSettings & format_settings_) : IOutputFormat(header_, out_), format_settings(format_settings_) { struct winsize w; if (0 == ioctl(STDOUT_FILENO, TIOCGWINSZ, &w)) terminal_width = w.ws_col; } /// Evaluate the visible width of the values and column names. /// Note that number of code points is just a rough approximation of visible string width. void PrettyBlockOutputFormat::calculateWidths( const Block & header, const Chunk & chunk, WidthsPerColumn & widths, Widths & max_padded_widths, Widths & name_widths) { size_t num_rows = std::min(chunk.getNumRows(), format_settings.pretty.max_rows); /// len(num_rows) + len(". ") row_number_width = std::floor(std::log10(num_rows)) + 3; size_t num_columns = chunk.getNumColumns(); const auto & columns = chunk.getColumns(); widths.resize(num_columns); max_padded_widths.resize_fill(num_columns); name_widths.resize(num_columns); /// Calculate widths of all values. String serialized_value; size_t prefix = 2; // Tab character adjustment for (size_t i = 0; i < num_columns; ++i) { const auto & elem = header.getByPosition(i); const auto & column = columns[i]; widths[i].resize(num_rows); for (size_t j = 0; j < num_rows; ++j) { { WriteBufferFromString out_serialize(serialized_value); auto serialization = elem.type->getDefaultSerialization(); serialization->serializeText(*column, j, out_serialize, format_settings); } /// Avoid calculating width of too long strings by limiting the size in bytes. /// Note that it is just an estimation. 4 is the maximum size of Unicode code point in bytes in UTF-8. /// But it's possible that the string is long in bytes but very short in visible size. /// (e.g. non-printable characters, diacritics, combining characters) if (format_settings.pretty.max_value_width) { size_t max_byte_size = format_settings.pretty.max_value_width * 4; if (serialized_value.size() > max_byte_size) serialized_value.resize(max_byte_size); } widths[i][j] = UTF8::computeWidth(reinterpret_cast<const UInt8 *>(serialized_value.data()), serialized_value.size(), prefix); max_padded_widths[i] = std::max<UInt64>(max_padded_widths[i], std::min<UInt64>(format_settings.pretty.max_column_pad_width, std::min<UInt64>(format_settings.pretty.max_value_width, widths[i][j]))); } /// And also calculate widths for names of columns. { // name string doesn't contain Tab, no need to pass `prefix` name_widths[i] = std::min<UInt64>(format_settings.pretty.max_column_pad_width, UTF8::computeWidth(reinterpret_cast<const UInt8 *>(elem.name.data()), elem.name.size())); max_padded_widths[i] = std::max<UInt64>(max_padded_widths[i], name_widths[i]); } prefix += max_padded_widths[i] + 3; } } namespace { /// Grid symbols are used for printing grid borders in a terminal. /// Defaults values are UTF-8. struct GridSymbols { const char * bold_left_top_corner = "┏"; const char * bold_right_top_corner = "┓"; const char * left_bottom_corner = "└"; const char * right_bottom_corner = "┘"; const char * bold_left_separator = "┡"; const char * left_separator = "├"; const char * bold_right_separator = "┩"; const char * right_separator = "┤"; const char * bold_top_separator = "┳"; const char * bold_middle_separator = "╇"; const char * middle_separator = "┼"; const char * bottom_separator = "┴"; const char * bold_dash = "━"; const char * dash = "─"; const char * bold_bar = "┃"; const char * bar = "│"; }; GridSymbols utf8_grid_symbols; GridSymbols ascii_grid_symbols { "+", "+", "+", "+", "+", "+", "+", "+", "+", "+", "+", "+", "-", "-", "|", "|" }; } void PrettyBlockOutputFormat::write(const Chunk & chunk, PortKind port_kind) { UInt64 max_rows = format_settings.pretty.max_rows; if (total_rows >= max_rows) { total_rows += chunk.getNumRows(); return; } auto num_rows = chunk.getNumRows(); auto num_columns = chunk.getNumColumns(); const auto & columns = chunk.getColumns(); const auto & header = getPort(port_kind).getHeader(); Serializations serializations(num_columns); for (size_t i = 0; i < num_columns; ++i) serializations[i] = header.getByPosition(i).type->getDefaultSerialization(); WidthsPerColumn widths; Widths max_widths; Widths name_widths; calculateWidths(header, chunk, widths, max_widths, name_widths); const GridSymbols & grid_symbols = format_settings.pretty.charset == FormatSettings::Pretty::Charset::UTF8 ? utf8_grid_symbols : ascii_grid_symbols; /// Create separators WriteBufferFromOwnString top_separator; WriteBufferFromOwnString middle_names_separator; WriteBufferFromOwnString middle_values_separator; WriteBufferFromOwnString bottom_separator; top_separator << grid_symbols.bold_left_top_corner; middle_names_separator << grid_symbols.bold_left_separator; middle_values_separator << grid_symbols.left_separator; bottom_separator << grid_symbols.left_bottom_corner; for (size_t i = 0; i < num_columns; ++i) { if (i != 0) { top_separator << grid_symbols.bold_top_separator; middle_names_separator << grid_symbols.bold_middle_separator; middle_values_separator << grid_symbols.middle_separator; bottom_separator << grid_symbols.bottom_separator; } for (size_t j = 0; j < max_widths[i] + 2; ++j) { top_separator << grid_symbols.bold_dash; middle_names_separator << grid_symbols.bold_dash; middle_values_separator << grid_symbols.dash; bottom_separator << grid_symbols.dash; } } top_separator << grid_symbols.bold_right_top_corner << "\n"; middle_names_separator << grid_symbols.bold_right_separator << "\n"; middle_values_separator << grid_symbols.right_separator << "\n"; bottom_separator << grid_symbols.right_bottom_corner << "\n"; std::string top_separator_s = top_separator.str(); std::string middle_names_separator_s = middle_names_separator.str(); std::string middle_values_separator_s = middle_values_separator.str(); std::string bottom_separator_s = bottom_separator.str(); if (format_settings.pretty.output_format_pretty_row_numbers) { /// Write left blank writeString(String(row_number_width, ' '), out); } /// Output the block writeString(top_separator_s, out); if (format_settings.pretty.output_format_pretty_row_numbers) { /// Write left blank writeString(String(row_number_width, ' '), out); } /// Names writeCString(grid_symbols.bold_bar, out); writeCString(" ", out); for (size_t i = 0; i < num_columns; ++i) { if (i != 0) { writeCString(" ", out); writeCString(grid_symbols.bold_bar, out); writeCString(" ", out); } const auto & col = header.getByPosition(i); if (format_settings.pretty.color) writeCString("\033[1m", out); if (col.type->shouldAlignRightInPrettyFormats()) { for (size_t k = 0; k < max_widths[i] - name_widths[i]; ++k) writeChar(' ', out); writeString(col.name, out); } else { writeString(col.name, out); for (size_t k = 0; k < max_widths[i] - name_widths[i]; ++k) writeChar(' ', out); } if (format_settings.pretty.color) writeCString("\033[0m", out); } writeCString(" ", out); writeCString(grid_symbols.bold_bar, out); writeCString("\n", out); if (format_settings.pretty.output_format_pretty_row_numbers) { /// Write left blank writeString(String(row_number_width, ' '), out); } writeString(middle_names_separator_s, out); for (size_t i = 0; i < num_rows && total_rows + i < max_rows; ++i) { if (i != 0) { if (format_settings.pretty.output_format_pretty_row_numbers) { /// Write left blank writeString(String(row_number_width, ' '), out); } writeString(middle_values_separator_s, out); } if (format_settings.pretty.output_format_pretty_row_numbers) { // Write row number; auto row_num_string = std::to_string(i + 1) + ". "; for (size_t j = 0; j < row_number_width - row_num_string.size(); ++j) { writeCString(" ", out); } writeString(row_num_string, out); } writeCString(grid_symbols.bar, out); for (size_t j = 0; j < num_columns; ++j) { if (j != 0) writeCString(grid_symbols.bar, out); const auto & type = *header.getByPosition(j).type; writeValueWithPadding(*columns[j], *serializations[j], i, widths[j].empty() ? max_widths[j] : widths[j][i], max_widths[j], type.shouldAlignRightInPrettyFormats()); } writeCString(grid_symbols.bar, out); writeCString("\n", out); } if (format_settings.pretty.output_format_pretty_row_numbers) { /// Write left blank writeString(String(row_number_width, ' '), out); } writeString(bottom_separator_s, out); total_rows += num_rows; } void PrettyBlockOutputFormat::writeValueWithPadding( const IColumn & column, const ISerialization & serialization, size_t row_num, size_t value_width, size_t pad_to_width, bool align_right) { String serialized_value = " "; { WriteBufferFromString out_serialize(serialized_value, WriteBufferFromString::AppendModeTag()); serialization.serializeText(column, row_num, out_serialize, format_settings); } if (value_width > format_settings.pretty.max_value_width) { serialized_value.resize(UTF8::computeBytesBeforeWidth( reinterpret_cast<const UInt8 *>(serialized_value.data()), serialized_value.size(), 0, 1 + format_settings.pretty.max_value_width)); const char * ellipsis = format_settings.pretty.charset == FormatSettings::Pretty::Charset::UTF8 ? "⋯" : "~"; if (format_settings.pretty.color) { serialized_value += "\033[31;1m"; serialized_value += ellipsis; serialized_value += "\033[0m"; } else serialized_value += ellipsis; value_width = format_settings.pretty.max_value_width; } else serialized_value += ' '; auto write_padding = [&]() { if (pad_to_width > value_width) for (size_t k = 0; k < pad_to_width - value_width; ++k) writeChar(' ', out); }; if (align_right) { write_padding(); out.write(serialized_value.data(), serialized_value.size()); } else { out.write(serialized_value.data(), serialized_value.size()); write_padding(); } } void PrettyBlockOutputFormat::consume(Chunk chunk) { write(chunk, PortKind::Main); } void PrettyBlockOutputFormat::consumeTotals(Chunk chunk) { total_rows = 0; writeSuffixIfNot(); writeCString("\nTotals:\n", out); write(chunk, PortKind::Totals); } void PrettyBlockOutputFormat::consumeExtremes(Chunk chunk) { total_rows = 0; writeSuffixIfNot(); writeCString("\nExtremes:\n", out); write(chunk, PortKind::Extremes); } void PrettyBlockOutputFormat::writeSuffix() { if (total_rows >= format_settings.pretty.max_rows) { writeCString(" Showed first ", out); writeIntText(format_settings.pretty.max_rows, out); writeCString(".\n", out); } } void PrettyBlockOutputFormat::finalize() { writeSuffixIfNot(); } void registerOutputFormatProcessorPretty(FormatFactory & factory) { factory.registerOutputFormatProcessor("Pretty", []( WriteBuffer & buf, const Block & sample, const RowOutputFormatParams &, const FormatSettings & format_settings) { return std::make_shared<PrettyBlockOutputFormat>(buf, sample, format_settings); }); factory.registerOutputFormatProcessor("PrettyNoEscapes", []( WriteBuffer & buf, const Block & sample, const RowOutputFormatParams &, const FormatSettings & format_settings) { FormatSettings changed_settings = format_settings; changed_settings.pretty.color = false; return std::make_shared<PrettyBlockOutputFormat>(buf, sample, changed_settings); }); } }
; A285076: 1-limiting word of the morphism 0->10, 1-> 010. ; 1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1 mov $3,$0 mov $5,2 lpb $5 mov $0,$3 sub $5,1 add $0,$5 sub $0,1 mul $0,2 pow $0,2 mov $4,2 lpb $0 add $4,4 trn $0,$4 lpe mov $2,$5 add $4,6 lpb $2 mov $1,$4 sub $2,1 lpe lpe lpb $3 sub $1,$4 mov $3,0 lpe sub $1,4 div $1,4
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <tencentcloud/iai/v20200303/model/GroupCandidate.h> using TencentCloud::CoreInternalOutcome; using namespace TencentCloud::Iai::V20200303::Model; using namespace std; GroupCandidate::GroupCandidate() : m_groupIdHasBeenSet(false), m_candidatesHasBeenSet(false) { } CoreInternalOutcome GroupCandidate::Deserialize(const rapidjson::Value &value) { string requestId = ""; if (value.HasMember("GroupId") && !value["GroupId"].IsNull()) { if (!value["GroupId"].IsString()) { return CoreInternalOutcome(Error("response `GroupCandidate.GroupId` IsString=false incorrectly").SetRequestId(requestId)); } m_groupId = string(value["GroupId"].GetString()); m_groupIdHasBeenSet = true; } if (value.HasMember("Candidates") && !value["Candidates"].IsNull()) { if (!value["Candidates"].IsArray()) return CoreInternalOutcome(Error("response `GroupCandidate.Candidates` is not array type")); const rapidjson::Value &tmpValue = value["Candidates"]; for (rapidjson::Value::ConstValueIterator itr = tmpValue.Begin(); itr != tmpValue.End(); ++itr) { Candidate item; CoreInternalOutcome outcome = item.Deserialize(*itr); if (!outcome.IsSuccess()) { outcome.GetError().SetRequestId(requestId); return outcome; } m_candidates.push_back(item); } m_candidatesHasBeenSet = true; } return CoreInternalOutcome(true); } void GroupCandidate::ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const { if (m_groupIdHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "GroupId"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_groupId.c_str(), allocator).Move(), allocator); } if (m_candidatesHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "Candidates"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator); int i=0; for (auto itr = m_candidates.begin(); itr != m_candidates.end(); ++itr, ++i) { value[key.c_str()].PushBack(rapidjson::Value(rapidjson::kObjectType).Move(), allocator); (*itr).ToJsonObject(value[key.c_str()][i], allocator); } } } string GroupCandidate::GetGroupId() const { return m_groupId; } void GroupCandidate::SetGroupId(const string& _groupId) { m_groupId = _groupId; m_groupIdHasBeenSet = true; } bool GroupCandidate::GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; } vector<Candidate> GroupCandidate::GetCandidates() const { return m_candidates; } void GroupCandidate::SetCandidates(const vector<Candidate>& _candidates) { m_candidates = _candidates; m_candidatesHasBeenSet = true; } bool GroupCandidate::CandidatesHasBeenSet() const { return m_candidatesHasBeenSet; }
//Robert Ietswaart //20160924 //FCA_52.cpp #include <iostream> #include <fstream> #include <math.h> #include <ctime> #include <cstdlib> #include <stdio.h> #include <stdlib.h> #include <algorithm> #include <cstring> #include "MersenneTwister.h" #include "FCA_52_table.h" using namespace std; const double Time = 10*24*60*60;//Time in s const int cap =1000;//artificial cap that HMT and FLD levels shouldn't exceed const int L=209,I1A=127,I1D=14,sTSS=4,asTSS=208,sTES=204;// 30 bp(Pol II footprint),R2= region to switch to S2 (see review) MTRand mtrand1; // = properly seeding //MTRand mtrand1(1973); //MTRand mtrand1(1000); // for test, so that seed=1973 is the same for all testruns, to detect bug more easily! inline char* itoa(long int i){ static char a[256]={0}; sprintf(a,"%ld",i); return a; }//convert from int to string (char array) int GetGroupNumber (double* p_g, double p_s, int N_g, bool& faal){ double help=0.0; double r2= mtrand1.rand(p_s);//uniform in [0,p_s] int i, groupnumber=-1; for(i=1;i<N_g;i++){ help=help+p_g[i]; if(r2<=help){ groupnumber = i; i=N_g-1;//we are done so set i to end value }//if }//for i if( (groupnumber <= 0) || (groupnumber >= N_g)){//mag niet, er wordt gesampled uit 1..N_g cout << "faalaap" << endl; faal = 1; }//if return groupnumber; }//GetGroupNumber //membernumber = aantal members in group groupnumber (>=1, <NR) //groupnumber is index of group (>=1) int RejectionSample ( int** index, double * p, int membernumber, int groupnumber, double pmin, bool & faal, double t){ int reaction; double r3; int n=0,r4; do { r3=pmin*pow(2.0,double(groupnumber)); r3= mtrand1.rand( r3 ); r4=membernumber-1; r4=mtrand1.randInt( r4 ); //should be int in 0..(membernumber-1) reaction= index[groupnumber][r4]; if (r4 < membernumber){ reaction= index[groupnumber][r4]; }//if else{ cout << "fail,groupnumber=" << groupnumber<< " membernumber=" << membernumber << " x=" << r4 << " reaction=" << reaction << " p[reaction]=" << p[reaction] << endl; reaction= index[groupnumber][(r4-1)]; //dit is natuurlijk een faaloplossing, met MT moet dit gewoon goed gaan altijd! }//else //temp n++; if (n>=100){ cout << "inf sampling loop, groupnumber=" << groupnumber<< " membernumber=" << membernumber << " x= " << r4 << " reaction=" << reaction << " p[reaction]=" << p[reaction] << endl; faal = 1; break; }//if checktime //temp }while(r3 > p[reaction]); return reaction; }//Sample double SetPmin (double k0,double k1,double k2,double k3,double k4,double k5,double k6,double k7,double k8,double k9, int& Ng){ int arraysize=9;//arraysize is number of rates involved double kmin, k_sort[arraysize]; k_sort[0]=k0; k_sort[1]=k1; k_sort[2]=k2; k_sort[3]=k3; k_sort[4]=k4; k_sort[5]=k5; k_sort[6]=k6; k_sort[7]=k7; k_sort[8]=k8; // k_sort[9]=k9; sort(k_sort,k_sort+arraysize); kmin= k_sort[0]; k_sort[0]=k0; k_sort[1]=k1*cap;//unsFLC k_sort[2]=k2*cap; k_sort[3]=k3*cap; k_sort[4]=k4; k_sort[5]=k5; k_sort[6]=k6*cap; k_sort[7]=k7*cap; k_sort[8]=k8; //k_sort[9]=k9; sort(k_sort,k_sort+arraysize); cout << "pmax = " << k_sort[arraysize-1] << endl; //Ng is smallest integer such that pmax < pmin*2^Ng frexp((k_sort[arraysize-1]/kmin),&Ng); Ng++;//1 bigger because you also have group 0 return kmin; }//SetPmin //known site has to be deleted from group void DeleteReactionToGroup (int** group2reaction,int site, int* membernumber, int** reaction2group){ int group, index; group = reaction2group[site][0]; index = reaction2group[site][1]; group2reaction[group][index]= group2reaction[group][(membernumber[group]-1)];//last site one goes into place of to be deleted one reaction2group[group2reaction[group][(membernumber[group]-1)] ][0]= group;// fix reaction2group of last site, not deleted one! reaction2group[group2reaction[group][(membernumber[group]-1)] ][1]= index; group2reaction[group][(membernumber[group]-1)]=-1;//delete last element of group2reaction membernumber[group]=membernumber[group]-1;//now the group has one member less reaction2group[site][0]= -1; reaction2group[site][1]= -1; }//DeleteReactionFromIndex //NB if propensity is zero. it is in group=0 //always first delete from old group/index, then add to new one //site is a known reaction index, groupnumber calculated via frexp void AddReactionToGroup(int** group2reaction, int group, int site, int* membernumber, int** reaction2group){ group2reaction[group][membernumber[group]]=site;//added at end of group2reaction reaction2group[site][0]=group;//fix reaction2group reaction2group[site][1]=membernumber[group]; membernumber[group]=membernumber[group]+1; }//AddReactionToGroup double ElonXP(double* k, int** r){ double pnew; if((*r[2]+*r[3])==0){ pnew=(*r[0]+*r[1])*k[0]; }//if new site not occupied by P2 else{ pnew=0; }//if new site occupied, can't elongate //r[0]=sP at site; //r[1]=sS1 at site; //r[2]=sP at neighboring site //r[3]=sS1 at neighboring site return pnew; }//ElonXP double LoadP(double* k, int** r){ double pnew; if((*r[0]==0) && (*r[1]==1)){ pnew=k[0]; }//if new site not occupied by P2 else{ pnew=0; }//if new site occupied, can't fire //r[0]=sP at TSS site //r[1]= STATE return pnew; }//LoadElonP //site is reaction index double CalculateP (double** k, int*** r, char RT, int site){ double pnew; if (RT==0){ pnew=0; }//virtual reaction else if (RT==1){ pnew = k[site][0]*(*r[site][0]);//first order reaction }//first order reaction (B CoT splicing, C D IN[i,j] degradation, G H I J RNA metabolism, L switch to OFF STATE else if (RT==2){ pnew = ElonXP(k[site],r[site]); }// if A sX elongation else if (RT==3){ pnew= k[site][0]*(*r[site][0]+*r[site][1]);//sP+sS1 }//if E Pol II drop off else if (RT==4){ pnew= LoadP(k[site],r[site]); }//if F sP firing else if (RT==5){ pnew = k[site][0]*(1-*r[site][0]); }// if K switch to ON STATE else{ cout << "faal, dit reactietype is niet toegestaan " << RT << " " << k[site] << " " << k[site] << " site="<< site << endl; pnew=0;//temp faal oplossing, deze shit mag eenvoudig niet voorkomen }// else // cout << pnew << endl; return pnew; }//double CalculateP void SetP (double * p, double** k, int*** r, char* RT, int * g_membernumber,int ** group2reaction, int NR ,double pmin, int** reaction2group){ int i, g; for(i=0;i< NR; i++){// initial propensity reactions // cout << "SetP0 i=" << i << endl; p[i]=CalculateP(k,r,RT[i],i); frexp((p[i]/pmin),&g); // cout << "SetP1 p[i]=" << p[i] << " p[i]/pmin" << p[i]/pmin << endl; AddReactionToGroup(group2reaction,g,i,g_membernumber, reaction2group); // cout << "SetP2 g=" << g << endl << endl; }//for i }//SetP void SetPgroup (double * p, double * p_group, int N_group, int * membernumber, int ** index){ int i,j; for(i=0;i<N_group;i++){ p_group[i]=0; for(j=0;j<membernumber[i];j++){ p_group[i]= p_group[i]+p[index[i][j]]; }//for j }//for }//SetPgroup double SetPsum ( double* p_g, int N_g){ int i; double p_s=0; for(i=1;i<N_g;i++){//only nonzero propensity groups (1..N_g) are added p_s=p_s+p_g[i]; }//for return p_s; }//setPsum void UpdatePgroup(double pold, double pnew, double* pg, int group, double pmin){ pg[group]=pg[group]+pnew-pold; if (pg[group]<((pmin*8)/10)){//Shabby solution for problem of floating point values pg[group]=0; }//if }//UpdatePgroup //sum over g=1..Ng-1, the groups with nonzero propensity double UpdatePsum(double* pg, int Ng){ int i; double help=0; for(i=1;i<Ng; i++){ help = help + pg[i]; }//for i return help; }//UpdatePsum void UpdateP2 (double* p, double pnew, int** group2reaction, int* g_membernumber, int** reaction2group, double* pg, double pmin, int site){ int g;//groupnumber if (pnew != p[site]){ frexp((pnew/pmin),&g);//calculate new groupnumber //cout << "Up2 0 g="<< g << endl; if (g!= (reaction2group[site][0])){ UpdatePgroup(p[site],0,pg, reaction2group[site][0],pmin);//old group UpdatePgroup(0,pnew, pg,g,pmin);//new group DeleteReactionToGroup (group2reaction,site ,g_membernumber,reaction2group); AddReactionToGroup(group2reaction, g,site,g_membernumber, reaction2group); p[site]=pnew; //cout << "Up2 1 p=" << p[site] << " site=" << site << endl; }//if different group else{ UpdatePgroup(p[site],pnew,pg, reaction2group[site][0],pmin);//same group p[site]=pnew; //cout << "Up2 2 p=" << p[site] <<" site=" << site << endl; }//pnew still in same group }//if pnew!= p[site], anders hoef je geen actie te ondernemen }//UpdateP2 //m is current reaction void PerformReaction(int m, int*** r, int** connect, int* sizecon,int* sP,int* sS1,int** IN,int& sFLC,int& unsFLC,int& s1FLC,int& STATE,double t,bool& fout){ int i,j;//positions on grid if( m < (L-1) ){ i=m; if (sP[i]>0){ sP[i]--; sP[i+1]++; }//if sP else if (sS1[i]>0){ sS1[i]--; sS1[i+1]++; }//if sS1 //temp if (sP[i]<0 || sP[i+1]>1 || sS1[i]<0 || sS1[i+1]>1){ cout << endl << "cA " << "sP[i]= " << sP[i] << "sP[i+1]= " << sP[i+1] <<"sS1[i]= " << sS1[i] << "sS1[i+1]= " << sS1[i+1] << " m=" << m << " i="<< i << endl; fout=1; } //temp }//A 0 L-1: sX elongation i>i+1 else if(m < (2*L-1)){ i=m-(L-1); sP[i]--; sS1[i]++; IN[I1D][sTSS+I1A-1]++; //temp if (sP[i]<0 || sS1[i]>1 || IN[I1D][sTSS+I1A-1]>cap ){ cout << endl << "cB " << "sP[i]= " << sP[i] << " sS1[i]= " << sS1[i] << "IN[I1D][I1A]= " << IN[I1D][sTSS+I1A-1] << " m=" << m << " i=" << i << endl; fout=1; } //temp }//B 1 L: sP[i] > sS1[i] + IN[I1D,I1A] else if (m <(L*L+2*L-1)){ i=(m-2*L+1)%L; j=(m-2*L+1)/L; IN[i][j]--; IN[i+1][j]++; if(i+1==j){ IN[i+1][j]--; }//if end of transcript, then reaction: IN > void //temp if (IN[i][j]<0 || IN[i+1][j]>cap){ cout << endl << "cC =" << "IN[i][j]= " << IN[i][j] << "IN[i+1][j]= " << IN[i+1][j] << " m=" << m << " i=" << i << " j=" << j << endl; fout=1; } //temp }//C 2 L*L: IN[i,j] > IN[i+1,j] (void if i+1=j) else if (m <(2*L*L+2*L-1)){ i=(m-L*L-2*L+1)%L; j=(m-L*L-2*L+1)/L; IN[i][j]--; IN[i][j-1]++; if(i==j-1){ IN[i][j-1]--; }//if end of transcript, then reaction: IN > void //temp if (IN[i][j]<0 || IN[i][j-1]>cap){ cout << endl << "cD =" << "IN[i][j]= " << IN[i][j] << "IN[i][j-1]= " << IN[i][j-1] << " m=" << m << " i=" << i << " j=" << j << endl; fout=1; } //temp }//D 3 L*L: IN[i,j] > IN[i,j-1] (void if i=j-1) else if (m ==(2*L*L+2*L-1) ){ if (sP[sTES]>0){ sP[sTES]--; unsFLC++; }//if sP else if (sS1[sTES]>0){ sS1[sTES]--; s1FLC++; }//if sS1 //temp if (sP[sTES]<0 || unsFLC>cap || sS1[sTES]<0 || s1FLC>cap){ cout << endl << "cE " << "sP[sTES]= " << sP[sTES] << " sS1[sTES]= " << sS1[sTES] << " unsFLC= " << unsFLC << " s1FLC= " << s1FLC << " m=" << m << endl; fout=1; }//if //temp }//E 4 1: sX[sTES] > unsFLC (or s1sFLC) else if (m == (2*L*L+2*L) ){ sP[sTSS]++; //temp if (sP[sTSS]>1){ cout << endl << "cF =" << " sP[TSS]= " << sP[sTSS] << " m=" << m << endl; fout=1; } //temp }//F 5 1: void (+STATE) > sP[sTSS] else if (m == (2*L*L+2*L+1) ){ unsFLC--; s1FLC++; IN[I1D][sTSS+I1A-1]++; //temp if (unsFLC<0 || s1FLC>cap || IN[I1D][sTSS+I1A-1]>cap){ cout << endl << "cG =" << "unsFLC= " << unsFLC << "s1FLC= " << s1FLC << "IN[I1D][I1A]= " << IN[I1D][sTSS+I1A-1] << " m=" << m << endl; fout=1; } //temp }//G 1 1: unsFLC > s1FLC + IN[I1D,I1A] else if (m == (2*L*L+2*L+2) ){ //unsFLC--; //sFLC++; //IN[I1D][sTSS+I1A-1]++; //temp //if (unsFLC<0 || IN[I1D][sTSS+I1A-1]>cap || sFLC>cap){ cout << endl << "cH =" << "unsFLC= " << unsFLC << " IN[I1D][I1A]= " << IN[I1D][sTSS+I1A-1] << " sFLC=" << sFLC << " m=" << m << endl; fout=1; //} //temp }//H 6 1: unsFLC > sFLC + IN[I1D,I1A]> NOT ALLOWED ANYMORE, because it speeds up splicing artificially else if (m == (2*L*L+2*L+3) ){ s1FLC--; sFLC++; //temp if (s1FLC<0 || sFLC>cap){ cout << endl << "cI =" << "s1FLC= " << s1FLC << " sFLC=" << sFLC << " m=" << m << endl; fout=1; } //temp }//I 6 1: s1FLC > sFLC else if (m == (2*L*L+2*L+4) ){ sFLC--; //temp if (sFLC<0){ cout << endl << "cJ =" << "sFLC= " << sFLC << " m=" << m << endl; fout=1; } //temp }//J 7 1: sFLC > void else if (m == (2*L*L+2*L+5) ){ STATE=1; }//K 8 1: OFF > ON else if (m == (2*L*L+2*L+6) ){ STATE=0; }//L 9 1: ON > OFF //temp else{ cout << "faal Perf reacton m=" << m << endl; }//else //temp }//PerformReaction //you only get in here if propensity actually changes void UpdateP1 (int m, double* p, double** k, int*** r, char* rt, int** connect , int* sizecon,int** group2reaction, int* g_membernumber, int** reaction2group, double* pg, int Ng, double pmin, double& ps){ int i, site; double pnew; // cout << "m= " << m << endl; for (i=0; i<(sizecon[m]);i++){ site=connect[m][i];//site is current reaction dependent on m //cout << "site= " << site << endl; pnew = CalculateP (k,r,rt[site],site); UpdateP2(p,pnew, group2reaction, g_membernumber, reaction2group, pg, pmin,site); }//for all dependent reactions ps=UpdatePsum(pg,Ng); if (ps <= 0){ cout << "3faal psum=" << ps << endl; }//if }//UpdateP void OutputToFile(int* sP,int* sS1,int** IN,int sFLC,int unsFLC,int s1FLC, double Vol ,string fname){ ofstream output; int i,j,Us=0,Um=0,U5=0,U3=0,Loc=0; Loc=unsFLC+s1FLC; for(i=(sTES-11);i<(sTES+1);i++){//2/3 of mRNA exon signal=11sites upstream of sTES Loc=Loc+sP[i]+sS1[i]; }//for i Us=unsFLC; for(i=I1D+(sTSS+I1A-I1D)*2/3;i<L;i++){ Us=Us+sP[i]; }//for i for(i=I1D;i<I1D+(sTSS+I1A-I1D)/3;i++){ for(j=i+(sTSS+I1A-I1D)*2/3;j<(sTSS+I1A);j++){ Us=Us+IN[i][j]; }//for j }//for i Um=unsFLC; for(i=I1D+(sTSS+I1A-I1D)*7/12;i<L;i++){ Um=Um+sP[i]; }//for i for(i=I1D;i<I1D+(sTSS+I1A-I1D)/4;i++){ for(j=I1D+(sTSS+I1A-I1D)*7/12;j<(sTSS+I1A);j++){ Um=Um+IN[i][j]; }//for j }//for i for(i=I1D+(sTSS+I1A-I1D)/4;i<I1D+(sTSS+I1A-I1D)*5/12;i++){ for(j=i+(sTSS+I1A-I1D)/3;j<(sTSS+I1A);j++){ Um=Um+IN[i][j]; }//for j }//for i U5=unsFLC; for(i=I1D+(sTSS+I1A-I1D)/3;i<L;i++){ U5=U5+sP[i]; }//for i for(i=I1D;i<I1D+(sTSS+I1A-I1D)/6;i++){ for(j=i+(sTSS+I1A-I1D)/3;j<I1D+(sTSS+I1A-I1D)/2;j++){ U5=U5+IN[i][j]; }//for j for(j=I1D+(sTSS+I1A-I1D)/2;j<(sTSS+I1A);j++){ U5=U5+IN[i][j]; }//for j }//for i U3=unsFLC; for(i=I1D+(sTSS+I1A-I1D)*5/6;i<L;i++){ U3=U3+sP[i]; }//for i for(i=I1D;i<I1D+(sTSS+I1A-I1D)/2;i++){ for(j=I1D+(sTSS+I1A-I1D)*5/6;j<(sTSS+I1A);j++){ U3=U3+IN[i][j]; }//for j }//for i for(i=I1D+(sTSS+I1A-I1D)/2;i<I1D+(sTSS+I1A-I1D)*2/3;i++){ for(j=i+(sTSS+I1A-I1D)/3;j<(sTSS+I1A);j++){ U3=U3+IN[i][j]; }//for j }//for i if (Us==0){//output conditional Loc|Us>0 distribution for comparison with model, but also keep info for when Us=0 Loc=Loc-100; }//else output.open (fname.c_str(), ios::app); if(!output) { cout << "cannot open f file. \n"; }//!foutput output << Vol << " " << sFLC << " " << Us << " " << Um << " " << U5 << " " << U3 << " " << Loc << " " << unsFLC << " " << s1FLC << endl; output.close(); }//OutputToFile void FaalFunctie(int* sP,int* sS1,int** IN,int sFLC,int unsFLC,int s1FLC,int STATE,double* p,double* p_group,int*** r,int* r_membernumber,int*sizecon,int** connect,int** reaction2group,int counter,double psum,int NR,int N_group,double t,int groupnumber,int currentreaction){ int i,j; cout << endl << "counter= " << counter << " t=" << t << " groupnumber=" << groupnumber << " currentreaction=" << currentreaction << endl; cout << "sFLC= " << sFLC << endl << "unsFLC= " << unsFLC << endl << "s1FLC= " << s1FLC << endl << "STATE= " << STATE << endl; // cout << "*r " << endl; // for(i=0;i<NR;i++){ // if (r_membernumber[i]>0){ // cout << *r[i][0] << " "; // } // else{ // cout << "na "; // } // }//for i // cout << endl; cout << "sP[] " << endl; for(i=0;i<L;i++){ cout << sP[i] << " "; }//for i cout << endl; cout << "sS1[] " << endl; for(i=0;i<L;i++){ cout << sS1[i] << " "; }//for i cout << endl; cout << "IN[] " << endl; // for(i=0;i<L;i++){ // for(j=0;j<L;i++){ // cout << IN[i][j] << " "; // }//for j // cout << endl; // }//for i // cout << endl; cout << "p[] "<< endl; //TEMP cout << p[2*L*L+2*L] << endl; //TEMP // for(i=0;i<NR;i++){ // cout << p[i] << " "; // }//for i // cout << endl; cout << "pgroup[] "<< endl; for(i=0;i<N_group;i++){ cout << p_group[i] << " "; }//for cout << endl << "psum = " << psum << endl; for (i=0;i<sizecon[currentreaction];i++){ cout << connect[currentreaction][i] << " "; }//for cout << endl << " r2g="<< reaction2group[currentreaction][0] << " " << reaction2group[currentreaction][1] << " p[currentreaction]=" << p[currentreaction]<< endl; }//FaalFunctie //temp int main (int argc, char* argv[]) { //int main () { string date,sn,hname,fname,pname,sname,ename; ofstream output; int i,j,counter=0; int N_group,groupnumber,currentreaction; int sFLC=0,unsFLC=0,s1FLC=0,STATE=1; double t=0,tau,r1,pmin; double Vol,Nloci,beta,k0,k1,k2,k3,k4,k5,k6,k7,k8,k9; //temp bool faal =0; //temp int NR = 2*L*L+2*L+7;//number of reactions date=string(argv[1]); sn=string(argv[2]); Vol=atof(argv[3]); //Model parameters Nloci=2.5; beta=31; //unit: pL^-1, exp determined k0 = 0.1;//atof(argv[4]);//elongation rate k1 = 0.0015;//atof(argv[5]);//splicing (intron processing) rate k2 = 0.067;//site s^-1 intronic RNA degradation 5'> 3': estimated k3 = 0.067;//site s^-1 intronic RNA degradation 3'> 5': estimated k4 = 0.02;//polyadenylation/P drop off, fixed parameter from literature Neugebauer PLoSB, Singer NatSMB k6 = 0.0005;//0.0003*Vol;//RNA release rate: manually fitted k7 = 0.000033;//FLC mRNA degradation rate t1/2=5.9h: exp determined k8 = 0.00005;//k_on: OFF>ON: manually fitted k9 = 0;//0.0003;//k_off: ON>OFF: manually fitted k5 = beta*Vol*k7/Nloci;//sense initiation rate cout << "FCA_52.cpp" << endl; pmin=SetPmin(k0,k1,k2,k3,k4,k5,k6,k7,k8,k9,N_group);// this also determines N_group cout << "Time= " << Time << "s" << endl; cout << "NR= " << NR << endl; cout << "pmin= " << pmin << endl; cout << "N_group= " << N_group << endl; cout << "L= " << L << " length of gene (sites), PolII footprint= 30bp" << endl; cout << "I1A (distance from sTSS, not site number!)= " << I1A << endl; cout << "I1D (site number)= " << I1D << endl; cout << "sTSS= " << sTSS << endl; cout << "asTSS= " << asTSS << endl; cout << "sTES= " << sTES << endl; cout << "cell Volume= " << Vol << endl; cout << "k0=elongation rate " << k0 << endl;//from Pol II fit, chromatinRNA fit cout << "k1=CoT splicing sense in1 rate " << k1 << endl;//estimated from smFISH cout << "k2=Intronic RNA degradation 5'> 3'(site/s) " << k2 << endl; cout << "k3=Intronic RNA degradation 3'> 5'(site/s) " << k3 << endl; cout << "k4=PolII drop off / pA s " << k4 << endl;//literature cout << "k5=sP s firing rate= " << k5 <<endl;//smFISH extracted cout << "k6=(s) RNA export rate " << k6 << endl;//estimated from fit smFISH cout << "k7=FLC RNA degradation rate " << k7 << endl;//smFISH measured cout << "k8=OFF>ON STATE rate " << k8 << endl; cout << "k9=ON>OFF STATE rate " << k9 << endl; date.append("_"); hname = date; fname = date; pname = date; hname.append("h"); fname.append("f"); pname.append("p"); hname.append(sn); fname.append(sn); pname.append(sn); hname.append(".txt"); fname.append(".txt"); pname.append(".txt"); //step(0) initialize reactants and other arrays int * sP=0; sP = new int [L];//number of sense PolII at sites int * sS1=0; sS1 = new int [L];//number of sense PolII at sites int ** IN=0; IN = new int* [L];//number of intron lariats with end at sites i,j for (i=0;i<L;i++){ IN[i]= new int [L]; sP[i]=0; sS1[i]=0; }//for i for (i=0;i<L;i++){ for (j=0;j<L;j++){ IN[i][j]=0; }//for j }//for i //group2reaction has indices of propensities as entries ordered by the group they belong t int ** group2reaction = 0; group2reaction = new int * [N_group]; for (i=0;i<N_group;i++){ group2reaction [i]= new int [NR]; for (j=0;j<NR;j++){ group2reaction[i][j]=-1; }//for j }//for i //entries are number of reactions in particular group int * g_membernumber=0; g_membernumber = new int [N_group]; for(i=0;i<N_group;i++){ g_membernumber[i]=0;//initially }//for i int* r_membernumber=0; r_membernumber = new int [NR]; SetR_membernumber (r_membernumber,L); int*** r = 0; r = new int** [NR]; for(i=0;i<NR;i++){ if (r_membernumber[i]>0){ r[i]= new int* [r_membernumber[i]]; }//if else{ r[i] = 0; }//else }//for i SetR(r,L,sP,sS1,IN,&sFLC,&unsFLC,&s1FLC,&STATE,sTSS,sTES); char* reactiontype = 0; reactiontype = new char [NR]; SetRT(reactiontype,L,I1A,I1D,sTSS,sTES); double** k = 0; k = new double* [NR]; for(i=0;i<NR;i++){ k[i]= new double [1]; k[i][0]=0; }//for i SetK(k,L,k0,k1,k2,k3,k4,k5,k6,k7,k8,k9); double* p = 0; p = new double [NR]; int** reaction2group = 0; reaction2group = new int * [NR]; for (i=0;i<NR;i++){ reaction2group[i]= new int [2];//[0]=group, [1]=position reaction2group[i][0]=-1;//initially reaction2group[i][1]=-1; }//for i SetP(p,k,r,reactiontype,g_membernumber,group2reaction,NR, pmin,reaction2group); int * sizecon = 0; sizecon = new int [NR]; SetSizecon(sizecon,L,sTSS,sTES); int ** connect =0; connect = new int * [NR]; for(i=0;i<NR;i++){ connect[i] = new int [sizecon[i]]; }// i SetCon(connect,L,sTSS,sTES,I1D,I1A); double * p_group = 0; p_group = new double[N_group]; SetPgroup (p,p_group, N_group,g_membernumber,group2reaction); double psum; psum=SetPsum(p_group,N_group); do { // cout << "loop0" << endl; r1=mtrand1.randDblExc();//step 1 tau=(1/psum)*log(1/r1);//step 2 do{ groupnumber = GetGroupNumber(p_group,psum,N_group, faal);//step 3a //quality control if((groupnumber < 0) || (groupnumber >= N_group) || g_membernumber[groupnumber]==0 || p_group[groupnumber]==0 ){ //faal =1; cout << "groupnumber assignment gaat fout groupnumber=" << groupnumber << endl; }//if //quality control }while((g_membernumber[groupnumber]==0) || (p_group[groupnumber]==0)); // cout << "loop2" << endl; currentreaction = RejectionSample(group2reaction,p,g_membernumber[groupnumber],groupnumber,pmin,faal,t);//step 3b //cout << currentreaction << endl; //quality control if(currentreaction < 0 || currentreaction > NR){ faal =1; cout << "current reaction gaat fout reactionindex=" << currentreaction << endl; }//if //quality control PerformReaction(currentreaction,r,connect,sizecon,sP,sS1,IN,sFLC,unsFLC,s1FLC,STATE,t,faal);//step 4 UpdateP1(currentreaction,p,k,r,reactiontype,connect,sizecon,group2reaction,g_membernumber,reaction2group,p_group,N_group,pmin,psum);//step 5 and 6a // cout << "loop3" << endl; //quality control if ( (psum<=0) ){ faal = 1; cout << "psum gaat fout pmin*pow(2.0,N_group)= " << pmin*pow(2.0,N_group); }//quality control //temp if (faal == 1){ FaalFunctie(sP,sS1,IN,sFLC,unsFLC,s1FLC,STATE,p,p_group,r,r_membernumber,sizecon,connect,reaction2group,counter,psum,NR,N_group,t,groupnumber,currentreaction); //faal=0; break; }//if //temp t=t+tau; counter++; }while(t<Time); OutputToFile(sP,sS1,IN,sFLC,unsFLC,s1FLC,Vol,fname); return 0; }//main
; A300622: Denominators of sequence whose exponential self-convolution yields sequence 1, 2, 3, 5, 7, 11, 13, ... (1 with primes). ; 1,1,2,1,4,4,8,4,16,16,32,16,64,64,128,64,256,256,512,256,1024,1024,2048,1024,4096,4096,8192,4096,16384,16384,32768,16384,65536,65536,131072,65536,262144,262144,524288,262144,1048576,1048576,2097152,1048576,4194304,4194304,8388608,4194304 mov $3,$0 mod $0,2 mov $1,1 add $1,$0 gcd $2,$1 mul $2,2 trn $1,$2 add $1,$2 div $3,$2 pow $1,$3 mov $0,$1
; Copyright 2020 James Larrowe ; ; This file is part of RAMDump. ; ; RAMDump is licensed under the MIT license; for more details, ; see the file LICENSE in the root of this repository. INCLUDE "addrs.inc" SECTION "interrupts", ROM0[$0040] vblank: reti ds 8 - (@ - vblank) lcd_stat: reti ds 8 - (@ - lcd_stat) timer: reti ds 8 - (@ - timer) serial: reti ds 8 - (@ - serial) joypad: reti
; A082850: Let S(0) = {}, S(n) = {S(n-1), S(n-1), n}; sequence gives S(infinity). ; 1,1,2,1,1,2,3,1,1,2,1,1,2,3,4,1,1,2,1,1,2,3,1,1,2,1,1,2,3,4,5,1,1,2,1,1,2,3,1,1,2,1,1,2,3,4,1,1,2,1,1,2,3,1,1,2,1,1,2,3,4,5,6,1,1,2,1,1,2,3,1,1,2,1,1,2,3,4,1,1,2,1,1,2,3,1,1,2,1,1,2,3,4,5,1,1,2,1,1,2,3,1,1,2,1 mov $1,12 lpb $0,1 mov $2,$0 cal $2,213724 ; Largest natural number x such that x=n+A000120(x), or zero if no such number exists. add $0,$2 sub $0,1 add $1,4 lpe sub $1,12 div $1,4 add $1,1
/* * ofxAndroidAccelerometer.cpp * * Created on: 28/11/2010 * Author: arturo */ #include <jni.h> #include "ofxAccelerometer.h" #include "ofxAndroidUtils.h" #include "ofLog.h" extern "C"{ void Java_cc_openframeworks_OFAndroidAccelerometer_updateAccelerometer( JNIEnv* env, jobject thiz, jfloat x, jfloat y, jfloat z ){ // android reports these in m/s^2, but ofxAccelerometer expects g's (1g = gravity = 9.81m/s^2) ofxAccelerometer.update(-x/9.81,-y/9.81,-z/9.81); } } void ofxAccelerometerHandler::setup(){ if(!ofGetJavaVMPtr()){ ofLog(OF_LOG_ERROR,"ofxAccelerometerHandler: Cannot find java virtual machine"); return; } JNIEnv *env; if (ofGetJavaVMPtr()->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) { ofLog(OF_LOG_ERROR,"Failed to get the environment using GetEnv()"); return; } jclass javaClass = env->FindClass("cc/openframeworks/OFAndroid"); if(javaClass==0){ ofLog(OF_LOG_ERROR,"cannot find OFAndroid java class"); return; } jmethodID setupAccelerometer = env->GetStaticMethodID(javaClass,"setupAccelerometer","()V"); if(!setupAccelerometer){ ofLog(OF_LOG_ERROR,"cannot find OFAndroid.setupAccelerometer method"); return; } env->CallStaticVoidMethod(javaClass,setupAccelerometer); } void ofxAccelerometerHandler::exit(){ }
; This file is part of the ZRDX 0.50 project ; (C) 1998, Sergey Belyakov DPMIFn MACRO Hi, Lo _T = $ org offset Table2&Hi&Label+Lo*4 DD _T-CurSegBase org _T ENDM DefineDPMITable2 MACRO P0, P1 LDWord Table2&P0 Table2&P0&Label label byte IF P1 GT 0 DD P1 dup(OffInvalidFunction) ENDIF ENDM BuildDPMITable2N MACRO P0, P1 DB P1 ENDM BuildDPMITable1 MACRO P0, P1 DD OffTable2&P0 ENDM RegisterDPMITables MACRO P LByte DPMITable2N IRP T, <P> BuildDPMITable2N T ENDM align 4 IRP T, <P> DefineDPMITable2 T ENDM LDWord DPMITable2 IRP T, <P> BuildDPMITable1 T ENDM ENDM Segm Text RegisterDPMITables <<0,0Eh>,<1,03>,<2,6>,<3,7>,<4,1>,<5,4>,<6,5>,<7,4>,<8,1>,<9,3>,<A,1>,<B,4>> ;assume cs:dgroup, ss:dgroup, es:nothing, ds:dgroup assume cs:Text, ss:nothing, es:nothing, ds:nothing DPMIFrame struc DPMIFrame_Ret DD ? DPMIFrame_EBP DD ? DPMIFrame_ESI DD ? DPMIFrame_DS DD ? DPMIFrame_ES DD ? DPMIFrame_FS DD ? DPMIFrame_GS DD ? DPMIFrame_SF CFrame <> DPMIFrame ends DPROC DPMIIntEntry cli push gs fs es ds esi ebp F = 6*4 mov ebp, ss cmp ah, 0Bh mov ds, ebp movzx esi, al movzx ebp, ah ja @@FnNumError cmp al, byte ptr ss:DPMITable2N[ebp] mov ebp, ss:DPMITable2[ebp*4] jae @@FnNumError call dword ptr [ebp+esi*4] ;clc or ebp, ebp ;faster then direct clc DPMIIret: lds esi, fword ptr ss:[esp+F].CFrESP ;load client ss:esp lea esi, [esi+12] ;instread of add to save CF push ds ;client ss push esi ;client new esp mov ebp, ds:[esi-4] ;load eflags from client iret frame rcr ebp, 1 ;copy CF to BIT0 of ebp rol ebp, 1 push ebp ;eflags push dword ptr ds:[esi-8] ;cs push dword ptr ds:[esi-12] ;eip mov es, ss:[esp+5*4+3*4] mov fs, ss:[esp+5*4+4*4] ;mov ebp, ss:[esp+5*4+5*4] mov gs, ss:[esp+5*4+5*4] ;mov gs, ebp mov ebp, ss:[esp+5*4] lds esi, ss:[esp+5*4+4] iretd DPMIError3N: pop ebp DPMIError2N: pop ebp pop ebp jmp DPMIErrorN DPMIError2InvSel: pop ebp DPMIError1InvSel: mov al, 22h ;invalid selector jmp DPMIError1 DPMIError2InvVal: pop ebp DPMIError1InvVal: mov al, 21h ;invalid value jmp DPMIError1 DPMIError4: pop ebp DPMIError3: pop ebp DPMIError2: pop ebp ;pop 2 dword from stack and ret error flag DPMIError1: ;pop 1 dword ... pop ebp ;drop return address jmp DPMIError LLabel InvalidFunction @@FnNumError: mov al, 1 DPMIError: mov ah, 80h DPMIErrorN: stc jmp DPMIIret FnRet MACRO ret ENDM DPMIFn 0 00 push ecx call AllocSelectors jc DPMIError1 FnRet DPMIFn 0 01 cmp bx, word ptr [esp].DPMIFrame_SF.CFrSS je DPMIError1InvSel ;cannot free current client stack ! call CheckSelector FreeDescriptor1: btr dword ptr ds:LDTFree, esi;clear alloc bit in flag vector mov byte ptr [ebp].5, 0 ;clear descriptor to prevent next use ;clear all freed client selectors on stack lea esi, [ebp-OffLDT+7] push eax mov ebp, -4*4 $do mov eax, esi xor eax, [ebp+esp+4*4+4].DPMIFrame_DS and eax, 0FFFCh $ifnot jnz mov dword ptr [ebp+esp+4*4+4].DPMIFrame_DS, eax $endif add ebp, 4 $enddo jnz pop eax FnRet DPMIFn 0 02 movzx ebp, word ptr LDTLimit shr ebp, 3 $do bt LDTDOS, ebp $ifnot jnc mov esi, ss:LDT[ebp*8] shr esi, 4 cmp bx, si je @@RetThis $endif $while dec ebp $enddo jnz push 1 call AllocSelectors jc DPMIError1 bts LDTDOS, esi movzx esi, bx shl esi, 4 mov word ptr [ebp].0, 0FFFFh mov [ebp].2, esi mov byte ptr [ebp].5, 0F3h ;Data R/W PL3 mode32 ;mov byte ptr [ebp].7, 0 FnRet @@RetThis: lea ebp, [ebp*8+7] mov ax, bp FnRet DPMIFn 0 03 mov ax, 8 FnRet DPMIFn 0 06 call CheckSelector ;(bx) mov ch, [ebp].7 mov cl, [ebp].4 mov dx, [ebp].2 FnRet DPMIFn 0 07 call CheckSelector ;(bx) mov [ebp].7, ch mov [ebp].4, cl mov [ebp].2, dx FnRet DPMIFn 0 08 call CheckSelector push edx shl edx, 16 mov dx, cx cmp cx, 0Fh $ifnot jbe ror edx, 12 add dx, 10h jnc DPMIError2InvVal2 or dl, 80h $endif and byte ptr ss:[ebp].6, 70h or byte ptr ss:[ebp].6, dl pop edx mov ss:[ebp], dx comment ^ push ecx cmp cx, 0Fh $ifnot jbe shl ecx, 16 mov cx, dx rol ecx, 4 xor cx, 0FFF0h test cx, 0FFF0h jne DPMIError2InvVal1 ;and cl, 0Fh or cl, 80h and byte ptr ss:[ebp].6, 70h or byte ptr ss:[ebp].6, cl shr ecx, 16 mov word ptr ss:[ebp], cx $else jmp mov word ptr ss:[ebp], dx and byte ptr ss:[ebp].6, 70h or byte ptr ss:[ebp].6, cl $endif pop ecx ^ FnRet @@CheckSelectorInCX: lar esi, ecx jnz DPMIError2InvVal shr esi, 9 and esi, 0FEh shr 1 cmp esi, 0FAh shr 1 jne DPMIError2InvVal ret DPMIError2InvVal2: pop edx push ebp DPMIError2InvVal1: pop ebp DPMIError1InvVal1: jmp DPMIError1InvVal ;check access right @@CheckACC: xchg ax, si xor al, 70h test al, 70h jnz DPMIError2InvVal ;this bits must be 1 test al, 80h ;descriptor is prezent? $ifnot jz ;do not check other if not prezent test ah, 20h jnz DPMIError2InvVal and al, 1110b ;first step - valid code descriptor ? cmp al, 1010b ;code-must be nonconform and readable $ifnot je ;not a valid code test al, 1000b jnz DPMIError2InvVal ;else bad descriptor $endif $endif xchg ax, si retn DPMIFn 0 09 call CheckSelector ;(bx) mov esi, ecx call @@CheckACC push ecx mov [ebp].5, cl and ch, 11010000b and byte ptr ss:[ebp].6, 101111b or ss:[ebp].6, ch pop ecx FnRet DPMIFn 0 0Ah call CheckSelector ;(bx) push dword ptr ss:[ebp] push edx mov edx, dword ptr [ebp+4] and dh, not 1100b ;now data with up extend or dh, 10b ;enable write push 1 call AllocSelectors mov esi, edx pop edx jc DPMIError2 mov [ebp+4], esi pop dword ptr ss:[ebp] FnRet DPMIFn 0 0Bh call CheckSelector mov esi, [ebp] mov es:[edi], esi mov esi, [ebp].4 mov es:[edi].4, esi FnRet DPMIFn 0 0Ch call CheckSelector movzx esi, word ptr es:[edi].5 call @@CheckACC mov esi, es:[edi] mov [ebp], esi mov esi, es:[edi].4 mov [ebp].4, esi FnRet DPMIFn 0 0Dh movzx esi, bx xor esi, 7 test esi, 7 jnz DPMIError1InvSel ;not an LDT PL3 selector cmp esi, 16*8+8 jae DPMIError1InvSel ;too large selector shr esi, 3 jz DPMIError1InvSel ;null selector bts LDTFree, esi jc DPMIError1InvSel ;not free selector ret DPMIFn 1 0 push 1 call AllocSelectors jc DPMIError1 push eax ;save selector mov ah, 48h ;Get Block ;mov ax, 0 ;mov ss, eax call Dos1Call $ifnot jnc btr LDTFree, esi ;clear alloc bit and dword ptr[ebp].4, 0 ;clear descriptor jmp DPMIError2N $endif pop esi ;add esp, 4 mov dx, si ;jmp SetupDOSSelector ;ebp - descriptor, ax - RM segment, bx - size in paragraphs DPROC SetupDOSSelector push eax ebx movzx eax, ax shl eax, 4 ;convert segment to LA mov [ebp].2, eax ;write base shl ebx, 4 ;convert size to bytes dec ebx ;if bx==0, DOS MUST return error mov [ebp], bx shr ebx, 16 and ebx, 0Fh ;or bl, 40h ;32-bit selector mov word ptr [ebp].6, bx mov byte ptr [ebp].5, 0F3h ;data R/W PL3 pop ebx eax ret ENDP DPMIFn 1 2 call CheckSelectorInDX push eax call @@GetSegment mov ah, 4Ah call Dos1Call jc DPMIError2N ;mov eax, esi ;reload segment from esi pop eax jmp SetupDOSSelector ;FnRet DPMIFn 1 1 call CheckSelectorInDX push esi call @@GetSegment mov ebp, eax cmp dx, word ptr [esp].DPMIFrame_SF.CFrSS je DPMIError1 ;cannot free current client stack ! mov ah, 49h ;Free block call Dos1Call jc DPMIError2N ;@@Err101 pop esi xchg eax, ebp lea ebp, LDT[esi*8] jmp FreeDescriptor1 ;convert descriptor based on ebp to RM segment in si and move eax to ebp @@GetSegment: mov esi, [ebp].2 test esi, 1111b ;Base must be segment aligned jnz @@Err101_ cmp byte ptr [ebp].7, 0 jne @@Err101_ ;too large base shl esi, 8 ;clear 8 hi bits shr esi, 12 ;convert to segment cmp esi, 10000h jae @@Err101_ ;too large base ret @@Err101_:mov ax, 9 ;return "invalid segment" jmp DPMIError3N ; call int 21h from PL1 ; RM<->PM transfers: ; before call: si -> es, ax, bx ; after return: ax, bx DPROC Dos1Call ;push ebp ;mov ebp, ds:[21h*4] ;int 21 push dword ptr ds:[21h*4] call DosPCall ;pop ebp retn ;call RM proc from PL1 ;before call: si -> es, eax, ebx will be transferred to RM ; ebp - rm proc far address ;after return: eax, ebx will be transferred from RM ;modify ebp DosPCall: push esi edi ebp fs gs F = 6*4 ;"pushad" + Dos1Call ret mov ebp, OffRMStack RRT mov edi, KernelStack1 push edi ;save Kernel1Stack F = F+4 push dword ptr ds:[edi-8] ;client ESP ;setup client stack pop dword ptr ss:[ebp][OffPMStack-OffRMStack] push dword ptr ds:[edi-4] ;elient SS pop dword ptr ss:[ebp][OffPMStack-OffRMStack][4] mov edi, [ebp] push edi ;save old real stack F = F+4 movzx ebp, di shr edi, 16 dec bp sub ebp, size VMIStruct-1 ;jb @@RStackOverflow push edi shl edi, 4 add edi, ebp pop [edi].VMI_SS add ebp, VMI_EAX mov [edi].VMI_ESP, ebp mov [edi].VMI_ES, esi ;es IFDEF VMM mov [edi].VMI_DS, esi ;es ENDIF mov dword ptr [edi].VMI_EAX, eax mov eax, ss:[esp+F] mov dword ptr [edi].VMI_IP, eax mov dword ptr [edi].VMI_EndIP, 0 org $-4 DW Dos1CallRetSwitchCode, seg DGROUP16 ;clc ;not needed: add ebp, VMI_EAX always clear cf pushfd pop eax mov [edi].VMI_Flags, ax mov [edi].VMI_EndFlags, ax mov KernelStack1, esp mov eax, edi jmp SwitcherToVM LLabel Dos1CallRet1 push ss pop ds push ss pop es pop RMStack RRT pop KernelStack1 mov eax, [ebp].RMS_EAX bt [ebp].RMS_Flags, 0 ;copy carry flag from DOS to CF pop gs fs ebp edi esi retn 4 ENDP ;simple jmp to fixed point at PL1 DPROC Dos1CallRet push Data1Selector push KernelStack1 push Code1Selector push OffDos1CallRet1 retf ;retf to pl1 ENDP ;bx - selector ;output: ebp -> pointer to descriptor or error handler call if selector incorrect ;destoy: esi CheckSelectorInDX: movzx esi, dx jmp short CheckSelector1 DPROC CheckSelector movzx esi, bx CheckSelector1: ;xor esi, 7 test esi, 4 jz DPMIError2InvSel ;client selector must points to LDT RPL 0-3 shr esi, 3 bt dword ptr LDTFree, esi jnc DPMIError2InvSel bt dword ptr LDTDOS, esi jc DPMIError2InvSel lea ebp, LDT[esi*8] retn ENDP ;stack - number of selectors to allocate ;return: ax - first allocated selector, ebp - pointer to descriptor ;esi - index of descriptor DPROC AllocSelectors @@T equ ebp @@TW equ bp @@T1 equ esi cmp word ptr [esp+4], 1 ;Error if less then 1 selector requred mov al, 21h jb @@Err mov al, 11h mov @@T1, 16-1 $do @@NextScan: inc @@T1 cmp @@T1, 2000h jae @@Err bt dword ptr LDTFree, @@T1 $enddo jc movzx @@T, word ptr [esp+4] ;Count $do jmp cmp @@T1, 2000h jae @@Err bt dword ptr LDTFree, @@T1 jc @@NextScan $while inc @@T1 dec @@T $enddo jnz ;interval found lea @@T, [@@T1*8+7] sub @@TW, LDTLimit $ifnot jbe push @@T push @@T movzx @@T, LDTLimit add @@T, OffLDT push @@T push 0 call AllocPages jc @@Err pop @@T add LDTLimit, @@TW mov @@TW, LDTSelector DB CallFarCode DD 0 DW LoadLDTGateSelector $endif movzx @@T, word ptr [esp+4] $do dec @@T1 bts dword ptr LDTFree, @@T1 and LDT[@@T1*8], 0 mov dword ptr LDT[@@T1*8+4], 40F200h dec @@T $enddo jnz lea ebp, [@@T1*8+7] mov ax, bp lea ebp, LDT[ebp-7] ;ebp - pointer to first descriptor clc @@ret: retn 4 @@Err: stc jmp @@ret ENDP DPMIFn 2 0 movzx ebp, bl mov cx, [ebp*4][2] mov dx, [ebp*4][0] FnRet ;set real mode vector DPMIFn 2 1 movzx ebp, bl mov [ebp*4][2], cx mov [ebp*4], dx FnRet ;get exception handler DPMIFn 2 2 movzx ebp, bl cmp bl, 32 jae DPMIError1InvVal lea ebp, ClientExc[ebp*8] mov edx, [ebp] mov cx, [ebp][4] FnRet ;set exception handler DPMIFn 2 3 cmp bl, 32 jae DPMIError1InvVal call @@CheckSelectorInCX movzx ebp, bl lea ebp, ClientExc[ebp*8] mov [ebp], edx mov [ebp].4, cx FnRet ;get PM interrupt vector DPMIFn 2 4 movzx ebp, bl shl ebp, 3 mov edx, dword ptr ss:ClientIDT[ebp] mov cx, word ptr ss:ClientIDT[ebp][4] FnRet ;set PM interrupt vector ;Get RM mapped vector for this number ;if it in AutoPassup: ; check handler address for default, if client: ; set CallMethodFlag ; replace RM passup code to call PM trap with apropriate switch code ; if default: ; clear CallMethodFlag ; replace RM passup code to far jmp to prevision RM handler DPMIFn 2 5 call @@CheckSelectorInCX movzx ebp, bl bt PassupIntMap, ebp $ifnot jnc movzx esi, byte ptr ss:FirstTrap3[OffDefIntTrap3][ebp*4][3] ;load linked RM int number bt PassupIntMap, esi ; $ifnot jnc push eax edi xor eax, eax mov edi, esi ;calculate relative index of passup $do bt PassupIntMap, edi adc eax, 0 dec edi $enddo jns lea edi, AutoPassupRJmps[eax+eax*4-5] RRT cmp cx, Trap3Selector jne @@SetClientVect cmp edx, 400h ;edx points to Trap3 call gate ? jb @@SetDefaultVect @@SetClientVect: mov byte ptr [edi], PushWCode mov byte ptr [edi].3, JmpShortCode lea eax, [eax+eax*4+(AutoPassupRJmps-RMS_RMHandler)] neg eax mov [edi].4, al lea eax, [ebp+FirstPassupSwitchCode+FirstSwitchCode+3] mov [edi].1, ax bts RIntFlags, esi ;set flag for routing to prevision RM vector $ifnot jmp @@SetDefaultVect: mov byte ptr [edi], JmpFarCode mov eax, SavedRealVectors[esi*4] mov [edi].1, eax btr RIntFlags, esi ;clear flag for routing to current RM vector $endif pop edi eax $endif $endif shl ebp, 3 mov dword ptr ss:ClientIDT[ebp], edx mov word ptr ss:ClientIDT[ebp][4], cx cmp ebp, 7*8 ;set int7 always in IDT to allow fast FPU emulation je @@SetInt7 test byte ptr ss:IDT[ebp][2], 10b ;PL0/1 handler installed ? $ifnot jz ;else set in IDT @@SetInt7: mov word ptr ss:IDT[ebp][2], cx mov word ptr ss:IDT[ebp], dx shld esi, edx, 16 ;place high 16 bits of edx to si mov word ptr ss:IDT[ebp][6], si $endif FnRet DPMIFn 9 0 ;clear virtual interrupts lds esi, fword ptr [esp].DPMIFrame_SF.CFrESP mov al, byte ptr ds:[esi].9 shr al, 1 and al, 1 and byte ptr ds:[esi].9, not 2 ;clear IF in client iret frame FnRet DPMIFn 9 1 ;set virtual interrupts lds esi, fword ptr [esp].DPMIFrame_SF.CFrESP mov al, byte ptr ds:[esi].9 shr al, 1 and al, 1 or byte ptr ds:[esi].9, 2 ;clear IF in client iret frame FnRet DPMIFn 9 2 ;get virtual interrupts lds esi, fword ptr [esp].DPMIFrame_SF.CFrESP mov al, byte ptr ds:[esi].9 shr al, 1 and al, 1 FnRet LLabel APIEntryPoint stc retf DPMIFn A 0 mov edi, OffAPIEntryPoint mov dword ptr [esp].DPMIFrame_ES, Code3Selector FnRet DPMIFn 6 4 xor bx, bx mov cx, 1000h IFNDEF VMM DPMIFn 6 0 ENDIF DPMIFn 6 1 DPMIFn 6 2 DPMIFn 6 3 DPMIFn 7 2 DPMIFn 7 3 FnRet DPMIFn 5 0 pushad xor eax, eax dec eax mov ecx, 30h/4 cld rep stosd xor edx, edx mov dword ptr es:[edi-30h].20h, edx ;swap file size mov ax, 0DE03h ;get VCPI free pages cmp VCPIMemAvailable, dl $ifnot je VCPITrap $endif add edx, nFreePages ;add free pages in my pool add edx, FreeXMSCount RRT mov eax, TotalVCPIPages add eax, TotalXMSPages RRT IFNDEF Release ;mov eax, 3300 ;mov edx, 3300 ;add eax, 10000 ;add edx, 10000 ENDIF mov [edi-30h].18h, eax mov [edi-30h].0Ch, eax mov [edi-30h].4, edx ;maximum unlocked page allocation mov [edi-30h].8, edx ;maximum locked page allocation(same) mov [edi-30h].10h, edx mov [edi-30h].14h, edx mov [edi-30h].1Ch, edx mov eax, edx shr eax, 10 inc eax inc eax sub edx, eax $ifnot ja xor edx, edx $endif shl edx, 12 ;convert pages to bytes mov [edi-30h], edx ;maximum free block popad FnRet ;get version DPMIFn 4 00 mov ax, 9h mov bx, 1 mov cl, CPUType mov dx, 870h FnRet DPMIFn 3 06 mov cx, RawSwitchCode mov edi, OffPMRawSwitchTrap3 @@L045: mov word ptr [esp].DPMIFrame_ESI, Trap3Selector mov bx, seg DGROUP16 FnRet DPMIFn 3 05 mov ax, 12 mov cx, ROffRMSaveState mov edi, OffPMSaveStateTrap3 jmp @@L045 DPMIFn 3 00 DPMIFn 3 01 DPMIFn 3 02 @@CSR equ esi lds @@CSR, fword ptr [esp].DPMIFrame_SF.CFrESP ;client stack mov ebp, OffRMStack RRT sub @@CSR, size RMIEStruct - 12 mov [ebp][OffPMStack-OffRMStack], @@CSR mov word ptr [ebp][OffPMStack-OffRMStack][4], ds @@CS equ ds:[@@CSR] ;Save all PM registers on client stack mov @@CS.RMIE_EDX, edx mov @@CS.RMIE_EAX, eax mov edx, [esp].DPMIFrame_EBP ;ebp, saved on current stack mov @@CS.RMIE_EBX, ebx mov @@CS.RMIE_EBP, edx mov @@CS.RMIE_ECX, ecx mov edx, [esp].DPMIFrame_ESI ;esi, saved on current stack push eax F = 4 mov @@CS.RMIE_ESI, edx mov @@CS.RMIE_EDI, edi ;@@CS[26] - pointer to client DC_Struct mov edx, [esp+F].DPMIFrame_DS ;@@CS[20] - saved client DS:ESI movzx ecx, cx mov @@CS.RMIE_DS, dx shr al, 1 mov ebp, ss:[ebp] ;RMStack->ebp sbb edx, edx ;expand CF to edx mov @@CS.RMIE_ES, es mov @@CS.RMIE_FS, fs mov @@CS.RMIE_GS, gs mov @@CS.RMIE_RealStack, ebp ;calculate iret frame additional length(only for iret forms) ;free: eax, edx, esi, ebp inc edx ;convert to 1/0 mov esi, dword ptr es:[edi].DC_SP shl edx, 1 ;edx == 2 if al==(0|2) ;calculate RM stack frame lenght or esi, esi lea eax, [ecx*2+edx+size VMIStruct-2-1] ;full stack frame length-1 -> ax ;replace kernel stack on client's if it is nonzero $ifnot jz mov ebp, esi $endif ;calculate RM stack linear address movzx esi, bp dec si sub esi, eax jb @@RStackOverflow shr ebp, 16 mov eax, ebp shl ebp, 4 add ebp, esi mov [ebp].VMI_SS, eax ;RM SS add esi, VMI_EAX mov [ebp].VMI_ESP, esi ;RM ESP ;copy parameters $ifnot jcxz mov esi, [esp+F].DPMIFrame_SF.CFrESP ;reload client esp to esi push edi push es add esi, 12 ;interrupt frame length lea edi, [ebp+edx+size VMIStruct-2] push ss pop es cld rep movs word ptr es:[edi], ds:[esi] pop es pop edi ;add ebp, edx ;$do ; mov ax, ds:[esi+ecx*2-2+12] ;get parameter from client stack ; mov ss:[ebp+ecx*2-2+size VMIStruct-2], ax ;put it on the RM stack ;$enddo loop ;sub ebp, edx $endif ;set flags value for RM iret, if requered or edx, edx ;interrupt stack frame mode ? push es pop ds mov dx, [edi].DC_FLAGS $ifnot jz mov [ebp].VMI_EndFlags, dx ;put flags to RM stack iret frame and dh, not 3 ;clear TF and IF for initial flags $endif pop eax ;saved client eax mov [ebp].VMI_Flags, dx ;set initial flags or al, al ;Fn number == 0 ? mov edx, dword ptr [edi].DC_IP $ifnot jnz movzx edx, bl mov edx, ss:[edx*4] ;call CS:IP from current interrupt vector for function 0 only $endif mov dword ptr [ebp].VMI_EndIP, 0 org $-4 DW RMIERetSwitchCode, seg DGROUP16 ;ss:ebp - RM switch stack, ds:edi - dos call struct, edx - start address SwitchToVMWithTransfer: movzx eax, word ptr [edi].DC_GS mov dword ptr[ebp].VMI_IP, edx ;prepare VCPI stack frame movzx ecx, [edi].DC_FS mov [ebp].VMI_GS, eax movzx edx, [edi].DC_ES mov [ebp].VMI_FS, ecx movzx eax, [edi].DC_DS mov [ebp].VMI_ES, edx mov [ebp].VMI_DS, eax ;load all other registers from DPMI table mov edx, [edi].DC_EAX mov eax, ebp mov [ebp].VMI_EAX, edx mov ebx, [edi].DC_EBX mov ecx, [edi].DC_ECX mov edx, [edi].DC_EDX mov esi, [edi].DC_ESI mov ebp, [edi].DC_EBP mov edi, [edi].DC_EDI VCPICallTrap ;jmp SwitcherToVM @@RStackOverflow: pop eax mov esi, [esp].DPMIFrame_SF.CFrESP ;@@CSR mov edx, @@CS[12-size RMIEStruct].RMIE_EDX mov ecx, @@CS[12-size RMIEStruct].RMIE_ECX jmp DPMIError1 ;allocate RM callback DPMIFn 3 3 mov esi, (nMaxCallbacks * size CBTStruct)/3 $do sub esi, 4; (size CBTStruct)/3 jb DPMIError1 ;free callback not found cmp CallbacksTable[esi+esi*2].CBT_CS, 0 $enddo jne mov ebp, [esp].DPMIFrame_DS or ebp, ebp je DPMIError1 lea dx, [si+FirstSwitchCode+MaxSystemSwitchCode] lea esi, CallbacksTable[esi+esi*2] mov [esi].CBT_CS, bp mov ebp, [esp].DPMIFrame_ESI mov [esi].CBT_EIP, ebp mov [esi].CBT_SPtrOff, edi mov [esi].CBT_SPtrSeg, es mov cx, seg DGROUP16 FnRet ;Free RM callback DPMIFn 3 4 cmp cx, seg DGROUP16 jne DPMIError1 movzx esi, dx lea esi, [esi+esi*2-(FirstSwitchCode+MaxSystemSwitchCode)*3] test esi, 3 ;address must be dword aligned jne DPMIError1 cmp esi, nMaxCallbacks*(size CBTStruct/3) jae DPMIError1 and dword ptr CallBacksTable[esi].CBT_CS, 0 FnRet ENDP comment # Phisical address mapping: PHMap(){ MapRegionStart = lMapRegionStart&~0xFFF; MapRegionEnd = (lMapRegionStart+lMapRegionSize+0xFFF)&~0xFFF; NewLastMappedPage = LastMappedPage - (MapRegionEnd - MapRegionStart) if(NewLastMappedPage < XXX)error(); while(LastMappedPageDirIndex> NewMappedPageDirIndex){ AllocPages(); } TMappedPage = LastMappedPage>>12; LastMappedPage = NewMappedPage; for(;MapRegionEnd > MapRegionStart;){ TMappedPage--; IndexOnDir = LastMappedPage>>22; IndexOnPage = TMappedPage&0x3FF; FreePageRef = Dir[IndexOnDir]; FreePage[IndexOnPage] = (MapRegionEnd -= 0x1000); } return LastMappedPage+(lMapRegionStart & 0xFFF); } # DPROC PhMap @@MapRegionStart equ eax @@MapRegionStartB equ al @@MapRegionEnd equ ebp @@LastDI equ edx @@FirstDI equ @@MapRegionStart @@TMappedPage equ esi @@T equ @@LastDI DPMIFn 8 0 pushad push ds pop es shl ebx, 16 mov esi, [esp+8*4].DPMIFrame_ESI shl esi, 16 mov bx, cx mov si, di mov @@MapRegionStart, ebx and @@MapRegionStart, not 0FFFh lea @@MapRegionEnd, [ebx+esi+0FFFh] xor ebx, @@MapRegionStart and @@MapRegionEnd, not 0FFFh push @@MapRegionStart push @@MapRegionEnd sub @@FirstDI, @@MapRegionEnd mov @@LastDI, LastMappedPage add @@FirstDI, @@LastDI jnc @@Err mov ecx, RootMCB.MCB_Prev cmp @@FirstDI, [ecx].MCB_EndOffset jb @@Err push @@FirstDI ;uses @@FirstDI, @@LastDI, ecx, esi, edi, ebp shr @@FirstDI, 22 shr @@LastDI, 22 $do jmp IFNDEF VMM lea edi, PageDir[@@FirstDI*4] mov ecx, @@LastDI sub ecx, @@FirstDI call XAllocPages jz @@Recover add @@FirstDI, ecx ELSE push eax call alloc_page xchg edi, eax pop eax jc @@Recover mov PageDir[@@FirstDI*4], edi inc @@FirstDI ENDIF $while cmp @@LastDI, @@FirstDI $enddo jne pop @@TMappedPage pop @@MapRegionEnd pop @@MapRegionStart add ebx, @@TMappedPage mov word ptr [esp].PA_ECX, bx shr ebx, 16 mov word ptr [esp].PA_EBX, bx mov LastMappedPage, @@TMappedPage mov @@MapRegionStartB, 67h LLabel PatchPoint4 shr @@TMappedPage, 12 $do jmp mov @@T, @@TMappedPage shr @@T, 10 cli mov @@T, PageDir[@@T*4] mov PageTableEntry, @@T InvalidateTLB mov @@T, @@TMappedPage and @@T, 3FFh mov PageTableWin[@@T*4], @@MapRegionStart add @@MapRegionStart, 1000h sti inc @@TMappedPage $while cmp @@MapRegionEnd, @@MapRegionStart $enddo ja popad retn @@Recover: xchg eax, edx ;write eax to edx pop ebx call FreeHMPages @@Err: pop eax pop eax popad jmp DPMIError1 ENDP ;ebx - first page ;edx(@@LastDI) - last page FreeHMPages: shr ebx, 22 $do jmp IFNDEF VMM xor ecx, ecx lea esi, PageDir[ebx*4] inc ecx call XFreePages ELSE push PageDir[ebx*4] call free_page ENDIF inc ebx $while cmp ebx, edx $enddo jne ret ESeg Text
db DEX_WEEDLE ; pokedex id db 40 ; base hp db 35 ; base attack db 30 ; base defense db 50 ; base speed db 20 ; base special db BUG ; species type 1 db POISON ; species type 2 db 255 ; catch rate db 52 ; base exp yield INCBIN "pic/ymon/weedle.pic",0,1 ; 55, sprite dimensions dw WeedlePicFront dw WeedlePicBack ; attacks known at lvl 0 db POISON_STING db STRING_SHOT db 0 db 0 db 0 ; growth rate ; learnset tmlearn 0 tmlearn 0 tmlearn 0 tmlearn 0 tmlearn 0 tmlearn 0 tmlearn 0 db BANK(WeedlePicFront)
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %r14 push %rbp push %rcx push %rdi push %rsi lea addresses_D_ht+0xef89, %rsi lea addresses_D_ht+0x15d69, %rdi nop xor %r13, %r13 mov $69, %rcx rep movsw nop sub $24955, %r14 lea addresses_WT_ht+0x61, %rbp nop sub %r10, %r10 mov $0x6162636465666768, %r13 movq %r13, %xmm1 vmovups %ymm1, (%rbp) nop nop nop nop nop inc %rdi lea addresses_normal_ht+0x11845, %rsi and $25792, %rcx mov $0x6162636465666768, %r10 movq %r10, %xmm4 vmovups %ymm4, (%rsi) nop nop nop add %r10, %r10 lea addresses_UC_ht+0x4669, %rbp nop nop nop and %r10, %r10 mov $0x6162636465666768, %r13 movq %r13, (%rbp) nop nop nop inc %rdi lea addresses_A_ht+0x4c4b, %r13 clflush (%r13) nop nop cmp $39920, %rdi mov (%r13), %si nop nop nop inc %rdi lea addresses_D_ht+0x8031, %rsi lea addresses_WT_ht+0xfb89, %rdi nop nop nop xor $4315, %r11 mov $100, %rcx rep movsw nop nop inc %r11 lea addresses_A_ht+0x8909, %r10 nop nop nop nop inc %r14 vmovups (%r10), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $0, %xmm3, %r13 nop nop nop nop nop and %rcx, %rcx lea addresses_WT_ht+0x19309, %rcx nop nop nop nop dec %r13 mov (%rcx), %r14d dec %r14 lea addresses_UC_ht+0x8cf7, %rsi lea addresses_UC_ht+0x6709, %rdi nop nop nop dec %r13 mov $45, %rcx rep movsl add %r10, %r10 lea addresses_A_ht+0x4e89, %r11 nop nop nop nop sub %rdi, %rdi mov $0x6162636465666768, %rsi movq %rsi, %xmm2 and $0xffffffffffffffc0, %r11 movaps %xmm2, (%r11) nop nop nop nop nop and $34685, %r13 pop %rsi pop %rdi pop %rcx pop %rbp pop %r14 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r9 push %rbp push %rcx push %rdi push %rsi // Store lea addresses_normal+0x6b09, %r9 add $16309, %r12 mov $0x5152535455565758, %r14 movq %r14, %xmm7 vmovups %ymm7, (%r9) nop nop nop nop nop and %r14, %r14 // Store lea addresses_WC+0xfce1, %r9 nop nop nop xor %r13, %r13 movl $0x51525354, (%r9) nop nop nop nop inc %r12 // Load lea addresses_normal+0xf349, %r12 nop nop nop nop nop xor %r13, %r13 mov (%r12), %r9 nop nop nop nop add $49822, %r9 // REPMOV lea addresses_UC+0x1cb09, %rsi lea addresses_D+0x12309, %rdi nop nop nop nop nop add $24276, %rbp mov $97, %rcx rep movsb nop cmp %rcx, %rcx // Faulty Load lea addresses_UC+0x1cb09, %rbp nop nop nop nop nop and $36064, %rdi mov (%rbp), %cx lea oracles, %rbp and $0xff, %rcx shlq $12, %rcx mov (%rbp,%rcx,1), %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 11, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 3, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'src': {'congruent': 0, 'same': True, 'type': 'addresses_UC'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_D'}, 'OP': 'REPM'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_UC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'37': 21829} 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 */
// Copyright (c) 2020-2021 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <util/sock.h> #include <compat.h> #include <logging.h> #include <threadinterrupt.h> #include <tinyformat.h> #include <util/system.h> #include <util/time.h> #include <codecvt> #include <cwchar> #include <locale> #include <stdexcept> #include <string> #ifdef USE_POLL #include <poll.h> #endif static inline bool IOErrorIsPermanent(int err) { return err != WSAEAGAIN && err != WSAEINTR && err != WSAEWOULDBLOCK && err != WSAEINPROGRESS; } Sock::Sock() : m_socket(INVALID_SOCKET) {} Sock::Sock(SOCKET s) : m_socket(s) {} Sock::Sock(Sock &&other) { m_socket = other.m_socket; other.m_socket = INVALID_SOCKET; } Sock::~Sock() { Reset(); } Sock &Sock::operator=(Sock &&other) { Reset(); m_socket = other.m_socket; other.m_socket = INVALID_SOCKET; return *this; } SOCKET Sock::Get() const { return m_socket; } SOCKET Sock::Release() { const SOCKET s = m_socket; m_socket = INVALID_SOCKET; return s; } void Sock::Reset() { CloseSocket(m_socket); } ssize_t Sock::Send(const void *data, size_t len, int flags) const { return send(m_socket, static_cast<const char *>(data), len, flags); } ssize_t Sock::Recv(void *buf, size_t len, int flags) const { return recv(m_socket, static_cast<char *>(buf), len, flags); } int Sock::Connect(const sockaddr *addr, socklen_t addr_len) const { return connect(m_socket, addr, addr_len); } int Sock::GetSockOpt(int level, int opt_name, void *opt_val, socklen_t *opt_len) const { return getsockopt(m_socket, level, opt_name, static_cast<char *>(opt_val), opt_len); } bool Sock::Wait(std::chrono::milliseconds timeout, Event requested, Event *occurred) const { #ifdef USE_POLL pollfd fd; fd.fd = m_socket; fd.events = 0; if (requested & RECV) { fd.events |= POLLIN; } if (requested & SEND) { fd.events |= POLLOUT; } if (poll(&fd, 1, count_milliseconds(timeout)) == SOCKET_ERROR) { return false; } if (occurred != nullptr) { *occurred = 0; if (fd.revents & POLLIN) { *occurred |= RECV; } if (fd.revents & POLLOUT) { *occurred |= SEND; } } return true; #else if (!IsSelectableSocket(m_socket)) { return false; } fd_set fdset_recv; fd_set fdset_send; FD_ZERO(&fdset_recv); FD_ZERO(&fdset_send); if (requested & RECV) { FD_SET(m_socket, &fdset_recv); } if (requested & SEND) { FD_SET(m_socket, &fdset_send); } timeval timeout_struct = MillisToTimeval(timeout); if (select(m_socket + 1, &fdset_recv, &fdset_send, nullptr, &timeout_struct) == SOCKET_ERROR) { return false; } if (occurred != nullptr) { *occurred = 0; if (FD_ISSET(m_socket, &fdset_recv)) { *occurred |= RECV; } if (FD_ISSET(m_socket, &fdset_send)) { *occurred |= SEND; } } return true; #endif /* USE_POLL */ } void Sock::SendComplete(const std::string &data, std::chrono::milliseconds timeout, CThreadInterrupt &interrupt) const { const auto deadline = GetTime<std::chrono::milliseconds>() + timeout; size_t sent{0}; for (;;) { const ssize_t ret{ Send(data.data() + sent, data.size() - sent, MSG_NOSIGNAL)}; if (ret > 0) { sent += static_cast<size_t>(ret); if (sent == data.size()) { break; } } else { const int err{WSAGetLastError()}; if (IOErrorIsPermanent(err)) { throw std::runtime_error( strprintf("send(): %s", NetworkErrorString(err))); } } const auto now = GetTime<std::chrono::milliseconds>(); if (now >= deadline) { throw std::runtime_error( strprintf("Send timeout (sent only %u of %u bytes before that)", sent, data.size())); } if (interrupt) { throw std::runtime_error(strprintf( "Send interrupted (sent only %u of %u bytes before that)", sent, data.size())); } // Wait for a short while (or the socket to become ready for sending) // before retrying if nothing was sent. const auto wait_time = std::min( deadline - now, std::chrono::milliseconds{MAX_WAIT_FOR_IO}); Wait(wait_time, SEND); } } std::string Sock::RecvUntilTerminator(uint8_t terminator, std::chrono::milliseconds timeout, CThreadInterrupt &interrupt, size_t max_data) const { const auto deadline = GetTime<std::chrono::milliseconds>() + timeout; std::string data; bool terminator_found{false}; // We must not consume any bytes past the terminator from the socket. // One option is to read one byte at a time and check if we have read a // terminator. However that is very slow. Instead, we peek at what is in the // socket and only read as many bytes as possible without crossing the // terminator. Reading 64 MiB of random data with 262526 terminator chars // takes 37 seconds to read one byte at a time VS 0.71 seconds with the // "peek" solution below. Reading one byte at a time is about 50 times // slower. for (;;) { if (data.size() >= max_data) { throw std::runtime_error( strprintf("Received too many bytes without a terminator (%u)", data.size())); } char buf[512]; const ssize_t peek_ret{ Recv(buf, std::min(sizeof(buf), max_data - data.size()), MSG_PEEK)}; switch (peek_ret) { case -1: { const int err{WSAGetLastError()}; if (IOErrorIsPermanent(err)) { throw std::runtime_error( strprintf("recv(): %s", NetworkErrorString(err))); } break; } case 0: throw std::runtime_error( "Connection unexpectedly closed by peer"); default: auto end = buf + peek_ret; auto terminator_pos = std::find(buf, end, terminator); terminator_found = terminator_pos != end; const size_t try_len{terminator_found ? terminator_pos - buf + 1 : static_cast<size_t>(peek_ret)}; const ssize_t read_ret{Recv(buf, try_len, 0)}; if (read_ret < 0 || static_cast<size_t>(read_ret) != try_len) { throw std::runtime_error( strprintf("recv() returned %u bytes on attempt to read " "%u bytes but previous " "peek claimed %u bytes are available", read_ret, try_len, peek_ret)); } // Don't include the terminator in the output. const size_t append_len{terminator_found ? try_len - 1 : try_len}; data.append(buf, buf + append_len); if (terminator_found) { return data; } } const auto now = GetTime<std::chrono::milliseconds>(); if (now >= deadline) { throw std::runtime_error( strprintf("Receive timeout (received %u bytes without " "terminator before that)", data.size())); } if (interrupt) { throw std::runtime_error( strprintf("Receive interrupted (received %u bytes without " "terminator before that)", data.size())); } // Wait for a short while (or the socket to become ready for reading) // before retrying. const auto wait_time = std::min( deadline - now, std::chrono::milliseconds{MAX_WAIT_FOR_IO}); Wait(wait_time, RECV); } } bool Sock::IsConnected(std::string &errmsg) const { if (m_socket == INVALID_SOCKET) { errmsg = "not connected"; return false; } char c; switch (Recv(&c, sizeof(c), MSG_PEEK)) { case -1: { const int err = WSAGetLastError(); if (IOErrorIsPermanent(err)) { errmsg = NetworkErrorString(err); return false; } return true; } case 0: errmsg = "closed"; return false; default: return true; } } #ifdef WIN32 std::string NetworkErrorString(int err) { wchar_t buf[256]; buf[0] = 0; if (FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, nullptr, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, ARRAYSIZE(buf), nullptr)) { return strprintf( "%s (%d)", std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t>() .to_bytes(buf), err); } else { return strprintf("Unknown error (%d)", err); } } #else std::string NetworkErrorString(int err) { char buf[256]; buf[0] = 0; /** * Too bad there are two incompatible implementations of the * thread-safe strerror. */ const char *s; #ifdef STRERROR_R_CHAR_P /* GNU variant can return a pointer outside the passed buffer */ s = strerror_r(err, buf, sizeof(buf)); #else s = buf; /* POSIX variant always returns message in buffer */ if (strerror_r(err, buf, sizeof(buf))) { buf[0] = 0; } #endif return strprintf("%s (%d)", s, err); } #endif bool CloseSocket(SOCKET &hSocket) { if (hSocket == INVALID_SOCKET) { return false; } #ifdef WIN32 int ret = closesocket(hSocket); #else int ret = close(hSocket); #endif if (ret) { LogPrintf("Socket close failed: %d. Error: %s\n", hSocket, NetworkErrorString(WSAGetLastError())); } hSocket = INVALID_SOCKET; return ret != SOCKET_ERROR; }
; A024394: a(n) is the sum of squares of the first n positive integers congruent to 2 mod 3. ; 4,29,93,214,410,699,1099,1628,2304,3145,4169,5394,6838,8519,10455,12664,15164,17973,21109,24590,28434,32659,37283,42324,47800,53729,60129,67018,74414,82335,90799,99824,109428,119629,130445,141894,153994,166763,180219,194380,209264,224889,241273,258434,276390,295159,314759,335208,356524,378725,401829,425854,450818,476739,503635,531524,560424,590353,621329,653370,686494,720719,756063,792544,830180,868989,908989,950198,992634,1036315,1081259,1127484,1175008,1223849,1274025,1325554,1378454,1432743,1488439,1545560,1604124,1664149,1725653,1788654,1853170,1919219,1986819,2055988,2126744,2199105,2273089,2348714,2425998,2504959,2585615,2667984,2752084,2837933,2925549,3014950,3106154,3199179,3294043,3390764,3489360,3589849,3692249,3796578,3902854,4011095,4121319,4233544,4347788,4464069,4582405,4702814,4825314,4949923,5076659,5205540,5336584,5469809,5605233,5742874,5882750,6024879,6169279,6315968,6464964,6616285,6769949,6925974,7084378,7245179,7408395,7574044,7742144,7912713,8085769,8261330,8439414,8620039,8803223,8988984,9177340,9368309,9561909,9758158,9957074,10158675,10362979,10570004,10779768,10992289,11207585,11425674,11646574,11870303,12096879,12326320,12558644,12793869,13032013,13273094,13517130,13764139,14014139,14267148,14523184,14782265,15044409,15309634,15577958,15849399,16123975,16401704,16682604,16966693,17253989,17544510,17838274,18135299,18435603,18739204,19046120,19356369,19669969,19986938,20307294,20631055,20958239,21288864,21622948,21960509,22301565,22646134,22994234,23345883,23701099,24059900,24422304,24788329,25157993,25531314,25908310,26288999,26673399,27061528,27453404,27849045,28248469,28651694,29058738,29469619,29884355,30302964,30725464,31151873,31582209,32016490,32454734,32896959,33343183,33793424,34247700,34706029,35168429,35634918,36105514,36580235,37059099,37542124,38029328,38520729,39016345,39516194,40020294,40528663,41041319,41558280,42079564,42605189,43135173,43669534,44208290,44751459,45299059,45851108,46407624,46968625 mov $5,$0 lpb $0 add $1,7 mov $2,$0 sub $0,1 add $1,$2 add $1,3 lpe add $1,4 add $1,$5 mov $4,$5 mul $4,$5 mov $3,$4 mul $3,10 add $1,$3 mul $4,$5 mov $3,$4 mul $3,3 add $1,$3
object_const_def ; object_event constants const VICTORYROADGATE_OFFICER const VICTORYROADGATE_BLACK_BELT1 const VICTORYROADGATE_BLACK_BELT2 VictoryRoadGate_MapScripts: db 2 ; scene scripts scene_script .DummyScene0 ; SCENE_DEFAULT scene_script .DummyScene1 ; SCENE_FINISHED db 0 ; callbacks .DummyScene0: end .DummyScene1: end VictoryRoadGateBadgeCheckScene: turnobject PLAYER, LEFT sjump VictoryRoadGateBadgeCheckScript VictoryRoadGateOfficerScript: faceplayer VictoryRoadGateBadgeCheckScript: opentext writetext VictoryRoadGateOfficerText buttonsound readvar VAR_BADGES ifgreater NUM_JOHTO_BADGES - 1, .AllEightBadges writetext VictoryRoadGateNotEnoughBadgesText waitbutton closetext applymovement PLAYER, VictoryRoadGateStepDownMovement end .AllEightBadges: writetext VictoryRoadGateEightBadgesText waitbutton closetext setscene SCENE_FINISHED end VictoryRoadGateLeftBlackBeltScript: jumptextfaceplayer VictoryRoadGateLeftBlackBeltText VictoryRoadGateRightBlackBeltScript: jumptextfaceplayer VictoryRoadGateRightBlackBeltText VictoryRoadGateStepDownMovement: step DOWN step_end VictoryRoadGateOfficerText: text "Only trainers who" line "have proven them-" cont "selves may pass." done VictoryRoadGateNotEnoughBadgesText: text "You don't have all" line "the GYM BADGES of" cont "JOHTO." para "I'm sorry, but I" line "can't let you go" cont "through." done VictoryRoadGateEightBadgesText: text "Oh! The eight" line "BADGES of JOHTO!" para "Please, go right" line "on through!" done VictoryRoadGateLeftBlackBeltText: text "This way leads to" line "MT.SILVER." para "You'll see scary-" line "strong #MON out" cont "there." done VictoryRoadGateRightBlackBeltText: text "Off to the #MON" line "LEAGUE, are you?" para "The ELITE FOUR are" line "so strong it's" para "scary, and they're" line "ready for you!" done VictoryRoadGate_MapEvents: db 0, 0 ; filler db 8 ; warp events warp_event 17, 7, ROUTE_22, 1 warp_event 18, 7, ROUTE_22, 1 warp_event 9, 17, ROUTE_26, 1 warp_event 10, 17, ROUTE_26, 1 warp_event 9, 0, VICTORY_ROAD, 1 warp_event 10, 0, VICTORY_ROAD, 1 warp_event 1, 7, ROUTE_28, 2 warp_event 2, 7, ROUTE_28, 2 db 1 ; coord events coord_event 10, 11, SCENE_DEFAULT, VictoryRoadGateBadgeCheckScene db 0 ; bg events db 3 ; object events object_event 8, 11, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VictoryRoadGateOfficerScript, -1 object_event 7, 5, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VictoryRoadGateLeftBlackBeltScript, EVENT_OPENED_MT_SILVER object_event 12, 5, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VictoryRoadGateRightBlackBeltScript, EVENT_FOUGHT_SNORLAX
; Copyright (c) 2004, Intel Corporation ; All rights reserved. This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; Module Name: ; ; ReadIdtr.Asm ; ; Abstract: ; ; AsmReadIdtr function ; ; Notes: ; ;------------------------------------------------------------------------------ .code ;------------------------------------------------------------------------------ ; VOID ; EFIAPI ; InternalX86ReadIdtr ( ; OUT IA32_DESCRIPTOR *Idtr ; ); ;------------------------------------------------------------------------------ InternalX86ReadIdtr PROC sidt fword ptr [rcx] ret InternalX86ReadIdtr ENDP END
#include "msslsocket.h" MSSLSocket::MSSLSocket() { errorFlag = false; if( WSAStartup( MAKEWORD (2, 2), &wsa) != 0) { errorFlag = true; sprintf(errorString, " Winsock Error: Winsock Initialization Failed. Error Code %d ", WSAGetLastError()); WSACleanup(); return ; } // create Socket this->sock = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP); if( this->sock == INVALID_SOCKET){ errorFlag = true; sprintf(errorString, " Winsock Error: Socket Creation Failed. Error Code %d ", WSAGetLastError()); WSACleanup(); return ; } } int MSSLSocket::connectToHostEncrypted(char *hostname, int port) { // check for previous Error if( this->errorFlag ) { return -1; } // Resolve IP address for hostname if((host = gethostbyname(hostname)) == NULL) { errorFlag = true; sprintf(errorString, " Winsock Error: Failed To Resolve hostname."); WSACleanup(); return -1; } /// setup our socket address structure this->sockAddr.sin_port = htons( port ) ; this->sockAddr.sin_family = AF_INET; this->sockAddr.sin_addr.s_addr = *((unsigned long*) host->h_addr); // Attempt to connect to server if( connect (this->sock, (struct sockaddr *)&sockAddr, sizeof(sockAddr)) < 0 ) { errorFlag = true; sprintf(errorString, " Winsock Error: Failed To Establish With Server."); WSACleanup(); return -1; } return this->beginConnection(); } int MSSLSocket::beginConnection() { this->sslContext = NULL; this->sslHandle = NULL; if( this->errorFlag == false ) { // Register the error strings for libcrypto & libssl SSL_load_error_strings (); // Register the available ciphers and digests SSL_library_init (); // New context saying we are a client, and using SSL 2 or 3 this->sslContext = SSL_CTX_new (SSLv23_client_method ()); if( this->sslContext == NULL ) { ERR_print_errors_fp (stderr); } // Create an SSL struct for the connection this->sslHandle = SSL_new (this->sslContext); if (this->sslHandle == NULL) { ERR_print_errors_fp (stderr); } // Connect the SSL struct to our connection if (!SSL_set_fd (this->sslHandle, this->sock )) { ERR_print_errors_fp (stderr); } // Initiate SSL handshake if (SSL_connect (this->sslHandle) != 1) { ERR_print_errors_fp (stderr); } return 0; } else { errorFlag = true; sprintf(errorString, " SSL Error: Cannot Establish Secure Connection "); WSACleanup(); return -1; } } int MSSLSocket::close() { if( this->sock ) { closesocket( this->sock ); } if( this->sslHandle ) { SSL_shutdown ( this->sslHandle ); SSL_free ( this->sslHandle ); } if( this->sslContext ) { SSL_CTX_free ( this->sslContext ); } WSACleanup(); return 0; }
; A083583: a(n) = (8*3^n - 5*0^n)/3. ; 1,8,24,72,216,648,1944,5832,17496,52488,157464,472392,1417176,4251528,12754584,38263752,114791256,344373768,1033121304,3099363912,9298091736,27894275208,83682825624,251048476872,753145430616,2259436291848,6778308875544,20334926626632,61004779879896,183014339639688,549043018919064,1647129056757192,4941387170271576,14824161510814728,44472484532444184,133417453597332552,400252360791997656,1200757082375992968,3602271247127978904,10806813741383936712,32420441224151810136,97261323672455430408,291783971017366291224,875351913052098873672,2626055739156296621016,7878167217468889863048,23634501652406669589144,70903504957220008767432,212710514871660026302296,638131544614980078906888,1914394633844940236720664,5743183901534820710161992,17229551704604462130485976,51688655113813386391457928,155065965341440159174373784,465197896024320477523121352,1395593688072961432569364056,4186781064218884297708092168,12560343192656652893124276504,37681029577969958679372829512,113043088733909876038118488536,339129266201729628114355465608,1017387798605188884343066396824,3052163395815566653029199190472,9156490187446699959087597571416,27469470562340099877262792714248,82408411687020299631788378142744,247225235061060898895365134428232,741675705183182696686095403284696,2225027115549548090058286209854088,6675081346648644270174858629562264,20025244039945932810524575888686792,60075732119837798431573727666060376,180227196359513395294721182998181128,540681589078540185884163548994543384 seq $0,169545 ; Number of reduced words of length n in Coxeter group on 4 generators S_i with relations (S_i)^2 = (S_i S_j)^35 = I. mov $1,$0 mul $0,2 gcd $1,2 add $0,$1 sub $0,2
OPTION DOTNAME .text$ SEGMENT ALIGN(256) 'CODE' EXTERN OPENSSL_ia32cap_P:NEAR PUBLIC bn_mul_mont ALIGN 16 bn_mul_mont PROC PUBLIC mov QWORD PTR[8+rsp],rdi ;WIN64 prologue mov QWORD PTR[16+rsp],rsi mov rax,rsp $L$SEH_begin_bn_mul_mont:: mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8,QWORD PTR[40+rsp] mov r9,QWORD PTR[48+rsp] mov r9d,r9d mov rax,rsp test r9d,3 jnz $L$mul_enter cmp r9d,8 jb $L$mul_enter mov r11d,DWORD PTR[((OPENSSL_ia32cap_P+8))] cmp rdx,rsi jne $L$mul4x_enter test r9d,7 jz $L$sqr8x_enter jmp $L$mul4x_enter ALIGN 16 $L$mul_enter:: push rbx push rbp push r12 push r13 push r14 push r15 neg r9 mov r11,rsp lea r10,QWORD PTR[((-16))+r9*8+rsp] neg r9 and r10,-1024 sub r11,r10 and r11,-4096 lea rsp,QWORD PTR[r11*1+r10] mov r11,QWORD PTR[rsp] cmp rsp,r10 ja $L$mul_page_walk jmp $L$mul_page_walk_done ALIGN 16 $L$mul_page_walk:: lea rsp,QWORD PTR[((-4096))+rsp] mov r11,QWORD PTR[rsp] cmp rsp,r10 ja $L$mul_page_walk $L$mul_page_walk_done:: mov QWORD PTR[8+r9*8+rsp],rax $L$mul_body:: mov r12,rdx mov r8,QWORD PTR[r8] mov rbx,QWORD PTR[r12] mov rax,QWORD PTR[rsi] xor r14,r14 xor r15,r15 mov rbp,r8 mul rbx mov r10,rax mov rax,QWORD PTR[rcx] imul rbp,r10 mov r11,rdx mul rbp add r10,rax mov rax,QWORD PTR[8+rsi] adc rdx,0 mov r13,rdx lea r15,QWORD PTR[1+r15] jmp $L$1st_enter ALIGN 16 $L$1st:: add r13,rax mov rax,QWORD PTR[r15*8+rsi] adc rdx,0 add r13,r11 mov r11,r10 adc rdx,0 mov QWORD PTR[((-16))+r15*8+rsp],r13 mov r13,rdx $L$1st_enter:: mul rbx add r11,rax mov rax,QWORD PTR[r15*8+rcx] adc rdx,0 lea r15,QWORD PTR[1+r15] mov r10,rdx mul rbp cmp r15,r9 jne $L$1st add r13,rax mov rax,QWORD PTR[rsi] adc rdx,0 add r13,r11 adc rdx,0 mov QWORD PTR[((-16))+r15*8+rsp],r13 mov r13,rdx mov r11,r10 xor rdx,rdx add r13,r11 adc rdx,0 mov QWORD PTR[((-8))+r9*8+rsp],r13 mov QWORD PTR[r9*8+rsp],rdx lea r14,QWORD PTR[1+r14] jmp $L$outer ALIGN 16 $L$outer:: mov rbx,QWORD PTR[r14*8+r12] xor r15,r15 mov rbp,r8 mov r10,QWORD PTR[rsp] mul rbx add r10,rax mov rax,QWORD PTR[rcx] adc rdx,0 imul rbp,r10 mov r11,rdx mul rbp add r10,rax mov rax,QWORD PTR[8+rsi] adc rdx,0 mov r10,QWORD PTR[8+rsp] mov r13,rdx lea r15,QWORD PTR[1+r15] jmp $L$inner_enter ALIGN 16 $L$inner:: add r13,rax mov rax,QWORD PTR[r15*8+rsi] adc rdx,0 add r13,r10 mov r10,QWORD PTR[r15*8+rsp] adc rdx,0 mov QWORD PTR[((-16))+r15*8+rsp],r13 mov r13,rdx $L$inner_enter:: mul rbx add r11,rax mov rax,QWORD PTR[r15*8+rcx] adc rdx,0 add r10,r11 mov r11,rdx adc r11,0 lea r15,QWORD PTR[1+r15] mul rbp cmp r15,r9 jne $L$inner add r13,rax mov rax,QWORD PTR[rsi] adc rdx,0 add r13,r10 mov r10,QWORD PTR[r15*8+rsp] adc rdx,0 mov QWORD PTR[((-16))+r15*8+rsp],r13 mov r13,rdx xor rdx,rdx add r13,r11 adc rdx,0 add r13,r10 adc rdx,0 mov QWORD PTR[((-8))+r9*8+rsp],r13 mov QWORD PTR[r9*8+rsp],rdx lea r14,QWORD PTR[1+r14] cmp r14,r9 jb $L$outer xor r14,r14 mov rax,QWORD PTR[rsp] mov r15,r9 ALIGN 16 $L$sub:: sbb rax,QWORD PTR[r14*8+rcx] mov QWORD PTR[r14*8+rdi],rax mov rax,QWORD PTR[8+r14*8+rsp] lea r14,QWORD PTR[1+r14] dec r15 jnz $L$sub sbb rax,0 mov rbx,-1 xor rbx,rax xor r14,r14 mov r15,r9 $L$copy:: mov rcx,QWORD PTR[r14*8+rdi] mov rdx,QWORD PTR[r14*8+rsp] and rcx,rbx and rdx,rax mov QWORD PTR[r14*8+rsp],r9 or rdx,rcx mov QWORD PTR[r14*8+rdi],rdx lea r14,QWORD PTR[1+r14] sub r15,1 jnz $L$copy mov rsi,QWORD PTR[8+r9*8+rsp] mov rax,1 mov r15,QWORD PTR[((-48))+rsi] mov r14,QWORD PTR[((-40))+rsi] mov r13,QWORD PTR[((-32))+rsi] mov r12,QWORD PTR[((-24))+rsi] mov rbp,QWORD PTR[((-16))+rsi] mov rbx,QWORD PTR[((-8))+rsi] lea rsp,QWORD PTR[rsi] $L$mul_epilogue:: mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue mov rsi,QWORD PTR[16+rsp] DB 0F3h,0C3h ;repret $L$SEH_end_bn_mul_mont:: bn_mul_mont ENDP ALIGN 16 bn_mul4x_mont PROC PRIVATE mov QWORD PTR[8+rsp],rdi ;WIN64 prologue mov QWORD PTR[16+rsp],rsi mov rax,rsp $L$SEH_begin_bn_mul4x_mont:: mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8,QWORD PTR[40+rsp] mov r9,QWORD PTR[48+rsp] mov r9d,r9d mov rax,rsp $L$mul4x_enter:: and r11d,080100h cmp r11d,080100h je $L$mulx4x_enter push rbx push rbp push r12 push r13 push r14 push r15 neg r9 mov r11,rsp lea r10,QWORD PTR[((-32))+r9*8+rsp] neg r9 and r10,-1024 sub r11,r10 and r11,-4096 lea rsp,QWORD PTR[r11*1+r10] mov r11,QWORD PTR[rsp] cmp rsp,r10 ja $L$mul4x_page_walk jmp $L$mul4x_page_walk_done $L$mul4x_page_walk:: lea rsp,QWORD PTR[((-4096))+rsp] mov r11,QWORD PTR[rsp] cmp rsp,r10 ja $L$mul4x_page_walk $L$mul4x_page_walk_done:: mov QWORD PTR[8+r9*8+rsp],rax $L$mul4x_body:: mov QWORD PTR[16+r9*8+rsp],rdi mov r12,rdx mov r8,QWORD PTR[r8] mov rbx,QWORD PTR[r12] mov rax,QWORD PTR[rsi] xor r14,r14 xor r15,r15 mov rbp,r8 mul rbx mov r10,rax mov rax,QWORD PTR[rcx] imul rbp,r10 mov r11,rdx mul rbp add r10,rax mov rax,QWORD PTR[8+rsi] adc rdx,0 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD PTR[8+rcx] adc rdx,0 mov r10,rdx mul rbp add rdi,rax mov rax,QWORD PTR[16+rsi] adc rdx,0 add rdi,r11 lea r15,QWORD PTR[4+r15] adc rdx,0 mov QWORD PTR[rsp],rdi mov r13,rdx jmp $L$1st4x ALIGN 16 $L$1st4x:: mul rbx add r10,rax mov rax,QWORD PTR[((-16))+r15*8+rcx] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD PTR[((-8))+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD PTR[((-24))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD PTR[((-8))+r15*8+rcx] adc rdx,0 mov r10,rdx mul rbp add rdi,rax mov rax,QWORD PTR[r15*8+rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD PTR[((-16))+r15*8+rsp],rdi mov r13,rdx mul rbx add r10,rax mov rax,QWORD PTR[r15*8+rcx] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD PTR[8+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD PTR[((-8))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD PTR[8+r15*8+rcx] adc rdx,0 lea r15,QWORD PTR[4+r15] mov r10,rdx mul rbp add rdi,rax mov rax,QWORD PTR[((-16))+r15*8+rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD PTR[((-32))+r15*8+rsp],rdi mov r13,rdx cmp r15,r9 jb $L$1st4x mul rbx add r10,rax mov rax,QWORD PTR[((-16))+r15*8+rcx] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD PTR[((-8))+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD PTR[((-24))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD PTR[((-8))+r15*8+rcx] adc rdx,0 mov r10,rdx mul rbp add rdi,rax mov rax,QWORD PTR[rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD PTR[((-16))+r15*8+rsp],rdi mov r13,rdx xor rdi,rdi add r13,r10 adc rdi,0 mov QWORD PTR[((-8))+r15*8+rsp],r13 mov QWORD PTR[r15*8+rsp],rdi lea r14,QWORD PTR[1+r14] ALIGN 4 $L$outer4x:: mov rbx,QWORD PTR[r14*8+r12] xor r15,r15 mov r10,QWORD PTR[rsp] mov rbp,r8 mul rbx add r10,rax mov rax,QWORD PTR[rcx] adc rdx,0 imul rbp,r10 mov r11,rdx mul rbp add r10,rax mov rax,QWORD PTR[8+rsi] adc rdx,0 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD PTR[8+rcx] adc rdx,0 add r11,QWORD PTR[8+rsp] adc rdx,0 mov r10,rdx mul rbp add rdi,rax mov rax,QWORD PTR[16+rsi] adc rdx,0 add rdi,r11 lea r15,QWORD PTR[4+r15] adc rdx,0 mov QWORD PTR[rsp],rdi mov r13,rdx jmp $L$inner4x ALIGN 16 $L$inner4x:: mul rbx add r10,rax mov rax,QWORD PTR[((-16))+r15*8+rcx] adc rdx,0 add r10,QWORD PTR[((-16))+r15*8+rsp] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD PTR[((-8))+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD PTR[((-24))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD PTR[((-8))+r15*8+rcx] adc rdx,0 add r11,QWORD PTR[((-8))+r15*8+rsp] adc rdx,0 mov r10,rdx mul rbp add rdi,rax mov rax,QWORD PTR[r15*8+rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD PTR[((-16))+r15*8+rsp],rdi mov r13,rdx mul rbx add r10,rax mov rax,QWORD PTR[r15*8+rcx] adc rdx,0 add r10,QWORD PTR[r15*8+rsp] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD PTR[8+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD PTR[((-8))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD PTR[8+r15*8+rcx] adc rdx,0 add r11,QWORD PTR[8+r15*8+rsp] adc rdx,0 lea r15,QWORD PTR[4+r15] mov r10,rdx mul rbp add rdi,rax mov rax,QWORD PTR[((-16))+r15*8+rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD PTR[((-32))+r15*8+rsp],rdi mov r13,rdx cmp r15,r9 jb $L$inner4x mul rbx add r10,rax mov rax,QWORD PTR[((-16))+r15*8+rcx] adc rdx,0 add r10,QWORD PTR[((-16))+r15*8+rsp] adc rdx,0 mov r11,rdx mul rbp add r13,rax mov rax,QWORD PTR[((-8))+r15*8+rsi] adc rdx,0 add r13,r10 adc rdx,0 mov QWORD PTR[((-24))+r15*8+rsp],r13 mov rdi,rdx mul rbx add r11,rax mov rax,QWORD PTR[((-8))+r15*8+rcx] adc rdx,0 add r11,QWORD PTR[((-8))+r15*8+rsp] adc rdx,0 lea r14,QWORD PTR[1+r14] mov r10,rdx mul rbp add rdi,rax mov rax,QWORD PTR[rsi] adc rdx,0 add rdi,r11 adc rdx,0 mov QWORD PTR[((-16))+r15*8+rsp],rdi mov r13,rdx xor rdi,rdi add r13,r10 adc rdi,0 add r13,QWORD PTR[r9*8+rsp] adc rdi,0 mov QWORD PTR[((-8))+r15*8+rsp],r13 mov QWORD PTR[r15*8+rsp],rdi cmp r14,r9 jb $L$outer4x mov rdi,QWORD PTR[16+r9*8+rsp] lea r15,QWORD PTR[((-4))+r9] mov rax,QWORD PTR[rsp] mov rdx,QWORD PTR[8+rsp] shr r15,2 lea rsi,QWORD PTR[rsp] xor r14,r14 sub rax,QWORD PTR[rcx] mov rbx,QWORD PTR[16+rsi] mov rbp,QWORD PTR[24+rsi] sbb rdx,QWORD PTR[8+rcx] $L$sub4x:: mov QWORD PTR[r14*8+rdi],rax mov QWORD PTR[8+r14*8+rdi],rdx sbb rbx,QWORD PTR[16+r14*8+rcx] mov rax,QWORD PTR[32+r14*8+rsi] mov rdx,QWORD PTR[40+r14*8+rsi] sbb rbp,QWORD PTR[24+r14*8+rcx] mov QWORD PTR[16+r14*8+rdi],rbx mov QWORD PTR[24+r14*8+rdi],rbp sbb rax,QWORD PTR[32+r14*8+rcx] mov rbx,QWORD PTR[48+r14*8+rsi] mov rbp,QWORD PTR[56+r14*8+rsi] sbb rdx,QWORD PTR[40+r14*8+rcx] lea r14,QWORD PTR[4+r14] dec r15 jnz $L$sub4x mov QWORD PTR[r14*8+rdi],rax mov rax,QWORD PTR[32+r14*8+rsi] sbb rbx,QWORD PTR[16+r14*8+rcx] mov QWORD PTR[8+r14*8+rdi],rdx sbb rbp,QWORD PTR[24+r14*8+rcx] mov QWORD PTR[16+r14*8+rdi],rbx sbb rax,0 mov QWORD PTR[24+r14*8+rdi],rbp pxor xmm0,xmm0 DB 102,72,15,110,224 pcmpeqd xmm5,xmm5 pshufd xmm4,xmm4,0 mov r15,r9 pxor xmm5,xmm4 shr r15,2 xor eax,eax jmp $L$copy4x ALIGN 16 $L$copy4x:: movdqa xmm1,XMMWORD PTR[rax*1+rsp] movdqu xmm2,XMMWORD PTR[rax*1+rdi] pand xmm1,xmm4 pand xmm2,xmm5 movdqa xmm3,XMMWORD PTR[16+rax*1+rsp] movdqa XMMWORD PTR[rax*1+rsp],xmm0 por xmm1,xmm2 movdqu xmm2,XMMWORD PTR[16+rax*1+rdi] movdqu XMMWORD PTR[rax*1+rdi],xmm1 pand xmm3,xmm4 pand xmm2,xmm5 movdqa XMMWORD PTR[16+rax*1+rsp],xmm0 por xmm3,xmm2 movdqu XMMWORD PTR[16+rax*1+rdi],xmm3 lea rax,QWORD PTR[32+rax] dec r15 jnz $L$copy4x mov rsi,QWORD PTR[8+r9*8+rsp] mov rax,1 mov r15,QWORD PTR[((-48))+rsi] mov r14,QWORD PTR[((-40))+rsi] mov r13,QWORD PTR[((-32))+rsi] mov r12,QWORD PTR[((-24))+rsi] mov rbp,QWORD PTR[((-16))+rsi] mov rbx,QWORD PTR[((-8))+rsi] lea rsp,QWORD PTR[rsi] $L$mul4x_epilogue:: mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue mov rsi,QWORD PTR[16+rsp] DB 0F3h,0C3h ;repret $L$SEH_end_bn_mul4x_mont:: bn_mul4x_mont ENDP EXTERN bn_sqrx8x_internal:NEAR EXTERN bn_sqr8x_internal:NEAR ALIGN 32 bn_sqr8x_mont PROC PRIVATE mov QWORD PTR[8+rsp],rdi ;WIN64 prologue mov QWORD PTR[16+rsp],rsi mov rax,rsp $L$SEH_begin_bn_sqr8x_mont:: mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8,QWORD PTR[40+rsp] mov r9,QWORD PTR[48+rsp] mov rax,rsp $L$sqr8x_enter:: push rbx push rbp push r12 push r13 push r14 push r15 $L$sqr8x_prologue:: mov r10d,r9d shl r9d,3 shl r10,3+2 neg r9 lea r11,QWORD PTR[((-64))+r9*2+rsp] mov rbp,rsp mov r8,QWORD PTR[r8] sub r11,rsi and r11,4095 cmp r10,r11 jb $L$sqr8x_sp_alt sub rbp,r11 lea rbp,QWORD PTR[((-64))+r9*2+rbp] jmp $L$sqr8x_sp_done ALIGN 32 $L$sqr8x_sp_alt:: lea r10,QWORD PTR[((4096-64))+r9*2] lea rbp,QWORD PTR[((-64))+r9*2+rbp] sub r11,r10 mov r10,0 cmovc r11,r10 sub rbp,r11 $L$sqr8x_sp_done:: and rbp,-64 mov r11,rsp sub r11,rbp and r11,-4096 lea rsp,QWORD PTR[rbp*1+r11] mov r10,QWORD PTR[rsp] cmp rsp,rbp ja $L$sqr8x_page_walk jmp $L$sqr8x_page_walk_done ALIGN 16 $L$sqr8x_page_walk:: lea rsp,QWORD PTR[((-4096))+rsp] mov r10,QWORD PTR[rsp] cmp rsp,rbp ja $L$sqr8x_page_walk $L$sqr8x_page_walk_done:: mov r10,r9 neg r9 mov QWORD PTR[32+rsp],r8 mov QWORD PTR[40+rsp],rax $L$sqr8x_body:: DB 102,72,15,110,209 pxor xmm0,xmm0 DB 102,72,15,110,207 DB 102,73,15,110,218 mov eax,DWORD PTR[((OPENSSL_ia32cap_P+8))] and eax,080100h cmp eax,080100h jne $L$sqr8x_nox call bn_sqrx8x_internal lea rbx,QWORD PTR[rcx*1+r8] mov r9,rcx mov rdx,rcx DB 102,72,15,126,207 sar rcx,3+2 jmp $L$sqr8x_sub ALIGN 32 $L$sqr8x_nox:: call bn_sqr8x_internal lea rbx,QWORD PTR[r9*1+rdi] mov rcx,r9 mov rdx,r9 DB 102,72,15,126,207 sar rcx,3+2 jmp $L$sqr8x_sub ALIGN 32 $L$sqr8x_sub:: mov r12,QWORD PTR[rbx] mov r13,QWORD PTR[8+rbx] mov r14,QWORD PTR[16+rbx] mov r15,QWORD PTR[24+rbx] lea rbx,QWORD PTR[32+rbx] sbb r12,QWORD PTR[rbp] sbb r13,QWORD PTR[8+rbp] sbb r14,QWORD PTR[16+rbp] sbb r15,QWORD PTR[24+rbp] lea rbp,QWORD PTR[32+rbp] mov QWORD PTR[rdi],r12 mov QWORD PTR[8+rdi],r13 mov QWORD PTR[16+rdi],r14 mov QWORD PTR[24+rdi],r15 lea rdi,QWORD PTR[32+rdi] inc rcx jnz $L$sqr8x_sub sbb rax,0 lea rbx,QWORD PTR[r9*1+rbx] lea rdi,QWORD PTR[r9*1+rdi] DB 102,72,15,110,200 pxor xmm0,xmm0 pshufd xmm1,xmm1,0 mov rsi,QWORD PTR[40+rsp] jmp $L$sqr8x_cond_copy ALIGN 32 $L$sqr8x_cond_copy:: movdqa xmm2,XMMWORD PTR[rbx] movdqa xmm3,XMMWORD PTR[16+rbx] lea rbx,QWORD PTR[32+rbx] movdqu xmm4,XMMWORD PTR[rdi] movdqu xmm5,XMMWORD PTR[16+rdi] lea rdi,QWORD PTR[32+rdi] movdqa XMMWORD PTR[(-32)+rbx],xmm0 movdqa XMMWORD PTR[(-16)+rbx],xmm0 movdqa XMMWORD PTR[(-32)+rdx*1+rbx],xmm0 movdqa XMMWORD PTR[(-16)+rdx*1+rbx],xmm0 pcmpeqd xmm0,xmm1 pand xmm2,xmm1 pand xmm3,xmm1 pand xmm4,xmm0 pand xmm5,xmm0 pxor xmm0,xmm0 por xmm4,xmm2 por xmm5,xmm3 movdqu XMMWORD PTR[(-32)+rdi],xmm4 movdqu XMMWORD PTR[(-16)+rdi],xmm5 add r9,32 jnz $L$sqr8x_cond_copy mov rax,1 mov r15,QWORD PTR[((-48))+rsi] mov r14,QWORD PTR[((-40))+rsi] mov r13,QWORD PTR[((-32))+rsi] mov r12,QWORD PTR[((-24))+rsi] mov rbp,QWORD PTR[((-16))+rsi] mov rbx,QWORD PTR[((-8))+rsi] lea rsp,QWORD PTR[rsi] $L$sqr8x_epilogue:: mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue mov rsi,QWORD PTR[16+rsp] DB 0F3h,0C3h ;repret $L$SEH_end_bn_sqr8x_mont:: bn_sqr8x_mont ENDP ALIGN 32 bn_mulx4x_mont PROC PRIVATE mov QWORD PTR[8+rsp],rdi ;WIN64 prologue mov QWORD PTR[16+rsp],rsi mov rax,rsp $L$SEH_begin_bn_mulx4x_mont:: mov rdi,rcx mov rsi,rdx mov rdx,r8 mov rcx,r9 mov r8,QWORD PTR[40+rsp] mov r9,QWORD PTR[48+rsp] mov rax,rsp $L$mulx4x_enter:: push rbx push rbp push r12 push r13 push r14 push r15 $L$mulx4x_prologue:: shl r9d,3 xor r10,r10 sub r10,r9 mov r8,QWORD PTR[r8] lea rbp,QWORD PTR[((-72))+r10*1+rsp] and rbp,-128 mov r11,rsp sub r11,rbp and r11,-4096 lea rsp,QWORD PTR[rbp*1+r11] mov r10,QWORD PTR[rsp] cmp rsp,rbp ja $L$mulx4x_page_walk jmp $L$mulx4x_page_walk_done ALIGN 16 $L$mulx4x_page_walk:: lea rsp,QWORD PTR[((-4096))+rsp] mov r10,QWORD PTR[rsp] cmp rsp,rbp ja $L$mulx4x_page_walk $L$mulx4x_page_walk_done:: lea r10,QWORD PTR[r9*1+rdx] mov QWORD PTR[rsp],r9 shr r9,5 mov QWORD PTR[16+rsp],r10 sub r9,1 mov QWORD PTR[24+rsp],r8 mov QWORD PTR[32+rsp],rdi mov QWORD PTR[40+rsp],rax mov QWORD PTR[48+rsp],r9 jmp $L$mulx4x_body ALIGN 32 $L$mulx4x_body:: lea rdi,QWORD PTR[8+rdx] mov rdx,QWORD PTR[rdx] lea rbx,QWORD PTR[((64+32))+rsp] mov r9,rdx mulx rax,r8,QWORD PTR[rsi] mulx r14,r11,QWORD PTR[8+rsi] add r11,rax mov QWORD PTR[8+rsp],rdi mulx r13,r12,QWORD PTR[16+rsi] adc r12,r14 adc r13,0 mov rdi,r8 imul r8,QWORD PTR[24+rsp] xor rbp,rbp mulx r14,rax,QWORD PTR[24+rsi] mov rdx,r8 lea rsi,QWORD PTR[32+rsi] adcx r13,rax adcx r14,rbp mulx r10,rax,QWORD PTR[rcx] adcx rdi,rax adox r10,r11 mulx r11,rax,QWORD PTR[8+rcx] adcx r10,rax adox r11,r12 DB 0c4h,062h,0fbh,0f6h,0a1h,010h,000h,000h,000h mov rdi,QWORD PTR[48+rsp] mov QWORD PTR[((-32))+rbx],r10 adcx r11,rax adox r12,r13 mulx r15,rax,QWORD PTR[24+rcx] mov rdx,r9 mov QWORD PTR[((-24))+rbx],r11 adcx r12,rax adox r15,rbp lea rcx,QWORD PTR[32+rcx] mov QWORD PTR[((-16))+rbx],r12 jmp $L$mulx4x_1st ALIGN 32 $L$mulx4x_1st:: adcx r15,rbp mulx rax,r10,QWORD PTR[rsi] adcx r10,r14 mulx r14,r11,QWORD PTR[8+rsi] adcx r11,rax mulx rax,r12,QWORD PTR[16+rsi] adcx r12,r14 mulx r14,r13,QWORD PTR[24+rsi] DB 067h,067h mov rdx,r8 adcx r13,rax adcx r14,rbp lea rsi,QWORD PTR[32+rsi] lea rbx,QWORD PTR[32+rbx] adox r10,r15 mulx r15,rax,QWORD PTR[rcx] adcx r10,rax adox r11,r15 mulx r15,rax,QWORD PTR[8+rcx] adcx r11,rax adox r12,r15 mulx r15,rax,QWORD PTR[16+rcx] mov QWORD PTR[((-40))+rbx],r10 adcx r12,rax mov QWORD PTR[((-32))+rbx],r11 adox r13,r15 mulx r15,rax,QWORD PTR[24+rcx] mov rdx,r9 mov QWORD PTR[((-24))+rbx],r12 adcx r13,rax adox r15,rbp lea rcx,QWORD PTR[32+rcx] mov QWORD PTR[((-16))+rbx],r13 dec rdi jnz $L$mulx4x_1st mov rax,QWORD PTR[rsp] mov rdi,QWORD PTR[8+rsp] adc r15,rbp add r14,r15 sbb r15,r15 mov QWORD PTR[((-8))+rbx],r14 jmp $L$mulx4x_outer ALIGN 32 $L$mulx4x_outer:: mov rdx,QWORD PTR[rdi] lea rdi,QWORD PTR[8+rdi] sub rsi,rax mov QWORD PTR[rbx],r15 lea rbx,QWORD PTR[((64+32))+rsp] sub rcx,rax mulx r11,r8,QWORD PTR[rsi] xor ebp,ebp mov r9,rdx mulx r12,r14,QWORD PTR[8+rsi] adox r8,QWORD PTR[((-32))+rbx] adcx r11,r14 mulx r13,r15,QWORD PTR[16+rsi] adox r11,QWORD PTR[((-24))+rbx] adcx r12,r15 adox r12,QWORD PTR[((-16))+rbx] adcx r13,rbp adox r13,rbp mov QWORD PTR[8+rsp],rdi mov r15,r8 imul r8,QWORD PTR[24+rsp] xor ebp,ebp mulx r14,rax,QWORD PTR[24+rsi] mov rdx,r8 adcx r13,rax adox r13,QWORD PTR[((-8))+rbx] adcx r14,rbp lea rsi,QWORD PTR[32+rsi] adox r14,rbp mulx r10,rax,QWORD PTR[rcx] adcx r15,rax adox r10,r11 mulx r11,rax,QWORD PTR[8+rcx] adcx r10,rax adox r11,r12 mulx r12,rax,QWORD PTR[16+rcx] mov QWORD PTR[((-32))+rbx],r10 adcx r11,rax adox r12,r13 mulx r15,rax,QWORD PTR[24+rcx] mov rdx,r9 mov QWORD PTR[((-24))+rbx],r11 lea rcx,QWORD PTR[32+rcx] adcx r12,rax adox r15,rbp mov rdi,QWORD PTR[48+rsp] mov QWORD PTR[((-16))+rbx],r12 jmp $L$mulx4x_inner ALIGN 32 $L$mulx4x_inner:: mulx rax,r10,QWORD PTR[rsi] adcx r15,rbp adox r10,r14 mulx r14,r11,QWORD PTR[8+rsi] adcx r10,QWORD PTR[rbx] adox r11,rax mulx rax,r12,QWORD PTR[16+rsi] adcx r11,QWORD PTR[8+rbx] adox r12,r14 mulx r14,r13,QWORD PTR[24+rsi] mov rdx,r8 adcx r12,QWORD PTR[16+rbx] adox r13,rax adcx r13,QWORD PTR[24+rbx] adox r14,rbp lea rsi,QWORD PTR[32+rsi] lea rbx,QWORD PTR[32+rbx] adcx r14,rbp adox r10,r15 mulx r15,rax,QWORD PTR[rcx] adcx r10,rax adox r11,r15 mulx r15,rax,QWORD PTR[8+rcx] adcx r11,rax adox r12,r15 mulx r15,rax,QWORD PTR[16+rcx] mov QWORD PTR[((-40))+rbx],r10 adcx r12,rax adox r13,r15 mulx r15,rax,QWORD PTR[24+rcx] mov rdx,r9 mov QWORD PTR[((-32))+rbx],r11 mov QWORD PTR[((-24))+rbx],r12 adcx r13,rax adox r15,rbp lea rcx,QWORD PTR[32+rcx] mov QWORD PTR[((-16))+rbx],r13 dec rdi jnz $L$mulx4x_inner mov rax,QWORD PTR[rsp] mov rdi,QWORD PTR[8+rsp] adc r15,rbp sub rbp,QWORD PTR[rbx] adc r14,r15 sbb r15,r15 mov QWORD PTR[((-8))+rbx],r14 cmp rdi,QWORD PTR[16+rsp] jne $L$mulx4x_outer lea rbx,QWORD PTR[64+rsp] sub rcx,rax neg r15 mov rdx,rax shr rax,3+2 mov rdi,QWORD PTR[32+rsp] jmp $L$mulx4x_sub ALIGN 32 $L$mulx4x_sub:: mov r11,QWORD PTR[rbx] mov r12,QWORD PTR[8+rbx] mov r13,QWORD PTR[16+rbx] mov r14,QWORD PTR[24+rbx] lea rbx,QWORD PTR[32+rbx] sbb r11,QWORD PTR[rcx] sbb r12,QWORD PTR[8+rcx] sbb r13,QWORD PTR[16+rcx] sbb r14,QWORD PTR[24+rcx] lea rcx,QWORD PTR[32+rcx] mov QWORD PTR[rdi],r11 mov QWORD PTR[8+rdi],r12 mov QWORD PTR[16+rdi],r13 mov QWORD PTR[24+rdi],r14 lea rdi,QWORD PTR[32+rdi] dec rax jnz $L$mulx4x_sub sbb r15,0 lea rbx,QWORD PTR[64+rsp] sub rdi,rdx DB 102,73,15,110,207 pxor xmm0,xmm0 pshufd xmm1,xmm1,0 mov rsi,QWORD PTR[40+rsp] jmp $L$mulx4x_cond_copy ALIGN 32 $L$mulx4x_cond_copy:: movdqa xmm2,XMMWORD PTR[rbx] movdqa xmm3,XMMWORD PTR[16+rbx] lea rbx,QWORD PTR[32+rbx] movdqu xmm4,XMMWORD PTR[rdi] movdqu xmm5,XMMWORD PTR[16+rdi] lea rdi,QWORD PTR[32+rdi] movdqa XMMWORD PTR[(-32)+rbx],xmm0 movdqa XMMWORD PTR[(-16)+rbx],xmm0 pcmpeqd xmm0,xmm1 pand xmm2,xmm1 pand xmm3,xmm1 pand xmm4,xmm0 pand xmm5,xmm0 pxor xmm0,xmm0 por xmm4,xmm2 por xmm5,xmm3 movdqu XMMWORD PTR[(-32)+rdi],xmm4 movdqu XMMWORD PTR[(-16)+rdi],xmm5 sub rdx,32 jnz $L$mulx4x_cond_copy mov QWORD PTR[rbx],rdx mov rax,1 mov r15,QWORD PTR[((-48))+rsi] mov r14,QWORD PTR[((-40))+rsi] mov r13,QWORD PTR[((-32))+rsi] mov r12,QWORD PTR[((-24))+rsi] mov rbp,QWORD PTR[((-16))+rsi] mov rbx,QWORD PTR[((-8))+rsi] lea rsp,QWORD PTR[rsi] $L$mulx4x_epilogue:: mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue mov rsi,QWORD PTR[16+rsp] DB 0F3h,0C3h ;repret $L$SEH_end_bn_mulx4x_mont:: bn_mulx4x_mont ENDP DB 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105 DB 112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56 DB 54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83 DB 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115 DB 115,108,46,111,114,103,62,0 ALIGN 16 EXTERN __imp_RtlVirtualUnwind:NEAR ALIGN 16 mul_handler PROC PRIVATE push rsi push rdi push rbx push rbp push r12 push r13 push r14 push r15 pushfq sub rsp,64 mov rax,QWORD PTR[120+r8] mov rbx,QWORD PTR[248+r8] mov rsi,QWORD PTR[8+r9] mov r11,QWORD PTR[56+r9] mov r10d,DWORD PTR[r11] lea r10,QWORD PTR[r10*1+rsi] cmp rbx,r10 jb $L$common_seh_tail mov rax,QWORD PTR[152+r8] mov r10d,DWORD PTR[4+r11] lea r10,QWORD PTR[r10*1+rsi] cmp rbx,r10 jae $L$common_seh_tail mov r10,QWORD PTR[192+r8] mov rax,QWORD PTR[8+r10*8+rax] jmp $L$common_pop_regs mul_handler ENDP ALIGN 16 sqr_handler PROC PRIVATE push rsi push rdi push rbx push rbp push r12 push r13 push r14 push r15 pushfq sub rsp,64 mov rax,QWORD PTR[120+r8] mov rbx,QWORD PTR[248+r8] mov rsi,QWORD PTR[8+r9] mov r11,QWORD PTR[56+r9] mov r10d,DWORD PTR[r11] lea r10,QWORD PTR[r10*1+rsi] cmp rbx,r10 jb $L$common_seh_tail mov r10d,DWORD PTR[4+r11] lea r10,QWORD PTR[r10*1+rsi] cmp rbx,r10 jb $L$common_pop_regs mov rax,QWORD PTR[152+r8] mov r10d,DWORD PTR[8+r11] lea r10,QWORD PTR[r10*1+rsi] cmp rbx,r10 jae $L$common_seh_tail mov rax,QWORD PTR[40+rax] $L$common_pop_regs:: mov rbx,QWORD PTR[((-8))+rax] mov rbp,QWORD PTR[((-16))+rax] mov r12,QWORD PTR[((-24))+rax] mov r13,QWORD PTR[((-32))+rax] mov r14,QWORD PTR[((-40))+rax] mov r15,QWORD PTR[((-48))+rax] mov QWORD PTR[144+r8],rbx mov QWORD PTR[160+r8],rbp mov QWORD PTR[216+r8],r12 mov QWORD PTR[224+r8],r13 mov QWORD PTR[232+r8],r14 mov QWORD PTR[240+r8],r15 $L$common_seh_tail:: mov rdi,QWORD PTR[8+rax] mov rsi,QWORD PTR[16+rax] mov QWORD PTR[152+r8],rax mov QWORD PTR[168+r8],rsi mov QWORD PTR[176+r8],rdi mov rdi,QWORD PTR[40+r9] mov rsi,r8 mov ecx,154 DD 0a548f3fch mov rsi,r9 xor rcx,rcx mov rdx,QWORD PTR[8+rsi] mov r8,QWORD PTR[rsi] mov r9,QWORD PTR[16+rsi] mov r10,QWORD PTR[40+rsi] lea r11,QWORD PTR[56+rsi] lea r12,QWORD PTR[24+rsi] mov QWORD PTR[32+rsp],r10 mov QWORD PTR[40+rsp],r11 mov QWORD PTR[48+rsp],r12 mov QWORD PTR[56+rsp],rcx call QWORD PTR[__imp_RtlVirtualUnwind] mov eax,1 add rsp,64 popfq pop r15 pop r14 pop r13 pop r12 pop rbp pop rbx pop rdi pop rsi DB 0F3h,0C3h ;repret sqr_handler ENDP .text$ ENDS .pdata SEGMENT READONLY ALIGN(4) ALIGN 4 DD imagerel $L$SEH_begin_bn_mul_mont DD imagerel $L$SEH_end_bn_mul_mont DD imagerel $L$SEH_info_bn_mul_mont DD imagerel $L$SEH_begin_bn_mul4x_mont DD imagerel $L$SEH_end_bn_mul4x_mont DD imagerel $L$SEH_info_bn_mul4x_mont DD imagerel $L$SEH_begin_bn_sqr8x_mont DD imagerel $L$SEH_end_bn_sqr8x_mont DD imagerel $L$SEH_info_bn_sqr8x_mont DD imagerel $L$SEH_begin_bn_mulx4x_mont DD imagerel $L$SEH_end_bn_mulx4x_mont DD imagerel $L$SEH_info_bn_mulx4x_mont .pdata ENDS .xdata SEGMENT READONLY ALIGN(8) ALIGN 8 $L$SEH_info_bn_mul_mont:: DB 9,0,0,0 DD imagerel mul_handler DD imagerel $L$mul_body,imagerel $L$mul_epilogue $L$SEH_info_bn_mul4x_mont:: DB 9,0,0,0 DD imagerel mul_handler DD imagerel $L$mul4x_body,imagerel $L$mul4x_epilogue $L$SEH_info_bn_sqr8x_mont:: DB 9,0,0,0 DD imagerel sqr_handler DD imagerel $L$sqr8x_prologue,imagerel $L$sqr8x_body,imagerel $L$sqr8x_epilogue ALIGN 8 $L$SEH_info_bn_mulx4x_mont:: DB 9,0,0,0 DD imagerel sqr_handler DD imagerel $L$mulx4x_prologue,imagerel $L$mulx4x_body,imagerel $L$mulx4x_epilogue ALIGN 8 .xdata ENDS END
// // Created by cerussite on 7/4/20. // #include <gtest/gtest.h> #include <pyfunc/enumerate.hpp> #include <vector> TEST(enumerate, enumerate_basic) { ::std::vector<int> vec = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; for (auto ie : ::pyfunc::enumerate(vec)) { ::std::size_t i; int e; ::std::tie(i, e) = ie; EXPECT_EQ(i, e); } } TEST(enumerate, change_initial_count) { ::std::vector<int> vec = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; for (auto ie : ::pyfunc::enumerate(vec, 1u)) { ::std::size_t i; int e; ::std::tie(i, e) = ie; EXPECT_EQ(i, e); } } TEST(enumerate, negative_initial_value) { std::vector<int> vec = {-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; for (auto ie : ::pyfunc::enumerate(vec, -2)) { int i; int e; ::std::tie(i, e) = ie; EXPECT_EQ(i, e); } }
#include"ModuloRender.h" #include"Aplication.h" moduloRender::moduloRender(aplication *APP):Module(APP) { } moduloRender::~moduloRender() { } bool moduloRender::Init() { int prop = SDL_RENDERER_PRESENTVSYNC; renderer = SDL_CreateRenderer(app->Window->window, -1, prop); SDL_RenderSetLogicalSize(renderer, WINDOWWIDTH, WINDOWHIGH); return true; } States moduloRender::Preupdate() { SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); SDL_RenderClear(renderer); return States::Continue; } States moduloRender::Postupdate() { SDL_RenderPresent(renderer); return States::Continue; } bool moduloRender::CleanUp() { SDL_DestroyRenderer(renderer); return true; } void moduloRender::Blit(SDL_Texture* texture, int x, int y, SDL_Rect* texturesize) { SDL_Rect rect; rect.x = x; rect.y = y; rect.w = texturesize->w; rect.h = texturesize->h; SDL_RenderCopy(renderer, texture, texturesize, &rect); }
// // TM & (c) 2019 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd. // All rights reserved. See LICENSE.txt for license. // #include <MaterialXRuntime/RtPrim.h> #include <MaterialXRuntime/RtSchema.h> #include <MaterialXRuntime/RtTraversal.h> #include <MaterialXRuntime/Private/PvtPrim.h> namespace MaterialX { RT_DEFINE_RUNTIME_OBJECT(RtPrim, RtObjType::PRIM, "RtPrim") RtPrim::RtPrim(PvtDataHandle hnd) : RtObject(hnd) { } const RtTypeInfo* RtPrim::getTypeInfo() const { return hnd()->asA<PvtPrim>()->getTypeInfo(); } RtRelationship RtPrim::createRelationship(const RtToken& name) { return hnd()->asA<PvtPrim>()->createRelationship(name)->hnd(); } void RtPrim::removeRelationship(const RtToken& name) { return hnd()->asA<PvtPrim>()->removeRelationship(name); } RtRelationship RtPrim::getRelationship(const RtToken& name) const { PvtRelationship* rel = hnd()->asA<PvtPrim>()->getRelationship(name); return rel ? rel->hnd() : RtRelationship(); } RtRelationshipIterator RtPrim::getRelationships() const { return RtRelationshipIterator(*this); } RtAttribute RtPrim::createAttribute(const RtToken& name, const RtToken& type, uint32_t flags) { return hnd()->asA<PvtPrim>()->createAttribute(name, type, flags)->hnd(); } RtInput RtPrim::createInput(const RtToken& name, const RtToken& type, uint32_t flags) { return hnd()->asA<PvtPrim>()->createInput(name, type, flags)->hnd(); } RtOutput RtPrim::createOutput(const RtToken& name, const RtToken& type, uint32_t flags) { return hnd()->asA<PvtPrim>()->createOutput(name, type, flags)->hnd(); } void RtPrim::removeAttribute(const RtToken& name) { return hnd()->asA<PvtPrim>()->removeAttribute(name); } RtAttribute RtPrim::getAttribute(const RtToken& name) const { PvtAttribute* attr = hnd()->asA<PvtPrim>()->getAttribute(name); return attr ? attr->hnd() : RtAttribute(); } RtInput RtPrim::getInput(const RtToken& name) const { PvtInput* input = hnd()->asA<PvtPrim>()->getInput(name); return input ? input->hnd() : RtInput(); } RtOutput RtPrim::getOutput(const RtToken& name) const { PvtOutput* input = hnd()->asA<PvtPrim>()->getOutput(name); return input ? input->hnd() : RtOutput(); } RtAttrIterator RtPrim::getAttributes(RtObjectPredicate filter) const { return RtAttrIterator(*this, filter); } RtPrim RtPrim::getChild(const RtToken& name) const { PvtPrim* child = hnd()->asA<PvtPrim>()->getChild(name); return child ? child->hnd() : RtPrim(); } RtPrimIterator RtPrim::getChildren(RtObjectPredicate predicate) const { return RtPrimIterator(*this, predicate); } }
; A098385: Ordered factorizations over hook-type prime signatures with exactly three distinct primes (third column of A098348). ; Submitted by Jon Maiga ; 13,44,132,368,976,2496,6208,15104,36096,84992,197632,454656,1036288,2342912,5259264,11730944,26017792,57409536,126091264,275775488,600834048,1304428544,2822766592,6090129408,13103005696,28118614016,60196651008,128580583424,274072600576,583041810432,1238024323072,2624225017856,5553392713728,11733850652672,24756191494144,52158082842624,109745004347392,230622563926016,484059994128384,1014849232437248,2125355976491008,4446425022726144,9293072277962752,19404181206990848,40479620088201216 add $0,4 mov $1,2 pow $1,$0 pow $0,2 sub $0,4 mul $0,$1 add $1,$0 mov $0,$1 div $0,16
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2016 by EMC Corporation, All Rights Reserved /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except in compliance with the License. /// You may obtain a copy of the License at /// /// http://www.apache.org/licenses/LICENSE-2.0 /// /// Unless required by applicable law or agreed to in writing, software /// distributed under the License is distributed on an "AS IS" BASIS, /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. /// See the License for the specific language governing permissions and /// limitations under the License. /// /// Copyright holder is EMC Corporation /// /// @author Andrey Abramov /// @author Vasiliy Nabatchikov //////////////////////////////////////////////////////////////////////////////// #ifndef IRESEARCH_THREAD_UTILS_H #define IRESEARCH_THREAD_UTILS_H #include <chrono> #include <condition_variable> #include <mutex> #include <thread> #include "shared.hpp" NS_ROOT inline void sleep_ms(size_t ms) { std::chrono::milliseconds duration(ms); std::this_thread::sleep_for(duration); } template< typename _Mutex > inline std::unique_lock< _Mutex > make_lock(_Mutex& mtx) { return std::unique_lock< _Mutex >(mtx); } #define LOCK__(lock, line) lock ## line #define LOCK_EXPANDER__(lock, line) LOCK__(lock, line) #define LOCK LOCK_EXPANDER__(__lock, __LINE__) #define ADOPT_SCOPED_LOCK_NAMED(mtx, name) std::unique_lock<typename std::remove_reference<decltype(mtx)>::type> name(mtx, std::adopt_lock) #define DEFER_SCOPED_LOCK_NAMED(mtx, name) std::unique_lock<typename std::remove_reference<decltype(mtx)>::type> name(mtx, std::defer_lock) #define SCOPED_LOCK(mtx) std::lock_guard<typename std::remove_reference<decltype(mtx)>::type> LOCK(mtx) #define SCOPED_LOCK_NAMED(mtx, name) std::unique_lock<typename std::remove_reference<decltype(mtx)>::type> name(mtx) #define TRY_SCOPED_LOCK_NAMED(mtx, name) std::unique_lock<typename std::remove_reference<decltype(mtx)>::type> name(mtx, std::try_to_lock) NS_END // ROOT #endif // IRESEARCH_THREAD_UTILS_H
; ============================================================================= ; Mario Party F (working title) ; ============================================================================= processor f8 ; ============================================================================= ; Constants ; ============================================================================= ; ----------------------------------------------------------------------------- ; BIOS Calls ; ----------------------------------------------------------------------------- clrscrn = $00D0 ; uses r31 delay = $008F pushk = $0107 ; used to allow more subroutine stack space popk = $011E drawchar = $0679 ; ----------------------------------------------------------------------------- ; Color Definitions ; ----------------------------------------------------------------------------- DRAWCHAR_CLEAR = $00 DRAWCHAR_BLUE = $40 DRAWCHAR_RED = $80 DRAWCHAR_GREEN = $C0 ; ============================================================================= ; Program Code ; ============================================================================= ; ----------------------------------------------------------------------------- ; Game Entrypoint ; ----------------------------------------------------------------------------- org $800 cartridgeStart: .byte $55, $55 ; cartridge header cartridgeEntry: lis 0 ; init the h/w outs 1 outs 4 outs 5 outs 0 lisu 4 ; r32 = complement flag lisl 0 lr S, A li $c6 ; set to three color, grey background lr 3, A ; clear screen to grey pi clrscrn ; jmp board_load ; ----------------------------------------------------------------------------- ; Game Loop ; ----------------------------------------------------------------------------- mainLoop: jmp rng_update ; ----------------------------------------------------------------------------- ; Random Number Generation ; ----------------------------------------------------------------------------- ; Not really random, more like a very fast timer ; ----------------------------------------------------------------------------- RNG_MIN = 1 RNG_MAX = 9 rng_reset: li RNG_MIN br rng_update2 rng_update: lisu 4 ; RNG seed is stored in r33 lisl 1 lr A, S inc ci RNG_MAX + 1 ; Only allow values 1-9 (add 10?) bnz rng_update2 ; If RNG exceeds maximum, set back to minimum and return br rng_reset rng_update2: lr S, A ; Write the incremented seed back to r33 ai DRAWCHAR_BLUE ; Add blue color to result in r0 for drawchar lr 0, A li 80 lr 1, A li 80 lr 2, A pi drawchar jmp input ; ----------------------------------------------------------------------------- ; Input ; ----------------------------------------------------------------------------- input: clr outs 0 outs 1 ins 1 com bnz pressed jmp mainLoop pressed: dci sfx_roll pi playSong jmp mainLoop ; ----------------------------------------------------------------------------- ; Board Loading ; ----------------------------------------------------------------------------- ; modifies: r5, DC0, DC1 ; jumps to the multiblit code, which modifies r1-4 ; ----------------------------------------------------------------------------- board_return: jmp mainLoop board_load: ; TODO: is messing with isar necessary? lisu 0 lisl 1 dci board board_load_space: ; all spaces have these dimensions lis 5 lr 3, A lis 4 lr 4, A ; load space type into r5. if it's -1, return lm ci $FF bz board_return lr 5, A ; load space position lm lr 1, A lm lr 2, A ; swap board data iterator into DC1 and load a gfx pointer xdc dci gfx_space_blue pi multiblit ; get our position in board data back from DC1 xdc br board_load_space ; ============================================================================= ; Dependencies ; ============================================================================= include "multiblit.asm" include "playsong.asm" ; ============================================================================= ; Game Data ; ============================================================================= ; ----------------------------------------------------------------------------- ; Graphics Data ; ----------------------------------------------------------------------------- gfx_space_blue: .byte $EA .byte $EA .byte $A2 .byte $A3 .byte $03 gfx_space_red: .byte $D5 .byte $D5 .byte $51 .byte $53 .byte $03 gfx_player_piece: .byte %00100000 .byte %01110000 .byte %00100000 .byte %00100000 .byte %01110000 ; ----------------------------------------------------------------------------- ; Music Data ; ----------------------------------------------------------------------------- sfx_roll: .byte 5, 69, 6, 89, 7, 108, 7, 116, 0 ; ----------------------------------------------------------------------------- ; Board Data ; ----------------------------------------------------------------------------- ; .byte space_type, space_x, space_y ; ----------------------------------------------------------------------------- board: .byte $01, $10, $10 .byte $01, $20, $10 .byte $01, $30, $10 .byte $FF ; ----------------------------------------------------------------------------- ; Padding ; ----------------------------------------------------------------------------- org $ff0 signature: .byte " end"
PUSH 0; PUSH 0; ST; PUSH 0; PUSH 1; ST; PUSH 0; PUSH 2; ST; PUSH 0; PUSH 0; SETHI 0x0200; ST; PUSH 0; PUSH 1; SETHI 0x0200; ST; PUSH 0; PUSH 2; SETHI 0x0200; ST; PUSH 0; PULL_CP 0; PUSH 10; CMP_ULE; BZ 3; DROP 0; HALT; PUSH 0; SETHI 0x0200; PULL_CP 0; LD; PUSH 1; ADD; PULL 1; ST; PUSH 1; SETHI 0x0200; PULL_CP 0; LD; PUSH 1; ADD; PULL 1; ST; PUSH 2; SETHI 0x0200; PULL_CP 0; LD; PUSH 1; ADD; PULL 1; ST; PUSH 0; LD; PUSH 1; ADD; PUSH 0; ST; PUSH 1; LD; PUSH 1; ADD; PUSH 1; ST; PUSH 2; LD; PUSH 1; ADD; PUSH 2; ST; PUSH 1; ADD; J_PC -50;
_ln: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "stat.h" #include "user.h" int main(int argc, char *argv[]) { 0: 8d 4c 24 04 lea 0x4(%esp),%ecx 4: 83 e4 f0 and $0xfffffff0,%esp if(argc != 3){ 7: 83 39 03 cmpl $0x3,(%ecx) { a: ff 71 fc pushl -0x4(%ecx) d: 55 push %ebp e: 89 e5 mov %esp,%ebp 10: 53 push %ebx 11: 51 push %ecx 12: 8b 59 04 mov 0x4(%ecx),%ebx if(argc != 3){ 15: 74 13 je 2a <main+0x2a> printf(2, "Usage: ln old new\n"); 17: 52 push %edx 18: 52 push %edx 19: 68 88 07 00 00 push $0x788 1e: 6a 02 push $0x2 20: e8 0b 04 00 00 call 430 <printf> exit(); 25: e8 88 02 00 00 call 2b2 <exit> } if(link(argv[1], argv[2]) < 0) 2a: 50 push %eax 2b: 50 push %eax 2c: ff 73 08 pushl 0x8(%ebx) 2f: ff 73 04 pushl 0x4(%ebx) 32: e8 db 02 00 00 call 312 <link> 37: 83 c4 10 add $0x10,%esp 3a: 85 c0 test %eax,%eax 3c: 78 05 js 43 <main+0x43> printf(2, "link %s %s: failed\n", argv[1], argv[2]); exit(); 3e: e8 6f 02 00 00 call 2b2 <exit> printf(2, "link %s %s: failed\n", argv[1], argv[2]); 43: ff 73 08 pushl 0x8(%ebx) 46: ff 73 04 pushl 0x4(%ebx) 49: 68 9b 07 00 00 push $0x79b 4e: 6a 02 push $0x2 50: e8 db 03 00 00 call 430 <printf> 55: 83 c4 10 add $0x10,%esp 58: eb e4 jmp 3e <main+0x3e> 5a: 66 90 xchg %ax,%ax 5c: 66 90 xchg %ax,%ax 5e: 66 90 xchg %ax,%ax 00000060 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, const char *t) { 60: 55 push %ebp 61: 89 e5 mov %esp,%ebp 63: 53 push %ebx 64: 8b 45 08 mov 0x8(%ebp),%eax 67: 8b 4d 0c mov 0xc(%ebp),%ecx char *os; os = s; while((*s++ = *t++) != 0) 6a: 89 c2 mov %eax,%edx 6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 70: 83 c1 01 add $0x1,%ecx 73: 0f b6 59 ff movzbl -0x1(%ecx),%ebx 77: 83 c2 01 add $0x1,%edx 7a: 84 db test %bl,%bl 7c: 88 5a ff mov %bl,-0x1(%edx) 7f: 75 ef jne 70 <strcpy+0x10> ; return os; } 81: 5b pop %ebx 82: 5d pop %ebp 83: c3 ret 84: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000090 <strcmp>: int strcmp(const char *p, const char *q) { 90: 55 push %ebp 91: 89 e5 mov %esp,%ebp 93: 53 push %ebx 94: 8b 55 08 mov 0x8(%ebp),%edx 97: 8b 4d 0c mov 0xc(%ebp),%ecx while(*p && *p == *q) 9a: 0f b6 02 movzbl (%edx),%eax 9d: 0f b6 19 movzbl (%ecx),%ebx a0: 84 c0 test %al,%al a2: 75 1c jne c0 <strcmp+0x30> a4: eb 2a jmp d0 <strcmp+0x40> a6: 8d 76 00 lea 0x0(%esi),%esi a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi p++, q++; b0: 83 c2 01 add $0x1,%edx while(*p && *p == *q) b3: 0f b6 02 movzbl (%edx),%eax p++, q++; b6: 83 c1 01 add $0x1,%ecx b9: 0f b6 19 movzbl (%ecx),%ebx while(*p && *p == *q) bc: 84 c0 test %al,%al be: 74 10 je d0 <strcmp+0x40> c0: 38 d8 cmp %bl,%al c2: 74 ec je b0 <strcmp+0x20> return (uchar)*p - (uchar)*q; c4: 29 d8 sub %ebx,%eax } c6: 5b pop %ebx c7: 5d pop %ebp c8: c3 ret c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi d0: 31 c0 xor %eax,%eax return (uchar)*p - (uchar)*q; d2: 29 d8 sub %ebx,%eax } d4: 5b pop %ebx d5: 5d pop %ebp d6: c3 ret d7: 89 f6 mov %esi,%esi d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000000e0 <strlen>: uint strlen(const char *s) { e0: 55 push %ebp e1: 89 e5 mov %esp,%ebp e3: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) e6: 80 39 00 cmpb $0x0,(%ecx) e9: 74 15 je 100 <strlen+0x20> eb: 31 d2 xor %edx,%edx ed: 8d 76 00 lea 0x0(%esi),%esi f0: 83 c2 01 add $0x1,%edx f3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) f7: 89 d0 mov %edx,%eax f9: 75 f5 jne f0 <strlen+0x10> ; return n; } fb: 5d pop %ebp fc: c3 ret fd: 8d 76 00 lea 0x0(%esi),%esi for(n = 0; s[n]; n++) 100: 31 c0 xor %eax,%eax } 102: 5d pop %ebp 103: c3 ret 104: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 10a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000110 <memset>: void* memset(void *dst, int c, uint n) { 110: 55 push %ebp 111: 89 e5 mov %esp,%ebp 113: 57 push %edi 114: 8b 55 08 mov 0x8(%ebp),%edx } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : 117: 8b 4d 10 mov 0x10(%ebp),%ecx 11a: 8b 45 0c mov 0xc(%ebp),%eax 11d: 89 d7 mov %edx,%edi 11f: fc cld 120: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } 122: 89 d0 mov %edx,%eax 124: 5f pop %edi 125: 5d pop %ebp 126: c3 ret 127: 89 f6 mov %esi,%esi 129: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000130 <strchr>: char* strchr(const char *s, char c) { 130: 55 push %ebp 131: 89 e5 mov %esp,%ebp 133: 53 push %ebx 134: 8b 45 08 mov 0x8(%ebp),%eax 137: 8b 5d 0c mov 0xc(%ebp),%ebx for(; *s; s++) 13a: 0f b6 10 movzbl (%eax),%edx 13d: 84 d2 test %dl,%dl 13f: 74 1d je 15e <strchr+0x2e> if(*s == c) 141: 38 d3 cmp %dl,%bl 143: 89 d9 mov %ebx,%ecx 145: 75 0d jne 154 <strchr+0x24> 147: eb 17 jmp 160 <strchr+0x30> 149: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 150: 38 ca cmp %cl,%dl 152: 74 0c je 160 <strchr+0x30> for(; *s; s++) 154: 83 c0 01 add $0x1,%eax 157: 0f b6 10 movzbl (%eax),%edx 15a: 84 d2 test %dl,%dl 15c: 75 f2 jne 150 <strchr+0x20> return (char*)s; return 0; 15e: 31 c0 xor %eax,%eax } 160: 5b pop %ebx 161: 5d pop %ebp 162: c3 ret 163: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 169: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000170 <gets>: char* gets(char *buf, int max) { 170: 55 push %ebp 171: 89 e5 mov %esp,%ebp 173: 57 push %edi 174: 56 push %esi 175: 53 push %ebx int i, cc; char c; for(i=0; i+1 < max; ){ 176: 31 f6 xor %esi,%esi 178: 89 f3 mov %esi,%ebx { 17a: 83 ec 1c sub $0x1c,%esp 17d: 8b 7d 08 mov 0x8(%ebp),%edi for(i=0; i+1 < max; ){ 180: eb 2f jmp 1b1 <gets+0x41> 182: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cc = read(0, &c, 1); 188: 8d 45 e7 lea -0x19(%ebp),%eax 18b: 83 ec 04 sub $0x4,%esp 18e: 6a 01 push $0x1 190: 50 push %eax 191: 6a 00 push $0x0 193: e8 32 01 00 00 call 2ca <read> if(cc < 1) 198: 83 c4 10 add $0x10,%esp 19b: 85 c0 test %eax,%eax 19d: 7e 1c jle 1bb <gets+0x4b> break; buf[i++] = c; 19f: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 1a3: 83 c7 01 add $0x1,%edi 1a6: 88 47 ff mov %al,-0x1(%edi) if(c == '\n' || c == '\r') 1a9: 3c 0a cmp $0xa,%al 1ab: 74 23 je 1d0 <gets+0x60> 1ad: 3c 0d cmp $0xd,%al 1af: 74 1f je 1d0 <gets+0x60> for(i=0; i+1 < max; ){ 1b1: 83 c3 01 add $0x1,%ebx 1b4: 3b 5d 0c cmp 0xc(%ebp),%ebx 1b7: 89 fe mov %edi,%esi 1b9: 7c cd jl 188 <gets+0x18> 1bb: 89 f3 mov %esi,%ebx break; } buf[i] = '\0'; return buf; } 1bd: 8b 45 08 mov 0x8(%ebp),%eax buf[i] = '\0'; 1c0: c6 03 00 movb $0x0,(%ebx) } 1c3: 8d 65 f4 lea -0xc(%ebp),%esp 1c6: 5b pop %ebx 1c7: 5e pop %esi 1c8: 5f pop %edi 1c9: 5d pop %ebp 1ca: c3 ret 1cb: 90 nop 1cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1d0: 8b 75 08 mov 0x8(%ebp),%esi 1d3: 8b 45 08 mov 0x8(%ebp),%eax 1d6: 01 de add %ebx,%esi 1d8: 89 f3 mov %esi,%ebx buf[i] = '\0'; 1da: c6 03 00 movb $0x0,(%ebx) } 1dd: 8d 65 f4 lea -0xc(%ebp),%esp 1e0: 5b pop %ebx 1e1: 5e pop %esi 1e2: 5f pop %edi 1e3: 5d pop %ebp 1e4: c3 ret 1e5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000001f0 <stat>: int stat(const char *n, struct stat *st) { 1f0: 55 push %ebp 1f1: 89 e5 mov %esp,%ebp 1f3: 56 push %esi 1f4: 53 push %ebx int fd; int r; fd = open(n, O_RDONLY); 1f5: 83 ec 08 sub $0x8,%esp 1f8: 6a 00 push $0x0 1fa: ff 75 08 pushl 0x8(%ebp) 1fd: e8 f0 00 00 00 call 2f2 <open> if(fd < 0) 202: 83 c4 10 add $0x10,%esp 205: 85 c0 test %eax,%eax 207: 78 27 js 230 <stat+0x40> return -1; r = fstat(fd, st); 209: 83 ec 08 sub $0x8,%esp 20c: ff 75 0c pushl 0xc(%ebp) 20f: 89 c3 mov %eax,%ebx 211: 50 push %eax 212: e8 f3 00 00 00 call 30a <fstat> close(fd); 217: 89 1c 24 mov %ebx,(%esp) r = fstat(fd, st); 21a: 89 c6 mov %eax,%esi close(fd); 21c: e8 b9 00 00 00 call 2da <close> return r; 221: 83 c4 10 add $0x10,%esp } 224: 8d 65 f8 lea -0x8(%ebp),%esp 227: 89 f0 mov %esi,%eax 229: 5b pop %ebx 22a: 5e pop %esi 22b: 5d pop %ebp 22c: c3 ret 22d: 8d 76 00 lea 0x0(%esi),%esi return -1; 230: be ff ff ff ff mov $0xffffffff,%esi 235: eb ed jmp 224 <stat+0x34> 237: 89 f6 mov %esi,%esi 239: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000240 <atoi>: int atoi(const char *s) { 240: 55 push %ebp 241: 89 e5 mov %esp,%ebp 243: 53 push %ebx 244: 8b 4d 08 mov 0x8(%ebp),%ecx int n; n = 0; while('0' <= *s && *s <= '9') 247: 0f be 11 movsbl (%ecx),%edx 24a: 8d 42 d0 lea -0x30(%edx),%eax 24d: 3c 09 cmp $0x9,%al n = 0; 24f: b8 00 00 00 00 mov $0x0,%eax while('0' <= *s && *s <= '9') 254: 77 1f ja 275 <atoi+0x35> 256: 8d 76 00 lea 0x0(%esi),%esi 259: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi n = n*10 + *s++ - '0'; 260: 8d 04 80 lea (%eax,%eax,4),%eax 263: 83 c1 01 add $0x1,%ecx 266: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax while('0' <= *s && *s <= '9') 26a: 0f be 11 movsbl (%ecx),%edx 26d: 8d 5a d0 lea -0x30(%edx),%ebx 270: 80 fb 09 cmp $0x9,%bl 273: 76 eb jbe 260 <atoi+0x20> return n; } 275: 5b pop %ebx 276: 5d pop %ebp 277: c3 ret 278: 90 nop 279: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000280 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { 280: 55 push %ebp 281: 89 e5 mov %esp,%ebp 283: 56 push %esi 284: 53 push %ebx 285: 8b 5d 10 mov 0x10(%ebp),%ebx 288: 8b 45 08 mov 0x8(%ebp),%eax 28b: 8b 75 0c mov 0xc(%ebp),%esi char *dst; const char *src; dst = vdst; src = vsrc; while(n-- > 0) 28e: 85 db test %ebx,%ebx 290: 7e 14 jle 2a6 <memmove+0x26> 292: 31 d2 xor %edx,%edx 294: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *dst++ = *src++; 298: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 29c: 88 0c 10 mov %cl,(%eax,%edx,1) 29f: 83 c2 01 add $0x1,%edx while(n-- > 0) 2a2: 39 d3 cmp %edx,%ebx 2a4: 75 f2 jne 298 <memmove+0x18> return vdst; } 2a6: 5b pop %ebx 2a7: 5e pop %esi 2a8: 5d pop %ebp 2a9: c3 ret 000002aa <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 2aa: b8 01 00 00 00 mov $0x1,%eax 2af: cd 40 int $0x40 2b1: c3 ret 000002b2 <exit>: SYSCALL(exit) 2b2: b8 02 00 00 00 mov $0x2,%eax 2b7: cd 40 int $0x40 2b9: c3 ret 000002ba <wait>: SYSCALL(wait) 2ba: b8 03 00 00 00 mov $0x3,%eax 2bf: cd 40 int $0x40 2c1: c3 ret 000002c2 <pipe>: SYSCALL(pipe) 2c2: b8 04 00 00 00 mov $0x4,%eax 2c7: cd 40 int $0x40 2c9: c3 ret 000002ca <read>: SYSCALL(read) 2ca: b8 05 00 00 00 mov $0x5,%eax 2cf: cd 40 int $0x40 2d1: c3 ret 000002d2 <write>: SYSCALL(write) 2d2: b8 10 00 00 00 mov $0x10,%eax 2d7: cd 40 int $0x40 2d9: c3 ret 000002da <close>: SYSCALL(close) 2da: b8 15 00 00 00 mov $0x15,%eax 2df: cd 40 int $0x40 2e1: c3 ret 000002e2 <kill>: SYSCALL(kill) 2e2: b8 06 00 00 00 mov $0x6,%eax 2e7: cd 40 int $0x40 2e9: c3 ret 000002ea <exec>: SYSCALL(exec) 2ea: b8 07 00 00 00 mov $0x7,%eax 2ef: cd 40 int $0x40 2f1: c3 ret 000002f2 <open>: SYSCALL(open) 2f2: b8 0f 00 00 00 mov $0xf,%eax 2f7: cd 40 int $0x40 2f9: c3 ret 000002fa <mknod>: SYSCALL(mknod) 2fa: b8 11 00 00 00 mov $0x11,%eax 2ff: cd 40 int $0x40 301: c3 ret 00000302 <unlink>: SYSCALL(unlink) 302: b8 12 00 00 00 mov $0x12,%eax 307: cd 40 int $0x40 309: c3 ret 0000030a <fstat>: SYSCALL(fstat) 30a: b8 08 00 00 00 mov $0x8,%eax 30f: cd 40 int $0x40 311: c3 ret 00000312 <link>: SYSCALL(link) 312: b8 13 00 00 00 mov $0x13,%eax 317: cd 40 int $0x40 319: c3 ret 0000031a <mkdir>: SYSCALL(mkdir) 31a: b8 14 00 00 00 mov $0x14,%eax 31f: cd 40 int $0x40 321: c3 ret 00000322 <chdir>: SYSCALL(chdir) 322: b8 09 00 00 00 mov $0x9,%eax 327: cd 40 int $0x40 329: c3 ret 0000032a <dup>: SYSCALL(dup) 32a: b8 0a 00 00 00 mov $0xa,%eax 32f: cd 40 int $0x40 331: c3 ret 00000332 <getpid>: SYSCALL(getpid) 332: b8 0b 00 00 00 mov $0xb,%eax 337: cd 40 int $0x40 339: c3 ret 0000033a <sbrk>: SYSCALL(sbrk) 33a: b8 0c 00 00 00 mov $0xc,%eax 33f: cd 40 int $0x40 341: c3 ret 00000342 <sleep>: SYSCALL(sleep) 342: b8 0d 00 00 00 mov $0xd,%eax 347: cd 40 int $0x40 349: c3 ret 0000034a <uptime>: SYSCALL(uptime) 34a: b8 0e 00 00 00 mov $0xe,%eax 34f: cd 40 int $0x40 351: c3 ret 00000352 <hello>: SYSCALL(hello) 352: b8 16 00 00 00 mov $0x16,%eax 357: cd 40 int $0x40 359: c3 ret 0000035a <helloname>: SYSCALL(helloname) 35a: b8 17 00 00 00 mov $0x17,%eax 35f: cd 40 int $0x40 361: c3 ret 00000362 <getnumproc>: SYSCALL(getnumproc) 362: b8 18 00 00 00 mov $0x18,%eax 367: cd 40 int $0x40 369: c3 ret 0000036a <getmaxpid>: SYSCALL(getmaxpid) 36a: b8 19 00 00 00 mov $0x19,%eax 36f: cd 40 int $0x40 371: c3 ret 00000372 <getprocinfo>: SYSCALL(getprocinfo) 372: b8 1a 00 00 00 mov $0x1a,%eax 377: cd 40 int $0x40 379: c3 ret 0000037a <setprio>: SYSCALL(setprio) 37a: b8 1b 00 00 00 mov $0x1b,%eax 37f: cd 40 int $0x40 381: c3 ret 00000382 <getprio>: SYSCALL(getprio) 382: b8 1c 00 00 00 mov $0x1c,%eax 387: cd 40 int $0x40 389: c3 ret 38a: 66 90 xchg %ax,%ax 38c: 66 90 xchg %ax,%ax 38e: 66 90 xchg %ax,%ax 00000390 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 390: 55 push %ebp 391: 89 e5 mov %esp,%ebp 393: 57 push %edi 394: 56 push %esi 395: 53 push %ebx 396: 83 ec 3c sub $0x3c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 399: 85 d2 test %edx,%edx { 39b: 89 45 c0 mov %eax,-0x40(%ebp) neg = 1; x = -xx; 39e: 89 d0 mov %edx,%eax if(sgn && xx < 0){ 3a0: 79 76 jns 418 <printint+0x88> 3a2: f6 45 08 01 testb $0x1,0x8(%ebp) 3a6: 74 70 je 418 <printint+0x88> x = -xx; 3a8: f7 d8 neg %eax neg = 1; 3aa: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) } else { x = xx; } i = 0; 3b1: 31 f6 xor %esi,%esi 3b3: 8d 5d d7 lea -0x29(%ebp),%ebx 3b6: eb 0a jmp 3c2 <printint+0x32> 3b8: 90 nop 3b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi do{ buf[i++] = digits[x % base]; 3c0: 89 fe mov %edi,%esi 3c2: 31 d2 xor %edx,%edx 3c4: 8d 7e 01 lea 0x1(%esi),%edi 3c7: f7 f1 div %ecx 3c9: 0f b6 92 b8 07 00 00 movzbl 0x7b8(%edx),%edx }while((x /= base) != 0); 3d0: 85 c0 test %eax,%eax buf[i++] = digits[x % base]; 3d2: 88 14 3b mov %dl,(%ebx,%edi,1) }while((x /= base) != 0); 3d5: 75 e9 jne 3c0 <printint+0x30> if(neg) 3d7: 8b 45 c4 mov -0x3c(%ebp),%eax 3da: 85 c0 test %eax,%eax 3dc: 74 08 je 3e6 <printint+0x56> buf[i++] = '-'; 3de: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1) 3e3: 8d 7e 02 lea 0x2(%esi),%edi 3e6: 8d 74 3d d7 lea -0x29(%ebp,%edi,1),%esi 3ea: 8b 7d c0 mov -0x40(%ebp),%edi 3ed: 8d 76 00 lea 0x0(%esi),%esi 3f0: 0f b6 06 movzbl (%esi),%eax write(fd, &c, 1); 3f3: 83 ec 04 sub $0x4,%esp 3f6: 83 ee 01 sub $0x1,%esi 3f9: 6a 01 push $0x1 3fb: 53 push %ebx 3fc: 57 push %edi 3fd: 88 45 d7 mov %al,-0x29(%ebp) 400: e8 cd fe ff ff call 2d2 <write> while(--i >= 0) 405: 83 c4 10 add $0x10,%esp 408: 39 de cmp %ebx,%esi 40a: 75 e4 jne 3f0 <printint+0x60> putc(fd, buf[i]); } 40c: 8d 65 f4 lea -0xc(%ebp),%esp 40f: 5b pop %ebx 410: 5e pop %esi 411: 5f pop %edi 412: 5d pop %ebp 413: c3 ret 414: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi neg = 0; 418: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 41f: eb 90 jmp 3b1 <printint+0x21> 421: eb 0d jmp 430 <printf> 423: 90 nop 424: 90 nop 425: 90 nop 426: 90 nop 427: 90 nop 428: 90 nop 429: 90 nop 42a: 90 nop 42b: 90 nop 42c: 90 nop 42d: 90 nop 42e: 90 nop 42f: 90 nop 00000430 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 430: 55 push %ebp 431: 89 e5 mov %esp,%ebp 433: 57 push %edi 434: 56 push %esi 435: 53 push %ebx 436: 83 ec 2c sub $0x2c,%esp int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 439: 8b 75 0c mov 0xc(%ebp),%esi 43c: 0f b6 1e movzbl (%esi),%ebx 43f: 84 db test %bl,%bl 441: 0f 84 b3 00 00 00 je 4fa <printf+0xca> ap = (uint*)(void*)&fmt + 1; 447: 8d 45 10 lea 0x10(%ebp),%eax 44a: 83 c6 01 add $0x1,%esi state = 0; 44d: 31 ff xor %edi,%edi ap = (uint*)(void*)&fmt + 1; 44f: 89 45 d4 mov %eax,-0x2c(%ebp) 452: eb 2f jmp 483 <printf+0x53> 454: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 458: 83 f8 25 cmp $0x25,%eax 45b: 0f 84 a7 00 00 00 je 508 <printf+0xd8> write(fd, &c, 1); 461: 8d 45 e2 lea -0x1e(%ebp),%eax 464: 83 ec 04 sub $0x4,%esp 467: 88 5d e2 mov %bl,-0x1e(%ebp) 46a: 6a 01 push $0x1 46c: 50 push %eax 46d: ff 75 08 pushl 0x8(%ebp) 470: e8 5d fe ff ff call 2d2 <write> 475: 83 c4 10 add $0x10,%esp 478: 83 c6 01 add $0x1,%esi for(i = 0; fmt[i]; i++){ 47b: 0f b6 5e ff movzbl -0x1(%esi),%ebx 47f: 84 db test %bl,%bl 481: 74 77 je 4fa <printf+0xca> if(state == 0){ 483: 85 ff test %edi,%edi c = fmt[i] & 0xff; 485: 0f be cb movsbl %bl,%ecx 488: 0f b6 c3 movzbl %bl,%eax if(state == 0){ 48b: 74 cb je 458 <printf+0x28> state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 48d: 83 ff 25 cmp $0x25,%edi 490: 75 e6 jne 478 <printf+0x48> if(c == 'd'){ 492: 83 f8 64 cmp $0x64,%eax 495: 0f 84 05 01 00 00 je 5a0 <printf+0x170> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 49b: 81 e1 f7 00 00 00 and $0xf7,%ecx 4a1: 83 f9 70 cmp $0x70,%ecx 4a4: 74 72 je 518 <printf+0xe8> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 4a6: 83 f8 73 cmp $0x73,%eax 4a9: 0f 84 99 00 00 00 je 548 <printf+0x118> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 4af: 83 f8 63 cmp $0x63,%eax 4b2: 0f 84 08 01 00 00 je 5c0 <printf+0x190> putc(fd, *ap); ap++; } else if(c == '%'){ 4b8: 83 f8 25 cmp $0x25,%eax 4bb: 0f 84 ef 00 00 00 je 5b0 <printf+0x180> write(fd, &c, 1); 4c1: 8d 45 e7 lea -0x19(%ebp),%eax 4c4: 83 ec 04 sub $0x4,%esp 4c7: c6 45 e7 25 movb $0x25,-0x19(%ebp) 4cb: 6a 01 push $0x1 4cd: 50 push %eax 4ce: ff 75 08 pushl 0x8(%ebp) 4d1: e8 fc fd ff ff call 2d2 <write> 4d6: 83 c4 0c add $0xc,%esp 4d9: 8d 45 e6 lea -0x1a(%ebp),%eax 4dc: 88 5d e6 mov %bl,-0x1a(%ebp) 4df: 6a 01 push $0x1 4e1: 50 push %eax 4e2: ff 75 08 pushl 0x8(%ebp) 4e5: 83 c6 01 add $0x1,%esi } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 4e8: 31 ff xor %edi,%edi write(fd, &c, 1); 4ea: e8 e3 fd ff ff call 2d2 <write> for(i = 0; fmt[i]; i++){ 4ef: 0f b6 5e ff movzbl -0x1(%esi),%ebx write(fd, &c, 1); 4f3: 83 c4 10 add $0x10,%esp for(i = 0; fmt[i]; i++){ 4f6: 84 db test %bl,%bl 4f8: 75 89 jne 483 <printf+0x53> } } } 4fa: 8d 65 f4 lea -0xc(%ebp),%esp 4fd: 5b pop %ebx 4fe: 5e pop %esi 4ff: 5f pop %edi 500: 5d pop %ebp 501: c3 ret 502: 8d b6 00 00 00 00 lea 0x0(%esi),%esi state = '%'; 508: bf 25 00 00 00 mov $0x25,%edi 50d: e9 66 ff ff ff jmp 478 <printf+0x48> 512: 8d b6 00 00 00 00 lea 0x0(%esi),%esi printint(fd, *ap, 16, 0); 518: 83 ec 0c sub $0xc,%esp 51b: b9 10 00 00 00 mov $0x10,%ecx 520: 6a 00 push $0x0 522: 8b 7d d4 mov -0x2c(%ebp),%edi 525: 8b 45 08 mov 0x8(%ebp),%eax 528: 8b 17 mov (%edi),%edx 52a: e8 61 fe ff ff call 390 <printint> ap++; 52f: 89 f8 mov %edi,%eax 531: 83 c4 10 add $0x10,%esp state = 0; 534: 31 ff xor %edi,%edi ap++; 536: 83 c0 04 add $0x4,%eax 539: 89 45 d4 mov %eax,-0x2c(%ebp) 53c: e9 37 ff ff ff jmp 478 <printf+0x48> 541: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi s = (char*)*ap; 548: 8b 45 d4 mov -0x2c(%ebp),%eax 54b: 8b 08 mov (%eax),%ecx ap++; 54d: 83 c0 04 add $0x4,%eax 550: 89 45 d4 mov %eax,-0x2c(%ebp) if(s == 0) 553: 85 c9 test %ecx,%ecx 555: 0f 84 8e 00 00 00 je 5e9 <printf+0x1b9> while(*s != 0){ 55b: 0f b6 01 movzbl (%ecx),%eax state = 0; 55e: 31 ff xor %edi,%edi s = (char*)*ap; 560: 89 cb mov %ecx,%ebx while(*s != 0){ 562: 84 c0 test %al,%al 564: 0f 84 0e ff ff ff je 478 <printf+0x48> 56a: 89 75 d0 mov %esi,-0x30(%ebp) 56d: 89 de mov %ebx,%esi 56f: 8b 5d 08 mov 0x8(%ebp),%ebx 572: 8d 7d e3 lea -0x1d(%ebp),%edi 575: 8d 76 00 lea 0x0(%esi),%esi write(fd, &c, 1); 578: 83 ec 04 sub $0x4,%esp s++; 57b: 83 c6 01 add $0x1,%esi 57e: 88 45 e3 mov %al,-0x1d(%ebp) write(fd, &c, 1); 581: 6a 01 push $0x1 583: 57 push %edi 584: 53 push %ebx 585: e8 48 fd ff ff call 2d2 <write> while(*s != 0){ 58a: 0f b6 06 movzbl (%esi),%eax 58d: 83 c4 10 add $0x10,%esp 590: 84 c0 test %al,%al 592: 75 e4 jne 578 <printf+0x148> 594: 8b 75 d0 mov -0x30(%ebp),%esi state = 0; 597: 31 ff xor %edi,%edi 599: e9 da fe ff ff jmp 478 <printf+0x48> 59e: 66 90 xchg %ax,%ax printint(fd, *ap, 10, 1); 5a0: 83 ec 0c sub $0xc,%esp 5a3: b9 0a 00 00 00 mov $0xa,%ecx 5a8: 6a 01 push $0x1 5aa: e9 73 ff ff ff jmp 522 <printf+0xf2> 5af: 90 nop write(fd, &c, 1); 5b0: 83 ec 04 sub $0x4,%esp 5b3: 88 5d e5 mov %bl,-0x1b(%ebp) 5b6: 8d 45 e5 lea -0x1b(%ebp),%eax 5b9: 6a 01 push $0x1 5bb: e9 21 ff ff ff jmp 4e1 <printf+0xb1> putc(fd, *ap); 5c0: 8b 7d d4 mov -0x2c(%ebp),%edi write(fd, &c, 1); 5c3: 83 ec 04 sub $0x4,%esp putc(fd, *ap); 5c6: 8b 07 mov (%edi),%eax write(fd, &c, 1); 5c8: 6a 01 push $0x1 ap++; 5ca: 83 c7 04 add $0x4,%edi putc(fd, *ap); 5cd: 88 45 e4 mov %al,-0x1c(%ebp) write(fd, &c, 1); 5d0: 8d 45 e4 lea -0x1c(%ebp),%eax 5d3: 50 push %eax 5d4: ff 75 08 pushl 0x8(%ebp) 5d7: e8 f6 fc ff ff call 2d2 <write> ap++; 5dc: 89 7d d4 mov %edi,-0x2c(%ebp) 5df: 83 c4 10 add $0x10,%esp state = 0; 5e2: 31 ff xor %edi,%edi 5e4: e9 8f fe ff ff jmp 478 <printf+0x48> s = "(null)"; 5e9: bb af 07 00 00 mov $0x7af,%ebx while(*s != 0){ 5ee: b8 28 00 00 00 mov $0x28,%eax 5f3: e9 72 ff ff ff jmp 56a <printf+0x13a> 5f8: 66 90 xchg %ax,%ax 5fa: 66 90 xchg %ax,%ax 5fc: 66 90 xchg %ax,%ax 5fe: 66 90 xchg %ax,%ax 00000600 <free>: static Header base; static Header *freep; void free(void *ap) { 600: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 601: a1 60 0a 00 00 mov 0xa60,%eax { 606: 89 e5 mov %esp,%ebp 608: 57 push %edi 609: 56 push %esi 60a: 53 push %ebx 60b: 8b 5d 08 mov 0x8(%ebp),%ebx bp = (Header*)ap - 1; 60e: 8d 4b f8 lea -0x8(%ebx),%ecx 611: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 618: 39 c8 cmp %ecx,%eax 61a: 8b 10 mov (%eax),%edx 61c: 73 32 jae 650 <free+0x50> 61e: 39 d1 cmp %edx,%ecx 620: 72 04 jb 626 <free+0x26> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 622: 39 d0 cmp %edx,%eax 624: 72 32 jb 658 <free+0x58> break; if(bp + bp->s.size == p->s.ptr){ 626: 8b 73 fc mov -0x4(%ebx),%esi 629: 8d 3c f1 lea (%ecx,%esi,8),%edi 62c: 39 fa cmp %edi,%edx 62e: 74 30 je 660 <free+0x60> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 630: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 633: 8b 50 04 mov 0x4(%eax),%edx 636: 8d 34 d0 lea (%eax,%edx,8),%esi 639: 39 f1 cmp %esi,%ecx 63b: 74 3a je 677 <free+0x77> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 63d: 89 08 mov %ecx,(%eax) freep = p; 63f: a3 60 0a 00 00 mov %eax,0xa60 } 644: 5b pop %ebx 645: 5e pop %esi 646: 5f pop %edi 647: 5d pop %ebp 648: c3 ret 649: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 650: 39 d0 cmp %edx,%eax 652: 72 04 jb 658 <free+0x58> 654: 39 d1 cmp %edx,%ecx 656: 72 ce jb 626 <free+0x26> { 658: 89 d0 mov %edx,%eax 65a: eb bc jmp 618 <free+0x18> 65c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi bp->s.size += p->s.ptr->s.size; 660: 03 72 04 add 0x4(%edx),%esi 663: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 666: 8b 10 mov (%eax),%edx 668: 8b 12 mov (%edx),%edx 66a: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 66d: 8b 50 04 mov 0x4(%eax),%edx 670: 8d 34 d0 lea (%eax,%edx,8),%esi 673: 39 f1 cmp %esi,%ecx 675: 75 c6 jne 63d <free+0x3d> p->s.size += bp->s.size; 677: 03 53 fc add -0x4(%ebx),%edx freep = p; 67a: a3 60 0a 00 00 mov %eax,0xa60 p->s.size += bp->s.size; 67f: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 682: 8b 53 f8 mov -0x8(%ebx),%edx 685: 89 10 mov %edx,(%eax) } 687: 5b pop %ebx 688: 5e pop %esi 689: 5f pop %edi 68a: 5d pop %ebp 68b: c3 ret 68c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00000690 <malloc>: return freep; } void* malloc(uint nbytes) { 690: 55 push %ebp 691: 89 e5 mov %esp,%ebp 693: 57 push %edi 694: 56 push %esi 695: 53 push %ebx 696: 83 ec 0c sub $0xc,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 699: 8b 45 08 mov 0x8(%ebp),%eax if((prevp = freep) == 0){ 69c: 8b 15 60 0a 00 00 mov 0xa60,%edx nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 6a2: 8d 78 07 lea 0x7(%eax),%edi 6a5: c1 ef 03 shr $0x3,%edi 6a8: 83 c7 01 add $0x1,%edi if((prevp = freep) == 0){ 6ab: 85 d2 test %edx,%edx 6ad: 0f 84 9d 00 00 00 je 750 <malloc+0xc0> 6b3: 8b 02 mov (%edx),%eax 6b5: 8b 48 04 mov 0x4(%eax),%ecx base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ 6b8: 39 cf cmp %ecx,%edi 6ba: 76 6c jbe 728 <malloc+0x98> 6bc: 81 ff 00 10 00 00 cmp $0x1000,%edi 6c2: bb 00 10 00 00 mov $0x1000,%ebx 6c7: 0f 43 df cmovae %edi,%ebx p = sbrk(nu * sizeof(Header)); 6ca: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 6d1: eb 0e jmp 6e1 <malloc+0x51> 6d3: 90 nop 6d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 6d8: 8b 02 mov (%edx),%eax if(p->s.size >= nunits){ 6da: 8b 48 04 mov 0x4(%eax),%ecx 6dd: 39 f9 cmp %edi,%ecx 6df: 73 47 jae 728 <malloc+0x98> p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 6e1: 39 05 60 0a 00 00 cmp %eax,0xa60 6e7: 89 c2 mov %eax,%edx 6e9: 75 ed jne 6d8 <malloc+0x48> p = sbrk(nu * sizeof(Header)); 6eb: 83 ec 0c sub $0xc,%esp 6ee: 56 push %esi 6ef: e8 46 fc ff ff call 33a <sbrk> if(p == (char*)-1) 6f4: 83 c4 10 add $0x10,%esp 6f7: 83 f8 ff cmp $0xffffffff,%eax 6fa: 74 1c je 718 <malloc+0x88> hp->s.size = nu; 6fc: 89 58 04 mov %ebx,0x4(%eax) free((void*)(hp + 1)); 6ff: 83 ec 0c sub $0xc,%esp 702: 83 c0 08 add $0x8,%eax 705: 50 push %eax 706: e8 f5 fe ff ff call 600 <free> return freep; 70b: 8b 15 60 0a 00 00 mov 0xa60,%edx if((p = morecore(nunits)) == 0) 711: 83 c4 10 add $0x10,%esp 714: 85 d2 test %edx,%edx 716: 75 c0 jne 6d8 <malloc+0x48> return 0; } } 718: 8d 65 f4 lea -0xc(%ebp),%esp return 0; 71b: 31 c0 xor %eax,%eax } 71d: 5b pop %ebx 71e: 5e pop %esi 71f: 5f pop %edi 720: 5d pop %ebp 721: c3 ret 722: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(p->s.size == nunits) 728: 39 cf cmp %ecx,%edi 72a: 74 54 je 780 <malloc+0xf0> p->s.size -= nunits; 72c: 29 f9 sub %edi,%ecx 72e: 89 48 04 mov %ecx,0x4(%eax) p += p->s.size; 731: 8d 04 c8 lea (%eax,%ecx,8),%eax p->s.size = nunits; 734: 89 78 04 mov %edi,0x4(%eax) freep = prevp; 737: 89 15 60 0a 00 00 mov %edx,0xa60 } 73d: 8d 65 f4 lea -0xc(%ebp),%esp return (void*)(p + 1); 740: 83 c0 08 add $0x8,%eax } 743: 5b pop %ebx 744: 5e pop %esi 745: 5f pop %edi 746: 5d pop %ebp 747: c3 ret 748: 90 nop 749: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi base.s.ptr = freep = prevp = &base; 750: c7 05 60 0a 00 00 64 movl $0xa64,0xa60 757: 0a 00 00 75a: c7 05 64 0a 00 00 64 movl $0xa64,0xa64 761: 0a 00 00 base.s.size = 0; 764: b8 64 0a 00 00 mov $0xa64,%eax 769: c7 05 68 0a 00 00 00 movl $0x0,0xa68 770: 00 00 00 773: e9 44 ff ff ff jmp 6bc <malloc+0x2c> 778: 90 nop 779: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi prevp->s.ptr = p->s.ptr; 780: 8b 08 mov (%eax),%ecx 782: 89 0a mov %ecx,(%edx) 784: eb b1 jmp 737 <malloc+0xa7>
; 2018 June feilipu INCLUDE "config_private.inc" SECTION code_clib SECTION code_math PUBLIC l_z180_mulu_32_32x32, l0_z180_mulu_32_32x32 l_z180_mulu_32_32x32: ; multiplication of two 32-bit numbers into a 32-bit product ; ; enter : dehl = 32-bit multiplicand ; dehl'= 32-bit multiplicand ; ; exit : dehl = 32-bit product ; carry reset ; ; uses : af, bc, de, hl, bc', de', hl' push hl exx ld c,l ld b,h pop hl push de ex de,hl exx pop bc l0_z180_mulu_32_32x32: ; multiplication of two 32-bit numbers into a 32-bit product ; ; enter : dede' = 32-bit multiplier = x ; bcbc' = 32-bit multiplicand = y ; ; exit : dehl = 32-bit product ; carry reset ; ; uses : af, bc, de, hl, bc', de', hl' ; save material for the byte p3 = x3*y0 + x2*y1 + x1*y2 + x0*y3 + p2 carry push de ; x3 x2 exx push bc ; y1 y0 push de ; x1 x0 exx push bc ; y3 y2 ; save material for the byte p2 = x2*y0 + x0*y2 + x1*y1 + p1 carry ; start of 32_32x32 ld h,e ld l,c push hl ; x2 y2 exx ; now we're working in the low order bytes ld h,e ld l,c push hl ; x0 y0 ; start of 32_16x16 p1 = x1*y0 + x0*y1 + p0 carry ; p0 = x0*y0 ld h,d ld l,b push hl ; x1 y1 ld h,d ; x1 ld l,c ; y0 ld d,c ; y0 e = x0 ld c,e ; x0 b = y1 ; bc = x0 y1 ; de = x0 y0 ; hl = x1 y0 ; stack = x1 y1 mlt de ; x0*y0 mlt bc ; x0*y1 mlt hl ; x1*y0 xor a ; zero A add hl,bc ; sum cross products p2 p1 adc a,a ; capture carry p3 ld b,a ld c,h ; LSB of MSW from cross products ld a,d add a,l ld d,a ; LSW in DE p1 p0 pop hl mlt hl ; x1*y1 adc hl,bc ; HL = interim MSW p3 p2 ; 32_16x16 = HLDE push hl ; stack interim p3 p2 ex de,hl ; DEHL = end of 32_16x16 ; continue doing the p2 byte exx ; now we're working in the high order bytes ; DEHL' = end of 32_16x16 pop hl ; stack interim p3 p2 pop bc ; x0 y0 pop de ; x2 y2 ld a,b ld b,d ld d,a mlt bc ; x2*y0 mlt de ; x0*y2 add hl,bc add hl,de ; start doing the p3 byte pop bc ; y3 y2 pop de ; x1 x0 ld a,b ld b,d ld d,a mlt bc ; x1*y2 mlt de ; y3*x0 ld a,h ; work with existing p3 from H add a,c ; add low bytes of products add a,e pop bc ; y1 y0 pop de ; x3 x2 ld h,b ld b,d ld d,h mlt bc ; x3*y0 mlt de ; y1*x2 add a,c ; add low bytes of products add a,e ld h,a ; put final p3 back in H push hl exx ; now we're working in the low order bytes, again pop de xor a ; carry reset ret ; exit : DEHL = 32-bit product
;; xOS -- libxwidget 1 ;; Copyright (c) 2017 by Omar Mohammad. use32 ; ; typedef struct textbox_component ; { ; u8 id; // XWIDGET_CPNT_TEXTBOX ; u8 flags; // described below ; u16 x; ; u16 y; ; u16 width; ; u16 height; ; u16 reserved; ; u32 text; ; u32 limit; ; u16 position_x; ; u16 position_y; ; u32 text_position; ; } textbox_component; ; XWIDGET_TEXTBOX_ID = 0x00 XWIDGET_TEXTBOX_FLAGS = 0x01 XWIDGET_TEXTBOX_X = 0x02 XWIDGET_TEXTBOX_Y = 0x04 XWIDGET_TEXTBOX_WIDTH = 0x06 XWIDGET_TEXTBOX_HEIGHT = 0x08 XWIDGET_TEXTBOX_TEXT = 0x0C XWIDGET_TEXTBOX_LIMIT = 0x10 XWIDGET_TEXTBOX_POSITION_X = 0x14 XWIDGET_TEXTBOX_POSITION_Y = 0x16 XWIDGET_TEXTBOX_TEXT_POSITION = 0x18 ; Flags XWIDGET_TEXTBOX_FOCUSED = 0x01 XWIDGET_TEXTBOX_MULTILINE = 0x02 ; xwidget_create_textbox: ; Creates a textbox ; In\ EAX = Window handle ; In\ CX/DX = X/Y pos ; In\ SI/DI = Width/Height ; In\ BL = Flags ; In\ EBP = Pointer to text and limit ; Out\ EAX = Component handle, -1 on error align 4 xwidget_create_textbox: mov [.window], eax mov [.x], cx mov [.y], dx mov [.width], si mov [.height], di mov [.flags], bl mov eax, [ebp] mov [.text], eax mov eax, [ebp+4] ; limit in chars mov [.limit], eax mov eax, [.window] call xwidget_find_component ; find a free conponent handle cmp eax, -1 je .error mov [.component], eax ; create the component here mov edi, [.component] mov byte[edi+XWIDGET_TEXTBOX_ID], XWIDGET_CPNT_TEXTBOX mov al, [.flags] mov [edi+XWIDGET_TEXTBOX_FLAGS], al mov ax, [.x] mov [edi+XWIDGET_TEXTBOX_X], ax mov ax, [.y] mov [edi+XWIDGET_TEXTBOX_Y], ax mov ax, [.width] mov [edi+XWIDGET_TEXTBOX_WIDTH], ax mov ax, [.height] mov [edi+XWIDGET_TEXTBOX_HEIGHT], ax mov eax, [.text] mov [edi+XWIDGET_TEXTBOX_TEXT], eax mov [edi+XWIDGET_TEXTBOX_TEXT_POSITION], eax mov eax, [.limit] mov [edi+XWIDGET_TEXTBOX_LIMIT], eax mov word[edi+XWIDGET_TEXTBOX_POSITION_X], 0 mov word[edi+XWIDGET_TEXTBOX_POSITION_Y], 0 ; request a redraw mov eax, [.window] call xwidget_redraw mov eax, [.component] ; return the component ret .error: mov eax, -1 ret align 4 .window dd 0 .text dd 0 .limit dd 0 .component dd 0 .x dw 0 .y dw 0 .width dw 0 .height dw 0 .flags db 0 ; xwidget_insert_char: ; Inserts a character in a string ; In\ ESI = String ; In\ AL = Character ; Out\ Nothing align 4 xwidget_insert_char: mov [.char], al mov [.string], esi mov esi, [.string] call xwidget_strlen mov ecx, eax mov esi, [.string] mov edi, esi inc edi rep movsb xor al, al stosb mov edi, [.string] mov al, [.char] stosb ret align 4 .string dd 0 .char db 0 ; xwidget_delete_char: ; Deletes a character from a string ; In\ ESI = String ; Out\ AL = Deleted character xwidget_delete_char: mov al, [esi] push eax mov [.string], esi call xwidget_strlen mov ecx, eax dec ecx mov esi, [.string] mov edi, esi inc esi rep movsb xor al, al stosb pop eax ret align 4 .string dd 0 ; xwidget_get_focused_textbox: ; Returns the current focused textbox ; In\ EAX = Window handle ; Out\ EAX = Textbox component handle, -1 if none align 4 xwidget_get_focused_textbox: shl eax, 3 add eax, xwidget_windows_data mov edi, [eax+4] ; components array mov [.components], edi add edi, 256*256 mov [.components_end], edi mov esi, [.components] .loop: cmp esi, [.components_end] jge .no cmp byte[esi], XWIDGET_CPNT_TEXTBOX jne .next test byte[esi+XWIDGET_TEXTBOX_FLAGS], XWIDGET_TEXTBOX_FOCUSED jnz .finish .next: add esi, 256 jmp .loop .finish: mov eax, esi ; component handle ret .no: mov eax, -1 ret align 4 .components dd 0 .components_end dd 0 ; xwidget_get_textbox_line: ; Returns a line of text in a textbox ; In\ EBX = Textbox component handle ; In\ EAX = Line number ; Out\ ESI = Pointer to text ; Out\ EAX = Size of line in bytes align 4 xwidget_get_textbox_line: cmp eax, 0 je .zero mov [.line], eax mov [.current_line], 0 mov [.line_size], 0 mov esi, [ebx+XWIDGET_TEXTBOX_TEXT] .find_line_loop: lodsb cmp al, 10 je .newline jmp .find_line_loop .newline: inc [.current_line] mov eax, [.line] cmp eax, [.current_line] je .found_line jmp .find_line_loop .zero: mov esi, [ebx+XWIDGET_TEXTBOX_TEXT] mov [.line_size], 0 .found_line: mov [.return], esi .count_size_loop: lodsb cmp al, 0 je .done cmp al, 10 je .done inc [.line_size] jmp .count_size_loop .done: mov esi, [.return] mov eax, [.line_size] ret align 4 .line dd 0 .current_line dd 0 .line_size dd 0 .return dd 0 ; xwidget_remove_focus: ; Removes focus from all textboxes in a window ; In\ EAX = Window handle ; Out\ Nothing align 4 xwidget_remove_focus: push eax shl eax, 3 add eax, xwidget_windows_data mov edi, [eax+4] ; components array mov [.components], edi add edi, 256*256 mov [.components_end], edi mov esi, [.components] .loop: cmp esi, [.components_end] jge .done cmp byte[esi], XWIDGET_CPNT_TEXTBOX jne .next and byte[esi+XWIDGET_TEXTBOX_FLAGS], not XWIDGET_TEXTBOX_FOCUSED .next: add esi, 256 jmp .loop .done: pop eax call xwidget_redraw ret align 4 .components dd 0 .components_end dd 0 ; xwidget_remove_all_focus: ; Unfocuses all textboxes ; In\ EAX = Window handle ; Out\ Nothing xwidget_remove_all_focus: shl eax, 3 add eax, xwidget_windows_data mov edi, [eax+4] ; components array mov [.components], edi add edi, 256*256 mov [.components_end], edi mov esi, [.components] .loop: cmp esi, [.components_end] jge .finish cmp byte[esi], XWIDGET_CPNT_TEXTBOX jne .next test byte[esi+XWIDGET_TEXTBOX_FLAGS], XWIDGET_TEXTBOX_FOCUSED jnz .unfocus .next: add esi, 256 jmp .loop .unfocus: and byte[esi+XWIDGET_TEXTBOX_FLAGS], not XWIDGET_TEXTBOX_FOCUSED .finish: ret align 4 .components dd 0 .components_end dd 0