    Here it is, the long awaited BlokDrop version 2.1!  It's still slower than
a snail, but it's no longer slower than a snail on a glacier.  The most
significant improvement, though, is the graphics.  On the last version, you may
have noticed that figures blinked onto the screen.  That doesn't happen any-
more.  Also, I got rid of some of the more dangerous Poke commands, with one
exception.  What does this add up to?  BLOKDROP v2.1!
    For those of you who are knew to Blokdrop, it is the HP28 version of TETRIS
except that it's kind of slow.  To play, you need to type in all of the follow-
ing programs and run all of the programs that begin with MK (i.e. MKSC, MKB,
etc.).  Once you have run the MK programs, you may delete them; they are no
longer needed.  Before you can run MKFA, you must enter ASSEM and FAST.S.  The
former is a machine language assembler for the HP-28 and the latter is the
source code for my own little version of FAST.  If you already have FAST, then
you don't need to enter ASSEM, FAST.S, or MKFA.  Just make sure that FAST is
accessable to BLOKDROP.
    When you are ready to play, type BLOKDROP and press ENTER.  This will start
the game.  Turn the calculator sideways (yes, sideways) so that the number pad
is to the left of the screen.  These keys move the objects:
 
                    "1"  ==  Rotate object clockwise
                    "2"  ==  Move object left one space
                    "5"  ==  Move object right one space
                    "3"  ==  Drop object to bottom of screen
                    "0"  ==  Pause game
                    "7"  ==  End game
 
Please note the addition of the End Game function.  It is so difficult to lose
this game that it became necessary to add a game over key.  Whenever you get
tired of playing, just hit the 7 key and the game will end.  Otherwise, the
game ends when you reach the top of the screen, just like in TETRIS.
    If this version goes over well, I may start working on a completely machine
language version in the next few months.
 
*Note:  If you already have Blokdrop v2.0 in your calculator, you DON'T need to
enter programs MKFI, MKSC, or MKGO.  They create the files FILL, GO, and SCREEN
which have not changed from v2.0.
 
This file may be distributed freely as long as it is distributed in its
entirety.  If you wish to publish or modify parts of the file, just e-mail
your request and it will probably be granted.  Written by David Still.
 
===============================================================================
 
  FLIST  [F296]
{   << HALT >>
    << OB CHECKL 0 R->C + 'OB'
    STO >>
    << OB CHECKR 0 R->C - 'OB'
    STO >>
    << BDROP 2 CF 3 SF >>
    << 1 CF 2 SF BDROP >>
    << 'R' 1 STO- 'R' R 1 < 4
    * STO+ 'R' CHECKD STO+ 'R'
    R 4 > 4 * STO- >> }
 
*NOTE*  There are NO BREAKS in the strings for the next two files!  Enter them
        as continuous strings!
 
  ASSEM [B918]
  << "1431323469C201441321421
     64808CEDFFC"
    << -> str << IF str SIZE
    DUP 2 / IP 2 * - THEN
    str "0" + 'str' STO END ""
    1 str SIZE FOR j "#"
    str j 1 + DUP SUB + str j j
    SUB + "h" + STR-> B->R
    CHR + 2 STEP >> >> ->
    imc cnv prep <<
  cnv prep EVAL HOME
  'CNV' DUP PURGE STO
  imc prep EVAL #CFFFBh
  SYSEVAL 'CNV' PURGE >>
  >>
 
  FAST.S [6950]
  "1361B00FFF80820F1580136142
  164808C"
 
  MKFA [EEC4]
  << PATH FAST.S ASSEM SWAP
  -> p <<
    1 p SIZE FOR j p j GET
    EVAL NEXT >>
  'FAST' STO
  >>
 
  BLOKDROP [0C5C]
    << FAST CLLCD LCD-> 'CL'
    STO 0 'SCO' STO SCREEN DUP
    'BSCR' STO ->LCD 1 SF
  64 STWS
      WHILE 1 FS?
      REPEAT 2 SF (5,1) 'OB'
      STO 3 CF 2 'R' STO RAND
      7 * 1 + IP 'OBJECT' STO
'SCO' 10 STO+
        WHILE 2 FS?
        REPEAT (0,1) 'OB' STO+
          IF CHECKD
          THEN 2 CF
          END 'OB' 0 CHECKD
          R->C STO- IF OB
          (5,1) ==
          THEN 1 CF
          END "" 4 SF "" 'BUFF'
          STO
          WHILE 4 FS?
          REPEAT KEY -> k f
            <<
              IF f 0 ==
              THEN 4 CF
              END
              IF "123570" k
  POS THEN BUFF k + 'BUFF' STO
              END >>
          END
          IF BUFF "" <>
          THEN 1 BUFF SIZE
       FOR n BUFF n n SUB -> k
 << FLIST "025371" k POS GET
    EVAL >>
            NEXT
          END (0,1) 'OB' STO+
          IF CHECKD NOT
          THEN 2 SF
          END 'OB' (0,1) STO-
    PLT END PLT SCORE
      END 0 3
      FOR n BSCR 137 n * 1 +
      137 n * 96 + SUB GO n 1
   + GET + BSCR 137 n * 117 +
137 n 1 + * SUB +
      NEXT + + + ->LCD "GAME
      OVER" SCO { BUFF STAK OB
      SCO BSCR S Q P BLOX TITL
A OBJECT R CL } PURGE
  >>
 
    MKSC [F303]
  << { 0 0 0 0 0 0 0 54 182
  182 60 60 54 182 182 54 0 0
  224 240 176 176 240 2 24 128
  128 128 0 0 0 5 149 197 149
  149 149 0 0 0 0 0 0 0 0 0
  255 255 219 255 15 11 15 143
  139 143 143 139 143 143 139
  143 143 139 143 143 139 143
  143 139 143 15 11 15 255 219
  255 1 1 1 1 1 1 1 1 1 1 1 1
  1 1 1 1 1 1 1 1 1 1 1 1 1 1
  1 1 1 1 1 1 1 1 1 1 1 1 1 1
  1 1 1 1 1 1 1 1 1 1 1 1 1 1
  1 1 1 1 1 1 255 0 0 0 0 0 0
  0 199 239 109 108 108 108
  109 239 199 0 0 57 125 109
  109 109 109 109 125 57 0 0 0
  24 32 25 4 36 24 0 0 0 0 0 0
  0 0 0 255 255 182 255 0 0 0
  255 182 255 3 2 3 227 162 227
  227 162 227 3 2 3 255 182 255
  0 0 0 255 182 255 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 255
  0 0 0 0 0 0 0 193 195 195 195
  195 195 195 251 249 0 0 158
  223 219 219 222 219 219 219
  155 0 0 0 24 20 18 18 20 24
  0 0 0 0 0 0 0 0 0 255 255 109
  255 0 0 0 255 109 255 192 64
  192 199 69 199 199 69 199
  192 64 192 255 109 255 0 0 0
  255 109 255 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 255 0 0
  0 0 0 0 0 60 62 54 54 60 54
  54 62 60 0 0 7 7 6 6 6 6 6 7
  7 0 0 0 128 128 229 149 149
  227 1 6 0 0 0 0 0 0 0 255 255
  219 255 240 208 240 241 209
  241 241 209 241 241 209 241
  241 209 241 241 209 241 241
  209 241 240 208 240 255 219
  255 128 128 128 128 128 128
  128 128 128 128 128 128 128
  128 128 128 128 128 128 128
  128 128 128 128 128 128 128
  128 128 128 128 128 128 128
  128 128 128 128 128 128 128
  128 128 128 128 128 128 128
  128 128 128 128 128 128 128
  128 128 128 128 128 255 }
