home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_200 / 250_01 / graphdri.s < prev    next >
Text File  |  1987-10-29  |  640b  |  36 lines

  1.     .ttl    GRAPHIC SUPPORT ROUTINES (DRI-C)
  2.  
  3. *    (EHR)    851215, 860824
  4.  
  5. bdos        equ    2
  6. lstout        equ    5
  7.  
  8.  
  9.     .globl    _pputc,_bitset,_odd
  10.     .text
  11.  
  12.  
  13.  
  14. _pputc:
  15.     link    a6,#-4            * stack frame
  16.     movem.l    d1-d7/a0-a6,-(sp)    * save regs
  17.     move.w    8(a6),d1        * parameter (char)
  18.     and.w    #$00ff,d1        * undo any sign extension
  19.     moveq    #lstout,d0
  20.     trap    #bdos            * send char to lst:
  21.     movem.l    (sp)+,d1-d7/a0-a6    * restore regs
  22.     unlk    a6
  23.     rts
  24.  
  25. _bitset:
  26.     move.l    4(sp),a0        * pointer
  27.     moveq    #0,d0
  28.     move.b    9(sp),d0        * bit #
  29.     bset    d0,(a0)            * set bit
  30.     rts
  31.  
  32. _odd:
  33.     moveq    #1,d0            * mask
  34.     and.b    5(sp),d0        * clr d0 if even
  35.     rts
  36.