Classic Computer Magazine Archive COMPUTE! ISSUE 57 / FEBRUARY 1985 / PAGE 123

IBM Rebound
All Machine Language Game For PC & PCjr

Chris Metcalf and Marc Suglyama

Here's a fast, smooth, all machine language adaptation of a classic arcade game. With the modifications included below, it runs on any IBM PC (color/ graphics or monochrome adapter) with at least 64K RAM and a disk drive, and any Enhanced Model PCjr.



"Rebound" takes advantage of machine language to streamline the action in this arcade-style game patterned after the popular Breakout. By controlling a paddle at the bottom of the screen, your goal is to knock out all the bricks at the top of the screen with a bouncing ball.
    Unlike most action games, Rebound works on all three popular types of IBM Personal Computers. Program 1 is for an IBM PC with the color/graphics adapter. Program 2 consists of modifications to make Program 1 work on an IBM PC with the monochrome adapter. And although Program 1 works as is on an IBM PCjr, the modifications contained in Program 3 accelerate the game to compensate for junior's slower execution speed.

Typing Instructions
If you have a color/graphics PC, type in Program 1. If you have a monochrome PC, type in Program 1 and substitute the lines in Program 2. If you have a PCjr, type in Program 1 and substitute the lines in Program 3. To be safe, save the program on disk before running it for the first time.
    Next, insert a disk in drive A and type RUN. The BASIC program will create a machine language file on disk with the filename REBOUND.EXE (the drive may whir on and off a few times as the file is created).
    When the Ok prompt reappears, exit BASIC to DOS by typing SYSTEM. Make sure the disk with the REBOUND.EXE file is in drive A. To run Rebound, type REBOUND.EXE at the DOS prompt. Almost instantly, the game screen will appear.

Eight Chances For Glory
To start playing Rebound, press the Enter key. The first ball starts moving downward from the middle of the screen. Your job is to keep it from falling off the bottom of the screen by bouncing it upward toward the rows of bricks.
    To bounce the ball, move the paddle back and forth with the left and right Shift keys. You'll have to anticipate where the ball will bounce next, because the paddle can't always move across the screen as fast as the ball can (otherwise the game would be too easy). If you miss a ball, another one starts falling. You get a total of eight balls before the game ends in defeat. If you succeed in knocking out all the bricks, the program resets for another game.
    There are five rows of bricks. Bricks on the lowest row are worth one point each, bricks on the second-lowest row are worth two points, etc.
    You can freeze Rebound at any time by pressing the space bar. Press any other key to resume play.

screen shot
"Rebound" is a fast arcade-style game that works on
nearly all IBM Personal Computers.


    The Esc key restarts a game in progress by replacing all missing bricks and lost balls. It also resets the score to zero.
    To stop the game entirely and exit to DOS, press Ctrl-Break on the PC or Function-Break (Fn-B) on the PCjr.


Refer to "COMPUTE!'s Guide To Typing In Programs" article before typing these programs in.

Program l : Rebound For IBM PC
(Color/Graphics)

EL 10 ON ERROR GOTO 70
FB 20 OPEN "o",1,"rebound.exe"
CH 30 READ A : IF A<0 THEN 50
NE 40 PRINT #1,CHR$(A); : GOTO 30
EP 50 FOR I=1 TO -1*A : PRINT #1,CHR$(
      0); : NEXT
HJ 60 GOTO 30
OK 70 IF ERR <> 4 THEN ON ERROR GOTO 0
CB 80 CLOSE 1 : END
BF 100 DATA 77,90,32,1,4,0,1,0
KH 110 DATA 32,-3,255,255,74,0,128,0
ID 120 DATA 208,144,-4,32,-3,205,11,-2
PK 130 DATA 6,-479,30,184,-2,80,184,59
OK 140 DATA 0,142,216,142,192,176,3,18
       0
ON 150 DATA 0,205,16,185,-2,182,24,178
OC 160 DATA 79,176,0,183,7,180,6,205
FP 170 DATA 16,181,32,180,1,205,16,182
FD 180 DATA 3,178,3,183,0,232,107,3
DO 190 DATA 176,218,179,15,232,107,3,1
       78
BC 200 DATA 4,232,95,3,176,196,185,72
NE 210 DATA 0,232,97,3,178,76,232,82
LH 220 DATA 3,176,191,232,84,3,182,4
NA 230 DATA 178,3,232,70,3,176,179,232
F1 240 DATA 72,3,178,76,232,60,3,176
NN 250 DATA 179,232,62,3,254,198,128,2
       54
CG 260 DATA 24,114,229,178,4,182,1,190
DO 270 DATA 199,0,232,223,2,198,6,45
OD 280 DATA 0,56,191,3,0,198,133,94
OL 290 DATA 0,48,79,117,248,190,26,0
BP 300 DATA 232,179,2,198,6,10,0,92
EH 310 DATA 198,6,6,0,128,198,6,8
NH 320 DATA -2,191,5,0,182,5,178,4
JF 330 DATA 183,0,190,182,0,247,199,1
AF 340 DATA 0,117,3,190,189,0,185,9
OM 350 DATA 0,232,159,2,226,251,232,11
       3
