Jump to content

Untrusted environment: Difference between revisions

m
Line 3:
 
The intention is that the definition is to be interpreted broadly; different languages will solve this task in very different ways and with (generally) incomparable results.
 
=={{header|6502 Assembly}}==
{{trans|Z80 Assembly}}
There is no trusted mode on the 6502. The program counter executes whatever it sees, and there are no segfaults, page faults, or what have you. Arbitrary code execution can be a risk, but can also be used by the programmer to speed up certain tasks, allow for opcodes an assembler doesn't support, etc.
 
=={{header|68000 Assembly}}==
The original 68000 has a "Supervisor Mode" and a "User Mode." There is little difference between the two except that Supervisor Mode has a separate stack pointer and allows certain commands that modify the full 16-bit processor status register as opposed to just the low byte of the status register. However, there is very little in protection from arbitrary code execution, as there is no way to prevent executing code from RAM. Whatever the program counter sees is what it executes, regardless of whether it should.
 
=={{header|8080 Assembly}}==
{{trans|Z80 Assembly}}
There is no trusted mode on the 8080. The program counter executes whatever it sees, and there are no segfaults, page faults, or what have you. Arbitrary code execution can be a risk, but can also be used by the programmer to speed up certain tasks, allow for opcodes an assembler doesn't support, etc.
 
=={{header|C}}==
1,489

edits

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