各種エントリポイント
実行バイナリ自体のmain関数
標準入力で受け取ったSimHコマンドの解釈を行っている関数
scp.c:2984
t_stat process_stdin_commands (t_stat stat, char *argv[], t_bool do_called)
SimHコマンドが定義されているテーブル
scp.c:2512
static CTAB cmd_table[] = {
examine/depositコマンドの関数
scp.c:9544
/* Examine/deposit commands
modifiers
@filename output file
-letter(s) switches
devname'n device name and unit number
{&|^}value{=|==|!|!=|>|>=|<|<=} value search specification list list of addresses and registers
ALL all addresses
registerindex register array element STATE all registers
*/
t_stat exdep_cmd (int32 flag, CONST char *cptr)
{
run/go/step/next/continue/bootコマンドで実行される関数
scp.c:9109
/* Run, go, boot, cont, step, next commands
run new PC reset and start simulation next start simulation for 1 instruction
stepping over subroutine calls
boot device bootstrap from device and start simulation switches:
-Q quiet return status
-T (only for step), causes the step limit to
be a number of microseconds to run for
*/
t_stat run_cmd (int32 flag, CONST char *cptr)
{
1命令分のフェッチ・デコード・実行を行っている関数
↑run_cmd()から呼び出される
ちなみに、アセンブリ表記での使用可能な命令一覧はここにある そして、アセンブリ表記に対応する機械語はここに定義されている type340周期処理
おそらく↓
display/type340.c:161
void
ty340_cycle(void)
{
struct type340 *u = UNIT(0);
if (u->status == 0) {
ty340word insn = ty340_fetch(u->DAC);
u->status = ty340_instruction (insn);
u->DAC = (u->DAC + 1) & 07777;
}
}
type340命令処理
display/type340.c:855
/*
* execute one type340 instruction
* returns status word
* (could return number of microseconds)
*/
ty340word
ty340_instruction(ty340word inst)
{
struct type340 *u = UNIT(0);
int i, escape;