2017-06-04 20:38:34 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
#include <cstdint>
|
2017-08-06 16:06:48 +00:00
|
|
|
#include <cassert>
|
2017-11-03 22:05:01 +00:00
|
|
|
#include <stdexcept>
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2017-11-05 14:48:15 +00:00
|
|
|
#include <Bus.h>
|
|
|
|
#include <InputOutput.h>
|
2017-11-03 22:05:01 +00:00
|
|
|
#include <IntelProcessor.h>
|
|
|
|
#include <Signal.h>
|
|
|
|
#include <Register.h>
|
2017-11-20 19:17:49 +00:00
|
|
|
#include <EightBitCompilerDefinitions.h>
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
namespace EightBit {
|
2017-12-10 21:41:48 +00:00
|
|
|
class Z80 final : public IntelProcessor {
|
2017-06-05 21:39:15 +00:00
|
|
|
public:
|
2017-06-26 22:22:32 +00:00
|
|
|
struct refresh_t {
|
|
|
|
|
|
|
|
bool high : 1;
|
|
|
|
uint8_t variable : 7;
|
|
|
|
|
2018-04-14 08:39:06 +00:00
|
|
|
refresh_t(const uint8_t value)
|
2018-08-17 12:59:59 +00:00
|
|
|
: high(!!(value & Bit7)),
|
2017-06-27 13:02:29 +00:00
|
|
|
variable(value & Mask7)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
operator uint8_t() const {
|
2017-06-26 22:22:32 +00:00
|
|
|
return (high << 7) | variable;
|
|
|
|
}
|
|
|
|
|
2018-10-27 17:41:55 +00:00
|
|
|
auto& operator++() {
|
2017-06-27 13:02:29 +00:00
|
|
|
++variable;
|
|
|
|
return *this;
|
2017-06-26 22:22:32 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
enum StatusBits {
|
|
|
|
SF = Bit7,
|
|
|
|
ZF = Bit6,
|
|
|
|
YF = Bit5,
|
|
|
|
HC = Bit4,
|
|
|
|
XF = Bit3,
|
|
|
|
PF = Bit2,
|
|
|
|
VF = Bit2,
|
|
|
|
NF = Bit1,
|
|
|
|
CF = Bit0,
|
|
|
|
};
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-09-07 00:04:09 +00:00
|
|
|
Z80(Bus& bus, InputOutput& ports);
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
Signal<Z80> ExecutingInstruction;
|
2018-08-25 00:34:30 +00:00
|
|
|
Signal<Z80> ExecutedInstruction;
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] auto& NMI() { return m_nmiLine; } // In
|
|
|
|
[[nodiscard]] auto& M1() { return m_m1Line; } // Out
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-11-27 22:36:54 +00:00
|
|
|
int execute(uint8_t opcode) final;
|
|
|
|
int step() final;
|
|
|
|
void powerOn() final;
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] register16_t& AF() final;
|
|
|
|
[[nodiscard]] register16_t& BC() final;
|
|
|
|
[[nodiscard]] register16_t& DE() final;
|
|
|
|
[[nodiscard]] register16_t& HL() final;
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] auto& IX() { return m_ix; }
|
|
|
|
[[nodiscard]] auto& IXH() { return IX().high; }
|
|
|
|
[[nodiscard]] auto& IXL() { return IX().low; }
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] auto& IY() { return m_iy; }
|
|
|
|
[[nodiscard]] auto& IYH() { return IY().high; }
|
|
|
|
[[nodiscard]] auto& IYL() { return IY().low; }
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] auto& REFRESH() { return m_refresh; }
|
|
|
|
[[nodiscard]] auto& IV() { return iv; }
|
|
|
|
[[nodiscard]] auto& IM() { return m_interruptMode; }
|
|
|
|
[[nodiscard]] auto& IFF1() { return m_iff1; }
|
|
|
|
[[nodiscard]] auto& IFF2() { return m_iff2; }
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
void exx() {
|
|
|
|
m_registerSet ^= 1;
|
|
|
|
}
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
void exxAF() {
|
|
|
|
m_accumulatorFlagsSet = !m_accumulatorFlagsSet;
|
|
|
|
}
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-12-10 21:41:48 +00:00
|
|
|
protected:
|
2018-11-27 22:36:54 +00:00
|
|
|
void handleRESET() final;
|
|
|
|
void handleINT() final;
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-08-30 22:17:34 +00:00
|
|
|
private:
|
2018-08-25 11:09:26 +00:00
|
|
|
PinLevel m_nmiLine = Low;
|
2017-12-10 21:41:48 +00:00
|
|
|
PinLevel m_m1Line = Low;
|
2017-12-03 00:57:47 +00:00
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
InputOutput& m_ports;
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
enum { BC_IDX, DE_IDX, HL_IDX };
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
std::array<std::array<register16_t, 3>, 2> m_registers;
|
2017-11-10 22:41:50 +00:00
|
|
|
int m_registerSet = 0;
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
std::array<register16_t, 2> m_accumulatorFlags;
|
2017-11-10 22:41:50 +00:00
|
|
|
int m_accumulatorFlagsSet = 0;
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-06-15 23:55:32 +00:00
|
|
|
register16_t m_ix = 0xffff;
|
|
|
|
register16_t m_iy = 0xffff;
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-11-10 22:41:50 +00:00
|
|
|
refresh_t m_refresh = 0x7f;
|
2017-06-26 22:22:32 +00:00
|
|
|
|
2017-11-10 22:41:50 +00:00
|
|
|
uint8_t iv = 0xff;
|
|
|
|
int m_interruptMode = 0;
|
|
|
|
bool m_iff1 = false;
|
|
|
|
bool m_iff2 = false;
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-11-10 22:41:50 +00:00
|
|
|
bool m_prefixCB = false;
|
|
|
|
bool m_prefixDD = false;
|
|
|
|
bool m_prefixED = false;
|
|
|
|
bool m_prefixFD = false;
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-11-10 22:41:50 +00:00
|
|
|
int8_t m_displacement = 0;
|
|
|
|
bool m_displaced = false;
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-08-25 11:09:26 +00:00
|
|
|
void handleNMI();
|
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] uint16_t displacedAddress() {
|
2017-08-06 16:06:48 +00:00
|
|
|
assert(m_displaced);
|
|
|
|
return MEMPTR().word = (m_prefixDD ? IX() : IY()).word + m_displacement;
|
2017-06-05 21:39:15 +00:00
|
|
|
}
|
|
|
|
|
2017-08-06 16:06:48 +00:00
|
|
|
void fetchDisplacement() {
|
|
|
|
m_displacement = fetchByte();
|
|
|
|
}
|
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] auto& HL2() {
|
2018-10-27 17:41:55 +00:00
|
|
|
if (LIKELY(!m_displaced))
|
|
|
|
return HL();
|
|
|
|
if (m_prefixDD)
|
|
|
|
return IX();
|
|
|
|
// Must be FD prefix
|
|
|
|
return IY();
|
|
|
|
}
|
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] auto& RP(const int rp) {
|
2018-10-27 17:41:55 +00:00
|
|
|
ASSUME(rp >= 0);
|
|
|
|
ASSUME(rp <= 3);
|
|
|
|
switch (rp) {
|
|
|
|
case 0:
|
|
|
|
return BC();
|
|
|
|
case 1:
|
|
|
|
return DE();
|
|
|
|
case 2:
|
|
|
|
return HL2();
|
|
|
|
case 3:
|
|
|
|
return SP();
|
|
|
|
default:
|
|
|
|
UNREACHABLE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] auto& RP2(const int rp) {
|
2018-10-27 17:41:55 +00:00
|
|
|
ASSUME(rp >= 0);
|
|
|
|
ASSUME(rp <= 3);
|
|
|
|
switch (rp) {
|
|
|
|
case 0:
|
|
|
|
return BC();
|
|
|
|
case 1:
|
|
|
|
return DE();
|
|
|
|
case 2:
|
|
|
|
return HL2();
|
|
|
|
case 3:
|
|
|
|
return AF();
|
|
|
|
default:
|
|
|
|
UNREACHABLE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] auto R(const int r) {
|
2018-03-10 01:53:57 +00:00
|
|
|
ASSUME(r >= 0);
|
|
|
|
ASSUME(r <= 7);
|
2017-06-05 21:39:15 +00:00
|
|
|
switch (r) {
|
|
|
|
case 0:
|
|
|
|
return B();
|
|
|
|
case 1:
|
|
|
|
return C();
|
|
|
|
case 2:
|
|
|
|
return D();
|
|
|
|
case 3:
|
|
|
|
return E();
|
|
|
|
case 4:
|
2017-06-15 21:21:26 +00:00
|
|
|
return HL2().high;
|
2017-06-05 21:39:15 +00:00
|
|
|
case 5:
|
2017-06-15 21:21:26 +00:00
|
|
|
return HL2().low;
|
2017-06-05 21:39:15 +00:00
|
|
|
case 6:
|
2018-04-14 08:39:06 +00:00
|
|
|
return BUS().read(UNLIKELY(m_displaced) ? displacedAddress() : HL().word);
|
2017-06-05 21:39:15 +00:00
|
|
|
case 7:
|
2018-06-10 23:50:46 +00:00
|
|
|
return A();
|
2017-06-28 14:39:31 +00:00
|
|
|
default:
|
2017-10-29 18:47:23 +00:00
|
|
|
UNREACHABLE;
|
2017-06-05 21:39:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void R(const int r, const uint8_t value) {
|
2018-03-10 01:53:57 +00:00
|
|
|
ASSUME(r >= 0);
|
|
|
|
ASSUME(r <= 7);
|
2017-08-06 16:06:48 +00:00
|
|
|
switch (r) {
|
|
|
|
case 0:
|
|
|
|
B() = value;
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
C() = value;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
D() = value;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
E() = value;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
HL2().high = value;
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
HL2().low = value;
|
|
|
|
break;
|
|
|
|
case 6:
|
2018-04-14 08:39:06 +00:00
|
|
|
BUS().write(UNLIKELY(m_displaced) ? displacedAddress() : HL().word, value);
|
2017-08-06 16:06:48 +00:00
|
|
|
break;
|
|
|
|
case 7:
|
2018-06-10 23:50:46 +00:00
|
|
|
A() = value;
|
2017-08-06 16:06:48 +00:00
|
|
|
break;
|
|
|
|
default:
|
2017-10-29 18:47:23 +00:00
|
|
|
UNREACHABLE;
|
2017-08-06 16:06:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] auto R2(const int r) {
|
2018-03-10 01:53:57 +00:00
|
|
|
ASSUME(r >= 0);
|
|
|
|
ASSUME(r <= 7);
|
2017-06-05 21:39:15 +00:00
|
|
|
switch (r) {
|
|
|
|
case 0:
|
|
|
|
return B();
|
|
|
|
case 1:
|
|
|
|
return C();
|
|
|
|
case 2:
|
|
|
|
return D();
|
|
|
|
case 3:
|
|
|
|
return E();
|
|
|
|
case 4:
|
|
|
|
return H();
|
|
|
|
case 5:
|
|
|
|
return L();
|
|
|
|
case 6:
|
2018-03-10 01:53:57 +00:00
|
|
|
return BUS().read(HL());
|
2017-06-05 21:39:15 +00:00
|
|
|
case 7:
|
2018-06-10 23:50:46 +00:00
|
|
|
return A();
|
2017-06-28 14:39:31 +00:00
|
|
|
default:
|
2017-10-29 18:47:23 +00:00
|
|
|
UNREACHABLE;
|
2017-06-05 21:39:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void R2(const int r, const uint8_t value) {
|
2018-03-10 01:53:57 +00:00
|
|
|
ASSUME(r >= 0);
|
|
|
|
ASSUME(r <= 7);
|
2017-08-06 16:06:48 +00:00
|
|
|
switch (r) {
|
|
|
|
case 0:
|
|
|
|
B() = value;
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
C() = value;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
D() = value;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
E() = value;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
H() = value;
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
L() = value;
|
|
|
|
break;
|
|
|
|
case 6:
|
2018-03-10 01:53:57 +00:00
|
|
|
BUS().write(HL(), value);
|
2017-08-06 16:06:48 +00:00
|
|
|
break;
|
|
|
|
case 7:
|
2018-06-10 23:50:46 +00:00
|
|
|
A() = value;
|
2017-08-06 16:06:48 +00:00
|
|
|
break;
|
|
|
|
default:
|
2017-10-29 18:47:23 +00:00
|
|
|
UNREACHABLE;
|
2017-08-06 16:06:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-14 08:39:06 +00:00
|
|
|
static void adjustHalfCarryAdd(uint8_t& f, const uint8_t before, const uint8_t value, const int calculation) {
|
2017-06-18 17:14:39 +00:00
|
|
|
setFlag(f, HC, calculateHalfCarryAdd(before, value, calculation));
|
2017-06-05 21:39:15 +00:00
|
|
|
}
|
|
|
|
|
2018-04-14 08:39:06 +00:00
|
|
|
static void adjustHalfCarrySub(uint8_t& f, const uint8_t before, const uint8_t value, const int calculation) {
|
2017-06-18 17:14:39 +00:00
|
|
|
setFlag(f, HC, calculateHalfCarrySub(before, value, calculation));
|
2017-06-05 21:39:15 +00:00
|
|
|
}
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-04-14 08:39:06 +00:00
|
|
|
static void adjustOverflowAdd(uint8_t& f, const uint8_t before, const uint8_t value, const uint8_t calculation) {
|
2017-06-18 17:14:39 +00:00
|
|
|
adjustOverflowAdd(f, before & SF, value & SF, calculation & SF);
|
2017-06-05 21:39:15 +00:00
|
|
|
}
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-04-14 08:39:06 +00:00
|
|
|
static void adjustOverflowAdd(uint8_t& f, const int beforeNegative, const int valueNegative, const int afterNegative) {
|
2018-11-27 22:36:54 +00:00
|
|
|
const auto overflow = (beforeNegative == valueNegative) && (beforeNegative != afterNegative);
|
2017-06-18 17:14:39 +00:00
|
|
|
setFlag(f, VF, overflow);
|
2017-06-05 21:39:15 +00:00
|
|
|
}
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-04-14 08:39:06 +00:00
|
|
|
static void adjustOverflowSub(uint8_t& f, const uint8_t before, const uint8_t value, const uint8_t calculation) {
|
2017-06-18 17:14:39 +00:00
|
|
|
adjustOverflowSub(f, before & SF, value & SF, calculation & SF);
|
2017-06-05 21:39:15 +00:00
|
|
|
}
|
|
|
|
|
2018-04-14 08:39:06 +00:00
|
|
|
static void adjustOverflowSub(uint8_t& f, const int beforeNegative, const int valueNegative, const int afterNegative) {
|
2018-11-27 22:36:54 +00:00
|
|
|
const auto overflow = (beforeNegative != valueNegative) && (beforeNegative != afterNegative);
|
2017-06-18 17:14:39 +00:00
|
|
|
setFlag(f, VF, overflow);
|
2017-06-05 21:39:15 +00:00
|
|
|
}
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
uint8_t subtract(uint8_t operand, uint8_t value, int carry = 0);
|
2017-06-26 22:22:32 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void executeCB(int x, int y, int z);
|
|
|
|
void executeED(int x, int y, int z, int p, int q);
|
|
|
|
void executeOther(int x, int y, int z, int p, int q);
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] uint8_t increment(uint8_t operand);
|
|
|
|
[[nodiscard]] uint8_t decrement(uint8_t operand);
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2017-08-30 22:17:34 +00:00
|
|
|
void di();
|
|
|
|
void ei();
|
|
|
|
|
2017-06-05 21:39:15 +00:00
|
|
|
void retn();
|
|
|
|
void reti();
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
bool jrConditionalFlag(int flag);
|
|
|
|
bool returnConditionalFlag(int flag);
|
|
|
|
bool jumpConditionalFlag(int flag);
|
|
|
|
bool callConditionalFlag(int flag);
|
|
|
|
|
2018-06-11 22:01:48 +00:00
|
|
|
void sbc(register16_t value);
|
|
|
|
void adc(register16_t value);
|
|
|
|
void add(register16_t value);
|
2018-06-10 23:50:46 +00:00
|
|
|
|
|
|
|
void add(uint8_t value, int carry = 0);
|
|
|
|
void adc(uint8_t value);
|
|
|
|
void sub(uint8_t value, int carry = 0);
|
|
|
|
void sbc(uint8_t value);
|
|
|
|
void andr(uint8_t value);
|
|
|
|
void xorr(uint8_t value);
|
|
|
|
void orr(uint8_t value);
|
|
|
|
void compare(uint8_t value);
|
|
|
|
|
2018-11-29 00:09:40 +00:00
|
|
|
[[nodiscard]] uint8_t rlc(uint8_t operand);
|
|
|
|
[[nodiscard]] uint8_t rrc(uint8_t operand);
|
|
|
|
[[nodiscard]] uint8_t rl(uint8_t operand);
|
|
|
|
[[nodiscard]] uint8_t rr(uint8_t operand);
|
|
|
|
[[nodiscard]] uint8_t sla(uint8_t operand);
|
|
|
|
[[nodiscard]] uint8_t sra(uint8_t operand);
|
|
|
|
[[nodiscard]] uint8_t sll(uint8_t operand);
|
|
|
|
[[nodiscard]] uint8_t srl(uint8_t operand);
|
|
|
|
|
|
|
|
[[nodiscard]] uint8_t bit(int n, uint8_t operand);
|
|
|
|
[[nodiscard]] static uint8_t res(int n, uint8_t operand);
|
|
|
|
[[nodiscard]] static uint8_t set(int n, uint8_t operand);
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void daa();
|
2017-06-04 20:38:34 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void scf();
|
|
|
|
void ccf();
|
|
|
|
void cpl();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-15 23:55:32 +00:00
|
|
|
void xhtl();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-08-11 20:19:19 +00:00
|
|
|
void blockCompare(register16_t source, register16_t& counter);
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void cpi();
|
|
|
|
bool cpir();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void cpd();
|
|
|
|
bool cpdr();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-08-11 20:19:19 +00:00
|
|
|
void blockLoad(register16_t source, register16_t destination, register16_t& counter);
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void ldi();
|
|
|
|
bool ldir();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void ldd();
|
|
|
|
bool lddr();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-08-12 15:25:30 +00:00
|
|
|
void blockIn(register16_t& source, register16_t destination);
|
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void ini();
|
|
|
|
bool inir();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void ind();
|
|
|
|
bool indr();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-10-27 17:41:55 +00:00
|
|
|
void blockOut(register16_t source, register16_t& destination);
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void outi();
|
|
|
|
bool otir();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void outd();
|
|
|
|
bool otdr();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void neg();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void rrd();
|
|
|
|
void rld();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
void writePort(uint8_t port);
|
2017-06-28 14:39:31 +00:00
|
|
|
void writePort();
|
2017-06-05 21:39:15 +00:00
|
|
|
|
2018-06-10 23:50:46 +00:00
|
|
|
uint8_t readPort(uint8_t port);
|
|
|
|
uint8_t readPort();
|
2017-06-05 21:39:15 +00:00
|
|
|
};
|
|
|
|
}
|