mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-22 16:31:07 +00:00
104 lines
1.9 KiB
Plaintext
104 lines
1.9 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.BUILD
|
||
LOMEM $A00
|
||
INC 1
|
||
AUTO 6
|
||
*--------------------------------------
|
||
SYS.BASL0 .EQ $800
|
||
*--------------------------------------
|
||
K.KernelRun jsr TSK.TskMgrRun
|
||
stx A2osX.RANDOM16
|
||
jsr EVT.GetEvents
|
||
txa
|
||
eor KBD
|
||
sta A2osX.RANDOM16+1
|
||
bcs .4 CS=no event
|
||
|
||
jsr TSK.DispatchEvents
|
||
bcc .4 CC=All Events Dispatched
|
||
|
||
jsr PS.Select0
|
||
|
||
lda #EvtMgr.Table
|
||
sta pEvent
|
||
|
||
.1 lda (pEvent)
|
||
beq .3
|
||
|
||
bmi .2 Ignore & Discard any timer event
|
||
|
||
jsr RUN.DumpEvent
|
||
|
||
.2 jsr EVT.DestroyEvent
|
||
|
||
.3 lda pEvent
|
||
clc
|
||
adc #S.EVT
|
||
sta pEvent
|
||
lda EVTMGR.COUNT
|
||
bne .1
|
||
|
||
.4 lda A2osX.ASCREEN
|
||
cmp #2 is SYS active?
|
||
bne .6
|
||
|
||
ldx SYS.CPULOADI
|
||
lda SYS.CPULOADC,x
|
||
sta SYS.BASL0+38
|
||
dex
|
||
bpl .5
|
||
ldx #3
|
||
.5 stx SYS.CPULOADI
|
||
|
||
.6 bit OPENAPPLE
|
||
bpl K.KernelRun
|
||
|
||
lda KBD
|
||
|
||
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
|
||
beq K.KernelRun No device claimed this screen
|
||
|
||
jsr K.GetDevByIDA x unmodified.....
|
||
bcs K.KernelRun ???
|
||
|
||
stx A2osX.ASCREEN
|
||
|
||
>STYA pDev
|
||
|
||
ldx #DEVMGR.CONTROL
|
||
jsr pDevJmp
|
||
jmp K.KernelRun
|
||
*--------------------------------------
|
||
RUN.DumpEvent ldy #S.EVT-1
|
||
|
||
.1 >PUSHB (pEvent),y
|
||
dey
|
||
bpl .1
|
||
|
||
>LDYAI MSG.DumpEvent
|
||
jmp K.CPrintFYA
|
||
*--------------------------------------
|
||
MSG.DumpEvent >CSTR "!Evt:F=%b,Dev=$%h,LO=$%h,HI=$%h,W1=$%H,W2=$%H\n"
|
||
SYS.CPULOADI .BS 1
|
||
SYS.CPULOADC .AS "|/-\"
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE /A2OSX.SRC/SYS/KERNEL.S.RUN
|
||
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
||
ASM
|