home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
262.lha
/
FastPort
/
DumpPorts.Asm
< prev
next >
Wrap
Assembly Source File
|
1989-07-07
|
801b
|
47 lines
;$$TABS=12 $$MAKE="casm -A %s.asm -O%s -CCQS"
; dump port list, showing hashing
exeobj
include "lvo.asm"
include "strucdef.asm"
start: move.l 4,a6
lea dosname(pc),a1
moveq #0,d0
jsr _LVOOpenLibrary(a6)
move.l eb_PortList(a6),a5
move.l d0,a6
jsr _LVOOutput(a6)
move.l d0,d7
dumper: cmp.l #$31415927,(a5)
beq.s done_dump
move.l d7,d1
move.l #sep,d2
move.l #10,d3
jsr _LVOWrite(a6)
move.l a5,a2
lea 16(a5),a5
move.l (a2),d6
scanloop: move.l d6,a2
move.l (a2),d6
beq.s dumper
move.l ln_Name(a2),a0
move.l a0,d2
move.l d7,d1
moveq #-1,d3
count: addq.l #1,d3
tst.b (a0)+
bne.s count
jsr _LVOWrite(a6)
move.l #newlin,d2
moveq #1,d3
move.l d7,d1
jsr _LVOWrite(a6)
bra.s scanloop
done_dump moveq #0,d0
rts
newlin dc.b 10
sep dc.b '---------',10
dosname dc.b 'dos.library',0