-> m
     << "" 1 m SIZE
        FOR n m n GET CHR +
        NEXT 'SCREEN' STO
     >>
   >>
 
  MKB [C45A]
 << { 123 32 123 32 34 14 10
 14 34 32 34 0 0 0 34 10 34 0
 0 0 34 32 34 0 0 0 34 32 125
 32 123 10 34 112 80 112 34 32
 34 0 0 0 34 32 34 0 0 0 34 10
 34 0 0 0 34 32 125 32 123 32
 34 128 128 128 34 10 34 3 2 3
 34 32 34 0 0 0 34 32 34 0 0 0
 34 32 125 10 123 32 34 0 0 0
 34 32 34 28 20 28 34 32 34 0
 0 0 34 10 34 0 0 0 34 32 125
 32 123 32 34 0 0 0 34 10 34
 224 160 224 34 32 34 0 0 0 34
 32 34 0 0 0 34 32 125 10 123
 32 34 0 0 0 34 32 34 0 0 0 34
 32 34 7 5 7 34 10 34 0 0 0 34
 32 125 32 123 32 34 0 0 0 34
 10 34 0 0 0 34 32 34 56 40 56
 34 32 34 0 0 0 34 32 125 10
 123 32 34 0 0 0 34 32 34 0 0
 0 34 32 34 192 64 192 34 10
 34 1 1 1 34 32 125 32 123 32
 34 0 0 0 34 10 34 0 0 0 34 32
 34 0 0 0 34 32 34 14 10 14 34
 32 125 10 123 32 34 0 0 0 34
 32 34 0 0 0 34 32 34 0 0 0 34
 10 34 112 80 112 34 32 125 32
 125 } -> m
      << "" 1 m SIZE
        FOR n m n GET CHR +
        NEXT STR-> 'B' STO
      >>
    >>
 
  MKSP [FAFE]
    << { "" } 1 19
      FOR n "" 1 n 3 *
        FOR m 0 CHR +
        NEXT +
      NEXT 'SPC' STO
    >>
 
  MKFI [9AE9]
  << { 123 32 34 1 1 1 34 32
  34 0 0 0 34 32 34 0 0 0 34
  10 34 128 128 128 34 32 125
  } -> m
    << "" 1 m SIZE
        FOR n m n GET CHR +
        NEXT STR-> 'FILL' STO
    >>
  >>
 
  MKGO [2C5E]
  << { 123 10 34 224 224 0 192
  192 0 0 224 224 0 0 192 224
  96 96 192 96 96 96 96 34 10
  34 139 219 251 251 219 219
  219 219 219 0 0 251 251 195
  243 243 195 195 251 251 34
  10 34 8 156 156 54 182 190
  182 182 54 0 0 54 182 182
  182 182 182 190 156 8 34 10
  34 7 15 13 12 15 15 13 15 7
  0 0 7 15 13 13 13 13 13 15 7
  34 10 125 } -> m
      << "" 1 m SIZE
       FOR n m n GET CHR +
       NEXT STR-> 'GO' STO
      >>
  >>
 
  LOC [F1C2]
[ (73,1) (73,2) (73,16) (73,
128) (210,4) (210,32) (347,1)
(347,8) (347,64) (484,2) (484,
16) (484,128) ]
 
  SCORE [03BB]
<< FAST LCD-> DUP ->LCD -> s
   << s 1 76 SUB s 138 213 SUB
   s 275 350 SUB s 412 487 SUB
   4 ->LIST 'TITL' STO
