Home » Archimedes archive » Micro User » MU 1990-06.adf » GuessGm

GuessGm

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 » Archimedes archive » Micro User » MU 1990-06.adf
Filename: GuessGm
Read OK:
File size: 010C bytes
Load address: FFFFFD43
Exec address: 6D3978C4
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
\ Random number guessing
\
.start
cls
display(0,0) "Enter a number:"
string STR$(RND(9))
compare FNinput(1)
beq winner
\
display(0,2) "Bad luck"
jump confirm
\
.winner
display(0,2) "You were right!"
\
.confirm
display(0,3) "The number was "
calc $
wait(2)
jump start
00000000  0d 5c 20 52 61 6e 64 6f  6d 20 6e 75 6d 62 65 72  |.\ Random number|
00000010  20 67 75 65 73 73 69 6e  67 0d 5c 0d 2e 73 74 61  | guessing.\..sta|
00000020  72 74 0d 63 6c 73 0d 64  69 73 70 6c 61 79 28 30  |rt.cls.display(0|
00000030  2c 30 29 20 22 45 6e 74  65 72 20 61 20 6e 75 6d  |,0) "Enter a num|
00000040  62 65 72 3a 22 0d 73 74  72 69 6e 67 20 53 54 52  |ber:".string STR|
00000050  24 28 52 4e 44 28 39 29  29 0d 63 6f 6d 70 61 72  |$(RND(9)).compar|
00000060  65 20 46 4e 69 6e 70 75  74 28 31 29 0d 62 65 71  |e FNinput(1).beq|
00000070  20 77 69 6e 6e 65 72 0d  5c 0d 64 69 73 70 6c 61  | winner.\.displa|
00000080  79 28 30 2c 32 29 20 22  42 61 64 20 6c 75 63 6b  |y(0,2) "Bad luck|
00000090  22 0d 6a 75 6d 70 20 63  6f 6e 66 69 72 6d 0d 5c  |".jump confirm.\|
000000a0  0d 2e 77 69 6e 6e 65 72  0d 64 69 73 70 6c 61 79  |..winner.display|
000000b0  28 30 2c 32 29 20 22 59  6f 75 20 77 65 72 65 20  |(0,2) "You were |
000000c0  72 69 67 68 74 21 22 0d  5c 0d 2e 63 6f 6e 66 69  |right!".\..confi|
000000d0  72 6d 0d 64 69 73 70 6c  61 79 28 30 2c 33 29 20  |rm.display(0,3) |
000000e0  22 54 68 65 20 6e 75 6d  62 65 72 20 77 61 73 20  |"The number was |
000000f0  22 0d 63 61 6c 63 20 24  0d 77 61 69 74 28 32 29  |".calc $.wait(2)|
00000100  0d 6a 75 6d 70 20 73 74  61 72 74 0d              |.jump start.|
0000010c