2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2019-05-08 19:41:46 +00:00
|
|
|
|
AUTO 3,1
|
2017-08-29 15:19:09 +00:00
|
|
|
|
*--------------------------------------
|
2018-10-15 15:39:21 +00:00
|
|
|
|
CORE.Run stz CORE.PSIndex
|
|
|
|
|
|
2019-01-24 13:53:29 +00:00
|
|
|
|
bra .8 Skip PS0
|
2018-10-17 15:31:29 +00:00
|
|
|
|
.1 lda PS.Table.hPS,x
|
2018-04-26 15:38:02 +00:00
|
|
|
|
beq .8
|
2018-06-21 15:12:10 +00:00
|
|
|
|
jsr K.GetMemPtr
|
2018-04-12 15:45:31 +00:00
|
|
|
|
>STYA pPs
|
2017-09-20 15:09:55 +00:00
|
|
|
|
lda (pPs) get S.PS.F
|
2019-07-22 16:28:44 +00:00
|
|
|
|
* bit #S.PS.F.HOLD Waiting for Another Task to Terminate?
|
|
|
|
|
* beq .2
|
|
|
|
|
|
|
|
|
|
bpl .2
|
2017-08-29 15:19:09 +00:00
|
|
|
|
ldy #S.PS.CPID
|
|
|
|
|
lda (pPs),y
|
2018-06-22 06:24:35 +00:00
|
|
|
|
jsr CORE.GetPS
|
2017-09-20 15:09:55 +00:00
|
|
|
|
bcc .8 yes, still running....
|
|
|
|
|
lda (pPs) get S.PS.F again
|
2018-04-20 15:06:41 +00:00
|
|
|
|
eor #S.PS.F.HOLD unmark as HOLD
|
2017-08-29 15:19:09 +00:00
|
|
|
|
sta (pPs)
|
2019-01-21 14:51:10 +00:00
|
|
|
|
.2 jsr CORE.PSSelect Restore ZP & Ptrs
|
|
|
|
|
|
|
|
|
|
.3 jsr CORE.PSExec INIT/RUN/QUIT/RESUME
|
2018-04-26 15:38:02 +00:00
|
|
|
|
dec IRQ.InKernel
|
2019-01-24 13:53:29 +00:00
|
|
|
|
bcc .4 INIT/RUN Exit ?
|
2017-08-29 15:19:09 +00:00
|
|
|
|
|
2019-01-24 13:53:29 +00:00
|
|
|
|
jsr CORE.UpdateParentPS
|
2019-07-22 16:28:44 +00:00
|
|
|
|
ldy #S.PS.S
|
2019-10-03 06:25:27 +00:00
|
|
|
|
lda #S.PS.S.QUIT
|
2019-07-22 16:28:44 +00:00
|
|
|
|
sta (pPs),y
|
2019-01-21 14:51:10 +00:00
|
|
|
|
bra .3 try executing QUIT now...
|
2019-01-24 13:53:29 +00:00
|
|
|
|
.4 lda (pPs)
|
2018-04-26 15:38:02 +00:00
|
|
|
|
bit #S.PS.F.SLEEP
|
|
|
|
|
bne .7
|
2019-07-22 16:28:44 +00:00
|
|
|
|
ldy #S.PS.S
|
|
|
|
|
lda (pPs),y
|
|
|
|
|
bne .5
|
2019-10-03 06:25:27 +00:00
|
|
|
|
lda #S.PS.S.RUN go from INIT to RUN
|
2019-07-22 16:28:44 +00:00
|
|
|
|
sta (pPs),y
|
2018-04-26 15:38:02 +00:00
|
|
|
|
bra .7
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.5 cmp #S.PS.S.QUIT
|
2019-07-24 05:53:09 +00:00
|
|
|
|
bne .7
|
|
|
|
|
>PUSHBI 2
|
2017-08-29 15:19:09 +00:00
|
|
|
|
ldy #S.PS.PID
|
|
|
|
|
lda (pPs),y
|
2019-07-24 05:53:09 +00:00
|
|
|
|
>SYSCALL2 Kill
|
2017-09-20 15:09:55 +00:00
|
|
|
|
bra .8
|
|
|
|
|
.7 jsr CORE.PSLeave Save ZP & Ptrs
|
2018-10-15 15:39:21 +00:00
|
|
|
|
.8 inc CORE.PSIndex
|
|
|
|
|
ldx CORE.PSIndex
|
2018-10-23 15:36:57 +00:00
|
|
|
|
cpx CORE.PSCount
|
2019-10-03 06:25:27 +00:00
|
|
|
|
bne .1
|
2017-09-06 15:00:10 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-20 15:09:55 +00:00
|
|
|
|
CORE.Events jsr CORE.GetEvents
|
2017-09-19 15:34:01 +00:00
|
|
|
|
bcs .4 CS=no event
|
|
|
|
|
|
2017-10-27 14:56:46 +00:00
|
|
|
|
jsr CORE.Dispatch
|
2017-09-19 15:34:01 +00:00
|
|
|
|
bcc .4 CC=All Events Dispatched
|
|
|
|
|
|
2019-01-24 13:53:29 +00:00
|
|
|
|
lda PS.Table.PID Select PS0
|
|
|
|
|
jsr K.GetMemPtr
|
|
|
|
|
>STYA pPs
|
|
|
|
|
>LDYAI K.STACKTOP
|
|
|
|
|
>STYA pStack
|
2017-10-27 06:36:46 +00:00
|
|
|
|
lda #Evt.Table
|
2017-09-19 15:34:01 +00:00
|
|
|
|
sta pEvent
|
|
|
|
|
.1 lda (pEvent)
|
|
|
|
|
beq .3
|
|
|
|
|
bmi .2 Ignore & Discard any timer event
|
2018-04-26 15:38:02 +00:00
|
|
|
|
* jsr CORE.DumpEvent
|
2017-09-19 15:34:01 +00:00
|
|
|
|
.2 jsr CORE.DestroyEvent
|
2017-09-06 15:00:10 +00:00
|
|
|
|
|
2017-09-19 15:34:01 +00:00
|
|
|
|
.3 lda pEvent
|
|
|
|
|
clc
|
|
|
|
|
adc #S.EVT
|
|
|
|
|
sta pEvent
|
2017-10-11 15:37:41 +00:00
|
|
|
|
lda CORE.EvtCount
|
2017-09-19 15:34:01 +00:00
|
|
|
|
bne .1
|
2017-09-20 15:09:55 +00:00
|
|
|
|
*--------------------------------------
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.4 bit OPENAPPLE
|
2017-09-19 15:34:01 +00:00
|
|
|
|
bpl .8
|
|
|
|
|
lda KBD
|
|
|
|
|
bpl .8
|
2018-12-10 16:45:37 +00:00
|
|
|
|
cmp #"0"
|
2017-09-19 15:34:01 +00:00
|
|
|
|
bcc .8
|
2018-12-10 16:45:37 +00:00
|
|
|
|
cmp #"6"
|
2017-09-19 15:34:01 +00:00
|
|
|
|
bcs .8
|
2017-09-20 15:09:55 +00:00
|
|
|
|
sta KBDSTROBE
|
2019-04-25 15:33:56 +00:00
|
|
|
|
and #$0F
|
|
|
|
|
tax
|
|
|
|
|
lda A2osX.SCRNDEVS,x Get DevID
|
|
|
|
|
beq .8 No device claimed this screen
|
|
|
|
|
|
|
|
|
|
cmp A2osX.ASCREEN Same as active screen...nothing to do
|
|
|
|
|
beq .8
|
|
|
|
|
pha
|
2019-07-31 15:10:59 +00:00
|
|
|
|
>PUSHWZ Param
|
2019-04-25 15:33:56 +00:00
|
|
|
|
>PUSHBI IOCTL.CONTROL request
|
|
|
|
|
pla
|
|
|
|
|
jsr K.IOCTL
|
2017-09-19 15:34:01 +00:00
|
|
|
|
.8 jmp CORE.Run
|
2017-09-08 14:49:23 +00:00
|
|
|
|
*--------------------------------------
|
2019-01-24 13:53:29 +00:00
|
|
|
|
CORE.UpdateParentPS
|
|
|
|
|
tax save RC From INIT or RUN
|
|
|
|
|
|
|
|
|
|
ldy #S.PS.PPID Notify Parent Process for exit code...
|
|
|
|
|
lda (pPs),y
|
|
|
|
|
beq .8 no parent process
|
|
|
|
|
jsr CORE.GetPSByID X unmodified
|
|
|
|
|
bcs .8 parent is dead.....skipping...
|
|
|
|
|
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1) Parent PS is HOLD?
|
|
|
|
|
bit #S.PS.F.HOLD
|
|
|
|
|
beq .8 no...
|
|
|
|
|
|
|
|
|
|
ldy #S.PS.CPID
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
dey #S.PS.PID
|
|
|
|
|
cmp (pPs),y
|
|
|
|
|
bne .8 Hold, but not waiting this PS
|
|
|
|
|
txa waiting for this PS to terminate....
|
|
|
|
|
ldy #S.PS.RC give it RC
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
eor #S.PS.F.HOLD release Parent PS HOLD...
|
|
|
|
|
sta (ZPPtr1)
|
2019-10-03 06:25:27 +00:00
|
|
|
|
* clc
|
2019-01-24 13:53:29 +00:00
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
2017-08-31 15:35:15 +00:00
|
|
|
|
* CORE.GetEvents :
|
|
|
|
|
* IN :
|
|
|
|
|
* OUT :
|
|
|
|
|
* CS = no event, A = ERROR
|
|
|
|
|
* CC * event in YA
|
|
|
|
|
* (pEvent)
|
|
|
|
|
*--------------------------------------
|
2017-10-27 06:36:46 +00:00
|
|
|
|
CORE.GetEvents lda #Evt.Table
|
2017-08-31 15:35:15 +00:00
|
|
|
|
sta pEvent point to start of event list
|
2017-10-11 15:37:41 +00:00
|
|
|
|
stz CORE.EvtCount reset Size
|
|
|
|
|
bit CORE.IRQMode do we have IRQ enabled for Ticks ?
|
|
|
|
|
bpl .1 no, regular poll
|
2018-04-10 15:03:29 +00:00
|
|
|
|
lda IRQ.Tick a Tick ?
|
2017-10-11 15:37:41 +00:00
|
|
|
|
beq .8 no, no event
|
2018-04-10 15:03:29 +00:00
|
|
|
|
dec IRQ.Tick
|
2017-10-11 15:37:41 +00:00
|
|
|
|
bra .2
|
2019-10-03 06:25:27 +00:00
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
.1 lda VBL get VLINE status
|
2017-08-31 15:35:15 +00:00
|
|
|
|
tax
|
2017-10-11 15:37:41 +00:00
|
|
|
|
eor CORE.VBLState
|
|
|
|
|
bpl .8 no change,no tick
|
2017-08-31 15:35:15 +00:00
|
|
|
|
txa
|
2017-10-11 15:37:41 +00:00
|
|
|
|
sta CORE.VBLState save new
|
|
|
|
|
bpl .8 Up2down transition,no tick
|
2017-12-18 16:36:21 +00:00
|
|
|
|
.2 lda #0
|
2017-10-11 15:37:41 +00:00
|
|
|
|
dec CORE.TickSec
|
2017-12-18 16:36:21 +00:00
|
|
|
|
bne .3 not yet One Sec
|
2017-08-31 15:35:15 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
lda IRQ.Mode
|
2017-12-18 16:36:21 +00:00
|
|
|
|
eor #$C0
|
2018-12-17 07:02:03 +00:00
|
|
|
|
sta IRQ.Mode
|
|
|
|
|
ldx A2osX.ASCREEN
|
2019-09-27 14:53:44 +00:00
|
|
|
|
cpx #3 devID 3 is /DEV/CONSOLE
|
2018-12-17 07:02:03 +00:00
|
|
|
|
bne .22
|
2017-12-18 16:36:21 +00:00
|
|
|
|
sta SYS.BASL0+38
|
2018-12-17 07:02:03 +00:00
|
|
|
|
.22 ldx CORE.TickPerSec
|
2017-10-11 15:37:41 +00:00
|
|
|
|
stx CORE.TickSec
|
2017-08-31 15:35:15 +00:00
|
|
|
|
|
2017-12-18 16:36:21 +00:00
|
|
|
|
lda #S.EVT.F.T1SEC
|
|
|
|
|
bra .4 Force Resync T1 & T10...
|
2017-08-31 15:35:15 +00:00
|
|
|
|
|
2017-12-18 16:36:21 +00:00
|
|
|
|
.3 dec CORE.Tick10t
|
|
|
|
|
bne .6
|
|
|
|
|
.4 inc A2osX.TIMER16
|
|
|
|
|
bne .5
|
|
|
|
|
inc A2osX.TIMER16+1
|
|
|
|
|
|
|
|
|
|
.5 ldx CORE.TickPer10t
|
2017-10-11 15:37:41 +00:00
|
|
|
|
stx CORE.Tick10t
|
2017-08-31 15:35:15 +00:00
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
ora #S.EVT.F.T10TH
|
2017-12-18 16:36:21 +00:00
|
|
|
|
.6 tax Finally, do we have an event ?
|
2017-10-11 15:37:41 +00:00
|
|
|
|
beq .8 no....
|
|
|
|
|
sta (pEvent)
|
|
|
|
|
inc CORE.EvtCount Add one event to Queue
|
2017-08-31 15:35:15 +00:00
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
* lda pEvent
|
|
|
|
|
* clc
|
|
|
|
|
* adc #S.EVT
|
|
|
|
|
* sta pEvent if CS, EVT queue full!!! ($100)
|
|
|
|
|
|
|
|
|
|
* MORE EVENT PROCESSING HERE
|
2017-08-31 15:35:15 +00:00
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
.8 lda CORE.EvtCount if 0, exit with CS (from cmp), and A=0 "no event"
|
2017-08-31 15:35:15 +00:00
|
|
|
|
beq .9
|
2017-10-11 15:37:41 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
2017-08-31 15:35:15 +00:00
|
|
|
|
*--------------------------------------
|
2017-10-27 14:56:46 +00:00
|
|
|
|
* CORE.Dispatch
|
2017-08-29 15:19:09 +00:00
|
|
|
|
* IN:
|
|
|
|
|
* OUT:
|
|
|
|
|
* CS: Not Dispatched
|
|
|
|
|
* CC: Event Cleared
|
|
|
|
|
*--------------------------------------
|
2018-10-15 15:39:21 +00:00
|
|
|
|
CORE.Dispatch stz CORE.PSIndex
|
2019-01-24 13:53:29 +00:00
|
|
|
|
bra .5 skip PS0
|
2018-10-17 15:31:29 +00:00
|
|
|
|
.1 lda PS.Table.hPS,x
|
2017-09-20 15:09:55 +00:00
|
|
|
|
beq .5
|
2018-06-21 15:12:10 +00:00
|
|
|
|
jsr K.GetMemPtr
|
2017-09-19 15:34:01 +00:00
|
|
|
|
>STYA pPS
|
|
|
|
|
|
2019-07-22 16:28:44 +00:00
|
|
|
|
lda (pPs)
|
2017-08-29 15:19:09 +00:00
|
|
|
|
bit #S.PS.F.EVENT Accept Events ?
|
2017-09-20 15:09:55 +00:00
|
|
|
|
beq .5
|
2017-08-29 15:19:09 +00:00
|
|
|
|
|
2019-07-22 16:28:44 +00:00
|
|
|
|
ldy #S.PS.S
|
|
|
|
|
lda (pPs),y
|
2019-10-03 06:25:27 +00:00
|
|
|
|
cmp #S.PS.S.RUN
|
2019-07-22 16:28:44 +00:00
|
|
|
|
bne .5
|
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
lda #S.PS.S.DOEVENT Flag this PS for IRQ Mgr
|
2019-07-22 16:28:44 +00:00
|
|
|
|
sta (pPs),y
|
2018-04-13 15:18:48 +00:00
|
|
|
|
jsr CORE.PSSelect
|
2017-08-29 15:19:09 +00:00
|
|
|
|
|
2017-10-27 06:36:46 +00:00
|
|
|
|
lda #Evt.Table
|
2017-08-29 15:19:09 +00:00
|
|
|
|
sta pEvent Select first event in list
|
2017-10-11 15:37:41 +00:00
|
|
|
|
lda CORE.EvtCount
|
2018-04-26 15:38:02 +00:00
|
|
|
|
sta CORE.EvtIndex
|
2017-08-29 15:19:09 +00:00
|
|
|
|
|
|
|
|
|
.2 lda (pEvent) Empty event, select next
|
|
|
|
|
beq .3
|
2019-07-22 16:28:44 +00:00
|
|
|
|
jsr CORE.PSExec2
|
2018-04-12 15:45:31 +00:00
|
|
|
|
dec IRQ.InKernel
|
2018-04-26 15:38:02 +00:00
|
|
|
|
|
2017-08-29 15:19:09 +00:00
|
|
|
|
bcs .3 not for this PS, try next event in list
|
|
|
|
|
jsr CORE.DestroyEvent this PS handled the EVT, destroy it...
|
2018-04-26 15:38:02 +00:00
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
lda CORE.EvtCount
|
2018-04-26 15:38:02 +00:00
|
|
|
|
beq .4 no more event, exit
|
2017-08-29 15:19:09 +00:00
|
|
|
|
|
2018-04-26 15:38:02 +00:00
|
|
|
|
.3 dec CORE.EvtIndex
|
2017-08-29 15:19:09 +00:00
|
|
|
|
beq .4 all EVT submitted to this PS, try other PS
|
|
|
|
|
lda pEvent try next EVT to this PS
|
|
|
|
|
clc
|
|
|
|
|
adc #S.EVT
|
|
|
|
|
sta pEvent
|
|
|
|
|
bra .2
|
2017-09-20 15:09:55 +00:00
|
|
|
|
|
2019-07-22 16:28:44 +00:00
|
|
|
|
.4 ldy #S.PS.S
|
2019-10-03 06:25:27 +00:00
|
|
|
|
lda #S.PS.S.RUN
|
2019-07-22 16:28:44 +00:00
|
|
|
|
sta (pPs),y
|
|
|
|
|
jsr CORE.PSLeave
|
2018-10-15 15:39:21 +00:00
|
|
|
|
.5 inc CORE.PSIndex
|
|
|
|
|
ldx CORE.PSIndex
|
2018-10-23 15:36:57 +00:00
|
|
|
|
cpx CORE.PSCount
|
2017-09-19 15:34:01 +00:00
|
|
|
|
bne .1
|
2019-04-15 15:29:07 +00:00
|
|
|
|
* sec
|
2017-08-29 15:19:09 +00:00
|
|
|
|
rts
|
2017-09-19 15:34:01 +00:00
|
|
|
|
*--------------------------------------
|
2018-10-15 15:39:21 +00:00
|
|
|
|
* X unmodified
|
2017-09-20 15:09:55 +00:00
|
|
|
|
*--------------------------------------
|
2019-01-24 13:53:29 +00:00
|
|
|
|
CORE.GetPSByID jsr CORE.GetPS
|
2019-01-26 14:01:05 +00:00
|
|
|
|
bcs CORE.GetPS.RTS
|
2018-10-17 15:31:29 +00:00
|
|
|
|
lda PS.TABLE.hPS,y
|
2018-06-21 15:12:10 +00:00
|
|
|
|
jmp K.GetMemPtr
|
2018-10-17 15:31:29 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* X,A unmodified
|
2017-11-22 16:27:50 +00:00
|
|
|
|
*--------------------------------------
|
2019-01-24 13:53:29 +00:00
|
|
|
|
CORE.GetPS tay
|
2019-01-26 14:01:05 +00:00
|
|
|
|
beq CORE.GetPS.8 PS0 requested
|
2019-01-24 13:53:29 +00:00
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
bra .2 Skip PS0
|
2018-10-15 15:39:21 +00:00
|
|
|
|
.1 cmp PS.Table.PID,y
|
2019-01-26 14:01:05 +00:00
|
|
|
|
beq CORE.GetPS.8
|
2019-01-24 13:53:29 +00:00
|
|
|
|
.2 iny
|
2018-10-23 15:36:57 +00:00
|
|
|
|
cpy CORE.PSCount
|
2017-09-20 15:09:55 +00:00
|
|
|
|
bne .1
|
2018-10-21 20:54:07 +00:00
|
|
|
|
.9 lda #E.NSP
|
2018-10-15 15:39:21 +00:00
|
|
|
|
* sec
|
2019-01-26 14:01:05 +00:00
|
|
|
|
rts
|
|
|
|
|
CORE.GetPS.8
|
2019-10-03 06:25:27 +00:00
|
|
|
|
clc
|
|
|
|
|
CORE.GetPS.RTS rts
|
2017-09-20 15:09:55 +00:00
|
|
|
|
*--------------------------------------
|
2018-04-26 15:38:02 +00:00
|
|
|
|
*CORE.DumpEvent ldy #S.EVT-1
|
|
|
|
|
*.1 >PUSHB (pEvent),y
|
|
|
|
|
* dey
|
|
|
|
|
* bpl .1
|
|
|
|
|
* >LDYAI .2
|
2018-06-21 15:12:10 +00:00
|
|
|
|
* jmp K.printf
|
2018-04-26 15:38:02 +00:00
|
|
|
|
*.2 .AZ "!Evt:F=%b,Dev=$%h,LO=$%h,HI=$%h,W1=$%H,W2=$%H\n"
|
2017-09-20 15:09:55 +00:00
|
|
|
|
*--------------------------------------
|
2017-08-29 15:19:09 +00:00
|
|
|
|
CORE.DestroyEvent
|
|
|
|
|
lda (pEvent)
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
bit #S.EVT.F.hMEM1
|
|
|
|
|
beq .1
|
|
|
|
|
pha
|
2017-10-27 06:36:46 +00:00
|
|
|
|
ldy #S.EVT.B1
|
2017-08-29 15:19:09 +00:00
|
|
|
|
lda (pEvent),y
|
2018-06-21 15:12:10 +00:00
|
|
|
|
jsr K.FreeMem
|
2017-08-29 15:19:09 +00:00
|
|
|
|
pla
|
|
|
|
|
.1 bit #S.EVT.F.hMEM2
|
|
|
|
|
beq .2
|
2017-10-27 06:36:46 +00:00
|
|
|
|
ldy #S.EVT.B2
|
2017-08-29 15:19:09 +00:00
|
|
|
|
lda (pEvent),y
|
2018-06-21 15:12:10 +00:00
|
|
|
|
jsr K.FreeMem
|
2017-08-29 15:19:09 +00:00
|
|
|
|
.2 lda #0
|
|
|
|
|
sta (pEvent)
|
2017-10-11 15:37:41 +00:00
|
|
|
|
dec CORE.EvtCount
|
2017-08-29 15:19:09 +00:00
|
|
|
|
.9 rts
|
2017-09-19 15:34:01 +00:00
|
|
|
|
*--------------------------------------
|
2019-07-18 15:55:43 +00:00
|
|
|
|
CORE.PSSelect ldy #S.PS.ZP.SESSION+PSCTX.SIZE-1
|
|
|
|
|
ldx #PSCTX.SIZE-1
|
2018-04-26 15:38:02 +00:00
|
|
|
|
|
2018-04-10 15:03:29 +00:00
|
|
|
|
.1 lda (pPs),y
|
2019-07-18 15:55:43 +00:00
|
|
|
|
sta pSession,x
|
2018-04-10 15:03:29 +00:00
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
2019-04-15 15:29:07 +00:00
|
|
|
|
|
2017-09-19 15:34:01 +00:00
|
|
|
|
rts
|
2018-04-26 15:38:02 +00:00
|
|
|
|
*--------------------------------------
|
2019-07-18 15:55:43 +00:00
|
|
|
|
CORE.PSLeave ldy #S.PS.ZP.SESSION+PSCTX.SIZE-1
|
|
|
|
|
ldx #PSCTX.SIZE-1
|
|
|
|
|
.1 lda pSession,x
|
2017-09-19 15:34:01 +00:00
|
|
|
|
sta (pPs),y
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
2018-04-10 15:03:29 +00:00
|
|
|
|
rts
|
2017-08-29 15:19:09 +00:00
|
|
|
|
*--------------------------------------
|
2019-01-21 14:51:10 +00:00
|
|
|
|
CORE.PSExec lda (pPS)
|
2018-04-26 15:38:02 +00:00
|
|
|
|
bit #S.PS.F.SLEEP
|
|
|
|
|
bne CORE.PSResume
|
2019-10-03 06:25:27 +00:00
|
|
|
|
|
2019-07-22 16:28:44 +00:00
|
|
|
|
CORE.PSExec2 ldy #S.PS.S
|
|
|
|
|
lda (pPS),y
|
2018-04-26 15:38:02 +00:00
|
|
|
|
|
2019-07-22 16:28:44 +00:00
|
|
|
|
tax
|
2018-04-26 15:38:02 +00:00
|
|
|
|
lda pCode+1
|
|
|
|
|
pha
|
|
|
|
|
lda pCode
|
|
|
|
|
pha
|
|
|
|
|
php
|
2018-04-20 15:06:41 +00:00
|
|
|
|
sei
|
2018-04-26 15:38:02 +00:00
|
|
|
|
inc IRQ.InKernel
|
|
|
|
|
rti
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CORE.PSResume sei
|
|
|
|
|
|
|
|
|
|
eor #S.PS.F.SLEEP unmark as SLEEP
|
|
|
|
|
sta (pPS)
|
|
|
|
|
|
|
|
|
|
>PULLA Get !BC
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
.1 >PULLA
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
bne .1
|
|
|
|
|
.2 ldy #S.PS.PC+1
|
|
|
|
|
lda (pPs),y
|
|
|
|
|
pha
|
|
|
|
|
dey #S.PS.PC
|
|
|
|
|
lda (pPs),y
|
|
|
|
|
pha
|
|
|
|
|
dey #S.PS.P
|
|
|
|
|
lda (pPs),y
|
|
|
|
|
pha
|
|
|
|
|
dey #S.PS.Y
|
|
|
|
|
lda (pPs),y
|
|
|
|
|
pha
|
|
|
|
|
dey #S.PS.X
|
|
|
|
|
lda (pPs),y
|
|
|
|
|
tax
|
|
|
|
|
dey #S.PS.A
|
|
|
|
|
lda (pPs),y
|
|
|
|
|
|
|
|
|
|
ply
|
|
|
|
|
inc IRQ.InKernel
|
|
|
|
|
rti
|
|
|
|
|
*--------------------------------------
|
2019-04-15 05:40:13 +00:00
|
|
|
|
CORE.EvtIndex .BS 1
|
|
|
|
|
CORE.EvtCount .BS 1
|
|
|
|
|
*--------------------------------------
|
2017-08-29 15:19:09 +00:00
|
|
|
|
MAN
|
2018-11-17 17:17:13 +00:00
|
|
|
|
SAVE USR/SRC/SYS/KERNEL.S.CORE
|
|
|
|
|
LOAD USR/SRC/SYS/KERNEL.S
|
2017-08-29 15:19:09 +00:00
|
|
|
|
ASM
|