String length: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) m (→{{header|6502 Assembly}}: clarification) |
||
Line 69: | Line 69: | ||
<lang 6502asm>GetStringLength: ;$00 and $01 make up the pointer to the string's base address. |
<lang 6502asm>GetStringLength: ;$00 and $01 make up the pointer to the string's base address. |
||
;(Of course, any two consecutive zero-page memory locations can fulfill this role.) |
;(Of course, any two consecutive zero-page memory locations can fulfill this role.) |
||
LDY #0 ;Y |
LDY #0 ;Y is both the index into the string and the length counter. |
||
loop_getStringLength: |
loop_getStringLength: |