rdnelson / Libra

An 8086 emulator with a focus on educational features.
Other
13 stars 4 forks source link

loop doesn't work. #182

Closed kevincox closed 10 years ago

kevincox commented 10 years ago

Using the latest git (513a214a340fd85033a218d475fe39e1d79ef820) the loop instruction doesn't work.

Start:
    mov CX, 8
    ALoop:
        inc AX ; Only gets run once!
        loop ALoop ; Doesn't loop!

    hlt

.END Start

When running this code the loop never gets taken even though CX is 8.

rdnelson commented 10 years ago

The current HEAD has a fix for this. Can you confirm it works?

kevincox commented 10 years ago

Yes, it works.

Cheers.