CAT PROGRAMME
10 REM : CAT POEM
15 LET ANNOYED =0
16 LET NOT EVEN SLIGHTLY ANNOYED CUZ I LOVE CATS=TRUE
17 LET CUTE CAT FACE MEOW=0
20 INPUT STRING CAT$
30 IF CAT$ =”HUNGRY” THEN GOSUB 100
40 IF CAT$= “CONTENT” THEN GOSUB 200
50 DISPLAY @ 10,20 “CAT BEING A CAT”
60 END
100 PRINT @ 10,20 “LOOKING FOR OWNER”
105 LET CUTE CAT FACE MEOW=CUTE CAT FACE MEOW + 1
110 IF ‘OWNER’ AT LOCATION ‘BED’ GOSUB 300
111 LET CANT FIND OWNER =CAT FIND OWNER +1
112 LET ANNOYED=ANNOYED +1
113 FIND 'OWNER$'
115 IF CUTE CAT FACE MEOW >= 10 THEN POKE 2550,OWNER, OUTPUT "MEOW"
120 LOOK FOR OWNER$ , OUTPUT "MEOW"
130 IF CANT FIND OWNER=0 GOTO 100
140 MEOW
150 MEOW
160 MEOW
165 RETURN
170 PAW AND MEOW
180 PAW IN FACE AND MEOW
185 IF ANNOYED>=10 THEN GOTO 400
190 CARRY ON PAW IN FACE AND DOUBLE MEOW
195 GOTO 111
200 SLEEP, LET TIME =TIME +1
210 IF TIME >5 GOTO 300
205 GOTO 200
300 PAW IN FACE
301 INPUT OWNER$
302 IF OWNER$=”GET OFF” THEN LET ANNOYED=ANNOYED+1 GOTO 140
303 LET HUNGRY=HUNGRY+1
304 LET PERSISTANCE=PERSISTANCE+1
305 LET CUTE CAT FACE MEOW=CUTE CAT FACE MEOW+1
306 IF OWNER=AWAKE AND ANNOYED>10 THEN GOTO 500
307 RETURN TO BLISS
400 LET OWNER STATUS= SWIPE CAT
410 SWIPE CAT
420 IF CAT LOCATION AT 10,20 THEN SWIPE CAT
430 IF CAT ON HEAD SWIPE THEN LET OWNER$=”CARRY ON SLEEPING WHILST ANNOYED”
440 SWIPE CAT
450 IF CAT AT 10,20 THEN SWIPE CAT
460 GIVE UP AND FEED CAT
470 INPUT FOOD INTO CAT
485 IF CAT TURNS UP NOSE, END CAT.
490 REM:CAT TURNS UP NOSE AT FOOD
495 LET NOT EVEN SLIGHTLY ANNOYED CUZ I LOVE CATS=FALSE
500 END CAT
zx81 1982
Ok! Ok not quite beginners all purpose symbolic instruction code but heck its been nearly 20 years since I wrote my first industrial programme. Incindently it was for an automatic glasshouse ventilaton system. (bang bang system) not to mention numerous hard wired relay and ladder logic systems for Robertsons jam factory .
Let me know the bugs and i'll do some fixes. This is beta. v 1.0
shoeless
Wed 20th May 2009 00:25
this has made me laugh a few times now ,,
specially the 'end cat' :)