infinite loop bug in example causes infinite loop

Bug #848265 reported by Ed Sirett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnusim8085
New
Undecided
Unassigned

Bug Description

The sorting example supplied in the documentation (sorting.asm) has a bug.
I defined a few bytes at the (can't easily insert data at address 0050 without a the ".org" directive).
I discovered that if the byte array to be sorted contains two identical elements the sort program never completes.
This is because when two elements are identical the program swaps them and sets the 'recheck' flag in D.
It is easy enough to fix the program (attached).
However I was unable to interrupt gnusim when in the inifinite loop.
I think there might be a couple of ways to fix this.
1) Put a flag in the main simulator loop I think this might be in one of the functions of bridge.c - the flag (a volatile) gets set by some sort of button call back.
2) Implement interrupt buttons to simulate the interrupts and make the service-code halt the simulator (perhaps by using an illegal opcode?).

Revision history for this message
Ed Sirett (ed-makewrite) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.