What is the motivation in ca65 behind having both = and := for numeric constants?
The documentation says := marks the symbol as a label "so it may be handled differently in a debugger"
https://cc65.github.io/doc/ca65.html#ss6.1
What does that mean; different how?
= vs. :=
Re: = vs. :=
jeffythedragonslayer wrote:
What is the motivation in ca65 behind having both = and := for numeric constants?
The documentation says := marks the symbol as a label "so it may be handled differently in a debugger"
https://cc65.github.io/doc/ca65.html#ss6.1
What does that mean; different how?
The documentation says := marks the symbol as a label "so it may be handled differently in a debugger"
https://cc65.github.io/doc/ca65.html#ss6.1
What does that mean; different how?
Using = just creates a name while that file is being assembled an doesn't create the label for any subsequent debugger to find.
The upshot is (AIUI), using = will produce smaller .o files which may assemble and/or link faster, but it's not something I've really cared about.
If you want symbols to be global over several files, then use := else use =
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
-
jmthompson
- Posts: 127
- Joined: 30 Dec 2017
- Location: Detroit, Michigan, USA
- Contact:
Re: = vs. :=
drogon wrote:
If you want symbols to be global over several files, then use := else use =
Code: Select all
.export IBUFFSZ
IBUFFSZ = 256
In general I just tend to declare constants with "=" and actual addresses/symbols with ":=", but I think that's mostly just a personal thing for me and I'm not sure it really makes a difference.