************************** *** ESTIENNE Sebastien *** *** 2004 *** ************************** ****************************** *** Initialisations E/S ** ****************************** SUCC equ $FFF45005 SUCC_BUF equ $FFF45007 **************************** *** Function putChar *** **************************** putChar move.l D0,-(A7) ; empile D0 move.b 8(A7),D0 ; met char ds D0 attpChar btst.b #2,SUCC ; test si tampon libre beq attpChar ; on revient si pas libre move.b D0,SUCC_BUF ; met char ds buff pr ecr move.l (A7)+,D0 ; depile D0 rts fputChar *********************** *** Function LF *** (line feed) *********************** LF btst.b #2,SUCC ; test si tampon libre beq LF ; on revient si pas libre move.b #10,SUCC_BUF ; met val ascii corr ds buf rts fLF *********************** *** Function CR *** (carriage return) *********************** CR btst.b #2,SUCC ; test si tampon libre beq CR ; on revient si pas libre move.b #13,SUCC_BUF ; met val ascii corr ds buf rts fCR **************************** *** Function getChar *** **************************** getChar attgChar btst.b #0,SUCC ; test si reçu caractère beq attgChar ; on revient si pas de char move.b SUCC_BUF,4(A7) ; on met val ds pile pr recup rts fgetChar *************************** *** Function putStr *** *************************** putStr move.l A0,-(A7) ; on empile A0 move.l 8(A7),A0 ; @ de la chaine bclepStr tst.b (A0) ; verif si fin string beq sputStr ; on l'a parcourue move.b (A0)+,-(A7) ; on empile A0 & ++ bsr putChar ; appel de putChar add.l #2,A7 ; on depile bra bclepStr ; on revient debut sputStr move.l (A7)+,A0 ; on depile A0 rts fputStr