s 77 137 SUB s 214 274 SUB s
351 411 SUB s 488 548 SUB 4
->LIST 'BLOX' STO 63 'P' STO 0
'Q' STO 1 'S' STO
        WHILE P 0 >
        REPEAT 'P' 3 STO- 1 4
  FOR n BLOX n GET P P SUB NUM
          NEXT + + + 'A' STO
          WHILE A 1020 ==
          REPEAT 1 'S' STO+ 1 4
  FOR n FILL n GET BLOX n GET
  1 P 3 - SUB + BLOX n GET P 1
  + 61 SUB + BLOX SWAP n SWAP
  PUT 'BLOX' STO
          NEXT 1 4
    FOR n BLOX n GET P P SUB NUM
    NEXT + + + 'A' STO
          END
    END SC S GET 'SCO' STO+ 1 4
    FOR n TITL n GET BLOX n GET
 NEXT + + + + + + + DUP 'BSCR'
 STO ->LCD >>
   >>
 
  SC [485E]
  { 0 100 300 600 1000 }
 
  SH [4071]
{
[[ (0,-1) (0,0) (0,1) (0,2) ]
 [ (1,0) (0,0) (-1,0) (-2,0) ]
 [ (0,-1) (0,0) (0,1) (0,2) ]
 [ (1,0) (0,0) (-1,0) (-2,0) ]]
[[ (0,-1) (0,0) (1,0) (1,1) ]
 [ (-1,1) (0,1) (0,0) (1,0) ]
 [ (0,-1) (0,0) (1,0) (1,1) ]
 [ (-1,1) (0,1) (0,0) (1,0) ]]
[[ (1,-1) (1,0) (0,0) (0,1) ]
 [ (-1,-1) (0,-1) (0,0) (1,0) ]
 [ (1,-1) (1,0) (0,0) (0,1) ]
 [ (-1,-1) (0,-1) (0,0) (1,0) ]]
[[ (0,-1) (0,0) (1,0) (0,1) ]
 [ (0,-1) (-1,0) (0,0) (1,0) ]
 [ (0,-1) (-1,0) (0,0) (0,1) ]
 [ (-1,0) (0,0) (1,0) (0,1) ]]
[[ (0,-1) (1,-1) (0,0) (1,0) ]
 [ (0,-1) (1,-1) (0,0) (1,0) ]
 [ (0,-1) (1,-1) (0,0) (1,0) ]
 [ (0,-1) (1,-1) (0,0) (1,0) ]]
[[ (0,-1) (0,0) (0,1) (-1,1) ]
 [ (1,0) (0,0) (-1,0) (1,1) ]
 [ (1,-1) (0,-1) (0,0) (0,1) ]
 [ (-1,0) (0,0) (1,0) (-1,-1) ]]
[[ (0,-1) (0,0) (0,1) (1,1) ]
 [ (1,0) (0,0) (-1,0) (1,-1) ]
 [ (-1,-1) (0,-1) (0,0) (0,1) ]
 [ (-1,1) (1,0) (0,0) (-1,0) ]]
}
 
  CHECKL [EBB1]
  << 0 1 4
  FOR j SH OBJECT GET { R j }
  GET OB + (2,1) + C->R 3 *
  LOC ROT GET + C->R R->B
BSCR ROT DUP SUB NUM R->B AND
DUP / B->R +
      NEXT DUP AND NOT
  >>
 
  CHECKR [EBB9]
  << 0 1 4
  FOR j SH OBJECT GET { R j }
  GET OB + (0,1) + C->R 3 *
  LOC ROT GET + C->R R->B
BSCR ROT DUP SUB NUM R->B AND
DUP / B->R +
      NEXT DUP AND NOT
  >>
 
  CHECKD [F2C1]
  << 0 1 4
  FOR j SH OBJECT GET { R j }
  GET OB + (1,0) + C->R 3 * 1
  + LOC ROT GET + C->R R->B
BSCR ROT DUP SUB NUM R->B AND
DUP / B->R +
      NEXT DUP AND
  >>
 
  BDROP [FE29]
  << 1 'A' STO
  WHILE A 1 ==
  REPEAT 'OB' (0,1) STO+
  CHECKD NOT 'A' STO
  END 'OB' (0,1) STO-
  >>
 
  PLT [2269]
  << 1 4
  FOR g SH OBJECT GET { R g }
  GET OB + -> obj
    << CL 1 76 SUB SPC obj IM
    GET + 1 4
    FOR j B obj RE GET j GET +
    CL 1 134 SUB + NEXT 1 548
    SUB >>
      NEXT OR OR OR BSCR OR
      ->LCD
  >>
 
/---------------------------------------------------------------------\
|             >>>>> BIG DEAL! <<<<<            | Why ask why?         |
| Now I have a signature file, too!            | Get smashed out of   |
| **** Dave Still ******* DESTILL@MTUS5 ****   | your mind instead.   |
| Life is like a dill pickle                   | Because some things  |
| ...........I hate dill pickles...            | never change.        |
\---------------------------------------------------------------------/
