custom   =      $dff000
cop1lch  =      $80
copjmp1  =      $88
diwstrt  =      $8e
diwstop  =      $90
ddfstrt  =      $92
ddfstop  =      $94
dmacon   =      $96
intena   =      $9a
bplcon0  =      $100
bplcon1  =      $102
bpl1mod  =      $108
color0   =      $180
color1   =      $182
Move     = 	-$f0
DoIO     = 	-$1c8
Text     =	-$3c
OpenLibrary = 	-$228
InitRastPort=	-$c6
start:
         movem.l  a2-a6,-(sp)	;Registers saven
         move.w   #9,$1c(a1)
         clr.l    $24(a1)
         move.l   4,a6
         jsr      DoIO(a6) 	;Drive uitzetten
         bsr.l    bootprog
         movem.l  (a7)+,a2-a6	;registers terug geven
         move.l   4,a6
         lea      DosName(pc),a1
         jsr      -$60(a6)
         move.l   d0,a0
         move.l   $16(a0),a0
         moveq    #0,d0
         rts			;terug naar amiga dos
DosName:
	 dc.b	'dos.library',0
bootprog:
         lea      custom,a5	;a5 bevat adres custom chips
         lea.l    GraphicsName(pc),a1
         clr.l    d0
         jsr      OpenLibrary(a6)
         move.l   d0,a6		;a6 bevat GfxBase
         lea      $1eb00,a3	;a3 bevat RastPort
         move.l   a3,a1
         jsr      InitRastPort(a6)
         lea      $1ea00,a0
         move.l   a0,4(a3)
         moveq    #1,d0
         move.w   #$140,d1
         move.w   #$c8,d2
         jsr      -$186(a6)
         lea      Copperl(pc),a1
         move.l   a1,cop1lch(a5)
         move.l   d0,copjmp1(a5)
         move.w   #$800,color1(a5)
         moveq    #$64,d0
         bsr.l    wacht	; om te verschieten van de balk
         lea      Tekst(pc),a2
         move.w   #$2e75,diwstrt(a5)
         move.w   #-$92b,diwstop(a5)
         move.w   #$38,ddfstrt(a5)
         move.w   #$d0,ddfstop(a5)
         clr.l    bpl1mod(a5)
         move.w   #$1200,bplcon0(a5)
         clr.l    bplcon1(a5)
         move.w   #$8380,dmacon(a5)
volgende_regel:
         lea      $1c900,a0 	;$1c900 start scherm
         move.l   a0,$1ea08
         move.w   #$7d0,d0	;# long words van scherm
ClearScreenCont:
         clr.l    (a0)+		;scherm schoon maken
         dbf      d0,ClearScreenCont
         move.l   a3,a1
         clr.l    d0
         move.b   (a2)+,d0	;X-pos tekst
         moveq    #$51,d1	;Y-pos tekst	
	 jsr      Move(a6)	;Zet Pointer goed
         move.l   a3,a1
         clr.l    d0
         move.b   (a2)+,d0	;d0 = lengte tekst
         cmpi.b   #0,d0
         beq.s    einde		;Einde tekst 
         move.l   a2,a0
         lea      0(a2,d0.w),a2	;werk a2 bij met de lengte
         jsr      Text(a6)	;Print tekst vanaf (a0)
         moveq    #7,d2
         move.w   #$800,d1
oplichten:
         moveq    #2,d0
         bsr.l    wacht
         move.w   d1,color1(a5)
         addi.w   #$122,d1
         dbf      d2,oplichten
         clr.l    d0
         move.b   (a2)+,d0	;tijd letters op scherm
         bsr.l    wacht
         moveq    #7,d2
doven:
         moveq    #2,d0
         bsr.l    wacht
         subi.w   #$122,d1
         move.w   d1,color1(a5)
         dbf      d2,doven

         clr.l    d0
         move.b   (a2)+,d0	;tijd letters weg van scherm
         bsr.l    wacht
         bra.l    volgende_regel
einde:
         move.l   $26(a6),$dff080 ; Copperlist terug zetten
         move.w   #$100,$dff096 ;alle bitjes goed zetten van DMACON
         rts

wacht:
         add.w    d0,d0
loop1:   cmpi.b   #0,6(a5)
         bne.s    loop1
loop2:   cmpi.b   #0,6(a5)
         beq.s    loop2
  	 btst	  #6,$bfe001	;Rechter muis knop ingedrukt ?
	 beq	  break   	;Ja, stop
         dbf      d0,loop1
         rts
break:
	 move.l	  (sp)+,d0	;terugkeeradres van stack afhalen
	 bra      einde 		
Copperl:
         dc.w     $00E0,$0001   ; Move $0007 naar BL1PTH
         dc.w     $00E2,$C900   ; Move $C900 naar BL1PTL

         dc.w     $7107,$fffe,$0180,$0d51
         dc.w     $7507,$fffe,$0180,$0800
         dc.w     $8607,$fffe,$0180,$0d51
         dc.w     $8a07,$fffe,$0180,$0000
         dc.w     $ffff,$fffe

GraphicsName:
         dc.b     'graphics.library',0,0

;  x pos, length,  string, wacht tijdens, wacht na;
Tekst:
         dc.b     $00,$20,'Something wonderful has happened',$d2,$aa
  	 dc.b     $2d,$17,'Your AMIGA is alive !!!',$be,$a0  
         dc.b     $41,$13,'And, even better...',$50,$50
	 dc.b	  $04,$1f,'Some of your disks are infected',$6e,$32
	 dc.b	  $5a,$0e,'by a VIRUS !!!',$8c,$78
         dc.b     $32,$16,'Another masterpiece of',$82,$32
         dc.b     $32,$16,'The Mega-Mighty SCA !!',$dc,$6e,0,0

         END
