← Back to team overview

gnusim8085-devel team mailing list archive

[Bug 848265] Re: infinite loop bug in example causes infinite loop

 

** Attachment added: "Original with data added to test it and fixed to prevent infinite loop."
   https://bugs.launchpad.net/bugs/848265/+attachment/2393458/+files/sorting-fixed.asm

-- 
You received this bug notification because you are a member of
GNUSim8085 developers, which is subscribed to gnusim8085.
https://bugs.launchpad.net/bugs/848265

Title:
  infinite loop bug in example causes infinite loop

Status in gnusim8085:
  New

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?).

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnusim8085/+bug/848265/+subscriptions


References