A2osX/SYS/KERNEL.S.RUN.txt
Rémy GIBERT bae3f91aab 0.9
2017-01-12 18:43:45 +01:00

97 lines
1.7 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

PR#3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.LIST OFF
*--------------------------------------
K.KernelRun jsr TSK.TskMgrRun
bcs *
jsr EVT.GetEvents
bcs .4 CS=no event
jsr TSK.DispatchEvents
bcc .4 CC=All Events Dispatched
jsr PS.Select0
stz pEvent
.1 lda (pEvent)
beq .3
bmi .2 Ignore & Discard any timer event
ldy #S.EVT-1
.10 lda (pEvent),y
>PUSHA
dey
bpl .10
>LDYAI MSG.DumpEvent
jsr K.CPrintFYA
.2 jsr EVT.DestroyEvent
.3 lda pEvent
clc
adc #S.EVT
sta pEvent
lda EVTMGR.COUNT
bne .1
.4 bit OPENAPPLE
bpl K.KernelRun
inc A2osX.RANDOM16
lda KBD
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
>STYA pDev
lda (pDev)
sta .5+1
ldy #1
lda (pDev),y
sta .5+2
ldx #DEVMGR.CONTROL
jsr .5
jmp K.KernelRun
.5 jmp $ffff
*--------------------------------------
.9 jsr DevMgr.SYS.Control
>LDYAI MSG.KRNLPANIC
jsr K.CPrintFYA
bra *
*--------------------------------------
MSG.DumpEvent >CSTR "!Evt:F=%b,Dev=$%h,LO=$%h,HI=$%h,W1=$%H,W2=$%H\n"
MSG.KRNLPANIC >CSTR "\n!!!Kernel Panic!!!\n"
*--------------------------------------
MAN
SAVE SYS/KERNEL.S.RUN
LOAD SYS/KERNEL.S
ASM