Jump to content
IGNORED

Compumate


rietveld

Recommended Posts

BASIC PROGRAMMES FOR THE SPECTRAVIDEO CompuMate

The CompuMate has two built-in programs, a music program
and a paint program. These are completely separate from the text based
interpreter which cannot access music/sound or graphic functions.

The basic programming function of the CompuMate
allows for a very much larger program size (2K) and therefore a greater
scope in programming.
There is also the added advantage of being able to save your work
on audio tape at any time.

The manual supplied with the CompuMate provides only an introduction
to the use of basic programming on the CompuMate. (Some of the available
functions are not even mentioned in the manual. eg. Int, Step, <> (does
not equal)). I have therefore experimented with command usage and found
the commands to be far more flexible than the manual suggests.

The sample program "QUEST-A" shows this best

 

 

 

*************************** SAMPLE PROGRAMME #1 ***************************

NUMBER GUESS

5 LetA=Rnd[19]
10 LetB=A+1
15 IfD<5Goto30
20 Prt"NO MORE GUESSES THE","NUMBER WAS",B,""
25 Goto80
30 Prt"GUESS NUMBR,1 TO 20"
35 InpC
40 LetD=D+1
45 IfC=BGoto75
50 IfC<BGoto65
55 Prt"TOO HIGH",""
60 Goto15
65 Prt"TOO LOW",""
70 Goto15
75 Prt"YES, WELL DONE"
80 Prt"TRY AGAIN"

NOTES:-

A = random number 0 to 19
B = random number 1 to 20
C = player's guess at number
D = number of guesses


*************************** SAMPLE PROGRAMME #2 ***************************

SQUARE ROOT

70 Inp"NUMBER",N
71 Rem SET UP PROBLEM
72 IfN=1Goto92
73 IfN>1Goto76
74 LetA=N,B=1
75 Goto78
76 LetA=1,B=N
77 Rem ITERATE TO SOLUTION
78 LetC=[A+B]/2
79 LetD=C*C
80 LetE=D-N
81 PrtC
82 IfE<0.000ThenLetE=-E
83 IfE<.003ThenGoto90
84 IfD<NThenGoto87
85 LetB=C
86 Goto78
87 LetA=C
88 Goto78
89 Rem OUTPUT RESULTS
90 Prt"SQU ROOT OF",N,"=",C
91 Goto93
92 Prt"SQU ROOT OF 1 IS 1"
93 Prt"DONE"

NOTES:-

Syntax of lines 82 & 83 is critical, so enter these as shown.
Program works for input Numbers from about 0.1 to 100.
N = number for which square root is to be found
A & B = lower & upper limit of search
C = predicted value of root
D = square of C
E = error between square of C and N
(line 82 ensures that E is positive sign)
(line 83 sets the accuracy with which to find the root)

 

 

 

 

 

 

 

 

 

*************************** SAMPLE PROGRAMME #3 ***************************

QUEST-A

