Long literals, with continuations: Difference between revisions
Long literals, with continuations (view source)
Revision as of 11:12, 20 September 2021
, 2 years ago→{{header|6502 Assembly}}: clarification of special assembler syntax
Puppydrum64 (talk | contribs) No edit summary |
Puppydrum64 (talk | contribs) m (→{{header|6502 Assembly}}: clarification of special assembler syntax) |
||
Line 120:
Finally:
db "elements, the last is ",0
ElementCount equ (Elements_End-Elements)/2
; a constant value that cannot change at runtime.
; This counts the number of bytes between the two labels, and automatically adjusts when the size of the list changes.
; The division by 2 gets the actual element count since each address is 2 bytes long.</lang>
The required output can be obtained like so:
Line 162 ⟶ 165:
118 elements, the last is oganesson
</pre>
=={{header|Arturo}}==
|