mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-19 02:33:53 +00:00
Kernel version 0.8 : Fixed offset computation in JMP "table" relocation
This commit is contained in:
parent
728278c196
commit
f76268fe93
BIN
A2OSX.BOOT.po
BIN
A2OSX.BOOT.po
Binary file not shown.
BIN
A2OSX.SRC.po
BIN
A2OSX.SRC.po
Binary file not shown.
@ -10,13 +10,13 @@ echo Env:
|
||||
SET
|
||||
# Main Screen
|
||||
INSDRV CONSOLE.DRV
|
||||
STARTPROC GETTY CON ${A2OSX}SBIN/LOGIN
|
||||
#STARTPROC GETTY CON ${A2OSX}SBIN/LOGIN
|
||||
# Serial Login
|
||||
#INSDRV SSC.I.DRV 9600 N 8 1 X
|
||||
#STARTPROC GETTY COM2 LOGIN
|
||||
#INSDRV PIC.DRV
|
||||
# Network Section
|
||||
INSDRV UTHERNET.DRV 000E3A123456
|
||||
#INSDRV UTHERNET.DRV 000E3A123456
|
||||
#INSDRV UTHERNET2.DRV 0008DC123456
|
||||
#INSDRV UTHER2.AI.DRV 0008DC123456
|
||||
#INSDRV LANCEGS.DRV
|
||||
|
@ -111,7 +111,7 @@ GETEVENT lda A2osX.TIMER16
|
||||
|
||||
.1 jsr Char.Out.Get
|
||||
bcc .7
|
||||
|
||||
>DEBUG
|
||||
>SYSCALL SYS.GetKeyboardEvent
|
||||
bcs .9
|
||||
|
||||
|
@ -240,9 +240,9 @@ SYS.GetStockObjectA .EQ $8C
|
||||
SYS.FreeStockObject .EQ $8E
|
||||
*--------------------------------------
|
||||
SYS.GetDevByIDA .EQ $90
|
||||
SYS.GetDevByNameYA .EQ $94
|
||||
SYS.GetDevInfoA .EQ $96
|
||||
SYS.GetKeyboardEvent .EQ $98
|
||||
SYS.GetDevByNameYA .EQ $92
|
||||
SYS.GetDevInfoA .EQ $94
|
||||
SYS.GetKeyboardEvent .EQ $96
|
||||
|
||||
SYS.MKNOD .EQ $FF
|
||||
SYS.MKFIFO .EQ $FF
|
||||
|
@ -114,7 +114,18 @@ K.LoadEXEYA.hMem .BS 1
|
||||
* Already setup correctly pDrv,
|
||||
* BIN.Relocate.Start,End
|
||||
*--------------------------------------
|
||||
BIN.InstallDRV lda DevMgr.Free Offset = Target DRV address-AUXTYPE
|
||||
BIN.InstallDRV ldy #H.BIN.DRV.CODE.O
|
||||
lda (pDrv),y
|
||||
clc
|
||||
adc BIN.Relocate.Start Advance start From AUXTYPE to AUXTYPE+DRV code offset
|
||||
sta BIN.Relocate.Start
|
||||
|
||||
iny
|
||||
lda (pDrv),y
|
||||
adc BIN.Relocate.Start+1
|
||||
sta BIN.Relocate.Start+1
|
||||
|
||||
lda DevMgr.Free Offset = Target DRV address-(AUXTYPE+DRV OFFSET)
|
||||
sec
|
||||
sbc BIN.Relocate.Start
|
||||
sta BIN.Relocate.Offset
|
||||
@ -123,17 +134,6 @@ BIN.InstallDRV lda DevMgr.Free Offset = Target DRV address-AUXTYPE
|
||||
sbc BIN.Relocate.Start+1
|
||||
sta BIN.Relocate.Offset+1
|
||||
|
||||
ldy #H.BIN.DRV.CODE.O
|
||||
lda (pDrv),y
|
||||
clc
|
||||
adc BIN.Relocate.Start Advance start From Bin code to DRV code
|
||||
sta BIN.Relocate.Start
|
||||
|
||||
iny
|
||||
lda (pDrv),y
|
||||
adc BIN.Relocate.Start+1
|
||||
sta BIN.Relocate.Start+1
|
||||
|
||||
lda BIN.Relocate.End Compute DRVLen=End-start
|
||||
sec
|
||||
sbc BIN.Relocate.Start
|
||||
|
@ -50,7 +50,6 @@ K.LoadDrvYA >STYA K.LoadDrv.CmdArray
|
||||
jsr BIN.InstallDRV
|
||||
|
||||
bcs .97
|
||||
|
||||
ldy #S.DEV.F
|
||||
lda (pDev),y
|
||||
ora #S.DEV.F.INUSE
|
||||
|
@ -27,9 +27,8 @@ K.GetKeyboardEvent
|
||||
rts
|
||||
|
||||
.9 inc A2osX.RANDOM16
|
||||
bne .99
|
||||
dec A2osX.RANDOM16+1
|
||||
.99 sec no event
|
||||
sta A2osX.RANDOM16+1
|
||||
sec no event
|
||||
rts
|
||||
*--------------------------------------
|
||||
* EVT.GetEvents :
|
||||
@ -39,8 +38,8 @@ K.GetKeyboardEvent
|
||||
* CC * event in YA
|
||||
* (pEvent)
|
||||
*--------------------------------------
|
||||
EVT.GetEvents stz pEvent
|
||||
stz EVTMGR.COUNT
|
||||
EVT.GetEvents stz pEvent point to start of event list
|
||||
stz EVTMGR.COUNT reset Size
|
||||
|
||||
lda VBL get VLINE status
|
||||
tax
|
||||
@ -74,12 +73,7 @@ EVT.GetEvents stz pEvent
|
||||
ora #S.EVT.F.T1SEC
|
||||
|
||||
.2 sta (pEvent)
|
||||
|
||||
lda pEvent
|
||||
clc
|
||||
adc #S.EVT
|
||||
sta pEvent
|
||||
inc EVTMGR.COUNT
|
||||
jsr EVT.GetEvents.Add
|
||||
*--------------------------------------
|
||||
EVT.GetEvents.DEV
|
||||
>LDYAI DevMgr.Table
|
||||
@ -91,26 +85,23 @@ EVT.GetEvents.DEV
|
||||
lda (pDev),y get S.DEV.F
|
||||
bit #S.DEV.F.EVENT
|
||||
beq .2 EVENT enabled ?
|
||||
|
||||
|
||||
lda (pDev)
|
||||
cmp #H.BIN.HEADER.DRV65
|
||||
bne *
|
||||
|
||||
ldx #DEVMGR.GETEVENT
|
||||
|
||||
jsr pDevJmp Call DRV GetEvent function
|
||||
bcs .2 no event
|
||||
|
||||
inc EVTMGR.COUNT
|
||||
|
||||
ldy #S.EVT.hDEV
|
||||
lda DevMgr.DevID
|
||||
sta (pEvent),y
|
||||
|
||||
lda pEvent
|
||||
adc #S.EVT cc
|
||||
sta pEvent
|
||||
jsr EVT.GetEvents.Add
|
||||
|
||||
bcs .8 Event Q is full!
|
||||
bcc .9 Event Q is full, exit now with CC
|
||||
|
||||
.2 lda pDev
|
||||
clc
|
||||
@ -124,15 +115,20 @@ EVT.GetEvents.DEV
|
||||
cmp DevMgr.LastDevID
|
||||
bne .1
|
||||
|
||||
.8 lda EVTMGR.COUNT
|
||||
sta EVTMGR.SIZE
|
||||
lda EVTMGR.COUNT if 0, exit with CS=no event (from cmp)
|
||||
beq .9
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 sec error code=0,CS=no event
|
||||
rts
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
EVT.GetEvents.Add
|
||||
inc EVTMGR.COUNT Add one event to Queue
|
||||
|
||||
lda pEvent
|
||||
clc
|
||||
adc #S.EVT
|
||||
sta pEvent
|
||||
rts if CS, EVT queue full!!! ($100)
|
||||
*--------------------------------------
|
||||
EVT.DestroyEvent
|
||||
lda (pEvent)
|
||||
@ -163,7 +159,6 @@ EVTMGR.VBLSTATE .BS 1
|
||||
EVTMGR.10TH.CNT .BS 1
|
||||
EVTMGR.HZ.CNT .BS 1
|
||||
EVTMGR.COUNT .BS 1
|
||||
EVTMGR.SIZE .BS 1
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE SYS/KERNEL.S.EVT
|
||||
|
@ -86,7 +86,7 @@ K.DevMgrInit ldx #S.DEV*DevMgr.Count
|
||||
dex
|
||||
bne .1
|
||||
|
||||
stz DevMgr.Table+S.DEV*DevMgr.Count+1
|
||||
stz DevMgr.Table+S.DEV*DevMgr.Count
|
||||
|
||||
lda #DevMgr.Count-1
|
||||
sta DevMgr.LastDevID
|
||||
|
@ -96,11 +96,15 @@ TSK.TskMgrRun >LDYAI TskMgr.Table+S.PS skip PS 0
|
||||
* CC: Event Cleared
|
||||
*--------------------------------------
|
||||
TSK.DispatchEvents
|
||||
|
||||
lda EVTMGR.COUNT
|
||||
beq *
|
||||
|
||||
>LDYAI TskMgr.Table+S.PS
|
||||
>STYA pPs
|
||||
|
||||
lda TSKMGR.SIZE
|
||||
sta TSKMGR.COUNT
|
||||
lda TSKMGR.SIZE Number of actual processes...
|
||||
sta TSKMGR.COUNT ...to give event list
|
||||
|
||||
.1 dec TSKMGR.COUNT skip PS 0
|
||||
beq .9
|
||||
@ -109,7 +113,7 @@ TSK.DispatchEvents
|
||||
bit #S.PS.F.INUSE In use ?
|
||||
beq .4
|
||||
|
||||
bit #S.PS.F.HOLD Waiting for Another Task to Terminate?
|
||||
bit #S.PS.F.INIT+S.PS.F.SLEEP+S.PS.F.HOLD Init,Sleep or Waiting for Another Task to Terminate?
|
||||
bne .4
|
||||
|
||||
bit #S.PS.F.EVENT Accept Events ?
|
||||
@ -117,12 +121,12 @@ TSK.DispatchEvents
|
||||
|
||||
jsr PS.Select
|
||||
|
||||
stz pEvent
|
||||
stz pEvent Select first event in list
|
||||
|
||||
lda EVTMGR.SIZE
|
||||
lda EVTMGR.COUNT
|
||||
sta TSKMGR.EVENTCNT
|
||||
|
||||
.2 lda (pEvent)
|
||||
.2 lda (pEvent) Empty event, select next
|
||||
beq .3
|
||||
|
||||
lda (pCode)
|
||||
@ -131,20 +135,22 @@ TSK.DispatchEvents
|
||||
|
||||
ldx #TSKMGR.DOEVENT
|
||||
jsr pCodeJmp Call DOEVENT function
|
||||
bcs .3
|
||||
jsr EVT.DestroyEvent
|
||||
bcs .3 not for this PS, try next event in list
|
||||
|
||||
jsr EVT.DestroyEvent this PS handled the EVT, destroy it...
|
||||
lda EVTMGR.COUNT
|
||||
beq .8
|
||||
beq .8 no more event, exit
|
||||
|
||||
.3 dec TSKMGR.EVENTCNT
|
||||
beq .4
|
||||
lda pEvent
|
||||
beq .4 all EVT submitted to this PS, try other PS
|
||||
|
||||
lda pEvent try next EVT to this PS
|
||||
clc
|
||||
adc #S.EVT
|
||||
sta pEvent
|
||||
bra .2
|
||||
|
||||
.4 lda pPs
|
||||
.4 lda pPs go to next PS in PS list
|
||||
clc
|
||||
adc #S.PS
|
||||
sta pPs
|
||||
|
Loading…
x
Reference in New Issue
Block a user