Long literals, with continuations: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) No edit summary |
Puppydrum64 (talk | contribs) m (→{{header|6502 Assembly}}: clarification of special assembler syntax) |
||
Line 120: | Line 120: | ||
Finally: |
Finally: |
||
db "elements, the last is ",0 |
db "elements, the last is ",0 |
||
ElementCount equ (Elements_End-Elements)/2 |
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: |
The required output can be obtained like so: |
||
Line 162: | Line 165: | ||
118 elements, the last is oganesson |
118 elements, the last is oganesson |
||
</pre> |
</pre> |
||
=={{header|Arturo}}== |
=={{header|Arturo}}== |