1 LetQ$="+---------+"
2 PrtQ$," QUEST-A",Q$," BY"
3 Prt"GRAHAM PERCY","1=PLAY"
4 InpC
5 LetR$="[ ]"
6 LetS$="+--- ---+"
7 LetT$=" ]"
9 LetV$="+---+-+---+"
10 LetW$="[ O++ ]"
11 LetY$="1=DN 2=RGHT"
12 PrtS$,R$,R$,T$,R$,Q$
13 Prt"A BIG ROOM","1=LEFT 2=UP"
14 Inp"ACTION=",B
15 IfB=1ThenGoto32
16 IfB<>2ThenGoto14
18 IfK<>1ThenPrtQ$,W$
20 IfK=1ThenPrtQ$,R$
21 PrtT$,R$,S$,"LONG HALL"
23 Prt"1=LEFT 2=DN"
24 IfK<>1ThenPrt"3=GET KEY"
25 Inp"ACTION=",B
26 IfB=2ThenGoto12
27 IfB=1ThenGoto48
28 IfB<>3ThenGoto25
29 IfK=0ThenPrt"YOU GOT KEY"
30 LetK=1
31 Goto18
32 PrtS$,R$,"[",Q$,"A DARK HALL"
33 IfP=1ThenGoto38
34 LetG=Rnd[2],F=Rnd[3]
35 IfG<>2ThenGoto38
36 Prt"OGRE HERE","1=UP 2=RGHT","3=FIGHT"
37 Goto39
38 Prt"1=UP 2=RGHT"
39 Inp"ACTION=",B
40 IfB=3ThenIfG=2ThenIfF=3ThenGoto96
41 IfB=2ThenGoto12
42 IfB=1ThenGoto48
43 IfB<>3ThenGoto39
44 Prt"GOT THE OGREGOT ARMOUR"
45 LetP=1
46 Goto32
48 IfD=1ThenIfE=3ThenGoto70
49 IfD=0ThenIfE=3ThenGoto77
50 PrtV$,R$,"[",R$,S$
51 Prt"TROLL, DOOR",Y$,"3=OPN 4=FGT"
52 Inp"ACTION=",B
53 IfB=1ThenGoto32
54 IfB=2ThenGoto18
55 IfB=3ThenIfK=1ThenGoto60
56 IfB=3ThenPrt"NEED A KEY"
57 IfB=4ThenGos88
59 Goto48
60 Prt"TROL SAY NO"
61 Goto48
70 PrtS$,R$,"[",R$,S$,"OPEN DOOR",Y$,"3=UP"
71 Inp"ACTION=",B
72 IfB=1ThenGoto32
73 IfB=2ThenGoto18
74 IfB<>3ThenGoto71
75 Prt"* * *"," *","",R$,R$,S$,"YOU,RE FREE"
76 Goto97
77 PrtV$,R$,"[",R$,S$,"A DOOR",Y$,"3=OPEN DOOR"
79 Inp"ACTION=",B
80 IfB=1ThenGoto32
81 IfB=2ThenGoto18
82 IfB=3ThenIfK=1ThenGoto85
83 IfB=3ThenPrt"NEED A KEY"
84 Goto79
85 Prt"YOU OPEN IT"
86 LetD=1
87 Goto70
88 IfP=0ThenLetF=Rnd[1],E=E+1
89 IfP=1ThenLetF=Rnd[14],E=E+1
90 Prt"YOU ATTACK,"
91 IfF=0ThenGoto96
92 IfE=3ThenPrt"GOT HIM"
93 Rtn
96 Prt"HE GOT YOU"
97 Prt"BYE"

NOTES:-
Add one more line to the above program and you will get an ERR 2 message
(program too big).
Character variables are assigned fixed values and are then used to help with
text style graphics!
Number variables are used to control programs flow.
B is used to nominate an action by the player
K = 1 when you have the key
P = 1 when you have killed the ogre and have gained armor
D = 1 after you open the door
E is the damage inflicted on the troll, he dies when E = 3
Also, random numbers are generated for a little unpredictability.
G is used to determine the ogre's presence
F decides who will win a fight with the ogre or troll
(when you have the armor, your chances against the troll are much better)

Edited by high voltage
  • Like 3
Link to comment
Share on other sites

This is a standard mono 3.5 jack.

 

I wrote an article about it some years ago. In 2 words, great in a collection, but useless ;-)

 

https://cambouisdelatari.wordpress.com/2014/11/06/le-spectravideo-compumate/

 

https://translate.google.com/translate?sl=auto&tl=en&u=https%3A%2F%2Fcambouisdelatari.wordpress.com%2F2014%2F11%2F06%2Fle-spectravideo-compumate%2F (Translated)

Edited by Cambouis de l'Atari
  • Like 1
Link to comment
Share on other sites

BASIC PROGRAMMES FOR THE SPECTRAVIDEO CompuMate

 

The CompuMate has two built-in programs, a music program

and a paint program. These are completely separate from the text based

interpreter which cannot access music/sound or graphic functions.

 

The basic programming function of the CompuMate

allows for a very much larger program size (2K) and therefore a greater

