Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_24.ADF » F/M\cTut3

F/M\cTut3

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_24.ADF
Filename: F/M\cTut3
Read OK:
File size: 0963 bytes
Load address: 46204556
Exec address: 432F4D2E
File contents
As I have mentioned the messages given by number, I list them by number
here for easy reference -
     
         1.  "You are "
         2.  "You can see "
         3.  "You can go "
         4.  "What next? "
         5.  "You are carrying "
         6.  "You wanted to go "
         7.  "You wanted to "
         8.  "You can't move that way"
         9.  "- Do what?"
         10. "You take it"
         11. "You drop it"
         12. "You haven't got it"
         13. "You've already got it!"
         14. "It is not here!!"
         15. "Nothing useful"
         16. "what?"
         17. "You can't do that"
         18. " - Which button?"
         19. "Ok"

The original program gave the message 'You wanted to ' (messages 6 and 7)
after each entry but I have not included these as I felt this was not
necessary.

Well so much for the game as far as it goes.  I hope that it is of
interest and will encourage somebody to have a go at either completing the
game or writing another adventure game.

This seems to have grown again and I hope that I have explained it all
right!!  I wrote it some two or three years ago and needed to refresh my
memory on how I had done it!!  I would also say that it is not a perfect
program and there is room for improvement but thought that it shows some
routines whuch could be used for writing an adventure program.

I hope too that the series has encouraged those who have not used the
assembler to try to use it.  I enjoy experimenting and have learnt by
trial and error - especially the latter!!

Not only does the coding speed up the program, it helps to save memory
too.  In BASIC, all variables need to be in memory twice.  They are
defined in the program and then held in memory above LOMEM.  Programs
which are entirely in M/code include the variables and also they can use
areas of memory below PAGE which cannot be used in BASIC.  This is why I
am hoping to code the program mentioned earlier.

I must finish the series now so that I can press on with other ideas I
have in mind.  If anyone has any problems, or finds something that I have
not covered, I shall be pleased to try to explain it.  As I have said
before, I do not count myself an expert but I am always ready to try to
help in any way I can.

**************************************************************************

