Money Hungry

16K Cassette or 24K Disk
by Donald P. Murphy


This month's assembly language game, Money Hungry, is a game of skill for one player.

Typing it in

Before typing anything, look at the listings accompanying this article.

Follow the instructions below to make either a cassette or disk version of Money Hungry.

Cassette instructions

  1. Type Listing 1 into your computer using the BASIC cartridge and verify your typing with C:CHECK (see page 47).
  2. Type RUN and press RETURN. The program will begin and ask:
    MAKE CASSETTE (0) OR DISK (1)?
    Type 0 and press RETURN. The program will begin checking the DATA statements, printing the line number of each as it goes. It will alert you if it finds any problems. Fix any incorrect lines and re-RUN the program, if necessary, until all errors are eliminated.
  3. When all your DATA lines are correct, the computer will beep twice and prompt you to "READY CASSETTE AND PRESS RETURN." Insert a blank cassette in your recorder, press the RECORD and PLAY buttons simultaneously and hit RETURN. The message "WRITING FILE" will appear, and the program will create a machine language boot tape version of Money Hungry, printing each DATA line number as it goes. When the READY prompt appears, the game is recorded and ready to play. CSAVE the BASIC program onto a separate tape before continuing.
  4. To play the game, rewind the tape created by the BASIC program to the beginning. Turn your computer OFF and remove all cartridges. Press the PLAY button on your recorder and turn ON your computer while holding down the START key. If you have a 600 or 800XL computer, you must hold the START and OPTION keys when you turn on the power. The computer will "beep" once. Hit the RETURN key and Money Hungry will load and run automatically.

