home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / MAXONC3_6OF8.DMS / in.adf / LIBSRC.LHA / LIBSRC / stream_out.asm < prev    next >
Encoding:
Assembly Source File  |  1994-04-16  |  1020 b   |  56 lines

  1.  
  2. * Maxon C++
  3. *
  4. * Library-Modul "stream_out"
  5. *
  6. * Jens Gelhar 31.08.93, 16.04.94
  7.  
  8.     xdef    op__leftshift__ostream__TPCc,op__leftshift__ostream__Tc
  9.     xdef    put__ostream__Tc,write__ostream__TPCci
  10.  
  11.     xref    __Writefile
  12.  
  13. write__ostream__TPCci:    ; Parameter: ostream&, const char*, int
  14.     movem.l    d2-d3/a2-a3/a6,-(a7)
  15.     movem.l    5*4+4(a7),d1-d3
  16.     move.l    d1,a0
  17.     bsr.b    putti
  18.     movem.l    (a7)+,d2-d3/a2-a3/a6
  19.     move.l    4(a7),d0
  20.     rts
  21.  
  22. putti:    ; ostream a0:
  23.     move.l    (a0),a0        ; _filebufclass
  24.     move.l    (a0),a0        ; stream
  25.     jmp    __Writefile
  26.  
  27. op__leftshift__ostream__TPCc:    ; Parameter: ostream&, const char*
  28.     movem.l d1-d3/a1-a3/a6,-(a7)
  29.     movem.l 7*4+4(a7),a0/a1
  30.     move.l a1,d2
  31.     beq.b null
  32.     moveq #0,d3
  33. count:    addq.w #1,d3
  34.     beq.b null
  35.     tst.b (a1)+
  36.     bne.b count
  37.     subq.l #1,d3
  38.     bsr.b putti
  39. null:    movem.l (a7)+,d1-d3/a1-a3/a6
  40.     move.l 4(a7),d0
  41.     rts
  42.  
  43.  
  44. op__leftshift__ostream__Tc:    ; Parameter: ostream&, char
  45. put__ostream__Tc:
  46.     clr.w    -(a7)
  47.     move.b    2+4+4(a7),(a7)
  48.     move.l    a7,-(a7)
  49.     move.l    4+2+4(a7),-(a7)
  50.     bsr.b    op__leftshift__ostream__TPCc
  51.     lea    10(a7),a7
  52.     rts
  53.  
  54.     end
  55.  
  56.