diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 7b83b643..e487101f 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/BIN/SHUTDOWN.S.txt b/BIN/SHUTDOWN.S.txt index e69de29b..dd683d9a 100644 --- a/BIN/SHUTDOWN.S.txt +++ b/BIN/SHUTDOWN.S.txt @@ -0,0 +1,135 @@ +NEW + AUTO 3,1 + .LIST OFF + .OP 65C02 + .OR $2000 + .TF bin/shutdown +*-------------------------------------- + .INB inc/macros.i + .INB inc/a2osx.i + .INB inc/kernel.i +*-------------------------------------- + .DUMMY + .OR ZPBIN +ZS.START +ZPPSPtr .BS 2 +Count .BS 1 +Index .BS 1 +ZS.END + .ED +*-------------------------------------- +* File Header (16 Bytes) +*-------------------------------------- +CS.START cld + jmp (.1,x) + .DA #$61 6502,Level 1 (65c02) + .DA #1 BIN Layout Version 1 + .DA #0 S.PS.F.EVENT + .DA #0 + .DA CS.END-CS.START Code Size (without Constants) + .DA DS.END-DS.START Data SegmentSize + .DA #32 Stack Size + .DA #ZS.END-ZS.START Zero Page Size + .DA 0 +*-------------------------------------- +* Relocation Table +*-------------------------------------- +.1 .DA CS.INIT + .DA CS.RUN + .DA CS.DOEVENT + .DA CS.QUIT +L.MSG0 .DA MSG0 + .DA 0 +*-------------------------------------- +CS.INIT clc + rts +*-------------------------------------- +CS.RUN >PUSHW L.MSG0 + >PUSHBI 0 + >SYSCALL PrintF + +.10 stz Count + + ldx #0 + stx Index + +.1 lda PS.Table.hPS,x + beq .7 + + >SYSCALL GetMemPtr + >STYA ZPPSPtr + + lda (ZPPSPtr) + bmi .6 HOLD + + ldy #S.PS.S + cmp #S.PS.S.QUIT + beq .6 + + ldy #S.PS.PID + lda (ZPPSPtr),y + beq .7 + + cmp #1 + beq .7 don't kill INITD + + cmp (pPS),y don't kill myself + beq .7 + + >PUSHW L.MSG0 + ldy #S.PS.PID + lda (ZPPSPtr),y + >PUSHA + + ldy #S.PS.hARGV + lda (ZPPSPtr),y + >SYSCALL GetMemPtr + >PUSHYA + + >PUSHBI 3 + >SYSCALL printf + + >PUSHBI 2 + + ldy #S.PS.PID + lda (ZPPSPtr),y + >SYSCALL kill + +.6 inc Count + +.7 >SLEEP + + inc Index + ldx Index + cpx #K.PS.MAX + bne .1 + + lda Count + bne .10 + +.8 lda #0 tell Kernel that all done ok, but + sec we do not want to stay in memory +.9 rts + +.90 lda #E.SYN + sec + rts +*-------------------------------------- +CS.DOEVENT sec + rts +*-------------------------------------- +CS.QUIT clc + rts +*-------------------------------------- +CS.END +MSG0 .AZ "SHUTDOWN:Killing process %3d, %s\r\n" +*-------------------------------------- + .DUMMY + .OR 0 +DS.START +DS.END + .ED +*-------------------------------------- +MAN +SAVE usr/src/bin/shutdown.s +ASM diff --git a/SBIN/INITD.S.txt b/SBIN/INITD.S.txt index 1b9f0c0c..eab8428f 100644 --- a/SBIN/INITD.S.txt +++ b/SBIN/INITD.S.txt @@ -5,9 +5,9 @@ NEW .OR $2000 .TF sbin/initd *-------------------------------------- - .INB INC/MACROS.I - .INB INC/A2OSX.I - .INB INC/MLI.I + .INB inc/macros.i + .INB inc/a2osx.i + .INB inc/mli.i *-------------------------------------- * Zero Page Segment, up to 32 bytes *-------------------------------------- @@ -177,5 +177,5 @@ DS.START DS.END .ED *-------------------------------------- MAN -SAVE USR/SRC/SBIN/INITD +SAVE usr/src/sbin/initd ASM diff --git a/SYS/KERNEL.S.INIT.txt b/SYS/KERNEL.S.INIT.txt index e66adfc4..d1e27511 100644 --- a/SYS/KERNEL.S.INIT.txt +++ b/SYS/KERNEL.S.INIT.txt @@ -505,6 +505,26 @@ CPU.Init.6502 >PUSHWI MSG.CPU nop (2) nop (2) nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) + nop (2) inc A2osX.RANDOM16 (6) bne .5 (2*)