VOGONS


First post, by japheth

User metadata
Rank Newbie
Rank
Newbie

Hello,

the following code snippet to detect the cpu type has a problem running under DEBUG in DosBox:

pushf
pop ax
or ah,70h
push ax
popf ;<--- here DEBUG looses control of debuggee in DosBox
pushf
pop ax

could this be fixed?

used DosBox CVS build from 12.11.2006 for the test.

Reply 1 of 1, by japheth

User metadata
Rank Newbie
Rank
Newbie

it seems that DosBox has a problem with the trace flag: it is cleared in the copy of the Flags register onto the stack, but is set in Flags just before the POPF. Since the latter is the relevant value, a debug exception should occur, but DosBox might give the value of Flags after POPF a higher priority.