home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d537 / bootgames.lha / BootGames / InstallSquash.s < prev    next >
Text File  |  1991-08-26  |  15KB  |  785 lines

  1. ************************************************************
  2. *
  3. *  BOOTBLOCK INSTALLER (C) PAUL HAYTER 1990
  4. *   WORKS FROM BOTH CLI AND WORKBENCH
  5. *
  6. ************************************************************
  7.  
  8. * This one is for installing squash!
  9.  
  10. _AbsExecBase    equ    4
  11. _LVOFindTask    equ    -294
  12. pr_CLI        equ    172
  13. pr_MsgPort    equ    92
  14. _LVOWaitPort    equ    -384
  15. _LVOGetMsg    equ    -372
  16. _LVOForbid    equ    -132
  17. _LVOReplyMsg    equ    -378
  18.  
  19.  
  20. startup:            ; reference for Wack users
  21.     move.l   sp,initialSP   ; initial task stack pointer
  22.     move.l   d0,dosCmdLen
  23.     move.l   a0,dosCmdBuf
  24.  
  25.     ;------ get Exec's library base pointer:
  26.     move.l   _AbsExecBase,a6
  27.  
  28.     ;------ get the address of our task
  29.     suba.l   a1,a1
  30.     jsr    _LVOFindTask(a6)
  31.     move.l   d0,a4
  32.  
  33.     ;------ are we running as a son of Workbench?
  34.     tst.l   pr_CLI(A4)
  35.     beq.s   fromWorkbench
  36.  
  37. ;=======================================================================
  38. ;====== CLI Startup Code ===============================================
  39. ;=======================================================================
  40. fromCLI:
  41.  
  42.     ;------   collect parameters:
  43.     move.l   dosCmdLen,d0
  44.     move.l   dosCmdBuf,a0
  45.  
  46.  
  47.     ;------ call C main entry point
  48.     jsr   _main
  49.  
  50.     ;------ return success code:
  51.     moveq.l   #0,D0
  52.     move.l   initialSP,sp   ; restore stack ptr
  53.     rts
  54.  
  55. ;=======================================================================
  56. ;====== Workbench Startup Code =========================================
  57. ;=======================================================================
  58. fromWorkbench:
  59.  
  60.     ;------ we are now set up.  wait for a message from our starter
  61.     bsr.s   waitmsg
  62.  
  63.     ;------ save the message so we can return it later
  64.     move.l   d0,_WBenchMsg
  65.  
  66.     ;------ push the message on the stack for wbmain
  67.     move.l   d0,-(SP)
  68.     clr.l   -(SP)      indicate: run from Workbench
  69.  
  70. domain:
  71.     jsr   _main
  72.     moveq.l   #0,d0      Successful return code
  73.  
  74.  
  75. *
  76. ************************************************************************
  77.  
  78. exit2:
  79.     move.l  initialSP,SP   ; restore stack pointer
  80.     move.l   d0,-(SP)   ; save return code
  81.  
  82.     ;------ close DOS library:
  83.     move.l   _AbsExecBase,A6
  84.  
  85.     ;------ if we ran from CLI, skip workbench cleanup:
  86.     tst.l   _WBenchMsg
  87.     beq.s   exitToDOS
  88.  
  89.  
  90.     ;------ return the startup message to our parent
  91.     ;------   we forbid so workbench can't UnLoadSeg() us
  92.     ;------   before we are done:
  93.     jsr    _LVOForbid(a6)
  94.     move.l   _WBenchMsg,a1
  95.     jsr    _LVOReplyMsg(a6)
  96.  
  97.     ;------ this rts sends us back to DOS:
  98. exitToDOS:
  99.     move.l   (SP)+,d0
  100.     rts
  101.  
  102.  
  103. ;-----------------------------------------------------------------------
  104. ; This routine gets the message that workbench will send to us
  105. ; called with task id in A4
  106.  
  107.  
  108. waitmsg:
  109.     lea   pr_MsgPort(A4),a0     * our process base
  110.     jsr    _LVOWaitPort(a6)
  111.     lea   pr_MsgPort(A4),a0     * our process base
  112.     jsr    _LVOGetMsg(a6)
  113.     rts
  114.  
  115.  
  116. ************************************************************************
  117.  
  118. *   DATA
  119.  
  120. ************************************************************************
  121.  
  122.  
  123.  
  124. initialSP   dc.l   0
  125. _WBenchMsg   dc.l   0
  126.  
  127. dosCmdLen   dc.l   0
  128. dosCmdBuf   dc.l   0
  129.  
  130. _main
  131.  
  132. ********PUT YOUR PROGRAM HERE***************************
  133. ;INSTALL PROGRAM WITH REQUESTER    
  134.  
  135.  
  136. ************************************************************************
  137. *
  138. * External EXEC references
  139. _LVOSupervisor    EQU    -6*5
  140. _LVOFindResident    EQU    -6*16
  141. _LVOAllocMem    EQU    -6*33
  142. _LVOFreeMem    EQU    -6*35
  143. ;_LVOFindTask    EQU    -6*49
  144. _LVOOpenLibrary    EQU    -6*68
  145. _LVOCloseLibrary    EQU    -6*69
  146. _LVOOpenDevice    EQU    -6*74
  147. _LVOCloseDevice    EQU    -6*75
  148. _LVODOIO        EQU    -6*76
  149. *
  150.  
  151. * Intuition Stuff
  152. _LVOAutoRequest    equ    -348
  153. _LVODisplayBeep    equ    -96
  154.  
  155.  
  156.  
  157.  
  158. *
  159. * Setup global registers
  160.     MOVEA.L    4,A6        ; ExecBase
  161. *
  162. * Open intuition
  163.     MOVEQ    #0,D0
  164.     LEA    intname(PC),A1
  165.     JSR    _LVOOpenLibrary(A6)
  166.     MOVEA.L    D0,A6
  167.     move.l    d0,intbase
  168.     TST.L    D0
  169.     BNE.S    LibraryOpen
  170.     rts
  171.  
  172. LibraryOpen
  173.     sub.l    a0,a0
  174.     lea    bodytext(pc),a1
  175.     lea    PText(pc),a2
  176.     lea    NText(pc),a3
  177.     moveq    #0,d0
  178.     moveq    #0,d1
  179.     move.l    #350,d2
  180.     move.l    #100,d3
  181.     jsr    _LVOAutoRequest(a6)
  182.     move.l    $4,a6
  183.     sub.l    a4,a4
  184.     moveq    #1,d4
  185.     tst.l    d0
  186.     beq    MadeIt
  187.  
  188. *********************
  189.         SUBA.L    A4,A4        ; Pointer to memory buffer
  190.         LEA    DiskIOReq(PC),A3    ; Pointer to disk I/O Request
  191.         MOVEQ    #0,D6        ; Completion result
  192. ;        MOVE.L    A7,D5        ; Stack pointer
  193.         MOVEQ    #1,D4        ; Disk opened flag <>0 <>open
  194.  
  195.  
  196.  
  197.         MOVE.L    #$10002,D1
  198.         MOVE.L    #1024,D0    ; Boot block size
  199.         JSR    _LVOAllocMem(A6)
  200.         TST.L    D0
  201.         Bne.S    keepgoing
  202.         bsr    MissedIt
  203.         bra    MadeIt
  204. keepgoing
  205.         MOVEA.L    D0,A4
  206. *
  207. * Now we copy the payload into the memory buffer. While doing so we calculate
  208. * the checksum which we will patch into the buffer after the copy.
  209.         MOVEQ    #0,D2        ; Zero checksum
  210.         MOVE.l    #PayloadSize/4-1,D0
  211.         MOVEA.L    A4,A1
  212.         LEA    ThePayload(PC),A0
  213. p1        MOVE.L    (A0)+,D1
  214.         MOVE.L    D1,(A1)+    ; Shove into buffer
  215.         ADD.L    D1,D2        ; Bump checksum
  216.         BCC.S    p2        ; Did it rollover?
  217.         ADDQ.L    #1,D2        ; Bump by 1 if it rolled
  218. p2        DBF    D0,p1
  219. *
  220. * Patch checksum into buffer
  221.         NOT.L    D2
  222.         MOVE.L    D2,4(A4)
  223. *
  224. * Init the port to use to access the trackdisk.device
  225.         SUBA.L    A1,A1
  226.         JSR    _LVOFindTask(A6)    ;get current task
  227.         LEA    DiskPort(PC),A0
  228.         MOVE.L    D0,16(A0)
  229. *
  230. * Open the disk device
  231.         MOVEQ    #0,D1        ;flags
  232.         MOVEQ    #0,D0        ;unit number
  233.         MOVEA.L    A3,A1        ;ptr to IOreq
  234.         LEA    DiskName(PC),A0    ;TrackDisk.device
  235.         JSR    _LVOOpenDevice(A6)
  236.         MOVE.L    D0,D4            ; Record if we opened device
  237.         Beq.S    write_boot
  238.         bsr.s    MissedIt
  239.         bra.s    MadeIt
  240. *
  241. * Write payload to the disk 
  242. write_boot    MOVEA.L    A3,A1
  243.         MOVE.L    A4,40(A1)        ; Pointer to Payload buffer
  244.         JSR    _LVODOIO(A6)
  245.         TST.L    D0
  246.         Beq.S    flush_buffer
  247.         bsr.s    MissedIt
  248.         bra.s    MadeIt
  249.  
  250. *
  251. * Flush data from track buffer onto the disk
  252. flush_buffer    MOVEA.L    A3,A1
  253.         MOVE.W    #4,28(A1)
  254.         JSR    _LVODOIO(A6)
  255.         TST.L    D0
  256.         Beq.S    Motor_off
  257.         bsr.s    MissedIt
  258. *
  259. * Shutdown the motor
  260. Motor_off        MOVEA.L    A3,A1
  261.         MOVE.W    #9,28(A1)
  262.         CLR.L    36(A1)
  263.         JSR    _LVODOIO(A6)
  264.         TST.L    D0
  265.         BEQ.S    MadeIt
  266.         bsr.s    MissedIt
  267.     
  268. * Send the dog home
  269. MadeIt        MOVEA.L    intbase(pc),A1
  270.         JSR    _LVOCloseLibrary(A6)
  271. *
  272. * Free up the memory buffer if it was allocated
  273.         MOVE.L    A4,D0
  274.         BEQ.S    p4
  275.         MOVEA.L    D0,A1
  276.         MOVE.L    #1024,D0
  277.         JSR    _LVOFreeMem(A6)
  278. *
  279. * Close the disk if we opened it
  280. p4        TST.L    D4
  281.         BNE.S    p5
  282.         MOVEA.L    A3,A1
  283.         JSR    _LVOCloseDevice(A6)
  284. p5        MOVE.L    D6,D0
  285. ;        MOVEA.L    D5,A7
  286.         RTS
  287.  
  288.  
  289. MissedIt    MOVE.L    D0,D6        ; Record error
  290.     move.l    intbase(pc),a6
  291.     move.l    56(a6),a0
  292.     jsr    _LVODisplayBeep(a6)
  293.     move.l    $4,a6
  294.     rts
  295.         CNOP    0,4
  296. *******************************************************************
  297. *
  298. *    BOOTBLOCK CODE GOES HERE
  299. *
  300. ********************************************************************
  301. * Payload, this is the code written to the disk's boot block
  302. PayloadStart
  303. ThePayload
  304. **************************************************************
  305.  
  306. ;SQUASH in your Bootblock V4.3 (Speeds up after every 5 balls)
  307. ;Copyright 1990 by Paul Hayter
  308. ;This code is public DOMAIN
  309. ;
  310. ;exit by pressing key and now has mouse control(Thanks Wayne!)
  311. ;
  312. ;This program directly accesses hardware registers and then
  313. ;returns control to the OS
  314. ;
  315. ;
  316. ;january 1990
  317.  
  318. vposr    equ    $4
  319. clxdat    equ    $00e
  320. intreqr    equ    $01e
  321. copjmp1    equ    $088
  322. diwstrt    equ    $08e
  323. diwstop    equ    $090
  324. ddfstrt    equ    $092
  325. ddfstop    equ    $094
  326. dmacon    equ    $096
  327. clxcon    equ    $098
  328. intena    equ    $09a
  329. intreq    equ    $09c
  330. bpl1pth    equ    $0e0
  331. bplcon0    equ    $100
  332. bplcon1    equ    $102
  333. bplcon2    equ    $104
  334. bpl1mod    equ    $108
  335. bpl2mod    equ    $10a
  336. spr0pth    equ    $120
  337. spr1pth    equ    $124
  338. spr2pth    equ    $128
  339. spr3pth    equ    $12c
  340. spr4pth    equ    $130
  341. spr5pth    equ    $134
  342. spr6pth    equ    $138
  343. spr7pth    equ    $13c
  344. color00    equ    $180
  345. color01    equ    $182
  346. color02    equ    $184
  347. color03    equ    $186
  348. color16    equ    $1a0
  349. color17    equ    $1a2
  350. color18    equ    $1a4
  351. color19    equ    $1a6
  352. color21    equ    $1aa
  353. joy1dat    equ    $00c
  354. joy0dat    equ    $00a
  355.  
  356. bat_height equ    20
  357. bat_movement equ    3
  358.  
  359. *_LVOAllocMem    equ    -198
  360. *_LVOFreeMem    equ    -210
  361.  
  362.  
  363.  
  364. *    JMP start (semi colon me to asm for bootblock)
  365. bbstart:    dc.b 'DOS',0    THIS IS THE STANDARD BOOTBLOCK CODE
  366.     dc.l 0        This is the bootblock checksum. You'll need a machine code mon to fix this
  367.     dc.l $370
  368.     movem.l d0-d7/a0-a6,-(a7)
  369.     bsr start
  370.     movem.l (a7)+,d0-d7/a0-a6
  371.     lea dosname(pc),a1
  372.     jsr -$60(a6)
  373.     move.l d0,a0
  374.     move.l $16(a0),a0
  375.     moveq #0,d0
  376.     rts
  377.     
  378. dosname:    dc.b 'dos.library',0
  379.     even
  380.  
  381.  
  382. memsize    equ 8192+100
  383.  
  384. start:    move.l 4,a6    Allocate mem for 1 bp and sprite0
  385.     move.l #$10002,d1
  386.     move.l #memsize,d0
  387.     jsr _LVOAllocMem(a6)    allocmem
  388.     move.l d0,a1
  389.     move.b $bfec01,d7    d7 holds old key code DON'T modify
  390.     lea $dff000,a0   LEAVE A0 & A1 & A3 ALONE
  391.     lea start(pc),a3    Have base pointer
  392.     bsr zero_score
  393.     lea reg_table(pc),a2
  394.     bsr load_regs
  395.     bsr make_sprite0
  396.     bsr draw_screen
  397.     bsr showSC    Draw the score
  398.     bsr active_screen    Main loop
  399.     bsr restore_regs
  400.     move.l #memsize,d0    Deallocate memory
  401.     jsr _LVOFreeMem(a6)
  402.     moveq #0,d0    NEED THIS to return OK
  403.     rts
  404.     
  405. active_screen:
  406. ;The 68000 behaves as the Copper being in a constant loop in sync
  407. ;with the vertical blank
  408.     
  409.     move.l a1,bpl1pth(a0)
  410.     move.w #$8120,dmacon(a0) bp's & spr's on
  411. l1:    andi.w #$0020,intreqr(a0) WAIT FOR VERTICAL BLANK
  412.     beq.s l1
  413.     move.w #$0020,intreq(a0) TURN VB OFF
  414.     move.l a1,bpl1pth(a0)
  415.     bsr set_sprite_ptrs
  416.     bsr collisions
  417.     bsr move_ball
  418.     bsr mouse_move_bat
  419.     
  420. key:    cmp.b $bfec01,d7    exit if any key pressed
  421.     beq.s l1
  422.     rts
  423.  
  424. zero_score:
  425.     lea chargen(pc),a2
  426.     move.l a2,char_ptr0-start(a3)
  427.     move.l a2,char_ptr1-start(a3)
  428.     rts
  429.     
  430. restore_regs:
  431.     move.w d1,copjmp1(a0)    dummy strobe
  432.     move.w #$81f0,dmacon(a0)    restore DMA
  433.     move.w #$c000,intena(a0)    Turn all ints back on
  434.     rts
  435.  
  436.  
  437. load_regs:
  438. ;enter with a2 pointing to table
  439.     moveq #0,d0
  440.     move.b (a2)+,d0
  441.     cmpi.b #$ff,d0
  442.     bne.s l4
  443.     rts
  444. l4:    asl.w #1,d0
  445.     move.b (a2)+,d1
  446.     asl.w #8,d1
  447.     move.b (a2)+,d1
  448.     move.w d1,0(a0,d0)
  449.     bra.s load_regs
  450.  
  451. reg_table:
  452.     dc.b    dmacon/2,$01,$a0
  453.     dc.b    intena/2,$40,$00
  454.     dc.b    color00/2,$00,$00
  455.     dc.b    color01/2,$0f,$ff
  456.     dc.b    color21/2,$0b,$f0    ball color
  457.     dc.b    color18/2,$0f,$f0    bat color
  458.     dc.b    bplcon0/2,$12,$00
  459.     dc.b    bplcon1/2,$0,$0
  460.     dc.b    ddfstrt/2,$00,$38
  461.     dc.b    ddfstop/2,$00,$d0
  462.     dc.b    diwstrt/2,$2c,$81
  463.     dc.b    diwstop/2,$f4,$c1
  464.     dc.b    $ff    ;END                
  465.     even            very important!!!
  466.  
  467. draw_screen:
  468.     move.l a1,a2    screen loc DRAW TOP BAR
  469.     moveq #-1,d0
  470.     moveq #$50,d1
  471. l5:    move.l d0,(a2)+
  472.     subq.b #1,d1
  473.     bne.s l5
  474.     lea $1e00(a1),a2  DRAW BOTTOM BAR
  475.     moveq #$50,d1
  476. l6:    move.l d0,(a2)+
  477.     subq.b #1,d1
  478.     bne.s l6
  479.     move.l a1,a2  DRAW LEFT WALL
  480.     move.b #200,d1
  481. l7:    move.b d0,(a2)
  482.     lea 40(a2),a2
  483.     subq.b #1,d1
  484.     bne.s l7
  485.     rts
  486.     
  487. set_sprite_ptrs:
  488.     lea sprite0(a1),a2
  489.     move.l a2,spr0pth(a0)
  490.     lea sprite2(pc),a2
  491.     move.l a2,spr2pth(a0)
  492.     lea sprite1(pc),a2
  493.     move.l a2,spr1pth(a0)
  494.     move.l a2,spr3pth(a0)
  495.     move.l a2,spr4pth(a0)
  496.     move.l a2,spr5pth(a0)
  497.     move.l a2,spr6pth(a0)
  498.     move.l a2,spr7pth(a0)
  499.     rts
  500.  
  501. convertxy:
  502. ;writes the appropriate values to the sprite data table based on x,y coords    
  503. ;ENTRY    d0.w= x
  504. ;    d1.w= y
  505. ;    a2.l= sprite ptr
  506. ;    d2.w= height
  507.     moveq #0,d3
  508.     add.w d1,d2
  509.     move.b d1,(a2)
  510.     move.b d2,2(a2)
  511.     asl.w #2,d1
  512.     asl.w #1,d2
  513.     andi.w #$0400,d1
  514.     andi.w #$0200,d2
  515.     or.w d1,d2
  516.     lsr.w #8,d2
  517.     move.w d0,d1
  518.     andi.b #$1,d1
  519.     or.b d1,d2
  520.     lsr.w #1,d0
  521.     move.b d0,1(a2)
  522.     move.b d2,3(a2)
  523.     rts
  524.         
  525. move_ball:
  526.     move.w ballx-start(a3),d0
  527.     move.w bally-start(a3),d1
  528.     add.w ballxdir-start(a3),d0
  529.     add.w ballydir-start(a3),d1
  530.     move.w d0,ballx-start(a3)        BALLX
  531.     move.w d1,bally-start(a3)        BALLY
  532.     moveq #4,d2
  533.     lea sprite2(pc),a2
  534.     bra convertxy
  535.     
  536.         
  537. collisions:
  538.     cmpi.w #232,bally-start(a3)    bottom wall
  539.     blt.s l9
  540.     neg.w ballydir-start(a3)
  541. l9:    cmpi.w #52,bally-start(a3)    top wall
  542.     bgt.s l10
  543.     neg.w ballydir-start(a3)
  544. l10:    cmpi.w #136,ballx-start(a3)    left wall
  545.     bgt.s l19
  546.     neg.w ballxdir-start(a3)
  547. l19:    cmpi.w #450,ballx-start(a3)    behind the bat
  548.     blt.s l11
  549.     neg.w ballxdir-start(a3)
  550.     bsr zero_score
  551.     bsr init_ball_speed
  552.     bsr showSC
  553. l11:    move.w clxdat(a0),d0    Check collision spr0 to spr2
  554.     andi.w #$200,d0
  555.     beq.s l14
  556.     tst.w ballxdir-start(a3)
  557.     bmi.s l14
  558.     bsr change_score
  559.     bsr difficulty
  560.     neg.w ballxdir-start(a3)    HIT BAT
  561. l14:    rts
  562.  
  563. mouse_move_bat:
  564.     move.w joy0dat(a0),d0    
  565.     lsr.w #8,d0
  566.     move.b old_mouse-start(a3),d1
  567.     sub.b d0,d1    previous-current
  568.     ext.w d1
  569. l41:    move.b d0,old_mouse-start(a3)
  570.     
  571.     sub.w d1,baty-start(a3)
  572.     move.w batx-start(a3),d0
  573.     move.w baty-start(a3),d1
  574.     lea sprite0(a1),a2
  575.     moveq #bat_height,d2
  576.     bra convertxy
  577.  
  578.     
  579. expand_font:
  580. ;Draws character from table to screen. 4x bigger. Each char =6 bytes    
  581. ;ENTRY    a2= screen addr to write to
  582. ;    a4= ptr to char to print
  583.     moveq #6,d3
  584. l15:    move.b (a4)+,d0
  585.     moveq #8,d2
  586. l16:    asl.l #4,d1
  587.     asl.b #1,d0
  588.     bcc.s l17
  589.     ori.b #$0f,d1
  590. l17:    subq.b #$1,d2
  591.     bne.s l16
  592.     move.l d1,(a2)
  593.     move.l d1,40(a2)
  594.     move.l d1,80(a2)
  595.     move.l d1,120(a2)
  596.     lea 160(a2),a2
  597.     subq.b #1,d3
  598.     bne.s l15
  599.     rts
  600.     
  601. change_score:
  602.     addq.l #6,char_ptr0-start(a3)        LSDigit
  603.     lea endchars(pc),a2
  604.     cmp.l char_ptr0-start(a3),a2
  605.     bne.s showSC
  606.     lea chargen(pc),a2
  607.     move.l a2,char_ptr0-start(a3)
  608.     addq.l #6,char_ptr1-start(a3)        MSdigit
  609. showSC:    lea 6032(a1),a2
  610.     move.l char_ptr1-start(a3),a4
  611.     bsr expand_font
  612.     lea 6036(a1),a2
  613.     move.l char_ptr0-start(a3),a4
  614.     bra expand_font
  615.  
  616.  
  617. difficulty:
  618. ;speed the ball up a bit after every 10 hits
  619.     subq #1,iteration-start(a3)    
  620.     beq.s l20
  621.     rts
  622. l20:    move.w #5,iteration-start(a3)
  623.     moveq #1,d2
  624.     move.w ballxdir-start(a3),d0
  625.     bpl.s l21
  626.     neg.w d2
  627. l21:    add.w d2,ballxdir-start(a3)
  628.     moveq #1,d2
  629.     move.w ballydir-start(a3),d0
  630.     bpl.s l22
  631.     neg.w d2
  632. l22:    add.w d2,ballydir-start(a3)
  633.     rts
  634.     
  635. init_ball_speed:
  636.     move.w #-2,ballxdir-start(a3)
  637.     move.w #2,ballydir-start(a3)
  638.     move.w #5,iteration-start(a3)
  639.     rts
  640.     
  641. make_sprite0:
  642.     lea sprite0(a1),a2
  643.     move.l #$64c07400,(a2)+
  644.     moveq #bat_height,d0
  645.     move.l #$0000f000,d1
  646. l30:    move.l d1,(a2)+
  647.     subq #1,d0
  648.     bne.s l30
  649.     clr.l (a2)
  650.     rts
  651.     
  652. sprite0    equ     $2000    8k past screen start    
  653.  
  654. sprite2:    dc.w $5052,$5400
  655.     dc.w $6000,0
  656.     dc.w $f000,0
  657.     dc.w $f000,0
  658.     dc.w $6000,0
  659.     dc.w $00,0
  660. sprite1:    dc.w $0,0
  661.  
  662. char_ptr0: dc.l 0
  663. char_ptr1: dc.l 0
  664. ballx:    dc.w 384
  665. bally:    dc.w 64
  666. ballxdir: dc.w -2
  667. ballydir: dc.w 2
  668. batx:    dc.w 364
  669. baty:    dc.w 130
  670. old_mouse:dc.b 0
  671.  
  672. chargen:    dc.b $3c,$66,$66,$66,$66,$3c         '0'
  673.     dc.b $18,$38,$18,$18,$18,$7e        '1'
  674.     dc.b $3c,$66,$06,$3c,$60,$7e        '2'
  675.     dc.b $7c,$06,$1c,$06,$06,$7c        '3'
  676.     dc.b $1c,$3c,$6c,$cc,$fe,$0c        '4'
  677.     dc.b $7e,$60,$7c,$06,$66,$3c        '5'
  678.     dc.b $3e,$60,$7c,$66,$66,$3c        '6'
  679.     dc.b $7e,$06,$0c,$18,$30,$30
  680.     dc.b $3c,$66,$3c,$66,$66,$3c
  681.     dc.b $3c,$66,$3e,$06,$0c,$38        '9'
  682. endchars:
  683. ;make sure there is a gap here(don't put EVEN on the same line as endchars
  684.  
  685.     even    VERY IMPORTANT 
  686.  
  687. iteration: dc.w 5
  688. ego:    dc.b 'Squash4.3(c)PLH90'
  689.  
  690.  
  691.  
  692.  
  693.     cnop    0,4    
  694. ***************************************************************
  695. PayloadEnd
  696. PayloadSize    EQU    PayloadEnd-PayloadStart
  697.     cnop 0,4
  698.     
  699. DiskName    DC.B    'trackdisk.device',0
  700.  
  701. DiskPort    DC.L    0    ;0
  702.         DC.L    0    ;4
  703.         DC.W    $0400    ;8
  704.         DC.L    0    ;10
  705.         DC.B    0    ;14
  706.         DC.B    31    ;15
  707.         DC.L    0    ;16    Task addr goes here
  708. LH1        DC.L    LH2    ;20
  709. LH2        DC.L    0    ;24
  710.         DC.L    LH1    ;28
  711.         DC.B    0    ;32
  712.         DC.B    0    ;33
  713.  
  714. DiskIOReq        DC.L    0    ;0
  715.         DC.L    0    ;4
  716.         DC.B    5    ;8
  717.         DC.B    0    ;9
  718.         DC.L    0    ;10
  719.         DC.L    DiskPort ;14
  720.         DC.W    48    ;18
  721.         DC.L    0    ;20
  722.         DC.L    0    ;24
  723.         DC.W    3    ;28 IO_CMD
  724.         DC.W    0    ;30
  725.         DC.L    0    ;32
  726.         DC.L    1024    ;36 IO_LENGTH
  727.         DC.L    0    ;40 IO_DATA
  728.         DC.L    0    ;44 IO_OFFSET
  729.         DC.L    0
  730.         DC.L    0
  731.  
  732. bodytx1    dc.b    'SQUASH V4.3  Installer',0
  733. bodytx2    dc.b    '(C) 1990 Paul Hayter',0
  734. Ptx    dc.b    'INSTALL DF0:',0
  735. Ntx    dc.b    '  CANCEL!   ',0
  736.     
  737.     even
  738.  
  739. bodytext2    dc.b    0
  740.     dc.b    1
  741.     dc.w    0
  742.     dc.w    8
  743.     dc.w    20
  744.     dc.l    0
  745.     dc.l    bodytx2
  746.     dc.l    0
  747.         
  748.     
  749. bodytext    dc.b    0
  750.     dc.b    1
  751.     dc.w    0
  752.     dc.w    8
  753.     dc.w    10
  754.     dc.l    0
  755.     dc.l    bodytx1
  756.     dc.l    bodytext2
  757.  
  758. PText    dc.b    0
  759.     dc.b    1
  760.     dc.w    0
  761.     dc.w    5
  762.     dc.w    4
  763.     dc.l    0
  764.     dc.l    Ptx
  765.     dc.l    0
  766.     
  767. NText    dc.b    0
  768.     dc.b    1
  769.     dc.w    0
  770.     dc.w    5
  771.     dc.w    4
  772.     dc.l    0
  773.     dc.l    Ntx
  774.     dc.l    0
  775.  
  776.  
  777.  
  778.  
  779. MYdosname        dc.b    'dos.library',0
  780. intname        dc.b    'intuition.library',0
  781.     even
  782. intbase        dc.l    0
  783.     
  784.         END
  785.