Jump to content

Array: Difference between revisions

m
Line 118:
In cases like this, high-level languages often implement <i>escape characters</i> which when encountered in a string, result in a branch to a section that reads the next character without checking if it's a terminator or other control code. Effectively this removes the special meaning of that character but only if an escape character is before it. This concept is often reversed to allow the programmer to easily implement ASCII control characters, such as <code>\n</code> for new line (in ASCII this is represented by a 13 followed by a 10, for carriage return + line feed.) In this case the backslash signals to <code>printf()</code> that the next letter is associated with a particular ASCII control code. If the next character read is an "n" then ASCII 13 gets printed, followed by ASCII 10. After this, normal reading and printing resumes.
<lang asm>HelloText: ;6502, z80, 8086
HelloText: ;6502, z80, 8086
db "Hello World",0
 
1,489

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.