	jmp		Begin		; preskoci podatke o slici
Slika:
	incbin	e:\asembler\source\pic.f16
	even			; sledeca naredba je na parnoj adresi
				; u slucaju da je picture size neparno
Begin:
	jsr		svm	; saznaj pocetak video memorije
	move.l	a0,a1		; to ce biti destination
	move.l	#64000,d0	; uvek u petlji koristi .l da popunis celi d0
	lea		Slika,a0
Loop:
	move.w	(a0)+,(a1)+	; prebaci wor po word (320*200*2 bajtova)
	subq.l	#1,d0		; sljedeci bajt
	bne.s	Loop		; NE=not equival, loop until zero in d0

	jsr		svm
	move.l	a0,a3
	move.w	#0,d7
	move.w	#640*50,d2
	move.l	a3,a1
	move.w	#50,d6
Start:
	jsr		Down
	add.w	#640,d7
	move.w	#640*50,d2
	add.w	d7,d2
	move.l	a3,a1
	add.w	d7,a1
	dbra	d6,Start
Down:
	move.l	a1,a2
	add.l	#640,a2
Loop_d:
	move.w	(a1)+,(a2)+
	dbra	d2,Loop_d

	bsr	Wait_For_Key
	clr.w	-(sp)		; 0 na stek
	trap	#1		; kraj Atari programa

; In:	nothing
; Out:	a0.l=begin address of video screen
svm:
	movem.l	d1-d7/a1-a6,-(sp)
	move.w	#2,-(sp)	; XBIOS 2 (phybase)
	trap	#14		; pozovi XBIOS rutinu
	add.l	#2,sp		; popravi stek za 2 bajta
	move.l	d0,a0		; XBIOS nam vraca adresu ekrana kao long
	movem.l	(sp)+,d1-d7/a1-a6	
	rts

; In:	nothing
; Out:	a0.l=begin address of video screen
Wait_For_Key:
	movem.l	d0-a6,-(sp)
	move.w	#1,-(sp)	; GEMDOS funkcija (1) wait for key
	trap	#1
	addq.l	#2,sp	
	movem.l	(sp)+,d0-a6
	rts