Hello

i have a little problem. I ported the C example form 3com
which shows how to use the exchange manager to asm.
TO compile it with pila. But if i start beaming something
it quikly ends like it would normaly, but a way to fast.
And the receiving end gets an error that there is not
enough room to store the received app.

My asm code looks like that:

proc Beamitself()
local   searchstate.32 
local   cardNo.w 
local  dbID.l   
local   dbName.32

beginproc
        movem.l d0-d3/a0-a3,-(a7)               ; save regs
        systrap 
DmGetNextDatabaseByTypeCreator(#$100.w,&searchstate(a6).l,#$6170706c.l,#APPL.l,#$100.w,&cardNo(a6).l,&dbID(a6).l)
 
        cmp.w   #0.w,d0                 ; found a db with this name
        bne     EndeBeamitself          ; no than exit
        systrap DmDatabaseInfo 
(#0.w,dbID(a6).l,&dbName(a6).l,#0.l,#0.l,#0.l,#0.l,#0.l,#0.l,#0.l,#0.l,#0.l,#0.l)
        call    SendDatabase(#0.w,dbID(a6).l,&prcname(a5).l,&dbName(a6).l)
EndeBeamitself
        movem.l (a7)+,d0-d3/a0-a3               ; restore regs
endproc

proc SendDatabase(cardNo.w, dbID.l, namepointer.l, descriptionpointer.l)
local   exgSocket.ExgSocketType
local   err.l

beginproc
        movem.l d0-d3/a0-a3,-(a7)               ; save regs
        systrap MemSet(&exgSocket(a6).l,#60.l,#0.b)     
        move.l  descriptionpointer(a6),ExgSocketType.description+exgSocket(a6)
        move.l  namepointer(a6),ExgSocketType.name+exgSocket(a6)
        systrap ExgPut(&exgSocket(a6).l)
        move.l  d0,err(a6)
        cmp.w   #0.w,d0
        bne EndeSendDatabase
        systrap 
ExgDBWrite(&WriteDBData(pc).l,&exgSocket(a6).l,#0.l,dbID(a6).l,cardNo(a6).w)
        move.l  d0,err(a6)
        systrap ExgDisconnect(&exgSocket(a6).l,err(a6).l)
        move.l d0,err(a6)
EndeSendDatabase
        movem.l (a7)+,d0-d3/a0-a3               ; restore regs
        move.l  err(a6),d0
endproc


proc WriteDBData(datapointer.l,sizepointer.l,userDatapointer.l)
local   err.l

beginproc
        movem.l d0-d3/a0-a3,-(a7)               ; save regs
        move.l  sizepointer(a6),a0
        ; Is this following systrap correct???
        systrap ExgSend(userDatapointer(a6).l,datapointer(a6).l,(a0).l,&err(a6).l)
        move.l  sizepointer(a6),a0
        move.l  d0,(a0)
        movem.l (a7)+,d0-d3/a0-a3               ; restore regs
        move.l err(a6),d0
endproc


I think the problem is in the WriteDBData,
but i couldn't find an error.

Let me know if you have a clue
Thanks Fabian

Reply via email to