You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the enhancement
The SETDP pseudo-operation is used to tell the assembler to optimize code. Specifically, the SETDP mnemonic allows the programmer to specify what the contents of the direct page register are during compilation. The assembler can then look for any addresses during assembly that have a most significant byte the same as what is stored in the direct page register. It will then transform those statements from their extended addressing mode equivalents into direct addressing mode statements instead.
For example, normally:
LDA $0F01
Would generate the following machine code:
B6 0F 01
However, if the direct page were loaded with $0F, and the SETDP pseudo-operation were implemented, then:
SETDP $0F
LDA $0F01
Would generate the following machine code:
96 01
The text was updated successfully, but these errors were encountered:
Describe the enhancement
The
SETDP
pseudo-operation is used to tell the assembler to optimize code. Specifically, theSETDP
mnemonic allows the programmer to specify what the contents of the direct page register are during compilation. The assembler can then look for any addresses during assembly that have a most significant byte the same as what is stored in the direct page register. It will then transform those statements from their extended addressing mode equivalents into direct addressing mode statements instead.For example, normally:
Would generate the following machine code:
However, if the direct page were loaded with
$0F
, and theSETDP
pseudo-operation were implemented, then:Would generate the following machine code:
The text was updated successfully, but these errors were encountered: