User Tools

Site Tools


base:advanced_optimizing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
base:advanced_optimizing [2021-01-20 10:15] – [Forming terms] bitbreakerbase:advanced_optimizing [2021-04-19 08:26] – [LAX] bitbreaker
Line 901: Line 901:
 Actually you can use LAX also with an immediate value, but it behaves a bit unstable regarding the given immediate value. However when simply doing an LAX #$00 you are fine. Actually you can use LAX also with an immediate value, but it behaves a bit unstable regarding the given immediate value. However when simply doing an LAX #$00 you are fine.
  
 +
 +lda $xxxx,y is not available as 8 bit version, so an lda $xx,y is not possible. With lax $xx,y there is howeever a way to imitate a lda $xx,y at the cost of destroying x.
 ===== SAX/SHA ===== ===== SAX/SHA =====
  
Line 1430: Line 1432:
           sbc num           sbc num
           sta neg           sta neg
 +          
 +          ;num in a, carry set
 +          lda num
 +          sbc #$01
 +          eor #$ff
 </code> </code>
  
-There are of course also other expressions possible, just ponder a while about the term.+There are of course also other expressions possible, just ponder a while about the term. Also the carry flag after the negation can be influenced, depending on using sbc or adc for most cases ($00/$ff will cause an overflow).
  
 How's about forming terms with logical operations? We notice, that for e.g. (a + b) xor $ff is the same as (a xor $ff) - b: How's about forming terms with logical operations? We notice, that for e.g. (a + b) xor $ff is the same as (a xor $ff) - b:
base/advanced_optimizing.txt · Last modified: 2024-03-03 11:06 by bitbreaker