scope in programming.

There is also the added advantage of being able to save your work

on audio tape at any time.

 

The manual supplied with the CompuMate provides only an introduction

to the use of basic programming on the CompuMate. (Some of the available

functions are not even mentioned in the manual. eg. Int, Step, <> (does

not equal)). I have therefore experimented with command usage and found

the commands to be far more flexible than the manual suggests.

 

The sample program "QUEST-A" shows this best

 

 

 

*************************** SAMPLE PROGRAMME #1 ***************************

 

NUMBER GUESS

 

5 LetA=Rnd[19]

10 LetB=A+1

15 IfD<5Goto30

20 Prt"NO MORE GUESSES THE","NUMBER WAS",B,""

25 Goto80

30 Prt"GUESS NUMBR,1 TO 20"

35 InpC

40 LetD=D+1

45 IfC=BGoto75

50 IfC<BGoto65

55 Prt"TOO HIGH",""

60 Goto15

65 Prt"TOO LOW",""

70 Goto15

75 Prt"YES, WELL DONE"

80 Prt"TRY AGAIN"

 

NOTES:-

A = random number 0 to 19

B = random number 1 to 20

C = player's guess at number

D = number of guesses

*************************** SAMPLE PROGRAMME #2 ***************************

 

SQUARE ROOT

 

70 Inp"NUMBER",N

71 Rem SET UP PROBLEM

72 IfN=1Goto92

73 IfN>1Goto76

74 LetA=N,B=1

75 Goto78

76 LetA=1,B=N

77 Rem ITERATE TO SOLUTION

78 LetC=[A+B]/2

79 LetD=C*C

80 LetE=D-N

81 PrtC

82 IfE<0.000ThenLetE=-E

83 IfE<.003ThenGoto90

84 IfD<NThenGoto87

85 LetB=C

86 Goto78

87 LetA=C

88 Goto78

89 Rem OUTPUT RESULTS

90 Prt"SQU ROOT OF",N,"=",C

91 Goto93

92 Prt"SQU ROOT OF 1 IS 1"

93 Prt"DONE"

 

NOTES:-

Syntax of lines 82 & 83 is critical, so enter these as shown.

Program works for input Numbers from about 0.1 to 100.

N = number for which square root is to be found

A & B = lower & upper limit of search

C = predicted value of root

D = square of C

E = error between square of C and N

(line 82 ensures that E is positive sign)

(line 83 sets the accuracy with which to find the root)

 

 

 

 

 

 

 

 

 

*************************** SAMPLE PROGRAMME #3 ***************************

 

QUEST-A

 

1 LetQ$="+---------+"

2 PrtQ$," QUEST-A",Q$," BY"

3 Prt"GRAHAM PERCY","1=PLAY"

4 InpC

5 LetR$="[ ]"

6 LetS$="+--- ---+"

7 LetT$=" ]"

9 LetV$="+---+-+---+"

10 LetW$="[ O++ ]"

11 LetY$="1=DN 2=RGHT"

12 PrtS$,R$,R$,T$,R$,Q$

13 Prt"A BIG ROOM","1=LEFT 2=UP"

14 Inp"ACTION=",B

15 IfB=1ThenGoto32

16 IfB<>2ThenGoto14

18 IfK<>1ThenPrtQ$,W$

20 IfK=1ThenPrtQ$,R$

21 PrtT$,R$,S$,"LONG HALL"

23 Prt"1=LEFT 2=DN"

24 IfK<>1ThenPrt"3=GET KEY"

25 Inp"ACTION=",B

26 IfB=2ThenGoto12

27 IfB=1ThenGoto48

28 IfB<>3ThenGoto25

29 IfK=0ThenPrt"YOU GOT KEY"

30 LetK=1

31 Goto18

32 PrtS$,R$,"[",Q$,"A DARK HALL"

33 IfP=1ThenGoto38

34 LetG=Rnd[2],F=Rnd[3]

35 IfG<>2ThenGoto38

36 Prt"OGRE HERE","1=UP 2=RGHT","3=FIGHT"

