home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
unix
/
volume5
/
smallc
/
part3
/
6809
/
io.u
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1986-11-30
|
334 b
|
29 lines
| Small C v1 io (putchar) for physics machine
.globl _putchar
_putchar=.
lda /9000
bita #2
beq _putchar
lda 3(s)
sta /9001
cmpa #10.
bne out
ldd #13.
pshs d
lbsr _putchar
leas 2(s)
out: rts
.globl _getchar
_getchar=.
lda /9000
bita #1
beq _getchar
ldb /9001
clra
andb #/7F
cmpb #04
bne noteot
ldd #-1
noteot: rts