mirror of
https://github.com/A2osX/A2osX.git
synced 2025-02-06 14:30:08 +00:00
ProDOS.FX & //c: bugfix in IRQ manager, INITD in DEBUG mode for testing
This commit is contained in:
parent
222b03c048
commit
ef3398214f
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -71,7 +71,7 @@ buftbl .HS 0000 file #1
|
||||
* at the time of the most recent interrupt are stored here along
|
||||
* with the address interrupted.
|
||||
*--------------------------------------
|
||||
inttbl .HS 0000 int #1
|
||||
GP.IRQVs .HS 0000 int #1
|
||||
.HS 0000 int #2
|
||||
.HS 0000 int #3
|
||||
.HS 0000 int #4
|
||||
|
@ -17,7 +17,7 @@ IRQ ldx #$FA save 6 bytes of page 0
|
||||
|
||||
* ldx #0
|
||||
|
||||
.3 lda inttbl+1,x test for a valid routine.
|
||||
.3 lda GP.IRQVs+1,x test for a valid routine.
|
||||
beq .4 branch if no routine.
|
||||
|
||||
phx
|
||||
@ -28,7 +28,7 @@ IRQ ldx #$FA save 6 bytes of page 0
|
||||
|
||||
.4 inx
|
||||
inx
|
||||
cpx #10
|
||||
cpx #8
|
||||
bne .3
|
||||
|
||||
inc IRQ.Cnt allow 255 unclaimed interrupts
|
||||
@ -65,7 +65,7 @@ IRQ.Done ldx #$FA
|
||||
|
||||
rti
|
||||
*--------------------------------------
|
||||
IRQ.GoX jmp (inttbl,x) interrupt routine x
|
||||
IRQ.GoX jmp (GP.IRQVs,x) interrupt routine x
|
||||
|
||||
IRQ.Reset lda /resetv-1
|
||||
pha
|
||||
|
@ -172,17 +172,17 @@ XDOS.intmgr sta A4L interrupt command
|
||||
|
||||
ldx #$03 test for a free interrupt space in tbl.
|
||||
|
||||
.1 lda inttbl-2,x test high address for 0.
|
||||
.1 lda GP.IRQVs-2,x test high address for 0.
|
||||
bne .2 branch if spot occupied.
|
||||
|
||||
ldy #$03 get address of routine.
|
||||
lda (A3L),y must not be zero page.
|
||||
beq badint error if it is.
|
||||
|
||||
sta inttbl-2,x save high address
|
||||
sta GP.IRQVs-2,x save high address
|
||||
dey
|
||||
lda (A3L),y
|
||||
sta inttbl-3,x and low address.
|
||||
sta GP.IRQVs-3,x and low address.
|
||||
txa return interrupt # in range 1-4
|
||||
lsr
|
||||
dey
|
||||
@ -210,8 +210,8 @@ dealcint ldy #$01 zero out interrupt vector
|
||||
asl
|
||||
tax
|
||||
|
||||
stz inttbl-2,x
|
||||
stz inttbl-1,x
|
||||
stz GP.IRQVs-2,x
|
||||
stz GP.IRQVs-1,x
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
@ -5,7 +5,7 @@ NEW
|
||||
.OR $2000
|
||||
.TF sbin/initd
|
||||
*--------------------------------------
|
||||
INITDDBG .EQ 0
|
||||
INITDDBG .EQ 1
|
||||
*--------------------------------------
|
||||
.INB inc/macros.i
|
||||
.INB inc/a2osx.i
|
||||
@ -43,6 +43,8 @@ CS.START cld
|
||||
.DA CS.QUIT
|
||||
L.MSG.CTRLR .DA MSG.CTRLR
|
||||
.DO INITDDBG=1
|
||||
L.MSG.ETCINIT .DA MSG.ETCINIT
|
||||
L.MSG.START .DA MSG.START
|
||||
L.MSG.OK .DA MSG.OK
|
||||
L.MSG.KO .DA MSG.KO
|
||||
.FIN
|
||||
@ -59,7 +61,12 @@ CS.INIT
|
||||
CS.QUIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN ldy #S.PS.PID
|
||||
CS.RUN .DO INITDDBG=1
|
||||
>LDYA L.MSG.START
|
||||
>SYSCALL PutS
|
||||
.FIN
|
||||
|
||||
ldy #S.PS.PID
|
||||
lda (pPS),y
|
||||
cmp #1
|
||||
bne .9
|
||||
@ -88,7 +95,12 @@ CS.RUN ldy #S.PS.PID
|
||||
|
||||
>SLEEP
|
||||
|
||||
.1 jsr CS.RUN.ETCINIT
|
||||
.1 .DO INITDDBG=1
|
||||
>LDYA L.MSG.ETCINIT
|
||||
>SYSCALL PutS
|
||||
.FIN
|
||||
|
||||
jsr CS.RUN.ETCINIT
|
||||
bcs .99
|
||||
|
||||
.2 >SYSCALL GetChar
|
||||
@ -214,8 +226,10 @@ CS.END
|
||||
*--------------------------------------
|
||||
MSG.CTRLR .AZ "INITD:Entering ROOT mode..."
|
||||
.DO INITDDBG=1
|
||||
MSG.START .AZ "INITD:Starting..."
|
||||
MSG.OK .AZ " [OK]"
|
||||
MSG.KO .AZ " [%h]\r\n"
|
||||
MSG.ETCINIT .AS "INITD:Executing "
|
||||
.FIN
|
||||
ETCINIT .AZ "${ROOT}etc/init"
|
||||
BINSH .AZ "${ROOT}bin/sh"
|
||||
|
Loading…
x
Reference in New Issue
Block a user