提交 aafd7d37 创建 作者: 李川's avatar 李川

Merge branch 'update' into 'master'

没有这种文件类型的预览
这个 源代码变更 因为 太大 而不能显示。 你可以 浏览blob
没有这种文件类型的预览
这个 源代码变更 因为 太大 而不能显示。 你可以 浏览blob
...@@ -94,6 +94,7 @@ const char* alu_not_keyword = "alu_not"; ...@@ -94,6 +94,7 @@ const char* alu_not_keyword = "alu_not";
const char* al_flag_keyword = "al_flag"; const char* al_flag_keyword = "al_flag";
const char* shift_flag_keyword = "shift_flag"; const char* shift_flag_keyword = "shift_flag";
// 访问主存或外设的操作数 // 访问主存或外设的操作数
const char* pc_main_memory_keyword = "[pc]"; const char* pc_main_memory_keyword = "[pc]";
const char* jz_mar_keyword = "jz[mar]"; const char* jz_mar_keyword = "jz[mar]";
...@@ -319,6 +320,7 @@ struct KEYWORD_FUNCTION_ENTRY ...@@ -319,6 +320,7 @@ struct KEYWORD_FUNCTION_ENTRY
// 指令名称 // 指令名称
const char* fetch_instruction_keyword = "fetch"; const char* fetch_instruction_keyword = "fetch";
const char* check_instruction_keyword = "check"; const char* check_instruction_keyword = "check";
const char* hold_instruction_keyword = "hold";
const char* cli_instruction_keyword = "cli"; const char* cli_instruction_keyword = "cli";
const char* sti_instruction_keyword = "sti"; const char* sti_instruction_keyword = "sti";
const char* inta_instruction_keyword = "inta"; const char* inta_instruction_keyword = "inta";
...@@ -398,7 +400,7 @@ void parse_fetch(int line_num) ...@@ -398,7 +400,7 @@ void parse_fetch(int line_num)
} }
// check // check irq
void parse_check(int line_num) void parse_check(int line_num)
{ {
unsigned long ul = 0xffffffcb; unsigned long ul = 0xffffffcb;
...@@ -406,6 +408,14 @@ void parse_check(int line_num) ...@@ -406,6 +408,14 @@ void parse_check(int line_num)
machine_code_address += 4; machine_code_address += 4;
} }
// hold DMA
void parse_hold(int line_num)
{
unsigned long ul = 0xffffd5db;
memcpy(&machine_code[machine_code_address], &ul, 4);
machine_code_address += 4;
}
// cli // cli
void parse_cli(int line_num) void parse_cli(int line_num)
{ {
...@@ -534,6 +544,7 @@ struct KEYWORD_FUNCTION_ENTRY keyword_function_table[] = ...@@ -534,6 +544,7 @@ struct KEYWORD_FUNCTION_ENTRY keyword_function_table[] =
,{ &fetch_instruction_keyword, parse_fetch } ,{ &fetch_instruction_keyword, parse_fetch }
,{ &check_instruction_keyword, parse_check } ,{ &check_instruction_keyword, parse_check }
,{ &hold_instruction_keyword, parse_hold }
,{ &dup_instruction_keyword, parse_dup } ,{ &dup_instruction_keyword, parse_dup }
,{ &cli_instruction_keyword, parse_cli } ,{ &cli_instruction_keyword, parse_cli }
,{ &sti_instruction_keyword, parse_sti } ,{ &sti_instruction_keyword, parse_sti }
......
没有这种文件类型的预览
没有这种文件类型的预览
差异被折叠。
...@@ -14,7 +14,7 @@ path [pc], ir ...@@ -14,7 +14,7 @@ path [pc], ir
inc pc inc pc
path [pc], rd path [pc], rd
inc pc inc pc
check irq check irq ;查询硬中断
reset upc reset upc
dup 1, null dup 1, null
...@@ -306,7 +306,7 @@ reset upc ...@@ -306,7 +306,7 @@ reset upc
dup 6, null dup 6, null
;40. ;40.
dup 8, null dup 8, null
;41. ;41.
...@@ -542,9 +542,10 @@ path alu_sub, a ...@@ -542,9 +542,10 @@ path alu_sub, a
path al_flag, flag path al_flag, flag
inc pc inc pc
check irq check irq
hold DMA ;查询DMA请求
reset upc reset upc
dup 6, null dup 5, null
;73. cmp reg, reg ;73. cmp reg, reg
inc pc inc pc
...@@ -963,8 +964,7 @@ path sp, a ...@@ -963,8 +964,7 @@ path sp, a
path alu_dec, sp path alu_dec, sp
path sp, mar path sp, mar
path pc, [mar] path pc, [mar]
; IF标志置位,开中断,允许中断嵌套
sti
; 获取中断号中断服务程序入口地址 ; 获取中断号中断服务程序入口地址
inta inta
dup 1, null ;插入空闲周期 dup 1, null ;插入空闲周期
...@@ -973,7 +973,7 @@ path inta, mar ;读取中断号并送入地址寄存器中 ...@@ -973,7 +973,7 @@ path inta, mar ;读取中断号并送入地址寄存器中
path [mar], pc path [mar], pc
reset upc reset upc
dup 1, null dup 2, null
;120. inc reg ;120. inc reg
inc pc inc pc
......
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG߿GGGGGGGGGGGGGG?_GG߿GGGGG?G?GGGG߿G߿߿GG GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG߿GGGGGGGGGGGGGG?_GG߿GGGGG?G?GGGG߿G߿߿GG
\ No newline at end of file \ No newline at end of file
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论