home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 4: Demo 1
/
almathera_demo1.bin
/
sourcecode
/
dexion
/
freehanddraw.s
< prev
next >
Wrap
Text File
|
1995-03-17
|
2KB
|
137 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 #data,a3
loop:
cmp.b $dff00a,d5
bne moved
cmp.b $dff00b,d4
beq loop
moved:
move.b #$dff00a,d5
move.b #$dff00b,d4
move.b d4,(a3)+
move.b d5,(a3)+
cmpi.l #end,a3
ble stop
jsr putpoint
jmp loop
;---------
putpoint:
mulu #40,d7
move d7,a0
ror.l #3,d6
add d6,a0
clr d6
rol.l #3,d6
cmp #8000,a0
bge no
add.l #scr,a0
move #7,d7
sub d6,d7
bset d7,(a0)
no:
rts
;/////// 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,$00f
dc.w $0182,$f00
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
rad:dc.w 0
xc:dc.w 0
yc:dc.w 0
x:dc.w 0
y:dc.w 0
data:
blk.b 512,0
end:
stop:
rts