diff --git a/doc/ca65.sgml b/doc/ca65.sgml index b6d577472..978aaf159 100644 --- a/doc/ca65.sgml +++ b/doc/ca65.sgml @@ -3213,7 +3213,8 @@ See: , + See also: , and + .IMPORT @@ -3764,6 +3765,33 @@ See: , +.REFERTO + + Mark a symbol as referenced. + + It is useful in combination with the + command. A subroutine with two entry points can be created. When the first + entry point is called, it sets some default value as an argument, and falls + through into the second entry point. .REFERTO helps to ensure that + the second part is included into binary when only the first entry point is + actually used from the code. + + Example: + + + .ifref ResetValue ; If this subroutine is used + ResetValue: ; Define it + lda #0 ; Set a default value + .referto SetValue ; Ensure that SetValue will be included + .endif + .ifref SetValue ; If this or previous subroutine is used + SetValue: + sta Value + rts + .endif + + + .RELOC Switch back to relocatable mode. See the
@@ -3764,6 +3765,33 @@ See: , +.REFERTO + + Mark a symbol as referenced. + + It is useful in combination with the + command. A subroutine with two entry points can be created. When the first + entry point is called, it sets some default value as an argument, and falls + through into the second entry point. .REFERTO helps to ensure that + the second part is included into binary when only the first entry point is + actually used from the code. + + Example: + + + .ifref ResetValue ; If this subroutine is used + ResetValue: ; Define it + lda #0 ; Set a default value + .referto SetValue ; Ensure that SetValue will be included + .endif + .ifref SetValue ; If this or previous subroutine is used + SetValue: + sta Value + rts + .endif + + + .RELOC Switch back to relocatable mode. See the
+ + Mark a symbol as referenced. + + It is useful in combination with the + command. A subroutine with two entry points can be created. When the first + entry point is called, it sets some default value as an argument, and falls + through into the second entry point. .REFERTO helps to ensure that + the second part is included into binary when only the first entry point is + actually used from the code. + + Example: + + + .ifref ResetValue ; If this subroutine is used + ResetValue: ; Define it + lda #0 ; Set a default value + .referto SetValue ; Ensure that SetValue will be included + .endif + .ifref SetValue ; If this or previous subroutine is used + SetValue: + sta Value + rts + .endif + + + .RELOC Switch back to relocatable mode. See the
Switch back to relocatable mode. See the