00000000  0d 41 73 1a 20 49 1a 20  68 61 76 65 1a 20 6d 65  |.As. I. have. me|
00000010  6e 74 69 6f 6e 65 64 20  74 68 65 20 6d 65 73 73  |ntioned the mess|
00000020  61 67 65 73 20 67 69 76  65 6e 20 62 79 20 6e 75  |ages given by nu|
00000030  6d 62 65 72 2c 20 49 20  6c 69 73 74 20 74 68 65  |mber, I list the|
00000040  6d 20 62 79 20 6e 75 6d  62 65 72 0d 68 65 72 65  |m by number.here|
00000050  20 66 6f 72 20 65 61 73  79 20 72 65 66 65 72 65  | for easy refere|
00000060  6e 63 65 20 2d 0d 20 20  20 20 20 0d 20 20 20 20  |nce -.     .    |
00000070  20 20 20 20 20 31 2e 20  20 22 59 6f 75 20 61 72  |     1.  "You ar|
00000080  65 20 22 0d 20 20 20 20  20 20 20 20 20 32 2e 20  |e ".         2. |
00000090  20 22 59 6f 75 20 63 61  6e 20 73 65 65 20 22 0d  | "You can see ".|
000000a0  20 20 20 20 20 20 20 20  20 33 2e 20 20 22 59 6f  |         3.  "Yo|
000000b0  75 20 63 61 6e 20 67 6f  20 22 0d 20 20 20 20 20  |u can go ".     |
000000c0  20 20 20 20 34 2e 20 20  22 57 68 61 74 20 6e 65  |    4.  "What ne|
000000d0  78 74 3f 20 22 0d 20 20  20 20 20 20 20 20 20 35  |xt? ".         5|
000000e0  2e 20 20 22 59 6f 75 20  61 72 65 20 63 61 72 72  |.  "You are carr|
000000f0  79 69 6e 67 20 22 0d 20  20 20 20 20 20 20 20 20  |ying ".         |
00000100  36 2e 20 20 22 59 6f 75  20 77 61 6e 74 65 64 20  |6.  "You wanted |
00000110  74 6f 20 67 6f 20 22 0d  20 20 20 20 20 20 20 20  |to go ".        |
00000120  20 37 2e 20 20 22 59 6f  75 20 77 61 6e 74 65 64  | 7.  "You wanted|
00000130  20 74 6f 20 22 0d 20 20  20 20 20 20 20 20 20 38  | to ".         8|
00000140  2e 20 20 22 59 6f 75 20  63 61 6e 27 74 20 6d 6f  |.  "You can't mo|
00000150  76 65 20 74 68 61 74 20  77 61 79 22 0d 20 20 20  |ve that way".   |
00000160  20 20 20 20 20 20 39 2e  20 20 22 2d 20 44 6f 20  |      9.  "- Do |
00000170  77 68 61 74 3f 22 0d 20  20 20 20 20 20 20 20 20  |what?".         |
00000180  31 30 2e 20 22 59 6f 75  20 74 61 6b 65 20 69 74  |10. "You take it|
00000190  22 0d 20 20 20 20 20 20  20 20 20 31 31 2e 20 22  |".         11. "|
000001a0  59 6f 75 20 64 72 6f 70  20 69 74 22 0d 20 20 20  |You drop it".   |
000001b0  20 20 20 20 20 20 31 32  2e 20 22 59 6f 75 20 68  |      12. "You h|
000001c0  61 76 65 6e 27 74 20 67  6f 74 20 69 74 22 0d 20  |aven't got it". |
000001d0  20 20 20 20 20 20 20 20  31 33 2e 20 22 59 6f 75  |        13. "You|
000001e0  27 76 65 20 61 6c 72 65  61 64 79 20 67 6f 74 20  |'ve already got |
000001f0  69 74 21 22 0d 20 20 20  20 20 20 20 20 20 31 34  |it!".         14|
00000200  2e 20 22 49 74 20 69 73  20 6e 6f 74 20 68 65 72  |. "It is not her|
00000210  65 21 21 22 0d 20 20 20  20 20 20 20 20 20 31 35  |e!!".         15|
00000220  2e 20 22 4e 6f 74 68 69  6e 67 20 75 73 65 66 75  |. "Nothing usefu|
00000230  6c 22 0d 20 20 20 20 20  20 20 20 20 31 36 2e 20  |l".         16. |
00000240  22 77 68 61 74 3f 22 0d  20 20 20 20 20 20 20 20  |"what?".        |
00000250  20 31 37 2e 20 22 59 6f  75 20 63 61 6e 27 74 20  | 17. "You can't |
00000260  64 6f 20 74 68 61 74 22  0d 20 20 20 20 20 20 20  |do that".       |
00000270  20 20 31 38 2e 20 22 20  2d 20 57 68 69 63 68 20  |  18. " - Which |
00000280  62 75 74 74 6f 6e 3f 22  0d 20 20 20 20 20 20 20  |button?".       |
00000290  20 20 31 39 2e 20 22 4f  6b 22 0d 0d 54 68 65 20  |  19. "Ok"..The |
000002a0  6f 72 69 67 69 6e 61 6c  20 70 72 6f 67 72 61 6d  |original program|
000002b0  20 67 61 76 65 20 74 68  65 1a 20 6d 65 73 73 61  | gave the. messa|
000002c0  67 65 20 27 59 6f 75 20  77 61 6e 74 65 64 20 74  |ge 'You wanted t|
000002d0  6f 20 27 20 28 6d 65 73  73 61 67 65 73 20 36 20  |o ' (messages 6 |
000002e0  61 6e 64 20 37 29 0d 61  66 74 65 72 20 65 61 63  |and 7).after eac|
000002f0  68 20 65 6e 74 72 79 20  62 75 74 20 49 20 68 61  |h entry but I ha|
00000300  76 65 1a 20 6e 6f 74 1a  20 69 6e 63 6c 75 64 65  |ve. not. include|
00000310  64 1a 20 74 68 65 73 65  1a 20 61 73 1a 20 49 20  |d. these. as. I |
00000320  66 65 6c 74 20 74 68 69  73 20 77 61 73 20 6e 6f  |felt this was no|
00000330  74 0d 6e 65 63 65 73 73  61 72 79 2e 0d 0d 57 65  |t.necessary...We|
00000340  6c 6c 1a 20 73 6f 1a 20  6d 75 63 68 1a 20 66 6f  |ll. so. much. fo|
00000350  72 1a 20 74 68 65 1a 20  67 61 6d 65 1a 20 61 73  |r. the. game. as|
00000360  1a 20 66 61 72 1a 20 61  73 20 69 74 20 67 6f 65  |. far. as it goe|
00000370  73 2e 20 20 49 20 68 6f  70 65 20 74 68 61 74 20  |s.  I hope that |
00000380  69 74 20 69 73 20 6f 66  0d 69 6e 74 65 72 65 73  |it is of.interes|
00000390  74 20 61 6e 64 20 77 69  6c 6c 20 65 6e 63 6f 75  |t and will encou|
000003a0  72 61 67 65 20 73 6f 6d  65 62 6f 64 79 20 74 6f  |rage somebody to|
000003b0  20 68 61 76 65 20 61 20  67 6f 20 61 74 20 65 69  | have a go at ei|
000003c0  74 68 65 72 20 63 6f 6d  70 6c 65 74 69 6e 67 20  |ther completing |
000003d0  74 68 65 0d 67 61 6d 65  20 6f 72 20 77 72 69 74  |the.game or writ|
000003e0  69 6e 67 20 61 6e 6f 74  68 65 72 20 61 64 76 65  |ing another adve|
000003f0  6e 74 75 72 65 20 67 61  6d 65 2e 0d 0d 54 68 69  |nture game...Thi|
00000400  73 20 73 65 65 6d 73 20  74 6f 20 68 61 76 65 20  |s seems to have |
00000410  67 72 6f 77 6e 1a 20 61  67 61 69 6e 1a 20 61 6e  |grown. again. an|
00000420  64 1a 20 49 1a 20 68 6f  70 65 20 74 68 61 74 20  |d. I. hope that |
00000430  49 20 68 61 76 65 20 65  78 70 6c 61 69 6e 65 64  |I have explained|
00000440  20 69 74 20 61 6c 6c 0d  72 69 67 68 74 21 21 20  | it all.right!! |
00000450  20 49 20 77 72 6f 74 65  20 69 74 20 73 6f 6d 65  | I wrote it some|
00000460  20 74 77 6f 20 6f 72 20  74 68 72 65 65 20 79 65  | two or three ye|
00000470  61 72 73 1a 20 61 67 6f  1a 20 61 6e 64 20 6e 65  |ars. ago. and ne|
00000480  65 64 65 64 20 74 6f 20  72 65 66 72 65 73 68 20  |eded to refresh |
00000490  6d 79 0d 6d 65 6d 6f 72  79 20 6f 6e 20 68 6f 77  |my.memory on how|
000004a0  20 49 20 68 61 64 20 64  6f 6e 65 20 69 74 21 21  | I had done it!!|
000004b0  20 20 49 20 77 6f 75 6c  64 20 61 6c 73 6f 20 73  |  I would also s|
000004c0  61 79 1a 20 74 68 61 74  1a 20 69 74 20 69 73 20  |ay. that. it is |
000004d0  6e 6f 74 20 61 20 70 65  72 66 65 63 74 0d 70 72  |not a perfect.pr|
000004e0  6f 67 72 61 6d 20 61 6e  64 20 74 68 65 72 65 20  |ogram and there |
000004f0  69 73 20 72 6f 6f 6d 1a  20 66 6f 72 1a 20 69 6d  |is room. for. im|
00000500  70 72 6f 76 65 6d 65 6e  74 20 62 75 74 20 74 68  |provement but th|
00000510  6f 75 67 68 74 20 74 68  61 74 20 69 74 20 73 68  |ought that it sh|
00000520  6f 77 73 20 73 6f 6d 65  0d 72 6f 75 74 69 6e 65  |ows some.routine|
00000530  73 20 77 68 75 63 68 20  63 6f 75 6c 64 20 62 65  |s whuch could be|
00000540  20 75 73 65 64 20 66 6f  72 20 77 72 69 74 69 6e  | used for writin|
00000550  67 20 61 6e 20 61 64 76  65 6e 74 75 72 65 20 70  |g an adventure p|
00000560  72 6f 67 72 61 6d 2e 0d  0d 49 20 68 6f 70 65 20  |rogram...I hope |
00000570  74 6f 6f 20 74 68 61 74  20 74 68 65 1a 20 73 65  |too that the. se|
00000580  72 69 65 73 1a 20 68 61  73 1a 20 65 6e 63 6f 75  |ries. has. encou|
00000590  72 61 67 65 64 1a 20 74  68 6f 73 65 1a 20 77 68  |raged. those. wh|
000005a0  6f 20 68 61 76 65 20 6e  6f 74 20 75 73 65 64 20  |o have not used |
000005b0  74 68 65 0d 61 73 73 65  6d 62 6c 65 72 1a 20 74  |the.assembler. t|
000005c0  6f 1a 20 74 72 79 20 74  6f 20 75 73 65 20 69 74  |o. try to use it|
000005d0  2e 20 20 49 20 65 6e 6a  6f 79 20 65 78 70 65 72  |.  I enjoy exper|
000005e0  69 6d 65 6e 74 69 6e 67  20 61 6e 64 1a 20 68 61  |imenting and. ha|
000005f0  76 65 1a 20 6c 65 61 72  6e 74 1a 20 62 79 0d 74  |ve. learnt. by.t|
00000600  72 69 61 6c 20 61 6e 64  20 65 72 72 6f 72 20 2d  |rial and error -|
00000610  20 65 73 70 65 63 69 61  6c 6c 79 20 74 68 65 20  | especially the |
00000620  6c 61 74 74 65 72 21 21  0d 0d 4e 6f 74 1a 20 6f  |latter!!..Not. o|
00000630  6e 6c 79 20 64 6f 65 73  20 74 68 65 20 63 6f 64  |nly does the cod|
00000640  69 6e 67 20 73 70 65 65  64 20 75 70 20 74 68 65  |ing speed up the|
00000650  20 70 72 6f 67 72 61 6d  2c 20 69 74 20 68 65 6c  | program, it hel|
00000660  70 73 1a 20 74 6f 1a 20  73 61 76 65 1a 20 6d 65  |ps. to. save. me|
00000670  6d 6f 72 79 0d 74 6f 6f  2e 20 20 49 6e 1a 20 42  |mory.too.  In. B|
00000680  41 53 49 43 2c 1a 20 61  6c 6c 1a 20 76 61 72 69  |ASIC,. all. vari|
00000690  61 62 6c 65 73 1a 20 6e  65 65 64 1a 20 74 6f 1a  |ables. need. to.|
000006a0  20 62 65 1a 20 69 6e 20  6d 65 6d 6f 72 79 20 74  | be. in memory t|
000006b0  77 69 63 65 2e 20 20 54  68 65 79 20 61 72 65 0d  |wice.  They are.|
000006c0  64 65 66 69 6e 65 64 1a  20 69 6e 1a 20 74 68 65  |defined. in. the|
000006d0  20 70 72 6f 67 72 61 6d  20 61 6e 64 20 74 68 65  | program and the|
000006e0  6e 20 68 65 6c 64 20 69  6e 20 6d 65 6d 6f 72 79  |n held in memory|
000006f0  1a 20 61 62 6f 76 65 1a  20 4c 4f 4d 45 4d 2e 1a  |. above. LOMEM..|
00000700  20 20 50 72 6f 67 72 61  6d 73 0d 77 68 69 63 68  |  Programs.which|
00000710  20 61 72 65 20 65 6e 74  69 72 65 6c 79 1a 20 69  | are entirely. i|
00000720  6e 1a 20 4d 2f 63 6f 64  65 20 69 6e 63 6c 75 64  |n. M/code includ|
00000730  65 20 74 68 65 20 76 61  72 69 61 62 6c 65 73 20  |e the variables |
00000740  61 6e 64 20 61 6c 73 6f  20 74 68 65 79 20 63 61  |and also they ca|
00000750  6e 20 75 73 65 0d 61 72  65 61 73 20 6f 66 20 6d  |n use.areas of m|
00000760  65 6d 6f 72 79 20 62 65  6c 6f 77 20 50 41 47 45  |emory below PAGE|
00000770  1a 20 77 68 69 63 68 1a  20 63 61 6e 6e 6f 74 20  |. which. cannot |
00000780  62 65 20 75 73 65 64 20  69 6e 20 42 41 53 49 43  |be used in BASIC|
00000790  2e 20 20 54 68 69 73 20  69 73 20 77 68 79 20 49  |.  This is why I|
000007a0  0d 61 6d 20 68 6f 70 69  6e 67 20 74 6f 20 63 6f  |.am hoping to co|
000007b0  64 65 20 74 68 65 20 70  72 6f 67 72 61 6d 20 6d  |de the program m|
000007c0  65 6e 74 69 6f 6e 65 64  20 65 61 72 6c 69 65 72  |entioned earlier|
000007d0  2e 0d 0d 49 20 6d 75 73  74 20 66 69 6e 69 73 68  |...I must finish|
000007e0  20 74 68 65 20 73 65 72  69 65 73 20 6e 6f 77 20  | the series now |
000007f0  73 6f 1a 20 74 68 61 74  1a 20 49 1a 20 63 61 6e  |so. that. I. can|
00000800  1a 20 70 72 65 73 73 20  6f 6e 20 77 69 74 68 20  |. press on with |
00000810  6f 74 68 65 72 20 69 64  65 61 73 20 49 0d 68 61  |other ideas I.ha|
00000820  76 65 20 69 6e 20 6d 69  6e 64 2e 20 20 49 66 20  |ve in mind.  If |
00000830  61 6e 79 6f 6e 65 20 68  61 73 20 61 6e 79 20 70  |anyone has any p|
00000840  72 6f 62 6c 65 6d 73 2c  20 6f 72 20 66 69 6e 64  |roblems, or find|
00000850  73 20 73 6f 6d 65 74 68  69 6e 67 1a 20 74 68 61  |s something. tha|
00000860  74 20 49 20 68 61 76 65  0d 6e 6f 74 1a 20 63 6f  |t I have.not. co|
00000870  76 65 72 65 64 2c 1a 20  49 20 73 68 61 6c 6c 20  |vered,. I shall |
00000880  62 65 20 70 6c 65 61 73  65 64 20 74 6f 20 74 72  |be pleased to tr|
00000890  79 20 74 6f 20 65 78 70  6c 61 69 6e 20 69 74 2e  |y to explain it.|
000008a0  20 20 41 73 1a 20 49 1a  20 68 61 76 65 1a 20 73  |  As. I. have. s|
000008b0  61 69 64 0d 62 65 66 6f  72 65 2c 20 49 20 64 6f  |aid.before, I do|
000008c0  1a 20 6e 6f 74 1a 20 63  6f 75 6e 74 1a 20 6d 79  |. not. count. my|
000008d0  73 65 6c 66 20 61 6e 20  65 78 70 65 72 74 20 62  |self an expert b|
000008e0  75 74 20 49 20 61 6d 20  61 6c 77 61 79 73 20 72  |ut I am always r|
000008f0  65 61 64 79 20 74 6f 20  74 72 79 20 74 6f 0d 68  |eady to try to.h|
00000900  65 6c 70 20 69 6e 20 61  6e 79 20 77 61 79 20 49  |elp in any way I|
00000910  20 63 61 6e 2e 0d 0d 2a  2a 2a 2a 2a 2a 2a 2a 2a  | can...*********|
00000920  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000960  2a 0d 0d                                          |*..|
00000963
F/M\cTut3.m0
F/M\cTut3.m1
F/M\cTut3.m2
F/M\cTut3.m4
F/M\cTut3.m5