Enforced immutability: Difference between revisions

Content added Content deleted
m (→‎{{header|Z80 Assembly}}: removed extra whitespace)
m (→‎{{header|6502 Assembly}}: edited to be more in line with source)
Line 13: Line 13:
{{trans|Z80 Assembly}}
{{trans|Z80 Assembly}}
The 6502 has no hardware means of write-protecting areas of memory. Code and/or data are only immutable if they exist in ROM. Typically, a program run from floppy disk or CD-ROM is copied to the hardware's RAM and executed from there, while ROM cartridges (such as those on the NES) are often mapped directly into the 6502's address space and executed as ROM.
The 6502 has no hardware means of write-protecting areas of memory. Code and/or data are only immutable if they exist in ROM. Typically, a program run from floppy disk or CD-ROM is copied to the hardware's RAM and executed from there, while ROM cartridges (such as those on the NES) are often mapped directly into the 6502's address space and executed as ROM.

Side note: Trying to write to ROM at runtime will simply have no effect, and will not raise any kind of hardware exception or segfault.


<lang 6502asm>List:
<lang 6502asm>List: