text
stringlengths
1
1.05M
; A131428: a(n) = 2*C(n) - 1, where C(n) = A000108(n) are the Catalan numbers. ; 1,1,3,9,27,83,263,857,2859,9723,33591,117571,416023,1485799,5348879,19389689,70715339,259289579,955277399,3534526379,13128240839,48932534039,182965127279,686119227299,2579808294647,9723892802903,36734706144303,139067101832007,527495903500719,2004484433302735,7629973004184607,29089272078453817,111068129754096395,424672260824486219,1625888084299461527,6232570989814602523,23919596771720906983,91901608649243484727,353467725574013402799,1360850743459951600779,5244254084552984217639 mov $1,$0 mul $0,2 bin $0,$1 mov $2,$1 add $2,1 div $0,$2 sub $0,1 mul $0,2 add $0,1
;ATLAS CPU-16 Microcode v1.0 ;Hayden Buscher - 2022 ;PC_ST, OP1_ST, OP2_ST, IR_ST, MDR_ST, MEM_ST, REG1_ST, REG2_ST, SP_ST, STAT_ST ;F_DOUT, PC_DOUT, SWP_DOUT, WRD_DOUT, MDR_DOUT, MEM_DOUT, VECT_DOUT, REG1_DOUT, REG2_DOUT, SP_DOUT ;PC_AOUT, MAR_AOUT ;COND_N, COND_Z, COND_V, COND_C ;ALU_ADD, ALU_ADC, ALU_SUB, ALU_SBB, ALU_AND, ALU_OR, ALU_XOR, ALU_NOT, ALU_LSH, ALU_RSH, ALU_INC, ALU_DEC, ALU_SEX ;PC_INC, COND_POS ;F_ALUIN, F_ST ;MAR_ST, IRQ_EN ;MODE_RST, MODE_DMA, MODE_FLT, MODE_FETCH ;First half of mCode ROM $0 ;CTRL1 MODE_RST,@RST ;0000 - RST PC_INC,@HLT ;0001 - HLT PC_INC,@FETCH ;0002 - CAL PC_INC,@FETCH ;0003 - NOP PC_INC,@FETCH ;0004 - NOP PC_INC,@FETCH ;0005 - NOP PC_INC,@FETCH ;0006 - NOP PC_INC,@FETCH ;0007 - RTS $8 ;CTRL2 PC_INC,F_DOUT,REG2_ST,@FETCH ;0010 - STF [reg] PC_INC,@FETCH ;0011 - NOP PC_INC,@FETCH ;0012 - NOP PC_INC,@FETCH ;0013 - NOP PC_INC,REG2_DOUT,SWP_ST,@SWP ;0014 - SWP [reg] PC_INC,REG1_DOUT,MDR_ST,@EXG ;0015 - EXG [reg],[reg] PC_INC,SP_DOUT,OP1_ST,@LNK ;0016 - LNK PC_INC,REG2_DOUT,OP1_ST,MAR_ST,@ULNK ;0017 - ULNK $10 ;FLGS PC_INC,F_DOUT,OP1_ST,@ANF ;0020 - ANF $m PC_INC,F_DOUT,OP1_ST,@ORF ;0021 - ORF $m PC_INC,F_DOUT,OP1_ST,@XOF ;0022 - XOF $m PC_INC,REG2_DOUT,F_ST,@FETCH ;0023 - LDF PC_INC,STAT_DOUT,OP1_ST,@ANT ;0024- ANT $m PC_INC,STAT_DOUT,OP1_ST,@ORT ;0025 - ORT $m PC_INC,STAT_ST_DOUT,OP1_ST,@XOT ;0025 - XOT $m PC_INC,REG2_DOUT,STAT_ST,@FETCH ;0027 - LDT $18 ;JMP [ads] PC_INC,@FETCH ;0030 - NOP PC_INC,@JMP_#m ;0031 - JMP $m PC_INC,@JMP_#m_REL ;0032 - JMP $m(PC) REG2_DOUT,PC_ST,@FETCH ;0033 - JMP (reg) PC_INC,REG2_DOUT,OP1_ST,@JMP_RIND ;0034 - JMP $m(reg) PC_INC,REG2_DOUT,OP1_ST,@JMP_PINC ;0035 - JMP (reg)+ PC_INC,REG2_DOUT,OP1_ST,@JMP_PDEC ;0036 - JMP -(reg) PC_INC,@FETCH ;0037 - NOP $20 PC_INC,@FETCH ;0040 - NOP PC_INC,@JSR_#m ;0041 - JSR $m PC_INC,@JSR_#m_REL ;0042 - JSR $m(PC) REG2_DOUT,PC_ST,@FETCH ;0043 - JSR (reg) PC_INC,REG2_DOUT,OP1_ST,@JSR_RIND ;0044 - JSR $m(reg) PC_INC,REG2_DOUT,OP1_ST,@JSR_PINC ;0045 - JSR (reg)+ PC_INC,REG2_DOUT,OP1_ST,@JSR_PDEC ;0046 - JSR -(reg) PC_INC,@FETCH ;0047 - NOP $2D PC_INC,COND_Z,@JMP_#m_REL ;0055 - BNE $m(PC) $40 PC_INC,REG1_DOUT,MDR_ST,@MOV_REG_REG ;0100 - MOV [reg],[reg] PC_INC,REG1_DOUT,MDR_ST,@MOV_REG_DIR ;0101 - MOV [reg],$m $69 PC_INC,REG1_DOUT,MAR_ST,OP1_ST,@MOV_PINC_DIR ;0151 - MOV (reg)+,$m $78 PC_INC,@MOV_#m_REG ;0170 - MOV #m,[reg] $27B PC_INC,@CMP_#m_IREG ;1173 - CMP #m,(reg) ;Second half of mCode ROM $407 MODE_RST,@RST ;RST VECTOR $408 .@FETCH MODE_FETCH,IRQ_EN,PC_AOUT,MEM_DOUT,IR_ST .@INC_PC_END PC_INC,@FETCH ;000x .@RST MODE_RST,F_ST,STAT_ST,+1 MODE_RST,WRD_DOUT,MAR_ST,+1 MODE_RST,MAR_AOUT,MEM_DOUT,PC_ST,@FETCH .@HLT IRQ_EN,@HLT .@RTS .@SWP SWP_DOUT,REG2_ST,@FETCH .@EXG @FETCH .@LNK ALU_DEC,MDR_ST,MAR_ST,+1 REG2_DOUT,MAR_AOUT,MEM_ST,+1 MDR_DOUT,REG2_ST,+1 MDR_DOUT,OP1_ST,+1 PC_AOUT,MEM_DOUT,OP2_ST,+1 PC_INC,ALU_ADD,SP_ST,@FETCH .@ULNK MAR_AOUT,MEM_DOUT,REG2_ST,+1 ALU_INC,SP_ST,@FETCH ;001x .@ANF PC_AOUT,MEM_DOUT,OP2_ST,+1 PC_INC,ALU_AND,F_ST,@FETCH .@ORF PC_AOUT,MEM_DOUT,OP2_ST,+1 PC_INC,ALU_OR,F_ST,@FETCH .@XOF PC_AOUT,MEM_DOUT,OP2_ST,+1 PC_INC,ALU_XOR,F_ST,@FETCH .@ANT PC_AOUT,MEM_DOUT,OP2_ST,+1 PC_INC,ALU_AND,STAT_ST_ST,@FETCH .@ORT PC_AOUT,MEM_DOUT,OP2_ST,+1 PC_INC,ALU_OR,STAT_ST,@FETCH .@XOT PC_AOUT,MEM_DOUT,OP2_ST,+1 PC_INC,ALU_XOR,STAT_ST,@FETCH ;002x .@JMP_#m PC_AOUT,MEM_DOUT,MDR_ST,+1 MDR_DOUT,PC_ST,@FETCH .@JMP_#m_REL PC_DOUT,OP1_ST,+1 PC_AOUT,MEM_DOUT,OP2_ST,@ADD_PC_ST .@JMP_RIND PC_AOUT,MEM_DOUT,OP2_ST,@ADD_PC_ST .@ADD_PC_ST ALU_ADD,PC_ST,@FETCH .@JMP_PINC REG2_DOUT,PC_ST,+1 ALU_INC,REG2_ST,@FETCH .@JMP_PDEC ALU_DEC,REG2_ST,+1 ALU_DEC,PC_ST,@FETCH ;003x .@JSR_#m PC_AOUT,MEM_DOUT,MDR_ST,+1 MDR_DOUT,PC_ST,@FETCH ;ALU_DEC,MAR_ST,SP_ST,+1 ;MAR_AOUT,PC_DOUT,MEM_ST,+1 ;SP_DOUT,OP1_ST,+1 ;ALU_DEC,MAR_ST,SP_ST,+1 ;MAR_AOUT,F_DOUT,MEM_ST,@JMP_#m ;.@JSR_#m_REL ;ALU_DEC,MAR_ST,SP_ST,+1 ;MAR_AOUT,PC_DOUT,MEM_ST,+1 ;SP_DOUT,OP1_ST,+1 ;ALU_DEC,MAR_ST,SP_ST,+1 ;MAR_AOUT,F_DOUT,MEM_ST,@JMP_#m_REL .@MOV_REG_REG MDR_DOUT,REG2_ST,@FETCH .@MOV_REG_DIR PC_AOUT,MDR_DOUT,MEM_ST,@INC_PC_END .@MOV_PINC_DIR MAR_AOUT,MEM_DOUT,MDR_ST,+1 PC_AOUT,MEM_DOUT,MAR_ST,+1 PC_INC,MDR_DOUT,MAR_AOUT,MEM_ST,+1 ALU_INC,REG1_ST,@FETCH .@MOV_#m_REG PC_AOUT,MEM_DOUT,REG2_ST,@INC_PC_END .@CMP_#m_IREG PC_AOUT,MEM_DOUT,OP1_ST,+1 PC_INC,REG2_DOUT,MAR_ST,+1 MAR_AOUT,MEM_DOUT,OP2_ST,+1 ALU_SUB,F_ST,@FETCH
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ */ #include "hphp/runtime/base/collections.h" #include "hphp/runtime/base/array-init.h" #include "hphp/runtime/base/variable-serializer.h" #include "hphp/runtime/base/variable-unserializer.h" #include "hphp/runtime/ext/collections/ext_collections-map.h" #include "hphp/runtime/ext/collections/ext_collections-pair.h" #include "hphp/runtime/ext/collections/ext_collections-set.h" #include "hphp/runtime/ext/collections/ext_collections-vector.h" namespace HPHP { namespace collections { ///////////////////////////////////////////////////////////////////////////// #define X(type) const StaticString s_##type("HH\\" #type); COLLECTIONS_ALL_TYPES(X) #undef X ///////////////////////////////////////////////////////////////////////////// // Constructor/Initializer ObjectData* allocPair(TypedValue c1, TypedValue c2) { return req::make<c_Pair>(c1, c2, c_Pair::NoIncRef{}).detach(); } #define X(type) \ ObjectData* allocEmpty##type() { \ return req::make<c_##type>().detach(); \ } \ ObjectData* allocFromArray##type(ArrayData* arr) { \ return req::make<c_##type>(arr).detach(); \ } COLLECTIONS_PAIRED_TYPES(X) #undef X newFromArrayFunc allocFromArrayFunc(CollectionType ctype) { switch (ctype) { #define X(type) case CollectionType::type: return allocFromArray##type; COLLECTIONS_PAIRED_TYPES(X) #undef X case CollectionType::Pair: not_reached(); } not_reached(); } newEmptyInstanceFunc allocEmptyFunc(CollectionType ctype) { switch (ctype) { #define X(type) case CollectionType::type: return allocEmpty##type; COLLECTIONS_PAIRED_TYPES(X) #undef X case CollectionType::Pair: not_reached(); } not_reached(); } ///////////////////////////////////////////////////////////////////////////// // Misc bool isType(const Class* cls, CollectionType ctype) { switch (ctype) { #define X(type) case CollectionType::type: return cls == c_##type::classof(); COLLECTIONS_ALL_TYPES(X) #undef X } not_reached(); } ///////////////////////////////////////////////////////////////////////////// // Casting and Copying Array toArray(const ObjectData* obj) { assertx(obj->isCollection()); switch (obj->collectionType()) { #define X(type) case CollectionType::type: return c_##type::ToArray(obj); COLLECTIONS_ALL_TYPES(X) #undef X } not_reached(); } bool toBool(const ObjectData* obj) { assertx(obj->isCollection()); switch (obj->collectionType()) { #define X(type) case CollectionType::type: return c_##type::ToBool(obj); COLLECTIONS_ALL_TYPES(X) #undef X } not_reached(); } ObjectData* clone(ObjectData* obj) { assertx(obj->isCollection()); switch (obj->collectionType()) { #define X(type) case CollectionType::type: return c_##type::Clone(obj); COLLECTIONS_ALL_TYPES(X) #undef X } not_reached(); } ArrayData* asArray(ObjectData* obj) { assertx(obj->isCollection()); switch (obj->collectionType()) { case CollectionType::ImmVector: case CollectionType::Vector: return static_cast<BaseVector*>(obj)->arrayData(); case CollectionType::ImmMap: case CollectionType::Map: case CollectionType::ImmSet: case CollectionType::Set: return static_cast<HashCollection*>(obj)->arrayData()->asArrayData(); case CollectionType::Pair: return nullptr; } not_reached(); } ///////////////////////////////////////////////////////////////////////////// // Deep Copy ArrayData* deepCopyArray(ArrayData* arr) { assert(arr->isPHPArray()); Array ar(arr); IterateKV( arr, [&](Cell k, TypedValue v) { if (!isRefcountedType(v.m_type)) return false; Variant value{tvAsCVarRef(&v)}; deepCopy(value.asTypedValue()); if (value.asTypedValue()->m_data.num != v.m_data.num) { ar.set(k, *value.asTypedValue(), true); } return false; } ); return ar.detach(); } ArrayData* deepCopyVecArray(ArrayData* arr) { assert(arr->isVecArray()); Array ar(arr); PackedArray::IterateKV( arr, [&](Cell k, TypedValue v) { if (!isRefcountedType(v.m_type)) return false; Variant value{tvAsCVarRef(&v)}; deepCopy(value.asTypedValue()); if (value.asTypedValue()->m_data.num != v.m_data.num) { assert(k.m_type == KindOfInt64); ar.set(k.m_data.num, value); } return false; } ); return ar.detach(); } ArrayData* deepCopyDict(ArrayData* arr) { assert(arr->isDict()); Array ar(arr); MixedArray::IterateKV( MixedArray::asMixed(arr), [&](Cell k, TypedValue v) { if (!isRefcountedType(v.m_type)) return false; Variant value{tvAsCVarRef(&v)}; deepCopy(value.asTypedValue()); if (value.asTypedValue()->m_data.num != v.m_data.num) { ar.set(k, *value.asTypedValue()); } return false; } ); return ar.detach(); } ObjectData* deepCopySet(c_Set* st) { return c_Set::Clone(st); } ObjectData* deepCopyImmSet(c_ImmSet* st) { return c_ImmSet::Clone(st); } void deepCopy(TypedValue* tv) { switch (tv->m_type) { DT_UNCOUNTED_CASE: case KindOfString: case KindOfResource: case KindOfRef: case KindOfKeyset: return; case KindOfVec: { auto arr = deepCopyVecArray(tv->m_data.parr); decRefArr(tv->m_data.parr); tv->m_data.parr = arr; return; } case KindOfDict: { auto arr = deepCopyDict(tv->m_data.parr); decRefArr(tv->m_data.parr); tv->m_data.parr = arr; return; } case KindOfArray: { auto arr = deepCopyArray(tv->m_data.parr); decRefArr(tv->m_data.parr); tv->m_data.parr = arr; return; } case KindOfObject: { auto obj = tv->m_data.pobj; if (!obj->isCollection()) return; const auto copyVector = [](BaseVector* vec) { if (vec->size() > 0 && vec->arrayData()->isRefCounted()) { vec->mutate(); auto elm = vec->data(); auto end = vec->data() + vec->size(); do { deepCopy(elm); } while (++elm < end); } return vec; }; const auto copyMap = [](BaseMap* mp) { if (mp->size() > 0 && mp->arrayData()->isRefCounted()) { mp->mutate(); auto used = mp->posLimit(); for (uint32_t i = 0; i < used; ++i) { if (mp->isTombstone(i)) continue; auto* e = &mp->data()[i]; deepCopy(&e->data); } } return mp; }; switch (obj->collectionType()) { case CollectionType::Pair: { auto pair = c_Pair::Clone(static_cast<c_Pair*>(obj)); Object o = Object::attach(pair); deepCopy(&pair->elm0); deepCopy(&pair->elm1); obj = o.detach(); break; } case CollectionType::Vector: obj = copyVector(c_Vector::Clone(static_cast<c_Vector*>(obj))); break; case CollectionType::ImmVector: obj = copyVector(c_ImmVector::Clone(static_cast<c_ImmVector*>(obj))); break; case CollectionType::Map: obj = copyMap(c_Map::Clone(static_cast<c_Map*>(obj))); break; case CollectionType::ImmMap: obj = copyMap(c_ImmMap::Clone(static_cast<c_ImmMap*>(obj))); break; case CollectionType::Set: obj = c_Set::Clone(static_cast<c_Set*>(obj)); break; case CollectionType::ImmSet: obj = c_ImmSet::Clone(static_cast<c_ImmSet*>(obj)); break; default: assertx(false); } assert(obj != tv->m_data.pobj || tv->m_data.pobj->hasMultipleRefs()); decRefObj(tv->m_data.pobj); tv->m_data.pobj = obj; return; } } not_reached(); } ///////////////////////////////////////////////////////////////////////////// // Read/Write access template <bool throwOnMiss> static inline TypedValue* atImpl(ObjectData* obj, const TypedValue* key) { assert(key->m_type != KindOfRef); switch (obj->collectionType()) { #define X(type) case CollectionType::type: \ return c_##type::OffsetAt<throwOnMiss>(obj, key); COLLECTIONS_ALL_TYPES(X) #undef X } return nullptr; } TypedValue* at(ObjectData* obj, const TypedValue* key) { return atImpl<true>(obj, key); } TypedValue* get(ObjectData* obj, const TypedValue* key) { return atImpl<false>(obj, key); } TypedValue* atLval(ObjectData* obj, const TypedValue* key) { assertx(key->m_type != KindOfRef); TypedValue* ret; switch (obj->collectionType()) { case CollectionType::Pair: ret = c_Pair::OffsetAt<true>(obj, key); break; case CollectionType::Vector: { ret = BaseVector::OffsetAt<true>(obj, key); // We're about to expose an element of a Vector in an lvalue context; // if the element is a value-type (anything other than objects and // resources) we need to sever any buffer sharing that might be going on auto* vec = static_cast<c_Vector*>(obj); if (UNLIKELY(!vec->canMutateBuffer() && ret->m_type != KindOfObject && ret->m_type != KindOfResource)) { vec->mutate(); ret = BaseVector::OffsetAt<true>(obj, key); } return ret; } case CollectionType::ImmVector: ret = BaseVector::OffsetAt<true>(obj, key); break; case CollectionType::Map: { ret = BaseMap::OffsetAt<true>(obj, key); // We're about to expose an element of a Map in an lvalue context; // if the element is a value-type (anything other than objects and // resources) we need to sever any buffer sharing that might be going on auto* mp = static_cast<c_Map*>(obj); if (UNLIKELY(!mp->canMutateBuffer() && ret->m_type != KindOfObject && ret->m_type != KindOfResource)) { mp->mutate(); ret = BaseMap::OffsetAt<true>(obj, key); } return ret; } case CollectionType::ImmMap: ret = BaseMap::OffsetAt<true>(obj, key); break; case CollectionType::Set: case CollectionType::ImmSet: BaseSet::throwNoMutableIndexAccess(); } // Value-type elements (anything other than objects and resources) of // an immutable collection "inherit" the collection's immutable status. // We do not allow value-type elements of an immutable collection to // be read in an "lvalue" context in order to prevent null->array // promotion, null->stdClass promotion, and mutating strings or arrays // in place (see "test/slow/collection_classes/invalid-operations.php" // for examples). if (ret->m_type != KindOfObject && ret->m_type != KindOfResource) { throw_cannot_modify_immutable_object(obj->getClassName().data()); } return ret; } TypedValue* atRw(ObjectData* obj, const TypedValue* key) { assertx(key->m_type != KindOfRef); switch (obj->collectionType()) { case CollectionType::Vector: // Since we're exposing an element of a Vector in an read/write context, // we need to sever any buffer sharing that might be going on. static_cast<c_Vector*>(obj)->mutate(); return BaseVector::OffsetAt<true>(obj, key); case CollectionType::Map: static_cast<c_Map*>(obj)->mutate(); return BaseMap::OffsetAt<true>(obj, key); case CollectionType::Set: case CollectionType::ImmSet: BaseSet::throwNoMutableIndexAccess(); case CollectionType::ImmVector: case CollectionType::ImmMap: case CollectionType::Pair: throw_cannot_modify_immutable_object(obj->getClassName().data()); } return nullptr; } bool contains(ObjectData* obj, const Variant& offset) { auto* key = offset.asCell(); switch (obj->collectionType()) { case CollectionType::Vector: case CollectionType::ImmVector: return BaseVector::OffsetContains(obj, key); case CollectionType::Map: case CollectionType::ImmMap: return BaseMap::OffsetContains(obj, key); case CollectionType::Set: case CollectionType::ImmSet: return BaseSet::OffsetContains(obj, key); case CollectionType::Pair: return c_Pair::OffsetContains(obj, key); } not_reached(); } bool isset(ObjectData* obj, const TypedValue* key) { assertx(key->m_type != KindOfRef); switch (obj->collectionType()) { case CollectionType::Vector: case CollectionType::ImmVector: return BaseVector::OffsetIsset(obj, key); case CollectionType::Map: case CollectionType::ImmMap: return BaseMap::OffsetIsset(obj, key); case CollectionType::Set: case CollectionType::ImmSet: return BaseSet::OffsetIsset(obj, key); case CollectionType::Pair: return c_Pair::OffsetIsset(obj, key); } not_reached(); } bool empty(ObjectData* obj, const TypedValue* key) { assertx(key->m_type != KindOfRef); switch (obj->collectionType()) { case CollectionType::Vector: case CollectionType::ImmVector: return BaseVector::OffsetEmpty(obj, key); case CollectionType::Map: case CollectionType::ImmMap: return BaseMap::OffsetEmpty(obj, key); case CollectionType::Set: case CollectionType::ImmSet: return BaseSet::OffsetEmpty(obj, key); case CollectionType::Pair: return c_Pair::OffsetEmpty(obj, key); } not_reached(); } void unset(ObjectData* obj, const TypedValue* key) { assertx(key->m_type != KindOfRef); switch (obj->collectionType()) { case CollectionType::Vector: c_Vector::OffsetUnset(obj, key); break; case CollectionType::Map: c_Map::OffsetUnset(obj, key); break; case CollectionType::Set: BaseSet::OffsetUnset(obj, key); break; case CollectionType::ImmVector: case CollectionType::ImmMap: case CollectionType::ImmSet: case CollectionType::Pair: throw_cannot_modify_immutable_object(obj->getClassName().data()); } } void append(ObjectData* obj, TypedValue* val) { assertx(val->m_type != KindOfRef); assertx(val->m_type != KindOfUninit); switch (obj->collectionType()) { case CollectionType::Vector: static_cast<c_Vector*>(obj)->add(*val); break; case CollectionType::Map: static_cast<c_Map*>(obj)->add(*val); break; case CollectionType::Set: static_cast<c_Set*>(obj)->add(*val); break; case CollectionType::ImmVector: case CollectionType::ImmMap: case CollectionType::ImmSet: case CollectionType::Pair: throw_cannot_modify_immutable_object(obj->getClassName().data()); } } void set(ObjectData* obj, const TypedValue* key, const TypedValue* val) { assertx(key->m_type != KindOfRef); assertx(val->m_type != KindOfRef); assertx(val->m_type != KindOfUninit); switch (obj->collectionType()) { case CollectionType::Vector: c_Vector::OffsetSet(obj, key, val); break; case CollectionType::Map: BaseMap::OffsetSet(obj, key, val); break; case CollectionType::Set: case CollectionType::ImmSet: BaseSet::throwNoMutableIndexAccess(); break; case CollectionType::ImmVector: case CollectionType::ImmMap: case CollectionType::Pair: throw_cannot_modify_immutable_object(obj->getClassName().data()); } } bool equals(const ObjectData* obj1, const ObjectData* obj2) { assertx(isValidCollection(obj1->collectionType())); if (!obj2->isCollection()) return false; auto ct1 = obj1->collectionType(); auto ct2 = obj2->collectionType(); // we intentionally allow mutable/immutable versions of the same collection // type to compare equal if (isMapCollection(ct1)) { return isMapCollection(ct2) && BaseMap::Equals(obj1, obj2); } else if (isVectorCollection(ct1)) { return isVectorCollection(ct2) && BaseVector::Equals(obj1, obj2); } else if (isSetCollection(ct1)) { return isSetCollection(ct2) && BaseSet::Equals(obj1, obj2); } else { assertx(ct1 == CollectionType::Pair); return (ct2 == CollectionType::Pair) && c_Pair::Equals(obj1, obj2); } } Variant pop(ObjectData* obj) { assertx(obj->isCollection()); assertx(isMutableCollection(obj->collectionType())); switch (obj->collectionType()) { case CollectionType::Vector: return static_cast<c_Vector*>(obj)->pop(); case CollectionType::Map: return static_cast<c_Map*>(obj)->pop(); case CollectionType::Set: return static_cast<c_Set*>(obj)->pop(); default: assertx(false); } not_reached(); } Variant shift(ObjectData* obj) { assertx(obj->isCollection()); assertx(isMutableCollection(obj->collectionType())); switch (obj->collectionType()) { case CollectionType::Vector: return static_cast<c_Vector*>(obj)->popFront(); case CollectionType::Map: return static_cast<c_Map*>(obj)->popFront(); case CollectionType::Set: return static_cast<c_Set*>(obj)->popFront(); default: assertx(false); } not_reached(); } ///////////////////////////////////////////////////////////////////////////// }}
segment _TEXT class=CODE USE32 align=1 CPU=686 extern _entry start: mov ax, 0x18 mov ds, ax mov es, ax mov ss, ax xor eax, eax mov ax, 0x1234 shl eax, 4 add eax, 0x3000 mov esp, [eax] call _entry .infloop: hlt jmp .infloop global _ret_16 _ret_16: jmp dword 0x10:0x8000
#include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include <QString> #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #include <QUrl> #include <QTextDocument> // For Qt::escape #include <QAbstractItemView> #include <QApplication> #include <QClipboard> #include <QFileDialog> #include <QDesktopServices> #include <QThread> #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #ifdef WIN32 #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif #define _WIN32_WINNT 0x0501 #ifdef _WIN32_IE #undef _WIN32_IE #endif #define _WIN32_IE 0x0501 #define WIN32_LEAN_AND_MEAN 1 #ifndef NOMINMAX #define NOMINMAX #endif #include "shlwapi.h" #include "shlobj.h" #include "shellapi.h" #endif namespace GUIUtil { QString dateTimeStr(const QDateTime &date) { return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm"); } QString dateTimeStr(qint64 nTime) { return dateTimeStr(QDateTime::fromTime_t((qint32)nTime)); } QFont bitcoinAddressFont() { QFont font("Monospace"); font.setStyleHint(QFont::TypeWriter); return font; } void setupAddressWidget(QLineEdit *widget, QWidget *parent) { widget->setMaxLength(BitcoinAddressValidator::MaxAddressLength); widget->setValidator(new BitcoinAddressValidator(parent)); widget->setFont(bitcoinAddressFont()); } void setupAmountWidget(QLineEdit *widget, QWidget *parent) { QDoubleValidator *amountValidator = new QDoubleValidator(parent); amountValidator->setDecimals(8); amountValidator->setBottom(0.0); widget->setValidator(amountValidator); widget->setAlignment(Qt::AlignRight|Qt::AlignVCenter); } bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out) { // NovaCoin: check prefix if(uri.scheme() != QString("snide")) return false; SendCoinsRecipient rv; rv.address = uri.path(); rv.amount = 0; QList<QPair<QString, QString> > items = uri.queryItems(); for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++) { bool fShouldReturnFalse = false; if (i->first.startsWith("req-")) { i->first.remove(0, 4); fShouldReturnFalse = true; } if (i->first == "label") { rv.label = i->second; fShouldReturnFalse = false; } else if (i->first == "amount") { if(!i->second.isEmpty()) { if(!BitcoinUnits::parse(BitcoinUnits::BTC, i->second, &rv.amount)) { return false; } } fShouldReturnFalse = false; } if (fShouldReturnFalse) return false; } if(out) { *out = rv; } return true; } bool parseBitcoinURI(QString uri, SendCoinsRecipient *out) { // Convert snide:// to xonecoin: // // Cannot handle this later, because bitcoin:// will cause Qt to see the part after // as host, // which will lower-case it (and thus invalidate the address). if(uri.startsWith("snide://")) { uri.replace(0, 12, "snide:"); } QUrl uriInstance(uri); return parseBitcoinURI(uriInstance, out); } QString HtmlEscape(const QString& str, bool fMultiLine) { QString escaped = Qt::escape(str); if(fMultiLine) { escaped = escaped.replace("\n", "<br>\n"); } return escaped; } QString HtmlEscape(const std::string& str, bool fMultiLine) { return HtmlEscape(QString::fromStdString(str), fMultiLine); } void copyEntryData(QAbstractItemView *view, int column, int role) { if(!view || !view->selectionModel()) return; QModelIndexList selection = view->selectionModel()->selectedRows(column); if(!selection.isEmpty()) { // Copy first item QApplication::clipboard()->setText(selection.at(0).data(role).toString()); } } QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut) { QString selectedFilter; QString myDir; if(dir.isEmpty()) // Default to user documents location { myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); } else { myDir = dir; } QString result = QFileDialog::getSaveFileName(parent, caption, myDir, filter, &selectedFilter); /* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */ QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]"); QString selectedSuffix; if(filter_re.exactMatch(selectedFilter)) { selectedSuffix = filter_re.cap(1); } /* Add suffix if needed */ QFileInfo info(result); if(!result.isEmpty()) { if(info.suffix().isEmpty() && !selectedSuffix.isEmpty()) { /* No suffix specified, add selected suffix */ if(!result.endsWith(".")) result.append("."); result.append(selectedSuffix); } } /* Return selected suffix if asked to */ if(selectedSuffixOut) { *selectedSuffixOut = selectedSuffix; } return result; } Qt::ConnectionType blockingGUIThreadConnection() { if(QThread::currentThread() != QCoreApplication::instance()->thread()) { return Qt::BlockingQueuedConnection; } else { return Qt::DirectConnection; } } bool checkPoint(const QPoint &p, const QWidget *w) { QWidget *atW = qApp->widgetAt(w->mapToGlobal(p)); if (!atW) return false; return atW->topLevelWidget() == w; } bool isObscured(QWidget *w) { return !(checkPoint(QPoint(0, 0), w) && checkPoint(QPoint(w->width() - 1, 0), w) && checkPoint(QPoint(0, w->height() - 1), w) && checkPoint(QPoint(w->width() - 1, w->height() - 1), w) && checkPoint(QPoint(w->width() / 2, w->height() / 2), w)); } void openDebugLogfile() { boost::filesystem::path pathDebug = GetDataDir() / "debug.log"; /* Open debug.log with the associated application */ if (boost::filesystem::exists(pathDebug)) QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(pathDebug.string()))); } ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) : QObject(parent), size_threshold(size_threshold) { } bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt) { if(evt->type() == QEvent::ToolTipChange) { QWidget *widget = static_cast<QWidget*>(obj); QString tooltip = widget->toolTip(); if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt>") && !Qt::mightBeRichText(tooltip)) { // Prefix <qt/> to make sure Qt detects this as rich text // Escape the current message as HTML and replace \n by <br> tooltip = "<qt>" + HtmlEscape(tooltip, true) + "<qt/>"; widget->setToolTip(tooltip); return true; } } return QObject::eventFilter(obj, evt); } #ifdef WIN32 boost::filesystem::path static StartupShortcutPath() { return GetSpecialFolderPath(CSIDL_STARTUP) / "snide.lnk"; } bool GetStartOnSystemStartup() { // check for Bitcoin.lnk return boost::filesystem::exists(StartupShortcutPath()); } bool SetStartOnSystemStartup(bool fAutoStart) { // If the shortcut exists already, remove it for updating boost::filesystem::remove(StartupShortcutPath()); if (fAutoStart) { CoInitialize(NULL); // Get a pointer to the IShellLink interface. IShellLink* psl = NULL; HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast<void**>(&psl)); if (SUCCEEDED(hres)) { // Get the current executable path TCHAR pszExePath[MAX_PATH]; GetModuleFileName(NULL, pszExePath, sizeof(pszExePath)); TCHAR pszArgs[5] = TEXT("-min"); // Set the path to the shortcut target psl->SetPath(pszExePath); PathRemoveFileSpec(pszExePath); psl->SetWorkingDirectory(pszExePath); psl->SetShowCmd(SW_SHOWMINNOACTIVE); psl->SetArguments(pszArgs); // Query IShellLink for the IPersistFile interface for // saving the shortcut in persistent storage. IPersistFile* ppf = NULL; hres = psl->QueryInterface(IID_IPersistFile, reinterpret_cast<void**>(&ppf)); if (SUCCEEDED(hres)) { WCHAR pwsz[MAX_PATH]; // Ensure that the string is ANSI. MultiByteToWideChar(CP_ACP, 0, StartupShortcutPath().string().c_str(), -1, pwsz, MAX_PATH); // Save the link by calling IPersistFile::Save. hres = ppf->Save(pwsz, TRUE); ppf->Release(); psl->Release(); CoUninitialize(); return true; } psl->Release(); } CoUninitialize(); return false; } return true; } #elif defined(Q_OS_LINUX) // Follow the Desktop Application Autostart Spec: // http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html boost::filesystem::path static GetAutostartDir() { namespace fs = boost::filesystem; char* pszConfigHome = getenv("XDG_CONFIG_HOME"); if (pszConfigHome) return fs::path(pszConfigHome) / "autostart"; char* pszHome = getenv("HOME"); if (pszHome) return fs::path(pszHome) / ".config" / "autostart"; return fs::path(); } boost::filesystem::path static GetAutostartFilePath() { return GetAutostartDir() / "snide.desktop"; } bool GetStartOnSystemStartup() { boost::filesystem::ifstream optionFile(GetAutostartFilePath()); if (!optionFile.good()) return false; // Scan through file for "Hidden=true": std::string line; while (!optionFile.eof()) { getline(optionFile, line); if (line.find("Hidden") != std::string::npos && line.find("true") != std::string::npos) return false; } optionFile.close(); return true; } bool SetStartOnSystemStartup(bool fAutoStart) { if (!fAutoStart) boost::filesystem::remove(GetAutostartFilePath()); else { char pszExePath[MAX_PATH+1]; memset(pszExePath, 0, sizeof(pszExePath)); if (readlink("/proc/self/exe", pszExePath, sizeof(pszExePath)-1) == -1) return false; boost::filesystem::create_directories(GetAutostartDir()); boost::filesystem::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out|std::ios_base::trunc); if (!optionFile.good()) return false; // Write a bitcoin.desktop file to the autostart directory: optionFile << "[Desktop Entry]\n"; optionFile << "Type=Application\n"; optionFile << "Name=snide\n"; optionFile << "Exec=" << pszExePath << " -min\n"; optionFile << "Terminal=false\n"; optionFile << "Hidden=false\n"; optionFile.close(); } return true; } #else // TODO: OSX startup stuff; see: // https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Articles/CustomLogin.html bool GetStartOnSystemStartup() { return false; } bool SetStartOnSystemStartup(bool fAutoStart) { return false; } #endif HelpMessageBox::HelpMessageBox(QWidget *parent) : QMessageBox(parent) { header = tr("snide-qt") + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion()) + "\n\n" + tr("Usage:") + "\n" + " snide-qt [" + tr("command-line options") + "] " + "\n"; coreOptions = QString::fromStdString(HelpMessage()); uiOptions = tr("UI options") + ":\n" + " -lang=<lang> " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" + " -min " + tr("Start minimized") + "\n" + " -splash " + tr("Show splash screen on startup (default: 1)") + "\n"; setWindowTitle(tr("snide-qt")); setTextFormat(Qt::PlainText); // setMinimumWidth is ignored for QMessageBox so put in non-breaking spaces to make it wider. setText(header + QString(QChar(0x2003)).repeated(50)); setDetailedText(coreOptions + "\n" + uiOptions); } void HelpMessageBox::printToConsole() { // On other operating systems, the expected action is to print the message to the console. QString strUsage = header + "\n" + coreOptions + "\n" + uiOptions; fprintf(stdout, "%s", strUsage.toStdString().c_str()); } void HelpMessageBox::showOrPrint() { #if defined(WIN32) // On Windows, show a message box, as there is no stderr/stdout in windowed applications exec(); #else // On other operating systems, print help text to console printToConsole(); #endif } } // namespace GUIUtil
; A161852: Solutions to the simultaneous equations m(n)+1=a(n)^2 and 7*m(n)+1=b(n)^2. ; Submitted by Jon Maiga ; 1,5,11,79,175,1259,2789,20065,44449,319781,708395,5096431,11289871,81223115,179929541,1294473409,2867582785,20630351429,45701395019,328791149455,728354737519,5240028039851,11607974405285,83511657488161,184999235747041,1330946491770725 add $0,1 mul $0,2 mov $3,1 lpb $0 sub $0,1 add $2,$3 mov $3,$1 mov $1,$2 dif $2,4 mul $2,2 lpe mov $0,$3
// // X509Certificate.cpp // // $Id: //poco/1.4/NetSSL_OpenSSL/src/X509Certificate.cpp#2 $ // // Library: NetSSL_OpenSSL // Package: SSLCore // Module: X509Certificate // // Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH. // and Contributors. // // Permission is hereby granted, free of charge, to any person or organization // obtaining a copy of the software and accompanying documentation covered by // this license (the "Software") to use, reproduce, display, distribute, // execute, and transmit the Software, and to prepare derivative works of the // Software, and to permit third-parties to whom the Software is furnished to // do so, all subject to the following: // // The copyright notices in the Software and this entire statement, including // the above license grant, this restriction and the following disclaimer, // must be included in all copies of the Software, in whole or in part, and // all derivative works of the Software, unless such copies or derivative // works are solely in the form of machine-executable object code generated by // a source language processor. // // 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. // #include "Poco/Net/X509Certificate.h" #include "Poco/Net/SSLException.h" #include "Poco/Net/SSLManager.h" #include "Poco/Net/DNS.h" #include "Poco/TemporaryFile.h" #include "Poco/FileStream.h" #include "Poco/StreamCopier.h" #include "Poco/String.h" #include "Poco/RegularExpression.h" #include "Poco/DateTimeParser.h" #include <openssl/pem.h> #include <openssl/x509v3.h> #include <openssl/err.h> namespace Poco { namespace Net { X509Certificate::X509Certificate(std::istream& istr): Poco::Crypto::X509Certificate(istr) { } X509Certificate::X509Certificate(const std::string& path): Poco::Crypto::X509Certificate(path) { } X509Certificate::X509Certificate(X509* pCert): Poco::Crypto::X509Certificate(pCert) { } X509Certificate::X509Certificate(X509* pCert, bool shared): Poco::Crypto::X509Certificate(pCert, shared) { } X509Certificate::X509Certificate(const Poco::Crypto::X509Certificate& cert): Poco::Crypto::X509Certificate(cert) { } X509Certificate& X509Certificate::operator = (const Poco::Crypto::X509Certificate& cert) { X509Certificate tmp(cert); swap(tmp); return *this; } X509Certificate::~X509Certificate() { } bool X509Certificate::verify(const std::string& hostName) const { return verify(*this, hostName); } bool X509Certificate::verify(const Poco::Crypto::X509Certificate& certificate, const std::string& hostName) { std::string commonName; std::set<std::string> dnsNames; certificate.extractNames(commonName, dnsNames); bool ok = (dnsNames.find(hostName) != dnsNames.end()); char buffer[NAME_BUFFER_SIZE]; X509_NAME* subj = 0; if (!ok && (subj = X509_get_subject_name(const_cast<X509*>(certificate.certificate()))) && X509_NAME_get_text_by_NID(subj, NID_commonName, buffer, sizeof(buffer)) > 0) { buffer[NAME_BUFFER_SIZE - 1] = 0; std::string commonName(buffer); // commonName can contain wildcards like *.appinf.com try { // two cases: strData contains wildcards or not if (containsWildcards(commonName)) { // a compare by IPAddress is not possible with wildcards // only allow compare by name const HostEntry& heData = DNS::resolve(hostName); ok = matchByAlias(commonName, heData); } else { // it depends on hostName if we compare by IP or by alias IPAddress ip; if (IPAddress::tryParse(hostName, ip)) { // compare by IP const HostEntry& heData = DNS::resolve(commonName); const HostEntry::AddressList& addr = heData.addresses(); HostEntry::AddressList::const_iterator it = addr.begin(); HostEntry::AddressList::const_iterator itEnd = addr.end(); for (; it != itEnd && !ok; ++it) { ok = (*it == ip); } } else { // compare by name const HostEntry& heData = DNS::resolve(hostName); ok = matchByAlias(commonName, heData); } } } catch (HostNotFoundException&) { return false; } } return ok; } bool X509Certificate::containsWildcards(const std::string& commonName) { return (commonName.find('*') != std::string::npos || commonName.find('?') != std::string::npos); } bool X509Certificate::matchByAlias(const std::string& alias, const HostEntry& heData) { // fix wildcards std::string aliasRep = Poco::replace(alias, ".", "\\."); Poco::replaceInPlace(aliasRep, "*", ".*"); Poco::replaceInPlace(aliasRep, "..*", ".*"); Poco::replaceInPlace(aliasRep, "?", ".?"); Poco::replaceInPlace(aliasRep, "..?", ".?"); // compare by name Poco::RegularExpression expr(aliasRep); bool found = false; const HostEntry::AliasList& aliases = heData.aliases(); HostEntry::AliasList::const_iterator it = aliases.begin(); HostEntry::AliasList::const_iterator itEnd = aliases.end(); for (; it != itEnd && !found; ++it) { found = expr.match(*it); } // Handle the case where the list of aliases is empty. if (aliases.empty()) { // Compare the host name against the wildcard host name in the certificate. found = expr.match(heData.name()); } return found; } } } // namespace Poco::Net
INCLUDE "graphics/grafix.inc" XLIB drawb LIB w_pixeladdress ; LIB l_cmp ; ; $Id: drawb.asm,v 1.1 2010/11/16 19:41:11 stefano Exp $ ; ; *********************************************************************** ; ; drawbox Timex hires version ; .PIXEL DEFB 0 .drawb ld ix,0 add ix,sp ld l,(ix+8) ld h,(ix+9); x ld a,1 cp h ret c ld e,(ix+6); y ld a,maxy cp e ret c ; left vertical call pixel_addr call vertical ; right vertical line ld l,(ix+8) ld h,(ix+9); x ld c,(ix+4) ld b,(ix+5); width add hl,bc ld a,1 cp h jr c,next ld e,(ix+6) call pixel_addr call vertical .next ; upper horizontal line ld l,(ix+8) ld h,(ix+9) ; x ld e,(ix+6) ; y call pixel_addr call horizontal .next2 ; bottom horizontal line ld l,(ix+8) ld h,(ix+9);x ld e,(ix+6);y ld a,(ix+2);height add a,e ret c ld e,a ld a,maxy cp e ret c call pixel_addr ; jp horizontal .horizontal ld c,(ix+4) ld b,(ix+5) ; width .loop3 ld a,(de) or (hl) ld (de),a call incx ret c ld a,b or c ret z dec bc jr loop3 ret ; (hl) mask ; de - screen address .incx rrc (hl) ret nc bit 5,d jr nz,first set 5,d or a ret .first res 5,d inc e ld a,e and $1f ret nz scf ret .incy inc d ld a,d and $07 ret nz ld a,d sub $08 ld d,a ld a,e add a,$20 ld e,a ret nc ld a,d add a,$08 ld d,a and 95 cp $58 ccf ret .pixel_addr ld d,0 call w_pixeladdress ld b,a ld a,1 jr z,getout; pixel is at bit 0... .loop1 rlca djnz loop1 .getout ld (PIXEL),a ld hl,PIXEL ret .vertical ; vertical line ld b,(ix+2) ; height .loop2 ld a,(de) or (hl) ld (de),a call incy ret c djnz loop2 ret
.global s_prepare_buffers s_prepare_buffers: push %r15 push %r8 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x2280, %rsi lea addresses_UC_ht+0xcf82, %rdi xor $64083, %rbp mov $82, %rcx rep movsw cmp $41437, %r15 lea addresses_normal_ht+0x1cf80, %r8 nop nop nop nop inc %rdx mov $0x6162636465666768, %rdi movq %rdi, %xmm0 vmovups %ymm0, (%r8) sub %rdi, %rdi lea addresses_WC_ht+0xba80, %rbp nop nop and %r8, %r8 mov $0x6162636465666768, %rdi movq %rdi, %xmm1 movups %xmm1, (%rbp) nop nop nop nop cmp %rcx, %rcx lea addresses_A_ht+0xde80, %rsi lea addresses_A_ht+0x530, %rdi nop nop nop nop inc %rax mov $70, %rcx rep movsw nop nop nop sub %r15, %r15 lea addresses_UC_ht+0x9280, %rcx clflush (%rcx) dec %rax mov $0x6162636465666768, %r15 movq %r15, (%rcx) nop nop nop cmp $27112, %rcx lea addresses_WC_ht+0x16e12, %rsi lea addresses_WT_ht+0x767b, %rdi nop add %rax, %rax mov $116, %rcx rep movsw nop nop nop inc %rcx lea addresses_normal_ht+0x1e5c0, %rsi nop nop nop nop nop xor $13952, %rax mov $0x6162636465666768, %rdx movq %rdx, %xmm1 movups %xmm1, (%rsi) nop nop nop nop nop xor $37673, %rdi lea addresses_UC_ht+0xc7b0, %rdi nop nop nop and $5726, %rcx mov $0x6162636465666768, %rax movq %rax, %xmm7 movups %xmm7, (%rdi) nop nop nop and $46086, %rdi lea addresses_A_ht+0x155a8, %rdx nop nop sub %rbp, %rbp movw $0x6162, (%rdx) nop nop nop nop nop sub %rdi, %rdi lea addresses_WC_ht+0xa840, %rbp cmp %rcx, %rcx movl $0x61626364, (%rbp) nop nop nop nop nop inc %rdi lea addresses_A_ht+0x14c0, %rdx nop nop nop cmp $65252, %rsi vmovups (%rdx), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $1, %xmm1, %r15 nop sub %rcx, %rcx lea addresses_A_ht+0x109c0, %rbp nop sub $41607, %rax movb (%rbp), %dl nop add $34841, %rsi lea addresses_A_ht+0x1dd80, %rsi lea addresses_WC_ht+0x12a80, %rdi nop nop nop nop sub %r15, %r15 mov $26, %rcx rep movsb nop nop nop nop nop and %rbp, %rbp lea addresses_WC_ht+0x1b408, %r8 add $60612, %rdi mov (%r8), %edx nop add %rbp, %rbp lea addresses_D_ht+0x3b50, %rdi nop nop nop nop nop cmp %rsi, %rsi mov (%rdi), %r15w nop nop nop xor %r8, %r8 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r15 ret .global s_faulty_load s_faulty_load: push %r13 push %r8 push %rax push %rbx push %rcx push %rdx push %rsi // Store mov $0x1ed6970000000e80, %r8 cmp $25128, %rcx mov $0x5152535455565758, %r13 movq %r13, (%r8) nop nop nop nop add %rdx, %rdx // Store lea addresses_D+0xf080, %rbx dec %rsi movw $0x5152, (%rbx) nop add %r8, %r8 // Load lea addresses_US+0x1db20, %r8 clflush (%r8) sub $9401, %rbx movb (%r8), %r13b nop nop nop nop nop dec %rsi // Store lea addresses_WC+0xb844, %rax nop nop sub %rcx, %rcx mov $0x5152535455565758, %rsi movq %rsi, %xmm7 movups %xmm7, (%rax) nop nop dec %r8 // Faulty Load lea addresses_A+0x1a280, %rdx xor %rax, %rax mov (%rdx), %ebx lea oracles, %rcx and $0xff, %rbx shlq $12, %rbx mov (%rcx,%rbx,1), %rbx pop %rsi pop %rdx pop %rcx pop %rbx pop %rax pop %r8 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': True, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'00': 2084} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r8 push %r9 push %rbp push %rbx lea addresses_UC_ht+0x1eb2b, %r9 nop dec %rbx vmovups (%r9), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $1, %xmm6, %rbp cmp $41893, %r8 lea addresses_normal_ht+0x12c92, %r9 nop xor %rbp, %rbp movb $0x61, (%r9) nop nop add $55014, %r8 pop %rbx pop %rbp pop %r9 pop %r8 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %rax push %rdi // Faulty Load mov $0x1c0bed0000000401, %r14 nop nop nop nop dec %rax movups (%r14), %xmm0 vpextrq $0, %xmm0, %r11 lea oracles, %rdi and $0xff, %r11 shlq $12, %r11 mov (%rdi,%r11,1), %r11 pop %rdi pop %rax pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': 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 */
; A210062: Number of digits in 7^n. ; 1,1,2,3,4,5,6,6,7,8,9,10,11,11,12,13,14,15,16,17,17,18,19,20,21,22,22,23,24,25,26,27,28,28,29,30,31,32,33,33,34,35,36,37,38,39,39,40,41,42,43,44,44,45,46,47,48,49,50,50,51,52,53,54,55,55,56,57 mul $0,11 sub $0,1 div $0,13 mov $1,$0 add $1,1
;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2008, 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: ; ; SetMem.Asm ; ; Abstract: ; ; SetMem function ; ; Notes: ; ;------------------------------------------------------------------------------ DEFAULT REL SECTION .text ;------------------------------------------------------------------------------ ; VOID * ; EFIAPI ; InternalMemSetMem ( ; IN VOID *Buffer, ; IN UINTN Count, ; IN UINT8 Value ; ) ;------------------------------------------------------------------------------ global ASM_PFX(InternalMemSetMem) ASM_PFX(InternalMemSetMem): push rdi push rbx push rcx ; push Buffer mov rax, r8 ; rax = Value and rax, 0xff ; rax = lower 8 bits of r8, upper 56 bits are 0 mov ah, al ; ah = al mov bx, ax ; bx = ax shl rax, 0x10 ; rax = ax << 16 mov ax, bx ; ax = bx mov rbx, rax ; ebx = eax shl rax, 0x20 ; rax = rax << 32 or rax, rbx ; eax = ebx mov rdi, rcx ; rdi = Buffer mov rcx, rdx ; rcx = Count shr rcx, 3 ; rcx = rcx / 8 cld rep stosq mov rcx, rdx ; rcx = rdx and rcx, 7 ; rcx = rcx & 7 rep stosb pop rax ; rax = Buffer pop rbx pop rdi ret
; A136799: Last term in a sequence of at least 3 consecutive composite integers. ; 10,16,22,28,36,40,46,52,58,66,70,78,82,88,96,100,106,112,126,130,136,148,156,162,166,172,178,190,196,210,222,226,232,238,250,256,262,268,276,280,292,306,310,316,330,336,346,352,358,366,372,378,382,388,396,400,408,418,430,438,442,448,456,460,466,478,486,490,498,502,508,520,540,546,556,562,568,576,586,592,598,606,612,616,630,640,646,652,658,672,676,682,690,700,708,718,726,732,738,742 add $0,2 seq $0,156828 ; a(1) = 2. a(n) = the smallest prime >= a(n-1) + 4. sub $0,1
; A164349: The limit of the string "0, 1" under the operation 'repeat string twice and remove last symbol'. ; 0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0 lpb $0 sub $0,2 cal $0,62050 ; n-th chunk consists of the numbers 1, ..., 2^n. sub $0,1 lpe mov $1,$0
C nettle, low-level cryptographics library C C Copyright (C) 2013 Niels Möller C C The nettle library is free software; you can redistribute it and/or modify C it under the terms of the GNU Lesser General Public License as published by C the Free Software Foundation; either version 2.1 of the License, or (at your C option) any later version. C C The nettle library is distributed in the hope that it will be useful, but C WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY C or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public C License for more details. C C You should have received a copy of the GNU Lesser General Public License C along with the nettle library; see the file COPYING.LIB. If not, write to C the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, C MA 02111-1301, USA. .file "sha512-compress.asm" .fpu neon define(<STATE>, <r0>) define(<INPUT>, <r1>) define(<K>, <r2>) define(<COUNT>, <r3>) define(<SHIFT>, <r12>) define(<SA>, <d0>) define(<SB>, <d1>) define(<SC>, <d2>) define(<SD>, <d3>) define(<SE>, <d4>) define(<SF>, <d5>) define(<SG>, <d6>) define(<SH>, <d7>) define(<QSAB>, <q0>) define(<QSCD>, <q1>) define(<QSEF>, <q2>) define(<QSGH>, <q3>) C d8-d15 are callee-save define(<DT0>, <d8>) define(<DT1>, <d9>) define(<QT01>, <q4>) define(<DT2>, <d10>) define(<DT3>, <d11>) define(<QT23>, <q5>) define(<DT4>, <d12>) define(<DT5>, <d13>) define(<QT45>, <q6>) C Used only when reading the input, can overlap with state define(<DT6>, <d0>) define(<DT7>, <d1>) define(<QT67>, <q0>) define(<DW0>, <d16>) define(<DW1>, <d17>) define(<DW2>, <d18>) define(<DW3>, <d19>) define(<DW4>, <d20>) define(<DW5>, <d21>) define(<DW6>, <d22>) define(<DW7>, <d23>) define(<DW8>, <d24>) define(<DW9>, <d25>) define(<DW10>, <d26>) define(<DW11>, <d27>) define(<DW12>, <d28>) define(<DW13>, <d29>) define(<DW14>, <d30>) define(<DW15>, <d31>) define(<QW0001>, <q8>) define(<QW0203>, <q9>) define(<QW0405>, <q10>) define(<QW0607>, <q11>) define(<QW0809>, <q12>) define(<QW1011>, <q13>) define(<QW1213>, <q14>) define(<QW1415>, <q15>) define(<EXPAND_ME>, <$1>) define(<W>, <EXPAND_ME(<DW>eval(($1) % 16))>) C If x = W(i+14), y = w(i+1), we xor in parallel C C x << 45 y << 63 C x >> 19 y >> 1 C x << 3 y << 56 C x >> 61 y >> 8 C xor x >> 6 y >> 7 C ----------------------------- C DT0 DT1 define(<EXPN>, < vshl.i64 DT0, W($1+14), #45 vshl.i64 DT1, W($1 + 1), #63 vshr.u64 DT2, W($1+14), #19 vshr.u64 DT3, W($1 + 1), #1 vshl.i64 DT4, W($1+14), #3 vshl.i64 DT5, W($1 + 1), #56 veor.i64 QT01, QT01, QT23 vshr.u64 DT2, W($1+14), #61 vshr.u64 DT3, W($1 + 1), #8 veor.i64 QT01, QT01, QT45 vshr.u64 DT4, W($1+14), #6 vshr.u64 DT5, W($1 + 1), #7 veor.i64 QT01, QT01, QT23 vadd.i64 W($1), W($1), W($1 + 9) veor.i64 QT01, QT01, QT45 vadd.i64 W($1), W($1), DT0 vadd.i64 W($1), W($1), DT1 >) C ROUND(A,B,C,D,E,F,G,H,i) C C H += S1(E) + Choice(E,F,G) + K + W C D += H C H += S0(A) + Majority(A,B,C) C C Where C C S1(E) = E<<<50 ^ E<<<46 ^ E<<<23 C S0(A) = A<<<36 ^ A<<<30 ^ A<<<25 C Choice (E, F, G) = G^(E&(F^G)) C Majority (A,B,C) = (A&B) + (C&(A^B)) C Do S1 and S0 in parallel C C e << 50 a << 36 C e >> 14 a >> 28 C e << 46 a << 30 C e >> 18 a >> 34 C e << 23 a << 25 C xor e >> 41 a >> 39 C ---------------------------- C DT0 DT1 define(<ROUND>, < vshl.i64 DT0, $5, #50 vshl.i64 DT1, $1, #36 vshr.u64 DT2, $5, #14 vshr.u64 DT3, $1, #28 vshl.i64 DT4, $5, #46 vshl.i64 DT5, $1, #30 veor QT01, QT01, QT23 vshr.u64 DT2, $5, #18 vshr.u64 DT3, $1, #34 veor QT01, QT01, QT45 vshl.i64 DT4, $5, #23 vshl.i64 DT5, $1, #25 veor QT01, QT01, QT23 vshr.u64 DT2, $5, #41 vshr.u64 DT3, $1, #39 veor QT01, QT01, QT45 veor DT4, $6, $7 veor DT5, $1, $2 vand DT4, DT4, $5 vand DT5, DT5, $3 veor DT4, DT4, $7 veor QT01, QT01, QT23 vand DT2, $1, $2 vldr DT3, [K,#eval(8*$9)] vadd.i64 $8, $8, W($9) vadd.i64 QT01, QT01, QT45 vadd.i64 $8, $8, DT3 vadd.i64 $8, $8, DT0 vadd.i64 DT1, DT1, DT2 vadd.i64 $4, $4, $8 vadd.i64 $8, $8, DT1 >) C void C _nettle_sha512_compress(uint64_t *state, const uint8_t *input, const uint64_t *k) .text .align 2 PROLOGUE(_nettle_sha512_compress) vpush {d8,d9,d10,d11,d12,d13} ands SHIFT, INPUT, #7 and INPUT, INPUT, #-8 vld1.8 {DT5}, [INPUT :64] addne INPUT, INPUT, #8 addeq SHIFT, SHIFT, #8 lsl SHIFT, SHIFT, #3 C Put right shift in DT0 and DT1, aka QT01 neg SHIFT, SHIFT vmov.i32 DT0, #0 vmov.32 DT0[0], SHIFT vmov DT1, DT0 C Put left shift in DT2 and DT3, aka QT23 add SHIFT, SHIFT, #64 vmov.i32 DT2, #0 vmov.32 DT2[0], SHIFT vmov DT3, DT2 vshl.u64 DT5, DT5, DT0 C Set w[i] <-- w[i-1] >> RSHIFT + w[i] << LSHIFT vld1.8 {W(0),W(1),W(2),W(3)}, [INPUT :64]! vshl.u64 QT67, QW0001, QT01 C Right shift vshl.u64 QW0001, QW0001, QT23 C Left shift veor W(0), W(0), DT5 veor W(1), W(1), DT6 vrev64.8 QW0001, QW0001 vshl.u64 QT45, QW0203, QT01 C Right shift vshl.u64 QW0203, QW0203, QT23 C Left shift veor W(2), W(2), DT7 veor W(3), W(3), DT4 vrev64.8 QW0203, QW0203 vld1.8 {W(4),W(5),W(6),W(7)}, [INPUT :64]! vshl.u64 QT67, QW0405, QT01 C Right shift vshl.u64 QW0405, QW0405, QT23 C Left shift veor W(4), W(4), DT5 veor W(5), W(5), DT6 vrev64.8 QW0405, QW0405 vshl.u64 QT45, QW0607, QT01 C Right shift vshl.u64 QW0607, QW0607, QT23 C Left shift veor W(6), W(6), DT7 veor W(7), W(7), DT4 vrev64.8 QW0607, QW0607 vld1.8 {W(8),W(9),W(10),W(11)}, [INPUT :64]! vshl.u64 QT67, QW0809, QT01 C Right shift vshl.u64 QW0809, QW0809, QT23 C Left shift veor W(8), W(8), DT5 veor W(9), W(9), DT6 vrev64.8 QW0809, QW0809 vshl.u64 QT45, QW1011, QT01 C Right shift vshl.u64 QW1011, QW1011, QT23 C Left shift veor W(10), W(10), DT7 veor W(11), W(11), DT4 vrev64.8 QW1011, QW1011 vld1.8 {W(12),W(13),W(14),W(15)}, [INPUT :64]! vshl.u64 QT67, QW1213, QT01 C Right shift vshl.u64 QW1213, QW1213, QT23 C Left shift veor W(12), W(12), DT5 veor W(13), W(13), DT6 vrev64.8 QW1213, QW1213 vshl.u64 QT45, QW1415, QT01 C Right shift vshl.u64 QW1415, QW1415, QT23 C Left shift veor W(14), W(14), DT7 veor W(15), W(15), DT4 vrev64.8 QW1415, QW1415 vldm STATE, {SA,SB,SC,SD,SE,SF,SG,SH} ROUND(SA,SB,SC,SD,SE,SF,SG,SH, 0) ROUND(SH,SA,SB,SC,SD,SE,SF,SG, 1) ROUND(SG,SH,SA,SB,SC,SD,SE,SF, 2) ROUND(SF,SG,SH,SA,SB,SC,SD,SE, 3) ROUND(SE,SF,SG,SH,SA,SB,SC,SD, 4) ROUND(SD,SE,SF,SG,SH,SA,SB,SC, 5) ROUND(SC,SD,SE,SF,SG,SH,SA,SB, 6) ROUND(SB,SC,SD,SE,SF,SG,SH,SA, 7) ROUND(SA,SB,SC,SD,SE,SF,SG,SH, 8) ROUND(SH,SA,SB,SC,SD,SE,SF,SG, 9) ROUND(SG,SH,SA,SB,SC,SD,SE,SF, 10) ROUND(SF,SG,SH,SA,SB,SC,SD,SE, 11) ROUND(SE,SF,SG,SH,SA,SB,SC,SD, 12) ROUND(SD,SE,SF,SG,SH,SA,SB,SC, 13) ROUND(SC,SD,SE,SF,SG,SH,SA,SB, 14) ROUND(SB,SC,SD,SE,SF,SG,SH,SA, 15) add K, K, #128 mov COUNT, #4 .Loop: EXPN( 0) ROUND(SA,SB,SC,SD,SE,SF,SG,SH, 0) EXPN( 1) ROUND(SH,SA,SB,SC,SD,SE,SF,SG, 1) EXPN( 2) ROUND(SG,SH,SA,SB,SC,SD,SE,SF, 2) EXPN( 3) ROUND(SF,SG,SH,SA,SB,SC,SD,SE, 3) EXPN( 4) ROUND(SE,SF,SG,SH,SA,SB,SC,SD, 4) EXPN( 5) ROUND(SD,SE,SF,SG,SH,SA,SB,SC, 5) EXPN( 6) ROUND(SC,SD,SE,SF,SG,SH,SA,SB, 6) EXPN( 7) ROUND(SB,SC,SD,SE,SF,SG,SH,SA, 7) EXPN( 8) ROUND(SA,SB,SC,SD,SE,SF,SG,SH, 8) EXPN( 9) ROUND(SH,SA,SB,SC,SD,SE,SF,SG, 9) EXPN(10) ROUND(SG,SH,SA,SB,SC,SD,SE,SF, 10) EXPN(11) ROUND(SF,SG,SH,SA,SB,SC,SD,SE, 11) EXPN(12) ROUND(SE,SF,SG,SH,SA,SB,SC,SD, 12) EXPN(13) ROUND(SD,SE,SF,SG,SH,SA,SB,SC, 13) EXPN(14) ROUND(SC,SD,SE,SF,SG,SH,SA,SB, 14) subs COUNT, COUNT, #1 EXPN(15) ROUND(SB,SC,SD,SE,SF,SG,SH,SA, 15) add K, K, #128 bne .Loop vld1.64 {DW0, DW1, DW2, DW3}, [STATE] vadd.i64 QSAB, QSAB, QW0001 vadd.i64 QSCD, QSCD, QW0203 vst1.64 {SA,SB,SC,SD}, [STATE]! vld1.64 {DW0, DW1, DW2, DW3}, [STATE] vadd.i64 QSEF, QSEF, QW0001 vadd.i64 QSGH, QSGH, QW0203 vst1.64 {SE,SF,SG,SH}, [STATE]! vpop {d8,d9,d10,d11,d12,d13} bx lr EPILOGUE(_nettle_sha512_compress) divert(-1) define shastate p/x $d0.u64 p/x $d1.u64 p/x $d2.u64 p/x $d3.u64 p/x $d4.u64 p/x $d5.u64 p/x $d6.u64 p/x $d7.u64 end
; A124203: a(n) = 2n + "reverse of n-written-in-binary" + 2. ; 2,5,7,11,11,17,17,23,19,29,27,37,29,39,37,47,35,53,47,65,47,65,59,77,53,71,65,83,65,83,77,95,67,101,87,121,83,117,103,137,87,121,107,141,103,137,123,157,101,135,121,155,117,151,137,171,121,155,141,175,137 mov $2,$0 mov $5,$0 lpb $2,1 sub $0,$4 div $2,2 sub $0,$2 mov $4,$2 sub $4,$0 lpe mov $1,$0 add $1,2 mov $3,$5 mul $3,2 add $1,$3
// This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/04/Mult.asm // Multiplies R0 and R1 and stores the result in R2. // (R0, R1, R2 refer to RAM[0], RAM[1], and RAM[2], respectively.) // Put your code here. @R2 M=0 @I M=1 (LOOP) @R0 D=M @I D=M&D @NOT_ADD D;JEQ @R1 D=M @R2 M=M+D (NOT_ADD) @R1 D=M M=M+D @I D=M M=M+D D=M @R0 D=M-D @LOOP D;JGE (END) @END 0;JMP
SECTION code_fp_math16 PUBLIC mul10f16 EXTERN asm_f16_mul10 defc mul10f16 = asm_f16_mul10 ; SDCC bridge for Classic IF __CLASSIC PUBLIC _mul10f16 EXTERN cm16_sdcc_mul10 defc _mul10f16 = cm16_sdcc_mul10 ENDIF
<% from pwnlib.shellcraft.i386.linux import syscall %> <%page args=""/> <%docstring> Invokes the syscall getgid. See 'man 2 getgid' for more information. Arguments: </%docstring> ${syscall('SYS_getgid')}
/* * Copyright Andrey Semashev 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) */ // Test if we can include system headers with -D_XOPEN_SOURCE=600 #undef _XOPEN_SOURCE #define _XOPEN_SOURCE 600 #include <unistd.h> int main(int, char*[]) { return 0; }
@Define start { mflr r0 stw r0,8(r1) stwu r1,-56(r1) } @Define end { la r1,56(r1) lwz r0,8(r1) mtlr r0 blr } @Define nothing { nop } @main _start _nothing _end @Import CarbonLib { Debugger }
; test to check the "bit 6,a" pattern bit 6,a jp nz,loop ld (hl), 1 loop: jr loop
; A206913: Greatest binary palindrome <= n; the binary palindrome floor function. ; 0,1,1,3,3,5,5,7,7,9,9,9,9,9,9,15,15,17,17,17,17,21,21,21,21,21,21,27,27,27,27,31,31,33,33,33,33,33,33,33,33,33,33,33,33,45,45,45,45,45,45,51,51,51,51,51,51,51,51,51,51,51,51,63,63,65,65,65,65,65,65,65,65,73,73,73,73,73,73,73,73,73,73,73,73,85,85,85,85,85,85,85,85,93,93,93,93,93,93,99,99,99,99,99,99,99,99,107,107,107,107,107,107,107,107,107,107,107,107,119,119,119,119,119,119,119,119,127,127,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,153,153,153,153,153,153,153,153,153,153,153,153,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,189,189,189,189,189,189,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,219,219,219,219,219,219,219,219,219,219,219,219,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231 lpb $0,1 mov $1,$0 cal $1,178225 ; Characteristic function of A006995 (binary palindromes). sub $0,1 add $0,$1 lpe mov $1,$0
; A168674: a(n) = 2*A001610(n). ; 0,4,6,12,20,34,56,92,150,244,396,642,1040,1684,2726,4412,7140,11554,18696,30252,48950,79204,128156,207362,335520,542884,878406,1421292,2299700,3720994,6020696,9741692,15762390,25504084,41266476,66770562,108037040,174807604,282844646,457652252,740496900,1198149154,1938646056,3136795212,5075441270,8212236484,13287677756,21499914242,34787592000,56287506244,91075098246,147362604492,238437702740,385800307234,624238009976,1010038317212,1634276327190,2644314644404,4278590971596,6922905616002,11201496587600,18124402203604,29325898791206,47450300994812,76776199786020,124226500780834,201002700566856,325229201347692,526231901914550,851461103262244,1377693005176796,2229154108439042,3606847113615840,5836001222054884 lpb $0,1 sub $0,1 mov $2,$1 mov $1,$3 add $1,4 add $3,$2 add $3,2 lpe
/* Copyright 2017 Andrey Goryachev Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #pragma once #include <algorithm> #include <cstddef> #include <utility> #include <vector> namespace hnsw { template<class Key, class Value> class flat_map { public: using size_type = std::size_t; using key_type = Key; using mapped_type = Value; using value_type = std::pair<key_type, mapped_type>; using container_type = std::vector<value_type>; using iterator = typename container_type::iterator; using const_iterator = typename container_type::const_iterator; using reverse_iterator = typename container_type::reverse_iterator; using const_reverse_iterator = typename container_type::const_reverse_iterator; private: struct compare_t { bool operator()(const key_type &l, const key_type &r) const { return l < r; } bool operator()(const value_type &l, const key_type &r) const { return l.first < r; } bool operator()(const key_type &l, const value_type &r) const { return l < r.first; } bool operator()(const value_type &l, const value_type &r) const { return l.first < r.first; } }; public: const_iterator cbegin() const { return m_values.cbegin(); } const_iterator cend() const { return m_values.cend(); } const_iterator begin() const { return m_values.begin(); } const_iterator end() const { return m_values.end(); } iterator begin() { return m_values.begin(); } iterator end() { return m_values.end(); } const_reverse_iterator crbegin() const { return m_values.crbegin(); } const_reverse_iterator crend() const { return m_values.crend(); } const_reverse_iterator rbegin() const { return m_values.rbegin(); } const_reverse_iterator rend() const { return m_values.rend(); } reverse_iterator rbegin() { return m_values.rbegin(); } reverse_iterator rend() { return m_values.rend(); } bool empty() const { return m_values.empty(); } size_type size() const { return m_values.size(); } size_type capacity() const { return m_values.capacity(); } size_type count(const key_type &k) const { auto range = std::equal_range(m_values.begin(), m_values.end(), k, compare_t()); return range.second - range.first; } bool has(const key_type &k) const { return std::binary_search(m_values.begin(), m_values.end(), k, compare_t()); } template<class It> void assign_ordered_unique(It begin, It end) { clear(); m_values.assign(begin, end); } std::pair<iterator, bool> insert(value_type &&new_value) { compare_t compare; auto it = std::lower_bound(m_values.begin(), m_values.end(), new_value, compare); if (it != m_values.end() && !compare(*it, new_value) && !compare(new_value, *it)) { return {it, false}; } auto new_item_pos = it - m_values.begin(); m_values.insert(it, std::move(new_value)); return {m_values.begin() + new_item_pos, true}; } std::pair<iterator, bool> insert(const value_type &new_value) { return insert(value_type(new_value)); } template<class... Args> std::pair<iterator, bool> emplace(Args &&... args) { return insert(value_type(std::forward<Args>(args)...)); } size_type erase(const key_type &k) { auto range = std::equal_range(m_values.begin(), m_values.end(), k, compare_t()); size_type result = size_type(range.second - range.first); if (range.first != range.second) { m_values.erase(range.first, range.second); } return result; } void clear() { m_values.clear(); } void reserve(size_type capacity) { m_values.reserve(capacity); } private: container_type m_values; }; }
// Distributed under the MIT License. // See LICENSE.txt for details. #include "Framework/TestingFramework.hpp" #include <limits> #include "DataStructures/DataBox/DataBox.hpp" #include "DataStructures/DataVector.hpp" #include "DataStructures/Tensor/Tensor.hpp" #include "Framework/TestHelpers.hpp" #include "Helpers/DataStructures/DataBox/TestHelpers.hpp" #include "Helpers/PointwiseFunctions/Hydro/TestHelpers.hpp" #include "PointwiseFunctions/Hydro/EquationsOfState/EquationOfState.hpp" #include "PointwiseFunctions/Hydro/EquationsOfState/IdealFluid.hpp" #include "PointwiseFunctions/Hydro/EquationsOfState/PolytropicFluid.hpp" #include "PointwiseFunctions/Hydro/SoundSpeedSquared.hpp" #include "PointwiseFunctions/Hydro/Tags.hpp" #include "Utilities/Gsl.hpp" namespace { template <typename DataType, typename EquationOfStateType> void test_compute_item_in_databox( const Scalar<DataType>& rest_mass_density, const Scalar<DataType>& specific_internal_energy, const Scalar<DataType>& specific_enthalpy, const EquationOfStateType& equation_of_state) { TestHelpers::db::test_compute_tag< hydro::Tags::SoundSpeedSquaredCompute<DataType>>("SoundSpeedSquared"); const auto box = db::create< db::AddSimpleTags<hydro::Tags::RestMassDensity<DataType>, hydro::Tags::SpecificInternalEnergy<DataType>, hydro::Tags::SpecificEnthalpy<DataType>, hydro::Tags::EquationOfState<EquationOfStateType>>, db::AddComputeTags<hydro::Tags::SoundSpeedSquaredCompute<DataType>>>( rest_mass_density, specific_internal_energy, specific_enthalpy, equation_of_state); const auto expected_sound_speed_squared = hydro::sound_speed_squared(rest_mass_density, specific_internal_energy, specific_enthalpy, equation_of_state); CHECK(db::get<hydro::Tags::SoundSpeedSquared<DataType>>(box) == expected_sound_speed_squared); } template <typename DataType> void test_sound_speed_squared(const DataType& used_for_size) { MAKE_GENERATOR(generator); const auto rest_mass_density = TestHelpers::hydro::random_density( make_not_null(&generator), used_for_size); Scalar<DataType> specific_internal_energy{}; Scalar<DataType> specific_enthalpy{}; // check with representative equation of state of one independent variable const EquationsOfState::PolytropicFluid<true> eos_1d(0.003, 4.0 / 3.0); specific_internal_energy = eos_1d.specific_internal_energy_from_density(rest_mass_density); specific_enthalpy = eos_1d.specific_enthalpy_from_density(rest_mass_density); CHECK( Scalar<DataType>{(get(eos_1d.chi_from_density(rest_mass_density)) + get(eos_1d.kappa_times_p_over_rho_squared_from_density( rest_mass_density))) / get(specific_enthalpy)} == hydro::sound_speed_squared(rest_mass_density, specific_internal_energy, specific_enthalpy, eos_1d)); test_compute_item_in_databox(rest_mass_density, specific_internal_energy, specific_enthalpy, eos_1d); // check with representative equation of state of two independent variables const EquationsOfState::IdealFluid<true> eos_2d(5.0 / 3.0); specific_internal_energy = TestHelpers::hydro::random_specific_internal_energy( make_not_null(&generator), used_for_size); specific_enthalpy = eos_2d.specific_enthalpy_from_density_and_energy( rest_mass_density, specific_internal_energy); CHECK(Scalar<DataType>{ (get(eos_2d.chi_from_density_and_energy(rest_mass_density, specific_internal_energy)) + get(eos_2d.kappa_times_p_over_rho_squared_from_density_and_energy( rest_mass_density, specific_internal_energy))) / get(specific_enthalpy)} == hydro::sound_speed_squared(rest_mass_density, specific_internal_energy, specific_enthalpy, eos_2d)); test_compute_item_in_databox(rest_mass_density, specific_internal_energy, specific_enthalpy, eos_2d); } } // namespace SPECTRE_TEST_CASE("Unit.PointwiseFunctions.Hydro.SoundSpeedSquared", "[Unit][Evolution]") { test_sound_speed_squared(std::numeric_limits<double>::signaling_NaN()); test_sound_speed_squared(DataVector(5)); }
; A337898: Number of achiral colorings of the 6 square faces of a cube or the 6 vertices of a regular octahedron using n or fewer colors. ; Submitted by Christian Krause ; 1,10,55,200,560,1316,2730,5160,9075,15070,23881,36400,53690,77000,107780,147696,198645,262770,342475,440440,559636,703340,875150,1079000,1319175,1600326,1927485,2306080,2741950,3241360 add $0,2 mov $1,$0 bin $0,2 bin $0,2 sub $1,1 mul $0,$1 add $1,2 bin $1,3 add $1,$0 mov $0,$1
nop add r1,r6,r10 begin: sub r1,r1,r4 nop sub r1,r1,r4 nop bnez r1,begin sw 0(r0),r2 nop
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Berkeley Softworks 1995 -- All Rights Reserved PROJECT: PC GEOS MODULE: Printer Drivers FILE: customNoPCLReset.asm AUTHOR: Dave Durran ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Dave 6/95 Initial revision DESCRIPTION: Get around JEDI Serial Port Power timing problem by not sending a reset at end of job. $Id: customNoPCLReset.asm,v 1.1 97/04/18 11:50:58 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrintEnterLJ4PCL/PrintExitLJ4PCL %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Do pre-job initialization CALLED BY: INTERNAL jumped to from PrintStartJob/PrintEndJob PASS: es - segment of locked PState RETURN: carry - set if some communication problem DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Dave 4/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrintExitNoPCLReset proc near jmp EndExit PrintExitNoPCLReset endp
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_D_ht+0x1736e, %rsi lea addresses_UC_ht+0x15c1e, %rdi nop nop nop sub %r11, %r11 mov $30, %rcx rep movsl nop nop and %r9, %r9 lea addresses_UC_ht+0x34de, %r13 nop nop nop nop nop cmp %r10, %r10 movb (%r13), %cl nop nop nop nop dec %rcx lea addresses_WC_ht+0x13f5e, %rsi nop nop and $8784, %r9 movb (%rsi), %r11b nop nop nop cmp $3292, %r13 lea addresses_UC_ht+0x1d5be, %r10 nop nop nop cmp %r13, %r13 movb $0x61, (%r10) nop nop nop nop dec %rdi lea addresses_WT_ht+0xb7de, %r9 nop nop nop cmp %r11, %r11 vmovups (%r9), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %rcx nop nop nop nop and $53528, %r9 lea addresses_D_ht+0x13de, %r13 add %r9, %r9 movw $0x6162, (%r13) nop nop nop inc %r13 lea addresses_UC_ht+0x1d5de, %rsi lea addresses_WC_ht+0xa94e, %rdi clflush (%rdi) add %rax, %rax mov $67, %rcx rep movsl nop nop nop nop sub %rsi, %rsi lea addresses_WC_ht+0xef5e, %rdi nop nop nop sub %rcx, %rcx mov $0x6162636465666768, %r9 movq %r9, (%rdi) nop nop nop nop nop cmp %r13, %r13 lea addresses_normal_ht+0xdbde, %r11 nop cmp $8954, %rsi movb (%r11), %al nop nop and $1710, %r13 lea addresses_WT_ht+0x4e82, %r11 nop nop nop nop nop dec %rdi movw $0x6162, (%r11) nop nop nop xor %rsi, %rsi lea addresses_UC_ht+0x143de, %r13 nop nop nop nop and %rcx, %rcx mov (%r13), %r9d nop nop nop nop sub $17792, %r11 pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %rax push %rbp push %rbx push %rdx // Store lea addresses_WT+0x135de, %r12 nop inc %rbx mov $0x5152535455565758, %rdx movq %rdx, %xmm4 movaps %xmm4, (%r12) nop nop nop xor $27608, %rdx // Store mov $0xc0c5f00000003de, %r13 clflush (%r13) nop nop sub $51537, %rdx mov $0x5152535455565758, %r12 movq %r12, %xmm7 movaps %xmm7, (%r13) nop nop nop nop and %rbx, %rbx // Store lea addresses_WC+0xd176, %rbx xor %rbp, %rbp movw $0x5152, (%rbx) nop nop nop nop nop add $17414, %r13 // Faulty Load lea addresses_A+0x157de, %rbx nop nop sub $60259, %rax movb (%rbx), %r13b lea oracles, %rbx and $0xff, %r13 shlq $12, %r13 mov (%rbx,%r13,1), %r13 pop %rdx pop %rbx pop %rbp pop %rax pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_A', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'dst': {'type': 'addresses_NC', 'same': False, 'size': 16, 'congruent': 9, 'NT': True, 'AVXalign': True}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_A', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'same': True, 'size': 1, 'congruent': 7, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'00': 49} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 zengfr site:http://github.com/zengfr/romhack 00042A move.l D1, (A0)+ 00042C dbra D0, $42a 004A20 move.w A0, ($6726,A5) 004A24 moveq #$17, D0 [base+6726] 004BEA movea.w ($6726,A5), A4 004BEE move.w A6, -(A4) [base+6726] 004BF0 move.w A4, ($6726,A5) [base+67AA, base+67AC, base+67AE, base+67B0, base+67B2, base+67B4, base+67B6, base+67B8, base+67BA, base+67BC] 004BF4 addq.w #1, ($671e,A5) [base+6726] 010616 cmpa.w ($6726,A5), A0 01061A bcc $10622 [base+6726] 010622 move.w A0, ($6726,A5) 010626 move.w D0, ($671c,A5) [base+6726] 010854 movea.w ($6726,A5), A1 010858 movea.w (A1)+, A3 [base+6726] 01090C movea.w ($6726,A5), A1 010910 movea.w (A1)+, A3 [base+6726] 01096C movea.w ($6726,A5), A1 010970 movea.w (A1)+, A3 [base+6726] 010FBC movea.w ($6726,A5), A1 010FC0 movea.w (A1)+, A3 [base+6726] 0115B8 movea.w ($6726,A5), A0 0115BC subq.w #1, D7 [base+6726] 011876 movea.w ($6726,A5), A1 01187A movea.w (A1)+, A3 [base+6726] 011E7C movea.w ($6726,A5), A1 011E80 movea.w (A1)+, A3 [base+6726] 012024 movea.w ($6726,A5), A0 012028 subq.w #1, D7 [base+6726] 0AAACA move.l (A0), D2 0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 0AAACE move.w D0, ($2,A0) 0AAAD2 cmp.l (A0), D0 0AAAD4 bne $aaafc 0AAAD8 move.l D2, (A0)+ 0AAADA cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 0AAAE6 move.l (A0), D2 0AAAE8 move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 0AAAF4 move.l D2, (A0)+ 0AAAF6 cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] copyright zengfr site:http://github.com/zengfr/romhack
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r14 push %r15 push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0x102e, %r15 nop nop nop xor $31689, %rsi movups (%r15), %xmm0 vpextrq $1, %xmm0, %rdi nop add $16620, %r14 lea addresses_D_ht+0x172da, %r14 nop and $46258, %rcx movb $0x61, (%r14) nop nop nop nop add $48081, %r14 lea addresses_normal_ht+0x1e2da, %rcx nop nop nop nop sub %rbp, %rbp mov (%rcx), %r14 nop sub %r14, %r14 lea addresses_WC_ht+0x1039a, %rcx add $61211, %rbp mov $0x6162636465666768, %r14 movq %r14, %xmm6 vmovups %ymm6, (%rcx) nop nop nop sub $10267, %r15 lea addresses_A_ht+0x1789c, %r15 nop add %rdi, %rdi mov $0x6162636465666768, %rsi movq %rsi, %xmm4 vmovups %ymm4, (%r15) nop nop nop nop nop add %r15, %r15 lea addresses_WT_ht+0x11eda, %rdi nop nop nop nop add $59669, %rsi mov $0x6162636465666768, %rbp movq %rbp, (%rdi) nop nop cmp $43573, %rdi lea addresses_WC_ht+0x1dada, %r15 nop nop nop nop dec %r14 mov $0x6162636465666768, %rsi movq %rsi, (%r15) add $7530, %rbp lea addresses_normal_ht+0x1eda, %rbp clflush (%rbp) nop nop nop nop cmp %r14, %r14 movl $0x61626364, (%rbp) sub $49287, %r10 lea addresses_A_ht+0x1c6da, %r14 cmp %rsi, %rsi mov $0x6162636465666768, %rbp movq %rbp, %xmm3 and $0xffffffffffffffc0, %r14 movntdq %xmm3, (%r14) nop nop dec %r14 lea addresses_D_ht+0xdd62, %rsi lea addresses_D_ht+0xed46, %rdi clflush (%rsi) nop nop nop nop nop inc %r12 mov $6, %rcx rep movsq nop and $41428, %r14 lea addresses_UC_ht+0x134da, %rsi lea addresses_WT_ht+0x1055a, %rdi nop nop add %rbp, %rbp mov $111, %rcx rep movsl and %rsi, %rsi lea addresses_WT_ht+0xfcba, %r12 nop sub %r10, %r10 movb $0x61, (%r12) nop nop nop sub %rbp, %rbp lea addresses_WT_ht+0x6bda, %r15 nop nop nop nop sub $3164, %rcx movw $0x6162, (%r15) nop nop nop nop sub $4300, %r15 lea addresses_WC_ht+0x182ea, %r15 nop add %r10, %r10 mov (%r15), %edi nop nop nop nop nop sub $64607, %rdi lea addresses_D_ht+0x1dada, %rsi lea addresses_WT_ht+0x7db6, %rdi and $44526, %rbp mov $65, %rcx rep movsb nop nop nop nop dec %r14 pop %rsi pop %rdi pop %rcx pop %rbp pop %r15 pop %r14 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r14 push %r15 push %r9 push %rbp push %rsi // Store mov $0xd1e, %r9 nop nop and %rbp, %rbp mov $0x5152535455565758, %r15 movq %r15, (%r9) nop nop nop and %r15, %r15 // Store lea addresses_WT+0x17ada, %r13 nop nop add %rsi, %rsi mov $0x5152535455565758, %r15 movq %r15, %xmm1 vmovups %ymm1, (%r13) add $15453, %r9 // Faulty Load mov $0xeda, %rsi nop nop nop nop dec %r13 vmovntdqa (%rsi), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %r14 lea oracles, %r10 and $0xff, %r14 shlq $12, %r14 mov (%r10,%r14,1), %r14 pop %rsi pop %rbp pop %r9 pop %r15 pop %r14 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_P', 'congruent': 0}} {'dst': {'same': False, 'NT': True, 'AVXalign': True, 'size': 8, 'type': 'addresses_P', 'congruent': 1}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT', 'congruent': 8}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_P', 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 2}} {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 10}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 10}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WC_ht', 'congruent': 5}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A_ht', 'congruent': 1}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT_ht', 'congruent': 10}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 10}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal_ht', 'congruent': 8}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 16, 'type': 'addresses_A_ht', 'congruent': 10}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}} {'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_UC_ht'}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 5}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WT_ht', 'congruent': 7}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_WC_ht', 'congruent': 3}} {'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 10, 'type': 'addresses_D_ht'}} {'c0': 1, '46': 20313, '49': 1399, '1a': 1, '08': 6, '00': 109} 46 46 46 46 46 46 46 46 46 46 46 46 46 00 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 49 46 46 46 46 49 46 46 46 46 49 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 49 46 49 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 49 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 49 46 46 46 46 46 49 46 46 49 46 49 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 49 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 49 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 */
//===--------------------------------------------------------------------------------*- C++ -*-===// // _ _ // | | | | // __ _| |_ ___| | __ _ _ __ __ _ // / _` | __/ __| |/ _` | '_ \ / _` | // | (_| | || (__| | (_| | | | | (_| | // \__, |\__\___|_|\__,_|_| |_|\__, | - GridTools Clang DSL // __/ | __/ | // |___/ |___/ // // // This file is distributed under the MIT License (MIT). // See LICENSE.txt for details. // //===------------------------------------------------------------------------------------------===// #pragma once /** * @name Storage defintions * @ingroup gridtools_clang * @{ */ #define GRIDTOOLS_CLANG_STORAGE_DUMMY 0 #define GRIDTOOLS_CLANG_STORAGE_HOST 1 #define GRIDTOOLS_CLANG_STORAGE_CUDA 2 /** @} */ /** * @name Grid defintions * @ingroup gridtools_clang * @{ */ #define GRIDTOOLS_CLANG_GRID_STRUCTURED 0 /** @} */ /** * @name Floating point precisions * @ingroup gridtools_clang * @{ */ #define GRIDTOOLS_CLANG_SINGLE_PRECISION 0 #define GRIDTOOLS_CLANG_DOUBLE_PRECISION 1 /** @} */ // Default precision: // 1. Honor defintions of gridtools FLOAT_PRECISION // 2. Fall back to double precision #ifndef GRIDTOOLS_CLANG_PRECISION #ifdef FLOAT_PRECISION #if FLOAT_PRECISION == 4 #define GRIDTOOLS_CLANG_PRECISION GRIDTOOLS_CLANG_FLOAT_PRECISION #else #define GRIDTOOLS_CLANG_PRECISION GRIDTOOLS_CLANG_DOUBLE_PRECISION #endif #undef FLOAT_PRECISION #else // !defined(FLOAT_PRECISION) #define GRIDTOOLS_CLANG_PRECISION GRIDTOOLS_CLANG_DOUBLE_PRECISION #endif // FLOAT_PRECISION #endif // GRIDTOOLS_CLANG_PRECISION namespace gridtools { namespace clang { /** * @typedef float_type * @brief Floating point type [default: `double`] * * This is either a `double` or `float` depending if `GRIDTOOLS_CLANG_SINGLE_PRECISION` or * `GRIDTOOLS_CLANG_DOUBLE_PRECISION` is defined. Note that it is strongly adviced to use this * typedef instead of `double` or `float` directly as the latter may incur unnecessary casts * in CUDA code. * * @ingroup gridtools_clang */ #if GRIDTOOLS_CLANG_PRECISION == GRIDTOOLS_CLANG_SINGLE_PRECISION #define FLOAT_PRECISION 4 using float_type = float; #elif GRIDTOOLS_CLANG_PRECISION == GRIDTOOLS_CLANG_DOUBLE_PRECISION #define FLOAT_PRECISION 8 using float_type = double; #else #error GRIDTOOLS_CLANG_PRECISION is invalid #endif } }
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // Copyright (c) 2018-2022 Conceal Network & Conceal Devs // // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "IP2pNodeInternal.h"
// Usage: tester [OPTIONS] // // You can pass the tester program one or more of the following options: // u32, s32, u64, s64 or run it without arguments to test all four. // The tester is multithreaded so it can test multiple cases simultaneously. // The tester will verify the correctness of libdivide via a set of // randomly chosen denominators, by comparing the result of libdivide's // division to hardware division. It may take a long time to run, but it // will output as soon as it finds a discrepancy. // Silence MSVC sprintf unsafe warnings #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> #include <thread> #include <vector> #include "DivideTest.h" #include "libdivide.h" enum TestType { type_s16, type_u16, type_s32, type_u32, type_s64, type_u64, }; void wait_for_threads(std::vector<std::thread> &test_threads) { for (auto &t : test_threads) { t.join(); } } uint8_t get_max_threads() { return (uint8_t)std::max(1U, std::thread::hardware_concurrency()); } template<typename _IntT> void launch_test_thread(std::vector<std::thread> &test_threads) { static uint8_t max_threads = get_max_threads(); if (max_threads==test_threads.size()) { wait_for_threads(test_threads); test_threads.clear(); } test_threads.emplace_back(run_test<_IntT>); } int main(int argc, char *argv[]) { bool default_do_test = (argc <= 1); std::vector<bool> do_tests(6, default_do_test); for (int i = 1; i < argc; i++) { const std::string arg(argv[i]); if (arg == type_tag<int16_t>::get_tag()) do_tests[type_s16] = true; else if (arg == type_tag<uint16_t>::get_tag()) do_tests[type_u16] = true; else if (arg == type_tag<int32_t>::get_tag()) do_tests[type_s32] = true; else if (arg == type_tag<uint32_t>::get_tag()) do_tests[type_u32] = true; else if (arg == type_tag<int64_t>::get_tag()) do_tests[type_s64] = true; else if (arg == type_tag<uint64_t>::get_tag()) do_tests[type_u64] = true; else { std::cout << "Usage: tester [OPTIONS]\n" "\n" "You can pass the tester program one or more of the following options:\n" "u16, s16, u32, s32, u64, s64 or run it without arguments to test all four.\n" "The tester is multithreaded so it can test multiple cases simultaneously.\n" "The tester will verify the correctness of libdivide via a set of\n" "randomly chosen denominators, by comparing the result of libdivide's\n" "division to hardware division. It may take a long time to run, but it\n" "will output as soon as it finds a discrepancy." << std::endl; exit(1); } } std::string vecTypes = ""; #if defined(LIBDIVIDE_SSE2) vecTypes += "sse2 "; #endif #if defined(LIBDIVIDE_AVX2) vecTypes += "avx2 "; #endif #if defined(LIBDIVIDE_AVX512) vecTypes += "avx512 "; #endif #if defined(LIBDIVIDE_NEON) vecTypes += "neon "; #endif if (vecTypes.empty()) { vecTypes = "none "; } vecTypes.back() = '\n'; // trailing space std::cout << "Testing with SIMD ISAs: " << vecTypes; // Run tests in threads. std::vector<std::thread> test_threads; if (do_tests[type_s16]) { launch_test_thread<int16_t>(test_threads); } if (do_tests[type_u16]) { launch_test_thread<uint16_t>(test_threads); } if (do_tests[type_s32]) { launch_test_thread<int32_t>(test_threads); } if (do_tests[type_u32]) { launch_test_thread<uint32_t>(test_threads); } if (do_tests[type_s64]) { launch_test_thread<int64_t>(test_threads); } if (do_tests[type_u64]) { launch_test_thread<uint64_t>(test_threads); } wait_for_threads(test_threads); std::cout << "\nAll tests passed successfully!" << std::endl; return 0; }
XLIB read_joypad1 ;============================================================== ; int read_joypad1() ;============================================================== ; Reads the joystick 1 ;============================================================== .read_joypad1 in a, ($dc) ; Reads joystick 1 cpl a ; Inverts all bits ld h, 0 ld l, a ; Puts the result in HL ret
; A243502: Permutation of even numbers: a(n) = 2 * A064216(n). ; 2,4,6,10,8,14,22,12,26,34,20,38,18,16,46,58,28,30,62,44,74,82,24,86,50,52,94,42,68,106,118,40,66,122,76,134,142,36,70,146,32,158,78,92,166,110,116,102,178,56,194,202,60,206,214,124,218,114,88,130,98,148,54,226,164,254,170,48,262,274,172,154,138,100,278,298,104,174,302,188,190,314,84,326,242,136,334,90,212,346,358,236,186,182,80,362,382,132,386,394 mul $0,2 seq $0,64989 ; Multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p. mul $0,2
#include <ESP8266WiFi.h> #include "hardware_esp8266.h" const std::unordered_map<HWI::Pin, int, EnumHash > HardwareESP8266::pinMap = { { Pin::STEP, 4 }, { Pin::DIR, 5 }, { Pin::MOTOR_ENA, 14}, { Pin::HOME, 13} }; const std::unordered_map<HWI::PinState, int, EnumHash > HardwareESP8266::pinStateMap = { { PinState::STEP_ACTIVE, HIGH }, { PinState::STEP_INACTIVE, LOW }, { PinState::DIR_BACKWARD, LOW }, { PinState::DIR_FORWARD, HIGH }, { PinState::MOTOR_OFF, HIGH }, // Active low { PinState::MOTOR_ON, LOW }, // Active low { PinState::HOME_INACTIVE, HIGH }, // Active low { PinState::HOME_ACTIVE, LOW}, // Active low }; void HardwareESP8266::DigitalWrite( Pin pin, PinState state ) { int actualPin = pinMap.at( pin ); int actualState = pinStateMap.at( state ); digitalWrite( actualPin, actualState ); } void HardwareESP8266::PinMode( Pin pin, PinIOMode mode ) { int actualPin = pinMap.at( pin ); pinMode( actualPin, mode == PinIOMode::M_OUTPUT ? OUTPUT : INPUT ); } HWI::PinState HardwareESP8266::DigitalRead( Pin pin) { int actualPin = pinMap.at( pin ); // Tmp Hack. It's always the home pin, which is active low return digitalRead( actualPin ) ? PinState::HOME_INACTIVE : PinState::HOME_ACTIVE; }
; A073553: Number of Fibonacci numbers F(k), k <= 10^n, which end in 5. ; 2,14,134,1334,13334,133334,1333334,13333334,133333334,1333333334,13333333334,133333333334,1333333333334,13333333333334,133333333333334,1333333333333334,13333333333333334,133333333333333334,1333333333333333334,13333333333333333334,133333333333333333334,1333333333333333333334,13333333333333333333334 mov $1,10 pow $1,$0 div $1,9 mul $1,12 add $1,2 mov $0,$1
copyright zengfr site:http://github.com/zengfr/romhack 00042A move.l D1, (A0)+ 00042C dbra D0, $42a 014936 move.w (A1)+, D2 014938 movem.w D0-D3, (A4) [base+6008, base+6020, base+6030, base+6110, base+6118, base+6188, base+6190, base+6198, base+61A0, base+61A8, base+61B0, base+6220, base+6230, base+62B8, base+6310, base+6318, base+6388, base+6390, base+6398, base+63A0, base+63A8, base+63B0, base+6420, base+6428, base+6430, base+64B8, base+6508, base+6510, base+6518, base+6590, base+6598, base+65A0, base+65A8] 07E7E8 move.l D0, (A0)+ 07E7EA dbra D1, $7e7e8 07E9B2 move.l (A0)+, (A1)+ [base+6282, base+6284, base+6302, base+6304, base+6382, base+6384, base+6482, base+6484, base+6502, base+6504] 07E9B4 move.l (A0)+, (A1)+ [base+6286, base+6288, base+6306, base+6308, base+6386, base+6388, base+6486, base+6488, base+6506, base+6508] 07EABE move.w (A0,D0.w), (A1)+ 07EAC2 addi.w #$10, D1 [base+6008, base+6020, base+6028, base+6030, base+6108, base+6110, base+6118, base+6188, base+6190, base+6198, base+61A0, base+61A8, base+61B0, base+6210, base+6220, base+6228, base+6230, base+6308, base+6310, base+6318, base+6388, base+6390, base+6398, base+63A0, base+63A8, base+63B0, base+6420, base+6428, base+6430, base+6508, base+6510, base+6518, base+6530] 0AAACA move.l (A0), D2 0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 0AAACE move.w D0, ($2,A0) 0AAAD2 cmp.l (A0), D0 0AAAD4 bne $aaafc 0AAAD8 move.l D2, (A0)+ 0AAADA cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 0AAAE6 move.l (A0), D2 0AAAE8 move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 0AAAF4 move.l D2, (A0)+ 0AAAF6 cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] copyright zengfr site:http://github.com/zengfr/romhack
/* * Copyright (c) David Connet. All Rights Reserved. * * License: See License.txt */ /** * @file * @brief Global functions * @author David Connet * * Revision History * 2022-02-01 Added backup directory to CreateBackupFile. * 2021-08-24 Make StackTracer work on non-Win32 platforms. * 2019-08-15 Added GetARBResourceDir * 2019-06-28 Fix issue with change nBackups to less than existing backups. * 2018-10-30 Moved some utils from ARBWin. */ #include "stdafx.h" #include "ARBCommon/ARBUtils.h" #include "fmt/xchar.h" #include <wx/config.h> #include <wx/filename.h> #include <wx/stdpaths.h> #ifdef __WXMSW__ #include <wx/msw/msvcrt.h> #endif #if USE_STACKTRACER int CStackTracer::m_indent = 0; CStackTracer::CStackTracer(wxString const& msg) : m_msg(msg) , m_stopwatch() , m_tickle(0) { ++m_indent; wxLogDebug("%*s%s: Enter", m_indent, " ", m_msg); m_stopwatch.Start(); } CStackTracer::~CStackTracer() { m_stopwatch.Pause(); wxLogDebug("%*s%s: Leave [%ld]", m_indent, " ", m_msg, m_stopwatch.Time()); --m_indent; } void CStackTracer::Tickle(wxString const& msg) { long t = m_stopwatch.Time(); wxLogDebug("%*s%s: Tickle [%ld]", m_indent, " ", msg, t - m_tickle); m_tickle = t; } #endif CConfigPathHelper::CConfigPathHelper(wxString const& key) : m_path(wxConfig::Get()->GetPath()) { if (!key.empty()) { wxConfig::Get()->SetPath(key); } } CConfigPathHelper::~CConfigPathHelper() { wxConfig::Get()->SetPath(m_path); } wxString GetARBResourceDir() { #if defined(__WXMAC__) // Note: For command line, this now (as of 3.1.2) returns the exe path. // For the UI, it's the resource bundle path return wxStandardPaths::Get().GetResourcesDir(); #else wxFileName fileName(wxStandardPaths::Get().GetExecutablePath()); return fileName.GetPath(); #endif } bool CreateBackupFile(wxString const& inFilename, int nBackups, wxString const& inDirectory) { bool bChanged = false; if (0 < nBackups) { wxString filename(inFilename); if (!inDirectory.empty()) { wxString dir = wxExpandEnvVars(inDirectory); wxFileName backup(dir, wxString()); if (!backup.Exists()) { if (!backup.Mkdir()) { wxLogError("ERROR: Cannot create directory %s", backup.GetFullPath()); return false; } } wxFileName file(inFilename); backup.SetFullName(file.GetFullName()); filename = backup.GetFullPath(); } // First find a hole. int nHole = -1; int i; for (i = 1; i <= nBackups; ++i) { wxString backup = wxString::Format(L"%s.bck%d", filename.c_str(), i); if (!wxFile::Exists(backup)) { nHole = i; break; } } if (-1 == nHole) nHole = nBackups; // Then shift all the files into the hole. for (i = nHole; i > 1; --i) { wxString backup = wxString::Format(L"%s.bck%d", filename.c_str(), i); if (wxFile::Exists(backup)) wxRemoveFile(backup); wxString oldFilename = wxString::Format(L"%s.bck%d", filename.c_str(), i - 1); wxRenameFile(oldFilename, backup); bChanged = true; } // File may not exist if doing a 'save as' if (wxFile::Exists(inFilename)) { bChanged = true; wxString backup = filename + L".bck1"; wxCopyFile(inFilename, backup, true); // Force an overwrite (if nBackups+1 exists, we error out otherwise) } } return bChanged; } bool GetFileTimes(wxFileName const& filename, wxDateTime* dtAccess, wxDateTime* dtMod, wxDateTime* dtCreate) { #if defined(__WXMSW__) // Using wx to get the times on network files is really slow. // I suspect it's the win32 CreateFile/GetFileTime apis. struct __stat64 s; if (0 != _tstat64(filename.GetFullPath().wx_str(), &s)) return false; if (dtAccess) *dtAccess = wxDateTime(s.st_atime); if (dtMod) *dtMod = wxDateTime(s.st_mtime); if (dtCreate) *dtCreate = wxDateTime(s.st_ctime); return true; #else return filename.GetTimes(dtAccess, dtMod, dtCreate); #endif }
; 8 位乘法 ; 结果储存在 ax mov al, 0xf0 mov ah, 0x02 mul ah ; 16 位乘法 ; 结果储存在 dx:ax mov ax, 0xf000 mov bx, 0x0002 mul bx ; 16 位除法 ; 商存在 al 里, 余数存在 ah 里 mov ax, 0x0004 mov bl, 0x02 div bl ; 32 位除法 ; 商存在 ax 里, 余数存在 mov dx, 0x0008 mov ax, 0x0006 mov cx, 0x0002 div cx jmp $ times 510-($-$$) db 0 db 0x55, 0xaa
// Copyright (c) 2016-2021 Antony Polukhin // // 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 PFR_IO_HPP #define PFR_IO_HPP #pragma once #include <pfr/detail/config.hpp> #include <pfr/detail/detectors.hpp> #include <pfr/io_fields.hpp> /// \file pfr/io.hpp /// Contains IO stream manipulator \forcedlink{io} for types. /// If type is streamable using its own operator or its conversion operator, then the types operator is used. /// /// \b Example: /// \code /// #include <pfr/io.hpp> /// struct comparable_struct { // No operators defined for that structure /// int i; short s; char data[7]; bool bl; int a,b,c,d,e,f; /// }; /// // ... /// /// comparable_struct s1 {0, 1, "Hello", false, 6,7,8,9,10,11}; /// std::cout << pfr::io(s1); // Outputs: {0, 1, H, e, l, l, o, , , 0, 6, 7, 8, 9, 10, 11} /// \endcode /// /// \podops for other ways to define operators and more details. /// /// \b Synopsis: namespace pfr { namespace detail { ///////////////////// Helper typedefs template <class Stream, class Type> using enable_not_ostreamable_t = std::enable_if_t< not_appliable<ostreamable_detector, Stream&, const std::remove_reference_t<Type>&>::value, Stream& >; template <class Stream, class Type> using enable_not_istreamable_t = std::enable_if_t< not_appliable<istreamable_detector, Stream&, Type&>::value, Stream& >; template <class Stream, class Type> using enable_ostreamable_t = std::enable_if_t< !not_appliable<ostreamable_detector, Stream&, const std::remove_reference_t<Type>&>::value, Stream& >; template <class Stream, class Type> using enable_istreamable_t = std::enable_if_t< !not_appliable<istreamable_detector, Stream&, Type&>::value, Stream& >; ///////////////////// IO impl template <class T> struct io_impl { T value; }; template <class Char, class Traits, class T> enable_not_ostreamable_t<std::basic_ostream<Char, Traits>, T> operator<<(std::basic_ostream<Char, Traits>& out, io_impl<T>&& x) { return out << pfr::io_fields(std::forward<T>(x.value)); } template <class Char, class Traits, class T> enable_ostreamable_t<std::basic_ostream<Char, Traits>, T> operator<<(std::basic_ostream<Char, Traits>& out, io_impl<T>&& x) { return out << x.value; } template <class Char, class Traits, class T> enable_not_istreamable_t<std::basic_istream<Char, Traits>, T> operator>>(std::basic_istream<Char, Traits>& in, io_impl<T>&& x) { return in >> pfr::io_fields(std::forward<T>(x.value)); } template <class Char, class Traits, class T> enable_istreamable_t<std::basic_istream<Char, Traits>, T> operator>>(std::basic_istream<Char, Traits>& in, io_impl<T>&& x) { return in >> x.value; } } // namespace detail /// IO manupulator to read/write \aggregate `value` using its IO stream operators or using \forcedlink{io_fields} if operators are not awailable. /// /// \b Example: /// \code /// struct my_struct { int i; short s; }; /// my_struct s; /// std::stringstream ss; /// ss << "{ 12, 13 }"; /// ss >> pfr::io(s); /// assert(s.i == 12); /// assert(s.i == 13); /// \endcode /// /// \customio template <class T> auto io(T&& value) noexcept { return detail::io_impl<T>{std::forward<T>(value)}; } } // namespace pfr #endif // PFR_IO_HPP
global gdt_ptr gdt_ptr: dw gdt.end - gdt - 1 dq gdt gdt: .null: dq 0x0 .k_code_32: dd 0x0 db 0x0 db 10011010b db 00100000b db 0x0 .k_data_32: dd 0x0 db 0x0 db 10010010b dw 0x0 .u_code_32: dd 0x0 db 0x0 db 11111010b db 00100000b db 0x0 .u_data_32: dd 0x0 db 0x0 db 11110010b dw 0x0 .end:
; A160139: Numerator of Hermite(n, 11/27). ; Submitted by Jon Maiga ; 1,22,-974,-85580,2377516,551407912,-5201117576,-4938141000848,-55556496038000,56376233721055072,1969289482873847584,-778641119029758302912,-48713569344985450216256,12551406492954971362990720,1199447936209863593384712064,-229811454737579876406902911232,-31287778369136474068275516886784,4672710491997260927318169741710848,878298505481356386657276695873466880,-103308047031386275270077959392243223552,-26603402233535032679121594135716130427904,2427187802297453067934798224892057529362432 mov $1,1 lpb $0 sub $0,1 mul $1,2 mul $2,9 sub $2,$1 add $1,$2 sub $2,$1 div $1,2 mul $1,18 sub $1,$2 sub $1,$2 mul $2,9 sub $1,$2 mul $2,$0 lpe mov $0,$1
; A202391: Indices of the smallest of four consecutive triangular numbers summing up to a square. ; 5,39,237,1391,8117,47319,275805,1607519,9369317,54608391,318281037,1855077839,10812186005,63018038199,367296043197,2140758220991,12477253282757,72722761475559,423859315570605,2470433131948079 mul $0,2 mov $1,5 mov $4,4 lpb $0 sub $0,1 mov $2,$1 add $3,$4 add $3,$1 add $1,2 sub $1,$2 add $3,4 add $1,$3 mov $4,$2 lpe
else(8) JIP: 4 { align16 1Q }; else(8) JIP: 72 { align1 1Q }; else(16) JIP: 72 { align1 1H };
; A184527: Upper s-Wythoff sequence, where s=5n-2. Complement of A184526. ; 4,10,16,23,29,35,41,47,54,60,66,72,78,85,91,97,103,109,115,122,128,134,140,146,153,159,165,171,177,184,190,196,202,208,215,221,227,233,239,246,252,258,264,270,276,283,289,295,301,307,314,320,326,332,338 mov $1,13 mov $3,$0 mul $3,5 div $3,13 add $3,8 add $1,$3 div $1,2 sub $1,6 mov $2,$0 mul $2,6 add $1,$2 mov $0,$1
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r8 push %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x1228a, %rdx nop nop nop xor $18047, %r11 vmovups (%rdx), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $0, %xmm0, %r12 nop and %rsi, %rsi lea addresses_WC_ht+0x68e2, %r9 nop nop nop nop cmp %r12, %r12 movb (%r9), %r8b nop nop nop nop nop dec %rdx lea addresses_normal_ht+0xaf62, %r8 nop xor %r9, %r9 movb (%r8), %r12b sub $20756, %rdx lea addresses_D_ht+0xbf62, %rdx add %r10, %r10 mov $0x6162636465666768, %rsi movq %rsi, %xmm5 vmovups %ymm5, (%rdx) nop nop sub %r10, %r10 lea addresses_A_ht+0xea22, %rsi nop nop nop sub $28913, %r8 movl $0x61626364, (%rsi) nop nop nop nop sub $39943, %r11 lea addresses_WC_ht+0xc0d8, %rdx nop nop cmp %r10, %r10 mov $0x6162636465666768, %r8 movq %r8, %xmm2 movups %xmm2, (%rdx) nop nop nop nop nop cmp %r10, %r10 lea addresses_UC_ht+0x17796, %rsi lea addresses_WT_ht+0x1d1e2, %rdi cmp $64536, %r12 mov $24, %rcx rep movsl nop nop nop nop xor %r9, %r9 lea addresses_D_ht+0xb662, %r8 nop nop nop inc %r10 mov (%r8), %rcx nop nop inc %r10 lea addresses_WT_ht+0x10a62, %r10 nop and %rdi, %rdi mov $0x6162636465666768, %r9 movq %r9, (%r10) nop nop nop nop add $383, %rdx lea addresses_UC_ht+0x18dc, %rdx nop and %rdi, %rdi mov $0x6162636465666768, %r11 movq %r11, %xmm2 movups %xmm2, (%rdx) add $39366, %rsi lea addresses_D_ht+0xec1e, %r8 nop nop nop cmp %rcx, %rcx movw $0x6162, (%r8) nop nop nop nop nop inc %rsi lea addresses_normal_ht+0xebee, %rsi lea addresses_A_ht+0xb362, %rdi clflush (%rsi) cmp $40708, %r12 mov $89, %rcx rep movsb nop cmp $32663, %r12 lea addresses_UC_ht+0xa5e2, %r11 clflush (%r11) sub %rcx, %rcx movl $0x61626364, (%r11) add $25771, %rcx lea addresses_A_ht+0xd3d6, %rsi lea addresses_D_ht+0x1b662, %rdi nop nop xor $15715, %r8 mov $51, %rcx rep movsl nop nop nop sub $11097, %r10 lea addresses_A_ht+0xa962, %rsi lea addresses_normal_ht+0xa34e, %rdi nop nop nop nop nop add %r10, %r10 mov $84, %rcx rep movsq nop nop nop nop inc %r8 pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r15 push %r8 push %rax push %rbx push %rsi // Store lea addresses_WT+0xa322, %rbx add %rsi, %rsi movl $0x51525354, (%rbx) nop nop cmp %rbx, %rbx // Faulty Load lea addresses_D+0xbe62, %r15 nop nop nop nop nop sub $55199, %r10 mov (%r15), %si lea oracles, %r15 and $0xff, %rsi shlq $12, %rsi mov (%r15,%rsi,1), %rsi pop %rsi pop %rbx pop %rax pop %r8 pop %r15 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_D'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_WT'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_D'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 8, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
IDD_DLGKEYWORDS equ 4000 IDC_CBOTHEME equ 4016 IDC_EDTTHEME equ 4027 IDC_BTNNEWTHEME equ 4028 IDC_BTNADDTHEME equ 4029 IDC_LSTKWCOLORS equ 4001 IDC_LSTKWACTIVE equ 4014 IDC_LSTKWHOLD equ 4013 IDC_LSTCOLORS equ 4015 IDC_BTNKWAPPLY equ 4002 IDC_BTNHOLD equ 4009 IDC_BTNACTIVE equ 4008 IDC_EDTKW equ 4012 IDC_BTNADD equ 4011 IDC_BTNDEL equ 4010 IDC_CHKBOLD equ 4004 IDC_CHKITALIC equ 4003 IDC_CHKRCFILE equ 4005 IDC_SPNTABSIZE equ 4017 IDC_EDTTABSIZE equ 4018 IDC_CHKEXPAND equ 4019 IDC_CHKAUTOINDENT equ 4020 IDC_CHKLINENUMBER equ 4007 IDC_CHKHILITELINE equ 4021 IDC_CHKHILITECMNT equ 4026 IDC_CHKSESSION equ 4006 IDC_BTNCODEFONT equ 4024 IDC_STCCODEFONT equ 4022 IDC_BTNLNRFONT equ 4025 IDC_STCLNRFONT equ 4023 szColors db 'Back',0 db 'Text',0 db 'Selected back',0 db 'Selected text',0 db 'Comments',0 db 'Strings',0 db 'Operators',0 db 'Comments back',0 db 'Active line back',0 db 'Indent markers',0 db 'Selection bar',0 db 'Selection bar pen',0 db 'Line numbers',0 db 'Numbers & hex',0 db 'Line changed',0 db 'Line saved change',0 db 'Tools Back',0 db 'Tools Text',0 db 'Dialog Back',0 db 'Dialog Text',0 db 'Resource Styles',0 db 'Resource Words',0 db 'CodeComplete Back',0 db 'CodeComplete Text',0 db 'CodeTip Back',0 db 'CodeTip Text',0 db 'CodeTip Api',0 db 'CodeTip Sel',0 db 0 szCustColors db 'CustColors',0 szNewTheme db 'New Theme',0 szTheme db 'Theme',0 thme0 db 'Default',0 dd 00804000h,00808000h,00FF0000h,00FF0000h,00FF0000h,10FF0000h,000040FFh,00FF0000h,01FF0000h,00FF0000h,00A00000h,00A00000h,00A00000h,00A00000h,00A00000h,00A00000h dd 00C0F0F0h,00000000h,00800000h,00FFFFFFh,02808040h,00A00000h,000000A0h,00F0C0C0h,00C0F0C0h,00C0C0F0h,00C0C0C0h,00808080h,00800000h,00808080h,00C0F0F0h,00C0F0F0h,00C0F0F0h,00C0F0F0h,0000F0F0h,0000F000h dd 00C0F0F0h,00000000h,00C0F0F0h,00000000h,00804000h,00C00000h,00FFFFFFh,00000000h,00C0F0F0h,00000000h,00404080h,00FF0000h thme1 db 'Black Night',0 dd 0000FF00h,00FFFF80h,00FFFF00h,00FFFF00h,00FFFF00h,10FF0000h,004080FFh,00FF8080h,01FF0000h,00FF00FFh,00FF0000h,00FF0000h,00FF0000h,00FF0000h,00FF0000h,00FF0000h dd 00000000h,00C0C0C0h,00800000h,00FFFFFFh,0280FFFFh,00FFFFFFh,000000FFh,004A4A4Ah,00C0F0C0h,00181869h,00E0E0E0h,00808080h,00800000h,00808080h,00000000h,00000000h,00000000h,00000000h,0000F0F0h,0000F000h dd 00C6FFFFh,00000000h,00C6FFFFh,00000000h,00804000h,00C00000h,00C6FFFFh,00000000h,00C0F0F0h,00000000h,00404080h,00FF0000h thme2 db 'Visual Studio',0 dd 00800040h,00800040h,00800040h,00800040h,00800040h,10800040h,00800040h,00800040h,01800040h,00800040h,00800040h,00800040h,00800040h,00800040h,00800040h,00800040h dd 00FFFFFFh,00000000h,00800000h,00FFFFFFh,02008000h,00A00000h,000000A0h,00F0C0C0h,00C0F0C0h,00C0C0F0h,00E0E0E0h,00808080h,00800000h,00808080h,00FFFFFFh,00FFFFFFh,00FFFFFFh,00FFFFFFh,0000F0F0h,0000F000h dd 00FFFFFFh,00000000h,00FFFFFFh,00000000h,00804000h,00C00000h,00FFFFFFh,00000000h,00C0F0F0h,00000000h,00404080h,00FF0000h .data? nKWInx dd ? CustColors dd 16 dup(?) hCFnt dd ? hLFnt dd ? tempcol RACOLOR <?> theme THEME 10 dup(<>) .code UpdateTheme1053 proc uses esi edi LOCAL nInx:DWORD LOCAL buffer[32]:BYTE mov nInx,0 mov edi,offset theme .while nInx<10 mov [edi].THEME.szname,0 invoke MakeKey,addr szTheme,nInx,addr buffer mov lpcbData,sizeof THEME invoke RegQueryValueEx,ha.hReg,addr buffer,0,addr lpType,offset theme,addr lpcbData .if !eax mov esi,offset theme.medcol.tttext mov edi,offset theme.medcol.ttsel mov ecx,12 .while ecx mov eax,[esi] mov [edi],eax sub esi,4 sub edi,4 dec ecx .endw mov theme.medcol.racol.changed,CHCOL mov theme.medcol.racol.changesaved,CHSAVEDCOL invoke RegSetValueEx,ha.hReg,addr buffer,0,REG_BINARY,offset theme,sizeof THEME .endif inc nInx .endw ret UpdateTheme1053 endp GetThemes proc uses esi edi LOCAL nInx:DWORD LOCAL buffer[32]:BYTE mov nInx,0 mov edi,offset theme .while nInx<10 mov [edi].THEME.szname,0 invoke MakeKey,addr szTheme,nInx,addr buffer mov lpcbData,sizeof THEME invoke RegQueryValueEx,ha.hReg,addr buffer,0,addr lpType,edi,addr lpcbData .if eax && !nInx invoke MakeKey,addr szTheme,0,addr buffer mov esi,offset thme0 mov edi,offset theme+sizeof THEME*0 invoke strcpy,addr [edi].THEME.szname,esi invoke strlen,esi lea esi,[esi+eax+1] lea edi,[edi+sizeof THEME.szname] mov ecx,sizeof THEME.kwcol+sizeof THEME.medcol rep movsb mov edi,offset theme+sizeof THEME*0 invoke RegSetValueEx,ha.hReg,addr buffer,0,REG_BINARY,edi,sizeof THEME invoke MakeKey,addr szTheme,1,addr buffer mov esi,offset thme1 mov edi,offset theme+sizeof THEME*1 invoke strcpy,addr [edi].THEME.szname,esi invoke strlen,esi lea esi,[esi+eax+1] lea edi,[edi+sizeof THEME.szname] mov ecx,sizeof THEME.kwcol+sizeof THEME.medcol rep movsb mov edi,offset theme+sizeof THEME*1 invoke RegSetValueEx,ha.hReg,addr buffer,0,REG_BINARY,edi,sizeof THEME invoke MakeKey,addr szTheme,2,addr buffer mov esi,offset thme2 mov edi,offset theme+sizeof THEME*2 invoke strcpy,addr [edi].THEME.szname,esi invoke strlen,esi lea esi,[esi+eax+1] lea edi,[edi+sizeof THEME.szname] mov ecx,sizeof THEME.kwcol+sizeof THEME.medcol rep movsb mov edi,offset theme+sizeof THEME*2 invoke RegSetValueEx,ha.hReg,addr buffer,0,REG_BINARY,edi,sizeof THEME .break .endif add edi,sizeof THEME inc nInx .endw ret GetThemes endp SetTheme proc uses ebx esi edi,hWin:HWND,nInx:DWORD lea esi,theme.kwcol mov eax,nInx mov edx,sizeof THEME mul edx add esi,eax xor ebx,ebx .while ebx<16 invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_SETITEMDATA,ebx,[esi] add esi,4 inc ebx .endw invoke GetDlgItem,hWin,IDC_LSTKWCOLORS invoke InvalidateRect,eax,NULL,TRUE lea esi,theme.medcol mov eax,nInx mov edx,sizeof THEME mul edx add esi,eax xor ebx,ebx .while ebx<18+12-4 invoke SendDlgItemMessage,hWin,IDC_LSTCOLORS,LB_SETITEMDATA,ebx,[esi] .if ebx==13 add esi,16 .endif add esi,4 inc ebx .endw lea esi,theme.medcol.racol mov eax,nInx mov edx,sizeof THEME mul edx add esi,eax mov edi,offset tempcol mov ecx,sizeof RACOLOR rep movsb invoke GetDlgItem,hWin,IDC_LSTCOLORS invoke InvalidateRect,eax,NULL,TRUE ret SetTheme endp AddTheme proc uses ebx esi edi,hWin:HWND LOCAL nInx:DWORD LOCAL buffer[32]:BYTE mov nInx,0 mov esi,offset theme .while nInx<10 .if !byte ptr [esi].THEME.szname invoke SendDlgItemMessage,hWin,IDC_EDTTHEME,WM_GETTEXT,sizeof buffer,addr buffer .if byte ptr buffer invoke strcpy,addr [esi].THEME.szname,addr buffer xor ebx,ebx .while ebx<16 invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETITEMDATA,ebx,0 mov [esi].THEME.kwcol[ebx*4],eax inc ebx .endw xor ebx,ebx .while ebx<26 invoke SendDlgItemMessage,hWin,IDC_LSTCOLORS,LB_GETITEMDATA,ebx,0 .if ebx<=13 mov [esi].THEME.medcol.racol.bckcol[ebx*4],eax .else mov [esi].THEME.medcol.racol.bckcol[ebx*4+16],eax .endif inc ebx .endw mov eax,tempcol.cmntback mov [esi].THEME.medcol.racol.cmntback,eax mov eax,tempcol.strback mov [esi].THEME.medcol.racol.strback,eax mov eax,tempcol.numback mov [esi].THEME.medcol.racol.numback,eax mov eax,tempcol.oprback mov [esi].THEME.medcol.racol.oprback,eax invoke SendDlgItemMessage,hWin,IDC_CBOTHEME,CB_ADDSTRING,0,addr buffer push eax invoke SendDlgItemMessage,hWin,IDC_CBOTHEME,CB_SETITEMDATA,eax,nInx pop eax invoke SendDlgItemMessage,hWin,IDC_CBOTHEME,CB_SETCURSEL,eax,0 .endif mov eax,TRUE ret .endif add esi,sizeof THEME inc nInx .endw xor eax,eax ret AddTheme endp SaveTheme proc uses esi edi LOCAL nInx:DWORD LOCAL buffer[32]:BYTE mov nInx,0 mov esi,offset theme .while nInx<10 .if byte ptr [esi].THEME.szname invoke MakeKey,addr szTheme,nInx,addr buffer invoke RegSetValueEx,ha.hReg,addr buffer,0,REG_BINARY,esi,sizeof THEME .endif add esi,sizeof THEME inc nInx .endw ret SaveTheme endp SetKeyWordList proc uses esi edi,hWin:HWND,idLst:DWORD,nInx:DWORD LOCAL hMem:DWORD LOCAL buffer[64]:BYTE mov eax,nInx mov nKWInx,eax invoke SendDlgItemMessage,hWin,idLst,LB_RESETCONTENT,0,0 invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,16384 mov hMem,eax invoke MakeKey,offset szGroup,nInx,addr buffer mov lpcbData,16384 invoke RegQueryValueEx,ha.hReg,addr buffer,0,addr lpType,hMem,addr lpcbData mov eax,hMem mov al,[eax] mov esi,nInx .if !al && esi<16 lea esi,kwofs[esi*4] mov esi,[esi] .else mov esi,hMem .endif dec esi Nxt: inc esi mov al,[esi] or al,al je Ex cmp al,VK_SPACE je Nxt lea edi,buffer @@: mov al,[esi] .if al==VK_SPACE || !al mov byte ptr [edi],0 invoke SendDlgItemMessage,hWin,idLst,LB_ADDSTRING,0,addr buffer dec esi jmp Nxt .endif mov [edi],al inc esi inc edi jmp @b Ex: invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETITEMDATA,nInx,0 .if eax!=LB_ERR shr eax,24 mov esi,eax mov eax,BST_UNCHECKED test esi,1 .if !ZERO? mov eax,BST_CHECKED .endif invoke CheckDlgButton,hWin,IDC_CHKBOLD,eax mov eax,BST_UNCHECKED test esi,2 .if !ZERO? mov eax,BST_CHECKED .endif invoke CheckDlgButton,hWin,IDC_CHKITALIC,eax mov eax,BST_UNCHECKED test esi,10h .if !ZERO? mov eax,BST_CHECKED .endif invoke CheckDlgButton,hWin,IDC_CHKRCFILE,eax .endif invoke GlobalFree,hMem ret SetKeyWordList endp SaveKeyWordList proc uses esi edi,hWin:HWND,idLst:DWORD,nInx:DWORD LOCAL hMem:DWORD LOCAL buffer[64]:BYTE invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,16384 mov hMem,eax mov edi,eax xor esi,esi @@: invoke SendDlgItemMessage,hWin,idLst,LB_GETTEXT,esi,edi .if eax!=LB_ERR invoke strlen,edi add edi,eax mov byte ptr [edi],VK_SPACE inc edi inc esi jmp @b .endif .if edi!=hMem mov byte ptr [edi-1],0 .endif sub edi,hMem invoke MakeKey,offset szGroup,nInx,addr buffer invoke RegSetValueEx,ha.hReg,addr buffer,0,REG_SZ,hMem,edi invoke GlobalFree,hMem ret SaveKeyWordList endp DeleteKeyWords proc hWin:HWND,idFrom:DWORD LOCAL nInx:DWORD LOCAL nCnt:DWORD invoke SendDlgItemMessage,hWin,idFrom,LB_GETSELCOUNT,0,0 mov nCnt,eax mov nInx,0 .while nCnt invoke SendDlgItemMessage,hWin,idFrom,LB_GETSEL,nInx,0 .if eax invoke SendDlgItemMessage,hWin,idFrom,LB_DELETESTRING,nInx,0 dec nCnt mov eax,1 .endif xor eax,1 add nInx,eax .endw ret DeleteKeyWords endp MoveKeyWords proc hWin:HWND,idFrom:DWORD,idTo:DWORD LOCAL buffer[64]:BYTE LOCAL nInx:DWORD LOCAL nCnt:DWORD invoke SendDlgItemMessage,hWin,idFrom,LB_GETSELCOUNT,0,0 mov nCnt,eax mov nInx,0 .while nCnt invoke SendDlgItemMessage,hWin,idFrom,LB_GETSEL,nInx,0 .if eax invoke SendDlgItemMessage,hWin,idFrom,LB_GETTEXT,nInx,addr buffer invoke SendDlgItemMessage,hWin,idFrom,LB_DELETESTRING,nInx,0 invoke SendDlgItemMessage,hWin,idTo,LB_ADDSTRING,0,addr buffer dec nCnt mov eax,1 .endif xor eax,1 add nInx,eax .endw ret MoveKeyWords endp UpdateKeyWords proc uses ebx,hWin:HWND xor ebx,ebx .while ebx<16 invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETITEMDATA,ebx,0 mov kwcol[ebx*4],eax inc ebx .endw invoke RegSetValueEx,ha.hReg,addr szKeyWordColor,0,REG_BINARY,addr kwcol,sizeof kwcol invoke SetKeyWords invoke UpdateAll,WM_PAINT,0 ret UpdateKeyWords endp UpdateToolColors proc LOCAL racol:RACOLOR LOCAL rescol:RESCOLOR LOCAL cccol:CC_COLOR LOCAL ttcol:TT_COLOR invoke SendMessage,ha.hOut,REM_GETCOLOR,0,addr racol mov eax,col.toolback mov racol.bckcol,eax mov racol.cmntback,eax mov racol.strback,eax mov racol.numback,eax mov racol.oprback,eax mov eax,col.tooltext mov racol.txtcol,eax invoke SendMessage,ha.hOut,REM_SETCOLOR,0,addr racol invoke SendMessage,ha.hImmOut,REM_SETCOLOR,0,addr racol invoke SendMessage,ha.hDbgReg,REM_SETCOLOR,0,addr racol invoke SendMessage,ha.hDbgFpu,REM_SETCOLOR,0,addr racol invoke SendMessage,ha.hDbgMMX,REM_SETCOLOR,0,addr racol invoke SendMessage,ha.hDbgWatch,REM_SETCOLOR,0,addr racol ;Set tool colors invoke SendMessage,ha.hBrowse,FBM_SETBACKCOLOR,0,col.toolback invoke SendMessage,ha.hBrowse,FBM_SETTEXTCOLOR,0,col.tooltext invoke SendMessage,ha.hPbr,RPBM_SETBACKCOLOR,0,col.toolback invoke SendMessage,ha.hPbr,RPBM_SETTEXTCOLOR,0,col.tooltext invoke SendMessage,ha.hProperty,PRM_SETBACKCOLOR,0,col.toolback invoke SendMessage,ha.hProperty,PRM_SETTEXTCOLOR,0,col.tooltext mov eax,col.dialogback mov rescol.back,eax mov eax,col.dialogtext mov rescol.text,eax invoke SendMessage,ha.hResEd,DEM_SETCOLOR,0,addr rescol .if ha.hBrBack invoke DeleteObject,ha.hBrBack .endif invoke CreateSolidBrush,col.toolback mov ha.hBrBack,eax mov eax,col.ccback mov cccol.back,eax mov eax,col.cctext mov cccol.text,eax invoke SendMessage,ha.hCCLB,CCM_SETCOLOR,0,addr cccol mov eax,col.ttback mov ttcol.back,eax mov eax,col.tttext mov ttcol.text,eax mov eax,col.ttapi mov ttcol.api,eax mov eax,col.ttsel mov ttcol.hilite,eax invoke SendMessage,ha.hCCTT,TTM_SETCOLOR,0,addr ttcol ret UpdateToolColors endp KeyWordsProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM LOCAL nInx:DWORD LOCAL buffer[256]:BYTE LOCAL rect:RECT LOCAL hBr:DWORD LOCAL cc:CHOOSECOLOR LOCAL cf:CHOOSEFONT LOCAL lf:LOGFONT LOCAL pt:POINT mov eax,uMsg .if eax==WM_INITDIALOG push esi push edi mov esi,offset col.racol mov edi,offset tempcol mov ecx,sizeof RACOLOR rep movsb invoke SendDlgItemMessage,hWin,IDC_SPNTABSIZE,UDM_SETRANGE,0,00010014h ; Set range invoke SendDlgItemMessage,hWin,IDC_SPNTABSIZE,UDM_SETPOS,0,edopt.tabsize ; Set default value invoke CheckDlgButton,hWin,IDC_CHKEXPAND,edopt.exptabs invoke CheckDlgButton,hWin,IDC_CHKAUTOINDENT,edopt.indent invoke CheckDlgButton,hWin,IDC_CHKHILITELINE,edopt.hiliteline invoke CheckDlgButton,hWin,IDC_CHKHILITECMNT,edopt.hilitecmnt invoke CheckDlgButton,hWin,IDC_CHKSESSION,edopt.session invoke CheckDlgButton,hWin,IDC_CHKLINENUMBER,edopt.linenumber mov esi,offset szColors mov edi,offset col xor ecx,ecx @@: push ecx invoke SendDlgItemMessage,hWin,IDC_LSTCOLORS,LB_ADDSTRING,0,esi invoke SendDlgItemMessage,hWin,IDC_LSTCOLORS,LB_SETITEMDATA,eax,[edi] invoke strlen,esi add esi,eax inc esi add edi,4 pop ecx .if ecx==13 add edi,16 .endif inc ecx mov al,[esi] or al,al jne @b invoke SendDlgItemMessage,hWin,IDC_LSTCOLORS,LB_SETCURSEL,0,0 mov edi,offset kwcol mov nInx,0 .while nInx<16 invoke MakeKey,offset szGroup,nInx,addr buffer invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_ADDSTRING,0,addr buffer invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_SETITEMDATA,eax,[edi] add edi,4 inc nInx .endw invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_SETCURSEL,0,0 invoke SetKeyWordList,hWin,IDC_LSTKWHOLD,10 invoke SetKeyWordList,hWin,IDC_LSTKWACTIVE,0 invoke SendDlgItemMessage,hWin,IDC_EDTKW,EM_LIMITTEXT,63,0 invoke SendDlgItemMessage,hWin,IDC_EDTTHEME,EM_LIMITTEXT,31,0 invoke GetThemes mov esi,offset theme mov nInx,0 .while nInx<10 .if byte ptr [esi].THEME.szname invoke SendDlgItemMessage,hWin,IDC_CBOTHEME,CB_ADDSTRING,0,addr [esi].THEME.szname invoke SendDlgItemMessage,hWin,IDC_CBOTHEME,CB_SETITEMDATA,eax,nInx .endif add esi,sizeof THEME inc nInx .endw invoke SendDlgItemMessage,hWin,IDC_CBOTHEME,CB_SETCURSEL,0,0 mov eax,IDC_BTNKWAPPLY xor edx,edx call EnButton pop edi pop esi invoke SendDlgItemMessage,hWin,IDC_STCCODEFONT,WM_SETFONT,ha.hFont,FALSE invoke SendDlgItemMessage,hWin,IDC_STCLNRFONT,WM_SETFONT,ha.hLnrFont,FALSE .elseif eax==WM_COMMAND mov eax,wParam mov edx,eax shr edx,16 and eax,0FFFFh .if edx==BN_CLICKED .if eax==IDOK call Update invoke SendMessage,hWin,WM_CLOSE,NULL,NULL .elseif eax==IDCANCEL .if hCFnt invoke DeleteObject,hCFnt .endif .if hLFnt invoke DeleteObject,hLFnt .endif invoke SendMessage,hWin,WM_CLOSE,NULL,NULL .elseif eax==IDC_BTNKWAPPLY call Update .elseif eax==IDC_BTNNEWTHEME invoke GetDlgItem,hWin,IDC_BTNADDTHEME invoke ShowWindow,eax,SW_SHOWNA invoke GetDlgItem,hWin,IDC_BTNNEWTHEME invoke ShowWindow,eax,SW_HIDE mov eax,IDC_EDTTHEME mov edx,TRUE call EnButton invoke SetDlgItemText,hWin,IDC_EDTTHEME,addr szNewTheme invoke GetDlgItem,hWin,IDC_EDTTHEME invoke SetFocus,eax .elseif eax==IDC_BTNADDTHEME invoke AddTheme,hWin .if eax invoke GetDlgItem,hWin,IDC_BTNNEWTHEME invoke ShowWindow,eax,SW_SHOWNA invoke GetDlgItem,hWin,IDC_BTNADDTHEME invoke ShowWindow,eax,SW_HIDE invoke SetDlgItemText,hWin,IDC_EDTTHEME,addr szNULL mov eax,IDC_EDTTHEME mov edx,FALSE call EnButton mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .endif .elseif eax==IDC_BTNHOLD invoke MoveKeyWords,hWin,IDC_LSTKWACTIVE,IDC_LSTKWHOLD mov eax,IDC_BTNHOLD xor edx,edx call EnButton mov eax,IDC_BTNDEL xor edx,edx call EnButton mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_BTNACTIVE invoke MoveKeyWords,hWin,IDC_LSTKWHOLD,IDC_LSTKWACTIVE mov eax,IDC_BTNACTIVE xor edx,edx call EnButton mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_BTNADD invoke GetDlgItemText,hWin,IDC_EDTKW,addr buffer,64 invoke SendDlgItemMessage,hWin,IDC_LSTKWACTIVE,LB_ADDSTRING,0,addr buffer mov buffer,0 invoke SetDlgItemText,hWin,IDC_EDTKW,addr buffer mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_BTNDEL invoke DeleteKeyWords,hWin,IDC_LSTKWACTIVE mov eax,IDC_BTNHOLD xor edx,edx call EnButton mov eax,IDC_BTNDEL xor edx,edx call EnButton mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_CHKBOLD invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETCURSEL,0,0 push eax invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETITEMDATA,eax,0 pop edx xor eax,01000000h invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_SETITEMDATA,edx,eax mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_CHKITALIC invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETCURSEL,0,0 push eax invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETITEMDATA,eax,0 pop edx xor eax,02000000h invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_SETITEMDATA,edx,eax mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_CHKRCFILE invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETCURSEL,0,0 push eax invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETITEMDATA,eax,0 pop edx xor eax,10000000h invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_SETITEMDATA,edx,eax mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_CHKEXPAND mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_CHKAUTOINDENT mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_CHKHILITELINE mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_CHKHILITECMNT mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_CHKSESSION mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_CHKLINENUMBER mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .elseif eax==IDC_BTNCODEFONT mov edx,hCFnt .if !edx mov edx,ha.hFont .endif invoke GetObject,edx,sizeof lf,addr lf invoke RtlZeroMemory,addr cf,sizeof cf mov cf.lStructSize,sizeof cf mov eax,hWin mov cf.hwndOwner,eax lea eax,lf mov cf.lpLogFont,eax mov cf.Flags,CF_SCREENFONTS or CF_INITTOLOGFONTSTRUCT invoke ChooseFont,addr cf .if eax invoke CreateFontIndirect,addr lf mov hCFnt,eax invoke SendDlgItemMessage,hWin,IDC_STCCODEFONT,WM_SETFONT,hCFnt,TRUE mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .endif .elseif eax==IDC_BTNLNRFONT mov edx,hLFnt .if !edx mov edx,ha.hLnrFont .endif invoke GetObject,edx,sizeof lf,addr lf invoke RtlZeroMemory,addr cf,sizeof cf mov cf.lStructSize,sizeof cf mov eax,hWin mov cf.hwndOwner,eax lea eax,lf mov cf.lpLogFont,eax mov cf.Flags,CF_SCREENFONTS or CF_INITTOLOGFONTSTRUCT invoke ChooseFont,addr cf .if eax invoke CreateFontIndirect,addr lf mov hLFnt,eax invoke SendDlgItemMessage,hWin,IDC_STCLNRFONT,WM_SETFONT,hLFnt,TRUE mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .endif .endif .elseif edx==EN_CHANGE .if eax==IDC_EDTKW invoke SendDlgItemMessage,hWin,IDC_EDTKW,WM_GETTEXTLENGTH,0,0 .if eax mov eax,TRUE .endif mov edx,eax mov eax,IDC_BTNADD call EnButton .elseif eax==IDC_EDTTABSIZE mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .endif .elseif edx==LBN_SELCHANGE .if eax==IDC_LSTKWCOLORS invoke SaveKeyWordList,hWin,IDC_LSTKWACTIVE,nKWInx invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETCURSEL,0,0 invoke SetKeyWordList,hWin,IDC_LSTKWACTIVE,eax invoke GetDlgItem,hWin,IDC_BTNHOLD invoke EnableWindow,eax,FALSE invoke GetDlgItem,hWin,IDC_BTNDEL invoke EnableWindow,eax,FALSE .elseif eax==IDC_LSTKWACTIVE invoke SendDlgItemMessage,hWin,IDC_LSTKWACTIVE,LB_GETSELCOUNT,0,0 .if eax mov eax,TRUE .endif push eax mov edx,eax mov eax,IDC_BTNHOLD call EnButton pop edx mov eax,IDC_BTNDEL call EnButton .elseif eax==IDC_LSTKWHOLD invoke SendDlgItemMessage,hWin,IDC_LSTKWHOLD,LB_GETSELCOUNT,0,0 .if eax mov eax,TRUE .endif mov edx,eax mov eax,IDC_BTNACTIVE call EnButton .elseif eax==IDC_CBOTHEME invoke SendDlgItemMessage,hWin,IDC_CBOTHEME,CB_GETCURSEL,0,0 invoke SendDlgItemMessage,hWin,IDC_CBOTHEME,CB_GETITEMDATA,eax,0 invoke SetTheme,hWin,eax mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .endif .elseif edx==LBN_DBLCLK .if eax==IDC_LSTKWCOLORS mov cc.lStructSize,sizeof CHOOSECOLOR mov eax,hWin mov cc.hwndOwner,eax mov eax,ha.hInstance mov cc.hInstance,eax mov cc.lpCustColors,offset CustColors mov cc.Flags,CC_FULLOPEN or CC_RGBINIT mov cc.lCustData,0 mov cc.lpfnHook,0 mov cc.lpTemplateName,0 invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETCURSEL,0,0 invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETITEMDATA,eax,0 push eax ;Mask off group/font and eax,0FFFFFFh mov cc.rgbResult,eax invoke ChooseColor,addr cc pop ecx .if eax push ecx invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_GETCURSEL,0,0 pop ecx mov edx,cc.rgbResult ;Group/Font and ecx,0FF000000h or edx,ecx invoke SendDlgItemMessage,hWin,IDC_LSTKWCOLORS,LB_SETITEMDATA,eax,edx invoke GetDlgItem,hWin,IDC_LSTKWCOLORS invoke InvalidateRect,eax,NULL,FALSE mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .endif .elseif eax==IDC_LSTKWACTIVE invoke SendDlgItemMessage,hWin,IDC_LSTKWACTIVE,LB_GETCURSEL,0,0 .if eax!=LB_ERR mov edx,eax invoke SendDlgItemMessage,hWin,IDC_LSTKWACTIVE,LB_GETTEXT,edx,addr buffer invoke SetDlgItemText,hWin,IDC_EDTKW,addr buffer .endif .elseif eax==IDC_LSTKWHOLD invoke SendDlgItemMessage,hWin,IDC_LSTKWHOLD,LB_GETCURSEL,0,0 .if eax!=LB_ERR mov edx,eax invoke SendDlgItemMessage,hWin,IDC_LSTKWHOLD,LB_GETTEXT,edx,addr buffer invoke SetDlgItemText,hWin,IDC_EDTKW,addr buffer .endif .elseif eax==IDC_LSTCOLORS mov cc.lStructSize,sizeof CHOOSECOLOR mov eax,hWin mov cc.hwndOwner,eax mov eax,ha.hInstance mov cc.hInstance,eax mov cc.lpCustColors,offset CustColors mov cc.Flags,CC_FULLOPEN or CC_RGBINIT mov cc.lCustData,0 mov cc.lpfnHook,0 mov cc.lpTemplateName,0 invoke SendDlgItemMessage,hWin,IDC_LSTCOLORS,LB_GETCURSEL,0,0 xor ecx,ecx .if (eax>=4 && eax<=6) || eax==13 push eax invoke GetCursorPos,addr pt invoke GetDlgItem,hWin,IDC_LSTCOLORS mov edx,eax invoke ScreenToClient,edx,addr pt xor ecx,ecx .if pt.x>30 && pt.x<60 inc ecx .endif pop eax .endif .if ecx .if eax==4 mov eax,tempcol.cmntback .elseif eax==5 mov eax,tempcol.strback .elseif eax==6 mov eax,tempcol.oprback .elseif eax==13 mov eax,tempcol.numback .endif .else invoke SendDlgItemMessage,hWin,IDC_LSTCOLORS,LB_GETITEMDATA,eax,0 xor ecx,ecx .endif push ecx push eax ;Mask off font and eax,0FFFFFFh mov cc.rgbResult,eax invoke ChooseColor,addr cc pop ecx pop edx .if eax push edx push ecx invoke SendDlgItemMessage,hWin,IDC_LSTCOLORS,LB_GETCURSEL,0,0 pop ecx pop edx .if edx mov edx,cc.rgbResult .if eax==4 mov tempcol.cmntback,edx .elseif eax==5 mov tempcol.strback,edx .elseif eax==6 mov tempcol.oprback,edx .elseif eax==13 mov tempcol.numback,edx .endif .else mov edx,cc.rgbResult ;Font and ecx,0FF000000h or edx,ecx invoke SendDlgItemMessage,hWin,IDC_LSTCOLORS,LB_SETITEMDATA,eax,edx .endif invoke GetDlgItem,hWin,IDC_LSTCOLORS invoke InvalidateRect,eax,NULL,FALSE mov eax,IDC_BTNKWAPPLY mov edx,TRUE call EnButton .endif .endif .endif .elseif eax==WM_DRAWITEM push esi mov esi,lParam assume esi:ptr DRAWITEMSTRUCT test [esi].itemState,ODS_SELECTED .if ZERO? push COLOR_WINDOW mov eax,COLOR_WINDOWTEXT .else push COLOR_HIGHLIGHT mov eax,COLOR_HIGHLIGHTTEXT .endif invoke GetSysColor,eax invoke SetTextColor,[esi].hdc,eax pop eax invoke GetSysColor,eax invoke SetBkColor,[esi].hdc,eax invoke ExtTextOut,[esi].hdc,0,0,ETO_OPAQUE,addr [esi].rcItem,NULL,0,NULL mov eax,[esi].rcItem.left inc eax mov rect.left,eax add eax,25 mov rect.right,eax mov eax,[esi].rcItem.top inc eax mov rect.top,eax mov eax,[esi].rcItem.bottom dec eax mov rect.bottom,eax mov eax,[esi].itemData and eax,0FFFFFFh invoke CreateSolidBrush,eax mov hBr,eax invoke FillRect,[esi].hdc,addr rect,hBr invoke DeleteObject,hBr invoke GetStockObject,BLACK_BRUSH invoke FrameRect,[esi].hdc,addr rect,eax .if [esi].CtlID==IDC_LSTCOLORS mov ecx,[esi].itemID .if (ecx>=4 && ecx<=6) || ecx==13 add rect.left,30 add rect.right,30 .if ecx==4 mov eax,tempcol.cmntback .elseif ecx==5 mov eax,tempcol.strback .elseif ecx==6 mov eax,tempcol.oprback .elseif ecx==13 mov eax,tempcol.numback .endif and eax,0FFFFFFh invoke CreateSolidBrush,eax mov hBr,eax invoke FillRect,[esi].hdc,addr rect,hBr invoke DeleteObject,hBr invoke GetStockObject,BLACK_BRUSH invoke FrameRect,[esi].hdc,addr rect,eax .endif .endif invoke SendMessage,[esi].hwndItem,LB_GETTEXT,[esi].itemID,addr buffer invoke strlen,addr buffer mov edx,[esi].rcItem.left mov ecx,[esi].itemID .if [esi].CtlID==IDC_LSTCOLORS .if (ecx>=4 && ecx<=6) || ecx==13 add edx,30 .endif .endif add edx,30 invoke TextOut,[esi].hdc,edx,[esi].rcItem.top,addr buffer,eax assume esi:nothing pop esi .elseif eax==WM_CLOSE mov hCFnt,0 mov hLFnt,0 invoke EndDialog,hWin,NULL .else mov eax,FALSE ret .endif mov eax,TRUE ret EnButton: push edx invoke GetDlgItem,hWin,eax pop edx invoke EnableWindow,eax,edx retn Update: invoke GetDlgItem,hWin,IDC_BTNKWAPPLY invoke IsWindowEnabled,eax .if eax mov eax,IDC_BTNKWAPPLY xor edx,edx call EnButton invoke SaveKeyWordList,hWin,IDC_LSTKWACTIVE,nKWInx invoke SaveKeyWordList,hWin,IDC_LSTKWHOLD,16 invoke UpdateKeyWords,hWin invoke GetDlgItemInt,hWin,IDC_EDTTABSIZE,NULL,FALSE mov edopt.tabsize,eax invoke IsDlgButtonChecked,hWin,IDC_CHKEXPAND mov edopt.exptabs,eax invoke IsDlgButtonChecked,hWin,IDC_CHKAUTOINDENT mov edopt.indent,eax invoke IsDlgButtonChecked,hWin,IDC_CHKHILITELINE mov edopt.hiliteline,eax invoke IsDlgButtonChecked,hWin,IDC_CHKHILITECMNT mov edopt.hilitecmnt,eax invoke IsDlgButtonChecked,hWin,IDC_CHKSESSION mov edopt.session,eax invoke IsDlgButtonChecked,hWin,IDC_CHKLINENUMBER mov edopt.linenumber,eax push edi mov edi,offset col xor eax,eax @@: push eax invoke SendDlgItemMessage,hWin,IDC_LSTCOLORS,LB_GETITEMDATA,eax,0 mov [edi],eax pop eax inc eax .if eax==13 add edi,16 .endif add edi,4 cmp edi,offset col+sizeof col jc @b mov eax,tempcol.cmntback mov col.racol.cmntback,eax mov eax,tempcol.strback mov col.racol.strback,eax mov eax,tempcol.oprback mov col.racol.oprback,eax mov eax,tempcol.numback mov col.racol.numback,eax pop edi .if hCFnt invoke DeleteObject,ha.hFont invoke DeleteObject,ha.hIFont invoke GetObject,hCFnt,sizeof lfnt,offset lfnt mov eax,hCFnt mov ha.hFont,eax mov lfnt.lfItalic,TRUE invoke CreateFontIndirect,offset lfnt mov ha.hIFont,eax mov lfnt.lfItalic,FALSE invoke RegSetValueEx,ha.hReg,addr szCodeFont,0,REG_BINARY,addr lfnt,sizeof lfnt mov hCFnt,0 .endif .if hLFnt invoke DeleteObject,ha.hLnrFont invoke GetObject,hLFnt,sizeof lfntlnr,offset lfntlnr mov eax,hLFnt mov ha.hLnrFont,eax invoke RegSetValueEx,ha.hReg,addr szLnrFont,0,REG_BINARY,addr lfntlnr,sizeof lfntlnr mov hLFnt,0 .endif invoke UpdateAll,WM_SETFONT,0 invoke UpdateToolColors invoke SendMessage,ha.hOut,WM_SETFONT,ha.hFont,TRUE invoke SendMessage,ha.hDbgReg,WM_SETFONT,ha.hFont,TRUE invoke SendMessage,ha.hDbgMMX,WM_SETFONT,ha.hFont,TRUE invoke SendMessage,ha.hDbgWatch,WM_SETFONT,ha.hFont,TRUE invoke RegSetValueEx,ha.hReg,addr szEditOpt,0,REG_BINARY,addr edopt,sizeof edopt invoke RegSetValueEx,ha.hReg,addr szColor,0,REG_BINARY,addr col,sizeof col invoke RegSetValueEx,ha.hReg,addr szCustColors,0,REG_BINARY,addr CustColors,sizeof CustColors invoke SaveTheme .endif retn KeyWordsProc endp
// // Copyright (c) 2013, ARM Limited. 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. // // #include <AsmMacroIoLib.h> #include <Library/ArmLib.h> #include <AutoGen.h> INCLUDE AsmMacroIoLib.inc EXPORT ArmPlatformPeiBootAction EXPORT ArmPlatformIsPrimaryCore EXPORT ArmPlatformGetPrimaryCoreMpId EXPORT ArmPlatformGetCorePosition IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCore IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCoreMask AREA CTA9x4Helper, CODE, READONLY //UINTN //ArmPlatformGetPrimaryCoreMpId ( // VOID // ); ArmPlatformGetPrimaryCoreMpId FUNCTION LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0) ldr r0, [r0] bx lr ENDFUNC //UINTN //ArmPlatformIsPrimaryCore ( // IN UINTN MpId // ); ArmPlatformIsPrimaryCore FUNCTION LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask, r1) ldr r1, [r1] and r0, r0, r1 LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r1) ldr r1, [r1] cmp r0, r1 moveq r0, #1 movne r0, #0 bx lr ENDFUNC //UINTN //ArmPlatformGetCorePosition ( // IN UINTN MpId // ); ArmPlatformGetCorePosition FUNCTION and r0, r0, #ARM_CORE_MASK bx lr ENDFUNC ArmPlatformPeiBootAction FUNCTION bx lr ENDFUNC END
; test for the new RSHIFT assembly instruction start: LODD d1: RSHIFT 0 HALT ; AC has shifted value LODD d2: RSHIFT 3 HALT ; AC has shifted value LODD d3: RSHIFT 7 HALT ; AC has shifted value LODD d4: RSHIFT 15 HALT ; AC has shifted value LODD d5: RSHIFT 4 HALT ; AC has shifted value .LOC 20 d1: 3451 d2: 8192 d3: -8192 d4: -32768 d5: 944
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #include "integration/acceptance/fake_peer_fixture.hpp" #include <rxcpp/operators/rx-filter.hpp> #include <rxcpp/operators/rx-flat_map.hpp> #include <rxcpp/operators/rx-observe_on.hpp> #include <rxcpp/operators/rx-replay.hpp> #include <rxcpp/operators/rx-take.hpp> #include <rxcpp/operators/rx-tap.hpp> #include <rxcpp/operators/rx-timeout.hpp> #include "ametsuchi/block_query.hpp" #include "ametsuchi/storage.hpp" #include "consensus/yac/vote_message.hpp" #include "consensus/yac/yac_hash_provider.hpp" #include "framework/integration_framework/fake_peer/behaviour/honest.hpp" #include "framework/integration_framework/fake_peer/block_storage.hpp" #include "framework/integration_framework/iroha_instance.hpp" #include "framework/integration_framework/test_irohad.hpp" #include "framework/test_logger.hpp" #include "module/shared_model/builders/protobuf/block.hpp" using namespace common_constants; using namespace shared_model; using namespace integration_framework; using namespace shared_model::interface::permissions; using ::testing::_; using ::testing::Invoke; static constexpr std::chrono::seconds kMstStateWaitingTime(20); static constexpr std::chrono::seconds kSynchronizerWaitingTime(20); /** * Check that after sending a not fully signed transaction, an MST state * propagates to another peer * @given a not fully signed transaction * @when such transaction is sent to one of two iroha peers in the network * @then that peer propagates MST state to another peer */ TEST_F(FakePeerFixture, MstStateOfTransactionWithoutAllSignaturesPropagtesToOtherPeer) { createFakePeers(1); auto &itf = prepareState(); auto mst_states_observable = fake_peers_.front()->getMstStatesObservable().replay(); mst_states_observable.connect(); itf.sendTxWithoutValidation(complete( baseTx(kAdminId) .transferAsset(kAdminId, kUserId, kAssetId, "income", "500.0") .quorum(2), kAdminKeypair)); mst_states_observable .timeout(kMstStateWaitingTime, rxcpp::observe_on_new_thread()) .take(1) .as_blocking() .subscribe([](const auto &) {}, [](std::exception_ptr ep) { try { std::rethrow_exception(ep); } catch (const std::exception &e) { FAIL() << "Error waiting for MST state: " << e.what(); } }); } /** * Check that Irohad loads correct block version when having a malicious fork on * the network. * @given a less then 1/3 of peers having a malicious fork of the ledger * @when the irohad needs to synchronize * @then it refuses the malicious fork and applies the valid one */ TEST_F(FakePeerFixture, SynchronizeTheRightVersionOfForkedLedger) { constexpr size_t num_bad_peers = 3; ///< bad fake peers - the ones ///< creating a malicious fork // the real peer is added to the bad peers as they once are failing together constexpr size_t num_peers = (num_bad_peers + 1) * 3 + 1; ///< BFT constexpr size_t num_fake_peers = num_peers - 1; ///< one peer is real createFakePeers(num_fake_peers); auto &itf = prepareState(); // let the first peers be bad const std::vector<std::shared_ptr<FakePeer>> bad_fake_peers( fake_peers_.begin(), fake_peers_.begin() + num_bad_peers); const std::vector<std::shared_ptr<FakePeer>> good_fake_peers( fake_peers_.begin() + num_bad_peers, fake_peers_.end()); const std::shared_ptr<FakePeer> &rantipole_peer = bad_fake_peers.front(); // the malicious actor // Add two blocks to the ledger. itf.sendTx(complete(baseTx(kAdminId).transferAsset( kAdminId, kUserId, kAssetId, "common_tx1", "1.0"), kAdminKeypair)) .skipBlock(); itf.sendTx(complete(baseTx(kAdminId).transferAsset( kAdminId, kUserId, kAssetId, "common_tx2", "2.0"), kAdminKeypair)) .skipBlock(); // Create the valid branch, supported by the good fake peers: auto valid_block_storage = std::make_shared<fake_peer::BlockStorage>(getTestLogger("BlockStorage")); const auto block_query = itf.getBlockQuery(); auto top_height = block_query->getTopBlockHeight(); for (decltype(top_height) i = 1; i <= top_height; ++i) { auto block_result = block_query->getBlock(i); std::shared_ptr<shared_model::interface::Block> block = boost::get<decltype(block_result)::ValueType>(std::move(block_result)) .value; valid_block_storage->storeBlock( std::static_pointer_cast<const shared_model::proto::Block>(block)); } // From now the itf peer is considered unreachable from the rest network. // for (auto &fake_peer : fake_peers_) { fake_peer->setBehaviour(std::make_shared<fake_peer::EmptyBehaviour>()); } // Function to sign a block with a peer's key. auto sign_block_by_peers = [](auto &&block, const auto &peers) { for (auto &peer : peers) { block.signAndAddSignature(peer->getKeypair()); } return std::move(block); }; // Function to create a block auto build_block = [](const auto &parent_block, std::initializer_list<shared_model::proto::Transaction> transactions) { return proto::BlockBuilder() .height(parent_block->height() + 1) .prevHash(parent_block->hash()) .createdTime(iroha::time::now()) .transactions(transactions) .build(); }; // Add a common block committed before fork but without the real peer: valid_block_storage->storeBlock(std::make_shared<shared_model::proto::Block>( sign_block_by_peers( build_block( valid_block_storage->getTopBlock(), {complete(baseTx(kAdminId).transferAsset( kAdminId, kUserId, kAssetId, "valid_tx3", "3.0"), kAdminKeypair)}), good_fake_peers) .finish())); // Create the malicious fork of the ledger: auto bad_block_storage = std::make_shared<fake_peer::BlockStorage>(*valid_block_storage); bad_block_storage->storeBlock(std::make_shared<shared_model::proto::Block>( sign_block_by_peers( build_block( valid_block_storage->getTopBlock(), {complete(baseTx(kAdminId).transferAsset( kAdminId, kUserId, kAssetId, "bad_tx4", "300.0"), kAdminKeypair)}), bad_fake_peers) .finish())); for (auto &bad_fake_peer : bad_fake_peers) { bad_fake_peer->setBlockStorage(bad_block_storage); } // Extend the valid ledger: valid_block_storage->storeBlock(std::make_shared<shared_model::proto::Block>( sign_block_by_peers( build_block( valid_block_storage->getTopBlock(), {complete(baseTx(kAdminId).transferAsset( kAdminId, kUserId, kAssetId, "valid_tx4", "3.0"), kAdminKeypair)}), good_fake_peers) .finish())); for (auto &good_fake_peer : good_fake_peers) { good_fake_peer->setBlockStorage(valid_block_storage); } // Create the new block that the good peers are about to commit now. auto new_valid_block = std::make_shared<shared_model::proto::Block>( sign_block_by_peers( build_block( valid_block_storage->getTopBlock(), {complete(baseTx(kAdminId).transferAsset( kAdminId, kUserId, kAssetId, "valid_tx5", "4.0"), kAdminKeypair)}) .signAndAddSignature(rantipole_peer->getKeypair()), good_fake_peers) .finish()); // From now the itf peer is considered reachable from the rest network. // for (auto &fake_peer : fake_peers_) { fake_peer->setBehaviour(std::make_shared<fake_peer::HonestBehaviour>()); } // Suppose the rantipole peer created a valid Commit message for the tip of // the valid branch, containing its own vote in the beginning of the votes // list. So he forces the real peer to download the missing blocks from it. std::vector<iroha::consensus::yac::VoteMessage> valid_votes; valid_votes.reserve(good_fake_peers.size() + 1); const iroha::consensus::yac::YacHash good_yac_hash( iroha::consensus::Round(new_valid_block->height(), 0), new_valid_block->hash().hex(), new_valid_block->hash().hex()); valid_votes.emplace_back(rantipole_peer->makeVote(good_yac_hash)); std::transform(good_fake_peers.begin(), good_fake_peers.end(), std::back_inserter(valid_votes), [&good_yac_hash](auto &good_fake_peer) { return good_fake_peer->makeVote(good_yac_hash); }); rantipole_peer->sendYacState(valid_votes); // the good peers committed the block valid_block_storage->storeBlock(new_valid_block); // wait for the real peer to commit the blocks and check they are from the // valid branch itf.getIrohaInstance() .getIrohaInstance() ->getStorage() ->on_commit() .tap([&valid_block_storage]( const std::shared_ptr<const shared_model::interface::Block> &committed_block) { const auto valid_hash = valid_block_storage->getBlockByHeight(committed_block->height()) ->hash() .hex(); const auto commited_hash = committed_block->hash().hex(); ASSERT_EQ(commited_hash, valid_hash) << "Wrong block got committed!"; }) .filter([expected_height = valid_block_storage->getTopBlock()->height()]( const auto &committed_block) { return committed_block->height() == expected_height; }) .take(1) .timeout(kSynchronizerWaitingTime, rxcpp::observe_on_new_thread()) .as_blocking() .subscribe([](const auto &) {}, [](std::exception_ptr ep) { try { std::rethrow_exception(ep); } catch (const std::exception &e) { FAIL() << "Error waiting for synchronization: " << e.what(); } }); } /** * Check that after receiving a valid command the ITF peer provides a proposal * containing it. * * \attention this code is nothing more but an example of Fake Peer usage * * @given a network of one real and one fake peers * @when fake peer provides a proposal with valid tx * @then the real peer must commit the transaction from that proposal */ TEST_F(FakePeerFixture, OnDemandOrderingProposalAfterValidCommandReceived) { // Create the tx: const auto tx = complete( baseTx(kAdminId).transferAsset(kAdminId, kUserId, kAssetId, "tx1", "1.0"), kAdminKeypair); createFakePeers(1); auto &itf = prepareState(); // provide the proposal fake_peers_.front()->getProposalStorage().addTransactions({clone(tx)}); // watch the proposal requests to fake peer constexpr std::chrono::seconds kCommitWaitingTime(20); itf.getIrohaInstance() .getIrohaInstance() ->getStorage() ->on_commit() .flat_map([](const auto &block) { std::vector<shared_model::interface::types::HashType> hashes; hashes.reserve(boost::size(block->transactions())); for (const auto &tx : block->transactions()) { hashes.emplace_back(tx.reducedHash()); } return rxcpp::observable<>::iterate(hashes); }) .filter([my_hash = tx.reducedHash()](const auto &incoming_hash) { return incoming_hash == my_hash; }) .take(1) .timeout(kCommitWaitingTime, rxcpp::observe_on_new_thread()) .as_blocking() .subscribe([](const auto &) {}, [](std::exception_ptr ep) { try { std::rethrow_exception(ep); } catch (const std::exception &e) { FAIL() << "Error waiting for the commit: " << e.what(); } }); }
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r14 push %r8 push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0xe7a3, %rsi lea addresses_A_ht+0x13c91, %rdi nop nop sub $156, %r8 mov $62, %rcx rep movsl sub $64258, %r14 lea addresses_WT_ht+0xea3, %rsi lea addresses_A_ht+0x1e3a3, %rdi clflush (%rdi) nop nop nop dec %r11 mov $117, %rcx rep movsq sub %rsi, %rsi lea addresses_UC_ht+0x139d7, %r14 clflush (%r14) sub $27490, %rcx mov (%r14), %si nop sub $25654, %r14 lea addresses_A_ht+0x12c7f, %rsi lea addresses_UC_ht+0x1e837, %rdi nop nop inc %r12 mov $46, %rcx rep movsl nop nop nop sub $22022, %r12 lea addresses_UC_ht+0x1dba3, %r8 clflush (%r8) nop nop cmp %r12, %r12 mov (%r8), %rsi nop nop nop nop and %rcx, %rcx lea addresses_UC_ht+0x7223, %r14 nop cmp $43478, %r8 movl $0x61626364, (%r14) nop nop inc %rdi lea addresses_D_ht+0xfda3, %r14 nop nop sub $3207, %r11 mov $0x6162636465666768, %rcx movq %rcx, (%r14) add $35010, %rdi lea addresses_UC_ht+0x136ab, %rsi lea addresses_A_ht+0x13fa3, %rdi nop nop nop dec %rdx mov $94, %rcx rep movsq nop nop nop nop dec %rsi lea addresses_WC_ht+0xbf7f, %rsi lea addresses_WC_ht+0x137a3, %rdi nop nop sub $56223, %rdx mov $116, %rcx rep movsb nop nop nop sub %r14, %r14 lea addresses_normal_ht+0xeb63, %rsi lea addresses_normal_ht+0x58e3, %rdi nop nop nop nop cmp %r12, %r12 mov $58, %rcx rep movsl nop nop nop nop nop and $4981, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r14 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %r8 push %r9 push %rax push %rbp push %rsi // Load lea addresses_D+0x16aeb, %rax nop nop nop sub $41975, %r15 mov (%rax), %bp nop nop sub $9127, %r15 // Faulty Load lea addresses_normal+0x17a3, %r15 and $2465, %rsi vmovntdqa (%r15), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $1, %xmm4, %rax lea oracles, %r10 and $0xff, %rax shlq $12, %rax mov (%r10,%rax,1), %rax pop %rsi pop %rbp pop %rax pop %r9 pop %r8 pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 11, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'00': 11941, '45': 3271, '48': 4884, '44': 614, '49': 1119} 00 00 45 00 48 45 00 00 00 45 00 45 00 00 00 45 45 48 00 00 00 00 00 48 00 00 00 00 00 45 48 48 00 00 48 49 44 00 00 00 45 48 00 48 49 00 00 00 00 45 00 00 00 00 45 48 00 00 00 45 00 00 00 45 48 00 45 48 48 00 00 48 49 48 00 00 00 48 48 00 00 00 00 00 45 00 45 49 00 00 00 00 00 45 48 00 00 00 00 48 48 00 48 00 49 00 00 00 48 00 44 00 00 00 00 45 00 00 00 00 48 48 48 00 00 00 00 00 49 48 00 00 00 00 48 45 48 00 48 00 00 45 48 45 00 45 00 00 00 00 00 45 48 44 45 00 00 00 00 48 44 00 45 48 00 00 00 48 48 00 00 00 48 48 00 00 00 00 00 45 44 00 00 00 45 48 00 00 00 49 48 00 00 45 48 00 00 00 00 00 48 49 00 00 00 48 00 44 00 00 00 45 45 00 00 48 00 48 00 00 00 49 48 00 00 00 44 00 00 00 00 48 00 00 45 00 48 49 48 48 00 00 00 45 45 49 45 00 48 00 00 00 00 00 00 00 48 00 48 00 45 48 48 00 48 00 48 00 45 45 48 00 00 45 00 00 00 45 45 49 00 00 00 00 00 00 45 48 00 00 00 48 00 48 48 00 00 45 00 00 00 00 48 48 48 00 00 00 00 44 44 00 00 45 48 45 49 48 00 00 48 45 48 48 00 00 00 00 48 00 00 00 00 48 45 48 44 00 00 00 45 48 00 00 00 48 00 00 00 49 44 48 00 00 48 00 00 00 00 00 00 49 48 00 45 45 00 00 48 00 00 00 48 48 48 48 45 48 00 48 00 00 00 00 48 00 48 48 00 00 00 48 48 45 48 00 00 45 48 48 48 00 00 00 00 48 00 00 00 00 00 45 00 48 00 00 45 44 48 00 00 45 00 00 00 00 00 00 48 45 00 00 49 44 00 00 45 48 00 00 00 00 49 00 48 00 00 00 00 00 48 00 00 00 45 48 48 00 00 00 00 45 48 00 00 00 00 45 00 49 00 00 00 00 00 00 45 49 49 00 00 00 00 00 00 00 45 48 00 00 00 00 45 44 00 00 00 00 00 49 00 00 45 00 00 00 48 00 00 00 00 45 00 00 00 48 00 00 48 00 00 45 48 44 00 00 00 00 00 48 00 48 00 00 00 48 44 48 00 00 00 00 45 45 49 00 00 00 48 48 00 48 48 49 44 00 00 00 00 48 00 00 00 45 00 00 45 00 49 45 00 48 48 44 00 00 00 00 00 45 45 49 48 00 49 48 00 48 00 00 00 48 48 48 00 00 00 45 45 45 48 00 00 00 00 48 48 00 00 00 00 00 45 00 00 00 00 45 45 00 00 48 00 45 45 00 48 48 45 49 00 00 00 00 00 48 00 00 45 49 00 00 48 00 00 48 45 00 00 00 00 48 00 00 00 45 49 45 48 44 00 45 48 44 00 00 00 45 00 00 45 00 00 45 45 44 00 00 00 48 00 00 45 48 44 00 00 00 00 45 00 44 00 00 00 00 45 45 48 44 00 00 48 48 00 00 45 45 48 48 00 00 49 44 48 00 00 00 00 45 45 00 49 48 45 00 00 00 00 00 00 48 00 00 00 00 00 00 49 00 48 48 44 00 00 00 45 00 00 00 00 49 00 49 45 48 00 00 00 48 48 00 00 00 48 48 48 00 00 00 45 00 48 00 00 00 00 00 48 00 00 00 48 00 00 00 45 00 48 00 00 00 00 00 49 00 45 00 48 00 00 00 00 44 00 00 00 45 45 48 00 00 00 00 48 00 00 45 00 45 44 00 48 48 00 00 00 00 48 00 00 45 48 00 44 00 00 45 48 49 45 49 48 00 00 00 48 49 00 00 00 00 49 00 00 45 44 00 00 45 48 00 00 00 45 44 00 00 00 49 49 48 00 00 45 48 00 48 00 00 00 00 00 45 00 00 48 48 00 00 49 00 00 48 00 00 00 45 00 00 00 00 45 00 00 48 00 48 00 00 00 48 48 00 00 45 45 44 00 00 00 45 00 45 00 00 44 00 48 48 48 00 00 00 00 48 48 00 00 00 45 48 48 00 00 45 00 00 49 44 00 00 49 49 44 00 00 00 45 00 00 45 00 44 00 00 00 00 48 48 44 00 48 48 00 00 00 45 44 00 00 00 00 48 48 45 44 00 00 48 48 00 00 00 48 00 00 49 48 00 */
; A183136: a(n) = [1/r]+[2/r]+...+[n/r], where r = golden ratio = (1+sqrt(5))/2 and []=floor. ; 0,1,2,4,7,10,14,18,23,29,35,42,50,58,67,76,86,97,108,120,132,145,159,173,188,204,220,237,254,272,291,310,330,351,372,394,416,439,463,487,512,537,563,590,617,645,674,703,733,763,794,826,858 mov $3,$0 mov $4,$0 lpb $4 mov $0,$3 sub $4,1 sub $0,$4 mov $2,$0 mov $5,$0 lpb $2 add $5,1 lpb $5 mov $5,$2 add $2,2 pow $5,2 lpe sub $2,1 add $5,$0 lpe add $1,$2 lpe
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A // PARTICULAR PURPOSE. // // Copyright 1998 - 2003 Microsoft Corporation. All Rights Reserved. // // FILE: dllentry.cpp // // PURPOSE: Source module for DLL entry function(s). // #include "precomp.h" #include "debug.h" #include "globals.h" // This indicates to Prefast that this is a usermode driver file. _Analysis_mode_(_Analysis_code_type_user_driver_); /////////////////////////////////////////////////////////// // // DLL entry point // BOOL WINAPI DllMain(HINSTANCE hInst, WORD wReason, LPVOID lpReserved) { UNREFERENCED_PARAMETER(lpReserved); switch(wReason) { case DLL_PROCESS_ATTACH: VERBOSE("Process attach.\r\n"); ghInstance = hInst; break; case DLL_THREAD_ATTACH: VERBOSE("Thread attach.\r\n"); break; case DLL_PROCESS_DETACH: VERBOSE("Process detach.\r\n"); break; case DLL_THREAD_DETACH: VERBOSE("Thread detach.\r\n"); break; } return TRUE; }
; A052913: a(n+2) = 5*a(n+1) - 2*a(n), with a(0) = 1, a(1) = 4. ; 1,4,18,82,374,1706,7782,35498,161926,738634,3369318,15369322,70107974,319801226,1458790182,6654348458,30354161926,138462112714,631602239718,2881086973162,13142230386374,59948977985546,273460429154982,1247404189803818,5690100090709126 mov $1,1 lpb $0 sub $0,1 add $2,$1 add $1,$2 mul $1,2 lpe
;@DOES copy null-terminated string, with maximum copy amount ;@INPUT HL pointer to null-terminated string ;@INPUT DE pointer to destination ;@INPUT BC maximum bytes to copy ;@OUTPUT HL pointer to null-terminated string strncpy: xor a,a .loop: cp a,(hl) ldi ret po jr nz,.loop ex hl,de add hl,bc ret
aci -128 ; CE 80 aci 127 ; CE 7F aci 255 ; CE FF adc (hl) ; 8E adc (ix) ; FD 8E 00 adc (ix+127) ; FD 8E 7F adc (ix-128) ; FD 8E 80 adc (iy) ; DD 8E 00 adc (iy+127) ; DD 8E 7F adc (iy-128) ; DD 8E 80 adc -128 ; CE 80 adc 127 ; CE 7F adc 255 ; CE FF adc a ; 8F adc a', (hl) ; 76 8E adc a', (ix) ; 76 FD 8E 00 adc a', (ix+127) ; 76 FD 8E 7F adc a', (ix-128) ; 76 FD 8E 80 adc a', (iy) ; 76 DD 8E 00 adc a', (iy+127) ; 76 DD 8E 7F adc a', (iy-128) ; 76 DD 8E 80 adc a', -128 ; 76 CE 80 adc a', 127 ; 76 CE 7F adc a', 255 ; 76 CE FF adc a', a ; 76 8F adc a', b ; 76 88 adc a', c ; 76 89 adc a', d ; 76 8A adc a', e ; 76 8B adc a', h ; 76 8C adc a', l ; 76 8D adc a, (hl) ; 8E adc a, (ix) ; FD 8E 00 adc a, (ix+127) ; FD 8E 7F adc a, (ix-128) ; FD 8E 80 adc a, (iy) ; DD 8E 00 adc a, (iy+127) ; DD 8E 7F adc a, (iy-128) ; DD 8E 80 adc a, -128 ; CE 80 adc a, 127 ; CE 7F adc a, 255 ; CE FF adc a, a ; 8F adc a, b ; 88 adc a, c ; 89 adc a, d ; 8A adc a, e ; 8B adc a, h ; 8C adc a, l ; 8D adc b ; 88 adc c ; 89 adc d ; 8A adc e ; 8B adc h ; 8C adc hl', bc ; 76 ED 4A adc hl', de ; 76 ED 5A adc hl', hl ; 76 ED 6A adc hl', sp ; 76 ED 7A adc hl, bc ; ED 4A adc hl, de ; ED 5A adc hl, hl ; ED 6A adc hl, sp ; ED 7A adc l ; 8D adc m ; 8E add (hl) ; 86 add (ix) ; FD 86 00 add (ix+127) ; FD 86 7F add (ix-128) ; FD 86 80 add (iy) ; DD 86 00 add (iy+127) ; DD 86 7F add (iy-128) ; DD 86 80 add -128 ; C6 80 add 127 ; C6 7F add 255 ; C6 FF add a ; 87 add a', (hl) ; 76 86 add a', (ix) ; 76 FD 86 00 add a', (ix+127) ; 76 FD 86 7F add a', (ix-128) ; 76 FD 86 80 add a', (iy) ; 76 DD 86 00 add a', (iy+127) ; 76 DD 86 7F add a', (iy-128) ; 76 DD 86 80 add a', -128 ; 76 C6 80 add a', 127 ; 76 C6 7F add a', 255 ; 76 C6 FF add a', a ; 76 87 add a', b ; 76 80 add a', c ; 76 81 add a', d ; 76 82 add a', e ; 76 83 add a', h ; 76 84 add a', l ; 76 85 add a, (hl) ; 86 add a, (ix) ; FD 86 00 add a, (ix+127) ; FD 86 7F add a, (ix-128) ; FD 86 80 add a, (iy) ; DD 86 00 add a, (iy+127) ; DD 86 7F add a, (iy-128) ; DD 86 80 add a, -128 ; C6 80 add a, 127 ; C6 7F add a, 255 ; C6 FF add a, a ; 87 add a, b ; 80 add a, c ; 81 add a, d ; 82 add a, e ; 83 add a, h ; 84 add a, l ; 85 add b ; 80 add bc, -32768 ; E5 21 00 80 09 44 4D E1 add bc, 32767 ; E5 21 FF 7F 09 44 4D E1 add bc, 65535 ; E5 21 FF FF 09 44 4D E1 add bc, a ; CD @__z80asm__add_bc_a add c ; 81 add d ; 82 add de, -32768 ; E5 21 00 80 19 54 5D E1 add de, 32767 ; E5 21 FF 7F 19 54 5D E1 add de, 65535 ; E5 21 FF FF 19 54 5D E1 add de, a ; CD @__z80asm__add_de_a add e ; 83 add h ; 84 add hl', bc ; 76 09 add hl', de ; 76 19 add hl', hl ; 76 29 add hl', sp ; 76 39 add hl, -32768 ; D5 11 00 80 19 D1 add hl, 32767 ; D5 11 FF 7F 19 D1 add hl, 65535 ; D5 11 FF FF 19 D1 add hl, a ; CD @__z80asm__add_hl_a add hl, bc ; 09 add hl, de ; 19 add hl, hl ; 29 add hl, sp ; 39 add ix, bc ; FD 09 add ix, de ; FD 19 add ix, ix ; FD 29 add ix, sp ; FD 39 add iy, bc ; DD 09 add iy, de ; DD 19 add iy, iy ; DD 29 add iy, sp ; DD 39 add l ; 85 add m ; 86 add sp, -128 ; 27 80 add sp, 127 ; 27 7F add.a sp, -128 ; 27 80 add.a sp, 127 ; 27 7F adi -128 ; C6 80 adi 127 ; C6 7F adi 255 ; C6 FF altd adc (hl) ; 76 8E altd adc (ix) ; 76 FD 8E 00 altd adc (ix+127) ; 76 FD 8E 7F altd adc (ix-128) ; 76 FD 8E 80 altd adc (iy) ; 76 DD 8E 00 altd adc (iy+127) ; 76 DD 8E 7F altd adc (iy-128) ; 76 DD 8E 80 altd adc -128 ; 76 CE 80 altd adc 127 ; 76 CE 7F altd adc 255 ; 76 CE FF altd adc a ; 76 8F altd adc a, (hl) ; 76 8E altd adc a, (ix) ; 76 FD 8E 00 altd adc a, (ix+127) ; 76 FD 8E 7F altd adc a, (ix-128) ; 76 FD 8E 80 altd adc a, (iy) ; 76 DD 8E 00 altd adc a, (iy+127) ; 76 DD 8E 7F altd adc a, (iy-128) ; 76 DD 8E 80 altd adc a, -128 ; 76 CE 80 altd adc a, 127 ; 76 CE 7F altd adc a, 255 ; 76 CE FF altd adc a, a ; 76 8F altd adc a, b ; 76 88 altd adc a, c ; 76 89 altd adc a, d ; 76 8A altd adc a, e ; 76 8B altd adc a, h ; 76 8C altd adc a, l ; 76 8D altd adc b ; 76 88 altd adc c ; 76 89 altd adc d ; 76 8A altd adc e ; 76 8B altd adc h ; 76 8C altd adc hl, bc ; 76 ED 4A altd adc hl, de ; 76 ED 5A altd adc hl, hl ; 76 ED 6A altd adc hl, sp ; 76 ED 7A altd adc l ; 76 8D altd adc m ; 76 8E altd add (hl) ; 76 86 altd add (ix) ; 76 FD 86 00 altd add (ix+127) ; 76 FD 86 7F altd add (ix-128) ; 76 FD 86 80 altd add (iy) ; 76 DD 86 00 altd add (iy+127) ; 76 DD 86 7F altd add (iy-128) ; 76 DD 86 80 altd add -128 ; 76 C6 80 altd add 127 ; 76 C6 7F altd add 255 ; 76 C6 FF altd add a ; 76 87 altd add a, (hl) ; 76 86 altd add a, (ix) ; 76 FD 86 00 altd add a, (ix+127) ; 76 FD 86 7F altd add a, (ix-128) ; 76 FD 86 80 altd add a, (iy) ; 76 DD 86 00 altd add a, (iy+127) ; 76 DD 86 7F altd add a, (iy-128) ; 76 DD 86 80 altd add a, -128 ; 76 C6 80 altd add a, 127 ; 76 C6 7F altd add a, 255 ; 76 C6 FF altd add a, a ; 76 87 altd add a, b ; 76 80 altd add a, c ; 76 81 altd add a, d ; 76 82 altd add a, e ; 76 83 altd add a, h ; 76 84 altd add a, l ; 76 85 altd add b ; 76 80 altd add c ; 76 81 altd add d ; 76 82 altd add e ; 76 83 altd add h ; 76 84 altd add hl, bc ; 76 09 altd add hl, de ; 76 19 altd add hl, hl ; 76 29 altd add hl, sp ; 76 39 altd add l ; 76 85 altd add m ; 76 86 altd and (hl) ; 76 A6 altd and (ix) ; 76 FD A6 00 altd and (ix+127) ; 76 FD A6 7F altd and (ix-128) ; 76 FD A6 80 altd and (iy) ; 76 DD A6 00 altd and (iy+127) ; 76 DD A6 7F altd and (iy-128) ; 76 DD A6 80 altd and -128 ; 76 E6 80 altd and 127 ; 76 E6 7F altd and 255 ; 76 E6 FF altd and a ; 76 A7 altd and a, (hl) ; 76 A6 altd and a, (ix) ; 76 FD A6 00 altd and a, (ix+127) ; 76 FD A6 7F altd and a, (ix-128) ; 76 FD A6 80 altd and a, (iy) ; 76 DD A6 00 altd and a, (iy+127) ; 76 DD A6 7F altd and a, (iy-128) ; 76 DD A6 80 altd and a, -128 ; 76 E6 80 altd and a, 127 ; 76 E6 7F altd and a, 255 ; 76 E6 FF altd and a, a ; 76 A7 altd and a, b ; 76 A0 altd and a, c ; 76 A1 altd and a, d ; 76 A2 altd and a, e ; 76 A3 altd and a, h ; 76 A4 altd and a, l ; 76 A5 altd and b ; 76 A0 altd and c ; 76 A1 altd and d ; 76 A2 altd and e ; 76 A3 altd and h ; 76 A4 altd and hl, de ; 76 DC altd and ix, de ; 76 FD DC altd and iy, de ; 76 DD DC altd and l ; 76 A5 altd bit 0, (hl) ; 76 CB 46 altd bit 0, (ix) ; 76 FD CB 00 46 altd bit 0, (ix+127) ; 76 FD CB 7F 46 altd bit 0, (ix-128) ; 76 FD CB 80 46 altd bit 0, (iy) ; 76 DD CB 00 46 altd bit 0, (iy+127) ; 76 DD CB 7F 46 altd bit 0, (iy-128) ; 76 DD CB 80 46 altd bit 0, a ; 76 CB 47 altd bit 0, b ; 76 CB 40 altd bit 0, c ; 76 CB 41 altd bit 0, d ; 76 CB 42 altd bit 0, e ; 76 CB 43 altd bit 0, h ; 76 CB 44 altd bit 0, l ; 76 CB 45 altd bit 1, (hl) ; 76 CB 4E altd bit 1, (ix) ; 76 FD CB 00 4E altd bit 1, (ix+127) ; 76 FD CB 7F 4E altd bit 1, (ix-128) ; 76 FD CB 80 4E altd bit 1, (iy) ; 76 DD CB 00 4E altd bit 1, (iy+127) ; 76 DD CB 7F 4E altd bit 1, (iy-128) ; 76 DD CB 80 4E altd bit 1, a ; 76 CB 4F altd bit 1, b ; 76 CB 48 altd bit 1, c ; 76 CB 49 altd bit 1, d ; 76 CB 4A altd bit 1, e ; 76 CB 4B altd bit 1, h ; 76 CB 4C altd bit 1, l ; 76 CB 4D altd bit 2, (hl) ; 76 CB 56 altd bit 2, (ix) ; 76 FD CB 00 56 altd bit 2, (ix+127) ; 76 FD CB 7F 56 altd bit 2, (ix-128) ; 76 FD CB 80 56 altd bit 2, (iy) ; 76 DD CB 00 56 altd bit 2, (iy+127) ; 76 DD CB 7F 56 altd bit 2, (iy-128) ; 76 DD CB 80 56 altd bit 2, a ; 76 CB 57 altd bit 2, b ; 76 CB 50 altd bit 2, c ; 76 CB 51 altd bit 2, d ; 76 CB 52 altd bit 2, e ; 76 CB 53 altd bit 2, h ; 76 CB 54 altd bit 2, l ; 76 CB 55 altd bit 3, (hl) ; 76 CB 5E altd bit 3, (ix) ; 76 FD CB 00 5E altd bit 3, (ix+127) ; 76 FD CB 7F 5E altd bit 3, (ix-128) ; 76 FD CB 80 5E altd bit 3, (iy) ; 76 DD CB 00 5E altd bit 3, (iy+127) ; 76 DD CB 7F 5E altd bit 3, (iy-128) ; 76 DD CB 80 5E altd bit 3, a ; 76 CB 5F altd bit 3, b ; 76 CB 58 altd bit 3, c ; 76 CB 59 altd bit 3, d ; 76 CB 5A altd bit 3, e ; 76 CB 5B altd bit 3, h ; 76 CB 5C altd bit 3, l ; 76 CB 5D altd bit 4, (hl) ; 76 CB 66 altd bit 4, (ix) ; 76 FD CB 00 66 altd bit 4, (ix+127) ; 76 FD CB 7F 66 altd bit 4, (ix-128) ; 76 FD CB 80 66 altd bit 4, (iy) ; 76 DD CB 00 66 altd bit 4, (iy+127) ; 76 DD CB 7F 66 altd bit 4, (iy-128) ; 76 DD CB 80 66 altd bit 4, a ; 76 CB 67 altd bit 4, b ; 76 CB 60 altd bit 4, c ; 76 CB 61 altd bit 4, d ; 76 CB 62 altd bit 4, e ; 76 CB 63 altd bit 4, h ; 76 CB 64 altd bit 4, l ; 76 CB 65 altd bit 5, (hl) ; 76 CB 6E altd bit 5, (ix) ; 76 FD CB 00 6E altd bit 5, (ix+127) ; 76 FD CB 7F 6E altd bit 5, (ix-128) ; 76 FD CB 80 6E altd bit 5, (iy) ; 76 DD CB 00 6E altd bit 5, (iy+127) ; 76 DD CB 7F 6E altd bit 5, (iy-128) ; 76 DD CB 80 6E altd bit 5, a ; 76 CB 6F altd bit 5, b ; 76 CB 68 altd bit 5, c ; 76 CB 69 altd bit 5, d ; 76 CB 6A altd bit 5, e ; 76 CB 6B altd bit 5, h ; 76 CB 6C altd bit 5, l ; 76 CB 6D altd bit 6, (hl) ; 76 CB 76 altd bit 6, (ix) ; 76 FD CB 00 76 altd bit 6, (ix+127) ; 76 FD CB 7F 76 altd bit 6, (ix-128) ; 76 FD CB 80 76 altd bit 6, (iy) ; 76 DD CB 00 76 altd bit 6, (iy+127) ; 76 DD CB 7F 76 altd bit 6, (iy-128) ; 76 DD CB 80 76 altd bit 6, a ; 76 CB 77 altd bit 6, b ; 76 CB 70 altd bit 6, c ; 76 CB 71 altd bit 6, d ; 76 CB 72 altd bit 6, e ; 76 CB 73 altd bit 6, h ; 76 CB 74 altd bit 6, l ; 76 CB 75 altd bit 7, (hl) ; 76 CB 7E altd bit 7, (ix) ; 76 FD CB 00 7E altd bit 7, (ix+127) ; 76 FD CB 7F 7E altd bit 7, (ix-128) ; 76 FD CB 80 7E altd bit 7, (iy) ; 76 DD CB 00 7E altd bit 7, (iy+127) ; 76 DD CB 7F 7E altd bit 7, (iy-128) ; 76 DD CB 80 7E altd bit 7, a ; 76 CB 7F altd bit 7, b ; 76 CB 78 altd bit 7, c ; 76 CB 79 altd bit 7, d ; 76 CB 7A altd bit 7, e ; 76 CB 7B altd bit 7, h ; 76 CB 7C altd bit 7, l ; 76 CB 7D altd bool hl ; 76 CC altd bool ix ; 76 FD CC altd bool iy ; 76 DD CC altd ccf ; 76 3F altd cp (hl) ; 76 BE altd cp (ix) ; 76 FD BE 00 altd cp (ix+127) ; 76 FD BE 7F altd cp (ix-128) ; 76 FD BE 80 altd cp (iy) ; 76 DD BE 00 altd cp (iy+127) ; 76 DD BE 7F altd cp (iy-128) ; 76 DD BE 80 altd cp -128 ; 76 FE 80 altd cp 127 ; 76 FE 7F altd cp 255 ; 76 FE FF altd cp a ; 76 BF altd cp a, (hl) ; 76 BE altd cp a, (ix) ; 76 FD BE 00 altd cp a, (ix+127) ; 76 FD BE 7F altd cp a, (ix-128) ; 76 FD BE 80 altd cp a, (iy) ; 76 DD BE 00 altd cp a, (iy+127) ; 76 DD BE 7F altd cp a, (iy-128) ; 76 DD BE 80 altd cp a, -128 ; 76 FE 80 altd cp a, 127 ; 76 FE 7F altd cp a, 255 ; 76 FE FF altd cp a, a ; 76 BF altd cp a, b ; 76 B8 altd cp a, c ; 76 B9 altd cp a, d ; 76 BA altd cp a, e ; 76 BB altd cp a, h ; 76 BC altd cp a, l ; 76 BD altd cp b ; 76 B8 altd cp c ; 76 B9 altd cp d ; 76 BA altd cp e ; 76 BB altd cp h ; 76 BC altd cp l ; 76 BD altd cpl ; 76 2F altd cpl a ; 76 2F altd dec (hl) ; 76 35 altd dec (ix) ; 76 FD 35 00 altd dec (ix+127) ; 76 FD 35 7F altd dec (ix-128) ; 76 FD 35 80 altd dec (iy) ; 76 DD 35 00 altd dec (iy+127) ; 76 DD 35 7F altd dec (iy-128) ; 76 DD 35 80 altd dec a ; 76 3D altd dec b ; 76 05 altd dec bc ; 76 0B altd dec c ; 76 0D altd dec d ; 76 15 altd dec de ; 76 1B altd dec e ; 76 1D altd dec h ; 76 25 altd dec hl ; 76 2B altd dec l ; 76 2D altd djnz ASMPC ; 76 10 FE altd djnz b, ASMPC ; 76 10 FE altd ex (sp), hl ; 76 ED 54 altd ex de', hl ; 76 E3 altd ex de, hl ; 76 EB altd inc (hl) ; 76 34 altd inc (ix) ; 76 FD 34 00 altd inc (ix+127) ; 76 FD 34 7F altd inc (ix-128) ; 76 FD 34 80 altd inc (iy) ; 76 DD 34 00 altd inc (iy+127) ; 76 DD 34 7F altd inc (iy-128) ; 76 DD 34 80 altd inc a ; 76 3C altd inc b ; 76 04 altd inc bc ; 76 03 altd inc c ; 76 0C altd inc d ; 76 14 altd inc de ; 76 13 altd inc e ; 76 1C altd inc h ; 76 24 altd inc hl ; 76 23 altd inc l ; 76 2C altd ioe adc (hl) ; 76 DB 8E altd ioe adc (ix) ; 76 DB FD 8E 00 altd ioe adc (ix+127) ; 76 DB FD 8E 7F altd ioe adc (ix-128) ; 76 DB FD 8E 80 altd ioe adc (iy) ; 76 DB DD 8E 00 altd ioe adc (iy+127) ; 76 DB DD 8E 7F altd ioe adc (iy-128) ; 76 DB DD 8E 80 altd ioe adc a, (hl) ; 76 DB 8E altd ioe adc a, (ix) ; 76 DB FD 8E 00 altd ioe adc a, (ix+127) ; 76 DB FD 8E 7F altd ioe adc a, (ix-128) ; 76 DB FD 8E 80 altd ioe adc a, (iy) ; 76 DB DD 8E 00 altd ioe adc a, (iy+127) ; 76 DB DD 8E 7F altd ioe adc a, (iy-128) ; 76 DB DD 8E 80 altd ioe add (hl) ; 76 DB 86 altd ioe add (ix) ; 76 DB FD 86 00 altd ioe add (ix+127) ; 76 DB FD 86 7F altd ioe add (ix-128) ; 76 DB FD 86 80 altd ioe add (iy) ; 76 DB DD 86 00 altd ioe add (iy+127) ; 76 DB DD 86 7F altd ioe add (iy-128) ; 76 DB DD 86 80 altd ioe add a, (hl) ; 76 DB 86 altd ioe add a, (ix) ; 76 DB FD 86 00 altd ioe add a, (ix+127) ; 76 DB FD 86 7F altd ioe add a, (ix-128) ; 76 DB FD 86 80 altd ioe add a, (iy) ; 76 DB DD 86 00 altd ioe add a, (iy+127) ; 76 DB DD 86 7F altd ioe add a, (iy-128) ; 76 DB DD 86 80 altd ioe and (hl) ; 76 DB A6 altd ioe and (ix) ; 76 DB FD A6 00 altd ioe and (ix+127) ; 76 DB FD A6 7F altd ioe and (ix-128) ; 76 DB FD A6 80 altd ioe and (iy) ; 76 DB DD A6 00 altd ioe and (iy+127) ; 76 DB DD A6 7F altd ioe and (iy-128) ; 76 DB DD A6 80 altd ioe and a, (hl) ; 76 DB A6 altd ioe and a, (ix) ; 76 DB FD A6 00 altd ioe and a, (ix+127) ; 76 DB FD A6 7F altd ioe and a, (ix-128) ; 76 DB FD A6 80 altd ioe and a, (iy) ; 76 DB DD A6 00 altd ioe and a, (iy+127) ; 76 DB DD A6 7F altd ioe and a, (iy-128) ; 76 DB DD A6 80 altd ioe bit 0, (hl) ; 76 DB CB 46 altd ioe bit 0, (ix) ; 76 DB FD CB 00 46 altd ioe bit 0, (ix+127) ; 76 DB FD CB 7F 46 altd ioe bit 0, (ix-128) ; 76 DB FD CB 80 46 altd ioe bit 0, (iy) ; 76 DB DD CB 00 46 altd ioe bit 0, (iy+127) ; 76 DB DD CB 7F 46 altd ioe bit 0, (iy-128) ; 76 DB DD CB 80 46 altd ioe bit 1, (hl) ; 76 DB CB 4E altd ioe bit 1, (ix) ; 76 DB FD CB 00 4E altd ioe bit 1, (ix+127) ; 76 DB FD CB 7F 4E altd ioe bit 1, (ix-128) ; 76 DB FD CB 80 4E altd ioe bit 1, (iy) ; 76 DB DD CB 00 4E altd ioe bit 1, (iy+127) ; 76 DB DD CB 7F 4E altd ioe bit 1, (iy-128) ; 76 DB DD CB 80 4E altd ioe bit 2, (hl) ; 76 DB CB 56 altd ioe bit 2, (ix) ; 76 DB FD CB 00 56 altd ioe bit 2, (ix+127) ; 76 DB FD CB 7F 56 altd ioe bit 2, (ix-128) ; 76 DB FD CB 80 56 altd ioe bit 2, (iy) ; 76 DB DD CB 00 56 altd ioe bit 2, (iy+127) ; 76 DB DD CB 7F 56 altd ioe bit 2, (iy-128) ; 76 DB DD CB 80 56 altd ioe bit 3, (hl) ; 76 DB CB 5E altd ioe bit 3, (ix) ; 76 DB FD CB 00 5E altd ioe bit 3, (ix+127) ; 76 DB FD CB 7F 5E altd ioe bit 3, (ix-128) ; 76 DB FD CB 80 5E altd ioe bit 3, (iy) ; 76 DB DD CB 00 5E altd ioe bit 3, (iy+127) ; 76 DB DD CB 7F 5E altd ioe bit 3, (iy-128) ; 76 DB DD CB 80 5E altd ioe bit 4, (hl) ; 76 DB CB 66 altd ioe bit 4, (ix) ; 76 DB FD CB 00 66 altd ioe bit 4, (ix+127) ; 76 DB FD CB 7F 66 altd ioe bit 4, (ix-128) ; 76 DB FD CB 80 66 altd ioe bit 4, (iy) ; 76 DB DD CB 00 66 altd ioe bit 4, (iy+127) ; 76 DB DD CB 7F 66 altd ioe bit 4, (iy-128) ; 76 DB DD CB 80 66 altd ioe bit 5, (hl) ; 76 DB CB 6E altd ioe bit 5, (ix) ; 76 DB FD CB 00 6E altd ioe bit 5, (ix+127) ; 76 DB FD CB 7F 6E altd ioe bit 5, (ix-128) ; 76 DB FD CB 80 6E altd ioe bit 5, (iy) ; 76 DB DD CB 00 6E altd ioe bit 5, (iy+127) ; 76 DB DD CB 7F 6E altd ioe bit 5, (iy-128) ; 76 DB DD CB 80 6E altd ioe bit 6, (hl) ; 76 DB CB 76 altd ioe bit 6, (ix) ; 76 DB FD CB 00 76 altd ioe bit 6, (ix+127) ; 76 DB FD CB 7F 76 altd ioe bit 6, (ix-128) ; 76 DB FD CB 80 76 altd ioe bit 6, (iy) ; 76 DB DD CB 00 76 altd ioe bit 6, (iy+127) ; 76 DB DD CB 7F 76 altd ioe bit 6, (iy-128) ; 76 DB DD CB 80 76 altd ioe bit 7, (hl) ; 76 DB CB 7E altd ioe bit 7, (ix) ; 76 DB FD CB 00 7E altd ioe bit 7, (ix+127) ; 76 DB FD CB 7F 7E altd ioe bit 7, (ix-128) ; 76 DB FD CB 80 7E altd ioe bit 7, (iy) ; 76 DB DD CB 00 7E altd ioe bit 7, (iy+127) ; 76 DB DD CB 7F 7E altd ioe bit 7, (iy-128) ; 76 DB DD CB 80 7E altd ioe cp (hl) ; 76 DB BE altd ioe cp (ix) ; 76 DB FD BE 00 altd ioe cp (ix+127) ; 76 DB FD BE 7F altd ioe cp (ix-128) ; 76 DB FD BE 80 altd ioe cp (iy) ; 76 DB DD BE 00 altd ioe cp (iy+127) ; 76 DB DD BE 7F altd ioe cp (iy-128) ; 76 DB DD BE 80 altd ioe cp a, (hl) ; 76 DB BE altd ioe cp a, (ix) ; 76 DB FD BE 00 altd ioe cp a, (ix+127) ; 76 DB FD BE 7F altd ioe cp a, (ix-128) ; 76 DB FD BE 80 altd ioe cp a, (iy) ; 76 DB DD BE 00 altd ioe cp a, (iy+127) ; 76 DB DD BE 7F altd ioe cp a, (iy-128) ; 76 DB DD BE 80 altd ioe dec (hl) ; 76 DB 35 altd ioe dec (ix) ; 76 DB FD 35 00 altd ioe dec (ix+127) ; 76 DB FD 35 7F altd ioe dec (ix-128) ; 76 DB FD 35 80 altd ioe dec (iy) ; 76 DB DD 35 00 altd ioe dec (iy+127) ; 76 DB DD 35 7F altd ioe dec (iy-128) ; 76 DB DD 35 80 altd ioe inc (hl) ; 76 DB 34 altd ioe inc (ix) ; 76 DB FD 34 00 altd ioe inc (ix+127) ; 76 DB FD 34 7F altd ioe inc (ix-128) ; 76 DB FD 34 80 altd ioe inc (iy) ; 76 DB DD 34 00 altd ioe inc (iy+127) ; 76 DB DD 34 7F altd ioe inc (iy-128) ; 76 DB DD 34 80 altd ioe ld a, (-32768) ; 76 DB 3A 00 80 altd ioe ld a, (32767) ; 76 DB 3A FF 7F altd ioe ld a, (65535) ; 76 DB 3A FF FF altd ioe ld a, (bc) ; 76 DB 0A altd ioe ld a, (bc+) ; 76 DB 0A 03 altd ioe ld a, (bc-) ; 76 DB 0A 0B altd ioe ld a, (de) ; 76 DB 1A altd ioe ld a, (de+) ; 76 DB 1A 13 altd ioe ld a, (de-) ; 76 DB 1A 1B altd ioe ld a, (hl) ; 76 DB 7E altd ioe ld a, (hl+) ; 76 DB 7E 23 altd ioe ld a, (hl-) ; 76 DB 7E 2B altd ioe ld a, (hld) ; 76 DB 7E 2B altd ioe ld a, (hli) ; 76 DB 7E 23 altd ioe ld a, (ix) ; 76 DB FD 7E 00 altd ioe ld a, (ix+127) ; 76 DB FD 7E 7F altd ioe ld a, (ix-128) ; 76 DB FD 7E 80 altd ioe ld a, (iy) ; 76 DB DD 7E 00 altd ioe ld a, (iy+127) ; 76 DB DD 7E 7F altd ioe ld a, (iy-128) ; 76 DB DD 7E 80 altd ioe ld b, (hl) ; 76 DB 46 altd ioe ld b, (ix) ; 76 DB FD 46 00 altd ioe ld b, (ix+127) ; 76 DB FD 46 7F altd ioe ld b, (ix-128) ; 76 DB FD 46 80 altd ioe ld b, (iy) ; 76 DB DD 46 00 altd ioe ld b, (iy+127) ; 76 DB DD 46 7F altd ioe ld b, (iy-128) ; 76 DB DD 46 80 altd ioe ld bc, (-32768) ; 76 DB ED 4B 00 80 altd ioe ld bc, (32767) ; 76 DB ED 4B FF 7F altd ioe ld bc, (65535) ; 76 DB ED 4B FF FF altd ioe ld c, (hl) ; 76 DB 4E altd ioe ld c, (ix) ; 76 DB FD 4E 00 altd ioe ld c, (ix+127) ; 76 DB FD 4E 7F altd ioe ld c, (ix-128) ; 76 DB FD 4E 80 altd ioe ld c, (iy) ; 76 DB DD 4E 00 altd ioe ld c, (iy+127) ; 76 DB DD 4E 7F altd ioe ld c, (iy-128) ; 76 DB DD 4E 80 altd ioe ld d, (hl) ; 76 DB 56 altd ioe ld d, (ix) ; 76 DB FD 56 00 altd ioe ld d, (ix+127) ; 76 DB FD 56 7F altd ioe ld d, (ix-128) ; 76 DB FD 56 80 altd ioe ld d, (iy) ; 76 DB DD 56 00 altd ioe ld d, (iy+127) ; 76 DB DD 56 7F altd ioe ld d, (iy-128) ; 76 DB DD 56 80 altd ioe ld de, (-32768) ; 76 DB ED 5B 00 80 altd ioe ld de, (32767) ; 76 DB ED 5B FF 7F altd ioe ld de, (65535) ; 76 DB ED 5B FF FF altd ioe ld e, (hl) ; 76 DB 5E altd ioe ld e, (ix) ; 76 DB FD 5E 00 altd ioe ld e, (ix+127) ; 76 DB FD 5E 7F altd ioe ld e, (ix-128) ; 76 DB FD 5E 80 altd ioe ld e, (iy) ; 76 DB DD 5E 00 altd ioe ld e, (iy+127) ; 76 DB DD 5E 7F altd ioe ld e, (iy-128) ; 76 DB DD 5E 80 altd ioe ld h, (hl) ; 76 DB 66 altd ioe ld h, (ix) ; 76 DB FD 66 00 altd ioe ld h, (ix+127) ; 76 DB FD 66 7F altd ioe ld h, (ix-128) ; 76 DB FD 66 80 altd ioe ld h, (iy) ; 76 DB DD 66 00 altd ioe ld h, (iy+127) ; 76 DB DD 66 7F altd ioe ld h, (iy-128) ; 76 DB DD 66 80 altd ioe ld hl, (-32768) ; 76 DB 2A 00 80 altd ioe ld hl, (32767) ; 76 DB 2A FF 7F altd ioe ld hl, (65535) ; 76 DB 2A FF FF altd ioe ld hl, (hl) ; 76 DB DD E4 00 altd ioe ld hl, (hl+127) ; 76 DB DD E4 7F altd ioe ld hl, (hl-128) ; 76 DB DD E4 80 altd ioe ld hl, (ix) ; 76 DB FD E4 00 altd ioe ld hl, (ix+127) ; 76 DB FD E4 7F altd ioe ld hl, (ix-128) ; 76 DB FD E4 80 altd ioe ld hl, (iy) ; 76 DB E4 00 altd ioe ld hl, (iy+127) ; 76 DB E4 7F altd ioe ld hl, (iy-128) ; 76 DB E4 80 altd ioe ld l, (hl) ; 76 DB 6E altd ioe ld l, (ix) ; 76 DB FD 6E 00 altd ioe ld l, (ix+127) ; 76 DB FD 6E 7F altd ioe ld l, (ix-128) ; 76 DB FD 6E 80 altd ioe ld l, (iy) ; 76 DB DD 6E 00 altd ioe ld l, (iy+127) ; 76 DB DD 6E 7F altd ioe ld l, (iy-128) ; 76 DB DD 6E 80 altd ioe or (hl) ; 76 DB B6 altd ioe or (ix) ; 76 DB FD B6 00 altd ioe or (ix+127) ; 76 DB FD B6 7F altd ioe or (ix-128) ; 76 DB FD B6 80 altd ioe or (iy) ; 76 DB DD B6 00 altd ioe or (iy+127) ; 76 DB DD B6 7F altd ioe or (iy-128) ; 76 DB DD B6 80 altd ioe or a, (hl) ; 76 DB B6 altd ioe or a, (ix) ; 76 DB FD B6 00 altd ioe or a, (ix+127) ; 76 DB FD B6 7F altd ioe or a, (ix-128) ; 76 DB FD B6 80 altd ioe or a, (iy) ; 76 DB DD B6 00 altd ioe or a, (iy+127) ; 76 DB DD B6 7F altd ioe or a, (iy-128) ; 76 DB DD B6 80 altd ioe rl (hl) ; 76 DB CB 16 altd ioe rl (ix) ; 76 DB FD CB 00 16 altd ioe rl (ix+127) ; 76 DB FD CB 7F 16 altd ioe rl (ix-128) ; 76 DB FD CB 80 16 altd ioe rl (iy) ; 76 DB DD CB 00 16 altd ioe rl (iy+127) ; 76 DB DD CB 7F 16 altd ioe rl (iy-128) ; 76 DB DD CB 80 16 altd ioe rlc (hl) ; 76 DB CB 06 altd ioe rlc (ix) ; 76 DB FD CB 00 06 altd ioe rlc (ix+127) ; 76 DB FD CB 7F 06 altd ioe rlc (ix-128) ; 76 DB FD CB 80 06 altd ioe rlc (iy) ; 76 DB DD CB 00 06 altd ioe rlc (iy+127) ; 76 DB DD CB 7F 06 altd ioe rlc (iy-128) ; 76 DB DD CB 80 06 altd ioe rr (hl) ; 76 DB CB 1E altd ioe rr (ix) ; 76 DB FD CB 00 1E altd ioe rr (ix+127) ; 76 DB FD CB 7F 1E altd ioe rr (ix-128) ; 76 DB FD CB 80 1E altd ioe rr (iy) ; 76 DB DD CB 00 1E altd ioe rr (iy+127) ; 76 DB DD CB 7F 1E altd ioe rr (iy-128) ; 76 DB DD CB 80 1E altd ioe rrc (hl) ; 76 DB CB 0E altd ioe rrc (ix) ; 76 DB FD CB 00 0E altd ioe rrc (ix+127) ; 76 DB FD CB 7F 0E altd ioe rrc (ix-128) ; 76 DB FD CB 80 0E altd ioe rrc (iy) ; 76 DB DD CB 00 0E altd ioe rrc (iy+127) ; 76 DB DD CB 7F 0E altd ioe rrc (iy-128) ; 76 DB DD CB 80 0E altd ioe sbc (hl) ; 76 DB 9E altd ioe sbc (ix) ; 76 DB FD 9E 00 altd ioe sbc (ix+127) ; 76 DB FD 9E 7F altd ioe sbc (ix-128) ; 76 DB FD 9E 80 altd ioe sbc (iy) ; 76 DB DD 9E 00 altd ioe sbc (iy+127) ; 76 DB DD 9E 7F altd ioe sbc (iy-128) ; 76 DB DD 9E 80 altd ioe sbc a, (hl) ; 76 DB 9E altd ioe sbc a, (ix) ; 76 DB FD 9E 00 altd ioe sbc a, (ix+127) ; 76 DB FD 9E 7F altd ioe sbc a, (ix-128) ; 76 DB FD 9E 80 altd ioe sbc a, (iy) ; 76 DB DD 9E 00 altd ioe sbc a, (iy+127) ; 76 DB DD 9E 7F altd ioe sbc a, (iy-128) ; 76 DB DD 9E 80 altd ioe sla (hl) ; 76 DB CB 26 altd ioe sla (ix) ; 76 DB FD CB 00 26 altd ioe sla (ix+127) ; 76 DB FD CB 7F 26 altd ioe sla (ix-128) ; 76 DB FD CB 80 26 altd ioe sla (iy) ; 76 DB DD CB 00 26 altd ioe sla (iy+127) ; 76 DB DD CB 7F 26 altd ioe sla (iy-128) ; 76 DB DD CB 80 26 altd ioe sra (hl) ; 76 DB CB 2E altd ioe sra (ix) ; 76 DB FD CB 00 2E altd ioe sra (ix+127) ; 76 DB FD CB 7F 2E altd ioe sra (ix-128) ; 76 DB FD CB 80 2E altd ioe sra (iy) ; 76 DB DD CB 00 2E altd ioe sra (iy+127) ; 76 DB DD CB 7F 2E altd ioe sra (iy-128) ; 76 DB DD CB 80 2E altd ioe srl (hl) ; 76 DB CB 3E altd ioe srl (ix) ; 76 DB FD CB 00 3E altd ioe srl (ix+127) ; 76 DB FD CB 7F 3E altd ioe srl (ix-128) ; 76 DB FD CB 80 3E altd ioe srl (iy) ; 76 DB DD CB 00 3E altd ioe srl (iy+127) ; 76 DB DD CB 7F 3E altd ioe srl (iy-128) ; 76 DB DD CB 80 3E altd ioe sub (hl) ; 76 DB 96 altd ioe sub (ix) ; 76 DB FD 96 00 altd ioe sub (ix+127) ; 76 DB FD 96 7F altd ioe sub (ix-128) ; 76 DB FD 96 80 altd ioe sub (iy) ; 76 DB DD 96 00 altd ioe sub (iy+127) ; 76 DB DD 96 7F altd ioe sub (iy-128) ; 76 DB DD 96 80 altd ioe sub a, (hl) ; 76 DB 96 altd ioe sub a, (ix) ; 76 DB FD 96 00 altd ioe sub a, (ix+127) ; 76 DB FD 96 7F altd ioe sub a, (ix-128) ; 76 DB FD 96 80 altd ioe sub a, (iy) ; 76 DB DD 96 00 altd ioe sub a, (iy+127) ; 76 DB DD 96 7F altd ioe sub a, (iy-128) ; 76 DB DD 96 80 altd ioe xor (hl) ; 76 DB AE altd ioe xor (ix) ; 76 DB FD AE 00 altd ioe xor (ix+127) ; 76 DB FD AE 7F altd ioe xor (ix-128) ; 76 DB FD AE 80 altd ioe xor (iy) ; 76 DB DD AE 00 altd ioe xor (iy+127) ; 76 DB DD AE 7F altd ioe xor (iy-128) ; 76 DB DD AE 80 altd ioe xor a, (hl) ; 76 DB AE altd ioe xor a, (ix) ; 76 DB FD AE 00 altd ioe xor a, (ix+127) ; 76 DB FD AE 7F altd ioe xor a, (ix-128) ; 76 DB FD AE 80 altd ioe xor a, (iy) ; 76 DB DD AE 00 altd ioe xor a, (iy+127) ; 76 DB DD AE 7F altd ioe xor a, (iy-128) ; 76 DB DD AE 80 altd ioi adc (hl) ; 76 D3 8E altd ioi adc (ix) ; 76 D3 FD 8E 00 altd ioi adc (ix+127) ; 76 D3 FD 8E 7F altd ioi adc (ix-128) ; 76 D3 FD 8E 80 altd ioi adc (iy) ; 76 D3 DD 8E 00 altd ioi adc (iy+127) ; 76 D3 DD 8E 7F altd ioi adc (iy-128) ; 76 D3 DD 8E 80 altd ioi adc a, (hl) ; 76 D3 8E altd ioi adc a, (ix) ; 76 D3 FD 8E 00 altd ioi adc a, (ix+127) ; 76 D3 FD 8E 7F altd ioi adc a, (ix-128) ; 76 D3 FD 8E 80 altd ioi adc a, (iy) ; 76 D3 DD 8E 00 altd ioi adc a, (iy+127) ; 76 D3 DD 8E 7F altd ioi adc a, (iy-128) ; 76 D3 DD 8E 80 altd ioi add (hl) ; 76 D3 86 altd ioi add (ix) ; 76 D3 FD 86 00 altd ioi add (ix+127) ; 76 D3 FD 86 7F altd ioi add (ix-128) ; 76 D3 FD 86 80 altd ioi add (iy) ; 76 D3 DD 86 00 altd ioi add (iy+127) ; 76 D3 DD 86 7F altd ioi add (iy-128) ; 76 D3 DD 86 80 altd ioi add a, (hl) ; 76 D3 86 altd ioi add a, (ix) ; 76 D3 FD 86 00 altd ioi add a, (ix+127) ; 76 D3 FD 86 7F altd ioi add a, (ix-128) ; 76 D3 FD 86 80 altd ioi add a, (iy) ; 76 D3 DD 86 00 altd ioi add a, (iy+127) ; 76 D3 DD 86 7F altd ioi add a, (iy-128) ; 76 D3 DD 86 80 altd ioi and (hl) ; 76 D3 A6 altd ioi and (ix) ; 76 D3 FD A6 00 altd ioi and (ix+127) ; 76 D3 FD A6 7F altd ioi and (ix-128) ; 76 D3 FD A6 80 altd ioi and (iy) ; 76 D3 DD A6 00 altd ioi and (iy+127) ; 76 D3 DD A6 7F altd ioi and (iy-128) ; 76 D3 DD A6 80 altd ioi and a, (hl) ; 76 D3 A6 altd ioi and a, (ix) ; 76 D3 FD A6 00 altd ioi and a, (ix+127) ; 76 D3 FD A6 7F altd ioi and a, (ix-128) ; 76 D3 FD A6 80 altd ioi and a, (iy) ; 76 D3 DD A6 00 altd ioi and a, (iy+127) ; 76 D3 DD A6 7F altd ioi and a, (iy-128) ; 76 D3 DD A6 80 altd ioi bit 0, (hl) ; 76 D3 CB 46 altd ioi bit 0, (ix) ; 76 D3 FD CB 00 46 altd ioi bit 0, (ix+127) ; 76 D3 FD CB 7F 46 altd ioi bit 0, (ix-128) ; 76 D3 FD CB 80 46 altd ioi bit 0, (iy) ; 76 D3 DD CB 00 46 altd ioi bit 0, (iy+127) ; 76 D3 DD CB 7F 46 altd ioi bit 0, (iy-128) ; 76 D3 DD CB 80 46 altd ioi bit 1, (hl) ; 76 D3 CB 4E altd ioi bit 1, (ix) ; 76 D3 FD CB 00 4E altd ioi bit 1, (ix+127) ; 76 D3 FD CB 7F 4E altd ioi bit 1, (ix-128) ; 76 D3 FD CB 80 4E altd ioi bit 1, (iy) ; 76 D3 DD CB 00 4E altd ioi bit 1, (iy+127) ; 76 D3 DD CB 7F 4E altd ioi bit 1, (iy-128) ; 76 D3 DD CB 80 4E altd ioi bit 2, (hl) ; 76 D3 CB 56 altd ioi bit 2, (ix) ; 76 D3 FD CB 00 56 altd ioi bit 2, (ix+127) ; 76 D3 FD CB 7F 56 altd ioi bit 2, (ix-128) ; 76 D3 FD CB 80 56 altd ioi bit 2, (iy) ; 76 D3 DD CB 00 56 altd ioi bit 2, (iy+127) ; 76 D3 DD CB 7F 56 altd ioi bit 2, (iy-128) ; 76 D3 DD CB 80 56 altd ioi bit 3, (hl) ; 76 D3 CB 5E altd ioi bit 3, (ix) ; 76 D3 FD CB 00 5E altd ioi bit 3, (ix+127) ; 76 D3 FD CB 7F 5E altd ioi bit 3, (ix-128) ; 76 D3 FD CB 80 5E altd ioi bit 3, (iy) ; 76 D3 DD CB 00 5E altd ioi bit 3, (iy+127) ; 76 D3 DD CB 7F 5E altd ioi bit 3, (iy-128) ; 76 D3 DD CB 80 5E altd ioi bit 4, (hl) ; 76 D3 CB 66 altd ioi bit 4, (ix) ; 76 D3 FD CB 00 66 altd ioi bit 4, (ix+127) ; 76 D3 FD CB 7F 66 altd ioi bit 4, (ix-128) ; 76 D3 FD CB 80 66 altd ioi bit 4, (iy) ; 76 D3 DD CB 00 66 altd ioi bit 4, (iy+127) ; 76 D3 DD CB 7F 66 altd ioi bit 4, (iy-128) ; 76 D3 DD CB 80 66 altd ioi bit 5, (hl) ; 76 D3 CB 6E altd ioi bit 5, (ix) ; 76 D3 FD CB 00 6E altd ioi bit 5, (ix+127) ; 76 D3 FD CB 7F 6E altd ioi bit 5, (ix-128) ; 76 D3 FD CB 80 6E altd ioi bit 5, (iy) ; 76 D3 DD CB 00 6E altd ioi bit 5, (iy+127) ; 76 D3 DD CB 7F 6E altd ioi bit 5, (iy-128) ; 76 D3 DD CB 80 6E altd ioi bit 6, (hl) ; 76 D3 CB 76 altd ioi bit 6, (ix) ; 76 D3 FD CB 00 76 altd ioi bit 6, (ix+127) ; 76 D3 FD CB 7F 76 altd ioi bit 6, (ix-128) ; 76 D3 FD CB 80 76 altd ioi bit 6, (iy) ; 76 D3 DD CB 00 76 altd ioi bit 6, (iy+127) ; 76 D3 DD CB 7F 76 altd ioi bit 6, (iy-128) ; 76 D3 DD CB 80 76 altd ioi bit 7, (hl) ; 76 D3 CB 7E altd ioi bit 7, (ix) ; 76 D3 FD CB 00 7E altd ioi bit 7, (ix+127) ; 76 D3 FD CB 7F 7E altd ioi bit 7, (ix-128) ; 76 D3 FD CB 80 7E altd ioi bit 7, (iy) ; 76 D3 DD CB 00 7E altd ioi bit 7, (iy+127) ; 76 D3 DD CB 7F 7E altd ioi bit 7, (iy-128) ; 76 D3 DD CB 80 7E altd ioi cp (hl) ; 76 D3 BE altd ioi cp (ix) ; 76 D3 FD BE 00 altd ioi cp (ix+127) ; 76 D3 FD BE 7F altd ioi cp (ix-128) ; 76 D3 FD BE 80 altd ioi cp (iy) ; 76 D3 DD BE 00 altd ioi cp (iy+127) ; 76 D3 DD BE 7F altd ioi cp (iy-128) ; 76 D3 DD BE 80 altd ioi cp a, (hl) ; 76 D3 BE altd ioi cp a, (ix) ; 76 D3 FD BE 00 altd ioi cp a, (ix+127) ; 76 D3 FD BE 7F altd ioi cp a, (ix-128) ; 76 D3 FD BE 80 altd ioi cp a, (iy) ; 76 D3 DD BE 00 altd ioi cp a, (iy+127) ; 76 D3 DD BE 7F altd ioi cp a, (iy-128) ; 76 D3 DD BE 80 altd ioi dec (hl) ; 76 D3 35 altd ioi dec (ix) ; 76 D3 FD 35 00 altd ioi dec (ix+127) ; 76 D3 FD 35 7F altd ioi dec (ix-128) ; 76 D3 FD 35 80 altd ioi dec (iy) ; 76 D3 DD 35 00 altd ioi dec (iy+127) ; 76 D3 DD 35 7F altd ioi dec (iy-128) ; 76 D3 DD 35 80 altd ioi inc (hl) ; 76 D3 34 altd ioi inc (ix) ; 76 D3 FD 34 00 altd ioi inc (ix+127) ; 76 D3 FD 34 7F altd ioi inc (ix-128) ; 76 D3 FD 34 80 altd ioi inc (iy) ; 76 D3 DD 34 00 altd ioi inc (iy+127) ; 76 D3 DD 34 7F altd ioi inc (iy-128) ; 76 D3 DD 34 80 altd ioi ld a, (-32768) ; 76 D3 3A 00 80 altd ioi ld a, (32767) ; 76 D3 3A FF 7F altd ioi ld a, (65535) ; 76 D3 3A FF FF altd ioi ld a, (bc) ; 76 D3 0A altd ioi ld a, (bc+) ; 76 D3 0A 03 altd ioi ld a, (bc-) ; 76 D3 0A 0B altd ioi ld a, (de) ; 76 D3 1A altd ioi ld a, (de+) ; 76 D3 1A 13 altd ioi ld a, (de-) ; 76 D3 1A 1B altd ioi ld a, (hl) ; 76 D3 7E altd ioi ld a, (hl+) ; 76 D3 7E 23 altd ioi ld a, (hl-) ; 76 D3 7E 2B altd ioi ld a, (hld) ; 76 D3 7E 2B altd ioi ld a, (hli) ; 76 D3 7E 23 altd ioi ld a, (ix) ; 76 D3 FD 7E 00 altd ioi ld a, (ix+127) ; 76 D3 FD 7E 7F altd ioi ld a, (ix-128) ; 76 D3 FD 7E 80 altd ioi ld a, (iy) ; 76 D3 DD 7E 00 altd ioi ld a, (iy+127) ; 76 D3 DD 7E 7F altd ioi ld a, (iy-128) ; 76 D3 DD 7E 80 altd ioi ld b, (hl) ; 76 D3 46 altd ioi ld b, (ix) ; 76 D3 FD 46 00 altd ioi ld b, (ix+127) ; 76 D3 FD 46 7F altd ioi ld b, (ix-128) ; 76 D3 FD 46 80 altd ioi ld b, (iy) ; 76 D3 DD 46 00 altd ioi ld b, (iy+127) ; 76 D3 DD 46 7F altd ioi ld b, (iy-128) ; 76 D3 DD 46 80 altd ioi ld bc, (-32768) ; 76 D3 ED 4B 00 80 altd ioi ld bc, (32767) ; 76 D3 ED 4B FF 7F altd ioi ld bc, (65535) ; 76 D3 ED 4B FF FF altd ioi ld c, (hl) ; 76 D3 4E altd ioi ld c, (ix) ; 76 D3 FD 4E 00 altd ioi ld c, (ix+127) ; 76 D3 FD 4E 7F altd ioi ld c, (ix-128) ; 76 D3 FD 4E 80 altd ioi ld c, (iy) ; 76 D3 DD 4E 00 altd ioi ld c, (iy+127) ; 76 D3 DD 4E 7F altd ioi ld c, (iy-128) ; 76 D3 DD 4E 80 altd ioi ld d, (hl) ; 76 D3 56 altd ioi ld d, (ix) ; 76 D3 FD 56 00 altd ioi ld d, (ix+127) ; 76 D3 FD 56 7F altd ioi ld d, (ix-128) ; 76 D3 FD 56 80 altd ioi ld d, (iy) ; 76 D3 DD 56 00 altd ioi ld d, (iy+127) ; 76 D3 DD 56 7F altd ioi ld d, (iy-128) ; 76 D3 DD 56 80 altd ioi ld de, (-32768) ; 76 D3 ED 5B 00 80 altd ioi ld de, (32767) ; 76 D3 ED 5B FF 7F altd ioi ld de, (65535) ; 76 D3 ED 5B FF FF altd ioi ld e, (hl) ; 76 D3 5E altd ioi ld e, (ix) ; 76 D3 FD 5E 00 altd ioi ld e, (ix+127) ; 76 D3 FD 5E 7F altd ioi ld e, (ix-128) ; 76 D3 FD 5E 80 altd ioi ld e, (iy) ; 76 D3 DD 5E 00 altd ioi ld e, (iy+127) ; 76 D3 DD 5E 7F altd ioi ld e, (iy-128) ; 76 D3 DD 5E 80 altd ioi ld h, (hl) ; 76 D3 66 altd ioi ld h, (ix) ; 76 D3 FD 66 00 altd ioi ld h, (ix+127) ; 76 D3 FD 66 7F altd ioi ld h, (ix-128) ; 76 D3 FD 66 80 altd ioi ld h, (iy) ; 76 D3 DD 66 00 altd ioi ld h, (iy+127) ; 76 D3 DD 66 7F altd ioi ld h, (iy-128) ; 76 D3 DD 66 80 altd ioi ld hl, (-32768) ; 76 D3 2A 00 80 altd ioi ld hl, (32767) ; 76 D3 2A FF 7F altd ioi ld hl, (65535) ; 76 D3 2A FF FF altd ioi ld hl, (hl) ; 76 D3 DD E4 00 altd ioi ld hl, (hl+127) ; 76 D3 DD E4 7F altd ioi ld hl, (hl-128) ; 76 D3 DD E4 80 altd ioi ld hl, (ix) ; 76 D3 FD E4 00 altd ioi ld hl, (ix+127) ; 76 D3 FD E4 7F altd ioi ld hl, (ix-128) ; 76 D3 FD E4 80 altd ioi ld hl, (iy) ; 76 D3 E4 00 altd ioi ld hl, (iy+127) ; 76 D3 E4 7F altd ioi ld hl, (iy-128) ; 76 D3 E4 80 altd ioi ld l, (hl) ; 76 D3 6E altd ioi ld l, (ix) ; 76 D3 FD 6E 00 altd ioi ld l, (ix+127) ; 76 D3 FD 6E 7F altd ioi ld l, (ix-128) ; 76 D3 FD 6E 80 altd ioi ld l, (iy) ; 76 D3 DD 6E 00 altd ioi ld l, (iy+127) ; 76 D3 DD 6E 7F altd ioi ld l, (iy-128) ; 76 D3 DD 6E 80 altd ioi or (hl) ; 76 D3 B6 altd ioi or (ix) ; 76 D3 FD B6 00 altd ioi or (ix+127) ; 76 D3 FD B6 7F altd ioi or (ix-128) ; 76 D3 FD B6 80 altd ioi or (iy) ; 76 D3 DD B6 00 altd ioi or (iy+127) ; 76 D3 DD B6 7F altd ioi or (iy-128) ; 76 D3 DD B6 80 altd ioi or a, (hl) ; 76 D3 B6 altd ioi or a, (ix) ; 76 D3 FD B6 00 altd ioi or a, (ix+127) ; 76 D3 FD B6 7F altd ioi or a, (ix-128) ; 76 D3 FD B6 80 altd ioi or a, (iy) ; 76 D3 DD B6 00 altd ioi or a, (iy+127) ; 76 D3 DD B6 7F altd ioi or a, (iy-128) ; 76 D3 DD B6 80 altd ioi rl (hl) ; 76 D3 CB 16 altd ioi rl (ix) ; 76 D3 FD CB 00 16 altd ioi rl (ix+127) ; 76 D3 FD CB 7F 16 altd ioi rl (ix-128) ; 76 D3 FD CB 80 16 altd ioi rl (iy) ; 76 D3 DD CB 00 16 altd ioi rl (iy+127) ; 76 D3 DD CB 7F 16 altd ioi rl (iy-128) ; 76 D3 DD CB 80 16 altd ioi rlc (hl) ; 76 D3 CB 06 altd ioi rlc (ix) ; 76 D3 FD CB 00 06 altd ioi rlc (ix+127) ; 76 D3 FD CB 7F 06 altd ioi rlc (ix-128) ; 76 D3 FD CB 80 06 altd ioi rlc (iy) ; 76 D3 DD CB 00 06 altd ioi rlc (iy+127) ; 76 D3 DD CB 7F 06 altd ioi rlc (iy-128) ; 76 D3 DD CB 80 06 altd ioi rr (hl) ; 76 D3 CB 1E altd ioi rr (ix) ; 76 D3 FD CB 00 1E altd ioi rr (ix+127) ; 76 D3 FD CB 7F 1E altd ioi rr (ix-128) ; 76 D3 FD CB 80 1E altd ioi rr (iy) ; 76 D3 DD CB 00 1E altd ioi rr (iy+127) ; 76 D3 DD CB 7F 1E altd ioi rr (iy-128) ; 76 D3 DD CB 80 1E altd ioi rrc (hl) ; 76 D3 CB 0E altd ioi rrc (ix) ; 76 D3 FD CB 00 0E altd ioi rrc (ix+127) ; 76 D3 FD CB 7F 0E altd ioi rrc (ix-128) ; 76 D3 FD CB 80 0E altd ioi rrc (iy) ; 76 D3 DD CB 00 0E altd ioi rrc (iy+127) ; 76 D3 DD CB 7F 0E altd ioi rrc (iy-128) ; 76 D3 DD CB 80 0E altd ioi sbc (hl) ; 76 D3 9E altd ioi sbc (ix) ; 76 D3 FD 9E 00 altd ioi sbc (ix+127) ; 76 D3 FD 9E 7F altd ioi sbc (ix-128) ; 76 D3 FD 9E 80 altd ioi sbc (iy) ; 76 D3 DD 9E 00 altd ioi sbc (iy+127) ; 76 D3 DD 9E 7F altd ioi sbc (iy-128) ; 76 D3 DD 9E 80 altd ioi sbc a, (hl) ; 76 D3 9E altd ioi sbc a, (ix) ; 76 D3 FD 9E 00 altd ioi sbc a, (ix+127) ; 76 D3 FD 9E 7F altd ioi sbc a, (ix-128) ; 76 D3 FD 9E 80 altd ioi sbc a, (iy) ; 76 D3 DD 9E 00 altd ioi sbc a, (iy+127) ; 76 D3 DD 9E 7F altd ioi sbc a, (iy-128) ; 76 D3 DD 9E 80 altd ioi sla (hl) ; 76 D3 CB 26 altd ioi sla (ix) ; 76 D3 FD CB 00 26 altd ioi sla (ix+127) ; 76 D3 FD CB 7F 26 altd ioi sla (ix-128) ; 76 D3 FD CB 80 26 altd ioi sla (iy) ; 76 D3 DD CB 00 26 altd ioi sla (iy+127) ; 76 D3 DD CB 7F 26 altd ioi sla (iy-128) ; 76 D3 DD CB 80 26 altd ioi sra (hl) ; 76 D3 CB 2E altd ioi sra (ix) ; 76 D3 FD CB 00 2E altd ioi sra (ix+127) ; 76 D3 FD CB 7F 2E altd ioi sra (ix-128) ; 76 D3 FD CB 80 2E altd ioi sra (iy) ; 76 D3 DD CB 00 2E altd ioi sra (iy+127) ; 76 D3 DD CB 7F 2E altd ioi sra (iy-128) ; 76 D3 DD CB 80 2E altd ioi srl (hl) ; 76 D3 CB 3E altd ioi srl (ix) ; 76 D3 FD CB 00 3E altd ioi srl (ix+127) ; 76 D3 FD CB 7F 3E altd ioi srl (ix-128) ; 76 D3 FD CB 80 3E altd ioi srl (iy) ; 76 D3 DD CB 00 3E altd ioi srl (iy+127) ; 76 D3 DD CB 7F 3E altd ioi srl (iy-128) ; 76 D3 DD CB 80 3E altd ioi sub (hl) ; 76 D3 96 altd ioi sub (ix) ; 76 D3 FD 96 00 altd ioi sub (ix+127) ; 76 D3 FD 96 7F altd ioi sub (ix-128) ; 76 D3 FD 96 80 altd ioi sub (iy) ; 76 D3 DD 96 00 altd ioi sub (iy+127) ; 76 D3 DD 96 7F altd ioi sub (iy-128) ; 76 D3 DD 96 80 altd ioi sub a, (hl) ; 76 D3 96 altd ioi sub a, (ix) ; 76 D3 FD 96 00 altd ioi sub a, (ix+127) ; 76 D3 FD 96 7F altd ioi sub a, (ix-128) ; 76 D3 FD 96 80 altd ioi sub a, (iy) ; 76 D3 DD 96 00 altd ioi sub a, (iy+127) ; 76 D3 DD 96 7F altd ioi sub a, (iy-128) ; 76 D3 DD 96 80 altd ioi xor (hl) ; 76 D3 AE altd ioi xor (ix) ; 76 D3 FD AE 00 altd ioi xor (ix+127) ; 76 D3 FD AE 7F altd ioi xor (ix-128) ; 76 D3 FD AE 80 altd ioi xor (iy) ; 76 D3 DD AE 00 altd ioi xor (iy+127) ; 76 D3 DD AE 7F altd ioi xor (iy-128) ; 76 D3 DD AE 80 altd ioi xor a, (hl) ; 76 D3 AE altd ioi xor a, (ix) ; 76 D3 FD AE 00 altd ioi xor a, (ix+127) ; 76 D3 FD AE 7F altd ioi xor a, (ix-128) ; 76 D3 FD AE 80 altd ioi xor a, (iy) ; 76 D3 DD AE 00 altd ioi xor a, (iy+127) ; 76 D3 DD AE 7F altd ioi xor a, (iy-128) ; 76 D3 DD AE 80 altd ld a, (-32768) ; 76 3A 00 80 altd ld a, (32767) ; 76 3A FF 7F altd ld a, (65535) ; 76 3A FF FF altd ld a, (bc) ; 76 0A altd ld a, (bc+) ; 76 0A 03 altd ld a, (bc-) ; 76 0A 0B altd ld a, (de) ; 76 1A altd ld a, (de+) ; 76 1A 13 altd ld a, (de-) ; 76 1A 1B altd ld a, (hl) ; 76 7E altd ld a, (hl+) ; 76 7E 23 altd ld a, (hl-) ; 76 7E 2B altd ld a, (hld) ; 76 7E 2B altd ld a, (hli) ; 76 7E 23 altd ld a, (ix) ; 76 FD 7E 00 altd ld a, (ix+127) ; 76 FD 7E 7F altd ld a, (ix-128) ; 76 FD 7E 80 altd ld a, (iy) ; 76 DD 7E 00 altd ld a, (iy+127) ; 76 DD 7E 7F altd ld a, (iy-128) ; 76 DD 7E 80 altd ld a, -128 ; 76 3E 80 altd ld a, 127 ; 76 3E 7F altd ld a, 255 ; 76 3E FF altd ld a, a ; 76 7F altd ld a, b ; 76 78 altd ld a, c ; 76 79 altd ld a, d ; 76 7A altd ld a, e ; 76 7B altd ld a, eir ; 76 ED 57 altd ld a, h ; 76 7C altd ld a, iir ; 76 ED 5F altd ld a, l ; 76 7D altd ld a, xpc ; 76 ED 77 altd ld b, (hl) ; 76 46 altd ld b, (ix) ; 76 FD 46 00 altd ld b, (ix+127) ; 76 FD 46 7F altd ld b, (ix-128) ; 76 FD 46 80 altd ld b, (iy) ; 76 DD 46 00 altd ld b, (iy+127) ; 76 DD 46 7F altd ld b, (iy-128) ; 76 DD 46 80 altd ld b, -128 ; 76 06 80 altd ld b, 127 ; 76 06 7F altd ld b, 255 ; 76 06 FF altd ld b, a ; 76 47 altd ld b, b ; 76 40 altd ld b, c ; 76 41 altd ld b, d ; 76 42 altd ld b, e ; 76 43 altd ld b, h ; 76 44 altd ld b, l ; 76 45 altd ld bc, (-32768) ; 76 ED 4B 00 80 altd ld bc, (32767) ; 76 ED 4B FF 7F altd ld bc, (65535) ; 76 ED 4B FF FF altd ld bc, -32768 ; 76 01 00 80 altd ld bc, 32767 ; 76 01 FF 7F altd ld bc, 65535 ; 76 01 FF FF altd ld bc, bc ; ED 49 altd ld bc, de ; ED 41 altd ld c, (hl) ; 76 4E altd ld c, (ix) ; 76 FD 4E 00 altd ld c, (ix+127) ; 76 FD 4E 7F altd ld c, (ix-128) ; 76 FD 4E 80 altd ld c, (iy) ; 76 DD 4E 00 altd ld c, (iy+127) ; 76 DD 4E 7F altd ld c, (iy-128) ; 76 DD 4E 80 altd ld c, -128 ; 76 0E 80 altd ld c, 127 ; 76 0E 7F altd ld c, 255 ; 76 0E FF altd ld c, a ; 76 4F altd ld c, b ; 76 48 altd ld c, c ; 76 49 altd ld c, d ; 76 4A altd ld c, e ; 76 4B altd ld c, h ; 76 4C altd ld c, l ; 76 4D altd ld d, (hl) ; 76 56 altd ld d, (ix) ; 76 FD 56 00 altd ld d, (ix+127) ; 76 FD 56 7F altd ld d, (ix-128) ; 76 FD 56 80 altd ld d, (iy) ; 76 DD 56 00 altd ld d, (iy+127) ; 76 DD 56 7F altd ld d, (iy-128) ; 76 DD 56 80 altd ld d, -128 ; 76 16 80 altd ld d, 127 ; 76 16 7F altd ld d, 255 ; 76 16 FF altd ld d, a ; 76 57 altd ld d, b ; 76 50 altd ld d, c ; 76 51 altd ld d, d ; 76 52 altd ld d, e ; 76 53 altd ld d, h ; 76 54 altd ld d, l ; 76 55 altd ld de, (-32768) ; 76 ED 5B 00 80 altd ld de, (32767) ; 76 ED 5B FF 7F altd ld de, (65535) ; 76 ED 5B FF FF altd ld de, -32768 ; 76 11 00 80 altd ld de, 32767 ; 76 11 FF 7F altd ld de, 65535 ; 76 11 FF FF altd ld de, bc ; ED 59 altd ld de, de ; ED 51 altd ld e, (hl) ; 76 5E altd ld e, (ix) ; 76 FD 5E 00 altd ld e, (ix+127) ; 76 FD 5E 7F altd ld e, (ix-128) ; 76 FD 5E 80 altd ld e, (iy) ; 76 DD 5E 00 altd ld e, (iy+127) ; 76 DD 5E 7F altd ld e, (iy-128) ; 76 DD 5E 80 altd ld e, -128 ; 76 1E 80 altd ld e, 127 ; 76 1E 7F altd ld e, 255 ; 76 1E FF altd ld e, a ; 76 5F altd ld e, b ; 76 58 altd ld e, c ; 76 59 altd ld e, d ; 76 5A altd ld e, e ; 76 5B altd ld e, h ; 76 5C altd ld e, l ; 76 5D altd ld h, (hl) ; 76 66 altd ld h, (ix) ; 76 FD 66 00 altd ld h, (ix+127) ; 76 FD 66 7F altd ld h, (ix-128) ; 76 FD 66 80 altd ld h, (iy) ; 76 DD 66 00 altd ld h, (iy+127) ; 76 DD 66 7F altd ld h, (iy-128) ; 76 DD 66 80 altd ld h, -128 ; 76 26 80 altd ld h, 127 ; 76 26 7F altd ld h, 255 ; 76 26 FF altd ld h, a ; 76 67 altd ld h, b ; 76 60 altd ld h, c ; 76 61 altd ld h, d ; 76 62 altd ld h, e ; 76 63 altd ld h, h ; 76 64 altd ld h, l ; 76 65 altd ld hl, (-32768) ; 76 2A 00 80 altd ld hl, (32767) ; 76 2A FF 7F altd ld hl, (65535) ; 76 2A FF FF altd ld hl, (hl) ; 76 DD E4 00 altd ld hl, (hl+127) ; 76 DD E4 7F altd ld hl, (hl-128) ; 76 DD E4 80 altd ld hl, (ix) ; 76 FD E4 00 altd ld hl, (ix+127) ; 76 FD E4 7F altd ld hl, (ix-128) ; 76 FD E4 80 altd ld hl, (iy) ; 76 E4 00 altd ld hl, (iy+127) ; 76 E4 7F altd ld hl, (iy-128) ; 76 E4 80 altd ld hl, (sp) ; 76 C4 00 altd ld hl, (sp+0) ; 76 C4 00 altd ld hl, (sp+255) ; 76 C4 FF altd ld hl, -32768 ; 76 21 00 80 altd ld hl, 32767 ; 76 21 FF 7F altd ld hl, 65535 ; 76 21 FF FF altd ld hl, bc ; ED 69 altd ld hl, de ; ED 61 altd ld hl, ix ; 76 FD 7C altd ld hl, iy ; 76 DD 7C altd ld l, (hl) ; 76 6E altd ld l, (ix) ; 76 FD 6E 00 altd ld l, (ix+127) ; 76 FD 6E 7F altd ld l, (ix-128) ; 76 FD 6E 80 altd ld l, (iy) ; 76 DD 6E 00 altd ld l, (iy+127) ; 76 DD 6E 7F altd ld l, (iy-128) ; 76 DD 6E 80 altd ld l, -128 ; 76 2E 80 altd ld l, 127 ; 76 2E 7F altd ld l, 255 ; 76 2E FF altd ld l, a ; 76 6F altd ld l, b ; 76 68 altd ld l, c ; 76 69 altd ld l, d ; 76 6A altd ld l, e ; 76 6B altd ld l, h ; 76 6C altd ld l, l ; 76 6D altd neg ; 76 ED 44 altd neg a ; 76 ED 44 altd or (hl) ; 76 B6 altd or (ix) ; 76 FD B6 00 altd or (ix+127) ; 76 FD B6 7F altd or (ix-128) ; 76 FD B6 80 altd or (iy) ; 76 DD B6 00 altd or (iy+127) ; 76 DD B6 7F altd or (iy-128) ; 76 DD B6 80 altd or -128 ; 76 F6 80 altd or 127 ; 76 F6 7F altd or 255 ; 76 F6 FF altd or a ; 76 B7 altd or a, (hl) ; 76 B6 altd or a, (ix) ; 76 FD B6 00 altd or a, (ix+127) ; 76 FD B6 7F altd or a, (ix-128) ; 76 FD B6 80 altd or a, (iy) ; 76 DD B6 00 altd or a, (iy+127) ; 76 DD B6 7F altd or a, (iy-128) ; 76 DD B6 80 altd or a, -128 ; 76 F6 80 altd or a, 127 ; 76 F6 7F altd or a, 255 ; 76 F6 FF altd or a, a ; 76 B7 altd or a, b ; 76 B0 altd or a, c ; 76 B1 altd or a, d ; 76 B2 altd or a, e ; 76 B3 altd or a, h ; 76 B4 altd or a, l ; 76 B5 altd or b ; 76 B0 altd or c ; 76 B1 altd or d ; 76 B2 altd or e ; 76 B3 altd or h ; 76 B4 altd or hl, de ; 76 EC altd or ix, de ; 76 FD EC altd or iy, de ; 76 DD EC altd or l ; 76 B5 altd pop af ; 76 F1 altd pop b ; 76 C1 altd pop bc ; 76 C1 altd pop d ; 76 D1 altd pop de ; 76 D1 altd pop h ; 76 E1 altd pop hl ; 76 E1 altd res 0, a ; 76 CB 87 altd res 0, b ; 76 CB 80 altd res 0, c ; 76 CB 81 altd res 0, d ; 76 CB 82 altd res 0, e ; 76 CB 83 altd res 0, h ; 76 CB 84 altd res 0, l ; 76 CB 85 altd res 1, a ; 76 CB 8F altd res 1, b ; 76 CB 88 altd res 1, c ; 76 CB 89 altd res 1, d ; 76 CB 8A altd res 1, e ; 76 CB 8B altd res 1, h ; 76 CB 8C altd res 1, l ; 76 CB 8D altd res 2, a ; 76 CB 97 altd res 2, b ; 76 CB 90 altd res 2, c ; 76 CB 91 altd res 2, d ; 76 CB 92 altd res 2, e ; 76 CB 93 altd res 2, h ; 76 CB 94 altd res 2, l ; 76 CB 95 altd res 3, a ; 76 CB 9F altd res 3, b ; 76 CB 98 altd res 3, c ; 76 CB 99 altd res 3, d ; 76 CB 9A altd res 3, e ; 76 CB 9B altd res 3, h ; 76 CB 9C altd res 3, l ; 76 CB 9D altd res 4, a ; 76 CB A7 altd res 4, b ; 76 CB A0 altd res 4, c ; 76 CB A1 altd res 4, d ; 76 CB A2 altd res 4, e ; 76 CB A3 altd res 4, h ; 76 CB A4 altd res 4, l ; 76 CB A5 altd res 5, a ; 76 CB AF altd res 5, b ; 76 CB A8 altd res 5, c ; 76 CB A9 altd res 5, d ; 76 CB AA altd res 5, e ; 76 CB AB altd res 5, h ; 76 CB AC altd res 5, l ; 76 CB AD altd res 6, a ; 76 CB B7 altd res 6, b ; 76 CB B0 altd res 6, c ; 76 CB B1 altd res 6, d ; 76 CB B2 altd res 6, e ; 76 CB B3 altd res 6, h ; 76 CB B4 altd res 6, l ; 76 CB B5 altd res 7, a ; 76 CB BF altd res 7, b ; 76 CB B8 altd res 7, c ; 76 CB B9 altd res 7, d ; 76 CB BA altd res 7, e ; 76 CB BB altd res 7, h ; 76 CB BC altd res 7, l ; 76 CB BD altd rl (hl) ; 76 CB 16 altd rl (ix) ; 76 FD CB 00 16 altd rl (ix+127) ; 76 FD CB 7F 16 altd rl (ix-128) ; 76 FD CB 80 16 altd rl (iy) ; 76 DD CB 00 16 altd rl (iy+127) ; 76 DD CB 7F 16 altd rl (iy-128) ; 76 DD CB 80 16 altd rl a ; 76 CB 17 altd rl b ; 76 CB 10 altd rl c ; 76 CB 11 altd rl d ; 76 CB 12 altd rl de ; 76 F3 altd rl e ; 76 CB 13 altd rl h ; 76 CB 14 altd rl l ; 76 CB 15 altd rla ; 76 17 altd rlc (hl) ; 76 CB 06 altd rlc (ix) ; 76 FD CB 00 06 altd rlc (ix+127) ; 76 FD CB 7F 06 altd rlc (ix-128) ; 76 FD CB 80 06 altd rlc (iy) ; 76 DD CB 00 06 altd rlc (iy+127) ; 76 DD CB 7F 06 altd rlc (iy-128) ; 76 DD CB 80 06 altd rlc a ; 76 CB 07 altd rlc b ; 76 CB 00 altd rlc c ; 76 CB 01 altd rlc d ; 76 CB 02 altd rlc e ; 76 CB 03 altd rlc h ; 76 CB 04 altd rlc l ; 76 CB 05 altd rlca ; 76 07 altd rr (hl) ; 76 CB 1E altd rr (ix) ; 76 FD CB 00 1E altd rr (ix+127) ; 76 FD CB 7F 1E altd rr (ix-128) ; 76 FD CB 80 1E altd rr (iy) ; 76 DD CB 00 1E altd rr (iy+127) ; 76 DD CB 7F 1E altd rr (iy-128) ; 76 DD CB 80 1E altd rr a ; 76 CB 1F altd rr b ; 76 CB 18 altd rr c ; 76 CB 19 altd rr d ; 76 CB 1A altd rr de ; 76 FB altd rr e ; 76 CB 1B altd rr h ; 76 CB 1C altd rr hl ; 76 FC altd rr ix ; 76 FD FC altd rr iy ; 76 DD FC altd rr l ; 76 CB 1D altd rra ; 76 1F altd rrc (hl) ; 76 CB 0E altd rrc (ix) ; 76 FD CB 00 0E altd rrc (ix+127) ; 76 FD CB 7F 0E altd rrc (ix-128) ; 76 FD CB 80 0E altd rrc (iy) ; 76 DD CB 00 0E altd rrc (iy+127) ; 76 DD CB 7F 0E altd rrc (iy-128) ; 76 DD CB 80 0E altd rrc a ; 76 CB 0F altd rrc b ; 76 CB 08 altd rrc c ; 76 CB 09 altd rrc d ; 76 CB 0A altd rrc e ; 76 CB 0B altd rrc h ; 76 CB 0C altd rrc l ; 76 CB 0D altd rrca ; 76 0F altd sbc (hl) ; 76 9E altd sbc (ix) ; 76 FD 9E 00 altd sbc (ix+127) ; 76 FD 9E 7F altd sbc (ix-128) ; 76 FD 9E 80 altd sbc (iy) ; 76 DD 9E 00 altd sbc (iy+127) ; 76 DD 9E 7F altd sbc (iy-128) ; 76 DD 9E 80 altd sbc -128 ; 76 DE 80 altd sbc 127 ; 76 DE 7F altd sbc 255 ; 76 DE FF altd sbc a ; 76 9F altd sbc a, (hl) ; 76 9E altd sbc a, (ix) ; 76 FD 9E 00 altd sbc a, (ix+127) ; 76 FD 9E 7F altd sbc a, (ix-128) ; 76 FD 9E 80 altd sbc a, (iy) ; 76 DD 9E 00 altd sbc a, (iy+127) ; 76 DD 9E 7F altd sbc a, (iy-128) ; 76 DD 9E 80 altd sbc a, -128 ; 76 DE 80 altd sbc a, 127 ; 76 DE 7F altd sbc a, 255 ; 76 DE FF altd sbc a, a ; 76 9F altd sbc a, b ; 76 98 altd sbc a, c ; 76 99 altd sbc a, d ; 76 9A altd sbc a, e ; 76 9B altd sbc a, h ; 76 9C altd sbc a, l ; 76 9D altd sbc b ; 76 98 altd sbc c ; 76 99 altd sbc d ; 76 9A altd sbc e ; 76 9B altd sbc h ; 76 9C altd sbc hl, bc ; 76 ED 42 altd sbc hl, de ; 76 ED 52 altd sbc hl, hl ; 76 ED 62 altd sbc hl, sp ; 76 ED 72 altd sbc l ; 76 9D altd scf ; 76 37 altd set 0, a ; 76 CB C7 altd set 0, b ; 76 CB C0 altd set 0, c ; 76 CB C1 altd set 0, d ; 76 CB C2 altd set 0, e ; 76 CB C3 altd set 0, h ; 76 CB C4 altd set 0, l ; 76 CB C5 altd set 1, a ; 76 CB CF altd set 1, b ; 76 CB C8 altd set 1, c ; 76 CB C9 altd set 1, d ; 76 CB CA altd set 1, e ; 76 CB CB altd set 1, h ; 76 CB CC altd set 1, l ; 76 CB CD altd set 2, a ; 76 CB D7 altd set 2, b ; 76 CB D0 altd set 2, c ; 76 CB D1 altd set 2, d ; 76 CB D2 altd set 2, e ; 76 CB D3 altd set 2, h ; 76 CB D4 altd set 2, l ; 76 CB D5 altd set 3, a ; 76 CB DF altd set 3, b ; 76 CB D8 altd set 3, c ; 76 CB D9 altd set 3, d ; 76 CB DA altd set 3, e ; 76 CB DB altd set 3, h ; 76 CB DC altd set 3, l ; 76 CB DD altd set 4, a ; 76 CB E7 altd set 4, b ; 76 CB E0 altd set 4, c ; 76 CB E1 altd set 4, d ; 76 CB E2 altd set 4, e ; 76 CB E3 altd set 4, h ; 76 CB E4 altd set 4, l ; 76 CB E5 altd set 5, a ; 76 CB EF altd set 5, b ; 76 CB E8 altd set 5, c ; 76 CB E9 altd set 5, d ; 76 CB EA altd set 5, e ; 76 CB EB altd set 5, h ; 76 CB EC altd set 5, l ; 76 CB ED altd set 6, a ; 76 CB F7 altd set 6, b ; 76 CB F0 altd set 6, c ; 76 CB F1 altd set 6, d ; 76 CB F2 altd set 6, e ; 76 CB F3 altd set 6, h ; 76 CB F4 altd set 6, l ; 76 CB F5 altd set 7, a ; 76 CB FF altd set 7, b ; 76 CB F8 altd set 7, c ; 76 CB F9 altd set 7, d ; 76 CB FA altd set 7, e ; 76 CB FB altd set 7, h ; 76 CB FC altd set 7, l ; 76 CB FD altd sla (hl) ; 76 CB 26 altd sla (ix) ; 76 FD CB 00 26 altd sla (ix+127) ; 76 FD CB 7F 26 altd sla (ix-128) ; 76 FD CB 80 26 altd sla (iy) ; 76 DD CB 00 26 altd sla (iy+127) ; 76 DD CB 7F 26 altd sla (iy-128) ; 76 DD CB 80 26 altd sla a ; 76 CB 27 altd sla b ; 76 CB 20 altd sla c ; 76 CB 21 altd sla d ; 76 CB 22 altd sla e ; 76 CB 23 altd sla h ; 76 CB 24 altd sla l ; 76 CB 25 altd sra (hl) ; 76 CB 2E altd sra (ix) ; 76 FD CB 00 2E altd sra (ix+127) ; 76 FD CB 7F 2E altd sra (ix-128) ; 76 FD CB 80 2E altd sra (iy) ; 76 DD CB 00 2E altd sra (iy+127) ; 76 DD CB 7F 2E altd sra (iy-128) ; 76 DD CB 80 2E altd sra a ; 76 CB 2F altd sra b ; 76 CB 28 altd sra c ; 76 CB 29 altd sra d ; 76 CB 2A altd sra e ; 76 CB 2B altd sra h ; 76 CB 2C altd sra l ; 76 CB 2D altd srl (hl) ; 76 CB 3E altd srl (ix) ; 76 FD CB 00 3E altd srl (ix+127) ; 76 FD CB 7F 3E altd srl (ix-128) ; 76 FD CB 80 3E altd srl (iy) ; 76 DD CB 00 3E altd srl (iy+127) ; 76 DD CB 7F 3E altd srl (iy-128) ; 76 DD CB 80 3E altd srl a ; 76 CB 3F altd srl b ; 76 CB 38 altd srl c ; 76 CB 39 altd srl d ; 76 CB 3A altd srl e ; 76 CB 3B altd srl h ; 76 CB 3C altd srl l ; 76 CB 3D altd sub (hl) ; 76 96 altd sub (ix) ; 76 FD 96 00 altd sub (ix+127) ; 76 FD 96 7F altd sub (ix-128) ; 76 FD 96 80 altd sub (iy) ; 76 DD 96 00 altd sub (iy+127) ; 76 DD 96 7F altd sub (iy-128) ; 76 DD 96 80 altd sub -128 ; 76 D6 80 altd sub 127 ; 76 D6 7F altd sub 255 ; 76 D6 FF altd sub a ; 76 97 altd sub a, (hl) ; 76 96 altd sub a, (ix) ; 76 FD 96 00 altd sub a, (ix+127) ; 76 FD 96 7F altd sub a, (ix-128) ; 76 FD 96 80 altd sub a, (iy) ; 76 DD 96 00 altd sub a, (iy+127) ; 76 DD 96 7F altd sub a, (iy-128) ; 76 DD 96 80 altd sub a, -128 ; 76 D6 80 altd sub a, 127 ; 76 D6 7F altd sub a, 255 ; 76 D6 FF altd sub a, a ; 76 97 altd sub a, b ; 76 90 altd sub a, c ; 76 91 altd sub a, d ; 76 92 altd sub a, e ; 76 93 altd sub a, h ; 76 94 altd sub a, l ; 76 95 altd sub b ; 76 90 altd sub c ; 76 91 altd sub d ; 76 92 altd sub e ; 76 93 altd sub h ; 76 94 altd sub l ; 76 95 altd sub m ; 76 96 altd xor (hl) ; 76 AE altd xor (ix) ; 76 FD AE 00 altd xor (ix+127) ; 76 FD AE 7F altd xor (ix-128) ; 76 FD AE 80 altd xor (iy) ; 76 DD AE 00 altd xor (iy+127) ; 76 DD AE 7F altd xor (iy-128) ; 76 DD AE 80 altd xor -128 ; 76 EE 80 altd xor 127 ; 76 EE 7F altd xor 255 ; 76 EE FF altd xor a ; 76 AF altd xor a, (hl) ; 76 AE altd xor a, (ix) ; 76 FD AE 00 altd xor a, (ix+127) ; 76 FD AE 7F altd xor a, (ix-128) ; 76 FD AE 80 altd xor a, (iy) ; 76 DD AE 00 altd xor a, (iy+127) ; 76 DD AE 7F altd xor a, (iy-128) ; 76 DD AE 80 altd xor a, -128 ; 76 EE 80 altd xor a, 127 ; 76 EE 7F altd xor a, 255 ; 76 EE FF altd xor a, a ; 76 AF altd xor a, b ; 76 A8 altd xor a, c ; 76 A9 altd xor a, d ; 76 AA altd xor a, e ; 76 AB altd xor a, h ; 76 AC altd xor a, l ; 76 AD altd xor b ; 76 A8 altd xor c ; 76 A9 altd xor d ; 76 AA altd xor e ; 76 AB altd xor h ; 76 AC altd xor l ; 76 AD ana a ; A7 ana b ; A0 ana c ; A1 ana d ; A2 ana e ; A3 ana h ; A4 ana l ; A5 ana m ; A6 and (hl) ; A6 and (ix) ; FD A6 00 and (ix+127) ; FD A6 7F and (ix-128) ; FD A6 80 and (iy) ; DD A6 00 and (iy+127) ; DD A6 7F and (iy-128) ; DD A6 80 and -128 ; E6 80 and 127 ; E6 7F and 255 ; E6 FF and a ; A7 and a', (hl) ; 76 A6 and a', (ix) ; 76 FD A6 00 and a', (ix+127) ; 76 FD A6 7F and a', (ix-128) ; 76 FD A6 80 and a', (iy) ; 76 DD A6 00 and a', (iy+127) ; 76 DD A6 7F and a', (iy-128) ; 76 DD A6 80 and a', -128 ; 76 E6 80 and a', 127 ; 76 E6 7F and a', 255 ; 76 E6 FF and a', a ; 76 A7 and a', b ; 76 A0 and a', c ; 76 A1 and a', d ; 76 A2 and a', e ; 76 A3 and a', h ; 76 A4 and a', l ; 76 A5 and a, (hl) ; A6 and a, (ix) ; FD A6 00 and a, (ix+127) ; FD A6 7F and a, (ix-128) ; FD A6 80 and a, (iy) ; DD A6 00 and a, (iy+127) ; DD A6 7F and a, (iy-128) ; DD A6 80 and a, -128 ; E6 80 and a, 127 ; E6 7F and a, 255 ; E6 FF and a, a ; A7 and a, b ; A0 and a, c ; A1 and a, d ; A2 and a, e ; A3 and a, h ; A4 and a, l ; A5 and b ; A0 and c ; A1 and d ; A2 and e ; A3 and h ; A4 and hl', de ; 76 DC and hl, de ; DC and ix, de ; FD DC and iy, de ; DD DC and l ; A5 and.a hl, bc ; 7C A0 67 7D A1 6F and.a hl, de ; DC and.a ix, de ; FD DC and.a iy, de ; DD DC ani -128 ; E6 80 ani 127 ; E6 7F ani 255 ; E6 FF arhl ; CB 2C CB 1D bit 0, (hl) ; CB 46 bit 0, (ix) ; FD CB 00 46 bit 0, (ix+127) ; FD CB 7F 46 bit 0, (ix-128) ; FD CB 80 46 bit 0, (iy) ; DD CB 00 46 bit 0, (iy+127) ; DD CB 7F 46 bit 0, (iy-128) ; DD CB 80 46 bit 0, a ; CB 47 bit 0, b ; CB 40 bit 0, c ; CB 41 bit 0, d ; CB 42 bit 0, e ; CB 43 bit 0, h ; CB 44 bit 0, l ; CB 45 bit 1, (hl) ; CB 4E bit 1, (ix) ; FD CB 00 4E bit 1, (ix+127) ; FD CB 7F 4E bit 1, (ix-128) ; FD CB 80 4E bit 1, (iy) ; DD CB 00 4E bit 1, (iy+127) ; DD CB 7F 4E bit 1, (iy-128) ; DD CB 80 4E bit 1, a ; CB 4F bit 1, b ; CB 48 bit 1, c ; CB 49 bit 1, d ; CB 4A bit 1, e ; CB 4B bit 1, h ; CB 4C bit 1, l ; CB 4D bit 2, (hl) ; CB 56 bit 2, (ix) ; FD CB 00 56 bit 2, (ix+127) ; FD CB 7F 56 bit 2, (ix-128) ; FD CB 80 56 bit 2, (iy) ; DD CB 00 56 bit 2, (iy+127) ; DD CB 7F 56 bit 2, (iy-128) ; DD CB 80 56 bit 2, a ; CB 57 bit 2, b ; CB 50 bit 2, c ; CB 51 bit 2, d ; CB 52 bit 2, e ; CB 53 bit 2, h ; CB 54 bit 2, l ; CB 55 bit 3, (hl) ; CB 5E bit 3, (ix) ; FD CB 00 5E bit 3, (ix+127) ; FD CB 7F 5E bit 3, (ix-128) ; FD CB 80 5E bit 3, (iy) ; DD CB 00 5E bit 3, (iy+127) ; DD CB 7F 5E bit 3, (iy-128) ; DD CB 80 5E bit 3, a ; CB 5F bit 3, b ; CB 58 bit 3, c ; CB 59 bit 3, d ; CB 5A bit 3, e ; CB 5B bit 3, h ; CB 5C bit 3, l ; CB 5D bit 4, (hl) ; CB 66 bit 4, (ix) ; FD CB 00 66 bit 4, (ix+127) ; FD CB 7F 66 bit 4, (ix-128) ; FD CB 80 66 bit 4, (iy) ; DD CB 00 66 bit 4, (iy+127) ; DD CB 7F 66 bit 4, (iy-128) ; DD CB 80 66 bit 4, a ; CB 67 bit 4, b ; CB 60 bit 4, c ; CB 61 bit 4, d ; CB 62 bit 4, e ; CB 63 bit 4, h ; CB 64 bit 4, l ; CB 65 bit 5, (hl) ; CB 6E bit 5, (ix) ; FD CB 00 6E bit 5, (ix+127) ; FD CB 7F 6E bit 5, (ix-128) ; FD CB 80 6E bit 5, (iy) ; DD CB 00 6E bit 5, (iy+127) ; DD CB 7F 6E bit 5, (iy-128) ; DD CB 80 6E bit 5, a ; CB 6F bit 5, b ; CB 68 bit 5, c ; CB 69 bit 5, d ; CB 6A bit 5, e ; CB 6B bit 5, h ; CB 6C bit 5, l ; CB 6D bit 6, (hl) ; CB 76 bit 6, (ix) ; FD CB 00 76 bit 6, (ix+127) ; FD CB 7F 76 bit 6, (ix-128) ; FD CB 80 76 bit 6, (iy) ; DD CB 00 76 bit 6, (iy+127) ; DD CB 7F 76 bit 6, (iy-128) ; DD CB 80 76 bit 6, a ; CB 77 bit 6, b ; CB 70 bit 6, c ; CB 71 bit 6, d ; CB 72 bit 6, e ; CB 73 bit 6, h ; CB 74 bit 6, l ; CB 75 bit 7, (hl) ; CB 7E bit 7, (ix) ; FD CB 00 7E bit 7, (ix+127) ; FD CB 7F 7E bit 7, (ix-128) ; FD CB 80 7E bit 7, (iy) ; DD CB 00 7E bit 7, (iy+127) ; DD CB 7F 7E bit 7, (iy-128) ; DD CB 80 7E bit 7, a ; CB 7F bit 7, b ; CB 78 bit 7, c ; CB 79 bit 7, d ; CB 7A bit 7, e ; CB 7B bit 7, h ; CB 7C bit 7, l ; CB 7D bit.a 0, (hl) ; CB 46 bit.a 0, (ix) ; FD CB 00 46 bit.a 0, (ix+127) ; FD CB 7F 46 bit.a 0, (ix-128) ; FD CB 80 46 bit.a 0, (iy) ; DD CB 00 46 bit.a 0, (iy+127) ; DD CB 7F 46 bit.a 0, (iy-128) ; DD CB 80 46 bit.a 0, a ; CB 47 bit.a 0, b ; CB 40 bit.a 0, c ; CB 41 bit.a 0, d ; CB 42 bit.a 0, e ; CB 43 bit.a 0, h ; CB 44 bit.a 0, l ; CB 45 bit.a 1, (hl) ; CB 4E bit.a 1, (ix) ; FD CB 00 4E bit.a 1, (ix+127) ; FD CB 7F 4E bit.a 1, (ix-128) ; FD CB 80 4E bit.a 1, (iy) ; DD CB 00 4E bit.a 1, (iy+127) ; DD CB 7F 4E bit.a 1, (iy-128) ; DD CB 80 4E bit.a 1, a ; CB 4F bit.a 1, b ; CB 48 bit.a 1, c ; CB 49 bit.a 1, d ; CB 4A bit.a 1, e ; CB 4B bit.a 1, h ; CB 4C bit.a 1, l ; CB 4D bit.a 2, (hl) ; CB 56 bit.a 2, (ix) ; FD CB 00 56 bit.a 2, (ix+127) ; FD CB 7F 56 bit.a 2, (ix-128) ; FD CB 80 56 bit.a 2, (iy) ; DD CB 00 56 bit.a 2, (iy+127) ; DD CB 7F 56 bit.a 2, (iy-128) ; DD CB 80 56 bit.a 2, a ; CB 57 bit.a 2, b ; CB 50 bit.a 2, c ; CB 51 bit.a 2, d ; CB 52 bit.a 2, e ; CB 53 bit.a 2, h ; CB 54 bit.a 2, l ; CB 55 bit.a 3, (hl) ; CB 5E bit.a 3, (ix) ; FD CB 00 5E bit.a 3, (ix+127) ; FD CB 7F 5E bit.a 3, (ix-128) ; FD CB 80 5E bit.a 3, (iy) ; DD CB 00 5E bit.a 3, (iy+127) ; DD CB 7F 5E bit.a 3, (iy-128) ; DD CB 80 5E bit.a 3, a ; CB 5F bit.a 3, b ; CB 58 bit.a 3, c ; CB 59 bit.a 3, d ; CB 5A bit.a 3, e ; CB 5B bit.a 3, h ; CB 5C bit.a 3, l ; CB 5D bit.a 4, (hl) ; CB 66 bit.a 4, (ix) ; FD CB 00 66 bit.a 4, (ix+127) ; FD CB 7F 66 bit.a 4, (ix-128) ; FD CB 80 66 bit.a 4, (iy) ; DD CB 00 66 bit.a 4, (iy+127) ; DD CB 7F 66 bit.a 4, (iy-128) ; DD CB 80 66 bit.a 4, a ; CB 67 bit.a 4, b ; CB 60 bit.a 4, c ; CB 61 bit.a 4, d ; CB 62 bit.a 4, e ; CB 63 bit.a 4, h ; CB 64 bit.a 4, l ; CB 65 bit.a 5, (hl) ; CB 6E bit.a 5, (ix) ; FD CB 00 6E bit.a 5, (ix+127) ; FD CB 7F 6E bit.a 5, (ix-128) ; FD CB 80 6E bit.a 5, (iy) ; DD CB 00 6E bit.a 5, (iy+127) ; DD CB 7F 6E bit.a 5, (iy-128) ; DD CB 80 6E bit.a 5, a ; CB 6F bit.a 5, b ; CB 68 bit.a 5, c ; CB 69 bit.a 5, d ; CB 6A bit.a 5, e ; CB 6B bit.a 5, h ; CB 6C bit.a 5, l ; CB 6D bit.a 6, (hl) ; CB 76 bit.a 6, (ix) ; FD CB 00 76 bit.a 6, (ix+127) ; FD CB 7F 76 bit.a 6, (ix-128) ; FD CB 80 76 bit.a 6, (iy) ; DD CB 00 76 bit.a 6, (iy+127) ; DD CB 7F 76 bit.a 6, (iy-128) ; DD CB 80 76 bit.a 6, a ; CB 77 bit.a 6, b ; CB 70 bit.a 6, c ; CB 71 bit.a 6, d ; CB 72 bit.a 6, e ; CB 73 bit.a 6, h ; CB 74 bit.a 6, l ; CB 75 bit.a 7, (hl) ; CB 7E bit.a 7, (ix) ; FD CB 00 7E bit.a 7, (ix+127) ; FD CB 7F 7E bit.a 7, (ix-128) ; FD CB 80 7E bit.a 7, (iy) ; DD CB 00 7E bit.a 7, (iy+127) ; DD CB 7F 7E bit.a 7, (iy-128) ; DD CB 80 7E bit.a 7, a ; CB 7F bit.a 7, b ; CB 78 bit.a 7, c ; CB 79 bit.a 7, d ; CB 7A bit.a 7, e ; CB 7B bit.a 7, h ; CB 7C bit.a 7, l ; CB 7D bool hl ; CC bool hl' ; 76 CC bool ix ; FD CC bool iy ; DD CC call -32768 ; CD 00 80 call 32767 ; CD FF 7F call 65535 ; CD FF FF call c, -32768 ; 30 03 CD 00 80 call c, 32767 ; 30 03 CD FF 7F call c, 65535 ; 30 03 CD FF FF call lo, -32768 ; E2 66 1B CD 00 80 call lo, 32767 ; E2 6C 1B CD FF 7F call lo, 65535 ; E2 72 1B CD FF FF call lz, -32768 ; EA 78 1B CD 00 80 call lz, 32767 ; EA 7E 1B CD FF 7F call lz, 65535 ; EA 84 1B CD FF FF call m, -32768 ; F2 8A 1B CD 00 80 call m, 32767 ; F2 90 1B CD FF 7F call m, 65535 ; F2 96 1B CD FF FF call nc, -32768 ; 38 03 CD 00 80 call nc, 32767 ; 38 03 CD FF 7F call nc, 65535 ; 38 03 CD FF FF call nv, -32768 ; EA AB 1B CD 00 80 call nv, 32767 ; EA B1 1B CD FF 7F call nv, 65535 ; EA B7 1B CD FF FF call nz, -32768 ; 28 03 CD 00 80 call nz, 32767 ; 28 03 CD FF 7F call nz, 65535 ; 28 03 CD FF FF call p, -32768 ; FA CC 1B CD 00 80 call p, 32767 ; FA D2 1B CD FF 7F call p, 65535 ; FA D8 1B CD FF FF call pe, -32768 ; E2 DE 1B CD 00 80 call pe, 32767 ; E2 E4 1B CD FF 7F call pe, 65535 ; E2 EA 1B CD FF FF call po, -32768 ; EA F0 1B CD 00 80 call po, 32767 ; EA F6 1B CD FF 7F call po, 65535 ; EA FC 1B CD FF FF call v, -32768 ; E2 02 1C CD 00 80 call v, 32767 ; E2 08 1C CD FF 7F call v, 65535 ; E2 0E 1C CD FF FF call z, -32768 ; 20 03 CD 00 80 call z, 32767 ; 20 03 CD FF 7F call z, 65535 ; 20 03 CD FF FF cc -32768 ; 30 03 CD 00 80 cc 32767 ; 30 03 CD FF 7F cc 65535 ; 30 03 CD FF FF ccf ; 3F ccf' ; 76 3F clo -32768 ; E2 35 1C CD 00 80 clo 32767 ; E2 3B 1C CD FF 7F clo 65535 ; E2 41 1C CD FF FF clz -32768 ; EA 47 1C CD 00 80 clz 32767 ; EA 4D 1C CD FF 7F clz 65535 ; EA 53 1C CD FF FF cm -32768 ; F2 59 1C CD 00 80 cm 32767 ; F2 5F 1C CD FF 7F cm 65535 ; F2 65 1C CD FF FF cma ; 2F cmc ; 3F cmp (hl) ; BE cmp (ix) ; FD BE 00 cmp (ix+127) ; FD BE 7F cmp (ix-128) ; FD BE 80 cmp (iy) ; DD BE 00 cmp (iy+127) ; DD BE 7F cmp (iy-128) ; DD BE 80 cmp -128 ; FE 80 cmp 127 ; FE 7F cmp 255 ; FE FF cmp a ; BF cmp a, (hl) ; BE cmp a, (ix) ; FD BE 00 cmp a, (ix+127) ; FD BE 7F cmp a, (ix-128) ; FD BE 80 cmp a, (iy) ; DD BE 00 cmp a, (iy+127) ; DD BE 7F cmp a, (iy-128) ; DD BE 80 cmp a, -128 ; FE 80 cmp a, 127 ; FE 7F cmp a, 255 ; FE FF cmp a, a ; BF cmp a, b ; B8 cmp a, c ; B9 cmp a, d ; BA cmp a, e ; BB cmp a, h ; BC cmp a, l ; BD cmp b ; B8 cmp c ; B9 cmp d ; BA cmp e ; BB cmp h ; BC cmp l ; BD cmp m ; BE cnc -32768 ; 38 03 CD 00 80 cnc 32767 ; 38 03 CD FF 7F cnc 65535 ; 38 03 CD FF FF cnv -32768 ; EA BD 1C CD 00 80 cnv 32767 ; EA C3 1C CD FF 7F cnv 65535 ; EA C9 1C CD FF FF cnz -32768 ; 28 03 CD 00 80 cnz 32767 ; 28 03 CD FF 7F cnz 65535 ; 28 03 CD FF FF cp (hl) ; BE cp (ix) ; FD BE 00 cp (ix+127) ; FD BE 7F cp (ix-128) ; FD BE 80 cp (iy) ; DD BE 00 cp (iy+127) ; DD BE 7F cp (iy-128) ; DD BE 80 cp -128 ; FE 80 cp 127 ; FE 7F cp 255 ; FE FF cp a ; BF cp a, (hl) ; BE cp a, (ix) ; FD BE 00 cp a, (ix+127) ; FD BE 7F cp a, (ix-128) ; FD BE 80 cp a, (iy) ; DD BE 00 cp a, (iy+127) ; DD BE 7F cp a, (iy-128) ; DD BE 80 cp a, -128 ; FE 80 cp a, 127 ; FE 7F cp a, 255 ; FE FF cp a, a ; BF cp a, b ; B8 cp a, c ; B9 cp a, d ; BA cp a, e ; BB cp a, h ; BC cp a, l ; BD cp b ; B8 cp c ; B9 cp d ; BA cp e ; BB cp h ; BC cp l ; BD cpd ; CD @__z80asm__cpd cpdr ; CD @__z80asm__cpdr cpe -32768 ; E2 24 1D CD 00 80 cpe 32767 ; E2 2A 1D CD FF 7F cpe 65535 ; E2 30 1D CD FF FF cpi ; CD @__z80asm__cpi cpi -128 ; FE 80 cpi 127 ; FE 7F cpi 255 ; FE FF cpir ; CD @__z80asm__cpir cpl ; 2F cpl a ; 2F cpl a' ; 76 2F cpo -32768 ; EA 46 1D CD 00 80 cpo 32767 ; EA 4C 1D CD FF 7F cpo 65535 ; EA 52 1D CD FF FF cv -32768 ; E2 58 1D CD 00 80 cv 32767 ; E2 5E 1D CD FF 7F cv 65535 ; E2 64 1D CD FF FF cz -32768 ; 20 03 CD 00 80 cz 32767 ; 20 03 CD FF 7F cz 65535 ; 20 03 CD FF FF daa ; CD @__z80asm__daa dad b ; 09 dad bc ; 09 dad d ; 19 dad de ; 19 dad h ; 29 dad hl ; 29 dad sp ; 39 dcr a ; 3D dcr b ; 05 dcr c ; 0D dcr d ; 15 dcr e ; 1D dcr h ; 25 dcr l ; 2D dcr m ; 35 dcx b ; 0B dcx bc ; 0B dcx d ; 1B dcx de ; 1B dcx h ; 2B dcx hl ; 2B dcx sp ; 3B dec (hl) ; 35 dec (ix) ; FD 35 00 dec (ix+127) ; FD 35 7F dec (ix-128) ; FD 35 80 dec (iy) ; DD 35 00 dec (iy+127) ; DD 35 7F dec (iy-128) ; DD 35 80 dec a ; 3D dec a' ; 76 3D dec b ; 05 dec b' ; 76 05 dec bc ; 0B dec bc' ; 76 0B dec c ; 0D dec c' ; 76 0D dec d ; 15 dec d' ; 76 15 dec de ; 1B dec de' ; 76 1B dec e ; 1D dec e' ; 76 1D dec h ; 25 dec h' ; 76 25 dec hl ; 2B dec hl' ; 76 2B dec ix ; FD 2B dec iy ; DD 2B dec l ; 2D dec l' ; 76 2D dec sp ; 3B djnz ASMPC ; 10 FE djnz b', ASMPC ; 76 10 FE djnz b, ASMPC ; 10 FE dsub ; CD @__z80asm__sub_hl_bc ex (sp), hl ; ED 54 ex (sp), hl' ; 76 ED 54 ex (sp), ix ; FD E3 ex (sp), iy ; DD E3 ex af, af ; 08 ex af, af' ; 08 ex de', hl ; E3 ex de', hl' ; 76 E3 ex de, hl ; EB ex de, hl' ; 76 EB exx ; D9 idet ; 5B inc (hl) ; 34 inc (ix) ; FD 34 00 inc (ix+127) ; FD 34 7F inc (ix-128) ; FD 34 80 inc (iy) ; DD 34 00 inc (iy+127) ; DD 34 7F inc (iy-128) ; DD 34 80 inc a ; 3C inc a' ; 76 3C inc b ; 04 inc b' ; 76 04 inc bc ; 03 inc bc' ; 76 03 inc c ; 0C inc c' ; 76 0C inc d ; 14 inc d' ; 76 14 inc de ; 13 inc de' ; 76 13 inc e ; 1C inc e' ; 76 1C inc h ; 24 inc h' ; 76 24 inc hl ; 23 inc hl' ; 76 23 inc ix ; FD 23 inc iy ; DD 23 inc l ; 2C inc l' ; 76 2C inc sp ; 33 inr a ; 3C inr b ; 04 inr c ; 0C inr d ; 14 inr e ; 1C inr h ; 24 inr l ; 2C inr m ; 34 inx b ; 03 inx bc ; 03 inx d ; 13 inx de ; 13 inx h ; 23 inx hl ; 23 inx sp ; 33 ioe adc (hl) ; DB 8E ioe adc (ix) ; DB FD 8E 00 ioe adc (ix+127) ; DB FD 8E 7F ioe adc (ix-128) ; DB FD 8E 80 ioe adc (iy) ; DB DD 8E 00 ioe adc (iy+127) ; DB DD 8E 7F ioe adc (iy-128) ; DB DD 8E 80 ioe adc a', (hl) ; DB 76 8E ioe adc a', (ix) ; DB 76 FD 8E 00 ioe adc a', (ix+127) ; DB 76 FD 8E 7F ioe adc a', (ix-128) ; DB 76 FD 8E 80 ioe adc a', (iy) ; DB 76 DD 8E 00 ioe adc a', (iy+127) ; DB 76 DD 8E 7F ioe adc a', (iy-128) ; DB 76 DD 8E 80 ioe adc a, (hl) ; DB 8E ioe adc a, (ix) ; DB FD 8E 00 ioe adc a, (ix+127) ; DB FD 8E 7F ioe adc a, (ix-128) ; DB FD 8E 80 ioe adc a, (iy) ; DB DD 8E 00 ioe adc a, (iy+127) ; DB DD 8E 7F ioe adc a, (iy-128) ; DB DD 8E 80 ioe add (hl) ; DB 86 ioe add (ix) ; DB FD 86 00 ioe add (ix+127) ; DB FD 86 7F ioe add (ix-128) ; DB FD 86 80 ioe add (iy) ; DB DD 86 00 ioe add (iy+127) ; DB DD 86 7F ioe add (iy-128) ; DB DD 86 80 ioe add a', (hl) ; DB 76 86 ioe add a', (ix) ; DB 76 FD 86 00 ioe add a', (ix+127) ; DB 76 FD 86 7F ioe add a', (ix-128) ; DB 76 FD 86 80 ioe add a', (iy) ; DB 76 DD 86 00 ioe add a', (iy+127) ; DB 76 DD 86 7F ioe add a', (iy-128) ; DB 76 DD 86 80 ioe add a, (hl) ; DB 86 ioe add a, (ix) ; DB FD 86 00 ioe add a, (ix+127) ; DB FD 86 7F ioe add a, (ix-128) ; DB FD 86 80 ioe add a, (iy) ; DB DD 86 00 ioe add a, (iy+127) ; DB DD 86 7F ioe add a, (iy-128) ; DB DD 86 80 ioe altd adc (hl) ; DB 76 8E ioe altd adc (ix) ; DB 76 FD 8E 00 ioe altd adc (ix+127) ; DB 76 FD 8E 7F ioe altd adc (ix-128) ; DB 76 FD 8E 80 ioe altd adc (iy) ; DB 76 DD 8E 00 ioe altd adc (iy+127) ; DB 76 DD 8E 7F ioe altd adc (iy-128) ; DB 76 DD 8E 80 ioe altd adc a, (hl) ; DB 76 8E ioe altd adc a, (ix) ; DB 76 FD 8E 00 ioe altd adc a, (ix+127) ; DB 76 FD 8E 7F ioe altd adc a, (ix-128) ; DB 76 FD 8E 80 ioe altd adc a, (iy) ; DB 76 DD 8E 00 ioe altd adc a, (iy+127) ; DB 76 DD 8E 7F ioe altd adc a, (iy-128) ; DB 76 DD 8E 80 ioe altd add (hl) ; DB 76 86 ioe altd add (ix) ; DB 76 FD 86 00 ioe altd add (ix+127) ; DB 76 FD 86 7F ioe altd add (ix-128) ; DB 76 FD 86 80 ioe altd add (iy) ; DB 76 DD 86 00 ioe altd add (iy+127) ; DB 76 DD 86 7F ioe altd add (iy-128) ; DB 76 DD 86 80 ioe altd add a, (hl) ; DB 76 86 ioe altd add a, (ix) ; DB 76 FD 86 00 ioe altd add a, (ix+127) ; DB 76 FD 86 7F ioe altd add a, (ix-128) ; DB 76 FD 86 80 ioe altd add a, (iy) ; DB 76 DD 86 00 ioe altd add a, (iy+127) ; DB 76 DD 86 7F ioe altd add a, (iy-128) ; DB 76 DD 86 80 ioe altd and (hl) ; DB 76 A6 ioe altd and (ix) ; DB 76 FD A6 00 ioe altd and (ix+127) ; DB 76 FD A6 7F ioe altd and (ix-128) ; DB 76 FD A6 80 ioe altd and (iy) ; DB 76 DD A6 00 ioe altd and (iy+127) ; DB 76 DD A6 7F ioe altd and (iy-128) ; DB 76 DD A6 80 ioe altd and a, (hl) ; DB 76 A6 ioe altd and a, (ix) ; DB 76 FD A6 00 ioe altd and a, (ix+127) ; DB 76 FD A6 7F ioe altd and a, (ix-128) ; DB 76 FD A6 80 ioe altd and a, (iy) ; DB 76 DD A6 00 ioe altd and a, (iy+127) ; DB 76 DD A6 7F ioe altd and a, (iy-128) ; DB 76 DD A6 80 ioe altd bit 0, (hl) ; DB 76 CB 46 ioe altd bit 0, (ix) ; DB 76 FD CB 00 46 ioe altd bit 0, (ix+127) ; DB 76 FD CB 7F 46 ioe altd bit 0, (ix-128) ; DB 76 FD CB 80 46 ioe altd bit 0, (iy) ; DB 76 DD CB 00 46 ioe altd bit 0, (iy+127) ; DB 76 DD CB 7F 46 ioe altd bit 0, (iy-128) ; DB 76 DD CB 80 46 ioe altd bit 1, (hl) ; DB 76 CB 4E ioe altd bit 1, (ix) ; DB 76 FD CB 00 4E ioe altd bit 1, (ix+127) ; DB 76 FD CB 7F 4E ioe altd bit 1, (ix-128) ; DB 76 FD CB 80 4E ioe altd bit 1, (iy) ; DB 76 DD CB 00 4E ioe altd bit 1, (iy+127) ; DB 76 DD CB 7F 4E ioe altd bit 1, (iy-128) ; DB 76 DD CB 80 4E ioe altd bit 2, (hl) ; DB 76 CB 56 ioe altd bit 2, (ix) ; DB 76 FD CB 00 56 ioe altd bit 2, (ix+127) ; DB 76 FD CB 7F 56 ioe altd bit 2, (ix-128) ; DB 76 FD CB 80 56 ioe altd bit 2, (iy) ; DB 76 DD CB 00 56 ioe altd bit 2, (iy+127) ; DB 76 DD CB 7F 56 ioe altd bit 2, (iy-128) ; DB 76 DD CB 80 56 ioe altd bit 3, (hl) ; DB 76 CB 5E ioe altd bit 3, (ix) ; DB 76 FD CB 00 5E ioe altd bit 3, (ix+127) ; DB 76 FD CB 7F 5E ioe altd bit 3, (ix-128) ; DB 76 FD CB 80 5E ioe altd bit 3, (iy) ; DB 76 DD CB 00 5E ioe altd bit 3, (iy+127) ; DB 76 DD CB 7F 5E ioe altd bit 3, (iy-128) ; DB 76 DD CB 80 5E ioe altd bit 4, (hl) ; DB 76 CB 66 ioe altd bit 4, (ix) ; DB 76 FD CB 00 66 ioe altd bit 4, (ix+127) ; DB 76 FD CB 7F 66 ioe altd bit 4, (ix-128) ; DB 76 FD CB 80 66 ioe altd bit 4, (iy) ; DB 76 DD CB 00 66 ioe altd bit 4, (iy+127) ; DB 76 DD CB 7F 66 ioe altd bit 4, (iy-128) ; DB 76 DD CB 80 66 ioe altd bit 5, (hl) ; DB 76 CB 6E ioe altd bit 5, (ix) ; DB 76 FD CB 00 6E ioe altd bit 5, (ix+127) ; DB 76 FD CB 7F 6E ioe altd bit 5, (ix-128) ; DB 76 FD CB 80 6E ioe altd bit 5, (iy) ; DB 76 DD CB 00 6E ioe altd bit 5, (iy+127) ; DB 76 DD CB 7F 6E ioe altd bit 5, (iy-128) ; DB 76 DD CB 80 6E ioe altd bit 6, (hl) ; DB 76 CB 76 ioe altd bit 6, (ix) ; DB 76 FD CB 00 76 ioe altd bit 6, (ix+127) ; DB 76 FD CB 7F 76 ioe altd bit 6, (ix-128) ; DB 76 FD CB 80 76 ioe altd bit 6, (iy) ; DB 76 DD CB 00 76 ioe altd bit 6, (iy+127) ; DB 76 DD CB 7F 76 ioe altd bit 6, (iy-128) ; DB 76 DD CB 80 76 ioe altd bit 7, (hl) ; DB 76 CB 7E ioe altd bit 7, (ix) ; DB 76 FD CB 00 7E ioe altd bit 7, (ix+127) ; DB 76 FD CB 7F 7E ioe altd bit 7, (ix-128) ; DB 76 FD CB 80 7E ioe altd bit 7, (iy) ; DB 76 DD CB 00 7E ioe altd bit 7, (iy+127) ; DB 76 DD CB 7F 7E ioe altd bit 7, (iy-128) ; DB 76 DD CB 80 7E ioe altd cp (hl) ; DB 76 BE ioe altd cp (ix) ; DB 76 FD BE 00 ioe altd cp (ix+127) ; DB 76 FD BE 7F ioe altd cp (ix-128) ; DB 76 FD BE 80 ioe altd cp (iy) ; DB 76 DD BE 00 ioe altd cp (iy+127) ; DB 76 DD BE 7F ioe altd cp (iy-128) ; DB 76 DD BE 80 ioe altd cp a, (hl) ; DB 76 BE ioe altd cp a, (ix) ; DB 76 FD BE 00 ioe altd cp a, (ix+127) ; DB 76 FD BE 7F ioe altd cp a, (ix-128) ; DB 76 FD BE 80 ioe altd cp a, (iy) ; DB 76 DD BE 00 ioe altd cp a, (iy+127) ; DB 76 DD BE 7F ioe altd cp a, (iy-128) ; DB 76 DD BE 80 ioe altd dec (hl) ; DB 76 35 ioe altd dec (ix) ; DB 76 FD 35 00 ioe altd dec (ix+127) ; DB 76 FD 35 7F ioe altd dec (ix-128) ; DB 76 FD 35 80 ioe altd dec (iy) ; DB 76 DD 35 00 ioe altd dec (iy+127) ; DB 76 DD 35 7F ioe altd dec (iy-128) ; DB 76 DD 35 80 ioe altd inc (hl) ; DB 76 34 ioe altd inc (ix) ; DB 76 FD 34 00 ioe altd inc (ix+127) ; DB 76 FD 34 7F ioe altd inc (ix-128) ; DB 76 FD 34 80 ioe altd inc (iy) ; DB 76 DD 34 00 ioe altd inc (iy+127) ; DB 76 DD 34 7F ioe altd inc (iy-128) ; DB 76 DD 34 80 ioe altd ld a, (-32768) ; DB 76 3A 00 80 ioe altd ld a, (32767) ; DB 76 3A FF 7F ioe altd ld a, (65535) ; DB 76 3A FF FF ioe altd ld a, (bc) ; DB 76 0A ioe altd ld a, (bc+) ; DB 76 0A 03 ioe altd ld a, (bc-) ; DB 76 0A 0B ioe altd ld a, (de) ; DB 76 1A ioe altd ld a, (de+) ; DB 76 1A 13 ioe altd ld a, (de-) ; DB 76 1A 1B ioe altd ld a, (hl) ; DB 76 7E ioe altd ld a, (hl+) ; DB 76 7E 23 ioe altd ld a, (hl-) ; DB 76 7E 2B ioe altd ld a, (hld) ; DB 76 7E 2B ioe altd ld a, (hli) ; DB 76 7E 23 ioe altd ld a, (ix) ; DB 76 FD 7E 00 ioe altd ld a, (ix+127) ; DB 76 FD 7E 7F ioe altd ld a, (ix-128) ; DB 76 FD 7E 80 ioe altd ld a, (iy) ; DB 76 DD 7E 00 ioe altd ld a, (iy+127) ; DB 76 DD 7E 7F ioe altd ld a, (iy-128) ; DB 76 DD 7E 80 ioe altd ld b, (hl) ; DB 76 46 ioe altd ld b, (ix) ; DB 76 FD 46 00 ioe altd ld b, (ix+127) ; DB 76 FD 46 7F ioe altd ld b, (ix-128) ; DB 76 FD 46 80 ioe altd ld b, (iy) ; DB 76 DD 46 00 ioe altd ld b, (iy+127) ; DB 76 DD 46 7F ioe altd ld b, (iy-128) ; DB 76 DD 46 80 ioe altd ld bc, (-32768) ; DB 76 ED 4B 00 80 ioe altd ld bc, (32767) ; DB 76 ED 4B FF 7F ioe altd ld bc, (65535) ; DB 76 ED 4B FF FF ioe altd ld c, (hl) ; DB 76 4E ioe altd ld c, (ix) ; DB 76 FD 4E 00 ioe altd ld c, (ix+127) ; DB 76 FD 4E 7F ioe altd ld c, (ix-128) ; DB 76 FD 4E 80 ioe altd ld c, (iy) ; DB 76 DD 4E 00 ioe altd ld c, (iy+127) ; DB 76 DD 4E 7F ioe altd ld c, (iy-128) ; DB 76 DD 4E 80 ioe altd ld d, (hl) ; DB 76 56 ioe altd ld d, (ix) ; DB 76 FD 56 00 ioe altd ld d, (ix+127) ; DB 76 FD 56 7F ioe altd ld d, (ix-128) ; DB 76 FD 56 80 ioe altd ld d, (iy) ; DB 76 DD 56 00 ioe altd ld d, (iy+127) ; DB 76 DD 56 7F ioe altd ld d, (iy-128) ; DB 76 DD 56 80 ioe altd ld de, (-32768) ; DB 76 ED 5B 00 80 ioe altd ld de, (32767) ; DB 76 ED 5B FF 7F ioe altd ld de, (65535) ; DB 76 ED 5B FF FF ioe altd ld e, (hl) ; DB 76 5E ioe altd ld e, (ix) ; DB 76 FD 5E 00 ioe altd ld e, (ix+127) ; DB 76 FD 5E 7F ioe altd ld e, (ix-128) ; DB 76 FD 5E 80 ioe altd ld e, (iy) ; DB 76 DD 5E 00 ioe altd ld e, (iy+127) ; DB 76 DD 5E 7F ioe altd ld e, (iy-128) ; DB 76 DD 5E 80 ioe altd ld h, (hl) ; DB 76 66 ioe altd ld h, (ix) ; DB 76 FD 66 00 ioe altd ld h, (ix+127) ; DB 76 FD 66 7F ioe altd ld h, (ix-128) ; DB 76 FD 66 80 ioe altd ld h, (iy) ; DB 76 DD 66 00 ioe altd ld h, (iy+127) ; DB 76 DD 66 7F ioe altd ld h, (iy-128) ; DB 76 DD 66 80 ioe altd ld hl, (-32768) ; DB 76 2A 00 80 ioe altd ld hl, (32767) ; DB 76 2A FF 7F ioe altd ld hl, (65535) ; DB 76 2A FF FF ioe altd ld hl, (hl) ; DB 76 DD E4 00 ioe altd ld hl, (hl+127) ; DB 76 DD E4 7F ioe altd ld hl, (hl-128) ; DB 76 DD E4 80 ioe altd ld hl, (ix) ; DB 76 FD E4 00 ioe altd ld hl, (ix+127) ; DB 76 FD E4 7F ioe altd ld hl, (ix-128) ; DB 76 FD E4 80 ioe altd ld hl, (iy) ; DB 76 E4 00 ioe altd ld hl, (iy+127) ; DB 76 E4 7F ioe altd ld hl, (iy-128) ; DB 76 E4 80 ioe altd ld l, (hl) ; DB 76 6E ioe altd ld l, (ix) ; DB 76 FD 6E 00 ioe altd ld l, (ix+127) ; DB 76 FD 6E 7F ioe altd ld l, (ix-128) ; DB 76 FD 6E 80 ioe altd ld l, (iy) ; DB 76 DD 6E 00 ioe altd ld l, (iy+127) ; DB 76 DD 6E 7F ioe altd ld l, (iy-128) ; DB 76 DD 6E 80 ioe altd or (hl) ; DB 76 B6 ioe altd or (ix) ; DB 76 FD B6 00 ioe altd or (ix+127) ; DB 76 FD B6 7F ioe altd or (ix-128) ; DB 76 FD B6 80 ioe altd or (iy) ; DB 76 DD B6 00 ioe altd or (iy+127) ; DB 76 DD B6 7F ioe altd or (iy-128) ; DB 76 DD B6 80 ioe altd or a, (hl) ; DB 76 B6 ioe altd or a, (ix) ; DB 76 FD B6 00 ioe altd or a, (ix+127) ; DB 76 FD B6 7F ioe altd or a, (ix-128) ; DB 76 FD B6 80 ioe altd or a, (iy) ; DB 76 DD B6 00 ioe altd or a, (iy+127) ; DB 76 DD B6 7F ioe altd or a, (iy-128) ; DB 76 DD B6 80 ioe altd rl (hl) ; DB 76 CB 16 ioe altd rl (ix) ; DB 76 FD CB 00 16 ioe altd rl (ix+127) ; DB 76 FD CB 7F 16 ioe altd rl (ix-128) ; DB 76 FD CB 80 16 ioe altd rl (iy) ; DB 76 DD CB 00 16 ioe altd rl (iy+127) ; DB 76 DD CB 7F 16 ioe altd rl (iy-128) ; DB 76 DD CB 80 16 ioe altd rlc (hl) ; DB 76 CB 06 ioe altd rlc (ix) ; DB 76 FD CB 00 06 ioe altd rlc (ix+127) ; DB 76 FD CB 7F 06 ioe altd rlc (ix-128) ; DB 76 FD CB 80 06 ioe altd rlc (iy) ; DB 76 DD CB 00 06 ioe altd rlc (iy+127) ; DB 76 DD CB 7F 06 ioe altd rlc (iy-128) ; DB 76 DD CB 80 06 ioe altd rr (hl) ; DB 76 CB 1E ioe altd rr (ix) ; DB 76 FD CB 00 1E ioe altd rr (ix+127) ; DB 76 FD CB 7F 1E ioe altd rr (ix-128) ; DB 76 FD CB 80 1E ioe altd rr (iy) ; DB 76 DD CB 00 1E ioe altd rr (iy+127) ; DB 76 DD CB 7F 1E ioe altd rr (iy-128) ; DB 76 DD CB 80 1E ioe altd rrc (hl) ; DB 76 CB 0E ioe altd rrc (ix) ; DB 76 FD CB 00 0E ioe altd rrc (ix+127) ; DB 76 FD CB 7F 0E ioe altd rrc (ix-128) ; DB 76 FD CB 80 0E ioe altd rrc (iy) ; DB 76 DD CB 00 0E ioe altd rrc (iy+127) ; DB 76 DD CB 7F 0E ioe altd rrc (iy-128) ; DB 76 DD CB 80 0E ioe altd sbc (hl) ; DB 76 9E ioe altd sbc (ix) ; DB 76 FD 9E 00 ioe altd sbc (ix+127) ; DB 76 FD 9E 7F ioe altd sbc (ix-128) ; DB 76 FD 9E 80 ioe altd sbc (iy) ; DB 76 DD 9E 00 ioe altd sbc (iy+127) ; DB 76 DD 9E 7F ioe altd sbc (iy-128) ; DB 76 DD 9E 80 ioe altd sbc a, (hl) ; DB 76 9E ioe altd sbc a, (ix) ; DB 76 FD 9E 00 ioe altd sbc a, (ix+127) ; DB 76 FD 9E 7F ioe altd sbc a, (ix-128) ; DB 76 FD 9E 80 ioe altd sbc a, (iy) ; DB 76 DD 9E 00 ioe altd sbc a, (iy+127) ; DB 76 DD 9E 7F ioe altd sbc a, (iy-128) ; DB 76 DD 9E 80 ioe altd sla (hl) ; DB 76 CB 26 ioe altd sla (ix) ; DB 76 FD CB 00 26 ioe altd sla (ix+127) ; DB 76 FD CB 7F 26 ioe altd sla (ix-128) ; DB 76 FD CB 80 26 ioe altd sla (iy) ; DB 76 DD CB 00 26 ioe altd sla (iy+127) ; DB 76 DD CB 7F 26 ioe altd sla (iy-128) ; DB 76 DD CB 80 26 ioe altd sra (hl) ; DB 76 CB 2E ioe altd sra (ix) ; DB 76 FD CB 00 2E ioe altd sra (ix+127) ; DB 76 FD CB 7F 2E ioe altd sra (ix-128) ; DB 76 FD CB 80 2E ioe altd sra (iy) ; DB 76 DD CB 00 2E ioe altd sra (iy+127) ; DB 76 DD CB 7F 2E ioe altd sra (iy-128) ; DB 76 DD CB 80 2E ioe altd srl (hl) ; DB 76 CB 3E ioe altd srl (ix) ; DB 76 FD CB 00 3E ioe altd srl (ix+127) ; DB 76 FD CB 7F 3E ioe altd srl (ix-128) ; DB 76 FD CB 80 3E ioe altd srl (iy) ; DB 76 DD CB 00 3E ioe altd srl (iy+127) ; DB 76 DD CB 7F 3E ioe altd srl (iy-128) ; DB 76 DD CB 80 3E ioe altd sub (hl) ; DB 76 96 ioe altd sub (ix) ; DB 76 FD 96 00 ioe altd sub (ix+127) ; DB 76 FD 96 7F ioe altd sub (ix-128) ; DB 76 FD 96 80 ioe altd sub (iy) ; DB 76 DD 96 00 ioe altd sub (iy+127) ; DB 76 DD 96 7F ioe altd sub (iy-128) ; DB 76 DD 96 80 ioe altd sub a, (hl) ; DB 76 96 ioe altd sub a, (ix) ; DB 76 FD 96 00 ioe altd sub a, (ix+127) ; DB 76 FD 96 7F ioe altd sub a, (ix-128) ; DB 76 FD 96 80 ioe altd sub a, (iy) ; DB 76 DD 96 00 ioe altd sub a, (iy+127) ; DB 76 DD 96 7F ioe altd sub a, (iy-128) ; DB 76 DD 96 80 ioe altd xor (hl) ; DB 76 AE ioe altd xor (ix) ; DB 76 FD AE 00 ioe altd xor (ix+127) ; DB 76 FD AE 7F ioe altd xor (ix-128) ; DB 76 FD AE 80 ioe altd xor (iy) ; DB 76 DD AE 00 ioe altd xor (iy+127) ; DB 76 DD AE 7F ioe altd xor (iy-128) ; DB 76 DD AE 80 ioe altd xor a, (hl) ; DB 76 AE ioe altd xor a, (ix) ; DB 76 FD AE 00 ioe altd xor a, (ix+127) ; DB 76 FD AE 7F ioe altd xor a, (ix-128) ; DB 76 FD AE 80 ioe altd xor a, (iy) ; DB 76 DD AE 00 ioe altd xor a, (iy+127) ; DB 76 DD AE 7F ioe altd xor a, (iy-128) ; DB 76 DD AE 80 ioe and (hl) ; DB A6 ioe and (ix) ; DB FD A6 00 ioe and (ix+127) ; DB FD A6 7F ioe and (ix-128) ; DB FD A6 80 ioe and (iy) ; DB DD A6 00 ioe and (iy+127) ; DB DD A6 7F ioe and (iy-128) ; DB DD A6 80 ioe and a', (hl) ; DB 76 A6 ioe and a', (ix) ; DB 76 FD A6 00 ioe and a', (ix+127) ; DB 76 FD A6 7F ioe and a', (ix-128) ; DB 76 FD A6 80 ioe and a', (iy) ; DB 76 DD A6 00 ioe and a', (iy+127) ; DB 76 DD A6 7F ioe and a', (iy-128) ; DB 76 DD A6 80 ioe and a, (hl) ; DB A6 ioe and a, (ix) ; DB FD A6 00 ioe and a, (ix+127) ; DB FD A6 7F ioe and a, (ix-128) ; DB FD A6 80 ioe and a, (iy) ; DB DD A6 00 ioe and a, (iy+127) ; DB DD A6 7F ioe and a, (iy-128) ; DB DD A6 80 ioe bit 0, (hl) ; DB CB 46 ioe bit 0, (ix) ; DB FD CB 00 46 ioe bit 0, (ix+127) ; DB FD CB 7F 46 ioe bit 0, (ix-128) ; DB FD CB 80 46 ioe bit 0, (iy) ; DB DD CB 00 46 ioe bit 0, (iy+127) ; DB DD CB 7F 46 ioe bit 0, (iy-128) ; DB DD CB 80 46 ioe bit 1, (hl) ; DB CB 4E ioe bit 1, (ix) ; DB FD CB 00 4E ioe bit 1, (ix+127) ; DB FD CB 7F 4E ioe bit 1, (ix-128) ; DB FD CB 80 4E ioe bit 1, (iy) ; DB DD CB 00 4E ioe bit 1, (iy+127) ; DB DD CB 7F 4E ioe bit 1, (iy-128) ; DB DD CB 80 4E ioe bit 2, (hl) ; DB CB 56 ioe bit 2, (ix) ; DB FD CB 00 56 ioe bit 2, (ix+127) ; DB FD CB 7F 56 ioe bit 2, (ix-128) ; DB FD CB 80 56 ioe bit 2, (iy) ; DB DD CB 00 56 ioe bit 2, (iy+127) ; DB DD CB 7F 56 ioe bit 2, (iy-128) ; DB DD CB 80 56 ioe bit 3, (hl) ; DB CB 5E ioe bit 3, (ix) ; DB FD CB 00 5E ioe bit 3, (ix+127) ; DB FD CB 7F 5E ioe bit 3, (ix-128) ; DB FD CB 80 5E ioe bit 3, (iy) ; DB DD CB 00 5E ioe bit 3, (iy+127) ; DB DD CB 7F 5E ioe bit 3, (iy-128) ; DB DD CB 80 5E ioe bit 4, (hl) ; DB CB 66 ioe bit 4, (ix) ; DB FD CB 00 66 ioe bit 4, (ix+127) ; DB FD CB 7F 66 ioe bit 4, (ix-128) ; DB FD CB 80 66 ioe bit 4, (iy) ; DB DD CB 00 66 ioe bit 4, (iy+127) ; DB DD CB 7F 66 ioe bit 4, (iy-128) ; DB DD CB 80 66 ioe bit 5, (hl) ; DB CB 6E ioe bit 5, (ix) ; DB FD CB 00 6E ioe bit 5, (ix+127) ; DB FD CB 7F 6E ioe bit 5, (ix-128) ; DB FD CB 80 6E ioe bit 5, (iy) ; DB DD CB 00 6E ioe bit 5, (iy+127) ; DB DD CB 7F 6E ioe bit 5, (iy-128) ; DB DD CB 80 6E ioe bit 6, (hl) ; DB CB 76 ioe bit 6, (ix) ; DB FD CB 00 76 ioe bit 6, (ix+127) ; DB FD CB 7F 76 ioe bit 6, (ix-128) ; DB FD CB 80 76 ioe bit 6, (iy) ; DB DD CB 00 76 ioe bit 6, (iy+127) ; DB DD CB 7F 76 ioe bit 6, (iy-128) ; DB DD CB 80 76 ioe bit 7, (hl) ; DB CB 7E ioe bit 7, (ix) ; DB FD CB 00 7E ioe bit 7, (ix+127) ; DB FD CB 7F 7E ioe bit 7, (ix-128) ; DB FD CB 80 7E ioe bit 7, (iy) ; DB DD CB 00 7E ioe bit 7, (iy+127) ; DB DD CB 7F 7E ioe bit 7, (iy-128) ; DB DD CB 80 7E ioe bit.a 0, (hl) ; DB CB 46 ioe bit.a 0, (ix) ; DB FD CB 00 46 ioe bit.a 0, (ix+127) ; DB FD CB 7F 46 ioe bit.a 0, (ix-128) ; DB FD CB 80 46 ioe bit.a 0, (iy) ; DB DD CB 00 46 ioe bit.a 0, (iy+127) ; DB DD CB 7F 46 ioe bit.a 0, (iy-128) ; DB DD CB 80 46 ioe bit.a 1, (hl) ; DB CB 4E ioe bit.a 1, (ix) ; DB FD CB 00 4E ioe bit.a 1, (ix+127) ; DB FD CB 7F 4E ioe bit.a 1, (ix-128) ; DB FD CB 80 4E ioe bit.a 1, (iy) ; DB DD CB 00 4E ioe bit.a 1, (iy+127) ; DB DD CB 7F 4E ioe bit.a 1, (iy-128) ; DB DD CB 80 4E ioe bit.a 2, (hl) ; DB CB 56 ioe bit.a 2, (ix) ; DB FD CB 00 56 ioe bit.a 2, (ix+127) ; DB FD CB 7F 56 ioe bit.a 2, (ix-128) ; DB FD CB 80 56 ioe bit.a 2, (iy) ; DB DD CB 00 56 ioe bit.a 2, (iy+127) ; DB DD CB 7F 56 ioe bit.a 2, (iy-128) ; DB DD CB 80 56 ioe bit.a 3, (hl) ; DB CB 5E ioe bit.a 3, (ix) ; DB FD CB 00 5E ioe bit.a 3, (ix+127) ; DB FD CB 7F 5E ioe bit.a 3, (ix-128) ; DB FD CB 80 5E ioe bit.a 3, (iy) ; DB DD CB 00 5E ioe bit.a 3, (iy+127) ; DB DD CB 7F 5E ioe bit.a 3, (iy-128) ; DB DD CB 80 5E ioe bit.a 4, (hl) ; DB CB 66 ioe bit.a 4, (ix) ; DB FD CB 00 66 ioe bit.a 4, (ix+127) ; DB FD CB 7F 66 ioe bit.a 4, (ix-128) ; DB FD CB 80 66 ioe bit.a 4, (iy) ; DB DD CB 00 66 ioe bit.a 4, (iy+127) ; DB DD CB 7F 66 ioe bit.a 4, (iy-128) ; DB DD CB 80 66 ioe bit.a 5, (hl) ; DB CB 6E ioe bit.a 5, (ix) ; DB FD CB 00 6E ioe bit.a 5, (ix+127) ; DB FD CB 7F 6E ioe bit.a 5, (ix-128) ; DB FD CB 80 6E ioe bit.a 5, (iy) ; DB DD CB 00 6E ioe bit.a 5, (iy+127) ; DB DD CB 7F 6E ioe bit.a 5, (iy-128) ; DB DD CB 80 6E ioe bit.a 6, (hl) ; DB CB 76 ioe bit.a 6, (ix) ; DB FD CB 00 76 ioe bit.a 6, (ix+127) ; DB FD CB 7F 76 ioe bit.a 6, (ix-128) ; DB FD CB 80 76 ioe bit.a 6, (iy) ; DB DD CB 00 76 ioe bit.a 6, (iy+127) ; DB DD CB 7F 76 ioe bit.a 6, (iy-128) ; DB DD CB 80 76 ioe bit.a 7, (hl) ; DB CB 7E ioe bit.a 7, (ix) ; DB FD CB 00 7E ioe bit.a 7, (ix+127) ; DB FD CB 7F 7E ioe bit.a 7, (ix-128) ; DB FD CB 80 7E ioe bit.a 7, (iy) ; DB DD CB 00 7E ioe bit.a 7, (iy+127) ; DB DD CB 7F 7E ioe bit.a 7, (iy-128) ; DB DD CB 80 7E ioe cmp (hl) ; DB BE ioe cmp (ix) ; DB FD BE 00 ioe cmp (ix+127) ; DB FD BE 7F ioe cmp (ix-128) ; DB FD BE 80 ioe cmp (iy) ; DB DD BE 00 ioe cmp (iy+127) ; DB DD BE 7F ioe cmp (iy-128) ; DB DD BE 80 ioe cmp a, (hl) ; DB BE ioe cmp a, (ix) ; DB FD BE 00 ioe cmp a, (ix+127) ; DB FD BE 7F ioe cmp a, (ix-128) ; DB FD BE 80 ioe cmp a, (iy) ; DB DD BE 00 ioe cmp a, (iy+127) ; DB DD BE 7F ioe cmp a, (iy-128) ; DB DD BE 80 ioe cp (hl) ; DB BE ioe cp (ix) ; DB FD BE 00 ioe cp (ix+127) ; DB FD BE 7F ioe cp (ix-128) ; DB FD BE 80 ioe cp (iy) ; DB DD BE 00 ioe cp (iy+127) ; DB DD BE 7F ioe cp (iy-128) ; DB DD BE 80 ioe cp a, (hl) ; DB BE ioe cp a, (ix) ; DB FD BE 00 ioe cp a, (ix+127) ; DB FD BE 7F ioe cp a, (ix-128) ; DB FD BE 80 ioe cp a, (iy) ; DB DD BE 00 ioe cp a, (iy+127) ; DB DD BE 7F ioe cp a, (iy-128) ; DB DD BE 80 ioe dec (hl) ; DB 35 ioe dec (ix) ; DB FD 35 00 ioe dec (ix+127) ; DB FD 35 7F ioe dec (ix-128) ; DB FD 35 80 ioe dec (iy) ; DB DD 35 00 ioe dec (iy+127) ; DB DD 35 7F ioe dec (iy-128) ; DB DD 35 80 ioe inc (hl) ; DB 34 ioe inc (ix) ; DB FD 34 00 ioe inc (ix+127) ; DB FD 34 7F ioe inc (ix-128) ; DB FD 34 80 ioe inc (iy) ; DB DD 34 00 ioe inc (iy+127) ; DB DD 34 7F ioe inc (iy-128) ; DB DD 34 80 ioe ld (-32768), a ; DB 32 00 80 ioe ld (-32768), bc ; DB ED 43 00 80 ioe ld (-32768), de ; DB ED 53 00 80 ioe ld (-32768), hl ; DB 22 00 80 ioe ld (-32768), ix ; DB FD 22 00 80 ioe ld (-32768), iy ; DB DD 22 00 80 ioe ld (-32768), sp ; DB ED 73 00 80 ioe ld (32767), a ; DB 32 FF 7F ioe ld (32767), bc ; DB ED 43 FF 7F ioe ld (32767), de ; DB ED 53 FF 7F ioe ld (32767), hl ; DB 22 FF 7F ioe ld (32767), ix ; DB FD 22 FF 7F ioe ld (32767), iy ; DB DD 22 FF 7F ioe ld (32767), sp ; DB ED 73 FF 7F ioe ld (65535), a ; DB 32 FF FF ioe ld (65535), bc ; DB ED 43 FF FF ioe ld (65535), de ; DB ED 53 FF FF ioe ld (65535), hl ; DB 22 FF FF ioe ld (65535), ix ; DB FD 22 FF FF ioe ld (65535), iy ; DB DD 22 FF FF ioe ld (65535), sp ; DB ED 73 FF FF ioe ld (bc), a ; DB 02 ioe ld (bc+), a ; DB 02 03 ioe ld (bc-), a ; DB 02 0B ioe ld (de), a ; DB 12 ioe ld (de+), a ; DB 12 13 ioe ld (de-), a ; DB 12 1B ioe ld (hl), -128 ; DB 36 80 ioe ld (hl), 127 ; DB 36 7F ioe ld (hl), 255 ; DB 36 FF ioe ld (hl), a ; DB 77 ioe ld (hl), b ; DB 70 ioe ld (hl), c ; DB 71 ioe ld (hl), d ; DB 72 ioe ld (hl), e ; DB 73 ioe ld (hl), h ; DB 74 ioe ld (hl), hl ; DB DD F4 00 ioe ld (hl), l ; DB 75 ioe ld (hl+), a ; DB 77 23 ioe ld (hl+127), hl ; DB DD F4 7F ioe ld (hl-), a ; DB 77 2B ioe ld (hl-128), hl ; DB DD F4 80 ioe ld (hld), a ; DB 77 2B ioe ld (hli), a ; DB 77 23 ioe ld (ix), -128 ; DB FD 36 00 80 ioe ld (ix), 127 ; DB FD 36 00 7F ioe ld (ix), 255 ; DB FD 36 00 FF ioe ld (ix), a ; DB FD 77 00 ioe ld (ix), b ; DB FD 70 00 ioe ld (ix), c ; DB FD 71 00 ioe ld (ix), d ; DB FD 72 00 ioe ld (ix), e ; DB FD 73 00 ioe ld (ix), h ; DB FD 74 00 ioe ld (ix), hl ; DB FD F4 00 ioe ld (ix), l ; DB FD 75 00 ioe ld (ix+127), -128 ; DB FD 36 7F 80 ioe ld (ix+127), 127 ; DB FD 36 7F 7F ioe ld (ix+127), 255 ; DB FD 36 7F FF ioe ld (ix+127), a ; DB FD 77 7F ioe ld (ix+127), b ; DB FD 70 7F ioe ld (ix+127), c ; DB FD 71 7F ioe ld (ix+127), d ; DB FD 72 7F ioe ld (ix+127), e ; DB FD 73 7F ioe ld (ix+127), h ; DB FD 74 7F ioe ld (ix+127), hl ; DB FD F4 7F ioe ld (ix+127), l ; DB FD 75 7F ioe ld (ix-128), -128 ; DB FD 36 80 80 ioe ld (ix-128), 127 ; DB FD 36 80 7F ioe ld (ix-128), 255 ; DB FD 36 80 FF ioe ld (ix-128), a ; DB FD 77 80 ioe ld (ix-128), b ; DB FD 70 80 ioe ld (ix-128), c ; DB FD 71 80 ioe ld (ix-128), d ; DB FD 72 80 ioe ld (ix-128), e ; DB FD 73 80 ioe ld (ix-128), h ; DB FD 74 80 ioe ld (ix-128), hl ; DB FD F4 80 ioe ld (ix-128), l ; DB FD 75 80 ioe ld (iy), -128 ; DB DD 36 00 80 ioe ld (iy), 127 ; DB DD 36 00 7F ioe ld (iy), 255 ; DB DD 36 00 FF ioe ld (iy), a ; DB DD 77 00 ioe ld (iy), b ; DB DD 70 00 ioe ld (iy), c ; DB DD 71 00 ioe ld (iy), d ; DB DD 72 00 ioe ld (iy), e ; DB DD 73 00 ioe ld (iy), h ; DB DD 74 00 ioe ld (iy), hl ; DB F4 00 ioe ld (iy), l ; DB DD 75 00 ioe ld (iy+127), -128 ; DB DD 36 7F 80 ioe ld (iy+127), 127 ; DB DD 36 7F 7F ioe ld (iy+127), 255 ; DB DD 36 7F FF ioe ld (iy+127), a ; DB DD 77 7F ioe ld (iy+127), b ; DB DD 70 7F ioe ld (iy+127), c ; DB DD 71 7F ioe ld (iy+127), d ; DB DD 72 7F ioe ld (iy+127), e ; DB DD 73 7F ioe ld (iy+127), h ; DB DD 74 7F ioe ld (iy+127), hl ; DB F4 7F ioe ld (iy+127), l ; DB DD 75 7F ioe ld (iy-128), -128 ; DB DD 36 80 80 ioe ld (iy-128), 127 ; DB DD 36 80 7F ioe ld (iy-128), 255 ; DB DD 36 80 FF ioe ld (iy-128), a ; DB DD 77 80 ioe ld (iy-128), b ; DB DD 70 80 ioe ld (iy-128), c ; DB DD 71 80 ioe ld (iy-128), d ; DB DD 72 80 ioe ld (iy-128), e ; DB DD 73 80 ioe ld (iy-128), h ; DB DD 74 80 ioe ld (iy-128), hl ; DB F4 80 ioe ld (iy-128), l ; DB DD 75 80 ioe ld a', (-32768) ; DB 76 3A 00 80 ioe ld a', (32767) ; DB 76 3A FF 7F ioe ld a', (65535) ; DB 76 3A FF FF ioe ld a', (bc) ; DB 76 0A ioe ld a', (bc+) ; DB 76 0A 03 ioe ld a', (bc-) ; DB 76 0A 0B ioe ld a', (de) ; DB 76 1A ioe ld a', (de+) ; DB 76 1A 13 ioe ld a', (de-) ; DB 76 1A 1B ioe ld a', (hl) ; DB 76 7E ioe ld a', (hl+) ; DB 76 7E 23 ioe ld a', (hl-) ; DB 76 7E 2B ioe ld a', (hld) ; DB 76 7E 2B ioe ld a', (hli) ; DB 76 7E 23 ioe ld a', (ix) ; DB 76 FD 7E 00 ioe ld a', (ix+127) ; DB 76 FD 7E 7F ioe ld a', (ix-128) ; DB 76 FD 7E 80 ioe ld a', (iy) ; DB 76 DD 7E 00 ioe ld a', (iy+127) ; DB 76 DD 7E 7F ioe ld a', (iy-128) ; DB 76 DD 7E 80 ioe ld a, (-32768) ; DB 3A 00 80 ioe ld a, (32767) ; DB 3A FF 7F ioe ld a, (65535) ; DB 3A FF FF ioe ld a, (bc) ; DB 0A ioe ld a, (bc+) ; DB 0A 03 ioe ld a, (bc-) ; DB 0A 0B ioe ld a, (de) ; DB 1A ioe ld a, (de+) ; DB 1A 13 ioe ld a, (de-) ; DB 1A 1B ioe ld a, (hl) ; DB 7E ioe ld a, (hl+) ; DB 7E 23 ioe ld a, (hl-) ; DB 7E 2B ioe ld a, (hld) ; DB 7E 2B ioe ld a, (hli) ; DB 7E 23 ioe ld a, (ix) ; DB FD 7E 00 ioe ld a, (ix+127) ; DB FD 7E 7F ioe ld a, (ix-128) ; DB FD 7E 80 ioe ld a, (iy) ; DB DD 7E 00 ioe ld a, (iy+127) ; DB DD 7E 7F ioe ld a, (iy-128) ; DB DD 7E 80 ioe ld b', (hl) ; DB 76 46 ioe ld b', (ix) ; DB 76 FD 46 00 ioe ld b', (ix+127) ; DB 76 FD 46 7F ioe ld b', (ix-128) ; DB 76 FD 46 80 ioe ld b', (iy) ; DB 76 DD 46 00 ioe ld b', (iy+127) ; DB 76 DD 46 7F ioe ld b', (iy-128) ; DB 76 DD 46 80 ioe ld b, (hl) ; DB 46 ioe ld b, (ix) ; DB FD 46 00 ioe ld b, (ix+127) ; DB FD 46 7F ioe ld b, (ix-128) ; DB FD 46 80 ioe ld b, (iy) ; DB DD 46 00 ioe ld b, (iy+127) ; DB DD 46 7F ioe ld b, (iy-128) ; DB DD 46 80 ioe ld bc', (-32768) ; DB 76 ED 4B 00 80 ioe ld bc', (32767) ; DB 76 ED 4B FF 7F ioe ld bc', (65535) ; DB 76 ED 4B FF FF ioe ld bc, (-32768) ; DB ED 4B 00 80 ioe ld bc, (32767) ; DB ED 4B FF 7F ioe ld bc, (65535) ; DB ED 4B FF FF ioe ld c', (hl) ; DB 76 4E ioe ld c', (ix) ; DB 76 FD 4E 00 ioe ld c', (ix+127) ; DB 76 FD 4E 7F ioe ld c', (ix-128) ; DB 76 FD 4E 80 ioe ld c', (iy) ; DB 76 DD 4E 00 ioe ld c', (iy+127) ; DB 76 DD 4E 7F ioe ld c', (iy-128) ; DB 76 DD 4E 80 ioe ld c, (hl) ; DB 4E ioe ld c, (ix) ; DB FD 4E 00 ioe ld c, (ix+127) ; DB FD 4E 7F ioe ld c, (ix-128) ; DB FD 4E 80 ioe ld c, (iy) ; DB DD 4E 00 ioe ld c, (iy+127) ; DB DD 4E 7F ioe ld c, (iy-128) ; DB DD 4E 80 ioe ld d', (hl) ; DB 76 56 ioe ld d', (ix) ; DB 76 FD 56 00 ioe ld d', (ix+127) ; DB 76 FD 56 7F ioe ld d', (ix-128) ; DB 76 FD 56 80 ioe ld d', (iy) ; DB 76 DD 56 00 ioe ld d', (iy+127) ; DB 76 DD 56 7F ioe ld d', (iy-128) ; DB 76 DD 56 80 ioe ld d, (hl) ; DB 56 ioe ld d, (ix) ; DB FD 56 00 ioe ld d, (ix+127) ; DB FD 56 7F ioe ld d, (ix-128) ; DB FD 56 80 ioe ld d, (iy) ; DB DD 56 00 ioe ld d, (iy+127) ; DB DD 56 7F ioe ld d, (iy-128) ; DB DD 56 80 ioe ld de', (-32768) ; DB 76 ED 5B 00 80 ioe ld de', (32767) ; DB 76 ED 5B FF 7F ioe ld de', (65535) ; DB 76 ED 5B FF FF ioe ld de, (-32768) ; DB ED 5B 00 80 ioe ld de, (32767) ; DB ED 5B FF 7F ioe ld de, (65535) ; DB ED 5B FF FF ioe ld e', (hl) ; DB 76 5E ioe ld e', (ix) ; DB 76 FD 5E 00 ioe ld e', (ix+127) ; DB 76 FD 5E 7F ioe ld e', (ix-128) ; DB 76 FD 5E 80 ioe ld e', (iy) ; DB 76 DD 5E 00 ioe ld e', (iy+127) ; DB 76 DD 5E 7F ioe ld e', (iy-128) ; DB 76 DD 5E 80 ioe ld e, (hl) ; DB 5E ioe ld e, (ix) ; DB FD 5E 00 ioe ld e, (ix+127) ; DB FD 5E 7F ioe ld e, (ix-128) ; DB FD 5E 80 ioe ld e, (iy) ; DB DD 5E 00 ioe ld e, (iy+127) ; DB DD 5E 7F ioe ld e, (iy-128) ; DB DD 5E 80 ioe ld h', (hl) ; DB 76 66 ioe ld h', (ix) ; DB 76 FD 66 00 ioe ld h', (ix+127) ; DB 76 FD 66 7F ioe ld h', (ix-128) ; DB 76 FD 66 80 ioe ld h', (iy) ; DB 76 DD 66 00 ioe ld h', (iy+127) ; DB 76 DD 66 7F ioe ld h', (iy-128) ; DB 76 DD 66 80 ioe ld h, (hl) ; DB 66 ioe ld h, (ix) ; DB FD 66 00 ioe ld h, (ix+127) ; DB FD 66 7F ioe ld h, (ix-128) ; DB FD 66 80 ioe ld h, (iy) ; DB DD 66 00 ioe ld h, (iy+127) ; DB DD 66 7F ioe ld h, (iy-128) ; DB DD 66 80 ioe ld hl', (-32768) ; DB 76 2A 00 80 ioe ld hl', (32767) ; DB 76 2A FF 7F ioe ld hl', (65535) ; DB 76 2A FF FF ioe ld hl', (hl) ; DB 76 DD E4 00 ioe ld hl', (hl+127) ; DB 76 DD E4 7F ioe ld hl', (hl-128) ; DB 76 DD E4 80 ioe ld hl', (ix) ; DB 76 FD E4 00 ioe ld hl', (ix+127) ; DB 76 FD E4 7F ioe ld hl', (ix-128) ; DB 76 FD E4 80 ioe ld hl', (iy) ; DB 76 E4 00 ioe ld hl', (iy+127) ; DB 76 E4 7F ioe ld hl', (iy-128) ; DB 76 E4 80 ioe ld hl, (-32768) ; DB 2A 00 80 ioe ld hl, (32767) ; DB 2A FF 7F ioe ld hl, (65535) ; DB 2A FF FF ioe ld hl, (hl) ; DB DD E4 00 ioe ld hl, (hl+127) ; DB DD E4 7F ioe ld hl, (hl-128) ; DB DD E4 80 ioe ld hl, (ix) ; DB FD E4 00 ioe ld hl, (ix+127) ; DB FD E4 7F ioe ld hl, (ix-128) ; DB FD E4 80 ioe ld hl, (iy) ; DB E4 00 ioe ld hl, (iy+127) ; DB E4 7F ioe ld hl, (iy-128) ; DB E4 80 ioe ld ix, (-32768) ; DB FD 2A 00 80 ioe ld ix, (32767) ; DB FD 2A FF 7F ioe ld ix, (65535) ; DB FD 2A FF FF ioe ld iy, (-32768) ; DB DD 2A 00 80 ioe ld iy, (32767) ; DB DD 2A FF 7F ioe ld iy, (65535) ; DB DD 2A FF FF ioe ld l', (hl) ; DB 76 6E ioe ld l', (ix) ; DB 76 FD 6E 00 ioe ld l', (ix+127) ; DB 76 FD 6E 7F ioe ld l', (ix-128) ; DB 76 FD 6E 80 ioe ld l', (iy) ; DB 76 DD 6E 00 ioe ld l', (iy+127) ; DB 76 DD 6E 7F ioe ld l', (iy-128) ; DB 76 DD 6E 80 ioe ld l, (hl) ; DB 6E ioe ld l, (ix) ; DB FD 6E 00 ioe ld l, (ix+127) ; DB FD 6E 7F ioe ld l, (ix-128) ; DB FD 6E 80 ioe ld l, (iy) ; DB DD 6E 00 ioe ld l, (iy+127) ; DB DD 6E 7F ioe ld l, (iy-128) ; DB DD 6E 80 ioe ld sp, (-32768) ; DB ED 7B 00 80 ioe ld sp, (32767) ; DB ED 7B FF 7F ioe ld sp, (65535) ; DB ED 7B FF FF ioe ldd ; DB ED A8 ioe ldd (bc), a ; DB 02 0B ioe ldd (de), a ; DB 12 1B ioe ldd (hl), a ; DB 77 2B ioe ldd a, (bc) ; DB 0A 0B ioe ldd a, (de) ; DB 1A 1B ioe ldd a, (hl) ; DB 7E 2B ioe lddr ; DB ED B8 ioe lddsr ; DB ED 98 ioe ldi ; DB ED A0 ioe ldi (bc), a ; DB 02 03 ioe ldi (de), a ; DB 12 13 ioe ldi (hl), a ; DB 77 23 ioe ldi a, (bc) ; DB 0A 03 ioe ldi a, (de) ; DB 1A 13 ioe ldi a, (hl) ; DB 7E 23 ioe ldir ; DB ED B0 ioe ldisr ; DB ED 90 ioe lsddr ; DB ED D8 ioe lsdr ; DB ED F8 ioe lsidr ; DB ED D0 ioe lsir ; DB ED F0 ioe or (hl) ; DB B6 ioe or (ix) ; DB FD B6 00 ioe or (ix+127) ; DB FD B6 7F ioe or (ix-128) ; DB FD B6 80 ioe or (iy) ; DB DD B6 00 ioe or (iy+127) ; DB DD B6 7F ioe or (iy-128) ; DB DD B6 80 ioe or a', (hl) ; DB 76 B6 ioe or a', (ix) ; DB 76 FD B6 00 ioe or a', (ix+127) ; DB 76 FD B6 7F ioe or a', (ix-128) ; DB 76 FD B6 80 ioe or a', (iy) ; DB 76 DD B6 00 ioe or a', (iy+127) ; DB 76 DD B6 7F ioe or a', (iy-128) ; DB 76 DD B6 80 ioe or a, (hl) ; DB B6 ioe or a, (ix) ; DB FD B6 00 ioe or a, (ix+127) ; DB FD B6 7F ioe or a, (ix-128) ; DB FD B6 80 ioe or a, (iy) ; DB DD B6 00 ioe or a, (iy+127) ; DB DD B6 7F ioe or a, (iy-128) ; DB DD B6 80 ioe res 0, (hl) ; DB CB 86 ioe res 0, (ix) ; DB FD CB 00 86 ioe res 0, (ix+127) ; DB FD CB 7F 86 ioe res 0, (ix-128) ; DB FD CB 80 86 ioe res 0, (iy) ; DB DD CB 00 86 ioe res 0, (iy+127) ; DB DD CB 7F 86 ioe res 0, (iy-128) ; DB DD CB 80 86 ioe res 1, (hl) ; DB CB 8E ioe res 1, (ix) ; DB FD CB 00 8E ioe res 1, (ix+127) ; DB FD CB 7F 8E ioe res 1, (ix-128) ; DB FD CB 80 8E ioe res 1, (iy) ; DB DD CB 00 8E ioe res 1, (iy+127) ; DB DD CB 7F 8E ioe res 1, (iy-128) ; DB DD CB 80 8E ioe res 2, (hl) ; DB CB 96 ioe res 2, (ix) ; DB FD CB 00 96 ioe res 2, (ix+127) ; DB FD CB 7F 96 ioe res 2, (ix-128) ; DB FD CB 80 96 ioe res 2, (iy) ; DB DD CB 00 96 ioe res 2, (iy+127) ; DB DD CB 7F 96 ioe res 2, (iy-128) ; DB DD CB 80 96 ioe res 3, (hl) ; DB CB 9E ioe res 3, (ix) ; DB FD CB 00 9E ioe res 3, (ix+127) ; DB FD CB 7F 9E ioe res 3, (ix-128) ; DB FD CB 80 9E ioe res 3, (iy) ; DB DD CB 00 9E ioe res 3, (iy+127) ; DB DD CB 7F 9E ioe res 3, (iy-128) ; DB DD CB 80 9E ioe res 4, (hl) ; DB CB A6 ioe res 4, (ix) ; DB FD CB 00 A6 ioe res 4, (ix+127) ; DB FD CB 7F A6 ioe res 4, (ix-128) ; DB FD CB 80 A6 ioe res 4, (iy) ; DB DD CB 00 A6 ioe res 4, (iy+127) ; DB DD CB 7F A6 ioe res 4, (iy-128) ; DB DD CB 80 A6 ioe res 5, (hl) ; DB CB AE ioe res 5, (ix) ; DB FD CB 00 AE ioe res 5, (ix+127) ; DB FD CB 7F AE ioe res 5, (ix-128) ; DB FD CB 80 AE ioe res 5, (iy) ; DB DD CB 00 AE ioe res 5, (iy+127) ; DB DD CB 7F AE ioe res 5, (iy-128) ; DB DD CB 80 AE ioe res 6, (hl) ; DB CB B6 ioe res 6, (ix) ; DB FD CB 00 B6 ioe res 6, (ix+127) ; DB FD CB 7F B6 ioe res 6, (ix-128) ; DB FD CB 80 B6 ioe res 6, (iy) ; DB DD CB 00 B6 ioe res 6, (iy+127) ; DB DD CB 7F B6 ioe res 6, (iy-128) ; DB DD CB 80 B6 ioe res 7, (hl) ; DB CB BE ioe res 7, (ix) ; DB FD CB 00 BE ioe res 7, (ix+127) ; DB FD CB 7F BE ioe res 7, (ix-128) ; DB FD CB 80 BE ioe res 7, (iy) ; DB DD CB 00 BE ioe res 7, (iy+127) ; DB DD CB 7F BE ioe res 7, (iy-128) ; DB DD CB 80 BE ioe res.a 0, (hl) ; DB CB 86 ioe res.a 0, (ix) ; DB FD CB 00 86 ioe res.a 0, (ix+127) ; DB FD CB 7F 86 ioe res.a 0, (ix-128) ; DB FD CB 80 86 ioe res.a 0, (iy) ; DB DD CB 00 86 ioe res.a 0, (iy+127) ; DB DD CB 7F 86 ioe res.a 0, (iy-128) ; DB DD CB 80 86 ioe res.a 1, (hl) ; DB CB 8E ioe res.a 1, (ix) ; DB FD CB 00 8E ioe res.a 1, (ix+127) ; DB FD CB 7F 8E ioe res.a 1, (ix-128) ; DB FD CB 80 8E ioe res.a 1, (iy) ; DB DD CB 00 8E ioe res.a 1, (iy+127) ; DB DD CB 7F 8E ioe res.a 1, (iy-128) ; DB DD CB 80 8E ioe res.a 2, (hl) ; DB CB 96 ioe res.a 2, (ix) ; DB FD CB 00 96 ioe res.a 2, (ix+127) ; DB FD CB 7F 96 ioe res.a 2, (ix-128) ; DB FD CB 80 96 ioe res.a 2, (iy) ; DB DD CB 00 96 ioe res.a 2, (iy+127) ; DB DD CB 7F 96 ioe res.a 2, (iy-128) ; DB DD CB 80 96 ioe res.a 3, (hl) ; DB CB 9E ioe res.a 3, (ix) ; DB FD CB 00 9E ioe res.a 3, (ix+127) ; DB FD CB 7F 9E ioe res.a 3, (ix-128) ; DB FD CB 80 9E ioe res.a 3, (iy) ; DB DD CB 00 9E ioe res.a 3, (iy+127) ; DB DD CB 7F 9E ioe res.a 3, (iy-128) ; DB DD CB 80 9E ioe res.a 4, (hl) ; DB CB A6 ioe res.a 4, (ix) ; DB FD CB 00 A6 ioe res.a 4, (ix+127) ; DB FD CB 7F A6 ioe res.a 4, (ix-128) ; DB FD CB 80 A6 ioe res.a 4, (iy) ; DB DD CB 00 A6 ioe res.a 4, (iy+127) ; DB DD CB 7F A6 ioe res.a 4, (iy-128) ; DB DD CB 80 A6 ioe res.a 5, (hl) ; DB CB AE ioe res.a 5, (ix) ; DB FD CB 00 AE ioe res.a 5, (ix+127) ; DB FD CB 7F AE ioe res.a 5, (ix-128) ; DB FD CB 80 AE ioe res.a 5, (iy) ; DB DD CB 00 AE ioe res.a 5, (iy+127) ; DB DD CB 7F AE ioe res.a 5, (iy-128) ; DB DD CB 80 AE ioe res.a 6, (hl) ; DB CB B6 ioe res.a 6, (ix) ; DB FD CB 00 B6 ioe res.a 6, (ix+127) ; DB FD CB 7F B6 ioe res.a 6, (ix-128) ; DB FD CB 80 B6 ioe res.a 6, (iy) ; DB DD CB 00 B6 ioe res.a 6, (iy+127) ; DB DD CB 7F B6 ioe res.a 6, (iy-128) ; DB DD CB 80 B6 ioe res.a 7, (hl) ; DB CB BE ioe res.a 7, (ix) ; DB FD CB 00 BE ioe res.a 7, (ix+127) ; DB FD CB 7F BE ioe res.a 7, (ix-128) ; DB FD CB 80 BE ioe res.a 7, (iy) ; DB DD CB 00 BE ioe res.a 7, (iy+127) ; DB DD CB 7F BE ioe res.a 7, (iy-128) ; DB DD CB 80 BE ioe rl (hl) ; DB CB 16 ioe rl (ix) ; DB FD CB 00 16 ioe rl (ix+127) ; DB FD CB 7F 16 ioe rl (ix-128) ; DB FD CB 80 16 ioe rl (iy) ; DB DD CB 00 16 ioe rl (iy+127) ; DB DD CB 7F 16 ioe rl (iy-128) ; DB DD CB 80 16 ioe rlc (hl) ; DB CB 06 ioe rlc (ix) ; DB FD CB 00 06 ioe rlc (ix+127) ; DB FD CB 7F 06 ioe rlc (ix-128) ; DB FD CB 80 06 ioe rlc (iy) ; DB DD CB 00 06 ioe rlc (iy+127) ; DB DD CB 7F 06 ioe rlc (iy-128) ; DB DD CB 80 06 ioe rr (hl) ; DB CB 1E ioe rr (ix) ; DB FD CB 00 1E ioe rr (ix+127) ; DB FD CB 7F 1E ioe rr (ix-128) ; DB FD CB 80 1E ioe rr (iy) ; DB DD CB 00 1E ioe rr (iy+127) ; DB DD CB 7F 1E ioe rr (iy-128) ; DB DD CB 80 1E ioe rrc (hl) ; DB CB 0E ioe rrc (ix) ; DB FD CB 00 0E ioe rrc (ix+127) ; DB FD CB 7F 0E ioe rrc (ix-128) ; DB FD CB 80 0E ioe rrc (iy) ; DB DD CB 00 0E ioe rrc (iy+127) ; DB DD CB 7F 0E ioe rrc (iy-128) ; DB DD CB 80 0E ioe sbc (hl) ; DB 9E ioe sbc (ix) ; DB FD 9E 00 ioe sbc (ix+127) ; DB FD 9E 7F ioe sbc (ix-128) ; DB FD 9E 80 ioe sbc (iy) ; DB DD 9E 00 ioe sbc (iy+127) ; DB DD 9E 7F ioe sbc (iy-128) ; DB DD 9E 80 ioe sbc a', (hl) ; DB 76 9E ioe sbc a', (ix) ; DB 76 FD 9E 00 ioe sbc a', (ix+127) ; DB 76 FD 9E 7F ioe sbc a', (ix-128) ; DB 76 FD 9E 80 ioe sbc a', (iy) ; DB 76 DD 9E 00 ioe sbc a', (iy+127) ; DB 76 DD 9E 7F ioe sbc a', (iy-128) ; DB 76 DD 9E 80 ioe sbc a, (hl) ; DB 9E ioe sbc a, (ix) ; DB FD 9E 00 ioe sbc a, (ix+127) ; DB FD 9E 7F ioe sbc a, (ix-128) ; DB FD 9E 80 ioe sbc a, (iy) ; DB DD 9E 00 ioe sbc a, (iy+127) ; DB DD 9E 7F ioe sbc a, (iy-128) ; DB DD 9E 80 ioe set 0, (hl) ; DB CB C6 ioe set 0, (ix) ; DB FD CB 00 C6 ioe set 0, (ix+127) ; DB FD CB 7F C6 ioe set 0, (ix-128) ; DB FD CB 80 C6 ioe set 0, (iy) ; DB DD CB 00 C6 ioe set 0, (iy+127) ; DB DD CB 7F C6 ioe set 0, (iy-128) ; DB DD CB 80 C6 ioe set 1, (hl) ; DB CB CE ioe set 1, (ix) ; DB FD CB 00 CE ioe set 1, (ix+127) ; DB FD CB 7F CE ioe set 1, (ix-128) ; DB FD CB 80 CE ioe set 1, (iy) ; DB DD CB 00 CE ioe set 1, (iy+127) ; DB DD CB 7F CE ioe set 1, (iy-128) ; DB DD CB 80 CE ioe set 2, (hl) ; DB CB D6 ioe set 2, (ix) ; DB FD CB 00 D6 ioe set 2, (ix+127) ; DB FD CB 7F D6 ioe set 2, (ix-128) ; DB FD CB 80 D6 ioe set 2, (iy) ; DB DD CB 00 D6 ioe set 2, (iy+127) ; DB DD CB 7F D6 ioe set 2, (iy-128) ; DB DD CB 80 D6 ioe set 3, (hl) ; DB CB DE ioe set 3, (ix) ; DB FD CB 00 DE ioe set 3, (ix+127) ; DB FD CB 7F DE ioe set 3, (ix-128) ; DB FD CB 80 DE ioe set 3, (iy) ; DB DD CB 00 DE ioe set 3, (iy+127) ; DB DD CB 7F DE ioe set 3, (iy-128) ; DB DD CB 80 DE ioe set 4, (hl) ; DB CB E6 ioe set 4, (ix) ; DB FD CB 00 E6 ioe set 4, (ix+127) ; DB FD CB 7F E6 ioe set 4, (ix-128) ; DB FD CB 80 E6 ioe set 4, (iy) ; DB DD CB 00 E6 ioe set 4, (iy+127) ; DB DD CB 7F E6 ioe set 4, (iy-128) ; DB DD CB 80 E6 ioe set 5, (hl) ; DB CB EE ioe set 5, (ix) ; DB FD CB 00 EE ioe set 5, (ix+127) ; DB FD CB 7F EE ioe set 5, (ix-128) ; DB FD CB 80 EE ioe set 5, (iy) ; DB DD CB 00 EE ioe set 5, (iy+127) ; DB DD CB 7F EE ioe set 5, (iy-128) ; DB DD CB 80 EE ioe set 6, (hl) ; DB CB F6 ioe set 6, (ix) ; DB FD CB 00 F6 ioe set 6, (ix+127) ; DB FD CB 7F F6 ioe set 6, (ix-128) ; DB FD CB 80 F6 ioe set 6, (iy) ; DB DD CB 00 F6 ioe set 6, (iy+127) ; DB DD CB 7F F6 ioe set 6, (iy-128) ; DB DD CB 80 F6 ioe set 7, (hl) ; DB CB FE ioe set 7, (ix) ; DB FD CB 00 FE ioe set 7, (ix+127) ; DB FD CB 7F FE ioe set 7, (ix-128) ; DB FD CB 80 FE ioe set 7, (iy) ; DB DD CB 00 FE ioe set 7, (iy+127) ; DB DD CB 7F FE ioe set 7, (iy-128) ; DB DD CB 80 FE ioe set.a 0, (hl) ; DB CB C6 ioe set.a 0, (ix) ; DB FD CB 00 C6 ioe set.a 0, (ix+127) ; DB FD CB 7F C6 ioe set.a 0, (ix-128) ; DB FD CB 80 C6 ioe set.a 0, (iy) ; DB DD CB 00 C6 ioe set.a 0, (iy+127) ; DB DD CB 7F C6 ioe set.a 0, (iy-128) ; DB DD CB 80 C6 ioe set.a 1, (hl) ; DB CB CE ioe set.a 1, (ix) ; DB FD CB 00 CE ioe set.a 1, (ix+127) ; DB FD CB 7F CE ioe set.a 1, (ix-128) ; DB FD CB 80 CE ioe set.a 1, (iy) ; DB DD CB 00 CE ioe set.a 1, (iy+127) ; DB DD CB 7F CE ioe set.a 1, (iy-128) ; DB DD CB 80 CE ioe set.a 2, (hl) ; DB CB D6 ioe set.a 2, (ix) ; DB FD CB 00 D6 ioe set.a 2, (ix+127) ; DB FD CB 7F D6 ioe set.a 2, (ix-128) ; DB FD CB 80 D6 ioe set.a 2, (iy) ; DB DD CB 00 D6 ioe set.a 2, (iy+127) ; DB DD CB 7F D6 ioe set.a 2, (iy-128) ; DB DD CB 80 D6 ioe set.a 3, (hl) ; DB CB DE ioe set.a 3, (ix) ; DB FD CB 00 DE ioe set.a 3, (ix+127) ; DB FD CB 7F DE ioe set.a 3, (ix-128) ; DB FD CB 80 DE ioe set.a 3, (iy) ; DB DD CB 00 DE ioe set.a 3, (iy+127) ; DB DD CB 7F DE ioe set.a 3, (iy-128) ; DB DD CB 80 DE ioe set.a 4, (hl) ; DB CB E6 ioe set.a 4, (ix) ; DB FD CB 00 E6 ioe set.a 4, (ix+127) ; DB FD CB 7F E6 ioe set.a 4, (ix-128) ; DB FD CB 80 E6 ioe set.a 4, (iy) ; DB DD CB 00 E6 ioe set.a 4, (iy+127) ; DB DD CB 7F E6 ioe set.a 4, (iy-128) ; DB DD CB 80 E6 ioe set.a 5, (hl) ; DB CB EE ioe set.a 5, (ix) ; DB FD CB 00 EE ioe set.a 5, (ix+127) ; DB FD CB 7F EE ioe set.a 5, (ix-128) ; DB FD CB 80 EE ioe set.a 5, (iy) ; DB DD CB 00 EE ioe set.a 5, (iy+127) ; DB DD CB 7F EE ioe set.a 5, (iy-128) ; DB DD CB 80 EE ioe set.a 6, (hl) ; DB CB F6 ioe set.a 6, (ix) ; DB FD CB 00 F6 ioe set.a 6, (ix+127) ; DB FD CB 7F F6 ioe set.a 6, (ix-128) ; DB FD CB 80 F6 ioe set.a 6, (iy) ; DB DD CB 00 F6 ioe set.a 6, (iy+127) ; DB DD CB 7F F6 ioe set.a 6, (iy-128) ; DB DD CB 80 F6 ioe set.a 7, (hl) ; DB CB FE ioe set.a 7, (ix) ; DB FD CB 00 FE ioe set.a 7, (ix+127) ; DB FD CB 7F FE ioe set.a 7, (ix-128) ; DB FD CB 80 FE ioe set.a 7, (iy) ; DB DD CB 00 FE ioe set.a 7, (iy+127) ; DB DD CB 7F FE ioe set.a 7, (iy-128) ; DB DD CB 80 FE ioe sla (hl) ; DB CB 26 ioe sla (ix) ; DB FD CB 00 26 ioe sla (ix+127) ; DB FD CB 7F 26 ioe sla (ix-128) ; DB FD CB 80 26 ioe sla (iy) ; DB DD CB 00 26 ioe sla (iy+127) ; DB DD CB 7F 26 ioe sla (iy-128) ; DB DD CB 80 26 ioe sra (hl) ; DB CB 2E ioe sra (ix) ; DB FD CB 00 2E ioe sra (ix+127) ; DB FD CB 7F 2E ioe sra (ix-128) ; DB FD CB 80 2E ioe sra (iy) ; DB DD CB 00 2E ioe sra (iy+127) ; DB DD CB 7F 2E ioe sra (iy-128) ; DB DD CB 80 2E ioe srl (hl) ; DB CB 3E ioe srl (ix) ; DB FD CB 00 3E ioe srl (ix+127) ; DB FD CB 7F 3E ioe srl (ix-128) ; DB FD CB 80 3E ioe srl (iy) ; DB DD CB 00 3E ioe srl (iy+127) ; DB DD CB 7F 3E ioe srl (iy-128) ; DB DD CB 80 3E ioe sub (hl) ; DB 96 ioe sub (ix) ; DB FD 96 00 ioe sub (ix+127) ; DB FD 96 7F ioe sub (ix-128) ; DB FD 96 80 ioe sub (iy) ; DB DD 96 00 ioe sub (iy+127) ; DB DD 96 7F ioe sub (iy-128) ; DB DD 96 80 ioe sub a', (hl) ; DB 76 96 ioe sub a', (ix) ; DB 76 FD 96 00 ioe sub a', (ix+127) ; DB 76 FD 96 7F ioe sub a', (ix-128) ; DB 76 FD 96 80 ioe sub a', (iy) ; DB 76 DD 96 00 ioe sub a', (iy+127) ; DB 76 DD 96 7F ioe sub a', (iy-128) ; DB 76 DD 96 80 ioe sub a, (hl) ; DB 96 ioe sub a, (ix) ; DB FD 96 00 ioe sub a, (ix+127) ; DB FD 96 7F ioe sub a, (ix-128) ; DB FD 96 80 ioe sub a, (iy) ; DB DD 96 00 ioe sub a, (iy+127) ; DB DD 96 7F ioe sub a, (iy-128) ; DB DD 96 80 ioe xor (hl) ; DB AE ioe xor (ix) ; DB FD AE 00 ioe xor (ix+127) ; DB FD AE 7F ioe xor (ix-128) ; DB FD AE 80 ioe xor (iy) ; DB DD AE 00 ioe xor (iy+127) ; DB DD AE 7F ioe xor (iy-128) ; DB DD AE 80 ioe xor a', (hl) ; DB 76 AE ioe xor a', (ix) ; DB 76 FD AE 00 ioe xor a', (ix+127) ; DB 76 FD AE 7F ioe xor a', (ix-128) ; DB 76 FD AE 80 ioe xor a', (iy) ; DB 76 DD AE 00 ioe xor a', (iy+127) ; DB 76 DD AE 7F ioe xor a', (iy-128) ; DB 76 DD AE 80 ioe xor a, (hl) ; DB AE ioe xor a, (ix) ; DB FD AE 00 ioe xor a, (ix+127) ; DB FD AE 7F ioe xor a, (ix-128) ; DB FD AE 80 ioe xor a, (iy) ; DB DD AE 00 ioe xor a, (iy+127) ; DB DD AE 7F ioe xor a, (iy-128) ; DB DD AE 80 ioi adc (hl) ; D3 8E ioi adc (ix) ; D3 FD 8E 00 ioi adc (ix+127) ; D3 FD 8E 7F ioi adc (ix-128) ; D3 FD 8E 80 ioi adc (iy) ; D3 DD 8E 00 ioi adc (iy+127) ; D3 DD 8E 7F ioi adc (iy-128) ; D3 DD 8E 80 ioi adc a', (hl) ; D3 76 8E ioi adc a', (ix) ; D3 76 FD 8E 00 ioi adc a', (ix+127) ; D3 76 FD 8E 7F ioi adc a', (ix-128) ; D3 76 FD 8E 80 ioi adc a', (iy) ; D3 76 DD 8E 00 ioi adc a', (iy+127) ; D3 76 DD 8E 7F ioi adc a', (iy-128) ; D3 76 DD 8E 80 ioi adc a, (hl) ; D3 8E ioi adc a, (ix) ; D3 FD 8E 00 ioi adc a, (ix+127) ; D3 FD 8E 7F ioi adc a, (ix-128) ; D3 FD 8E 80 ioi adc a, (iy) ; D3 DD 8E 00 ioi adc a, (iy+127) ; D3 DD 8E 7F ioi adc a, (iy-128) ; D3 DD 8E 80 ioi add (hl) ; D3 86 ioi add (ix) ; D3 FD 86 00 ioi add (ix+127) ; D3 FD 86 7F ioi add (ix-128) ; D3 FD 86 80 ioi add (iy) ; D3 DD 86 00 ioi add (iy+127) ; D3 DD 86 7F ioi add (iy-128) ; D3 DD 86 80 ioi add a', (hl) ; D3 76 86 ioi add a', (ix) ; D3 76 FD 86 00 ioi add a', (ix+127) ; D3 76 FD 86 7F ioi add a', (ix-128) ; D3 76 FD 86 80 ioi add a', (iy) ; D3 76 DD 86 00 ioi add a', (iy+127) ; D3 76 DD 86 7F ioi add a', (iy-128) ; D3 76 DD 86 80 ioi add a, (hl) ; D3 86 ioi add a, (ix) ; D3 FD 86 00 ioi add a, (ix+127) ; D3 FD 86 7F ioi add a, (ix-128) ; D3 FD 86 80 ioi add a, (iy) ; D3 DD 86 00 ioi add a, (iy+127) ; D3 DD 86 7F ioi add a, (iy-128) ; D3 DD 86 80 ioi altd adc (hl) ; D3 76 8E ioi altd adc (ix) ; D3 76 FD 8E 00 ioi altd adc (ix+127) ; D3 76 FD 8E 7F ioi altd adc (ix-128) ; D3 76 FD 8E 80 ioi altd adc (iy) ; D3 76 DD 8E 00 ioi altd adc (iy+127) ; D3 76 DD 8E 7F ioi altd adc (iy-128) ; D3 76 DD 8E 80 ioi altd adc a, (hl) ; D3 76 8E ioi altd adc a, (ix) ; D3 76 FD 8E 00 ioi altd adc a, (ix+127) ; D3 76 FD 8E 7F ioi altd adc a, (ix-128) ; D3 76 FD 8E 80 ioi altd adc a, (iy) ; D3 76 DD 8E 00 ioi altd adc a, (iy+127) ; D3 76 DD 8E 7F ioi altd adc a, (iy-128) ; D3 76 DD 8E 80 ioi altd add (hl) ; D3 76 86 ioi altd add (ix) ; D3 76 FD 86 00 ioi altd add (ix+127) ; D3 76 FD 86 7F ioi altd add (ix-128) ; D3 76 FD 86 80 ioi altd add (iy) ; D3 76 DD 86 00 ioi altd add (iy+127) ; D3 76 DD 86 7F ioi altd add (iy-128) ; D3 76 DD 86 80 ioi altd add a, (hl) ; D3 76 86 ioi altd add a, (ix) ; D3 76 FD 86 00 ioi altd add a, (ix+127) ; D3 76 FD 86 7F ioi altd add a, (ix-128) ; D3 76 FD 86 80 ioi altd add a, (iy) ; D3 76 DD 86 00 ioi altd add a, (iy+127) ; D3 76 DD 86 7F ioi altd add a, (iy-128) ; D3 76 DD 86 80 ioi altd and (hl) ; D3 76 A6 ioi altd and (ix) ; D3 76 FD A6 00 ioi altd and (ix+127) ; D3 76 FD A6 7F ioi altd and (ix-128) ; D3 76 FD A6 80 ioi altd and (iy) ; D3 76 DD A6 00 ioi altd and (iy+127) ; D3 76 DD A6 7F ioi altd and (iy-128) ; D3 76 DD A6 80 ioi altd and a, (hl) ; D3 76 A6 ioi altd and a, (ix) ; D3 76 FD A6 00 ioi altd and a, (ix+127) ; D3 76 FD A6 7F ioi altd and a, (ix-128) ; D3 76 FD A6 80 ioi altd and a, (iy) ; D3 76 DD A6 00 ioi altd and a, (iy+127) ; D3 76 DD A6 7F ioi altd and a, (iy-128) ; D3 76 DD A6 80 ioi altd bit 0, (hl) ; D3 76 CB 46 ioi altd bit 0, (ix) ; D3 76 FD CB 00 46 ioi altd bit 0, (ix+127) ; D3 76 FD CB 7F 46 ioi altd bit 0, (ix-128) ; D3 76 FD CB 80 46 ioi altd bit 0, (iy) ; D3 76 DD CB 00 46 ioi altd bit 0, (iy+127) ; D3 76 DD CB 7F 46 ioi altd bit 0, (iy-128) ; D3 76 DD CB 80 46 ioi altd bit 1, (hl) ; D3 76 CB 4E ioi altd bit 1, (ix) ; D3 76 FD CB 00 4E ioi altd bit 1, (ix+127) ; D3 76 FD CB 7F 4E ioi altd bit 1, (ix-128) ; D3 76 FD CB 80 4E ioi altd bit 1, (iy) ; D3 76 DD CB 00 4E ioi altd bit 1, (iy+127) ; D3 76 DD CB 7F 4E ioi altd bit 1, (iy-128) ; D3 76 DD CB 80 4E ioi altd bit 2, (hl) ; D3 76 CB 56 ioi altd bit 2, (ix) ; D3 76 FD CB 00 56 ioi altd bit 2, (ix+127) ; D3 76 FD CB 7F 56 ioi altd bit 2, (ix-128) ; D3 76 FD CB 80 56 ioi altd bit 2, (iy) ; D3 76 DD CB 00 56 ioi altd bit 2, (iy+127) ; D3 76 DD CB 7F 56 ioi altd bit 2, (iy-128) ; D3 76 DD CB 80 56 ioi altd bit 3, (hl) ; D3 76 CB 5E ioi altd bit 3, (ix) ; D3 76 FD CB 00 5E ioi altd bit 3, (ix+127) ; D3 76 FD CB 7F 5E ioi altd bit 3, (ix-128) ; D3 76 FD CB 80 5E ioi altd bit 3, (iy) ; D3 76 DD CB 00 5E ioi altd bit 3, (iy+127) ; D3 76 DD CB 7F 5E ioi altd bit 3, (iy-128) ; D3 76 DD CB 80 5E ioi altd bit 4, (hl) ; D3 76 CB 66 ioi altd bit 4, (ix) ; D3 76 FD CB 00 66 ioi altd bit 4, (ix+127) ; D3 76 FD CB 7F 66 ioi altd bit 4, (ix-128) ; D3 76 FD CB 80 66 ioi altd bit 4, (iy) ; D3 76 DD CB 00 66 ioi altd bit 4, (iy+127) ; D3 76 DD CB 7F 66 ioi altd bit 4, (iy-128) ; D3 76 DD CB 80 66 ioi altd bit 5, (hl) ; D3 76 CB 6E ioi altd bit 5, (ix) ; D3 76 FD CB 00 6E ioi altd bit 5, (ix+127) ; D3 76 FD CB 7F 6E ioi altd bit 5, (ix-128) ; D3 76 FD CB 80 6E ioi altd bit 5, (iy) ; D3 76 DD CB 00 6E ioi altd bit 5, (iy+127) ; D3 76 DD CB 7F 6E ioi altd bit 5, (iy-128) ; D3 76 DD CB 80 6E ioi altd bit 6, (hl) ; D3 76 CB 76 ioi altd bit 6, (ix) ; D3 76 FD CB 00 76 ioi altd bit 6, (ix+127) ; D3 76 FD CB 7F 76 ioi altd bit 6, (ix-128) ; D3 76 FD CB 80 76 ioi altd bit 6, (iy) ; D3 76 DD CB 00 76 ioi altd bit 6, (iy+127) ; D3 76 DD CB 7F 76 ioi altd bit 6, (iy-128) ; D3 76 DD CB 80 76 ioi altd bit 7, (hl) ; D3 76 CB 7E ioi altd bit 7, (ix) ; D3 76 FD CB 00 7E ioi altd bit 7, (ix+127) ; D3 76 FD CB 7F 7E ioi altd bit 7, (ix-128) ; D3 76 FD CB 80 7E ioi altd bit 7, (iy) ; D3 76 DD CB 00 7E ioi altd bit 7, (iy+127) ; D3 76 DD CB 7F 7E ioi altd bit 7, (iy-128) ; D3 76 DD CB 80 7E ioi altd cp (hl) ; D3 76 BE ioi altd cp (ix) ; D3 76 FD BE 00 ioi altd cp (ix+127) ; D3 76 FD BE 7F ioi altd cp (ix-128) ; D3 76 FD BE 80 ioi altd cp (iy) ; D3 76 DD BE 00 ioi altd cp (iy+127) ; D3 76 DD BE 7F ioi altd cp (iy-128) ; D3 76 DD BE 80 ioi altd cp a, (hl) ; D3 76 BE ioi altd cp a, (ix) ; D3 76 FD BE 00 ioi altd cp a, (ix+127) ; D3 76 FD BE 7F ioi altd cp a, (ix-128) ; D3 76 FD BE 80 ioi altd cp a, (iy) ; D3 76 DD BE 00 ioi altd cp a, (iy+127) ; D3 76 DD BE 7F ioi altd cp a, (iy-128) ; D3 76 DD BE 80 ioi altd dec (hl) ; D3 76 35 ioi altd dec (ix) ; D3 76 FD 35 00 ioi altd dec (ix+127) ; D3 76 FD 35 7F ioi altd dec (ix-128) ; D3 76 FD 35 80 ioi altd dec (iy) ; D3 76 DD 35 00 ioi altd dec (iy+127) ; D3 76 DD 35 7F ioi altd dec (iy-128) ; D3 76 DD 35 80 ioi altd inc (hl) ; D3 76 34 ioi altd inc (ix) ; D3 76 FD 34 00 ioi altd inc (ix+127) ; D3 76 FD 34 7F ioi altd inc (ix-128) ; D3 76 FD 34 80 ioi altd inc (iy) ; D3 76 DD 34 00 ioi altd inc (iy+127) ; D3 76 DD 34 7F ioi altd inc (iy-128) ; D3 76 DD 34 80 ioi altd ld a, (-32768) ; D3 76 3A 00 80 ioi altd ld a, (32767) ; D3 76 3A FF 7F ioi altd ld a, (65535) ; D3 76 3A FF FF ioi altd ld a, (bc) ; D3 76 0A ioi altd ld a, (bc+) ; D3 76 0A 03 ioi altd ld a, (bc-) ; D3 76 0A 0B ioi altd ld a, (de) ; D3 76 1A ioi altd ld a, (de+) ; D3 76 1A 13 ioi altd ld a, (de-) ; D3 76 1A 1B ioi altd ld a, (hl) ; D3 76 7E ioi altd ld a, (hl+) ; D3 76 7E 23 ioi altd ld a, (hl-) ; D3 76 7E 2B ioi altd ld a, (hld) ; D3 76 7E 2B ioi altd ld a, (hli) ; D3 76 7E 23 ioi altd ld a, (ix) ; D3 76 FD 7E 00 ioi altd ld a, (ix+127) ; D3 76 FD 7E 7F ioi altd ld a, (ix-128) ; D3 76 FD 7E 80 ioi altd ld a, (iy) ; D3 76 DD 7E 00 ioi altd ld a, (iy+127) ; D3 76 DD 7E 7F ioi altd ld a, (iy-128) ; D3 76 DD 7E 80 ioi altd ld b, (hl) ; D3 76 46 ioi altd ld b, (ix) ; D3 76 FD 46 00 ioi altd ld b, (ix+127) ; D3 76 FD 46 7F ioi altd ld b, (ix-128) ; D3 76 FD 46 80 ioi altd ld b, (iy) ; D3 76 DD 46 00 ioi altd ld b, (iy+127) ; D3 76 DD 46 7F ioi altd ld b, (iy-128) ; D3 76 DD 46 80 ioi altd ld bc, (-32768) ; D3 76 ED 4B 00 80 ioi altd ld bc, (32767) ; D3 76 ED 4B FF 7F ioi altd ld bc, (65535) ; D3 76 ED 4B FF FF ioi altd ld c, (hl) ; D3 76 4E ioi altd ld c, (ix) ; D3 76 FD 4E 00 ioi altd ld c, (ix+127) ; D3 76 FD 4E 7F ioi altd ld c, (ix-128) ; D3 76 FD 4E 80 ioi altd ld c, (iy) ; D3 76 DD 4E 00 ioi altd ld c, (iy+127) ; D3 76 DD 4E 7F ioi altd ld c, (iy-128) ; D3 76 DD 4E 80 ioi altd ld d, (hl) ; D3 76 56 ioi altd ld d, (ix) ; D3 76 FD 56 00 ioi altd ld d, (ix+127) ; D3 76 FD 56 7F ioi altd ld d, (ix-128) ; D3 76 FD 56 80 ioi altd ld d, (iy) ; D3 76 DD 56 00 ioi altd ld d, (iy+127) ; D3 76 DD 56 7F ioi altd ld d, (iy-128) ; D3 76 DD 56 80 ioi altd ld de, (-32768) ; D3 76 ED 5B 00 80 ioi altd ld de, (32767) ; D3 76 ED 5B FF 7F ioi altd ld de, (65535) ; D3 76 ED 5B FF FF ioi altd ld e, (hl) ; D3 76 5E ioi altd ld e, (ix) ; D3 76 FD 5E 00 ioi altd ld e, (ix+127) ; D3 76 FD 5E 7F ioi altd ld e, (ix-128) ; D3 76 FD 5E 80 ioi altd ld e, (iy) ; D3 76 DD 5E 00 ioi altd ld e, (iy+127) ; D3 76 DD 5E 7F ioi altd ld e, (iy-128) ; D3 76 DD 5E 80 ioi altd ld h, (hl) ; D3 76 66 ioi altd ld h, (ix) ; D3 76 FD 66 00 ioi altd ld h, (ix+127) ; D3 76 FD 66 7F ioi altd ld h, (ix-128) ; D3 76 FD 66 80 ioi altd ld h, (iy) ; D3 76 DD 66 00 ioi altd ld h, (iy+127) ; D3 76 DD 66 7F ioi altd ld h, (iy-128) ; D3 76 DD 66 80 ioi altd ld hl, (-32768) ; D3 76 2A 00 80 ioi altd ld hl, (32767) ; D3 76 2A FF 7F ioi altd ld hl, (65535) ; D3 76 2A FF FF ioi altd ld hl, (hl) ; D3 76 DD E4 00 ioi altd ld hl, (hl+127) ; D3 76 DD E4 7F ioi altd ld hl, (hl-128) ; D3 76 DD E4 80 ioi altd ld hl, (ix) ; D3 76 FD E4 00 ioi altd ld hl, (ix+127) ; D3 76 FD E4 7F ioi altd ld hl, (ix-128) ; D3 76 FD E4 80 ioi altd ld hl, (iy) ; D3 76 E4 00 ioi altd ld hl, (iy+127) ; D3 76 E4 7F ioi altd ld hl, (iy-128) ; D3 76 E4 80 ioi altd ld l, (hl) ; D3 76 6E ioi altd ld l, (ix) ; D3 76 FD 6E 00 ioi altd ld l, (ix+127) ; D3 76 FD 6E 7F ioi altd ld l, (ix-128) ; D3 76 FD 6E 80 ioi altd ld l, (iy) ; D3 76 DD 6E 00 ioi altd ld l, (iy+127) ; D3 76 DD 6E 7F ioi altd ld l, (iy-128) ; D3 76 DD 6E 80 ioi altd or (hl) ; D3 76 B6 ioi altd or (ix) ; D3 76 FD B6 00 ioi altd or (ix+127) ; D3 76 FD B6 7F ioi altd or (ix-128) ; D3 76 FD B6 80 ioi altd or (iy) ; D3 76 DD B6 00 ioi altd or (iy+127) ; D3 76 DD B6 7F ioi altd or (iy-128) ; D3 76 DD B6 80 ioi altd or a, (hl) ; D3 76 B6 ioi altd or a, (ix) ; D3 76 FD B6 00 ioi altd or a, (ix+127) ; D3 76 FD B6 7F ioi altd or a, (ix-128) ; D3 76 FD B6 80 ioi altd or a, (iy) ; D3 76 DD B6 00 ioi altd or a, (iy+127) ; D3 76 DD B6 7F ioi altd or a, (iy-128) ; D3 76 DD B6 80 ioi altd rl (hl) ; D3 76 CB 16 ioi altd rl (ix) ; D3 76 FD CB 00 16 ioi altd rl (ix+127) ; D3 76 FD CB 7F 16 ioi altd rl (ix-128) ; D3 76 FD CB 80 16 ioi altd rl (iy) ; D3 76 DD CB 00 16 ioi altd rl (iy+127) ; D3 76 DD CB 7F 16 ioi altd rl (iy-128) ; D3 76 DD CB 80 16 ioi altd rlc (hl) ; D3 76 CB 06 ioi altd rlc (ix) ; D3 76 FD CB 00 06 ioi altd rlc (ix+127) ; D3 76 FD CB 7F 06 ioi altd rlc (ix-128) ; D3 76 FD CB 80 06 ioi altd rlc (iy) ; D3 76 DD CB 00 06 ioi altd rlc (iy+127) ; D3 76 DD CB 7F 06 ioi altd rlc (iy-128) ; D3 76 DD CB 80 06 ioi altd rr (hl) ; D3 76 CB 1E ioi altd rr (ix) ; D3 76 FD CB 00 1E ioi altd rr (ix+127) ; D3 76 FD CB 7F 1E ioi altd rr (ix-128) ; D3 76 FD CB 80 1E ioi altd rr (iy) ; D3 76 DD CB 00 1E ioi altd rr (iy+127) ; D3 76 DD CB 7F 1E ioi altd rr (iy-128) ; D3 76 DD CB 80 1E ioi altd rrc (hl) ; D3 76 CB 0E ioi altd rrc (ix) ; D3 76 FD CB 00 0E ioi altd rrc (ix+127) ; D3 76 FD CB 7F 0E ioi altd rrc (ix-128) ; D3 76 FD CB 80 0E ioi altd rrc (iy) ; D3 76 DD CB 00 0E ioi altd rrc (iy+127) ; D3 76 DD CB 7F 0E ioi altd rrc (iy-128) ; D3 76 DD CB 80 0E ioi altd sbc (hl) ; D3 76 9E ioi altd sbc (ix) ; D3 76 FD 9E 00 ioi altd sbc (ix+127) ; D3 76 FD 9E 7F ioi altd sbc (ix-128) ; D3 76 FD 9E 80 ioi altd sbc (iy) ; D3 76 DD 9E 00 ioi altd sbc (iy+127) ; D3 76 DD 9E 7F ioi altd sbc (iy-128) ; D3 76 DD 9E 80 ioi altd sbc a, (hl) ; D3 76 9E ioi altd sbc a, (ix) ; D3 76 FD 9E 00 ioi altd sbc a, (ix+127) ; D3 76 FD 9E 7F ioi altd sbc a, (ix-128) ; D3 76 FD 9E 80 ioi altd sbc a, (iy) ; D3 76 DD 9E 00 ioi altd sbc a, (iy+127) ; D3 76 DD 9E 7F ioi altd sbc a, (iy-128) ; D3 76 DD 9E 80 ioi altd sla (hl) ; D3 76 CB 26 ioi altd sla (ix) ; D3 76 FD CB 00 26 ioi altd sla (ix+127) ; D3 76 FD CB 7F 26 ioi altd sla (ix-128) ; D3 76 FD CB 80 26 ioi altd sla (iy) ; D3 76 DD CB 00 26 ioi altd sla (iy+127) ; D3 76 DD CB 7F 26 ioi altd sla (iy-128) ; D3 76 DD CB 80 26 ioi altd sra (hl) ; D3 76 CB 2E ioi altd sra (ix) ; D3 76 FD CB 00 2E ioi altd sra (ix+127) ; D3 76 FD CB 7F 2E ioi altd sra (ix-128) ; D3 76 FD CB 80 2E ioi altd sra (iy) ; D3 76 DD CB 00 2E ioi altd sra (iy+127) ; D3 76 DD CB 7F 2E ioi altd sra (iy-128) ; D3 76 DD CB 80 2E ioi altd srl (hl) ; D3 76 CB 3E ioi altd srl (ix) ; D3 76 FD CB 00 3E ioi altd srl (ix+127) ; D3 76 FD CB 7F 3E ioi altd srl (ix-128) ; D3 76 FD CB 80 3E ioi altd srl (iy) ; D3 76 DD CB 00 3E ioi altd srl (iy+127) ; D3 76 DD CB 7F 3E ioi altd srl (iy-128) ; D3 76 DD CB 80 3E ioi altd sub (hl) ; D3 76 96 ioi altd sub (ix) ; D3 76 FD 96 00 ioi altd sub (ix+127) ; D3 76 FD 96 7F ioi altd sub (ix-128) ; D3 76 FD 96 80 ioi altd sub (iy) ; D3 76 DD 96 00 ioi altd sub (iy+127) ; D3 76 DD 96 7F ioi altd sub (iy-128) ; D3 76 DD 96 80 ioi altd sub a, (hl) ; D3 76 96 ioi altd sub a, (ix) ; D3 76 FD 96 00 ioi altd sub a, (ix+127) ; D3 76 FD 96 7F ioi altd sub a, (ix-128) ; D3 76 FD 96 80 ioi altd sub a, (iy) ; D3 76 DD 96 00 ioi altd sub a, (iy+127) ; D3 76 DD 96 7F ioi altd sub a, (iy-128) ; D3 76 DD 96 80 ioi altd xor (hl) ; D3 76 AE ioi altd xor (ix) ; D3 76 FD AE 00 ioi altd xor (ix+127) ; D3 76 FD AE 7F ioi altd xor (ix-128) ; D3 76 FD AE 80 ioi altd xor (iy) ; D3 76 DD AE 00 ioi altd xor (iy+127) ; D3 76 DD AE 7F ioi altd xor (iy-128) ; D3 76 DD AE 80 ioi altd xor a, (hl) ; D3 76 AE ioi altd xor a, (ix) ; D3 76 FD AE 00 ioi altd xor a, (ix+127) ; D3 76 FD AE 7F ioi altd xor a, (ix-128) ; D3 76 FD AE 80 ioi altd xor a, (iy) ; D3 76 DD AE 00 ioi altd xor a, (iy+127) ; D3 76 DD AE 7F ioi altd xor a, (iy-128) ; D3 76 DD AE 80 ioi and (hl) ; D3 A6 ioi and (ix) ; D3 FD A6 00 ioi and (ix+127) ; D3 FD A6 7F ioi and (ix-128) ; D3 FD A6 80 ioi and (iy) ; D3 DD A6 00 ioi and (iy+127) ; D3 DD A6 7F ioi and (iy-128) ; D3 DD A6 80 ioi and a', (hl) ; D3 76 A6 ioi and a', (ix) ; D3 76 FD A6 00 ioi and a', (ix+127) ; D3 76 FD A6 7F ioi and a', (ix-128) ; D3 76 FD A6 80 ioi and a', (iy) ; D3 76 DD A6 00 ioi and a', (iy+127) ; D3 76 DD A6 7F ioi and a', (iy-128) ; D3 76 DD A6 80 ioi and a, (hl) ; D3 A6 ioi and a, (ix) ; D3 FD A6 00 ioi and a, (ix+127) ; D3 FD A6 7F ioi and a, (ix-128) ; D3 FD A6 80 ioi and a, (iy) ; D3 DD A6 00 ioi and a, (iy+127) ; D3 DD A6 7F ioi and a, (iy-128) ; D3 DD A6 80 ioi bit 0, (hl) ; D3 CB 46 ioi bit 0, (ix) ; D3 FD CB 00 46 ioi bit 0, (ix+127) ; D3 FD CB 7F 46 ioi bit 0, (ix-128) ; D3 FD CB 80 46 ioi bit 0, (iy) ; D3 DD CB 00 46 ioi bit 0, (iy+127) ; D3 DD CB 7F 46 ioi bit 0, (iy-128) ; D3 DD CB 80 46 ioi bit 1, (hl) ; D3 CB 4E ioi bit 1, (ix) ; D3 FD CB 00 4E ioi bit 1, (ix+127) ; D3 FD CB 7F 4E ioi bit 1, (ix-128) ; D3 FD CB 80 4E ioi bit 1, (iy) ; D3 DD CB 00 4E ioi bit 1, (iy+127) ; D3 DD CB 7F 4E ioi bit 1, (iy-128) ; D3 DD CB 80 4E ioi bit 2, (hl) ; D3 CB 56 ioi bit 2, (ix) ; D3 FD CB 00 56 ioi bit 2, (ix+127) ; D3 FD CB 7F 56 ioi bit 2, (ix-128) ; D3 FD CB 80 56 ioi bit 2, (iy) ; D3 DD CB 00 56 ioi bit 2, (iy+127) ; D3 DD CB 7F 56 ioi bit 2, (iy-128) ; D3 DD CB 80 56 ioi bit 3, (hl) ; D3 CB 5E ioi bit 3, (ix) ; D3 FD CB 00 5E ioi bit 3, (ix+127) ; D3 FD CB 7F 5E ioi bit 3, (ix-128) ; D3 FD CB 80 5E ioi bit 3, (iy) ; D3 DD CB 00 5E ioi bit 3, (iy+127) ; D3 DD CB 7F 5E ioi bit 3, (iy-128) ; D3 DD CB 80 5E ioi bit 4, (hl) ; D3 CB 66 ioi bit 4, (ix) ; D3 FD CB 00 66 ioi bit 4, (ix+127) ; D3 FD CB 7F 66 ioi bit 4, (ix-128) ; D3 FD CB 80 66 ioi bit 4, (iy) ; D3 DD CB 00 66 ioi bit 4, (iy+127) ; D3 DD CB 7F 66 ioi bit 4, (iy-128) ; D3 DD CB 80 66 ioi bit 5, (hl) ; D3 CB 6E ioi bit 5, (ix) ; D3 FD CB 00 6E ioi bit 5, (ix+127) ; D3 FD CB 7F 6E ioi bit 5, (ix-128) ; D3 FD CB 80 6E ioi bit 5, (iy) ; D3 DD CB 00 6E ioi bit 5, (iy+127) ; D3 DD CB 7F 6E ioi bit 5, (iy-128) ; D3 DD CB 80 6E ioi bit 6, (hl) ; D3 CB 76 ioi bit 6, (ix) ; D3 FD CB 00 76 ioi bit 6, (ix+127) ; D3 FD CB 7F 76 ioi bit 6, (ix-128) ; D3 FD CB 80 76 ioi bit 6, (iy) ; D3 DD CB 00 76 ioi bit 6, (iy+127) ; D3 DD CB 7F 76 ioi bit 6, (iy-128) ; D3 DD CB 80 76 ioi bit 7, (hl) ; D3 CB 7E ioi bit 7, (ix) ; D3 FD CB 00 7E ioi bit 7, (ix+127) ; D3 FD CB 7F 7E ioi bit 7, (ix-128) ; D3 FD CB 80 7E ioi bit 7, (iy) ; D3 DD CB 00 7E ioi bit 7, (iy+127) ; D3 DD CB 7F 7E ioi bit 7, (iy-128) ; D3 DD CB 80 7E ioi bit.a 0, (hl) ; D3 CB 46 ioi bit.a 0, (ix) ; D3 FD CB 00 46 ioi bit.a 0, (ix+127) ; D3 FD CB 7F 46 ioi bit.a 0, (ix-128) ; D3 FD CB 80 46 ioi bit.a 0, (iy) ; D3 DD CB 00 46 ioi bit.a 0, (iy+127) ; D3 DD CB 7F 46 ioi bit.a 0, (iy-128) ; D3 DD CB 80 46 ioi bit.a 1, (hl) ; D3 CB 4E ioi bit.a 1, (ix) ; D3 FD CB 00 4E ioi bit.a 1, (ix+127) ; D3 FD CB 7F 4E ioi bit.a 1, (ix-128) ; D3 FD CB 80 4E ioi bit.a 1, (iy) ; D3 DD CB 00 4E ioi bit.a 1, (iy+127) ; D3 DD CB 7F 4E ioi bit.a 1, (iy-128) ; D3 DD CB 80 4E ioi bit.a 2, (hl) ; D3 CB 56 ioi bit.a 2, (ix) ; D3 FD CB 00 56 ioi bit.a 2, (ix+127) ; D3 FD CB 7F 56 ioi bit.a 2, (ix-128) ; D3 FD CB 80 56 ioi bit.a 2, (iy) ; D3 DD CB 00 56 ioi bit.a 2, (iy+127) ; D3 DD CB 7F 56 ioi bit.a 2, (iy-128) ; D3 DD CB 80 56 ioi bit.a 3, (hl) ; D3 CB 5E ioi bit.a 3, (ix) ; D3 FD CB 00 5E ioi bit.a 3, (ix+127) ; D3 FD CB 7F 5E ioi bit.a 3, (ix-128) ; D3 FD CB 80 5E ioi bit.a 3, (iy) ; D3 DD CB 00 5E ioi bit.a 3, (iy+127) ; D3 DD CB 7F 5E ioi bit.a 3, (iy-128) ; D3 DD CB 80 5E ioi bit.a 4, (hl) ; D3 CB 66 ioi bit.a 4, (ix) ; D3 FD CB 00 66 ioi bit.a 4, (ix+127) ; D3 FD CB 7F 66 ioi bit.a 4, (ix-128) ; D3 FD CB 80 66 ioi bit.a 4, (iy) ; D3 DD CB 00 66 ioi bit.a 4, (iy+127) ; D3 DD CB 7F 66 ioi bit.a 4, (iy-128) ; D3 DD CB 80 66 ioi bit.a 5, (hl) ; D3 CB 6E ioi bit.a 5, (ix) ; D3 FD CB 00 6E ioi bit.a 5, (ix+127) ; D3 FD CB 7F 6E ioi bit.a 5, (ix-128) ; D3 FD CB 80 6E ioi bit.a 5, (iy) ; D3 DD CB 00 6E ioi bit.a 5, (iy+127) ; D3 DD CB 7F 6E ioi bit.a 5, (iy-128) ; D3 DD CB 80 6E ioi bit.a 6, (hl) ; D3 CB 76 ioi bit.a 6, (ix) ; D3 FD CB 00 76 ioi bit.a 6, (ix+127) ; D3 FD CB 7F 76 ioi bit.a 6, (ix-128) ; D3 FD CB 80 76 ioi bit.a 6, (iy) ; D3 DD CB 00 76 ioi bit.a 6, (iy+127) ; D3 DD CB 7F 76 ioi bit.a 6, (iy-128) ; D3 DD CB 80 76 ioi bit.a 7, (hl) ; D3 CB 7E ioi bit.a 7, (ix) ; D3 FD CB 00 7E ioi bit.a 7, (ix+127) ; D3 FD CB 7F 7E ioi bit.a 7, (ix-128) ; D3 FD CB 80 7E ioi bit.a 7, (iy) ; D3 DD CB 00 7E ioi bit.a 7, (iy+127) ; D3 DD CB 7F 7E ioi bit.a 7, (iy-128) ; D3 DD CB 80 7E ioi cmp (hl) ; D3 BE ioi cmp (ix) ; D3 FD BE 00 ioi cmp (ix+127) ; D3 FD BE 7F ioi cmp (ix-128) ; D3 FD BE 80 ioi cmp (iy) ; D3 DD BE 00 ioi cmp (iy+127) ; D3 DD BE 7F ioi cmp (iy-128) ; D3 DD BE 80 ioi cmp a, (hl) ; D3 BE ioi cmp a, (ix) ; D3 FD BE 00 ioi cmp a, (ix+127) ; D3 FD BE 7F ioi cmp a, (ix-128) ; D3 FD BE 80 ioi cmp a, (iy) ; D3 DD BE 00 ioi cmp a, (iy+127) ; D3 DD BE 7F ioi cmp a, (iy-128) ; D3 DD BE 80 ioi cp (hl) ; D3 BE ioi cp (ix) ; D3 FD BE 00 ioi cp (ix+127) ; D3 FD BE 7F ioi cp (ix-128) ; D3 FD BE 80 ioi cp (iy) ; D3 DD BE 00 ioi cp (iy+127) ; D3 DD BE 7F ioi cp (iy-128) ; D3 DD BE 80 ioi cp a, (hl) ; D3 BE ioi cp a, (ix) ; D3 FD BE 00 ioi cp a, (ix+127) ; D3 FD BE 7F ioi cp a, (ix-128) ; D3 FD BE 80 ioi cp a, (iy) ; D3 DD BE 00 ioi cp a, (iy+127) ; D3 DD BE 7F ioi cp a, (iy-128) ; D3 DD BE 80 ioi dec (hl) ; D3 35 ioi dec (ix) ; D3 FD 35 00 ioi dec (ix+127) ; D3 FD 35 7F ioi dec (ix-128) ; D3 FD 35 80 ioi dec (iy) ; D3 DD 35 00 ioi dec (iy+127) ; D3 DD 35 7F ioi dec (iy-128) ; D3 DD 35 80 ioi inc (hl) ; D3 34 ioi inc (ix) ; D3 FD 34 00 ioi inc (ix+127) ; D3 FD 34 7F ioi inc (ix-128) ; D3 FD 34 80 ioi inc (iy) ; D3 DD 34 00 ioi inc (iy+127) ; D3 DD 34 7F ioi inc (iy-128) ; D3 DD 34 80 ioi ld (-32768), a ; D3 32 00 80 ioi ld (-32768), bc ; D3 ED 43 00 80 ioi ld (-32768), de ; D3 ED 53 00 80 ioi ld (-32768), hl ; D3 22 00 80 ioi ld (-32768), ix ; D3 FD 22 00 80 ioi ld (-32768), iy ; D3 DD 22 00 80 ioi ld (-32768), sp ; D3 ED 73 00 80 ioi ld (32767), a ; D3 32 FF 7F ioi ld (32767), bc ; D3 ED 43 FF 7F ioi ld (32767), de ; D3 ED 53 FF 7F ioi ld (32767), hl ; D3 22 FF 7F ioi ld (32767), ix ; D3 FD 22 FF 7F ioi ld (32767), iy ; D3 DD 22 FF 7F ioi ld (32767), sp ; D3 ED 73 FF 7F ioi ld (65535), a ; D3 32 FF FF ioi ld (65535), bc ; D3 ED 43 FF FF ioi ld (65535), de ; D3 ED 53 FF FF ioi ld (65535), hl ; D3 22 FF FF ioi ld (65535), ix ; D3 FD 22 FF FF ioi ld (65535), iy ; D3 DD 22 FF FF ioi ld (65535), sp ; D3 ED 73 FF FF ioi ld (bc), a ; D3 02 ioi ld (bc+), a ; D3 02 03 ioi ld (bc-), a ; D3 02 0B ioi ld (de), a ; D3 12 ioi ld (de+), a ; D3 12 13 ioi ld (de-), a ; D3 12 1B ioi ld (hl), -128 ; D3 36 80 ioi ld (hl), 127 ; D3 36 7F ioi ld (hl), 255 ; D3 36 FF ioi ld (hl), a ; D3 77 ioi ld (hl), b ; D3 70 ioi ld (hl), c ; D3 71 ioi ld (hl), d ; D3 72 ioi ld (hl), e ; D3 73 ioi ld (hl), h ; D3 74 ioi ld (hl), hl ; D3 DD F4 00 ioi ld (hl), l ; D3 75 ioi ld (hl+), a ; D3 77 23 ioi ld (hl+127), hl ; D3 DD F4 7F ioi ld (hl-), a ; D3 77 2B ioi ld (hl-128), hl ; D3 DD F4 80 ioi ld (hld), a ; D3 77 2B ioi ld (hli), a ; D3 77 23 ioi ld (ix), -128 ; D3 FD 36 00 80 ioi ld (ix), 127 ; D3 FD 36 00 7F ioi ld (ix), 255 ; D3 FD 36 00 FF ioi ld (ix), a ; D3 FD 77 00 ioi ld (ix), b ; D3 FD 70 00 ioi ld (ix), c ; D3 FD 71 00 ioi ld (ix), d ; D3 FD 72 00 ioi ld (ix), e ; D3 FD 73 00 ioi ld (ix), h ; D3 FD 74 00 ioi ld (ix), hl ; D3 FD F4 00 ioi ld (ix), l ; D3 FD 75 00 ioi ld (ix+127), -128 ; D3 FD 36 7F 80 ioi ld (ix+127), 127 ; D3 FD 36 7F 7F ioi ld (ix+127), 255 ; D3 FD 36 7F FF ioi ld (ix+127), a ; D3 FD 77 7F ioi ld (ix+127), b ; D3 FD 70 7F ioi ld (ix+127), c ; D3 FD 71 7F ioi ld (ix+127), d ; D3 FD 72 7F ioi ld (ix+127), e ; D3 FD 73 7F ioi ld (ix+127), h ; D3 FD 74 7F ioi ld (ix+127), hl ; D3 FD F4 7F ioi ld (ix+127), l ; D3 FD 75 7F ioi ld (ix-128), -128 ; D3 FD 36 80 80 ioi ld (ix-128), 127 ; D3 FD 36 80 7F ioi ld (ix-128), 255 ; D3 FD 36 80 FF ioi ld (ix-128), a ; D3 FD 77 80 ioi ld (ix-128), b ; D3 FD 70 80 ioi ld (ix-128), c ; D3 FD 71 80 ioi ld (ix-128), d ; D3 FD 72 80 ioi ld (ix-128), e ; D3 FD 73 80 ioi ld (ix-128), h ; D3 FD 74 80 ioi ld (ix-128), hl ; D3 FD F4 80 ioi ld (ix-128), l ; D3 FD 75 80 ioi ld (iy), -128 ; D3 DD 36 00 80 ioi ld (iy), 127 ; D3 DD 36 00 7F ioi ld (iy), 255 ; D3 DD 36 00 FF ioi ld (iy), a ; D3 DD 77 00 ioi ld (iy), b ; D3 DD 70 00 ioi ld (iy), c ; D3 DD 71 00 ioi ld (iy), d ; D3 DD 72 00 ioi ld (iy), e ; D3 DD 73 00 ioi ld (iy), h ; D3 DD 74 00 ioi ld (iy), hl ; D3 F4 00 ioi ld (iy), l ; D3 DD 75 00 ioi ld (iy+127), -128 ; D3 DD 36 7F 80 ioi ld (iy+127), 127 ; D3 DD 36 7F 7F ioi ld (iy+127), 255 ; D3 DD 36 7F FF ioi ld (iy+127), a ; D3 DD 77 7F ioi ld (iy+127), b ; D3 DD 70 7F ioi ld (iy+127), c ; D3 DD 71 7F ioi ld (iy+127), d ; D3 DD 72 7F ioi ld (iy+127), e ; D3 DD 73 7F ioi ld (iy+127), h ; D3 DD 74 7F ioi ld (iy+127), hl ; D3 F4 7F ioi ld (iy+127), l ; D3 DD 75 7F ioi ld (iy-128), -128 ; D3 DD 36 80 80 ioi ld (iy-128), 127 ; D3 DD 36 80 7F ioi ld (iy-128), 255 ; D3 DD 36 80 FF ioi ld (iy-128), a ; D3 DD 77 80 ioi ld (iy-128), b ; D3 DD 70 80 ioi ld (iy-128), c ; D3 DD 71 80 ioi ld (iy-128), d ; D3 DD 72 80 ioi ld (iy-128), e ; D3 DD 73 80 ioi ld (iy-128), h ; D3 DD 74 80 ioi ld (iy-128), hl ; D3 F4 80 ioi ld (iy-128), l ; D3 DD 75 80 ioi ld a', (-32768) ; D3 76 3A 00 80 ioi ld a', (32767) ; D3 76 3A FF 7F ioi ld a', (65535) ; D3 76 3A FF FF ioi ld a', (bc) ; D3 76 0A ioi ld a', (bc+) ; D3 76 0A 03 ioi ld a', (bc-) ; D3 76 0A 0B ioi ld a', (de) ; D3 76 1A ioi ld a', (de+) ; D3 76 1A 13 ioi ld a', (de-) ; D3 76 1A 1B ioi ld a', (hl) ; D3 76 7E ioi ld a', (hl+) ; D3 76 7E 23 ioi ld a', (hl-) ; D3 76 7E 2B ioi ld a', (hld) ; D3 76 7E 2B ioi ld a', (hli) ; D3 76 7E 23 ioi ld a', (ix) ; D3 76 FD 7E 00 ioi ld a', (ix+127) ; D3 76 FD 7E 7F ioi ld a', (ix-128) ; D3 76 FD 7E 80 ioi ld a', (iy) ; D3 76 DD 7E 00 ioi ld a', (iy+127) ; D3 76 DD 7E 7F ioi ld a', (iy-128) ; D3 76 DD 7E 80 ioi ld a, (-32768) ; D3 3A 00 80 ioi ld a, (32767) ; D3 3A FF 7F ioi ld a, (65535) ; D3 3A FF FF ioi ld a, (bc) ; D3 0A ioi ld a, (bc+) ; D3 0A 03 ioi ld a, (bc-) ; D3 0A 0B ioi ld a, (de) ; D3 1A ioi ld a, (de+) ; D3 1A 13 ioi ld a, (de-) ; D3 1A 1B ioi ld a, (hl) ; D3 7E ioi ld a, (hl+) ; D3 7E 23 ioi ld a, (hl-) ; D3 7E 2B ioi ld a, (hld) ; D3 7E 2B ioi ld a, (hli) ; D3 7E 23 ioi ld a, (ix) ; D3 FD 7E 00 ioi ld a, (ix+127) ; D3 FD 7E 7F ioi ld a, (ix-128) ; D3 FD 7E 80 ioi ld a, (iy) ; D3 DD 7E 00 ioi ld a, (iy+127) ; D3 DD 7E 7F ioi ld a, (iy-128) ; D3 DD 7E 80 ioi ld b', (hl) ; D3 76 46 ioi ld b', (ix) ; D3 76 FD 46 00 ioi ld b', (ix+127) ; D3 76 FD 46 7F ioi ld b', (ix-128) ; D3 76 FD 46 80 ioi ld b', (iy) ; D3 76 DD 46 00 ioi ld b', (iy+127) ; D3 76 DD 46 7F ioi ld b', (iy-128) ; D3 76 DD 46 80 ioi ld b, (hl) ; D3 46 ioi ld b, (ix) ; D3 FD 46 00 ioi ld b, (ix+127) ; D3 FD 46 7F ioi ld b, (ix-128) ; D3 FD 46 80 ioi ld b, (iy) ; D3 DD 46 00 ioi ld b, (iy+127) ; D3 DD 46 7F ioi ld b, (iy-128) ; D3 DD 46 80 ioi ld bc', (-32768) ; D3 76 ED 4B 00 80 ioi ld bc', (32767) ; D3 76 ED 4B FF 7F ioi ld bc', (65535) ; D3 76 ED 4B FF FF ioi ld bc, (-32768) ; D3 ED 4B 00 80 ioi ld bc, (32767) ; D3 ED 4B FF 7F ioi ld bc, (65535) ; D3 ED 4B FF FF ioi ld c', (hl) ; D3 76 4E ioi ld c', (ix) ; D3 76 FD 4E 00 ioi ld c', (ix+127) ; D3 76 FD 4E 7F ioi ld c', (ix-128) ; D3 76 FD 4E 80 ioi ld c', (iy) ; D3 76 DD 4E 00 ioi ld c', (iy+127) ; D3 76 DD 4E 7F ioi ld c', (iy-128) ; D3 76 DD 4E 80 ioi ld c, (hl) ; D3 4E ioi ld c, (ix) ; D3 FD 4E 00 ioi ld c, (ix+127) ; D3 FD 4E 7F ioi ld c, (ix-128) ; D3 FD 4E 80 ioi ld c, (iy) ; D3 DD 4E 00 ioi ld c, (iy+127) ; D3 DD 4E 7F ioi ld c, (iy-128) ; D3 DD 4E 80 ioi ld d', (hl) ; D3 76 56 ioi ld d', (ix) ; D3 76 FD 56 00 ioi ld d', (ix+127) ; D3 76 FD 56 7F ioi ld d', (ix-128) ; D3 76 FD 56 80 ioi ld d', (iy) ; D3 76 DD 56 00 ioi ld d', (iy+127) ; D3 76 DD 56 7F ioi ld d', (iy-128) ; D3 76 DD 56 80 ioi ld d, (hl) ; D3 56 ioi ld d, (ix) ; D3 FD 56 00 ioi ld d, (ix+127) ; D3 FD 56 7F ioi ld d, (ix-128) ; D3 FD 56 80 ioi ld d, (iy) ; D3 DD 56 00 ioi ld d, (iy+127) ; D3 DD 56 7F ioi ld d, (iy-128) ; D3 DD 56 80 ioi ld de', (-32768) ; D3 76 ED 5B 00 80 ioi ld de', (32767) ; D3 76 ED 5B FF 7F ioi ld de', (65535) ; D3 76 ED 5B FF FF ioi ld de, (-32768) ; D3 ED 5B 00 80 ioi ld de, (32767) ; D3 ED 5B FF 7F ioi ld de, (65535) ; D3 ED 5B FF FF ioi ld e', (hl) ; D3 76 5E ioi ld e', (ix) ; D3 76 FD 5E 00 ioi ld e', (ix+127) ; D3 76 FD 5E 7F ioi ld e', (ix-128) ; D3 76 FD 5E 80 ioi ld e', (iy) ; D3 76 DD 5E 00 ioi ld e', (iy+127) ; D3 76 DD 5E 7F ioi ld e', (iy-128) ; D3 76 DD 5E 80 ioi ld e, (hl) ; D3 5E ioi ld e, (ix) ; D3 FD 5E 00 ioi ld e, (ix+127) ; D3 FD 5E 7F ioi ld e, (ix-128) ; D3 FD 5E 80 ioi ld e, (iy) ; D3 DD 5E 00 ioi ld e, (iy+127) ; D3 DD 5E 7F ioi ld e, (iy-128) ; D3 DD 5E 80 ioi ld h', (hl) ; D3 76 66 ioi ld h', (ix) ; D3 76 FD 66 00 ioi ld h', (ix+127) ; D3 76 FD 66 7F ioi ld h', (ix-128) ; D3 76 FD 66 80 ioi ld h', (iy) ; D3 76 DD 66 00 ioi ld h', (iy+127) ; D3 76 DD 66 7F ioi ld h', (iy-128) ; D3 76 DD 66 80 ioi ld h, (hl) ; D3 66 ioi ld h, (ix) ; D3 FD 66 00 ioi ld h, (ix+127) ; D3 FD 66 7F ioi ld h, (ix-128) ; D3 FD 66 80 ioi ld h, (iy) ; D3 DD 66 00 ioi ld h, (iy+127) ; D3 DD 66 7F ioi ld h, (iy-128) ; D3 DD 66 80 ioi ld hl', (-32768) ; D3 76 2A 00 80 ioi ld hl', (32767) ; D3 76 2A FF 7F ioi ld hl', (65535) ; D3 76 2A FF FF ioi ld hl', (hl) ; D3 76 DD E4 00 ioi ld hl', (hl+127) ; D3 76 DD E4 7F ioi ld hl', (hl-128) ; D3 76 DD E4 80 ioi ld hl', (ix) ; D3 76 FD E4 00 ioi ld hl', (ix+127) ; D3 76 FD E4 7F ioi ld hl', (ix-128) ; D3 76 FD E4 80 ioi ld hl', (iy) ; D3 76 E4 00 ioi ld hl', (iy+127) ; D3 76 E4 7F ioi ld hl', (iy-128) ; D3 76 E4 80 ioi ld hl, (-32768) ; D3 2A 00 80 ioi ld hl, (32767) ; D3 2A FF 7F ioi ld hl, (65535) ; D3 2A FF FF ioi ld hl, (hl) ; D3 DD E4 00 ioi ld hl, (hl+127) ; D3 DD E4 7F ioi ld hl, (hl-128) ; D3 DD E4 80 ioi ld hl, (ix) ; D3 FD E4 00 ioi ld hl, (ix+127) ; D3 FD E4 7F ioi ld hl, (ix-128) ; D3 FD E4 80 ioi ld hl, (iy) ; D3 E4 00 ioi ld hl, (iy+127) ; D3 E4 7F ioi ld hl, (iy-128) ; D3 E4 80 ioi ld ix, (-32768) ; D3 FD 2A 00 80 ioi ld ix, (32767) ; D3 FD 2A FF 7F ioi ld ix, (65535) ; D3 FD 2A FF FF ioi ld iy, (-32768) ; D3 DD 2A 00 80 ioi ld iy, (32767) ; D3 DD 2A FF 7F ioi ld iy, (65535) ; D3 DD 2A FF FF ioi ld l', (hl) ; D3 76 6E ioi ld l', (ix) ; D3 76 FD 6E 00 ioi ld l', (ix+127) ; D3 76 FD 6E 7F ioi ld l', (ix-128) ; D3 76 FD 6E 80 ioi ld l', (iy) ; D3 76 DD 6E 00 ioi ld l', (iy+127) ; D3 76 DD 6E 7F ioi ld l', (iy-128) ; D3 76 DD 6E 80 ioi ld l, (hl) ; D3 6E ioi ld l, (ix) ; D3 FD 6E 00 ioi ld l, (ix+127) ; D3 FD 6E 7F ioi ld l, (ix-128) ; D3 FD 6E 80 ioi ld l, (iy) ; D3 DD 6E 00 ioi ld l, (iy+127) ; D3 DD 6E 7F ioi ld l, (iy-128) ; D3 DD 6E 80 ioi ld sp, (-32768) ; D3 ED 7B 00 80 ioi ld sp, (32767) ; D3 ED 7B FF 7F ioi ld sp, (65535) ; D3 ED 7B FF FF ioi ldd ; D3 ED A8 ioi ldd (bc), a ; D3 02 0B ioi ldd (de), a ; D3 12 1B ioi ldd (hl), a ; D3 77 2B ioi ldd a, (bc) ; D3 0A 0B ioi ldd a, (de) ; D3 1A 1B ioi ldd a, (hl) ; D3 7E 2B ioi lddr ; D3 ED B8 ioi lddsr ; D3 ED 98 ioi ldi ; D3 ED A0 ioi ldi (bc), a ; D3 02 03 ioi ldi (de), a ; D3 12 13 ioi ldi (hl), a ; D3 77 23 ioi ldi a, (bc) ; D3 0A 03 ioi ldi a, (de) ; D3 1A 13 ioi ldi a, (hl) ; D3 7E 23 ioi ldir ; D3 ED B0 ioi ldisr ; D3 ED 90 ioi lsddr ; D3 ED D8 ioi lsdr ; D3 ED F8 ioi lsidr ; D3 ED D0 ioi lsir ; D3 ED F0 ioi or (hl) ; D3 B6 ioi or (ix) ; D3 FD B6 00 ioi or (ix+127) ; D3 FD B6 7F ioi or (ix-128) ; D3 FD B6 80 ioi or (iy) ; D3 DD B6 00 ioi or (iy+127) ; D3 DD B6 7F ioi or (iy-128) ; D3 DD B6 80 ioi or a', (hl) ; D3 76 B6 ioi or a', (ix) ; D3 76 FD B6 00 ioi or a', (ix+127) ; D3 76 FD B6 7F ioi or a', (ix-128) ; D3 76 FD B6 80 ioi or a', (iy) ; D3 76 DD B6 00 ioi or a', (iy+127) ; D3 76 DD B6 7F ioi or a', (iy-128) ; D3 76 DD B6 80 ioi or a, (hl) ; D3 B6 ioi or a, (ix) ; D3 FD B6 00 ioi or a, (ix+127) ; D3 FD B6 7F ioi or a, (ix-128) ; D3 FD B6 80 ioi or a, (iy) ; D3 DD B6 00 ioi or a, (iy+127) ; D3 DD B6 7F ioi or a, (iy-128) ; D3 DD B6 80 ioi res 0, (hl) ; D3 CB 86 ioi res 0, (ix) ; D3 FD CB 00 86 ioi res 0, (ix+127) ; D3 FD CB 7F 86 ioi res 0, (ix-128) ; D3 FD CB 80 86 ioi res 0, (iy) ; D3 DD CB 00 86 ioi res 0, (iy+127) ; D3 DD CB 7F 86 ioi res 0, (iy-128) ; D3 DD CB 80 86 ioi res 1, (hl) ; D3 CB 8E ioi res 1, (ix) ; D3 FD CB 00 8E ioi res 1, (ix+127) ; D3 FD CB 7F 8E ioi res 1, (ix-128) ; D3 FD CB 80 8E ioi res 1, (iy) ; D3 DD CB 00 8E ioi res 1, (iy+127) ; D3 DD CB 7F 8E ioi res 1, (iy-128) ; D3 DD CB 80 8E ioi res 2, (hl) ; D3 CB 96 ioi res 2, (ix) ; D3 FD CB 00 96 ioi res 2, (ix+127) ; D3 FD CB 7F 96 ioi res 2, (ix-128) ; D3 FD CB 80 96 ioi res 2, (iy) ; D3 DD CB 00 96 ioi res 2, (iy+127) ; D3 DD CB 7F 96 ioi res 2, (iy-128) ; D3 DD CB 80 96 ioi res 3, (hl) ; D3 CB 9E ioi res 3, (ix) ; D3 FD CB 00 9E ioi res 3, (ix+127) ; D3 FD CB 7F 9E ioi res 3, (ix-128) ; D3 FD CB 80 9E ioi res 3, (iy) ; D3 DD CB 00 9E ioi res 3, (iy+127) ; D3 DD CB 7F 9E ioi res 3, (iy-128) ; D3 DD CB 80 9E ioi res 4, (hl) ; D3 CB A6 ioi res 4, (ix) ; D3 FD CB 00 A6 ioi res 4, (ix+127) ; D3 FD CB 7F A6 ioi res 4, (ix-128) ; D3 FD CB 80 A6 ioi res 4, (iy) ; D3 DD CB 00 A6 ioi res 4, (iy+127) ; D3 DD CB 7F A6 ioi res 4, (iy-128) ; D3 DD CB 80 A6 ioi res 5, (hl) ; D3 CB AE ioi res 5, (ix) ; D3 FD CB 00 AE ioi res 5, (ix+127) ; D3 FD CB 7F AE ioi res 5, (ix-128) ; D3 FD CB 80 AE ioi res 5, (iy) ; D3 DD CB 00 AE ioi res 5, (iy+127) ; D3 DD CB 7F AE ioi res 5, (iy-128) ; D3 DD CB 80 AE ioi res 6, (hl) ; D3 CB B6 ioi res 6, (ix) ; D3 FD CB 00 B6 ioi res 6, (ix+127) ; D3 FD CB 7F B6 ioi res 6, (ix-128) ; D3 FD CB 80 B6 ioi res 6, (iy) ; D3 DD CB 00 B6 ioi res 6, (iy+127) ; D3 DD CB 7F B6 ioi res 6, (iy-128) ; D3 DD CB 80 B6 ioi res 7, (hl) ; D3 CB BE ioi res 7, (ix) ; D3 FD CB 00 BE ioi res 7, (ix+127) ; D3 FD CB 7F BE ioi res 7, (ix-128) ; D3 FD CB 80 BE ioi res 7, (iy) ; D3 DD CB 00 BE ioi res 7, (iy+127) ; D3 DD CB 7F BE ioi res 7, (iy-128) ; D3 DD CB 80 BE ioi res.a 0, (hl) ; D3 CB 86 ioi res.a 0, (ix) ; D3 FD CB 00 86 ioi res.a 0, (ix+127) ; D3 FD CB 7F 86 ioi res.a 0, (ix-128) ; D3 FD CB 80 86 ioi res.a 0, (iy) ; D3 DD CB 00 86 ioi res.a 0, (iy+127) ; D3 DD CB 7F 86 ioi res.a 0, (iy-128) ; D3 DD CB 80 86 ioi res.a 1, (hl) ; D3 CB 8E ioi res.a 1, (ix) ; D3 FD CB 00 8E ioi res.a 1, (ix+127) ; D3 FD CB 7F 8E ioi res.a 1, (ix-128) ; D3 FD CB 80 8E ioi res.a 1, (iy) ; D3 DD CB 00 8E ioi res.a 1, (iy+127) ; D3 DD CB 7F 8E ioi res.a 1, (iy-128) ; D3 DD CB 80 8E ioi res.a 2, (hl) ; D3 CB 96 ioi res.a 2, (ix) ; D3 FD CB 00 96 ioi res.a 2, (ix+127) ; D3 FD CB 7F 96 ioi res.a 2, (ix-128) ; D3 FD CB 80 96 ioi res.a 2, (iy) ; D3 DD CB 00 96 ioi res.a 2, (iy+127) ; D3 DD CB 7F 96 ioi res.a 2, (iy-128) ; D3 DD CB 80 96 ioi res.a 3, (hl) ; D3 CB 9E ioi res.a 3, (ix) ; D3 FD CB 00 9E ioi res.a 3, (ix+127) ; D3 FD CB 7F 9E ioi res.a 3, (ix-128) ; D3 FD CB 80 9E ioi res.a 3, (iy) ; D3 DD CB 00 9E ioi res.a 3, (iy+127) ; D3 DD CB 7F 9E ioi res.a 3, (iy-128) ; D3 DD CB 80 9E ioi res.a 4, (hl) ; D3 CB A6 ioi res.a 4, (ix) ; D3 FD CB 00 A6 ioi res.a 4, (ix+127) ; D3 FD CB 7F A6 ioi res.a 4, (ix-128) ; D3 FD CB 80 A6 ioi res.a 4, (iy) ; D3 DD CB 00 A6 ioi res.a 4, (iy+127) ; D3 DD CB 7F A6 ioi res.a 4, (iy-128) ; D3 DD CB 80 A6 ioi res.a 5, (hl) ; D3 CB AE ioi res.a 5, (ix) ; D3 FD CB 00 AE ioi res.a 5, (ix+127) ; D3 FD CB 7F AE ioi res.a 5, (ix-128) ; D3 FD CB 80 AE ioi res.a 5, (iy) ; D3 DD CB 00 AE ioi res.a 5, (iy+127) ; D3 DD CB 7F AE ioi res.a 5, (iy-128) ; D3 DD CB 80 AE ioi res.a 6, (hl) ; D3 CB B6 ioi res.a 6, (ix) ; D3 FD CB 00 B6 ioi res.a 6, (ix+127) ; D3 FD CB 7F B6 ioi res.a 6, (ix-128) ; D3 FD CB 80 B6 ioi res.a 6, (iy) ; D3 DD CB 00 B6 ioi res.a 6, (iy+127) ; D3 DD CB 7F B6 ioi res.a 6, (iy-128) ; D3 DD CB 80 B6 ioi res.a 7, (hl) ; D3 CB BE ioi res.a 7, (ix) ; D3 FD CB 00 BE ioi res.a 7, (ix+127) ; D3 FD CB 7F BE ioi res.a 7, (ix-128) ; D3 FD CB 80 BE ioi res.a 7, (iy) ; D3 DD CB 00 BE ioi res.a 7, (iy+127) ; D3 DD CB 7F BE ioi res.a 7, (iy-128) ; D3 DD CB 80 BE ioi rl (hl) ; D3 CB 16 ioi rl (ix) ; D3 FD CB 00 16 ioi rl (ix+127) ; D3 FD CB 7F 16 ioi rl (ix-128) ; D3 FD CB 80 16 ioi rl (iy) ; D3 DD CB 00 16 ioi rl (iy+127) ; D3 DD CB 7F 16 ioi rl (iy-128) ; D3 DD CB 80 16 ioi rlc (hl) ; D3 CB 06 ioi rlc (ix) ; D3 FD CB 00 06 ioi rlc (ix+127) ; D3 FD CB 7F 06 ioi rlc (ix-128) ; D3 FD CB 80 06 ioi rlc (iy) ; D3 DD CB 00 06 ioi rlc (iy+127) ; D3 DD CB 7F 06 ioi rlc (iy-128) ; D3 DD CB 80 06 ioi rr (hl) ; D3 CB 1E ioi rr (ix) ; D3 FD CB 00 1E ioi rr (ix+127) ; D3 FD CB 7F 1E ioi rr (ix-128) ; D3 FD CB 80 1E ioi rr (iy) ; D3 DD CB 00 1E ioi rr (iy+127) ; D3 DD CB 7F 1E ioi rr (iy-128) ; D3 DD CB 80 1E ioi rrc (hl) ; D3 CB 0E ioi rrc (ix) ; D3 FD CB 00 0E ioi rrc (ix+127) ; D3 FD CB 7F 0E ioi rrc (ix-128) ; D3 FD CB 80 0E ioi rrc (iy) ; D3 DD CB 00 0E ioi rrc (iy+127) ; D3 DD CB 7F 0E ioi rrc (iy-128) ; D3 DD CB 80 0E ioi sbc (hl) ; D3 9E ioi sbc (ix) ; D3 FD 9E 00 ioi sbc (ix+127) ; D3 FD 9E 7F ioi sbc (ix-128) ; D3 FD 9E 80 ioi sbc (iy) ; D3 DD 9E 00 ioi sbc (iy+127) ; D3 DD 9E 7F ioi sbc (iy-128) ; D3 DD 9E 80 ioi sbc a', (hl) ; D3 76 9E ioi sbc a', (ix) ; D3 76 FD 9E 00 ioi sbc a', (ix+127) ; D3 76 FD 9E 7F ioi sbc a', (ix-128) ; D3 76 FD 9E 80 ioi sbc a', (iy) ; D3 76 DD 9E 00 ioi sbc a', (iy+127) ; D3 76 DD 9E 7F ioi sbc a', (iy-128) ; D3 76 DD 9E 80 ioi sbc a, (hl) ; D3 9E ioi sbc a, (ix) ; D3 FD 9E 00 ioi sbc a, (ix+127) ; D3 FD 9E 7F ioi sbc a, (ix-128) ; D3 FD 9E 80 ioi sbc a, (iy) ; D3 DD 9E 00 ioi sbc a, (iy+127) ; D3 DD 9E 7F ioi sbc a, (iy-128) ; D3 DD 9E 80 ioi set 0, (hl) ; D3 CB C6 ioi set 0, (ix) ; D3 FD CB 00 C6 ioi set 0, (ix+127) ; D3 FD CB 7F C6 ioi set 0, (ix-128) ; D3 FD CB 80 C6 ioi set 0, (iy) ; D3 DD CB 00 C6 ioi set 0, (iy+127) ; D3 DD CB 7F C6 ioi set 0, (iy-128) ; D3 DD CB 80 C6 ioi set 1, (hl) ; D3 CB CE ioi set 1, (ix) ; D3 FD CB 00 CE ioi set 1, (ix+127) ; D3 FD CB 7F CE ioi set 1, (ix-128) ; D3 FD CB 80 CE ioi set 1, (iy) ; D3 DD CB 00 CE ioi set 1, (iy+127) ; D3 DD CB 7F CE ioi set 1, (iy-128) ; D3 DD CB 80 CE ioi set 2, (hl) ; D3 CB D6 ioi set 2, (ix) ; D3 FD CB 00 D6 ioi set 2, (ix+127) ; D3 FD CB 7F D6 ioi set 2, (ix-128) ; D3 FD CB 80 D6 ioi set 2, (iy) ; D3 DD CB 00 D6 ioi set 2, (iy+127) ; D3 DD CB 7F D6 ioi set 2, (iy-128) ; D3 DD CB 80 D6 ioi set 3, (hl) ; D3 CB DE ioi set 3, (ix) ; D3 FD CB 00 DE ioi set 3, (ix+127) ; D3 FD CB 7F DE ioi set 3, (ix-128) ; D3 FD CB 80 DE ioi set 3, (iy) ; D3 DD CB 00 DE ioi set 3, (iy+127) ; D3 DD CB 7F DE ioi set 3, (iy-128) ; D3 DD CB 80 DE ioi set 4, (hl) ; D3 CB E6 ioi set 4, (ix) ; D3 FD CB 00 E6 ioi set 4, (ix+127) ; D3 FD CB 7F E6 ioi set 4, (ix-128) ; D3 FD CB 80 E6 ioi set 4, (iy) ; D3 DD CB 00 E6 ioi set 4, (iy+127) ; D3 DD CB 7F E6 ioi set 4, (iy-128) ; D3 DD CB 80 E6 ioi set 5, (hl) ; D3 CB EE ioi set 5, (ix) ; D3 FD CB 00 EE ioi set 5, (ix+127) ; D3 FD CB 7F EE ioi set 5, (ix-128) ; D3 FD CB 80 EE ioi set 5, (iy) ; D3 DD CB 00 EE ioi set 5, (iy+127) ; D3 DD CB 7F EE ioi set 5, (iy-128) ; D3 DD CB 80 EE ioi set 6, (hl) ; D3 CB F6 ioi set 6, (ix) ; D3 FD CB 00 F6 ioi set 6, (ix+127) ; D3 FD CB 7F F6 ioi set 6, (ix-128) ; D3 FD CB 80 F6 ioi set 6, (iy) ; D3 DD CB 00 F6 ioi set 6, (iy+127) ; D3 DD CB 7F F6 ioi set 6, (iy-128) ; D3 DD CB 80 F6 ioi set 7, (hl) ; D3 CB FE ioi set 7, (ix) ; D3 FD CB 00 FE ioi set 7, (ix+127) ; D3 FD CB 7F FE ioi set 7, (ix-128) ; D3 FD CB 80 FE ioi set 7, (iy) ; D3 DD CB 00 FE ioi set 7, (iy+127) ; D3 DD CB 7F FE ioi set 7, (iy-128) ; D3 DD CB 80 FE ioi set.a 0, (hl) ; D3 CB C6 ioi set.a 0, (ix) ; D3 FD CB 00 C6 ioi set.a 0, (ix+127) ; D3 FD CB 7F C6 ioi set.a 0, (ix-128) ; D3 FD CB 80 C6 ioi set.a 0, (iy) ; D3 DD CB 00 C6 ioi set.a 0, (iy+127) ; D3 DD CB 7F C6 ioi set.a 0, (iy-128) ; D3 DD CB 80 C6 ioi set.a 1, (hl) ; D3 CB CE ioi set.a 1, (ix) ; D3 FD CB 00 CE ioi set.a 1, (ix+127) ; D3 FD CB 7F CE ioi set.a 1, (ix-128) ; D3 FD CB 80 CE ioi set.a 1, (iy) ; D3 DD CB 00 CE ioi set.a 1, (iy+127) ; D3 DD CB 7F CE ioi set.a 1, (iy-128) ; D3 DD CB 80 CE ioi set.a 2, (hl) ; D3 CB D6 ioi set.a 2, (ix) ; D3 FD CB 00 D6 ioi set.a 2, (ix+127) ; D3 FD CB 7F D6 ioi set.a 2, (ix-128) ; D3 FD CB 80 D6 ioi set.a 2, (iy) ; D3 DD CB 00 D6 ioi set.a 2, (iy+127) ; D3 DD CB 7F D6 ioi set.a 2, (iy-128) ; D3 DD CB 80 D6 ioi set.a 3, (hl) ; D3 CB DE ioi set.a 3, (ix) ; D3 FD CB 00 DE ioi set.a 3, (ix+127) ; D3 FD CB 7F DE ioi set.a 3, (ix-128) ; D3 FD CB 80 DE ioi set.a 3, (iy) ; D3 DD CB 00 DE ioi set.a 3, (iy+127) ; D3 DD CB 7F DE ioi set.a 3, (iy-128) ; D3 DD CB 80 DE ioi set.a 4, (hl) ; D3 CB E6 ioi set.a 4, (ix) ; D3 FD CB 00 E6 ioi set.a 4, (ix+127) ; D3 FD CB 7F E6 ioi set.a 4, (ix-128) ; D3 FD CB 80 E6 ioi set.a 4, (iy) ; D3 DD CB 00 E6 ioi set.a 4, (iy+127) ; D3 DD CB 7F E6 ioi set.a 4, (iy-128) ; D3 DD CB 80 E6 ioi set.a 5, (hl) ; D3 CB EE ioi set.a 5, (ix) ; D3 FD CB 00 EE ioi set.a 5, (ix+127) ; D3 FD CB 7F EE ioi set.a 5, (ix-128) ; D3 FD CB 80 EE ioi set.a 5, (iy) ; D3 DD CB 00 EE ioi set.a 5, (iy+127) ; D3 DD CB 7F EE ioi set.a 5, (iy-128) ; D3 DD CB 80 EE ioi set.a 6, (hl) ; D3 CB F6 ioi set.a 6, (ix) ; D3 FD CB 00 F6 ioi set.a 6, (ix+127) ; D3 FD CB 7F F6 ioi set.a 6, (ix-128) ; D3 FD CB 80 F6 ioi set.a 6, (iy) ; D3 DD CB 00 F6 ioi set.a 6, (iy+127) ; D3 DD CB 7F F6 ioi set.a 6, (iy-128) ; D3 DD CB 80 F6 ioi set.a 7, (hl) ; D3 CB FE ioi set.a 7, (ix) ; D3 FD CB 00 FE ioi set.a 7, (ix+127) ; D3 FD CB 7F FE ioi set.a 7, (ix-128) ; D3 FD CB 80 FE ioi set.a 7, (iy) ; D3 DD CB 00 FE ioi set.a 7, (iy+127) ; D3 DD CB 7F FE ioi set.a 7, (iy-128) ; D3 DD CB 80 FE ioi sla (hl) ; D3 CB 26 ioi sla (ix) ; D3 FD CB 00 26 ioi sla (ix+127) ; D3 FD CB 7F 26 ioi sla (ix-128) ; D3 FD CB 80 26 ioi sla (iy) ; D3 DD CB 00 26 ioi sla (iy+127) ; D3 DD CB 7F 26 ioi sla (iy-128) ; D3 DD CB 80 26 ioi sra (hl) ; D3 CB 2E ioi sra (ix) ; D3 FD CB 00 2E ioi sra (ix+127) ; D3 FD CB 7F 2E ioi sra (ix-128) ; D3 FD CB 80 2E ioi sra (iy) ; D3 DD CB 00 2E ioi sra (iy+127) ; D3 DD CB 7F 2E ioi sra (iy-128) ; D3 DD CB 80 2E ioi srl (hl) ; D3 CB 3E ioi srl (ix) ; D3 FD CB 00 3E ioi srl (ix+127) ; D3 FD CB 7F 3E ioi srl (ix-128) ; D3 FD CB 80 3E ioi srl (iy) ; D3 DD CB 00 3E ioi srl (iy+127) ; D3 DD CB 7F 3E ioi srl (iy-128) ; D3 DD CB 80 3E ioi sub (hl) ; D3 96 ioi sub (ix) ; D3 FD 96 00 ioi sub (ix+127) ; D3 FD 96 7F ioi sub (ix-128) ; D3 FD 96 80 ioi sub (iy) ; D3 DD 96 00 ioi sub (iy+127) ; D3 DD 96 7F ioi sub (iy-128) ; D3 DD 96 80 ioi sub a', (hl) ; D3 76 96 ioi sub a', (ix) ; D3 76 FD 96 00 ioi sub a', (ix+127) ; D3 76 FD 96 7F ioi sub a', (ix-128) ; D3 76 FD 96 80 ioi sub a', (iy) ; D3 76 DD 96 00 ioi sub a', (iy+127) ; D3 76 DD 96 7F ioi sub a', (iy-128) ; D3 76 DD 96 80 ioi sub a, (hl) ; D3 96 ioi sub a, (ix) ; D3 FD 96 00 ioi sub a, (ix+127) ; D3 FD 96 7F ioi sub a, (ix-128) ; D3 FD 96 80 ioi sub a, (iy) ; D3 DD 96 00 ioi sub a, (iy+127) ; D3 DD 96 7F ioi sub a, (iy-128) ; D3 DD 96 80 ioi xor (hl) ; D3 AE ioi xor (ix) ; D3 FD AE 00 ioi xor (ix+127) ; D3 FD AE 7F ioi xor (ix-128) ; D3 FD AE 80 ioi xor (iy) ; D3 DD AE 00 ioi xor (iy+127) ; D3 DD AE 7F ioi xor (iy-128) ; D3 DD AE 80 ioi xor a', (hl) ; D3 76 AE ioi xor a', (ix) ; D3 76 FD AE 00 ioi xor a', (ix+127) ; D3 76 FD AE 7F ioi xor a', (ix-128) ; D3 76 FD AE 80 ioi xor a', (iy) ; D3 76 DD AE 00 ioi xor a', (iy+127) ; D3 76 DD AE 7F ioi xor a', (iy-128) ; D3 76 DD AE 80 ioi xor a, (hl) ; D3 AE ioi xor a, (ix) ; D3 FD AE 00 ioi xor a, (ix+127) ; D3 FD AE 7F ioi xor a, (ix-128) ; D3 FD AE 80 ioi xor a, (iy) ; D3 DD AE 00 ioi xor a, (iy+127) ; D3 DD AE 7F ioi xor a, (iy-128) ; D3 DD AE 80 ipres ; ED 5D ipset 0 ; ED 46 ipset 1 ; ED 56 ipset 2 ; ED 4E ipset 3 ; ED 5E j_c -32768 ; DA 00 80 j_c 32767 ; DA FF 7F j_c 65535 ; DA FF FF j_lo -32768 ; EA 00 80 j_lo 32767 ; EA FF 7F j_lo 65535 ; EA FF FF j_lz -32768 ; E2 00 80 j_lz 32767 ; E2 FF 7F j_lz 65535 ; E2 FF FF j_m -32768 ; FA 00 80 j_m 32767 ; FA FF 7F j_m 65535 ; FA FF FF j_nc -32768 ; D2 00 80 j_nc 32767 ; D2 FF 7F j_nc 65535 ; D2 FF FF j_nv -32768 ; E2 00 80 j_nv 32767 ; E2 FF 7F j_nv 65535 ; E2 FF FF j_nz -32768 ; C2 00 80 j_nz 32767 ; C2 FF 7F j_nz 65535 ; C2 FF FF j_p -32768 ; F2 00 80 j_p 32767 ; F2 FF 7F j_p 65535 ; F2 FF FF j_pe -32768 ; EA 00 80 j_pe 32767 ; EA FF 7F j_pe 65535 ; EA FF FF j_po -32768 ; E2 00 80 j_po 32767 ; E2 FF 7F j_po 65535 ; E2 FF FF j_v -32768 ; EA 00 80 j_v 32767 ; EA FF 7F j_v 65535 ; EA FF FF j_z -32768 ; CA 00 80 j_z 32767 ; CA FF 7F j_z 65535 ; CA FF FF jc -32768 ; DA 00 80 jc 32767 ; DA FF 7F jc 65535 ; DA FF FF jlo -32768 ; EA 00 80 jlo 32767 ; EA FF 7F jlo 65535 ; EA FF FF jlz -32768 ; E2 00 80 jlz 32767 ; E2 FF 7F jlz 65535 ; E2 FF FF jm -32768 ; FA 00 80 jm 32767 ; FA FF 7F jm 65535 ; FA FF FF jmp -32768 ; C3 00 80 jmp 32767 ; C3 FF 7F jmp 65535 ; C3 FF FF jnc -32768 ; D2 00 80 jnc 32767 ; D2 FF 7F jnc 65535 ; D2 FF FF jnv -32768 ; E2 00 80 jnv 32767 ; E2 FF 7F jnv 65535 ; E2 FF FF jnz -32768 ; C2 00 80 jnz 32767 ; C2 FF 7F jnz 65535 ; C2 FF FF jp (bc) ; C5 C9 jp (de) ; D5 C9 jp (hl) ; E9 jp (ix) ; FD E9 jp (iy) ; DD E9 jp -32768 ; C3 00 80 jp 32767 ; C3 FF 7F jp 65535 ; C3 FF FF jp c, -32768 ; DA 00 80 jp c, 32767 ; DA FF 7F jp c, 65535 ; DA FF FF jp lo, -32768 ; EA 00 80 jp lo, 32767 ; EA FF 7F jp lo, 65535 ; EA FF FF jp lz, -32768 ; E2 00 80 jp lz, 32767 ; E2 FF 7F jp lz, 65535 ; E2 FF FF jp m, -32768 ; FA 00 80 jp m, 32767 ; FA FF 7F jp m, 65535 ; FA FF FF jp nc, -32768 ; D2 00 80 jp nc, 32767 ; D2 FF 7F jp nc, 65535 ; D2 FF FF jp nv, -32768 ; E2 00 80 jp nv, 32767 ; E2 FF 7F jp nv, 65535 ; E2 FF FF jp nz, -32768 ; C2 00 80 jp nz, 32767 ; C2 FF 7F jp nz, 65535 ; C2 FF FF jp p, -32768 ; F2 00 80 jp p, 32767 ; F2 FF 7F jp p, 65535 ; F2 FF FF jp pe, -32768 ; EA 00 80 jp pe, 32767 ; EA FF 7F jp pe, 65535 ; EA FF FF jp po, -32768 ; E2 00 80 jp po, 32767 ; E2 FF 7F jp po, 65535 ; E2 FF FF jp v, -32768 ; EA 00 80 jp v, 32767 ; EA FF 7F jp v, 65535 ; EA FF FF jp z, -32768 ; CA 00 80 jp z, 32767 ; CA FF 7F jp z, 65535 ; CA FF FF jpe -32768 ; EA 00 80 jpe 32767 ; EA FF 7F jpe 65535 ; EA FF FF jpo -32768 ; E2 00 80 jpo 32767 ; E2 FF 7F jpo 65535 ; E2 FF FF jr ASMPC ; 18 FE jr c, ASMPC ; 38 FE jr nc, ASMPC ; 30 FE jr nz, ASMPC ; 20 FE jr z, ASMPC ; 28 FE jv -32768 ; EA 00 80 jv 32767 ; EA FF 7F jv 65535 ; EA FF FF jz -32768 ; CA 00 80 jz 32767 ; CA FF 7F jz 65535 ; CA FF FF ld (-32768), a ; 32 00 80 ld (-32768), bc ; ED 43 00 80 ld (-32768), de ; ED 53 00 80 ld (-32768), hl ; 22 00 80 ld (-32768), ix ; FD 22 00 80 ld (-32768), iy ; DD 22 00 80 ld (-32768), sp ; ED 73 00 80 ld (32767), a ; 32 FF 7F ld (32767), bc ; ED 43 FF 7F ld (32767), de ; ED 53 FF 7F ld (32767), hl ; 22 FF 7F ld (32767), ix ; FD 22 FF 7F ld (32767), iy ; DD 22 FF 7F ld (32767), sp ; ED 73 FF 7F ld (65535), a ; 32 FF FF ld (65535), bc ; ED 43 FF FF ld (65535), de ; ED 53 FF FF ld (65535), hl ; 22 FF FF ld (65535), ix ; FD 22 FF FF ld (65535), iy ; DD 22 FF FF ld (65535), sp ; ED 73 FF FF ld (bc), a ; 02 ld (bc+), a ; 02 03 ld (bc-), a ; 02 0B ld (de), -128 ; EB 36 80 EB ld (de), 127 ; EB 36 7F EB ld (de), 255 ; EB 36 FF EB ld (de), a ; 12 ld (de), b ; EB 70 EB ld (de), c ; EB 71 EB ld (de), d ; EB 74 EB ld (de), e ; EB 75 EB ld (de), h ; EB 72 EB ld (de), l ; EB 73 EB ld (de+), -128 ; EB 36 80 EB 13 ld (de+), 127 ; EB 36 7F EB 13 ld (de+), 255 ; EB 36 FF EB 13 ld (de+), a ; 12 13 ld (de+), b ; EB 70 EB 13 ld (de+), c ; EB 71 EB 13 ld (de+), d ; EB 74 EB 13 ld (de+), e ; EB 75 EB 13 ld (de+), h ; EB 72 EB 13 ld (de+), l ; EB 73 EB 13 ld (de-), -128 ; EB 36 80 EB 1B ld (de-), 127 ; EB 36 7F EB 1B ld (de-), 255 ; EB 36 FF EB 1B ld (de-), a ; 12 1B ld (de-), b ; EB 70 EB 1B ld (de-), c ; EB 71 EB 1B ld (de-), d ; EB 74 EB 1B ld (de-), e ; EB 75 EB 1B ld (de-), h ; EB 72 EB 1B ld (de-), l ; EB 73 EB 1B ld (hl), -128 ; 36 80 ld (hl), 127 ; 36 7F ld (hl), 255 ; 36 FF ld (hl), a ; 77 ld (hl), b ; 70 ld (hl), c ; 71 ld (hl), d ; 72 ld (hl), e ; 73 ld (hl), h ; 74 ld (hl), hl ; DD F4 00 ld (hl), l ; 75 ld (hl+), a ; 77 23 ld (hl+127), hl ; DD F4 7F ld (hl-), a ; 77 2B ld (hl-128), hl ; DD F4 80 ld (hld), a ; 77 2B ld (hli), a ; 77 23 ld (ix), -128 ; FD 36 00 80 ld (ix), 127 ; FD 36 00 7F ld (ix), 255 ; FD 36 00 FF ld (ix), a ; FD 77 00 ld (ix), b ; FD 70 00 ld (ix), c ; FD 71 00 ld (ix), d ; FD 72 00 ld (ix), e ; FD 73 00 ld (ix), h ; FD 74 00 ld (ix), hl ; FD F4 00 ld (ix), l ; FD 75 00 ld (ix+127), -128 ; FD 36 7F 80 ld (ix+127), 127 ; FD 36 7F 7F ld (ix+127), 255 ; FD 36 7F FF ld (ix+127), a ; FD 77 7F ld (ix+127), b ; FD 70 7F ld (ix+127), c ; FD 71 7F ld (ix+127), d ; FD 72 7F ld (ix+127), e ; FD 73 7F ld (ix+127), h ; FD 74 7F ld (ix+127), hl ; FD F4 7F ld (ix+127), l ; FD 75 7F ld (ix-128), -128 ; FD 36 80 80 ld (ix-128), 127 ; FD 36 80 7F ld (ix-128), 255 ; FD 36 80 FF ld (ix-128), a ; FD 77 80 ld (ix-128), b ; FD 70 80 ld (ix-128), c ; FD 71 80 ld (ix-128), d ; FD 72 80 ld (ix-128), e ; FD 73 80 ld (ix-128), h ; FD 74 80 ld (ix-128), hl ; FD F4 80 ld (ix-128), l ; FD 75 80 ld (iy), -128 ; DD 36 00 80 ld (iy), 127 ; DD 36 00 7F ld (iy), 255 ; DD 36 00 FF ld (iy), a ; DD 77 00 ld (iy), b ; DD 70 00 ld (iy), c ; DD 71 00 ld (iy), d ; DD 72 00 ld (iy), e ; DD 73 00 ld (iy), h ; DD 74 00 ld (iy), hl ; F4 00 ld (iy), l ; DD 75 00 ld (iy+127), -128 ; DD 36 7F 80 ld (iy+127), 127 ; DD 36 7F 7F ld (iy+127), 255 ; DD 36 7F FF ld (iy+127), a ; DD 77 7F ld (iy+127), b ; DD 70 7F ld (iy+127), c ; DD 71 7F ld (iy+127), d ; DD 72 7F ld (iy+127), e ; DD 73 7F ld (iy+127), h ; DD 74 7F ld (iy+127), hl ; F4 7F ld (iy+127), l ; DD 75 7F ld (iy-128), -128 ; DD 36 80 80 ld (iy-128), 127 ; DD 36 80 7F ld (iy-128), 255 ; DD 36 80 FF ld (iy-128), a ; DD 77 80 ld (iy-128), b ; DD 70 80 ld (iy-128), c ; DD 71 80 ld (iy-128), d ; DD 72 80 ld (iy-128), e ; DD 73 80 ld (iy-128), h ; DD 74 80 ld (iy-128), hl ; F4 80 ld (iy-128), l ; DD 75 80 ld (sp), hl ; D4 00 ld (sp), ix ; FD D4 00 ld (sp), iy ; DD D4 00 ld (sp+0), hl ; D4 00 ld (sp+0), ix ; FD D4 00 ld (sp+0), iy ; DD D4 00 ld (sp+255), hl ; D4 FF ld (sp+255), ix ; FD D4 FF ld (sp+255), iy ; DD D4 FF ld a', (-32768) ; 76 3A 00 80 ld a', (32767) ; 76 3A FF 7F ld a', (65535) ; 76 3A FF FF ld a', (bc) ; 76 0A ld a', (bc+) ; 76 0A 03 ld a', (bc-) ; 76 0A 0B ld a', (de) ; 76 1A ld a', (de+) ; 76 1A 13 ld a', (de-) ; 76 1A 1B ld a', (hl) ; 76 7E ld a', (hl+) ; 76 7E 23 ld a', (hl-) ; 76 7E 2B ld a', (hld) ; 76 7E 2B ld a', (hli) ; 76 7E 23 ld a', (ix) ; 76 FD 7E 00 ld a', (ix+127) ; 76 FD 7E 7F ld a', (ix-128) ; 76 FD 7E 80 ld a', (iy) ; 76 DD 7E 00 ld a', (iy+127) ; 76 DD 7E 7F ld a', (iy-128) ; 76 DD 7E 80 ld a', -128 ; 76 3E 80 ld a', 127 ; 76 3E 7F ld a', 255 ; 76 3E FF ld a', a ; 76 7F ld a', b ; 76 78 ld a', c ; 76 79 ld a', d ; 76 7A ld a', e ; 76 7B ld a', eir ; 76 ED 57 ld a', h ; 76 7C ld a', iir ; 76 ED 5F ld a', l ; 76 7D ld a', xpc ; 76 ED 77 ld a, (-32768) ; 3A 00 80 ld a, (32767) ; 3A FF 7F ld a, (65535) ; 3A FF FF ld a, (bc) ; 0A ld a, (bc+) ; 0A 03 ld a, (bc-) ; 0A 0B ld a, (de) ; 1A ld a, (de+) ; 1A 13 ld a, (de-) ; 1A 1B ld a, (hl) ; 7E ld a, (hl+) ; 7E 23 ld a, (hl-) ; 7E 2B ld a, (hld) ; 7E 2B ld a, (hli) ; 7E 23 ld a, (ix) ; FD 7E 00 ld a, (ix+127) ; FD 7E 7F ld a, (ix-128) ; FD 7E 80 ld a, (iy) ; DD 7E 00 ld a, (iy+127) ; DD 7E 7F ld a, (iy-128) ; DD 7E 80 ld a, -128 ; 3E 80 ld a, 127 ; 3E 7F ld a, 255 ; 3E FF ld a, a ; 7F ld a, b ; 78 ld a, c ; 79 ld a, d ; 7A ld a, e ; 7B ld a, eir ; ED 57 ld a, h ; 7C ld a, iir ; ED 5F ld a, l ; 7D ld a, xpc ; ED 77 ld b', (hl) ; 76 46 ld b', (ix) ; 76 FD 46 00 ld b', (ix+127) ; 76 FD 46 7F ld b', (ix-128) ; 76 FD 46 80 ld b', (iy) ; 76 DD 46 00 ld b', (iy+127) ; 76 DD 46 7F ld b', (iy-128) ; 76 DD 46 80 ld b', -128 ; 76 06 80 ld b', 127 ; 76 06 7F ld b', 255 ; 76 06 FF ld b', a ; 76 47 ld b', b ; 76 40 ld b', c ; 76 41 ld b', d ; 76 42 ld b', e ; 76 43 ld b', h ; 76 44 ld b', l ; 76 45 ld b, (de) ; EB 46 EB ld b, (de+) ; EB 46 EB 13 ld b, (de-) ; EB 46 EB 1B ld b, (hl) ; 46 ld b, (ix) ; FD 46 00 ld b, (ix+127) ; FD 46 7F ld b, (ix-128) ; FD 46 80 ld b, (iy) ; DD 46 00 ld b, (iy+127) ; DD 46 7F ld b, (iy-128) ; DD 46 80 ld b, -128 ; 06 80 ld b, 127 ; 06 7F ld b, 255 ; 06 FF ld b, a ; 47 ld b, b ; 40 ld b, c ; 41 ld b, d ; 42 ld b, e ; 43 ld b, h ; 44 ld b, l ; 45 ld bc', (-32768) ; 76 ED 4B 00 80 ld bc', (32767) ; 76 ED 4B FF 7F ld bc', (65535) ; 76 ED 4B FF FF ld bc', -32768 ; 76 01 00 80 ld bc', 32767 ; 76 01 FF 7F ld bc', 65535 ; 76 01 FF FF ld bc', bc ; ED 49 ld bc', de ; ED 41 ld bc, (-32768) ; ED 4B 00 80 ld bc, (32767) ; ED 4B FF 7F ld bc, (65535) ; ED 4B FF FF ld bc, -32768 ; 01 00 80 ld bc, 32767 ; 01 FF 7F ld bc, 65535 ; 01 FF FF ld bc, de ; 42 4B ld bc, hl ; 44 4D ld c', (hl) ; 76 4E ld c', (ix) ; 76 FD 4E 00 ld c', (ix+127) ; 76 FD 4E 7F ld c', (ix-128) ; 76 FD 4E 80 ld c', (iy) ; 76 DD 4E 00 ld c', (iy+127) ; 76 DD 4E 7F ld c', (iy-128) ; 76 DD 4E 80 ld c', -128 ; 76 0E 80 ld c', 127 ; 76 0E 7F ld c', 255 ; 76 0E FF ld c', a ; 76 4F ld c', b ; 76 48 ld c', c ; 76 49 ld c', d ; 76 4A ld c', e ; 76 4B ld c', h ; 76 4C ld c', l ; 76 4D ld c, (de) ; EB 4E EB ld c, (de+) ; EB 4E EB 13 ld c, (de-) ; EB 4E EB 1B ld c, (hl) ; 4E ld c, (ix) ; FD 4E 00 ld c, (ix+127) ; FD 4E 7F ld c, (ix-128) ; FD 4E 80 ld c, (iy) ; DD 4E 00 ld c, (iy+127) ; DD 4E 7F ld c, (iy-128) ; DD 4E 80 ld c, -128 ; 0E 80 ld c, 127 ; 0E 7F ld c, 255 ; 0E FF ld c, a ; 4F ld c, b ; 48 ld c, c ; 49 ld c, d ; 4A ld c, e ; 4B ld c, h ; 4C ld c, l ; 4D ld d', (hl) ; 76 56 ld d', (ix) ; 76 FD 56 00 ld d', (ix+127) ; 76 FD 56 7F ld d', (ix-128) ; 76 FD 56 80 ld d', (iy) ; 76 DD 56 00 ld d', (iy+127) ; 76 DD 56 7F ld d', (iy-128) ; 76 DD 56 80 ld d', -128 ; 76 16 80 ld d', 127 ; 76 16 7F ld d', 255 ; 76 16 FF ld d', a ; 76 57 ld d', b ; 76 50 ld d', c ; 76 51 ld d', d ; 76 52 ld d', e ; 76 53 ld d', h ; 76 54 ld d', l ; 76 55 ld d, (de) ; EB 66 EB ld d, (de+) ; EB 66 EB 13 ld d, (de-) ; EB 66 EB 1B ld d, (hl) ; 56 ld d, (ix) ; FD 56 00 ld d, (ix+127) ; FD 56 7F ld d, (ix-128) ; FD 56 80 ld d, (iy) ; DD 56 00 ld d, (iy+127) ; DD 56 7F ld d, (iy-128) ; DD 56 80 ld d, -128 ; 16 80 ld d, 127 ; 16 7F ld d, 255 ; 16 FF ld d, a ; 57 ld d, b ; 50 ld d, c ; 51 ld d, d ; 52 ld d, e ; 53 ld d, h ; 54 ld d, l ; 55 ld de', (-32768) ; 76 ED 5B 00 80 ld de', (32767) ; 76 ED 5B FF 7F ld de', (65535) ; 76 ED 5B FF FF ld de', -32768 ; 76 11 00 80 ld de', 32767 ; 76 11 FF 7F ld de', 65535 ; 76 11 FF FF ld de', bc ; ED 59 ld de', de ; ED 51 ld de, (-32768) ; ED 5B 00 80 ld de, (32767) ; ED 5B FF 7F ld de, (65535) ; ED 5B FF FF ld de, -32768 ; 11 00 80 ld de, 32767 ; 11 FF 7F ld de, 65535 ; 11 FF FF ld de, bc ; 50 59 ld de, hl ; 54 5D ld de, sp ; EB 21 00 00 39 EB ld de, sp+0 ; EB 21 00 00 39 EB ld de, sp+255 ; EB 21 FF 00 39 EB ld e', (hl) ; 76 5E ld e', (ix) ; 76 FD 5E 00 ld e', (ix+127) ; 76 FD 5E 7F ld e', (ix-128) ; 76 FD 5E 80 ld e', (iy) ; 76 DD 5E 00 ld e', (iy+127) ; 76 DD 5E 7F ld e', (iy-128) ; 76 DD 5E 80 ld e', -128 ; 76 1E 80 ld e', 127 ; 76 1E 7F ld e', 255 ; 76 1E FF ld e', a ; 76 5F ld e', b ; 76 58 ld e', c ; 76 59 ld e', d ; 76 5A ld e', e ; 76 5B ld e', h ; 76 5C ld e', l ; 76 5D ld e, (de) ; EB 6E EB ld e, (de+) ; EB 6E EB 13 ld e, (de-) ; EB 6E EB 1B ld e, (hl) ; 5E ld e, (ix) ; FD 5E 00 ld e, (ix+127) ; FD 5E 7F ld e, (ix-128) ; FD 5E 80 ld e, (iy) ; DD 5E 00 ld e, (iy+127) ; DD 5E 7F ld e, (iy-128) ; DD 5E 80 ld e, -128 ; 1E 80 ld e, 127 ; 1E 7F ld e, 255 ; 1E FF ld e, a ; 5F ld e, b ; 58 ld e, c ; 59 ld e, d ; 5A ld e, e ; 5B ld e, h ; 5C ld e, l ; 5D ld eir, a ; ED 47 ld h', (hl) ; 76 66 ld h', (ix) ; 76 FD 66 00 ld h', (ix+127) ; 76 FD 66 7F ld h', (ix-128) ; 76 FD 66 80 ld h', (iy) ; 76 DD 66 00 ld h', (iy+127) ; 76 DD 66 7F ld h', (iy-128) ; 76 DD 66 80 ld h', -128 ; 76 26 80 ld h', 127 ; 76 26 7F ld h', 255 ; 76 26 FF ld h', a ; 76 67 ld h', b ; 76 60 ld h', c ; 76 61 ld h', d ; 76 62 ld h', e ; 76 63 ld h', h ; 76 64 ld h', l ; 76 65 ld h, (de) ; EB 56 EB ld h, (de+) ; EB 56 EB 13 ld h, (de-) ; EB 56 EB 1B ld h, (hl) ; 66 ld h, (ix) ; FD 66 00 ld h, (ix+127) ; FD 66 7F ld h, (ix-128) ; FD 66 80 ld h, (iy) ; DD 66 00 ld h, (iy+127) ; DD 66 7F ld h, (iy-128) ; DD 66 80 ld h, -128 ; 26 80 ld h, 127 ; 26 7F ld h, 255 ; 26 FF ld h, a ; 67 ld h, b ; 60 ld h, c ; 61 ld h, d ; 62 ld h, e ; 63 ld h, h ; 64 ld h, l ; 65 ld hl', (-32768) ; 76 2A 00 80 ld hl', (32767) ; 76 2A FF 7F ld hl', (65535) ; 76 2A FF FF ld hl', (hl) ; 76 DD E4 00 ld hl', (hl+127) ; 76 DD E4 7F ld hl', (hl-128) ; 76 DD E4 80 ld hl', (ix) ; 76 FD E4 00 ld hl', (ix+127) ; 76 FD E4 7F ld hl', (ix-128) ; 76 FD E4 80 ld hl', (iy) ; 76 E4 00 ld hl', (iy+127) ; 76 E4 7F ld hl', (iy-128) ; 76 E4 80 ld hl', (sp) ; 76 C4 00 ld hl', (sp+0) ; 76 C4 00 ld hl', (sp+255) ; 76 C4 FF ld hl', -32768 ; 76 21 00 80 ld hl', 32767 ; 76 21 FF 7F ld hl', 65535 ; 76 21 FF FF ld hl', bc ; ED 69 ld hl', de ; ED 61 ld hl', ix ; 76 FD 7C ld hl', iy ; 76 DD 7C ld hl, (-32768) ; 2A 00 80 ld hl, (32767) ; 2A FF 7F ld hl, (65535) ; 2A FF FF ld hl, (hl) ; DD E4 00 ld hl, (hl+127) ; DD E4 7F ld hl, (hl-128) ; DD E4 80 ld hl, (ix) ; FD E4 00 ld hl, (ix+127) ; FD E4 7F ld hl, (ix-128) ; FD E4 80 ld hl, (iy) ; E4 00 ld hl, (iy+127) ; E4 7F ld hl, (iy-128) ; E4 80 ld hl, (sp) ; C4 00 ld hl, (sp+0) ; C4 00 ld hl, (sp+255) ; C4 FF ld hl, -32768 ; 21 00 80 ld hl, 32767 ; 21 FF 7F ld hl, 65535 ; 21 FF FF ld hl, bc ; 60 69 ld hl, de ; 62 6B ld hl, ix ; FD 7C ld hl, iy ; DD 7C ld hl, sp ; 21 00 00 39 ld hl, sp+-128 ; 21 80 FF 39 ld hl, sp+127 ; 21 7F 00 39 ld iir, a ; ED 4F ld ix, (-32768) ; FD 2A 00 80 ld ix, (32767) ; FD 2A FF 7F ld ix, (65535) ; FD 2A FF FF ld ix, (sp) ; FD C4 00 ld ix, (sp+0) ; FD C4 00 ld ix, (sp+255) ; FD C4 FF ld ix, -32768 ; FD 21 00 80 ld ix, 32767 ; FD 21 FF 7F ld ix, 65535 ; FD 21 FF FF ld ix, hl ; FD 7D ld iy, (-32768) ; DD 2A 00 80 ld iy, (32767) ; DD 2A FF 7F ld iy, (65535) ; DD 2A FF FF ld iy, (sp) ; DD C4 00 ld iy, (sp+0) ; DD C4 00 ld iy, (sp+255) ; DD C4 FF ld iy, -32768 ; DD 21 00 80 ld iy, 32767 ; DD 21 FF 7F ld iy, 65535 ; DD 21 FF FF ld iy, hl ; DD 7D ld l', (hl) ; 76 6E ld l', (ix) ; 76 FD 6E 00 ld l', (ix+127) ; 76 FD 6E 7F ld l', (ix-128) ; 76 FD 6E 80 ld l', (iy) ; 76 DD 6E 00 ld l', (iy+127) ; 76 DD 6E 7F ld l', (iy-128) ; 76 DD 6E 80 ld l', -128 ; 76 2E 80 ld l', 127 ; 76 2E 7F ld l', 255 ; 76 2E FF ld l', a ; 76 6F ld l', b ; 76 68 ld l', c ; 76 69 ld l', d ; 76 6A ld l', e ; 76 6B ld l', h ; 76 6C ld l', l ; 76 6D ld l, (de) ; EB 5E EB ld l, (de+) ; EB 5E EB 13 ld l, (de-) ; EB 5E EB 1B ld l, (hl) ; 6E ld l, (ix) ; FD 6E 00 ld l, (ix+127) ; FD 6E 7F ld l, (ix-128) ; FD 6E 80 ld l, (iy) ; DD 6E 00 ld l, (iy+127) ; DD 6E 7F ld l, (iy-128) ; DD 6E 80 ld l, -128 ; 2E 80 ld l, 127 ; 2E 7F ld l, 255 ; 2E FF ld l, a ; 6F ld l, b ; 68 ld l, c ; 69 ld l, d ; 6A ld l, e ; 6B ld l, h ; 6C ld l, l ; 6D ld sp, (-32768) ; ED 7B 00 80 ld sp, (32767) ; ED 7B FF 7F ld sp, (65535) ; ED 7B FF FF ld sp, -32768 ; 31 00 80 ld sp, 32767 ; 31 FF 7F ld sp, 65535 ; 31 FF FF ld sp, hl ; F9 ld sp, ix ; FD F9 ld sp, iy ; DD F9 ld xpc, a ; ED 67 lda -32768 ; 3A 00 80 lda 32767 ; 3A FF 7F lda 65535 ; 3A FF FF ldax b ; 0A ldax bc ; 0A ldax d ; 1A ldax de ; 1A ldd ; ED A8 ldd (bc), a ; 02 0B ldd (de), -128 ; EB 36 80 EB 1B ldd (de), 127 ; EB 36 7F EB 1B ldd (de), 255 ; EB 36 FF EB 1B ldd (de), a ; 12 1B ldd (de), b ; EB 70 EB 1B ldd (de), c ; EB 71 EB 1B ldd (de), d ; EB 74 EB 1B ldd (de), e ; EB 75 EB 1B ldd (de), h ; EB 72 EB 1B ldd (de), l ; EB 73 EB 1B ldd (hl), a ; 77 2B ldd a, (bc) ; 0A 0B ldd a, (de) ; 1A 1B ldd a, (hl) ; 7E 2B ldd b, (de) ; EB 46 EB 1B ldd c, (de) ; EB 4E EB 1B ldd d, (de) ; EB 66 EB 1B ldd e, (de) ; EB 6E EB 1B ldd h, (de) ; EB 56 EB 1B ldd l, (de) ; EB 5E EB 1B lddr ; ED B8 lddsr ; ED 98 ldi ; ED A0 ldi (bc), a ; 02 03 ldi (de), -128 ; EB 36 80 EB 13 ldi (de), 127 ; EB 36 7F EB 13 ldi (de), 255 ; EB 36 FF EB 13 ldi (de), a ; 12 13 ldi (de), b ; EB 70 EB 13 ldi (de), c ; EB 71 EB 13 ldi (de), d ; EB 74 EB 13 ldi (de), e ; EB 75 EB 13 ldi (de), h ; EB 72 EB 13 ldi (de), l ; EB 73 EB 13 ldi (hl), a ; 77 23 ldi a, (bc) ; 0A 03 ldi a, (de) ; 1A 13 ldi a, (hl) ; 7E 23 ldi b, (de) ; EB 46 EB 13 ldi c, (de) ; EB 4E EB 13 ldi d, (de) ; EB 66 EB 13 ldi e, (de) ; EB 6E EB 13 ldi h, (de) ; EB 56 EB 13 ldi l, (de) ; EB 5E EB 13 ldir ; ED B0 ldisr ; ED 90 ldp (-32768), hl ; ED 65 00 80 ldp (-32768), ix ; FD 65 00 80 ldp (-32768), iy ; DD 65 00 80 ldp (32767), hl ; ED 65 FF 7F ldp (32767), ix ; FD 65 FF 7F ldp (32767), iy ; DD 65 FF 7F ldp (65535), hl ; ED 65 FF FF ldp (65535), ix ; FD 65 FF FF ldp (65535), iy ; DD 65 FF FF ldp (hl), hl ; ED 64 ldp (ix), hl ; FD 64 ldp (iy), hl ; DD 64 ldp hl, (-32768) ; ED 6D 00 80 ldp hl, (32767) ; ED 6D FF 7F ldp hl, (65535) ; ED 6D FF FF ldp hl, (hl) ; ED 6C ldp hl, (ix) ; FD 6C ldp hl, (iy) ; DD 6C ldp ix, (-32768) ; FD 6D 00 80 ldp ix, (32767) ; FD 6D FF 7F ldp ix, (65535) ; FD 6D FF FF ldp iy, (-32768) ; DD 6D 00 80 ldp iy, (32767) ; DD 6D FF 7F ldp iy, (65535) ; DD 6D FF FF lhld -32768 ; 2A 00 80 lhld 32767 ; 2A FF 7F lhld 65535 ; 2A FF FF lsddr ; ED D8 lsdr ; ED F8 lsidr ; ED D0 lsir ; ED F0 lxi b, -32768 ; 01 00 80 lxi b, 32767 ; 01 FF 7F lxi b, 65535 ; 01 FF FF lxi bc, -32768 ; 01 00 80 lxi bc, 32767 ; 01 FF 7F lxi bc, 65535 ; 01 FF FF lxi d, -32768 ; 11 00 80 lxi d, 32767 ; 11 FF 7F lxi d, 65535 ; 11 FF FF lxi de, -32768 ; 11 00 80 lxi de, 32767 ; 11 FF 7F lxi de, 65535 ; 11 FF FF lxi h, -32768 ; 21 00 80 lxi h, 32767 ; 21 FF 7F lxi h, 65535 ; 21 FF FF lxi hl, -32768 ; 21 00 80 lxi hl, 32767 ; 21 FF 7F lxi hl, 65535 ; 21 FF FF lxi sp, -32768 ; 31 00 80 lxi sp, 32767 ; 31 FF 7F lxi sp, 65535 ; 31 FF FF mov a, a ; 7F mov a, b ; 78 mov a, c ; 79 mov a, d ; 7A mov a, e ; 7B mov a, h ; 7C mov a, l ; 7D mov a, m ; 7E mov b, a ; 47 mov b, b ; 40 mov b, c ; 41 mov b, d ; 42 mov b, e ; 43 mov b, h ; 44 mov b, l ; 45 mov b, m ; 46 mov c, a ; 4F mov c, b ; 48 mov c, c ; 49 mov c, d ; 4A mov c, e ; 4B mov c, h ; 4C mov c, l ; 4D mov c, m ; 4E mov d, a ; 57 mov d, b ; 50 mov d, c ; 51 mov d, d ; 52 mov d, e ; 53 mov d, h ; 54 mov d, l ; 55 mov d, m ; 56 mov e, a ; 5F mov e, b ; 58 mov e, c ; 59 mov e, d ; 5A mov e, e ; 5B mov e, h ; 5C mov e, l ; 5D mov e, m ; 5E mov h, a ; 67 mov h, b ; 60 mov h, c ; 61 mov h, d ; 62 mov h, e ; 63 mov h, h ; 64 mov h, l ; 65 mov h, m ; 66 mov l, a ; 6F mov l, b ; 68 mov l, c ; 69 mov l, d ; 6A mov l, e ; 6B mov l, h ; 6C mov l, l ; 6D mov l, m ; 6E mov m, a ; 77 mov m, b ; 70 mov m, c ; 71 mov m, d ; 72 mov m, e ; 73 mov m, h ; 74 mov m, l ; 75 mul ; F7 mvi a, -128 ; 3E 80 mvi a, 127 ; 3E 7F mvi a, 255 ; 3E FF mvi b, -128 ; 06 80 mvi b, 127 ; 06 7F mvi b, 255 ; 06 FF mvi c, -128 ; 0E 80 mvi c, 127 ; 0E 7F mvi c, 255 ; 0E FF mvi d, -128 ; 16 80 mvi d, 127 ; 16 7F mvi d, 255 ; 16 FF mvi e, -128 ; 1E 80 mvi e, 127 ; 1E 7F mvi e, 255 ; 1E FF mvi h, -128 ; 26 80 mvi h, 127 ; 26 7F mvi h, 255 ; 26 FF mvi l, -128 ; 2E 80 mvi l, 127 ; 2E 7F mvi l, 255 ; 2E FF mvi m, -128 ; 36 80 mvi m, 127 ; 36 7F mvi m, 255 ; 36 FF neg ; ED 44 neg a ; ED 44 neg a' ; 76 ED 44 nop ; 00 or (hl) ; B6 or (ix) ; FD B6 00 or (ix+127) ; FD B6 7F or (ix-128) ; FD B6 80 or (iy) ; DD B6 00 or (iy+127) ; DD B6 7F or (iy-128) ; DD B6 80 or -128 ; F6 80 or 127 ; F6 7F or 255 ; F6 FF or a ; B7 or a', (hl) ; 76 B6 or a', (ix) ; 76 FD B6 00 or a', (ix+127) ; 76 FD B6 7F or a', (ix-128) ; 76 FD B6 80 or a', (iy) ; 76 DD B6 00 or a', (iy+127) ; 76 DD B6 7F or a', (iy-128) ; 76 DD B6 80 or a', -128 ; 76 F6 80 or a', 127 ; 76 F6 7F or a', 255 ; 76 F6 FF or a', a ; 76 B7 or a', b ; 76 B0 or a', c ; 76 B1 or a', d ; 76 B2 or a', e ; 76 B3 or a', h ; 76 B4 or a', l ; 76 B5 or a, (hl) ; B6 or a, (ix) ; FD B6 00 or a, (ix+127) ; FD B6 7F or a, (ix-128) ; FD B6 80 or a, (iy) ; DD B6 00 or a, (iy+127) ; DD B6 7F or a, (iy-128) ; DD B6 80 or a, -128 ; F6 80 or a, 127 ; F6 7F or a, 255 ; F6 FF or a, a ; B7 or a, b ; B0 or a, c ; B1 or a, d ; B2 or a, e ; B3 or a, h ; B4 or a, l ; B5 or b ; B0 or c ; B1 or d ; B2 or e ; B3 or h ; B4 or hl', de ; 76 EC or hl, de ; EC or ix, de ; FD EC or iy, de ; DD EC or l ; B5 ora a ; B7 ora b ; B0 ora c ; B1 ora d ; B2 ora e ; B3 ora h ; B4 ora l ; B5 ora m ; B6 ori -128 ; F6 80 ori 127 ; F6 7F ori 255 ; F6 FF pchl ; E9 pop af ; F1 pop af' ; 76 F1 pop b ; C1 pop b' ; 76 C1 pop bc ; C1 pop bc' ; 76 C1 pop d ; D1 pop d' ; 76 D1 pop de ; D1 pop de' ; 76 D1 pop h ; E1 pop h' ; 76 E1 pop hl ; E1 pop hl' ; 76 E1 pop ip ; ED 7E pop ix ; FD E1 pop iy ; DD E1 pop psw ; F1 pop su ; ED 6E push af ; F5 push b ; C5 push bc ; C5 push d ; D5 push de ; D5 push h ; E5 push hl ; E5 push ip ; ED 76 push ix ; FD E5 push iy ; DD E5 push psw ; F5 push su ; ED 66 r_c ; D8 r_lo ; E8 r_lz ; E0 r_m ; F8 r_nc ; D0 r_nv ; E0 r_nz ; C0 r_p ; F0 r_pe ; E8 r_po ; E0 r_v ; E8 r_z ; C8 ral ; 17 rar ; 1F rc ; D8 rdel ; F3 rdmode ; ED 7F res 0, (hl) ; CB 86 res 0, (ix) ; FD CB 00 86 res 0, (ix+127) ; FD CB 7F 86 res 0, (ix-128) ; FD CB 80 86 res 0, (iy) ; DD CB 00 86 res 0, (iy+127) ; DD CB 7F 86 res 0, (iy-128) ; DD CB 80 86 res 0, a ; CB 87 res 0, a' ; 76 CB 87 res 0, b ; CB 80 res 0, b' ; 76 CB 80 res 0, c ; CB 81 res 0, c' ; 76 CB 81 res 0, d ; CB 82 res 0, d' ; 76 CB 82 res 0, e ; CB 83 res 0, e' ; 76 CB 83 res 0, h ; CB 84 res 0, h' ; 76 CB 84 res 0, l ; CB 85 res 0, l' ; 76 CB 85 res 1, (hl) ; CB 8E res 1, (ix) ; FD CB 00 8E res 1, (ix+127) ; FD CB 7F 8E res 1, (ix-128) ; FD CB 80 8E res 1, (iy) ; DD CB 00 8E res 1, (iy+127) ; DD CB 7F 8E res 1, (iy-128) ; DD CB 80 8E res 1, a ; CB 8F res 1, a' ; 76 CB 8F res 1, b ; CB 88 res 1, b' ; 76 CB 88 res 1, c ; CB 89 res 1, c' ; 76 CB 89 res 1, d ; CB 8A res 1, d' ; 76 CB 8A res 1, e ; CB 8B res 1, e' ; 76 CB 8B res 1, h ; CB 8C res 1, h' ; 76 CB 8C res 1, l ; CB 8D res 1, l' ; 76 CB 8D res 2, (hl) ; CB 96 res 2, (ix) ; FD CB 00 96 res 2, (ix+127) ; FD CB 7F 96 res 2, (ix-128) ; FD CB 80 96 res 2, (iy) ; DD CB 00 96 res 2, (iy+127) ; DD CB 7F 96 res 2, (iy-128) ; DD CB 80 96 res 2, a ; CB 97 res 2, a' ; 76 CB 97 res 2, b ; CB 90 res 2, b' ; 76 CB 90 res 2, c ; CB 91 res 2, c' ; 76 CB 91 res 2, d ; CB 92 res 2, d' ; 76 CB 92 res 2, e ; CB 93 res 2, e' ; 76 CB 93 res 2, h ; CB 94 res 2, h' ; 76 CB 94 res 2, l ; CB 95 res 2, l' ; 76 CB 95 res 3, (hl) ; CB 9E res 3, (ix) ; FD CB 00 9E res 3, (ix+127) ; FD CB 7F 9E res 3, (ix-128) ; FD CB 80 9E res 3, (iy) ; DD CB 00 9E res 3, (iy+127) ; DD CB 7F 9E res 3, (iy-128) ; DD CB 80 9E res 3, a ; CB 9F res 3, a' ; 76 CB 9F res 3, b ; CB 98 res 3, b' ; 76 CB 98 res 3, c ; CB 99 res 3, c' ; 76 CB 99 res 3, d ; CB 9A res 3, d' ; 76 CB 9A res 3, e ; CB 9B res 3, e' ; 76 CB 9B res 3, h ; CB 9C res 3, h' ; 76 CB 9C res 3, l ; CB 9D res 3, l' ; 76 CB 9D res 4, (hl) ; CB A6 res 4, (ix) ; FD CB 00 A6 res 4, (ix+127) ; FD CB 7F A6 res 4, (ix-128) ; FD CB 80 A6 res 4, (iy) ; DD CB 00 A6 res 4, (iy+127) ; DD CB 7F A6 res 4, (iy-128) ; DD CB 80 A6 res 4, a ; CB A7 res 4, a' ; 76 CB A7 res 4, b ; CB A0 res 4, b' ; 76 CB A0 res 4, c ; CB A1 res 4, c' ; 76 CB A1 res 4, d ; CB A2 res 4, d' ; 76 CB A2 res 4, e ; CB A3 res 4, e' ; 76 CB A3 res 4, h ; CB A4 res 4, h' ; 76 CB A4 res 4, l ; CB A5 res 4, l' ; 76 CB A5 res 5, (hl) ; CB AE res 5, (ix) ; FD CB 00 AE res 5, (ix+127) ; FD CB 7F AE res 5, (ix-128) ; FD CB 80 AE res 5, (iy) ; DD CB 00 AE res 5, (iy+127) ; DD CB 7F AE res 5, (iy-128) ; DD CB 80 AE res 5, a ; CB AF res 5, a' ; 76 CB AF res 5, b ; CB A8 res 5, b' ; 76 CB A8 res 5, c ; CB A9 res 5, c' ; 76 CB A9 res 5, d ; CB AA res 5, d' ; 76 CB AA res 5, e ; CB AB res 5, e' ; 76 CB AB res 5, h ; CB AC res 5, h' ; 76 CB AC res 5, l ; CB AD res 5, l' ; 76 CB AD res 6, (hl) ; CB B6 res 6, (ix) ; FD CB 00 B6 res 6, (ix+127) ; FD CB 7F B6 res 6, (ix-128) ; FD CB 80 B6 res 6, (iy) ; DD CB 00 B6 res 6, (iy+127) ; DD CB 7F B6 res 6, (iy-128) ; DD CB 80 B6 res 6, a ; CB B7 res 6, a' ; 76 CB B7 res 6, b ; CB B0 res 6, b' ; 76 CB B0 res 6, c ; CB B1 res 6, c' ; 76 CB B1 res 6, d ; CB B2 res 6, d' ; 76 CB B2 res 6, e ; CB B3 res 6, e' ; 76 CB B3 res 6, h ; CB B4 res 6, h' ; 76 CB B4 res 6, l ; CB B5 res 6, l' ; 76 CB B5 res 7, (hl) ; CB BE res 7, (ix) ; FD CB 00 BE res 7, (ix+127) ; FD CB 7F BE res 7, (ix-128) ; FD CB 80 BE res 7, (iy) ; DD CB 00 BE res 7, (iy+127) ; DD CB 7F BE res 7, (iy-128) ; DD CB 80 BE res 7, a ; CB BF res 7, a' ; 76 CB BF res 7, b ; CB B8 res 7, b' ; 76 CB B8 res 7, c ; CB B9 res 7, c' ; 76 CB B9 res 7, d ; CB BA res 7, d' ; 76 CB BA res 7, e ; CB BB res 7, e' ; 76 CB BB res 7, h ; CB BC res 7, h' ; 76 CB BC res 7, l ; CB BD res 7, l' ; 76 CB BD res.a 0, (hl) ; CB 86 res.a 0, (ix) ; FD CB 00 86 res.a 0, (ix+127) ; FD CB 7F 86 res.a 0, (ix-128) ; FD CB 80 86 res.a 0, (iy) ; DD CB 00 86 res.a 0, (iy+127) ; DD CB 7F 86 res.a 0, (iy-128) ; DD CB 80 86 res.a 0, a ; CB 87 res.a 0, b ; CB 80 res.a 0, c ; CB 81 res.a 0, d ; CB 82 res.a 0, e ; CB 83 res.a 0, h ; CB 84 res.a 0, l ; CB 85 res.a 1, (hl) ; CB 8E res.a 1, (ix) ; FD CB 00 8E res.a 1, (ix+127) ; FD CB 7F 8E res.a 1, (ix-128) ; FD CB 80 8E res.a 1, (iy) ; DD CB 00 8E res.a 1, (iy+127) ; DD CB 7F 8E res.a 1, (iy-128) ; DD CB 80 8E res.a 1, a ; CB 8F res.a 1, b ; CB 88 res.a 1, c ; CB 89 res.a 1, d ; CB 8A res.a 1, e ; CB 8B res.a 1, h ; CB 8C res.a 1, l ; CB 8D res.a 2, (hl) ; CB 96 res.a 2, (ix) ; FD CB 00 96 res.a 2, (ix+127) ; FD CB 7F 96 res.a 2, (ix-128) ; FD CB 80 96 res.a 2, (iy) ; DD CB 00 96 res.a 2, (iy+127) ; DD CB 7F 96 res.a 2, (iy-128) ; DD CB 80 96 res.a 2, a ; CB 97 res.a 2, b ; CB 90 res.a 2, c ; CB 91 res.a 2, d ; CB 92 res.a 2, e ; CB 93 res.a 2, h ; CB 94 res.a 2, l ; CB 95 res.a 3, (hl) ; CB 9E res.a 3, (ix) ; FD CB 00 9E res.a 3, (ix+127) ; FD CB 7F 9E res.a 3, (ix-128) ; FD CB 80 9E res.a 3, (iy) ; DD CB 00 9E res.a 3, (iy+127) ; DD CB 7F 9E res.a 3, (iy-128) ; DD CB 80 9E res.a 3, a ; CB 9F res.a 3, b ; CB 98 res.a 3, c ; CB 99 res.a 3, d ; CB 9A res.a 3, e ; CB 9B res.a 3, h ; CB 9C res.a 3, l ; CB 9D res.a 4, (hl) ; CB A6 res.a 4, (ix) ; FD CB 00 A6 res.a 4, (ix+127) ; FD CB 7F A6 res.a 4, (ix-128) ; FD CB 80 A6 res.a 4, (iy) ; DD CB 00 A6 res.a 4, (iy+127) ; DD CB 7F A6 res.a 4, (iy-128) ; DD CB 80 A6 res.a 4, a ; CB A7 res.a 4, b ; CB A0 res.a 4, c ; CB A1 res.a 4, d ; CB A2 res.a 4, e ; CB A3 res.a 4, h ; CB A4 res.a 4, l ; CB A5 res.a 5, (hl) ; CB AE res.a 5, (ix) ; FD CB 00 AE res.a 5, (ix+127) ; FD CB 7F AE res.a 5, (ix-128) ; FD CB 80 AE res.a 5, (iy) ; DD CB 00 AE res.a 5, (iy+127) ; DD CB 7F AE res.a 5, (iy-128) ; DD CB 80 AE res.a 5, a ; CB AF res.a 5, b ; CB A8 res.a 5, c ; CB A9 res.a 5, d ; CB AA res.a 5, e ; CB AB res.a 5, h ; CB AC res.a 5, l ; CB AD res.a 6, (hl) ; CB B6 res.a 6, (ix) ; FD CB 00 B6 res.a 6, (ix+127) ; FD CB 7F B6 res.a 6, (ix-128) ; FD CB 80 B6 res.a 6, (iy) ; DD CB 00 B6 res.a 6, (iy+127) ; DD CB 7F B6 res.a 6, (iy-128) ; DD CB 80 B6 res.a 6, a ; CB B7 res.a 6, b ; CB B0 res.a 6, c ; CB B1 res.a 6, d ; CB B2 res.a 6, e ; CB B3 res.a 6, h ; CB B4 res.a 6, l ; CB B5 res.a 7, (hl) ; CB BE res.a 7, (ix) ; FD CB 00 BE res.a 7, (ix+127) ; FD CB 7F BE res.a 7, (ix-128) ; FD CB 80 BE res.a 7, (iy) ; DD CB 00 BE res.a 7, (iy+127) ; DD CB 7F BE res.a 7, (iy-128) ; DD CB 80 BE res.a 7, a ; CB BF res.a 7, b ; CB B8 res.a 7, c ; CB B9 res.a 7, d ; CB BA res.a 7, e ; CB BB res.a 7, h ; CB BC res.a 7, l ; CB BD ret ; C9 ret c ; D8 ret lo ; E8 ret lz ; E0 ret m ; F8 ret nc ; D0 ret nv ; E0 ret nz ; C0 ret p ; F0 ret pe ; E8 ret po ; E0 ret v ; E8 ret z ; C8 reti ; ED 4D rl (hl) ; CB 16 rl (ix) ; FD CB 00 16 rl (ix+127) ; FD CB 7F 16 rl (ix-128) ; FD CB 80 16 rl (iy) ; DD CB 00 16 rl (iy+127) ; DD CB 7F 16 rl (iy-128) ; DD CB 80 16 rl a ; CB 17 rl a' ; 76 CB 17 rl b ; CB 10 rl b' ; 76 CB 10 rl bc ; CB 11 CB 10 rl c ; CB 11 rl c' ; 76 CB 11 rl d ; CB 12 rl d' ; 76 CB 12 rl de ; F3 rl de' ; 76 F3 rl e ; CB 13 rl e' ; 76 CB 13 rl h ; CB 14 rl h' ; 76 CB 14 rl hl ; CB 15 CB 14 rl l ; CB 15 rl l' ; 76 CB 15 rla ; 17 rla' ; 76 17 rlc ; 07 rlc (hl) ; CB 06 rlc (ix) ; FD CB 00 06 rlc (ix+127) ; FD CB 7F 06 rlc (ix-128) ; FD CB 80 06 rlc (iy) ; DD CB 00 06 rlc (iy+127) ; DD CB 7F 06 rlc (iy-128) ; DD CB 80 06 rlc a ; CB 07 rlc a' ; 76 CB 07 rlc b ; CB 00 rlc b' ; 76 CB 00 rlc c ; CB 01 rlc c' ; 76 CB 01 rlc d ; CB 02 rlc d' ; 76 CB 02 rlc e ; CB 03 rlc e' ; 76 CB 03 rlc h ; CB 04 rlc h' ; 76 CB 04 rlc l ; CB 05 rlc l' ; 76 CB 05 rlca ; 07 rlca' ; 76 07 rld ; CD @__z80asm__rld rlde ; F3 rlo ; E8 rlz ; E0 rm ; F8 rnc ; D0 rnv ; E0 rnz ; C0 rp ; F0 rpe ; E8 rpo ; E0 rr (hl) ; CB 1E rr (ix) ; FD CB 00 1E rr (ix+127) ; FD CB 7F 1E rr (ix-128) ; FD CB 80 1E rr (iy) ; DD CB 00 1E rr (iy+127) ; DD CB 7F 1E rr (iy-128) ; DD CB 80 1E rr a ; CB 1F rr a' ; 76 CB 1F rr b ; CB 18 rr b' ; 76 CB 18 rr bc ; CB 18 CB 19 rr c ; CB 19 rr c' ; 76 CB 19 rr d ; CB 1A rr d' ; 76 CB 1A rr de ; FB rr de' ; 76 FB rr e ; CB 1B rr e' ; 76 CB 1B rr h ; CB 1C rr h' ; 76 CB 1C rr hl ; FC rr hl' ; 76 FC rr ix ; FD FC rr iy ; DD FC rr l ; CB 1D rr l' ; 76 CB 1D rra ; 1F rra' ; 76 1F rrc ; 0F rrc (hl) ; CB 0E rrc (ix) ; FD CB 00 0E rrc (ix+127) ; FD CB 7F 0E rrc (ix-128) ; FD CB 80 0E rrc (iy) ; DD CB 00 0E rrc (iy+127) ; DD CB 7F 0E rrc (iy-128) ; DD CB 80 0E rrc a ; CB 0F rrc a' ; 76 CB 0F rrc b ; CB 08 rrc b' ; 76 CB 08 rrc c ; CB 09 rrc c' ; 76 CB 09 rrc d ; CB 0A rrc d' ; 76 CB 0A rrc e ; CB 0B rrc e' ; 76 CB 0B rrc h ; CB 0C rrc h' ; 76 CB 0C rrc l ; CB 0D rrc l' ; 76 CB 0D rrca ; 0F rrca' ; 76 0F rrd ; CD @__z80asm__rrd rrhl ; CB 2C CB 1D rst 0 ; CD 00 00 rst 1 ; CD 08 00 rst 16 ; D7 rst 2 ; D7 rst 24 ; DF rst 3 ; DF rst 32 ; E7 rst 4 ; E7 rst 40 ; EF rst 48 ; CD 30 00 rst 5 ; EF rst 56 ; FF rst 6 ; CD 30 00 rst 7 ; FF rst 8 ; CD 08 00 rv ; E8 rz ; C8 sbb a ; 9F sbb b ; 98 sbb c ; 99 sbb d ; 9A sbb e ; 9B sbb h ; 9C sbb l ; 9D sbb m ; 9E sbc (hl) ; 9E sbc (ix) ; FD 9E 00 sbc (ix+127) ; FD 9E 7F sbc (ix-128) ; FD 9E 80 sbc (iy) ; DD 9E 00 sbc (iy+127) ; DD 9E 7F sbc (iy-128) ; DD 9E 80 sbc -128 ; DE 80 sbc 127 ; DE 7F sbc 255 ; DE FF sbc a ; 9F sbc a', (hl) ; 76 9E sbc a', (ix) ; 76 FD 9E 00 sbc a', (ix+127) ; 76 FD 9E 7F sbc a', (ix-128) ; 76 FD 9E 80 sbc a', (iy) ; 76 DD 9E 00 sbc a', (iy+127) ; 76 DD 9E 7F sbc a', (iy-128) ; 76 DD 9E 80 sbc a', -128 ; 76 DE 80 sbc a', 127 ; 76 DE 7F sbc a', 255 ; 76 DE FF sbc a', a ; 76 9F sbc a', b ; 76 98 sbc a', c ; 76 99 sbc a', d ; 76 9A sbc a', e ; 76 9B sbc a', h ; 76 9C sbc a', l ; 76 9D sbc a, (hl) ; 9E sbc a, (ix) ; FD 9E 00 sbc a, (ix+127) ; FD 9E 7F sbc a, (ix-128) ; FD 9E 80 sbc a, (iy) ; DD 9E 00 sbc a, (iy+127) ; DD 9E 7F sbc a, (iy-128) ; DD 9E 80 sbc a, -128 ; DE 80 sbc a, 127 ; DE 7F sbc a, 255 ; DE FF sbc a, a ; 9F sbc a, b ; 98 sbc a, c ; 99 sbc a, d ; 9A sbc a, e ; 9B sbc a, h ; 9C sbc a, l ; 9D sbc b ; 98 sbc c ; 99 sbc d ; 9A sbc e ; 9B sbc h ; 9C sbc hl', bc ; 76 ED 42 sbc hl', de ; 76 ED 52 sbc hl', hl ; 76 ED 62 sbc hl', sp ; 76 ED 72 sbc hl, bc ; ED 42 sbc hl, de ; ED 52 sbc hl, hl ; ED 62 sbc hl, sp ; ED 72 sbc l ; 9D sbi -128 ; DE 80 sbi 127 ; DE 7F sbi 255 ; DE FF scf ; 37 scf' ; 76 37 set 0, (hl) ; CB C6 set 0, (ix) ; FD CB 00 C6 set 0, (ix+127) ; FD CB 7F C6 set 0, (ix-128) ; FD CB 80 C6 set 0, (iy) ; DD CB 00 C6 set 0, (iy+127) ; DD CB 7F C6 set 0, (iy-128) ; DD CB 80 C6 set 0, a ; CB C7 set 0, a' ; 76 CB C7 set 0, b ; CB C0 set 0, b' ; 76 CB C0 set 0, c ; CB C1 set 0, c' ; 76 CB C1 set 0, d ; CB C2 set 0, d' ; 76 CB C2 set 0, e ; CB C3 set 0, e' ; 76 CB C3 set 0, h ; CB C4 set 0, h' ; 76 CB C4 set 0, l ; CB C5 set 0, l' ; 76 CB C5 set 1, (hl) ; CB CE set 1, (ix) ; FD CB 00 CE set 1, (ix+127) ; FD CB 7F CE set 1, (ix-128) ; FD CB 80 CE set 1, (iy) ; DD CB 00 CE set 1, (iy+127) ; DD CB 7F CE set 1, (iy-128) ; DD CB 80 CE set 1, a ; CB CF set 1, a' ; 76 CB CF set 1, b ; CB C8 set 1, b' ; 76 CB C8 set 1, c ; CB C9 set 1, c' ; 76 CB C9 set 1, d ; CB CA set 1, d' ; 76 CB CA set 1, e ; CB CB set 1, e' ; 76 CB CB set 1, h ; CB CC set 1, h' ; 76 CB CC set 1, l ; CB CD set 1, l' ; 76 CB CD set 2, (hl) ; CB D6 set 2, (ix) ; FD CB 00 D6 set 2, (ix+127) ; FD CB 7F D6 set 2, (ix-128) ; FD CB 80 D6 set 2, (iy) ; DD CB 00 D6 set 2, (iy+127) ; DD CB 7F D6 set 2, (iy-128) ; DD CB 80 D6 set 2, a ; CB D7 set 2, a' ; 76 CB D7 set 2, b ; CB D0 set 2, b' ; 76 CB D0 set 2, c ; CB D1 set 2, c' ; 76 CB D1 set 2, d ; CB D2 set 2, d' ; 76 CB D2 set 2, e ; CB D3 set 2, e' ; 76 CB D3 set 2, h ; CB D4 set 2, h' ; 76 CB D4 set 2, l ; CB D5 set 2, l' ; 76 CB D5 set 3, (hl) ; CB DE set 3, (ix) ; FD CB 00 DE set 3, (ix+127) ; FD CB 7F DE set 3, (ix-128) ; FD CB 80 DE set 3, (iy) ; DD CB 00 DE set 3, (iy+127) ; DD CB 7F DE set 3, (iy-128) ; DD CB 80 DE set 3, a ; CB DF set 3, a' ; 76 CB DF set 3, b ; CB D8 set 3, b' ; 76 CB D8 set 3, c ; CB D9 set 3, c' ; 76 CB D9 set 3, d ; CB DA set 3, d' ; 76 CB DA set 3, e ; CB DB set 3, e' ; 76 CB DB set 3, h ; CB DC set 3, h' ; 76 CB DC set 3, l ; CB DD set 3, l' ; 76 CB DD set 4, (hl) ; CB E6 set 4, (ix) ; FD CB 00 E6 set 4, (ix+127) ; FD CB 7F E6 set 4, (ix-128) ; FD CB 80 E6 set 4, (iy) ; DD CB 00 E6 set 4, (iy+127) ; DD CB 7F E6 set 4, (iy-128) ; DD CB 80 E6 set 4, a ; CB E7 set 4, a' ; 76 CB E7 set 4, b ; CB E0 set 4, b' ; 76 CB E0 set 4, c ; CB E1 set 4, c' ; 76 CB E1 set 4, d ; CB E2 set 4, d' ; 76 CB E2 set 4, e ; CB E3 set 4, e' ; 76 CB E3 set 4, h ; CB E4 set 4, h' ; 76 CB E4 set 4, l ; CB E5 set 4, l' ; 76 CB E5 set 5, (hl) ; CB EE set 5, (ix) ; FD CB 00 EE set 5, (ix+127) ; FD CB 7F EE set 5, (ix-128) ; FD CB 80 EE set 5, (iy) ; DD CB 00 EE set 5, (iy+127) ; DD CB 7F EE set 5, (iy-128) ; DD CB 80 EE set 5, a ; CB EF set 5, a' ; 76 CB EF set 5, b ; CB E8 set 5, b' ; 76 CB E8 set 5, c ; CB E9 set 5, c' ; 76 CB E9 set 5, d ; CB EA set 5, d' ; 76 CB EA set 5, e ; CB EB set 5, e' ; 76 CB EB set 5, h ; CB EC set 5, h' ; 76 CB EC set 5, l ; CB ED set 5, l' ; 76 CB ED set 6, (hl) ; CB F6 set 6, (ix) ; FD CB 00 F6 set 6, (ix+127) ; FD CB 7F F6 set 6, (ix-128) ; FD CB 80 F6 set 6, (iy) ; DD CB 00 F6 set 6, (iy+127) ; DD CB 7F F6 set 6, (iy-128) ; DD CB 80 F6 set 6, a ; CB F7 set 6, a' ; 76 CB F7 set 6, b ; CB F0 set 6, b' ; 76 CB F0 set 6, c ; CB F1 set 6, c' ; 76 CB F1 set 6, d ; CB F2 set 6, d' ; 76 CB F2 set 6, e ; CB F3 set 6, e' ; 76 CB F3 set 6, h ; CB F4 set 6, h' ; 76 CB F4 set 6, l ; CB F5 set 6, l' ; 76 CB F5 set 7, (hl) ; CB FE set 7, (ix) ; FD CB 00 FE set 7, (ix+127) ; FD CB 7F FE set 7, (ix-128) ; FD CB 80 FE set 7, (iy) ; DD CB 00 FE set 7, (iy+127) ; DD CB 7F FE set 7, (iy-128) ; DD CB 80 FE set 7, a ; CB FF set 7, a' ; 76 CB FF set 7, b ; CB F8 set 7, b' ; 76 CB F8 set 7, c ; CB F9 set 7, c' ; 76 CB F9 set 7, d ; CB FA set 7, d' ; 76 CB FA set 7, e ; CB FB set 7, e' ; 76 CB FB set 7, h ; CB FC set 7, h' ; 76 CB FC set 7, l ; CB FD set 7, l' ; 76 CB FD set.a 0, (hl) ; CB C6 set.a 0, (ix) ; FD CB 00 C6 set.a 0, (ix+127) ; FD CB 7F C6 set.a 0, (ix-128) ; FD CB 80 C6 set.a 0, (iy) ; DD CB 00 C6 set.a 0, (iy+127) ; DD CB 7F C6 set.a 0, (iy-128) ; DD CB 80 C6 set.a 0, a ; CB C7 set.a 0, b ; CB C0 set.a 0, c ; CB C1 set.a 0, d ; CB C2 set.a 0, e ; CB C3 set.a 0, h ; CB C4 set.a 0, l ; CB C5 set.a 1, (hl) ; CB CE set.a 1, (ix) ; FD CB 00 CE set.a 1, (ix+127) ; FD CB 7F CE set.a 1, (ix-128) ; FD CB 80 CE set.a 1, (iy) ; DD CB 00 CE set.a 1, (iy+127) ; DD CB 7F CE set.a 1, (iy-128) ; DD CB 80 CE set.a 1, a ; CB CF set.a 1, b ; CB C8 set.a 1, c ; CB C9 set.a 1, d ; CB CA set.a 1, e ; CB CB set.a 1, h ; CB CC set.a 1, l ; CB CD set.a 2, (hl) ; CB D6 set.a 2, (ix) ; FD CB 00 D6 set.a 2, (ix+127) ; FD CB 7F D6 set.a 2, (ix-128) ; FD CB 80 D6 set.a 2, (iy) ; DD CB 00 D6 set.a 2, (iy+127) ; DD CB 7F D6 set.a 2, (iy-128) ; DD CB 80 D6 set.a 2, a ; CB D7 set.a 2, b ; CB D0 set.a 2, c ; CB D1 set.a 2, d ; CB D2 set.a 2, e ; CB D3 set.a 2, h ; CB D4 set.a 2, l ; CB D5 set.a 3, (hl) ; CB DE set.a 3, (ix) ; FD CB 00 DE set.a 3, (ix+127) ; FD CB 7F DE set.a 3, (ix-128) ; FD CB 80 DE set.a 3, (iy) ; DD CB 00 DE set.a 3, (iy+127) ; DD CB 7F DE set.a 3, (iy-128) ; DD CB 80 DE set.a 3, a ; CB DF set.a 3, b ; CB D8 set.a 3, c ; CB D9 set.a 3, d ; CB DA set.a 3, e ; CB DB set.a 3, h ; CB DC set.a 3, l ; CB DD set.a 4, (hl) ; CB E6 set.a 4, (ix) ; FD CB 00 E6 set.a 4, (ix+127) ; FD CB 7F E6 set.a 4, (ix-128) ; FD CB 80 E6 set.a 4, (iy) ; DD CB 00 E6 set.a 4, (iy+127) ; DD CB 7F E6 set.a 4, (iy-128) ; DD CB 80 E6 set.a 4, a ; CB E7 set.a 4, b ; CB E0 set.a 4, c ; CB E1 set.a 4, d ; CB E2 set.a 4, e ; CB E3 set.a 4, h ; CB E4 set.a 4, l ; CB E5 set.a 5, (hl) ; CB EE set.a 5, (ix) ; FD CB 00 EE set.a 5, (ix+127) ; FD CB 7F EE set.a 5, (ix-128) ; FD CB 80 EE set.a 5, (iy) ; DD CB 00 EE set.a 5, (iy+127) ; DD CB 7F EE set.a 5, (iy-128) ; DD CB 80 EE set.a 5, a ; CB EF set.a 5, b ; CB E8 set.a 5, c ; CB E9 set.a 5, d ; CB EA set.a 5, e ; CB EB set.a 5, h ; CB EC set.a 5, l ; CB ED set.a 6, (hl) ; CB F6 set.a 6, (ix) ; FD CB 00 F6 set.a 6, (ix+127) ; FD CB 7F F6 set.a 6, (ix-128) ; FD CB 80 F6 set.a 6, (iy) ; DD CB 00 F6 set.a 6, (iy+127) ; DD CB 7F F6 set.a 6, (iy-128) ; DD CB 80 F6 set.a 6, a ; CB F7 set.a 6, b ; CB F0 set.a 6, c ; CB F1 set.a 6, d ; CB F2 set.a 6, e ; CB F3 set.a 6, h ; CB F4 set.a 6, l ; CB F5 set.a 7, (hl) ; CB FE set.a 7, (ix) ; FD CB 00 FE set.a 7, (ix+127) ; FD CB 7F FE set.a 7, (ix-128) ; FD CB 80 FE set.a 7, (iy) ; DD CB 00 FE set.a 7, (iy+127) ; DD CB 7F FE set.a 7, (iy-128) ; DD CB 80 FE set.a 7, a ; CB FF set.a 7, b ; CB F8 set.a 7, c ; CB F9 set.a 7, d ; CB FA set.a 7, e ; CB FB set.a 7, h ; CB FC set.a 7, l ; CB FD setusr ; ED 6F shld -32768 ; 22 00 80 shld 32767 ; 22 FF 7F shld 65535 ; 22 FF FF sla (hl) ; CB 26 sla (ix) ; FD CB 00 26 sla (ix+127) ; FD CB 7F 26 sla (ix-128) ; FD CB 80 26 sla (iy) ; DD CB 00 26 sla (iy+127) ; DD CB 7F 26 sla (iy-128) ; DD CB 80 26 sla a ; CB 27 sla a' ; 76 CB 27 sla b ; CB 20 sla b' ; 76 CB 20 sla c ; CB 21 sla c' ; 76 CB 21 sla d ; CB 22 sla d' ; 76 CB 22 sla e ; CB 23 sla e' ; 76 CB 23 sla h ; CB 24 sla h' ; 76 CB 24 sla l ; CB 25 sla l' ; 76 CB 25 sphl ; F9 sra (hl) ; CB 2E sra (ix) ; FD CB 00 2E sra (ix+127) ; FD CB 7F 2E sra (ix-128) ; FD CB 80 2E sra (iy) ; DD CB 00 2E sra (iy+127) ; DD CB 7F 2E sra (iy-128) ; DD CB 80 2E sra a ; CB 2F sra a' ; 76 CB 2F sra b ; CB 28 sra b' ; 76 CB 28 sra bc ; CB 28 CB 19 sra c ; CB 29 sra c' ; 76 CB 29 sra d ; CB 2A sra d' ; 76 CB 2A sra de ; CB 2A CB 1B sra e ; CB 2B sra e' ; 76 CB 2B sra h ; CB 2C sra h' ; 76 CB 2C sra hl ; CB 2C CB 1D sra l ; CB 2D sra l' ; 76 CB 2D srl (hl) ; CB 3E srl (ix) ; FD CB 00 3E srl (ix+127) ; FD CB 7F 3E srl (ix-128) ; FD CB 80 3E srl (iy) ; DD CB 00 3E srl (iy+127) ; DD CB 7F 3E srl (iy-128) ; DD CB 80 3E srl a ; CB 3F srl a' ; 76 CB 3F srl b ; CB 38 srl b' ; 76 CB 38 srl c ; CB 39 srl c' ; 76 CB 39 srl d ; CB 3A srl d' ; 76 CB 3A srl e ; CB 3B srl e' ; 76 CB 3B srl h ; CB 3C srl h' ; 76 CB 3C srl l ; CB 3D srl l' ; 76 CB 3D sta -32768 ; 32 00 80 sta 32767 ; 32 FF 7F sta 65535 ; 32 FF FF stax b ; 02 stax bc ; 02 stax d ; 12 stax de ; 12 stc ; 37 sub (hl) ; 96 sub (ix) ; FD 96 00 sub (ix+127) ; FD 96 7F sub (ix-128) ; FD 96 80 sub (iy) ; DD 96 00 sub (iy+127) ; DD 96 7F sub (iy-128) ; DD 96 80 sub -128 ; D6 80 sub 127 ; D6 7F sub 255 ; D6 FF sub a ; 97 sub a', (hl) ; 76 96 sub a', (ix) ; 76 FD 96 00 sub a', (ix+127) ; 76 FD 96 7F sub a', (ix-128) ; 76 FD 96 80 sub a', (iy) ; 76 DD 96 00 sub a', (iy+127) ; 76 DD 96 7F sub a', (iy-128) ; 76 DD 96 80 sub a', -128 ; 76 D6 80 sub a', 127 ; 76 D6 7F sub a', 255 ; 76 D6 FF sub a', a ; 76 97 sub a', b ; 76 90 sub a', c ; 76 91 sub a', d ; 76 92 sub a', e ; 76 93 sub a', h ; 76 94 sub a', l ; 76 95 sub a, (hl) ; 96 sub a, (ix) ; FD 96 00 sub a, (ix+127) ; FD 96 7F sub a, (ix-128) ; FD 96 80 sub a, (iy) ; DD 96 00 sub a, (iy+127) ; DD 96 7F sub a, (iy-128) ; DD 96 80 sub a, -128 ; D6 80 sub a, 127 ; D6 7F sub a, 255 ; D6 FF sub a, a ; 97 sub a, b ; 90 sub a, c ; 91 sub a, d ; 92 sub a, e ; 93 sub a, h ; 94 sub a, l ; 95 sub b ; 90 sub c ; 91 sub d ; 92 sub e ; 93 sub h ; 94 sub hl, bc ; CD @__z80asm__sub_hl_bc sub hl, de ; CD @__z80asm__sub_hl_de sub hl, hl ; CD @__z80asm__sub_hl_hl sub hl, sp ; CD @__z80asm__sub_hl_sp sub l ; 95 sub m ; 96 sui -128 ; D6 80 sui 127 ; D6 7F sui 255 ; D6 FF sures ; ED 7D syscall ; ED 75 uma ; ED C0 ums ; ED C8 xchg ; EB xor (hl) ; AE xor (ix) ; FD AE 00 xor (ix+127) ; FD AE 7F xor (ix-128) ; FD AE 80 xor (iy) ; DD AE 00 xor (iy+127) ; DD AE 7F xor (iy-128) ; DD AE 80 xor -128 ; EE 80 xor 127 ; EE 7F xor 255 ; EE FF xor a ; AF xor a', (hl) ; 76 AE xor a', (ix) ; 76 FD AE 00 xor a', (ix+127) ; 76 FD AE 7F xor a', (ix-128) ; 76 FD AE 80 xor a', (iy) ; 76 DD AE 00 xor a', (iy+127) ; 76 DD AE 7F xor a', (iy-128) ; 76 DD AE 80 xor a', -128 ; 76 EE 80 xor a', 127 ; 76 EE 7F xor a', 255 ; 76 EE FF xor a', a ; 76 AF xor a', b ; 76 A8 xor a', c ; 76 A9 xor a', d ; 76 AA xor a', e ; 76 AB xor a', h ; 76 AC xor a', l ; 76 AD xor a, (hl) ; AE xor a, (ix) ; FD AE 00 xor a, (ix+127) ; FD AE 7F xor a, (ix-128) ; FD AE 80 xor a, (iy) ; DD AE 00 xor a, (iy+127) ; DD AE 7F xor a, (iy-128) ; DD AE 80 xor a, -128 ; EE 80 xor a, 127 ; EE 7F xor a, 255 ; EE FF xor a, a ; AF xor a, b ; A8 xor a, c ; A9 xor a, d ; AA xor a, e ; AB xor a, h ; AC xor a, l ; AD xor b ; A8 xor c ; A9 xor d ; AA xor e ; AB xor h ; AC xor l ; AD xra a ; AF xra b ; A8 xra c ; A9 xra d ; AA xra e ; AB xra h ; AC xra l ; AD xra m ; AE xri -128 ; EE 80 xri 127 ; EE 7F xri 255 ; EE FF
; A042911: Denominators of continued fraction convergents to sqrt(987). ; Submitted by Jamie Morken(w3) ; 1,2,5,12,749,1510,3769,9048,564745,1138538,2841821,6822180,425816981,858456142,2142729265,5143914672,321065438929,647274792530,1615615023989,3878504840508,242082915135485,488044335111478,1218171585358441,2924387505828360,182530196946716761,367984781399261882,918499759745240525,2204984300889742932,137627526414909302309,277460037130708347550,692547600676325997409,1662555238483360342368,103770972386644667224225,209204500011772694790818,522179972410190056805861,1253564444832152808402540 add $0,1 mov $3,1 lpb $0 sub $0,1 add $3,$2 add $2,$3 mov $3,$1 mov $1,$2 dif $2,3 mod $2,$1 mul $2,180 add $3,$2 mov $2,$1 lpe mov $0,$1
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // /////////////////////////////////////////////////////////////////////////////////////////////////// #include "test_utils.h" #include <intel_gpu/primitives/input_layout.hpp> #include <intel_gpu/primitives/lstm.hpp> #include <intel_gpu/primitives/split.hpp> #include <intel_gpu/primitives/crop.hpp> #include <intel_gpu/primitives/reshape.hpp> #include <intel_gpu/primitives/concatenation.hpp> #include <intel_gpu/primitives/data.hpp> #include <sstream> #include <iomanip> #ifdef _WIN32 # pragma warning(disable: 4503) #endif using namespace cldnn; using namespace ::tests; #define FERROR 1E-4 namespace { float sigmoid(float x) { return 1.f / (1.f + (float)std::exp((float)(-x))); } } struct offset_order { size_t it, ot, ft, zt; offset_order(size_t scale, const lstm_weights_order& t = lstm_weights_order::iofz) { static const std::map<lstm_weights_order, std::vector<size_t>> offset_map{ { lstm_weights_order::iofz,{ 0, 1, 2, 3 } }, { lstm_weights_order::ifoz,{ 0, 2, 1, 3 } } }; std::vector<size_t> v = offset_map.at(t); it = v[0] * scale; ot = v[1] * scale; ft = v[2] * scale; zt = v[3] * scale; } }; lstm_weights_order default_offset_type = lstm_weights_order::iofz; template<typename T> T clip(T val, T threshold) { if (threshold > 0) { if (val > threshold) return threshold; if (val < -threshold) return -threshold; } return val; } template <typename T> VVVVF<T> lstm_gemm_reference(VVVVF<T>& input, VVVVF<T>& weights, VVVVF<T>& recurrent, VVVVF<T>& bias, VVVVF<T>& hidden, size_t seq, bool hasBias = true, bool hasHidden = true, size_t dir = 0, size_t input_dir = 0) { size_t input_size = input[0][0][0].size(); size_t hidden_size = hidden[0][0][0].size(); size_t batch_size = input.size(); // Temporary output from GEMM operations [f, i, o, z] VVVVF<T> tempGEMM(batch_size, VVVF<T>(1, VVF<T>(1, VF<T>(4 * hidden_size)))); for (size_t b = 0; b < batch_size; ++b) { for (size_t y = 0; y < 4 * hidden_size; ++y) { T res = 0; for (size_t x = 0; x < input_size; ++x) { res += (T)weights[0][dir][y][x] * (T)input[b][seq][input_dir][x]; } if (hasHidden) { for (size_t x = 0; x < hidden_size; ++x) { res += (T)recurrent[0][dir][y][x] * (T)hidden[b][0][dir][x]; } } if (hasBias) { res += (T)bias[0][0][dir][y]; } tempGEMM[b][0][0][y] = res; } } return tempGEMM; } template <typename T> VVVVF<T> lstm_elt_reference(VVVVF<T>& tempGEMM, VVVVF<T>& cell, bool hasCell = true, float clip_threshold = 0, bool input_forget = false, size_t dir = 0) { size_t hidden_size = tempGEMM[0][0][0].size() / 4; size_t batch_size = tempGEMM.size(); VVVVF<T> tempOut(batch_size, VVVF<T>(2, VVF<T>(1, VF<T>(hidden_size)))); offset_order off(hidden_size, default_offset_type); for (size_t b = 0; b < batch_size; ++b) { T *it = &tempGEMM[b][0][0][off.it]; T *ot = &tempGEMM[b][0][0][off.ot]; T *ft = &tempGEMM[b][0][0][off.ft]; T *zt = &tempGEMM[b][0][0][off.zt]; for (size_t h = 0; h < hidden_size; ++h) { // Convert all inputs to float for all the elementwise operations. This is done to immitate // how lstm kernel is performing the elementwise operations. float fp32_it = (float)it[h]; float fp32_ot = (float)ot[h]; float fp32_ft = (float)ft[h]; float fp32_zt = (float)zt[h]; float val = sigmoid(clip(fp32_it, clip_threshold)) * std::tanh(clip(fp32_zt, clip_threshold)); if (input_forget) { val *= (1 - fp32_ft); } if (hasCell) { val += (float)cell[b][0][dir][h] * sigmoid(clip(fp32_ft, clip_threshold)); } // Convert back to output data type before storing it into the output buffer. Currently, the output // data type may be float or FLOAT16 (half) tempOut[b][0][0][h] = (T)(std::tanh(val) * sigmoid(fp32_ot)); tempOut[b][1][0][h] = (T)val; } } return tempOut; } template<typename T> void print(const std::string& s, VVVVF<T>& input) { printf("%s -------------\n", s.c_str()); printf("Size = [%d, %d, %d, %d]\n", (int)input.size(), (int)input[0].size(), (int)input[0][0].size(), (int)input[0][0][0].size()); for (size_t b = 0; b < input.size(); ++b) { for (size_t f = 0; f < input[0].size(); ++f) { for (size_t y = 0; y < input[0][0].size(); ++y) { for (size_t x = 0; x < input[0][0][0].size(); ++x) { printf("%f ", input[b][f][y][x]); } printf("\n"); } } } printf("---------------------------------------\n"); } // input = [ batch, sequence, direction, input_size ] // weights = [ 1, direction, 4 * hidden_size, input_size ] // recurrent = [ 1, direction, 4 * hidden_size, hidden_size ] // biases = [ 1, 1, direction, 4 * hidden_size ] optional // cell = [ batch, direction, 1, hidden_size ] optional // hidden = [ batch, direction, 1, hidden_size ] optional // tempGEMM = [ batch, 1, 1, 4 * hidden_size ] temporary output // output = [ batch, sequence, direction, hidden_size ] output template <typename T> void lstm_reference(VVVVF<T>& input, VVVVF<T>& hidden, VVVVF<T>& cell, VVVVF<T>& weights, VVVVF<T>& recurrent, VVVVF<T>& bias, VVVVF<T>& output, VVVVF<T>& last_hidden, VVVVF<T>& last_cell, bool hasBias = true, bool hasInitialHidden = true, bool hasInitialCell = true, float clip_threshold = 0, bool input_forget = false, bool scramble_input = true) { size_t sequence_len = input[0].size(); size_t dir_len = weights[0].size(); size_t batch = input.size(); size_t input_directions = input[0][0].size(); for (size_t dir = 0; dir < dir_len; ++dir) { bool tempHasInitialHidden = hasInitialHidden; bool tempHasInitialCell = hasInitialCell; for (size_t seq = 0; seq < sequence_len; ++seq) { size_t seq_id = seq; size_t input_direction = dir; if (scramble_input) { if (dir > 0) { seq_id = input_directions == 1 ? sequence_len - seq - 1 : seq; input_direction = input_directions - 1; } } VVVVF<T> tempGEMM = lstm_gemm_reference(input, weights, recurrent, bias, hidden, seq_id, hasBias, tempHasInitialHidden, dir, input_direction); VVVVF<T> tempOutput = lstm_elt_reference(tempGEMM, cell, tempHasInitialCell, clip_threshold, input_forget, dir); // tempOutput[batch][0] = hidden and tempOutput[batch][1] = cell for (size_t i = 0; i < batch; i++) { output[i][seq][dir] = tempOutput[i][0][0]; hidden[i][0][dir] = tempOutput[i][0][0]; cell[i][0][dir] = tempOutput[i][1][0]; } tempHasInitialHidden = true; tempHasInitialCell = true; } } last_hidden = hidden; last_cell = cell; } template<typename T> void generic_lstm_gemm_gpu_test(int sequence_len, int direction, int batch_size, int input_size, int hidden_size, bool hasBias = true, bool hasHidden = true) { int min_random = -2, max_random = 2; VVVVF<T> ref_input = generate_random_4d<T>(batch_size, sequence_len, 1, input_size, min_random, max_random); VVVVF<T> ref_weights = generate_random_4d<T>(1, direction, 4 * hidden_size, input_size, min_random, max_random); VVVVF<T> ref_recurrent = generate_random_4d<T>(1, direction, 4 * hidden_size, hidden_size, min_random, max_random); VVVVF<T> ref_bias = generate_random_4d<T>(1, 1, direction, 4 * hidden_size, min_random, max_random); VVVVF<T> ref_hidden = generate_random_4d<T>(batch_size, direction, 1, hidden_size, min_random, max_random); VF<T> ref_input_vec = flatten_4d<T>(cldnn::format::bfyx, ref_input); VF<T> ref_weights_vec = flatten_4d<T>(cldnn::format::bfyx, ref_weights); VF<T> ref_recurrent_vec = flatten_4d<T>(cldnn::format::bfyx, ref_recurrent); VF<T> ref_bias_vec = flatten_4d<T>(cldnn::format::bfyx, ref_bias); VF<T> ref_hidden_vec = flatten_4d<T>(cldnn::format::bfyx, ref_hidden); VVVVF<T> ref_output = lstm_gemm_reference(ref_input, ref_weights, ref_recurrent, ref_bias, ref_hidden, 0, hasBias, hasHidden); constexpr auto dt = std::is_same<T, float>::value ? data_types::f32 : data_types::f16; auto& engine = get_test_engine(); // If the input is of fp16 type then, the memory::ptr will be allocated as such if (!engine.get_device_info().supports_fp16) { if (dt == data_types::f16) { return; } } memory::ptr input = engine.allocate_memory({ dt, format::bfyx, { batch_size, sequence_len, input_size, 1 } }); memory::ptr weights = engine.allocate_memory({ dt, format::bfyx, { 1, direction, input_size, 4 * hidden_size } }); memory::ptr recurrent = engine.allocate_memory({ dt, format::bfyx, { 1, direction, hidden_size, 4 * hidden_size } }); memory::ptr biases = engine.allocate_memory({ dt, format::bfyx, { 1, 1, 4 * hidden_size, direction } }); memory::ptr hidden = engine.allocate_memory({ dt, format::bfyx, { batch_size, direction, hidden_size, 1 } }); set_values(input, ref_input_vec); set_values(weights, ref_weights_vec); set_values(recurrent, ref_recurrent_vec); set_values(biases, ref_bias_vec); set_values(hidden, ref_hidden_vec); topology topology; topology.add(input_layout("input", input->get_layout())); topology.add(data("weights", weights)); topology.add(data("recurrent", recurrent)); if (hasBias) { topology.add(data("biases", biases)); } if (hasHidden) { topology.add(input_layout("hidden", hidden->get_layout())); } topology.add(lstm_gemm("lstm_gemm", "input", "weights", "recurrent", hasBias ? "biases" : "", hasHidden ? "hidden" : "")); network network(engine, topology); network.set_input_data("input", input); if (hasHidden) { network.set_input_data("hidden", hidden); } auto outputs = network.execute(); EXPECT_EQ(outputs.size(), size_t(1)); auto output = outputs.begin()->second.get_memory(); cldnn::mem_lock<T> output_ptr(output, get_test_stream()); int i = 0; for (int b = 0; b < batch_size; ++b) { for (int x = 0; x < 4 * hidden_size; ++x) EXPECT_FLOAT_EQ(ref_output[b][0][0][x], output_ptr[i++]); } } template<typename T> void generic_lstm_elt_gpu_test(int /* sequence_len */, int direction, int batch_size, int /* input_size */, int hidden_size, bool hasCell = true, T clip_threshold = (T)0.f, bool input_forget = false) { // tempGEMM = [ 1, direction, batch, 4 * hidden_size ] input // cell = [ 1, direction, batch, hidden_size ] optional // output = [ 2, direction, batch, hidden_size ] output concat[hidden, cell] int min_random = -2, max_random = 2; VVVVF<T> ref_tempGEMM = generate_random_4d<T>(batch_size, direction, 1, 4 * hidden_size, min_random, max_random); VVVVF<T> ref_cell = generate_random_4d<T>(batch_size, direction, 1, hidden_size, min_random, max_random); VF<T> ref_tempGEMM_vec = flatten_4d<T>(cldnn::format::bfyx, ref_tempGEMM); VF<T> ref_cell_vec = flatten_4d<T>(cldnn::format::bfyx, ref_cell); VVVVF<T> ref_output = lstm_elt_reference(ref_tempGEMM, ref_cell, hasCell, clip_threshold, input_forget); // We observe some mismatch in down-converting from fp32 to fp16 // between the reference implementation and opencl kernel. This can be // a simple rounding error. Thus, for fp16 we are increasing our tolerance // to error from 1E-4 to 1E-2 constexpr float ferror = std::is_same<T, float>::value ? (float)1E-4 : (float)1E-2; constexpr auto dt = std::is_same<T, float>::value ? data_types::f32 : data_types::f16; auto& engine = get_test_engine(); // If the input is of fp16 type then, the memory::ptr will be allocated as such if (!engine.get_device_info().supports_fp16) { if (dt == data_types::f16) { return; } } memory::ptr tempGEMM = engine.allocate_memory({ dt, format::bfyx,{ batch_size, direction, 4 * hidden_size, 1 } }); memory::ptr cell = engine.allocate_memory({ dt, format::bfyx,{ batch_size, direction, hidden_size, 1 } }); set_values(tempGEMM, ref_tempGEMM_vec); set_values(cell, ref_cell_vec); topology topology; topology.add(input_layout("tempGEMM", tempGEMM->get_layout())); if (hasCell) { topology.add(input_layout("cell", cell->get_layout())); } topology.add(lstm_elt("lstm_elt", "tempGEMM", hasCell ? "cell" : "", clip_threshold, input_forget)); network network(engine, topology); network.set_input_data("tempGEMM", tempGEMM); if (hasCell) { network.set_input_data("cell", cell); } auto outputs = network.execute(); EXPECT_EQ(outputs.size(), size_t(1)); auto output = outputs.begin()->second.get_memory(); cldnn::mem_lock<T> output_ptr(output, get_test_stream()); for (int b = 0; b < batch_size; ++b) { for (int j = 0; j < 2; ++j) { for (int x = 0; x < hidden_size; ++x) { auto idx = b * 2 * hidden_size + j * hidden_size + x; ASSERT_NEAR(ref_output[b][j][0][x], output_ptr[idx] , ferror); } } } } std::string get_string_id(size_t i) { std::stringstream ss; ss << std::setw(5) << std::setfill('0') << i; return ss.str(); } // --------------- Manually constructed LSTM ---------------------------------------- // This function manually generates an lstm node sequence by conbining lstm_gemm and lstm_elt nodes // it requires that the output of the lstm_elt node is croped to obtain the corresponding hidden and cell outputs void generate_lstm_topology(topology& t, memory::ptr input, memory::ptr hidden, memory::ptr cell, memory::ptr weights, memory::ptr recurrent, memory::ptr biases, int sequence_len, bool hasBias = true, bool hasInitialHidden = true, bool hasInitialCell = true) { auto hidden_size = hidden->get_layout().size; t.add(input_layout("input", input->get_layout())); std::vector<std::pair<primitive_id, tensor>> input_ids_offsets; std::vector<primitive_id> output_ids_offsets; for (int i = 0; i < sequence_len; ++i) input_ids_offsets.push_back({ get_string_id(i),{ 0, i, 0, 0 } }); t.add(split("inputSplit", "input", input_ids_offsets)); t.add(data("weights", weights)); t.add(data("recurrent", recurrent)); std::string biasStr = ""; std::string hiddenStr = ""; std::string cellStr = ""; if (hasBias) { t.add(data("biases", biases)); biasStr = "biases"; } if (hasInitialHidden) { t.add(input_layout("hidden", hidden->get_layout())); hiddenStr = "hidden"; } if (hasInitialCell) { t.add(input_layout("cell", cell->get_layout())); cellStr = "cell"; } for (int i = 0; i < sequence_len; ++i) { std::string lstm_gemm_id = "lstm_gemm" + get_string_id(i); std::string lstm_elt_id = "lstm_elt" + get_string_id(i); std::string crop_id = "crop" + get_string_id(i); t.add(lstm_gemm(lstm_gemm_id, "inputSplit:" + get_string_id(i), "weights", "recurrent", biasStr, hiddenStr)); t.add(lstm_elt(lstm_elt_id, lstm_gemm_id, cellStr)); hiddenStr = crop_id + ":hidden"; t.add(crop(hiddenStr, lstm_elt_id, hidden_size, tensor{ 0,0,0,0 })); if (i < sequence_len - 1) { cellStr = crop_id + ":cell"; t.add(crop(cellStr, lstm_elt_id, hidden_size, tensor{ 0,1,0,0 })); } output_ids_offsets.push_back(hiddenStr); } t.add(concatenation("concatenation", output_ids_offsets, concatenation::along_f)); } template<typename T> void generic_lstm_custom_gpu_test(int sequence_len, int direction, int batch_size, int input_size, int hidden_size, bool hasBias = true, bool hasInitialHidden = true, bool hasInitialCell = true) { std::cout << "Input Size = " << input_size << " Hidden Size = " << hidden_size << " Sequence Len = " << sequence_len << " Batch Size = " << batch_size << std::endl; int min_random = -2, max_random = 2; VVVVF<T> ref_input = generate_random_4d<T>(batch_size, sequence_len, 1, input_size, min_random, max_random); VVVVF<T> ref_weights = generate_random_4d<T>(1, direction, 4 * hidden_size, input_size, min_random, max_random); VVVVF<T> ref_recurrent = generate_random_4d<T>(1, direction, 4 * hidden_size, hidden_size, min_random, max_random); VVVVF<T> ref_bias = generate_random_4d<T>(1, 1, direction, 4 * hidden_size, min_random, max_random); VVVVF<T> ref_hidden = generate_random_4d<T>(batch_size, direction, 1, hidden_size, min_random, max_random); VVVVF<T> ref_cell = generate_random_4d<T>(batch_size, direction, 1, hidden_size, min_random, max_random); VVVVF<T> ref_output(batch_size, VVVF<T>(sequence_len, VVF<T>(direction, VF<T>(hidden_size)))); VVVVF<T> last_hidden(batch_size, VVVF<T>(direction, VVF<T>(1, VF<T>(hidden_size)))); VVVVF<T> last_cell(batch_size, VVVF<T>(direction, VVF<T>(1, VF<T>(hidden_size)))); VF<T> ref_input_vec = flatten_4d<T>(cldnn::format::bfyx, ref_input); VF<T> ref_weights_vec = flatten_4d<T>(cldnn::format::bfyx, ref_weights); VF<T> ref_recurrent_vec = flatten_4d<T>(cldnn::format::bfyx, ref_recurrent); VF<T> ref_bias_vec = flatten_4d<T>(cldnn::format::bfyx, ref_bias); VF<T> ref_hidden_vec = flatten_4d<T>(cldnn::format::bfyx, ref_hidden); VF<T> ref_cell_vec = flatten_4d<T>(cldnn::format::bfyx, ref_cell); lstm_reference(ref_input, ref_hidden, ref_cell, ref_weights, ref_recurrent, ref_bias, ref_output, last_hidden, last_cell, hasBias, hasInitialHidden, hasInitialCell); auto& engine = get_test_engine(); memory::ptr input = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx,{ batch_size, sequence_len, input_size, 1 } }); memory::ptr weights = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx,{ 1, direction, input_size, 4 * hidden_size } }); memory::ptr recurrent = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx,{ 1, direction, hidden_size, 4 * hidden_size } }); memory::ptr biases = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx,{ 1, 1, 4 * hidden_size, direction } }); memory::ptr hidden = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx,{ batch_size, direction, hidden_size, 1 } }); memory::ptr cell = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx,{ batch_size, direction, hidden_size, 1 } }); set_values(input, ref_input_vec); set_values(weights, ref_weights_vec); set_values(recurrent, ref_recurrent_vec); set_values(biases, ref_bias_vec); set_values(hidden, ref_hidden_vec); set_values(cell, ref_cell_vec); topology topology; generate_lstm_topology(topology, input, hidden, cell, weights, recurrent, biases, sequence_len, hasBias, hasInitialHidden, hasInitialCell); network network(engine, topology); network.set_input_data("input", input); if (hasInitialHidden) network.set_input_data("hidden", hidden); if (hasInitialCell) network.set_input_data("cell", cell); auto outputs = network.execute(); ASSERT_EQ(outputs.size(), size_t(1)); size_t output_size = outputs.begin()->second.get_memory()->size() / sizeof(T); ASSERT_EQ(output_size, size_t(hidden_size * sequence_len * batch_size * direction)); auto output = outputs.begin()->second.get_memory(); cldnn::mem_lock<T> output_ptr(output, get_test_stream()); int i = 0; for (int b = 0; b < batch_size; ++b) { for (int s = 0; s < sequence_len; ++s) { for (int x = 0; x < hidden_size; ++x) { for (int d = 0; d < direction; ++d) { ASSERT_NEAR(ref_output[b][s][d][x], output_ptr[i++], FERROR); } } } } } // ------------------------------------------------------- template<typename T> void generic_lstm_gpu_test(int layers, int sequence_len, int direction, int batch_size, int input_size, int hidden_size, bool hasBias = true, bool hasInitialHidden = true, bool hasInitialCell = true, T clip_threshold = 0, bool input_forget = false) { std::cout << "Layers = " << layers << " Input Size = " << input_size << " Hidden Size = " << hidden_size << " Sequence Len = " << sequence_len << " Direction = " << direction << " Batch Size = " << batch_size << std::endl; int min_random = -2, max_random = 2; VVVVF<T> ref_input = generate_random_4d<T>(batch_size, sequence_len, 1, input_size, min_random, max_random); std::vector<VVVVF<T>> ref_weights; std::vector<VVVVF<T>> ref_recurrent; std::vector<VVVVF<T>> ref_bias; std::vector<VVVVF<T>> ref_hidden; std::vector<VVVVF<T>> ref_cell; std::vector<VVVVF<T>> ref_output; for (int i = 0; i < layers; ++i) { ref_weights.push_back(generate_random_4d<T>(1, direction, 4 * hidden_size, i==0 ? input_size : hidden_size, min_random, max_random)); ref_recurrent.push_back(generate_random_4d<T>(1, direction, 4 * hidden_size, hidden_size, min_random, max_random)); ref_bias.push_back(generate_random_4d<T>(1, 1, direction, 4 * hidden_size, min_random, max_random)); ref_hidden.push_back(generate_random_4d<T>(batch_size, 1, direction, hidden_size, min_random, max_random)); ref_cell.push_back(generate_random_4d<T>(batch_size, 1, direction, hidden_size, min_random, max_random)); ref_output.push_back(VVVVF<T>(batch_size, VVVF<T>(sequence_len, VVF<T>(direction, VF<T>(hidden_size))))); } VF<T> ref_input_vec = flatten_4d<T>(cldnn::format::bfyx, ref_input); std::vector<VF<T>> ref_weights_vec; std::vector<VF<T>> ref_recurrent_vec; std::vector<VF<T>> ref_bias_vec; std::vector<VF<T>> ref_hidden_vec; std::vector<VF<T>> ref_cell_vec; for (int i = 0; i < layers; ++i) { ref_weights_vec.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_weights[i])); ref_recurrent_vec.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_recurrent[i])); ref_bias_vec.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_bias[i])); ref_hidden_vec.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_hidden[i])); ref_cell_vec.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_cell[i])); } VVVVF<T> last_hidden(batch_size, VVVF<T>(1, VVF<T>(direction, VF<T>(hidden_size)))); VVVVF<T> last_cell(batch_size, VVVF<T>(1, VVF<T>(direction, VF<T>(hidden_size)))); lstm_reference(ref_input, ref_hidden[0], ref_cell[0], ref_weights[0], ref_recurrent[0], ref_bias[0], ref_output[0], last_hidden, last_cell, hasBias, hasInitialHidden, hasInitialCell, clip_threshold, input_forget, true); for (int i = 1; i < layers; ++i) { lstm_reference(ref_output[i - 1], ref_hidden[i], ref_cell[i], ref_weights[i], ref_recurrent[i], ref_bias[i], ref_output[i], last_hidden, last_cell, hasBias, hasInitialHidden, hasInitialCell, clip_threshold, input_forget, false); } // We observe some mismatch in down-converting from fp32 to fp16 // between the reference implementation and opencl kernel. This can be // a simple rounding error. Thus, for fp16 we are increasing our tolerance // to error from 1E-4 to 1E-2 constexpr float ferror = std::is_same<T, float>::value ? (float)1E-4 : (float)1E-2; constexpr auto dt = std::is_same<T, float>::value ? data_types::f32 : data_types::f16; auto& engine = get_test_engine(); // If the input is of fp16 type then, the memory::ptr will be allocated as such if (!engine.get_device_info().supports_fp16) { if (dt == data_types::f16) { return; } } memory::ptr input = engine.allocate_memory({ dt, format::bfyx, {batch_size, sequence_len, input_size, 1} }); set_values(input, ref_input_vec); std::vector<memory::ptr> weights; std::vector<memory::ptr> recurrent; std::vector<memory::ptr> biases; std::vector<memory::ptr> hidden; std::vector<memory::ptr> cell; for(int i = 0; i < layers; ++i) { weights.push_back(engine.allocate_memory({ dt, format::bfyx, { 1, direction, i==0 ? input_size : hidden_size, 4 * hidden_size } })); set_values(weights[i], ref_weights_vec[i]); recurrent.push_back(engine.allocate_memory({ dt, format::bfyx, { 1, direction, hidden_size, 4 * hidden_size } })); set_values(recurrent[i], ref_recurrent_vec[i]); if (hasBias) { biases.push_back(engine.allocate_memory({ dt, format::bfyx, { 1, 1, 4 * hidden_size, direction } })); set_values(biases[i], ref_bias_vec[i]); } if (hasInitialHidden) { hidden.push_back(engine.allocate_memory({ dt, format::bfyx, { batch_size, 1, hidden_size, direction } })); set_values(hidden[i], ref_hidden_vec[i]); } if (hasInitialCell) { cell.push_back(engine.allocate_memory({ dt, format::bfyx, { batch_size, 1, hidden_size, direction} })); set_values(cell[i], ref_cell_vec[i]); } } topology topology; std::vector<std::pair<primitive_id, tensor>> input_ids_offsets; std::vector<primitive_id> lstm_inputs; std::vector<primitive_id> output_ids_offsets; topology.add(input_layout("input", input->get_layout())); for (int i = 0; i < sequence_len; ++i) { input_ids_offsets.push_back({get_string_id(i), {0, i, 0, 0}}); lstm_inputs.push_back("inputSplit:"+get_string_id(i)); } topology.add(split("inputSplit", "input", input_ids_offsets)); cldnn::primitive_id prev_lstm_id; for(int i = 0; i < layers; ++i) { std::string sid = get_string_id(i); std::string lstm_id = "lstm" + sid; std::string weights_id = "weights" + sid; std::string recurrent_id = "recurrent" + sid; std::string biases_id = "biases" + sid; std::string hidden_id = "hidden" + sid; std::string cell_id = "cell" + sid; topology.add(data(weights_id, weights[i])); topology.add(data(recurrent_id, recurrent[i])); if (hasBias) topology.add(data(biases_id, biases[i])); if (hasInitialHidden) topology.add(input_layout(hidden_id, hidden[i]->get_layout())); if (hasInitialCell) topology.add(input_layout(cell_id, cell[i]->get_layout())); if (i == 0) { topology.add(lstm(lstm_id, lstm_inputs, weights_id, recurrent_id, hasBias ? biases_id : "", hasInitialHidden ? hidden_id : "", hasInitialCell ? cell_id : "", "", clip_threshold, input_forget, { activation_func::logistic, activation_func::hyperbolic_tan, activation_func::hyperbolic_tan }, {}, lstm_output_selection::sequence, default_offset_type)); } else { topology.add(lstm(lstm_id, { prev_lstm_id }, weights_id, recurrent_id, hasBias ? biases_id : "", hasInitialHidden ? hidden_id : "", hasInitialCell ? cell_id : "", "", clip_threshold, input_forget, { activation_func::logistic, activation_func::hyperbolic_tan, activation_func::hyperbolic_tan }, {}, lstm_output_selection::sequence, default_offset_type)); } prev_lstm_id = lstm_id; } network network(engine, topology); network.set_input_data("input", input); for (int i = 0; i < layers; ++i) { std::string sid = get_string_id(i); if (hasInitialHidden) network.set_input_data("hidden" + sid, hidden[i]); if (hasInitialCell) network.set_input_data("cell" + sid, cell[i]); } auto outputs = network.execute(); { ASSERT_EQ(outputs.size(), size_t(1)); size_t output_size = outputs.begin()->second.get_memory()->size() / sizeof(T); ASSERT_EQ(output_size, size_t(hidden_size * sequence_len * batch_size * direction)); auto output = outputs.begin()->second.get_memory(); // Get the output tensor cldnn::layout output_layout = output->get_layout(); cldnn::tensor output_tensor = output_layout.size; // Compare the output tensor configuration against the reference value // Output tensor is configured in bfyx format ASSERT_EQ(batch_size, output_tensor.batch[0]); ASSERT_EQ(sequence_len, output_tensor.feature[0]); ASSERT_EQ(direction, output_tensor.spatial[1]); ASSERT_EQ(hidden_size, output_tensor.spatial[0]); cldnn::mem_lock<T> output_ptr(output, get_test_stream()); int32_t i = 0; for (int32_t b = 0; b < batch_size; ++b) { for (int32_t s = 0; s < sequence_len; ++s) { for (int32_t d = 0; d < direction; ++d) { for (int32_t x = 0; x < hidden_size; ++x) { ASSERT_NEAR(ref_output[layers - 1][b][s][d][x], output_ptr[i++], ferror); } } } } } } // ------------------------------------------------------- template<typename T> void lstm_gpu_output_test(const lstm_output_selection& output_selection, int directions) { int layers = 1; int sequence_len = 4; int batch_size = 3; int input_size = 3; int hidden_size = 4; std::cout << "Layers = " << layers << " Input Size = " << input_size << " Hidden Size = " << hidden_size << " Sequence Len = " << sequence_len << " Directions = " << directions << " Batch Size = " << batch_size << " Output selection: " << static_cast<int>(output_selection) << std::endl; int min_random = -2, max_random = 2; VVVVF<T> ref_input = generate_random_4d<T>(batch_size, sequence_len, 1, input_size, min_random, max_random); VVVVF<T> ref_weights = generate_random_4d<T>(1, directions, 4 * hidden_size, input_size, min_random, max_random); VVVVF<T> ref_recurrent = generate_random_4d<T>(1, directions, 4 * hidden_size, hidden_size, min_random, max_random); VVVVF<T> ref_bias = generate_random_4d<T>(1, 1, directions, 4 * hidden_size, min_random, max_random); VVVVF<T> ref_hidden = generate_random_4d<T>(batch_size, 1, directions, hidden_size, min_random, max_random); VVVVF<T> ref_cell = generate_random_4d<T>(batch_size, 1, directions, hidden_size, min_random, max_random); VVVVF<T> ref_output = VVVVF<T>(batch_size, VVVF<T>(sequence_len, VVF<T>(directions, VF<T>(hidden_size)))); VF<T> ref_input_vec = flatten_4d<T>(cldnn::format::bfyx, ref_input); VF<T> ref_weights_vec = flatten_4d<T>(cldnn::format::bfyx, ref_weights); VF<T> ref_recurrent_vec = flatten_4d<T>(cldnn::format::bfyx, ref_recurrent); VF<T> ref_bias_vec = flatten_4d<T>(cldnn::format::bfyx, ref_bias); VF<T> ref_hidden_vec = flatten_4d<T>(cldnn::format::bfyx, ref_hidden); VF<T> ref_cell_vec = flatten_4d<T>(cldnn::format::bfyx, ref_cell); VVVVF<T> last_hidden(batch_size, VVVF<T>(1, VVF<T>(directions, VF<T>(hidden_size)))); VVVVF<T> last_cell(batch_size, VVVF<T>(1, VVF<T>(directions, VF<T>(hidden_size)))); lstm_reference(ref_input, ref_hidden, ref_cell, ref_weights, ref_recurrent, ref_bias, ref_output, last_hidden, last_cell, true, true, true, (T)0, false, true); auto& engine = get_test_engine(); memory::ptr input = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, {batch_size, sequence_len, input_size, 1} }); memory::ptr weights = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, directions, input_size , 4 * hidden_size } }); memory::ptr recurrent = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, directions, hidden_size, 4 * hidden_size } }); memory::ptr biases = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, 1, 4 * hidden_size, directions } }); memory::ptr hidden = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { batch_size, 1, hidden_size, directions } }); memory::ptr cell = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { batch_size, 1, hidden_size, directions } }); set_values(input, ref_input_vec); set_values(weights, ref_weights_vec); set_values(recurrent, ref_recurrent_vec); set_values(biases, ref_bias_vec); set_values(hidden, ref_hidden_vec); set_values(cell, ref_cell_vec); bool emit_last_cell = output_selection == lstm_output_selection::hidden_cell || output_selection == lstm_output_selection::sequence_cell; bool emit_last_hidden = output_selection == lstm_output_selection::hidden || output_selection == lstm_output_selection::hidden_cell; topology topology; std::vector<std::pair<primitive_id, tensor>> input_ids_offsets; std::vector<primitive_id> lstm_inputs; std::vector<primitive_id> output_ids_offsets; topology.add(input_layout("input", input->get_layout())); for (int i = 0; i < sequence_len; ++i) { input_ids_offsets.push_back({get_string_id(i), {0, i, 0, 0}}); lstm_inputs.push_back("inputSplit:"+get_string_id(i)); } topology.add(split("inputSplit", "input", input_ids_offsets)); topology.add(data("weights", weights)); topology.add(data("recurrent", recurrent)); topology.add(data("biases", biases)); topology.add(input_layout("hidden", hidden->get_layout())); topology.add(input_layout("cell", cell->get_layout())); topology.add(lstm("lstm", lstm_inputs, "weights", "recurrent", "biases", "hidden", "cell", "", 0, false, { activation_func::logistic, activation_func::hyperbolic_tan, activation_func::hyperbolic_tan }, {}, output_selection, default_offset_type)); if (emit_last_cell) { int32_t concatenation_len = emit_last_hidden ? 2 : sequence_len + 1; tensor hidden_tensor {batch_size, concatenation_len - 1, hidden_size, directions}; tensor cell_tensor {batch_size, 1, hidden_size, directions}; topology.add(crop(emit_last_hidden ? "crop:last_hidden" : "crop:sequence", "lstm", hidden_tensor, tensor{0, 0, 0, 0})); topology.add(crop("crop:last_cell", "lstm", cell_tensor, tensor{0, concatenation_len - 1, 0, 0})); } network network(engine, topology); network.set_input_data("input", input); network.set_input_data("hidden", hidden); network.set_input_data("cell", cell); auto outputs = network.execute(); uint32_t ref_num_output_primitives = 1; // Output will return atleast 1 primitive if (emit_last_cell) { // add another primitve to account for cell state if the output selection includes cell state ref_num_output_primitives += 1; } // check if the number of returned primitives match the expected number of output primitives ASSERT_EQ(ref_num_output_primitives, outputs.size()); for (auto itr = outputs.begin(); itr != outputs.end(); itr++) { auto output_tensor = itr->second.get_memory()->get_layout().size; primitive_id primitive_name = itr->first; cldnn::memory::ptr output_memory = itr->second.get_memory(); int32_t output_size = (int32_t)(itr->second.get_memory()->size() / sizeof(T)); cldnn::tensor ref_output_tensor; VVVVF<T> ref_primitive_output; int32_t ref_batch_size = batch_size; int32_t ref_hidden_size = hidden_size; int32_t ref_directions = directions; int32_t ref_seq_len = 1; // Set the reference output against which the primitive's output will be compared if (primitive_name.find("crop:last_cell") != std::string::npos) { ref_primitive_output = last_cell; } else if (emit_last_hidden || primitive_name.find("crop:last_hidden") != std::string::npos) { ref_primitive_output = last_hidden; } else { ref_seq_len = sequence_len; ref_primitive_output = ref_output; } ref_output_tensor = { ref_batch_size, ref_seq_len, ref_hidden_size, ref_directions }; int32_t ref_output_size = ref_batch_size * ref_seq_len * ref_hidden_size * ref_directions; // The number of elements in reference should match the number of elements in the primitive's output ASSERT_EQ(ref_output_size , output_size); // Compare the output tensor configuration against the reference value // Output tensor is configured in bfyx format ASSERT_EQ(ref_batch_size, output_tensor.batch[0]); ASSERT_EQ(ref_seq_len, output_tensor.feature[0]); // Sequence length should match ASSERT_EQ(ref_directions, output_tensor.spatial[1]); // directions should match ASSERT_EQ(ref_hidden_size, output_tensor.spatial[0]); // input size should match cldnn::mem_lock<T> output_ptr(output_memory, get_test_stream()); int32_t i = 0; for (int32_t b = 0; b < ref_batch_size; ++b) { for (int32_t s = 0; s < ref_seq_len; ++s) { for (int32_t d = 0; d < ref_directions; ++d) { for (int32_t x = 0; x < ref_hidden_size; ++x) { ASSERT_NEAR(ref_primitive_output[b][s][d][x], output_ptr[i++], FERROR); } } } } } } // ------------------------------------------------------- template<typename T> void lstm_gpu_format_test(const cldnn::format& format, int directions) { int layers = 1; int sequence_len = 6; int batch_size = 3; int input_size = 4; int hidden_size = 5; lstm_output_selection output_selection = lstm_output_selection::sequence; std::cout << "Layers = " << layers << " Input Size = " << input_size << " Hidden Size = " << hidden_size << " Sequence Len = " << sequence_len << " Directions = " << directions << " Batch Size = " << batch_size << " Output selection: " << static_cast<int>(output_selection) << std::endl; int min_random = -2, max_random = 2; VVVVF<T> ref_input = generate_random_4d<T>(batch_size, sequence_len, 1, input_size, min_random, max_random); VVVVF<T> ref_weights = generate_random_4d<T>(1, directions, 4 * hidden_size, input_size, min_random, max_random); VVVVF<T> ref_recurrent = generate_random_4d<T>(1, directions, 4 * hidden_size, hidden_size, min_random, max_random); VVVVF<T> ref_bias = generate_random_4d<T>(1, 1, directions, 4 * hidden_size, min_random, max_random); VVVVF<T> ref_hidden = generate_random_4d<T>(batch_size, 1, directions, hidden_size, min_random, max_random); VVVVF<T> ref_cell = generate_random_4d<T>(batch_size, 1, directions, hidden_size, min_random, max_random); VVVVF<T> ref_output = VVVVF<T>(batch_size, VVVF<T>(sequence_len, VVF<T>(directions, VF<T>(hidden_size)))); VF<T> ref_input_vec = flatten_4d<T>(format, ref_input); VF<T> ref_weights_vec = flatten_4d<T>(cldnn::format::bfyx, ref_weights); VF<T> ref_recurrent_vec = flatten_4d<T>(cldnn::format::bfyx, ref_recurrent); VF<T> ref_bias_vec = flatten_4d<T>(cldnn::format::bfyx, ref_bias); VF<T> ref_hidden_vec = flatten_4d<T>(format, ref_hidden); VF<T> ref_cell_vec = flatten_4d<T>(format, ref_cell); VVVVF<T> last_hidden(batch_size, VVVF<T>(1, VVF<T>(directions, VF<T>(hidden_size)))); VVVVF<T> last_cell(batch_size, VVVF<T>(1, VVF<T>(directions, VF<T>(hidden_size)))); lstm_reference(ref_input, ref_hidden, ref_cell, ref_weights, ref_recurrent, ref_bias, ref_output, last_hidden, last_cell, true, true, true, (T)0, false, true); auto& engine = get_test_engine(); memory::ptr input = engine.allocate_memory({ type_to_data_type<T>::value,format, {batch_size, sequence_len, input_size, 1} }); memory::ptr weights = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, directions, input_size , 4 * hidden_size } }); memory::ptr recurrent = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, directions, hidden_size, 4 * hidden_size } }); memory::ptr biases = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, 1, 4 * hidden_size, directions } }); memory::ptr hidden = engine.allocate_memory({ type_to_data_type<T>::value, format, { batch_size, 1, hidden_size, directions } }); memory::ptr cell = engine.allocate_memory({ type_to_data_type<T>::value, format, { batch_size, 1, hidden_size, directions } }); set_values(input, ref_input_vec); set_values(weights, ref_weights_vec); set_values(recurrent, ref_recurrent_vec); set_values(biases, ref_bias_vec); set_values(hidden, ref_hidden_vec); set_values(cell, ref_cell_vec); bool emit_last_cell = output_selection == lstm_output_selection::hidden_cell || output_selection == lstm_output_selection::sequence_cell; bool emit_last_hidden = output_selection == lstm_output_selection::hidden || output_selection == lstm_output_selection::hidden_cell; topology topology; std::vector<std::pair<primitive_id, tensor>> input_ids_offsets; std::vector<primitive_id> lstm_inputs; std::vector<primitive_id> output_ids_offsets; topology.add(input_layout("input", input->get_layout())); for (int i = 0; i < sequence_len; ++i) { input_ids_offsets.push_back({get_string_id(i), {0, i, 0, 0}}); lstm_inputs.push_back("inputSplit:"+get_string_id(i)); } topology.add(split("inputSplit", "input", input_ids_offsets)); topology.add(data("weights", weights)); topology.add(data("recurrent", recurrent)); topology.add(data("biases", biases)); topology.add(input_layout("hidden", hidden->get_layout())); topology.add(input_layout("cell", cell->get_layout())); topology.add(lstm("lstm"+get_string_id(0), lstm_inputs, "weights", "recurrent", "biases", "hidden", "cell", "", 0, false, { activation_func::logistic, activation_func::hyperbolic_tan, activation_func::hyperbolic_tan }, {}, output_selection, default_offset_type)); if (emit_last_cell) { int32_t concatenation_len = emit_last_hidden ? 2 : sequence_len + 1; tensor hidden_tensor {batch_size, concatenation_len - 1, hidden_size, directions}; tensor cell_tensor {batch_size, 1, hidden_size, directions}; topology.add(crop(emit_last_hidden ? "crop:last_hidden" : "crop:sequence", "lstm", hidden_tensor, tensor{0, 0, 0, 0})); topology.add(crop("crop:last_cell", "lstm", cell_tensor, tensor{0, concatenation_len - 1, 0, 0})); } network network(engine, topology); std::map<primitive_id, network_output> outputs; network.set_input_data("input", input); network.set_input_data("hidden", hidden); network.set_input_data("cell", cell); outputs = network.execute(); uint32_t ref_num_output_primitives = 1; // Output will return atleast 1 primitive if (emit_last_cell) { // add another primitve to account for cell state if the output selection includes cell state ref_num_output_primitives += 1; } // check if the number of returned primitives match the expected number of output primitives ASSERT_EQ(ref_num_output_primitives, outputs.size()); for (auto itr = outputs.begin(); itr != outputs.end(); itr++) { auto output_tensor = itr->second.get_memory()->get_layout().size; primitive_id primitive_name = itr->first; cldnn::memory::ptr output_memory = itr->second.get_memory(); int32_t output_size = (int32_t)(itr->second.get_memory()->size() / sizeof(T)); cldnn::tensor ref_output_tensor; VVVVF<T> ref_primitive_output; int32_t ref_batch_size = batch_size; int32_t ref_hidden_size = hidden_size; int32_t ref_directions = directions; int32_t ref_seq_len = 1; // Set the reference output against which the primitive's output will be compared if (primitive_name.find("crop:last_cell") != std::string::npos) { ref_primitive_output = last_cell; } else if (emit_last_hidden || primitive_name.find("crop:last_hidden") != std::string::npos) { ref_primitive_output = last_hidden; } else { ref_seq_len = sequence_len; ref_primitive_output = ref_output; } ref_output_tensor = { ref_batch_size, ref_seq_len, ref_hidden_size, ref_directions }; int32_t ref_output_size = ref_batch_size * ref_seq_len * ref_hidden_size * ref_directions; // The number of elements in reference should match the number of elements in the primitive's output ASSERT_EQ(ref_output_size , output_size); // Compare the output tensor configuration against the reference value // Output tensor is configured in bfyx format ASSERT_EQ(ref_batch_size, output_tensor.batch[0]); ASSERT_EQ(ref_seq_len, output_tensor.feature[0]); // Sequence length should match ASSERT_EQ(ref_directions, output_tensor.spatial[1]); // directions should match ASSERT_EQ(ref_hidden_size, output_tensor.spatial[0]); // input size should match cldnn::mem_lock<T> output_ptr(output_memory, get_test_stream()); int32_t i = 0; if (format == cldnn::format::bfyx) { for (int32_t b = 0; b < ref_batch_size; ++b) { for (int32_t s = 0; s < ref_seq_len; ++s) { for (int32_t d = 0; d < ref_directions; ++d) { for (int32_t x = 0; x < ref_hidden_size; ++x) { ASSERT_NEAR(ref_primitive_output[b][s][d][x], output_ptr[i++], FERROR); } } } } } else if(format == cldnn::format::fyxb) { for (int32_t s = 0; s < ref_seq_len; ++s) { for (int32_t d = 0; d < ref_directions; ++d) { for (int32_t x = 0; x < ref_hidden_size; ++x) { for (int32_t b = 0; b < ref_batch_size; ++b) { ASSERT_NEAR(ref_primitive_output[b][s][d][x], output_ptr[i++], FERROR); } } } } } } } // ------------------------------------------------------- template<typename T> void lstm_gpu_users_test() { int sequence_len = 2; int batch_size = 1; int input_size = 1; int hidden_size = 1; int directions = 1; int min_random = -2, max_random = 2; // The following test is designed to test the user dependencies of an LSTM node when replaced by subcomponents // by the graph compiler. // The output of an LSTM node is set to last_hidden only. Then we concatenate the last_hidden with the initial_hidden tensor: // (input, weights, recurrent, bias, initial_hidden, inital_cell) -> LSTM -> last_hidden // concatenation(last_hidden, initial_hidden) // If the replacing is is done correctly then the initial_hidden tensor should match the output of the concatenation // by an offset along the sequence. VVVVF<T> ref_input = generate_random_4d<T>(batch_size, sequence_len, 1, input_size, min_random, max_random); VVVVF<T> ref_weights = generate_random_4d<T>(1, directions, 4 * hidden_size, input_size, min_random, max_random); VVVVF<T> ref_recurrent = generate_random_4d<T>(1, directions, 4 * hidden_size, hidden_size, min_random, max_random); VVVVF<T> ref_bias = generate_random_4d<T>(1, 1, directions, 4 * hidden_size, min_random, max_random); VVVVF<T> ref_hidden = generate_random_4d<T>(batch_size, 1, directions, hidden_size, min_random, max_random); VVVVF<T> ref_cell = generate_random_4d<T>(batch_size, 1, directions, hidden_size, min_random, max_random); VVVVF<T> ref_output = VVVVF<T>(batch_size, VVVF<T>(sequence_len, VVF<T>(directions, VF<T>(hidden_size)))); VF<T> ref_input_vec = flatten_4d<T>(format::bfyx, ref_input); VF<T> ref_weights_vec = flatten_4d<T>(format::bfyx, ref_weights); VF<T> ref_recurrent_vec = flatten_4d<T>(format::bfyx, ref_recurrent); VF<T> ref_bias_vec = flatten_4d<T>(format::bfyx, ref_bias); VF<T> ref_hidden_vec = flatten_4d<T>(format::bfyx, ref_hidden); VF<T> ref_cell_vec = flatten_4d<T>(format::bfyx, ref_cell); VVVVF<T> last_hidden(batch_size, VVVF<T>(1, VVF<T>(directions, VF<T>(hidden_size)))); VVVVF<T> last_cell(batch_size, VVVF<T>(1, VVF<T>(directions, VF<T>(hidden_size)))); auto& engine = get_test_engine(); memory::ptr input = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, {batch_size, sequence_len, input_size, 1} }); memory::ptr weights = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, directions, input_size , 4 * hidden_size } }); memory::ptr recurrent = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, directions, hidden_size, 4 * hidden_size } }); memory::ptr biases = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, 1, 4 * hidden_size, directions } }); memory::ptr hidden = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { batch_size, 1, hidden_size, directions } }); memory::ptr cell = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { batch_size, 1, hidden_size, directions } }); set_values(input, ref_input_vec); set_values(weights, ref_weights_vec); set_values(recurrent, ref_recurrent_vec); set_values(biases, ref_bias_vec); set_values(hidden, ref_hidden_vec); set_values(cell, ref_cell_vec); topology topology; std::vector<std::pair<primitive_id, tensor>> input_ids_offsets; std::vector<primitive_id> lstm_inputs; topology.add(input_layout("input", input->get_layout())); for (int i = 0; i < sequence_len; ++i) { input_ids_offsets.push_back({get_string_id(i), {0, i, 0, 0}}); lstm_inputs.push_back("inputSplit:"+get_string_id(i)); } topology.add(split("inputSplit", "input", input_ids_offsets)); topology.add(data("weights", weights)); topology.add(data("recurrent", recurrent)); topology.add(data("biases", biases)); topology.add(input_layout("hidden", hidden->get_layout())); topology.add(input_layout("cell", cell->get_layout())); topology.add(lstm("lstm", lstm_inputs, "weights", "recurrent", "biases", "hidden", "cell", "", 0, false, { activation_func::logistic, activation_func::hyperbolic_tan, activation_func::hyperbolic_tan }, {}, lstm_output_selection::hidden, default_offset_type)); std::vector<primitive_id> output_ids_offsets {"lstm", "hidden"}; topology.add(concatenation("concatenation", output_ids_offsets, concatenation::along_f)); network network(engine, topology); std::map<primitive_id, network_output> outputs; network.set_input_data("input", input); network.set_input_data("hidden", hidden); network.set_input_data("cell", cell); outputs = network.execute(); // check if the number of returned primitives match the expected number of output primitives ASSERT_EQ(size_t(1), outputs.size()); cldnn::memory::ptr output_memory = outputs.begin()->second.get_memory(); cldnn::mem_lock<T> output_ptr(output_memory, get_test_stream()); for (int32_t b = 0; b < batch_size; ++b) { for (int32_t s = 0; s < 1; ++s) { for (int32_t d = 0; d < directions; ++d) { for (int32_t x = 0; x < hidden_size; ++x) { int32_t idx = x + hidden_size * (d + directions * ((s+1) + sequence_len * b)); ASSERT_NEAR(ref_hidden[b][s][d][x], output_ptr[idx], FERROR); } } } } } // ------------------------------------------------------- template<typename T> void lstm_gpu_concatenated_input_test(int layers, int sequence_len, int direction, int batch_size, int input_size, int hidden_size, bool has_bias = true, bool has_initial_hidden = true, bool has_initial_cell = true, float clip_threshold = 0, bool input_forget = false) { std::cout << "Layers = " << layers << " Input Size = " << input_size << " Hidden Size = " << hidden_size << " Sequence Len = " << sequence_len << " Direction = " << direction << " Batch Size = " << batch_size << std::endl; int min_random = -2, max_random = 2; VVVVF<T> ref_input = generate_random_4d<T>(batch_size, sequence_len, 1, input_size, min_random, max_random); std::vector<VVVVF<T>> ref_weights; std::vector<VVVVF<T>> ref_recurrent; std::vector<VVVVF<T>> ref_bias; std::vector<VVVVF<T>> ref_hidden; std::vector<VVVVF<T>> ref_cell; std::vector<VVVVF<T>> ref_output; for (int i = 0; i < layers; ++i) { ref_weights.push_back(generate_random_4d<T>(1, direction, 4 * hidden_size, i == 0 ? input_size : hidden_size, min_random, max_random)); ref_recurrent.push_back(generate_random_4d<T>(1, direction, 4 * hidden_size, hidden_size, min_random, max_random)); ref_bias.push_back(generate_random_4d<T>(1, 1, direction, 4 * hidden_size, min_random, max_random)); ref_hidden.push_back(generate_random_4d<T>(batch_size, 1, direction, hidden_size, min_random, max_random)); ref_cell.push_back(generate_random_4d<T>(batch_size, 1, direction, hidden_size, min_random, max_random)); ref_output.push_back(VVVVF<T>(batch_size, VVVF<T>(sequence_len, VVF<T>(direction, VF<T>(hidden_size))))); } VF<T> ref_input_vec = flatten_4d<T>(cldnn::format::bfyx, ref_input); std::vector<VF<T>> ref_weights_vec; std::vector<VF<T>> ref_recurrent_vec; std::vector<VF<T>> ref_bias_vec; std::vector<VF<T>> ref_hidden_vec; std::vector<VF<T>> ref_cell_vec; for (int i = 0; i < layers; ++i) { ref_weights_vec.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_weights[i])); ref_recurrent_vec.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_recurrent[i])); ref_bias_vec.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_bias[i])); ref_hidden_vec.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_hidden[i])); ref_cell_vec.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_cell[i])); } VVVVF<T> last_hidden(batch_size, VVVF<T>(1, VVF<T>(direction, VF<T>(hidden_size)))); VVVVF<T> last_cell(batch_size, VVVF<T>(1, VVF<T>(direction, VF<T>(hidden_size)))); lstm_reference(ref_input, ref_hidden[0], ref_cell[0], ref_weights[0], ref_recurrent[0], ref_bias[0], ref_output[0], last_hidden, last_cell, has_bias, has_initial_hidden, has_initial_cell, clip_threshold, input_forget, true); for (int i = 1; i < layers; ++i) { lstm_reference(ref_output[i - 1], ref_hidden[i], ref_cell[i], ref_weights[i], ref_recurrent[i], ref_bias[i], ref_output[i], last_hidden, last_cell, has_bias, has_initial_hidden, has_initial_cell, clip_threshold, input_forget, false); } auto& engine = get_test_engine(); memory::ptr input = engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, {batch_size, sequence_len, input_size, 1} }); set_values(input, ref_input_vec); std::vector<memory::ptr> weights; std::vector<memory::ptr> recurrent; std::vector<memory::ptr> biases; std::vector<memory::ptr> hidden; std::vector<memory::ptr> cell; for (int i = 0; i < layers; ++i) { weights.push_back(engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, direction, i == 0 ? input_size : hidden_size, 4 * hidden_size } })); set_values(weights[i], ref_weights_vec[i]); recurrent.push_back(engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, direction, hidden_size, 4 * hidden_size } })); set_values(recurrent[i], ref_recurrent_vec[i]); if (has_bias) { biases.push_back(engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { 1, 1, 4 * hidden_size, direction } })); set_values(biases[i], ref_bias_vec[i]); } if (has_initial_hidden) { hidden.push_back(engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { batch_size, 1, hidden_size, direction } })); set_values(hidden[i], ref_hidden_vec[i]); } if (has_initial_cell) { cell.push_back(engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, { batch_size, 1, hidden_size, direction} })); set_values(cell[i], ref_cell_vec[i]); } } topology topology; std::vector<std::pair<primitive_id, tensor>> input_ids_offsets; std::vector<primitive_id> lstm_inputs; std::vector<primitive_id> output_ids_offsets; topology.add(input_layout("input", input->get_layout())); cldnn::primitive_id prev_node_id; for (int i = 0; i < layers; ++i) { std::string sid = get_string_id(i); std::string lstm_id = "lstm" + sid; std::string weights_id = "weights" + sid; std::string recurrent_id = "recurrent" + sid; std::string biases_id = "biases" + sid; std::string hidden_id = "hidden" + sid; std::string cell_id = "cell" + sid; std::string output_crop_id = "crop:sequence:" + sid; topology.add(data(weights_id, weights[i])); topology.add(data(recurrent_id, recurrent[i])); if (has_bias) topology.add(data(biases_id, biases[i])); if (has_initial_hidden) topology.add(input_layout(hidden_id, hidden[i]->get_layout())); if (has_initial_cell) topology.add(input_layout(cell_id, cell[i]->get_layout())); if (i == 0) { topology.add(lstm(lstm_id, { "input" }, weights_id, recurrent_id, has_bias ? biases_id : "", has_initial_hidden ? hidden_id : "", has_initial_cell ? cell_id : "", "", clip_threshold, input_forget, { activation_func::logistic, activation_func::hyperbolic_tan, activation_func::hyperbolic_tan }, {}, lstm_output_selection::sequence_cell, default_offset_type)); } else { topology.add(lstm(lstm_id, { prev_node_id }, weights_id, recurrent_id, has_bias ? biases_id : "", has_initial_hidden ? hidden_id : "", has_initial_cell ? cell_id : "", "", clip_threshold, input_forget, { activation_func::logistic, activation_func::hyperbolic_tan, activation_func::hyperbolic_tan }, {}, lstm_output_selection::sequence_cell, default_offset_type)); } // Crop out the whole output sequence element topology.add(crop(output_crop_id, lstm_id, {batch_size, sequence_len, hidden_size, direction}, {0, 0, 0, 0})); // Save the node id to provide it as input to the next lstm layer prev_node_id = output_crop_id; } network network(engine, topology); network.set_input_data("input", input); for (int i = 0; i < layers; ++i) { std::string sid = get_string_id(i); if (has_initial_hidden) network.set_input_data("hidden" + sid, hidden[i]); if (has_initial_cell) network.set_input_data("cell" + sid, cell[i]); } auto outputs = network.execute(); { ASSERT_EQ(outputs.size(), size_t(1)); size_t output_size = outputs.begin()->second.get_memory()->size() / sizeof(T); ASSERT_EQ(output_size, size_t(hidden_size * sequence_len * batch_size * direction)); auto output = outputs.begin()->second.get_memory(); // Get the output tensor cldnn::layout output_layout = output->get_layout(); cldnn::tensor output_tensor = output_layout.size; // Compare the output tensor configuration against the reference value // Output tensor is configured in bfyx format ASSERT_EQ(batch_size, output_tensor.batch[0]); ASSERT_EQ(sequence_len, output_tensor.feature[0]); ASSERT_EQ(direction, output_tensor.spatial[1]); ASSERT_EQ(hidden_size, output_tensor.spatial[0]); cldnn::mem_lock<T> output_ptr(output, get_test_stream()); int32_t i = 0; for (int32_t b = 0; b < batch_size; ++b) { for (int32_t s = 0; s < sequence_len; ++s) { for (int32_t d = 0; d < direction; ++d) { for (int32_t x = 0; x < hidden_size; ++x) { ASSERT_NEAR(ref_output[layers - 1][b][s][d][x], output_ptr[i++], FERROR); } } } } } } // This test checks chained and stacked LSTM topology. The configuration allows to create // LSTM topology with multiple layers and can also be chained together. template<typename T> void lstm_gpu_chain_test(int batch_size, int input_size, int hidden_size, int directions, size_t layers, size_t chains, int sequence_len, const lstm_output_selection& output_selection) { int min_random = -2, max_random = 2; bool has_bias = false; bool has_initial_hidden = false; bool has_initial_cell = false; float clip_threshold = 0; bool input_forget = false; std::cout << "Layers = " << layers << " Input Size = " << input_size << " Hidden Size = " << hidden_size << " Sequence Len = " << sequence_len << " Directions = " << directions << " Batch Size = " << batch_size << " Output selection: " << static_cast<int>(output_selection) << std::endl; VVVVF<T> ref_input = generate_random_4d<T>(batch_size, sequence_len, 1, input_size, min_random, max_random); std::vector<std::vector< VVVVF<T>>> ref_weights; std::vector<std::vector< VVVVF<T>>> ref_recurrent; std::vector<std::vector< VVVVF<T>>> ref_bias; std::vector<std::vector< VVVVF<T>>> ref_hidden; std::vector<std::vector< VVVVF<T>>> ref_cell; std::vector<std::vector< VVVVF<T>>> ref_output; // Create the 4 dimensional weight, bias, hidden, cell state and output vectors for (size_t chain = 0; chain < chains; chain++) { std::vector<VVVVF<T>> per_chain_ref_weights; std::vector<VVVVF<T>> per_chain_ref_recurrent; std::vector<VVVVF<T>> per_chain_ref_bias; std::vector<VVVVF<T>> per_chain_ref_hidden; std::vector<VVVVF<T>> per_chain_ref_cell; std::vector<VVVVF<T>> per_chain_ref_output; for (size_t layer = 0; layer < layers; layer++) { per_chain_ref_weights.push_back(generate_random_4d<T>(1, directions, 4 * hidden_size, (layer == 0) ? input_size : hidden_size, min_random, max_random)); per_chain_ref_recurrent.push_back(generate_random_4d<T>(1, directions, 4 * hidden_size, hidden_size, min_random, max_random)); per_chain_ref_bias.push_back(generate_random_4d<T>(1, 1, directions, 4 * hidden_size, min_random, max_random)); per_chain_ref_hidden.push_back(generate_random_4d<T>(batch_size, 1, directions, hidden_size, min_random, max_random)); per_chain_ref_cell.push_back(generate_random_4d<T>(batch_size, 1, directions, hidden_size, min_random, max_random)); per_chain_ref_output.push_back(VVVVF<T>(batch_size, VVVF<T>(sequence_len, VVF<T>(directions, VF<T>(hidden_size))))); } ref_weights.push_back(per_chain_ref_weights); ref_recurrent.push_back(per_chain_ref_recurrent); ref_bias.push_back(per_chain_ref_bias); ref_hidden.push_back(per_chain_ref_hidden); ref_cell.push_back(per_chain_ref_cell); ref_output.push_back(per_chain_ref_output); } VF<T> ref_input_vec; std::vector<std::vector< VF<T>>> ref_weights_vec; std::vector<std::vector< VF<T>>> ref_recurrent_vec; std::vector<std::vector< VF<T>>> ref_bias_vec; std::vector<std::vector< VF<T>>> ref_hidden_vec; std::vector<std::vector< VF<T>>> ref_cell_vec; std::vector<std::vector< VF<T>>> ref_output_vec; ref_input_vec = flatten_4d<T>(cldnn::format::bfyx, ref_input); // flatten all the 4 dimensional vectors across chains and layers for (size_t chain = 0; chain < chains; chain++) { std::vector<VF<T>> per_chain_ref_weights; std::vector<VF<T>> per_chain_ref_recurrent; std::vector<VF<T>> per_chain_ref_bias; std::vector<VF<T>> per_chain_ref_hidden; std::vector<VF<T>> per_chain_ref_cell; std::vector<VF<T>> per_chain_ref_output; for (size_t layer = 0; layer < layers; layer++) { per_chain_ref_weights.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_weights[chain][layer])); per_chain_ref_recurrent.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_recurrent[chain][layer])); per_chain_ref_bias.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_bias[chain][layer])); per_chain_ref_hidden.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_hidden[chain][layer])); per_chain_ref_cell.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_cell[chain][layer])); per_chain_ref_output.push_back(flatten_4d<T>(cldnn::format::bfyx, ref_output[chain][layer])); } ref_weights_vec.push_back(per_chain_ref_weights); ref_recurrent_vec.push_back(per_chain_ref_recurrent); ref_bias_vec.push_back(per_chain_ref_bias); ref_hidden_vec.push_back(per_chain_ref_hidden); ref_cell_vec.push_back(per_chain_ref_cell); ref_output_vec.push_back(per_chain_ref_output); } std::vector<std::vector<VVVVF<T>>> last_hidden(chains, std::vector<VVVVF<T> >(layers, VVVVF<T>(batch_size, VVVF<T>(1, VVF<T>(directions, VF<T>(hidden_size)))))); std::vector<std::vector<VVVVF<T>>> last_cell(chains, std::vector<VVVVF<T> >(layers, VVVVF<T>(batch_size, VVVF<T>(1, VVF<T>(directions, VF<T>(hidden_size)))))); for (size_t chain = 0; chain < chains; chain++) { lstm_reference(ref_input, ref_hidden[chain][0], ref_cell[chain][0], ref_weights[chain][0], ref_recurrent[chain][0], ref_bias[chain][0], ref_output[chain][0], last_hidden[chain][0], last_cell[chain][0], has_bias, chain == 0 ? has_initial_hidden : true, chain == 0 ? has_initial_cell : true, clip_threshold, input_forget, true); if (chain < chains - 1) { ref_hidden[chain + 1][0] = last_hidden[chain][0]; ref_cell[chain + 1][0] = last_cell[chain][0]; } } for (size_t layer = 1; layer < layers; ++layer) { for (size_t chain = 0; chain < chains; chain++) { lstm_reference(ref_output[chain][layer - 1], ref_hidden[chain][layer], ref_cell[chain][layer], ref_weights[chain][layer], ref_recurrent[chain][layer], ref_bias[chain][layer], ref_output[chain][layer], last_hidden[chain][layer], last_cell[chain][layer], has_bias, chain == 0 ? has_initial_hidden : true, chain == 0 ? has_initial_cell : true, clip_threshold, input_forget, false); if (chain < chains - 1) { ref_hidden[chain + 1][layer] = last_hidden[chain][layer]; ref_cell[chain + 1][layer] = last_cell[chain][layer]; } } } auto& engine = get_test_engine(); tensor input_tensor = { batch_size, sequence_len, input_size, 1 }; layout layout = { type_to_data_type<T>::value, cldnn::format::bfyx, input_tensor }; memory::ptr input = engine.allocate_memory(layout); set_values(input, ref_input_vec); // 2-dim vectors to support chain and layers std::vector<std::vector<memory::ptr>> weights; std::vector<std::vector<memory::ptr>> recurrent; std::vector<std::vector<memory::ptr>> biases; std::vector<std::vector<memory::ptr>> hidden; std::vector<std::vector<memory::ptr>> cell; for (size_t chain = 0; chain < chains; chain++) { std::vector<memory::ptr> per_chain_weights; std::vector<memory::ptr> per_chain_recurrent; std::vector<memory::ptr> per_chain_biases; std::vector<memory::ptr> per_chain_hidden; std::vector<memory::ptr> per_chain_cell; for (size_t layer = 0; layer < layers; layer++) { per_chain_weights.push_back(engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, {1, directions, layer == 0 ? input_size : hidden_size, 4 * hidden_size} })); set_values(per_chain_weights[layer], ref_weights_vec[chain][layer]); per_chain_recurrent.push_back(engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, {1, directions, hidden_size, 4 * hidden_size} })); set_values(per_chain_recurrent[layer], ref_recurrent_vec[chain][layer]); if (has_bias) { per_chain_biases.push_back(engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, {1, 1, 4 * hidden_size, directions} })); set_values(per_chain_biases[layer], ref_bias_vec[chain][layer]); } if (has_initial_hidden) { per_chain_hidden.push_back(engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, {1, 1, hidden_size, directions} })); set_values(per_chain_hidden[layer], ref_hidden_vec[chain][layer]); } if (has_initial_cell) { per_chain_cell.push_back(engine.allocate_memory({ type_to_data_type<T>::value, format::bfyx, {1, 1, hidden_size, directions} })); set_values(per_chain_cell[layer], ref_cell_vec[chain][layer]); } } weights.push_back(per_chain_weights); recurrent.push_back(per_chain_recurrent); biases.push_back(per_chain_biases); hidden.push_back(per_chain_hidden); cell.push_back(per_chain_cell); } // Start creating the topology cldnn::topology topology; std::vector<std::pair<primitive_id, cldnn::tensor>> input_ids_offsets; std::vector<primitive_id> lstm_inputs; std::vector<primitive_id> output_ids_offsets; topology.add(input_layout("input", input->get_layout())); for (int feature = 0; feature < sequence_len; feature++) { input_ids_offsets.push_back({ get_string_id(feature), {0, feature, 0, 0} }); lstm_inputs.push_back("inputSplit:" + get_string_id(feature)); } topology.add(split("inputSplit", "input", input_ids_offsets)); bool emit_last_hidden = output_selection == lstm_output_selection::hidden || output_selection == lstm_output_selection::hidden_cell; std::vector<cldnn::primitive_id> output_sequence_ids; std::vector<cldnn::primitive_id> last_hidden_ids; std::vector<cldnn::primitive_id> last_cell_ids; for (size_t chain = 0; chain < chains; chain++) { // Add all the primitives to the network std::vector<cldnn::primitive_id> prev_output_sequence_ids(output_sequence_ids); std::vector<cldnn::primitive_id> prev_last_hidden_ids(last_hidden_ids); std::vector<cldnn::primitive_id> prev_last_cell_ids(last_cell_ids); // Erase all the temporary primitive id containers output_sequence_ids.clear(); last_cell_ids.clear(); last_hidden_ids.clear(); for (size_t layer = 0; layer < layers; layer++) { std::string chain_id = get_string_id(chain); std::string layer_id = get_string_id(layer); std::string lstm_id = "lstm:" + chain_id + ":" + layer_id; std::string weights_id = "weights:" + chain_id + ":" + layer_id; std::string recurrent_id = "recurrent:" + chain_id + ":" + layer_id; std::string biases_id = "biases:" + chain_id + ":" + layer_id; std::string hidden_id = "hidden:" + chain_id + ":" + layer_id; std::string cell_id = "cell:" + chain_id + ":" + layer_id; std::string crop_seq_id = "crop:sequence:" + chain_id + ":" + layer_id; std::string crop_last_cell_id = "crop:last_cell:" + chain_id + ":" + layer_id; std::string crop_last_hidden_id = "crop:last_hidden:" + chain_id + ":" + layer_id; primitive_id initial_hidden_id; primitive_id initial_cell_id; lstm_output_selection output_selection_per_layer; topology.add(data(weights_id, weights[chain][layer])); topology.add(data(recurrent_id, recurrent[chain][layer])); if (has_bias) topology.add(data(biases_id, biases[chain][layer])); if (chain == 0 && layer == 0) { if (has_initial_hidden) topology.add(input_layout(hidden_id, hidden[chain][layer]->get_layout())); if (has_initial_cell) topology.add(input_layout(cell_id, cell[chain][layer]->get_layout())); } // Get the initial hidden and initial cell for each layer for each chain link if (chain == 0) { initial_hidden_id = has_initial_hidden ? hidden_id : ""; initial_cell_id = has_initial_cell ? cell_id : ""; } else { initial_hidden_id = prev_last_hidden_ids[layer]; initial_cell_id = prev_last_cell_ids[layer]; } // Output selection for all the layers except the last layer has to have the sequence, // last hidden and last cell if (layer < layers - 1) { output_selection_per_layer = lstm_output_selection::sequence_cell; } else { // For the last layer, use the output selection provided by the user output_selection_per_layer = output_selection; } if (layer == 0) { topology.add(lstm(lstm_id, lstm_inputs, weights_id, recurrent_id, has_bias ? biases_id : "", initial_hidden_id, initial_cell_id, "", clip_threshold, input_forget, { activation_func::logistic, activation_func::hyperbolic_tan, activation_func::hyperbolic_tan }, {}, output_selection_per_layer, default_offset_type)); } else { topology.add(lstm(lstm_id, { output_sequence_ids[layer - 1] }, weights_id, recurrent_id, has_bias ? biases_id : "", initial_hidden_id, initial_cell_id, "", clip_threshold, input_forget, { activation_func::logistic, activation_func::hyperbolic_tan, activation_func::hyperbolic_tan }, {}, output_selection_per_layer, default_offset_type)); } tensor sequence_tensor{ batch_size, sequence_len, hidden_size, directions }; tensor cell_tensor{ batch_size, 1, hidden_size, directions }; tensor last_hidden_tensor{ batch_size, 1, hidden_size, directions }; // For all the layers except the last layer, we need to crop output sequence, // last hidden and last cell. // The output sequence goes into the next layer of lstm in a chain link // The last cell state and last hidden go to the lstm node in the same layer // next in chain topology.add(crop(crop_seq_id, lstm_id, sequence_tensor, tensor{ 0, 0, 0, 0 })); // Add crop to get the sequence topology.add(crop(crop_last_hidden_id, lstm_id, last_hidden_tensor, tensor{ 0, sequence_len - 1, 0, 0 })); // Add crop to get the last hidden element topology.add(crop(crop_last_cell_id, lstm_id, cell_tensor, tensor{ 0, sequence_len, 0, 0 })); // Add crop to get the last cell element // Keep a copy of the sequence, last hidden and last cell primitve id for each layer output_sequence_ids.push_back(crop_seq_id); last_hidden_ids.push_back(crop_last_hidden_id); last_cell_ids.push_back(crop_last_cell_id); } } // Creating network out of the above designed topology cldnn::network network(engine, topology); network.set_input_data("input", input); for (size_t layer = 0; layer < layers; layer++) { std::string sid = get_string_id(layer); if (has_initial_hidden) network.set_input_data("hidden:000:" + sid, hidden[0][layer]); // 0 is the chain link index if (has_initial_cell) network.set_input_data("cell:000:" + sid, cell[0][layer]); // 0 is the chain link index } auto outputs = network.execute(); for (auto itr = outputs.begin(); itr != outputs.end(); itr++) { auto output_tensor = itr->second.get_memory()->get_layout().size; primitive_id primitive_name = itr->first; // Split the primitive id to get the chain id // Eg: primitive id: crop:last_cell:XXX:YYY // XXX is the chain id // YYY is the layer id std::string chain_str = primitive_name.substr(primitive_name.find(":", primitive_name.find(":") + 1) + 1, 5); std::string layer_str = primitive_name.substr(primitive_name.find(":", primitive_name.find(":", primitive_name.find(":") + 1) + 1) + 1, 5); size_t chain_id = stoi(chain_str); size_t layer_id = stoi(layer_str); cldnn::memory::ptr output_memory = itr->second.get_memory(); int32_t output_size = (int32_t)(itr->second.get_memory()->size() / sizeof(T)); cldnn::tensor ref_output_tensor; VVVVF<T> ref_primitive_output; int32_t ref_batch_size = batch_size; int32_t ref_hidden_size = hidden_size; int32_t ref_directions = directions; int32_t ref_seq_len = 1; // Set the reference output against which the primitive's output will be compared if (primitive_name.find("crop:last_cell") != std::string::npos) { ref_primitive_output = last_cell[chain_id][layer_id]; } else if (emit_last_hidden || primitive_name.find("crop:last_hidden") != std::string::npos) { ref_primitive_output = last_hidden[chain_id][layer_id]; } else { ref_seq_len = sequence_len; ref_primitive_output = ref_output[chain_id][layers - 1]; } ref_output_tensor = { ref_batch_size, ref_seq_len, ref_hidden_size, ref_directions }; int32_t ref_output_size = ref_batch_size * ref_seq_len * ref_hidden_size * ref_directions; // The number of elements in reference should match the number of elements in the primitive's output ASSERT_EQ(ref_output_size, output_size); // Compare the output tensor configuration against the reference value // Output tensor is configured in bfyx format ASSERT_EQ(ref_batch_size, output_tensor.batch[0]); ASSERT_EQ(ref_seq_len, output_tensor.feature[0]); // Sequence length should match ASSERT_EQ(ref_directions, output_tensor.spatial[1]); // directions should match ASSERT_EQ(ref_hidden_size, output_tensor.spatial[0]); // input size should match cldnn::mem_lock<T> output_ptr(output_memory, get_test_stream()); int32_t i = 0; for (int32_t b = 0; b < ref_batch_size; ++b) { for (int32_t s = 0; s < ref_seq_len; ++s) { for (int32_t d = 0; d < ref_directions; ++d) { for (int32_t x = 0; x < ref_hidden_size; ++x) { ASSERT_NEAR(ref_primitive_output[b][s][d][x], output_ptr[i++], FERROR); } } } } } } TEST(lstm_gemm_gpu, generic_lstm_gemm_test_f32) { generic_lstm_gemm_gpu_test<float>(1, 1, 3, 6, 2, true, true); } TEST(lstm_gemm_gpu, generic_lstm_gemm_no_bias_f32) { generic_lstm_gemm_gpu_test<float>(1, 1, 3, 6, 2, false, true); } TEST(lstm_gemm_gpu, generic_lstm_gemm_no_hidden_f32) { generic_lstm_gemm_gpu_test<float>(1, 1, 3, 6, 2, true, false); } TEST(lstm_gemm_gpu, generic_lstm_gemm_no_hidden_bias_f32) { generic_lstm_gemm_gpu_test<float>(1, 1, 3, 6, 2, false, false); } // LSTM GEMM tests to test LSTM GEMMV kernel implementation TEST(lstm_gemm_gpu, gemv_bfyx_1x64_lstm_gemm_test_f32) { generic_lstm_gemm_gpu_test<float>(5, 1, 1, 1024, 1024, true, true); } TEST(lstm_gemm_gpu, gemv_bfyx_1x64_lstm_gemm_no_bias_f32) { generic_lstm_gemm_gpu_test<float>(1, 1, 1, 256, 2, false, true); } TEST(lstm_gemm_gpu, gemv_bfyx_1x64_lstm_gemm_no_hidden_f32) { generic_lstm_gemm_gpu_test<float>(1, 1, 1, 64, 2, true, false); } TEST(lstm_gemm_gpu, gemv_bfyx_1x64_lstm_gemm_no_hidden_bias_f32) { generic_lstm_gemm_gpu_test<float>(1, 1, 1, 64, 2, false, false); } // LSTM ELT Tests TEST(DISABLED_lstm_elt_gpu, generic_lstm_elt_test_clip_f32) { generic_lstm_elt_gpu_test<float>(1, 1, 4, 6, 3, true, 0.3f); } TEST(lstm_elt_gpu, generic_lstm_elt_test_input_forget_f32) { generic_lstm_elt_gpu_test<float>(1, 1, 4, 6, 3, true, 0.f, 1); } TEST(DISABLED_lstm_elt_gpu, generic_lstm_elt_test_clip_input_forget_f32) { generic_lstm_elt_gpu_test<float>(1, 1, 4, 6, 3, true, 0.5f, 1); } TEST(lstm_elt_gpu, generic_lstm_elt_test_f32) { generic_lstm_elt_gpu_test<float>(1, 1, 4, 6, 3, true); } TEST(lstm_elt_gpu, generic_lstm_elt_no_cell_f32) { generic_lstm_elt_gpu_test<float>(1, 1, 4, 6, 3, false); } TEST(lstm_custom_gpu, generic_lstm_custom_f32) { generic_lstm_custom_gpu_test<float>(3, 1, 3, 3, 2, true, true, true); } TEST(lstm_custom_gpu, generic_lstm_custom_no_biasf32) { generic_lstm_custom_gpu_test<float>(3, 1, 3, 3, 2, false, true, true); } TEST(lstm_custom_gpu, generic_lstm_custom_no_hidden_f32) { generic_lstm_custom_gpu_test<float>(3, 1, 3, 3, 2, true, false, true); } TEST(lstm_custom_gpu, generic_lstm_custom_no_bias_hidden_f32) { generic_lstm_custom_gpu_test<float>(3, 1, 3, 3, 2, false, false, true); } TEST(lstm_custom_gpu, generic_lstm_custom_no_cell_f32) { generic_lstm_custom_gpu_test<float>(3, 1, 3, 3, 2, true, true, false); } TEST(lstm_custom_gpu, generic_lstm_custom_no_bias_cell_f32) { generic_lstm_custom_gpu_test<float>(3, 1, 3, 3, 2, false, true, false); } TEST(lstm_custom_gpu, generic_lstm_custom_no_hidden_cell_f32) { generic_lstm_custom_gpu_test<float>(3, 1, 3, 3, 2, true, false, false); } TEST(lstm_custom_gpu, generic_lstm_custom_no_bias_hidden_cell_f32) { generic_lstm_custom_gpu_test<float>(3, 1, 3, 3, 2, false, false, false); } // generic_lstm_gpu_test paramters: // layers, sequence, dir, batch, input, hidden, bias, initial_h, initial_cell, threshold, coupled_input_forget TEST(lstm_gpu, generic_lstm_f32) { generic_lstm_gpu_test<float>(1, 7, 1, 3, 3, 2, true, true, true); } TEST(lstm_gpu, generic_lstm_no_bias_f32) { generic_lstm_gpu_test<float>(1, 7, 1, 3, 3, 2, false, true, true); } TEST(lstm_gpu, generic_lstm_no_hidden_f32) { generic_lstm_gpu_test<float>(1, 7, 1, 5, 4, 3, true, false, true); } TEST(lstm_gpu, generic_lstm_no_bias_hidden_f32) { generic_lstm_gpu_test<float>(1, 7, 1, 5, 4, 3, false, false, true); } TEST(lstm_gpu, generic_lstm_no_cell_f32) { generic_lstm_gpu_test<float>(1, 7, 1, 5, 4, 3, true, true, false); } TEST(lstm_gpu, generic_lstm_no_bias_cell_f32) { generic_lstm_gpu_test<float>(1, 7, 1, 5, 4, 3, false, true, false); } TEST(lstm_gpu, generic_lstm_no_hidden_cell_f32) { generic_lstm_gpu_test<float>(1, 7, 1, 5, 4, 3, true, false, false); } TEST(lstm_gpu, generic_lstm_no_bias_hidden_cell_f32) { generic_lstm_gpu_test<float>(1, 7, 1, 5, 4, 3, false, false, false); } TEST(DISABLED_lstm_gpu, generic_lstm_clip_f32) { generic_lstm_gpu_test<float>(1, 7, 1, 3, 3, 2, true, true, true, 0.3f, 0); } TEST(lstm_gpu, generic_lstm_input_forget_f32) { generic_lstm_gpu_test<float>(1, 7, 1, 3, 3, 2, true, true, true, 0.f, 1); } TEST(DISABLED_lstm_gpu, generic_lstm_clip_input_forget_f32) { generic_lstm_gpu_test<float>(1, 7, 1, 3, 3, 2, true, true, true, 0.3f, 1); } TEST(lstm_gpu, generic_lstm_offset_order_ifoz_f32) { default_offset_type = lstm_weights_order::ifoz; generic_lstm_gpu_test<float>(1, 7, 1, 3, 3, 2, true, true, true); default_offset_type = lstm_weights_order::iofz; } TEST(lstm_gpu, generic_lstm_canonical_f32) { generic_lstm_gpu_test<float>(1, 1, 1, 1, 1, 1, true, true, true); } // bidirectional support TEST(lstm_gpu, generic_lstm_bi_f32) { generic_lstm_gpu_test<float>(1, 7, 2, 2, 3, 4, false, false, false); } TEST(lstm_gpu, generic_lstm_bi_bias_f32) { generic_lstm_gpu_test<float>(1, 7, 2, 2, 3, 4, true, false, false); } TEST(lstm_gpu, generic_lstm_bi_bias_hidden_f32) { generic_lstm_gpu_test<float>(1, 7, 2, 2, 3, 4, true, true, false); } TEST(lstm_gpu, generic_lstm_bi_bias_hidden_cell_f32) { generic_lstm_gpu_test<float>(1, 7, 2, 2, 3, 4, true, true, true); } // multi-layer support TEST(lstm_gpu, generic_lstm_stacked_no_seq_f32) { generic_lstm_gpu_test<float>(4, 1, 1, 3, 3, 2, true, true, true); } TEST(lstm_gpu, generic_lstm_stacked_seq_f32) { generic_lstm_gpu_test<float>(4, 7, 1, 3, 3, 2, true, true, true); } TEST(lstm_gpu, generic_lstm_stacked_bi_f32) { generic_lstm_gpu_test<float>(4, 7, 2, 3, 3, 2, true, true, true); } TEST(lstm_gpu, generic_lstm_stacked_seq_bi_f32) { generic_lstm_gpu_test<float>(4, 7, 2, 3, 3, 2, true, true, true); } // optional outputs support TEST(lstm_gpu, output_test_sequence_f32) { lstm_gpu_output_test<float>(lstm_output_selection::sequence, 1); } TEST(lstm_gpu, output_test_hidden_f32) { lstm_gpu_output_test<float>(lstm_output_selection::hidden, 1); } TEST(lstm_gpu, output_test_hidden_cell_f32) { lstm_gpu_output_test<float>(lstm_output_selection::hidden_cell, 1); } TEST(lstm_gpu, output_test_sequence_cell_f32) { lstm_gpu_output_test<float>(lstm_output_selection::sequence_cell, 1); } TEST(lstm_gpu, output_test_sequence_bi_f32) { lstm_gpu_output_test<float>(lstm_output_selection::sequence, 2); } TEST(lstm_gpu, output_test_hidden_bi_f32) { lstm_gpu_output_test<float>(lstm_output_selection::hidden, 2); } TEST(lstm_gpu, output_test_hidden_cell_bi_f32) { lstm_gpu_output_test<float>(lstm_output_selection::hidden_cell, 2); } TEST(lstm_gpu, output_test_sequence_cell_bi_f32) { lstm_gpu_output_test<float>(lstm_output_selection::sequence_cell, 2); } // format tests TEST(lstm_gpu, lstm_gpu_format_bfyx_f32) { lstm_gpu_format_test<float>(cldnn::format::bfyx, 1); } TEST(lstm_gpu, lstm_gpu_format_bfyx_bi_f32) { lstm_gpu_format_test<float>(cldnn::format::bfyx, 2); } TEST(lstm_gpu, lstm_gpu_format_fyxb_f32) { lstm_gpu_format_test<float>(cldnn::format::fyxb, 1); } TEST(lstm_gpu, lstm_gpu_format_fyxb_bi_f32) { lstm_gpu_format_test<float>(cldnn::format::fyxb, 2); } // test for LSTM users' dependencies TEST(lstm_gpu, lstm_users_f32) { lstm_gpu_users_test<float>(); } // Test for LSTM with concatenated input TEST(lstm_gpu, generic_lstm_concatenated_input) { lstm_gpu_concatenated_input_test<float>(1, 2, 2, 1, 1, 1, true, true, true); } TEST(lstm_gpu, generic_lstm_concatenated_input_multi_layer) { lstm_gpu_concatenated_input_test<float>(5, 5, 2, 1, 1, 4, true, true, true); } // test for LSTM with chain and stack (multilayer) TEST(lstm_gpu, generic_lstm_chained_unidirectional_f32) { // batch size = 1 // input size = 2 // hidden size = 4 // directions = 1 // layers = 1 // chains = 1 // sequence length = 1 // output selection = output sequence and cell lstm_gpu_chain_test<float>(1, 2, 4, 1, 1, 2, 1, lstm_output_selection::sequence_cell); } TEST(lstm_gpu, generic_lstm_chained_bidirectional_f32) { // batch size = 1 // input size = 2 // hidden size = 4 // directions = 2 // layers = 1 // chains = 1 // sequence length = 1 // output selection = output sequence and cell lstm_gpu_chain_test<float>(1, 2, 4, 2, 1, 1, 1, lstm_output_selection::sequence_cell); } TEST(lstm_gpu, generic_lstm_chained_no_stack_bidirectional_f32) { // batch size = 2 // input size = 2 // hidden size = 4 // directions = 2 // layers = 1 // chains = 2 // sequence length = 5 // output selection = output sequence and cell lstm_gpu_chain_test<float>(2, 2, 4, 2, 1, 2, 5, lstm_output_selection::sequence_cell); } TEST(lstm_gpu, generic_lstm_chained_stacked_bidirectional_f32) { // batch size = 2 // input size = 2 // hidden size = 4 // directions = 2 // layers = 4 // chains = 2 // sequence length = 5 // output selection = output sequence and cell lstm_gpu_chain_test<float>(2, 2, 4, 2, 4, 2, 5, lstm_output_selection::sequence_cell); } // FP16 Half precision tests TEST(lstm_gemm_gpu, generic_lstm_gemm_test_f16) { generic_lstm_gemm_gpu_test<FLOAT16>(1, 1, 3, 6, 2, true, true); } TEST(lstm_gemm_gpu, generic_lstm_gemm_no_bias_f16) { generic_lstm_gemm_gpu_test<FLOAT16>(1, 1, 3, 6, 2, false, true); } TEST(lstm_gemm_gpu, generic_lstm_gemm_no_hidden_f16) { generic_lstm_gemm_gpu_test<FLOAT16>(1, 1, 3, 6, 2, true, false); } TEST(lstm_gemm_gpu, generic_lstm_gemm_no_hidden_bias_f16) { generic_lstm_gemm_gpu_test<FLOAT16>(1, 1, 3, 6, 2, false, false); } TEST(DISABLED_lstm_elt_gpu, generic_lstm_elt_test_clip_f16) { generic_lstm_elt_gpu_test<FLOAT16>(1, 1, 4, 6, 3, true, 0.3f); } TEST(lstm_elt_gpu, generic_lstm_elt_test_input_forget_f16) { generic_lstm_elt_gpu_test<FLOAT16>(1, 1, 4, 6, 3, true, 0.f, 1); } TEST(DISABLED_lstm_elt_gpu, generic_lstm_elt_test_clip_input_forget_f16) { generic_lstm_elt_gpu_test<FLOAT16>(1, 1, 4, 6, 3, true, 0.5f, 1); } TEST(lstm_elt_gpu, generic_lstm_elt_test_f16) { generic_lstm_elt_gpu_test<FLOAT16>(1, 1, 4, 6, 3, true); } TEST(lstm_elt_gpu, generic_lstm_elt_no_cell_f16) { generic_lstm_elt_gpu_test<FLOAT16>(1, 1, 4, 6, 3, false); } TEST(lstm_gpu, generic_lstm_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 3, 3, 2, true, true, true); } TEST(lstm_gpu, generic_lstm_no_bias_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 3, 3, 2, false, true, true); } TEST(lstm_gpu, generic_lstm_no_hidden_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 5, 4, 3, true, false, true); } TEST(lstm_gpu, generic_lstm_no_bias_hidden_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 5, 4, 3, false, false, true); } TEST(lstm_gpu, generic_lstm_no_cell_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 5, 4, 3, true, true, false); } TEST(lstm_gpu, generic_lstm_no_bias_cell_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 5, 4, 3, false, true, false); } TEST(lstm_gpu, generic_lstm_no_hidden_cell_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 5, 4, 3, true, false, false); } TEST(lstm_gpu, generic_lstm_no_bias_hidden_cell_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 5, 4, 3, false, false, false); } TEST(DISABLED_lstm_gpu, generic_lstm_clip_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 3, 3, 2, true, true, true, 0.3f, 0); } TEST(lstm_gpu, generic_lstm_input_forget_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 3, 3, 2, true, true, true, 0.f, 1); } TEST(DISABLED_lstm_gpu, generic_lstm_clip_input_forget_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 3, 3, 2, true, true, true, 0.3f, 1); } TEST(lstm_gpu, generic_lstm_offset_order_ifoz_f16) { default_offset_type = lstm_weights_order::ifoz; generic_lstm_gpu_test<FLOAT16>(1, 7, 1, 3, 3, 2, true, true, true); default_offset_type = lstm_weights_order::iofz; } TEST(lstm_gpu, generic_lstm_canonical_f16) { generic_lstm_gpu_test<FLOAT16>(1, 1, 1, 1, 1, 1, true, true, true); } // bidirectional support TEST(lstm_gpu, generic_lstm_bi_bias_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 2, 2, 3, 4, true, false, false); } TEST(lstm_gpu, generic_lstm_bi_bias_hidden_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 2, 2, 3, 4, true, true, false); } TEST(lstm_gpu, generic_lstm_bi_bias_hidden_cell_f16) { generic_lstm_gpu_test<FLOAT16>(1, 7, 2, 2, 3, 4, true, true, true); } // multi-layer support TEST(lstm_gpu, generic_lstm_stacked_seq_f16) { generic_lstm_gpu_test<FLOAT16>(4, 7, 1, 3, 3, 2, true, true, true); } TEST(lstm_gpu, generic_lstm_stacked_bi_f16) { generic_lstm_gpu_test<FLOAT16>(4, 7, 2, 3, 3, 2, true, true, true); } // TODO: Add tests for the following: // integration testing using multi-layer and chained LSTMs // LSTMs single input // optional activation list
;; ;; Copyright (c) 2020-2021, Intel Corporation ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are met: ;; ;; * Redistributions of source code must retain the above copyright notice, ;; this list of conditions and the following disclaimer. ;; * Redistributions in binary form must reproduce the above copyright ;; notice, this list of conditions and the following disclaimer in the ;; documentation and/or other materials provided with the distribution. ;; * Neither the name of Intel Corporation nor the names of its contributors ;; may be used to endorse or promote products derived from this software ;; without specific prior written permission. ;; ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ;; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ;; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;; ;; Authors of original CRC implementation: ;; Erdinc Ozturk ;; Vinodh Gopal ;; James Guilford ;; Greg Tucker ;; ;; Reference paper titled: ;; "Fast CRC Computation for Generic Polynomials Using PCLMULQDQ Instruction" ;; URL: http://download.intel.com/design/intarch/papers/323102.pdf %include "include/os.asm" %include "include/reg_sizes.asm" %include "include/clear_regs.asm" %include "include/crc32.inc" %include "include/cet.inc" [bits 64] default rel %ifndef LINUX %xdefine arg1 rcx %xdefine arg2 rdx %xdefine arg3 r8 %xdefine arg4 r9 %else %xdefine arg1 rdi %xdefine arg2 rsi %xdefine arg3 rdx %xdefine arg4 rcx %endif %define msg arg2 %define len arg3 section .text ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; arg1 - initial CRC value ;; arg2 - buffer pointer ;; arg3 - buffer size ;; arg4 - pointer to CRC constants ;; Returns CRC value through EAX align 32 MKGLOBAL(crc32_by16_vclmul_avx512,function,internal) crc32_by16_vclmul_avx512: endbranch64 vbroadcasti32x4 zmm18, [rel SHUF_MASK] ;; check if smaller than 256B cmp len, 256 jl .less_than_256 ;; load the initial crc value vmovd xmm10, DWORD(arg1) vpslldq xmm10, 12 ;; XOR initial CRC value with first 64 bytes of data vmovdqu8 zmm0, [msg + 16*0] vmovdqu8 zmm4, [msg + 16*4] vpshufb zmm0, zmm0, zmm18 vpshufb zmm4, zmm4, zmm18 vpxorq zmm0, zmm10 vbroadcasti32x4 zmm10, [arg4 + crc32_const_fold_8x128b] sub len, 256 cmp len, 256 jl .fold_128_B_loop vmovdqu8 zmm7, [msg + 16*8] vmovdqu8 zmm8, [msg + 16*12] vpshufb zmm7, zmm7, zmm18 vpshufb zmm8, zmm8, zmm18 vbroadcasti32x4 zmm16, [arg4 + crc32_const_fold_16x128b] sub len, 256 .fold_256_B_loop: add msg, 256 vmovdqu8 zmm3, [msg + 16*0] vpshufb zmm3, zmm3, zmm18 vpclmulqdq zmm1, zmm0, zmm16, 0x00 vpclmulqdq zmm0, zmm0, zmm16, 0x11 vpternlogq zmm0, zmm1, zmm3, 0x96 vmovdqu8 zmm9, [msg + 16*4] vpshufb zmm9, zmm9, zmm18 vpclmulqdq zmm5, zmm4, zmm16, 0x00 vpclmulqdq zmm4, zmm4, zmm16, 0x11 vpternlogq zmm4, zmm5, zmm9, 0x96 vmovdqu8 zmm11, [msg + 16*8] vpshufb zmm11, zmm11, zmm18 vpclmulqdq zmm12, zmm7, zmm16, 0x00 vpclmulqdq zmm7, zmm7, zmm16, 0x11 vpternlogq zmm7, zmm12, zmm11, 0x96 vmovdqu8 zmm17, [msg + 16*12] vpshufb zmm17, zmm17, zmm18 vpclmulqdq zmm14, zmm8, zmm16, 0x00 vpclmulqdq zmm8, zmm8, zmm16, 0x11 vpternlogq zmm8, zmm14, zmm17, 0x96 sub len, 256 jge .fold_256_B_loop ;; Fold 256 into 128 add msg, 256 vpclmulqdq zmm1, zmm0, zmm10, 0x00 vpclmulqdq zmm2, zmm0, zmm10, 0x11 vpternlogq zmm7, zmm1, zmm2, 0x96 ; xor ABC vpclmulqdq zmm5, zmm4, zmm10, 0x00 vpclmulqdq zmm6, zmm4, zmm10, 0x11 vpternlogq zmm8, zmm5, zmm6, 0x96 ; xor ABC vmovdqa32 zmm0, zmm7 vmovdqa32 zmm4, zmm8 add len, 128 jmp .fold_128_B_register ;; In this section of the code, there is ((128 * x) + y) bytes of buffer ;; where, 0 <= y < 128. ;; The fold_128_B_loop loop will fold 128 bytes at a time until ;; there is (128 + y) bytes of buffer left ;; Fold 128 bytes at a time. ;; This section of the code folds 8 xmm registers in parallel .fold_128_B_loop: add msg, 128 vmovdqu8 zmm8, [msg + 16*0] vpshufb zmm8, zmm8, zmm18 vpclmulqdq zmm2, zmm0, zmm10, 0x00 vpclmulqdq zmm0, zmm0, zmm10, 0x11 vpternlogq zmm0, zmm2, zmm8, 0x96 vmovdqu8 zmm9, [msg + 16*4] vpshufb zmm9, zmm9, zmm18 vpclmulqdq zmm5, zmm4, zmm10, 0x00 vpclmulqdq zmm4, zmm4, zmm10, 0x11 vpternlogq zmm4, zmm5, zmm9, 0x96 sub len, 128 jge .fold_128_B_loop add msg, 128 ;; At this point, the buffer pointer is pointing at the last ;; y bytes of the buffer, where 0 <= y < 128. ;; The 128 bytes of folded data is in 2 of the zmm registers: ;; zmm0 and zmm4 .fold_128_B_register: ;; fold the 8x128-bits into 1x128-bits with different constants vmovdqu8 zmm16, [arg4 + crc32_const_fold_7x128b] vmovdqu8 zmm11, [arg4 + crc32_const_fold_3x128b] vpclmulqdq zmm1, zmm0, zmm16, 0x00 vpclmulqdq zmm2, zmm0, zmm16, 0x11 vextracti64x2 xmm7, zmm4, 3 ; save last that has no multiplicand vpclmulqdq zmm5, zmm4, zmm11, 0x00 vpclmulqdq zmm6, zmm4, zmm11, 0x11 vmovdqa xmm10, [arg4 + crc32_const_fold_1x128b] ; Needed later in reduction loop vpternlogq zmm1, zmm2, zmm5, 0x96 ; xor ABC vpternlogq zmm1, zmm6, zmm7, 0x96 ; xor ABC vshufi64x2 zmm8, zmm1, zmm1, 0x4e ; Swap 1,0,3,2 - 01 00 11 10 vpxorq ymm8, ymm8, ymm1 vextracti64x2 xmm5, ymm8, 1 vpxorq xmm7, xmm5, xmm8 ;; Instead of 128, we add 128-16 to the loop counter to save 1 ;; instruction from the loop below. ;; Instead of a cmp instruction, we use the negative flag with the jl instruction add len, 128 - 16 jl .final_reduction_for_128 ;; There are 16 + y bytes left to reduce. ;; 16 bytes is in register xmm7 and the rest is in memory ;; we can fold 16 bytes at a time if y>=16 ;; continue folding 16B at a time .reduction_loop_16B: vpclmulqdq xmm8, xmm7, xmm10, 0x11 vpclmulqdq xmm7, xmm7, xmm10, 0x00 vpxor xmm7, xmm8 vmovdqu xmm0, [msg] vpshufb xmm0, xmm18 vpxor xmm7, xmm0 add msg, 16 sub len, 16 ;; Instead of a cmp instruction, we utilize the flags with the jge instruction. ;; Equivalent of check if there is any more 16B in the buffer to be folded. jge .reduction_loop_16B ;; Now we have 16+z bytes left to reduce, where 0<= z < 16. ;; First, we reduce the data in the xmm7 register .final_reduction_for_128: add len, 16 je .done_128 ; here we are getting data that is less than 16 bytes. ; since we know that there was data before the pointer, we can offset ; the input pointer before the actual point, to receive exactly 16 bytes. ; after that the registers need to be adjusted. .get_last_two_xmms: vmovdqu xmm1, [msg - 16 + len] vpshufb xmm1, xmm18 ;; Get rid of the extra data that was loaded before ;; load the shift constant lea rax, [rel pshufb_shf_table + 16] sub rax, len vmovdqu xmm0, [rax] vpshufb xmm2, xmm7, xmm0 vpxor xmm0, [rel mask1] vpshufb xmm7, xmm7, xmm0 vpblendvb xmm1, xmm1, xmm2, xmm0 vpclmulqdq xmm8, xmm7, xmm10, 0x11 vpclmulqdq xmm7, xmm7, xmm10, 0x00 vpternlogq xmm7, xmm1, xmm8, 0x96 .done_128: ;; compute crc of a 128-bit value vmovdqa xmm10, [arg4 + crc32_const_fold_128b_to_64b] ;; 64b fold vpslldq xmm0, xmm7, 8 vpclmulqdq xmm7, xmm10, 0x01 vpxor xmm7, xmm0 ;; 32b fold vpand xmm0, xmm7, [rel mask2] vpsrldq xmm7, 12 vpclmulqdq xmm7, xmm10, 0x10 vpxor xmm7, xmm0 ;; barrett reduction .barrett: vmovdqa xmm10, [arg4 + crc32_const_reduce_64b_to_32b] vmovdqa xmm0, xmm7 vpclmulqdq xmm7, xmm10, 0x01 vpslldq xmm7, 4 vpclmulqdq xmm7, xmm10, 0x11 vpslldq xmm7, 4 vpxor xmm7, xmm0 vpextrd eax, xmm7, 1 .cleanup: ret align 32 .less_than_256: vmovd xmm0, DWORD(arg1) ; get the initial crc value vpslldq xmm0, 12 ;; check if there is enough buffer to be able to fold 16B at a time cmp len, 32 jl .less_than_32 ;; if there is, load the constants vmovdqa xmm10, [arg4 + crc32_const_fold_1x128b] vmovdqu xmm7, [msg] ; load the plaintext vpshufb xmm7, xmm18 vpxor xmm7, xmm0 ;; update the buffer pointer add msg, 16 ;; update the counter ;; - subtract 32 instead of 16 to save one instruction from the loop sub len, 32 jmp .reduction_loop_16B align 32 .less_than_32: ;; Move initial crc to the return value. ;; This is necessary for zero-length buffers. mov eax, DWORD(arg1) or len, len jz .cleanup cmp len, 16 je .exact_16_left jl .less_than_16_left vmovdqu xmm7, [msg] ; load the plaintext vpshufb xmm7, xmm18 vpxor xmm7, xmm0 ; xor the initial crc value add msg, 16 sub len, 16 vmovdqa xmm10, [arg4 + crc32_const_fold_1x128b] jmp .get_last_two_xmms align 32 .less_than_16_left: lea r11, [rel byte_len_to_mask_table] kmovw k2, [r11 + len*2] vmovdqu8 xmm7{k2}{z}, [msg] vpshufb xmm7, xmm18 vpxor xmm7, xmm0 ; xor the initial crc value cmp len, 4 jl .only_less_than_4 lea r11, [rel pshufb_shf_table + 16] sub r11, len vmovdqu xmm0, [r11] vpxorq xmm0, [rel mask1] vpshufb xmm7, xmm0 jmp .done_128 .only_less_than_4: cmp len, 3 jl .only_less_than_3 vpsrldq xmm7, 5 jmp .barrett .only_less_than_3: cmp len, 2 jl .only_less_than_2 vpsrldq xmm7, 6 jmp .barrett .only_less_than_2: vpsrldq xmm7, 7 jmp .barrett align 32 .exact_16_left: vmovdqu xmm7, [msg] vpshufb xmm7, xmm18 vpxor xmm7, xmm0 ; xor the initial crc value jmp .done_128 section .data align 16 pshufb_shf_table: ;; use these values for shift constants for the pshufb instruction dq 0x8786858483828100, 0x8f8e8d8c8b8a8988 dq 0x0706050403020100, 0x000e0d0c0b0a0908 align 16 mask1: dq 0x8080808080808080, 0x8080808080808080 align 16 mask2: dq 0xFFFFFFFFFFFFFFFF, 0x00000000FFFFFFFF align 16 SHUF_MASK: dq 0x08090A0B0C0D0E0F, 0x0001020304050607 align 64 byte_len_to_mask_table: dw 0x0000, 0x0001, 0x0003, 0x0007, dw 0x000f, 0x001f, 0x003f, 0x007f, dw 0x00ff, 0x01ff, 0x03ff, 0x07ff, dw 0x0fff, 0x1fff, 0x3fff, 0x7fff, dw 0xffff %ifdef LINUX section .note.GNU-stack noalloc noexec nowrite progbits %endif
[bits 64] [org 0x007ffca29417b0] ; If this is defined the process will be forcefully terminated once a snapshot ; is taken. ; If this is _not_ defined, the thread which took the snapshot will spin ; forever in an infinite loop. This is a busy loop and thus allows for taking ; snapshots on another thread. Allowing for multi-context snapshotting. ;%define TERMINATE_PROCESS_ON_SNAPSHOT ; Syscall numbers for your specific Windows build ; Thanks j00ru :3 ; https://j00ru.vexillium.org/syscalls/nt/64/ %define NtQueryVirtualMemory 0x23 %define NtTerminateProcess 0x2c %define NtCreateFile 0x55 %define NtWriteFile 0x08 %define NtClose 0x0f %define NtFlushBuffersFile 0x4b ; Offset of the `ClientId` field in the `_TEB` structure. This `ClientId` ; contains 2 pointer-length values (HANDLEs) containing the current threads' ; process and thread IDs. %define TEB_CLIENT_ID 0x40 ; TEB->NtTib->Self offset %define TEB_SELF 0x30 section .code struc UNICODE_STRING .length: resw 1 .max_length: resw 1 .padding: resb 4 .ptr: resq 1 endstruc struc OBJECT_ATTRIBUTES .length: resd 1 .padding: resd 1 .root_directory: resq 1 .object_name: resq 1 .attributes: resd 1 .padding2: resd 1 .security_desc: resq 1 .security_qos: resq 1 endstruc struc MEMORY_BASIC_INFORMATION .base: resq 1 .allocation_base: resq 1 .allocation_protect: resd 1 .padding: resd 1 .region_size: resq 1 .state: resd 1 .protect: resd 1 .type: resd 1 .padding1: resd 1 endstruc %if 0 00000000 50 push rax 00000001 48B8371337133713 mov rax,0x1337133713371337 -3713 0000000B FFE0 jmp rax %endif shellcode: struc sc_locals .filename: resb UNICODE_STRING_size .info_file: resq 1 .memory_file: resq 1 .meminf: resb MEMORY_BASIC_INFORMATION_size .info_fn: resb 512 .memory_fn: resb 512 .iosb: resq 2 endstruc ; Get the original rax, from the original ; push rax ; mov rax, imm64 ; jmp rax ; Patch that we use to take the snapshot pop rax ; Save all GPR register state push rsp push rax push rbx push rcx push rdx push rbp push rsi push rdi push r8 push r9 push r10 push r11 push r12 push r13 push r14 push r15 pushfq push qword [gs:TEB_SELF] ; Save the address of the register state mov r12, rsp ; 16-byte align the stack and rsp, ~0xf ; Allocate room for and save the floating point state sub rsp, 512 mov r13, rsp fxsave64 [r13] ; Make room for the locals sub rsp, sc_locals_size mov rbp, rsp ; Copy the filenames to the stack lea rsi, [rel memory_info] lea rdi, [rsp + sc_locals.info_fn] mov rcx, memory_info_len rep movsb lea rsi, [rel memory] lea rdi, [rsp + sc_locals.memory_fn] mov rcx, memory_len rep movsb ; Update the info filename PID and TID mov rcx, qword [gs:TEB_CLIENT_ID] lea rdi, [rsp + sc_locals.info_fn + memory_info_pid - memory_info] call itoa_utf16 mov rcx, qword [gs:TEB_CLIENT_ID + 8] lea rdi, [rsp + sc_locals.info_fn + memory_info_tid - memory_info] call itoa_utf16 ; Update the memory filename PID and TID mov rcx, qword [gs:TEB_CLIENT_ID] lea rdi, [rsp + sc_locals.memory_fn + memory_pid - memory] call itoa_utf16 mov rcx, qword [gs:TEB_CLIENT_ID + 8] lea rdi, [rsp + sc_locals.memory_fn + memory_tid - memory] call itoa_utf16 ; Create the filename for the memory layout and register state mov word [rbp + sc_locals.filename + UNICODE_STRING.length], \ memory_info_len mov word [rbp + sc_locals.filename + UNICODE_STRING.max_length], \ memory_info_len lea rax, [rsp + sc_locals.info_fn] mov qword [rbp + sc_locals.filename + UNICODE_STRING.ptr], rax ; Create the file lea r10, [rbp + sc_locals.filename] call create_file mov [rbp + sc_locals.info_file], rax ; Create the filename for the memory dump mov word [rbp + sc_locals.filename + UNICODE_STRING.length], memory_len mov word [rbp + sc_locals.filename + UNICODE_STRING.max_length], memory_len lea rax, [rsp + sc_locals.memory_fn] mov qword [rbp + sc_locals.filename + UNICODE_STRING.ptr], rax ; Create the file lea r10, [rbp + sc_locals.filename] call create_file mov [rbp + sc_locals.memory_file], rax ; Write the register state to the info file mov rcx, [rbp + sc_locals.info_file] mov rdx, r12 mov r8, 8 * 18 ; 16 GPRs + flags + gs base call write_file test eax, eax jnz error ; Write the floating point state to the info file mov rcx, [rbp + sc_locals.info_file] mov rdx, r13 mov r8, 512 call write_file test eax, eax jnz error ; Base address to scan mov r15, 0 .loop: ; Make room for the syscalls arguments on the stack sub rsp, 0x38 ; Set up the arguments mov r10, -1 ; ProcessHandle mov rdx, r15 ; BaseAddress xor r8d, r8d ; MemoryInformationClass lea r9, [rbp + sc_locals.meminf] ; MemoryInformation ; MemoryInformationLength mov qword [rsp + 0x28], MEMORY_BASIC_INFORMATION_size mov qword [rsp + 0x30], 0 ; ReturnLength ; Invoke NtQueryVirtualMemory() mov eax, NtQueryVirtualMemory syscall ; Restore the stack from the call add rsp, 0x38 ; Make sure the syscall succeeded test eax, eax jnz .done ; Update the base of the scan to reflect the size of the region we just ; observed add r15, [rbp + sc_locals.meminf + MEMORY_BASIC_INFORMATION.region_size] ; Attempt to write the memory region, if the kernel cannot read the memory ; this will fail and we'll go to the next section mov rcx, [rbp + sc_locals.memory_file] mov rdx, [rbp + sc_locals.meminf + MEMORY_BASIC_INFORMATION.base] mov r8, [rbp + sc_locals.meminf + MEMORY_BASIC_INFORMATION.region_size] call write_file test eax, eax jnz .loop ; Write the metadata for this saved region mov rcx, [rbp + sc_locals.info_file] lea rdx, [rbp + sc_locals.meminf] mov r8, MEMORY_BASIC_INFORMATION_size call write_file test eax, eax jnz error ; Go to the next section jmp .loop .done: ; Flush the info file mov r10, [rbp + sc_locals.info_file] lea rdx, [rbp + sc_locals.iosb] mov eax, NtFlushBuffersFile sub rsp, 0x28 syscall add rsp, 0x28 test eax, eax jnz error ; Flush the memory file mov r10, [rbp + sc_locals.memory_file] lea rdx, [rbp + sc_locals.iosb] mov eax, NtFlushBuffersFile sub rsp, 0x28 syscall add rsp, 0x28 test eax, eax jnz error ; Close the info file mov r10, [rbp + sc_locals.info_file] mov eax, NtClose sub rsp, 0x28 syscall add rsp, 0x28 test eax, eax jnz error ; Close the memory file mov r10, [rbp + sc_locals.memory_file] mov eax, NtClose sub rsp, 0x28 syscall add rsp, 0x28 test eax, eax jnz error .spin: %ifdef TERMINATE_PROCESS_ON_SNAPSHOT ; NtTerminateProcess(GetCurrentProcess(), 0x1234); mov r10, -1 mov edx, 0x1234 mov eax, NtTerminateProcess syscall %endif jmp short .spin ; Invoked on an error error: ud2 ; Create a file if it does not already exist, on error, jumps to `error` ; r10 -> PUNICODE_STRING ; rax <- HANDLE create_file: struc cf_locals .handle: resq 1 .iosb: resq 2 .objattr: resb OBJECT_ATTRIBUTES_size endstruc ; Save registers push rbp push rdi ; Make room on the stack for the cf_locals sub rsp, cf_locals_size mov rbp, rsp ; Zero initialize all the cf_locals cld mov rdi, rbp xor eax, eax mov ecx, cf_locals_size rep stosb ; Initialize the object attributes mov dword [rsp + cf_locals.objattr + OBJECT_ATTRIBUTES.length], \ OBJECT_ATTRIBUTES_size mov qword [rsp + cf_locals.objattr + OBJECT_ATTRIBUTES.object_name], r10 ; Make room for the arguments on the stack sub rsp, 0x60 ; Set up the arguments lea r10, [rbp + cf_locals.handle] ; FileHandle mov edx, 0x120116 ; DesiredAccess (FILE_GENERIC_WRITE) lea r8, [rbp + cf_locals.objattr] ; ObjectAttributes lea r9, [rbp + cf_locals.iosb] ; IoStatusBlock mov qword [rsp + 0x28], 0 ; AllocationSize mov qword [rsp + 0x30], 0x80 ; FileAttributes (FILE_ATTRIBUTE_NORMAL) mov qword [rsp + 0x38], 0 ; ShareAccess mov qword [rsp + 0x40], 0 ; CreateDisposition (FILE_SUPERCEDE) mov qword [rsp + 0x48], 0x20 ; CreateOptions ; (FILE_SYNCHRONOUS_IO_NONALERT) mov qword [rsp + 0x50], 0 ; EaBuffer mov qword [rsp + 0x58], 0 ; EaLength ; Invoke NtCreateFile mov eax, NtCreateFile syscall ; Jump to error on errors test eax, eax jnz error ; Return the handle mov rax, [rbp + cf_locals.handle] ; Free the arguments from the stack as well as the cf_locals add rsp, 0x60 + cf_locals_size ; Restore registers pop rdi pop rbp ; Return back ret ; Write to a file based on the handle in `rcx` ; rcx -> Handle ; rdx -> Buffer ; r8 -> Length ; rax <- NTSTATUS write_file: struc wf_locals .iosb: resq 2 endstruc ; Save registers push rbp ; Allocate local space on the stack sub rsp, wf_locals_size mov rbp, rsp ; Save all arguments for partial writes push rcx push rdx push r8 ; Allocate room for the arguments sub rsp, 0x50 ; Initialize the IOSB lea rax, [rbp + wf_locals.iosb] mov qword [rax + 0], 0 mov qword [rax + 8], 0 ; Populate the arguments on the stack mov qword [rsp + 0x28], rax ; IoStatusBlock mov qword [rsp + 0x30], rdx ; Buffer mov qword [rsp + 0x38], r8 ; Length mov qword [rsp + 0x40], 0 ; ByteOffset mov qword [rsp + 0x48], 0 ; Key ; Pass the register-based arguments (the first 4) mov r10, rcx ; FileHandle xor edx, edx ; Event xor r8d, r8d ; ApcRoutine xor r9d, r9d ; ApcContext ; Call NtWriteFile() mov eax, NtWriteFile syscall add rsp, 0x50 ; Restore parameters pop r8 pop rdx pop rcx ; Check if we had a failure test eax, eax jnz .failure ; Write was successful, check for a partial write cmp r8, qword [rbp + wf_locals.iosb + 8] jne error .failure: add rsp, wf_locals_size pop rbp ret ; rcx -> 64-bit unsigned integer ; rdi -> 40-byte output buffer to receive a '0'-padded decimal string version ; of `rcx` in UTF-16 format itoa_utf16: push rax push rbx push rcx push rdx push rdi push r8 ; Save the original buffer pointer mov rbx, rdi ; Point the output buffer to the end of the buffer to hold the string add rdi, 19 * 2 ; Load a divisor in r8 mov r8, 10 ; Move the value to print into rax to be used by divides mov rax, rcx .lewp: ; Divide the number to print by 10, and get the remainder as the digit to ; print xor edx, edx ; Zero the high part of the input for the divide div r8 ; Convert the 0-9 values in `edx` to a character digit add edx, '0' mov word [rdi], dx ; Break out of the loop once we've updated the final digit cmp rdi, rbx je .done ; Decrement the buffer pointer to point to the next digit sub rdi, 2 jmp .lewp .done: pop r8 pop rdi pop rdx pop rcx pop rbx pop rax ret align 2 memory_info: dw __utf16__('\??\C:\snaps\falkdump_pid_') memory_info_pid: dw __utf16__('00000000000000000000_tid_') memory_info_tid: dw __utf16__('00000000000000000000.info') memory_info_len: equ ($ - memory_info) align 2 memory: dw __utf16__('\??\C:\snaps\falkdump_pid_') memory_pid: dw __utf16__('00000000000000000000_tid_') memory_tid: dw __utf16__('00000000000000000000.memory') memory_len: equ ($ - memory) times 2048-($-$$) db 0
; A230631: a(n) = n + (sum of digits in base-4 representation of n). ; 0,2,4,6,5,7,9,11,10,12,14,16,15,17,19,21,17,19,21,23,22,24,26,28,27,29,31,33,32,34,36,38,34,36,38,40,39,41,43,45,44,46,48,50,49,51,53,55,51,53,55,57,56,58,60,62,61,63,65,67,66,68,70,72,65,67,69,71,70,72,74,76,75,77,79,81,80,82,84,86,82,84,86,88,87,89,91,93,92,94,96,98,97,99,101,103,99,101,103,105,104,106,108,110,109,111,113,115,114,116,118,120,116,118,120,122,121,123,125,127,126,128,130,132,131,133,135,137,130,132,134,136,135,137,139,141,140,142,144,146,145,147,149,151,147,149,151,153,152,154,156,158,157,159,161,163,162,164,166,168,164,166,168,170,169,171,173,175,174,176,178,180,179,181,183,185,181,183,185,187,186,188,190,192,191,193,195,197,196,198,200,202,195,197,199,201,200,202,204,206,205,207,209,211,210,212,214,216,212,214,216,218,217,219,221,223,222,224,226,228,227,229,231,233,229,231,233,235,234,236,238,240,239,241,243,245,244,246,248,250,246,248,250,252,251,253,255,257,256,258 mov $2,$0 mov $4,$0 sub $0,1 lpb $0 mov $3,3 div $4,4 mul $3,$4 sub $0,$3 lpe mov $1,$0 add $1,1 add $1,$2
#include "class_0.h" #include "class_1.h" #include "class_2.h" #include "class_4.h" #include "class_6.h" #include "class_8.h" #include <lib_5/class_1.h> #include <lib_8/class_9.h> #include <lib_17/class_0.h> #include <lib_15/class_7.h> #include <lib_46/class_3.h> class_0::class_0() {} class_0::~class_0() {}
// Illustrates how inline assembler use internal labels and external references // Commodore 64 PRG executable file .file [name="inline-asm-label.prg", type="prg", segments="Program"] .segmentdef Program [segments="Basic, Code, Data"] .segmentdef Basic [start=$0801] .segmentdef Code [start=$80d] .segmentdef Data [startAfter="Code"] .segment Basic :BasicUpstart(main) .label SCREEN = $400 .segment Code main: { // asm ldx #0 nxt: lda table,x sta SCREEN+1,x inx cpx #4 bne nxt // } rts } .segment Data table: .text "cml!" .byte 0
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <tencentcloud/drm/v20181115/model/DescribeAllKeysResponse.h> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> using TencentCloud::CoreInternalOutcome; using namespace TencentCloud::Drm::V20181115::Model; using namespace rapidjson; using namespace std; DescribeAllKeysResponse::DescribeAllKeysResponse() : m_keysHasBeenSet(false), m_sessionKeyHasBeenSet(false), m_contentIdHasBeenSet(false) { } CoreInternalOutcome DescribeAllKeysResponse::Deserialize(const string &payload) { Document d; d.Parse(payload.c_str()); if (d.HasParseError() || !d.IsObject()) { return CoreInternalOutcome(Error("response not json format")); } if (!d.HasMember("Response") || !d["Response"].IsObject()) { return CoreInternalOutcome(Error("response `Response` is null or not object")); } Value &rsp = d["Response"]; if (!rsp.HasMember("RequestId") || !rsp["RequestId"].IsString()) { return CoreInternalOutcome(Error("response `Response.RequestId` is null or not string")); } string requestId(rsp["RequestId"].GetString()); SetRequestId(requestId); if (rsp.HasMember("Error")) { if (!rsp["Error"].IsObject() || !rsp["Error"].HasMember("Code") || !rsp["Error"]["Code"].IsString() || !rsp["Error"].HasMember("Message") || !rsp["Error"]["Message"].IsString()) { return CoreInternalOutcome(Error("response `Response.Error` format error").SetRequestId(requestId)); } string errorCode(rsp["Error"]["Code"].GetString()); string errorMsg(rsp["Error"]["Message"].GetString()); return CoreInternalOutcome(Error(errorCode, errorMsg).SetRequestId(requestId)); } if (rsp.HasMember("Keys") && !rsp["Keys"].IsNull()) { if (!rsp["Keys"].IsArray()) return CoreInternalOutcome(Error("response `Keys` is not array type")); const Value &tmpValue = rsp["Keys"]; for (Value::ConstValueIterator itr = tmpValue.Begin(); itr != tmpValue.End(); ++itr) { Key item; CoreInternalOutcome outcome = item.Deserialize(*itr); if (!outcome.IsSuccess()) { outcome.GetError().SetRequestId(requestId); return outcome; } m_keys.push_back(item); } m_keysHasBeenSet = true; } if (rsp.HasMember("SessionKey") && !rsp["SessionKey"].IsNull()) { if (!rsp["SessionKey"].IsString()) { return CoreInternalOutcome(Error("response `SessionKey` IsString=false incorrectly").SetRequestId(requestId)); } m_sessionKey = string(rsp["SessionKey"].GetString()); m_sessionKeyHasBeenSet = true; } if (rsp.HasMember("ContentId") && !rsp["ContentId"].IsNull()) { if (!rsp["ContentId"].IsString()) { return CoreInternalOutcome(Error("response `ContentId` IsString=false incorrectly").SetRequestId(requestId)); } m_contentId = string(rsp["ContentId"].GetString()); m_contentIdHasBeenSet = true; } return CoreInternalOutcome(true); } vector<Key> DescribeAllKeysResponse::GetKeys() const { return m_keys; } bool DescribeAllKeysResponse::KeysHasBeenSet() const { return m_keysHasBeenSet; } string DescribeAllKeysResponse::GetSessionKey() const { return m_sessionKey; } bool DescribeAllKeysResponse::SessionKeyHasBeenSet() const { return m_sessionKeyHasBeenSet; } string DescribeAllKeysResponse::GetContentId() const { return m_contentId; } bool DescribeAllKeysResponse::ContentIdHasBeenSet() const { return m_contentIdHasBeenSet; }
; A285201: Stage at which Ken Knowlton's elevator (version 1) reaches floor n for the first time. ; 1,2,5,14,45,174,825,4738,32137,251338,2224157,21952358,238962581,2843085270,36696680241,510647009850,7619901954001,121367981060434,2055085325869813,36861997532438654,698193329457246653,13924819967953406654,291683979376372766697,6402385486361598687666,146948520147021794869977,3520055752002866503245466,87847736548398984212632717,2280367437254698044656701270,61478399356324772676646552229,1719023293090286862372362379110,49787825211375187463548121358689,1491851882759922205498820890746090 lpb $0 sub $0,1 sub $1,1 add $2,2 add $1,$2 mul $2,$0 lpe mov $0,$1 add $0,1
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.h" #include <algorithm> #include <vector> #include "ash/shell.h" #include "ash/test/ash_test_base.h" #include "chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.h" #include "ui/display/display.h" #include "ui/display/manager/display_manager.h" #include "ui/events/base_event_utils.h" #include "ui/events/event_handler.h" #include "ui/events/test/event_generator.h" #include "ui/events/test/events_test_utils.h" using namespace display; namespace chromeos { class TouchCalibratorControllerTest : public ash::test::AshTestBase { public: TouchCalibratorControllerTest() {} const Display& InitDisplays() { // Initialize 2 displays each with resolution 500x500. UpdateDisplay("500x500,500x500"); // Assuming index 0 points to the native display, we will calibrate the // touch display at index 1. const int kTargetDisplayIndex = 1; DisplayIdList display_id_list = display_manager()->GetCurrentDisplayIdList(); int64_t target_display_id = display_id_list[kTargetDisplayIndex]; const Display& touch_display = display_manager()->GetDisplayForId(target_display_id); return touch_display; } void StartCalibrationChecks(TouchCalibratorController* ctrl, const Display& target_display) { EXPECT_FALSE(ctrl->is_calibrating()); EXPECT_FALSE(!!ctrl->touch_calibrator_views_.size()); ctrl->StartCalibration(target_display); EXPECT_TRUE(ctrl->is_calibrating()); // There should be a touch calibrator view associated with each of the // active displays. EXPECT_EQ(ctrl->touch_calibrator_views_.size(), display_manager()->GetCurrentDisplayIdList().size()); TouchCalibratorView* target_calibrator_view = ctrl->touch_calibrator_views_[target_display.id()].get(); // End the background fade in animation. target_calibrator_view->SkipCurrentAnimation(); // TouchCalibratorView on the display being calibrated should be at the // state where the first display point is visible. EXPECT_EQ(target_calibrator_view->state(), TouchCalibratorView::DISPLAY_POINT_1); } private: DISALLOW_COPY_AND_ASSIGN(TouchCalibratorControllerTest); }; TEST_F(TouchCalibratorControllerTest, StartCalibration) { const Display& touch_display = InitDisplays(); TouchCalibratorController touch_calibrator_controller; StartCalibrationChecks(&touch_calibrator_controller, touch_display); ui::EventTargetTestApi test_api(ash::Shell::GetInstance()); const ui::EventHandlerList& handlers = test_api.pre_target_handlers(); ui::EventHandlerList::const_iterator event_target = std::find(handlers.begin(), handlers.end(), &touch_calibrator_controller); EXPECT_NE(event_target, handlers.end()); } TEST_F(TouchCalibratorControllerTest, KeyEventIntercept) { const Display& touch_display = InitDisplays(); TouchCalibratorController touch_calibrator_controller; StartCalibrationChecks(&touch_calibrator_controller, touch_display); ui::test::EventGenerator& eg = GetEventGenerator(); EXPECT_TRUE(touch_calibrator_controller.is_calibrating()); eg.PressKey(ui::VKEY_ESCAPE, ui::EF_NONE); EXPECT_FALSE(touch_calibrator_controller.is_calibrating()); } TEST_F(TouchCalibratorControllerTest, TouchThreshold) { const Display& touch_display = InitDisplays(); TouchCalibratorController touch_calibrator_controller; StartCalibrationChecks(&touch_calibrator_controller, touch_display); ui::test::EventGenerator& eg = GetEventGenerator(); base::Time current_timestamp = base::Time::Now(); touch_calibrator_controller.last_touch_timestamp_ = current_timestamp; eg.set_current_location(gfx::Point(0, 0)); eg.PressTouch(); eg.ReleaseTouch(); EXPECT_EQ(touch_calibrator_controller.last_touch_timestamp_, current_timestamp); current_timestamp = base::Time::Now(); touch_calibrator_controller.last_touch_timestamp_ = current_timestamp - (TouchCalibratorController::kTouchIntervalThreshold); eg.PressTouch(); eg.ReleaseTouch(); EXPECT_LT(current_timestamp, touch_calibrator_controller.last_touch_timestamp_); } } // namespace chromeos
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r13 push %r8 push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x796d, %rsi lea addresses_A_ht+0xdced, %rdi sub $16877, %r11 mov $67, %rcx rep movsb and %rdx, %rdx lea addresses_normal_ht+0x16ed, %rsi lea addresses_normal_ht+0x12ed, %rdi clflush (%rsi) nop nop nop nop nop xor %r8, %r8 mov $102, %rcx rep movsq nop nop xor %rsi, %rsi lea addresses_normal_ht+0x1c9ad, %rsi lea addresses_A_ht+0xbeed, %rdi clflush (%rdi) nop nop nop nop nop dec %r12 mov $25, %rcx rep movsw sub %rsi, %rsi lea addresses_normal_ht+0x6e1d, %rdx nop and $24989, %r12 mov $0x6162636465666768, %rsi movq %rsi, %xmm6 vmovups %ymm6, (%rdx) and $18221, %r12 lea addresses_A_ht+0x1680d, %rcx nop nop inc %r8 mov (%rcx), %dx nop nop and %r8, %r8 lea addresses_WT_ht+0x19eed, %rsi clflush (%rsi) nop nop xor $54023, %rdx mov (%rsi), %r12 nop cmp $21959, %rsi lea addresses_WT_ht+0x194ed, %r12 nop nop nop nop nop add $58678, %rcx mov $0x6162636465666768, %r8 movq %r8, %xmm0 movups %xmm0, (%r12) nop nop nop sub %rcx, %rcx lea addresses_normal_ht+0x13a55, %rdx nop nop nop nop and $7746, %rcx mov (%rdx), %r11 nop nop inc %rdx lea addresses_WT_ht+0x80ed, %rdi nop nop nop nop lfence movb $0x61, (%rdi) nop nop xor $3208, %rsi lea addresses_D_ht+0x1d2bd, %rsi lea addresses_normal_ht+0xbaed, %rdi add $56701, %r13 mov $62, %rcx rep movsb nop nop xor $61558, %rdx lea addresses_WC_ht+0x189ad, %rcx nop nop nop nop add $10029, %r8 vmovups (%rcx), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $0, %xmm1, %rdx nop nop nop nop sub $26334, %rcx lea addresses_WT_ht+0x44ed, %rsi lea addresses_WT_ht+0x3aed, %rdi nop and %r8, %r8 mov $34, %rcx rep movsl nop cmp %rdx, %rdx lea addresses_UC_ht+0x51cf, %rsi lea addresses_WC_ht+0x1c20f, %rdi nop nop nop nop nop cmp %r12, %r12 mov $37, %rcx rep movsw nop nop nop xor $63765, %r12 lea addresses_D_ht+0xa7cd, %rsi nop nop nop nop cmp $9862, %rdi movb $0x61, (%rsi) nop and $54062, %r13 lea addresses_WC_ht+0x13f80, %r13 inc %r11 movups (%r13), %xmm5 vpextrq $0, %xmm5, %r8 nop nop nop nop add $16557, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %rbx push %rdx push %rsi // Faulty Load lea addresses_WC+0xe6ed, %rsi add $11480, %rdx movups (%rsi), %xmm0 vpextrq $1, %xmm0, %r13 lea oracles, %rdx and $0xff, %r13 shlq $12, %r13 mov (%rdx,%r13,1), %r13 pop %rsi pop %rdx pop %rbx pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_WC', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}} {'src': {'same': False, 'congruent': 10, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_normal_ht'}} {'src': {'same': False, 'congruent': 5, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}} {'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 7, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16}} {'src': {'NT': True, 'same': False, 'congruent': 3, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}} {'src': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'same': True, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}} {'src': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_D_ht', 'AVXalign': True, 'size': 1}} {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'44': 1235, '48': 626, '49': 9631, '08': 2, '00': 9365, '46': 964, '3f': 4, 'ff': 2} 49 48 49 00 00 49 49 48 00 00 49 49 00 00 49 49 49 00 00 00 49 49 00 00 49 49 49 49 44 00 49 49 46 00 00 49 46 00 00 00 00 00 49 00 00 00 49 49 49 00 00 3f 00 00 49 49 49 48 00 49 44 00 49 49 00 00 49 49 00 00 00 49 48 00 00 49 49 49 44 49 49 46 00 00 49 49 48 00 00 49 44 49 49 00 00 00 49 49 49 00 00 49 49 00 00 00 00 49 46 00 00 00 00 49 49 49 48 00 00 00 49 00 00 00 00 49 48 00 49 49 00 00 49 49 49 44 00 49 00 00 49 49 00 00 49 49 00 49 49 49 46 00 49 49 00 00 49 49 49 44 00 00 49 44 00 48 49 44 00 49 49 49 44 00 49 00 49 49 00 00 00 00 49 49 49 49 49 49 00 00 49 00 00 00 49 49 49 48 00 00 49 49 00 00 00 00 49 00 00 00 49 49 48 49 44 00 00 49 44 00 00 49 49 00 49 49 49 44 49 49 49 00 00 49 49 49 49 46 00 00 49 00 49 49 00 49 49 00 49 49 00 00 49 48 49 49 00 49 46 44 00 00 49 49 00 49 00 00 49 44 00 00 49 49 00 00 49 49 44 00 49 49 49 48 00 00 49 49 49 49 49 00 00 49 49 49 44 00 49 49 44 00 49 49 46 00 00 49 49 00 49 49 46 00 00 49 49 00 00 00 00 49 49 49 00 49 49 44 00 00 00 49 00 00 00 49 49 00 00 00 00 49 49 44 49 49 46 00 49 49 46 00 00 49 49 49 44 49 49 00 00 00 00 49 49 00 00 00 49 00 00 49 49 00 49 49 44 00 00 49 49 00 00 00 00 00 49 46 00 00 49 46 00 00 00 00 00 49 46 00 00 49 49 44 00 49 46 00 00 00 00 49 49 49 44 00 00 49 49 00 00 00 00 49 49 00 00 00 49 49 00 00 00 00 00 49 49 00 00 00 49 49 00 49 48 49 00 49 49 49 44 00 00 49 48 00 00 49 46 00 49 48 00 49 49 49 48 00 00 49 49 00 00 00 49 49 00 00 49 44 00 00 49 49 44 49 49 49 44 49 49 49 44 00 49 49 49 46 00 00 49 00 00 49 49 44 00 49 00 00 49 44 00 48 49 49 00 00 49 49 00 00 49 48 49 00 00 00 00 49 49 49 00 00 00 00 49 44 49 49 49 49 49 00 49 49 44 00 00 49 49 00 49 49 00 00 49 49 49 46 00 49 49 44 00 49 49 48 49 49 48 00 00 49 49 44 00 00 49 49 48 00 49 00 00 49 46 48 49 49 44 00 00 00 49 49 44 00 49 49 00 00 00 49 49 00 00 00 49 49 44 49 49 00 00 49 49 49 00 00 00 00 49 49 49 44 00 00 49 49 49 00 49 46 00 00 00 00 49 49 44 00 49 49 00 00 49 44 00 49 49 46 00 49 49 00 00 49 49 44 00 49 49 44 44 00 00 49 49 00 00 49 46 00 49 48 00 00 49 49 00 00 00 49 46 00 00 00 49 49 00 00 49 49 46 49 49 49 49 00 49 49 46 00 49 49 00 00 49 44 49 49 00 00 49 49 49 00 00 00 49 49 00 00 00 00 49 49 00 49 49 00 00 49 49 00 00 49 49 00 00 49 49 49 00 00 49 49 00 00 49 00 49 49 49 49 00 00 49 49 49 49 00 00 48 49 49 00 00 00 49 49 49 00 00 49 49 49 00 00 49 49 44 00 49 44 00 00 00 00 49 49 00 49 49 49 46 00 00 49 49 49 46 48 00 49 49 00 49 49 49 44 00 00 49 46 00 49 49 00 00 00 49 44 00 00 49 46 49 49 00 00 49 49 49 00 00 49 49 00 00 49 49 00 00 00 49 46 48 00 00 00 49 49 00 00 49 00 49 46 00 00 49 49 49 44 00 00 49 49 00 00 49 49 00 00 49 49 49 00 49 49 46 00 00 49 49 46 00 49 49 49 00 00 00 49 00 00 00 00 49 49 49 44 00 00 49 49 49 44 00 00 49 49 49 00 00 00 49 49 44 00 00 49 49 00 49 49 49 49 00 00 00 00 49 49 49 00 00 00 49 46 00 49 49 49 00 00 00 49 00 49 49 00 49 49 49 49 00 00 49 49 00 00 00 49 00 00 00 49 49 00 00 00 00 49 49 49 48 00 00 00 49 49 49 46 00 00 49 00 00 49 00 00 49 49 00 00 49 49 */
int main() { return 0;$ }
INCLUDE "graphics/grafix.inc" SECTION code_clib PUBLIC setxy EXTERN __gfx_coords ; ; $Id: setxy.asm,v 1.7 2016-07-02 09:01:35 dom Exp $ ; ; ****************************************************************** ; ; Move current pixel coordinate to (x0,y0). Only legal coordinates ; are accepted. ; ; Design & programming by Gunther Strube, Copyright (C) InterLogic 1995 ; ; X-range is always legal (0-255). Y-range must be 0 - 63. ; ; in: hl = (x,y) coordinate ; ; registers changed after return: ; ..bcdehl/ixiy same ; af....../.... different ; .setxy IF maxx <> 256 ld a,h cp maxx ret nc ENDIF ld a,l cp maxy ret nc ; out of range... ld (__gfx_coords),hl ret
// (C) Copyright Gennadiy Rozental 2001-2014. // 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/test for the library home page. // // *************************************************************************** #define BOOST_TEST_NO_MAIN #define BOOST_TEST_ALTERNATIVE_INIT_API #include <boost/test/included/unit_test.hpp> using namespace boost::unit_test; //____________________________________________________________________________// BOOST_AUTO_TEST_SUITE( test_suite_1 ) BOOST_AUTO_TEST_CASE( test_case_1 ) { BOOST_TEST_MESSAGE( "Testing is in progress" ); BOOST_TEST( false ); } BOOST_AUTO_TEST_SUITE_END() //____________________________________________________________________________// bool init_function() { // do your own initialization here // if it successful return true // But, you CAN'T use testing tools here return true; } //____________________________________________________________________________// int main( int argc, char* argv[] ) { return ::boost::unit_test::unit_test_main( &init_function, argc, argv ); } //____________________________________________________________________________//
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <txdb.h> #include <chainparams.h> #include <hash.h> #include <random.h> #include <pow.h> #include <uint256.h> #include <util.h> #include <ui_interface.h> #include <init.h> #include <stdint.h> #include <boost/thread.hpp> static const char DB_COIN = 'C'; static const char DB_COINS = 'c'; static const char DB_BLOCK_FILES = 'f'; static const char DB_TXINDEX = 't'; static const char DB_BLOCK_INDEX = 'b'; static const char DB_BEST_BLOCK = 'B'; static const char DB_HEAD_BLOCKS = 'H'; static const char DB_FLAG = 'F'; static const char DB_REINDEX_FLAG = 'R'; static const char DB_LAST_BLOCK = 'l'; namespace { struct CoinEntry { COutPoint* outpoint; char key; explicit CoinEntry(const COutPoint* ptr) : outpoint(const_cast<COutPoint*>(ptr)), key(DB_COIN) {} template<typename Stream> void Serialize(Stream &s) const { s << key; s << outpoint->hash; s << VARINT(outpoint->n); } template<typename Stream> void Unserialize(Stream& s) { s >> key; s >> outpoint->hash; s >> VARINT(outpoint->n); } }; } CCoinsViewDB::CCoinsViewDB(size_t nCacheSize, bool fMemory, bool fWipe) : db(GetDataDir() / "chainstate", nCacheSize, fMemory, fWipe, true) { } bool CCoinsViewDB::GetCoin(const COutPoint &outpoint, Coin &coin) const { return db.Read(CoinEntry(&outpoint), coin); } bool CCoinsViewDB::HaveCoin(const COutPoint &outpoint) const { return db.Exists(CoinEntry(&outpoint)); } uint256 CCoinsViewDB::GetBestBlock() const { uint256 hashBestChain; if (!db.Read(DB_BEST_BLOCK, hashBestChain)) return uint256(); return hashBestChain; } std::vector<uint256> CCoinsViewDB::GetHeadBlocks() const { std::vector<uint256> vhashHeadBlocks; if (!db.Read(DB_HEAD_BLOCKS, vhashHeadBlocks)) { return std::vector<uint256>(); } return vhashHeadBlocks; } bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { CDBBatch batch(db); size_t count = 0; size_t changed = 0; size_t batch_size = (size_t)gArgs.GetArg("-dbbatchsize", nDefaultDbBatchSize); int crash_simulate = gArgs.GetArg("-dbcrashratio", 0); assert(!hashBlock.IsNull()); uint256 old_tip = GetBestBlock(); if (old_tip.IsNull()) { // We may be in the middle of replaying. std::vector<uint256> old_heads = GetHeadBlocks(); if (old_heads.size() == 2) { assert(old_heads[0] == hashBlock); old_tip = old_heads[1]; } } // In the first batch, mark the database as being in the middle of a // transition from old_tip to hashBlock. // A vector is used for future extensibility, as we may want to support // interrupting after partial writes from multiple independent reorgs. batch.Erase(DB_BEST_BLOCK); batch.Write(DB_HEAD_BLOCKS, std::vector<uint256>{hashBlock, old_tip}); for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end();) { if (it->second.flags & CCoinsCacheEntry::DIRTY) { CoinEntry entry(&it->first); if (it->second.coin.IsSpent()) batch.Erase(entry); else batch.Write(entry, it->second.coin); changed++; } count++; CCoinsMap::iterator itOld = it++; mapCoins.erase(itOld); if (batch.SizeEstimate() > batch_size) { LogPrint(BCLog::COINDB, "Writing partial batch of %.2f MiB\n", batch.SizeEstimate() * (1.0 / 1048576.0)); db.WriteBatch(batch); batch.Clear(); if (crash_simulate) { static FastRandomContext rng; if (rng.randrange(crash_simulate) == 0) { LogPrintf("Simulating a crash. Goodbye.\n"); _Exit(0); } } } } // In the last batch, mark the database as consistent with hashBlock again. batch.Erase(DB_HEAD_BLOCKS); batch.Write(DB_BEST_BLOCK, hashBlock); LogPrint(BCLog::COINDB, "Writing final batch of %.2f MiB\n", batch.SizeEstimate() * (1.0 / 1048576.0)); bool ret = db.WriteBatch(batch); LogPrint(BCLog::COINDB, "Committed %u changed transaction outputs (out of %u) to coin database...\n", (unsigned int)changed, (unsigned int)count); return ret; } size_t CCoinsViewDB::EstimateSize() const { return db.EstimateSize(DB_COIN, (char)(DB_COIN+1)); } CBlockTreeDB::CBlockTreeDB(size_t nCacheSize, bool fMemory, bool fWipe) : CDBWrapper(GetDataDir() / "blocks" / "index", nCacheSize, fMemory, fWipe) { } bool CBlockTreeDB::ReadBlockFileInfo(int nFile, CBlockFileInfo &info) { return Read(std::make_pair(DB_BLOCK_FILES, nFile), info); } bool CBlockTreeDB::WriteReindexing(bool fReindexing) { if (fReindexing) return Write(DB_REINDEX_FLAG, '1'); else return Erase(DB_REINDEX_FLAG); } bool CBlockTreeDB::ReadReindexing(bool &fReindexing) { fReindexing = Exists(DB_REINDEX_FLAG); return true; } bool CBlockTreeDB::ReadLastBlockFile(int &nFile) { return Read(DB_LAST_BLOCK, nFile); } CCoinsViewCursor *CCoinsViewDB::Cursor() const { CCoinsViewDBCursor *i = new CCoinsViewDBCursor(const_cast<CDBWrapper&>(db).NewIterator(), GetBestBlock()); /* It seems that there are no "const iterators" for LevelDB. Since we only need read operations on it, use a const-cast to get around that restriction. */ i->pcursor->Seek(DB_COIN); // Cache key of first record if (i->pcursor->Valid()) { CoinEntry entry(&i->keyTmp.second); i->pcursor->GetKey(entry); i->keyTmp.first = entry.key; } else { i->keyTmp.first = 0; // Make sure Valid() and GetKey() return false } return i; } bool CCoinsViewDBCursor::GetKey(COutPoint &key) const { // Return cached key if (keyTmp.first == DB_COIN) { key = keyTmp.second; return true; } return false; } bool CCoinsViewDBCursor::GetValue(Coin &coin) const { return pcursor->GetValue(coin); } unsigned int CCoinsViewDBCursor::GetValueSize() const { return pcursor->GetValueSize(); } bool CCoinsViewDBCursor::Valid() const { return keyTmp.first == DB_COIN; } void CCoinsViewDBCursor::Next() { pcursor->Next(); CoinEntry entry(&keyTmp.second); if (!pcursor->Valid() || !pcursor->GetKey(entry)) { keyTmp.first = 0; // Invalidate cached key after last record so that Valid() and GetKey() return false } else { keyTmp.first = entry.key; } } bool CBlockTreeDB::WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*> >& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo) { CDBBatch batch(*this); for (std::vector<std::pair<int, const CBlockFileInfo*> >::const_iterator it=fileInfo.begin(); it != fileInfo.end(); it++) { batch.Write(std::make_pair(DB_BLOCK_FILES, it->first), *it->second); } batch.Write(DB_LAST_BLOCK, nLastFile); for (std::vector<const CBlockIndex*>::const_iterator it=blockinfo.begin(); it != blockinfo.end(); it++) { batch.Write(std::make_pair(DB_BLOCK_INDEX, (*it)->GetBlockHash()), CDiskBlockIndex(*it)); } return WriteBatch(batch, true); } bool CBlockTreeDB::ReadTxIndex(const uint256 &txid, CDiskTxPos &pos) { return Read(std::make_pair(DB_TXINDEX, txid), pos); } bool CBlockTreeDB::WriteTxIndex(const std::vector<std::pair<uint256, CDiskTxPos> >&vect) { CDBBatch batch(*this); for (std::vector<std::pair<uint256,CDiskTxPos> >::const_iterator it=vect.begin(); it!=vect.end(); it++) batch.Write(std::make_pair(DB_TXINDEX, it->first), it->second); return WriteBatch(batch); } bool CBlockTreeDB::WriteFlag(const std::string &name, bool fValue) { return Write(std::make_pair(DB_FLAG, name), fValue ? '1' : '0'); } bool CBlockTreeDB::ReadFlag(const std::string &name, bool &fValue) { char ch; if (!Read(std::make_pair(DB_FLAG, name), ch)) return false; fValue = ch == '1'; return true; } bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams, std::function<CBlockIndex*(const uint256&)> insertBlockIndex) { std::unique_ptr<CDBIterator> pcursor(NewIterator()); pcursor->Seek(std::make_pair(DB_BLOCK_INDEX, uint256())); // Load mapBlockIndex while (pcursor->Valid()) { boost::this_thread::interruption_point(); std::pair<char, uint256> key; if (pcursor->GetKey(key) && key.first == DB_BLOCK_INDEX) { CDiskBlockIndex diskindex; if (pcursor->GetValue(diskindex)) { // Construct block index object CBlockIndex* pindexNew = insertBlockIndex(diskindex.GetBlockHash()); pindexNew->pprev = insertBlockIndex(diskindex.hashPrev); pindexNew->nHeight = diskindex.nHeight; pindexNew->nFile = diskindex.nFile; pindexNew->nDataPos = diskindex.nDataPos; pindexNew->nUndoPos = diskindex.nUndoPos; pindexNew->nVersion = diskindex.nVersion; pindexNew->hashMerkleRoot = diskindex.hashMerkleRoot; pindexNew->nTime = diskindex.nTime; pindexNew->nBits = diskindex.nBits; pindexNew->nNonce = diskindex.nNonce; pindexNew->nStatus = diskindex.nStatus; pindexNew->nTx = diskindex.nTx; // UnelmaCoin: Disable PoW Sanity check while loading block index from disk. // We use the sha256 hash for the block index for performance reasons, which is recorded for later use. // CheckProofOfWork() uses the scrypt hash which is discarded after a block is accepted. // While it is technically feasible to verify the PoW, doing so takes several minutes as it // requires recomputing every PoW hash during every UnelmaCoin startup. // We opt instead to simply trust the data that is on your local disk. //if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits, consensusParams)) // return error("%s: CheckProofOfWork failed: %s", __func__, pindexNew->ToString()); pcursor->Next(); } else { return error("%s: failed to read value", __func__); } } else { break; } } return true; } namespace { //! Legacy class to deserialize pre-pertxout database entries without reindex. class CCoins { public: //! whether transaction is a coinbase bool fCoinBase; //! unspent transaction outputs; spent outputs are .IsNull(); spent outputs at the end of the array are dropped std::vector<CTxOut> vout; //! at which height this transaction was included in the active block chain int nHeight; //! empty constructor CCoins() : fCoinBase(false), vout(0), nHeight(0) { } template<typename Stream> void Unserialize(Stream &s) { unsigned int nCode = 0; // version int nVersionDummy; ::Unserialize(s, VARINT(nVersionDummy)); // header code ::Unserialize(s, VARINT(nCode)); fCoinBase = nCode & 1; std::vector<bool> vAvail(2, false); vAvail[0] = (nCode & 2) != 0; vAvail[1] = (nCode & 4) != 0; unsigned int nMaskCode = (nCode / 8) + ((nCode & 6) != 0 ? 0 : 1); // spentness bitmask while (nMaskCode > 0) { unsigned char chAvail = 0; ::Unserialize(s, chAvail); for (unsigned int p = 0; p < 8; p++) { bool f = (chAvail & (1 << p)) != 0; vAvail.push_back(f); } if (chAvail != 0) nMaskCode--; } // txouts themself vout.assign(vAvail.size(), CTxOut()); for (unsigned int i = 0; i < vAvail.size(); i++) { if (vAvail[i]) ::Unserialize(s, REF(CTxOutCompressor(vout[i]))); } // coinbase height ::Unserialize(s, VARINT(nHeight)); } }; } /** Upgrade the database from older formats. * * Currently implemented: from the per-tx utxo model (0.8..0.14.x) to per-txout. */ bool CCoinsViewDB::Upgrade() { std::unique_ptr<CDBIterator> pcursor(db.NewIterator()); pcursor->Seek(std::make_pair(DB_COINS, uint256())); if (!pcursor->Valid()) { return true; } int64_t count = 0; LogPrintf("Upgrading utxo-set database...\n"); LogPrintf("[0%%]..."); uiInterface.ShowProgress(_("Upgrading UTXO database"), 0, true); size_t batch_size = 1 << 24; CDBBatch batch(db); int reportDone = 0; std::pair<unsigned char, uint256> key; std::pair<unsigned char, uint256> prev_key = {DB_COINS, uint256()}; while (pcursor->Valid()) { boost::this_thread::interruption_point(); if (ShutdownRequested()) { break; } if (pcursor->GetKey(key) && key.first == DB_COINS) { if (count++ % 256 == 0) { uint32_t high = 0x100 * *key.second.begin() + *(key.second.begin() + 1); int percentageDone = (int)(high * 100.0 / 65536.0 + 0.5); uiInterface.ShowProgress(_("Upgrading UTXO database"), percentageDone, true); if (reportDone < percentageDone/10) { // report max. every 10% step LogPrintf("[%d%%]...", percentageDone); reportDone = percentageDone/10; } } CCoins old_coins; if (!pcursor->GetValue(old_coins)) { return error("%s: cannot parse CCoins record", __func__); } COutPoint outpoint(key.second, 0); for (size_t i = 0; i < old_coins.vout.size(); ++i) { if (!old_coins.vout[i].IsNull() && !old_coins.vout[i].scriptPubKey.IsUnspendable()) { Coin newcoin(std::move(old_coins.vout[i]), old_coins.nHeight, old_coins.fCoinBase); outpoint.n = i; CoinEntry entry(&outpoint); batch.Write(entry, newcoin); } } batch.Erase(key); if (batch.SizeEstimate() > batch_size) { db.WriteBatch(batch); batch.Clear(); db.CompactRange(prev_key, key); prev_key = key; } pcursor->Next(); } else { break; } } db.WriteBatch(batch); db.CompactRange({DB_COINS, uint256()}, key); uiInterface.ShowProgress("", 100, false); LogPrintf("[%s].\n", ShutdownRequested() ? "CANCELLED" : "DONE"); return !ShutdownRequested(); }
; A100155: Structured truncated octahedral numbers. ; 1,24,103,272,565,1016,1659,2528,3657,5080,6831,8944,11453,14392,17795,21696,26129,31128,36727,42960,49861,57464,65803,74912,84825,95576,107199,119728,133197,147640,163091,179584,197153,215832,235655,256656,278869,302328,327067,353120,380521,409304,439503,471152,504285,538936,575139,612928,652337,693400,736151,780624,826853,874872,924715,976416,1030009,1085528,1143007,1202480,1263981,1327544,1393203,1460992,1530945,1603096,1677479,1754128,1833077,1914360,1998011,2084064,2172553,2263512,2356975,2452976,2551549,2652728,2756547,2863040,2972241,3084184,3198903,3316432,3436805,3560056,3686219,3815328,3947417,4082520,4220671,4361904,4506253,4653752,4804435,4958336,5115489,5275928,5439687,5606800 mov $1,1 mov $2,$0 mul $2,2 mov $6,$0 lpb $2 add $1,1 add $1,$4 add $4,$2 sub $2,1 add $4,4 lpe mov $3,$6 mul $3,9 add $1,$3 mov $5,$6 mul $5,$6 mov $3,$5 mul $3,3 add $1,$3 mul $5,$6 mov $3,$5 mul $3,3 add $1,$3 mov $0,$1
_sh: file format elf32-i386 Disassembly of section .text: 00000000 <main>: return 0; } int main(void) { 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 04 sub $0x4,%esp static char buf[100]; int fd; // Ensure that three file descriptors are open. while((fd = open("console", O_RDWR)) >= 0){ 11: eb 0e jmp 21 <main+0x21> 13: 90 nop 14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(fd >= 3){ 18: 83 f8 02 cmp $0x2,%eax 1b: 0f 8f c3 00 00 00 jg e4 <main+0xe4> { static char buf[100]; int fd; // Ensure that three file descriptors are open. while((fd = open("console", O_RDWR)) >= 0){ 21: 83 ec 08 sub $0x8,%esp 24: 6a 02 push $0x2 26: 68 31 12 00 00 push $0x1231 2b: e8 32 0d 00 00 call d62 <open> 30: 83 c4 10 add $0x10,%esp 33: 85 c0 test %eax,%eax 35: 79 e1 jns 18 <main+0x18> 37: eb 2e jmp 67 <main+0x67> 39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi } } // Read and run input commands. while(getcmd(buf, sizeof(buf)) >= 0){ if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ 40: 80 3d 42 18 00 00 20 cmpb $0x20,0x1842 47: 74 5d je a6 <main+0xa6> 49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi int fork1(void) { int pid; pid = fork(); 50: e8 c5 0c 00 00 call d1a <fork> if(pid == -1) 55: 83 f8 ff cmp $0xffffffff,%eax 58: 74 3f je 99 <main+0x99> buf[strlen(buf)-1] = 0; // chop \n if(chdir(buf+3) < 0) printf(2, "cannot cd %s\n", buf+3); continue; } if(fork1() == 0) 5a: 85 c0 test %eax,%eax 5c: 0f 84 98 00 00 00 je fa <main+0xfa> runcmd(parsecmd(buf)); wait(); 62: e8 c3 0c 00 00 call d2a <wait> break; } } // Read and run input commands. while(getcmd(buf, sizeof(buf)) >= 0){ 67: 83 ec 08 sub $0x8,%esp 6a: 6a 64 push $0x64 6c: 68 40 18 00 00 push $0x1840 71: e8 9a 00 00 00 call 110 <getcmd> 76: 83 c4 10 add $0x10,%esp 79: 85 c0 test %eax,%eax 7b: 78 78 js f5 <main+0xf5> if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ 7d: 80 3d 40 18 00 00 63 cmpb $0x63,0x1840 84: 75 ca jne 50 <main+0x50> 86: 80 3d 41 18 00 00 64 cmpb $0x64,0x1841 8d: 74 b1 je 40 <main+0x40> int fork1(void) { int pid; pid = fork(); 8f: e8 86 0c 00 00 call d1a <fork> if(pid == -1) 94: 83 f8 ff cmp $0xffffffff,%eax 97: 75 c1 jne 5a <main+0x5a> panic("fork"); 99: 83 ec 0c sub $0xc,%esp 9c: 68 ba 11 00 00 push $0x11ba a1: e8 ba 00 00 00 call 160 <panic> // Read and run input commands. while(getcmd(buf, sizeof(buf)) >= 0){ if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ // Chdir must be called by the parent, not the child. buf[strlen(buf)-1] = 0; // chop \n a6: 83 ec 0c sub $0xc,%esp a9: 68 40 18 00 00 push $0x1840 ae: e8 ad 0a 00 00 call b60 <strlen> if(chdir(buf+3) < 0) b3: c7 04 24 43 18 00 00 movl $0x1843,(%esp) // Read and run input commands. while(getcmd(buf, sizeof(buf)) >= 0){ if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ // Chdir must be called by the parent, not the child. buf[strlen(buf)-1] = 0; // chop \n ba: c6 80 3f 18 00 00 00 movb $0x0,0x183f(%eax) if(chdir(buf+3) < 0) c1: e8 cc 0c 00 00 call d92 <chdir> c6: 83 c4 10 add $0x10,%esp c9: 85 c0 test %eax,%eax cb: 79 9a jns 67 <main+0x67> printf(2, "cannot cd %s\n", buf+3); cd: 50 push %eax ce: 68 43 18 00 00 push $0x1843 d3: 68 39 12 00 00 push $0x1239 d8: 6a 02 push $0x2 da: e8 91 0d 00 00 call e70 <printf> df: 83 c4 10 add $0x10,%esp e2: eb 83 jmp 67 <main+0x67> int fd; // Ensure that three file descriptors are open. while((fd = open("console", O_RDWR)) >= 0){ if(fd >= 3){ close(fd); e4: 83 ec 0c sub $0xc,%esp e7: 50 push %eax e8: e8 5d 0c 00 00 call d4a <close> break; ed: 83 c4 10 add $0x10,%esp f0: e9 72 ff ff ff jmp 67 <main+0x67> } if(fork1() == 0) runcmd(parsecmd(buf)); wait(); } exit(); f5: e8 28 0c 00 00 call d22 <exit> if(chdir(buf+3) < 0) printf(2, "cannot cd %s\n", buf+3); continue; } if(fork1() == 0) runcmd(parsecmd(buf)); fa: 83 ec 0c sub $0xc,%esp fd: 68 40 18 00 00 push $0x1840 102: e8 69 09 00 00 call a70 <parsecmd> 107: 89 04 24 mov %eax,(%esp) 10a: e8 71 00 00 00 call 180 <runcmd> 10f: 90 nop 00000110 <getcmd>: exit(); } int getcmd(char *buf, int nbuf) { 110: 55 push %ebp 111: 89 e5 mov %esp,%ebp 113: 56 push %esi 114: 53 push %ebx 115: 8b 75 0c mov 0xc(%ebp),%esi 118: 8b 5d 08 mov 0x8(%ebp),%ebx printf(2, "$ "); 11b: 83 ec 08 sub $0x8,%esp 11e: 68 90 11 00 00 push $0x1190 123: 6a 02 push $0x2 125: e8 46 0d 00 00 call e70 <printf> memset(buf, 0, nbuf); 12a: 83 c4 0c add $0xc,%esp 12d: 56 push %esi 12e: 6a 00 push $0x0 130: 53 push %ebx 131: e8 5a 0a 00 00 call b90 <memset> gets(buf, nbuf); 136: 58 pop %eax 137: 5a pop %edx 138: 56 push %esi 139: 53 push %ebx 13a: e8 b1 0a 00 00 call bf0 <gets> 13f: 83 c4 10 add $0x10,%esp 142: 31 c0 xor %eax,%eax 144: 80 3b 00 cmpb $0x0,(%ebx) 147: 0f 94 c0 sete %al if(buf[0] == 0) // EOF return -1; return 0; } 14a: 8d 65 f8 lea -0x8(%ebp),%esp 14d: f7 d8 neg %eax 14f: 5b pop %ebx 150: 5e pop %esi 151: 5d pop %ebp 152: c3 ret 153: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 159: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000160 <panic>: exit(); } void panic(char *s) { 160: 55 push %ebp 161: 89 e5 mov %esp,%ebp 163: 83 ec 0c sub $0xc,%esp printf(2, "%s\n", s); 166: ff 75 08 pushl 0x8(%ebp) 169: 68 2d 12 00 00 push $0x122d 16e: 6a 02 push $0x2 170: e8 fb 0c 00 00 call e70 <printf> exit(); 175: e8 a8 0b 00 00 call d22 <exit> 17a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 00000180 <runcmd>: struct cmd *parsecmd(char*); // Execute cmd. Never returns. void runcmd(struct cmd *cmd) { 180: 55 push %ebp 181: 89 e5 mov %esp,%ebp 183: 53 push %ebx 184: 83 ec 14 sub $0x14,%esp 187: 8b 5d 08 mov 0x8(%ebp),%ebx struct execcmd *ecmd; struct listcmd *lcmd; struct pipecmd *pcmd; struct redircmd *rcmd; if(cmd == 0) 18a: 85 db test %ebx,%ebx 18c: 74 76 je 204 <runcmd+0x84> exit(); switch(cmd->type){ 18e: 83 3b 05 cmpl $0x5,(%ebx) 191: 0f 87 f8 00 00 00 ja 28f <runcmd+0x10f> 197: 8b 03 mov (%ebx),%eax 199: ff 24 85 48 12 00 00 jmp *0x1248(,%eax,4) runcmd(lcmd->right); break; case PIPE: pcmd = (struct pipecmd*)cmd; if(pipe(p) < 0) 1a0: 8d 45 f0 lea -0x10(%ebp),%eax 1a3: 83 ec 0c sub $0xc,%esp 1a6: 50 push %eax 1a7: e8 86 0b 00 00 call d32 <pipe> 1ac: 83 c4 10 add $0x10,%esp 1af: 85 c0 test %eax,%eax 1b1: 0f 88 07 01 00 00 js 2be <runcmd+0x13e> int fork1(void) { int pid; pid = fork(); 1b7: e8 5e 0b 00 00 call d1a <fork> if(pid == -1) 1bc: 83 f8 ff cmp $0xffffffff,%eax 1bf: 0f 84 d7 00 00 00 je 29c <runcmd+0x11c> case PIPE: pcmd = (struct pipecmd*)cmd; if(pipe(p) < 0) panic("pipe"); if(fork1() == 0){ 1c5: 85 c0 test %eax,%eax 1c7: 0f 84 fe 00 00 00 je 2cb <runcmd+0x14b> int fork1(void) { int pid; pid = fork(); 1cd: e8 48 0b 00 00 call d1a <fork> if(pid == -1) 1d2: 83 f8 ff cmp $0xffffffff,%eax 1d5: 0f 84 c1 00 00 00 je 29c <runcmd+0x11c> dup(p[1]); close(p[0]); close(p[1]); runcmd(pcmd->left); } if(fork1() == 0){ 1db: 85 c0 test %eax,%eax 1dd: 0f 84 16 01 00 00 je 2f9 <runcmd+0x179> dup(p[0]); close(p[0]); close(p[1]); runcmd(pcmd->right); } close(p[0]); 1e3: 83 ec 0c sub $0xc,%esp 1e6: ff 75 f0 pushl -0x10(%ebp) 1e9: e8 5c 0b 00 00 call d4a <close> close(p[1]); 1ee: 58 pop %eax 1ef: ff 75 f4 pushl -0xc(%ebp) 1f2: e8 53 0b 00 00 call d4a <close> wait(); 1f7: e8 2e 0b 00 00 call d2a <wait> wait(); 1fc: e8 29 0b 00 00 call d2a <wait> break; 201: 83 c4 10 add $0x10,%esp struct listcmd *lcmd; struct pipecmd *pcmd; struct redircmd *rcmd; if(cmd == 0) exit(); 204: e8 19 0b 00 00 call d22 <exit> int fork1(void) { int pid; pid = fork(); 209: e8 0c 0b 00 00 call d1a <fork> if(pid == -1) 20e: 83 f8 ff cmp $0xffffffff,%eax 211: 0f 84 85 00 00 00 je 29c <runcmd+0x11c> wait(); break; case BACK: bcmd = (struct backcmd*)cmd; if(fork1() == 0) 217: 85 c0 test %eax,%eax 219: 75 e9 jne 204 <runcmd+0x84> 21b: eb 49 jmp 266 <runcmd+0xe6> default: panic("runcmd"); case EXEC: ecmd = (struct execcmd*)cmd; if(ecmd->argv[0] == 0) 21d: 8b 43 04 mov 0x4(%ebx),%eax 220: 85 c0 test %eax,%eax 222: 74 e0 je 204 <runcmd+0x84> exit(); exec(ecmd->argv[0], ecmd->argv); 224: 52 push %edx 225: 52 push %edx 226: 8d 53 04 lea 0x4(%ebx),%edx 229: 52 push %edx 22a: 50 push %eax 22b: e8 2a 0b 00 00 call d5a <exec> printf(2, "exec %s failed\n", ecmd->argv[0]); 230: 83 c4 0c add $0xc,%esp 233: ff 73 04 pushl 0x4(%ebx) 236: 68 9a 11 00 00 push $0x119a 23b: 6a 02 push $0x2 23d: e8 2e 0c 00 00 call e70 <printf> break; 242: 83 c4 10 add $0x10,%esp 245: eb bd jmp 204 <runcmd+0x84> case REDIR: rcmd = (struct redircmd*)cmd; close(rcmd->fd); 247: 83 ec 0c sub $0xc,%esp 24a: ff 73 14 pushl 0x14(%ebx) 24d: e8 f8 0a 00 00 call d4a <close> if(open(rcmd->file, rcmd->mode) < 0){ 252: 59 pop %ecx 253: 58 pop %eax 254: ff 73 10 pushl 0x10(%ebx) 257: ff 73 08 pushl 0x8(%ebx) 25a: e8 03 0b 00 00 call d62 <open> 25f: 83 c4 10 add $0x10,%esp 262: 85 c0 test %eax,%eax 264: 78 43 js 2a9 <runcmd+0x129> break; case BACK: bcmd = (struct backcmd*)cmd; if(fork1() == 0) runcmd(bcmd->cmd); 266: 83 ec 0c sub $0xc,%esp 269: ff 73 04 pushl 0x4(%ebx) 26c: e8 0f ff ff ff call 180 <runcmd> int fork1(void) { int pid; pid = fork(); 271: e8 a4 0a 00 00 call d1a <fork> if(pid == -1) 276: 83 f8 ff cmp $0xffffffff,%eax 279: 74 21 je 29c <runcmd+0x11c> runcmd(rcmd->cmd); break; case LIST: lcmd = (struct listcmd*)cmd; if(fork1() == 0) 27b: 85 c0 test %eax,%eax 27d: 74 e7 je 266 <runcmd+0xe6> runcmd(lcmd->left); wait(); 27f: e8 a6 0a 00 00 call d2a <wait> runcmd(lcmd->right); 284: 83 ec 0c sub $0xc,%esp 287: ff 73 08 pushl 0x8(%ebx) 28a: e8 f1 fe ff ff call 180 <runcmd> if(cmd == 0) exit(); switch(cmd->type){ default: panic("runcmd"); 28f: 83 ec 0c sub $0xc,%esp 292: 68 93 11 00 00 push $0x1193 297: e8 c4 fe ff ff call 160 <panic> { int pid; pid = fork(); if(pid == -1) panic("fork"); 29c: 83 ec 0c sub $0xc,%esp 29f: 68 ba 11 00 00 push $0x11ba 2a4: e8 b7 fe ff ff call 160 <panic> case REDIR: rcmd = (struct redircmd*)cmd; close(rcmd->fd); if(open(rcmd->file, rcmd->mode) < 0){ printf(2, "open %s failed\n", rcmd->file); 2a9: 52 push %edx 2aa: ff 73 08 pushl 0x8(%ebx) 2ad: 68 aa 11 00 00 push $0x11aa 2b2: 6a 02 push $0x2 2b4: e8 b7 0b 00 00 call e70 <printf> exit(); 2b9: e8 64 0a 00 00 call d22 <exit> break; case PIPE: pcmd = (struct pipecmd*)cmd; if(pipe(p) < 0) panic("pipe"); 2be: 83 ec 0c sub $0xc,%esp 2c1: 68 bf 11 00 00 push $0x11bf 2c6: e8 95 fe ff ff call 160 <panic> if(fork1() == 0){ close(1); 2cb: 83 ec 0c sub $0xc,%esp 2ce: 6a 01 push $0x1 2d0: e8 75 0a 00 00 call d4a <close> dup(p[1]); 2d5: 58 pop %eax 2d6: ff 75 f4 pushl -0xc(%ebp) 2d9: e8 bc 0a 00 00 call d9a <dup> close(p[0]); 2de: 58 pop %eax 2df: ff 75 f0 pushl -0x10(%ebp) 2e2: e8 63 0a 00 00 call d4a <close> close(p[1]); 2e7: 58 pop %eax 2e8: ff 75 f4 pushl -0xc(%ebp) 2eb: e8 5a 0a 00 00 call d4a <close> runcmd(pcmd->left); 2f0: 58 pop %eax 2f1: ff 73 04 pushl 0x4(%ebx) 2f4: e8 87 fe ff ff call 180 <runcmd> } if(fork1() == 0){ close(0); 2f9: 83 ec 0c sub $0xc,%esp 2fc: 6a 00 push $0x0 2fe: e8 47 0a 00 00 call d4a <close> dup(p[0]); 303: 5a pop %edx 304: ff 75 f0 pushl -0x10(%ebp) 307: e8 8e 0a 00 00 call d9a <dup> close(p[0]); 30c: 59 pop %ecx 30d: ff 75 f0 pushl -0x10(%ebp) 310: e8 35 0a 00 00 call d4a <close> close(p[1]); 315: 58 pop %eax 316: ff 75 f4 pushl -0xc(%ebp) 319: e8 2c 0a 00 00 call d4a <close> runcmd(pcmd->right); 31e: 58 pop %eax 31f: ff 73 08 pushl 0x8(%ebx) 322: e8 59 fe ff ff call 180 <runcmd> 327: 89 f6 mov %esi,%esi 329: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000330 <fork1>: exit(); } int fork1(void) { 330: 55 push %ebp 331: 89 e5 mov %esp,%ebp 333: 83 ec 08 sub $0x8,%esp int pid; pid = fork(); 336: e8 df 09 00 00 call d1a <fork> if(pid == -1) 33b: 83 f8 ff cmp $0xffffffff,%eax 33e: 74 02 je 342 <fork1+0x12> panic("fork"); return pid; } 340: c9 leave 341: c3 ret { int pid; pid = fork(); if(pid == -1) panic("fork"); 342: 83 ec 0c sub $0xc,%esp 345: 68 ba 11 00 00 push $0x11ba 34a: e8 11 fe ff ff call 160 <panic> 34f: 90 nop 00000350 <execcmd>: // Constructors struct cmd* execcmd(void) { 350: 55 push %ebp 351: 89 e5 mov %esp,%ebp 353: 53 push %ebx 354: 83 ec 10 sub $0x10,%esp struct execcmd *cmd; cmd = malloc(sizeof(*cmd)); 357: 6a 54 push $0x54 359: e8 42 0d 00 00 call 10a0 <malloc> memset(cmd, 0, sizeof(*cmd)); 35e: 83 c4 0c add $0xc,%esp struct cmd* execcmd(void) { struct execcmd *cmd; cmd = malloc(sizeof(*cmd)); 361: 89 c3 mov %eax,%ebx memset(cmd, 0, sizeof(*cmd)); 363: 6a 54 push $0x54 365: 6a 00 push $0x0 367: 50 push %eax 368: e8 23 08 00 00 call b90 <memset> cmd->type = EXEC; 36d: c7 03 01 00 00 00 movl $0x1,(%ebx) return (struct cmd*)cmd; } 373: 89 d8 mov %ebx,%eax 375: 8b 5d fc mov -0x4(%ebp),%ebx 378: c9 leave 379: c3 ret 37a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 00000380 <redircmd>: struct cmd* redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd) { 380: 55 push %ebp 381: 89 e5 mov %esp,%ebp 383: 53 push %ebx 384: 83 ec 10 sub $0x10,%esp struct redircmd *cmd; cmd = malloc(sizeof(*cmd)); 387: 6a 18 push $0x18 389: e8 12 0d 00 00 call 10a0 <malloc> memset(cmd, 0, sizeof(*cmd)); 38e: 83 c4 0c add $0xc,%esp struct cmd* redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd) { struct redircmd *cmd; cmd = malloc(sizeof(*cmd)); 391: 89 c3 mov %eax,%ebx memset(cmd, 0, sizeof(*cmd)); 393: 6a 18 push $0x18 395: 6a 00 push $0x0 397: 50 push %eax 398: e8 f3 07 00 00 call b90 <memset> cmd->type = REDIR; cmd->cmd = subcmd; 39d: 8b 45 08 mov 0x8(%ebp),%eax { struct redircmd *cmd; cmd = malloc(sizeof(*cmd)); memset(cmd, 0, sizeof(*cmd)); cmd->type = REDIR; 3a0: c7 03 02 00 00 00 movl $0x2,(%ebx) cmd->cmd = subcmd; 3a6: 89 43 04 mov %eax,0x4(%ebx) cmd->file = file; 3a9: 8b 45 0c mov 0xc(%ebp),%eax 3ac: 89 43 08 mov %eax,0x8(%ebx) cmd->efile = efile; 3af: 8b 45 10 mov 0x10(%ebp),%eax 3b2: 89 43 0c mov %eax,0xc(%ebx) cmd->mode = mode; 3b5: 8b 45 14 mov 0x14(%ebp),%eax 3b8: 89 43 10 mov %eax,0x10(%ebx) cmd->fd = fd; 3bb: 8b 45 18 mov 0x18(%ebp),%eax 3be: 89 43 14 mov %eax,0x14(%ebx) return (struct cmd*)cmd; } 3c1: 89 d8 mov %ebx,%eax 3c3: 8b 5d fc mov -0x4(%ebp),%ebx 3c6: c9 leave 3c7: c3 ret 3c8: 90 nop 3c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 000003d0 <pipecmd>: struct cmd* pipecmd(struct cmd *left, struct cmd *right) { 3d0: 55 push %ebp 3d1: 89 e5 mov %esp,%ebp 3d3: 53 push %ebx 3d4: 83 ec 10 sub $0x10,%esp struct pipecmd *cmd; cmd = malloc(sizeof(*cmd)); 3d7: 6a 0c push $0xc 3d9: e8 c2 0c 00 00 call 10a0 <malloc> memset(cmd, 0, sizeof(*cmd)); 3de: 83 c4 0c add $0xc,%esp struct cmd* pipecmd(struct cmd *left, struct cmd *right) { struct pipecmd *cmd; cmd = malloc(sizeof(*cmd)); 3e1: 89 c3 mov %eax,%ebx memset(cmd, 0, sizeof(*cmd)); 3e3: 6a 0c push $0xc 3e5: 6a 00 push $0x0 3e7: 50 push %eax 3e8: e8 a3 07 00 00 call b90 <memset> cmd->type = PIPE; cmd->left = left; 3ed: 8b 45 08 mov 0x8(%ebp),%eax { struct pipecmd *cmd; cmd = malloc(sizeof(*cmd)); memset(cmd, 0, sizeof(*cmd)); cmd->type = PIPE; 3f0: c7 03 03 00 00 00 movl $0x3,(%ebx) cmd->left = left; 3f6: 89 43 04 mov %eax,0x4(%ebx) cmd->right = right; 3f9: 8b 45 0c mov 0xc(%ebp),%eax 3fc: 89 43 08 mov %eax,0x8(%ebx) return (struct cmd*)cmd; } 3ff: 89 d8 mov %ebx,%eax 401: 8b 5d fc mov -0x4(%ebp),%ebx 404: c9 leave 405: c3 ret 406: 8d 76 00 lea 0x0(%esi),%esi 409: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000410 <listcmd>: struct cmd* listcmd(struct cmd *left, struct cmd *right) { 410: 55 push %ebp 411: 89 e5 mov %esp,%ebp 413: 53 push %ebx 414: 83 ec 10 sub $0x10,%esp struct listcmd *cmd; cmd = malloc(sizeof(*cmd)); 417: 6a 0c push $0xc 419: e8 82 0c 00 00 call 10a0 <malloc> memset(cmd, 0, sizeof(*cmd)); 41e: 83 c4 0c add $0xc,%esp struct cmd* listcmd(struct cmd *left, struct cmd *right) { struct listcmd *cmd; cmd = malloc(sizeof(*cmd)); 421: 89 c3 mov %eax,%ebx memset(cmd, 0, sizeof(*cmd)); 423: 6a 0c push $0xc 425: 6a 00 push $0x0 427: 50 push %eax 428: e8 63 07 00 00 call b90 <memset> cmd->type = LIST; cmd->left = left; 42d: 8b 45 08 mov 0x8(%ebp),%eax { struct listcmd *cmd; cmd = malloc(sizeof(*cmd)); memset(cmd, 0, sizeof(*cmd)); cmd->type = LIST; 430: c7 03 04 00 00 00 movl $0x4,(%ebx) cmd->left = left; 436: 89 43 04 mov %eax,0x4(%ebx) cmd->right = right; 439: 8b 45 0c mov 0xc(%ebp),%eax 43c: 89 43 08 mov %eax,0x8(%ebx) return (struct cmd*)cmd; } 43f: 89 d8 mov %ebx,%eax 441: 8b 5d fc mov -0x4(%ebp),%ebx 444: c9 leave 445: c3 ret 446: 8d 76 00 lea 0x0(%esi),%esi 449: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000450 <backcmd>: struct cmd* backcmd(struct cmd *subcmd) { 450: 55 push %ebp 451: 89 e5 mov %esp,%ebp 453: 53 push %ebx 454: 83 ec 10 sub $0x10,%esp struct backcmd *cmd; cmd = malloc(sizeof(*cmd)); 457: 6a 08 push $0x8 459: e8 42 0c 00 00 call 10a0 <malloc> memset(cmd, 0, sizeof(*cmd)); 45e: 83 c4 0c add $0xc,%esp struct cmd* backcmd(struct cmd *subcmd) { struct backcmd *cmd; cmd = malloc(sizeof(*cmd)); 461: 89 c3 mov %eax,%ebx memset(cmd, 0, sizeof(*cmd)); 463: 6a 08 push $0x8 465: 6a 00 push $0x0 467: 50 push %eax 468: e8 23 07 00 00 call b90 <memset> cmd->type = BACK; cmd->cmd = subcmd; 46d: 8b 45 08 mov 0x8(%ebp),%eax { struct backcmd *cmd; cmd = malloc(sizeof(*cmd)); memset(cmd, 0, sizeof(*cmd)); cmd->type = BACK; 470: c7 03 05 00 00 00 movl $0x5,(%ebx) cmd->cmd = subcmd; 476: 89 43 04 mov %eax,0x4(%ebx) return (struct cmd*)cmd; } 479: 89 d8 mov %ebx,%eax 47b: 8b 5d fc mov -0x4(%ebp),%ebx 47e: c9 leave 47f: c3 ret 00000480 <gettoken>: char whitespace[] = " \t\r\n\v"; char symbols[] = "<|>&;()"; int gettoken(char **ps, char *es, char **q, char **eq) { 480: 55 push %ebp 481: 89 e5 mov %esp,%ebp 483: 57 push %edi 484: 56 push %esi 485: 53 push %ebx 486: 83 ec 0c sub $0xc,%esp char *s; int ret; s = *ps; 489: 8b 45 08 mov 0x8(%ebp),%eax char whitespace[] = " \t\r\n\v"; char symbols[] = "<|>&;()"; int gettoken(char **ps, char *es, char **q, char **eq) { 48c: 8b 5d 0c mov 0xc(%ebp),%ebx 48f: 8b 75 10 mov 0x10(%ebp),%esi char *s; int ret; s = *ps; 492: 8b 38 mov (%eax),%edi while(s < es && strchr(whitespace, *s)) 494: 39 df cmp %ebx,%edi 496: 72 13 jb 4ab <gettoken+0x2b> 498: eb 29 jmp 4c3 <gettoken+0x43> 49a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi s++; 4a0: 83 c7 01 add $0x1,%edi { char *s; int ret; s = *ps; while(s < es && strchr(whitespace, *s)) 4a3: 39 fb cmp %edi,%ebx 4a5: 0f 84 ed 00 00 00 je 598 <gettoken+0x118> 4ab: 0f be 07 movsbl (%edi),%eax 4ae: 83 ec 08 sub $0x8,%esp 4b1: 50 push %eax 4b2: 68 38 18 00 00 push $0x1838 4b7: e8 f4 06 00 00 call bb0 <strchr> 4bc: 83 c4 10 add $0x10,%esp 4bf: 85 c0 test %eax,%eax 4c1: 75 dd jne 4a0 <gettoken+0x20> s++; if(q) 4c3: 85 f6 test %esi,%esi 4c5: 74 02 je 4c9 <gettoken+0x49> *q = s; 4c7: 89 3e mov %edi,(%esi) ret = *s; 4c9: 0f be 37 movsbl (%edi),%esi 4cc: 89 f1 mov %esi,%ecx 4ce: 89 f0 mov %esi,%eax switch(*s){ 4d0: 80 f9 29 cmp $0x29,%cl 4d3: 7f 5b jg 530 <gettoken+0xb0> 4d5: 80 f9 28 cmp $0x28,%cl 4d8: 7d 61 jge 53b <gettoken+0xbb> 4da: 84 c9 test %cl,%cl 4dc: 0f 85 de 00 00 00 jne 5c0 <gettoken+0x140> ret = 'a'; while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) s++; break; } if(eq) 4e2: 8b 55 14 mov 0x14(%ebp),%edx 4e5: 85 d2 test %edx,%edx 4e7: 74 05 je 4ee <gettoken+0x6e> *eq = s; 4e9: 8b 45 14 mov 0x14(%ebp),%eax 4ec: 89 38 mov %edi,(%eax) while(s < es && strchr(whitespace, *s)) 4ee: 39 fb cmp %edi,%ebx 4f0: 77 0d ja 4ff <gettoken+0x7f> 4f2: eb 23 jmp 517 <gettoken+0x97> 4f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi s++; 4f8: 83 c7 01 add $0x1,%edi break; } if(eq) *eq = s; while(s < es && strchr(whitespace, *s)) 4fb: 39 fb cmp %edi,%ebx 4fd: 74 18 je 517 <gettoken+0x97> 4ff: 0f be 07 movsbl (%edi),%eax 502: 83 ec 08 sub $0x8,%esp 505: 50 push %eax 506: 68 38 18 00 00 push $0x1838 50b: e8 a0 06 00 00 call bb0 <strchr> 510: 83 c4 10 add $0x10,%esp 513: 85 c0 test %eax,%eax 515: 75 e1 jne 4f8 <gettoken+0x78> s++; *ps = s; 517: 8b 45 08 mov 0x8(%ebp),%eax 51a: 89 38 mov %edi,(%eax) return ret; } 51c: 8d 65 f4 lea -0xc(%ebp),%esp 51f: 89 f0 mov %esi,%eax 521: 5b pop %ebx 522: 5e pop %esi 523: 5f pop %edi 524: 5d pop %ebp 525: c3 ret 526: 8d 76 00 lea 0x0(%esi),%esi 529: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi while(s < es && strchr(whitespace, *s)) s++; if(q) *q = s; ret = *s; switch(*s){ 530: 80 f9 3e cmp $0x3e,%cl 533: 75 0b jne 540 <gettoken+0xc0> case '<': s++; break; case '>': s++; if(*s == '>'){ 535: 80 7f 01 3e cmpb $0x3e,0x1(%edi) 539: 74 75 je 5b0 <gettoken+0x130> case '&': case '<': s++; break; case '>': s++; 53b: 83 c7 01 add $0x1,%edi 53e: eb a2 jmp 4e2 <gettoken+0x62> while(s < es && strchr(whitespace, *s)) s++; if(q) *q = s; ret = *s; switch(*s){ 540: 7f 5e jg 5a0 <gettoken+0x120> 542: 83 e9 3b sub $0x3b,%ecx 545: 80 f9 01 cmp $0x1,%cl 548: 76 f1 jbe 53b <gettoken+0xbb> s++; } break; default: ret = 'a'; while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) 54a: 39 fb cmp %edi,%ebx 54c: 77 24 ja 572 <gettoken+0xf2> 54e: eb 7c jmp 5cc <gettoken+0x14c> 550: 0f be 07 movsbl (%edi),%eax 553: 83 ec 08 sub $0x8,%esp 556: 50 push %eax 557: 68 30 18 00 00 push $0x1830 55c: e8 4f 06 00 00 call bb0 <strchr> 561: 83 c4 10 add $0x10,%esp 564: 85 c0 test %eax,%eax 566: 75 1f jne 587 <gettoken+0x107> s++; 568: 83 c7 01 add $0x1,%edi s++; } break; default: ret = 'a'; while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) 56b: 39 fb cmp %edi,%ebx 56d: 74 5b je 5ca <gettoken+0x14a> 56f: 0f be 07 movsbl (%edi),%eax 572: 83 ec 08 sub $0x8,%esp 575: 50 push %eax 576: 68 38 18 00 00 push $0x1838 57b: e8 30 06 00 00 call bb0 <strchr> 580: 83 c4 10 add $0x10,%esp 583: 85 c0 test %eax,%eax 585: 74 c9 je 550 <gettoken+0xd0> ret = '+'; s++; } break; default: ret = 'a'; 587: be 61 00 00 00 mov $0x61,%esi 58c: e9 51 ff ff ff jmp 4e2 <gettoken+0x62> 591: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 598: 89 df mov %ebx,%edi 59a: e9 24 ff ff ff jmp 4c3 <gettoken+0x43> 59f: 90 nop while(s < es && strchr(whitespace, *s)) s++; if(q) *q = s; ret = *s; switch(*s){ 5a0: 80 f9 7c cmp $0x7c,%cl 5a3: 74 96 je 53b <gettoken+0xbb> 5a5: eb a3 jmp 54a <gettoken+0xca> 5a7: 89 f6 mov %esi,%esi 5a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi break; case '>': s++; if(*s == '>'){ ret = '+'; s++; 5b0: 83 c7 02 add $0x2,%edi s++; break; case '>': s++; if(*s == '>'){ ret = '+'; 5b3: be 2b 00 00 00 mov $0x2b,%esi 5b8: e9 25 ff ff ff jmp 4e2 <gettoken+0x62> 5bd: 8d 76 00 lea 0x0(%esi),%esi while(s < es && strchr(whitespace, *s)) s++; if(q) *q = s; ret = *s; switch(*s){ 5c0: 80 f9 26 cmp $0x26,%cl 5c3: 75 85 jne 54a <gettoken+0xca> 5c5: e9 71 ff ff ff jmp 53b <gettoken+0xbb> 5ca: 89 df mov %ebx,%edi ret = 'a'; while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) s++; break; } if(eq) 5cc: 8b 45 14 mov 0x14(%ebp),%eax 5cf: be 61 00 00 00 mov $0x61,%esi 5d4: 85 c0 test %eax,%eax 5d6: 0f 85 0d ff ff ff jne 4e9 <gettoken+0x69> 5dc: e9 36 ff ff ff jmp 517 <gettoken+0x97> 5e1: eb 0d jmp 5f0 <peek> 5e3: 90 nop 5e4: 90 nop 5e5: 90 nop 5e6: 90 nop 5e7: 90 nop 5e8: 90 nop 5e9: 90 nop 5ea: 90 nop 5eb: 90 nop 5ec: 90 nop 5ed: 90 nop 5ee: 90 nop 5ef: 90 nop 000005f0 <peek>: return ret; } int peek(char **ps, char *es, char *toks) { 5f0: 55 push %ebp 5f1: 89 e5 mov %esp,%ebp 5f3: 57 push %edi 5f4: 56 push %esi 5f5: 53 push %ebx 5f6: 83 ec 0c sub $0xc,%esp 5f9: 8b 7d 08 mov 0x8(%ebp),%edi 5fc: 8b 75 0c mov 0xc(%ebp),%esi char *s; s = *ps; 5ff: 8b 1f mov (%edi),%ebx while(s < es && strchr(whitespace, *s)) 601: 39 f3 cmp %esi,%ebx 603: 72 12 jb 617 <peek+0x27> 605: eb 28 jmp 62f <peek+0x3f> 607: 89 f6 mov %esi,%esi 609: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi s++; 610: 83 c3 01 add $0x1,%ebx peek(char **ps, char *es, char *toks) { char *s; s = *ps; while(s < es && strchr(whitespace, *s)) 613: 39 de cmp %ebx,%esi 615: 74 18 je 62f <peek+0x3f> 617: 0f be 03 movsbl (%ebx),%eax 61a: 83 ec 08 sub $0x8,%esp 61d: 50 push %eax 61e: 68 38 18 00 00 push $0x1838 623: e8 88 05 00 00 call bb0 <strchr> 628: 83 c4 10 add $0x10,%esp 62b: 85 c0 test %eax,%eax 62d: 75 e1 jne 610 <peek+0x20> s++; *ps = s; 62f: 89 1f mov %ebx,(%edi) return *s && strchr(toks, *s); 631: 0f be 13 movsbl (%ebx),%edx 634: 31 c0 xor %eax,%eax 636: 84 d2 test %dl,%dl 638: 74 17 je 651 <peek+0x61> 63a: 83 ec 08 sub $0x8,%esp 63d: 52 push %edx 63e: ff 75 10 pushl 0x10(%ebp) 641: e8 6a 05 00 00 call bb0 <strchr> 646: 83 c4 10 add $0x10,%esp 649: 85 c0 test %eax,%eax 64b: 0f 95 c0 setne %al 64e: 0f b6 c0 movzbl %al,%eax } 651: 8d 65 f4 lea -0xc(%ebp),%esp 654: 5b pop %ebx 655: 5e pop %esi 656: 5f pop %edi 657: 5d pop %ebp 658: c3 ret 659: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000660 <parseredirs>: return cmd; } struct cmd* parseredirs(struct cmd *cmd, char **ps, char *es) { 660: 55 push %ebp 661: 89 e5 mov %esp,%ebp 663: 57 push %edi 664: 56 push %esi 665: 53 push %ebx 666: 83 ec 1c sub $0x1c,%esp 669: 8b 75 0c mov 0xc(%ebp),%esi 66c: 8b 5d 10 mov 0x10(%ebp),%ebx 66f: 90 nop int tok; char *q, *eq; while(peek(ps, es, "<>")){ 670: 83 ec 04 sub $0x4,%esp 673: 68 e1 11 00 00 push $0x11e1 678: 53 push %ebx 679: 56 push %esi 67a: e8 71 ff ff ff call 5f0 <peek> 67f: 83 c4 10 add $0x10,%esp 682: 85 c0 test %eax,%eax 684: 74 6a je 6f0 <parseredirs+0x90> tok = gettoken(ps, es, 0, 0); 686: 6a 00 push $0x0 688: 6a 00 push $0x0 68a: 53 push %ebx 68b: 56 push %esi 68c: e8 ef fd ff ff call 480 <gettoken> 691: 89 c7 mov %eax,%edi if(gettoken(ps, es, &q, &eq) != 'a') 693: 8d 45 e4 lea -0x1c(%ebp),%eax 696: 50 push %eax 697: 8d 45 e0 lea -0x20(%ebp),%eax 69a: 50 push %eax 69b: 53 push %ebx 69c: 56 push %esi 69d: e8 de fd ff ff call 480 <gettoken> 6a2: 83 c4 20 add $0x20,%esp 6a5: 83 f8 61 cmp $0x61,%eax 6a8: 75 51 jne 6fb <parseredirs+0x9b> panic("missing file for redirection"); switch(tok){ 6aa: 83 ff 3c cmp $0x3c,%edi 6ad: 74 31 je 6e0 <parseredirs+0x80> 6af: 83 ff 3e cmp $0x3e,%edi 6b2: 74 05 je 6b9 <parseredirs+0x59> 6b4: 83 ff 2b cmp $0x2b,%edi 6b7: 75 b7 jne 670 <parseredirs+0x10> break; case '>': cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); break; case '+': // >> cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); 6b9: 83 ec 0c sub $0xc,%esp 6bc: 6a 01 push $0x1 6be: 68 01 02 00 00 push $0x201 6c3: ff 75 e4 pushl -0x1c(%ebp) 6c6: ff 75 e0 pushl -0x20(%ebp) 6c9: ff 75 08 pushl 0x8(%ebp) 6cc: e8 af fc ff ff call 380 <redircmd> break; 6d1: 83 c4 20 add $0x20,%esp break; case '>': cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); break; case '+': // >> cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); 6d4: 89 45 08 mov %eax,0x8(%ebp) break; 6d7: eb 97 jmp 670 <parseredirs+0x10> 6d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi tok = gettoken(ps, es, 0, 0); if(gettoken(ps, es, &q, &eq) != 'a') panic("missing file for redirection"); switch(tok){ case '<': cmd = redircmd(cmd, q, eq, O_RDONLY, 0); 6e0: 83 ec 0c sub $0xc,%esp 6e3: 6a 00 push $0x0 6e5: 6a 00 push $0x0 6e7: eb da jmp 6c3 <parseredirs+0x63> 6e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); break; } } return cmd; } 6f0: 8b 45 08 mov 0x8(%ebp),%eax 6f3: 8d 65 f4 lea -0xc(%ebp),%esp 6f6: 5b pop %ebx 6f7: 5e pop %esi 6f8: 5f pop %edi 6f9: 5d pop %ebp 6fa: c3 ret char *q, *eq; while(peek(ps, es, "<>")){ tok = gettoken(ps, es, 0, 0); if(gettoken(ps, es, &q, &eq) != 'a') panic("missing file for redirection"); 6fb: 83 ec 0c sub $0xc,%esp 6fe: 68 c4 11 00 00 push $0x11c4 703: e8 58 fa ff ff call 160 <panic> 708: 90 nop 709: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000710 <parseexec>: return cmd; } struct cmd* parseexec(char **ps, char *es) { 710: 55 push %ebp 711: 89 e5 mov %esp,%ebp 713: 57 push %edi 714: 56 push %esi 715: 53 push %ebx 716: 83 ec 30 sub $0x30,%esp 719: 8b 75 08 mov 0x8(%ebp),%esi 71c: 8b 7d 0c mov 0xc(%ebp),%edi char *q, *eq; int tok, argc; struct execcmd *cmd; struct cmd *ret; if(peek(ps, es, "(")) 71f: 68 e4 11 00 00 push $0x11e4 724: 57 push %edi 725: 56 push %esi 726: e8 c5 fe ff ff call 5f0 <peek> 72b: 83 c4 10 add $0x10,%esp 72e: 85 c0 test %eax,%eax 730: 0f 85 9a 00 00 00 jne 7d0 <parseexec+0xc0> return parseblock(ps, es); ret = execcmd(); 736: e8 15 fc ff ff call 350 <execcmd> cmd = (struct execcmd*)ret; argc = 0; ret = parseredirs(ret, ps, es); 73b: 83 ec 04 sub $0x4,%esp struct cmd *ret; if(peek(ps, es, "(")) return parseblock(ps, es); ret = execcmd(); 73e: 89 c3 mov %eax,%ebx 740: 89 45 cc mov %eax,-0x34(%ebp) cmd = (struct execcmd*)ret; argc = 0; ret = parseredirs(ret, ps, es); 743: 57 push %edi 744: 56 push %esi 745: 8d 5b 04 lea 0x4(%ebx),%ebx 748: 50 push %eax 749: e8 12 ff ff ff call 660 <parseredirs> 74e: 83 c4 10 add $0x10,%esp 751: 89 45 d0 mov %eax,-0x30(%ebp) return parseblock(ps, es); ret = execcmd(); cmd = (struct execcmd*)ret; argc = 0; 754: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) 75b: eb 16 jmp 773 <parseexec+0x63> 75d: 8d 76 00 lea 0x0(%esi),%esi cmd->argv[argc] = q; cmd->eargv[argc] = eq; argc++; if(argc >= MAXARGS) panic("too many args"); ret = parseredirs(ret, ps, es); 760: 83 ec 04 sub $0x4,%esp 763: 57 push %edi 764: 56 push %esi 765: ff 75 d0 pushl -0x30(%ebp) 768: e8 f3 fe ff ff call 660 <parseredirs> 76d: 83 c4 10 add $0x10,%esp 770: 89 45 d0 mov %eax,-0x30(%ebp) ret = execcmd(); cmd = (struct execcmd*)ret; argc = 0; ret = parseredirs(ret, ps, es); while(!peek(ps, es, "|)&;")){ 773: 83 ec 04 sub $0x4,%esp 776: 68 fb 11 00 00 push $0x11fb 77b: 57 push %edi 77c: 56 push %esi 77d: e8 6e fe ff ff call 5f0 <peek> 782: 83 c4 10 add $0x10,%esp 785: 85 c0 test %eax,%eax 787: 75 5f jne 7e8 <parseexec+0xd8> if((tok=gettoken(ps, es, &q, &eq)) == 0) 789: 8d 45 e4 lea -0x1c(%ebp),%eax 78c: 50 push %eax 78d: 8d 45 e0 lea -0x20(%ebp),%eax 790: 50 push %eax 791: 57 push %edi 792: 56 push %esi 793: e8 e8 fc ff ff call 480 <gettoken> 798: 83 c4 10 add $0x10,%esp 79b: 85 c0 test %eax,%eax 79d: 74 49 je 7e8 <parseexec+0xd8> break; if(tok != 'a') 79f: 83 f8 61 cmp $0x61,%eax 7a2: 75 66 jne 80a <parseexec+0xfa> panic("syntax"); cmd->argv[argc] = q; 7a4: 8b 45 e0 mov -0x20(%ebp),%eax cmd->eargv[argc] = eq; argc++; 7a7: 83 45 d4 01 addl $0x1,-0x2c(%ebp) 7ab: 83 c3 04 add $0x4,%ebx while(!peek(ps, es, "|)&;")){ if((tok=gettoken(ps, es, &q, &eq)) == 0) break; if(tok != 'a') panic("syntax"); cmd->argv[argc] = q; 7ae: 89 43 fc mov %eax,-0x4(%ebx) cmd->eargv[argc] = eq; 7b1: 8b 45 e4 mov -0x1c(%ebp),%eax 7b4: 89 43 24 mov %eax,0x24(%ebx) argc++; 7b7: 8b 45 d4 mov -0x2c(%ebp),%eax if(argc >= MAXARGS) 7ba: 83 f8 0a cmp $0xa,%eax 7bd: 75 a1 jne 760 <parseexec+0x50> panic("too many args"); 7bf: 83 ec 0c sub $0xc,%esp 7c2: 68 ed 11 00 00 push $0x11ed 7c7: e8 94 f9 ff ff call 160 <panic> 7cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi int tok, argc; struct execcmd *cmd; struct cmd *ret; if(peek(ps, es, "(")) return parseblock(ps, es); 7d0: 83 ec 08 sub $0x8,%esp 7d3: 57 push %edi 7d4: 56 push %esi 7d5: e8 56 01 00 00 call 930 <parseblock> 7da: 83 c4 10 add $0x10,%esp ret = parseredirs(ret, ps, es); } cmd->argv[argc] = 0; cmd->eargv[argc] = 0; return ret; } 7dd: 8d 65 f4 lea -0xc(%ebp),%esp 7e0: 5b pop %ebx 7e1: 5e pop %esi 7e2: 5f pop %edi 7e3: 5d pop %ebp 7e4: c3 ret 7e5: 8d 76 00 lea 0x0(%esi),%esi 7e8: 8b 45 cc mov -0x34(%ebp),%eax 7eb: 8b 55 d4 mov -0x2c(%ebp),%edx 7ee: 8d 04 90 lea (%eax,%edx,4),%eax argc++; if(argc >= MAXARGS) panic("too many args"); ret = parseredirs(ret, ps, es); } cmd->argv[argc] = 0; 7f1: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) cmd->eargv[argc] = 0; 7f8: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) 7ff: 8b 45 d0 mov -0x30(%ebp),%eax return ret; } 802: 8d 65 f4 lea -0xc(%ebp),%esp 805: 5b pop %ebx 806: 5e pop %esi 807: 5f pop %edi 808: 5d pop %ebp 809: c3 ret ret = parseredirs(ret, ps, es); while(!peek(ps, es, "|)&;")){ if((tok=gettoken(ps, es, &q, &eq)) == 0) break; if(tok != 'a') panic("syntax"); 80a: 83 ec 0c sub $0xc,%esp 80d: 68 e6 11 00 00 push $0x11e6 812: e8 49 f9 ff ff call 160 <panic> 817: 89 f6 mov %esi,%esi 819: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000820 <parsepipe>: return cmd; } struct cmd* parsepipe(char **ps, char *es) { 820: 55 push %ebp 821: 89 e5 mov %esp,%ebp 823: 57 push %edi 824: 56 push %esi 825: 53 push %ebx 826: 83 ec 14 sub $0x14,%esp 829: 8b 5d 08 mov 0x8(%ebp),%ebx 82c: 8b 75 0c mov 0xc(%ebp),%esi struct cmd *cmd; cmd = parseexec(ps, es); 82f: 56 push %esi 830: 53 push %ebx 831: e8 da fe ff ff call 710 <parseexec> if(peek(ps, es, "|")){ 836: 83 c4 0c add $0xc,%esp struct cmd* parsepipe(char **ps, char *es) { struct cmd *cmd; cmd = parseexec(ps, es); 839: 89 c7 mov %eax,%edi if(peek(ps, es, "|")){ 83b: 68 00 12 00 00 push $0x1200 840: 56 push %esi 841: 53 push %ebx 842: e8 a9 fd ff ff call 5f0 <peek> 847: 83 c4 10 add $0x10,%esp 84a: 85 c0 test %eax,%eax 84c: 75 12 jne 860 <parsepipe+0x40> gettoken(ps, es, 0, 0); cmd = pipecmd(cmd, parsepipe(ps, es)); } return cmd; } 84e: 8d 65 f4 lea -0xc(%ebp),%esp 851: 89 f8 mov %edi,%eax 853: 5b pop %ebx 854: 5e pop %esi 855: 5f pop %edi 856: 5d pop %ebp 857: c3 ret 858: 90 nop 859: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi { struct cmd *cmd; cmd = parseexec(ps, es); if(peek(ps, es, "|")){ gettoken(ps, es, 0, 0); 860: 6a 00 push $0x0 862: 6a 00 push $0x0 864: 56 push %esi 865: 53 push %ebx 866: e8 15 fc ff ff call 480 <gettoken> cmd = pipecmd(cmd, parsepipe(ps, es)); 86b: 58 pop %eax 86c: 5a pop %edx 86d: 56 push %esi 86e: 53 push %ebx 86f: e8 ac ff ff ff call 820 <parsepipe> 874: 89 7d 08 mov %edi,0x8(%ebp) 877: 89 45 0c mov %eax,0xc(%ebp) 87a: 83 c4 10 add $0x10,%esp } return cmd; } 87d: 8d 65 f4 lea -0xc(%ebp),%esp 880: 5b pop %ebx 881: 5e pop %esi 882: 5f pop %edi 883: 5d pop %ebp struct cmd *cmd; cmd = parseexec(ps, es); if(peek(ps, es, "|")){ gettoken(ps, es, 0, 0); cmd = pipecmd(cmd, parsepipe(ps, es)); 884: e9 47 fb ff ff jmp 3d0 <pipecmd> 889: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000890 <parseline>: return cmd; } struct cmd* parseline(char **ps, char *es) { 890: 55 push %ebp 891: 89 e5 mov %esp,%ebp 893: 57 push %edi 894: 56 push %esi 895: 53 push %ebx 896: 83 ec 14 sub $0x14,%esp 899: 8b 5d 08 mov 0x8(%ebp),%ebx 89c: 8b 75 0c mov 0xc(%ebp),%esi struct cmd *cmd; cmd = parsepipe(ps, es); 89f: 56 push %esi 8a0: 53 push %ebx 8a1: e8 7a ff ff ff call 820 <parsepipe> while(peek(ps, es, "&")){ 8a6: 83 c4 10 add $0x10,%esp struct cmd* parseline(char **ps, char *es) { struct cmd *cmd; cmd = parsepipe(ps, es); 8a9: 89 c7 mov %eax,%edi while(peek(ps, es, "&")){ 8ab: eb 1b jmp 8c8 <parseline+0x38> 8ad: 8d 76 00 lea 0x0(%esi),%esi gettoken(ps, es, 0, 0); 8b0: 6a 00 push $0x0 8b2: 6a 00 push $0x0 8b4: 56 push %esi 8b5: 53 push %ebx 8b6: e8 c5 fb ff ff call 480 <gettoken> cmd = backcmd(cmd); 8bb: 89 3c 24 mov %edi,(%esp) 8be: e8 8d fb ff ff call 450 <backcmd> 8c3: 83 c4 10 add $0x10,%esp 8c6: 89 c7 mov %eax,%edi parseline(char **ps, char *es) { struct cmd *cmd; cmd = parsepipe(ps, es); while(peek(ps, es, "&")){ 8c8: 83 ec 04 sub $0x4,%esp 8cb: 68 02 12 00 00 push $0x1202 8d0: 56 push %esi 8d1: 53 push %ebx 8d2: e8 19 fd ff ff call 5f0 <peek> 8d7: 83 c4 10 add $0x10,%esp 8da: 85 c0 test %eax,%eax 8dc: 75 d2 jne 8b0 <parseline+0x20> gettoken(ps, es, 0, 0); cmd = backcmd(cmd); } if(peek(ps, es, ";")){ 8de: 83 ec 04 sub $0x4,%esp 8e1: 68 fe 11 00 00 push $0x11fe 8e6: 56 push %esi 8e7: 53 push %ebx 8e8: e8 03 fd ff ff call 5f0 <peek> 8ed: 83 c4 10 add $0x10,%esp 8f0: 85 c0 test %eax,%eax 8f2: 75 0c jne 900 <parseline+0x70> gettoken(ps, es, 0, 0); cmd = listcmd(cmd, parseline(ps, es)); } return cmd; } 8f4: 8d 65 f4 lea -0xc(%ebp),%esp 8f7: 89 f8 mov %edi,%eax 8f9: 5b pop %ebx 8fa: 5e pop %esi 8fb: 5f pop %edi 8fc: 5d pop %ebp 8fd: c3 ret 8fe: 66 90 xchg %ax,%ax while(peek(ps, es, "&")){ gettoken(ps, es, 0, 0); cmd = backcmd(cmd); } if(peek(ps, es, ";")){ gettoken(ps, es, 0, 0); 900: 6a 00 push $0x0 902: 6a 00 push $0x0 904: 56 push %esi 905: 53 push %ebx 906: e8 75 fb ff ff call 480 <gettoken> cmd = listcmd(cmd, parseline(ps, es)); 90b: 58 pop %eax 90c: 5a pop %edx 90d: 56 push %esi 90e: 53 push %ebx 90f: e8 7c ff ff ff call 890 <parseline> 914: 89 7d 08 mov %edi,0x8(%ebp) 917: 89 45 0c mov %eax,0xc(%ebp) 91a: 83 c4 10 add $0x10,%esp } return cmd; } 91d: 8d 65 f4 lea -0xc(%ebp),%esp 920: 5b pop %ebx 921: 5e pop %esi 922: 5f pop %edi 923: 5d pop %ebp gettoken(ps, es, 0, 0); cmd = backcmd(cmd); } if(peek(ps, es, ";")){ gettoken(ps, es, 0, 0); cmd = listcmd(cmd, parseline(ps, es)); 924: e9 e7 fa ff ff jmp 410 <listcmd> 929: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000930 <parseblock>: return cmd; } struct cmd* parseblock(char **ps, char *es) { 930: 55 push %ebp 931: 89 e5 mov %esp,%ebp 933: 57 push %edi 934: 56 push %esi 935: 53 push %ebx 936: 83 ec 10 sub $0x10,%esp 939: 8b 5d 08 mov 0x8(%ebp),%ebx 93c: 8b 75 0c mov 0xc(%ebp),%esi struct cmd *cmd; if(!peek(ps, es, "(")) 93f: 68 e4 11 00 00 push $0x11e4 944: 56 push %esi 945: 53 push %ebx 946: e8 a5 fc ff ff call 5f0 <peek> 94b: 83 c4 10 add $0x10,%esp 94e: 85 c0 test %eax,%eax 950: 74 4a je 99c <parseblock+0x6c> panic("parseblock"); gettoken(ps, es, 0, 0); 952: 6a 00 push $0x0 954: 6a 00 push $0x0 956: 56 push %esi 957: 53 push %ebx 958: e8 23 fb ff ff call 480 <gettoken> cmd = parseline(ps, es); 95d: 58 pop %eax 95e: 5a pop %edx 95f: 56 push %esi 960: 53 push %ebx 961: e8 2a ff ff ff call 890 <parseline> if(!peek(ps, es, ")")) 966: 83 c4 0c add $0xc,%esp struct cmd *cmd; if(!peek(ps, es, "(")) panic("parseblock"); gettoken(ps, es, 0, 0); cmd = parseline(ps, es); 969: 89 c7 mov %eax,%edi if(!peek(ps, es, ")")) 96b: 68 20 12 00 00 push $0x1220 970: 56 push %esi 971: 53 push %ebx 972: e8 79 fc ff ff call 5f0 <peek> 977: 83 c4 10 add $0x10,%esp 97a: 85 c0 test %eax,%eax 97c: 74 2b je 9a9 <parseblock+0x79> panic("syntax - missing )"); gettoken(ps, es, 0, 0); 97e: 6a 00 push $0x0 980: 6a 00 push $0x0 982: 56 push %esi 983: 53 push %ebx 984: e8 f7 fa ff ff call 480 <gettoken> cmd = parseredirs(cmd, ps, es); 989: 83 c4 0c add $0xc,%esp 98c: 56 push %esi 98d: 53 push %ebx 98e: 57 push %edi 98f: e8 cc fc ff ff call 660 <parseredirs> return cmd; } 994: 8d 65 f4 lea -0xc(%ebp),%esp 997: 5b pop %ebx 998: 5e pop %esi 999: 5f pop %edi 99a: 5d pop %ebp 99b: c3 ret parseblock(char **ps, char *es) { struct cmd *cmd; if(!peek(ps, es, "(")) panic("parseblock"); 99c: 83 ec 0c sub $0xc,%esp 99f: 68 04 12 00 00 push $0x1204 9a4: e8 b7 f7 ff ff call 160 <panic> gettoken(ps, es, 0, 0); cmd = parseline(ps, es); if(!peek(ps, es, ")")) panic("syntax - missing )"); 9a9: 83 ec 0c sub $0xc,%esp 9ac: 68 0f 12 00 00 push $0x120f 9b1: e8 aa f7 ff ff call 160 <panic> 9b6: 8d 76 00 lea 0x0(%esi),%esi 9b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000009c0 <nulterminate>: } // NUL-terminate all the counted strings. struct cmd* nulterminate(struct cmd *cmd) { 9c0: 55 push %ebp 9c1: 89 e5 mov %esp,%ebp 9c3: 53 push %ebx 9c4: 83 ec 04 sub $0x4,%esp 9c7: 8b 5d 08 mov 0x8(%ebp),%ebx struct execcmd *ecmd; struct listcmd *lcmd; struct pipecmd *pcmd; struct redircmd *rcmd; if(cmd == 0) 9ca: 85 db test %ebx,%ebx 9cc: 0f 84 96 00 00 00 je a68 <nulterminate+0xa8> return 0; switch(cmd->type){ 9d2: 83 3b 05 cmpl $0x5,(%ebx) 9d5: 77 48 ja a1f <nulterminate+0x5f> 9d7: 8b 03 mov (%ebx),%eax 9d9: ff 24 85 60 12 00 00 jmp *0x1260(,%eax,4) nulterminate(pcmd->right); break; case LIST: lcmd = (struct listcmd*)cmd; nulterminate(lcmd->left); 9e0: 83 ec 0c sub $0xc,%esp 9e3: ff 73 04 pushl 0x4(%ebx) 9e6: e8 d5 ff ff ff call 9c0 <nulterminate> nulterminate(lcmd->right); 9eb: 58 pop %eax 9ec: ff 73 08 pushl 0x8(%ebx) 9ef: e8 cc ff ff ff call 9c0 <nulterminate> break; 9f4: 83 c4 10 add $0x10,%esp 9f7: 89 d8 mov %ebx,%eax bcmd = (struct backcmd*)cmd; nulterminate(bcmd->cmd); break; } return cmd; } 9f9: 8b 5d fc mov -0x4(%ebp),%ebx 9fc: c9 leave 9fd: c3 ret 9fe: 66 90 xchg %ax,%ax return 0; switch(cmd->type){ case EXEC: ecmd = (struct execcmd*)cmd; for(i=0; ecmd->argv[i]; i++) a00: 8b 4b 04 mov 0x4(%ebx),%ecx a03: 8d 43 2c lea 0x2c(%ebx),%eax a06: 85 c9 test %ecx,%ecx a08: 74 15 je a1f <nulterminate+0x5f> a0a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi *ecmd->eargv[i] = 0; a10: 8b 10 mov (%eax),%edx a12: 83 c0 04 add $0x4,%eax a15: c6 02 00 movb $0x0,(%edx) return 0; switch(cmd->type){ case EXEC: ecmd = (struct execcmd*)cmd; for(i=0; ecmd->argv[i]; i++) a18: 8b 50 d8 mov -0x28(%eax),%edx a1b: 85 d2 test %edx,%edx a1d: 75 f1 jne a10 <nulterminate+0x50> struct redircmd *rcmd; if(cmd == 0) return 0; switch(cmd->type){ a1f: 89 d8 mov %ebx,%eax bcmd = (struct backcmd*)cmd; nulterminate(bcmd->cmd); break; } return cmd; } a21: 8b 5d fc mov -0x4(%ebp),%ebx a24: c9 leave a25: c3 ret a26: 8d 76 00 lea 0x0(%esi),%esi a29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi nulterminate(lcmd->right); break; case BACK: bcmd = (struct backcmd*)cmd; nulterminate(bcmd->cmd); a30: 83 ec 0c sub $0xc,%esp a33: ff 73 04 pushl 0x4(%ebx) a36: e8 85 ff ff ff call 9c0 <nulterminate> break; a3b: 89 d8 mov %ebx,%eax a3d: 83 c4 10 add $0x10,%esp } return cmd; } a40: 8b 5d fc mov -0x4(%ebp),%ebx a43: c9 leave a44: c3 ret a45: 8d 76 00 lea 0x0(%esi),%esi *ecmd->eargv[i] = 0; break; case REDIR: rcmd = (struct redircmd*)cmd; nulterminate(rcmd->cmd); a48: 83 ec 0c sub $0xc,%esp a4b: ff 73 04 pushl 0x4(%ebx) a4e: e8 6d ff ff ff call 9c0 <nulterminate> *rcmd->efile = 0; a53: 8b 43 0c mov 0xc(%ebx),%eax break; a56: 83 c4 10 add $0x10,%esp break; case REDIR: rcmd = (struct redircmd*)cmd; nulterminate(rcmd->cmd); *rcmd->efile = 0; a59: c6 00 00 movb $0x0,(%eax) break; a5c: 89 d8 mov %ebx,%eax bcmd = (struct backcmd*)cmd; nulterminate(bcmd->cmd); break; } return cmd; } a5e: 8b 5d fc mov -0x4(%ebp),%ebx a61: c9 leave a62: c3 ret a63: 90 nop a64: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi struct listcmd *lcmd; struct pipecmd *pcmd; struct redircmd *rcmd; if(cmd == 0) return 0; a68: 31 c0 xor %eax,%eax a6a: eb 8d jmp 9f9 <nulterminate+0x39> a6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00000a70 <parsecmd>: struct cmd *parseexec(char**, char*); struct cmd *nulterminate(struct cmd*); struct cmd* parsecmd(char *s) { a70: 55 push %ebp a71: 89 e5 mov %esp,%ebp a73: 56 push %esi a74: 53 push %ebx char *es; struct cmd *cmd; es = s + strlen(s); a75: 8b 5d 08 mov 0x8(%ebp),%ebx a78: 83 ec 0c sub $0xc,%esp a7b: 53 push %ebx a7c: e8 df 00 00 00 call b60 <strlen> cmd = parseline(&s, es); a81: 59 pop %ecx parsecmd(char *s) { char *es; struct cmd *cmd; es = s + strlen(s); a82: 01 c3 add %eax,%ebx cmd = parseline(&s, es); a84: 8d 45 08 lea 0x8(%ebp),%eax a87: 5e pop %esi a88: 53 push %ebx a89: 50 push %eax a8a: e8 01 fe ff ff call 890 <parseline> a8f: 89 c6 mov %eax,%esi peek(&s, es, ""); a91: 8d 45 08 lea 0x8(%ebp),%eax a94: 83 c4 0c add $0xc,%esp a97: 68 a9 11 00 00 push $0x11a9 a9c: 53 push %ebx a9d: 50 push %eax a9e: e8 4d fb ff ff call 5f0 <peek> if(s != es){ aa3: 8b 45 08 mov 0x8(%ebp),%eax aa6: 83 c4 10 add $0x10,%esp aa9: 39 c3 cmp %eax,%ebx aab: 75 12 jne abf <parsecmd+0x4f> printf(2, "leftovers: %s\n", s); panic("syntax"); } nulterminate(cmd); aad: 83 ec 0c sub $0xc,%esp ab0: 56 push %esi ab1: e8 0a ff ff ff call 9c0 <nulterminate> return cmd; } ab6: 8d 65 f8 lea -0x8(%ebp),%esp ab9: 89 f0 mov %esi,%eax abb: 5b pop %ebx abc: 5e pop %esi abd: 5d pop %ebp abe: c3 ret es = s + strlen(s); cmd = parseline(&s, es); peek(&s, es, ""); if(s != es){ printf(2, "leftovers: %s\n", s); abf: 52 push %edx ac0: 50 push %eax ac1: 68 22 12 00 00 push $0x1222 ac6: 6a 02 push $0x2 ac8: e8 a3 03 00 00 call e70 <printf> panic("syntax"); acd: c7 04 24 e6 11 00 00 movl $0x11e6,(%esp) ad4: e8 87 f6 ff ff call 160 <panic> ad9: 66 90 xchg %ax,%ax adb: 66 90 xchg %ax,%ax add: 66 90 xchg %ax,%ax adf: 90 nop 00000ae0 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { ae0: 55 push %ebp ae1: 89 e5 mov %esp,%ebp ae3: 53 push %ebx ae4: 8b 45 08 mov 0x8(%ebp),%eax ae7: 8b 4d 0c mov 0xc(%ebp),%ecx char *os; os = s; while((*s++ = *t++) != 0) aea: 89 c2 mov %eax,%edx aec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi af0: 83 c1 01 add $0x1,%ecx af3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx af7: 83 c2 01 add $0x1,%edx afa: 84 db test %bl,%bl afc: 88 5a ff mov %bl,-0x1(%edx) aff: 75 ef jne af0 <strcpy+0x10> ; return os; } b01: 5b pop %ebx b02: 5d pop %ebp b03: c3 ret b04: 8d b6 00 00 00 00 lea 0x0(%esi),%esi b0a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000b10 <strcmp>: int strcmp(const char *p, const char *q) { b10: 55 push %ebp b11: 89 e5 mov %esp,%ebp b13: 56 push %esi b14: 53 push %ebx b15: 8b 55 08 mov 0x8(%ebp),%edx b18: 8b 4d 0c mov 0xc(%ebp),%ecx while(*p && *p == *q) b1b: 0f b6 02 movzbl (%edx),%eax b1e: 0f b6 19 movzbl (%ecx),%ebx b21: 84 c0 test %al,%al b23: 75 1e jne b43 <strcmp+0x33> b25: eb 29 jmp b50 <strcmp+0x40> b27: 89 f6 mov %esi,%esi b29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi p++, q++; b30: 83 c2 01 add $0x1,%edx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) b33: 0f b6 02 movzbl (%edx),%eax p++, q++; b36: 8d 71 01 lea 0x1(%ecx),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) b39: 0f b6 59 01 movzbl 0x1(%ecx),%ebx b3d: 84 c0 test %al,%al b3f: 74 0f je b50 <strcmp+0x40> b41: 89 f1 mov %esi,%ecx b43: 38 d8 cmp %bl,%al b45: 74 e9 je b30 <strcmp+0x20> p++, q++; return (uchar)*p - (uchar)*q; b47: 29 d8 sub %ebx,%eax } b49: 5b pop %ebx b4a: 5e pop %esi b4b: 5d pop %ebp b4c: c3 ret b4d: 8d 76 00 lea 0x0(%esi),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) b50: 31 c0 xor %eax,%eax p++, q++; return (uchar)*p - (uchar)*q; b52: 29 d8 sub %ebx,%eax } b54: 5b pop %ebx b55: 5e pop %esi b56: 5d pop %ebp b57: c3 ret b58: 90 nop b59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000b60 <strlen>: uint strlen(char *s) { b60: 55 push %ebp b61: 89 e5 mov %esp,%ebp b63: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) b66: 80 39 00 cmpb $0x0,(%ecx) b69: 74 12 je b7d <strlen+0x1d> b6b: 31 d2 xor %edx,%edx b6d: 8d 76 00 lea 0x0(%esi),%esi b70: 83 c2 01 add $0x1,%edx b73: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) b77: 89 d0 mov %edx,%eax b79: 75 f5 jne b70 <strlen+0x10> ; return n; } b7b: 5d pop %ebp b7c: c3 ret uint strlen(char *s) { int n; for(n = 0; s[n]; n++) b7d: 31 c0 xor %eax,%eax ; return n; } b7f: 5d pop %ebp b80: c3 ret b81: eb 0d jmp b90 <memset> b83: 90 nop b84: 90 nop b85: 90 nop b86: 90 nop b87: 90 nop b88: 90 nop b89: 90 nop b8a: 90 nop b8b: 90 nop b8c: 90 nop b8d: 90 nop b8e: 90 nop b8f: 90 nop 00000b90 <memset>: void* memset(void *dst, int c, uint n) { b90: 55 push %ebp b91: 89 e5 mov %esp,%ebp b93: 57 push %edi b94: 8b 55 08 mov 0x8(%ebp),%edx } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : b97: 8b 4d 10 mov 0x10(%ebp),%ecx b9a: 8b 45 0c mov 0xc(%ebp),%eax b9d: 89 d7 mov %edx,%edi b9f: fc cld ba0: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } ba2: 89 d0 mov %edx,%eax ba4: 5f pop %edi ba5: 5d pop %ebp ba6: c3 ret ba7: 89 f6 mov %esi,%esi ba9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000bb0 <strchr>: char* strchr(const char *s, char c) { bb0: 55 push %ebp bb1: 89 e5 mov %esp,%ebp bb3: 53 push %ebx bb4: 8b 45 08 mov 0x8(%ebp),%eax bb7: 8b 5d 0c mov 0xc(%ebp),%ebx for(; *s; s++) bba: 0f b6 10 movzbl (%eax),%edx bbd: 84 d2 test %dl,%dl bbf: 74 1d je bde <strchr+0x2e> if(*s == c) bc1: 38 d3 cmp %dl,%bl bc3: 89 d9 mov %ebx,%ecx bc5: 75 0d jne bd4 <strchr+0x24> bc7: eb 17 jmp be0 <strchr+0x30> bc9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi bd0: 38 ca cmp %cl,%dl bd2: 74 0c je be0 <strchr+0x30> } char* strchr(const char *s, char c) { for(; *s; s++) bd4: 83 c0 01 add $0x1,%eax bd7: 0f b6 10 movzbl (%eax),%edx bda: 84 d2 test %dl,%dl bdc: 75 f2 jne bd0 <strchr+0x20> if(*s == c) return (char*)s; return 0; bde: 31 c0 xor %eax,%eax } be0: 5b pop %ebx be1: 5d pop %ebp be2: c3 ret be3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi be9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000bf0 <gets>: char* gets(char *buf, int max) { bf0: 55 push %ebp bf1: 89 e5 mov %esp,%ebp bf3: 57 push %edi bf4: 56 push %esi bf5: 53 push %ebx int i, cc; char c; for(i=0; i+1 < max; ){ bf6: 31 f6 xor %esi,%esi cc = read(0, &c, 1); bf8: 8d 7d e7 lea -0x19(%ebp),%edi return 0; } char* gets(char *buf, int max) { bfb: 83 ec 1c sub $0x1c,%esp int i, cc; char c; for(i=0; i+1 < max; ){ bfe: eb 29 jmp c29 <gets+0x39> cc = read(0, &c, 1); c00: 83 ec 04 sub $0x4,%esp c03: 6a 01 push $0x1 c05: 57 push %edi c06: 6a 00 push $0x0 c08: e8 2d 01 00 00 call d3a <read> if(cc < 1) c0d: 83 c4 10 add $0x10,%esp c10: 85 c0 test %eax,%eax c12: 7e 1d jle c31 <gets+0x41> break; buf[i++] = c; c14: 0f b6 45 e7 movzbl -0x19(%ebp),%eax c18: 8b 55 08 mov 0x8(%ebp),%edx c1b: 89 de mov %ebx,%esi if(c == '\n' || c == '\r') c1d: 3c 0a cmp $0xa,%al for(i=0; i+1 < max; ){ cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; c1f: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1) if(c == '\n' || c == '\r') c23: 74 1b je c40 <gets+0x50> c25: 3c 0d cmp $0xd,%al c27: 74 17 je c40 <gets+0x50> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ c29: 8d 5e 01 lea 0x1(%esi),%ebx c2c: 3b 5d 0c cmp 0xc(%ebp),%ebx c2f: 7c cf jl c00 <gets+0x10> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; c31: 8b 45 08 mov 0x8(%ebp),%eax c34: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } c38: 8d 65 f4 lea -0xc(%ebp),%esp c3b: 5b pop %ebx c3c: 5e pop %esi c3d: 5f pop %edi c3e: 5d pop %ebp c3f: c3 ret break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; c40: 8b 45 08 mov 0x8(%ebp),%eax gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ c43: 89 de mov %ebx,%esi break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; c45: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } c49: 8d 65 f4 lea -0xc(%ebp),%esp c4c: 5b pop %ebx c4d: 5e pop %esi c4e: 5f pop %edi c4f: 5d pop %ebp c50: c3 ret c51: eb 0d jmp c60 <stat> c53: 90 nop c54: 90 nop c55: 90 nop c56: 90 nop c57: 90 nop c58: 90 nop c59: 90 nop c5a: 90 nop c5b: 90 nop c5c: 90 nop c5d: 90 nop c5e: 90 nop c5f: 90 nop 00000c60 <stat>: int stat(char *n, struct stat *st) { c60: 55 push %ebp c61: 89 e5 mov %esp,%ebp c63: 56 push %esi c64: 53 push %ebx int fd; int r; fd = open(n, O_RDONLY); c65: 83 ec 08 sub $0x8,%esp c68: 6a 00 push $0x0 c6a: ff 75 08 pushl 0x8(%ebp) c6d: e8 f0 00 00 00 call d62 <open> if(fd < 0) c72: 83 c4 10 add $0x10,%esp c75: 85 c0 test %eax,%eax c77: 78 27 js ca0 <stat+0x40> return -1; r = fstat(fd, st); c79: 83 ec 08 sub $0x8,%esp c7c: ff 75 0c pushl 0xc(%ebp) c7f: 89 c3 mov %eax,%ebx c81: 50 push %eax c82: e8 f3 00 00 00 call d7a <fstat> c87: 89 c6 mov %eax,%esi close(fd); c89: 89 1c 24 mov %ebx,(%esp) c8c: e8 b9 00 00 00 call d4a <close> return r; c91: 83 c4 10 add $0x10,%esp c94: 89 f0 mov %esi,%eax } c96: 8d 65 f8 lea -0x8(%ebp),%esp c99: 5b pop %ebx c9a: 5e pop %esi c9b: 5d pop %ebp c9c: c3 ret c9d: 8d 76 00 lea 0x0(%esi),%esi int fd; int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; ca0: b8 ff ff ff ff mov $0xffffffff,%eax ca5: eb ef jmp c96 <stat+0x36> ca7: 89 f6 mov %esi,%esi ca9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000cb0 <atoi>: return r; } int atoi(const char *s) { cb0: 55 push %ebp cb1: 89 e5 mov %esp,%ebp cb3: 53 push %ebx cb4: 8b 4d 08 mov 0x8(%ebp),%ecx int n; n = 0; while('0' <= *s && *s <= '9') cb7: 0f be 11 movsbl (%ecx),%edx cba: 8d 42 d0 lea -0x30(%edx),%eax cbd: 3c 09 cmp $0x9,%al cbf: b8 00 00 00 00 mov $0x0,%eax cc4: 77 1f ja ce5 <atoi+0x35> cc6: 8d 76 00 lea 0x0(%esi),%esi cc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi n = n*10 + *s++ - '0'; cd0: 8d 04 80 lea (%eax,%eax,4),%eax cd3: 83 c1 01 add $0x1,%ecx cd6: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') cda: 0f be 11 movsbl (%ecx),%edx cdd: 8d 5a d0 lea -0x30(%edx),%ebx ce0: 80 fb 09 cmp $0x9,%bl ce3: 76 eb jbe cd0 <atoi+0x20> n = n*10 + *s++ - '0'; return n; } ce5: 5b pop %ebx ce6: 5d pop %ebp ce7: c3 ret ce8: 90 nop ce9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000cf0 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { cf0: 55 push %ebp cf1: 89 e5 mov %esp,%ebp cf3: 56 push %esi cf4: 53 push %ebx cf5: 8b 5d 10 mov 0x10(%ebp),%ebx cf8: 8b 45 08 mov 0x8(%ebp),%eax cfb: 8b 75 0c mov 0xc(%ebp),%esi char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) cfe: 85 db test %ebx,%ebx d00: 7e 14 jle d16 <memmove+0x26> d02: 31 d2 xor %edx,%edx d04: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *dst++ = *src++; d08: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx d0c: 88 0c 10 mov %cl,(%eax,%edx,1) d0f: 83 c2 01 add $0x1,%edx { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) d12: 39 da cmp %ebx,%edx d14: 75 f2 jne d08 <memmove+0x18> *dst++ = *src++; return vdst; } d16: 5b pop %ebx d17: 5e pop %esi d18: 5d pop %ebp d19: c3 ret 00000d1a <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) d1a: b8 01 00 00 00 mov $0x1,%eax d1f: cd 40 int $0x40 d21: c3 ret 00000d22 <exit>: SYSCALL(exit) d22: b8 02 00 00 00 mov $0x2,%eax d27: cd 40 int $0x40 d29: c3 ret 00000d2a <wait>: SYSCALL(wait) d2a: b8 03 00 00 00 mov $0x3,%eax d2f: cd 40 int $0x40 d31: c3 ret 00000d32 <pipe>: SYSCALL(pipe) d32: b8 04 00 00 00 mov $0x4,%eax d37: cd 40 int $0x40 d39: c3 ret 00000d3a <read>: SYSCALL(read) d3a: b8 05 00 00 00 mov $0x5,%eax d3f: cd 40 int $0x40 d41: c3 ret 00000d42 <write>: SYSCALL(write) d42: b8 10 00 00 00 mov $0x10,%eax d47: cd 40 int $0x40 d49: c3 ret 00000d4a <close>: SYSCALL(close) d4a: b8 15 00 00 00 mov $0x15,%eax d4f: cd 40 int $0x40 d51: c3 ret 00000d52 <kill>: SYSCALL(kill) d52: b8 06 00 00 00 mov $0x6,%eax d57: cd 40 int $0x40 d59: c3 ret 00000d5a <exec>: SYSCALL(exec) d5a: b8 07 00 00 00 mov $0x7,%eax d5f: cd 40 int $0x40 d61: c3 ret 00000d62 <open>: SYSCALL(open) d62: b8 0f 00 00 00 mov $0xf,%eax d67: cd 40 int $0x40 d69: c3 ret 00000d6a <mknod>: SYSCALL(mknod) d6a: b8 11 00 00 00 mov $0x11,%eax d6f: cd 40 int $0x40 d71: c3 ret 00000d72 <unlink>: SYSCALL(unlink) d72: b8 12 00 00 00 mov $0x12,%eax d77: cd 40 int $0x40 d79: c3 ret 00000d7a <fstat>: SYSCALL(fstat) d7a: b8 08 00 00 00 mov $0x8,%eax d7f: cd 40 int $0x40 d81: c3 ret 00000d82 <link>: SYSCALL(link) d82: b8 13 00 00 00 mov $0x13,%eax d87: cd 40 int $0x40 d89: c3 ret 00000d8a <mkdir>: SYSCALL(mkdir) d8a: b8 14 00 00 00 mov $0x14,%eax d8f: cd 40 int $0x40 d91: c3 ret 00000d92 <chdir>: SYSCALL(chdir) d92: b8 09 00 00 00 mov $0x9,%eax d97: cd 40 int $0x40 d99: c3 ret 00000d9a <dup>: SYSCALL(dup) d9a: b8 0a 00 00 00 mov $0xa,%eax d9f: cd 40 int $0x40 da1: c3 ret 00000da2 <getpid>: SYSCALL(getpid) da2: b8 0b 00 00 00 mov $0xb,%eax da7: cd 40 int $0x40 da9: c3 ret 00000daa <sbrk>: SYSCALL(sbrk) daa: b8 0c 00 00 00 mov $0xc,%eax daf: cd 40 int $0x40 db1: c3 ret 00000db2 <sleep>: SYSCALL(sleep) db2: b8 0d 00 00 00 mov $0xd,%eax db7: cd 40 int $0x40 db9: c3 ret 00000dba <uptime>: SYSCALL(uptime) dba: b8 0e 00 00 00 mov $0xe,%eax dbf: cd 40 int $0x40 dc1: c3 ret 00000dc2 <cps>: SYSCALL(cps) dc2: b8 16 00 00 00 mov $0x16,%eax dc7: cd 40 int $0x40 dc9: c3 ret dca: 66 90 xchg %ax,%ax dcc: 66 90 xchg %ax,%ax dce: 66 90 xchg %ax,%ax 00000dd0 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { dd0: 55 push %ebp dd1: 89 e5 mov %esp,%ebp dd3: 57 push %edi dd4: 56 push %esi dd5: 53 push %ebx dd6: 89 c6 mov %eax,%esi dd8: 83 ec 3c sub $0x3c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ ddb: 8b 5d 08 mov 0x8(%ebp),%ebx dde: 85 db test %ebx,%ebx de0: 74 7e je e60 <printint+0x90> de2: 89 d0 mov %edx,%eax de4: c1 e8 1f shr $0x1f,%eax de7: 84 c0 test %al,%al de9: 74 75 je e60 <printint+0x90> neg = 1; x = -xx; deb: 89 d0 mov %edx,%eax int i, neg; uint x; neg = 0; if(sgn && xx < 0){ neg = 1; ded: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) x = -xx; df4: f7 d8 neg %eax df6: 89 75 c0 mov %esi,-0x40(%ebp) } else { x = xx; } i = 0; df9: 31 ff xor %edi,%edi dfb: 8d 5d d7 lea -0x29(%ebp),%ebx dfe: 89 ce mov %ecx,%esi e00: eb 08 jmp e0a <printint+0x3a> e02: 8d b6 00 00 00 00 lea 0x0(%esi),%esi do{ buf[i++] = digits[x % base]; e08: 89 cf mov %ecx,%edi e0a: 31 d2 xor %edx,%edx e0c: 8d 4f 01 lea 0x1(%edi),%ecx e0f: f7 f6 div %esi e11: 0f b6 92 80 12 00 00 movzbl 0x1280(%edx),%edx }while((x /= base) != 0); e18: 85 c0 test %eax,%eax x = xx; } i = 0; do{ buf[i++] = digits[x % base]; e1a: 88 14 0b mov %dl,(%ebx,%ecx,1) }while((x /= base) != 0); e1d: 75 e9 jne e08 <printint+0x38> if(neg) e1f: 8b 45 c4 mov -0x3c(%ebp),%eax e22: 8b 75 c0 mov -0x40(%ebp),%esi e25: 85 c0 test %eax,%eax e27: 74 08 je e31 <printint+0x61> buf[i++] = '-'; e29: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1) e2e: 8d 4f 02 lea 0x2(%edi),%ecx e31: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi e35: 8d 76 00 lea 0x0(%esi),%esi e38: 0f b6 07 movzbl (%edi),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); e3b: 83 ec 04 sub $0x4,%esp e3e: 83 ef 01 sub $0x1,%edi e41: 6a 01 push $0x1 e43: 53 push %ebx e44: 56 push %esi e45: 88 45 d7 mov %al,-0x29(%ebp) e48: e8 f5 fe ff ff call d42 <write> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) e4d: 83 c4 10 add $0x10,%esp e50: 39 df cmp %ebx,%edi e52: 75 e4 jne e38 <printint+0x68> putc(fd, buf[i]); } e54: 8d 65 f4 lea -0xc(%ebp),%esp e57: 5b pop %ebx e58: 5e pop %esi e59: 5f pop %edi e5a: 5d pop %ebp e5b: c3 ret e5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi neg = 0; if(sgn && xx < 0){ neg = 1; x = -xx; } else { x = xx; e60: 89 d0 mov %edx,%eax static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; e62: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) e69: eb 8b jmp df6 <printint+0x26> e6b: 90 nop e6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00000e70 <printf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { e70: 55 push %ebp e71: 89 e5 mov %esp,%ebp e73: 57 push %edi e74: 56 push %esi e75: 53 push %ebx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ e76: 8d 45 10 lea 0x10(%ebp),%eax } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { e79: 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++){ e7c: 8b 75 0c mov 0xc(%ebp),%esi } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { e7f: 8b 7d 08 mov 0x8(%ebp),%edi int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ e82: 89 45 d0 mov %eax,-0x30(%ebp) e85: 0f b6 1e movzbl (%esi),%ebx e88: 83 c6 01 add $0x1,%esi e8b: 84 db test %bl,%bl e8d: 0f 84 b0 00 00 00 je f43 <printf+0xd3> e93: 31 d2 xor %edx,%edx e95: eb 39 jmp ed0 <printf+0x60> e97: 89 f6 mov %esi,%esi e99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ ea0: 83 f8 25 cmp $0x25,%eax ea3: 89 55 d4 mov %edx,-0x2c(%ebp) state = '%'; ea6: ba 25 00 00 00 mov $0x25,%edx state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ eab: 74 18 je ec5 <printf+0x55> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); ead: 8d 45 e2 lea -0x1e(%ebp),%eax eb0: 83 ec 04 sub $0x4,%esp eb3: 88 5d e2 mov %bl,-0x1e(%ebp) eb6: 6a 01 push $0x1 eb8: 50 push %eax eb9: 57 push %edi eba: e8 83 fe ff ff call d42 <write> ebf: 8b 55 d4 mov -0x2c(%ebp),%edx ec2: 83 c4 10 add $0x10,%esp ec5: 83 c6 01 add $0x1,%esi int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ ec8: 0f b6 5e ff movzbl -0x1(%esi),%ebx ecc: 84 db test %bl,%bl ece: 74 73 je f43 <printf+0xd3> c = fmt[i] & 0xff; if(state == 0){ ed0: 85 d2 test %edx,%edx uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; ed2: 0f be cb movsbl %bl,%ecx ed5: 0f b6 c3 movzbl %bl,%eax if(state == 0){ ed8: 74 c6 je ea0 <printf+0x30> if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ eda: 83 fa 25 cmp $0x25,%edx edd: 75 e6 jne ec5 <printf+0x55> if(c == 'd'){ edf: 83 f8 64 cmp $0x64,%eax ee2: 0f 84 f8 00 00 00 je fe0 <printf+0x170> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ ee8: 81 e1 f7 00 00 00 and $0xf7,%ecx eee: 83 f9 70 cmp $0x70,%ecx ef1: 74 5d je f50 <printf+0xe0> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ ef3: 83 f8 73 cmp $0x73,%eax ef6: 0f 84 84 00 00 00 je f80 <printf+0x110> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ efc: 83 f8 63 cmp $0x63,%eax eff: 0f 84 ea 00 00 00 je fef <printf+0x17f> putc(fd, *ap); ap++; } else if(c == '%'){ f05: 83 f8 25 cmp $0x25,%eax f08: 0f 84 c2 00 00 00 je fd0 <printf+0x160> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); f0e: 8d 45 e7 lea -0x19(%ebp),%eax f11: 83 ec 04 sub $0x4,%esp f14: c6 45 e7 25 movb $0x25,-0x19(%ebp) f18: 6a 01 push $0x1 f1a: 50 push %eax f1b: 57 push %edi f1c: e8 21 fe ff ff call d42 <write> f21: 83 c4 0c add $0xc,%esp f24: 8d 45 e6 lea -0x1a(%ebp),%eax f27: 88 5d e6 mov %bl,-0x1a(%ebp) f2a: 6a 01 push $0x1 f2c: 50 push %eax f2d: 57 push %edi f2e: 83 c6 01 add $0x1,%esi f31: e8 0c fe ff ff call d42 <write> int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ f36: 0f b6 5e ff movzbl -0x1(%esi),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); f3a: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; f3d: 31 d2 xor %edx,%edx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ f3f: 84 db test %bl,%bl f41: 75 8d jne ed0 <printf+0x60> putc(fd, c); } state = 0; } } } f43: 8d 65 f4 lea -0xc(%ebp),%esp f46: 5b pop %ebx f47: 5e pop %esi f48: 5f pop %edi f49: 5d pop %ebp f4a: c3 ret f4b: 90 nop f4c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); f50: 83 ec 0c sub $0xc,%esp f53: b9 10 00 00 00 mov $0x10,%ecx f58: 6a 00 push $0x0 f5a: 8b 5d d0 mov -0x30(%ebp),%ebx f5d: 89 f8 mov %edi,%eax f5f: 8b 13 mov (%ebx),%edx f61: e8 6a fe ff ff call dd0 <printint> ap++; f66: 89 d8 mov %ebx,%eax f68: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; f6b: 31 d2 xor %edx,%edx if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); ap++; f6d: 83 c0 04 add $0x4,%eax f70: 89 45 d0 mov %eax,-0x30(%ebp) f73: e9 4d ff ff ff jmp ec5 <printf+0x55> f78: 90 nop f79: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi } else if(c == 's'){ s = (char*)*ap; f80: 8b 45 d0 mov -0x30(%ebp),%eax f83: 8b 18 mov (%eax),%ebx ap++; f85: 83 c0 04 add $0x4,%eax f88: 89 45 d0 mov %eax,-0x30(%ebp) if(s == 0) s = "(null)"; f8b: b8 78 12 00 00 mov $0x1278,%eax f90: 85 db test %ebx,%ebx f92: 0f 44 d8 cmove %eax,%ebx while(*s != 0){ f95: 0f b6 03 movzbl (%ebx),%eax f98: 84 c0 test %al,%al f9a: 74 23 je fbf <printf+0x14f> f9c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi fa0: 88 45 e3 mov %al,-0x1d(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); fa3: 8d 45 e3 lea -0x1d(%ebp),%eax fa6: 83 ec 04 sub $0x4,%esp fa9: 6a 01 push $0x1 ap++; if(s == 0) s = "(null)"; while(*s != 0){ putc(fd, *s); s++; fab: 83 c3 01 add $0x1,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); fae: 50 push %eax faf: 57 push %edi fb0: e8 8d fd ff ff call d42 <write> } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ fb5: 0f b6 03 movzbl (%ebx),%eax fb8: 83 c4 10 add $0x10,%esp fbb: 84 c0 test %al,%al fbd: 75 e1 jne fa0 <printf+0x130> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; fbf: 31 d2 xor %edx,%edx fc1: e9 ff fe ff ff jmp ec5 <printf+0x55> fc6: 8d 76 00 lea 0x0(%esi),%esi fc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); fd0: 83 ec 04 sub $0x4,%esp fd3: 88 5d e5 mov %bl,-0x1b(%ebp) fd6: 8d 45 e5 lea -0x1b(%ebp),%eax fd9: 6a 01 push $0x1 fdb: e9 4c ff ff ff jmp f2c <printf+0xbc> } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); fe0: 83 ec 0c sub $0xc,%esp fe3: b9 0a 00 00 00 mov $0xa,%ecx fe8: 6a 01 push $0x1 fea: e9 6b ff ff ff jmp f5a <printf+0xea> fef: 8b 5d d0 mov -0x30(%ebp),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); ff2: 83 ec 04 sub $0x4,%esp ff5: 8b 03 mov (%ebx),%eax ff7: 6a 01 push $0x1 ff9: 88 45 e4 mov %al,-0x1c(%ebp) ffc: 8d 45 e4 lea -0x1c(%ebp),%eax fff: 50 push %eax 1000: 57 push %edi 1001: e8 3c fd ff ff call d42 <write> 1006: e9 5b ff ff ff jmp f66 <printf+0xf6> 100b: 66 90 xchg %ax,%ax 100d: 66 90 xchg %ax,%ax 100f: 90 nop 00001010 <free>: static Header base; static Header *freep; void free(void *ap) { 1010: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 1011: a1 a4 18 00 00 mov 0x18a4,%eax static Header base; static Header *freep; void free(void *ap) { 1016: 89 e5 mov %esp,%ebp 1018: 57 push %edi 1019: 56 push %esi 101a: 53 push %ebx 101b: 8b 5d 08 mov 0x8(%ebp),%ebx Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 101e: 8b 10 mov (%eax),%edx void free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; 1020: 8d 4b f8 lea -0x8(%ebx),%ecx for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 1023: 39 c8 cmp %ecx,%eax 1025: 73 19 jae 1040 <free+0x30> 1027: 89 f6 mov %esi,%esi 1029: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 1030: 39 d1 cmp %edx,%ecx 1032: 72 1c jb 1050 <free+0x40> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 1034: 39 d0 cmp %edx,%eax 1036: 73 18 jae 1050 <free+0x40> static Header base; static Header *freep; void free(void *ap) { 1038: 89 d0 mov %edx,%eax Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 103a: 39 c8 cmp %ecx,%eax if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 103c: 8b 10 mov (%eax),%edx free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 103e: 72 f0 jb 1030 <free+0x20> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 1040: 39 d0 cmp %edx,%eax 1042: 72 f4 jb 1038 <free+0x28> 1044: 39 d1 cmp %edx,%ecx 1046: 73 f0 jae 1038 <free+0x28> 1048: 90 nop 1049: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi break; if(bp + bp->s.size == p->s.ptr){ 1050: 8b 73 fc mov -0x4(%ebx),%esi 1053: 8d 3c f1 lea (%ecx,%esi,8),%edi 1056: 39 d7 cmp %edx,%edi 1058: 74 19 je 1073 <free+0x63> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 105a: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 105d: 8b 50 04 mov 0x4(%eax),%edx 1060: 8d 34 d0 lea (%eax,%edx,8),%esi 1063: 39 f1 cmp %esi,%ecx 1065: 74 23 je 108a <free+0x7a> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 1067: 89 08 mov %ecx,(%eax) freep = p; 1069: a3 a4 18 00 00 mov %eax,0x18a4 } 106e: 5b pop %ebx 106f: 5e pop %esi 1070: 5f pop %edi 1071: 5d pop %ebp 1072: c3 ret bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ bp->s.size += p->s.ptr->s.size; 1073: 03 72 04 add 0x4(%edx),%esi 1076: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 1079: 8b 10 mov (%eax),%edx 107b: 8b 12 mov (%edx),%edx 107d: 89 53 f8 mov %edx,-0x8(%ebx) } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ 1080: 8b 50 04 mov 0x4(%eax),%edx 1083: 8d 34 d0 lea (%eax,%edx,8),%esi 1086: 39 f1 cmp %esi,%ecx 1088: 75 dd jne 1067 <free+0x57> p->s.size += bp->s.size; 108a: 03 53 fc add -0x4(%ebx),%edx p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; freep = p; 108d: a3 a4 18 00 00 mov %eax,0x18a4 bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ p->s.size += bp->s.size; 1092: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 1095: 8b 53 f8 mov -0x8(%ebx),%edx 1098: 89 10 mov %edx,(%eax) } else p->s.ptr = bp; freep = p; } 109a: 5b pop %ebx 109b: 5e pop %esi 109c: 5f pop %edi 109d: 5d pop %ebp 109e: c3 ret 109f: 90 nop 000010a0 <malloc>: return freep; } void* malloc(uint nbytes) { 10a0: 55 push %ebp 10a1: 89 e5 mov %esp,%ebp 10a3: 57 push %edi 10a4: 56 push %esi 10a5: 53 push %ebx 10a6: 83 ec 0c sub $0xc,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 10a9: 8b 45 08 mov 0x8(%ebp),%eax if((prevp = freep) == 0){ 10ac: 8b 15 a4 18 00 00 mov 0x18a4,%edx malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 10b2: 8d 78 07 lea 0x7(%eax),%edi 10b5: c1 ef 03 shr $0x3,%edi 10b8: 83 c7 01 add $0x1,%edi if((prevp = freep) == 0){ 10bb: 85 d2 test %edx,%edx 10bd: 0f 84 a3 00 00 00 je 1166 <malloc+0xc6> 10c3: 8b 02 mov (%edx),%eax 10c5: 8b 48 04 mov 0x4(%eax),%ecx base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ 10c8: 39 cf cmp %ecx,%edi 10ca: 76 74 jbe 1140 <malloc+0xa0> 10cc: 81 ff 00 10 00 00 cmp $0x1000,%edi 10d2: be 00 10 00 00 mov $0x1000,%esi 10d7: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx 10de: 0f 43 f7 cmovae %edi,%esi 10e1: ba 00 80 00 00 mov $0x8000,%edx 10e6: 81 ff ff 0f 00 00 cmp $0xfff,%edi 10ec: 0f 46 da cmovbe %edx,%ebx 10ef: eb 10 jmp 1101 <malloc+0x61> 10f1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 10f8: 8b 02 mov (%edx),%eax if(p->s.size >= nunits){ 10fa: 8b 48 04 mov 0x4(%eax),%ecx 10fd: 39 cf cmp %ecx,%edi 10ff: 76 3f jbe 1140 <malloc+0xa0> p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 1101: 39 05 a4 18 00 00 cmp %eax,0x18a4 1107: 89 c2 mov %eax,%edx 1109: 75 ed jne 10f8 <malloc+0x58> char *p; Header *hp; if(nu < 4096) nu = 4096; p = sbrk(nu * sizeof(Header)); 110b: 83 ec 0c sub $0xc,%esp 110e: 53 push %ebx 110f: e8 96 fc ff ff call daa <sbrk> if(p == (char*)-1) 1114: 83 c4 10 add $0x10,%esp 1117: 83 f8 ff cmp $0xffffffff,%eax 111a: 74 1c je 1138 <malloc+0x98> return 0; hp = (Header*)p; hp->s.size = nu; 111c: 89 70 04 mov %esi,0x4(%eax) free((void*)(hp + 1)); 111f: 83 ec 0c sub $0xc,%esp 1122: 83 c0 08 add $0x8,%eax 1125: 50 push %eax 1126: e8 e5 fe ff ff call 1010 <free> return freep; 112b: 8b 15 a4 18 00 00 mov 0x18a4,%edx } freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) 1131: 83 c4 10 add $0x10,%esp 1134: 85 d2 test %edx,%edx 1136: 75 c0 jne 10f8 <malloc+0x58> return 0; 1138: 31 c0 xor %eax,%eax 113a: eb 1c jmp 1158 <malloc+0xb8> 113c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ if(p->s.size == nunits) 1140: 39 cf cmp %ecx,%edi 1142: 74 1c je 1160 <malloc+0xc0> prevp->s.ptr = p->s.ptr; else { p->s.size -= nunits; 1144: 29 f9 sub %edi,%ecx 1146: 89 48 04 mov %ecx,0x4(%eax) p += p->s.size; 1149: 8d 04 c8 lea (%eax,%ecx,8),%eax p->s.size = nunits; 114c: 89 78 04 mov %edi,0x4(%eax) } freep = prevp; 114f: 89 15 a4 18 00 00 mov %edx,0x18a4 return (void*)(p + 1); 1155: 83 c0 08 add $0x8,%eax } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } } 1158: 8d 65 f4 lea -0xc(%ebp),%esp 115b: 5b pop %ebx 115c: 5e pop %esi 115d: 5f pop %edi 115e: 5d pop %ebp 115f: c3 ret base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ if(p->s.size == nunits) prevp->s.ptr = p->s.ptr; 1160: 8b 08 mov (%eax),%ecx 1162: 89 0a mov %ecx,(%edx) 1164: eb e9 jmp 114f <malloc+0xaf> Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 1166: c7 05 a4 18 00 00 a8 movl $0x18a8,0x18a4 116d: 18 00 00 1170: c7 05 a8 18 00 00 a8 movl $0x18a8,0x18a8 1177: 18 00 00 base.s.size = 0; 117a: b8 a8 18 00 00 mov $0x18a8,%eax 117f: c7 05 ac 18 00 00 00 movl $0x0,0x18ac 1186: 00 00 00 1189: e9 3e ff ff ff jmp 10cc <malloc+0x2c>
l: addi $s0,$0,12 addi $s1,$0,3 or $s0,$s1,$s0 ori $s0,$s1,4 sub $s0,$s0,$s1 nor $s0,$s0,$s1 j l
<% from pwnlib.shellcraft.arm.linux import syscall %> <%page args="fd, message, flags"/> <%docstring> Invokes the syscall recvmsg. See 'man 2 recvmsg' for more information. Arguments: fd(int): fd message(msghdr): message flags(int): flags </%docstring> ${syscall('SYS_recvmsg', fd, message, flags)}
#include "IRremote.h" #include "IRremoteInt.h" //+============================================================================= // Gets one undecoded level at a time from the raw buffer. // The RC5/6 decoding is easier if the data is broken into time intervals. // E.g. if the buffer has MARK for 2 time intervals and SPACE for 1, // successive calls to getRClevel will return MARK, MARK, SPACE. // offset and used are updated to keep track of the current position. // t1 is the time interval for a single bit in microseconds. // Returns -1 for error (measured time interval is not a multiple of t1). // int IRrecv::getRClevel (decode_results *results, int *offset, int *used, int t1) { int width; int val; int correction; int avail; if (*offset >= results->rawlen) return SPACE ; // After end of recorded buffer, assume SPACE. width = results->rawbuf[*offset]; val = ((*offset) % 2) ? MARK : SPACE; correction = (val == MARK) ? MARK_EXCESS : - MARK_EXCESS; if (MATCH(width, ( t1) + correction)) avail = 1 ; else if (MATCH(width, (2*t1) + correction)) avail = 2 ; else if (MATCH(width, (3*t1) + correction)) avail = 3 ; else return -1 ; (*used)++; if (*used >= avail) { *used = 0; (*offset)++; } DBG_PRINTLN( (val == MARK) ? "MARK" : "SPACE" ); return val; } //============================================================================== // RRRR CCCC 55555 // R R C 5 // RRRR C 5555 // R R C 5 // R R CCCC 5555 // // NB: First bit must be a one (start bit) // #define MIN_RC5_SAMPLES 11 #define RC5_T1 889 #define RC5_RPT_LENGTH 46000 //+============================================================================= #if SEND_RC5 void IRsend::sendRC5 (unsigned long data, int nbits) { // Set IR carrier frequency enableIROut(36); // Start mark(RC5_T1); space(RC5_T1); mark(RC5_T1); // Data for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) { if (data & mask) { space(RC5_T1); // 1 is space, then mark mark(RC5_T1); } else { mark(RC5_T1); space(RC5_T1); } } space(0); // Always end with the LED off } #endif //+============================================================================= #if DECODE_RC5 bool IRrecv::decodeRC5 (decode_results *results) { int nbits; long data = 0; int used = 0; int offset = 1; // Skip gap space if (irparams.rawlen < MIN_RC5_SAMPLES + 2) return false ; // Get start bits if (getRClevel(results, &offset, &used, RC5_T1) != MARK) return false ; if (getRClevel(results, &offset, &used, RC5_T1) != SPACE) return false ; if (getRClevel(results, &offset, &used, RC5_T1) != MARK) return false ; for (nbits = 0; offset < irparams.rawlen; nbits++) { int levelA = getRClevel(results, &offset, &used, RC5_T1); int levelB = getRClevel(results, &offset, &used, RC5_T1); if ((levelA == SPACE) && (levelB == MARK )) data = (data << 1) | 1 ; else if ((levelA == MARK ) && (levelB == SPACE)) data = (data << 1) | 0 ; else return false ; } // Success results->bits = nbits; results->value = data; results->decode_type = RC5; return true; } #endif //+============================================================================= // RRRR CCCC 6666 // R R C 6 // RRRR C 6666 // R R C 6 6 // R R CCCC 666 // // NB : Caller needs to take care of flipping the toggle bit // #define MIN_RC6_SAMPLES 1 #define RC6_HDR_MARK 2666 #define RC6_HDR_SPACE 889 #define RC6_T1 444 #define RC6_RPT_LENGTH 46000 #if SEND_RC6 void IRsend::sendRC6 (unsigned long data, int nbits) { // Set IR carrier frequency enableIROut(36); // Header mark(RC6_HDR_MARK); space(RC6_HDR_SPACE); // Start bit mark(RC6_T1); space(RC6_T1); // Data for (unsigned long i = 1, mask = 1UL << (nbits - 1); mask; i++, mask >>= 1) { // The fourth bit we send is a "double width trailer bit" int t = (i == 4) ? (RC6_T1 * 2) : (RC6_T1) ; if (data & mask) { mark(t); space(t); } else { space(t); mark(t); } } space(0); // Always end with the LED off } #endif //+============================================================================= #if DECODE_RC6 bool IRrecv::decodeRC6 (decode_results *results) { int nbits; long data = 0; int used = 0; int offset = 1; // Skip first space if (results->rawlen < MIN_RC6_SAMPLES) return false ; // Initial mark if (!MATCH_MARK(results->rawbuf[offset++], RC6_HDR_MARK)) return false ; if (!MATCH_SPACE(results->rawbuf[offset++], RC6_HDR_SPACE)) return false ; // Get start bit (1) if (getRClevel(results, &offset, &used, RC6_T1) != MARK) return false ; if (getRClevel(results, &offset, &used, RC6_T1) != SPACE) return false ; for (nbits = 0; offset < results->rawlen; nbits++) { int levelA, levelB; // Next two levels levelA = getRClevel(results, &offset, &used, RC6_T1); if (nbits == 3) { // T bit is double wide; make sure second half matches if (levelA != getRClevel(results, &offset, &used, RC6_T1)) return false; } levelB = getRClevel(results, &offset, &used, RC6_T1); if (nbits == 3) { // T bit is double wide; make sure second half matches if (levelB != getRClevel(results, &offset, &used, RC6_T1)) return false; } if ((levelA == MARK ) && (levelB == SPACE)) data = (data << 1) | 1 ; // inverted compared to RC5 else if ((levelA == SPACE) && (levelB == MARK )) data = (data << 1) | 0 ; // ... else return false ; // Error } // Success results->bits = nbits; results->value = data; results->decode_type = RC6; return true; } #endif
// RUN: %clang -std=c++17 -g %s -o %t.out -lstdc++ -lOpenCL -lsycl // RUN: env SYCL_DEVICE_TYPE=HOST %t.out //==--------------- context.cpp - SYCL context test ------------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include <CL/sycl.hpp> #include <iostream> using namespace cl::sycl; int main() { try { context c; } catch (device_error e) { std::cout << "Failed to create device for context" << std::endl; } auto devices = device::get_devices(); device &deviceA = devices[0]; device &deviceB = (devices.size() > 1 ? devices[1] : devices[0]); { std::cout << "move constructor" << std::endl; context Context(deviceA); size_t hash = hash_class<context>()(Context); context MovedContext(std::move(Context)); assert(hash == hash_class<context>()(MovedContext)); assert(deviceA.is_host() == MovedContext.is_host()); if (!deviceA.is_host()) { assert(MovedContext.get() != nullptr); } } { std::cout << "move assignment operator" << std::endl; context Context(deviceA); size_t hash = hash_class<context>()(Context); context WillMovedContext(deviceB); WillMovedContext = std::move(Context); assert(hash == hash_class<context>()(WillMovedContext)); assert(deviceA.is_host() == WillMovedContext.is_host()); if (!deviceA.is_host()) { assert(WillMovedContext.get() != nullptr); } } { std::cout << "copy constructor" << std::endl; context Context(deviceA); size_t hash = hash_class<context>()(Context); context ContextCopy(Context); assert(hash == hash_class<context>()(Context)); assert(hash == hash_class<context>()(ContextCopy)); assert(Context == ContextCopy); assert(Context.is_host() == ContextCopy.is_host()); } { std::cout << "copy assignment operator" << std::endl; context Context(deviceA); size_t hash = hash_class<context>()(Context); context WillContextCopy(deviceB); WillContextCopy = Context; assert(hash == hash_class<context>()(Context)); assert(hash == hash_class<context>()(WillContextCopy)); assert(Context == WillContextCopy); assert(Context.is_host() == WillContextCopy.is_host()); } }
GET_KEY: push hl push de push bc di ld hl,$F50004 ld (hl),8 inc hl ld (hl),8 ld l,0 ld (hl),2 xor a wait_for_keys: cp (hl) jr nz,wait_for_keys ld e,0 ; E = GET_KEY result ld d,e ; D = current key counter ld hl,getkeylastdata ld bc,$F5001E ; pointer to key input data scan_next_row: ld a,(bc) ; A = one row of key data push bc ld c,(hl) ; C = previous scan results ld (hl),a ; save the new results inc hl cpl ; bits set to 0 for pressed keys or c ; now 0 for newly pressed only ld b,8 scan_next_column: inc d ; D = next char value rrca jr c,key_not_pressed ld e,d key_not_pressed: djnz scan_next_column pop bc dec bc dec bc ld a,c cp $10 ; check if at port $F50010 jr nz,scan_next_row ; if so, done ei ld a,e pop bc pop de pop hl ret ;############## Timer handling timer_wait: #ifdef TIME_INDICATOR ld a,($F20001) or a jr nz,timer_loop ld hl,score inc (hl) ret #endif timer_loop: ld a,($F20001) or a jr nz,timer_loop timer_init: ld hl,$F20030 res 0,(hl) ; disable timer set 1,(hl) ; set frequency to 32768Hz res 2,(hl) ; no interrupt inc hl res 1,(hl) ; count down ld a,(delay_amount) ld hl,2 ld ($F20004),hl ld l,a add hl,hl add hl,hl add hl,hl add hl,hl inc h ld ($F20000),hl ; value to count down from xor a ld ($F20003),a ld ($F20006),a ld hl,$F20030 set 0,(hl) ; re-enable timer ret ;############## Clear the screen (in black, of course!) Clear_Screen: ld hl,$D40000 ld (hl),0 ld de,$D40001 ld bc,320*240*2-1 ldir ret .block (256-($ & 255)) ; %RRRRRGGG,%GGGBBBBB color_table: .db %00000000,%00000000 ; 0 = black .db %11111000,%00000000 ; 1 = red .db %11000110,%00011000 ; 2 = light gray .db %11111111,%11111111 ; 3 = white .db %11111100,%11111111 ; 4 = bright purple Clear_Below_Tiles: ld hl,$D40000+(320*128*2) ld de,$D40001+(320*128*2) ld (hl),0 ld bc,320*104*2-1 ldir ret
#include "shipupgrade_shield.h" #include "../modules/RGNDS_Engine/engine.h" #include "shipstats.h" ShipUpgrade_Shield::ShipUpgrade_Shield() { } ShipUpgrade_Shield::~ShipUpgrade_Shield() { } bool ShipUpgrade_Shield::init(ShipStats* shipstats, int* c, glImage* gfx) { lifetime = 5000.0f; lastHitTime = 0; this->gfx = &gfx[2]; return true; } void ShipUpgrade_Shield::draw(RGNDS::Transform& ship) { byte r=8, g=31, b=31; if(lastHitTime > 0) { float delta = lastHitTime / 1000.0f; r += delta * 23; g -= delta * 15; b = g; } RGNDS::Transform tra; tra.pos = ship.pos - 16; tra.pos.y -= 1; tra.scale = 1.01; glColor(Engine_Color16(1, r, g, b)); RGNDS::GL2D::glSprite(0, gfx, &tra, 4, 3 + (4 * (lifetime / 5000.0f))); glColor(0xffff); } void ShipUpgrade_Shield::gotHit() { this->lastHitTime = 1000.0f; } bool ShipUpgrade_Shield::update(ShipStats* shipstats, Ship* ship, float dt, int keys_held, int keys_up, int keys_justpressed) { lifetime -= dt * 1000.0f; if(lastHitTime > 0.0f) { lastHitTime -= dt * 1000.0f; if(lastHitTime < 0) lastHitTime = 0; } return (lifetime > 0.0f); } float ShipUpgrade_Shield::getRadius() { return 28.0f; }
; A222134: Decimal expansion of sqrt(5 + sqrt(5 + sqrt(5 + sqrt(5 + ... )))). ; Submitted by Jon Maiga ; 2,7,9,1,2,8,7,8,4,7,4,7,7,9,2,0,0,0,3,2,9,4,0,2,3,5,9,6,8,6,4,0,0,4,2,4,4,4,9,2,2,2,8,2,8,8,3,8,3,9,8,5,9,5,1,3,0,3,6,2,1,0,6,1,9,5,3,4,3,4,2,1,2,7,7,3,8,8,5,4,4,3,3,0,2,1,8,0,7,7,9,7,4,6,7,2,2,5,1,6 mov $1,4 mov $3,$0 mul $3,4 lpb $3 add $5,$2 add $1,$5 add $1,$2 add $2,$1 sub $3,1 mov $5,$2 lpe mov $4,10 pow $4,$0 div $2,$4 add $2,2 div $1,$2 mov $0,$1 mod $0,10
; A030431: Primes of form 10n+3. ; Submitted by Christian Krause ; 3,13,23,43,53,73,83,103,113,163,173,193,223,233,263,283,293,313,353,373,383,433,443,463,503,523,563,593,613,643,653,673,683,733,743,773,823,853,863,883,953,983,1013,1033,1063,1093,1103,1123,1153,1163,1193,1213,1223,1283,1303,1373,1423,1433,1453,1483,1493,1523,1543,1553,1583,1613,1663,1693,1723,1733,1753,1783,1823,1873,1913,1933,1973,1993,2003,2053,2063,2083,2113,2143,2153,2203,2213,2243,2273,2293,2333,2383,2393,2423,2473,2503,2543,2593,2633,2663 mov $1,5 mov $2,$0 pow $2,2 lpb $2 sub $1,3 mov $3,$1 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,13 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 sub $2,1 lpe mov $0,$1 sub $0,2
#include <bits/stdc++.h> using namespace std; int main() { int n; while(cin >> n) { vector<int> defs; int oneAgo = -1,counter = n; bool x = false; while(n --) { int tmp; cin >> tmp; if(x) defs.push_back(abs(oneAgo - tmp)); oneAgo = tmp; x = true; } sort(defs.begin(),defs.end()); bool jolly = true; for(int i = 1;i < counter;i ++) { //cout << defs[i - 1] << " "; if(defs[i - 1] != i) { jolly = false; //break; } } if(jolly) cout << "Jolly"; else cout << "Not jolly"; cout << endl; } return 0; }
.MODEL SMALL .STACK 100 .DATA VAL DB 4 .CODE MAIN PROC MOV AX,@DATA MOV DS,AX MOV AH, 02H MOV DL, VAL DEC DL ADD DL, 30H INT 21H MOV DL, ',' INT 21H INC DL INT 21H MOV DL, ',' INT 21H INC DL INT 21H MOV AX,4C00H INT 21H MAIN ENDP END MAIN
asm_mlu1: PAequDustYIdxYmulQ: ; "ASM MLU1 : TESTGOOD" ; "Y1 = dustY[Y]hi and P.A = Y1 7bit * Q A = low, P = hi" ld hl, varDustY ; ld a, (regY) ; add hl,a ; add hl,a ; ; inc hl STICK TO Lo for now ld a, (hl) ; a = dustY[a] ld (varY1),a ; Y1 = a and SignMask8Bit ; ld d,a ; d = a ld a,(varQ) ld e,a ; e = q mul ; de = a * q ld (varP),de ; P = d ld a,e ; a = e ret
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %r9 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x121d, %rdx nop nop nop cmp $50786, %rbp movb $0x61, (%rdx) nop cmp $25084, %r13 lea addresses_UC_ht+0x1072d, %rsi lea addresses_normal_ht+0x1506d, %rdi nop nop sub %r9, %r9 mov $82, %rcx rep movsq nop nop inc %rcx lea addresses_A_ht+0x1d595, %rbp nop cmp $33146, %r13 movb (%rbp), %cl nop add $37340, %rdi lea addresses_WC_ht+0x8ffd, %rsi lea addresses_WT_ht+0xa53b, %rdi nop nop nop nop nop sub %r14, %r14 mov $25, %rcx rep movsq nop nop nop nop nop dec %r9 lea addresses_A_ht+0x1e885, %rdx clflush (%rdx) sub $16560, %rsi movb (%rdx), %r9b nop nop nop nop nop and $1110, %rbp lea addresses_WT_ht+0x986d, %rcx nop nop nop dec %r13 mov (%rcx), %r14 nop nop nop nop nop and $55044, %rcx lea addresses_D_ht+0x5ead, %r14 nop nop nop and $711, %r13 movb (%r14), %cl nop nop xor %r13, %r13 lea addresses_WC_ht+0x4c2d, %r13 nop nop dec %rcx movb (%r13), %r9b nop add %r13, %r13 lea addresses_WC_ht+0x969b, %rsi lea addresses_normal_ht+0x2e1d, %rdi xor $8252, %r13 mov $13, %rcx rep movsl nop nop nop nop cmp %rdx, %rdx lea addresses_normal_ht+0x1ee6d, %rdx nop xor %r9, %r9 movw $0x6162, (%rdx) nop nop nop nop and $799, %rsi lea addresses_WT_ht+0x1ce6d, %rsi lea addresses_D_ht+0x43dc, %rdi clflush (%rdi) nop xor %rbp, %rbp mov $43, %rcx rep movsq nop nop nop sub $10379, %rbp lea addresses_normal_ht+0x10ded, %r13 nop and $23582, %r9 movb (%r13), %dl xor $45463, %r9 lea addresses_UC_ht+0xa42d, %rcx nop nop nop nop nop add %rsi, %rsi movb $0x61, (%rcx) nop nop nop nop and %r9, %r9 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %rbp push %rbx push %rcx push %rdx // Store mov $0x509f2b000000011d, %rcx clflush (%rcx) nop add $7390, %rdx movw $0x5152, (%rcx) add $50591, %rdx // Store lea addresses_D+0x1c78d, %rcx nop nop inc %rbp movw $0x5152, (%rcx) add %rbp, %rbp // Store lea addresses_WC+0x1a6fd, %r14 nop nop nop nop nop xor $2974, %r10 mov $0x5152535455565758, %rdx movq %rdx, %xmm3 movups %xmm3, (%r14) nop nop cmp %rbp, %rbp // Faulty Load mov $0x7d37d80000000e6d, %rbx nop nop nop nop nop add $52663, %r10 mov (%rbx), %r14 lea oracles, %rbp and $0xff, %r14 shlq $12, %r14 mov (%rbp,%r14,1), %r14 pop %rdx pop %rcx pop %rbx pop %rbp pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_NC'}} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 2, 'NT': True, 'type': 'addresses_D'}} {'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WC'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 3, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 1, 'same': True, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_D_ht'}} {'src': {'congruent': 7, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_UC_ht'}} {'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 */
; A073705: a(n) = Sum_{ d divides n } (n/d)^(2d). ; Submitted by Jamie Morken(s2) ; 1,5,10,33,26,182,50,577,811,1750,122,16194,170,18982,74900,135425,290,847127,362,2498178,4901060,4209430,530,78564226,9766251,67138102,387952660,542674914,842,4866184552,962,8606778369,31382832260,17179953862,6385992100,422091411267,1370,274878038710,2541870656660,2352785049602,1682,27367052143144,1850,35184586683906,209709327537326,70368744459622,2210,2418860418750338,678223075251,1221277338876375,16677181723806740,9007200070931394,2810,168210876227232584,2384211728443252,144152820529343426 add $0,1 mov $1,1 mov $2,$0 lpb $0 mov $3,$2 dif $3,$0 mov $4,$3 cmp $3,$2 cmp $3,0 mul $3,$0 sub $0,1 mul $4,2 pow $3,$4 add $1,$3 lpe mov $0,$1
// Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. // This file is copied from LevelDB and modifed a little // to add LevelDB style benchmark #include <math.h> #include <stdio.h> #include "histogram.h" namespace cascadb { const double Histogram::kBucketLimit[kNumBuckets] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, 90, 100, 120, 140, 160, 180, 200, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 6000, 7000, 8000, 9000, 10000, 12000, 14000, 16000, 18000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 60000, 70000, 80000, 90000, 100000, 120000, 140000, 160000, 180000, 200000, 250000, 300000, 350000, 400000, 450000, 500000, 600000, 700000, 800000, 900000, 1000000, 1200000, 1400000, 1600000, 1800000, 2000000, 2500000, 3000000, 3500000, 4000000, 4500000, 5000000, 6000000, 7000000, 8000000, 9000000, 10000000, 12000000, 14000000, 16000000, 18000000, 20000000, 25000000, 30000000, 35000000, 40000000, 45000000, 50000000, 60000000, 70000000, 80000000, 90000000, 100000000, 120000000, 140000000, 160000000, 180000000, 200000000, 250000000, 300000000, 350000000, 400000000, 450000000, 500000000, 600000000, 700000000, 800000000, 900000000, 1000000000, 1200000000, 1400000000, 1600000000, 1800000000, 2000000000, 2500000000.0, 3000000000.0, 3500000000.0, 4000000000.0, 4500000000.0, 5000000000.0, 6000000000.0, 7000000000.0, 8000000000.0, 9000000000.0, 1e200, }; void Histogram::Clear() { min_ = kBucketLimit[kNumBuckets-1]; max_ = 0; num_ = 0; sum_ = 0; sum_squares_ = 0; for (int i = 0; i < kNumBuckets; i++) { buckets_[i] = 0; } } void Histogram::Add(double value) { // Linear search is fast enough for our usage in db_bench int b = 0; while (b < kNumBuckets - 1 && kBucketLimit[b] <= value) { b++; } buckets_[b] += 1.0; if (min_ > value) min_ = value; if (max_ < value) max_ = value; num_++; sum_ += value; sum_squares_ += (value * value); } void Histogram::Merge(const Histogram& other) { if (other.min_ < min_) min_ = other.min_; if (other.max_ > max_) max_ = other.max_; num_ += other.num_; sum_ += other.sum_; sum_squares_ += other.sum_squares_; for (int b = 0; b < kNumBuckets; b++) { buckets_[b] += other.buckets_[b]; } } double Histogram::Median() const { return Percentile(50.0); } double Histogram::Percentile(double p) const { double threshold = num_ * (p / 100.0); double sum = 0; for (int b = 0; b < kNumBuckets; b++) { sum += buckets_[b]; if (sum >= threshold) { // Scale linearly within this bucket double left_point = (b == 0) ? 0 : kBucketLimit[b-1]; double right_point = kBucketLimit[b]; double left_sum = sum - buckets_[b]; double right_sum = sum; double pos = (threshold - left_sum) / (right_sum - left_sum); double r = left_point + (right_point - left_point) * pos; if (r < min_) r = min_; if (r > max_) r = max_; return r; } } return max_; } double Histogram::Average() const { if (num_ == 0.0) return 0; return sum_ / num_; } double Histogram::StandardDeviation() const { if (num_ == 0.0) return 0; double variance = (sum_squares_ * num_ - sum_ * sum_) / (num_ * num_); return sqrt(variance); } std::string Histogram::ToString() const { std::string r; char buf[200]; snprintf(buf, sizeof(buf), "Count: %.0f Average: %.4f StdDev: %.2f\n", num_, Average(), StandardDeviation()); r.append(buf); snprintf(buf, sizeof(buf), "Min: %.4f Median: %.4f Max: %.4f\n", (num_ == 0.0 ? 0.0 : min_), Median(), max_); r.append(buf); r.append("------------------------------------------------------\n"); const double mult = 100.0 / num_; double sum = 0; for (int b = 0; b < kNumBuckets; b++) { if (buckets_[b] <= 0.0) continue; sum += buckets_[b]; snprintf(buf, sizeof(buf), "[ %7.0f, %7.0f ) %7.0f %7.3f%% %7.3f%% ", ((b == 0) ? 0.0 : kBucketLimit[b-1]), // left kBucketLimit[b], // right buckets_[b], // count mult * buckets_[b], // percentage mult * sum); // cumulative percentage r.append(buf); // Add hash marks based on percentage; 20 marks for 100%. int marks = static_cast<int>(20*(buckets_[b] / num_) + 0.5); r.append(marks, '#'); r.push_back('\n'); } return r; } } // namespace leveldb
; A023610: Convolution of Fibonacci numbers and {F(2), F(3), F(4), ...}. ; Submitted by Jon Maiga ; 1,3,7,15,30,58,109,201,365,655,1164,2052,3593,6255,10835,18687,32106,54974,93845,159765,271321,459743,777432,1312200,2211025,3719643,6248479,10482351,17562870,29391490,49132669,82048737,136884293,228160495,379975140,632293452,1051356761,1746896199,2900587115,4813063455,7981564866,13228122758,21911096357,36274122285,60021530545,99266867903,164095925424,271141535376,447823729825,739330276275,1220105286199,2012751853647,3319124711118,5471460427210,9016436572045,14853332295417,24461055597341 mov $1,4 mov $3,$0 add $3,$0 add $0,2 add $1,$3 mov $2,$1 mov $4,$1 sub $4,3 mul $4,2 lpb $0 sub $0,1 add $4,$1 mov $1,$2 mov $2,$4 lpe mov $0,$2 div $0,10
53_Header: sHeaderInit ; Z80 offset is $C58C sHeaderPatch 53_Patches sHeaderTick $01 sHeaderCh $01 sHeaderSFX $80, $C0, 53_PSG3, $00, $00 53_PSG3: sNoisePSG $E7 saVolPSG $03 dc.b nG3, $10 sStop 53_Patches:
; A198276: 19*2^n-1. ; 18,37,75,151,303,607,1215,2431,4863,9727,19455,38911,77823,155647,311295,622591,1245183,2490367,4980735,9961471,19922943,39845887,79691775,159383551,318767103,637534207,1275068415,2550136831,5100273663,10200547327,20401094655,40802189311,81604378623,163208757247,326417514495,652835028991,1305670057983,2611340115967,5222680231935,10445360463871,20890720927743,41781441855487,83562883710975,167125767421951,334251534843903,668503069687807,1337006139375615,2674012278751231,5348024557502463 mov $1,2 pow $1,$0 sub $1,1 mul $1,19 add $1,18
SECTION code_fp_math48 PUBLIC expm1 EXTERN cm48_sccz80_expm1 defc expm1 = cm48_sccz80_expm1
/* * FFI.cpp - * * Copyright (c) 2008 Higepon(Taro Minowa) <higepon@users.sourceforge.jp> * * 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. * * $Id: FFI.cpp 183 2008-07-04 06:19:28Z higepon $ */ #ifdef _WIN32 #include <windows.h> #else #include <dlfcn.h> #endif #include "scheme.h" #include "Object.h" #include "Object-inl.h" #include "SString.h" #include "Pair.h" #include "Pair-inl.h" #include "ByteVector.h" #include "Bignum.h" #include "Ratnum.h" #include "Flonum.h" #include "Arithmetic.h" #include "FFI.h" #include "StringProcedures.h" using namespace scheme; /* * A part of FFI functions are originally from Ypsilon Scheme by Yoshikatsu Fujita. * They are ported or modified for Mosh. */ void* FFI::open(const char* name) { #ifdef _WIN32 return (void *)LoadLibraryA(name); // FIXME : handle MBCS path #else return dlopen(name, RTLD_LAZY | RTLD_GLOBAL); #endif } void* FFI::lookup(void* handle, const char* symbol) { #ifdef _WIN32 return (void *)GetProcAddress((HMODULE)handle,symbol); #else return dlsym(handle, symbol); #endif } int FFI::close(void* handle) { #ifdef _WIN32 return FreeLibrary((HMODULE)handle); #else return dlclose(handle); #endif } const char* FFI::lastError() { #ifdef _WIN32 return "win32 error"; //FIXME : stub #else return dlerror(); #endif } #ifdef ARCH_X86_64 CStack::CStack() : count_(0), xmmCount_(0), regCount_(0) { memset(frame_, 0, sizeof(frame_)); memset(xmm_, 0, sizeof(xmm_)); memset(reg_, 0, sizeof(reg_)); } bool CStack::pushIntptr_t(intptr_t val) { if (regCount_ < (int)(sizeof(reg_) / sizeof(intptr_t))) { reg_[regCount_++] = val; return true; } else if (count_ < MAX_ARGC) { frame_[count_++] = val; return true; } else { lastError_ = UC("too many ffi arguments"); return false; } } bool CStack::pushInt64_t(int64_t val) { return pushIntptr_t(val); } // argument is double bool CStack::pushFloat(double val) { if (xmmCount_ < (int)(sizeof(xmm_) / sizeof(intptr_t))) { union { int64_t value; struct { float low; int32_t high; } u32; } v; v.u32.low = (double)val; v.u32.high = -1; xmm_[xmmCount_++] = v.value; return true; } else if (count_ < MAX_ARGC) { union { int64_t value; struct { float low; int32_t high; } u32; } v; v.u32.low = (double)val; v.u32.high = -1; frame_[count_++] = v.value; return true; } else { lastError_ = UC("too many ffi arguments"); return false; } } bool CStack::pushDouble(double val) { if (xmmCount_ < (int)(sizeof(xmm_) / sizeof(intptr_t))) { union { double fvalue; uint64_t uval; } v; v.fvalue = val; xmm_[xmmCount_++] = v.uval; return true; } else if (count_ < MAX_ARGC) { union { double fvalue; uint64_t uval; } v; v.fvalue = val; frame_[count_++] = v.uval; return true; } else { lastError_ = UC("too many ffi arguments"); return false; } } #else CStack::CStack() : count_(0) { memset(frame_, 0, sizeof(frame_)); } bool CStack::pushIntptr_t(intptr_t val) { if (count_ < MAX_ARGC) { frame_[count_++] = val; return true; } else { lastError_ = UC("too many ffi arguments"); return false; } } bool CStack::pushFloat(double val) { if (count_ < MAX_ARGC) { union { float f32; uintptr_t u32; } n; n.f32 = (float)val; frame_[count_++] = n.u32; return true; } else { lastError_ = UC("too many ffi arguments"); return false; } } bool CStack::pushInt64_t(int64_t val) { if (MAX_ARGC - count_ < 2) { lastError_ = UC("too many ffi int64_t arguments"); return false; } union { int64_t value; struct { uint32_t low; uint32_t high; } u32; } v; v.value = val; frame_[count_++] = v.u32.low; frame_[count_++] = v.u32.high; return true; } bool CStack::pushDouble(double val) { if (MAX_ARGC - count_ < 2) { lastError_ = UC("too many ffi double arguments"); return false; } union { double fvalue; struct { uint32_t low; uint32_t high; } u32; } v; v.fvalue = val; frame_[count_++] = v.u32.low; frame_[count_++] = v.u32.high; return true; } #endif CStack::~CStack() { } intptr_t* CStack::frame() { return frame_; } int CStack::count() const { return count_; } bool CStack::push(Object obj, ucs4char signature) { // Fixnum -> int if (obj.isFixnum()) { switch (signature) { case SIGNATURE_BOOL: lastError_ = format(NULL, UC("'bool' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT: return pushIntptr_t(obj.toFixnum()); case SIGNATURE_FLOAT: lastError_ = format(NULL, UC("'float' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_DOUBLE: lastError_ = format(NULL, UC("'double' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT64: return pushInt64_t(obj.toFixnum()); case SIGNATURE_POINTER: lastError_ = format(NULL, UC("'pointer' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; default: MOSH_ASSERT(false); return false; } // Flonum -> double } else if (obj.isFlonum()) { switch (signature) { case SIGNATURE_BOOL: lastError_ = format(NULL, UC("'bool' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT: lastError_ = format(NULL, UC("'int' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_FLOAT: return pushFloat(obj.toFlonum()->value()); case SIGNATURE_DOUBLE: return pushDouble(obj.toFlonum()->value()); case SIGNATURE_INT64: lastError_ = format(NULL, UC("'int64_t' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_POINTER: lastError_ = format(NULL, UC("'pointer' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; default: MOSH_ASSERT(false); return false; } } else if (obj.isBignum()) { switch (signature) { case SIGNATURE_BOOL: lastError_ = format(NULL, UC("'bool' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT: return pushIntptr_t(obj.toBignum()->toS64()); case SIGNATURE_FLOAT: lastError_ = format(NULL, UC("'float' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_DOUBLE: lastError_ = format(NULL, UC("'double' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT64: return pushInt64_t(obj.toBignum()->toS64()); case SIGNATURE_POINTER: lastError_ = format(NULL, UC("'pointer' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; default: MOSH_ASSERT(false); return false; } // String -> char* (utf-8 ascii only) } else if (obj.isString()) { switch (signature) { case SIGNATURE_BOOL: lastError_ = format(NULL, UC("'bool' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT: lastError_ = format(NULL, UC("'int' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_FLOAT: lastError_ = format(NULL, UC("'float' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_DOUBLE: lastError_ = format(NULL, UC("'double' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT64: lastError_ = format(NULL, UC("'int64_t' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_POINTER: return pushIntptr_t((intptr_t)(obj.toString()->data().ascii_c_str())); default: MOSH_ASSERT(false); return false; } // ByteVector -> char* } else if (obj.isByteVector()) { switch (signature) { case SIGNATURE_BOOL: lastError_ = format(NULL, UC("'bool' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT: lastError_ = format(NULL, UC("'int' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_FLOAT: lastError_ = format(NULL, UC("'float' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_DOUBLE: lastError_ = format(NULL, UC("'double' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT64: lastError_ = format(NULL, UC("'int64_t' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_POINTER: return pushIntptr_t((intptr_t)(obj.toByteVector()->data())); default: MOSH_ASSERT(false); return false; } } else if (obj.isPointer()) { switch (signature) { case SIGNATURE_BOOL: lastError_ = format(NULL, UC("'bool' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT: lastError_ = format(NULL, UC("'int' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_FLOAT: lastError_ = format(NULL, UC("'float' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_DOUBLE: lastError_ = format(NULL, UC("'double' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT64: lastError_ = format(NULL, UC("'int64_t' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_POINTER: return pushIntptr_t(obj.toPointer()->pointer()); default: MOSH_ASSERT(false); return false; } } else if (obj.isBoolean()) { switch (signature) { case SIGNATURE_BOOL: return pushIntptr_t(obj.isTrue() ? 1 : 0); case SIGNATURE_INT: lastError_ = format(NULL, UC("'int' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_FLOAT: lastError_ = format(NULL, UC("'float' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_DOUBLE: lastError_ = format(NULL, UC("'double' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_INT64: lastError_ = format(NULL, UC("'int64_t' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; case SIGNATURE_POINTER: lastError_ = format(NULL, UC("'pointer' required but got ~a"), Pair::list1(obj)).toString()->data(); return false; default: MOSH_ASSERT(false); return false; } } else { lastError_ = UC("unsupported ffi argument"); return false; } } const ucs4char* CStack::getLastError() const { return lastError_.c_str(); }
; A109053: a(n) = lcm(n,12). ; 0,12,12,12,12,60,12,84,24,36,60,132,12,156,84,60,48,204,36,228,60,84,132,276,24,300,156,108,84,348,60,372,96,132,204,420,36,444,228,156,120,492,84,516,132,180,276,564,48,588,300,204,156,636,108,660,168,228,348,708,60,732,372,252,192,780,132,804,204,276,420,852,72,876,444,300,228,924,156,948,240,324,492,996,84,1020,516,348,264,1068,180,1092,276,372,564,1140,96,1164,588,396,300,1212,204,1236,312,420,636,1284,108,1308,660,444,336,1356,228,1380,348,468,708,1428,120,1452,732,492,372,1500,252,1524,384,516,780,1572,132,1596,804,540,408,1644,276,1668,420,564,852,1716,144,1740,876,588,444,1788,300,1812,456,612,924,1860,156,1884,948,636,480,1932,324,1956,492,660,996,2004,168,2028,1020,684,516,2076,348,2100,528,708,1068,2148,180,2172,1092,732,552,2220,372,2244,564,756,1140,2292,192,2316,1164,780,588,2364,396,2388,600,804,1212,2436,204,2460,1236,828,624,2508,420,2532,636,852,1284,2580,216,2604,1308,876,660,2652,444,2676,672,900,1356,2724,228,2748,1380,924,696,2796,468,2820,708,948,1428,2868,240,2892,1452,972,732,2940,492,2964,744,996 mov $1,$0 gcd $0,12 div $1,$0 mul $1,12
; A014689: a(n) = prime(n)-n, the number of nonprimes less than prime(n). ; 1,1,2,3,6,7,10,11,14,19,20,25,28,29,32,37,42,43,48,51,52,57,60,65,72,75,76,79,80,83,96,99,104,105,114,115,120,125,128,133,138,139,148,149,152,153,164,175,178,179,182,187,188,197,202,207,212,213,218,221,222,231,244,247,248,251,264,269,278,279,282,287,294,299,304,307,312,319,322,329,338,339,348,349,354,357,362,369,372,373,376,387,394,397,404,407,412,423,424,441 mov $2,$0 seq $0,6005 ; The odd prime numbers together with 1. sub $0,$2 trn $0,2 add $0,1
; A017535: a(n) = (12*n+1)^3. ; 1,2197,15625,50653,117649,226981,389017,614125,912673,1295029,1771561,2352637,3048625,3869893,4826809,5929741,7189057,8615125,10218313,12008989,13997521,16194277,18609625,21253933,24137569,27270901,30664297,34328125,38272753,42508549,47045881,51895117,57066625,62570773,68417929,74618461,81182737,88121125,95443993,103161709,111284641,119823157,128787625,138188413,148035889,158340421,169112377,180362125,192100033,204336469,217081801,230346397,244140625,258474853,273359449,288804781,304821217 mul $0,12 add $0,1 pow $0,3
; A097730: Pell equation solutions (6*b(n))^2 - 37*a(n)^2 = -1 with b(n)=A097729(n), n >= 0. ; Submitted by Christian Krause ; 1,145,21169,3090529,451196065,65871534961,9616792908241,1403985893068225,204972323595052609,29924555258984612689,4368780095488158399985,637811969386012141785121,93116178750262284542227681,13594324285568907531023456305,1984678229514310237244882392849,289749427184803725730221805899649,42301431690751829646375138778955905,6175719277422582324645040039921662481,901612713072006267568529470689783766321,131629280389235492482680657680668508220385,19216973324115309896203807491906912416409889 add $0,1 mov $3,1 lpb $0 sub $0,$3 mov $1,$4 mul $1,144 add $2,1 add $2,$1 sub $4,1 add $4,$2 lpe mov $0,$4 mul $0,144 add $0,1
#include "myfunc.H" #include "myfunc_F.H" void advance (MultiFab& phi_old, MultiFab& phi_new, Array<MultiFab, AMREX_SPACEDIM>& flux, Real dt, Geometry const& geom) { // Fill the ghost cells of each grid from the other grids // includes periodic domain boundaries phi_old.FillBoundary(geom.periodicity()); // // Note that this simple example is not optimized. // The following two MFIter loops could be merged // and we do not have to use flux MultiFab. // // ======================================================= const Real dxinv = geom.InvCellSize(0); const Real dyinv = geom.InvCellSize(1); const Real dzinv = geom.InvCellSize(2); int Ncomp = phi_old.nComp(); int ng_p = phi_old.nGrow(); int ng_f = flux[0].nGrow(); // Compute fluxes one grid at a time for(MFIter mfi(phi_old, TilingIfNotGPU()); mfi.isValid(); ++mfi) { const Box& xbx = mfi.nodaltilebox(0); const Box& ybx = mfi.nodaltilebox(1); const Box& zbx = mfi.nodaltilebox(2); FArrayBox* phi_fab = phi_old.fabPtr(mfi); FArrayBox* fluxx = flux[0].fabPtr(mfi); FArrayBox* fluxy = flux[1].fabPtr(mfi); FArrayBox* fluxz = flux[2].fabPtr(mfi); compute_flux_x(BL_TO_FORTRAN_BOX(xbx), BL_TO_FORTRAN_ANYD(*fluxx), BL_TO_FORTRAN_ANYD(*phi_fab), dxinv); compute_flux_y(BL_TO_FORTRAN_BOX(ybx), BL_TO_FORTRAN_ANYD(*fluxy), BL_TO_FORTRAN_ANYD(*phi_fab), dyinv); compute_flux_z(BL_TO_FORTRAN_BOX(zbx), BL_TO_FORTRAN_ANYD(*fluxz), BL_TO_FORTRAN_ANYD(*phi_fab), dzinv); } Gpu::Device::synchronize(); for(MFIter mfi(phi_old, TilingIfNotGPU()); mfi.isValid(); ++mfi) { const Box& bx = mfi.tilebox(); const FArrayBox* pold_fab = phi_old.fabPtr(mfi); const FArrayBox* fluxx = flux[0].fabPtr(mfi); const FArrayBox* fluxy = flux[1].fabPtr(mfi); const FArrayBox* fluxz = flux[2].fabPtr(mfi); FArrayBox* pnew_fab = phi_new.fabPtr(mfi); update_phi(BL_TO_FORTRAN_BOX(bx), BL_TO_FORTRAN_ANYD(*fluxx), BL_TO_FORTRAN_ANYD(*fluxy), BL_TO_FORTRAN_ANYD(*fluxz), BL_TO_FORTRAN_ANYD(*pold_fab), BL_TO_FORTRAN_ANYD(*pnew_fab), dt,dxinv,dyinv ,dzinv ); } Gpu::Device::synchronize(); } void init_phi(MultiFab& phi_new, Geometry const& geom) { GpuArray<Real,AMREX_SPACEDIM> dx = geom.CellSizeArray(); GpuArray<Real,AMREX_SPACEDIM> prob_lo = geom.ProbLoArray(); for(MFIter mfi(phi_new, TilingIfNotGPU()); mfi.isValid(); ++mfi) { const Box& bx = mfi.tilebox(); FArrayBox& fab = phi_new[mfi]; init_phi(BL_TO_FORTRAN_BOX(bx), BL_TO_FORTRAN_ANYD(fab), dx.data(),prob_lo.data()); } }