home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume5 / smallc / part3 / 6809 / io.u < prev    next >
Encoding:
Text File  |  1986-11-30  |  334 b   |  29 lines

  1. |    Small C v1 io (putchar) for physics machine
  2. .globl    _putchar
  3. _putchar=.
  4.     lda    /9000
  5.     bita    #2
  6.     beq    _putchar
  7.     lda    3(s)
  8.     sta    /9001
  9.     cmpa    #10.
  10.     bne    out
  11.     ldd    #13.
  12.     pshs    d
  13.     lbsr    _putchar
  14.     leas    2(s)
  15. out:    rts
  16.  
  17. .globl    _getchar
  18. _getchar=.
  19.     lda    /9000
  20.     bita    #1
  21.     beq    _getchar
  22.     ldb    /9001
  23.     clra
  24.     andb    #/7F
  25.     cmpb    #04
  26.     bne    noteot
  27.     ldd    #-1
  28. noteot:    rts
  29.