BenSche :
Voila ce que j'utilise dans texas Fighters pour l'instant :
EnvoiDonnees:
movem.l d1/a0-a1,-(a7)
move.w d0,-(a7)
move.l a0,-(a7)
CALL OSWriteLinkBlock
addq.w #6,a7
movem.l (a7)+,d1/a0-a1
rts
EnvoiGrossesDonnees:
movem.l d1/a0-a1,-(a7)
move.l d0,-(a7)
move.l a0,-(a7)
CALL LIO_SendData
lea 8(a7),a7
movem.l (a7)+,d1/a0-a1
rts
ReceptionDonnees:
movem.l d1/a0-a1,-(a7)
move.w d0,-(a7)
move.l a0,-(a7)
CALL OSReadLinkBlock
addq.w #6,a7
movem.l (a7)+,d1/a0-a1
rts
ReceptionGrossesDonnees:
movem.l d1/a0-a1,-(a7)
move.l #20,-(a7)
move.l d0,-(a7)
move.l a0,-(a7)
CALL LIO_RecvData
lea 12(a7),a7
movem.l (a7)+,d1/a0-a1
rts
;-----------------------------------------------------
; Entree :
; > d0.b = Octet a envoyer
;-----------------------------------------------------
EnvoiOctet:
move.b d0,TempVarEnvoi
move.w #1,d0
move.l #TempVarEnvoi,a0
bsr EnvoiDonnees
rts
;-----------------------------------------------------
; Sortie :
; > d1.b = Octet Recu
;-----------------------------------------------------
ReceptionOctet:
clr.b TempVarReception
move.w #1,d0
move.l #TempVarReception,a0
bsr ReceptionDonnees
move.b TempVarReception,d1
rts
Pour la reception :
ReReceptionneBG:
bsr ScanneClavier ; Lecture du clavier
TesteTouche KeyESC ; Sortie
beq AnnuleSyncSlave
move.l AdresseBackGround,a0
move.l #TailleTotaleBufferBG,d0
bsr ReceptionGrossesDonnees
tst.b d0
bne ReReceptionneBG
Pour l'envoi :
move.l AdresseBackGround,a0
move.l #TailleTotaleBufferBG,d0
bsr EnvoiGrossesDonnees
tst.b d0
bne AnnuleSyncMaster
A savoir que la calc receptrice doit etre en attente avant que l'envoi ne commence...