37 Goto39

38 Prt"1=UP 2=RGHT"

39 Inp"ACTION=",B

40 IfB=3ThenIfG=2ThenIfF=3ThenGoto96

41 IfB=2ThenGoto12

42 IfB=1ThenGoto48

43 IfB<>3ThenGoto39

44 Prt"GOT THE OGREGOT ARMOUR"

45 LetP=1

46 Goto32

48 IfD=1ThenIfE=3ThenGoto70

49 IfD=0ThenIfE=3ThenGoto77

50 PrtV$,R$,"[",R$,S$

51 Prt"TROLL, DOOR",Y$,"3=OPN 4=FGT"

52 Inp"ACTION=",B

53 IfB=1ThenGoto32

54 IfB=2ThenGoto18

55 IfB=3ThenIfK=1ThenGoto60

56 IfB=3ThenPrt"NEED A KEY"

57 IfB=4ThenGos88

59 Goto48

60 Prt"TROL SAY NO"

61 Goto48

70 PrtS$,R$,"[",R$,S$,"OPEN DOOR",Y$,"3=UP"

71 Inp"ACTION=",B

72 IfB=1ThenGoto32

73 IfB=2ThenGoto18

74 IfB<>3ThenGoto71

75 Prt"* * *"," *","",R$,R$,S$,"YOU,RE FREE"

76 Goto97

77 PrtV$,R$,"[",R$,S$,"A DOOR",Y$,"3=OPEN DOOR"

79 Inp"ACTION=",B

80 IfB=1ThenGoto32

81 IfB=2ThenGoto18

82 IfB=3ThenIfK=1ThenGoto85

83 IfB=3ThenPrt"NEED A KEY"

84 Goto79

85 Prt"YOU OPEN IT"

86 LetD=1

87 Goto70

88 IfP=0ThenLetF=Rnd[1],E=E+1

89 IfP=1ThenLetF=Rnd[14],E=E+1

90 Prt"YOU ATTACK,"

91 IfF=0ThenGoto96

92 IfE=3ThenPrt"GOT HIM"

93 Rtn

96 Prt"HE GOT YOU"

97 Prt"BYE"

 

NOTES:-

Add one more line to the above program and you will get an ERR 2 message

(program too big).

Character variables are assigned fixed values and are then used to help with

text style graphics!

Number variables are used to control programs flow.

B is used to nominate an action by the player

K = 1 when you have the key

P = 1 when you have killed the ogre and have gained armor

D = 1 after you open the door

E is the damage inflicted on the troll, he dies when E = 3

Also, random numbers are generated for a little unpredictability.

G is used to determine the ogre's presence

F decides who will win a fight with the ogre or troll

(when you have the armor, your chances against the troll are much better)

 

 

This is pretty cool! :)

 

Interesting commands are abbreviated to 3 characters in this dialect like Prt, Inp, Ret, yet goto is still a four letter word.

 

Does Compumate BASIC support the concatenator operator? If so it could be used in the Vintage BASIC 10 liner contest!

  • Like 1
Link to comment
Share on other sites

This is a standard mono 3.5 jack.

 

I wrote an article about it some years ago. In 2 words, great in a collection, but useless ;-)

 

https://cambouisdelatari.wordpress.com/2014/11/06/le-spectravideo-compumate/

 

https://translate.google.com/translate?sl=auto&tl=en&u=https%3A%2F%2Fcambouisdelatari.wordpress.com%2F2014%2F11%2F06%2Fle-spectravideo-compumate%2F (Translated)

 

Is this correct?

 

 

post-19659-0-35167600-1556974181_thumb.jpg

Link to comment
Share on other sites

 

This is pretty cool! :)

 

Interesting commands are abbreviated to 3 characters in this dialect like Prt, Inp, Ret, yet goto is still a four letter word.

 

Does Compumate BASIC support the concatenator operator? If so it could be used in the Vintage BASIC 10 liner contest!

 

Obviously someone was reading Dijkstra. ;)

Edited by pacman000
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...