User Tools

Site Tools

Translations of this page:




Author ???????
Computer Amstrad PCW 8256 / 8512 / 9512
Year ????
Gender Arcade
Controls Keyboard
Languages English
Status Preserved



An incredible game based on one of the machines of the famous character Mario Bros, the “Mario's Cement Factory”. Our mission will be that our character named Mario must empty the cement hoppers into the trucks that are at the bottom of the screen. We will have to use the elevators that go up and down to move around the factory. To empty the hoppers we must be next to them and then press the space bar to empty them, making us add points. To move to the left or right we will use the cursor keys. We will have to be careful when going up or down an elevator, we will have to do it at the right moment or we will fall down the hole, causing us to lose a life. We can only move from one elevator to another at the exact moment it happens.

The game starts with five lives indicated at the top left of the screen. We will lose a life if we fall down the elevator shaft or get crushed by the top or bottom of the elevator.

If any of the four hoppers is full (three layers of cement), a warning indicator will appear. If the hopper is overfilled, then Mario will be fired on the spot and the game is over.

We can leave the game at any time during the game by pressing the EXIT key.


  • Listing - MARIO.BAS
10 OPTION RUN:DEFINT a-z:DEFSNG e:hi!=HIMEM:MEMORY &HBFFF,1000:GOSUB 1510:DIM a%(22,65),sz(4),LX(4),b(8,17)
20 RESTORE 30:FOR x=&HC070 TO &HC098:READ pk:POKE x,pk:NEXT x
30 DATA 243,62,129,211,241,62,130,211,242,175,95,103,22,184,58,153,192,111,41,41
40 DATA 41,25,17,154,192,235,1,8,0,237,176,62,133,211,241,62,134,211,242,251,201
50 char=200:lives=5
60 count=17:ch=char:WHILE char<count+ch:POKE &HC099,(char):FOR r=1 TO 8:READ b(r,ct):POKE &HC099+r,(b(r,ct))
70 NEXT :cl=&HC070:CALL cl:char=char+1:WEND
80 DATA 255,135,143,157,185,241,225,255,255,225,241,185,157,143,135,255,192,96,48,24,12,6,3,1,3,6,12,24,48,96,192,128,255,127,56,124,254,254,124,56,255,254,28,62,127,127,62,28,7,12,12,7,129,223,113,51
90 DATA  0,1,0,0,7,15,13,13,240,8,240,96,254,255,251,251,13,1,1,3,6,12,12,60,249,248,152,12,12,12,12,60
100 DATA 60,12,12,12,12,152,248,249,60,12,12,6,3,1,1,13,251,251,255,254,96,240,8,240,13,13,15,7,0,0,1,0,3,0,14,3,6,247,159,247,199,227,115,59,31,255,255,254,
110 WIDTH 90:PRINT CHR$(27)+"0":GOSUB 1510
120 rev$=CHR$(27)+"p":rof$=CHR$(27)+"q"
130 sd$=rev$+CHR$(27)+"r  "+CHR$(27)+"u"+rof$:con$=CHR$(27)+"e"
140 man$(1)=CHR$(207)+CHR$(208)+CHR$(8)+CHR$(8)+CHR$(10)+CHR$(209)+CHR$(210)
150 liftman$=man$(1)+" "+STRING$(3,8)+CHR$(10)+CHR$(200)+CHR$(201)+CHR$(200)
160 downman$=CHR$(212)+CHR$(211)+CHR$(8)+CHR$(8)+CHR$(10)+CHR$(214)+CHR$(213)
170 crump$="  "+CHR$(8)+CHR$(8)+CHR$(10)+CHR$(215)+CHR$(216)
180 CART$(1)=" "+CHR$(202)+CHR$(27)+"p"+CHR$(27)+"r  "+CHR$(27)+"q"+CHR$(27)+"u"+CHR$(203)+STRING$(4,8)+CHR$(10)+" "+CHR$(204)+CHR$(205)+" "
190 CART$(2)=" "+CHR$(202)+"  "+CHR$(203)+STRING$(4,8)+CHR$(10)+" "+CHR$(204)+CHR$(205)+" "
200 train$(1)=CHR$(202)+"  "+CHR$(203)+CHR$(202)+"  "+CHR$(203)+CHR$(202)+"  "+CHR$(203)+CHR$(202)+sd$+CHR$(203)+CHR$(202)+sd$+CHR$(203)+CHR$(202)+sd$+CHR$(203)
210 train$(2)=" "+CHR$(204)+CHR$(205)+"  "+CHR$(204)+CHR$(205)+"  "+CHR$(204)+CHR$(205)+"  "+CHR$(204)+CHR$(205)+"  "+CHR$(204)+CHR$(205)+"  "+CHR$(204)+CHR$(205)+"  "
220 blank$="  "+CHR$(8)+CHR$(8)+CHR$(10)+"  "
230 PRINT CHR$(27)+"f"
240 FOR i=1 TO 4:GIRD$= GIRD$+CHR$(200)+CHR$(201):NEXT i
250 FOR i=1 TO 3:Hop$=Hop$+CHR$(149)+"  "+CHR$(149)+STRING$(4,8)+CHR$(10):NEXT i
260 Hop$=Hop$+CHR$(147)+CHR$(154)+CHR$(154)+CHR$(153)
270 DEF FNat$(x,y)=CHR$(27)+"Y"+CHR$(32+x)+CHR$(32+y)
280 c$=CHR$(27)+"E":PRINT c$
290 RANDOMIZE(PEEK(64504!))
300 sand$="  "+CHR$(8)+CHR$(8)+CHR$(10)+rev$+CHR$(27)+"r  "+rof$+CHR$(27)+"u"
310 GOSUB 1240:GOSUB 1350
320 LX(1)=21:LX(2)=13:LX(3)=5:LX(4)=13:MX=7:MY=23:cc=1:ccc=1:c=1:c1=1:ccy=40:sz(1)=0:sz(2)=0
330 PRINT FNat$(MX,MY)Man$(1)
335 PRINT FNat$(4,38)GIRD$ FNat$(23,38)REV$"       "rof$
340 IF ML<>0 THEN GOTO 420 ELSE X$=INKEY$:IF X$="" THEN cnt=cnt+1
350 IF X$=CHR$(27) THEN MEMORY hi!:END
360 IF X$=" " THEN cnt=1:GOSUB 790  
370 IF X$=CHR$(1) AND MY>23 THEN cnt=1:GOSUB 610
380 IF X$=CHR$(6) AND MY<60 THEN cnt=1:GOSUB 630
390 ON cnt GOSUB 650,1020,650,1130,1080,650,1180
400 IF cnt=7 THEN cnt=0
410 GOTO 340
420 IF (ml=1 AND LX(1)<6) OR (ml=2 AND LX(2)<6) THEN mx=lx(ml)-2:my=42:ml=0:GOTO  1370
430 IF (ml=3 AND LX(3)>20) OR (ml=4 AND LX(4)>20) THEN mx=(lx(ml)-2):my=39:ml=0:GOTO 1370
440 ON ml GOTO 450,490,530,570
450 X$=INKEY$:IF X$="" THEN cnt=cnt+1:GOTO 390
460 IF X$=CHR$(6) THEN IF lx(1)=9 OR lx(1)=14 THEN MX=(LX(1)-2):MY=45:PRINT FNat$(MX,MY)man$(1):ml=0:PRINT FNat$(LX(1)-2,42)blank$:GOTO 340
470 IF X$=CHR$(1) THEN IF lx(3)=lx(1) THEN ml=3 :PRINT FNat$(lx(1)-2,42)blank$ ELSE IF lx(4)=lx(1) THEN ml=4:PRINT FNat$(lx(1)-2,42)Blank$:GOTO 390
480 GOTO 340
490 X$=INKEY$:IF X$="" THEN cnt=cnt+1:GOTO 390
500 IF X$=CHR$(6) THEN IF lx(2)=9 OR lx(2)=14 THEN MX=(LX(2)-2):MY=45:PRINT FNat$(MX,MY)man$(1):PRINT FNat$(LX(2)-2,42)blank$:ml=0:GOTO 340
510 IF X$=CHR$(1) THEN IF lx(3)=lx(2) THEN ml=3 :PRINT FNat$(lx(2)-2,42)blank$ ELSE IF lx(4)=lx(2) THEN ml=4:PRINT FNat$(lx(2)-2,42)blank$:GOTO 390
520 GOTO 340
530 X$=INKEY$:IF X$="" THEN cnt=cnt+1:GOTO 390
540 IF X$=CHR$(1) THEN IF lx(3)=10 OR lx(3)=15 OR LX(3)=20 THEN MX=(LX(3)-3):MY=37:PRINT FNat$(MX,MY)man$(1):ml=0:PRINT FNat$(LX(3)-3,39)blank$:LX(3)=LX(3)-1:GOTO 340
550 IF X$=CHR$(6) THEN IF lx(1)=lx(3)-2 THEN ml=1:LX(3)=LX(3)-1:LX(1)=LX(1)+1:PRINT FNat$(lx(3)-2,39)blank$ ELSE IF lx(2)=lx(3)-2 THEN ml=2:PRINT FNat$(lx(3)-3,39)blank$:LX(3)=LX(3)-1:LX(2)=LX(2)+1:GOTO 390
560 GOTO 340
570 X$=INKEY$:IF X$="" THEN cnt=cnt+1:GOTO 390
580 IF X$=CHR$(1) THEN IF lx(4)=10 OR lx(4)=15 OR lx(4)=20 THEN MX=(LX(4)-3):MY=37:PRINT FNat$(MX,MY)man$(1):ml=0:PRINT FNat$(LX(4)-3,39)blank$:LX(4)=LX(4)-1:GOTO 340
590 IF X$=CHR$(6) THEN IF lx(1)=lx(4)-3 THEN ml=1:LX(4)=LX(4)-1:LX(1)=LX(1)+1:PRINT FNat$(lx(4)-2,39)blank$ ELSE IF lx(2)=lx(4)-3 THEN ml=2:PRINT FNat$(lx(4)-3,39)blank$:LX(4)=LX(4)-1:LX(2)=LX(2)+1:GOTO 390
600 GOTO 340
610 IF my=45 THEN IF lx(1)=(mx+1) THEN ML=1 ELSE IF lx(2)=mx+1 THEN ML=2 ELSE IF MY=45 THEN GOTO 1370
620 LX(ml)=LX(ml)+1:MY1=MY:MY=MY-2:PRINT FNat$(MX,MY)MAN$(1) FNat$(MX,MY1)blank$:RETURN
630 IF my=37 THEN IF lx(4)=(mx+2) THEN ML=4 ELSE IF lx(3)=(mx+2) THEN ML=3 ELSE IF MY=37 THEN GOTO 1370
640 MY1=MY:MY=MY+2:PRINT FNat$(MX,MY)MAN$(1) FNat$(MX,MY1)blank$:RETURN
660 PRINT FNat$(2,cy)cart$(c):cy=cy+1
670 PRINT FNat$(2,ccy)Cart$(c1):ccy=ccy+1
680 IF cy=20 AND (c=1 AND cc=1)  THEN c=2:h=1:GOSUB 940
690 IF ccy=20 AND (c1=1 AND ccc=1) THEN c1=2 :h=1:GOSUB 960
700 IF cy=64 AND (c=1 AND cc=2) THEN c=2 :h=2:GOSUB 950
710 IF ccy=64 AND (c1=1 AND ccc=2) THEN c1=2 :h=2:GOSUB 970
720 IF cy=82 AND cc=1 THEN PRINT FNAT$(2,cy)"    "+STRING$(3,8)+CHR$(10)+"  ":cy=2:c=1:cc=2
730 IF cy=82 AND cc=2 THEN PRINT FNAT$(2,cy)"    "+STRING$(3,8)+CHR$(10)+"  ":cy=2:c=1:cc=1
740 IF ccy=82 AND ccc=1 THEN PRINT FNAT$(2,ccy)"    "+STRING$(3,8)+CHR$(10)+"  ":ccy=2:c1=1:ccc=2
750 IF ccy=82 AND ccc=2 THEN PRINT FNAT$(2,ccy)"    "+STRING$(3,8)+CHR$(10)+"  ":ccy=2:c1=1:ccc=1
760 IF sz(1)=-3 THEN PRINT FNat$(6,23)"WARNING" ELSE PRINT FNat$(6,23)"        "
770 IF sz(2)=-3 THEN PRINT FNat$(6,56)"WARNING" ELSE PRINT FNat$(6,56)"       "
800 h=0:IF MX=7 AND MY=23 THEN h=1 
810 IF MX=12 AND MY=23 THEN h=3 
820 IF MX=7 AND MY=61 THEN h=2
830 IF MX=12 AND MY=61 THEN h=4 
850 ON h GOTO 860,880,900,920
860 IF sz(1)=0 THEN GOTO 330 ELSE sz(1)=sz(1)+1:PRINT FNat$((8+sz(1)),20)"  "
870 IF sz(3)=-3 THEN GOSUB 1000 ELSE FOR sx=9 TO (12+sz(3)):PRINT FNat$(sx,20)sand$:NEXT sx:sz(3)=sz(3)-1:SCORE=SCORE+1:PRINT FNat$(0,42)rev$"SCORE: "SCORE rof$ CHR$(7):GOTO 330
880 IF sz(2)=0 THEN GOTO 330 ELSE sz(2)=sz(2)+1:PRINT FNat$((8+sz(2)),64)"  "
890 IF sz(4)=-3 THEN GOSUB 1010 ELSE FOR sx=9 TO (12+sz(4)):PRINT FNat$(sx,64)sand$:NEXT sx:sz(4)=sz(4)-1:SCORE=SCORE+1:PRINT FNat$(0,42)rev$"SCORE: "SCORE rof$ CHR$(7):GOTO 330
900 IF sz(3)=0 THEN GOTO 330 ELSE sz(3)=sz(3)+1:PRINT FNat$((13+sz(3)),20)"  "
910 FOR sx=14 TO 20:PRINT FNat$(sx,20)sand$:NEXT sx:FOR i=1 TO 5:SCORE=SCORE+1:PRINT FNat$(0,42)rev$"SCORE: "SCORE rof$ CHR$(7):NEXT:GOSUB 1420:GOTO 330
920 IF sz(4)=0 THEN GOTO 330 ELSE sz(4)=sz(4)+1:PRINT FNat$((13+sz(4)),64)"  "
930 FOR sx=14 TO 20:PRINT FNat$(sx,64)sand$:NEXT sx:FOR i=1 TO 5:SCORE=SCORE+1:PRINT FNat$(0,42)rev$"SCORE: "SCORE rof$ CHR$(7):NEXT:GOSUB 1430:GOTO 330   
940 IF sz(1)=-3 THEN GOSUB 980 ELSE FOR sx=4 TO (7+sz(1)):PRINT FNat$(sx,cy)sand$:NEXT sx:sz(1)=sz(1)-1:RETURN
950 IF sz(2)=-3 THEN GOSUB 980 ELSE FOR sx=4 TO (7+sz(2)):PRINT FNat$(sx,cy)sand$:NEXT sx:sz(2)=sz(2)-1:RETURN
960 IF sz(1)=-3 THEN GOSUB 980 ELSE FOR sx=4 TO (7+sz(1)):PRINT FNat$(sx,ccy)sand$:NEXT sx:sz(1)=sz(1)-1:RETURN
970 IF sz(2)=-3 THEN GOSUB 980 ELSE FOR sx=4 TO (7+sz(2)):PRINT FNat$(sx,ccy)sand$:NEXT sx:sz(2)=sz(2)-1:RETURN
980 FOR sx=4 TO 22:PRINT FNat$(sx,(cy-2))CHR$(7)+"      "+STRING$(6,8)+CHR$(10)+rev$+"      "+rof$:NEXT sx
990 PRINT STRING$(5,7):LIVES=1:GOTO 1370
1000 FOR sx=11 TO 22:PRINT FNat$(sx,18)CHR$(7)+"      "+STRING$(6,8)+CHR$(10)+rev$+"      "+rof$:NEXT sx:GOTO 990
1010 FOR sx=11 TO 22:PRINT FNat$(sx,62)CHR$(7)+"      "+STRING$(6,8)+CHR$(10)+rev$+"      "+rof$:NEXT sx:GOTO 990
1030 IF ml=1 AND lx(1)<>3 THEN PRINT FNat$(LX(1)-3,42)liftman$+STRING$(3,8)+CHR$(10)+"   ":GOTO 1050
1040 IF LX(1)=3 THEN GOTO 1070 ELSE PRINT FNat$(LX(1),42)CHR$(200)+CHR$(201)+CHR$(200)+STRING$(3,8)+CHR$(10)+"   "
1050 IF LX(1)>4 THEN LX(1)=LX(1)-1 
1060 IF LX(1)=4 THEN PRINT FNat$(5,42)"   ":LX(1)=MIN((LX(2)+8),22)
1080 IF ml=3 AND lx(3)<23 THEN PRINT FNat$(LX(3)-3,39)"   "+STRING$(3,8)+CHR$(10)+liftman$:GOTO 1100
1090 IF LX(3)=23 THEN GOTO 1120 ELSE PRINT FNAT$(LX(3),39)"   "+STRING$(3,8)+CHR$(10)+CHR$(200)+CHR$(201)+CHR$(200)
1100 IF LX(3)<23 THEN LX(3)=LX(3)+1 
1110 IF LX(3)=22 THEN PRINT FNat$(LX(3),39)"   ":LX(3)=(LX(4)-8)
1130 IF ml=2 AND lx(2)<>3 THEN PRINT FNat$(LX(2)-3,42)liftman$+STRING$(3,8)+CHR$(10)+"   ":GOTO 1150 
1140 IF LX(2)=3 THEN GOTO 1170 ELSE PRINT FNat$(LX(2),42)CHR$(200)+CHR$(201)+CHR$(200)+STRING$(3,8)+CHR$(10)+"   "
1150 IF LX(2)>4 THEN LX(2)=LX(2)-1
1160 IF LX(2)=4 THEN PRINT FNat$(5,42)"   " :LX(2)=MIN((LX(1)+8),22)
1180 IF ml=4 AND lx(4)<22 THEN PRINT FNat$(LX(4)-3,39)"   "+STRING$(3,8)+CHR$(10)+liftman$:GOTO 1200
1190 IF LX(4)=23 THEN GOTO 1220 ELSE PRINT FNAT$(LX(4),39)"   "+STRING$(3,8)+CHR$(10)+CHR$(200)+CHR$(201)+CHR$(200)
1200 IF LX(4)<22 THEN LX(4)=LX(4)+1
1210 IF LX(4)=22 THEN PRINT FNat$(LX(4),39)"   ":LX(4)=(LX(3)-8)
1240 PRINT FNat$(4,3)GIRD$+GIRD$+"    "+GIRD$+GIRD$+GIRD$+GIRD$+GIRD$+"    "+GIRD$+GIRD$
1250 PRINT FNat$(6,19)hop$ FNat$(6,63)hop$ FNat$(11,19)hop$ FNat$(11,63)hop$
1260 j=201:FOR y=3 TO 82 STEP 79:FOR x=4 TO 22:j=1-j:PRINT FNat$(x,y)CHR$(ABS(j)):NEXT x:NEXT y
1270 PRINT FNat$(9,23)GIRD$+GIRD$+"      "+GIRD$+GIRD$+CHR$(200)+CHR$(201)
1280 PRINT FNat$(14,23)GIRD$+GIRD$+"      "+GIRD$+GIRD$+CHR$(200)+CHR$(201):PRINT FNat$(19,23)GIRD$+GIRD$
1290 j=201:FOR x=15 TO 19:j=1-j:PRINT FNat$(x,23)CHR$(ABS(j)):NEXT x
1300 j=201:FOR x=19 TO 22:j=1-j:PRINT FNat$(x,38)CHR$(ABS(j)):NEXT x
1310 j=201:FOR x=15 TO 22:j=1-j:PRINT FNat$(x,45)CHR$(ABS(j)):NEXT x
1320 PRINT FNat$(22,1)rev$ SPACE$(88) Rof$
1330 PRINT FNat$(21,11)train$(1) FNat$(22,11)TRain$(2):PRINT  FNat$(21,55)train$(1)FNat$(22,55)train$(2)     
1331 FOR y=0 TO 64 STEP 8:t=1:FOR x=1 TO 2:t=1-t:PRINT FNat$(24+x,y)train$(t+1):NEXT:NEXT
1332 FOR y=0 TO 80 STEP 8:t=1:FOR x=3 TO 4:PRINT FNat$(24+x,y)gird$:NEXT:NEXT
1333 PRINT FNat$(27,18)rev$" M A R I O ' S  C E M E N T  F A C T O R Y "rof$
1335 FOR y=0 TO 64 STEP 8:t=1:FOR x=1 TO 2:t=1-t:PRINT FNat$(28+x,y)train$(t+1):NEXT:NEXT
1350 PRINT FNat$(0,0)"LIVES:":FOR i= 2 TO 6:PRINT FNat$(0,(i*3))man$(1):NEXT i:RETURN
1360 IF LIVES<>5 THEN FOR i=2 TO (6-LIVES):PRINT FNat$(0,24-(i*3))crump$:NEXT i:RETURN ELSE RETURN
1370 PRINT FNat$(mx,my)"  "+CHR$(8)+CHR$(8)+CHR$(10)+"  ":my=41:FOR mx=mx TO 21:FOR i=1 TO 20:NEXT i:PRINT FNat$(mx,my)CHR$(7)+downman$ FNat$((mx-1),my)"  ":NEXT mx
1375 PRINT FNat$(4,38) GIRD$ FNat$(23,38)REV$"        "rof$
1380 PRINT FNat$(mx-1,my)crump$:lives=lives-1:MX=7:MY=23:GOSUB 1360:GOSUB 1570:IF LIVES=0 THEN GOTO 1390 ELSE GOTO 330
1400 PRINT FNat$(23,25)rev$"     DO YOU WANT ANOTHER GO?     "rof$:x$=INKEY$:IF x$="" THEN GOTO 1390 
1420 ok=FRE(""):FOR ty=1 TO 4:FOR i=1 TO 80:NEXT i:PRINT FNat$(21,7)SPACE$(ty)+train$(1) FNat$(22,7)SPACE$(ty)+train$(2):NEXT ty:RETURN
1430 ok=FRE(""):FOR ty=1 TO 4:FOR i=1 TO 80:NEXT i:PRINT FNat$(21,51)SPACE$(ty)+train$(1) FNat$(22,51)SPACE$(ty)+train$(2):NEXT ty:RETURN
1440 REM "Music"
1450 DATA 229,213,197,221,229,42,27,192,237,91,25,192,205,29,192,62
1460 DATA 12,211,248,221,225,193,209,225,201,0,0,0,0,243,125,203
1470 DATA 61,203,61,47,230,3,79,6,0,221,33,49,192,221,9,62
1480 DATA 11,0,0,0,4,12,13,32,253,14,63,5,32,248,60,254
1490 DATA 13,32,2,61,61,211,248,68,79,254,11,32,9,122,179,40
1500 DATA 9,121,77,27,221,233,77,12,221,233,251,201
1510 RESTORE 1450:FOR nn=&HC000 TO &HC05B:READ dd:POKE nn,dd:NEXT
1520 AZ=&HC000:BZ=&HC019:CZ=&HC01B
1540 DATA 189.8765,210,234.4015,254.612,284,318,351,372,1740,6000
1550 time$="22224648"
1560 note$="77445467":RETURN
1570 FOR i=1 TO LEN(time$):dd=VAL(MID$(time$,i,1)):ff=VAL(MID$(note$,i,1))
1580 f2=E(FF):tt=3500000!/(f2*2):tt=INT(tt/4-30.125)
1600 f2=INT(f2*(dd/12))
1610 POKE BZ,f2-256*INT(f2/256):POKE BZ+1,INT(f2/256)
1620 POKE CZ,tt-256*INT(tt/256):POKE CZ+1,INT(tt/256):CALL AZ


       ↑ = UP
       ↓ = DOWN
       → = RIGHT
       ← = LEFT

Loading the program

 1.- Insert the CP/M disc on side 2
 2.- Write BASIC and wait for it to load
 3.- Remove the CP/M disk and insert the disk containing the game Mario's Cement Factory
 4.- Type run "Mario" and press the "ENTER" key


en/mario_s_cement_factory.txt · Last modified: 2022/06/30 12:16 by jevicac