Assembly Language for Beginners

(nextflipdebug2) #1

9.4fortuneprogram indexing file.


Let’s skip some “days” in the game and oops! We have a lower amount of some resources:


Figure 9.21:Resource variables overflow

That’s just overflow.


Thegame’sdevelopersupposedlydidn’tthinkaboutsuchhighamountsofresources,sothereareprobably
no overflow checks, but the mine is “working” in the game, resources are added, hence the overflows.
Apparently, it is a bad idea to be that greedy.


There are probably a lot of more values saved in this file.


So this is very simple method of cheating in games. High score files often can be easily patched like that.


More about files and memory snapshots comparing:5.10.2 on page 725.


9.4 fortuneprogram indexing file


(This part was first appeared in my blog at 25-Apr-2015.)


fortuneis well-known UNIX program which shows random phrase from a collection. Some geeks are often
set up their system in such way, sofortunecan be called after logging on.fortunetakes phrases from the
text files laying in/usr/share/games/fortunes(as of Ubuntu Linux). Here is example (“fortunes” text file):


A day for firm decisions!!!!! Or is it?
%
A few hours grace before the madness begins again.
%
A gift of a flower will soon be made to you.
%
A long-forgotten loved one will appear soon.


Buy the negatives at any price.
%

Free download pdf