2016-06-07 06:10:18 +00:00
|
|
|
|
PR#3
|
|
|
|
|
PREFIX /A2OSX.SRC
|
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
S.KernelRun jsr S.TskMgrRun
|
2016-06-23 15:56:13 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2016-06-07 06:10:18 +00:00
|
|
|
|
jsr S.GetEvents
|
|
|
|
|
bcs S.KernelRun CS=no event
|
|
|
|
|
|
|
|
|
|
jsr S.DispatchEvents
|
|
|
|
|
bcc S.KernelRun CC=All Events Dispatched
|
|
|
|
|
|
|
|
|
|
jsr S.SelectProcess0
|
|
|
|
|
|
|
|
|
|
stz pEvent
|
|
|
|
|
|
|
|
|
|
.1 lda (pEvent)
|
|
|
|
|
beq .81
|
|
|
|
|
bmi .8 Discard any timer event
|
|
|
|
|
|
|
|
|
|
bit #S.EVT.F.KEY any special key?
|
|
|
|
|
beq .7
|
|
|
|
|
|
|
|
|
|
ldy #S.EVT.DATAHI Open-Apple?
|
|
|
|
|
lda (pEvent),y
|
|
|
|
|
bpl .7
|
|
|
|
|
|
2016-06-23 15:56:13 +00:00
|
|
|
|
dey S.EVT.DATALO
|
2016-06-07 06:10:18 +00:00
|
|
|
|
lda (pEvent),y
|
|
|
|
|
|
|
|
|
|
cmp #'1'
|
|
|
|
|
bcc .8
|
|
|
|
|
cmp #'5'
|
|
|
|
|
bcs .8
|
|
|
|
|
and #$0F
|
|
|
|
|
|
|
|
|
|
cmp A2osX.ASCREEN
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
lda A2osX.SCRNDEVS-1,x
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
jsr S.GetDevByIDA
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
>STYA pDev
|
|
|
|
|
ldx #DEVMGR.SELECT
|
|
|
|
|
jsr pDevJmp
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
ldy #S.EVT.DATALO
|
|
|
|
|
lda (pEvent),y
|
|
|
|
|
and #$0F
|
|
|
|
|
sta A2osX.ASCREEN
|
|
|
|
|
bra .8
|
|
|
|
|
|
2016-06-23 15:56:13 +00:00
|
|
|
|
.7 ldy #S.EVT.DATAW2+1
|
|
|
|
|
.71 >PUSHB (pEvent),y
|
|
|
|
|
dey
|
|
|
|
|
bpl .71
|
|
|
|
|
|
|
|
|
|
>LDYAI MSG.DumpEvent
|
|
|
|
|
jsr S.PSTROutYA
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
|
|
|
|
.8 jsr S.DestroyEvent
|
|
|
|
|
|
|
|
|
|
.81 lda pEvent
|
|
|
|
|
clc
|
|
|
|
|
adc #S.EVT
|
|
|
|
|
sta pEvent
|
|
|
|
|
lda EVTMGR.COUNT
|
|
|
|
|
bne .1
|
|
|
|
|
|
2016-06-23 15:56:13 +00:00
|
|
|
|
beq S.KernelRun
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
2016-06-23 15:56:13 +00:00
|
|
|
|
.9 jsr DevMgr.SYS.Select
|
|
|
|
|
>LDYAI MSG.KRNLPANIC
|
|
|
|
|
jsr S.PSTROutYA
|
|
|
|
|
bra *
|
2016-06-07 06:10:18 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MSG.DumpEvent >PSTRING "!Unhandled Event:Flags=%h,DevID=%h,DATALO=%h,DATAHI=%h,W1=%H,W2=%H\n"
|
|
|
|
|
MSG.KRNLPANIC >PSTRING "\n!!!Kernel Panic!!!\n"
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE SYS/KERNEL.S.RUN
|
|
|
|
|
LOAD SYS/KERNEL.S
|
|
|
|
|
ASM
|