home *** CD-ROM | disk | FTP | other *** search
/ ticalc.org / ticalc_org_rev_b.iso / archives / 83 / asm / source / ion / blckdude83.z80 < prev   
Encoding:
Text File  |  2001-07-01  |  29.1 KB  |  1,418 lines

  1. .NOLIST
  2. #define equ .equ
  3. #define EQU .equ
  4. #define end .end
  5. ;    name    location    bytes and description
  6. #define mx    apd_buf        ;1 x coor of man
  7. #define my    apd_buf+1    ;1 y coor of man
  8. #define x    apd_buf+2    ;1 generic x
  9. #define y    apd_buf+3    ;1 generic y
  10. #define curloc    apd_buf+4    ;2 current location of compressed data
  11. #define height  apd_buf+6    ;1
  12. #define width    apd_buf+7    ;1
  13. #define guyloc    apd_buf+8    ;2 location of guy in boardmap
  14. #define toploc    apd_buf+10    ;2 location of the top left square in screen
  15. #define direction apd_buf+12    ;1 direction of man; 0 if left; not 0 if right
  16. #define carry    apd_buf+13    ;1 if the dude is carrying something =1 if not =0
  17. #define textloc apd_buf+14    ;2 bytes
  18. #define textxy    apd_buf+16    ;2 bytes
  19. #define option    apd_buf+18    ;1 byte    
  20. #define options    apd_buf+19    ;1 byte
  21. #define mode    apd_buf+20    ;1 byte flag; demo(1) or play(0) mode
  22. #define counter apd_buf+21    ;1 byte timing moves
  23. #define mask    apd_buf+22    ;1 mask for decompressing
  24. #define password apd_buf+23    ;4 3 bytes will be chars the last being the zero terminated string
  25. #define byte    apd_buf+27    ;6 a clear buffer
  26. #define level    apd_buf+33    ;1 the # of the level you are on
  27. #define secbuf    apd_buf+34    ;4 buffer for secret presses
  28. #define levloc    apd_buf+34+4    ;2 location of the current level
  29. #define passloc    apd_buf+36+4    ;2 location in passbuff
  30. #define passbuff apd_buf+38+4    ;3 an inputted password
  31. #define char    apd_buf+41+4    ;1 current char# in the inout routine 
  32. #define page    apd_buf+46    ;1 byte used for instructions routine
  33. #define boardmap apd_buf+50    ;651 bytes of data
  34. ;#include "ti83asm.inc"
  35. ;#include "tokens.inc"
  36. ;#include "sos.inc"
  37. #include    "ion.inc"
  38. .LIST
  39.  
  40. apd_buf    = saferam1
  41. GET_KEY    = _getcsc
  42. second    = $36
  43. cgbuf = _grbufcpy
  44. smsprt    = ionputsprite
  45.  
  46. #ifdef TI83P
  47.   .org    progstart-2
  48.    .db     $BB,$6D
  49. #else
  50.    .org    progstart
  51. #endif
  52.     ret
  53.     jr    nc,prog_start
  54. titletxt:
  55.  .db    "Block Dude - TCPA",0
  56.  
  57. prog_start:
  58.  ld    hl,password
  59.  ld    (hl),0
  60.  ld    de,password+1
  61.  ld    bc,14
  62.  ldir            ;needed zeros for byte,password, and level
  63.  
  64.  call    erasescreen
  65.  set    1,(iy+$05)    ;underline
  66.  set    textwrite,(iy+sgrflags)    ;to graphbuffer
  67.  
  68.  call    loaddemo
  69.  bcall    cgbuf
  70.  ld    hl,endtxt
  71.  ld    de,57*256+5
  72.  ld    a,4
  73.  call    choosemode
  74.  xor    a
  75.  ld    (mode),a
  76.  
  77.  ld    a,(option)
  78.  cp    4
  79.  jp    z,new
  80.  cp    3
  81.  jr    z,enterpass
  82.  dec    a
  83.  jr    nz,loadhelp
  84.  res    1,(iy+$05)    ;underline
  85.  res    textwrite,(iy+sgrflags)    ;to graphbuffer            ;exit
  86.  ret
  87. loadhelp:
  88.  res    textwrite,(iy+sgrflags)
  89.  bcall    _grbufclr    ;clear graph buffer
  90.  bcall     _grbufcpy
  91.  ld    hl,instructions
  92.  ld    a,1
  93.  ld    (page),a
  94. loadhelp2:
  95.  ld    a,0
  96.  ld    (x),a
  97.  ld    (y),a
  98.  ld    b,10
  99. loadhelp3:
  100.  push    bc
  101.  ld    de,(x)
  102.  ld    (pencol),de
  103.  bcall    _vputs
  104.  ld    a,(y)
  105.  add    a,6
  106.  ld    (y),a
  107.  pop    bc
  108.  djnz    loadhelp3
  109.  push    hl
  110.  call    wait
  111.  bcall     _grbufcpy
  112.  pop    hl
  113.  ld    a,(page)
  114.  inc    a
  115.  ld    (page),a
  116.  cp    3
  117.  jr    nz,loadhelp2
  118.  set    textwrite,(iy+sgrflags)
  119.  jp    prog_start
  120.  
  121. enterpass:
  122.  call    box
  123.  ld    hl,please
  124.  ld    de,256*24+28
  125.  ld    (pencol),de
  126.  bcall    _vputs
  127.  ld    de,256*31+26
  128.  ld    (pencol),de
  129.  bcall    _vputs
  130.  bcall    cgbuf
  131.  ld    bc,256*38+42
  132.  res    textwrite,(iy+sgrflags)
  133.  call    input
  134.  set    textwrite,(iy+sgrflags)
  135.  
  136.  ld    hl,level1-1
  137.  ld    (curloc),hl
  138.  xor    a
  139.  ld    (level),a
  140. checkpass:
  141.  ld    hl,(curloc)
  142.  ld    (levloc),hl
  143.  ld    ix,passbuff-1
  144.  ld    c,3
  145. checkpass2:
  146.  inc    hl
  147.  inc    ix
  148.  ld    a,(hl)
  149.  ld    b,a
  150.  ld    a,(ix)
  151.  cp    b
  152.  jr    nz,nextcheck
  153.  dec    c
  154.  jr    nz,checkpass2
  155.  ld    hl,(levloc)
  156.  ld    (curloc),hl
  157.  jr    setuplevel            ;found level
  158. nextcheck:
  159.  ld    hl,(levloc)
  160.  ld    bc,4
  161.  add    hl,bc
  162.  ld    (curloc),hl
  163.  call    erasemap
  164.  ld    a,(level)
  165.  inc    a
  166.  ld    (level),a
  167.  cp    11
  168.  jr    nz,checkpass
  169.  
  170. new:
  171.  xor    a
  172.  ld    (level),a
  173.  ld    hl,level1-1    ;beginning of compressed data
  174.  ld    (curloc),hl
  175.  
  176. setuplevel:
  177.  ld    a,(level)
  178.  inc    a
  179.  ld    (level),a
  180.  cp    12
  181.  jp    z,message2
  182.  ld    hl,(curloc)
  183.  ld    (levloc),hl    ;in case you want to restart level
  184.  inc    hl        ;if we are on a level>1 then we just decompressed this byte so we need to increment
  185.  ld    de,password
  186.  ld    bc,3
  187.  ldir
  188.  ld    (curloc),hl
  189.  call    erasemap
  190.  call    box
  191.  ld    hl,leveltxt
  192.  ld    de,27*256+27    ;y,x
  193.  ld    (pencol),de
  194.  bcall    _vputs
  195.  ld    a,(level)
  196.  ld    l,a
  197.  ld    h,0
  198.  call    disphl
  199.  
  200.  
  201.  ld    hl,passtxt
  202.  ld    de,36*256+27    ;y,x
  203.  ld    (pencol),de
  204.  bcall    _vputs
  205.  ld    hl,password
  206.  bcall    _vputs
  207.  
  208.  bcall    cgbuf
  209.  call    get2nd
  210.  call    dispall
  211.  
  212. main:
  213.  bcall    cgbuf
  214. ;check if clear was pressed
  215.  ld    b,0fdh 
  216.  call    Direct_Input
  217.  cp    %10111111
  218.  jp    z,message1
  219.  ld     b,0bfh 
  220.  call     Direct_Input
  221. ;check if 2nd was pressed
  222.  cp     %11011111
  223.  jr     z,scan
  224.  
  225.  ld    b,0FEh
  226.  call    Direct_Input
  227.  cp    %11110111
  228.  call    z,up
  229.  cp    %11111110 
  230.  call    z,down
  231.  cp    %11111101
  232.  call    z,left
  233.  cp    %11111011
  234.  call    z,right
  235.  
  236.  jr    main
  237. scan:
  238.  ld    hl,(toploc)
  239.  push    hl
  240. scan2:
  241.  halt
  242.  ld    b,0FEh
  243.  call    Direct_Input
  244.  cp    %11110111
  245.  call    z,checkup2
  246.  cp    %11111110 
  247.  call    z,checkdown2
  248.  cp    %11111101
  249.  call    z,checkleft2
  250.  cp    %11111011
  251.  call    z,checkright2
  252.  call    dispall
  253.  bcall    cgbuf
  254.  halt
  255.  ld     b,0bfh 
  256.  call     Direct_Input
  257. ;check if 2nd was pressed
  258.  cp     %11011111
  259.  jr     z,scan2
  260.  pop    hl
  261.  ld    (toploc),hl
  262.  call    dispall
  263.  jr    main
  264.  
  265. Direct_Input:
  266.  ld    a,0ffh
  267.  out    (1),a
  268.  ld    a,b
  269.  out    (1),a
  270.  in    a,(1)
  271.  ret
  272. left:
  273.  ld    ix,(guyloc)
  274.  ld    a,(ix-1)
  275.  cp    3
  276.  jp    z,nextlevel
  277.  or    a
  278.  jr    nz,left4    ;can't walk through a wall you idiot!
  279.  ld    a,(carry)
  280.  or    a
  281.  jr    z,left3
  282.  ld    a,(ix-32)
  283.  or    a
  284.  jr    z,left2
  285.  ld    (ix),2
  286.  xor    a
  287.  ld    (ix-31),a
  288.  ld    (carry),a
  289.  jr    left31
  290. left2:
  291.  ld    (ix-31),a
  292.  ld    (ix-32),2
  293. left3:
  294.  ld    (ix),0
  295. left31:
  296.  dec    ix
  297. left4:
  298.  ld    (ix),4
  299.  ld    (guyloc),ix
  300.  xor    a
  301.  ld    (direction),a
  302.  call    checkleft
  303.  call    checkfall
  304.  jp    dispall
  305.  
  306. right:
  307.  ld    ix,(guyloc)
  308.  ld    a,(ix+1)
  309.  cp    3
  310.  jp    z,nextlevel
  311.  or    a
  312.  jr    nz,right4    ;can't walk through a wall you idiot!
  313.  ld    a,(carry)
  314.  or    a
  315.  jr    z,right3    ;no carry
  316.  ld    a,(ix-30)
  317.  or    a
  318.  jr    z,right2
  319.  ld    (ix),2
  320.  xor    a
  321.  ld    (ix-31),a
  322.  ld    (carry),a
  323.  jr    right31
  324. right2:
  325.  ld    (ix-31),a
  326.  ld    (ix-30),2
  327. right3:
  328.  ld    (ix),0
  329. right31:
  330.  inc    ix
  331. right4:
  332.  ld    (ix),5
  333.  ld    (guyloc),ix
  334.  ld    a,1
  335.  ld    (direction),a
  336.  call    checkright
  337.  call    checkfall
  338.  jp    dispall
  339.  
  340. up:
  341.  ld    ix,(guyloc)
  342.  ld    a,(ix-31)
  343.  cp    1
  344.  ret    z    ;you can't go up, there is brick above you
  345.  ld    a,(direction)
  346.  or    a
  347.  jr    nz,upright
  348. upleft:
  349.  ld    a,(ix-1)
  350.  or    a
  351.  ret    z    ;bozo there's nothing to climb:)
  352.  cp    3
  353.  jp    z,nextlevel
  354.  ld    a,(ix-32)
  355.  cp    3
  356.  jp    z,nextlevel
  357.  or    a
  358.  ret    nz    ;its too tall
  359.  ld    a,(carry)
  360.  or    a
  361.  jr    z,upleft2
  362.  ld    a,(ix-63)
  363.  or    a
  364.  ret    nz    ;there is something on top of the empty space you're trying to move into
  365.  ld    (ix-31),a ;erase current block carried 
  366.  ld    (ix-63),2 ;put up where you will be
  367. upleft2:
  368.  ld    (ix),a
  369.  ld    de,-32
  370.  add    ix,de
  371.  ld    (ix),4
  372.  ld    (guyloc),ix
  373.  xor    a
  374.  ld    (direction),a
  375.  call    checkleft
  376.  call    checkup
  377.  jp    dispall
  378. upright:
  379.  ld    a,(ix+1)
  380.  or    a
  381.  ret    z    ;bozo there's nothing to climb:)
  382.  cp    3
  383.  jp    z,nextlevel
  384.  ld    a,(ix-30)
  385.  cp    3
  386.  jp    z,nextlevel
  387.  or    a
  388.  ret    nz    ;its too tall
  389.  ld    a,(carry)
  390.  or    a
  391.  jr    z,upright2
  392.  ld    a,(ix-61)
  393.  or    a
  394.  ret    nz
  395.  ld    (ix-31),a
  396.  ld    (ix-61),2
  397. upright2:
  398.  ld    (ix),a
  399.  ld    de,-30
  400.  add    ix,de
  401.  ld    (ix),5
  402.  ld    (guyloc),ix
  403.  ld    a,1
  404.  ld    (direction),a
  405.  call    checkright
  406.  call    checkup
  407.  jp    dispall
  408.  
  409. down:    ;pick up/put down
  410.  ld    ix,(guyloc)
  411.  ld    a,(carry)
  412.  or    a
  413.  jr    nz,putdown
  414.  ld    a,(ix-31)
  415.  or    a
  416.  ret    nz    ;there is something over your head
  417.  ld    a,(direction)
  418.  or    a
  419.  jr    nz,pickupr 
  420.  ld    a,(ix-1)
  421.  cp    2
  422.  ret    nz    ;yes you're still stupid, you can't pick it up(if there was anything there in the first place)
  423.  ld    a,(ix-32)
  424.  or    a
  425.  ret    nz    ;can't pick up something if something is on top of it
  426.  ld    a,2
  427.  ld    (carry),a
  428.  ld    (ix-1),0
  429.  ld    (ix-31),a
  430.  call    dispall
  431.  ld    c,1
  432.  jp    nodkey
  433. pickupr:
  434.  ld    a,(ix+1)
  435.  cp    2
  436.  ret    nz    ;yes you're still stupid, you can't pick it up(if there was anything there in the first place)
  437.  ld    a,(ix-30)
  438.  or    a
  439.  ret    nz    ;can't pick up something if something is on top of it
  440.  ld    (ix+1),a
  441.  ld    a,2
  442.  ld    (carry),a
  443.  ld    (ix-31),a
  444.  call    dispall
  445.  jp    nodkey
  446. putdown:
  447.  ld    a,(direction)
  448.  rla
  449.  ld    e,a
  450.  ld    d,0
  451.  dec    de
  452.  add    ix,de    ;either ix-1 or ix+1
  453.  ld    de,-31
  454.  add    ix,de    ;now we have the blocks location left or right one
  455.  ld    a,(ix)
  456.  or    a
  457.  ret    nz    ;something is in the way
  458. putdown2:
  459.  ld    de,31
  460.  add    ix,de
  461.  ld    a,(ix)
  462.  or    a
  463.  jr    z,putdown2
  464. putdown3:
  465.  ld    (ix-31),2
  466.  ld    ix,(guyloc)
  467.  xor    a
  468.  ld    (ix-31),a
  469.  ld    (carry),a
  470.  call    dispall
  471.  jp    nodkey
  472. checkup:
  473.  ld    a,(my)
  474.  cp    40
  475.  ret    nc
  476. checkup2:
  477.  ld    hl,(toploc)
  478.  ld    de,-31
  479.  add    hl,de
  480.  ld    a,(hl)
  481.  inc    a
  482.  ret    z
  483.  ld    (toploc),hl
  484.  ret
  485. checkdown:
  486.  ld    a,(my)
  487.  cp    24
  488.  ret    c
  489. checkdown2:
  490.  ld    hl,(toploc)
  491.  ld    de,248
  492.  add    hl,de
  493.  ld    a,(hl)
  494.  inc    a
  495.  ret    z
  496.  ld    de,-217
  497.  add    hl,de
  498.  ld    (toploc),hl
  499.  ret
  500. checkright:
  501.  ld    a,(mx)
  502.  cp    56
  503.  ret    c
  504. checkright2:
  505.  ld    ix,(toploc)
  506.  ld    a,(ix+12)
  507.  inc    a
  508.  ret    z
  509.  inc    ix
  510.  ld    (toploc),ix
  511.  ret
  512. checkleft:
  513.  ld    a,(mx)
  514.  cp    48
  515.  ret    nc
  516. checkleft2:
  517.  ld    ix,(toploc)
  518.  dec    ix
  519.  ld    a,(ix)
  520.  inc    a
  521.  ret    z
  522.  ld    (toploc),ix
  523.  ret
  524. checkfall:
  525.  ld    ix,(guyloc)
  526.  ld    a,(ix+31)
  527.  or    a
  528.  jr    nz,checkfall3
  529.  ld    a,(my)
  530.  add    a,8
  531.  ld    (my),a
  532.  call    checkdown
  533.  ld    (ix),0
  534.  ld    de,31
  535.  add    ix,de
  536.  ld    a,(direction)
  537.  add    a,4
  538.  ld    (ix),a
  539.  ld    (guyloc),ix
  540.  ld    a,(carry)
  541.  or    a
  542.  jr    z,checkfall2
  543.  ld    (ix-31),a    ;i think it'll always be 2
  544.  ld    (ix-62),0
  545. checkfall2:
  546.  jr    checkfall
  547. checkfall3:
  548.  cp    3
  549.  ret    nz
  550.  call    dispall
  551.  pop    hl        ;de increment stack by 2
  552.  jp    nextlevel
  553.  
  554. dispall:
  555.  call    erasescreen
  556.  call    drawtiles
  557. delay:    ;or nokey
  558.  bcall    cgbuf
  559.  ld    c,10
  560. delay2:
  561.  halt
  562.  ld    b,0FEh
  563.  call    Direct_Input
  564.  inc    a
  565.  jr    z,delay3
  566.  dec    c
  567.  jr    nz,delay2
  568. delay3:
  569.  ret
  570.  
  571. getdata2:
  572.  push    bc
  573.  push    hl
  574.  push    de
  575.  push    ix
  576.  ld    c,0
  577. getdata3:
  578.  ld    hl,(curloc)
  579.  ld    a,(mask)
  580.  ld    b,a
  581.  ld    a,(hl)
  582.  and    b
  583.  cp    b
  584.  jr    nz,gotbyte
  585.  inc    c
  586.  call    nec
  587.  jr    getdata3
  588. gotbyte:
  589.  call    nec
  590.  ld    a,c
  591.  pop    ix
  592.  pop    de
  593.  pop    hl
  594.  pop    bc
  595.  ret
  596. nec:
  597.  ld    a,(mask)
  598.  rrca
  599.  ld    (mask),a
  600.  cp    128
  601.  ret    nz
  602.  inc    hl
  603.  ld    (curloc),hl
  604.  ret
  605.  
  606. interpret:
  607.  or    a
  608.  ret    z
  609.  ld    ix,brick-8
  610.  ld    de,8
  611. interpret2:
  612.  add    ix,de
  613.  dec    a
  614.  jr    nz,interpret2
  615.  ld    a,(y)
  616.  ld    l,a
  617.  ld    a,(x)
  618. sprite:
  619.  ld     b,8
  620.  jp     smsprt
  621.  
  622. ;draw the tiles on screen from location (toploc)
  623. drawtiles:
  624.  ld    hl,(toploc)
  625.  xor    a
  626.  ld    (y),a
  627. drawtiles2:
  628.  xor    a
  629.  ld    (x),a
  630. drawtiles3:
  631.  ld    a,(hl)
  632.  cp    4
  633.  jr    c,drawtiles4
  634.  ld    (guyloc),hl
  635.  sub    4
  636.  ld    (direction),a
  637.  ld    de,(x)
  638.  ld    (mx),de
  639.  add    a,4
  640. drawtiles4:
  641.  push    hl
  642.  call    interpret
  643.  pop    hl
  644.  inc    hl
  645.  ld    a,(x)
  646.  add    a,8
  647.  ld    (x),a
  648.  cp    96
  649.  jr    nz,drawtiles3
  650.  ld    de,19
  651.  add    hl,de
  652.  ld    a,(y)
  653.  add    a,8
  654.  ld    (y),a
  655.  cp    64
  656.  jr    nz,drawtiles2
  657.  ret
  658. erasescreen:
  659.  ld    hl,plotsscreen
  660.  ld    (hl),0
  661.  ld    de,plotsscreen+1
  662.  ld    a,(mode)
  663.  or    a
  664.  jr    nz,part
  665.  ld    bc,767
  666.  ldir
  667.  ret
  668. part:
  669.  ld    bc,671
  670.  ldir
  671.  ld    HL,titlescreen
  672.  ld    DE,plotsscreen
  673.  call    DispRLE
  674.  ret
  675. wait:
  676. get2nd:
  677.  bcall    get_key
  678.  cp    $36
  679.  jr    nz,get2nd
  680.  ret
  681. nodkey:
  682.  ld    c,1    ;mask for nokey
  683. nokey:
  684.  push    bc
  685.  bcall    cgbuf
  686.  pop    bc
  687. nokey2:
  688.  halt
  689.  ld    b,0FEh
  690.  call    Direct_Input
  691.  and    c
  692.  cp    c
  693.  jr    nz,nokey2
  694.  ret
  695.  
  696. nextlevel:
  697.  ld    a,(mode)
  698.  or    a
  699.  jr    nz,loaddemo
  700.  pop    hl    ;de increment stack by 2
  701.  jp    setuplevel
  702.  
  703. loaddemo:
  704.  ld    a,1
  705.  ld    (mode),a
  706.  ld    a,20
  707.  ld    (counter),a
  708.  ld    hl,level1+3    ;beginning of compressed data (skipping the password
  709.  ld    (curloc),hl
  710.  call    erasemap
  711.  ld    a,128
  712.  ld    (mask),a
  713.  ld    hl,moves
  714.  ld    (curloc),hl
  715.  ret
  716. ;-----Menu Routine------;
  717. ;as it is now, this is    ;
  718. ;a sideways menu routine;
  719. ;to move use right and    ;
  720. ;left. Use del to select;
  721. ;an option        ;
  722. ;required vars:        ;
  723. ;textloc     ;2 bytes;
  724. ;textxy        ;2 bytes;
  725. ;option        ;1 byte    ;
  726. ;options    ;1 byte    ;
  727. ;be sure to put option    ; 
  728. ;right before the the     ;
  729. ;var options in memory    ;
  730. ;            ;
  731. ;input for menu:    ;
  732. ;hl=start of text    ;
  733. ;de=coors of menu    ;
  734. ;a=options        ;
  735. ;            ;
  736. ;output:        ;
  737. ;option= # of options-1st or 2nd or...;
  738. ;--------Code-----------;
  739. choosemode:        ;
  740.  ld    (textloc),hl    ;store the variables
  741.  ld    (textxy),de    ;
  742.  ld    (options),a    ;
  743.  ld    (option),a    ;a=the num of options. If there were 5 then five would point to the first option 
  744. writemenu:        
  745.  ld    hl,(textloc)
  746.  ld    de,(textxy)
  747.  ld    (pencol),de
  748.  ld    a,(options)    ;load a and b with the 
  749.  ld    b,a        ;number of option
  750. writemenu2:        ;
  751.  push    bc        ;save bc
  752.  ld    a,(option)    ;see if option(the one that sould be highlighted)
  753.  cp    b        ;= b(the current option being written
  754.  jr    nz,ivputs    ;
  755.  set    textInverse,(iy+textflags);
  756.  bcall    _vputs        ;
  757.  res    textInverse,(iy+textflags);
  758.  
  759. writemenu3:        ;
  760.  pop    bc        ;recall bc
  761.  djnz    writemenu2    ;
  762.  
  763. writemenu4:        ;main loop for selecting
  764.  ld    a,(mode)
  765.  or    a
  766.  call    nz,demomode
  767.  bcall    cgbuf
  768.  bcall   get_key        ;
  769.  cp     $36        ;2nd?
  770.  ret    z
  771.  cp    $02        ;left?
  772.  jr    z,leftmen    ;then move left
  773.  cp    $03        ;right?
  774.  jr    z,rightmen    ;then move right
  775.  cp    $30
  776.  jr    nz,writemenu4
  777.  ld    a,(mode)
  778.  or    a
  779.  jr    z,writemenu4
  780.  ld    a,(option)
  781.  dec    a
  782.  ld    hl,secbuf
  783.  ld    d,0
  784.  ld    e,a
  785.  add    hl,de
  786.  ld    (hl),1
  787.  ld    hl,secbuf
  788.  ld    b,4
  789. secloop:
  790.  ld    a,(hl)
  791.  dec    a
  792.  jr    nz,writemenu4
  793.  inc    hl
  794.  djnz    secloop
  795.  jp    secretselect
  796.  
  797. leftmen:        ;move left in the menu
  798.  ld    de,(option)    ;compare 
  799.  ld    a,e        ;option to
  800.  cp    d        ;options
  801.  jr    z,writemenu4    ;if = then go back
  802.  inc    a        ;increase the option pointer
  803.  ld    (option),a    ;
  804.  jr    writemenu    ;rewrite the menu
  805. rightmen:        ;
  806.  ld    a,(option)    ;compare 
  807.  cp    1        ;option # to 1
  808.  jr    z,writemenu4    ;if = then go back
  809.  dec    a        ;else decrease the option #
  810.  ld    (option),a    ;
  811.  jr    writemenu    ;rewrite menu
  812. ivputs:            ;text w/ underline
  813.  bcall    _vputs        ;
  814.  jr    writemenu3    ;
  815. ;-----------------------;
  816. secretselect:
  817.  xor    a
  818.  ld    (mode),a
  819.  call    box
  820.  ld    hl,select
  821.  ld    de,256*24+27
  822.  ld    (pencol),de
  823.  bcall    _vputs
  824.  ld    de,256*31+38
  825.  ld    (pencol),de
  826.  bcall    _vputs
  827.  bcall    cgbuf
  828.  ld    a,1
  829.  ld    (level),a
  830. secretloop:
  831.  ld    de,256*38+46
  832.  ld    (pencol),de
  833.  ld    a,(level)
  834.  ld    h,0
  835.  ld    l,a
  836.  call    disphl
  837.  bcall    cgbuf
  838. secretl2:
  839.  bcall    get_key
  840.  cp    $04
  841.  jr    z,sup
  842.  cp    $01
  843.  jr    z,sdown
  844.  cp    $36
  845.  jr    z,secl3
  846.  jr    secretl2
  847. sup:
  848.  ld    a,(level)
  849.  dec    a
  850.  jr    z,secretl2
  851.  ld    (level),a
  852.  jr    secretloop
  853. sdown:
  854.  ld    a,(level)
  855.  cp    11
  856.  jr    z,secretl2
  857.  inc    a
  858.  ld    (level),a
  859.  jr    secretloop
  860. secl3:
  861.  ld    hl,level1-1
  862.  ld    (curloc),hl
  863.  ld    a,(level)
  864.  ld    b,a
  865. secl4:
  866.  ld    hl,(curloc)
  867.  ld    (levloc),hl
  868.  ld    de,4
  869.  add    hl,de
  870.  ld    (curloc),hl
  871.  push    bc
  872.  call    erasemap
  873.  pop    bc
  874.  djnz    secl4
  875.  pop    hl    ;rid ourselves of a call
  876.  jp    restart
  877. erasemap:
  878.  ld    hl,boardmap
  879.  ld    (hl),$ff
  880.  ld    de,boardmap+1
  881.  ld    bc,650
  882.  ldir
  883.  call    erasescreen
  884.  ld    a,128
  885.  ld    (mask),a
  886. copydata:
  887.  ld    hl,(curloc)
  888.  ld    a,(hl)
  889.  ld    e,a
  890.  inc    hl
  891.  ld    a,(hl)
  892.  ld    d,a
  893.  inc    hl
  894.  ld    (toploc),de
  895.  ld    a,(hl)
  896.  ld    (height),a
  897.  inc    hl
  898.  ld    a,(hl)
  899.  ld    (width),a
  900.  inc    hl
  901.  ld    (curloc),hl
  902.  ld    hl,boardmap+32
  903. copydata2:
  904.  ld    a,(width)
  905.  ld    b,a
  906. copydata3:
  907.  call    getdata2
  908.  ld    (hl),a
  909.  inc    hl
  910.  djnz    copydata3
  911.  ld    a,(width)
  912.  ld    b,a
  913.  ld    a,31
  914.  sub    b
  915.  ld    d,0
  916.  ld    e,a
  917.  add    hl,de
  918.  ld    a,(height)
  919.  dec    a
  920.  ld    (height),a
  921.  jr    nz,copydata2
  922.  xor    a
  923.  ld    (carry),a
  924.  jp    drawtiles
  925. demomode:
  926.  ld    hl,counter
  927.  dec    (hl)
  928.  ret    nz
  929.  ld    (hl),20
  930.  call    getdata2
  931.  cp    1
  932.  jp    z,up
  933.  cp    2
  934.  jp    z,right
  935.  cp    3
  936.  jp    z,down
  937.  cp    4
  938.  jp    z,left
  939.  ret
  940. ;===========================================================
  941. ; RLE picture displayer v1.1
  942. ; Decodes a RLE picture made by RLE2PIC
  943. ; 82/83 version
  944. ;
  945. ; written by David Phillips <electrum@tfs.net>
  946. ; started: 8/19/98
  947. ; last update: 1/12/98
  948. ;
  949. ; input: HL = RLE encoded picture, DE = where to display
  950. ; output: 1024 byte decoded picture
  951. ; destroys: AF, BC, DE, HL
  952. ; current size: 32 bytes
  953. ;===========================================================
  954. DispRLE:
  955.  ld bc,264            ; we need to copy 768 bytes
  956. DispRLEL:
  957.  ld a,(hl)            ; get the next byte
  958.  cp $91                ; is it a run?
  959.  jr z,DispRLERun    ; then we need to decode the run
  960.  ldi                ; copy the byte, and update counters
  961. DispRLEC:
  962.  ld a,b                ; check the low byte and
  963.  or c                ; the high byte for 0
  964.  jr nz,DispRLEL        ; if not, then we're not done either
  965.  ret                ; if it's zero, we're done
  966. DispRLERun:
  967.  inc hl                ; move to the run value
  968.  ld a,(hl)            ; get the run value
  969.  inc hl                ; move to the run count
  970.  push hl            ; save source pointer
  971.  ld h,(hl)            ; get the run count
  972.  ex de,hl            ; swap source and destination pointers
  973. DispRLERunL:
  974.  ld (hl),a            ; copy the byte
  975.  inc hl                ; increase destination pointer
  976.  dec bc                ; decrease byte count
  977.  dec d                ; decrease run count
  978.  jr nz,DispRLERunL    ; if we're not done, then loop
  979.  ex de,hl            ; swap pointers back
  980.  pop hl                ; recover source pointer
  981.  inc hl                ; advance the source pointer
  982.  jr DispRLEC        ; check to see if we should loop
  983.  
  984. box:                ; START OF CODE By Chris Hiszpanski (Man in the Moon)
  985.  ld    a,31            ; Height + 1 again
  986.  ld    de,$plotsscreen+195        ; Top left corner
  987. clearline:            ; Clear the section saved
  988.  ld    hl,byte
  989.  ld    bc,6            ;
  990.  ldir                ;
  991.  inc    de            ; Skip last four bytes
  992.  inc    de            ;
  993.  inc    de            ; Skip last four bytes
  994.  inc    de            ;
  995.  inc    de            ;
  996.  inc    de            ;
  997.  dec    a            ;
  998.  or    a            ;
  999.  jr    nz,clearline        ;
  1000.  
  1001. ;vortexx15
  1002. ;put title in 
  1003.  ld    hl,description
  1004.  ld    de,17*256+25
  1005.  ld    (pencol),de
  1006.  set    textInverse,(iy+textflags)
  1007.  bcall    _vputs
  1008.  res    textInverse,(iy+textflags)
  1009. ;end of title
  1010. ;/vortexx15
  1011.     res    plotloc,(iy+plotflags)
  1012. ;draw first line
  1013.   ld bc,18223
  1014.   ld de,6191
  1015.   ld h,1
  1016.   bcall _ILINE
  1017. ;draw second line
  1018.   ld b,24
  1019.   ld e,17
  1020.   bcall _ILINE
  1021. ;draw third line 
  1022.   ld b,71
  1023.   ld c,17
  1024.   bcall _ILINE
  1025. ;draw fourth line
  1026.   ld d,71
  1027.   ld e,47
  1028.   bcall    _iline
  1029.     ret
  1030.  
  1031. ;input: hl(to be displayed)
  1032. ;------------------------
  1033. disphl:            ;
  1034.  bcall    _setxxxxop2    ;
  1035.  bcall    _op2toop1    ;
  1036.  bcall    _dispop1a    ;
  1037.     ret
  1038. ;------------------------
  1039. message2: 
  1040.  call    box
  1041.  ld    hl,endmess
  1042.  ld    de,24*256+32
  1043.  ld    (pencol),de
  1044.  bcall    _vputs
  1045.  ld    de,30*256+29
  1046.  ld    (pencol),de
  1047.  bcall    _vputs
  1048.  ld    de,36*256+31
  1049.  ld    (pencol),de
  1050.  bcall    _vputs
  1051.  bcall     _grbufcpy
  1052.  call    wait
  1053.  jp    prog_start
  1054.  
  1055. message1:
  1056.  call    box
  1057.  ld    hl,joke
  1058.  ld    de,27*256+28
  1059.  ld    (pencol),de
  1060.  bcall    _vputs
  1061.  ld    hl,mess1txt
  1062.  ld    de,36*256+27
  1063.  ld    a,2
  1064.  call    choosemode
  1065.  ld    a,(option)
  1066.  dec    a
  1067.  jp    z,prog_start
  1068.  
  1069. ;restart level
  1070. restart:
  1071.  ld    hl,(levloc)
  1072.  ld    (curloc),hl
  1073.  ld    hl,level
  1074.  dec    (hl)
  1075.  jp    setuplevel
  1076.  
  1077. ;input: 
  1078. ;bc= coors
  1079.  
  1080. input:
  1081.  ld    hl,passbuff
  1082.  ld    (passloc),hl
  1083.  ld    (textxy),bc
  1084.  ld    (pencol),bc
  1085.  ld    a,3
  1086.  ld    (option),a
  1087. alphastart:
  1088.  ld    a,'A'
  1089.  ld    (char),a
  1090. placechar:
  1091.  push    af
  1092.  ld    hl,(textxy)
  1093.  push    hl
  1094.  ld    (pencol),hl
  1095.  ld    hl,blanks
  1096.  bcall    _vputs
  1097.  pop    hl
  1098.  ld    (pencol),hl
  1099.  pop    af
  1100.  bcall    _vputmap
  1101. inputmain:
  1102.  bcall   get_key        ;    
  1103.  cp    $04        ;up?
  1104.  jr    z,inputup
  1105.  cp    $01        ;down?
  1106.  jr    z,inputdown
  1107.  cp    $36        ;2nd?    
  1108.  jr    z,nextchar    ;    
  1109.  jr    inputmain
  1110. inputdown:
  1111.  ld    a,(char)
  1112.  cp    'Z'
  1113.  jr    z,inputdown2
  1114.  cp    'z'
  1115.  jr    z,alphastart
  1116.  inc    a
  1117.  ld    (char),a
  1118.  jr    placechar
  1119. inputdown2:
  1120.  ld    a,'a'
  1121.  ld    (char),a
  1122.  jr    placechar
  1123. inputup:
  1124.  ld    a,(char)
  1125.  cp    'A'
  1126.  jr    z,lalphaend
  1127.  cp    'a'
  1128.  jr    z,alphaend
  1129.  dec    a
  1130.  ld    (char),a
  1131.  jr    placechar
  1132. alphaend:
  1133.  ld    a,'Z'
  1134.  ld    (char),a
  1135.  jr    placechar
  1136. lalphaend:
  1137.  ld    a,'z'
  1138.  ld    (char),a
  1139.  jr    placechar
  1140. nextchar:
  1141.  ld    a,(char)
  1142.  ld    hl,(passloc)
  1143.  ld    (hl),a
  1144.  inc    hl
  1145.  ld    (passloc),hl
  1146.  ld    hl,(pencol)
  1147.  ld    (textxy),hl
  1148.  ld    hl,option
  1149.  dec    (hl)
  1150.  ret    z
  1151.  jr    placechar
  1152.  
  1153. brick:
  1154.  .db    %11111011
  1155.  .db    %11111011
  1156.  .db    %00000000
  1157.  .db    %11111110
  1158.  .db    %11111110
  1159.  .db    %00000000
  1160.  .db    %11111011
  1161.  .db    %11111011
  1162. block:            ;varible sized block
  1163.  .db    %11111111
  1164.  .db    %10000001
  1165.  .db    %10000001
  1166.  .db    %10000001
  1167.  .db    %10000001
  1168.  .db    %10000001
  1169.  .db    %10000001
  1170.  .db    %11111111
  1171. door:
  1172.  .db    %01111110
  1173.  .db    %01000010
  1174.  .db    %01000010
  1175.  .db    %01000010
  1176.  .db    %01000110
  1177.  .db    %01000010
  1178.  .db    %01000010
  1179.  .db    %01111110
  1180. manl:
  1181.  .db    %00011100
  1182.  .db    %01111110
  1183.  .db    %00010010
  1184.  .db    %00100010
  1185.  .db    %00010100
  1186.  .db    %00101010
  1187.  .db    %00001000
  1188.  .db    %00110110
  1189. manr:
  1190.  .db    %00111000
  1191.  .db    %01111110
  1192.  .db    %01001000
  1193.  .db    %01000100
  1194.  .db    %00101000
  1195.  .db    %01010100
  1196.  .db    %00010000
  1197.  .db    %01101100
  1198. titlescreen:    ;rle
  1199.  .db $91,$00,$09,$40,$91,$00,$04,$3f,$b0,$00,$08,$1f
  1200.  .db $f0,$00,$40,$91,$00,$04,$0c,$90,$00,$08,$08,$18
  1201.  .db $00,$40,$91,$00,$04,$09,$10,$00,$10,$08,$08,$00
  1202.  .db $40,$91,$00,$04,$16,$20,$e3,$96,$10,$0e,$21,$c6
  1203.  .db $91,$00,$04,$1f,$a3,$2c,$28,$10,$0a,$46,$9a,$91
  1204.  .db $00,$04,$20,$a4,$30,$30,$20,$14,$59,$14,$91,$00
  1205.  .db $04,$20,$a4,$50,$50,$20,$24,$91,$91,$01,$28,$91
  1206.  .db $00,$04,$21,$44,$92,$48,$20,$45,$93,$20,$91,$00
  1207.  .db $04,$3e,$47,$1c,$4c,$3f,$86,$5d,$b8,$91,$00,$07
  1208.  .db $40,$00,$00,$01,$91,$00,$06,$04,$39,$b1,$06,$4d
  1209.  .db $b8,$91,$00,$06,$0a,$12,$2a,$88,$aa,$a0,$91,$00
  1210.  .db $06,$0e,$12,$33,$8a,$ea,$b0,$91,$00,$06,$0a,$12
  1211.  .db $22,$8a,$aa,$a0,$91,$00,$06,$0a,$11,$a2,$86,$a8
  1212.  .db $b8,$91,$00,$12,$32,$8a,$4c,$ee,$aa,$4e,$91,$00
  1213.  .db $06,$2a,$8a,$aa,$48,$aa,$c8,$91,$00,$06,$31,$0a
  1214.  .db $ac,$4c,$44,$4c,$91,$00,$06,$29,$0a,$aa,$48,$aa
  1215.  .db $42,$91,$00,$06,$31,$04,$4a,$4e,$aa,$ec,$91,$00
  1216.  .db $03
  1217. ; Total compression: 264 bytes compressed to 205 (22% smaller)
  1218.  
  1219. ;levels are compressed huffman meathod
  1220. level1:
  1221.  .db    "tcP"        ;password
  1222.  .dw    boardmap+40    ;screen starting position
  1223.  .db    8    ;height
  1224.  .db    20    ;widht
  1225.  .db    128,0,10,0,0,40,0,0,160,0,2,132,2,2,184,132,201,159,21
  1226.  .db    85,85,85,85,80,0,0,0    ;27 bytes of blocks
  1227.  
  1228. level2:
  1229.  .db    "ARo"
  1230.  .dw    boardmap+104    ;screen starting position
  1231.  .db    10    ;height
  1232.  .db    22    ;widht
  1233.  .db    %01000001,%01000000,%00010100,%00001000,%00000000,%00000010
  1234.  .db    %00010100,%00000000,%00000000,%10001011,%10000000,%00000000
  1235.  .db    %00001001,%01000000,%00000000,%00000010,%01000000,%00000010
  1236.  .db    %00110000,%01001000,%00000000,%01011001,%10110111,%10001001
  1237.  .db    %01010101,%00001010,%10101010,%10101010,%10101000,%00010001
  1238.  .db    %10100000,%00000000,%00000101,%01010100,%00000000,%00000000
  1239. ;36 bytes of blocks
  1240. level3:
  1241.  .db    "CKs"
  1242.  .dw    boardmap+97
  1243.  .db    11    ;height
  1244.  .db    19    ;width
  1245.  .db    %01000000,%00000000,%00000100,%00101010,%10101010,%10101010
  1246.  .db    %10100100,%10010000,%00000000,%00101000,%10000000,%00000000
  1247.  .db    %10100000,%00000000,%00001101,%01000000,%00000000,%00110110
  1248.  .db    %10100101,%01000001,%11100001,%01100101,%00100100,%10000010
  1249.  .db    %00101010,%10100010,%01001011,%01100101,%00010000,%00010111
  1250.  .db    %01001010,%10101010,%01010000,%00010101,%00101000,%01010100
  1251.  .db    %00000000
  1252. level4:
  1253.  .db    "daN"
  1254.  .dw    boardmap+198
  1255.  .db    16
  1256.  .db    24
  1257.  .db    %00000000,%00000000,%00100000,%00000000,%00000000,%00100100,%00000000,%00100000
  1258.  .db    %00001000,%01000000,%00001001,%00000001,%00000010,%00000101,%01000010,%00001000
  1259.  .db    %00000100,%00100000,%00010001,%00000000,%00100100,%00000000,%10100000,%00000010
  1260.  .db    %01000000,%00000000,%00000001,%10100100,%00000000,%00000000,%00110110,%10010000
  1261.  .db    %00000000,%00001111,%00001010,%10101000,%00100000,%00000010,%00010001,%01110000
  1262.  .db    %01001100,%00000001,%01010101,%00010101,%01010010,%01100001,%10001010,%10000000
  1263.  .db    %00001001,%00110010,%01011001,%00000000,%00000100,%10101010,%10101010,%10100000
  1264.  .db    %00000000,%10101000,%00000000,%0000000
  1265. level5:
  1266.  .db    "BAH"
  1267.  .dw    boardmap+163
  1268.  .db    14
  1269.  .db    22
  1270.  .db    %00000101,%01000001,%01010101,%01010101,%00010101,%01000010,%10101000,%00000001
  1271.  .db    %01000000,%00000000,%00000001,%01000000,%00000000,%00000001,%01000000,%00000000
  1272.  .db    %00000001,%01000000,%10000000,%00000000,%10100000,%01000000,%00000000,%01010000
  1273.  .db    %00101101,%10110110,%00000000,%00101011,%10000101,%01010101,%01011110,%00000000
  1274.  .db    %10101001,%01010000,%00101001,%00000011,%01001001,%00000000,%01001010,%00011011
  1275.  .db    %01001001,%00000000,%01001010,%00110110,%11010010,%10100000,%00001001,%01010101
  1276.  .db    %01010100,%00000000,%00010101,%00000000,%0
  1277. level6:
  1278.  .db    "Ion"
  1279.  .dw    boardmap+134
  1280.  .db    13
  1281.  .db    21
  1282.  .db    %01010100,%00000000,%00001010,%10100100,%01010101,%01010101,%01010101,%01000010
  1283.  .db    %10100000,%00000000,%00000010,%10111000,%00000000,%00000000,%10101000,%00000000
  1284.  .db    %00000000,%10010000,%00000000,%00000110,%11010010,%11011000,%00000010,%00110001
  1285.  .db    %01010010,%11011011,%00000000,%10111101,%10110110,%01000010,%11011011,%01100000
  1286.  .db    %00101010,%10100100,%00101010,%10100000,%10101000,%01010100,%00000010,%00011010
  1287.  .db    %00000000,%00000001,%01001010,%10000000,%00000000,%00101010,%00000000,%0000
  1288. level7:
  1289.  .db    "Twe"
  1290.  .dw    boardmap+198
  1291.  .db    14
  1292.  .db    24
  1293.  .db    %00100001,%01010101,%00001010,%00010101,%00001001,%00100000,%01001000,%10010000
  1294.  .db    %10001000,%10100000,%00101000,%01010000,%01001000,%01000000,%00100000,%10000010
  1295.  .db    %01000000,%00000000,%00000001,%10100100,%00000000,%00000000,%00011010,%10100000
  1296.  .db    %00000000,%00000001,%10110101,%01110000,%11000000,%00000000,%00101010,%10100001
  1297.  .db    %00110000,%00100000,%10100100,%00100001,%00110000,%01010011,%00111101,%01010100
  1298.  .db    %00101000,%10011011,%01100010,%10011011,%01101000,%00000100,%01010101,%01010010
  1299.  .db    %10101010,%10100000,%00010100,%10000010,%10100000,%00000000,%00101010,%00000000
  1300.  .db    %00000000,%00
  1301. level8:
  1302.  .db    "nTy"
  1303.  .dw    boardmap+326
  1304.  .db    17
  1305.  .db    27
  1306.  .db    %01010100,%00000010,%10101000,%01010101,%01010100,%01000010,%00000100,%00010010
  1307.  .db    %00000001,%00100000,%10000100,%00001010,%00000000,%01010110,%00001010,%10000010
  1308.  .db    %01000000,%10101000,%10101101,%10000000,%00010100,%00000101,%00100010,%10101010
  1309.  .db    %00000001,%01000000,%00000101,%11001000,%01010000,%00000000,%01010000,%01010010
  1310.  .db    %00100000,%11001000,%00001000,%10000000,%10001000,%00110100,%10000010,%00010000
  1311.  .db    %00010010,%00010101,%00001000,%00100010,%00000110,%10010000,%00010010,%00000010
  1312.  .db    %10000001,%10110101,%00000000,%01000000,%00000010,%10101010,%10100000,%00000000
  1313.  .db    %11000000,%00000001,%01000001,%10000000,%10101000,%00000000,%11010100,%00101010
  1314.  .db    %00000000,%00000000,%01101101,%01000000,%00011000,%00000110,%00111100,%01101101
  1315.  .db    %10101010,%10101010,%10101010,%10101010,%10101010,%10101010,%10101010,%10101010
  1316. level9:
  1317.  .db    "iRC"
  1318.  .dw    boardmap+132
  1319.  .db    16
  1320.  .db    20
  1321.  .db    %00000000,%10101000,%00000000,%00000010,%00010000,%00000000,%00010000,%00100010
  1322.  .db    %10101010,%00000100,%00000010,%10000010,%00001000,%00011000,%00000010,%00010000
  1323.  .db    %00011011,%00000001,%10100010,%00000001,%01010000,%01101101,%00100000,%00000000
  1324.  .db    %11110010,%10101010,%00000000,%00000110,%00001010,%11100000,%00000001,%01010000
  1325.  .db    %10101000,%00101000,%01000000,%01101001,%00000101,%01100010,%10000101,%01010010
  1326.  .db    %00001010,%10101010,%10001010,%00001010,%10001000,%00010010,%10000000,%01001010
  1327.  .db    %00000101,%01000000,%00010101,%00000000,%0000000
  1328. level10:
  1329.  .db    "JmK"
  1330.  .dw    boardmap+258
  1331.  .db    19
  1332.  .db    27
  1333.  .db    %00010101,%01010101,%01010101,%01010101,%01010101,%01010000,%01010000,%00000000
  1334.  .db    %10000000,%00010001,%01010101,%10000000,%01101101,%01100001,%10110110,%01101010
  1335.  .db    %01000101,%00010000,%10101010,%10001101,%01010010,%10010100,%00100010,%10000000
  1336.  .db    %00101010,%01010100,%01010000,%10100010,%10110110,%11011000,%00000000,%00101011
  1337.  .db    %10000000,%01010101,%01010100,%00000000,%01010100,%00000001,%00001010,%10000000
  1338.  .db    %00101001,%00000011,%00001001,%00010100,%00000001,%00100000,%01000001,%00000101
  1339.  .db    %00000000,%10010101,%01000101,%00000000,%00000010,%10101010,%00010101,%01010000
  1340.  .db    %00011110,%00000000,%00010000,%10000000,%00001000,%00000000,%01000010,%00000000
  1341.  .db    %01010000,%01010101,%01010101,%00001000,%00000010,%10000000,%00000100,%00010000
  1342.  .db    %00000001,%10000000,%00011010,%00001011,%00000101,%01010101,%01010101,%01000011
  1343.  .db    %01101000,%00101101,%10001010,%00000000,%01010011,%01101101,%00000101,%01010101
  1344.  .db    %00000000,%00001010,%10101010,%0
  1345. level11:
  1346.  .db    "wTF"
  1347.  .dw    boardmap+39
  1348.  .db    19
  1349.  .db    29
  1350.  .db    %10101010,%10101010,%10101010,%10101010,%10101010,%10101010,%10101010,%10100010
  1351.  .db    %00010000,%00000000,%00000000,%01010000,%00110101,%10110000,%00000000,%01010101
  1352.  .db    %01001010,%11000010,%10100110,%10100000,%01100010,%10001110,%01001010,%11011000
  1353.  .db    %00101010,%00011110,%00110000,%00001001,%00101010,%10001101,%10100000,%01001100
  1354.  .db    %00000000,%01001010,%00010101,%01000000,%01000101,%01000010,%10100010,%10110000
  1355.  .db    %00000000,%01001000,%00001000,%11001010,%11011000,%00000101,%01001001,%01100000
  1356.  .db    %10001010,%10101010,%10100110,%00010101,%00010010,%10110001,%00110010,%00101000
  1357.  .db    %00000000,%01100101,%01000110,%10000100,%00101000,%01100000,%01101100,%10000101
  1358.  .db    %01010000,%00001010,%00001010,%10101010,%10101000,%00000010,%10101010,%01010000
  1359.  .db    %00000000,%00011000,%01101010,%00001001,%01010101,%00000000,%00001100,%00100000
  1360.  .db    %11011010,%01010110,%10100001,%00000100,%00000000,%01010101,%00101010,%11010101
  1361.  .db    %00100000,%10000110,%11011001,%10000000,%01010110,%10110101,%10101000,%00100000
  1362.  .db    %00001101,%10110000,%01010101,%01010101,%01010101,%01010101,%01010101,%01010101
  1363.  .db    %01010101,%01010000
  1364. instructions:
  1365.  .db    "The object of this game is",0
  1366.  .db    "to reach the door in each",0
  1367.  .db    "level.  If you are unsure",0
  1368.  .db    "where it is you can hold 2nd",0
  1369.  .db    "down and use the arrow keys",0
  1370.  .db    "to scroll freely.  You can",0
  1371.  .db    "only clinb one block at a time",0
  1372.  .db    "and lift only one block at a",0
  1373.  .db    "time.  To lift up a block",0
  1374.  .db    "press down.  To set it down",0
  1375.  .db    "press down again.  CLEAR will",0
  1376.  .db    "give you the choice of",0
  1377.  .db    "restarting or quiting.  There",0
  1378.  .db    "are 11 levels in this game.",0
  1379.  .db    "Please visit our web page at",0
  1380.  .db    "tcpa.calc.org for additional",0
  1381.  .db    "information.  Thanks to all",0
  1382.  .db    "the beta testers and the ACZ",0
  1383.  .db    "for all there useful utilities",0
  1384.  .db    " ",0
  1385.  
  1386. moves:    ;for demo are compressed huffman style
  1387.  .db    %11110111,%01111011,%10101011,%11010111,%10101101,%01101111
  1388.  .db    %01110111,%10111101,%01111011,%11011101,%01011110,%11110111
  1389.  .db    %10000000
  1390. endtxt:
  1391.  .db    " New ",0," Password ",0," Help ",0," Quit ",0
  1392. mess1txt:
  1393.  .db    " Restart ",0," Quit ",0
  1394. leveltxt:
  1395.  .db    "Level: ",0
  1396. passtxt:
  1397.  .db    "Pass: ",0
  1398. please:
  1399.  .db    "Please Enter",0
  1400.  .db    "The Password",0 
  1401. joke:
  1402.  .db    "Too hard? :)",0
  1403. select:
  1404.  .db    "Secret Level",0
  1405.  .db    "Select",0
  1406.  
  1407. description:
  1408.  .db    "     Block Dude     ",0
  1409. endmess:
  1410.  .db    "Well done!",0
  1411.  .db    "You beat all",0 
  1412.  .db    "the levels.",0
  1413. blanks:
  1414.  .db    "      ",0
  1415.  
  1416. .end
  1417. END
  1418. ;can go up two tall passage with block - shouldn't