'******************************************************************************
'* 
'* PDP-11 CONSOLE COMMANDS (Used by emulator console for PDP11-configs)
'*
'******************************************************************************

//use implementation, common to all configs
public use module CONSOLE_ALL

'---------------------- Disassembling Command ---------------------------------

//Dissasembling of current CPU instruction
public procedure Dasm
 dim sAsm as string, sCode as string, sDesc as string
 dim sFlags as string, sModes as string, sCycles as string
 if dbg.DisAsmEx(cpu.PC,sAsm,sCode,sDesc,sFlags,sModes,sCycles)<0 then 
    ? "can not disassemble"
 else
    ? "[";Oct(cpu.PC,6);"] ";fstr(sCode,16);" ";fstr(sAsm,20);" ";
    ? fstr(sFlags,5);"   ";fstr(sDesc,31)
 end if
end

'--------------------------- Debug Commands -----------------------------------

//Execute CPU instruction and dissasemble it
public procedure Step(Count as dword=1,NeedDasm as boolean=true) 
 if Count>0 then dbg.Step(Count) : if NeedDasm then Dasm : end
public procedure S alias Step

//Execute some complex CPU instruction and dissasemble it
public procedure StepOver 
 dbg.StepOver : Dasm : end
public procedure SO alias StepOver

//Execute any CPU instruction and dissasemble it
public procedure StepOverOver
 dbg.StepOverOver : Dasm : end
public procedure SOO alias StepOverOver

