home *** CD-ROM | disk | FTP | other *** search
/ ticalc.org / ticalc_org_rev_b.iso / archives / 86 / asm / source / arkanoid.asm < prev    next >
Encoding:
Assembly Source File  |  2001-07-01  |  30.2 KB  |  1,615 lines

  1. ; Game:      Arkanoid v1.0
  2. ; Author:    James Rubingh
  3. ; Email:     James@acz.org
  4. ; WebPage:   http://members.tripod.com/~jaymzroo
  5. ; Alliance:  www.acz.org
  6. ; Date:      December 1998
  7.  
  8. ; Just a quick note. Since i was using the Graph_mem for grayscale I 
  9. ; didnt use a video buffer to stop flickering, so any flickering 
  10. ; was avoided but its still there with sprites and the ball.
  11.  
  12. ; I use SDR16. Thanks to JL for that routine. 
  13.  
  14.  .include ti86asm.inc   ;ACZ include files ROM86.h RAM86.h ASM86.h 
  15.  .org _asm_exec_ram
  16.  
  17.  
  18. data = $9000            ;level data 128 bytes, last data byte $9000+127
  19. balla = $9000+128       ;ball data 1.0=up 1=down 2.scale 34.xy 5.Dead
  20. score = _textShadow
  21. lives = _textShadow+2
  22. level = _textShadow+3
  23. x = _textShadow+23
  24. p = _textShadow+4               ;0 = normal nz=big ass paddle
  25. PS_addy = _textShadow+5 ;used to indicate which RAM addy to draw to
  26. ballz = _textShadow+7
  27. temp = _textShadow+8
  28. tempy = _textShadow+9
  29. blocks = _textShadow+11         ;how many blocks are on the screen
  30. b = _textShadow+18      
  31. much = _textShadow+19   ;how many hits since the ball last hit the paddle
  32. dead = _textShadow+20
  33. switch = _textShadow+22
  34. FP_RLD = _textShadow+24
  35. bonusHL = _textShadow+26        ;bonus pointer to video memory
  36. bonusSP = _textShadow+28        ;bonus Sprite pointer
  37. bonusTY = _textShadow+30        ;bonus Type 0-3
  38. bonusTIME = _textShadow+31      ;The bonus counter
  39. bonusW = _textShadow+32
  40. flag = _textShadow+25
  41. delayt = _textShadow+33
  42. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  43.  
  44.  .db 0
  45.  jp start
  46.  .dw 0
  47.  .dw Title
  48.   
  49. ;----- estoy iniciando -----
  50.   
  51. start:
  52.   call _runindicoff
  53.   call _clrLCD
  54.   call cbuffer
  55.   ld hl,arktitle-1      ;check if the title screen data is there
  56.   rst 20h
  57.   rst 10h
  58.   jr c,start_wo_title
  59. start_with_title:
  60.   ld a,b
  61.   ex de,hl
  62.   call $4633            ;trans AHL -> ASIC
  63.   set 6,a
  64.   out (5),a
  65.   inc a
  66.   out (6),a
  67.   ld de,-($4000-2)      ;You have to move the pointer back one 16k section
  68.   add hl,de             ;because the ROM thinks I am in the third 16k
  69.   ld de,$fc00           ;section, but its really been moved to the 2nd
  70.   ld bc,$400-64         ;with the out (5),a command. then also skip one
  71.   ldir                  ;word of the data, hence -($4000-2)
  72.   ld de,$ca00
  73.   ld bc,$400-64
  74.   ldir
  75.   ld a,$0d
  76.   out (5),a
  77.   ld a,65
  78.   out (6),a
  79.   call OpenGray
  80. graytitlewait:
  81.  ld a,%00111111         ;exact subroutine as e_p except without
  82.  out (1),A              ;the halt command.
  83.  in a,(1)
  84.  bit 5,a
  85.  jr nz,graytitlewait
  86.  
  87. start_wo_title:  
  88.   call CloseGray        ;turn off grayscale so that you can use _getkey
  89.   call cbuffer          
  90.   call _clrLCD          
  91.   ld hl,$0402
  92.   ld (_curRow),hl
  93.   ld hl,TITLE
  94.   call _puts
  95.   ld hl,$0204
  96.   ld (_curRow),hl
  97.   ld hl,Author
  98.   call _puts            ;display Big sized string
  99.  
  100.  
  101. OficialBegin:           ;done with title screen. Begin  
  102.   
  103.   ld hl,$3023
  104.   ld (_penCol),hl
  105.   ld hl,hightext
  106.   call _vputs
  107.   ld hl,$3034
  108.   ld (_penCol),hl
  109.   ld hl,(highscore)
  110.   call d_zm_deci
  111.   ld hl,$3720
  112.   ld (_penCol),hl
  113.   ld hl,choosespeed
  114.   call _vputs
  115.   
  116. initialkeycheck:
  117.   call _GetKy
  118.  
  119.   cp K_EXIT
  120.   ret z
  121.   cp K_F1
  122.   jr nz,checkF2
  123.   ld a,$FF
  124.   ld (delayt),a
  125.   jr BeyondDelaySetup
  126. checkF2:
  127.   cp K_F2
  128.   jr nz,checkF3
  129.   ld a,$f0
  130.   ld (delayt),a
  131.   jr BeyondDelaySetup
  132. checkF3:
  133.   cp K_F3
  134.   jr nz,checkF4
  135.   ld a,$d0
  136.        ld (delayt),a
  137.   jr BeyondDelaySetup
  138. checkF4:
  139.   cp K_F4
  140.   jr nz,checkF5
  141.   ld a,$90
  142.   ld (delayt),a
  143.   jr BeyondDelaySetup
  144. checkF5:
  145.   cp K_F5
  146.   jr nz,initialkeycheck
  147.   
  148.   ld hl,skipdelay
  149.   ld de,selfmodify
  150.   ld bc,3
  151.   ldir
  152.   jr BeyondDelaySetup2
  153. BeyondDelaySetup:
  154.   call fixself          ;fix selfmodification
  155. BeyondDelaySetup2:
  156.   call OpenGray
  157.   ld a,($C008)          ;if its not all the way up, increase the 
  158.   cp 31                 ;contrast by 1
  159.   jr z,nochange
  160.   inc a
  161.   out (2),a
  162. nochange:
  163.   
  164.   ld hl,_textShadow
  165.   xor a
  166.   ld de,_textShadow+1
  167.   ld bc,168
  168.   ld (hl),a
  169.   ldir
  170.   ld de,$9001
  171.   ld hl,$9000
  172.   ld bc,$500
  173.   ld (hl),a
  174.   ldir                  ;clear the array table data 
  175.  
  176.  call _clrLCD
  177.  call cbuffer           ;clears the second buffer for grayscale shit
  178.                         ;which starts 6 bytes after the Graph Memory did
  179.   
  180.   res 1,(iy+$0d)        ; shit, i need a beer
  181.   ld a,1
  182.   ld (level),a
  183.   add a,3
  184.   ld (lives),a
  185.  
  186.  
  187.   call unpacklevel      ;decompress the level to the data area
  188.   call initiatelevel
  189.   call DrawLine         ;draws the horizontal line above the blocks
  190.   call drawblox         ;draw all of the initial blox onto the screen
  191.   call show_score
  192.   call dpaddle          ;draw the paddle
  193.   
  194.   ld b,$ef              ;a short delay
  195. wait2_:
  196.   dec a                 
  197.   jr nz,wait2_
  198.   djnz wait2_
  199.   
  200.   call enter_pause
  201.  
  202. main:
  203.   ld a,%00111110        ;keypress mask
  204.   out (1),a             ;keypad port, usually people put a few 'nop' 
  205.   in a,(1)              ;commands in here, but i dont care.
  206.   bit 4,a
  207.   jp z,teacher          ;jump to quick quit
  208.   bit 7,a
  209.   call z,enter_pause    ;pause till 2nd is pushed
  210.   bit 6,a               ;test for key exit
  211.   jp z,exit_key
  212.   bit 2,a               ;test for key right
  213.   ld c,a                ;preserve the keypress results in A
  214.   call z,p_right
  215.   ld a,c                ;restore the results from the keyport 
  216.   bit 1,a               ;test for key left
  217.   call z,p_left
  218.  
  219.   call dpaddle
  220.   call ProcessBallz     ;The magic happens here
  221.   
  222.   call drawblox
  223.   call PutBall          ;clear the old one, draw the new one
  224.   call HandleBoni       ;the plural of Bonus... haha
  225.   
  226.   ld a,(dead)           ;check the dead flag for a death
  227.   cp 1
  228.   call z,died
  229.   
  230. selfmodify:
  231.   nop
  232.   nop
  233.   nop
  234.   ld a,(delayt)
  235.   ld c,a
  236.   ld b,10
  237. dalay:
  238.   dec a
  239.   jr nz,dalay
  240.   ld a,c
  241.   djnz dalay
  242.   
  243. skipdelay:
  244.   jp main
  245.  
  246. p_right:
  247.  ld a,(x)
  248.  inc a                  ;this command increases the A register hehe
  249.  inc a
  250.  ld b,a
  251.  ld a,(p)
  252.  or a
  253.  ld a,b
  254.  jr z,short
  255.  cp 97
  256.  ret nc
  257.  jp good
  258. short:
  259.  cp 113
  260.  ret nc 
  261. good:
  262.  ld b,a
  263.  ld a,c
  264.  bit 3,a
  265.  jr nz,noup
  266.  dec b
  267. noup: 
  268.  ld a,b
  269.  ld (x),a
  270.  ret
  271.  
  272. p_left:
  273.  ld a,(x)
  274.  cp 2
  275.  ret c
  276.  dec a
  277.  dec a
  278.  ld b,a
  279.  ld a,c                 ;the keypress mask
  280.  bit 3,a
  281.  jr nz,noleft
  282.  inc b
  283. noleft: 
  284.  ld a,b
  285.  ld (x),a
  286.  ret 
  287.  
  288. PutBall:
  289.  ld hl,$cc80
  290.  ld de,$cc81
  291.  xor a
  292.  ld (hl),a
  293.  ld bc,320-1
  294.  ldir                   ;clear the NO-MANS-LAND
  295.  ld hl,$fe80
  296.  ld de,$fe81
  297.  xor a
  298.  ld (hl),a
  299.  ld bc,320-1
  300.  ldir                   ;clear the NO-MANS-LAND
  301.  
  302.  ld de,$fc00            ;oh yea, this is stupid 
  303.  call ball_draw_stuff   ;its not a grayscale routine so I have 
  304.  ld de,$ca00            ;to draw it twice to each of the
  305.  call ball_draw_stuff   ;bitmapped areas
  306.  ret
  307.  
  308. ball_draw_stuff:        ;This draws a 3x3 block of ON pixels non-alligned
  309.  ld hl,balla+2
  310.  ld b,(hl)
  311.  inc hl
  312.  ld c,(hl)
  313.  dec b
  314.  call Find_Pixel
  315.  add hl,de
  316.  ld d,a
  317.  ld c,3
  318. PB_col: 
  319.  push af
  320.  push hl
  321.  ld b,3
  322. PB_row: 
  323.  ld e,a
  324.  or (hl)
  325.  ld (hl),a
  326.  ld a,e
  327.  rrca                   ;rotate right branch carry
  328.  jp nc,SB
  329.   inc hl                ;No carry? then dont change bytes
  330. SB:                     ;Same byte
  331.  djnz PB_row            ;do this three times
  332.  pop hl
  333.  ld a,16
  334.  add a,l
  335.  ld l,a
  336.  adc a,h
  337.  sub l
  338.  ld h,a
  339.  pop af
  340.  dec c
  341.  jr nz,PB_col
  342.  ret
  343.  
  344. ;PutPixel:
  345. ; call Find_Pixel
  346. ; ld de,(PS_addy)
  347. ; add hl,de
  348. ; or (hl)
  349. ; ld (hl),a
  350. ; ret
  351.  
  352. dpaddle:
  353.  call clear_old
  354.  ld a,(p)
  355.  or a
  356.  jr z,shortpaddle
  357.  ld hl,x
  358.  ld b,(hl)
  359.  ld hl,bpaddle
  360.  ld de,$fc00
  361.  
  362.  ld c,60
  363.  push bc
  364.  call SDR16
  365.  ld de,$ca00
  366.  ld hl,bpaddle2
  367.  pop bc
  368.  call SDR16
  369.  ret
  370.  
  371. shortpaddle: 
  372.  ld hl,x
  373.  ld b,(hl)
  374.  ld hl,paddle
  375.  ld de,$fc00
  376.  ld c,60
  377.  push bc
  378.  call SDR16
  379.  ld de,$ca00
  380.  ld hl,paddle2
  381.  pop bc
  382.  call SDR16
  383.  ret
  384.  
  385. clear_old:
  386.  push bc
  387.  ld hl,$ca00+(16*60)
  388.  ld de,$ca00+(16*60)+1
  389.  xor a
  390.  ld (hl),a
  391.  ld bc,64
  392.  ldir
  393.  ld hl,$fc00+(16*60)
  394.  ld de,$fc00+(16*60)+1
  395.  xor a
  396.  ld (hl),a
  397.  ld bc,64
  398.  ldir
  399.  pop bc
  400.  
  401.   ld a,(flag)
  402.   or a
  403.   ret z
  404.   dec a
  405.   jr z,wall_one
  406.   
  407.    ld a,$FF
  408.    jr lina
  409. wall_one:  
  410.    ld a,%10101010
  411. lina:  
  412.    ld b,8
  413.    ld hl,$FFF0
  414. lina_loop:
  415.    ld (hl),a
  416.    inc hl
  417.    ld (hl),a
  418.    inc hl
  419.    djnz lina_loop
  420.    ret
  421.  
  422. DrawLine:
  423.  ld hl,$fc70            ;draw a single horizontal line, 7 down
  424.  ld b,8
  425.  ld a,255
  426. DL_LOOP:
  427.  ld (hl),a
  428.  inc hl
  429.  ld (hl),a
  430.  inc hl
  431.  djnz DL_LOOP
  432.  ret
  433.  
  434. ProcessBallz:           ; UP/DO    SC     X    Y
  435.   ld a,(switch)
  436.   xor 1
  437.   ld (switch),a
  438.   
  439.   
  440.   ld ix,balla
  441.   call ball_test
  442.   call paddle_test
  443.   call test_death
  444.   
  445.   ld ix,balla+4
  446.   xor a
  447. setup_dead:             ;sets up the dead flag
  448.   add a,(ix)
  449.  ; add a,(ix+5)         ;for when there are three ballz
  450.  ; add a,(ix+10)        ;not yet implemented
  451.   ld (dead),a
  452.   ret
  453.  
  454. ball_test:  
  455.   ld a,(ix)             ;UP/DO
  456.   ld b,(ix+2)           ;X
  457.   ld c,(ix+3)           ;Y
  458.  
  459. test_vertical:
  460.   add a,c
  461.   sub 7
  462.   ld c,a
  463.   or a
  464.   jr z,not_clear_up
  465.   call get_block_type
  466.   or a
  467.   jr z,its_clear_v      ;it was clear vertically
  468.  
  469. not_clear_up:  
  470.   call maybe_clear_brick
  471.   
  472.   ld a,(ix)             ;it wasnt clear vertically
  473.   neg 
  474.   ld (ix),a
  475.   
  476.   jr test_horizontal
  477. its_clear_v:
  478.   ld a,(ix)
  479.   add a,(ix+3)
  480.   ld (ix+3),a
  481.   ;jp test_horizontal
  482.  
  483. test_horizontal:
  484.   ld a,(ix+1)
  485.   ld b,(ix+2)          ;X  
  486.   ld c,(ix+3)
  487.  
  488.   cp 0
  489.   jr z,fine_scale
  490.   jp p,movingright
  491.   inc a
  492.   or a
  493.   jr nz,fine_scale
  494.   ld a,(switch)
  495.   dec a
  496.   jp fine_scale
  497.  
  498. movingright:
  499.   dec a
  500.   or a
  501.   jr nz,fine_scale
  502.   ld a,(switch)
  503.  
  504. fine_scale:  
  505.   ld (temp),a
  506.   add a,b
  507.   cp 127
  508.   jr nc,switch_horiz  
  509.   cp 1
  510.   jp m,switch_horiz
  511.  
  512.   ld a,(ix+3)
  513.   ld a,c
  514.   sub 7
  515.   ld c,a
  516.   ld a,(temp)
  517.   add a,(ix+2)
  518.   ld b,a
  519.   call get_block_type
  520.   or a
  521.   jr nz,switch_horiz
  522.   
  523.   ld a,(temp)           ;X
  524.   add a,(ix+2)          ;scale
  525.   ld (ix+2),a           ;X+scale
  526.   ret
  527.  
  528. switch_horiz:
  529.   ld a,(ix+1)
  530.   neg
  531.   ld (ix+1),a
  532.   
  533.   ld a,(hl)             ;if its cleared, then dont clear brick
  534.   or a          
  535.   ret z
  536.  
  537.   call maybe_clear_brick
  538.   ret                   ;dont change this to jp cause it might not finish
  539.                         ;It will screw up the ret command if you do
  540. maybe_clear_brick:      
  541.   cp 3                  ;check if its a solid
  542.   ret z
  543.   
  544.   dec a                 ;this is still the value from 'maybe_c...'
  545.   ld (hl),a
  546.   ret nz                ;if the block didnt dissapear, then dont decrease the
  547.   ld hl,(score)
  548.   ld a,(much)
  549.   add a,a               ;much*8
  550.   add a,a
  551.   add a,a
  552.   add a,50
  553.   add a,l
  554.   ld l,a
  555.   adc a,h               ;add HL+A
  556.   sub l
  557.   ld h,a
  558.   ld (score),hl
  559.   call show_score
  560.   
  561.   ld hl,much
  562.   inc (hl)
  563.   
  564.   ld hl,bonusHL         ;test the Bonus flag, we dont want to give a bonus
  565.   ld a,(hl)             ; if one exists allready
  566.   inc hl
  567.   ld d,(hl)
  568.   or d
  569.   jr nz,no_bonus 
  570.  
  571.   ld a,r
  572.   and %00011110         ;a 1 in 16 chance of getting a bonus I think...
  573.   rra
  574.   or a
  575.   jr z,dobonus1
  576.   dec a
  577.   jr z,dobonus2
  578.   dec a
  579.   jr z,dobonus3
  580.   dec a
  581.   jr z,dobonus4
  582.   jr no_bonus
  583. dobonus4:
  584.   ld hl,bonus4
  585.   ld e,3
  586.   jr obonus
  587. dobonus3:
  588.   ld hl,bonus3
  589.   ld e,2
  590.   jr obonus
  591. dobonus2:
  592.   ld hl,bonus2
  593.   ld e,1
  594.   jr obonus
  595. dobonus1:
  596.   ld hl,bonus1
  597.   ld e,a                ;ld e,0  <a=0>
  598.  
  599. obonus:
  600.   ld a,e                ;setting up the proper operands for the bonus
  601.   ld (bonusTY),a        ;handling...
  602.   ld (bonusSP),hl       ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  603.   ld hl,balla+2         ;Support the Zapata movement in Mexico!!
  604.   ld b,(hl)             ;http://members.xoom.com/grchs
  605.   inc hl                ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  606.   ld c,(hl)
  607.   call Find_Pixel
  608.   ld (bonusHL),hl
  609.   ld a,l
  610.   and 15
  611.   ld (bonusW),a
  612.  
  613.   
  614. no_bonus:               ;done with handling bonuses
  615.   ld a,(blocks)         ;counter that says how many blocks to go.
  616.   dec a
  617.   or a
  618.   jr z,newlevel         ;If that was the last block, then go to the nextlevel
  619.   ld (blocks),a
  620.   ret
  621.  
  622. newlevel:
  623.   xor a                 ;reset the paddle
  624.   ld (p),a
  625.   ld (flag),a
  626.  
  627.   ld a,(level)
  628.   inc a
  629.   cp 9                  ;There exist only 8 levels, so its hard to go to 9...
  630.   jp z,finished
  631.   ld (level),a
  632.   call unpacklevel      ;you dont want to unpack at death
  633. notdead:  
  634.   
  635.   call initiatelevel
  636.   call clear_old
  637.   call drawblox
  638.   call PutBall
  639.   call DrawLine
  640.   call dpaddle
  641.   call show_score
  642.   pop hl                ;maybe..   
  643.   pop hl                ;ball_test
  644.   jp enter_pause
  645.   
  646. get_block_type:
  647.   ld a,c
  648.   cp 32
  649.   jp nc,off_array
  650.   srl c
  651.   srl c
  652.   ld l,c
  653.   ld h,0
  654.   add hl,hl
  655.   add hl,hl
  656.   add hl,hl
  657.   add hl,hl
  658.   srl b
  659.   srl b
  660.   srl b
  661.   ld e,b
  662.   ld d,0
  663.   add hl,de
  664.   ld de,data
  665.   add hl,de
  666.   ld a,(hl)
  667.   ret
  668. off_array:
  669.  xor a
  670.  ret
  671.  
  672. enter_pause:
  673.  ld hl,e_pause
  674.  ld de,$3031
  675.  ld (_penCol),de
  676.  call _vputs
  677. e_p:
  678.  halt
  679.  ld a,%00111111
  680.  out (1),A
  681.  nop 
  682.  nop
  683.  in a,(1)
  684.  bit 5,a
  685.  jr nz,e_p
  686.  ret
  687.  
  688. HandleBoni:             ;handle the bonuses
  689.   ld hl,bonusHL
  690.   ld a,(hl)
  691.   inc hl
  692.   ld d,(hl)
  693.   or d
  694.   ret z                 ;If this location equals zero, then there 
  695.                         ;are no boni (plural of...)
  696.   
  697.   ld hl,(bonusSP)
  698.   ld d,h
  699.   ld e,l
  700.   ld hl,(bonusHL)
  701.   ld bc,$ca00
  702.   add hl,bc
  703.   call copyb            ;Draw the corresponding bonus
  704.   ld hl,(bonusHL)
  705.   ld a,h
  706.   or $FC
  707.   ld h,a
  708.   call copyb
  709.   
  710.   ld a,(bonusTIME)      ;after it has been redrawn, check if its time
  711.   inc a                 ;to change the coordinates
  712.   and %00000001
  713.   ld (bonusTIME),a
  714.   or a
  715.   ret nz
  716.  
  717.   ld hl,(bonusHL)
  718.   ld bc,16
  719.   add hl,bc
  720.   ld (bonusHL),hl
  721.   ld a,h
  722.   cp $03
  723.   ret nz
  724.  
  725. CheckB:                 ;check if the paddle has hit a bonus
  726.   ld a,l
  727.   cp $d0
  728.   jr c,On_
  729.   
  730. GenocideBonus:
  731.   ld hl,0
  732.   ld (bonusHL),hl
  733.   ret
  734.  
  735. On_:  
  736.   cp $a0
  737.   ret c
  738.   
  739.   ld a,(p)
  740.   or a
  741.   jr z,checksmall
  742. checkbig:
  743.   ld e,4
  744.   jr cc
  745. checksmall:  
  746.   ld e,2
  747. cc:                     ;continue check
  748.   ld hl,x
  749.   ld c,(hl)
  750. cc2:  
  751.   ld a,c
  752.   srl a
  753.   srl a
  754.   srl a
  755.   ld b,a
  756.   ld a,(bonusW)
  757.   cp b
  758.   jr z,HitBonus
  759.   dec e
  760.   jr z,lastcheck
  761.   
  762.   ld a,c
  763.   add a,8
  764.   ld c,a
  765.   jr cc2
  766.  
  767. lastcheck:
  768.   ld a,c
  769.   add a,7
  770.   srl a
  771.   srl a
  772.   srl a
  773.   ld b,a
  774.   ld a,(bonusW)
  775.   cp b
  776.   ret nz                ;if it wasnt a hit, return empty handed =(
  777.  
  778. HitBonus:
  779.   ld a,(bonusTY)
  780.   or a
  781.   jr z,Make1
  782.   dec a
  783.   jr z,Make2
  784.   dec a
  785.   jr z,Make3
  786.   dec a
  787.   jr z,Make4
  788.  
  789. Make1:
  790.   ld a,(lives)          ;extra life
  791.   inc a
  792.   ld (lives),a
  793.   call show_lives
  794.   jp GenocideBonus
  795.  
  796. Make2:  
  797.   ld hl,(score)         ;extra 50 points
  798.   ld c,50
  799.   ld b,a
  800.   add hl,bc
  801.   ld (score),hl
  802.   call show_score
  803.   jp GenocideBonus
  804.  
  805. Make3:
  806.   ld a,2
  807.   ld (flag),a
  808.   jp GenocideBonus
  809.   
  810. Make4:
  811.   ld a,1
  812.   ld (p),a
  813.   ld a,(x)
  814.   cp 96
  815.   jp m,GenocideBonus
  816.   ld a,95
  817.   ld (x),a
  818.   jp GenocideBonus
  819.  
  820. copyb: 
  821.  ld b,4
  822. copyloop:
  823.  ld a,(de)
  824.  ld (hl),a
  825.  inc de
  826.  ld a,16
  827.  add a,l
  828.  ld l,a
  829.  adc a,h
  830.  sub l
  831.  ld h,a
  832.  djnz copyloop
  833.  
  834.  ret
  835.  
  836.  
  837.  
  838.  
  839.  
  840. paddle_test:
  841.  ld a,(ix+3)
  842.  cp 58
  843.  jr z,pt_1
  844.  cp 59
  845.  jr z,pt_1
  846.  cp 60
  847.  jr z,pt_1
  848.  ret                    ;if its not at the paddle's height, dont do this
  849. pt_1:
  850.  ld a,(p)
  851.  or a
  852.  jr nz,big_ass_paddle
  853. normal_paddle:
  854.  ld hl,x                ;paddles X location
  855.  ld a,(hl)
  856.  ld b,(ix+2)            ;ballz X position
  857.  cp b
  858.  ret nc
  859.  add a,15
  860.  cp b
  861.  ret c                  ;make sure the ball is somewhere over the paddle
  862.  sub 15
  863.  ld c,a                 ;switch A&B using C
  864.  ld a,b
  865.  ld b,c
  866.  sub b                  ;find the difference, put that in 'A' register
  867.  add a,a
  868.  ld hl,move_table
  869.  add a,l
  870.  ld l,a
  871.  adc a,h
  872.  sub l
  873.  ld h,a
  874.  ld a,(hl)
  875.  ld (ix+1),a
  876.  ld a,-1
  877.  ld (ix),a
  878.  xor a
  879.  ld (much),a
  880.  ret
  881.  
  882. big_ass_paddle: 
  883.  ld hl,x                ;paddles X location
  884.  ld a,(hl)
  885.  ld b,(ix+2)            ;ballz X position
  886.  cp b
  887.  ret nc
  888.  add a,30
  889.  cp b
  890.  ret c                  ;make sure the ball is somewhere over the paddle
  891.  sub 30
  892.  ld c,a                 ;switch A&B using C
  893.  ld a,b
  894.  ld b,c
  895.  sub b                  ;find the difference, put that in 'A' register
  896.  ld hl,move_table
  897.  add a,l
  898.  ld l,a
  899.  adc a,h
  900.  sub l
  901.  ld h,a
  902.  ld a,(hl)
  903.  ld (ix+1),a
  904.  ld a,-1
  905.  ld (ix),a
  906.  xor a
  907.  ld (much),a
  908.  ret
  909.  
  910. test_death
  911.  ld a,(ix+3)
  912.  cp 62
  913.  ret nz
  914.                         ;ball is too low, so it is dead
  915.  
  916.  ld a,(flag)
  917.  or a
  918.  jr z,no_save_wall
  919.  dec a
  920.  ld (flag),a
  921.  ld a,(ix)
  922.  neg
  923.  ld (ix),a
  924.  ret
  925.  
  926. no_save_wall: 
  927.  ld a,1
  928.  ld (ix+4),a
  929.  ret
  930.  
  931.  
  932. unpacklevel:
  933.   ld a,(savedgame)
  934.   or a
  935.   jr z,normal_start
  936.   
  937.   ld hl,savedscore
  938.   ld de,_textShadow
  939.   ld bc,4
  940.   ldir
  941.   ld hl,savedgame
  942.   xor a
  943.   ld (hl),a
  944.   inc hl
  945.   jr saved_start
  946. normal_start:  
  947.   ld a,(level)          ;what level are you on?
  948.   ld b,a
  949.   ld hl,leveldata-32    ;all the compressed level data
  950.   ld de,32
  951. getaddy:
  952.   add hl,de             ;add 32 for every level youre on
  953.   djnz getaddy
  954.   
  955. saved_start:
  956.   ld b,32               ;Copy the map + count blocks
  957.   ld de,data
  958. set_up_1:
  959.   ld c,(hl)
  960.   rlc c
  961.   rlc c
  962.   ld a,c
  963.   and 3
  964.   ld (de),a
  965.   inc de
  966.   rlc c
  967.   rlc c
  968.   ld a,c
  969.   and 3
  970.   ld (de),a
  971.   inc de
  972.   rlc c
  973.   rlc c
  974.   ld a,c
  975.   and 3
  976.   ld (de),a
  977.   inc de
  978.   rlc c
  979.   rlc c
  980.   ld a,c
  981.   and 3
  982.   ld (de),a
  983.   inc de
  984.   inc hl
  985.   djnz set_up_1
  986.  
  987. count_blocks:
  988.   ld hl,blocks
  989.   xor a
  990.   ld (hl),a
  991.   ld de,data
  992.   ld b,128
  993. count_loop:
  994.   ld a,(de)
  995.   dec a
  996.   jr z,increase_blocks
  997.   dec a
  998.   jr nz,skip_increase
  999. increase_blocks:
  1000.   inc (hl)
  1001. skip_increase:
  1002.   inc de
  1003.   djnz count_loop
  1004.   ret
  1005.  
  1006. drawblox:
  1007.  ld b,128
  1008.  xor a
  1009. bloxloop
  1010.  ld c,a
  1011.  push bc
  1012.  call DrawA
  1013.  pop bc                 ;dont wanna mess up the counter
  1014.  ld a,c
  1015.  inc a
  1016.  djnz bloxloop
  1017.  ret
  1018.  
  1019. DrawA:
  1020.  ld b,a                 ;type
  1021.  rrca
  1022.  rrca
  1023.  rrca
  1024.  rrca
  1025.  and %00001111
  1026.  ld l,0                 ;\
  1027.  rra
  1028.  rr l                   ;   \
  1029.  rra                    ;   / Multiply A by 64, and store into HL
  1030.  rr l           
  1031.  ld h,a                 ;/
  1032.  ld a,b
  1033.  and 15                 ;add hl,A
  1034.  add a,l
  1035.  ld l,a
  1036.  adc a,h
  1037.  sub l
  1038.  ld h,a
  1039.  ld a,128
  1040.  add a,l
  1041.  ld l,a
  1042.  adc a,h
  1043.  sub l
  1044.  ld h,a
  1045.  ld e,b                 ;add data,block number
  1046.  ld d,0
  1047.  ld bc,data
  1048.  ex de,hl
  1049.  add hl,bc
  1050.  ex de,hl
  1051.  ld a,(de)
  1052.  or a
  1053.  jp z,zero_
  1054.  dec a 
  1055.  jp z,one_
  1056.  dec a
  1057.  jp z,two_
  1058.  
  1059.  jr three_
  1060. zero_:
  1061.  ld de,16
  1062.  ld bc,$ca00
  1063.  push hl
  1064.  add hl,bc
  1065.  ld a,0
  1066.  ld (hl),a
  1067.  add hl,de
  1068.  ld (hl),d
  1069.  add hl,de
  1070.  ld (hl),d
  1071.  add hl,de
  1072.  ld (hl),d
  1073.  pop hl
  1074.  ld a,h
  1075.  or $FC
  1076.  ld h,a
  1077.  ;add hl,bc
  1078.  xor a
  1079.  ld (hl),a
  1080.  add hl,de
  1081.  ld (hl),a
  1082.  add hl,de
  1083.  ld (hl),a
  1084.  add hl,de
  1085.  ld (hl),a
  1086.  ret
  1087.  
  1088. two_
  1089.  ld de,16
  1090.  ld bc,$ca00
  1091.  push hl
  1092.  add hl,bc
  1093.  ld a,255
  1094.  ld (hl),a
  1095.  add hl,de
  1096.  ld (hl),a
  1097.  add hl,de
  1098.  ld (hl),a
  1099.  add hl,de
  1100.  ld (hl),a
  1101.  pop hl
  1102.  
  1103.  ld a,h
  1104.  or $FC
  1105.  ld h,a
  1106.  ;ld bc,$FC00
  1107.  ;add hl,bc
  1108.  
  1109.  ld a,255
  1110.  ld (hl),a
  1111.  add hl,de
  1112.  ld a,%11000011
  1113.  ld (hl),a
  1114.  add hl,de
  1115.  ld (hl),a
  1116.  add hl,de
  1117.  ld a,255
  1118.  ld (hl),a
  1119.  ret
  1120.  
  1121. one_
  1122.  ld de,16
  1123.  ld bc,$ca00
  1124.  push hl
  1125.  add hl,bc
  1126.  ld a,%11111110
  1127.  ld (hl),a
  1128.  add hl,de
  1129.  ld a,%10000000
  1130.  ld (hl),a
  1131.  add hl,de
  1132.  ld (hl),a
  1133.  add hl,de
  1134.  xor a
  1135.  ld (hl),a
  1136.  pop hl
  1137.  
  1138.  ld a,h
  1139.  or $FC
  1140.  ld h,a
  1141.  ;ld bc,$FC00
  1142.  ;add hl,bc
  1143.  
  1144.  ld a,%00000001
  1145.  ld (hl),a
  1146.  add hl,de
  1147.  ld (hl),a
  1148.  add hl,de
  1149.  ld (hl),a
  1150.  add hl,de
  1151.  ld a,$ff
  1152.  ld (hl),a
  1153.  ret
  1154.  
  1155. three_
  1156.  ld de,16
  1157.  ld bc,$ca00
  1158.  push hl
  1159.  add hl,bc
  1160.  ld a,255
  1161.  ld (hl),a
  1162.  add hl,de
  1163.  ld (hl),a
  1164.  add hl,de
  1165.  ld (hl),a
  1166.  add hl,de
  1167.  ld (hl),a
  1168.  pop hl
  1169.  
  1170.  ld a,h
  1171.  or $FC
  1172.  ld h,a
  1173.  ;ld bc,$FC00
  1174.  ;add hl,bc
  1175.  ld a,$FF
  1176.  ld (hl),a
  1177.  add hl,de
  1178.  ld (hl),a
  1179.  add hl,de
  1180.  ld (hl),a
  1181.  add hl,de
  1182.  ld (hl),a
  1183.  ret
  1184.  
  1185. initiatelevel:
  1186. ;set up some initial variables
  1187.   ld a,55
  1188.   ld (x),a
  1189.   ld hl,$fc00
  1190.   ld (PS_addy),hl
  1191.   ld a,1
  1192.   ld (ballz),a          ;how many balls??
  1193.   
  1194.   ld a,-1               ;this shit will set up the first freakin ball
  1195.   ld hl,balla
  1196.   ld (hl),a             ;load into UP/DOWN 0
  1197.   inc hl
  1198.   ld a,1                ;scale
  1199.   ld (hl),a
  1200.   ld a,65
  1201.   inc hl                ;load into X 65
  1202.   ld (hl),a
  1203.   ld a,58
  1204.   inc hl                ;load into Y 58
  1205.   ld (hl),a
  1206.   
  1207. show_lives:
  1208.   ld hl,$0035
  1209.   ld (_penCol),hl
  1210.   ld de,lnumber+1
  1211.   ld a,(lives)
  1212.   ld l,a
  1213.   ld h,0
  1214.   ld b,2
  1215. shw_l:
  1216.   call _divHLby10
  1217.   add a,'0'
  1218.   ld (de),a
  1219.   dec de
  1220.   djnz shw_l
  1221.   ld hl,msglives
  1222.   jp _vputs
  1223.  
  1224. show_score:  ld hl,0
  1225.   ld (_penCol),hl
  1226.   ld hl,(score)
  1227.   ;jp d_zm_deci        ;display the score real quick
  1228.  
  1229. D_zm_deci:              ;remember to set (penCol) and (penRow)
  1230. d_zm_deci: 
  1231.  ld de,number+4
  1232.  ld b,5
  1233. zm_hl:
  1234.  call _divHLby10
  1235.  add a,'0'
  1236.  ld (de),a
  1237.  dec de
  1238.  djnz zm_hl
  1239.  ld hl,current_score
  1240.  call _vputs
  1241.  ret
  1242.  
  1243. cbuffer:
  1244.   xor a
  1245.   ld hl,$ca00           
  1246.   ld de,$ca01
  1247.   ld (hl),a
  1248.   ld bc,$400-1
  1249.   ldir
  1250.   ret
  1251.  
  1252. .include sdr16.inc
  1253.  
  1254. offsets_table: .db 128,64,32,16,8,4,2,1
  1255.  
  1256. Find_Pixel:             ;This is an edited EBLE-YOPP routine
  1257.   push bc
  1258.   push de               ;faster than the eble yopp routine by 04 t-states       
  1259.   
  1260.   ld de,offsets_table
  1261.   ld a,b                 
  1262.   and %00000111          
  1263.   add a,e                        
  1264.   ld e,a                ; Apply changes to L
  1265.   adc a,d               ; Adds the carry flag. 
  1266.   sub e                 ; Subtracts L
  1267.   ld d,a                ; Apply changes to H
  1268.                       
  1269.   ld hl,FP_RLD          ; HL points to FP_RLD
  1270.   ld (hl),c             ; FP_RLD = Y
  1271.   ld a,b                ; A = X
  1272.   rra                   ; /2
  1273.   rra                   
  1274.   rra                   ; /8
  1275.   rld                   
  1276.   and %00000011   
  1277.   ld l,(hl)                             
  1278.   ld h,a           
  1279.   ld a,(de)       
  1280.   pop de
  1281.   pop bc
  1282.   ret                   ; holy ... that was fast..
  1283.  
  1284. finished:
  1285.   im 1
  1286.   call _clrLCD
  1287.   ;ei            
  1288.   
  1289.   ld a,(lives)          ;give points for extra lives remaining
  1290.   srl a
  1291.   ld d,a
  1292.   ld e,0
  1293.   ld hl,(score)
  1294.   add hl,de
  1295.   ld (score),hl
  1296.  
  1297.   ld hl,$0102
  1298.   ld (_curRow),hl
  1299.   ld hl,sFinal
  1300.   call _puts
  1301.   call e_p  
  1302.   pop hl                        ;the other day i was at the skate park...
  1303.   pop hl
  1304.   jr exit_dead
  1305. died:
  1306.   xor a
  1307.   ld (p),a
  1308.   
  1309.   ld a,(lives)
  1310.   dec a
  1311.   cp 0
  1312.   jr z,exit_dead
  1313.   ld (lives),a
  1314.   xor a
  1315.   ld hl,balla+4
  1316.   ld (hl),a
  1317.   push hl 
  1318.   push hl
  1319.   jp notdead
  1320. exit_dead:
  1321.    pop hl
  1322. exit_key:  
  1323.   call CloseGray        
  1324.   ld a,($C008)
  1325.   out (2),a
  1326.   ei                    ;this seems to effect the ending sequence
  1327.   xor a
  1328.   ld (savedgame),a
  1329.   ld hl,(highscore)
  1330.   ld de,(score)
  1331.   or a
  1332.   sbc hl,de
  1333.   jr nc,leave                ;exit the game completely
  1334.   ld hl,(score)
  1335.   ld (highscore),hl
  1336. leave:
  1337.   ld hl,progname-1
  1338.   rst 20h
  1339.   rst 10h
  1340.   ex de,hl              ;set up AHL results of FIND_SYM
  1341.   ld a,b
  1342.   ld de,highscore-_asm_exec_ram+4
  1343.   add hl,de             ;add AHL,DE
  1344.   adc a,0
  1345.   ld de,highscore
  1346.   ld b,28               ;bytes to store this also overwrites the saved flag
  1347.   call RepCopy          ;It doesnt matter if it overwrites stuff after that
  1348.   
  1349.  ;----CLEAN UP----
  1350.   set 1,(iy+$0d)
  1351.   call _clrScrn
  1352.   call cbuffer
  1353. backtotheshellassemblygame ;go back to the shell you crazy game  
  1354.   ret
  1355.  
  1356. RepCopy:
  1357.   push af
  1358.   push hl
  1359.   call $46C3            ; if you must know... this turns AHL into asic
  1360.   ld a,(de)             ; There exist another RomCall that is specifically
  1361.   ld (hl),a             ; for converting ABS pointers to ASIC, but i didnt
  1362.   pop hl                ; feel like finding it, cause i really dont care ;)
  1363.   pop af
  1364.   call $4637
  1365.   inc de
  1366.   djnz RepCopy
  1367.   ret                                                                     
  1368.  
  1369. teacher:
  1370.   call CloseGray
  1371.   ld a,($C008)
  1372.   out (2),a
  1373.   ei
  1374.   ld hl,savedgame
  1375.   ld a,1
  1376.   ld (hl),a
  1377.   inc hl
  1378.   ld de,data
  1379.   ld b,32
  1380. compress:
  1381.   push bc
  1382.   ld c,0
  1383.   ld b,4
  1384. compress2:
  1385.   rlc c
  1386.   rlc c
  1387.   ld a,(de)
  1388.   or c
  1389.   ld c,a
  1390.   inc de
  1391.   djnz compress2
  1392.   ld (hl),c
  1393.   inc hl
  1394.   pop bc
  1395.   djnz compress
  1396.   ex de,hl
  1397.   ld hl,_textShadow
  1398.   ld bc,4
  1399.    ldir
  1400.   ld hl,progname-1
  1401.   rst 20h
  1402.   rst 10h
  1403.   ex de,hl              ;set up AHL results of FIND_SYM
  1404.   ld a,b
  1405.   ld de,savedgame-_asm_exec_ram+4
  1406.   add hl,de             ;add AHL,DE
  1407.   adc a,0
  1408.   ld de,savedgame
  1409.   ld b,37               ; bytes to store
  1410.   call RepCopy          ;copy bytes from de to AHL until B=0
  1411.  
  1412.   set 1,(iy+$0d)
  1413.   call _clrScrn
  1414.   call cbuffer
  1415.   call $4a95
  1416.   jp _jforcecmdnochar
  1417.  
  1418. fixself:  
  1419.   xor a
  1420.   ld b,3
  1421.   ld hl,selfmodify
  1422. fixs:  
  1423.   ld (hl),a
  1424.   inc hl
  1425.   djnz fixs
  1426.   ret
  1427.  
  1428. leveldata           ;there are eight 
  1429.  
  1430.   .db %00000000,%00000000,%00000000,%00000000
  1431.   .db %00000000,%00000000,%00000000,%00000000
  1432.   .db %00010101,%01010101,%01010101,%01010100
  1433.   .db %00010101,%01010101,%01010101,%01010100
  1434.   .db %00000000,%00000000,%00000000,%00000000
  1435.   .db %00001010,%00000010,%10000000,%10100000
  1436.   .db %00000000,%00000000,%00000000,%00000000
  1437.   .db %00000000,%00000000,%00000000,%00000000
  1438.   
  1439.   .db %00000000,%00000000,%00000000,%00000000
  1440.   .db %00010001,%00010001,%00010001,%00010001
  1441.   .db %01000100,%01000100,%01000100,%01000100
  1442.   .db %00010001,%00010001,%00010001,%00010001
  1443.   .db %01000100,%01000100,%01000100,%01000100
  1444.   .db %00010001,%00010001,%00010001,%00010001
  1445.   .db %00000000,%00000000,%00000000,%00000000
  1446.   .db %00000000,%00000000,%00000000,%00000000
  1447.  
  1448.   .db %11110000,%00000000,%00000000,%00001111
  1449.   .db %11000101,%01000000,%00000001,%01010011
  1450.   .db %00000101,%01000101,%01010001,%01010000
  1451.   .db %00000101,%01000111,%11010001,%01010000
  1452.   .db %00000101,%01000111,%11010001,%01010000
  1453.   .db %00000000,%00000101,%01010000,%00000000
  1454.   .db %00000000,%00000000,%00000000,%00000000
  1455.   .db %00000000,%00000000,%00000000,%00000000
  1456.   
  1457.   .db %01010101,%00100001,%01010001,%01010100
  1458.   .db %01010101,%00100001,%00010001,%00000100
  1459.   .db %00010100,%00100001,%00010001,%00000000
  1460.   .db %00010100,%00100001,%11010001,%01010100
  1461.   .db %00010100,%00100001,%00010001,%00000100  ;ti86
  1462.   .db %00010100,%00100001,%00010001,%00000100
  1463.   .db %00010100,%00100001,%00010001,%00000100
  1464.   .db %00010100,%00100001,%01010001,%01010100
  1465.  
  1466.   .db %11111101,%00000000,%00000000,%01111111
  1467.   .db %11110101,%00000000,%00000000,%00011111
  1468.   .db %11010000,%00000001,%01000000,%00000111
  1469.   .db %00000000,%00010100,%00010100,%00000000
  1470.   .db %00000000,%01000000,%00000001,%00000000
  1471.   .db %00000000,%01000000,%00000001,%00000000
  1472.   .db %00000000,%00010100,%00010100,%00000000
  1473.   .db %00000000,%00000001,%01000000,%00000000
  1474.  
  1475.   .db %01010100,%11110000,%00001111,%00010101
  1476.   .db %01010100,%11000000,%00000011,%00010101
  1477.   .db %01010100,%11000000,%00000011,%00010101
  1478.   .db %01010100,%00000000,%00000000,%00010101
  1479.   .db %01010100,%00000000,%00000000,%00010101
  1480.   .db %01010100,%00000000,%00000000,%00010101
  1481.   .db %01010100,%00000000,%00000000,%00010101
  1482.   .db %11111111,%11000000,%00000011,%11111111
  1483.                               
  1484.   .db %01000000,%11110001,%01000000,%01010000
  1485.   .db %01000000,%11110001,%01000000,%01010000
  1486.   .db %01000100,%00000001,%01000000,%01010000
  1487.   .db %01010000,%01010001,%01000000,%01010000
  1488.   .db %01010000,%01010001,%01000000,%01010000
  1489.   .db %01000100,%01010001,%01000000,%01010000
  1490.   .db %01000100,%01010001,%01010100,%01010101
  1491.   .db %01000000,%01010001,%01010100,%01010101
  1492.  
  1493.   .db %01010101,%00000000,%00000001,%01010000
  1494.   .db %01010101,%00010100,%00000001,%01010100
  1495.   .db %01000000,%00010101,%01000001,%00000101
  1496.   .db %01000000,%00010100,%01000001,%00000101
  1497.   .db %01010100,%00010100,%01000001,%00000101
  1498.   .db %01000000,%00010100,%01000001,%00000101
  1499.   .db %01010101,%00010100,%01000001,%01010100
  1500.   .db %01010101,%00010100,%01000001,%01010000
  1501.  
  1502. paddle:
  1503.   .db 2,4
  1504.   .db %01111111,%11111110               ;bitmap for normal paddle
  1505.   .db %11000000,%00000011               ;kinda dark
  1506.   .db %11111111,%11111111               ;kinda dark
  1507.   .db %01111111,%11111110
  1508. paddle2:
  1509.   .db 2,4
  1510.   .db %01111111,%11111110               ;really light
  1511.   .db %10111111,%11111101
  1512.   .db %10000000,%00000001
  1513.   .db %01111111,%11111110
  1514.  
  1515. bpaddle:
  1516.   .db 4,4
  1517.   .db %01111111,%11111111,%11111111,%11111110
  1518.   .db %10000000,%00000000,%00000000,%00000001
  1519.   .db %11111111,%11111111,%11111111,%11111111
  1520.   .db %01111111,%11111111,%11111111,%11111110
  1521. bpaddle2:
  1522.   .db 4,4  
  1523.   .db %01111111,%11111111,%11111111,%11111110
  1524.   .db %11111111,%11111111,%11111111,%11111111
  1525.   .db %10000000,%10000000,%00000000,%00000001
  1526.   .db %01111111,%11111111,%11111111,%11111110
  1527.  
  1528. bonus1:                 ;extra vida
  1529.   .db %01111110
  1530.   .db %11000011
  1531.   .db %01111110
  1532.   .db %00000000
  1533.   .db %01111100
  1534.   .db %10000001
  1535.   .db %01111110
  1536.   .db 0
  1537.  
  1538.  
  1539. bonus2:                 ;50 points
  1540.   .db %11110010
  1541.   .db %11000101
  1542.   .db %00110101
  1543.   .db %11100010
  1544.   .db %11110010
  1545.   .db %11000101
  1546.   .db %00110101
  1547.   .db %11100010
  1548.  
  1549.  
  1550. bonus3:                 ;invisible wall
  1551.   .db %11000011
  1552.   .db %00111100
  1553.   .db %00111100
  1554.   .db %11000011
  1555.   .db %11000011
  1556.   .db %00111100
  1557.   .db %00111100
  1558.   .db %11000011
  1559.  
  1560. bonus4:                 ;friggin wide paddle
  1561.   .db %00100100
  1562.   .db %01000010
  1563.   .db %11111111
  1564.   .db %01000010
  1565.   .db %00100100
  1566.   .db %01000010
  1567.   .db %11111111
  1568.   .db %01000010
  1569.  
  1570. move_table:             ;32 different because the big paddle is 32 wide
  1571.  .db      -3,-3
  1572.  .db      -2,-2,-2,-2,-2,-2
  1573.  .db      -1,-1,-1,-1,-1,-1
  1574.  .db      0,0,0,0                     ;dont ask
  1575.  .db      1,1,1,1,1,1
  1576.  .db      2,2,2,2,2,2
  1577.  .db      3,3
  1578.  
  1579.  
  1580. Author          .db "by: James Rubingh",0
  1581. progname        .db 8,"Arkanoid"             ;for the addressing 
  1582. arktitle:       .db 8,"arktitle"
  1583. current_score:  .db "Score: "
  1584. number:         .db 0,0,0,0,0,0          ;for putting numbers on screen
  1585. msglives:       .db "Lives: "            
  1586. lnumber:        .db 0,0,0                ;Only double digits, then a null
  1587. choosespeed:    .db "Select Speed F1- F5",0
  1588. e_pause:        .db "Press 2nd",0
  1589. sFinal:         .db "Thats It, You Win!",0
  1590. hightext:       .db "High",0               
  1591. TITLE:          .db "Arkanoid v1.0",0
  1592.  
  1593. ;-----Stuff that stays the same when you exit
  1594. highscore:      .dw 0                 
  1595. Title           .db "Arkanoid v.8 ACZ",0
  1596. savedgame:      .db 0                    ;saved game data
  1597.  
  1598.   .db 0,0,0,69,0,0,0,0,0,0,0,0,0,0,0,0
  1599.   .db 0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0
  1600.  
  1601. savedscore:     .dw 420  ;also the saved lives, level
  1602.                 .dw 0
  1603. .include gray.h          ;grayscale IM 2 routines by Dux Gregis
  1604.                          ;thanks Dux, you are the man
  1605. ;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  1606. ;    James Rubingh  James@acz.org
  1607. ; http://members.tripod.com/~jaymzroo
  1608. ;       AOL_SN:power2ezln
  1609. ;  ACZ member -Assembly Coders Zenith-
  1610. ;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  1611.  
  1612. ;  Please share if you think there are any ways to optomize this. 
  1613.  
  1614.  .end
  1615.