EttinOS-extra/TEMPLE/TEMPLE.ASM

531 lines
16 KiB
NASM

cpu 8086
org 0x3000
;Intro
;Print the intro
intro:
mov si, introtxt
mov ah, 0x2
int 0x21
;Read any key to start
mov ah, 0x0
int 0x16
call readquit
;Start
;Print the text
mov si, startxt
mov ah, 0x2
int 0x21
;Read the player choice
readstart:
mov ah, 0x0
int 0x16
cmp al, "1"
je give
cmp al, "2"
je take
cmp al, "3"
je do
call readquit
jmp readstart
;Giving
;Print the text
give:
mov si, givetxt
mov ah, 0x2
int 0x21
;Read the player choice
readgive:
mov ah, 0x0
int 0x16
cmp al, "1"
je comb
cmp al, "2"
je coin
call readquit
jmp readgive
;Giving a Comb
;Print the text
comb:
mov si, combtxt
mov ah, 0x2
int 0x21
;Read any key to return back to the beginning
mov ah, 0x0
int 0x16
call readquit
mov si, crlf
mov ah, 0x0
int 0x21
jmp intro
;Giving a Coin
;Print the text
coin:
mov si, cointxt
mov ah, 0x2
int 0x21
;Read any key to return back to the beginning
mov ah, 0x0
int 0x16
call readquit
mov si, crlf
mov ah, 0x0
int 0x21
jmp intro
;Taking
;Print the text
take:
mov si, taketxt
mov ah, 0x2
int 0x21
;Read the player choice
readtake:
mov ah, 0x0
int 0x16
cmp al, "1"
je bowl
cmp al, "2"
je knife
cmp al, "3"
je idol
call readquit
jmp readtake
;Taking the Bowl
;Print the text
bowl:
mov si, bowltxt
mov ah, 0x2
int 0x21
;Read any key to return back to the beginning
mov ah, 0x0
int 0x16
call readquit
mov si, crlf
mov ah, 0x0
int 0x21
jmp intro
;Taking the Knife
;Print the text
knife:
mov si, knifetxt
mov ah, 0x2
int 0x21
;Read any key to return back to the beginning
mov ah, 0x0
int 0x16
call readquit
mov si, crlf
mov ah, 0x0
int 0x21
jmp intro
;Taking the Idol
;Print the text
idol:
mov si, idoltxt
mov ah, 0x2
int 0x21
;Read any key to return back to the beginning
mov ah, 0x0
int 0x16
call readquit
mov si, crlf
mov ah, 0x0
int 0x21
jmp intro
;Doing
;Print the text
do:
mov si, dotxt
mov ah, 0x2
int 0x21
;Read the player choice
reado:
mov ah, 0x0
int 0x16
cmp al, "1"
je sacrifice
cmp al, "2"
je iconoclasm
cmp al, "3"
je prayer
call readquit
jmp reado
;Making a Sacrifice
;Print the text
sacrifice:
mov si, sacrificetxt
mov ah, 0x2
int 0x21
;Read the player choice
readsacrifice:
mov ah, 0x0
int 0x16
cmp al, "1"
je bread
cmp al, "2"
je blood
call readquit
jmp readsacrifice
;A Sacrifice of Bread
;Print the text
bread:
mov si, breadtxt
mov ah, 0x2
int 0x21
;Read any key to return back to the beginning
mov ah, 0x0
int 0x16
call readquit
mov si, crlf
mov ah, 0x0
int 0x21
jmp intro
;A Sacrifice of Blood
;Print the text
blood:
mov si, bloodtxt
mov ah, 0x2
int 0x21
;Read any key to return back to the beginning
mov ah, 0x0
int 0x16
call readquit
mov si, crlf
mov ah, 0x0
int 0x21
jmp intro
;Iconoclasm
;Print the text
iconoclasm:
mov si, iconoclasmtxt
mov ah, 0x2
int 0x21
;Read any key to return back to the beginning
mov ah, 0x0
int 0x16
call readquit
mov si, crlf
mov ah, 0x0
int 0x21
jmp intro
;Prayer
;Print the text
prayer:
mov si, prayertxt
mov ah, 0x2
int 0x21
;Read any key to return back to the beginning
mov ah, 0x0
int 0x16
call readquit
mov si, crlf
mov ah, 0x0
int 0x21
jmp intro
;Return
done:
int 0x20
;Data
introtxt db "In the Temple", 0xd, 0xa,\
"=============", 0xd, 0xa,\
0xd, 0xa,\
"This is a story of your visit to the temple of ",\
"Arattavesh.",\
0xd, 0xa,\
0xd, 0xa,\
"Press the corresponding number to choose an option or ",\
"escape to quit the", 0xd, 0xa,\
"game.", 0xd, 0xa,\
0xd, 0xa,\
"Press any key to start.", 0x0
startxt db 0xd, 0xa,\
"Before the Idol", 0xd, 0xa,\
"---------------", 0xd, 0xa,\
0xd, 0xa,\
"You are in the back of the temple, before the idol of ",\
"Arattavesh. It is", 0xd, 0xa,\
"a well made wooden statue painted with gold and blue.",\
0xd, 0xa,\
0xd, 0xa,\
"In front of the statue there is an ornate knife and a ",\
"plain wooden bowl.", 0xd, 0xa,\
0xd, 0xa,\
"You have come here to the sanctum to...", 0xd, 0xa,\
" 1. give something.", 0xd, 0xa,\
" 2. take something.", 0xd, 0xa,\
" 3. do something.", 0x0
givetxt db 0xd, 0xa,\
"Giving", 0xd, 0xa,\
"------", 0xd, 0xa,\
0xd, 0xa,\
"You have arrived to deposit a votive offering to ",\
"Arattavesh for healing", 0xd, 0xa,\
"your sickness over the winter. You intend to give...",\
0xd, 0xa,\
" 1. a wooden comb.", 0xd, 0xa,\
" 2. a silver coin.", 0x0
combtxt db 0xd, 0xa,\
"Giving a Comb", 0xd, 0xa,\
"-------------", 0xd, 0xa,\
0xd, 0xa,\
"You hold a finely carved wooden comb in your hands. ",\
"It is a comb you", 0xd, 0xa,\
"have made yourself, the masterpiece that gave you ",\
"full rights in the", 0xd, 0xa,\
"guild. You are sacrificing not only its monetary ",\
"value, but its value to", 0xd, 0xa,\
"you personally.", 0xd, 0xa,\
0xd, 0xa,\
"You place the comb next to the knife, say a few words ",\
"asking Arattavesh", 0xd, 0xa,\
"to accept your payment, and walk back to the door to ",\
"the sanctum. A", 0xd, 0xa,\
"priest sprinkles water on you, and closes the heavy ",\
"door after you step", 0xd, 0xa,\
"outside.", 0xd, 0xa,\
0xd, 0xa,\
"Press any key to return back to the beginning.", 0x0
cointxt db 0xd, 0xa,\
"Giving a Coin", 0xd, 0xa,\
"-------------", 0xd, 0xa,\
0xd, 0xa,\
"You take out a silver coin from the pouch hanging ",\
"from your belt. It", 0xd, 0xa,\
"represents the work of several weeks as a cobbler.",\
0xd, 0xa,\
0xd, 0xa,\
"You take the coin and throw it to the fountain that ",\
"is behind the idol,", 0xd, 0xa,\
"where you hear it clink against other coins that have ",\
"been deposited", 0xd, 0xa,\
"previously.", 0xd, 0xa,\
0xd, 0xa,\
"You turn back and walk through the curtains to the ",\
"common side of the", 0xd, 0xa,\
"temple, where other devout are waiting for their turn ",\
"to enter the", 0xd, 0xa,\
"sanctum.", 0xd, 0xa,\
0xd, 0xa,\
"Press any key to return back to the beginning.", 0x0
taketxt db 0xd, 0xa,\
"Taking", 0xd, 0xa,\
"------", 0xd, 0xa,\
0xd, 0xa,\
"There it is. Right before you. You steal a glance ",\
"behing you hoping to", 0xd, 0xa,\
"make sure that nobody spots you in the darkness as ",\
"you reach out and", 0xd, 0xa,\
"grab...", 0xd, 0xa,\
" 1. the bowl.", 0xd, 0xa,\
" 2. the knife.", 0xd, 0xa,\
" 3. the idol.", 0x0
bowltxt db 0xd, 0xa,\
"Taking the Bowl", 0xd, 0xa,\
"---------------", 0xd, 0xa,\
0xd, 0xa,\
"The bowl you had offered just a week before is still ",\
"here. You had left", 0xd, 0xa,\
"it as a thanks of your husband's recovery, but now ",\
"your husband is gone,", 0xd, 0xa,\
"your fields are destroyed, and all this is the name ",\
"of Arattavesh.", 0xd, 0xa,\
0xd, 0xa,\
"If the gods shall curse you for breaching the ",\
"holiness of the sanctum", 0xd, 0xa,\
"let them, for you curse the gods too. You take that ",\
"which you dedicated", 0xd, 0xa,\
'to Arattavesh and quietly state "You have taken back ',\
"your gift and so I", 0xd, 0xa,\
'shall take back mine" before slipping back into the ',\
"night.", 0xd, 0xa,\
0xd, 0xa,\
"Press any key to return back to the beginning.", 0x0
knifetxt db 0xd, 0xa,\
"Taking the Knife", 0xd, 0xa,\
"----------------", 0xd, 0xa,\
0xd, 0xa,\
"The knife is very nicely made. You admire it for a ",\
"small while, before", 0xd, 0xa,\
"slipping it into the bag you carry around your ",\
"shoulders.", 0xd, 0xa,\
0xd, 0xa,\
"You aren't committing a sin, or if you are it's not a ",\
"great one. The", 0xd, 0xa,\
"chanter who lives in the main city has not yet come ",\
"and completed the", 0xd, 0xa,\
"dedication. The one who's knelt before the idol and ",\
"left it here has", 0xd, 0xa,\
"merely announced an intention to give it to their god ",\
"so it's still", 0xd, 0xa,\
"theirs, and they will not miss it.", 0xd, 0xa,\
0xd, 0xa,\
"If Nagiri holds up his end of the bargain your debt ",\
"shall be gone come", 0xd, 0xa,\
"tomorrow and you can leave the land you work but do ",\
"not own. You get", 0xd, 0xa,\
"excited, but then try to calm down. It is not over ",\
"yet.", 0xd, 0xa,\
0xd, 0xa,\
"You walk out into the evening crowd still in the ",\
"market before the", 0xd, 0xa,\
"sanctum. There are so many people here nobody will ",\
"remember and be able", 0xd, 0xa,\
"to speak against you.", 0xd, 0xa,\
0xd, 0xa,\
"Press any key to return back to the beginning.", 0x0
idoltxt db 0xd, 0xa,\
"Taking the Idol", 0xd, 0xa,\
"---------------", 0xd, 0xa,\
0xd, 0xa,\
"Here it is. The protector god of your village, taken ",\
"by force when you", 0xd, 0xa,\
"were but a small child.", 0xd, 0xa,\
0xd, 0xa,\
"They call her Arattavesh, after the river, but you ",\
"know better. As you", 0xd, 0xa,\
'lift the idol you whisper: "Panglya, you shall be ',\
'home soon."', 0xd, 0xa,\
0xd, 0xa,\
"Press any key to return back to the beginning.", 0x0
dotxt db 0xd, 0xa,\
"Doing", 0xd, 0xa,\
"-----", 0xd, 0xa,\
0xd, 0xa,\
"Yes, it is finally time. You make sure that ",\
"everything is just right,", 0xd, 0xa,\
"and...", 0xd, 0xa,\
" 1. take the knife.", 0xd, 0xa,\
" 2. raise your axe.", 0xd, 0xa,\
" 3. kneel before the idol.", 0x0
sacrificetxt db 0xd, 0xa,\
"Making a Sacrifice", 0xd, 0xa,\
"------------------", 0xd, 0xa,\
0xd, 0xa,\
"You take the blade, and think of the long nights ",\
"spent replaying the", 0xd, 0xa,\
"formula of the sacrifice in your head. You've seen ",\
"ones before, but", 0xd, 0xa,\
"never this one, for it is one that a priest must do ",\
"alone.", 0xd, 0xa,\
0xd, 0xa,\
"You say the words, and cut...", 0xd, 0xa,\
" 1. a loaf of bread.", 0xd, 0xa,\
" 2. your finger.", 0x0
breadtxt db 0xd, 0xa,\
"A Sacrifice of Bread", 0xd, 0xa,\
"--------------------", 0xd, 0xa,\
0xd, 0xa,\
"As Arattavesh gives you grain, you shall give her ",\
"back. A slice of every", 0xd, 0xa,\
"loaf made before the next new moon shall be hers, and ",\
"the bakers will be", 0xd, 0xa,\
"giving their share starting tomorrow. But this loaf ",\
"is special, the", 0xd, 0xa,\
"first loaf baked from new grain, and it is reserved ",\
"for the junior", 0xd, 0xa,\
"priest of the temple. Which is you.", 0xd, 0xa,\
0xd, 0xa,\
"You know that you shall not be too stingy and cut ",\
"only the skin. You", 0xd, 0xa,\
"also know you have to be exact and not cut a too big ",\
"of a slice off. But", 0xd, 0xa,\
"that is no issue. You end up with a slice that is ",\
"just right, and place", 0xd, 0xa,\
"it in the bowl before the idol.", 0xd, 0xa,\
0xd, 0xa,\
"After this is done, you lay the knife back down, and ",\
"recite one of the", 0xd, 0xa,\
"old hymns, too old for people to understand anymore. ",\
"You feel that", 0xd, 0xa,\
"Arattavesh is pleased in you as you walk up to the ",\
"roof of the temple", 0xd, 0xa,\
"house and then across to the end of the block.", 0xd,\
0xa,\
0xd, 0xa,\
"Press any key to return back to the beginning.", 0x0
bloodtxt db 0xd, 0xa,\
"A Sacrifice of Blood", 0xd, 0xa,\
"--------------------", 0xd, 0xa,\
0xd, 0xa,\
"It hurts a little but you do not care, as you let the ",\
"droplets of blood", 0xd, 0xa,\
"drip into the bowl. Just like mixing your blood with ",\
"that of your sworn", 0xd, 0xa,\
"sister cements your bond, so does giving it to your ",\
"god.", 0xd, 0xa,\
0xd, 0xa,\
"You are a fully fledged priest of Arattavesh, the one ",\
"who rules behind", 0xd, 0xa,\
"the waves and in the dark caverns of earth. You hurry ",\
"to your new family", 0xd, 0xa,\
"who are waiting at the foot of the mountain.", 0xd, 0xa,\
0xd, 0xa,\
"Press any key to return back to the beginning.", 0x0
iconoclasmtxt db 0xd, 0xa,\
"Iconoclasm", 0xd, 0xa,\
"----------", 0xd, 0xa,\
0xd, 0xa,\
"There is but one abomination in the eyes of gods bad ",\
"enough to warrant a", 0xd, 0xa,\
"death in the marshes. And that is the worship of ",\
"earthly images in their", 0xd, 0xa,\
"stead.", 0xd, 0xa,\
0xd, 0xa,\
"You raise your axe and let it fall onto the head of ",\
"the idol. There is a", 0xd, 0xa,\
"crunching sound and you see the wood split, maggots ",\
"crawling out of it.", 0xd, 0xa,\
"Of course, of course. The idol is as rotten as the ",\
"act of worshiping it.", 0xd, 0xa,\
0xd, 0xa,\
"The heathen ways are over again, and the temple shall ",\
"be cleansed. You", 0xd, 0xa,\
"raise your arms and shout as loud as you can: ",\
'"Witness me Arattavesh,', 0xd, 0xa,\
"for I will cleanse your house of the ways of the ",\
"Eluwing, and enact", 0xd, 0xa,\
'revenge on those who have it thus defiled!"', 0xd, 0xa,\
0xd, 0xa,\
"Press any key to return back to the beginning.", 0x0
prayertxt db 0xd, 0xa,\
"Prayer", 0xd, 0xa,\
"------", 0xd, 0xa,\
0xd, 0xa,\
'"You who will remain when I am gone', 0xd, 0xa,\
"To help my family in time of need", 0xd, 0xa,\
"To shield the eastern flank of this city", 0xd, 0xa,\
"To leave the graves of our ancestors safe", 0xd, 0xa,\
"To bring the flood as you have brought", 0xd, 0xa,\
'I ask you"', 0xd, 0xa,\
0xd, 0xa,\
"Press any key to return back to the beginning.", 0x0
crlf db 0xd, 0xa, 0x0
;***
;Quit the game
readquit:
;Check for keypress Q
cmp al, 0x1b
je done
;Return
ret