home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 4: Demo 1
/
almathera_demo1.bin
/
sourcecode
/
dexion
/
knull.s
< prev
next >
Wrap
Text File
|
1995-03-17
|
1KB
|
125 lines
scr=$7a000
struc=$7d000
rastport=struc+100
setupsystem:
bsr getgfx
bsr cleanitdown
move.w #8000-1 ,d0
move.l #scr ,a0
slet: move.b #0 ,(a0)+
dbra d0 ,slet
move.l #scr ,a0
move.l a0 ,struc+8
move.l #struc ,a0
moveq #1 ,d0
move.l #320 ,d1
move.l #200 ,d2
move.l gfxbase ,a6
jsr -390(a6)
move.l #rastport ,a1
jsr -198(a6)
move.l #struc,rastport+4
move.l #copper0,newcop
bsr changecop
;--DEMO
move=-240
draw=-246
setapen=-342
move.l #rastport,a1
;/////// my demo!!! ///////
move.l #10,d2
loop:
move.w fx0,d0
move.w fy0,d1
divu d2,d0
divu d2,d1
move.w d0,x0
move.w d1,y0
move.w fx1,d0
move.w fy1,d1
divu d2,d0
divu d2,d1
move.w d0,x1
move.w d1,y1
jsr line
dbra d2,loop
rts
line:
move.l #x0,d0
move.l #y0,d1
jsr move(a6)
move.l #x1,d0
move.l #y1,d1
jsr draw(a6)
rts
x0: dc.w 0
y0: dc.w 0
x1: dc.w 0
y1: dc.w 0
fx0: dc.w 50
fy0: dc.w 50
fx1: dc.w 300
fy1: dc.w 200
;/////// my demo's over. //
copper0:dc.w $0100,$1200
dc.w $008e,$2c81
dc.w $0090,$f4c1
dc.w $0092,$38
dc.w $0094,$d0
dc.w $0108,$0000
dc.w $010a,$0000
dc.w $00e0,$0007
dc.w $00e2,$a000
dc.w $0180,$000
dc.w $0182,$fff
dc.w $ffff,$fffe
;*** gfx ***
gfxbase: dc.l 0
gfxname: dc.b 'graphics.library',0,0
getgfx:
move.l 4 ,a6
move.l #gfxname,a1
jsr -408(a6)
move.l d0 ,gfxbase
rts
;*** change copper list ***
newcop: dc.l 0
;***
changecop:
move.l gfxbase ,a0
move.l newcop ,50(a0)
rts
;*********
forbid =-132
oldcopper: dc.l 0
cleanitdown:
move.l 4,a6
jsr -132(a6)
rts