2022-06-04 20:00:48 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* kim1.h */
|
|
|
|
/* */
|
2022-06-06 22:14:01 +00:00
|
|
|
/* KIM-1 system-specific definitions */
|
2022-06-04 20:00:48 +00:00
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* (C) 2022 Dave Plummer */
|
|
|
|
/* Email: davepl@davepl.com */
|
|
|
|
/* */
|
|
|
|
/* This software is provided 'as-is', without any expressed 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. */
|
|
|
|
/* */
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _KIM1_H
|
|
|
|
#define _KIM1_H
|
|
|
|
|
|
|
|
/* Check for errors */
|
|
|
|
#if !defined(__KIM1__)
|
2022-06-06 22:14:01 +00:00
|
|
|
# error This module may only be used when compiling for the KIM-1!
|
2022-06-04 20:00:48 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/* Data */
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/* Hardware */
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/* Code */
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
/* Read from tape */
|
|
|
|
int __fastcall__ loadt (unsigned char);
|
|
|
|
|
|
|
|
/* Write to tape */
|
|
|
|
int __fastcall__ dumpt (unsigned char, const void*, const void*);
|
|
|
|
|
2023-03-29 22:40:10 +00:00
|
|
|
|
|
|
|
/* Write to 7-segment LED display. Due to hardware limitations it only
|
|
|
|
** displays briefly, so must be called repeatedly to update the
|
|
|
|
** display.
|
|
|
|
**/
|
|
|
|
void __fastcall__ scandisplay(unsigned char left, unsigned char middle, unsigned char right);
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Get a keypress from the keypad. Returns $00-$0F(0-F), $10(AD), $11(DA), $12(+),
|
|
|
|
** $13(GO), $14(PC) or $15 for no keypress.
|
|
|
|
**/
|
|
|
|
int __fastcall__ getkey();
|
|
|
|
|
2023-04-03 22:40:33 +00:00
|
|
|
/* End of kim1.h */
|
2022-06-04 20:00:48 +00:00
|
|
|
#endif
|