2016-06-07 06:10:18 +00:00
|
|
|
|
PR#3
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2017-03-15 16:44:15 +00:00
|
|
|
|
LOMEM $A00
|
2016-06-07 06:10:18 +00:00
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
*--------------------------------------
|
2017-02-08 16:42:32 +00:00
|
|
|
|
SYS.BASL0 .EQ $800
|
|
|
|
|
*--------------------------------------
|
2016-10-03 06:18:46 +00:00
|
|
|
|
K.KernelRun jsr TSK.TskMgrRun
|
2017-03-09 07:11:44 +00:00
|
|
|
|
stx A2osX.RANDOM16
|
2016-09-29 15:30:15 +00:00
|
|
|
|
jsr EVT.GetEvents
|
2017-03-09 07:11:44 +00:00
|
|
|
|
txa
|
|
|
|
|
eor KBD
|
|
|
|
|
sta A2osX.RANDOM16+1
|
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
|
|
|
|
|
2017-08-21 14:58:48 +00:00
|
|
|
|
>LDYAI TskMgr.Table Select PS0
|
|
|
|
|
>STYA pPs
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
2017-03-15 16:44:15 +00:00
|
|
|
|
lda #EvtMgr.Table
|
|
|
|
|
sta pEvent
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
|
|
|
|
.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
|
|
|
|
|
2017-02-08 16:42:32 +00:00
|
|
|
|
jsr RUN.DumpEvent
|
2016-10-07 15:28:17 +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
|
|
|
|
|
|
2017-02-08 16:42:32 +00:00
|
|
|
|
.4 lda A2osX.ASCREEN
|
|
|
|
|
cmp #2 is SYS active?
|
2017-06-02 15:14:42 +00:00
|
|
|
|
bne .6
|
2017-02-08 16:42:32 +00:00
|
|
|
|
|
|
|
|
|
ldx SYS.CPULOADI
|
2017-06-02 15:14:42 +00:00
|
|
|
|
lda SYS.CPULOADC,x
|
2017-02-08 16:42:32 +00:00
|
|
|
|
sta SYS.BASL0+38
|
|
|
|
|
dex
|
2017-06-02 15:14:42 +00:00
|
|
|
|
bpl .5
|
2017-02-08 16:42:32 +00:00
|
|
|
|
ldx #3
|
2017-06-02 15:14:42 +00:00
|
|
|
|
.5 stx SYS.CPULOADI
|
2017-02-08 16:42:32 +00:00
|
|
|
|
|
2017-06-02 15:14:42 +00:00
|
|
|
|
.6 bit OPENAPPLE
|
2016-10-06 15:50:20 +00:00
|
|
|
|
bpl K.KernelRun
|
|
|
|
|
|
2017-01-12 17:43:45 +00:00
|
|
|
|
lda KBD
|
2016-10-06 15:50:20 +00:00
|
|
|
|
|
|
|
|
|
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
|
2017-03-15 16:44:15 +00:00
|
|
|
|
|
|
|
|
|
lda A2osX.SCRNDEVS-1,x
|
|
|
|
|
beq K.KernelRun No device claimed this screen
|
2016-10-06 15:50:20 +00:00
|
|
|
|
|
|
|
|
|
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-03-15 16:44:15 +00:00
|
|
|
|
|
2017-01-12 17:43:45 +00:00
|
|
|
|
ldx #DEVMGR.CONTROL
|
2017-03-15 16:44:15 +00:00
|
|
|
|
jsr pDevJmp
|
2017-01-12 17:43:45 +00:00
|
|
|
|
jmp K.KernelRun
|
2017-02-08 16:42:32 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
RUN.DumpEvent ldy #S.EVT-1
|
|
|
|
|
|
|
|
|
|
.1 >PUSHB (pEvent),y
|
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
>LDYAI MSG.DumpEvent
|
|
|
|
|
jmp K.CPrintFYA
|
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"
|
2017-02-08 16:42:32 +00:00
|
|
|
|
SYS.CPULOADI .BS 1
|
2017-02-21 07:52:27 +00:00
|
|
|
|
SYS.CPULOADC .AS "|/-\"
|
2016-06-07 06:10:18 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2017-03-29 15:48:15 +00:00
|
|
|
|
SAVE /A2OSX.SRC/SYS/KERNEL.S.RUN
|
|
|
|
|
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
2016-06-07 06:10:18 +00:00
|
|
|
|
ASM
|