Skip to content

Commit

Permalink
don't allow / as switchcar on linux + comment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davidly committed Nov 14, 2023
1 parent 62b81d8 commit f72b42d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions ntvcm.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,8 @@ bool cpm_read_console( char * buf, size_t bufsize, uint8_t & out_len )
return false;
} //cpm_read_console

// must return one of OPCODE_HLT, OPCODE_NOP, or OPCODE_RET

uint8_t x80_invoke_hook()
{
static uint64_t kbd_poll_busyloops = 0;
Expand Down Expand Up @@ -2656,7 +2658,11 @@ int main( int argc, char * argv[] )
strcat( pCommandTail, parg );
}

if ( 0 == pcCOM && ( '-' == c || '/' == c ) )
if ( 0 == pcCOM && ( '-' == c
#if defined( WATCOM ) || defined( _WIN32 )
|| '/' == c
#endif
) )
{
char ca = (char) tolower( parg[1] );

Expand Down Expand Up @@ -2735,7 +2741,6 @@ int main( int argc, char * argv[] )
}

* pCommandTailLen = (char) strlen( pCommandTail );

tracer.Trace( "command tail len %d value: '%s'\n", *pCommandTailLen, pCommandTail );

char acCOM[ MAX_PATH ] = {0};
Expand Down
2 changes: 1 addition & 1 deletion x80.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ uint64_t x80_emulate( uint64_t maxcycles )
x80_trace_state();

uint8_t op = memory[ reg.pc ]; // 1% of runtime
reg.pc++; // 7% of runtime including npad to make _restart_op aligned
reg.pc++; // 7% of runtime
cycles += acycles[ op ];

switch ( op ) // 50% of runtime is completing cycle addition & setting up for the jump table jump
Expand Down

0 comments on commit f72b42d

Please sign in to comment.