📄 cpu.h
字号:
/*************************************************************************
Copyright (c) 1999 Mentor Graphics Corporation.
IMPORTANT - USE OF THIS SOFTWARE IS SUBJECT TO LICENSE RESTRICTIONS
CAREFULLY READ THE LICENSE AGREEMENT BEFORE USING THE SOFTWARE
*************************************************************************/
/* CPU library header file */
#ifndef CPU_H
#define CPU_H
#ifdef __cplusplus
extern "C" {
#endif
#include <ansiprot.h>
typedef int cpu_interrupt_t;
typedef int cpu_context_t;
/* interrupt enable/disable */
#ifndef cpu_interrupt_disable
extern cpu_interrupt_t
cpu_interrupt_disable(ANSIPROT0);
#endif
#ifndef cpu_interrupt_enable
extern cpu_interrupt_t
cpu_interrupt_enable(ANSIPROT0);
#endif
#ifndef cpu_interrupt_restore
extern void
cpu_interrupt_restore(ANSIPROT1(cpu_interrupt_t));
#endif
#ifndef cpu_interrupt_window
extern void
cpu_interrupt_window(ANSIPROT1(cpu_interrupt_t));
#endif
#ifndef cpu_interrupt_is_disabled
extern int
cpu_interrupt_is_disabled(ANSIPROT0);
#endif
#ifndef cpu_interrupt_is_enabled
extern int
cpu_interrupt_is_enabled(ANSIPROT0);
#endif
#ifndef cpu_interrupt_is_enabled_in
extern int
cpu_interrupt_is_enabled_in(ANSIPROT1(cpu_interrupt_t));
#endif
#ifndef cpu_interrupt_get_status
extern int
cpu_interrupt_get_status(ANSIPROT0);
#endif
#ifndef cpu_interrupt_pause
extern void
cpu_interrupt_pause(ANSIPROT0);
#endif
/* get/set target processor type */
#ifndef cpu_get_target
#define cpu_get_target() cpu_target
#endif
#define cpu_set_target(target) cpu_target = (target)
/* initialize cpu library */
#ifndef cpu_init
#define cpu_init() cpu_set_target(target_unspecified)
#endif
/* get trap table address */
#ifndef cpu_get_physical_vbr
extern void **cpu_get_physical_vbr(ANSIPROT0);
#endif
/* set trap base register */
#ifndef cpu_set_physical_vbr
extern void cpu_set_physical_vbr(ANSIPROT1(void **));
#endif
/* probe memory (byte,short,long) and return SUCCESS=0 or BUSERROR=1 */
typedef int cpu_memprobe_size_t;
#define CPU_MEMPROBE_BYTE ((cpu_memprobe_size_t)1)
#define CPU_MEMPROBE_SHORT ((cpu_memprobe_size_t)2)
#define CPU_MEMPROBE_LONG ((cpu_memprobe_size_t)4)
/* size defines actual size of void *addr and void *val */
extern int cpu_mem_probe(ANSIPROT3(void *addr, cpu_memprobe_size_t size,
void *val));
#ifdef _MCC386
typedef cpu_far_overlay_t cpu_context_ptr;
#else
typedef cpu_context_t FAR *cpu_context_ptr;
#endif
/* define target byte order */
#ifndef _CPU_LITTLE_ENDIAN_
#ifndef _CPU_BIG_ENDIAN_
#define _CPU_BIG_ENDIAN_ 1
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif /* !CPU_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -