mipsio.c

来自「skyeye是一个可以模拟嵌入式硬件开发板的系统软件」· C语言 代码 · 共 71 行

C
71
字号
#include "types.h"#include "emul.h"#include "skyeye_config.h"extern MIPS_State *mstate;UInt32mips_io_read_byte(UInt32 addr){	if (skyeye_config.mach->mach_io_read_byte)		return skyeye_config.mach->mach_io_read_byte(mstate, addr);	else		return 0;}UInt32mips_io_read_halfword(UInt32 addr){		if (skyeye_config.mach->mach_io_read_halfword)		return skyeye_config.mach->mach_io_read_halfword(mstate, addr);	else		return 0;}UInt32mips_io_read_word(UInt32 addr){		if (skyeye_config.mach->mach_io_read_word)		return skyeye_config.mach->mach_io_read_word(mstate, addr);	else		return 0;}UInt64mips_io_read_doubleword(UInt32 addr){	return 0;}voidmips_io_write_byte(UInt32 addr, UInt32 data){		if (skyeye_config.mach->mach_io_write_byte)		skyeye_config.mach->mach_io_write_byte(mstate, addr, data);}voidmips_io_write_halfword(UInt32 addr, UInt32 data){		if (skyeye_config.mach->mach_io_write_halfword)		skyeye_config.mach->mach_io_write_halfword(mstate, addr, data);}voidmips_io_write_word(UInt32 addr, UInt32 data){		if (skyeye_config.mach->mach_io_write_word)		skyeye_config.mach->mach_io_write_word(mstate, addr, data);}voidmips_io_write_doubleword(UInt32 addr, UInt32 data){}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?