text
stringlengths
1
1.05M
/* * Copyright (C) 2005 The Android Open Source Project * * 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. */ #define LOG_TAG "Vector" #include <string.h> #include <stdlib.h> #include <stdio.h> #include <cutils/log.h> #include <safe_iop.h> #include <utils/Errors.h> #include <utils/SharedBuffer.h> #include <utils/VectorImpl.h> /*****************************************************************************/ namespace android { // ---------------------------------------------------------------------------- const size_t kMinVectorCapacity = 4; static inline size_t max(size_t a, size_t b) { return a>b ? a : b; } // ---------------------------------------------------------------------------- VectorImpl::VectorImpl(size_t itemSize, uint32_t flags) : mStorage(0), mCount(0), mFlags(flags), mItemSize(itemSize) { } VectorImpl::VectorImpl(const VectorImpl& rhs) : mStorage(rhs.mStorage), mCount(rhs.mCount), mFlags(rhs.mFlags), mItemSize(rhs.mItemSize) { if (mStorage) { SharedBuffer::bufferFromData(mStorage)->acquire(); } } VectorImpl::~VectorImpl() { ALOGW_IF(mCount, "[%p] subclasses of VectorImpl must call finish_vector()" " in their destructor. Leaking %d bytes.", this, (int)(mCount*mItemSize)); // We can't call _do_destroy() here because the vtable is already gone. } VectorImpl& VectorImpl::operator = (const VectorImpl& rhs) { LOG_ALWAYS_FATAL_IF(mItemSize != rhs.mItemSize, "Vector<> have different types (this=%p, rhs=%p)", this, &rhs); if (this != &rhs) { release_storage(); if (rhs.mCount) { mStorage = rhs.mStorage; mCount = rhs.mCount; SharedBuffer::bufferFromData(mStorage)->acquire(); } else { mStorage = 0; mCount = 0; } } return *this; } void* VectorImpl::editArrayImpl() { if (mStorage) { const SharedBuffer* sb = SharedBuffer::bufferFromData(mStorage); SharedBuffer* editable = sb->attemptEdit(); if (editable == 0) { // If we're here, we're not the only owner of the buffer. // We must make a copy of it. editable = SharedBuffer::alloc(sb->size()); // Fail instead of returning a pointer to storage that's not // editable. Otherwise we'd be editing the contents of a buffer // for which we're not the only owner, which is undefined behaviour. LOG_ALWAYS_FATAL_IF(editable == NULL); _do_copy(editable->data(), mStorage, mCount); release_storage(); mStorage = editable->data(); } } return mStorage; } size_t VectorImpl::capacity() const { if (mStorage) { return SharedBuffer::bufferFromData(mStorage)->size() / mItemSize; } return 0; } ssize_t VectorImpl::insertVectorAt(const VectorImpl& vector, size_t index) { return insertArrayAt(vector.arrayImpl(), index, vector.size()); } ssize_t VectorImpl::appendVector(const VectorImpl& vector) { return insertVectorAt(vector, size()); } ssize_t VectorImpl::insertArrayAt(const void* array, size_t index, size_t length) { if (index > size()) return BAD_INDEX; void* where = _grow(index, length); if (where) { _do_copy(where, array, length); } return where ? index : (ssize_t)NO_MEMORY; } ssize_t VectorImpl::appendArray(const void* array, size_t length) { return insertArrayAt(array, size(), length); } ssize_t VectorImpl::insertAt(size_t index, size_t numItems) { return insertAt(0, index, numItems); } ssize_t VectorImpl::insertAt(const void* item, size_t index, size_t numItems) { if (index > size()) return BAD_INDEX; void* where = _grow(index, numItems); if (where) { if (item) { _do_splat(where, item, numItems); } else { _do_construct(where, numItems); } } return where ? index : (ssize_t)NO_MEMORY; } static int sortProxy(const void* lhs, const void* rhs, void* func) { return (*(VectorImpl::compar_t)func)(lhs, rhs); } status_t VectorImpl::sort(VectorImpl::compar_t cmp) { return sort(sortProxy, (void*)cmp); } status_t VectorImpl::sort(VectorImpl::compar_r_t cmp, void* state) { // the sort must be stable. we're using insertion sort which // is well suited for small and already sorted arrays // for big arrays, it could be better to use mergesort const ssize_t count = size(); if (count > 1) { void* array = const_cast<void*>(arrayImpl()); void* temp = 0; ssize_t i = 1; while (i < count) { void* item = reinterpret_cast<char*>(array) + mItemSize*(i); void* curr = reinterpret_cast<char*>(array) + mItemSize*(i-1); if (cmp(curr, item, state) > 0) { if (!temp) { // we're going to have to modify the array... array = editArrayImpl(); if (!array) return NO_MEMORY; temp = malloc(mItemSize); if (!temp) return NO_MEMORY; item = reinterpret_cast<char*>(array) + mItemSize*(i); curr = reinterpret_cast<char*>(array) + mItemSize*(i-1); } else { _do_destroy(temp, 1); } _do_copy(temp, item, 1); ssize_t j = i-1; void* next = reinterpret_cast<char*>(array) + mItemSize*(i); do { _do_destroy(next, 1); _do_copy(next, curr, 1); next = curr; --j; curr = reinterpret_cast<char*>(array) + mItemSize*(j); } while (j>=0 && (cmp(curr, temp, state) > 0)); _do_destroy(next, 1); _do_copy(next, temp, 1); } i++; } if (temp) { _do_destroy(temp, 1); free(temp); } } return NO_ERROR; } void VectorImpl::pop() { if (size()) removeItemsAt(size()-1, 1); } void VectorImpl::push() { push(0); } void VectorImpl::push(const void* item) { insertAt(item, size()); } ssize_t VectorImpl::add() { return add(0); } ssize_t VectorImpl::add(const void* item) { return insertAt(item, size()); } ssize_t VectorImpl::replaceAt(size_t index) { return replaceAt(0, index); } ssize_t VectorImpl::replaceAt(const void* prototype, size_t index) { ALOG_ASSERT(index<size(), "[%p] replace: index=%d, size=%d", this, (int)index, (int)size()); if (index >= size()) { return BAD_INDEX; } void* item = editItemLocation(index); if (item != prototype) { if (item == 0) return NO_MEMORY; _do_destroy(item, 1); if (prototype == 0) { _do_construct(item, 1); } else { _do_copy(item, prototype, 1); } } return ssize_t(index); } ssize_t VectorImpl::removeItemsAt(size_t index, size_t count) { ALOG_ASSERT((index+count)<=size(), "[%p] remove: index=%d, count=%d, size=%d", this, (int)index, (int)count, (int)size()); if ((index+count) > size()) return BAD_VALUE; _shrink(index, count); return index; } void VectorImpl::finish_vector() { release_storage(); mStorage = 0; mCount = 0; } void VectorImpl::clear() { _shrink(0, mCount); } void* VectorImpl::editItemLocation(size_t index) { ALOG_ASSERT(index<capacity(), "[%p] editItemLocation: index=%d, capacity=%d, count=%d", this, (int)index, (int)capacity(), (int)mCount); if (index < capacity()) { void* buffer = editArrayImpl(); if (buffer) { return reinterpret_cast<char*>(buffer) + index*mItemSize; } } return 0; } const void* VectorImpl::itemLocation(size_t index) const { ALOG_ASSERT(index<capacity(), "[%p] itemLocation: index=%d, capacity=%d, count=%d", this, (int)index, (int)capacity(), (int)mCount); if (index < capacity()) { const void* buffer = arrayImpl(); if (buffer) { return reinterpret_cast<const char*>(buffer) + index*mItemSize; } } return 0; } ssize_t VectorImpl::setCapacity(size_t new_capacity) { // The capacity must always be greater than or equal to the size // of this vector. if (new_capacity <= size()) { return capacity(); } size_t new_allocation_size = 0; LOG_ALWAYS_FATAL_IF(!safe_mul(&new_allocation_size, new_capacity, mItemSize)); SharedBuffer* sb = SharedBuffer::alloc(new_allocation_size); if (sb) { void* array = sb->data(); _do_copy(array, mStorage, size()); release_storage(); mStorage = const_cast<void*>(array); } else { return NO_MEMORY; } return new_capacity; } ssize_t VectorImpl::resize(size_t size) { ssize_t result = NO_ERROR; if (size > mCount) { result = insertAt(mCount, size - mCount); } else if (size < mCount) { result = removeItemsAt(size, mCount - size); } return result < 0 ? result : size; } void VectorImpl::release_storage() { if (mStorage) { const SharedBuffer* sb = SharedBuffer::bufferFromData(mStorage); if (sb->release(SharedBuffer::eKeepStorage) == 1) { _do_destroy(mStorage, mCount); SharedBuffer::dealloc(sb); } } } void* VectorImpl::_grow(size_t where, size_t amount) { // ALOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d", // this, (int)where, (int)amount, (int)mCount, (int)capacity()); ALOG_ASSERT(where <= mCount, "[%p] _grow: where=%d, amount=%d, count=%d", this, (int)where, (int)amount, (int)mCount); // caller already checked size_t new_size; LOG_ALWAYS_FATAL_IF(!safe_add(&new_size, mCount, amount), "new_size overflow"); if (capacity() < new_size) { // NOTE: This implementation used to resize vectors as per ((3*x + 1) / 2) // (sigh..). Also note, the " + 1" was necessary to handle the special case // where x == 1, where the resized_capacity will be equal to the old // capacity without the +1. The old calculation wouldn't work properly // if x was zero. // // This approximates the old calculation, using (x + (x/2) + 1) instead. size_t new_capacity = 0; LOG_ALWAYS_FATAL_IF(!safe_add(&new_capacity, new_size, (new_size / 2)), "new_capacity overflow"); LOG_ALWAYS_FATAL_IF(!safe_add(&new_capacity, new_capacity, static_cast<size_t>(1u)), "new_capacity overflow"); new_capacity = max(kMinVectorCapacity, new_capacity); size_t new_alloc_size = 0; LOG_ALWAYS_FATAL_IF(!safe_mul(&new_alloc_size, new_capacity, mItemSize), "new_alloc_size overflow"); // ALOGV("grow vector %p, new_capacity=%d", this, (int)new_capacity); if ((mStorage) && (mCount==where) && (mFlags & HAS_TRIVIAL_COPY) && (mFlags & HAS_TRIVIAL_DTOR)) { const SharedBuffer* cur_sb = SharedBuffer::bufferFromData(mStorage); SharedBuffer* sb = cur_sb->editResize(new_alloc_size); if (sb) { mStorage = sb->data(); } else { return NULL; } } else { SharedBuffer* sb = SharedBuffer::alloc(new_alloc_size); if (sb) { void* array = sb->data(); if (where != 0) { _do_copy(array, mStorage, where); } if (where != mCount) { const void* from = reinterpret_cast<const uint8_t *>(mStorage) + where*mItemSize; void* dest = reinterpret_cast<uint8_t *>(array) + (where+amount)*mItemSize; _do_copy(dest, from, mCount-where); } release_storage(); mStorage = const_cast<void*>(array); } else { return NULL; } } } else { void* array = editArrayImpl(); if (where != mCount) { const void* from = reinterpret_cast<const uint8_t *>(array) + where*mItemSize; void* to = reinterpret_cast<uint8_t *>(array) + (where+amount)*mItemSize; _do_move_forward(to, from, mCount - where); } } mCount = new_size; void* free_space = const_cast<void*>(itemLocation(where)); return free_space; } void VectorImpl::_shrink(size_t where, size_t amount) { if (!mStorage) return; // ALOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d", // this, (int)where, (int)amount, (int)mCount, (int)capacity()); ALOG_ASSERT(where + amount <= mCount, "[%p] _shrink: where=%d, amount=%d, count=%d", this, (int)where, (int)amount, (int)mCount); // caller already checked size_t new_size; LOG_ALWAYS_FATAL_IF(!safe_sub(&new_size, mCount, amount)); if (new_size < (capacity() / 2)) { // NOTE: (new_size * 2) is safe because capacity didn't overflow and // new_size < (capacity / 2)). const size_t new_capacity = max(kMinVectorCapacity, new_size * 2); // NOTE: (new_capacity * mItemSize), (where * mItemSize) and // ((where + amount) * mItemSize) beyond this point are safe because // we are always reducing the capacity of the underlying SharedBuffer. // In other words, (old_capacity * mItemSize) did not overflow, and // where < (where + amount) < new_capacity < old_capacity. if ((where == new_size) && (mFlags & HAS_TRIVIAL_COPY) && (mFlags & HAS_TRIVIAL_DTOR)) { const SharedBuffer* cur_sb = SharedBuffer::bufferFromData(mStorage); SharedBuffer* sb = cur_sb->editResize(new_capacity * mItemSize); if (sb) { mStorage = sb->data(); } else { return; } } else { SharedBuffer* sb = SharedBuffer::alloc(new_capacity * mItemSize); if (sb) { void* array = sb->data(); if (where != 0) { _do_copy(array, mStorage, where); } if (where != new_size) { const void* from = reinterpret_cast<const uint8_t *>(mStorage) + (where+amount)*mItemSize; void* dest = reinterpret_cast<uint8_t *>(array) + where*mItemSize; _do_copy(dest, from, new_size - where); } release_storage(); mStorage = const_cast<void*>(array); } else{ return; } } } else { void* array = editArrayImpl(); void* to = reinterpret_cast<uint8_t *>(array) + where*mItemSize; _do_destroy(to, amount); if (where != new_size) { const void* from = reinterpret_cast<uint8_t *>(array) + (where+amount)*mItemSize; _do_move_backward(to, from, new_size - where); } } mCount = new_size; } size_t VectorImpl::itemSize() const { return mItemSize; } void VectorImpl::_do_construct(void* storage, size_t num) const { if (!(mFlags & HAS_TRIVIAL_CTOR)) { do_construct(storage, num); } } void VectorImpl::_do_destroy(void* storage, size_t num) const { if (!(mFlags & HAS_TRIVIAL_DTOR)) { do_destroy(storage, num); } } void VectorImpl::_do_copy(void* dest, const void* from, size_t num) const { if (!(mFlags & HAS_TRIVIAL_COPY)) { do_copy(dest, from, num); } else { memcpy(dest, from, num*itemSize()); } } void VectorImpl::_do_splat(void* dest, const void* item, size_t num) const { do_splat(dest, item, num); } void VectorImpl::_do_move_forward(void* dest, const void* from, size_t num) const { do_move_forward(dest, from, num); } void VectorImpl::_do_move_backward(void* dest, const void* from, size_t num) const { do_move_backward(dest, from, num); } #ifdef NEEDS_VECTORIMPL_SYMBOLS void VectorImpl::reservedVectorImpl1() { } void VectorImpl::reservedVectorImpl2() { } void VectorImpl::reservedVectorImpl3() { } void VectorImpl::reservedVectorImpl4() { } void VectorImpl::reservedVectorImpl5() { } void VectorImpl::reservedVectorImpl6() { } void VectorImpl::reservedVectorImpl7() { } void VectorImpl::reservedVectorImpl8() { } #endif /*****************************************************************************/ SortedVectorImpl::SortedVectorImpl(size_t itemSize, uint32_t flags) : VectorImpl(itemSize, flags) { } SortedVectorImpl::SortedVectorImpl(const VectorImpl& rhs) : VectorImpl(rhs) { } SortedVectorImpl::~SortedVectorImpl() { } SortedVectorImpl& SortedVectorImpl::operator = (const SortedVectorImpl& rhs) { return static_cast<SortedVectorImpl&>( VectorImpl::operator = (static_cast<const VectorImpl&>(rhs)) ); } ssize_t SortedVectorImpl::indexOf(const void* item) const { return _indexOrderOf(item); } size_t SortedVectorImpl::orderOf(const void* item) const { size_t o; _indexOrderOf(item, &o); return o; } ssize_t SortedVectorImpl::_indexOrderOf(const void* item, size_t* order) const { // binary search ssize_t err = NAME_NOT_FOUND; ssize_t l = 0; ssize_t h = size()-1; ssize_t mid; const void* a = arrayImpl(); const size_t s = itemSize(); while (l <= h) { mid = l + (h - l)/2; const void* const curr = reinterpret_cast<const char *>(a) + (mid*s); const int c = do_compare(curr, item); if (c == 0) { err = l = mid; break; } else if (c < 0) { l = mid + 1; } else { h = mid - 1; } } if (order) *order = l; return err; } ssize_t SortedVectorImpl::add(const void* item) { size_t order; ssize_t index = _indexOrderOf(item, &order); if (index < 0) { index = VectorImpl::insertAt(item, order, 1); } else { index = VectorImpl::replaceAt(item, index); } return index; } ssize_t SortedVectorImpl::merge(const VectorImpl& vector) { // naive merge... if (!vector.isEmpty()) { const void* buffer = vector.arrayImpl(); const size_t is = itemSize(); size_t s = vector.size(); for (size_t i=0 ; i<s ; i++) { ssize_t err = add( reinterpret_cast<const char*>(buffer) + i*is ); if (err<0) { return err; } } } return NO_ERROR; } ssize_t SortedVectorImpl::merge(const SortedVectorImpl& vector) { // we've merging a sorted vector... nice! ssize_t err = NO_ERROR; if (!vector.isEmpty()) { // first take care of the case where the vectors are sorted together if (do_compare(vector.itemLocation(vector.size()-1), arrayImpl()) <= 0) { err = VectorImpl::insertVectorAt(static_cast<const VectorImpl&>(vector), 0); } else if (do_compare(vector.arrayImpl(), itemLocation(size()-1)) >= 0) { err = VectorImpl::appendVector(static_cast<const VectorImpl&>(vector)); } else { // this could be made a little better err = merge(static_cast<const VectorImpl&>(vector)); } } return err; } ssize_t SortedVectorImpl::remove(const void* item) { ssize_t i = indexOf(item); if (i>=0) { VectorImpl::removeItemsAt(i, 1); } return i; } #ifdef NEEDS_VECTORIMPL_SYMBOLS void SortedVectorImpl::reservedSortedVectorImpl1() { }; void SortedVectorImpl::reservedSortedVectorImpl2() { }; void SortedVectorImpl::reservedSortedVectorImpl3() { }; void SortedVectorImpl::reservedSortedVectorImpl4() { }; void SortedVectorImpl::reservedSortedVectorImpl5() { }; void SortedVectorImpl::reservedSortedVectorImpl6() { }; void SortedVectorImpl::reservedSortedVectorImpl7() { }; void SortedVectorImpl::reservedSortedVectorImpl8() { }; #endif /*****************************************************************************/ }; // namespace android
aci -128 ; CE 80 aci 127 ; CE 7F aci 255 ; CE FF adc (hl) ; 8E adc (ix) ; DD 8E 00 adc (ix+127) ; DD 8E 7F adc (ix-128) ; DD 8E 80 adc (iy) ; FD 8E 00 adc (iy+127) ; FD 8E 7F adc (iy-128) ; FD 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 DD 8E 00 adc a', (ix+127) ; 76 DD 8E 7F adc a', (ix-128) ; 76 DD 8E 80 adc a', (iy) ; 76 FD 8E 00 adc a', (iy+127) ; 76 FD 8E 7F adc a', (iy-128) ; 76 FD 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) ; DD 8E 00 adc a, (ix+127) ; DD 8E 7F adc a, (ix-128) ; DD 8E 80 adc a, (iy) ; FD 8E 00 adc a, (iy+127) ; FD 8E 7F adc a, (iy-128) ; FD 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) ; DD 86 00 add (ix+127) ; DD 86 7F add (ix-128) ; DD 86 80 add (iy) ; FD 86 00 add (iy+127) ; FD 86 7F add (iy-128) ; FD 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 DD 86 00 add a', (ix+127) ; 76 DD 86 7F add a', (ix-128) ; 76 DD 86 80 add a', (iy) ; 76 FD 86 00 add a', (iy+127) ; 76 FD 86 7F add a', (iy-128) ; 76 FD 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) ; DD 86 00 add a, (ix+127) ; DD 86 7F add a, (ix-128) ; DD 86 80 add a, (iy) ; FD 86 00 add a, (iy+127) ; FD 86 7F add a, (iy-128) ; FD 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 ; DD 09 add ix, de ; DD 19 add ix, ix ; DD 29 add ix, sp ; DD 39 add iy, bc ; FD 09 add iy, de ; FD 19 add iy, iy ; FD 29 add iy, sp ; FD 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 DD 8E 00 altd adc (ix+127) ; 76 DD 8E 7F altd adc (ix-128) ; 76 DD 8E 80 altd adc (iy) ; 76 FD 8E 00 altd adc (iy+127) ; 76 FD 8E 7F altd adc (iy-128) ; 76 FD 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 DD 8E 00 altd adc a, (ix+127) ; 76 DD 8E 7F altd adc a, (ix-128) ; 76 DD 8E 80 altd adc a, (iy) ; 76 FD 8E 00 altd adc a, (iy+127) ; 76 FD 8E 7F altd adc a, (iy-128) ; 76 FD 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 DD 86 00 altd add (ix+127) ; 76 DD 86 7F altd add (ix-128) ; 76 DD 86 80 altd add (iy) ; 76 FD 86 00 altd add (iy+127) ; 76 FD 86 7F altd add (iy-128) ; 76 FD 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 DD 86 00 altd add a, (ix+127) ; 76 DD 86 7F altd add a, (ix-128) ; 76 DD 86 80 altd add a, (iy) ; 76 FD 86 00 altd add a, (iy+127) ; 76 FD 86 7F altd add a, (iy-128) ; 76 FD 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 DD A6 00 altd and (ix+127) ; 76 DD A6 7F altd and (ix-128) ; 76 DD A6 80 altd and (iy) ; 76 FD A6 00 altd and (iy+127) ; 76 FD A6 7F altd and (iy-128) ; 76 FD 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 DD A6 00 altd and a, (ix+127) ; 76 DD A6 7F altd and a, (ix-128) ; 76 DD A6 80 altd and a, (iy) ; 76 FD A6 00 altd and a, (iy+127) ; 76 FD A6 7F altd and a, (iy-128) ; 76 FD 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 DD DC altd and iy, de ; 76 FD DC altd and l ; 76 A5 altd bit 0, (hl) ; 76 CB 46 altd bit 0, (ix) ; 76 DD CB 00 46 altd bit 0, (ix+127) ; 76 DD CB 7F 46 altd bit 0, (ix-128) ; 76 DD CB 80 46 altd bit 0, (iy) ; 76 FD CB 00 46 altd bit 0, (iy+127) ; 76 FD CB 7F 46 altd bit 0, (iy-128) ; 76 FD 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 DD CB 00 4E altd bit 1, (ix+127) ; 76 DD CB 7F 4E altd bit 1, (ix-128) ; 76 DD CB 80 4E altd bit 1, (iy) ; 76 FD CB 00 4E altd bit 1, (iy+127) ; 76 FD CB 7F 4E altd bit 1, (iy-128) ; 76 FD 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 DD CB 00 56 altd bit 2, (ix+127) ; 76 DD CB 7F 56 altd bit 2, (ix-128) ; 76 DD CB 80 56 altd bit 2, (iy) ; 76 FD CB 00 56 altd bit 2, (iy+127) ; 76 FD CB 7F 56 altd bit 2, (iy-128) ; 76 FD 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 DD CB 00 5E altd bit 3, (ix+127) ; 76 DD CB 7F 5E altd bit 3, (ix-128) ; 76 DD CB 80 5E altd bit 3, (iy) ; 76 FD CB 00 5E altd bit 3, (iy+127) ; 76 FD CB 7F 5E altd bit 3, (iy-128) ; 76 FD 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 DD CB 00 66 altd bit 4, (ix+127) ; 76 DD CB 7F 66 altd bit 4, (ix-128) ; 76 DD CB 80 66 altd bit 4, (iy) ; 76 FD CB 00 66 altd bit 4, (iy+127) ; 76 FD CB 7F 66 altd bit 4, (iy-128) ; 76 FD 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 DD CB 00 6E altd bit 5, (ix+127) ; 76 DD CB 7F 6E altd bit 5, (ix-128) ; 76 DD CB 80 6E altd bit 5, (iy) ; 76 FD CB 00 6E altd bit 5, (iy+127) ; 76 FD CB 7F 6E altd bit 5, (iy-128) ; 76 FD 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 DD CB 00 76 altd bit 6, (ix+127) ; 76 DD CB 7F 76 altd bit 6, (ix-128) ; 76 DD CB 80 76 altd bit 6, (iy) ; 76 FD CB 00 76 altd bit 6, (iy+127) ; 76 FD CB 7F 76 altd bit 6, (iy-128) ; 76 FD 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 DD CB 00 7E altd bit 7, (ix+127) ; 76 DD CB 7F 7E altd bit 7, (ix-128) ; 76 DD CB 80 7E altd bit 7, (iy) ; 76 FD CB 00 7E altd bit 7, (iy+127) ; 76 FD CB 7F 7E altd bit 7, (iy-128) ; 76 FD 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 DD CC altd bool iy ; 76 FD CC altd ccf ; 76 3F altd cp (hl) ; 76 BE altd cp (ix) ; 76 DD BE 00 altd cp (ix+127) ; 76 DD BE 7F altd cp (ix-128) ; 76 DD BE 80 altd cp (iy) ; 76 FD BE 00 altd cp (iy+127) ; 76 FD BE 7F altd cp (iy-128) ; 76 FD 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 DD BE 00 altd cp a, (ix+127) ; 76 DD BE 7F altd cp a, (ix-128) ; 76 DD BE 80 altd cp a, (iy) ; 76 FD BE 00 altd cp a, (iy+127) ; 76 FD BE 7F altd cp a, (iy-128) ; 76 FD 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 DD 35 00 altd dec (ix+127) ; 76 DD 35 7F altd dec (ix-128) ; 76 DD 35 80 altd dec (iy) ; 76 FD 35 00 altd dec (iy+127) ; 76 FD 35 7F altd dec (iy-128) ; 76 FD 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 DD 34 00 altd inc (ix+127) ; 76 DD 34 7F altd inc (ix-128) ; 76 DD 34 80 altd inc (iy) ; 76 FD 34 00 altd inc (iy+127) ; 76 FD 34 7F altd inc (iy-128) ; 76 FD 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 DD 8E 00 altd ioe adc (ix+127) ; 76 DB DD 8E 7F altd ioe adc (ix-128) ; 76 DB DD 8E 80 altd ioe adc (iy) ; 76 DB FD 8E 00 altd ioe adc (iy+127) ; 76 DB FD 8E 7F altd ioe adc (iy-128) ; 76 DB FD 8E 80 altd ioe adc a, (hl) ; 76 DB 8E altd ioe adc a, (ix) ; 76 DB DD 8E 00 altd ioe adc a, (ix+127) ; 76 DB DD 8E 7F altd ioe adc a, (ix-128) ; 76 DB DD 8E 80 altd ioe adc a, (iy) ; 76 DB FD 8E 00 altd ioe adc a, (iy+127) ; 76 DB FD 8E 7F altd ioe adc a, (iy-128) ; 76 DB FD 8E 80 altd ioe add (hl) ; 76 DB 86 altd ioe add (ix) ; 76 DB DD 86 00 altd ioe add (ix+127) ; 76 DB DD 86 7F altd ioe add (ix-128) ; 76 DB DD 86 80 altd ioe add (iy) ; 76 DB FD 86 00 altd ioe add (iy+127) ; 76 DB FD 86 7F altd ioe add (iy-128) ; 76 DB FD 86 80 altd ioe add a, (hl) ; 76 DB 86 altd ioe add a, (ix) ; 76 DB DD 86 00 altd ioe add a, (ix+127) ; 76 DB DD 86 7F altd ioe add a, (ix-128) ; 76 DB DD 86 80 altd ioe add a, (iy) ; 76 DB FD 86 00 altd ioe add a, (iy+127) ; 76 DB FD 86 7F altd ioe add a, (iy-128) ; 76 DB FD 86 80 altd ioe and (hl) ; 76 DB A6 altd ioe and (ix) ; 76 DB DD A6 00 altd ioe and (ix+127) ; 76 DB DD A6 7F altd ioe and (ix-128) ; 76 DB DD A6 80 altd ioe and (iy) ; 76 DB FD A6 00 altd ioe and (iy+127) ; 76 DB FD A6 7F altd ioe and (iy-128) ; 76 DB FD A6 80 altd ioe and a, (hl) ; 76 DB A6 altd ioe and a, (ix) ; 76 DB DD A6 00 altd ioe and a, (ix+127) ; 76 DB DD A6 7F altd ioe and a, (ix-128) ; 76 DB DD A6 80 altd ioe and a, (iy) ; 76 DB FD A6 00 altd ioe and a, (iy+127) ; 76 DB FD A6 7F altd ioe and a, (iy-128) ; 76 DB FD A6 80 altd ioe bit 0, (hl) ; 76 DB CB 46 altd ioe bit 0, (ix) ; 76 DB DD CB 00 46 altd ioe bit 0, (ix+127) ; 76 DB DD CB 7F 46 altd ioe bit 0, (ix-128) ; 76 DB DD CB 80 46 altd ioe bit 0, (iy) ; 76 DB FD CB 00 46 altd ioe bit 0, (iy+127) ; 76 DB FD CB 7F 46 altd ioe bit 0, (iy-128) ; 76 DB FD CB 80 46 altd ioe bit 1, (hl) ; 76 DB CB 4E altd ioe bit 1, (ix) ; 76 DB DD CB 00 4E altd ioe bit 1, (ix+127) ; 76 DB DD CB 7F 4E altd ioe bit 1, (ix-128) ; 76 DB DD CB 80 4E altd ioe bit 1, (iy) ; 76 DB FD CB 00 4E altd ioe bit 1, (iy+127) ; 76 DB FD CB 7F 4E altd ioe bit 1, (iy-128) ; 76 DB FD CB 80 4E altd ioe bit 2, (hl) ; 76 DB CB 56 altd ioe bit 2, (ix) ; 76 DB DD CB 00 56 altd ioe bit 2, (ix+127) ; 76 DB DD CB 7F 56 altd ioe bit 2, (ix-128) ; 76 DB DD CB 80 56 altd ioe bit 2, (iy) ; 76 DB FD CB 00 56 altd ioe bit 2, (iy+127) ; 76 DB FD CB 7F 56 altd ioe bit 2, (iy-128) ; 76 DB FD CB 80 56 altd ioe bit 3, (hl) ; 76 DB CB 5E altd ioe bit 3, (ix) ; 76 DB DD CB 00 5E altd ioe bit 3, (ix+127) ; 76 DB DD CB 7F 5E altd ioe bit 3, (ix-128) ; 76 DB DD CB 80 5E altd ioe bit 3, (iy) ; 76 DB FD CB 00 5E altd ioe bit 3, (iy+127) ; 76 DB FD CB 7F 5E altd ioe bit 3, (iy-128) ; 76 DB FD CB 80 5E altd ioe bit 4, (hl) ; 76 DB CB 66 altd ioe bit 4, (ix) ; 76 DB DD CB 00 66 altd ioe bit 4, (ix+127) ; 76 DB DD CB 7F 66 altd ioe bit 4, (ix-128) ; 76 DB DD CB 80 66 altd ioe bit 4, (iy) ; 76 DB FD CB 00 66 altd ioe bit 4, (iy+127) ; 76 DB FD CB 7F 66 altd ioe bit 4, (iy-128) ; 76 DB FD CB 80 66 altd ioe bit 5, (hl) ; 76 DB CB 6E altd ioe bit 5, (ix) ; 76 DB DD CB 00 6E altd ioe bit 5, (ix+127) ; 76 DB DD CB 7F 6E altd ioe bit 5, (ix-128) ; 76 DB DD CB 80 6E altd ioe bit 5, (iy) ; 76 DB FD CB 00 6E altd ioe bit 5, (iy+127) ; 76 DB FD CB 7F 6E altd ioe bit 5, (iy-128) ; 76 DB FD CB 80 6E altd ioe bit 6, (hl) ; 76 DB CB 76 altd ioe bit 6, (ix) ; 76 DB DD CB 00 76 altd ioe bit 6, (ix+127) ; 76 DB DD CB 7F 76 altd ioe bit 6, (ix-128) ; 76 DB DD CB 80 76 altd ioe bit 6, (iy) ; 76 DB FD CB 00 76 altd ioe bit 6, (iy+127) ; 76 DB FD CB 7F 76 altd ioe bit 6, (iy-128) ; 76 DB FD CB 80 76 altd ioe bit 7, (hl) ; 76 DB CB 7E altd ioe bit 7, (ix) ; 76 DB DD CB 00 7E altd ioe bit 7, (ix+127) ; 76 DB DD CB 7F 7E altd ioe bit 7, (ix-128) ; 76 DB DD CB 80 7E altd ioe bit 7, (iy) ; 76 DB FD CB 00 7E altd ioe bit 7, (iy+127) ; 76 DB FD CB 7F 7E altd ioe bit 7, (iy-128) ; 76 DB FD CB 80 7E altd ioe cp (hl) ; 76 DB BE altd ioe cp (ix) ; 76 DB DD BE 00 altd ioe cp (ix+127) ; 76 DB DD BE 7F altd ioe cp (ix-128) ; 76 DB DD BE 80 altd ioe cp (iy) ; 76 DB FD BE 00 altd ioe cp (iy+127) ; 76 DB FD BE 7F altd ioe cp (iy-128) ; 76 DB FD BE 80 altd ioe cp a, (hl) ; 76 DB BE altd ioe cp a, (ix) ; 76 DB DD BE 00 altd ioe cp a, (ix+127) ; 76 DB DD BE 7F altd ioe cp a, (ix-128) ; 76 DB DD BE 80 altd ioe cp a, (iy) ; 76 DB FD BE 00 altd ioe cp a, (iy+127) ; 76 DB FD BE 7F altd ioe cp a, (iy-128) ; 76 DB FD BE 80 altd ioe dec (hl) ; 76 DB 35 altd ioe dec (ix) ; 76 DB DD 35 00 altd ioe dec (ix+127) ; 76 DB DD 35 7F altd ioe dec (ix-128) ; 76 DB DD 35 80 altd ioe dec (iy) ; 76 DB FD 35 00 altd ioe dec (iy+127) ; 76 DB FD 35 7F altd ioe dec (iy-128) ; 76 DB FD 35 80 altd ioe inc (hl) ; 76 DB 34 altd ioe inc (ix) ; 76 DB DD 34 00 altd ioe inc (ix+127) ; 76 DB DD 34 7F altd ioe inc (ix-128) ; 76 DB DD 34 80 altd ioe inc (iy) ; 76 DB FD 34 00 altd ioe inc (iy+127) ; 76 DB FD 34 7F altd ioe inc (iy-128) ; 76 DB FD 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 DD 7E 00 altd ioe ld a, (ix+127) ; 76 DB DD 7E 7F altd ioe ld a, (ix-128) ; 76 DB DD 7E 80 altd ioe ld a, (iy) ; 76 DB FD 7E 00 altd ioe ld a, (iy+127) ; 76 DB FD 7E 7F altd ioe ld a, (iy-128) ; 76 DB FD 7E 80 altd ioe ld b, (hl) ; 76 DB 46 altd ioe ld b, (ix) ; 76 DB DD 46 00 altd ioe ld b, (ix+127) ; 76 DB DD 46 7F altd ioe ld b, (ix-128) ; 76 DB DD 46 80 altd ioe ld b, (iy) ; 76 DB FD 46 00 altd ioe ld b, (iy+127) ; 76 DB FD 46 7F altd ioe ld b, (iy-128) ; 76 DB FD 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 DD 4E 00 altd ioe ld c, (ix+127) ; 76 DB DD 4E 7F altd ioe ld c, (ix-128) ; 76 DB DD 4E 80 altd ioe ld c, (iy) ; 76 DB FD 4E 00 altd ioe ld c, (iy+127) ; 76 DB FD 4E 7F altd ioe ld c, (iy-128) ; 76 DB FD 4E 80 altd ioe ld d, (hl) ; 76 DB 56 altd ioe ld d, (ix) ; 76 DB DD 56 00 altd ioe ld d, (ix+127) ; 76 DB DD 56 7F altd ioe ld d, (ix-128) ; 76 DB DD 56 80 altd ioe ld d, (iy) ; 76 DB FD 56 00 altd ioe ld d, (iy+127) ; 76 DB FD 56 7F altd ioe ld d, (iy-128) ; 76 DB FD 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 DD 5E 00 altd ioe ld e, (ix+127) ; 76 DB DD 5E 7F altd ioe ld e, (ix-128) ; 76 DB DD 5E 80 altd ioe ld e, (iy) ; 76 DB FD 5E 00 altd ioe ld e, (iy+127) ; 76 DB FD 5E 7F altd ioe ld e, (iy-128) ; 76 DB FD 5E 80 altd ioe ld h, (hl) ; 76 DB 66 altd ioe ld h, (ix) ; 76 DB DD 66 00 altd ioe ld h, (ix+127) ; 76 DB DD 66 7F altd ioe ld h, (ix-128) ; 76 DB DD 66 80 altd ioe ld h, (iy) ; 76 DB FD 66 00 altd ioe ld h, (iy+127) ; 76 DB FD 66 7F altd ioe ld h, (iy-128) ; 76 DB FD 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 E4 00 altd ioe ld hl, (ix+127) ; 76 DB E4 7F altd ioe ld hl, (ix-128) ; 76 DB E4 80 altd ioe ld hl, (iy) ; 76 DB FD E4 00 altd ioe ld hl, (iy+127) ; 76 DB FD E4 7F altd ioe ld hl, (iy-128) ; 76 DB FD E4 80 altd ioe ld l, (hl) ; 76 DB 6E altd ioe ld l, (ix) ; 76 DB DD 6E 00 altd ioe ld l, (ix+127) ; 76 DB DD 6E 7F altd ioe ld l, (ix-128) ; 76 DB DD 6E 80 altd ioe ld l, (iy) ; 76 DB FD 6E 00 altd ioe ld l, (iy+127) ; 76 DB FD 6E 7F altd ioe ld l, (iy-128) ; 76 DB FD 6E 80 altd ioe or (hl) ; 76 DB B6 altd ioe or (ix) ; 76 DB DD B6 00 altd ioe or (ix+127) ; 76 DB DD B6 7F altd ioe or (ix-128) ; 76 DB DD B6 80 altd ioe or (iy) ; 76 DB FD B6 00 altd ioe or (iy+127) ; 76 DB FD B6 7F altd ioe or (iy-128) ; 76 DB FD B6 80 altd ioe or a, (hl) ; 76 DB B6 altd ioe or a, (ix) ; 76 DB DD B6 00 altd ioe or a, (ix+127) ; 76 DB DD B6 7F altd ioe or a, (ix-128) ; 76 DB DD B6 80 altd ioe or a, (iy) ; 76 DB FD B6 00 altd ioe or a, (iy+127) ; 76 DB FD B6 7F altd ioe or a, (iy-128) ; 76 DB FD B6 80 altd ioe rl (hl) ; 76 DB CB 16 altd ioe rl (ix) ; 76 DB DD CB 00 16 altd ioe rl (ix+127) ; 76 DB DD CB 7F 16 altd ioe rl (ix-128) ; 76 DB DD CB 80 16 altd ioe rl (iy) ; 76 DB FD CB 00 16 altd ioe rl (iy+127) ; 76 DB FD CB 7F 16 altd ioe rl (iy-128) ; 76 DB FD CB 80 16 altd ioe rlc (hl) ; 76 DB CB 06 altd ioe rlc (ix) ; 76 DB DD CB 00 06 altd ioe rlc (ix+127) ; 76 DB DD CB 7F 06 altd ioe rlc (ix-128) ; 76 DB DD CB 80 06 altd ioe rlc (iy) ; 76 DB FD CB 00 06 altd ioe rlc (iy+127) ; 76 DB FD CB 7F 06 altd ioe rlc (iy-128) ; 76 DB FD CB 80 06 altd ioe rr (hl) ; 76 DB CB 1E altd ioe rr (ix) ; 76 DB DD CB 00 1E altd ioe rr (ix+127) ; 76 DB DD CB 7F 1E altd ioe rr (ix-128) ; 76 DB DD CB 80 1E altd ioe rr (iy) ; 76 DB FD CB 00 1E altd ioe rr (iy+127) ; 76 DB FD CB 7F 1E altd ioe rr (iy-128) ; 76 DB FD CB 80 1E altd ioe rrc (hl) ; 76 DB CB 0E altd ioe rrc (ix) ; 76 DB DD CB 00 0E altd ioe rrc (ix+127) ; 76 DB DD CB 7F 0E altd ioe rrc (ix-128) ; 76 DB DD CB 80 0E altd ioe rrc (iy) ; 76 DB FD CB 00 0E altd ioe rrc (iy+127) ; 76 DB FD CB 7F 0E altd ioe rrc (iy-128) ; 76 DB FD CB 80 0E altd ioe sbc (hl) ; 76 DB 9E altd ioe sbc (ix) ; 76 DB DD 9E 00 altd ioe sbc (ix+127) ; 76 DB DD 9E 7F altd ioe sbc (ix-128) ; 76 DB DD 9E 80 altd ioe sbc (iy) ; 76 DB FD 9E 00 altd ioe sbc (iy+127) ; 76 DB FD 9E 7F altd ioe sbc (iy-128) ; 76 DB FD 9E 80 altd ioe sbc a, (hl) ; 76 DB 9E altd ioe sbc a, (ix) ; 76 DB DD 9E 00 altd ioe sbc a, (ix+127) ; 76 DB DD 9E 7F altd ioe sbc a, (ix-128) ; 76 DB DD 9E 80 altd ioe sbc a, (iy) ; 76 DB FD 9E 00 altd ioe sbc a, (iy+127) ; 76 DB FD 9E 7F altd ioe sbc a, (iy-128) ; 76 DB FD 9E 80 altd ioe sla (hl) ; 76 DB CB 26 altd ioe sla (ix) ; 76 DB DD CB 00 26 altd ioe sla (ix+127) ; 76 DB DD CB 7F 26 altd ioe sla (ix-128) ; 76 DB DD CB 80 26 altd ioe sla (iy) ; 76 DB FD CB 00 26 altd ioe sla (iy+127) ; 76 DB FD CB 7F 26 altd ioe sla (iy-128) ; 76 DB FD CB 80 26 altd ioe sra (hl) ; 76 DB CB 2E altd ioe sra (ix) ; 76 DB DD CB 00 2E altd ioe sra (ix+127) ; 76 DB DD CB 7F 2E altd ioe sra (ix-128) ; 76 DB DD CB 80 2E altd ioe sra (iy) ; 76 DB FD CB 00 2E altd ioe sra (iy+127) ; 76 DB FD CB 7F 2E altd ioe sra (iy-128) ; 76 DB FD CB 80 2E altd ioe srl (hl) ; 76 DB CB 3E altd ioe srl (ix) ; 76 DB DD CB 00 3E altd ioe srl (ix+127) ; 76 DB DD CB 7F 3E altd ioe srl (ix-128) ; 76 DB DD CB 80 3E altd ioe srl (iy) ; 76 DB FD CB 00 3E altd ioe srl (iy+127) ; 76 DB FD CB 7F 3E altd ioe srl (iy-128) ; 76 DB FD CB 80 3E altd ioe sub (hl) ; 76 DB 96 altd ioe sub (ix) ; 76 DB DD 96 00 altd ioe sub (ix+127) ; 76 DB DD 96 7F altd ioe sub (ix-128) ; 76 DB DD 96 80 altd ioe sub (iy) ; 76 DB FD 96 00 altd ioe sub (iy+127) ; 76 DB FD 96 7F altd ioe sub (iy-128) ; 76 DB FD 96 80 altd ioe sub a, (hl) ; 76 DB 96 altd ioe sub a, (ix) ; 76 DB DD 96 00 altd ioe sub a, (ix+127) ; 76 DB DD 96 7F altd ioe sub a, (ix-128) ; 76 DB DD 96 80 altd ioe sub a, (iy) ; 76 DB FD 96 00 altd ioe sub a, (iy+127) ; 76 DB FD 96 7F altd ioe sub a, (iy-128) ; 76 DB FD 96 80 altd ioe xor (hl) ; 76 DB AE altd ioe xor (ix) ; 76 DB DD AE 00 altd ioe xor (ix+127) ; 76 DB DD AE 7F altd ioe xor (ix-128) ; 76 DB DD AE 80 altd ioe xor (iy) ; 76 DB FD AE 00 altd ioe xor (iy+127) ; 76 DB FD AE 7F altd ioe xor (iy-128) ; 76 DB FD AE 80 altd ioe xor a, (hl) ; 76 DB AE altd ioe xor a, (ix) ; 76 DB DD AE 00 altd ioe xor a, (ix+127) ; 76 DB DD AE 7F altd ioe xor a, (ix-128) ; 76 DB DD AE 80 altd ioe xor a, (iy) ; 76 DB FD AE 00 altd ioe xor a, (iy+127) ; 76 DB FD AE 7F altd ioe xor a, (iy-128) ; 76 DB FD AE 80 altd ioi adc (hl) ; 76 D3 8E altd ioi adc (ix) ; 76 D3 DD 8E 00 altd ioi adc (ix+127) ; 76 D3 DD 8E 7F altd ioi adc (ix-128) ; 76 D3 DD 8E 80 altd ioi adc (iy) ; 76 D3 FD 8E 00 altd ioi adc (iy+127) ; 76 D3 FD 8E 7F altd ioi adc (iy-128) ; 76 D3 FD 8E 80 altd ioi adc a, (hl) ; 76 D3 8E altd ioi adc a, (ix) ; 76 D3 DD 8E 00 altd ioi adc a, (ix+127) ; 76 D3 DD 8E 7F altd ioi adc a, (ix-128) ; 76 D3 DD 8E 80 altd ioi adc a, (iy) ; 76 D3 FD 8E 00 altd ioi adc a, (iy+127) ; 76 D3 FD 8E 7F altd ioi adc a, (iy-128) ; 76 D3 FD 8E 80 altd ioi add (hl) ; 76 D3 86 altd ioi add (ix) ; 76 D3 DD 86 00 altd ioi add (ix+127) ; 76 D3 DD 86 7F altd ioi add (ix-128) ; 76 D3 DD 86 80 altd ioi add (iy) ; 76 D3 FD 86 00 altd ioi add (iy+127) ; 76 D3 FD 86 7F altd ioi add (iy-128) ; 76 D3 FD 86 80 altd ioi add a, (hl) ; 76 D3 86 altd ioi add a, (ix) ; 76 D3 DD 86 00 altd ioi add a, (ix+127) ; 76 D3 DD 86 7F altd ioi add a, (ix-128) ; 76 D3 DD 86 80 altd ioi add a, (iy) ; 76 D3 FD 86 00 altd ioi add a, (iy+127) ; 76 D3 FD 86 7F altd ioi add a, (iy-128) ; 76 D3 FD 86 80 altd ioi and (hl) ; 76 D3 A6 altd ioi and (ix) ; 76 D3 DD A6 00 altd ioi and (ix+127) ; 76 D3 DD A6 7F altd ioi and (ix-128) ; 76 D3 DD A6 80 altd ioi and (iy) ; 76 D3 FD A6 00 altd ioi and (iy+127) ; 76 D3 FD A6 7F altd ioi and (iy-128) ; 76 D3 FD A6 80 altd ioi and a, (hl) ; 76 D3 A6 altd ioi and a, (ix) ; 76 D3 DD A6 00 altd ioi and a, (ix+127) ; 76 D3 DD A6 7F altd ioi and a, (ix-128) ; 76 D3 DD A6 80 altd ioi and a, (iy) ; 76 D3 FD A6 00 altd ioi and a, (iy+127) ; 76 D3 FD A6 7F altd ioi and a, (iy-128) ; 76 D3 FD A6 80 altd ioi bit 0, (hl) ; 76 D3 CB 46 altd ioi bit 0, (ix) ; 76 D3 DD CB 00 46 altd ioi bit 0, (ix+127) ; 76 D3 DD CB 7F 46 altd ioi bit 0, (ix-128) ; 76 D3 DD CB 80 46 altd ioi bit 0, (iy) ; 76 D3 FD CB 00 46 altd ioi bit 0, (iy+127) ; 76 D3 FD CB 7F 46 altd ioi bit 0, (iy-128) ; 76 D3 FD CB 80 46 altd ioi bit 1, (hl) ; 76 D3 CB 4E altd ioi bit 1, (ix) ; 76 D3 DD CB 00 4E altd ioi bit 1, (ix+127) ; 76 D3 DD CB 7F 4E altd ioi bit 1, (ix-128) ; 76 D3 DD CB 80 4E altd ioi bit 1, (iy) ; 76 D3 FD CB 00 4E altd ioi bit 1, (iy+127) ; 76 D3 FD CB 7F 4E altd ioi bit 1, (iy-128) ; 76 D3 FD CB 80 4E altd ioi bit 2, (hl) ; 76 D3 CB 56 altd ioi bit 2, (ix) ; 76 D3 DD CB 00 56 altd ioi bit 2, (ix+127) ; 76 D3 DD CB 7F 56 altd ioi bit 2, (ix-128) ; 76 D3 DD CB 80 56 altd ioi bit 2, (iy) ; 76 D3 FD CB 00 56 altd ioi bit 2, (iy+127) ; 76 D3 FD CB 7F 56 altd ioi bit 2, (iy-128) ; 76 D3 FD CB 80 56 altd ioi bit 3, (hl) ; 76 D3 CB 5E altd ioi bit 3, (ix) ; 76 D3 DD CB 00 5E altd ioi bit 3, (ix+127) ; 76 D3 DD CB 7F 5E altd ioi bit 3, (ix-128) ; 76 D3 DD CB 80 5E altd ioi bit 3, (iy) ; 76 D3 FD CB 00 5E altd ioi bit 3, (iy+127) ; 76 D3 FD CB 7F 5E altd ioi bit 3, (iy-128) ; 76 D3 FD CB 80 5E altd ioi bit 4, (hl) ; 76 D3 CB 66 altd ioi bit 4, (ix) ; 76 D3 DD CB 00 66 altd ioi bit 4, (ix+127) ; 76 D3 DD CB 7F 66 altd ioi bit 4, (ix-128) ; 76 D3 DD CB 80 66 altd ioi bit 4, (iy) ; 76 D3 FD CB 00 66 altd ioi bit 4, (iy+127) ; 76 D3 FD CB 7F 66 altd ioi bit 4, (iy-128) ; 76 D3 FD CB 80 66 altd ioi bit 5, (hl) ; 76 D3 CB 6E altd ioi bit 5, (ix) ; 76 D3 DD CB 00 6E altd ioi bit 5, (ix+127) ; 76 D3 DD CB 7F 6E altd ioi bit 5, (ix-128) ; 76 D3 DD CB 80 6E altd ioi bit 5, (iy) ; 76 D3 FD CB 00 6E altd ioi bit 5, (iy+127) ; 76 D3 FD CB 7F 6E altd ioi bit 5, (iy-128) ; 76 D3 FD CB 80 6E altd ioi bit 6, (hl) ; 76 D3 CB 76 altd ioi bit 6, (ix) ; 76 D3 DD CB 00 76 altd ioi bit 6, (ix+127) ; 76 D3 DD CB 7F 76 altd ioi bit 6, (ix-128) ; 76 D3 DD CB 80 76 altd ioi bit 6, (iy) ; 76 D3 FD CB 00 76 altd ioi bit 6, (iy+127) ; 76 D3 FD CB 7F 76 altd ioi bit 6, (iy-128) ; 76 D3 FD CB 80 76 altd ioi bit 7, (hl) ; 76 D3 CB 7E altd ioi bit 7, (ix) ; 76 D3 DD CB 00 7E altd ioi bit 7, (ix+127) ; 76 D3 DD CB 7F 7E altd ioi bit 7, (ix-128) ; 76 D3 DD CB 80 7E altd ioi bit 7, (iy) ; 76 D3 FD CB 00 7E altd ioi bit 7, (iy+127) ; 76 D3 FD CB 7F 7E altd ioi bit 7, (iy-128) ; 76 D3 FD CB 80 7E altd ioi cp (hl) ; 76 D3 BE altd ioi cp (ix) ; 76 D3 DD BE 00 altd ioi cp (ix+127) ; 76 D3 DD BE 7F altd ioi cp (ix-128) ; 76 D3 DD BE 80 altd ioi cp (iy) ; 76 D3 FD BE 00 altd ioi cp (iy+127) ; 76 D3 FD BE 7F altd ioi cp (iy-128) ; 76 D3 FD BE 80 altd ioi cp a, (hl) ; 76 D3 BE altd ioi cp a, (ix) ; 76 D3 DD BE 00 altd ioi cp a, (ix+127) ; 76 D3 DD BE 7F altd ioi cp a, (ix-128) ; 76 D3 DD BE 80 altd ioi cp a, (iy) ; 76 D3 FD BE 00 altd ioi cp a, (iy+127) ; 76 D3 FD BE 7F altd ioi cp a, (iy-128) ; 76 D3 FD BE 80 altd ioi dec (hl) ; 76 D3 35 altd ioi dec (ix) ; 76 D3 DD 35 00 altd ioi dec (ix+127) ; 76 D3 DD 35 7F altd ioi dec (ix-128) ; 76 D3 DD 35 80 altd ioi dec (iy) ; 76 D3 FD 35 00 altd ioi dec (iy+127) ; 76 D3 FD 35 7F altd ioi dec (iy-128) ; 76 D3 FD 35 80 altd ioi inc (hl) ; 76 D3 34 altd ioi inc (ix) ; 76 D3 DD 34 00 altd ioi inc (ix+127) ; 76 D3 DD 34 7F altd ioi inc (ix-128) ; 76 D3 DD 34 80 altd ioi inc (iy) ; 76 D3 FD 34 00 altd ioi inc (iy+127) ; 76 D3 FD 34 7F altd ioi inc (iy-128) ; 76 D3 FD 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 DD 7E 00 altd ioi ld a, (ix+127) ; 76 D3 DD 7E 7F altd ioi ld a, (ix-128) ; 76 D3 DD 7E 80 altd ioi ld a, (iy) ; 76 D3 FD 7E 00 altd ioi ld a, (iy+127) ; 76 D3 FD 7E 7F altd ioi ld a, (iy-128) ; 76 D3 FD 7E 80 altd ioi ld b, (hl) ; 76 D3 46 altd ioi ld b, (ix) ; 76 D3 DD 46 00 altd ioi ld b, (ix+127) ; 76 D3 DD 46 7F altd ioi ld b, (ix-128) ; 76 D3 DD 46 80 altd ioi ld b, (iy) ; 76 D3 FD 46 00 altd ioi ld b, (iy+127) ; 76 D3 FD 46 7F altd ioi ld b, (iy-128) ; 76 D3 FD 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 DD 4E 00 altd ioi ld c, (ix+127) ; 76 D3 DD 4E 7F altd ioi ld c, (ix-128) ; 76 D3 DD 4E 80 altd ioi ld c, (iy) ; 76 D3 FD 4E 00 altd ioi ld c, (iy+127) ; 76 D3 FD 4E 7F altd ioi ld c, (iy-128) ; 76 D3 FD 4E 80 altd ioi ld d, (hl) ; 76 D3 56 altd ioi ld d, (ix) ; 76 D3 DD 56 00 altd ioi ld d, (ix+127) ; 76 D3 DD 56 7F altd ioi ld d, (ix-128) ; 76 D3 DD 56 80 altd ioi ld d, (iy) ; 76 D3 FD 56 00 altd ioi ld d, (iy+127) ; 76 D3 FD 56 7F altd ioi ld d, (iy-128) ; 76 D3 FD 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 DD 5E 00 altd ioi ld e, (ix+127) ; 76 D3 DD 5E 7F altd ioi ld e, (ix-128) ; 76 D3 DD 5E 80 altd ioi ld e, (iy) ; 76 D3 FD 5E 00 altd ioi ld e, (iy+127) ; 76 D3 FD 5E 7F altd ioi ld e, (iy-128) ; 76 D3 FD 5E 80 altd ioi ld h, (hl) ; 76 D3 66 altd ioi ld h, (ix) ; 76 D3 DD 66 00 altd ioi ld h, (ix+127) ; 76 D3 DD 66 7F altd ioi ld h, (ix-128) ; 76 D3 DD 66 80 altd ioi ld h, (iy) ; 76 D3 FD 66 00 altd ioi ld h, (iy+127) ; 76 D3 FD 66 7F altd ioi ld h, (iy-128) ; 76 D3 FD 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 E4 00 altd ioi ld hl, (ix+127) ; 76 D3 E4 7F altd ioi ld hl, (ix-128) ; 76 D3 E4 80 altd ioi ld hl, (iy) ; 76 D3 FD E4 00 altd ioi ld hl, (iy+127) ; 76 D3 FD E4 7F altd ioi ld hl, (iy-128) ; 76 D3 FD E4 80 altd ioi ld l, (hl) ; 76 D3 6E altd ioi ld l, (ix) ; 76 D3 DD 6E 00 altd ioi ld l, (ix+127) ; 76 D3 DD 6E 7F altd ioi ld l, (ix-128) ; 76 D3 DD 6E 80 altd ioi ld l, (iy) ; 76 D3 FD 6E 00 altd ioi ld l, (iy+127) ; 76 D3 FD 6E 7F altd ioi ld l, (iy-128) ; 76 D3 FD 6E 80 altd ioi or (hl) ; 76 D3 B6 altd ioi or (ix) ; 76 D3 DD B6 00 altd ioi or (ix+127) ; 76 D3 DD B6 7F altd ioi or (ix-128) ; 76 D3 DD B6 80 altd ioi or (iy) ; 76 D3 FD B6 00 altd ioi or (iy+127) ; 76 D3 FD B6 7F altd ioi or (iy-128) ; 76 D3 FD B6 80 altd ioi or a, (hl) ; 76 D3 B6 altd ioi or a, (ix) ; 76 D3 DD B6 00 altd ioi or a, (ix+127) ; 76 D3 DD B6 7F altd ioi or a, (ix-128) ; 76 D3 DD B6 80 altd ioi or a, (iy) ; 76 D3 FD B6 00 altd ioi or a, (iy+127) ; 76 D3 FD B6 7F altd ioi or a, (iy-128) ; 76 D3 FD B6 80 altd ioi rl (hl) ; 76 D3 CB 16 altd ioi rl (ix) ; 76 D3 DD CB 00 16 altd ioi rl (ix+127) ; 76 D3 DD CB 7F 16 altd ioi rl (ix-128) ; 76 D3 DD CB 80 16 altd ioi rl (iy) ; 76 D3 FD CB 00 16 altd ioi rl (iy+127) ; 76 D3 FD CB 7F 16 altd ioi rl (iy-128) ; 76 D3 FD CB 80 16 altd ioi rlc (hl) ; 76 D3 CB 06 altd ioi rlc (ix) ; 76 D3 DD CB 00 06 altd ioi rlc (ix+127) ; 76 D3 DD CB 7F 06 altd ioi rlc (ix-128) ; 76 D3 DD CB 80 06 altd ioi rlc (iy) ; 76 D3 FD CB 00 06 altd ioi rlc (iy+127) ; 76 D3 FD CB 7F 06 altd ioi rlc (iy-128) ; 76 D3 FD CB 80 06 altd ioi rr (hl) ; 76 D3 CB 1E altd ioi rr (ix) ; 76 D3 DD CB 00 1E altd ioi rr (ix+127) ; 76 D3 DD CB 7F 1E altd ioi rr (ix-128) ; 76 D3 DD CB 80 1E altd ioi rr (iy) ; 76 D3 FD CB 00 1E altd ioi rr (iy+127) ; 76 D3 FD CB 7F 1E altd ioi rr (iy-128) ; 76 D3 FD CB 80 1E altd ioi rrc (hl) ; 76 D3 CB 0E altd ioi rrc (ix) ; 76 D3 DD CB 00 0E altd ioi rrc (ix+127) ; 76 D3 DD CB 7F 0E altd ioi rrc (ix-128) ; 76 D3 DD CB 80 0E altd ioi rrc (iy) ; 76 D3 FD CB 00 0E altd ioi rrc (iy+127) ; 76 D3 FD CB 7F 0E altd ioi rrc (iy-128) ; 76 D3 FD CB 80 0E altd ioi sbc (hl) ; 76 D3 9E altd ioi sbc (ix) ; 76 D3 DD 9E 00 altd ioi sbc (ix+127) ; 76 D3 DD 9E 7F altd ioi sbc (ix-128) ; 76 D3 DD 9E 80 altd ioi sbc (iy) ; 76 D3 FD 9E 00 altd ioi sbc (iy+127) ; 76 D3 FD 9E 7F altd ioi sbc (iy-128) ; 76 D3 FD 9E 80 altd ioi sbc a, (hl) ; 76 D3 9E altd ioi sbc a, (ix) ; 76 D3 DD 9E 00 altd ioi sbc a, (ix+127) ; 76 D3 DD 9E 7F altd ioi sbc a, (ix-128) ; 76 D3 DD 9E 80 altd ioi sbc a, (iy) ; 76 D3 FD 9E 00 altd ioi sbc a, (iy+127) ; 76 D3 FD 9E 7F altd ioi sbc a, (iy-128) ; 76 D3 FD 9E 80 altd ioi sla (hl) ; 76 D3 CB 26 altd ioi sla (ix) ; 76 D3 DD CB 00 26 altd ioi sla (ix+127) ; 76 D3 DD CB 7F 26 altd ioi sla (ix-128) ; 76 D3 DD CB 80 26 altd ioi sla (iy) ; 76 D3 FD CB 00 26 altd ioi sla (iy+127) ; 76 D3 FD CB 7F 26 altd ioi sla (iy-128) ; 76 D3 FD CB 80 26 altd ioi sra (hl) ; 76 D3 CB 2E altd ioi sra (ix) ; 76 D3 DD CB 00 2E altd ioi sra (ix+127) ; 76 D3 DD CB 7F 2E altd ioi sra (ix-128) ; 76 D3 DD CB 80 2E altd ioi sra (iy) ; 76 D3 FD CB 00 2E altd ioi sra (iy+127) ; 76 D3 FD CB 7F 2E altd ioi sra (iy-128) ; 76 D3 FD CB 80 2E altd ioi srl (hl) ; 76 D3 CB 3E altd ioi srl (ix) ; 76 D3 DD CB 00 3E altd ioi srl (ix+127) ; 76 D3 DD CB 7F 3E altd ioi srl (ix-128) ; 76 D3 DD CB 80 3E altd ioi srl (iy) ; 76 D3 FD CB 00 3E altd ioi srl (iy+127) ; 76 D3 FD CB 7F 3E altd ioi srl (iy-128) ; 76 D3 FD CB 80 3E altd ioi sub (hl) ; 76 D3 96 altd ioi sub (ix) ; 76 D3 DD 96 00 altd ioi sub (ix+127) ; 76 D3 DD 96 7F altd ioi sub (ix-128) ; 76 D3 DD 96 80 altd ioi sub (iy) ; 76 D3 FD 96 00 altd ioi sub (iy+127) ; 76 D3 FD 96 7F altd ioi sub (iy-128) ; 76 D3 FD 96 80 altd ioi sub a, (hl) ; 76 D3 96 altd ioi sub a, (ix) ; 76 D3 DD 96 00 altd ioi sub a, (ix+127) ; 76 D3 DD 96 7F altd ioi sub a, (ix-128) ; 76 D3 DD 96 80 altd ioi sub a, (iy) ; 76 D3 FD 96 00 altd ioi sub a, (iy+127) ; 76 D3 FD 96 7F altd ioi sub a, (iy-128) ; 76 D3 FD 96 80 altd ioi xor (hl) ; 76 D3 AE altd ioi xor (ix) ; 76 D3 DD AE 00 altd ioi xor (ix+127) ; 76 D3 DD AE 7F altd ioi xor (ix-128) ; 76 D3 DD AE 80 altd ioi xor (iy) ; 76 D3 FD AE 00 altd ioi xor (iy+127) ; 76 D3 FD AE 7F altd ioi xor (iy-128) ; 76 D3 FD AE 80 altd ioi xor a, (hl) ; 76 D3 AE altd ioi xor a, (ix) ; 76 D3 DD AE 00 altd ioi xor a, (ix+127) ; 76 D3 DD AE 7F altd ioi xor a, (ix-128) ; 76 D3 DD AE 80 altd ioi xor a, (iy) ; 76 D3 FD AE 00 altd ioi xor a, (iy+127) ; 76 D3 FD AE 7F altd ioi xor a, (iy-128) ; 76 D3 FD 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 DD 7E 00 altd ld a, (ix+127) ; 76 DD 7E 7F altd ld a, (ix-128) ; 76 DD 7E 80 altd ld a, (iy) ; 76 FD 7E 00 altd ld a, (iy+127) ; 76 FD 7E 7F altd ld a, (iy-128) ; 76 FD 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 DD 46 00 altd ld b, (ix+127) ; 76 DD 46 7F altd ld b, (ix-128) ; 76 DD 46 80 altd ld b, (iy) ; 76 FD 46 00 altd ld b, (iy+127) ; 76 FD 46 7F altd ld b, (iy-128) ; 76 FD 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 DD 4E 00 altd ld c, (ix+127) ; 76 DD 4E 7F altd ld c, (ix-128) ; 76 DD 4E 80 altd ld c, (iy) ; 76 FD 4E 00 altd ld c, (iy+127) ; 76 FD 4E 7F altd ld c, (iy-128) ; 76 FD 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 DD 56 00 altd ld d, (ix+127) ; 76 DD 56 7F altd ld d, (ix-128) ; 76 DD 56 80 altd ld d, (iy) ; 76 FD 56 00 altd ld d, (iy+127) ; 76 FD 56 7F altd ld d, (iy-128) ; 76 FD 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 DD 5E 00 altd ld e, (ix+127) ; 76 DD 5E 7F altd ld e, (ix-128) ; 76 DD 5E 80 altd ld e, (iy) ; 76 FD 5E 00 altd ld e, (iy+127) ; 76 FD 5E 7F altd ld e, (iy-128) ; 76 FD 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 DD 66 00 altd ld h, (ix+127) ; 76 DD 66 7F altd ld h, (ix-128) ; 76 DD 66 80 altd ld h, (iy) ; 76 FD 66 00 altd ld h, (iy+127) ; 76 FD 66 7F altd ld h, (iy-128) ; 76 FD 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 E4 00 altd ld hl, (ix+127) ; 76 E4 7F altd ld hl, (ix-128) ; 76 E4 80 altd ld hl, (iy) ; 76 FD E4 00 altd ld hl, (iy+127) ; 76 FD E4 7F altd ld hl, (iy-128) ; 76 FD 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 DD 7C altd ld hl, iy ; 76 FD 7C altd ld l, (hl) ; 76 6E altd ld l, (ix) ; 76 DD 6E 00 altd ld l, (ix+127) ; 76 DD 6E 7F altd ld l, (ix-128) ; 76 DD 6E 80 altd ld l, (iy) ; 76 FD 6E 00 altd ld l, (iy+127) ; 76 FD 6E 7F altd ld l, (iy-128) ; 76 FD 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 DD B6 00 altd or (ix+127) ; 76 DD B6 7F altd or (ix-128) ; 76 DD B6 80 altd or (iy) ; 76 FD B6 00 altd or (iy+127) ; 76 FD B6 7F altd or (iy-128) ; 76 FD 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 DD B6 00 altd or a, (ix+127) ; 76 DD B6 7F altd or a, (ix-128) ; 76 DD B6 80 altd or a, (iy) ; 76 FD B6 00 altd or a, (iy+127) ; 76 FD B6 7F altd or a, (iy-128) ; 76 FD 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 DD EC altd or iy, de ; 76 FD 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 DD CB 00 16 altd rl (ix+127) ; 76 DD CB 7F 16 altd rl (ix-128) ; 76 DD CB 80 16 altd rl (iy) ; 76 FD CB 00 16 altd rl (iy+127) ; 76 FD CB 7F 16 altd rl (iy-128) ; 76 FD 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 DD CB 00 06 altd rlc (ix+127) ; 76 DD CB 7F 06 altd rlc (ix-128) ; 76 DD CB 80 06 altd rlc (iy) ; 76 FD CB 00 06 altd rlc (iy+127) ; 76 FD CB 7F 06 altd rlc (iy-128) ; 76 FD 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 DD CB 00 1E altd rr (ix+127) ; 76 DD CB 7F 1E altd rr (ix-128) ; 76 DD CB 80 1E altd rr (iy) ; 76 FD CB 00 1E altd rr (iy+127) ; 76 FD CB 7F 1E altd rr (iy-128) ; 76 FD 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 DD FC altd rr iy ; 76 FD FC altd rr l ; 76 CB 1D altd rra ; 76 1F altd rrc (hl) ; 76 CB 0E altd rrc (ix) ; 76 DD CB 00 0E altd rrc (ix+127) ; 76 DD CB 7F 0E altd rrc (ix-128) ; 76 DD CB 80 0E altd rrc (iy) ; 76 FD CB 00 0E altd rrc (iy+127) ; 76 FD CB 7F 0E altd rrc (iy-128) ; 76 FD 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 DD 9E 00 altd sbc (ix+127) ; 76 DD 9E 7F altd sbc (ix-128) ; 76 DD 9E 80 altd sbc (iy) ; 76 FD 9E 00 altd sbc (iy+127) ; 76 FD 9E 7F altd sbc (iy-128) ; 76 FD 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 DD 9E 00 altd sbc a, (ix+127) ; 76 DD 9E 7F altd sbc a, (ix-128) ; 76 DD 9E 80 altd sbc a, (iy) ; 76 FD 9E 00 altd sbc a, (iy+127) ; 76 FD 9E 7F altd sbc a, (iy-128) ; 76 FD 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 DD CB 00 26 altd sla (ix+127) ; 76 DD CB 7F 26 altd sla (ix-128) ; 76 DD CB 80 26 altd sla (iy) ; 76 FD CB 00 26 altd sla (iy+127) ; 76 FD CB 7F 26 altd sla (iy-128) ; 76 FD 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 DD CB 00 2E altd sra (ix+127) ; 76 DD CB 7F 2E altd sra (ix-128) ; 76 DD CB 80 2E altd sra (iy) ; 76 FD CB 00 2E altd sra (iy+127) ; 76 FD CB 7F 2E altd sra (iy-128) ; 76 FD 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 DD CB 00 3E altd srl (ix+127) ; 76 DD CB 7F 3E altd srl (ix-128) ; 76 DD CB 80 3E altd srl (iy) ; 76 FD CB 00 3E altd srl (iy+127) ; 76 FD CB 7F 3E altd srl (iy-128) ; 76 FD 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 DD 96 00 altd sub (ix+127) ; 76 DD 96 7F altd sub (ix-128) ; 76 DD 96 80 altd sub (iy) ; 76 FD 96 00 altd sub (iy+127) ; 76 FD 96 7F altd sub (iy-128) ; 76 FD 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 DD 96 00 altd sub a, (ix+127) ; 76 DD 96 7F altd sub a, (ix-128) ; 76 DD 96 80 altd sub a, (iy) ; 76 FD 96 00 altd sub a, (iy+127) ; 76 FD 96 7F altd sub a, (iy-128) ; 76 FD 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 DD AE 00 altd xor (ix+127) ; 76 DD AE 7F altd xor (ix-128) ; 76 DD AE 80 altd xor (iy) ; 76 FD AE 00 altd xor (iy+127) ; 76 FD AE 7F altd xor (iy-128) ; 76 FD 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 DD AE 00 altd xor a, (ix+127) ; 76 DD AE 7F altd xor a, (ix-128) ; 76 DD AE 80 altd xor a, (iy) ; 76 FD AE 00 altd xor a, (iy+127) ; 76 FD AE 7F altd xor a, (iy-128) ; 76 FD 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) ; DD A6 00 and (ix+127) ; DD A6 7F and (ix-128) ; DD A6 80 and (iy) ; FD A6 00 and (iy+127) ; FD A6 7F and (iy-128) ; FD 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 DD A6 00 and a', (ix+127) ; 76 DD A6 7F and a', (ix-128) ; 76 DD A6 80 and a', (iy) ; 76 FD A6 00 and a', (iy+127) ; 76 FD A6 7F and a', (iy-128) ; 76 FD 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) ; DD A6 00 and a, (ix+127) ; DD A6 7F and a, (ix-128) ; DD A6 80 and a, (iy) ; FD A6 00 and a, (iy+127) ; FD A6 7F and a, (iy-128) ; FD 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 ; DD DC and iy, de ; FD DC and l ; A5 and.a hl, bc ; 7C A0 67 7D A1 6F and.a hl, de ; DC and.a ix, de ; DD DC and.a iy, de ; FD 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) ; DD CB 00 46 bit 0, (ix+127) ; DD CB 7F 46 bit 0, (ix-128) ; DD CB 80 46 bit 0, (iy) ; FD CB 00 46 bit 0, (iy+127) ; FD CB 7F 46 bit 0, (iy-128) ; FD 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) ; DD CB 00 4E bit 1, (ix+127) ; DD CB 7F 4E bit 1, (ix-128) ; DD CB 80 4E bit 1, (iy) ; FD CB 00 4E bit 1, (iy+127) ; FD CB 7F 4E bit 1, (iy-128) ; FD 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) ; DD CB 00 56 bit 2, (ix+127) ; DD CB 7F 56 bit 2, (ix-128) ; DD CB 80 56 bit 2, (iy) ; FD CB 00 56 bit 2, (iy+127) ; FD CB 7F 56 bit 2, (iy-128) ; FD 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) ; DD CB 00 5E bit 3, (ix+127) ; DD CB 7F 5E bit 3, (ix-128) ; DD CB 80 5E bit 3, (iy) ; FD CB 00 5E bit 3, (iy+127) ; FD CB 7F 5E bit 3, (iy-128) ; FD 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) ; DD CB 00 66 bit 4, (ix+127) ; DD CB 7F 66 bit 4, (ix-128) ; DD CB 80 66 bit 4, (iy) ; FD CB 00 66 bit 4, (iy+127) ; FD CB 7F 66 bit 4, (iy-128) ; FD 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) ; DD CB 00 6E bit 5, (ix+127) ; DD CB 7F 6E bit 5, (ix-128) ; DD CB 80 6E bit 5, (iy) ; FD CB 00 6E bit 5, (iy+127) ; FD CB 7F 6E bit 5, (iy-128) ; FD 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) ; DD CB 00 76 bit 6, (ix+127) ; DD CB 7F 76 bit 6, (ix-128) ; DD CB 80 76 bit 6, (iy) ; FD CB 00 76 bit 6, (iy+127) ; FD CB 7F 76 bit 6, (iy-128) ; FD 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) ; DD CB 00 7E bit 7, (ix+127) ; DD CB 7F 7E bit 7, (ix-128) ; DD CB 80 7E bit 7, (iy) ; FD CB 00 7E bit 7, (iy+127) ; FD CB 7F 7E bit 7, (iy-128) ; FD 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) ; DD CB 00 46 bit.a 0, (ix+127) ; DD CB 7F 46 bit.a 0, (ix-128) ; DD CB 80 46 bit.a 0, (iy) ; FD CB 00 46 bit.a 0, (iy+127) ; FD CB 7F 46 bit.a 0, (iy-128) ; FD 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) ; DD CB 00 4E bit.a 1, (ix+127) ; DD CB 7F 4E bit.a 1, (ix-128) ; DD CB 80 4E bit.a 1, (iy) ; FD CB 00 4E bit.a 1, (iy+127) ; FD CB 7F 4E bit.a 1, (iy-128) ; FD 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) ; DD CB 00 56 bit.a 2, (ix+127) ; DD CB 7F 56 bit.a 2, (ix-128) ; DD CB 80 56 bit.a 2, (iy) ; FD CB 00 56 bit.a 2, (iy+127) ; FD CB 7F 56 bit.a 2, (iy-128) ; FD 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) ; DD CB 00 5E bit.a 3, (ix+127) ; DD CB 7F 5E bit.a 3, (ix-128) ; DD CB 80 5E bit.a 3, (iy) ; FD CB 00 5E bit.a 3, (iy+127) ; FD CB 7F 5E bit.a 3, (iy-128) ; FD 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) ; DD CB 00 66 bit.a 4, (ix+127) ; DD CB 7F 66 bit.a 4, (ix-128) ; DD CB 80 66 bit.a 4, (iy) ; FD CB 00 66 bit.a 4, (iy+127) ; FD CB 7F 66 bit.a 4, (iy-128) ; FD 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) ; DD CB 00 6E bit.a 5, (ix+127) ; DD CB 7F 6E bit.a 5, (ix-128) ; DD CB 80 6E bit.a 5, (iy) ; FD CB 00 6E bit.a 5, (iy+127) ; FD CB 7F 6E bit.a 5, (iy-128) ; FD 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) ; DD CB 00 76 bit.a 6, (ix+127) ; DD CB 7F 76 bit.a 6, (ix-128) ; DD CB 80 76 bit.a 6, (iy) ; FD CB 00 76 bit.a 6, (iy+127) ; FD CB 7F 76 bit.a 6, (iy-128) ; FD 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) ; DD CB 00 7E bit.a 7, (ix+127) ; DD CB 7F 7E bit.a 7, (ix-128) ; DD CB 80 7E bit.a 7, (iy) ; FD CB 00 7E bit.a 7, (iy+127) ; FD CB 7F 7E bit.a 7, (iy-128) ; FD 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 ; DD CC bool iy ; FD 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) ; DD BE 00 cmp (ix+127) ; DD BE 7F cmp (ix-128) ; DD BE 80 cmp (iy) ; FD BE 00 cmp (iy+127) ; FD BE 7F cmp (iy-128) ; FD BE 80 cmp -128 ; FE 80 cmp 127 ; FE 7F cmp 255 ; FE FF cmp a ; BF cmp a, (hl) ; BE cmp a, (ix) ; DD BE 00 cmp a, (ix+127) ; DD BE 7F cmp a, (ix-128) ; DD BE 80 cmp a, (iy) ; FD BE 00 cmp a, (iy+127) ; FD BE 7F cmp a, (iy-128) ; FD 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) ; DD BE 00 cp (ix+127) ; DD BE 7F cp (ix-128) ; DD BE 80 cp (iy) ; FD BE 00 cp (iy+127) ; FD BE 7F cp (iy-128) ; FD BE 80 cp -128 ; FE 80 cp 127 ; FE 7F cp 255 ; FE FF cp a ; BF cp a, (hl) ; BE cp a, (ix) ; DD BE 00 cp a, (ix+127) ; DD BE 7F cp a, (ix-128) ; DD BE 80 cp a, (iy) ; FD BE 00 cp a, (iy+127) ; FD BE 7F cp a, (iy-128) ; FD 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) ; DD 35 00 dec (ix+127) ; DD 35 7F dec (ix-128) ; DD 35 80 dec (iy) ; FD 35 00 dec (iy+127) ; FD 35 7F dec (iy-128) ; FD 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 ; DD 2B dec iy ; FD 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 ; DD E3 ex (sp), iy ; FD 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) ; DD 34 00 inc (ix+127) ; DD 34 7F inc (ix-128) ; DD 34 80 inc (iy) ; FD 34 00 inc (iy+127) ; FD 34 7F inc (iy-128) ; FD 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 ; DD 23 inc iy ; FD 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 DD 8E 00 ioe adc (ix+127) ; DB DD 8E 7F ioe adc (ix-128) ; DB DD 8E 80 ioe adc (iy) ; DB FD 8E 00 ioe adc (iy+127) ; DB FD 8E 7F ioe adc (iy-128) ; DB FD 8E 80 ioe adc a', (hl) ; DB 76 8E ioe adc a', (ix) ; DB 76 DD 8E 00 ioe adc a', (ix+127) ; DB 76 DD 8E 7F ioe adc a', (ix-128) ; DB 76 DD 8E 80 ioe adc a', (iy) ; DB 76 FD 8E 00 ioe adc a', (iy+127) ; DB 76 FD 8E 7F ioe adc a', (iy-128) ; DB 76 FD 8E 80 ioe adc a, (hl) ; DB 8E ioe adc a, (ix) ; DB DD 8E 00 ioe adc a, (ix+127) ; DB DD 8E 7F ioe adc a, (ix-128) ; DB DD 8E 80 ioe adc a, (iy) ; DB FD 8E 00 ioe adc a, (iy+127) ; DB FD 8E 7F ioe adc a, (iy-128) ; DB FD 8E 80 ioe add (hl) ; DB 86 ioe add (ix) ; DB DD 86 00 ioe add (ix+127) ; DB DD 86 7F ioe add (ix-128) ; DB DD 86 80 ioe add (iy) ; DB FD 86 00 ioe add (iy+127) ; DB FD 86 7F ioe add (iy-128) ; DB FD 86 80 ioe add a', (hl) ; DB 76 86 ioe add a', (ix) ; DB 76 DD 86 00 ioe add a', (ix+127) ; DB 76 DD 86 7F ioe add a', (ix-128) ; DB 76 DD 86 80 ioe add a', (iy) ; DB 76 FD 86 00 ioe add a', (iy+127) ; DB 76 FD 86 7F ioe add a', (iy-128) ; DB 76 FD 86 80 ioe add a, (hl) ; DB 86 ioe add a, (ix) ; DB DD 86 00 ioe add a, (ix+127) ; DB DD 86 7F ioe add a, (ix-128) ; DB DD 86 80 ioe add a, (iy) ; DB FD 86 00 ioe add a, (iy+127) ; DB FD 86 7F ioe add a, (iy-128) ; DB FD 86 80 ioe altd adc (hl) ; DB 76 8E ioe altd adc (ix) ; DB 76 DD 8E 00 ioe altd adc (ix+127) ; DB 76 DD 8E 7F ioe altd adc (ix-128) ; DB 76 DD 8E 80 ioe altd adc (iy) ; DB 76 FD 8E 00 ioe altd adc (iy+127) ; DB 76 FD 8E 7F ioe altd adc (iy-128) ; DB 76 FD 8E 80 ioe altd adc a, (hl) ; DB 76 8E ioe altd adc a, (ix) ; DB 76 DD 8E 00 ioe altd adc a, (ix+127) ; DB 76 DD 8E 7F ioe altd adc a, (ix-128) ; DB 76 DD 8E 80 ioe altd adc a, (iy) ; DB 76 FD 8E 00 ioe altd adc a, (iy+127) ; DB 76 FD 8E 7F ioe altd adc a, (iy-128) ; DB 76 FD 8E 80 ioe altd add (hl) ; DB 76 86 ioe altd add (ix) ; DB 76 DD 86 00 ioe altd add (ix+127) ; DB 76 DD 86 7F ioe altd add (ix-128) ; DB 76 DD 86 80 ioe altd add (iy) ; DB 76 FD 86 00 ioe altd add (iy+127) ; DB 76 FD 86 7F ioe altd add (iy-128) ; DB 76 FD 86 80 ioe altd add a, (hl) ; DB 76 86 ioe altd add a, (ix) ; DB 76 DD 86 00 ioe altd add a, (ix+127) ; DB 76 DD 86 7F ioe altd add a, (ix-128) ; DB 76 DD 86 80 ioe altd add a, (iy) ; DB 76 FD 86 00 ioe altd add a, (iy+127) ; DB 76 FD 86 7F ioe altd add a, (iy-128) ; DB 76 FD 86 80 ioe altd and (hl) ; DB 76 A6 ioe altd and (ix) ; DB 76 DD A6 00 ioe altd and (ix+127) ; DB 76 DD A6 7F ioe altd and (ix-128) ; DB 76 DD A6 80 ioe altd and (iy) ; DB 76 FD A6 00 ioe altd and (iy+127) ; DB 76 FD A6 7F ioe altd and (iy-128) ; DB 76 FD A6 80 ioe altd and a, (hl) ; DB 76 A6 ioe altd and a, (ix) ; DB 76 DD A6 00 ioe altd and a, (ix+127) ; DB 76 DD A6 7F ioe altd and a, (ix-128) ; DB 76 DD A6 80 ioe altd and a, (iy) ; DB 76 FD A6 00 ioe altd and a, (iy+127) ; DB 76 FD A6 7F ioe altd and a, (iy-128) ; DB 76 FD A6 80 ioe altd bit 0, (hl) ; DB 76 CB 46 ioe altd bit 0, (ix) ; DB 76 DD CB 00 46 ioe altd bit 0, (ix+127) ; DB 76 DD CB 7F 46 ioe altd bit 0, (ix-128) ; DB 76 DD CB 80 46 ioe altd bit 0, (iy) ; DB 76 FD CB 00 46 ioe altd bit 0, (iy+127) ; DB 76 FD CB 7F 46 ioe altd bit 0, (iy-128) ; DB 76 FD CB 80 46 ioe altd bit 1, (hl) ; DB 76 CB 4E ioe altd bit 1, (ix) ; DB 76 DD CB 00 4E ioe altd bit 1, (ix+127) ; DB 76 DD CB 7F 4E ioe altd bit 1, (ix-128) ; DB 76 DD CB 80 4E ioe altd bit 1, (iy) ; DB 76 FD CB 00 4E ioe altd bit 1, (iy+127) ; DB 76 FD CB 7F 4E ioe altd bit 1, (iy-128) ; DB 76 FD CB 80 4E ioe altd bit 2, (hl) ; DB 76 CB 56 ioe altd bit 2, (ix) ; DB 76 DD CB 00 56 ioe altd bit 2, (ix+127) ; DB 76 DD CB 7F 56 ioe altd bit 2, (ix-128) ; DB 76 DD CB 80 56 ioe altd bit 2, (iy) ; DB 76 FD CB 00 56 ioe altd bit 2, (iy+127) ; DB 76 FD CB 7F 56 ioe altd bit 2, (iy-128) ; DB 76 FD CB 80 56 ioe altd bit 3, (hl) ; DB 76 CB 5E ioe altd bit 3, (ix) ; DB 76 DD CB 00 5E ioe altd bit 3, (ix+127) ; DB 76 DD CB 7F 5E ioe altd bit 3, (ix-128) ; DB 76 DD CB 80 5E ioe altd bit 3, (iy) ; DB 76 FD CB 00 5E ioe altd bit 3, (iy+127) ; DB 76 FD CB 7F 5E ioe altd bit 3, (iy-128) ; DB 76 FD CB 80 5E ioe altd bit 4, (hl) ; DB 76 CB 66 ioe altd bit 4, (ix) ; DB 76 DD CB 00 66 ioe altd bit 4, (ix+127) ; DB 76 DD CB 7F 66 ioe altd bit 4, (ix-128) ; DB 76 DD CB 80 66 ioe altd bit 4, (iy) ; DB 76 FD CB 00 66 ioe altd bit 4, (iy+127) ; DB 76 FD CB 7F 66 ioe altd bit 4, (iy-128) ; DB 76 FD CB 80 66 ioe altd bit 5, (hl) ; DB 76 CB 6E ioe altd bit 5, (ix) ; DB 76 DD CB 00 6E ioe altd bit 5, (ix+127) ; DB 76 DD CB 7F 6E ioe altd bit 5, (ix-128) ; DB 76 DD CB 80 6E ioe altd bit 5, (iy) ; DB 76 FD CB 00 6E ioe altd bit 5, (iy+127) ; DB 76 FD CB 7F 6E ioe altd bit 5, (iy-128) ; DB 76 FD CB 80 6E ioe altd bit 6, (hl) ; DB 76 CB 76 ioe altd bit 6, (ix) ; DB 76 DD CB 00 76 ioe altd bit 6, (ix+127) ; DB 76 DD CB 7F 76 ioe altd bit 6, (ix-128) ; DB 76 DD CB 80 76 ioe altd bit 6, (iy) ; DB 76 FD CB 00 76 ioe altd bit 6, (iy+127) ; DB 76 FD CB 7F 76 ioe altd bit 6, (iy-128) ; DB 76 FD CB 80 76 ioe altd bit 7, (hl) ; DB 76 CB 7E ioe altd bit 7, (ix) ; DB 76 DD CB 00 7E ioe altd bit 7, (ix+127) ; DB 76 DD CB 7F 7E ioe altd bit 7, (ix-128) ; DB 76 DD CB 80 7E ioe altd bit 7, (iy) ; DB 76 FD CB 00 7E ioe altd bit 7, (iy+127) ; DB 76 FD CB 7F 7E ioe altd bit 7, (iy-128) ; DB 76 FD CB 80 7E ioe altd cp (hl) ; DB 76 BE ioe altd cp (ix) ; DB 76 DD BE 00 ioe altd cp (ix+127) ; DB 76 DD BE 7F ioe altd cp (ix-128) ; DB 76 DD BE 80 ioe altd cp (iy) ; DB 76 FD BE 00 ioe altd cp (iy+127) ; DB 76 FD BE 7F ioe altd cp (iy-128) ; DB 76 FD BE 80 ioe altd cp a, (hl) ; DB 76 BE ioe altd cp a, (ix) ; DB 76 DD BE 00 ioe altd cp a, (ix+127) ; DB 76 DD BE 7F ioe altd cp a, (ix-128) ; DB 76 DD BE 80 ioe altd cp a, (iy) ; DB 76 FD BE 00 ioe altd cp a, (iy+127) ; DB 76 FD BE 7F ioe altd cp a, (iy-128) ; DB 76 FD BE 80 ioe altd dec (hl) ; DB 76 35 ioe altd dec (ix) ; DB 76 DD 35 00 ioe altd dec (ix+127) ; DB 76 DD 35 7F ioe altd dec (ix-128) ; DB 76 DD 35 80 ioe altd dec (iy) ; DB 76 FD 35 00 ioe altd dec (iy+127) ; DB 76 FD 35 7F ioe altd dec (iy-128) ; DB 76 FD 35 80 ioe altd inc (hl) ; DB 76 34 ioe altd inc (ix) ; DB 76 DD 34 00 ioe altd inc (ix+127) ; DB 76 DD 34 7F ioe altd inc (ix-128) ; DB 76 DD 34 80 ioe altd inc (iy) ; DB 76 FD 34 00 ioe altd inc (iy+127) ; DB 76 FD 34 7F ioe altd inc (iy-128) ; DB 76 FD 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 DD 7E 00 ioe altd ld a, (ix+127) ; DB 76 DD 7E 7F ioe altd ld a, (ix-128) ; DB 76 DD 7E 80 ioe altd ld a, (iy) ; DB 76 FD 7E 00 ioe altd ld a, (iy+127) ; DB 76 FD 7E 7F ioe altd ld a, (iy-128) ; DB 76 FD 7E 80 ioe altd ld b, (hl) ; DB 76 46 ioe altd ld b, (ix) ; DB 76 DD 46 00 ioe altd ld b, (ix+127) ; DB 76 DD 46 7F ioe altd ld b, (ix-128) ; DB 76 DD 46 80 ioe altd ld b, (iy) ; DB 76 FD 46 00 ioe altd ld b, (iy+127) ; DB 76 FD 46 7F ioe altd ld b, (iy-128) ; DB 76 FD 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 DD 4E 00 ioe altd ld c, (ix+127) ; DB 76 DD 4E 7F ioe altd ld c, (ix-128) ; DB 76 DD 4E 80 ioe altd ld c, (iy) ; DB 76 FD 4E 00 ioe altd ld c, (iy+127) ; DB 76 FD 4E 7F ioe altd ld c, (iy-128) ; DB 76 FD 4E 80 ioe altd ld d, (hl) ; DB 76 56 ioe altd ld d, (ix) ; DB 76 DD 56 00 ioe altd ld d, (ix+127) ; DB 76 DD 56 7F ioe altd ld d, (ix-128) ; DB 76 DD 56 80 ioe altd ld d, (iy) ; DB 76 FD 56 00 ioe altd ld d, (iy+127) ; DB 76 FD 56 7F ioe altd ld d, (iy-128) ; DB 76 FD 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 DD 5E 00 ioe altd ld e, (ix+127) ; DB 76 DD 5E 7F ioe altd ld e, (ix-128) ; DB 76 DD 5E 80 ioe altd ld e, (iy) ; DB 76 FD 5E 00 ioe altd ld e, (iy+127) ; DB 76 FD 5E 7F ioe altd ld e, (iy-128) ; DB 76 FD 5E 80 ioe altd ld h, (hl) ; DB 76 66 ioe altd ld h, (ix) ; DB 76 DD 66 00 ioe altd ld h, (ix+127) ; DB 76 DD 66 7F ioe altd ld h, (ix-128) ; DB 76 DD 66 80 ioe altd ld h, (iy) ; DB 76 FD 66 00 ioe altd ld h, (iy+127) ; DB 76 FD 66 7F ioe altd ld h, (iy-128) ; DB 76 FD 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 E4 00 ioe altd ld hl, (ix+127) ; DB 76 E4 7F ioe altd ld hl, (ix-128) ; DB 76 E4 80 ioe altd ld hl, (iy) ; DB 76 FD E4 00 ioe altd ld hl, (iy+127) ; DB 76 FD E4 7F ioe altd ld hl, (iy-128) ; DB 76 FD E4 80 ioe altd ld l, (hl) ; DB 76 6E ioe altd ld l, (ix) ; DB 76 DD 6E 00 ioe altd ld l, (ix+127) ; DB 76 DD 6E 7F ioe altd ld l, (ix-128) ; DB 76 DD 6E 80 ioe altd ld l, (iy) ; DB 76 FD 6E 00 ioe altd ld l, (iy+127) ; DB 76 FD 6E 7F ioe altd ld l, (iy-128) ; DB 76 FD 6E 80 ioe altd or (hl) ; DB 76 B6 ioe altd or (ix) ; DB 76 DD B6 00 ioe altd or (ix+127) ; DB 76 DD B6 7F ioe altd or (ix-128) ; DB 76 DD B6 80 ioe altd or (iy) ; DB 76 FD B6 00 ioe altd or (iy+127) ; DB 76 FD B6 7F ioe altd or (iy-128) ; DB 76 FD B6 80 ioe altd or a, (hl) ; DB 76 B6 ioe altd or a, (ix) ; DB 76 DD B6 00 ioe altd or a, (ix+127) ; DB 76 DD B6 7F ioe altd or a, (ix-128) ; DB 76 DD B6 80 ioe altd or a, (iy) ; DB 76 FD B6 00 ioe altd or a, (iy+127) ; DB 76 FD B6 7F ioe altd or a, (iy-128) ; DB 76 FD B6 80 ioe altd rl (hl) ; DB 76 CB 16 ioe altd rl (ix) ; DB 76 DD CB 00 16 ioe altd rl (ix+127) ; DB 76 DD CB 7F 16 ioe altd rl (ix-128) ; DB 76 DD CB 80 16 ioe altd rl (iy) ; DB 76 FD CB 00 16 ioe altd rl (iy+127) ; DB 76 FD CB 7F 16 ioe altd rl (iy-128) ; DB 76 FD CB 80 16 ioe altd rlc (hl) ; DB 76 CB 06 ioe altd rlc (ix) ; DB 76 DD CB 00 06 ioe altd rlc (ix+127) ; DB 76 DD CB 7F 06 ioe altd rlc (ix-128) ; DB 76 DD CB 80 06 ioe altd rlc (iy) ; DB 76 FD CB 00 06 ioe altd rlc (iy+127) ; DB 76 FD CB 7F 06 ioe altd rlc (iy-128) ; DB 76 FD CB 80 06 ioe altd rr (hl) ; DB 76 CB 1E ioe altd rr (ix) ; DB 76 DD CB 00 1E ioe altd rr (ix+127) ; DB 76 DD CB 7F 1E ioe altd rr (ix-128) ; DB 76 DD CB 80 1E ioe altd rr (iy) ; DB 76 FD CB 00 1E ioe altd rr (iy+127) ; DB 76 FD CB 7F 1E ioe altd rr (iy-128) ; DB 76 FD CB 80 1E ioe altd rrc (hl) ; DB 76 CB 0E ioe altd rrc (ix) ; DB 76 DD CB 00 0E ioe altd rrc (ix+127) ; DB 76 DD CB 7F 0E ioe altd rrc (ix-128) ; DB 76 DD CB 80 0E ioe altd rrc (iy) ; DB 76 FD CB 00 0E ioe altd rrc (iy+127) ; DB 76 FD CB 7F 0E ioe altd rrc (iy-128) ; DB 76 FD CB 80 0E ioe altd sbc (hl) ; DB 76 9E ioe altd sbc (ix) ; DB 76 DD 9E 00 ioe altd sbc (ix+127) ; DB 76 DD 9E 7F ioe altd sbc (ix-128) ; DB 76 DD 9E 80 ioe altd sbc (iy) ; DB 76 FD 9E 00 ioe altd sbc (iy+127) ; DB 76 FD 9E 7F ioe altd sbc (iy-128) ; DB 76 FD 9E 80 ioe altd sbc a, (hl) ; DB 76 9E ioe altd sbc a, (ix) ; DB 76 DD 9E 00 ioe altd sbc a, (ix+127) ; DB 76 DD 9E 7F ioe altd sbc a, (ix-128) ; DB 76 DD 9E 80 ioe altd sbc a, (iy) ; DB 76 FD 9E 00 ioe altd sbc a, (iy+127) ; DB 76 FD 9E 7F ioe altd sbc a, (iy-128) ; DB 76 FD 9E 80 ioe altd sla (hl) ; DB 76 CB 26 ioe altd sla (ix) ; DB 76 DD CB 00 26 ioe altd sla (ix+127) ; DB 76 DD CB 7F 26 ioe altd sla (ix-128) ; DB 76 DD CB 80 26 ioe altd sla (iy) ; DB 76 FD CB 00 26 ioe altd sla (iy+127) ; DB 76 FD CB 7F 26 ioe altd sla (iy-128) ; DB 76 FD CB 80 26 ioe altd sra (hl) ; DB 76 CB 2E ioe altd sra (ix) ; DB 76 DD CB 00 2E ioe altd sra (ix+127) ; DB 76 DD CB 7F 2E ioe altd sra (ix-128) ; DB 76 DD CB 80 2E ioe altd sra (iy) ; DB 76 FD CB 00 2E ioe altd sra (iy+127) ; DB 76 FD CB 7F 2E ioe altd sra (iy-128) ; DB 76 FD CB 80 2E ioe altd srl (hl) ; DB 76 CB 3E ioe altd srl (ix) ; DB 76 DD CB 00 3E ioe altd srl (ix+127) ; DB 76 DD CB 7F 3E ioe altd srl (ix-128) ; DB 76 DD CB 80 3E ioe altd srl (iy) ; DB 76 FD CB 00 3E ioe altd srl (iy+127) ; DB 76 FD CB 7F 3E ioe altd srl (iy-128) ; DB 76 FD CB 80 3E ioe altd sub (hl) ; DB 76 96 ioe altd sub (ix) ; DB 76 DD 96 00 ioe altd sub (ix+127) ; DB 76 DD 96 7F ioe altd sub (ix-128) ; DB 76 DD 96 80 ioe altd sub (iy) ; DB 76 FD 96 00 ioe altd sub (iy+127) ; DB 76 FD 96 7F ioe altd sub (iy-128) ; DB 76 FD 96 80 ioe altd sub a, (hl) ; DB 76 96 ioe altd sub a, (ix) ; DB 76 DD 96 00 ioe altd sub a, (ix+127) ; DB 76 DD 96 7F ioe altd sub a, (ix-128) ; DB 76 DD 96 80 ioe altd sub a, (iy) ; DB 76 FD 96 00 ioe altd sub a, (iy+127) ; DB 76 FD 96 7F ioe altd sub a, (iy-128) ; DB 76 FD 96 80 ioe altd xor (hl) ; DB 76 AE ioe altd xor (ix) ; DB 76 DD AE 00 ioe altd xor (ix+127) ; DB 76 DD AE 7F ioe altd xor (ix-128) ; DB 76 DD AE 80 ioe altd xor (iy) ; DB 76 FD AE 00 ioe altd xor (iy+127) ; DB 76 FD AE 7F ioe altd xor (iy-128) ; DB 76 FD AE 80 ioe altd xor a, (hl) ; DB 76 AE ioe altd xor a, (ix) ; DB 76 DD AE 00 ioe altd xor a, (ix+127) ; DB 76 DD AE 7F ioe altd xor a, (ix-128) ; DB 76 DD AE 80 ioe altd xor a, (iy) ; DB 76 FD AE 00 ioe altd xor a, (iy+127) ; DB 76 FD AE 7F ioe altd xor a, (iy-128) ; DB 76 FD AE 80 ioe and (hl) ; DB A6 ioe and (ix) ; DB DD A6 00 ioe and (ix+127) ; DB DD A6 7F ioe and (ix-128) ; DB DD A6 80 ioe and (iy) ; DB FD A6 00 ioe and (iy+127) ; DB FD A6 7F ioe and (iy-128) ; DB FD A6 80 ioe and a', (hl) ; DB 76 A6 ioe and a', (ix) ; DB 76 DD A6 00 ioe and a', (ix+127) ; DB 76 DD A6 7F ioe and a', (ix-128) ; DB 76 DD A6 80 ioe and a', (iy) ; DB 76 FD A6 00 ioe and a', (iy+127) ; DB 76 FD A6 7F ioe and a', (iy-128) ; DB 76 FD A6 80 ioe and a, (hl) ; DB A6 ioe and a, (ix) ; DB DD A6 00 ioe and a, (ix+127) ; DB DD A6 7F ioe and a, (ix-128) ; DB DD A6 80 ioe and a, (iy) ; DB FD A6 00 ioe and a, (iy+127) ; DB FD A6 7F ioe and a, (iy-128) ; DB FD A6 80 ioe bit 0, (hl) ; DB CB 46 ioe bit 0, (ix) ; DB DD CB 00 46 ioe bit 0, (ix+127) ; DB DD CB 7F 46 ioe bit 0, (ix-128) ; DB DD CB 80 46 ioe bit 0, (iy) ; DB FD CB 00 46 ioe bit 0, (iy+127) ; DB FD CB 7F 46 ioe bit 0, (iy-128) ; DB FD CB 80 46 ioe bit 1, (hl) ; DB CB 4E ioe bit 1, (ix) ; DB DD CB 00 4E ioe bit 1, (ix+127) ; DB DD CB 7F 4E ioe bit 1, (ix-128) ; DB DD CB 80 4E ioe bit 1, (iy) ; DB FD CB 00 4E ioe bit 1, (iy+127) ; DB FD CB 7F 4E ioe bit 1, (iy-128) ; DB FD CB 80 4E ioe bit 2, (hl) ; DB CB 56 ioe bit 2, (ix) ; DB DD CB 00 56 ioe bit 2, (ix+127) ; DB DD CB 7F 56 ioe bit 2, (ix-128) ; DB DD CB 80 56 ioe bit 2, (iy) ; DB FD CB 00 56 ioe bit 2, (iy+127) ; DB FD CB 7F 56 ioe bit 2, (iy-128) ; DB FD CB 80 56 ioe bit 3, (hl) ; DB CB 5E ioe bit 3, (ix) ; DB DD CB 00 5E ioe bit 3, (ix+127) ; DB DD CB 7F 5E ioe bit 3, (ix-128) ; DB DD CB 80 5E ioe bit 3, (iy) ; DB FD CB 00 5E ioe bit 3, (iy+127) ; DB FD CB 7F 5E ioe bit 3, (iy-128) ; DB FD CB 80 5E ioe bit 4, (hl) ; DB CB 66 ioe bit 4, (ix) ; DB DD CB 00 66 ioe bit 4, (ix+127) ; DB DD CB 7F 66 ioe bit 4, (ix-128) ; DB DD CB 80 66 ioe bit 4, (iy) ; DB FD CB 00 66 ioe bit 4, (iy+127) ; DB FD CB 7F 66 ioe bit 4, (iy-128) ; DB FD CB 80 66 ioe bit 5, (hl) ; DB CB 6E ioe bit 5, (ix) ; DB DD CB 00 6E ioe bit 5, (ix+127) ; DB DD CB 7F 6E ioe bit 5, (ix-128) ; DB DD CB 80 6E ioe bit 5, (iy) ; DB FD CB 00 6E ioe bit 5, (iy+127) ; DB FD CB 7F 6E ioe bit 5, (iy-128) ; DB FD CB 80 6E ioe bit 6, (hl) ; DB CB 76 ioe bit 6, (ix) ; DB DD CB 00 76 ioe bit 6, (ix+127) ; DB DD CB 7F 76 ioe bit 6, (ix-128) ; DB DD CB 80 76 ioe bit 6, (iy) ; DB FD CB 00 76 ioe bit 6, (iy+127) ; DB FD CB 7F 76 ioe bit 6, (iy-128) ; DB FD CB 80 76 ioe bit 7, (hl) ; DB CB 7E ioe bit 7, (ix) ; DB DD CB 00 7E ioe bit 7, (ix+127) ; DB DD CB 7F 7E ioe bit 7, (ix-128) ; DB DD CB 80 7E ioe bit 7, (iy) ; DB FD CB 00 7E ioe bit 7, (iy+127) ; DB FD CB 7F 7E ioe bit 7, (iy-128) ; DB FD CB 80 7E ioe bit.a 0, (hl) ; DB CB 46 ioe bit.a 0, (ix) ; DB DD CB 00 46 ioe bit.a 0, (ix+127) ; DB DD CB 7F 46 ioe bit.a 0, (ix-128) ; DB DD CB 80 46 ioe bit.a 0, (iy) ; DB FD CB 00 46 ioe bit.a 0, (iy+127) ; DB FD CB 7F 46 ioe bit.a 0, (iy-128) ; DB FD CB 80 46 ioe bit.a 1, (hl) ; DB CB 4E ioe bit.a 1, (ix) ; DB DD CB 00 4E ioe bit.a 1, (ix+127) ; DB DD CB 7F 4E ioe bit.a 1, (ix-128) ; DB DD CB 80 4E ioe bit.a 1, (iy) ; DB FD CB 00 4E ioe bit.a 1, (iy+127) ; DB FD CB 7F 4E ioe bit.a 1, (iy-128) ; DB FD CB 80 4E ioe bit.a 2, (hl) ; DB CB 56 ioe bit.a 2, (ix) ; DB DD CB 00 56 ioe bit.a 2, (ix+127) ; DB DD CB 7F 56 ioe bit.a 2, (ix-128) ; DB DD CB 80 56 ioe bit.a 2, (iy) ; DB FD CB 00 56 ioe bit.a 2, (iy+127) ; DB FD CB 7F 56 ioe bit.a 2, (iy-128) ; DB FD CB 80 56 ioe bit.a 3, (hl) ; DB CB 5E ioe bit.a 3, (ix) ; DB DD CB 00 5E ioe bit.a 3, (ix+127) ; DB DD CB 7F 5E ioe bit.a 3, (ix-128) ; DB DD CB 80 5E ioe bit.a 3, (iy) ; DB FD CB 00 5E ioe bit.a 3, (iy+127) ; DB FD CB 7F 5E ioe bit.a 3, (iy-128) ; DB FD CB 80 5E ioe bit.a 4, (hl) ; DB CB 66 ioe bit.a 4, (ix) ; DB DD CB 00 66 ioe bit.a 4, (ix+127) ; DB DD CB 7F 66 ioe bit.a 4, (ix-128) ; DB DD CB 80 66 ioe bit.a 4, (iy) ; DB FD CB 00 66 ioe bit.a 4, (iy+127) ; DB FD CB 7F 66 ioe bit.a 4, (iy-128) ; DB FD CB 80 66 ioe bit.a 5, (hl) ; DB CB 6E ioe bit.a 5, (ix) ; DB DD CB 00 6E ioe bit.a 5, (ix+127) ; DB DD CB 7F 6E ioe bit.a 5, (ix-128) ; DB DD CB 80 6E ioe bit.a 5, (iy) ; DB FD CB 00 6E ioe bit.a 5, (iy+127) ; DB FD CB 7F 6E ioe bit.a 5, (iy-128) ; DB FD CB 80 6E ioe bit.a 6, (hl) ; DB CB 76 ioe bit.a 6, (ix) ; DB DD CB 00 76 ioe bit.a 6, (ix+127) ; DB DD CB 7F 76 ioe bit.a 6, (ix-128) ; DB DD CB 80 76 ioe bit.a 6, (iy) ; DB FD CB 00 76 ioe bit.a 6, (iy+127) ; DB FD CB 7F 76 ioe bit.a 6, (iy-128) ; DB FD CB 80 76 ioe bit.a 7, (hl) ; DB CB 7E ioe bit.a 7, (ix) ; DB DD CB 00 7E ioe bit.a 7, (ix+127) ; DB DD CB 7F 7E ioe bit.a 7, (ix-128) ; DB DD CB 80 7E ioe bit.a 7, (iy) ; DB FD CB 00 7E ioe bit.a 7, (iy+127) ; DB FD CB 7F 7E ioe bit.a 7, (iy-128) ; DB FD CB 80 7E ioe cmp (hl) ; DB BE ioe cmp (ix) ; DB DD BE 00 ioe cmp (ix+127) ; DB DD BE 7F ioe cmp (ix-128) ; DB DD BE 80 ioe cmp (iy) ; DB FD BE 00 ioe cmp (iy+127) ; DB FD BE 7F ioe cmp (iy-128) ; DB FD BE 80 ioe cmp a, (hl) ; DB BE ioe cmp a, (ix) ; DB DD BE 00 ioe cmp a, (ix+127) ; DB DD BE 7F ioe cmp a, (ix-128) ; DB DD BE 80 ioe cmp a, (iy) ; DB FD BE 00 ioe cmp a, (iy+127) ; DB FD BE 7F ioe cmp a, (iy-128) ; DB FD BE 80 ioe cp (hl) ; DB BE ioe cp (ix) ; DB DD BE 00 ioe cp (ix+127) ; DB DD BE 7F ioe cp (ix-128) ; DB DD BE 80 ioe cp (iy) ; DB FD BE 00 ioe cp (iy+127) ; DB FD BE 7F ioe cp (iy-128) ; DB FD BE 80 ioe cp a, (hl) ; DB BE ioe cp a, (ix) ; DB DD BE 00 ioe cp a, (ix+127) ; DB DD BE 7F ioe cp a, (ix-128) ; DB DD BE 80 ioe cp a, (iy) ; DB FD BE 00 ioe cp a, (iy+127) ; DB FD BE 7F ioe cp a, (iy-128) ; DB FD BE 80 ioe dec (hl) ; DB 35 ioe dec (ix) ; DB DD 35 00 ioe dec (ix+127) ; DB DD 35 7F ioe dec (ix-128) ; DB DD 35 80 ioe dec (iy) ; DB FD 35 00 ioe dec (iy+127) ; DB FD 35 7F ioe dec (iy-128) ; DB FD 35 80 ioe inc (hl) ; DB 34 ioe inc (ix) ; DB DD 34 00 ioe inc (ix+127) ; DB DD 34 7F ioe inc (ix-128) ; DB DD 34 80 ioe inc (iy) ; DB FD 34 00 ioe inc (iy+127) ; DB FD 34 7F ioe inc (iy-128) ; DB FD 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 DD 22 00 80 ioe ld (-32768), iy ; DB FD 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 DD 22 FF 7F ioe ld (32767), iy ; DB FD 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 DD 22 FF FF ioe ld (65535), iy ; DB FD 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 DD 36 00 80 ioe ld (ix), 127 ; DB DD 36 00 7F ioe ld (ix), 255 ; DB DD 36 00 FF ioe ld (ix), a ; DB DD 77 00 ioe ld (ix), b ; DB DD 70 00 ioe ld (ix), c ; DB DD 71 00 ioe ld (ix), d ; DB DD 72 00 ioe ld (ix), e ; DB DD 73 00 ioe ld (ix), h ; DB DD 74 00 ioe ld (ix), hl ; DB F4 00 ioe ld (ix), l ; DB DD 75 00 ioe ld (ix+127), -128 ; DB DD 36 7F 80 ioe ld (ix+127), 127 ; DB DD 36 7F 7F ioe ld (ix+127), 255 ; DB DD 36 7F FF ioe ld (ix+127), a ; DB DD 77 7F ioe ld (ix+127), b ; DB DD 70 7F ioe ld (ix+127), c ; DB DD 71 7F ioe ld (ix+127), d ; DB DD 72 7F ioe ld (ix+127), e ; DB DD 73 7F ioe ld (ix+127), h ; DB DD 74 7F ioe ld (ix+127), hl ; DB F4 7F ioe ld (ix+127), l ; DB DD 75 7F ioe ld (ix-128), -128 ; DB DD 36 80 80 ioe ld (ix-128), 127 ; DB DD 36 80 7F ioe ld (ix-128), 255 ; DB DD 36 80 FF ioe ld (ix-128), a ; DB DD 77 80 ioe ld (ix-128), b ; DB DD 70 80 ioe ld (ix-128), c ; DB DD 71 80 ioe ld (ix-128), d ; DB DD 72 80 ioe ld (ix-128), e ; DB DD 73 80 ioe ld (ix-128), h ; DB DD 74 80 ioe ld (ix-128), hl ; DB F4 80 ioe ld (ix-128), l ; DB DD 75 80 ioe ld (iy), -128 ; DB FD 36 00 80 ioe ld (iy), 127 ; DB FD 36 00 7F ioe ld (iy), 255 ; DB FD 36 00 FF ioe ld (iy), a ; DB FD 77 00 ioe ld (iy), b ; DB FD 70 00 ioe ld (iy), c ; DB FD 71 00 ioe ld (iy), d ; DB FD 72 00 ioe ld (iy), e ; DB FD 73 00 ioe ld (iy), h ; DB FD 74 00 ioe ld (iy), hl ; DB FD F4 00 ioe ld (iy), l ; DB FD 75 00 ioe ld (iy+127), -128 ; DB FD 36 7F 80 ioe ld (iy+127), 127 ; DB FD 36 7F 7F ioe ld (iy+127), 255 ; DB FD 36 7F FF ioe ld (iy+127), a ; DB FD 77 7F ioe ld (iy+127), b ; DB FD 70 7F ioe ld (iy+127), c ; DB FD 71 7F ioe ld (iy+127), d ; DB FD 72 7F ioe ld (iy+127), e ; DB FD 73 7F ioe ld (iy+127), h ; DB FD 74 7F ioe ld (iy+127), hl ; DB FD F4 7F ioe ld (iy+127), l ; DB FD 75 7F ioe ld (iy-128), -128 ; DB FD 36 80 80 ioe ld (iy-128), 127 ; DB FD 36 80 7F ioe ld (iy-128), 255 ; DB FD 36 80 FF ioe ld (iy-128), a ; DB FD 77 80 ioe ld (iy-128), b ; DB FD 70 80 ioe ld (iy-128), c ; DB FD 71 80 ioe ld (iy-128), d ; DB FD 72 80 ioe ld (iy-128), e ; DB FD 73 80 ioe ld (iy-128), h ; DB FD 74 80 ioe ld (iy-128), hl ; DB FD F4 80 ioe ld (iy-128), l ; DB FD 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 DD 7E 00 ioe ld a', (ix+127) ; DB 76 DD 7E 7F ioe ld a', (ix-128) ; DB 76 DD 7E 80 ioe ld a', (iy) ; DB 76 FD 7E 00 ioe ld a', (iy+127) ; DB 76 FD 7E 7F ioe ld a', (iy-128) ; DB 76 FD 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 DD 7E 00 ioe ld a, (ix+127) ; DB DD 7E 7F ioe ld a, (ix-128) ; DB DD 7E 80 ioe ld a, (iy) ; DB FD 7E 00 ioe ld a, (iy+127) ; DB FD 7E 7F ioe ld a, (iy-128) ; DB FD 7E 80 ioe ld b', (hl) ; DB 76 46 ioe ld b', (ix) ; DB 76 DD 46 00 ioe ld b', (ix+127) ; DB 76 DD 46 7F ioe ld b', (ix-128) ; DB 76 DD 46 80 ioe ld b', (iy) ; DB 76 FD 46 00 ioe ld b', (iy+127) ; DB 76 FD 46 7F ioe ld b', (iy-128) ; DB 76 FD 46 80 ioe ld b, (hl) ; DB 46 ioe ld b, (ix) ; DB DD 46 00 ioe ld b, (ix+127) ; DB DD 46 7F ioe ld b, (ix-128) ; DB DD 46 80 ioe ld b, (iy) ; DB FD 46 00 ioe ld b, (iy+127) ; DB FD 46 7F ioe ld b, (iy-128) ; DB FD 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 DD 4E 00 ioe ld c', (ix+127) ; DB 76 DD 4E 7F ioe ld c', (ix-128) ; DB 76 DD 4E 80 ioe ld c', (iy) ; DB 76 FD 4E 00 ioe ld c', (iy+127) ; DB 76 FD 4E 7F ioe ld c', (iy-128) ; DB 76 FD 4E 80 ioe ld c, (hl) ; DB 4E ioe ld c, (ix) ; DB DD 4E 00 ioe ld c, (ix+127) ; DB DD 4E 7F ioe ld c, (ix-128) ; DB DD 4E 80 ioe ld c, (iy) ; DB FD 4E 00 ioe ld c, (iy+127) ; DB FD 4E 7F ioe ld c, (iy-128) ; DB FD 4E 80 ioe ld d', (hl) ; DB 76 56 ioe ld d', (ix) ; DB 76 DD 56 00 ioe ld d', (ix+127) ; DB 76 DD 56 7F ioe ld d', (ix-128) ; DB 76 DD 56 80 ioe ld d', (iy) ; DB 76 FD 56 00 ioe ld d', (iy+127) ; DB 76 FD 56 7F ioe ld d', (iy-128) ; DB 76 FD 56 80 ioe ld d, (hl) ; DB 56 ioe ld d, (ix) ; DB DD 56 00 ioe ld d, (ix+127) ; DB DD 56 7F ioe ld d, (ix-128) ; DB DD 56 80 ioe ld d, (iy) ; DB FD 56 00 ioe ld d, (iy+127) ; DB FD 56 7F ioe ld d, (iy-128) ; DB FD 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 DD 5E 00 ioe ld e', (ix+127) ; DB 76 DD 5E 7F ioe ld e', (ix-128) ; DB 76 DD 5E 80 ioe ld e', (iy) ; DB 76 FD 5E 00 ioe ld e', (iy+127) ; DB 76 FD 5E 7F ioe ld e', (iy-128) ; DB 76 FD 5E 80 ioe ld e, (hl) ; DB 5E ioe ld e, (ix) ; DB DD 5E 00 ioe ld e, (ix+127) ; DB DD 5E 7F ioe ld e, (ix-128) ; DB DD 5E 80 ioe ld e, (iy) ; DB FD 5E 00 ioe ld e, (iy+127) ; DB FD 5E 7F ioe ld e, (iy-128) ; DB FD 5E 80 ioe ld h', (hl) ; DB 76 66 ioe ld h', (ix) ; DB 76 DD 66 00 ioe ld h', (ix+127) ; DB 76 DD 66 7F ioe ld h', (ix-128) ; DB 76 DD 66 80 ioe ld h', (iy) ; DB 76 FD 66 00 ioe ld h', (iy+127) ; DB 76 FD 66 7F ioe ld h', (iy-128) ; DB 76 FD 66 80 ioe ld h, (hl) ; DB 66 ioe ld h, (ix) ; DB DD 66 00 ioe ld h, (ix+127) ; DB DD 66 7F ioe ld h, (ix-128) ; DB DD 66 80 ioe ld h, (iy) ; DB FD 66 00 ioe ld h, (iy+127) ; DB FD 66 7F ioe ld h, (iy-128) ; DB FD 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 E4 00 ioe ld hl', (ix+127) ; DB 76 E4 7F ioe ld hl', (ix-128) ; DB 76 E4 80 ioe ld hl', (iy) ; DB 76 FD E4 00 ioe ld hl', (iy+127) ; DB 76 FD E4 7F ioe ld hl', (iy-128) ; DB 76 FD 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 E4 00 ioe ld hl, (ix+127) ; DB E4 7F ioe ld hl, (ix-128) ; DB E4 80 ioe ld hl, (iy) ; DB FD E4 00 ioe ld hl, (iy+127) ; DB FD E4 7F ioe ld hl, (iy-128) ; DB FD E4 80 ioe ld ix, (-32768) ; DB DD 2A 00 80 ioe ld ix, (32767) ; DB DD 2A FF 7F ioe ld ix, (65535) ; DB DD 2A FF FF ioe ld iy, (-32768) ; DB FD 2A 00 80 ioe ld iy, (32767) ; DB FD 2A FF 7F ioe ld iy, (65535) ; DB FD 2A FF FF ioe ld l', (hl) ; DB 76 6E ioe ld l', (ix) ; DB 76 DD 6E 00 ioe ld l', (ix+127) ; DB 76 DD 6E 7F ioe ld l', (ix-128) ; DB 76 DD 6E 80 ioe ld l', (iy) ; DB 76 FD 6E 00 ioe ld l', (iy+127) ; DB 76 FD 6E 7F ioe ld l', (iy-128) ; DB 76 FD 6E 80 ioe ld l, (hl) ; DB 6E ioe ld l, (ix) ; DB DD 6E 00 ioe ld l, (ix+127) ; DB DD 6E 7F ioe ld l, (ix-128) ; DB DD 6E 80 ioe ld l, (iy) ; DB FD 6E 00 ioe ld l, (iy+127) ; DB FD 6E 7F ioe ld l, (iy-128) ; DB FD 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 DD B6 00 ioe or (ix+127) ; DB DD B6 7F ioe or (ix-128) ; DB DD B6 80 ioe or (iy) ; DB FD B6 00 ioe or (iy+127) ; DB FD B6 7F ioe or (iy-128) ; DB FD B6 80 ioe or a', (hl) ; DB 76 B6 ioe or a', (ix) ; DB 76 DD B6 00 ioe or a', (ix+127) ; DB 76 DD B6 7F ioe or a', (ix-128) ; DB 76 DD B6 80 ioe or a', (iy) ; DB 76 FD B6 00 ioe or a', (iy+127) ; DB 76 FD B6 7F ioe or a', (iy-128) ; DB 76 FD B6 80 ioe or a, (hl) ; DB B6 ioe or a, (ix) ; DB DD B6 00 ioe or a, (ix+127) ; DB DD B6 7F ioe or a, (ix-128) ; DB DD B6 80 ioe or a, (iy) ; DB FD B6 00 ioe or a, (iy+127) ; DB FD B6 7F ioe or a, (iy-128) ; DB FD B6 80 ioe res 0, (hl) ; DB CB 86 ioe res 0, (ix) ; DB DD CB 00 86 ioe res 0, (ix+127) ; DB DD CB 7F 86 ioe res 0, (ix-128) ; DB DD CB 80 86 ioe res 0, (iy) ; DB FD CB 00 86 ioe res 0, (iy+127) ; DB FD CB 7F 86 ioe res 0, (iy-128) ; DB FD CB 80 86 ioe res 1, (hl) ; DB CB 8E ioe res 1, (ix) ; DB DD CB 00 8E ioe res 1, (ix+127) ; DB DD CB 7F 8E ioe res 1, (ix-128) ; DB DD CB 80 8E ioe res 1, (iy) ; DB FD CB 00 8E ioe res 1, (iy+127) ; DB FD CB 7F 8E ioe res 1, (iy-128) ; DB FD CB 80 8E ioe res 2, (hl) ; DB CB 96 ioe res 2, (ix) ; DB DD CB 00 96 ioe res 2, (ix+127) ; DB DD CB 7F 96 ioe res 2, (ix-128) ; DB DD CB 80 96 ioe res 2, (iy) ; DB FD CB 00 96 ioe res 2, (iy+127) ; DB FD CB 7F 96 ioe res 2, (iy-128) ; DB FD CB 80 96 ioe res 3, (hl) ; DB CB 9E ioe res 3, (ix) ; DB DD CB 00 9E ioe res 3, (ix+127) ; DB DD CB 7F 9E ioe res 3, (ix-128) ; DB DD CB 80 9E ioe res 3, (iy) ; DB FD CB 00 9E ioe res 3, (iy+127) ; DB FD CB 7F 9E ioe res 3, (iy-128) ; DB FD CB 80 9E ioe res 4, (hl) ; DB CB A6 ioe res 4, (ix) ; DB DD CB 00 A6 ioe res 4, (ix+127) ; DB DD CB 7F A6 ioe res 4, (ix-128) ; DB DD CB 80 A6 ioe res 4, (iy) ; DB FD CB 00 A6 ioe res 4, (iy+127) ; DB FD CB 7F A6 ioe res 4, (iy-128) ; DB FD CB 80 A6 ioe res 5, (hl) ; DB CB AE ioe res 5, (ix) ; DB DD CB 00 AE ioe res 5, (ix+127) ; DB DD CB 7F AE ioe res 5, (ix-128) ; DB DD CB 80 AE ioe res 5, (iy) ; DB FD CB 00 AE ioe res 5, (iy+127) ; DB FD CB 7F AE ioe res 5, (iy-128) ; DB FD CB 80 AE ioe res 6, (hl) ; DB CB B6 ioe res 6, (ix) ; DB DD CB 00 B6 ioe res 6, (ix+127) ; DB DD CB 7F B6 ioe res 6, (ix-128) ; DB DD CB 80 B6 ioe res 6, (iy) ; DB FD CB 00 B6 ioe res 6, (iy+127) ; DB FD CB 7F B6 ioe res 6, (iy-128) ; DB FD CB 80 B6 ioe res 7, (hl) ; DB CB BE ioe res 7, (ix) ; DB DD CB 00 BE ioe res 7, (ix+127) ; DB DD CB 7F BE ioe res 7, (ix-128) ; DB DD CB 80 BE ioe res 7, (iy) ; DB FD CB 00 BE ioe res 7, (iy+127) ; DB FD CB 7F BE ioe res 7, (iy-128) ; DB FD CB 80 BE ioe res.a 0, (hl) ; DB CB 86 ioe res.a 0, (ix) ; DB DD CB 00 86 ioe res.a 0, (ix+127) ; DB DD CB 7F 86 ioe res.a 0, (ix-128) ; DB DD CB 80 86 ioe res.a 0, (iy) ; DB FD CB 00 86 ioe res.a 0, (iy+127) ; DB FD CB 7F 86 ioe res.a 0, (iy-128) ; DB FD CB 80 86 ioe res.a 1, (hl) ; DB CB 8E ioe res.a 1, (ix) ; DB DD CB 00 8E ioe res.a 1, (ix+127) ; DB DD CB 7F 8E ioe res.a 1, (ix-128) ; DB DD CB 80 8E ioe res.a 1, (iy) ; DB FD CB 00 8E ioe res.a 1, (iy+127) ; DB FD CB 7F 8E ioe res.a 1, (iy-128) ; DB FD CB 80 8E ioe res.a 2, (hl) ; DB CB 96 ioe res.a 2, (ix) ; DB DD CB 00 96 ioe res.a 2, (ix+127) ; DB DD CB 7F 96 ioe res.a 2, (ix-128) ; DB DD CB 80 96 ioe res.a 2, (iy) ; DB FD CB 00 96 ioe res.a 2, (iy+127) ; DB FD CB 7F 96 ioe res.a 2, (iy-128) ; DB FD CB 80 96 ioe res.a 3, (hl) ; DB CB 9E ioe res.a 3, (ix) ; DB DD CB 00 9E ioe res.a 3, (ix+127) ; DB DD CB 7F 9E ioe res.a 3, (ix-128) ; DB DD CB 80 9E ioe res.a 3, (iy) ; DB FD CB 00 9E ioe res.a 3, (iy+127) ; DB FD CB 7F 9E ioe res.a 3, (iy-128) ; DB FD CB 80 9E ioe res.a 4, (hl) ; DB CB A6 ioe res.a 4, (ix) ; DB DD CB 00 A6 ioe res.a 4, (ix+127) ; DB DD CB 7F A6 ioe res.a 4, (ix-128) ; DB DD CB 80 A6 ioe res.a 4, (iy) ; DB FD CB 00 A6 ioe res.a 4, (iy+127) ; DB FD CB 7F A6 ioe res.a 4, (iy-128) ; DB FD CB 80 A6 ioe res.a 5, (hl) ; DB CB AE ioe res.a 5, (ix) ; DB DD CB 00 AE ioe res.a 5, (ix+127) ; DB DD CB 7F AE ioe res.a 5, (ix-128) ; DB DD CB 80 AE ioe res.a 5, (iy) ; DB FD CB 00 AE ioe res.a 5, (iy+127) ; DB FD CB 7F AE ioe res.a 5, (iy-128) ; DB FD CB 80 AE ioe res.a 6, (hl) ; DB CB B6 ioe res.a 6, (ix) ; DB DD CB 00 B6 ioe res.a 6, (ix+127) ; DB DD CB 7F B6 ioe res.a 6, (ix-128) ; DB DD CB 80 B6 ioe res.a 6, (iy) ; DB FD CB 00 B6 ioe res.a 6, (iy+127) ; DB FD CB 7F B6 ioe res.a 6, (iy-128) ; DB FD CB 80 B6 ioe res.a 7, (hl) ; DB CB BE ioe res.a 7, (ix) ; DB DD CB 00 BE ioe res.a 7, (ix+127) ; DB DD CB 7F BE ioe res.a 7, (ix-128) ; DB DD CB 80 BE ioe res.a 7, (iy) ; DB FD CB 00 BE ioe res.a 7, (iy+127) ; DB FD CB 7F BE ioe res.a 7, (iy-128) ; DB FD CB 80 BE ioe rl (hl) ; DB CB 16 ioe rl (ix) ; DB DD CB 00 16 ioe rl (ix+127) ; DB DD CB 7F 16 ioe rl (ix-128) ; DB DD CB 80 16 ioe rl (iy) ; DB FD CB 00 16 ioe rl (iy+127) ; DB FD CB 7F 16 ioe rl (iy-128) ; DB FD CB 80 16 ioe rlc (hl) ; DB CB 06 ioe rlc (ix) ; DB DD CB 00 06 ioe rlc (ix+127) ; DB DD CB 7F 06 ioe rlc (ix-128) ; DB DD CB 80 06 ioe rlc (iy) ; DB FD CB 00 06 ioe rlc (iy+127) ; DB FD CB 7F 06 ioe rlc (iy-128) ; DB FD CB 80 06 ioe rr (hl) ; DB CB 1E ioe rr (ix) ; DB DD CB 00 1E ioe rr (ix+127) ; DB DD CB 7F 1E ioe rr (ix-128) ; DB DD CB 80 1E ioe rr (iy) ; DB FD CB 00 1E ioe rr (iy+127) ; DB FD CB 7F 1E ioe rr (iy-128) ; DB FD CB 80 1E ioe rrc (hl) ; DB CB 0E ioe rrc (ix) ; DB DD CB 00 0E ioe rrc (ix+127) ; DB DD CB 7F 0E ioe rrc (ix-128) ; DB DD CB 80 0E ioe rrc (iy) ; DB FD CB 00 0E ioe rrc (iy+127) ; DB FD CB 7F 0E ioe rrc (iy-128) ; DB FD CB 80 0E ioe sbc (hl) ; DB 9E ioe sbc (ix) ; DB DD 9E 00 ioe sbc (ix+127) ; DB DD 9E 7F ioe sbc (ix-128) ; DB DD 9E 80 ioe sbc (iy) ; DB FD 9E 00 ioe sbc (iy+127) ; DB FD 9E 7F ioe sbc (iy-128) ; DB FD 9E 80 ioe sbc a', (hl) ; DB 76 9E ioe sbc a', (ix) ; DB 76 DD 9E 00 ioe sbc a', (ix+127) ; DB 76 DD 9E 7F ioe sbc a', (ix-128) ; DB 76 DD 9E 80 ioe sbc a', (iy) ; DB 76 FD 9E 00 ioe sbc a', (iy+127) ; DB 76 FD 9E 7F ioe sbc a', (iy-128) ; DB 76 FD 9E 80 ioe sbc a, (hl) ; DB 9E ioe sbc a, (ix) ; DB DD 9E 00 ioe sbc a, (ix+127) ; DB DD 9E 7F ioe sbc a, (ix-128) ; DB DD 9E 80 ioe sbc a, (iy) ; DB FD 9E 00 ioe sbc a, (iy+127) ; DB FD 9E 7F ioe sbc a, (iy-128) ; DB FD 9E 80 ioe set 0, (hl) ; DB CB C6 ioe set 0, (ix) ; DB DD CB 00 C6 ioe set 0, (ix+127) ; DB DD CB 7F C6 ioe set 0, (ix-128) ; DB DD CB 80 C6 ioe set 0, (iy) ; DB FD CB 00 C6 ioe set 0, (iy+127) ; DB FD CB 7F C6 ioe set 0, (iy-128) ; DB FD CB 80 C6 ioe set 1, (hl) ; DB CB CE ioe set 1, (ix) ; DB DD CB 00 CE ioe set 1, (ix+127) ; DB DD CB 7F CE ioe set 1, (ix-128) ; DB DD CB 80 CE ioe set 1, (iy) ; DB FD CB 00 CE ioe set 1, (iy+127) ; DB FD CB 7F CE ioe set 1, (iy-128) ; DB FD CB 80 CE ioe set 2, (hl) ; DB CB D6 ioe set 2, (ix) ; DB DD CB 00 D6 ioe set 2, (ix+127) ; DB DD CB 7F D6 ioe set 2, (ix-128) ; DB DD CB 80 D6 ioe set 2, (iy) ; DB FD CB 00 D6 ioe set 2, (iy+127) ; DB FD CB 7F D6 ioe set 2, (iy-128) ; DB FD CB 80 D6 ioe set 3, (hl) ; DB CB DE ioe set 3, (ix) ; DB DD CB 00 DE ioe set 3, (ix+127) ; DB DD CB 7F DE ioe set 3, (ix-128) ; DB DD CB 80 DE ioe set 3, (iy) ; DB FD CB 00 DE ioe set 3, (iy+127) ; DB FD CB 7F DE ioe set 3, (iy-128) ; DB FD CB 80 DE ioe set 4, (hl) ; DB CB E6 ioe set 4, (ix) ; DB DD CB 00 E6 ioe set 4, (ix+127) ; DB DD CB 7F E6 ioe set 4, (ix-128) ; DB DD CB 80 E6 ioe set 4, (iy) ; DB FD CB 00 E6 ioe set 4, (iy+127) ; DB FD CB 7F E6 ioe set 4, (iy-128) ; DB FD CB 80 E6 ioe set 5, (hl) ; DB CB EE ioe set 5, (ix) ; DB DD CB 00 EE ioe set 5, (ix+127) ; DB DD CB 7F EE ioe set 5, (ix-128) ; DB DD CB 80 EE ioe set 5, (iy) ; DB FD CB 00 EE ioe set 5, (iy+127) ; DB FD CB 7F EE ioe set 5, (iy-128) ; DB FD CB 80 EE ioe set 6, (hl) ; DB CB F6 ioe set 6, (ix) ; DB DD CB 00 F6 ioe set 6, (ix+127) ; DB DD CB 7F F6 ioe set 6, (ix-128) ; DB DD CB 80 F6 ioe set 6, (iy) ; DB FD CB 00 F6 ioe set 6, (iy+127) ; DB FD CB 7F F6 ioe set 6, (iy-128) ; DB FD CB 80 F6 ioe set 7, (hl) ; DB CB FE ioe set 7, (ix) ; DB DD CB 00 FE ioe set 7, (ix+127) ; DB DD CB 7F FE ioe set 7, (ix-128) ; DB DD CB 80 FE ioe set 7, (iy) ; DB FD CB 00 FE ioe set 7, (iy+127) ; DB FD CB 7F FE ioe set 7, (iy-128) ; DB FD CB 80 FE ioe set.a 0, (hl) ; DB CB C6 ioe set.a 0, (ix) ; DB DD CB 00 C6 ioe set.a 0, (ix+127) ; DB DD CB 7F C6 ioe set.a 0, (ix-128) ; DB DD CB 80 C6 ioe set.a 0, (iy) ; DB FD CB 00 C6 ioe set.a 0, (iy+127) ; DB FD CB 7F C6 ioe set.a 0, (iy-128) ; DB FD CB 80 C6 ioe set.a 1, (hl) ; DB CB CE ioe set.a 1, (ix) ; DB DD CB 00 CE ioe set.a 1, (ix+127) ; DB DD CB 7F CE ioe set.a 1, (ix-128) ; DB DD CB 80 CE ioe set.a 1, (iy) ; DB FD CB 00 CE ioe set.a 1, (iy+127) ; DB FD CB 7F CE ioe set.a 1, (iy-128) ; DB FD CB 80 CE ioe set.a 2, (hl) ; DB CB D6 ioe set.a 2, (ix) ; DB DD CB 00 D6 ioe set.a 2, (ix+127) ; DB DD CB 7F D6 ioe set.a 2, (ix-128) ; DB DD CB 80 D6 ioe set.a 2, (iy) ; DB FD CB 00 D6 ioe set.a 2, (iy+127) ; DB FD CB 7F D6 ioe set.a 2, (iy-128) ; DB FD CB 80 D6 ioe set.a 3, (hl) ; DB CB DE ioe set.a 3, (ix) ; DB DD CB 00 DE ioe set.a 3, (ix+127) ; DB DD CB 7F DE ioe set.a 3, (ix-128) ; DB DD CB 80 DE ioe set.a 3, (iy) ; DB FD CB 00 DE ioe set.a 3, (iy+127) ; DB FD CB 7F DE ioe set.a 3, (iy-128) ; DB FD CB 80 DE ioe set.a 4, (hl) ; DB CB E6 ioe set.a 4, (ix) ; DB DD CB 00 E6 ioe set.a 4, (ix+127) ; DB DD CB 7F E6 ioe set.a 4, (ix-128) ; DB DD CB 80 E6 ioe set.a 4, (iy) ; DB FD CB 00 E6 ioe set.a 4, (iy+127) ; DB FD CB 7F E6 ioe set.a 4, (iy-128) ; DB FD CB 80 E6 ioe set.a 5, (hl) ; DB CB EE ioe set.a 5, (ix) ; DB DD CB 00 EE ioe set.a 5, (ix+127) ; DB DD CB 7F EE ioe set.a 5, (ix-128) ; DB DD CB 80 EE ioe set.a 5, (iy) ; DB FD CB 00 EE ioe set.a 5, (iy+127) ; DB FD CB 7F EE ioe set.a 5, (iy-128) ; DB FD CB 80 EE ioe set.a 6, (hl) ; DB CB F6 ioe set.a 6, (ix) ; DB DD CB 00 F6 ioe set.a 6, (ix+127) ; DB DD CB 7F F6 ioe set.a 6, (ix-128) ; DB DD CB 80 F6 ioe set.a 6, (iy) ; DB FD CB 00 F6 ioe set.a 6, (iy+127) ; DB FD CB 7F F6 ioe set.a 6, (iy-128) ; DB FD CB 80 F6 ioe set.a 7, (hl) ; DB CB FE ioe set.a 7, (ix) ; DB DD CB 00 FE ioe set.a 7, (ix+127) ; DB DD CB 7F FE ioe set.a 7, (ix-128) ; DB DD CB 80 FE ioe set.a 7, (iy) ; DB FD CB 00 FE ioe set.a 7, (iy+127) ; DB FD CB 7F FE ioe set.a 7, (iy-128) ; DB FD CB 80 FE ioe sla (hl) ; DB CB 26 ioe sla (ix) ; DB DD CB 00 26 ioe sla (ix+127) ; DB DD CB 7F 26 ioe sla (ix-128) ; DB DD CB 80 26 ioe sla (iy) ; DB FD CB 00 26 ioe sla (iy+127) ; DB FD CB 7F 26 ioe sla (iy-128) ; DB FD CB 80 26 ioe sra (hl) ; DB CB 2E ioe sra (ix) ; DB DD CB 00 2E ioe sra (ix+127) ; DB DD CB 7F 2E ioe sra (ix-128) ; DB DD CB 80 2E ioe sra (iy) ; DB FD CB 00 2E ioe sra (iy+127) ; DB FD CB 7F 2E ioe sra (iy-128) ; DB FD CB 80 2E ioe srl (hl) ; DB CB 3E ioe srl (ix) ; DB DD CB 00 3E ioe srl (ix+127) ; DB DD CB 7F 3E ioe srl (ix-128) ; DB DD CB 80 3E ioe srl (iy) ; DB FD CB 00 3E ioe srl (iy+127) ; DB FD CB 7F 3E ioe srl (iy-128) ; DB FD CB 80 3E ioe sub (hl) ; DB 96 ioe sub (ix) ; DB DD 96 00 ioe sub (ix+127) ; DB DD 96 7F ioe sub (ix-128) ; DB DD 96 80 ioe sub (iy) ; DB FD 96 00 ioe sub (iy+127) ; DB FD 96 7F ioe sub (iy-128) ; DB FD 96 80 ioe sub a', (hl) ; DB 76 96 ioe sub a', (ix) ; DB 76 DD 96 00 ioe sub a', (ix+127) ; DB 76 DD 96 7F ioe sub a', (ix-128) ; DB 76 DD 96 80 ioe sub a', (iy) ; DB 76 FD 96 00 ioe sub a', (iy+127) ; DB 76 FD 96 7F ioe sub a', (iy-128) ; DB 76 FD 96 80 ioe sub a, (hl) ; DB 96 ioe sub a, (ix) ; DB DD 96 00 ioe sub a, (ix+127) ; DB DD 96 7F ioe sub a, (ix-128) ; DB DD 96 80 ioe sub a, (iy) ; DB FD 96 00 ioe sub a, (iy+127) ; DB FD 96 7F ioe sub a, (iy-128) ; DB FD 96 80 ioe xor (hl) ; DB AE ioe xor (ix) ; DB DD AE 00 ioe xor (ix+127) ; DB DD AE 7F ioe xor (ix-128) ; DB DD AE 80 ioe xor (iy) ; DB FD AE 00 ioe xor (iy+127) ; DB FD AE 7F ioe xor (iy-128) ; DB FD AE 80 ioe xor a', (hl) ; DB 76 AE ioe xor a', (ix) ; DB 76 DD AE 00 ioe xor a', (ix+127) ; DB 76 DD AE 7F ioe xor a', (ix-128) ; DB 76 DD AE 80 ioe xor a', (iy) ; DB 76 FD AE 00 ioe xor a', (iy+127) ; DB 76 FD AE 7F ioe xor a', (iy-128) ; DB 76 FD AE 80 ioe xor a, (hl) ; DB AE ioe xor a, (ix) ; DB DD AE 00 ioe xor a, (ix+127) ; DB DD AE 7F ioe xor a, (ix-128) ; DB DD AE 80 ioe xor a, (iy) ; DB FD AE 00 ioe xor a, (iy+127) ; DB FD AE 7F ioe xor a, (iy-128) ; DB FD AE 80 ioi adc (hl) ; D3 8E ioi adc (ix) ; D3 DD 8E 00 ioi adc (ix+127) ; D3 DD 8E 7F ioi adc (ix-128) ; D3 DD 8E 80 ioi adc (iy) ; D3 FD 8E 00 ioi adc (iy+127) ; D3 FD 8E 7F ioi adc (iy-128) ; D3 FD 8E 80 ioi adc a', (hl) ; D3 76 8E ioi adc a', (ix) ; D3 76 DD 8E 00 ioi adc a', (ix+127) ; D3 76 DD 8E 7F ioi adc a', (ix-128) ; D3 76 DD 8E 80 ioi adc a', (iy) ; D3 76 FD 8E 00 ioi adc a', (iy+127) ; D3 76 FD 8E 7F ioi adc a', (iy-128) ; D3 76 FD 8E 80 ioi adc a, (hl) ; D3 8E ioi adc a, (ix) ; D3 DD 8E 00 ioi adc a, (ix+127) ; D3 DD 8E 7F ioi adc a, (ix-128) ; D3 DD 8E 80 ioi adc a, (iy) ; D3 FD 8E 00 ioi adc a, (iy+127) ; D3 FD 8E 7F ioi adc a, (iy-128) ; D3 FD 8E 80 ioi add (hl) ; D3 86 ioi add (ix) ; D3 DD 86 00 ioi add (ix+127) ; D3 DD 86 7F ioi add (ix-128) ; D3 DD 86 80 ioi add (iy) ; D3 FD 86 00 ioi add (iy+127) ; D3 FD 86 7F ioi add (iy-128) ; D3 FD 86 80 ioi add a', (hl) ; D3 76 86 ioi add a', (ix) ; D3 76 DD 86 00 ioi add a', (ix+127) ; D3 76 DD 86 7F ioi add a', (ix-128) ; D3 76 DD 86 80 ioi add a', (iy) ; D3 76 FD 86 00 ioi add a', (iy+127) ; D3 76 FD 86 7F ioi add a', (iy-128) ; D3 76 FD 86 80 ioi add a, (hl) ; D3 86 ioi add a, (ix) ; D3 DD 86 00 ioi add a, (ix+127) ; D3 DD 86 7F ioi add a, (ix-128) ; D3 DD 86 80 ioi add a, (iy) ; D3 FD 86 00 ioi add a, (iy+127) ; D3 FD 86 7F ioi add a, (iy-128) ; D3 FD 86 80 ioi altd adc (hl) ; D3 76 8E ioi altd adc (ix) ; D3 76 DD 8E 00 ioi altd adc (ix+127) ; D3 76 DD 8E 7F ioi altd adc (ix-128) ; D3 76 DD 8E 80 ioi altd adc (iy) ; D3 76 FD 8E 00 ioi altd adc (iy+127) ; D3 76 FD 8E 7F ioi altd adc (iy-128) ; D3 76 FD 8E 80 ioi altd adc a, (hl) ; D3 76 8E ioi altd adc a, (ix) ; D3 76 DD 8E 00 ioi altd adc a, (ix+127) ; D3 76 DD 8E 7F ioi altd adc a, (ix-128) ; D3 76 DD 8E 80 ioi altd adc a, (iy) ; D3 76 FD 8E 00 ioi altd adc a, (iy+127) ; D3 76 FD 8E 7F ioi altd adc a, (iy-128) ; D3 76 FD 8E 80 ioi altd add (hl) ; D3 76 86 ioi altd add (ix) ; D3 76 DD 86 00 ioi altd add (ix+127) ; D3 76 DD 86 7F ioi altd add (ix-128) ; D3 76 DD 86 80 ioi altd add (iy) ; D3 76 FD 86 00 ioi altd add (iy+127) ; D3 76 FD 86 7F ioi altd add (iy-128) ; D3 76 FD 86 80 ioi altd add a, (hl) ; D3 76 86 ioi altd add a, (ix) ; D3 76 DD 86 00 ioi altd add a, (ix+127) ; D3 76 DD 86 7F ioi altd add a, (ix-128) ; D3 76 DD 86 80 ioi altd add a, (iy) ; D3 76 FD 86 00 ioi altd add a, (iy+127) ; D3 76 FD 86 7F ioi altd add a, (iy-128) ; D3 76 FD 86 80 ioi altd and (hl) ; D3 76 A6 ioi altd and (ix) ; D3 76 DD A6 00 ioi altd and (ix+127) ; D3 76 DD A6 7F ioi altd and (ix-128) ; D3 76 DD A6 80 ioi altd and (iy) ; D3 76 FD A6 00 ioi altd and (iy+127) ; D3 76 FD A6 7F ioi altd and (iy-128) ; D3 76 FD A6 80 ioi altd and a, (hl) ; D3 76 A6 ioi altd and a, (ix) ; D3 76 DD A6 00 ioi altd and a, (ix+127) ; D3 76 DD A6 7F ioi altd and a, (ix-128) ; D3 76 DD A6 80 ioi altd and a, (iy) ; D3 76 FD A6 00 ioi altd and a, (iy+127) ; D3 76 FD A6 7F ioi altd and a, (iy-128) ; D3 76 FD A6 80 ioi altd bit 0, (hl) ; D3 76 CB 46 ioi altd bit 0, (ix) ; D3 76 DD CB 00 46 ioi altd bit 0, (ix+127) ; D3 76 DD CB 7F 46 ioi altd bit 0, (ix-128) ; D3 76 DD CB 80 46 ioi altd bit 0, (iy) ; D3 76 FD CB 00 46 ioi altd bit 0, (iy+127) ; D3 76 FD CB 7F 46 ioi altd bit 0, (iy-128) ; D3 76 FD CB 80 46 ioi altd bit 1, (hl) ; D3 76 CB 4E ioi altd bit 1, (ix) ; D3 76 DD CB 00 4E ioi altd bit 1, (ix+127) ; D3 76 DD CB 7F 4E ioi altd bit 1, (ix-128) ; D3 76 DD CB 80 4E ioi altd bit 1, (iy) ; D3 76 FD CB 00 4E ioi altd bit 1, (iy+127) ; D3 76 FD CB 7F 4E ioi altd bit 1, (iy-128) ; D3 76 FD CB 80 4E ioi altd bit 2, (hl) ; D3 76 CB 56 ioi altd bit 2, (ix) ; D3 76 DD CB 00 56 ioi altd bit 2, (ix+127) ; D3 76 DD CB 7F 56 ioi altd bit 2, (ix-128) ; D3 76 DD CB 80 56 ioi altd bit 2, (iy) ; D3 76 FD CB 00 56 ioi altd bit 2, (iy+127) ; D3 76 FD CB 7F 56 ioi altd bit 2, (iy-128) ; D3 76 FD CB 80 56 ioi altd bit 3, (hl) ; D3 76 CB 5E ioi altd bit 3, (ix) ; D3 76 DD CB 00 5E ioi altd bit 3, (ix+127) ; D3 76 DD CB 7F 5E ioi altd bit 3, (ix-128) ; D3 76 DD CB 80 5E ioi altd bit 3, (iy) ; D3 76 FD CB 00 5E ioi altd bit 3, (iy+127) ; D3 76 FD CB 7F 5E ioi altd bit 3, (iy-128) ; D3 76 FD CB 80 5E ioi altd bit 4, (hl) ; D3 76 CB 66 ioi altd bit 4, (ix) ; D3 76 DD CB 00 66 ioi altd bit 4, (ix+127) ; D3 76 DD CB 7F 66 ioi altd bit 4, (ix-128) ; D3 76 DD CB 80 66 ioi altd bit 4, (iy) ; D3 76 FD CB 00 66 ioi altd bit 4, (iy+127) ; D3 76 FD CB 7F 66 ioi altd bit 4, (iy-128) ; D3 76 FD CB 80 66 ioi altd bit 5, (hl) ; D3 76 CB 6E ioi altd bit 5, (ix) ; D3 76 DD CB 00 6E ioi altd bit 5, (ix+127) ; D3 76 DD CB 7F 6E ioi altd bit 5, (ix-128) ; D3 76 DD CB 80 6E ioi altd bit 5, (iy) ; D3 76 FD CB 00 6E ioi altd bit 5, (iy+127) ; D3 76 FD CB 7F 6E ioi altd bit 5, (iy-128) ; D3 76 FD CB 80 6E ioi altd bit 6, (hl) ; D3 76 CB 76 ioi altd bit 6, (ix) ; D3 76 DD CB 00 76 ioi altd bit 6, (ix+127) ; D3 76 DD CB 7F 76 ioi altd bit 6, (ix-128) ; D3 76 DD CB 80 76 ioi altd bit 6, (iy) ; D3 76 FD CB 00 76 ioi altd bit 6, (iy+127) ; D3 76 FD CB 7F 76 ioi altd bit 6, (iy-128) ; D3 76 FD CB 80 76 ioi altd bit 7, (hl) ; D3 76 CB 7E ioi altd bit 7, (ix) ; D3 76 DD CB 00 7E ioi altd bit 7, (ix+127) ; D3 76 DD CB 7F 7E ioi altd bit 7, (ix-128) ; D3 76 DD CB 80 7E ioi altd bit 7, (iy) ; D3 76 FD CB 00 7E ioi altd bit 7, (iy+127) ; D3 76 FD CB 7F 7E ioi altd bit 7, (iy-128) ; D3 76 FD CB 80 7E ioi altd cp (hl) ; D3 76 BE ioi altd cp (ix) ; D3 76 DD BE 00 ioi altd cp (ix+127) ; D3 76 DD BE 7F ioi altd cp (ix-128) ; D3 76 DD BE 80 ioi altd cp (iy) ; D3 76 FD BE 00 ioi altd cp (iy+127) ; D3 76 FD BE 7F ioi altd cp (iy-128) ; D3 76 FD BE 80 ioi altd cp a, (hl) ; D3 76 BE ioi altd cp a, (ix) ; D3 76 DD BE 00 ioi altd cp a, (ix+127) ; D3 76 DD BE 7F ioi altd cp a, (ix-128) ; D3 76 DD BE 80 ioi altd cp a, (iy) ; D3 76 FD BE 00 ioi altd cp a, (iy+127) ; D3 76 FD BE 7F ioi altd cp a, (iy-128) ; D3 76 FD BE 80 ioi altd dec (hl) ; D3 76 35 ioi altd dec (ix) ; D3 76 DD 35 00 ioi altd dec (ix+127) ; D3 76 DD 35 7F ioi altd dec (ix-128) ; D3 76 DD 35 80 ioi altd dec (iy) ; D3 76 FD 35 00 ioi altd dec (iy+127) ; D3 76 FD 35 7F ioi altd dec (iy-128) ; D3 76 FD 35 80 ioi altd inc (hl) ; D3 76 34 ioi altd inc (ix) ; D3 76 DD 34 00 ioi altd inc (ix+127) ; D3 76 DD 34 7F ioi altd inc (ix-128) ; D3 76 DD 34 80 ioi altd inc (iy) ; D3 76 FD 34 00 ioi altd inc (iy+127) ; D3 76 FD 34 7F ioi altd inc (iy-128) ; D3 76 FD 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 DD 7E 00 ioi altd ld a, (ix+127) ; D3 76 DD 7E 7F ioi altd ld a, (ix-128) ; D3 76 DD 7E 80 ioi altd ld a, (iy) ; D3 76 FD 7E 00 ioi altd ld a, (iy+127) ; D3 76 FD 7E 7F ioi altd ld a, (iy-128) ; D3 76 FD 7E 80 ioi altd ld b, (hl) ; D3 76 46 ioi altd ld b, (ix) ; D3 76 DD 46 00 ioi altd ld b, (ix+127) ; D3 76 DD 46 7F ioi altd ld b, (ix-128) ; D3 76 DD 46 80 ioi altd ld b, (iy) ; D3 76 FD 46 00 ioi altd ld b, (iy+127) ; D3 76 FD 46 7F ioi altd ld b, (iy-128) ; D3 76 FD 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 DD 4E 00 ioi altd ld c, (ix+127) ; D3 76 DD 4E 7F ioi altd ld c, (ix-128) ; D3 76 DD 4E 80 ioi altd ld c, (iy) ; D3 76 FD 4E 00 ioi altd ld c, (iy+127) ; D3 76 FD 4E 7F ioi altd ld c, (iy-128) ; D3 76 FD 4E 80 ioi altd ld d, (hl) ; D3 76 56 ioi altd ld d, (ix) ; D3 76 DD 56 00 ioi altd ld d, (ix+127) ; D3 76 DD 56 7F ioi altd ld d, (ix-128) ; D3 76 DD 56 80 ioi altd ld d, (iy) ; D3 76 FD 56 00 ioi altd ld d, (iy+127) ; D3 76 FD 56 7F ioi altd ld d, (iy-128) ; D3 76 FD 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 DD 5E 00 ioi altd ld e, (ix+127) ; D3 76 DD 5E 7F ioi altd ld e, (ix-128) ; D3 76 DD 5E 80 ioi altd ld e, (iy) ; D3 76 FD 5E 00 ioi altd ld e, (iy+127) ; D3 76 FD 5E 7F ioi altd ld e, (iy-128) ; D3 76 FD 5E 80 ioi altd ld h, (hl) ; D3 76 66 ioi altd ld h, (ix) ; D3 76 DD 66 00 ioi altd ld h, (ix+127) ; D3 76 DD 66 7F ioi altd ld h, (ix-128) ; D3 76 DD 66 80 ioi altd ld h, (iy) ; D3 76 FD 66 00 ioi altd ld h, (iy+127) ; D3 76 FD 66 7F ioi altd ld h, (iy-128) ; D3 76 FD 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 E4 00 ioi altd ld hl, (ix+127) ; D3 76 E4 7F ioi altd ld hl, (ix-128) ; D3 76 E4 80 ioi altd ld hl, (iy) ; D3 76 FD E4 00 ioi altd ld hl, (iy+127) ; D3 76 FD E4 7F ioi altd ld hl, (iy-128) ; D3 76 FD E4 80 ioi altd ld l, (hl) ; D3 76 6E ioi altd ld l, (ix) ; D3 76 DD 6E 00 ioi altd ld l, (ix+127) ; D3 76 DD 6E 7F ioi altd ld l, (ix-128) ; D3 76 DD 6E 80 ioi altd ld l, (iy) ; D3 76 FD 6E 00 ioi altd ld l, (iy+127) ; D3 76 FD 6E 7F ioi altd ld l, (iy-128) ; D3 76 FD 6E 80 ioi altd or (hl) ; D3 76 B6 ioi altd or (ix) ; D3 76 DD B6 00 ioi altd or (ix+127) ; D3 76 DD B6 7F ioi altd or (ix-128) ; D3 76 DD B6 80 ioi altd or (iy) ; D3 76 FD B6 00 ioi altd or (iy+127) ; D3 76 FD B6 7F ioi altd or (iy-128) ; D3 76 FD B6 80 ioi altd or a, (hl) ; D3 76 B6 ioi altd or a, (ix) ; D3 76 DD B6 00 ioi altd or a, (ix+127) ; D3 76 DD B6 7F ioi altd or a, (ix-128) ; D3 76 DD B6 80 ioi altd or a, (iy) ; D3 76 FD B6 00 ioi altd or a, (iy+127) ; D3 76 FD B6 7F ioi altd or a, (iy-128) ; D3 76 FD B6 80 ioi altd rl (hl) ; D3 76 CB 16 ioi altd rl (ix) ; D3 76 DD CB 00 16 ioi altd rl (ix+127) ; D3 76 DD CB 7F 16 ioi altd rl (ix-128) ; D3 76 DD CB 80 16 ioi altd rl (iy) ; D3 76 FD CB 00 16 ioi altd rl (iy+127) ; D3 76 FD CB 7F 16 ioi altd rl (iy-128) ; D3 76 FD CB 80 16 ioi altd rlc (hl) ; D3 76 CB 06 ioi altd rlc (ix) ; D3 76 DD CB 00 06 ioi altd rlc (ix+127) ; D3 76 DD CB 7F 06 ioi altd rlc (ix-128) ; D3 76 DD CB 80 06 ioi altd rlc (iy) ; D3 76 FD CB 00 06 ioi altd rlc (iy+127) ; D3 76 FD CB 7F 06 ioi altd rlc (iy-128) ; D3 76 FD CB 80 06 ioi altd rr (hl) ; D3 76 CB 1E ioi altd rr (ix) ; D3 76 DD CB 00 1E ioi altd rr (ix+127) ; D3 76 DD CB 7F 1E ioi altd rr (ix-128) ; D3 76 DD CB 80 1E ioi altd rr (iy) ; D3 76 FD CB 00 1E ioi altd rr (iy+127) ; D3 76 FD CB 7F 1E ioi altd rr (iy-128) ; D3 76 FD CB 80 1E ioi altd rrc (hl) ; D3 76 CB 0E ioi altd rrc (ix) ; D3 76 DD CB 00 0E ioi altd rrc (ix+127) ; D3 76 DD CB 7F 0E ioi altd rrc (ix-128) ; D3 76 DD CB 80 0E ioi altd rrc (iy) ; D3 76 FD CB 00 0E ioi altd rrc (iy+127) ; D3 76 FD CB 7F 0E ioi altd rrc (iy-128) ; D3 76 FD CB 80 0E ioi altd sbc (hl) ; D3 76 9E ioi altd sbc (ix) ; D3 76 DD 9E 00 ioi altd sbc (ix+127) ; D3 76 DD 9E 7F ioi altd sbc (ix-128) ; D3 76 DD 9E 80 ioi altd sbc (iy) ; D3 76 FD 9E 00 ioi altd sbc (iy+127) ; D3 76 FD 9E 7F ioi altd sbc (iy-128) ; D3 76 FD 9E 80 ioi altd sbc a, (hl) ; D3 76 9E ioi altd sbc a, (ix) ; D3 76 DD 9E 00 ioi altd sbc a, (ix+127) ; D3 76 DD 9E 7F ioi altd sbc a, (ix-128) ; D3 76 DD 9E 80 ioi altd sbc a, (iy) ; D3 76 FD 9E 00 ioi altd sbc a, (iy+127) ; D3 76 FD 9E 7F ioi altd sbc a, (iy-128) ; D3 76 FD 9E 80 ioi altd sla (hl) ; D3 76 CB 26 ioi altd sla (ix) ; D3 76 DD CB 00 26 ioi altd sla (ix+127) ; D3 76 DD CB 7F 26 ioi altd sla (ix-128) ; D3 76 DD CB 80 26 ioi altd sla (iy) ; D3 76 FD CB 00 26 ioi altd sla (iy+127) ; D3 76 FD CB 7F 26 ioi altd sla (iy-128) ; D3 76 FD CB 80 26 ioi altd sra (hl) ; D3 76 CB 2E ioi altd sra (ix) ; D3 76 DD CB 00 2E ioi altd sra (ix+127) ; D3 76 DD CB 7F 2E ioi altd sra (ix-128) ; D3 76 DD CB 80 2E ioi altd sra (iy) ; D3 76 FD CB 00 2E ioi altd sra (iy+127) ; D3 76 FD CB 7F 2E ioi altd sra (iy-128) ; D3 76 FD CB 80 2E ioi altd srl (hl) ; D3 76 CB 3E ioi altd srl (ix) ; D3 76 DD CB 00 3E ioi altd srl (ix+127) ; D3 76 DD CB 7F 3E ioi altd srl (ix-128) ; D3 76 DD CB 80 3E ioi altd srl (iy) ; D3 76 FD CB 00 3E ioi altd srl (iy+127) ; D3 76 FD CB 7F 3E ioi altd srl (iy-128) ; D3 76 FD CB 80 3E ioi altd sub (hl) ; D3 76 96 ioi altd sub (ix) ; D3 76 DD 96 00 ioi altd sub (ix+127) ; D3 76 DD 96 7F ioi altd sub (ix-128) ; D3 76 DD 96 80 ioi altd sub (iy) ; D3 76 FD 96 00 ioi altd sub (iy+127) ; D3 76 FD 96 7F ioi altd sub (iy-128) ; D3 76 FD 96 80 ioi altd sub a, (hl) ; D3 76 96 ioi altd sub a, (ix) ; D3 76 DD 96 00 ioi altd sub a, (ix+127) ; D3 76 DD 96 7F ioi altd sub a, (ix-128) ; D3 76 DD 96 80 ioi altd sub a, (iy) ; D3 76 FD 96 00 ioi altd sub a, (iy+127) ; D3 76 FD 96 7F ioi altd sub a, (iy-128) ; D3 76 FD 96 80 ioi altd xor (hl) ; D3 76 AE ioi altd xor (ix) ; D3 76 DD AE 00 ioi altd xor (ix+127) ; D3 76 DD AE 7F ioi altd xor (ix-128) ; D3 76 DD AE 80 ioi altd xor (iy) ; D3 76 FD AE 00 ioi altd xor (iy+127) ; D3 76 FD AE 7F ioi altd xor (iy-128) ; D3 76 FD AE 80 ioi altd xor a, (hl) ; D3 76 AE ioi altd xor a, (ix) ; D3 76 DD AE 00 ioi altd xor a, (ix+127) ; D3 76 DD AE 7F ioi altd xor a, (ix-128) ; D3 76 DD AE 80 ioi altd xor a, (iy) ; D3 76 FD AE 00 ioi altd xor a, (iy+127) ; D3 76 FD AE 7F ioi altd xor a, (iy-128) ; D3 76 FD AE 80 ioi and (hl) ; D3 A6 ioi and (ix) ; D3 DD A6 00 ioi and (ix+127) ; D3 DD A6 7F ioi and (ix-128) ; D3 DD A6 80 ioi and (iy) ; D3 FD A6 00 ioi and (iy+127) ; D3 FD A6 7F ioi and (iy-128) ; D3 FD A6 80 ioi and a', (hl) ; D3 76 A6 ioi and a', (ix) ; D3 76 DD A6 00 ioi and a', (ix+127) ; D3 76 DD A6 7F ioi and a', (ix-128) ; D3 76 DD A6 80 ioi and a', (iy) ; D3 76 FD A6 00 ioi and a', (iy+127) ; D3 76 FD A6 7F ioi and a', (iy-128) ; D3 76 FD A6 80 ioi and a, (hl) ; D3 A6 ioi and a, (ix) ; D3 DD A6 00 ioi and a, (ix+127) ; D3 DD A6 7F ioi and a, (ix-128) ; D3 DD A6 80 ioi and a, (iy) ; D3 FD A6 00 ioi and a, (iy+127) ; D3 FD A6 7F ioi and a, (iy-128) ; D3 FD A6 80 ioi bit 0, (hl) ; D3 CB 46 ioi bit 0, (ix) ; D3 DD CB 00 46 ioi bit 0, (ix+127) ; D3 DD CB 7F 46 ioi bit 0, (ix-128) ; D3 DD CB 80 46 ioi bit 0, (iy) ; D3 FD CB 00 46 ioi bit 0, (iy+127) ; D3 FD CB 7F 46 ioi bit 0, (iy-128) ; D3 FD CB 80 46 ioi bit 1, (hl) ; D3 CB 4E ioi bit 1, (ix) ; D3 DD CB 00 4E ioi bit 1, (ix+127) ; D3 DD CB 7F 4E ioi bit 1, (ix-128) ; D3 DD CB 80 4E ioi bit 1, (iy) ; D3 FD CB 00 4E ioi bit 1, (iy+127) ; D3 FD CB 7F 4E ioi bit 1, (iy-128) ; D3 FD CB 80 4E ioi bit 2, (hl) ; D3 CB 56 ioi bit 2, (ix) ; D3 DD CB 00 56 ioi bit 2, (ix+127) ; D3 DD CB 7F 56 ioi bit 2, (ix-128) ; D3 DD CB 80 56 ioi bit 2, (iy) ; D3 FD CB 00 56 ioi bit 2, (iy+127) ; D3 FD CB 7F 56 ioi bit 2, (iy-128) ; D3 FD CB 80 56 ioi bit 3, (hl) ; D3 CB 5E ioi bit 3, (ix) ; D3 DD CB 00 5E ioi bit 3, (ix+127) ; D3 DD CB 7F 5E ioi bit 3, (ix-128) ; D3 DD CB 80 5E ioi bit 3, (iy) ; D3 FD CB 00 5E ioi bit 3, (iy+127) ; D3 FD CB 7F 5E ioi bit 3, (iy-128) ; D3 FD CB 80 5E ioi bit 4, (hl) ; D3 CB 66 ioi bit 4, (ix) ; D3 DD CB 00 66 ioi bit 4, (ix+127) ; D3 DD CB 7F 66 ioi bit 4, (ix-128) ; D3 DD CB 80 66 ioi bit 4, (iy) ; D3 FD CB 00 66 ioi bit 4, (iy+127) ; D3 FD CB 7F 66 ioi bit 4, (iy-128) ; D3 FD CB 80 66 ioi bit 5, (hl) ; D3 CB 6E ioi bit 5, (ix) ; D3 DD CB 00 6E ioi bit 5, (ix+127) ; D3 DD CB 7F 6E ioi bit 5, (ix-128) ; D3 DD CB 80 6E ioi bit 5, (iy) ; D3 FD CB 00 6E ioi bit 5, (iy+127) ; D3 FD CB 7F 6E ioi bit 5, (iy-128) ; D3 FD CB 80 6E ioi bit 6, (hl) ; D3 CB 76 ioi bit 6, (ix) ; D3 DD CB 00 76 ioi bit 6, (ix+127) ; D3 DD CB 7F 76 ioi bit 6, (ix-128) ; D3 DD CB 80 76 ioi bit 6, (iy) ; D3 FD CB 00 76 ioi bit 6, (iy+127) ; D3 FD CB 7F 76 ioi bit 6, (iy-128) ; D3 FD CB 80 76 ioi bit 7, (hl) ; D3 CB 7E ioi bit 7, (ix) ; D3 DD CB 00 7E ioi bit 7, (ix+127) ; D3 DD CB 7F 7E ioi bit 7, (ix-128) ; D3 DD CB 80 7E ioi bit 7, (iy) ; D3 FD CB 00 7E ioi bit 7, (iy+127) ; D3 FD CB 7F 7E ioi bit 7, (iy-128) ; D3 FD CB 80 7E ioi bit.a 0, (hl) ; D3 CB 46 ioi bit.a 0, (ix) ; D3 DD CB 00 46 ioi bit.a 0, (ix+127) ; D3 DD CB 7F 46 ioi bit.a 0, (ix-128) ; D3 DD CB 80 46 ioi bit.a 0, (iy) ; D3 FD CB 00 46 ioi bit.a 0, (iy+127) ; D3 FD CB 7F 46 ioi bit.a 0, (iy-128) ; D3 FD CB 80 46 ioi bit.a 1, (hl) ; D3 CB 4E ioi bit.a 1, (ix) ; D3 DD CB 00 4E ioi bit.a 1, (ix+127) ; D3 DD CB 7F 4E ioi bit.a 1, (ix-128) ; D3 DD CB 80 4E ioi bit.a 1, (iy) ; D3 FD CB 00 4E ioi bit.a 1, (iy+127) ; D3 FD CB 7F 4E ioi bit.a 1, (iy-128) ; D3 FD CB 80 4E ioi bit.a 2, (hl) ; D3 CB 56 ioi bit.a 2, (ix) ; D3 DD CB 00 56 ioi bit.a 2, (ix+127) ; D3 DD CB 7F 56 ioi bit.a 2, (ix-128) ; D3 DD CB 80 56 ioi bit.a 2, (iy) ; D3 FD CB 00 56 ioi bit.a 2, (iy+127) ; D3 FD CB 7F 56 ioi bit.a 2, (iy-128) ; D3 FD CB 80 56 ioi bit.a 3, (hl) ; D3 CB 5E ioi bit.a 3, (ix) ; D3 DD CB 00 5E ioi bit.a 3, (ix+127) ; D3 DD CB 7F 5E ioi bit.a 3, (ix-128) ; D3 DD CB 80 5E ioi bit.a 3, (iy) ; D3 FD CB 00 5E ioi bit.a 3, (iy+127) ; D3 FD CB 7F 5E ioi bit.a 3, (iy-128) ; D3 FD CB 80 5E ioi bit.a 4, (hl) ; D3 CB 66 ioi bit.a 4, (ix) ; D3 DD CB 00 66 ioi bit.a 4, (ix+127) ; D3 DD CB 7F 66 ioi bit.a 4, (ix-128) ; D3 DD CB 80 66 ioi bit.a 4, (iy) ; D3 FD CB 00 66 ioi bit.a 4, (iy+127) ; D3 FD CB 7F 66 ioi bit.a 4, (iy-128) ; D3 FD CB 80 66 ioi bit.a 5, (hl) ; D3 CB 6E ioi bit.a 5, (ix) ; D3 DD CB 00 6E ioi bit.a 5, (ix+127) ; D3 DD CB 7F 6E ioi bit.a 5, (ix-128) ; D3 DD CB 80 6E ioi bit.a 5, (iy) ; D3 FD CB 00 6E ioi bit.a 5, (iy+127) ; D3 FD CB 7F 6E ioi bit.a 5, (iy-128) ; D3 FD CB 80 6E ioi bit.a 6, (hl) ; D3 CB 76 ioi bit.a 6, (ix) ; D3 DD CB 00 76 ioi bit.a 6, (ix+127) ; D3 DD CB 7F 76 ioi bit.a 6, (ix-128) ; D3 DD CB 80 76 ioi bit.a 6, (iy) ; D3 FD CB 00 76 ioi bit.a 6, (iy+127) ; D3 FD CB 7F 76 ioi bit.a 6, (iy-128) ; D3 FD CB 80 76 ioi bit.a 7, (hl) ; D3 CB 7E ioi bit.a 7, (ix) ; D3 DD CB 00 7E ioi bit.a 7, (ix+127) ; D3 DD CB 7F 7E ioi bit.a 7, (ix-128) ; D3 DD CB 80 7E ioi bit.a 7, (iy) ; D3 FD CB 00 7E ioi bit.a 7, (iy+127) ; D3 FD CB 7F 7E ioi bit.a 7, (iy-128) ; D3 FD CB 80 7E ioi cmp (hl) ; D3 BE ioi cmp (ix) ; D3 DD BE 00 ioi cmp (ix+127) ; D3 DD BE 7F ioi cmp (ix-128) ; D3 DD BE 80 ioi cmp (iy) ; D3 FD BE 00 ioi cmp (iy+127) ; D3 FD BE 7F ioi cmp (iy-128) ; D3 FD BE 80 ioi cmp a, (hl) ; D3 BE ioi cmp a, (ix) ; D3 DD BE 00 ioi cmp a, (ix+127) ; D3 DD BE 7F ioi cmp a, (ix-128) ; D3 DD BE 80 ioi cmp a, (iy) ; D3 FD BE 00 ioi cmp a, (iy+127) ; D3 FD BE 7F ioi cmp a, (iy-128) ; D3 FD BE 80 ioi cp (hl) ; D3 BE ioi cp (ix) ; D3 DD BE 00 ioi cp (ix+127) ; D3 DD BE 7F ioi cp (ix-128) ; D3 DD BE 80 ioi cp (iy) ; D3 FD BE 00 ioi cp (iy+127) ; D3 FD BE 7F ioi cp (iy-128) ; D3 FD BE 80 ioi cp a, (hl) ; D3 BE ioi cp a, (ix) ; D3 DD BE 00 ioi cp a, (ix+127) ; D3 DD BE 7F ioi cp a, (ix-128) ; D3 DD BE 80 ioi cp a, (iy) ; D3 FD BE 00 ioi cp a, (iy+127) ; D3 FD BE 7F ioi cp a, (iy-128) ; D3 FD BE 80 ioi dec (hl) ; D3 35 ioi dec (ix) ; D3 DD 35 00 ioi dec (ix+127) ; D3 DD 35 7F ioi dec (ix-128) ; D3 DD 35 80 ioi dec (iy) ; D3 FD 35 00 ioi dec (iy+127) ; D3 FD 35 7F ioi dec (iy-128) ; D3 FD 35 80 ioi inc (hl) ; D3 34 ioi inc (ix) ; D3 DD 34 00 ioi inc (ix+127) ; D3 DD 34 7F ioi inc (ix-128) ; D3 DD 34 80 ioi inc (iy) ; D3 FD 34 00 ioi inc (iy+127) ; D3 FD 34 7F ioi inc (iy-128) ; D3 FD 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 DD 22 00 80 ioi ld (-32768), iy ; D3 FD 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 DD 22 FF 7F ioi ld (32767), iy ; D3 FD 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 DD 22 FF FF ioi ld (65535), iy ; D3 FD 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 DD 36 00 80 ioi ld (ix), 127 ; D3 DD 36 00 7F ioi ld (ix), 255 ; D3 DD 36 00 FF ioi ld (ix), a ; D3 DD 77 00 ioi ld (ix), b ; D3 DD 70 00 ioi ld (ix), c ; D3 DD 71 00 ioi ld (ix), d ; D3 DD 72 00 ioi ld (ix), e ; D3 DD 73 00 ioi ld (ix), h ; D3 DD 74 00 ioi ld (ix), hl ; D3 F4 00 ioi ld (ix), l ; D3 DD 75 00 ioi ld (ix+127), -128 ; D3 DD 36 7F 80 ioi ld (ix+127), 127 ; D3 DD 36 7F 7F ioi ld (ix+127), 255 ; D3 DD 36 7F FF ioi ld (ix+127), a ; D3 DD 77 7F ioi ld (ix+127), b ; D3 DD 70 7F ioi ld (ix+127), c ; D3 DD 71 7F ioi ld (ix+127), d ; D3 DD 72 7F ioi ld (ix+127), e ; D3 DD 73 7F ioi ld (ix+127), h ; D3 DD 74 7F ioi ld (ix+127), hl ; D3 F4 7F ioi ld (ix+127), l ; D3 DD 75 7F ioi ld (ix-128), -128 ; D3 DD 36 80 80 ioi ld (ix-128), 127 ; D3 DD 36 80 7F ioi ld (ix-128), 255 ; D3 DD 36 80 FF ioi ld (ix-128), a ; D3 DD 77 80 ioi ld (ix-128), b ; D3 DD 70 80 ioi ld (ix-128), c ; D3 DD 71 80 ioi ld (ix-128), d ; D3 DD 72 80 ioi ld (ix-128), e ; D3 DD 73 80 ioi ld (ix-128), h ; D3 DD 74 80 ioi ld (ix-128), hl ; D3 F4 80 ioi ld (ix-128), l ; D3 DD 75 80 ioi ld (iy), -128 ; D3 FD 36 00 80 ioi ld (iy), 127 ; D3 FD 36 00 7F ioi ld (iy), 255 ; D3 FD 36 00 FF ioi ld (iy), a ; D3 FD 77 00 ioi ld (iy), b ; D3 FD 70 00 ioi ld (iy), c ; D3 FD 71 00 ioi ld (iy), d ; D3 FD 72 00 ioi ld (iy), e ; D3 FD 73 00 ioi ld (iy), h ; D3 FD 74 00 ioi ld (iy), hl ; D3 FD F4 00 ioi ld (iy), l ; D3 FD 75 00 ioi ld (iy+127), -128 ; D3 FD 36 7F 80 ioi ld (iy+127), 127 ; D3 FD 36 7F 7F ioi ld (iy+127), 255 ; D3 FD 36 7F FF ioi ld (iy+127), a ; D3 FD 77 7F ioi ld (iy+127), b ; D3 FD 70 7F ioi ld (iy+127), c ; D3 FD 71 7F ioi ld (iy+127), d ; D3 FD 72 7F ioi ld (iy+127), e ; D3 FD 73 7F ioi ld (iy+127), h ; D3 FD 74 7F ioi ld (iy+127), hl ; D3 FD F4 7F ioi ld (iy+127), l ; D3 FD 75 7F ioi ld (iy-128), -128 ; D3 FD 36 80 80 ioi ld (iy-128), 127 ; D3 FD 36 80 7F ioi ld (iy-128), 255 ; D3 FD 36 80 FF ioi ld (iy-128), a ; D3 FD 77 80 ioi ld (iy-128), b ; D3 FD 70 80 ioi ld (iy-128), c ; D3 FD 71 80 ioi ld (iy-128), d ; D3 FD 72 80 ioi ld (iy-128), e ; D3 FD 73 80 ioi ld (iy-128), h ; D3 FD 74 80 ioi ld (iy-128), hl ; D3 FD F4 80 ioi ld (iy-128), l ; D3 FD 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 DD 7E 00 ioi ld a', (ix+127) ; D3 76 DD 7E 7F ioi ld a', (ix-128) ; D3 76 DD 7E 80 ioi ld a', (iy) ; D3 76 FD 7E 00 ioi ld a', (iy+127) ; D3 76 FD 7E 7F ioi ld a', (iy-128) ; D3 76 FD 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 DD 7E 00 ioi ld a, (ix+127) ; D3 DD 7E 7F ioi ld a, (ix-128) ; D3 DD 7E 80 ioi ld a, (iy) ; D3 FD 7E 00 ioi ld a, (iy+127) ; D3 FD 7E 7F ioi ld a, (iy-128) ; D3 FD 7E 80 ioi ld b', (hl) ; D3 76 46 ioi ld b', (ix) ; D3 76 DD 46 00 ioi ld b', (ix+127) ; D3 76 DD 46 7F ioi ld b', (ix-128) ; D3 76 DD 46 80 ioi ld b', (iy) ; D3 76 FD 46 00 ioi ld b', (iy+127) ; D3 76 FD 46 7F ioi ld b', (iy-128) ; D3 76 FD 46 80 ioi ld b, (hl) ; D3 46 ioi ld b, (ix) ; D3 DD 46 00 ioi ld b, (ix+127) ; D3 DD 46 7F ioi ld b, (ix-128) ; D3 DD 46 80 ioi ld b, (iy) ; D3 FD 46 00 ioi ld b, (iy+127) ; D3 FD 46 7F ioi ld b, (iy-128) ; D3 FD 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 DD 4E 00 ioi ld c', (ix+127) ; D3 76 DD 4E 7F ioi ld c', (ix-128) ; D3 76 DD 4E 80 ioi ld c', (iy) ; D3 76 FD 4E 00 ioi ld c', (iy+127) ; D3 76 FD 4E 7F ioi ld c', (iy-128) ; D3 76 FD 4E 80 ioi ld c, (hl) ; D3 4E ioi ld c, (ix) ; D3 DD 4E 00 ioi ld c, (ix+127) ; D3 DD 4E 7F ioi ld c, (ix-128) ; D3 DD 4E 80 ioi ld c, (iy) ; D3 FD 4E 00 ioi ld c, (iy+127) ; D3 FD 4E 7F ioi ld c, (iy-128) ; D3 FD 4E 80 ioi ld d', (hl) ; D3 76 56 ioi ld d', (ix) ; D3 76 DD 56 00 ioi ld d', (ix+127) ; D3 76 DD 56 7F ioi ld d', (ix-128) ; D3 76 DD 56 80 ioi ld d', (iy) ; D3 76 FD 56 00 ioi ld d', (iy+127) ; D3 76 FD 56 7F ioi ld d', (iy-128) ; D3 76 FD 56 80 ioi ld d, (hl) ; D3 56 ioi ld d, (ix) ; D3 DD 56 00 ioi ld d, (ix+127) ; D3 DD 56 7F ioi ld d, (ix-128) ; D3 DD 56 80 ioi ld d, (iy) ; D3 FD 56 00 ioi ld d, (iy+127) ; D3 FD 56 7F ioi ld d, (iy-128) ; D3 FD 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 DD 5E 00 ioi ld e', (ix+127) ; D3 76 DD 5E 7F ioi ld e', (ix-128) ; D3 76 DD 5E 80 ioi ld e', (iy) ; D3 76 FD 5E 00 ioi ld e', (iy+127) ; D3 76 FD 5E 7F ioi ld e', (iy-128) ; D3 76 FD 5E 80 ioi ld e, (hl) ; D3 5E ioi ld e, (ix) ; D3 DD 5E 00 ioi ld e, (ix+127) ; D3 DD 5E 7F ioi ld e, (ix-128) ; D3 DD 5E 80 ioi ld e, (iy) ; D3 FD 5E 00 ioi ld e, (iy+127) ; D3 FD 5E 7F ioi ld e, (iy-128) ; D3 FD 5E 80 ioi ld h', (hl) ; D3 76 66 ioi ld h', (ix) ; D3 76 DD 66 00 ioi ld h', (ix+127) ; D3 76 DD 66 7F ioi ld h', (ix-128) ; D3 76 DD 66 80 ioi ld h', (iy) ; D3 76 FD 66 00 ioi ld h', (iy+127) ; D3 76 FD 66 7F ioi ld h', (iy-128) ; D3 76 FD 66 80 ioi ld h, (hl) ; D3 66 ioi ld h, (ix) ; D3 DD 66 00 ioi ld h, (ix+127) ; D3 DD 66 7F ioi ld h, (ix-128) ; D3 DD 66 80 ioi ld h, (iy) ; D3 FD 66 00 ioi ld h, (iy+127) ; D3 FD 66 7F ioi ld h, (iy-128) ; D3 FD 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 E4 00 ioi ld hl', (ix+127) ; D3 76 E4 7F ioi ld hl', (ix-128) ; D3 76 E4 80 ioi ld hl', (iy) ; D3 76 FD E4 00 ioi ld hl', (iy+127) ; D3 76 FD E4 7F ioi ld hl', (iy-128) ; D3 76 FD 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 E4 00 ioi ld hl, (ix+127) ; D3 E4 7F ioi ld hl, (ix-128) ; D3 E4 80 ioi ld hl, (iy) ; D3 FD E4 00 ioi ld hl, (iy+127) ; D3 FD E4 7F ioi ld hl, (iy-128) ; D3 FD E4 80 ioi ld ix, (-32768) ; D3 DD 2A 00 80 ioi ld ix, (32767) ; D3 DD 2A FF 7F ioi ld ix, (65535) ; D3 DD 2A FF FF ioi ld iy, (-32768) ; D3 FD 2A 00 80 ioi ld iy, (32767) ; D3 FD 2A FF 7F ioi ld iy, (65535) ; D3 FD 2A FF FF ioi ld l', (hl) ; D3 76 6E ioi ld l', (ix) ; D3 76 DD 6E 00 ioi ld l', (ix+127) ; D3 76 DD 6E 7F ioi ld l', (ix-128) ; D3 76 DD 6E 80 ioi ld l', (iy) ; D3 76 FD 6E 00 ioi ld l', (iy+127) ; D3 76 FD 6E 7F ioi ld l', (iy-128) ; D3 76 FD 6E 80 ioi ld l, (hl) ; D3 6E ioi ld l, (ix) ; D3 DD 6E 00 ioi ld l, (ix+127) ; D3 DD 6E 7F ioi ld l, (ix-128) ; D3 DD 6E 80 ioi ld l, (iy) ; D3 FD 6E 00 ioi ld l, (iy+127) ; D3 FD 6E 7F ioi ld l, (iy-128) ; D3 FD 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 DD B6 00 ioi or (ix+127) ; D3 DD B6 7F ioi or (ix-128) ; D3 DD B6 80 ioi or (iy) ; D3 FD B6 00 ioi or (iy+127) ; D3 FD B6 7F ioi or (iy-128) ; D3 FD B6 80 ioi or a', (hl) ; D3 76 B6 ioi or a', (ix) ; D3 76 DD B6 00 ioi or a', (ix+127) ; D3 76 DD B6 7F ioi or a', (ix-128) ; D3 76 DD B6 80 ioi or a', (iy) ; D3 76 FD B6 00 ioi or a', (iy+127) ; D3 76 FD B6 7F ioi or a', (iy-128) ; D3 76 FD B6 80 ioi or a, (hl) ; D3 B6 ioi or a, (ix) ; D3 DD B6 00 ioi or a, (ix+127) ; D3 DD B6 7F ioi or a, (ix-128) ; D3 DD B6 80 ioi or a, (iy) ; D3 FD B6 00 ioi or a, (iy+127) ; D3 FD B6 7F ioi or a, (iy-128) ; D3 FD B6 80 ioi res 0, (hl) ; D3 CB 86 ioi res 0, (ix) ; D3 DD CB 00 86 ioi res 0, (ix+127) ; D3 DD CB 7F 86 ioi res 0, (ix-128) ; D3 DD CB 80 86 ioi res 0, (iy) ; D3 FD CB 00 86 ioi res 0, (iy+127) ; D3 FD CB 7F 86 ioi res 0, (iy-128) ; D3 FD CB 80 86 ioi res 1, (hl) ; D3 CB 8E ioi res 1, (ix) ; D3 DD CB 00 8E ioi res 1, (ix+127) ; D3 DD CB 7F 8E ioi res 1, (ix-128) ; D3 DD CB 80 8E ioi res 1, (iy) ; D3 FD CB 00 8E ioi res 1, (iy+127) ; D3 FD CB 7F 8E ioi res 1, (iy-128) ; D3 FD CB 80 8E ioi res 2, (hl) ; D3 CB 96 ioi res 2, (ix) ; D3 DD CB 00 96 ioi res 2, (ix+127) ; D3 DD CB 7F 96 ioi res 2, (ix-128) ; D3 DD CB 80 96 ioi res 2, (iy) ; D3 FD CB 00 96 ioi res 2, (iy+127) ; D3 FD CB 7F 96 ioi res 2, (iy-128) ; D3 FD CB 80 96 ioi res 3, (hl) ; D3 CB 9E ioi res 3, (ix) ; D3 DD CB 00 9E ioi res 3, (ix+127) ; D3 DD CB 7F 9E ioi res 3, (ix-128) ; D3 DD CB 80 9E ioi res 3, (iy) ; D3 FD CB 00 9E ioi res 3, (iy+127) ; D3 FD CB 7F 9E ioi res 3, (iy-128) ; D3 FD CB 80 9E ioi res 4, (hl) ; D3 CB A6 ioi res 4, (ix) ; D3 DD CB 00 A6 ioi res 4, (ix+127) ; D3 DD CB 7F A6 ioi res 4, (ix-128) ; D3 DD CB 80 A6 ioi res 4, (iy) ; D3 FD CB 00 A6 ioi res 4, (iy+127) ; D3 FD CB 7F A6 ioi res 4, (iy-128) ; D3 FD CB 80 A6 ioi res 5, (hl) ; D3 CB AE ioi res 5, (ix) ; D3 DD CB 00 AE ioi res 5, (ix+127) ; D3 DD CB 7F AE ioi res 5, (ix-128) ; D3 DD CB 80 AE ioi res 5, (iy) ; D3 FD CB 00 AE ioi res 5, (iy+127) ; D3 FD CB 7F AE ioi res 5, (iy-128) ; D3 FD CB 80 AE ioi res 6, (hl) ; D3 CB B6 ioi res 6, (ix) ; D3 DD CB 00 B6 ioi res 6, (ix+127) ; D3 DD CB 7F B6 ioi res 6, (ix-128) ; D3 DD CB 80 B6 ioi res 6, (iy) ; D3 FD CB 00 B6 ioi res 6, (iy+127) ; D3 FD CB 7F B6 ioi res 6, (iy-128) ; D3 FD CB 80 B6 ioi res 7, (hl) ; D3 CB BE ioi res 7, (ix) ; D3 DD CB 00 BE ioi res 7, (ix+127) ; D3 DD CB 7F BE ioi res 7, (ix-128) ; D3 DD CB 80 BE ioi res 7, (iy) ; D3 FD CB 00 BE ioi res 7, (iy+127) ; D3 FD CB 7F BE ioi res 7, (iy-128) ; D3 FD CB 80 BE ioi res.a 0, (hl) ; D3 CB 86 ioi res.a 0, (ix) ; D3 DD CB 00 86 ioi res.a 0, (ix+127) ; D3 DD CB 7F 86 ioi res.a 0, (ix-128) ; D3 DD CB 80 86 ioi res.a 0, (iy) ; D3 FD CB 00 86 ioi res.a 0, (iy+127) ; D3 FD CB 7F 86 ioi res.a 0, (iy-128) ; D3 FD CB 80 86 ioi res.a 1, (hl) ; D3 CB 8E ioi res.a 1, (ix) ; D3 DD CB 00 8E ioi res.a 1, (ix+127) ; D3 DD CB 7F 8E ioi res.a 1, (ix-128) ; D3 DD CB 80 8E ioi res.a 1, (iy) ; D3 FD CB 00 8E ioi res.a 1, (iy+127) ; D3 FD CB 7F 8E ioi res.a 1, (iy-128) ; D3 FD CB 80 8E ioi res.a 2, (hl) ; D3 CB 96 ioi res.a 2, (ix) ; D3 DD CB 00 96 ioi res.a 2, (ix+127) ; D3 DD CB 7F 96 ioi res.a 2, (ix-128) ; D3 DD CB 80 96 ioi res.a 2, (iy) ; D3 FD CB 00 96 ioi res.a 2, (iy+127) ; D3 FD CB 7F 96 ioi res.a 2, (iy-128) ; D3 FD CB 80 96 ioi res.a 3, (hl) ; D3 CB 9E ioi res.a 3, (ix) ; D3 DD CB 00 9E ioi res.a 3, (ix+127) ; D3 DD CB 7F 9E ioi res.a 3, (ix-128) ; D3 DD CB 80 9E ioi res.a 3, (iy) ; D3 FD CB 00 9E ioi res.a 3, (iy+127) ; D3 FD CB 7F 9E ioi res.a 3, (iy-128) ; D3 FD CB 80 9E ioi res.a 4, (hl) ; D3 CB A6 ioi res.a 4, (ix) ; D3 DD CB 00 A6 ioi res.a 4, (ix+127) ; D3 DD CB 7F A6 ioi res.a 4, (ix-128) ; D3 DD CB 80 A6 ioi res.a 4, (iy) ; D3 FD CB 00 A6 ioi res.a 4, (iy+127) ; D3 FD CB 7F A6 ioi res.a 4, (iy-128) ; D3 FD CB 80 A6 ioi res.a 5, (hl) ; D3 CB AE ioi res.a 5, (ix) ; D3 DD CB 00 AE ioi res.a 5, (ix+127) ; D3 DD CB 7F AE ioi res.a 5, (ix-128) ; D3 DD CB 80 AE ioi res.a 5, (iy) ; D3 FD CB 00 AE ioi res.a 5, (iy+127) ; D3 FD CB 7F AE ioi res.a 5, (iy-128) ; D3 FD CB 80 AE ioi res.a 6, (hl) ; D3 CB B6 ioi res.a 6, (ix) ; D3 DD CB 00 B6 ioi res.a 6, (ix+127) ; D3 DD CB 7F B6 ioi res.a 6, (ix-128) ; D3 DD CB 80 B6 ioi res.a 6, (iy) ; D3 FD CB 00 B6 ioi res.a 6, (iy+127) ; D3 FD CB 7F B6 ioi res.a 6, (iy-128) ; D3 FD CB 80 B6 ioi res.a 7, (hl) ; D3 CB BE ioi res.a 7, (ix) ; D3 DD CB 00 BE ioi res.a 7, (ix+127) ; D3 DD CB 7F BE ioi res.a 7, (ix-128) ; D3 DD CB 80 BE ioi res.a 7, (iy) ; D3 FD CB 00 BE ioi res.a 7, (iy+127) ; D3 FD CB 7F BE ioi res.a 7, (iy-128) ; D3 FD CB 80 BE ioi rl (hl) ; D3 CB 16 ioi rl (ix) ; D3 DD CB 00 16 ioi rl (ix+127) ; D3 DD CB 7F 16 ioi rl (ix-128) ; D3 DD CB 80 16 ioi rl (iy) ; D3 FD CB 00 16 ioi rl (iy+127) ; D3 FD CB 7F 16 ioi rl (iy-128) ; D3 FD CB 80 16 ioi rlc (hl) ; D3 CB 06 ioi rlc (ix) ; D3 DD CB 00 06 ioi rlc (ix+127) ; D3 DD CB 7F 06 ioi rlc (ix-128) ; D3 DD CB 80 06 ioi rlc (iy) ; D3 FD CB 00 06 ioi rlc (iy+127) ; D3 FD CB 7F 06 ioi rlc (iy-128) ; D3 FD CB 80 06 ioi rr (hl) ; D3 CB 1E ioi rr (ix) ; D3 DD CB 00 1E ioi rr (ix+127) ; D3 DD CB 7F 1E ioi rr (ix-128) ; D3 DD CB 80 1E ioi rr (iy) ; D3 FD CB 00 1E ioi rr (iy+127) ; D3 FD CB 7F 1E ioi rr (iy-128) ; D3 FD CB 80 1E ioi rrc (hl) ; D3 CB 0E ioi rrc (ix) ; D3 DD CB 00 0E ioi rrc (ix+127) ; D3 DD CB 7F 0E ioi rrc (ix-128) ; D3 DD CB 80 0E ioi rrc (iy) ; D3 FD CB 00 0E ioi rrc (iy+127) ; D3 FD CB 7F 0E ioi rrc (iy-128) ; D3 FD CB 80 0E ioi sbc (hl) ; D3 9E ioi sbc (ix) ; D3 DD 9E 00 ioi sbc (ix+127) ; D3 DD 9E 7F ioi sbc (ix-128) ; D3 DD 9E 80 ioi sbc (iy) ; D3 FD 9E 00 ioi sbc (iy+127) ; D3 FD 9E 7F ioi sbc (iy-128) ; D3 FD 9E 80 ioi sbc a', (hl) ; D3 76 9E ioi sbc a', (ix) ; D3 76 DD 9E 00 ioi sbc a', (ix+127) ; D3 76 DD 9E 7F ioi sbc a', (ix-128) ; D3 76 DD 9E 80 ioi sbc a', (iy) ; D3 76 FD 9E 00 ioi sbc a', (iy+127) ; D3 76 FD 9E 7F ioi sbc a', (iy-128) ; D3 76 FD 9E 80 ioi sbc a, (hl) ; D3 9E ioi sbc a, (ix) ; D3 DD 9E 00 ioi sbc a, (ix+127) ; D3 DD 9E 7F ioi sbc a, (ix-128) ; D3 DD 9E 80 ioi sbc a, (iy) ; D3 FD 9E 00 ioi sbc a, (iy+127) ; D3 FD 9E 7F ioi sbc a, (iy-128) ; D3 FD 9E 80 ioi set 0, (hl) ; D3 CB C6 ioi set 0, (ix) ; D3 DD CB 00 C6 ioi set 0, (ix+127) ; D3 DD CB 7F C6 ioi set 0, (ix-128) ; D3 DD CB 80 C6 ioi set 0, (iy) ; D3 FD CB 00 C6 ioi set 0, (iy+127) ; D3 FD CB 7F C6 ioi set 0, (iy-128) ; D3 FD CB 80 C6 ioi set 1, (hl) ; D3 CB CE ioi set 1, (ix) ; D3 DD CB 00 CE ioi set 1, (ix+127) ; D3 DD CB 7F CE ioi set 1, (ix-128) ; D3 DD CB 80 CE ioi set 1, (iy) ; D3 FD CB 00 CE ioi set 1, (iy+127) ; D3 FD CB 7F CE ioi set 1, (iy-128) ; D3 FD CB 80 CE ioi set 2, (hl) ; D3 CB D6 ioi set 2, (ix) ; D3 DD CB 00 D6 ioi set 2, (ix+127) ; D3 DD CB 7F D6 ioi set 2, (ix-128) ; D3 DD CB 80 D6 ioi set 2, (iy) ; D3 FD CB 00 D6 ioi set 2, (iy+127) ; D3 FD CB 7F D6 ioi set 2, (iy-128) ; D3 FD CB 80 D6 ioi set 3, (hl) ; D3 CB DE ioi set 3, (ix) ; D3 DD CB 00 DE ioi set 3, (ix+127) ; D3 DD CB 7F DE ioi set 3, (ix-128) ; D3 DD CB 80 DE ioi set 3, (iy) ; D3 FD CB 00 DE ioi set 3, (iy+127) ; D3 FD CB 7F DE ioi set 3, (iy-128) ; D3 FD CB 80 DE ioi set 4, (hl) ; D3 CB E6 ioi set 4, (ix) ; D3 DD CB 00 E6 ioi set 4, (ix+127) ; D3 DD CB 7F E6 ioi set 4, (ix-128) ; D3 DD CB 80 E6 ioi set 4, (iy) ; D3 FD CB 00 E6 ioi set 4, (iy+127) ; D3 FD CB 7F E6 ioi set 4, (iy-128) ; D3 FD CB 80 E6 ioi set 5, (hl) ; D3 CB EE ioi set 5, (ix) ; D3 DD CB 00 EE ioi set 5, (ix+127) ; D3 DD CB 7F EE ioi set 5, (ix-128) ; D3 DD CB 80 EE ioi set 5, (iy) ; D3 FD CB 00 EE ioi set 5, (iy+127) ; D3 FD CB 7F EE ioi set 5, (iy-128) ; D3 FD CB 80 EE ioi set 6, (hl) ; D3 CB F6 ioi set 6, (ix) ; D3 DD CB 00 F6 ioi set 6, (ix+127) ; D3 DD CB 7F F6 ioi set 6, (ix-128) ; D3 DD CB 80 F6 ioi set 6, (iy) ; D3 FD CB 00 F6 ioi set 6, (iy+127) ; D3 FD CB 7F F6 ioi set 6, (iy-128) ; D3 FD CB 80 F6 ioi set 7, (hl) ; D3 CB FE ioi set 7, (ix) ; D3 DD CB 00 FE ioi set 7, (ix+127) ; D3 DD CB 7F FE ioi set 7, (ix-128) ; D3 DD CB 80 FE ioi set 7, (iy) ; D3 FD CB 00 FE ioi set 7, (iy+127) ; D3 FD CB 7F FE ioi set 7, (iy-128) ; D3 FD CB 80 FE ioi set.a 0, (hl) ; D3 CB C6 ioi set.a 0, (ix) ; D3 DD CB 00 C6 ioi set.a 0, (ix+127) ; D3 DD CB 7F C6 ioi set.a 0, (ix-128) ; D3 DD CB 80 C6 ioi set.a 0, (iy) ; D3 FD CB 00 C6 ioi set.a 0, (iy+127) ; D3 FD CB 7F C6 ioi set.a 0, (iy-128) ; D3 FD CB 80 C6 ioi set.a 1, (hl) ; D3 CB CE ioi set.a 1, (ix) ; D3 DD CB 00 CE ioi set.a 1, (ix+127) ; D3 DD CB 7F CE ioi set.a 1, (ix-128) ; D3 DD CB 80 CE ioi set.a 1, (iy) ; D3 FD CB 00 CE ioi set.a 1, (iy+127) ; D3 FD CB 7F CE ioi set.a 1, (iy-128) ; D3 FD CB 80 CE ioi set.a 2, (hl) ; D3 CB D6 ioi set.a 2, (ix) ; D3 DD CB 00 D6 ioi set.a 2, (ix+127) ; D3 DD CB 7F D6 ioi set.a 2, (ix-128) ; D3 DD CB 80 D6 ioi set.a 2, (iy) ; D3 FD CB 00 D6 ioi set.a 2, (iy+127) ; D3 FD CB 7F D6 ioi set.a 2, (iy-128) ; D3 FD CB 80 D6 ioi set.a 3, (hl) ; D3 CB DE ioi set.a 3, (ix) ; D3 DD CB 00 DE ioi set.a 3, (ix+127) ; D3 DD CB 7F DE ioi set.a 3, (ix-128) ; D3 DD CB 80 DE ioi set.a 3, (iy) ; D3 FD CB 00 DE ioi set.a 3, (iy+127) ; D3 FD CB 7F DE ioi set.a 3, (iy-128) ; D3 FD CB 80 DE ioi set.a 4, (hl) ; D3 CB E6 ioi set.a 4, (ix) ; D3 DD CB 00 E6 ioi set.a 4, (ix+127) ; D3 DD CB 7F E6 ioi set.a 4, (ix-128) ; D3 DD CB 80 E6 ioi set.a 4, (iy) ; D3 FD CB 00 E6 ioi set.a 4, (iy+127) ; D3 FD CB 7F E6 ioi set.a 4, (iy-128) ; D3 FD CB 80 E6 ioi set.a 5, (hl) ; D3 CB EE ioi set.a 5, (ix) ; D3 DD CB 00 EE ioi set.a 5, (ix+127) ; D3 DD CB 7F EE ioi set.a 5, (ix-128) ; D3 DD CB 80 EE ioi set.a 5, (iy) ; D3 FD CB 00 EE ioi set.a 5, (iy+127) ; D3 FD CB 7F EE ioi set.a 5, (iy-128) ; D3 FD CB 80 EE ioi set.a 6, (hl) ; D3 CB F6 ioi set.a 6, (ix) ; D3 DD CB 00 F6 ioi set.a 6, (ix+127) ; D3 DD CB 7F F6 ioi set.a 6, (ix-128) ; D3 DD CB 80 F6 ioi set.a 6, (iy) ; D3 FD CB 00 F6 ioi set.a 6, (iy+127) ; D3 FD CB 7F F6 ioi set.a 6, (iy-128) ; D3 FD CB 80 F6 ioi set.a 7, (hl) ; D3 CB FE ioi set.a 7, (ix) ; D3 DD CB 00 FE ioi set.a 7, (ix+127) ; D3 DD CB 7F FE ioi set.a 7, (ix-128) ; D3 DD CB 80 FE ioi set.a 7, (iy) ; D3 FD CB 00 FE ioi set.a 7, (iy+127) ; D3 FD CB 7F FE ioi set.a 7, (iy-128) ; D3 FD CB 80 FE ioi sla (hl) ; D3 CB 26 ioi sla (ix) ; D3 DD CB 00 26 ioi sla (ix+127) ; D3 DD CB 7F 26 ioi sla (ix-128) ; D3 DD CB 80 26 ioi sla (iy) ; D3 FD CB 00 26 ioi sla (iy+127) ; D3 FD CB 7F 26 ioi sla (iy-128) ; D3 FD CB 80 26 ioi sra (hl) ; D3 CB 2E ioi sra (ix) ; D3 DD CB 00 2E ioi sra (ix+127) ; D3 DD CB 7F 2E ioi sra (ix-128) ; D3 DD CB 80 2E ioi sra (iy) ; D3 FD CB 00 2E ioi sra (iy+127) ; D3 FD CB 7F 2E ioi sra (iy-128) ; D3 FD CB 80 2E ioi srl (hl) ; D3 CB 3E ioi srl (ix) ; D3 DD CB 00 3E ioi srl (ix+127) ; D3 DD CB 7F 3E ioi srl (ix-128) ; D3 DD CB 80 3E ioi srl (iy) ; D3 FD CB 00 3E ioi srl (iy+127) ; D3 FD CB 7F 3E ioi srl (iy-128) ; D3 FD CB 80 3E ioi sub (hl) ; D3 96 ioi sub (ix) ; D3 DD 96 00 ioi sub (ix+127) ; D3 DD 96 7F ioi sub (ix-128) ; D3 DD 96 80 ioi sub (iy) ; D3 FD 96 00 ioi sub (iy+127) ; D3 FD 96 7F ioi sub (iy-128) ; D3 FD 96 80 ioi sub a', (hl) ; D3 76 96 ioi sub a', (ix) ; D3 76 DD 96 00 ioi sub a', (ix+127) ; D3 76 DD 96 7F ioi sub a', (ix-128) ; D3 76 DD 96 80 ioi sub a', (iy) ; D3 76 FD 96 00 ioi sub a', (iy+127) ; D3 76 FD 96 7F ioi sub a', (iy-128) ; D3 76 FD 96 80 ioi sub a, (hl) ; D3 96 ioi sub a, (ix) ; D3 DD 96 00 ioi sub a, (ix+127) ; D3 DD 96 7F ioi sub a, (ix-128) ; D3 DD 96 80 ioi sub a, (iy) ; D3 FD 96 00 ioi sub a, (iy+127) ; D3 FD 96 7F ioi sub a, (iy-128) ; D3 FD 96 80 ioi xor (hl) ; D3 AE ioi xor (ix) ; D3 DD AE 00 ioi xor (ix+127) ; D3 DD AE 7F ioi xor (ix-128) ; D3 DD AE 80 ioi xor (iy) ; D3 FD AE 00 ioi xor (iy+127) ; D3 FD AE 7F ioi xor (iy-128) ; D3 FD AE 80 ioi xor a', (hl) ; D3 76 AE ioi xor a', (ix) ; D3 76 DD AE 00 ioi xor a', (ix+127) ; D3 76 DD AE 7F ioi xor a', (ix-128) ; D3 76 DD AE 80 ioi xor a', (iy) ; D3 76 FD AE 00 ioi xor a', (iy+127) ; D3 76 FD AE 7F ioi xor a', (iy-128) ; D3 76 FD AE 80 ioi xor a, (hl) ; D3 AE ioi xor a, (ix) ; D3 DD AE 00 ioi xor a, (ix+127) ; D3 DD AE 7F ioi xor a, (ix-128) ; D3 DD AE 80 ioi xor a, (iy) ; D3 FD AE 00 ioi xor a, (iy+127) ; D3 FD AE 7F ioi xor a, (iy-128) ; D3 FD 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) ; DD E9 jp (iy) ; FD 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 ; DD 22 00 80 ld (-32768), iy ; FD 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 ; DD 22 FF 7F ld (32767), iy ; FD 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 ; DD 22 FF FF ld (65535), iy ; FD 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 ; DD 36 00 80 ld (ix), 127 ; DD 36 00 7F ld (ix), 255 ; DD 36 00 FF ld (ix), a ; DD 77 00 ld (ix), b ; DD 70 00 ld (ix), c ; DD 71 00 ld (ix), d ; DD 72 00 ld (ix), e ; DD 73 00 ld (ix), h ; DD 74 00 ld (ix), hl ; F4 00 ld (ix), l ; DD 75 00 ld (ix+127), -128 ; DD 36 7F 80 ld (ix+127), 127 ; DD 36 7F 7F ld (ix+127), 255 ; DD 36 7F FF ld (ix+127), a ; DD 77 7F ld (ix+127), b ; DD 70 7F ld (ix+127), c ; DD 71 7F ld (ix+127), d ; DD 72 7F ld (ix+127), e ; DD 73 7F ld (ix+127), h ; DD 74 7F ld (ix+127), hl ; F4 7F ld (ix+127), l ; DD 75 7F ld (ix-128), -128 ; DD 36 80 80 ld (ix-128), 127 ; DD 36 80 7F ld (ix-128), 255 ; DD 36 80 FF ld (ix-128), a ; DD 77 80 ld (ix-128), b ; DD 70 80 ld (ix-128), c ; DD 71 80 ld (ix-128), d ; DD 72 80 ld (ix-128), e ; DD 73 80 ld (ix-128), h ; DD 74 80 ld (ix-128), hl ; F4 80 ld (ix-128), l ; DD 75 80 ld (iy), -128 ; FD 36 00 80 ld (iy), 127 ; FD 36 00 7F ld (iy), 255 ; FD 36 00 FF ld (iy), a ; FD 77 00 ld (iy), b ; FD 70 00 ld (iy), c ; FD 71 00 ld (iy), d ; FD 72 00 ld (iy), e ; FD 73 00 ld (iy), h ; FD 74 00 ld (iy), hl ; FD F4 00 ld (iy), l ; FD 75 00 ld (iy+127), -128 ; FD 36 7F 80 ld (iy+127), 127 ; FD 36 7F 7F ld (iy+127), 255 ; FD 36 7F FF ld (iy+127), a ; FD 77 7F ld (iy+127), b ; FD 70 7F ld (iy+127), c ; FD 71 7F ld (iy+127), d ; FD 72 7F ld (iy+127), e ; FD 73 7F ld (iy+127), h ; FD 74 7F ld (iy+127), hl ; FD F4 7F ld (iy+127), l ; FD 75 7F ld (iy-128), -128 ; FD 36 80 80 ld (iy-128), 127 ; FD 36 80 7F ld (iy-128), 255 ; FD 36 80 FF ld (iy-128), a ; FD 77 80 ld (iy-128), b ; FD 70 80 ld (iy-128), c ; FD 71 80 ld (iy-128), d ; FD 72 80 ld (iy-128), e ; FD 73 80 ld (iy-128), h ; FD 74 80 ld (iy-128), hl ; FD F4 80 ld (iy-128), l ; FD 75 80 ld (sp), hl ; D4 00 ld (sp), ix ; DD D4 00 ld (sp), iy ; FD D4 00 ld (sp+0), hl ; D4 00 ld (sp+0), ix ; DD D4 00 ld (sp+0), iy ; FD D4 00 ld (sp+255), hl ; D4 FF ld (sp+255), ix ; DD D4 FF ld (sp+255), iy ; FD 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 DD 7E 00 ld a', (ix+127) ; 76 DD 7E 7F ld a', (ix-128) ; 76 DD 7E 80 ld a', (iy) ; 76 FD 7E 00 ld a', (iy+127) ; 76 FD 7E 7F ld a', (iy-128) ; 76 FD 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) ; DD 7E 00 ld a, (ix+127) ; DD 7E 7F ld a, (ix-128) ; DD 7E 80 ld a, (iy) ; FD 7E 00 ld a, (iy+127) ; FD 7E 7F ld a, (iy-128) ; FD 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 DD 46 00 ld b', (ix+127) ; 76 DD 46 7F ld b', (ix-128) ; 76 DD 46 80 ld b', (iy) ; 76 FD 46 00 ld b', (iy+127) ; 76 FD 46 7F ld b', (iy-128) ; 76 FD 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) ; DD 46 00 ld b, (ix+127) ; DD 46 7F ld b, (ix-128) ; DD 46 80 ld b, (iy) ; FD 46 00 ld b, (iy+127) ; FD 46 7F ld b, (iy-128) ; FD 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 DD 4E 00 ld c', (ix+127) ; 76 DD 4E 7F ld c', (ix-128) ; 76 DD 4E 80 ld c', (iy) ; 76 FD 4E 00 ld c', (iy+127) ; 76 FD 4E 7F ld c', (iy-128) ; 76 FD 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) ; DD 4E 00 ld c, (ix+127) ; DD 4E 7F ld c, (ix-128) ; DD 4E 80 ld c, (iy) ; FD 4E 00 ld c, (iy+127) ; FD 4E 7F ld c, (iy-128) ; FD 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 DD 56 00 ld d', (ix+127) ; 76 DD 56 7F ld d', (ix-128) ; 76 DD 56 80 ld d', (iy) ; 76 FD 56 00 ld d', (iy+127) ; 76 FD 56 7F ld d', (iy-128) ; 76 FD 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) ; DD 56 00 ld d, (ix+127) ; DD 56 7F ld d, (ix-128) ; DD 56 80 ld d, (iy) ; FD 56 00 ld d, (iy+127) ; FD 56 7F ld d, (iy-128) ; FD 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 DD 5E 00 ld e', (ix+127) ; 76 DD 5E 7F ld e', (ix-128) ; 76 DD 5E 80 ld e', (iy) ; 76 FD 5E 00 ld e', (iy+127) ; 76 FD 5E 7F ld e', (iy-128) ; 76 FD 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) ; DD 5E 00 ld e, (ix+127) ; DD 5E 7F ld e, (ix-128) ; DD 5E 80 ld e, (iy) ; FD 5E 00 ld e, (iy+127) ; FD 5E 7F ld e, (iy-128) ; FD 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 DD 66 00 ld h', (ix+127) ; 76 DD 66 7F ld h', (ix-128) ; 76 DD 66 80 ld h', (iy) ; 76 FD 66 00 ld h', (iy+127) ; 76 FD 66 7F ld h', (iy-128) ; 76 FD 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) ; DD 66 00 ld h, (ix+127) ; DD 66 7F ld h, (ix-128) ; DD 66 80 ld h, (iy) ; FD 66 00 ld h, (iy+127) ; FD 66 7F ld h, (iy-128) ; FD 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 E4 00 ld hl', (ix+127) ; 76 E4 7F ld hl', (ix-128) ; 76 E4 80 ld hl', (iy) ; 76 FD E4 00 ld hl', (iy+127) ; 76 FD E4 7F ld hl', (iy-128) ; 76 FD 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 DD 7C ld hl', iy ; 76 FD 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) ; E4 00 ld hl, (ix+127) ; E4 7F ld hl, (ix-128) ; E4 80 ld hl, (iy) ; FD E4 00 ld hl, (iy+127) ; FD E4 7F ld hl, (iy-128) ; FD 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 ; DD 7C ld hl, iy ; FD 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) ; DD 2A 00 80 ld ix, (32767) ; DD 2A FF 7F ld ix, (65535) ; DD 2A FF FF ld ix, (sp) ; DD C4 00 ld ix, (sp+0) ; DD C4 00 ld ix, (sp+255) ; DD C4 FF ld ix, -32768 ; DD 21 00 80 ld ix, 32767 ; DD 21 FF 7F ld ix, 65535 ; DD 21 FF FF ld ix, hl ; DD 7D ld iy, (-32768) ; FD 2A 00 80 ld iy, (32767) ; FD 2A FF 7F ld iy, (65535) ; FD 2A FF FF ld iy, (sp) ; FD C4 00 ld iy, (sp+0) ; FD C4 00 ld iy, (sp+255) ; FD C4 FF ld iy, -32768 ; FD 21 00 80 ld iy, 32767 ; FD 21 FF 7F ld iy, 65535 ; FD 21 FF FF ld iy, hl ; FD 7D ld l', (hl) ; 76 6E ld l', (ix) ; 76 DD 6E 00 ld l', (ix+127) ; 76 DD 6E 7F ld l', (ix-128) ; 76 DD 6E 80 ld l', (iy) ; 76 FD 6E 00 ld l', (iy+127) ; 76 FD 6E 7F ld l', (iy-128) ; 76 FD 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) ; DD 6E 00 ld l, (ix+127) ; DD 6E 7F ld l, (ix-128) ; DD 6E 80 ld l, (iy) ; FD 6E 00 ld l, (iy+127) ; FD 6E 7F ld l, (iy-128) ; FD 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 ; DD F9 ld sp, iy ; FD 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 ; DD 65 00 80 ldp (-32768), iy ; FD 65 00 80 ldp (32767), hl ; ED 65 FF 7F ldp (32767), ix ; DD 65 FF 7F ldp (32767), iy ; FD 65 FF 7F ldp (65535), hl ; ED 65 FF FF ldp (65535), ix ; DD 65 FF FF ldp (65535), iy ; FD 65 FF FF ldp (hl), hl ; ED 64 ldp (ix), hl ; DD 64 ldp (iy), hl ; FD 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) ; DD 6C ldp hl, (iy) ; FD 6C ldp ix, (-32768) ; DD 6D 00 80 ldp ix, (32767) ; DD 6D FF 7F ldp ix, (65535) ; DD 6D FF FF ldp iy, (-32768) ; FD 6D 00 80 ldp iy, (32767) ; FD 6D FF 7F ldp iy, (65535) ; FD 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) ; DD B6 00 or (ix+127) ; DD B6 7F or (ix-128) ; DD B6 80 or (iy) ; FD B6 00 or (iy+127) ; FD B6 7F or (iy-128) ; FD 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 DD B6 00 or a', (ix+127) ; 76 DD B6 7F or a', (ix-128) ; 76 DD B6 80 or a', (iy) ; 76 FD B6 00 or a', (iy+127) ; 76 FD B6 7F or a', (iy-128) ; 76 FD 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) ; DD B6 00 or a, (ix+127) ; DD B6 7F or a, (ix-128) ; DD B6 80 or a, (iy) ; FD B6 00 or a, (iy+127) ; FD B6 7F or a, (iy-128) ; FD 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 ; DD EC or iy, de ; FD 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 ; DD E1 pop iy ; FD 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 ; DD E5 push iy ; FD 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) ; DD CB 00 86 res 0, (ix+127) ; DD CB 7F 86 res 0, (ix-128) ; DD CB 80 86 res 0, (iy) ; FD CB 00 86 res 0, (iy+127) ; FD CB 7F 86 res 0, (iy-128) ; FD 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) ; DD CB 00 8E res 1, (ix+127) ; DD CB 7F 8E res 1, (ix-128) ; DD CB 80 8E res 1, (iy) ; FD CB 00 8E res 1, (iy+127) ; FD CB 7F 8E res 1, (iy-128) ; FD 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) ; DD CB 00 96 res 2, (ix+127) ; DD CB 7F 96 res 2, (ix-128) ; DD CB 80 96 res 2, (iy) ; FD CB 00 96 res 2, (iy+127) ; FD CB 7F 96 res 2, (iy-128) ; FD 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) ; DD CB 00 9E res 3, (ix+127) ; DD CB 7F 9E res 3, (ix-128) ; DD CB 80 9E res 3, (iy) ; FD CB 00 9E res 3, (iy+127) ; FD CB 7F 9E res 3, (iy-128) ; FD 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) ; DD CB 00 A6 res 4, (ix+127) ; DD CB 7F A6 res 4, (ix-128) ; DD CB 80 A6 res 4, (iy) ; FD CB 00 A6 res 4, (iy+127) ; FD CB 7F A6 res 4, (iy-128) ; FD 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) ; DD CB 00 AE res 5, (ix+127) ; DD CB 7F AE res 5, (ix-128) ; DD CB 80 AE res 5, (iy) ; FD CB 00 AE res 5, (iy+127) ; FD CB 7F AE res 5, (iy-128) ; FD 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) ; DD CB 00 B6 res 6, (ix+127) ; DD CB 7F B6 res 6, (ix-128) ; DD CB 80 B6 res 6, (iy) ; FD CB 00 B6 res 6, (iy+127) ; FD CB 7F B6 res 6, (iy-128) ; FD 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) ; DD CB 00 BE res 7, (ix+127) ; DD CB 7F BE res 7, (ix-128) ; DD CB 80 BE res 7, (iy) ; FD CB 00 BE res 7, (iy+127) ; FD CB 7F BE res 7, (iy-128) ; FD 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) ; DD CB 00 86 res.a 0, (ix+127) ; DD CB 7F 86 res.a 0, (ix-128) ; DD CB 80 86 res.a 0, (iy) ; FD CB 00 86 res.a 0, (iy+127) ; FD CB 7F 86 res.a 0, (iy-128) ; FD 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) ; DD CB 00 8E res.a 1, (ix+127) ; DD CB 7F 8E res.a 1, (ix-128) ; DD CB 80 8E res.a 1, (iy) ; FD CB 00 8E res.a 1, (iy+127) ; FD CB 7F 8E res.a 1, (iy-128) ; FD 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) ; DD CB 00 96 res.a 2, (ix+127) ; DD CB 7F 96 res.a 2, (ix-128) ; DD CB 80 96 res.a 2, (iy) ; FD CB 00 96 res.a 2, (iy+127) ; FD CB 7F 96 res.a 2, (iy-128) ; FD 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) ; DD CB 00 9E res.a 3, (ix+127) ; DD CB 7F 9E res.a 3, (ix-128) ; DD CB 80 9E res.a 3, (iy) ; FD CB 00 9E res.a 3, (iy+127) ; FD CB 7F 9E res.a 3, (iy-128) ; FD 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) ; DD CB 00 A6 res.a 4, (ix+127) ; DD CB 7F A6 res.a 4, (ix-128) ; DD CB 80 A6 res.a 4, (iy) ; FD CB 00 A6 res.a 4, (iy+127) ; FD CB 7F A6 res.a 4, (iy-128) ; FD 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) ; DD CB 00 AE res.a 5, (ix+127) ; DD CB 7F AE res.a 5, (ix-128) ; DD CB 80 AE res.a 5, (iy) ; FD CB 00 AE res.a 5, (iy+127) ; FD CB 7F AE res.a 5, (iy-128) ; FD 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) ; DD CB 00 B6 res.a 6, (ix+127) ; DD CB 7F B6 res.a 6, (ix-128) ; DD CB 80 B6 res.a 6, (iy) ; FD CB 00 B6 res.a 6, (iy+127) ; FD CB 7F B6 res.a 6, (iy-128) ; FD 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) ; DD CB 00 BE res.a 7, (ix+127) ; DD CB 7F BE res.a 7, (ix-128) ; DD CB 80 BE res.a 7, (iy) ; FD CB 00 BE res.a 7, (iy+127) ; FD CB 7F BE res.a 7, (iy-128) ; FD 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) ; DD CB 00 16 rl (ix+127) ; DD CB 7F 16 rl (ix-128) ; DD CB 80 16 rl (iy) ; FD CB 00 16 rl (iy+127) ; FD CB 7F 16 rl (iy-128) ; FD 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) ; DD CB 00 06 rlc (ix+127) ; DD CB 7F 06 rlc (ix-128) ; DD CB 80 06 rlc (iy) ; FD CB 00 06 rlc (iy+127) ; FD CB 7F 06 rlc (iy-128) ; FD 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) ; DD CB 00 1E rr (ix+127) ; DD CB 7F 1E rr (ix-128) ; DD CB 80 1E rr (iy) ; FD CB 00 1E rr (iy+127) ; FD CB 7F 1E rr (iy-128) ; FD 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 ; DD FC rr iy ; FD FC rr l ; CB 1D rr l' ; 76 CB 1D rra ; 1F rra' ; 76 1F rrc ; 0F rrc (hl) ; CB 0E rrc (ix) ; DD CB 00 0E rrc (ix+127) ; DD CB 7F 0E rrc (ix-128) ; DD CB 80 0E rrc (iy) ; FD CB 00 0E rrc (iy+127) ; FD CB 7F 0E rrc (iy-128) ; FD 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) ; DD 9E 00 sbc (ix+127) ; DD 9E 7F sbc (ix-128) ; DD 9E 80 sbc (iy) ; FD 9E 00 sbc (iy+127) ; FD 9E 7F sbc (iy-128) ; FD 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 DD 9E 00 sbc a', (ix+127) ; 76 DD 9E 7F sbc a', (ix-128) ; 76 DD 9E 80 sbc a', (iy) ; 76 FD 9E 00 sbc a', (iy+127) ; 76 FD 9E 7F sbc a', (iy-128) ; 76 FD 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) ; DD 9E 00 sbc a, (ix+127) ; DD 9E 7F sbc a, (ix-128) ; DD 9E 80 sbc a, (iy) ; FD 9E 00 sbc a, (iy+127) ; FD 9E 7F sbc a, (iy-128) ; FD 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) ; DD CB 00 C6 set 0, (ix+127) ; DD CB 7F C6 set 0, (ix-128) ; DD CB 80 C6 set 0, (iy) ; FD CB 00 C6 set 0, (iy+127) ; FD CB 7F C6 set 0, (iy-128) ; FD 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) ; DD CB 00 CE set 1, (ix+127) ; DD CB 7F CE set 1, (ix-128) ; DD CB 80 CE set 1, (iy) ; FD CB 00 CE set 1, (iy+127) ; FD CB 7F CE set 1, (iy-128) ; FD 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) ; DD CB 00 D6 set 2, (ix+127) ; DD CB 7F D6 set 2, (ix-128) ; DD CB 80 D6 set 2, (iy) ; FD CB 00 D6 set 2, (iy+127) ; FD CB 7F D6 set 2, (iy-128) ; FD 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) ; DD CB 00 DE set 3, (ix+127) ; DD CB 7F DE set 3, (ix-128) ; DD CB 80 DE set 3, (iy) ; FD CB 00 DE set 3, (iy+127) ; FD CB 7F DE set 3, (iy-128) ; FD 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) ; DD CB 00 E6 set 4, (ix+127) ; DD CB 7F E6 set 4, (ix-128) ; DD CB 80 E6 set 4, (iy) ; FD CB 00 E6 set 4, (iy+127) ; FD CB 7F E6 set 4, (iy-128) ; FD 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) ; DD CB 00 EE set 5, (ix+127) ; DD CB 7F EE set 5, (ix-128) ; DD CB 80 EE set 5, (iy) ; FD CB 00 EE set 5, (iy+127) ; FD CB 7F EE set 5, (iy-128) ; FD 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) ; DD CB 00 F6 set 6, (ix+127) ; DD CB 7F F6 set 6, (ix-128) ; DD CB 80 F6 set 6, (iy) ; FD CB 00 F6 set 6, (iy+127) ; FD CB 7F F6 set 6, (iy-128) ; FD 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) ; DD CB 00 FE set 7, (ix+127) ; DD CB 7F FE set 7, (ix-128) ; DD CB 80 FE set 7, (iy) ; FD CB 00 FE set 7, (iy+127) ; FD CB 7F FE set 7, (iy-128) ; FD 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) ; DD CB 00 C6 set.a 0, (ix+127) ; DD CB 7F C6 set.a 0, (ix-128) ; DD CB 80 C6 set.a 0, (iy) ; FD CB 00 C6 set.a 0, (iy+127) ; FD CB 7F C6 set.a 0, (iy-128) ; FD 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) ; DD CB 00 CE set.a 1, (ix+127) ; DD CB 7F CE set.a 1, (ix-128) ; DD CB 80 CE set.a 1, (iy) ; FD CB 00 CE set.a 1, (iy+127) ; FD CB 7F CE set.a 1, (iy-128) ; FD 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) ; DD CB 00 D6 set.a 2, (ix+127) ; DD CB 7F D6 set.a 2, (ix-128) ; DD CB 80 D6 set.a 2, (iy) ; FD CB 00 D6 set.a 2, (iy+127) ; FD CB 7F D6 set.a 2, (iy-128) ; FD 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) ; DD CB 00 DE set.a 3, (ix+127) ; DD CB 7F DE set.a 3, (ix-128) ; DD CB 80 DE set.a 3, (iy) ; FD CB 00 DE set.a 3, (iy+127) ; FD CB 7F DE set.a 3, (iy-128) ; FD 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) ; DD CB 00 E6 set.a 4, (ix+127) ; DD CB 7F E6 set.a 4, (ix-128) ; DD CB 80 E6 set.a 4, (iy) ; FD CB 00 E6 set.a 4, (iy+127) ; FD CB 7F E6 set.a 4, (iy-128) ; FD 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) ; DD CB 00 EE set.a 5, (ix+127) ; DD CB 7F EE set.a 5, (ix-128) ; DD CB 80 EE set.a 5, (iy) ; FD CB 00 EE set.a 5, (iy+127) ; FD CB 7F EE set.a 5, (iy-128) ; FD 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) ; DD CB 00 F6 set.a 6, (ix+127) ; DD CB 7F F6 set.a 6, (ix-128) ; DD CB 80 F6 set.a 6, (iy) ; FD CB 00 F6 set.a 6, (iy+127) ; FD CB 7F F6 set.a 6, (iy-128) ; FD 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) ; DD CB 00 FE set.a 7, (ix+127) ; DD CB 7F FE set.a 7, (ix-128) ; DD CB 80 FE set.a 7, (iy) ; FD CB 00 FE set.a 7, (iy+127) ; FD CB 7F FE set.a 7, (iy-128) ; FD 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) ; DD CB 00 26 sla (ix+127) ; DD CB 7F 26 sla (ix-128) ; DD CB 80 26 sla (iy) ; FD CB 00 26 sla (iy+127) ; FD CB 7F 26 sla (iy-128) ; FD 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) ; DD CB 00 2E sra (ix+127) ; DD CB 7F 2E sra (ix-128) ; DD CB 80 2E sra (iy) ; FD CB 00 2E sra (iy+127) ; FD CB 7F 2E sra (iy-128) ; FD 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) ; DD CB 00 3E srl (ix+127) ; DD CB 7F 3E srl (ix-128) ; DD CB 80 3E srl (iy) ; FD CB 00 3E srl (iy+127) ; FD CB 7F 3E srl (iy-128) ; FD 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) ; DD 96 00 sub (ix+127) ; DD 96 7F sub (ix-128) ; DD 96 80 sub (iy) ; FD 96 00 sub (iy+127) ; FD 96 7F sub (iy-128) ; FD 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 DD 96 00 sub a', (ix+127) ; 76 DD 96 7F sub a', (ix-128) ; 76 DD 96 80 sub a', (iy) ; 76 FD 96 00 sub a', (iy+127) ; 76 FD 96 7F sub a', (iy-128) ; 76 FD 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) ; DD 96 00 sub a, (ix+127) ; DD 96 7F sub a, (ix-128) ; DD 96 80 sub a, (iy) ; FD 96 00 sub a, (iy+127) ; FD 96 7F sub a, (iy-128) ; FD 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) ; DD AE 00 xor (ix+127) ; DD AE 7F xor (ix-128) ; DD AE 80 xor (iy) ; FD AE 00 xor (iy+127) ; FD AE 7F xor (iy-128) ; FD 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 DD AE 00 xor a', (ix+127) ; 76 DD AE 7F xor a', (ix-128) ; 76 DD AE 80 xor a', (iy) ; 76 FD AE 00 xor a', (iy+127) ; 76 FD AE 7F xor a', (iy-128) ; 76 FD 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) ; DD AE 00 xor a, (ix+127) ; DD AE 7F xor a, (ix-128) ; DD AE 80 xor a, (iy) ; FD AE 00 xor a, (iy+127) ; FD AE 7F xor a, (iy-128) ; FD 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
//****************************************************************************** // // Copyright (c) 2016 Microsoft Corporation. All rights reserved. // // This code is licensed under the MIT License (MIT). // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // //****************************************************************************** // clang-format does not like C++/CX // clang-format off #include "ppltasks.h" #include "LoggingNative.h" #include "CALayerXaml.h" #include <StringHelpers.h> #include <LoggingNative.h> #include <algorithm> #include <collection.h> using namespace concurrency; using namespace Platform; using namespace Strings::Private; using namespace Windows::System::Threading; using namespace Windows::Foundation; using namespace Windows::UI; using namespace Windows::UI::Composition; using namespace Windows::UI::Core; using namespace Windows::UI::Input; using namespace Windows::UI::Xaml; using namespace Windows::UI::Xaml::Automation::Peers; using namespace Windows::UI::Xaml::Controls; using namespace Windows::UI::Xaml::Hosting; using namespace Windows::UI::Xaml::Input; using namespace Windows::UI::Xaml::Media; using namespace Windows::UI::Xaml::Media::Animation; using namespace Windows::UI::Xaml::Media::Imaging; using namespace Windows::UI::Xaml::Shapes; using namespace Windows::Graphics::Display; static const wchar_t* TAG = L"CALayerXaml"; namespace XamlCompositor { namespace Controls { // // ObjectCache // ICacheableObject^ ObjectCache::GetCachableObject() { if (m_objects.size() == 0) { return nullptr; } ICacheableObject^ object = m_objects.front(); m_objects.pop(); return object; }; void ObjectCache::PushCacheableObject(ICacheableObject^ obj) { obj->Reset(); if (m_objects.size() >= m_maxSize) { return; } m_objects.push(obj); }; // // LayerContent // LayerContent::LayerContent() { Name = L"LayerContent"; // Set a name so we can be seen in the live tree viewer IsHitTestVisible = true; // Always be hit testable by default. m_gravity = ContentGravity::Resize; m_scaleFactor = 1.0f; } void LayerContent::Reset() { Children->Clear(); m_image = nullptr; m_content = nullptr; m_imageSize = Size(0, 0); m_contentSize = Size(0, 0); m_contentsCenter = Rect(0, 0, 1.0, 1.0); m_gravity = ContentGravity::Resize; m_scaleFactor = 1.0f; m_origin = Point(); } LayerContent^ LayerContent::CreateLayerContent() { ICacheableObject^ ret = _LayerContentCache->GetCachableObject(); if (ret != nullptr) { return (LayerContent^)ret; } return ref new LayerContent(); } void LayerContent::DestroyLayerContent(LayerContent^ content) { _LayerContentCache->PushCacheableObject(content); } int LayerContent::_IfNegativeMakeZero(int value) { return (value < 0) ? 0 : value; } void LayerContent::_ApplyContentsCenter() { if (m_image == nullptr) { return; } if (m_image->Source == nullptr) { return; } if (m_contentsCenter.X == 0.0 && m_contentsCenter.Y == 0.0 && m_contentsCenter.Width == 1.0 && m_contentsCenter.Height == 1.0) { m_image->NineGrid = Thickness(0, 0, 0, 0); } else { int left = (int)(m_contentsCenter.X * m_imageSize.Width); int top = (int)(m_contentsCenter.Y * m_imageSize.Height); int right = ((int)m_imageSize.Width) - (left + ((int)(m_contentsCenter.Width * m_imageSize.Width))); int bottom = ((int)m_imageSize.Height) - (top + ((int)(m_contentsCenter.Height * m_imageSize.Height))); // Remove edge cases that contentsCenter supports but NineGrid does not. 1/3 for top 1/3 for bottom 1/3 for // the center etc.. left = _IfNegativeMakeZero(left); top = _IfNegativeMakeZero(top); right = _IfNegativeMakeZero(right); bottom = _IfNegativeMakeZero(bottom); int maxWidth = (int)m_imageSize.Width / 3; if (left >= maxWidth) { left = maxWidth; } if (right >= maxWidth) { right = maxWidth; } int maxHeight = (int)m_imageSize.Height / 3; if (top >= maxHeight) { top = maxHeight; } if (bottom >= maxHeight) { bottom = maxHeight; } m_image->NineGrid = Thickness(left, top, right, bottom); } } Rect LayerContent::_GetContentGravityRect(Size size) { float left = 0; float top = 0; float width = 0; float height = 0; double widthAspect = size.Width / m_contentSize.Width; double heightAspect = size.Height / m_contentSize.Height; double minAspect = std::min<double>(widthAspect, heightAspect); double maxAspect = std::max<double>(widthAspect, heightAspect); // Top/bottom switched due to geometric origin switch (m_gravity) { case ContentGravity::Center: left = (size.Width / 2) - (m_contentSize.Width / 2); top = (size.Height / 2) - (m_contentSize.Height / 2); width = m_contentSize.Width; height = m_contentSize.Height; if (m_image != nullptr) { m_image->Stretch = Stretch::Fill; } break; case ContentGravity::Top: left = (size.Width / 2) - (m_contentSize.Width / 2); top = size.Height - m_contentSize.Height; width = m_contentSize.Width; height = m_contentSize.Height; if (m_image != nullptr) { m_image->Stretch = Stretch::Fill; } break; case ContentGravity::Bottom: left = (size.Width / 2) - (m_contentSize.Width / 2); top = 0; width = m_contentSize.Width; height = m_contentSize.Height; if (m_image != nullptr) { m_image->Stretch = Stretch::Fill; } break; case ContentGravity::Left: left = 0; top = (size.Height / 2) - (m_contentSize.Height / 2); width = m_contentSize.Width; height = m_contentSize.Height; if (m_image != nullptr) { m_image->Stretch = Stretch::Fill; } break; case ContentGravity::Right: left = size.Width - m_contentSize.Width; top = (size.Height / 2) - (m_contentSize.Height / 2); width = m_contentSize.Width; height = m_contentSize.Height; if (m_image != nullptr) { m_image->Stretch = Stretch::Fill; } break; case ContentGravity::TopLeft: left = 0; top = size.Height - m_contentSize.Height; width = m_contentSize.Width; height = m_contentSize.Height; if (m_image != nullptr) { m_image->Stretch = Stretch::Fill; } break; case ContentGravity::TopRight: left = size.Width - m_contentSize.Width; top = size.Height - m_contentSize.Height; width = m_contentSize.Width; height = m_contentSize.Height; if (m_image != nullptr) { m_image->Stretch = Stretch::Fill; } break; case ContentGravity::BottomLeft: left = 0; top = 0; width = m_contentSize.Width; height = m_contentSize.Height; if (m_image != nullptr) { m_image->Stretch = Stretch::Fill; } break; case ContentGravity::BottomRight: left = size.Width - m_contentSize.Width; top = 0; width = m_contentSize.Width; height = m_contentSize.Height; if (m_image != nullptr) { m_image->Stretch = Stretch::Fill; } break; case ContentGravity::Resize: // UIViewContentModeScaleToFil; left = 0; top = 0; width = size.Width; height = size.Height; if (m_image != nullptr) { m_image->Stretch = Stretch::Fill; } break; case ContentGravity::ResizeAspect: // UIViewContentModeScaleAspectFit // Scale the image with the smaller aspect. width = m_contentSize.Width * (float)minAspect; height = m_contentSize.Height * (float)minAspect; left = (size.Width / 2) - (width / 2); top = (size.Height / 2) - (height / 2); if (m_image != nullptr) { // Using Fill since we calculate the aspect ourselves because image translates when modifying its scale with Stretch::Uniform. m_image->Stretch = Stretch::Fill; } break; case ContentGravity::ResizeAspectFill: // UIViewContentModeScaleAspectFill // Scale the image with the larger aspect. width = m_contentSize.Width * (float)maxAspect; height = m_contentSize.Height * (float)maxAspect; left = (size.Width / 2) - (width / 2); top = (size.Height / 2) - (height / 2); if (m_image != nullptr) { // Using Fill since we calculate the aspect ourselves because XAML clips when setting UniformToFill. m_image->Stretch = Stretch::Fill; } break; } return Rect(left, top, width, height); } Image^ LayerContent::_GetImage() { if (m_image == nullptr) { m_image = ref new Image(); m_image->Stretch = Stretch::Fill; m_scaleFactor = 1.0f; } SetElementContent(m_image); return m_image; } void LayerContent::SetContentsCenter(Rect rect) { m_contentsCenter = rect; _ApplyContentsCenter(); } void LayerContent::SetGravity(ContentGravity imgGravity) { m_gravity = imgGravity; InvalidateArrange(); } void LayerContent::SetImageContent(ImageSource^ source, float width, float height) { if (source == nullptr) { SetElementContent(nullptr); return; } Image^ imgContents = _GetImage(); imgContents->IsHitTestVisible = false; // Our content should never be HitTestVisible as they are always leaf nodes. if (Util::isInstanceOf<BitmapSource^>(source)) { m_imageSize = Size(width, height); } else { m_imageSize = Size(0, 0); } imgContents->Source = source; _ApplyContentsCenter(); } void LayerContent::_AdjustContentOriginX(Storyboard^ storyboard, DoubleAnimation^ properties, Object^ fromValue, Object^ toValue) { if (toValue != nullptr) { double value = -((double)toValue); m_origin.X = (float)value; } if (m_image != nullptr || m_content == nullptr) { return; } InvalidateArrange(); } void LayerContent::_AdjustContentOriginY(Storyboard^ storyboard, DoubleAnimation^ properties, Object^ fromValue, Object^ toValue) { if (toValue != nullptr) { double value = -((double)toValue); m_origin.Y = (float)value; } if (m_image != nullptr || m_content == nullptr) { return; } InvalidateArrange(); } void LayerContent::SetElementContent(FrameworkElement^ source) { if (m_content == source) { return; } if (m_content != nullptr) { unsigned int index; if (Children->IndexOf(m_content, &index)) { Children->RemoveAt(index); } m_content = nullptr; m_image = nullptr; } if (source != nullptr) { m_content = source; Children->Append(m_content); InvalidateArrange(); m_imageSize = Size(0, 0); } } void LayerContent::SetContentParams(float width, float height, float scale) { Size oldSize = m_contentSize; float oldScale = scale; m_contentSize = Size(width / scale, height / scale); if (m_scaleFactor <= 0.0f) { m_scaleFactor = 1.0f; } if (m_scaleFactor != scale) { m_scaleFactor = scale; if (m_image != nullptr) { if (m_scaleFactor != 1.0f) { ScaleTransform^ trans = ref new ScaleTransform(); trans->ScaleX = 1.0 / m_scaleFactor; trans->ScaleY = 1.0 / m_scaleFactor; m_image->RenderTransform = trans; } else { m_image->RenderTransform = nullptr; } } } if (oldScale != m_scaleFactor || oldSize != m_contentSize) { InvalidateArrange(); } } Size LayerContent::ArrangeOverride(Size finalSize) { if (m_content != nullptr) { Rect newSize = _GetContentGravityRect(finalSize); if (m_image != nullptr) { m_content->Width = newSize.Width * m_scaleFactor; m_content->Height = newSize.Height * m_scaleFactor; } else { double contentWidth = newSize.Width - m_origin.X; double contentHeight = newSize.Height - m_origin.Y; if (contentWidth < 0.0) { contentWidth = 0.0; } if (contentHeight < 0.0) { contentHeight = 0.0; } m_content->Width = contentWidth; m_content->Height = contentHeight; } m_content->Arrange( Rect(newSize.Left + m_origin.X, newSize.Top + m_origin.Y, (float)m_content->Width, (float)m_content->Height)); } return finalSize; } Size LayerContent::MeasureOverride(Size availableSize) { return availableSize; } // // CALayerXaml // double CALayerXaml::s_screenScale = 1.0; DependencyProperty^ CALayerXaml::s_visualWidthProperty = nullptr; DependencyProperty^ CALayerXaml::s_visualHeightProperty = nullptr; std::map<String^, CALayerXaml::AnimatableProperty^> CALayerXaml::s_animatableProperties = { { "position.x", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); CALayerXaml::_AddAnimation("(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)", (UIElement^)target, storyboard, properties, from, to); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { double positionX = (double)toValue; target->m_position.X = (float)positionX; if (target->m_createdTransforms) { ((TranslateTransform^)((TransformGroup^)target->RenderTransform)->Children->GetAt(3))->X = (double)toValue; } else { target->_CalcTransforms(); } }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { if (!target->m_createdTransforms) { return (double)target->m_position.X; } return CALayerXaml::_GetAnimatedTransformIndex( target, 3, TranslateTransform::XProperty); })) }, { "position.y", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); CALayerXaml::_AddAnimation("(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)", target, storyboard, properties, from, to); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { double positionY = (double)toValue; target->m_position.Y = (float)positionY; if (target->m_createdTransforms) { ((TranslateTransform^)((TransformGroup^)target->RenderTransform)->Children->GetAt(3))->Y = (double)toValue; } else { target->_CalcTransforms(); } }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { if (!target->m_createdTransforms) { return (double)target->m_position.Y; } return CALayerXaml::_GetAnimatedTransformIndex( target, 3, TranslateTransform::YProperty); })) }, { "position", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { s_animatableProperties["position.x"]->Animate(target, storyboard, properties, from != nullptr ? (Object^)((Point)from).X : nullptr, (double)((Point)to).X); s_animatableProperties["position.y"]->Animate(target, storyboard, properties, from != nullptr ? (Object^)((Point)from).Y : nullptr, (double)((Point)to).Y); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { s_animatableProperties["position.x"]->Set(target, (double)((Point)toValue).X); s_animatableProperties["position.y"]->Set(target, (double)((Point)toValue).Y); }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { // Unbox x and y values as doubles, before casting them to floats return Point((float)(double)target->Get("position.x"), (float)(double)target->Get("position.y")); })) }, { "origin.x", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); target->SetupBackground(); double targetFrom = from != nullptr ? (double)from : 0.0; double targetTo = to != nullptr ? (double)to : 0.0; CALayerXaml::_AddAnimation("(UIElement.RenderTransform).(TransformGroup.Children)[1].(TranslateTransform.X)", target, storyboard, properties, (from != nullptr) ? (Object^)(-targetFrom) : nullptr, -targetTo); if (target->m_masksToBounds) { CALayerXaml::_AddAnimation("(UIElement.Clip).(Transform).(TranslateTransform.X)", target, storyboard, properties, (from != nullptr) ? (Object^)(targetFrom) : nullptr, targetTo); } target->_AdjustContentOriginX(storyboard, properties, targetFrom, targetTo); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { target->SetupBackground(); double targetValue = (double)toValue; target->m_origin.X = (float)targetValue; if (target->m_createdTransforms) { ((TranslateTransform^)((TransformGroup^)target->RenderTransform)->Children->GetAt(1))->X = -targetValue; } else { target->_CalcTransforms(); } if (target->Clip != nullptr) { ((TranslateTransform^)target->Clip->Transform)->X = targetValue; } target->_AdjustContentOriginX(nullptr, nullptr, nullptr, targetValue); }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { if (!target->m_createdTransforms) { return (double)target->m_origin.X; } return -((double)CALayerXaml::_GetAnimatedTransformIndex( target, 1, TranslateTransform::XProperty)); })) }, { "origin.y", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); target->SetupBackground(); double targetFrom = (from != nullptr) ? (double)from : 0.0; double targetTo = (to != nullptr) ? (double)to : 0.0; CALayerXaml::_AddAnimation("(UIElement.RenderTransform).(TransformGroup.Children)[1].(TranslateTransform.Y)", target, storyboard, properties, from != nullptr ? (Object^)(-targetFrom) : nullptr, -targetTo); if (target->m_masksToBounds) { CALayerXaml::_AddAnimation("(UIElement.Clip).(Transform).(TranslateTransform.Y)", target, storyboard, properties, (from != nullptr) ? (Object^)(targetFrom) : nullptr, targetTo); } target->_AdjustContentOriginY(storyboard, properties, targetFrom, targetTo); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { target->SetupBackground(); double targetValue = (double)toValue; target->m_origin.Y = (float)targetValue; if (target->m_createdTransforms) { ((TranslateTransform^)((TransformGroup^)target->RenderTransform)->Children->GetAt(1))->Y = -targetValue; } else { target->_CalcTransforms(); } if (target->Clip != nullptr) { ((TranslateTransform^)target->Clip->Transform)->Y = targetValue; } target->_AdjustContentOriginY(nullptr, nullptr, nullptr, targetValue); }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { if (!target->m_createdTransforms) { return (double)target->m_origin.Y; } return -((double)CALayerXaml::_GetAnimatedTransformIndex( target, 1, TranslateTransform::YProperty)); })) }, { "origin", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { s_animatableProperties["origin.x"]->Animate(target, storyboard, properties, (from != nullptr) ? (Object^)((Point)from).X : nullptr, (double)((Point)to).X); s_animatableProperties["origin.y"]->Animate(target, storyboard, properties, (from != nullptr) ? (Object^)((Point)from).Y : nullptr, (double)((Point)to).Y); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { s_animatableProperties["origin.x"]->Set(target, (double)((Point)toValue).X); s_animatableProperties["origin.y"]->Set(target, (double)((Point)toValue).Y); }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { // Unbox x and y values as doubles, before casting them to floats return Point((float)(double)target->Get("origin.x"), (float)(double)target->Get("origin.y")); })) }, { "anchorPoint.x", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); Object^ fromVal = (from != nullptr) ? (Object^)(-target->m_size.Width * (double)from) : nullptr; double destVal = -target->m_size.Width * (double)to; CALayerXaml::_AddAnimation("(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)", target, storyboard, properties, fromVal, destVal); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { double anchorPointX = (double)toValue; target->m_anchorPoint.X = (float)anchorPointX; if (target->m_createdTransforms) { double destX = -target->m_size.Width * ((double)toValue); ((TranslateTransform^)((TransformGroup^)target->RenderTransform)->Children->GetAt(0))->X = destX; } else { target->_CalcTransforms(); } }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { return (double)target->m_anchorPoint.X; })) }, { "anchorPoint.y", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); Object^ fromVal = (from != nullptr) ? (Object^)(-target->m_size.Height * (double)from) : nullptr; double destVal = -target->m_size.Height * (double)to; CALayerXaml::_AddAnimation("(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)", target, storyboard, properties, fromVal, destVal); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { double anchorPointY = (double)toValue; target->m_anchorPoint.Y = (float)anchorPointY; if (target->m_createdTransforms) { double destY = -target->m_size.Height * ((double)toValue); ((TranslateTransform^)((TransformGroup^)target->RenderTransform)->Children->GetAt(0))->Y = destY; } else { target->_CalcTransforms(); } }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { return (double)target->m_anchorPoint.Y; })) }, { "anchorPoint", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { s_animatableProperties["anchorPoint.x"]->Animate(target, storyboard, properties, (from != nullptr) ? (Object^)((Point)from).X : nullptr, (double)((Point)to).X); s_animatableProperties["anchorPoint.y"]->Animate(target, storyboard, properties, (from != nullptr) ? (Object^)((Point)from).Y : nullptr, (double)((Point)to).Y); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { s_animatableProperties["anchorPoint.x"]->Set(target, (double)((Point)toValue).X); s_animatableProperties["anchorPoint.y"]->Set(target, (double)((Point)toValue).Y); }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { // Unbox x and y values as doubles, before casting them to floats return Point((float)(double)target->Get("anchorPoint.x"), (float)(double)target->Get("anchorPoint.y")); })) }, { "size.width", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); if (from != nullptr) { if ((double)from < 0.0) { from = (double)0.0; } } if (to != nullptr) { if ((double)to < 0.0) { to = (double)0.0; } } Object^ fromVal = (from != nullptr) ? (Object^)((-((double)from)) * target->m_anchorPoint.X) : nullptr; double dest = -((double)to) * target->m_anchorPoint.X; CALayerXaml::_AddAnimation("(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)", target, storyboard, properties, fromVal, dest); CALayerXaml::_AddAnimation("VisualWidth", target, storyboard, properties, from, to, true); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { if (toValue != nullptr) { if ((double)toValue < 0.0) { toValue = (double)0.0; } } if (target->m_size.Width == (double)toValue) { return; } double width = (double)toValue; target->m_size.Width = (float)width; target->Width = width; if (target->m_createdTransforms) { double destX = -((double)toValue) * target->m_anchorPoint.X; ((TranslateTransform^)((TransformGroup^)target->RenderTransform)->Children->GetAt(0))->X = destX; target->VisualWidth = (double)toValue; } else { target->_CalcTransforms(); } target->InvalidateArrange(); }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { if (!target->m_createdTransforms) { return (double)target->m_size.Width; } return target->GetValue(CALayerXaml::VisualWidthProperty); })) }, { "size.height", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); if (from != nullptr) { if ((double)from < 0.0) { from = (double)0.0; } } if (to != nullptr) { if ((double)to < 0.0) { to = (double)0.0; } } Object^ fromVal = (from != nullptr) ? (Object^)((-((double)from)) * target->m_anchorPoint.Y) : nullptr; double dest = -((double)to) * target->m_anchorPoint.Y; CALayerXaml::_AddAnimation("(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)", target, storyboard, properties, fromVal, dest); CALayerXaml::_AddAnimation("VisualHeight", target, storyboard, properties, from, to, true); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { if (toValue != nullptr) { if ((double)toValue < 0.0) { toValue = (double)0.0; } } if (target->m_size.Height == (double)toValue) { return; } double height = (double)toValue; target->m_size.Height = (float)height; target->Height = height; if (target->m_createdTransforms) { double destY = -((double)toValue) * target->m_anchorPoint.Y; ((TranslateTransform^)((TransformGroup^)target->RenderTransform)->Children->GetAt(0))->Y = destY; target->VisualHeight = (double)toValue; } else { target->_CalcTransforms(); } target->InvalidateArrange(); }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { if (!target->m_createdTransforms) { return (double)target->m_size.Height; } return target->GetValue(CALayerXaml::VisualHeightProperty); })) }, { "size", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { s_animatableProperties["size.width"]->Animate(target, storyboard, properties, (from != nullptr) ? (Object^)((Size)from).Width : nullptr, (double)((Size)to).Width); s_animatableProperties["size.height"]->Animate(target, storyboard, properties, (from != nullptr) ? (Object^)((Size)from).Height : nullptr, (double)((Size)to).Height); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { s_animatableProperties["size.width"]->Set(target, (double)((Size)toValue).Width); s_animatableProperties["size.height"]->Set(target, (double)((Size)toValue).Height); }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { // Unbox width and height values as doubles, before casting them to floats return Size((float)(double)target->Get("size.width"), (float)(double)target->Get("size.height")); })) }, { "transform.rotation", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); CALayerXaml::_AddAnimation( "(UIElement.RenderTransform).(TransformGroup.Children)[2].(TransformGroup.Children)[0].(RotateTransform.Angle)", target, storyboard, properties, from, to); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { target->_CreateTransforms(); ((RotateTransform^)((TransformGroup^)((TransformGroup^)target->RenderTransform)->Children->GetAt(2)) ->Children->GetAt(0)) ->Angle = (double)toValue; }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { if (!target->m_createdTransforms) { return (double)0.0; } return CALayerXaml::_GetGeneralTransformIndex( target, 0, RotateTransform::AngleProperty); })) }, { "transform.scale.x", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); CALayerXaml::_AddAnimation( "(UIElement.RenderTransform).(TransformGroup.Children)[2].(TransformGroup.Children)[1].(ScaleTransform.ScaleX)", target, storyboard, properties, from, to); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { target->_CreateTransforms(); ((ScaleTransform^)((TransformGroup^)((TransformGroup^)target->RenderTransform)->Children->GetAt(2))->Children->GetAt(1)) ->ScaleX = (double)toValue; }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { if (!target->m_createdTransforms) { return (double)0.0; } return CALayerXaml::_GetGeneralTransformIndex( target, 1, ScaleTransform::ScaleXProperty); })) }, { "transform.scale.y", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); CALayerXaml::_AddAnimation( "(UIElement.RenderTransform).(TransformGroup.Children)[2].(TransformGroup.Children)[1].(ScaleTransform.ScaleY)", target, storyboard, properties, from, to); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { target->_CreateTransforms(); ((ScaleTransform^)((TransformGroup^)((TransformGroup^)target->RenderTransform)->Children->GetAt(2))->Children->GetAt(1)) ->ScaleY = (double)toValue; }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { if (!target->m_createdTransforms) { return (double)0.0; } return CALayerXaml::_GetGeneralTransformIndex( target, 1, ScaleTransform::ScaleYProperty); })) }, { "transform.translation.x", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); CALayerXaml::_AddAnimation( "(UIElement.RenderTransform).(TransformGroup.Children)[2].(TransformGroup.Children)[2].(TranslateTransform.X)", target, storyboard, properties, from, to); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { target->_CreateTransforms(); ((TranslateTransform^)((TransformGroup^)((TransformGroup^)target->RenderTransform)->Children->GetAt(2)) ->Children->GetAt(2)) ->X = (double)toValue; }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { if (!target->m_createdTransforms) { return (double)0.0; } return CALayerXaml::_GetGeneralTransformIndex( target, 2, TranslateTransform::XProperty); })) }, { "transform.translation.y", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { target->_CreateTransforms(); CALayerXaml::_AddAnimation( "(UIElement.RenderTransform).(TransformGroup.Children)[2].(TransformGroup.Children)[2].(TranslateTransform.Y)", target, storyboard, properties, from, to); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { target->_CreateTransforms(); ((TranslateTransform^)((TransformGroup^)((TransformGroup^)target->RenderTransform)->Children->GetAt(2)) ->Children->GetAt(2)) ->Y = (double)toValue; }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { if (!target->m_createdTransforms) { return (double)0.0; } return CALayerXaml::_GetGeneralTransformIndex( target, 2, TranslateTransform::YProperty); })) }, { "opacity", ref new CALayerXaml::AnimatableProperty( ref new CALayerXaml::ApplyAnimationFunction( [](CALayerXaml^ target, Storyboard^ storyboard, DoubleAnimation^ properties, Object^ from, Object^ to) { CALayerXaml::_AddAnimation("(UIElement.Opacity)", target, storyboard, properties, from, to); }), ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { target->m_opacity = (double)toValue; target->SetOpacity(); }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { return target->m_opacity; })) }, { "gravity", ref new CALayerXaml::AnimatableProperty( nullptr, ref new CALayerXaml::ApplyTransformFunction( [](CALayerXaml^ target, Object^ toValue) { target->SetContentGravity((ContentGravity)(int)toValue); }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { return (int)target->m_contentGravity; })) }, { "masksToBounds", ref new CALayerXaml::AnimatableProperty(nullptr, ref new CALayerXaml::ApplyTransformFunction([](CALayerXaml^ target, Object^ toValue) { target->m_masksToBounds = (bool)toValue; target->Clip = target->m_masksToBounds ? target->m_clipGeometry : nullptr; }), ref new CALayerXaml::GetCurrentValue([](CALayerXaml^ target) -> Object^ { return target->m_masksToBounds; })) }, }; void CALayerXaml::Reset() { __super::Children->Clear(); InvalidateArrange(); m_content = nullptr; m_contentsCenter = Rect(0, 0, 1, 1); m_contentGravity = ContentGravity::Resize; Clip = nullptr; m_invOriginTransform = ref new TranslateTransform(); m_clipGeometry = ref new RectangleGeometry(); m_clipGeometry->Transform = m_invOriginTransform; RenderTransform = ref new TranslateTransform(); m_position = Point(0, 0); m_origin = Point(0, 0); m_size = Size(0, 0); m_hidden = false; m_originSet = false; m_createdTransforms = false; LayerOpacity = 1.0; IsHitTestVisible = true; // Always hit-testable by default Set("anchorPoint", Point(0.5, 0.5)); m_masksToBounds = false; __super::Background = _TransparentBrush; // Due to the nature of how we lay out our CALayerXamls as 1x1 panels, we need an actual backing element // that we can use for hit testing purposes. Without this backing rectangle, we are unable accept pointer // input at the appropriate location in many instances. For example, we wouldn't be able to click on a UIView // that hasn't set a background or any content, which is incorrect behavior. This will be revisited when // we move the code closer to UI.Composition Visual usage. SetBackgroundColor(0, 0, 0, 0); } CALayerXaml^ CALayerXaml::CreateLayer() { ICacheableObject^ ret = _LayerContentCache->GetCachableObject(); if (ret != nullptr) { return (CALayerXaml^)ret; } CALayerXaml^ newLayer = ref new CALayerXaml(); auto layerVisual = ElementCompositionPreview::GetElementVisual(newLayer); layerVisual->BorderMode = CompositionBorderMode::Hard; return newLayer; } void CALayerXaml::DestroyLayer(CALayerXaml^ layer) { layer->_DiscardContent(); _LayerContentCache->PushCacheableObject(layer); } void CALayerXaml::ApplyMagnificationFactor(Canvas^ windowContainer, float scale, float rotation) { TransformGroup^ globalTransform = ref new TransformGroup(); ScaleTransform^ windowScale = ref new ScaleTransform(); RotateTransform^ orientation = ref new RotateTransform(); windowScale->ScaleX = scale; windowScale->ScaleY = scale; windowScale->CenterX = windowContainer->Width / 2.0; windowScale->CenterY = windowContainer->Height / 2.0; globalTransform->Children->Append(windowScale); if (rotation != 0.0) { orientation->Angle = rotation; orientation->CenterX = windowContainer->Width / 2.0; orientation->CenterY = windowContainer->Height / 2.0; globalTransform->Children->Append(orientation); } windowContainer->RenderTransform = globalTransform; CALayerXaml::s_screenScale = (double)scale; } void CALayerXaml::_AddAnimation(String^ propertyName, UIElement^ target, Storyboard^ storyboard, DoubleAnimation^ copyProperties, Object^ fromValue, Object^ toValue, bool dependent) { DoubleAnimation^ posxAnim = ref new DoubleAnimation(); if (toValue != nullptr) { posxAnim->To = (double)toValue; } if (fromValue != nullptr) { posxAnim->From = (double)fromValue; } posxAnim->Duration = copyProperties->Duration; posxAnim->RepeatBehavior = copyProperties->RepeatBehavior; posxAnim->AutoReverse = copyProperties->AutoReverse; posxAnim->EasingFunction = copyProperties->EasingFunction; posxAnim->EnableDependentAnimation = dependent; posxAnim->FillBehavior = copyProperties->FillBehavior; posxAnim->BeginTime = copyProperties->BeginTime; storyboard->Children->Append(posxAnim); Storyboard::SetTarget(posxAnim, target); Storyboard::SetTargetProperty(posxAnim, propertyName); } Object^ CALayerXaml::_GetAnimatedTransformIndex(UIElement^ element, int idx, DependencyProperty^ property) { TransformGroup^ grp = (TransformGroup^)element->GetValue(UIElement::RenderTransformProperty); TransformCollection^ children = (TransformCollection^)grp->GetValue(TransformGroup::ChildrenProperty); DependencyObject^ transform = (DependencyObject^)children->GetAt(idx); return transform->GetValue(property); } Object^ CALayerXaml::_GetGeneralTransformIndex(UIElement^ element, int idx, DependencyProperty^ property) { TransformGroup^ grp = (TransformGroup^)element->GetValue(UIElement::RenderTransformProperty); TransformCollection^ children = (TransformCollection^)grp->GetValue(TransformGroup::ChildrenProperty); TransformGroup^ transform = (TransformGroup^)children->GetAt(2); TransformCollection^ generalTransformChildren = (TransformCollection^)transform->GetValue(TransformGroup::ChildrenProperty); DependencyObject^ innerTransform = (DependencyObject^)generalTransformChildren->GetAt(idx); return innerTransform->GetValue(property); } void CALayerXaml::_AdjustContentOriginX(Storyboard^ storyboard, DoubleAnimation^ properties, Object^ fromValue, Object^ toValue) { if (m_content == nullptr) { return; } if (storyboard != nullptr) { _AddAnimation("(UIElement.RenderTransform).(TranslateTransform.X)", m_content, storyboard, properties, fromValue != nullptr ? (Object^)fromValue : nullptr, toValue); } else { ((TranslateTransform^)m_content->RenderTransform)->X = (double)toValue; } if (Util::isInstanceOf<LayerContent^>(m_content)) { static_cast<LayerContent^>(m_content)->_AdjustContentOriginX(storyboard, properties, fromValue, toValue); } } void CALayerXaml::_AdjustContentOriginY(Storyboard^ storyboard, DoubleAnimation^ properties, Object^ fromValue, Object^ toValue) { if (m_content == nullptr) { return; } if (storyboard != nullptr) { _AddAnimation("(UIElement.RenderTransform).(TranslateTransform.Y)", m_content, storyboard, properties, fromValue != nullptr ? (Object^)fromValue : nullptr, toValue); } else { ((TranslateTransform^)m_content->RenderTransform)->Y = (double)toValue; } if (Util::isInstanceOf<LayerContent^>(m_content)) { static_cast<LayerContent^>(m_content)->_AdjustContentOriginY(storyboard, properties, fromValue, toValue); } } void CALayerXaml::_CalcTransforms() { if (!m_createdTransforms) { Point destTranslation; destTranslation.X = -m_size.Width * m_anchorPoint.X; destTranslation.Y = -m_size.Height * m_anchorPoint.Y; destTranslation.X -= m_origin.X; destTranslation.Y -= m_origin.Y; destTranslation.X += m_position.X; destTranslation.Y += m_position.Y; ((TranslateTransform^)RenderTransform)->X = destTranslation.X; ((TranslateTransform^)RenderTransform)->Y = destTranslation.Y; } } void CALayerXaml::_CreateTransforms() { if (!m_createdTransforms) { TranslateTransform^ SizeAnchorTransform = ref new TranslateTransform(); SizeAnchorTransform->X = -m_size.Width * m_anchorPoint.X; SizeAnchorTransform->Y = -m_size.Height * m_anchorPoint.Y; TranslateTransform^ OriginTransform = ref new TranslateTransform(); OriginTransform->X = -m_origin.X; OriginTransform->Y = -m_origin.Y; TransformGroup^ ContentTransform = ref new TransformGroup(); ContentTransform->Children->Append(ref new RotateTransform()); ContentTransform->Children->Append(ref new ScaleTransform()); ContentTransform->Children->Append(ref new TranslateTransform()); TranslateTransform^ PositionTransform = ref new TranslateTransform(); PositionTransform->X = m_position.X; PositionTransform->Y = m_position.Y; TransformGroup^ LayerTransforms = ref new TransformGroup(); LayerTransforms->Children->Append(SizeAnchorTransform); LayerTransforms->Children->Append(OriginTransform); LayerTransforms->Children->Append(ContentTransform); LayerTransforms->Children->Append(PositionTransform); RenderTransform = LayerTransforms; VisualWidth = m_size.Width; VisualHeight = m_size.Height; m_createdTransforms = true; } } void CALayerXaml::Set(String^ propertyName, Object^ value) { CALayerXaml::s_animatableProperties[propertyName]->Set(this, value); } Object^ CALayerXaml::Get(String^ propertyName) { return CALayerXaml::s_animatableProperties[propertyName]->GetValue(this); } void CALayerXaml::SetOpacity() { if (m_hidden) { __super::Opacity = 0.0; } else { __super::Opacity = m_opacity; } }; void CALayerXaml::SetZIndex(int zIndex) { __super::SetValue(Canvas::ZIndexProperty, zIndex); } /* Disable for now AutomationPeer^ CALayerXaml::OnCreateAutomationPeer() { return ref new CALayerXamlAutomationPeer(this); } */ void CALayerXaml::SizeChangedCallback(DependencyObject^ d, DependencyPropertyChangedEventArgs^ e) { ((CALayerXaml^)d)->InvalidateArrange(); } CALayerXaml::CALayerXaml() { Name = L"LayoutElement"; m_invOriginTransform = ref new TranslateTransform(); m_clipGeometry = ref new RectangleGeometry(); m_clipGeometry->Transform = m_invOriginTransform; RenderTransform = ref new TranslateTransform(); Set("anchorPoint", Point(0.5, 0.5)); LayerOpacity = 1.0; Background = _TransparentBrush; // note-nithishm-03252016 - DependencyProperty are registered with Panel class instead of CALayerXaml class, as we found that // while property look up, the code starts with the base class and not the current class. This might be a bug but for now as a // workaround register with the base class. if (s_visualWidthProperty == nullptr) { s_visualWidthProperty = DependencyProperty::Register("VisualWidth", double::typeid, Panel::typeid, ref new PropertyMetadata((Platform::Object^ )0.0, ref new PropertyChangedCallback(&CALayerXaml::SizeChangedCallback))); } if (s_visualHeightProperty == nullptr) { s_visualHeightProperty = DependencyProperty::Register("VisualHeight", double::typeid, Panel::typeid, ref new PropertyMetadata((Platform::Object^ )0.0, ref new PropertyChangedCallback(&CALayerXaml::SizeChangedCallback))); } // Always start off with a clean slate. Reset(); } void CALayerXaml::_CopyPropertiesFrom(CALayerXaml^ fromLayer) { Set("opacity", fromLayer->Get("opacity")); Set("position", fromLayer->Get("position")); Set("size", fromLayer->Get("size")); Set("anchorPoint", fromLayer->Get("anchorPoint")); } void CALayerXaml::_DiscardContent() { if (m_content != nullptr) { unsigned int index; if (Children->IndexOf(m_content, &index)) { Children->RemoveAt(index); } InvalidateArrange(); if (Util::isInstanceOf<LayerContent^>(m_content)) { LayerContent::DestroyLayerContent((LayerContent^)m_content); } m_content = nullptr; } } void CALayerXaml::_SetContent(FrameworkElement^ element) { if (m_content == element) { return; } _DiscardContent(); m_content = element; if (element != nullptr) { m_content->RenderTransform = m_invOriginTransform; this->Children->InsertAt(0, m_content); InvalidateArrange(); } } LayerContent^ CALayerXaml::_GetLayerContent(bool create) { if (!Util::isInstanceOf<LayerContent^>(m_content)) { if (!create) { return nullptr; } LayerContent^ imageContent = LayerContent::CreateLayerContent(); imageContent->SetGravity(m_contentGravity); imageContent->SetContentsCenter(m_contentsCenter); imageContent->Background = m_backgroundBrush; imageContent->_AdjustContentOriginX(nullptr, nullptr, nullptr, (double)m_origin.X); imageContent->_AdjustContentOriginY(nullptr, nullptr, nullptr, (double)m_origin.Y); __super::Background = _TransparentBrush; _SetContent(imageContent); } return (LayerContent^)m_content; } void CALayerXaml::SetContentGravity(ContentGravity gravity) { m_contentGravity = gravity; auto layoutContent = _GetLayerContent(); if (layoutContent != nullptr) { layoutContent->SetGravity(gravity); } } void CALayerXaml::SetContentsCenter(Rect rect) { m_contentsCenter = rect; auto layoutContent = _GetLayerContent(); if (layoutContent != nullptr) { layoutContent->SetContentsCenter(m_contentsCenter); } } void CALayerXaml::SetupBackground() { if (m_content == nullptr) { Rectangle^ rect = ref new Rectangle(); _SetContent(rect); } if (Util::isInstanceOf<Rectangle^>(m_content)) { static_cast<Rectangle^>(m_content)->Fill = m_backgroundBrush; } else { static_cast<Panel^>(m_content)->Background = m_backgroundBrush; } } void CALayerXaml::SetBackgroundColor(float r, float g, float b, float a) { m_backgroundColor.R = (unsigned char)(r * 255.0); m_backgroundColor.G = (unsigned char)(g * 255.0); m_backgroundColor.B = (unsigned char)(b * 255.0); m_backgroundColor.A = (unsigned char)(a * 255.0); if (m_backgroundColor.A == 0) { m_backgroundBrush = _TransparentBrush; } else { m_backgroundBrush = ref new SolidColorBrush(m_backgroundColor); } SetupBackground(); } void CALayerXaml::SetTopMost() { _SetContent(nullptr); __super::Background = nullptr; } void CALayerXaml::SetContentImage(ImageSource^ source, float width, float height, float scale) { if (source == nullptr) { if (Util::isInstanceOf<LayerContent^>(m_content)) { _SetContent(nullptr); SetupBackground(); } } else { LayerContent^ c = _GetLayerContent(true); c->SetImageContent(source, width, height); c->SetContentParams(width, height, scale); } } void CALayerXaml::SetContentElement(FrameworkElement^ elem, float width, float height, float scale) { if (elem == nullptr) { if (Util::isInstanceOf<LayerContent^>(m_content)) { _SetContent(nullptr); SetupBackground(); } } else { LayerContent^ c = _GetLayerContent(true); c->SetElementContent(elem); c->SetContentParams(width, height, scale); } } Size CALayerXaml::ArrangeOverride(Size finalSize) { float curWidth = CurrentWidth; float curHeight = CurrentHeight; if (m_clipGeometry->Rect.Width != curWidth || m_clipGeometry->Rect.Height != curHeight) { m_clipGeometry->Rect = Rect(0, 0, curWidth, curHeight); } if (m_content != nullptr) { m_content->Width = curWidth; m_content->Height = curHeight; m_content->Arrange(Rect(0, 0, curWidth, curHeight)); } unsigned int childrenSize = Children->Size; for (unsigned int index = 0; index < childrenSize; index++) { FrameworkElement^ curChild = static_cast<FrameworkElement^>(Children->GetAt(index)); if (curChild == m_content) { continue; } CALayerXaml^ subLayer = dynamic_cast<CALayerXaml^>(curChild); if (subLayer != nullptr) { subLayer->Arrange(Rect(0, 0, 1.0, 1.0)); } else { curChild->Arrange(Rect(0, 0, curWidth, curHeight)); } } Size ret; if (Util::isInstanceOf<CALayerXaml^>(Parent)) { ret = Size(1, 1); } else { ret = Size(curWidth, curHeight); } return ret; } Size CALayerXaml::MeasureOverride(Size availableSize) { unsigned int childrenSize = Children->Size; for (unsigned int index = 0; index < childrenSize; index++) { FrameworkElement^ curChild = (FrameworkElement^)Children->GetAt(index); if (curChild == m_content) { continue; } if (!Util::isInstanceOf<CALayerXaml^>(curChild)) { curChild->Measure(availableSize); } } return m_size; } // // EventedStoryboard // static const double c_hundredNanoSeconds = 10000000.0; EventedStoryboard::EventedStoryboard() { // AppxManifest.xml appears to fail to enumerate runtimeclasses with accessors and no default constructor in the Win8.1 SDK. throw ref new Platform::FailureException("Do not use the default constructor; this is merely here as a bug fix."); } EventedStoryboard::EventedStoryboard( double beginTime, double duration, bool autoReverse, float repeatCount, float repeatDuration, float speed, double timeOffset) { TimeSpan beginTimeSpan = TimeSpan(); beginTimeSpan.Duration = (long long)(beginTime * c_hundredNanoSeconds); m_container->BeginTime = beginTimeSpan; TimeSpan timeSpan = TimeSpan(); timeSpan.Duration = (long long)(duration * c_hundredNanoSeconds); m_container->Duration = Duration(timeSpan); if (repeatCount != 0) { m_container->RepeatBehavior = RepeatBehavior(repeatCount); } if (repeatDuration != 0) { TimeSpan timeSpan = TimeSpan(); timeSpan.Duration = (long long)(repeatDuration * c_hundredNanoSeconds); m_container->RepeatBehavior = RepeatBehavior(timeSpan); } m_container->SpeedRatio = speed; m_container->AutoReverse = autoReverse; m_container->FillBehavior = FillBehavior::HoldEnd; m_container->Completed += ref new EventHandler<Object^>([this](Object^ sender, Object^ args) { if (Completed != nullptr) { Completed(this); } m_container->Stop(); }); TimeSpan span = m_container->BeginTime->Value; ThreadPoolTimer^ beginTimer = ThreadPoolTimer::CreateTimer(ref new TimerElapsedHandler([this](ThreadPoolTimer^ timer) { IAsyncAction^ ret = m_container->Dispatcher->RunAsync(CoreDispatcherPriority::High, ref new DispatchedHandler([this]() { if (Started != nullptr) { Started(this); } })); }), m_container->BeginTime->Value); } void EventedStoryboard::Start() { m_container->Begin(); } void EventedStoryboard::Abort() { for (Animation^ curAnim : m_animations) { Object^ curValue = CALayerXaml::s_animatableProperties[curAnim->propertyName]->GetValue(m_animatedLayer); CALayerXaml::s_animatableProperties[curAnim->propertyName]->Set(m_animatedLayer, curValue); } } void EventedStoryboard::_CreateFlip(CALayerXaml^ layer, bool flipRight, bool invert, bool removeFromParent) { if (layer->Projection == nullptr) { layer->Projection = ref new PlaneProjection(); } DoubleAnimation^ rotateAnim = ref new DoubleAnimation(); rotateAnim->Duration = m_container->Duration; if (!invert) { rotateAnim->From = 0.01; if (!flipRight) { rotateAnim->To = (double)180; } else { rotateAnim->To = (double)-180; } } else { if (!flipRight) { rotateAnim->From = (double)180; rotateAnim->To = (double)360; } else { rotateAnim->From = (double)-180; rotateAnim->To = (double)-360; } } ((PlaneProjection^)layer->Projection)->CenterOfRotationX = layer->CurrentWidth / 2; ((PlaneProjection^)layer->Projection)->CenterOfRotationY = layer->CurrentHeight / 2; Storyboard::SetTargetProperty(rotateAnim, "(UIElement.Projection).(PlaneProjection.RotationY)"); Storyboard::SetTarget(rotateAnim, layer); m_container->Children->Append(rotateAnim); DoubleAnimation^ moveAnim = ref new DoubleAnimation(); moveAnim->Duration = m_container->Duration; moveAnim->From = 0.01; moveAnim->To = (double)-160; moveAnim->SpeedRatio = 2.0; moveAnim->AutoReverse = true; Storyboard::SetTarget(moveAnim, layer); Storyboard::SetTargetProperty(moveAnim, "(UIElement.Projection).(PlaneProjection.GlobalOffsetZ)"); m_container->Children->Append(moveAnim); DoubleAnimation^ fade1 = ref new DoubleAnimation(); Storyboard::SetTarget(fade1, layer); Storyboard::SetTargetProperty(fade1, "(UIElement.Opacity)"); if (!invert) { TimeSpan fade1TimeSpan = TimeSpan(); fade1TimeSpan.Duration = m_container->Duration.TimeSpan.Duration / 2; fade1->Duration = Duration(fade1TimeSpan); fade1->From = 1.0; fade1->To = 0.5; fade1->FillBehavior = FillBehavior::HoldEnd; } else { TimeSpan fade1TimeSpan = TimeSpan(); fade1TimeSpan.Duration = m_container->Duration.TimeSpan.Duration / 2; fade1->Duration = Duration(fade1TimeSpan); TimeSpan fade1BeginTimeSpan = TimeSpan(); fade1BeginTimeSpan.Duration = m_container->Duration.TimeSpan.Duration / 2; fade1->BeginTime = fade1BeginTimeSpan; fade1->From = 0.5; fade1->To = 1.0; fade1->FillBehavior = FillBehavior::HoldEnd; fade1->Completed += ref new EventHandler<Object^>([layer](Object^ sender, Object^ args) { layer->Opacity = 1.0; }); } if (removeFromParent) { fade1->Completed += ref new EventHandler<Object^>([layer](Object^ sender, Object^ args) { VisualTreeHelper::DisconnectChildrenRecursive(layer); }); } else { rotateAnim->Completed += ref new EventHandler<Object^>([layer](Object^ sender, Object^ args) { // Using Projection transforms (even Identity) causes less-than-pixel-perfect rendering. layer->Projection = nullptr; }); } m_container->Children->Append(fade1); } void EventedStoryboard::_CreateWoosh(CALayerXaml^ layer, bool fromRight, bool invert, bool removeFromParent) { if (layer->Projection == nullptr) { layer->Projection = ref new PlaneProjection(); } DoubleAnimation^ wooshAnim = ref new DoubleAnimation(); wooshAnim->Duration = m_container->Duration; wooshAnim->EasingFunction = ref new PowerEase(); wooshAnim->EasingFunction->EasingMode = EasingMode::EaseOut; if (!invert) { if (fromRight) { wooshAnim->From = (double)layer->CurrentWidth; wooshAnim->To = 0.01; } else { wooshAnim->From = 0.01; wooshAnim->To = (double)layer->CurrentWidth; } } else { if (fromRight) { wooshAnim->From = 0.01; wooshAnim->To = (double)(-layer->CurrentWidth / 4); } else { wooshAnim->From = (double)(-layer->CurrentWidth / 4); wooshAnim->To = 0.01; } } Storyboard::SetTargetProperty(wooshAnim, "(UIElement.Projection).(PlaneProjection.LocalOffsetX)"); Storyboard::SetTarget(wooshAnim, layer); if (removeFromParent) { wooshAnim->Completed += ref new EventHandler<Object^>([layer](Object^ sender, Object^ args) { VisualTreeHelper::DisconnectChildrenRecursive(layer); }); } else { wooshAnim->Completed += ref new EventHandler<Object^>([layer](Object^ sender, Object^ args) { // Using Projection transforms (even Identity) causes less-than-pixel-perfect rendering. layer->Projection = nullptr; }); } m_container->Children->Append(wooshAnim); } concurrency::task<CALayerXaml^> EventedStoryboard::SnapshotLayer(CALayerXaml^ layer) { if (((layer->m_size.Height == 0) && (layer->m_size.Width == 0)) || (layer->Opacity == 0)) { return concurrency::task_from_result<CALayerXaml^>(nullptr); } else { RenderTargetBitmap^ snapshot = ref new RenderTargetBitmap(); return concurrency::create_task(snapshot->RenderAsync(layer, (int)(layer->CurrentWidth * CALayerXaml::s_screenScale), 0)) .then([snapshot, layer](concurrency::task<void> result) noexcept { try { result.get(); } catch (Platform::InvalidArgumentException^ ex) { // Handle exceptions related to invalid layer attribute passed to RenderAsync TraceWarning(TAG, L"RenderAsync threw InvalidArgumentException exception - [%ld]%s", ex->HResult, ex->Message); return (CALayerXaml^)nullptr; } // Return a new 'copy' layer with the rendered content CALayerXaml^ newLayer = CALayerXaml::CreateLayer(); newLayer->_CopyPropertiesFrom(layer); int width = snapshot->PixelWidth; int height = snapshot->PixelHeight; DisplayInformation^ dispInfo = Windows::Graphics::Display::DisplayInformation::GetForCurrentView(); newLayer->SetContentImage(snapshot, (float)width, (float)height, (float)(CALayerXaml::s_screenScale * dispInfo->RawPixelsPerViewPixel)); // There seems to be a bug in Xaml where Render'd layers get sized to their visible content... sort of. // If the UIViewController being transitioned away from has transparent content, the height returned is less the // navigation bar, as though Xaml sizes the buffer to the largest child Visual, and only expands where needed. // Top/bottom switched due to geometric origin of CALayer so read this as UIViewContentModeTopLeft newLayer->SetContentGravity(ContentGravity::BottomLeft); return newLayer; }, concurrency::task_continuation_context::use_current()); } } void EventedStoryboard::AddTransition(CALayerXaml^ realLayer, CALayerXaml^ snapshotLayer, String^ type, String^ subtype) { if (type == "kCATransitionFlip") { TimeSpan timeSpan = TimeSpan(); timeSpan.Duration = (long long)(0.75 * c_hundredNanoSeconds); m_container->Duration = Duration(timeSpan); Panel^ parent = (Panel^)VisualTreeHelper::GetParent(realLayer); bool flipToLeft = true; if (subtype != "kCATransitionFromLeft") { flipToLeft = false; } // We don't need to animate a snapshot if it doesn't exist if (snapshotLayer) { unsigned int idx; parent->Children->IndexOf(realLayer, &idx); parent->Children->InsertAt(idx + 1, snapshotLayer); parent->InvalidateArrange(); realLayer->Opacity = 0; _CreateFlip(snapshotLayer, flipToLeft, false, true); } _CreateFlip(realLayer, flipToLeft, true, false); } else { TimeSpan timeSpan = TimeSpan(); timeSpan.Duration = (long long)(0.5 * c_hundredNanoSeconds); m_container->Duration = Duration(timeSpan); Panel^ parent = (Panel^)VisualTreeHelper::GetParent(realLayer); bool fromRight = true; if (subtype == "kCATransitionFromLeft") { fromRight = false; } if (fromRight) { // We don't need to animate a snapshot if it doesn't exist if (snapshotLayer) { unsigned int idx; parent->Children->IndexOf(realLayer, &idx); parent->Children->InsertAt(idx, snapshotLayer); parent->InvalidateArrange(); _CreateWoosh(snapshotLayer, fromRight, true, true); } _CreateWoosh(realLayer, fromRight, false, false); } else { // We don't need to animate a snapshot if it doesn't exist if (snapshotLayer) { unsigned int idx; parent->Children->IndexOf(realLayer, &idx); parent->Children->InsertAt(idx + 1, snapshotLayer); parent->InvalidateArrange(); _CreateWoosh(snapshotLayer, fromRight, false, true); } _CreateWoosh(realLayer, fromRight, true, false); } } } void EventedStoryboard::Animate(CALayerXaml^ layer, String^ propertyName, Object^ from, Object^ to) { DoubleAnimation^ timeline = ref new DoubleAnimation(); timeline->Duration = m_container->Duration; timeline->EasingFunction = m_animationEase; CALayerXaml::s_animatableProperties[propertyName]->Animate(layer, m_container, timeline, from, to); } Object^ EventedStoryboard::GetStoryboard() { return m_container; } // // CATextLayerXaml // void CATextLayerXaml::Reset() { TextBlock->Text = ""; TextBlock->Width = std::nan(NULL); TextBlock->Height = std::nan(NULL); } CATextLayerXaml^ CATextLayerXaml::CreateTextLayer() { ICacheableObject^ ret = _TextLayerCache->GetCachableObject(); if (ret != nullptr) { return (CATextLayerXaml^)ret; } return ref new CATextLayerXaml(); } void CATextLayerXaml::DestroyTextLayer(CATextLayerXaml^ content) { _TextLayerCache->PushCacheableObject(content); } } // Controls } // XamlCompositor // clang-format on
; A206423: Fibonacci sequence beginning 12, 7. ; 12,7,19,26,45,71,116,187,303,490,793,1283,2076,3359,5435,8794,14229,23023,37252,60275,97527,157802,255329,413131,668460,1081591,1750051,2831642,4581693,7413335,11995028,19408363,31403391,50811754,82215145,133026899,215242044,348268943,563510987,911779930,1475290917,2387070847,3862361764,6249432611,10111794375,16361226986,26473021361,42834248347,69307269708,112141518055,181448787763,293590305818,475039093581,768629399399,1243668492980,2012297892379,3255966385359,5268264277738,8524230663097,13792494940835,22316725603932,36109220544767,58425946148699,94535166693466,152961112842165,247496279535631,400457392377796,647953671913427,1048411064291223,1696364736204650,2744775800495873,4441140536700523,7185916337196396 mov $4,8 lpb $0 sub $0,1 add $2,3 add $3,4 add $3,$4 mov $4,$2 mov $2,$3 lpe mov $1,4 add $1,$4
global gdt_load gdt_load: mov eax, [esp+4] mov [gdt_descriptor + 2], eax mov ax, [esp+8] mov [gdt_descriptor], ax lgdt [gdt_descriptor] jmp 0x08:.reload_cs .reload_cs: mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax ret section .data gdt_descriptor: dw 0x00 ; Size dd 0x00 ; GDT Start Address
/** * Copyright (c) 2016-present, Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "caffe2/core/common_hip.h" #include "caffe2/core/context_hip.h" #include "caffe2/image/image_input_op.h" namespace caffe2 { REGISTER_HIP_OPERATOR(ImageInput, ImageInputOp<HIPContext>); } // namespace caffe2
;* ;* Various assembly utils ;* ;* ;* Constants ;* .asg C0, CONST_PRUSSINTC .asg C2, CONST_PRUCFG .asg 36, SICR_OFFSET .asg 0x02000, CONST_OTHERPRU_MEM .asg 0x10000, CONST_SHARED_MEM .asg 17, PRU0_PRU1_INTERRUPT .asg 18, PRU1_PRU0_INTERRUPT .asg CONST_OTHERPRU_MEM + 0x0800, CONST_MAX_SLOTS .asg 12, MAX_UNIVERSES .asg R1.b0, UNIVERSE_COUNT .asg R1.b1, SLOT_COUNT .asg R1.b2, BIT_COUNT .asg R1.b3, MAX_SLOTS ;* ;* Spin around and kill time. 5 nanoseconds per cycle. ;* DELAY_CYCLES .macro NR LDI R14, NR SUB R14, R14, 3 ;* function entry + overhead LSR R14, R14, 1 ;* loop is by two $1: SUB R14, R14, 1 QBNE $1, R14, 0 .endm LATCH_DATA .macro LDI R15, 200 ;* 50 uS $1: DELAY_CYCLES 255 SUB R15, R15, 1 QBNE $1, R15, 0 .endm ASSEMBLE_DATA .macro ;* 15 - 29 clock cycles ;* R14 has the assembled value to pipe out R30 LDI R14, 0 QBBC $1, R16, 23 SET R14, R14, 0 $1: QBBC $2, R17, 23 SET R14, R14, 1 $2: QBBC $3, R18, 23 SET R14, R14, 2 $3: QBBC $4, R19, 23 SET R14, R14, 3 $4: QBBC $5, R20, 23 SET R14, R14, 4 $5: QBBC $6, R21, 23 SET R14, R14, 5 $6: QBBC $7, R22, 23 SET R14, R14, 6 $7: QBBC $8, R23, 23 SET R14, R14, 7 $8: QBBC $9, R24, 23 SET R14, R14, 8 $9: QBBC $10,R25, 23 SET R14, R14, 9 $10: QBBC $11,R26, 23 SET R14, R14, 10 $11: QBBC $12,R27, 23 SET R14, R14, 11 $12: .endm SHIFT_DATA .macro ;* 14 clock ticks ;* first 8 bits LSL R16, R16, 1 LSL R17, R17, 1 LSL R18, R18, 1 LSL R19, R19, 1 LSL R20, R20, 1 LSL R21, R21, 1 LSL R22, R22, 1 LSL R23, R23, 1 ;* second 4 bits LSL R24, R24, 1 LSL R25, R25, 1 LSL R26, R26, 1 LSL R27, R27, 1 .endm
.global s_prepare_buffers s_prepare_buffers: push %r8 push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0xf18a, %rbp nop nop nop nop nop inc %r8 mov (%rbp), %esi nop nop add $11751, %rbx lea addresses_WT_ht+0x11dfa, %rsi lea addresses_WT_ht+0x85ca, %rdi nop cmp $9001, %rbp mov $15, %rcx rep movsw nop nop nop and %r8, %r8 lea addresses_UC_ht+0x12b2a, %rbp nop nop nop add $30141, %rdx movb $0x61, (%rbp) nop nop nop nop and $47870, %rsi lea addresses_UC_ht+0x15dca, %rsi nop nop nop nop nop dec %r8 vmovups (%rsi), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %rbp nop sub %r8, %r8 lea addresses_normal_ht+0x16e3a, %r8 nop nop nop sub $26777, %rdi mov (%r8), %edx nop nop nop nop sub $24149, %rbx lea addresses_UC_ht+0x1e5ca, %rbp nop inc %rdi mov (%rbp), %r8d nop nop nop cmp %rbx, %rbx lea addresses_D_ht+0x42aa, %rsi clflush (%rsi) nop xor $29493, %rbp vmovups (%rsi), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $1, %xmm1, %rbx nop nop nop nop nop and $11367, %rbp lea addresses_WT_ht+0xbca, %rdi nop nop nop nop nop add %rbp, %rbp mov (%rdi), %r8 nop nop cmp %r8, %r8 lea addresses_normal_ht+0x750a, %rdi nop nop and $8235, %rcx movb $0x61, (%rdi) nop nop nop nop nop dec %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r8 ret .global s_faulty_load s_faulty_load: push %r11 push %r9 push %rax push %rbx push %rcx push %rsi // Store mov $0x66d1fe0000000ec2, %r9 nop nop nop nop nop dec %rbx mov $0x5152535455565758, %rcx movq %rcx, %xmm5 vmovups %ymm5, (%r9) nop nop xor $35514, %rbx // Faulty Load mov $0x51463300000005ca, %r11 dec %rcx mov (%r11), %rsi lea oracles, %r11 and $0xff, %rsi shlq $12, %rsi mov (%r11,%rsi,1), %rsi pop %rsi pop %rcx pop %rbx pop %rax pop %r9 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_NC', 'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 11}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10}} {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 3}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6}} {'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 */
; A169216: Number of reduced words of length n in Coxeter group on 11 generators S_i with relations (S_i)^2 = (S_i S_j)^28 = I. ; 1,11,110,1100,11000,110000,1100000,11000000,110000000,1100000000,11000000000,110000000000,1100000000000,11000000000000,110000000000000,1100000000000000,11000000000000000,110000000000000000 seq $0,3953 ; Expansion of g.f.: (1+x)/(1-10*x).
//----------------------------------------------------------------------------// // Part of the Fox project, licensed under the MIT license. // See LICENSE.txt in the project root for license information. // File : SourceManager.hpp // Author : Pierre van Houtryve //----------------------------------------------------------------------------// // This file contains the SourceManager and associated classes. //----------------------------------------------------------------------------// #pragma once #include "string_view.hpp" #include "LLVM.hpp" #include "SourceLoc.hpp" #include "llvm/ADT/SmallVector.h" #include <memory> #include <string> #include <map> namespace fox { /// Object representing a human-readable version of a SourceLoc. /// /// Note that this structure does not own the "fileName" string. struct CompleteLoc { using line_type = std::uint32_t; using col_type = std::uint16_t; CompleteLoc(string_view fName, line_type ln, col_type col); bool operator==(const CompleteLoc& other) const; bool operator!=(const CompleteLoc& other) const; /// \returns the CompleteLoc as a string formatted like this: /// file:line:column (if printFilename = true) /// line:column (if printFilename = false) std::string to_string(bool printFilename = true) const; /// The name of the file const string_view fileName; /// The line number const line_type line; /// The column number const col_type column; }; /// Object representing a human-readable version of a SourceRange. /// Note that this structure does not own the "fileName" string. struct CompleteRange { using line_type = CompleteLoc::line_type; using col_type = CompleteLoc::col_type; CompleteRange(string_view fName, line_type begLine, col_type begCol, line_type endLine, col_type endCol); bool operator==(const CompleteRange& other) const; bool operator!=(const CompleteRange& other) const; /// \returns the CompleteRange as a string formatted like this: /// file:line:column-line:column (if printFilename = true) /// line:column-line:column (if printFilename = true) std::string to_string(bool printFilename = true) const; /// The name of the file const string_view fileName; /// The line number of the beginning of the loc const line_type begLine; /// The column number of the beginning of the loc const col_type begColumn; /// The line number of the end of the loc const line_type endLine; /// The column number of the end of the loc const col_type endColumn; }; /// The SourceManager manages source files. It reads /// them, stores them and assigns a unique FileID to each of them. /// It also offers multiple functionalities related to File and SourceLocs, /// such as converting them into human-readable representations /// /// As an implementation detail, accessing a File's data is pretty /// cheap since files are stored in a vector. class SourceManager { public: using line_type = CompleteLoc::line_type; using col_type = CompleteLoc::col_type; SourceManager() = default; /// Make this class non copyable SourceManager(const SourceManager&) = delete; SourceManager& operator=(const SourceManager&) = delete; /// Return enum for readFile enum class ReadFileResult : std::uint8_t { /// The file was successfully read and loaded in memory. /// Its FileID is the first element of the pair. Ok, /// The file couldn't be found. NotFound, /// The file had an invalid encoding. /// (Currently, only ASCII and UTF8 are supported.) InvalidEncoding }; /// Loads a file in memory. /// \returns a pair. The first element is the FileID, it'll evaluate /// to false if the file was not loaded in memory. /// The second element contains the result information. std::pair<FileID, ReadFileResult> readFile(string_view path); /// Loads (copies) a string in the SourceManager /// \param str the string to load /// \param name the name the string should have /// \returns the FileID assigned to the string. FileID loadFromString(string_view str, string_view name); /// \returns a string_view of \p fid 's buffer. /// (the string is owned by the SourceManager) string_view getFileContent(FileID fid) const; /// \returns a string_view of \p fid 's file name. /// (the string is owned by the SourceManager) string_view getFileName(FileID fid) const; /// \returns the line number of \p loc line_type getLineNumber(SourceLoc loc) const; /// \returns a complete, presentable version of \p sloc CompleteLoc getCompleteLoc(SourceLoc sloc) const; /// \returns a complete, presentable version of \p range CompleteRange getCompleteRange(SourceRange range) const; /// \param loc the loc /// \param lineBeg If it is present, the function will store the SourceLoc /// of the first character of the line in that loc. /// \returns the complete line of code in which \p loc is located. string_view getLineAt(SourceLoc loc, SourceLoc* lineBeg = nullptr) const; /// Increments \p loc by \p count codepoints. /// \returns the incremented version of \p loc /// NOTE: This may fail if you try to increment past the end. SourceLoc advance(SourceLoc loc, std::size_t count = 1) const; /// \returns the number of codepoints contained in the range. /// \verbatim /// e.g. Let's say that: /// a = range.getBeginLoc() /// b = range.getEndLoc() /// /// and that the range represents "fooba" in "foobar" /// /// foobar /// ^ ^ /// a b /// /// then getLengthInCodepoints(a, b) returns 5, because there's /// 5 characters in this range: fooba. /// /// Note: this method considers fullwidth unicode characters /// as 1 codepoint, even if they take 2 characters on screen. /// \endverbatim std::size_t getLengthInCodepoints(SourceRange range) const; private: // This class represents the data that is stored internally inside the // SourceManager. // // TODO: Use Pimpl to move that out of the header and greatly reduce // the includes (remove SmallVector, unique_ptr & map from the includes) struct Data { Data(string_view name, string_view content) : name(name.to_string()), content(content.to_string()) {} template<typename Iterator> Data(string_view name, Iterator begin, Iterator end) : name(name.to_string()), content(begin, end) {} const std::string name; const std::string content; protected: using IndexTy = SourceLoc::IndexTy; friend class SourceManager; // This is the cached "line table", which is used to efficiently // calculate the line number of a SourceLoc. mutable std::map<IndexTy, line_type> lineTable_; // Flag indicating whether we have calculated the LineTable. mutable bool calculatedLineTable_ = false; // We cache the last line table search here. // The first element of the pair is the raw index of // the last SourceLoc that we // searched for, the second is the result we returned for // that search. // // TODO: Is this case common enough to warrant caching? Tests needed! mutable std::pair<IndexTy, std::pair<IndexTy, line_type>> lastLTSearch_; }; // Calculates the line and column number of a given position inside // the file/data's content. std::pair<line_type, col_type> calculateLineAndColumn(const Data* data, SourceLoc::IndexTy idx) const; // Returns a pointer to the "Data" for a given File. // The result is always non null (guaranteed by an assertion) // The result will also always be constant because the data stored // is immutable. const Data* getData(FileID fid) const; // Calculates the "line table" of a given Data. void calculateLineTable(const Data* data) const; // Checks if a SourceLoc's index refers to a valid position // (or a past-the-end position) in the data. bool isIndexValid(const Data* data, SourceLoc::IndexTy idx) const; // Searches the "line table" of a given Data, returning // the index at which the line begins and the line number // at the position "idx" std::pair<SourceLoc::IndexTy, line_type> searchLineTable(const Data* data, SourceLoc::IndexTy idx) const; // Inserts a new Data in the datas_ vector, returning it's FileID. FileID insertData(std::unique_ptr<Data> data); // Member variables SmallVector<std::unique_ptr<Data>, 4> datas_; }; // Converts a SourceManager::ReadFileResult to a string. std::string to_string(SourceManager::ReadFileResult status); }
; ; jdsamss2.asm - upsampling (SSE2) ; ; x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 ; ; Last Modified : February 4, 2006 ; ; [TAB8] %include "jsimdext.inc" %include "jcolsamp.inc" %ifdef JDSAMPLE_FANCY_SSE2_SUPPORTED ; -------------------------------------------------------------------------- SECTION SEG_CONST alignz 16 global EXTN(jconst_fancy_upsample_sse2) EXTN(jconst_fancy_upsample_sse2): PW_ONE times 8 dw 1 PW_TWO times 8 dw 2 PW_THREE times 8 dw 3 PW_SEVEN times 8 dw 7 PW_EIGHT times 8 dw 8 alignz 16 ; -------------------------------------------------------------------------- SECTION SEG_TEXT BITS 32 ; ; Fancy processing for the common case of 2:1 horizontal and 1:1 vertical. ; ; The upsampling algorithm is linear interpolation between pixel centers, ; also known as a "triangle filter". This is a good compromise between ; speed and visual quality. The centers of the output pixels are 1/4 and 3/4 ; of the way between input pixel centers. ; ; GLOBAL(void) ; jpeg_h2v1_fancy_upsample_sse2 (j_decompress_ptr cinfo, ; jpeg_component_info * compptr, ; JSAMPARRAY input_data, ; JSAMPARRAY * output_data_ptr); ; %define cinfo(b) (b)+8 ; j_decompress_ptr cinfo %define compptr(b) (b)+12 ; jpeg_component_info * compptr %define input_data(b) (b)+16 ; JSAMPARRAY input_data %define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr align 16 global EXTN(jpeg_h2v1_fancy_upsample_sse2) EXTN(jpeg_h2v1_fancy_upsample_sse2): push ebp mov ebp,esp pushpic ebx ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi push edi get_GOT ebx ; get GOT address mov eax, POINTER [compptr(ebp)] mov eax, JDIMENSION [jcompinfo_downsampled_width(eax)] ; colctr test eax,eax jz near .return mov ecx, POINTER [cinfo(ebp)] mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr test ecx,ecx jz near .return mov esi, JSAMPARRAY [input_data(ebp)] ; input_data mov edi, POINTER [output_data_ptr(ebp)] mov edi, JSAMPARRAY [edi] ; output_data alignx 16,7 .rowloop: push eax ; colctr push edi push esi mov esi, JSAMPROW [esi] ; inptr mov edi, JSAMPROW [edi] ; outptr test eax, SIZEOF_XMMWORD-1 jz short .skip mov dl, JSAMPLE [esi+(eax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [esi+eax*SIZEOF_JSAMPLE], dl ; insert a dummy sample .skip: pxor xmm0,xmm0 ; xmm0=(all 0's) pcmpeqb xmm7,xmm7 psrldq xmm7,(SIZEOF_XMMWORD-1) pand xmm7, XMMWORD [esi+0*SIZEOF_XMMWORD] add eax, byte SIZEOF_XMMWORD-1 and eax, byte -SIZEOF_XMMWORD cmp eax, byte SIZEOF_XMMWORD ja short .columnloop alignx 16,7 .columnloop_last: pcmpeqb xmm6,xmm6 pslldq xmm6,(SIZEOF_XMMWORD-1) pand xmm6, XMMWORD [esi+0*SIZEOF_XMMWORD] jmp short .upsample alignx 16,7 .columnloop: movdqa xmm6, XMMWORD [esi+1*SIZEOF_XMMWORD] pslldq xmm6,(SIZEOF_XMMWORD-1) .upsample: movdqa xmm1, XMMWORD [esi+0*SIZEOF_XMMWORD] movdqa xmm2,xmm1 movdqa xmm3,xmm1 ; xmm1=( 0 1 2 ... 13 14 15) pslldq xmm2,1 ; xmm2=(-- 0 1 ... 12 13 14) psrldq xmm3,1 ; xmm3=( 1 2 3 ... 14 15 --) por xmm2,xmm7 ; xmm2=(-1 0 1 ... 12 13 14) por xmm3,xmm6 ; xmm3=( 1 2 3 ... 14 15 16) movdqa xmm7,xmm1 psrldq xmm7,(SIZEOF_XMMWORD-1) ; xmm7=(15 -- -- ... -- -- --) movdqa xmm4,xmm1 punpcklbw xmm1,xmm0 ; xmm1=( 0 1 2 3 4 5 6 7) punpckhbw xmm4,xmm0 ; xmm4=( 8 9 10 11 12 13 14 15) movdqa xmm5,xmm2 punpcklbw xmm2,xmm0 ; xmm2=(-1 0 1 2 3 4 5 6) punpckhbw xmm5,xmm0 ; xmm5=( 7 8 9 10 11 12 13 14) movdqa xmm6,xmm3 punpcklbw xmm3,xmm0 ; xmm3=( 1 2 3 4 5 6 7 8) punpckhbw xmm6,xmm0 ; xmm6=( 9 10 11 12 13 14 15 16) pmullw xmm1,[GOTOFF(ebx,PW_THREE)] pmullw xmm4,[GOTOFF(ebx,PW_THREE)] paddw xmm2,[GOTOFF(ebx,PW_ONE)] paddw xmm5,[GOTOFF(ebx,PW_ONE)] paddw xmm3,[GOTOFF(ebx,PW_TWO)] paddw xmm6,[GOTOFF(ebx,PW_TWO)] paddw xmm2,xmm1 paddw xmm5,xmm4 psrlw xmm2,2 ; xmm2=OutLE=( 0 2 4 6 8 10 12 14) psrlw xmm5,2 ; xmm5=OutHE=(16 18 20 22 24 26 28 30) paddw xmm3,xmm1 paddw xmm6,xmm4 psrlw xmm3,2 ; xmm3=OutLO=( 1 3 5 7 9 11 13 15) psrlw xmm6,2 ; xmm6=OutHO=(17 19 21 23 25 27 29 31) psllw xmm3,BYTE_BIT psllw xmm6,BYTE_BIT por xmm2,xmm3 ; xmm2=OutL=( 0 1 2 ... 13 14 15) por xmm5,xmm6 ; xmm5=OutH=(16 17 18 ... 29 30 31) movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [edi+1*SIZEOF_XMMWORD], xmm5 sub eax, byte SIZEOF_XMMWORD add esi, byte 1*SIZEOF_XMMWORD ; inptr add edi, byte 2*SIZEOF_XMMWORD ; outptr cmp eax, byte SIZEOF_XMMWORD ja near .columnloop test eax,eax jnz near .columnloop_last pop esi pop edi pop eax add esi, byte SIZEOF_JSAMPROW ; input_data add edi, byte SIZEOF_JSAMPROW ; output_data dec ecx ; rowctr jg near .rowloop .return: pop edi pop esi ; pop edx ; need not be preserved ; pop ecx ; need not be preserved poppic ebx pop ebp ret ; -------------------------------------------------------------------------- ; ; Fancy processing for the common case of 2:1 horizontal and 2:1 vertical. ; Again a triangle filter; see comments for h2v1 case, above. ; ; GLOBAL(void) ; jpeg_h2v2_fancy_upsample_sse2 (j_decompress_ptr cinfo, ; jpeg_component_info * compptr, ; JSAMPARRAY input_data, ; JSAMPARRAY * output_data_ptr); ; %define cinfo(b) (b)+8 ; j_decompress_ptr cinfo %define compptr(b) (b)+12 ; jpeg_component_info * compptr %define input_data(b) (b)+16 ; JSAMPARRAY input_data %define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr %define original_ebp ebp+0 %define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM] %define WK_NUM 4 %define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr align 16 global EXTN(jpeg_h2v2_fancy_upsample_sse2) EXTN(jpeg_h2v2_fancy_upsample_sse2): push ebp mov eax,esp ; eax = original ebp sub esp, byte 4 and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits mov [esp],eax mov ebp,esp ; ebp = aligned ebp lea esp, [wk(0)] pushpic eax ; make a room for GOT address push ebx ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi push edi get_GOT ebx ; get GOT address movpic POINTER [gotptr], ebx ; save GOT address mov edx,eax ; edx = original ebp mov eax, POINTER [compptr(edx)] mov eax, JDIMENSION [jcompinfo_downsampled_width(eax)] ; colctr test eax,eax jz near .return mov ecx, POINTER [cinfo(edx)] mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr test ecx,ecx jz near .return mov esi, JSAMPARRAY [input_data(edx)] ; input_data mov edi, POINTER [output_data_ptr(edx)] mov edi, JSAMPARRAY [edi] ; output_data alignx 16,7 .rowloop: push eax ; colctr push ecx push edi push esi mov ecx, JSAMPROW [esi-1*SIZEOF_JSAMPROW] ; inptr1(above) mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; inptr0 mov esi, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; inptr1(below) mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW] ; outptr0 mov edi, JSAMPROW [edi+1*SIZEOF_JSAMPROW] ; outptr1 test eax, SIZEOF_XMMWORD-1 jz short .skip push edx mov dl, JSAMPLE [ecx+(eax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [ecx+eax*SIZEOF_JSAMPLE], dl mov dl, JSAMPLE [ebx+(eax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [ebx+eax*SIZEOF_JSAMPLE], dl mov dl, JSAMPLE [esi+(eax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [esi+eax*SIZEOF_JSAMPLE], dl ; insert a dummy sample pop edx .skip: ; -- process the first column block movdqa xmm0, XMMWORD [ebx+0*SIZEOF_XMMWORD] ; xmm0=row[ 0][0] movdqa xmm1, XMMWORD [ecx+0*SIZEOF_XMMWORD] ; xmm1=row[-1][0] movdqa xmm2, XMMWORD [esi+0*SIZEOF_XMMWORD] ; xmm2=row[+1][0] pushpic ebx movpic ebx, POINTER [gotptr] ; load GOT address pxor xmm3,xmm3 ; xmm3=(all 0's) movdqa xmm4,xmm0 punpcklbw xmm0,xmm3 ; xmm0=row[ 0]( 0 1 2 3 4 5 6 7) punpckhbw xmm4,xmm3 ; xmm4=row[ 0]( 8 9 10 11 12 13 14 15) movdqa xmm5,xmm1 punpcklbw xmm1,xmm3 ; xmm1=row[-1]( 0 1 2 3 4 5 6 7) punpckhbw xmm5,xmm3 ; xmm5=row[-1]( 8 9 10 11 12 13 14 15) movdqa xmm6,xmm2 punpcklbw xmm2,xmm3 ; xmm2=row[+1]( 0 1 2 3 4 5 6 7) punpckhbw xmm6,xmm3 ; xmm6=row[+1]( 8 9 10 11 12 13 14 15) pmullw xmm0,[GOTOFF(ebx,PW_THREE)] pmullw xmm4,[GOTOFF(ebx,PW_THREE)] pcmpeqb xmm7,xmm7 psrldq xmm7,(SIZEOF_XMMWORD-2) paddw xmm1,xmm0 ; xmm1=Int0L=( 0 1 2 3 4 5 6 7) paddw xmm5,xmm4 ; xmm5=Int0H=( 8 9 10 11 12 13 14 15) paddw xmm2,xmm0 ; xmm2=Int1L=( 0 1 2 3 4 5 6 7) paddw xmm6,xmm4 ; xmm6=Int1H=( 8 9 10 11 12 13 14 15) movdqa XMMWORD [edx+0*SIZEOF_XMMWORD], xmm1 ; temporarily save movdqa XMMWORD [edx+1*SIZEOF_XMMWORD], xmm5 ; the intermediate data movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [edi+1*SIZEOF_XMMWORD], xmm6 pand xmm1,xmm7 ; xmm1=( 0 -- -- -- -- -- -- --) pand xmm2,xmm7 ; xmm2=( 0 -- -- -- -- -- -- --) movdqa XMMWORD [wk(0)], xmm1 movdqa XMMWORD [wk(1)], xmm2 poppic ebx add eax, byte SIZEOF_XMMWORD-1 and eax, byte -SIZEOF_XMMWORD cmp eax, byte SIZEOF_XMMWORD ja short .columnloop alignx 16,7 .columnloop_last: ; -- process the last column block pushpic ebx movpic ebx, POINTER [gotptr] ; load GOT address pcmpeqb xmm1,xmm1 pslldq xmm1,(SIZEOF_XMMWORD-2) movdqa xmm2,xmm1 pand xmm1, XMMWORD [edx+1*SIZEOF_XMMWORD] pand xmm2, XMMWORD [edi+1*SIZEOF_XMMWORD] movdqa XMMWORD [wk(2)], xmm1 ; xmm1=(-- -- -- -- -- -- -- 15) movdqa XMMWORD [wk(3)], xmm2 ; xmm2=(-- -- -- -- -- -- -- 15) jmp near .upsample alignx 16,7 .columnloop: ; -- process the next column block movdqa xmm0, XMMWORD [ebx+1*SIZEOF_XMMWORD] ; xmm0=row[ 0][1] movdqa xmm1, XMMWORD [ecx+1*SIZEOF_XMMWORD] ; xmm1=row[-1][1] movdqa xmm2, XMMWORD [esi+1*SIZEOF_XMMWORD] ; xmm2=row[+1][1] pushpic ebx movpic ebx, POINTER [gotptr] ; load GOT address pxor xmm3,xmm3 ; xmm3=(all 0's) movdqa xmm4,xmm0 punpcklbw xmm0,xmm3 ; xmm0=row[ 0]( 0 1 2 3 4 5 6 7) punpckhbw xmm4,xmm3 ; xmm4=row[ 0]( 8 9 10 11 12 13 14 15) movdqa xmm5,xmm1 punpcklbw xmm1,xmm3 ; xmm1=row[-1]( 0 1 2 3 4 5 6 7) punpckhbw xmm5,xmm3 ; xmm5=row[-1]( 8 9 10 11 12 13 14 15) movdqa xmm6,xmm2 punpcklbw xmm2,xmm3 ; xmm2=row[+1]( 0 1 2 3 4 5 6 7) punpckhbw xmm6,xmm3 ; xmm6=row[+1]( 8 9 10 11 12 13 14 15) pmullw xmm0,[GOTOFF(ebx,PW_THREE)] pmullw xmm4,[GOTOFF(ebx,PW_THREE)] paddw xmm1,xmm0 ; xmm1=Int0L=( 0 1 2 3 4 5 6 7) paddw xmm5,xmm4 ; xmm5=Int0H=( 8 9 10 11 12 13 14 15) paddw xmm2,xmm0 ; xmm2=Int1L=( 0 1 2 3 4 5 6 7) paddw xmm6,xmm4 ; xmm6=Int1H=( 8 9 10 11 12 13 14 15) movdqa XMMWORD [edx+2*SIZEOF_XMMWORD], xmm1 ; temporarily save movdqa XMMWORD [edx+3*SIZEOF_XMMWORD], xmm5 ; the intermediate data movdqa XMMWORD [edi+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [edi+3*SIZEOF_XMMWORD], xmm6 pslldq xmm1,(SIZEOF_XMMWORD-2) ; xmm1=(-- -- -- -- -- -- -- 0) pslldq xmm2,(SIZEOF_XMMWORD-2) ; xmm2=(-- -- -- -- -- -- -- 0) movdqa XMMWORD [wk(2)], xmm1 movdqa XMMWORD [wk(3)], xmm2 .upsample: ; -- process the upper row movdqa xmm7, XMMWORD [edx+0*SIZEOF_XMMWORD] movdqa xmm3, XMMWORD [edx+1*SIZEOF_XMMWORD] movdqa xmm0,xmm7 ; xmm7=Int0L=( 0 1 2 3 4 5 6 7) movdqa xmm4,xmm3 ; xmm3=Int0H=( 8 9 10 11 12 13 14 15) psrldq xmm0,2 ; xmm0=( 1 2 3 4 5 6 7 --) pslldq xmm4,(SIZEOF_XMMWORD-2) ; xmm4=(-- -- -- -- -- -- -- 8) movdqa xmm5,xmm7 movdqa xmm6,xmm3 psrldq xmm5,(SIZEOF_XMMWORD-2) ; xmm5=( 7 -- -- -- -- -- -- --) pslldq xmm6,2 ; xmm6=(-- 8 9 10 11 12 13 14) por xmm0,xmm4 ; xmm0=( 1 2 3 4 5 6 7 8) por xmm5,xmm6 ; xmm5=( 7 8 9 10 11 12 13 14) movdqa xmm1,xmm7 movdqa xmm2,xmm3 pslldq xmm1,2 ; xmm1=(-- 0 1 2 3 4 5 6) psrldq xmm2,2 ; xmm2=( 9 10 11 12 13 14 15 --) movdqa xmm4,xmm3 psrldq xmm4,(SIZEOF_XMMWORD-2) ; xmm4=(15 -- -- -- -- -- -- --) por xmm1, XMMWORD [wk(0)] ; xmm1=(-1 0 1 2 3 4 5 6) por xmm2, XMMWORD [wk(2)] ; xmm2=( 9 10 11 12 13 14 15 16) movdqa XMMWORD [wk(0)], xmm4 pmullw xmm7,[GOTOFF(ebx,PW_THREE)] pmullw xmm3,[GOTOFF(ebx,PW_THREE)] paddw xmm1,[GOTOFF(ebx,PW_EIGHT)] paddw xmm5,[GOTOFF(ebx,PW_EIGHT)] paddw xmm0,[GOTOFF(ebx,PW_SEVEN)] paddw xmm2,[GOTOFF(ebx,PW_SEVEN)] paddw xmm1,xmm7 paddw xmm5,xmm3 psrlw xmm1,4 ; xmm1=Out0LE=( 0 2 4 6 8 10 12 14) psrlw xmm5,4 ; xmm5=Out0HE=(16 18 20 22 24 26 28 30) paddw xmm0,xmm7 paddw xmm2,xmm3 psrlw xmm0,4 ; xmm0=Out0LO=( 1 3 5 7 9 11 13 15) psrlw xmm2,4 ; xmm2=Out0HO=(17 19 21 23 25 27 29 31) psllw xmm0,BYTE_BIT psllw xmm2,BYTE_BIT por xmm1,xmm0 ; xmm1=Out0L=( 0 1 2 ... 13 14 15) por xmm5,xmm2 ; xmm5=Out0H=(16 17 18 ... 29 30 31) movdqa XMMWORD [edx+0*SIZEOF_XMMWORD], xmm1 movdqa XMMWORD [edx+1*SIZEOF_XMMWORD], xmm5 ; -- process the lower row movdqa xmm6, XMMWORD [edi+0*SIZEOF_XMMWORD] movdqa xmm4, XMMWORD [edi+1*SIZEOF_XMMWORD] movdqa xmm7,xmm6 ; xmm6=Int1L=( 0 1 2 3 4 5 6 7) movdqa xmm3,xmm4 ; xmm4=Int1H=( 8 9 10 11 12 13 14 15) psrldq xmm7,2 ; xmm7=( 1 2 3 4 5 6 7 --) pslldq xmm3,(SIZEOF_XMMWORD-2) ; xmm3=(-- -- -- -- -- -- -- 8) movdqa xmm0,xmm6 movdqa xmm2,xmm4 psrldq xmm0,(SIZEOF_XMMWORD-2) ; xmm0=( 7 -- -- -- -- -- -- --) pslldq xmm2,2 ; xmm2=(-- 8 9 10 11 12 13 14) por xmm7,xmm3 ; xmm7=( 1 2 3 4 5 6 7 8) por xmm0,xmm2 ; xmm0=( 7 8 9 10 11 12 13 14) movdqa xmm1,xmm6 movdqa xmm5,xmm4 pslldq xmm1,2 ; xmm1=(-- 0 1 2 3 4 5 6) psrldq xmm5,2 ; xmm5=( 9 10 11 12 13 14 15 --) movdqa xmm3,xmm4 psrldq xmm3,(SIZEOF_XMMWORD-2) ; xmm3=(15 -- -- -- -- -- -- --) por xmm1, XMMWORD [wk(1)] ; xmm1=(-1 0 1 2 3 4 5 6) por xmm5, XMMWORD [wk(3)] ; xmm5=( 9 10 11 12 13 14 15 16) movdqa XMMWORD [wk(1)], xmm3 pmullw xmm6,[GOTOFF(ebx,PW_THREE)] pmullw xmm4,[GOTOFF(ebx,PW_THREE)] paddw xmm1,[GOTOFF(ebx,PW_EIGHT)] paddw xmm0,[GOTOFF(ebx,PW_EIGHT)] paddw xmm7,[GOTOFF(ebx,PW_SEVEN)] paddw xmm5,[GOTOFF(ebx,PW_SEVEN)] paddw xmm1,xmm6 paddw xmm0,xmm4 psrlw xmm1,4 ; xmm1=Out1LE=( 0 2 4 6 8 10 12 14) psrlw xmm0,4 ; xmm0=Out1HE=(16 18 20 22 24 26 28 30) paddw xmm7,xmm6 paddw xmm5,xmm4 psrlw xmm7,4 ; xmm7=Out1LO=( 1 3 5 7 9 11 13 15) psrlw xmm5,4 ; xmm5=Out1HO=(17 19 21 23 25 27 29 31) psllw xmm7,BYTE_BIT psllw xmm5,BYTE_BIT por xmm1,xmm7 ; xmm1=Out1L=( 0 1 2 ... 13 14 15) por xmm0,xmm5 ; xmm0=Out1H=(16 17 18 ... 29 30 31) movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm1 movdqa XMMWORD [edi+1*SIZEOF_XMMWORD], xmm0 poppic ebx sub eax, byte SIZEOF_XMMWORD add ecx, byte 1*SIZEOF_XMMWORD ; inptr1(above) add ebx, byte 1*SIZEOF_XMMWORD ; inptr0 add esi, byte 1*SIZEOF_XMMWORD ; inptr1(below) add edx, byte 2*SIZEOF_XMMWORD ; outptr0 add edi, byte 2*SIZEOF_XMMWORD ; outptr1 cmp eax, byte SIZEOF_XMMWORD ja near .columnloop test eax,eax jnz near .columnloop_last pop esi pop edi pop ecx pop eax add esi, byte 1*SIZEOF_JSAMPROW ; input_data add edi, byte 2*SIZEOF_JSAMPROW ; output_data sub ecx, byte 2 ; rowctr jg near .rowloop .return: pop edi pop esi ; pop edx ; need not be preserved ; pop ecx ; need not be preserved pop ebx mov esp,ebp ; esp <- aligned ebp pop esp ; esp <- original ebp pop ebp ret %ifdef UPSAMPLE_H1V2_SUPPORTED ; -------------------------------------------------------------------------- ; ; Fancy processing for the common case of 1:1 horizontal and 2:1 vertical. ; Again a triangle filter; see comments for h2v1 case, above. ; ; GLOBAL(void) ; jpeg_h1v2_fancy_upsample_sse2 (j_decompress_ptr cinfo, ; jpeg_component_info * compptr, ; JSAMPARRAY input_data, ; JSAMPARRAY * output_data_ptr); ; %define cinfo(b) (b)+8 ; j_decompress_ptr cinfo %define compptr(b) (b)+12 ; jpeg_component_info * compptr %define input_data(b) (b)+16 ; JSAMPARRAY input_data %define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr %define gotptr ebp-SIZEOF_POINTER ; void * gotptr align 16 global EXTN(jpeg_h1v2_fancy_upsample_sse2) EXTN(jpeg_h1v2_fancy_upsample_sse2): push ebp mov ebp,esp pushpic eax ; make a room for GOT address push ebx ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi push edi get_GOT ebx ; get GOT address movpic POINTER [gotptr], ebx ; save GOT address mov eax, POINTER [compptr(ebp)] mov eax, JDIMENSION [jcompinfo_downsampled_width(eax)] ; colctr add eax, byte SIZEOF_XMMWORD-1 and eax, byte -SIZEOF_XMMWORD jz near .return mov ecx, POINTER [cinfo(ebp)] mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr test ecx,ecx jz near .return mov esi, JSAMPARRAY [input_data(ebp)] ; input_data mov edi, POINTER [output_data_ptr(ebp)] mov edi, JSAMPARRAY [edi] ; output_data alignx 16,7 .rowloop: push eax ; colctr push ecx push edi push esi mov ecx, JSAMPROW [esi-1*SIZEOF_JSAMPROW] ; inptr1(above) mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; inptr0 mov esi, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; inptr1(below) mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW] ; outptr0 mov edi, JSAMPROW [edi+1*SIZEOF_JSAMPROW] ; outptr1 pxor xmm0,xmm0 ; xmm0=(all 0's) alignx 16,7 .columnloop: movdqa xmm1, XMMWORD [ebx] ; xmm1=row[ 0]( 0 1 2 ... 13 14 15) movdqa xmm2, XMMWORD [ecx] ; xmm2=row[-1]( 0 1 2 ... 13 14 15) movdqa xmm3, XMMWORD [esi] ; xmm3=row[+1]( 0 1 2 ... 13 14 15) pushpic ebx movpic ebx, POINTER [gotptr] ; load GOT address movdqa xmm4,xmm1 punpcklbw xmm1,xmm0 ; xmm1=row[ 0]( 0 1 2 3 4 5 6 7) punpckhbw xmm4,xmm0 ; xmm4=row[ 0]( 8 9 10 11 12 13 14 15) movdqa xmm5,xmm2 punpcklbw xmm2,xmm0 ; xmm2=row[-1]( 0 1 2 3 4 5 6 7) punpckhbw xmm5,xmm0 ; xmm5=row[-1]( 8 9 10 11 12 13 14 15) movdqa xmm6,xmm3 punpcklbw xmm3,xmm0 ; xmm3=row[+1]( 0 1 2 3 4 5 6 7) punpckhbw xmm6,xmm0 ; xmm6=row[+1]( 8 9 10 11 12 13 14 15) pmullw xmm1,[GOTOFF(ebx,PW_THREE)] pmullw xmm4,[GOTOFF(ebx,PW_THREE)] paddw xmm2,[GOTOFF(ebx,PW_ONE)] paddw xmm5,[GOTOFF(ebx,PW_ONE)] paddw xmm3,[GOTOFF(ebx,PW_TWO)] paddw xmm6,[GOTOFF(ebx,PW_TWO)] paddw xmm2,xmm1 paddw xmm5,xmm4 psrlw xmm2,2 ; xmm2=Out0L=( 0 1 2 3 4 5 6 7) psrlw xmm5,2 ; xmm5=Out0H=( 8 9 10 11 12 13 14 15) paddw xmm3,xmm1 paddw xmm6,xmm4 psrlw xmm3,2 ; xmm3=Out1L=( 0 1 2 3 4 5 6 7) psrlw xmm6,2 ; xmm6=Out1H=( 8 9 10 11 12 13 14 15) packuswb xmm2,xmm5 ; xmm2=Out0=( 0 1 2 ... 13 14 15) packuswb xmm3,xmm6 ; xmm3=Out1=( 0 1 2 ... 13 14 15) movdqa XMMWORD [edx], xmm2 movdqa XMMWORD [edi], xmm3 poppic ebx add ecx, byte 1*SIZEOF_XMMWORD ; inptr1(above) add ebx, byte 1*SIZEOF_XMMWORD ; inptr0 add esi, byte 1*SIZEOF_XMMWORD ; inptr1(below) add edx, byte 1*SIZEOF_XMMWORD ; outptr0 add edi, byte 1*SIZEOF_XMMWORD ; outptr1 sub eax, byte SIZEOF_XMMWORD jnz near .columnloop pop esi pop edi pop ecx pop eax add esi, byte 1*SIZEOF_JSAMPROW ; input_data add edi, byte 2*SIZEOF_JSAMPROW ; output_data sub ecx, byte 2 ; rowctr jg near .rowloop .return: pop edi pop esi ; pop edx ; need not be preserved ; pop ecx ; need not be preserved pop ebx poppic eax ; remove gotptr pop ebp ret %endif ; UPSAMPLE_H1V2_SUPPORTED %endif ; JDSAMPLE_FANCY_SSE2_SUPPORTED %ifdef JDSAMPLE_SIMPLE_SSE2_SUPPORTED %ifndef JDSAMPLE_FANCY_SSE2_SUPPORTED ; -------------------------------------------------------------------------- SECTION SEG_TEXT BITS 32 %endif ; ; Fast processing for the common case of 2:1 horizontal and 1:1 vertical. ; It's still a box filter. ; ; GLOBAL(void) ; jpeg_h2v1_upsample_sse2 (j_decompress_ptr cinfo, ; jpeg_component_info * compptr, ; JSAMPARRAY input_data, ; JSAMPARRAY * output_data_ptr); ; %define cinfo(b) (b)+8 ; j_decompress_ptr cinfo %define compptr(b) (b)+12 ; jpeg_component_info * compptr %define input_data(b) (b)+16 ; JSAMPARRAY input_data %define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr align 16 global EXTN(jpeg_h2v1_upsample_sse2) EXTN(jpeg_h2v1_upsample_sse2): push ebp mov ebp,esp ; push ebx ; unused ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi push edi mov edx, POINTER [cinfo(ebp)] mov edx, JDIMENSION [jdstruct_output_width(edx)] add edx, byte (2*SIZEOF_XMMWORD)-1 and edx, byte -(2*SIZEOF_XMMWORD) jz short .return mov ecx, POINTER [cinfo(ebp)] mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr test ecx,ecx jz short .return mov esi, JSAMPARRAY [input_data(ebp)] ; input_data mov edi, POINTER [output_data_ptr(ebp)] mov edi, JSAMPARRAY [edi] ; output_data alignx 16,7 .rowloop: push edi push esi mov esi, JSAMPROW [esi] ; inptr mov edi, JSAMPROW [edi] ; outptr mov eax,edx ; colctr alignx 16,7 .columnloop: movdqa xmm0, XMMWORD [esi+0*SIZEOF_XMMWORD] movdqa xmm1,xmm0 punpcklbw xmm0,xmm0 punpckhbw xmm1,xmm1 movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm0 movdqa XMMWORD [edi+1*SIZEOF_XMMWORD], xmm1 sub eax, byte 2*SIZEOF_XMMWORD jz short .nextrow movdqa xmm2, XMMWORD [esi+1*SIZEOF_XMMWORD] movdqa xmm3,xmm2 punpcklbw xmm2,xmm2 punpckhbw xmm3,xmm3 movdqa XMMWORD [edi+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [edi+3*SIZEOF_XMMWORD], xmm3 sub eax, byte 2*SIZEOF_XMMWORD jz short .nextrow add esi, byte 2*SIZEOF_XMMWORD ; inptr add edi, byte 4*SIZEOF_XMMWORD ; outptr jmp short .columnloop alignx 16,7 .nextrow: pop esi pop edi add esi, byte SIZEOF_JSAMPROW ; input_data add edi, byte SIZEOF_JSAMPROW ; output_data dec ecx ; rowctr jg short .rowloop .return: pop edi pop esi ; pop edx ; need not be preserved ; pop ecx ; need not be preserved ; pop ebx ; unused pop ebp ret ; -------------------------------------------------------------------------- ; ; Fast processing for the common case of 2:1 horizontal and 2:1 vertical. ; It's still a box filter. ; ; GLOBAL(void) ; jpeg_h2v2_upsample_sse2 (j_decompress_ptr cinfo, ; jpeg_component_info * compptr, ; JSAMPARRAY input_data, ; JSAMPARRAY * output_data_ptr); ; %define cinfo(b) (b)+8 ; j_decompress_ptr cinfo %define compptr(b) (b)+12 ; jpeg_component_info * compptr %define input_data(b) (b)+16 ; JSAMPARRAY input_data %define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr align 16 global EXTN(jpeg_h2v2_upsample_sse2) EXTN(jpeg_h2v2_upsample_sse2): push ebp mov ebp,esp push ebx ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi push edi mov edx, POINTER [cinfo(ebp)] mov edx, JDIMENSION [jdstruct_output_width(edx)] add edx, byte (2*SIZEOF_XMMWORD)-1 and edx, byte -(2*SIZEOF_XMMWORD) jz near .return mov ecx, POINTER [cinfo(ebp)] mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr test ecx,ecx jz near .return mov esi, JSAMPARRAY [input_data(ebp)] ; input_data mov edi, POINTER [output_data_ptr(ebp)] mov edi, JSAMPARRAY [edi] ; output_data alignx 16,7 .rowloop: push edi push esi mov esi, JSAMPROW [esi] ; inptr mov ebx, JSAMPROW [edi+0*SIZEOF_JSAMPROW] ; outptr0 mov edi, JSAMPROW [edi+1*SIZEOF_JSAMPROW] ; outptr1 mov eax,edx ; colctr alignx 16,7 .columnloop: movdqa xmm0, XMMWORD [esi+0*SIZEOF_XMMWORD] movdqa xmm1,xmm0 punpcklbw xmm0,xmm0 punpckhbw xmm1,xmm1 movdqa XMMWORD [ebx+0*SIZEOF_XMMWORD], xmm0 movdqa XMMWORD [ebx+1*SIZEOF_XMMWORD], xmm1 movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm0 movdqa XMMWORD [edi+1*SIZEOF_XMMWORD], xmm1 sub eax, byte 2*SIZEOF_XMMWORD jz short .nextrow movdqa xmm2, XMMWORD [esi+1*SIZEOF_XMMWORD] movdqa xmm3,xmm2 punpcklbw xmm2,xmm2 punpckhbw xmm3,xmm3 movdqa XMMWORD [ebx+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [ebx+3*SIZEOF_XMMWORD], xmm3 movdqa XMMWORD [edi+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [edi+3*SIZEOF_XMMWORD], xmm3 sub eax, byte 2*SIZEOF_XMMWORD jz short .nextrow add esi, byte 2*SIZEOF_XMMWORD ; inptr add ebx, byte 4*SIZEOF_XMMWORD ; outptr0 add edi, byte 4*SIZEOF_XMMWORD ; outptr1 jmp short .columnloop alignx 16,7 .nextrow: pop esi pop edi add esi, byte 1*SIZEOF_JSAMPROW ; input_data add edi, byte 2*SIZEOF_JSAMPROW ; output_data sub ecx, byte 2 ; rowctr jg short .rowloop .return: pop edi pop esi ; pop edx ; need not be preserved ; pop ecx ; need not be preserved pop ebx pop ebp ret %endif ; JDSAMPLE_SIMPLE_SSE2_SUPPORTED
lc r4, 0x7fffffff lc r5, 0x00000000 ges r6, r4, r5 halt #@expected values #r4 = 0x7fffffff #r5 = 0x00000000 #r6 = 0x00000001 #pc = -2147483628 #e0 = 0 #e1 = 0 #e2 = 0 #e3 = 0
#ifdef SCIRUN4_CODE_TO_BE_ENABLED_LATER /* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2015 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /// @todo Documentation Core/Utils/Legacy/Dir.cc #include <Core/Utils/Legacy/Dir.h> #include <Core/Utils/Legacy/FileUtils.h> #include <Core/Exceptions/ErrnoException.h> #include <Core/Exceptions/InternalError.h> #include <sys/types.h> #include <sys/stat.h> #include <errno.h> #include <iostream> #ifndef _WIN32 #include <unistd.h> #include <dirent.h> #else typedef unsigned short mode_t; #endif #include <string.h> #include <stdio.h> #include <stdlib.h> using namespace SCIRun; Dir Dir::create(const std::string& name) { int code = MKDIR(name.c_str(), 0777); if(code != 0) { return (Dir("")); // throw ErrnoException("Dir::create (mkdir call)", errno, __FILE__, __LINE__); } return Dir(name); } Dir Dir::current_directory() { char *dirname = ::getcwd(0,0); std::string name = dirname; free(dirname); return Dir(name); } Dir::Dir() { } Dir::Dir(const std::string& name) : name_(name) { } Dir::Dir(const Dir& dir) : name_(dir.name_) { } Dir::~Dir() { } Dir& Dir::operator=(const Dir& copy) { name_ = copy.name_; return *this; } void Dir::remove(bool throwOnError) { // only removes empty dir int code = rmdir(name_.c_str()); if (code != 0) { ErrnoException exception("Dir::remove (rmdir call)", errno, __FILE__, __LINE__); if (throwOnError) throw exception; // else // cerr << "WARNING: " << exception.message() << endl; } return; } bool Dir::removeDir( const char * dirName ) { // Walk through the dir, delete files, find sub dirs, recurse, delete sub dirs, ... DIR *dir = opendir( dirName ); dirent * file = 0; if( dir == 0 ) { std::cout << "Error in Dir::removeDir():\n"; std::cout << " opendir failed for " << dirName << "\n"; std::cout << " - errno is " << errno << "\n"; return false; } file = readdir(dir); while( file ) { if (strcmp(file->d_name, ".") != 0 && strcmp(file->d_name, "..") !=0) { std::string fullpath = std::string(dirName) + "/" + file->d_name; struct stat buf; stat(file->d_name, &buf); mode_t &m = buf.st_mode; if(S_ISDIR(m)) { removeDir( fullpath.c_str() ); } else { int rc = ::remove( fullpath.c_str() ); if (rc != 0) { std::cout << "WARNING: remove() failed for '" << fullpath.c_str() << "'. Return code is: " << rc << ", errno: " << errno << ": " << strerror(errno) << "\n"; return false; } } } file = readdir(dir); } closedir(dir); int code = rmdir( dirName ); if (code != 0) { std::cerr << "Error, rmdir failed for '" << dirName << "'\n"; std::cerr << " errno is " << errno << "\n"; return false; } return true; } void Dir::forceRemove(bool throwOnError) { int code = deleteDir(name_); if (code != 0) { ErrnoException exception(std::string("Dir::remove failed to remove: ") + name_, errno, __FILE__, __LINE__); if (throwOnError) throw exception; else std::cerr << "WARNING: " << exception.message() << std::endl; } return; } void Dir::remove(const std::string& filename, bool throwOnError) { std::string filepath = name_ + "/" + filename; int code = deleteFile(filepath); if (code != 0) { ErrnoException exception(std::string("Dir::remove failed to remove: ") + filepath, errno, __FILE__, __LINE__); if (throwOnError) throw exception; else std::cerr << "WARNING: " << exception.message() << std::endl; } return; } Dir Dir::createSubdir(const std::string& sub) { return create(name_+"/"+sub); } Dir Dir::getSubdir(const std::string& sub) { // This should probably do more return Dir(name_+"/"+sub); } void Dir::copy(Dir& destDir) { int code = copyDir(name_, destDir.name_); if (code != 0) throw InternalError(std::string("Dir::copy failed to copy: ") + name_, __FILE__, __LINE__); return; } void Dir::move(Dir& destDir) { int code = moveFile(name_, destDir.name_); if (code != 0) throw InternalError(std::string("Dir::move failed to move: ") + name_, __FILE__, __LINE__); return; } void Dir::copy(const std::string& filename, Dir& destDir) { std::string filepath = name_ + "/" + filename; int code = copyFile(filepath, destDir.name_); if (code != 0) throw InternalError(std::string("Dir::copy failed to copy: ") + filepath, __FILE__, __LINE__); return; } void Dir::move(const std::string& filename, Dir& destDir) { std::string filepath = name_ + "/" + filename; int code =moveFile(filepath, destDir.name_); if (code != 0) throw InternalError(std::string("Dir::move failed to move: ") + filepath, __FILE__, __LINE__); return; } void Dir::getFilenamesBySuffix(const std::string& suffix, std::vector<std::string>& filenames) { DIR* dir = opendir(name_.c_str()); if (!dir) return; const char* ext = suffix.c_str(); for(dirent* file = readdir(dir); file != 0; file = readdir(dir)) { if ((strlen(file->d_name)>=strlen(ext)) && (strcmp(file->d_name+strlen(file->d_name)-strlen(ext),ext)==0)) { filenames.push_back(file->d_name); std::cout << " Found " << file->d_name << std::endl; } } } bool Dir::exists() { if (name_ == "/") return (true); struct stat buf; if(::stat(name_.c_str(),&buf) != 0) { return (false); } if (S_ISDIR(buf.st_mode)) return (true); return (false); } bool Dir::isfile() { if (name_ == "/") return (false); struct stat buf; if(::stat(name_.c_str(),&buf) != 0) { return (false); } if (S_ISDIR(buf.st_mode)) return (false); return (true); } #endif
; A207401: Number of n X 6 0..1 arrays avoiding 0 0 1 and 0 1 1 horizontally and 0 0 1 and 1 1 0 vertically. ; 16,256,1296,4356,11664,26896,55696,106276,190096,322624,524176,820836,1245456,1838736,2650384,3740356,5180176,7054336,9461776,12517444,16353936,21123216,26998416,34175716,42876304,53348416,65869456,80748196,98327056,118984464,143137296,171243396,203804176,241367296,284529424,333939076,390299536,454371856,526977936,609003684,701402256,805197376,921486736,1051445476,1196329744,1357480336,1536326416,1734389316,1953286416,2194735104,2460556816,2752681156,3073150096,3424122256,3807877264,4226820196 mov $1,4 add $1,$0 bin $1,3 sub $1,2 pow $1,2 sub $1,4 mul $1,4 add $1,16 mov $0,$1
; ; Z80 ANSI Library ; ;--------------------------------------------------- ; A different fputc_cons with ANSI support ; ; Stefano Bodrato - 21/4/2000 ; ; $Id: fputc_cons.asm,v 1.3 2015/01/19 01:33:18 pauloscustodio Exp $ ; PUBLIC fputc_cons EXTERN f_ansi ; ; Entry: hl = points to char ; .fputc_cons ld hl,2 add hl,sp ld de,1 ; one char buffer (!) jp f_ansi ret
#include "ZReflectedMFGrid.h" #include "MagneticField/VolumeGeometry/interface/MagExceptions.h" #include <iostream> using namespace std; ZReflectedMFGrid::ZReflectedMFGrid(const GloballyPositioned<float>& vol, MFGrid* sectorGrid) : MFGrid(vol), theSectorGrid(sectorGrid) {} ZReflectedMFGrid::~ZReflectedMFGrid() { delete theSectorGrid; } MFGrid::LocalVector ZReflectedMFGrid::valueInTesla(const LocalPoint& p) const { // Z reflection of point LocalPoint mirrorp(p.x(), p.y(), -p.z()); LocalVector mirrorB = theSectorGrid->valueInTesla(mirrorp); return LocalVector(-mirrorB.x(), -mirrorB.y(), mirrorB.z()); } void ZReflectedMFGrid::throwUp(const char* message) const { std::cout << "Throwing exception " << message << std::endl; throw MagGeometryError(message); } void ZReflectedMFGrid::toGridFrame(const LocalPoint& p, double& a, double& b, double& c) const { throwUp("Not implemented yet"); } MFGrid::LocalPoint ZReflectedMFGrid::fromGridFrame(double a, double b, double c) const { throwUp("Not implemented yet"); return LocalPoint(); } Dimensions ZReflectedMFGrid::dimensions() const { return theSectorGrid->dimensions(); } MFGrid::LocalPoint ZReflectedMFGrid::nodePosition(int i, int j, int k) const { throwUp("Not implemented yet"); return LocalPoint(); } MFGrid::LocalVector ZReflectedMFGrid::nodeValue(int i, int j, int k) const { throwUp("Not implemented yet"); return LocalVector(); }
/*ckwg +5 * Copyright 2013 by Kitware, Inc. All Rights Reserved. Please refer to * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. */ #include "vpFileEventIO.h" #include "vpFileEventIOImpl.h" #include "vpFileReader.h" //----------------------------------------------------------------------------- vpFileEventIO::vpFileEventIO(vpFileReader& reader, vtkVgEventModel* eventModel, vtkVgEventTypeRegistry* eventTypes) : vpEventIO(eventModel, eventTypes), Reader(reader) {} //----------------------------------------------------------------------------- bool vpFileEventIO::ReadEventLinks() { return vpFileEventIOImpl::ReadEventLinks(this, this->Reader.GetEventLinksFileName()); }
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: VObj (Sample PC GEOS application) FILE: vobjManager.asm REVISION HISTORY: Name Date Description ---- ---- ----------- MKH 7/7/93 Initial version DESCRIPTION: IMPORTANT: RCS STAMP: $Id: freecellManager.asm,v 1.1 97/04/04 15:02:52 newdeal Exp $ ------------------------------------------------------------------------------@ ;------------------------------------------------------------------------------ ; Include files ;------------------------------------------------------------------------------ include geos.def include heap.def include geode.def include resource.def include ec.def include object.def include graphics.def include freecellMacros.def include Objects/winC.def include Objects/inputC.def ; Required for mouse input ;------------------------------------------------------------------------------ ; Libraries used ;------------------------------------------------------------------------------ UseLib ui.def UseLib cards.def UseLib sound.def ; ; Include our definitions here so that we can use the classes in ui.def as ; our superclasses. ; include freecell.def ;----------------------------------------------------------------------------- ; idata declarations ;----------------------------------------------------------------------------- ; ; There must be an instance of every class in idata. idata segment FreeCellProcessClass ; mask CLASSF_NEVER_SAVED idata ends ;------------------------------------------------------------------------------ ; Resources ;------------------------------------------------------------------------------ include freecell.rdef ;include compiled UI definitions ;----------------------------------------------------------------------------- ; Include Class Implementations ;----------------------------------------------------------------------------- include freecell.asm include freecellGame.asm include freecellSound.asm
; A089181: (1,3) entry of powers of the orthogonal design shown in A090592. ; Submitted by Christian Krause ; 1,2,-3,-20,-19,102,337,-40,-2439,-4598,7877,47940,40741,-254098,-793383,191920,5937521,10531602,-20499443,-114720100,-85944099,631152502,1863913697,-690240120,-14427876119,-24024071398,52946990037,274062479860,177496029461,-1563445300098,-4369362806423,2205391487840,34996322620641,54554904826402,-135864448691683,-653613231168180,-356175321494579,3862941975188102,10219111200838257,-6602371424640200,-84738521255148199,-123260442537814998,346648763710407397,1556120625185519780,685699904398187781 mul $0,2 mov $1,1 lpb $0 sub $0,2 sub $1,$2 add $2,$1 add $1,$2 mul $2,7 lpe mov $0,$1
dnl AMD K7 mpn_sqr_basecase -- square an mpn number. dnl Copyright 1999-2002 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of either: dnl dnl * the GNU Lesser General Public License as published by the Free dnl Software Foundation; either version 3 of the License, or (at your dnl option) any later version. dnl dnl or dnl dnl * the GNU General Public License as published by the Free Software dnl Foundation; either version 2 of the License, or (at your option) any dnl later version. dnl dnl or both in parallel, as here. dnl dnl The GNU MP Library is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License dnl for more details. dnl dnl You should have received copies of the GNU General Public License and the dnl GNU Lesser General Public License along with the GNU MP Library. If not, dnl see https://www.gnu.org/licenses/. include(`../config.m4') C K7: approx 2.3 cycles/crossproduct, or 4.55 cycles/triangular product C (measured on the speed difference between 25 and 50 limbs, which is C roughly the Karatsuba recursing range). dnl These are the same as mpn/x86/k6/sqr_basecase.asm, see that code for dnl some comments. deflit(SQR_TOOM2_THRESHOLD_MAX, 66) ifdef(`SQR_TOOM2_THRESHOLD_OVERRIDE', `define(`SQR_TOOM2_THRESHOLD',SQR_TOOM2_THRESHOLD_OVERRIDE)') m4_config_gmp_mparam(`SQR_TOOM2_THRESHOLD') deflit(UNROLL_COUNT, eval(SQR_TOOM2_THRESHOLD-3)) C void mpn_sqr_basecase (mp_ptr dst, mp_srcptr src, mp_size_t size); C C With a SQR_TOOM2_THRESHOLD around 50 this code is about 1500 bytes, C which is quite a bit, but is considered good value since squares big C enough to use most of the code will be spending quite a few cycles in it. defframe(PARAM_SIZE,12) defframe(PARAM_SRC, 8) defframe(PARAM_DST, 4) TEXT ALIGN(32) PROLOGUE(mpn_sqr_basecase) deflit(`FRAME',0) movl PARAM_SIZE, %ecx movl PARAM_SRC, %eax cmpl $2, %ecx movl PARAM_DST, %edx je L(two_limbs) ja L(three_or_more) C------------------------------------------------------------------------------ C one limb only C eax src C ecx size C edx dst movl (%eax), %eax movl %edx, %ecx mull %eax movl %edx, 4(%ecx) movl %eax, (%ecx) ret C------------------------------------------------------------------------------ C C Using the read/modify/write "add"s seems to be faster than saving and C restoring registers. Perhaps the loads for the first set hide under the C mul latency and the second gets store to load forwarding. ALIGN(16) L(two_limbs): C eax src C ebx C ecx size C edx dst deflit(`FRAME',0) pushl %ebx FRAME_pushl() movl %eax, %ebx C src movl (%eax), %eax movl %edx, %ecx C dst mull %eax C src[0]^2 movl %eax, (%ecx) C dst[0] movl 4(%ebx), %eax movl %edx, 4(%ecx) C dst[1] mull %eax C src[1]^2 movl %eax, 8(%ecx) C dst[2] movl (%ebx), %eax movl %edx, 12(%ecx) C dst[3] mull 4(%ebx) C src[0]*src[1] popl %ebx addl %eax, 4(%ecx) adcl %edx, 8(%ecx) adcl $0, 12(%ecx) ASSERT(nc) addl %eax, 4(%ecx) adcl %edx, 8(%ecx) adcl $0, 12(%ecx) ASSERT(nc) ret C------------------------------------------------------------------------------ defframe(SAVE_EBX, -4) defframe(SAVE_ESI, -8) defframe(SAVE_EDI, -12) defframe(SAVE_EBP, -16) deflit(STACK_SPACE, 16) L(three_or_more): subl $STACK_SPACE, %esp cmpl $4, %ecx jae L(four_or_more) deflit(`FRAME',STACK_SPACE) C------------------------------------------------------------------------------ C Three limbs C C Writing out the loads and stores separately at the end of this code comes C out about 10 cycles faster than using adcls to memory. C eax src C ecx size C edx dst movl %ebx, SAVE_EBX movl %eax, %ebx C src movl (%eax), %eax movl %edx, %ecx C dst movl %esi, SAVE_ESI movl %edi, SAVE_EDI mull %eax C src[0] ^ 2 movl %eax, (%ecx) movl 4(%ebx), %eax movl %edx, 4(%ecx) mull %eax C src[1] ^ 2 movl %eax, 8(%ecx) movl 8(%ebx), %eax movl %edx, 12(%ecx) mull %eax C src[2] ^ 2 movl %eax, 16(%ecx) movl (%ebx), %eax movl %edx, 20(%ecx) mull 4(%ebx) C src[0] * src[1] movl %eax, %esi movl (%ebx), %eax movl %edx, %edi mull 8(%ebx) C src[0] * src[2] addl %eax, %edi movl %ebp, SAVE_EBP movl $0, %ebp movl 4(%ebx), %eax adcl %edx, %ebp mull 8(%ebx) C src[1] * src[2] xorl %ebx, %ebx addl %eax, %ebp adcl $0, %edx C eax C ebx zero, will be dst[5] C ecx dst C edx dst[4] C esi dst[1] C edi dst[2] C ebp dst[3] adcl $0, %edx addl %esi, %esi adcl %edi, %edi movl 4(%ecx), %eax adcl %ebp, %ebp adcl %edx, %edx adcl $0, %ebx addl %eax, %esi movl 8(%ecx), %eax adcl %eax, %edi movl 12(%ecx), %eax movl %esi, 4(%ecx) adcl %eax, %ebp movl 16(%ecx), %eax movl %edi, 8(%ecx) movl SAVE_ESI, %esi movl SAVE_EDI, %edi adcl %eax, %edx movl 20(%ecx), %eax movl %ebp, 12(%ecx) adcl %ebx, %eax ASSERT(nc) movl SAVE_EBX, %ebx movl SAVE_EBP, %ebp movl %edx, 16(%ecx) movl %eax, 20(%ecx) addl $FRAME, %esp ret C------------------------------------------------------------------------------ L(four_or_more): C First multiply src[0]*src[1..size-1] and store at dst[1..size]. C Further products are added in rather than stored. C eax src C ebx C ecx size C edx dst C esi C edi C ebp defframe(`VAR_COUNTER',-20) defframe(`VAR_JMP', -24) deflit(EXTRA_STACK_SPACE, 8) movl %ebx, SAVE_EBX movl %edi, SAVE_EDI leal (%edx,%ecx,4), %edi C &dst[size] movl %esi, SAVE_ESI movl %ebp, SAVE_EBP leal (%eax,%ecx,4), %esi C &src[size] movl (%eax), %ebp C multiplier movl $0, %ebx decl %ecx negl %ecx subl $EXTRA_STACK_SPACE, %esp FRAME_subl_esp(EXTRA_STACK_SPACE) L(mul_1): C eax scratch C ebx carry C ecx counter C edx scratch C esi &src[size] C edi &dst[size] C ebp multiplier movl (%esi,%ecx,4), %eax mull %ebp addl %ebx, %eax movl %eax, (%edi,%ecx,4) movl $0, %ebx adcl %edx, %ebx incl %ecx jnz L(mul_1) C Add products src[n]*src[n+1..size-1] at dst[2*n-1...], for each n=1..size-2. C C The last two products, which are the bottom right corner of the product C triangle, are left to the end. These are src[size-3]*src[size-2,size-1] C and src[size-2]*src[size-1]. If size is 4 then it's only these corner C cases that need to be done. C C The unrolled code is the same as in mpn_addmul_1, see that routine for C some comments. C C VAR_COUNTER is the outer loop, running from -size+4 to -1, inclusive. C C VAR_JMP is the computed jump into the unrolled code, stepped by one code C chunk each outer loop. C C K7 does branch prediction on indirect jumps, which is bad since it's a C different target each time. There seems no way to avoid this. dnl This value also hard coded in some shifts and adds deflit(CODE_BYTES_PER_LIMB, 17) dnl With the unmodified &src[size] and &dst[size] pointers, the dnl displacements in the unrolled code fit in a byte for UNROLL_COUNT dnl values up to 31, but above that an offset must be added to them. deflit(OFFSET, ifelse(eval(UNROLL_COUNT>31),1, eval((UNROLL_COUNT-31)*4), 0)) dnl Because the last chunk of code is generated differently, a label placed dnl at the end doesn't work. Instead calculate the implied end using the dnl start and how many chunks of code there are. deflit(UNROLL_INNER_END, `L(unroll_inner_start)+eval(UNROLL_COUNT*CODE_BYTES_PER_LIMB)') C eax C ebx carry C ecx C edx C esi &src[size] C edi &dst[size] C ebp movl PARAM_SIZE, %ecx movl %ebx, (%edi) subl $4, %ecx jz L(corner) negl %ecx ifelse(OFFSET,0,,`subl $OFFSET, %edi') ifelse(OFFSET,0,,`subl $OFFSET, %esi') movl %ecx, %edx shll $4, %ecx ifdef(`PIC',` call L(pic_calc) L(here): ',` leal UNROLL_INNER_END-eval(2*CODE_BYTES_PER_LIMB)(%ecx,%edx), %ecx ') C The calculated jump mustn't come out to before the start of the C code available. This is the limit UNROLL_COUNT puts on the src C operand size, but checked here directly using the jump address. ASSERT(ae, `movl_text_address(L(unroll_inner_start), %eax) cmpl %eax, %ecx') C------------------------------------------------------------------------------ ALIGN(16) L(unroll_outer_top): C eax C ebx high limb to store C ecx VAR_JMP C edx VAR_COUNTER, limbs, negative C esi &src[size], constant C edi dst ptr, high of last addmul C ebp movl -12+OFFSET(%esi,%edx,4), %ebp C next multiplier movl -8+OFFSET(%esi,%edx,4), %eax C first of multiplicand movl %edx, VAR_COUNTER mull %ebp define(cmovX,`ifelse(eval(UNROLL_COUNT%2),0,`cmovz($@)',`cmovnz($@)')') testb $1, %cl movl %edx, %ebx C high carry movl %ecx, %edx C jump movl %eax, %ecx C low carry cmovX( %ebx, %ecx) C high carry reverse cmovX( %eax, %ebx) C low carry reverse leal CODE_BYTES_PER_LIMB(%edx), %eax xorl %edx, %edx leal 4(%edi), %edi movl %eax, VAR_JMP jmp *%eax ifdef(`PIC',` L(pic_calc): addl (%esp), %ecx addl $UNROLL_INNER_END-eval(2*CODE_BYTES_PER_LIMB)-L(here), %ecx addl %edx, %ecx ret_internal ') C Must be an even address to preserve the significance of the low C bit of the jump address indicating which way around ecx/ebx should C start. ALIGN(2) L(unroll_inner_start): C eax next limb C ebx carry high C ecx carry low C edx scratch C esi src C edi dst C ebp multiplier forloop(`i', UNROLL_COUNT, 1, ` deflit(`disp_src', eval(-i*4 + OFFSET)) deflit(`disp_dst', eval(disp_src - 4)) m4_assert(`disp_src>=-128 && disp_src<128') m4_assert(`disp_dst>=-128 && disp_dst<128') ifelse(eval(i%2),0,` Zdisp( movl, disp_src,(%esi), %eax) adcl %edx, %ebx mull %ebp Zdisp( addl, %ecx, disp_dst,(%edi)) movl $0, %ecx adcl %eax, %ebx ',` dnl this bit comes out last Zdisp( movl, disp_src,(%esi), %eax) adcl %edx, %ecx mull %ebp Zdisp( addl, %ebx, disp_dst,(%edi)) ifelse(forloop_last,0, ` movl $0, %ebx') adcl %eax, %ecx ') ') C eax next limb C ebx carry high C ecx carry low C edx scratch C esi src C edi dst C ebp multiplier adcl $0, %edx addl %ecx, -4+OFFSET(%edi) movl VAR_JMP, %ecx adcl $0, %edx movl %edx, m4_empty_if_zero(OFFSET) (%edi) movl VAR_COUNTER, %edx incl %edx jnz L(unroll_outer_top) ifelse(OFFSET,0,,` addl $OFFSET, %esi addl $OFFSET, %edi ') C------------------------------------------------------------------------------ L(corner): C esi &src[size] C edi &dst[2*size-5] movl -12(%esi), %ebp movl -8(%esi), %eax movl %eax, %ecx mull %ebp addl %eax, -4(%edi) movl -4(%esi), %eax adcl $0, %edx movl %edx, %ebx movl %eax, %esi mull %ebp addl %ebx, %eax adcl $0, %edx addl %eax, (%edi) movl %esi, %eax adcl $0, %edx movl %edx, %ebx mull %ecx addl %ebx, %eax movl %eax, 4(%edi) adcl $0, %edx movl %edx, 8(%edi) C Left shift of dst[1..2*size-2], high bit shifted out becomes dst[2*size-1]. L(lshift_start): movl PARAM_SIZE, %eax movl PARAM_DST, %edi xorl %ecx, %ecx C clear carry leal (%edi,%eax,8), %edi notl %eax C -size-1, preserve carry leal 2(%eax), %eax C -(size-1) L(lshift): C eax counter, negative C ebx C ecx C edx C esi C edi dst, pointing just after last limb C ebp rcll -4(%edi,%eax,8) rcll (%edi,%eax,8) incl %eax jnz L(lshift) setc %al movl PARAM_SRC, %esi movl %eax, -4(%edi) C dst most significant limb movl PARAM_SIZE, %ecx C Now add in the squares on the diagonal, src[0]^2, src[1]^2, ..., C src[size-1]^2. dst[0] hasn't yet been set at all yet, and just gets the C low limb of src[0]^2. movl (%esi), %eax C src[0] mull %eax leal (%esi,%ecx,4), %esi C src point just after last limb negl %ecx movl %eax, (%edi,%ecx,8) C dst[0] incl %ecx L(diag): C eax scratch C ebx scratch C ecx counter, negative C edx carry C esi src just after last limb C edi dst just after last limb C ebp movl (%esi,%ecx,4), %eax movl %edx, %ebx mull %eax addl %ebx, -4(%edi,%ecx,8) adcl %eax, (%edi,%ecx,8) adcl $0, %edx incl %ecx jnz L(diag) movl SAVE_ESI, %esi movl SAVE_EBX, %ebx addl %edx, -4(%edi) C dst most significant limb movl SAVE_EDI, %edi movl SAVE_EBP, %ebp addl $FRAME, %esp ret EPILOGUE()
; A059591: Squarefree part of n^2+1. ; 1,2,5,10,17,26,37,2,65,82,101,122,145,170,197,226,257,290,13,362,401,442,485,530,577,626,677,730,785,842,901,962,41,1090,1157,1226,1297,1370,5,1522,1601,2,1765,74,1937,2026,2117,2210,2305,2402,2501,2602,2705,2810,2917,3026,3137,130,3365,3482,3601,3722,3845,3970,4097,4226,4357,4490,185,4762,29,5042,5185,5330,5477,5626,5777,5930,6085,6242,6401,6562,269,6890,7057,7226,7397,7570,7745,7922,8101,8282,8465,346,8837,9026,9217,9410,9605,58,10001,10202,10405,10610,10817,11026,11237,458,11665,11882,12101,12322,12545,12770,12997,13226,13457,10,557,14162,14401,14642,14885,15130,15377,15626,15877,16130,16385,16642,16901,17162,697,17690,17957,18226,18497,18770,19045,19322,19601,19882,20165,818,20737,21026,21317,21610,21905,22202,22501,22802,23105,23410,23717,24026,24337,986,24965,25282,25601,25922,26245,26570,26897,27226,27557,27890,1129,28562,28901,29242,29585,29930,30277,30626,30977,31330,31685,32042,32401,32762,53,33490,33857,34226,34597,34970,35345,35722,36101,36482,36865,1490,37637,38026,38417,38810,39205,39602,40001,40402,40805,41210,41617,42026,42437,1714,43265,43682,44101,44522,44945,45370,45797,46226,46657,47090,1901,47962,48401,48842,49285,49730,50177,50626,51077,51530,51985,52442,52901,53362,2153,54290,54757,55226,55697,56170,56645,2,57601,58082,58565,2362,59537,60026,60517,61010,61505,62002 pow $0,2 cal $0,7913 ; Squarefree part of n: a(n) is the smallest positive number m such that n/m is a square. mov $1,$0
; ; Copyright (c) 2010 The WebM project authors. All Rights Reserved. ; ; Use of this source code is governed by a BSD-style license ; that can be found in the LICENSE file in the root of the source ; tree. An additional intellectual property rights grant can be found ; in the file PATENTS. All contributing project authors may ; be found in the AUTHORS file in the root of the source tree. ; %include "vpx_ports/x86_abi_support.asm" ;void vp8_short_inv_walsh4x4_mmx(short *input, short *output) global sym(vp8_short_inv_walsh4x4_mmx) PRIVATE sym(vp8_short_inv_walsh4x4_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 2 ; end prolog mov rdx, arg(0) mov rax, 30003h movq mm0, [rdx + 0] ;ip[0] movq mm1, [rdx + 8] ;ip[4] movd mm7, rax movq mm2, [rdx + 16] ;ip[8] movq mm3, [rdx + 24] ;ip[12] punpcklwd mm7, mm7 ;0003000300030003h mov rdx, arg(1) movq mm4, mm0 movq mm5, mm1 paddw mm4, mm3 ;ip[0] + ip[12] aka al paddw mm5, mm2 ;ip[4] + ip[8] aka bl movq mm6, mm4 ;temp al paddw mm4, mm5 ;al + bl psubw mm6, mm5 ;al - bl psubw mm0, mm3 ;ip[0] - ip[12] aka d1 psubw mm1, mm2 ;ip[4] - ip[8] aka c1 movq mm5, mm0 ;temp dl paddw mm0, mm1 ;dl + cl psubw mm5, mm1 ;dl - cl ; 03 02 01 00 ; 13 12 11 10 ; 23 22 21 20 ; 33 32 31 30 movq mm3, mm4 ; 03 02 01 00 punpcklwd mm4, mm0 ; 11 01 10 00 punpckhwd mm3, mm0 ; 13 03 12 02 movq mm1, mm6 ; 23 22 21 20 punpcklwd mm6, mm5 ; 31 21 30 20 punpckhwd mm1, mm5 ; 33 23 32 22 movq mm0, mm4 ; 11 01 10 00 movq mm2, mm3 ; 13 03 12 02 punpckldq mm0, mm6 ; 30 20 10 00 aka ip[0] punpckhdq mm4, mm6 ; 31 21 11 01 aka ip[4] punpckldq mm2, mm1 ; 32 22 12 02 aka ip[8] punpckhdq mm3, mm1 ; 33 23 13 03 aka ip[12] ;~~~~~~~~~~~~~~~~~~~~~ movq mm1, mm0 movq mm5, mm4 paddw mm1, mm3 ;ip[0] + ip[12] aka al paddw mm5, mm2 ;ip[4] + ip[8] aka bl movq mm6, mm1 ;temp al paddw mm1, mm5 ;al + bl psubw mm6, mm5 ;al - bl paddw mm1, mm7 paddw mm6, mm7 psraw mm1, 3 psraw mm6, 3 psubw mm0, mm3 ;ip[0] - ip[12] aka d1 psubw mm4, mm2 ;ip[4] - ip[8] aka c1 movq mm5, mm0 ;temp dl paddw mm0, mm4 ;dl + cl psubw mm5, mm4 ;dl - cl paddw mm0, mm7 paddw mm5, mm7 psraw mm0, 3 psraw mm5, 3 ;~~~~~~~~~~~~~~~~~~~~~ movd eax, mm1 movd ecx, mm0 psrlq mm0, 32 psrlq mm1, 32 mov word ptr[rdx+32*0], ax mov word ptr[rdx+32*1], cx shr eax, 16 shr ecx, 16 mov word ptr[rdx+32*4], ax mov word ptr[rdx+32*5], cx movd eax, mm1 movd ecx, mm0 mov word ptr[rdx+32*8], ax mov word ptr[rdx+32*9], cx shr eax, 16 shr ecx, 16 mov word ptr[rdx+32*12], ax mov word ptr[rdx+32*13], cx movd eax, mm6 movd ecx, mm5 psrlq mm5, 32 psrlq mm6, 32 mov word ptr[rdx+32*2], ax mov word ptr[rdx+32*3], cx shr eax, 16 shr ecx, 16 mov word ptr[rdx+32*6], ax mov word ptr[rdx+32*7], cx movd eax, mm6 movd ecx, mm5 mov word ptr[rdx+32*10], ax mov word ptr[rdx+32*11], cx shr eax, 16 shr ecx, 16 mov word ptr[rdx+32*14], ax mov word ptr[rdx+32*15], cx ; begin epilog UNSHADOW_ARGS pop rbp ret
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r8 push %rax push %rcx push %rdi push %rsi lea addresses_A_ht+0x12e94, %rsi nop nop nop nop xor %rax, %rax mov (%rsi), %r12d nop nop nop nop nop cmp $60192, %rcx lea addresses_normal_ht+0x11f74, %rsi lea addresses_D_ht+0x4694, %rdi clflush (%rdi) nop nop nop nop and %r11, %r11 mov $96, %rcx rep movsq nop nop nop nop nop sub %r11, %r11 lea addresses_WT_ht+0xe49, %r12 nop nop nop nop inc %rax movw $0x6162, (%r12) nop nop add %rcx, %rcx lea addresses_WT_ht+0x1adcc, %rsi lea addresses_UC_ht+0x8f74, %rdi add %r11, %r11 mov $101, %rcx rep movsq cmp $9883, %r12 lea addresses_normal_ht+0xaa74, %r11 nop nop nop nop sub %r8, %r8 movl $0x61626364, (%r11) nop nop nop nop mfence lea addresses_A_ht+0x1d774, %rax add %r11, %r11 movl $0x61626364, (%rax) nop nop inc %r12 lea addresses_WT_ht+0x1ab74, %r11 nop inc %r8 mov $0x6162636465666768, %r12 movq %r12, %xmm1 vmovups %ymm1, (%r11) nop and %rax, %rax lea addresses_UC_ht+0x8318, %rsi nop nop cmp %r11, %r11 mov $0x6162636465666768, %rcx movq %rcx, %xmm5 movups %xmm5, (%rsi) and $41673, %r12 lea addresses_A_ht+0x17104, %r11 nop dec %r8 and $0xffffffffffffffc0, %r11 vmovaps (%r11), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $0, %xmm1, %rcx nop nop nop and $7768, %rcx pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r9 push %rbp push %rdx push %rsi // Store lea addresses_WC+0x18474, %r10 nop nop nop inc %r11 mov $0x5152535455565758, %rdx movq %rdx, (%r10) nop nop nop nop nop sub $14326, %r10 // Store lea addresses_UC+0xbd04, %r13 nop nop nop and $10862, %rbp movw $0x5152, (%r13) nop nop nop cmp %r10, %r10 // Store mov $0x7af38b0000000374, %rdx nop nop nop nop nop sub $38437, %r13 mov $0x5152535455565758, %r10 movq %r10, (%rdx) cmp %rsi, %rsi // Faulty Load lea addresses_normal+0x13b74, %r10 nop nop nop nop nop dec %rsi vmovups (%r10), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $1, %xmm7, %rbp lea oracles, %r13 and $0xff, %rbp shlq $12, %rbp mov (%r13,%rbp,1), %rbp pop %rsi pop %rdx pop %rbp pop %r9 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': True, 'size': 8, 'NT': True, 'same': False, 'congruent': 8}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 4}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 10}} [Faulty Load] {'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}} {'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4, 'NT': True, 'same': False, 'congruent': 8}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 10}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 7}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}} {'src': {'type': 'addresses_A_ht', 'AVXalign': True, 'size': 32, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'} {'34': 1} 34 */
frame 1, 07 frame 2, 12 setrepeat 2 frame 0, 05 frame 3, 05 dorepeat 3 endanim
; A073578: a(n) = Sum_{k=1..n} mu(2*k). ; -1,-1,0,0,1,1,2,2,2,2,3,3,4,4,3,3,4,4,5,5,4,4,5,5,5,5,5,5,6,6,7,7,6,6,5,5,6,6,5,5,6,6,7,7,7,7,8,8,8,8,7,7,8,8,7,7,6,6,7,7,8,8,8,8,7,7,8,8,7,7,8,8,9,9,9,9,8,8,9,9,9,9,10,10,9,9,8,8,9,9,8,8,7,7,6,6,7,7,7,7 lpb $0 mov $2,$0 sub $0,1 seq $2,99991 ; a(n) = Moebius(2n). add $1,$2 lpe sub $1,1 mov $0,$1
/****************************************************************************** File: Alloc.cpp Description: Object Memory management allocation/coping routines ******************************************************************************/ #include "Ist.h" #pragma code_seg(MEM_SEG) #include "ObjMem.h" #include "ObjMemPriv.inl" #include "Interprt.h" #ifdef DOWNLOADABLE #include "downloadableresource.h" #else #include "rc_vm.h" #endif #ifdef MEMSTATS extern size_t m_nLargeAllocated; extern size_t m_nSmallAllocated; #endif // Smalltalk classes #include "STVirtualObject.h" #include "STByteArray.h" // No auto-inlining in this module please #pragma auto_inline(off) ObjectMemory::FixedSizePool ObjectMemory::m_pools[MaxPools]; ObjectMemory::FixedSizePool::Link* ObjectMemory::FixedSizePool::m_pFreePages; void** ObjectMemory::FixedSizePool::m_pAllocations; size_t ObjectMemory::FixedSizePool::m_nAllocations; /////////////////////////////////////////////////////////////////////////////// // Public object allocation routines // Rarely used, so don't inline it POBJECT ObjectMemory::allocLargeObject(size_t objectSize, OTE*& ote) { #ifdef MEMSTATS ++m_nLargeAllocated; #endif POBJECT pObj = static_cast<POBJECT>(allocChunk(_ROUND2(objectSize, sizeof(Oop)))); // allocateOop expects crit section to be used ote = allocateOop(pObj); ote->setSize(objectSize); ote->m_flags.m_space = static_cast<space_t>(Spaces::Normal); return pObj; } inline POBJECT ObjectMemory::allocObject(size_t objectSize, OTE*& ote) { // Callers are expected to round requests to Oop granularity if (objectSize > MaxSmallObjectSize) return allocLargeObject(objectSize, ote); // Smallblock heap already has space for object size at start of obj which includes // heap overhead,etc, and is rounded to a paragraph size // Why not alloc. four bytes less, overwrite this size with our object size, and then // move back the object body pointer by four. On delete need to reapply the object // size back into the object? - No wouldn't work because of the way heap accesses // adjoining objects when freeing! POBJECT pObj = static_cast<POBJECT>(allocSmallChunk(objectSize)); ote = allocateOop(pObj); ote->setSize(objectSize); ASSERT(ote->heapSpace() == Spaces::Pools); return pObj; } /////////////////////////////////////////////////////////////////////////////// // Object copying (mostly allocation) PointersOTE* __fastcall ObjectMemory::shallowCopy(PointersOTE* ote) { ASSERT(!ote->isBytes()); // A pointer object is a bit more tricky to copy (but not much) VariantObject* obj = ote->m_location; BehaviorOTE* classPointer = ote->m_oteClass; PointersOTE* copyPointer; size_t size; if (ote->heapSpace() == Spaces::Virtual) { Interpreter::resizeActiveProcess(); size = ote->pointersSize(); VirtualObject* pVObj = reinterpret_cast<VirtualObject*>(obj); VirtualObjectHeader* pBase = pVObj->getHeader(); size_t maxByteSize = pBase->getMaxAllocation(); size_t currentTotalByteSize = pBase->getCurrentAllocation(); VirtualOTE* virtualCopy = ObjectMemory::newVirtualObject(classPointer, currentTotalByteSize / sizeof(Oop), maxByteSize / sizeof(Oop)); if (!virtualCopy) return nullptr; pVObj = virtualCopy->m_location; pBase = pVObj->getHeader(); ASSERT(pBase->getMaxAllocation() == maxByteSize); ASSERT(pBase->getCurrentAllocation() == currentTotalByteSize); virtualCopy->setSize(ote->getSize()); copyPointer = reinterpret_cast<PointersOTE*>(virtualCopy); } else { size = ote->pointersSize(); copyPointer = newPointerObject(classPointer, size); } // Now copy over all the fields VariantObject* copy = copyPointer->m_location; ASSERT(copyPointer->pointersSize() == size); for (auto i = 0u; i<size; i++) { copy->m_fields[i] = obj->m_fields[i]; countUp(obj->m_fields[i]); } return copyPointer; } Oop* __fastcall Interpreter::primitiveShallowCopy(Oop* const sp, primargcount_t) { OTE* receiver = reinterpret_cast<OTE*>(*sp); ASSERT(!isIntegerObject(receiver)); OTE* copy = receiver->m_flags.m_pointer ? (OTE*)ObjectMemory::shallowCopy(reinterpret_cast<PointersOTE*>(receiver)) : (OTE*)ObjectMemory::shallowCopy(reinterpret_cast<BytesOTE*>(receiver)); *sp = (Oop)copy; ObjectMemory::AddToZct(copy); return sp; } /////////////////////////////////////////////////////////////////////////////// // Public object Instantiation (see also Objmem.h) // // These methods return Oops rather than OTE*'s because we want the type to be // opaque to external users, and to be interchangeable with uinptr_ts. // Oop* __fastcall Interpreter::primitiveNewFromStack(Oop* const stackPointer, primargcount_t) { BehaviorOTE* oteClass = reinterpret_cast<BehaviorOTE*>(*(stackPointer - 1)); Oop oopArg = (*stackPointer); SmallInteger count; if (isIntegerObject(oopArg) && (count = ObjectMemoryIntegerValueOf(oopArg)) >= 0) { // Note that instantiateClassWithPointers counts up the class, PointersOTE* oteObj = ObjectMemory::newUninitializedPointerObject(oteClass, count); VariantObject* obj = oteObj->m_location; Oop* sp = stackPointer; sp = sp - count - 1; while (--count >= 0) { oopArg = *(sp + count); ObjectMemory::countUp(oopArg); obj->m_fields[count] = oopArg; } // Save down SP in case ZCT is reconciled on adding result m_registers.m_stackPointer = sp; *sp = reinterpret_cast<Oop>(oteObj); ObjectMemory::AddToZct((OTE*)oteObj); return sp; } else { return primitiveFailure(_PrimitiveFailureCode::InvalidParameter1); } } Oop* __fastcall Interpreter::primitiveNewInitializedObject(Oop* sp, primargcount_t argCount) { Oop oopReceiver = *(sp - argCount); BehaviorOTE* oteClass = reinterpret_cast<BehaviorOTE*>(oopReceiver); InstanceSpecification instSpec = oteClass->m_location->m_instanceSpec; if ((instSpec.m_value & (InstanceSpecification::PointersMask | InstanceSpecification::NonInstantiableMask)) == InstanceSpecification::PointersMask) { size_t minSize = instSpec.m_fixedFields; size_t i; if (instSpec.m_indexable) { i = max(minSize, argCount); } else { if (argCount > minSize) { // Not indexable, and too many fields return primitiveFailure(_PrimitiveFailureCode::WrongNumberOfArgs); } i = minSize; } // Note that instantiateClassWithPointers counts up the class, PointersOTE* oteObj = ObjectMemory::newUninitializedPointerObject(oteClass, i); VariantObject* obj = oteObj->m_location; // nil out any extra fields const Oop nil = reinterpret_cast<Oop>(Pointers.Nil); while (i > argCount) { obj->m_fields[--i] = nil; } while (i != 0) { i--; Oop oopArg = *sp--; ObjectMemory::countUp(oopArg); obj->m_fields[i] = oopArg; } // Save down SP in case ZCT is reconciled on adding result, allowing unref'd args to be reclaimed m_registers.m_stackPointer = sp; *sp = reinterpret_cast<Oop>(oteObj); ObjectMemory::AddToZct((OTE*)oteObj); return sp; } else { return primitiveFailure(instSpec.m_nonInstantiable ? _PrimitiveFailureCode::NonInstantiable : _PrimitiveFailureCode::ObjectTypeMismatch); } } Oop* __fastcall Interpreter::primitiveNew(Oop* const sp, primargcount_t) { // This form of C code results in something very close to the hand-coded assembler original for primitiveNew BehaviorOTE* oteClass = reinterpret_cast<BehaviorOTE*>(*sp); InstanceSpecification instSpec = oteClass->m_location->m_instanceSpec; if (!(instSpec.m_indexable || instSpec.m_nonInstantiable)) { PointersOTE* newObj = ObjectMemory::newPointerObject(oteClass, instSpec.m_fixedFields); *sp = reinterpret_cast<Oop>(newObj); ObjectMemory::AddToZct((OTE*)newObj); return sp; } else { return primitiveFailure(instSpec.m_nonInstantiable ? _PrimitiveFailureCode::NonInstantiable : _PrimitiveFailureCode::ObjectTypeMismatch); } } Oop* __fastcall Interpreter::primitiveNewWithArg(Oop* const sp, primargcount_t) { BehaviorOTE* oteClass = reinterpret_cast<BehaviorOTE*>(*(sp - 1)); Oop oopArg = (*sp); // Unfortunately the compiler can't be persuaded to perform this using just the sar and conditional jumps on no-carry and signed; // it generates both the bit test and the shift. SmallInteger size; if (isIntegerObject(oopArg) && (size = ObjectMemoryIntegerValueOf(oopArg)) >= 0) { InstanceSpecification instSpec = oteClass->m_location->m_instanceSpec; if ((instSpec.m_value & (InstanceSpecification::IndexableMask | InstanceSpecification::NonInstantiableMask)) == InstanceSpecification::IndexableMask) { if (instSpec.m_pointers) { PointersOTE* newObj = ObjectMemory::newPointerObject(oteClass, size + instSpec.m_fixedFields); *(sp - 1) = reinterpret_cast<Oop>(newObj); ObjectMemory::AddToZct(reinterpret_cast<OTE*>(newObj)); return sp - 1; } else { BytesOTE* newObj = ObjectMemory::newByteObject<true, true>(oteClass, size); *(sp - 1) = reinterpret_cast<Oop>(newObj); ObjectMemory::AddToZct(reinterpret_cast<OTE*>(newObj)); return sp - 1; } } else { // Not indexable, or non-instantiable return primitiveFailure(instSpec.m_nonInstantiable ? _PrimitiveFailureCode::NonInstantiable : _PrimitiveFailureCode::ObjectTypeMismatch); } } else { return primitiveFailure(_PrimitiveFailureCode::InvalidParameter1); // Size must be positive SmallInteger } } PointersOTE* __fastcall ObjectMemory::newPointerObject(BehaviorOTE* classPointer) { ASSERT(isBehavior(Oop(classPointer))); return newPointerObject(classPointer, classPointer->m_location->fixedFields()); } PointersOTE* __fastcall ObjectMemory::newPointerObject(BehaviorOTE* classPointer, size_t oops) { PointersOTE* ote = newUninitializedPointerObject(classPointer, oops); // Initialise the fields to nils const Oop nil = Oop(Pointers.Nil); // Loop invariant (otherwise compiler reloads each time) VariantObject* pLocation = ote->m_location; const size_t loopEnd = oops; for (size_t i = 0; i<loopEnd; i++) pLocation->m_fields[i] = nil; ASSERT(ote->isPointers()); return reinterpret_cast<PointersOTE*>(ote); } PointersOTE* __fastcall ObjectMemory::newUninitializedPointerObject(BehaviorOTE* classPointer, size_t oops) { // Don't worry, compiler will not really use multiply instruction here size_t objectSize = SizeOfPointers(oops); OTE* ote; allocObject(objectSize, ote); ASSERT((objectSize > MaxSizeOfPoolObject && ote->heapSpace() == Spaces::Normal) || ote->heapSpace() == Spaces::Pools); // These are stored in the object itself ASSERT(ote->getSize() == objectSize); classPointer->countUp(); ote->m_oteClass = classPointer; // DO NOT Initialise the fields to nils ASSERT(ote->isPointers()); return reinterpret_cast<PointersOTE*>(ote); } template <bool MaybeZ, bool Initialized> BytesOTE* ObjectMemory::newByteObject(BehaviorOTE* classPointer, size_t elementCount) { Behavior& byteClass = *classPointer->m_location; OTE* ote; if (!MaybeZ || !byteClass.m_instanceSpec.m_nullTerminated) { ASSERT(!classPointer->m_location->m_instanceSpec.m_nullTerminated); VariantByteObject* newBytes = static_cast<VariantByteObject*>(allocObject(elementCount + SizeOfPointers(0), ote)); ASSERT((elementCount > MaxSizeOfPoolObject && ote->heapSpace() == Spaces::Normal) || ote->heapSpace() == Spaces::Pools); ASSERT(ote->getSize() == elementCount + SizeOfPointers(0)); if (Initialized) { // Byte objects are initialized to zeros (but not the header) // Note that we round up to initialize to the next machine word ZeroMemory(newBytes->m_fields, _ROUND2(elementCount, sizeof(Oop))); classPointer->countUp(); } ote->m_oteClass = classPointer; ote->beBytes(); } else { ASSERT(classPointer->m_location->m_instanceSpec.m_nullTerminated); size_t objectSize; switch (reinterpret_cast<const StringClass&>(byteClass).Encoding) { case StringEncoding::Ansi: case StringEncoding::Utf8: objectSize = elementCount * sizeof(AnsiString::CU); break; case StringEncoding::Utf16: objectSize = elementCount * sizeof(Utf16String::CU); break; case StringEncoding::Utf32: objectSize = elementCount * sizeof(Utf32String::CU); break; default: __assume(false); break; } // TODO: Allocate the correct number of null term bytes based on the encoding objectSize += NULLTERMSIZE; VariantByteObject* newBytes = static_cast<VariantByteObject*>(allocObject(objectSize + SizeOfPointers(0), ote)); ASSERT((objectSize > MaxSizeOfPoolObject && ote->heapSpace() == Spaces::Normal) || ote->heapSpace() == Spaces::Pools); ASSERT(ote->getSize() == objectSize + SizeOfPointers(0)); if (Initialized) { // Byte objects are initialized to zeros (but not the header) // Note that we round up to initialize to the next machine word ZeroMemory(newBytes->m_fields, _ROUND2(objectSize, sizeof(Oop))); classPointer->countUp(); } else { // We still want to ensure the null terminator is set, even if not initializing the rest of the object *reinterpret_cast<NULLTERMTYPE*>(&newBytes->m_fields[objectSize - NULLTERMSIZE]) = 0; } ote->m_oteClass = classPointer; ote->beNullTerminated(); HARDASSERT(ote->isBytes()); } return reinterpret_cast<BytesOTE*>(ote); } // Explicit instantiations template BytesOTE* ObjectMemory::newByteObject<false, false>(BehaviorOTE*, size_t); template BytesOTE* ObjectMemory::newByteObject<false, true>(BehaviorOTE*, size_t); template BytesOTE* ObjectMemory::newByteObject<true, false>(BehaviorOTE*, size_t); template BytesOTE* ObjectMemory::newByteObject<true, true>(BehaviorOTE*, size_t); Oop* __fastcall Interpreter::primitiveNewPinned(Oop* const sp, primargcount_t) { BehaviorOTE* oteClass = reinterpret_cast<BehaviorOTE*>(*(sp - 1)); Oop oopArg = (*sp); if (isIntegerObject(oopArg)) { SmallInteger size = ObjectMemoryIntegerValueOf(oopArg); if (size >= 0) { InstanceSpecification instSpec = oteClass->m_location->m_instanceSpec; if (!(instSpec.m_pointers || instSpec.m_nonInstantiable)) { BytesOTE* newObj = ObjectMemory::newByteObject<true, true>(oteClass, size); *(sp - 1) = reinterpret_cast<Oop>(newObj); ObjectMemory::AddToZct(reinterpret_cast<OTE*>(newObj)); return sp - 1; } else { // Not bytes, or non-instantiable return primitiveFailure(instSpec.m_nonInstantiable ? _PrimitiveFailureCode::NonInstantiable : _PrimitiveFailureCode::ObjectTypeMismatch); } } } return primitiveFailure(_PrimitiveFailureCode::InvalidParameter1); // Size must be positive SmallInteger } OTE* ObjectMemory::CopyElements(OTE* oteObj, size_t startingAt, size_t count) { // Note that startingAt is expected to be a zero-based index ASSERT(startingAt >= 0); OTE* oteSlice; if (oteObj->isBytes()) { BytesOTE* oteBytes = reinterpret_cast<BytesOTE*>(oteObj); size_t elementSize = ObjectMemory::GetBytesElementSize(oteBytes); if (count == 0 || ((startingAt + count) * elementSize <= oteBytes->bytesSize())) { size_t objectSize = elementSize * count; if (oteBytes->m_flags.m_weakOrZ) { // TODO: Allocate the correct number of null term bytes based on the encoding auto newBytes = static_cast<VariantByteObject*>(allocObject(objectSize + NULLTERMSIZE, oteSlice)); // When copying strings, the slices has the same string class (oteSlice->m_oteClass = oteBytes->m_oteClass)->countUp(); memcpy(newBytes->m_fields, oteBytes->m_location->m_fields + (startingAt * elementSize), objectSize); *reinterpret_cast<NULLTERMTYPE*>(&newBytes->m_fields[objectSize]) = 0; oteSlice->beNullTerminated(); return oteSlice; } else { VariantByteObject* newBytes = static_cast<VariantByteObject*>(allocObject(objectSize, oteSlice)); // When copying bytes, the slice is always a ByteArray oteSlice->m_oteClass = Pointers.ClassByteArray; oteSlice->beBytes(); memcpy(newBytes->m_fields, oteBytes->m_location->m_fields + (startingAt * elementSize), objectSize); return oteSlice; } } } else { // Pointers PointersOTE* otePointers = reinterpret_cast<PointersOTE*>(oteObj); BehaviorOTE* oteClass = otePointers->m_oteClass; InstanceSpecification instSpec = oteClass->m_location->m_instanceSpec; if (instSpec.m_indexable) { startingAt += instSpec.m_fixedFields; if (count == 0 || (startingAt + count) <= otePointers->pointersSize()) { size_t objectSize = SizeOfPointers(count); auto pSlice = static_cast<VariantObject*>(allocObject(objectSize, oteSlice)); // When copying pointers, the slice is always an Array oteSlice->m_oteClass = Pointers.ClassArray; VariantObject* pSrc = otePointers->m_location; for (size_t i = 0; i < count; i++) { countUp(pSlice->m_fields[i] = pSrc->m_fields[startingAt + i]); } return oteSlice; } } } return nullptr; } Oop* Interpreter::primitiveCopyFromTo(Oop* const sp, primargcount_t) { Oop oopToArg = *sp; Oop oopFromArg = *(sp - 1); OTE* oteReceiver = reinterpret_cast<OTE*>(*(sp - 2)); if (ObjectMemoryIsIntegerObject(oopToArg)) { if (ObjectMemoryIsIntegerObject(oopFromArg)) { SmallInteger from = ObjectMemoryIntegerValueOf(oopFromArg); SmallInteger to = ObjectMemoryIntegerValueOf(oopToArg); if (from > 0) { SmallInteger count = to - from + 1; if (count >= 0) { OTE* oteAnswer = ObjectMemory::CopyElements(oteReceiver, from - 1, count); if (oteAnswer != nullptr) { *(sp - 2) = (Oop)oteAnswer; ObjectMemory::AddToZct(oteAnswer); return sp - 2; } } } // Bounds error return primitiveFailure(_PrimitiveFailureCode::OutOfBounds); } else { // Non positive SmallInteger 'from' return primitiveFailure(_PrimitiveFailureCode::InvalidParameter1); } } else { // Non positive SmallInteger 'to' return primitiveFailure(_PrimitiveFailureCode::InvalidParameter2); } } BytesOTE* __fastcall ObjectMemory::shallowCopy(BytesOTE* ote) { ASSERT(ote->isBytes()); // Copying byte objects is simple and fast VariantByteObject& bytes = *ote->m_location; BehaviorOTE* classPointer = ote->m_oteClass; size_t objectSize = ote->sizeOf(); OTE* copyPointer; // Allocate an uninitialized object ... VariantByteObject* pLocation = static_cast<VariantByteObject*>(allocObject(objectSize, copyPointer)); ASSERT((objectSize > MaxSizeOfPoolObject && copyPointer->heapSpace() == Spaces::Normal) || copyPointer->heapSpace() == Spaces::Pools); ASSERT(copyPointer->getSize() == objectSize); // This set does not want to copy over the immutability bit - i.e. even if the original was immutable, the // copy will never be. copyPointer->setSize(ote->getSize()); copyPointer->m_flagsWord = (copyPointer->m_flagsWord & ~OTEFlags::WeakMask) | (ote->m_flagsWord & OTEFlags::WeakMask); ASSERT(copyPointer->isBytes()); copyPointer->m_oteClass = classPointer; classPointer->countUp(); // Copy the entire object over the other one, including any null terminator and object header memcpy(pLocation, &bytes, objectSize); return reinterpret_cast<BytesOTE*>(copyPointer); } /////////////////////////////////////////////////////////////////////////////// // Virtual object space allocation // Answer a new process with an initial stack size specified by the first argument, and a maximum // stack size specified by the second argument. Oop* __fastcall Interpreter::primitiveNewVirtual(Oop* const sp, primargcount_t) { Oop maxArg = *sp; SmallInteger maxSize; if (ObjectMemoryIsIntegerObject(maxArg) && (maxSize = ObjectMemoryIntegerValueOf(maxArg)) >= 0) { Oop initArg = *(sp - 1); SmallInteger initialSize; if (ObjectMemoryIsIntegerObject(initArg) && (initialSize = ObjectMemoryIntegerValueOf(initArg)) >= 0) { BehaviorOTE* receiverClass = reinterpret_cast<BehaviorOTE*>(*(sp - 2)); InstanceSpecification instSpec = receiverClass->m_location->m_instanceSpec; if (instSpec.m_indexable && !instSpec.m_nonInstantiable) { auto fixedFields = instSpec.m_fixedFields; VirtualOTE* newObject = ObjectMemory::newVirtualObject(receiverClass, initialSize + fixedFields, maxSize); if (newObject) { *(sp - 2) = reinterpret_cast<Oop>(newObject); // No point saving down SP before potential Zct reconcile as the init & max args must be SmallIntegers ObjectMemory::AddToZct((OTE*)newObject); return sp - 2; } else { return primitiveFailure(_PrimitiveFailureCode::NoMemory); // OOM } } else { return primitiveFailure(instSpec.m_nonInstantiable ? _PrimitiveFailureCode::NonInstantiable : _PrimitiveFailureCode::ObjectTypeMismatch); // Non-indexable or abstract class } } else { return primitiveFailure(_PrimitiveFailureCode::InvalidParameter1); // initialSize is not a positive SmallInteger } } else { return primitiveFailure(_PrimitiveFailureCode::InvalidParameter2); // maxsize is not a positive SmallInteger } } /* Allocate a new virtual object from virtual space, which can grow up to maxBytes (including the virtual allocation overhead) but which has an initial size of initialBytes (NOT including the virtual allocation overhead). Should the allocation request fail, then a memory exception is generated. */ Oop* __stdcall AllocateVirtualSpace(size_t maxBytes, size_t initialBytes) { size_t reserveBytes = _ROUND2(maxBytes + dwPageSize, dwAllocationGranularity); ASSERT(reserveBytes % dwAllocationGranularity == 0); void* pReservation = ::VirtualAlloc(NULL, reserveBytes, MEM_RESERVE, PAGE_NOACCESS); if (pReservation) { #ifdef _DEBUG // Let's see whether we got the rounding correct! MEMORY_BASIC_INFORMATION mbi; VERIFY(::VirtualQuery(pReservation, &mbi, sizeof(mbi)) == sizeof(mbi)); ASSERT(mbi.AllocationBase == pReservation); ASSERT(mbi.BaseAddress == pReservation); ASSERT(mbi.AllocationProtect == PAGE_NOACCESS); // ASSERT(mbi.Protect == PAGE_NOACCESS); ASSERT(mbi.RegionSize == reserveBytes); ASSERT(mbi.State == MEM_RESERVE); ASSERT(mbi.Type == MEM_PRIVATE); #endif // We expect the initial byte size to be a integral number of pages, and it must also take account // of the virtual allocation overhead (currently 4 bytes) initialBytes = _ROUND2(initialBytes + sizeof(VirtualObjectHeader), dwPageSize); ASSERT(initialBytes % dwPageSize == 0); // Note that VirtualAlloc initializes the committed memory to zeroes. VirtualObjectHeader* pLocation = static_cast<VirtualObjectHeader*>(::VirtualAlloc(pReservation, initialBytes, MEM_COMMIT, PAGE_READWRITE)); if (pLocation) { #ifdef _DEBUG // Let's see whether we got the rounding correct! VERIFY(::VirtualQuery(pLocation, &mbi, sizeof(mbi)) == sizeof(mbi)); ASSERT(mbi.AllocationBase == pLocation); ASSERT(mbi.BaseAddress == pLocation); ASSERT(mbi.AllocationProtect == PAGE_NOACCESS); ASSERT(mbi.Protect == PAGE_READWRITE); ASSERT(mbi.RegionSize == initialBytes); ASSERT(mbi.State == MEM_COMMIT); ASSERT(mbi.Type == MEM_PRIVATE); #endif // Use first slot to hold the maximum size for the object pLocation->setMaxAllocation(maxBytes); return reinterpret_cast<Oop*>(pLocation + 1); } } return nullptr; } // N.B. Like the other instantiate methods in ObjectMemory, this method for instantiating // objects in virtual space (used for allocating Processes, for example), does not adjust // the ref. count of the class, because this is often unecessary, and does not adjust the // sizes to allow for fixed fields - callers must do this VirtualOTE* ObjectMemory::newVirtualObject(BehaviorOTE* classPointer, size_t initialSize, size_t maxSize) { #ifdef _DEBUG { ASSERT(isBehavior(Oop(classPointer))); Behavior& behavior = *classPointer->m_location; ASSERT(behavior.isIndexable()); } #endif // Trim the sizes to acceptable bounds if (initialSize <= dwOopsPerPage) initialSize = dwOopsPerPage; else initialSize = _ROUND2(initialSize, dwOopsPerPage); if (maxSize < initialSize) maxSize = initialSize; else maxSize = _ROUND2(maxSize, dwOopsPerPage); // We have to allow for the virtual allocation overhead. The allocation function will add in // space for this. The maximum size should include this, the initial size should not initialSize -= sizeof(VirtualObjectHeader)/sizeof(Oop); size_t byteSize = initialSize*sizeof(Oop); VariantObject* pLocation = reinterpret_cast<VariantObject*>(AllocateVirtualSpace(maxSize * sizeof(Oop), byteSize)); if (pLocation) { // No need to alter ref. count of process class, as it is sticky // Fill space with nils for initial values const Oop nil = Oop(Pointers.Nil); const size_t loopEnd = initialSize; for (size_t i = 0; i < loopEnd; i++) pLocation->m_fields[i] = nil; OTE* ote = ObjectMemory::allocateOop(static_cast<POBJECT>(pLocation)); ote->setSize(byteSize); ote->m_oteClass = classPointer; classPointer->countUp(); ote->m_flags = m_spaceOTEBits[static_cast<space_t>(Spaces::Virtual)]; ASSERT(ote->isPointers()); return reinterpret_cast<VirtualOTE*>(ote); } return nullptr; } /////////////////////////////////////////////////////////////////////////////// // Low-level memory chunk (not object) management routines // void ObjectMemory::FixedSizePool::morePages() { const size_t nPages = dwAllocationGranularity / dwPageSize; UNREFERENCED_PARAMETER(nPages); ASSERT(dwPageSize*nPages == dwAllocationGranularity); uint8_t* pStart = static_cast<uint8_t*>(::VirtualAlloc(NULL, dwAllocationGranularity, MEM_COMMIT, PAGE_READWRITE)); if (!pStart) ::RaiseException(STATUS_NO_MEMORY, EXCEPTION_NONCONTINUABLE, 0, NULL); // Fatal - we must exit Dolphin #ifdef _DEBUG { tracelock lock(TRACESTREAM); TRACESTREAM<< L"FixedSizePool: new pages @ " << LPVOID(pStart) << std::endl; } #endif // Put the allocation (64k) into the allocation list so we can free it later { m_nAllocations++; m_pAllocations = static_cast<void**>(realloc(m_pAllocations, m_nAllocations*sizeof(void*))); m_pAllocations[m_nAllocations-1] = pStart; } // We don't know whether the chunks are to contain zeros or nils, so we don't bother to init the space #ifdef _DEBUG memset(pStart, 0xCD, dwAllocationGranularity); #endif uint8_t* pLast = pStart + dwAllocationGranularity - dwPageSize; #ifdef _DEBUG // ASSERT that pLast is correct by causing a GPF if it isn't! memset(reinterpret_cast<uint8_t*>(pLast), 0xCD, dwPageSize); #endif for (uint8_t* p = pStart; p < pLast; p += dwPageSize) reinterpret_cast<Link*>(p)->next = reinterpret_cast<Link*>(p + dwPageSize); reinterpret_cast<Link*>(pLast)->next = 0; m_pFreePages = reinterpret_cast<Link*>(pStart); #ifdef _DEBUG // m_nPages++; #endif } inline uint8_t* ObjectMemory::FixedSizePool::allocatePage() { if (!m_pFreePages) { morePages(); ASSERT(m_pFreePages); } Link* pPage = m_pFreePages; m_pFreePages = pPage->next; return reinterpret_cast<uint8_t*>(pPage); } // Allocate another page for a fixed size pool void ObjectMemory::FixedSizePool::moreChunks() { constexpr size_t nOverhead = 0;//12; constexpr size_t nBlockSize = dwPageSize - nOverhead; const size_t nChunks = nBlockSize / m_nChunkSize; uint8_t* pStart = allocatePage(); #ifdef _DEBUG if (abs(Interpreter::executionTrace) > 0) { tracelock lock(TRACESTREAM); TRACESTREAM<< L"FixedSizePool(" << this << L" new page @ " << pStart << L" (" << m_nPages<< L" pages of " << nChunks <<" chunks of " << m_nChunkSize <<" bytes, total waste " << m_nPages*(nBlockSize-(nChunks*m_nChunkSize)) << L')' << std::endl; } memset(pStart, 0xCD, nBlockSize); #else // We don't know whether the chunks are to contain zeros or nils, so we don't bother to init the space #endif uint8_t* pLast = &pStart[(nChunks-1) * m_nChunkSize]; #ifdef _DEBUG // ASSERT that pLast is correct by causing a GPF if it isn't! memset(static_cast<uint8_t*>(pLast), 0xCD, m_nChunkSize); #endif const size_t chunkSize = m_nChunkSize; // Loop invariant for (uint8_t* p = pStart; p < pLast; p += chunkSize) reinterpret_cast<Link*>(p)->next = reinterpret_cast<Link*>(p + chunkSize); reinterpret_cast<Link*>(pLast)->next = 0; m_pFreeChunks = reinterpret_cast<Link*>(pStart); #ifdef _DEBUG m_nPages++; m_pages = static_cast<void**>(realloc(m_pages, m_nPages*sizeof(void*))); m_pages[m_nPages-1] = pStart; #endif } void ObjectMemory::FixedSizePool::setSize(size_t nChunkSize) { m_nChunkSize = nChunkSize; // Must be on 4 byte boundaries ASSERT(m_nChunkSize % PoolGranularity == 0); ASSERT(m_nChunkSize >= MinObjectSize); // m_dwPageUsed = (dwPageSize / m_nChunkSize) * m_nChunkSize; } inline ObjectMemory::FixedSizePool::FixedSizePool(size_t nChunkSize) : m_pFreeChunks(0) #ifdef _DEBUG , m_pages(0), m_nPages(0) #endif { setSize(nChunkSize); } //#ifdef NDEBUG // #pragma auto_inline(on) //#endif inline POBJECT ObjectMemory::reallocChunk(POBJECT pChunk, size_t newChunkSize) { #ifdef PRIVATE_HEAP return static_cast<POBJECT>(::HeapReAlloc(m_hHeap, HEAP_NO_SERIALIZE, pChunk, newChunkSize)); #else void *oldPointer = pChunk; void *newPointer = realloc(pChunk, newChunkSize); _ASSERT(newPointer); if (NULL == newPointer) free(oldPointer); return newPointer; #endif } #ifdef MEMSTATS void ObjectMemory::OTEPool::DumpStats() { tracelock lock(TRACESTREAM); TRACESTREAM<< L"OTEPool(" << this<< L"): total " << std::dec << m_nAllocated <<", free " << m_nFree << std::endl; } static _CrtMemState CRTMemState; void ObjectMemory::DumpStats() { tracelock lock(TRACESTREAM); TRACESTREAM << std::endl<< L"Object Memory Statistics:" << std::endl << L"------------------------------" << std::endl; CheckPoint(); _CrtMemDumpStatistics(&CRTMemState); #ifdef _DEBUG checkPools(); #endif TRACESTREAM << std::endl<< L"Pool Statistics:" << std::endl << L"------------------" << std::endl << std::dec << NumPools<< L" pools in the interval (" << m_pools[0].getSize()<< L" to: " << m_pools[NumPools-1].getSize()<< L" by: " << PoolGranularity << L')' << std::endl << std::endl; size_t pageWaste=0; size_t totalPages=0; size_t totalFreeBytes=0; size_t totalChunks=0; size_t totalFreeChunks=0; for (auto i=0;i<NumPools;i++) { size_t nSize = m_pools[i].getSize(); size_t perPage = dwPageSize/nSize; size_t wastePerPage = dwPageSize - (perPage*nSize); size_t nPages = m_pools[i].getPages(); size_t nChunks = perPage*nPages; size_t waste = nPages*wastePerPage; size_t nFree = m_pools[i].getFree(); TRACE(L"%d: size %d, %d objects on %d pgs (%d per pg, %d free), waste %d (%d per page)\n", i, nSize, nChunks-nFree, nPages, perPage, nFree, waste, wastePerPage); totalChunks += nChunks; pageWaste += waste; totalPages += nPages; totalFreeBytes += nFree*nSize; totalFreeChunks += nFree; } size_t objectWaste = 0; size_t totalObjects = 0; const OTE* pEnd = m_pOT+m_nOTSize; for (OTE* ote=m_pOT; ote < pEnd; ote++) { if (!ote->isFree()) { totalObjects++; if (ote->heapSpace() == Spaces::Pools) { size_t size = ote->sizeOf(); size_t chunkSize = _ROUND2(size, PoolGranularity); objectWaste += chunkSize - size; } } } size_t wastePercentage = (totalChunks - totalFreeChunks) == 0 ? 0 : size_t(double(objectWaste)/ double(totalChunks-totalFreeChunks)*100.0); TRACESTREAM<< L"===============================================" << std::endl; TRACE(L"Total objects = %d\n" "Total pool objs = %d\n" "Total chunks = %d\n" "Total Pages = %d\n" "Total Allocs = %d\n" "Total allocated = %d\n" "Page Waste = %d bytes\n" "Object Waste = %d bytes (avg 0.%d)\n" "Total Waste = %d\n" "Total free chks = %d\n" "Total Free = %d bytes\n", totalObjects, totalChunks-totalFreeChunks, totalChunks, totalPages, FixedSizePool::m_nAllocations, totalPages*dwPageSize, pageWaste, objectWaste, wastePercentage, pageWaste+objectWaste, totalFreeChunks, totalFreeBytes); } void ObjectMemory::CheckPoint() { _CrtMemCheckpoint(&CRTMemState); } size_t ObjectMemory::FixedSizePool::getFree() { Link* pChunk = m_pFreeChunks; size_t tally = 0; while (pChunk) { tally++; pChunk = pChunk->next; } return tally; } #endif #if defined(_DEBUG) bool ObjectMemory::FixedSizePool::isMyChunk(void* pChunk) { const size_t loopEnd = m_nPages; for (size_t i=0;i<loopEnd;i++) { void* pPage = m_pages[i]; if (pChunk >= pPage && static_cast<uint8_t*>(pChunk) <= (static_cast<uint8_t*>(pPage)+dwPageSize)) return true; } return false; } bool ObjectMemory::FixedSizePool::isValid() { Link* pChunk = m_pFreeChunks; while (pChunk) { if (!isMyChunk(pChunk)) return false; pChunk = pChunk->next; } return true; } #endif
; A164449: Number of binary strings of length n with no substrings equal to 0001 0010 or 1010 ; Submitted by Jon Maiga ; 13,21,34,56,91,147,238,386,625,1011,1636,2648,4285,6933,11218,18152,29371,47523,76894,124418,201313,325731,527044,852776,1379821,2232597,3612418,5845016,9457435,15302451,24759886,40062338,64822225,104884563,169706788,274591352,444298141,718889493,1163187634,1882077128,3045264763,4927341891,7972606654,12899948546,20872555201,33772503747,54645058948,88417562696,143062621645,231480184341,374542805986,606022990328,980565796315,1586588786643,2567154582958,4153743369602,6720897952561,10874641322163 add $0,4 mov $3,2 lpb $0 sub $0,1 add $3,2 mov $2,$3 add $3,$1 mov $1,$2 lpe mov $0,$1 mul $0,3 div $0,5 add $0,1
; A075414: Squares of A002279: a(n) = (5*(10^n - 1)/9)^2. ; 0,25,3025,308025,30858025,3086358025,308641358025,30864191358025,3086419691358025,308641974691358025,30864197524691358025,3086419753024691358025,308641975308024691358025,30864197530858024691358025,3086419753086358024691358025,308641975308641358024691358025,30864197530864191358024691358025,3086419753086419691358024691358025,308641975308641974691358024691358025,30864197530864197524691358024691358025,3086419753086419753024691358024691358025,308641975308641975308024691358024691358025 mov $1,10 pow $1,$0 sub $1,1 pow $1,2 div $1,81 mul $1,25 mov $0,$1
// SPDX-License-Identifier: GPL-3.0-only #include <invader/tag/parser/parser.hpp> #include <invader/file/file.hpp> #include <invader/build/build_workload.hpp> #include "hud_interface.hpp" #define CHECK_INTERFACE_BITMAP_SEQ(bitmap_tag, sequence_index, name) { \ if((!workload.disable_recursion && !workload.disable_error_checking) && (!bitmap_tag.tag_id.is_null())) { \ std::size_t sequence_count; \ const BitmapGroupSequence::struct_little *sequences; \ char bitmap_tag_path[256]; \ HEK::BitmapType bitmap_type; \ get_sequence_data(workload, bitmap_tag.tag_id, sequence_count, sequences, bitmap_tag_path, sizeof(bitmap_tag_path), bitmap_type); \ if(sequence_index >= sequence_count) { \ REPORT_ERROR_PRINTF(workload, ERROR_TYPE_FATAL_ERROR, tag_index, "Sequence #%zu in %s referenced by %s is out of bounds (>= %zu)", static_cast<std::size_t>(sequence_index), bitmap_tag_path, name, sequence_count); \ throw InvalidTagDataException(); \ } \ else { \ auto &sequence = sequences[sequence_index]; \ if(bitmap_type == HEK::BitmapType::BITMAP_TYPE_SPRITES && sequence.sprites.count == 0) { \ REPORT_ERROR_PRINTF(workload, ERROR_TYPE_FATAL_ERROR, tag_index, "Sequence #%zu in %s referenced in %s has 0 sprites", static_cast<std::size_t>(sequence_index), name, bitmap_tag_path); \ throw InvalidTagDataException(); \ } \ else if(bitmap_type != HEK::BitmapType::BITMAP_TYPE_SPRITES && sequence.bitmap_count == 0) { \ REPORT_ERROR_PRINTF(workload, ERROR_TYPE_FATAL_ERROR, tag_index, "Sequence #%zu in %s referenced in %s has 0 bitmaps", static_cast<std::size_t>(sequence_index), name, bitmap_tag_path); \ throw InvalidTagDataException(); \ } \ } \ } \ } #define CHECK_HIGH_RES_SCALING(flags, name) \ if((flags & HEK::HUDInterfaceScalingFlagsFlag::HUD_INTERFACE_SCALING_FLAGS_FLAG_USE_HIGH_RES_SCALE) && workload.get_build_parameters()->details.build_cache_file_engine == HEK::CacheFileEngine::CACHE_FILE_XBOX) { \ std::string name_copy = name; \ name_copy[0] = std::toupper(name_copy[0]); \ REPORT_ERROR_PRINTF(workload, ERROR_TYPE_ERROR, tag_index, "%s has high resolution scaling enabled, but this does not exist on the target engine", name_copy.c_str()); \ } namespace Invader::Parser { void WeaponHUDInterface::pre_compile(BuildWorkload &, std::size_t, std::size_t, std::size_t) { union { std::uint32_t inty; HEK::WeaponHUDInterfaceCrosshairTypeFlags flaggy; } crosshair_types = {}; for(auto &c : this->crosshairs) { crosshair_types.inty |= (1 << c.crosshair_type); } this->crosshair_types = crosshair_types.flaggy; // Check for zoom flags if we don't have any zoom crosshairs if(!(this->crosshair_types & HEK::WeaponHUDInterfaceCrosshairTypeFlagsFlag::WEAPON_HUD_INTERFACE_CROSSHAIR_TYPE_FLAGS_FLAG_ZOOM_LEVEL)) { auto &crosshair_types = this->crosshair_types; // If any zoom flags are set, pretend we do have zoom crosshairs for(auto &c : this->crosshairs) { auto set_hud_for_zoom_flags = [&c, &crosshair_types]() { for(auto &o : c.crosshair_overlays) { if( (o.flags & HEK::WeaponHUDInterfaceCrosshairOverlayFlagsFlag::WEAPON_HUD_INTERFACE_CROSSHAIR_OVERLAY_FLAGS_FLAG_DONT_SHOW_WHEN_ZOOMED) || (o.flags & HEK::WeaponHUDInterfaceCrosshairOverlayFlagsFlag::WEAPON_HUD_INTERFACE_CROSSHAIR_OVERLAY_FLAGS_FLAG_SHOW_ONLY_WHEN_ZOOMED) || (o.flags & HEK::WeaponHUDInterfaceCrosshairOverlayFlagsFlag::WEAPON_HUD_INTERFACE_CROSSHAIR_OVERLAY_FLAGS_FLAG_ONE_ZOOM_LEVEL) ) { crosshair_types |= HEK::WeaponHUDInterfaceCrosshairTypeFlagsFlag::WEAPON_HUD_INTERFACE_CROSSHAIR_TYPE_FLAGS_FLAG_ZOOM_LEVEL; return true; } } return false; }; if(set_hud_for_zoom_flags()) { break; } } } } void get_sequence_data(const BuildWorkload &workload, const HEK::TagID &tag_id, std::size_t &sequence_count, const BitmapGroupSequence::struct_little *&sequences, char *bitmap_tag_path, std::size_t bitmap_tag_path_size, HEK::BitmapType &bitmap_type) { if(tag_id.is_null()) { sequence_count = 0; sequences = nullptr; std::snprintf(bitmap_tag_path, bitmap_tag_path_size, "NULL"); } else { const auto &bitmap_tag = workload.tags[tag_id.index]; std::snprintf(bitmap_tag_path, bitmap_tag_path_size, "%s.%s", bitmap_tag.path.c_str(), HEK::tag_fourcc_to_extension(bitmap_tag.tag_fourcc)); Invader::File::halo_path_to_preferred_path_chars(bitmap_tag_path); const auto &bitmap_struct = workload.structs[*bitmap_tag.base_struct]; const auto &bitmap = *reinterpret_cast<const Bitmap::struct_little *>(bitmap_struct.data.data()); bitmap_type = bitmap.type; sequence_count = bitmap.bitmap_group_sequence.count; sequences = sequence_count > 0 ? reinterpret_cast<const Parser::BitmapGroupSequence::struct_little *>(workload.structs[*bitmap_struct.resolve_pointer(&bitmap.bitmap_group_sequence.pointer)].data.data()) : nullptr; } } void WeaponHUDInterfaceCrosshair::post_compile(BuildWorkload &workload, std::size_t tag_index, std::size_t, std::size_t struct_offset) { // Figure out what we're getting into std::size_t sequence_count; const BitmapGroupSequence::struct_little *sequences; char bitmap_tag_path[256]; HEK::BitmapType bitmap_type; get_sequence_data(workload, this->crosshair_bitmap.tag_id, sequence_count, sequences, bitmap_tag_path, sizeof(bitmap_tag_path), bitmap_type); // Make sure it's valid std::size_t overlay_count = this->crosshair_overlays.size(); if(!workload.disable_recursion || !workload.disable_error_checking) { for(std::size_t i = 0; i < overlay_count; i++) { auto &overlay = this->crosshair_overlays[i]; bool not_a_sprite = overlay.flags & HEK::WeaponHUDInterfaceCrosshairOverlayFlagsFlag::WEAPON_HUD_INTERFACE_CROSSHAIR_OVERLAY_FLAGS_FLAG_NOT_A_SPRITE; if(not_a_sprite && bitmap_type == HEK::BitmapType::BITMAP_TYPE_SPRITES) { REPORT_ERROR_PRINTF(workload, ERROR_TYPE_FATAL_ERROR, tag_index, "Overlay #%zu of crosshair #%zu is marked as not a sprite, but %s is a sprite sheet", i, struct_offset / sizeof(WeaponHUDInterfaceCrosshair::struct_little), bitmap_tag_path); throw InvalidTagDataException(); } else if(!not_a_sprite && bitmap_type != HEK::BitmapType::BITMAP_TYPE_SPRITES) { REPORT_ERROR_PRINTF(workload, ERROR_TYPE_FATAL_ERROR, tag_index, "Overlay #%zu of crosshair #%zu is not marked as not a sprite, but %s is not a sprite sheet", i, struct_offset / sizeof(WeaponHUDInterfaceCrosshair::struct_little), bitmap_tag_path); throw InvalidTagDataException(); } if(overlay.sequence_index != NULL_INDEX) { if(overlay.sequence_index >= sequence_count) { REPORT_ERROR_PRINTF(workload, ERROR_TYPE_FATAL_ERROR, tag_index, "Sequence #%zu in %s referenced in overlay #%zu of crosshair #%zu is out of bounds (>= %zu)", static_cast<std::size_t>(overlay.sequence_index), bitmap_tag_path, i, struct_offset / sizeof(WeaponHUDInterfaceCrosshair::struct_little), sequence_count); throw InvalidTagDataException(); } else { auto &sequence = sequences[overlay.sequence_index]; if(not_a_sprite) { if(sequence.bitmap_count == 0) { REPORT_ERROR_PRINTF(workload, ERROR_TYPE_FATAL_ERROR, tag_index, "Sequence #%zu in %s referenced in overlay #%zu of crosshair #%zu has 0 bitmaps", static_cast<std::size_t>(overlay.sequence_index), bitmap_tag_path, i, struct_offset / sizeof(WeaponHUDInterfaceCrosshair::struct_little)); throw InvalidTagDataException(); } } else { if(sequence.sprites.count == 0) { REPORT_ERROR_PRINTF(workload, ERROR_TYPE_FATAL_ERROR, tag_index, "Sequence #%zu in %s referenced in overlay #%zu of crosshair #%zu has 0 sprites", static_cast<std::size_t>(overlay.sequence_index), bitmap_tag_path, i, struct_offset / sizeof(WeaponHUDInterfaceCrosshair::struct_little)); throw InvalidTagDataException(); } } } } } } } void WeaponHUDInterfaceMeter::post_compile(BuildWorkload &workload, std::size_t tag_index, std::size_t, std::size_t struct_offset) { // Make sure it's valid auto name = std::string("meter #") + std::to_string(struct_offset / sizeof(*this)); CHECK_INTERFACE_BITMAP_SEQ(this->meter_bitmap, this->sequence_index, name.c_str()); CHECK_HIGH_RES_SCALING(this->scaling_flags, name.c_str()); } void WeaponHUDInterfaceStaticElement::post_compile(BuildWorkload &workload, std::size_t tag_index, std::size_t, std::size_t struct_offset) { // Make sure it's valid auto name = std::string("static element #") + std::to_string(struct_offset / sizeof(*this)); CHECK_INTERFACE_BITMAP_SEQ(this->interface_bitmap, this->sequence_index, name.c_str()); CHECK_HIGH_RES_SCALING(this->scaling_flags, name.c_str()); } void WeaponHUDInterfaceOverlayElement::post_compile(BuildWorkload &workload, std::size_t tag_index, std::size_t, std::size_t struct_offset) { // Make sure it's valid std::size_t overlay_count = this->overlays.size(); for(std::size_t i = 0; i < overlay_count; i++) { auto name = std::string("overlay #") + std::to_string(struct_offset / sizeof(*this)); auto &overlay = this->overlays[i]; CHECK_INTERFACE_BITMAP_SEQ(this->overlay_bitmap, overlay.sequence_index, name.c_str()); CHECK_HIGH_RES_SCALING(overlay.scaling_flags, name.c_str()); } } void UnitHUDInterface::post_compile(BuildWorkload &workload, std::size_t tag_index, std::size_t, std::size_t) { // Bounds check these values CHECK_INTERFACE_BITMAP_SEQ(this->hud_background_interface_bitmap, this->hud_background_sequence_index, "HUD background"); CHECK_INTERFACE_BITMAP_SEQ(this->shield_panel_background_interface_bitmap, this->shield_panel_background_sequence_index, "shield panel background"); CHECK_INTERFACE_BITMAP_SEQ(this->shield_panel_meter_meter_bitmap, this->shield_panel_meter_sequence_index, "shield panel meter"); CHECK_INTERFACE_BITMAP_SEQ(this->health_panel_background_interface_bitmap, this->shield_panel_background_sequence_index, "health panel background"); CHECK_INTERFACE_BITMAP_SEQ(this->health_panel_meter_meter_bitmap, this->health_panel_meter_sequence_index, "health panel meter"); CHECK_INTERFACE_BITMAP_SEQ(this->motion_sensor_background_interface_bitmap, this->motion_sensor_background_sequence_index, "motion sensor background"); CHECK_INTERFACE_BITMAP_SEQ(this->motion_sensor_foreground_interface_bitmap, this->motion_sensor_foreground_sequence_index, "motion sensor foreground"); // Check these memes CHECK_HIGH_RES_SCALING(this->hud_background_scaling_flags, "HUD background"); CHECK_HIGH_RES_SCALING(this->shield_panel_background_scaling_flags, "shield panel background"); CHECK_HIGH_RES_SCALING(this->shield_panel_meter_scaling_flags, "shield panel meter"); CHECK_HIGH_RES_SCALING(this->health_panel_background_scaling_flags, "health panel background"); CHECK_HIGH_RES_SCALING(this->health_panel_meter_scaling_flags, "health panel meter"); CHECK_HIGH_RES_SCALING(this->motion_sensor_background_scaling_flags, "motion sensor background"); CHECK_HIGH_RES_SCALING(this->motion_sensor_foreground_scaling_flags, "motion sensor foreground"); // Bounds check the overlays auto overlay_count = this->overlays.size(); for(std::size_t i = 0; i < overlay_count; i++) { char overlay_name[256]; std::snprintf(overlay_name, sizeof(overlay_name), "overlay #%zu", i); auto &overlay = this->overlays[i]; CHECK_INTERFACE_BITMAP_SEQ(overlay.interface_bitmap, overlay.sequence_index, overlay_name); CHECK_HIGH_RES_SCALING(overlay.scaling_flags, overlay_name); } // Bounds check the meters auto meter_count = this->meters.size(); for(std::size_t i = 0; i < meter_count; i++) { char meter_name[256]; std::snprintf(meter_name, sizeof(meter_name), "meter #%zu", i); auto meter_bg_name = std::string(meter_name) + " background"; auto meter_fg_name = std::string(meter_name) + " meter"; auto &meter = this->meters[i]; CHECK_INTERFACE_BITMAP_SEQ(meter.background_interface_bitmap, meter.background_sequence_index, meter_bg_name.c_str()); CHECK_INTERFACE_BITMAP_SEQ(meter.meter_meter_bitmap, meter.meter_sequence_index, meter_fg_name.c_str()); CHECK_HIGH_RES_SCALING(meter.background_scaling_flags, meter_bg_name.c_str()); CHECK_HIGH_RES_SCALING(meter.meter_scaling_flags, meter_fg_name.c_str()); } } }
#include <iostream> #include <cmath> #include <fstream> #include <cstdlib> #include <iomanip> #include <cstring> using namespace std; #define maxpos 15 #define maxndaugh 16384 // pow(2,maxpos-1) #define nlibsteps 5 #define nlambdasteps 50 #define maxn 100000000 // 10^8 #define maxl 1000000000000. // 10^12 /* DRIVeR: Diversity Resulting from In Vitro Recombination (batch mode) Copyright (C) by Andrew Firth and Wayne Patrick, March 2005 Calculates expected number of variants for a grid of library sizes (from 0.06 to 32 times the input library size in 2*nlibsteps steps) and lambda values (from 0.03 to 32 times the input lambda value in 2*nlambdasteps steps) Outputs to file batch.dat: rows correspond to different lambda values, columns corresponds to different library sizes Input lambda can be the true underlying crossover rate (xtrue = 1) or the mean number of observable crossovers (xtrue = 0). */ // Function declarations double calcprob(double lambda, int N, int M, int nn[maxpos], int A[maxpos], double lnn[maxpos], double Pb0[maxpos], double Pb1[maxpos], int nseqs, double PBk[maxndaugh]); int main(int argc, char* argv[]) { if (7 != argc) { cout << "Usage '" << argv[0] << " library_size sequence_length " << "mean_number_of_crossovers_per_sequence " << "list_of_variable_positions_file outfile xtrue'.\n"; exit(EXIT_FAILURE); } cout << setprecision(4); int i, k, N, M, A[maxpos], nn[maxpos], j1, j2, nseqs, xtrue, iter, maxiter; int Meff; double lambda, Pb0[maxpos], Pb1[maxpos], lnn[maxpos], L, lambda0, L0, Mm1; double Xk2sum[2*nlibsteps][2*nlambdasteps], Xk2[maxndaugh]; double lobs[2*nlibsteps][2*nlambdasteps], PBk[maxndaugh], lobsin; double lambda1, lambda2, lambdam, lobs1, lobs2, lobsm, diff, tolerance; char file2[100]; L0 = atof(argv[1]); N = int(atof(argv[2])); lambda0 = atof(argv[3]); xtrue = atoi(argv[6]); tolerance = 0.001; maxiter = 200; if (L0 <= 0) { cout << "Error: Library size must be positive. " << "You entered " << L0 << ".<br>\n"; exit(EXIT_FAILURE); } if (N < 1) { cout << "Error: Sequence length must be positive integer. " << "You entered " << N << ".<br>\n"; exit(EXIT_FAILURE); } if (lambda0 <= 0) { cout << "Error: Mean number of crossovers must be positive. " << "You entered " << lambda0 << ".<br>\n"; exit(EXIT_FAILURE); } if (N > maxn) { cout << "Error: Maximum sequence length is " << maxn << ". " << "You entered " << N << ".<br>\n"; exit(EXIT_FAILURE); } if (L0 > maxl) { cout << "Error: Maximum library size is " << maxl << ". " << "You entered " << L0 << ".<br>\n"; exit(EXIT_FAILURE); } // Read in variable positions. (Must be in numerical order.) ifstream infile(argv[4]); if (!infile) { cout << "Failed to open file '" << argv[4] << "'.\n"; exit(EXIT_FAILURE); } infile >> M; Meff = M; Mm1 = float(M-1); nseqs = int(pow(2.,Mm1)); if (M > maxpos) { cout << "Error: Maximum number of variable positions is " << maxpos << ". You entered " << M << ".<br>\n"; exit(EXIT_FAILURE); } if (M < 1) { cout << "Error: You didn't enter any variable positions.<br>\n"; exit(EXIT_FAILURE); } infile.ignore(1000,'\n'); for (i = 0; i < M; ++i) { infile >> A[i]; if (A[i] > N) { cout << "Error: Variable position " << A[i] << " is greater than sequence length " << N << ".<br>\n"; exit(EXIT_FAILURE); } if (i > 0 && A[i] <= A[i-1]) { cout << "Error: Variable positions must be in numerical order.<br>\n"; exit(EXIT_FAILURE); } if (i > 0 && A[i] == A[i-1]+1) { // Adjacent variable positions Meff -= 1; cout << "Warning: Variable positions " << A[i-1] << " and " << A[i] << " are adjacent. They will be linked in all daughter " << "sequences.<br>\n"; } infile.ignore(1000,'\n'); } infile.close(); if (xtrue) { if (lambda0 > float(N-M-1)) { cout << "Error: Mean number of crossovers can't exceed " << "'sequence length - number of variable positions - 1'. " << "You entered " << lambda0 << ".<br>\n"; exit(EXIT_FAILURE); } if (lambda0 > 0.1 * float(N-M-1)) { cout << "Warning: Crossover rate is high. " << "Statistics may be compromised.<br>\n"; } } if (!xtrue) { // Need to calculate true crossover rate if (lambda0 > float(Meff-1)/2) { cout << "Error: Mean number of <i>observable</i> crossovers can't " << "exceed '0.5 x (number of non-adjacent variable positions - 1)' " << "= " << float(Meff-1)/2 << ". " << "You entered " << lambda0 << ". Did you mean to choose the 'all crossovers' option?<br>\n"; exit(EXIT_FAILURE); } iter = 0; lobsin = lambda0; lambda1 = 0; lambda2 = float(N-M-1); lobs1 = calcprob(lambda1, N, M, nn, A, lnn, Pb0, Pb1, nseqs, PBk); lobs2 = calcprob(lambda2, N, M, nn, A, lnn, Pb0, Pb1, nseqs, PBk); diff = (lobsin-lobs2)/lobsin; while (abs(diff) > tolerance) { if (iter > maxiter) { cout << "Error: failed to converge on true crossover rate in " << maxiter << " iterations.<br>\n"; exit(EXIT_FAILURE); } iter += 1; lambdam = 0.5*(lambda1+lambda2); lobsm = calcprob(lambdam, N, M, nn, A, lnn, Pb0, Pb1, nseqs, PBk); if (lobsm > lobsin) { lobs2 = lobsm; lambda2 = lambdam; } else { lobs1 = lobsm; lambda1 = lambdam; } diff = (lobsin-lobs2)/lobsin; } lambda0 = lambda2; if (lambda0 > 0.1 * float(N-M-1)) { cout << "Warning: Crossover rate is high. " << "Statistics may be compromised.<br>\n"; } } for (j1 = 0; j1 < 2*nlibsteps; ++j1) { // grid of library sizes L = L0 * pow(2.,(j1-nlibsteps)); for (j2 = 0; j2 < 2*nlambdasteps; ++j2) { // grid of lambda values lambda = lambda0 * pow(10.,(float(j2-nlambdasteps)*0.03)); if (lambda > float(N-M-1)) { break; } lobs[j1][j2] = calcprob(lambda, N, M, nn, A, lnn, Pb0, Pb1, nseqs, PBk); Xk2sum[j1][j2] = 0.; for (k = 0; k < nseqs; ++k) { Xk2[k] = 1. - pow((1.-(PBk[k]*0.5)),L); Xk2sum[j1][j2] += Xk2[k]; } Xk2sum[j1][j2] *= 2.; } } ofstream outfile(argv[5]); if (!outfile) { cerr << "Failed to open file '" << argv[5] << "'.\n"; exit(EXIT_FAILURE); } outfile << setprecision(4); strcpy(file2,argv[5]); strcat(file2,"2"); ofstream outfile2(file2); if (!outfile2) { cerr << "Failed to open file '" << file2 << "'.\n"; exit(EXIT_FAILURE); } outfile2 << setprecision(4); outfile << "Columns = different library sizes.<br>\n" << "Rows = different mean number of crossovers per sequence.<br>\n" << "<br>\n"; outfile << "<table cellspacing=\"0\" cellpadding=\"3\" border=\"1\">\n"; outfile << "<tr><td></td><td></td><th align=\"center\" colspan=\"" << 2*nlibsteps << "\">Expected number of distinct sequences for " << "different library sizes</th></tr>\n" ; outfile << "<tr><th align=\"center\">true mean number of crossovers per " << "sequence</th>\n" << "<th align=\"center\">observed mean number of crossovers per " << "sequence</th>\n"; for (j1 = 0; j1 < 2*nlibsteps; ++j1) { outfile << "<th align=\"center\">" << L0 * pow(2.,(j1-nlibsteps)) << "</th>"; } outfile << "</tr>\n"; for (j2 = 0; j2 < 2*nlambdasteps; ++j2) { lambda = lambda0 * pow(10.,(float(j2-nlambdasteps)*0.03)); if (lambda > float(N-M-1)) { break; } outfile << "<tr align=\"right\"><td>" << lambda << "</td><td>" << lobs[0][j2]; outfile2 << lambda << " " << lobs[0][j2]; for (j1 = 0; j1 < 2*nlibsteps; ++j1) { outfile << "</td><td>" << Xk2sum[j1][j2]; outfile2 << " " << Xk2sum[j1][j2]; } outfile << "</td></tr>\n"; outfile2 << "\n"; } outfile << "</table><br>\n"; outfile.close(); outfile2.close(); } double calcprob(double lambda, int N, int M, int nn[maxpos], int A[maxpos], double lnn[maxpos], double Pb0[maxpos], double Pb1[maxpos], int nseqs, double PBk[maxndaugh]) { int i, k, sum, lct, b[maxpos]; double lobs; // Calculate probabilities P(b_i=0) and P(b_i=1) for an even or odd number // of crossovers between consecutive varying base-pairs A[i] and A[i+1]. for (i = 0; i < M-1; ++i) { // number of allowed crossover points between A[i] and A[i+1] nn[i] = A[i+1] - A[i] - 1; // poisson lambda for the interval lnn[i] = float(nn[i]) * lambda / float(N-M-1); // P(even no. crossovers in interval) // Pb0[i] = exp(-lnn[i]) * cosh(lnn[i]); Pb0[i] = 0.5*(1.+exp(-2.*lnn[i])); // P(odd no. crossovers in interval) // Pb1[i] = exp(-lnn[i]) * sinh(lnn[i]); Pb1[i] = 0.5*(1.-exp(-2.*lnn[i])); } // Encode possible daughter sequences as binary sequences (1 = odd number of // crossovers, 0 = even number of crossovers) and calculate their // probabilities P(B_k). By symmetry, we only need to calculate // probabilities for half 2^(M-1) of the possible daughter sequences. lobs = 0.; for (k = 0; k < nseqs; ++k) { lct = 0; sum = k + 1; PBk[k] = 1.; // M-1 binary digits for (i = 0; i < M-1; ++i) { // b[i] is the binary sequence b[i] = sum - 2 * int(sum/2); if (0 == b[i]) { // calculating probability PBk[k] *= Pb0[i]; } else if (1 == b[i]) { // calculating probability PBk[k] *= Pb1[i]; // count observable crossovers for lambda^obs lct += 1; } else { cout << "Error: Can't get here.<br>\n"; exit(EXIT_FAILURE); } sum = (sum - b[i]) / 2; } // PBk[k]*0.5 since each binary sequence corresponds to two `inverse' // daughter sequences // Calculate lambda^obs - the mean number of _observable_ crossovers // per sequence lobs += PBk[k] * float(lct); } return(lobs); }
copyright zengfr site:http://github.com/zengfr/romhack 03394C move.b D0, ($a4,A6) [enemy+12, enemy+32, enemy+52, enemy+72, enemy+92, enemy+B2] 033950 move.w D0, ($a2,A6) 033954 move.b #$ff, ($a5,A6) 03395A move.b #$14, ($a9,A6) [enemy+ 5, enemy+25, enemy+45, enemy+65, enemy+85, enemy+A5] 033960 move.b #$5a, ($ac,A6) [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89, enemy+A9] 033966 move.b D0, ($ba,A6) [enemy+ C, enemy+2C, enemy+4C, enemy+6C, enemy+8C, enemy+AC] 03396A move.b D0, ($bb,A6) 0355F6 bne $35634 [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89] 0355FE move.b #$0, ($ad,A6) [enemy+69] 03563C bne $35634 [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89, enemy+A9] 035644 move.b #$1, ($ad,A6) [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89, enemy+A9] 03564A jsr $119c.l [enemy+ D, enemy+2D, enemy+4D, enemy+6D, enemy+8D, enemy+AD] 035CD2 cmpi.b #$12, ($6,A6) [enemy+ 9, enemy+29, enemy+49, enemy+89, enemy+A9] 035D34 rts [enemy+ 9, enemy+29, enemy+49, enemy+89, enemy+A9] 035D3E moveq #$0, D0 [enemy+ 4, enemy+ 6, enemy+24, enemy+26, enemy+44, enemy+46, enemy+64, enemy+66, enemy+A4, enemy+A6] 03DEDE move.b D0, ($a2,A6) 03DEE2 move.b D0, ($a3,A6) 03DEE6 move.b D0, ($a4,A6) 03DEEA move.b D0, ($a9,A6) 03DEEE move.b D0, ($ae,A6) 03DEF2 move.w D0, ($a6,A6) 03DEF6 move.b D0, ($7a,A6) 03E60E bne $3e62a [enemy+ 8, enemy+28, enemy+48, enemy+68, enemy+88, enemy+A8] 03E618 moveq #$0, D0 [enemy+ 8, enemy+28, enemy+48, enemy+68, enemy+88, enemy+A8] 03E620 jsr $32a70.l [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89, enemy+A9] 03E8D6 bne $3e8f2 [enemy+ 8, enemy+48, enemy+68, enemy+88] 03E8E0 moveq #$0, D0 [enemy+ 8, enemy+48, enemy+68, enemy+88] 03E8E8 jsr $32a70.l [enemy+ 9, enemy+49, enemy+69, enemy+89] 03E9A6 subq.b #1, ($a8,A6) 03E9AA bne $3e9c2 [enemy+ 8, enemy+28, enemy+48, enemy+68, enemy+88, enemy+A8] 03E9B4 move.b ($22,A6), ($a9,A6) [enemy+ 8, enemy+28, enemy+48, enemy+68, enemy+88, enemy+A8] 03E9BA moveq #$40, D0 [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89, enemy+A9] 03F1CE jsr $32a70.l [enemy+ 9, enemy+49, enemy+69, enemy+89] 03F1F8 move.b #$c, ($6,A6) [enemy+ C, enemy+4C, enemy+6C, enemy+8C] 03F1FE moveq #$1, D0 [enemy+26, enemy+66, enemy+86, enemy+A6] 03F20C moveq #$30, D0 [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89, enemy+A9] 03F3EE move.b #$1e, ($a8,A6) [enemy+ C, enemy+2C, enemy+4C, enemy+6C, enemy+8C, enemy+AC] 03F3F4 jsr $32c5e.l [enemy+ 8, enemy+28, enemy+48, enemy+68, enemy+88, enemy+A8] 03F402 jsr $32a70.l [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89, enemy+A9] 042FD2 moveq #$0, D1 043652 addq.b #2, ($a9,A6) [enemy+ 7, enemy+27, enemy+47, enemy+67] 043656 moveq #$18, D0 [enemy+ 9, enemy+29, enemy+49, enemy+A9] 045E2A move.b #$c8, ($80,A6) [enemy+ 4, enemy+ 6, enemy+24, enemy+26, enemy+44, enemy+46, enemy+64, enemy+66, enemy+84, enemy+86, enemy+A4, enemy+A6] 045E30 move.b #$28, ($a9,A6) [enemy+ 0, enemy+20, enemy+40, enemy+60, enemy+80, enemy+A0] 045E36 clr.b ($a6,A6) [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89, enemy+A9] 045E3A moveq #$0, D1 045E96 bcc $45eae [enemy+ 9, enemy+29, enemy+49, enemy+69, enemy+89, enemy+A9] 045E9C tst.b ($51,A6) 053656 clr.w ($1e,A6) 05365A clr.b ($22,A6) 05365E clr.b ($a8,A6) 053662 clr.b ($a9,A6) 053666 addq.b #2, ($6,A6) 05366A move.b #$4, ($81,A6) [enemy+ 6, enemy+26, enemy+66, enemy+A6] 053670 moveq #$2, D0 [enemy+21, enemy+61, enemy+81, enemy+A1] 0537F0 bne $5383a [enemy+ 9, enemy+49, enemy+A9] 053858 move.b ($22,A6), D0 [enemy+ 2, enemy+22, enemy+42, enemy+82] 05386A movea.l ($64,A6), A0 [enemy+ 9, enemy+49, enemy+A9] copyright zengfr site:http://github.com/zengfr/romhack
#include <SmartPlantCarer.h> #include <GlobalPresets.h> #include <SDCardMaintainer.h> #include <LEDMaintainer.h> #include <TesterOfTheFeatures.h> #define WATER_PUMP_PIO 13 #define WATER_VALVE_1_PIO 14 #define WATER_VALVE_2_PIO 27 #define WATER_VALVE_3_PIO 26 #define WATER_VALVE_4_PIO 25 #define WATER_HUMIDITY_LEVEL_PIO 21 #define WATER_LEVEL_LOW_PIO 32 #define WATER_LEVEL_HIGH_PIO 33 #define LED_LAMP_RELAY_PIO 22 SmartPlantCarer::SmartPlantCarer() : _waterPump_PIO(WATER_PUMP_PIO), _waterValve_1_PIO(WATER_VALVE_1_PIO), _waterValve_2_PIO(WATER_VALVE_2_PIO), _waterValve_3_PIO(WATER_VALVE_3_PIO), _waterValve_4_PIO(WATER_VALVE_4_PIO), _soilHumiditySensor_1_PIO(WATER_HUMIDITY_LEVEL_PIO), _waterLevelLow_PIO(WATER_LEVEL_LOW_PIO), _waterLevelHigh_PIO(WATER_LEVEL_HIGH_PIO), _ledLampRelay_PIO(LED_LAMP_RELAY_PIO), _zigBeeCommandLineProcessor([&](ZigBeeMessage_AttributeChanged msg){OnAttributeChangedHandler(msg);} , [&](ZigBeeMessage_NwkFailed msg){OnNwkFailedHandler(msg);}, [&](ZigBeeMessage_NwkSuccess msg){OnNwkSuccededHandler(msg);}) { _zigBeeCommandLineProcessor.SetPlantCarerCommandsCallback([&](SmartPlantCarerCommand command){OnZigBeeCommandReceivedHandler(command);}); #ifndef DEBUG_MOBILE_APPLICATION_DEVELOPMENT HardwareInit(); InitServices(); #endif } void SmartPlantCarer::InitServices() { _zigBeeCommandLineProcessor.ExecuteStartUpProcedures(); SDCardMaintainer::GetInstance(); LEDMaintainer::GetInstance(); TesterOfTheFeatures::GetInstance(); } void SmartPlantCarer::AttributeChangedProcessor(uint32_t attributeID, uint32_t attributeValue, AttributeChangeSource source) { Serial.println("Entering AttributeChangedProcessor"); Serial.printf("Attribte id: %d, Attribute value: %d \n", attributeID, attributeValue); } void SmartPlantCarer::OnZigBeeCommandReceivedHandler(SmartPlantCarerCommand command) { Serial.println("Entering OnZigBeeCommandReceivedHandler"); Serial.printf("ZigBee command received: %s\n", command.GetRawCommand().c_str()); } void SmartPlantCarer::OnAttributeChangedHandler(ZigBeeMessage_AttributeChanged msg) { AttributeChangedProcessor(msg.GetAttributeId(), msg.GetNewAttributeValue(), AttributeChangeSource::ZIGBEE_SIDE); } void SmartPlantCarer::OnNwkSuccededHandler(ZigBeeMessage_NwkSuccess msg) { Serial.printf("Connected to ZigBee Network! Status: %d", msg.GetStatus()); _zigBeeIsConnected = true; //TODO:: Stop LED Blinking HERE! } void SmartPlantCarer::OnNwkFailedHandler(ZigBeeMessage_NwkFailed msg) { Serial.printf("DISCONNECTED from ZigBee Network! Status: %d", msg.GetStatus()); _zigBeeIsConnected = false; } void SmartPlantCarer::EnableWaterPump(bool enable) { digitalWrite(_waterPump_PIO, enable); } void SmartPlantCarer::EnableWaterLocker(uint8_t id, bool enable) { //DEBUG! Remove it after use! Serial.println("TESTING WATER LOCKERS!"); Serial.printf("Water Locker ID: %d water locker enable state: %d\n", id, enable); switch (id) { case 1: digitalWrite(_waterValve_1_PIO, enable); break; case 2: digitalWrite(_waterValve_2_PIO, enable); break; case 3: digitalWrite(_waterValve_3_PIO, enable); case 4: digitalWrite(_waterValve_4_PIO, enable); default: Serial.println("WARING! Unknown PIO ID given!" + id); break; } } bool SmartPlantCarer::GetHightWaterLevelState() { return digitalRead(_waterLevelHigh_PIO); } bool SmartPlantCarer::GetLowWaterLevelState() { return digitalRead(_waterLevelLow_PIO); } bool SmartPlantCarer::GetSoilHumididtyState(uint8_t id) { return digitalRead(_soilHumiditySensor_1_PIO); } void SmartPlantCarer::EnableLedBulbRelay(bool enable) { Serial.println("TESTING LED BULB!"); Serial.printf("LED Bulb enable state: %d", enable); digitalWrite(_ledLampRelay_PIO, enable); } void SmartPlantCarer::StartZigBee() { _zigBeeCommandLineProcessor.SendZigBeeStartUp(); } SmartPlantCarer::~SmartPlantCarer() { } void SmartPlantCarer::SetHardwarePresets() { //Invert all the PIO State since for the Operational Amplifiers inverse logic has been implemented: "HIGH" means "OFF", "LOW" means "ON"; digitalWrite(_waterPump_PIO, 1); digitalWrite(_waterValve_1_PIO, 1); digitalWrite(_waterValve_2_PIO, 1); digitalWrite(_waterValve_3_PIO, 1); digitalWrite(_waterValve_4_PIO, 1); digitalWrite(_ledLampRelay_PIO, 1); } void SmartPlantCarer::HardwareInit() { pinMode(_waterPump_PIO, GPIO_MODE_OUTPUT); pinMode(_waterValve_1_PIO, GPIO_MODE_OUTPUT); pinMode(_waterValve_2_PIO, GPIO_MODE_OUTPUT); pinMode(_waterValve_3_PIO, GPIO_MODE_OUTPUT); pinMode(_waterValve_4_PIO, GPIO_MODE_OUTPUT); pinMode(_soilHumiditySensor_1_PIO, INPUT_PULLUP); pinMode(_waterLevelLow_PIO, INPUT_PULLUP); pinMode(_waterLevelHigh_PIO, INPUT_PULLUP); pinMode(_ledLampRelay_PIO, GPIO_MODE_OUTPUT); SetHardwarePresets(); } SmartPlantCarer *SmartPlantCarer::GetInstance() { xSemaphoreTake(mutex_, portMAX_DELAY); if (pinstance_ == nullptr) { pinstance_ = new SmartPlantCarer(); } xSemaphoreGive(mutex_); return pinstance_; } SmartPlantCarer *SmartPlantCarer::pinstance_{nullptr}; SemaphoreHandle_t SmartPlantCarer::mutex_{xSemaphoreCreateMutex()};
; A191760: Digital root of the n-th odd square. ; 1,9,7,4,9,4,7,9,1,1,9,7,4,9,4,7,9,1,1,9,7,4,9,4,7,9,1,1,9,7,4,9,4,7,9,1,1,9,7,4,9,4,7,9,1,1,9,7,4,9,4,7,9,1,1,9,7,4,9,4,7,9,1,1,9,7,4,9,4,7,9,1,1,9,7,4,9,4,7,9,1 mov $2,85 mul $2,$0 mul $0,$2 add $0,$2 mov $1,$0 lpb $1,1 mod $1,9 lpe add $1,1
.include "myTiny13.h" .equ TASTER,3 .equ LEDB,1 ;irq Vector .org 0x0000 rjmp RESET nop rjmp PCINT0 .org 0x0010 RESET: sbi DDRB,LEDB ; output cbi DDRB,TASTER ; input ldi A,0b00100000 ; IRQ react on PCINT out GIMSK,A sbi PCMSK,TASTER ; set PCINT on TASTER IRQ ; 00x00000 Set Sleep enable ; 000xx000 configure Sleepmode to power-down mode: SM[1:0] = 10 ; 000000xx INTO IRQ on logical low-lewel ISC0[1:0] = 00 (unsused) ldi A,0b00110000 out MCUCR,A sei mainLoop: sleep ; unchecked: does sleep realy work??? rjmp mainLoop .org 0x0030 PCINT0: ; Toggle Bit Start ---- sbis PORTB,LEDB rjmp bitSet cbi PORTB,LEDB reti bitSet: sbi PORTB,LEDB reti
; A274380: A 4-cycle of the iterated sum of deficient divisors function. ; 34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48,34,54,42,48 mod $0,4 mov $1,$0 add $1,$0 add $1,$0 mov $2,$0 mul $2,2 cmp $2,2 mul $2,$1 mul $2,3 add $1,$2 add $1,2 trn $1,4 mul $1,2 add $1,34
; A033662: Possible digital sums of Smith numbers (conjectural). ; 4,9,13,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82 mov $2,4 mov $5,$0 lpb $0,1 add $1,$2 add $3,$2 trn $3,$5 trn $0,$3 add $4,$5 mov $6,$2 add $6,6 sub $6,$3 sub $6,$1 add $6,$4 add $2,$6 sub $2,$0 trn $0,$6 add $2,$6 sub $2,3 lpe mov $1,0 add $1,$2
; A295308: Characteristic function for A066694: a(n) = 1 if n < phi(sigma(n)), 0 otherwise. ; 0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1 mov $1,$0 add $0,2 seq $1,62401 ; a(n) = phi(sigma(n)). div $0,$1 cmp $0,0
BITS 64 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS= ;TEST_FILE_META_END ; MOV8ri mov ah, 0x2 ;TEST_BEGIN_RECORDING mov ah, 0x3 ;TEST_END_RECORDING
copyright zengfr site:http://github.com/zengfr/romhack 00042A move.l D1, (A0)+ 00042C dbra D0, $42a 004C2E move.b #$c, ($82,A0) 004C34 lea ($c0,A0), A0 [item+82] 004D38 move.l D0, (A4)+ 004D3A move.l D0, (A4)+ 012CD6 cmpi.b #$c, ($82,A6) 012CDC beq $12cf6 [123p+ 82, enemy+82, item+82] 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, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 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, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 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, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 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, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] copyright zengfr site:http://github.com/zengfr/romhack
; A235378: a(n) = (-1)^n*(n! - (-1)^n). ; -2,1,-7,23,-121,719,-5041,40319,-362881,3628799,-39916801,479001599,-6227020801,87178291199,-1307674368001,20922789887999,-355687428096001,6402373705727999,-121645100408832001,2432902008176639999,-51090942171709440001,1124000727777607679999,-25852016738884976640001,620448401733239439359999,-15511210043330985984000001,403291461126605635583999999,-10888869450418352160768000001,304888344611713860501503999999,-8841761993739701954543616000001,265252859812191058636308479999999 mul $0,2 add $0,2 mov $1,$0 mov $2,1 lpb $0,2 sub $1,2 sub $3,1 mul $2,$3 lpe sub $2,1 mov $0,$2
 LN_OP_TYPE& operator+=(const LN_OP_TYPE& v) noexcept; LN_OP_TYPE& operator+=(float v) noexcept; LN_OP_TYPE& operator-=(const LN_OP_TYPE& v) noexcept; LN_OP_TYPE& operator-=(float v) noexcept; LN_OP_TYPE& operator*=(const LN_OP_TYPE& v) noexcept; LN_OP_TYPE& operator*=(float v) noexcept; LN_OP_TYPE& operator/=(const LN_OP_TYPE& v) noexcept; LN_OP_TYPE& operator/=(float v) noexcept; friend constexpr LN_OP_TYPE operator+(const LN_OP_TYPE& v1, const LN_OP_TYPE& v2) noexcept; friend constexpr LN_OP_TYPE operator+(const LN_OP_TYPE& v1, float v2) noexcept; friend constexpr LN_OP_TYPE operator+(float v1, const LN_OP_TYPE& v2) noexcept; friend constexpr LN_OP_TYPE operator-(const LN_OP_TYPE& v1, const LN_OP_TYPE& v2) noexcept; friend constexpr LN_OP_TYPE operator-(const LN_OP_TYPE& v1, float v2) noexcept; friend constexpr LN_OP_TYPE operator-(float v1, const LN_OP_TYPE& v2) noexcept; friend constexpr LN_OP_TYPE operator*(const LN_OP_TYPE& v1, const LN_OP_TYPE& v2) noexcept; friend constexpr LN_OP_TYPE operator*(const LN_OP_TYPE& v1, float v2) noexcept; friend constexpr LN_OP_TYPE operator*(float v1, const LN_OP_TYPE& v2) noexcept; friend constexpr LN_OP_TYPE operator/(const LN_OP_TYPE& v1, const LN_OP_TYPE& v2) noexcept; friend constexpr LN_OP_TYPE operator/(const LN_OP_TYPE& v1, float v2) noexcept; friend constexpr LN_OP_TYPE operator/(float v1, const LN_OP_TYPE& v2) noexcept; friend constexpr LN_OP_TYPE operator-(const LN_OP_TYPE& v1) noexcept; constexpr bool operator==(const LN_OP_TYPE& v) const noexcept; constexpr bool operator!=(const LN_OP_TYPE& v) const noexcept;
;================================================================================ ; Dialog Pointer Override ;-------------------------------------------------------------------------------- DialogOverride: LDA $7F5035 : BEQ .skip LDA $7F5700, X ; use alternate buffer RTL .skip LDA $7F1200, X RTL ;-------------------------------------------------------------------------------- ; $7F5035 - Alternate Text Pointer Flag ; 0=Disable ; $7F5036 - Padding Byte (Must be Zero) ; $7F5700 - $7F57FF - Dialog Buffer ;-------------------------------------------------------------------------------- ResetDialogPointer: STZ $1CF0 : STZ $1CF1 ; reset decompression buffer LDA.b #$00 : STA $7F5035 ; zero out the alternate flag LDA.b #$1C : STA $1CE9 ; thing we wrote over RTL ;-------------------------------------------------------------------------------- ;macro LoadDialog(index,table) ; PHA : PHX : PHY ; PHB : PHK : PLB ; LDA $00 : PHA ; LDA $01 : PHA ; LDA $02 : PHA ; LDA.b #$01 : STA $7F5035 ; set flag ; ; LDA <index> : ASL : !ADD.l <index> : TAX ; get quote offset *3, move to X ; LDA <table>, X : STA $00 ; write pointer to direct page ; LDA <table>+1, X : STA $01 ; LDA <table>+2, X : STA $02 ; ; LDX.b #$00 : LDY.b #$00 ; - ; LDA [$00], Y ; load the next character from the pointer ; STA $7F5700, X ; write to the buffer ; INX : INY ; CMP.b #$7F : BNE - ; PLA : STA $02 ; PLA : STA $01 ; PLA : STA $00 ; PLB ; PLY : PLX : PLA ;endmacro ;-------------------------------------------------------------------------------- ;macro LoadDialogAddress(address) ; PHA : PHX : PHY ; PHP ; PHB : PHK : PLB ; SEP #$30 ; set 8-bit accumulator and index registers ; LDA $00 : PHA ; LDA $01 : PHA ; LDA $02 : PHA ; LDA.b #$01 : STA $7F5035 ; set flag ; ; LDA.b #<address> : STA $00 ; write pointer to direct page ; LDA.b #<address>>>8 : STA $01 ; LDA.b #<address>>>16 : STA $02 ; ; LDX.b #$00 : LDY.b #$00 ; - ; LDA [$00], Y ; load the next character from the pointer ; STA $7F5700, X ; write to the buffer ; INX : INY ; CMP.b #$7F : BNE - ; PLA : STA $02 ; PLA : STA $01 ; PLA : STA $00 ; PLB ; PLP ; PLY : PLX : PLA ;endmacro ;-------------------------------------------------------------------------------- !OFFSET_POINTER = "$7F5094" !OFFSET_RETURN = "$7F5096" !DIALOG_BUFFER = "$7F5700" macro LoadDialogAddress(address) PHA : PHX : PHY PHP PHB : PHK : PLB SEP #$20 ; set 8-bit accumulator REP #$10 ; set 16-bit index registers LDA $00 : PHA LDA $01 : PHA LDA $02 : PHA STZ $1CF0 : STZ $1CF1 ; reset decompression buffer LDA.b #$01 : STA $7F5035 ; set flag %CopyDialog(<address>) PLA : STA $02 PLA : STA $01 PLA : STA $00 PLB PLP PLY : PLX : PLA endmacro ;-------------------------------------------------------------------------------- macro CopyDialog(address) LDA.b #<address> : STA $00 ; write pointer to direct page LDA.b #<address>>>8 : STA $01 LDA.b #<address>>>16 : STA $02 %CopyDialogIndirect() endmacro ;-------------------------------------------------------------------------------- macro CopyDialogIndirect() REP #$20 : LDA !OFFSET_POINTER : TAX : LDY.w #$0000 : SEP #$20 ; copy 2-byte offset pointer to X and set Y to 0 ?loop: LDA [$00], Y ; load the next character from the pointer STA !DIALOG_BUFFER, X ; write to the buffer INX : INY CMP.b #$7F : BNE ?loop REP #$20 ; set 16-bit accumulator TXA : INC : STA !OFFSET_RETURN ; copy out X into LDA.w #$0000 : STA !OFFSET_POINTER SEP #$20 ; set 8-bit accumulator endmacro ;-------------------------------------------------------------------------------- LoadDialogAddressIndirect: LDA.b #$01 : STA $7F5035 ; set flag %CopyDialogIndirect() ;%LoadDialogAddress(UncleText) RTL ;-------------------------------------------------------------------------------- !ITEM_TEMPORARY = "$7F5040" FreeDungeonItemNotice: STA !ITEM_TEMPORARY PHA : PHX : PHY PHP PHB : PHK : PLB SEP #$20 ; set 8-bit accumulator REP #$10 ; set 16-bit index registers LDA $00 : PHA LDA $01 : PHA LDA $02 : PHA ;-------------------------------- LDA.l FreeItemText : BNE + : BRL .skip : + LDA #$00 : STA $7F5010 ; initialize scratch LDA !ITEM_TEMPORARY CMP.b #$24 : BNE + ; general small key %CopyDialog(Notice_SmallKeyOf) LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER %CopyDialog(Notice_Self) BRL .done + : CMP.b #$25 : BNE + ; general compass %CopyDialog(Notice_CompassOf) LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER %CopyDialog(Notice_Self) BRL .done + : CMP.b #$33 : BNE + ; general map %CopyDialog(Notice_MapOf) LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER %CopyDialog(Notice_Self) BRL .done + : CMP.b #$32 : BNE + ; general big key %CopyDialog(Notice_BigKeyOf) LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER %CopyDialog(Notice_Self) BRL .done + AND.b #$F0 ; looking at high bits only CMP.b #$70 : BNE + ; map of... %CopyDialog(Notice_MapOf) BRL .dungeon + : CMP.b #$80 : BNE + ; compass of... %CopyDialog(Notice_CompassOf) BRL .dungeon + : CMP.b #$90 : BNE + ; big key of... %CopyDialog(Notice_BigKeyOf) BRA .dungeon + : CMP.b #$A0 : BNE + ; small key of... LDA !ITEM_TEMPORARY : CMP.b #$AF : BNE ++ : BRL .skip : ++ %CopyDialog(Notice_SmallKeyOf) PLA : AND.b #$0F : STA $7F5020 : LDA.b #$0F : !SUB $7F5020 : PHA LDA #$01 : STA $7F5010 ; set up a flip for small keys BRA .dungeon + BRL .skip ; it's not something we are going to give a notice for .dungeon LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER LDA !ITEM_TEMPORARY AND.b #$0F ; looking at low bits only STA $7F5011 LDA $7F5010 : BEQ + LDA $7F5010 LDA #$0F : !SUB $7F5011 : STA $7F5011 ; flip the values for small keys + LDA $7F5011 CMP.b #$00 : BNE + ; ...light world %CopyDialog(Notice_LightWorld) : BRL .done + : CMP.b #$01 : BNE + ; ...dark world %CopyDialog(Notice_DarkWorld) : BRL .done + : CMP.b #$02 : BNE + ; ...ganon's tower %CopyDialog(Notice_GTower) : BRL .done + : CMP.b #$03 : BNE + ; ...turtle rock %CopyDialog(Notice_TRock) : BRL .done + : CMP.b #$04 : BNE + ; ...thieves' town %CopyDialog(Notice_Thieves) : BRL .done + : CMP.b #$05 : BNE + ; ...tower of hera %CopyDialog(Notice_Hera) : BRL .done + : CMP.b #$06 : BNE + ; ...ice palace %CopyDialog(Notice_Ice) : BRL .done + : CMP.b #$07 : BNE + ; ...skull woods %CopyDialog(Notice_Skull) : BRL .done + : CMP.b #$08 : BNE + ; ...misery mire %CopyDialog(Notice_Mire) : BRL .done + : CMP.b #$09 : BNE + ; ...dark palace %CopyDialog(Notice_PoD) : BRL .done + : CMP.b #$0A : BNE + ; ...swamp palace %CopyDialog(Notice_Swamp) : BRL .done + : CMP.b #$0B : BNE + ; ...agahnim's tower %CopyDialog(Notice_AgaTower) : BRL .done + : CMP.b #$0C : BNE + ; ...desert palace %CopyDialog(Notice_Desert) : BRL .done + : CMP.b #$0D : BNE + ; ...eastern palace %CopyDialog(Notice_Eastern) : BRA .done + : CMP.b #$0E : BNE + ; ...hyrule castle %CopyDialog(Notice_Castle) : BRA .done + : CMP.b #$0F : BNE + ; ...sewers %CopyDialog(Notice_Sewers) + .done LDA.b #$01 : STA $7F5035 ; set alternate dialog flag LDA.b #$01 : STA $7F50A0 ;-------------------------------- PLA : STA $02 PLA : STA $01 PLA : STA $00 PLB PLP PLY : PLX : PLA ;JSL.l Main_ShowTextMessage RTL .skip ;-------------------------------- PLA : STA $02 PLA : STA $01 PLA : STA $00 PLB PLP PLY : PLX : PLA RTL ;-------------------------------------------------------------------------------- DialogBlind: %LoadDialogAddress(BlindText) JSL.l Sprite_ShowMessageMinimal RTL ;-------------------------------------------------------------------------------- DialogFairyThrow: LDA.l Restrict_Ponds : BEQ .normal LDA $7EF35C : ORA $7EF35D : ORA $7EF35E : ORA $7EF35F : BNE .normal .noInventory LDA $0D80, X : !ADD #$08 : STA $0D80, X LDA.b #$51 LDY.b #$01 RTL .normal LDA.b #$88 LDY.b #$00 RTL ;-------------------------------------------------------------------------------- DialogPyramidFairy: %LoadDialogAddress(PyramidFairyText) JSL.l Sprite_ShowMessageUnconditional RTL ;-------------------------------------------------------------------------------- DialogTriforce: %LoadDialogAddress(TriforceText) REP #$20 : LDA.w #$0171 : STA $1CF0 : SEP #$20 ; fix border JSL.l Main_ShowTextMessage JSL.l Messaging_Text RTL ;-------------------------------------------------------------------------------- DialogGanon1: JSL.l CheckGanonVulnerability : BCS + %LoadDialogAddress(GanonText1Alternate) BRA ++ + %LoadDialogAddress(GanonText1) ++ JSL.l Sprite_ShowMessageMinimal RTL ;-------------------------------------------------------------------------------- DialogGanon2: JSL.l CheckGanonVulnerability : BCS + %LoadDialogAddress(GanonText2Alternate) BRA ++ + %LoadDialogAddress(GanonText2) ++ JSL.l Sprite_ShowMessageMinimal RTL ;-------------------------------------------------------------------------------- DialogPedestal: PHA LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped - PLA : JSL Sprite_ShowMessageUnconditional ; Wacky Hylian Text RTL + BIT $F4 : BVC - ; Show normal text if Y is not pressed %LoadDialogAddress(MSPedestalText) PLA : JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) RTL ;-------------------------------------------------------------------------------- DialogEtherTablet: PHA LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped - PLA : JSL Sprite_ShowMessageUnconditional ; Wacky Hylian Text RTL + BIT $F4 : BVC - ; Show normal text if Y is not pressed LDA.l AllowHammerTablets : BEQ ++ LDA $7EF34B : BEQ .yesText : BRA .noText ++ LDA $7EF359 : CMP.b #$FF : BEQ .yesText : CMP.b #$02 : !BGE .noText ;++ .yesText %LoadDialogAddress(EtherTabletText) PLA : JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) RTL .noText PLA RTL ;-------------------------------------------------------------------------------- DialogBombosTablet: PHA LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped - PLA : JSL Sprite_ShowMessageUnconditional ; Wacky Hylian Text RTL + BIT $F4 : BVC - ; Show normal text if Y is not pressed LDA.l AllowHammerTablets : BEQ ++ LDA $7EF34B : BEQ .yesText : BRA .noText ++ LDA $7EF359 : CMP.b #$FF : BEQ .yesText : CMP.b #$02 : !BGE .noText ;++ .yesText %LoadDialogAddress(BombosTabletText) PLA : JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) RTL .noText PLA RTL ;-------------------------------------------------------------------------------- DialogUncle: ;%LoadDialog(UncleQuote,DialogUncleData) %LoadDialogAddress(UncleText) JSL Sprite_ShowMessageUnconditional RTL ;-------------------------------------------------------------------------------- DialogSahasrahla: LDA.l $7EF374 : AND #$04 : BEQ + ;Check if player has green pendant %LoadDialogAddress(SahasrahlaAfterItemText) JSL.l Sprite_ShowMessageUnconditional RTL + %LoadDialogAddress(SahasrahlaNoPendantText) JSL.l Sprite_ShowMessageUnconditional RTL ;-------------------------------------------------------------------------------- DialogAlcoholic: %LoadDialogAddress(AlcoholicText) JSL.l Sprite_ShowMessageUnconditional RTL ;-------------------------------------------------------------------------------- DialogBombShopGuy: LDA.l $7EF37A : AND #$05 : CMP #$05 : BEQ + ;Check if player has crystals 5 & 6 %LoadDialogAddress(BombShopGuyNoCrystalsText) JSL.l Sprite_ShowMessageUnconditional RTL + %LoadDialogAddress(BombShopGuyText) JSL.l Sprite_ShowMessageUnconditional RTL ;-------------------------------------------------------------------------------- ; A0 - A9 - 0 - 9 ; AA - C3 - A - Z ; C6 - ? ; C7 - ! ; C8 - , ; C9 - - Hyphen ; CD - Japanese period ; CE - ~ ; D8 - ` apostraphe ;;-------------------------------------------------------------------------------- ;DialogUncleData: ;;-------------------------------------------------------------------------------- ; .pointers ; dl #DialogUncleData_weetabix ; dl #DialogUncleData_bootlessUntilBoots ; dl #DialogUncleData_onlyOneBed ; dl #DialogUncleData_onlyTextBox ; dl #DialogUncleData_mothTutorial ; dl #DialogUncleData_seedWorst ; dl #DialogUncleData_chasingTail ; dl #DialogUncleData_doneBefore ; dl #DialogUncleData_capeCanPass ; dl #DialogUncleData_bootsAtRace ; dl #DialogUncleData_kanzeonSeed ; dl #DialogUncleData_notRealUncle ; dl #DialogUncleData_haveAVeryBadTime ; dl #DialogUncleData_todayBadLuck ; dl #DialogUncleData_leavingGoodbye ; dl #DialogUncleData_iGotThis ; dl #DialogUncleData_raceToCastle ; dl #DialogUncleData_69BlazeIt ; dl #DialogUncleData_hi ; dl #DialogUncleData_gettingSmokes ; dl #DialogUncleData_dangerousSeeYa ; dl #DialogUncleData_badEnoughDude ; dl #DialogUncleData_iAmError ; dl #DialogUncleData_sub2Guaranteed ; dl #DialogUncleData_chestSecretEverybody ; dl #DialogUncleData_findWindFish ; dl #DialogUncleData_shortcutToGanon ; dl #DialogUncleData_moonCrashing ; dl #DialogUncleData_fightVoldemort ; dl #DialogUncleData_redMailForCowards ; dl #DialogUncleData_heyListen ; dl #DialogUncleData_excuseMePrincess ;;-------------------------------------------------------------------------------- ; .weetabix ; ; We’re out of / Weetabix. To / the store! ; db $00, $c0, $00, $ae, $00, $d8, $00, $bb, $00, $ae, $00, $ff, $00, $b8, $00, $be, $00, $bd, $00, $ff, $00, $b8, $00, $af ; db $75, $00, $c0, $00, $ae, $00, $ae, $00, $bd, $00, $aa, $00, $ab, $00, $b2, $00, $c1, $00, $cD, $00, $ff, $00, $bd, $00, $b8 ; db $76, $00, $bd, $00, $b1, $00, $ae, $00, $ff, $00, $bc, $00, $bd, $00, $b8, $00, $bb, $00, $ae, $00, $c7 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .bootlessUntilBoots ; ; This seed is / bootless / until boots. ; db $00, $bd, $00, $b1, $00, $b2, $00, $bc, $00, $ff, $00, $bc, $00, $ae, $00, $ae, $00, $ad, $00, $ff, $00, $b2, $00, $bc ; db $75, $00, $ab, $00, $b8, $00, $b8, $00, $bd, $00, $b5, $00, $ae, $00, $bc, $00, $bc ; db $76, $00, $be, $00, $b7, $00, $bd, $00, $b2, $00, $b5, $00, $ff, $00, $ab, $00, $b8, $00, $b8, $00, $bd, $00, $bc, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .onlyOneBed ; ; Why do we only / have one bed? ; db $00, $c0, $00, $b1, $00, $c2, $00, $ff, $00, $ad, $00, $b8, $00, $ff, $00, $c0, $00, $ae, $00, $ff, $00, $b8, $00, $b7, $00, $b5, $00, $c2 ; db $75, $00, $b1, $00, $aa, $00, $bf, $00, $ae, $00, $ff, $00, $b8, $00, $b7, $00, $ae, $00, $ff, $00, $ab, $00, $ae, $00, $ad, $00, $c6 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .onlyTextBox ; ; This is the / only textbox. ; db $00, $bd, $00, $b1, $00, $b2, $00, $bc, $00, $ff, $00, $b2, $00, $bc, $00, $ff, $00, $bd, $00, $b1, $00, $ae ; db $75, $00, $b8, $00, $b7, $00, $b5, $00, $c2, $00, $ff, $00, $bd, $00, $ae, $00, $c1, $00, $bd, $00, $ab, $00, $b8, $00, $c1, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .mothTutorial ; ; I'm going to / go watch the / Moth tutorial. ; db $00, $b2, $00, $d8, $00, $b6, $00, $ff, $00, $b0, $00, $b8, $00, $b2, $00, $b7, $00, $b0, $00, $ff, $00, $bd, $00, $b8 ; db $75, $00, $b0, $00, $b8, $00, $ff, $00, $c0, $00, $aa, $00, $bd, $00, $ac, $00, $b1, $00, $ff, $00, $bd, $00, $b1, $00, $ae ; db $76, $00, $b6, $00, $b8, $00, $bd, $00, $b1, $00, $ff, $00, $bd, $00, $be, $00, $bd, $00, $b8, $00, $bb, $00, $b2, $00, $aa, $00, $b5, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .seedWorst ; ; This seed is / the worst. ; db $00, $bd, $00, $b1, $00, $b2, $00, $bc, $00, $ff, $00, $bc, $00, $ae, $00, $ae, $00, $ad, $00, $ff, $00, $b2, $00, $bc ; db $75, $00, $bd, $00, $b1, $00, $ae, $00, $ff, $00, $c0, $00, $b8, $00, $bb, $00, $bc, $00, $bd, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .chasingTail ; ; Chasing tail. / Fly ladies. / Do not follow. ; db $00, $ac, $00, $b1, $00, $aa, $00, $bc, $00, $b2, $00, $b7, $00, $b0, $00, $ff, $00, $bd, $00, $aa, $00, $b2, $00, $b5, $00, $cD ; db $75, $00, $af, $00, $b5, $00, $c2, $00, $ff, $00, $b5, $00, $aa, $00, $ad, $00, $b2, $00, $ae, $00, $bc, $00, $cD ; db $76, $00, $ad, $00, $b8, $00, $ff, $00, $b7, $00, $b8, $00, $bd, $00, $ff, $00, $af, $00, $b8, $00, $b5, $00, $b5, $00, $b8, $00, $c0, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .doneBefore ; ; I feel like / I’ve done this / before… ; db $00, $b2, $00, $ff, $00, $af, $00, $ae, $00, $ae, $00, $b5, $00, $ff, $00, $b5, $00, $b2, $00, $b4, $00, $ae ; db $75, $00, $b2, $00, $d8, $00, $bf, $00, $ae, $00, $ff, $00, $ad, $00, $b8, $00, $b7, $00, $ae, $00, $ff, $00, $bd, $00, $b1, $00, $b2, $00, $bc ; db $76, $00, $ab, $00, $ae, $00, $af, $00, $b8, $00, $bb, $00, $ae, $00, $cD, $00, $cD, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .capeCanPass ; ; Magic cape can / pass through / the barrier! ; db $00, $b6, $00, $aa, $00, $b0, $00, $b2, $00, $ac, $00, $ff, $00, $ac, $00, $aa, $00, $b9, $00, $ae, $00, $ff, $00, $ac, $00, $aa, $00, $b7 ; db $75, $00, $b9, $00, $aa, $00, $bc, $00, $bc, $00, $ff, $00, $bd, $00, $b1, $00, $bb, $00, $b8, $00, $be, $00, $b0, $00, $b1 ; db $76, $00, $bd, $00, $b1, $00, $ae, $00, $ff, $00, $ab, $00, $aa, $00, $bb, $00, $bb, $00, $b2, $00, $ae, $00, $bb, $00, $c7 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .bootsAtRace ; ; Boots at race? / Seed confirmed / impossible. ; db $00, $ab, $00, $b8, $00, $b8, $00, $bd, $00, $bc, $00, $ff, $00, $aa, $00, $bd, $00, $ff, $00, $bb, $00, $aa, $00, $ac, $00, $ae, $00, $c6 ; db $75, $00, $bc, $00, $ae, $00, $ae, $00, $ad, $00, $ff, $00, $ac, $00, $b8, $00, $b7, $00, $af, $00, $b2, $00, $bb, $00, $b6, $00, $ae, $00, $ad ; db $76, $00, $b2, $00, $b6, $00, $b9, $00, $b8, $00, $bc, $00, $bc, $00, $b2, $00, $ab, $00, $b5, $00, $ae, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .kanzeonSeed ; ; If this is a / Kanzeon seed, / I'm quitting. ; db $00, $b2, $00, $af, $00, $ff, $00, $bd, $00, $b1, $00, $b2, $00, $bc, $00, $ff, $00, $b2, $00, $bc, $00, $ff, $00, $aa ; db $75, $00, $b4, $00, $aa, $00, $b7, $00, $c3, $00, $ae, $00, $b8, $00, $b7, $00, $ff, $00, $bc, $00, $ae, $00, $ae, $00, $ad, $00, $c8 ; db $76, $00, $b2, $00, $d8, $00, $b6, $00, $ff, $00, $ba, $00, $be, $00, $b2, $00, $bd, $00, $bd, $00, $b2, $00, $b7, $00, $b0, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .notRealUncle ; ; I am not your / real uncle. ; db $00, $b2, $00, $ff, $00, $aa, $00, $b6, $00, $ff, $00, $b7, $00, $b8, $00, $bd, $00, $ff, $00, $c2, $00, $b8, $00, $be, $00, $bb ; db $75, $00, $bb, $00, $ae, $00, $aa, $00, $b5, $00, $ff, $00, $be, $00, $b7, $00, $ac, $00, $b5, $00, $ae, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .haveAVeryBadTime ; ; You're going / to have a very / bad time. ; db $00, $c2, $00, $b8, $00, $be, $00, $d8, $00, $bb, $00, $ae, $00, $ff, $00, $b0, $00, $b8, $00, $b2, $00, $b7, $00, $b0 ; db $75, $00, $bd, $00, $b8, $00, $ff, $00, $b1, $00, $aa, $00, $bf, $00, $ae, $00, $ff, $00, $aa, $00, $ff, $00, $bf, $00, $ae, $00, $bb, $00, $c2 ; db $76, $00, $ab, $00, $aa, $00, $ad, $00, $ff, $00, $bd, $00, $b2, $00, $b6, $00, $ae, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .todayBadLuck ; ; Today you / will have / bad luck. ; db $00, $bd, $00, $b8, $00, $ad, $00, $aa, $00, $c2, $00, $ff, $00, $c2, $00, $b8, $00, $be, $00, $ff, $00, $c0, $00, $b2, $00, $b5, $00, $b5 ; db $75, $00, $b1, $00, $aa, $00, $bf, $00, $ae, $00, $ff, $00, $ab, $00, $aa, $00, $ad, $00, $ff, $00, $b5, $00, $be, $00, $ac, $00, $b4, $00, $c7 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .leavingGoodbye ; ; I am leaving / forever. / Goodbye. ; db $00, $b2, $00, $ff, $00, $aa, $00, $b6, $00, $ff, $00, $b5, $00, $ae, $00, $aa, $00, $bf, $00, $b2, $00, $b7, $00, $b0 ; db $75, $00, $af, $00, $b8, $00, $bb, $00, $ae, $00, $bf, $00, $ae, $00, $bb, $00, $cD ; db $76, $00, $b0, $00, $b8, $00, $b8, $00, $ad, $00, $ab, $00, $c2, $00, $ae, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .iGotThis ; ; Don’t worry. / I got this / covered. ; db $00, $ad, $00, $b8, $00, $b7, $00, $d8, $00, $bd, $00, $ff, $00, $c0, $00, $b8, $00, $bb, $00, $bb, $00, $c2, $00, $cD ; db $75, $00, $b2, $00, $ff, $00, $b0, $00, $b8, $00, $bd, $00, $ff, $00, $bd, $00, $b1, $00, $b2, $00, $bc ; db $76, $00, $ac, $00, $b8, $00, $bf, $00, $ae, $00, $bb, $00, $ae, $00, $ad, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .raceToCastle ; ; Race you to / the castle! ; db $00, $bb, $00, $aa, $00, $ac, $00, $ae, $00, $ff, $00, $c2, $00, $b8, $00, $be, $00, $ff, $00, $bd, $00, $b8 ; db $75, $00, $bd, $00, $b1, $00, $ae, $00, $ff, $00, $ac, $00, $aa, $00, $bc, $00, $bd, $00, $b5, $00, $ae, $00, $c7 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .69BlazeIt ; ; ~69 Blaze It!~ ; db $75, $00, $cE, $00, $a6, $00, $a9, $00, $ff, $00, $ab, $00, $b5, $00, $aa, $00, $c3, $00, $ae, $00, $ff, $00, $b2, $00, $bd, $00, $c7, $00, $cE ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .hi ; ; hi ; db $75, $00, $ff, $00, $ff, $00, $ff, $00, $ff, $00, $ff, $00, $ff, $00, $b1, $00, $b2 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .gettingSmokes ; ; I'M JUST GOING / OUT FOR A / PACK OF SMOKES. ; db $00, $b2, $00, $d8, $00, $b6, $00, $ff, $00, $b3, $00, $be, $00, $bc, $00, $bd, $00, $ff, $00, $b0, $00, $b8, $00, $b2, $00, $b7, $00, $b0 ; db $75, $00, $b8, $00, $be, $00, $bd, $00, $ff, $00, $af, $00, $b8, $00, $bb, $00, $ff, $00, $aa ; db $76, $00, $b9, $00, $aa, $00, $ac, $00, $b4, $00, $ff, $00, $b8, $00, $af, $00, $ff, $00, $bc, $00, $b6, $00, $b8, $00, $b4, $00, $ae, $00, $bc, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .dangerousSeeYa ; ; It's dangerous / to go alone. / See ya! ; db $00, $b2, $00, $bd, $00, $d8, $00, $bc, $00, $ff, $00, $ad, $00, $aa, $00, $b7, $00, $b0, $00, $ae, $00, $bb, $00, $b8, $00, $be, $00, $bc ; db $75, $00, $bd, $00, $b8, $00, $ff, $00, $b0, $00, $b8, $00, $ff, $00, $aa, $00, $b5, $00, $b8, $00, $b7, $00, $ae, $00, $cD ; db $76, $00, $bc, $00, $ae, $00, $ae, $00, $ff, $00, $c2, $00, $aa, $00, $c7 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .badEnoughDude ; ; ARE YOU A BAD / ENOUGH DUDE TO / RESCUE ZELDA? ; db $00, $aa, $00, $bb, $00, $ae, $00, $ff, $00, $c2, $00, $b8, $00, $be, $00, $ff, $00, $aa, $00, $ff, $00, $ab, $00, $aa, $00, $ad ; db $75, $00, $ae, $00, $b7, $00, $b8, $00, $be, $00, $b0, $00, $b1, $00, $ff, $00, $ad, $00, $be, $00, $ad, $00, $ae, $00, $ff, $00, $bd, $00, $b8 ; db $76, $00, $bb, $00, $ae, $00, $bc, $00, $ac, $00, $be, $00, $ae, $00, $ff, $00, $c3, $00, $ae, $00, $b5, $00, $ad, $00, $aa, $00, $c6 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .iAmError ; ; I AM ERROR ; db $76, $00, $ff, $00, $ff, $00, $ff, $00, $ff, $00, $b2, $00, $ff, $00, $aa, $00, $b6, $00, $ff, $00, $ae, $00, $bb, $00, $bb, $00, $b8, $00, $bb ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .sub2Guaranteed ; ; This seed is / sub 2 hours, / guaranteed. ; db $00, $bd, $00, $b1, $00, $b2, $00, $bc, $00, $ff, $00, $bc, $00, $ae, $00, $ae, $00, $ad, $00, $ff, $00, $b2, $00, $bc ; db $75, $00, $bc, $00, $be, $00, $ab, $00, $ff, $00, $a2, $00, $ff, $00, $b1, $00, $b8, $00, $be, $00, $bb, $00, $bc, $00, $c8 ; db $76, $00, $b0, $00, $be, $00, $aa, $00, $bb, $00, $aa, $00, $b7, $00, $bd, $00, $ae, $00, $ae, $00, $ad, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .chestSecretEverybody ; ; The chest is / a secret to / everybody. ; db $00, $bd, $00, $b1, $00, $ae, $00, $ff, $00, $ac, $00, $b1, $00, $ae, $00, $bc, $00, $bd, $00, $ff, $00, $b2, $00, $bc ; db $75, $00, $aa, $00, $ff, $00, $bc, $00, $ae, $00, $ac, $00, $bb, $00, $ae, $00, $bd, $00, $ff, $00, $bd, $00, $b8 ; db $76, $00, $ae, $00, $bf, $00, $ae, $00, $bb, $00, $c2, $00, $ab, $00, $b8, $00, $ad, $00, $c2, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .findWindFish ; ; I'm off to / find the / wind fish. ; db $00, $b2, $00, $d8, $00, $b6, $00, $ff, $00, $b8, $00, $af, $00, $af, $00, $ff, $00, $bd, $00, $b8 ; db $75, $00, $af, $00, $b2, $00, $b7, $00, $ad, $00, $ff, $00, $bd, $00, $b1, $00, $ae ; db $76, $00, $c0, $00, $b2, $00, $b7, $00, $ad, $00, $ff, $00, $af, $00, $b2, $00, $bc, $00, $b1, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .shortcutToGanon ; ; The shortcut / to Ganon / is this way! ; db $00, $bd, $00, $b1, $00, $ae, $00, $ff, $00, $bc, $00, $b1, $00, $b8, $00, $bb, $00, $bd, $00, $ac, $00, $be, $00, $bd ; db $75, $00, $bd, $00, $b8, $00, $ff, $00, $b0, $00, $aa, $00, $b7, $00, $b8, $00, $b7 ; db $76, $00, $b2, $00, $bc, $00, $ff, $00, $bd, $00, $b1, $00, $b2, $00, $bc, $00, $ff, $00, $c0, $00, $aa, $00, $c2, $00, $c7 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .moonCrashing ; ; THE MOON IS / CRASHING! RUN / FOR YOUR LIFE! ; db $00, $bd, $00, $b1, $00, $ae, $00, $ff, $00, $b6, $00, $b8, $00, $b8, $00, $b7, $00, $ff, $00, $b2, $00, $bc ; db $75, $00, $ac, $00, $bb, $00, $aa, $00, $bc, $00, $b1, $00, $b2, $00, $b7, $00, $b0, $00, $c7, $00, $ff, $00, $bb, $00, $be, $00, $b7 ; db $76, $00, $af, $00, $b8, $00, $bb, $00, $ff, $00, $c2, $00, $b8, $00, $be, $00, $bb, $00, $ff, $00, $b5, $00, $b2, $00, $af, $00, $ae, $00, $c7 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .fightVoldemort ; ; Time to fight / he who must / not be named. ; db $00, $bd, $00, $b2, $00, $b6, $00, $ae, $00, $ff, $00, $bd, $00, $b8, $00, $ff, $00, $af, $00, $b2, $00, $b0, $00, $b1, $00, $bd ; db $75, $00, $b1, $00, $ae, $00, $ff, $00, $c0, $00, $b1, $00, $b8, $00, $ff, $00, $b6, $00, $be, $00, $bc, $00, $bd ; db $76, $00, $b7, $00, $b8, $00, $bd, $00, $ff, $00, $ab, $00, $ae, $00, $ff, $00, $b7, $00, $aa, $00, $b6, $00, $ae, $00, $ad, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .redMailForCowards ; ; RED MAIL / IS FOR / COWARDS. ; db $00, $bb, $00, $ae, $00, $ad, $00, $ff, $00, $b6, $00, $aa, $00, $b2, $00, $b5 ; db $75, $00, $b2, $00, $bc, $00, $ff, $00, $af, $00, $b8, $00, $bb ; db $76, $00, $ac, $00, $b8, $00, $c0, $00, $aa, $00, $bb, $00, $ad, $00, $bc, $00, $cD ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .heyListen ; ; HEY! / / LISTEN! ; db $00, $b1, $00, $ae, $00, $c2, $00, $c7 ; db $76, $00, $b5, $00, $b2, $00, $bc, $00, $bd, $00, $ae, $00, $b7, $00, $c7 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ; .excuseMePrincess ; ; Well / excuuuuuse me, / princess! ; db $00, $c0, $00, $ae, $00, $b5, $00, $b5 ; db $75, $00, $ae, $00, $c1, $00, $ac, $00, $be, $00, $be, $00, $be, $00, $be, $00, $be, $00, $bc, $00, $ae, $00, $ff, $00, $b6, $00, $ae, $00, $c8 ; db $76, $00, $b9, $00, $bb, $00, $b2, $00, $b7, $00, $ac, $00, $ae, $00, $bc, $00, $bc, $00, $c7 ; db $7f, $7f ;;-------------------------------------------------------------------------------- ^32nd
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r15 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0xaa5, %rbx nop nop lfence mov (%rbx), %r10 xor %r12, %r12 lea addresses_D_ht+0x7de5, %rsi lea addresses_UC_ht+0x18ae5, %rdi nop dec %rdx mov $70, %rcx rep movsl nop nop cmp %rcx, %rcx lea addresses_WC_ht+0x1232b, %r10 nop nop nop nop xor %rcx, %rcx mov $0x6162636465666768, %rdx movq %rdx, (%r10) nop add $49983, %rdx lea addresses_UC_ht+0x1c7d, %rdx clflush (%rdx) nop nop nop nop xor %rsi, %rsi movl $0x61626364, (%rdx) and %r10, %r10 lea addresses_A_ht+0x1c6e5, %rbx nop nop nop nop and %rcx, %rcx movb (%rbx), %r10b nop nop nop add $6613, %rcx lea addresses_A_ht+0x1044d, %rsi lea addresses_UC_ht+0xf2e5, %rdi clflush (%rdi) nop nop nop nop nop add $60748, %r15 mov $11, %rcx rep movsl nop nop nop and $9776, %r10 lea addresses_normal_ht+0x11e5, %rsi lea addresses_WT_ht+0x1e6a5, %rdi nop nop nop inc %r15 mov $54, %rcx rep movsw nop nop nop xor %rbx, %rbx lea addresses_D_ht+0x122e5, %r12 nop nop nop nop inc %r10 mov (%r12), %di nop nop nop nop nop inc %rcx lea addresses_UC_ht+0xe383, %rsi lea addresses_WT_ht+0xe2e5, %rdi nop nop nop nop inc %r12 mov $41, %rcx rep movsb nop nop nop nop nop sub $44452, %rdi lea addresses_A_ht+0x132e5, %rsi lea addresses_WT_ht+0x12499, %rdi nop nop nop nop nop and $40985, %rbx mov $120, %rcx rep movsw sub %r10, %r10 lea addresses_WC_ht+0xbee5, %rsi lea addresses_WT_ht+0x3ae5, %rdi nop nop nop nop cmp %r15, %r15 mov $58, %rcx rep movsl nop sub $11557, %r10 lea addresses_WC_ht+0x77e5, %r10 nop cmp %rbx, %rbx mov (%r10), %ecx cmp $27150, %rdi lea addresses_A_ht+0x1c325, %rsi lea addresses_normal_ht+0x6e5, %rdi nop nop nop and %rdx, %rdx mov $39, %rcx rep movsw nop sub $5794, %r12 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r15 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r15 push %rax push %rbp push %rcx // Load mov $0x2e5, %r11 cmp $3235, %r12 mov (%r11), %cx nop nop nop nop nop add $24432, %rcx // Store lea addresses_normal+0x167e5, %rcx nop nop nop nop nop cmp $63399, %r10 movb $0x51, (%rcx) nop nop nop nop nop xor %r10, %r10 // Faulty Load mov $0x2e5, %rax clflush (%rax) nop nop nop nop and %rcx, %rcx movntdqa (%rax), %xmm0 vpextrq $0, %xmm0, %r15 lea oracles, %r10 and $0xff, %r15 shlq $12, %r15 mov (%r10,%r15,1), %r15 pop %rcx pop %rbp pop %rax pop %r15 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 7}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_P', 'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 1}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 10}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_A_ht'}, 'dst': {'same': True, 'congruent': 9, 'type': 'addresses_UC_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 8}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_WT_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}} {'46': 104, '00': 21693, '45': 31, '44': 1} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 %r10 push %r15 push %r8 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_WC_ht+0x14675, %rsi lea addresses_WC_ht+0x9b55, %rdi nop nop inc %r9 mov $82, %rcx rep movsq nop nop xor $61817, %rax lea addresses_WC_ht+0x5f95, %r15 nop nop inc %r10 movb (%r15), %al nop nop cmp %r9, %r9 lea addresses_D_ht+0xcc5d, %rsi lea addresses_normal_ht+0x6dd5, %rdi nop nop nop nop nop cmp $6952, %r15 mov $90, %rcx rep movsw nop nop xor %rdi, %rdi lea addresses_D_ht+0x16f95, %rsi lea addresses_WC_ht+0x2739, %rdi nop nop nop nop xor %r8, %r8 mov $20, %rcx rep movsl inc %r15 lea addresses_D_ht+0x1c195, %rsi lea addresses_WC_ht+0x1cefa, %rdi nop nop add %r10, %r10 mov $34, %rcx rep movsb nop cmp %rcx, %rcx lea addresses_WT_ht+0x3795, %rsi nop nop nop nop nop cmp $30452, %r15 mov (%rsi), %ecx nop add $56845, %rax lea addresses_D_ht+0x9c17, %rdi nop nop nop nop xor %r15, %r15 mov $0x6162636465666768, %r8 movq %r8, %xmm5 movups %xmm5, (%rdi) inc %r9 lea addresses_WC_ht+0x14f95, %rsi lea addresses_UC_ht+0x16dad, %rdi inc %r15 mov $46, %rcx rep movsb nop nop nop nop dec %r8 lea addresses_UC_ht+0x1c7f5, %rsi lea addresses_WT_ht+0xd9f5, %rdi xor %r9, %r9 mov $55, %rcx rep movsq nop nop nop nop nop xor $38601, %rsi lea addresses_WT_ht+0xd98d, %r9 nop sub %r10, %r10 movl $0x61626364, (%r9) nop nop nop nop inc %rax lea addresses_normal_ht+0x11ee1, %r8 nop nop nop nop nop cmp $46833, %rcx mov (%r8), %esi nop nop nop nop nop and $35753, %rcx pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r15 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r15 push %r8 push %rbx push %rcx push %rsi // Store lea addresses_normal+0x16b25, %r15 nop nop nop nop nop add $52271, %r13 movl $0x51525354, (%r15) cmp %r8, %r8 // Faulty Load lea addresses_D+0x15795, %r8 nop nop nop nop xor $29784, %rcx movups (%r8), %xmm3 vpextrq $0, %xmm3, %r13 lea oracles, %rbx and $0xff, %r13 shlq $12, %r13 mov (%rbx,%r13,1), %r13 pop %rsi pop %rcx pop %rbx pop %r8 pop %r15 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_D'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 6, 'same': True, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: ASCII Only print drivers FILE: printcomNoGraphics.asm AUTHOR: Dave Durran 1 March 1990 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Dave 3/1/90 Initial revision DESCRIPTION: dummy far graphic routines. $Id: printcomNoGraphics.asm,v 1.1 97/04/18 11:50:17 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrintSwath proc far clc ret PrintSwath endp
############################################################################### # Copyright 2018 Intel Corporation # All Rights Reserved. # # If this software was obtained under the Intel Simplified Software License, # the following terms apply: # # The source code, information and material ("Material") contained herein is # owned by Intel Corporation or its suppliers or licensors, and title to such # Material remains with Intel Corporation or its suppliers or licensors. The # Material contains proprietary information of Intel or its suppliers and # licensors. The Material is protected by worldwide copyright laws and treaty # provisions. No part of the Material may be used, copied, reproduced, # modified, published, uploaded, posted, transmitted, distributed or disclosed # in any way without Intel's prior express written permission. No license under # any patent, copyright or other intellectual property rights in the Material # is granted to or conferred upon you, either expressly, by implication, # inducement, estoppel or otherwise. Any license under such intellectual # property rights must be express and approved by Intel in writing. # # Unless otherwise agreed by Intel in writing, you may not remove or alter this # notice or any other notice embedded in Materials by Intel or Intel's # suppliers or licensors in any way. # # # If this software was obtained under the Apache License, Version 2.0 (the # "License"), the following terms apply: # # You may not use this file except in compliance with the License. You may # obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 # # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### .section .note.GNU-stack,"",%progbits .text .p2align 5, 0x90 CONST_TABLE: _u128_str: .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 .p2align 5, 0x90 .globl g9_GCMmul_avx .type g9_GCMmul_avx, @function g9_GCMmul_avx: push %ebp mov %esp, %ebp push %esi push %edi movl (12)(%ebp), %edi movl (8)(%ebp), %esi lea CONST_TABLE, %eax movdqu (%edi), %xmm1 movdqu (%esi), %xmm0 pshufb ((_u128_str-CONST_TABLE))(%eax), %xmm1 pshufd $(78), %xmm0, %xmm4 pshufd $(78), %xmm1, %xmm5 pxor %xmm0, %xmm4 pxor %xmm1, %xmm5 pclmulqdq $(0), %xmm5, %xmm4 movdqu %xmm0, %xmm3 pclmulqdq $(0), %xmm1, %xmm3 movdqu %xmm0, %xmm6 pclmulqdq $(17), %xmm1, %xmm6 pxor %xmm5, %xmm5 pxor %xmm3, %xmm4 pxor %xmm6, %xmm4 palignr $(8), %xmm4, %xmm5 pslldq $(8), %xmm4 pxor %xmm4, %xmm3 pxor %xmm5, %xmm6 movdqu %xmm3, %xmm4 movdqu %xmm6, %xmm5 pslld $(1), %xmm3 pslld $(1), %xmm6 psrld $(31), %xmm4 psrld $(31), %xmm5 palignr $(12), %xmm4, %xmm5 pslldq $(4), %xmm4 por %xmm4, %xmm3 por %xmm5, %xmm6 movdqu %xmm3, %xmm0 movdqu %xmm3, %xmm1 movdqu %xmm3, %xmm2 pslld $(31), %xmm0 pslld $(30), %xmm1 pslld $(25), %xmm2 pxor %xmm1, %xmm0 pxor %xmm2, %xmm0 movdqu %xmm0, %xmm1 pslldq $(12), %xmm0 pxor %xmm0, %xmm3 movdqu %xmm3, %xmm2 movdqu %xmm3, %xmm4 movdqu %xmm3, %xmm5 psrldq $(4), %xmm1 psrld $(1), %xmm2 psrld $(2), %xmm4 psrld $(7), %xmm5 pxor %xmm4, %xmm2 pxor %xmm5, %xmm2 pxor %xmm1, %xmm2 pxor %xmm2, %xmm3 pxor %xmm3, %xmm6 pshufb ((_u128_str-CONST_TABLE))(%eax), %xmm6 movdqu %xmm6, (%edi) pop %edi pop %esi pop %ebp ret .Lfe1: .size g9_GCMmul_avx, .Lfe1-(g9_GCMmul_avx)
; vim: tw=78:ft=asm:ts=8:sw=8:noet ; $Id: new30.asm,v 1.3 2005/12/27 11:45:11 crq Exp $ BITS 32 section .data float2: db '%20.17lf, ' float1: db '%20.17lf,', 0xa, 0 section .text extern printf global _start ; memory stack space: ; stack top: [esp+24]: [ebp] ; counter: [esp+20]: [ebp-4] ; 2 double: [esp+4]: [ebp-20] ; fmtstr: [esp]: [ebp-24] ; FPU register stack: ; st0: M_PI/180.0 ; st1: M_PI/180.0 * degree _start: fldpi sub esp,24 mov ebp,esp fst qword [ebp+4] mov dword [ebp],float1 call printf xor ebx,ebx mov dword [ebp+20],ebx mov bl,180 mov dword [ebp+4],ebx fidiv dword [ebp+4] fst qword [ebp+4] call printf mov dword [ebp],float2 shr ebx,1 .loop0: fld st0 fimul dword [ebp+20] fsincos fstp qword [ebp+12] fstp qword [ebp+4] call printf inc dword [ebp+20] cmp dword [ebp+20],ebx jle .loop0 ; fstp ...; fix the FPU stack, not required ; addesp,24; fix the CPU stack, not required xor ebx,ebx xor eax,eax inc eax int 0x80 ; __END__
; A081346: First column in maze arrangement of natural numbers A081344. ; 1,2,9,10,25,26,49,50,81,82,121,122,169,170,225,226,289,290,361,362,441,442,529,530,625,626,729,730,841,842,961,962,1089,1090,1225,1226,1369,1370,1521,1522,1681,1682,1849,1850,2025,2026,2209,2210,2401,2402,2601,2602,2809,2810,3025,3026,3249,3250,3481,3482,3721,3722,3969,3970,4225,4226,4489,4490,4761,4762,5041,5042,5329,5330,5625,5626,5929,5930,6241,6242,6561,6562,6889,6890,7225,7226,7569,7570,7921,7922,8281,8282,8649,8650,9025,9026,9409,9410,9801,9802 mov $3,$0 sub $0,1 gcd $0,2 div $0,2 add $3,1 sub $3,$0 mov $2,$3 mul $2,$3 add $0,$2
;/*! ; @file ; ; @ingroup fapi ; ; @brief DosDevIOCtl Category 8 Functions ; ; (c) osFree Project 2021, <http://www.osFree.org> ; for licence see licence.txt in root directory, or project website ; ; This is Family API implementation for DOS, used with BIND tools ; to link required API ; ; @author Yuri Prokushev (yuri.prokushev@gmail.com) ; ; Documentation: http://osfree.org/doku/en:docs:fapi:dosdevioctl ; ;*/ _DATA SEGMENT BYTE PUBLIC 'DATA' USE16 DSKTABLE1: DW IODLOCK ; Function 00H Lock Drive - not supported for versions below DOS 3.2 DW IODUNLOCK ; Function 01H Unlock Drive - not supported for versions below DOS 3.2 DW IODREDETERMINE ; Function 02H Redetermine Media - not supported for versions below DOS 3.2 DW IODSETMAP ; Function 03H Set Logical Map - not supported for versions below DOS 3.2 DSKTABLE2: DW IODBLOCKREMOVABLE ; Function 20H Block Removable - not supported for versions below DOS 3.2 DW IODGETMAP ; Function 21H Get Logical Map - not supported for versions below DOS 3.2 DSKTABLE3: DW IODSETPARAM ; Function 43H Set Device Parameters - not supported for DOS 2.X and DOS 3.X DW IODWRITETRACK ; Function 44H Write Track - not supported for DOS 2.X and DOS 3.X DW IODFORMATTRACK ; Function 45H Format Track - not supported for DOS 2.X and DOS 3.X DSKTABLE4: DW IODGETPARAM ; Function 63H Get Device Parameters - not supported for DOS 2.X and DOS 3.X DW IODREADTACK ; Function 64H Read Track - not supported for DOS 2.X and DOS 3.X DW IODVERIFYTRACK ; Function 65H Verify Track - not supported for DOS 2.X and DOS 3.X. _DATA ENDS _TEXT SEGMENT BYTE PUBLIC 'CODE' USE16 ;-------------------------------------------------------- ; Category 8 Handler ;-------------------------------------------------------- IODISK PROC NEAR MOV SI, [DS:BP].ARGS.FUNCTION CMP SI, 00H ; 00H JB EXIT CMP SI, 03H ; 03H JB OK1 SUB SI, 20H ; 20H JB EXIT CMP SI, 01H ; 21H JBE OK2 SUB SI, 23H ; 43H JB EXIT CMP SI, 02H ; 45H JBE OK3 SUB SI, 20H ; 63H JB EXIT CMP SI, 02H ; 65H JBE OK4 OK1: SHL SI, 1 ; SHL SI, 1 CALL WORD PTR ES:DSKTABLE1[SI] JMP EXIT OK2: SHL SI, 1 ; SHL SI, 1 CALL WORD PTR ES:DSKTABLE2[SI] JMP EXIT OK3: SHL SI, 1 ; SHL SI, 1 CALL WORD PTR ES:DSKTABLE3[SI] JMP EXIT OK4: SHL SI, 1 ; SHL SI, 1 CALL WORD PTR ES:DSKTABLE4[SI] EXIT: RET IODISK ENDP INCLUDE IodLock.asm INCLUDE IodUnLock.asm INCLUDE IodRedetermine.asm INCLUDE IodSetMap.asm INCLUDE IodBlockRemovable.asm INCLUDE IodGetMap.asm INCLUDE IodSetParam.asm INCLUDE IodWriteTrack.asm INCLUDE IodFormatTrack.asm INCLUDE IodGetParam.asm INCLUDE IodReadTrack.asm INCLUDE IodVerifyTrack.asm _TEXT ENDS
#ifndef TRIUMF_NMR_SPECTRAL_DENSITY_HPP #define TRIUMF_NMR_SPECTRAL_DENSITY_HPP // Author: Ryan M. L. McFadden // NMR spectral density functions for spin-lattice relaxation in solids. // // For additional details see: // // N. Bloembergen, E. M. Purcell, and R. V. Pound, "Relaxation Effects in // Nuclear Magnetic Resonance Absorption", Phys. Rev. 73, 679-712 (1948). // https://dx.doi.org/10.1103/PhysRev.73.679 // // P. M. Richards, "Effect of low dimensionality on prefactor anomalies in // superionic conductors", Solid State Commun. 25, 1019-1021 (1978). // https://dx.doi.org/10.1016/0038-1098(78)90896-7 // // C. A Sholl, "Nuclear spin relaxation by translational diffusion in liquids // and solids: high- and low-frequency limits", J. Phys. C.: Solid State Phys. // 14, 447-464 (1981). https://dx.doi.org/10.1088/0022-3719/14/4/018 // // P. A. Beckmann, "Spectral densities and nuclear spin relaxation in solids", // Phys. Rep. 171, 85-128 (1988). // https://dx.doi.org/10.1016/0370-1573(88)90073-7 // // W. Küchler, P. Heitjans, A. Payer, and R. Schöllhorn, "7Li NMR relaxation by // diffusion in hexagonal and cubic LixTiS2". Solid State Ionics 70-71, Part 1, // 434-438 (1994). https://dx.doi.org/10.1016/0167-2738(94)90350-6 // #include <cmath> #include <iostream> #include <boost/math/constants/constants.hpp> #include <triumf/constants/codata_2018.hpp> // TRIUMF: Canada's particle accelerator centre namespace triumf { // Nuclear Magnetic Resonance (NMR) namespace nmr { // Arrhenius correlation time template <typename T = double> T tau_c(T temperature, T prefactor, T activation_energy) { constexpr T boltzmann_constant = triumf::constants::codata_2018::Boltzmann_constant_in_eV_K<T>::value(); if (temperature <= 0.0 or prefactor <= 0.0 or activation_energy < 0.0) { return 0.0; } else { return prefactor * std::exp(activation_energy / (boltzmann_constant * temperature)); } } // Arrhenius correlation rate template <typename T = double> T nu_c(T temperature, T prefactor, T activation_energy) { constexpr T boltzmann_constant = triumf::constants::codata_2018::Boltzmann_constant_in_eV_K<T>::value(); if (temperature <= 0.0 or prefactor <= 0.0 or activation_energy < 0.0) { return 0.0; } else { return prefactor * std::exp(-activation_energy / (boltzmann_constant * temperature)); } } // Bloembergen-Purcell-Pound (i.e., Debye) - isotropic 3D fluctuations template <typename T = double> T j_3d(T correlation_time, T nmr_frequency, T interaction_strength, T stretching_exponent) { if (correlation_time < 0 or nmr_frequency < 0 or interaction_strength <= 0) { return 0.0; } if (stretching_exponent > 2 or stretching_exponent < 1) { std::cout << "WARNING : stretching exponent outside of bounds : [1, 2]" << std::endl; return 0.0; } return interaction_strength * 2.0 * correlation_time / (1.0 + std::pow(nmr_frequency * correlation_time, stretching_exponent)); } // Richards - empirocal function for 2D fluctuations that gives correct // asymptotic limits template <typename T = double> T j_2d(T correlation_time, T nmr_frequency, T interaction_strength, T stretching_exponent) { if (correlation_time < 0 or nmr_frequency < 0 or interaction_strength <= 0) { return 0.0; } if (stretching_exponent > 2 or stretching_exponent < 1) { std::cout << "WARNING : stretching exponent outside of bounds : [1, 2]" << std::endl; return 0.0; } return interaction_strength * correlation_time * std::log1p( std::pow(nmr_frequency * correlation_time, -stretching_exponent)); } // Cole-Cole - correlated motion (j_cc -> j_bpp as stretching_exponent -> 1) template <typename T = double> T j_cc(T correlation_time, T nmr_frequency, T interaction_strength, T stretching_exponent) { if (correlation_time < 0 or nmr_frequency < 0 or interaction_strength <= 0) { return 0.0; } if (stretching_exponent > 1 or stretching_exponent <= 0) { std::cout << "WARNING : stretching exponent outside of bounds : (0, 1]" << std::endl; return 0.0; } return interaction_strength * (2.0 / nmr_frequency) * std::sin(stretching_exponent * boost::math::constants::pi<T>() / 2.0) * (std::pow(nmr_frequency * correlation_time, stretching_exponent) / (1.0 + std::pow(nmr_frequency * correlation_time, 2.0 * stretching_exponent) + 2.0 * std::cos(stretching_exponent * boost::math::constants::pi<T>() / 2.0) * std::pow(nmr_frequency * correlation_time, stretching_exponent))); } // Davidson-Cole - distribution of barriers (j_dc -> j_bpp as // stretching_exponent -> 1) template <typename T = double> T j_dc(T correlation_time, T nmr_frequency, T interaction_strength, T stretching_exponent) { if (correlation_time < 0 or nmr_frequency < 0 or interaction_strength <= 0) { return 0.0; } if (stretching_exponent > 1 or stretching_exponent <= 0) { std::cout << "WARNING : stretching exponent outside of bounds : (0, 1]" << std::endl; return 0.0; } return interaction_strength * (2.0 / nmr_frequency) * std::sin(stretching_exponent * std::atan(nmr_frequency * correlation_time)) / std::pow(1.0 + nmr_frequency * nmr_frequency * correlation_time * correlation_time, stretching_exponent / 2.0); } // Fang - mirror image of Davidson-Cole template <typename T = double> T j_fang(T correlation_time, T nmr_frequency, T interaction_strength, T stretching_exponent) { if (correlation_time < 0 or nmr_frequency < 0 or interaction_strength <= 0) { return 0.0; } if (stretching_exponent > 1 or stretching_exponent <= 0) { std::cout << "WARNING : stretching exponent outside of bounds : (0, 1]" << std::endl; return 0.0; } return interaction_strength * (2.0 / nmr_frequency) * std::pow(nmr_frequency * correlation_time, stretching_exponent) * std::sin(stretching_exponent * std::atan(1.0 / (nmr_frequency * correlation_time))) / std::pow(1.0 + std::pow(nmr_frequency * correlation_time, 2.0), stretching_exponent / 2.0); } // Fuoss-Kirkwood - distribution of correlation times template <typename T = double> T j_fk(T correlation_time, T nmr_frequency, T interaction_strength, T stretching_exponent) { if (correlation_time < 0 or nmr_frequency < 0 or interaction_strength <= 0) { return 0.0; } if (stretching_exponent > 1 or stretching_exponent <= 0) { std::cout << "WARNING : stretching exponent outside of bounds : (0, 1]" << std::endl; return 0.0; } return interaction_strength * (2.0 * stretching_exponent / nmr_frequency) * std::pow(nmr_frequency * correlation_time, stretching_exponent) / (1.0 + std::pow(nmr_frequency * correlation_time, 2.0 * stretching_exponent)); } // Havriliak-Negami - correlated motion w/ distribution of barriers // - delta ~ measure of correlations // - delta*epsilon ~ measure of a spread in barriers template <typename T = double> T j_hn(T correlation_time, T nmr_frequency, T interaction_strength, T delta, T epsilon) { if (correlation_time < 0 or nmr_frequency < 0 or interaction_strength <= 0) { return 0.0; } if (delta > 1 or delta <= 0 or epsilon > 1.0 / delta or epsilon <= 0) { std::cout << "WARNING : stretching exponents outside of bounds : delta -> " "(0, 1]\n"; std::cout << " epsilon " "-> (0, 1/delta]" << std::endl; return 0.0; } return interaction_strength * (2.0 / nmr_frequency) * (std::sin( epsilon * std::atan( (std::pow(nmr_frequency * correlation_time, delta) * std::sin(delta * boost::math::constants::pi<T>() / 2.0)) / (1.0 + std::pow(nmr_frequency * correlation_time, delta) * std::cos(delta * boost::math::constants::pi<T>() / 2.0))))) * std::pow( 1.0 + 2.0 * std::pow(nmr_frequency * correlation_time, delta) * std::cos(delta * boost::math::constants::pi<T>() / 2.0) + std::pow(nmr_frequency * correlation_time, 2.0 * delta), -epsilon / 2.0); } // Bryn-Mawr // double j_bm(double correlation_time, double nmr_frequency, double // interaction_strength = 1, double epsilon = 1, double eta = 1); // Wagner (i.e., log-Gaussian) // double j_lg(double correlation_time, double nmr_frequency, double // interaction_strength = 1, double width = 1); // log-Lorentzian // double j_ll(double correlation_time, double nmr_frequency, double // interaction_strength = 1, double width = 1); // Frolich (i.e., energy box) // double j_eb(double correlation_time, double nmr_frequency, double // interaction_strength = 1, ...); // Power law : power = 1 (e.g., Korringa); power = 2 (e.g., phonon); power = 3 // (e.g., [Dirac] orbital) template <typename T = double> T j_pow(T temperature, T intercept, T constant, T power) { if (temperature <= 0.0) { return 0.0; } if (constant == 0.0) { return intercept; } return intercept + constant * std::pow(temperature, power); } } // namespace nmr } // namespace triumf #endif // TRIUMF_NMR_SPECTRAL_DENSITY_HPP
rnd: push bx push di push es in ax,40h mov bx,[rndt1] xor ax,[bx] mov di,ax push [rndt2] pop es xor ax,[es:di] push word [rndt1] pop word [rndt2] mov [rndt1],ax pop es pop di pop bx ret rndt1 dw 0 rndt2 dw 0
//===-- MCTargetAsmParser.cpp - Target Assembly Parser ---------------------==// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "llvm/MC/MCTargetAsmParser.h" using namespace llvm; MCTargetAsmParser::MCTargetAsmParser(MCTargetOptions const &MCOptions) : AvailableFeatures(0), ParsingInlineAsm(false), MCOptions(MCOptions) { } MCTargetAsmParser::~MCTargetAsmParser() { }
;============================================================ ; Example 1-3 ; Cycling screen colors ;============================================================ !cpu 6502 !to "build/example1-3.prg",cbm * = $1000 loop: lda $d012 ; load $d012 value into A register ; $d012 is the current raster line cmp #$00 ; compare it to #$00 bne loop ; if not equal, keep checking inc $d021 ; change screen color jmp loop ; repeat
; A006668: Exponential self-convolution of Pell numbers (divided by 2). ; Submitted by Jon Maiga ; 0,0,1,6,32,160,784,3808,18432,89088,430336,2078208,10035200,48455680,233967616,1129701376,5454692352,26337607680,127169265664,614027624448,2964787822592,14315262312448,69120201588736,333741857701888,1611448241356800,7780760404623360,37568834600697856,181398380054839296,875868858689257472,4229068955110604800,20419751255467884544,98595280842850828288,476060128394348593152,2298621636950945169408,11098727061385470017536,53589394793354250682368,258752487418976062668800,1249367528849355613143040 mov $2,2 lpb $0 sub $0,1 mul $4,4 add $5,$2 mul $2,2 mov $3,$5 mov $5,$4 add $4,$3 lpe mov $0,$5 div $0,8
Entity start No options Constants 0 S start 1 S antes da chamada a start::x 2 I 1 3 S io.writeln 4 S x 5 S depois da chamada a start::x 6 S antes da chamada a start::y 7 S y 8 S depois da chamada a start::y 9 S e 10 S antes da chamada a elemento::x 11 S elemento 12 S depois da chamada a elemento::x End Valid context (always) No properties Def start No parameters No local variables No results ldconst 1 --> [antes da chamada a start::x] ldconst 2 --> [1] lcall 3 --> [io.writeln] ldself mcall 4 --> [x] ldconst 5 --> [depois da chamada a start::x] ldconst 2 --> [1] lcall 3 --> [io.writeln] stop End Def x No parameters No local variables No results ldconst 6 --> [antes da chamada a start::y] ldconst 2 --> [1] lcall 3 --> [io.writeln] ldself mcall 7 --> [y] ldconst 8 --> [depois da chamada a start::y] ldconst 2 --> [1] lcall 3 --> [io.writeln] ret End Def y No parameters Local variables 0 element e End No results ldconst 10 --> [antes da chamada a elemento::x] ldconst 2 --> [1] lcall 3 --> [io.writeln] newelem 11 --> [elemento] stvar 0 --> [e] ldvar 0 --> [e] mcall 4 --> [x] ldconst 12 --> [depois da chamada a elemento::x] ldconst 2 --> [1] lcall 3 --> [io.writeln] ret End End Entity elemento No options Constants 0 S elemento 1 S x 2 S antes da chamada a elemento::y 3 I 1 4 S io.writeln 5 S y 6 S depois da chamada a elemento::y 7 S no metodo elemento::y End Valid context (always) No properties Def x No parameters No local variables No results ldconst 2 --> [antes da chamada a elemento::y] ldconst 3 --> [1] lcall 4 --> [io.writeln] ldself mcall 5 --> [y] ldconst 6 --> [depois da chamada a elemento::y] ldconst 3 --> [1] lcall 4 --> [io.writeln] ret End Def y No parameters No local variables No results ldconst 7 --> [no metodo elemento::y] ldconst 3 --> [1] lcall 4 --> [io.writeln] ret End End
/************************************************************************************** Copyright 2015 Applied Research Associates, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. **************************************************************************************/ #include <biogears/cdm/patient/conditions/SEChronicAnemia.h> #include <biogears/cdm/properties/SEScalar0To1.h> #include <biogears/cdm/stdafx.h> #include <biogears/schema/ChronicAnemiaData.hxx> #include <biogears/schema/Scalar0To1Data.hxx> SEChronicAnemia::SEChronicAnemia() : SEPatientCondition() { m_ReductionFactor = nullptr; } SEChronicAnemia::~SEChronicAnemia() { Clear(); } void SEChronicAnemia::Clear() { SEPatientCondition::Clear(); SAFE_DELETE(m_ReductionFactor); } bool SEChronicAnemia::IsValid() const { return SEPatientCondition::IsValid() && HasReductionFactor(); } bool SEChronicAnemia::Load(const CDM::ChronicAnemiaData& in) { SEPatientCondition::Load(in); GetReductionFactor().Load(in.ReductionFactor()); return true; } CDM::ChronicAnemiaData* SEChronicAnemia::Unload() const { CDM::ChronicAnemiaData* data(new CDM::ChronicAnemiaData()); Unload(*data); return data; } void SEChronicAnemia::Unload(CDM::ChronicAnemiaData& data) const { SEPatientCondition::Unload(data); if (m_ReductionFactor != nullptr) data.ReductionFactor(std::unique_ptr<CDM::Scalar0To1Data>(m_ReductionFactor->Unload())); } bool SEChronicAnemia::HasReductionFactor() const { return m_ReductionFactor == nullptr ? false : m_ReductionFactor->IsValid(); } SEScalar0To1& SEChronicAnemia::GetReductionFactor() { if (m_ReductionFactor == nullptr) m_ReductionFactor = new SEScalar0To1(); return *m_ReductionFactor; } void SEChronicAnemia::ToString(std::ostream& str) const { str << "Patient Condition : Anemia"; if (HasComment()) str << "\n\tComment: " << m_Comment; str << "\n\tReduction Factor: "; HasReductionFactor() ? str << m_ReductionFactor : str << "NaN"; str << std::flush; }
// Copyright 2014 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 "base/bind.h" #include "build/build_config.h" #include "content/public/browser/browser_context.h" #include "ui/views/examples/examples_window_with_content.h" #include "ui/views_content_client/views_content_client.h" #if defined(OS_WIN) #include "content/public/app/sandbox_helper_win.h" #include "sandbox/win/src/sandbox_types.h" #endif namespace { void ShowContentExampleWindow(content::BrowserContext* browser_context, gfx::NativeWindow window_context) { views::examples::ShowExamplesWindowWithContent(views::examples::QUIT_ON_CLOSE, browser_context, window_context); // These lines serve no purpose other than to introduce an explicit content // dependency. If the main executable doesn't have this dependency, the linker // has more flexibility to reorder library dependencies in a shared component // build. On linux, this can cause libc to appear before libcontent in the // dlsym search path, which breaks (usually valid) assumptions made in // sandbox::InitLibcUrandomOverrides(). See http://crbug.com/374712. if (!browser_context) { content::BrowserContext::SaveSessionState(NULL); NOTREACHED(); } } } // namespace #if defined(OS_WIN) int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { sandbox::SandboxInterfaceInfo sandbox_info = {0}; content::InitializeSandboxInfo(&sandbox_info); ui::ViewsContentClient views_content_client(instance, &sandbox_info); #else int main(int argc, const char** argv) { ui::ViewsContentClient views_content_client(argc, argv); #endif views_content_client.set_task(base::Bind(&ShowContentExampleWindow)); return views_content_client.RunMain(); }
.include "..\..\..\Cpu\TestFiles\std.6502.asm" * = $0000 ; cycles ldx #$ab ; 01 - 02 ldx #$ab ; 03 - 04 inx ; 05 - 06 inx ; 07 - 08 iny ; 09 - 10 iny ; 11 - 12 brk ; 13 - 19 nop ; BRK pushes PC + 1 to the stack so RTI will actually return the instruction just after this NOP. .done ; NMI handler. * = $1200 sed ; The D flag should be unset when entering the NMI. Set it to test to ensure that P is loaded correctly after RTI. rti * = $fff0 rti * = $fffa nmi .addr $1200 reset .addr $0000 irq .addr $fff0
// // Worker.hh // // Copyright (c) 2017 Couchbase, Inc 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. // #pragma once #include "Actor.hh" #include "BLIPConnection.hh" #include "Message.hh" #include "Increment.hh" #include "Timer.hh" #include "c4.hh" #include "c4Private.h" #include "FleeceCpp.hh" #include "Error.hh" #include <chrono> #include <functional> namespace litecore { namespace repl { class Replicator; /** Time duration unit: seconds, stored as 64-bit floating point. */ using duration = std::chrono::nanoseconds; extern LogDomain SyncBusyLog; /** Abstract base class of Actors used by the replicator */ class Worker : public actor::Actor, C4InstanceCounted, protected Logging { public: /** Replication configuration options */ struct Options { using Mode = C4ReplicatorMode; using Validator = bool(*)(C4String docID, FLDict body, void *context); Mode push {kC4Disabled}; Mode pull {kC4Disabled}; fleeceapi::AllocedDict properties; Validator pullValidator {nullptr}; void* pullValidatorContext {nullptr}; Options() { } Options(Mode push_, Mode pull_, fleece::slice propertiesFleece =fleece::nullslice) :push(push_), pull(pull_), properties(propertiesFleece) { } static Options pushing(Mode mode =kC4OneShot) {return Options(mode, kC4Disabled);} static Options pulling(Mode mode =kC4OneShot) {return Options(kC4Disabled, mode);} static Options passive() {return Options(kC4Passive,kC4Passive);} static constexpr unsigned kDefaultCheckpointSaveDelaySecs = 5; duration checkpointSaveDelay() const { auto secs = properties[kC4ReplicatorCheckpointInterval].asInt(); if (secs <= 0) secs = kDefaultCheckpointSaveDelaySecs; return std::chrono::seconds(secs); } fleeceapi::Array channels() const {return arrayProperty(kC4ReplicatorOptionChannels);} fleeceapi::Array docIDs() const {return arrayProperty(kC4ReplicatorOptionDocIDs);} fleeceapi::Dict headers() const {return dictProperty(kC4ReplicatorOptionExtraHeaders);} fleece::slice filter() const {return properties[kC4ReplicatorOptionFilter].asString();} fleeceapi::Dict filterParams() const {return properties[kC4ReplicatorOptionFilterParams].asDict();} bool skipDeleted() const {return properties[kC4ReplicatorOptionSkipDeleted].asBool();} bool noIncomingConflicts() const {return properties[kC4ReplicatorOptionNoIncomingConflicts].asBool();} bool noOutgoingConflicts() const {return properties[kC4ReplicatorOptionNoIncomingConflicts].asBool();} fleeceapi::Array arrayProperty(const char *name) const { return properties[name].asArray(); } fleeceapi::Dict dictProperty(const char *name) const { return properties[name].asDict(); } /** Sets/clears the value of a property. Warning: This rewrites the backing store of the properties, invalidating any Fleece value pointers or slices previously accessed from it. */ template <class T> Options& setProperty(fleece::slice name, T value) { fleeceapi::Encoder enc; enc.beginDict(); if (value) { enc.writeKey(name); enc << value; } for (fleeceapi::Dict::iterator i(properties); i; ++i) { slice key = i.keyString(); if (key != name) { enc.writeKey(key); enc.writeValue(i.value()); } } enc.endDict(); properties = fleeceapi::AllocedDict(enc.finish()); return *this; } Options& setNoIncomingConflicts() { return setProperty(C4STR(kC4ReplicatorOptionNoIncomingConflicts), true); } explicit operator std::string() const; }; using slice = fleece::slice; using alloc_slice = fleece::alloc_slice; using ActivityLevel = C4ReplicatorActivityLevel; struct Status : public C4ReplicatorStatus { Status(ActivityLevel lvl =kC4Stopped) { level = lvl; error = {}; progress = progressDelta = {}; } C4Progress progressDelta; }; /** Called by the Replicator when the BLIP connection closes. */ void connectionClosed() { enqueue(&Worker::_connectionClosed); } /** Called by child actors when their status changes. */ void childChangedStatus(Worker *task, const Status &status) { enqueue(&Worker::_childChangedStatus, task, status); } #if !DEBUG protected: #endif blip::Connection* connection() const {return _connection;} protected: Worker(blip::Connection *connection, Worker *parent, const Options &options, const char *namePrefix); Worker(Worker *parent, const char *namePrefix); ~Worker(); /** Registers a callback to run when a BLIP request with the given profile arrives. */ template <class ACTOR> void registerHandler(const char *profile, void (ACTOR::*method)(Retained<blip::MessageIn>)) { std::function<void(Retained<blip::MessageIn>)> fn( std::bind(method, (ACTOR*)this, std::placeholders::_1) ); _connection->setRequestHandler(profile, false, asynchronize(fn)); } /** Implementation of connectionClosed(). May be overridden, but call super. */ virtual void _connectionClosed() { logDebug("connectionClosed"); _connection = nullptr; } /** Convenience to send a BLIP request. */ void sendRequest(blip::MessageBuilder& builder, blip::MessageProgressCallback onProgress = nullptr); void gotError(const blip::MessageIn*); void gotError(C4Error) ; virtual void onError(C4Error); // don't call this, but you can override /** Report less-serious errors that affect a document but don't stop replication. */ virtual void gotDocumentError(slice docID, C4Error, bool pushing, bool transient); void finishedDocument(slice docID, bool pushing); static blip::ErrorBuf c4ToBLIPError(C4Error); static C4Error blipToC4Error(const blip::Error&); bool isOpenClient() const {return _connection && _connection->role() == websocket::Role::Client;} bool isOpenServer() const {return _connection && _connection->role() == websocket::Role::Server;} bool isContinuous() const {return _options.push == kC4Continuous || _options.pull == kC4Continuous;} const Status& status() const {return _status;} virtual ActivityLevel computeActivityLevel() const; virtual void changedStatus(); void addProgress(C4Progress); void setProgress(C4Progress); virtual void _childChangedStatus(Worker *task, Status) { } virtual void afterEvent() override; virtual void caughtException(const std::exception &x) override; virtual std::string loggingIdentifier() const override {return _loggingID;} int pendingResponseCount() const {return _pendingResponseCount;} Options _options; Retained<Worker> _parent; uint8_t _important {1}; std::string _loggingID; private: Retained<blip::Connection> _connection; int _pendingResponseCount {0}; Status _status { }; bool _statusChanged {false}; }; } }
; A024041: a(n) = 4^n - n^5. ; 1,3,-16,-179,-768,-2101,-3680,-423,32768,203095,948576,4033253,16528384,66737571,267897632,1072982449,4293918720,17178449327,68717587168,274875430845,1099508427776,4398042427003,17592180890784,70368737741321,281474968748032,1125899897076999,4503599615489120 mov $1,4 pow $1,$0 pow $0,5 add $0,1 sub $1,$0 add $1,1
; A089608: a(n) = ((-1)^(n+1)*A002425(n)) modulo 6. ; 1,5,1,1,1,5,1,5,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,5,1,5,1,1,1,5,1,5,1,5,1,1,1,5,1,5,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,5,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,5,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,5,1,5,1,1,1,5,1,5,1,5,1,1 add $0,1 lpb $0 dif $0,2 cmp $1,$2 lpe mul $1,4 add $1,1 mov $0,$1
; Troy's HBC-56 - Input test ; ; Copyright (c) 2021 Troy Schrapel ; ; This code is licensed under the MIT license ; ; https://github.com/visrealm/hbc-56 ; !src "hbc56kernel.inc" Y_OFFSET = 4 PRESSED_KEY_COUNT = HBC56_USER_ZP_START pressedTable = $1000 extPressedTable = $1100 hbc56Meta: +setHbcMetaTitle "KEYBOARD TEST" rts hbc56Main: jsr tmsModeGraphicsI ; set up sprite mode (16x16, unmagnified) lda #TMS_R1_SPRITE_MAG2 jsr tmsReg1ClearFields lda #TMS_R1_SPRITE_16 jsr tmsReg1SetFields ; set up color table +tmsSetAddrColorTable +tmsSendData colorTab, 32 ; clear the name table +tmsSetAddrNameTable lda #$f9 jsr _tmsSendPage jsr _tmsSendPage jsr _tmsSendPage ; load the keyboard glyph data +tmsSetAddrPattTable +tmsSendData keyboardPatt, 256*8 ; output the keyboard tiles +tmsSetPosWrite 0, Y_OFFSET +tmsSendData keyboardInd, 512 ; set up the overlay sprites +tmsSetAddrSpritePattTable +tmsSendData sprites, 4*8 +tmsCreateSprite 0, 0, 0, $d0, TMS_DK_GREEN +tmsCreateSprite 1, 0, 0, $d0, TMS_DK_GREEN +tmsCreateSprite 2, 0, 0, $d0, TMS_DK_GREEN +tmsCreateSprite 3, 0, 0, $d0, TMS_DK_GREEN +tmsCreateSprite 4, 0, 0, $d0, TMS_DK_GREEN +tmsCreateSprite 5, 0, 0, $d0, TMS_DK_GREEN +tmsCreateSprite 6, 0, 0, $d0, TMS_DK_GREEN +tmsCreateSprite 7, 0, 0, $d0, TMS_DK_GREEN ; clear the key pressed tables +memset pressedTable, 0, 256 +memset extPressedTable, 0, 256 +tmsEnableOutput +hbc56SetVsyncCallback outputLoop cli +tmsEnableInterrupts ; ----------------------------------------------------------------------------- ; Input loop runs continuously and sets the key tables ; ----------------------------------------------------------------------------- inputLoop: jsr kbReadByte ; load scancode into X cpx #0 beq inputLoop cpx #KB_RELEASE ; is it a release code? beq keyReleased cpx #KB_EXT_KEY ; is it an extended key code? beq extendedKey cpx #$e1 ; is it the pause/break key? beq pauseBreakLoop jmp keyPressed ; just a regular key (pressed) ; ----------------------------------------------------------------------------- ; Pause/break handler (presss/release only sent on key release) ; ----------------------------------------------------------------------------- pauseBreakLoop: jsr kbReadByte cpx #0 beq pauseBreakLoop ; get next scancode (either $14 or $f0) cpx #$14 ; if it's $14, then it's a press beq pausePressed jsr kbWaitForScancode ; eat the next two scancodes jsr kbWaitForScancode lda #0 ; mark as released sta pressedTable + 2 jmp keyPressed pausePressed: jsr kbWaitForScancode ; eat the next two scancodes jsr kbWaitForScancode lda #1 ; mark as pressed sta pressedTable + 2 jmp keyPressed ; ----------------------------------------------------------------------------- ; A standard key was pressed (scancode in X) ; ----------------------------------------------------------------------------- keyPressed: lda #1 ; mark as pressed sta pressedTable,x jmp inputLoop ; ----------------------------------------------------------------------------- ; A standard key was released ($f0 in X) ; ----------------------------------------------------------------------------- keyReleased: jsr kbReadByte ; get the released key scancode cpx #0 beq keyReleased lda #0 ; mark as released sta pressedTable,x jmp inputLoop ; ----------------------------------------------------------------------------- ; An extended key was pressed ($e0 in X) ; ----------------------------------------------------------------------------- extendedKey: jsr kbReadByte cpx #0 beq extendedKey ; get the scancode cpx #KB_RELEASE ; is it the release code? beq extKeyReleased jmp extKeyPressed ; extended key pressed ; ----------------------------------------------------------------------------- ; An extended key was pressed (scancode in X) ; ----------------------------------------------------------------------------- extKeyPressed: lda #1 ; mark as pressed sta extPressedTable,x jmp inputLoop ; ----------------------------------------------------------------------------- ; An extended key was released ($f0 in X) ; ----------------------------------------------------------------------------- extKeyReleased: jsr kbReadByte cpx #0 beq extKeyReleased ; get the scancode lda #0 sta extPressedTable,x ; mark as released jmp inputLoop ; ----------------------------------------------------------------------------- ; Output a sprite overlay at the key position ; ----------------------------------------------------------------------------- doShowKey: lda PRESSED_KEY_COUNT ; set up sprite attribute address for writing jsr tmsSetSpriteTmpAddress jsr tmsSetAddressWrite tya ; set Y location clc adc #(Y_OFFSET*8-1) ; add keyboard vertical offset +tmsPut txa ; set X location +tmsPut inc PRESSED_KEY_COUNT rts ; ----------------------------------------------------------------------------- ; Show a standard key ; ----------------------------------------------------------------------------- showKey: txa pha ldy keyPosY,x ; find key position lda keyPosX,x beq @noShow ; 0? not a supported key tax ; add an overlay for the key jsr doShowKey @noShow pla tax jmp doneShowKey ; ----------------------------------------------------------------------------- ; Show an extended key ; ----------------------------------------------------------------------------- showExtKey: txa pha ldy extKeyPosY,x ; find key position lda extKeyPosX,x beq @noShowExt ; 0? not a supported key tax jsr doShowKey ; add an overlay for the key @noShowExt pla tax jmp doneShowExtKey ; ----------------------------------------------------------------------------- ; Output loop (runs once for each VSYNC) ; ----------------------------------------------------------------------------- outputLoop: stx HBC56_TMP_X ; keep X/Y sty HBC56_TMP_Y ; +tmsSetColorFgBg TMS_WHITE, TMS_LT_GREEN ; keep track of vsync processing time lda #0 ; clear pressed count sta PRESSED_KEY_COUNT ldx #131 ; max normal key index - ; iterate over the scancode table lda pressedTable,x ; if a key is pressed, show the overlay bne showKey doneShowKey: dex bne - ldx #125 ; max ext key index - ; iterate over the extended scancode table lda extPressedTable,x ; if a key is pressed, show the overlay bne showExtKey doneShowExtKey: dex bne - lda PRESSED_KEY_COUNT ; set the next sprite Y location to $d0 (last sprite) jsr tmsSetSpriteTmpAddress jsr tmsSetAddressWrite lda #$d0 +tmsPut ldx HBC56_TMP_X ; restore X/Y ldy HBC56_TMP_Y lda #1 ; set sprite visibility based on frame count bit HBC56_TICKS beq evenFrame jmp oddFrame rts ; ----------------------------------------------------------------------------- ; Even frames hide overlay sprites ; ----------------------------------------------------------------------------- evenFrame: !for i,0,8 { +tmsSpriteColor i, TMS_TRANSPARENT } +tmsSetColorFgBg TMS_WHITE, TMS_DK_BLUE ; end vsync processing time rts ; ----------------------------------------------------------------------------- ; Odd frames show overlay sprites ; ----------------------------------------------------------------------------- oddFrame: !for i,0,8 { +tmsSpriteColor i, TMS_DK_GREEN } +tmsSetColorFgBg TMS_WHITE, TMS_DK_BLUE ; end vsync processing time rts ; ----------------------------------------------------------------------------- ; Key position tables (scancode to X/Y pixel) ; ----------------------------------------------------------------------------- keyPosX: !byte 0,135,219,79,51,23,37,177,0,149,121,93,65,13, 9,0,0, 54,19,0, 9,32,24,0,0,0,45,52,37,47,39,0,0,75,60,67,62,69,54,0,0, 97,90,82,92,77,84,0,0,120,105,112,97,107,99,0,0,0,135,127,122,114,129,0,0,150,142,137,152,159,144,0,0,165,180,157,172,167,174,0,0,0,187,0,182,189,0,0,16,199,210,197,0,215,0,0,0,0,0,0,0,0,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 9,0,163,0,0,0,0,0,205,0,0,0,0,107 keyPosY: !byte 0, 25, 25,25,25,25,25, 25,0, 25, 25,25,25,56,40,0,0,104,88,0,104,56,40,0,0,0,88,72,72,56,40,0,0,88,88,72,56,40,40,0,0,104,88,72,56,56,40,0,0, 88, 88, 72,72, 56,40,0,0,0, 88, 72, 56, 40, 40,0,0, 88, 72, 56, 56, 40, 40,0,0, 88, 88, 72, 72, 56, 40,0,0,0, 72,0, 56, 40,0,0,72, 88, 72, 56,0, 56,0,0,0,0,0,0,0,0, 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,0, 25,0,0,0,0,0, 25,0,0,0,0, 25 extKeyPosX: !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,191,0,173,0,0,0,0,0,0,0,0,0,0, 24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,0,203,233,0,0,0,188,233,218,0,233,218,0,0,0,0,233,0,0,233 extKeyPosY: !byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104, 25,0,104,0,0,0,0,0,0,0,0,0,0,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 88,0,104, 40,0,0,0,104, 25,104,0,104, 88,0,0,0,0, 72,0,0, 56 ; ----------------------------------------------------------------------------- ; Graphics data ; ----------------------------------------------------------------------------- colorTab: !byte $1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f !byte $1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$1f,$4f keyboardInd: !bin "keyboard.ind" keyboardIndEnd: keyboardPatt: !bin "keyboard.patt" keyboardPattEnd: sprites: !byte $07,$1F,$3F,$7F,$7F,$FF,$FF,$FF !byte $FF,$FF,$7F,$7F,$3F,$1F,$07,$00 !byte $80,$E0,$F0,$F8,$F8,$FC,$FC,$FC !byte $FC,$FC,$F8,$F8,$F0,$E0,$80,$00
; Programm will find min symbol in array ; Output it and it's index SSEG SEGMENT PARA STACK 'STACK' DB 64 DUP(0) SSEG ENDS DSEG SEGMENT PARA 'DATA' A DB "3423531945" DSEG ENDS CSEG SEGMENT PARA 'CODE' ASSUME CS:CSEG, DS:DSEG, SS:SSEG START PROC FAR MOV AX, DSEG MOV DS, AX MOV SI, 1 ; current index MOV DI, 0 ; index of min element MOV CX, 9 ; array size M2: MOV AL, A[DI] CMP A[SI], AL JB M3 ; A[SI] < AL JA M4 ; A[SI] > AL M3: MOV DI, SI M4: INC SI LOOP M2 ; output min symbol MOV AH, 2 ; ADD A[DI], '0' if elements in A are splited by comma MOV DL, A[DI] INT 21H MOV DL, 20H ; space INT 21H ; output index of min symbol MOV DX, DI ADD DL, '0' INT 21H MOV AH,4CH INT 21H START ENDP CSEG ENDS END START
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ /*! * \file auto_scheduler/search_policy/sketch_search_policy.h * \brief The search policy that searches in a hierarchical search space defined by sketches. * The policy randomly samples programs from the space defined by sketches * and use evolutionary search to fine-tune them. */ #include "sketch_policy.h" #include <tvm/runtime/registry.h> #include <algorithm> #include <iomanip> #include <limits> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #include "sketch_policy_rules.h" namespace tvm { namespace auto_scheduler { /********** Sketch generation rules **********/ static RuleSkipStage rule_skip_stage; static RuleAlwaysInline rule_always_inline; static RuleMultiLevelTiling rule_multi_level_tiling; static RuleMultiLevelTilingWithFusion rule_multi_level_tiling_with_fusion; static RuleAddCacheRead rule_add_cache_read_stage; static RuleAddCacheWrite rule_add_cache_write_stage; static RuleAddRfactor rule_add_rfactor; static RuleCrossThreadReduction rule_cross_thread_reduction; static RuleSimplifyComputeWithConstTensor rule_simplify_compute_with_const_tensor; static RuleSpecialComputeLocationGPU rule_special_compute_location_gpu; /********** Init population rules **********/ static InitFillTileSize init_fill_tile_size; static InitChangeComputeLocation init_change_compute_location; static InitParallel init_parallel; static InitUnroll init_unroll; static InitVectorization init_vectorization; static InitThreadBind init_thread_bind; /********** Mutation rules **********/ static MutateTileSize mutate_tile_size; static MutateMaxUnrollFactor mutate_max_unroll_factor; static MutateComputeLocation mutate_compute_location; static MutateParallel mutate_parallel; /********** Sketch policy **********/ TVM_REGISTER_NODE_TYPE(SketchPolicyNode); SketchPolicy::SketchPolicy(SearchTask task, CostModel schedule_cost_model, Map<String, ObjectRef> params, int seed, int verbose, Optional<Array<SearchCallback>> init_search_callbacks) { auto node = make_object<SketchPolicyNode>(); node->search_task = std::move(task); node->schedule_cost_model = std::move(schedule_cost_model); node->rand_gen = std::mt19937(seed); node->params = std::move(params); node->verbose = verbose; if (init_search_callbacks) { PrintTitle("Call init-search callbacks", verbose); // Candidates: // - auto_scheduler.PreloadMeasuredStates: Load already measured states to // `measured_states_set_`, `measured_states_vector_` and `measured_states_throughputs_`. // - auto_scheduler.PreloadCustomSketchRule: Add user custom sketch rules to `sketch_rules`, // these rules will be processed prior to the default rules. node->RunCallbacks(init_search_callbacks.value()); } // Notice: Some rules require us to skip all the rest rules after they are applied. // So the rules below should be ordered carefully. if (IsCPUTask(node->search_task)) { // The default sketch rules for CPU policy node->sketch_rules.push_back(&rule_always_inline); node->sketch_rules.push_back(&rule_simplify_compute_with_const_tensor); node->sketch_rules.push_back(&rule_add_rfactor); node->sketch_rules.push_back(&rule_add_cache_write_stage); node->sketch_rules.push_back(&rule_multi_level_tiling_with_fusion); node->sketch_rules.push_back(&rule_multi_level_tiling); } else if (IsCUDATask(node->search_task)) { // The default sketch rules for CUDA policy node->sketch_rules.push_back(&rule_add_cache_read_stage); node->sketch_rules.push_back(&rule_always_inline); node->sketch_rules.push_back(&rule_special_compute_location_gpu); node->sketch_rules.push_back(&rule_simplify_compute_with_const_tensor); node->sketch_rules.push_back(&rule_cross_thread_reduction); node->sketch_rules.push_back(&rule_add_cache_write_stage); node->sketch_rules.push_back(&rule_multi_level_tiling_with_fusion); node->sketch_rules.push_back(&rule_multi_level_tiling); } else { LOG(FATAL) << "No default sketch rules for target: " << task->target; } node->sketch_rules.push_back(&rule_skip_stage); // This should always be the last rule node->init_rules.push_back(&init_fill_tile_size); // This should always be the first rule if (IsCPUTask(node->search_task)) { // The default init population rules for CPU policy node->init_rules.push_back(&init_change_compute_location); node->init_rules.push_back(&init_parallel); node->init_rules.push_back(&init_unroll); node->init_rules.push_back(&init_vectorization); } else if (IsCUDATask(node->search_task)) { // The default init population rules for CUDA policy node->init_rules.push_back(&init_thread_bind); node->init_rules.push_back(&init_unroll); } else { LOG(FATAL) << "No default init rules for target: " << task->target; } // The default mutation rules. node->mutation_rules.push_back(&mutate_tile_size); node->mutation_rules.push_back(&mutate_max_unroll_factor); node->mutation_rules.push_back(&mutate_compute_location); node->mutation_rules.push_back(&mutate_parallel); data_ = std::move(node); } State SketchPolicyNode::Search(int n_trials, int early_stopping, int num_measure_per_iter, ProgramMeasurer measurer) { num_measure_per_iter_ = num_measure_per_iter; if (n_trials <= 1) { // No measurement is allowed const Array<State>& best_states = SearchOneRound(0); CHECK_GT(best_states.size(), 0); return best_states[0]; } else { int num_random = static_cast<int>(GetDoubleParam(params, SketchParamKey::eps_greedy) * num_measure_per_iter); early_stopping = early_stopping < 0 ? std::numeric_limits<int>::max() >> 1 : early_stopping; measurer->Reset(); int ct = 0; int empty_retry_count = GetIntParam(params, SketchParamKey::empty_retry_count); Array<MeasureInput> inputs; Array<MeasureResult> results; while (ct < n_trials) { if (!inputs.empty()) { // Retrain cost models before the next search round PrintTitle("Train cost model", verbose); schedule_cost_model->Update(inputs, results); } // Search one round to get promising states PrintTitle("Search", verbose); Array<State> random_states; Array<State> best_states = SearchOneRound(num_random, &random_states); // Infer bound. This is necessary for computing the correct ToStr() for redundancy check best_states = search_task->compute_dag.InferBound(best_states); PruneInvalidState(search_task, &best_states); random_states = search_task->compute_dag.InferBound(random_states); PruneInvalidState(search_task, &random_states); // Pick `num_measure_per_iter` states to measure, check hash to remove already measured state // Also pick some random states to do eps-greedy inputs = PickStatesWithEpsGreedy(best_states, random_states, n_trials - ct); // Currently it's hard to detect if all of the search space has been traversed // Stop if no extra valid states found in several retries if (inputs.empty()) { if (empty_retry_count-- > 0) { continue; } else { StdCout(verbose) << "It seems all candidates in the search space have been measured." << std::endl; break; } } else { // Reset the retry count empty_retry_count = GetIntParam(params, SketchParamKey::empty_retry_count); } // Measure candidate states PrintTitle("Measure", verbose); measurer->Measure(search_task, GetRef<SearchPolicy>(this), inputs, &results); ct += inputs.size(); // Check if reach the early stopping condition if (ct - measurer->best_ct[search_task->workload_key] > early_stopping) { StdCout(verbose) << "Stop early since no performance improvement in the last " << early_stopping << " measure steps.\n"; break; } // Update measured states throughputs. These states will join the EvolutionarySearch in later // search rounds. for (const auto& res : results) { measured_states_throughputs_.push_back(1.0 / FloatArrayMean(res->costs)); } } PrintTitle("Done", verbose); return measurer->best_state[search_task->workload_key]; } } Array<State> SketchPolicyNode::SearchOneRound(int num_random_states, Array<State>* random_states) { // Temporal object to be used if the input pointer is nullptr Array<State> temp_random_states; if (random_states == nullptr) { random_states = &temp_random_states; } else { random_states->clear(); } // Get parameters int population = GetIntParam(params, SketchParamKey::EvolutionarySearch::population); int num_use_measured = std::min(static_cast<int>(measured_states_vector_.size()), static_cast<int>( GetDoubleParam(params, SketchParamKey::EvolutionarySearch::use_measured_ratio) * population)); bool is_cost_model_reasonable = !schedule_cost_model->IsInstance<RandomModelNode>(); // 1. Generate sketches const Array<State>& sketches = GenerateSketches(); // 2. Sample the init population Array<State> init_population = SampleInitPopulation( sketches, is_cost_model_reasonable ? population - num_use_measured : population); // 3. If the cost model is useless (i.e. RandomCostModel), just random pick some generated // states, else perform evolutionary search if (is_cost_model_reasonable) { // Also insert already measured good states to the initial population std::vector<int> indices = Argsort(measured_states_throughputs_); for (int i = 0; i < num_use_measured; i++) { init_population.push_back(measured_states_vector_[indices[i]]); } // Sample some random states for eps-greedy *random_states = RandomSampleStates(init_population, &rand_gen, num_random_states * 10); return EvolutionarySearch(init_population, num_measure_per_iter_ * 2); } else { PruneInvalidState(search_task, &init_population); return RandomSampleStates(init_population, &rand_gen, num_measure_per_iter_ * 3); } } Array<State> SketchPolicyNode::GenerateSketches() { const State& init_state = search_task->compute_dag->init_state; // Two ping pong buffers to avoid copy Array<State> states_buf1{init_state}, states_buf2; Array<State>* pnow = &states_buf1; Array<State>* pnext = &states_buf2; // A map that maps state to its current working position (stage_id) std::unordered_map<State, int, ObjectHash, ObjectEqual> cur_stage_id_map; cur_stage_id_map[init_state] = static_cast<int>(init_state->stages.size() - 1); // Derivation rule based enumeration Array<State> out_states; while (!pnow->empty()) { pnext->clear(); for (const State& state : *pnow) { int stage_id = cur_stage_id_map[state]; // Reaches to the terminal stage if (stage_id < 0) { out_states.push_back(state); continue; } // Try all derivation rules for (const auto& rule : sketch_rules) { auto cond = rule->MeetCondition(*this, state, stage_id); if (cond != SketchGenerationRule::ConditionKind::kSkip) { for (const auto& pair : rule->Apply(*this, state, stage_id)) { cur_stage_id_map[pair.first] = pair.second; pnext->push_back(pair.first); } // Skip the rest rules if (cond == SketchGenerationRule::ConditionKind::kApplyAndSkipRest) { break; } } } } std::swap(pnow, pnext); } // Hack for rfactor: Replace the split factor for rfactor to the undefined Expr(), // so later we can sample random value for the split factor. // Why don't we use Expr() when doing the split for rfactor at the first time? // Because during ApplySteps, a rfactor with undefined Expr() will crash TVM. // So rfactor with undefined Expr() will conflict with cache_write, cache_read, rfactor // in other stages for (size_t i = 0; i < out_states.size(); ++i) { auto state = out_states[i]; auto pstate = state.CopyOnWrite(); for (size_t step_id = 0; step_id < pstate->transform_steps.size(); ++step_id) { if (pstate->transform_steps[step_id]->IsInstance<RfactorStepNode>()) { CHECK_GE(step_id, 1); int split_step_id = static_cast<int>(step_id - 1); auto step = pstate->transform_steps[split_step_id].as<SplitStepNode>(); CHECK(step != nullptr); pstate->transform_steps.Set( split_step_id, SplitStep(step->stage_id, step->iter_id, step->extent, {NullOpt}, step->inner_to_outer)); } } out_states.Set(i, std::move(state)); } StdCout(verbose) << "Generate Sketches\t\t#s: " << out_states.size() << std::endl; return out_states; } Array<State> SketchPolicyNode::SampleInitPopulation(const Array<State>& sketches, int out_size) { int fail_ct = 0; Array<State> out_states; auto tic_begin = std::chrono::high_resolution_clock::now(); while (static_cast<int>(out_states.size()) < out_size && fail_ct < out_size) { // Random choose a starting sketch // TODO(jcf94, merrymercy): Maybe choose sketches in different possibility for they may have // different potential on generating state with better performance State tmp_s = sketches[(rand_gen)() % sketches.size()]; // Derivation rule based enumeration bool valid = true; for (const auto& rule : init_rules) { if (rule->Apply(this, &tmp_s) == PopulationGenerationRule::ResultKind::kInvalid) { valid = false; break; } } if (valid) { out_states.push_back(std::move(tmp_s)); } else { fail_ct++; } } double duration = std::chrono::duration_cast<std::chrono::duration<double>>( std::chrono::high_resolution_clock::now() - tic_begin) .count(); StdCout(verbose) << "Sample Initial Population\t#s: " << out_states.size() << "\tfail_ct: " << fail_ct << "\tTime elapsed: " << std::fixed << std::setprecision(2) << duration << std::endl; return out_states; } Array<State> SketchPolicyNode::EvolutionarySearch(const Array<State>& init_population, int out_size) { Array<State> best_states; auto tic_begin = std::chrono::high_resolution_clock::now(); size_t population = init_population.size(); int num_iters = GetIntParam(params, SketchParamKey::EvolutionarySearch::num_iters); double mutation_prob = GetDoubleParam(params, SketchParamKey::EvolutionarySearch::mutation_prob); // Two ping pong buffers to avoid copy. Array<State> states_buf1{init_population}, states_buf2; states_buf1.reserve(population); states_buf2.reserve(population); Array<State>* pnow = &states_buf1; Array<State>* pnext = &states_buf2; // The set of explored states to avoid redundancy. std::unordered_set<std::string> explored_set; // The heap to maintain the so far best states. using StateHeapItem = std::pair<State, float>; auto cmp = [](const StateHeapItem& left, const StateHeapItem& right) { return left.second > right.second; }; using StateHeap = std::priority_queue<StateHeapItem, std::vector<StateHeapItem>, decltype(cmp)>; StateHeap heap(cmp); auto update_heap = [&heap, &explored_set](const Array<State>& states, const std::vector<float>& scores, const int out_size) { float max_score = 0.0; for (size_t i = 0; i < states.size(); ++i) { const State& state = states[i]; std::string state_str = state.ToStr(); // Skip redundant states. if (explored_set.count(state_str) > 0) { continue; } explored_set.insert(state_str); if (static_cast<int>(heap.size()) < out_size) { // Directly push item if the heap is not full yet. heap.push({state, scores[i]}); } else if (scores[i] > heap.top().second) { // Replace the worst state in the heap with the new state. heap.pop(); heap.push({state, scores[i]}); } max_score = (scores[i] > max_score) ? scores[i] : max_score; } return max_score; }; // Cost model predicted scores. std::vector<float> scores; scores.reserve(population); // The function to generate prefix sum probabilities based on the given scores. auto assign_prob = [](const std::vector<float>& scores, std::vector<double>* prefix_sum_probs) { // Compute selection probabilities. double sum = 0.0; prefix_sum_probs->resize(scores.size()); for (size_t i = 0; i < scores.size(); ++i) { sum += std::max(scores[i], 0.0f); (*prefix_sum_probs)[i] = sum; } for (size_t i = 0; i < scores.size(); ++i) { (*prefix_sum_probs)[i] /= sum; } }; // State selection probabilities. std::uniform_real_distribution<> uniform_dist(0.0, 1.0); std::vector<double> state_select_probs; state_select_probs.reserve(population); // Mutation rule selection probabilities. std::vector<double> rule_select_probs; rule_select_probs.reserve(mutation_rules.size()); std::vector<float> rule_levels; for (const auto& rule : mutation_rules) { rule_levels.push_back(rule->GetLevel(search_task)); } assign_prob(rule_levels, &rule_select_probs); // Evaluate the init populations. *pnow = search_task->compute_dag.InferBound(*pnow); PruneInvalidState(search_task, pnow); CHECK_GT(pnow->size(), 0) << "All initial populations are invalid"; schedule_cost_model->Predict(search_task, *pnow, &scores); // Maintain the best states in the heap. float max_score = update_heap(*pnow, scores, out_size); // Genetic algorithm. for (auto iter_idx = 1; iter_idx <= num_iters; ++iter_idx) { // Assign the selection probability to each state based on the cost model scores. assign_prob(scores, &state_select_probs); // TODO(@comaniac): Perform cross over. // Perform mutations. size_t fail_ct = 0; while (pnext->size() < population && fail_ct < population * 2) { // Select a state to be mutated. State tmp_s = (*pnow)[RandomChoose(state_select_probs, &rand_gen)]; if (uniform_dist(rand_gen) < mutation_prob) { // Select a rule and mutate the state. const auto& rule = mutation_rules[RandomChoose(rule_select_probs, &rand_gen)]; if (rule->Apply(this, &tmp_s) == PopulationGenerationRule::ResultKind::kValid) { pnext->push_back(std::move(tmp_s)); } else { fail_ct++; } } else { // Do not mutate this state in this round. pnext->push_back(std::move(tmp_s)); } } // Evaluate the new populations. *pnext = search_task->compute_dag.InferBound(*pnext); PruneInvalidState(search_task, pnext); // Throw away all states generated in this iterations if all new states are invalid. if (pnext->size() > 0) { std::swap(pnext, pnow); schedule_cost_model->Predict(search_task, *pnow, &scores); // Maintain the best states in the heap. float iter_max_score = update_heap(*pnow, scores, out_size); max_score = (iter_max_score > max_score) ? iter_max_score : max_score; } pnext->clear(); if (iter_idx % 5 == 0 || iter_idx == num_iters) { StdCout(verbose) << "GA Iter: " << iter_idx << std::fixed << std::setprecision(4) << "\tMax Score: " << max_score << "\tPop Size: " << pnow->size() << std::endl; } } // Copy best states in the heap to the output. while (!heap.empty()) { auto item = heap.top(); heap.pop(); best_states.push_back(std::move(item.first)); } double duration = std::chrono::duration_cast<std::chrono::duration<double>>( std::chrono::high_resolution_clock::now() - tic_begin) .count(); StdCout(verbose) << "EvolutionarySearch\t\t#s: " << best_states.size() << "\tTime elapsed: " << std::fixed << std::setprecision(2) << duration << std::endl; return best_states; } Array<MeasureInput> SketchPolicyNode::PickStatesWithEpsGreedy(const Array<State>& best_states, const Array<State>& random_states, int remaining_n_trials) { int num_random = static_cast<int>(GetDoubleParam(params, SketchParamKey::eps_greedy) * num_measure_per_iter_); int num_good = num_measure_per_iter_ - num_random; Array<MeasureInput> inputs; size_t offset_best = 0, offset_random = 0; while (static_cast<int>(inputs.size()) < std::min(num_measure_per_iter_, remaining_n_trials)) { State state; bool has_best = offset_best < best_states.size(); bool has_random = offset_random < random_states.size(); if (static_cast<int>(inputs.size()) < num_good) { // prefer best states if (has_best) { state = best_states[offset_best++]; } else if (has_random) { state = random_states[offset_random++]; } else { break; } } else { // prefer random states if (has_random) { state = random_states[offset_random++]; } else if (has_best) { state = best_states[offset_best++]; } else { break; } } // Check if it has already been measured std::string state_str = state.ToStr(); if (!measured_states_set_.count(state_str)) { measured_states_set_.insert(std::move(state_str)); measured_states_vector_.push_back(state); inputs.push_back(MeasureInput(search_task, state)); } } return inputs; } TVM_REGISTER_GLOBAL("auto_scheduler.SketchPolicy") .set_body_typed([](SearchTask task, CostModel schedule_cost_model, Map<String, ObjectRef> params, int seed, int verbose, Optional<Array<SearchCallback>> init_search_callbacks) { return SketchPolicy(task, schedule_cost_model, params, seed, verbose, init_search_callbacks); }); TVM_REGISTER_GLOBAL("auto_scheduler.SketchPolicyGenerateSketches") .set_body_typed([](SketchPolicy policy) { return policy->GenerateSketches(); }); TVM_REGISTER_GLOBAL("auto_scheduler.SketchPolicySampleInitialPopulation") .set_body_typed([](SketchPolicy policy, int pop_size) { const Array<State>& sketches = policy->GenerateSketches(); Array<State> init_population = policy->SampleInitPopulation(sketches, pop_size); return init_population; }); TVM_REGISTER_GLOBAL("auto_scheduler.SketchPolicyEvolutionarySearch") .set_body_typed([](SketchPolicy policy, Array<State> init_population, int out_size) { Array<State> states = policy->EvolutionarySearch(init_population, out_size); return states; }); } // namespace auto_scheduler } // namespace tvm
; A228879: a(n+2) = 3*a(n), starting 4,7. ; 4,7,12,21,36,63,108,189,324,567,972,1701,2916,5103,8748,15309,26244,45927,78732,137781,236196,413343,708588,1240029,2125764,3720087,6377292,11160261,19131876,33480783,57395628,100442349,172186884,301327047,516560652 add $0,1 mov $2,2 mov $3,5 lpb $0,1 sub $0,1 mov $1,$2 add $3,2 mov $2,$3 sub $2,$1 add $3,$1 add $3,$1 add $3,2 lpe add $1,2
; A094761: a(n) = n + (square excess of n). ; 0,1,3,5,4,6,8,10,12,9,11,13,15,17,19,21,16,18,20,22,24,26,28,30,32,25,27,29,31,33,35,37,39,41,43,45,36,38,40,42,44,46,48,50,52,54,56,58,60,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,64,66,68,70,72,74,76,78 mov $2,$0 lpb $2 mov $1,$0 sub $2,1 add $1,$2 add $3,2 trn $2,$3 lpe mov $0,$1
/* -------------------------------------------------------------------------- * * OpenSim: buildHopperModel.cpp * * -------------------------------------------------------------------------- * * The OpenSim API is a toolkit for musculoskeletal modeling and simulation. * * See http://opensim.stanford.edu and the NOTICE file for more information. * * OpenSim is developed at Stanford University and supported by the US * * National Institutes of Health (U54 GM072970, R24 HD065690) and by DARPA * * through the Warrior Web program. * * * * Copyright (c) 2005-2017 Stanford University and the Authors * * Author(s): Chris Dembia, Shrinidhi K. Lakshmikanth, Ajay Seth, * * Thomas Uchida * * * * 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. * * -------------------------------------------------------------------------- */ /* Build an OpenSim model of a single-legged hopping mechanism. The mechanism consists of a brick (pelvis) and two cylinders (thigh and shank segments), all pin-connected, and is constrained to remain upright. A contact sphere (foot) prevents the end of the lower cylinder from passing through the floor. A vastus muscle wraps around a cylinder (patella) at the knee and a controller (brain) generates the muscle excitation signal required to produce a small hop when the mechanism is simulated. Two PhysicalOffsetFrames have been defined for attaching an assistive device (to help the hopper hop higher); their absolute path names are: - on the thigh: "/Dennis/bodyset/thigh/deviceAttachmentPoint" - on the shank: "/Dennis/bodyset/shank/deviceAttachmentPoint" You don't need to add anything in this file, but you should know what buildHopper() is doing. */ #include <OpenSim/OpenSim.h> namespace OpenSim { Model buildHopper(bool showVisualizer) { using SimTK::Vec3; using SimTK::Inertia; // Create a new OpenSim model on earth. auto hopper = Model(); hopper.setName("Dennis"); hopper.setGravity(Vec3(0, -9.80665, 0)); // Create the pelvis, thigh, and shank bodies. double pelvisMass = 30., pelvisSideLength = 0.2; auto pelvisInertia = pelvisMass * Inertia::brick(Vec3(pelvisSideLength/2.)); auto pelvis = new Body("pelvis", pelvisMass, Vec3(0), pelvisInertia); double linkMass = 10., linkLength = 0.5, linkRadius = 0.035; auto linkInertia = linkMass * Inertia::cylinderAlongY(linkRadius, linkLength/2.); auto thigh = new Body("thigh", linkMass, Vec3(0), linkInertia); auto shank = new Body("shank", linkMass, Vec3(0), linkInertia); // Add the bodies to the model (the model takes ownership). hopper.addBody(pelvis); hopper.addBody(thigh); hopper.addBody(shank); // Attach the pelvis to ground with a vertical slider joint, and attach the // pelvis, thigh, and shank bodies to each other with pin joints. Vec3 sliderOrientation(0, 0, SimTK::Pi/2.); auto sliderToGround = new SliderJoint("slider", hopper.getGround(), Vec3(0), sliderOrientation, *pelvis, Vec3(0), sliderOrientation); Vec3 linkDistalPoint(0, -linkLength/2., 0); Vec3 linkProximalPoint(0, linkLength/2., 0); // Define the pelvis as the parent so the reported value is hip flexion. auto hip = new PinJoint("hip", *pelvis, Vec3(0), Vec3(0), *thigh, linkProximalPoint, Vec3(0)); // Define the shank as the parent so the reported value is knee flexion. auto knee = new PinJoint("knee", *shank, linkProximalPoint, Vec3(0), *thigh, linkDistalPoint, Vec3(0)); // Add the joints to the model. hopper.addJoint(sliderToGround); hopper.addJoint(hip); hopper.addJoint(knee); // Set the coordinate names and default values. Note that we need "auto&" // here so that we get a reference to the Coordinate rather than a copy. auto& sliderCoord = sliderToGround->updCoordinate(SliderJoint::Coord::TranslationX); sliderCoord.setName("yCoord"); sliderCoord.setDefaultValue(1.); auto& hipCoord = hip->updCoordinate(PinJoint::Coord::RotationZ); hipCoord.setName("hipFlexion"); hipCoord.setDefaultValue(0.35); auto& kneeCoord = knee->updCoordinate(PinJoint::Coord::RotationZ); kneeCoord.setName("kneeFlexion"); kneeCoord.setDefaultValue(0.75); // Limit the range of motion for the hip and knee joints. double hipRange[2] = {110., -90.}; double hipStiff[2] = {20., 20.}, hipDamping = 5., hipTransition = 10.; auto hipLimitForce = new CoordinateLimitForce("hipFlexion", hipRange[0], hipStiff[0], hipRange[1], hipStiff[1], hipDamping, hipTransition); hip->addComponent(hipLimitForce); double kneeRange[2] = {140., 10.}; double kneeStiff[2] = {50., 40.}, kneeDamping = 2., kneeTransition = 10.; auto kneeLimitForce = new CoordinateLimitForce("kneeFlexion", kneeRange[0], kneeStiff[0], kneeRange[1], kneeStiff[1], kneeDamping, kneeTransition); knee->addComponent(kneeLimitForce); // Create a constraint to keep the foot (distal end of the shank) directly // beneath the pelvis (the Y-axis points upwards). auto constraint = new PointOnLineConstraint(hopper.getGround(), Vec3(0,1,0), Vec3(0), *shank, linkDistalPoint); shank->addComponent(constraint); // Use a contact model to prevent the foot (ContactSphere) from passing // through the floor (ContactHalfSpace). auto floor = new ContactHalfSpace(Vec3(0), Vec3(0, 0, -SimTK::Pi/2.), hopper.getGround(), "floor"); double footRadius = 0.1; auto foot = new ContactSphere(footRadius, linkDistalPoint, *shank, "foot"); double stiffness = 1.e8, dissipation = 0.5, friction[3] = {0.9, 0.9, 0.6}; auto contactParams = new HuntCrossleyForce::ContactParameters(stiffness, dissipation, friction[0], friction[1], friction[2]); contactParams->addGeometry("floor"); contactParams->addGeometry("foot"); auto contactForce = new HuntCrossleyForce(contactParams); // Add the contact-related components to the model. hopper.addContactGeometry(floor); hopper.addContactGeometry(foot); hopper.addForce(contactForce); // Create the vastus muscle and set its origin and insertion points. double mclFmax = 4000., mclOptFibLen = 0.55, mclTendonSlackLen = 0.25, mclPennAng = 0.; auto vastus = new Thelen2003Muscle("vastus", mclFmax, mclOptFibLen, mclTendonSlackLen, mclPennAng); vastus->addNewPathPoint("origin", *thigh, Vec3(linkRadius, 0.1, 0)); vastus->addNewPathPoint("insertion", *shank, Vec3(linkRadius, 0.15, 0)); hopper.addForce(vastus); // Attach a cylinder (patella) to the distal end of the thigh over which the // vastus muscle can wrap. auto patellaFrame = new PhysicalOffsetFrame("patellaFrame", *thigh, SimTK::Transform(linkDistalPoint)); auto patella = new WrapCylinder(); patella->setName("patella"); patella->set_radius(0.08); patella->set_length(linkRadius*2.); patella->set_quadrant("x"); patellaFrame->addWrapObject(patella); thigh->addComponent(patellaFrame); // Configure the vastus muscle to wrap over the patella. vastus->updGeometryPath().addPathWrap(*patella); // Create a controller to excite the vastus muscle. auto brain = new PrescribedController(); brain->setActuators(hopper.updActuators()); double t[3] = {0.0, 2.0, 3.9}, x[3] = {0.3, 1.0, 0.1}; auto controlFunction = new PiecewiseConstantFunction(3, t, x); brain->prescribeControlForActuator("vastus", controlFunction); hopper.addController(brain); // Create frames on the thigh and shank segments for attaching the device. auto thighAttachment = new PhysicalOffsetFrame("deviceAttachmentPoint", *thigh, SimTK::Transform(Vec3(linkRadius, 0.15, 0))); auto shankAttachment = new PhysicalOffsetFrame("deviceAttachmentPoint", *shank, SimTK::Transform(Vec3(linkRadius, 0, 0))); thigh->addComponent(thighAttachment); shank->addComponent(shankAttachment); // Attach geometry to the bodies and enable the visualizer. auto pelvisGeometry = new Brick(Vec3(pelvisSideLength/2.)); pelvisGeometry->setColor(Vec3(0.8, 0.1, 0.1)); pelvis->attachGeometry(pelvisGeometry); auto linkGeometry = new Cylinder(linkRadius, linkLength/2.); linkGeometry->setColor(Vec3(0.8, 0.1, 0.1)); thigh->attachGeometry(linkGeometry); shank->attachGeometry(linkGeometry->clone()); if(showVisualizer) hopper.setUseVisualizer(true); return hopper; } } // end of namespace OpenSim
; Copyright 2021 IBM Corporation ; ; 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. [BITS 64] %include "common.inc" %include "pmc.inc" section .data warmup_cnt: db 1 fill: times 63 db 0 warmup_cnt_fake: dw 4096 fill2: times 62 db 0 dev_file: db '/dev/cpu/',VICTIM_PROCESS_STR,'/msr',0 fd: dq 0 val: dq 0 len: equ $-val lea_array: times 40 db 0 junk: db 1 ;##### DATA STARTS HERE ######## ;##### DATA ENDS HERE ######## section .text global perf_test_entry:function global snippet:function perf_test_entry: push rbp mov rbp, rsp sub rsp, len check_pinning VICTIM_PROCESS msr_open msr_seek .data: mov eax, 0 cpuid lfence reset_counter start_counter mov ax, 2 ;##### SNIPPET STARTS HERE ###### ;##### SNIPPET ENDS HERE ###### ;lea rax, [lea_array+rax*2] .else: lfence stop_counter mov eax, DWORD[warmup_cnt_fake] mov ecx, 2 xor edx, edx div ecx mov DWORD[warmup_cnt_fake], eax inc DWORD[warmup_cnt] cmp DWORD[warmup_cnt], 13 jl .data msr_close exit 0
; A199113: (11*3^n+1)/2. ; 6,17,50,149,446,1337,4010,12029,36086,108257,324770,974309,2922926,8768777,26306330,78918989,236756966,710270897,2130812690,6392438069,19177314206,57531942617,172595827850,517787483549,1553362450646,4660087351937,13980262055810,41940786167429,125822358502286,377467075506857,1132401226520570,3397203679561709,10191611038685126,30574833116055377,91724499348166130,275173498044498389,825520494133495166,2476561482400485497,7429684447201456490,22289053341604369469,66867160024813108406,200601480074439325217,601804440223317975650,1805413320669953926949,5416239962009861780846,16248719886029585342537,48746159658088756027610,146238478974266268082829,438715436922798804248486,1316146310768396412745457,3948438932305189238236370,11845316796915567714709109,35535950390746703144127326,106607851172240109432381977,319823553516720328297145930,959470660550160984891437789,2878411981650482954674313366,8635235944951448864022940097,25905707834854346592068820290,77717123504563039776206460869,233151370513689119328619382606,699454111541067357985858147817,2098362334623202073957574443450,6295087003869606221872723330349,18885261011608818665618169991046,56655783034826455996854509973137,169967349104479367990563529919410,509902047313438103971690589758229,1529706141940314311915071769274686,4589118425820942935745215307824057,13767355277462828807235645923472170,41302065832388486421706937770416509,123906197497165459265120813311249526,371718592491496377795362439933748577 mov $1,3 pow $1,$0 div $1,2 mul $1,11 add $1,6 mov $0,$1
; ; z88dk GFX library ; ; Render the "stencil". ; The dithered horizontal lines base their pattern on the Y coordinate ; and on an 'intensity' parameter (0..11). ; Basic concept by Rafael de Oliveira Jannone ; ; Machine code version by Stefano Bodrato, 22/4/2009 ; ; stencil_render(unsigned char *stencil, unsigned char intensity) ; INCLUDE "graphics/grafix.inc" SECTION code_clib PUBLIC stencil_render PUBLIC _stencil_render EXTERN dither_pattern EXTERN swapgfxbk EXTERN pixeladdress EXTERN leftbitmask, rightbitmask EXTERN swapgfxbk1 EXTERN __graphics_end ; ; $Id: stencil_render.asm,v 1.8 2016-04-22 20:29:52 dom Exp $ ; .stencil_render ._stencil_render push ix ld ix,4 add ix,sp call swapgfxbk ld bc,__graphics_end push bc ld c,maxy push bc .yloop pop bc dec c ;jp z,swapgfxbk1 ret z push bc ld d,0 ld e,c ld l,(ix+2) ; stencil ld h,(ix+3) add hl,de ld a,(hl) ;X1 ld e,maxy add hl,de cp (hl) ; if x1>x2, return jr nc,yloop ; C still holds Y push af ; X1 ld a,(hl) ld b,a ; X2 ld a,(ix+0) ; intensity call dither_pattern ld (pattern1+1),a ld (pattern2+1),a pop af ld h,a ; X1 ld l,c ; Y push bc call pixeladdress ; bitpos0 = pixeladdress(x,y) call leftbitmask ; LeftBitMask(bitpos0) pop bc push de ld h,d ld l,e call mask_pattern push af ;ld (hl),a ld h,b ; X2 ld l,c ; Y call pixeladdress ; bitpos1 = pixeladdress(x+width-1,y) call rightbitmask ; RightBitMask(bitpos1) ld (bitmaskr+1),a ; bitmask1 = LeftBitMask(bitpos0) pop af ; pattern to be drawn (left-masked) pop hl ; adr0 push hl ex de,hl and a sbc hl,de jr z,onebyte ; area is within the same address... ld b,l ; number of full bytes in a row pop hl ;ld de,8 ld (hl),a ; (offset) = (offset) AND bitmask0 ;add hl,de inc hl ; offset += 1 (8 bits) .pattern2 ld a,0 dec b jr z,bitmaskr .fill_row_loop ; do ld (hl),a ; (offset) = pattern ;add hl,de inc hl ; offset += 1 (8 bits) djnz fill_row_loop ; while ( r-- != 0 ) .bitmaskr ld a,0 call mask_pattern ld (hl),a jr yloop .onebyte pop hl ld (pattern1+1),a jr bitmaskr ; Prepare an edge byte, basing on the byte mask in A ; and on the pattern being set in (pattern1+1) .mask_pattern ld d,a ; keep a copy of mask and (hl) ; mask data on screen ld e,a ; save masked data ld a,d ; retrieve mask cpl ; invert it .pattern1 and 0 ; prepare fill pattern portion or e ; mix with masked data ret
; A256162: Positive integers a(n) such that number of digits in decimal expansion of a(n)^a(n) is divisible by a(n). ; 1,8,9,98,99,998,999,9998,9999,99998,99999,999998,999999,9999998,9999999,99999998,99999999,999999998,999999999,9999999998,9999999999,99999999998,99999999999,999999999998,999999999999,9999999999998,9999999999999,99999999999998,99999999999999,999999999999998,999999999999999 add $0,1 mov $3,2 mov $4,2 lpb $0,1 sub $0,1 mov $3,$0 sub $0,1 mov $2,1 mul $4,10 lpe mov $0,1 add $3,1 sub $2,$3 mul $2,2 mov $1,$2 sub $4,2 sub $1,$4 sub $0,$1 mov $1,$0 sub $1,7 div $1,2 add $1,1
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r14 push %r15 push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0xd7b3, %rsi lea addresses_WT_ht+0x1e3b3, %rdi nop nop nop dec %r11 mov $33, %rcx rep movsq nop nop nop nop inc %rcx lea addresses_D_ht+0x1517b, %rsi lea addresses_A_ht+0x1bbb3, %rdi nop nop nop nop nop sub $22536, %rbx mov $84, %rcx rep movsb nop nop nop nop nop and $9441, %r11 lea addresses_UC_ht+0x1c473, %rcx nop nop nop nop inc %r12 mov $0x6162636465666768, %rbx movq %rbx, %xmm2 and $0xffffffffffffffc0, %rcx vmovntdq %ymm2, (%rcx) nop and %rsi, %rsi lea addresses_WC_ht+0x4bb3, %rsi lea addresses_A_ht+0x1a573, %rdi nop nop and $59859, %r14 mov $108, %rcx rep movsq nop nop nop nop xor %rbx, %rbx lea addresses_D_ht+0xe6b3, %rsi lea addresses_UC_ht+0x14573, %rdi nop nop nop nop nop and $2959, %r11 mov $20, %rcx rep movsb nop nop dec %r14 lea addresses_D_ht+0x11c9b, %rsi lea addresses_WC_ht+0x3133, %rdi nop and $60015, %r15 mov $11, %rcx rep movsq nop nop nop nop nop xor %r11, %r11 lea addresses_normal_ht+0x1b6cd, %rsi lea addresses_UC_ht+0x1d96f, %rdi clflush (%rsi) clflush (%rdi) nop nop nop xor %r11, %r11 mov $121, %rcx rep movsl nop nop nop nop nop and $14586, %rcx lea addresses_WC_ht+0x33b3, %rdi nop inc %r15 movb (%rdi), %bl nop nop nop nop cmp $54696, %r11 lea addresses_A_ht+0xe687, %rbx nop nop nop nop nop cmp %r15, %r15 mov $0x6162636465666768, %r14 movq %r14, %xmm0 vmovups %ymm0, (%rbx) nop nop nop nop nop and $22420, %r11 lea addresses_normal_ht+0x6bb3, %r12 nop nop nop sub $5059, %rcx movups (%r12), %xmm4 vpextrq $0, %xmm4, %rdi add $20998, %rdi lea addresses_A_ht+0x1e74b, %rcx nop add $42556, %rsi mov $0x6162636465666768, %rbx movq %rbx, %xmm1 movups %xmm1, (%rcx) nop cmp $39217, %r11 pop %rsi pop %rdi pop %rcx pop %rbx pop %r15 pop %r14 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r15 push %rcx push %rdi push %rsi // Store mov $0x3d45310000000bb3, %r10 sub $49192, %r15 mov $0x5152535455565758, %rcx movq %rcx, %xmm6 movntdq %xmm6, (%r10) // Exception!!! nop nop nop nop mov (0), %r11 nop nop sub $25534, %rcx // Store lea addresses_UC+0x12cb3, %r14 clflush (%r14) nop nop and %rdi, %rdi mov $0x5152535455565758, %r11 movq %r11, %xmm1 vmovups %ymm1, (%r14) nop nop nop nop add %rcx, %rcx // Faulty Load lea addresses_US+0x6bb3, %r10 nop nop nop nop and %rcx, %rcx mov (%r10), %esi lea oracles, %r10 and $0xff, %rsi shlq $12, %rsi mov (%r10,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %r15 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_US'}, 'OP': 'LOAD'} {'dst': {'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 10, 'same': False, 'type': 'addresses_NC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 2, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_US'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 10, 'same': True, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 8, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'src': {'congruent': 0, 'same': True, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'dst': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'58': 37} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
; A137866: a(1)=0. For n >= 2, a(n) = gcd(a(n-1)+1, n). ; 0,1,1,2,1,2,1,2,3,2,1,2,1,2,3,4,1,2,1,2,3,2,1,2,1,2,3,4,1,2,1,2,3,2,1,2,1,2,3,4,1,2,1,2,3,2,1,2,1,2,3,4,1,2,1,2,3,2,1,2,1,2,3,4,5,6,1,2,3,2,1,2,1,2,3,4,1,2,1,2,3,2,1,2,1,2,3,4,1,2,1,2,3,2,1,2,1,2,3,4 mov $2,$0 lpb $0 mov $0,$2 add $1,1 add $3,2 gcd $1,$3 sub $3,1 sub $0,$3 lpe mov $0,$1
#include "PID.h" /** * Done: Complete the PID class. You may add any additional desired functions. */ PID::PID() {} PID::~PID() {} void PID::Init(double Kp_, double Ki_, double Kd_) { /** * Done: Initialize PID coefficients (and errors, if needed) */ Kp = Kp_; Ki = Ki_; Kd = Kd_; p_error = 0; i_error = 0; } void PID::UpdateError(double cte) { /** * Done: Update PID errors based on cte. */ // d_error is difference between prev cte (p_error) and the current one d_error = (cte - p_error); // p_error is the previous error p_error = cte; // i_error is the sum of all CTEs until now i_error += cte; } double PID::TotalError() { /** * Done: Calculate and return the total error */ return -Kp * p_error - Kd * d_error - Ki * i_error; // Done: total error }
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Geoworks 1994 -- All Rights Reserved GEOWORKS CONFIDENTIAL PROJECT: Network extensions MODULE: Socket library FILE: socketError.asm AUTHOR: Eric Weber, May 11, 1994 ROUTINES: Name Description ---- ----------- GLB ECCheckSocket Verify a socket handle EXT ECCheckSocketLow Validate a socket handle INT ECCheckPortLow Validate a PortInfo structure INT ECCheckOutgoingPacket Verify an incoming packet INT ECCheckIncomingPacketLow Verify an incoming packet INT ECCheckPacketLow Verify an incoming packet INT ECCheckDomainLow Verify a domain INT ECCheckLinkInfo Validate a link info INT ECCheckConnectionEndpoint Validate a ConnectionEndpoint INT ECCheckMovsb Verify the parameters for a rep movsb INT ECCheckControlSeg Make sure the passed segment is for SocketControl which is locked the right way. REVISION HISTORY: Name Date Description ---- ---- ----------- EW 5/11/94 Initial revision DESCRIPTION: Error checking code for the socket library $Id: socketError.asm,v 1.1 97/04/07 10:46:13 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ UtilCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckSocket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Verify a socket handle CALLED BY: (GLOBAL) PASS: bx - Socket RETURN: nothing DESTROYED: nothing SIDE EFFECTS: May cause caller to block PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 5/17/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckSocket proc far if ERROR_CHECK uses si,ds,es .enter call SocketControlStartRead mov si,bx call ECCheckSocketLow call SocketControlEndRead .leave endif ret ECCheckSocket endp if ERROR_CHECK COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckSocketLow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Validate a socket handle CALLED BY: (EXTERNAL) ECCheckSocket, SocketRecv PASS: ds - control segment si - socket handle RETURN: DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 5/11/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckSocketLow proc far uses ax,bx,cx, si, di .enter ; ; validate the segments and chunk ; Assert segment ds Assert chunk si ds ; ; check the type of the chunk ; mov si, ds:[si] cmp ds:[si].SI_type, CCT_SOCKET_INFO ERROR_NE ILLEGAL_SOCKET ; ; check size of the chunk ; mov ax, size SequencedSocketInfo cmp ds:[si].SI_delivery, SDT_DATAGRAM jne checkSize mov ax, size DatagramSocketInfo add ax, ds:[si].DSI_addressSize checkSize: ChunkSizePtr ds, si, cx cmp ax, size SocketInfo ERROR_L CORRUPT_SOCKET ; ; check the port pointer ; tst ds:[si].SI_port jz checkDomain mov di, ds:[si].SI_port Assert chunk di, ds mov di, ds:[di] cmp ds:[di].PI_type, CCT_PORT_INFO ERROR_NE CORRUPT_SOCKET ; ; check the remote domain pointer ; checkDomain: cmp ds:[si].SI_delivery, SDT_DATAGRAM je done tst ds:[si].SSI_connection.CE_domain jz done Assert chunk ds:[si].SSI_connection.CE_domain, ds done: .leave ret ECCheckSocketLow endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECEnsureSocketNotClosing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Ensure the socket state is not closing. CALLED BY: (INTERNAL) PASS: ds - control segment si - socket handle RETURN: nothing DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: If state == ISS_CLOSING then FatalError REVISION HISTORY: Name Date Description ---- ---- ----------- dhunter 8/26/00 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECEnsureSocketNotClosing proc far uses si .enter mov si, ds:[si] ; ds:si = SocketInfo cmp ds:[si].SI_state, ISS_CLOSING ERROR_E CANNOT_USE_SOCKET_AFTER_CLOSED .leave ret ECEnsureSocketNotClosing endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckPortLow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Validate a PortInfo structure CALLED BY: (INTERNAL) PASS: ds - control segment si - port handle RETURN: DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 5/16/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckPortLow proc far uses ax,bx,dx,si,di .enter ; ; make sure this is really a port info ; call ECCheckChunkArray mov si, ds:[si] EC < cmp ds:[si].PI_type, CCT_PORT_INFO > EC < ERROR_NE CORRUPT_PORT > ; ; verify that we are in the port array ; movdw axbx, ds:[si].PI_number mov dx, ds:[si].PI_restriction push si call SocketFindPort EC < ERROR_C PORT_NOT_IN_PORT_ARRAY > pop si ; ; check pointers ; tst ds:[si].PI_listener jz listenerOK mov di, ds:[si].PI_listener Assert chunk di,ds EC < mov di, ds:[di] > EC < cmp ds:[di].SI_type, CCT_SOCKET_INFO > EC < ERROR_NE CORRUPT_PORT > listenerOK: tst ds:[si].PI_listenQueue jz queueOK mov di, ds:[si].PI_listenQueue Assert chunk di,ds EC < mov di, ds:[di] > EC < cmp ds:[di].LQ_type, CCT_LISTEN_QUEUE > EC < ERROR_NE CORRUPT_PORT > queueOK: tst ds:[si].PI_dgram jz dgramOK mov di, ds:[si].PI_listenQueue Assert chunk di,ds EC < mov di, ds:[di] > EC < cmp ds:[di].SI_type, CCT_SOCKET_INFO > EC < ERROR_NE CORRUPT_PORT > dgramOK: .leave ret ECCheckPortLow endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckOutgoingPacket %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Verify an incoming packet CALLED BY: (INTERNAL) PASS: ^lcx:dx - packet RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckOutgoingPacket proc far uses bp,ds,es .enter call SocketControlStartRead mov bp, PDD_OUTGOING call ECCheckPacketLow call SocketControlEndRead .leave ret ECCheckOutgoingPacket endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckIncomingPacketLow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Verify an incoming packet CALLED BY: (INTERNAL) PASS: ^lcx:dx - packet ds - control segment RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 10/11/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckIncomingPacketLow proc far uses bp .enter mov bp, PDD_INCOMING call ECCheckPacketLow .leave ret ECCheckIncomingPacketLow endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckPacketLow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Verify an incoming packet CALLED BY: (INTERNAL) ECCheckIncomingPacketLow, ECCheckOutgoingPacket PASS: ^lcx:dx - packet ds - control segment bp - PacketDeliveryDirection RETURN: nothing DESTROYED: bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 7/ 7/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckPacketLow proc near pushf uses ax,bx,cx,dx,si,di,bp,ds,es .enter ; ; verify the optr of the packet ; Assert handle, cx mov bx, cx call HugeLMemLock if 0 ; ; The HugeLMem heap is shared among multiple threads, making EC ; code unreliable if it is being written to. ; EC < push ds > EC < mov ds,ax > EC < call ECLMemValidateHeap > EC < pop ds > endif mov es,ax Assert chunk, dx, es mov si, dx mov di, es:[si] ; es:di = PacketHeader ; ; verify the size of the packet ; verifySize:: mov ax, es:[di].PH_dataOffset ; ax = offset to data cmp ax, size PacketHeader ERROR_B CORRUPT_PACKET add ax, es:[di].PH_dataSize ; ax = end of data ChunkSizePtr es,di,cx cmp ax, cx ERROR_A CORRUPT_PACKET ; ; verify the domain (incoming only) ; verifyDomain:: cmp bp, PDD_OUTGOING je verifyFlags Assert chunk, es:[di].PH_domain, ds EC < mov si, es:[di].PH_domain > EC < mov si, ds:[si] > EC < cmp ds:[si].DI_type, CCT_DOMAIN_INFO > EC < ERROR_NE CORRUPT_PACKET > ; ; verify the flags ; verifyFlags:: mov al, es:[di].PH_flags and al, mask PF_TYPE Assert etype al, PacketType ; ; unlock the packet ; unlockAndExit:: call HugeLMemUnlock .leave popf ret ECCheckPacketLow endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckDomainLow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Verify a domain CALLED BY: (INTERNAL) ECCheckConnectionEndpoint PASS: *ds:cx - domain RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 8/24/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckDomainLow proc far uses bx,si,di pushf .enter ; ; make sure it's a chunk and chunk array ; mov si, cx Assert chunk,si,ds Assert ChunkArray,dssi ; ; check the type ; mov di, ds:[si] EC < cmp ds:[di].DI_type, CCT_DOMAIN_INFO > EC < ERROR_NE CORRUPT_DOMAIN > ; ; check the links ; cmp ds:[di].DI_driverType, SDT_DATA je done mov bx,cs mov di, offset ECCheckLinkInfo call ChunkArrayEnum done: .leave popf ret ECCheckDomainLow endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckLinkInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Validate a link info CALLED BY: (INTERNAL) PASS: *ds:si - DomainInfo ds:di - LinkInfo ax - size of LinkInfo RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 8/24/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckLinkInfo proc far uses ax .enter ; ; validate link info ; tst ds:[di].LI_handle WARNING_Z WARNING_NULL_CONNECTION_HANDLE sub ax, size LinkInfo cmp ax, ds:[di].LI_addrSize ERROR_NE CORRUPT_DOMAIN clc .leave ret ECCheckLinkInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckConnectionEndpoint %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Validate a ConnectionEndpoint CALLED BY: (INTERNAL) PASS: ds:di - ConnectionEndpoint RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 8/24/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckConnectionEndpoint proc far uses cx,dx,si pushf .enter ; ; check the domain ; mov cx, ds:[di].CE_domain call ECCheckDomainLow ; ; check the driver type ; mov si, cx mov si, ds:[si] cmp ds:[si].DI_driverType, SDT_DATA je done ; ; verify link, for link drivers only ; mov dx, ds:[di].CE_link call SocketFindLinkByHandle ERROR_C CORRUPT_ENDPOINT done: .leave popf ret ECCheckConnectionEndpoint endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckMovsb %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Verify the parameters for a rep movsb CALLED BY: (INTERNAL) PASS: registers set up for rep movsb RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 12/15/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ECCheckMovsb proc far Assert okForRepMovsb ret ECCheckMovsb endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckControlSeg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Make sure the passed segment is for SocketControl which is locked the right way. CALLED BY: (INTERNAL) PASS: ax = segment to check bx = lock type RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 1/27/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if ERROR_CHECK ECCheckControlSeg proc far pushf uses ds .enter ; ; First make sure the passed segment is for SocketControl. ; push bx mov bx, handle SocketControl call MemDerefDS ; makes sure it's locked... mov bx, ds cmp ax, bx ERROR_NE SEGMENT_NOT_SOCKET_CONTROL ; ; Now check the lock type. ; mov bx, handle dgroup call MemDerefDS pop bx cmp ds:[lockType], bx ERROR_NE CONTROL_SEGMENT_NOT_LOCKED_RIGHT .leave popf ret ECCheckControlSeg endp endif ; ERROR_CHECK UtilCode ends
@localsize 1, 1, 1 @buf 4 ; g[0] @pvtmem 4 mov.u32u32 r1.x, 0x12345678 mov.u32u32 r0.x, 0 (rpt5)nop stp.u32 p[r0.x + 0], r1.x, 1 ldp.u32 r0.x, p[r0.x + 0], 1 mov.u32u32 r0.y, 0x00000000 (sy)(rpt5)nop stib.b.untyped.1d.u32.1.imm r0.x, r0.y, 0 end nop
.686P .MODEL FLAT, C .STACK 1000h .CODE bughunt_syscall PROC push ebp mov ebp, esp sub esp, 84h mov ecx, [ebp + 88h] ; main (argv[33]) = dw0x20 push ecx mov ecx, [ebp + 84h] ; main (argv[32]) = dw0x1F push ecx mov ecx, [ebp + 80h] ; main (argv[31]) = dw0x1E push ecx mov ecx, [ebp + 7Ch] ; main (argv[30]) = dw0x1D push ecx mov ecx, [ebp + 78h] ; main (argv[29]) = dw0x1C push ecx mov ecx, [ebp + 74h] ; main (argv[28]) = dw0x1B push ecx mov ecx, [ebp + 70h] ; main (argv[27]) = dw0x1A push ecx mov ecx, [ebp + 6Ch] ; main (argv[26]) = dw0x19 push ecx mov ecx, [ebp + 68h] ; main (argv[25]) = dw0x18 push ecx mov ecx, [ebp + 64h] ; main (argv[24]) = dw0x17 push ecx mov ecx, [ebp + 60h] ; main (argv[23]) = dw0x16 push ecx mov ecx, [ebp + 5Ch] ; main (argv[22]) = dw0x15 push ecx mov ecx, [ebp + 58h] ; main (argv[21]) = dw0x14 push ecx mov ecx, [ebp + 54h] ; main (argv[20]) = dw0x13 push ecx mov ecx, [ebp + 50h] ; main (argv[19]) = dw0x12 push ecx mov ecx, [ebp + 4Ch] ; main (argv[18]) = dw0x11 push ecx mov ecx, [ebp + 48h] ; main (argv[17]) = dw0x10 push ecx mov ecx, [ebp + 44h] ; main (argv[16]) = dw0x0F push ecx mov ecx, [ebp + 40h] ; main (argv[15]) = dw0x0E push ecx mov ecx, [ebp + 3Ch] ; main (argv[14]) = dw0x0D push ecx mov ecx, [ebp + 38h] ; main (argv[13]) = dw0x0C push ecx mov ecx, [ebp + 34h] ; main (argv[12]) = dw0x0B push ecx mov ecx, [ebp + 30h] ; main (argv[11]) = dw0x0A push ecx mov ecx, [ebp + 2Ch] ; main (argv[10]) = dw0x09 push ecx mov ecx, [ebp + 28h] ; main (argv[9]) = dw0x08 push ecx mov ecx, [ebp + 24h] ; main (argv[8]) = dw0x07 push ecx mov ecx, [ebp + 20h] ; main (argv[7]) = dw0x06 push ecx mov ecx, [ebp + 1Ch] ; main (argv[6]) = dw0x05 push ecx mov ecx, [ebp + 18h] ; main (argv[5]) = dw0x04 push ecx mov ecx, [ebp + 14h] ; main (argv[4]) = dw0x03 push ecx mov ecx, [ebp + 10h] ; main (argv[3]) = dw0x02 push ecx mov ecx, [ebp + 0Ch] ; main (argv[2]) = dw0x01 push ecx mov eax, [ebp + 08h] ; main (argv[1]) = syscall_uid mov edx, 7FFE0300h call dword ptr [edx] mov esp, ebp pop ebp ret bughunt_syscall ENDP END
// IMPORT STANDARD LIBRARIES #include <iostream> #include <string> // IMPORT THIRD-PARTY LIBRARIES #include <pxr/usd/usd/stage.h> #include <pxr/usd/usdGeom/sphere.h> int main() { auto stage = pxr::UsdStage::CreateInMemory(); stage->GetRootLayer()->SetDocumentation("This is an example of adding a comment. You can add comments inside any pair of ()s"); auto sphere = pxr::UsdGeomSphere::Define(stage, pxr::SdfPath("/SomeSphere")); sphere.GetPrim().SetMetadata( pxr::SdfFieldKeys->Comment, "I am a comment" ); auto* result = new std::string(); stage->GetRootLayer()->ExportToString(result); std::cout << *result << std::endl; delete result; result = nullptr; return 0; }
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "UIManager.h" #include <react/core/ShadowNodeFragment.h> #include <react/debug/SystraceSection.h> #include <react/graphics/Geometry.h> #include <glog/logging.h> namespace facebook { namespace react { UIManager::~UIManager() { LOG(WARNING) << "UIManager::~UIManager() was called (address: " << this << ")."; } SharedShadowNode UIManager::createNode( Tag tag, std::string const &name, SurfaceId surfaceId, const RawProps &rawProps, SharedEventTarget eventTarget) const { SystraceSection s("UIManager::createNode"); auto &componentDescriptor = componentDescriptorRegistry_->at(name); auto fallbackDescriptor = componentDescriptorRegistry_->getFallbackComponentDescriptor(); auto family = componentDescriptor.createFamily( ShadowNodeFamilyFragment{tag, surfaceId, nullptr}, std::move(eventTarget)); auto const props = componentDescriptor.cloneProps(nullptr, rawProps); auto const state = componentDescriptor.createInitialState(ShadowNodeFragment{props}, family); auto shadowNode = componentDescriptor.createShadowNode( ShadowNodeFragment{ /* .props = */ fallbackDescriptor != nullptr && fallbackDescriptor->getComponentHandle() == componentDescriptor.getComponentHandle() ? componentDescriptor.cloneProps( props, RawProps(folly::dynamic::object("name", name))) : props, /* .children = */ ShadowNodeFragment::childrenPlaceholder(), /* .state = */ state, }, family); if (delegate_) { delegate_->uiManagerDidCreateShadowNode(shadowNode); } return shadowNode; } SharedShadowNode UIManager::cloneNode( const ShadowNode::Shared &shadowNode, const SharedShadowNodeSharedList &children, const RawProps *rawProps) const { SystraceSection s("UIManager::cloneNode"); auto &componentDescriptor = shadowNode->getComponentDescriptor(); auto clonedShadowNode = componentDescriptor.cloneShadowNode( *shadowNode, { /* .props = */ rawProps ? componentDescriptor.cloneProps( shadowNode->getProps(), *rawProps) : ShadowNodeFragment::propsPlaceholder(), /* .children = */ children, }); return clonedShadowNode; } void UIManager::appendChild( const ShadowNode::Shared &parentShadowNode, const ShadowNode::Shared &childShadowNode) const { SystraceSection s("UIManager::appendChild"); auto &componentDescriptor = parentShadowNode->getComponentDescriptor(); componentDescriptor.appendChild(parentShadowNode, childShadowNode); } void UIManager::completeSurface( SurfaceId surfaceId, const SharedShadowNodeUnsharedList &rootChildren) const { SystraceSection s("UIManager::completeSurface"); shadowTreeRegistry_.visit(surfaceId, [&](ShadowTree const &shadowTree) { shadowTree.commit( [&](RootShadowNode::Shared const &oldRootShadowNode) { return std::make_shared<RootShadowNode>( *oldRootShadowNode, ShadowNodeFragment{ /* .props = */ ShadowNodeFragment::propsPlaceholder(), /* .children = */ rootChildren, }); }, true); }); } void UIManager::setJSResponder( const ShadowNode::Shared &shadowNode, const bool blockNativeResponder) const { if (delegate_) { delegate_->uiManagerDidSetJSResponder( shadowNode->getSurfaceId(), shadowNode, blockNativeResponder); } } void UIManager::clearJSResponder() const { if (delegate_) { delegate_->uiManagerDidClearJSResponder(); } } ShadowNode::Shared const *UIManager::getNewestCloneOfShadowNode( ShadowNode const &shadowNode) const { auto findNewestChildInParent = [&](auto const &parentNode) -> ShadowNode::Shared const * { for (auto const &child : parentNode.getChildren()) { if (ShadowNode::sameFamily(*child, shadowNode)) { return &child; } } return nullptr; }; ShadowNode const *ancestorShadowNode; shadowTreeRegistry_.visit( shadowNode.getSurfaceId(), [&](ShadowTree const &shadowTree) { shadowTree.tryCommit( [&](RootShadowNode::Shared const &oldRootShadowNode) { ancestorShadowNode = oldRootShadowNode.get(); return nullptr; }, true); }); auto ancestors = shadowNode.getFamily().getAncestors(*ancestorShadowNode); if (ancestors.rbegin() == ancestors.rend()) { return nullptr; } return findNewestChildInParent(ancestors.rbegin()->first.get()); } ShadowNode::Shared UIManager::findNodeAtPoint( ShadowNode::Shared const &node, Point point) const { return LayoutableShadowNode::findNodeAtPoint( *getNewestCloneOfShadowNode(*node), point); } void UIManager::setNativeProps( ShadowNode const &shadowNode, RawProps const &rawProps) const { SystraceSection s("UIManager::setNativeProps"); auto &componentDescriptor = shadowNode.getComponentDescriptor(); auto props = componentDescriptor.cloneProps(shadowNode.getProps(), rawProps); shadowTreeRegistry_.visit( shadowNode.getSurfaceId(), [&](ShadowTree const &shadowTree) { shadowTree.tryCommit( [&](RootShadowNode::Shared const &oldRootShadowNode) { return std::static_pointer_cast<RootShadowNode>( oldRootShadowNode->cloneTree( shadowNode.getFamily(), [&](ShadowNode const &oldShadowNode) { return oldShadowNode.clone({ /* .props = */ props, }); })); }, true); }); } LayoutMetrics UIManager::getRelativeLayoutMetrics( ShadowNode const &shadowNode, ShadowNode const *ancestorShadowNode, LayoutableShadowNode::LayoutInspectingPolicy policy) const { SystraceSection s("UIManager::getRelativeLayoutMetrics"); if (!ancestorShadowNode) { shadowTreeRegistry_.visit( shadowNode.getSurfaceId(), [&](ShadowTree const &shadowTree) { shadowTree.tryCommit( [&](RootShadowNode::Shared const &oldRootShadowNode) { ancestorShadowNode = oldRootShadowNode.get(); return nullptr; }, true); }); } // Get latest version of both the ShadowNode and its ancestor. // It is possible for JS (or other callers) to have a reference // to a previous version of ShadowNodes, but we enforce that // metrics are only calculated on most recently committed versions. auto newestShadowNode = getNewestCloneOfShadowNode(shadowNode); auto newestAncestorShadowNode = ancestorShadowNode == nullptr ? nullptr : getNewestCloneOfShadowNode(*ancestorShadowNode); auto layoutableShadowNode = traitCast<LayoutableShadowNode const *>(newestShadowNode->get()); auto layoutableAncestorShadowNode = (newestAncestorShadowNode == nullptr ? nullptr : traitCast<LayoutableShadowNode const *>( newestAncestorShadowNode->get())); if (!layoutableShadowNode || !layoutableAncestorShadowNode) { return EmptyLayoutMetrics; } return layoutableShadowNode->getRelativeLayoutMetrics( *layoutableAncestorShadowNode, policy); } void UIManager::updateState(StateUpdate const &stateUpdate) const { auto &callback = stateUpdate.callback; auto &family = stateUpdate.family; auto &componentDescriptor = family->getComponentDescriptor(); shadowTreeRegistry_.visit( family->getSurfaceId(), [&](ShadowTree const &shadowTree) { shadowTree.tryCommit([&](RootShadowNode::Shared const &oldRootShadowNode) { return std::static_pointer_cast< RootShadowNode>(oldRootShadowNode->cloneTree( *family, [&](ShadowNode const &oldShadowNode) { auto newData = callback(oldShadowNode.getState()->getDataPointer()); auto newState = componentDescriptor.createState(*family, newData); return oldShadowNode.clone({ /* .props = */ ShadowNodeFragment::propsPlaceholder(), /* .children = */ ShadowNodeFragment::childrenPlaceholder(), /* .state = */ newState, }); })); }); }); } void UIManager::dispatchCommand( const ShadowNode::Shared &shadowNode, std::string const &commandName, folly::dynamic const args) const { if (delegate_) { delegate_->uiManagerDidDispatchCommand(shadowNode, commandName, args); } } void UIManager::setComponentDescriptorRegistry( const SharedComponentDescriptorRegistry &componentDescriptorRegistry) { componentDescriptorRegistry_ = componentDescriptorRegistry; } void UIManager::setDelegate(UIManagerDelegate *delegate) { delegate_ = delegate; } UIManagerDelegate *UIManager::getDelegate() { return delegate_; } void UIManager::visitBinding( std::function<void(UIManagerBinding const &uiManagerBinding)> callback) const { if (!uiManagerBinding_) { return; } callback(*uiManagerBinding_); } ShadowTreeRegistry const &UIManager::getShadowTreeRegistry() const { return shadowTreeRegistry_; } #pragma mark - ShadowTreeDelegate void UIManager::shadowTreeDidFinishTransaction( ShadowTree const &shadowTree, MountingCoordinator::Shared const &mountingCoordinator) const { SystraceSection s("UIManager::shadowTreeDidFinishTransaction"); if (delegate_) { delegate_->uiManagerDidFinishTransaction(mountingCoordinator); } } } // namespace react } // namespace facebook
global _start section .text _start: push 1 ; rax = 1 pop rax push 42 ; rbx = 42 pop rbx int 0x80
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: PostScript printer driver FILE: pscriptzDriverInfo.asm AUTHOR: Jim DeFrisco, 15 May 1990 REVISION HISTORY: Name Date Description ---- ---- ----------- Jim 5/15/90 Initial revision DESCRIPTION: Driver info for the PostScript printer driver The file "printerDriver.def" should be included before this one $Id: pscriptzDriverInfo.asm,v 1.1 97/04/18 11:55:48 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Driver Info Resource This part of the file contains the information that pertains to all device supported by the driver. It includes device names and a table of the resource handles for the specific device info. A pointer to this info is provided by the DriverInfo function. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DriverInfo segment lmem LMEM_TYPE_GENERAL ;---------------------------------------------------------------------------- ; Device Enumerations ;---------------------------------------------------------------------------- DefPrinter PD_ALW, "Apple LaserWriter", appleLWf13Info DefPrinter PD_APPLELW2NT, "Apple LaserWriter II NT", appleLW2NTf35Info DefPrinter PD_GENERIC_PS, "PostScript Compatible", generf35Info DefPrinter PD_HPLJ4, "HP LaserJet 4 (PostScript)", hpLJ4psInfo DefPrinter PD_IBM401917, "IBM 4019 (17 Font PostScript)", ibm4019f17Info DefPrinter PD_IBM401939, "IBM 4019 (39 Font PostScript)", ibm4019f39Info DefPrinter PD_NECCMPS40, "NEC Colormate PS/40", necColor40f17Info DefPrinter PD_OKI830, "Oki OL830/PS", generf13Info DefPrinter PD_TANDY_LP410_PS, "Tandy LP 410 (PostScript)", generf13Info DefPrinter PD_TANDY_LP800_PS, "Tandy LP 800 (PostScript)", generf13Info ;---------------------------------------------------------------------------- ; Driver Info Header ;---------------------------------------------------------------------------- DriverExtendedInfoTable < {}, ; lmem header PrintDevice/2, ; #devices offset deviceStrings, ; devices offset deviceInfoTab ; info blocks > PrintDriverInfo < 90, ; timeout (sec) PR_DONT_RESEND, isoShme, ;ISO sub tab. asciiTransTable, PDT_PRINTER, FALSE > ;---------------------------------------------------------------------------- ; Device String Table and Strings ;---------------------------------------------------------------------------- ; Dave says I should have this here isoShme chunk.word 0ffffh ; ASCII Translation list for Foreign Language Versions asciiTransTable chunk.char ";;", 0 ;Create the actual tables here.... PrinterTables DriverInfo ends
//------------------------------------------------------------------------------ // // Copyright (c) 2011, ARM Limited. All rights reserved. // // SPDX-License-Identifier: BSD-2-Clause-Patent // //------------------------------------------------------------------------------ INCLUDE AsmMacroExport.inc PRESERVE8 RVCT_ASM_EXPORT ArmReadCntFrq mrc p15, 0, r0, c14, c0, 0 ; Read CNTFRQ bx lr RVCT_ASM_EXPORT ArmWriteCntFrq mcr p15, 0, r0, c14, c0, 0 ; Write to CNTFRQ bx lr RVCT_ASM_EXPORT ArmReadCntPct mrrc p15, 0, r0, r1, c14 ; Read CNTPT (Physical counter register) bx lr RVCT_ASM_EXPORT ArmReadCntkCtl mrc p15, 0, r0, c14, c1, 0 ; Read CNTK_CTL (Timer PL1 Control Register) bx lr RVCT_ASM_EXPORT ArmWriteCntkCtl mcr p15, 0, r0, c14, c1, 0 ; Write to CNTK_CTL (Timer PL1 Control Register) bx lr RVCT_ASM_EXPORT ArmReadCntpTval mrc p15, 0, r0, c14, c2, 0 ; Read CNTP_TVAL (PL1 physical timer value register) bx lr RVCT_ASM_EXPORT ArmWriteCntpTval mcr p15, 0, r0, c14, c2, 0 ; Write to CNTP_TVAL (PL1 physical timer value register) bx lr RVCT_ASM_EXPORT ArmReadCntpCtl mrc p15, 0, r0, c14, c2, 1 ; Read CNTP_CTL (PL1 Physical Timer Control Register) bx lr RVCT_ASM_EXPORT ArmWriteCntpCtl mcr p15, 0, r0, c14, c2, 1 ; Write to CNTP_CTL (PL1 Physical Timer Control Register) bx lr RVCT_ASM_EXPORT ArmReadCntvTval mrc p15, 0, r0, c14, c3, 0 ; Read CNTV_TVAL (Virtual Timer Value register) bx lr RVCT_ASM_EXPORT ArmWriteCntvTval mcr p15, 0, r0, c14, c3, 0 ; Write to CNTV_TVAL (Virtual Timer Value register) bx lr RVCT_ASM_EXPORT ArmReadCntvCtl mrc p15, 0, r0, c14, c3, 1 ; Read CNTV_CTL (Virtual Timer Control Register) bx lr RVCT_ASM_EXPORT ArmWriteCntvCtl mcr p15, 0, r0, c14, c3, 1 ; Write to CNTV_CTL (Virtual Timer Control Register) bx lr RVCT_ASM_EXPORT ArmReadCntvCt mrrc p15, 1, r0, r1, c14 ; Read CNTVCT (Virtual Count Register) bx lr RVCT_ASM_EXPORT ArmReadCntpCval mrrc p15, 2, r0, r1, c14 ; Read CNTP_CTVAL (Physical Timer Compare Value Register) bx lr RVCT_ASM_EXPORT ArmWriteCntpCval mcrr p15, 2, r0, r1, c14 ; Write to CNTP_CTVAL (Physical Timer Compare Value Register) bx lr RVCT_ASM_EXPORT ArmReadCntvCval mrrc p15, 3, r0, r1, c14 ; Read CNTV_CTVAL (Virtual Timer Compare Value Register) bx lr RVCT_ASM_EXPORT ArmWriteCntvCval mcrr p15, 3, r0, r1, c14 ; write to CNTV_CTVAL (Virtual Timer Compare Value Register) bx lr RVCT_ASM_EXPORT ArmReadCntvOff mrrc p15, 4, r0, r1, c14 ; Read CNTVOFF (virtual Offset register) bx lr RVCT_ASM_EXPORT ArmWriteCntvOff mcrr p15, 4, r0, r1, c14 ; Write to CNTVOFF (Virtual Offset register) bx lr END
.size 8000 .text@48 jp lstatint .text@100 jp lbegin .data@143 c0 .text@150 lbegin: ld a, 00 ldff(ff), a ld a, 30 ldff(00), a ld a, 01 ldff(4d), a stop, 00 ld c, 41 ld b, 03 lbegin_waitm3: ldff a, (c) and a, b cmp a, b jrnz lbegin_waitm3 ld a, 20 ldff(c), a ld a, 02 ldff(ff), a ei ld hl, 8000 ld(hl), 00 .text@1000 lstatint: nop .text@1102 ld(hl), 01 .text@1158 ld a, (hl--) and a, b jp lprint_a .text@7000 lprint_a: push af ld b, 91 call lwaitly_b xor a, a ldff(40), a pop af ld(9800), a ld bc, 7a00 ld hl, 8000 ld d, a0 lprint_copytiles: ld a, (bc) inc bc ld(hl++), a dec d jrnz lprint_copytiles ld a, c0 ldff(47), a ld a, 80 ldff(68), a ld a, ff ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a xor a, a ldff(69), a ldff(69), a ldff(43), a ld a, 91 ldff(40), a lprint_limbo: jr lprint_limbo .text@7400 lwaitly_b: ld c, 44 lwaitly_b_loop: ldff a, (c) cmp a, b jrnz lwaitly_b_loop ret .data@7a00 00 00 7f 7f 41 41 41 41 41 41 41 41 41 41 7f 7f 00 00 08 08 08 08 08 08 08 08 08 08 08 08 08 08 00 00 7f 7f 01 01 01 01 7f 7f 40 40 40 40 7f 7f 00 00 7f 7f 01 01 01 01 3f 3f 01 01 01 01 7f 7f 00 00 41 41 41 41 41 41 7f 7f 01 01 01 01 01 01 00 00 7f 7f 40 40 40 40 7e 7e 01 01 01 01 7e 7e 00 00 7f 7f 40 40 40 40 7f 7f 41 41 41 41 7f 7f 00 00 7f 7f 01 01 02 02 04 04 08 08 10 10 10 10 00 00 3e 3e 41 41 41 41 3e 3e 41 41 41 41 3e 3e 00 00 7f 7f 41 41 41 41 7f 7f 01 01 01 01 7f 7f
InitLink: ; Switch on the link port in receive mode with interrupts enabled. ld a, $0F ldh [$01], a ld a, $82 ldh [$02], a ld a, $01 ; switch to RunLink ld [$CEFF], a ret RunLink: ; Load the command byte, and only continue if there is a command. ld a, [$CEFE] and a ret z ; Reset our command byte to zero, and set HL to point at the data byte ld hl, $CEFE ld b, $00 ld [hl], b and $0F rst 0 dw LinkTestMessage dw LinkItem LinkTestMessage: ld a, $41 call $3273 ; open dialog in table 1 ret LinkItem: ld a, [$CEFD] ; get data byte ldh [$F1], a call GiveItemFromChestNoLink call ItemMessageNoLink ret LinkSendByte: ld e, a .repeat: ld a, e ldh [$01], a ld a, $83 ldh [$02], a .sendWait: ldh a, [$02] and $80 jr nz, .sendWait ldh a, [$01] cp $0F ; Check if our byte is acknowledged. jr nz, .repeat ; Back to receive mode ld a, $0F ldh [$01], a ld a, $82 ldh [$02], a ret
; A153286: a(n) = n^3 + sum((-1)^j*a(j)); for j=1 to n-1; a(1)=1. ; 1,7,33,37,135,91,309,169,555,271,873,397,1263,547,1725,721,2259,919,2865,1141,3543,1387,4293,1657,5115,1951,6009,2269,6975,2611,8013,2977,9123,3367,10305,3781,11559,4219,12885,4681,14283,5167,15753,5677,17295 mov $4,$0 mov $6,-1 pow $6,$0 bin $0,2 mul $0,3 mov $5,1 add $5,$0 add $0,2 mov $7,5 lpb $0 mov $0,$7 sub $0,1 mul $5,$6 mul $5,2 lpe mov $0,$5 trn $0,1 add $0,1 mul $0,2 sub $0,1 mov $2,$4 mul $2,3 add $0,$2 mov $3,$4 mul $3,$4 mov $2,$3 mul $2,3 add $0,$2
; A191902: Number of compositions of odd positive integers into 5 parts <= n. ; 0,16,121,512,1562,3888,8403,16384,29524,50000,80525,124416,185646,268912,379687,524288,709928,944784,1238049,1600000,2042050,2576816,3218171,3981312,4882812,5940688,7174453,8605184,10255574,12150000,14314575,16777216,19567696,22717712,26260937,30233088,34671978,39617584,45112099,51200000,57928100,65345616,73504221,82458112,92264062,102981488,114672503,127401984,141237624,156250000,172512625,190102016,209097746,229582512,251642187,275365888,300846028,328178384,357462149,388800000,422298150,458066416,496218271,536870912,580145312,626166288,675062553,726966784,782015674,840350000,902114675,967458816,1036535796,1109503312,1186523437,1267762688,1353392078,1443587184,1538528199,1638400000,1743392200,1853699216,1969520321,2091059712,2218526562,2352135088,2492104603,2638659584,2792029724,2952450000,3120160725,3295407616,3478441846,3669520112,3868904687,4076863488,4293670128,4519603984,4754950249,5000000000 add $0,1 pow $0,5 div $0,2
; This file is part of the ZRDX 0.50 project ; (C) 1998, Sergey Belyakov Segm Text malloc PROC DPMIFn 5 01 @@NewMCB equ EAX @@NewMCBW equ AX @@Offset equ EDI @@OffsetW equ DI @@NewSize equ EBX pushad push ds pop es shl ebx, 16 mov bx, cx add @@NewSize, 1000h-1 and @@NewSize, not 0FFFh call FindLinWindow call MakeNewMCB push @@NewSize push @@Offset push 1 call AllocPages $ifnot jnc call FreeMCB jmp MemError $endif ReturnMalloc: mov word ptr [esp].PA_ECX, @@OffsetW shr @@Offset, 16 mov word ptr [esp].PA_EBX, @@OffsetW mov word ptr [esp].PA_EDI, @@NewMCBW shr @@NewMCB, 16 mov word ptr [esp+32].DPMIFrame_ESI, @@NewMCBW popad retn malloc ENDP free PROC DPMIFn 5 02 @@NewMCB equ eax pushad push ds pop es mov esi, [esp+32].DPMIFrame_ESI shl esi, 16 mov si, di cmp esi, OffMCBVector jb @@Err cmp esi, MCBVectorEnd jae @@Err test esi, 0Fh jnz @@Err cmp [esi].MCB_StartOffset, 0 je @@Err mov ecx, [esi].MCB_EndOffset sub ecx, [esi].MCB_StartOffset push ecx push [esi].MCB_StartOffset push 1 call FreePages xchg @@NewMCB, esi call FreeMCB popad ret @@Err: mov al, 0 jmp MemError free ENDP MemError3: pop ebp MemError2: pop ebp MemError1: pop ebp MemError: ;mov byte ptr [esp].PA_EAX, al popad jmp DPMIError1 realloc PROC DPMIFn 5 03 @@NewMCB equ EAX @@NewSize equ EBX @@OptSize equ EBP @@CurMCB equ ESI @@OptMCB equ ECX @@Err EQU MemError pushad push ds pop es shl ebx, 16 mov esi, [esp+32].DPMIFrame_ESI shl esi, 16 mov bx, cx mov si, di add @@NewSize, 1000h-1 and @@NewSize, not 0FFFh cmp esi, OffMCBVector jb @@Err cmp esi, MCBVectorEnd jae @@Err test esi, 0Fh jne @@Err cmp [esi].MCB_StartOffset, 0 je @@Err mov @@OptMCB, [@@CurMCB].MCB_Next mov @@OptSize, [@@OptMCB].MCB_StartOffset sub @@OptSize, [@@CurMCB].MCB_StartOffset mov @@OptMCB, @@CurMCB cmp @@OptSize, @@NewSize $ifnot jb call FindLinWindowX $else jmp call FindLinWindow $endif cmp @@CurMCB, @@OptMCB $ifnot je call MakeNewMCB ;alloc 2 new pages; push @@NewMCB push @@CurMCB ;must preserve @@CurMCB, @@NewMCB, @@NewSize (esi, ebx, eax) push eax push eax ;reserve space for @@GCount lea edx, [esp-8] $do IFNDEF VMM push edi ;allocate space for phisical address mov edi, esp ;set pointer to it xor ecx, ecx inc ecx ;mov 1 to ecx push esi ;preserve esi call XAllocPages ;allocate 1 page pop esi jz @@FreeAndErr ELSE call alloc_page jc @@FreeAndErr push eax ENDIF cmp esp, edx ;test for end $enddo jne @@MSize equ edi @@T equ ebp @@T1 equ ecx mov @@MSize, [@@CurMCB].MCB_EndOffset sub @@MSize, [@@CurMCB].MCB_StartOffset ;calculate size of the current block mov @@T, @@NewSize sub @@T, @@MSize $ifnot jb mov @@T1, [@@NewMCB].MCB_EndOffset sub @@T1, @@T push @@T push @@T1 push 1 call AllocPages $toendif jnc @@FreeAndErr: add edx, 8 $do jmp IFNDEF VMM mov esi, esp xor ecx,ecx inc ecx call XFreePages pop esi ELSE call free_page ENDIF $while cmp esp, edx $enddo jne pop esi jmp MemError $else; jmp neg @@T mov @@T1, [@@CurMCB].MCB_EndOffset sub @@T1, @@T push @@T push @@T1 push 1 call FreePages mov @@MSize, @@NewSize $endif add edx, 8 ;restore pointer to @@GCount and stack base ;all OK, move pages now @@PAddr0 equ ebp @@PAddr1 equ ebx @@DirIndex equ eax @@SDirIndex0 equ esi @@SDirIndex1 equ edi @@LCount equ ecx mov @@PAddr0, [@@CurMCB].MCB_StartOffset mov @@PAddr1, [@@NewMCB].MCB_StartOffset shr @@Paddr0, 12 shr @@Paddr1, 12 shr @@MSize, 12 mov [edx], @@MSize cld $do mov @@LCount, 3FFh mov @@SDirIndex0, @@PAddr0 and @@SDirIndex0, @@LCount and @@LCount, @@PAddr1 lea @@SDirIndex1, SDir1Win[@@LCount*4] cmp @@LCount, @@SDirIndex0 $ifnot ja mov @@LCount, @@SDirIndex0 $endif lea @@SDirIndex0, SDir0Win[@@SDirIndex0*4] sub @@LCount, 400h neg @@LCount cmp @@LCount, [edx] ; @@GCount $ifnot jb mov @@LCount, [edx] ; @@GCount $endif mov @@DirIndex, @@PAddr1 shr @@DirIndex, 10 lea @@DirIndex, PageDir[@@DirIndex*4] cmp dword ptr [nEntriesInTable-PageDir][@@DirIndex], 0 $ifnot jnz pop dword ptr [@@DirIndex] $endif add [nEntriesInTable-PageDir][@@DirIndex], @@LCount mov eax, [@@DirIndex] mov SDir1Entry, eax mov @@DirIndex, @@PAddr0 shr @@DirIndex, 10 lea @@DirIndex, PageDir[@@DirIndex*4] push dword ptr[@@DirIndex] pop SDir0Entry sub [nEntriesInTable-PageDir][@@DirIndex], @@LCount $ifnot jnz push dword ptr [@@DirIndex] and dword ptr [@@DirIndex], 0 $endif add @@PAddr0, @@LCount add @@PAddr1, @@LCount InvalidateTLB xor eax, eax sub [edx], @@LCount ;[esp] = @@GCount push ecx esi rep movsd pop edi ecx rep stosd ;mov @@GCount, [edx] $enddo jnz ;add edx, 8 $do jmp IFNDEF VMM mov esi, esp xor ecx,ecx inc ecx call XFreePages pop esi ELSE call free_page ENDIF $while cmp esp, edx $enddo jne pop esi ;add esp, 4 pop @@NewMCB ;free space for @@GCount pop @@NewMCB call FreeMCB pop eax @@ReturnMalloc: mov edi, [eax].MCB_StartOffset ;@@Offset jmp ReturnMalloc $else mov @@MSize, [@@CurMCB].MCB_EndOffset sub @@MSize, [@@CurMCB].MCB_StartOffset ;calculate size of the current block sub @@MSize, @@NewSize $ifnot jae neg @@MSize push @@MSize push [@@CurMCB].MCB_EndOffset push 1 call AllocPages jc @@Err add [@@CurMCB].MCB_EndOffset, @@MSize $else jmp sub [@@CurMCB].MCB_EndOffset, @@MSize push @@MSize push [@@CurMCB].MCB_EndOffset push 1 call FreePages $endif xchg eax, @@CurMCB jmp @@ReturnMalloc $endif ;@@Err: jmp MemError realloc ENDP FindLinWindow PROC @@NewMCB equ EAX @@NewSize equ EBX @@OptSize equ EBP @@CurMCB equ ESI @@OptMCB equ ECX @@MaxCount equ EDX @@Count equ EDI @@c equ @@NewMCB @@t_size equ @@CurMCB mov @@OptMCB, RootMCB.MCB_Prev mov @@OptSize, RootMCB.MCB_StartOffset; 0; 0FFF00000h ;LastMappedPage !!!!!!! sub @@OptSize, [@@OptMCB].MCB_EndOffset cmp @@OptSize, @@NewSize $ifnot jae or @@OptSize, -1 $endif FindLinWindowX: push @@t_size push @@OptMCB mov @@MaxCount, nmemblocks cmp @@MaxCount, 10000 $ifnot jb mov @@MaxCount, 10000 $endif mov @@Count, 50 cmp @@Count, @@MaxCount $ifnot jb mov @@Count, @@MaxCount $endif sub @@MaxCount, @@Count mov @@c, MemRover inc @@MaxCount $do ;jmp dec @@Count jz @@CheckEnd @@Continue: mov @@t_size, [@@c].MCB_StartOffset mov @@c, [@@c].MCB_Prev sub @@t_size, [@@c].MCB_EndOffset cmp @@t_size, @@NewSize $loop jb cmp @@t_size, @@OptSize $loop jae mov @@OptSize, @@t_size mov @@OptMCB, @@c or @@MaxCount, @@MaxCount $enddo jnz @@Exit: mov MemRover, @@c pop @@t_size ;add esp, 4 pop @@t_size ;restore value, destroyed by @@t_size retn @@CheckEnd: cmp @@MaxCount, 1 je @@L1 cmp @@OptMCB, [esp] jne @@Exit @@L1: xchg @@Count, @@MaxCount or @@Count, @@Count jnz @@Continue cmp @@OptSize, -1 jne @@Exit jmp MemError3 FindLinWindow ENDP MakeNewMCB PROC @@NewMCB equ EAX @@NewSize equ EBX @@c equ EDX @@count equ EDI @@OptMCB equ ECX @@NextMCB equ @@count @@PrevMCB equ @@c @@Offset equ EDI ;@@count & @@NextMCB mov @@c, FMemRover or @@c, @@c jz @@AllocMCB mov @@NewMCB, @@c mov @@count, 14 $do dec @@count jz @@Exit1 @@L0: mov @@c, [@@c].MCB_Next cmp @@c, @@NewMCB $loop ja mov @@NewMCB, @@c dec @@count jnz @@L0 $enddo @@Exit1: mov @@NextMCB, [@@NewMCB].MCB_Next ;delete MCB from free list mov @@PrevMCB, [@@NewMCB].MCB_Prev mov [@@NextMCB].MCB_Prev, @@PrevMCB mov [@@PrevMCB].MCB_Next, @@NextMCB cmp @@NewMCB, FMemRover $ifnot jne cmp @@NextMCB, @@NewMCB $ifnot jne xor @@NextMCB, @@NextMCB $endif mov FMemRover, @@NextMCB $endif @@Exit: ;new MCB succefully allocated, now setup it ;insert new MCB in the allocated list mov @@NextMCB, [@@OptMCB].MCB_Next mov [@@NewMCB].MCB_Next, @@NextMCB mov [@@NewMCB].MCB_Prev, @@OptMCB mov [@@OptMCB].MCB_Next, @@NewMCB mov [@@NextMCB].MCB_Prev, @@NewMCB ;set start & end locations for new MCB mov @@Offset, [@@OptMCB].MCB_EndOffset mov [@@NewMCB].MCB_StartOffset, @@Offset lea @@c, [@@Offset + @@NewSize] mov [@@NewMCB].MCB_EndOffset, @@c inc nmemblocks retn @@AllocMCB: mov @@NewMCB, MCBVectorEnd cmp @@NewMCB, 800000h; OffMCBVector+ jae @@Error push size MCBStruct push @@NewMCB push 0 call AllocPages jc @@Error add MCBVectorEnd, size MCBStruct jmp @@Exit @@Error: jmp MemError1 MakeNewMCB ENDP FreeMCB PROC @@MCB equ eax @@MCB1 equ ecx @@NextMCB equ edx @@PrevMCB equ edi @@NextMCB1 equ @@NextMCB @@PrevMCB1 equ @@PrevMCB @@rover equ @@NextMCB @@next equ @@PrevMCB @@size equ @@PrevMCB dec nmemblocks mov @@NextMCB, [@@MCB].MCB_Next ;exclude from allocated list mov @@PrevMCB, [@@MCB].MCB_Prev mov [@@NextMCB].MCB_Prev, @@PrevMCB mov [@@PrevMCB].MCB_Next, @@NextMCB cmp @@MCB, MemRover $ifnot jne mov MemRover, @@PrevMCB $endif mov @@rover, FMemRover or @@rover, @@rover $ifnot jne mov @@rover, @@MCB $else jmp mov ecx, 10 $do mov @@rover, [@@rover].MCB_Next $enddo loop mov @@next, [@@rover].MCB_Next mov [@@MCB].MCB_Next, @@next mov [@@next].MCB_Prev, @@MCB $endif mov [@@MCB].MCB_Prev, @@rover mov [@@rover].MCB_Next, @@MCB ;insert index in the free indexes list and [@@MCB].MCB_StartOffset, 0 mov @@MCB1, MCBVectorEnd $do jmp cmp [@@MCB1-size MCBStruct].MCB_StartOffset, 0 $break jne sub @@MCB1, size MCBStruct mov @@NextMCB1, [@@MCB1].MCB_Next mov @@PrevMCB1, [@@MCB1].MCB_Prev mov [@@NextMCB1].MCB_Prev, @@PrevMCB1 mov [@@PrevMCB1].MCB_Next, @@NextMCB1 cmp @@MCB, @@MCB1 $ifnot jne mov @@MCB, @@PrevMCB1 cmp @@NextMCB1, @@MCB1 $ifnot jne xor @@MCB, @@MCB $endif $endif $while cmp @@MCB1, OffMCBVector $enddo ja mov @@size, MCBVectorEnd sub @@size, @@MCB1 $ifnot je push @@size push @@MCB1 push 0 call FreePages mov MCBVectorEnd, @@MCB1 $endif mov FMemRover, @@MCB retn FreeMCB ENDP DPROC CleanMemVector uses ebx, esi, eax mov ebx, OffMCBVector mov esi, ebx $do jmp cmp [ebx].MCB_StartOffset, 0 $ifnot je mov eax, [ebx].MCB_EndOffset sub eax, [ebx].MCB_StartOffset push eax push [ebx].MCB_StartOffset push 1 call FreePages $endif add ebx, size MCBStruct $while cmp ebx, MCBVectorEnd $enddo jb sub ebx, esi push ebx push esi push 1 call FreePages ret endp IFNDEF Release DPROC Random mov eax, Seed imul eax, 015a4e35h inc eax mov Seed, eax ret ENDP ;Vl = 500 ;TVector DD Vl dup(0) ;.code DPROC MemTest_ pushad mov ecx, Vl mov edi, OffTVector xor eax, eax rep stosd mov ecx, 0000 $do call Random xor edx, edx mov esi, Vl div esi lea ebp, TVector[edx*4] cmp dword ptr [ebp], 0 $ifnot jne call Random xor edx, edx mov esi, 200000*10;400000 div esi push ecx lea ecx, [edx+10] mov ebx, ecx shr ebx, 16 ;bx:cx - linear address mov ax, 501h int 31h pop ecx jc @@Exit1 shl esi, 16 mov si, di mov [ebp], esi $else jmp mov edi, [ebp] mov dword ptr [ebp], 0 mov esi, edi shr esi, 16 mov ax, 502h int 31h jc @@Exit2 $endif mov ah, 1 sti int 16h cli $break jnz inc ecx mov ax, 0DE03h VCPITrap push edi push edx push ecx push MCBVectorEnd push nFreePages ;push esp 5 17 ;call MemDump add esp, 5*4 $enddo jmp @@ret: sti mov ah, 0 int 16h cli popad ret @@Exit1:; ;mov word ptr ds:[0B8000h+160*6+50], 1F31h jmp @@ret @@Exit2:; ;mov word ptr ds:[0B8000h+160*6+50], 1F32h jmp @@ret ENDP ENDIF ESeg Text ;end
; A022309: a(n) = a(n-1) + a(n-2) + 1 for n>1, a(0)=0, a(1)=4. ; 0,4,5,10,16,27,44,72,117,190,308,499,808,1308,2117,3426,5544,8971,14516,23488,38005,61494,99500,160995,260496,421492,681989,1103482,1785472,2888955,4674428,7563384,12237813,19801198,32039012,51840211,83879224,135719436,219598661,355318098,574916760,930234859,1505151620,2435386480,3940538101,6375924582,10316462684,16692387267,27008849952,43701237220,70710087173,114411324394,185121411568,299532735963,484654147532,784186883496,1268841031029,2053027914526,3321868945556,5374896860083,8696765805640,14071662665724,22768428471365,36840091137090,59608519608456,96448610745547,156057130354004,252505741099552,408562871453557,661068612553110,1069631484006668,1730700096559779,2800331580566448,4531031677126228,7331363257692677 mov $1,1 mov $2,4 lpb $0,1 sub $0,1 mov $3,$2 mov $2,$1 add $1,$3 lpe sub $1,1
;Z88 Small C Library functions, linked using the z80 module assembler ;Small C Z88 converted by Dominic Morris <djm@jb.man.ac.uk> ; ;11/3/99 djm Saved two bytes by removing useless ld h,0 ; ; ; $Id: getk.asm,v 1.3 2016-03-13 18:14:13 dom Exp $ ; SECTION code_clib PUBLIC getk ;Read keys .getk push ix ld c,$31 ;SCANKEY rst $10 pop ix ld hl,0 ret z ;no key pressed IF STANDARDESCAPECHARS ld a,13 cp e jr nz,not_return ld e,10 .not_return ENDIF ld l,e ret
// Copyright 2019 The Fuchsia 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 <lib/focaltech/focaltech.h> #include <limits.h> #include <unistd.h> #include <ddk/binding.h> #include <ddk/debug.h> #include <ddk/device.h> #include <ddk/metadata.h> #include <ddk/platform-defs.h> #include <ddk/protocol/platform/bus.h> #include <fbl/algorithm.h> #include <soc/aml-s905d2/s905d2-gpio.h> #include <soc/aml-s905d2/s905d2-hw.h> #include "nelson-gpios.h" #include "nelson.h" namespace nelson { static const uint32_t device_id = FOCALTECH_DEVICE_FT3X27; static const device_metadata_t ft3x27_touch_metadata[] = { {.type = DEVICE_METADATA_PRIVATE, .data = &device_id, .length = sizeof(device_id)}, }; // Composite binding rules for focaltech touch driver. static const zx_bind_inst_t root_match[] = { BI_MATCH(), }; const zx_bind_inst_t ft_i2c_match[] = { BI_ABORT_IF(NE, BIND_PROTOCOL, ZX_PROTOCOL_I2C), BI_ABORT_IF(NE, BIND_I2C_BUS_ID, NELSON_I2C_2), BI_MATCH_IF(EQ, BIND_I2C_ADDRESS, I2C_FOCALTECH_TOUCH_ADDR), }; const zx_bind_inst_t goodix_i2c_match[] = { BI_ABORT_IF(NE, BIND_PROTOCOL, ZX_PROTOCOL_I2C), BI_ABORT_IF(NE, BIND_I2C_BUS_ID, NELSON_I2C_2), BI_MATCH_IF(EQ, BIND_I2C_ADDRESS, I2C_GOODIX_TOUCH_ADDR), }; static const zx_bind_inst_t gpio_int_match[] = { BI_ABORT_IF(NE, BIND_PROTOCOL, ZX_PROTOCOL_GPIO), BI_MATCH_IF(EQ, BIND_GPIO_PIN, GPIO_TOUCH_INTERRUPT), }; static const zx_bind_inst_t gpio_reset_match[] = { BI_ABORT_IF(NE, BIND_PROTOCOL, ZX_PROTOCOL_GPIO), BI_MATCH_IF(EQ, BIND_GPIO_PIN, GPIO_TOUCH_RESET), }; static const device_fragment_part_t ft_i2c_fragment[] = { {countof(root_match), root_match}, {countof(ft_i2c_match), ft_i2c_match}, }; static const device_fragment_part_t goodix_i2c_fragment[] = { {countof(root_match), root_match}, {countof(goodix_i2c_match), goodix_i2c_match}, }; static const device_fragment_part_t gpio_int_fragment[] = { {countof(root_match), root_match}, {countof(gpio_int_match), gpio_int_match}, }; static const device_fragment_part_t gpio_reset_fragment[] = { {countof(root_match), root_match}, {countof(gpio_reset_match), gpio_reset_match}, }; static const device_fragment_t ft_fragments[] = { {"i2c", countof(ft_i2c_fragment), ft_i2c_fragment}, {"gpio-int", countof(gpio_int_fragment), gpio_int_fragment}, {"gpio-reset", countof(gpio_reset_fragment), gpio_reset_fragment}, }; static const device_fragment_t goodix_fragments[] = { {"i2c", countof(goodix_i2c_fragment), goodix_i2c_fragment}, {"gpio-int", countof(gpio_int_fragment), gpio_int_fragment}, {"gpio-reset", countof(gpio_reset_fragment), gpio_reset_fragment}, }; zx_status_t Nelson::TouchInit() { const uint32_t display_id = GetDisplayId(); zxlogf(INFO, "Board rev: %u", GetBoardRev()); zxlogf(INFO, "Panel ID: 0b%d%d", display_id & 0b10 ? 1 : 0, display_id & 0b01 ? 1 : 0); if (GetBoardRev() < BOARD_REV_P2) { return TouchInitP1(); } const zx_device_prop_t props[] = { {BIND_PLATFORM_DEV_VID, 0, PDEV_VID_GOODIX}, {BIND_PLATFORM_DEV_DID, 0, PDEV_DID_GOODIX_GT6853}, }; const bool use_9365_config = Is9365Ddic(); const device_metadata_t touch_metadata[] = { { .type = DEVICE_METADATA_PRIVATE, .data = &use_9365_config, .length = sizeof(use_9365_config), }, }; const composite_device_desc_t comp_desc = { .props = props, .props_count = countof(props), .fragments = goodix_fragments, .fragments_count = countof(goodix_fragments), .coresident_device_index = UINT32_MAX, .metadata_list = touch_metadata, .metadata_count = countof(touch_metadata), }; zx_status_t status = DdkAddComposite("gt6853-touch", &comp_desc); if (status != ZX_OK) { zxlogf(ERROR, "nelson_touch_init(gt6853): composite_device_add failed: %d", status); return status; } return ZX_OK; } zx_status_t Nelson::TouchInitP1() { /* Two variants of display are supported, one with BOE display panel and ft3x27 touch controller, the other with INX panel and Goodix touch controller. This GPIO input is used to identify each. Logic 0 for BOE/ft3x27 combination Logic 1 for Innolux/Goodix combination */ const uint8_t gpio_state = GetDisplayId() & 1; zxlogf(INFO, "%s - Touch type: %s", __func__, (gpio_state ? "GTx8x" : "FT3x27")); if (!gpio_state) { const zx_device_prop_t props[] = { {BIND_PLATFORM_DEV_VID, 0, PDEV_VID_GOOGLE}, {BIND_PLATFORM_DEV_PID, 0, PDEV_PID_NELSON}, {BIND_PLATFORM_DEV_DID, 0, PDEV_DID_GOODIX_GTX8X}, }; const composite_device_desc_t comp_desc = { .props = props, .props_count = countof(props), .fragments = goodix_fragments, .fragments_count = countof(goodix_fragments), .coresident_device_index = UINT32_MAX, .metadata_list = nullptr, .metadata_count = 0, }; zx_status_t status = DdkAddComposite("gtx8x-touch", &comp_desc); if (status != ZX_OK) { zxlogf(INFO, "nelson_touch_init(gt92xx): composite_device_add failed: %d", status); return status; } } else { const zx_device_prop_t props[] = { {BIND_PLATFORM_DEV_VID, 0, PDEV_VID_GENERIC}, {BIND_PLATFORM_DEV_PID, 0, PDEV_PID_NELSON}, {BIND_PLATFORM_DEV_DID, 0, PDEV_DID_FOCALTOUCH}, }; const composite_device_desc_t comp_desc = { .props = props, .props_count = countof(props), .fragments = ft_fragments, .fragments_count = countof(ft_fragments), .coresident_device_index = UINT32_MAX, .metadata_list = ft3x27_touch_metadata, .metadata_count = std::size(ft3x27_touch_metadata), }; zx_status_t status = DdkAddComposite("ft3x27-touch", &comp_desc); if (status != ZX_OK) { zxlogf(ERROR, "%s(ft3x27): CompositeDeviceAdd failed: %d", __func__, status); return status; } } return ZX_OK; } } // namespace nelson
//////////////////////////////////////////////////////////////////////////// // Module : ai_zombie_fsm.cpp // Created : 25.04.2002 // Modified : 07.11.2002 // Author : Dmitriy Iassenev // Description : AI Behaviour for monster "Zombie" //////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "ai_zombie.h" #include "../ai_monsters_misc.h" #undef WRITE_TO_LOG #define WRITE_TO_LOG(s) m_bStopThinking = true; /** #define WRITE_TO_LOG(s) {\ Msg("Monster %s : \n* State : %s\n* Time delta : %7.3f\n* Global time : %7.3f",*cName(),s,m_fTimeUpdateDelta,float(Level().timeServer())/1000.f);\ if (!feel_visible.size())\ Msg("* No objects in frustum",feel_visible.size());\ else {\ Msg("* Objects in frustum (%d) :",feel_visible.size());\ for (int i=0; i<(int)feel_visible.size(); ++i)\ Msg("* %s",*feel_visible[i].O->cName());\ feel_vision_get(m_tpaVisibleObjects);\ if (!m_tpaVisibleObjects.size())\ Msg("* No visible objects");\ else {\ Msg("* Visible objects (%d) :",m_tpaVisibleObjects.size());\ for (int i=0; i<(int)m_tpaVisibleObjects.size(); ++i)\ Msg("* %s (distance %7.2fm)",*m_tpaVisibleObjects[i]->cName(),Position().distance_to(m_tpaVisibleObjects[i]->Position()));\ }\ }\ m_bStopThinking = true;\ } /**/ #ifndef DEBUG #undef WRITE_TO_LOG #define WRITE_TO_LOG(s) #endif void CAI_Zombie::Think() { m_bStopThinking = false; do { m_ePreviousState = m_eCurrentState; switch(m_eCurrentState) { case aiZombieDie : { Death(); break; } case aiZombieFreeHuntingActive : { FreeHuntingActive(); break; } case aiZombieFreeHuntingPassive : { FreeHuntingPassive(); break; } case aiZombieAttackFire : { AttackFire(); break; } case aiZombieAttackRun : { AttackRun(); break; } case aiZombieTurn : { Turn(); break; } case aiZombiePursuit : { Pursuit(); break; } case aiZombieReturnHome : { ReturnHome(); break; } case aiZombieResurrect : { Resurrect(); break; } } m_bStateChanged = m_ePreviousState != m_eCurrentState; } while (!m_bStopThinking); // if (m_fSpeed > EPS_L) { // m_path.resize(3); // m_path[0].floating = m_path[1].floating = m_path[2].floating = FALSE; // m_path[0].P = m_tOldPosition; // m_path[1].P = Position(); // Fvector tTemp; // tTemp.setHP(m_body.current.yaw,m_body.current.pitch); // tTemp.normalize_safe(); // tTemp.mul(10.f); // m_path[2].P.add(Position(),tTemp); // CDetailPathManager::m_current_travel_point = 0; // Position() = m_tOldPosition; // } // else { // m_path.clear(); // CDetailPathManager::m_current_travel_point = 0; // } } void CAI_Zombie::Death() { WRITE_TO_LOG ("Dying..."); m_bStopThinking = true; CGroup &Group = Level().Teams[g_Team()].Squads[g_Squad()].Groups[g_Group()]; vfSetFire (false,Group); enable_movement (false); if (m_fFood <= 0) { if (m_previous_query_time <= GetLevelDeathTime()) m_previous_query_time = Level().timeServer(); setVisible (false); if (Level().timeServer() - m_previous_query_time > m_dwToWaitBeforeDestroy) { setEnabled(false); // NET_Packet P; // u_EventGen (P,GE_DESTROY,ID()); // u_EventSend (P); } } else { if (Level().timeServer() - GetLevelDeathTime() > m_dwTimeToLie) { //m_fFood = m_PhysicMovementControl->GetMass()*100; fEntityHealth = m_fMaxHealthValue; m_tpSoundBeingPlayed = 0; m_previous_query_time = Level().timeServer(); GO_TO_NEW_STATE(aiZombieResurrect); } } SelectAnimation(XFORM().k,XFORM().k,0); } void CAI_Zombie::Turn() { WRITE_TO_LOG("Turning..."); Fmatrix mXFORM; mXFORM.setHPB (m_tHPB.x = -m_body.current.yaw,m_tHPB.y,m_tHPB.z); mXFORM.c.set (Position() ); XFORM().set (mXFORM ); CHECK_IF_GO_TO_PREV_STATE(angle_difference(m_body.target.yaw, m_body.current.yaw) <= PI_DIV_6) INIT_SQUAD_AND_LEADER CGroup &Group = Level().Teams[g_Team()].Squads[g_Squad()].Groups[g_Group()]; vfSetFire(false,Group); float fTurnAngle = _min(_abs(m_body.target.yaw - m_body.current.yaw), PI_MUL_2 - _abs(m_body.target.yaw - m_body.current.yaw)); m_body.speed = 3*fTurnAngle; vfSetMovementType(0); } void CAI_Zombie::FreeHuntingActive() { WRITE_TO_LOG("Free hunting active"); m_bStopThinking = true; if (!g_Alive()) { m_fSpeed = m_fSafeSpeed = 0; return; } if (enemy()) { m_tpSoundBeingPlayed = &(m_tpaSoundNotice[::Random.randI(SND_NOTICE_COUNT)]); ::Sound->play_at_pos (*m_tpSoundBeingPlayed,this,eye_matrix.c); m_fGoalChangeTime = 0; if ((enemy()->Position().distance_to(m_tSafeSpawnPosition) < m_fMaxPursuitRadius) || (Position().distance_to(m_tSafeSpawnPosition) > m_fMaxHomeRadius)) SWITCH_TO_NEW_STATE_THIS_UPDATE(aiZombieAttackRun) } if ((m_tLastSound.dwTime >= m_dwLastUpdateTime) && (m_tLastSound.tpEntity) && (m_tLastSound.tpEntity->g_Team() != g_Team())) { if (m_tLastSound.tpEntity) m_tSavedEnemy = m_tLastSound.tpEntity; m_tSavedEnemyPosition = m_tLastSound.tSavedPosition; m_dwLostEnemyTime = Level().timeServer(); SWITCH_TO_NEW_STATE_THIS_UPDATE(aiZombiePursuit); } m_tSpawnPosition.set(m_tSafeSpawnPosition); m_fGoalChangeDelta = m_fSafeGoalChangeDelta; m_tVarGoal.set (m_tGoalVariation); m_fASpeed = m_fAngleSpeed; if (m_bStateChanged) vfChooseNewSpeed(); if (bfCheckIfGoalChanged()) { if (m_bStateChanged || (Position().distance_to(m_tSpawnPosition) > m_fStableDistance) || (::Random.randF(0,1) > m_fChangeActiveStateProbability)) if (Position().distance_to(m_tSafeSpawnPosition) > m_fMaxHomeRadius) m_fSpeed = m_fSafeSpeed = m_fMaxSpeed; else vfChooseNewSpeed(); else { vfRemoveActiveMember(); } } vfUpdateTime(m_fTimeUpdateDelta); if (bfComputeNewPosition(false)) SWITCH_TO_NEW_STATE_THIS_UPDATE(aiZombieTurn); // if (Level().timeServer() - m_previous_query_time > 5000) { // m_previous_query_time = Level().timeServer(); // PKinematics(Visual())->PlayFX(m_tZombieAnimations.tNormal.tTorso.tpBlaBlaBla0); // } if (!m_tpSoundBeingPlayed || !m_tpSoundBeingPlayed->feedback) { u32 dwCurTime = Level().timeServer(); if (m_tpSoundBeingPlayed && !m_tpSoundBeingPlayed->feedback) { m_tpSoundBeingPlayed = 0; m_dwLastVoiceTalk = dwCurTime; } if ((dwCurTime - m_dwLastSoundRefresh > m_fVoiceRefreshRate) && ((dwCurTime - m_dwLastVoiceTalk > m_fMaxVoiceIinterval) || ((dwCurTime - m_dwLastVoiceTalk > m_fMinVoiceIinterval) && (::Random.randF(0,1) > (dwCurTime - m_dwLastVoiceTalk - m_fMinVoiceIinterval)/(m_fMaxVoiceIinterval - m_fMinVoiceIinterval))))) { m_dwLastSoundRefresh = dwCurTime; // Play voice-ref_sound m_tpSoundBeingPlayed = &(m_tpaSoundIdle[Random.randI(SND_IDLE_COUNT)]); if (!m_tpSoundBeingPlayed->feedback) ::Sound->play_at_pos(*m_tpSoundBeingPlayed,this,eye_matrix.c); else m_tpSoundBeingPlayed->set_position(eye_matrix.c); } } else if (m_tpSoundBeingPlayed && m_tpSoundBeingPlayed->feedback) m_tpSoundBeingPlayed->set_position(eye_matrix.c); vfSetFire(false,Level().get_group(g_Team(),g_Squad(),g_Group())); } void CAI_Zombie::FreeHuntingPassive() { WRITE_TO_LOG("Free hunting passive"); m_bStopThinking = true; if (!g_Alive()) { vfAddActiveMember(true); m_bStopThinking = false; return; } if (enemy()) { m_fGoalChangeTime = 0; vfAddActiveMember(true); m_bStopThinking = false; return; } if ((m_tLastSound.dwTime >= m_dwLastUpdateTime) && (m_tLastSound.tpEntity) && (m_tLastSound.tpEntity->g_Team() != g_Team())) { vfAddActiveMember(true); m_bStopThinking = false; return; } m_fSpeed = 0.f; vfAddActiveMember(); vfSetFire(false,Level().get_group(g_Team(),g_Squad(),g_Group())); } void CAI_Zombie::AttackFire() { WRITE_TO_LOG("Attacking enemy..."); if (!g_Alive()) { m_fSpeed = m_fSafeSpeed = 0; return; } if (enemy()) m_dwLostEnemyTime = Level().timeServer(); CHECK_IF_GO_TO_PREV_STATE(!(enemy()) || !enemy()->g_Alive()); CHECK_IF_GO_TO_NEW_STATE((enemy()->Position().distance_to(Position()) > m_fAttackDistance),aiZombieAttackRun) Fvector tTemp; tTemp.sub (enemy()->Position(),Position()); vfNormalizeSafe (tTemp); SRotation sTemp; mk_rotation (tTemp,sTemp); CHECK_IF_GO_TO_NEW_STATE(angle_difference(m_body.current.yaw,sTemp.yaw) > m_fAttackAngle,aiZombieAttackRun) CGroup &Group = Level().Teams[g_Team()].Squads[g_Squad()].Groups[g_Group()]; Fvector tDistance; tDistance.sub (Position(),enemy()->Position()); enable_movement (false); vfAimAtEnemy(); vfSetFire(true,Group); m_fSpeed = 0.f; } void CAI_Zombie::AttackRun() { WRITE_TO_LOG("Attack enemy"); m_bStopThinking = true; if (!g_Alive()) { m_fSpeed = m_fSafeSpeed = 0; return; } vfSetFire(false,Level().get_group(g_Team(),g_Squad(),g_Group())); if (enemy()) m_dwLostEnemyTime = Level().timeServer(); CHECK_IF_GO_TO_NEW_STATE_THIS_UPDATE(enemy() && (m_tSafeSpawnPosition.distance_to(enemy()->Position()) > m_fMaxPursuitRadius),aiZombieReturnHome); CHECK_IF_GO_TO_PREV_STATE(!(enemy()) || !enemy()->g_Alive()); Fvector tDistance; tDistance.sub(Position(),enemy()->Position()); Fvector tTemp; tTemp.sub(enemy()->Position(),Position()); vfNormalizeSafe(tTemp); SRotation sTemp; mk_rotation(tTemp,sTemp); if (enemy()->Position().distance_to(Position()) <= m_fAttackDistance) { if (angle_difference(m_body.target.yaw, sTemp.yaw) <= m_fAttackAngle) { GO_TO_NEW_STATE_THIS_UPDATE(aiZombieAttackFire); } else { m_body.target.yaw = sTemp.yaw; SWITCH_TO_NEW_STATE_THIS_UPDATE(aiZombieTurn); } } else CHECK_IF_SWITCH_TO_NEW_STATE_THIS_UPDATE(angle_difference(m_body.target.yaw, m_body.current.yaw) > m_fAttackAngle,aiZombieTurn); INIT_SQUAD_AND_LEADER; if ((Level().timeServer() - m_previous_query_time > TIME_TO_GO) || !m_previous_query_time) m_tGoalDir.set(enemy()->Position()); vfUpdateTime(m_fTimeUpdateDelta); m_fSafeSpeed = m_fSpeed = m_fAttackSpeed; if (bfComputeNewPosition(true,true)) SWITCH_TO_NEW_STATE_THIS_UPDATE(aiZombieTurn); if (!m_tpSoundBeingPlayed || !m_tpSoundBeingPlayed->feedback) { u32 dwCurTime = Level().timeServer(); if (m_tpSoundBeingPlayed && !m_tpSoundBeingPlayed->feedback) { m_tpSoundBeingPlayed = 0; m_dwLastPursuitTalk = dwCurTime; } if ((dwCurTime - m_dwLastSoundRefresh > m_fPursuitRefreshRate) && ((dwCurTime - m_dwLastPursuitTalk > m_fMaxPursuitIinterval) || ((dwCurTime - m_dwLastPursuitTalk > m_fMinPursuitIinterval) && (::Random.randF(0,1) > (dwCurTime - m_dwLastPursuitTalk - m_fMinPursuitIinterval)/(m_fMaxPursuitIinterval - m_fMinPursuitIinterval))))) { m_dwLastSoundRefresh = dwCurTime; // Play pursuit-ref_sound m_tpSoundBeingPlayed = &(m_tpaSoundPursuit[Random.randI(SND_PURSUIT_COUNT)]); if (!m_tpSoundBeingPlayed->feedback) ::Sound->play_at_pos(*m_tpSoundBeingPlayed,this,eye_matrix.c); else m_tpSoundBeingPlayed->set_position(eye_matrix.c); } } else if (m_tpSoundBeingPlayed && m_tpSoundBeingPlayed->feedback) m_tpSoundBeingPlayed->set_position(eye_matrix.c); } void CAI_Zombie::Pursuit() { WRITE_TO_LOG("Pursuit something"); if (!g_Alive()) { m_fSpeed = m_fSafeSpeed = 0; return; } vfSetFire(false,Level().get_group(g_Team(),g_Squad(),g_Group())); if (enemy()) m_dwLostEnemyTime = Level().timeServer(); CHECK_IF_SWITCH_TO_NEW_STATE_THIS_UPDATE(enemy(),aiZombieAttackRun); CHECK_IF_GO_TO_PREV_STATE_THIS_UPDATE(Level().timeServer() - (int)m_tLastSound.dwTime >= m_dwLostMemoryTime); if (m_tLastSound.dwTime >= m_dwLastUpdateTime) { if (m_tLastSound.tpEntity) m_tSavedEnemy = m_tLastSound.tpEntity; m_tSavedEnemyPosition = m_tLastSound.tSavedPosition; m_dwLostEnemyTime = Level().timeServer(); } if ((Level().timeServer() - m_previous_query_time > TIME_TO_GO) || !m_previous_query_time) m_tGoalDir.set(m_tSavedEnemyPosition); vfUpdateTime(m_fTimeUpdateDelta); if (bfComputeNewPosition(true,true)) SWITCH_TO_NEW_STATE_THIS_UPDATE(aiZombieTurn); } void CAI_Zombie::ReturnHome() { WRITE_TO_LOG("Returning home"); m_bStopThinking = true; if (!g_Alive()) { m_fSpeed = m_fSafeSpeed = 0; return; } vfSetFire(false,Level().get_group(g_Team(),g_Squad(),g_Group())); if (enemy() && (m_tSafeSpawnPosition.distance_to(enemy()->Position()) < m_fMaxPursuitRadius)) { m_fGoalChangeTime = 0; SWITCH_TO_NEW_STATE_THIS_UPDATE(aiZombieAttackRun) } CHECK_IF_GO_TO_PREV_STATE(Position().distance_to(m_tSafeSpawnPosition) < m_fMaxHomeRadius); m_tSpawnPosition.set (m_tSafeSpawnPosition); m_fGoalChangeDelta = m_fSafeGoalChangeDelta; m_tVarGoal.set (m_tGoalVariation); m_fASpeed = m_fAngleSpeed; m_fSpeed = m_fSafeSpeed = m_fAttackSpeed; if ((Level().timeServer() - m_previous_query_time > TIME_TO_GO) || !m_previous_query_time) m_tGoalDir.set (m_tSafeSpawnPosition); vfUpdateTime(m_fTimeUpdateDelta); if (bfComputeNewPosition()) SWITCH_TO_NEW_STATE_THIS_UPDATE(aiZombieTurn); } void CAI_Zombie::Resurrect() { WRITE_TO_LOG("Resurrecting"); m_bStopThinking = true; if (!g_Alive()) return; m_fSpeed = 0.f; CGroup &Group = Level().Teams[g_Team()].Squads[g_Squad()].Groups[g_Group()]; vfSetFire(false,Group); if (!m_tpSoundBeingPlayed || !m_tpSoundBeingPlayed->feedback) { m_tpSoundBeingPlayed = &(m_tpaSoundResurrect[Random.randI(SND_RESURRECT_COUNT)]); if (!m_tpSoundBeingPlayed->feedback) ::Sound->play_at_pos(*m_tpSoundBeingPlayed,this,eye_matrix.c); else m_tpSoundBeingPlayed->set_position(eye_matrix.c); } else if (m_tpSoundBeingPlayed && m_tpSoundBeingPlayed->feedback) m_tpSoundBeingPlayed->set_position(eye_matrix.c); for (int i=0; i<3; ++i) if (m_tpCurrentGlobalAnimation == m_tZombieAnimations.tNormal.tGlobal.tpaStandUp[i]) { bool bOk = false; switch (i) { case 0 : { bOk = (Level().timeServer() - m_previous_query_time) > 60*1000/30; break; } case 1 : { bOk = (Level().timeServer() - m_previous_query_time) > 80*1000/30; break; } case 2 : { bOk = (Level().timeServer() - m_previous_query_time) > 50*1000/30; break; } default : NODEFAULT; } if (bOk) { m_fGoalChangeTime = 0.f; GO_TO_NEW_STATE_THIS_UPDATE(aiZombieFreeHuntingActive); } break; } }
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %r15 push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x125d3, %r11 add $38054, %r15 movl $0x61626364, (%r11) xor $35368, %rdx lea addresses_A_ht+0x10af3, %rsi lea addresses_A_ht+0x1553, %rdi nop nop nop add %r13, %r13 mov $107, %rcx rep movsb nop nop nop nop nop add %r13, %r13 lea addresses_D_ht+0x1125f, %r13 nop and %rdx, %rdx mov (%r13), %rsi nop cmp %rcx, %rcx lea addresses_A_ht+0x1e253, %rdi nop nop nop nop xor $39438, %rsi mov $0x6162636465666768, %r11 movq %r11, (%rdi) nop and %r15, %r15 lea addresses_D_ht+0xabd3, %rsi lea addresses_normal_ht+0x17953, %rdi nop nop nop nop nop cmp %r11, %r11 mov $77, %rcx rep movsl inc %rdx lea addresses_D_ht+0x11633, %r11 nop xor %r13, %r13 movw $0x6162, (%r11) nop nop nop nop nop dec %rdx lea addresses_D_ht+0x7953, %rsi lea addresses_WC_ht+0x1de4b, %rdi clflush (%rsi) clflush (%rdi) nop sub %r14, %r14 mov $80, %rcx rep movsq nop nop sub %r13, %r13 lea addresses_UC_ht+0x1e053, %rsi lea addresses_D_ht+0x6553, %rdi nop nop xor $39569, %rdx mov $86, %rcx rep movsq nop cmp %rdi, %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %r15 pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r15 push %r8 push %r9 push %rbp push %rcx push %rdi push %rsi // Store lea addresses_normal+0x9f53, %rsi clflush (%rsi) nop nop nop nop nop cmp $32147, %rdi movb $0x51, (%rsi) nop nop xor %rdi, %rdi // Faulty Load lea addresses_RW+0xcd53, %rcx clflush (%rcx) nop and %rbp, %rbp mov (%rcx), %rdi lea oracles, %r15 and $0xff, %rdi shlq $12, %rdi mov (%r15,%rdi,1), %rdi pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r15 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_RW', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 8, 'type': 'addresses_normal', 'AVXalign': True, 'size': 1}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_RW', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4}} {'src': {'same': False, 'congruent': 4, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 10, 'type': 'addresses_A_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_A_ht', 'AVXalign': True, 'size': 8}} {'src': {'same': False, 'congruent': 6, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2}} {'src': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}} {'src': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
// // Created by Kotarou on 2020/6/26. // #include <fmt/format.h> #include <yaml-cpp/yaml.h> #include "socks5_decoder.h" #include "../uri.h" #include "../utils.h" #include "../exception/unsupported_configuration.h" YAML::Node Socks5Decoder::decode_config(const Uri &uri) { auto[name, raw_config] = strip_name(uri.getBody()); auto decoded_config = decode_base64(raw_config); auto config_view = std::string_view(decoded_config); auto credentials_pos = decoded_config.find('@'); auto credentials = Utils::split(config_view.substr(0, credentials_pos), ':'); proxy["type"] = std::string("socks5"); proxy["name"] = Utils::url_decode(name, true); if (name.empty()) { proxy["name"] = fmt::format("socks5_{}", Utils::get_random_string(10)); } if (credentials.size() == 2) { proxy["username"] = credentials[0]; proxy["password"] = credentials[1]; } auto server_config = Utils::split(config_view.substr(credentials_pos + 1, config_view.size() - 1), ':'); if (server_config.size() == 2) { proxy["server"] = server_config[0]; proxy["port"] = server_config[1]; } else { throw UnsupportedConfiguration("Incorrect Socks5 config"); } return proxy; }
Name: zel_init.asm Type: file Size: 266732 Last-Modified: '2016-05-13T04:36:32Z' SHA-1: 55F7A87B4EFE87B7AF5ED29F9ECABC399DACD591 Description: null
; vim: ft=nasm ; https://github.com/torvalds/linux/blob/v4.0-rc7/arch/sh/include/uapi/asm/unistd_32.h#L174 %define SYS_NANOSLEEP 162 ; https://github.com/torvalds/linux/blob/v4.0-rc7/include/uapi/linux/time.h#L9 ; struc timespec ; time.h ; tv_sec: resd 1 ; __kernel_time_t ; tv_nsec: resd 1 ; long ; endstruc section .text ; -------------------------------------------------------------- ; sys_nanosleep ; sleeps for given amount of seconds + nanoseconds ; @see 'man nanosleep' ; ; args: ecx = number of seconds to sleep for ; edx = number of nanoseconds to sleep for ; out : nothing, all registers preserved ; -------------------------------------------------------------- global sys_nanosleep sys_nanosleep: push eax push ebx push ecx ; build timespec struct in stack mov dword [ esp - 8 ], ecx ; seconds (tv_sec) mov dword [ esp - 4 ], edx ; nanoseconds (tv_nsec) mov eax, SYS_NANOSLEEP lea ebx, [ esp - 8] ; point ebx at timespec xor ecx, ecx ; don't need updates about time slept int 80h pop ecx pop ebx pop eax ret ;-------+ ; TESTS ; ;-------+ %ifenv sys_nanosleep %define milliseconds 1000000 extern sys_write_stdout section .data msg: db 10,"Done sleeping!",10 msg_len equ $-msg section .text global _start _start: nop ;;; mov ecx, 1 ; sleep exactly one and mov edx, 500 * milliseconds ; a half second call sys_nanosleep ;;; mov ecx, msg mov edx, msg_len call sys_write_stdout .exit: mov eax, 1 mov ebx, 0 int 80H %endif
; A173259: Period 3: repeat [4, 1, 4]. ; 4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4,1,4,4 mod $0,3 mov $1,$0 mul $1,$0 gcd $1,4
.data callbookName: .asciiz "callbook.txt" question: .byte 10 .ascii "Introduce:" .byte 10 .ascii "1 - Load a file, from root, if it does not exist it will use a new callbook: " .byte 10 .ascii "2 - List all entries: " .byte 10 .ascii "3 - Order the entries (still buggy): " .byte 10 .ascii "4 - Add a new contact: " .byte 10 .ascii "5 - Search a contact (by name or phone): " .byte 10 .ascii "6 - Show number of contacts: " .byte 10 .ascii "7 - Save the callbook (in the root): " .byte 10 .asciiz "8 - Exit the program: " modifyNameTxt: .byte 10 .asciiz "Introduce a name: " modifyPhoneTxt: .byte 10 .asciiz "Introduce a number: " modifyDirectionTxt: .byte 10 .asciiz "Introduce a direction: " notIdentifiedTxt: .byte 10 .asciiz "We cannot identify any entry which match the criteria " corectIdentifiedTxt: .byte 10 .asciiz "Press M to modify the field, B to erase it and nothing to return to the menu: " SearchingByTxt: .byte 10 .asciiz "Press to search by name (defect option) and 2 to use name: " AskFieldTxt: .byte 10 .asciiz "Introduce the search data: " ShowNumEntriesTxt: .byte 10 .asciiz "The number of entries is: " ModifyFieldTxt: .byte 10 .asciiz "Press 1 to modify by name and 2 to modify the phone (defect option): " introduceNameTxt: .byte 10 .asciiz "Introduce the name and surname: " introducePhoneTxt: .byte 10 .asciiz "Introduce the phone number: " introduceDirectionTxt: .byte 10 .asciiz "Introduce the direction: " deleteTxt: .byte 10 .asciiz "Press S to confirm delete this entry: " modifyTxt: .byte 10 .asciiz "Press S to modify this entry: " nameTxt: .asciiz "Name: " numberTxt: .asciiz "Phone number: " directionTxt: .byte 10 .asciiz "Direction: " storeConfirmTxt: .byte 10 .asciiz "Press S to confirm saving this entry: " orderByTxt: .byte 10 .asciiz "Select the field to order the callbook; 1 name, 2 phone: " .align 2 StartCallbook: #Each entry in the callbook has the following fields #Name: 20 bytes #Phone: 10 bytes, works like a text #Direction: 30 bytes #Campo_Valido: 4 bytes; If ser to 0 is a invalid entry #total: 64 bytes by entry #EndPhoneBook Store in $s1 .text main: la $s0,StartCallbook #Ask which option do QuestionLoop: la $a0,question li $v0,4 syscall #reads the selected option and stores it in t0 li $v0,5 syscall move $t0,$v0 #1 - Load a callbook from disk li $t1,1 bne $t1,$t0,OptionNum1 jal ReadFromDisk #s0 is updated to the new end of the callbook j QuestionLoop #2 - Lists all entries OptionNum1: li $t1,2 bne $t1,$t0,OptionNum2 jal ListCallbook j QuestionLoop #3 - Orders the callbook, still in BETA OptionNum2: li $t1,3 bne $t1,$t0,OptionNum3 jal CountEntries #This will store the number of entries in the book in $s1 sw $s1,0($s0) #Before calling the subroutine we store the number of entries in memory jal orderCallbook jal ReadFromDisk j QuestionLoop #4 - Add a new entry to the book OptionNum3: li $t1,4 bne $t1,$t0,OptionNum4 jal NewEntry j QuestionLoop #5 - Select an entry to be erased o modified OptionNum4: li $t1,5 bne $t1,$t0,OptionNum5 #Asks for the search field la $a0,SearchingByTxt li $v0,4 syscall #Reads the selected field and stores its identifier in t0 li $v0,5 syscall move $t0,$v0 #Stores in t0 the field displacement respect the start of the entry and in t1 the field length li $t2,3 bne $t0,$t2,DirectionNotChose li $t0,32 li $t1,28 j EndChoseField DirectionNotChose: li $t2,2 bne $t0,$t2,NumberNotChose li $t0,20 li $t1,10 j EndChoseField NumberNotChose: move $t0,$zero li $t1,20 EndChoseField: #Asks the field search value la $a0,AskFieldTxt li $v0,4 syscall #Stores the value in s0, which stores the callbook end move $a0,$s0 li $v0,8 move $a1,$t1 syscall #Pass the arguments to the subroutine move $a0,$t0 #a0 Field displacement move $a1,$t1 #a1 Number of bytes of the field (field length) move $a2,$s0 #a2 Direction of the field to search jal SearchInThePhoneBook j QuestionLoop #6 - Show the number of entries OptionNum5: li $t1,6 bne $t1,$t0,OptionNum6 la $a0,ShowNumEntriesTxt li $v0,4 syscall jal CountEntries #almacena en s1 el numero de entradas move $a0,$s1 li $v0,1 syscall j QuestionLoop #7 - Saves the phone book to a file in disk OptionNum6: li $t1,7 bne $t1,$t0,OptionNum7 jal CountEntries #Returns the number of entries in the book by s1 sw $s1,0($s0) #We save the number of entries to memory jal SaveInDisk j QuestionLoop #8 - Exit the program OptionNum7: li $v0,10 syscall #INTRODUCE A NEW ENTRY NewEntry: move $s1,$ra #Asks to introduce a new name la $a0,introduceNameTxt li $v0,4 syscall #Reads the name and store it in memory move $a0,$s0 addiu $a1,$zero,20 li $v0,8 syscall #Asks to introduce a new phone number la $a0,introducePhoneTxt li $v0,4 syscall #Reads the number and stores it in memory addiu $a0,$s0,20 addiu $a1,$zero,10 li $v0,8 syscall #Asks to introduce a direction la $a0,introduceDirectionTxt li $v0,4 syscall #Reads the direction and stores it in memory addiu $a0,$s0,30 addiu $a1,$zero,30 li $v0,8 syscall #Shows the entry move $a0,$s0 jal ShowEntry #Ask for confirmation to store the entry la $a0,storeConfirmTxt li $v0,4 syscall li $v0,12 syscall #If S validates the last bit and updates the callbook end; if not it does not anything li $t0,'S' beq $v0,$t0,readS li $t0,'s' beq $v0,$t0,readS #Sets the null field to 0 sw $zero,60($s0) #In case contrary exist the subroutine jr $s1 readS: li $t1,0x00000031 sw $t1,60($s0) addiu $s0,$s0,64 jr $s1 #Show entry ShowEntry: #$a0 stores search field move $t0,$a0 la $a0,nameTxt li $v0,4 syscall move $a0,$t0 li $v0,4 syscall la $a0,numberTxt li $v0,4 syscall addiu $a0,$t0,20 li $v0,4 syscall la $a0,directionTxt li $v0,4 syscall addiu $a0,$t0,30 li $v0,4 syscall jr $ra #DELETE AN ENTRY deleteEntry: #$a0 stores the direction of the entry to be deleted move $s1,$a0 move $s2,$ra jal ShowEntry la $a0,deleteTxt li $v0,4 syscall li $v0,12 syscall #If S will delete the entry, if not id will do nothing li $t0,'S' beq $v0,$t0,readN li $t0,'s' beq $v0,$t0,readN #Exit the subroutine without deleting the text jr $s2 readN: sw $zero,60($s1) jr $s2 #COUNTS THE NUMEBER OF ENTRIES CountEntries: #Use s1 to return the number of entries la $t0,StartCallbook #t0 stores the actual check entry, initialised at the start of the phone book move $s1,$zero CountBucle: lw $t2,60($t0) beq $t2,$zero,NotSum addiu $s1,$s1,1 NotSum: addiu $t0,$t0,64 blt $t0,$s0,CountBucle #s0 stores the end of the phone book jr $ra #STORES THE PHONE BOOK TO TEXT SaveInDisk: #s0 will stores the memory position where the call book ends la $s1,StartCallbook move $s2,$s0 la $s3,0($s0) # Open a field li $v0,13 la $a0,callbookName # Name li $a1,1 # Acces (ignored) li $a2,0 # Mode(ignored) syscall move $t4,$v0 # Saves the descriptor #Store the number of entries li $v0,15 # Writes in the field move $a0,$t4 # Descriptor move $a1,$s3 # Field direction to write li $a2,4 # Tama�o en bytes del dato escrito syscall #Writes entry by entry (only the valid ones) StoreLoop: #Checks if it is a valid entry lw $t5,60($s1) beq $t5,$zero,noalmacenar li $v0,15 # Write in the file move $a0,$t4 # Descriptor move $a1,$s1 # Field to write direction li $a2,64 # Number of bytes of the written field syscall noalmacenar: addiu $s1,$s1,64 blt $s1,$s2,StoreLoop #Closes the file li $v0,16 move $a0,$t4 syscall #Ends the subroutine jr $ra #READS THE AGENDA FROM DISK ReadFromDisk: #s0 stores the end of the phone book la $t0,StartCallbook #Open the file from disk li $v0,13 # Open the field la $a0,callbookName # Name li $a1,0 # Access: read li $a2,0 # Mode: ignored syscall move $t4,$v0 # Saves the descriptor #Read the number of entries li $v0,14 # Read from file move $a0,$t4 # Descriptor move $a1,$t0 # Pointer to an entry li $a2,4 # Number of bytes to read syscall #Claculates the number of bytes to read lw $t2,0($t0) #Multiply by 64, the number of bytes of an entry sll $t2,$t2,6 #Reads all the entries form the file li $v0,14 # Read from file move $a0,$t4 # Descriptor move $a1,$t0 # Pointer to an entry move $a2,$t2 # Size in bytes of the read data #Closes the file li $v0,16 move $a0,$t4 syscall #Return the end of the callbook in $s0 addu $s0,$t0,$t2 #Finish the subroutine jr $ra #SEARCH BY SOME FIELD (only shows the first match) SearchInThePhoneBook: #a0 Stores the field displacements #a1 Stores the number of bytes (length) of the field #a2 Stores the direction of the field value to search move $s1,$ra la $s6,StartCallbook move $s5,$a0 # Entry direction in the phone book move $s3,$a1 # Number of bytes move $s4,$a2 # Search field value direction LoopIdFieldId1: bge $s6,$s0,EndFieldWithoutResult lw $t3,60($s6) bne $t3,$zero,LoopIdFieldIdCorrect addiu $s6,$s6,64 j LoopIdFieldId1 LoopIdFieldIdCorrect: addu $s2,$s5,$s6 move $t3,$s3 move $t5,$s2 move $t6,$s4 LoopIdFieldId2: lw $t0,0($t5) lw $t1,0($t6) bgt $t3,4,ContinueInLoop2 beq $t3,$zero,LoopIdFieldId3 li $t4,-8 mul $t5,$t3,$t4 addiu $t5,$t5,32 sllv $t0,$t0,$t5 sllv $t1,$t1,$t5 li $t4,-1 mul $t3,$t3,$t4 addu $t3,$s3,$t3 sub $s2,$s2,$t3 sub $s4,$s4,$t3 LoopIdFieldId3: beq $t0,$t1,EndFieldWithResult addiu $s6,$s6,64 j LoopIdFieldId1 ContinueInLoop2: addiu $t3,$t3,-4 addiu $t5,$t5,4 addiu $t6,$t6,4 beq $t0,$t1,LoopIdFieldId2 addiu $s6,$s6,64 j LoopIdFieldId1 EndFieldWithoutResult: la $a0,notIdentifiedTxt li $v0,4 syscall li $v0,12 syscall #Exit in negative case jr $s1 EndFieldWithResult: #If answers B deletes the enry, if M it modifies it move $a0,$s6 jal ShowEntry la $a0,corectIdentifiedTxt li $v0,4 syscall li $v0,12 syscall move $t1,$v0 li $t0,'m' beq $t1,$t0,lecturaIdM li $t0,'M' beq $t1,$t0,lecturaIdM li $t0,'b' beq $t1,$t0,lecturaIdB li $t0,'B' beq $t1,$t0,lecturaIdB jr $s1 lecturaIdB: move $a0,$s6 move $s4,$s1 #Restores the return register jal deleteEntry jr $s4 lecturaIdM: move $a0,$s6 jal ModifyField jr $s1 #MODIFY SOME FIELD OF THE ENTRY ModifyField: #a0 stores the direction of the entry to be modified move $s2,$a0 move $s3,$ra la $a0,ModifyFieldTxt li $v0,4 syscall li $v0,5 syscall move $t1,$v0 li $t0,3 blt $t1,$t0,NoModifyDirectionTxt la $a0,modifyDirectionTxt li $v0,4 syscall addiu $a0,$s2,32 li $a1,28 j EndModify NoModifyDirectionTxt: li $t0,2 blt $t1,$t0,NoModifyPhoneTxt la $a0,modifyPhoneTxt li $v0,4 syscall addiu $a0,$s2,20 li $a1,10 j EndModify NoModifyPhoneTxt: la $a0,modifyNameTxt li $v0,4 syscall move $a0,$s2 li $a1,20 EndModify: li $v0,8 syscall move $a0,$s2 jal ShowEntry #Confirmation to modify the entry la $a0,storeConfirmTxt li $v0,4 syscall li $v0,12 syscall #If answer S validates the entry and updates the end of the callbook li $t0,'S' beq $v0,$t0,readS2 li $t0,'s' beq $v0,$t0,readS2 #Puts the validate field to null sw $zero,60($s2) #In negative case, exits the subroutine jr $s3 readS2: li $t1,0x00000031 sw $t1,60($s2) addiu $s0,$s0,64 jr $s3 #ORDER THE PHONE BOOK (BETA) #Some times bytes are read in reverse order orderCallbook: #The end of the phone book is store in s0 move $s1,$ra #Open the file li $v0,13 la $a0,callbookName # Name li $a1,1 # Access: write li $a2,0 # Mode: ignore syscall move $s5,$v0 # Saves the descriptor #Stores the number of entries li $v0,15 # Write in file move $a0,$s5 # Descriptor la $a1,0($s0) # Direction of the field to write li $a2,4 # Number of bytes of the stored data syscall #Asks how to order la $a0,orderByTxt li $v0,4 syscall li $v0,5 syscall move $t1,$v0 li $t0,3 blt $t1,$t0,NoOrdDir li $s2,28 #s2 stores the displacement j FinOrd NoOrdDir: li $t0,2 blt $t1,$t0,NoOrdNum li $s2,20 j FinOrd NoOrdNum: li $s2,0 FinOrd: #Stores the first valid entry buscarVal: la $s4,StartCallbook #S4 stores the position of the actual book NoVal: lw $t0,60($s4) bge $s4,$s0,EndComparation addiu $s4,$s4,64 beq $t0,$zero,NoVal addiu $s3,$s4,-64 #S3 stores the entry that we are comparing #Checks if the new entry is valid NoVal2: lw $t0,60($s4) bne $t0,$zero,EnVal addiu $s4,$s4,64 bgt $s4,$s0,WriteEntry j NoVal2 addiu $s4,$s4,-64 EnVal: #Checks the addu $t0,$s2,$s4 addu $t1,$s2,$s3 SearchDifferent: lw $t2,0($t0) lw $t3,0($t1) bne $t2,$t3,Compare addiu $t0,$t0,4 addiu $t1,$t1,4 beq $t0,$t1,NoVal j SearchDifferent Compare: blt $t2,$t3,NewS3 #s4>s3 new s3=s4 move $s3,$s4 addiu $s4,$s3,64 j NoVal2 #s4<s3 new s4=s4+64 NewS3: addiu $s4,$s4,64 j NoVal2 WriteEntry: #Write entry by entry move $a0,$s3 jal ShowEntry li $v0,15 # Escribir en fichero move $a0,$s5 # Descriptor move $a1,$s3 # Direccion del dato a escribir li $a2,64 # Tama�o en bytes del dato escrito syscall #Erase the entry sw $zero,60($s3) j buscarVal EndComparation: move $a0,$s3 jal ShowEntry #Checks if an entry is valid li $v0,15 # Write the file move $a0,$s5 # Descriptor move $a1,$s3 # Direction to write li $a2,64 # Number of byte of the written data #Closes the file li $v0,16 move $a0,$s5 syscall jr $s1 #LISTS THE PHONE BOOK ListCallbook: move $s2,$ra la $s1,StartCallbook ListLoop: lw $t0,60($s1) beq $t0,$zero,NotList #2 blank lines between entries li $a0,10 li $v0,11 syscall li $a0,10 li $v0,11 syscall move $a0,$s1 jal ShowEntry NotList: addiu $s1,$s1,64 ble $s1,$s0,ListLoop jr $s2
; A292061: a(n) = (n-3)*(n-2)^2*(n-1)^2*n/24. ; 0,0,0,6,60,300,1050,2940,7056,15120,29700,54450,94380,156156,248430,382200,571200,832320,1186056,1656990,2274300,3072300,4091010,5376756,6982800,8970000,11407500,14373450,17955756,22252860,27374550,33442800,40592640,48973056,58747920 bin $0,2 mov $1,$0 bin $1,2 mul $0,$1 div $0,9 mul $0,6
;;;;;;;;;;;;;;;; ; test subtraction ;;;;;;;;;;;;;;;; ; required for execution on the NES .org $8000 SEC ; set carry flag LDA #$20 ; init acc SBC #$10 ; subtract 0x10 NOP ; perform assertions: ; a = 0x10 ; c = 1 ; n = 0 ; v = 0 ; z = 0 CLC ; clear carry flag LDA #$20 ; init acc SBC #$10 ; subtract 0x10 NOP ; perform assertions: ; a = 0x0F ; c = 1 ; n = 0 ; v = 0 ; z = 0 SEC ; set carry flag LDA #$20 ; init acc SBC #$20 ; subtract 0x20 NOP ; perform assertions: ; a = 0 ; c = 1 ; n = 0 ; v = 0 ; z = 1 SEC ; set carry flag LDA #$20 ; init acc SBC #$30 ; subtract 0x30 NOP ; perform assertions: ; a = 0xF0 ; c = 0 ; n = 1 ; v = 0 ; z = 0 SEC ; set carry flag LDA #$20 ; init acc SBC #$80 ; subtract 0x80 NOP ; perform assertions ; a = 0xA0 ; c = 0 ; n = 1 ; v = 1 ; z = 0 SEC ; set carry flag LDA #$80 ; init acc SBC #$20 ; subtract 0x20 NOP ; perform assertions ; a = 0x60 ; c = 1 ; n = 0 ; v = 1 ; z = 0
; A111234: a(1)=2; thereafter a(n) = (largest proper divisor of n) + (smallest prime divisor of n). ; 2,3,4,4,6,5,8,6,6,7,12,8,14,9,8,10,18,11,20,12,10,13,24,14,10,15,12,16,30,17,32,18,14,19,12,20,38,21,16,22,42,23,44,24,18,25,48,26,14,27,20,28,54,29,16,30,22,31,60,32,62,33,24,34,18,35,68,36,26,37,72,38,74,39,28,40,18,41,80,42,30,43,84,44,22,45,32,46,90,47,20,48,34,49,24,50,98,51,36,52 mov $1,$0 seq $1,20639 ; Lpf(n): least prime dividing n (when n > 1); a(1) = 1. Or, smallest prime factor of n, or smallest prime divisor of n. div $0,$1 add $0,$1 add $0,1