pete@wlbreng1.UUCP (Pete_Lyall) (07/03/86)
<lineeaterfood>
This is the patch for CCIO version 2.00.00. Unfortunately, it must be
loaded as a module (preferably in the boot file, as that will take
less space than loading/executing later..). This corrects the problems
of NOT being able to regularly detect a QUIT or INTERRUPT from the
main (COCO) console. I am merely relaying the information - I assume
no credit for the development of this patch... Pete Lyall
**********************************
* Patch for CCIO 2.0 *
* Sets sys state before F$Send *
* By Kevin K Darling March 1986 *
* with Kent Meyer's suggestions *
* os9sig version 3 - 5/07/86 *
* last version was - 4/17/86 *
* *
* load ; then 'cciop' *
* put in bootfile for safety *
**********************************
IFP1
USE /d0/DEFS/DEFSFILE
ENDC
MOD len,name,prgrm+objct,reent+1,setup,msiz
ptchadd equ $014B patch address in CCIO
stack RMB 200
msiz EQU .
name fcs "CCIOP"
ccio fcs "CCIO"
setup equ * Set Up New ccio Brk key hit:
leax ccio,pc find the CCIO module
lda #drivr+objct
OS9 F$Link return addrss in U
bcs err1
leau ptchadd,u offset into CCIO
leax newbrk,pc X=patch code addrss
orcc #IntMasks stop interrupts
lda #$7E A='jmp' code
sta ,u store patch jump
stx 1,u
andcc #$AF enable interrupts
clrb okay
err1
OS9 F$Exit end patch install.
* -----------------------------------------
* Break/Shift-Brk Comes Here From CCIO:
newbrk
pshs cc,a,b,dp,x,y,u save regs
orcc #IntMasks stop interrupts
ldx >D.Proc any proc?
beq syst ..no, idle sys state
tst P$State,x sys state?
bpl user ..no, user
syst
puls cc,a,b,dp,x,y,u was sys state
lda V.LPRC,u get last ccio user
beq syst.no
OS9 F$Send send the signal
syst.no
bra brkend ..continue
user
leay user2,pc come back here
jmp [D.URtoSs] make sys state [$0084]
user2
ldu R$U,s retrieve static mem
ldb R$B,s and signal
lda V.LPRC,u get last user id
beq user.no
OS9 F$Send send signal while sysstate
user.no
ldx >D.Proc then make user again:
ldb P$State,x drop sys state
andb #$7F (Not SysState)
stb P$State,x
ldd P$SWI2,x reset user svc
std >D.SWI2
ldd >D.UsrIRQ & irq vectors
std >D.SvcIRQ
puls cc,a,b,dp,x,y,u restore regs
brkend
clr V.Wake,u clear wake id flag
jmp [D.Clock] do timesharing...
emod
len equ *
end