Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
output ASM
#1
Not sure if this is a bug, per se - but it is certainly a bit ugly.

This even survived the peephole optimizer.

Input Basic:

IF myCurrentVector = %1000 then

Output assembly:

ld a, (ix+9)
sub 8
sub 1
jp nc, __LABEL56


Two subs in a row? And worse "Sub 1" instead of a dec?

It later tests:

IF myCurrentVector = %0001 then

as:
ld a, (ix+9)
dec a
sub 1
jp nc, __LABEL63



And I'm not even convinced that's the same test as "equal to x" Surely that's testing "If myCurrentVector>x" anyway?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)