OJ 360 DATA 2,79,117,224,128,62,11,-2
BL 370 DATA 117,18,198,6,11,0,1,232
NN 380 DATA 166,2,128,62,12,0,1,117
OB 390 DATA 3,233,106,1,254,14,45,0
81 400 DATA 128,62,45,0,48,115,3,233
FJ 410 DATA 145,1,190,26,0,232,84,2
OP 420 DATA 182,24,178,0,190,225,0,232
HB 430 DATA 96,2,198,6,9,0,35,180
OC 440 DATA 0,205,26,139,194,37,255,15
GB 450 DATA 178,20,246,242,128,196,4,2
       46
00 460 DATA 196,1,116,3,128,196,52,138
IL 470 DATA 212,182,11,137,22,-2,198,6
DO 480 DATA 4,0,2,128,252,39,119,5
ON 490 DATA 198,6,4,0,3,180,2,205
OH 500 DATA 2 ,36,3,116,25,60,3,116
IF 510 DATA 21,60,1,116,2,176,255,2
NH 520 DATA 6,9,0,60,2,124,7,60
BG 530 DATA 68,127,3,162,9,0,232,46
IC 540 DATA 1,160,6,0,44,127,177,10
JL 550 DATA 246,225,247,216,5,160,15,1
       39
KC 560 DATA 200,226,254,160,5,0,2,6
JP 570 DATA 6,0,162,5,0,114,3,233
QM 580 DATA 173,0,-139,22,-2,160,4,0
F1 590 DATA 36,1,208,224,44,1,2,208
QK 600 DATA 160,4,0,36,2,44,1,128
CB 610 DATA 54,7,0,1,117,2,176,0
PC 620 DATA 2,240,128,254,24,119,39,18
       3
CB 630 DATA 0,232,3,2,180,8,205,16
FB 640 DATA 60,32,116,88,191,13,0,185
EX 650 DATA 4,0,252,242,174,117,41,232
AH 660 DATA 247,0,128,54,4,0,2,198
CP 670 DATA 6,7,-2,235,179,139,22,2
PH 680 DATA 0,232,213,0,139,22,-2,232
Kl 690 DATA 206,0,232,175,0,180,14,176
EK 700 DATA 7,205,16,233,2,255,191,17
LH 710 DATA 0,185,3,0,242,174,117,5
BC 720 DATA 128,54,4,0,1,191,20,0
KA 730 DATA 185,6,0,242,174,116,3,233
JF 740 DATA 125,255,128,54,4,0,2,233
BA 750 DATA 117,255,128,54,8,0,1,117
JN 760 DATA 19,82,139,22,2,0,232,143
GK 770 DATA 0,90,232,124,0,137,22,-2
LH 780 DATA 235,9,144,135,22,-2,137,22
HO 790 DATA 2,0,180,1,205,22,116,39
NC 800 DATA 180,0,205,22,128,252,1,117
AC 810 DATA 8,198,6,11,-2,233,219,253
CA 820 DATA 60,32,117,7,180,0,205,22
KG 830 DATA 235,12,144,10,196,117,7,17
       6
GG 840 DATA 3,180,0,205,16,203,128,62
C1 850 DATA 10,-2,116,3,233,215,254,19
       0
PC 860 DATA 99,0,232,231,0,139,22,2
OD 870 DATA 0,232,56,0,139,22,-2,232
MF 880 DATA 49,0,232,18,0,232,7,1
NP 890 DATA 128,62,12,0,1,116,206,233
KG 900 DATA 151,253,190,128,0,235,218,
       182
GM 910 DATA 24,138,22,9,0,190,209,0
GF 920 DATA 232,206,0,195,82,183,0,232
FN 930 DATA 14,1,176,9,179,3,232,14
HN 940 DATA 1,90,195,82,183,0,232,255
JE 950 DATA 0,176,32,179,7,232,255,0
DO 960 DATA 90,195,254,14,10,0,83, 81
LE 970 DATA 82,86,138,254,128,238,6,12
       8
QM 980 DATA 230,1,208,230,128,234,4,42
ME 990 DATA 214,128,226,252,2,214,185,
       4
OP 1000 DATA 0,121,5,178,0,185,2,0
PE 1010 DATA 128,194,4,138,247,128,250
        ,74
ED 1020 DATA 114,3,185,2,0,183,0,232
BE 1030 DATA 190,0,176,32,179,7,232,19
        3
AF 1040 DATA 0,133,11,42,254,2,62,97
GO 1050 DATA 0,136,62,97,0,183,58,190
FK 1060 DATA 2,0,58,188,95,0,119,18
OF 1070 DATA 138,156,95,0,128,235,10,1
        36
ON 1080 DATA 156,95,0,254,132,94,0,78
GM 1090 DATA 117,232,190,26,0,232,43,0
DH 1100 DATA 128,238,6,177,5,210,230,2
        46
