2016-06-07 06:10:18 +00:00
|
|
|
|
PR#3
|
|
|
|
|
PREFIX /A2OSX.SRC
|
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2016-10-03 06:18:46 +00:00
|
|
|
|
K.KernelRun jsr TSK.TskMgrRun
|
2017-01-12 17:43:45 +00:00
|
|
|
|
bcs *
|
2016-06-23 15:56:13 +00:00
|
|
|
|
|
2016-09-29 15:30:15 +00:00
|
|
|
|
jsr EVT.GetEvents
|
2017-01-12 17:43:45 +00:00
|
|
|
|
bcs .4 CS=no event
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
2016-09-29 15:30:15 +00:00
|
|
|
|
jsr TSK.DispatchEvents
|
2016-10-06 15:50:20 +00:00
|
|
|
|
bcc .4 CC=All Events Dispatched
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
2016-09-29 15:30:15 +00:00
|
|
|
|
jsr PS.Select0
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
|
|
|
|
stz pEvent
|
|
|
|
|
|
|
|
|
|
.1 lda (pEvent)
|
2016-10-06 15:50:20 +00:00
|
|
|
|
beq .3
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
2016-10-06 15:50:20 +00:00
|
|
|
|
bmi .2 Ignore & Discard any timer event
|
2016-06-23 15:56:13 +00:00
|
|
|
|
|
2016-10-07 15:28:17 +00:00
|
|
|
|
ldy #S.EVT-1
|
|
|
|
|
|
|
|
|
|
.10 lda (pEvent),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
bpl .10
|
|
|
|
|
|
2016-06-23 15:56:13 +00:00
|
|
|
|
>LDYAI MSG.DumpEvent
|
2016-11-03 16:23:16 +00:00
|
|
|
|
jsr K.CPrintFYA
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
2016-10-06 15:50:20 +00:00
|
|
|
|
.2 jsr EVT.DestroyEvent
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
2016-10-06 15:50:20 +00:00
|
|
|
|
.3 lda pEvent
|
2016-06-07 06:10:18 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #S.EVT
|
|
|
|
|
sta pEvent
|
|
|
|
|
lda EVTMGR.COUNT
|
|
|
|
|
bne .1
|
|
|
|
|
|
2016-10-06 15:50:20 +00:00
|
|
|
|
.4 bit OPENAPPLE
|
|
|
|
|
bpl K.KernelRun
|
|
|
|
|
|
|
|
|
|
inc A2osX.RANDOM16
|
2017-01-12 17:43:45 +00:00
|
|
|
|
lda KBD
|
2016-10-06 15:50:20 +00:00
|
|
|
|
sta A2osX.RANDOM16+1
|
|
|
|
|
|
|
|
|
|
bpl K.KernelRun
|
|
|
|
|
|
|
|
|
|
cmp #"1"
|
|
|
|
|
bcc K.KernelRun
|
|
|
|
|
cmp #"5"
|
|
|
|
|
bcs K.KernelRun
|
|
|
|
|
|
|
|
|
|
sta KBDSTROBE
|
|
|
|
|
|
|
|
|
|
and #$0F
|
|
|
|
|
cmp A2osX.ASCREEN Same as active screen...nothing to do
|
|
|
|
|
beq K.KernelRun
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
lda A2osX.SCRNDEVS-1,x No device claimed this screen
|
|
|
|
|
beq K.KernelRun
|
|
|
|
|
|
|
|
|
|
jsr K.GetDevByIDA x unmodified.....
|
|
|
|
|
bcs K.KernelRun ???
|
|
|
|
|
|
|
|
|
|
stx A2osX.ASCREEN
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
2016-10-06 15:50:20 +00:00
|
|
|
|
>STYA pDev
|
2017-01-12 17:43:45 +00:00
|
|
|
|
lda (pDev)
|
|
|
|
|
sta .5+1
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (pDev),y
|
|
|
|
|
sta .5+2
|
|
|
|
|
ldx #DEVMGR.CONTROL
|
|
|
|
|
jsr .5
|
|
|
|
|
jmp K.KernelRun
|
|
|
|
|
.5 jmp $ffff
|
2016-10-06 15:50:20 +00:00
|
|
|
|
*--------------------------------------
|
2017-01-12 17:43:45 +00:00
|
|
|
|
.9 jsr DevMgr.SYS.Control
|
2016-06-23 15:56:13 +00:00
|
|
|
|
>LDYAI MSG.KRNLPANIC
|
2016-11-03 16:23:16 +00:00
|
|
|
|
jsr K.CPrintFYA
|
2016-06-23 15:56:13 +00:00
|
|
|
|
bra *
|
2016-06-07 06:10:18 +00:00
|
|
|
|
*--------------------------------------
|
2017-01-12 17:43:45 +00:00
|
|
|
|
MSG.DumpEvent >CSTR "!Evt:F=%b,Dev=$%h,LO=$%h,HI=$%h,W1=$%H,W2=$%H\n"
|
2016-10-24 15:54:43 +00:00
|
|
|
|
MSG.KRNLPANIC >CSTR "\n!!!Kernel Panic!!!\n"
|
2016-06-07 06:10:18 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE SYS/KERNEL.S.RUN
|
|
|
|
|
LOAD SYS/KERNEL.S
|
|
|
|
|
ASM
|