Disk instructions

  1. Type Listing 1 into your computer, using the BASIC cartridge and verify your typing with D:CHECK2 (see page 43).
  2. Type RUN and press RETURN. The program will ask:
    MAKE CASSETTE (0) OR DISK (1)?
    Type 1 and press RETURN. The program will begin checking the DATA lines, printing the line number of each statement as it goes. It will alert you if it finds any problems. Fix incorrect lines and re-RUN the program, if necessary, until all errors are eliminated.
  3. When all DATA lines are correct, you will be prompted to "INSERT DISK WITH DOS, PRESS RETURN." Put a disk containing DOS 2.0S into drive #1 and press RETURN. The message "WRITING FILE" will appear, and the program will create an AUTORUN.SYS file on the disk, displaying each DATA line number as it goes. When the READY prompt appears, the game is ready to play. Be sure the BASIC program is SAVED before continuing.
  4. To play the game, insert the disk containing the AUTORUN.SYS file into drive #1. Turn your computer OFF, remove all cartridges and turn the computer back ON. Money Hungry will load and run automatically.
  5. Playing the game

    Money Hungry requires one joystick, plugged into port 1. The game is started by pressing START or the joystick button.

    In Money Hungry, you play the part of a thief trying to collect as much money as possible, while making every effort to avoid the police. You are placed in a maze, with coins scattered all around. You pick up the coins by moving over them. Once on every board, a money bag appears, containing a 100 coin bonus. Your score, in coins, is shown at the bottom of the screen.

    [Money Hungry screen shot]
    Money Hungry

    There are three police patrolling the maze, and if they catch you five times, the game is over. The number of tries you have remaining is shown at the lower left of the screen.

    You can block the police by placing doors in the maze. To do this, press the joystick button while moving through the maze. A red door will appear, and the police can't get through it. You have four such doors and can reopen them at any time simply by running over them. Once you pick up a door, you can reuse it by pressing the joystick button again.

    When you have picked up all of the coins in the maze, you will move to the next level. In each level, either you or the police will increase in speed. Good luck!

    Listing 1: BASIC Listing

    MNYHNGRY.LST is available in ATASCII format.

    10 REM *** MONEY HUNGRY ***
    20 TRAP 20:? "MAKE CASSETTE (0), OR DI
    SK (1)";:INPUT DSK:IF DSK>1 THEN 20
    30 TRAP 40000:DATA 0,1,2,3,4,5,6,7,8,9
    ,0,0,0,0,0,0,0,10,11,12,13,14,15
    40 DIM DAT$(91),HEX(22):FOR X=0 TO 22:
    READ N:HEX(X)=N:NEXT X:LINE=990:RESTOR
    E 1000:TRAP 120:? "CHECKING DATA"
    50 LINE=LINE+10:? "LINE:";LINE:READ DA
    T$:IF LEN(DAT$)<>90 THEN 220
    60 DATLIN=PEEK(183)+PEEK(184)*256:IF D
    ATLIN<>LINE THEN ? "LINE ";LINE;" MISS
    ING!":END
    70 FOR X=1 TO 89 STEP 2:D1=ASC(DAT$(X,
    X))-48:D2=ASC(DAT$(X+1,X+1))-48:BYTE=H
    EX(D1)*16+HEX(D2)
    80 IF PASS=2 THEN PUT #1,BYTE:NEXT X:R
    EAD CHKSUM:GOTO 50
    90 TOTAL=TOTAL+BYTE:IF TOTAL>999 THEN
    TOTAL=TOTAL-1000
    100 NEXT X:READ CHKSUM:IF TOTAL=CHKSUM
     THEN 50
    110 GOTO 220
    120 IF PEEK(195)<>6 THEN 220
    130 IF PASS=0 THEN 170
    140 IF  NOT DSK THEN 160
    150 PUT #1,224:PUT #1,2:PUT #1,225:PUT
     #1,2:PUT #1,68:PUT #1,33:CLOSE #1:END
    160 FOR X=1 TO 107:PUT #1,0:NEXT X:CLO
    SE #1:END
    170 IF  NOT DSK THEN 200
    180 ? "INSERT DISK WITH DOS, PRESS RET
    URN";:DIM IN$(1):INPUT IN$:OPEN #1,8,0
    ,"D:AUTORUN.SYS"
    190 PUT #1,255:PUT #1,255:PUT #1,158:P
    UT #1,32:PUT #1,10:PUT #1,44:GOTO 210
    200 ? "READY CASSETTE AND PRESS RETURN
    ";:OPEN #1,8,128,"C:":RESTORE 230:FOR
    X=1 TO 40:READ N:PUT #1,N:NEXT X
    210 ? :? "WRITING FILE":PASS=2:LINE=99
    0:RESTORE 1000:TRAP 120:GOTO 50
    220 ? "BAD DATA: LINE ";LINE:END
    230 DATA 0,24,118,32,157,32,169,0,141,
    47,2,169,60,141,2,211,169,0,141,231,2,
    133,14,169,56,141,232,2
    240 DATA 133,15,169,68,133,10,169,33,1
    33,11,24,96
    1000 DATA 7070707070707047B42070067007
    7070707006419E20000000002D2F2E25390028
    352E27323900000000000000,530
    1010 DATA 000000000000E2F9000000000000
    000000000000646F6E616C6400006D75727068
    79000000F0F2E5F3F300F3F4,992
    1020 DATA E1F2F400F4EF00E2E5E7E9EE7070
    7045003A050505050505050505050741042136
    147F362A7F1C3E00FA8A8ABA,191
    1030 DATA E6E6FFBAFF771C08143E1C1C3E00
    388888EAEA38EAEA38A7A1ADA5AFB6A5B2A200
    BDFD279D0038BDFD289D0039,996
    1040 DATA BDFE299D003ABDFE2A9D003BCAD0
    E5A9208D3102A99E8D3002A9228D2F02AD1FD0
    C906F005AD8402D0F4A9048D,276
    1050 DATA 3002A9218D3102A9388DF402A988
    8DC402A9FC8DC502A9368DC602A9008D6F028D
    08D2A9038D320220692220BB,838
    1060 DATA 22206B23200E238D1ED020712620
    F72220DA26A200AD0CD0F0034C0D278D0AD4AC
    0BD4B900188D12D0B900198D,901
    1070 DATA 13D0B9001A8D14D0B9001B8D15D0
    A5CDC96B90D44C9726C6B6F0034C4426A5B785
    B6A91E85B1A98085B0A91985,499
    1080 DATA B3A90085B2AABD05D02904F0138D
    1ED0B58CD589D0044901958CB5894901958986
    C1B5B9186901B4BEC8209525,948
    1090 DATA A6C1B58C2902F007A588F0074C51
    22A587D00BB58C9589AD0AD22903958CB589D0
    034CD525C901D0034CE825C9,323
    1100 DATA 02D0034CFB254C1D26A9008DDB3A
    8DDC3AA90085B0A93A85B1A006B1B0F00EC91E
    F00AC91FD00A88A90091B0C8,594
    1110 DATA A91191B0C8C8C02490E4A5B01869
    2885B0A5B1690085B1A006C93B90D1A5B0C990
    D0CBA90085CD85BCA905858F,831
    1120 DATA 60A91E85B1A90085B0A891B0C8D0
    FBE6B1A6B1E020D0F3A91885B1A90085B0A891
    B0C8D0FBE6B1A6B1E01CD0F3,101
    1130 DATA A92E8D2F02A9038D1DD0A91C8D07
    D460A906A223A091205CE4A9408D0FD4A907A2
    21A0F04C5CE4A98085B0A91E,311
    1140 DATA 85B1A90085B2A91985B3A017A208
    BD182191B0BD212191B2C8CA10F2E6B3A5B018
    698085B0A5B1690085B1C920,71
    1150 DATA 90DBA94385B98D01D0A98485BA8D
    02D0A9B385BB8D03D0A91785BE85BF85C0A903
    8589858BA901858A60A208A0,74
    1160 DATA 37BD2A2199001EBD3321990018C8
    CA10F0A97C85B88D00D0A93785BDA90B85CB85
    CC60A9008D01D28D03D2A6B8,363
    1170 DATA E8A4BDC8205C2420A624C681F003
    4C5924A5808581A5CC2903C903F007A584F007
    4CC723A583D004A5CC85CBAD,972
    1180 DATA 7802C90FF00285CCA5CBC90FD003
    4C5924C90AF008C906F004C90ED020A20AA4BD
    C018B0034C5924B9001E99FF,994
    1190 DATA 1DB9001899FF17C8CAD0F0C6BD4C
    5924C909F008C905F004C90DD023A5BDC95790
    034C59246909A8A20AB9FF1D,379
    1200 DATA 99001EB9FF1799001888CAD0F0E6
    BD4C5924C90BD012A6B8E044B0034C5924CA86
    B88E00D04C5924A6B8E0B390,36
    1210 DATA 034C5924E886B88E00D04C5FE486
    C584C69838E91085C3A90885C4A90085C2203E
    258583A5C285C62901D004A9,495
    1220 DATA 018583A5C538E93085C3A90485C4
    A90085C2203E258584A5C285C529034901F004
    A9018584A5C285C560A90085,754
    1230 DATA B485CAA5CB2901D00AA5CCC90BD0
    02C6C6E6C6A5C685C7A92885C8205E25E6C5A5
    C51865C985B4A5CA693A85B5,184
    1240 DATA A000B1B4C91ED011A9268D01D2A9
    148D00D2A900A891B4E68FC91FD017A9268D01
    D2A9148D00D2A900A891B4C6,713
    1250 DATA B491B4E6B4E68FC911F01CC91DD0
    2BA9A68D01D2A9DC8D00D2A26486BCC6B49891
    B4E6B491B4609891B4E6CDA2,739
    1260 DATA 0186BCA95F8D01D2A9B98D00D260
    A00838E5C40826C206C32A289005E5C44C5325
    65C488D0EDB00365C41826C2,31
    1270 DATA 60A90085C9A20846C790031865C8
    6A66C9CAD0F385CA60A005E001B00160B9BF3B
    C91B9009A91299BF3B8810F1,496
    1280 DATA 6018690199BF3BCAD0E060858898
    38E91085C3A90885C4A90085C2203E258587A5
    C22901D004A9018587A58838,718
    1290 DATA E93085C3A90485C4A90085C2203E
    258588A5C229034901F004A901858860B4B9C0
    B390034C4426C89895B99D01,890
    1300 DATA D04C4426B4B9C044B0034C442688
    9895B99D01D04C4426B4BEA20AC018B0034C44
    26B1B08891B0C8B1B28891B2,379
    1310 DATA C8C8CAD0F0A6C1D6BE4C4426A6C1
    B5BEC95790034C44266909A8A20A88B1B0C891
    B088B1B2C891B288CAD0F0A6,151
    1320 DATA C1F6BE4C4426A5B018698085B0A5
    B1690085B1E6B3A6C1E8E003B0034C0C22A6BC
    A90085BC207425AD8402D003,701
    1330 DATA 2050274C62E4A903858085B78581
    85B6A013A90099B83B88D0FAA9578DBA3BA000
    A91299BF3BC8C006D0F860A5,425
    1340 DATA B7C580F008C680D00CA9018580C6
    B7D004A90185B720C82620D22720692220BB22
    200E23206B2320F72220DA26,68
    1350 DATA 4CC121A906A2E4A05F205CE4A907
    A2E4A0624C5CE4A9268D2702A9ED8D2602A901
    A000A2044C5CE4A91C8DDB3A,245
    1360 DATA A91D8DDC3AA9278D2702A9048D26
    024CE426A9008DDB3A8DDC3A6020C826209127
    AEBA3BCAE052B0034C33278E,950
    1370 DATA BA3B20BB22206B23200E2320F722
    8D1ED04CC121A200BD3C219DBA3BE8E004D0F5
    A200BD40219DC63BE8E004D0,986
    1380 DATA F54C7021C68FD003E68F60A584F0
    17A5C52903D02DA9C08D02D2A9A38D03D2A000
    A91E91B460A5C62901D016A9,676
    1390 DATA C08D02D2A9A38D03D2C6B4A001A9
    1F91B48891B460E68F60A9A88D03D2A9648590
    A2FFA014A5908D02D2CAD0F8,151
    1400 DATA 88D0F5E690E690A014A590C9A0D0
    E9A9888D03D2A9328D02D2A2FFA0FFCAD0FD88
    D0FAA9008D02D28D03D260A9,240
    1410 DATA A88D01D2A9408591A2FFA014A591
    8D00D2CAD0F888D0F5C691C691A014A591D0EB
    A9008D00D28D01D260000000,363
    1420 DATA 0000000000555555AA5555555595
    9595AA55555555555555AA9595959595959595
    959595951515151515151515,466
    1430 DATA 959595AA95959595565656AA5656
    5656555555AA56565656565656AA5555555554
    545454545454545656565656,90
    1440 DATA 5656565555555555555555959595
    95555555555656565655555555555555959595
    959555555556565656560000,333
    1450 DATA 008000000000003C666E76663C00
    0018381818187E00003C660C18307E00007E0C
    180C663C00000C1C3C6C7E0C,345
    1460 DATA 00007E607C06663C00003C607C66
    663C00007E060C18303000003C663C66663C00
    003C663E060C3800220A2AA0,697
    1470 DATA A2A02A0A88A0280A2A0A28A0C0C0
    C0C0C0C0C0C0000000FF00000000003C666E6E
    603E0000183C66667E660000,516
    1480 DATA 7C667C66667C00003C666060663C
    0000786C66666C7800007E607C60607E00007E
    607C60606000003E60606E66,134
    1490 DATA 3E000066667E66666600007E1818
    18187E000006060606663C0000666C78786C66
    000060606060607E00006377,850
    1500 DATA 7F6B6363000066767E7E6E660000
    3C666666663C00007C66667C606000003C6666
    666C3600007C66667C6C6600,328
    1510 DATA 003C603C06063C00007E18181818
    18000066666666667E0000666666663C180000
    63636B7F7763000066663C3C,964
    1520 DATA 6666000066663C18181800007E0C
    1830607E00001E181818181E0000406030180C
    060000781818181878000008,686
    1530 DATA 1C3663000000000000000000FF00
    00000000050301010103010101030101010301
    010103010101030101010301,167
    1540 DATA 0101030101080A00000000000005
    04001100110011001100110011001100110011
    001100110011001100110011,456
    1550 DATA 0B0A000000000000050400110106
    00110106001101060011010600110106001101
    060011010600110B0A000000,692
    1560 DATA 0000000504001100110011001100
    11001100110011001100110011001100110011
    00110B0A0000000000000504,986
    1570 DATA 0011010600110106001101060011
    010600110106001101060011010600110B0A00
    000000000005040000000000,201
    1580 DATA 0000000000000000000000001100
    11001100110011001100110B0A000000000000
    050400110106001101060011,415
    1590 DATA 0106001101060011010600110106
    0011010600110B0A0000000000000504001100
    110011001100110011001100,684
    1600 DATA 1100110011001100110011001100
    110B0A00000000000005040011010600110106
    001101060011010600110106,970
    1610 DATA 001101060011010600110B0A0000
    00000000050400110011001100110011001100
    110011001100110011001100,269
    1620 DATA 11001100110B0A00000000000005
    02010101020101010201010102010101020101
    010201010102010101020101,385
    1630 DATA 090A000000000057000000001212
    1212121A000000000000000000000000000000
    000000000000000000000000,607
    1640 DATA 0000000000000000000000000000
    00000000000000000000000000000000000000
    000000000000000000000000,607
    Checksum Data
    10 DATA 518,351,496,811,423,729,200,60
    3,555,573,694,613,29,205,967,7767
    160 DATA 142,198,962,857,491,30,155,11
    5,413,970,124,580,333,96,738,6204
    1060 DATA 594,922,912,820,44,936,974,9
    70,962,182,975,902,891,112,230,10426
    1210 DATA 888,616,168,897,233,917,901,
    766,732,776,96,805,870,834,30,9529
    1360 DATA 69,860,982,25,249,872,323,63
    7,266,402,391,538,446,222,507,6789
    1510 DATA 284,117,562,457,631,493,510,
    488,536,526,528,487,481,325,6425

    Listing 2 appears on a separate page.


Previous | Contents | Next

Original text copyright 1984 by ANALOG Computing. Reprinted with permission by the Digital ANALOG Archive.