home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / MAXONC3_6OF8.DMS / in.adf / LIBSRC.LHA / LIBSRC / stream_int.asm < prev    next >
Encoding:
Assembly Source File  |  1994-04-15  |  1.5 KB  |  82 lines

  1.  
  2. * Maxon C++:
  3. *
  4. * Library-Modul "stream_int"
  5. *
  6. * Jens Gelhar 22.04.92, 15.04.94
  7.  
  8.     xdef    op__leftshift__ostream__Ti,op__leftshift__ostream__TUi
  9.     xdef    op__leftshift__ostream__Tj,op__leftshift__ostream__TUj
  10.     xdef    op__leftshift__ostream__TSc,op__leftshift__ostream__TUc
  11.  
  12.     xref    _inttostr,_uinttostr,op__leftshift__ostream__TPCc
  13.  
  14. op__leftshift__ostream__Tj:
  15. op__leftshift__ostream__Ti:    ; Stack-Parameter: ostream&, int
  16.     move.l    4(a7),a0    ; ostream
  17.     lea    -50-4(a7),a7
  18.     move.l    a0,-(a7)
  19.     move.w    #10,-(a7)
  20.     move.l    (a0),a0        ; ios
  21.     move.b    4(a0),d0
  22.     cmp.b    #8,d0
  23.     beq.b    olioct
  24.     cmp.b    #16,d0
  25.     bne.b    olidec
  26. olioct    move.b    d0,1(a7)
  27. olidec    pea    2+8(a7)
  28.     move.l    6+58+4+4(a7),-(a7)
  29.     jsr    _inttostr
  30.     lea    10(a7),a7
  31.     move.l    d0,4(a7)
  32.     jsr    op__leftshift__ostream__TPCc
  33.     lea    50+8(a7),a7
  34.     move.l    4(a7),d0
  35.     rts
  36.  
  37. op__leftshift__ostream__TUj:
  38. op__leftshift__ostream__TUi:    ; Stack-Parameter: ostream&, int
  39.     move.l a0,-(a7)
  40.     move.l 8(a7),a0
  41.     lea -50-4(a7),a7
  42.     move.l a0,-(a7)
  43.     move.w #10,-(a7)
  44.     move.l (a0),a0
  45.     move.b 4(a0),d0
  46.     cmp.b #8,d0
  47.     beq.s oluoct
  48.     cmp.b #16,d0
  49.     bne.s oludec
  50. oluoct    move.b d0,1(a7)
  51. oludec    pea 2+8(a7)
  52.     move.l 6+58+8+4(a7),-(a7)
  53.     jsr _uinttostr
  54.     lea 10(a7),a7
  55.     move.l d0,4(a7)
  56.     jsr op__leftshift__ostream__TPCc
  57.     lea 50+8(a7),a7
  58.     move.l (a7)+,a0
  59.     move.l 4(a7),d0
  60.     rts
  61.  
  62. op__leftshift__ostream__TSc:
  63.     move.b 8(a7),d0
  64.     ext.w d0
  65.     ext.l d0
  66.     move.l d0,-(a7)
  67.     move.l 8(a7),-(a7)
  68.     bsr op__leftshift__ostream__Ti
  69.     addq.l #8,a7
  70.     rts
  71.  
  72. op__leftshift__ostream__TUc:
  73.     moveq #0,d0
  74.     move.b 8(a7),d0
  75.     move.l d0,-(a7)
  76.     move.l 8(a7),-(a7)
  77.     bsr.s op__leftshift__ostream__TUi
  78.     addq.l #8,a7
  79.     rts
  80.  
  81.     end
  82.