//  Copyright (c) 2017-2026 Jakub Filipowicz <jakubf@gmail.com>
//
//  This program 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 2 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc.,
//  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

#ifndef CP_H
#define CP_H

#include <stdint.h>
#include <stdbool.h>

uint16_t cp_bus_w();
void cp_kb_set(uint16_t val);
uint16_t cp_kb_get();
// TODO: step
// TODO: mode + LED
int cp_stopn(bool state); // TODO: flip-flop
// TODO: stop LED
void cp_cycle();
void cp_load();
void cp_store();
void cp_fetch();
void cp_start(bool state);
bool cp_start_get();
void cp_bin();
void cp_clear();
void cp_clock_set(int state);
int cp_clock_get();
bool cp_q_get();
bool cp_p_get();
int cp_mc_get();
bool cp_irq_get();
void cp_oprq();
void cp_lock_set(bool state);
bool cp_lock_get();
void cp_reg_select(int id);
int cp_reg_select_get();
bool cp_run_get();
bool cp_wait_get();
bool cp_alarm_get();
// off?
// TODO: ON LED?

#endif

// vim: tabstop=4 shiftwidth=4 autoindent
