Menu

#5 STOS does not grab correct register

stable
closed
nobody
None
5
2018-01-30
2018-01-29
ereisch
No

In i8086Stos(), it appears as though a change was introduced at one point which brought in a bug. The program flow appears to intend to:
1. Get data width
2. Get DI register
3. Get AX register
4. Copy Accumulator to DI (or DX)

However, the line which should be getting the accumulator register is just copying the entire accumulator into DI. Thus, the code is using an uninitialized value for "accreg" in this case. The first argument in the second call to i8086GetRegisterRef should be "accreg", not "direg".

Discussion

  • Memphis

    Memphis - 2018-01-29

    which versions of the emu do you compare when talking about introduced regressions here?

     
  • ereisch

    ereisch - 2018-01-29

    I didn't have visibility into the history (since Git was only established with the latest version). By "at one point", I was referring to whatever change commented out the "direg=" and "accreg=" lines, and introduced the lines immediately after them. It's possible the commented-out lines were never part of a release.

     
  • Memphis

    Memphis - 2018-01-30
    • status: unread --> closed
     
  • Memphis

    Memphis - 2018-01-30

    fixed in git master

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.