home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 4: Demo 1
/
almathera_demo1.bin
/
sourcecode
/
german
/
test.s
< prev
Wrap
Text File
|
1995-03-17
|
3KB
|
149 lines
;
; Allgemeine Variablen
;
Excebase = 4
BitPlane1 = $60000
BitPlane2 = $64000
BitPlane3 = $68000
BitPlane4 = $6c000
BitPlane5 = $70000
;
; Offsets Exec
;
OldOpenLibrary = -30 -378
CloseLibrary = -30 -384
Forbid = -132
;
start:
jsr initlibrarys
jsr setup
jsr waitmouse
jsr restorelibrarys
illegal
rts
;
setup:
; move.l execbase,a6
jsr forbid(a6) ; Multitasking verbieten
move.l d0,gfxbase
move.l d0,a6
add.l #$32,d0
move.l d0,copptr
lea bitmap,a0
move.l #5,d0
move.l #640,d1
move.l #200,d2
jsr initbitmap(a6)
lea.l rastport,a1
jsr initrastport(a6)
move.l #bitmap,r_bitmap
jsr clrbitmap
rts
;
waitmouse:
andi.b #64,$bfe001 ; Bit 7 linke Mousetaste
bne waitmouse
rts
;
initlibrarys:
move.l execbase,a6
lea.l gfxname,a1 ; Graphics - Library
jsr oldopenlibrary(a6)
move.l d0,gfxbase
move.l execbase,a6
lea.l intname,a1 ; Intuition - Library
jsr oldopenlibrary(a6)
move.l d0,a6
move.l d0,intuitionbase
rts
;
restorelibrarys:
move.l execbase,a6
move.l gfxbase,a1 ; Graphic Library
jsr closelibrary(a6) ; schließen
move.l intuitionbase,a1 ; Intuition Library
jsr closelibrary(a6) ; scließen
rts
;
clrbitmaps:
move.l #bitplane1,d0 ; Adresse der BitPlane nach d0
move.l d0,plane1 ; in Plane1
move.l d0,a0 ; Adr. Register a0
move.w d0,lo1 ; und in die Copperliste
swap d0 ; Hi-Nibble isolieren und wenn
move.w d0,hi1 ; nötig auch in die Copperliste
move.l #16000,d0 ; Sowie 8000 Byets für die
move.b #00,d1 ; Bitplane reservieren und
cl1: move.b d1,(a0)+ ; löschen.
dbf d0,cl1 ;
move.l #BitPlane2,d0
move.l d0,Plane2
move.l d0,a0
move.w d0,lo2
swap d0
move.w d0,hi2
move.l #16000,d0
move.b #00,d1
cl2: move.b d1,(a0)+
dbf d0,cl2
move.l #BitPlane3,d0
move.l d0,Plane3
move.l d0,a0
move.w d0,lo3
swap d0
move.w d0,hi3
move.l #16000,d0
move.b #00,d1
cl3: move.b d1,(a0)+
dbf d0,cl3
move.l #BitPlane4,d0
move.l d0,Plane4
move.l d0,a0
move.w d0,lo4
swap d0
move.w d0,hi4
move.l #16000,d0
move.b #00,d1
cl4: move.b d1,(a0)+
dbf d0,cl4
move.l #BitPlane5,d0
move.l d0,Plane5
move.w d0,lo5
swap d0
move.w d0,hi5
move.l #16000,d0
move.b #00,d1
cl5: move.b d1,(a0)+
dbf d0,cl5
rts
;
Setcopper:
move.l copptr,a0 ; Adresse der Copperliste
move.l (a0),oldcop ; alte Liste speichern
move.l #Copper,(a0) ; neue Liste bereitstellen
rts
;
; Library - Names & Adr.
;
gfxname: dc.b "graphics.library",0
align 4
intname: dc.b "intuition.library",0
align 4
gfxbase: dc.l 1,0
intuitionbase: dc.l 1,0
;
; Copper - Liste
;