text
stringlengths
1
1.05M
; A123246: a(n) = PrimePi(n) + (-1)^(PrimePi(n) + 1) (cf. A000720). ; -1,2,1,1,4,4,3,3,3,3,6,6,5,5,5,5,8,8,7,7,7,7,10,10,10,10,10,10,9,9,12,12,12,12,12,12,11,11,11,11,14,14,13,13,13,13,16,16,16,16,16,16,15,15,15,15,15,15,18,18,17,17,17,17,17,17,20,20,20,20,19,19,22,22,22,22,22,22,21,21,21,21,24,24,24,24,24,24,23,23,23,23,23,23,23,23,26,26,26,26,25,25,28,28,28,28,27,27,30,30,30,30,29,29,29,29,29,29,29,29,29,29,29,29,29,29,32,32,32,32,31,31,31,31,31,31,34,34,33,33,33,33,33,33,33,33,33,33,36,36,35,35,35,35,35,35,38,38,38,38,38,38,37,37,37,37,40,40,40,40,40,40,39,39,39,39,39,39,42,42,41,41,41,41,41,41,41,41,41,41,44,44,43,43,43,43,46,46,45,45,45,45,45,45,45,45,45,45,45,45,48,48,48,48,48,48,48,48,48,48,48,48,47,47,47,47,50,50,49,49,49,49,52,52,52,52,52,52,51,51,54,54,54,54,54,54,54,54,54,54 add $0,1 cal $0,230980 ; Number of primes <= n, starting at n=0. add $2,$0 mov $0,1 cal $0,44712 ; Numbers n such that string 8,8 occurs in the base 9 representation of n but not of n+1. lpb $0,1 sub $0,$2 cal $0,115634 ; Expansion of (1-4x^2)/(1-x^2). sub $2,$0 sub $2,1 mov $1,$2 lpb $0,1 mod $0,2 sub $1,1 lpe lpe
; A307295: If n is even, a(n) = A001950(n/2+1), otherwise a(n) = A001950((n-1)/2+1) + 1. ; 2,3,5,6,7,8,10,11,13,14,15,16,18,19,20,21,23,24,26,27,28,29,31,32,34,35,36,37,39,40,41,42,44,45,47,48,49,50,52,53,54,55,57,58,60,61,62,63,65,66,68,69,70,71,73,74,75,76,78,79,81,82,83,84,86,87,89,90,91,92,94,95,96,97,99,100,102,103,104,105 mov $2,$0 div $0,2 mov $1,$0 add $0,1 div $0,7 sub $0,1 mul $1,2 sub $1,$0 div $1,3 add $1,2 add $1,$2
// Copyright (c) 2013-2014 The Bitcoin developers // Copyright (c) 2017 The PIVX developers // Copyright (c) 2019 The Black Bear Coin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "hash.h" #include "crypto/hmac_sha512.h" #include "crypto/scrypt.h" inline uint32_t ROTL32(uint32_t x, int8_t r) { return (x << r) | (x >> (32 - r)); } unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash) { // The following is MurmurHash3 (x86_32), see http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp uint32_t h1 = nHashSeed; if (vDataToHash.size() > 0) { const uint32_t c1 = 0xcc9e2d51; const uint32_t c2 = 0x1b873593; const int nblocks = vDataToHash.size() / 4; //---------- // body const uint32_t* blocks = (const uint32_t*)(&vDataToHash[0] + nblocks * 4); for (int i = -nblocks; i; i++) { uint32_t k1 = blocks[i]; k1 *= c1; k1 = ROTL32(k1, 15); k1 *= c2; h1 ^= k1; h1 = ROTL32(h1, 13); h1 = h1 * 5 + 0xe6546b64; } //---------- // tail const uint8_t* tail = (const uint8_t*)(&vDataToHash[0] + nblocks * 4); uint32_t k1 = 0; switch (vDataToHash.size() & 3) { case 3: k1 ^= tail[2] << 16; case 2: k1 ^= tail[1] << 8; case 1: k1 ^= tail[0]; k1 *= c1; k1 = ROTL32(k1, 15); k1 *= c2; h1 ^= k1; }; } //---------- // finalization h1 ^= vDataToHash.size(); h1 ^= h1 >> 16; h1 *= 0x85ebca6b; h1 ^= h1 >> 13; h1 *= 0xc2b2ae35; h1 ^= h1 >> 16; return h1; } void BIP32Hash(const ChainCode chainCode, unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64]) { unsigned char num[4]; num[0] = (nChild >> 24) & 0xFF; num[1] = (nChild >> 16) & 0xFF; num[2] = (nChild >> 8) & 0xFF; num[3] = (nChild >> 0) & 0xFF; CHMAC_SHA512(chainCode.begin(), chainCode.size()).Write(&header, 1).Write(data, 32).Write(num, 4).Finalize(output); } void scrypt_hash(const char* pass, unsigned int pLen, const char* salt, unsigned int sLen, char* output, unsigned int N, unsigned int r, unsigned int p, unsigned int dkLen) { scrypt(pass, pLen, salt, sLen, output, N, r, p, dkLen); }
/* * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/built_ins/sip.h" #include "shared/source/command_stream/preemption.h" #include "shared/source/device/device.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/memory_manager/graphics_allocation.h" #include "opencl/source/command_queue/gpgpu_walker.h" namespace NEO { template <typename GfxFamily> void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr) { using GPGPU_CSR_BASE_ADDRESS = typename GfxFamily::GPGPU_CSR_BASE_ADDRESS; bool isMidThreadPreemption = device.getPreemptionMode() == PreemptionMode::MidThread; if (isMidThreadPreemption) { UNRECOVERABLE_IF(nullptr == preemptionCsr); auto csr = reinterpret_cast<GPGPU_CSR_BASE_ADDRESS *>(preambleCmdStream.getSpace(sizeof(GPGPU_CSR_BASE_ADDRESS))); GPGPU_CSR_BASE_ADDRESS cmd = GfxFamily::cmdInitGpgpuCsrBaseAddress; cmd.setGpgpuCsrBaseAddress(preemptionCsr->getGpuAddressToPatch()); *csr = cmd; } } template <typename GfxFamily> void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device) { using STATE_SIP = typename GfxFamily::STATE_SIP; bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive(); bool isMidThreadPreemption = device.getPreemptionMode() == PreemptionMode::MidThread; if (isMidThreadPreemption || debuggingEnabled) { auto sipAllocation = SipKernel::getSipKernel(device).getSipAllocation(); auto sip = reinterpret_cast<STATE_SIP *>(preambleCmdStream.getSpace(sizeof(STATE_SIP))); STATE_SIP cmd = GfxFamily::cmdInitStateSip; cmd.setSystemInstructionPointer(sipAllocation->getGpuAddressToPatch()); *sip = cmd; } } template <typename GfxFamily> void PreemptionHelper::programStateSipEndWa(LinearStream &cmdStream, Device &device) {} template <typename GfxFamily> void PreemptionHelper::programCmdStream(LinearStream &cmdStream, PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr) { if (oldPreemptionMode == newPreemptionMode) { return; } uint32_t regVal = 0; if (newPreemptionMode == PreemptionMode::MidThread) { regVal = PreemptionConfig<GfxFamily>::midThreadVal | PreemptionConfig<GfxFamily>::mask; } else if (newPreemptionMode == PreemptionMode::ThreadGroup) { regVal = PreemptionConfig<GfxFamily>::threadGroupVal | PreemptionConfig<GfxFamily>::mask; } else { regVal = PreemptionConfig<GfxFamily>::cmdLevelVal | PreemptionConfig<GfxFamily>::mask; } LriHelper<GfxFamily>::program(&cmdStream, PreemptionConfig<GfxFamily>::mmioAddress, regVal, true); } template <typename GfxFamily> size_t PreemptionHelper::getRequiredCmdStreamSize(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode) { if (newPreemptionMode == oldPreemptionMode) { return 0; } return sizeof(typename GfxFamily::MI_LOAD_REGISTER_IMM); } template <typename GfxFamily> size_t PreemptionHelper::getRequiredPreambleSize(const Device &device) { if (device.getPreemptionMode() == PreemptionMode::MidThread) { return sizeof(typename GfxFamily::GPGPU_CSR_BASE_ADDRESS); } return 0; } template <typename GfxFamily> size_t PreemptionHelper::getRequiredStateSipCmdSize(const Device &device) { size_t size = 0; bool isMidThreadPreemption = device.getPreemptionMode() == PreemptionMode::MidThread; bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive(); if (isMidThreadPreemption || debuggingEnabled) { size += sizeof(typename GfxFamily::STATE_SIP); } return size; } template <typename GfxFamily> size_t PreemptionHelper::getPreemptionWaCsSize(const Device &device) { return 0u; } template <typename GfxFamily> void PreemptionHelper::applyPreemptionWaCmdsBegin(LinearStream *pCommandStream, const Device &device) { } template <typename GfxFamily> void PreemptionHelper::applyPreemptionWaCmdsEnd(LinearStream *pCommandStream, const Device &device) { } template <typename GfxFamily> void PreemptionHelper::programInterfaceDescriptorDataPreemption(INTERFACE_DESCRIPTOR_DATA<GfxFamily> *idd, PreemptionMode preemptionMode) { using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA; if (preemptionMode == PreemptionMode::MidThread) { idd->setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_DISABLE); } else { idd->setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_ENABLE); } } template <typename GfxFamily> constexpr uint32_t PreemptionConfig<GfxFamily>::mmioAddress = 0x2580; template <typename GfxFamily> constexpr uint32_t PreemptionConfig<GfxFamily>::mask = ((1 << 1) | (1 << 2)) << 16; template <typename GfxFamily> constexpr uint32_t PreemptionConfig<GfxFamily>::threadGroupVal = (1 << 1); template <typename GfxFamily> constexpr uint32_t PreemptionConfig<GfxFamily>::cmdLevelVal = (1 << 2); template <typename GfxFamily> constexpr uint32_t PreemptionConfig<GfxFamily>::midThreadVal = 0; } // namespace NEO
ori $ra,$ra,0xf lb $4,12($0) mfhi $2 lui $1,48934 lb $4,7($0) divu $4,$ra divu $3,$ra div $5,$ra mult $3,$0 mthi $6 mflo $4 multu $1,$4 mfhi $4 divu $2,$ra mtlo $6 mflo $6 mfhi $5 sb $0,13($0) lui $4,10114 mthi $2 mfhi $5 mfhi $5 mult $6,$2 mtlo $6 divu $4,$ra mult $1,$4 sll $4,$5,27 divu $4,$ra addu $1,$1,$5 divu $4,$ra mflo $2 lb $0,8($0) mfhi $6 multu $3,$5 addiu $4,$6,4704 srav $2,$2,$2 mult $6,$2 mflo $4 mult $5,$5 divu $4,$ra multu $2,$5 lui $1,62010 sll $4,$2,9 div $3,$ra addiu $5,$5,12678 divu $1,$ra lb $1,1($0) div $4,$ra mult $5,$5 mult $2,$2 addu $1,$4,$1 mflo $4 mult $6,$6 lb $4,2($0) divu $0,$ra addiu $3,$6,14224 sll $4,$4,0 mult $4,$6 divu $4,$ra addu $4,$0,$4 lb $5,13($0) mtlo $5 lb $5,12($0) mflo $6 sb $5,16($0) mflo $4 mfhi $2 ori $2,$2,49842 multu $2,$2 mthi $4 mtlo $1 mtlo $4 mfhi $1 multu $3,$3 sll $5,$1,31 sb $1,11($0) mthi $5 multu $4,$2 addu $2,$2,$2 sb $1,3($0) sll $4,$4,15 mflo $1 ori $4,$5,56479 lui $4,49145 divu $0,$ra sb $5,4($0) addu $1,$4,$0 mfhi $4 div $1,$ra mflo $4 ori $4,$2,46358 addu $2,$2,$2 divu $6,$ra mflo $4 mfhi $4 div $4,$ra multu $2,$2 addiu $1,$5,4307 mflo $2 div $2,$ra sb $2,0($0) srav $4,$6,$4 lb $5,12($0) mthi $4 multu $6,$0 div $4,$ra lb $6,3($0) mfhi $1 mtlo $1 mthi $3 mult $4,$4 addu $4,$4,$0 mflo $4 mthi $6 lb $5,7($0) srav $6,$5,$6 lb $0,5($0) mult $4,$6 sll $4,$5,7 ori $4,$1,38995 mflo $2 srav $0,$0,$3 mthi $4 sb $5,12($0) mthi $2 ori $0,$5,52008 ori $4,$1,452 div $3,$ra sb $4,7($0) multu $4,$4 addu $1,$3,$3 mflo $3 multu $3,$3 srav $3,$4,$3 mfhi $5 mfhi $4 sll $4,$2,12 multu $5,$5 multu $0,$6 mult $4,$6 addiu $6,$6,8485 sb $0,7($0) mtlo $2 divu $4,$ra mult $4,$4 mtlo $1 lui $5,31969 sll $6,$2,4 mfhi $4 multu $5,$4 srav $0,$4,$5 sll $5,$1,23 mflo $5 sll $1,$6,14 srav $1,$6,$5 addiu $1,$1,-7911 sll $5,$5,21 mtlo $1 srav $4,$1,$1 mult $1,$4 ori $5,$5,26537 sll $1,$5,22 addiu $4,$4,17083 addiu $5,$6,14269 mthi $5 mtlo $5 mult $1,$5 mflo $1 lb $2,16($0) mflo $4 srav $2,$2,$4 mult $5,$1 mflo $3 divu $2,$ra addu $3,$3,$3 srav $0,$4,$3 addiu $4,$1,14952 ori $5,$6,21662 mfhi $6 lui $1,59281 lui $0,47849 ori $4,$4,48571 mfhi $5 divu $5,$ra sb $1,16($0) sll $3,$5,13 sb $4,13($0) multu $0,$0 addu $6,$2,$3 mfhi $0 multu $5,$5 lui $2,18921 addiu $4,$6,24970 mfhi $1 ori $2,$1,23210 mthi $5 mult $4,$0 sb $5,9($0) addu $1,$4,$2 sb $1,5($0) mtlo $4 addiu $4,$5,14380 ori $2,$2,51795 addiu $2,$2,9627 mult $2,$2 addu $0,$6,$5 ori $5,$5,23298 multu $4,$2 mult $1,$2 sll $2,$2,27 multu $5,$1 multu $1,$1 srav $4,$5,$5 sb $2,11($0) ori $4,$1,79 sll $2,$2,31 lui $4,23167 addu $5,$5,$5 multu $6,$4 lui $3,14690 div $0,$ra multu $0,$0 divu $1,$ra mflo $6 lb $3,0($0) sb $1,4($0) mult $2,$6 mfhi $4 sb $3,13($0) mtlo $2 addu $0,$1,$0 multu $4,$1 multu $1,$4 mthi $4 addiu $4,$5,-17156 ori $1,$0,17051 lb $4,16($0) lb $4,5($0) addiu $5,$5,26543 srav $4,$2,$2 mtlo $1 addiu $4,$3,-27621 lui $2,4556 ori $5,$6,17393 mult $5,$5 addiu $6,$6,-17758 sll $2,$1,16 lui $1,5795 mthi $1 mtlo $0 mflo $1 sb $4,14($0) mult $1,$1 multu $2,$4 mtlo $4 mfhi $2 srav $4,$5,$5 sll $1,$1,4 lb $5,8($0) multu $4,$4 srav $0,$1,$0 div $5,$ra mthi $4 lui $0,17824 addiu $5,$1,-13157 mthi $4 mfhi $4 multu $5,$5 mflo $6 mflo $2 srav $4,$1,$4 sb $5,12($0) mthi $3 addiu $2,$6,-29671 srav $0,$0,$4 addiu $1,$5,-17391 mfhi $2 srav $4,$4,$4 multu $2,$2 ori $2,$6,60517 mult $4,$5 lb $0,2($0) lb $4,6($0) multu $0,$5 divu $5,$ra addiu $0,$4,-21655 divu $6,$ra ori $4,$2,18479 sll $3,$0,21 lb $1,9($0) lui $2,55966 sb $5,3($0) addiu $1,$2,-6874 srav $6,$4,$5 sll $4,$5,6 srav $5,$4,$5 sb $6,3($0) addu $4,$4,$2 mflo $4 mfhi $1 addiu $6,$5,-5029 ori $1,$1,54837 multu $5,$5 mult $4,$4 divu $5,$ra srav $5,$5,$5 ori $5,$5,21196 addiu $4,$2,26773 sll $4,$2,22 multu $2,$4 div $3,$ra srav $3,$3,$3 sb $1,9($0) mfhi $5 divu $1,$ra mthi $4 mflo $4 srav $4,$4,$5 sll $0,$2,3 ori $0,$4,12712 ori $3,$1,5395 mfhi $5 mtlo $5 ori $6,$6,65306 sb $4,13($0) addu $4,$2,$6 addu $3,$2,$3 mfhi $1 srav $6,$1,$4 addiu $1,$1,30699 mthi $4 mflo $5 mtlo $4 ori $2,$1,44995 divu $4,$ra mflo $4 mflo $1 lui $0,3106 divu $4,$ra mult $3,$2 mflo $4 ori $1,$1,61233 ori $4,$2,51688 mfhi $5 mult $5,$2 div $5,$ra lui $2,55799 mtlo $6 addiu $6,$5,31796 ori $3,$0,62301 addu $6,$2,$5 addu $1,$4,$3 lb $1,15($0) sb $4,9($0) lb $1,11($0) addu $4,$4,$1 mtlo $4 addu $1,$1,$2 sll $0,$1,22 div $2,$ra lui $4,5138 sb $4,2($0) multu $1,$1 ori $1,$4,470 multu $5,$5 divu $6,$ra lb $3,11($0) sb $4,13($0) mthi $1 srav $5,$4,$1 lb $4,14($0) sll $4,$4,14 mflo $5 srav $4,$4,$3 lb $5,7($0) lui $4,16873 sll $4,$1,3 divu $1,$ra addu $2,$6,$2 mtlo $5 addu $1,$2,$2 multu $5,$2 div $5,$ra lb $6,11($0) mtlo $2 addu $5,$6,$2 multu $4,$2 addiu $4,$2,-5352 addiu $0,$4,-4730 lb $4,9($0) mtlo $5 mult $2,$0 multu $0,$0 ori $4,$4,29966 mtlo $5 lb $4,4($0) mflo $4 mfhi $4 div $5,$ra div $1,$ra sb $4,3($0) addu $5,$1,$5 sll $4,$6,28 mult $3,$1 addu $5,$4,$1 ori $4,$2,36578 addiu $4,$5,8060 div $4,$ra mtlo $6 addu $4,$2,$2 div $5,$ra sll $5,$1,1 mfhi $6 sll $1,$1,11 mtlo $5 mfhi $1 mult $1,$4 sll $1,$1,0 lb $6,13($0) addu $4,$4,$2 sll $0,$0,26 mfhi $6 mflo $5 divu $4,$ra ori $2,$2,3539 mfhi $3 lb $1,12($0) sll $2,$2,25 sb $2,1($0) mthi $5 lui $1,12473 mfhi $1 lb $1,4($0) srav $1,$4,$1 multu $3,$4 divu $6,$ra addiu $0,$6,-4641 mfhi $4 sb $4,3($0) mtlo $1 ori $3,$4,58432 div $4,$ra lui $4,9737 sb $4,3($0) mfhi $3 mthi $4 divu $6,$ra div $1,$ra div $4,$ra divu $1,$ra divu $4,$ra mfhi $5 mflo $3 mthi $1 mthi $1 mthi $1 multu $4,$1 addiu $2,$2,21843 addu $4,$3,$3 srav $1,$2,$3 mthi $6 mflo $5 mfhi $6 multu $3,$5 mtlo $5 div $1,$ra lui $4,37822 addiu $4,$4,20480 div $1,$ra lui $4,23282 addu $5,$4,$5 mtlo $1 lui $1,56813 srav $0,$0,$0 lb $4,4($0) srav $1,$5,$5 srav $6,$1,$1 lb $4,13($0) addiu $5,$5,11494 divu $1,$ra divu $0,$ra lb $3,9($0) mthi $6 mtlo $1 ori $4,$3,56572 sll $1,$1,0 srav $5,$5,$3 mult $4,$4 lui $5,11770 mthi $5 divu $0,$ra sb $0,11($0) div $5,$ra mfhi $5 sb $2,10($0) div $1,$ra lb $4,6($0) ori $2,$2,12547 addu $2,$2,$1 div $4,$ra mthi $4 mult $1,$1 sll $4,$5,20 mfhi $1 ori $0,$0,41974 mfhi $3 sb $4,6($0) lb $1,15($0) sb $1,5($0) addiu $2,$0,23633 ori $5,$5,28490 multu $4,$1 sll $5,$5,5 lb $6,2($0) mthi $2 div $5,$ra mfhi $1 mthi $4 ori $3,$4,55345 multu $0,$3 mthi $4 mult $1,$4 multu $4,$4 mtlo $5 lui $2,11755 mflo $3 addu $4,$5,$4 mflo $2 divu $2,$ra lb $3,15($0) sll $5,$5,10 mflo $2 mthi $4 div $6,$ra multu $0,$0 ori $6,$5,11139 lui $4,4684 lb $5,11($0) srav $4,$4,$3 lb $5,10($0) mflo $6 multu $6,$6 lb $4,8($0) sll $4,$1,22 divu $4,$ra lb $5,3($0) mthi $0 mult $1,$2 ori $5,$5,25978 addu $4,$2,$2 sb $5,8($0) ori $0,$0,26892 multu $4,$1 srav $4,$4,$0 sll $5,$3,26 lb $6,11($0) mflo $1 sb $4,8($0) mfhi $3 divu $5,$ra addu $1,$5,$4 mflo $4 divu $4,$ra lb $4,6($0) addiu $1,$4,-18459 divu $6,$ra lb $4,13($0) div $6,$ra sll $3,$0,25 mtlo $4 lui $4,8336 addiu $1,$1,-13043 lb $0,16($0) mtlo $1 ori $1,$2,4987 div $1,$ra multu $5,$0 lui $4,48538 multu $4,$4 addu $5,$6,$5 mthi $4 ori $4,$5,20666 multu $4,$4 srav $1,$1,$3 srav $1,$2,$5 mtlo $2 sb $6,15($0) multu $2,$2 addiu $5,$5,7967 mthi $1 mult $0,$4 srav $1,$1,$1 mthi $1 sll $4,$4,22 addiu $5,$5,-4012 divu $1,$ra sll $2,$2,27 ori $6,$5,40411 sb $0,16($0) mfhi $3 addiu $4,$5,-3911 sll $5,$5,13 addiu $6,$4,15556 div $6,$ra srav $5,$4,$2 mult $0,$0 mflo $6 mfhi $4 srav $5,$5,$0 srav $0,$5,$0 sll $4,$2,31 mfhi $4 mthi $3 ori $4,$2,16078 sll $5,$5,2 lb $4,3($0) mflo $5 sll $5,$2,24 mflo $4 mthi $5 ori $1,$1,22758 divu $0,$ra addiu $4,$4,2765 multu $5,$1 divu $4,$ra mthi $1 addu $4,$4,$4 multu $5,$2 sb $1,2($0) srav $5,$5,$5 sb $5,2($0) sll $5,$4,4 ori $4,$4,53794 mfhi $2 srav $4,$1,$0 addiu $2,$2,-21568 addiu $3,$4,22540 sll $5,$5,25 div $1,$ra addu $1,$1,$1 lui $0,31465 mfhi $2 mthi $4 mthi $4 lb $3,5($0) mfhi $2 addu $3,$1,$3 sb $5,10($0) divu $0,$ra addu $1,$2,$1 sb $2,2($0) ori $1,$6,61467 mfhi $3 mtlo $4 mult $5,$2 div $6,$ra addu $0,$1,$1 addiu $1,$1,-27470 divu $1,$ra mult $5,$2 mflo $4 divu $3,$ra mthi $5 mthi $5 divu $2,$ra mtlo $2 mult $0,$4 divu $4,$ra mtlo $6 multu $5,$0 mult $5,$0 mult $1,$2 mtlo $4 mthi $4 mtlo $5 lui $5,11034 ori $4,$4,45096 mfhi $5 multu $4,$1 addu $5,$4,$5 mult $1,$4 ori $3,$4,11237 addu $6,$6,$3 mtlo $4 mfhi $5 ori $4,$2,14320 addiu $4,$4,-9335 ori $4,$6,54022 mtlo $2 div $5,$ra mflo $1 mtlo $5 div $4,$ra addiu $1,$0,1127 mtlo $0 sll $2,$2,23 addiu $5,$3,-20623 mflo $4 sll $4,$4,26 srav $1,$2,$3 sll $4,$4,29 addu $4,$4,$1 sll $2,$6,26 sb $2,4($0) sll $5,$1,27 multu $3,$5 ori $4,$2,21742 addiu $6,$1,-27785 multu $4,$5 lui $1,4384 sll $3,$3,31 sll $5,$2,9 mfhi $2 sll $6,$3,18 divu $4,$ra lb $3,11($0) lb $4,9($0) mthi $5 multu $4,$4 sb $1,11($0) lb $1,16($0) mthi $2 mtlo $5 lb $4,13($0) mflo $6 mult $4,$4 addu $2,$2,$2 srav $5,$5,$2 lui $0,26523 ori $1,$2,62685 mthi $1 srav $3,$3,$3 srav $5,$2,$5 srav $3,$5,$3 sll $2,$2,7 multu $3,$0 multu $6,$5 addu $1,$4,$1 multu $5,$4 sb $1,6($0) lb $4,9($0) lb $0,10($0) ori $0,$4,12049 srav $6,$4,$4 divu $2,$ra multu $2,$5 srav $1,$2,$2 addiu $1,$1,-8106 ori $6,$6,37012 mult $6,$6 mthi $2 lb $4,3($0) mthi $6 ori $5,$2,14550 multu $3,$3 mflo $5 lb $4,4($0) sll $1,$5,4 addu $4,$5,$4 mtlo $3 sll $0,$5,22 ori $5,$4,18596 mfhi $4 ori $5,$4,15796 sll $0,$2,0 lui $5,50429 sll $1,$4,11 mflo $4 lb $6,16($0) divu $5,$ra mfhi $6 lb $5,11($0) lb $2,12($0) srav $1,$2,$4 srav $4,$1,$3 ori $2,$1,20839 addu $4,$4,$5 addu $4,$1,$4 mfhi $3 mtlo $4 mult $2,$2 multu $1,$4 mtlo $1 lui $6,11942 mflo $1 lb $5,15($0) srav $1,$1,$1 ori $4,$5,46762 sll $0,$5,22 divu $6,$ra mflo $4 addiu $0,$2,17181 multu $2,$6 mfhi $1 addu $5,$5,$1 srav $3,$3,$3 lui $4,35448 mult $3,$4 mthi $2 mflo $5 div $1,$ra ori $0,$5,51842 sb $6,5($0) mtlo $6 divu $4,$ra mfhi $2 mfhi $1 addu $0,$5,$3 mflo $0 mult $5,$4 mfhi $4 sll $2,$2,9 mult $4,$4 mfhi $5 mflo $5 mfhi $1 multu $4,$4 sb $4,16($0) mfhi $3 lui $2,13799 addu $2,$5,$2 div $1,$ra sll $0,$2,4 mtlo $1 sb $1,7($0) addiu $6,$4,15101 addiu $6,$4,-7299 addu $2,$2,$2 mfhi $0 addiu $5,$2,-11024 mtlo $1 mthi $4 sb $4,9($0) mtlo $5 lui $0,13555 mult $6,$6 lui $1,48651 multu $5,$5 sb $1,14($0) addiu $1,$1,24660 mthi $6 div $1,$ra ori $0,$6,41207 mult $6,$1 mthi $5 addu $6,$2,$3 sll $6,$2,3 addiu $4,$4,26091 divu $4,$ra ori $5,$3,10680 mflo $2 sll $4,$1,3 mfhi $5 lb $4,11($0) lui $2,41326 sll $6,$6,15 mthi $2 addu $4,$4,$4 ori $5,$4,20599 mfhi $4 addu $5,$6,$2 mthi $4 lui $2,13094 addu $3,$2,$3 srav $1,$2,$2 mtlo $6 divu $1,$ra sb $5,7($0) mthi $2 mflo $4 srav $6,$1,$1 sll $6,$6,16 addu $5,$2,$2 multu $4,$1 multu $4,$4 lb $1,15($0) lb $0,14($0) addu $1,$5,$5 srav $4,$1,$3 lb $4,7($0) lb $5,3($0) mthi $5 mflo $6 mtlo $4 mthi $1 mflo $4 mult $0,$5 lui $0,21006 addu $4,$4,$4
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r13 push %r15 push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0xebba, %r10 add $32800, %rsi movups (%r10), %xmm5 vpextrq $1, %xmm5, %rcx cmp %r15, %r15 lea addresses_normal_ht+0x11bba, %rbp and $53407, %r12 mov $0x6162636465666768, %r15 movq %r15, %xmm6 movups %xmm6, (%rbp) nop nop nop dec %rcx lea addresses_normal_ht+0xe4cf, %r12 nop nop nop nop dec %r13 mov (%r12), %r15w nop nop nop nop nop dec %r15 lea addresses_WT_ht+0x1d8f8, %rsi lea addresses_UC_ht+0xcdfa, %rdi nop nop nop nop nop and %r15, %r15 mov $61, %rcx rep movsb nop nop nop inc %rbp lea addresses_UC_ht+0x1537a, %r12 nop nop nop add %r13, %r13 mov $0x6162636465666768, %rsi movq %rsi, %xmm0 and $0xffffffffffffffc0, %r12 movntdq %xmm0, (%r12) nop nop nop nop sub $23112, %rbp lea addresses_normal_ht+0x8dba, %rcx nop nop nop add $52539, %r10 movl $0x61626364, (%rcx) add $41436, %rcx lea addresses_D_ht+0x112c2, %r15 nop nop nop sub $11128, %rcx mov (%r15), %si xor %r12, %r12 lea addresses_UC_ht+0x1b3ba, %r13 nop sub %rsi, %rsi mov (%r13), %r10d nop cmp %r15, %r15 lea addresses_D_ht+0x143ba, %rsi nop nop nop nop sub $5101, %rdi mov (%rsi), %r13 nop cmp %rsi, %rsi lea addresses_UC_ht+0x9372, %rsi cmp %rdi, %rdi mov (%rsi), %r12d nop nop nop nop nop xor $56467, %r15 lea addresses_WC_ht+0xf9ba, %rsi lea addresses_WT_ht+0x1cdba, %rdi nop nop nop cmp $47677, %r15 mov $0, %rcx rep movsl nop sub %r12, %r12 lea addresses_UC_ht+0x103ba, %rsi lea addresses_UC_ht+0x95ba, %rdi nop nop nop cmp %r10, %r10 mov $84, %rcx rep movsq inc %rsi lea addresses_normal_ht+0xb21a, %rsi lea addresses_WC_ht+0x3bba, %rdi nop add %rbp, %rbp mov $39, %rcx rep movsl nop nop sub $19562, %rbp lea addresses_WC_ht+0x9fba, %rsi lea addresses_WC_ht+0x21ba, %rdi nop nop nop nop nop add %r10, %r10 mov $75, %rcx rep movsq nop nop nop nop nop xor %r13, %r13 lea addresses_WC_ht+0x1c67a, %r12 nop nop nop nop sub %rbp, %rbp and $0xffffffffffffffc0, %r12 vmovntdqa (%r12), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $1, %xmm7, %r10 nop nop nop nop nop dec %r13 pop %rsi pop %rdi pop %rcx pop %rbp pop %r15 pop %r13 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %rax push %rbp push %rcx push %rdi push %rsi // REPMOV lea addresses_D+0x1517a, %rsi lea addresses_WT+0x1cbba, %rdi dec %r11 mov $15, %rcx rep movsl nop nop nop nop nop add %rdi, %rdi // Faulty Load lea addresses_WT+0x1cbba, %rbp clflush (%rbp) nop nop nop add $31424, %r12 mov (%rbp), %si lea oracles, %rcx and $0xff, %rsi shlq $12, %rsi mov (%rcx,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT', 'congruent': 0}} {'dst': {'same': True, 'congruent': 0, 'type': 'addresses_WT'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_D'}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WT', 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC_ht', 'congruent': 10}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal_ht', 'congruent': 10}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal_ht', 'congruent': 0}} {'dst': {'same': True, 'congruent': 4, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_WT_ht'}} {'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 4}, 'OP': 'STOR'} {'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal_ht', 'congruent': 9}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_D_ht', 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 11}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_D_ht', 'congruent': 11}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 3}} {'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WC_ht'}} {'dst': {'same': False, 'congruent': 9, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_UC_ht'}} {'dst': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 2, 'type': 'addresses_normal_ht'}} {'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_WC_ht', 'congruent': 3}} {'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 */
segment .text align 4 f: push ebp mov ebp, esp sub esp, 4 push dword 10 lea eax, [ebp+-4] push eax pop ecx pop eax mov [ecx], eax lea eax, [ebp+8] push eax pop eax push dword [eax] call g add esp, 4 push eax add esp, 4 lea eax, [ebp+-4] push eax pop eax push dword [eax] pop eax leave ret align 4 global g:function g: push ebp mov ebp, esp sub esp, 4 push dword 14 lea eax, [ebp+-4] push eax pop ecx pop eax mov [ecx], eax lea eax, [ebp+8] push eax pop eax push dword [eax] call prints add esp, 4 lea eax, [ebp+-4] push eax pop eax push dword [eax] pop eax leave ret align 4 global _main:function _main: align 4 xpl: push ebp mov ebp, esp sub esp, 4 push dword 0 lea eax, [ebp+-4] push eax pop ecx pop eax mov [ecx], eax segment .rodata align 4 _L1: db "ola", 0 segment .text push dword $_L1 call f add esp, 4 push eax call printi add esp, 4 lea eax, [ebp+-4] push eax pop eax push dword [eax] pop eax leave ret extern argc extern argv extern envp extern readi extern readd extern printi extern prints extern printd extern println
; A262334: Number of (n+3)X(2+3) 0..1 arrays with each row and column divisible by 9, read as a binary number with top and left being the most significant bits. ; 4,16,64,225,841,3249,12996,51984,207936,829921,3316041,13256881,53027524,212110096,848440384,3393645025,13574347081,54296922289,217187689156,868750756624,3475003026496,13900004649441,55600003684681,222399984912561,889599939650244,3558399758600976,14233599034403904,56934395660397025,227737581687150921,910950324839729329,3643801299358917316,14575205197435669264,58300820789742677056,233203283128428718561,932813132452630894921,3731252529688355621041,14925010118753422484164,59700040475013689936656 add $0,4 mov $1,2 pow $1,$0 div $1,9 add $1,1 pow $1,2 mov $0,$1
; A231678: a(n) = Sum_{i=0..n} digsum_7(i)^3, where digsum_7(i) = A053828(i). ; 0,1,9,36,100,225,441,442,450,477,541,666,882,1225,1233,1260,1324,1449,1665,2008,2520,2547,2611,2736,2952,3295,3807,4536,4600,4725,4941,5284,5796,6525,7525,7650,7866,8209,8721,9450,10450,11781,11997,12340,12852,13581,14581,15912,17640,17641,17649,17676,17740,17865,18081,18424,18432,18459,18523,18648,18864,19207 mov $2,$0 mov $3,$0 lpb $2 mov $0,$3 sub $2,1 sub $0,$2 seq $0,53828 ; Sum of digits of (n written in base 7). pow $0,3 add $1,$0 lpe mov $0,$1
#include <stdint.h> #include "../test_util.h" struct foo { uint64_t a, b, c, d; }; OPTNONE int main(void) { void *p = new char; struct foo *c = (struct foo *)p; delete c; return 0; }
SFX_Cry1C_2_Ch1: dutycycle 245 unknownsfx0x20 7, 214, 225, 7 unknownsfx0x20 6, 198, 226, 7 unknownsfx0x20 9, 214, 225, 7 unknownsfx0x20 7, 198, 224, 7 unknownsfx0x20 5, 182, 226, 7 unknownsfx0x20 7, 198, 225, 7 unknownsfx0x20 6, 182, 224, 7 unknownsfx0x20 8, 161, 223, 7 endchannel SFX_Cry1C_2_Ch2: dutycycle 68 unknownsfx0x20 6, 195, 201, 7 unknownsfx0x20 6, 179, 199, 7 unknownsfx0x20 10, 196, 195, 7 unknownsfx0x20 8, 180, 199, 7 unknownsfx0x20 6, 195, 201, 7 unknownsfx0x20 15, 162, 197, 7 endchannel SFX_Cry1C_2_Ch3: unknownnoise0x20 13, 25, 124 unknownnoise0x20 13, 247, 140 unknownnoise0x20 12, 214, 124 unknownnoise0x20 8, 196, 108 unknownnoise0x20 15, 179, 92 endchannel
#include "pch.h" #include "Include/ComUtility/ComFactory.h" #include "ComApartment.h" #include <wrl.h> using Microsoft::WRL::ComPtr; struct ComFactory::impl { ComApartment m_apartment; }; ComFactory::ComFactory() : m_impl{std::make_unique<impl>()} { } ComFactory::~ComFactory() { } HRESULT ComFactory::CreateInstance(const IID& rclsid, IUnknown* pUnkOuter, const IID& riid, void** ppv) { // This stream will contain the marshaled interface to the created object ComPtr<IStream> stream = nullptr; // Delegate construction to the apartment, to create the object on a separate thread const auto result = m_impl->m_apartment.Invoke([rclsid, pUnkOuter, &stream]() { ComPtr<IUnknown> punk; const auto result = CoCreateInstance( rclsid, pUnkOuter, CLSCTX_INPROC_SERVER, IID_IUnknown, reinterpret_cast<void**>(punk.GetAddressOf())); if (result != S_OK) return result; // Marshal interface to the stream. This allows unmarshaling the interface // in a different thread return CoMarshalInterThreadInterfaceInStream(IID_IUnknown, punk.Get(), stream.GetAddressOf()); }).get(); if (result != S_OK) return result; // Get the interface marshaled onto the calling thread return CoGetInterfaceAndReleaseStream(stream.Detach(), riid, ppv); }
;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 3.5.0 #9253 (Jun 20 2015) (Linux) ; This file was generated Tue Oct 31 17:12:24 2017 ;-------------------------------------------------------- .module main .optsdcc -mz80 ;-------------------------------------------------------- ; Public variables in this module ;-------------------------------------------------------- .globl _main .globl _init_system .globl _isr_vector38 .globl _isr_vector66 .globl _uart_interrupt_isr .globl _isprint .globl _flag .globl _cont .globl ___ret_aux .globl _address_low .globl _address_hight .globl _data .globl _write_byte_EEPROM_ptr .globl _delay_1ms_ptr .globl _size .globl _dir_destination .globl _dir_origin .globl _delay_1ms .globl _delay_ms .globl _delay_10us .globl _delay_100us .globl _copeaBloque .globl _uart_init .globl _uart_write .globl _uart_write_buffer .globl _uart_read .globl _uart_read_buffer .globl _uart_available .globl _uart_flush .globl _uart_print .globl _uart_read_line .globl _printBuffer .globl _eeprom_write .globl _eeprom_erase .globl _eeprom_write_buffer .globl _eeprom_read .globl _eeprom_read_buffer .globl _write_byte .globl _packet_fill .globl _packet_check .globl _packet_read .globl _packet_send .globl _bootloader_init .globl _bootloader_check_program_commnad .globl _bootloader_run .globl _bootloader_start_app .globl _io_write .globl _io_read .globl _io_write_buffer .globl _io_read_buffer .globl _ppi_init .globl _ppi_set_portc_bit .globl _ppi_clear_portc_bit .globl _test_program_command ;-------------------------------------------------------- ; special function registers ;-------------------------------------------------------- _URRBR = 0x0011 _URTHR = 0x0011 _URCONTROL = 0x0010 _PPI_PORTA = 0x0000 _PPI_PORTB = 0x0001 _PPI_PORTC = 0x0002 _PPI_CTRL = 0x0003 ;-------------------------------------------------------- ; ram data ;-------------------------------------------------------- .area _DATA _dir_origin:: .ds 2 _dir_destination:: .ds 2 _size:: .ds 2 _delay_1ms_ptr:: .ds 2 __uart_in_buffer: .ds 1024 __in_buffer_index: .ds 2 __out_buffer_index: .ds 2 __is_interrupt_enable: .ds 1 _eeprom_ptr: .ds 2 _write_byte_EEPROM_ptr:: .ds 2 _data:: .ds 1 _address_hight:: .ds 1 _address_low:: .ds 1 _aux_address_l: .ds 1 _aux_address_h: .ds 1 _old_app_int_isr_addr: .ds 2 _old_app_int_isr_addr_l: .ds 1 _old_app_int_isr_addr_h: .ds 1 _old_app_nmi_isr_addr: .ds 2 _old_app_nmi_isr_addr_l: .ds 1 _old_app_nmi_isr_addr_h: .ds 1 _pkg_in: .ds 260 _pkg_out: .ds 260 ___ret_aux:: .ds 1 _cont:: .ds 2 _flag:: .ds 2 ;-------------------------------------------------------- ; ram data ;-------------------------------------------------------- .area _INITIALIZED _ptr_int_isr: .ds 2 _ptr_int_isr_l: .ds 2 _ptr_int_isr_h: .ds 2 _ptr_nmi_isr: .ds 2 _ptr_nmi_isr_l: .ds 2 _ptr_nmi_isr_h: .ds 2 _app_main_addr: .ds 2 ;-------------------------------------------------------- ; absolute external ram data ;-------------------------------------------------------- .area _DABS (ABS) ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- .area _HOME .area _GSINIT .area _GSFINAL .area _GSINIT ;-------------------------------------------------------- ; Home ;-------------------------------------------------------- .area _HOME .area _HOME ;-------------------------------------------------------- ; code ;-------------------------------------------------------- .area _CODE ;./include/z80utils.h:86: void delay_1ms(){ ; --------------------------------- ; Function delay_1ms ; --------------------------------- _delay_1ms:: ;./include/z80utils.h:93: __endasm; EXX EX AF,AF' ;./include/z80utils.h:96: for(j=0;j<0x04;j++) ld hl,#0x0000 00106$: ;./include/z80utils.h:97: for(i=0;i<0x4FF;i++) ld de,#0x04FF 00105$: ;./include/z80utils.h:98: __asm__("nop"); nop ld c,e ld b,d dec bc ld e, c ;./include/z80utils.h:97: for(i=0;i<0x4FF;i++) ld a,b ld d,a or a,c jr NZ,00105$ ;./include/z80utils.h:96: for(j=0;j<0x04;j++) inc hl ld a,l sub a, #0x04 ld a,h rla ccf rra sbc a, #0x80 jr C,00106$ ;./include/z80utils.h:112: __endasm; EX AF,AF' EXX ret ;./include/z80utils.h:115: void delay_ms(int ms){ ; --------------------------------- ; Function delay_ms ; --------------------------------- _delay_ms:: push ix ld ix,#0 add ix,sp ;./include/z80utils.h:121: __endasm; EXX EX AF,AF' ;./include/z80utils.h:125: while(ms--) ld c,4 (ix) ld b,5 (ix) 00102$: ld e, c ld d, b dec bc ld a,d or a,e jr Z,00104$ ;./include/z80utils.h:126: for(i=0;i<0x10A;i++) ld hl,#0x010A 00107$: ;./include/z80utils.h:127: __asm__("nop"); nop ex de,hl dec de ld l, e ;./include/z80utils.h:126: for(i=0;i<0x10A;i++) ld a,d ld h,a or a,e jr NZ,00107$ jr 00102$ 00104$: ;./include/z80utils.h:141: __endasm; EX AF,AF' EXX pop ix ret ;./include/z80utils.h:144: void delay_10us(){ ; --------------------------------- ; Function delay_10us ; --------------------------------- _delay_10us:: ;./include/z80utils.h:156: __endasm; EXX EX AF,AF' LD B,#0x2 LOOP_10: DJNZ LOOP_10 EX AF,AF' EXX ret ;./include/z80utils.h:168: void delay_100us(){ ; --------------------------------- ; Function delay_100us ; --------------------------------- _delay_100us:: ;./include/z80utils.h:181: __endasm; EXX EX AF,AF' LD B,#0x3A LOOP_100: DJNZ LOOP_100 EX AF,AF' EXX RET ret ;./include/z80utils.h:192: void copeaBloque(uint16_t origen,uint16_t destino, uint8_t tam) ; --------------------------------- ; Function copeaBloque ; --------------------------------- _copeaBloque:: ;./include/z80utils.h:194: dir_origin = origen; ld iy,#2 add iy,sp ld a,0 (iy) ld iy,#_dir_origin ld 0 (iy),a ld iy,#2 add iy,sp ld a,1 (iy) ld iy,#_dir_origin ld 1 (iy),a ;./include/z80utils.h:195: dir_destination=destino; ld iy,#4 add iy,sp ld a,0 (iy) ld iy,#_dir_destination ld 0 (iy),a ld iy,#4 add iy,sp ld a,1 (iy) ld iy,#_dir_destination ld 1 (iy),a ;./include/z80utils.h:196: size = tam; ld iy,#6 add iy,sp ld a,0 (iy) ld iy,#_size ld 0 (iy),a ld iy,#_size ld 1 (iy),#0x00 ;./include/z80utils.h:202: __endasm; LD HL,(_dir_origin) LD DE,(_dir_destination) LD BC,(_size) LDIR ret ;./include/z80uart.h:218: void uart_init(const uart_cfg_t *uart_config) { ; --------------------------------- ; Function uart_init ; --------------------------------- _uart_init:: push ix ld ix,#0 add ix,sp ;./include/z80uart.h:219: URCONTROL = (uart_config->divisor) | (uart_config->configuracionDePalabra) | (uart_config->interrupcionesDelTransmisor)| (uart_config->interrupcionesDelReceptor); ld e,4 (ix) ld d,5 (ix) ld a,(de) ld b,e ld h,d ld l, b inc hl ld l,(hl) or a, l ld c,e ld h,d ld l, c inc hl inc hl ld h,(hl) or a, h ld h,d ld l, e inc hl inc hl inc hl ld d,(hl) or a, d out (_URCONTROL),a pop ix ret ;./include/z80uart.h:222: void uart_write(uint8_t c){ ; --------------------------------- ; Function uart_write ; --------------------------------- _uart_write:: ;./include/z80uart.h:224: while( !(URCONTROL & BV(UTDRE))) 00101$: in a,(_URCONTROL) and a, #0x02 jr NZ,00103$ ;./include/z80uart.h:225: NOP(); NOP jr 00101$ 00103$: ;./include/z80uart.h:227: URTHR = (char)c; ld hl, #2+0 add hl, sp ld a, (hl) out (_URTHR),a ret ;./include/z80uart.h:230: void uart_write_buffer(uint8_t* buffer, int count){ ; --------------------------------- ; Function uart_write_buffer ; --------------------------------- _uart_write_buffer:: ;./include/z80uart.h:232: for (i = 0; i < count; i++) ld de,#0x0000 00103$: ld hl,#4 add hl,sp ld a,e sub a, (hl) ld a,d inc hl sbc a, (hl) jp PO, 00116$ xor a, #0x80 00116$: ret P ;./include/z80uart.h:233: uart_write(buffer[i]); ld hl, #2 add hl, sp ld a, (hl) inc hl ld h, (hl) ld l, a add hl,de ld h,(hl) push de push hl inc sp call _uart_write inc sp pop de ;./include/z80uart.h:232: for (i = 0; i < count; i++) inc de jr 00103$ ;./include/z80uart.h:236: uint8_t uart_read(){ ; --------------------------------- ; Function uart_read ; --------------------------------- _uart_read:: ;./include/z80uart.h:241: while(uart_available()<=0) 00101$: call _uart_available xor a, a cp a, l sbc a, h jp PO, 00120$ xor a, #0x80 00120$: jp P,00101$ ;./include/z80uart.h:245: incoming = _uart_in_buffer[_out_buffer_index++]; ld de,(__out_buffer_index) ld hl, #__out_buffer_index+0 inc (hl) jr NZ,00121$ ld hl, #__out_buffer_index+1 inc (hl) 00121$: ld hl,#__uart_in_buffer add hl,de ld e,(hl) ld d,#0x00 ;./include/z80uart.h:246: if(_out_buffer_index == UART_BUFFER_SIZE) ld a,(#__out_buffer_index + 0) or a, a jr NZ,00105$ ld a,(#__out_buffer_index + 1) sub a, #0x04 jr NZ,00105$ ;./include/z80uart.h:247: _out_buffer_index=0; ld hl,#0x0000 ld (__out_buffer_index),hl 00105$: ;./include/z80uart.h:248: return incoming; ld l,e ret ;./include/z80uart.h:252: int uart_read_buffer(uint8_t* buffer, int count){ ; --------------------------------- ; Function uart_read_buffer ; --------------------------------- _uart_read_buffer:: ;./include/z80uart.h:255: if(uart_available() < count) call _uart_available ld d,l ld e,h ld hl,#4 add hl,sp ld a,d sub a, (hl) ld a,e inc hl sbc a, (hl) jp PO, 00122$ xor a, #0x80 00122$: jp P,00111$ ;./include/z80uart.h:256: return -1; ld hl,#0xFFFF ret ;./include/z80uart.h:258: for (i = 0; i < count; i++) 00111$: ld de,#0x0000 00105$: ld hl,#4 add hl,sp ld a,e sub a, (hl) ld a,d inc hl sbc a, (hl) jp PO, 00123$ xor a, #0x80 00123$: jp P,00103$ ;./include/z80uart.h:259: buffer[i]=uart_read(); ld hl, #2 add hl, sp ld a, (hl) inc hl ld h, (hl) ld l, a add hl,de push hl push de call _uart_read ld a,l pop de pop hl ld (hl),a ;./include/z80uart.h:258: for (i = 0; i < count; i++) inc de jr 00105$ 00103$: ;./include/z80uart.h:261: return i; ex de,hl ret ;./include/z80uart.h:264: int uart_available(){ ; --------------------------------- ; Function uart_available ; --------------------------------- _uart_available:: ;./include/z80uart.h:265: int count=_in_buffer_index - _out_buffer_index; ld hl,#__out_buffer_index ld a,(#__in_buffer_index + 0) sub a, (hl) ld d,a ld a,(#__in_buffer_index + 1) inc hl sbc a, (hl) ld e,a ;./include/z80uart.h:267: return (count < 0) ? UART_BUFFER_SIZE - _out_buffer_index-1 : count ; bit 7, e jr Z,00103$ ld hl,#__out_buffer_index ld a,#0xFF sub a, (hl) ld d,a ld a,#0x03 inc hl sbc a, (hl) ld e,a 00103$: ld l, d ld h, e ret ;./include/z80uart.h:271: void uart_flush(){ ; --------------------------------- ; Function uart_flush ; --------------------------------- _uart_flush:: ;./include/z80uart.h:273: _in_buffer_index = _out_buffer_index = 0; ld hl,#0x0000 ld (__out_buffer_index),hl ld l, #0x00 ld (__in_buffer_index),hl ret ;./include/z80uart.h:279: void uart_interrupt_isr(){ ; --------------------------------- ; Function uart_interrupt_isr ; --------------------------------- _uart_interrupt_isr:: ;./include/z80uart.h:287: __endasm; push af push bc push de push hl push iy ;./include/z80uart.h:290: _uart_in_buffer[_in_buffer_index++] = URRBR; ld de,(__in_buffer_index) ld hl, #__in_buffer_index+0 inc (hl) jr NZ,00109$ ld hl, #__in_buffer_index+1 inc (hl) 00109$: ld hl,#__uart_in_buffer add hl,de in a,(_URRBR) ld (hl),a ;./include/z80uart.h:291: if(_in_buffer_index == UART_BUFFER_SIZE) ld iy,#__in_buffer_index ld a,0 (iy) or a, a jr NZ,00102$ ld iy,#__in_buffer_index ld a,1 (iy) sub a, #0x04 jr NZ,00102$ ;./include/z80uart.h:292: _in_buffer_index=0; ld hl,#0x0000 ld (__in_buffer_index),hl 00102$: ;./include/z80uart.h:302: __endasm; pop iy pop hl pop de pop bc pop af ei ret ret ;./include/z80uart.h:306: void uart_print(const uint8_t* str){ ; --------------------------------- ; Function uart_print ; --------------------------------- _uart_print:: ;./include/z80uart.h:309: while(*str) pop bc pop hl push hl push bc 00101$: ld a,(hl) or a, a ret Z ;./include/z80uart.h:310: uart_write(*str++); // envía el siguiente caracter. inc hl push hl push af inc sp call _uart_write inc sp pop hl jr 00101$ ;./include/z80uart.h:313: int uart_read_line(uint8_t* str){ ; --------------------------------- ; Function uart_read_line ; --------------------------------- _uart_read_line:: push ix ld ix,#0 add ix,sp ;./include/z80uart.h:315: int n=0; ld bc,#0x0000 ;./include/z80uart.h:317: while(n<MAXLINE-1 && (c=uart_read()) != '\n' && c !='\r'){ 00111$: ld a,c sub a, #0x63 ld a,b rla ccf rra sbc a, #0x80 jr NC,00113$ push bc call _uart_read ld a,l pop bc ld d,a sub a, #0x0A jr Z,00113$ ;./include/z80uart.h:319: if(c == 0x7F || c==0x08){ ld a,d cp a,#0x0D jr Z,00113$ cp a,#0x7F jr Z,00105$ sub a, #0x08 jr NZ,00106$ 00105$: ;./include/z80uart.h:321: if(n>0){ xor a, a cp a, c sbc a, b jp PO, 00149$ xor a, #0x80 00149$: jp P,00111$ ;./include/z80uart.h:322: str[--n]='\0'; dec bc ld l,4 (ix) ld h,5 (ix) add hl,bc ld (hl),#0x00 ;./include/z80uart.h:323: uart_write(c); push bc push de push de inc sp call _uart_write inc sp ld a,#0x20 push af inc sp call _uart_write inc sp inc sp call _uart_write inc sp pop bc jr 00111$ 00106$: ;./include/z80uart.h:329: if(isprint(c)) ld l,d ld h,#0x00 push bc push de push hl call _isprint pop af pop de pop bc ld a,h or a,l jr Z,00111$ ;./include/z80uart.h:331: str[n++]=c; push bc pop iy inc bc push bc ld c,4 (ix) ld b,5 (ix) add iy, bc pop bc ld 0 (iy), d ;./include/z80uart.h:332: uart_write(c); push bc push de inc sp call _uart_write inc sp pop bc jp 00111$ 00113$: ;./include/z80uart.h:336: str[n]='\0'; ld l,4 (ix) ld h,5 (ix) add hl,bc ld (hl),#0x00 ;./include/z80uart.h:337: uart_write('\n'); push bc ld a,#0x0A push af inc sp call _uart_write inc sp ;./include/z80uart.h:338: return n; pop hl pop ix ret ;./include/z80uart.h:341: void printBuffer() ; --------------------------------- ; Function printBuffer ; --------------------------------- _printBuffer:: ;./include/z80uart.h:344: for (i=0;i<UART_BUFFER_SIZE;i++) ld de,#0x0000 00102$: ;./include/z80uart.h:345: uart_write(_uart_in_buffer[i]); ld hl,#__uart_in_buffer add hl,de ld h,(hl) push de push hl inc sp call _uart_write inc sp pop de ;./include/z80uart.h:344: for (i=0;i<UART_BUFFER_SIZE;i++) inc de ld a,d xor a, #0x80 sub a, #0x84 jr C,00102$ ret ;./include/z80eeprom.h:73: uint8_t eeprom_write(uint16_t address, uint8_t number){ ; --------------------------------- ; Function eeprom_write ; --------------------------------- _eeprom_write:: ;./include/z80eeprom.h:80: dir_low = address; ld iy,#2 add iy,sp ld d,0 (iy) ;./include/z80eeprom.h:81: dir_hight = (address >> 8); ld b,1 (iy) ;./include/z80eeprom.h:83: if(address > BOOT_RESET_ADDR && address < BOOT_START_ADDR){ ld a,#0x05 cp a, 0 (iy) ld a,#0x00 sbc a, 1 (iy) jr NC,00102$ ld a,1 (iy) sub a, #0x68 jr NC,00102$ ;./include/z80eeprom.h:84: write_byte_EEPROM_ptr(dir_hight,dir_low,number);//apuntador a funcion en ram para escritura en ram. ld hl, #4+0 add hl, sp ld a, (hl) push af inc sp push de inc sp push bc inc sp ld hl,(_write_byte_EEPROM_ptr) call ___sdcc_call_hl pop af inc sp ;./include/z80eeprom.h:87: NOP(); NOP ;./include/z80eeprom.h:88: return 1; ld l,#0x01 ret 00102$: ;./include/z80eeprom.h:91: return 0; ld l,#0x00 ret ;./include/z80eeprom.h:95: void eeprom_erase(uint16_t address, uint16_t count) { ; --------------------------------- ; Function eeprom_erase ; --------------------------------- _eeprom_erase:: push ix ld ix,#0 add ix,sp ;./include/z80eeprom.h:98: for(addr = address; addr < (address+count); addr ++) ld c,4 (ix) ld b,5 (ix) ld a,6 (ix) add a, c ld d,a ld a,7 (ix) adc a, b ld e,a 00103$: ld a,c sub a, d ld a,b sbc a, e jr NC,00105$ ;./include/z80eeprom.h:99: eeprom_write(addr, 0xFF); push bc push de ld a,#0xFF push af inc sp push bc call _eeprom_write pop af inc sp pop de pop bc ;./include/z80eeprom.h:98: for(addr = address; addr < (address+count); addr ++) inc bc jr 00103$ 00105$: pop ix ret ;./include/z80eeprom.h:102: uint8_t eeprom_write_buffer(uint16_t address, uint8_t* data_buffer, uint16_t data_length){ ; --------------------------------- ; Function eeprom_write_buffer ; --------------------------------- _eeprom_write_buffer:: push ix ld ix,#0 add ix,sp ;./include/z80eeprom.h:106: for (i = 0; i < data_length; i++){ ld de,#0x0000 00105$: ld c, e ld b, d ld a,c sub a, 8 (ix) ld a,b sbc a, 9 (ix) jr NC,00103$ ;./include/z80eeprom.h:108: if(!eeprom_write(address+i, data_buffer[i])) ld l,6 (ix) ld h,7 (ix) add hl,de ld h,(hl) ld a,4 (ix) add a, c ld c,a ld a,5 (ix) adc a, b ld b,a push de push hl inc sp push bc call _eeprom_write pop af inc sp ld a,l pop de ;./include/z80eeprom.h:109: return 0; or a,a jr NZ,00102$ ld l,a jr 00107$ 00102$: ;./include/z80eeprom.h:110: NOP(); NOP ;./include/z80eeprom.h:106: for (i = 0; i < data_length; i++){ inc de jr 00105$ 00103$: ;./include/z80eeprom.h:112: delay_ms(1000); ld hl,#0x03E8 push hl call _delay_ms pop af ;./include/z80eeprom.h:113: return 1; ld l,#0x01 00107$: pop ix ret ;./include/z80eeprom.h:117: void eeprom_read(uint16_t address, uint8_t* data){ ; --------------------------------- ; Function eeprom_read ; --------------------------------- _eeprom_read:: ;./include/z80eeprom.h:119: if(address <= EEPROM_SIZE){ ld a,#0xFF ld iy,#2 add iy,sp cp a, 0 (iy) ld a,#0x7F sbc a, 1 (iy) ret C ;./include/z80eeprom.h:122: *data = *(uint8_t*)address; ld hl, #4 add hl, sp ld e, (hl) inc hl ld d, (hl) pop bc pop hl push hl push bc ld a,(hl) ld (de),a ret ;./include/z80eeprom.h:126: void eeprom_read_buffer(uint16_t address, uint8_t* data_buffer, uint16_t data_length){ ; --------------------------------- ; Function eeprom_read_buffer ; --------------------------------- _eeprom_read_buffer:: push ix ld ix,#0 add ix,sp ;./include/z80eeprom.h:128: for (i = 0; i < data_length; i++) ld de,#0x0000 00103$: ld c, e ld b, d ld a,c sub a, 8 (ix) ld a,b sbc a, 9 (ix) jr NC,00105$ ;./include/z80eeprom.h:129: eeprom_read(address+i,data_buffer+i); ld l,6 (ix) ld h,7 (ix) add hl,de ld a,4 (ix) add a, c ld c,a ld a,5 (ix) adc a, b ld b,a push de push hl push bc call _eeprom_read pop af pop af pop de ;./include/z80eeprom.h:128: for (i = 0; i < data_length; i++) inc de jr 00103$ 00105$: pop ix ret ;./include/z80eeprom.h:133: void write_byte(uint8_t dir_alta ,uint8_t dir_baja , uint8_t dato) ; --------------------------------- ; Function write_byte ; --------------------------------- _write_byte:: ;./include/z80eeprom.h:136: data = dato; // byte que se va a escribir ld iy,#4 add iy,sp ld a,0 (iy) ld iy,#_data ld 0 (iy),a ;./include/z80eeprom.h:137: address_hight = dir_alta; // direccion en la que se va a escribir ld iy,#2 add iy,sp ld a,0 (iy) ld iy,#_address_hight ld 0 (iy),a ;./include/z80eeprom.h:138: address_low= dir_baja; ld iy,#3 add iy,sp ld a,0 (iy) ld iy,#_address_low ld 0 (iy),a ;./include/z80eeprom.h:147: __endasm; LD A,(_address_hight) LD H,A LD A,(_address_low) LD L,A LD A,(_data) LD (HL), A ;./include/z80eeprom.h:152: __endasm; call 0xB000 ret ;./include/packet.h:96: void packet_fill(packet_t *nuevo, uint8_t packet_type, uint8_t packet_number, uint8_t* packet_data, uint8_t data_length){ ; --------------------------------- ; Function packet_fill ; --------------------------------- _packet_fill:: push ix ld ix,#0 add ix,sp push af push af dec sp ;./include/packet.h:100: nuevo->mark = PACKET_MARK; ld e,4 (ix) ld d,5 (ix) ld a,#0x3A ld (de),a ;./include/packet.h:102: nuevo->data_length = data_length; ld l, e ld h, d inc hl ld a,10 (ix) ld (hl),a ;./include/packet.h:103: checksum+= data_length; ld a,10 (ix) add a, #0x3A ld b,a ;./include/packet.h:104: nuevo->number = packet_number; ld l, e ld h, d inc hl inc hl ld a,7 (ix) ld (hl),a ;./include/packet.h:105: checksum+= packet_number; ld a,b add a, 7 (ix) ld b,a ;./include/packet.h:106: nuevo->type = packet_type; ld l, e ld h, d inc hl inc hl inc hl ld a,6 (ix) ld (hl),a ;./include/packet.h:107: checksum+= packet_type; ld a,b add a, 6 (ix) ld -3 (ix),a ;./include/packet.h:109: for (i= 0; i < data_length; ++i) ld hl,#0x0004 add hl,de ex (sp), hl ld bc,#0x0000 00103$: ld h,10 (ix) ld l,#0x00 ld a,c sub a, h ld a,b sbc a, l jp PO, 00116$ xor a, #0x80 00116$: jp P,00101$ ;./include/packet.h:111: nuevo->data[i] = packet_data[i]; ld a,-5 (ix) add a, c ld -2 (ix),a ld a,-4 (ix) adc a, b ld -1 (ix),a push hl ld l,8 (ix) ld h,9 (ix) push hl pop iy pop hl add iy, bc ld a, 0 (iy) ld l,-2 (ix) ld h,-1 (ix) ld (hl),a ;./include/packet.h:112: checksum+= packet_data[i]; ld h, 0 (iy) ld a,-3 (ix) add a, h ld -3 (ix),a ;./include/packet.h:109: for (i= 0; i < data_length; ++i) inc bc jr 00103$ 00101$: ;./include/packet.h:115: nuevo->checksum = checksum; ld hl,#0x0103 add hl,de ld a,-3 (ix) ld (hl),a ld sp, ix pop ix ret ;./include/packet.h:118: uint8_t packet_check(packet_t *p) ; --------------------------------- ; Function packet_check ; --------------------------------- _packet_check:: push ix ld ix,#0 add ix,sp push af push af ;./include/packet.h:123: check_sum+= p->mark; ld c,4 (ix) ld b,5 (ix) ld a,(bc) ld d,a ;./include/packet.h:124: check_sum+= p->data_length; ld l, c ld h, b inc hl ld a,(hl) ld -3 (ix),a ld a,d add a, -3 (ix) ld d,a ;./include/packet.h:125: check_sum+= p->number; ld l, c ld h, b inc hl inc hl ld h,(hl) ld a,d add a, h ld d,a ;./include/packet.h:126: check_sum+= p->type; push bc pop iy ld h,3 (iy) ld a,d add a, h ld -4 (ix),a ;./include/packet.h:128: for (i= 0; i < p->data_length; ++i) ld hl,#0x0004 add hl,bc ld -2 (ix),l ld -1 (ix),h ld de,#0x0000 00106$: ld h,-3 (ix) ld l,#0x00 ld a,e sub a, h ld a,d sbc a, l jp PO, 00123$ xor a, #0x80 00123$: jp P,00101$ ;./include/packet.h:129: check_sum+= p->data[i]; ld l,-2 (ix) ld h,-1 (ix) add hl,de ld h,(hl) ld a,-4 (ix) add a, h ld -4 (ix),a ;./include/packet.h:128: for (i= 0; i < p->data_length; ++i) inc de jr 00106$ 00101$: ;./include/packet.h:132: if(check_sum == p->checksum) ld l, c ld h, b ld de, #0x0103 add hl, de ld a,-4 (ix) sub a,(hl) jr NZ,00103$ ;./include/packet.h:133: return 1; ld l,#0x01 jr 00108$ 00103$: ;./include/packet.h:135: return 0; ld l,#0x00 00108$: ld sp, ix pop ix ret ;./include/packet.h:138: uint8_t packet_read(packet_t *nuevo) ; --------------------------------- ; Function packet_read ; --------------------------------- _packet_read:: push ix ld ix,#0 add ix,sp push af push af ;./include/packet.h:148: while((c=uart_read()) != PACKET_MARK) ld bc,#0x0000 00103$: push bc call _uart_read ld a,l pop bc ld e,a sub a, #0x3A jr Z,00105$ ;./include/packet.h:150: intent_count++; inc bc ;./include/packet.h:151: if(intent_count>=MAX_PACKET_READ_INTENTS) ld a,c sub a, #0x32 ld a,b rla ccf rra sbc a, #0x80 jr C,00103$ ;./include/packet.h:152: return 0; ld l,#0x00 jr 00110$ 00105$: ;./include/packet.h:154: nuevo->mark = c; // Asigna marca a paquete ld c,4 (ix) ld b,5 (ix) ld a,e ld (bc),a ;./include/packet.h:155: nuevo->data_length =uart_read(); // Lee numero de datos que contiene el paquete. ld hl,#0x0001 add hl,bc ld -2 (ix),l ld -1 (ix),h push bc call _uart_read ld a,l pop bc ld l,-2 (ix) ld h,-1 (ix) ld (hl),a ;./include/packet.h:156: nuevo->number=uart_read(); // Lee el numero de paquete ld l, c ld h, b inc hl inc hl push hl push bc call _uart_read ld a,l pop bc pop hl ld (hl),a ;./include/packet.h:157: nuevo->type=uart_read(); // Lee tipo de paquete. ld l, c ld h, b inc hl inc hl inc hl push hl push bc call _uart_read ld a,l pop bc pop hl ld (hl),a ;./include/packet.h:158: for(i= 0; i< nuevo->data_length; i++) ld hl,#0x0004 add hl,bc ex (sp), hl ld de,#0x0000 00108$: ld l,-2 (ix) ld h,-1 (ix) ld h,(hl) ld l,#0x00 ld a,e sub a, h ld a,d sbc a, l jp PO, 00134$ xor a, #0x80 00134$: jp P,00106$ ;./include/packet.h:160: nuevo->data[i]=uart_read(); // Lee los datos del paquete. pop hl push hl add hl,de push hl push bc push de call _uart_read ld a,l pop de pop bc pop hl ld (hl),a ;./include/packet.h:158: for(i= 0; i< nuevo->data_length; i++) inc de jr 00108$ 00106$: ;./include/packet.h:162: nuevo->checksum = uart_read(); // Lee el checksum de el paquete. ld hl,#0x0103 add hl,bc push hl call _uart_read ld a,l pop hl ld (hl),a ;./include/packet.h:163: return 1; ld l,#0x01 00110$: ld sp, ix pop ix ret ;./include/packet.h:166: void packet_send(packet_t *p){ ; --------------------------------- ; Function packet_send ; --------------------------------- _packet_send:: push ix ld ix,#0 add ix,sp ;./include/packet.h:168: uart_write(p->mark); // Envía la marca. ld e,4 (ix) ld d,5 (ix) ld a,(de) push de push af inc sp call _uart_write inc sp pop de ;./include/packet.h:169: uart_write(p->data_length); // Envia el tamaño de datos. ld c, e ld b, d inc bc ld a,(bc) push bc push de push af inc sp call _uart_write inc sp pop de pop bc ;./include/packet.h:170: uart_write(p->number); // Envía el número de paquete. ld l, e ld h, d inc hl inc hl ld h,(hl) push bc push de push hl inc sp call _uart_write inc sp pop de pop bc ;./include/packet.h:171: uart_write(p->type); // Envía el tipo de paquete. push de pop iy ld h,3 (iy) push bc push de push hl inc sp call _uart_write inc sp pop de pop bc ;./include/packet.h:172: uart_write_buffer(p->data, p->data_length); // Envia los datos del paquete. ld a,(bc) ld c,a ld b,#0x00 ld hl,#0x0004 add hl,de push de push bc push hl call _uart_write_buffer pop af pop af ;./include/packet.h:173: uart_write(p->checksum); // Envia el checksum del paquete. pop hl ld de, #0x0103 add hl, de ld h,(hl) push hl inc sp call _uart_write inc sp pop ix ret ;./include/z80bootloader.h:75: void bootloader_init(){ ; --------------------------------- ; Function bootloader_init ; --------------------------------- _bootloader_init:: push af push af ;./include/z80bootloader.h:82: uart_config.divisor = UART_MR ; // divisor x64. ld hl,#0x0000 add hl,sp ld (hl),#0x03 ;./include/z80bootloader.h:85: uart_init(&uart_config); ld hl,#0x0000 add hl,sp ld e,l ld d,h push de push hl call _uart_init ld hl, #0x01F4 ex (sp),hl call _delay_ms pop af pop de ;./include/z80bootloader.h:88: uart_config.configuracionDePalabra = UART_8BITS_1STOPBIT; // 1 bit de parada, 8 bits por palabra. ld l, e ld h, d inc hl ld (hl),#0x14 ;./include/z80bootloader.h:89: uart_config.interrupcionesDelReceptor = UART_RECIVE_INTERRUPT_ENABLE; // interrupcion de recepcion ld l, e ld h, d inc hl inc hl inc hl ld (hl),#0x80 ;./include/z80bootloader.h:90: uart_config.interrupcionesDelTransmisor = UART_TRANSMIT_INTERRUPT_DISABLE_RTS_LOW; // Dato de 8 bits ld l, e ld h, d inc hl inc hl ld (hl),#0x00 ;./include/z80bootloader.h:91: uart_config.divisor = UART_DIV_64; ld a,#0x02 ld (de),a ;./include/z80bootloader.h:93: uart_init(&uart_config); push de call _uart_init pop af ;./include/z80bootloader.h:97: old_app_int_isr_addr = *ptr_int_isr; ld hl,(_ptr_int_isr) ld a,(hl) ld iy,#_old_app_int_isr_addr ld 0 (iy),a inc hl ld a,(hl) ld (#_old_app_int_isr_addr + 1),a ;./include/z80bootloader.h:98: old_app_int_isr_addr_l = *ptr_int_isr_l; ld hl,(_ptr_int_isr_l) ld a,(hl) ld (#_old_app_int_isr_addr_l + 0),a ;./include/z80bootloader.h:99: old_app_int_isr_addr_h = *ptr_int_isr_h; ld hl,(_ptr_int_isr_h) ld a,(hl) ld (#_old_app_int_isr_addr_h + 0),a ;./include/z80bootloader.h:100: old_app_nmi_isr_addr = *ptr_nmi_isr; ld hl,(_ptr_nmi_isr) ld a,(hl) ld iy,#_old_app_nmi_isr_addr ld 0 (iy),a inc hl ld a,(hl) ld (#_old_app_nmi_isr_addr + 1),a ;./include/z80bootloader.h:101: old_app_nmi_isr_addr_l = *ptr_nmi_isr_l; ld hl,(_ptr_nmi_isr_l) ld a,(hl) ld (#_old_app_nmi_isr_addr_l + 0),a ;./include/z80bootloader.h:102: old_app_nmi_isr_addr_h = *ptr_nmi_isr_h; ld hl,(_ptr_nmi_isr_h) ld a,(hl) ld (#_old_app_nmi_isr_addr_h + 0),a ;./include/z80bootloader.h:105: eeprom_write((uint16_t)(ptr_int_isr_l),(uint8_t)&uart_interrupt_isr); ld b,#<(_uart_interrupt_isr) ld de,(_ptr_int_isr_l) push bc inc sp push de call _eeprom_write pop af inc sp ;./include/z80bootloader.h:106: eeprom_write((uint16_t)ptr_int_isr_h,(uint8_t)((uint16_t)(&uart_interrupt_isr)>> 8)); ld hl,#_uart_interrupt_isr ld a, h ld hl, (_ptr_int_isr_h) push af inc sp push hl call _eeprom_write pop af inc sp ;./include/z80bootloader.h:107: IM(1); // Modo de interrupción 1 IM 1 ;./include/z80bootloader.h:108: EI(); // Habilita interrupciones. EI pop af pop af ret ;./include/z80bootloader.h:111: uint8_t bootloader_check_program_commnad(){ ; --------------------------------- ; Function bootloader_check_program_commnad ; --------------------------------- _bootloader_check_program_commnad:: ;./include/z80bootloader.h:118: while(1){ ld de,#0x0000 00108$: ;./include/z80bootloader.h:121: if(uart_available()){ push de call _uart_available pop de ld a,h or a,l jr Z,00104$ ;./include/z80bootloader.h:123: if(uart_read() == BOOTLOADER_PROGRAM_COMMAND) push de call _uart_read ld a,l pop de sub a, #0x40 jr NZ,00104$ ;./include/z80bootloader.h:126: return 1; ld l,#0x01 ret 00104$: ;./include/z80bootloader.h:130: delay_ms(1); push de ld hl,#0x0001 push hl call _delay_ms pop af pop de ;./include/z80bootloader.h:132: time_spend+=1; inc de ;./include/z80bootloader.h:136: if(time_spend >= BOOTLOADER_PROGRAM_COMMAND_TIMEOUT) ld a,e sub a, #0x20 ld a,d rla ccf rra sbc a, #0x83 jr C,00108$ ;./include/z80bootloader.h:137: return 0; ld l,#0x00 ret ;./include/z80bootloader.h:142: int bootloader_run(){ ; --------------------------------- ; Function bootloader_run ; --------------------------------- _bootloader_run:: push ix ld ix,#0 add ix,sp ld hl,#-16390 add hl,sp ld sp,hl ;./include/z80bootloader.h:144: uint8_t is_exit=0; ld -3 (ix),#0x00 ;./include/z80bootloader.h:145: uint8_t intent_count=0; ld iy,#0 add iy,sp ld 0 (iy),#0x00 ;./include/z80bootloader.h:149: int mem_buffer_index=0; ld hl, #1 add hl, sp xor a, a ld (hl), a inc hl ld (hl), a ;./include/z80bootloader.h:150: delay_ms(300); ld hl,#0x012C push hl call _delay_ms pop af ;./include/z80bootloader.h:152: while(is_exit==0) ld hl,#0x0003 add hl,sp ld -2 (ix),l ld -1 (ix),h 00131$: ld a,-3 (ix) or a, a jp NZ,00133$ ;./include/z80bootloader.h:156: if(packet_read(&pkg_in)) ld hl,#_pkg_in push hl call _packet_read pop af ld a,l or a, a jp Z,00129$ ;./include/z80bootloader.h:158: intent_count=0; ld iy,#0 add iy,sp ld 0 (iy),#0x00 ;./include/z80bootloader.h:160: if(packet_check(&pkg_in) == 0){ ld hl,#_pkg_in+0 push hl call _packet_check pop af ld a,l or a, a jr NZ,00124$ ;./include/z80bootloader.h:162: packet_fill(&pkg_out, PACKET_TYPE_NAK,pkg_in.number, NULL, 0); ld hl, #(_pkg_in + 0x0002) + 0 ld c,(hl) ld de,#_pkg_out xor a, a push af inc sp ld hl,#0x0000 push hl ld b, c ld c,#0x4E push bc push de call _packet_fill ld hl,#7 add hl,sp ld sp,hl ;./include/z80bootloader.h:164: packet_send(&pkg_out); ld hl,#_pkg_out push hl call _packet_send pop af ;./include/z80bootloader.h:165: uart_flush(); call _uart_flush jr 00131$ 00124$: ;./include/z80bootloader.h:170: packet_fill(&pkg_out, PACKET_TYPE_ACK, pkg_in.number, NULL, 0); ld hl,#_pkg_in+2 ld d,(hl) ld bc,#_pkg_out+0 xor a, a push af inc sp ld hl,#0x0000 push hl ld e, #0x41 push de push bc call _packet_fill ld hl,#7 add hl,sp ld sp,hl ;./include/z80bootloader.h:171: uart_flush(); call _uart_flush ;./include/z80bootloader.h:174: switch(pkg_in.type){ ld a,(#_pkg_in+3) cp a,#0x44 jr Z,00109$ cp a,#0x46 jp Z,00119$ cp a,#0x53 jr Z,00101$ sub a, #0x5A jp Z,00118$ jp 00122$ ;./include/z80bootloader.h:175: case PACKET_TYPE_ADDRES: // Si es paquete de direccion. 00101$: ;./include/z80bootloader.h:180: if(INT_ISR_ADDR == pkg_in.data[1] && INT_ISR_ADDR>>8 == pkg_in.data[0]) ld a,(#_pkg_in+5) sub a, #0x38 jr NZ,00106$ ld a, (#(_pkg_in + 0x0004) + 0) or a, a jr NZ,00106$ ;./include/z80bootloader.h:183: aux_address_l= pkg_in.data[1]; ld a,(#_pkg_in+5) ld (#_aux_address_l + 0),a ;./include/z80bootloader.h:184: aux_address_h= pkg_in.data[0]; ld a,(#_pkg_in+4) ld (#_aux_address_h + 0),a jp 00122$ 00106$: ;./include/z80bootloader.h:187: if(NMI_ISR_ADDR == pkg_in.data[1] && NMI_ISR_ADDR>>8 == pkg_in.data[0]){ ld a,(#_pkg_in+5) sub a, #0x66 jp NZ,00122$ ld a, (#(_pkg_in + 0x0004) + 0) or a, a jp NZ,00122$ ;./include/z80bootloader.h:189: aux_address_l= pkg_in.data[1]; ld a,(#_pkg_in+5) ld (#_aux_address_l + 0),a ;./include/z80bootloader.h:190: aux_address_h= pkg_in.data[0]; ld a,(#_pkg_in+4) ld (#_aux_address_h + 0),a ;./include/z80bootloader.h:193: break; jp 00122$ ;./include/z80bootloader.h:194: case PACKET_TYPE_DATA: // Si es paquete de datos. 00109$: ;./include/z80bootloader.h:196: if(INT_ISR_ADDR == aux_address_l && INT_ISR_ADDR>>8 == aux_address_h){ ld a,(#_aux_address_l + 0) sub a, #0x38 jr NZ,00115$ ld a,(#_aux_address_h + 0) or a, a jr NZ,00115$ ;./include/z80bootloader.h:198: old_app_int_isr_addr_l= pkg_in.data[0]; ld a,(#_pkg_in+4) ld (#_old_app_int_isr_addr_l + 0),a ;./include/z80bootloader.h:199: old_app_int_isr_addr_h= pkg_in.data[1]; ld a,(#_pkg_in+5) ld (#_old_app_int_isr_addr_h + 0),a ;./include/z80bootloader.h:200: aux_address_l=0x00; ld hl,#_aux_address_l + 0 ld (hl), #0x00 ;./include/z80bootloader.h:201: aux_address_h=0x00; ld hl,#_aux_address_h + 0 ld (hl), #0x00 jp 00122$ 00115$: ;./include/z80bootloader.h:204: if(NMI_ISR_ADDR == aux_address_l && NMI_ISR_ADDR>>8 == aux_address_h){ ld a,(#_aux_address_l + 0) sub a, #0x66 jr NZ,00111$ ld a,(#_aux_address_h + 0) or a, a jr NZ,00111$ ;./include/z80bootloader.h:206: old_app_nmi_isr_addr_l= pkg_in.data[0]; ld a,(#_pkg_in+4) ld (#_old_app_nmi_isr_addr_l + 0),a ;./include/z80bootloader.h:207: old_app_nmi_isr_addr_h= pkg_in.data[1]; ld a,(#_pkg_in+5) ld (#_old_app_nmi_isr_addr_h + 0),a ;./include/z80bootloader.h:208: aux_address_l=0x00; ld hl,#_aux_address_l + 0 ld (hl), #0x00 ;./include/z80bootloader.h:209: aux_address_h=0x00; ld hl,#_aux_address_h + 0 ld (hl), #0x00 jr 00122$ 00111$: ;./include/z80bootloader.h:213: memcpy(&mem_buffer[mem_buffer_index], pkg_in.data, pkg_in.data_length); ld a,-2 (ix) ld hl,#1 add hl,sp add a, (hl) ld e,a ld a,-1 (ix) inc hl adc a, (hl) ld d,a ld bc,#_pkg_in+4 ld hl,#_pkg_in+1 ld l,(hl) ld h,#0x00 push hl push bc push de call _memcpy ld hl,#6 add hl,sp ld sp,hl ;./include/z80bootloader.h:214: mem_buffer_index += pkg_in.data_length; ld hl,#_pkg_in+1 ld e,(hl) ld d,#0x00 ld hl,#1 add hl,sp ld a,(hl) add a, e ld (hl),a inc hl ld a,(hl) adc a, d ld (hl),a ;./include/z80bootloader.h:228: break; jr 00122$ ;./include/z80bootloader.h:230: case PACKET_TYPE_EOF: // Si es paquete de fin de archivo 00118$: ;./include/z80bootloader.h:231: is_exit=1; // Termina el programa bootloader correctamente. ld -3 (ix),#0x01 ;./include/z80bootloader.h:232: break; jr 00122$ ;./include/z80bootloader.h:234: case PACKET_TYPE_FILE_HEADER: 00119$: ;./include/z80bootloader.h:237: app_program_size = *(uint16_t*)pkg_in.data; ld hl,#_pkg_in+4 ld d,(hl) inc hl ld h,(hl) ;./include/z80bootloader.h:239: if(app_program_size >= APP_SIZE){ ld a,d sub a, #0xFA ld a,h sbc a, #0x17 jr C,00122$ ;./include/z80bootloader.h:241: packet_fill(&pkg_out, PACKET_TYPE_ERROR,pkg_in.number, NULL, 0); ld hl,#_pkg_in+2 ld d,(hl) ld bc,#_pkg_out+0 xor a, a push af inc sp ld hl,#0x0000 push hl ld e, #0x45 push de push bc call _packet_fill ld hl,#7 add hl,sp ld sp,hl ;./include/z80bootloader.h:242: return 0; ld hl,#0x0000 jr 00134$ ;./include/z80bootloader.h:246: } 00122$: ;./include/z80bootloader.h:248: packet_send(&pkg_out); ld hl,#_pkg_out+0 push hl call _packet_send pop af jp 00131$ 00129$: ;./include/z80bootloader.h:253: intent_count++; ld iy,#0 add iy,sp inc 0 (iy) ;./include/z80bootloader.h:255: if(intent_count >= MAX_READS_INTENTS) ld a,0 (iy) sub a, #0x0A jp C,00131$ ;./include/z80bootloader.h:257: return 0; ld hl,#0x0000 jr 00134$ 00133$: ;./include/z80bootloader.h:264: eeprom_write_buffer(0x0080, mem_buffer, mem_buffer_index+1); ld hl, #1 add hl, sp ld e, (hl) inc hl ld d, (hl) inc de ld l,-2 (ix) ld h,-1 (ix) push de push hl ld hl,#0x0080 push hl call _eeprom_write_buffer ld hl,#6 add hl,sp ld sp,hl ;./include/z80bootloader.h:265: packet_fill(&pkg_out, PACKET_TYPE_EOF,pkg_in.number, NULL, 0); ld hl, #(_pkg_in + 0x0002) + 0 ld b,(hl) ld de,#_pkg_out xor a, a push af inc sp ld hl,#0x0000 push hl push bc inc sp ld a,#0x5A push af inc sp push de call _packet_fill ld hl,#7 add hl,sp ld sp,hl ;./include/z80bootloader.h:266: delay_ms(500); ld hl,#0x01F4 push hl call _delay_ms ;./include/z80bootloader.h:267: packet_send(&pkg_out); ld hl, #_pkg_out ex (sp),hl call _packet_send ;./include/z80bootloader.h:268: packet_send(&pkg_out); ld hl, #_pkg_out ex (sp),hl call _packet_send ;./include/z80bootloader.h:269: packet_send(&pkg_out); ld hl, #_pkg_out ex (sp),hl call _packet_send pop af ;./include/z80bootloader.h:270: return 1; ld hl,#0x0001 00134$: ld sp, ix pop ix ret ;./include/z80bootloader.h:275: void bootloader_start_app(){ ; --------------------------------- ; Function bootloader_start_app ; --------------------------------- _bootloader_start_app:: ;./include/z80bootloader.h:279: eeprom_write((uint16_t)ptr_int_isr_l,old_app_int_isr_addr_l); ld de,(_ptr_int_isr_l) ld a,(_old_app_int_isr_addr_l) push af inc sp push de call _eeprom_write pop af inc sp ;./include/z80bootloader.h:280: eeprom_write((uint16_t)ptr_int_isr_h,old_app_int_isr_addr_h); ld de,(_ptr_int_isr_h) ld a,(_old_app_int_isr_addr_h) push af inc sp push de call _eeprom_write pop af inc sp ;./include/z80bootloader.h:281: eeprom_write((uint16_t)ptr_nmi_isr_l,old_app_nmi_isr_addr_l); ld de,(_ptr_nmi_isr_l) ld a,(_old_app_nmi_isr_addr_l) push af inc sp push de call _eeprom_write pop af inc sp ;./include/z80bootloader.h:282: eeprom_write((uint16_t)ptr_nmi_isr_h,old_app_nmi_isr_addr_h); ld de,(_ptr_nmi_isr_h) ld a,(_old_app_nmi_isr_addr_h) push af inc sp push de call _eeprom_write pop af inc sp ;./include/z80bootloader.h:285: if(*((uint8_t*)(0x0080)) == 0x00 || *((uint8_t*)(0x0080)) == 0xFF) ld hl,#0x0080 ld a,(hl) or a, a jr Z,00101$ inc a jr NZ,00102$ 00101$: ;./include/z80bootloader.h:287: eeprom_write(0x0080,0x76); ld a,#0x76 push af inc sp ld hl,#0x0080 push hl call _eeprom_write pop af inc sp 00102$: ;./include/z80bootloader.h:292: __endasm; call #0x0080 ret ;./include/smz80.h:328: void io_write(char port_addr, char data){ ; --------------------------------- ; Function io_write ; --------------------------------- _io_write:: ;./include/smz80.h:339: __endasm; ld ix, #2 add ix,sp ld c, (ix) inc ix ld a,(ix) out (c), a ret ;./include/smz80.h:353: char io_read(char port_addr){ ; --------------------------------- ; Function io_read ; --------------------------------- _io_read:: ;./include/smz80.h:365: __endasm; LD IX, #2 ADD IX,SP LD C, (IX) IN A,(C) LD (___ret_aux),A ;./include/smz80.h:367: return __ret_aux; ld iy,#___ret_aux ld l,0 (iy) ret ;./include/smz80.h:379: void io_write_buffer(char port_addr, char* buffer_out, char count){ ; --------------------------------- ; Function io_write_buffer ; --------------------------------- _io_write_buffer:: ;./include/smz80.h:395: __endasm; LD IX, #2 ADD IX,SP LD C, (IX) INC IX LD L,(IX) INC IX LD H,(IX) INC IX LD B,(IX) OTIR ret ;./include/smz80.h:406: void io_read_buffer(char port_addr, char* buffer_in, char count){ ; --------------------------------- ; Function io_read_buffer ; --------------------------------- _io_read_buffer:: ;./include/smz80.h:423: __endasm; LD IX, #2 ADD IX,SP LD C, (IX) INC IX LD L,(IX) INC IX LD H,(IX) INC IX LD B,(IX) INIR ret ;./include/smz80.h:436: void ppi_init(const ppi_cfg_t *ppi_config){ ; --------------------------------- ; Function ppi_init ; --------------------------------- _ppi_init:: push ix ld ix,#0 add ix,sp ;./include/smz80.h:438: PPI_CTRL = 0x80 | ppi_config->mode | (ppi_config->pcl_dir << PCPCL) | (ppi_config->pch_dir << PCPCH) | (ppi_config->pa_dir << PCPA) | (ppi_config->pb_dir << PCPB); ld c,4 (ix) ld b,5 (ix) ld a,(bc) set 7, a ld e,a push bc pop iy ld a,3 (iy) or a, e ld e,a push bc pop iy ld a,4 (iy) rlca rlca rlca and a,#0xF8 or a, e ld e,a ld l, c ld h, b inc hl ld a,(hl) rlca rlca rlca rlca and a,#0xF0 or a, e ld d,a ld l, c ld h, b inc hl inc hl ld a,(hl) add a, a or a, d out (_PPI_CTRL),a pop ix ret ;./include/smz80.h:447: void ppi_set_portc_bit(const char bit){ ; --------------------------------- ; Function ppi_set_portc_bit ; --------------------------------- _ppi_set_portc_bit:: ;./include/smz80.h:449: PPI_CTRL = 1 | bit << 1; ld hl, #2+0 add hl, sp ld a, (hl) add a, a set 0, a out (_PPI_CTRL),a ret ;./include/smz80.h:458: void ppi_clear_portc_bit(const char bit){ ; --------------------------------- ; Function ppi_clear_portc_bit ; --------------------------------- _ppi_clear_portc_bit:: ;./include/smz80.h:460: PPI_CTRL = bit << 1; ld hl, #2+0 add hl, sp ld a, (hl) add a, a out (_PPI_CTRL),a ret ;main.c:44: ISR_NMI(){ ; --------------------------------- ; Function isr_vector66 ; --------------------------------- _isr_vector66:: push af push bc push de push hl push iy ;main.c:48: } pop iy pop hl pop de pop bc pop af retn ;main.c:50: ISR_INT_38(){ ; --------------------------------- ; Function isr_vector38 ; --------------------------------- _isr_vector38:: push af push bc push de push hl push iy ;main.c:52: } pop iy pop hl pop de pop bc pop af reti ;main.c:54: void init_system(){ ; --------------------------------- ; Function init_system ; --------------------------------- _init_system:: ;main.c:55: PPI_CTRL=0x80; ld a,#0x80 out (_PPI_CTRL),a ;main.c:57: write_byte_EEPROM_ptr = (void*)write_byte_EEPROM_RAM; // apuntador de fincion guardada en ram para escribir un byte en eeprom ld hl,#0xA000 ld (_write_byte_EEPROM_ptr),hl ;main.c:58: delay_1ms_ptr = (void*)delay_1ms_RAM; // apuntador de funcion guardada en ram para esperar un mili-segundo. ld h, #0xB0 ld (_delay_1ms_ptr),hl ;main.c:59: copeaBloque((uint16_t)&write_byte,write_byte_EEPROM_RAM,0x50); // copea funcion write_byte de eprom a ram. ld de,#_write_byte ld a,#0x50 push af inc sp ld h, #0xA0 push hl push de call _copeaBloque pop af pop af inc sp ;main.c:60: copeaBloque((uint16_t)&delay_1ms,delay_1ms_RAM,0x30);// copea funcion de delay_1ms de eeprom a ram. ld de,#_delay_1ms ld a,#0x30 push af inc sp ld hl,#0xB000 push hl push de call _copeaBloque pop af pop af inc sp ;main.c:61: bootloader_init(); jp _bootloader_init ;main.c:64: int main(){ ; --------------------------------- ; Function main ; --------------------------------- _main:: ld hl,#-260 add hl,sp ld sp,hl ;main.c:79: init_system(); call _init_system ;main.c:95: uart_write('1'); ld a,#0x31 push af inc sp call _uart_write inc sp ;main.c:101: if(bootloader_check_program_commnad()) call _bootloader_check_program_commnad ld a, l or a, a jr Z,00104$ ;main.c:103: uart_print("OK"); ld hl,#___str_0 push hl call _uart_print pop af ;main.c:113: if(!bootloader_run()) call _bootloader_run ld a,h or a,l jr NZ,00102$ ;main.c:116: eeprom_write(0x0080,0x76);//escribe halt en direccion 80 ld a,#0x76 push af inc sp ld hl,#0x0080 push hl call _eeprom_write ;main.c:117: delay_ms(100); inc sp ld hl,#0x0064 ex (sp),hl call _delay_ms pop af ;main.c:121: __endasm; call #0x0080 ;main.c:122: nop(); NOP 00102$: ;main.c:124: packet_fill(&pkg_out, PACKET_TYPE_EOF,200, NULL, 0); ld hl,#0x0000 add hl,sp ex de,hl ld c, e ld b, d push de xor a, a push af inc sp ld hl,#0x0000 push hl ld hl,#0xC85A push hl push bc call _packet_fill ld hl,#7 add hl,sp ld sp,hl call _packet_send pop af 00104$: ;main.c:129: bootloader_start_app(); call _bootloader_start_app ;main.c:132: return 0; ld hl,#0x0000 ld iy,#260 add iy,sp ld sp,iy ret ___str_0: .ascii "OK" .db 0x00 ;main.c:135: void test_program_command() { ; --------------------------------- ; Function test_program_command ; --------------------------------- _test_program_command:: ;main.c:137: uart_print("Esperando comando de programacion: @"); ld hl,#___str_1 push hl call _uart_print pop af ;main.c:138: if(bootloader_check_program_commnad()) call _bootloader_check_program_commnad ld a,l or a, a jr Z,00102$ ;main.c:139: uart_print("Comando OK! :D"); ld hl,#___str_2 push hl call _uart_print pop af jr 00103$ 00102$: ;main.c:141: uart_print("No se recibio @"); ld hl,#___str_3+0 push hl call _uart_print pop af 00103$: ;main.c:143: HALT(); HALT ret ___str_1: .ascii "Esperando comando de programacion: @" .db 0x00 ___str_2: .ascii "Comando OK! :D" .db 0x00 ___str_3: .ascii "No se recibio @" .db 0x00 .area _CODE .area _INITIALIZER __xinit__ptr_int_isr: .dw #0x0038 __xinit__ptr_int_isr_l: .dw #0x0039 __xinit__ptr_int_isr_h: .dw #0x003A __xinit__ptr_nmi_isr: .dw #0x0038 __xinit__ptr_nmi_isr_l: .dw #0x0067 __xinit__ptr_nmi_isr_h: .dw #0x0068 __xinit__app_main_addr: .dw #0x0080 .area _CABS (ABS)
#include <bits/stdc++.h> using namespace std; bool checkIfExist(vector<int>& arr){ for(int i=0;i<arr.size();++i){ for(int j=0;j<arr.size();++j){ if(i!=j && arr[i] == 2*arr[j]) return true; } } return false; } int main(){ vector<int> v={10,2,5,3}; cout<<checkIfExist(v); }
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2014-2019 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, 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 <modules/opencl/clockcl.h> #include <modules/opencl/inviwoopencl.h> #include <inviwo/core/util/logcentral.h> #include <inviwo/core/util/assertion.h> namespace inviwo { ScopedClockCL::~ScopedClockCL() { try { profilingEvent_->wait(); std::stringstream message; message << logMessage_ << ": " << profilingEvent_->getElapsedTime() << " ms"; LogCentral::getPtr()->log(logSource_, LogLevel::Info, LogAudience::Developer, __FILE__, __FUNCTION__, __LINE__, message.str()); // LogInfo("Exec time: " << profilingEvent->getElapsedTime() << " ms"); } catch (cl::Error& err) { LogError(getCLErrorString(err)); } delete profilingEvent_; } } // namespace inviwo
; A076095: Initial terms of rows in A076099. ; 1,2,3,5,9,13,19,25,32,40,49,59,70,82,95,109,124,140,157,175,194,214,235,257,280,304,329,355,382,410,439,469,500,532,565,599,634,670,707,745,784,824,865,907,950,994,1039,1085,1132,1180,1229,1279,1330,1382 mov $1,$0 mov $3,$0 sub $0,2 add $1,$0 mov $4,3 trn $4,$0 sub $0,3 sub $1,1 mov $2,3 lpb $0,1 add $1,$0 sub $0,1 sub $2,1 add $2,$1 mov $1,$2 mov $2,2 lpe trn $1,$4 lpb $3,1 add $1,1 sub $3,1 lpe add $1,1
; L0211.asm ; Generated 10.20.2000 by mlevel ; Modified 10.20.2000 by Abe Pralle INCLUDE "Source/Defs.inc" INCLUDE "Source/Levels.inc" FIRST_HOLE EQU 26 ;--------------------------------------------------------------------- SECTION "Level0211Section",ROMX ;--------------------------------------------------------------------- L0211_Contents:: DW L0211_Load DW L0211_Init DW L0211_Check DW L0211_Map ;--------------------------------------------------------------------- ; Load ;--------------------------------------------------------------------- L0211_Load: DW ((L0211_LoadFinished - L0211_Load2)) ;size L0211_Load2: call ParseMap ;alter yellow palette to purple w/black ld a,FADEBANK ld bc,6 ld de,gamePalette + 5*8 + 2 ld hl,((.purpleBlackPalette-L0211_Load2)+levelCheckRAM) call MemCopy ret .purpleBlackPalette DW $4008,$5192,$0000 L0211_LoadFinished: ;--------------------------------------------------------------------- ; Map ;--------------------------------------------------------------------- L0211_Map: INCBIN "Data/Levels/L0211_tower.lvl" ;--------------------------------------------------------------------- ; Init ;--------------------------------------------------------------------- L0211_Init: DW ((L0211_InitFinished - L0211_Init2)) ;size L0211_Init2: ret L0211_InitFinished: ;--------------------------------------------------------------------- ; Check ;--------------------------------------------------------------------- L0211_Check: DW ((L0211_CheckFinished - L0211_Check2)) ;size L0211_Check2: call ((.checkFalling-L0211_Check2)+levelCheckRAM) ret .checkFalling ld a,[timeToChangeLevel] or a ret z ld a,[exitTileIndex] cp FIRST_HOLE ret c ld hl,((.fallSound-L0211_Check2)+levelCheckRAM) call PlaySound ld a,15 call Delay ret .fallSound DB 1,$7e,$80,$f5,$00,$86 L0211_CheckFinished: PRINT "0211 Script Sizes (Load/Init/Check) (of $500): " PRINT (L0211_LoadFinished - L0211_Load2) PRINT " / " PRINT (L0211_InitFinished - L0211_Init2) PRINT " / " PRINT (L0211_CheckFinished - L0211_Check2) PRINT "\n"
/********************************************************************************** Copyright (C) 2012 Syed Reza Ali (www.syedrezaali.com) 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 "ofxUISlider.h" #include "ofxUI.h" template<typename T> ofxUISlider_<T>::ofxUISlider_() : ofxUIWidgetWithLabel() { } template<typename T> ofxUISlider_<T>::ofxUISlider_(string _name, T _min, T _max, T _value, float w, float h, float x, float y) : ofxUIWidgetWithLabel() { useReference = false; init(_name, _min, _max, &_value, w, h, x, y); } template<typename T> ofxUISlider_<T>::ofxUISlider_(string _name, T _min, T _max, T *_value, float w, float h, float x, float y) : ofxUIWidgetWithLabel() { useReference = true; init(_name, _min, _max, _value, w, h, x, y); } template<typename T> ofxUISlider_<T>::~ofxUISlider_() { if(!useReference) { delete valueRef; } } template<typename T> void ofxUISlider_<T>::init(string _name, T _min, T _max, T *_value, float w, float h, float x, float y) { initRect(x,y,w,h); name = string(_name); setOrientation(w, h); setKind(); draw_fill = true; value = *_value; //the widget's value if(useReference) { valueRef = _value; } else { valueRef = new T(); *valueRef = value; } max = _max; min = _min; labelPrecision = 2; if(value > max) { value = max; } if(value < min) { value = min; } value = ofxUIMap(value, min, max, 0.0, 1.0, true); valueString = ofxUIToString(getScaledValue(),labelPrecision); if(orientation == OFX_UI_ORIENTATION_HORIZONTAL) { label = new ofxUILabel(0,h+padding,string(name+" LABEL"), string(name + ": " + ofxUIToString(max,labelPrecision)), OFX_UI_FONT_SMALL); } else { label = new ofxUILabel(0,h+padding,string(name+" LABEL"), string(name), OFX_UI_FONT_SMALL); } addEmbeddedWidget(label); label->setVisible(drawLabel); increment = fabs(max - min) / 100.0; bRoundedToNearestInt = false; bClampValue = true; } template<typename T> void ofxUISlider_<T>::setOrientation(float w, float h) { if(w > h) { orientation = OFX_UI_ORIENTATION_HORIZONTAL; } else { orientation = OFX_UI_ORIENTATION_VERTICAL; } } template<> void ofxUISlider_<float>::setKind() { if(orientation == OFX_UI_ORIENTATION_HORIZONTAL) { kind = OFX_UI_WIDGET_SLIDER_H; } else { kind = OFX_UI_WIDGET_SLIDER_V; } } template<> void ofxUISlider_<int>::setKind() { if(orientation == OFX_UI_ORIENTATION_HORIZONTAL) { kind = OFX_UI_WIDGET_INTSLIDER_H; } else { kind = OFX_UI_WIDGET_INTSLIDER_V; } } template<> void ofxUISlider_<double>::setKind() { if(orientation == OFX_UI_ORIENTATION_HORIZONTAL) { kind = OFX_UI_WIDGET_DOUBLESLIDER_H; } else { kind = OFX_UI_WIDGET_DOUBLESLIDER_V; } } template<typename T> bool ofxUISlider_<T>::getSetClampValue() { return bClampValue; } template<typename T> void ofxUISlider_<T>::setClampValue(bool _bClampValue) { bClampValue = _bClampValue; } template<typename T> void ofxUISlider_<T>::update() { if(useReference) { value = ofxUIMap(*valueRef, min, max, 0.0, 1.0, bClampValue); updateLabel(); } } template<typename T> void ofxUISlider_<T>::setDrawPadding(bool _draw_padded_rect) { draw_padded_rect = _draw_padded_rect; label->setDrawPadding(false); } template<typename T> void ofxUISlider_<T>::setDrawPaddingOutline(bool _draw_padded_rect_outline) { draw_padded_rect_outline = _draw_padded_rect_outline; label->setDrawPaddingOutline(false); } template<typename T> void ofxUISlider_<T>::drawBack() { if(draw_back) { ofxUIFill(); ofxUISetColor(color_back); rect->draw(); } } template<typename T> void ofxUISlider_<T>::drawOutline() { if(draw_outline) { ofNoFill(); ofxUISetColor(color_outline); rect->draw(); } } template<typename T> void ofxUISlider_<T>::drawOutlineHighlight() { if(draw_outline_highlight) { ofNoFill(); ofxUISetColor(color_outline_highlight); rect->draw(); } } template<typename T> void ofxUISlider_<T>::drawFill() { if(draw_fill && value > 0.0) { ofxUIFill(); ofxUISetColor(color_fill); if(orientation == OFX_UI_ORIENTATION_HORIZONTAL) { ofxUIDrawRect(rect->getX(), rect->getY(), rect->getWidth()*MIN(MAX(value, 0.0), 1.0), rect->getHeight()); } else { ofxUIDrawRect(rect->getX(), rect->getY()+rect->getHeight(), rect->getWidth(), -rect->getHeight()*MIN(MAX(value, 0.0), 1.0)); } } } template<typename T> void ofxUISlider_<T>::drawFillHighlight() { if(draw_fill_highlight) { ofxUIFill(); ofxUISetColor(color_fill_highlight); if(orientation == OFX_UI_ORIENTATION_HORIZONTAL) { ofxUIDrawRect(rect->getX(), rect->getY(), rect->getWidth()*MIN(MAX(value, 0.0), 1.0), rect->getHeight()); } else { ofxUIDrawRect(rect->getX(), rect->getY()+rect->getHeight(), rect->getWidth(), -rect->getHeight()*MIN(MAX(value, 0.0), 1.0)); } if(kind == OFX_UI_WIDGET_SLIDER_V) { label->drawString(rect->getX()+rect->getWidth()+padding, label->getRect()->getHeight()/2.0+rect->getY()+rect->getHeight()-rect->getHeight()*MIN(MAX(value, 0.0), 1.0), valueString); } } } template<typename T> void ofxUISlider_<T>::mouseMoved(int x, int y ) { if(rect->inside(x, y)) { state = OFX_UI_STATE_OVER; } else { state = OFX_UI_STATE_NORMAL; } stateChange(); } template<typename T> void ofxUISlider_<T>::mouseDragged(int x, int y, int button) { if(hit) { state = OFX_UI_STATE_DOWN; if(triggerType & OFX_UI_TRIGGER_CHANGE) { input(x, y); triggerEvent(this); } } else { state = OFX_UI_STATE_NORMAL; } stateChange(); } template<typename T> void ofxUISlider_<T>::mousePressed(int x, int y, int button) { if(rect->inside(x, y)) { hit = true; state = OFX_UI_STATE_DOWN; if(triggerType & OFX_UI_TRIGGER_BEGIN) { input(x, y); triggerEvent(this); } } else { state = OFX_UI_STATE_NORMAL; } stateChange(); } template<typename T> void ofxUISlider_<T>::mouseReleased(int x, int y, int button) { if(hit) { #ifdef OFX_UI_TARGET_TOUCH state = OFX_UI_STATE_NORMAL; #else state = OFX_UI_STATE_OVER; #endif if(triggerType & OFX_UI_TRIGGER_END) { input(x, y); triggerEvent(this); } } else { state = OFX_UI_STATE_NORMAL; } stateChange(); hit = false; } template<typename T> void ofxUISlider_<T>::keyPressed(int key) { if(state == OFX_UI_STATE_OVER || state == OFX_UI_STATE_DOWN) { switch (key) { case OF_KEY_RIGHT: setValue(getScaledValue()+increment); triggerEvent(this); break; case OF_KEY_UP: setValue(getScaledValue()+increment); triggerEvent(this); break; case OF_KEY_LEFT: setValue(getScaledValue()-increment); triggerEvent(this); break; case OF_KEY_DOWN: setValue(getScaledValue()-increment); triggerEvent(this); break; case OF_KEY_SHIFT: #if OF_VERSION_MINOR > 7 case OF_KEY_LEFT_SHIFT: case OF_KEY_RIGHT_SHIFT: #endif bRoundedToNearestInt = true; break; default: break; } } } template<typename T> void ofxUISlider_<T>::keyReleased(int key) { bRoundedToNearestInt = false; } template<typename T> void ofxUISlider_<T>::windowResized(int w, int h) { } template<typename T> T ofxUISlider_<T>::getIncrement() { return increment; } template<typename T> void ofxUISlider_<T>::setIncrement(T _increment) { increment = _increment; } template<typename T> void ofxUISlider_<T>::input(float x, float y) { if(orientation == OFX_UI_ORIENTATION_HORIZONTAL) { value = rect->percentInside(x, y).x; } else { value = 1.0-rect->percentInside(x, y).y; } value = MIN(1.0, MAX(0.0, value)); updateValueRef(); updateLabel(); } template<typename T> void ofxUISlider_<T>::updateValueRef() { (*valueRef) = bRoundedToNearestInt ? ceil(getScaledValue()) : getScaledValue(); } template<typename T> void ofxUISlider_<T>::updateLabel() { valueString = ofxUIToString(getValue(),labelPrecision); if(orientation == OFX_UI_ORIENTATION_HORIZONTAL) { label->setLabel(name + ": " + valueString); } } template<typename T> void ofxUISlider_<T>::stateChange() { switch (state) { case OFX_UI_STATE_NORMAL: { draw_fill_highlight = false; draw_outline_highlight = false; label->unfocus(); } break; case OFX_UI_STATE_OVER: { draw_fill_highlight = false; draw_outline_highlight = true; label->unfocus(); } break; case OFX_UI_STATE_DOWN: { draw_fill_highlight = true; draw_outline_highlight = true; label->focus(); } break; case OFX_UI_STATE_SUSTAINED: { draw_fill_highlight = false; draw_outline_highlight = false; label->unfocus(); } break; default: break; } } template<typename T> void ofxUISlider_<T>::setValue(T _value) { value = ofxUIMap(_value, min, max, 0.0, 1.0, bClampValue); updateValueRef(); updateLabel(); } template<typename T> T ofxUISlider_<T>::getValue() { return (*valueRef); } template<typename T> T ofxUISlider_<T>::getNormalizedValue() { return value; } template<typename T> float ofxUISlider_<T>::getPercentValue() { return value; } template<typename T> T ofxUISlider_<T>::getScaledValue() { return ofxUIMap(value, 0.0, 1.0, min, max, bClampValue); } template<typename T> void ofxUISlider_<T>::setParent(ofxUIWidget *_parent) { parent = _parent; label->getRect()->setY(rect->getHeight()+padding); calculatePaddingRect(); updateValueRef(); updateLabel(); } template<typename T> void ofxUISlider_<T>::setLabelPrecision(int _precision) { labelPrecision = _precision; updateValueRef(); updateLabel(); } template<typename T> void ofxUISlider_<T>::setMax(T _max, bool bKeepValueTheSame) { setMaxAndMin(_max, min, bKeepValueTheSame); } template<typename T> T ofxUISlider_<T>::getMax() { return max; } template<typename T> void ofxUISlider_<T>::setMin(T _min, bool bKeepValueTheSame) { setMaxAndMin(max, _min, bKeepValueTheSame); } template<typename T> T ofxUISlider_<T>::getMin() { return min; } template<typename T> ofxUIVec2f ofxUISlider_<T>::getMaxAndMin() { return ofxUIVec2f(max, min); } template<typename T> void ofxUISlider_<T>::setMaxAndMin(T _max, T _min, bool bKeepValueTheSame) { max = _max; min = _min; if(!bKeepValueTheSame) { value = ofxUIMap(value, 0, 1.0, min, max, bClampValue); value = ofxUIMap(value, min, max, 0.0, 1.0, bClampValue); updateValueRef(); updateLabel(); } } template<typename T> bool ofxUISlider_<T>::isDraggable() { return true; } #ifndef OFX_UI_NO_XML template<typename T> void ofxUISlider_<T>::saveState(ofxXmlSettings *XML) { XML->setValue("Value", getValue(), 0); } template<typename T> void ofxUISlider_<T>::loadState(ofxXmlSettings *XML) { T value = XML->getValue("Value", getValue(), 0); setValue(value); } #endif template class ofxUISlider_<int>; template class ofxUISlider_<float>; template class ofxUISlider_<double>;
; A293552: a(n) is the least integer k such that k/Fibonacci(n) > 1/4. ; 0,1,1,1,1,2,2,4,6,9,14,23,36,59,95,153,247,400,646,1046,1692,2737,4428,7165,11592,18757,30349,49105,79453,128558,208010,336568,544578,881145,1425722,2306867,3732588,6039455,9772043,15811497,25583539,41395036,66978574,108373610,175352184,283725793,459077976,742803769,1201881744,1944685513,3146567257,5091252769,8237820025,13329072794,21566892818,34895965612,56462858430,91358824041,147821682470,239180506511,387002188980,626182695491,1013184884471,1639367579961,2652552464431,4291920044392,6944472508822,11236392553214,18180865062036,29417257615249,47598122677284,77015380292533,124613502969816,201628883262349,326242386232165,527871269494513,854113655726677,1381984925221190,2236098580947866,3618083506169056,5854182087116922,9472265593285977,15326447680402898,24798713273688875,40125160954091772,64923874227780647,105049035181872419,169972909409653065,275021944591525483,444994854001178548,720016798592704030,1165011652593882578,1885028451186586608,3050040103780469185,4935068554967055792,7985108658747524977,12920177213714580768,20905285872462105745,33825463086176686513,54730748958638792257 seq $0,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1. add $0,3 div $0,4
#include <set> #include <stdexcept> #include <unordered_set> #include <vector> #include <arbor/arbexcept.hpp> #include <arbor/cable_cell.hpp> #include <arbor/math.hpp> #include <arbor/morph/mcable_map.hpp> #include <arbor/morph/mprovider.hpp> #include <arbor/morph/morphology.hpp> #include <arbor/util/optional.hpp> #include "fvm_layout.hpp" #include "threading/threading.hpp" #include "util/maputil.hpp" #include "util/meta.hpp" #include "util/partition.hpp" #include "util/piecewise.hpp" #include "util/rangeutil.hpp" #include "util/transform.hpp" namespace arb { using util::append; using util::assign; using util::assign_by; using util::count_along; using util::pw_elements; using util::pw_element; using util::sort; using util::sort_by; using util::value_by_key; namespace { struct get_value { template <typename X> double operator()(const X& x) const { return x.value; } double operator()(double x) const { return x; } }; template <typename V> util::optional<V> operator|(const util::optional<V>& a, const util::optional<V>& b) { return a? a: b; } // Given sorted vectors a, b, return sorted vector with unique elements v // such that v is present in a or b. template <typename V> std::vector<V> unique_union(const std::vector<V>& a, const std::vector<V>& b) { std::vector<V> u; auto ai = a.begin(); auto ae = a.end(); auto bi = b.begin(); auto be = b.end(); while (ai!=ae && bi!=be) { const V& elem = *ai<*bi? *ai++: *bi++; if (u.empty() || u.back()!=elem) { u.push_back(elem); } } while (ai!=ae) { const V& elem = *ai++; if (u.empty() || u.back()!=elem) { u.push_back(elem); } } while (bi!=be) { const V& elem = *bi++; if (u.empty() || u.back()!=elem) { u.push_back(elem); } } return u; } } // anonymous namespace // Convert mcable_map values to a piecewise function over an mcable. // The projection gives the map from the values in the mcable_map to the values in the piecewise function. template <typename T, typename U, typename Proj = get_value> pw_elements<U> pw_over_cable(const mcable_map<T>& mm, mcable cable, U dflt_value, Proj projection = Proj{}) { using value_type = typename mcable_map<T>::value_type; msize_t bid = cable.branch; struct as_branch { msize_t value; as_branch(const value_type& x): value(x.first.branch) {} as_branch(const msize_t& x): value(x) {} }; auto map_on_branch = util::make_range( std::equal_range(mm.begin(), mm.end(), bid, [](as_branch a, as_branch b) { return a.value<b.value; })); if (map_on_branch.empty()) { return pw_elements<U>({cable.prox_pos, cable.dist_pos}, {dflt_value}); } pw_elements<U> pw; for (const auto& el: map_on_branch) { double pw_right = pw.empty()? 0: pw.bounds().second; if (el.first.prox_pos>pw_right) { pw.push_back(pw_right, el.first.prox_pos, dflt_value); } pw.push_back(el.first.prox_pos, el.first.dist_pos, projection(el.second)); } double pw_right = pw.empty()? 0: pw.bounds().second; if (pw_right<1.) { pw.push_back(pw_right, 1., dflt_value); } if (cable.prox_pos!=0 || cable.dist_pos!=1) { pw = zip(pw, pw_elements<>({cable.prox_pos, cable.dist_pos})); } return pw; } // Construct cv_geometry for cell from locset describing CV boundary points. cv_geometry cv_geometry_from_ends(const cable_cell& cell, const locset& lset) { struct mloc_hash { std::size_t operator()(const mlocation& loc) const { return loc.branch ^ std::hash<double>()(loc.pos); } }; using mlocation_map = std::unordered_map<mlocation, fvm_size_type, mloc_hash>; auto pop = [](auto& vec) { auto h = vec.back(); return vec.pop_back(), h; }; cv_geometry geom; const auto& mp = cell.provider(); const auto& m = mp.morphology(); if (mp.morphology().empty()) { geom.cell_cv_divs = {0, 0}; return geom; } auto canon = [&m](mlocation loc) { return canonical(m, loc); }; auto origin = [&canon](mcable cab) { return canon(mlocation{cab.branch, cab.prox_pos}); }; auto terminus = [&canon](mcable cab) { return canon(mlocation{cab.branch, cab.dist_pos}); }; mlocation_list locs = thingify(lset, mp); std::vector<msize_t> n_cv_cables; std::vector<mlocation> next_cv_head; next_cv_head.push_back({mnpos, 0}); mcable_list cables, all_cables; std::vector<msize_t> branches; mlocation_map head_count; unsigned extra_cv_count = 0; while (!next_cv_head.empty()) { mlocation h = pop(next_cv_head); cables.clear(); branches.clear(); branches.push_back(h.branch); while (!branches.empty()) { msize_t b = pop(branches); // Find most proximal point in locs on this branch, strictly more distal than h. auto it = locs.end(); if (b!=mnpos && b==h.branch) { it = std::upper_bound(locs.begin(), locs.end(), h); } else if (b!=mnpos) { it = std::lower_bound(locs.begin(), locs.end(), mlocation{b, 0}); } // If found, use as an end point, and stop descent. // Otherwise, recurse over child branches. if (it!=locs.end() && it->branch==b) { cables.push_back({b, b==h.branch? h.pos: 0, it->pos}); next_cv_head.push_back(*it); } else { if (b!=mnpos) { cables.push_back({b, b==h.branch? h.pos: 0, 1}); } for (auto& c: m.branch_children(b)) { branches.push_back(c); } } } auto empty_cable = [](mcable c) { return c.prox_pos==c.dist_pos; }; cables.erase(std::remove_if(cables.begin(), cables.end(), empty_cable), cables.end()); if (!cables.empty()) { if (++head_count[origin(cables.front())]==2) { ++extra_cv_count; } n_cv_cables.push_back(cables.size()); sort(cables); append(all_cables, std::move(cables)); } } geom.cv_cables.reserve(all_cables.size()+extra_cv_count); geom.cv_parent.reserve(n_cv_cables.size()+extra_cv_count); geom.cv_cables_divs.reserve(n_cv_cables.size()+extra_cv_count+1); geom.cv_cables_divs.push_back(0); mlocation_map parent_map; unsigned all_cables_index = 0; unsigned cv_index = 0; // Multiple CVs meeting at (0,0)? mlocation root{0, 0}; unsigned n_top_children = value_by_key(head_count, root).value_or(0); if (n_top_children>1) { // Add initial trical CV. geom.cv_parent.push_back(mnpos); geom.cv_cables.push_back(mcable{0, 0, 0}); geom.cv_cables_divs.push_back(geom.cv_cables.size()); parent_map[root] = cv_index++; } for (auto n_cables: n_cv_cables) { mlocation head = origin(all_cables[all_cables_index]); msize_t parent_cv = value_by_key(parent_map, head).value_or(mnpos); auto cables = util::subrange_view(all_cables, all_cables_index, all_cables_index+n_cables); std::copy(cables.begin(), cables.end(), std::back_inserter(geom.cv_cables)); geom.cv_parent.push_back(parent_cv); geom.cv_cables_divs.push_back(geom.cv_cables.size()); auto this_cv = cv_index++; for (auto cable: cables) { mlocation term = terminus(cable); unsigned n_children = value_by_key(head_count, term).value_or(0); if (n_children>1) { // Add trivial CV for lindep. geom.cv_parent.push_back(this_cv); geom.cv_cables.push_back(mcable{cable.branch, 1., 1.}); geom.cv_cables_divs.push_back((fvm_index_type)geom.cv_cables.size()); parent_map[term] = cv_index++; } else { parent_map[term] = this_cv; } } all_cables_index += n_cables; } // Fill cv/cell mapping for single cell (index 0). geom.cv_to_cell.assign(cv_index, 0); geom.cell_cv_divs = {0, (fvm_index_type)cv_index}; // Build location query map. geom.branch_cv_map.resize(1); std::vector<pw_elements<fvm_size_type>>& bmap = geom.branch_cv_map.back(); for (auto cv: util::make_span(geom.size())) { for (auto cable: geom.cables(cv)) { if (cable.branch>=bmap.size()) { bmap.resize(cable.branch+1); } // Ordering of CV ensures CV cables on any given branch are found sequentially. // Omit empty cables. if (cable.prox_pos<cable.dist_pos) { bmap[cable.branch].push_back(cable.prox_pos, cable.dist_pos, cv); } } } return geom; } namespace impl { using std::begin; using std::end; using std::next; template <typename Seq> auto tail(Seq& seq) { return util::make_range(next(begin(seq)), end(seq)); }; template <typename Container, typename Offset, typename Seq> void append_offset(Container& ctr, Offset offset, const Seq& rhs) { for (const auto& x: rhs) { // Preserve -1 'npos' values. ctr.push_back(x+1==0? x: offset+x); } } } // Merge CV geometry lists in-place. cv_geometry& append(cv_geometry& geom, const cv_geometry& right) { using impl::tail; using impl::append_offset; if (!right.n_cell()) { return geom; } if (!geom.n_cell()) { geom = right; return geom; } auto append_divs = [](auto& left, const auto& right) { if (left.empty()) { left = right; } else if (!right.empty()) { append_offset(left, left.back(), tail(right)); } }; auto geom_n_cv = geom.size(); auto geom_n_cell = geom.n_cell(); append(geom.cv_cables, right.cv_cables); append_divs(geom.cv_cables_divs, right.cv_cables_divs); append_offset(geom.cv_parent, geom_n_cv, right.cv_parent); append_offset(geom.cv_to_cell, geom_n_cell, right.cv_to_cell); append_divs(geom.cell_cv_divs, right.cell_cv_divs); append(geom.branch_cv_map, right.branch_cv_map); return geom; } // Combine two fvm_cv_geometry groups in-place. fvm_cv_discretization& append(fvm_cv_discretization& dczn, const fvm_cv_discretization& right) { append(dczn.geometry, right.geometry); append(dczn.face_conductance, right.face_conductance); append(dczn.cv_area, right.cv_area); append(dczn.cv_capacitance, right.cv_capacitance); append(dczn.init_membrane_potential, right.init_membrane_potential); append(dczn.temperature_K, right.temperature_K); append(dczn.diam_um, right.diam_um); return dczn; } fvm_cv_discretization fvm_cv_discretize(const cable_cell& cell, const cable_cell_parameter_set& global_dflt) { const auto& dflt = cell.default_parameters; fvm_cv_discretization D; D.geometry = cv_geometry_from_ends(cell, dflt.discretization? dflt.discretization->cv_boundary_points(cell): global_dflt.discretization? global_dflt.discretization->cv_boundary_points(cell): default_cv_policy().cv_boundary_points(cell)); if (D.geometry.empty()) return D; auto n_cv = D.geometry.size(); D.face_conductance.resize(n_cv); D.cv_area.resize(n_cv); D.cv_capacitance.resize(n_cv); D.init_membrane_potential.resize(n_cv); D.temperature_K.resize(n_cv); D.diam_um.resize(n_cv); double dflt_resistivity = *(dflt.axial_resistivity | global_dflt.axial_resistivity); double dflt_capacitance = *(dflt.membrane_capacitance | global_dflt.membrane_capacitance); double dflt_potential = *(dflt.init_membrane_potential | global_dflt.init_membrane_potential); double dflt_temperature = *(dflt.temperature_K | global_dflt.temperature_K); const auto& embedding = cell.embedding(); for (auto i: count_along(D.geometry.cv_parent)) { auto cv_cables = D.geometry.cables(i); // Computing face_conductance: // // Flux between adjacemt CVs is computed as if there were no membrane currents, and with the CV voltage // values taken to be exact at a reference point in each CV: // * If the CV is unbranched, the reference point is taken to be the CV midpoint. // * If the CV is branched, the reference point is taken to be closest branch point to // the interface between the two CVs. D.face_conductance[i] = 0; fvm_index_type p = D.geometry.cv_parent[i]; if (p!=-1) { auto parent_cables = D.geometry.cables(p); msize_t bid = cv_cables.front().branch; double parent_refpt = 0; double cv_refpt = 1; if (cv_cables.size()==1) { mcable cv_cable = cv_cables.front(); cv_refpt = 0.5*(cv_cable.prox_pos+cv_cable.dist_pos); } if (parent_cables.size()==1) { mcable parent_cable = parent_cables.front(); // A trivial parent CV with a zero-length cable might not // be on the same branch. if (parent_cable.branch==bid) { parent_refpt = 0.5*(parent_cable.prox_pos+parent_cable.dist_pos); } } mcable span{bid, parent_refpt, cv_refpt}; double resistance = embedding.integrate_ixa(bid, pw_over_cable(cell.region_assignments().get<axial_resistivity>(), span, dflt_resistivity)); D.face_conductance[i] = 100/resistance; // 100 scales to µS. } D.cv_area[i] = 0; D.cv_capacitance[i] = 0; D.init_membrane_potential[i] = 0; D.diam_um[i] = 0; double cv_length = 0; for (mcable c: cv_cables) { D.cv_area[i] += embedding.integrate_area(c); D.cv_capacitance[i] += embedding.integrate_area(c.branch, pw_over_cable(cell.region_assignments().get<membrane_capacitance>(), c, dflt_capacitance)); D.init_membrane_potential[i] += embedding.integrate_area(c.branch, pw_over_cable(cell.region_assignments().get<init_membrane_potential>(), c, dflt_potential)); D.temperature_K[i] += embedding.integrate_area(c.branch, pw_over_cable(cell.region_assignments().get<temperature_K>(), c, dflt_temperature)); cv_length += embedding.integrate_length(c); } if (D.cv_area[i]>0) { D.init_membrane_potential[i] /= D.cv_area[i]; D.temperature_K[i] /= D.cv_area[i]; } if (cv_length>0) { D.diam_um[i] = D.cv_area[i]/(cv_length*math::pi<double>); } } return D; } fvm_cv_discretization fvm_cv_discretize(const std::vector<cable_cell>& cells, const cable_cell_parameter_set& global_defaults, const arb::execution_context& ctx) { std::vector<fvm_cv_discretization> cell_disc(cells.size()); threading::parallel_for::apply(0, cells.size(), ctx.thread_pool.get(), [&] (int i) { cell_disc[i]=fvm_cv_discretize(cells[i], global_defaults);}); fvm_cv_discretization combined; for (auto cell_idx: count_along(cells)) { append(combined, cell_disc[cell_idx]); } return combined; } // CVs are absolute (taken from combined discretization) so do not need to be shifted. // Only target numbers need to be shifted. fvm_mechanism_data& append(fvm_mechanism_data& left, const fvm_mechanism_data& right) { using impl::append_offset; fvm_size_type target_offset = left.n_target; for (const auto& kv: right.ions) { fvm_ion_config& L = left.ions[kv.first]; const fvm_ion_config& R = kv.second; append(L.cv, R.cv); append(L.init_iconc, R.init_iconc); append(L.init_econc, R.init_econc); append(L.reset_iconc, R.reset_iconc); append(L.reset_econc, R.reset_econc); append(L.init_revpot, R.init_revpot); } for (const auto& kv: right.mechanisms) { if (!left.mechanisms.count(kv.first)) { fvm_mechanism_config& L = left.mechanisms[kv.first]; L = kv.second; for (auto& t: L.target) t += target_offset; } else { fvm_mechanism_config& L = left.mechanisms[kv.first]; const fvm_mechanism_config& R = kv.second; L.kind = R.kind; append(L.cv, R.cv); append(L.multiplicity, R.multiplicity); append(L.norm_area, R.norm_area); append_offset(L.target, target_offset, R.target); arb_assert(util::is_sorted_by(L.param_values, util::first)); arb_assert(util::is_sorted_by(R.param_values, util::first)); arb_assert(L.param_values.size()==R.param_values.size()); for (auto j: count_along(R.param_values)) { arb_assert(L.param_values[j].first==R.param_values[j].first); append(L.param_values[j].second, R.param_values[j].second); } } } left.n_target += right.n_target; return left; } fvm_mechanism_data fvm_build_mechanism_data(const cable_cell_global_properties& gprop, const cable_cell& cell, const fvm_cv_discretization& D, fvm_size_type cell_idx); fvm_mechanism_data fvm_build_mechanism_data(const cable_cell_global_properties& gprop, const std::vector<cable_cell>& cells, const fvm_cv_discretization& D, const execution_context& ctx) { std::vector<fvm_mechanism_data> cell_mech(cells.size()); threading::parallel_for::apply(0, cells.size(), ctx.thread_pool.get(), [&] (int i) { cell_mech[i]=fvm_build_mechanism_data(gprop, cells[i], D, i);}); fvm_mechanism_data combined; for (auto cell_idx: count_along(cells)) { append(combined, cell_mech[cell_idx]); } return combined; } fvm_mechanism_data fvm_build_mechanism_data(const cable_cell_global_properties& gprop, const cable_cell& cell, const fvm_cv_discretization& D, fvm_size_type cell_idx) { using size_type = fvm_size_type; using index_type = fvm_index_type; using value_type = fvm_value_type; const mechanism_catalogue& catalogue = *gprop.catalogue; const auto& embedding = cell.embedding(); const auto& global_dflt = gprop.default_parameters; const auto& dflt = cell.default_parameters; fvm_mechanism_data M; // Verify mechanism ion usage, parameter values. auto verify_mechanism = [&gprop](const mechanism_info& info, const mechanism_desc& desc) { const auto& global_ions = gprop.ion_species; for (const auto& pv: desc.values()) { if (!info.parameters.count(pv.first)) { throw no_such_parameter(desc.name(), pv.first); } if (!info.parameters.at(pv.first).valid(pv.second)) { throw invalid_parameter_value(desc.name(), pv.first, pv.second); } } for (const auto& ion: info.ions) { const auto& ion_name = ion.first; const auto& ion_dep = ion.second; if (!global_ions.count(ion_name)) { throw cable_cell_error( "mechanism "+desc.name()+" uses ion "+ion_name+ " which is missing in global properties"); } if (ion_dep.verify_ion_charge) { if (ion_dep.expected_ion_charge!=global_ions.at(ion_name)) { throw cable_cell_error( "mechanism "+desc.name()+" uses ion "+ion_name+ " expecting a different valence"); } } if (ion_dep.write_reversal_potential && (ion_dep.write_concentration_int || ion_dep.write_concentration_ext)) { throw cable_cell_error("mechanism "+desc.name()+" writes both reversal potential and concentration"); } } }; // Track ion usage of mechanisms so that ions are only instantiated where required. std::unordered_map<std::string, std::vector<index_type>> ion_support; auto update_ion_support = [&ion_support](const mechanism_info& info, const std::vector<index_type>& cvs) { arb_assert(util::is_sorted(cvs)); for (const auto& ion: util::keys(info.ions)) { auto& support = ion_support[ion]; support = unique_union(support, cvs); } }; std::unordered_map<std::string, mcable_map<double>> init_iconc_mask; std::unordered_map<std::string, mcable_map<double>> init_econc_mask; // Density mechanisms: for (const auto& entry: cell.region_assignments().get<mechanism_desc>()) { const std::string& name = entry.first; mechanism_info info = catalogue[name]; std::vector<double> param_dflt; fvm_mechanism_config config; config.kind = mechanismKind::density; std::vector<std::string> param_names; assign(param_names, util::keys(info.parameters)); sort(param_names); for (auto& p: param_names) { config.param_values.emplace_back(p, std::vector<value_type>{}); param_dflt.push_back(info.parameters.at(p).default_value); } mcable_map<double> support; std::vector<mcable_map<double>> param_maps; { std::unordered_map<std::string, mcable_map<double>> keyed_param_maps; for (auto& on_cable: entry.second) { verify_mechanism(info, on_cable.second); mcable cable = on_cable.first; support.insert(cable, 1.); for (auto param_assign: on_cable.second.values()) { keyed_param_maps[param_assign.first].insert(cable, param_assign.second); } } for (auto& p: param_names) { param_maps.push_back(std::move(keyed_param_maps[p])); } } std::vector<double> param_on_cv(config.param_values.size()); for (auto cv: D.geometry.cell_cvs(cell_idx)) { double area = 0; util::fill(param_on_cv, 0.); for (mcable c: D.geometry.cables(cv)) { double area_on_cable = embedding.integrate_area(c.branch, pw_over_cable(support, c, 0.)); if (!area_on_cable) continue; area += area_on_cable; for (auto i: count_along(param_on_cv)) { param_on_cv[i] += embedding.integrate_area(c.branch, pw_over_cable(param_maps[i], c, param_dflt[i])); } } if (area>0) { double oo_cv_area = 1./D.cv_area[cv]; config.cv.push_back(cv); config.norm_area.push_back(area*oo_cv_area); for (auto i: count_along(param_on_cv)) { config.param_values[i].second.push_back(param_on_cv[i]*oo_cv_area); } } } for (const auto& iondep: info.ions) { if (iondep.second.write_concentration_int) { for (auto c: support) { bool ok = init_iconc_mask[iondep.first].insert(c.first, 0.); if (!ok) { throw cable_cell_error("overlapping ion concentration writing mechanism "+name); } } } if (iondep.second.write_concentration_ext) { for (auto c: support) { bool ok = init_econc_mask[iondep.first].insert(c.first, 0.); if (!ok) { throw cable_cell_error("overlapping ion concentration writing mechanism "+name); } } } } update_ion_support(info, config.cv); M.mechanisms[name] = std::move(config); } // Synapses: struct synapse_instance { size_type cv; std::map<std::string, double> param_value; // uses ordering of std::map size_type target_index; }; for (const auto& entry: cell.synapses()) { const std::string& name = entry.first; mechanism_info info = catalogue[name]; std::map<std::string, double> default_param_value; std::vector<synapse_instance> sl; for (const auto& kv: info.parameters) { default_param_value[kv.first] = kv.second.default_value; } for (const placed<mechanism_desc>& pm: entry.second) { verify_mechanism(info, pm.item); synapse_instance in; in.param_value = default_param_value; for (const auto& kv: pm.item.values()) { in.param_value.at(kv.first) = kv.second; } in.target_index = pm.lid; in.cv = D.geometry.location_cv(cell_idx, pm.loc); sl.push_back(std::move(in)); } // Permute synapse instances so that they are in increasing order // (lexicographically) by CV, param_value set, and target, so that // instances in the same CV with the same parameter values are adjacent. // cv_order[i] is the index of the ith instance by this ordering. std::vector<size_type> cv_order; assign(cv_order, count_along(sl)); sort_by(cv_order, [&](size_type i) { return std::tie(sl[i].cv, sl[i].param_value, sl[i].target_index); }); bool coalesce = catalogue[name].linear && gprop.coalesce_synapses; fvm_mechanism_config config; config.kind = mechanismKind::point; for (auto& pentry: default_param_value) { config.param_values.emplace_back(pentry.first, std::vector<value_type>{}); } const synapse_instance* prev = nullptr; for (auto i: cv_order) { const auto& in = sl[i]; if (coalesce && prev && prev->cv==in.cv && prev->param_value==in.param_value) { ++config.multiplicity.back(); } else { config.cv.push_back(in.cv); if (coalesce) { config.multiplicity.push_back(1); } unsigned j = 0; for (auto& pentry: in.param_value) { arb_assert(config.param_values[j].first==pentry.first); config.param_values[j++].second.push_back(pentry.second); } } config.target.push_back(in.target_index); prev = &in; } // If synapse uses an ion, add to ion support. update_ion_support(info, config.cv); M.n_target += config.target.size(); M.mechanisms[name] = std::move(config); } // Stimuli: if (!cell.stimuli().empty()) { const auto& stimuli = cell.stimuli(); std::vector<size_type> stimuli_cv; assign_by(stimuli_cv, stimuli, [&D, cell_idx](auto& p) { return D.geometry.location_cv(cell_idx, p.loc); }); std::vector<size_type> cv_order; assign(cv_order, count_along(stimuli)); sort_by(cv_order, [&](size_type i) { return stimuli_cv[i]; }); fvm_mechanism_config config; config.kind = mechanismKind::point; // (param_values entries must be ordered by parameter name) config.param_values = {{"amplitude", {}}, {"delay", {}}, {"duration", {}}}; for (auto i: cv_order) { config.cv.push_back(stimuli_cv[i]); config.param_values[0].second.push_back(stimuli[i].item.amplitude); config.param_values[1].second.push_back(stimuli[i].item.delay); config.param_values[2].second.push_back(stimuli[i].item.duration); } M.mechanisms["_builtin_stimulus"] = std::move(config); } // Ions: auto initial_ion_data_map = cell.region_assignments().get<initial_ion_data>(); for (const auto& ion_cvs: ion_support) { const std::string& ion = ion_cvs.first; fvm_ion_config config; config.cv = ion_cvs.second; auto n_cv = config.cv.size(); config.init_iconc.resize(n_cv); config.init_econc.resize(n_cv); config.reset_iconc.resize(n_cv); config.reset_econc.resize(n_cv); config.init_revpot.resize(n_cv); cable_cell_ion_data ion_data = *(value_by_key(dflt.ion_data, ion) | value_by_key(global_dflt.ion_data, ion)); double dflt_iconc = ion_data.init_int_concentration; double dflt_econc = ion_data.init_ext_concentration; double dflt_rvpot = ion_data.init_reversal_potential; const mcable_map<initial_ion_data>& ion_on_cable = initial_ion_data_map[ion]; auto pw_times = [](const pw_elements<double>& a, const pw_elements<double>& b) { return zip(a, b, [](double left, double right, pw_element<double> a, pw_element<double> b) { return a.second*b.second; }); }; for (auto i: count_along(config.cv)) { auto cv = config.cv[i]; if (D.cv_area[cv]==0) continue; for (mcable c: D.geometry.cables(cv)) { auto iconc = pw_over_cable(ion_on_cable, c, dflt_iconc, [](auto x) { return x.initial.init_int_concentration; }); auto econc = pw_over_cable(ion_on_cable, c, dflt_econc, [](auto x) { return x.initial.init_ext_concentration; }); auto rvpot = pw_over_cable(ion_on_cable, c, dflt_rvpot, [](auto x) { return x.initial.init_reversal_potential; }); config.reset_iconc[i] += embedding.integrate_area(c.branch, iconc); config.reset_econc[i] += embedding.integrate_area(c.branch, econc); config.init_revpot[i] += embedding.integrate_area(c.branch, rvpot); auto iconc_masked = pw_times(pw_over_cable(init_iconc_mask[ion], c, 1.), iconc); auto econc_masked = pw_times(pw_over_cable(init_econc_mask[ion], c, 1.), econc); config.init_iconc[i] += embedding.integrate_area(c.branch, iconc_masked); config.init_econc[i] += embedding.integrate_area(c.branch, econc_masked); } double oo_cv_area = 1./D.cv_area[cv]; config.reset_iconc[i] *= oo_cv_area; config.reset_econc[i] *= oo_cv_area; config.init_revpot[i] *= oo_cv_area; config.init_iconc[i] *= oo_cv_area; config.init_econc[i] *= oo_cv_area; } M.ions[ion] = std::move(config); } std::unordered_map<std::string, mechanism_desc> revpot_tbl; std::unordered_set<std::string> revpot_specified; for (const auto& ion: util::keys(gprop.ion_species)) { if (auto maybe_revpot = value_by_key(dflt.reversal_potential_method, ion) | value_by_key(global_dflt.reversal_potential_method, ion)) { const mechanism_desc& revpot = *maybe_revpot; mechanism_info info = catalogue[revpot.name()]; verify_mechanism(info, revpot); revpot_specified.insert(ion); bool writes_this_revpot = false; for (auto& iondep: info.ions) { if (iondep.second.write_reversal_potential) { if (revpot_tbl.count(iondep.first)) { auto& existing_revpot_desc = revpot_tbl.at(iondep.first); if (existing_revpot_desc.name() != revpot.name() || existing_revpot_desc.values() != revpot.values()) { throw cable_cell_error("inconsistent revpot ion assignment for mechanism "+revpot.name()); } } else { revpot_tbl[iondep.first] = revpot; } writes_this_revpot |= iondep.first==ion; } } if (!writes_this_revpot) { throw cable_cell_error("revpot mechanism for ion "+ion+" does not write this reversal potential"); } // Only instantiate if the ion is used. if (M.ions.count(ion)) { // Revpot mechanism already configured? Add cvs for this ion too. if (M.mechanisms.count(revpot.name())) { fvm_mechanism_config& config = M.mechanisms[revpot.name()]; config.cv = unique_union(config.cv, M.ions[ion].cv); config.norm_area.assign(config.cv.size(), 1.); for (auto& pv: config.param_values) { pv.second.assign(config.cv.size(), pv.second.front()); } } else { fvm_mechanism_config config; config.kind = mechanismKind::revpot; config.cv = M.ions[ion].cv; config.norm_area.assign(config.cv.size(), 1.); std::map<std::string, double> param_value; // uses ordering of std::map for (const auto& kv: info.parameters) { param_value[kv.first] = kv.second.default_value; } for (auto& kv: revpot.values()) { param_value[kv.first] = kv.second; } for (auto& kv: param_value) { config.param_values.emplace_back(kv.first, std::vector<value_type>(config.cv.size(), kv.second)); } M.mechanisms[revpot.name()] = std::move(config); } } } } // Confirm that all ions written to by a revpot have a corresponding entry in a reversal_potential_method table. for (auto& kv: revpot_tbl) { if (!revpot_specified.count(kv.first)) { throw cable_cell_error("revpot mechanism "+kv.second.name()+" also writes to ion "+kv.first); } } return M; } } // namespace arb
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.24.28117.0 TITLE C:\Users\libit\source\repos\L019\L019\L019.cpp .686P .XMM include listing.inc .model flat INCLUDELIB LIBCMT INCLUDELIB OLDNAMES PUBLIC ___local_stdio_printf_options PUBLIC __vfprintf_l PUBLIC _printf PUBLIC ?f_singed@@YAXHH@Z ; f_singed PUBLIC ?f_unsinged@@YAXII@Z ; f_unsinged PUBLIC _main PUBLIC ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA ; `__local_stdio_printf_options'::`2'::_OptionsStorage PUBLIC ??_C@_04DMMHCOEJ@a?$DOb?6@ ; `string' PUBLIC ??_C@_05GHNJCJCM@a?$DN?$DNb?6@ ; `string' PUBLIC ??_C@_04JGMOOGMC@a?$DMb?6@ ; `string' PUBLIC ??_C@_0O@NFOCKKMG@Hello?5World?$CB?6@ ; `string' EXTRN ___acrt_iob_func:PROC EXTRN ___stdio_common_vfprintf:PROC ; COMDAT ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA _BSS SEGMENT ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA DQ 01H DUP (?) ; `__local_stdio_printf_options'::`2'::_OptionsStorage _BSS ENDS ; COMDAT ??_C@_0O@NFOCKKMG@Hello?5World?$CB?6@ CONST SEGMENT ??_C@_0O@NFOCKKMG@Hello?5World?$CB?6@ DB 'Hello World!', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_04JGMOOGMC@a?$DMb?6@ CONST SEGMENT ??_C@_04JGMOOGMC@a?$DMb?6@ DB 'a<b', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_05GHNJCJCM@a?$DN?$DNb?6@ CONST SEGMENT ??_C@_05GHNJCJCM@a?$DN?$DNb?6@ DB 'a==b', 0aH, 00H ; `string' CONST ENDS ; COMDAT ??_C@_04DMMHCOEJ@a?$DOb?6@ CONST SEGMENT ??_C@_04DMMHCOEJ@a?$DOb?6@ DB 'a>b', 0aH, 00H ; `string' CONST ENDS ; Function compile flags: /Odtp /ZI ; COMDAT _main _TEXT SEGMENT _main PROC ; COMDAT ; File C:\Users\libit\source\repos\L019\L019\L019.cpp ; Line 20 push ebp mov ebp, esp sub esp, 64 ; 00000040H push ebx push esi push edi ; Line 21 push OFFSET ??_C@_0O@NFOCKKMG@Hello?5World?$CB?6@ call _printf add esp, 4 ; Line 22 push 2 push 1 call ?f_singed@@YAXHH@Z ; f_singed add esp, 8 ; Line 23 push 2 push 1 call ?f_unsinged@@YAXII@Z ; f_unsinged add esp, 8 ; Line 24 xor eax, eax pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 _main ENDP _TEXT ENDS ; Function compile flags: /Odtp /ZI ; COMDAT ?f_unsinged@@YAXII@Z _TEXT SEGMENT _a$ = 8 ; size = 4 _b$ = 12 ; size = 4 ?f_unsinged@@YAXII@Z PROC ; f_unsinged, COMDAT ; File C:\Users\libit\source\repos\L019\L019\L019.cpp ; Line 14 push ebp mov ebp, esp sub esp, 64 ; 00000040H push ebx push esi push edi ; Line 15 mov eax, DWORD PTR _a$[ebp] cmp eax, DWORD PTR _b$[ebp] jbe SHORT $LN2@f_unsinged push OFFSET ??_C@_04DMMHCOEJ@a?$DOb?6@ call _printf add esp, 4 $LN2@f_unsinged: ; Line 16 mov eax, DWORD PTR _a$[ebp] cmp eax, DWORD PTR _b$[ebp] jne SHORT $LN3@f_unsinged push OFFSET ??_C@_05GHNJCJCM@a?$DN?$DNb?6@ call _printf add esp, 4 $LN3@f_unsinged: ; Line 17 mov eax, DWORD PTR _a$[ebp] cmp eax, DWORD PTR _b$[ebp] jae SHORT $LN1@f_unsinged push OFFSET ??_C@_04JGMOOGMC@a?$DMb?6@ call _printf add esp, 4 $LN1@f_unsinged: ; Line 18 pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 ?f_unsinged@@YAXII@Z ENDP ; f_unsinged _TEXT ENDS ; Function compile flags: /Odtp /ZI ; COMDAT ?f_singed@@YAXHH@Z _TEXT SEGMENT _a$ = 8 ; size = 4 _b$ = 12 ; size = 4 ?f_singed@@YAXHH@Z PROC ; f_singed, COMDAT ; File C:\Users\libit\source\repos\L019\L019\L019.cpp ; Line 7 push ebp mov ebp, esp sub esp, 64 ; 00000040H push ebx push esi push edi ; Line 8 mov eax, DWORD PTR _a$[ebp] cmp eax, DWORD PTR _b$[ebp] jle SHORT $LN2@f_singed push OFFSET ??_C@_04DMMHCOEJ@a?$DOb?6@ call _printf add esp, 4 $LN2@f_singed: ; Line 9 mov eax, DWORD PTR _a$[ebp] cmp eax, DWORD PTR _b$[ebp] jne SHORT $LN3@f_singed push OFFSET ??_C@_05GHNJCJCM@a?$DN?$DNb?6@ call _printf add esp, 4 $LN3@f_singed: ; Line 10 mov eax, DWORD PTR _a$[ebp] cmp eax, DWORD PTR _b$[ebp] jge SHORT $LN1@f_singed push OFFSET ??_C@_04JGMOOGMC@a?$DMb?6@ call _printf add esp, 4 $LN1@f_singed: ; Line 11 pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 ?f_singed@@YAXHH@Z ENDP ; f_singed _TEXT ENDS ; Function compile flags: /Odtp /ZI ; COMDAT _printf _TEXT SEGMENT __ArgList$ = -8 ; size = 4 __Result$ = -4 ; size = 4 __Format$ = 8 ; size = 4 _printf PROC ; COMDAT ; File C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h ; Line 954 push ebp mov ebp, esp sub esp, 76 ; 0000004cH push ebx push esi push edi ; Line 957 lea eax, DWORD PTR __Format$[ebp+4] mov DWORD PTR __ArgList$[ebp], eax ; Line 958 mov eax, DWORD PTR __ArgList$[ebp] push eax push 0 mov ecx, DWORD PTR __Format$[ebp] push ecx push 1 call ___acrt_iob_func add esp, 4 push eax call __vfprintf_l add esp, 16 ; 00000010H mov DWORD PTR __Result$[ebp], eax ; Line 959 mov DWORD PTR __ArgList$[ebp], 0 ; Line 960 mov eax, DWORD PTR __Result$[ebp] ; Line 961 pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 _printf ENDP _TEXT ENDS ; Function compile flags: /Odtp /ZI ; COMDAT __vfprintf_l _TEXT SEGMENT __Stream$ = 8 ; size = 4 __Format$ = 12 ; size = 4 __Locale$ = 16 ; size = 4 __ArgList$ = 20 ; size = 4 __vfprintf_l PROC ; COMDAT ; File C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h ; Line 642 push ebp mov ebp, esp sub esp, 64 ; 00000040H push ebx push esi push edi ; Line 643 mov eax, DWORD PTR __ArgList$[ebp] push eax mov ecx, DWORD PTR __Locale$[ebp] push ecx mov edx, DWORD PTR __Format$[ebp] push edx mov eax, DWORD PTR __Stream$[ebp] push eax call ___local_stdio_printf_options mov ecx, DWORD PTR [eax+4] push ecx mov edx, DWORD PTR [eax] push edx call ___stdio_common_vfprintf add esp, 24 ; 00000018H ; Line 644 pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 __vfprintf_l ENDP _TEXT ENDS ; Function compile flags: /Odtp /ZI ; COMDAT ___local_stdio_printf_options _TEXT SEGMENT ___local_stdio_printf_options PROC ; COMDAT ; File C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h ; Line 86 push ebp mov ebp, esp sub esp, 64 ; 00000040H push ebx push esi push edi ; Line 88 mov eax, OFFSET ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA ; `__local_stdio_printf_options'::`2'::_OptionsStorage ; Line 89 pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 ___local_stdio_printf_options ENDP _TEXT ENDS END
INCLUDE "config_private.inc" SECTION code_clib SECTION code_l_sdcc PUBLIC __mullong EXTERN l_mulu_32_32x32 __mullong: ; multiply two 32-bit multiplicands into a 32-bit product ; ; enter : stack = multiplicand (32-bit), multiplicand (32-bit), ret ; ; exit : dehl = product pop af exx pop hl pop de ; dehl = multiplicand exx pop hl pop de ; dehl = multiplicand push de push hl push de push hl push af IF (__CLIB_OPT_IMATH <= 50) || (__SDCC_IY) jp l_mulu_32_32x32 ENDIF IF (__CLIB_OPT_IMATH > 50) && (__SDCC_IX) push ix call l_mulu_32_32x32 pop ix ret ENDIF
;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 3.9.1 #11310 (Linux) ;-------------------------------------------------------- ; Processed by Z88DK ;-------------------------------------------------------- EXTERN __divschar EXTERN __divschar_callee EXTERN __divsint EXTERN __divsint_callee EXTERN __divslong EXTERN __divslong_callee EXTERN __divslonglong EXTERN __divslonglong_callee EXTERN __divsuchar EXTERN __divsuchar_callee EXTERN __divuchar EXTERN __divuchar_callee EXTERN __divuint EXTERN __divuint_callee EXTERN __divulong EXTERN __divulong_callee EXTERN __divulonglong EXTERN __divulonglong_callee EXTERN __divuschar EXTERN __divuschar_callee EXTERN __modschar EXTERN __modschar_callee EXTERN __modsint EXTERN __modsint_callee EXTERN __modslong EXTERN __modslong_callee EXTERN __modslonglong EXTERN __modslonglong_callee EXTERN __modsuchar EXTERN __modsuchar_callee EXTERN __moduchar EXTERN __moduchar_callee EXTERN __moduint EXTERN __moduint_callee EXTERN __modulong EXTERN __modulong_callee EXTERN __modulonglong EXTERN __modulonglong_callee EXTERN __moduschar EXTERN __moduschar_callee EXTERN __mulint EXTERN __mulint_callee EXTERN __mullong EXTERN __mullong_callee EXTERN __mullonglong EXTERN __mullonglong_callee EXTERN __mulschar EXTERN __mulschar_callee EXTERN __mulsuchar EXTERN __mulsuchar_callee EXTERN __muluschar EXTERN __muluschar_callee EXTERN __rlslonglong EXTERN __rlslonglong_callee EXTERN __rlulonglong EXTERN __rlulonglong_callee EXTERN __rrslonglong EXTERN __rrslonglong_callee EXTERN __rrulonglong EXTERN __rrulonglong_callee EXTERN ___sdcc_call_hl EXTERN ___sdcc_call_iy EXTERN ___sdcc_enter_ix EXTERN _banked_call EXTERN _banked_ret EXTERN ___fs2schar EXTERN ___fs2schar_callee EXTERN ___fs2sint EXTERN ___fs2sint_callee EXTERN ___fs2slong EXTERN ___fs2slong_callee EXTERN ___fs2slonglong EXTERN ___fs2slonglong_callee EXTERN ___fs2uchar EXTERN ___fs2uchar_callee EXTERN ___fs2uint EXTERN ___fs2uint_callee EXTERN ___fs2ulong EXTERN ___fs2ulong_callee EXTERN ___fs2ulonglong EXTERN ___fs2ulonglong_callee EXTERN ___fsadd EXTERN ___fsadd_callee EXTERN ___fsdiv EXTERN ___fsdiv_callee EXTERN ___fseq EXTERN ___fseq_callee EXTERN ___fsgt EXTERN ___fsgt_callee EXTERN ___fslt EXTERN ___fslt_callee EXTERN ___fsmul EXTERN ___fsmul_callee EXTERN ___fsneq EXTERN ___fsneq_callee EXTERN ___fssub EXTERN ___fssub_callee EXTERN ___schar2fs EXTERN ___schar2fs_callee EXTERN ___sint2fs EXTERN ___sint2fs_callee EXTERN ___slong2fs EXTERN ___slong2fs_callee EXTERN ___slonglong2fs EXTERN ___slonglong2fs_callee EXTERN ___uchar2fs EXTERN ___uchar2fs_callee EXTERN ___uint2fs EXTERN ___uint2fs_callee EXTERN ___ulong2fs EXTERN ___ulong2fs_callee EXTERN ___ulonglong2fs EXTERN ___ulonglong2fs_callee EXTERN ____sdcc_2_copy_src_mhl_dst_deix EXTERN ____sdcc_2_copy_src_mhl_dst_bcix EXTERN ____sdcc_4_copy_src_mhl_dst_deix EXTERN ____sdcc_4_copy_src_mhl_dst_bcix EXTERN ____sdcc_4_copy_src_mhl_dst_mbc EXTERN ____sdcc_4_ldi_nosave_bc EXTERN ____sdcc_4_ldi_save_bc EXTERN ____sdcc_4_push_hlix EXTERN ____sdcc_4_push_mhl EXTERN ____sdcc_lib_setmem_hl EXTERN ____sdcc_ll_add_de_bc_hl EXTERN ____sdcc_ll_add_de_bc_hlix EXTERN ____sdcc_ll_add_de_hlix_bc EXTERN ____sdcc_ll_add_de_hlix_bcix EXTERN ____sdcc_ll_add_deix_bc_hl EXTERN ____sdcc_ll_add_deix_hlix EXTERN ____sdcc_ll_add_hlix_bc_deix EXTERN ____sdcc_ll_add_hlix_deix_bc EXTERN ____sdcc_ll_add_hlix_deix_bcix EXTERN ____sdcc_ll_asr_hlix_a EXTERN ____sdcc_ll_asr_mbc_a EXTERN ____sdcc_ll_copy_src_de_dst_hlix EXTERN ____sdcc_ll_copy_src_de_dst_hlsp EXTERN ____sdcc_ll_copy_src_deix_dst_hl EXTERN ____sdcc_ll_copy_src_deix_dst_hlix EXTERN ____sdcc_ll_copy_src_deixm_dst_hlsp EXTERN ____sdcc_ll_copy_src_desp_dst_hlsp EXTERN ____sdcc_ll_copy_src_hl_dst_de EXTERN ____sdcc_ll_copy_src_hlsp_dst_de EXTERN ____sdcc_ll_copy_src_hlsp_dst_deixm EXTERN ____sdcc_ll_lsl_hlix_a EXTERN ____sdcc_ll_lsl_mbc_a EXTERN ____sdcc_ll_lsr_hlix_a EXTERN ____sdcc_ll_lsr_mbc_a EXTERN ____sdcc_ll_push_hlix EXTERN ____sdcc_ll_push_mhl EXTERN ____sdcc_ll_sub_de_bc_hl EXTERN ____sdcc_ll_sub_de_bc_hlix EXTERN ____sdcc_ll_sub_de_hlix_bc EXTERN ____sdcc_ll_sub_de_hlix_bcix EXTERN ____sdcc_ll_sub_deix_bc_hl EXTERN ____sdcc_ll_sub_deix_hlix EXTERN ____sdcc_ll_sub_hlix_bc_deix EXTERN ____sdcc_ll_sub_hlix_deix_bc EXTERN ____sdcc_ll_sub_hlix_deix_bcix EXTERN ____sdcc_load_debc_deix EXTERN ____sdcc_load_dehl_deix EXTERN ____sdcc_load_debc_mhl EXTERN ____sdcc_load_hlde_mhl EXTERN ____sdcc_store_dehl_bcix EXTERN ____sdcc_store_debc_hlix EXTERN ____sdcc_store_debc_mhl EXTERN ____sdcc_cpu_pop_ei EXTERN ____sdcc_cpu_pop_ei_jp EXTERN ____sdcc_cpu_push_di EXTERN ____sdcc_outi EXTERN ____sdcc_outi_128 EXTERN ____sdcc_outi_256 EXTERN ____sdcc_ldi EXTERN ____sdcc_ldi_128 EXTERN ____sdcc_ldi_256 EXTERN ____sdcc_4_copy_srcd_hlix_dst_deix EXTERN ____sdcc_4_and_src_mbc_mhl_dst_deix EXTERN ____sdcc_4_or_src_mbc_mhl_dst_deix EXTERN ____sdcc_4_xor_src_mbc_mhl_dst_deix EXTERN ____sdcc_4_or_src_dehl_dst_bcix EXTERN ____sdcc_4_xor_src_dehl_dst_bcix EXTERN ____sdcc_4_and_src_dehl_dst_bcix EXTERN ____sdcc_4_xor_src_mbc_mhl_dst_debc EXTERN ____sdcc_4_or_src_mbc_mhl_dst_debc EXTERN ____sdcc_4_and_src_mbc_mhl_dst_debc EXTERN ____sdcc_4_cpl_src_mhl_dst_debc EXTERN ____sdcc_4_xor_src_debc_mhl_dst_debc EXTERN ____sdcc_4_or_src_debc_mhl_dst_debc EXTERN ____sdcc_4_and_src_debc_mhl_dst_debc EXTERN ____sdcc_4_and_src_debc_hlix_dst_debc EXTERN ____sdcc_4_or_src_debc_hlix_dst_debc EXTERN ____sdcc_4_xor_src_debc_hlix_dst_debc ;-------------------------------------------------------- ; Public variables in this module ;-------------------------------------------------------- GLOBAL _m32_sinhf ;-------------------------------------------------------- ; Externals used ;-------------------------------------------------------- GLOBAL _m32_polyf GLOBAL _m32_hypotf GLOBAL _m32_ldexpf GLOBAL _m32_frexpf GLOBAL _m32_invsqrtf GLOBAL _m32_sqrtf GLOBAL _m32_invf GLOBAL _m32_sqrf GLOBAL _m32_div2f GLOBAL _m32_mul2f GLOBAL _m32_modff GLOBAL _m32_fmodf GLOBAL _m32_roundf GLOBAL _m32_floorf GLOBAL _m32_fabsf GLOBAL _m32_ceilf GLOBAL _m32_powf GLOBAL _m32_log10f GLOBAL _m32_log2f GLOBAL _m32_logf GLOBAL _m32_exp10f GLOBAL _m32_exp2f GLOBAL _m32_expf GLOBAL _m32_atanhf GLOBAL _m32_acoshf GLOBAL _m32_asinhf GLOBAL _m32_tanhf GLOBAL _m32_coshf GLOBAL _m32_atan2f GLOBAL _m32_atanf GLOBAL _m32_acosf GLOBAL _m32_asinf GLOBAL _m32_tanf GLOBAL _m32_cosf GLOBAL _m32_sinf GLOBAL __MAX_OPEN ;-------------------------------------------------------- ; special function registers ;-------------------------------------------------------- ;-------------------------------------------------------- ; ram data ;-------------------------------------------------------- SECTION bss_compiler ;-------------------------------------------------------- ; ram data ;-------------------------------------------------------- IF 0 ; .area _INITIALIZED removed by z88dk ENDIF ;-------------------------------------------------------- ; absolute external ram data ;-------------------------------------------------------- SECTION IGNORE ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- SECTION code_crt_init ;-------------------------------------------------------- ; Home ;-------------------------------------------------------- SECTION IGNORE ;-------------------------------------------------------- ; code ;-------------------------------------------------------- SECTION code_compiler ; --------------------------------- ; Function m32_sinhf ; --------------------------------- _m32_sinhf: push ix ld ix,0 add ix,sp push af push af call _m32_expf push hl ld c,l ld b,h push de ld l, c ld h, b call _m32_invf ld (ix-4),l ld (ix-3),h ld (ix-2),e ld (ix-1),d pop de pop bc ld l,(ix-2) ld h,(ix-1) push hl ld l,(ix-4) ld h,(ix-3) push hl push de push bc call ___fssub_callee call _m32_div2f ld sp, ix pop ix ret SECTION IGNORE
GLOBAL read_keyboard section .text ; ----------------------------------------------------------------------------- ; Get the RAW data from the Keyboard. ; Return: ; -rax: the RAW data. ; ----------------------------------------------------------------------------- read_keyboard: push rbp mov rbp, rsp in al,60h leave ret
; A137228: Minimal total number of edges in a polyiamond consisting of n triangular cells. ; 3,5,7,9,11,12,14,16,18,19,21,23,24,26,28,29,31,33,34,36,38,39,41,42,44,46,47,49,51,52,54,55,57,59,60,62,63,65,67,68,70,71,73,75,76,78,79,81,83,84,86,87,89,90,92,94,95,97,98,100,102,103,105,106,108,109,111,113 mov $2,$0 mul $0,2 add $0,$2 trn $0,1 lpb $0,1 trn $2,$0 trn $0,$2 add $0,$2 sub $0,1 add $1,1 add $2,$1 lpe add $1,3
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r15 push %rax push %rcx push %rdi push %rsi lea addresses_WT_ht+0x3ac3, %rsi lea addresses_WT_ht+0xcb03, %rdi clflush (%rdi) nop nop nop nop and %r15, %r15 mov $88, %rcx rep movsq nop nop nop nop and %r13, %r13 lea addresses_WT_ht+0x1c7bd, %rsi lea addresses_A_ht+0x1c024, %rdi inc %rax mov $37, %rcx rep movsq sub $59834, %r13 pop %rsi pop %rdi pop %rcx pop %rax pop %r15 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r9 push %rax push %rbx // Faulty Load lea addresses_PSE+0xfc83, %rbx nop nop cmp %r11, %r11 mov (%rbx), %r9 lea oracles, %rax and $0xff, %r9 shlq $12, %r9 mov (%rax,%r9,1), %r9 pop %rbx pop %rax pop %r9 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': True, 'AVXalign': True, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
#ifndef _C4_YML_EMIT_HPP_ #define _C4_YML_EMIT_HPP_ #ifndef _C4_YML_WRITER_HPP_ #include "./writer.hpp" #endif #ifndef _C4_YML_TREE_HPP_ #include "./tree.hpp" #endif #ifndef _C4_YML_NODE_HPP_ #include "./node.hpp" #endif namespace c4 { namespace yml { template<class Writer> class Emitter; template<class OStream> using EmitterOStream = Emitter<WriterOStream<OStream>>; using EmitterFile = Emitter<WriterFile>; using EmitterBuf = Emitter<WriterBuf>; typedef enum { YAML = 0, JSON = 1 } EmitType_e; /** mark a tree or node to be emitted as json */ struct as_json { Tree const* tree; size_t node; as_json(Tree const& t) : tree(&t), node(t.root_id()) {} as_json(Tree const& t, size_t id) : tree(&t), node(id) {} as_json(NodeRef const& n) : tree(n.tree()), node(n.id()) {} }; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- template<class Writer> class Emitter : public Writer { public: using Writer::Writer; /** emit! * * When writing to a buffer, returns a substr of the emitted YAML. * If the given buffer has insufficient space, the returned span will * be null and its size will be the needed space. No writes are done * after the end of the buffer. * * When writing to a file, the returned substr will be null, but its * length will be set to the number of bytes written. */ substr emit(EmitType_e type, Tree const& t, size_t id, bool error_on_excess); /** @overload */ substr emit(EmitType_e type, Tree const& t, bool error_on_excess=true) { return emit(type, t, t.root_id(), error_on_excess); } /** @overload */ substr emit(EmitType_e type, NodeRef const& n, bool error_on_excess=true) { return emit(type, *n.tree(), n.id(), error_on_excess); } private: void _do_visit(Tree const& t, size_t id, size_t ilevel=0, size_t do_indent=1); void _do_visit_json(Tree const& t, size_t id); private: void _write(NodeScalar const& sc, NodeType flags, size_t level); void _write_json(NodeScalar const& sc, NodeType flags); void _write_scalar(csubstr s, bool was_quoted); void _write_scalar_json(csubstr s, bool as_key, bool was_quoted); void _write_scalar_block(csubstr s, size_t level, bool as_key); void _write_tag(csubstr tag) { if(!tag.begins_with('!')) this->Writer::_do_write('!'); this->Writer::_do_write(tag); } void _indent(size_t ilevel) { this->Writer::_do_write(indent_to(ilevel)); } enum { _keysc = (KEY|KEYREF|KEYANCH|KEYQUO) | ~(VAL|VALREF|VALANCH|VALQUO), _valsc = ~(KEY|KEYREF|KEYANCH|KEYQUO) | (VAL|VALREF|VALANCH|VALQUO), _keysc_json = (KEY) | ~(VAL), _valsc_json = ~(KEY) | (VAL), }; C4_ALWAYS_INLINE void _writek(Tree const& t, size_t id, size_t level) { _write(t.keysc(id), t._p(id)->m_type.type & ~_valsc, level); } C4_ALWAYS_INLINE void _writev(Tree const& t, size_t id, size_t level) { _write(t.valsc(id), t._p(id)->m_type.type & ~_keysc, level); } C4_ALWAYS_INLINE void _writek_json(Tree const& t, size_t id) { _write_json(t.keysc(id), t._p(id)->m_type.type & ~(VAL)); } C4_ALWAYS_INLINE void _writev_json(Tree const& t, size_t id) { _write_json(t.valsc(id), t._p(id)->m_type.type & ~(KEY)); } }; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- /** emit YAML to the given file. A null file defaults to stdout. * Return the number of bytes written. */ inline size_t emit(Tree const& t, size_t id, FILE *f) { EmitterFile em(f); size_t len = em.emit(YAML, t, id, /*error_on_excess*/true).len; return len; } /** emit JSON to the given file. A null file defaults to stdout. * Return the number of bytes written. */ inline size_t emit_json(Tree const& t, size_t id, FILE *f) { EmitterFile em(f); size_t len = em.emit(JSON, t, id, /*error_on_excess*/true).len; return len; } /** emit YAML to the given file. A null file defaults to stdout. * Return the number of bytes written. * @overload */ inline size_t emit(Tree const& t, FILE *f=nullptr) { return emit(t, t.root_id(), f); } /** emit JSON to the given file. A null file defaults to stdout. * Return the number of bytes written. * @overload */ inline size_t emit_json(Tree const& t, FILE *f=nullptr) { return emit_json(t, t.root_id(), f); } /** emit YAML to the given file. A null file defaults to stdout. * Return the number of bytes written. * @overload */ inline size_t emit(NodeRef const& r, FILE *f=nullptr) { return emit(*r.tree(), r.id(), f); } /** emit JSON to the given file. A null file defaults to stdout. * Return the number of bytes written. * @overload */ inline size_t emit_json(NodeRef const& r, FILE *f=nullptr) { return emit_json(*r.tree(), r.id(), f); } //----------------------------------------------------------------------------- /** emit YAML to an STL-like ostream */ template<class OStream> inline OStream& operator<< (OStream& s, Tree const& t) { EmitterOStream<OStream> em(s); em.emit(YAML, t.rootref()); return s; } /** emit YAML to an STL-like ostream * @overload */ template<class OStream> inline OStream& operator<< (OStream& s, NodeRef const& n) { EmitterOStream<OStream> em(s); em.emit(YAML, n); return s; } /** emit json to the stream */ template<class OStream> inline OStream& operator<< (OStream& s, as_json const& js) { EmitterOStream<OStream> em(s); em.emit(JSON, *js.tree, js.node, true); return s; } //----------------------------------------------------------------------------- /** emit YAML to the given buffer. Return a substr trimmed to the emitted YAML. * @param error_on_excess Raise an error if the space in the buffer is insufficient. * @overload */ inline substr emit(Tree const& t, size_t id, substr buf, bool error_on_excess=true) { EmitterBuf em(buf); substr result = em.emit(YAML, t, id, error_on_excess); return result; } /** emit JSON to the given buffer. Return a substr trimmed to the emitted JSON. * @param error_on_excess Raise an error if the space in the buffer is insufficient. * @overload */ inline substr emit_json(Tree const& t, size_t id, substr buf, bool error_on_excess=true) { EmitterBuf em(buf); substr result = em.emit(JSON, t, id, error_on_excess); return result; } /** emit YAML to the given buffer. Return a substr trimmed to the emitted YAML. * @param error_on_excess Raise an error if the space in the buffer is insufficient. * @overload */ inline substr emit(Tree const& t, substr buf, bool error_on_excess=true) { return emit(t, t.root_id(), buf, error_on_excess); } /** emit JSON to the given buffer. Return a substr trimmed to the emitted JSON. * @param error_on_excess Raise an error if the space in the buffer is insufficient. * @overload */ inline substr emit_json(Tree const& t, substr buf, bool error_on_excess=true) { return emit_json(t, t.root_id(), buf, error_on_excess); } /** emit YAML to the given buffer. Return a substr trimmed to the emitted YAML. * @param error_on_excess Raise an error if the space in the buffer is insufficient. * @overload */ inline substr emit(NodeRef const& r, substr buf, bool error_on_excess=true) { return emit(*r.tree(), r.id(), buf, error_on_excess); } /** emit JSON to the given buffer. Return a substr trimmed to the emitted JSON. * @param error_on_excess Raise an error if the space in the buffer is insufficient. * @overload */ inline substr emit_json(NodeRef const& r, substr buf, bool error_on_excess=true) { return emit_json(*r.tree(), r.id(), buf, error_on_excess); } //----------------------------------------------------------------------------- /** emit+resize: YAML to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted YAML. */ template<class CharOwningContainer> substr emitrs(Tree const& t, size_t id, CharOwningContainer * cont) { substr buf = to_substr(*cont); substr ret = emit(t, id, buf, /*error_on_excess*/false); if(ret.str == nullptr && ret.len > 0) { cont->resize(ret.len); buf = to_substr(*cont); ret = emit(t, id, buf, /*error_on_excess*/true); } return ret; } /** emit+resize: JSON to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted JSON. */ template<class CharOwningContainer> substr emitrs_json(Tree const& t, size_t id, CharOwningContainer * cont) { substr buf = to_substr(*cont); substr ret = emit_json(t, id, buf, /*error_on_excess*/false); if(ret.str == nullptr && ret.len > 0) { cont->resize(ret.len); buf = to_substr(*cont); ret = emit_json(t, id, buf, /*error_on_excess*/true); } return ret; } /** emit+resize: YAML to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted YAML. */ template<class CharOwningContainer> CharOwningContainer emitrs(Tree const& t, size_t id) { CharOwningContainer c; emitrs(t, id, &c); return c; } /** emit+resize: JSON to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted JSON. */ template<class CharOwningContainer> CharOwningContainer emitrs_json(Tree const& t, size_t id) { CharOwningContainer c; emitrs_json(t, id, &c); return c; } /** emit+resize: YAML to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted YAML. */ template<class CharOwningContainer> substr emitrs(Tree const& t, CharOwningContainer * cont) { return emitrs(t, t.root_id(), cont); } /** emit+resize: JSON to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted JSON. */ template<class CharOwningContainer> substr emitrs_json(Tree const& t, CharOwningContainer * cont) { return emitrs_json(t, t.root_id(), cont); } /** emit+resize: YAML to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted YAML. */ template<class CharOwningContainer> CharOwningContainer emitrs(Tree const& t) { CharOwningContainer c; emitrs(t, t.root_id(), &c); return c; } /** emit+resize: JSON to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted JSON. */ template<class CharOwningContainer> CharOwningContainer emitrs_json(Tree const& t) { CharOwningContainer c; emitrs_json(t, t.root_id(), &c); return c; } /** emit+resize: YAML to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted YAML. */ template<class CharOwningContainer> substr emitrs(NodeRef const& n, CharOwningContainer * cont) { return emitrs(*n.tree(), n.id(), cont); } /** emit+resize: JSON to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted JSON. */ template<class CharOwningContainer> substr emitrs_json(NodeRef const& n, CharOwningContainer * cont) { return emitrs_json(*n.tree(), n.id(), cont); } /** emit+resize: YAML to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted YAML. */ template<class CharOwningContainer> CharOwningContainer emitrs(NodeRef const& n) { CharOwningContainer c; emitrs(*n.tree(), n.id(), &c); return c; } /** emit+resize: JSON to the given std::string/std::vector-like container, * resizing it as needed to fit the emitted JSON. */ template<class CharOwningContainer> CharOwningContainer emitrs_json(NodeRef const& n) { CharOwningContainer c; emitrs_json(*n.tree(), n.id(), &c); return c; } } // namespace yml } // namespace c4 #include "c4/yml/emit.def.hpp" #endif /* _C4_YML_EMIT_HPP_ */
// CodeGear C++Builder // Copyright (c) 1995, 2016 by Embarcadero Technologies, Inc. // All rights reserved // (DO NOT EDIT: machine generated header) 'AdStSapi.pas' rev: 32.00 (Windows) #ifndef AdstsapiHPP #define AdstsapiHPP #pragma delphiheader begin #pragma option push #pragma option -w- // All warnings off #pragma option -Vx // Zero-length empty class member #pragma pack(push,8) #include <System.hpp> #include <SysInit.hpp> #include <Winapi.Windows.hpp> #include <Winapi.Messages.hpp> #include <System.SysUtils.hpp> #include <System.Classes.hpp> #include <Vcl.Graphics.hpp> #include <OoMisc.hpp> #include <AdExcept.hpp> #include <AdStSt.hpp> #include <AdSapiEn.hpp> #include <AdStMach.hpp> #include <Vcl.Controls.hpp> #include <System.UITypes.hpp> //-- user supplied ----------------------------------------------------------- namespace Adstsapi { //-- forward type declarations ----------------------------------------------- class DELPHICLASS TApdSAPISpeakState; //-- type declarations ------------------------------------------------------- typedef void __fastcall (__closure *TApdOnSetupSpeakString)(System::TObject* Sender, System::UnicodeString &AString); class PASCALIMPLEMENTATION TApdSAPISpeakState : public Adstst::TApdCustomActionState { typedef Adstst::TApdCustomActionState inherited; private: System::UnicodeString FStringToSpeak; Adsapien::TApdSapiEngine* FSapiEngine; TApdOnSetupSpeakString FOnSetupSpeakString; protected: void __fastcall SetSapiEngine(Adsapien::TApdSapiEngine* const v); void __fastcall SetStringToSpeak(const System::UnicodeString v); public: __fastcall virtual TApdSAPISpeakState(System::Classes::TComponent* AOwner); virtual void __fastcall Activate(void); __published: __property Adsapien::TApdSapiEngine* SapiEngine = {read=FSapiEngine, write=SetSapiEngine}; __property System::UnicodeString StringToSpeak = {read=FStringToSpeak, write=SetStringToSpeak}; __property OnGetData; __property OnGetDataString; __property TApdOnSetupSpeakString OnSetupSpeakString = {read=FOnSetupSpeakString, write=FOnSetupSpeakString}; __property ActiveColor; __property Caption; __property Conditions; __property Font; __property Glyph; __property GlyphCells; __property InactiveColor; __property Movable = {default=0}; __property OutputOnActivate = {default=0}; __property OnStateActivate; __property OnStateFinish; __property OnSelectNextState; public: /* TApdCustomActionState.Destroy */ inline __fastcall virtual ~TApdSAPISpeakState(void) { } }; //-- var, const, procedure --------------------------------------------------- } /* namespace Adstsapi */ #if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_ADSTSAPI) using namespace Adstsapi; #endif #pragma pack(pop) #pragma option pop #pragma delphiheader end. //-- end unit ---------------------------------------------------------------- #endif // AdstsapiHPP
Music_SilentTown: musicheader 4, 1, Town073_Ch1 musicheader 1, 2, Town073_Ch2 musicheader 1, 3, Town073_Ch3 musicheader 1, 4, Town073_Ch4 ; include group.def ;bank3d group G_MUSIC4 ; ;; Town073 ; ;; Converting on Mon Mar 1 06:42:16 1999 ; ;; by ver 1.02 ; ; public mustown17 ;mustown17: ;---------------------------------------- Town073_Ch1: ;---------------------------------------- tempo 168 volume 7, 7 duty_cycle 3 pitch_offset 1 vibrato 18, 1, 5 note_type 12, 12, 2 stereo_panning TRUE, FALSE rest 4 ; P1-1 .loop10 note_type 12, 12, 2 octave 3 note F_,2 ; P1-2 --- tied note D_,2 note A#,2 note D_,2 note F_,2 note D_,2 note A#,2 note D_,2 ; P1-3 note F_,2 note D_,2 note A#,2 note D_,2 note D_,2 note C_,2 octave 2 note A#,2 note A_,2 ; P1-4 octave 3 note D#,2 note C_,2 note G_,2 note C_,2 note D#,2 note C_,2 note G_,2 note C_,2 ; P1-5 note F_,2 note C_,2 note A_,2 note C_,2 note A_,2 note G_,2 note A_,2 note F_,2 ; P1-6 note F_,2 note D_,2 note A#,2 note D_,2 note F_,2 note D_,2 note A#,2 note D_,2 ; P1-7 note F_,2 note D_,2 note A#,2 note A_,2 note A#,2 note A_,2 note G_,2 note F_,2 ; P1-8 note D#,2 note C_,2 note G_,2 note D#,2 note G_,2 note F_,2 note G_,2 note A#,2 ; P1-9 note A_,2 note F_,2 octave 4 note C_,2 octave 3 note F_,2 note A_,2 note F_,2 octave 4 note C_,2 octave 3 note F_,2 ; P1-10 note_type 12, 12, 7 octave 4 note C_,6 octave 3 note A#,6 note G_,4 ; P1-11 note A_,16 ; P1-12 octave 4 note C_,6 octave 3 note A#,6 octave 4 note D_,4 ; P1-13 note D#,6 note D_,6 note C_,4 ; P1-14 note C_,6 octave 3 note A#,6 note G_,4 ; P1-15 note A_,16 ; P1-16 octave 4 note C_,6 octave 3 note A#,6 octave 4 note D_,4 ; P1-17 note F_,12 octave 3 note A#,2 octave 4 note C_,2 db sound_loop_cmd, 0 dw .loop10 ;---------------------------------------- Town073_Ch2: ;---------------------------------------- duty_cycle 3 vibrato 8, 2, 6 note_type 12, 13, 3 ; P2-1 octave 3 note A#,2 octave 4 note C_,2 ; P2-2 .loop20 note_type 12, 13, 4 stereo_panning FALSE, TRUE note D_,4 note F_,4 note D#,2 note D_,2 note C_,2 octave 3 note A#,2 ; P2-3 octave 4 note D_,6 octave 3 note A#,2 note F_,6 note D#,1 note F_,1 ; P2-4 note G_,4 note A#,4 octave 4 note C_,2 octave 3 note A#,2 note A_,2 note A#,2 ; P2-5 octave 4 note C_,6 note D_,2 note C_,6 octave 3 note A#,1 octave 4 note C_,1 ; P2-6 note D_,4 note F_,4 note F#,2 note F_,2 note D#,2 note F#,2 ; P2-7 note F_,6 note A_,2 note A#,6 note C_,1 note D_,1 ; P2-8 note_type 12, 13, 7 note D#,6 note F_,2 note G_,8 ; P2-9 note F_,6 note F_,1 note G_,1 note A_,8 ; P2-10 stereo_panning TRUE, TRUE note G_,6 note F_,6 note D#,4 ; P2-11 note C_,16 ; P2-12 note G_,6 note F_,6 note A#,4 ; P2-13 note A_,16 ; P2-14 note G_,6 note F_,6 note D#,4 ; P2-15 note C_,16 ; P2-16 note G_,6 note F_,6 note A#,4 ; P2-17 note A_,16 db sound_loop_cmd, 0 dw .loop20 ;---------------------------------------- Town073_Ch3: ;---------------------------------------- note_type 12, 1, 3 rest 4 ; P3-1 .loop30 stereo_panning TRUE, TRUE octave 4 note F_,6 ; P3-2 note D_,6 note A#,4 ; P3-3 note F_,6 note D_,6 note F_,4 ; P3-4 note G_,6 note D#,6 note A#,4 ; P3-5 note A_,6 note G_,6 note F_,4 ; P3-6 note A#,6 note D_,6 note A#,4 ; P3-7 note F_,6 note D_,6 note A#,4 ; P3-8 note D#,6 note G_,6 note D#,4 ; P3-9 note F_,6 note G_,6 note A_,4 ; P3-10 stereo_panning FALSE, TRUE note G_,6 note A#,6 note G_,4 ; P3-11 note A_,2 note F_,2 octave 5 note C_,2 octave 4 note F_,2 note A_,2 note F_,2 octave 5 note C_,2 octave 4 note F_,2 ; P3-12 note G_,6 note A#,6 note G_,4 ; P3-13 note A_,2 note F_,2 octave 5 note C_,2 note D_,2 note D#,2 note D_,2 note C_,2 octave 4 note A_,2 ; P3-14 note G_,6 note A#,6 note G_,4 ; P3-15 note A_,2 note F_,2 octave 5 note C_,2 octave 4 note F_,2 note A_,2 note F_,2 octave 5 note C_,2 octave 4 note F_,2 ; P3-16 note G_,6 note A#,6 octave 5 note D_,4 ; P3-17 note F_,6 note D#,6 note C_,4 db sound_loop_cmd, 0 dw .loop30 ;---------------------------------------- Town073_Ch4: ;---------------------------------------- toggle_noise 3 drum_speed 12 ; P4-1 rest 4 ; P4-2 .loop40 drum_note 7,1 rest 5 drum_note 7,1 rest 5 drum_note 7,1 rest 1 drum_note 7,1 rest 1 ; P4-3 drum_note 7,1 rest 5 drum_note 7,1 rest 5 drum_note 7,1 rest 3 ; P4-4 drum_note 7,1 rest 5 drum_note 7,1 rest 5 drum_note 7,1 rest 1 drum_note 7,1 rest 1 ; P4-5 drum_note 7,1 rest 5 drum_note 7,1 rest 5 drum_note 7,1 rest 3 ; P4-6 drum_note 7,1 rest 5 drum_note 7,1 rest 5 drum_note 7,1 rest 1 drum_note 7,1 rest 1 ; P4-7 drum_note 7,1 rest 5 drum_note 7,1 rest 5 drum_note 7,1 rest 3 ; P4-8 drum_note 7,1 rest 5 drum_note 7,1 rest 5 drum_note 7,1 rest 1 drum_note 7,1 rest 1 ; P4-9 drum_note 7,1 rest 5 drum_note 7,1 rest 3 drum_note 7,1 rest 1 drum_note 7,1 rest 1 drum_note 7,1 rest 3 ; P4-10 --- tied drum_note 7,1 rest 3 drum_note 7,1 rest 3 drum_note 7,1 rest 1 drum_note 7,1 rest 1 drum_note 7,1 rest 1 ; P4-11 drum_note 7,1 rest 5 drum_note 7,1 rest 5 drum_note 7,1 rest 1 drum_note 7,1 rest 3 ; P4-12 --- tied drum_note 7,1 rest 3 drum_note 7,1 rest 3 drum_note 7,1 rest 1 drum_note 7,1 rest 1 drum_note 7,1 rest 1 ; P4-13 drum_note 7,1 rest 5 drum_note 7,1 rest 5 drum_note 7,1 rest 5 ; P4-14 --- tied drum_note 7,1 rest 3 drum_note 7,1 rest 3 drum_note 7,1 rest 1 drum_note 7,1 rest 1 drum_note 7,1 rest 1 ; P4-15 drum_note 7,1 rest 5 drum_note 7,1 rest 5 drum_note 7,1 rest 3 ; P4-16 drum_note 7,1 rest 1 drum_note 7,1 rest 3 drum_note 7,1 rest 3 drum_note 7,1 rest 1 drum_note 7,1 rest 1 drum_note 7,1 rest 1 ; P4-17 drum_note 7,1 rest 5 drum_note 7,1 rest 3 drum_note 7,1 rest 1 drum_note 7,1 rest 1 drum_note 7,1 rest 1 db sound_loop_cmd, 0 dw .loop40
.code StrLen proc lpSrc:DWORD mov edx,lpSrc dec edx xor al,al @@: inc edx cmp al,[edx] jne @b mov eax,edx sub eax,lpSrc ret StrLen endp StrCpy proc uses esi edi,lpDst:DWORD,lpSrc:DWORD mov esi,lpSrc mov edi,lpDst @@: mov al,[esi] mov [edi],al inc esi inc edi or al,al jne @b ret StrCpy endp MemMove proc uses ebx esi edi,lpSheet:DWORD,lpWhere:DWORD,nLen:DWORD mov ebx,lpSheet mov eax,nLen or eax,eax je Ex js @f ;Grow mov esi,[ebx].SHEET.lprow add eax,[esi].ROWDTA.len add eax,32 .if eax>[esi].ROWDTA.maxlen shr eax,12 inc eax shl eax,12 mov [esi].ROWDTA.maxlen,eax invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,eax push eax mov edi,eax mov ecx,[esi].ROWDTA.len rep movsb pop esi mov eax,esi sub eax,[ebx].SHEET.lprow add lpWhere,eax .if [ebx].SHEET.lpcol add [ebx].SHEET.lpcol,eax .endif invoke GlobalFree,[ebx].SHEET.lprow movzx ecx,[esi].ROWDTA.rown mov eax,[ebx].SHEET.lprowmem lea eax,[eax+ecx*4] mov [eax],esi mov [ebx].SHEET.lprow,esi .endif mov eax,nLen add esi,[esi].ROWDTA.len mov edi,esi add edi,eax mov ecx,esi sub ecx,lpWhere inc ecx mov eax,3 std .if ecx>eax push ecx shr ecx,2 sub esi,eax sub edi,eax rep movsd add edi,eax add esi,eax pop ecx .endif and ecx,eax .if ecx rep movsb .endif cld jmp Ex @@: ;Shrink mov edi,lpWhere mov esi,edi sub esi,eax mov ecx,[ebx].SHEET.lprow add ecx,[ecx] sub ecx,edi mov eax,3 .if ecx>eax push ecx shr ecx,2 rep movsd pop ecx .endif and ecx,eax .if ecx rep movsb .endif Ex: mov eax,nLen mov edx,[ebx].SHEET.lprow .if edx add [edx].ROWDTA.len,eax .endif mov edx,[ebx].SHEET.lpcol .if edx add [edx].COLDTA.len,ax .endif mov eax,lpWhere ret MemMove endp
Name: ys_exst.asm Type: file Size: 113758 Last-Modified: '2016-05-13T04:51:16Z' SHA-1: 00F6F9AEEF36886797EE0D51405860065261CBE5 Description: null
; A267890: Decimal representation of the n-th iteration of the "Rule 239" elementary cellular automaton starting with a single ON (black) cell. ; 1,6,31,127,511,2047,8191,32767,131071,524287,2097151,8388607,33554431,134217727,536870911,2147483647,8589934591,34359738367,137438953471,549755813887,2199023255551,8796093022207,35184372088831,140737488355327,562949953421311,2251799813685247,9007199254740991 mul $0,2 mov $2,3 lpb $0 sub $0,1 add $1,1 mul $1,2 add $3,$2 sub $2,$3 trn $3,1 lpe sub $1,$3 add $1,1
; A063154: Dimension of the space of weight 2n cusp forms for Gamma_0( 86 ). ; 10,31,53,75,97,119,141,163,185,207,229,251,273,295,317,339,361,383,405,427,449,471,493,515,537,559,581,603,625,647,669,691,713,735,757,779,801,823,845,867,889,911,933,955,977,999,1021,1043 mul $0,22 trn $0,1 add $0,10
/*============================================================================= NiftyLink: A software library to facilitate communication over OpenIGTLink. Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt in the top level directory for details. =============================================================================*/ #include "NiftyLinkTcpClient.h" #include "NiftyLinkTcpNetworkWorker.h" #include <NiftyLinkQThread.h> #include <NiftyLinkUtils.h> #include <igtlMessageBase.h> #include <QsLog.h> #include <QMutexLocker> namespace niftk { //----------------------------------------------------------------------------- NiftyLinkTcpClient::NiftyLinkTcpClient(QObject *parent) : QObject(parent) , m_Mutex(QMutex::Recursive) , m_State(UNCONNECTED) , m_Socket(NULL) , m_Worker(NULL) , m_Thread(NULL) , m_RequestedName("") , m_RequestedPort(-1) { this->Initialise(); } //----------------------------------------------------------------------------- NiftyLinkTcpClient::NiftyLinkTcpClient(const QString& hostName, quint16 portNumber, QObject *parent) : QObject(parent) , m_State(UNCONNECTED) , m_Socket(NULL) , m_Worker(NULL) , m_Thread(NULL) , m_RequestedName(hostName) , m_RequestedPort(portNumber) { this->Initialise(); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::Initialise() { this->setObjectName("NiftyLinkTcpClient"); QLOG_INFO() << QObject::tr("%1::Initialise() - started.").arg(objectName()); qRegisterMetaType<QAbstractSocket::SocketError>("QAbstractSocket::SocketError"); qRegisterMetaType<niftk::NiftyLinkMessageContainer::Pointer>("niftk::NiftyLinkMessageContainer::Pointer"); qRegisterMetaType<niftk::NiftyLinkMessageStatsContainer>("niftk::NiftyLinkMessageStatsContainer"); // This is to make sure we have the best possible system timer. #if defined(_WIN32) && !defined(__CYGWIN__) niftk::InitializeWinTimers(); #endif this->InitialiseSocket(); QLOG_INFO() << QObject::tr("%1::Initialise() - finished.").arg(objectName()); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::InitialiseSocket() { m_Socket = new QTcpSocket(); connect(m_Socket, SIGNAL(connected()), this, SLOT(OnConnected())); connect(m_Socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(OnError())); m_Worker = new NiftyLinkTcpNetworkWorker("NiftyLinkTcpClientWorker", &m_InboundMessages, &m_OutboundMessages, m_Socket); } //----------------------------------------------------------------------------- NiftyLinkTcpClient::~NiftyLinkTcpClient() { QString name = objectName(); QLOG_INFO() << QObject::tr("%1::~NiftyLinkTcpClient() - destroying.").arg(name); if (m_State != UNCONNECTED) { // Not sure if we need this, if we are not connected yet, we could just destroy this object? if (m_State == CONNECTING) { while(m_State != CONNECTED) { QCoreApplication::processEvents(); NiftyLinkQThread::SleepCallingThread(1); } } // We have to request, and then wait for eveything to shut-down. if (this->IsConnected()) { // This should block/wait until the worker really is shutdown, // and everything disconnected, so that we really are ready to destroy this. this->DisconnectFromHost(); } while(m_State != SHUTDOWN) { QCoreApplication::processEvents(); NiftyLinkQThread::SleepCallingThread(1); } NiftyLinkQThread::SleepCallingThread(1000); } QLOG_INFO() << QObject::tr("%1::~NiftyLinkTcpClient() - destroyed.").arg(name); } //----------------------------------------------------------------------------- NiftyLinkTcpClient::ClientState NiftyLinkTcpClient::GetState() const { QMutexLocker locker(&m_Mutex); return m_State; } //----------------------------------------------------------------------------- bool NiftyLinkTcpClient::IsConnected() const { QMutexLocker locker(&m_Mutex); return m_State == CONNECTED; } //----------------------------------------------------------------------------- int NiftyLinkTcpClient::GetRequestedPort() const { QMutexLocker locker(&m_Mutex); return m_RequestedPort; } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::SetNumberMessageReceivedThreshold(qint64 threshold) { m_Worker->SetNumberMessageReceivedThreshold(threshold); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::SetKeepAliveOn(bool isOn) { m_Worker->SetKeepAliveOn(isOn); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::SetCheckForNoIncomingData(bool isOn) { m_Worker->SetCheckForNoIncomingData(isOn); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::OutputStats() { m_Worker->OutputStatsToConsole(); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::RequestStats() { m_Worker->RequestStats(); } //----------------------------------------------------------------------------- bool NiftyLinkTcpClient::Send(NiftyLinkMessageContainer::Pointer message) { return m_Worker->Send(message); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::DisconnectFromHost() { if (!this->IsConnected()) { QLOG_WARN() << QObject::tr("%1::DisconnectFromHost() - received request to disconnect, when not connected, so I'm ignoring it.").arg(objectName()); return; } // This triggers the shutdown process. m_Worker->RequestDisconnectSocket(); // We MUST wait until the thread is shutdown, and then objects deleted. while(m_State != SHUTDOWN) { QCoreApplication::processEvents(); NiftyLinkQThread::SleepCallingThread(1); } } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::OnMessageReceived(int portNumber) { NiftyLinkMessageContainer::Pointer msg = m_InboundMessages.GetContainer(portNumber); emit MessageReceived(msg); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::OnError() { // Remember, this method is called when the socket is registered with this class, and being processing in this event loop. QLOG_ERROR() << QObject::tr("%1::OnError() - code=%2, string=%3").arg(objectName()).arg(m_Socket->error()).arg(m_Socket->errorString()); emit SocketError(this->m_RequestedName, this->m_RequestedPort, m_Socket->error(), m_Socket->errorString()); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::OnWorkerSocketError(int portNumber, QAbstractSocket::SocketError errorCode, QString errorString) { // Remember, this method is called when the socket has moved into the worker object, and being processed in the worker thread. QLOG_ERROR() << QObject::tr("%1::OnWorkerSocketError() - code=%2, string=%3").arg(objectName()).arg(errorCode).arg(errorString); emit SocketError(this->m_RequestedName, this->m_RequestedPort, errorCode, errorString); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::RaiseInternalError(const QString& errorMessage) { QLOG_ERROR() << QObject::tr("%1::RaiseInternalError() - message=%2").arg(objectName()).arg(errorMessage); emit ClientError(this->m_RequestedName, this->m_RequestedPort, errorMessage); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::ConnectToHost(const QString& hostName, quint16 portNumber) { { QMutexLocker locker(&m_Mutex); m_State = CONNECTING; m_RequestedName = hostName; m_RequestedPort = portNumber; } // There are no errors reported from this. Listen to the error signal, see OnError(). m_Socket->connectToHost(m_RequestedName, m_RequestedPort); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::ConnectToHost() { { QMutexLocker locker(&m_Mutex); m_State = CONNECTING; } // There are no errors reported from this. Listen to the error signal, see OnError(). m_Socket->connectToHost(m_RequestedName, m_RequestedPort); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::OnConnected() { this->setObjectName(QObject::tr("NiftyLinkTcpClient(%1:%2)").arg(m_Socket->peerName()).arg(m_Socket->peerPort())); m_Worker->UpdateObjectName(); m_Socket->setSocketOption(QAbstractSocket::LowDelayOption, 1); m_Thread = new NiftyLinkQThread(); connect(m_Thread, SIGNAL(finished()), m_Thread, SLOT(deleteLater())); // i.e. the event loop of thread deletes it when control returns to this event loop. connect(m_Thread, SIGNAL(finished()), this, SLOT(OnThreadFinished()), Qt::BlockingQueuedConnection); m_Worker->moveToThread(m_Thread); m_Socket->moveToThread(m_Thread); connect(m_Worker, SIGNAL(SocketError(int,QAbstractSocket::SocketError,QString)), this, SLOT(OnWorkerSocketError(int,QAbstractSocket::SocketError,QString))); connect(m_Worker, SIGNAL(NoIncomingData()), this, SIGNAL(NoIncomingData())); connect(m_Worker, SIGNAL(SentKeepAlive()), this, SIGNAL(SentKeepAlive())); connect(m_Worker, SIGNAL(BytesSent(qint64)), this, SIGNAL(BytesSent(qint64))); connect(m_Worker, SIGNAL(MessageReceived(int)), this, SLOT(OnMessageReceived(int))); connect(m_Worker, SIGNAL(SocketDisconnected()), this, SLOT(OnDisconnected()), Qt::BlockingQueuedConnection); { QMutexLocker locker(&m_Mutex); m_Thread->start(); m_State = CONNECTED; } QLOG_INFO() << QObject::tr("%1::OnConnected() - socket connected.").arg(objectName()); emit Connected(this->m_RequestedName, this->m_RequestedPort); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::OnDisconnected() { QMutexLocker locker(&m_Mutex); m_State = SHUTTINGDOWN; QLOG_INFO() << QObject::tr("%1::OnDisconnected() - worker disconnected.").arg(objectName()); emit Disconnected(this->m_RequestedName, this->m_RequestedPort); } //----------------------------------------------------------------------------- void NiftyLinkTcpClient::OnThreadFinished() { QMutexLocker locker(&m_Mutex); m_State = SHUTDOWN; // When the thread dies, it cleans up socket and worker. So, they have GONE. // We need to create new ones, as this class assumes that socket and worker always exist. this->InitialiseSocket(); QLOG_INFO() << QObject::tr("%1::OnThreadFinished().").arg(objectName()); } } // end niftk namespace
LETRA_1 EQU 041h ; DEFINE 1a. COLUNA COM A LETRA A LETRA_8 EQU 048h ; DEFINE ULTIMA COLUNA COM LETRA H NUMERO_1 EQU 31h NUMERO_8 EQU 38h org 100h MOV SI, offset JOGADA ;MOVE O VETOR DE JOGADAS PARA A MEMORIA ;*******************INICIO********************************** AGUARDA_LETRA: MOV BL, LETRA_1 ;REGISTRADOR AUXILIAR MOV BH, LETRA_8 MOV AX,0 ;CHAMA O SERVICO 0 INT 16h ;DO INT 16h (FUNCAO QUE ESPERA A TECLA) TESTA_LETRA: CMP AL, BL ; COMPARA SE VALOR DIGITADA EH IGUAL A U JE SALVA_LETRA ; SE SIM IRA SALVAR A LETRA NO VETOR DE JOGADAS MOV CL,BL ; UTILIZA UM CONTADOR AUXILIAR PARA COMPARAR SE VALOR DIGITADO EH MAIOR QUE "H" OU MENOR QUE "A" SUB CL,BH JNC AGUARDA_LETRA ; VALOR DEVE APRESENTAR CARRY, CASO CONTRARIO VALOR NAO EH ACEITO INC BL ; INCREMENTA CONTADOR JMP TESTA_LETRA ; RECURSAO SALVA_LETRA: MOV [SI],AL ; SALVA VALOR DIGITADO NA MEMORIA INC SI AGUARDA_NUMERO: MOV BL, NUMERO_1 ;REGISTRADOR AUXILIAR COMO CONTADOR MOV BH, NUMERO_8 MOV AX,0 ;CHAMA O SERVICO 0 INT 16h ;DO INT 16h (FUNCAO QUE ESPERA A TECLA) TESTA_NUMERO: CMP AL, BL ; COMPARA SE VALOR DIGITADA EH IGUAL A U JE SALVA_NUMERO ; SE SIM IRA SALVAR A LETRA NO VETOR DE JOGADAS MOV CL,BL ; UTILIZA UM CONTADOR AUXILIAR PARA COMPARAR SE VALOR DIGITADO EH MAIOR QUE "H" OU MENOR QUE "A" SUB CL,BH JNC AGUARDA_NUMERO ; VALOR DEVE APRESENTAR CARRY, CASO CONTRARIO VALOR NAO EH ACEITO INC BL ; INCREMENTA CONTADOR JMP TESTA_NUMERO ; RECURSAO SALVA_NUMERO: MOV [SI],AL ; SALVA VALOR DIGITADO NA MEMORIA INC SI ;************************************************************ ESCREVE_TELA: MOV AX, 0B800h MOV ES, AX MOV DI, 0000h MOV SI, offset JOGADA ;REPOSICIONA VETOR DE JOGADAS NO INICIO VOLTA: MOV AL,[SI] MOV ES:[DI], AL ;; ESCREVE POSICAO DO VETOR NA TELA ;MOV ES:[DI+1], 10101110b ;; ATRIBUTO INC DI INC DI INC SI CMP AL,0 JNZ VOLTA ret JOGADA: ;VETOR ONDE SERA ESCRITO OS DADOS DO JOGO DB "0000000000000000",0
; ; TRS-80 (EG2000+HT1080) specific routines ; by Stefano Bodrato, Fall 2015 ; ; int get_psg(int reg); ; ; Get a PSG register. ; ; ; $Id: get_psg.asm,v 1.2 2016-06-10 21:13:58 dom Exp $ ; SECTION code_clib PUBLIC get_psg PUBLIC get_psg2 PUBLIC _get_psg PUBLIC _get_psg2 get_psg: _get_psg: LD BC,31 OUT (C),l get_psg2: _get_psg2: LD c,30 in a,(C) ld l,a ret
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r9 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0x6c72, %r10 nop dec %rbp mov (%r10), %edi nop nop nop nop and %r12, %r12 lea addresses_A_ht+0x1225e, %rsi nop nop nop nop nop cmp %rbx, %rbx movl $0x61626364, (%rsi) xor $62198, %rbx lea addresses_UC_ht+0xce5c, %r12 nop nop nop cmp $32428, %rbx mov $0x6162636465666768, %rdi movq %rdi, %xmm2 vmovups %ymm2, (%r12) nop xor %r12, %r12 lea addresses_WT_ht+0x96de, %rsi lea addresses_WC_ht+0xe1de, %rdi clflush (%rsi) nop nop nop nop nop add $54867, %r9 mov $75, %rcx rep movsq nop xor %r9, %r9 lea addresses_WC_ht+0x14a1e, %r10 and $58032, %rsi mov $0x6162636465666768, %rdi movq %rdi, %xmm0 vmovups %ymm0, (%r10) nop nop and %r9, %r9 lea addresses_normal_ht+0xa7de, %rsi nop nop nop nop nop cmp $29638, %rcx and $0xffffffffffffffc0, %rsi vmovntdqa (%rsi), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $0, %xmm7, %r9 nop nop nop nop sub $9354, %rbp lea addresses_UC_ht+0x1c1de, %r10 nop nop nop sub %rbx, %rbx mov (%r10), %ecx nop nop nop nop nop cmp %rdi, %rdi lea addresses_normal_ht+0x1eb5e, %rbx nop nop and $17723, %rsi movb (%rbx), %r9b nop nop sub $20019, %r12 lea addresses_D_ht+0xcc1e, %rdi clflush (%rdi) nop nop nop add %r9, %r9 vmovups (%rdi), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %r12 sub $4874, %r9 lea addresses_WC_ht+0x1c63e, %rsi lea addresses_D_ht+0x1b7de, %rdi nop nop nop nop nop cmp %r12, %r12 mov $52, %rcx rep movsl nop nop nop nop nop sub $42324, %rsi lea addresses_A_ht+0xc1de, %r9 nop nop nop nop xor $22790, %r10 movw $0x6162, (%r9) nop nop nop nop inc %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r8 push %rcx push %rdi push %rsi // Store mov $0xf9e, %rcx nop nop nop nop nop and $13211, %r10 mov $0x5152535455565758, %rdi movq %rdi, (%rcx) nop nop nop nop nop xor %r11, %r11 // Store mov $0x421b7e0000000aae, %rsi nop nop nop nop nop dec %rcx mov $0x5152535455565758, %r10 movq %r10, (%rsi) nop nop nop nop nop sub $60895, %r10 // Load mov $0x6af889000000071e, %rcx nop nop nop sub %rsi, %rsi movups (%rcx), %xmm3 vpextrq $1, %xmm3, %r11 // Exception!!! nop nop nop mov (0), %r10 nop nop nop nop cmp %r10, %r10 // Store lea addresses_US+0x469a, %r8 nop nop nop nop add $34666, %rdi movb $0x51, (%r8) nop add %r8, %r8 // Load lea addresses_RW+0x45de, %r10 nop nop xor $8442, %r13 vmovups (%r10), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %rdi nop add $2238, %rcx // Store lea addresses_A+0x1edfe, %rdi nop nop nop nop nop xor %rcx, %rcx movw $0x5152, (%rdi) nop nop nop cmp $38641, %rcx // Store lea addresses_WC+0x99de, %r8 nop cmp $26770, %rcx mov $0x5152535455565758, %r13 movq %r13, %xmm0 movups %xmm0, (%r8) nop nop add %r13, %r13 // Faulty Load mov $0x3b797c00000001de, %rsi nop nop nop nop sub %rcx, %rcx mov (%rsi), %r8 lea oracles, %rdi and $0xff, %r8 shlq $12, %r8 mov (%rdi,%r8,1), %r8 pop %rsi pop %rdi pop %rcx pop %r8 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': True, 'size': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_P', 'AVXalign': False, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_NC', 'AVXalign': False, 'size': 8}} {'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_NC', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 1}} {'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_RW', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_A', 'AVXalign': False, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WC', 'AVXalign': False, 'size': 16}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32}} {'src': {'same': True, 'congruent': 8, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}} {'src': {'NT': True, 'same': False, 'congruent': 8, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 4}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 5, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
/** * Copyright (C) 2017 MongoDB, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * As a special exception, the copyright holders give permission to link the * code of portions of this program with the OpenSSL library under certain * conditions as described in each individual source file and distribute * linked combinations including the program with the OpenSSL library. You * must comply with the GNU Affero General Public License in all respects for * all of the code used other than as permitted herein. If you modify file(s) * with this exception, you may extend this exception to your version of the * file(s), but you are not obligated to do so. If you do not wish to do so, * delete this exception statement from your version. If you delete this * exception statement from all source files in the program, then also delete * it in the license file. */ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kStorage #include "mongo/platform/basic.h" #include "mongo/db/session.h" #include <vector> #include "mongo/db/concurrency/write_conflict_exception.h" #include "mongo/db/db_raii.h" #include "mongo/db/dbdirectclient.h" #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" #include "mongo/db/ops/update.h" #include "mongo/db/query/get_executor.h" #include "mongo/stdx/memory.h" #include "mongo/util/log.h" #include "mongo/util/mongoutils/str.h" namespace mongo { namespace { boost::optional<SessionTxnRecord> loadSessionRecord(OperationContext* opCtx, const LogicalSessionId& sessionId) { DBDirectClient client(opCtx); Query sessionQuery(BSON(SessionTxnRecord::kSessionIdFieldName << sessionId.toBSON())); auto result = client.findOne(NamespaceString::kSessionTransactionsTableNamespace.ns(), sessionQuery); if (result.isEmpty()) { return boost::none; } IDLParserErrorContext ctx("parse latest txn record for session"); return SessionTxnRecord::parse(ctx, result); } /** * Update the txnNum of the session record. Will create a new entry if the record with * corresponding sessionId does not exist. */ void updateSessionRecordTxnNum(OperationContext* opCtx, const LogicalSessionId& sessionId, const TxnNumber& txnNum) { repl::UnreplicatedWritesBlock doNotReplicateWrites(opCtx); Timestamp zeroTs; AutoGetCollection autoColl(opCtx, NamespaceString::kSessionTransactionsTableNamespace, MODE_IX); uassert(40526, str::stream() << "Unable to persist transaction state because the session transaction " "collection is missing. This indicates that the " << NamespaceString::kSessionTransactionsTableNamespace.ns() << " collection has been manually deleted.", autoColl.getCollection() != nullptr); UpdateRequest updateRequest(NamespaceString::kSessionTransactionsTableNamespace); updateRequest.setQuery(BSON(SessionTxnRecord::kSessionIdFieldName << sessionId.toBSON())); updateRequest.setUpdates(BSON("$set" << BSON(SessionTxnRecord::kTxnNumFieldName << txnNum << SessionTxnRecord::kLastWriteOpTimeTsFieldName << zeroTs))); updateRequest.setUpsert(true); auto updateResult = update(opCtx, autoColl.getDb(), updateRequest); uassert(40527, str::stream() << "Failed to update transaction progress for session " << sessionId, updateResult.numDocsModified >= 1 || !updateResult.upserted.isEmpty()); } } // namespace Session::Session(LogicalSessionId sessionId) : _sessionId(std::move(sessionId)) {} void Session::begin(OperationContext* opCtx, const TxnNumber& txnNumber) { invariant(!opCtx->lockState()->isLocked()); invariant(!opCtx->lockState()->inAWriteUnitOfWork()); if (!_txnRecord) { _txnRecord = loadSessionRecord(opCtx, _sessionId); // Previous read failed to retrieve the txn record, which means it does not exist yet, // so create a new entry. if (!_txnRecord) { updateSessionRecordTxnNum(opCtx, _sessionId, txnNumber); _txnRecord.emplace(); _txnRecord->setSessionId(_sessionId); _txnRecord->setTxnNum(txnNumber); _txnRecord->setLastWriteOpTimeTs(Timestamp()); return; } } uassert(40528, str::stream() << "cannot start transaction with id " << txnNumber << " on session " << _sessionId << " because transaction with id " << _txnRecord->getTxnNum() << " already started", _txnRecord->getTxnNum() <= txnNumber); if (txnNumber > _txnRecord->getTxnNum()) { updateSessionRecordTxnNum(opCtx, _sessionId, txnNumber); _txnRecord->setTxnNum(txnNumber); _txnRecord->setLastWriteOpTimeTs(Timestamp()); } } void Session::saveTxnProgress(OperationContext* opCtx, Timestamp opTimeTs) { // Needs to be in the same write unit of work with the write for this result. invariant(opCtx->lockState()->inAWriteUnitOfWork()); repl::UnreplicatedWritesBlock doNotReplicateWrites(opCtx); AutoGetCollection autoColl(opCtx, NamespaceString::kSessionTransactionsTableNamespace, MODE_IX); auto coll = autoColl.getCollection(); uassert(40529, str::stream() << "Unable to persist transaction state because the session transaction " "collection is missing. This indicates that the " << NamespaceString::kSessionTransactionsTableNamespace.ns() << " collection has been manually deleted.", coll); UpdateRequest updateRequest(NamespaceString::kSessionTransactionsTableNamespace); updateRequest.setQuery(BSON(SessionTxnRecord::kSessionIdFieldName << _sessionId.toBSON() << SessionTxnRecord::kTxnNumFieldName << _txnRecord->getTxnNum())); updateRequest.setUpdates( BSON("$set" << BSON(SessionTxnRecord::kLastWriteOpTimeTsFieldName << opTimeTs))); updateRequest.setUpsert(false); auto updateResult = update(opCtx, autoColl.getDb(), updateRequest); uassert(40530, str::stream() << "Failed to update transaction progress for session " << _sessionId, updateResult.numDocsModified >= 1); _txnRecord->setLastWriteOpTimeTs(opTimeTs); } TxnNumber Session::getTxnNum() const { return _txnRecord->getTxnNum(); } const Timestamp& Session::getLastWriteOpTimeTs() const { return _txnRecord->getLastWriteOpTimeTs(); } TransactionHistoryIterator Session::getWriteHistory(OperationContext* opCtx) const { return TransactionHistoryIterator(getLastWriteOpTimeTs()); } boost::optional<repl::OplogEntry> Session::checkStatementExecuted(OperationContext* opCtx, StmtId stmtId) { if (!opCtx->getTxnNumber()) { return boost::none; } auto it = getWriteHistory(opCtx); while (it.hasNext()) { auto entry = it.next(opCtx); if (entry.getStatementId() == stmtId) { return entry; } } return boost::none; } } // namespace mongo
; A100021: Numbers of the form 3prime(n) - prime(n+1) - 3. ; Submitted by Jon Maiga ; 0,1,5,7,17,19,29,31,37,53,53,67,77,79,85,97,113,113,127,137,137,151,157,167,187,197,199,209,211,209,247,253,269,265,293,293,305,319,325,337,353,349,377,379,389,383,407,439,449,451,457,473,469,493,505,517,533,533,547,557,553,569,607,617,619,617,653,661,689,691,697,707,725,737,751,757,767,787,791,805,833,829,857,857,871,877,887,907,917,919,919,947,967,971,991,997,1003,1037,1025,1073 add $0,2 mov $1,-1 mov $2,1 lpb $0 mov $3,$2 mul $3,2 lpb $3 add $2,1 mov $4,$1 gcd $4,$2 cmp $4,1 cmp $4,0 sub $3,$4 lpe sub $0,1 add $2,1 mul $1,$2 lpe mov $0,$3 sub $0,4
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r8 push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x1bbf9, %rsi lea addresses_UC_ht+0x1b359, %rdi nop nop nop dec %rbx mov $52, %rcx rep movsw nop nop add %rbp, %rbp lea addresses_WC_ht+0x164ff, %rdx nop sub %r8, %r8 movw $0x6162, (%rdx) nop nop xor $36814, %rcx lea addresses_UC_ht+0x198b9, %rsi nop nop nop dec %rbx mov $0x6162636465666768, %r8 movq %r8, %xmm3 movups %xmm3, (%rsi) nop nop nop nop xor $61367, %rbx lea addresses_WT_ht+0x7cc9, %r8 clflush (%r8) nop nop nop nop nop dec %rdx movb (%r8), %bl and %rbx, %rbx lea addresses_WT_ht+0x3eb9, %rcx add $63571, %rdi movw $0x6162, (%rcx) nop sub $1102, %rdi lea addresses_D_ht+0x23f9, %rsi lea addresses_D_ht+0x9ab9, %rdi nop sub %r12, %r12 mov $67, %rcx rep movsl and %r8, %r8 lea addresses_UC_ht+0x10019, %rsi lea addresses_WC_ht+0x13ab9, %rdi nop inc %rdx mov $89, %rcx rep movsl nop nop nop nop xor %rcx, %rcx lea addresses_A_ht+0x131b9, %rsi inc %rcx mov $0x6162636465666768, %rbp movq %rbp, (%rsi) nop nop cmp %rbp, %rbp lea addresses_UC_ht+0xc0e1, %rsi clflush (%rsi) nop nop inc %r8 movups (%rsi), %xmm1 vpextrq $0, %xmm1, %r12 nop cmp %rsi, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r8 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r8 push %r9 push %rbx push %rdi push %rdx // Store lea addresses_normal+0x13ab9, %r13 nop nop nop nop add %rbx, %rbx mov $0x5152535455565758, %r9 movq %r9, %xmm5 movups %xmm5, (%r13) nop cmp %r8, %r8 // Store lea addresses_RW+0x15a3d, %rbx nop nop nop nop nop sub %rdx, %rdx movw $0x5152, (%rbx) nop nop nop nop xor $15297, %r9 // Faulty Load lea addresses_WC+0xeb9, %r10 nop nop and %rdi, %rdi movb (%r10), %r9b lea oracles, %rbx and $0xff, %r9 shlq $12, %r9 mov (%rbx,%r9,1), %r9 pop %rdx pop %rdi pop %rbx pop %r9 pop %r8 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': True, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 8, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 10, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 3, 'size': 16, 'same': False, 'NT': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
#pragma once namespace parsium { namespace mckeeman { template<typename T> concept Name_ = true; }}
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include <qsboost/mpl/aux_/config/compiler.hpp> #include <qsboost/mpl/aux_/config/preprocessor.hpp> #include <qsboost/mpl/aux_/config/workaround.hpp> #include <qsboost/preprocessor/cat.hpp> #include <qsboost/preprocessor/stringize.hpp> #if !defined(QSBOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_PREPROCESSED_HEADER \ QSBOOST_MPL_CFG_COMPILER_DIR/QSBOOST_MPL_PREPROCESSED_HEADER \ /**/ #else # define AUX778076_PREPROCESSED_HEADER \ QSBOOST_PP_CAT(QSBOOST_MPL_CFG_COMPILER_DIR,/)##QSBOOST_MPL_PREPROCESSED_HEADER \ /**/ #endif #if QSBOOST_WORKAROUND(__IBMCPP__, QSBOOST_TESTED_AT(700)) # define AUX778076_INCLUDE_STRING QSBOOST_PP_STRINGIZE(qsboost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) # include AUX778076_INCLUDE_STRING # undef AUX778076_INCLUDE_STRING #else # include QSBOOST_PP_STRINGIZE(qsboost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) #endif # undef AUX778076_PREPROCESSED_HEADER #undef QSBOOST_MPL_PREPROCESSED_HEADER
; ; LibInit.asm library stub to do local init for a Dynamic linked library ; ; NOTE!!!! link this MODULE first or you will be sorry!!!! ; ?PLM=1 ; pascal call convention ?WIN=0 ; Windows prolog/epilog code ?DF=1 PMODE=1 .286 .xlist include cmacros.inc include windows.inc include sysinfo.inc include mmddk.inc include mmsystem.inc include timer.inc ;include vtdapi.inc .list .list sBegin Data ; ; Stuff needed to avoid the C runtime coming in ; ; also known as "MAGIC THAT SAVED ME" - Glenn Steffler 2/7/90 ; ; Do not remove!! ; DD 0 ; So null pointers get 0 maxRsrvPtrs = 5 DW maxRsrvPtrs usedRsrvPtrs = 0 labelDP <PUBLIC,rsrvptrs> DefRsrvPtr MACRO name globalW name,0 usedRsrvPtrs = usedRsrvPtrs + 1 ENDM DefRsrvPtr pLocalHeap ; Local heap pointer DefRsrvPtr pAtomTable ; Atom table pointer DefRsrvPtr pStackTop ; top of stack DefRsrvPtr pStackMin ; minimum value of SP DefRsrvPtr pStackBot ; bottom of stack if maxRsrvPtrs-usedRsrvPtrs DW maxRsrvPtrs-usedRsrvPtrs DUP (0) endif public __acrtused __acrtused = 1 sEnd Data ; ; ; END of nasty stuff... ; externA WinFlags externFP LocalInit externFP Disable286 externFP Enable286 externW wMaxResolution externW wMinPeriod ; here lies the global data sBegin Data public wEnabled wEnabled dw 0 ; enable = 1 ;disable = 0 public PS2_MCA ifdef NEC_98 PS2_MCA db 0 ; Micro Channel Flag public bClockFlag ; save machine clock bClockFlag db 0 ; 5Mhz = 0 ; 8Mhz = other else ; NEC_98 PS2_MCA db ? ; Micro Channel Flag endif ; NEC_98 sEnd Data assumes es,nothing sBegin CodeInit assumes cs,CodeInit assumes ds,Data ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Library unload function ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Disable routine is same as WEP cProc WEP,<FAR,PUBLIC>,<> ; parmW silly_param cBegin nogen errn$ Disable cEnd nogen cProc Disable,<FAR,PUBLIC>,<> ; parmW silly_param cBegin nogen push ds mov ax,DGROUP ; set up DS==DGROUP for exported funcs mov ds,ax assumes ds,Data xor ax,ax ; return value = no error cmp wEnabled,ax ; Q: enabled ? jz dis_done ; N: exit mov wEnabled,ax ; disabled now mov ax,WinFlags test ax,WF_WIN386 jnz dis_386 ; running under win286 dis_286: call Disable286 jmp dis_done ; running under win386 dis_386: call Disable286 dis_done: pop ds ret 2 cEnd nogen ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Library Enable function ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; cProc Enable,<FAR,PUBLIC>,<> ; parmW silly_param cBegin nogen mov ax,wEnabled or ax,ax ; Q: already enabled ? jnz enable_done ; Y: exit inc wEnabled ; mark as being enabled ifdef NEC_98 ; ; Get system clock ; mov ax,0002h mov bx,0040h ; get segment addres ; make descriptor(real mode segment) ; return the segment descriptor ; in the case of exist the appointed segment descriptor already ; (not make sure repeatedly) int 31h jc error_exit ; in the case of failed ->jmp push es mov es,ax mov al,byte ptr es:[101h] ; get system info and al,80h mov byte ptr bClockFlag,al ; save clock pop es endif ; NEC_98 mov ax,WinFlags test ax,WF_WIN386 jnz enable_386 ; running under win286 enable_286: call Enable286 jmp enable_done ; running under win386 enable_386: call Enable286 enable_done: ret 2 ifdef NEC_98 error_exit: dec wEnabled ; mark as being enabled xor ax,ax ret 2 endif ; NEC_98 cEnd nogen ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Library entry point ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; public LibInit LibInit proc far ; CX = size of heap ; DI = module handle ; DS = automatic data segment ; ES:SI = address of command line (not used) jcxz lib_heapok ; heap size zero? jump over unneeded LocalInit call cCall LocalInit,<ds,ax,cx> ; dataseg, 0, heapsize or ax,ax jnz lib_heapok ; if heap set continue on lib_error: xor ax,ax ret ; return FALSE (ax = 0) -- couldn't init lib_heapok: mov ax,WinFlags test ax,WF_WIN386 jnz lib_386 ; running under win286 lib_286: call Lib286Init jmp lib_realdone ; win 286 will enable timer on first event request ; running under win386 lib_386: call Lib286Init lib_realdone: ret LibInit endp sEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Win 386 timer VTD code for initialization, and removal ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; externFP GetVersion ; in KERNEL externFP MessageBox ; in USER externFP LoadString ; in USER sBegin CodeInit assumes cs,CodeInit assumes ds,Data ;externNP VTDAPI_GetEntryPt ; Assumes DI contains module handle cProc WarningMessage <NEAR,PASCAL> <> LocalV aszErrorTitle, 32 LocalV aszErrorMsg, 256 cBegin lea ax, WORD PTR aszErrorTitle cCall LoadString, <di, IDS_ERRORTITLE, ss, ax, 32> lea ax, WORD PTR aszErrorMsg cCall LoadString, <di, IDS_ERRORTEXT, ss, ax, 256> lea ax, WORD PTR aszErrorTitle lea bx, WORD PTR aszErrorMsg cCall MessageBox, <NULL, ss, bx, ss, ax, MB_SYSTEMMODAL+MB_OK+MB_ICONHAND> cEnd if 0 Lib386Init proc near call VTDAPI_GetEntryPt ; this will return 0 if the VxD is not loaded or ax,ax jnz Lib386InitOk ifndef NEC_98 DOUT <TIMER: *** unable to find vtdapi.386 ***> endif ; NEC_98 ; ; warn the USER that we can't find our VxD, under windows 3.0 ; we can't bring up a message box, so only do this in win 3.1 ; cCall GetVersion xchg al,ah cmp ax,030Ah jb Lib386InitFail cCall WarningMessage,<> Lib386InitFail: xor ax,ax Lib386InitOk: ret Lib386Init endp endif Disable386 proc near errn$ Enable386 ; fall through Disable386 endp Enable386 proc near mov ax,1 ; nothing to do ret Enable386 endp sEnd Code386 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Win 286 timer drv code for initialization, and removal ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; externW Events externFP tddISR ; in local.asm externFP GlobalWire ; in KERNEL externFP GlobalPageLock ; in KERNEL sBegin CodeInit assumes cs,CodeInit assumes ds,Data Lib286Init proc near ; get the system configuration ; ; the FIXED_286 segment is not loaded, load it and pagelock it. ; mov dx,seg tddISR ; get the 286 code segment mov es,dx mov ax,es:[0] ; load it! cCall GlobalWire, <dx> ; get it low in memory cCall GlobalPageLock, <dx> ; and nail it down! ifndef NEC_98 mov PS2_MCA,0 ; Initialize PS2_MCA = FALSE stc ; Set this in case BIOS doesn't mov ah,GetSystemConfig int 15h jc Lib286Init_NoMicroChannel ; Successful call? or ah,ah ; Valid return? jnz Lib286Init_NoMicroChannel test es:[bx.SD_feature1],SF1_MicroChnPresent jz Lib286Init_NoMicroChannel inc PS2_MCA ; PS2_MCA = TRUE endif ; NEC_98 Lib286Init_NoMicroChannel: push di push ds pop es mov di,DataOFFSET Events ; ES:DI --> Events xor ax,ax mov cx,(MAXEVENTS * SizeEvent)/2 rep stosw ; zero out event structures. ; set up one event as the standard call-back routine for the ; BIOS timer service ; ifdef NEC_98 mov ax,0002h mov bx,0040h int 31h jc error_init push es mov es,ax test byte ptr es:[101h],80h pop es mov cx,0f000h jz @f mov cx,0c300h @@: xor bx,bx else ; NEC_98 xor bx,bx ; BX:CX = 64k xor cx,cx inc bx endif ; NEC_98 mov di,DataOFFSET Events ; DS:DI --> Events mov [di].evTime.lo,cx ; Program next at ~= 55ms mov [di].evTime.hi,bx ; standard 18.2 times per second event mov [di].evDelay.lo,cx ; First event will be set off mov [di].evDelay.hi,bx ; at 55ms (65536 ticks) mov [di].evResolution,TDD_MINRESOLUTION ; Allow 55ms either way mov [di].evFlags,TIME_BIOSEVENT+TIME_PERIODIC mov ax,WinFlags test ax,WF_CPU286 jz @f mov wMaxResolution,TDD_MAX286RESOLUTION mov wMinPeriod,TDD_MIN286PERIOD @@: ifdef NEC_98 mov ax,0001h else ; NEC_98 mov ax,bx ; Return TRUE endif ; NEC_98 mov [di].evID,ax ; enable event pop di ret ifdef NEC_98 error_init: xor ax,ax pop di ret endif ; NEC_98 Lib286Init endp sEnd end LibInit
.size 8000 .text@48 jp lstatint .text@100 jp lbegin .data@143 c0 .text@150 lbegin: ld a, 00 ldff(ff), a ld a, 30 ldff(00), a ld a, 01 ldff(4d), a stop, 00 ld c, 41 ld b, 02 ld d, 03 lbegin_waitm2: ldff a, (c) and a, d cmp a, b jrnz lbegin_waitm2 ld a, 08 ldff(c), a ld a, 02 ldff(ff), a ei ld hl, 8000 ld a, 01 .text@1000 lstatint: nop .text@10d8 ld(hl), a ld a, (hl) and a, 07 jp lprint_a .text@7000 lprint_a: push af ld b, 91 call lwaitly_b xor a, a ldff(40), a pop af ld(9800), a ld bc, 7a00 ld hl, 8000 ld d, a0 lprint_copytiles: ld a, (bc) inc bc ld(hl++), a dec d jrnz lprint_copytiles ld a, c0 ldff(47), a ld a, 80 ldff(68), a ld a, ff ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a xor a, a ldff(69), a ldff(69), a ldff(43), a ld a, 91 ldff(40), a lprint_limbo: jr lprint_limbo .text@7400 lwaitly_b: ld c, 44 lwaitly_b_loop: ldff a, (c) cmp a, b jrnz lwaitly_b_loop ret .data@7a00 00 00 7f 7f 41 41 41 41 41 41 41 41 41 41 7f 7f 00 00 08 08 08 08 08 08 08 08 08 08 08 08 08 08 00 00 7f 7f 01 01 01 01 7f 7f 40 40 40 40 7f 7f 00 00 7f 7f 01 01 01 01 3f 3f 01 01 01 01 7f 7f 00 00 41 41 41 41 41 41 7f 7f 01 01 01 01 01 01 00 00 7f 7f 40 40 40 40 7e 7e 01 01 01 01 7e 7e 00 00 7f 7f 40 40 40 40 7f 7f 41 41 41 41 7f 7f 00 00 7f 7f 01 01 02 02 04 04 08 08 10 10 10 10 00 00 3e 3e 41 41 41 41 3e 3e 41 41 41 41 3e 3e 00 00 7f 7f 41 41 41 41 7f 7f 01 01 01 01 7f 7f
* Find entry for a BASIC channel V0.4  1984 Tony Tebby QJUMP * section utils * xdef ut_chanv find vacant hole xdef ut_chanf find or create #n xdef ut_chanp preset channel entry at D4 * xref ut_chget get channel * include dev8_sbsext_ext_keys * ut_chanv moveq #ch.lench,d3 moveq #3,d6 start at channel #3 moveq #3*ch.lench,d4 add.l bv_chbas(a6),d4 start address in table utcv_loop cmp.l bv_chp(a6),d4 is pointer off end of table? bge.s utc_extn ... yes, extend the table tst.w ch.id+2(a6,d4.l) check if vacant blt.s utc_pres ... yes, preset it addq.w #1,d6 next entry add.l d3,d4 bra.s utcv_loop * ut_chanf bsr.l ut_chget get channel beq.s utc_close ... its open!! moveq #err.no,d1 not open? cmp.l d1,d0 bne.s utc_rts ... no ut_chanp utc_extn move.l d4,d1 is channel within table? sub.l bv_chp(a6),d1 blt.s utc_pres ... yes, preset entry * sub.l bv_chbas(a6),d4 moveq #ch.lench,d3 space for one extra channel add.l d3,d1 ... no, allocate enough space move.l bv..chrix*3+qlv.off+2,a2 jsr bvo_chch(a2) in channel area add.l bv_chbas(a6),d4 * move.l bv_chp(a6),a2 now fill the id in each entry moveq #-1,d0 with -1 utc_sid move.l d0,ch.id(a6,a2.l) put it in add.w #ch.lench,a2 move to next entry cmp.l d4,a2 off end yet? ble.s utc_sid move.l a2,bv_chp(a6) save new top pointer bra.s utc_pres * utc_close moveq #io.close,d0 close channel trap #2 * utc_pres moveq #ch.lench,d3 preset all entrys add.l d3,d4 move to end utc_cldef subq.l #4,d4 clr.l (a6,d4.l) to zero subq.l #4,d3 bgt.s utc_cldef * not.l ch.id(a6,d4.l) except channel ID move.w #80,ch.width(a6,d4.l) and default width moveq #0,d0 utc_rts rts end
//================================================================================================= /*! // \file src/mathtest/dvecdvecmult/V6bVDb.cpp // \brief Source file for the V6bVDb dense vector/dense vector multiplication math test // // Copyright (C) 2012-2017 Klaus Iglberger - All Rights Reserved // // This file is part of the Blaze library. You can redistribute it and/or modify it under // the terms of the New (Revised) BSD License. Redistribution and use in source and binary // forms, with or without modification, are permitted provided that the following conditions // are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. // 2. 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. // 3. Neither the names of the Blaze development group 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 HOLDER 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. */ //================================================================================================= //************************************************************************************************* // Includes //************************************************************************************************* #include <cstdlib> #include <iostream> #include <blaze/math/DynamicVector.h> #include <blaze/math/StaticVector.h> #include <blazetest/mathtest/Creator.h> #include <blazetest/mathtest/dvecdvecmult/OperationTest.h> #include <blazetest/system/MathTest.h> //================================================================================================= // // MAIN FUNCTION // //================================================================================================= //************************************************************************************************* int main() { std::cout << " Running 'V6bVDb'..." << std::endl; using blazetest::mathtest::TypeB; try { // Vector type definitions typedef blaze::StaticVector<TypeB,6UL> V6b; typedef blaze::DynamicVector<TypeB> VDb; // Creator type definitions typedef blazetest::Creator<V6b> CV6b; typedef blazetest::Creator<VDb> CVDb; // Running the tests RUN_DVECDVECMULT_OPERATION_TEST( CV6b(), CVDb( 6UL ) ); } catch( std::exception& ex ) { std::cerr << "\n\n ERROR DETECTED during dense vector/dense vector multiplication:\n" << ex.what() << "\n"; return EXIT_FAILURE; } return EXIT_SUCCESS; } //*************************************************************************************************
;================================================================================ ; Utility Functions ;================================================================================ !PROGRESSIVE_SHIELD = "$7EF416" ; ss-- ---- ;-------------------------------------------------------------------------------- ; GetSpriteTile ; in: A - Loot ID ; out: A - Sprite GFX ID ;-------------------------------------------------------------------------------- GetSpriteID: JSR AttemptItemSubstitution CMP.b #$16 : BEQ .bottle ; Bottle CMP.b #$2B : BEQ .bottle ; Red Potion w/bottle CMP.b #$2C : BEQ .bottle ; Green Potion w/bottle CMP.b #$2D : BEQ .bottle ; Blue Potion w/bottle CMP.b #$3C : BEQ .bottle ; Bee w/bottle CMP.b #$3D : BEQ .bottle ; Fairy w/bottle CMP.b #$48 : BEQ .bottle ; Gold Bee w/bottle CMP.b #$6D : BEQ .server_F0 ; Server Request F0 CMP.b #$6E : BEQ .server_F1 ; Server Request F1 CMP.b #$6F : BEQ .server_F2 ; Server Request F2 BRA .normal .bottle PHA : JSR.w CountBottles : CMP.l BottleLimit : !BLT + PLA : LDA.l BottleLimitReplacement JSL.l GetSpriteID RTL + PLA : BRA .normal .server_F0 JSL.l ItemVisualServiceRequest_F0 BRA .normal .server_F1 JSL.l ItemVisualServiceRequest_F1 BRA .normal .server_F2 JSL.l ItemVisualServiceRequest_F2 .normal PHX PHB : PHK : PLB ;-------- TAX : LDA.l .gfxSlots, X ; look up item gfx PLB : PLX CMP.b #$F8 : !BGE .specialHandling RTL .specialHandling CMP.b #$F9 : BNE ++ ; Progressive Magic LDA.l $7EF37B : BNE +++ LDA.b #$3B : RTL ; Half Magic +++ LDA.b #$3C : RTL ; Quarter Magic ++ CMP.b #$FA : BNE ++ ; RNG Item (Single) JSL.l GetRNGItemSingle : JMP GetSpriteID ++ CMP.b #$FB : BNE ++ ; RNG Item (Multi) JSL.l GetRNGItemMulti : JMP GetSpriteID ++ CMP.b #$FD : BNE ++ ; Progressive Armor LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT + ; Progressive Armor Limit LDA.l ProgressiveArmorReplacement JSL.l GetSpriteID RTL + LDA.b #$04 : RTL ++ CMP.b #$FE : BNE ++ ; Progressive Sword LDA $7EF359 CMP.l ProgressiveSwordLimit : !BLT + ; Progressive Sword Limit LDA.l ProgressiveSwordReplacement JSL.l GetSpriteID RTL + : CMP.b #$00 : BNE + ; No Sword LDA.b #$43 : RTL + : CMP.b #$01 : BNE + ; Fighter Sword LDA.b #$44 : RTL + : CMP.b #$02 : BNE + ; Master Sword LDA.b #$45 : RTL + ; CMP.b #$03 : BNE + ; Tempered Sword LDA.b #$46 : RTL + ++ : CMP.b #$FF : BNE ++ ; Progressive Shield LDA !PROGRESSIVE_SHIELD : AND #$C0 : LSR #6 CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit LDA.l ProgressiveShieldReplacement JSL.l GetSpriteID RTL + : CMP.b #$00 : BNE + ; No Shield LDA.b #$2D : RTL + : CMP.b #$01 : BNE + ; Fighter Shield LDA.b #$20 : RTL + ; Everything Else LDA.b #$2E : RTL ++ : CMP.b #$F8 : BNE ++ ; Progressive Bow LDA $7EF340 CMP.b #$00 : BNE + ; No Bow LDA.b #$29 : RTL + ; Any Bow LDA.b #$2A : RTL ++ RTL ;DATA - Loot Identifier to Sprite ID { .gfxSlots db $06, $44, $45, $46, $2D, $20, $2E, $09 db $09, $0A, $08, $05, $10, $0B, $2C, $1B db $1A, $1C, $14, $19, $0C, $07, $1D, $2F db $07, $15, $12, $0D, $0D, $0E, $11, $17 db $28, $27, $04, $04, $0F, $16, $03, $13 db $01, $1E, $10, $00, $00, $00, $00, $00 db $00, $30, $22, $21, $24, $24, $24, $23 db $23, $23, $29, $2A, $2C, $2B, $03, $03 db $34, $35, $31, $33, $02, $32, $36, $37 db $2C, $43, $0C, $38, $39, $3A, $F9, $3C ; db $2C, $06, $0C, $38, $FF, $FF, $FF, $FF ;5x db $44 ; Safe Master Sword db $3D, $3E, $3F, $40 ; Bomb & Arrow +5/+10 db $2C, $00, $00 ; 3x Programmable Item db $41 ; Upgrade-Only Silver Arrows db $24 ; 1 Rupoor db $47 ; Null Item db $48, $48, $48 ; Red, Blue & Green Clocks db $FE, $FF ; Progressive Sword & Shield ;6x db $FD, $0D ; Progressive Armor & Gloves db $FA, $FB ; RNG Single & Multi db $F8, $F8 ; Progressive Bow x2 db $FF, $FF, $FF, $FF ; Unused db $49, $4A, $49 ; Goal Item Single, Multi & Alt Multi db $39, $39, $39 ; Server Request F0, F1, F2 ;7x db $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21 ; Free Map ;8x db $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16 ; Free Compass ;9x db $22, $22, $22, $22, $22, $22, $22, $22, $22, $22, $22, $22, $22, $22, $22, $22 ; Free Big Key ;Ax db $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F ; Free Small Key db $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49 ; Unused db $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49 ; Unused db $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49 ; Unused db $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49 ; Unused db $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49, $49 ; Reserved } ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; GetSpritePalette ; in: A - Loot ID ; out: A - Palette ;-------------------------------------------------------------------------------- GetSpritePalette: JSR AttemptItemSubstitution CMP.b #$16 : BEQ .bottle ; Bottle CMP.b #$2B : BEQ .bottle ; Red Potion w/bottle CMP.b #$2C : BEQ .bottle ; Green Potion w/bottle CMP.b #$2D : BEQ .bottle ; Blue Potion w/bottle CMP.b #$3C : BEQ .bottle ; Bee w/bottle CMP.b #$3D : BEQ .bottle ; Fairy w/bottle CMP.b #$48 : BEQ .bottle ; Gold Bee w/bottle BRA .notBottle .bottle PHA : JSR.w CountBottles : CMP.l BottleLimit : !BLT + PLA : LDA.l BottleLimitReplacement JSL.l GetSpritePalette RTL + PLA : .notBottle PHX PHB : PHK : PLB ;-------- TAX : LDA.l .gfxPalettes, X ; look up item gfx PLB : PLX CMP.b #$F8 : !BGE .specialHandling RTL .specialHandling CMP.b #$FD : BNE ++ ; Progressive Sword LDA $7EF359 CMP.l ProgressiveSwordLimit : !BLT + ; Progressive Sword Limit LDA.l ProgressiveSwordReplacement JSL.l GetSpritePalette RTL + : CMP.b #$00 : BNE + ; No Sword LDA.b #$04 : RTL + : CMP.b #$01 : BNE + ; Fighter Sword LDA.b #$04 : RTL + : CMP.b #$02 : BNE + ; Master Sword LDA.b #$02 : RTL + ; Everything Else LDA.b #$08 : RTL ++ : CMP.b #$FE : BNE ++ ; Progressive Shield LDA !PROGRESSIVE_SHIELD : AND #$C0 : LSR #6 CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit LDA.l ProgressiveShieldReplacement JSL.l GetSpritePalette RTL + : CMP.b #$00 : BNE + ; No Shield LDA.b #$04 : RTL + : CMP.b #$01 : BNE + ; Fighter Shield LDA.b #$02 : RTL + ; Everything Else LDA.b #$08 : RTL ++ : CMP.b #$FF : BNE ++ ; Progressive Armor LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT + ; Progressive Armor Limit LDA.l ProgressiveArmorReplacement JSL.l GetSpritePalette RTL + : CMP.b #$00 : BNE + ; Green Tunic LDA.b #$04 : RTL + ; Everything Else LDA.b #$02 : RTL ++ : CMP.b #$FC : BNE ++ ; Progressive Gloves LDA $7EF354 : BNE + ; No Gloves LDA.b #$02 : RTL + ; Everything Else LDA.b #$08 : RTL ++ : CMP.b #$F8 : BNE ++ ; Progressive Bow LDA $7EF354 : BNE + ; No Bow LDA.b #$08 : RTL + ; Any Bow LDA.b #$02 : RTL ++ : CMP.b #$FA : BNE ++ ; RNG Item (Single) JSL.l GetRNGItemSingle : JMP GetSpritePalette ++ : CMP.b #$FB : BNE ++ ; RNG Item (Multi) JSL.l GetRNGItemMulti : JMP GetSpritePalette ++ RTL ;DATA - Loot Identifier to Sprite Palette { .gfxPalettes db $00, $04, $02, $08, $04, $02, $08, $02 db $04, $02, $02, $02, $04, $04, $04, $08 db $08, $08, $02, $02, $04, $02, $02, $02 db $04, $02, $04, $02, $08, $08, $04, $02 db $0A, $02, $04, $02, $04, $04, $00, $04 db $04, $08, $02, $02, $08, $04, $02, $08 db $04, $04, $08, $08, $08, $04, $02, $08 db $02, $04, $08, $02, $04, $04, $02, $02 db $08, $08, $02, $04, $04, $08, $08, $08 db $04, $04, $04, $02, $08, $08, $08, $08 ; db $04, $0A, $04, $02, $FF, $FF, $FF, $FF db $04 ; Safe Master Sword db $08, $08, $08, $08 ; Bomb & Arrow +5/+10 db $04, $00, $00 ; Programmable Items 1-3 db $02 ; Upgrade-Only Silver Arrows db $06 ; 1 Rupoor db $02 ; Null Item db $02, $04, $08 ; Red, Blue & Green Clocks db $FD, $FE, $FF, $FC ; Progressive Sword, Shield, Armor & Gloves db $FA, $FB ; RNG Single & Multi db $F8, $F8 ; Progressive Bow db $00, $00, $00, $00 ; Unused db $08, $08, $08 ; Goal Item Single, Multi & Alt Multi db $04, $04, $04 ; Server Request F0, F1, F2 db $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 ; Free Map db $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04 ; Free Compass ;db $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 ; *EVENT* db $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 ; Free Big Key db $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 ; Free Small Key db $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 ; Unused db $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 ; Unused db $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 ; Unused db $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 ; Unused db $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 ; Unused } ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; IsNarrowSprite ; in: A - Loot ID ; out: Carry - 0 = Full, 1 = Narrow ;-------------------------------------------------------------------------------- IsNarrowSprite: PHA : PHX PHB : PHK : PLB JSR AttemptItemSubstitution ;-------- CMP.b #$16 : BEQ .bottle ; Bottle CMP.b #$2B : BEQ .bottle ; Red Potion w/bottle CMP.b #$2C : BEQ .bottle ; Green Potion w/bottle CMP.b #$2D : BEQ .bottle ; Blue Potion w/bottle CMP.b #$3C : BEQ .bottle ; Bee w/bottle CMP.b #$3D : BEQ .bottle ; Fairy w/bottle CMP.b #$48 : BEQ .bottle ; Gold Bee w/bottle BRA .notBottle .bottle JSR.w CountBottles : CMP.l BottleLimit : !BLT + LDA.l BottleLimitReplacement JSL.l IsNarrowSprite JMP .done + : BRA .continue .notBottle CMP.b #$5E : BNE ++ ; Progressive Sword LDA $7EF359 : CMP.l ProgressiveSwordLimit : !BLT + ; Progressive Sword Limit LDA.l ProgressiveSwordReplacement JSL.l IsNarrowSprite BRA .done + : BRA .continue ++ : CMP.b #$5F : BNE ++ ; Progressive Shield LDA !PROGRESSIVE_SHIELD : AND #$C0 : BNE + : SEC : BRA .done ; No Shield LSR #6 : CMP.l ProgressiveShieldLimit : !BLT + ; Progressive Shield Limit LDA.l ProgressiveShieldReplacement JSL.l IsNarrowSprite BRA .done + ;LDA $7EF35A : BNE + : SEC : BRA .done : +; No Shield BRA .false ; Everything Else ++ CMP.b #$60 : BNE ++ ; Progressive Armor LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT + ; Progressive Armor Limit LDA.l ProgressiveArmorReplacement JSL.l IsNarrowSprite BRA .done + ++ CMP.b #$62 : BNE ++ ; RNG Item (Single) JSL.l GetRNGItemSingle : BRA .continue ++ CMP.b #$63 : BNE ++ ; RNG Item (Multi) JSL.l GetRNGItemMulti ++ .continue ;-------- LDX.b #$00 ; set index counter to 0 ;---- - CPX.b #$24 : !BGE .false ; finish if we've done the whole list CMP.l .smallSprites, X : BNE + ; skip to next if we don't match ;-- SEC ; set true state BRA .done ; we're done ;-- + INX ; increment index BRA - ; go back to beginning of loop ;---- .false CLC .done PLB : PLX : PLA RTL ;DATA - Half-Size Sprite Markers { .smallSprites db $04, $07, $08, $09, $0A, $0B, $0C, $13 db $15, $18, $24, $2A, $34, $35, $36, $42 db $43, $45, $59, $A0, $A1, $A2, $A3, $A4 db $A5, $A6, $A7, $A8, $A9, $AA, $AB, $AC db $AD, $AE, $AF, $FF, $FF, $FF, $FF, $FF } ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; PrepDynamicTile ; in: A - Loot ID ;-------------------------------------------------------------------------------- 20/8477 PrepDynamicTile: PHA : PHX : PHY JSR.w LoadDynamicTileOAMTable JSL.l GetSpriteID ; convert loot id to sprite id JSL.l GetAnimatedSpriteTile_variable PLY : PLX : PLA RTL ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; LoadDynamicTileOAMTable ; in: A - Loot ID ;-------------------------------------------------------------------------------- 20/847B !SPRITE_OAM = "$7EC025" ;-------------------------------------------------------------------------------- LoadDynamicTileOAMTable: PHA : PHP PHA REP #$20 ; set 16-bit accumulator LDA.w #$0000 : STA.l !SPRITE_OAM STA.l !SPRITE_OAM+2 LDA.w #$0200 : STA.l !SPRITE_OAM+6 SEP #$20 ; set 8-bit accumulator LDA.b #$24 : STA.l !SPRITE_OAM+4 LDA $01,s JSL.l GetSpritePalette STA !SPRITE_OAM+5 : STA !SPRITE_OAM+13 PLA JSL.l IsNarrowSprite : BCS .narrow BRA .done .narrow REP #$20 ; set 16-bit accumulator LDA.w #$0000 : STA.l !SPRITE_OAM+7 STA.l !SPRITE_OAM+14 LDA.w #$0800 : STA.l !SPRITE_OAM+9 LDA.w #$3400 : STA.l !SPRITE_OAM+11 .done PLP : PLA RTS ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; DrawDynamicTile ; in: A - Loot ID ; out: A - OAM Slots Taken ;-------------------------------------------------------------------------------- ; This wastes two OAM slots if you don't want a shadow - fix later - I wrote "fix later" over a year ago and it's still not fixed (Aug 6, 2017) - lol (May 25th, 2019) ;-------------------------------------------------------------------------------- 2084B8 !SPRITE_OAM = "$7EC025" !SKIP_EOR = "$7F5008" ;-------------------------------------------------------------------------------- DrawDynamicTile: JSL.l IsNarrowSprite : BCS .narrow .full LDA.b #$01 : STA $06 LDA #$0C : JSL.l OAM_AllocateFromRegionC LDA #$02 : PHA BRA .draw .narrow LDA.b #$02 : STA $06 LDA #$10 : JSL.l OAM_AllocateFromRegionC LDA #$03 : PHA .draw LDA.b #!SPRITE_OAM>>0 : STA $08 LDA.b #!SPRITE_OAM>>8 : STA $09 STZ $07 LDA #$7E : PHB : PHA : PLB LDA.b #$01 : STA.l !SKIP_EOR JSL Sprite_DrawMultiple_quantity_preset LDA.b #$00 : STA.l !SKIP_EOR PLB LDA $90 : !ADD.b #$08 : STA $90 ; leave the pointer in the right spot to draw the shadow, if desired LDA $92 : INC #2 : STA $92 PLA RTL ;-------------------------------------------------------------------------------- DrawDynamicTileNoShadow: JSL.l IsNarrowSprite : BCS .narrow .full LDA.b #$01 : STA $06 LDA #$04 : JSL.l OAM_AllocateFromRegionC BRA .draw .narrow LDA.b #$02 : STA $06 LDA #$08 : JSL.l OAM_AllocateFromRegionC .draw LDA.b #!SPRITE_OAM>>0 : STA $08 LDA.b #!SPRITE_OAM>>8 : STA $09 STZ $07 LDA #$7E : PHB : PHA : PLB LDA.b #$01 : STA.l !SKIP_EOR JSL Sprite_DrawMultiple_quantity_preset LDA Bob : BNE + : LDA.b #$00 : STA.l !SKIP_EOR : + ; Bob fix is conditional PLB LDA $90 : !ADD.b #$08 : STA $90 LDA $92 : INC #2 : STA $92 RTL ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- !TILE_UPLOAD_OFFSET_OVERRIDE = "$7F5042" LoadModifiedTileBufferAddress: PHA LDA !TILE_UPLOAD_OFFSET_OVERRIDE : BEQ + TAX LDY.w #$0002 LDA.w #$0000 : STA !TILE_UPLOAD_OFFSET_OVERRIDE BRA .done + LDX.w #$2D40 LDY.w #$0002 .done PLA RTL ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; Sprite_IsOnscreen ; in: X - Sprite Slot ; out: Carry - 1 = On Screen, 0 = Off Screen ;-------------------------------------------------------------------------------- Sprite_IsOnscreen: JSR _Sprite_IsOnscreen_DoWork BCS + REP #$20 LDA $E2 : PHA : !SUB.w #$0F : STA $E2 LDA $E8 : PHA : !SUB.w #$0F : STA $E8 SEP #$20 JSR _Sprite_IsOnscreen_DoWork REP #$20 PLA : STA $E8 PLA : STA $E2 SEP #$20 + RTL _Sprite_IsOnscreen_DoWork: LDA $0D10, X : CMP $E2 LDA $0D30, X : SBC $E3 : BNE .offscreen LDA $0D00, X : CMP $E8 LDA $0D20, X : SBC $E9 : BNE .offscreen SEC RTS .offscreen CLC RTS ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; Sprite_GetScreenRelativeCoords: ; out: $00.w Sprite Y ; out: $02.w Sprite X ; out: $06.b Sprite Y Relative ; out: $07.b Sprite X Relative ;-------------------------------------------------------------------------------- ; Copied from bank $06 ;-------------------------------------------------------------------------------- !spr_y_lo = $00 !spr_y_hi = $01 !spr_x_lo = $02 !spr_x_hi = $03 !spr_y_screen_rel = $06 !spr_x_screen_rel = $07 ;-------------------------------------------------------------------------------- Sprite_GetScreenRelativeCoords: STY $0B STA $08 LDA $0D00, X : STA $00 !SUB $E8 : STA $06 LDA $0D20, X : STA $01 LDA $0D10, X : STA $02 !SUB $E2 : STA $07 LDA $0D30, X : STA $03 RTL ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; SkipDrawEOR - Shims in Bank05.asm : 2499 ;-------------------------------------------------------------------------------- !SKIP_EOR = "$7F5008" ;-------------------------------------------------------------------------------- SkipDrawEOR: LDA.l !SKIP_EOR : BEQ .normal LDA.w #$0000 : STA.l !SKIP_EOR LDA $04 : AND.w #$F0FF : STA $04 .normal LDA ($08), Y : EOR $04 ; thing we wrote over RTL ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; HexToDec ; in: A(w) - Word to Convert ; out: $7F5003 - $7F5007 (high - low) ;-------------------------------------------------------------------------------- HexToDec: PHA PHA LDA.w #$9090 STA $04 : STA $06 ; temporarily store our decimal values here for speed PLA ; as far as i can tell we never convert a value larger than 9999, no point in wasting time on this? ; - ; CMP.w #10000 : !BLT + ; INC $03 ; !SUB.w #10000 : BRA - ; + - CMP.w #1000 : !BLT + INC $04 !SUB.w #1000 : BRA - + - CMP.w #100 : !BLT + INC $05 !SUB.w #100 : BRA - + - CMP.w #10 : !BLT + INC $06 !SUB.w #10 : BRA - + - CMP.w #1 : !BLT + INC $07 !SUB.w #1 : BRA - + LDA.b $04 : STA $7F5004 ; move to digit storage LDA.b $06 : STA $7F5006 PLA RTL ;-------------------------------------------------------------------------------- ; CountBits ; in: A(b) - Byte to count bits in ; out: A(b) - sum of bits ; caller is responsible for setting 8-bit mode and preserving X and Y ;-------------------------------------------------------------------------------- CountBits: PHX TAX ; Save a copy of value LSR #4 ; Shift down hi nybble, Leave <3> in C PHA ; And save <7:4> in Stack TXA ; Recover value AND.b #$07 ; Put out <2:0> in X TAX ; And save in X LDA.l NybbleBitCounts, X ; Fetch count for <2:0> PLX ; get <7:4> ADC.l NybbleBitCounts, X ; Add count for S & C PLX RTL ; Look up table of bit counts in the values $00-$0F NybbleBitCounts: db #00, #01, #01, #02, #01, #02, #02, #03, #01, #02, #02, #03, #02, #03, #03, #04 ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; HexToDec ; in: A(w) - Word to Convert ; out: $7F5003 - $7F5007 (high - low) ;-------------------------------------------------------------------------------- ;HexToDec: ; PHA ; PHA ; LDA.w #$9090 ; STA $7F5003 : STA $7F5005 : STA $7F5006 ; clear digit storage ; PLA ; - ; CMP.w #10000 : !BLT + ; PHA : SEP #$20 : LDA $7F5003 : INC : STA $7F5003 : REP #$20 : PLA ; !SUB.w #10000 : BRA - ; + - ; CMP.w #1000 : !BLT + ; PHA : SEP #$20 : LDA $7F5004 : INC : STA $7F5004 : REP #$20 : PLA ; !SUB.w #1000 : BRA - ; + - ; CMP.w #100 : !BLT + ; PHA : SEP #$20 : LDA $7F5005 : INC : STA $7F5005 : REP #$20 : PLA ; !SUB.w #100 : BRA - ; + - ; CMP.w #10 : !BLT + ; PHA : SEP #$20 : LDA $7F5006 : INC : STA $7F5006 : REP #$20 : PLA ; !SUB.w #10 : BRA - ; + - ; CMP.w #1 : !BLT + ; PHA : SEP #$20 : LDA $7F5007 : INC : STA $7F5007 : REP #$20 : PLA ; !SUB.w #1 : BRA - ; + ; PLA ;RTL ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; WriteVRAMStripe ; in: A(w) - VRAM Destination ; in: X(w) - Length in Tiles ; in: Y(w) - Word to Write ;-------------------------------------------------------------------------------- WriteVRAMStripe: PHX LDX $1000 ; get pointer AND.w #$7F : STA $1002, X : INX #2 ; set destination PLA : ASL : AND.w #$7FFF : ORA.w #$7000 : STA $1002, X : INX #2 ; set length and enable RLE TYA : STA $1002, X : INX #2 ; set tile SEP #$20 ; set 8-bit accumulator LDA.b #$FF : STA $1002, X STX $1000 LDA.b #01 : STA $14 REP #$20 ; set 16-bit accumulator RTL ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- ; WriteVRAMBlock ; in: A(w) - VRAM Destination ; in: X(w) - Length in Tiles ; in: Y(w) - Address of Data to Copy ;-------------------------------------------------------------------------------- WriteVRAMBlock: PHX LDX $1000 ; get pointer AND.w #$7F : STA $1002, X : INX #2 ; set destination PLA : ASL : AND.w #$3FFF : STA $1002, X : INX #2 ; set length PHX TYX ; set X to source PHA TXA : !ADD #$1002 : TAY ; set Y to dest PLA ;A is already the value we need for mvn MVN $7F7E ; currently we transfer from our buffers in 7F to the vram buffer in 7E !ADD 1, s ; add the length in A to the stack pointer on the top of the stack PLX : TAX ; pull and promptly ignore, copying the value we just got over it SEP #$20 ; set 8-bit accumulator LDA.b #$FF : STA $1002, X STX $1000 LDA.b #01 : STA $14 REP #$20 ; set 16-bit accumulator RTL ;-------------------------------------------------------------------------------- ;Byte 1 byte 2 Byte 3 byte 4 ;Evvvvvvv vvvvvvv DRllllll llllllll ; ;E if set indicates that this is not a header, but instead is the terminator byte. Only the topmost bit matters in that case. ;The v's form a vram address. ;if D is set, the dma will increment the vram address by a row per word, instead of incrementing by a column (1). ;R if set enables a run length encoding feature ;the l's are the number of bytes to upload minus 1 (don't forget this -1, it is important) ; ;This is then followed by the bytes to upload, in normal format. ;RLE feature: ;This feature makes it easy to draw the same tile repeatedly. If this bit is set, the length bits should be set to 2 times the number of copies of the tile to upload. (Without subtracting 1!) ;It is followed by a single tile (word). Combining this this with the D bit makes it easy to draw large horizontal or vertical runs of a tile without using much space. Geat for erasing or drawing horizontal or verical box edges. ;================================================================================
_usertests: file format elf32-i386 Disassembly of section .text: 00000000 <main>: 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: 51 push %ecx e: 83 ec 0c sub $0xc,%esp 11: 68 76 4d 00 00 push $0x4d76 16: 6a 01 push $0x1 18: e8 13 3a 00 00 call 3a30 <printf> 1d: 59 pop %ecx 1e: 58 pop %eax 1f: 6a 00 push $0x0 21: 68 8a 4d 00 00 push $0x4d8a 26: e8 b7 38 00 00 call 38e2 <open> 2b: 83 c4 10 add $0x10,%esp 2e: 85 c0 test %eax,%eax 30: 78 13 js 45 <main+0x45> 32: 52 push %edx 33: 52 push %edx 34: 68 f4 54 00 00 push $0x54f4 39: 6a 01 push $0x1 3b: e8 f0 39 00 00 call 3a30 <printf> 40: e8 5d 38 00 00 call 38a2 <exit> 45: 50 push %eax 46: 50 push %eax 47: 68 00 02 00 00 push $0x200 4c: 68 8a 4d 00 00 push $0x4d8a 51: e8 8c 38 00 00 call 38e2 <open> 56: 89 04 24 mov %eax,(%esp) 59: e8 6c 38 00 00 call 38ca <close> 5e: e8 5d 35 00 00 call 35c0 <argptest> 63: e8 a8 11 00 00 call 1210 <createdelete> 68: e8 63 1a 00 00 call 1ad0 <linkunlink> 6d: e8 5e 17 00 00 call 17d0 <concreate> 72: e8 99 0f 00 00 call 1010 <fourfiles> 77: e8 d4 0d 00 00 call e50 <sharedfd> 7c: e8 ff 31 00 00 call 3280 <bigargtest> 81: e8 6a 23 00 00 call 23f0 <bigwrite> 86: e8 f5 31 00 00 call 3280 <bigargtest> 8b: e8 70 31 00 00 call 3200 <bsstest> 90: e8 9b 2c 00 00 call 2d30 <sbrktest> 95: e8 b6 30 00 00 call 3150 <validatetest> 9a: e8 51 03 00 00 call 3f0 <opentest> 9f: e8 dc 03 00 00 call 480 <writetest> a4: e8 b7 05 00 00 call 660 <writetest1> a9: e8 82 07 00 00 call 830 <createtest> ae: e8 3d 02 00 00 call 2f0 <openiputtest> b3: e8 48 01 00 00 call 200 <exitiputtest> b8: e8 63 00 00 00 call 120 <iputtest> bd: e8 be 0c 00 00 call d80 <mem> c2: e8 49 09 00 00 call a10 <pipe1> c7: e8 e4 0a 00 00 call bb0 <preempt> cc: e8 1f 0c 00 00 call cf0 <exitwait> d1: e8 0a 27 00 00 call 27e0 <rmdot> d6: e8 c5 25 00 00 call 26a0 <fourteen> db: e8 f0 23 00 00 call 24d0 <bigfile> e0: e8 2b 1c 00 00 call 1d10 <subdir> e5: e8 d6 14 00 00 call 15c0 <linktest> ea: e8 41 13 00 00 call 1430 <unlinkread> ef: e8 6c 28 00 00 call 2960 <dirfile> f4: e8 67 2a 00 00 call 2b60 <iref> f9: e8 82 2b 00 00 call 2c80 <forktest> fe: e8 dd 1a 00 00 call 1be0 <bigdir> 103: e8 48 34 00 00 call 3550 <uio> 108: e8 b3 08 00 00 call 9c0 <exectest> 10d: e8 90 37 00 00 call 38a2 <exit> 112: 66 90 xchg %ax,%ax 114: 66 90 xchg %ax,%ax 116: 66 90 xchg %ax,%ax 118: 66 90 xchg %ax,%ax 11a: 66 90 xchg %ax,%ax 11c: 66 90 xchg %ax,%ax 11e: 66 90 xchg %ax,%ax 00000120 <iputtest>: 120: 55 push %ebp 121: 89 e5 mov %esp,%ebp 123: 83 ec 10 sub $0x10,%esp 126: 68 1c 3e 00 00 push $0x3e1c 12b: ff 35 38 5e 00 00 pushl 0x5e38 131: e8 fa 38 00 00 call 3a30 <printf> 136: c7 04 24 af 3d 00 00 movl $0x3daf,(%esp) 13d: e8 c8 37 00 00 call 390a <mkdir> 142: 83 c4 10 add $0x10,%esp 145: 85 c0 test %eax,%eax 147: 78 58 js 1a1 <iputtest+0x81> 149: 83 ec 0c sub $0xc,%esp 14c: 68 af 3d 00 00 push $0x3daf 151: e8 bc 37 00 00 call 3912 <chdir> 156: 83 c4 10 add $0x10,%esp 159: 85 c0 test %eax,%eax 15b: 0f 88 85 00 00 00 js 1e6 <iputtest+0xc6> 161: 83 ec 0c sub $0xc,%esp 164: 68 ac 3d 00 00 push $0x3dac 169: e8 84 37 00 00 call 38f2 <unlink> 16e: 83 c4 10 add $0x10,%esp 171: 85 c0 test %eax,%eax 173: 78 5a js 1cf <iputtest+0xaf> 175: 83 ec 0c sub $0xc,%esp 178: 68 d1 3d 00 00 push $0x3dd1 17d: e8 90 37 00 00 call 3912 <chdir> 182: 83 c4 10 add $0x10,%esp 185: 85 c0 test %eax,%eax 187: 78 2f js 1b8 <iputtest+0x98> 189: 83 ec 08 sub $0x8,%esp 18c: 68 54 3e 00 00 push $0x3e54 191: ff 35 38 5e 00 00 pushl 0x5e38 197: e8 94 38 00 00 call 3a30 <printf> 19c: 83 c4 10 add $0x10,%esp 19f: c9 leave 1a0: c3 ret 1a1: 50 push %eax 1a2: 50 push %eax 1a3: 68 88 3d 00 00 push $0x3d88 1a8: ff 35 38 5e 00 00 pushl 0x5e38 1ae: e8 7d 38 00 00 call 3a30 <printf> 1b3: e8 ea 36 00 00 call 38a2 <exit> 1b8: 50 push %eax 1b9: 50 push %eax 1ba: 68 d3 3d 00 00 push $0x3dd3 1bf: ff 35 38 5e 00 00 pushl 0x5e38 1c5: e8 66 38 00 00 call 3a30 <printf> 1ca: e8 d3 36 00 00 call 38a2 <exit> 1cf: 52 push %edx 1d0: 52 push %edx 1d1: 68 b7 3d 00 00 push $0x3db7 1d6: ff 35 38 5e 00 00 pushl 0x5e38 1dc: e8 4f 38 00 00 call 3a30 <printf> 1e1: e8 bc 36 00 00 call 38a2 <exit> 1e6: 51 push %ecx 1e7: 51 push %ecx 1e8: 68 96 3d 00 00 push $0x3d96 1ed: ff 35 38 5e 00 00 pushl 0x5e38 1f3: e8 38 38 00 00 call 3a30 <printf> 1f8: e8 a5 36 00 00 call 38a2 <exit> 1fd: 8d 76 00 lea 0x0(%esi),%esi 00000200 <exitiputtest>: 200: 55 push %ebp 201: 89 e5 mov %esp,%ebp 203: 83 ec 10 sub $0x10,%esp 206: 68 e3 3d 00 00 push $0x3de3 20b: ff 35 38 5e 00 00 pushl 0x5e38 211: e8 1a 38 00 00 call 3a30 <printf> 216: e8 7f 36 00 00 call 389a <fork> 21b: 83 c4 10 add $0x10,%esp 21e: 85 c0 test %eax,%eax 220: 0f 88 82 00 00 00 js 2a8 <exitiputtest+0xa8> 226: 75 48 jne 270 <exitiputtest+0x70> 228: 83 ec 0c sub $0xc,%esp 22b: 68 af 3d 00 00 push $0x3daf 230: e8 d5 36 00 00 call 390a <mkdir> 235: 83 c4 10 add $0x10,%esp 238: 85 c0 test %eax,%eax 23a: 0f 88 96 00 00 00 js 2d6 <exitiputtest+0xd6> 240: 83 ec 0c sub $0xc,%esp 243: 68 af 3d 00 00 push $0x3daf 248: e8 c5 36 00 00 call 3912 <chdir> 24d: 83 c4 10 add $0x10,%esp 250: 85 c0 test %eax,%eax 252: 78 6b js 2bf <exitiputtest+0xbf> 254: 83 ec 0c sub $0xc,%esp 257: 68 ac 3d 00 00 push $0x3dac 25c: e8 91 36 00 00 call 38f2 <unlink> 261: 83 c4 10 add $0x10,%esp 264: 85 c0 test %eax,%eax 266: 78 28 js 290 <exitiputtest+0x90> 268: e8 35 36 00 00 call 38a2 <exit> 26d: 8d 76 00 lea 0x0(%esi),%esi 270: e8 35 36 00 00 call 38aa <wait> 275: 83 ec 08 sub $0x8,%esp 278: 68 06 3e 00 00 push $0x3e06 27d: ff 35 38 5e 00 00 pushl 0x5e38 283: e8 a8 37 00 00 call 3a30 <printf> 288: 83 c4 10 add $0x10,%esp 28b: c9 leave 28c: c3 ret 28d: 8d 76 00 lea 0x0(%esi),%esi 290: 83 ec 08 sub $0x8,%esp 293: 68 b7 3d 00 00 push $0x3db7 298: ff 35 38 5e 00 00 pushl 0x5e38 29e: e8 8d 37 00 00 call 3a30 <printf> 2a3: e8 fa 35 00 00 call 38a2 <exit> 2a8: 51 push %ecx 2a9: 51 push %ecx 2aa: 68 c9 4c 00 00 push $0x4cc9 2af: ff 35 38 5e 00 00 pushl 0x5e38 2b5: e8 76 37 00 00 call 3a30 <printf> 2ba: e8 e3 35 00 00 call 38a2 <exit> 2bf: 50 push %eax 2c0: 50 push %eax 2c1: 68 f2 3d 00 00 push $0x3df2 2c6: ff 35 38 5e 00 00 pushl 0x5e38 2cc: e8 5f 37 00 00 call 3a30 <printf> 2d1: e8 cc 35 00 00 call 38a2 <exit> 2d6: 52 push %edx 2d7: 52 push %edx 2d8: 68 88 3d 00 00 push $0x3d88 2dd: ff 35 38 5e 00 00 pushl 0x5e38 2e3: e8 48 37 00 00 call 3a30 <printf> 2e8: e8 b5 35 00 00 call 38a2 <exit> 2ed: 8d 76 00 lea 0x0(%esi),%esi 000002f0 <openiputtest>: 2f0: 55 push %ebp 2f1: 89 e5 mov %esp,%ebp 2f3: 83 ec 10 sub $0x10,%esp 2f6: 68 18 3e 00 00 push $0x3e18 2fb: ff 35 38 5e 00 00 pushl 0x5e38 301: e8 2a 37 00 00 call 3a30 <printf> 306: c7 04 24 27 3e 00 00 movl $0x3e27,(%esp) 30d: e8 f8 35 00 00 call 390a <mkdir> 312: 83 c4 10 add $0x10,%esp 315: 85 c0 test %eax,%eax 317: 0f 88 88 00 00 00 js 3a5 <openiputtest+0xb5> 31d: e8 78 35 00 00 call 389a <fork> 322: 85 c0 test %eax,%eax 324: 0f 88 92 00 00 00 js 3bc <openiputtest+0xcc> 32a: 75 34 jne 360 <openiputtest+0x70> 32c: 83 ec 08 sub $0x8,%esp 32f: 6a 02 push $0x2 331: 68 27 3e 00 00 push $0x3e27 336: e8 a7 35 00 00 call 38e2 <open> 33b: 83 c4 10 add $0x10,%esp 33e: 85 c0 test %eax,%eax 340: 78 5e js 3a0 <openiputtest+0xb0> 342: 83 ec 08 sub $0x8,%esp 345: 68 ac 4d 00 00 push $0x4dac 34a: ff 35 38 5e 00 00 pushl 0x5e38 350: e8 db 36 00 00 call 3a30 <printf> 355: e8 48 35 00 00 call 38a2 <exit> 35a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 360: 83 ec 0c sub $0xc,%esp 363: 6a 01 push $0x1 365: e8 c8 35 00 00 call 3932 <sleep> 36a: c7 04 24 27 3e 00 00 movl $0x3e27,(%esp) 371: e8 7c 35 00 00 call 38f2 <unlink> 376: 83 c4 10 add $0x10,%esp 379: 85 c0 test %eax,%eax 37b: 75 56 jne 3d3 <openiputtest+0xe3> 37d: e8 28 35 00 00 call 38aa <wait> 382: 83 ec 08 sub $0x8,%esp 385: 68 50 3e 00 00 push $0x3e50 38a: ff 35 38 5e 00 00 pushl 0x5e38 390: e8 9b 36 00 00 call 3a30 <printf> 395: 83 c4 10 add $0x10,%esp 398: c9 leave 399: c3 ret 39a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 3a0: e8 fd 34 00 00 call 38a2 <exit> 3a5: 51 push %ecx 3a6: 51 push %ecx 3a7: 68 2d 3e 00 00 push $0x3e2d 3ac: ff 35 38 5e 00 00 pushl 0x5e38 3b2: e8 79 36 00 00 call 3a30 <printf> 3b7: e8 e6 34 00 00 call 38a2 <exit> 3bc: 52 push %edx 3bd: 52 push %edx 3be: 68 c9 4c 00 00 push $0x4cc9 3c3: ff 35 38 5e 00 00 pushl 0x5e38 3c9: e8 62 36 00 00 call 3a30 <printf> 3ce: e8 cf 34 00 00 call 38a2 <exit> 3d3: 50 push %eax 3d4: 50 push %eax 3d5: 68 41 3e 00 00 push $0x3e41 3da: ff 35 38 5e 00 00 pushl 0x5e38 3e0: e8 4b 36 00 00 call 3a30 <printf> 3e5: e8 b8 34 00 00 call 38a2 <exit> 3ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 000003f0 <opentest>: 3f0: 55 push %ebp 3f1: 89 e5 mov %esp,%ebp 3f3: 83 ec 10 sub $0x10,%esp 3f6: 68 62 3e 00 00 push $0x3e62 3fb: ff 35 38 5e 00 00 pushl 0x5e38 401: e8 2a 36 00 00 call 3a30 <printf> 406: 58 pop %eax 407: 5a pop %edx 408: 6a 00 push $0x0 40a: 68 6d 3e 00 00 push $0x3e6d 40f: e8 ce 34 00 00 call 38e2 <open> 414: 83 c4 10 add $0x10,%esp 417: 85 c0 test %eax,%eax 419: 78 36 js 451 <opentest+0x61> 41b: 83 ec 0c sub $0xc,%esp 41e: 50 push %eax 41f: e8 a6 34 00 00 call 38ca <close> 424: 5a pop %edx 425: 59 pop %ecx 426: 6a 00 push $0x0 428: 68 85 3e 00 00 push $0x3e85 42d: e8 b0 34 00 00 call 38e2 <open> 432: 83 c4 10 add $0x10,%esp 435: 85 c0 test %eax,%eax 437: 79 2f jns 468 <opentest+0x78> 439: 83 ec 08 sub $0x8,%esp 43c: 68 b0 3e 00 00 push $0x3eb0 441: ff 35 38 5e 00 00 pushl 0x5e38 447: e8 e4 35 00 00 call 3a30 <printf> 44c: 83 c4 10 add $0x10,%esp 44f: c9 leave 450: c3 ret 451: 50 push %eax 452: 50 push %eax 453: 68 72 3e 00 00 push $0x3e72 458: ff 35 38 5e 00 00 pushl 0x5e38 45e: e8 cd 35 00 00 call 3a30 <printf> 463: e8 3a 34 00 00 call 38a2 <exit> 468: 50 push %eax 469: 50 push %eax 46a: 68 92 3e 00 00 push $0x3e92 46f: ff 35 38 5e 00 00 pushl 0x5e38 475: e8 b6 35 00 00 call 3a30 <printf> 47a: e8 23 34 00 00 call 38a2 <exit> 47f: 90 nop 00000480 <writetest>: 480: 55 push %ebp 481: 89 e5 mov %esp,%ebp 483: 56 push %esi 484: 53 push %ebx 485: 83 ec 08 sub $0x8,%esp 488: 68 be 3e 00 00 push $0x3ebe 48d: ff 35 38 5e 00 00 pushl 0x5e38 493: e8 98 35 00 00 call 3a30 <printf> 498: 58 pop %eax 499: 5a pop %edx 49a: 68 02 02 00 00 push $0x202 49f: 68 cf 3e 00 00 push $0x3ecf 4a4: e8 39 34 00 00 call 38e2 <open> 4a9: 83 c4 10 add $0x10,%esp 4ac: 85 c0 test %eax,%eax 4ae: 0f 88 88 01 00 00 js 63c <writetest+0x1bc> 4b4: 83 ec 08 sub $0x8,%esp 4b7: 89 c6 mov %eax,%esi 4b9: 31 db xor %ebx,%ebx 4bb: 68 d5 3e 00 00 push $0x3ed5 4c0: ff 35 38 5e 00 00 pushl 0x5e38 4c6: e8 65 35 00 00 call 3a30 <printf> 4cb: 83 c4 10 add $0x10,%esp 4ce: 66 90 xchg %ax,%ax 4d0: 83 ec 04 sub $0x4,%esp 4d3: 6a 0a push $0xa 4d5: 68 0c 3f 00 00 push $0x3f0c 4da: 56 push %esi 4db: e8 e2 33 00 00 call 38c2 <write> 4e0: 83 c4 10 add $0x10,%esp 4e3: 83 f8 0a cmp $0xa,%eax 4e6: 0f 85 d9 00 00 00 jne 5c5 <writetest+0x145> 4ec: 83 ec 04 sub $0x4,%esp 4ef: 6a 0a push $0xa 4f1: 68 17 3f 00 00 push $0x3f17 4f6: 56 push %esi 4f7: e8 c6 33 00 00 call 38c2 <write> 4fc: 83 c4 10 add $0x10,%esp 4ff: 83 f8 0a cmp $0xa,%eax 502: 0f 85 d6 00 00 00 jne 5de <writetest+0x15e> 508: 83 c3 01 add $0x1,%ebx 50b: 83 fb 64 cmp $0x64,%ebx 50e: 75 c0 jne 4d0 <writetest+0x50> 510: 83 ec 08 sub $0x8,%esp 513: 68 22 3f 00 00 push $0x3f22 518: ff 35 38 5e 00 00 pushl 0x5e38 51e: e8 0d 35 00 00 call 3a30 <printf> 523: 89 34 24 mov %esi,(%esp) 526: e8 9f 33 00 00 call 38ca <close> 52b: 5b pop %ebx 52c: 5e pop %esi 52d: 6a 00 push $0x0 52f: 68 cf 3e 00 00 push $0x3ecf 534: e8 a9 33 00 00 call 38e2 <open> 539: 83 c4 10 add $0x10,%esp 53c: 85 c0 test %eax,%eax 53e: 89 c3 mov %eax,%ebx 540: 0f 88 b1 00 00 00 js 5f7 <writetest+0x177> 546: 83 ec 08 sub $0x8,%esp 549: 68 2d 3f 00 00 push $0x3f2d 54e: ff 35 38 5e 00 00 pushl 0x5e38 554: e8 d7 34 00 00 call 3a30 <printf> 559: 83 c4 0c add $0xc,%esp 55c: 68 d0 07 00 00 push $0x7d0 561: 68 20 86 00 00 push $0x8620 566: 53 push %ebx 567: e8 4e 33 00 00 call 38ba <read> 56c: 83 c4 10 add $0x10,%esp 56f: 3d d0 07 00 00 cmp $0x7d0,%eax 574: 0f 85 94 00 00 00 jne 60e <writetest+0x18e> 57a: 83 ec 08 sub $0x8,%esp 57d: 68 61 3f 00 00 push $0x3f61 582: ff 35 38 5e 00 00 pushl 0x5e38 588: e8 a3 34 00 00 call 3a30 <printf> 58d: 89 1c 24 mov %ebx,(%esp) 590: e8 35 33 00 00 call 38ca <close> 595: c7 04 24 cf 3e 00 00 movl $0x3ecf,(%esp) 59c: e8 51 33 00 00 call 38f2 <unlink> 5a1: 83 c4 10 add $0x10,%esp 5a4: 85 c0 test %eax,%eax 5a6: 78 7d js 625 <writetest+0x1a5> 5a8: 83 ec 08 sub $0x8,%esp 5ab: 68 89 3f 00 00 push $0x3f89 5b0: ff 35 38 5e 00 00 pushl 0x5e38 5b6: e8 75 34 00 00 call 3a30 <printf> 5bb: 83 c4 10 add $0x10,%esp 5be: 8d 65 f8 lea -0x8(%ebp),%esp 5c1: 5b pop %ebx 5c2: 5e pop %esi 5c3: 5d pop %ebp 5c4: c3 ret 5c5: 83 ec 04 sub $0x4,%esp 5c8: 53 push %ebx 5c9: 68 d0 4d 00 00 push $0x4dd0 5ce: ff 35 38 5e 00 00 pushl 0x5e38 5d4: e8 57 34 00 00 call 3a30 <printf> 5d9: e8 c4 32 00 00 call 38a2 <exit> 5de: 83 ec 04 sub $0x4,%esp 5e1: 53 push %ebx 5e2: 68 f4 4d 00 00 push $0x4df4 5e7: ff 35 38 5e 00 00 pushl 0x5e38 5ed: e8 3e 34 00 00 call 3a30 <printf> 5f2: e8 ab 32 00 00 call 38a2 <exit> 5f7: 51 push %ecx 5f8: 51 push %ecx 5f9: 68 46 3f 00 00 push $0x3f46 5fe: ff 35 38 5e 00 00 pushl 0x5e38 604: e8 27 34 00 00 call 3a30 <printf> 609: e8 94 32 00 00 call 38a2 <exit> 60e: 52 push %edx 60f: 52 push %edx 610: 68 8d 42 00 00 push $0x428d 615: ff 35 38 5e 00 00 pushl 0x5e38 61b: e8 10 34 00 00 call 3a30 <printf> 620: e8 7d 32 00 00 call 38a2 <exit> 625: 50 push %eax 626: 50 push %eax 627: 68 74 3f 00 00 push $0x3f74 62c: ff 35 38 5e 00 00 pushl 0x5e38 632: e8 f9 33 00 00 call 3a30 <printf> 637: e8 66 32 00 00 call 38a2 <exit> 63c: 50 push %eax 63d: 50 push %eax 63e: 68 f0 3e 00 00 push $0x3ef0 643: ff 35 38 5e 00 00 pushl 0x5e38 649: e8 e2 33 00 00 call 3a30 <printf> 64e: e8 4f 32 00 00 call 38a2 <exit> 653: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 659: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000660 <writetest1>: 660: 55 push %ebp 661: 89 e5 mov %esp,%ebp 663: 56 push %esi 664: 53 push %ebx 665: 83 ec 08 sub $0x8,%esp 668: 68 9d 3f 00 00 push $0x3f9d 66d: ff 35 38 5e 00 00 pushl 0x5e38 673: e8 b8 33 00 00 call 3a30 <printf> 678: 58 pop %eax 679: 5a pop %edx 67a: 68 02 02 00 00 push $0x202 67f: 68 17 40 00 00 push $0x4017 684: e8 59 32 00 00 call 38e2 <open> 689: 83 c4 10 add $0x10,%esp 68c: 85 c0 test %eax,%eax 68e: 0f 88 61 01 00 00 js 7f5 <writetest1+0x195> 694: 89 c6 mov %eax,%esi 696: 31 db xor %ebx,%ebx 698: 90 nop 699: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 6a0: 83 ec 04 sub $0x4,%esp 6a3: 89 1d 20 86 00 00 mov %ebx,0x8620 6a9: 68 00 02 00 00 push $0x200 6ae: 68 20 86 00 00 push $0x8620 6b3: 56 push %esi 6b4: e8 09 32 00 00 call 38c2 <write> 6b9: 83 c4 10 add $0x10,%esp 6bc: 3d 00 02 00 00 cmp $0x200,%eax 6c1: 0f 85 b3 00 00 00 jne 77a <writetest1+0x11a> 6c7: 83 c3 01 add $0x1,%ebx 6ca: 81 fb 8c 00 00 00 cmp $0x8c,%ebx 6d0: 75 ce jne 6a0 <writetest1+0x40> 6d2: 83 ec 0c sub $0xc,%esp 6d5: 56 push %esi 6d6: e8 ef 31 00 00 call 38ca <close> 6db: 5b pop %ebx 6dc: 5e pop %esi 6dd: 6a 00 push $0x0 6df: 68 17 40 00 00 push $0x4017 6e4: e8 f9 31 00 00 call 38e2 <open> 6e9: 83 c4 10 add $0x10,%esp 6ec: 85 c0 test %eax,%eax 6ee: 89 c6 mov %eax,%esi 6f0: 0f 88 e8 00 00 00 js 7de <writetest1+0x17e> 6f6: 31 db xor %ebx,%ebx 6f8: eb 1d jmp 717 <writetest1+0xb7> 6fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 700: 3d 00 02 00 00 cmp $0x200,%eax 705: 0f 85 9f 00 00 00 jne 7aa <writetest1+0x14a> 70b: a1 20 86 00 00 mov 0x8620,%eax 710: 39 d8 cmp %ebx,%eax 712: 75 7f jne 793 <writetest1+0x133> 714: 83 c3 01 add $0x1,%ebx 717: 83 ec 04 sub $0x4,%esp 71a: 68 00 02 00 00 push $0x200 71f: 68 20 86 00 00 push $0x8620 724: 56 push %esi 725: e8 90 31 00 00 call 38ba <read> 72a: 83 c4 10 add $0x10,%esp 72d: 85 c0 test %eax,%eax 72f: 75 cf jne 700 <writetest1+0xa0> 731: 81 fb 8b 00 00 00 cmp $0x8b,%ebx 737: 0f 84 86 00 00 00 je 7c3 <writetest1+0x163> 73d: 83 ec 0c sub $0xc,%esp 740: 56 push %esi 741: e8 84 31 00 00 call 38ca <close> 746: c7 04 24 17 40 00 00 movl $0x4017,(%esp) 74d: e8 a0 31 00 00 call 38f2 <unlink> 752: 83 c4 10 add $0x10,%esp 755: 85 c0 test %eax,%eax 757: 0f 88 af 00 00 00 js 80c <writetest1+0x1ac> 75d: 83 ec 08 sub $0x8,%esp 760: 68 3e 40 00 00 push $0x403e 765: ff 35 38 5e 00 00 pushl 0x5e38 76b: e8 c0 32 00 00 call 3a30 <printf> 770: 83 c4 10 add $0x10,%esp 773: 8d 65 f8 lea -0x8(%ebp),%esp 776: 5b pop %ebx 777: 5e pop %esi 778: 5d pop %ebp 779: c3 ret 77a: 83 ec 04 sub $0x4,%esp 77d: 53 push %ebx 77e: 68 c7 3f 00 00 push $0x3fc7 783: ff 35 38 5e 00 00 pushl 0x5e38 789: e8 a2 32 00 00 call 3a30 <printf> 78e: e8 0f 31 00 00 call 38a2 <exit> 793: 50 push %eax 794: 53 push %ebx 795: 68 18 4e 00 00 push $0x4e18 79a: ff 35 38 5e 00 00 pushl 0x5e38 7a0: e8 8b 32 00 00 call 3a30 <printf> 7a5: e8 f8 30 00 00 call 38a2 <exit> 7aa: 83 ec 04 sub $0x4,%esp 7ad: 50 push %eax 7ae: 68 1b 40 00 00 push $0x401b 7b3: ff 35 38 5e 00 00 pushl 0x5e38 7b9: e8 72 32 00 00 call 3a30 <printf> 7be: e8 df 30 00 00 call 38a2 <exit> 7c3: 52 push %edx 7c4: 68 8b 00 00 00 push $0x8b 7c9: 68 fe 3f 00 00 push $0x3ffe 7ce: ff 35 38 5e 00 00 pushl 0x5e38 7d4: e8 57 32 00 00 call 3a30 <printf> 7d9: e8 c4 30 00 00 call 38a2 <exit> 7de: 51 push %ecx 7df: 51 push %ecx 7e0: 68 e5 3f 00 00 push $0x3fe5 7e5: ff 35 38 5e 00 00 pushl 0x5e38 7eb: e8 40 32 00 00 call 3a30 <printf> 7f0: e8 ad 30 00 00 call 38a2 <exit> 7f5: 50 push %eax 7f6: 50 push %eax 7f7: 68 ad 3f 00 00 push $0x3fad 7fc: ff 35 38 5e 00 00 pushl 0x5e38 802: e8 29 32 00 00 call 3a30 <printf> 807: e8 96 30 00 00 call 38a2 <exit> 80c: 50 push %eax 80d: 50 push %eax 80e: 68 2b 40 00 00 push $0x402b 813: ff 35 38 5e 00 00 pushl 0x5e38 819: e8 12 32 00 00 call 3a30 <printf> 81e: e8 7f 30 00 00 call 38a2 <exit> 823: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 829: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000830 <createtest>: 830: 55 push %ebp 831: 89 e5 mov %esp,%ebp 833: 53 push %ebx 834: bb 30 00 00 00 mov $0x30,%ebx 839: 83 ec 0c sub $0xc,%esp 83c: 68 38 4e 00 00 push $0x4e38 841: ff 35 38 5e 00 00 pushl 0x5e38 847: e8 e4 31 00 00 call 3a30 <printf> 84c: c6 05 20 a6 00 00 61 movb $0x61,0xa620 853: c6 05 22 a6 00 00 00 movb $0x0,0xa622 85a: 83 c4 10 add $0x10,%esp 85d: 8d 76 00 lea 0x0(%esi),%esi 860: 83 ec 08 sub $0x8,%esp 863: 88 1d 21 a6 00 00 mov %bl,0xa621 869: 83 c3 01 add $0x1,%ebx 86c: 68 02 02 00 00 push $0x202 871: 68 20 a6 00 00 push $0xa620 876: e8 67 30 00 00 call 38e2 <open> 87b: 89 04 24 mov %eax,(%esp) 87e: e8 47 30 00 00 call 38ca <close> 883: 83 c4 10 add $0x10,%esp 886: 80 fb 64 cmp $0x64,%bl 889: 75 d5 jne 860 <createtest+0x30> 88b: c6 05 20 a6 00 00 61 movb $0x61,0xa620 892: c6 05 22 a6 00 00 00 movb $0x0,0xa622 899: bb 30 00 00 00 mov $0x30,%ebx 89e: 66 90 xchg %ax,%ax 8a0: 83 ec 0c sub $0xc,%esp 8a3: 88 1d 21 a6 00 00 mov %bl,0xa621 8a9: 83 c3 01 add $0x1,%ebx 8ac: 68 20 a6 00 00 push $0xa620 8b1: e8 3c 30 00 00 call 38f2 <unlink> 8b6: 83 c4 10 add $0x10,%esp 8b9: 80 fb 64 cmp $0x64,%bl 8bc: 75 e2 jne 8a0 <createtest+0x70> 8be: 83 ec 08 sub $0x8,%esp 8c1: 68 60 4e 00 00 push $0x4e60 8c6: ff 35 38 5e 00 00 pushl 0x5e38 8cc: e8 5f 31 00 00 call 3a30 <printf> 8d1: 83 c4 10 add $0x10,%esp 8d4: 8b 5d fc mov -0x4(%ebp),%ebx 8d7: c9 leave 8d8: c3 ret 8d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 000008e0 <dirtest>: 8e0: 55 push %ebp 8e1: 89 e5 mov %esp,%ebp 8e3: 83 ec 10 sub $0x10,%esp 8e6: 68 4c 40 00 00 push $0x404c 8eb: ff 35 38 5e 00 00 pushl 0x5e38 8f1: e8 3a 31 00 00 call 3a30 <printf> 8f6: c7 04 24 58 40 00 00 movl $0x4058,(%esp) 8fd: e8 08 30 00 00 call 390a <mkdir> 902: 83 c4 10 add $0x10,%esp 905: 85 c0 test %eax,%eax 907: 78 58 js 961 <dirtest+0x81> 909: 83 ec 0c sub $0xc,%esp 90c: 68 58 40 00 00 push $0x4058 911: e8 fc 2f 00 00 call 3912 <chdir> 916: 83 c4 10 add $0x10,%esp 919: 85 c0 test %eax,%eax 91b: 0f 88 85 00 00 00 js 9a6 <dirtest+0xc6> 921: 83 ec 0c sub $0xc,%esp 924: 68 fd 45 00 00 push $0x45fd 929: e8 e4 2f 00 00 call 3912 <chdir> 92e: 83 c4 10 add $0x10,%esp 931: 85 c0 test %eax,%eax 933: 78 5a js 98f <dirtest+0xaf> 935: 83 ec 0c sub $0xc,%esp 938: 68 58 40 00 00 push $0x4058 93d: e8 b0 2f 00 00 call 38f2 <unlink> 942: 83 c4 10 add $0x10,%esp 945: 85 c0 test %eax,%eax 947: 78 2f js 978 <dirtest+0x98> 949: 83 ec 08 sub $0x8,%esp 94c: 68 95 40 00 00 push $0x4095 951: ff 35 38 5e 00 00 pushl 0x5e38 957: e8 d4 30 00 00 call 3a30 <printf> 95c: 83 c4 10 add $0x10,%esp 95f: c9 leave 960: c3 ret 961: 50 push %eax 962: 50 push %eax 963: 68 88 3d 00 00 push $0x3d88 968: ff 35 38 5e 00 00 pushl 0x5e38 96e: e8 bd 30 00 00 call 3a30 <printf> 973: e8 2a 2f 00 00 call 38a2 <exit> 978: 50 push %eax 979: 50 push %eax 97a: 68 81 40 00 00 push $0x4081 97f: ff 35 38 5e 00 00 pushl 0x5e38 985: e8 a6 30 00 00 call 3a30 <printf> 98a: e8 13 2f 00 00 call 38a2 <exit> 98f: 52 push %edx 990: 52 push %edx 991: 68 70 40 00 00 push $0x4070 996: ff 35 38 5e 00 00 pushl 0x5e38 99c: e8 8f 30 00 00 call 3a30 <printf> 9a1: e8 fc 2e 00 00 call 38a2 <exit> 9a6: 51 push %ecx 9a7: 51 push %ecx 9a8: 68 5d 40 00 00 push $0x405d 9ad: ff 35 38 5e 00 00 pushl 0x5e38 9b3: e8 78 30 00 00 call 3a30 <printf> 9b8: e8 e5 2e 00 00 call 38a2 <exit> 9bd: 8d 76 00 lea 0x0(%esi),%esi 000009c0 <exectest>: 9c0: 55 push %ebp 9c1: 89 e5 mov %esp,%ebp 9c3: 83 ec 10 sub $0x10,%esp 9c6: 68 a4 40 00 00 push $0x40a4 9cb: ff 35 38 5e 00 00 pushl 0x5e38 9d1: e8 5a 30 00 00 call 3a30 <printf> 9d6: 5a pop %edx 9d7: 59 pop %ecx 9d8: 68 3c 5e 00 00 push $0x5e3c 9dd: 68 6d 3e 00 00 push $0x3e6d 9e2: e8 f3 2e 00 00 call 38da <exec> 9e7: 83 c4 10 add $0x10,%esp 9ea: 85 c0 test %eax,%eax 9ec: 78 02 js 9f0 <exectest+0x30> 9ee: c9 leave 9ef: c3 ret 9f0: 50 push %eax 9f1: 50 push %eax 9f2: 68 af 40 00 00 push $0x40af 9f7: ff 35 38 5e 00 00 pushl 0x5e38 9fd: e8 2e 30 00 00 call 3a30 <printf> a02: e8 9b 2e 00 00 call 38a2 <exit> a07: 89 f6 mov %esi,%esi a09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000a10 <pipe1>: a10: 55 push %ebp a11: 89 e5 mov %esp,%ebp a13: 57 push %edi a14: 56 push %esi a15: 53 push %ebx a16: 8d 45 e0 lea -0x20(%ebp),%eax a19: 83 ec 38 sub $0x38,%esp a1c: 50 push %eax a1d: e8 90 2e 00 00 call 38b2 <pipe> a22: 83 c4 10 add $0x10,%esp a25: 85 c0 test %eax,%eax a27: 0f 85 3e 01 00 00 jne b6b <pipe1+0x15b> a2d: 89 c3 mov %eax,%ebx a2f: e8 66 2e 00 00 call 389a <fork> a34: 83 f8 00 cmp $0x0,%eax a37: 0f 84 84 00 00 00 je ac1 <pipe1+0xb1> a3d: 0f 8e 3b 01 00 00 jle b7e <pipe1+0x16e> a43: 83 ec 0c sub $0xc,%esp a46: ff 75 e4 pushl -0x1c(%ebp) a49: bf 01 00 00 00 mov $0x1,%edi a4e: e8 77 2e 00 00 call 38ca <close> a53: 83 c4 10 add $0x10,%esp a56: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) a5d: 83 ec 04 sub $0x4,%esp a60: 57 push %edi a61: 68 20 86 00 00 push $0x8620 a66: ff 75 e0 pushl -0x20(%ebp) a69: e8 4c 2e 00 00 call 38ba <read> a6e: 83 c4 10 add $0x10,%esp a71: 85 c0 test %eax,%eax a73: 0f 8e ab 00 00 00 jle b24 <pipe1+0x114> a79: 89 d9 mov %ebx,%ecx a7b: 8d 34 18 lea (%eax,%ebx,1),%esi a7e: f7 d9 neg %ecx a80: 38 9c 0b 20 86 00 00 cmp %bl,0x8620(%ebx,%ecx,1) a87: 8d 53 01 lea 0x1(%ebx),%edx a8a: 75 1b jne aa7 <pipe1+0x97> a8c: 39 f2 cmp %esi,%edx a8e: 89 d3 mov %edx,%ebx a90: 75 ee jne a80 <pipe1+0x70> a92: 01 ff add %edi,%edi a94: 01 45 d4 add %eax,-0x2c(%ebp) a97: b8 00 20 00 00 mov $0x2000,%eax a9c: 81 ff 00 20 00 00 cmp $0x2000,%edi aa2: 0f 4f f8 cmovg %eax,%edi aa5: eb b6 jmp a5d <pipe1+0x4d> aa7: 83 ec 08 sub $0x8,%esp aaa: 68 de 40 00 00 push $0x40de aaf: 6a 01 push $0x1 ab1: e8 7a 2f 00 00 call 3a30 <printf> ab6: 83 c4 10 add $0x10,%esp ab9: 8d 65 f4 lea -0xc(%ebp),%esp abc: 5b pop %ebx abd: 5e pop %esi abe: 5f pop %edi abf: 5d pop %ebp ac0: c3 ret ac1: 83 ec 0c sub $0xc,%esp ac4: ff 75 e0 pushl -0x20(%ebp) ac7: 31 db xor %ebx,%ebx ac9: be 09 04 00 00 mov $0x409,%esi ace: e8 f7 2d 00 00 call 38ca <close> ad3: 83 c4 10 add $0x10,%esp ad6: 89 d8 mov %ebx,%eax ad8: 89 f2 mov %esi,%edx ada: f7 d8 neg %eax adc: 29 da sub %ebx,%edx ade: 66 90 xchg %ax,%ax ae0: 88 84 03 20 86 00 00 mov %al,0x8620(%ebx,%eax,1) ae7: 83 c0 01 add $0x1,%eax aea: 39 d0 cmp %edx,%eax aec: 75 f2 jne ae0 <pipe1+0xd0> aee: 83 ec 04 sub $0x4,%esp af1: 68 09 04 00 00 push $0x409 af6: 68 20 86 00 00 push $0x8620 afb: ff 75 e4 pushl -0x1c(%ebp) afe: e8 bf 2d 00 00 call 38c2 <write> b03: 83 c4 10 add $0x10,%esp b06: 3d 09 04 00 00 cmp $0x409,%eax b0b: 0f 85 80 00 00 00 jne b91 <pipe1+0x181> b11: 81 eb 09 04 00 00 sub $0x409,%ebx b17: 81 fb d3 eb ff ff cmp $0xffffebd3,%ebx b1d: 75 b7 jne ad6 <pipe1+0xc6> b1f: e8 7e 2d 00 00 call 38a2 <exit> b24: 81 7d d4 2d 14 00 00 cmpl $0x142d,-0x2c(%ebp) b2b: 75 29 jne b56 <pipe1+0x146> b2d: 83 ec 0c sub $0xc,%esp b30: ff 75 e0 pushl -0x20(%ebp) b33: e8 92 2d 00 00 call 38ca <close> b38: e8 6d 2d 00 00 call 38aa <wait> b3d: 5a pop %edx b3e: 59 pop %ecx b3f: 68 03 41 00 00 push $0x4103 b44: 6a 01 push $0x1 b46: e8 e5 2e 00 00 call 3a30 <printf> b4b: 83 c4 10 add $0x10,%esp b4e: 8d 65 f4 lea -0xc(%ebp),%esp b51: 5b pop %ebx b52: 5e pop %esi b53: 5f pop %edi b54: 5d pop %ebp b55: c3 ret b56: 53 push %ebx b57: ff 75 d4 pushl -0x2c(%ebp) b5a: 68 ec 40 00 00 push $0x40ec b5f: 6a 01 push $0x1 b61: e8 ca 2e 00 00 call 3a30 <printf> b66: e8 37 2d 00 00 call 38a2 <exit> b6b: 57 push %edi b6c: 57 push %edi b6d: 68 c1 40 00 00 push $0x40c1 b72: 6a 01 push $0x1 b74: e8 b7 2e 00 00 call 3a30 <printf> b79: e8 24 2d 00 00 call 38a2 <exit> b7e: 50 push %eax b7f: 50 push %eax b80: 68 0d 41 00 00 push $0x410d b85: 6a 01 push $0x1 b87: e8 a4 2e 00 00 call 3a30 <printf> b8c: e8 11 2d 00 00 call 38a2 <exit> b91: 56 push %esi b92: 56 push %esi b93: 68 d0 40 00 00 push $0x40d0 b98: 6a 01 push $0x1 b9a: e8 91 2e 00 00 call 3a30 <printf> b9f: e8 fe 2c 00 00 call 38a2 <exit> ba4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi baa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000bb0 <preempt>: bb0: 55 push %ebp bb1: 89 e5 mov %esp,%ebp bb3: 57 push %edi bb4: 56 push %esi bb5: 53 push %ebx bb6: 83 ec 24 sub $0x24,%esp bb9: 68 1c 41 00 00 push $0x411c bbe: 6a 01 push $0x1 bc0: e8 6b 2e 00 00 call 3a30 <printf> bc5: e8 d0 2c 00 00 call 389a <fork> bca: 83 c4 10 add $0x10,%esp bcd: 85 c0 test %eax,%eax bcf: 75 02 jne bd3 <preempt+0x23> bd1: eb fe jmp bd1 <preempt+0x21> bd3: 89 c7 mov %eax,%edi bd5: e8 c0 2c 00 00 call 389a <fork> bda: 85 c0 test %eax,%eax bdc: 89 c6 mov %eax,%esi bde: 75 02 jne be2 <preempt+0x32> be0: eb fe jmp be0 <preempt+0x30> be2: 8d 45 e0 lea -0x20(%ebp),%eax be5: 83 ec 0c sub $0xc,%esp be8: 50 push %eax be9: e8 c4 2c 00 00 call 38b2 <pipe> bee: e8 a7 2c 00 00 call 389a <fork> bf3: 83 c4 10 add $0x10,%esp bf6: 85 c0 test %eax,%eax bf8: 89 c3 mov %eax,%ebx bfa: 75 46 jne c42 <preempt+0x92> bfc: 83 ec 0c sub $0xc,%esp bff: ff 75 e0 pushl -0x20(%ebp) c02: e8 c3 2c 00 00 call 38ca <close> c07: 83 c4 0c add $0xc,%esp c0a: 6a 01 push $0x1 c0c: 68 e1 46 00 00 push $0x46e1 c11: ff 75 e4 pushl -0x1c(%ebp) c14: e8 a9 2c 00 00 call 38c2 <write> c19: 83 c4 10 add $0x10,%esp c1c: 83 e8 01 sub $0x1,%eax c1f: 74 11 je c32 <preempt+0x82> c21: 50 push %eax c22: 50 push %eax c23: 68 26 41 00 00 push $0x4126 c28: 6a 01 push $0x1 c2a: e8 01 2e 00 00 call 3a30 <printf> c2f: 83 c4 10 add $0x10,%esp c32: 83 ec 0c sub $0xc,%esp c35: ff 75 e4 pushl -0x1c(%ebp) c38: e8 8d 2c 00 00 call 38ca <close> c3d: 83 c4 10 add $0x10,%esp c40: eb fe jmp c40 <preempt+0x90> c42: 83 ec 0c sub $0xc,%esp c45: ff 75 e4 pushl -0x1c(%ebp) c48: e8 7d 2c 00 00 call 38ca <close> c4d: 83 c4 0c add $0xc,%esp c50: 68 00 20 00 00 push $0x2000 c55: 68 20 86 00 00 push $0x8620 c5a: ff 75 e0 pushl -0x20(%ebp) c5d: e8 58 2c 00 00 call 38ba <read> c62: 83 c4 10 add $0x10,%esp c65: 83 e8 01 sub $0x1,%eax c68: 74 19 je c83 <preempt+0xd3> c6a: 50 push %eax c6b: 50 push %eax c6c: 68 3a 41 00 00 push $0x413a c71: 6a 01 push $0x1 c73: e8 b8 2d 00 00 call 3a30 <printf> c78: 83 c4 10 add $0x10,%esp c7b: 8d 65 f4 lea -0xc(%ebp),%esp c7e: 5b pop %ebx c7f: 5e pop %esi c80: 5f pop %edi c81: 5d pop %ebp c82: c3 ret c83: 83 ec 0c sub $0xc,%esp c86: ff 75 e0 pushl -0x20(%ebp) c89: e8 3c 2c 00 00 call 38ca <close> c8e: 58 pop %eax c8f: 5a pop %edx c90: 68 4d 41 00 00 push $0x414d c95: 6a 01 push $0x1 c97: e8 94 2d 00 00 call 3a30 <printf> c9c: 89 3c 24 mov %edi,(%esp) c9f: e8 2e 2c 00 00 call 38d2 <kill> ca4: 89 34 24 mov %esi,(%esp) ca7: e8 26 2c 00 00 call 38d2 <kill> cac: 89 1c 24 mov %ebx,(%esp) caf: e8 1e 2c 00 00 call 38d2 <kill> cb4: 59 pop %ecx cb5: 5b pop %ebx cb6: 68 56 41 00 00 push $0x4156 cbb: 6a 01 push $0x1 cbd: e8 6e 2d 00 00 call 3a30 <printf> cc2: e8 e3 2b 00 00 call 38aa <wait> cc7: e8 de 2b 00 00 call 38aa <wait> ccc: e8 d9 2b 00 00 call 38aa <wait> cd1: 5e pop %esi cd2: 5f pop %edi cd3: 68 5f 41 00 00 push $0x415f cd8: 6a 01 push $0x1 cda: e8 51 2d 00 00 call 3a30 <printf> cdf: 83 c4 10 add $0x10,%esp ce2: eb 97 jmp c7b <preempt+0xcb> ce4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cea: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000cf0 <exitwait>: cf0: 55 push %ebp cf1: 89 e5 mov %esp,%ebp cf3: 56 push %esi cf4: be 64 00 00 00 mov $0x64,%esi cf9: 53 push %ebx cfa: eb 14 jmp d10 <exitwait+0x20> cfc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi d00: 74 6f je d71 <exitwait+0x81> d02: e8 a3 2b 00 00 call 38aa <wait> d07: 39 d8 cmp %ebx,%eax d09: 75 2d jne d38 <exitwait+0x48> d0b: 83 ee 01 sub $0x1,%esi d0e: 74 48 je d58 <exitwait+0x68> d10: e8 85 2b 00 00 call 389a <fork> d15: 85 c0 test %eax,%eax d17: 89 c3 mov %eax,%ebx d19: 79 e5 jns d00 <exitwait+0x10> d1b: 83 ec 08 sub $0x8,%esp d1e: 68 c9 4c 00 00 push $0x4cc9 d23: 6a 01 push $0x1 d25: e8 06 2d 00 00 call 3a30 <printf> d2a: 83 c4 10 add $0x10,%esp d2d: 8d 65 f8 lea -0x8(%ebp),%esp d30: 5b pop %ebx d31: 5e pop %esi d32: 5d pop %ebp d33: c3 ret d34: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi d38: 83 ec 08 sub $0x8,%esp d3b: 68 6b 41 00 00 push $0x416b d40: 6a 01 push $0x1 d42: e8 e9 2c 00 00 call 3a30 <printf> d47: 83 c4 10 add $0x10,%esp d4a: 8d 65 f8 lea -0x8(%ebp),%esp d4d: 5b pop %ebx d4e: 5e pop %esi d4f: 5d pop %ebp d50: c3 ret d51: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi d58: 83 ec 08 sub $0x8,%esp d5b: 68 7b 41 00 00 push $0x417b d60: 6a 01 push $0x1 d62: e8 c9 2c 00 00 call 3a30 <printf> d67: 83 c4 10 add $0x10,%esp d6a: 8d 65 f8 lea -0x8(%ebp),%esp d6d: 5b pop %ebx d6e: 5e pop %esi d6f: 5d pop %ebp d70: c3 ret d71: e8 2c 2b 00 00 call 38a2 <exit> d76: 8d 76 00 lea 0x0(%esi),%esi d79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000d80 <mem>: d80: 55 push %ebp d81: 89 e5 mov %esp,%ebp d83: 57 push %edi d84: 56 push %esi d85: 53 push %ebx d86: 31 db xor %ebx,%ebx d88: 83 ec 14 sub $0x14,%esp d8b: 68 88 41 00 00 push $0x4188 d90: 6a 01 push $0x1 d92: e8 99 2c 00 00 call 3a30 <printf> d97: e8 86 2b 00 00 call 3922 <getpid> d9c: 89 c6 mov %eax,%esi d9e: e8 f7 2a 00 00 call 389a <fork> da3: 83 c4 10 add $0x10,%esp da6: 85 c0 test %eax,%eax da8: 74 0a je db4 <mem+0x34> daa: e9 89 00 00 00 jmp e38 <mem+0xb8> daf: 90 nop db0: 89 18 mov %ebx,(%eax) db2: 89 c3 mov %eax,%ebx db4: 83 ec 0c sub $0xc,%esp db7: 68 11 27 00 00 push $0x2711 dbc: e8 cf 2e 00 00 call 3c90 <malloc> dc1: 83 c4 10 add $0x10,%esp dc4: 85 c0 test %eax,%eax dc6: 75 e8 jne db0 <mem+0x30> dc8: 85 db test %ebx,%ebx dca: 74 18 je de4 <mem+0x64> dcc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi dd0: 8b 3b mov (%ebx),%edi dd2: 83 ec 0c sub $0xc,%esp dd5: 53 push %ebx dd6: 89 fb mov %edi,%ebx dd8: e8 23 2e 00 00 call 3c00 <free> ddd: 83 c4 10 add $0x10,%esp de0: 85 db test %ebx,%ebx de2: 75 ec jne dd0 <mem+0x50> de4: 83 ec 0c sub $0xc,%esp de7: 68 00 50 00 00 push $0x5000 dec: e8 9f 2e 00 00 call 3c90 <malloc> df1: 83 c4 10 add $0x10,%esp df4: 85 c0 test %eax,%eax df6: 74 20 je e18 <mem+0x98> df8: 83 ec 0c sub $0xc,%esp dfb: 50 push %eax dfc: e8 ff 2d 00 00 call 3c00 <free> e01: 58 pop %eax e02: 5a pop %edx e03: 68 ac 41 00 00 push $0x41ac e08: 6a 01 push $0x1 e0a: e8 21 2c 00 00 call 3a30 <printf> e0f: e8 8e 2a 00 00 call 38a2 <exit> e14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi e18: 83 ec 08 sub $0x8,%esp e1b: 68 92 41 00 00 push $0x4192 e20: 6a 01 push $0x1 e22: e8 09 2c 00 00 call 3a30 <printf> e27: 89 34 24 mov %esi,(%esp) e2a: e8 a3 2a 00 00 call 38d2 <kill> e2f: e8 6e 2a 00 00 call 38a2 <exit> e34: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi e38: 8d 65 f4 lea -0xc(%ebp),%esp e3b: 5b pop %ebx e3c: 5e pop %esi e3d: 5f pop %edi e3e: 5d pop %ebp e3f: e9 66 2a 00 00 jmp 38aa <wait> e44: 8d b6 00 00 00 00 lea 0x0(%esi),%esi e4a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000e50 <sharedfd>: e50: 55 push %ebp e51: 89 e5 mov %esp,%ebp e53: 57 push %edi e54: 56 push %esi e55: 53 push %ebx e56: 83 ec 34 sub $0x34,%esp e59: 68 b4 41 00 00 push $0x41b4 e5e: 6a 01 push $0x1 e60: e8 cb 2b 00 00 call 3a30 <printf> e65: c7 04 24 c3 41 00 00 movl $0x41c3,(%esp) e6c: e8 81 2a 00 00 call 38f2 <unlink> e71: 59 pop %ecx e72: 5b pop %ebx e73: 68 02 02 00 00 push $0x202 e78: 68 c3 41 00 00 push $0x41c3 e7d: e8 60 2a 00 00 call 38e2 <open> e82: 83 c4 10 add $0x10,%esp e85: 85 c0 test %eax,%eax e87: 0f 88 33 01 00 00 js fc0 <sharedfd+0x170> e8d: 89 c6 mov %eax,%esi e8f: bb e8 03 00 00 mov $0x3e8,%ebx e94: e8 01 2a 00 00 call 389a <fork> e99: 83 f8 01 cmp $0x1,%eax e9c: 89 c7 mov %eax,%edi e9e: 19 c0 sbb %eax,%eax ea0: 83 ec 04 sub $0x4,%esp ea3: 83 e0 f3 and $0xfffffff3,%eax ea6: 6a 0a push $0xa ea8: 83 c0 70 add $0x70,%eax eab: 50 push %eax eac: 8d 45 de lea -0x22(%ebp),%eax eaf: 50 push %eax eb0: e8 4b 28 00 00 call 3700 <memset> eb5: 83 c4 10 add $0x10,%esp eb8: eb 0b jmp ec5 <sharedfd+0x75> eba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi ec0: 83 eb 01 sub $0x1,%ebx ec3: 74 29 je eee <sharedfd+0x9e> ec5: 8d 45 de lea -0x22(%ebp),%eax ec8: 83 ec 04 sub $0x4,%esp ecb: 6a 0a push $0xa ecd: 50 push %eax ece: 56 push %esi ecf: e8 ee 29 00 00 call 38c2 <write> ed4: 83 c4 10 add $0x10,%esp ed7: 83 f8 0a cmp $0xa,%eax eda: 74 e4 je ec0 <sharedfd+0x70> edc: 83 ec 08 sub $0x8,%esp edf: 68 b4 4e 00 00 push $0x4eb4 ee4: 6a 01 push $0x1 ee6: e8 45 2b 00 00 call 3a30 <printf> eeb: 83 c4 10 add $0x10,%esp eee: 85 ff test %edi,%edi ef0: 0f 84 fe 00 00 00 je ff4 <sharedfd+0x1a4> ef6: e8 af 29 00 00 call 38aa <wait> efb: 83 ec 0c sub $0xc,%esp efe: 31 db xor %ebx,%ebx f00: 31 ff xor %edi,%edi f02: 56 push %esi f03: 8d 75 e8 lea -0x18(%ebp),%esi f06: e8 bf 29 00 00 call 38ca <close> f0b: 58 pop %eax f0c: 5a pop %edx f0d: 6a 00 push $0x0 f0f: 68 c3 41 00 00 push $0x41c3 f14: e8 c9 29 00 00 call 38e2 <open> f19: 83 c4 10 add $0x10,%esp f1c: 85 c0 test %eax,%eax f1e: 89 45 d4 mov %eax,-0x2c(%ebp) f21: 0f 88 b3 00 00 00 js fda <sharedfd+0x18a> f27: 89 f8 mov %edi,%eax f29: 89 df mov %ebx,%edi f2b: 89 c3 mov %eax,%ebx f2d: 8d 76 00 lea 0x0(%esi),%esi f30: 8d 45 de lea -0x22(%ebp),%eax f33: 83 ec 04 sub $0x4,%esp f36: 6a 0a push $0xa f38: 50 push %eax f39: ff 75 d4 pushl -0x2c(%ebp) f3c: e8 79 29 00 00 call 38ba <read> f41: 83 c4 10 add $0x10,%esp f44: 85 c0 test %eax,%eax f46: 7e 28 jle f70 <sharedfd+0x120> f48: 8d 45 de lea -0x22(%ebp),%eax f4b: eb 15 jmp f62 <sharedfd+0x112> f4d: 8d 76 00 lea 0x0(%esi),%esi f50: 80 fa 70 cmp $0x70,%dl f53: 0f 94 c2 sete %dl f56: 0f b6 d2 movzbl %dl,%edx f59: 01 d7 add %edx,%edi f5b: 83 c0 01 add $0x1,%eax f5e: 39 f0 cmp %esi,%eax f60: 74 ce je f30 <sharedfd+0xe0> f62: 0f b6 10 movzbl (%eax),%edx f65: 80 fa 63 cmp $0x63,%dl f68: 75 e6 jne f50 <sharedfd+0x100> f6a: 83 c3 01 add $0x1,%ebx f6d: eb ec jmp f5b <sharedfd+0x10b> f6f: 90 nop f70: 83 ec 0c sub $0xc,%esp f73: 89 d8 mov %ebx,%eax f75: ff 75 d4 pushl -0x2c(%ebp) f78: 89 fb mov %edi,%ebx f7a: 89 c7 mov %eax,%edi f7c: e8 49 29 00 00 call 38ca <close> f81: c7 04 24 c3 41 00 00 movl $0x41c3,(%esp) f88: e8 65 29 00 00 call 38f2 <unlink> f8d: 83 c4 10 add $0x10,%esp f90: 81 ff 10 27 00 00 cmp $0x2710,%edi f96: 75 61 jne ff9 <sharedfd+0x1a9> f98: 81 fb 10 27 00 00 cmp $0x2710,%ebx f9e: 75 59 jne ff9 <sharedfd+0x1a9> fa0: 83 ec 08 sub $0x8,%esp fa3: 68 cc 41 00 00 push $0x41cc fa8: 6a 01 push $0x1 faa: e8 81 2a 00 00 call 3a30 <printf> faf: 83 c4 10 add $0x10,%esp fb2: 8d 65 f4 lea -0xc(%ebp),%esp fb5: 5b pop %ebx fb6: 5e pop %esi fb7: 5f pop %edi fb8: 5d pop %ebp fb9: c3 ret fba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi fc0: 83 ec 08 sub $0x8,%esp fc3: 68 88 4e 00 00 push $0x4e88 fc8: 6a 01 push $0x1 fca: e8 61 2a 00 00 call 3a30 <printf> fcf: 83 c4 10 add $0x10,%esp fd2: 8d 65 f4 lea -0xc(%ebp),%esp fd5: 5b pop %ebx fd6: 5e pop %esi fd7: 5f pop %edi fd8: 5d pop %ebp fd9: c3 ret fda: 83 ec 08 sub $0x8,%esp fdd: 68 d4 4e 00 00 push $0x4ed4 fe2: 6a 01 push $0x1 fe4: e8 47 2a 00 00 call 3a30 <printf> fe9: 83 c4 10 add $0x10,%esp fec: 8d 65 f4 lea -0xc(%ebp),%esp fef: 5b pop %ebx ff0: 5e pop %esi ff1: 5f pop %edi ff2: 5d pop %ebp ff3: c3 ret ff4: e8 a9 28 00 00 call 38a2 <exit> ff9: 53 push %ebx ffa: 57 push %edi ffb: 68 d9 41 00 00 push $0x41d9 1000: 6a 01 push $0x1 1002: e8 29 2a 00 00 call 3a30 <printf> 1007: e8 96 28 00 00 call 38a2 <exit> 100c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00001010 <fourfiles>: 1010: 55 push %ebp 1011: 89 e5 mov %esp,%ebp 1013: 57 push %edi 1014: 56 push %esi 1015: 53 push %ebx 1016: be ee 41 00 00 mov $0x41ee,%esi 101b: 31 db xor %ebx,%ebx 101d: 83 ec 34 sub $0x34,%esp 1020: c7 45 d8 ee 41 00 00 movl $0x41ee,-0x28(%ebp) 1027: c7 45 dc 37 43 00 00 movl $0x4337,-0x24(%ebp) 102e: 68 f4 41 00 00 push $0x41f4 1033: 6a 01 push $0x1 1035: c7 45 e0 3b 43 00 00 movl $0x433b,-0x20(%ebp) 103c: c7 45 e4 f1 41 00 00 movl $0x41f1,-0x1c(%ebp) 1043: e8 e8 29 00 00 call 3a30 <printf> 1048: 83 c4 10 add $0x10,%esp 104b: 83 ec 0c sub $0xc,%esp 104e: 56 push %esi 104f: e8 9e 28 00 00 call 38f2 <unlink> 1054: e8 41 28 00 00 call 389a <fork> 1059: 83 c4 10 add $0x10,%esp 105c: 85 c0 test %eax,%eax 105e: 0f 88 68 01 00 00 js 11cc <fourfiles+0x1bc> 1064: 0f 84 df 00 00 00 je 1149 <fourfiles+0x139> 106a: 83 c3 01 add $0x1,%ebx 106d: 83 fb 04 cmp $0x4,%ebx 1070: 74 06 je 1078 <fourfiles+0x68> 1072: 8b 74 9d d8 mov -0x28(%ebp,%ebx,4),%esi 1076: eb d3 jmp 104b <fourfiles+0x3b> 1078: e8 2d 28 00 00 call 38aa <wait> 107d: 31 ff xor %edi,%edi 107f: e8 26 28 00 00 call 38aa <wait> 1084: e8 21 28 00 00 call 38aa <wait> 1089: e8 1c 28 00 00 call 38aa <wait> 108e: c7 45 d0 ee 41 00 00 movl $0x41ee,-0x30(%ebp) 1095: 83 ec 08 sub $0x8,%esp 1098: 31 db xor %ebx,%ebx 109a: 6a 00 push $0x0 109c: ff 75 d0 pushl -0x30(%ebp) 109f: e8 3e 28 00 00 call 38e2 <open> 10a4: 83 c4 10 add $0x10,%esp 10a7: 89 45 d4 mov %eax,-0x2c(%ebp) 10aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 10b0: 83 ec 04 sub $0x4,%esp 10b3: 68 00 20 00 00 push $0x2000 10b8: 68 20 86 00 00 push $0x8620 10bd: ff 75 d4 pushl -0x2c(%ebp) 10c0: e8 f5 27 00 00 call 38ba <read> 10c5: 83 c4 10 add $0x10,%esp 10c8: 85 c0 test %eax,%eax 10ca: 7e 26 jle 10f2 <fourfiles+0xe2> 10cc: 31 d2 xor %edx,%edx 10ce: 66 90 xchg %ax,%ax 10d0: 0f be b2 20 86 00 00 movsbl 0x8620(%edx),%esi 10d7: 83 ff 01 cmp $0x1,%edi 10da: 19 c9 sbb %ecx,%ecx 10dc: 83 c1 31 add $0x31,%ecx 10df: 39 ce cmp %ecx,%esi 10e1: 0f 85 be 00 00 00 jne 11a5 <fourfiles+0x195> 10e7: 83 c2 01 add $0x1,%edx 10ea: 39 d0 cmp %edx,%eax 10ec: 75 e2 jne 10d0 <fourfiles+0xc0> 10ee: 01 c3 add %eax,%ebx 10f0: eb be jmp 10b0 <fourfiles+0xa0> 10f2: 83 ec 0c sub $0xc,%esp 10f5: ff 75 d4 pushl -0x2c(%ebp) 10f8: e8 cd 27 00 00 call 38ca <close> 10fd: 83 c4 10 add $0x10,%esp 1100: 81 fb 70 17 00 00 cmp $0x1770,%ebx 1106: 0f 85 d3 00 00 00 jne 11df <fourfiles+0x1cf> 110c: 83 ec 0c sub $0xc,%esp 110f: ff 75 d0 pushl -0x30(%ebp) 1112: e8 db 27 00 00 call 38f2 <unlink> 1117: 83 c4 10 add $0x10,%esp 111a: 83 ff 01 cmp $0x1,%edi 111d: 75 1a jne 1139 <fourfiles+0x129> 111f: 83 ec 08 sub $0x8,%esp 1122: 68 32 42 00 00 push $0x4232 1127: 6a 01 push $0x1 1129: e8 02 29 00 00 call 3a30 <printf> 112e: 83 c4 10 add $0x10,%esp 1131: 8d 65 f4 lea -0xc(%ebp),%esp 1134: 5b pop %ebx 1135: 5e pop %esi 1136: 5f pop %edi 1137: 5d pop %ebp 1138: c3 ret 1139: 8b 45 dc mov -0x24(%ebp),%eax 113c: bf 01 00 00 00 mov $0x1,%edi 1141: 89 45 d0 mov %eax,-0x30(%ebp) 1144: e9 4c ff ff ff jmp 1095 <fourfiles+0x85> 1149: 83 ec 08 sub $0x8,%esp 114c: 68 02 02 00 00 push $0x202 1151: 56 push %esi 1152: e8 8b 27 00 00 call 38e2 <open> 1157: 83 c4 10 add $0x10,%esp 115a: 85 c0 test %eax,%eax 115c: 89 c6 mov %eax,%esi 115e: 78 59 js 11b9 <fourfiles+0x1a9> 1160: 83 ec 04 sub $0x4,%esp 1163: 83 c3 30 add $0x30,%ebx 1166: 68 00 02 00 00 push $0x200 116b: 53 push %ebx 116c: bb 0c 00 00 00 mov $0xc,%ebx 1171: 68 20 86 00 00 push $0x8620 1176: e8 85 25 00 00 call 3700 <memset> 117b: 83 c4 10 add $0x10,%esp 117e: 83 ec 04 sub $0x4,%esp 1181: 68 f4 01 00 00 push $0x1f4 1186: 68 20 86 00 00 push $0x8620 118b: 56 push %esi 118c: e8 31 27 00 00 call 38c2 <write> 1191: 83 c4 10 add $0x10,%esp 1194: 3d f4 01 00 00 cmp $0x1f4,%eax 1199: 75 57 jne 11f2 <fourfiles+0x1e2> 119b: 83 eb 01 sub $0x1,%ebx 119e: 75 de jne 117e <fourfiles+0x16e> 11a0: e8 fd 26 00 00 call 38a2 <exit> 11a5: 83 ec 08 sub $0x8,%esp 11a8: 68 15 42 00 00 push $0x4215 11ad: 6a 01 push $0x1 11af: e8 7c 28 00 00 call 3a30 <printf> 11b4: e8 e9 26 00 00 call 38a2 <exit> 11b9: 51 push %ecx 11ba: 51 push %ecx 11bb: 68 8f 44 00 00 push $0x448f 11c0: 6a 01 push $0x1 11c2: e8 69 28 00 00 call 3a30 <printf> 11c7: e8 d6 26 00 00 call 38a2 <exit> 11cc: 53 push %ebx 11cd: 53 push %ebx 11ce: 68 c9 4c 00 00 push $0x4cc9 11d3: 6a 01 push $0x1 11d5: e8 56 28 00 00 call 3a30 <printf> 11da: e8 c3 26 00 00 call 38a2 <exit> 11df: 50 push %eax 11e0: 53 push %ebx 11e1: 68 21 42 00 00 push $0x4221 11e6: 6a 01 push $0x1 11e8: e8 43 28 00 00 call 3a30 <printf> 11ed: e8 b0 26 00 00 call 38a2 <exit> 11f2: 52 push %edx 11f3: 50 push %eax 11f4: 68 04 42 00 00 push $0x4204 11f9: 6a 01 push $0x1 11fb: e8 30 28 00 00 call 3a30 <printf> 1200: e8 9d 26 00 00 call 38a2 <exit> 1205: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1209: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00001210 <createdelete>: 1210: 55 push %ebp 1211: 89 e5 mov %esp,%ebp 1213: 57 push %edi 1214: 56 push %esi 1215: 53 push %ebx 1216: 31 db xor %ebx,%ebx 1218: 83 ec 44 sub $0x44,%esp 121b: 68 40 42 00 00 push $0x4240 1220: 6a 01 push $0x1 1222: e8 09 28 00 00 call 3a30 <printf> 1227: 83 c4 10 add $0x10,%esp 122a: e8 6b 26 00 00 call 389a <fork> 122f: 85 c0 test %eax,%eax 1231: 0f 88 be 01 00 00 js 13f5 <createdelete+0x1e5> 1237: 0f 84 0b 01 00 00 je 1348 <createdelete+0x138> 123d: 83 c3 01 add $0x1,%ebx 1240: 83 fb 04 cmp $0x4,%ebx 1243: 75 e5 jne 122a <createdelete+0x1a> 1245: 8d 7d c8 lea -0x38(%ebp),%edi 1248: be ff ff ff ff mov $0xffffffff,%esi 124d: e8 58 26 00 00 call 38aa <wait> 1252: e8 53 26 00 00 call 38aa <wait> 1257: e8 4e 26 00 00 call 38aa <wait> 125c: e8 49 26 00 00 call 38aa <wait> 1261: c6 45 ca 00 movb $0x0,-0x36(%ebp) 1265: 8d 76 00 lea 0x0(%esi),%esi 1268: 8d 46 31 lea 0x31(%esi),%eax 126b: 88 45 c7 mov %al,-0x39(%ebp) 126e: 8d 46 01 lea 0x1(%esi),%eax 1271: 83 f8 09 cmp $0x9,%eax 1274: 89 45 c0 mov %eax,-0x40(%ebp) 1277: 0f 9f c3 setg %bl 127a: 85 c0 test %eax,%eax 127c: 0f 94 c0 sete %al 127f: 09 c3 or %eax,%ebx 1281: 88 5d c6 mov %bl,-0x3a(%ebp) 1284: bb 70 00 00 00 mov $0x70,%ebx 1289: 0f b6 45 c7 movzbl -0x39(%ebp),%eax 128d: 83 ec 08 sub $0x8,%esp 1290: 88 5d c8 mov %bl,-0x38(%ebp) 1293: 6a 00 push $0x0 1295: 57 push %edi 1296: 88 45 c9 mov %al,-0x37(%ebp) 1299: e8 44 26 00 00 call 38e2 <open> 129e: 83 c4 10 add $0x10,%esp 12a1: 80 7d c6 00 cmpb $0x0,-0x3a(%ebp) 12a5: 0f 84 85 00 00 00 je 1330 <createdelete+0x120> 12ab: 85 c0 test %eax,%eax 12ad: 0f 88 1a 01 00 00 js 13cd <createdelete+0x1bd> 12b3: 83 fe 08 cmp $0x8,%esi 12b6: 0f 86 54 01 00 00 jbe 1410 <createdelete+0x200> 12bc: 83 ec 0c sub $0xc,%esp 12bf: 50 push %eax 12c0: e8 05 26 00 00 call 38ca <close> 12c5: 83 c4 10 add $0x10,%esp 12c8: 83 c3 01 add $0x1,%ebx 12cb: 80 fb 74 cmp $0x74,%bl 12ce: 75 b9 jne 1289 <createdelete+0x79> 12d0: 8b 75 c0 mov -0x40(%ebp),%esi 12d3: 83 fe 13 cmp $0x13,%esi 12d6: 75 90 jne 1268 <createdelete+0x58> 12d8: be 70 00 00 00 mov $0x70,%esi 12dd: 8d 76 00 lea 0x0(%esi),%esi 12e0: 8d 46 c0 lea -0x40(%esi),%eax 12e3: bb 04 00 00 00 mov $0x4,%ebx 12e8: 88 45 c7 mov %al,-0x39(%ebp) 12eb: 89 f0 mov %esi,%eax 12ed: 83 ec 0c sub $0xc,%esp 12f0: 88 45 c8 mov %al,-0x38(%ebp) 12f3: 0f b6 45 c7 movzbl -0x39(%ebp),%eax 12f7: 57 push %edi 12f8: 88 45 c9 mov %al,-0x37(%ebp) 12fb: e8 f2 25 00 00 call 38f2 <unlink> 1300: 83 c4 10 add $0x10,%esp 1303: 83 eb 01 sub $0x1,%ebx 1306: 75 e3 jne 12eb <createdelete+0xdb> 1308: 83 c6 01 add $0x1,%esi 130b: 89 f0 mov %esi,%eax 130d: 3c 84 cmp $0x84,%al 130f: 75 cf jne 12e0 <createdelete+0xd0> 1311: 83 ec 08 sub $0x8,%esp 1314: 68 53 42 00 00 push $0x4253 1319: 6a 01 push $0x1 131b: e8 10 27 00 00 call 3a30 <printf> 1320: 8d 65 f4 lea -0xc(%ebp),%esp 1323: 5b pop %ebx 1324: 5e pop %esi 1325: 5f pop %edi 1326: 5d pop %ebp 1327: c3 ret 1328: 90 nop 1329: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 1330: 83 fe 08 cmp $0x8,%esi 1333: 0f 86 cf 00 00 00 jbe 1408 <createdelete+0x1f8> 1339: 85 c0 test %eax,%eax 133b: 78 8b js 12c8 <createdelete+0xb8> 133d: e9 7a ff ff ff jmp 12bc <createdelete+0xac> 1342: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 1348: 83 c3 70 add $0x70,%ebx 134b: c6 45 ca 00 movb $0x0,-0x36(%ebp) 134f: 8d 7d c8 lea -0x38(%ebp),%edi 1352: 88 5d c8 mov %bl,-0x38(%ebp) 1355: 31 db xor %ebx,%ebx 1357: eb 0f jmp 1368 <createdelete+0x158> 1359: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 1360: 83 fb 13 cmp $0x13,%ebx 1363: 74 63 je 13c8 <createdelete+0x1b8> 1365: 83 c3 01 add $0x1,%ebx 1368: 83 ec 08 sub $0x8,%esp 136b: 8d 43 30 lea 0x30(%ebx),%eax 136e: 68 02 02 00 00 push $0x202 1373: 57 push %edi 1374: 88 45 c9 mov %al,-0x37(%ebp) 1377: e8 66 25 00 00 call 38e2 <open> 137c: 83 c4 10 add $0x10,%esp 137f: 85 c0 test %eax,%eax 1381: 78 5f js 13e2 <createdelete+0x1d2> 1383: 83 ec 0c sub $0xc,%esp 1386: 50 push %eax 1387: e8 3e 25 00 00 call 38ca <close> 138c: 83 c4 10 add $0x10,%esp 138f: 85 db test %ebx,%ebx 1391: 74 d2 je 1365 <createdelete+0x155> 1393: f6 c3 01 test $0x1,%bl 1396: 75 c8 jne 1360 <createdelete+0x150> 1398: 83 ec 0c sub $0xc,%esp 139b: 89 d8 mov %ebx,%eax 139d: d1 f8 sar %eax 139f: 57 push %edi 13a0: 83 c0 30 add $0x30,%eax 13a3: 88 45 c9 mov %al,-0x37(%ebp) 13a6: e8 47 25 00 00 call 38f2 <unlink> 13ab: 83 c4 10 add $0x10,%esp 13ae: 85 c0 test %eax,%eax 13b0: 79 ae jns 1360 <createdelete+0x150> 13b2: 52 push %edx 13b3: 52 push %edx 13b4: 68 41 3e 00 00 push $0x3e41 13b9: 6a 01 push $0x1 13bb: e8 70 26 00 00 call 3a30 <printf> 13c0: e8 dd 24 00 00 call 38a2 <exit> 13c5: 8d 76 00 lea 0x0(%esi),%esi 13c8: e8 d5 24 00 00 call 38a2 <exit> 13cd: 83 ec 04 sub $0x4,%esp 13d0: 57 push %edi 13d1: 68 00 4f 00 00 push $0x4f00 13d6: 6a 01 push $0x1 13d8: e8 53 26 00 00 call 3a30 <printf> 13dd: e8 c0 24 00 00 call 38a2 <exit> 13e2: 51 push %ecx 13e3: 51 push %ecx 13e4: 68 8f 44 00 00 push $0x448f 13e9: 6a 01 push $0x1 13eb: e8 40 26 00 00 call 3a30 <printf> 13f0: e8 ad 24 00 00 call 38a2 <exit> 13f5: 53 push %ebx 13f6: 53 push %ebx 13f7: 68 c9 4c 00 00 push $0x4cc9 13fc: 6a 01 push $0x1 13fe: e8 2d 26 00 00 call 3a30 <printf> 1403: e8 9a 24 00 00 call 38a2 <exit> 1408: 85 c0 test %eax,%eax 140a: 0f 88 b8 fe ff ff js 12c8 <createdelete+0xb8> 1410: 50 push %eax 1411: 57 push %edi 1412: 68 24 4f 00 00 push $0x4f24 1417: 6a 01 push $0x1 1419: e8 12 26 00 00 call 3a30 <printf> 141e: e8 7f 24 00 00 call 38a2 <exit> 1423: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 1429: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00001430 <unlinkread>: 1430: 55 push %ebp 1431: 89 e5 mov %esp,%ebp 1433: 56 push %esi 1434: 53 push %ebx 1435: 83 ec 08 sub $0x8,%esp 1438: 68 64 42 00 00 push $0x4264 143d: 6a 01 push $0x1 143f: e8 ec 25 00 00 call 3a30 <printf> 1444: 5b pop %ebx 1445: 5e pop %esi 1446: 68 02 02 00 00 push $0x202 144b: 68 75 42 00 00 push $0x4275 1450: e8 8d 24 00 00 call 38e2 <open> 1455: 83 c4 10 add $0x10,%esp 1458: 85 c0 test %eax,%eax 145a: 0f 88 e6 00 00 00 js 1546 <unlinkread+0x116> 1460: 83 ec 04 sub $0x4,%esp 1463: 89 c3 mov %eax,%ebx 1465: 6a 05 push $0x5 1467: 68 9a 42 00 00 push $0x429a 146c: 50 push %eax 146d: e8 50 24 00 00 call 38c2 <write> 1472: 89 1c 24 mov %ebx,(%esp) 1475: e8 50 24 00 00 call 38ca <close> 147a: 58 pop %eax 147b: 5a pop %edx 147c: 6a 02 push $0x2 147e: 68 75 42 00 00 push $0x4275 1483: e8 5a 24 00 00 call 38e2 <open> 1488: 83 c4 10 add $0x10,%esp 148b: 85 c0 test %eax,%eax 148d: 89 c3 mov %eax,%ebx 148f: 0f 88 10 01 00 00 js 15a5 <unlinkread+0x175> 1495: 83 ec 0c sub $0xc,%esp 1498: 68 75 42 00 00 push $0x4275 149d: e8 50 24 00 00 call 38f2 <unlink> 14a2: 83 c4 10 add $0x10,%esp 14a5: 85 c0 test %eax,%eax 14a7: 0f 85 e5 00 00 00 jne 1592 <unlinkread+0x162> 14ad: 83 ec 08 sub $0x8,%esp 14b0: 68 02 02 00 00 push $0x202 14b5: 68 75 42 00 00 push $0x4275 14ba: e8 23 24 00 00 call 38e2 <open> 14bf: 83 c4 0c add $0xc,%esp 14c2: 89 c6 mov %eax,%esi 14c4: 6a 03 push $0x3 14c6: 68 d2 42 00 00 push $0x42d2 14cb: 50 push %eax 14cc: e8 f1 23 00 00 call 38c2 <write> 14d1: 89 34 24 mov %esi,(%esp) 14d4: e8 f1 23 00 00 call 38ca <close> 14d9: 83 c4 0c add $0xc,%esp 14dc: 68 00 20 00 00 push $0x2000 14e1: 68 20 86 00 00 push $0x8620 14e6: 53 push %ebx 14e7: e8 ce 23 00 00 call 38ba <read> 14ec: 83 c4 10 add $0x10,%esp 14ef: 83 f8 05 cmp $0x5,%eax 14f2: 0f 85 87 00 00 00 jne 157f <unlinkread+0x14f> 14f8: 80 3d 20 86 00 00 68 cmpb $0x68,0x8620 14ff: 75 6b jne 156c <unlinkread+0x13c> 1501: 83 ec 04 sub $0x4,%esp 1504: 6a 0a push $0xa 1506: 68 20 86 00 00 push $0x8620 150b: 53 push %ebx 150c: e8 b1 23 00 00 call 38c2 <write> 1511: 83 c4 10 add $0x10,%esp 1514: 83 f8 0a cmp $0xa,%eax 1517: 75 40 jne 1559 <unlinkread+0x129> 1519: 83 ec 0c sub $0xc,%esp 151c: 53 push %ebx 151d: e8 a8 23 00 00 call 38ca <close> 1522: c7 04 24 75 42 00 00 movl $0x4275,(%esp) 1529: e8 c4 23 00 00 call 38f2 <unlink> 152e: 58 pop %eax 152f: 5a pop %edx 1530: 68 1d 43 00 00 push $0x431d 1535: 6a 01 push $0x1 1537: e8 f4 24 00 00 call 3a30 <printf> 153c: 83 c4 10 add $0x10,%esp 153f: 8d 65 f8 lea -0x8(%ebp),%esp 1542: 5b pop %ebx 1543: 5e pop %esi 1544: 5d pop %ebp 1545: c3 ret 1546: 51 push %ecx 1547: 51 push %ecx 1548: 68 80 42 00 00 push $0x4280 154d: 6a 01 push $0x1 154f: e8 dc 24 00 00 call 3a30 <printf> 1554: e8 49 23 00 00 call 38a2 <exit> 1559: 51 push %ecx 155a: 51 push %ecx 155b: 68 04 43 00 00 push $0x4304 1560: 6a 01 push $0x1 1562: e8 c9 24 00 00 call 3a30 <printf> 1567: e8 36 23 00 00 call 38a2 <exit> 156c: 53 push %ebx 156d: 53 push %ebx 156e: 68 ed 42 00 00 push $0x42ed 1573: 6a 01 push $0x1 1575: e8 b6 24 00 00 call 3a30 <printf> 157a: e8 23 23 00 00 call 38a2 <exit> 157f: 56 push %esi 1580: 56 push %esi 1581: 68 d6 42 00 00 push $0x42d6 1586: 6a 01 push $0x1 1588: e8 a3 24 00 00 call 3a30 <printf> 158d: e8 10 23 00 00 call 38a2 <exit> 1592: 50 push %eax 1593: 50 push %eax 1594: 68 b8 42 00 00 push $0x42b8 1599: 6a 01 push $0x1 159b: e8 90 24 00 00 call 3a30 <printf> 15a0: e8 fd 22 00 00 call 38a2 <exit> 15a5: 50 push %eax 15a6: 50 push %eax 15a7: 68 a0 42 00 00 push $0x42a0 15ac: 6a 01 push $0x1 15ae: e8 7d 24 00 00 call 3a30 <printf> 15b3: e8 ea 22 00 00 call 38a2 <exit> 15b8: 90 nop 15b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 000015c0 <linktest>: 15c0: 55 push %ebp 15c1: 89 e5 mov %esp,%ebp 15c3: 53 push %ebx 15c4: 83 ec 0c sub $0xc,%esp 15c7: 68 2c 43 00 00 push $0x432c 15cc: 6a 01 push $0x1 15ce: e8 5d 24 00 00 call 3a30 <printf> 15d3: c7 04 24 36 43 00 00 movl $0x4336,(%esp) 15da: e8 13 23 00 00 call 38f2 <unlink> 15df: c7 04 24 3a 43 00 00 movl $0x433a,(%esp) 15e6: e8 07 23 00 00 call 38f2 <unlink> 15eb: 58 pop %eax 15ec: 5a pop %edx 15ed: 68 02 02 00 00 push $0x202 15f2: 68 36 43 00 00 push $0x4336 15f7: e8 e6 22 00 00 call 38e2 <open> 15fc: 83 c4 10 add $0x10,%esp 15ff: 85 c0 test %eax,%eax 1601: 0f 88 1e 01 00 00 js 1725 <linktest+0x165> 1607: 83 ec 04 sub $0x4,%esp 160a: 89 c3 mov %eax,%ebx 160c: 6a 05 push $0x5 160e: 68 9a 42 00 00 push $0x429a 1613: 50 push %eax 1614: e8 a9 22 00 00 call 38c2 <write> 1619: 83 c4 10 add $0x10,%esp 161c: 83 f8 05 cmp $0x5,%eax 161f: 0f 85 98 01 00 00 jne 17bd <linktest+0x1fd> 1625: 83 ec 0c sub $0xc,%esp 1628: 53 push %ebx 1629: e8 9c 22 00 00 call 38ca <close> 162e: 5b pop %ebx 162f: 58 pop %eax 1630: 68 3a 43 00 00 push $0x433a 1635: 68 36 43 00 00 push $0x4336 163a: e8 c3 22 00 00 call 3902 <link> 163f: 83 c4 10 add $0x10,%esp 1642: 85 c0 test %eax,%eax 1644: 0f 88 60 01 00 00 js 17aa <linktest+0x1ea> 164a: 83 ec 0c sub $0xc,%esp 164d: 68 36 43 00 00 push $0x4336 1652: e8 9b 22 00 00 call 38f2 <unlink> 1657: 58 pop %eax 1658: 5a pop %edx 1659: 6a 00 push $0x0 165b: 68 36 43 00 00 push $0x4336 1660: e8 7d 22 00 00 call 38e2 <open> 1665: 83 c4 10 add $0x10,%esp 1668: 85 c0 test %eax,%eax 166a: 0f 89 27 01 00 00 jns 1797 <linktest+0x1d7> 1670: 83 ec 08 sub $0x8,%esp 1673: 6a 00 push $0x0 1675: 68 3a 43 00 00 push $0x433a 167a: e8 63 22 00 00 call 38e2 <open> 167f: 83 c4 10 add $0x10,%esp 1682: 85 c0 test %eax,%eax 1684: 89 c3 mov %eax,%ebx 1686: 0f 88 f8 00 00 00 js 1784 <linktest+0x1c4> 168c: 83 ec 04 sub $0x4,%esp 168f: 68 00 20 00 00 push $0x2000 1694: 68 20 86 00 00 push $0x8620 1699: 50 push %eax 169a: e8 1b 22 00 00 call 38ba <read> 169f: 83 c4 10 add $0x10,%esp 16a2: 83 f8 05 cmp $0x5,%eax 16a5: 0f 85 c6 00 00 00 jne 1771 <linktest+0x1b1> 16ab: 83 ec 0c sub $0xc,%esp 16ae: 53 push %ebx 16af: e8 16 22 00 00 call 38ca <close> 16b4: 58 pop %eax 16b5: 5a pop %edx 16b6: 68 3a 43 00 00 push $0x433a 16bb: 68 3a 43 00 00 push $0x433a 16c0: e8 3d 22 00 00 call 3902 <link> 16c5: 83 c4 10 add $0x10,%esp 16c8: 85 c0 test %eax,%eax 16ca: 0f 89 8e 00 00 00 jns 175e <linktest+0x19e> 16d0: 83 ec 0c sub $0xc,%esp 16d3: 68 3a 43 00 00 push $0x433a 16d8: e8 15 22 00 00 call 38f2 <unlink> 16dd: 59 pop %ecx 16de: 5b pop %ebx 16df: 68 36 43 00 00 push $0x4336 16e4: 68 3a 43 00 00 push $0x433a 16e9: e8 14 22 00 00 call 3902 <link> 16ee: 83 c4 10 add $0x10,%esp 16f1: 85 c0 test %eax,%eax 16f3: 79 56 jns 174b <linktest+0x18b> 16f5: 83 ec 08 sub $0x8,%esp 16f8: 68 36 43 00 00 push $0x4336 16fd: 68 fe 45 00 00 push $0x45fe 1702: e8 fb 21 00 00 call 3902 <link> 1707: 83 c4 10 add $0x10,%esp 170a: 85 c0 test %eax,%eax 170c: 79 2a jns 1738 <linktest+0x178> 170e: 83 ec 08 sub $0x8,%esp 1711: 68 d4 43 00 00 push $0x43d4 1716: 6a 01 push $0x1 1718: e8 13 23 00 00 call 3a30 <printf> 171d: 83 c4 10 add $0x10,%esp 1720: 8b 5d fc mov -0x4(%ebp),%ebx 1723: c9 leave 1724: c3 ret 1725: 50 push %eax 1726: 50 push %eax 1727: 68 3e 43 00 00 push $0x433e 172c: 6a 01 push $0x1 172e: e8 fd 22 00 00 call 3a30 <printf> 1733: e8 6a 21 00 00 call 38a2 <exit> 1738: 50 push %eax 1739: 50 push %eax 173a: 68 b8 43 00 00 push $0x43b8 173f: 6a 01 push $0x1 1741: e8 ea 22 00 00 call 3a30 <printf> 1746: e8 57 21 00 00 call 38a2 <exit> 174b: 52 push %edx 174c: 52 push %edx 174d: 68 6c 4f 00 00 push $0x4f6c 1752: 6a 01 push $0x1 1754: e8 d7 22 00 00 call 3a30 <printf> 1759: e8 44 21 00 00 call 38a2 <exit> 175e: 50 push %eax 175f: 50 push %eax 1760: 68 9a 43 00 00 push $0x439a 1765: 6a 01 push $0x1 1767: e8 c4 22 00 00 call 3a30 <printf> 176c: e8 31 21 00 00 call 38a2 <exit> 1771: 51 push %ecx 1772: 51 push %ecx 1773: 68 89 43 00 00 push $0x4389 1778: 6a 01 push $0x1 177a: e8 b1 22 00 00 call 3a30 <printf> 177f: e8 1e 21 00 00 call 38a2 <exit> 1784: 53 push %ebx 1785: 53 push %ebx 1786: 68 78 43 00 00 push $0x4378 178b: 6a 01 push $0x1 178d: e8 9e 22 00 00 call 3a30 <printf> 1792: e8 0b 21 00 00 call 38a2 <exit> 1797: 50 push %eax 1798: 50 push %eax 1799: 68 44 4f 00 00 push $0x4f44 179e: 6a 01 push $0x1 17a0: e8 8b 22 00 00 call 3a30 <printf> 17a5: e8 f8 20 00 00 call 38a2 <exit> 17aa: 51 push %ecx 17ab: 51 push %ecx 17ac: 68 63 43 00 00 push $0x4363 17b1: 6a 01 push $0x1 17b3: e8 78 22 00 00 call 3a30 <printf> 17b8: e8 e5 20 00 00 call 38a2 <exit> 17bd: 50 push %eax 17be: 50 push %eax 17bf: 68 51 43 00 00 push $0x4351 17c4: 6a 01 push $0x1 17c6: e8 65 22 00 00 call 3a30 <printf> 17cb: e8 d2 20 00 00 call 38a2 <exit> 000017d0 <concreate>: 17d0: 55 push %ebp 17d1: 89 e5 mov %esp,%ebp 17d3: 57 push %edi 17d4: 56 push %esi 17d5: 53 push %ebx 17d6: 31 f6 xor %esi,%esi 17d8: 8d 5d ad lea -0x53(%ebp),%ebx 17db: bf ab aa aa aa mov $0xaaaaaaab,%edi 17e0: 83 ec 64 sub $0x64,%esp 17e3: 68 e1 43 00 00 push $0x43e1 17e8: 6a 01 push $0x1 17ea: e8 41 22 00 00 call 3a30 <printf> 17ef: c6 45 ad 43 movb $0x43,-0x53(%ebp) 17f3: c6 45 af 00 movb $0x0,-0x51(%ebp) 17f7: 83 c4 10 add $0x10,%esp 17fa: eb 4c jmp 1848 <concreate+0x78> 17fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1800: 89 f0 mov %esi,%eax 1802: 89 f1 mov %esi,%ecx 1804: f7 e7 mul %edi 1806: d1 ea shr %edx 1808: 8d 04 52 lea (%edx,%edx,2),%eax 180b: 29 c1 sub %eax,%ecx 180d: 83 f9 01 cmp $0x1,%ecx 1810: 0f 84 ba 00 00 00 je 18d0 <concreate+0x100> 1816: 83 ec 08 sub $0x8,%esp 1819: 68 02 02 00 00 push $0x202 181e: 53 push %ebx 181f: e8 be 20 00 00 call 38e2 <open> 1824: 83 c4 10 add $0x10,%esp 1827: 85 c0 test %eax,%eax 1829: 78 67 js 1892 <concreate+0xc2> 182b: 83 ec 0c sub $0xc,%esp 182e: 83 c6 01 add $0x1,%esi 1831: 50 push %eax 1832: e8 93 20 00 00 call 38ca <close> 1837: 83 c4 10 add $0x10,%esp 183a: e8 6b 20 00 00 call 38aa <wait> 183f: 83 fe 28 cmp $0x28,%esi 1842: 0f 84 aa 00 00 00 je 18f2 <concreate+0x122> 1848: 83 ec 0c sub $0xc,%esp 184b: 8d 46 30 lea 0x30(%esi),%eax 184e: 53 push %ebx 184f: 88 45 ae mov %al,-0x52(%ebp) 1852: e8 9b 20 00 00 call 38f2 <unlink> 1857: e8 3e 20 00 00 call 389a <fork> 185c: 83 c4 10 add $0x10,%esp 185f: 85 c0 test %eax,%eax 1861: 75 9d jne 1800 <concreate+0x30> 1863: 89 f0 mov %esi,%eax 1865: ba cd cc cc cc mov $0xcccccccd,%edx 186a: f7 e2 mul %edx 186c: c1 ea 02 shr $0x2,%edx 186f: 8d 04 92 lea (%edx,%edx,4),%eax 1872: 29 c6 sub %eax,%esi 1874: 83 fe 01 cmp $0x1,%esi 1877: 74 37 je 18b0 <concreate+0xe0> 1879: 83 ec 08 sub $0x8,%esp 187c: 68 02 02 00 00 push $0x202 1881: 53 push %ebx 1882: e8 5b 20 00 00 call 38e2 <open> 1887: 83 c4 10 add $0x10,%esp 188a: 85 c0 test %eax,%eax 188c: 0f 89 28 02 00 00 jns 1aba <concreate+0x2ea> 1892: 83 ec 04 sub $0x4,%esp 1895: 53 push %ebx 1896: 68 f4 43 00 00 push $0x43f4 189b: 6a 01 push $0x1 189d: e8 8e 21 00 00 call 3a30 <printf> 18a2: e8 fb 1f 00 00 call 38a2 <exit> 18a7: 89 f6 mov %esi,%esi 18a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 18b0: 83 ec 08 sub $0x8,%esp 18b3: 53 push %ebx 18b4: 68 f1 43 00 00 push $0x43f1 18b9: e8 44 20 00 00 call 3902 <link> 18be: 83 c4 10 add $0x10,%esp 18c1: e8 dc 1f 00 00 call 38a2 <exit> 18c6: 8d 76 00 lea 0x0(%esi),%esi 18c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 18d0: 83 ec 08 sub $0x8,%esp 18d3: 83 c6 01 add $0x1,%esi 18d6: 53 push %ebx 18d7: 68 f1 43 00 00 push $0x43f1 18dc: e8 21 20 00 00 call 3902 <link> 18e1: 83 c4 10 add $0x10,%esp 18e4: e8 c1 1f 00 00 call 38aa <wait> 18e9: 83 fe 28 cmp $0x28,%esi 18ec: 0f 85 56 ff ff ff jne 1848 <concreate+0x78> 18f2: 8d 45 c0 lea -0x40(%ebp),%eax 18f5: 83 ec 04 sub $0x4,%esp 18f8: 6a 28 push $0x28 18fa: 6a 00 push $0x0 18fc: 50 push %eax 18fd: e8 fe 1d 00 00 call 3700 <memset> 1902: 5f pop %edi 1903: 58 pop %eax 1904: 6a 00 push $0x0 1906: 68 fe 45 00 00 push $0x45fe 190b: 8d 7d b0 lea -0x50(%ebp),%edi 190e: e8 cf 1f 00 00 call 38e2 <open> 1913: 83 c4 10 add $0x10,%esp 1916: 89 c6 mov %eax,%esi 1918: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) 191f: 90 nop 1920: 83 ec 04 sub $0x4,%esp 1923: 6a 10 push $0x10 1925: 57 push %edi 1926: 56 push %esi 1927: e8 8e 1f 00 00 call 38ba <read> 192c: 83 c4 10 add $0x10,%esp 192f: 85 c0 test %eax,%eax 1931: 7e 3d jle 1970 <concreate+0x1a0> 1933: 66 83 7d b0 00 cmpw $0x0,-0x50(%ebp) 1938: 74 e6 je 1920 <concreate+0x150> 193a: 80 7d b2 43 cmpb $0x43,-0x4e(%ebp) 193e: 75 e0 jne 1920 <concreate+0x150> 1940: 80 7d b4 00 cmpb $0x0,-0x4c(%ebp) 1944: 75 da jne 1920 <concreate+0x150> 1946: 0f be 45 b3 movsbl -0x4d(%ebp),%eax 194a: 83 e8 30 sub $0x30,%eax 194d: 83 f8 27 cmp $0x27,%eax 1950: 0f 87 4e 01 00 00 ja 1aa4 <concreate+0x2d4> 1956: 80 7c 05 c0 00 cmpb $0x0,-0x40(%ebp,%eax,1) 195b: 0f 85 2d 01 00 00 jne 1a8e <concreate+0x2be> 1961: c6 44 05 c0 01 movb $0x1,-0x40(%ebp,%eax,1) 1966: 83 45 a4 01 addl $0x1,-0x5c(%ebp) 196a: eb b4 jmp 1920 <concreate+0x150> 196c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1970: 83 ec 0c sub $0xc,%esp 1973: 56 push %esi 1974: e8 51 1f 00 00 call 38ca <close> 1979: 83 c4 10 add $0x10,%esp 197c: 83 7d a4 28 cmpl $0x28,-0x5c(%ebp) 1980: 0f 85 f5 00 00 00 jne 1a7b <concreate+0x2ab> 1986: 31 f6 xor %esi,%esi 1988: eb 48 jmp 19d2 <concreate+0x202> 198a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 1990: 85 ff test %edi,%edi 1992: 74 05 je 1999 <concreate+0x1c9> 1994: 83 fa 01 cmp $0x1,%edx 1997: 74 64 je 19fd <concreate+0x22d> 1999: 83 ec 0c sub $0xc,%esp 199c: 53 push %ebx 199d: e8 50 1f 00 00 call 38f2 <unlink> 19a2: 89 1c 24 mov %ebx,(%esp) 19a5: e8 48 1f 00 00 call 38f2 <unlink> 19aa: 89 1c 24 mov %ebx,(%esp) 19ad: e8 40 1f 00 00 call 38f2 <unlink> 19b2: 89 1c 24 mov %ebx,(%esp) 19b5: e8 38 1f 00 00 call 38f2 <unlink> 19ba: 83 c4 10 add $0x10,%esp 19bd: 85 ff test %edi,%edi 19bf: 0f 84 fc fe ff ff je 18c1 <concreate+0xf1> 19c5: 83 c6 01 add $0x1,%esi 19c8: e8 dd 1e 00 00 call 38aa <wait> 19cd: 83 fe 28 cmp $0x28,%esi 19d0: 74 7e je 1a50 <concreate+0x280> 19d2: 8d 46 30 lea 0x30(%esi),%eax 19d5: 88 45 ae mov %al,-0x52(%ebp) 19d8: e8 bd 1e 00 00 call 389a <fork> 19dd: 85 c0 test %eax,%eax 19df: 89 c7 mov %eax,%edi 19e1: 0f 88 80 00 00 00 js 1a67 <concreate+0x297> 19e7: b8 ab aa aa aa mov $0xaaaaaaab,%eax 19ec: f7 e6 mul %esi 19ee: d1 ea shr %edx 19f0: 8d 04 52 lea (%edx,%edx,2),%eax 19f3: 89 f2 mov %esi,%edx 19f5: 29 c2 sub %eax,%edx 19f7: 89 d0 mov %edx,%eax 19f9: 09 f8 or %edi,%eax 19fb: 75 93 jne 1990 <concreate+0x1c0> 19fd: 83 ec 08 sub $0x8,%esp 1a00: 6a 00 push $0x0 1a02: 53 push %ebx 1a03: e8 da 1e 00 00 call 38e2 <open> 1a08: 89 04 24 mov %eax,(%esp) 1a0b: e8 ba 1e 00 00 call 38ca <close> 1a10: 58 pop %eax 1a11: 5a pop %edx 1a12: 6a 00 push $0x0 1a14: 53 push %ebx 1a15: e8 c8 1e 00 00 call 38e2 <open> 1a1a: 89 04 24 mov %eax,(%esp) 1a1d: e8 a8 1e 00 00 call 38ca <close> 1a22: 59 pop %ecx 1a23: 58 pop %eax 1a24: 6a 00 push $0x0 1a26: 53 push %ebx 1a27: e8 b6 1e 00 00 call 38e2 <open> 1a2c: 89 04 24 mov %eax,(%esp) 1a2f: e8 96 1e 00 00 call 38ca <close> 1a34: 58 pop %eax 1a35: 5a pop %edx 1a36: 6a 00 push $0x0 1a38: 53 push %ebx 1a39: e8 a4 1e 00 00 call 38e2 <open> 1a3e: 89 04 24 mov %eax,(%esp) 1a41: e8 84 1e 00 00 call 38ca <close> 1a46: 83 c4 10 add $0x10,%esp 1a49: e9 6f ff ff ff jmp 19bd <concreate+0x1ed> 1a4e: 66 90 xchg %ax,%ax 1a50: 83 ec 08 sub $0x8,%esp 1a53: 68 46 44 00 00 push $0x4446 1a58: 6a 01 push $0x1 1a5a: e8 d1 1f 00 00 call 3a30 <printf> 1a5f: 8d 65 f4 lea -0xc(%ebp),%esp 1a62: 5b pop %ebx 1a63: 5e pop %esi 1a64: 5f pop %edi 1a65: 5d pop %ebp 1a66: c3 ret 1a67: 83 ec 08 sub $0x8,%esp 1a6a: 68 c9 4c 00 00 push $0x4cc9 1a6f: 6a 01 push $0x1 1a71: e8 ba 1f 00 00 call 3a30 <printf> 1a76: e8 27 1e 00 00 call 38a2 <exit> 1a7b: 51 push %ecx 1a7c: 51 push %ecx 1a7d: 68 90 4f 00 00 push $0x4f90 1a82: 6a 01 push $0x1 1a84: e8 a7 1f 00 00 call 3a30 <printf> 1a89: e8 14 1e 00 00 call 38a2 <exit> 1a8e: 8d 45 b2 lea -0x4e(%ebp),%eax 1a91: 53 push %ebx 1a92: 50 push %eax 1a93: 68 29 44 00 00 push $0x4429 1a98: 6a 01 push $0x1 1a9a: e8 91 1f 00 00 call 3a30 <printf> 1a9f: e8 fe 1d 00 00 call 38a2 <exit> 1aa4: 8d 45 b2 lea -0x4e(%ebp),%eax 1aa7: 56 push %esi 1aa8: 50 push %eax 1aa9: 68 10 44 00 00 push $0x4410 1aae: 6a 01 push $0x1 1ab0: e8 7b 1f 00 00 call 3a30 <printf> 1ab5: e8 e8 1d 00 00 call 38a2 <exit> 1aba: 83 ec 0c sub $0xc,%esp 1abd: 50 push %eax 1abe: e8 07 1e 00 00 call 38ca <close> 1ac3: 83 c4 10 add $0x10,%esp 1ac6: e9 f6 fd ff ff jmp 18c1 <concreate+0xf1> 1acb: 90 nop 1acc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00001ad0 <linkunlink>: 1ad0: 55 push %ebp 1ad1: 89 e5 mov %esp,%ebp 1ad3: 57 push %edi 1ad4: 56 push %esi 1ad5: 53 push %ebx 1ad6: 83 ec 24 sub $0x24,%esp 1ad9: 68 54 44 00 00 push $0x4454 1ade: 6a 01 push $0x1 1ae0: e8 4b 1f 00 00 call 3a30 <printf> 1ae5: c7 04 24 e1 46 00 00 movl $0x46e1,(%esp) 1aec: e8 01 1e 00 00 call 38f2 <unlink> 1af1: e8 a4 1d 00 00 call 389a <fork> 1af6: 83 c4 10 add $0x10,%esp 1af9: 85 c0 test %eax,%eax 1afb: 89 45 e4 mov %eax,-0x1c(%ebp) 1afe: 0f 88 b6 00 00 00 js 1bba <linkunlink+0xea> 1b04: 83 7d e4 01 cmpl $0x1,-0x1c(%ebp) 1b08: bb 64 00 00 00 mov $0x64,%ebx 1b0d: be ab aa aa aa mov $0xaaaaaaab,%esi 1b12: 19 ff sbb %edi,%edi 1b14: 83 e7 60 and $0x60,%edi 1b17: 83 c7 01 add $0x1,%edi 1b1a: eb 1e jmp 1b3a <linkunlink+0x6a> 1b1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1b20: 83 fa 01 cmp $0x1,%edx 1b23: 74 7b je 1ba0 <linkunlink+0xd0> 1b25: 83 ec 0c sub $0xc,%esp 1b28: 68 e1 46 00 00 push $0x46e1 1b2d: e8 c0 1d 00 00 call 38f2 <unlink> 1b32: 83 c4 10 add $0x10,%esp 1b35: 83 eb 01 sub $0x1,%ebx 1b38: 74 3d je 1b77 <linkunlink+0xa7> 1b3a: 69 cf 6d 4e c6 41 imul $0x41c64e6d,%edi,%ecx 1b40: 8d b9 39 30 00 00 lea 0x3039(%ecx),%edi 1b46: 89 f8 mov %edi,%eax 1b48: f7 e6 mul %esi 1b4a: d1 ea shr %edx 1b4c: 8d 04 52 lea (%edx,%edx,2),%eax 1b4f: 89 fa mov %edi,%edx 1b51: 29 c2 sub %eax,%edx 1b53: 75 cb jne 1b20 <linkunlink+0x50> 1b55: 83 ec 08 sub $0x8,%esp 1b58: 68 02 02 00 00 push $0x202 1b5d: 68 e1 46 00 00 push $0x46e1 1b62: e8 7b 1d 00 00 call 38e2 <open> 1b67: 89 04 24 mov %eax,(%esp) 1b6a: e8 5b 1d 00 00 call 38ca <close> 1b6f: 83 c4 10 add $0x10,%esp 1b72: 83 eb 01 sub $0x1,%ebx 1b75: 75 c3 jne 1b3a <linkunlink+0x6a> 1b77: 8b 45 e4 mov -0x1c(%ebp),%eax 1b7a: 85 c0 test %eax,%eax 1b7c: 74 4f je 1bcd <linkunlink+0xfd> 1b7e: e8 27 1d 00 00 call 38aa <wait> 1b83: 83 ec 08 sub $0x8,%esp 1b86: 68 69 44 00 00 push $0x4469 1b8b: 6a 01 push $0x1 1b8d: e8 9e 1e 00 00 call 3a30 <printf> 1b92: 8d 65 f4 lea -0xc(%ebp),%esp 1b95: 5b pop %ebx 1b96: 5e pop %esi 1b97: 5f pop %edi 1b98: 5d pop %ebp 1b99: c3 ret 1b9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 1ba0: 83 ec 08 sub $0x8,%esp 1ba3: 68 e1 46 00 00 push $0x46e1 1ba8: 68 65 44 00 00 push $0x4465 1bad: e8 50 1d 00 00 call 3902 <link> 1bb2: 83 c4 10 add $0x10,%esp 1bb5: e9 7b ff ff ff jmp 1b35 <linkunlink+0x65> 1bba: 52 push %edx 1bbb: 52 push %edx 1bbc: 68 c9 4c 00 00 push $0x4cc9 1bc1: 6a 01 push $0x1 1bc3: e8 68 1e 00 00 call 3a30 <printf> 1bc8: e8 d5 1c 00 00 call 38a2 <exit> 1bcd: e8 d0 1c 00 00 call 38a2 <exit> 1bd2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 1bd9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00001be0 <bigdir>: 1be0: 55 push %ebp 1be1: 89 e5 mov %esp,%ebp 1be3: 57 push %edi 1be4: 56 push %esi 1be5: 53 push %ebx 1be6: 83 ec 24 sub $0x24,%esp 1be9: 68 78 44 00 00 push $0x4478 1bee: 6a 01 push $0x1 1bf0: e8 3b 1e 00 00 call 3a30 <printf> 1bf5: c7 04 24 85 44 00 00 movl $0x4485,(%esp) 1bfc: e8 f1 1c 00 00 call 38f2 <unlink> 1c01: 5a pop %edx 1c02: 59 pop %ecx 1c03: 68 00 02 00 00 push $0x200 1c08: 68 85 44 00 00 push $0x4485 1c0d: e8 d0 1c 00 00 call 38e2 <open> 1c12: 83 c4 10 add $0x10,%esp 1c15: 85 c0 test %eax,%eax 1c17: 0f 88 de 00 00 00 js 1cfb <bigdir+0x11b> 1c1d: 83 ec 0c sub $0xc,%esp 1c20: 8d 7d de lea -0x22(%ebp),%edi 1c23: 31 f6 xor %esi,%esi 1c25: 50 push %eax 1c26: e8 9f 1c 00 00 call 38ca <close> 1c2b: 83 c4 10 add $0x10,%esp 1c2e: 66 90 xchg %ax,%ax 1c30: 89 f0 mov %esi,%eax 1c32: 83 ec 08 sub $0x8,%esp 1c35: c6 45 de 78 movb $0x78,-0x22(%ebp) 1c39: c1 f8 06 sar $0x6,%eax 1c3c: 57 push %edi 1c3d: 68 85 44 00 00 push $0x4485 1c42: 83 c0 30 add $0x30,%eax 1c45: c6 45 e1 00 movb $0x0,-0x1f(%ebp) 1c49: 88 45 df mov %al,-0x21(%ebp) 1c4c: 89 f0 mov %esi,%eax 1c4e: 83 e0 3f and $0x3f,%eax 1c51: 83 c0 30 add $0x30,%eax 1c54: 88 45 e0 mov %al,-0x20(%ebp) 1c57: e8 a6 1c 00 00 call 3902 <link> 1c5c: 83 c4 10 add $0x10,%esp 1c5f: 85 c0 test %eax,%eax 1c61: 89 c3 mov %eax,%ebx 1c63: 75 6e jne 1cd3 <bigdir+0xf3> 1c65: 83 c6 01 add $0x1,%esi 1c68: 81 fe f4 01 00 00 cmp $0x1f4,%esi 1c6e: 75 c0 jne 1c30 <bigdir+0x50> 1c70: 83 ec 0c sub $0xc,%esp 1c73: 68 85 44 00 00 push $0x4485 1c78: e8 75 1c 00 00 call 38f2 <unlink> 1c7d: 83 c4 10 add $0x10,%esp 1c80: 89 d8 mov %ebx,%eax 1c82: 83 ec 0c sub $0xc,%esp 1c85: c6 45 de 78 movb $0x78,-0x22(%ebp) 1c89: c1 f8 06 sar $0x6,%eax 1c8c: 57 push %edi 1c8d: c6 45 e1 00 movb $0x0,-0x1f(%ebp) 1c91: 83 c0 30 add $0x30,%eax 1c94: 88 45 df mov %al,-0x21(%ebp) 1c97: 89 d8 mov %ebx,%eax 1c99: 83 e0 3f and $0x3f,%eax 1c9c: 83 c0 30 add $0x30,%eax 1c9f: 88 45 e0 mov %al,-0x20(%ebp) 1ca2: e8 4b 1c 00 00 call 38f2 <unlink> 1ca7: 83 c4 10 add $0x10,%esp 1caa: 85 c0 test %eax,%eax 1cac: 75 39 jne 1ce7 <bigdir+0x107> 1cae: 83 c3 01 add $0x1,%ebx 1cb1: 81 fb f4 01 00 00 cmp $0x1f4,%ebx 1cb7: 75 c7 jne 1c80 <bigdir+0xa0> 1cb9: 83 ec 08 sub $0x8,%esp 1cbc: 68 c7 44 00 00 push $0x44c7 1cc1: 6a 01 push $0x1 1cc3: e8 68 1d 00 00 call 3a30 <printf> 1cc8: 83 c4 10 add $0x10,%esp 1ccb: 8d 65 f4 lea -0xc(%ebp),%esp 1cce: 5b pop %ebx 1ccf: 5e pop %esi 1cd0: 5f pop %edi 1cd1: 5d pop %ebp 1cd2: c3 ret 1cd3: 83 ec 08 sub $0x8,%esp 1cd6: 68 9e 44 00 00 push $0x449e 1cdb: 6a 01 push $0x1 1cdd: e8 4e 1d 00 00 call 3a30 <printf> 1ce2: e8 bb 1b 00 00 call 38a2 <exit> 1ce7: 83 ec 08 sub $0x8,%esp 1cea: 68 b2 44 00 00 push $0x44b2 1cef: 6a 01 push $0x1 1cf1: e8 3a 1d 00 00 call 3a30 <printf> 1cf6: e8 a7 1b 00 00 call 38a2 <exit> 1cfb: 50 push %eax 1cfc: 50 push %eax 1cfd: 68 88 44 00 00 push $0x4488 1d02: 6a 01 push $0x1 1d04: e8 27 1d 00 00 call 3a30 <printf> 1d09: e8 94 1b 00 00 call 38a2 <exit> 1d0e: 66 90 xchg %ax,%ax 00001d10 <subdir>: 1d10: 55 push %ebp 1d11: 89 e5 mov %esp,%ebp 1d13: 53 push %ebx 1d14: 83 ec 0c sub $0xc,%esp 1d17: 68 d2 44 00 00 push $0x44d2 1d1c: 6a 01 push $0x1 1d1e: e8 0d 1d 00 00 call 3a30 <printf> 1d23: c7 04 24 5b 45 00 00 movl $0x455b,(%esp) 1d2a: e8 c3 1b 00 00 call 38f2 <unlink> 1d2f: c7 04 24 f8 45 00 00 movl $0x45f8,(%esp) 1d36: e8 cf 1b 00 00 call 390a <mkdir> 1d3b: 83 c4 10 add $0x10,%esp 1d3e: 85 c0 test %eax,%eax 1d40: 0f 85 b3 05 00 00 jne 22f9 <subdir+0x5e9> 1d46: 83 ec 08 sub $0x8,%esp 1d49: 68 02 02 00 00 push $0x202 1d4e: 68 31 45 00 00 push $0x4531 1d53: e8 8a 1b 00 00 call 38e2 <open> 1d58: 83 c4 10 add $0x10,%esp 1d5b: 85 c0 test %eax,%eax 1d5d: 89 c3 mov %eax,%ebx 1d5f: 0f 88 81 05 00 00 js 22e6 <subdir+0x5d6> 1d65: 83 ec 04 sub $0x4,%esp 1d68: 6a 02 push $0x2 1d6a: 68 5b 45 00 00 push $0x455b 1d6f: 50 push %eax 1d70: e8 4d 1b 00 00 call 38c2 <write> 1d75: 89 1c 24 mov %ebx,(%esp) 1d78: e8 4d 1b 00 00 call 38ca <close> 1d7d: c7 04 24 f8 45 00 00 movl $0x45f8,(%esp) 1d84: e8 69 1b 00 00 call 38f2 <unlink> 1d89: 83 c4 10 add $0x10,%esp 1d8c: 85 c0 test %eax,%eax 1d8e: 0f 89 3f 05 00 00 jns 22d3 <subdir+0x5c3> 1d94: 83 ec 0c sub $0xc,%esp 1d97: 68 0c 45 00 00 push $0x450c 1d9c: e8 69 1b 00 00 call 390a <mkdir> 1da1: 83 c4 10 add $0x10,%esp 1da4: 85 c0 test %eax,%eax 1da6: 0f 85 14 05 00 00 jne 22c0 <subdir+0x5b0> 1dac: 83 ec 08 sub $0x8,%esp 1daf: 68 02 02 00 00 push $0x202 1db4: 68 2e 45 00 00 push $0x452e 1db9: e8 24 1b 00 00 call 38e2 <open> 1dbe: 83 c4 10 add $0x10,%esp 1dc1: 85 c0 test %eax,%eax 1dc3: 89 c3 mov %eax,%ebx 1dc5: 0f 88 24 04 00 00 js 21ef <subdir+0x4df> 1dcb: 83 ec 04 sub $0x4,%esp 1dce: 6a 02 push $0x2 1dd0: 68 4f 45 00 00 push $0x454f 1dd5: 50 push %eax 1dd6: e8 e7 1a 00 00 call 38c2 <write> 1ddb: 89 1c 24 mov %ebx,(%esp) 1dde: e8 e7 1a 00 00 call 38ca <close> 1de3: 58 pop %eax 1de4: 5a pop %edx 1de5: 6a 00 push $0x0 1de7: 68 52 45 00 00 push $0x4552 1dec: e8 f1 1a 00 00 call 38e2 <open> 1df1: 83 c4 10 add $0x10,%esp 1df4: 85 c0 test %eax,%eax 1df6: 89 c3 mov %eax,%ebx 1df8: 0f 88 de 03 00 00 js 21dc <subdir+0x4cc> 1dfe: 83 ec 04 sub $0x4,%esp 1e01: 68 00 20 00 00 push $0x2000 1e06: 68 20 86 00 00 push $0x8620 1e0b: 50 push %eax 1e0c: e8 a9 1a 00 00 call 38ba <read> 1e11: 83 c4 10 add $0x10,%esp 1e14: 83 f8 02 cmp $0x2,%eax 1e17: 0f 85 3a 03 00 00 jne 2157 <subdir+0x447> 1e1d: 80 3d 20 86 00 00 66 cmpb $0x66,0x8620 1e24: 0f 85 2d 03 00 00 jne 2157 <subdir+0x447> 1e2a: 83 ec 0c sub $0xc,%esp 1e2d: 53 push %ebx 1e2e: e8 97 1a 00 00 call 38ca <close> 1e33: 5b pop %ebx 1e34: 58 pop %eax 1e35: 68 92 45 00 00 push $0x4592 1e3a: 68 2e 45 00 00 push $0x452e 1e3f: e8 be 1a 00 00 call 3902 <link> 1e44: 83 c4 10 add $0x10,%esp 1e47: 85 c0 test %eax,%eax 1e49: 0f 85 c6 03 00 00 jne 2215 <subdir+0x505> 1e4f: 83 ec 0c sub $0xc,%esp 1e52: 68 2e 45 00 00 push $0x452e 1e57: e8 96 1a 00 00 call 38f2 <unlink> 1e5c: 83 c4 10 add $0x10,%esp 1e5f: 85 c0 test %eax,%eax 1e61: 0f 85 16 03 00 00 jne 217d <subdir+0x46d> 1e67: 83 ec 08 sub $0x8,%esp 1e6a: 6a 00 push $0x0 1e6c: 68 2e 45 00 00 push $0x452e 1e71: e8 6c 1a 00 00 call 38e2 <open> 1e76: 83 c4 10 add $0x10,%esp 1e79: 85 c0 test %eax,%eax 1e7b: 0f 89 2c 04 00 00 jns 22ad <subdir+0x59d> 1e81: 83 ec 0c sub $0xc,%esp 1e84: 68 f8 45 00 00 push $0x45f8 1e89: e8 84 1a 00 00 call 3912 <chdir> 1e8e: 83 c4 10 add $0x10,%esp 1e91: 85 c0 test %eax,%eax 1e93: 0f 85 01 04 00 00 jne 229a <subdir+0x58a> 1e99: 83 ec 0c sub $0xc,%esp 1e9c: 68 c6 45 00 00 push $0x45c6 1ea1: e8 6c 1a 00 00 call 3912 <chdir> 1ea6: 83 c4 10 add $0x10,%esp 1ea9: 85 c0 test %eax,%eax 1eab: 0f 85 b9 02 00 00 jne 216a <subdir+0x45a> 1eb1: 83 ec 0c sub $0xc,%esp 1eb4: 68 ec 45 00 00 push $0x45ec 1eb9: e8 54 1a 00 00 call 3912 <chdir> 1ebe: 83 c4 10 add $0x10,%esp 1ec1: 85 c0 test %eax,%eax 1ec3: 0f 85 a1 02 00 00 jne 216a <subdir+0x45a> 1ec9: 83 ec 0c sub $0xc,%esp 1ecc: 68 fb 45 00 00 push $0x45fb 1ed1: e8 3c 1a 00 00 call 3912 <chdir> 1ed6: 83 c4 10 add $0x10,%esp 1ed9: 85 c0 test %eax,%eax 1edb: 0f 85 21 03 00 00 jne 2202 <subdir+0x4f2> 1ee1: 83 ec 08 sub $0x8,%esp 1ee4: 6a 00 push $0x0 1ee6: 68 92 45 00 00 push $0x4592 1eeb: e8 f2 19 00 00 call 38e2 <open> 1ef0: 83 c4 10 add $0x10,%esp 1ef3: 85 c0 test %eax,%eax 1ef5: 89 c3 mov %eax,%ebx 1ef7: 0f 88 e0 04 00 00 js 23dd <subdir+0x6cd> 1efd: 83 ec 04 sub $0x4,%esp 1f00: 68 00 20 00 00 push $0x2000 1f05: 68 20 86 00 00 push $0x8620 1f0a: 50 push %eax 1f0b: e8 aa 19 00 00 call 38ba <read> 1f10: 83 c4 10 add $0x10,%esp 1f13: 83 f8 02 cmp $0x2,%eax 1f16: 0f 85 ae 04 00 00 jne 23ca <subdir+0x6ba> 1f1c: 83 ec 0c sub $0xc,%esp 1f1f: 53 push %ebx 1f20: e8 a5 19 00 00 call 38ca <close> 1f25: 59 pop %ecx 1f26: 5b pop %ebx 1f27: 6a 00 push $0x0 1f29: 68 2e 45 00 00 push $0x452e 1f2e: e8 af 19 00 00 call 38e2 <open> 1f33: 83 c4 10 add $0x10,%esp 1f36: 85 c0 test %eax,%eax 1f38: 0f 89 65 02 00 00 jns 21a3 <subdir+0x493> 1f3e: 83 ec 08 sub $0x8,%esp 1f41: 68 02 02 00 00 push $0x202 1f46: 68 46 46 00 00 push $0x4646 1f4b: e8 92 19 00 00 call 38e2 <open> 1f50: 83 c4 10 add $0x10,%esp 1f53: 85 c0 test %eax,%eax 1f55: 0f 89 35 02 00 00 jns 2190 <subdir+0x480> 1f5b: 83 ec 08 sub $0x8,%esp 1f5e: 68 02 02 00 00 push $0x202 1f63: 68 6b 46 00 00 push $0x466b 1f68: e8 75 19 00 00 call 38e2 <open> 1f6d: 83 c4 10 add $0x10,%esp 1f70: 85 c0 test %eax,%eax 1f72: 0f 89 0f 03 00 00 jns 2287 <subdir+0x577> 1f78: 83 ec 08 sub $0x8,%esp 1f7b: 68 00 02 00 00 push $0x200 1f80: 68 f8 45 00 00 push $0x45f8 1f85: e8 58 19 00 00 call 38e2 <open> 1f8a: 83 c4 10 add $0x10,%esp 1f8d: 85 c0 test %eax,%eax 1f8f: 0f 89 df 02 00 00 jns 2274 <subdir+0x564> 1f95: 83 ec 08 sub $0x8,%esp 1f98: 6a 02 push $0x2 1f9a: 68 f8 45 00 00 push $0x45f8 1f9f: e8 3e 19 00 00 call 38e2 <open> 1fa4: 83 c4 10 add $0x10,%esp 1fa7: 85 c0 test %eax,%eax 1fa9: 0f 89 b2 02 00 00 jns 2261 <subdir+0x551> 1faf: 83 ec 08 sub $0x8,%esp 1fb2: 6a 01 push $0x1 1fb4: 68 f8 45 00 00 push $0x45f8 1fb9: e8 24 19 00 00 call 38e2 <open> 1fbe: 83 c4 10 add $0x10,%esp 1fc1: 85 c0 test %eax,%eax 1fc3: 0f 89 85 02 00 00 jns 224e <subdir+0x53e> 1fc9: 83 ec 08 sub $0x8,%esp 1fcc: 68 da 46 00 00 push $0x46da 1fd1: 68 46 46 00 00 push $0x4646 1fd6: e8 27 19 00 00 call 3902 <link> 1fdb: 83 c4 10 add $0x10,%esp 1fde: 85 c0 test %eax,%eax 1fe0: 0f 84 55 02 00 00 je 223b <subdir+0x52b> 1fe6: 83 ec 08 sub $0x8,%esp 1fe9: 68 da 46 00 00 push $0x46da 1fee: 68 6b 46 00 00 push $0x466b 1ff3: e8 0a 19 00 00 call 3902 <link> 1ff8: 83 c4 10 add $0x10,%esp 1ffb: 85 c0 test %eax,%eax 1ffd: 0f 84 25 02 00 00 je 2228 <subdir+0x518> 2003: 83 ec 08 sub $0x8,%esp 2006: 68 92 45 00 00 push $0x4592 200b: 68 31 45 00 00 push $0x4531 2010: e8 ed 18 00 00 call 3902 <link> 2015: 83 c4 10 add $0x10,%esp 2018: 85 c0 test %eax,%eax 201a: 0f 84 a9 01 00 00 je 21c9 <subdir+0x4b9> 2020: 83 ec 0c sub $0xc,%esp 2023: 68 46 46 00 00 push $0x4646 2028: e8 dd 18 00 00 call 390a <mkdir> 202d: 83 c4 10 add $0x10,%esp 2030: 85 c0 test %eax,%eax 2032: 0f 84 7e 01 00 00 je 21b6 <subdir+0x4a6> 2038: 83 ec 0c sub $0xc,%esp 203b: 68 6b 46 00 00 push $0x466b 2040: e8 c5 18 00 00 call 390a <mkdir> 2045: 83 c4 10 add $0x10,%esp 2048: 85 c0 test %eax,%eax 204a: 0f 84 67 03 00 00 je 23b7 <subdir+0x6a7> 2050: 83 ec 0c sub $0xc,%esp 2053: 68 92 45 00 00 push $0x4592 2058: e8 ad 18 00 00 call 390a <mkdir> 205d: 83 c4 10 add $0x10,%esp 2060: 85 c0 test %eax,%eax 2062: 0f 84 3c 03 00 00 je 23a4 <subdir+0x694> 2068: 83 ec 0c sub $0xc,%esp 206b: 68 6b 46 00 00 push $0x466b 2070: e8 7d 18 00 00 call 38f2 <unlink> 2075: 83 c4 10 add $0x10,%esp 2078: 85 c0 test %eax,%eax 207a: 0f 84 11 03 00 00 je 2391 <subdir+0x681> 2080: 83 ec 0c sub $0xc,%esp 2083: 68 46 46 00 00 push $0x4646 2088: e8 65 18 00 00 call 38f2 <unlink> 208d: 83 c4 10 add $0x10,%esp 2090: 85 c0 test %eax,%eax 2092: 0f 84 e6 02 00 00 je 237e <subdir+0x66e> 2098: 83 ec 0c sub $0xc,%esp 209b: 68 31 45 00 00 push $0x4531 20a0: e8 6d 18 00 00 call 3912 <chdir> 20a5: 83 c4 10 add $0x10,%esp 20a8: 85 c0 test %eax,%eax 20aa: 0f 84 bb 02 00 00 je 236b <subdir+0x65b> 20b0: 83 ec 0c sub $0xc,%esp 20b3: 68 dd 46 00 00 push $0x46dd 20b8: e8 55 18 00 00 call 3912 <chdir> 20bd: 83 c4 10 add $0x10,%esp 20c0: 85 c0 test %eax,%eax 20c2: 0f 84 90 02 00 00 je 2358 <subdir+0x648> 20c8: 83 ec 0c sub $0xc,%esp 20cb: 68 92 45 00 00 push $0x4592 20d0: e8 1d 18 00 00 call 38f2 <unlink> 20d5: 83 c4 10 add $0x10,%esp 20d8: 85 c0 test %eax,%eax 20da: 0f 85 9d 00 00 00 jne 217d <subdir+0x46d> 20e0: 83 ec 0c sub $0xc,%esp 20e3: 68 31 45 00 00 push $0x4531 20e8: e8 05 18 00 00 call 38f2 <unlink> 20ed: 83 c4 10 add $0x10,%esp 20f0: 85 c0 test %eax,%eax 20f2: 0f 85 4d 02 00 00 jne 2345 <subdir+0x635> 20f8: 83 ec 0c sub $0xc,%esp 20fb: 68 f8 45 00 00 push $0x45f8 2100: e8 ed 17 00 00 call 38f2 <unlink> 2105: 83 c4 10 add $0x10,%esp 2108: 85 c0 test %eax,%eax 210a: 0f 84 22 02 00 00 je 2332 <subdir+0x622> 2110: 83 ec 0c sub $0xc,%esp 2113: 68 0d 45 00 00 push $0x450d 2118: e8 d5 17 00 00 call 38f2 <unlink> 211d: 83 c4 10 add $0x10,%esp 2120: 85 c0 test %eax,%eax 2122: 0f 88 f7 01 00 00 js 231f <subdir+0x60f> 2128: 83 ec 0c sub $0xc,%esp 212b: 68 f8 45 00 00 push $0x45f8 2130: e8 bd 17 00 00 call 38f2 <unlink> 2135: 83 c4 10 add $0x10,%esp 2138: 85 c0 test %eax,%eax 213a: 0f 88 cc 01 00 00 js 230c <subdir+0x5fc> 2140: 83 ec 08 sub $0x8,%esp 2143: 68 da 47 00 00 push $0x47da 2148: 6a 01 push $0x1 214a: e8 e1 18 00 00 call 3a30 <printf> 214f: 83 c4 10 add $0x10,%esp 2152: 8b 5d fc mov -0x4(%ebp),%ebx 2155: c9 leave 2156: c3 ret 2157: 50 push %eax 2158: 50 push %eax 2159: 68 77 45 00 00 push $0x4577 215e: 6a 01 push $0x1 2160: e8 cb 18 00 00 call 3a30 <printf> 2165: e8 38 17 00 00 call 38a2 <exit> 216a: 50 push %eax 216b: 50 push %eax 216c: 68 d2 45 00 00 push $0x45d2 2171: 6a 01 push $0x1 2173: e8 b8 18 00 00 call 3a30 <printf> 2178: e8 25 17 00 00 call 38a2 <exit> 217d: 52 push %edx 217e: 52 push %edx 217f: 68 9d 45 00 00 push $0x459d 2184: 6a 01 push $0x1 2186: e8 a5 18 00 00 call 3a30 <printf> 218b: e8 12 17 00 00 call 38a2 <exit> 2190: 50 push %eax 2191: 50 push %eax 2192: 68 4f 46 00 00 push $0x464f 2197: 6a 01 push $0x1 2199: e8 92 18 00 00 call 3a30 <printf> 219e: e8 ff 16 00 00 call 38a2 <exit> 21a3: 52 push %edx 21a4: 52 push %edx 21a5: 68 34 50 00 00 push $0x5034 21aa: 6a 01 push $0x1 21ac: e8 7f 18 00 00 call 3a30 <printf> 21b1: e8 ec 16 00 00 call 38a2 <exit> 21b6: 52 push %edx 21b7: 52 push %edx 21b8: 68 e3 46 00 00 push $0x46e3 21bd: 6a 01 push $0x1 21bf: e8 6c 18 00 00 call 3a30 <printf> 21c4: e8 d9 16 00 00 call 38a2 <exit> 21c9: 51 push %ecx 21ca: 51 push %ecx 21cb: 68 a4 50 00 00 push $0x50a4 21d0: 6a 01 push $0x1 21d2: e8 59 18 00 00 call 3a30 <printf> 21d7: e8 c6 16 00 00 call 38a2 <exit> 21dc: 50 push %eax 21dd: 50 push %eax 21de: 68 5e 45 00 00 push $0x455e 21e3: 6a 01 push $0x1 21e5: e8 46 18 00 00 call 3a30 <printf> 21ea: e8 b3 16 00 00 call 38a2 <exit> 21ef: 51 push %ecx 21f0: 51 push %ecx 21f1: 68 37 45 00 00 push $0x4537 21f6: 6a 01 push $0x1 21f8: e8 33 18 00 00 call 3a30 <printf> 21fd: e8 a0 16 00 00 call 38a2 <exit> 2202: 50 push %eax 2203: 50 push %eax 2204: 68 00 46 00 00 push $0x4600 2209: 6a 01 push $0x1 220b: e8 20 18 00 00 call 3a30 <printf> 2210: e8 8d 16 00 00 call 38a2 <exit> 2215: 51 push %ecx 2216: 51 push %ecx 2217: 68 ec 4f 00 00 push $0x4fec 221c: 6a 01 push $0x1 221e: e8 0d 18 00 00 call 3a30 <printf> 2223: e8 7a 16 00 00 call 38a2 <exit> 2228: 53 push %ebx 2229: 53 push %ebx 222a: 68 80 50 00 00 push $0x5080 222f: 6a 01 push $0x1 2231: e8 fa 17 00 00 call 3a30 <printf> 2236: e8 67 16 00 00 call 38a2 <exit> 223b: 50 push %eax 223c: 50 push %eax 223d: 68 5c 50 00 00 push $0x505c 2242: 6a 01 push $0x1 2244: e8 e7 17 00 00 call 3a30 <printf> 2249: e8 54 16 00 00 call 38a2 <exit> 224e: 50 push %eax 224f: 50 push %eax 2250: 68 bf 46 00 00 push $0x46bf 2255: 6a 01 push $0x1 2257: e8 d4 17 00 00 call 3a30 <printf> 225c: e8 41 16 00 00 call 38a2 <exit> 2261: 50 push %eax 2262: 50 push %eax 2263: 68 a6 46 00 00 push $0x46a6 2268: 6a 01 push $0x1 226a: e8 c1 17 00 00 call 3a30 <printf> 226f: e8 2e 16 00 00 call 38a2 <exit> 2274: 50 push %eax 2275: 50 push %eax 2276: 68 90 46 00 00 push $0x4690 227b: 6a 01 push $0x1 227d: e8 ae 17 00 00 call 3a30 <printf> 2282: e8 1b 16 00 00 call 38a2 <exit> 2287: 50 push %eax 2288: 50 push %eax 2289: 68 74 46 00 00 push $0x4674 228e: 6a 01 push $0x1 2290: e8 9b 17 00 00 call 3a30 <printf> 2295: e8 08 16 00 00 call 38a2 <exit> 229a: 50 push %eax 229b: 50 push %eax 229c: 68 b5 45 00 00 push $0x45b5 22a1: 6a 01 push $0x1 22a3: e8 88 17 00 00 call 3a30 <printf> 22a8: e8 f5 15 00 00 call 38a2 <exit> 22ad: 50 push %eax 22ae: 50 push %eax 22af: 68 10 50 00 00 push $0x5010 22b4: 6a 01 push $0x1 22b6: e8 75 17 00 00 call 3a30 <printf> 22bb: e8 e2 15 00 00 call 38a2 <exit> 22c0: 53 push %ebx 22c1: 53 push %ebx 22c2: 68 13 45 00 00 push $0x4513 22c7: 6a 01 push $0x1 22c9: e8 62 17 00 00 call 3a30 <printf> 22ce: e8 cf 15 00 00 call 38a2 <exit> 22d3: 50 push %eax 22d4: 50 push %eax 22d5: 68 c4 4f 00 00 push $0x4fc4 22da: 6a 01 push $0x1 22dc: e8 4f 17 00 00 call 3a30 <printf> 22e1: e8 bc 15 00 00 call 38a2 <exit> 22e6: 50 push %eax 22e7: 50 push %eax 22e8: 68 f7 44 00 00 push $0x44f7 22ed: 6a 01 push $0x1 22ef: e8 3c 17 00 00 call 3a30 <printf> 22f4: e8 a9 15 00 00 call 38a2 <exit> 22f9: 50 push %eax 22fa: 50 push %eax 22fb: 68 df 44 00 00 push $0x44df 2300: 6a 01 push $0x1 2302: e8 29 17 00 00 call 3a30 <printf> 2307: e8 96 15 00 00 call 38a2 <exit> 230c: 50 push %eax 230d: 50 push %eax 230e: 68 c8 47 00 00 push $0x47c8 2313: 6a 01 push $0x1 2315: e8 16 17 00 00 call 3a30 <printf> 231a: e8 83 15 00 00 call 38a2 <exit> 231f: 52 push %edx 2320: 52 push %edx 2321: 68 b3 47 00 00 push $0x47b3 2326: 6a 01 push $0x1 2328: e8 03 17 00 00 call 3a30 <printf> 232d: e8 70 15 00 00 call 38a2 <exit> 2332: 51 push %ecx 2333: 51 push %ecx 2334: 68 c8 50 00 00 push $0x50c8 2339: 6a 01 push $0x1 233b: e8 f0 16 00 00 call 3a30 <printf> 2340: e8 5d 15 00 00 call 38a2 <exit> 2345: 53 push %ebx 2346: 53 push %ebx 2347: 68 9e 47 00 00 push $0x479e 234c: 6a 01 push $0x1 234e: e8 dd 16 00 00 call 3a30 <printf> 2353: e8 4a 15 00 00 call 38a2 <exit> 2358: 50 push %eax 2359: 50 push %eax 235a: 68 86 47 00 00 push $0x4786 235f: 6a 01 push $0x1 2361: e8 ca 16 00 00 call 3a30 <printf> 2366: e8 37 15 00 00 call 38a2 <exit> 236b: 50 push %eax 236c: 50 push %eax 236d: 68 6e 47 00 00 push $0x476e 2372: 6a 01 push $0x1 2374: e8 b7 16 00 00 call 3a30 <printf> 2379: e8 24 15 00 00 call 38a2 <exit> 237e: 50 push %eax 237f: 50 push %eax 2380: 68 52 47 00 00 push $0x4752 2385: 6a 01 push $0x1 2387: e8 a4 16 00 00 call 3a30 <printf> 238c: e8 11 15 00 00 call 38a2 <exit> 2391: 50 push %eax 2392: 50 push %eax 2393: 68 36 47 00 00 push $0x4736 2398: 6a 01 push $0x1 239a: e8 91 16 00 00 call 3a30 <printf> 239f: e8 fe 14 00 00 call 38a2 <exit> 23a4: 50 push %eax 23a5: 50 push %eax 23a6: 68 19 47 00 00 push $0x4719 23ab: 6a 01 push $0x1 23ad: e8 7e 16 00 00 call 3a30 <printf> 23b2: e8 eb 14 00 00 call 38a2 <exit> 23b7: 50 push %eax 23b8: 50 push %eax 23b9: 68 fe 46 00 00 push $0x46fe 23be: 6a 01 push $0x1 23c0: e8 6b 16 00 00 call 3a30 <printf> 23c5: e8 d8 14 00 00 call 38a2 <exit> 23ca: 50 push %eax 23cb: 50 push %eax 23cc: 68 2b 46 00 00 push $0x462b 23d1: 6a 01 push $0x1 23d3: e8 58 16 00 00 call 3a30 <printf> 23d8: e8 c5 14 00 00 call 38a2 <exit> 23dd: 50 push %eax 23de: 50 push %eax 23df: 68 13 46 00 00 push $0x4613 23e4: 6a 01 push $0x1 23e6: e8 45 16 00 00 call 3a30 <printf> 23eb: e8 b2 14 00 00 call 38a2 <exit> 000023f0 <bigwrite>: 23f0: 55 push %ebp 23f1: 89 e5 mov %esp,%ebp 23f3: 56 push %esi 23f4: 53 push %ebx 23f5: bb f3 01 00 00 mov $0x1f3,%ebx 23fa: 83 ec 08 sub $0x8,%esp 23fd: 68 e5 47 00 00 push $0x47e5 2402: 6a 01 push $0x1 2404: e8 27 16 00 00 call 3a30 <printf> 2409: c7 04 24 f4 47 00 00 movl $0x47f4,(%esp) 2410: e8 dd 14 00 00 call 38f2 <unlink> 2415: 83 c4 10 add $0x10,%esp 2418: 90 nop 2419: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 2420: 83 ec 08 sub $0x8,%esp 2423: 68 02 02 00 00 push $0x202 2428: 68 f4 47 00 00 push $0x47f4 242d: e8 b0 14 00 00 call 38e2 <open> 2432: 83 c4 10 add $0x10,%esp 2435: 85 c0 test %eax,%eax 2437: 89 c6 mov %eax,%esi 2439: 78 7e js 24b9 <bigwrite+0xc9> 243b: 83 ec 04 sub $0x4,%esp 243e: 53 push %ebx 243f: 68 20 86 00 00 push $0x8620 2444: 50 push %eax 2445: e8 78 14 00 00 call 38c2 <write> 244a: 83 c4 10 add $0x10,%esp 244d: 39 d8 cmp %ebx,%eax 244f: 75 55 jne 24a6 <bigwrite+0xb6> 2451: 83 ec 04 sub $0x4,%esp 2454: 53 push %ebx 2455: 68 20 86 00 00 push $0x8620 245a: 56 push %esi 245b: e8 62 14 00 00 call 38c2 <write> 2460: 83 c4 10 add $0x10,%esp 2463: 39 d8 cmp %ebx,%eax 2465: 75 3f jne 24a6 <bigwrite+0xb6> 2467: 83 ec 0c sub $0xc,%esp 246a: 81 c3 d7 01 00 00 add $0x1d7,%ebx 2470: 56 push %esi 2471: e8 54 14 00 00 call 38ca <close> 2476: c7 04 24 f4 47 00 00 movl $0x47f4,(%esp) 247d: e8 70 14 00 00 call 38f2 <unlink> 2482: 83 c4 10 add $0x10,%esp 2485: 81 fb 07 18 00 00 cmp $0x1807,%ebx 248b: 75 93 jne 2420 <bigwrite+0x30> 248d: 83 ec 08 sub $0x8,%esp 2490: 68 27 48 00 00 push $0x4827 2495: 6a 01 push $0x1 2497: e8 94 15 00 00 call 3a30 <printf> 249c: 83 c4 10 add $0x10,%esp 249f: 8d 65 f8 lea -0x8(%ebp),%esp 24a2: 5b pop %ebx 24a3: 5e pop %esi 24a4: 5d pop %ebp 24a5: c3 ret 24a6: 50 push %eax 24a7: 53 push %ebx 24a8: 68 15 48 00 00 push $0x4815 24ad: 6a 01 push $0x1 24af: e8 7c 15 00 00 call 3a30 <printf> 24b4: e8 e9 13 00 00 call 38a2 <exit> 24b9: 83 ec 08 sub $0x8,%esp 24bc: 68 fd 47 00 00 push $0x47fd 24c1: 6a 01 push $0x1 24c3: e8 68 15 00 00 call 3a30 <printf> 24c8: e8 d5 13 00 00 call 38a2 <exit> 24cd: 8d 76 00 lea 0x0(%esi),%esi 000024d0 <bigfile>: 24d0: 55 push %ebp 24d1: 89 e5 mov %esp,%ebp 24d3: 57 push %edi 24d4: 56 push %esi 24d5: 53 push %ebx 24d6: 83 ec 14 sub $0x14,%esp 24d9: 68 34 48 00 00 push $0x4834 24de: 6a 01 push $0x1 24e0: e8 4b 15 00 00 call 3a30 <printf> 24e5: c7 04 24 50 48 00 00 movl $0x4850,(%esp) 24ec: e8 01 14 00 00 call 38f2 <unlink> 24f1: 58 pop %eax 24f2: 5a pop %edx 24f3: 68 02 02 00 00 push $0x202 24f8: 68 50 48 00 00 push $0x4850 24fd: e8 e0 13 00 00 call 38e2 <open> 2502: 83 c4 10 add $0x10,%esp 2505: 85 c0 test %eax,%eax 2507: 0f 88 5e 01 00 00 js 266b <bigfile+0x19b> 250d: 89 c6 mov %eax,%esi 250f: 31 db xor %ebx,%ebx 2511: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 2518: 83 ec 04 sub $0x4,%esp 251b: 68 58 02 00 00 push $0x258 2520: 53 push %ebx 2521: 68 20 86 00 00 push $0x8620 2526: e8 d5 11 00 00 call 3700 <memset> 252b: 83 c4 0c add $0xc,%esp 252e: 68 58 02 00 00 push $0x258 2533: 68 20 86 00 00 push $0x8620 2538: 56 push %esi 2539: e8 84 13 00 00 call 38c2 <write> 253e: 83 c4 10 add $0x10,%esp 2541: 3d 58 02 00 00 cmp $0x258,%eax 2546: 0f 85 f8 00 00 00 jne 2644 <bigfile+0x174> 254c: 83 c3 01 add $0x1,%ebx 254f: 83 fb 14 cmp $0x14,%ebx 2552: 75 c4 jne 2518 <bigfile+0x48> 2554: 83 ec 0c sub $0xc,%esp 2557: 56 push %esi 2558: e8 6d 13 00 00 call 38ca <close> 255d: 5e pop %esi 255e: 5f pop %edi 255f: 6a 00 push $0x0 2561: 68 50 48 00 00 push $0x4850 2566: e8 77 13 00 00 call 38e2 <open> 256b: 83 c4 10 add $0x10,%esp 256e: 85 c0 test %eax,%eax 2570: 89 c6 mov %eax,%esi 2572: 0f 88 e0 00 00 00 js 2658 <bigfile+0x188> 2578: 31 db xor %ebx,%ebx 257a: 31 ff xor %edi,%edi 257c: eb 30 jmp 25ae <bigfile+0xde> 257e: 66 90 xchg %ax,%ax 2580: 3d 2c 01 00 00 cmp $0x12c,%eax 2585: 0f 85 91 00 00 00 jne 261c <bigfile+0x14c> 258b: 0f be 05 20 86 00 00 movsbl 0x8620,%eax 2592: 89 fa mov %edi,%edx 2594: d1 fa sar %edx 2596: 39 d0 cmp %edx,%eax 2598: 75 6e jne 2608 <bigfile+0x138> 259a: 0f be 15 4b 87 00 00 movsbl 0x874b,%edx 25a1: 39 d0 cmp %edx,%eax 25a3: 75 63 jne 2608 <bigfile+0x138> 25a5: 81 c3 2c 01 00 00 add $0x12c,%ebx 25ab: 83 c7 01 add $0x1,%edi 25ae: 83 ec 04 sub $0x4,%esp 25b1: 68 2c 01 00 00 push $0x12c 25b6: 68 20 86 00 00 push $0x8620 25bb: 56 push %esi 25bc: e8 f9 12 00 00 call 38ba <read> 25c1: 83 c4 10 add $0x10,%esp 25c4: 85 c0 test %eax,%eax 25c6: 78 68 js 2630 <bigfile+0x160> 25c8: 75 b6 jne 2580 <bigfile+0xb0> 25ca: 83 ec 0c sub $0xc,%esp 25cd: 56 push %esi 25ce: e8 f7 12 00 00 call 38ca <close> 25d3: 83 c4 10 add $0x10,%esp 25d6: 81 fb e0 2e 00 00 cmp $0x2ee0,%ebx 25dc: 0f 85 9c 00 00 00 jne 267e <bigfile+0x1ae> 25e2: 83 ec 0c sub $0xc,%esp 25e5: 68 50 48 00 00 push $0x4850 25ea: e8 03 13 00 00 call 38f2 <unlink> 25ef: 58 pop %eax 25f0: 5a pop %edx 25f1: 68 df 48 00 00 push $0x48df 25f6: 6a 01 push $0x1 25f8: e8 33 14 00 00 call 3a30 <printf> 25fd: 83 c4 10 add $0x10,%esp 2600: 8d 65 f4 lea -0xc(%ebp),%esp 2603: 5b pop %ebx 2604: 5e pop %esi 2605: 5f pop %edi 2606: 5d pop %ebp 2607: c3 ret 2608: 83 ec 08 sub $0x8,%esp 260b: 68 ac 48 00 00 push $0x48ac 2610: 6a 01 push $0x1 2612: e8 19 14 00 00 call 3a30 <printf> 2617: e8 86 12 00 00 call 38a2 <exit> 261c: 83 ec 08 sub $0x8,%esp 261f: 68 98 48 00 00 push $0x4898 2624: 6a 01 push $0x1 2626: e8 05 14 00 00 call 3a30 <printf> 262b: e8 72 12 00 00 call 38a2 <exit> 2630: 83 ec 08 sub $0x8,%esp 2633: 68 83 48 00 00 push $0x4883 2638: 6a 01 push $0x1 263a: e8 f1 13 00 00 call 3a30 <printf> 263f: e8 5e 12 00 00 call 38a2 <exit> 2644: 83 ec 08 sub $0x8,%esp 2647: 68 58 48 00 00 push $0x4858 264c: 6a 01 push $0x1 264e: e8 dd 13 00 00 call 3a30 <printf> 2653: e8 4a 12 00 00 call 38a2 <exit> 2658: 53 push %ebx 2659: 53 push %ebx 265a: 68 6e 48 00 00 push $0x486e 265f: 6a 01 push $0x1 2661: e8 ca 13 00 00 call 3a30 <printf> 2666: e8 37 12 00 00 call 38a2 <exit> 266b: 50 push %eax 266c: 50 push %eax 266d: 68 42 48 00 00 push $0x4842 2672: 6a 01 push $0x1 2674: e8 b7 13 00 00 call 3a30 <printf> 2679: e8 24 12 00 00 call 38a2 <exit> 267e: 51 push %ecx 267f: 51 push %ecx 2680: 68 c5 48 00 00 push $0x48c5 2685: 6a 01 push $0x1 2687: e8 a4 13 00 00 call 3a30 <printf> 268c: e8 11 12 00 00 call 38a2 <exit> 2691: eb 0d jmp 26a0 <fourteen> 2693: 90 nop 2694: 90 nop 2695: 90 nop 2696: 90 nop 2697: 90 nop 2698: 90 nop 2699: 90 nop 269a: 90 nop 269b: 90 nop 269c: 90 nop 269d: 90 nop 269e: 90 nop 269f: 90 nop 000026a0 <fourteen>: 26a0: 55 push %ebp 26a1: 89 e5 mov %esp,%ebp 26a3: 83 ec 10 sub $0x10,%esp 26a6: 68 f0 48 00 00 push $0x48f0 26ab: 6a 01 push $0x1 26ad: e8 7e 13 00 00 call 3a30 <printf> 26b2: c7 04 24 2b 49 00 00 movl $0x492b,(%esp) 26b9: e8 4c 12 00 00 call 390a <mkdir> 26be: 83 c4 10 add $0x10,%esp 26c1: 85 c0 test %eax,%eax 26c3: 0f 85 97 00 00 00 jne 2760 <fourteen+0xc0> 26c9: 83 ec 0c sub $0xc,%esp 26cc: 68 e8 50 00 00 push $0x50e8 26d1: e8 34 12 00 00 call 390a <mkdir> 26d6: 83 c4 10 add $0x10,%esp 26d9: 85 c0 test %eax,%eax 26db: 0f 85 de 00 00 00 jne 27bf <fourteen+0x11f> 26e1: 83 ec 08 sub $0x8,%esp 26e4: 68 00 02 00 00 push $0x200 26e9: 68 38 51 00 00 push $0x5138 26ee: e8 ef 11 00 00 call 38e2 <open> 26f3: 83 c4 10 add $0x10,%esp 26f6: 85 c0 test %eax,%eax 26f8: 0f 88 ae 00 00 00 js 27ac <fourteen+0x10c> 26fe: 83 ec 0c sub $0xc,%esp 2701: 50 push %eax 2702: e8 c3 11 00 00 call 38ca <close> 2707: 58 pop %eax 2708: 5a pop %edx 2709: 6a 00 push $0x0 270b: 68 a8 51 00 00 push $0x51a8 2710: e8 cd 11 00 00 call 38e2 <open> 2715: 83 c4 10 add $0x10,%esp 2718: 85 c0 test %eax,%eax 271a: 78 7d js 2799 <fourteen+0xf9> 271c: 83 ec 0c sub $0xc,%esp 271f: 50 push %eax 2720: e8 a5 11 00 00 call 38ca <close> 2725: c7 04 24 1c 49 00 00 movl $0x491c,(%esp) 272c: e8 d9 11 00 00 call 390a <mkdir> 2731: 83 c4 10 add $0x10,%esp 2734: 85 c0 test %eax,%eax 2736: 74 4e je 2786 <fourteen+0xe6> 2738: 83 ec 0c sub $0xc,%esp 273b: 68 44 52 00 00 push $0x5244 2740: e8 c5 11 00 00 call 390a <mkdir> 2745: 83 c4 10 add $0x10,%esp 2748: 85 c0 test %eax,%eax 274a: 74 27 je 2773 <fourteen+0xd3> 274c: 83 ec 08 sub $0x8,%esp 274f: 68 3a 49 00 00 push $0x493a 2754: 6a 01 push $0x1 2756: e8 d5 12 00 00 call 3a30 <printf> 275b: 83 c4 10 add $0x10,%esp 275e: c9 leave 275f: c3 ret 2760: 50 push %eax 2761: 50 push %eax 2762: 68 ff 48 00 00 push $0x48ff 2767: 6a 01 push $0x1 2769: e8 c2 12 00 00 call 3a30 <printf> 276e: e8 2f 11 00 00 call 38a2 <exit> 2773: 50 push %eax 2774: 50 push %eax 2775: 68 64 52 00 00 push $0x5264 277a: 6a 01 push $0x1 277c: e8 af 12 00 00 call 3a30 <printf> 2781: e8 1c 11 00 00 call 38a2 <exit> 2786: 52 push %edx 2787: 52 push %edx 2788: 68 14 52 00 00 push $0x5214 278d: 6a 01 push $0x1 278f: e8 9c 12 00 00 call 3a30 <printf> 2794: e8 09 11 00 00 call 38a2 <exit> 2799: 51 push %ecx 279a: 51 push %ecx 279b: 68 d8 51 00 00 push $0x51d8 27a0: 6a 01 push $0x1 27a2: e8 89 12 00 00 call 3a30 <printf> 27a7: e8 f6 10 00 00 call 38a2 <exit> 27ac: 51 push %ecx 27ad: 51 push %ecx 27ae: 68 68 51 00 00 push $0x5168 27b3: 6a 01 push $0x1 27b5: e8 76 12 00 00 call 3a30 <printf> 27ba: e8 e3 10 00 00 call 38a2 <exit> 27bf: 50 push %eax 27c0: 50 push %eax 27c1: 68 08 51 00 00 push $0x5108 27c6: 6a 01 push $0x1 27c8: e8 63 12 00 00 call 3a30 <printf> 27cd: e8 d0 10 00 00 call 38a2 <exit> 27d2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 27d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000027e0 <rmdot>: 27e0: 55 push %ebp 27e1: 89 e5 mov %esp,%ebp 27e3: 83 ec 10 sub $0x10,%esp 27e6: 68 47 49 00 00 push $0x4947 27eb: 6a 01 push $0x1 27ed: e8 3e 12 00 00 call 3a30 <printf> 27f2: c7 04 24 53 49 00 00 movl $0x4953,(%esp) 27f9: e8 0c 11 00 00 call 390a <mkdir> 27fe: 83 c4 10 add $0x10,%esp 2801: 85 c0 test %eax,%eax 2803: 0f 85 b0 00 00 00 jne 28b9 <rmdot+0xd9> 2809: 83 ec 0c sub $0xc,%esp 280c: 68 53 49 00 00 push $0x4953 2811: e8 fc 10 00 00 call 3912 <chdir> 2816: 83 c4 10 add $0x10,%esp 2819: 85 c0 test %eax,%eax 281b: 0f 85 1d 01 00 00 jne 293e <rmdot+0x15e> 2821: 83 ec 0c sub $0xc,%esp 2824: 68 fe 45 00 00 push $0x45fe 2829: e8 c4 10 00 00 call 38f2 <unlink> 282e: 83 c4 10 add $0x10,%esp 2831: 85 c0 test %eax,%eax 2833: 0f 84 f2 00 00 00 je 292b <rmdot+0x14b> 2839: 83 ec 0c sub $0xc,%esp 283c: 68 fd 45 00 00 push $0x45fd 2841: e8 ac 10 00 00 call 38f2 <unlink> 2846: 83 c4 10 add $0x10,%esp 2849: 85 c0 test %eax,%eax 284b: 0f 84 c7 00 00 00 je 2918 <rmdot+0x138> 2851: 83 ec 0c sub $0xc,%esp 2854: 68 d1 3d 00 00 push $0x3dd1 2859: e8 b4 10 00 00 call 3912 <chdir> 285e: 83 c4 10 add $0x10,%esp 2861: 85 c0 test %eax,%eax 2863: 0f 85 9c 00 00 00 jne 2905 <rmdot+0x125> 2869: 83 ec 0c sub $0xc,%esp 286c: 68 9b 49 00 00 push $0x499b 2871: e8 7c 10 00 00 call 38f2 <unlink> 2876: 83 c4 10 add $0x10,%esp 2879: 85 c0 test %eax,%eax 287b: 74 75 je 28f2 <rmdot+0x112> 287d: 83 ec 0c sub $0xc,%esp 2880: 68 b9 49 00 00 push $0x49b9 2885: e8 68 10 00 00 call 38f2 <unlink> 288a: 83 c4 10 add $0x10,%esp 288d: 85 c0 test %eax,%eax 288f: 74 4e je 28df <rmdot+0xff> 2891: 83 ec 0c sub $0xc,%esp 2894: 68 53 49 00 00 push $0x4953 2899: e8 54 10 00 00 call 38f2 <unlink> 289e: 83 c4 10 add $0x10,%esp 28a1: 85 c0 test %eax,%eax 28a3: 75 27 jne 28cc <rmdot+0xec> 28a5: 83 ec 08 sub $0x8,%esp 28a8: 68 ee 49 00 00 push $0x49ee 28ad: 6a 01 push $0x1 28af: e8 7c 11 00 00 call 3a30 <printf> 28b4: 83 c4 10 add $0x10,%esp 28b7: c9 leave 28b8: c3 ret 28b9: 50 push %eax 28ba: 50 push %eax 28bb: 68 58 49 00 00 push $0x4958 28c0: 6a 01 push $0x1 28c2: e8 69 11 00 00 call 3a30 <printf> 28c7: e8 d6 0f 00 00 call 38a2 <exit> 28cc: 50 push %eax 28cd: 50 push %eax 28ce: 68 d9 49 00 00 push $0x49d9 28d3: 6a 01 push $0x1 28d5: e8 56 11 00 00 call 3a30 <printf> 28da: e8 c3 0f 00 00 call 38a2 <exit> 28df: 52 push %edx 28e0: 52 push %edx 28e1: 68 c1 49 00 00 push $0x49c1 28e6: 6a 01 push $0x1 28e8: e8 43 11 00 00 call 3a30 <printf> 28ed: e8 b0 0f 00 00 call 38a2 <exit> 28f2: 51 push %ecx 28f3: 51 push %ecx 28f4: 68 a2 49 00 00 push $0x49a2 28f9: 6a 01 push $0x1 28fb: e8 30 11 00 00 call 3a30 <printf> 2900: e8 9d 0f 00 00 call 38a2 <exit> 2905: 50 push %eax 2906: 50 push %eax 2907: 68 d3 3d 00 00 push $0x3dd3 290c: 6a 01 push $0x1 290e: e8 1d 11 00 00 call 3a30 <printf> 2913: e8 8a 0f 00 00 call 38a2 <exit> 2918: 50 push %eax 2919: 50 push %eax 291a: 68 8c 49 00 00 push $0x498c 291f: 6a 01 push $0x1 2921: e8 0a 11 00 00 call 3a30 <printf> 2926: e8 77 0f 00 00 call 38a2 <exit> 292b: 50 push %eax 292c: 50 push %eax 292d: 68 7e 49 00 00 push $0x497e 2932: 6a 01 push $0x1 2934: e8 f7 10 00 00 call 3a30 <printf> 2939: e8 64 0f 00 00 call 38a2 <exit> 293e: 50 push %eax 293f: 50 push %eax 2940: 68 6b 49 00 00 push $0x496b 2945: 6a 01 push $0x1 2947: e8 e4 10 00 00 call 3a30 <printf> 294c: e8 51 0f 00 00 call 38a2 <exit> 2951: eb 0d jmp 2960 <dirfile> 2953: 90 nop 2954: 90 nop 2955: 90 nop 2956: 90 nop 2957: 90 nop 2958: 90 nop 2959: 90 nop 295a: 90 nop 295b: 90 nop 295c: 90 nop 295d: 90 nop 295e: 90 nop 295f: 90 nop 00002960 <dirfile>: 2960: 55 push %ebp 2961: 89 e5 mov %esp,%ebp 2963: 53 push %ebx 2964: 83 ec 0c sub $0xc,%esp 2967: 68 f8 49 00 00 push $0x49f8 296c: 6a 01 push $0x1 296e: e8 bd 10 00 00 call 3a30 <printf> 2973: 59 pop %ecx 2974: 5b pop %ebx 2975: 68 00 02 00 00 push $0x200 297a: 68 05 4a 00 00 push $0x4a05 297f: e8 5e 0f 00 00 call 38e2 <open> 2984: 83 c4 10 add $0x10,%esp 2987: 85 c0 test %eax,%eax 2989: 0f 88 43 01 00 00 js 2ad2 <dirfile+0x172> 298f: 83 ec 0c sub $0xc,%esp 2992: 50 push %eax 2993: e8 32 0f 00 00 call 38ca <close> 2998: c7 04 24 05 4a 00 00 movl $0x4a05,(%esp) 299f: e8 6e 0f 00 00 call 3912 <chdir> 29a4: 83 c4 10 add $0x10,%esp 29a7: 85 c0 test %eax,%eax 29a9: 0f 84 10 01 00 00 je 2abf <dirfile+0x15f> 29af: 83 ec 08 sub $0x8,%esp 29b2: 6a 00 push $0x0 29b4: 68 3e 4a 00 00 push $0x4a3e 29b9: e8 24 0f 00 00 call 38e2 <open> 29be: 83 c4 10 add $0x10,%esp 29c1: 85 c0 test %eax,%eax 29c3: 0f 89 e3 00 00 00 jns 2aac <dirfile+0x14c> 29c9: 83 ec 08 sub $0x8,%esp 29cc: 68 00 02 00 00 push $0x200 29d1: 68 3e 4a 00 00 push $0x4a3e 29d6: e8 07 0f 00 00 call 38e2 <open> 29db: 83 c4 10 add $0x10,%esp 29de: 85 c0 test %eax,%eax 29e0: 0f 89 c6 00 00 00 jns 2aac <dirfile+0x14c> 29e6: 83 ec 0c sub $0xc,%esp 29e9: 68 3e 4a 00 00 push $0x4a3e 29ee: e8 17 0f 00 00 call 390a <mkdir> 29f3: 83 c4 10 add $0x10,%esp 29f6: 85 c0 test %eax,%eax 29f8: 0f 84 46 01 00 00 je 2b44 <dirfile+0x1e4> 29fe: 83 ec 0c sub $0xc,%esp 2a01: 68 3e 4a 00 00 push $0x4a3e 2a06: e8 e7 0e 00 00 call 38f2 <unlink> 2a0b: 83 c4 10 add $0x10,%esp 2a0e: 85 c0 test %eax,%eax 2a10: 0f 84 1b 01 00 00 je 2b31 <dirfile+0x1d1> 2a16: 83 ec 08 sub $0x8,%esp 2a19: 68 3e 4a 00 00 push $0x4a3e 2a1e: 68 a2 4a 00 00 push $0x4aa2 2a23: e8 da 0e 00 00 call 3902 <link> 2a28: 83 c4 10 add $0x10,%esp 2a2b: 85 c0 test %eax,%eax 2a2d: 0f 84 eb 00 00 00 je 2b1e <dirfile+0x1be> 2a33: 83 ec 0c sub $0xc,%esp 2a36: 68 05 4a 00 00 push $0x4a05 2a3b: e8 b2 0e 00 00 call 38f2 <unlink> 2a40: 83 c4 10 add $0x10,%esp 2a43: 85 c0 test %eax,%eax 2a45: 0f 85 c0 00 00 00 jne 2b0b <dirfile+0x1ab> 2a4b: 83 ec 08 sub $0x8,%esp 2a4e: 6a 02 push $0x2 2a50: 68 fe 45 00 00 push $0x45fe 2a55: e8 88 0e 00 00 call 38e2 <open> 2a5a: 83 c4 10 add $0x10,%esp 2a5d: 85 c0 test %eax,%eax 2a5f: 0f 89 93 00 00 00 jns 2af8 <dirfile+0x198> 2a65: 83 ec 08 sub $0x8,%esp 2a68: 6a 00 push $0x0 2a6a: 68 fe 45 00 00 push $0x45fe 2a6f: e8 6e 0e 00 00 call 38e2 <open> 2a74: 83 c4 0c add $0xc,%esp 2a77: 89 c3 mov %eax,%ebx 2a79: 6a 01 push $0x1 2a7b: 68 e1 46 00 00 push $0x46e1 2a80: 50 push %eax 2a81: e8 3c 0e 00 00 call 38c2 <write> 2a86: 83 c4 10 add $0x10,%esp 2a89: 85 c0 test %eax,%eax 2a8b: 7f 58 jg 2ae5 <dirfile+0x185> 2a8d: 83 ec 0c sub $0xc,%esp 2a90: 53 push %ebx 2a91: e8 34 0e 00 00 call 38ca <close> 2a96: 58 pop %eax 2a97: 5a pop %edx 2a98: 68 d5 4a 00 00 push $0x4ad5 2a9d: 6a 01 push $0x1 2a9f: e8 8c 0f 00 00 call 3a30 <printf> 2aa4: 83 c4 10 add $0x10,%esp 2aa7: 8b 5d fc mov -0x4(%ebp),%ebx 2aaa: c9 leave 2aab: c3 ret 2aac: 50 push %eax 2aad: 50 push %eax 2aae: 68 49 4a 00 00 push $0x4a49 2ab3: 6a 01 push $0x1 2ab5: e8 76 0f 00 00 call 3a30 <printf> 2aba: e8 e3 0d 00 00 call 38a2 <exit> 2abf: 50 push %eax 2ac0: 50 push %eax 2ac1: 68 24 4a 00 00 push $0x4a24 2ac6: 6a 01 push $0x1 2ac8: e8 63 0f 00 00 call 3a30 <printf> 2acd: e8 d0 0d 00 00 call 38a2 <exit> 2ad2: 52 push %edx 2ad3: 52 push %edx 2ad4: 68 0d 4a 00 00 push $0x4a0d 2ad9: 6a 01 push $0x1 2adb: e8 50 0f 00 00 call 3a30 <printf> 2ae0: e8 bd 0d 00 00 call 38a2 <exit> 2ae5: 51 push %ecx 2ae6: 51 push %ecx 2ae7: 68 c1 4a 00 00 push $0x4ac1 2aec: 6a 01 push $0x1 2aee: e8 3d 0f 00 00 call 3a30 <printf> 2af3: e8 aa 0d 00 00 call 38a2 <exit> 2af8: 53 push %ebx 2af9: 53 push %ebx 2afa: 68 b8 52 00 00 push $0x52b8 2aff: 6a 01 push $0x1 2b01: e8 2a 0f 00 00 call 3a30 <printf> 2b06: e8 97 0d 00 00 call 38a2 <exit> 2b0b: 50 push %eax 2b0c: 50 push %eax 2b0d: 68 a9 4a 00 00 push $0x4aa9 2b12: 6a 01 push $0x1 2b14: e8 17 0f 00 00 call 3a30 <printf> 2b19: e8 84 0d 00 00 call 38a2 <exit> 2b1e: 50 push %eax 2b1f: 50 push %eax 2b20: 68 98 52 00 00 push $0x5298 2b25: 6a 01 push $0x1 2b27: e8 04 0f 00 00 call 3a30 <printf> 2b2c: e8 71 0d 00 00 call 38a2 <exit> 2b31: 50 push %eax 2b32: 50 push %eax 2b33: 68 84 4a 00 00 push $0x4a84 2b38: 6a 01 push $0x1 2b3a: e8 f1 0e 00 00 call 3a30 <printf> 2b3f: e8 5e 0d 00 00 call 38a2 <exit> 2b44: 50 push %eax 2b45: 50 push %eax 2b46: 68 67 4a 00 00 push $0x4a67 2b4b: 6a 01 push $0x1 2b4d: e8 de 0e 00 00 call 3a30 <printf> 2b52: e8 4b 0d 00 00 call 38a2 <exit> 2b57: 89 f6 mov %esi,%esi 2b59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00002b60 <iref>: 2b60: 55 push %ebp 2b61: 89 e5 mov %esp,%ebp 2b63: 53 push %ebx 2b64: bb 33 00 00 00 mov $0x33,%ebx 2b69: 83 ec 0c sub $0xc,%esp 2b6c: 68 e5 4a 00 00 push $0x4ae5 2b71: 6a 01 push $0x1 2b73: e8 b8 0e 00 00 call 3a30 <printf> 2b78: 83 c4 10 add $0x10,%esp 2b7b: 90 nop 2b7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 2b80: 83 ec 0c sub $0xc,%esp 2b83: 68 f6 4a 00 00 push $0x4af6 2b88: e8 7d 0d 00 00 call 390a <mkdir> 2b8d: 83 c4 10 add $0x10,%esp 2b90: 85 c0 test %eax,%eax 2b92: 0f 85 bb 00 00 00 jne 2c53 <iref+0xf3> 2b98: 83 ec 0c sub $0xc,%esp 2b9b: 68 f6 4a 00 00 push $0x4af6 2ba0: e8 6d 0d 00 00 call 3912 <chdir> 2ba5: 83 c4 10 add $0x10,%esp 2ba8: 85 c0 test %eax,%eax 2baa: 0f 85 b7 00 00 00 jne 2c67 <iref+0x107> 2bb0: 83 ec 0c sub $0xc,%esp 2bb3: 68 ab 41 00 00 push $0x41ab 2bb8: e8 4d 0d 00 00 call 390a <mkdir> 2bbd: 59 pop %ecx 2bbe: 58 pop %eax 2bbf: 68 ab 41 00 00 push $0x41ab 2bc4: 68 a2 4a 00 00 push $0x4aa2 2bc9: e8 34 0d 00 00 call 3902 <link> 2bce: 58 pop %eax 2bcf: 5a pop %edx 2bd0: 68 00 02 00 00 push $0x200 2bd5: 68 ab 41 00 00 push $0x41ab 2bda: e8 03 0d 00 00 call 38e2 <open> 2bdf: 83 c4 10 add $0x10,%esp 2be2: 85 c0 test %eax,%eax 2be4: 78 0c js 2bf2 <iref+0x92> 2be6: 83 ec 0c sub $0xc,%esp 2be9: 50 push %eax 2bea: e8 db 0c 00 00 call 38ca <close> 2bef: 83 c4 10 add $0x10,%esp 2bf2: 83 ec 08 sub $0x8,%esp 2bf5: 68 00 02 00 00 push $0x200 2bfa: 68 e0 46 00 00 push $0x46e0 2bff: e8 de 0c 00 00 call 38e2 <open> 2c04: 83 c4 10 add $0x10,%esp 2c07: 85 c0 test %eax,%eax 2c09: 78 0c js 2c17 <iref+0xb7> 2c0b: 83 ec 0c sub $0xc,%esp 2c0e: 50 push %eax 2c0f: e8 b6 0c 00 00 call 38ca <close> 2c14: 83 c4 10 add $0x10,%esp 2c17: 83 ec 0c sub $0xc,%esp 2c1a: 68 e0 46 00 00 push $0x46e0 2c1f: e8 ce 0c 00 00 call 38f2 <unlink> 2c24: 83 c4 10 add $0x10,%esp 2c27: 83 eb 01 sub $0x1,%ebx 2c2a: 0f 85 50 ff ff ff jne 2b80 <iref+0x20> 2c30: 83 ec 0c sub $0xc,%esp 2c33: 68 d1 3d 00 00 push $0x3dd1 2c38: e8 d5 0c 00 00 call 3912 <chdir> 2c3d: 58 pop %eax 2c3e: 5a pop %edx 2c3f: 68 24 4b 00 00 push $0x4b24 2c44: 6a 01 push $0x1 2c46: e8 e5 0d 00 00 call 3a30 <printf> 2c4b: 83 c4 10 add $0x10,%esp 2c4e: 8b 5d fc mov -0x4(%ebp),%ebx 2c51: c9 leave 2c52: c3 ret 2c53: 83 ec 08 sub $0x8,%esp 2c56: 68 fc 4a 00 00 push $0x4afc 2c5b: 6a 01 push $0x1 2c5d: e8 ce 0d 00 00 call 3a30 <printf> 2c62: e8 3b 0c 00 00 call 38a2 <exit> 2c67: 83 ec 08 sub $0x8,%esp 2c6a: 68 10 4b 00 00 push $0x4b10 2c6f: 6a 01 push $0x1 2c71: e8 ba 0d 00 00 call 3a30 <printf> 2c76: e8 27 0c 00 00 call 38a2 <exit> 2c7b: 90 nop 2c7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00002c80 <forktest>: 2c80: 55 push %ebp 2c81: 89 e5 mov %esp,%ebp 2c83: 53 push %ebx 2c84: 31 db xor %ebx,%ebx 2c86: 83 ec 0c sub $0xc,%esp 2c89: 68 38 4b 00 00 push $0x4b38 2c8e: 6a 01 push $0x1 2c90: e8 9b 0d 00 00 call 3a30 <printf> 2c95: 83 c4 10 add $0x10,%esp 2c98: eb 13 jmp 2cad <forktest+0x2d> 2c9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 2ca0: 74 62 je 2d04 <forktest+0x84> 2ca2: 83 c3 01 add $0x1,%ebx 2ca5: 81 fb e8 03 00 00 cmp $0x3e8,%ebx 2cab: 74 43 je 2cf0 <forktest+0x70> 2cad: e8 e8 0b 00 00 call 389a <fork> 2cb2: 85 c0 test %eax,%eax 2cb4: 79 ea jns 2ca0 <forktest+0x20> 2cb6: 85 db test %ebx,%ebx 2cb8: 74 14 je 2cce <forktest+0x4e> 2cba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 2cc0: e8 e5 0b 00 00 call 38aa <wait> 2cc5: 85 c0 test %eax,%eax 2cc7: 78 40 js 2d09 <forktest+0x89> 2cc9: 83 eb 01 sub $0x1,%ebx 2ccc: 75 f2 jne 2cc0 <forktest+0x40> 2cce: e8 d7 0b 00 00 call 38aa <wait> 2cd3: 83 f8 ff cmp $0xffffffff,%eax 2cd6: 75 45 jne 2d1d <forktest+0x9d> 2cd8: 83 ec 08 sub $0x8,%esp 2cdb: 68 6a 4b 00 00 push $0x4b6a 2ce0: 6a 01 push $0x1 2ce2: e8 49 0d 00 00 call 3a30 <printf> 2ce7: 8b 5d fc mov -0x4(%ebp),%ebx 2cea: c9 leave 2ceb: c3 ret 2cec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 2cf0: 83 ec 08 sub $0x8,%esp 2cf3: 68 d8 52 00 00 push $0x52d8 2cf8: 6a 01 push $0x1 2cfa: e8 31 0d 00 00 call 3a30 <printf> 2cff: e8 9e 0b 00 00 call 38a2 <exit> 2d04: e8 99 0b 00 00 call 38a2 <exit> 2d09: 83 ec 08 sub $0x8,%esp 2d0c: 68 43 4b 00 00 push $0x4b43 2d11: 6a 01 push $0x1 2d13: e8 18 0d 00 00 call 3a30 <printf> 2d18: e8 85 0b 00 00 call 38a2 <exit> 2d1d: 50 push %eax 2d1e: 50 push %eax 2d1f: 68 57 4b 00 00 push $0x4b57 2d24: 6a 01 push $0x1 2d26: e8 05 0d 00 00 call 3a30 <printf> 2d2b: e8 72 0b 00 00 call 38a2 <exit> 00002d30 <sbrktest>: 2d30: 55 push %ebp 2d31: 89 e5 mov %esp,%ebp 2d33: 57 push %edi 2d34: 56 push %esi 2d35: 53 push %ebx 2d36: 31 ff xor %edi,%edi 2d38: 83 ec 64 sub $0x64,%esp 2d3b: 68 78 4b 00 00 push $0x4b78 2d40: ff 35 38 5e 00 00 pushl 0x5e38 2d46: e8 e5 0c 00 00 call 3a30 <printf> 2d4b: c7 04 24 00 00 00 00 movl $0x0,(%esp) 2d52: e8 d3 0b 00 00 call 392a <sbrk> 2d57: c7 04 24 00 00 00 00 movl $0x0,(%esp) 2d5e: 89 c3 mov %eax,%ebx 2d60: e8 c5 0b 00 00 call 392a <sbrk> 2d65: 83 c4 10 add $0x10,%esp 2d68: 89 c6 mov %eax,%esi 2d6a: eb 06 jmp 2d72 <sbrktest+0x42> 2d6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 2d70: 89 c6 mov %eax,%esi 2d72: 83 ec 0c sub $0xc,%esp 2d75: 6a 01 push $0x1 2d77: e8 ae 0b 00 00 call 392a <sbrk> 2d7c: 83 c4 10 add $0x10,%esp 2d7f: 39 f0 cmp %esi,%eax 2d81: 0f 85 62 02 00 00 jne 2fe9 <sbrktest+0x2b9> 2d87: 83 c7 01 add $0x1,%edi 2d8a: c6 06 01 movb $0x1,(%esi) 2d8d: 8d 46 01 lea 0x1(%esi),%eax 2d90: 81 ff 88 13 00 00 cmp $0x1388,%edi 2d96: 75 d8 jne 2d70 <sbrktest+0x40> 2d98: e8 fd 0a 00 00 call 389a <fork> 2d9d: 85 c0 test %eax,%eax 2d9f: 89 c7 mov %eax,%edi 2da1: 0f 88 82 03 00 00 js 3129 <sbrktest+0x3f9> 2da7: 83 ec 0c sub $0xc,%esp 2daa: 83 c6 02 add $0x2,%esi 2dad: 6a 01 push $0x1 2daf: e8 76 0b 00 00 call 392a <sbrk> 2db4: c7 04 24 01 00 00 00 movl $0x1,(%esp) 2dbb: e8 6a 0b 00 00 call 392a <sbrk> 2dc0: 83 c4 10 add $0x10,%esp 2dc3: 39 f0 cmp %esi,%eax 2dc5: 0f 85 47 03 00 00 jne 3112 <sbrktest+0x3e2> 2dcb: 85 ff test %edi,%edi 2dcd: 0f 84 3a 03 00 00 je 310d <sbrktest+0x3dd> 2dd3: e8 d2 0a 00 00 call 38aa <wait> 2dd8: 83 ec 0c sub $0xc,%esp 2ddb: 6a 00 push $0x0 2ddd: e8 48 0b 00 00 call 392a <sbrk> 2de2: 89 c6 mov %eax,%esi 2de4: b8 00 00 40 06 mov $0x6400000,%eax 2de9: 29 f0 sub %esi,%eax 2deb: 89 04 24 mov %eax,(%esp) 2dee: e8 37 0b 00 00 call 392a <sbrk> 2df3: 83 c4 10 add $0x10,%esp 2df6: 39 c6 cmp %eax,%esi 2df8: 0f 85 f8 02 00 00 jne 30f6 <sbrktest+0x3c6> 2dfe: 83 ec 0c sub $0xc,%esp 2e01: c6 05 ff ff 3f 06 63 movb $0x63,0x63fffff 2e08: 6a 00 push $0x0 2e0a: e8 1b 0b 00 00 call 392a <sbrk> 2e0f: c7 04 24 00 f0 ff ff movl $0xfffff000,(%esp) 2e16: 89 c6 mov %eax,%esi 2e18: e8 0d 0b 00 00 call 392a <sbrk> 2e1d: 83 c4 10 add $0x10,%esp 2e20: 83 f8 ff cmp $0xffffffff,%eax 2e23: 0f 84 b6 02 00 00 je 30df <sbrktest+0x3af> 2e29: 83 ec 0c sub $0xc,%esp 2e2c: 6a 00 push $0x0 2e2e: e8 f7 0a 00 00 call 392a <sbrk> 2e33: 8d 96 00 f0 ff ff lea -0x1000(%esi),%edx 2e39: 83 c4 10 add $0x10,%esp 2e3c: 39 d0 cmp %edx,%eax 2e3e: 0f 85 84 02 00 00 jne 30c8 <sbrktest+0x398> 2e44: 83 ec 0c sub $0xc,%esp 2e47: 6a 00 push $0x0 2e49: e8 dc 0a 00 00 call 392a <sbrk> 2e4e: 89 c6 mov %eax,%esi 2e50: c7 04 24 00 10 00 00 movl $0x1000,(%esp) 2e57: e8 ce 0a 00 00 call 392a <sbrk> 2e5c: 83 c4 10 add $0x10,%esp 2e5f: 39 c6 cmp %eax,%esi 2e61: 89 c7 mov %eax,%edi 2e63: 0f 85 48 02 00 00 jne 30b1 <sbrktest+0x381> 2e69: 83 ec 0c sub $0xc,%esp 2e6c: 6a 00 push $0x0 2e6e: e8 b7 0a 00 00 call 392a <sbrk> 2e73: 8d 96 00 10 00 00 lea 0x1000(%esi),%edx 2e79: 83 c4 10 add $0x10,%esp 2e7c: 39 d0 cmp %edx,%eax 2e7e: 0f 85 2d 02 00 00 jne 30b1 <sbrktest+0x381> 2e84: 80 3d ff ff 3f 06 63 cmpb $0x63,0x63fffff 2e8b: 0f 84 09 02 00 00 je 309a <sbrktest+0x36a> 2e91: 83 ec 0c sub $0xc,%esp 2e94: 6a 00 push $0x0 2e96: e8 8f 0a 00 00 call 392a <sbrk> 2e9b: c7 04 24 00 00 00 00 movl $0x0,(%esp) 2ea2: 89 c6 mov %eax,%esi 2ea4: e8 81 0a 00 00 call 392a <sbrk> 2ea9: 89 d9 mov %ebx,%ecx 2eab: 29 c1 sub %eax,%ecx 2ead: 89 0c 24 mov %ecx,(%esp) 2eb0: e8 75 0a 00 00 call 392a <sbrk> 2eb5: 83 c4 10 add $0x10,%esp 2eb8: 39 c6 cmp %eax,%esi 2eba: 0f 85 c3 01 00 00 jne 3083 <sbrktest+0x353> 2ec0: be 00 00 00 80 mov $0x80000000,%esi 2ec5: e8 58 0a 00 00 call 3922 <getpid> 2eca: 89 c7 mov %eax,%edi 2ecc: e8 c9 09 00 00 call 389a <fork> 2ed1: 85 c0 test %eax,%eax 2ed3: 0f 88 93 01 00 00 js 306c <sbrktest+0x33c> 2ed9: 0f 84 6b 01 00 00 je 304a <sbrktest+0x31a> 2edf: 81 c6 50 c3 00 00 add $0xc350,%esi 2ee5: e8 c0 09 00 00 call 38aa <wait> 2eea: 81 fe 80 84 1e 80 cmp $0x801e8480,%esi 2ef0: 75 d3 jne 2ec5 <sbrktest+0x195> 2ef2: 8d 45 b8 lea -0x48(%ebp),%eax 2ef5: 83 ec 0c sub $0xc,%esp 2ef8: 50 push %eax 2ef9: e8 b4 09 00 00 call 38b2 <pipe> 2efe: 83 c4 10 add $0x10,%esp 2f01: 85 c0 test %eax,%eax 2f03: 0f 85 2e 01 00 00 jne 3037 <sbrktest+0x307> 2f09: 8d 7d c0 lea -0x40(%ebp),%edi 2f0c: 89 fe mov %edi,%esi 2f0e: eb 23 jmp 2f33 <sbrktest+0x203> 2f10: 83 f8 ff cmp $0xffffffff,%eax 2f13: 74 14 je 2f29 <sbrktest+0x1f9> 2f15: 8d 45 b7 lea -0x49(%ebp),%eax 2f18: 83 ec 04 sub $0x4,%esp 2f1b: 6a 01 push $0x1 2f1d: 50 push %eax 2f1e: ff 75 b8 pushl -0x48(%ebp) 2f21: e8 94 09 00 00 call 38ba <read> 2f26: 83 c4 10 add $0x10,%esp 2f29: 8d 45 e8 lea -0x18(%ebp),%eax 2f2c: 83 c6 04 add $0x4,%esi 2f2f: 39 c6 cmp %eax,%esi 2f31: 74 4f je 2f82 <sbrktest+0x252> 2f33: e8 62 09 00 00 call 389a <fork> 2f38: 85 c0 test %eax,%eax 2f3a: 89 06 mov %eax,(%esi) 2f3c: 75 d2 jne 2f10 <sbrktest+0x1e0> 2f3e: 83 ec 0c sub $0xc,%esp 2f41: 6a 00 push $0x0 2f43: e8 e2 09 00 00 call 392a <sbrk> 2f48: ba 00 00 40 06 mov $0x6400000,%edx 2f4d: 29 c2 sub %eax,%edx 2f4f: 89 14 24 mov %edx,(%esp) 2f52: e8 d3 09 00 00 call 392a <sbrk> 2f57: 83 c4 0c add $0xc,%esp 2f5a: 6a 01 push $0x1 2f5c: 68 e1 46 00 00 push $0x46e1 2f61: ff 75 bc pushl -0x44(%ebp) 2f64: e8 59 09 00 00 call 38c2 <write> 2f69: 83 c4 10 add $0x10,%esp 2f6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 2f70: 83 ec 0c sub $0xc,%esp 2f73: 68 e8 03 00 00 push $0x3e8 2f78: e8 b5 09 00 00 call 3932 <sleep> 2f7d: 83 c4 10 add $0x10,%esp 2f80: eb ee jmp 2f70 <sbrktest+0x240> 2f82: 83 ec 0c sub $0xc,%esp 2f85: 68 00 10 00 00 push $0x1000 2f8a: e8 9b 09 00 00 call 392a <sbrk> 2f8f: 83 c4 10 add $0x10,%esp 2f92: 89 45 a4 mov %eax,-0x5c(%ebp) 2f95: 8b 07 mov (%edi),%eax 2f97: 83 f8 ff cmp $0xffffffff,%eax 2f9a: 74 11 je 2fad <sbrktest+0x27d> 2f9c: 83 ec 0c sub $0xc,%esp 2f9f: 50 push %eax 2fa0: e8 2d 09 00 00 call 38d2 <kill> 2fa5: e8 00 09 00 00 call 38aa <wait> 2faa: 83 c4 10 add $0x10,%esp 2fad: 83 c7 04 add $0x4,%edi 2fb0: 39 fe cmp %edi,%esi 2fb2: 75 e1 jne 2f95 <sbrktest+0x265> 2fb4: 83 7d a4 ff cmpl $0xffffffff,-0x5c(%ebp) 2fb8: 74 66 je 3020 <sbrktest+0x2f0> 2fba: 83 ec 0c sub $0xc,%esp 2fbd: 6a 00 push $0x0 2fbf: e8 66 09 00 00 call 392a <sbrk> 2fc4: 83 c4 10 add $0x10,%esp 2fc7: 39 d8 cmp %ebx,%eax 2fc9: 77 3c ja 3007 <sbrktest+0x2d7> 2fcb: 83 ec 08 sub $0x8,%esp 2fce: 68 20 4c 00 00 push $0x4c20 2fd3: ff 35 38 5e 00 00 pushl 0x5e38 2fd9: e8 52 0a 00 00 call 3a30 <printf> 2fde: 83 c4 10 add $0x10,%esp 2fe1: 8d 65 f4 lea -0xc(%ebp),%esp 2fe4: 5b pop %ebx 2fe5: 5e pop %esi 2fe6: 5f pop %edi 2fe7: 5d pop %ebp 2fe8: c3 ret 2fe9: 83 ec 0c sub $0xc,%esp 2fec: 50 push %eax 2fed: 56 push %esi 2fee: 57 push %edi 2fef: 68 83 4b 00 00 push $0x4b83 2ff4: ff 35 38 5e 00 00 pushl 0x5e38 2ffa: e8 31 0a 00 00 call 3a30 <printf> 2fff: 83 c4 20 add $0x20,%esp 3002: e8 9b 08 00 00 call 38a2 <exit> 3007: 83 ec 0c sub $0xc,%esp 300a: 6a 00 push $0x0 300c: e8 19 09 00 00 call 392a <sbrk> 3011: 29 c3 sub %eax,%ebx 3013: 89 1c 24 mov %ebx,(%esp) 3016: e8 0f 09 00 00 call 392a <sbrk> 301b: 83 c4 10 add $0x10,%esp 301e: eb ab jmp 2fcb <sbrktest+0x29b> 3020: 50 push %eax 3021: 50 push %eax 3022: 68 05 4c 00 00 push $0x4c05 3027: ff 35 38 5e 00 00 pushl 0x5e38 302d: e8 fe 09 00 00 call 3a30 <printf> 3032: e8 6b 08 00 00 call 38a2 <exit> 3037: 52 push %edx 3038: 52 push %edx 3039: 68 c1 40 00 00 push $0x40c1 303e: 6a 01 push $0x1 3040: e8 eb 09 00 00 call 3a30 <printf> 3045: e8 58 08 00 00 call 38a2 <exit> 304a: 0f be 06 movsbl (%esi),%eax 304d: 50 push %eax 304e: 56 push %esi 304f: 68 ec 4b 00 00 push $0x4bec 3054: ff 35 38 5e 00 00 pushl 0x5e38 305a: e8 d1 09 00 00 call 3a30 <printf> 305f: 89 3c 24 mov %edi,(%esp) 3062: e8 6b 08 00 00 call 38d2 <kill> 3067: e8 36 08 00 00 call 38a2 <exit> 306c: 51 push %ecx 306d: 51 push %ecx 306e: 68 c9 4c 00 00 push $0x4cc9 3073: ff 35 38 5e 00 00 pushl 0x5e38 3079: e8 b2 09 00 00 call 3a30 <printf> 307e: e8 1f 08 00 00 call 38a2 <exit> 3083: 50 push %eax 3084: 56 push %esi 3085: 68 cc 53 00 00 push $0x53cc 308a: ff 35 38 5e 00 00 pushl 0x5e38 3090: e8 9b 09 00 00 call 3a30 <printf> 3095: e8 08 08 00 00 call 38a2 <exit> 309a: 53 push %ebx 309b: 53 push %ebx 309c: 68 9c 53 00 00 push $0x539c 30a1: ff 35 38 5e 00 00 pushl 0x5e38 30a7: e8 84 09 00 00 call 3a30 <printf> 30ac: e8 f1 07 00 00 call 38a2 <exit> 30b1: 57 push %edi 30b2: 56 push %esi 30b3: 68 74 53 00 00 push $0x5374 30b8: ff 35 38 5e 00 00 pushl 0x5e38 30be: e8 6d 09 00 00 call 3a30 <printf> 30c3: e8 da 07 00 00 call 38a2 <exit> 30c8: 50 push %eax 30c9: 56 push %esi 30ca: 68 3c 53 00 00 push $0x533c 30cf: ff 35 38 5e 00 00 pushl 0x5e38 30d5: e8 56 09 00 00 call 3a30 <printf> 30da: e8 c3 07 00 00 call 38a2 <exit> 30df: 56 push %esi 30e0: 56 push %esi 30e1: 68 d1 4b 00 00 push $0x4bd1 30e6: ff 35 38 5e 00 00 pushl 0x5e38 30ec: e8 3f 09 00 00 call 3a30 <printf> 30f1: e8 ac 07 00 00 call 38a2 <exit> 30f6: 57 push %edi 30f7: 57 push %edi 30f8: 68 fc 52 00 00 push $0x52fc 30fd: ff 35 38 5e 00 00 pushl 0x5e38 3103: e8 28 09 00 00 call 3a30 <printf> 3108: e8 95 07 00 00 call 38a2 <exit> 310d: e8 90 07 00 00 call 38a2 <exit> 3112: 50 push %eax 3113: 50 push %eax 3114: 68 b5 4b 00 00 push $0x4bb5 3119: ff 35 38 5e 00 00 pushl 0x5e38 311f: e8 0c 09 00 00 call 3a30 <printf> 3124: e8 79 07 00 00 call 38a2 <exit> 3129: 50 push %eax 312a: 50 push %eax 312b: 68 9e 4b 00 00 push $0x4b9e 3130: ff 35 38 5e 00 00 pushl 0x5e38 3136: e8 f5 08 00 00 call 3a30 <printf> 313b: e8 62 07 00 00 call 38a2 <exit> 00003140 <validateint>: 3140: 55 push %ebp 3141: 89 e5 mov %esp,%ebp 3143: 5d pop %ebp 3144: c3 ret 3145: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 3149: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00003150 <validatetest>: 3150: 55 push %ebp 3151: 89 e5 mov %esp,%ebp 3153: 56 push %esi 3154: 53 push %ebx 3155: 31 db xor %ebx,%ebx 3157: 83 ec 08 sub $0x8,%esp 315a: 68 2e 4c 00 00 push $0x4c2e 315f: ff 35 38 5e 00 00 pushl 0x5e38 3165: e8 c6 08 00 00 call 3a30 <printf> 316a: 83 c4 10 add $0x10,%esp 316d: 8d 76 00 lea 0x0(%esi),%esi 3170: e8 25 07 00 00 call 389a <fork> 3175: 85 c0 test %eax,%eax 3177: 89 c6 mov %eax,%esi 3179: 74 63 je 31de <validatetest+0x8e> 317b: 83 ec 0c sub $0xc,%esp 317e: 6a 00 push $0x0 3180: e8 ad 07 00 00 call 3932 <sleep> 3185: c7 04 24 00 00 00 00 movl $0x0,(%esp) 318c: e8 a1 07 00 00 call 3932 <sleep> 3191: 89 34 24 mov %esi,(%esp) 3194: e8 39 07 00 00 call 38d2 <kill> 3199: e8 0c 07 00 00 call 38aa <wait> 319e: 58 pop %eax 319f: 5a pop %edx 31a0: 53 push %ebx 31a1: 68 3d 4c 00 00 push $0x4c3d 31a6: e8 57 07 00 00 call 3902 <link> 31ab: 83 c4 10 add $0x10,%esp 31ae: 83 f8 ff cmp $0xffffffff,%eax 31b1: 75 30 jne 31e3 <validatetest+0x93> 31b3: 81 c3 00 10 00 00 add $0x1000,%ebx 31b9: 81 fb 00 40 11 00 cmp $0x114000,%ebx 31bf: 75 af jne 3170 <validatetest+0x20> 31c1: 83 ec 08 sub $0x8,%esp 31c4: 68 61 4c 00 00 push $0x4c61 31c9: ff 35 38 5e 00 00 pushl 0x5e38 31cf: e8 5c 08 00 00 call 3a30 <printf> 31d4: 83 c4 10 add $0x10,%esp 31d7: 8d 65 f8 lea -0x8(%ebp),%esp 31da: 5b pop %ebx 31db: 5e pop %esi 31dc: 5d pop %ebp 31dd: c3 ret 31de: e8 bf 06 00 00 call 38a2 <exit> 31e3: 83 ec 08 sub $0x8,%esp 31e6: 68 48 4c 00 00 push $0x4c48 31eb: ff 35 38 5e 00 00 pushl 0x5e38 31f1: e8 3a 08 00 00 call 3a30 <printf> 31f6: e8 a7 06 00 00 call 38a2 <exit> 31fb: 90 nop 31fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00003200 <bsstest>: 3200: 55 push %ebp 3201: 89 e5 mov %esp,%ebp 3203: 83 ec 10 sub $0x10,%esp 3206: 68 6e 4c 00 00 push $0x4c6e 320b: ff 35 38 5e 00 00 pushl 0x5e38 3211: e8 1a 08 00 00 call 3a30 <printf> 3216: 83 c4 10 add $0x10,%esp 3219: 80 3d 00 5f 00 00 00 cmpb $0x0,0x5f00 3220: 75 39 jne 325b <bsstest+0x5b> 3222: b8 01 00 00 00 mov $0x1,%eax 3227: 89 f6 mov %esi,%esi 3229: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 3230: 80 b8 00 5f 00 00 00 cmpb $0x0,0x5f00(%eax) 3237: 75 22 jne 325b <bsstest+0x5b> 3239: 83 c0 01 add $0x1,%eax 323c: 3d 10 27 00 00 cmp $0x2710,%eax 3241: 75 ed jne 3230 <bsstest+0x30> 3243: 83 ec 08 sub $0x8,%esp 3246: 68 89 4c 00 00 push $0x4c89 324b: ff 35 38 5e 00 00 pushl 0x5e38 3251: e8 da 07 00 00 call 3a30 <printf> 3256: 83 c4 10 add $0x10,%esp 3259: c9 leave 325a: c3 ret 325b: 83 ec 08 sub $0x8,%esp 325e: 68 78 4c 00 00 push $0x4c78 3263: ff 35 38 5e 00 00 pushl 0x5e38 3269: e8 c2 07 00 00 call 3a30 <printf> 326e: e8 2f 06 00 00 call 38a2 <exit> 3273: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 3279: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00003280 <bigargtest>: 3280: 55 push %ebp 3281: 89 e5 mov %esp,%ebp 3283: 83 ec 14 sub $0x14,%esp 3286: 68 96 4c 00 00 push $0x4c96 328b: e8 62 06 00 00 call 38f2 <unlink> 3290: e8 05 06 00 00 call 389a <fork> 3295: 83 c4 10 add $0x10,%esp 3298: 85 c0 test %eax,%eax 329a: 74 3f je 32db <bigargtest+0x5b> 329c: 0f 88 c2 00 00 00 js 3364 <bigargtest+0xe4> 32a2: e8 03 06 00 00 call 38aa <wait> 32a7: 83 ec 08 sub $0x8,%esp 32aa: 6a 00 push $0x0 32ac: 68 96 4c 00 00 push $0x4c96 32b1: e8 2c 06 00 00 call 38e2 <open> 32b6: 83 c4 10 add $0x10,%esp 32b9: 85 c0 test %eax,%eax 32bb: 0f 88 8c 00 00 00 js 334d <bigargtest+0xcd> 32c1: 83 ec 0c sub $0xc,%esp 32c4: 50 push %eax 32c5: e8 00 06 00 00 call 38ca <close> 32ca: c7 04 24 96 4c 00 00 movl $0x4c96,(%esp) 32d1: e8 1c 06 00 00 call 38f2 <unlink> 32d6: 83 c4 10 add $0x10,%esp 32d9: c9 leave 32da: c3 ret 32db: b8 60 5e 00 00 mov $0x5e60,%eax 32e0: c7 00 f0 53 00 00 movl $0x53f0,(%eax) 32e6: 83 c0 04 add $0x4,%eax 32e9: 3d dc 5e 00 00 cmp $0x5edc,%eax 32ee: 75 f0 jne 32e0 <bigargtest+0x60> 32f0: 51 push %ecx 32f1: 51 push %ecx 32f2: 68 a0 4c 00 00 push $0x4ca0 32f7: ff 35 38 5e 00 00 pushl 0x5e38 32fd: c7 05 dc 5e 00 00 00 movl $0x0,0x5edc 3304: 00 00 00 3307: e8 24 07 00 00 call 3a30 <printf> 330c: 58 pop %eax 330d: 5a pop %edx 330e: 68 60 5e 00 00 push $0x5e60 3313: 68 6d 3e 00 00 push $0x3e6d 3318: e8 bd 05 00 00 call 38da <exec> 331d: 59 pop %ecx 331e: 58 pop %eax 331f: 68 ad 4c 00 00 push $0x4cad 3324: ff 35 38 5e 00 00 pushl 0x5e38 332a: e8 01 07 00 00 call 3a30 <printf> 332f: 58 pop %eax 3330: 5a pop %edx 3331: 68 00 02 00 00 push $0x200 3336: 68 96 4c 00 00 push $0x4c96 333b: e8 a2 05 00 00 call 38e2 <open> 3340: 89 04 24 mov %eax,(%esp) 3343: e8 82 05 00 00 call 38ca <close> 3348: e8 55 05 00 00 call 38a2 <exit> 334d: 50 push %eax 334e: 50 push %eax 334f: 68 d6 4c 00 00 push $0x4cd6 3354: ff 35 38 5e 00 00 pushl 0x5e38 335a: e8 d1 06 00 00 call 3a30 <printf> 335f: e8 3e 05 00 00 call 38a2 <exit> 3364: 52 push %edx 3365: 52 push %edx 3366: 68 bd 4c 00 00 push $0x4cbd 336b: ff 35 38 5e 00 00 pushl 0x5e38 3371: e8 ba 06 00 00 call 3a30 <printf> 3376: e8 27 05 00 00 call 38a2 <exit> 337b: 90 nop 337c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00003380 <fsfull>: 3380: 55 push %ebp 3381: 89 e5 mov %esp,%ebp 3383: 57 push %edi 3384: 56 push %esi 3385: 53 push %ebx 3386: 31 db xor %ebx,%ebx 3388: 83 ec 54 sub $0x54,%esp 338b: 68 eb 4c 00 00 push $0x4ceb 3390: 6a 01 push $0x1 3392: e8 99 06 00 00 call 3a30 <printf> 3397: 83 c4 10 add $0x10,%esp 339a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 33a0: b8 d3 4d 62 10 mov $0x10624dd3,%eax 33a5: b9 cd cc cc cc mov $0xcccccccd,%ecx 33aa: 83 ec 04 sub $0x4,%esp 33ad: f7 e3 mul %ebx 33af: c6 45 a8 66 movb $0x66,-0x58(%ebp) 33b3: c6 45 ad 00 movb $0x0,-0x53(%ebp) 33b7: c1 ea 06 shr $0x6,%edx 33ba: 8d 42 30 lea 0x30(%edx),%eax 33bd: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx 33c3: 88 45 a9 mov %al,-0x57(%ebp) 33c6: 89 d8 mov %ebx,%eax 33c8: 29 d0 sub %edx,%eax 33ca: 89 c2 mov %eax,%edx 33cc: b8 1f 85 eb 51 mov $0x51eb851f,%eax 33d1: f7 e2 mul %edx 33d3: b8 1f 85 eb 51 mov $0x51eb851f,%eax 33d8: c1 ea 05 shr $0x5,%edx 33db: 83 c2 30 add $0x30,%edx 33de: 88 55 aa mov %dl,-0x56(%ebp) 33e1: f7 e3 mul %ebx 33e3: 89 d8 mov %ebx,%eax 33e5: c1 ea 05 shr $0x5,%edx 33e8: 6b d2 64 imul $0x64,%edx,%edx 33eb: 29 d0 sub %edx,%eax 33ed: f7 e1 mul %ecx 33ef: 89 d8 mov %ebx,%eax 33f1: c1 ea 03 shr $0x3,%edx 33f4: 83 c2 30 add $0x30,%edx 33f7: 88 55 ab mov %dl,-0x55(%ebp) 33fa: f7 e1 mul %ecx 33fc: 89 d9 mov %ebx,%ecx 33fe: c1 ea 03 shr $0x3,%edx 3401: 8d 04 92 lea (%edx,%edx,4),%eax 3404: 01 c0 add %eax,%eax 3406: 29 c1 sub %eax,%ecx 3408: 89 c8 mov %ecx,%eax 340a: 83 c0 30 add $0x30,%eax 340d: 88 45 ac mov %al,-0x54(%ebp) 3410: 8d 45 a8 lea -0x58(%ebp),%eax 3413: 50 push %eax 3414: 68 f8 4c 00 00 push $0x4cf8 3419: 6a 01 push $0x1 341b: e8 10 06 00 00 call 3a30 <printf> 3420: 58 pop %eax 3421: 8d 45 a8 lea -0x58(%ebp),%eax 3424: 5a pop %edx 3425: 68 02 02 00 00 push $0x202 342a: 50 push %eax 342b: e8 b2 04 00 00 call 38e2 <open> 3430: 83 c4 10 add $0x10,%esp 3433: 85 c0 test %eax,%eax 3435: 89 c7 mov %eax,%edi 3437: 78 57 js 3490 <fsfull+0x110> 3439: 31 f6 xor %esi,%esi 343b: eb 05 jmp 3442 <fsfull+0xc2> 343d: 8d 76 00 lea 0x0(%esi),%esi 3440: 01 c6 add %eax,%esi 3442: 83 ec 04 sub $0x4,%esp 3445: 68 00 02 00 00 push $0x200 344a: 68 20 86 00 00 push $0x8620 344f: 57 push %edi 3450: e8 6d 04 00 00 call 38c2 <write> 3455: 83 c4 10 add $0x10,%esp 3458: 3d ff 01 00 00 cmp $0x1ff,%eax 345d: 7f e1 jg 3440 <fsfull+0xc0> 345f: 83 ec 04 sub $0x4,%esp 3462: 56 push %esi 3463: 68 14 4d 00 00 push $0x4d14 3468: 6a 01 push $0x1 346a: e8 c1 05 00 00 call 3a30 <printf> 346f: 89 3c 24 mov %edi,(%esp) 3472: e8 53 04 00 00 call 38ca <close> 3477: 83 c4 10 add $0x10,%esp 347a: 85 f6 test %esi,%esi 347c: 74 28 je 34a6 <fsfull+0x126> 347e: 83 c3 01 add $0x1,%ebx 3481: e9 1a ff ff ff jmp 33a0 <fsfull+0x20> 3486: 8d 76 00 lea 0x0(%esi),%esi 3489: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 3490: 8d 45 a8 lea -0x58(%ebp),%eax 3493: 83 ec 04 sub $0x4,%esp 3496: 50 push %eax 3497: 68 04 4d 00 00 push $0x4d04 349c: 6a 01 push $0x1 349e: e8 8d 05 00 00 call 3a30 <printf> 34a3: 83 c4 10 add $0x10,%esp 34a6: bf d3 4d 62 10 mov $0x10624dd3,%edi 34ab: be 1f 85 eb 51 mov $0x51eb851f,%esi 34b0: 89 d8 mov %ebx,%eax 34b2: b9 cd cc cc cc mov $0xcccccccd,%ecx 34b7: 83 ec 0c sub $0xc,%esp 34ba: f7 e7 mul %edi 34bc: c6 45 a8 66 movb $0x66,-0x58(%ebp) 34c0: c6 45 ad 00 movb $0x0,-0x53(%ebp) 34c4: c1 ea 06 shr $0x6,%edx 34c7: 8d 42 30 lea 0x30(%edx),%eax 34ca: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx 34d0: 88 45 a9 mov %al,-0x57(%ebp) 34d3: 89 d8 mov %ebx,%eax 34d5: 29 d0 sub %edx,%eax 34d7: f7 e6 mul %esi 34d9: 89 d8 mov %ebx,%eax 34db: c1 ea 05 shr $0x5,%edx 34de: 83 c2 30 add $0x30,%edx 34e1: 88 55 aa mov %dl,-0x56(%ebp) 34e4: f7 e6 mul %esi 34e6: 89 d8 mov %ebx,%eax 34e8: c1 ea 05 shr $0x5,%edx 34eb: 6b d2 64 imul $0x64,%edx,%edx 34ee: 29 d0 sub %edx,%eax 34f0: f7 e1 mul %ecx 34f2: 89 d8 mov %ebx,%eax 34f4: c1 ea 03 shr $0x3,%edx 34f7: 83 c2 30 add $0x30,%edx 34fa: 88 55 ab mov %dl,-0x55(%ebp) 34fd: f7 e1 mul %ecx 34ff: 89 d9 mov %ebx,%ecx 3501: 83 eb 01 sub $0x1,%ebx 3504: c1 ea 03 shr $0x3,%edx 3507: 8d 04 92 lea (%edx,%edx,4),%eax 350a: 01 c0 add %eax,%eax 350c: 29 c1 sub %eax,%ecx 350e: 89 c8 mov %ecx,%eax 3510: 83 c0 30 add $0x30,%eax 3513: 88 45 ac mov %al,-0x54(%ebp) 3516: 8d 45 a8 lea -0x58(%ebp),%eax 3519: 50 push %eax 351a: e8 d3 03 00 00 call 38f2 <unlink> 351f: 83 c4 10 add $0x10,%esp 3522: 83 fb ff cmp $0xffffffff,%ebx 3525: 75 89 jne 34b0 <fsfull+0x130> 3527: 83 ec 08 sub $0x8,%esp 352a: 68 24 4d 00 00 push $0x4d24 352f: 6a 01 push $0x1 3531: e8 fa 04 00 00 call 3a30 <printf> 3536: 83 c4 10 add $0x10,%esp 3539: 8d 65 f4 lea -0xc(%ebp),%esp 353c: 5b pop %ebx 353d: 5e pop %esi 353e: 5f pop %edi 353f: 5d pop %ebp 3540: c3 ret 3541: eb 0d jmp 3550 <uio> 3543: 90 nop 3544: 90 nop 3545: 90 nop 3546: 90 nop 3547: 90 nop 3548: 90 nop 3549: 90 nop 354a: 90 nop 354b: 90 nop 354c: 90 nop 354d: 90 nop 354e: 90 nop 354f: 90 nop 00003550 <uio>: 3550: 55 push %ebp 3551: 89 e5 mov %esp,%ebp 3553: 83 ec 10 sub $0x10,%esp 3556: 68 3a 4d 00 00 push $0x4d3a 355b: 6a 01 push $0x1 355d: e8 ce 04 00 00 call 3a30 <printf> 3562: e8 33 03 00 00 call 389a <fork> 3567: 83 c4 10 add $0x10,%esp 356a: 85 c0 test %eax,%eax 356c: 74 1b je 3589 <uio+0x39> 356e: 78 3d js 35ad <uio+0x5d> 3570: e8 35 03 00 00 call 38aa <wait> 3575: 83 ec 08 sub $0x8,%esp 3578: 68 44 4d 00 00 push $0x4d44 357d: 6a 01 push $0x1 357f: e8 ac 04 00 00 call 3a30 <printf> 3584: 83 c4 10 add $0x10,%esp 3587: c9 leave 3588: c3 ret 3589: b8 09 00 00 00 mov $0x9,%eax 358e: ba 70 00 00 00 mov $0x70,%edx 3593: ee out %al,(%dx) 3594: ba 71 00 00 00 mov $0x71,%edx 3599: ec in (%dx),%al 359a: 52 push %edx 359b: 52 push %edx 359c: 68 d0 54 00 00 push $0x54d0 35a1: 6a 01 push $0x1 35a3: e8 88 04 00 00 call 3a30 <printf> 35a8: e8 f5 02 00 00 call 38a2 <exit> 35ad: 50 push %eax 35ae: 50 push %eax 35af: 68 c9 4c 00 00 push $0x4cc9 35b4: 6a 01 push $0x1 35b6: e8 75 04 00 00 call 3a30 <printf> 35bb: e8 e2 02 00 00 call 38a2 <exit> 000035c0 <argptest>: 35c0: 55 push %ebp 35c1: 89 e5 mov %esp,%ebp 35c3: 53 push %ebx 35c4: 83 ec 0c sub $0xc,%esp 35c7: 6a 00 push $0x0 35c9: 68 53 4d 00 00 push $0x4d53 35ce: e8 0f 03 00 00 call 38e2 <open> 35d3: 83 c4 10 add $0x10,%esp 35d6: 85 c0 test %eax,%eax 35d8: 78 39 js 3613 <argptest+0x53> 35da: 83 ec 0c sub $0xc,%esp 35dd: 89 c3 mov %eax,%ebx 35df: 6a 00 push $0x0 35e1: e8 44 03 00 00 call 392a <sbrk> 35e6: 83 c4 0c add $0xc,%esp 35e9: 83 e8 01 sub $0x1,%eax 35ec: 6a ff push $0xffffffff 35ee: 50 push %eax 35ef: 53 push %ebx 35f0: e8 c5 02 00 00 call 38ba <read> 35f5: 89 1c 24 mov %ebx,(%esp) 35f8: e8 cd 02 00 00 call 38ca <close> 35fd: 58 pop %eax 35fe: 5a pop %edx 35ff: 68 65 4d 00 00 push $0x4d65 3604: 6a 01 push $0x1 3606: e8 25 04 00 00 call 3a30 <printf> 360b: 83 c4 10 add $0x10,%esp 360e: 8b 5d fc mov -0x4(%ebp),%ebx 3611: c9 leave 3612: c3 ret 3613: 51 push %ecx 3614: 51 push %ecx 3615: 68 58 4d 00 00 push $0x4d58 361a: 6a 02 push $0x2 361c: e8 0f 04 00 00 call 3a30 <printf> 3621: e8 7c 02 00 00 call 38a2 <exit> 3626: 8d 76 00 lea 0x0(%esi),%esi 3629: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00003630 <rand>: 3630: 69 05 34 5e 00 00 0d imul $0x19660d,0x5e34,%eax 3637: 66 19 00 363a: 55 push %ebp 363b: 89 e5 mov %esp,%ebp 363d: 5d pop %ebp 363e: 05 5f f3 6e 3c add $0x3c6ef35f,%eax 3643: a3 34 5e 00 00 mov %eax,0x5e34 3648: c3 ret 3649: 66 90 xchg %ax,%ax 364b: 66 90 xchg %ax,%ax 364d: 66 90 xchg %ax,%ax 364f: 90 nop 00003650 <strcpy>: 3650: 55 push %ebp 3651: 89 e5 mov %esp,%ebp 3653: 53 push %ebx 3654: 8b 45 08 mov 0x8(%ebp),%eax 3657: 8b 4d 0c mov 0xc(%ebp),%ecx 365a: 89 c2 mov %eax,%edx 365c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 3660: 83 c1 01 add $0x1,%ecx 3663: 0f b6 59 ff movzbl -0x1(%ecx),%ebx 3667: 83 c2 01 add $0x1,%edx 366a: 84 db test %bl,%bl 366c: 88 5a ff mov %bl,-0x1(%edx) 366f: 75 ef jne 3660 <strcpy+0x10> 3671: 5b pop %ebx 3672: 5d pop %ebp 3673: c3 ret 3674: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 367a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00003680 <strcmp>: 3680: 55 push %ebp 3681: 89 e5 mov %esp,%ebp 3683: 53 push %ebx 3684: 8b 55 08 mov 0x8(%ebp),%edx 3687: 8b 4d 0c mov 0xc(%ebp),%ecx 368a: 0f b6 02 movzbl (%edx),%eax 368d: 0f b6 19 movzbl (%ecx),%ebx 3690: 84 c0 test %al,%al 3692: 75 1c jne 36b0 <strcmp+0x30> 3694: eb 2a jmp 36c0 <strcmp+0x40> 3696: 8d 76 00 lea 0x0(%esi),%esi 3699: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 36a0: 83 c2 01 add $0x1,%edx 36a3: 0f b6 02 movzbl (%edx),%eax 36a6: 83 c1 01 add $0x1,%ecx 36a9: 0f b6 19 movzbl (%ecx),%ebx 36ac: 84 c0 test %al,%al 36ae: 74 10 je 36c0 <strcmp+0x40> 36b0: 38 d8 cmp %bl,%al 36b2: 74 ec je 36a0 <strcmp+0x20> 36b4: 29 d8 sub %ebx,%eax 36b6: 5b pop %ebx 36b7: 5d pop %ebp 36b8: c3 ret 36b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 36c0: 31 c0 xor %eax,%eax 36c2: 29 d8 sub %ebx,%eax 36c4: 5b pop %ebx 36c5: 5d pop %ebp 36c6: c3 ret 36c7: 89 f6 mov %esi,%esi 36c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000036d0 <strlen>: 36d0: 55 push %ebp 36d1: 89 e5 mov %esp,%ebp 36d3: 8b 4d 08 mov 0x8(%ebp),%ecx 36d6: 80 39 00 cmpb $0x0,(%ecx) 36d9: 74 15 je 36f0 <strlen+0x20> 36db: 31 d2 xor %edx,%edx 36dd: 8d 76 00 lea 0x0(%esi),%esi 36e0: 83 c2 01 add $0x1,%edx 36e3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) 36e7: 89 d0 mov %edx,%eax 36e9: 75 f5 jne 36e0 <strlen+0x10> 36eb: 5d pop %ebp 36ec: c3 ret 36ed: 8d 76 00 lea 0x0(%esi),%esi 36f0: 31 c0 xor %eax,%eax 36f2: 5d pop %ebp 36f3: c3 ret 36f4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 36fa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00003700 <memset>: 3700: 55 push %ebp 3701: 89 e5 mov %esp,%ebp 3703: 57 push %edi 3704: 8b 55 08 mov 0x8(%ebp),%edx 3707: 8b 4d 10 mov 0x10(%ebp),%ecx 370a: 8b 45 0c mov 0xc(%ebp),%eax 370d: 89 d7 mov %edx,%edi 370f: fc cld 3710: f3 aa rep stos %al,%es:(%edi) 3712: 89 d0 mov %edx,%eax 3714: 5f pop %edi 3715: 5d pop %ebp 3716: c3 ret 3717: 89 f6 mov %esi,%esi 3719: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00003720 <strchr>: 3720: 55 push %ebp 3721: 89 e5 mov %esp,%ebp 3723: 53 push %ebx 3724: 8b 45 08 mov 0x8(%ebp),%eax 3727: 8b 5d 0c mov 0xc(%ebp),%ebx 372a: 0f b6 10 movzbl (%eax),%edx 372d: 84 d2 test %dl,%dl 372f: 74 1d je 374e <strchr+0x2e> 3731: 38 d3 cmp %dl,%bl 3733: 89 d9 mov %ebx,%ecx 3735: 75 0d jne 3744 <strchr+0x24> 3737: eb 17 jmp 3750 <strchr+0x30> 3739: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 3740: 38 ca cmp %cl,%dl 3742: 74 0c je 3750 <strchr+0x30> 3744: 83 c0 01 add $0x1,%eax 3747: 0f b6 10 movzbl (%eax),%edx 374a: 84 d2 test %dl,%dl 374c: 75 f2 jne 3740 <strchr+0x20> 374e: 31 c0 xor %eax,%eax 3750: 5b pop %ebx 3751: 5d pop %ebp 3752: c3 ret 3753: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 3759: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00003760 <gets>: 3760: 55 push %ebp 3761: 89 e5 mov %esp,%ebp 3763: 57 push %edi 3764: 56 push %esi 3765: 53 push %ebx 3766: 31 f6 xor %esi,%esi 3768: 89 f3 mov %esi,%ebx 376a: 83 ec 1c sub $0x1c,%esp 376d: 8b 7d 08 mov 0x8(%ebp),%edi 3770: eb 2f jmp 37a1 <gets+0x41> 3772: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 3778: 8d 45 e7 lea -0x19(%ebp),%eax 377b: 83 ec 04 sub $0x4,%esp 377e: 6a 01 push $0x1 3780: 50 push %eax 3781: 6a 00 push $0x0 3783: e8 32 01 00 00 call 38ba <read> 3788: 83 c4 10 add $0x10,%esp 378b: 85 c0 test %eax,%eax 378d: 7e 1c jle 37ab <gets+0x4b> 378f: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 3793: 83 c7 01 add $0x1,%edi 3796: 88 47 ff mov %al,-0x1(%edi) 3799: 3c 0a cmp $0xa,%al 379b: 74 23 je 37c0 <gets+0x60> 379d: 3c 0d cmp $0xd,%al 379f: 74 1f je 37c0 <gets+0x60> 37a1: 83 c3 01 add $0x1,%ebx 37a4: 3b 5d 0c cmp 0xc(%ebp),%ebx 37a7: 89 fe mov %edi,%esi 37a9: 7c cd jl 3778 <gets+0x18> 37ab: 89 f3 mov %esi,%ebx 37ad: 8b 45 08 mov 0x8(%ebp),%eax 37b0: c6 03 00 movb $0x0,(%ebx) 37b3: 8d 65 f4 lea -0xc(%ebp),%esp 37b6: 5b pop %ebx 37b7: 5e pop %esi 37b8: 5f pop %edi 37b9: 5d pop %ebp 37ba: c3 ret 37bb: 90 nop 37bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 37c0: 8b 75 08 mov 0x8(%ebp),%esi 37c3: 8b 45 08 mov 0x8(%ebp),%eax 37c6: 01 de add %ebx,%esi 37c8: 89 f3 mov %esi,%ebx 37ca: c6 03 00 movb $0x0,(%ebx) 37cd: 8d 65 f4 lea -0xc(%ebp),%esp 37d0: 5b pop %ebx 37d1: 5e pop %esi 37d2: 5f pop %edi 37d3: 5d pop %ebp 37d4: c3 ret 37d5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 37d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000037e0 <stat>: 37e0: 55 push %ebp 37e1: 89 e5 mov %esp,%ebp 37e3: 56 push %esi 37e4: 53 push %ebx 37e5: 83 ec 08 sub $0x8,%esp 37e8: 6a 00 push $0x0 37ea: ff 75 08 pushl 0x8(%ebp) 37ed: e8 f0 00 00 00 call 38e2 <open> 37f2: 83 c4 10 add $0x10,%esp 37f5: 85 c0 test %eax,%eax 37f7: 78 27 js 3820 <stat+0x40> 37f9: 83 ec 08 sub $0x8,%esp 37fc: ff 75 0c pushl 0xc(%ebp) 37ff: 89 c3 mov %eax,%ebx 3801: 50 push %eax 3802: e8 f3 00 00 00 call 38fa <fstat> 3807: 89 1c 24 mov %ebx,(%esp) 380a: 89 c6 mov %eax,%esi 380c: e8 b9 00 00 00 call 38ca <close> 3811: 83 c4 10 add $0x10,%esp 3814: 8d 65 f8 lea -0x8(%ebp),%esp 3817: 89 f0 mov %esi,%eax 3819: 5b pop %ebx 381a: 5e pop %esi 381b: 5d pop %ebp 381c: c3 ret 381d: 8d 76 00 lea 0x0(%esi),%esi 3820: be ff ff ff ff mov $0xffffffff,%esi 3825: eb ed jmp 3814 <stat+0x34> 3827: 89 f6 mov %esi,%esi 3829: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00003830 <atoi>: 3830: 55 push %ebp 3831: 89 e5 mov %esp,%ebp 3833: 53 push %ebx 3834: 8b 4d 08 mov 0x8(%ebp),%ecx 3837: 0f be 11 movsbl (%ecx),%edx 383a: 8d 42 d0 lea -0x30(%edx),%eax 383d: 3c 09 cmp $0x9,%al 383f: b8 00 00 00 00 mov $0x0,%eax 3844: 77 1f ja 3865 <atoi+0x35> 3846: 8d 76 00 lea 0x0(%esi),%esi 3849: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 3850: 8d 04 80 lea (%eax,%eax,4),%eax 3853: 83 c1 01 add $0x1,%ecx 3856: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax 385a: 0f be 11 movsbl (%ecx),%edx 385d: 8d 5a d0 lea -0x30(%edx),%ebx 3860: 80 fb 09 cmp $0x9,%bl 3863: 76 eb jbe 3850 <atoi+0x20> 3865: 5b pop %ebx 3866: 5d pop %ebp 3867: c3 ret 3868: 90 nop 3869: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00003870 <memmove>: 3870: 55 push %ebp 3871: 89 e5 mov %esp,%ebp 3873: 56 push %esi 3874: 53 push %ebx 3875: 8b 5d 10 mov 0x10(%ebp),%ebx 3878: 8b 45 08 mov 0x8(%ebp),%eax 387b: 8b 75 0c mov 0xc(%ebp),%esi 387e: 85 db test %ebx,%ebx 3880: 7e 14 jle 3896 <memmove+0x26> 3882: 31 d2 xor %edx,%edx 3884: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 3888: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 388c: 88 0c 10 mov %cl,(%eax,%edx,1) 388f: 83 c2 01 add $0x1,%edx 3892: 39 d3 cmp %edx,%ebx 3894: 75 f2 jne 3888 <memmove+0x18> 3896: 5b pop %ebx 3897: 5e pop %esi 3898: 5d pop %ebp 3899: c3 ret 0000389a <fork>: 389a: b8 01 00 00 00 mov $0x1,%eax 389f: cd 40 int $0x40 38a1: c3 ret 000038a2 <exit>: 38a2: b8 02 00 00 00 mov $0x2,%eax 38a7: cd 40 int $0x40 38a9: c3 ret 000038aa <wait>: 38aa: b8 03 00 00 00 mov $0x3,%eax 38af: cd 40 int $0x40 38b1: c3 ret 000038b2 <pipe>: 38b2: b8 04 00 00 00 mov $0x4,%eax 38b7: cd 40 int $0x40 38b9: c3 ret 000038ba <read>: 38ba: b8 05 00 00 00 mov $0x5,%eax 38bf: cd 40 int $0x40 38c1: c3 ret 000038c2 <write>: 38c2: b8 10 00 00 00 mov $0x10,%eax 38c7: cd 40 int $0x40 38c9: c3 ret 000038ca <close>: 38ca: b8 15 00 00 00 mov $0x15,%eax 38cf: cd 40 int $0x40 38d1: c3 ret 000038d2 <kill>: 38d2: b8 06 00 00 00 mov $0x6,%eax 38d7: cd 40 int $0x40 38d9: c3 ret 000038da <exec>: 38da: b8 07 00 00 00 mov $0x7,%eax 38df: cd 40 int $0x40 38e1: c3 ret 000038e2 <open>: 38e2: b8 0f 00 00 00 mov $0xf,%eax 38e7: cd 40 int $0x40 38e9: c3 ret 000038ea <mknod>: 38ea: b8 11 00 00 00 mov $0x11,%eax 38ef: cd 40 int $0x40 38f1: c3 ret 000038f2 <unlink>: 38f2: b8 12 00 00 00 mov $0x12,%eax 38f7: cd 40 int $0x40 38f9: c3 ret 000038fa <fstat>: 38fa: b8 08 00 00 00 mov $0x8,%eax 38ff: cd 40 int $0x40 3901: c3 ret 00003902 <link>: 3902: b8 13 00 00 00 mov $0x13,%eax 3907: cd 40 int $0x40 3909: c3 ret 0000390a <mkdir>: 390a: b8 14 00 00 00 mov $0x14,%eax 390f: cd 40 int $0x40 3911: c3 ret 00003912 <chdir>: 3912: b8 09 00 00 00 mov $0x9,%eax 3917: cd 40 int $0x40 3919: c3 ret 0000391a <dup>: 391a: b8 0a 00 00 00 mov $0xa,%eax 391f: cd 40 int $0x40 3921: c3 ret 00003922 <getpid>: 3922: b8 0b 00 00 00 mov $0xb,%eax 3927: cd 40 int $0x40 3929: c3 ret 0000392a <sbrk>: 392a: b8 0c 00 00 00 mov $0xc,%eax 392f: cd 40 int $0x40 3931: c3 ret 00003932 <sleep>: 3932: b8 0d 00 00 00 mov $0xd,%eax 3937: cd 40 int $0x40 3939: c3 ret 0000393a <uptime>: 393a: b8 0e 00 00 00 mov $0xe,%eax 393f: cd 40 int $0x40 3941: c3 ret 00003942 <hello>: 3942: b8 16 00 00 00 mov $0x16,%eax 3947: cd 40 int $0x40 3949: c3 ret 0000394a <hello_name>: 394a: b8 17 00 00 00 mov $0x17,%eax 394f: cd 40 int $0x40 3951: c3 ret 00003952 <get_num_proc>: 3952: b8 18 00 00 00 mov $0x18,%eax 3957: cd 40 int $0x40 3959: c3 ret 0000395a <get_max_pid>: 395a: b8 19 00 00 00 mov $0x19,%eax 395f: cd 40 int $0x40 3961: c3 ret 00003962 <get_proc_info>: 3962: b8 1a 00 00 00 mov $0x1a,%eax 3967: cd 40 int $0x40 3969: c3 ret 0000396a <cps>: 396a: b8 1b 00 00 00 mov $0x1b,%eax 396f: cd 40 int $0x40 3971: c3 ret 00003972 <get_prio>: 3972: b8 1c 00 00 00 mov $0x1c,%eax 3977: cd 40 int $0x40 3979: c3 ret 0000397a <set_prio>: 397a: b8 1d 00 00 00 mov $0x1d,%eax 397f: cd 40 int $0x40 3981: c3 ret 3982: 66 90 xchg %ax,%ax 3984: 66 90 xchg %ax,%ax 3986: 66 90 xchg %ax,%ax 3988: 66 90 xchg %ax,%ax 398a: 66 90 xchg %ax,%ax 398c: 66 90 xchg %ax,%ax 398e: 66 90 xchg %ax,%ax 00003990 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 3990: 55 push %ebp 3991: 89 e5 mov %esp,%ebp 3993: 57 push %edi 3994: 56 push %esi 3995: 53 push %ebx 3996: 83 ec 3c sub $0x3c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 3999: 85 d2 test %edx,%edx { 399b: 89 45 c0 mov %eax,-0x40(%ebp) neg = 1; x = -xx; 399e: 89 d0 mov %edx,%eax if(sgn && xx < 0){ 39a0: 79 76 jns 3a18 <printint+0x88> 39a2: f6 45 08 01 testb $0x1,0x8(%ebp) 39a6: 74 70 je 3a18 <printint+0x88> x = -xx; 39a8: f7 d8 neg %eax neg = 1; 39aa: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) } else { x = xx; } i = 0; 39b1: 31 f6 xor %esi,%esi 39b3: 8d 5d d7 lea -0x29(%ebp),%ebx 39b6: eb 0a jmp 39c2 <printint+0x32> 39b8: 90 nop 39b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi do{ buf[i++] = digits[x % base]; 39c0: 89 fe mov %edi,%esi 39c2: 31 d2 xor %edx,%edx 39c4: 8d 7e 01 lea 0x1(%esi),%edi 39c7: f7 f1 div %ecx 39c9: 0f b6 92 28 55 00 00 movzbl 0x5528(%edx),%edx }while((x /= base) != 0); 39d0: 85 c0 test %eax,%eax buf[i++] = digits[x % base]; 39d2: 88 14 3b mov %dl,(%ebx,%edi,1) }while((x /= base) != 0); 39d5: 75 e9 jne 39c0 <printint+0x30> if(neg) 39d7: 8b 45 c4 mov -0x3c(%ebp),%eax 39da: 85 c0 test %eax,%eax 39dc: 74 08 je 39e6 <printint+0x56> buf[i++] = '-'; 39de: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1) 39e3: 8d 7e 02 lea 0x2(%esi),%edi 39e6: 8d 74 3d d7 lea -0x29(%ebp,%edi,1),%esi 39ea: 8b 7d c0 mov -0x40(%ebp),%edi 39ed: 8d 76 00 lea 0x0(%esi),%esi 39f0: 0f b6 06 movzbl (%esi),%eax write(fd, &c, 1); 39f3: 83 ec 04 sub $0x4,%esp 39f6: 83 ee 01 sub $0x1,%esi 39f9: 6a 01 push $0x1 39fb: 53 push %ebx 39fc: 57 push %edi 39fd: 88 45 d7 mov %al,-0x29(%ebp) 3a00: e8 bd fe ff ff call 38c2 <write> while(--i >= 0) 3a05: 83 c4 10 add $0x10,%esp 3a08: 39 de cmp %ebx,%esi 3a0a: 75 e4 jne 39f0 <printint+0x60> putc(fd, buf[i]); } 3a0c: 8d 65 f4 lea -0xc(%ebp),%esp 3a0f: 5b pop %ebx 3a10: 5e pop %esi 3a11: 5f pop %edi 3a12: 5d pop %ebp 3a13: c3 ret 3a14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi neg = 0; 3a18: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 3a1f: eb 90 jmp 39b1 <printint+0x21> 3a21: eb 0d jmp 3a30 <printf> 3a23: 90 nop 3a24: 90 nop 3a25: 90 nop 3a26: 90 nop 3a27: 90 nop 3a28: 90 nop 3a29: 90 nop 3a2a: 90 nop 3a2b: 90 nop 3a2c: 90 nop 3a2d: 90 nop 3a2e: 90 nop 3a2f: 90 nop 00003a30 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 3a30: 55 push %ebp 3a31: 89 e5 mov %esp,%ebp 3a33: 57 push %edi 3a34: 56 push %esi 3a35: 53 push %ebx 3a36: 83 ec 2c sub $0x2c,%esp int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 3a39: 8b 75 0c mov 0xc(%ebp),%esi 3a3c: 0f b6 1e movzbl (%esi),%ebx 3a3f: 84 db test %bl,%bl 3a41: 0f 84 b3 00 00 00 je 3afa <printf+0xca> ap = (uint*)(void*)&fmt + 1; 3a47: 8d 45 10 lea 0x10(%ebp),%eax 3a4a: 83 c6 01 add $0x1,%esi state = 0; 3a4d: 31 ff xor %edi,%edi ap = (uint*)(void*)&fmt + 1; 3a4f: 89 45 d4 mov %eax,-0x2c(%ebp) 3a52: eb 2f jmp 3a83 <printf+0x53> 3a54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 3a58: 83 f8 25 cmp $0x25,%eax 3a5b: 0f 84 a7 00 00 00 je 3b08 <printf+0xd8> write(fd, &c, 1); 3a61: 8d 45 e2 lea -0x1e(%ebp),%eax 3a64: 83 ec 04 sub $0x4,%esp 3a67: 88 5d e2 mov %bl,-0x1e(%ebp) 3a6a: 6a 01 push $0x1 3a6c: 50 push %eax 3a6d: ff 75 08 pushl 0x8(%ebp) 3a70: e8 4d fe ff ff call 38c2 <write> 3a75: 83 c4 10 add $0x10,%esp 3a78: 83 c6 01 add $0x1,%esi for(i = 0; fmt[i]; i++){ 3a7b: 0f b6 5e ff movzbl -0x1(%esi),%ebx 3a7f: 84 db test %bl,%bl 3a81: 74 77 je 3afa <printf+0xca> if(state == 0){ 3a83: 85 ff test %edi,%edi c = fmt[i] & 0xff; 3a85: 0f be cb movsbl %bl,%ecx 3a88: 0f b6 c3 movzbl %bl,%eax if(state == 0){ 3a8b: 74 cb je 3a58 <printf+0x28> state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 3a8d: 83 ff 25 cmp $0x25,%edi 3a90: 75 e6 jne 3a78 <printf+0x48> if(c == 'd'){ 3a92: 83 f8 64 cmp $0x64,%eax 3a95: 0f 84 05 01 00 00 je 3ba0 <printf+0x170> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 3a9b: 81 e1 f7 00 00 00 and $0xf7,%ecx 3aa1: 83 f9 70 cmp $0x70,%ecx 3aa4: 74 72 je 3b18 <printf+0xe8> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 3aa6: 83 f8 73 cmp $0x73,%eax 3aa9: 0f 84 99 00 00 00 je 3b48 <printf+0x118> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 3aaf: 83 f8 63 cmp $0x63,%eax 3ab2: 0f 84 08 01 00 00 je 3bc0 <printf+0x190> putc(fd, *ap); ap++; } else if(c == '%'){ 3ab8: 83 f8 25 cmp $0x25,%eax 3abb: 0f 84 ef 00 00 00 je 3bb0 <printf+0x180> write(fd, &c, 1); 3ac1: 8d 45 e7 lea -0x19(%ebp),%eax 3ac4: 83 ec 04 sub $0x4,%esp 3ac7: c6 45 e7 25 movb $0x25,-0x19(%ebp) 3acb: 6a 01 push $0x1 3acd: 50 push %eax 3ace: ff 75 08 pushl 0x8(%ebp) 3ad1: e8 ec fd ff ff call 38c2 <write> 3ad6: 83 c4 0c add $0xc,%esp 3ad9: 8d 45 e6 lea -0x1a(%ebp),%eax 3adc: 88 5d e6 mov %bl,-0x1a(%ebp) 3adf: 6a 01 push $0x1 3ae1: 50 push %eax 3ae2: ff 75 08 pushl 0x8(%ebp) 3ae5: 83 c6 01 add $0x1,%esi } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 3ae8: 31 ff xor %edi,%edi write(fd, &c, 1); 3aea: e8 d3 fd ff ff call 38c2 <write> for(i = 0; fmt[i]; i++){ 3aef: 0f b6 5e ff movzbl -0x1(%esi),%ebx write(fd, &c, 1); 3af3: 83 c4 10 add $0x10,%esp for(i = 0; fmt[i]; i++){ 3af6: 84 db test %bl,%bl 3af8: 75 89 jne 3a83 <printf+0x53> } } } 3afa: 8d 65 f4 lea -0xc(%ebp),%esp 3afd: 5b pop %ebx 3afe: 5e pop %esi 3aff: 5f pop %edi 3b00: 5d pop %ebp 3b01: c3 ret 3b02: 8d b6 00 00 00 00 lea 0x0(%esi),%esi state = '%'; 3b08: bf 25 00 00 00 mov $0x25,%edi 3b0d: e9 66 ff ff ff jmp 3a78 <printf+0x48> 3b12: 8d b6 00 00 00 00 lea 0x0(%esi),%esi printint(fd, *ap, 16, 0); 3b18: 83 ec 0c sub $0xc,%esp 3b1b: b9 10 00 00 00 mov $0x10,%ecx 3b20: 6a 00 push $0x0 3b22: 8b 7d d4 mov -0x2c(%ebp),%edi 3b25: 8b 45 08 mov 0x8(%ebp),%eax 3b28: 8b 17 mov (%edi),%edx 3b2a: e8 61 fe ff ff call 3990 <printint> ap++; 3b2f: 89 f8 mov %edi,%eax 3b31: 83 c4 10 add $0x10,%esp state = 0; 3b34: 31 ff xor %edi,%edi ap++; 3b36: 83 c0 04 add $0x4,%eax 3b39: 89 45 d4 mov %eax,-0x2c(%ebp) 3b3c: e9 37 ff ff ff jmp 3a78 <printf+0x48> 3b41: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi s = (char*)*ap; 3b48: 8b 45 d4 mov -0x2c(%ebp),%eax 3b4b: 8b 08 mov (%eax),%ecx ap++; 3b4d: 83 c0 04 add $0x4,%eax 3b50: 89 45 d4 mov %eax,-0x2c(%ebp) if(s == 0) 3b53: 85 c9 test %ecx,%ecx 3b55: 0f 84 8e 00 00 00 je 3be9 <printf+0x1b9> while(*s != 0){ 3b5b: 0f b6 01 movzbl (%ecx),%eax state = 0; 3b5e: 31 ff xor %edi,%edi s = (char*)*ap; 3b60: 89 cb mov %ecx,%ebx while(*s != 0){ 3b62: 84 c0 test %al,%al 3b64: 0f 84 0e ff ff ff je 3a78 <printf+0x48> 3b6a: 89 75 d0 mov %esi,-0x30(%ebp) 3b6d: 89 de mov %ebx,%esi 3b6f: 8b 5d 08 mov 0x8(%ebp),%ebx 3b72: 8d 7d e3 lea -0x1d(%ebp),%edi 3b75: 8d 76 00 lea 0x0(%esi),%esi write(fd, &c, 1); 3b78: 83 ec 04 sub $0x4,%esp s++; 3b7b: 83 c6 01 add $0x1,%esi 3b7e: 88 45 e3 mov %al,-0x1d(%ebp) write(fd, &c, 1); 3b81: 6a 01 push $0x1 3b83: 57 push %edi 3b84: 53 push %ebx 3b85: e8 38 fd ff ff call 38c2 <write> while(*s != 0){ 3b8a: 0f b6 06 movzbl (%esi),%eax 3b8d: 83 c4 10 add $0x10,%esp 3b90: 84 c0 test %al,%al 3b92: 75 e4 jne 3b78 <printf+0x148> 3b94: 8b 75 d0 mov -0x30(%ebp),%esi state = 0; 3b97: 31 ff xor %edi,%edi 3b99: e9 da fe ff ff jmp 3a78 <printf+0x48> 3b9e: 66 90 xchg %ax,%ax printint(fd, *ap, 10, 1); 3ba0: 83 ec 0c sub $0xc,%esp 3ba3: b9 0a 00 00 00 mov $0xa,%ecx 3ba8: 6a 01 push $0x1 3baa: e9 73 ff ff ff jmp 3b22 <printf+0xf2> 3baf: 90 nop write(fd, &c, 1); 3bb0: 83 ec 04 sub $0x4,%esp 3bb3: 88 5d e5 mov %bl,-0x1b(%ebp) 3bb6: 8d 45 e5 lea -0x1b(%ebp),%eax 3bb9: 6a 01 push $0x1 3bbb: e9 21 ff ff ff jmp 3ae1 <printf+0xb1> putc(fd, *ap); 3bc0: 8b 7d d4 mov -0x2c(%ebp),%edi write(fd, &c, 1); 3bc3: 83 ec 04 sub $0x4,%esp putc(fd, *ap); 3bc6: 8b 07 mov (%edi),%eax write(fd, &c, 1); 3bc8: 6a 01 push $0x1 ap++; 3bca: 83 c7 04 add $0x4,%edi putc(fd, *ap); 3bcd: 88 45 e4 mov %al,-0x1c(%ebp) write(fd, &c, 1); 3bd0: 8d 45 e4 lea -0x1c(%ebp),%eax 3bd3: 50 push %eax 3bd4: ff 75 08 pushl 0x8(%ebp) 3bd7: e8 e6 fc ff ff call 38c2 <write> ap++; 3bdc: 89 7d d4 mov %edi,-0x2c(%ebp) 3bdf: 83 c4 10 add $0x10,%esp state = 0; 3be2: 31 ff xor %edi,%edi 3be4: e9 8f fe ff ff jmp 3a78 <printf+0x48> s = "(null)"; 3be9: bb 20 55 00 00 mov $0x5520,%ebx while(*s != 0){ 3bee: b8 28 00 00 00 mov $0x28,%eax 3bf3: e9 72 ff ff ff jmp 3b6a <printf+0x13a> 3bf8: 66 90 xchg %ax,%ax 3bfa: 66 90 xchg %ax,%ax 3bfc: 66 90 xchg %ax,%ax 3bfe: 66 90 xchg %ax,%ax 00003c00 <free>: 3c00: 55 push %ebp 3c01: a1 e0 5e 00 00 mov 0x5ee0,%eax 3c06: 89 e5 mov %esp,%ebp 3c08: 57 push %edi 3c09: 56 push %esi 3c0a: 53 push %ebx 3c0b: 8b 5d 08 mov 0x8(%ebp),%ebx 3c0e: 8d 4b f8 lea -0x8(%ebx),%ecx 3c11: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 3c18: 39 c8 cmp %ecx,%eax 3c1a: 8b 10 mov (%eax),%edx 3c1c: 73 32 jae 3c50 <free+0x50> 3c1e: 39 d1 cmp %edx,%ecx 3c20: 72 04 jb 3c26 <free+0x26> 3c22: 39 d0 cmp %edx,%eax 3c24: 72 32 jb 3c58 <free+0x58> 3c26: 8b 73 fc mov -0x4(%ebx),%esi 3c29: 8d 3c f1 lea (%ecx,%esi,8),%edi 3c2c: 39 fa cmp %edi,%edx 3c2e: 74 30 je 3c60 <free+0x60> 3c30: 89 53 f8 mov %edx,-0x8(%ebx) 3c33: 8b 50 04 mov 0x4(%eax),%edx 3c36: 8d 34 d0 lea (%eax,%edx,8),%esi 3c39: 39 f1 cmp %esi,%ecx 3c3b: 74 3a je 3c77 <free+0x77> 3c3d: 89 08 mov %ecx,(%eax) 3c3f: a3 e0 5e 00 00 mov %eax,0x5ee0 3c44: 5b pop %ebx 3c45: 5e pop %esi 3c46: 5f pop %edi 3c47: 5d pop %ebp 3c48: c3 ret 3c49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 3c50: 39 d0 cmp %edx,%eax 3c52: 72 04 jb 3c58 <free+0x58> 3c54: 39 d1 cmp %edx,%ecx 3c56: 72 ce jb 3c26 <free+0x26> 3c58: 89 d0 mov %edx,%eax 3c5a: eb bc jmp 3c18 <free+0x18> 3c5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 3c60: 03 72 04 add 0x4(%edx),%esi 3c63: 89 73 fc mov %esi,-0x4(%ebx) 3c66: 8b 10 mov (%eax),%edx 3c68: 8b 12 mov (%edx),%edx 3c6a: 89 53 f8 mov %edx,-0x8(%ebx) 3c6d: 8b 50 04 mov 0x4(%eax),%edx 3c70: 8d 34 d0 lea (%eax,%edx,8),%esi 3c73: 39 f1 cmp %esi,%ecx 3c75: 75 c6 jne 3c3d <free+0x3d> 3c77: 03 53 fc add -0x4(%ebx),%edx 3c7a: a3 e0 5e 00 00 mov %eax,0x5ee0 3c7f: 89 50 04 mov %edx,0x4(%eax) 3c82: 8b 53 f8 mov -0x8(%ebx),%edx 3c85: 89 10 mov %edx,(%eax) 3c87: 5b pop %ebx 3c88: 5e pop %esi 3c89: 5f pop %edi 3c8a: 5d pop %ebp 3c8b: c3 ret 3c8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00003c90 <malloc>: 3c90: 55 push %ebp 3c91: 89 e5 mov %esp,%ebp 3c93: 57 push %edi 3c94: 56 push %esi 3c95: 53 push %ebx 3c96: 83 ec 0c sub $0xc,%esp 3c99: 8b 45 08 mov 0x8(%ebp),%eax 3c9c: 8b 15 e0 5e 00 00 mov 0x5ee0,%edx 3ca2: 8d 78 07 lea 0x7(%eax),%edi 3ca5: c1 ef 03 shr $0x3,%edi 3ca8: 83 c7 01 add $0x1,%edi 3cab: 85 d2 test %edx,%edx 3cad: 0f 84 9d 00 00 00 je 3d50 <malloc+0xc0> 3cb3: 8b 02 mov (%edx),%eax 3cb5: 8b 48 04 mov 0x4(%eax),%ecx 3cb8: 39 cf cmp %ecx,%edi 3cba: 76 6c jbe 3d28 <malloc+0x98> 3cbc: 81 ff 00 10 00 00 cmp $0x1000,%edi 3cc2: bb 00 10 00 00 mov $0x1000,%ebx 3cc7: 0f 43 df cmovae %edi,%ebx 3cca: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 3cd1: eb 0e jmp 3ce1 <malloc+0x51> 3cd3: 90 nop 3cd4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 3cd8: 8b 02 mov (%edx),%eax 3cda: 8b 48 04 mov 0x4(%eax),%ecx 3cdd: 39 f9 cmp %edi,%ecx 3cdf: 73 47 jae 3d28 <malloc+0x98> 3ce1: 39 05 e0 5e 00 00 cmp %eax,0x5ee0 3ce7: 89 c2 mov %eax,%edx 3ce9: 75 ed jne 3cd8 <malloc+0x48> 3ceb: 83 ec 0c sub $0xc,%esp 3cee: 56 push %esi 3cef: e8 36 fc ff ff call 392a <sbrk> 3cf4: 83 c4 10 add $0x10,%esp 3cf7: 83 f8 ff cmp $0xffffffff,%eax 3cfa: 74 1c je 3d18 <malloc+0x88> 3cfc: 89 58 04 mov %ebx,0x4(%eax) 3cff: 83 ec 0c sub $0xc,%esp 3d02: 83 c0 08 add $0x8,%eax 3d05: 50 push %eax 3d06: e8 f5 fe ff ff call 3c00 <free> 3d0b: 8b 15 e0 5e 00 00 mov 0x5ee0,%edx 3d11: 83 c4 10 add $0x10,%esp 3d14: 85 d2 test %edx,%edx 3d16: 75 c0 jne 3cd8 <malloc+0x48> 3d18: 8d 65 f4 lea -0xc(%ebp),%esp 3d1b: 31 c0 xor %eax,%eax 3d1d: 5b pop %ebx 3d1e: 5e pop %esi 3d1f: 5f pop %edi 3d20: 5d pop %ebp 3d21: c3 ret 3d22: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 3d28: 39 cf cmp %ecx,%edi 3d2a: 74 54 je 3d80 <malloc+0xf0> 3d2c: 29 f9 sub %edi,%ecx 3d2e: 89 48 04 mov %ecx,0x4(%eax) 3d31: 8d 04 c8 lea (%eax,%ecx,8),%eax 3d34: 89 78 04 mov %edi,0x4(%eax) 3d37: 89 15 e0 5e 00 00 mov %edx,0x5ee0 3d3d: 8d 65 f4 lea -0xc(%ebp),%esp 3d40: 83 c0 08 add $0x8,%eax 3d43: 5b pop %ebx 3d44: 5e pop %esi 3d45: 5f pop %edi 3d46: 5d pop %ebp 3d47: c3 ret 3d48: 90 nop 3d49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 3d50: c7 05 e0 5e 00 00 e4 movl $0x5ee4,0x5ee0 3d57: 5e 00 00 3d5a: c7 05 e4 5e 00 00 e4 movl $0x5ee4,0x5ee4 3d61: 5e 00 00 3d64: b8 e4 5e 00 00 mov $0x5ee4,%eax 3d69: c7 05 e8 5e 00 00 00 movl $0x0,0x5ee8 3d70: 00 00 00 3d73: e9 44 ff ff ff jmp 3cbc <malloc+0x2c> 3d78: 90 nop 3d79: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 3d80: 8b 08 mov (%eax),%ecx 3d82: 89 0a mov %ecx,(%edx) 3d84: eb b1 jmp 3d37 <malloc+0xa7>
; A022823: a(n) = [ (2n+1)/(n-1) ] + [ (2n+2)/(n-2) ] + ... + [ (3n-1)/1 ]. ; 5,11,19,26,35,44,54,62,74,83,96,103,117,128,140,150,162,175,189,198,213,222,240,249,263,277,291,300,318,329,345,356,371,386,400,411,427,440,460,468,486,497,515,528,542,557,576,587,603,616,636 mov $4,2 mov $6,$0 lpb $4 add $0,1 sub $4,1 add $0,$4 sub $0,1 add $8,$6 add $1,$8 lpb $0 mov $7,$0 sub $0,1 add $3,1 mul $7,3 div $7,$3 add $5,$7 lpe mov $2,$4 lpb $2 mov $2,0 mov $8,$5 lpe lpe add $1,2 mov $0,$1
; ;================================================================================================== ; SIMH RTC DRIVER ;================================================================================================== ; SIMRTC_IO .EQU $FE ; SIMH IO PORT SIMRTC_CLKREAD .EQU 7 ; READ CLOCK COMMAND SIMRTC_CLKWRITE .EQU 8 ; WRITE CLOCK COMMAND SIMRTC_BUFSIZ .EQU 6 ; SIX BYTE BUFFER (YYMMDDHHMMSS) ; ; RTC DEVICE INITIALIZATION ENTRY ; SIMRTC_INIT: CALL NEWLINE ; FORMATTING PRTS("SIMRTC: $") ; ; DISPLAY CURRENT TIME LD HL,SIMRTC_BUF PUSH HL CALL SIMRTC_GETTIM0 POP HL CALL PRTDT ; XOR A ; SIGNAL SUCCESS RET ; ; RTC DEVICE FUNCTION DISPATCH ENTRY ; A: RESULT (OUT), 0=OK, Z=OK, NZ=ERR ; B: FUNCTION (IN) ; SIMRTC_DISPATCH: LD A,B ; GET REQUESTED FUNCTION AND $0F ; ISOLATE SUB-FUNCTION JP Z,SIMRTC_GETTIM ; GET TIME DEC A JP Z,SIMRTC_SETTIM ; SET TIME DEC A JP Z,SIMRTC_GETBYT ; GET NVRAM BYTE VALUE DEC A JP Z,SIMRTC_SETBYT ; SET NVRAM BYTE VALUE DEC A JP Z,SIMRTC_GETBLK ; GET NVRAM DATA BLOCK VALUES DEC A JP Z,SIMRTC_SETBLK ; SET NVRAM DATA BLOCK VALUES CALL PANIC ; ; NVRAM FUNCTIONS ARE NOT AVAILABLE IN SIMULATOR ; SIMRTC_GETBYT: SIMRTC_SETBYT: SIMRTC_GETBLK: SIMRTC_SETBLK: CALL PANIC ; ; RTC GET TIME ; A: RESULT (OUT), 0=OK, Z=OK, NZ=ERR ; HL: DATE/TIME BUFFER (OUT) ; BUFFER FORMAT IS BCD: YYMMDDHHMMSS ; 24 HOUR TIME FORMAT IS ASSUMED ; SIMRTC_GETTIM: ; GET THE TIME INTO TEMP BUF PUSH HL ; SAVE PTR TO CALLS BUFFER CALL SIMRTC_GETTIM0 ; GET TIME TO WORK BUFFER ; ; NOW COPY TO REAL DESTINATION (INTERBANK SAFE) LD A,BID_BIOS ; COPY FROM BIOS BANK LD (HB_SRCBNK),A ; SET IT LD A,(HB_INVBNK) ; COPY TO CURRENT USER BANK LD (HB_DSTBNK),A ; SET IT LD HL,SIMRTC_BUF ; SOURCE ADR POP DE ; DEST ADR LD BC,SIMRTC_BUFSIZ ; LENGTH CALL HB_BNKCPY ; COPY THE CLOCK DATA ; LD DE,60 ; DELAY 60 * 16US = ~1MS CALL VDELAY ; SLOW DOWN SIMH FOR CLOCK TICKING TEST XOR A ; SIGNAL SUCCESS RET ; AND RETURN ; SIMRTC_GETTIM0: LD HL,SIMRTC_BUF LD A,SIMRTC_CLKREAD ; READ CLOCK COMMAND OUT (SIMRTC_IO),A ; SEND IT TO SIMH LD B,SIMRTC_BUFSIZ ; SETUP TO GET 6 BYTES LD C,SIMRTC_IO ; FROM SIMH PORT INIR ; GET BYTES TO (HL) RET ; ; RTC SET TIME ; A: RESULT (OUT), 0=OK, Z=OK, NZ=ERR ; HL: DATE/TIME BUFFER (IN) ; BUFFER FORMAT IS BCD: YYMMDDHHMMSSWW ; 24 HOUR TIME FORMAT IS ASSUMED ; SIMRTC_SETTIM: ; COPY TO TEMP BUF LD A,(HB_INVBNK) ; COPY FROM CURRENT USER BANK LD (HB_SRCBNK),A ; SET IT LD A,BID_BIOS ; COPY TO BIOS BANK LD (HB_DSTBNK),A ; SET IT LD DE,SIMRTC_BUF ; DEST ADR LD BC,SIMRTC_BUFSIZ ; LENGTH CALL HB_BNKCPY ; COPY THE CLOCK DATA ; LD HL,SIMRTC_BUF ; POINT TO TEMP BUF LD A,SIMRTC_CLKWRITE ; WRITE CLOCK COMMAND OUT (SIMRTC_IO),A ; SEND COMMAND TO SIMH LD A,L ; LOW BYTE OF BUFFER ADDRESS OUT (SIMRTC_IO),A ; SEND IT LD A,H ; HIGH BYTE OF BUFFER ADDRESS OUT (SIMRTC_IO),A ; SEND IT ; XOR A ; SIGNAL SUCCESS RET ; AND RETURN ; ; WORKING VARIABLES ; SIMRTC_BUF: ; ALL IN BCD!!! SIMRTC_YR .DB 0 SIMRTC_MO .DB 0 SIMRTC_DT .DB 0 SIMRTC_HH .DB 0 SIMRTC_MM .DB 0 SIMRTC_SS .DB 0
Route16Gate1F_Script: ld hl, wd732 res 5, [hl] call EnableAutoTextBoxDrawing ld a, [wRoute16Gate1FCurScript] ld hl, Route16Gate1F_ScriptPointers jp CallFunctionInTable Route16Gate1F_ScriptPointers: dw Route16GateScript0 dw Route16GateScript1 dw Route16GateScript2 dw Route16GateScript3 Route16GateScript0: call Route16GateScript_49755 ret nz ld hl, CoordsData_49714 call ArePlayerCoordsInArray ret nc ld a, $3 ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ldh [hJoyHeld], a ld a, [wCoordIndex] cp $1 jr z, .asm_4970e ld a, [wCoordIndex] dec a ld [wSimulatedJoypadStatesIndex], a ld b, $0 ld c, a ld a, D_UP ld hl, wSimulatedJoypadStatesEnd call FillMemory call StartSimulatingJoypadStates ld a, $1 ld [wRoute16Gate1FCurScript], a ret .asm_4970e ld a, $2 ld [wRoute16Gate1FCurScript], a ret CoordsData_49714: dbmapcoord 4, 7 dbmapcoord 4, 8 dbmapcoord 4, 9 dbmapcoord 4, 10 db -1 ; end Route16GateScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $f0 ld [wJoyIgnore], a Route16GateScript2: ld a, $1 ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wSimulatedJoypadStatesIndex], a ld a, D_RIGHT ld [wSimulatedJoypadStatesEnd], a call StartSimulatingJoypadStates ld a, $3 ld [wRoute16Gate1FCurScript], a ret Route16GateScript3: ld a, [wSimulatedJoypadStatesIndex] and a ret nz xor a ld [wJoyIgnore], a ld hl, wd730 res 7, [hl] ld a, $0 ld [wRoute16Gate1FCurScript], a ret Route16GateScript_49755: ld b, BICYCLE jp IsItemInBag Route16Gate1F_TextPointers: dw Route16GateText1 dw Route16GateText2 dw Route16GateText3 Route16GateText1: text_asm call Route16GateScript_49755 jr z, .asm_0bdf3 ld hl, Route16GateText_4977c call PrintText jr .asm_56c9d .asm_0bdf3 ld hl, Route16GateText_49777 call PrintText .asm_56c9d jp TextScriptEnd Route16GateText_49777: text_far _Route16GateText_49777 text_end Route16GateText_4977c: text_far _Route16GateText_4977c text_end Route16GateText3: text_far _Route16GateText_49781 text_end Route16GateText2: text_far _Route16GateText2 text_end
* Check separators V0.5  1984 Tony Tebby QJUMP * * check if parameter is preceded by a given separator * section utils * xdef ut_ckcomma xdef ut_ckto xdef ut_cksemi xdef ut_cksep * include dev8_sbsext_ext_keys include dev8_sbsext_ext_ex_defs * ut_ckcomma moveq #%00010000,d0 check for comma bra.s ut_cksep (hash permitted) ut_ckto moveq #%01010000,d0 check for to bra.s ut_cksep ut_cksemi moveq #%00100000,d0 check for semicolon tst.b 1(a6,a3.l) is it preceded by a #? bmi.s ut_ckbp ... yes ut_cksep cmp.l parm_st+4(sp),a3 ble.s ut_ckbp it is the first parameter, preceded by no sep moveq #%01110000,d1 mask out all but the separator and.b -7(a6,a3.l),d1 ... from previous entry sub.b d1,d0 and set d0 to 0 if equal beq.s ut_ckrts ut_ckbp moveq #err.bp,d0 otherwise err.bp ut_ckrts rts end
; ; jdsample.asm - upsampling (64-bit SSE2) ; ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB ; Copyright 2009 D. R. Commander ; ; Based on ; x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 ; ; [TAB8] %include "jsimdext.inc" ; -------------------------------------------------------------------------- SECTION SEG_CONST alignz 16 global EXTN(jconst_fancy_upsample_sse2) EXTN(jconst_fancy_upsample_sse2): PW_ONE times 8 dw 1 PW_TWO times 8 dw 2 PW_THREE times 8 dw 3 PW_SEVEN times 8 dw 7 PW_EIGHT times 8 dw 8 alignz 16 ; -------------------------------------------------------------------------- SECTION SEG_TEXT BITS 64 ; ; Fancy processing for the common case of 2:1 horizontal and 1:1 vertical. ; ; The upsampling algorithm is linear interpolation between pixel centers, ; also known as a "triangle filter". This is a good compromise between ; speed and visual quality. The centers of the output pixels are 1/4 and 3/4 ; of the way between input pixel centers. ; ; GLOBAL(void) ; jsimd_h2v1_fancy_upsample_sse2 (int max_v_samp_factor, ; JDIMENSION downsampled_width, ; JSAMPARRAY input_data, ; JSAMPARRAY * output_data_ptr); ; ; r10 = int max_v_samp_factor ; r11 = JDIMENSION downsampled_width ; r12 = JSAMPARRAY input_data ; r13 = JSAMPARRAY * output_data_ptr align 16 global EXTN(jsimd_h2v1_fancy_upsample_sse2) EXTN(jsimd_h2v1_fancy_upsample_sse2): push rbp mov rax,rsp mov rbp,rsp collect_args mov eax, r11d ; colctr test rax,rax jz near .return mov rcx, r10 ; rowctr test rcx,rcx jz near .return mov rsi, r12 ; input_data mov rdi, r13 mov rdi, JSAMPARRAY [rdi] ; output_data .rowloop: push rax ; colctr push rdi push rsi mov rsi, JSAMPROW [rsi] ; inptr mov rdi, JSAMPROW [rdi] ; outptr test rax, SIZEOF_XMMWORD-1 jz short .skip mov dl, JSAMPLE [rsi+(rax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [rsi+rax*SIZEOF_JSAMPLE], dl ; insert a dummy sample .skip: pxor xmm0,xmm0 ; xmm0=(all 0's) pcmpeqb xmm7,xmm7 psrldq xmm7,(SIZEOF_XMMWORD-1) pand xmm7, XMMWORD [rsi+0*SIZEOF_XMMWORD] add rax, byte SIZEOF_XMMWORD-1 and rax, byte -SIZEOF_XMMWORD cmp rax, byte SIZEOF_XMMWORD ja short .columnloop .columnloop_last: pcmpeqb xmm6,xmm6 pslldq xmm6,(SIZEOF_XMMWORD-1) pand xmm6, XMMWORD [rsi+0*SIZEOF_XMMWORD] jmp short .upsample .columnloop: movdqa xmm6, XMMWORD [rsi+1*SIZEOF_XMMWORD] pslldq xmm6,(SIZEOF_XMMWORD-1) .upsample: movdqa xmm1, XMMWORD [rsi+0*SIZEOF_XMMWORD] movdqa xmm2,xmm1 movdqa xmm3,xmm1 ; xmm1=( 0 1 2 ... 13 14 15) pslldq xmm2,1 ; xmm2=(-- 0 1 ... 12 13 14) psrldq xmm3,1 ; xmm3=( 1 2 3 ... 14 15 --) por xmm2,xmm7 ; xmm2=(-1 0 1 ... 12 13 14) por xmm3,xmm6 ; xmm3=( 1 2 3 ... 14 15 16) movdqa xmm7,xmm1 psrldq xmm7,(SIZEOF_XMMWORD-1) ; xmm7=(15 -- -- ... -- -- --) movdqa xmm4,xmm1 punpcklbw xmm1,xmm0 ; xmm1=( 0 1 2 3 4 5 6 7) punpckhbw xmm4,xmm0 ; xmm4=( 8 9 10 11 12 13 14 15) movdqa xmm5,xmm2 punpcklbw xmm2,xmm0 ; xmm2=(-1 0 1 2 3 4 5 6) punpckhbw xmm5,xmm0 ; xmm5=( 7 8 9 10 11 12 13 14) movdqa xmm6,xmm3 punpcklbw xmm3,xmm0 ; xmm3=( 1 2 3 4 5 6 7 8) punpckhbw xmm6,xmm0 ; xmm6=( 9 10 11 12 13 14 15 16) pmullw xmm1,[rel PW_THREE] pmullw xmm4,[rel PW_THREE] paddw xmm2,[rel PW_ONE] paddw xmm5,[rel PW_ONE] paddw xmm3,[rel PW_TWO] paddw xmm6,[rel PW_TWO] paddw xmm2,xmm1 paddw xmm5,xmm4 psrlw xmm2,2 ; xmm2=OutLE=( 0 2 4 6 8 10 12 14) psrlw xmm5,2 ; xmm5=OutHE=(16 18 20 22 24 26 28 30) paddw xmm3,xmm1 paddw xmm6,xmm4 psrlw xmm3,2 ; xmm3=OutLO=( 1 3 5 7 9 11 13 15) psrlw xmm6,2 ; xmm6=OutHO=(17 19 21 23 25 27 29 31) psllw xmm3,BYTE_BIT psllw xmm6,BYTE_BIT por xmm2,xmm3 ; xmm2=OutL=( 0 1 2 ... 13 14 15) por xmm5,xmm6 ; xmm5=OutH=(16 17 18 ... 29 30 31) movdqa XMMWORD [rdi+0*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rdi+1*SIZEOF_XMMWORD], xmm5 sub rax, byte SIZEOF_XMMWORD add rsi, byte 1*SIZEOF_XMMWORD ; inptr add rdi, byte 2*SIZEOF_XMMWORD ; outptr cmp rax, byte SIZEOF_XMMWORD ja near .columnloop test eax,eax jnz near .columnloop_last pop rsi pop rdi pop rax add rsi, byte SIZEOF_JSAMPROW ; input_data add rdi, byte SIZEOF_JSAMPROW ; output_data dec rcx ; rowctr jg near .rowloop .return: uncollect_args pop rbp ret ; -------------------------------------------------------------------------- ; ; Fancy processing for the common case of 2:1 horizontal and 2:1 vertical. ; Again a triangle filter; see comments for h2v1 case, above. ; ; GLOBAL(void) ; jsimd_h2v2_fancy_upsample_sse2 (int max_v_samp_factor, ; JDIMENSION downsampled_width, ; JSAMPARRAY input_data, ; JSAMPARRAY * output_data_ptr); ; ; r10 = int max_v_samp_factor ; r11 = JDIMENSION downsampled_width ; r12 = JSAMPARRAY input_data ; r13 = JSAMPARRAY * output_data_ptr %define wk(i) rbp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] %define WK_NUM 4 align 16 global EXTN(jsimd_h2v2_fancy_upsample_sse2) EXTN(jsimd_h2v2_fancy_upsample_sse2): push rbp mov rax,rsp ; rax = original rbp sub rsp, byte 4 and rsp, byte (-SIZEOF_XMMWORD) ; align to 128 bits mov [rsp],rax mov rbp,rsp ; rbp = aligned rbp lea rsp, [wk(0)] collect_args push rbx mov eax, r11d ; colctr test rax,rax jz near .return mov rcx, r10 ; rowctr test rcx,rcx jz near .return mov rsi, r12 ; input_data mov rdi, r13 mov rdi, JSAMPARRAY [rdi] ; output_data .rowloop: push rax ; colctr push rcx push rdi push rsi mov rcx, JSAMPROW [rsi-1*SIZEOF_JSAMPROW] ; inptr1(above) mov rbx, JSAMPROW [rsi+0*SIZEOF_JSAMPROW] ; inptr0 mov rsi, JSAMPROW [rsi+1*SIZEOF_JSAMPROW] ; inptr1(below) mov rdx, JSAMPROW [rdi+0*SIZEOF_JSAMPROW] ; outptr0 mov rdi, JSAMPROW [rdi+1*SIZEOF_JSAMPROW] ; outptr1 test rax, SIZEOF_XMMWORD-1 jz short .skip push rdx mov dl, JSAMPLE [rcx+(rax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [rcx+rax*SIZEOF_JSAMPLE], dl mov dl, JSAMPLE [rbx+(rax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [rbx+rax*SIZEOF_JSAMPLE], dl mov dl, JSAMPLE [rsi+(rax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [rsi+rax*SIZEOF_JSAMPLE], dl ; insert a dummy sample pop rdx .skip: ; -- process the first column block movdqa xmm0, XMMWORD [rbx+0*SIZEOF_XMMWORD] ; xmm0=row[ 0][0] movdqa xmm1, XMMWORD [rcx+0*SIZEOF_XMMWORD] ; xmm1=row[-1][0] movdqa xmm2, XMMWORD [rsi+0*SIZEOF_XMMWORD] ; xmm2=row[+1][0] pxor xmm3,xmm3 ; xmm3=(all 0's) movdqa xmm4,xmm0 punpcklbw xmm0,xmm3 ; xmm0=row[ 0]( 0 1 2 3 4 5 6 7) punpckhbw xmm4,xmm3 ; xmm4=row[ 0]( 8 9 10 11 12 13 14 15) movdqa xmm5,xmm1 punpcklbw xmm1,xmm3 ; xmm1=row[-1]( 0 1 2 3 4 5 6 7) punpckhbw xmm5,xmm3 ; xmm5=row[-1]( 8 9 10 11 12 13 14 15) movdqa xmm6,xmm2 punpcklbw xmm2,xmm3 ; xmm2=row[+1]( 0 1 2 3 4 5 6 7) punpckhbw xmm6,xmm3 ; xmm6=row[+1]( 8 9 10 11 12 13 14 15) pmullw xmm0,[rel PW_THREE] pmullw xmm4,[rel PW_THREE] pcmpeqb xmm7,xmm7 psrldq xmm7,(SIZEOF_XMMWORD-2) paddw xmm1,xmm0 ; xmm1=Int0L=( 0 1 2 3 4 5 6 7) paddw xmm5,xmm4 ; xmm5=Int0H=( 8 9 10 11 12 13 14 15) paddw xmm2,xmm0 ; xmm2=Int1L=( 0 1 2 3 4 5 6 7) paddw xmm6,xmm4 ; xmm6=Int1H=( 8 9 10 11 12 13 14 15) movdqa XMMWORD [rdx+0*SIZEOF_XMMWORD], xmm1 ; temporarily save movdqa XMMWORD [rdx+1*SIZEOF_XMMWORD], xmm5 ; the intermediate data movdqa XMMWORD [rdi+0*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rdi+1*SIZEOF_XMMWORD], xmm6 pand xmm1,xmm7 ; xmm1=( 0 -- -- -- -- -- -- --) pand xmm2,xmm7 ; xmm2=( 0 -- -- -- -- -- -- --) movdqa XMMWORD [wk(0)], xmm1 movdqa XMMWORD [wk(1)], xmm2 add rax, byte SIZEOF_XMMWORD-1 and rax, byte -SIZEOF_XMMWORD cmp rax, byte SIZEOF_XMMWORD ja short .columnloop .columnloop_last: ; -- process the last column block pcmpeqb xmm1,xmm1 pslldq xmm1,(SIZEOF_XMMWORD-2) movdqa xmm2,xmm1 pand xmm1, XMMWORD [rdx+1*SIZEOF_XMMWORD] pand xmm2, XMMWORD [rdi+1*SIZEOF_XMMWORD] movdqa XMMWORD [wk(2)], xmm1 ; xmm1=(-- -- -- -- -- -- -- 15) movdqa XMMWORD [wk(3)], xmm2 ; xmm2=(-- -- -- -- -- -- -- 15) jmp near .upsample .columnloop: ; -- process the next column block movdqa xmm0, XMMWORD [rbx+1*SIZEOF_XMMWORD] ; xmm0=row[ 0][1] movdqa xmm1, XMMWORD [rcx+1*SIZEOF_XMMWORD] ; xmm1=row[-1][1] movdqa xmm2, XMMWORD [rsi+1*SIZEOF_XMMWORD] ; xmm2=row[+1][1] pxor xmm3,xmm3 ; xmm3=(all 0's) movdqa xmm4,xmm0 punpcklbw xmm0,xmm3 ; xmm0=row[ 0]( 0 1 2 3 4 5 6 7) punpckhbw xmm4,xmm3 ; xmm4=row[ 0]( 8 9 10 11 12 13 14 15) movdqa xmm5,xmm1 punpcklbw xmm1,xmm3 ; xmm1=row[-1]( 0 1 2 3 4 5 6 7) punpckhbw xmm5,xmm3 ; xmm5=row[-1]( 8 9 10 11 12 13 14 15) movdqa xmm6,xmm2 punpcklbw xmm2,xmm3 ; xmm2=row[+1]( 0 1 2 3 4 5 6 7) punpckhbw xmm6,xmm3 ; xmm6=row[+1]( 8 9 10 11 12 13 14 15) pmullw xmm0,[rel PW_THREE] pmullw xmm4,[rel PW_THREE] paddw xmm1,xmm0 ; xmm1=Int0L=( 0 1 2 3 4 5 6 7) paddw xmm5,xmm4 ; xmm5=Int0H=( 8 9 10 11 12 13 14 15) paddw xmm2,xmm0 ; xmm2=Int1L=( 0 1 2 3 4 5 6 7) paddw xmm6,xmm4 ; xmm6=Int1H=( 8 9 10 11 12 13 14 15) movdqa XMMWORD [rdx+2*SIZEOF_XMMWORD], xmm1 ; temporarily save movdqa XMMWORD [rdx+3*SIZEOF_XMMWORD], xmm5 ; the intermediate data movdqa XMMWORD [rdi+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rdi+3*SIZEOF_XMMWORD], xmm6 pslldq xmm1,(SIZEOF_XMMWORD-2) ; xmm1=(-- -- -- -- -- -- -- 0) pslldq xmm2,(SIZEOF_XMMWORD-2) ; xmm2=(-- -- -- -- -- -- -- 0) movdqa XMMWORD [wk(2)], xmm1 movdqa XMMWORD [wk(3)], xmm2 .upsample: ; -- process the upper row movdqa xmm7, XMMWORD [rdx+0*SIZEOF_XMMWORD] movdqa xmm3, XMMWORD [rdx+1*SIZEOF_XMMWORD] movdqa xmm0,xmm7 ; xmm7=Int0L=( 0 1 2 3 4 5 6 7) movdqa xmm4,xmm3 ; xmm3=Int0H=( 8 9 10 11 12 13 14 15) psrldq xmm0,2 ; xmm0=( 1 2 3 4 5 6 7 --) pslldq xmm4,(SIZEOF_XMMWORD-2) ; xmm4=(-- -- -- -- -- -- -- 8) movdqa xmm5,xmm7 movdqa xmm6,xmm3 psrldq xmm5,(SIZEOF_XMMWORD-2) ; xmm5=( 7 -- -- -- -- -- -- --) pslldq xmm6,2 ; xmm6=(-- 8 9 10 11 12 13 14) por xmm0,xmm4 ; xmm0=( 1 2 3 4 5 6 7 8) por xmm5,xmm6 ; xmm5=( 7 8 9 10 11 12 13 14) movdqa xmm1,xmm7 movdqa xmm2,xmm3 pslldq xmm1,2 ; xmm1=(-- 0 1 2 3 4 5 6) psrldq xmm2,2 ; xmm2=( 9 10 11 12 13 14 15 --) movdqa xmm4,xmm3 psrldq xmm4,(SIZEOF_XMMWORD-2) ; xmm4=(15 -- -- -- -- -- -- --) por xmm1, XMMWORD [wk(0)] ; xmm1=(-1 0 1 2 3 4 5 6) por xmm2, XMMWORD [wk(2)] ; xmm2=( 9 10 11 12 13 14 15 16) movdqa XMMWORD [wk(0)], xmm4 pmullw xmm7,[rel PW_THREE] pmullw xmm3,[rel PW_THREE] paddw xmm1,[rel PW_EIGHT] paddw xmm5,[rel PW_EIGHT] paddw xmm0,[rel PW_SEVEN] paddw xmm2,[rel PW_SEVEN] paddw xmm1,xmm7 paddw xmm5,xmm3 psrlw xmm1,4 ; xmm1=Out0LE=( 0 2 4 6 8 10 12 14) psrlw xmm5,4 ; xmm5=Out0HE=(16 18 20 22 24 26 28 30) paddw xmm0,xmm7 paddw xmm2,xmm3 psrlw xmm0,4 ; xmm0=Out0LO=( 1 3 5 7 9 11 13 15) psrlw xmm2,4 ; xmm2=Out0HO=(17 19 21 23 25 27 29 31) psllw xmm0,BYTE_BIT psllw xmm2,BYTE_BIT por xmm1,xmm0 ; xmm1=Out0L=( 0 1 2 ... 13 14 15) por xmm5,xmm2 ; xmm5=Out0H=(16 17 18 ... 29 30 31) movdqa XMMWORD [rdx+0*SIZEOF_XMMWORD], xmm1 movdqa XMMWORD [rdx+1*SIZEOF_XMMWORD], xmm5 ; -- process the lower row movdqa xmm6, XMMWORD [rdi+0*SIZEOF_XMMWORD] movdqa xmm4, XMMWORD [rdi+1*SIZEOF_XMMWORD] movdqa xmm7,xmm6 ; xmm6=Int1L=( 0 1 2 3 4 5 6 7) movdqa xmm3,xmm4 ; xmm4=Int1H=( 8 9 10 11 12 13 14 15) psrldq xmm7,2 ; xmm7=( 1 2 3 4 5 6 7 --) pslldq xmm3,(SIZEOF_XMMWORD-2) ; xmm3=(-- -- -- -- -- -- -- 8) movdqa xmm0,xmm6 movdqa xmm2,xmm4 psrldq xmm0,(SIZEOF_XMMWORD-2) ; xmm0=( 7 -- -- -- -- -- -- --) pslldq xmm2,2 ; xmm2=(-- 8 9 10 11 12 13 14) por xmm7,xmm3 ; xmm7=( 1 2 3 4 5 6 7 8) por xmm0,xmm2 ; xmm0=( 7 8 9 10 11 12 13 14) movdqa xmm1,xmm6 movdqa xmm5,xmm4 pslldq xmm1,2 ; xmm1=(-- 0 1 2 3 4 5 6) psrldq xmm5,2 ; xmm5=( 9 10 11 12 13 14 15 --) movdqa xmm3,xmm4 psrldq xmm3,(SIZEOF_XMMWORD-2) ; xmm3=(15 -- -- -- -- -- -- --) por xmm1, XMMWORD [wk(1)] ; xmm1=(-1 0 1 2 3 4 5 6) por xmm5, XMMWORD [wk(3)] ; xmm5=( 9 10 11 12 13 14 15 16) movdqa XMMWORD [wk(1)], xmm3 pmullw xmm6,[rel PW_THREE] pmullw xmm4,[rel PW_THREE] paddw xmm1,[rel PW_EIGHT] paddw xmm0,[rel PW_EIGHT] paddw xmm7,[rel PW_SEVEN] paddw xmm5,[rel PW_SEVEN] paddw xmm1,xmm6 paddw xmm0,xmm4 psrlw xmm1,4 ; xmm1=Out1LE=( 0 2 4 6 8 10 12 14) psrlw xmm0,4 ; xmm0=Out1HE=(16 18 20 22 24 26 28 30) paddw xmm7,xmm6 paddw xmm5,xmm4 psrlw xmm7,4 ; xmm7=Out1LO=( 1 3 5 7 9 11 13 15) psrlw xmm5,4 ; xmm5=Out1HO=(17 19 21 23 25 27 29 31) psllw xmm7,BYTE_BIT psllw xmm5,BYTE_BIT por xmm1,xmm7 ; xmm1=Out1L=( 0 1 2 ... 13 14 15) por xmm0,xmm5 ; xmm0=Out1H=(16 17 18 ... 29 30 31) movdqa XMMWORD [rdi+0*SIZEOF_XMMWORD], xmm1 movdqa XMMWORD [rdi+1*SIZEOF_XMMWORD], xmm0 sub rax, byte SIZEOF_XMMWORD add rcx, byte 1*SIZEOF_XMMWORD ; inptr1(above) add rbx, byte 1*SIZEOF_XMMWORD ; inptr0 add rsi, byte 1*SIZEOF_XMMWORD ; inptr1(below) add rdx, byte 2*SIZEOF_XMMWORD ; outptr0 add rdi, byte 2*SIZEOF_XMMWORD ; outptr1 cmp rax, byte SIZEOF_XMMWORD ja near .columnloop test rax,rax jnz near .columnloop_last pop rsi pop rdi pop rcx pop rax add rsi, byte 1*SIZEOF_JSAMPROW ; input_data add rdi, byte 2*SIZEOF_JSAMPROW ; output_data sub rcx, byte 2 ; rowctr jg near .rowloop .return: pop rbx uncollect_args mov rsp,rbp ; rsp <- aligned rbp pop rsp ; rsp <- original rbp pop rbp ret ; -------------------------------------------------------------------------- ; ; Fast processing for the common case of 2:1 horizontal and 1:1 vertical. ; It's still a box filter. ; ; GLOBAL(void) ; jsimd_h2v1_upsample_sse2 (int max_v_samp_factor, ; JDIMENSION output_width, ; JSAMPARRAY input_data, ; JSAMPARRAY * output_data_ptr); ; ; r10 = int max_v_samp_factor ; r11 = JDIMENSION output_width ; r12 = JSAMPARRAY input_data ; r13 = JSAMPARRAY * output_data_ptr align 16 global EXTN(jsimd_h2v1_upsample_sse2) EXTN(jsimd_h2v1_upsample_sse2): push rbp mov rax,rsp mov rbp,rsp collect_args mov edx, r11d add rdx, byte (2*SIZEOF_XMMWORD)-1 and rdx, byte -(2*SIZEOF_XMMWORD) jz near .return mov rcx, r10 ; rowctr test rcx,rcx %ifdef COMPILING_FOR_NACL jz near .return %else jz short .return %endif mov rsi, r12 ; input_data mov rdi, r13 mov rdi, JSAMPARRAY [rdi] ; output_data .rowloop: push rdi push rsi mov rsi, JSAMPROW [rsi] ; inptr mov rdi, JSAMPROW [rdi] ; outptr mov rax,rdx ; colctr .columnloop: movdqa xmm0, XMMWORD [rsi+0*SIZEOF_XMMWORD] movdqa xmm1,xmm0 punpcklbw xmm0,xmm0 punpckhbw xmm1,xmm1 movdqa XMMWORD [rdi+0*SIZEOF_XMMWORD], xmm0 movdqa XMMWORD [rdi+1*SIZEOF_XMMWORD], xmm1 sub rax, byte 2*SIZEOF_XMMWORD jz short .nextrow movdqa xmm2, XMMWORD [rsi+1*SIZEOF_XMMWORD] movdqa xmm3,xmm2 punpcklbw xmm2,xmm2 punpckhbw xmm3,xmm3 movdqa XMMWORD [rdi+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rdi+3*SIZEOF_XMMWORD], xmm3 sub rax, byte 2*SIZEOF_XMMWORD jz short .nextrow add rsi, byte 2*SIZEOF_XMMWORD ; inptr add rdi, byte 4*SIZEOF_XMMWORD ; outptr jmp short .columnloop .nextrow: pop rsi pop rdi add rsi, byte SIZEOF_JSAMPROW ; input_data add rdi, byte SIZEOF_JSAMPROW ; output_data dec rcx ; rowctr %ifdef COMPILING_FOR_NACL jg near .rowloop %else jg short .rowloop %endif .return: uncollect_args pop rbp ret ; -------------------------------------------------------------------------- ; ; Fast processing for the common case of 2:1 horizontal and 2:1 vertical. ; It's still a box filter. ; ; GLOBAL(void) ; jsimd_h2v2_upsample_sse2 (nt max_v_samp_factor, ; JDIMENSION output_width, ; JSAMPARRAY input_data, ; JSAMPARRAY * output_data_ptr); ; ; r10 = int max_v_samp_factor ; r11 = JDIMENSION output_width ; r12 = JSAMPARRAY input_data ; r13 = JSAMPARRAY * output_data_ptr align 16 global EXTN(jsimd_h2v2_upsample_sse2) EXTN(jsimd_h2v2_upsample_sse2): push rbp mov rax,rsp mov rbp,rsp collect_args push rbx mov edx, r11d add rdx, byte (2*SIZEOF_XMMWORD)-1 and rdx, byte -(2*SIZEOF_XMMWORD) jz near .return mov rcx, r10 ; rowctr test rcx,rcx jz near .return mov rsi, r12 ; input_data mov rdi, r13 mov rdi, JSAMPARRAY [rdi] ; output_data .rowloop: push rdi push rsi mov rsi, JSAMPROW [rsi] ; inptr mov rbx, JSAMPROW [rdi+0*SIZEOF_JSAMPROW] ; outptr0 mov rdi, JSAMPROW [rdi+1*SIZEOF_JSAMPROW] ; outptr1 mov rax,rdx ; colctr .columnloop: movdqa xmm0, XMMWORD [rsi+0*SIZEOF_XMMWORD] movdqa xmm1,xmm0 punpcklbw xmm0,xmm0 punpckhbw xmm1,xmm1 movdqa XMMWORD [rbx+0*SIZEOF_XMMWORD], xmm0 movdqa XMMWORD [rbx+1*SIZEOF_XMMWORD], xmm1 movdqa XMMWORD [rdi+0*SIZEOF_XMMWORD], xmm0 movdqa XMMWORD [rdi+1*SIZEOF_XMMWORD], xmm1 sub rax, byte 2*SIZEOF_XMMWORD jz short .nextrow movdqa xmm2, XMMWORD [rsi+1*SIZEOF_XMMWORD] movdqa xmm3,xmm2 punpcklbw xmm2,xmm2 punpckhbw xmm3,xmm3 movdqa XMMWORD [rbx+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rbx+3*SIZEOF_XMMWORD], xmm3 movdqa XMMWORD [rdi+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rdi+3*SIZEOF_XMMWORD], xmm3 sub rax, byte 2*SIZEOF_XMMWORD jz short .nextrow add rsi, byte 2*SIZEOF_XMMWORD ; inptr add rbx, byte 4*SIZEOF_XMMWORD ; outptr0 add rdi, byte 4*SIZEOF_XMMWORD ; outptr1 %ifdef COMPILING_FOR_NACL jmp near .columnloop %else jmp short .columnloop %endif .nextrow: pop rsi pop rdi add rsi, byte 1*SIZEOF_JSAMPROW ; input_data add rdi, byte 2*SIZEOF_JSAMPROW ; output_data sub rcx, byte 2 ; rowctr jg near .rowloop .return: pop rbx uncollect_args pop rbp ret ; For some reason, the OS X linker does not honor the request to align the ; segment unless we do this. align 16
section .data answers: times 26 dq 0 sum1: dq 0 sum2: dq 0 nl: db `\n` section .bss char1: resb 1 char2: resb 2 section .text global _start _start: B_read_record: xor r12, r12 ; Zero # of persons read for this record. mov rcx, 26 L_zero: mov rdx, rcx dec rdx mov qword [answers+8*rdx], 0 ; Some reason [answers+8*rcx-1] does not work... loop L_zero L_answer: call getc mov r14, rax ; Save retval for later use. cmp rax, 0 jle B_group_end ; Finished input or error. mov rax, [char1] ; Get the character read. cmp rax, `\n` jne B_character ; NOT a NL -> character counting logic. cmp r15, `\n` je B_group_end ; Double NL -> finished with record. inc r12 ; New person, but not new record, so incr count. mov r15, rax ; Save the character for checking double NL. jmp L_answer B_character: mov r15, rax ; Save the character for checking double NL. sub rax, 'a' inc qword [answers+8*rax] jmp L_answer B_group_end: mov rcx, 26 L_count: mov rdx, rcx dec rdx mov rax, qword [answers+8*rdx] cmp rax, 0 je B_no_incr ; If no occurrence -> skip counting this letter. inc qword [sum1] cmp rax, r12 jne B_no_incr ; If person count != occurrence count -> skip part2 incr. inc qword [sum2] B_no_incr: loop L_count cmp r14, 0 jg B_read_record ; If the retval from the read was ok, continue reading. B_end: mov rax, qword [sum1] ; Part 1 call printi mov rax, qword [sum2] ; Part 2 call printi mov rax, 60 ; Exit mov rdi, 0 syscall ;; Is not reached. getc: ;; Read input from stdin on character at a time, store result in ;; `char1'. mov rax, 0 mov rdi, 0 mov rsi, char1 mov rdx, 1 syscall ret printi: ;; Print number in RAX as decimal. Probably still has bugs in ;; it... but it works. xor r11, r11 ; Zero out count of digits. L_n2s: xor rdx, rdx ; Zero out upper half of dividend mov rbx, 10 ; Divisor div rbx ; RDX:RAX / RBX -> Q:RAX R:RDX cmp rax, 0 je B_final_digit inc r11 push rdx jmp L_n2s B_final_digit: cmp rdx, 0 je B_is_zero inc r11 push rdx jmp B_do_print B_is_zero: cmp r11, 0 jne B_do_print inc r11 push qword 0 B_do_print: mov rcx, r11 L_do_print: pop rbx add rbx, '0' push rcx ; Save rcx which can be messed up by syscalls. mov [char2], rbx mov rax, 1 mov rdi, 1 mov rsi, char2 mov rdx, 1 syscall pop rcx loop L_do_print ;; Print NL mov rax, 1, mov rdi, 1 mov rsi, nl mov rdx, 1 syscall ret ;; Local Variables: ;; compile-command: "nasm -g -f elf64 day06.asm && ld day06.o -o day06 && ./day06 < input.txt" ;; End:
;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php. ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; Module Name: ; ; ReadMm5.Asm ; ; Abstract: ; ; AsmReadMm5 function ; ; Notes: ; ;------------------------------------------------------------------------------ DEFAULT REL SECTION .text ;------------------------------------------------------------------------------ ; UINT64 ; EFIAPI ; AsmReadMm5 ( ; VOID ; ); ;------------------------------------------------------------------------------ global ASM_PFX(AsmReadMm5) ASM_PFX(AsmReadMm5): ; ; 64-bit MASM doesn't support MMX instructions, so use opcode here ; DB 0x48, 0xf, 0x7e, 0xe8 ret
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0xc79b, %rsi lea addresses_A_ht+0x1559b, %rdi xor $28861, %r10 mov $95, %rcx rep movsw nop nop nop nop xor $7429, %rdx lea addresses_WC_ht+0x1489b, %rsi lea addresses_A_ht+0x849b, %rdi nop nop cmp $64615, %r11 mov $97, %rcx rep movsb nop nop nop nop nop add $7125, %rdi lea addresses_WC_ht+0x108b1, %r11 nop nop nop nop nop add %rdx, %rdx mov $0x6162636465666768, %rdi movq %rdi, %xmm3 movups %xmm3, (%r11) and $36423, %rdx lea addresses_WT_ht+0x1b05b, %rsi lea addresses_normal_ht+0x10b1b, %rdi nop nop nop nop nop add $27038, %rax mov $73, %rcx rep movsl nop nop nop nop nop dec %r11 lea addresses_normal_ht+0x110b2, %r10 nop nop nop nop nop sub %rdx, %rdx mov (%r10), %ecx nop nop nop xor %r11, %r11 lea addresses_normal_ht+0x16c5b, %rcx clflush (%rcx) and %rdi, %rdi movb $0x61, (%rcx) nop nop add $38624, %rdx lea addresses_WC_ht+0xb4db, %r10 nop and $25821, %rdi vmovups (%r10), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $1, %xmm2, %rcx and $13652, %rdx lea addresses_A_ht+0x1025b, %rsi lea addresses_WC_ht+0x18b32, %rdi nop nop nop nop nop sub $41452, %rbx mov $85, %rcx rep movsw nop nop sub $31913, %rsi lea addresses_WC_ht+0x85b, %rsi clflush (%rsi) nop nop nop nop xor $27275, %rdx mov (%rsi), %ax nop nop nop inc %rsi lea addresses_WC_ht+0x6f2b, %rdi and $28672, %rdx movb $0x61, (%rdi) nop nop add %rdx, %rdx lea addresses_normal_ht+0x205b, %rax nop sub $17400, %rcx mov $0x6162636465666768, %rsi movq %rsi, %xmm3 vmovups %ymm3, (%rax) nop nop nop and %rdx, %rdx lea addresses_UC_ht+0x1a25b, %r11 cmp $14616, %rax movb (%r11), %cl add $16583, %r10 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r15 push %rbx push %rcx push %rdi push %rdx push %rsi // Load lea addresses_UC+0x1965b, %r11 nop nop add $35044, %rcx mov (%r11), %r13 nop nop nop and %r13, %r13 // Store lea addresses_UC+0x182db, %r15 nop nop nop nop dec %rbx movw $0x5152, (%r15) nop nop nop nop nop add $6134, %r15 // Store lea addresses_A+0x585b, %r13 nop nop nop dec %rdx mov $0x5152535455565758, %rcx movq %rcx, %xmm5 vmovups %ymm5, (%r13) nop nop nop nop sub %r13, %r13 // Store lea addresses_UC+0x2ddb, %rdx nop add %r11, %r11 mov $0x5152535455565758, %rdi movq %rdi, %xmm1 vmovups %ymm1, (%rdx) nop nop nop add $60169, %r15 // Store lea addresses_UC+0x847b, %r11 inc %rcx mov $0x5152535455565758, %rbx movq %rbx, %xmm7 vmovups %ymm7, (%r11) nop nop nop sub %rdx, %rdx // Store lea addresses_A+0x1ea5b, %rcx nop sub %r13, %r13 mov $0x5152535455565758, %r15 movq %r15, %xmm2 vmovups %ymm2, (%rcx) nop cmp $54458, %rcx // Store lea addresses_UC+0x18a5b, %r15 nop nop nop nop xor %rdx, %rdx movl $0x51525354, (%r15) nop nop nop inc %rcx // Store lea addresses_WT+0x1fb5b, %r11 nop xor $2036, %r13 movl $0x51525354, (%r11) nop nop nop add $65156, %rbx // REPMOV lea addresses_PSE+0x1c34b, %rsi lea addresses_WT+0x1c35b, %rdi nop nop sub %rbx, %rbx mov $112, %rcx rep movsb nop nop add %rsi, %rsi // Faulty Load lea addresses_UC+0xf85b, %r11 nop nop and $30581, %rcx mov (%r11), %rbx lea oracles, %rdi and $0xff, %rbx shlq $12, %rbx mov (%rdi,%rbx,1), %rbx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r15 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_UC', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC', 'same': False, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_PSE', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT', 'congruent': 8, 'same': False}, 'OP': 'REPM'} [Faulty Load] {'src': {'type': 'addresses_UC', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 2, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'37': 21829} 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 */
.include "defaults_mod.asm" table_file_jp equ "exe4-utf8.tbl" table_file_en equ "bn4-utf8.tbl" game_code_len equ 3 game_code equ 0x4234574A // B4WJ game_code_2 equ 0x42345745 // B4WE game_code_3 equ 0x42345750 // B4WP card_type equ 1 card_id equ 92 card_no equ "092" card_sub equ "Mod Card 092" card_sub_x equ 64 card_desc_len equ 2 card_desc_1 equ "Address 0A" card_desc_2 equ "MAX HP +750" card_desc_3 equ "" card_name_jp_full equ "マックスHP+750" card_name_jp_game equ "マックスHP+750" card_name_en_full equ "MAX HP +750" card_name_en_game equ "MAX HP +750" card_address equ "0A" card_address_id equ 0 card_bug equ 0 card_wrote_en equ "MAX HP +750" card_wrote_jp equ "マックスHP+750"
.gba .open "Clean\Boktai 1 (U).gba","Boktai 1 (U)(Hack).gba",0x08000000 .org 0x080000D4 // sunlight changer .area 0xCC ldr r0,=3004508h ldr r0,[r0] // r0 = sunlight bl 80123F0h // r0 = amount of bars ldr r1,=3004450h ldrh r2,[r1] // r2 = BUTTON_HELD ldrh r1,[r1,2h] // r1 = BUTTON_DOWN ldr r3,=101h and r2,r3 cmp r2,r3 // if R+A held bne @@sunwrite @@righttest: mov r3,10h tst r1,r3 beq @@lefttest cmp r0,8h bge @@sunwrite add r0,1h @@lefttest: mov r3,20h tst r1,r3 beq @@sunwrite cmp r0,0h ble @@sunwrite sub r0,1h @@sunwrite: add r3,=dataarea ldrb r3,[r3,r0] ldr r1,=3004508h str r3,[r1] @@end: pop r15 .pool dataarea: dcb 0x00,0x04,0x0B,0x14,0x1F,0x2F,0x4D,0x77,0x8C .endarea .org 0x081C03BC // hook bl 80000D4h .org 0x080123F4 // treat negative as empty gauge bgt 80123FAh .org 0x0801243C // treat negative as empty gauge bgt 8012442h .org 0x080124AE // skip sunlight value adjustment b 80124CEh .org 0x080122C8 // set default sensor calibration value mov r0,0E6h nop .org 0x081C51B8 // stop sensor from saving sunlight value nop .org 0x081C5034 // skip solar sensor reset nop .org 0x081C5254 // skip solar sensor reset nop .org 0x081C5288 // skip solar sensor reset nop .org 0x0804504A // kill "Solar Sensor is broken" screen b 80450C8h .close
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r9 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0x167e3, %r13 nop add $50210, %rdi movb $0x61, (%r13) nop nop nop nop xor %r12, %r12 lea addresses_WT_ht+0x13dcd, %rsi lea addresses_WT_ht+0x5943, %rdi nop nop nop xor %r9, %r9 mov $41, %rcx rep movsl add $31614, %rsi lea addresses_normal_ht+0x2223, %rsi lea addresses_normal_ht+0x11c73, %rdi nop nop nop nop cmp %r9, %r9 mov $125, %rcx rep movsl nop xor $48901, %rbp lea addresses_UC_ht+0x23e3, %rsi lea addresses_WC_ht+0x1dc23, %rdi nop nop cmp $8849, %rbx mov $23, %rcx rep movsw nop nop nop nop inc %rbp lea addresses_D_ht+0x17e3, %rsi lea addresses_D_ht+0x33e3, %rdi nop nop cmp %r9, %r9 mov $97, %rcx rep movsq xor %rdi, %rdi lea addresses_normal_ht+0xe763, %rcx cmp $9214, %rbp movb $0x61, (%rcx) nop add $49612, %rdi lea addresses_normal_ht+0xa1a3, %rbp nop nop nop inc %r13 movb (%rbp), %r9b and $52132, %rcx lea addresses_WT_ht+0x36e3, %rsi nop nop nop cmp $3945, %rbp mov $0x6162636465666768, %r13 movq %r13, %xmm3 vmovups %ymm3, (%rsi) xor %rsi, %rsi lea addresses_UC_ht+0x1d2e3, %rsi lea addresses_UC_ht+0x5b73, %rdi nop nop nop nop nop and %r13, %r13 mov $12, %rcx rep movsw nop nop cmp %rbp, %rbp lea addresses_WT_ht+0x124e3, %r9 nop cmp %r13, %r13 mov (%r9), %r12d nop nop nop nop cmp %r13, %r13 lea addresses_D_ht+0x191e3, %rsi lea addresses_WC_ht+0x10de3, %rdi clflush (%rsi) nop sub %r12, %r12 mov $61, %rcx rep movsb cmp %rbx, %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r8 push %r9 push %rbx push %rdx // Store lea addresses_normal+0xc677, %rdx nop nop nop sub $8366, %r9 movb $0x51, (%rdx) inc %r15 // Load lea addresses_A+0x2173, %r11 nop nop nop nop and %rbx, %rbx mov (%r11), %r8w cmp %r15, %r15 // Store lea addresses_PSE+0x1a3ab, %r12 nop nop nop sub $28304, %r8 movb $0x51, (%r12) nop and $33984, %r9 // Store lea addresses_D+0x33a3, %rdx nop nop nop mfence mov $0x5152535455565758, %r15 movq %r15, %xmm2 vmovups %ymm2, (%rdx) nop nop nop nop nop xor $17629, %rbx // Store lea addresses_D+0x2afd, %rbx nop nop nop xor $23962, %r12 movb $0x51, (%rbx) nop nop cmp $31544, %r8 // Store lea addresses_WT+0x1c5e3, %r8 nop nop nop add $40826, %rbx mov $0x5152535455565758, %r15 movq %r15, %xmm1 vmovups %ymm1, (%r8) add %r15, %r15 // Faulty Load lea addresses_WT+0x1c5e3, %rdx nop nop nop nop nop xor %r9, %r9 vmovups (%rdx), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $1, %xmm2, %rbx lea oracles, %r9 and $0xff, %rbx shlq $12, %rbx mov (%r9,%rbx,1), %rbx pop %rdx pop %rbx pop %r9 pop %r8 pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_WT', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal', 'same': False, 'size': 1, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_A', 'same': False, 'size': 2, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 1, 'congruent': 2, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 1, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_WT', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 8, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': True}, 'OP': 'REPM'} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
; A183300: Positive integers not of the form 2n^2. ; 1,3,4,5,6,7,9,10,11,12,13,14,15,16,17,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261 mov $1,$0 add $0,1 lpb $0 sub $0,1 trn $0,$2 add $1,1 add $2,4 lpe
[bits 32] global syscall_test syscall_test: mov eax, 0 int 0x80 ret
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/modules/pacing/include/paced_sender.h" #include <assert.h> #include <map> #include <queue> #include <set> #include "webrtc/modules/interface/module_common_types.h" #include "webrtc/modules/pacing/bitrate_prober.h" #include "webrtc/system_wrappers/interface/clock.h" #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" #include "webrtc/system_wrappers/interface/field_trial.h" #include "webrtc/system_wrappers/interface/logging.h" #include "webrtc/system_wrappers/interface/trace_event.h" namespace { // Time limit in milliseconds between packet bursts. const int64_t kMinPacketLimitMs = 5; // Upper cap on process interval, in case process has not been called in a long // time. const int64_t kMaxIntervalTimeMs = 30; } // namespace namespace webrtc { namespace paced_sender { struct Packet { Packet(PacedSender::Priority priority, uint32_t ssrc, uint16_t seq_number, int64_t capture_time_ms, int64_t enqueue_time_ms, size_t length_in_bytes, bool retransmission, uint64_t enqueue_order) : priority(priority), ssrc(ssrc), sequence_number(seq_number), capture_time_ms(capture_time_ms), enqueue_time_ms(enqueue_time_ms), bytes(length_in_bytes), retransmission(retransmission), enqueue_order(enqueue_order) {} PacedSender::Priority priority; uint32_t ssrc; uint16_t sequence_number; int64_t capture_time_ms; int64_t enqueue_time_ms; size_t bytes; bool retransmission; uint64_t enqueue_order; std::list<Packet>::iterator this_it; }; // Used by priority queue to sort packets. struct Comparator { bool operator()(const Packet* first, const Packet* second) { // Highest prio = 0. if (first->priority != second->priority) return first->priority > second->priority; // Retransmissions go first. if (second->retransmission && !first->retransmission) return true; // Older frames have higher prio. if (first->capture_time_ms != second->capture_time_ms) return first->capture_time_ms > second->capture_time_ms; return first->enqueue_order > second->enqueue_order; } }; // Class encapsulating a priority queue with some extensions. class PacketQueue { public: PacketQueue() : bytes_(0) {} virtual ~PacketQueue() {} void Push(const Packet& packet) { if (!AddToDupeSet(packet)) return; // Store packet in list, use pointers in priority queue for cheaper moves. // Packets have a handle to its own iterator in the list, for easy removal // when popping from queue. packet_list_.push_front(packet); std::list<Packet>::iterator it = packet_list_.begin(); it->this_it = it; // Handle for direct removal from list. prio_queue_.push(&(*it)); // Pointer into list. bytes_ += packet.bytes; } const Packet& BeginPop() { const Packet& packet = *prio_queue_.top(); prio_queue_.pop(); return packet; } void CancelPop(const Packet& packet) { prio_queue_.push(&(*packet.this_it)); } void FinalizePop(const Packet& packet) { RemoveFromDupeSet(packet); bytes_ -= packet.bytes; packet_list_.erase(packet.this_it); } bool Empty() const { return prio_queue_.empty(); } size_t SizeInPackets() const { return prio_queue_.size(); } uint64_t SizeInBytes() const { return bytes_; } int64_t OldestEnqueueTime() const { std::list<Packet>::const_reverse_iterator it = packet_list_.rbegin(); if (it == packet_list_.rend()) return 0; return it->enqueue_time_ms; } private: // Try to add a packet to the set of ssrc/seqno identifiers currently in the // queue. Return true if inserted, false if this is a duplicate. bool AddToDupeSet(const Packet& packet) { SsrcSeqNoMap::iterator it = dupe_map_.find(packet.ssrc); if (it == dupe_map_.end()) { // First for this ssrc, just insert. dupe_map_[packet.ssrc].insert(packet.sequence_number); return true; } // Insert returns a pair, where second is a bool set to true if new element. return it->second.insert(packet.sequence_number).second; } void RemoveFromDupeSet(const Packet& packet) { SsrcSeqNoMap::iterator it = dupe_map_.find(packet.ssrc); assert(it != dupe_map_.end()); it->second.erase(packet.sequence_number); if (it->second.empty()) { dupe_map_.erase(it); } } // List of packets, in the order the were enqueued. Since dequeueing may // occur out of order, use list instead of vector. std::list<Packet> packet_list_; // Priority queue of the packets, sorted according to Comparator. // Use pointers into list, to avoid moving whole struct within heap. std::priority_queue<Packet*, std::vector<Packet*>, Comparator> prio_queue_; // Total number of bytes in the queue. uint64_t bytes_; // Map<ssrc, set<seq_no> >, for checking duplicates. typedef std::map<uint32_t, std::set<uint16_t> > SsrcSeqNoMap; SsrcSeqNoMap dupe_map_; }; class IntervalBudget { public: explicit IntervalBudget(int initial_target_rate_kbps) : target_rate_kbps_(initial_target_rate_kbps), bytes_remaining_(0) {} void set_target_rate_kbps(int target_rate_kbps) { target_rate_kbps_ = target_rate_kbps; } void IncreaseBudget(int64_t delta_time_ms) { int64_t bytes = target_rate_kbps_ * delta_time_ms / 8; if (bytes_remaining_ < 0) { // We overused last interval, compensate this interval. bytes_remaining_ = bytes_remaining_ + bytes; } else { // If we underused last interval we can't use it this interval. bytes_remaining_ = bytes; } } void UseBudget(size_t bytes) { bytes_remaining_ = std::max(bytes_remaining_ - static_cast<int>(bytes), -500 * target_rate_kbps_ / 8); } int bytes_remaining() const { return bytes_remaining_; } int target_rate_kbps() const { return target_rate_kbps_; } private: int target_rate_kbps_; int bytes_remaining_; }; } // namespace paced_sender const float PacedSender::kDefaultPaceMultiplier = 2.5f; PacedSender::PacedSender(Clock* clock, Callback* callback, int bitrate_kbps, int max_bitrate_kbps, int min_bitrate_kbps) : clock_(clock), callback_(callback), critsect_(CriticalSectionWrapper::CreateCriticalSection()), enabled_(true), paused_(false), media_budget_(new paced_sender::IntervalBudget(max_bitrate_kbps)), padding_budget_(new paced_sender::IntervalBudget(min_bitrate_kbps)), prober_(new BitrateProber()), bitrate_bps_(1000 * bitrate_kbps), time_last_update_us_(clock->TimeInMicroseconds()), packets_(new paced_sender::PacketQueue()), packet_counter_(0) { UpdateBytesPerInterval(kMinPacketLimitMs); } PacedSender::~PacedSender() {} void PacedSender::Pause() { CriticalSectionScoped cs(critsect_.get()); paused_ = true; } void PacedSender::Resume() { CriticalSectionScoped cs(critsect_.get()); paused_ = false; } void PacedSender::SetStatus(bool enable) { CriticalSectionScoped cs(critsect_.get()); enabled_ = enable; } bool PacedSender::Enabled() const { CriticalSectionScoped cs(critsect_.get()); return enabled_; } void PacedSender::UpdateBitrate(int bitrate_kbps, int max_bitrate_kbps, int min_bitrate_kbps) { CriticalSectionScoped cs(critsect_.get()); media_budget_->set_target_rate_kbps(max_bitrate_kbps); padding_budget_->set_target_rate_kbps(min_bitrate_kbps); bitrate_bps_ = 1000 * bitrate_kbps; } bool PacedSender::SendPacket(Priority priority, uint32_t ssrc, uint16_t sequence_number, int64_t capture_time_ms, size_t bytes, bool retransmission) { CriticalSectionScoped cs(critsect_.get()); if (!enabled_) { return true; // We can send now. } // Enable probing if the probing experiment is enabled. if (!prober_->IsProbing() && ProbingExperimentIsEnabled()) { prober_->SetEnabled(true); } prober_->MaybeInitializeProbe(bitrate_bps_); if (capture_time_ms < 0) { capture_time_ms = clock_->TimeInMilliseconds(); } packets_->Push(paced_sender::Packet( priority, ssrc, sequence_number, capture_time_ms, clock_->TimeInMilliseconds(), bytes, retransmission, packet_counter_++)); return false; } int64_t PacedSender::ExpectedQueueTimeMs() const { CriticalSectionScoped cs(critsect_.get()); int target_rate = media_budget_->target_rate_kbps(); assert(target_rate > 0); return static_cast<int64_t>(packets_->SizeInBytes() * 8 / target_rate); } size_t PacedSender::QueueSizePackets() const { CriticalSectionScoped cs(critsect_.get()); return packets_->SizeInPackets(); } int64_t PacedSender::QueueInMs() const { CriticalSectionScoped cs(critsect_.get()); int64_t oldest_packet = packets_->OldestEnqueueTime(); if (oldest_packet == 0) return 0; return clock_->TimeInMilliseconds() - oldest_packet; } int64_t PacedSender::TimeUntilNextProcess() { CriticalSectionScoped cs(critsect_.get()); if (prober_->IsProbing()) { return prober_->TimeUntilNextProbe(clock_->TimeInMilliseconds()); } int64_t elapsed_time_us = clock_->TimeInMicroseconds() - time_last_update_us_; int64_t elapsed_time_ms = (elapsed_time_us + 500) / 1000; return std::max<int64_t>(kMinPacketLimitMs - elapsed_time_ms, 0); } int32_t PacedSender::Process() { int64_t now_us = clock_->TimeInMicroseconds(); CriticalSectionScoped cs(critsect_.get()); int64_t elapsed_time_ms = (now_us - time_last_update_us_ + 500) / 1000; time_last_update_us_ = now_us; if (!enabled_) { return 0; } if (!paused_) { if (elapsed_time_ms > 0) { int64_t delta_time_ms = std::min(kMaxIntervalTimeMs, elapsed_time_ms); UpdateBytesPerInterval(delta_time_ms); } while (!packets_->Empty()) { if (media_budget_->bytes_remaining() <= 0 && !prober_->IsProbing()) return 0; // Since we need to release the lock in order to send, we first pop the // element from the priority queue but keep it in storage, so that we can // reinsert it if send fails. const paced_sender::Packet& packet = packets_->BeginPop(); if (SendPacket(packet)) { // Send succeeded, remove it from the queue. packets_->FinalizePop(packet); if (prober_->IsProbing()) return 0; } else { // Send failed, put it back into the queue. packets_->CancelPop(packet); return 0; } } int padding_needed = padding_budget_->bytes_remaining(); if (padding_needed > 0) { SendPadding(static_cast<size_t>(padding_needed)); } } return 0; } bool PacedSender::SendPacket(const paced_sender::Packet& packet) { critsect_->Leave(); const bool success = callback_->TimeToSendPacket(packet.ssrc, packet.sequence_number, packet.capture_time_ms, packet.retransmission); critsect_->Enter(); if (success) { // Update media bytes sent. prober_->PacketSent(clock_->TimeInMilliseconds(), packet.bytes); media_budget_->UseBudget(packet.bytes); padding_budget_->UseBudget(packet.bytes); } return success; } void PacedSender::SendPadding(size_t padding_needed) { critsect_->Leave(); size_t bytes_sent = callback_->TimeToSendPadding(padding_needed); critsect_->Enter(); // Update padding bytes sent. media_budget_->UseBudget(bytes_sent); padding_budget_->UseBudget(bytes_sent); } void PacedSender::UpdateBytesPerInterval(int64_t delta_time_ms) { media_budget_->IncreaseBudget(delta_time_ms); padding_budget_->IncreaseBudget(delta_time_ms); } bool PacedSender::ProbingExperimentIsEnabled() const { return webrtc::field_trial::FindFullName("WebRTC-BitrateProbing") == "Enabled"; } } // namespace webrtc
<% from pwnlib.shellcraft.amd64.linux import syscall %> <%page args="name"/> <%docstring> Invokes the syscall uname. See 'man 2 uname' for more information. Arguments: name(utsname): name </%docstring> ${syscall('SYS_uname', name)}
; A140980: Number of (4,2)-noncrossing partitions of [n]. ; Submitted by Jon Maiga ; 1,1,2,5,15,52,202,856,3868,18313,89711,450825,2310453 mov $7,2 lpb $7 sub $0,1 mov $6,$0 sub $7,2 mov $8,2 lpb $8 mov $0,$6 sub $0,1 mov $3,$6 mov $5,$0 sub $8,1 lpb $3 mov $0,$5 sub $3,1 sub $0,$3 mov $2,$0 seq $2,64613 ; Second binomial transform of the Catalan numbers. add $4,$2 mod $6,1 lpe lpe lpe mov $0,$4 add $0,1
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/codepipeline/model/S3Location.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace CodePipeline { namespace Model { S3Location::S3Location() : m_bucketHasBeenSet(false), m_keyHasBeenSet(false) { } S3Location::S3Location(JsonView jsonValue) : m_bucketHasBeenSet(false), m_keyHasBeenSet(false) { *this = jsonValue; } S3Location& S3Location::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("bucket")) { m_bucket = jsonValue.GetString("bucket"); m_bucketHasBeenSet = true; } if(jsonValue.ValueExists("key")) { m_key = jsonValue.GetString("key"); m_keyHasBeenSet = true; } return *this; } JsonValue S3Location::Jsonize() const { JsonValue payload; if(m_bucketHasBeenSet) { payload.WithString("bucket", m_bucket); } if(m_keyHasBeenSet) { payload.WithString("key", m_key); } return payload; } } // namespace Model } // namespace CodePipeline } // namespace Aws
;------------------------------------------------------------------------------ ;* ;* Copyright 2006 - 2007, Intel Corporation ;* All rights reserved. This program and the accompanying materials ;* are licensed and made available under the terms and conditions of the BSD License ;* which accompanies this distribution. The full text of the license may be found at ;* http://opensource.org/licenses/bsd-license.php ;* ;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ;* ;* gpt.asm ;* ;* Abstract: ;* ;------------------------------------------------------------------------------ .model small ; .dosseg .stack .486p .code BLOCK_SIZE EQU 0200h BLOCK_MASK EQU 01ffh BLOCK_SHIFT EQU 9 ; **************************************************************************** ; Code loaded by BIOS at 0x0000:0x7C00 ; **************************************************************************** org 0h Start: ; **************************************************************************** ; Start Print ; **************************************************************************** mov ax,0b800h mov es,ax mov ax, 07c0h mov ds, ax lea si, cs:[StartString] mov cx, 10 mov di, 160 rep movsw ; **************************************************************************** ; Print over ; **************************************************************************** ; **************************************************************************** ; Initialize segment registers and copy code at 0x0000:0x7c00 to 0x0000:0x0600 ; **************************************************************************** xor ax, ax ; AX = 0x0000 mov bx, 07c00h ; BX = 0x7C00 mov bp, 0600h ; BP = 0x0600 mov si, OFFSET RelocatedStart ; SI = Offset(RelocatedStart) mov cx, 0200h ; CX = 0x0200 sub cx, si ; CS = 0x0200 - Offset(RelocatedStart) lea di, [bp+si] ; DI = 0x0600 + Offset(RelocatedStart) lea si, [bx+si] ; BX = 0x7C00 + Offset(RelocatedStart) mov ss, ax ; SS = 0x0000 mov sp, bx ; SP = 0x7C00 mov es,ax ; ES = 0x0000 mov ds,ax ; DS = 0x0000 push ax ; PUSH 0x0000 push di ; PUSH 0x0600 + Offset(RelocatedStart) cld ; Clear the direction flag rep movsb ; Copy 0x0200 bytes from 0x7C00 to 0x0600 retf ; JMP 0x0000:0x0600 + Offset(RelocatedStart) ; **************************************************************************** ; Code relocated to 0x0000:0x0600 ; **************************************************************************** RelocatedStart: ; **************************************************************************** ; Get Driver Parameters to 0x0000:0x7BFC ; **************************************************************************** xor ax,ax ; ax = 0 mov ss,ax ; ss = 0 add ax,1000h mov ds,ax mov sp,07c00h ; sp = 0x7c00 mov bp,sp ; bp = 0x7c00 mov ah,8 ; ah = 8 - Get Drive Parameters Function mov byte ptr [bp+PhysicalDrive],dl ; BBS defines that BIOS would pass the booting driver number to the loader through DL int 13h ; Get Drive Parameters xor ax,ax ; ax = 0 mov al,dh ; al = dh inc al ; MaxHead = al + 1 push ax ; 0000:7bfe = MaxHead mov al,cl ; al = cl and al,03fh ; MaxSector = al & 0x3f push ax ; 0000:7bfc = MaxSector ; **************************************************************************** ; Read GPT Header from hard disk to 0x0000:0x0800 ; **************************************************************************** xor ax, ax mov es, ax ; Read to 0x0000:0x0800 mov di, 0800h ; Read to 0x0000:0x0800 mov eax, 1 ; Read LBA #1 mov edx, 0 ; Read LBA #1 mov bx, 1 ; Read 1 Block push es call ReadBlocks pop es ; **************************************************************************** ; Read Target GPT Entry from hard disk to 0x0000:0x0A00 ; **************************************************************************** cmp dword ptr es:[di], 020494645h ; Check for "EFI " jne BadGpt cmp dword ptr es:[di + 4], 054524150h ; Check for "PART" jne BadGpt cmp dword ptr es:[di + 8], 000010000h ; Check Revision - 0x10000 jne BadGpt mov eax, dword ptr es:[di + 84] ; EAX = SizeOfPartitionEntry mul byte ptr [bp+GptPartitionIndicator] ; EAX = SizeOfPartitionEntry * GptPartitionIndicator mov edx, eax ; EDX = SizeOfPartitionEntry * GptPartitionIndicator shr eax, BLOCK_SHIFT ; EAX = (SizeOfPartitionEntry * GptPartitionIndicator) / BLOCK_SIZE and edx, BLOCK_MASK ; EDX = Targer PartitionEntryLBA Offset ; = (SizeOfPartitionEntry * GptPartitionIndicator) % BLOCK_SIZE push edx mov ecx, dword ptr es:[di + 72] ; ECX = PartitionEntryLBA (Low) mov ebx, dword ptr es:[di + 76] ; EBX = PartitionEntryLBA (High) add eax, ecx ; EAX = Target PartitionEntryLBA (Low) ; = (PartitionEntryLBA + ; (SizeOfPartitionEntry * GptPartitionIndicator) / BLOCK_SIZE) adc edx, ebx ; EDX = Target PartitionEntryLBA (High) mov di, 0A00h ; Read to 0x0000:0x0A00 mov bx, 1 ; Read 1 Block push es call ReadBlocks pop es ; **************************************************************************** ; Read Target DBR from hard disk to 0x0000:0x7C00 ; **************************************************************************** pop edx ; EDX = (SizeOfPartitionEntry * GptPartitionIndicator) % BLOCK_SIZE add di, dx ; DI = Targer PartitionEntryLBA Offset cmp dword ptr es:[di], 0C12A7328h ; Check for EFI System Partition "C12A7328-F81F-11d2-BA4B-00A0C93EC93B" jne BadGpt cmp dword ptr es:[di + 4], 011d2F81Fh ; jne BadGpt cmp dword ptr es:[di + 8], 0A0004BBAh ; jne BadGpt cmp dword ptr es:[di + 0ch], 03BC93EC9h ; jne BadGpt mov eax, dword ptr es:[di + 32] ; EAX = StartingLBA (Low) mov edx, dword ptr es:[di + 36] ; EDX = StartingLBA (High) mov di, 07C00h ; Read to 0x0000:0x7C00 mov bx, 1 ; Read 1 Block call ReadBlocks ; **************************************************************************** ; Transfer control to BootSector - Jump to 0x0000:0x7C00 ; **************************************************************************** xor ax, ax push ax ; PUSH 0x0000 mov di, 07c00h push di ; PUSH 0x7C00 retf ; JMP 0x0000:0x7C00 ; **************************************************************************** ; ReadBlocks - Reads a set of blocks from a block device ; ; EDX:EAX = Start LBA ; BX = Number of Blocks to Read (must < 127) ; ES:DI = Buffer to store sectors read from disk ; **************************************************************************** ; si = DiskAddressPacket ReadBlocks: pushad push ds xor cx, cx mov ds, cx mov bp, 0600h ; bp = 0x600 lea si, [bp + OFFSET AddressPacket] ; DS:SI = Disk Address Packet mov BYTE PTR ds:[si+2],bl ; 02 = Number Of Block transfered mov WORD PTR ds:[si+4],di ; 04 = Transfer Buffer Offset mov WORD PTR ds:[si+6],es ; 06 = Transfer Buffer Segment mov DWORD PTR ds:[si+8],eax ; 08 = Starting LBA (Low) mov DWORD PTR ds:[si+0ch],edx ; 0C = Starting LBA (High) mov ah, 42h ; ah = Function 42 mov dl,byte ptr [bp+PhysicalDrive] ; dl = Drive Number int 13h jc BadGpt pop ds popad ret ; **************************************************************************** ; Address Packet used by ReadBlocks ; **************************************************************************** AddressPacket: db 10h ; Size of address packet db 00h ; Reserved. Must be 0 db 01h ; Read blocks at a time (To be fixed each times) db 00h ; Reserved. Must be 0 dw 0000h ; Destination Address offset (To be fixed each times) dw 0000h ; Destination Address segment (To be fixed each times) AddressPacketLba: dd 0h, 0h ; Start LBA (To be fixed each times) AddressPacketEnd: ; **************************************************************************** ; ERROR Condition: ; **************************************************************************** BadGpt: mov ax,0b800h mov es,ax mov ax, 060h mov ds, ax lea si, cs:[ErrorString] mov cx, 10 mov di, 320 rep movsw Halt: jmp Halt StartString: db 'G', 0ch, 'P', 0ch, 'T', 0ch, ' ', 0ch, 'S', 0ch, 't', 0ch, 'a', 0ch, 'r', 0ch, 't', 0ch, '!', 0ch ErrorString: db 'G', 0ch, 'P', 0ch, 'T', 0ch, ' ', 0ch, 'E', 0ch, 'r', 0ch, 'r', 0ch, 'o', 0ch, 'r', 0ch, '!', 0ch ; **************************************************************************** ; PhysicalDrive - Used to indicate which disk to be boot ; Can be patched by tool ; **************************************************************************** org 01B6h PhysicalDrive db 80h ; **************************************************************************** ; GptPartitionIndicator - Used to indicate which GPT partition to be boot ; Can be patched by tool ; **************************************************************************** org 01B7h GptPartitionIndicator db 0 ; **************************************************************************** ; Unique MBR signature ; **************************************************************************** org 01B8h db 'DUET' ; **************************************************************************** ; Unknown ; **************************************************************************** org 01BCh dw 0 ; **************************************************************************** ; PMBR Entry - Can be patched by tool ; **************************************************************************** org 01BEh db 0 ; Boot Indicator db 0ffh ; Start Header db 0ffh ; Start Sector db 0ffh ; Start Track db 0eeh ; OS Type db 0ffh ; End Header db 0ffh ; End Sector db 0ffh ; End Track dd 1 ; Starting LBA dd 0FFFFFFFFh ; End LBA org 01CEh dd 0, 0, 0, 0 org 01DEh dd 0, 0, 0, 0 org 01EEh dd 0, 0, 0, 0 ; **************************************************************************** ; Sector Signature ; **************************************************************************** org 01FEh SectorSignature: dw 0aa55h ; Boot Sector Signature end
; A169293: Number of reduced words of length n in Coxeter group on 40 generators S_i with relations (S_i)^2 = (S_i S_j)^29 = I. ; 1,40,1560,60840,2372760,92537640,3608967960,140749750440,5489240267160,214080370419240,8349134446350360,325616243407664040,12699033492898897560,495262306223057004840,19315229942699223188760 add $0,1 mov $3,1 lpb $0 sub $0,1 add $2,$3 div $3,$2 mul $2,39 lpe mov $0,$2 div $0,39
ori $1, $0, 10 ori $2, $0, 9 ori $3, $0, 6 ori $4, $0, 11 sw $3, 0($0) sw $3, 4($0) sw $3, 8($0) sw $2, 12($0) sw $2, 16($0) sw $3, 20($0) sw $3, 24($0) sw $4, 28($0) sw $2, 32($0) sw $1, 36($0) sw $1, 40($0) sw $2, 44($0) sw $2, 48($0) sw $3, 52($0) sw $3, 56($0) sw $4, 60($0) sw $1, 64($0) sw $2, 68($0) sw $1, 72($0) sw $3, 76($0) sw $4, 80($0) sw $3, 84($0) sw $1, 88($0) sw $2, 92($0) sw $2, 96($0) sw $3, 100($0) sw $1, 104($0) sw $2, 108($0) sw $3, 112($0) sw $1, 116($0) sw $4, 120($0) sw $4, 124($0) sll $1, $2, 12 mflo $3 divu $3, $1 ori $2, $2, 1 TAG1: lui $2, 13 mthi $2 mtlo $2 bgtz $2, TAG2 TAG2: mfhi $1 sll $0, $0, 0 multu $1, $1 div $2, $1 TAG3: multu $1, $1 mthi $1 beq $1, $1, TAG4 sll $0, $0, 0 TAG4: sll $0, $0, 0 multu $1, $3 sltiu $1, $3, 3 or $2, $3, $1 TAG5: mfhi $3 lb $2, 0($2) bltz $3, TAG6 sh $2, 0($2) TAG6: addu $2, $2, $2 mthi $2 mflo $4 mfhi $2 TAG7: slt $3, $2, $2 add $3, $3, $2 lui $2, 13 beq $2, $3, TAG8 TAG8: sll $0, $0, 0 sll $0, $0, 0 bltz $2, TAG9 mtlo $2 TAG9: sb $1, 0($1) div $1, $1 bltz $1, TAG10 lui $3, 13 TAG10: multu $3, $3 mfhi $3 beq $3, $3, TAG11 sb $3, -169($3) TAG11: div $3, $3 sb $3, -169($3) lui $4, 13 addiu $2, $3, 13 TAG12: subu $3, $2, $2 blez $2, TAG13 sw $2, -182($2) mtlo $3 TAG13: mfhi $4 multu $4, $3 mfhi $2 mfhi $2 TAG14: sra $4, $2, 5 sb $4, 0($4) bne $4, $2, TAG15 multu $4, $4 TAG15: bltz $4, TAG16 srl $3, $4, 10 mflo $1 lui $3, 4 TAG16: sll $0, $0, 0 mthi $3 srl $3, $3, 14 sb $3, 0($3) TAG17: mult $3, $3 lhu $3, 0($3) sltiu $3, $3, 2 multu $3, $3 TAG18: beq $3, $3, TAG19 addiu $4, $3, 14 lui $3, 13 divu $4, $3 TAG19: lui $3, 2 mflo $4 mthi $4 sll $0, $0, 0 TAG20: bne $4, $4, TAG21 lui $4, 12 lui $3, 15 lui $2, 0 TAG21: ori $2, $2, 15 mthi $2 beq $2, $2, TAG22 mflo $1 TAG22: lh $1, 0($1) lbu $4, 0($1) mfhi $1 mtlo $1 TAG23: blez $1, TAG24 slti $3, $1, 0 mthi $1 lui $2, 7 TAG24: bltz $2, TAG25 mfhi $3 sll $0, $0, 0 sllv $3, $2, $3 TAG25: sll $0, $0, 0 lui $4, 12 sll $0, $0, 0 mfhi $3 TAG26: bltz $3, TAG27 addu $1, $3, $3 ori $1, $3, 11 lb $4, 0($1) TAG27: srl $1, $4, 9 mfhi $3 sb $4, 0($3) sw $4, 0($1) TAG28: or $1, $3, $3 sb $3, 0($1) mthi $1 mtlo $3 TAG29: mthi $1 mflo $4 beq $4, $1, TAG30 sb $4, 0($1) TAG30: mthi $4 andi $2, $4, 13 beq $4, $4, TAG31 sb $2, 0($4) TAG31: bgtz $2, TAG32 lb $3, 0($2) sw $3, 0($2) add $2, $2, $3 TAG32: bgez $2, TAG33 mfhi $2 mthi $2 lui $4, 10 TAG33: lbu $2, 0($4) beq $2, $2, TAG34 lb $4, 0($2) mthi $4 TAG34: ori $2, $4, 15 lhu $1, 0($4) mtlo $1 sllv $3, $1, $1 TAG35: sb $3, 0($3) lui $2, 3 mflo $1 lh $1, 0($3) TAG36: mfhi $3 mfhi $2 beq $1, $1, TAG37 sb $2, 0($3) TAG37: sb $2, 0($2) sb $2, 0($2) sb $2, 0($2) xori $2, $2, 12 TAG38: lb $4, 0($2) divu $2, $2 divu $2, $2 lui $3, 8 TAG39: beq $3, $3, TAG40 mflo $3 lui $2, 15 lui $2, 0 TAG40: multu $2, $2 mthi $2 lbu $1, 0($2) beq $1, $1, TAG41 TAG41: multu $1, $1 beq $1, $1, TAG42 and $3, $1, $1 sltu $2, $3, $1 TAG42: beq $2, $2, TAG43 lb $3, 0($2) sub $2, $2, $2 nor $4, $2, $3 TAG43: mtlo $4 sb $4, 0($4) slti $1, $4, 14 beq $4, $4, TAG44 TAG44: sltu $3, $1, $1 mflo $1 mthi $3 mult $1, $1 TAG45: lui $1, 12 bgez $1, TAG46 sra $2, $1, 1 xori $2, $1, 15 TAG46: sll $0, $0, 0 slti $1, $2, 5 sll $0, $0, 0 mthi $1 TAG47: srlv $2, $3, $3 subu $1, $3, $2 subu $1, $3, $3 bltz $2, TAG48 TAG48: mflo $1 sw $1, 0($1) lw $4, 0($1) lui $4, 11 TAG49: sll $0, $0, 0 blez $4, TAG50 mflo $4 mflo $1 TAG50: slti $2, $1, 13 mtlo $2 mthi $1 div $1, $2 TAG51: bltz $2, TAG52 lb $1, 0($2) mflo $2 mult $2, $2 TAG52: mfhi $3 lh $4, 0($3) beq $4, $3, TAG53 sw $3, 0($3) TAG53: mthi $4 lui $3, 2 lui $2, 4 lui $4, 3 TAG54: sll $0, $0, 0 bne $4, $4, TAG55 mthi $4 mflo $2 TAG55: lui $2, 6 bgez $2, TAG56 mthi $2 xor $2, $2, $2 TAG56: mthi $2 mtlo $2 bltz $2, TAG57 sll $0, $0, 0 TAG57: bne $2, $2, TAG58 sll $0, $0, 0 lui $2, 10 sll $0, $0, 0 TAG58: sra $3, $2, 3 slti $2, $3, 13 sll $0, $0, 0 lui $3, 10 TAG59: mthi $3 srav $4, $3, $3 lui $3, 3 sll $0, $0, 0 TAG60: sll $0, $0, 0 bltz $3, TAG61 sltiu $1, $1, 5 lui $2, 13 TAG61: sll $0, $0, 0 mflo $3 sltiu $3, $2, 6 mthi $2 TAG62: bne $3, $3, TAG63 lui $1, 1 addu $1, $1, $1 sll $0, $0, 0 TAG63: sw $3, 0($3) beq $3, $3, TAG64 or $3, $3, $3 lb $4, 0($3) TAG64: beq $4, $4, TAG65 mthi $4 lui $3, 4 nor $3, $4, $4 TAG65: mfhi $4 mult $3, $4 mtlo $4 multu $3, $4 TAG66: bne $4, $4, TAG67 lui $2, 2 mfhi $4 and $1, $4, $4 TAG67: multu $1, $1 mflo $3 beq $3, $3, TAG68 mult $1, $1 TAG68: sh $3, 0($3) multu $3, $3 beq $3, $3, TAG69 lui $3, 0 TAG69: lb $3, 0($3) mthi $3 sw $3, 0($3) addi $3, $3, 11 TAG70: mfhi $1 beq $3, $1, TAG71 mflo $1 div $1, $3 TAG71: sll $2, $1, 4 andi $4, $1, 7 lui $2, 2 multu $2, $1 TAG72: mtlo $2 sll $0, $0, 0 lui $2, 7 sll $0, $0, 0 TAG73: lui $1, 3 lui $2, 5 div $2, $2 mflo $4 TAG74: div $4, $4 sll $1, $4, 5 mult $4, $4 bgtz $1, TAG75 TAG75: multu $1, $1 lhu $4, 0($1) beq $4, $4, TAG76 divu $4, $4 TAG76: xori $4, $4, 12 sb $4, 0($4) sb $4, 0($4) mfhi $4 TAG77: lui $2, 7 mult $2, $4 sltu $4, $4, $4 sll $0, $0, 0 TAG78: nor $3, $4, $4 mfhi $3 lui $1, 15 sw $3, 0($3) TAG79: bne $1, $1, TAG80 sll $0, $0, 0 bne $1, $1, TAG80 div $1, $1 TAG80: sll $0, $0, 0 mflo $1 sb $1, 0($1) beq $1, $1, TAG81 TAG81: mfhi $1 mult $1, $1 sltiu $4, $1, 8 mflo $2 TAG82: mthi $2 srav $1, $2, $2 sllv $1, $1, $2 sub $1, $1, $2 TAG83: lui $3, 10 beq $1, $1, TAG84 sll $0, $0, 0 add $3, $1, $3 TAG84: beq $3, $3, TAG85 lui $3, 12 mflo $2 bgez $2, TAG85 TAG85: sra $2, $2, 7 beq $2, $2, TAG86 sllv $2, $2, $2 lui $2, 5 TAG86: sll $4, $2, 10 lui $1, 5 divu $1, $1 lh $2, 0($4) TAG87: mflo $3 srav $4, $2, $3 nor $1, $4, $2 mflo $4 TAG88: mfhi $3 bgtz $4, TAG89 mfhi $2 lui $4, 2 TAG89: bgtz $4, TAG90 addiu $1, $4, 9 multu $1, $4 beq $4, $1, TAG90 TAG90: mthi $1 bne $1, $1, TAG91 xori $3, $1, 10 multu $3, $3 TAG91: mthi $3 sltiu $2, $3, 8 sb $3, 0($2) subu $4, $3, $2 TAG92: and $4, $4, $4 mfhi $1 sltiu $4, $4, 6 mfhi $3 TAG93: lui $2, 10 sh $3, 0($3) beq $2, $2, TAG94 lui $3, 1 TAG94: sll $0, $0, 0 sll $0, $0, 0 lui $4, 9 beq $4, $4, TAG95 TAG95: sll $0, $0, 0 andi $2, $4, 10 sltu $3, $2, $2 addi $4, $2, 9 TAG96: lui $3, 14 mfhi $1 bne $1, $4, TAG97 lui $2, 4 TAG97: multu $2, $2 bltz $2, TAG98 mult $2, $2 mthi $2 TAG98: lui $4, 4 srav $3, $4, $4 sll $2, $2, 5 blez $4, TAG99 TAG99: sll $0, $0, 0 mfhi $2 sll $0, $0, 0 mflo $4 TAG100: sw $4, 0($4) beq $4, $4, TAG101 mfhi $1 slt $2, $4, $4 TAG101: lui $4, 12 blez $2, TAG102 ori $2, $4, 9 blez $4, TAG102 TAG102: and $3, $2, $2 mtlo $2 and $2, $2, $3 subu $3, $3, $2 TAG103: sra $4, $3, 5 lui $3, 5 slti $2, $3, 2 sh $3, 0($4) TAG104: bgtz $2, TAG105 sll $1, $2, 15 mflo $1 bne $2, $2, TAG105 TAG105: sltiu $3, $1, 4 mflo $2 lui $4, 9 mtlo $4 TAG106: bne $4, $4, TAG107 multu $4, $4 sll $0, $0, 0 bgtz $4, TAG107 TAG107: sll $0, $0, 0 sll $0, $0, 0 bne $4, $4, TAG108 mthi $4 TAG108: mtlo $4 sll $0, $0, 0 addu $4, $4, $4 sll $0, $0, 0 TAG109: sw $3, 0($3) bne $3, $3, TAG110 mthi $3 blez $3, TAG110 TAG110: lui $1, 7 andi $1, $1, 1 multu $1, $3 lui $3, 13 TAG111: sll $0, $0, 0 sll $0, $0, 0 bne $3, $3, TAG112 mflo $3 TAG112: mthi $3 bne $3, $3, TAG113 mthi $3 bltz $3, TAG113 TAG113: lui $4, 15 subu $1, $4, $4 bgez $1, TAG114 sll $0, $0, 0 TAG114: sub $2, $1, $1 lbu $4, 0($1) multu $2, $1 beq $1, $2, TAG115 TAG115: lbu $3, 0($4) sra $3, $3, 6 sb $3, 0($3) sll $3, $3, 9 TAG116: addi $1, $3, 0 lui $1, 14 sll $0, $0, 0 blez $1, TAG117 TAG117: mult $4, $4 lui $4, 2 addiu $1, $4, 9 sll $0, $0, 0 TAG118: mfhi $2 mtlo $4 mthi $4 subu $3, $2, $4 TAG119: addu $3, $3, $3 mtlo $3 mult $3, $3 mtlo $3 TAG120: mfhi $3 beq $3, $3, TAG121 lb $4, 0($3) bgtz $3, TAG121 TAG121: multu $4, $4 sh $4, 0($4) nor $3, $4, $4 lui $4, 2 TAG122: lui $2, 9 lui $1, 1 addiu $3, $2, 14 addiu $4, $2, 14 TAG123: sltu $4, $4, $4 mflo $4 sw $4, -256($4) mflo $4 TAG124: or $3, $4, $4 beq $3, $3, TAG125 multu $4, $3 addi $4, $4, 0 TAG125: mflo $2 mtlo $2 subu $1, $4, $4 bltz $4, TAG126 TAG126: sb $1, 0($1) lhu $4, 0($1) beq $1, $1, TAG127 subu $4, $4, $4 TAG127: sw $4, 0($4) srl $1, $4, 3 multu $1, $1 bgez $4, TAG128 TAG128: lui $2, 11 mult $1, $1 mfhi $3 beq $2, $2, TAG129 TAG129: lui $1, 9 divu $1, $1 lbu $4, 0($3) lui $2, 14 TAG130: sll $0, $0, 0 bne $2, $2, TAG131 lui $1, 7 lui $3, 6 TAG131: multu $3, $3 sll $0, $0, 0 bne $2, $2, TAG132 nor $3, $2, $2 TAG132: sll $0, $0, 0 mtlo $3 mthi $3 subu $4, $3, $3 TAG133: sub $4, $4, $4 sh $4, 0($4) sltiu $1, $4, 8 multu $1, $4 TAG134: mtlo $1 bltz $1, TAG135 multu $1, $1 bltz $1, TAG135 TAG135: mthi $1 divu $1, $1 mfhi $3 addu $4, $1, $1 TAG136: sllv $4, $4, $4 bltz $4, TAG137 lbu $4, 0($4) mflo $2 TAG137: sltiu $2, $2, 4 mtlo $2 bltz $2, TAG138 mthi $2 TAG138: lui $3, 2 bltz $3, TAG139 mflo $1 srl $2, $3, 6 TAG139: sb $2, -2048($2) lui $4, 9 sll $0, $0, 0 mtlo $1 TAG140: xori $4, $1, 9 addiu $1, $1, 10 bne $4, $1, TAG141 sh $4, 0($4) TAG141: mult $1, $1 mthi $1 mtlo $1 mthi $1 TAG142: sb $1, 0($1) multu $1, $1 lui $1, 4 subu $4, $1, $1 TAG143: xor $4, $4, $4 lui $2, 3 or $2, $4, $4 lui $2, 12 TAG144: sll $0, $0, 0 sll $0, $0, 0 slti $1, $2, 8 mtlo $1 TAG145: sb $1, 0($1) bgez $1, TAG146 sh $1, 0($1) mtlo $1 TAG146: sw $1, 0($1) bgez $1, TAG147 sllv $1, $1, $1 bltz $1, TAG147 TAG147: lui $2, 2 sb $2, 0($1) sll $0, $0, 0 lui $3, 1 TAG148: blez $3, TAG149 sll $0, $0, 0 lbu $2, 0($4) multu $2, $4 TAG149: bne $2, $2, TAG150 xor $4, $2, $2 add $4, $2, $4 lhu $1, 0($4) TAG150: sb $1, 0($1) sh $1, 0($1) blez $1, TAG151 mult $1, $1 TAG151: bgez $1, TAG152 sw $1, 0($1) bltz $1, TAG152 divu $1, $1 TAG152: sh $1, 0($1) bgtz $1, TAG153 mult $1, $1 sb $1, 0($1) TAG153: beq $1, $1, TAG154 slti $4, $1, 9 mfhi $4 mtlo $1 TAG154: blez $4, TAG155 mult $4, $4 lb $4, 0($4) mtlo $4 TAG155: mtlo $4 bgtz $4, TAG156 sltiu $1, $4, 9 lui $4, 3 TAG156: andi $1, $4, 1 bgez $4, TAG157 sh $4, 0($1) ori $4, $1, 2 TAG157: sll $0, $0, 0 sll $0, $0, 0 lbu $2, 0($1) lw $4, 0($1) TAG158: sllv $1, $4, $4 bgtz $1, TAG159 lui $3, 4 div $1, $3 TAG159: sll $0, $0, 0 mthi $3 sll $0, $0, 0 mfhi $3 TAG160: bltz $3, TAG161 mflo $1 mthi $3 addi $1, $1, 5 TAG161: mtlo $1 blez $1, TAG162 lb $2, 0($1) mthi $2 TAG162: srav $1, $2, $2 mthi $2 mthi $1 lbu $3, 0($2) TAG163: bltz $3, TAG164 mflo $1 mfhi $4 beq $1, $1, TAG164 TAG164: lw $3, 0($4) sltiu $4, $4, 8 srlv $2, $3, $3 sb $2, 0($4) TAG165: sub $1, $2, $2 bne $1, $2, TAG166 lb $1, 0($1) lui $2, 0 TAG166: mthi $2 add $2, $2, $2 multu $2, $2 sb $2, 0($2) TAG167: lhu $2, 0($2) mfhi $1 sra $2, $2, 8 multu $1, $2 TAG168: srlv $3, $2, $2 mtlo $3 bltz $2, TAG169 mtlo $3 TAG169: sb $3, 0($3) mtlo $3 mflo $1 sll $1, $1, 12 TAG170: multu $1, $1 lh $3, 0($1) mult $1, $1 bgtz $1, TAG171 TAG171: mthi $3 blez $3, TAG172 mtlo $3 addu $1, $3, $3 TAG172: sh $1, 0($1) lhu $2, 0($1) nor $1, $2, $2 blez $1, TAG173 TAG173: mtlo $1 sltu $4, $1, $1 lw $4, 0($4) nor $1, $1, $4 TAG174: lui $4, 8 bgtz $1, TAG175 addi $4, $1, 5 beq $4, $4, TAG175 TAG175: div $4, $4 blez $4, TAG176 multu $4, $4 blez $4, TAG176 TAG176: sb $4, 0($4) subu $2, $4, $4 lui $1, 1 lbu $4, 0($4) TAG177: divu $4, $4 bgtz $4, TAG178 andi $4, $4, 11 sh $4, 0($4) TAG178: mthi $4 ori $2, $4, 15 mflo $1 lui $2, 1 TAG179: lui $1, 8 subu $2, $1, $2 mflo $3 blez $3, TAG180 TAG180: mfhi $2 bgtz $3, TAG181 lb $1, 0($2) mtlo $2 TAG181: bgez $1, TAG182 sra $3, $1, 12 lw $3, 0($3) addi $4, $3, 14 TAG182: lui $3, 13 mfhi $3 mflo $3 mflo $2 TAG183: multu $2, $2 bgtz $2, TAG184 subu $3, $2, $2 bne $3, $2, TAG184 TAG184: mult $3, $3 beq $3, $3, TAG185 multu $3, $3 ori $1, $3, 14 TAG185: lui $4, 7 mfhi $1 mtlo $1 mthi $1 TAG186: sltiu $4, $1, 10 lw $2, 0($1) mtlo $2 lhu $2, 0($1) TAG187: mult $2, $2 mflo $3 mthi $2 sw $2, 0($3) TAG188: multu $3, $3 and $3, $3, $3 mult $3, $3 mtlo $3 TAG189: mfhi $3 bltz $3, TAG190 sub $2, $3, $3 addu $2, $3, $3 TAG190: lh $2, 0($2) lhu $2, 0($2) addiu $1, $2, 13 multu $2, $2 TAG191: addu $1, $1, $1 xori $3, $1, 11 sra $3, $1, 7 sltu $1, $3, $1 TAG192: mtlo $1 multu $1, $1 bne $1, $1, TAG193 subu $3, $1, $1 TAG193: lui $4, 13 sll $0, $0, 0 mfhi $1 bne $3, $4, TAG194 TAG194: sh $1, 0($1) blez $1, TAG195 addi $4, $1, 7 sb $1, 0($1) TAG195: or $1, $4, $4 bgez $1, TAG196 sra $2, $4, 3 mtlo $1 TAG196: lw $2, 0($2) sb $2, 0($2) mfhi $4 mthi $4 TAG197: lui $1, 14 srl $1, $1, 6 bltz $1, TAG198 lui $2, 4 TAG198: divu $2, $2 subu $1, $2, $2 bne $1, $1, TAG199 sltiu $3, $2, 13 TAG199: sll $4, $3, 2 beq $3, $3, TAG200 sh $3, 0($3) xor $4, $3, $4 TAG200: addi $4, $4, 7 mult $4, $4 mtlo $4 mfhi $4 TAG201: mflo $2 mflo $2 blez $4, TAG202 multu $2, $4 TAG202: lb $2, 0($2) beq $2, $2, TAG203 mtlo $2 mult $2, $2 TAG203: mthi $2 mult $2, $2 bgtz $2, TAG204 mult $2, $2 TAG204: lui $3, 11 slti $3, $2, 2 addiu $2, $3, 6 mtlo $2 TAG205: xori $4, $2, 11 xori $4, $2, 9 srlv $2, $4, $4 lbu $3, 0($4) TAG206: add $2, $3, $3 sw $3, 0($2) bltz $3, TAG207 lb $3, 0($2) TAG207: sw $3, 0($3) multu $3, $3 lui $1, 0 sra $4, $1, 7 TAG208: blez $4, TAG209 mflo $1 bltz $4, TAG209 lhu $1, 0($4) TAG209: bne $1, $1, TAG210 lui $4, 2 mflo $3 mflo $1 TAG210: sw $1, 0($1) beq $1, $1, TAG211 multu $1, $1 sh $1, 0($1) TAG211: sw $1, 0($1) lui $2, 14 sll $0, $0, 0 blez $2, TAG212 TAG212: mfhi $1 bne $2, $1, TAG213 sltu $4, $1, $2 sh $4, 0($4) TAG213: div $4, $4 mflo $2 bne $4, $2, TAG214 mfhi $4 TAG214: mtlo $4 multu $4, $4 blez $4, TAG215 mflo $2 TAG215: lui $4, 10 sll $0, $0, 0 lui $1, 4 lui $1, 14 TAG216: sllv $2, $1, $1 mtlo $2 lui $1, 4 sra $3, $1, 15 TAG217: mtlo $3 mfhi $3 slt $1, $3, $3 lbu $4, 0($3) TAG218: sh $4, 0($4) lui $3, 1 mtlo $3 sll $0, $0, 0 TAG219: mfhi $2 multu $2, $2 mthi $3 bne $3, $2, TAG220 TAG220: mult $2, $2 bne $2, $2, TAG221 lbu $2, 0($2) xori $4, $2, 4 TAG221: mthi $4 mult $4, $4 lui $2, 15 sb $4, 0($4) TAG222: mflo $1 multu $1, $1 slt $2, $2, $2 mflo $4 TAG223: sltiu $4, $4, 14 multu $4, $4 lui $4, 11 mfhi $3 TAG224: beq $3, $3, TAG225 lhu $4, 0($3) mult $3, $4 blez $4, TAG225 TAG225: mtlo $4 sll $2, $4, 9 ori $3, $2, 3 beq $4, $3, TAG226 TAG226: sb $3, 0($3) bltz $3, TAG227 mthi $3 sb $3, 0($3) TAG227: lb $2, 0($3) bltz $2, TAG228 addiu $4, $3, 11 sb $4, 0($2) TAG228: bne $4, $4, TAG229 mfhi $4 xor $2, $4, $4 lui $4, 12 TAG229: mtlo $4 sll $0, $0, 0 xor $3, $4, $4 mult $3, $2 TAG230: lui $1, 7 bgez $3, TAG231 sll $0, $0, 0 divu $1, $3 TAG231: and $1, $1, $1 sll $0, $0, 0 divu $1, $1 sll $0, $0, 0 TAG232: addiu $2, $2, 7 mflo $3 sb $2, 0($2) sltiu $1, $2, 2 TAG233: blez $1, TAG234 lui $3, 6 beq $3, $3, TAG234 lw $1, 0($3) TAG234: ori $3, $1, 12 slt $2, $3, $1 beq $3, $1, TAG235 lh $4, 0($2) TAG235: lui $3, 9 sll $0, $0, 0 lb $1, 0($4) lui $3, 4 TAG236: mthi $3 xor $2, $3, $3 bgez $3, TAG237 mfhi $3 TAG237: bgez $3, TAG238 sra $1, $3, 5 blez $3, TAG238 addu $2, $1, $3 TAG238: sb $2, 0($2) mfhi $1 mthi $2 sb $2, 0($2) TAG239: addiu $1, $1, 3 bne $1, $1, TAG240 mtlo $1 and $1, $1, $1 TAG240: sll $0, $0, 0 blez $2, TAG241 sh $2, 0($2) sb $1, 0($1) TAG241: bgez $2, TAG242 lhu $4, 0($2) lbu $1, 0($4) mtlo $2 TAG242: bltz $1, TAG243 lui $4, 4 mfhi $1 lui $2, 9 TAG243: lui $4, 8 mflo $4 or $1, $4, $2 sltiu $4, $1, 13 TAG244: lh $4, 0($4) sh $4, 0($4) mfhi $3 bgez $4, TAG245 TAG245: lui $4, 9 sll $0, $0, 0 mthi $3 bne $4, $3, TAG246 TAG246: mfhi $4 sll $0, $0, 0 beq $1, $4, TAG247 lui $2, 3 TAG247: subu $2, $2, $2 ori $1, $2, 10 lui $3, 5 and $2, $2, $3 TAG248: mult $2, $2 sh $2, 0($2) bne $2, $2, TAG249 sh $2, 0($2) TAG249: mfhi $4 nor $3, $2, $4 lbu $4, 1($3) sw $4, 1($3) TAG250: mult $4, $4 bgtz $4, TAG251 mthi $4 multu $4, $4 TAG251: lui $1, 9 sra $1, $1, 5 sh $4, 0($4) sh $4, -18432($1) TAG252: mult $1, $1 mflo $1 mflo $1 multu $1, $1 TAG253: nor $2, $1, $1 slti $1, $1, 7 mflo $4 mfhi $3 TAG254: andi $1, $3, 2 sll $0, $0, 0 lui $2, 2 mult $3, $2 TAG255: mfhi $1 bne $2, $2, TAG256 sll $0, $0, 0 sll $0, $0, 0 TAG256: addiu $1, $1, 3 divu $1, $1 div $1, $1 mfhi $2 TAG257: lh $1, 0($2) mfhi $2 lui $2, 10 mthi $1 TAG258: xori $1, $2, 14 beq $1, $1, TAG259 sll $0, $0, 0 bne $2, $3, TAG259 TAG259: sll $0, $0, 0 sll $1, $3, 5 lui $4, 4 multu $3, $4 TAG260: sll $0, $0, 0 mthi $4 mthi $4 bltz $4, TAG261 TAG261: sll $0, $0, 0 ori $3, $2, 4 lui $2, 7 andi $2, $2, 4 TAG262: multu $2, $2 multu $2, $2 lh $2, 0($2) srlv $4, $2, $2 TAG263: lb $1, 0($4) sh $1, 0($1) lui $4, 4 sll $0, $0, 0 TAG264: mflo $3 bgez $3, TAG265 lh $2, 0($3) beq $2, $3, TAG265 TAG265: mthi $2 srlv $2, $2, $2 lui $3, 3 lui $1, 2 TAG266: divu $1, $1 lui $2, 14 mfhi $1 lui $1, 10 TAG267: slti $3, $1, 3 addiu $2, $1, 10 beq $3, $1, TAG268 sb $1, 0($3) TAG268: beq $2, $2, TAG269 divu $2, $2 sltiu $1, $2, 6 bgtz $1, TAG269 TAG269: mthi $1 div $1, $1 srlv $4, $1, $1 bgez $4, TAG270 TAG270: sll $0, $0, 0 blez $4, TAG271 sll $0, $0, 0 bltz $4, TAG271 TAG271: sll $0, $0, 0 sll $0, $0, 0 mtlo $4 slti $4, $4, 9 TAG272: lui $3, 14 lhu $4, 0($4) mthi $4 lhu $2, 0($4) TAG273: sw $2, 0($2) mthi $2 srlv $3, $2, $2 addi $3, $2, 15 TAG274: beq $3, $3, TAG275 mfhi $4 lh $4, 0($3) lui $2, 2 TAG275: lui $3, 9 mult $2, $3 mthi $2 sll $0, $0, 0 TAG276: lui $4, 2 subu $3, $3, $4 mthi $3 and $1, $4, $3 TAG277: sll $0, $0, 0 bne $1, $1, TAG278 mtlo $1 sll $0, $0, 0 TAG278: lui $3, 13 mtlo $3 xor $1, $3, $1 sll $0, $0, 0 TAG279: mflo $2 mfhi $3 nor $2, $3, $3 addiu $3, $2, 1 TAG280: sll $0, $0, 0 sll $0, $0, 0 blez $4, TAG281 sll $0, $0, 0 TAG281: lui $2, 1 lui $2, 15 sll $0, $0, 0 sll $0, $0, 0 TAG282: mflo $2 sll $0, $0, 0 sltu $3, $2, $2 lui $4, 2 TAG283: sltiu $1, $4, 6 bgtz $4, TAG284 sb $1, 0($1) srl $3, $1, 5 TAG284: beq $3, $3, TAG285 sw $3, 0($3) beq $3, $3, TAG285 mtlo $3 TAG285: sll $2, $3, 2 sw $3, 0($2) lw $4, 0($2) sra $3, $4, 3 TAG286: mthi $3 sh $3, 0($3) lw $1, 0($3) mfhi $4 TAG287: blez $4, TAG288 lb $4, 0($4) beq $4, $4, TAG288 sw $4, 0($4) TAG288: beq $4, $4, TAG289 sh $4, 0($4) blez $4, TAG289 mthi $4 TAG289: bne $4, $4, TAG290 lhu $3, 0($4) lui $1, 1 bgtz $4, TAG290 TAG290: mthi $1 lui $4, 2 lui $4, 8 blez $4, TAG291 TAG291: xor $4, $4, $4 sb $4, 0($4) bltz $4, TAG292 lh $4, 0($4) TAG292: lui $4, 3 mthi $4 bgtz $4, TAG293 sll $0, $0, 0 TAG293: mthi $4 div $4, $4 multu $4, $4 beq $4, $4, TAG294 TAG294: mthi $4 nor $4, $4, $4 mflo $4 andi $3, $4, 3 TAG295: mthi $3 mtlo $3 mtlo $3 subu $2, $3, $3 TAG296: mult $2, $2 beq $2, $2, TAG297 sb $2, 0($2) lui $2, 10 TAG297: mult $2, $2 sw $2, 0($2) add $1, $2, $2 mflo $1 TAG298: sw $1, 0($1) sra $1, $1, 6 sh $1, 0($1) mtlo $1 TAG299: lw $1, 0($1) blez $1, TAG300 lui $2, 8 lui $1, 14 TAG300: mult $1, $1 blez $1, TAG301 mult $1, $1 lui $1, 11 TAG301: mfhi $3 sw $1, 0($3) andi $3, $1, 15 mfhi $3 TAG302: addi $1, $3, 2 blez $3, TAG303 mthi $3 sra $2, $3, 9 TAG303: mtlo $2 sllv $2, $2, $2 xori $3, $2, 8 bgez $2, TAG304 TAG304: ori $3, $3, 5 mult $3, $3 beq $3, $3, TAG305 sltiu $1, $3, 6 TAG305: multu $1, $1 and $2, $1, $1 beq $1, $2, TAG306 mult $1, $1 TAG306: bne $2, $2, TAG307 mflo $1 sw $1, 0($1) lui $1, 4 TAG307: beq $1, $1, TAG308 sll $0, $0, 0 lw $3, 0($1) lui $1, 15 TAG308: sll $0, $0, 0 sll $4, $1, 5 bne $4, $1, TAG309 sllv $4, $4, $1 TAG309: sll $2, $4, 11 sll $0, $0, 0 beq $3, $2, TAG310 sll $0, $0, 0 TAG310: beq $2, $2, TAG311 slt $4, $2, $2 divu $2, $4 lbu $3, 0($4) TAG311: mflo $3 mflo $3 nor $1, $3, $3 sh $3, 0($3) TAG312: mult $1, $1 sh $1, 1($1) bne $1, $1, TAG313 slti $4, $1, 10 TAG313: sb $4, 0($4) mult $4, $4 sltu $3, $4, $4 mtlo $3 TAG314: mult $3, $3 bne $3, $3, TAG315 sllv $1, $3, $3 blez $3, TAG315 TAG315: sh $1, 0($1) bgez $1, TAG316 sltu $4, $1, $1 bne $4, $1, TAG316 TAG316: lui $2, 12 lui $3, 13 sll $0, $0, 0 multu $4, $4 TAG317: bgez $2, TAG318 mfhi $1 mflo $2 multu $2, $2 TAG318: bne $2, $2, TAG319 sll $0, $0, 0 sll $0, $0, 0 bne $2, $1, TAG319 TAG319: mult $1, $1 lb $2, 0($1) lui $1, 0 mult $1, $2 TAG320: bgtz $1, TAG321 mtlo $1 mfhi $1 lui $1, 5 TAG321: blez $1, TAG322 div $1, $1 mfhi $4 xor $3, $4, $4 TAG322: mfhi $1 bne $3, $1, TAG323 and $4, $1, $3 slti $2, $4, 0 TAG323: bltz $2, TAG324 lui $4, 4 sll $2, $2, 12 mult $2, $2 TAG324: sltiu $4, $2, 12 mult $4, $2 beq $2, $2, TAG325 ori $3, $4, 9 TAG325: sb $3, 0($3) lb $3, 0($3) subu $1, $3, $3 lw $1, 0($1) TAG326: srav $4, $1, $1 sltiu $3, $1, 0 sw $1, 0($1) blez $4, TAG327 TAG327: lb $3, 0($3) or $1, $3, $3 andi $4, $3, 10 beq $4, $1, TAG328 TAG328: lui $4, 13 sll $0, $0, 0 sll $0, $0, 0 bne $4, $4, TAG329 TAG329: lui $1, 3 addiu $4, $1, 10 beq $4, $4, TAG330 or $2, $4, $4 TAG330: sll $0, $0, 0 bgtz $1, TAG331 sll $0, $0, 0 lhu $2, 0($1) TAG331: sll $0, $0, 0 sll $0, $0, 0 sh $3, 0($3) sll $0, $0, 0 TAG332: addu $1, $3, $3 bltz $3, TAG333 sw $3, 0($1) mfhi $1 TAG333: mfhi $4 srl $1, $4, 9 bne $4, $4, TAG334 mthi $4 TAG334: blez $1, TAG335 sw $1, 0($1) lhu $2, 0($1) bne $1, $2, TAG335 TAG335: multu $2, $2 mflo $4 sll $0, $0, 0 bgez $4, TAG336 TAG336: mthi $4 addu $2, $4, $4 addiu $1, $4, 10 slti $2, $1, 13 TAG337: lui $3, 12 and $4, $3, $2 div $2, $3 srav $2, $2, $2 TAG338: lb $2, 0($2) mfhi $2 bne $2, $2, TAG339 mthi $2 TAG339: lui $4, 3 bgtz $2, TAG340 lui $3, 8 multu $2, $4 TAG340: and $4, $3, $3 mtlo $3 srlv $2, $3, $3 div $4, $2 TAG341: ori $2, $2, 12 mtlo $2 sll $0, $0, 0 subu $3, $2, $2 TAG342: mthi $3 bne $3, $3, TAG343 lui $2, 9 sll $3, $2, 4 TAG343: mtlo $3 slti $1, $3, 3 sh $3, 0($1) mtlo $1 TAG344: lui $4, 10 lui $3, 14 beq $4, $3, TAG345 srlv $4, $1, $3 TAG345: mult $4, $4 bgez $4, TAG346 lh $1, 0($4) beq $4, $1, TAG346 TAG346: multu $1, $1 bne $1, $1, TAG347 addi $4, $1, 10 and $1, $1, $1 TAG347: mtlo $1 nor $3, $1, $1 sh $1, 0($1) mflo $4 TAG348: lhu $3, 0($4) srl $4, $3, 7 blez $4, TAG349 multu $4, $4 TAG349: sw $4, 0($4) sb $4, 0($4) mfhi $2 sh $4, 0($2) TAG350: sh $2, 0($2) bgez $2, TAG351 lui $2, 5 sh $2, 0($2) TAG351: bgtz $2, TAG352 mult $2, $2 or $3, $2, $2 sb $2, 0($3) TAG352: bgez $3, TAG353 mtlo $3 lw $1, 0($3) mthi $1 TAG353: sltiu $4, $1, 14 sra $4, $4, 15 sra $1, $1, 9 beq $1, $1, TAG354 TAG354: lui $2, 12 bne $2, $2, TAG355 subu $4, $2, $1 lui $3, 4 TAG355: lui $4, 8 blez $3, TAG356 sll $0, $0, 0 nor $4, $4, $4 TAG356: lui $3, 2 ori $4, $4, 10 bltz $4, TAG357 mtlo $4 TAG357: sll $0, $0, 0 sll $0, $0, 0 srlv $1, $4, $2 lui $1, 4 TAG358: lui $2, 12 beq $1, $2, TAG359 mflo $1 addu $4, $1, $2 TAG359: lui $3, 6 mthi $3 sllv $2, $4, $4 lui $2, 4 TAG360: multu $2, $2 sll $0, $0, 0 mflo $3 addiu $3, $2, 6 TAG361: nor $3, $3, $3 addiu $4, $3, 3 mtlo $3 sll $0, $0, 0 TAG362: mthi $4 bltz $4, TAG363 sll $2, $4, 3 sh $4, 0($2) TAG363: mtlo $2 mult $2, $2 bne $2, $2, TAG364 srl $3, $2, 9 TAG364: srl $2, $3, 1 div $2, $2 or $2, $2, $2 mfhi $3 TAG365: mthi $3 xori $3, $3, 5 divu $3, $3 srlv $3, $3, $3 TAG366: nor $3, $3, $3 bgtz $3, TAG367 mult $3, $3 sll $2, $3, 11 TAG367: subu $4, $2, $2 andi $3, $2, 5 mthi $3 mfhi $2 TAG368: mfhi $3 bgtz $3, TAG369 mthi $2 mflo $4 TAG369: beq $4, $4, TAG370 sll $1, $4, 12 sll $4, $4, 5 bne $4, $4, TAG370 TAG370: div $4, $4 div $4, $4 mtlo $4 andi $1, $4, 7 TAG371: sltu $3, $1, $1 mflo $4 lb $1, 0($1) bltz $1, TAG372 TAG372: lh $4, 0($1) lb $2, 0($4) sb $1, 0($1) lw $4, 0($1) TAG373: srlv $3, $4, $4 lb $4, 0($3) bgez $4, TAG374 mflo $3 TAG374: mflo $1 lbu $1, 0($3) srlv $1, $1, $1 bltz $1, TAG375 TAG375: lui $4, 3 blez $4, TAG376 lui $3, 13 srlv $4, $1, $1 TAG376: xor $4, $4, $4 srlv $1, $4, $4 mtlo $4 lbu $3, 0($4) TAG377: multu $3, $3 beq $3, $3, TAG378 mult $3, $3 mult $3, $3 TAG378: bne $3, $3, TAG379 lbu $3, 0($3) sh $3, 0($3) lui $1, 10 TAG379: mfhi $2 sll $0, $0, 0 bgtz $1, TAG380 mfhi $4 TAG380: sb $4, 0($4) mult $4, $4 sra $4, $4, 4 beq $4, $4, TAG381 TAG381: sw $4, 0($4) andi $1, $4, 5 mflo $3 xor $2, $3, $3 TAG382: lui $1, 5 blez $2, TAG383 sll $0, $0, 0 bltz $1, TAG383 TAG383: xori $4, $1, 9 mult $4, $4 div $4, $4 mthi $4 TAG384: sllv $2, $4, $4 or $4, $4, $4 sll $0, $0, 0 nor $1, $4, $2 TAG385: mtlo $1 sll $0, $0, 0 beq $1, $1, TAG386 mult $1, $1 TAG386: beq $1, $1, TAG387 sll $0, $0, 0 blez $1, TAG387 lbu $3, 0($3) TAG387: multu $3, $3 beq $3, $3, TAG388 lui $4, 0 bne $3, $4, TAG388 TAG388: lui $3, 10 mfhi $4 divu $4, $3 lui $1, 15 TAG389: xor $4, $1, $1 multu $1, $4 mflo $2 beq $4, $2, TAG390 TAG390: sll $4, $2, 12 blez $4, TAG391 mthi $4 addiu $2, $4, 6 TAG391: subu $2, $2, $2 bne $2, $2, TAG392 or $2, $2, $2 lui $2, 1 TAG392: bgtz $2, TAG393 sll $0, $0, 0 mthi $2 lui $1, 3 TAG393: div $1, $1 subu $4, $1, $1 bne $4, $4, TAG394 addi $2, $4, 0 TAG394: multu $2, $2 mfhi $3 bgtz $3, TAG395 multu $2, $3 TAG395: lb $2, 0($3) sw $3, 0($2) mfhi $1 lbu $1, 0($3) TAG396: mtlo $1 lui $1, 14 xor $3, $1, $1 bgtz $1, TAG397 TAG397: multu $3, $3 slt $4, $3, $3 sh $3, 0($3) lbu $4, 0($3) TAG398: mtlo $4 bltz $4, TAG399 mfhi $1 mthi $4 TAG399: mtlo $1 bne $1, $1, TAG400 nor $4, $1, $1 mtlo $1 TAG400: sb $4, 1($4) srl $4, $4, 14 mflo $1 lui $4, 5 TAG401: sll $0, $0, 0 slti $3, $4, 3 mtlo $3 sll $0, $0, 0 TAG402: sh $2, 0($2) andi $1, $2, 6 srav $3, $2, $1 mfhi $1 TAG403: blez $1, TAG404 srav $4, $1, $1 addu $3, $1, $1 andi $1, $3, 9 TAG404: mtlo $1 mflo $3 beq $3, $3, TAG405 lw $1, 0($1) TAG405: blez $1, TAG406 addiu $1, $1, 14 mtlo $1 bgez $1, TAG406 TAG406: lbu $4, 0($1) sw $4, 0($4) multu $1, $4 mthi $4 TAG407: lui $2, 10 bgtz $4, TAG408 mtlo $4 bgtz $4, TAG408 TAG408: sll $0, $0, 0 sll $0, $0, 0 lui $2, 10 addu $3, $2, $4 TAG409: sll $0, $0, 0 sll $4, $3, 2 addiu $2, $4, 14 sll $0, $0, 0 TAG410: or $1, $2, $2 xori $4, $1, 13 bgez $1, TAG411 sll $0, $0, 0 TAG411: mthi $4 sll $0, $0, 0 mthi $4 sll $0, $0, 0 TAG412: blez $1, TAG413 nor $3, $1, $1 sll $0, $0, 0 sll $0, $0, 0 TAG413: nor $2, $1, $1 blez $2, TAG414 sll $0, $0, 0 mtlo $2 TAG414: nor $1, $2, $2 mfhi $4 mtlo $2 sll $0, $0, 0 TAG415: mthi $3 mfhi $4 addu $2, $3, $3 xori $3, $4, 10 TAG416: bne $3, $3, TAG417 mtlo $3 sll $0, $0, 0 sll $0, $0, 0 TAG417: blez $3, TAG418 mult $3, $3 lui $1, 6 mtlo $3 TAG418: sll $0, $0, 0 mtlo $1 mthi $1 mtlo $1 TAG419: sll $0, $0, 0 beq $1, $1, TAG420 nor $2, $1, $1 mthi $2 TAG420: mthi $2 sll $0, $0, 0 lui $3, 4 bne $3, $3, TAG421 TAG421: sll $0, $0, 0 mthi $3 srav $1, $3, $3 sll $0, $0, 0 TAG422: sll $0, $0, 0 mult $1, $1 div $1, $1 bgtz $1, TAG423 TAG423: srl $3, $1, 7 sh $3, -2048($3) sll $0, $0, 0 mult $3, $1 TAG424: mult $3, $3 srav $4, $3, $3 divu $3, $3 lh $3, -2048($3) TAG425: ori $4, $3, 11 mtlo $4 sw $3, -2059($4) and $1, $3, $3 TAG426: andi $1, $1, 7 lui $1, 2 sll $0, $0, 0 mult $1, $1 TAG427: mthi $1 bne $1, $1, TAG428 mult $1, $1 sll $0, $0, 0 TAG428: multu $3, $3 lui $3, 15 mtlo $3 sll $0, $0, 0 TAG429: sll $0, $0, 0 multu $3, $3 bltz $3, TAG430 slt $3, $3, $3 TAG430: xori $3, $3, 11 mflo $3 multu $3, $3 add $2, $3, $3 TAG431: xori $1, $2, 0 multu $1, $1 sra $1, $2, 14 mflo $1 TAG432: lui $3, 13 lui $4, 9 bne $4, $3, TAG433 mthi $1 TAG433: mflo $1 mthi $4 addu $4, $1, $1 sh $4, 0($1) TAG434: lui $2, 2 lui $3, 8 sll $0, $0, 0 nor $3, $4, $3 TAG435: mflo $2 beq $2, $2, TAG436 sll $0, $0, 0 bgtz $2, TAG436 TAG436: multu $2, $2 bne $2, $2, TAG437 slti $1, $2, 12 sb $1, 0($2) TAG437: mfhi $1 sll $1, $1, 3 multu $1, $1 lui $1, 5 TAG438: sll $0, $0, 0 mfhi $1 lui $1, 11 andi $3, $1, 6 TAG439: mult $3, $3 mfhi $2 mthi $2 slti $3, $2, 10 TAG440: sb $3, 0($3) ori $4, $3, 14 divu $4, $4 lui $3, 11 TAG441: bgez $3, TAG442 sll $0, $0, 0 slti $3, $3, 6 mflo $4 TAG442: lb $4, 0($4) srlv $2, $4, $4 multu $2, $2 sltiu $3, $2, 9 TAG443: slt $2, $3, $3 lui $1, 6 sll $0, $0, 0 srlv $3, $2, $3 TAG444: sb $3, 0($3) bne $3, $3, TAG445 srlv $4, $3, $3 bgez $4, TAG445 TAG445: mthi $4 lw $4, 0($4) mfhi $3 bne $4, $4, TAG446 TAG446: sltu $2, $3, $3 sb $3, 0($2) blez $2, TAG447 sh $2, 0($3) TAG447: bgez $2, TAG448 sh $2, 0($2) mflo $4 andi $2, $4, 3 TAG448: srav $4, $2, $2 sw $4, 0($2) mult $2, $2 mtlo $4 TAG449: lui $4, 7 sll $2, $4, 13 sll $0, $0, 0 lui $2, 11 TAG450: sra $4, $2, 1 sra $2, $4, 2 mfhi $1 sll $3, $2, 10 TAG451: divu $3, $3 multu $3, $3 sll $0, $0, 0 bne $3, $2, TAG452 TAG452: sll $0, $0, 0 sll $0, $0, 0 div $2, $2 sll $0, $0, 0 TAG453: beq $2, $2, TAG454 xor $2, $2, $2 addu $2, $2, $2 sw $2, 0($2) TAG454: subu $1, $2, $2 mflo $1 mthi $1 mtlo $1 TAG455: sra $1, $1, 3 srlv $3, $1, $1 sw $1, 0($1) mflo $4 TAG456: lb $2, 0($4) sb $2, 0($2) nor $2, $2, $4 lhu $3, 2($2) TAG457: bgez $3, TAG458 lui $1, 1 lui $3, 10 lui $3, 0 TAG458: blez $3, TAG459 lui $4, 11 lhu $1, 0($4) bgtz $3, TAG459 TAG459: addu $3, $1, $1 bltz $1, TAG460 sll $0, $0, 0 divu $1, $1 TAG460: mfhi $3 mult $3, $3 mflo $4 beq $4, $3, TAG461 TAG461: sb $4, 0($4) bgtz $4, TAG462 sb $4, 0($4) lui $4, 1 TAG462: lui $2, 11 mthi $4 mfhi $4 multu $4, $2 TAG463: srlv $2, $4, $4 mfhi $1 bltz $2, TAG464 mthi $1 TAG464: bgez $1, TAG465 srl $3, $1, 1 lui $1, 14 srl $2, $3, 11 TAG465: sll $0, $0, 0 sll $0, $0, 0 lui $1, 0 sw $2, 0($1) TAG466: lui $3, 0 bgez $1, TAG467 sh $3, 0($1) mfhi $4 TAG467: slti $2, $4, 11 mfhi $2 or $2, $2, $2 div $2, $2 TAG468: divu $2, $2 lui $4, 4 addiu $3, $2, 15 mflo $2 TAG469: mflo $1 sltiu $3, $2, 2 lb $3, 0($2) lbu $3, 0($1) TAG470: addu $3, $3, $3 mthi $3 lui $1, 4 srl $1, $3, 3 TAG471: ori $2, $1, 5 multu $2, $1 bgtz $1, TAG472 mfhi $4 TAG472: mult $4, $4 xor $4, $4, $4 mtlo $4 sltu $1, $4, $4 TAG473: sh $1, 0($1) lui $2, 2 sh $2, 0($1) divu $2, $2 TAG474: mfhi $1 mflo $1 bgtz $1, TAG475 sll $0, $0, 0 TAG475: div $1, $1 sb $1, 0($1) mtlo $1 mflo $3 TAG476: sb $3, 0($3) bltz $3, TAG477 mfhi $2 bgez $2, TAG477 TAG477: lui $3, 0 mtlo $3 mtlo $2 lh $1, 0($3) TAG478: mtlo $1 sb $1, -256($1) lui $2, 6 blez $1, TAG479 TAG479: mfhi $1 mfhi $4 mult $4, $2 mtlo $2 TAG480: mfhi $2 bgtz $4, TAG481 mthi $2 bne $4, $4, TAG481 TAG481: mtlo $2 lui $3, 13 bgez $3, TAG482 mflo $3 TAG482: mtlo $3 srlv $1, $3, $3 sub $2, $1, $3 mult $3, $3 TAG483: add $2, $2, $2 sw $2, 0($2) xor $1, $2, $2 bgtz $1, TAG484 TAG484: mfhi $3 lhu $3, 0($1) or $1, $1, $3 lui $4, 14 TAG485: sll $0, $0, 0 mult $3, $4 sll $0, $0, 0 mfhi $2 TAG486: mthi $2 sll $2, $2, 14 lui $3, 11 bgez $3, TAG487 TAG487: xor $4, $3, $3 lui $1, 7 bne $4, $1, TAG488 multu $3, $4 TAG488: mult $1, $1 mtlo $1 sll $0, $0, 0 bgtz $1, TAG489 TAG489: srav $1, $1, $1 bne $1, $1, TAG490 slt $1, $1, $1 lui $3, 5 TAG490: sll $0, $0, 0 xori $3, $3, 15 multu $3, $3 sll $0, $0, 0 TAG491: sll $0, $0, 0 multu $3, $3 mfhi $1 sll $0, $0, 0 TAG492: and $2, $1, $1 sb $1, 0($1) mthi $1 sb $2, 0($1) TAG493: mult $2, $2 bgtz $2, TAG494 sb $2, 0($2) sb $2, 0($2) TAG494: sb $2, 0($2) sllv $3, $2, $2 bgez $3, TAG495 sll $2, $2, 5 TAG495: mfhi $1 and $1, $1, $2 lui $2, 8 lui $3, 4 TAG496: bltz $3, TAG497 mtlo $3 beq $3, $3, TAG497 lui $4, 15 TAG497: lui $4, 3 mtlo $4 mult $4, $4 xori $1, $4, 15 TAG498: mflo $2 divu $2, $1 sltiu $1, $2, 3 sltiu $1, $2, 8 TAG499: sb $1, 0($1) mflo $4 subu $2, $1, $4 divu $4, $2 TAG500: divu $2, $2 sb $2, 0($2) lui $1, 2 mfhi $1 TAG501: lui $2, 9 bgtz $1, TAG502 sll $0, $0, 0 sll $0, $0, 0 TAG502: lui $4, 1 mthi $4 mthi $4 lui $4, 15 TAG503: mtlo $4 bgez $4, TAG504 addu $3, $4, $4 bne $4, $4, TAG504 TAG504: lui $2, 7 mflo $4 mfhi $1 mfhi $3 TAG505: lui $1, 2 and $3, $1, $3 sw $3, 0($3) beq $3, $3, TAG506 TAG506: lb $3, 0($3) mflo $4 blez $4, TAG507 mflo $1 TAG507: sll $0, $0, 0 divu $1, $1 lui $2, 6 beq $2, $2, TAG508 TAG508: sll $0, $0, 0 addu $1, $2, $4 div $2, $1 sll $0, $0, 0 TAG509: sll $0, $0, 0 lui $3, 3 multu $3, $3 slt $2, $2, $2 TAG510: mflo $3 subu $3, $3, $3 sb $3, 0($3) lui $2, 13 TAG511: blez $2, TAG512 sll $0, $0, 0 sll $0, $0, 0 mflo $3 TAG512: sltu $4, $3, $3 mfhi $4 lbu $1, 0($3) mult $4, $3 TAG513: mflo $2 bltz $2, TAG514 lbu $4, 0($2) multu $1, $1 TAG514: multu $4, $4 beq $4, $4, TAG515 lui $3, 10 addu $1, $3, $4 TAG515: mult $1, $1 mflo $2 sra $4, $1, 8 lui $2, 12 TAG516: sll $0, $0, 0 mfhi $2 mult $4, $2 bgez $4, TAG517 TAG517: andi $2, $2, 8 ori $1, $2, 5 divu $1, $1 addu $4, $2, $1 TAG518: sb $4, 0($4) lui $1, 0 xor $1, $1, $1 srav $2, $1, $1 TAG519: bne $2, $2, TAG520 mtlo $2 beq $2, $2, TAG520 sltiu $1, $2, 5 TAG520: beq $1, $1, TAG521 sb $1, 0($1) lw $3, 0($1) mflo $2 TAG521: lui $4, 0 xor $1, $4, $4 srav $3, $4, $2 bgez $1, TAG522 TAG522: lui $1, 3 lui $4, 11 blez $4, TAG523 lui $1, 1 TAG523: bne $1, $1, TAG524 sll $0, $0, 0 slt $1, $1, $1 sltiu $3, $1, 13 TAG524: mflo $2 mflo $3 mtlo $3 bne $2, $3, TAG525 TAG525: srav $3, $3, $3 blez $3, TAG526 mtlo $3 div $3, $3 TAG526: bgez $3, TAG527 mflo $1 blez $3, TAG527 sw $3, 0($3) TAG527: bgtz $1, TAG528 sw $1, 0($1) mfhi $3 mfhi $4 TAG528: mfhi $2 bgtz $2, TAG529 mflo $3 mtlo $2 TAG529: mthi $3 lh $3, 0($3) mtlo $3 sh $3, 0($3) TAG530: mfhi $3 mult $3, $3 mfhi $2 mtlo $3 TAG531: mfhi $2 sh $2, 0($2) lui $1, 0 lbu $3, 0($1) TAG532: mult $3, $3 lb $3, 0($3) addu $3, $3, $3 sltiu $3, $3, 12 TAG533: sb $3, 0($3) subu $4, $3, $3 mflo $1 lb $2, 0($4) TAG534: and $2, $2, $2 lh $4, 0($2) mthi $2 and $1, $4, $4 TAG535: bne $1, $1, TAG536 lui $3, 6 mfhi $1 bne $3, $3, TAG536 TAG536: sltu $2, $1, $1 srl $4, $1, 6 bne $1, $1, TAG537 mult $1, $1 TAG537: mtlo $4 multu $4, $4 sw $4, 0($4) mtlo $4 TAG538: beq $4, $4, TAG539 sra $1, $4, 14 mfhi $1 mtlo $1 TAG539: lui $4, 5 addiu $3, $4, 3 sra $1, $3, 9 blez $1, TAG540 TAG540: lui $3, 5 xori $1, $3, 12 addu $1, $3, $1 mthi $1 TAG541: lui $4, 10 slti $1, $1, 12 lhu $2, 0($1) mult $4, $1 TAG542: beq $2, $2, TAG543 sb $2, 0($2) mtlo $2 addiu $2, $2, 13 TAG543: lhu $1, 0($2) bgtz $2, TAG544 mthi $2 beq $2, $1, TAG544 TAG544: sh $1, 0($1) mthi $1 mfhi $3 srl $3, $3, 10 TAG545: mtlo $3 mthi $3 blez $3, TAG546 andi $2, $3, 0 TAG546: nor $2, $2, $2 xori $4, $2, 5 lui $3, 13 lb $3, 1($2) TAG547: mult $3, $3 mthi $3 bgtz $3, TAG548 multu $3, $3 TAG548: mflo $3 mult $3, $3 addiu $3, $3, 7 slti $4, $3, 8 TAG549: lb $4, 0($4) srl $3, $4, 15 multu $4, $4 bgez $4, TAG550 TAG550: mflo $2 mfhi $3 multu $2, $3 multu $2, $3 TAG551: blez $3, TAG552 addiu $2, $3, 4 sb $3, 0($3) or $4, $2, $3 TAG552: mflo $3 beq $3, $3, TAG553 lhu $2, 0($4) beq $3, $4, TAG553 TAG553: mult $2, $2 mthi $2 bne $2, $2, TAG554 andi $3, $2, 4 TAG554: multu $3, $3 bgtz $3, TAG555 or $4, $3, $3 sh $3, 0($3) TAG555: addi $1, $4, 8 mflo $4 multu $1, $4 sub $1, $4, $4 TAG556: mtlo $1 mflo $1 mult $1, $1 lui $1, 11 TAG557: lui $2, 10 sllv $4, $2, $1 addiu $2, $2, 11 bgez $2, TAG558 TAG558: lui $4, 15 sll $0, $0, 0 lui $1, 0 lui $1, 15 TAG559: beq $1, $1, TAG560 addiu $2, $1, 15 lhu $1, 0($2) sh $1, 0($1) TAG560: mtlo $1 bgez $1, TAG561 sll $0, $0, 0 sw $1, 0($1) TAG561: sh $3, 0($3) bgez $3, TAG562 lhu $2, 0($3) bne $2, $3, TAG562 TAG562: mfhi $3 mtlo $3 and $1, $2, $2 multu $3, $2 TAG563: lb $3, 0($1) mult $3, $3 beq $3, $1, TAG564 addi $2, $3, 15 TAG564: sb $2, 0($2) mflo $3 sh $3, 0($3) sb $3, 0($2) TAG565: addi $4, $3, 1 lh $2, 0($3) lb $4, 0($3) mthi $2 TAG566: bgtz $4, TAG567 sw $4, 0($4) mtlo $4 lh $2, 0($4) TAG567: mtlo $2 sltiu $2, $2, 0 bne $2, $2, TAG568 lui $1, 1 TAG568: lui $3, 1 bgtz $3, TAG569 sll $0, $0, 0 sw $1, 0($3) TAG569: lui $3, 15 bgtz $3, TAG570 srav $4, $3, $3 sltiu $3, $4, 0 TAG570: sll $0, $0, 0 xori $3, $3, 8 multu $3, $3 sll $0, $0, 0 TAG571: srlv $1, $2, $2 sw $2, 0($2) lbu $3, 0($1) mfhi $3 TAG572: xori $1, $3, 2 lw $4, -225($3) sll $1, $1, 4 and $1, $1, $4 TAG573: mthi $1 lh $3, 0($1) nor $2, $1, $1 mthi $3 TAG574: ori $2, $2, 8 mthi $2 multu $2, $2 mtlo $2 TAG575: addiu $2, $2, 6 sb $2, 0($2) mult $2, $2 slti $4, $2, 1 TAG576: bgtz $4, TAG577 and $2, $4, $4 bgez $2, TAG577 mthi $4 TAG577: lh $1, 0($2) sub $1, $2, $2 mult $1, $1 mfhi $1 TAG578: bltz $1, TAG579 sw $1, 0($1) lbu $4, 0($1) sub $2, $1, $4 TAG579: mtlo $2 bgtz $2, TAG580 mtlo $2 sra $2, $2, 1 TAG580: mult $2, $2 lh $1, 0($2) mtlo $1 mult $1, $1 TAG581: mult $1, $1 mthi $1 mult $1, $1 addi $3, $1, 13 TAG582: sb $3, 0($3) bne $3, $3, TAG583 lbu $3, 0($3) mtlo $3 TAG583: bne $3, $3, TAG584 mflo $3 bgtz $3, TAG584 lb $4, 0($3) TAG584: lui $4, 12 mult $4, $4 mflo $1 sll $0, $0, 0 TAG585: bne $1, $1, TAG586 mthi $1 mtlo $1 multu $1, $1 TAG586: sh $1, 0($1) sh $1, 0($1) srl $1, $1, 15 sh $1, 0($1) TAG587: sh $1, 0($1) mult $1, $1 lui $4, 7 lui $1, 1 TAG588: sll $0, $0, 0 sll $0, $0, 0 mtlo $1 sltiu $4, $1, 11 TAG589: lb $3, 0($4) mthi $3 lh $1, 0($3) addu $1, $3, $4 TAG590: mthi $1 multu $1, $1 mfhi $4 and $3, $1, $1 TAG591: sll $4, $3, 10 addi $1, $3, 15 blez $4, TAG592 andi $3, $4, 11 TAG592: mtlo $3 lui $3, 6 bne $3, $3, TAG593 lui $3, 10 TAG593: sllv $3, $3, $3 divu $3, $3 bne $3, $3, TAG594 mthi $3 TAG594: sll $0, $0, 0 mthi $3 sltiu $2, $3, 2 sll $0, $0, 0 TAG595: mult $2, $2 mthi $2 mthi $2 lui $2, 4 TAG596: lui $1, 8 lui $2, 4 sll $0, $0, 0 beq $3, $2, TAG597 TAG597: sra $4, $3, 13 slt $4, $3, $4 mtlo $3 bne $4, $4, TAG598 TAG598: mult $4, $4 bgez $4, TAG599 multu $4, $4 bgtz $4, TAG599 TAG599: xori $4, $4, 4 multu $4, $4 mtlo $4 sb $4, 0($4) TAG600: bne $4, $4, TAG601 sltu $3, $4, $4 sra $3, $3, 13 lui $4, 4 TAG601: lui $1, 4 srlv $3, $4, $1 mflo $1 beq $1, $4, TAG602 TAG602: mthi $1 bgez $1, TAG603 mthi $1 lh $3, 0($1) TAG603: lui $3, 12 mthi $3 mflo $3 bltz $3, TAG604 TAG604: lhu $2, 0($3) mfhi $3 bgez $2, TAG605 mthi $3 TAG605: or $2, $3, $3 xor $4, $2, $3 srl $2, $4, 15 mthi $2 TAG606: bltz $2, TAG607 lui $3, 9 sll $0, $0, 0 mtlo $3 TAG607: sra $2, $3, 11 andi $2, $2, 4 bne $2, $2, TAG608 mflo $3 TAG608: sll $0, $0, 0 mtlo $3 mthi $3 srav $2, $3, $3 TAG609: mthi $2 ori $4, $2, 13 mfhi $3 sll $0, $0, 0 TAG610: div $2, $2 sll $0, $0, 0 bne $2, $4, TAG611 ori $3, $4, 14 TAG611: mtlo $3 div $3, $3 addu $1, $3, $3 sltiu $4, $1, 9 TAG612: sw $4, 0($4) multu $4, $4 beq $4, $4, TAG613 mtlo $4 TAG613: mflo $1 bgez $4, TAG614 lw $4, 0($4) sh $1, 0($4) TAG614: addu $1, $4, $4 lb $2, 0($1) mtlo $4 lb $3, 0($4) TAG615: lbu $4, 0($3) blez $3, TAG616 sb $4, 0($4) lui $4, 7 TAG616: lui $3, 12 lui $1, 8 mthi $4 sll $0, $0, 0 TAG617: bltz $1, TAG618 sll $0, $0, 0 sll $0, $0, 0 slt $4, $1, $1 TAG618: mtlo $4 sw $4, 0($4) bgez $4, TAG619 sll $4, $4, 4 TAG619: mult $4, $4 mthi $4 bgez $4, TAG620 mtlo $4 TAG620: mtlo $4 mfhi $1 lw $3, 0($1) sltiu $1, $1, 5 TAG621: blez $1, TAG622 lbu $3, 0($1) addu $3, $3, $3 multu $3, $3 TAG622: and $2, $3, $3 bltz $2, TAG623 lhu $3, 0($2) bltz $3, TAG623 TAG623: sra $4, $3, 13 xori $1, $3, 10 lui $3, 5 sb $3, 0($1) TAG624: mtlo $3 mflo $4 bgtz $4, TAG625 addu $2, $4, $3 TAG625: mthi $2 sll $0, $0, 0 xor $2, $3, $2 mflo $1 TAG626: lui $2, 15 or $1, $2, $1 mflo $3 mult $1, $2 TAG627: div $3, $3 and $3, $3, $3 mtlo $3 sll $0, $0, 0 TAG628: blez $3, TAG629 lui $2, 4 blez $2, TAG629 sll $0, $0, 0 TAG629: lui $4, 1 beq $2, $4, TAG630 lui $2, 11 mthi $2 TAG630: sll $0, $0, 0 blez $2, TAG631 mfhi $4 divu $1, $2 TAG631: nor $4, $4, $4 mtlo $4 divu $4, $4 mfhi $3 TAG632: xori $3, $3, 9 lui $4, 3 sb $3, 0($3) sra $4, $4, 12 TAG633: mflo $1 beq $1, $1, TAG634 mflo $3 blez $3, TAG634 TAG634: subu $4, $3, $3 blez $3, TAG635 sb $4, 0($4) mtlo $3 TAG635: lui $4, 5 multu $4, $4 sll $0, $0, 0 lbu $2, 0($3) TAG636: mult $2, $2 multu $2, $2 mthi $2 mfhi $2 TAG637: sh $2, 0($2) mult $2, $2 lui $3, 4 mult $2, $3 TAG638: mflo $4 lui $1, 6 bne $4, $3, TAG639 mtlo $1 TAG639: bgez $1, TAG640 mfhi $2 mthi $2 mfhi $3 TAG640: sltu $4, $3, $3 and $1, $3, $3 addi $2, $4, 7 sll $0, $0, 0 TAG641: mult $2, $2 bgtz $2, TAG642 nor $2, $2, $2 lui $3, 9 TAG642: bltz $3, TAG643 div $3, $3 srav $1, $3, $3 mflo $3 TAG643: sb $3, 0($3) lb $4, 0($3) sb $3, 0($3) bltz $4, TAG644 TAG644: lui $1, 1 srl $3, $4, 14 lui $2, 2 sb $2, 0($4) TAG645: sll $0, $0, 0 mtlo $2 subu $3, $2, $2 sll $0, $0, 0 TAG646: mfhi $4 srav $4, $4, $4 mthi $4 blez $4, TAG647 TAG647: multu $4, $4 ori $4, $4, 10 addiu $1, $4, 8 mflo $1 TAG648: mult $1, $1 lw $1, 0($1) lh $1, 0($1) subu $3, $1, $1 TAG649: mflo $4 mtlo $4 mflo $3 sll $1, $4, 6 TAG650: beq $1, $1, TAG651 mthi $1 sb $1, 0($1) div $1, $1 TAG651: lhu $3, 0($1) sltu $2, $3, $1 mfhi $3 lui $2, 3 TAG652: sll $0, $0, 0 mthi $1 mtlo $2 xor $1, $2, $1 TAG653: multu $1, $1 sll $0, $0, 0 srlv $3, $4, $4 blez $4, TAG654 TAG654: mflo $3 lui $3, 2 beq $3, $3, TAG655 mfhi $1 TAG655: and $1, $1, $1 mthi $1 mthi $1 sb $1, 0($1) TAG656: sb $1, 0($1) sb $1, 0($1) sb $1, 0($1) subu $4, $1, $1 TAG657: lbu $2, 0($4) multu $4, $4 lui $3, 3 multu $4, $2 TAG658: beq $3, $3, TAG659 lui $2, 6 mfhi $1 mflo $1 TAG659: lui $4, 7 mthi $1 mtlo $1 mthi $4 TAG660: divu $4, $4 beq $4, $4, TAG661 mflo $4 mflo $1 TAG661: lbu $2, 0($1) lb $2, 0($1) lb $1, 0($2) bltz $1, TAG662 TAG662: lui $3, 0 addu $2, $1, $1 lw $4, 0($3) lh $2, 0($2) TAG663: lui $2, 0 beq $2, $2, TAG664 lw $1, 0($2) bne $1, $1, TAG664 TAG664: mult $1, $1 lb $2, 0($1) sh $2, 0($1) sb $2, 0($1) TAG665: srl $4, $2, 11 lbu $4, 0($2) ori $2, $4, 2 sltu $1, $4, $2 TAG666: div $1, $1 lui $4, 1 lui $3, 1 bltz $1, TAG667 TAG667: addiu $1, $3, 11 ori $1, $1, 8 beq $1, $1, TAG668 sll $0, $0, 0 TAG668: multu $1, $1 beq $1, $1, TAG669 srl $3, $1, 7 sra $4, $1, 8 TAG669: lui $4, 9 mthi $4 lui $2, 0 divu $2, $4 TAG670: mult $2, $2 bltz $2, TAG671 multu $2, $2 sh $2, 0($2) TAG671: lui $3, 0 mtlo $3 xor $4, $3, $3 beq $3, $3, TAG672 TAG672: lui $2, 3 xori $1, $2, 15 sltu $4, $1, $4 bne $4, $4, TAG673 TAG673: mfhi $3 mthi $3 nor $3, $4, $4 bgtz $4, TAG674 TAG674: mfhi $1 sw $3, 0($1) beq $1, $3, TAG675 lui $3, 15 TAG675: bne $3, $3, TAG676 srlv $4, $3, $3 mfhi $1 sll $0, $0, 0 TAG676: bne $2, $2, TAG677 sll $0, $0, 0 mtlo $2 mthi $2 TAG677: bne $2, $2, TAG678 div $2, $2 bne $2, $2, TAG678 lui $1, 14 TAG678: divu $1, $1 mthi $1 beq $1, $1, TAG679 lui $4, 11 TAG679: lui $4, 2 beq $4, $4, TAG680 mflo $2 bgez $4, TAG680 TAG680: sb $2, 0($2) bne $2, $2, TAG681 mtlo $2 bgtz $2, TAG681 TAG681: srlv $3, $2, $2 sb $2, 0($3) mfhi $4 beq $4, $2, TAG682 TAG682: sll $0, $0, 0 sll $2, $4, 13 bgez $4, TAG683 sll $0, $0, 0 TAG683: blez $1, TAG684 multu $1, $1 sll $0, $0, 0 mfhi $1 TAG684: div $1, $1 beq $1, $1, TAG685 lui $3, 10 andi $4, $3, 15 TAG685: lui $4, 1 sll $0, $0, 0 beq $4, $4, TAG686 sll $0, $0, 0 TAG686: srl $4, $2, 4 lui $3, 11 beq $2, $3, TAG687 sll $0, $0, 0 TAG687: bgez $3, TAG688 nor $4, $3, $3 lb $1, 0($3) lui $1, 10 TAG688: bne $1, $1, TAG689 lui $1, 14 subu $3, $1, $1 bltz $1, TAG689 TAG689: mfhi $4 bgez $4, TAG690 mflo $1 bne $3, $3, TAG690 TAG690: div $1, $1 lui $1, 2 mthi $1 mflo $1 TAG691: bne $1, $1, TAG692 mflo $1 mfhi $4 lui $2, 8 TAG692: mthi $2 beq $2, $2, TAG693 lui $4, 9 mfhi $1 TAG693: beq $1, $1, TAG694 lui $3, 2 multu $3, $1 multu $1, $1 TAG694: ori $4, $3, 7 bltz $4, TAG695 mult $3, $3 sll $0, $0, 0 TAG695: blez $4, TAG696 sll $0, $0, 0 mtlo $1 beq $4, $4, TAG696 TAG696: ori $2, $1, 4 lbu $1, 0($1) xori $3, $1, 11 mflo $3 TAG697: bgtz $3, TAG698 lbu $2, 0($3) bne $2, $3, TAG698 multu $3, $3 TAG698: mtlo $2 sb $2, 0($2) bne $2, $2, TAG699 sb $2, 0($2) TAG699: lui $3, 10 bgtz $3, TAG700 mfhi $4 bgez $2, TAG700 TAG700: nor $4, $4, $4 mfhi $1 mflo $2 bne $1, $4, TAG701 TAG701: mthi $2 blez $2, TAG702 or $3, $2, $2 beq $2, $3, TAG702 TAG702: slt $1, $3, $3 lb $4, 0($3) beq $1, $4, TAG703 div $4, $3 TAG703: subu $2, $4, $4 mthi $4 multu $4, $2 lui $3, 11 TAG704: bne $3, $3, TAG705 mfhi $2 divu $2, $3 divu $2, $3 TAG705: sb $2, 0($2) ori $1, $2, 4 subu $2, $2, $2 sw $2, 0($2) TAG706: sw $2, 0($2) bltz $2, TAG707 sw $2, 0($2) beq $2, $2, TAG707 TAG707: xor $2, $2, $2 bne $2, $2, TAG708 sb $2, 0($2) mthi $2 TAG708: mult $2, $2 mthi $2 beq $2, $2, TAG709 xor $1, $2, $2 TAG709: lui $1, 4 multu $1, $1 andi $1, $1, 6 bltz $1, TAG710 TAG710: lui $1, 5 bgtz $1, TAG711 sll $0, $0, 0 mflo $1 TAG711: mfhi $1 lui $4, 7 sra $4, $1, 15 sw $4, 0($1) TAG712: sh $4, 0($4) beq $4, $4, TAG713 and $3, $4, $4 sltiu $3, $4, 14 TAG713: mtlo $3 add $1, $3, $3 mflo $1 mfhi $3 TAG714: srl $1, $3, 11 sra $3, $3, 4 lui $4, 11 bne $3, $1, TAG715 TAG715: mfhi $1 and $1, $1, $4 bne $1, $1, TAG716 mult $1, $1 TAG716: mthi $1 lui $4, 7 beq $4, $1, TAG717 sll $0, $0, 0 TAG717: bgtz $3, TAG718 mfhi $2 div $3, $3 bgtz $2, TAG718 TAG718: sltu $2, $2, $2 lb $2, 0($2) lui $3, 4 sw $2, 0($2) TAG719: multu $3, $3 bgez $3, TAG720 sll $0, $0, 0 lui $1, 8 TAG720: sb $1, 0($1) sub $1, $1, $1 lui $3, 7 lui $2, 5 TAG721: xori $4, $2, 0 mthi $2 lui $1, 11 andi $4, $4, 2 TAG722: sw $4, 0($4) bltz $4, TAG723 sll $4, $4, 5 sh $4, 0($4) TAG723: beq $4, $4, TAG724 lui $4, 5 addiu $1, $4, 5 mtlo $4 TAG724: sll $4, $1, 8 addu $1, $4, $1 div $1, $1 lui $3, 12 TAG725: mflo $2 mflo $4 mfhi $4 bgtz $2, TAG726 TAG726: lui $2, 3 sra $1, $4, 13 multu $2, $2 mult $4, $1 TAG727: beq $1, $1, TAG728 slt $1, $1, $1 bgtz $1, TAG728 mtlo $1 TAG728: mthi $1 multu $1, $1 lui $1, 12 mflo $1 TAG729: mthi $1 mflo $4 lbu $4, 0($1) multu $4, $4 TAG730: mfhi $1 lw $1, 0($1) xori $1, $4, 3 srlv $2, $4, $1 TAG731: addiu $1, $2, 10 mthi $2 addu $2, $2, $1 mthi $2 TAG732: mthi $2 sh $2, 0($2) addiu $3, $2, 12 lui $2, 13 TAG733: sll $0, $0, 0 lbu $3, 0($1) mflo $2 mtlo $1 TAG734: mthi $2 ori $3, $2, 3 addi $2, $2, 1 lb $4, 0($2) TAG735: bgez $4, TAG736 sub $4, $4, $4 ori $4, $4, 4 sh $4, 0($4) TAG736: bne $4, $4, TAG737 srav $4, $4, $4 beq $4, $4, TAG737 mfhi $2 TAG737: mtlo $2 lui $3, 5 beq $3, $3, TAG738 mflo $4 TAG738: sh $4, 0($4) xori $1, $4, 15 lbu $4, 0($4) sub $2, $4, $4 TAG739: mtlo $2 mtlo $2 sltiu $1, $2, 3 sw $2, 0($2) TAG740: div $1, $1 lb $2, 0($1) mtlo $1 srl $2, $1, 1 TAG741: nor $2, $2, $2 sltu $1, $2, $2 mflo $4 mthi $1 TAG742: mtlo $4 sb $4, 0($4) beq $4, $4, TAG743 lui $4, 1 TAG743: bltz $4, TAG744 slti $2, $4, 2 bne $2, $4, TAG744 mtlo $4 TAG744: mult $2, $2 bne $2, $2, TAG745 sw $2, 0($2) lw $2, 0($2) TAG745: addiu $4, $2, 15 lui $2, 12 divu $2, $2 sll $0, $0, 0 TAG746: mfhi $1 beq $2, $1, TAG747 lbu $1, 0($1) blez $1, TAG747 TAG747: mtlo $1 mfhi $3 bne $1, $3, TAG748 mult $1, $1 TAG748: bne $3, $3, TAG749 lhu $1, 0($3) mult $1, $3 sra $1, $3, 12 TAG749: multu $1, $1 subu $2, $1, $1 blez $2, TAG750 slt $1, $2, $1 TAG750: nop nop test_end: beq $0, $0, test_end nop
; A020735: Odd numbers >= 5. ; Submitted by Christian Krause ; 5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131 mul $0,2 add $0,5
; A184524: Lower s-Wythoff sequence, where s=5n-1. Complement of A184525. ; 1,2,3,4,6,7,8,9,10,12,13,14,15,16,18,19,20,21,22,24,25,26,27,28,29,31,32,33,34,35,37,38,39,40,41,43,44,45,46,47,49,50,51,52,53,55,56,57,58,59,60,62,63,64,65,66,68,69,70,71,72,74,75,76,77,78,80,81,82,83,84,86,87,88,89,90,91,93,94,95,96,97,99,100,101,102,103,105,106,107,108,109,111,112,113,114,115,117,118,119,120,121,122,124,125,126,127,128,130,131,132,133,134,136,137,138,139,140,142,143 add $0,7 mul $0,31 div $0,26 mov $1,$0 sub $1,7
; A028289: Expansion of (1+x^2+x^3+x^5)/((1-x)(1-x^3)(1-x^4)(1-x^6)). ; 1,1,2,4,5,7,11,13,17,23,27,33,42,48,57,69,78,90,106,118,134,154,170,190,215,235,260,290,315,345,381,411,447,489,525,567,616,658,707,763,812,868,932,988,1052,1124,1188 add $0,2 lpb $0 mov $2,$0 trn $0,6 seq $2,7997 ; a(n) = ceiling((n-3)(n-4)/6). add $1,$2 lpe mov $0,$1
; A070653: a(n) = n^6 mod 30. ; 0,1,4,9,16,25,6,19,4,21,10,1,24,19,16,15,16,19,24,1,10,21,4,19,6,25,16,9,4,1,0,1,4,9,16,25,6,19,4,21,10,1,24,19,16,15,16,19,24,1,10,21,4,19,6,25,16,9,4,1,0,1,4,9,16,25,6,19,4,21,10,1,24,19,16,15,16,19,24,1 pow $0,2 mod $0,30
; A155120: a(n) = 2*(n^3 + n^2 + n - 1). ; -2,4,26,76,166,308,514,796,1166,1636,2218,2924,3766,4756,5906,7228,8734,10436,12346,14476,16838,19444,22306,25436,28846,32548,36554,40876,45526,50516,55858,61564,67646,74116,80986,88268,95974,104116,112706,121756,131278,141284,151786,162796,174326,186388,198994,212156,225886,240196,255098,270604,286726,303476,320866,338908,357614,376996,397066,417836,439318,461524,484466,508156,532606,557828,583834,610636,638246,666676,695938,726044,757006,788836,821546,855148,889654,925076,961426,998716,1036958,1076164,1116346,1157516,1199686,1242868,1287074,1332316,1378606,1425956,1474378,1523884,1574486,1626196,1679026,1732988,1788094,1844356,1901786,1960396 add $0,1 mov $1,$0 pow $0,2 add $0,2 sub $1,2 mul $0,$1 mul $0,2 add $0,4
; A198396: a(n) = 6^n-6*n. ; 1,0,24,198,1272,7746,46620,279894,1679568,10077642,60466116,362796990,2176782264,13060693938,78364164012,470184984486,2821109907360,16926659444634,101559956668308,609359740010382,3656158440062856,21936950640377730,131621703842267004,789730223053602678,4738381338321616752,28430288029929701226,170581728179578208100,1023490369077469249374,6140942214464815497048,36845653286788892983122,221073919720733357899596,1326443518324400147398470,7958661109946400884391744,47751966659678405306351418,286511799958070431838109492,1719070799748422591028657966,10314424798490535546171948840,61886548790943213277031694114,371319292745659279662190165788,2227915756473955677973140995862,13367494538843734067838845976336,80204967233062404407033075859210,481229803398374426442198455156484,2887378820390246558653190730940158,17324272922341479351919144385642232,103945637534048876111514866313854706,623673825204293256669089197883129580 mov $1,6 pow $1,$0 mov $2,$0 mul $2,6 sub $1,$2 mov $0,$1
// valr_utils.cpp // // Copyright (C) 2018 Jay Hesselberth and Kent Riemondy // // This file is part of valr. // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. #include "valr.h" // reuse of r-lib/vctrs approach for setting levels void init_factor(SEXP x, SEXP levels) { if (TYPEOF(x) != INTSXP) { Rf_errorcall(R_NilValue, "Internal error: Only integers can be made into factors"); } SEXP factor_string = PROTECT(Rf_allocVector(STRSXP, 1)) ; SET_STRING_ELT(factor_string, 0, Rf_mkChar("factor")) ; Rf_setAttrib(x, R_LevelsSymbol, levels); Rf_setAttrib(x, R_ClassSymbol, factor_string); UNPROTECT(1) ; } // Based on Kevin Ushey's implementation here: // http://kevinushey.github.io/blog/2015/01/24/understanding-data-frame-subsetting/ // Input row indices are assumed to be zero-based DataFrame rowwise_subset_df(const DataFrame& x, IntegerVector row_indices, bool r_index = false) { int column_indices_n = x.ncol(); int row_indices_n = row_indices.size(); if (r_index) { row_indices = row_indices - 1; } List output = no_init(column_indices_n); CharacterVector x_names = as<CharacterVector>(Rf_getAttrib(x, R_NamesSymbol)); output.attr("names") = x_names; for (int j = 0; j < column_indices_n; ++j) { SEXP element = VECTOR_ELT(x, j); SEXP vec = PROTECT( Rf_allocVector(TYPEOF(element), row_indices_n) ); for (int i = 0; i < row_indices_n; ++i) { // if the row_indices contain NA, return type dependent NAs // columns can only contain logical, numeric, character, integer, or list types switch (TYPEOF(vec)) { case REALSXP: if (row_indices[i] == NA_INTEGER) { REAL(vec)[i] = Rcpp::Vector<REALSXP>::get_na() ; } else { REAL(vec)[i] = REAL(element)[row_indices[i]]; } break; case INTSXP: case LGLSXP: if (row_indices[i] == NA_INTEGER) { INTEGER(vec)[i] = Rcpp::Vector<INTSXP>::get_na() ; } else { INTEGER(vec)[i] = INTEGER(element)[row_indices[i]]; } break; case STRSXP: if (row_indices[i] == NA_INTEGER) { SET_STRING_ELT(vec, i, Rcpp::Vector<STRSXP>::get_na()) ; break; } SET_STRING_ELT(vec, i, STRING_ELT(element, row_indices[i])); break; case VECSXP: if (row_indices[i] == NA_INTEGER) { SET_VECTOR_ELT(vec, i, Rcpp::Vector<VECSXP>::get_na()) ; } else { SET_VECTOR_ELT(vec, i, VECTOR_ELT(element, row_indices[i])); } break; default: { stop("Incompatible column type detected"); } } } if (Rf_isFactor(x[j])) { // set levels on output factor IntegerVector tmp = x[j] ; SEXP levels = PROTECT(tmp.attr("levels")) ; init_factor(vec, levels) ; UNPROTECT(1) ; } UNPROTECT(1); SET_VECTOR_ELT(output, j, vec); } Rf_copyMostAttrib(x, output); Rf_setAttrib(output, R_RowNamesSymbol, IntegerVector::create(NA_INTEGER, -row_indices_n)); return output; } // use std::vector<int> indices rather than IntegerVector DataFrame rowwise_subset_df(const DataFrame& x, std::vector<int> row_indices, bool r_index = false) { int column_indices_n = x.ncol(); int row_indices_n = row_indices.size(); if (r_index) { for (auto i:row_indices) { i--; } } List output = no_init(column_indices_n); CharacterVector x_names = as<CharacterVector>(Rf_getAttrib(x, R_NamesSymbol)); output.attr("names") = x_names; for (int j = 0; j < column_indices_n; ++j) { SEXP element = VECTOR_ELT(x, j); SEXP vec = PROTECT( Rf_allocVector(TYPEOF(element), row_indices_n) ); for (int i = 0; i < row_indices_n; ++i) { // if the row_indices contain NA, return type dependent NAs // columns can only contain logical, numeric, character, integer, or list types switch (TYPEOF(vec)) { case REALSXP: if (row_indices[i] == NA_INTEGER) { REAL(vec)[i] = Rcpp::Vector<REALSXP>::get_na() ; } else { REAL(vec)[i] = REAL(element)[row_indices[i]]; } break; case INTSXP: case LGLSXP: if (row_indices[i] == NA_INTEGER) { INTEGER(vec)[i] = Rcpp::Vector<INTSXP>::get_na() ; } else { INTEGER(vec)[i] = INTEGER(element)[row_indices[i]]; } break; case STRSXP: if (row_indices[i] == NA_INTEGER) { SET_STRING_ELT(vec, i, Rcpp::Vector<STRSXP>::get_na()) ; break; } SET_STRING_ELT(vec, i, STRING_ELT(element, row_indices[i])); break; case VECSXP: if (row_indices[i] == NA_INTEGER) { SET_VECTOR_ELT(vec, i, Rcpp::Vector<VECSXP>::get_na()) ; } else { SET_VECTOR_ELT(vec, i, VECTOR_ELT(element, row_indices[i])); } break; default: { stop("Incompatible column type detected"); } } } if (Rf_isFactor(x[j])) { // set levels on output factor IntegerVector tmp = x[j] ; SEXP levels = PROTECT(tmp.attr("levels")) ; init_factor(vec, levels) ; UNPROTECT(1); } UNPROTECT(1); SET_VECTOR_ELT(output, j, vec); } Rf_copyMostAttrib(x, output); Rf_setAttrib(output, R_RowNamesSymbol, IntegerVector::create(NA_INTEGER, -row_indices_n)); return output; } DataFrame subset_dataframe(const DataFrame& df, std::vector<int> indices) { DataFrame out = rowwise_subset_df(df, indices, false); return (out) ; } DataFrame subset_dataframe(const DataFrame& df, IntegerVector indices) { DataFrame out = rowwise_subset_df(df, indices, false); return (out) ; } // ValrGroupedDataFrame class definition ValrGroupedDataFrame::ValrGroupedDataFrame(DataFrame x): data_(check_is_grouped(x)), groups(data_.attr("groups")) {} // return group_data data.frame without .rows column (always last in group_data) DataFrame extract_groups(const DataFrame& x) { int n = x.ncol() - 1; CharacterVector df_names = x.names() ; List res(n); CharacterVector new_names(n) ; for (int i = 0; i < n; i++) { res[i] = x[i] ; new_names[i] = df_names[i] ; } set_rownames(res, x.nrow()) ; res.names() = new_names ; res.attr("class") = "data.frame" ; return res; }
;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php. ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; Module Name: ; ; ReadDs.Asm ; ; Abstract: ; ; AsmReadDs function ; ; Notes: ; ;------------------------------------------------------------------------------ .code ;------------------------------------------------------------------------------ ; UINT16 ; EFIAPI ; AsmReadDs ( ; VOID ; ); ;------------------------------------------------------------------------------ AsmReadDs PROC mov eax, ds ret AsmReadDs ENDP END
; A224338: Number of idempotent 7 X 7 0..n matrices of rank 6. ; Submitted by Christian Krause ; 889,10199,57337,218743,653177,1647079,3670009,7440167,13999993,24801847,41803769,67575319,105413497,159468743,234881017,337925959,476171129,658642327,895999993,1200725687,1587318649,2072502439,2675441657,3417968743,4324820857,5423886839,6746464249,8327526487,10205999993,12425051527,15032385529,18080551559,21627261817,25735718743,30474952697,35920169719,42153109369,49262412647,57343999993,66501459367,76846444409,88499082679,101588393977,116252718743,132640156537,150909014599,171228266489 add $0,2 pow $0,6 sub $0,64 mul $0,14 add $0,889
// Copyright Daniel Wallin, David Abrahams 2005. // Copyright Cromwell D. Enage 2017. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef ARG_LIST_050329_HPP #define ARG_LIST_050329_HPP namespace boost { namespace parameter { namespace aux { // // Structures used to build the tuple of actual arguments. The tuple is a // nested cons-style list of arg_list specializations terminated by an // empty_arg_list. // // Each specialization of arg_list is derived from its successor in the // list type. This feature is used along with using declarations to build // member function overload sets that can match against keywords. // // MPL sequence support struct arg_list_tag; template <typename T> struct get_reference { typedef typename T::reference type; }; }}} // namespace boost::parameter::aux #include <boost/parameter/config.hpp> #if defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) namespace boost { namespace parameter { namespace aux { struct value_type_is_void { }; struct value_type_is_not_void { }; }}} // namespace boost::parameter::aux #endif #include <boost/parameter/aux_/void.hpp> #include <boost/parameter/aux_/yesno.hpp> #include <boost/parameter/aux_/result_of0.hpp> #include <boost/parameter/aux_/default.hpp> #if defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) #include <utility> #if defined(BOOST_PARAMETER_CAN_USE_MP11) #include <boost/mp11/integral.hpp> #include <boost/mp11/list.hpp> #include <boost/mp11/utility.hpp> #include <type_traits> #endif namespace boost { namespace parameter { namespace aux { // Terminates arg_list<> and represents an empty list. Since this is just // the terminating case, you might want to look at arg_list first to get a // feel for what's really happening here. struct empty_arg_list { struct tagged_arg { typedef ::boost::parameter::void_ value_type; }; // Variadic constructor also serves as default constructor. template <typename ...Args> inline BOOST_CONSTEXPR empty_arg_list(Args&&...) { } // A metafunction class that, given a keyword and a default type, // returns the appropriate result type for a keyword lookup given // that default. struct binding { template <typename KW, typename Default, typename Reference> struct apply { typedef Default type; }; #if defined(BOOST_PARAMETER_CAN_USE_MP11) template <typename KW, typename Default, typename Reference> using fn = Default; #endif }; // Terminator for has_key, indicating that the keyword is unique. template <typename KW> static ::boost::parameter::aux::no_tag has_key(KW*); // If either of these operators are called, it means there is no // argument in the list that matches the supplied keyword. Just // return the default value. template <typename K, typename Default> inline BOOST_CONSTEXPR Default& operator[](::boost::parameter::aux::default_<K,Default> x) const { return x.value; } template <typename K, typename Default> inline BOOST_CONSTEXPR Default&& operator[](::boost::parameter::aux::default_r_<K,Default> x) const { return ::std::forward<Default>(x.value); } // If this operator is called, it means there is no argument in the // list that matches the supplied keyword. Just evaluate and return // the default value. template <typename K, typename F> inline BOOST_CONSTEXPR typename ::boost::parameter::aux::result_of0<F>::type operator[](BOOST_PARAMETER_lazy_default_fallback<K,F> x) const { return x.compute_default(); } // No argument corresponding to ParameterRequirements::key_type // was found if we match this overload, so unless that parameter // has a default, we indicate that the actual arguments don't // match the function's requirements. template <typename ParameterRequirements, typename ArgPack> static typename ParameterRequirements::has_default satisfies(ParameterRequirements*, ArgPack*); // MPL sequence support typedef ::boost::parameter::aux::empty_arg_list type; // convenience // For dispatching to sequence intrinsics typedef ::boost::parameter::aux::arg_list_tag tag; }; }}} // namespace boost::parameter::aux #include <boost/parameter/aux_/preprocessor/nullptr.hpp> #include <boost/parameter/aux_/yesno.hpp> #include <boost/parameter/aux_/is_maybe.hpp> #include <boost/parameter/aux_/tagged_argument_fwd.hpp> #include <boost/parameter/aux_/parameter_requirements.hpp> #include <boost/parameter/aux_/augment_predicate.hpp> #include <boost/parameter/keyword_fwd.hpp> #include <boost/mpl/bool.hpp> #include <boost/mpl/if.hpp> #include <boost/mpl/eval_if.hpp> #include <boost/mpl/apply_wrap.hpp> #include <boost/mpl/assert.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/core/enable_if.hpp> namespace boost { namespace parameter { namespace aux { // A tuple of tagged arguments, terminated with empty_arg_list. Every // TaggedArg is an instance of tagged_argument<> or // tagged_argument_rref<>. template < typename TaggedArg , typename Next = ::boost::parameter::aux::empty_arg_list #if defined(BOOST_PARAMETER_CAN_USE_MP11) , typename EmitsErrors = ::boost::mp11::mp_true #else , typename EmitsErrors = ::boost::mpl::true_ #endif > class arg_list : public Next { #if defined(BOOST_PARAMETER_CAN_USE_MP11) using _holds_maybe = typename ::boost::parameter::aux ::is_maybe<typename TaggedArg::value_type>::type; #else typedef typename ::boost::parameter::aux ::is_maybe<typename TaggedArg::value_type>::type _holds_maybe; #endif TaggedArg arg; // Stores the argument public: typedef TaggedArg tagged_arg; typedef ::boost::parameter::aux::arg_list<TaggedArg,Next> self; typedef typename TaggedArg::key_type key_type; #if defined(BOOST_PARAMETER_CAN_USE_MP11) using reference = typename ::boost::mp11::mp_if< _holds_maybe , ::boost::parameter::aux ::get_reference<typename TaggedArg::value_type> , ::boost::parameter::aux::get_reference<TaggedArg> >::type; using value_type = ::boost::mp11 ::mp_if<_holds_maybe,reference,typename TaggedArg::value_type>; #else // !defined(BOOST_PARAMETER_CAN_USE_MP11) typedef typename ::boost::mpl::eval_if< _holds_maybe , ::boost::parameter::aux ::get_reference<typename TaggedArg::value_type> , ::boost::parameter::aux::get_reference<TaggedArg> >::type reference; typedef typename ::boost::mpl::if_< _holds_maybe , reference , typename TaggedArg::value_type >::type value_type; #endif // BOOST_PARAMETER_CAN_USE_MP11 // Create a new list by prepending arg to a copy of tail. Used when // incrementally building this structure with the comma operator. inline BOOST_CONSTEXPR arg_list( TaggedArg const& head , Next const& tail ) : Next(tail), arg(head) { } // Store the arguments in successive nodes of this list. // Use tag dispatching to determine whether to forward all arguments // to the Next constructor, or store the first argument and forward // the rest. -- Cromwell D. Enage template <typename A0> inline BOOST_CONSTEXPR arg_list( ::boost::parameter::aux::value_type_is_not_void , A0&& a0 ) : Next( #if defined(BOOST_PARAMETER_CAN_USE_MP11) ::boost::mp11::mp_if< ::std::is_same< #else typename ::boost::mpl::if_< ::boost::is_same< #endif typename Next::tagged_arg::value_type , ::boost::parameter::void_ > , ::boost::parameter::aux::value_type_is_void , ::boost::parameter::aux::value_type_is_not_void #if defined(BOOST_PARAMETER_CAN_USE_MP11) >() #else >::type() #endif ) , arg(::std::forward<A0>(a0)) { } template <typename ...Args> inline BOOST_CONSTEXPR arg_list( ::boost::parameter::aux::value_type_is_void , Args&&... args ) : Next( #if defined(BOOST_PARAMETER_CAN_USE_MP11) ::boost::mp11::mp_if< ::std::is_same< #else typename ::boost::mpl::if_< ::boost::is_same< #endif typename Next::tagged_arg::value_type , ::boost::parameter::void_ > , ::boost::parameter::aux::value_type_is_void , ::boost::parameter::aux::value_type_is_not_void #if defined(BOOST_PARAMETER_CAN_USE_MP11) >() #else >::type() #endif , ::std::forward<Args>(args)... ) , arg(::boost::parameter::aux::void_reference()) { } template <typename A0, typename A1, typename ...Args> inline BOOST_CONSTEXPR arg_list( ::boost::parameter::aux::value_type_is_not_void , A0&& a0 , A1&& a1 , Args&&... args ) : Next( #if defined(BOOST_PARAMETER_CAN_USE_MP11) ::boost::mp11::mp_if< ::std::is_same< #else typename ::boost::mpl::if_< ::boost::is_same< #endif typename Next::tagged_arg::value_type , ::boost::parameter::void_ > , ::boost::parameter::aux::value_type_is_void , ::boost::parameter::aux::value_type_is_not_void #if defined(BOOST_PARAMETER_CAN_USE_MP11) >() #else >::type() #endif , ::std::forward<A1>(a1) , ::std::forward<Args>(args)... ) , arg(::std::forward<A0>(a0)) { } // A metafunction class that, given a keyword and a default type, // returns the appropriate result type for a keyword lookup given // that default. struct binding { typedef typename Next::binding next_binding; template <typename KW, typename Default, typename Reference> struct apply { typedef typename ::boost::mpl::eval_if< ::boost::is_same<KW,key_type> , ::boost::mpl::if_<Reference,reference,value_type> , ::boost::mpl ::apply_wrap3<next_binding,KW,Default,Reference> >::type type; }; #if defined(BOOST_PARAMETER_CAN_USE_MP11) template <typename KW, typename Default, typename Reference> using fn = ::boost::mp11::mp_if< ::std::is_same<KW,key_type> , ::boost::mp11::mp_if<Reference,reference,value_type> , ::boost::mp11::mp_apply_q< next_binding , ::boost::mp11::mp_list<KW,Default,Reference> > >; #endif }; // Overload for key_type, so the assert below will fire // if the same keyword is used again. static ::boost::parameter::aux::yes_tag has_key(key_type*); using Next::has_key; private: #if defined(BOOST_PARAMETER_CAN_USE_MP11) using _has_unique_key = ::boost::mp11::mp_bool< #else typedef ::boost::mpl::bool_< #endif sizeof( Next::has_key( static_cast<key_type*>(BOOST_PARAMETER_AUX_PP_NULLPTR) ) ) == sizeof(::boost::parameter::aux::no_tag) #if defined(BOOST_PARAMETER_CAN_USE_MP11) >; #else > _has_unique_key; #endif #if defined(BOOST_PARAMETER_CAN_USE_MP11) static_assert( !(EmitsErrors::value) || (_has_unique_key::value) , "duplicate keyword" ); #else BOOST_MPL_ASSERT_MSG( !(EmitsErrors::value) || (_has_unique_key::value) , duplicate_keyword , (key_type) ); #endif // // Begin implementation of indexing operators // for looking up specific arguments by name. // // Helpers that handle the case when TaggedArg is empty<T>. template <typename D> inline BOOST_CONSTEXPR reference #if defined(BOOST_PARAMETER_CAN_USE_MP11) get_default(D const&, ::boost::mp11::mp_false) const #else get_default(D const&, ::boost::mpl::false_) const #endif { return this->arg.get_value(); } template <typename D> inline BOOST_CONSTEXPR reference #if defined(BOOST_PARAMETER_CAN_USE_MP11) get_default(D const& d, ::boost::mp11::mp_true) const #else get_default(D const& d, ::boost::mpl::true_) const #endif { return ( this->arg.get_value() ? this->arg.get_value().get() : this->arg.get_value().construct(d.value) ); } public: inline BOOST_CONSTEXPR reference operator[](::boost::parameter::keyword<key_type> const&) const { #if !defined(BOOST_NO_CXX14_CONSTEXPR) #if defined(BOOST_PARAMETER_CAN_USE_MP11) static_assert(!_holds_maybe::value, "must not hold maybe"); #elif !( \ BOOST_WORKAROUND(BOOST_GCC, >= 40700) && \ BOOST_WORKAROUND(BOOST_GCC, < 40900) \ ) && !BOOST_WORKAROUND(BOOST_GCC, >= 50000) && \ !BOOST_WORKAROUND(BOOST_MSVC, < 1910) BOOST_MPL_ASSERT_NOT((_holds_maybe)); #endif #endif return this->arg.get_value(); } template <typename Default> inline BOOST_CONSTEXPR reference operator[]( ::boost::parameter::aux::default_<key_type,Default> const& d ) const { return this->get_default(d, _holds_maybe()); } template <typename Default> inline BOOST_CONSTEXPR reference operator[]( ::boost::parameter::aux::default_r_<key_type,Default> const& d ) const { return this->get_default(d, _holds_maybe()); } template <typename Default> inline BOOST_CONSTEXPR reference operator[]( BOOST_PARAMETER_lazy_default_fallback<key_type,Default> const& ) const { #if !defined(BOOST_NO_CXX14_CONSTEXPR) #if defined(BOOST_PARAMETER_CAN_USE_MP11) static_assert(!_holds_maybe::value, "must not hold maybe"); #elif !( \ BOOST_WORKAROUND(BOOST_GCC, >= 40700) && \ BOOST_WORKAROUND(BOOST_GCC, < 40900) \ ) && !BOOST_WORKAROUND(BOOST_GCC, >= 50000) && \ !BOOST_WORKAROUND(BOOST_MSVC, < 1910) BOOST_MPL_ASSERT_NOT((_holds_maybe)); #endif #endif return this->arg.get_value(); } // Builds an overload set including operator[]s defined // in base classes. using Next::operator[]; // // End of indexing support // // For parameter_requirements matching this node's key_type, return // a bool constant wrapper indicating whether the requirements are // satisfied by TaggedArg. Used only for compile-time computation // and never really called, so a declaration is enough. template <typename HasDefault, typename Predicate, typename ArgPack> static typename ::boost::lazy_enable_if< #if defined(BOOST_PARAMETER_CAN_USE_MP11) ::boost::mp11::mp_if< EmitsErrors , ::boost::mp11::mp_true , _has_unique_key > , ::boost::parameter::aux::augment_predicate_mp11< #else typename ::boost::mpl::if_< EmitsErrors , ::boost::mpl::true_ , _has_unique_key >::type , ::boost::parameter::aux::augment_predicate< #endif Predicate , reference , key_type , value_type , ArgPack > >::type satisfies( ::boost::parameter::aux::parameter_requirements< key_type , Predicate , HasDefault >* , ArgPack* ); // Builds an overload set including satisfies functions defined // in base classes. using Next::satisfies; // Comma operator to compose argument list without using parameters<>. // Useful for argument lists with undetermined length. template <typename KW, typename T2> inline BOOST_CONSTEXPR ::boost::parameter::aux::arg_list< ::boost::parameter::aux::tagged_argument<KW,T2> , self > operator,( ::boost::parameter::aux::tagged_argument<KW,T2> const& x ) const { return ::boost::parameter::aux::arg_list< ::boost::parameter::aux::tagged_argument<KW,T2> , self >(x, *this); } template <typename KW, typename T2> inline BOOST_CONSTEXPR ::boost::parameter::aux::arg_list< ::boost::parameter::aux::tagged_argument_rref<KW,T2> , self > operator,( ::boost::parameter::aux::tagged_argument_rref<KW,T2> const& x ) const { return ::boost::parameter::aux::arg_list< ::boost::parameter::aux::tagged_argument_rref<KW,T2> , self >(x, *this); } // MPL sequence support typedef self type; // Convenience for users typedef Next tail_type; // For the benefit of iterators // For dispatching to sequence intrinsics typedef ::boost::parameter::aux::arg_list_tag tag; }; }}} // namespace boost::parameter::aux #else // !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) #include <boost/preprocessor/repetition/enum_params.hpp> #include <boost/preprocessor/facilities/intercept.hpp> namespace boost { namespace parameter { namespace aux { // Terminates arg_list<> and represents an empty list. Since this is just // the terminating case, you might want to look at arg_list first to get a // feel for what's really happening here. struct empty_arg_list { inline BOOST_CONSTEXPR empty_arg_list() { } // Constructor taking BOOST_PARAMETER_COMPOSE_MAX_ARITY empty_arg_list // arguments; this makes initialization. inline BOOST_CONSTEXPR empty_arg_list( BOOST_PP_ENUM_PARAMS( BOOST_PARAMETER_COMPOSE_MAX_ARITY , ::boost::parameter::void_ BOOST_PP_INTERCEPT ) ) { } // A metafunction class that, given a keyword and a default type, // returns the appropriate result type for a keyword lookup given // that default. struct binding { template <typename KW, typename Default, typename Reference> struct apply { typedef Default type; }; }; // Terminator for has_key, indicating that the keyword is unique. template <typename KW> static ::boost::parameter::aux::no_tag has_key(KW*); #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // The overload set technique doesn't work with these older compilers, // so they need some explicit handholding. // A metafunction class that, given a keyword, returns the type of the // base sublist whose get() function can produce the value for that key. struct key_owner { template <typename KW> struct apply { typedef ::boost::parameter::aux::empty_arg_list type; }; }; #endif // Borland workarounds needed // If either of these operators are called, it means there is no // argument in the list that matches the supplied keyword. Just // return the default value. template <typename K, typename Default> inline BOOST_CONSTEXPR Default& operator[](::boost::parameter::aux::default_<K,Default> x) const { return x.value; } // If this operator is called, it means there is no argument in the // list that matches the supplied keyword. Just evaluate and return // the default value. template <typename K, typename F> inline BOOST_CONSTEXPR typename ::boost::parameter::aux::result_of0<F>::type operator[](BOOST_PARAMETER_lazy_default_fallback<K,F> x) const { return x.compute_default(); } // No argument corresponding to ParameterRequirements::key_type // was found if we match this overload, so unless that parameter // has a default, we indicate that the actual arguments don't // match the function's requirements. template <typename ParameterRequirements, typename ArgPack> static typename ParameterRequirements::has_default satisfies(ParameterRequirements*, ArgPack*); // MPL sequence support typedef ::boost::parameter::aux::empty_arg_list type; // convenience // For dispatching to sequence intrinsics typedef ::boost::parameter::aux::arg_list_tag tag; }; }}} // namespace boost::parameter::aux #include <boost/parameter/aux_/yesno.hpp> #include <boost/parameter/aux_/is_maybe.hpp> #include <boost/parameter/aux_/tagged_argument_fwd.hpp> #include <boost/parameter/aux_/parameter_requirements.hpp> #include <boost/parameter/aux_/augment_predicate.hpp> #include <boost/parameter/keyword_fwd.hpp> #include <boost/mpl/bool.hpp> #include <boost/mpl/if.hpp> #include <boost/mpl/eval_if.hpp> #include <boost/mpl/apply_wrap.hpp> #include <boost/mpl/assert.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/preprocessor/repetition/enum_binary_params.hpp> #include <boost/preprocessor/repetition/enum_shifted_params.hpp> #if !defined(BOOST_NO_SFINAE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) #include <boost/core/enable_if.hpp> #endif #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) #include <boost/parameter/aux_/preprocessor/nullptr.hpp> #endif namespace boost { namespace parameter { namespace aux { // A tuple of tagged arguments, terminated with empty_arg_list. Every // TaggedArg is an instance of tagged_argument<>. template < typename TaggedArg , typename Next = ::boost::parameter::aux::empty_arg_list , typename EmitsErrors = ::boost::mpl::true_ > class arg_list : public Next { typedef typename ::boost::parameter::aux ::is_maybe<typename TaggedArg::value_type>::type _holds_maybe; TaggedArg arg; // Stores the argument public: typedef TaggedArg tagged_arg; typedef ::boost::parameter::aux::arg_list<TaggedArg,Next> self; typedef typename TaggedArg::key_type key_type; typedef typename ::boost::mpl::eval_if< _holds_maybe , ::boost::parameter::aux ::get_reference<typename TaggedArg::value_type> , ::boost::parameter::aux::get_reference<TaggedArg> >::type reference; typedef typename ::boost::mpl::if_< _holds_maybe , reference , typename TaggedArg::value_type >::type value_type; // Create a new list by prepending arg to a copy of tail. Used when // incrementally building this structure with the comma operator. inline BOOST_CONSTEXPR arg_list( TaggedArg const& head , Next const& tail ) : Next(tail), arg(head) { } // Store the arguments in successive nodes of this list. template < // typename A0, typename A1, ... BOOST_PP_ENUM_PARAMS( BOOST_PARAMETER_COMPOSE_MAX_ARITY , typename A ) > inline BOOST_CONSTEXPR arg_list( // A0& a0, A1& a1, ... BOOST_PP_ENUM_BINARY_PARAMS( BOOST_PARAMETER_COMPOSE_MAX_ARITY , A , & a ) ) : Next( // a1, a2, ... BOOST_PP_ENUM_SHIFTED_PARAMS( BOOST_PARAMETER_COMPOSE_MAX_ARITY , a ) , ::boost::parameter::aux::void_reference() ) , arg(a0) { } // A metafunction class that, given a keyword and a default type, // returns the appropriate result type for a keyword lookup given // that default. struct binding { typedef typename Next::binding next_binding; template <typename KW, typename Default, typename Reference> struct apply { typedef typename ::boost::mpl::eval_if< ::boost::is_same<KW,key_type> , ::boost::mpl::if_<Reference,reference,value_type> , ::boost::mpl::apply_wrap3< next_binding , KW , Default , Reference > >::type type; }; }; #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // Overload for key_type, so the assert below will fire // if the same keyword is used again. static ::boost::parameter::aux::yes_tag has_key(key_type*); using Next::has_key; private: #if defined(BOOST_NO_SFINAE) || BOOST_WORKAROUND(BOOST_MSVC, < 1800) BOOST_MPL_ASSERT_MSG( sizeof( Next::has_key( static_cast<key_type*>(BOOST_PARAMETER_AUX_PP_NULLPTR) ) ) == sizeof(::boost::parameter::aux::no_tag) , duplicate_keyword , (key_type) ); #else typedef ::boost::mpl::bool_< sizeof( Next::has_key( static_cast<key_type*>(BOOST_PARAMETER_AUX_PP_NULLPTR) ) ) == sizeof(::boost::parameter::aux::no_tag) > _has_unique_key; BOOST_MPL_ASSERT_MSG( !(EmitsErrors::value) || (_has_unique_key::value) , duplicate_keyword , (key_type) ); #endif // SFINAE/MSVC workarounds needed #endif // Borland workarounds not needed private: // // Begin implementation of indexing operators // for looking up specific arguments by name. // // Helpers that handle the case when TaggedArg is empty<T>. template <typename D> inline BOOST_CONSTEXPR reference get_default(D const&, ::boost::mpl::false_) const { return this->arg.get_value(); } template <typename D> inline BOOST_CONSTEXPR reference get_default(D const& d, ::boost::mpl::true_) const { return ( this->arg.get_value() ? this->arg.get_value().get() : this->arg.get_value().construct(d.value) ); } public: #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // These older compilers don't support the overload set creation // idiom well, so we need to do all the return type calculation // for the compiler and dispatch through an outer function template. // A metafunction class that, given a keyword, returns the base // sublist whose get() function can produce the value for that key. struct key_owner { typedef typename Next::key_owner next_key_owner; template <typename KW> struct apply { typedef typename ::boost::mpl::eval_if< ::boost::is_same<KW,key_type> , ::boost::mpl::identity< ::boost::parameter::aux::arg_list<TaggedArg,Next> > , ::boost::mpl::apply_wrap1<next_key_owner,KW> >::type type; }; }; // Outer indexing operators that dispatch to the right node's // get() function. template <typename KW> inline BOOST_CONSTEXPR typename ::boost::mpl::apply_wrap3< binding , KW , ::boost::parameter::void_ , ::boost::mpl::true_ >::type operator[](::boost::parameter::keyword<KW> const& x) const { typename ::boost::mpl::apply_wrap1<key_owner,KW>::type const& sublist = *this; return sublist.get(x); } template <typename KW, typename Default> inline BOOST_CONSTEXPR typename ::boost::mpl::apply_wrap3< binding , KW , Default& , ::boost::mpl::true_ >::type operator[]( ::boost::parameter::aux::default_<KW,Default> const& x ) const { typename ::boost::mpl::apply_wrap1<key_owner,KW>::type const& sublist = *this; return sublist.get(x); } template <typename KW, typename F> inline BOOST_CONSTEXPR typename ::boost::mpl::apply_wrap3< binding , KW , typename ::boost::parameter::aux::result_of0<F>::type , ::boost::mpl::true_ >::type operator[]( BOOST_PARAMETER_lazy_default_fallback<KW,F> const& x ) const { typename ::boost::mpl::apply_wrap1<key_owner,KW>::type const& sublist = *this; return sublist.get(x); } // These just return the stored value; when empty_arg_list is reached, // indicating no matching argument was passed, the default is // returned, or if no default_ or lazy_default was passed, compilation // fails. inline BOOST_CONSTEXPR reference get(::boost::parameter::keyword<key_type> const&) const { BOOST_MPL_ASSERT_NOT((_holds_maybe)); return this->arg.get_value(); } template <typename Default> inline BOOST_CONSTEXPR reference get( ::boost::parameter::aux::default_<key_type,Default> const& d ) const { return this->get_default(d, _holds_maybe()); } template <typename Default> inline BOOST_CONSTEXPR reference get( BOOST_PARAMETER_lazy_default_fallback<key_type,Default> const& ) const { return this->arg.get_value(); } #else // !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) inline BOOST_CONSTEXPR reference operator[](::boost::parameter::keyword<key_type> const&) const { BOOST_MPL_ASSERT_NOT((_holds_maybe)); return this->arg.get_value(); } template <typename Default> inline BOOST_CONSTEXPR reference operator[]( ::boost::parameter::aux::default_<key_type,Default> const& d ) const { return this->get_default(d, _holds_maybe()); } template <typename Default> inline BOOST_CONSTEXPR reference operator[]( BOOST_PARAMETER_lazy_default_fallback<key_type,Default> const& ) const { BOOST_MPL_ASSERT_NOT((_holds_maybe)); return this->arg.get_value(); } // Builds an overload set including operator[]s defined // in base classes. using Next::operator[]; // // End of indexing support // // For parameter_requirements matching this node's key_type, return // a bool constant wrapper indicating whether the requirements are // satisfied by TaggedArg. Used only for compile-time computation // and never really called, so a declaration is enough. template <typename HasDefault, typename Predicate, typename ArgPack> static typename #if !defined(BOOST_NO_SFINAE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) ::boost::lazy_enable_if< typename ::boost::mpl::if_< EmitsErrors , ::boost::mpl::true_ , _has_unique_key >::type, #endif ::boost::parameter::aux::augment_predicate< Predicate , reference , key_type , value_type , ArgPack #if !defined(BOOST_NO_SFINAE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) > #endif >::type satisfies( ::boost::parameter::aux::parameter_requirements< key_type , Predicate , HasDefault >* , ArgPack* ); // Builds an overload set including satisfies functions defined // in base classes. using Next::satisfies; #endif // Borland workarounds needed // Comma operator to compose argument list without using parameters<>. // Useful for argument lists with undetermined length. template <typename KW, typename T2> inline BOOST_CONSTEXPR ::boost::parameter::aux::arg_list< ::boost::parameter::aux::tagged_argument<KW,T2> , self > operator,( ::boost::parameter::aux::tagged_argument<KW,T2> const& x ) const { return ::boost::parameter::aux::arg_list< ::boost::parameter::aux::tagged_argument<KW,T2> , self >(x, *this); } // MPL sequence support typedef self type; // Convenience for users typedef Next tail_type; // For the benefit of iterators // For dispatching to sequence intrinsics typedef ::boost::parameter::aux::arg_list_tag tag; }; }}} // namespace boost::parameter::aux #endif // BOOST_PARAMETER_HAS_PERFECT_FORWARDING #if defined(BOOST_PARAMETER_CAN_USE_MP11) namespace boost { namespace parameter { namespace aux { template <typename ...ArgTuples> struct arg_list_cons; template <> struct arg_list_cons<> { using type = ::boost::parameter::aux::empty_arg_list; }; template <typename ArgTuple0, typename ...Tuples> struct arg_list_cons<ArgTuple0,Tuples...> { using type = ::boost::parameter::aux::arg_list< typename ArgTuple0::tagged_arg , typename ::boost::parameter::aux::arg_list_cons<Tuples...>::type , typename ArgTuple0::emits_errors >; }; template < typename Keyword , typename TaggedArg , typename EmitsErrors = ::boost::mp11::mp_true > struct flat_like_arg_tuple { using tagged_arg = TaggedArg; using emits_errors = EmitsErrors; }; template <typename ...ArgTuples> class flat_like_arg_list : public ::boost::parameter::aux::arg_list_cons<ArgTuples...>::type { using _base_type = typename ::boost::parameter::aux ::arg_list_cons<ArgTuples...>::type; public: inline BOOST_CONSTEXPR flat_like_arg_list( typename _base_type::tagged_arg const& head , typename _base_type::tail_type const& tail ) : _base_type(head, tail) { } template <typename ...Args> inline BOOST_CONSTEXPR flat_like_arg_list(Args&&... args) : _base_type(::std::forward<Args>(args)...) { } using _base_type::operator[]; using _base_type::satisfies; // Comma operator to compose argument list without using parameters<>. // Useful for argument lists with undetermined length. template <typename TaggedArg> inline BOOST_CONSTEXPR ::boost::parameter::aux::flat_like_arg_list< ::boost::parameter::aux::flat_like_arg_tuple< typename TaggedArg::base_type::key_type , typename TaggedArg::base_type > , ArgTuples... > operator,(TaggedArg const& x) const { return ::boost::parameter::aux::flat_like_arg_list< ::boost::parameter::aux::flat_like_arg_tuple< typename TaggedArg::base_type::key_type , typename TaggedArg::base_type > , ArgTuples... >( static_cast<typename TaggedArg::base_type const&>(x) , static_cast<_base_type const&>(*this) ); } }; template <> class flat_like_arg_list<> : public ::boost::parameter::aux::empty_arg_list { using _base_type = ::boost::parameter::aux::empty_arg_list; public: template <typename ...Args> inline BOOST_CONSTEXPR flat_like_arg_list(Args&&... args) : _base_type(::std::forward<Args>(args)...) { } using _base_type::operator[]; using _base_type::satisfies; // Comma operator to compose argument list without using parameters<>. // Useful for argument lists with undetermined length. template <typename TaggedArg> inline BOOST_CONSTEXPR ::boost::parameter::aux::flat_like_arg_list< ::boost::parameter::aux::flat_like_arg_tuple< typename TaggedArg::base_type::key_type , typename TaggedArg::base_type > > operator,(TaggedArg const& x) const { return ::boost::parameter::aux::flat_like_arg_list< ::boost::parameter::aux::flat_like_arg_tuple< typename TaggedArg::base_type::key_type , typename TaggedArg::base_type > >( static_cast<typename TaggedArg::base_type const&>(x) , static_cast<_base_type const&>(*this) ); } }; }}} // namespace boost::parameter::aux #endif // BOOST_PARAMETER_CAN_USE_MP11 #include <boost/mpl/iterator_tags.hpp> namespace boost { namespace parameter { namespace aux { // MPL sequence support template <typename ArgumentPack> struct arg_list_iterator { typedef ::boost::mpl::forward_iterator_tag category; // The incremented iterator typedef ::boost::parameter::aux ::arg_list_iterator<typename ArgumentPack::tail_type> next; // dereferencing yields the key type typedef typename ArgumentPack::key_type type; }; template <> struct arg_list_iterator< ::boost::parameter::aux::empty_arg_list> { }; }}} // namespace boost::parameter::aux #include <boost/mpl/begin_end_fwd.hpp> // MPL sequence support namespace boost { namespace mpl { template <> struct begin_impl< ::boost::parameter::aux::arg_list_tag> { template <typename S> struct apply { typedef ::boost::parameter::aux::arg_list_iterator<S> type; }; }; template <> struct end_impl< ::boost::parameter::aux::arg_list_tag> { template <typename> struct apply { typedef ::boost::parameter::aux::arg_list_iterator< ::boost::parameter::aux::empty_arg_list > type; }; }; }} // namespace boost::mpl #include <boost/parameter/value_type.hpp> #include <boost/mpl/has_key_fwd.hpp> #include <boost/type_traits/is_void.hpp> namespace boost { namespace mpl { template <> struct has_key_impl< ::boost::parameter::aux::arg_list_tag> { template <typename ArgList, typename Keyword> struct apply { typedef typename ::boost::mpl::if_< ::boost::is_void< typename ::boost::parameter ::value_type<ArgList,Keyword,void>::type > , ::boost::mpl::false_ , ::boost::mpl::true_ >::type type; }; }; }} // namespace boost::mpl #include <boost/mpl/count_fwd.hpp> #include <boost/mpl/int.hpp> namespace boost { namespace mpl { template <> struct count_impl< ::boost::parameter::aux::arg_list_tag> { template <typename ArgList, typename Keyword> struct apply { typedef typename ::boost::mpl::if_< ::boost::is_void< typename ::boost::parameter ::value_type<ArgList,Keyword,void>::type > , ::boost::mpl::int_<0> , ::boost::mpl::int_<1> >::type type; }; }; }} // namespace boost::mpl #include <boost/mpl/key_type_fwd.hpp> #include <boost/mpl/identity.hpp> namespace boost { namespace mpl { template <> struct key_type_impl< ::boost::parameter::aux::arg_list_tag> { template <typename ArgList, typename Keyword> struct apply { typedef typename ::boost::mpl::eval_if< ::boost::is_void< typename ::boost::parameter ::value_type<ArgList,Keyword,void>::type > , void , ::boost::mpl::identity<Keyword> >::type type; }; }; }} // namespace boost::mpl #include <boost/mpl/value_type_fwd.hpp> namespace boost { namespace mpl { template <> struct value_type_impl< ::boost::parameter::aux::arg_list_tag> : ::boost::mpl::key_type_impl< ::boost::parameter::aux::arg_list_tag> { }; }} // namespace boost::mpl #include <boost/mpl/at_fwd.hpp> namespace boost { namespace mpl { template <> struct at_impl< ::boost::parameter::aux::arg_list_tag> : ::boost::mpl::key_type_impl< ::boost::parameter::aux::arg_list_tag> { }; }} // namespace boost::mpl #include <boost/mpl/order_fwd.hpp> #include <boost/mpl/void.hpp> #include <boost/mpl/find.hpp> #include <boost/mpl/distance.hpp> namespace boost { namespace mpl { template <> struct order_impl< ::boost::parameter::aux::arg_list_tag> { template <typename ArgList, typename Keyword> struct apply { typedef typename ::boost::mpl::find<ArgList,Keyword>::type Itr; typedef typename ::boost::mpl::eval_if< ::boost::is_void< typename ::boost::parameter ::value_type<ArgList,Keyword,void>::type > , ::boost::mpl::identity< ::boost::mpl::void_> , ::boost::mpl::distance< Itr , ::boost::parameter::aux::arg_list_iterator< ::boost::parameter::aux::empty_arg_list > > >::type type; }; }; }} // namespace boost::mpl #endif // include guard
ORG $2000 ORCC #$50 LDX #$6000 ; 3 clocks LDB #$02 ; 2 clocks LOAD_LOOP BITB $FD07 BEQ LOAD_LOOP LDA $FD06 STA ,X+ CMPX #$6100 BNE LOAD_LOOP RTS END_OF_PROGRAM ; Usage: ; FM-7 to FM77AV1/2 ; Just type in and, ; OPEN "I",#1,"COM0:(F8N1)" ; EXEC &H2000 ; FM77AV20/40 and newer ; POKE &HFD0C,5 ; POKE &HFD0B,16 ; POKE &HFD07,0 ; POKE &HFD07,0 ; POKE &HFD07,0 ; POKE &HFD07,&H40 ; POKE &HFD07,&H4E ; POKE &HFD07,&HB7 ; EXEC &H2000 ; IO_RS232C_CMD $FD07 ; IO_RS232C_DATA $FD06
print: __code64: ; save 32 bit registers mov r14d, edi mov r15d, esi ; Fix alignment mov r12, rsp and rsp, -16 sub rsp, 8 ; if odd number of args on the stack nop ; Fix registers: ; If paramteers are 64 bit, just pop them mov rdi, [r12 + 4] mov rsi, [r12 + 12] mov rdx, [r12 + 20] mov rcx, [r12 + 28] mov r8, [r12 + 36] mov r9, [r12 + 44] nop ; For pointer (which is 32 bit) or unsigned long or 32 bit value mov edi, [r12 + 4] mov esi, [r12 + 8] mov edx, [r12 + 12] mov ecx, [r12 + 16] mov r8d, [r12 + 20] mov r9d, [r12 + 24] nop ; or 32 bit signed long passed movsx rdi, DWORD [r12 + 4] movsx rsi, DWORD [r12 + 8] movsx rdx, DWORD [r12 + 12] movsx rcx, DWORD [r12 + 16] movsx r8, DWORD [r12 + 20] movsx r9, DWORD [r12 + 24] nop ; Put rest of the arguments: mov rax, [r12 + 24] movsx rax, DWORD [r12 + 24] ; for signed 32 bit types mov eax, [r12 + 24] push rax mov rax, print call rax ; Fix back rsp mov rsp, r12 ; restore return pointer ; Fix edi and esi mov edi, r14d mov esi, r15d ; result in eax/rax ; try to convert to 32 bits __check_signed_long_long: mov edx, 2147483648 mov ecx, 4294967295 add rdx, rax cmp rdx, rcx jna ok or edi, -1 call exit __check_unsigned_long_long: mov ecx, 4294967295 cmp rax, rcx jna ok or edi, -1 call exit __move_64_bit_to_eax_edx: mov rdx, rax shr rdx, 32 ok: ; switch to 32 bits sub rsp, 8 mov dword [rsp+4], 0x23 mov dword [rsp], exit retf exit:
; A289098: Decimal representation of the diagonal from the corner to the origin of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 545", based on the 5-celled von Neumann neighborhood. ; 1,2,7,14,29,62,125,254,509,1022,2045,4094,8189,16382,32765,65534,131069,262142,524285,1048574,2097149,4194302,8388605,16777214,33554429,67108862,134217725,268435454,536870909,1073741822,2147483645,4294967294,8589934589,17179869182,34359738365,68719476734,137438953469,274877906942,549755813885,1099511627774,2199023255549,4398046511102,8796093022205,17592186044414,35184372088829,70368744177662,140737488355325,281474976710654,562949953421309,1125899906842622,2251799813685245,4503599627370494,9007199254740989,18014398509481982,36028797018963965,72057594037927934,144115188075855869,288230376151711742,576460752303423485,1152921504606846974,2305843009213693949,4611686018427387902,9223372036854775805,18446744073709551614,36893488147419103229,73786976294838206462,147573952589676412925,295147905179352825854,590295810358705651709,1180591620717411303422,2361183241434822606845,4722366482869645213694,9444732965739290427389,18889465931478580854782,37778931862957161709565,75557863725914323419134,151115727451828646838269,302231454903657293676542,604462909807314587353085,1208925819614629174706174,2417851639229258349412349,4835703278458516698824702,9671406556917033397649405,19342813113834066795298814,38685626227668133590597629,77371252455336267181195262,154742504910672534362390525,309485009821345068724781054,618970019642690137449562109,1237940039285380274899124222,2475880078570760549798248445,4951760157141521099596496894,9903520314283042199192993789,19807040628566084398385987582,39614081257132168796771975165,79228162514264337593543950334,158456325028528675187087900669,316912650057057350374175801342,633825300114114700748351602685,1267650600228229401496703205374 sub $0,2 mov $2,$0 mul $0,2 add $0,6 mov $3,1 mov $5,1 sub $5,$2 mov $1,$5 mod $1,2 lpb $0 sub $0,2 mul $3,2 lpe add $4,1 add $1,$4 add $1,$3 sub $1,3 mov $0,$1
-off 0xFFFC0000 -entry start start: mv mri, interrupt_table mv orl, mrf mv orr, 2 mv mrf, bro mv mre, 0x80000000 mv mrp, mrp interrupt_table: x31 dd 0 dd interface_interrupt_handler interface_interrupt_handler: mv prs, prb mv orl, prs mv orr, 4 mv mrp, d ars
//===-- BPFInstrInfo.cpp - BPF Instruction Information ----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file contains the BPF implementation of the TargetInstrInfo class. // //===----------------------------------------------------------------------===// #include "BPFInstrInfo.h" #include "BPF.h" #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/IR/DebugLoc.h" #include "llvm/Support/ErrorHandling.h" #include <cassert> #include <iterator> #define GET_INSTRINFO_CTOR_DTOR #include "BPFGenInstrInfo.inc" using namespace llvm; BPFInstrInfo::BPFInstrInfo() : BPFGenInstrInfo(BPF::ADJCALLSTACKDOWN, BPF::ADJCALLSTACKUP) {} void BPFInstrInfo::copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const { if (BPF::GPRRegClass.contains(DestReg, SrcReg)) BuildMI(MBB, I, DL, get(BPF::MOV_rr), DestReg) .addReg(SrcReg, getKillRegState(KillSrc)); else if (BPF::GPR32RegClass.contains(DestReg, SrcReg)) BuildMI(MBB, I, DL, get(BPF::MOV_rr_32), DestReg) .addReg(SrcReg, getKillRegState(KillSrc)); else llvm_unreachable("Impossible reg-to-reg copy"); } void BPFInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, unsigned SrcReg, bool IsKill, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { DebugLoc DL; if (I != MBB.end()) DL = I->getDebugLoc(); if (RC == &BPF::GPRRegClass) BuildMI(MBB, I, DL, get(BPF::STD)) .addReg(SrcReg, getKillRegState(IsKill)) .addFrameIndex(FI) .addImm(0); else if (RC == &BPF::GPR32RegClass) BuildMI(MBB, I, DL, get(BPF::STW32)) .addReg(SrcReg, getKillRegState(IsKill)) .addFrameIndex(FI) .addImm(0); else llvm_unreachable("Can't store this register to stack slot"); } void BPFInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, unsigned DestReg, int FI, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { DebugLoc DL; if (I != MBB.end()) DL = I->getDebugLoc(); if (RC == &BPF::GPRRegClass) BuildMI(MBB, I, DL, get(BPF::LDD), DestReg).addFrameIndex(FI).addImm(0); else if (RC == &BPF::GPR32RegClass) BuildMI(MBB, I, DL, get(BPF::LDW32), DestReg).addFrameIndex(FI).addImm(0); else llvm_unreachable("Can't load this register from stack slot"); } bool BPFInstrInfo::analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl<MachineOperand> &Cond, bool AllowModify) const { // Start from the bottom of the block and work up, examining the // terminator instructions. MachineBasicBlock::iterator I = MBB.end(); while (I != MBB.begin()) { --I; if (I->isDebugValue()) continue; // Working from the bottom, when we see a non-terminator // instruction, we're done. if (!isUnpredicatedTerminator(*I)) break; // A terminator that isn't a branch can't easily be handled // by this analysis. if (!I->isBranch()) return true; // Handle unconditional branches. if (I->getOpcode() == BPF::JMP) { if (!AllowModify) { TBB = I->getOperand(0).getMBB(); continue; } // If the block has any instructions after a J, delete them. while (std::next(I) != MBB.end()) std::next(I)->eraseFromParent(); Cond.clear(); FBB = nullptr; // Delete the J if it's equivalent to a fall-through. if (MBB.isLayoutSuccessor(I->getOperand(0).getMBB())) { TBB = nullptr; I->eraseFromParent(); I = MBB.end(); continue; } // TBB is used to indicate the unconditinal destination. TBB = I->getOperand(0).getMBB(); continue; } // Cannot handle conditional branches return true; } return false; } unsigned BPFInstrInfo::insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond, const DebugLoc &DL, int *BytesAdded) const { assert(!BytesAdded && "code size not handled"); // Shouldn't be a fall through. assert(TBB && "insertBranch must not be told to insert a fallthrough"); if (Cond.empty()) { // Unconditional branch assert(!FBB && "Unconditional branch with multiple successors!"); BuildMI(&MBB, DL, get(BPF::JMP)).addMBB(TBB); return 1; } llvm_unreachable("Unexpected conditional branch"); } unsigned BPFInstrInfo::removeBranch(MachineBasicBlock &MBB, int *BytesRemoved) const { assert(!BytesRemoved && "code size not handled"); MachineBasicBlock::iterator I = MBB.end(); unsigned Count = 0; while (I != MBB.begin()) { --I; if (I->isDebugValue()) continue; if (I->getOpcode() != BPF::JMP) break; // Remove the branch. I->eraseFromParent(); I = MBB.end(); ++Count; } return Count; }
MODULE generic_console_ioctl PUBLIC generic_console_ioctl SECTION code_clib INCLUDE "ioctl.def" EXTERN generic_console_font32 EXTERN generic_console_udg32 PUBLIC CLIB_GENCON_CAPS defc CLIB_GENCON_CAPS = CAP_GENCON_FG_COLOUR | CAP_GENCON_BG_COLOUR | CAP_GENCON_INVERSE | CAP_GENCON_CUSTOM_FONT | CAP_GENCON_UDGS | CAP_GENCON_BOLD ; a = ioctl ; de = arg generic_console_ioctl: ex de,hl ld c,(hl) ;bc = where we point to inc hl ld b,(hl) cp IOCTL_GENCON_SET_FONT32 jr nz,check_set_udg ld (generic_console_font32),bc success: and a ret check_set_udg: cp IOCTL_GENCON_SET_UDGS jr nz,failure ld (generic_console_udg32),bc jr success failure: scf ret
include "loadersymbols.inc" ;ORG openfile - 2 ; incbin funktioniert nicht richtig :( ;incbin "loader.prg" ORG openfile incbin "loader.pr2" diskio_status_OK EQU 00 load SUBROUTINE ;jsr openfile jmp load2 loadNormal bcc .pollblock rts .pollblock jsr pollblock bcc .pollblock sta .restorea + 1 lda endaddrlo sta load_end lda endaddrhi sta load_end + 1 .restorea lda #$44 cmp #diskio_status_OK + 1 rts
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_PrimalItemAmmo_CannonBall_structs.hpp" namespace sdk { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass PrimalItemAmmo_CannonBall.PrimalItemAmmo_CannonBall_C // 0x0000 (0x0AE0 - 0x0AE0) class UPrimalItemAmmo_CannonBall_C : public UPrimalItemAmmo_Base_C { public: static UClass* StaticClass() { static auto ptr = UObject::FindClass("BlueprintGeneratedClass PrimalItemAmmo_CannonBall.PrimalItemAmmo_CannonBall_C"); return ptr; } void ExecuteUbergraph_PrimalItemAmmo_CannonBall(int EntryPoint); }; } #ifdef _MSC_VER #pragma pack(pop) #endif
#pragma once #include "lue/hdf5/link.hpp" namespace lue { namespace hdf5 { class SoftLink: public Link { public: SoftLink (Group& group, std::string const& name); SoftLink (Group const&)=delete; SoftLink (SoftLink&&)=default; ~SoftLink ()=default; SoftLink& operator= (SoftLink const&)=delete; SoftLink& operator= (SoftLink&&)=default; std::string path () const; }; bool soft_link_exists (Group const& group, std::string const& name); SoftLink create_soft_link (Group& group, Identifier const& target, std::string const& name); } // namespace hdf5 } // namespace lue
/* Plugin-SDK (Grand Theft Auto) SHARED source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "CompressedVector2D.h" #include "CompressedVector.h" #include "RenderWare.h" #include "CVector2D.h" CompressedVector2D::CompressedVector2D() { Set(0, 0); } CompressedVector2D::CompressedVector2D(short X, short Y) { Set(X, Y); } CompressedVector2D::CompressedVector2D(CompressedVector2D const & rhs) { Set(rhs); } CompressedVector2D::CompressedVector2D(CompressedVector const & rhs) { Set(rhs); } CompressedVector2D::CompressedVector2D(CVector2D const & rhs) { Set(rhs); } CompressedVector2D::CompressedVector2D(RwV2d const & rhs) { Set(rhs); } void CompressedVector2D::Set(short X, short Y) { x = X; y = Y; } void CompressedVector2D::Set(CompressedVector2D const & rhs) { x = rhs.x; y = rhs.y; } void CompressedVector2D::Set(CompressedVector const & rhs) { x = rhs.x; y = rhs.y; } void CompressedVector2D::Set(CVector2D const & rhs) { x = static_cast<short>(rhs.x * 8.0f); y = static_cast<short>(rhs.y * 8.0f); } void CompressedVector2D::Set(RwV2d const & rhs) { x = static_cast<short>(rhs.x * 8.0f); y = static_cast<short>(rhs.y * 8.0f); } CVector2D CompressedVector2D::Uncompressed() const { return CVector2D(static_cast<float>(x) / 8.0f, static_cast<float>(y) / 8.0f); } RwV2d CompressedVector2D::ToRwV2d() const { RwV2d result; result.x = static_cast<float>(x) / 8.0f; result.y = static_cast<float>(y) / 8.0f; return result; } CompressedVector CompressedVector2D::To3D() const { return CompressedVector(x, y, 0); } void CompressedVector2D::Uncompress(CVector2D &out) const { out = Uncompressed(); } bool CompressedVector2D::operator==(CompressedVector2D const &rhs) const { return x == rhs.x && y == rhs.y; } bool CompressedVector2D::operator!=(CompressedVector2D const &rhs) const { return x != rhs.x || y != rhs.y; }
; A201461: Triangle read by rows: n-th row (n>=0) gives coefficients of the polynomial ((x+1)^(2^n) + (x-1)^(2^n))/2. ; Submitted by Jon Maiga ; 1,1,1,1,6,1,1,28,70,28,1,1,120,1820,8008,12870,8008,1820,120,1,1,496,35960,906192,10518300,64512240,225792840,471435600,601080390,471435600,225792840,64512240,10518300,906192,35960,496,1,1,2016,635376,74974368,4426165368,151473214816,3284214703056,47855699958816,488526937079580,3601688791018080,19619725782651120,80347448443237920,250649105469666120,601557853127198688,1118770292985239888,1620288010530347424,1832624140942590534,1620288010530347424,1118770292985239888,601557853127198688 mul $0,2 add $0,1 mov $1,1 lpb $0 sub $0,$1 sub $0,2 mul $1,2 lpe bin $1,$0 mov $0,$1
; A255463: a(n) = 3*4^n-2*3^n. ; 1,6,30,138,606,2586,10830,44778,183486,747066,3027630,12228618,49268766,198137946,795740430,3192527658,12798808446,51281327226,205383589230,822309197898,3291561314526,13173218826906,52713796014030,210917946175338,843860071059006,3376005143308986,13505715150454830 mov $2,$0 mov $0,1 mov $1,1 lpb $2 add $1,$0 mul $0,4 mul $1,3 sub $2,1 lpe
; A040830: Continued fraction for sqrt(860). ; Submitted by Jamie Morken(s4) ; 29,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14,3,58,3,14 gcd $0,262156 mul $0,42 mod $0,13 mul $0,2 mov $1,$0 sub $1,4 div $1,5 add $1,14 pow $1,2 sub $1,$0 mov $0,$1 div $0,2 sub $0,92
/* Copyright 2018 Adobe All Rights Reserved. NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms of the Adobe license agreement accompanying it. If you have received this file from a source other than Adobe, then your use, modification, or distribution of it requires the prior written permission of Adobe. */ // stdc++ #include <iomanip> #include <iostream> // boost #include "boost/filesystem.hpp" #include "boost/range/irange.hpp" // clang/llvm #include "clang/Frontend/FrontendActions.h" #include "clang/Tooling/CommonOptionsParser.h" #include "clang/Tooling/Tooling.h" #include "llvm/Support/CommandLine.h" // application #include "json.hpp" #include "output_yaml.hpp" // instead of this, probably have a matcher manager that pushes the json object // into the file then does the collation and passes it into jsonAST to do // anything it needs to do #include "matchers/class_matcher.hpp" #include "matchers/enum_matcher.hpp" #include "matchers/function_matcher.hpp" #include "matchers/matcher_fwd.hpp" #include "matchers/namespace_matcher.hpp" #include "matchers/typealias_matcher.hpp" #include "matchers/typedef_matcher.hpp" using namespace clang::tooling; using namespace llvm; /**************************************************************************************************/ namespace { /**************************************************************************************************/ std::string exec(const char* cmd) { std::array<char, 128> buffer; std::string result; std::shared_ptr<FILE> pipe(popen(cmd, "r"), pclose); if (!pipe) throw std::runtime_error("popen() failed"); while (!feof(pipe.get())) { if (fgets(buffer.data(), 128, pipe.get()) != nullptr) result += buffer.data(); } while (std::isspace(result.back())) result.pop_back(); return result; } /**************************************************************************************************/ std::vector<std::string> make_absolute(std::vector<std::string> paths) { for (auto& path : paths) { boost::filesystem::path bfp(path); if (bfp.is_absolute()) continue; static const std::string pwd = exec("pwd"); static const boost::filesystem::path bfspwd(pwd); boost::filesystem::path abs_path(bfspwd / bfp); path = canonical(abs_path).string(); } return paths; } /**************************************************************************************************/ } // namespace /**************************************************************************************************/ /* Command line arguments section. These are intentionally global. See: https://llvm.org/docs/CommandLine.html */ enum ToolMode { ToolModeJSON, ToolModeYAMLValidate, ToolModeYAMLUpdate }; enum ToolDiagnostic { ToolDiagnosticQuiet, ToolDiagnosticVerbose }; static llvm::cl::OptionCategory MyToolCategory( "Hyde is a tool to scan library headers to ensure documentation is kept up to\n" "date"); static cl::opt<ToolMode> ToolMode( cl::desc("There are several modes under which the tool can run:"), cl::values( clEnumValN(ToolModeJSON, "hyde-json", "JSON analysis (default)"), clEnumValN(ToolModeYAMLValidate, "hyde-validate", "Validate existing YAML documentation"), clEnumValN(ToolModeYAMLUpdate, "hyde-update", "Write updated YAML documentation for missing elements")), cl::cat(MyToolCategory)); static cl::opt<hyde::ToolAccessFilter> ToolAccessFilter( cl::desc("Restrict documentation of class elements by their access specifier."), cl::values(clEnumValN(hyde::ToolAccessFilterPrivate, "access-filter-private", "Process all elements (default)"), clEnumValN(hyde::ToolAccessFilterProtected, "access-filter-protected", "Process only public and protected elements"), clEnumValN(hyde::ToolAccessFilterPublic, "access-filter-public", "Process only public elements")), cl::cat(MyToolCategory)); static cl::opt<ToolDiagnostic> ToolDiagnostic( cl::desc("Several tool diagnostic modes are available:"), cl::values( clEnumValN(ToolDiagnosticQuiet, "hyde-quiet", "output less to the console (default)"), clEnumValN(ToolDiagnosticVerbose, "hyde-verbose", "output more to the console")), cl::cat(MyToolCategory)); static cl::opt<std::string> YamlDstDir("hyde-yaml-dir", cl::desc("Root directory for YAML validation / update"), cl::cat(MyToolCategory)); static cl::opt<std::string> YamlSrcDir( "hyde-src-root", cl::desc("The root path to the header file(s) being analyzed"), cl::cat(MyToolCategory)); static cl::list<std::string> NamespaceBlacklist( "namespace-blacklist", cl::desc("Namespace(s) whose contents should not be processed"), cl::cat(MyToolCategory), cl::CommaSeparated); static cl::extrahelp HydeHelp( "\nThis tool parses the header source(s) using Clang. To pass arguments to the\n" "compiler (e.g., include directories), append them after the `--` token on the\n" "command line. For example:\n" "\n" " hyde -hyde-json input_file.hpp -- -x c++ -I/path/to/includes\n" "\n" "(The file to be processed must be the last argument before the `--` token.)\n" "\n" "Alternatively, if you have a compilation database and would like to pass that\n" "instead of command-line compiler arguments, you can pass that with -p.\n" "\n" "While compiling the source file, the non-function macro `ADOBE_TOOL_HYDE` is\n" "defined to the value `1`. This can be useful to explicitly omit code from\n" "the documentation.\n" "\n" "Hyde supports project configuration files. It must be named either `.hyde-config`\n" "or `_hyde-config`, and must be at or above the file being processed. The\n" "format of the file is JSON. This allows you to specify command line\n" "parameters in a common location so they do not need to be passed for every\n" "file in your project. The flags sent to Clang should be a in a top-level\n" "array under the `clang_flags` key.\n" "\n"); /**************************************************************************************************/ boost::filesystem::path clang_path(const boost::filesystem::path& xcode_path) { boost::filesystem::path root_clang_path = xcode_path / "Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/"; boost::filesystem::path last_directory; for (const auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(root_clang_path), {})) { if (is_directory(entry)) { last_directory = entry; } } if (!exists(last_directory)) throw std::runtime_error("could not derive clang directory"); return last_directory / "include"; } /**************************************************************************************************/ boost::filesystem::path get_xcode_path() { // This routine gets us to the "/path/to/Xcode.app/Contents/Developer" folder std::string clang_details = exec("clang++ --version"); // This assumes "InstalledDir:" is the last flag in the lineup. const std::string needle("InstalledDir: "); auto installed_dir_pos = clang_details.find(needle); boost::filesystem::path result = clang_details.substr(installed_dir_pos + needle.size(), std::string::npos); return canonical(result / ".." / ".." / ".." / ".."); } /**************************************************************************************************/ std::pair<boost::filesystem::path, hyde::json> load_hyde_config( boost::filesystem::path src_file) try { bool found{false}; boost::filesystem::path hyde_config_path; if (exists(src_file)) { const boost::filesystem::path pwd_k = boost::filesystem::current_path(); if (src_file.is_relative()) { src_file = canonical(pwd_k / src_file); } if (!is_directory(src_file)) { src_file = src_file.parent_path(); } const auto hyde_config_check = [&](boost::filesystem::path path) { found = exists(path); if (found) { hyde_config_path = std::move(path); } return found; }; const auto directory_walk = [hyde_config_check](boost::filesystem::path directory) { while (true) { if (!exists(directory)) break; if (hyde_config_check(directory / ".hyde-config")) break; if (hyde_config_check(directory / "_hyde-config")) break; directory = directory.parent_path(); } }; // walk up the directory tree starting from the source file being processed. directory_walk(src_file); } return found ? std::make_pair(hyde_config_path.parent_path(), hyde::json::parse(boost::filesystem::ifstream(hyde_config_path))) : std::make_pair(boost::filesystem::path(), hyde::json()); } catch (...) { throw std::runtime_error("failed to parse the hyde-config file"); } /**************************************************************************************************/ std::vector<std::string> integrate_hyde_config(int argc, const char** argv) { auto cmdline_first = &argv[1]; auto cmdline_last = &argv[argc]; auto cmdline_mid = std::find_if(cmdline_first, cmdline_last, [](const char* arg) { return arg == std::string("--"); }); const std::vector<std::string> cli_hyde_flags = [argc, cmdline_first, cmdline_mid] { std::vector<std::string> result; auto hyde_first = cmdline_first; auto hyde_last = cmdline_mid; while (hyde_first != hyde_last) { result.emplace_back(*hyde_first++); } if (argc == 1) { result.push_back("-help"); } return result; }(); const std::vector<std::string> cli_clang_flags = [cmdline_mid, cmdline_last] { std::vector<std::string> result; auto clang_first = cmdline_mid; auto clang_last = cmdline_last; while (clang_first != clang_last) { std::string arg(*clang_first++); if (arg == "--") continue; result.emplace_back(std::move(arg)); } return result; }(); std::vector<std::string> hyde_flags; std::vector<std::string> clang_flags; boost::filesystem::path config_dir; hyde::json config; std::tie(config_dir, config) = load_hyde_config(cli_hyde_flags.empty() ? "" : cli_hyde_flags.back()); if (exists(config_dir)) current_path(config_dir); if (config.count("clang_flags")) { for (const auto& clang_flag : config["clang_flags"]) { clang_flags.push_back(clang_flag); } } if (config.count("hyde-src-root")) { boost::filesystem::path relative_path = static_cast<const std::string&>(config["hyde-src-root"]); boost::filesystem::path absolute_path = canonical(config_dir / relative_path); hyde_flags.emplace_back("-hyde-src-root=" + absolute_path.string()); } if (config.count("hyde-yaml-dir")) { boost::filesystem::path relative_path = static_cast<const std::string&>(config["hyde-yaml-dir"]); boost::filesystem::path absolute_path = canonical(config_dir / relative_path); hyde_flags.emplace_back("-hyde-yaml-dir=" + absolute_path.string()); } hyde_flags.insert(hyde_flags.end(), cli_hyde_flags.begin(), cli_hyde_flags.end()); clang_flags.insert(clang_flags.end(), cli_clang_flags.begin(), cli_clang_flags.end()); std::vector<std::string> result; result.emplace_back(argv[0]); result.insert(result.end(), hyde_flags.begin(), hyde_flags.end()); result.emplace_back("--"); if (!clang_flags.empty()) { // it'd be nice if we could move these into place. result.insert(result.end(), clang_flags.begin(), clang_flags.end()); } return result; } /**************************************************************************************************/ int main(int argc, const char** argv) try { std::vector<std::string> args = integrate_hyde_config(argc, argv); int new_argc = static_cast<int>(args.size()); std::vector<const char*> new_argv(args.size(), nullptr); std::transform(args.begin(), args.end(), new_argv.begin(), [](const auto& arg) { return arg.c_str(); }); CommonOptionsParser OptionsParser(new_argc, &new_argv[0], MyToolCategory); if (ToolDiagnostic == ToolDiagnosticVerbose) { std::cout << "Args:\n"; for (const auto& arg : args) { std::cout << arg << '\n'; } } auto sourcePaths = make_absolute(OptionsParser.getSourcePathList()); ClangTool Tool(OptionsParser.getCompilations(), sourcePaths); MatchFinder Finder; hyde::processing_options options{sourcePaths, ToolAccessFilter, NamespaceBlacklist}; hyde::FunctionInfo function_matcher(options); Finder.addMatcher(hyde::FunctionInfo::GetMatcher(), &function_matcher); hyde::EnumInfo enum_matcher(options); Finder.addMatcher(hyde::EnumInfo::GetMatcher(), &enum_matcher); hyde::ClassInfo class_matcher(options); Finder.addMatcher(hyde::ClassInfo::GetMatcher(), &class_matcher); hyde::NamespaceInfo namespace_matcher(options); Finder.addMatcher(hyde::NamespaceInfo::GetMatcher(), &namespace_matcher); hyde::TypeAliasInfo typealias_matcher(options); Finder.addMatcher(hyde::TypeAliasInfo::GetMatcher(), &typealias_matcher); hyde::TypedefInfo typedef_matcher(options); Finder.addMatcher(hyde::TypedefInfo::GetMatcher(), &typedef_matcher); // Get the current Xcode toolchain and add its include directories to the tool. const boost::filesystem::path xcode_path = get_xcode_path(); // Order matters here. The first include path will be looked up first, so should // be the highest priority path. boost::filesystem::path include_directories[] = { clang_path(xcode_path), "/Library/Developer/CommandLineTools/usr/include/c++/v1", xcode_path / "/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/", }; for (const auto& include : include_directories) { if (ToolDiagnostic == ToolDiagnosticVerbose) std::cout << "Including: " << include.string() << '\n'; Tool.appendArgumentsAdjuster(getInsertArgumentAdjuster(("-I" + include.string()).c_str())); } // Tool.appendArgumentsAdjuster(getInsertArgumentAdjuster("-xc++")); // Tool.appendArgumentsAdjuster(getInsertArgumentAdjuster("-std=c++17")); Tool.appendArgumentsAdjuster(getInsertArgumentAdjuster("-DADOBE_TOOL_HYDE=1")); if (Tool.run(newFrontendActionFactory(&Finder).get())) throw std::runtime_error("compilation failed."); hyde::json paths = hyde::json::object(); paths["src_root"] = YamlSrcDir; paths["src_path"] = sourcePaths[0]; // Hmm... including multiple sources // implies we'd be analyzing multiple // subcomponents at the same time. We // should account for this at some // point. hyde::json result = hyde::json::object(); result["functions"] = function_matcher.getJSON()["functions"]; result["enums"] = enum_matcher.getJSON()["enums"]; result["classes"] = class_matcher.getJSON()["classes"]; result["namespaces"] = namespace_matcher.getJSON()["namespaces"]; result["typealiases"] = typealias_matcher.getJSON()["typealiases"]; result["typedefs"] = typedef_matcher.getJSON()["typedefs"]; result["paths"] = std::move(paths); if (ToolMode == ToolModeJSON) { // The std::setw(2) is for pretty-printing. Remove it for ugly serialization. std::cout << std::setw(2) << result << '\n'; } else { if (YamlDstDir.empty()) throw std::runtime_error("no YAML output directory specified (-hyde-yaml-dir)"); boost::filesystem::path src_root(YamlSrcDir); boost::filesystem::path dst_root(YamlDstDir); output_yaml(std::move(result), std::move(src_root), std::move(dst_root), ToolMode == ToolModeYAMLValidate ? hyde::yaml_mode::validate : hyde::yaml_mode::update); } } catch (const std::exception& error) { std::cerr << "Error: " << error.what() << '\n'; return EXIT_FAILURE; } catch (...) { std::cerr << "Error: unknown\n"; return EXIT_FAILURE; } /**************************************************************************************************/
Name: zel_bms1.asm Type: file Size: 119023 Last-Modified: '2016-05-13T04:22:15Z' SHA-1: 4583F3DA866A985B310291C95C986D07445DFF5D Description: null
; A108035: Triangle read by rows: n-th row is n-th nonzero Fibonacci number repeated n times. ; 1,2,2,3,3,3,5,5,5,5,8,8,8,8,8,13,13,13,13,13,13,21,21,21,21,21,21,21,34,34,34,34,34,34,34,34,55,55,55,55,55,55,55,55,55,89,89,89,89,89,89,89,89,89,89,144,144,144,144,144,144,144,144,144,144,144,233,233,233,233,233,233,233,233,233,233,233,233,377,377,377,377,377,377,377,377,377,377,377,377,377,610,610,610,610,610,610,610,610,610,610,610,610,610,610,987,987,987,987,987,987,987,987,987,987,987,987,987,987,987,1597,1597,1597,1597,1597,1597,1597,1597,1597,1597,1597,1597,1597,1597,1597,1597,2584,2584,2584,2584,2584,2584,2584,2584,2584,2584,2584,2584,2584,2584,2584,2584,2584,4181,4181,4181,4181,4181,4181,4181,4181,4181,4181,4181,4181,4181,4181,4181,4181,4181,4181,6765,6765,6765,6765,6765,6765,6765,6765,6765,6765,6765,6765,6765,6765,6765,6765,6765,6765,6765,10946,10946,10946,10946,10946,10946,10946,10946,10946,10946,10946,10946,10946,10946,10946,10946,10946,10946,10946,10946,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,17711,28657,28657,28657,28657,28657,28657,28657,28657,28657,28657,28657,28657,28657,28657,28657,28657,28657,28657,28657 lpb $0,1 sub $0,1 add $2,1 trn $0,$2 trn $1,1 add $3,3 sub $4,$4 add $4,$1 mov $1,$3 sub $1,1 add $1,$4 mov $3,$4 lpe trn $1,1 add $1,1
; A264754: Expansion of (1 + 2*x - 2*x^3 + x^4)/((1 - x)^3*(1 + x)^2). ; 1,3,5,7,11,13,19,21,29,31,41,43,55,57,71,73,89,91,109,111,131,133,155,157,181,183,209,211,239,241,271,273,305,307,341,343,379,381,419,421,461,463,505,507,551,553,599,601,649,651,701,703,755,757,811,813,869,871,929,931,991,993,1055,1057,1121,1123,1189,1191,1259,1261,1331,1333,1405,1407,1481,1483,1559,1561,1639,1641,1721,1723,1805,1807,1891,1893,1979,1981,2069,2071,2161,2163,2255,2257,2351,2353,2449,2451,2549,2551 mov $1,$0 div $1,2 bin $1,2 add $0,$1 mul $0,2 add $0,1
; A173142: a(n) = n^n - (n-1)^(n-1) - (n-2)^(n-2) - ... - 1. ; Submitted by Christian Krause ; 1,3,22,224,2837,43243,773474,15903604,369769661,9594928683,274906599294,8620383706328,293663289402069,10799919901775579,426469796631518922,17997426089579351788,808344199828497012733,38500271751352361059803,1938227111261072875032934,102838987799940445696784976,5735710806185922967077909397,335478414133633515320962384139,20533090659253106434882701847538,1312507931509841406815254108870180,87462878347821796391807624610448253,6065946774614954060720700846116120779 add $0,1 mov $2,$0 lpb $0 mov $3,$0 sub $0,1 pow $3,$2 sub $1,$3 sub $2,1 trn $3,$1 add $1,$3 lpe mov $0,$1
; A304838: a(n) = 1944*n^2 - 5016*n + 3138 (n >= 1). ; 66,882,5586,14178,26658,43026,63282,87426,115458,147378,183186,222882,266466,313938,365298,420546,479682,542706,609618,680418,755106,833682,916146,1002498,1092738,1186866,1284882,1386786,1492578,1602258,1715826,1833282,1954626,2079858,2208978,2341986,2478882,2619666,2764338,2912898,3065346,3221682,3381906,3546018,3714018,3885906,4061682,4241346,4424898,4612338,4803666,4998882,5197986,5400978,5607858,5818626,6033282,6251826,6474258,6700578,6930786,7164882,7402866,7644738,7890498,8140146,8393682,8651106,8912418,9177618,9446706,9719682,9996546,10277298,10561938,10850466,11142882,11439186,11739378,12043458,12351426,12663282,12979026,13298658,13622178,13949586,14280882,14616066,14955138,15298098,15644946,15995682,16350306,16708818,17071218,17437506,17807682,18181746,18559698,18941538 mov $1,$0 mul $0,9 sub $0,2 bin $0,2 sub $0,$1 mul $0,48 sub $0,78
dnl Intel P6 mpn_divexact_by3 -- mpn division by 3, expecting no remainder. dnl Copyright 2000, 2002 Free Software Foundation, Inc. dnl dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Lesser General Public License as dnl published by the Free Software Foundation; either version 2.1 of the dnl License, or (at your option) any later version. dnl dnl The GNU MP Library is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl Lesser General Public License for more details. dnl dnl You should have received a copy of the GNU Lesser General Public dnl License along with the GNU MP Library; see the file COPYING.LIB. If dnl not, write to the Free Software Foundation, Inc., 51 Franklin Street, dnl Fifth Floor, Boston, MA 02110-1301, USA. include(`../config.m4') C P6: 8.5 cycles/limb C The P5 code runs well on P6, in fact better than anything else found so C far. An imul is 4 cycles, meaning the two cmp/sbbl pairs on the dependent C path are taking 4.5 cycles. C C The destination cache line prefetching is unnecessary on P6, but removing C it is a 2 cycle slowdown (approx), so it must be inducing something good C in the out of order execution. include_mpn(`x86/pentium/divexact_by3c.asm')
/** * This file includes testfuncitons, which should test weather the Interface is * implemented correctly. Every interface has one function, where an interface * can be testet. Make sure to pass correct initialized interfaces, cause empty * interfaces can not be tested very well. */ #ifndef INTERFACE_TEST_METHODS_HPP #define INTERFACE_TEST_METHODS_HPP #include <interfaces/IPlugin.hpp> #include <interfaces/Ports/IAudioPort.hpp> #include <interfaces/Ports/IMidiPort.hpp> /** * @brief Tests an IPlugin-interface. * @param plug IPlugin implementation, which should be tested. */ void testIPlugin(APAL::IPlugin* plug); /** * @brief Tests the IInfoComponent-interface * @param infoComp Interface to test */ void testIInfoComponent(APAL::IInfoComponent* infoComp); /** * @brief Tests the IFeatureComponent-interface * @param featComp Interface to test */ void testIFeatureComponent(APAL::IFeatureComponent* featComp); /** * @brief Tests the IPortComponent-interface * @param portComp Interface to test */ void testIPortComponent(APAL::IPortComponent* portComp); /** * @brief Tests an IPort for its Interfacemethods. * @param port Implementation to test. */ void testIPort(APAL::IPort* port); /** * @brief Tests an IAudioPort for its Interfacemethods. * @param aPort Implementation to test. */ void testIAudioPort(APAL::IAudioPort* aPort); /** * @brief Tests an IMidiPort for its Interfacemethods. * @param mPort Implementation to test. */ void testIMidiPort(APAL::IMidiPort* mPort); #endif //! INTERFACE_TEST_METHODS_HPP
BITS 64 ;-- RDI points to the CPU state structure (loaded on routine entry) ;-- RSI points to the Z80 memory block (loaded on routine entry) ;-- AL contains the value of the accumulator (written back after the routine completes) struc cpu_state_struct .ProgramCounter resd 1 .StackPointer resd 1 .InterruptVector resd 1 .RefreshCounter resd 1 .IX resd 1 .IY resd 1 .IFF1 resd 1 .IFF2 resd 1 .AF resd 1 .BC resd 1 .DE resd 1 .HL resd 1 .AF1 resd 1 .BC1 resd 1 .DE1 resd 1 .HL1 resd 1 endstruc ; cpu_state_struct PROLOG_CODE: push rdi push rsi mov rdi, 0x12345678AABBCCDD mov rsi, 0x12345678AABBCCDD mov al, BYTE[rdi + cpu_state_struct.AF] EPILOGUE_CODE: mov BYTE[rdi + cpu_state_struct.AF], al pop rsi pop rdi INSTR_DI: mov DWORD [rdi + cpu_state_struct.IFF1], 0 INSTR_EI: mov DWORD [rdi + cpu_state_struct.IFF1], 1 INSTR_JP: mov DWORD [rdi + cpu_state_struct.ProgramCounter], 0x00001234 INSTR_OUT: mov r8, 0x2211221122112211 mov edx, 0x33443344 xor ecx, ecx mov cl, al mov r10, 0x123456789ABCDEFF call r10 ;----------- ; LD R8, nn ;------------ INSTR_LD_A_I8: mov al, 0xCC INSTR_LD_B_I8: mov BYTE [rdi + cpu_state_struct.BC], 0xCC INSTR_LD_C_I8: mov BYTE [rdi + cpu_state_struct.BC + 1], 0xCC INSTR_LD_D_I8: mov BYTE [rdi + cpu_state_struct.DE], 0xCC INSTR_LD_E_I8: mov BYTE [rdi + cpu_state_struct.DE + 1], 0xCC INSTR_LD_H_I8: mov BYTE [rdi + cpu_state_struct.HL], 0xCC INSTR_LD_L_I8: mov BYTE [rdi + cpu_state_struct.HL + 1], 0xCC