mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-25 19:30:44 +00:00
Kernel 0.9.1 : KERNEL, New IRQ Handler for Preemtive mode
This commit is contained in:
parent
c314dfdfd2
commit
31dee965f6
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,9 +13,10 @@ pPs .EQ $D6
|
||||
pCode .EQ $D8
|
||||
pData .EQ $DA
|
||||
pStack .EQ $DC
|
||||
pLocal .EQ $DE
|
||||
pLocal .EQ $DE 8 Bytes
|
||||
|
||||
ZPBIN .EQ $E0 32 bytes
|
||||
ZPBIN.SIZE .EQ 40 8+32
|
||||
*--------------------------------------
|
||||
* A2osX GLOBAL PAGE
|
||||
* $BD00->$BD0F : Public Vetors
|
||||
@ -371,7 +372,7 @@ S.PS.CPID .EQ 3
|
||||
S.PS.hCS .EQ 4
|
||||
S.PS.hDS .EQ 5
|
||||
S.PS.hSS .EQ 6
|
||||
*S.PS.SP .EQ 7
|
||||
S.PS.ZP.SIZE .EQ 7
|
||||
S.PS.hENV .EQ 8
|
||||
S.PS.hPREFIX .EQ 9
|
||||
S.PS.hStdIn .EQ 10
|
||||
@ -383,9 +384,14 @@ S.PS.PC .EQ 14
|
||||
S.PS.ARGC .EQ 16
|
||||
S.PS.hARGS .EQ 17
|
||||
|
||||
S.PS.ZP .EQ 24 8+32 Bytes
|
||||
S.PS.ZP .EQ 24
|
||||
|
||||
S.PS.ZP.CODE .EQ 24
|
||||
S.PS.ZP.DATA .EQ 26
|
||||
S.PS.ZP.STACK .EQ 28
|
||||
S.PS.ZP.LOCAL .EQ 30
|
||||
*
|
||||
S.PS .EQ 64
|
||||
S.PS .EQ S.PS.ZP+ZPBIN.SIZE
|
||||
*--------------------------------------
|
||||
* LIB Function Indexes
|
||||
*--------------------------------------
|
||||
|
@ -230,8 +230,8 @@ K.FileSearch.I >PULLW .4+1 Filename
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
BIN.Find.ENV.DRV >CSTR "DRV"
|
||||
BIN.Find.ENV.LIB >CSTR "LIB"
|
||||
BIN.Find.ENV.DRV .AZ "DRV"
|
||||
BIN.Find.ENV.LIB .AZ "LIB"
|
||||
*--------------------------------------
|
||||
* BIN.Load.YA
|
||||
* in :
|
||||
|
@ -146,10 +146,10 @@ CORE.GetEvents lda #Evt.Table
|
||||
bit CORE.IRQMode do we have IRQ enabled for Ticks ?
|
||||
bpl .1 no, regular poll
|
||||
|
||||
lda CORE.IRQTick a Tick ?
|
||||
lda IRQ.Tick a Tick ?
|
||||
beq .8 no, no event
|
||||
|
||||
dec CORE.IRQTick
|
||||
dec IRQ.Tick
|
||||
bra .2
|
||||
|
||||
.1 lda VBL get VLINE status
|
||||
@ -361,7 +361,7 @@ CORE.DumpEvent ldy #S.EVT-1
|
||||
>LDYAI .2
|
||||
jmp K.PrintF.YA
|
||||
|
||||
.2 >CSTR "!Evt:F=%b,Dev=$%h,LO=$%h,HI=$%h,W1=$%H,W2=$%H\n"
|
||||
.2 .AZ "!Evt:F=%b,Dev=$%h,LO=$%h,HI=$%h,W1=$%H,W2=$%H\n"
|
||||
*--------------------------------------
|
||||
CORE.ScrSel and #$0F
|
||||
cmp A2osX.ASCREEN Same as active screen...nothing to do
|
||||
@ -414,10 +414,21 @@ CORE.PSSelect0 >LDYAI CORE.S.PS0 Select PS0
|
||||
|
||||
>LDYAI K.STACKTOP
|
||||
>STYA pStack
|
||||
rts
|
||||
*--------------------------------------
|
||||
CORE.PSEnter ldy #S.PS.ZP+ZPBIN.SIZE-1
|
||||
ldx #ZPBIN.SIZE-1
|
||||
|
||||
.1 lda (pPs),y
|
||||
sta pCode,x
|
||||
dey
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CORE.PSLeave ldy #S.PS.ZP+23
|
||||
ldx #23
|
||||
CORE.PSLeave ldy #S.PS.ZP+ZPBIN.SIZE-1
|
||||
ldx #ZPBIN.SIZE-1
|
||||
|
||||
.1 lda pCode,x
|
||||
sta (pPs),y
|
||||
@ -425,17 +436,23 @@ CORE.PSLeave ldy #S.PS.ZP+23
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
clc No error,
|
||||
rts back to Kernel
|
||||
rts
|
||||
*--------------------------------------
|
||||
CORE.PSEnter ldy #S.PS.ZP+23
|
||||
ldx #23
|
||||
|
||||
.1 lda (pPs),y
|
||||
sta pCode,x
|
||||
dey
|
||||
dex
|
||||
bpl .1
|
||||
CORE.Sleep pla get PC LO
|
||||
sec
|
||||
sbc pCode
|
||||
ldy #S.PS.PC
|
||||
sta (pPs),y
|
||||
|
||||
pla get PC HI
|
||||
sbc pCode+1
|
||||
iny
|
||||
sta (pPs),y
|
||||
|
||||
lda (pPs)
|
||||
ora #S.PS.F.SLEEP
|
||||
sta (pPs)
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CORE.PSResume ldy #S.PS.PC
|
||||
@ -462,7 +479,6 @@ CORE.EvtCount .BS 1
|
||||
CORE.VBLState .BS 1
|
||||
|
||||
CORE.IRQMode .BS 1
|
||||
CORE.IRQTick .BS 1
|
||||
|
||||
CORE.TickPerSec .BS 1
|
||||
CORE.TickPer10t .BS 1
|
||||
|
@ -32,7 +32,7 @@ AUTO 4,1
|
||||
* X = MLI Function
|
||||
* A = Param Count
|
||||
*--------------------------------------
|
||||
jmp GP.ROMCall
|
||||
jmp GP.RomCall
|
||||
*--------------------------------------
|
||||
* BADCALL
|
||||
*--------------------------------------
|
||||
@ -42,26 +42,13 @@ AUTO 4,1
|
||||
*--------------------------------------
|
||||
* SLEEP
|
||||
*--------------------------------------
|
||||
pla get PC LO
|
||||
sec
|
||||
sbc pCode
|
||||
ldy #S.PS.PC
|
||||
sta (pPs),y
|
||||
|
||||
pla get PC HI
|
||||
sbc pCode+1
|
||||
iny
|
||||
sta (pPs),y
|
||||
|
||||
lda (pPs)
|
||||
ora #S.PS.F.SLEEP
|
||||
sta (pPs)
|
||||
clc
|
||||
rts
|
||||
jmp CORE.Sleep
|
||||
*--------------------------------------
|
||||
* *** MUST BE REINTRANT ***
|
||||
*--------------------------------------
|
||||
GP.SysCall bit K.SYSCALL.BANK,x
|
||||
GP.SysCall dec IRQ.InKernel
|
||||
|
||||
bit K.SYSCALL.BANK,x
|
||||
bpl .8 in $E000, no BNK change
|
||||
|
||||
sta .7+1 save A (Func Arg)
|
||||
@ -86,28 +73,42 @@ GP.SysCall bit K.SYSCALL.BANK,x
|
||||
bit $C000,x
|
||||
bit $C000,x
|
||||
.5 ldx #$FF Self Modified
|
||||
|
||||
inc IRQ.InKernel
|
||||
rts Unmodified Carry
|
||||
|
||||
.6 ldx #$FF Self Modified
|
||||
.7 lda #$FF Self Modified
|
||||
.8 jmp (K.SYSCALL.JMP,x)
|
||||
*--------------------------------------
|
||||
GP.LibCall pha No need to save X, K.GetMemPtr.A will leave it unmodified
|
||||
GP.LibCall dec IRQ.InKernel
|
||||
|
||||
pha No need to save X, K.GetMemPtr.A will leave it unmodified
|
||||
tya Get LIB hMem in A
|
||||
jsr K.GetMemPtr.A Get LIB Code Segment (MemMgr in $E000, no BNK change)
|
||||
>STYA .1+1
|
||||
pla
|
||||
.1 jmp *
|
||||
.1 jsr * SELF MODIFIED
|
||||
|
||||
inc IRQ.InKernel
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
GP.AtkCall >STYA .1
|
||||
GP.AtkCall dec IRQ.InKernel
|
||||
|
||||
>STYA .1
|
||||
jsr GO.ProDOS
|
||||
jsr MLI
|
||||
.DA #MLIATALK
|
||||
.1 .DA *
|
||||
jsr GO.A2osX
|
||||
|
||||
inc IRQ.InKernel
|
||||
rts
|
||||
*--------------------------------------
|
||||
GP.ROMCall phx
|
||||
GP.RomCall dec IRQ.InKernel
|
||||
|
||||
phx
|
||||
ldx $D000
|
||||
stx .8+1
|
||||
|
||||
@ -119,6 +120,9 @@ GP.ROMCall phx
|
||||
.8 ldx #$ff
|
||||
bit $C000,x
|
||||
bit $C000,x
|
||||
|
||||
inc IRQ.InKernel
|
||||
|
||||
rts
|
||||
|
||||
.1 jmp (.2,x)
|
||||
@ -222,31 +226,16 @@ GO.EXIT.JMP jmp $FFFF Self Modified
|
||||
* must exit with RTS
|
||||
* - CC if IRQ cleared, CS if NOT
|
||||
*--------------------------------------
|
||||
*GP.IrqH cld
|
||||
* lda RDALTZP
|
||||
* sta .2+1
|
||||
*
|
||||
* bmi .1 we are already in AuxZP/LC
|
||||
GP.IrqH cld
|
||||
|
||||
bit IRQ.SkipA2osX After A2osX IRQ.H ?
|
||||
|
||||
* sta SETALTZP coming from MainLC, switch to aux
|
||||
* tsx
|
||||
* stx A2osX.SaveSM
|
||||
* ldx A2osX.SaveSX
|
||||
* txs
|
||||
|
||||
*.1 jsr K.IrqH
|
||||
|
||||
*.2 lda #$ff get back ZP status when called
|
||||
* bmi .3 we were coming from AuxZP/LC
|
||||
stz IRQ.SkipA2osX reset flag
|
||||
|
||||
* tsx go back to Main
|
||||
* stx A2osX.SaveSX
|
||||
* ldx A2osX.SaveSM
|
||||
* txs
|
||||
* sta CLRALTZP
|
||||
|
||||
*.3 rts
|
||||
*--------------------------------------
|
||||
GP.IrqH.BPL bpl GP.IrqH.DEV SELF MODIFIED
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
GP.IrqH.TCLOCK ldy IRQ.VBL.n0
|
||||
|
||||
lda $c080,y
|
||||
@ -256,8 +245,7 @@ GP.IrqH.TCLOCK ldy IRQ.VBL.n0
|
||||
lda $c080,y
|
||||
lda $c088,y
|
||||
|
||||
inc CORE.IRQTick
|
||||
|
||||
inc IRQ.Tick
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -272,9 +260,8 @@ GP.IrqH.VBL jsr IRQ.VBL.MSM SERVEMOUSE
|
||||
ldx IRQ.VBL.MRM+2 $Cn
|
||||
ldy IRQ.VBL.n0
|
||||
jsr IRQ.VBL.MRM READMOUSE
|
||||
|
||||
inc CORE.IRQTick
|
||||
|
||||
inc IRQ.Tick
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -322,6 +309,9 @@ GP.IrqH.DEV sta SETALTZP switch to aux LC
|
||||
GP.IrqHJMP ldx #DEVMGR.IRQ
|
||||
jmp ($fe)
|
||||
*--------------------------------------
|
||||
IRQ.SkipA2osX .BS 1
|
||||
IRQ.Tick .BS 1
|
||||
IRQ.InKernel .BS 1
|
||||
IRQ.IntNum .BS 1
|
||||
IRQ.VBL.n0 .BS 1
|
||||
IRQ.VBL.0n .BS 1
|
||||
|
@ -545,20 +545,20 @@ PS0Init ldx #S.DEV*2 NUL,SYS
|
||||
clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
DevMgr.SYS.TITLE >CSTR "A2osX System Screen"
|
||||
DevMgr.SYS.TITLE .AZ "A2osX System Screen"
|
||||
*--------------------------------------
|
||||
DevMgr.NUL cld
|
||||
jmp (DevMgr.NUL.Code,x)
|
||||
.DA #S.DEV.S.WRITE+S.DEV.S.READ+S.DEV.S.OPENED
|
||||
.BS 6
|
||||
>CSTR "NUL" NAME
|
||||
.AZ "NUL" NAME
|
||||
.HS 00 NAME must Be 4 bytes long
|
||||
*--------------------------------------
|
||||
DevMgr.SYS cld
|
||||
jmp (DevMgr.SYS.Code,x)
|
||||
.DA #S.DEV.S.WRITE+S.DEV.S.READ
|
||||
.BS 6
|
||||
>CSTR "SYS" NAME
|
||||
.AZ "SYS" NAME
|
||||
.HS 00 NAME must Be 4 bytes long
|
||||
*--------------------------------------
|
||||
* Setup AuxLC $FFFE->Kernel IRQ Handler
|
||||
@ -566,22 +566,24 @@ DevMgr.SYS cld
|
||||
*--------------------------------------
|
||||
IrqMgrInit >LDYAI MSG.IRQ
|
||||
>SYSCALL PrintF.YA
|
||||
* php
|
||||
* sei
|
||||
* >LDYA $FFFE
|
||||
* >STYA IRQ.OldFFFE
|
||||
* >LDYAI K.IrqHAuxLC
|
||||
* >STYA $FFFE
|
||||
|
||||
php
|
||||
sei
|
||||
>LDYA $FFFE
|
||||
>STYA K.IRQ.OldFFFE
|
||||
>LDYAI K.IrqHAuxLC
|
||||
>STYA $FFFE
|
||||
|
||||
* >LDYAI GP.IrqH
|
||||
* >STYA K.MLI.PARAMS+2
|
||||
* >MLICALL MLIALLOCIRQ
|
||||
* bcs .9
|
||||
>LDYAI GP.IrqH
|
||||
>STYA K.MLI.PARAMS+2
|
||||
|
||||
>MLICALL MLIALLOCIRQ
|
||||
bcs .90
|
||||
|
||||
* lda K.MLI.PARAMS+1
|
||||
* sta IRQ.INTNUM
|
||||
|
||||
* plp
|
||||
lda K.MLI.PARAMS+1
|
||||
sta IRQ.INTNUM
|
||||
|
||||
plp
|
||||
|
||||
jsr IrqMgrInit.TClock
|
||||
bcs .1
|
||||
@ -589,10 +591,12 @@ IrqMgrInit >LDYAI MSG.IRQ
|
||||
lda #"C"
|
||||
sta SYS.BASL0+38
|
||||
|
||||
>LDYAI GP.IrqH.TClock
|
||||
jsr IrqMgrInit.MLI
|
||||
bcs .9
|
||||
lda #GP.IrqH.TCLOCK-GP.IrqH.BPL-2
|
||||
sta GP.IrqH.BPL+1
|
||||
|
||||
>LDYAI K.IrqH.TCLOCK
|
||||
>STYA K.IrqHAuxLC.JSR+1
|
||||
|
||||
>LDYAI MSG.IRQ.CLOCK
|
||||
>SYSCALL PrintF.YA
|
||||
|
||||
@ -605,9 +609,11 @@ IrqMgrInit >LDYAI MSG.IRQ
|
||||
lda #"V"
|
||||
sta SYS.BASL0+38
|
||||
|
||||
>LDYAI GP.IrqH.VBL
|
||||
jsr IrqMgrInit.MLI
|
||||
bcs .9
|
||||
lda #GP.IrqH.VBL-GP.IrqH.BPL-2
|
||||
sta GP.IrqH.BPL+1
|
||||
|
||||
>LDYAI K.IrqH.VBL
|
||||
>STYA K.IrqHAuxLC.JSR+1
|
||||
|
||||
>LDYAI MSG.IRQ.VBL
|
||||
>SYSCALL PrintF.YA
|
||||
@ -625,27 +631,11 @@ IrqMgrInit >LDYAI MSG.IRQ
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
.90 plp
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
IrqMgrInit.MLI >STYA K.MLI.PARAMS+2
|
||||
|
||||
php
|
||||
sei
|
||||
>MLICALL MLIALLOCIRQ
|
||||
bcs .9
|
||||
|
||||
lda K.MLI.PARAMS+1
|
||||
sta IRQ.INTNUM
|
||||
plp
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 plp
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
IrqMgrInit.TClock
|
||||
stz ZPPtr1 Try finding a Mouse Card...
|
||||
lda #$C1
|
||||
@ -984,7 +974,7 @@ DEV.HEADER cld
|
||||
.BS 1 DEV.ID
|
||||
.BS 2 ROM.JMP
|
||||
.BS 1
|
||||
>CSTR "S1D1" 5 bytes
|
||||
.AZ "S1D1" 5 bytes
|
||||
*--------------------------------------
|
||||
SmartPort.OFS .HS 010305
|
||||
SmartPort.SIG .HS 200003
|
||||
@ -1069,32 +1059,32 @@ TskMgrInit >LDYAI MSG.TSK
|
||||
>SYSCALL PutEnv.YA
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
MSG.Init2 >CSTR "A2osX[Stage2]:Init\nInstalling KERNEL...\n"
|
||||
MSG.MAIN >CSTR " - $1100 Main...\n"
|
||||
MSG.AUX >CSTR " - $0C00 Aux...\n"
|
||||
MSG.GP >CSTR " - $BD00 Global Page...\n"
|
||||
MSG.D1 >CSTR " - $D000 Bank1...\n"
|
||||
MSG.D2 >CSTR " - $D000 Bank2...\n"
|
||||
MSG.E0 >CSTR " - $E000...\n"
|
||||
MSG.HZ >CSTR "Kernel SYS Timer Set For %d0 hz Machine.\n"
|
||||
MSG.Init2.OK >CSTR "A2osX[Stage2]:Complete.\n"
|
||||
MSG.Init2 .AZ "A2osX[Stage2]:Init\nInstalling KERNEL...\n"
|
||||
MSG.MAIN .AZ " - $1100 Main...\n"
|
||||
MSG.AUX .AZ " - $0C00 Aux...\n"
|
||||
MSG.GP .AZ " - $BD00 Global Page...\n"
|
||||
MSG.D1 .AZ " - $D000 Bank1...\n"
|
||||
MSG.D2 .AZ " - $D000 Bank2...\n"
|
||||
MSG.E0 .AZ " - $E000...\n"
|
||||
MSG.HZ .AZ "Kernel SYS Timer Set For %d0 hz Machine.\n"
|
||||
MSG.Init2.OK .AZ "A2osX[Stage2]:Complete.\n"
|
||||
*--------------------------------------
|
||||
MSG.Init3 >CSTR "A2osX[Stage3]:Init\r\n"
|
||||
MSG.DEV >CSTR "-Device Manager...\r\n"
|
||||
MSG.IRQ >CSTR "-Interrupt Manager...\r\n"
|
||||
MSG.IRQ.VBL >CSTR " (Mouse VBL IRQ Activated)\r\n"
|
||||
MSG.IRQ.CLOCK >CSTR " (Clock Card IRQ Activated)\r\n"
|
||||
MSG.IRQ.POLL >CSTR " (Polling Mode)\r\n"
|
||||
MSG.EVT >CSTR "-Event Manager...\r\n"
|
||||
MSG.FLT >CSTR "-Path Filter...\r\n"
|
||||
MSG.TSK >CSTR "-Task Manager...\r\n"
|
||||
MSG.Prefix >CSTR "Prefix:%s\r\n"
|
||||
MSG.Startup >CSTR "Executing Kernel Startup Script...\r\nCmd:%s\r\n"
|
||||
MSG.StartupErr >CSTR "Failed : [$%h]\r\n"
|
||||
MSG.Init3.OK >CSTR "A2osX[Stage3]:Complete.\r\n"
|
||||
MSG.Init3 .AZ "A2osX[Stage3]:Init\r\n"
|
||||
MSG.DEV .AZ "-Device Manager...\r\n"
|
||||
MSG.IRQ .AZ "-Interrupt Manager...\r\n"
|
||||
MSG.IRQ.VBL .AZ " (Mouse VBL IRQ Activated)\r\n"
|
||||
MSG.IRQ.CLOCK .AZ " (Clock Card IRQ Activated)\r\n"
|
||||
MSG.IRQ.POLL .AZ " (Polling Mode)\r\n"
|
||||
MSG.EVT .AZ "-Event Manager...\r\n"
|
||||
MSG.FLT .AZ "-Path Filter...\r\n"
|
||||
MSG.TSK .AZ "-Task Manager...\r\n"
|
||||
MSG.Prefix .AZ "Prefix:%s\r\n"
|
||||
MSG.Startup .AZ "Executing Kernel Startup Script...\r\nCmd:%s\r\n"
|
||||
MSG.StartupErr .AZ "Failed : [$%h]\r\n"
|
||||
MSG.Init3.OK .AZ "A2osX[Stage3]:Complete.\r\n"
|
||||
*--------------------------------------
|
||||
MSG.CPU >CSTR "Checking CPU..."
|
||||
MSG.CPU.SPEED >CSTR "Detecting CPU Speed..."
|
||||
MSG.CPU .AZ "Checking CPU..."
|
||||
MSG.CPU.SPEED .AZ "Detecting CPU Speed..."
|
||||
MSG.CPUTYPEL .DA #MSG.6502
|
||||
.DA #MSG.65C02
|
||||
.DA #MSG.65R02
|
||||
@ -1103,24 +1093,24 @@ MSG.CPUTYPEH .DA /MSG.6502
|
||||
.DA /MSG.65C02
|
||||
.DA /MSG.65R02
|
||||
.DA /MSG.65816
|
||||
MSG.6502 >CSTR "6502.\n"
|
||||
MSG.65C02 >CSTR "65C02.\n"
|
||||
MSG.65R02 >CSTR "65R02.\n"
|
||||
MSG.65816 >CSTR "65816.\n"
|
||||
MSG.CPU.SPEEDOK >CSTR "%d.%02d Mhz.\n"
|
||||
MSG.Z80 >CSTR "Detecting Z80 CPU..."
|
||||
MSG.Z80.OK >CSTR "Detected In Slot %d.\n"
|
||||
MSG.Z80.KO >CSTR "Not Detected.\n"
|
||||
MSG.KCREAD >CSTR "Reading Kernel Config File..."
|
||||
MSG.KCREAD.OK >CSTR "OK\n"
|
||||
MSG.KCREAD.KO >CSTR "\nError While Reading Kernel Config File, Using Default.\n"
|
||||
MSG.6502 .AZ "6502.\n"
|
||||
MSG.65C02 .AZ "65C02.\n"
|
||||
MSG.65R02 .AZ "65R02.\n"
|
||||
MSG.65816 .AZ "65816.\n"
|
||||
MSG.CPU.SPEEDOK .AZ "%d.%02d Mhz.\n"
|
||||
MSG.Z80 .AZ "Detecting Z80 CPU..."
|
||||
MSG.Z80.OK .AZ "Detected In Slot %d.\n"
|
||||
MSG.Z80.KO .AZ "Not Detected.\n"
|
||||
MSG.KCREAD .AZ "Reading Kernel Config File..."
|
||||
MSG.KCREAD.OK .AZ "OK\n"
|
||||
MSG.KCREAD.KO .AZ "\nError While Reading Kernel Config File, Using Default.\n"
|
||||
*--------------------------------------
|
||||
DEV.SYS >CSTR "SYS"
|
||||
I.ENV.A2osX >CSTR "A2OSX"
|
||||
I.ENV.PATH >CSTR "PATH=${A2OSX}SBIN/;${A2OSX}BIN/"
|
||||
I.ENV.LIB >CSTR "LIB=${A2OSX}LIB/"
|
||||
I.ENV.DRV >CSTR "DRV=${A2OSX}DRV/"
|
||||
STARTUP.CMDLINE >CSTR "${A2OSX}SBIN/SHELL ${A2OSX}A2osX.STARTUP"
|
||||
DEV.SYS .AZ "SYS"
|
||||
I.ENV.A2osX .AZ "A2OSX"
|
||||
I.ENV.PATH .AZ "PATH=${A2OSX}SBIN/;${A2OSX}BIN/"
|
||||
I.ENV.LIB .AZ "LIB=${A2OSX}LIB/"
|
||||
I.ENV.DRV .AZ "DRV=${A2OSX}DRV/"
|
||||
STARTUP.CMDLINE .AZ "${A2OSX}SBIN/SHELL ${A2OSX}A2osX.STARTUP"
|
||||
*--------------------------------------
|
||||
MLIOPEN00 .DA #3
|
||||
.DA A2OSXCONF
|
||||
|
@ -13,14 +13,14 @@ AUTO 4,1
|
||||
*--------------------------------------
|
||||
MSLOT .EQ $7f8
|
||||
*--------------------------------------
|
||||
K.IrqHAuxLC sta .6+1
|
||||
K.IrqHAuxLC sta K.IrqHAuxLC.6+1
|
||||
pla
|
||||
pha
|
||||
and #$10 BRK?
|
||||
bne .7
|
||||
bne K.IrqHAuxLC.7
|
||||
|
||||
stx .5+1
|
||||
sty .4+1
|
||||
stx K.IrqHAuxLC.5+1
|
||||
sty K.IrqHAuxLC.4+1
|
||||
|
||||
lda $fe Save 2 bytes in ZP
|
||||
pha
|
||||
@ -38,48 +38,47 @@ K.IrqHAuxLC sta .6+1
|
||||
pha
|
||||
sta CLRWRITEAUX Driver may R/W in screen holes
|
||||
|
||||
jsr K.IrqH
|
||||
K.IrqHAuxLC.JSR jsr K.IrqH.DEV SELF MODIFIED
|
||||
|
||||
pla Must keep Carry
|
||||
bpl .10
|
||||
bpl K.IrqHAuxLC.10
|
||||
sta SETWRITEAUX
|
||||
|
||||
.10 pla
|
||||
bpl .1
|
||||
K.IrqHAuxLC.10 pla
|
||||
bpl K.IrqHAuxLC.1
|
||||
sta SETREADAUX
|
||||
|
||||
.1 pla Get back MSLOT
|
||||
K.IrqHAuxLC.1 pla Get back MSLOT
|
||||
sta MSLOT
|
||||
sta .2+2
|
||||
sta K.IrqHAuxLC.2+2
|
||||
|
||||
and #$C0
|
||||
eor #$C0 ....mmm...not looking link Cn....
|
||||
bne .3
|
||||
bne K.IrqHAuxLC.3
|
||||
sta $CFFF Release $C800
|
||||
|
||||
.2 lda $ff00 SELF MODIFIED
|
||||
K.IrqHAuxLC.2 lda $ff00 SELF MODIFIED
|
||||
|
||||
.3 pla
|
||||
K.IrqHAuxLC.3 pla
|
||||
sta $ff
|
||||
pla
|
||||
sta $fe
|
||||
|
||||
.4 ldy #$ff Self Modified
|
||||
.5 ldx #$ff Self Modified
|
||||
.6 lda #$ff Self Modified
|
||||
bcs .8
|
||||
K.IrqHAuxLC.4 ldy #$ff Self Modified
|
||||
K.IrqHAuxLC.5 ldx #$ff Self Modified
|
||||
K.IrqHAuxLC.6 lda #$ff Self Modified
|
||||
bcs K.IrqHAuxLC.8 not handled, pass to ProDOS
|
||||
rti
|
||||
|
||||
.7 lda .6+1
|
||||
K.IrqHAuxLC.7 lda K.IrqHAuxLC.6+1
|
||||
|
||||
.8 jmp (IRQ.OldFFFE)
|
||||
K.IrqHAuxLC.8 dec IRQ.SkipA2osX Make regular ProDOS IRQ manager skip A2osX
|
||||
jmp (K.IRQ.OldFFFE)
|
||||
*--------------------------------------
|
||||
* Called by :
|
||||
* - Kernel K.IrqHAuxLC
|
||||
* - ProDOS IRQ Manager (GP)
|
||||
*--------------------------------------
|
||||
K.IrqH jmp K.IrqH.DEV Modified by INIT
|
||||
*--------------------------------------
|
||||
K.IrqH.TCLOCK ldy IRQ.VBL.n0
|
||||
|
||||
lda $c080,y
|
||||
@ -89,10 +88,7 @@ K.IrqH.TCLOCK ldy IRQ.VBL.n0
|
||||
lda $c080,y
|
||||
lda $c088,y
|
||||
|
||||
inc CORE.IRQTick
|
||||
|
||||
clc
|
||||
rts
|
||||
bra K.IrqH.Switch
|
||||
*--------------------------------------
|
||||
K.IrqH.VBL jsr IRQ.VBL.MSM SERVEMOUSE
|
||||
bcs K.IrqH.DEV Not From Mouse
|
||||
@ -105,10 +101,20 @@ K.IrqH.VBL jsr IRQ.VBL.MSM SERVEMOUSE
|
||||
ldx IRQ.VBL.MRM+2 $Cn
|
||||
ldy IRQ.VBL.n0
|
||||
jsr IRQ.VBL.MRM READMOUSE
|
||||
*--------------------------------------
|
||||
K.IrqH.Switch inc IRQ.Tick
|
||||
|
||||
inc CORE.IRQTick
|
||||
bit A2osX.F A2osX.F.PMODE .EQ %01000000
|
||||
bvc .8
|
||||
|
||||
clc
|
||||
lda IRQ.InKernel
|
||||
bmi .8
|
||||
|
||||
lda SYS.BASL0+37
|
||||
eor #$A0+'S
|
||||
sta SYS.BASL0+37
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
K.IrqH.DEV >LDYAI Dev.Table
|
||||
@ -140,14 +146,7 @@ K.IrqH.DEV >LDYAI Dev.Table
|
||||
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
IRQ.IntNum .BS 1
|
||||
*--------------------------------------
|
||||
IRQ.OldFFFE .BS 2
|
||||
*--------------------------------------
|
||||
IRQ.VBL.n0 .BS 1
|
||||
IRQ.VBL.0n .BS 1
|
||||
IRQ.VBL.MSM jmp $0000
|
||||
IRQ.VBL.MRM jmp $0000
|
||||
K.IRQ.OldFFFE .BS 2
|
||||
*--------------------------------------
|
||||
K.IrqHJMP ldx #DEVMGR.IRQ
|
||||
jmp ($fe)
|
||||
|
@ -365,7 +365,7 @@ K.FreeMem.A phy
|
||||
bit $C000,x
|
||||
bra *
|
||||
*--------------------------------------
|
||||
K.FreeMem.A.ERR >CSTR "***MemMgr:Attempt to Free an already freed hMem at $%H"
|
||||
K.FreeMem.A.ERR .AZ "***MemMgr:Attempt to Free an already freed hMem at $%H"
|
||||
*/--------------------------------------
|
||||
* # GetMemPtr.A
|
||||
* ## In:
|
||||
|
@ -263,7 +263,7 @@ PS.Init jsr BIN.Load.YA Y,A=filename full path
|
||||
>STYA ZPPtr4 save PTR to Code Segment
|
||||
|
||||
phy
|
||||
ldy #S.PS.ZP+1
|
||||
ldy #S.PS.ZP.CODE+1
|
||||
sta (ZPPtr3),y save pCode HI...
|
||||
dey
|
||||
pla
|
||||
@ -291,7 +291,7 @@ PS.Init jsr BIN.Load.YA Y,A=filename full path
|
||||
bcs .9
|
||||
|
||||
phy
|
||||
ldy #S.PS.ZP+3
|
||||
ldy #S.PS.ZP.DATA+1
|
||||
sta (ZPPtr3),y save pData HI...
|
||||
dey
|
||||
pla
|
||||
@ -305,7 +305,7 @@ PS.Init jsr BIN.Load.YA Y,A=filename full path
|
||||
|
||||
.2 ldy #H.BIN.EXE.SS.SIZE
|
||||
lda (ZPPtr4),y Load SS.SIZE
|
||||
ldy #S.PS.ZP+4
|
||||
ldy #S.PS.ZP.STACK
|
||||
sta (ZPPtr3),y save pStack LO...
|
||||
|
||||
tay
|
||||
@ -319,15 +319,22 @@ PS.Init jsr BIN.Load.YA Y,A=filename full path
|
||||
jsr MEM.GetMem.YAX
|
||||
bcs .9
|
||||
|
||||
ldy #S.PS.ZP+5
|
||||
ldy #S.PS.ZP.STACK+1
|
||||
sta (ZPPtr3),y save pStack HI...(LO alredy set to Stack TOP)
|
||||
|
||||
txa
|
||||
ldy #S.PS.hSS
|
||||
sta (ZPPtr3),y save SS hMem in S.PS
|
||||
|
||||
jsr PS.SetMemOwner Set Ownership
|
||||
jsr PS.SetMemOwner Set Ownership
|
||||
|
||||
ldy #H.BIN.EXE.ZP.SIZE
|
||||
lda (ZPPtr4),y
|
||||
clc
|
||||
adc #8 Add room for 4 saved PTR
|
||||
ldy #S.PS.ZP.SIZE
|
||||
sta (ZPPtr3),y
|
||||
|
||||
clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
|
@ -50,7 +50,7 @@ A2osX.D2 .PH $D000
|
||||
.EP
|
||||
A2osX.E0 .PH $E000
|
||||
.INB /A2OSX.SRC/SYS/KERNEL.S.JMP
|
||||
* .INB /A2OSX.SRC/SYS/KERNEL.S.IRQ
|
||||
.INB /A2OSX.SRC/SYS/KERNEL.S.IRQ
|
||||
.INB /A2OSX.SRC/SYS/KERNEL.S.MEM
|
||||
DevMgr.FreeMem .EQ *
|
||||
.EP
|
||||
|
Loading…
Reference in New Issue
Block a user