CP 1110 DATA 214,58,54,6,0,114,4,136
HA 1120 DATA 54,6,0,94,90,89,91,195
AC 1130 DATA 82,176,1,181,5,177,4,182
PL 1140 DATA 23,178,75,183,7,180,7,205
JH 1150 DATA 16,90,195,83,173,139,208,
        183
GL 1160 DATA 0,232,84,0,172,60,0,116
NJ 1170 DATA 6,180,14,205,16,235,245,9
        1
CN 1180 DATA 195,81,86,183,0,232,64,0
ON 1190 DATA 112,60,0,116,15,138,200,1
        81
NO 1200 DATA 0,172,138,216,172,232,58,
        0
DB 1210 DATA 2,209,235,233,94,89,195,2
        32
DA 1220 DATA 19,0,190,161,0,232,195,25
        5
IB 1230 DATA 180,0,205,22,10,196,116,1
        8
Fl 1240 DATA 128,252,28,117,243,139,22
        ,161
CA 1250 DATA 0,178,4,190,229,0,232,192
LJ 1260 DATA 255,195,198,6,12,0,1,195
PD 1270 DATA 80,180,2,205,16,88,195,18
        5
GO 1280 DATA 1,0,180,9,205,16,195,-19
EH 1290 DATA 219,219,219,219,179,218,1
        91,196
BP 1300 DATA 205,218,191,213,184,4,1,6
        6
PO 1310 DATA 97,108,108,115,32,114,101
        ,109
PF 1320 DATA 97,105,110,105,110,103,58
        ,32
JN 1330 DATA 0,32,32,32,32,32,32,32
NI 1340 DATA 32,32,32,32,32,82,32,69
BE 1350 DATA 32,66,32,79,32,85,32,78
JJ 1360 DATA 32,68,32,32,32,32,32,32
BI 1370 DATA 32,32,32,32,32,32,32,32
PF 1380 DATA 32,32,32,83,99,111,114,10
        1
NL 1390 DATA 58,32,-4,27,2,67,111,110
EM 1400 DATA 103,114,97,116,117,108,97
        ,116
HE 1410 DATA 105,111,110,115,33,32,32,
        89
LJ 1420 DATA 111,117,32,119,105,110,33
        ,0
ED 1430 DATA 25,2,84,114,105,117,109,1
        12
PA 1440 DATA 104,33,32„32,78,111,116,1
        04
NJ 1450 DATA 105,110,103,32,99,97,110,
        32
LF 1460 DATA 115,116,111,112,32,109,10
        1,33
GJ 1470 DATA 0,31,16,72,105,116,32,69
FD 1480 DATA 110,116,101,114,32,116,11
        1,32
CO 1490 DATA 66,101,103,105,110,0,4,1
HN 1500 DATA 219,4,2,219,0,2,4,219
OC 1510 DATA 4,6,219,2,4,219,0,20
DJ 1520 DATA 12,32,24,15,32,26,12,32
OA 1530 DATA 0,1,9,32,1,9,213,6
AD 1540 DATA 9,205,1,9,184,1,9,32
BE 1550 DATA 0,79,9,32,0,72,7,32
NO
1560 DATA -8,83,84,65,67,75,32,32
NL 1570 DATA 32,83,84,65,67,75,32,32
NO 1580 DATA 32,83,84,65,67,75,32,32
NB 1590 DATA 32,83,84,65,67,75,32,32
MI 1600 DATA 32,83,84,65,67,75,32,32
NL 1610 DATA 32,83,84,65,67,75,32,32
NO 1620 DATA 32,83,84,65,67,75,32,32
N6 1630 DATA 32,83,84,65,67,75,32,32
ME 1640 DATA 32,83,84,65,67,75,32,32
MH 1650 DATA 32,83,84,65,67,75,32,32
NK 1660 DATA 32,83,84,65,67,75,32,32
NM 1670 DATA 32,83,84,65,67,75,32,32
NA 1680 DATA 32,83,84,65,67,75,32,32
ND 1690 DATA 32,83,84,65,67,75,32,32
NK 1700 DATA 32,83,84,65,67,75,32,32
MM 1710 DATA 32,83,84,65,67,75,32,32
KG 1720 DATA 32


Program 2: Modifications For Monochrome
PC

ON 1290 DATA 176,177,178,219,179,218,1
        91,196
GC 1490 DATA 66,101,103,105,110,0,4,15
NO 1500 DATA 176,4,7,177,0,2,15,178
FE 1510 DATA 4,7,219,2,15,178,0,20
IG 1520 DATA 7,32,24,15,32,26,7,32
JG 1530 DATA 0,1,7,32,1,7,213,6
JB 1540 DATA 7,205,1,7,184,1,7,32
PE 1550 DATA 0,79,7,32,0,72,7,32


Program 3: Modifications For PCjr

CN 540 DATA 1,160,6,0,44,127,177,6
BP 550 DATA 246,225,247,216,5,206,9,13
       9