home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / nasm20b / nasm_src / lib / src / stdio.s65 < prev    next >
Text File  |  1993-01-19  |  1KB  |  68 lines

  1.          .include #system
  2.  
  3. open     sta   icbal,x
  4.          tya
  5.          sta   icbah,x
  6.          lda   #3             ; OPEN
  7.          bne   :doit
  8.  
  9.  
  10. close    lda   #12            ; CLOSE
  11.          bne   :doit
  12.  
  13.  
  14. bput     sta   icbal,x
  15.          tya
  16.          sta   icbah,x
  17.          lda   #11            ; PUT
  18.          bne   :doit
  19.  
  20.  
  21. bget     sta   icbal,x
  22.          tya
  23.          sta   icbah,x
  24.          lda   #7             ; GET
  25. :doit    sta   iccom,x
  26.          jmp   CIOV
  27.  
  28.  
  29. print    sta   icbal,x
  30.          tya
  31.          sta   icbah,x
  32.          lda   #9             ; PRINT
  33.          bne   :doit
  34.  
  35.  
  36. input    sta   icbal,x
  37.          tya
  38.          sta   icbah,x
  39.          lda   #5             ; INPUT
  40.          bne   :doit
  41.  
  42. putc
  43.          lda   #0
  44.          sta   icbll,x
  45.          sta   icblh,x
  46.          lda   #11
  47.          sta   iccom,x
  48.          tya
  49.          jmp   CIOV
  50.  
  51. getc
  52.          lda   #<:buf
  53.          sta   icbal,x
  54.          lda   #>:buf
  55.          sta   icbah,x
  56.          lda   #1
  57.          sta   icbll,x
  58.          lda   #0
  59.          sta   icblh,x
  60.          lda   #7
  61.          sta   iccom,x
  62.          jsr   CIOV
  63.          lda   :buf
  64.          rts
  65.  
  66. :buf     .byte    0
  67. _op_tab  .byte 0,$10,$20,$30,$40,$50,$60,$70
  68.