[cc65] Subtraction optimization

Date view Thread view Subject view

From: Piotr Fusik (P.Fusik_at_elka.pw.edu.pl)
Date: 2001-11-04 20:30:18


Hi,

There's a simple optimization that could be applied in many places in cc65
and runtime lib:

Before:
 sta tmp1
 lda something
 sbc tmp1

After:
 eor #$FF
 adc something

Of course, provided that tmp1 doesn't matter.

BTW. There's a bug in libsrc/runtime/sub.s: after .ifpc02 there should be
lda (sp).

Bye,
Piotr


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:43 CET