3b2: Allow boot without cpu param
This commit is contained in:
parent
ba9d8626e9
commit
39758261ff
2 changed files with 23 additions and 1 deletions
|
@ -76,6 +76,11 @@ t_bool cpu_ex_halt = FALSE; /* Flag to halt on exceptions /
|
||||||
traps */
|
traps */
|
||||||
t_bool cpu_km = FALSE; /* If true, kernel mode has been forced
|
t_bool cpu_km = FALSE; /* If true, kernel mode has been forced
|
||||||
for memory access */
|
for memory access */
|
||||||
|
CTAB sys_cmd[] = {
|
||||||
|
{ "BOOT", &sys_boot, RU_BOOT,
|
||||||
|
"bo{ot} boot simulator\n", NULL, &run_cmd_message },
|
||||||
|
{ NULL }
|
||||||
|
};
|
||||||
|
|
||||||
BITFIELD psw_bits[] = {
|
BITFIELD psw_bits[] = {
|
||||||
BITFFMT(ET,2,%d), /* Exception Type */
|
BITFFMT(ET,2,%d), /* Exception Type */
|
||||||
|
@ -570,6 +575,19 @@ void cpu_load_rom()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t_stat sys_boot(int32 flag, CONST char *ptr)
|
||||||
|
{
|
||||||
|
char gbuf[CBUFSIZE];
|
||||||
|
|
||||||
|
get_glyph(ptr, gbuf, 0);
|
||||||
|
|
||||||
|
if (gbuf[0] && strcmp(gbuf, "CPU")) {
|
||||||
|
return SCPE_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
|
return run_cmd(flag, "CPU");
|
||||||
|
}
|
||||||
|
|
||||||
t_stat cpu_boot(int32 unit_num, DEVICE *dptr)
|
t_stat cpu_boot(int32 unit_num, DEVICE *dptr)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -656,6 +674,10 @@ t_stat cpu_reset(DEVICE *dptr)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/* Link in our special "boot" command so we can boot with both
|
||||||
|
* "BO{OT}" and "BO{OT} CPU" */
|
||||||
|
sim_vm_cmd = sys_cmd;
|
||||||
|
|
||||||
if (!sim_is_running) {
|
if (!sim_is_running) {
|
||||||
/* Clear registers */
|
/* Clear registers */
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
|
|
|
@ -387,7 +387,7 @@ typedef struct _instr {
|
||||||
} instr;
|
} instr;
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
|
t_stat sys_boot(int32 flag, CONST char *ptr);
|
||||||
t_stat cpu_svc(UNIT *uptr);
|
t_stat cpu_svc(UNIT *uptr);
|
||||||
t_stat cpu_ex(t_value *vptr, t_addr addr, UNIT *uptr, int32 sw);
|
t_stat cpu_ex(t_value *vptr, t_addr addr, UNIT *uptr, int32 sw);
|
||||||
t_stat cpu_dep(t_value val, t_addr addr, UNIT *uptr, int32 sw);
|
t_stat cpu_dep(t_value val, t_addr addr, UNIT *uptr, int32 sw);
|
||||||
|
|
Loading…
Add table
Reference in a new issue