home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
dirs
/
memlook_417.lzh
/
MemLook
/
memlook.asm
< prev
next >
Wrap
Assembly Source File
|
1990-12-16
|
6KB
|
377 lines
execbase = 4
allocmem = -198
freemem = -210
openlib = -552
closelib = -414
;
initbitmap = -390
initrastport = -198
text = -060
move = -240
setapen = -342
rectfill = -306
clipblit = -552
;
bsr opengfx
beq end2
bsr initscr
beq ende
bsr status
bsr balken
moveq #0,d1
loop:
cmpi.b #$3c,$dff006
bne loop
move $dff00a,d0
lsr #8,d0
and.l #$ff,d0
move y,d2
move d0,y
cmp.b d0,d2
blt wenig
bgt mehr
bsr los
btst #6,$bfe001
bne hinl
btst #10,$dff016
beq ende3
hinl:
btst #6,$bfe001
bne nu
move.l horu,d0
moveq #1,d1
move.b #"<",htexte-2
cmp.l #0,d0
beq wert
moveq #0,d1
move.b #">",htexte-2
wert:
move.l d1,horu
bsr status
bra loop
nu:
btst #10,$dff016
bne no
move.l flaglh,d0
moveq #1,d1
move.l cop,a0
add.l #toll-copa,a0
move #$9200,(a0)
move.b #"H",htexte-3
cmp.l #0,d0
beq wert2
moveq #0,d1
move #$1200,(a0)
move.b #"L",htexte-3
wert2:
move.l d1,flaglh
bsr status
bra loop
no:
bra loop
ende3:
bsr closescr
ende:
bsr closegfx
ende2:
moveq #0,d0
rts
;
scroll:
move.l gfxbase,a6
move.l rast,a0
move.l rast,a1
moveq #1,d0
moveq #0,d1
moveq #0,d2
moveq #0,d3
move.l #199,d4
moveq #10,d5
move.l #$c0,d6
jsr clipblit(a6)
move.l texta,d0
add.l #1,d0
cmp.l #8,d0
bne nna
bsr texter
moveq #0,d0
nna:
move.l d0,texta
rts
;
texter:
move.l gfxbase,a6
move.l rast,a1
move.l #191,d0
moveq #7,d1
jsr move(a6)
move.l gfxbase,a6
move.l rast,a1
lea textert,a0
add.l pose,a0
moveq #1,d0
jsr text(a6)
move.l pose,d0
add.l #1,d0
move.l d0,d1
add.l #textert,d1
cmp.l #texterte,d1
bne nidsnzu
moveq #0,d0
nidsnzu:
move.l d0,pose
rts
;
mehr:
move.l speed,d0
cmp.l #8,d0
beq loop
add.l #1,d0
move.l d0,speed
bra loop
wenig:
move.l speed,d0
cmp.l #0,d0
beq loop
sub.l #1,d0
move.l d0,speed
bra loop
;
opengfx:
move.l execbase,a6
lea gfxname,a1
moveq #0,d0
jsr openlib(a6)
move.l d0,gfxbase
rts
;
status:
move.l gfxbase,a6
move.l rast,a1
move.l #200,d0
moveq #7,d1
jsr move(a6)
move.l gfxbase,a6
move.l rast,a1
lea texte,a0
moveq #2,d0
jsr text(a6)
rts
;
closegfx:
move.l execbase,a6
move.l gfxbase,a1
jsr closelib(a6)
rts
;
balken:
move.l gfxbase,a6
move.l rast,a1
moveq #0,d0
jsr setapen(a6)
move.l gfxbase,a6
move.l rast,a1
move.l #220,d0
moveq #0,d1
move.l #230,d2
moveq #8,d3
jsr rectfill(a6)
move.l gfxbase,a6
move.l rast,a1
moveq #1,d0
jsr setapen(a6)
move.l gfxbase,a6
move.l rast,a1
move.l #220,d0
moveq #8,d1
sub.l speed,d1
move.l #230,d2
moveq #8,d3
jsr rectfill(a6)
rts
;
los:
bsr scroll
move.l adr,d1
move.l d1,d0
move.l cop,a0
add.l #plan-copa,a0
bsr eint
move.l speed,d0
mulu #40,d0
move.l flaglh,d2
add.l #1,d2
mulu d2,d0
move.l horu,d4
cmp.l #1,d4
beq ju
add.l d0,d1
bra ja
ju:
sub.l d0,d1
ja:
cmp.l #0,d1
bge a5zae
move.l #524288,d1
a5zae:
cmp.l #524288,d1
ble a0zae
moveq #0,d1
a0zae:
move.l d1,adr
lsl.l #4,d1
moveq #7,d0
lea htexte+1,a0
hlo:
move.l d1,d2
and.l #$f,d2
lea hexta,a1
add.l d2,a1
move.b (a1),(a0)+
rol.l #4,d1
dbra d0,hlo
move.l gfxbase,a6
move.l rast,a1
move.l #240,d0
moveq #7,d1
jsr move(a6)
move.l gfxbase,a6
move.l rast,a1
lea htexte,a0
moveq #9,d0
jsr text(a6)
bsr balken
rts
;
initscr:
move.l execbase,a6
move.l #$10003,d1
move.l #40*20+cope-copa+116,d0
jsr allocmem(a6)
beq end2
lea copa,a0
move.l d0,plane1
bsr eint
add.l #10*40,d0
move.l d0,plane2
bsr eint
add.l #10*40,d0
move.l d0,cop
add.l #cope-copa,d0
move.l d0,bitm
add.l #16,d0
move.l d0,rast
; Copperliste copieren
move.l cop,a1
lea copa,a0
move.l #cope-copa-1,d0
coop:
move.b (a0)+,(a1)+
dbra d0,coop
move.l bitm,a0
move.l gfxbase,a6
moveq #1,d0
move.l #320,d1
moveq #10,d2
jsr initbitmap(a6)
move.l bitm,a0
move.l plane1,8(a0)
move.l gfxbase,a6
move.l rast,a1
jsr initrastport(a6)
move.l rast,a1
move.l bitm,4(a1)
move #$4000,$dff09a
move.l cop,$dff084
clr $dff08a
move.l plane2,a0
add.l #24,a0
moveq #9,d0
klop:
move.b #$ff,(a0)
add.l #40,a0
dbra d0,klop
moveq #1,d0
end2:
tst.l d0
rts
;
closescr:
clr $dff088
move #$c000,$dff09a
move.l execbase,a6
move.l plane1,a1
move.l #40*20+cope-copa+116,d0
jsr freemem(a6)
move #$8020,$dff096
rts
;
eint:
swap d0
add.l #2,a0
move d0,(a0)+
swap d0
add.l #2,a0
move d0,(a0)+
rts
;
horu: dc.l 0
y: dc.w 0
speed: dc.l 8
flaglh: dc.l 1
adr: dc.l 0
gfxbase: dc.l 0
gfxname: dc.b "graphics.library",0
texte: dc.b "H>",0
htexte: dc.b "$00000000"
hexta: dc.b "0123456789ABCDEF",0
plane1: dc.l 0
plane2: dc.l 0
rast: dc.l 0
bitm: dc.l 0
cop: dc.l 0
pose: dc.l 0
texta: dc.l 0
copa:
dc.w $e0,0,$e2,0,$e4,0,$e6,0
dc.w $100,$2200
dc.w $8e,$2c81,$90,$f4c1,$92,$38,$94,$d0,$96,$20
dc.w $2c0f,$fffe,$0180,$f,$0182,$f00,$0184,$f,$186,$f
dc.w $2d0f,$fffe,$0182,$f10,$108,-40,$10a,-40
dc.w $2e0f,$fffe,$0182,$f20,$108,0,$10a,0
dc.w $2f0f,$fffe,$0182,$f30,$108,-40,$10a,-40
dc.w $300f,$fffe,$0182,$f40,$108,0,$10a,0
dc.w $310f,$fffe,$0182,$f50,$108,-40,$10a,-40
dc.w $320f,$fffe,$0182,$f60,$108,0,$10a,0
dc.w $330f,$fffe,$0182,$f70,$108,-40,$10a,-40
dc.w $340f,$fffe,$0182,$f80,$108,0,$10a,0
dc.w $350f,$fffe,$0182,$f90,$108,-40,$10a,-40
dc.w $360f,$fffe,$0182,$fa0,$108,0,$10a,0
dc.w $370f,$fffe,$0182,$fb0,$108,-40,$10a,-40
dc.w $380f,$fffe,$0182,$fc0,$108,0,$10a,0
dc.w $390f,$fffe,$0182,$fd0,$108,-40,$10a,-40
dc.w $3a0f,$fffe,$0182,$fe0,$108,0,$10a,0
dc.w $3b0f,$fffe,$0182,$ff0,$3c0f,$fffe,$0180,0,$184,0
dc.w $3d0f,$fffe,$100
toll: dc.w $9200,$0180,0,$0182,$fff
plan: dc.w $e0,0,$e2,0
dc.w $c30f,$fffe,$0180,$0
dc.l -2
cope:
textert:
dc.b "Here is the new version of MEMLOOK called ´MEMLOOK II´ "
dc.b " written by Thomas Jansen ... HELP : the right Mouse"
dc.b "button - You can change the viewmode ( Lores - Hires ) ... "
dc.b ", left Mousebutton - You can change the direction of the "
dc.b "scrolling ( Memory ) , Mouse up / down - the scroll-speed will "
dc.b "go faster or slower ... , left & right Mousebutton - Quit "
dc.b "MEMLOOK * If you want to contact me , write to : T. J"
dc.b "ansen / Hauptstraße 21 / 4773 Möhnesse ( Körbecke ) / W-"
dc.b "Germany Some of my other tools : Special-Windows ( You "
dc.b "can close windows or you can edit the title or the IDCMP-"
dc.b "Flag ) , ALERT3.5 ( You can edit alert´s ... ) , Mouse ( "
dc.b "You can draw and use Mousepointers with 16 Colors ! ) ..."
dc.b " Greetings to : Oliver Wagner , Peter Handle , Andreas ... "
dc.b " WAIT : This Programm is Freeware ... "
texterte: