Reputation
11,367
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
3 35 51
Newest
 Good Answer
Impact
~203k people reached

Feb
6
comment What's the point of hidden files?
Because of rm *
Feb
5
comment Is it possible to move a pointer from one item to another on the stack?
That's implementation dependent, so I don't think you can say it's "not exactly correct" just "not likely with modern compilers". I've used (very old) compilers in the past that would not eliminate variables in these cases
Feb
5
answered Is it possible to move a pointer from one item to another on the stack?
Jan
26
comment Can the “level 256 bug” in the game of Pacman be considered an unhandled segfault?
To run Pacman, you'd need to run on a Z80 emulator, and if the emulator is working properly, anything run on it will exhibit the exact same behavior as on a real CPU. It would thus exhibit the same bug. Memory protection would only come into play if it somehow wrote outside of the emulator's address range, which should be impossible.
Jan
25
comment Can the “level 256 bug” in the game of Pacman be considered an unhandled segfault?
This is the best answer. "Undefined behavior" means that the coder wrote code for which the result cannot be foretold based on the standard. If Pacman is written in Z80 assembly (and I believe it was) then the code written had an entirely defined meaning regardless of whether the program did something the coder didn't intend.
Jan
25
comment Can the “level 256 bug” in the game of Pacman be considered an unhandled segfault?
It may not even be "undefined behavior". If Pacman was written in pure assembly, then the code did exactly what it was told to do in an utterly defined way. Not undefined behavior, but merely a bug. As such, the code would run the exact same way running on any system that had a perfect port of the underlying chipset.
Jan
25
comment Can the “level 256 bug” in the game of Pacman be considered an unhandled segfault?
I never worked on games, but I did work on Z80-based cash registers of that era and there really wasn't anything you'd call an OS even to the level of DOS BIOS. There was a very limited set of IO routines created specifically for the device. The only real distinction was that some where in firmware and some were in RAM.
Jan
25
comment Can the “level 256 bug” in the game of Pacman be considered an unhandled segfault?
According to wikipedia Pacman used a Z80. Z80s definitely did not have memory protection.
Jan
21
revised If a number is too big does it spill over to the next memory location?
added 57 characters in body
Jan
21
comment If a number is too big does it spill over to the next memory location?
Sorry, yes, you are correct. I should have added a "usually" in there.
Jan
20
awarded  Good Answer
Jan
20
awarded  Nice Answer
Jan
20
comment How can you catch all index out of range errors in python?
If you want to expand a list to size 10 using None as the "default" value, do values += [None] * (10 - len(values)). Just do that to whatever maximum size you are looking for immediately after pulling the command line.
Jan
20
comment How can you catch all index out of range errors in python?
NULL is not python.
Jan
20
answered If a number is too big does it spill over to the next memory location?
Jan
20
comment How can you catch all index out of range errors in python?
Sounds like you want this: stackoverflow.com/questions/2492087/…
Jan
15
awarded  Guru
Jan
15
awarded  Good Answer
Jan
15
awarded  Enlightened
Jan
15
awarded  Nice Answer