mirror of
https://codeberg.org/hkzlab/TK2000_floppicator.git
synced 2025-12-30 03:22:35 +11:00
Add empty floppicator project
This commit is contained in:
parent
667ffdd197
commit
be70ff936e
29 changed files with 2153 additions and 0 deletions
85
src/monitor_subroutines.h
Normal file
85
src/monitor_subroutines.h
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
#ifndef _MONITOR_SUBROUTINES_HEADER_
|
||||
#define _MONITOR_SUBROUTINES_HEADER_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
uint8_t key;
|
||||
uint8_t ch;
|
||||
} rdkey_res;
|
||||
|
||||
inline void sbrt_crout(void);
|
||||
inline void sbrt_crout1(void);
|
||||
void sbrt_prntax(uint8_t a, uint8_t x);
|
||||
inline void sbrt_prblnk(void);
|
||||
void sbrt_prbl2(uint8_t count);
|
||||
inline void sbrt_bell(void);
|
||||
inline rdkey_res sbrt_rdkey(void);
|
||||
|
||||
/*** ***/
|
||||
|
||||
#define COUT(a) (((void (*)(char))(0xFDED))(a))
|
||||
#define COUT1(a) (((void (*)(char))(0xFDF0))(a))
|
||||
#define COUTZ(a) (((void (*)(char))(0xFDF6))(a))
|
||||
#define PRBYTE(a) (((void (*)(uint8_t))(0xFDDA))(a))
|
||||
#define PRHEX(a) (((void (*)(uint8_t))(0xFDE3))(a))
|
||||
#define WAIT(a) (((void (*)(uint8_t))(0xFCA8))(a))
|
||||
#define BELL1() (((void (*)(uint8_t))(0xFBD9))(0x87))
|
||||
#define SETINV() (((void (*)(void))(0xFE80))())
|
||||
#define SETNORM() (((void (*)(void))(0xFE84))())
|
||||
|
||||
inline void sbrt_crout(void) {
|
||||
__asm volatile(
|
||||
" jsr 0xFD8E\n"
|
||||
:
|
||||
:
|
||||
:
|
||||
);
|
||||
}
|
||||
|
||||
inline void sbrt_crout1(void) {
|
||||
__asm volatile(
|
||||
" jsr 0xFD8B\n"
|
||||
:
|
||||
:
|
||||
:
|
||||
);
|
||||
}
|
||||
|
||||
inline void sbrt_prblnk(void) {
|
||||
__asm volatile(
|
||||
" jsr 0xF948\n"
|
||||
:
|
||||
:
|
||||
: "a", "x"
|
||||
);
|
||||
}
|
||||
|
||||
inline void sbrt_bell(void) {
|
||||
__asm volatile(
|
||||
" jsr 0xFF3A\n"
|
||||
:
|
||||
:
|
||||
: "a"
|
||||
);
|
||||
}
|
||||
|
||||
inline rdkey_res sbrt_rdkey(void) {
|
||||
rdkey_res res;
|
||||
uint8_t key;
|
||||
uint8_t ch;
|
||||
|
||||
__asm volatile(
|
||||
" jsr 0xFD0C\n"
|
||||
: "=Ka"(key), "=Ky"(ch)
|
||||
:
|
||||
: "a", "y"
|
||||
);
|
||||
|
||||
res.key = key;
|
||||
res.ch = ch;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif /* _MONITOR_SUBROUTINES_HEADER_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue