Login
Search for:


Previous | Next

From: Crown (all posts)
Date: 1998-06-07
Subject: Minus4 branch bug and fix
Hi there,

Mike:
The branch instructions take 4 cycles in the emulator,
if they are at an address which equals or higher than $8000
even when they are not crossing page boundaries.
This happens because you defined NewPC as int16, and in the comparison this is sign extended to 32 bit (I checked the dissasembled code)
The fix:
you have to define NewPC as uint16.
Affected files:
bcc.c bcs.c beq.c bmi.c bne.c bpl.c bvc.c bvs.c

Tibor Biczo / Crown of GOTU

Copyright © Plus/4 World Team, 2001-2024