home *** CD-ROM | disk | FTP | other *** search
/ Falcon 030 Power 2 / F030_POWER2.iso / ST_STE / MAGS / ICTARI05.ARJ / ictari.05 / ASSEMBLY / RESET / RESET.S
Text File  |  1989-04-06  |  3KB  |  118 lines

  1. ***************************************************************************
  2. *                                *
  3. *             The Reset Picture Demo                *
  4. *                                *
  5. *              Written By Steven Jordan & Andrew Martin                   *
  6. *                                *
  7. *                   (c) Diamond Software! 1993                            *
  8. *                                *
  9. ***************************************************************************
  10.  
  11.  
  12. start    bsr    super        ;set in supervisor mode
  13.     bsr    checkres        ;check for high res
  14.     bsr    setres        ;set the res to low
  15.     bsr    put_reset        ;pset the reset demo 
  16.     bsr    setpal        ;set the palette
  17.  
  18. loop    bra    loop        ;keep looping
  19.  
  20. *******************************************
  21. * CHECK TO SEE IF HIGH RES                *
  22. *******************************************
  23.  
  24. checkres    move.w    #4,-(sp)        ;get res
  25.     trap    #14        ;call XBOIS
  26.     addq.l    #2,sp        ;adjust the stack
  27.     
  28.     cmp.b    #2,d0        ;is it high?
  29.     rts            ;no, the return
  30.  
  31.     clr.l    -(sp)        ;yes, then I think
  32.     trap    #1        ;we better quit
  33.  
  34.     rts
  35.  
  36. *******************************************
  37. * SET THE RES TO LOW          *
  38. *******************************************
  39.  
  40. setres    move.w    #0,-(sp)        ;set low
  41.     move.l    #-1,-(sp)        ;don't change
  42.     move.l    #-1,-(sp)        ; "     "
  43.     move.w    #5,-(sp)        ;call set-screen
  44.     trap    #14        ;call XBOIS
  45.     add.l    #12,sp        ;adjust the stack
  46.     rts            ;return
  47.  
  48. *******************************************
  49. * PUT THE COMPUTER IN SUPERVISOR MODE     *
  50. *******************************************
  51.  
  52. super    clr.l     -(sp)        ;don't change
  53.     move.w     #$20,-(sp)    ;call super
  54.     trap    #1        ;call GEMDOS
  55.     addq.l     #6,sp        ;adjust stack
  56.     rts
  57.  
  58. *******************************************
  59. * SET THE PALETTE                    *
  60. *******************************************
  61.  
  62. setpal
  63.  
  64.     move.l    pic+2,-(sp)    ;add 2 to get the palette
  65.     move.w    #6,-(sp)        ;set the colours
  66.     trap    #14        ;call XBOIS
  67.     addq.l    #6,sp        ;adjust the stack
  68.     rts
  69.  
  70. *******************************************
  71. * PUT THE RESET DEMO IN THE RESET VECTOR  *
  72. *******************************************
  73.  
  74. put_reset
  75.     move.b     #4,$484        ;we have something
  76.     move.l     #$31415926,$426      ;put the magic number in 'resvalid'
  77.     move.l     #reset,$42a    ;put the demo in the reset vector
  78.     rts    
  79.  
  80. reset     move.w     #$2700,sr        ;all systems go!
  81.     move.b     #$2,$ff820a            ;call the colours
  82.     lea     $23de6,a7        ;set logical screen
  83.     move.w     #2,-(sp)        ;set logical
  84.     trap     #14        ;call XBOIS
  85.     addq.l     #2,sp        ;adjust the stack
  86.  
  87.     move.l     d0,a1        ;display pic
  88.     lea     pic+34,a0        ;go strait to the pic
  89.     move.w     #$fa0,d6        ;repeat         >----
  90. loop1    move.l     (a0)+,(a1)+    ;put pic on screen  |
  91.     move.l     (a0)+,(a1)+    ;and again          |
  92.     dbf     d6,loop1        ;until finished <----
  93.  
  94.      move.w     #-1,-(sp)        ;don't change res
  95.      move.l     d0,-(sp)        ;stay the same
  96.      move.l     d0,-(sp)        ;stay the same
  97.      move.w     #5,-(sp)        ;call set-screen
  98.      trap    #14        ;call XBOIS (Again. Sigh)
  99.      add.l     #12,SP        ;adjust the stack
  100.  
  101.     move.l     #$07770000,$ff8240    ;set the colours
  102.     move.l     #$07000555,$ff8244    
  103.     move.l     #$06660222,$ff8248
  104.     move.l     #$01170227,$ff824c
  105.     move.l     #$04440532,$ff8250
  106.     move.l     #$06430654,$ff8254
  107.     move.l     #$07540765,$ff8258
  108.     move.l     #$07210000,$ff825c
  109.  
  110. resloop
  111.     bra.s     resloop        ;keep looping
  112.  
  113. pic    incbin    "a:\assembly\borders\address.pi1"
  114.  
  115.  
  116.  
  117.  
  118.