home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
unix
/
volume5
/
smallc
/
part3
/
8080
/
inout.c
< 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
|
257 b
|
27 lines
inp(pno) char pno; {
pno;
#asm
mov a,l
sta ininst+1
ininst in 0 ; self modifying code...
mov l,a
xra a
mov h,a
ret
#endasm
}
outp(pno, val) char pno, val; {
pno;
#asm
mov a,l
sta outinst+1
#endasm
val;
#asm
mov a,l
outinst out 0
ret
#endasm
}