If you look at the pseudocode for REP in the manual, it clearly shows that ECX is predecremented before testing against 0. I will try my own tests on real hardware. I never use REP with ECX = 0.Artlav wrote:It should? I couldn't find a mention in the Intel docs.bewing wrote:If you do a REP and ECX is 0, it should repeat 4 billion times.
And rebochs is not locked up AFAIK -- it is just busy repeating your instruction 4 billion times, which takes awhile.
I support that, but I also use port e9 for many other things. Point ESI at your output string, EDI at the string that should appear inside the [], set AL to [0 - 4] (info to fatal) and do an OUT 0xe9, AL. Your string will appear in the logfile.Not quite stupid - it's a quick and easy way to write out debug information, in two commands you can send a mark into the console that something went wrong or right. It's like a serial port.
I see. I will probably support that with a special port 0xe9 call. Why not use XCHG EBX, EBX instead? That's a much simpler "magic breakpoint".By breakpoint i meant this sequence: ...
Which in Bochs breaks execution and gives you debug prompt. Very handy.