Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-08-22 17:23:27 +02:00
parent 6286ac371c
commit d2d28e238b
27 changed files with 300 additions and 177 deletions

Binary file not shown.

Binary file not shown.

View File

@ -110,6 +110,7 @@ CS.RUN.QUERY jsr Init.Timeout
dey
bpl .4
>PUSHBI 10
>LDYA L.MSG2
>SYSCALL printf
@ -172,6 +173,7 @@ CS.RUN.DUMP >LIBCALL hLIBTCPIP,LIBTCPIP.ARP.GETCACHE
>PUSHB (ZPPTR1)
>PUSHBI 13
>LDYA L.MSG1
phx
>SYSCALL printf

View File

@ -59,7 +59,8 @@ CS.INIT
dex
bne .2
.99 >LDYA L.MSG.USAGE
.99 >PUSHBI 0
>LDYA L.MSG.USAGE
>SYSCALL printf
lda #K.E.SYN
sec
@ -211,6 +212,8 @@ CS.RUN.PRINT sty BytesRead Y,A = Bytes read
bra .2
.3 >PUSHW ZPPtr1
>PUSHBI 2
>LDYA L.MSG.CTRLCHAR
>SYSCALL printf
bcs .9
@ -237,9 +240,9 @@ CS.RUN.PRINTNUM clc
>LDA.G bLineNum
bpl .8
>LDYA.G LineNum
>PUSHW.G LineNum
>PUSHYA
>PUSHBI 2
>LDYA L.MSG.LINENUM
>SYSCALL printf
.8 rts

View File

@ -50,6 +50,7 @@ Ctrl.A ldy #PromptMode
beq .8
>PUSHW ZPPTR1
>PUSHBI 2
>LDYA L.MSG.HELPLINE
>SYSCALL printf
bcs .9

View File

@ -7,8 +7,8 @@ SCRN.Init ldy #ScreenH
lda (pData),y
dec
>PUSHA
>PUSHBI 1
>LDYA L.SEQ.INIT
>SYSCALL printf
bcs .9
lda #12
@ -54,7 +54,7 @@ SCRN.UpdateTopBar
.1 >LDYA L.MSG.NEWFILE
.2 >PUSHYA
>PUSHBI 2
>LDYA L.MSG.TOPBAR
>SYSCALL printf
@ -96,7 +96,7 @@ SCRN.UpdateMain ldy #ScreenY
ldy TmpByte
jsr GotoXY
bcs .9
>PUSHBI 0
>LDYA L.SEQ.CEOL
>SYSCALL printf
bcs .9
@ -173,7 +173,7 @@ SCRN.UpdateLineAtALenY
.3 sec
jsr SCRN.UpdateAttrC
bcs .9
>PUSHBI 0
>LDYA L.SEQ.CEOL
>SYSCALL printf
bcs .9
@ -186,7 +186,7 @@ SCRN.UpdateAttrC
bcc .1
bit bSelected
bpl .8
>PUSHBI 0
>LDYA L.SEQ.NORM
>SYSCALL printf
bcs .9
@ -195,7 +195,7 @@ SCRN.UpdateAttrC
.1 bit bSelected
bmi .8
>PUSHBI 0
>LDYA L.SEQ.INV
>SYSCALL printf
bcs .9
@ -212,11 +212,11 @@ SCRN.UpdateStatusBar
ldy #ScreenH
lda (pData),y
>PUSHA
>PUSHBI 2
>LDYA L.MSG.GOTOXY
>SYSCALL printf
bcs .9
>PUSHBI 0
>LDYA L.SEQ.INV
>SYSCALL printf
bcs .9
@ -246,7 +246,7 @@ SCRN.UpdateStatusBar
>PUSHB (pData),y
dey
>PUSHB (pData),y
>PUSHBI 6
>LDYA L.MSG.STATUSBAR
>SYSCALL printf
bcs .9
@ -254,7 +254,7 @@ SCRN.UpdateStatusBar
lda #58
jsr SCRN.ClearEOLA
bcs .9
>PUSHBI 0
>LDYA L.SEQ.NORM
>SYSCALL printf
bcs .9
@ -262,11 +262,13 @@ SCRN.UpdateStatusBar
jmp SCRN.GotoCurXCurY
.9 jmp Ctrl.Q
.2 cmp #PromptModeHelp
.2 eor #PromptModeHelp
beq .3
>PUSHW pData
lda #2
.3 ldy #ScreenH
.3 >PUSHA
ldy #ScreenH
lda (pData),y
jsr SCRN.InvLineA
bcs .9
@ -290,6 +292,7 @@ SCRN.UpdateStatusBarErrA
.1 lda #$ff
>PUSHA
>PUSHBI 1
>LDYA L.MSG.STATUSBAR.E
>SYSCALL printf
bcs .9
@ -319,10 +322,11 @@ SCRN.InvLineA sta .2+1
>PUSHA
lda .2+1
>PUSHA
>PUSHBI 2
>LDYA L.MSG.GOTOXY
>SYSCALL printf
bcs .9
>PUSHBI 0
>LDYA L.SEQ.INV
>SYSCALL printf
bcs .9
@ -344,6 +348,7 @@ SCRN.InvLineA sta .2+1
>PUSHA
.2 lda #$ff
>PUSHA
>PUSHBI 2
>LDYA L.MSG.GOTOXY
>SYSCALL printf
@ -364,7 +369,7 @@ GotoXY txa
inc
inc
>PUSHA
>PUSHBI 2
>LDYA L.MSG.GOTOXY
>SYSCALL printf
bcs .9
@ -508,7 +513,7 @@ SCRN.scrollUp ldy #CurX
inc
inc
>PUSHA
>PUSHBI 2
>LDYA L.SEQ.SCROLLUP
>SYSCALL printf
bcs .9
@ -543,7 +548,7 @@ SCRN.scrollDn ldy #CurX
inc
inc
>PUSHA
>PUSHBI 2
>LDYA L.SEQ.SCROLLDN
>SYSCALL printf
bcs .9

View File

@ -130,7 +130,8 @@ CS.INIT lda #$ff
clc
.9 rts
*--------------------------------------
CS.RUN >LDYA L.SEQ.DETECT
CS.RUN >PUSHBI 0
>LDYA L.SEQ.DETECT
>SYSCALL printf Send Query for term W & H
bcs .9
@ -186,7 +187,8 @@ CS.QUIT ldy #hBuffer
beq .8
>SYSCALL FreeMem
.8 >LDYA L.SEQ.RESET
.8 >PUSHBI 0
>LDYA L.SEQ.RESET
>SYSCALL printf
.9 rts
*--------------------------------------

View File

@ -120,7 +120,8 @@ CS.INIT ldy #S.PS.ARGC
clc
rts
.99 >LDYA L.MSG.USAGE
.99 >PUSHBI 0
>LDYA L.MSG.USAGE
>SYSCALL printf
lda #K.E.SYN
sec
@ -136,13 +137,14 @@ CS.RUN jsr CS.RUN.InitCat
bcs .9
>LDYA L.MSG.OK
>SYSCALL printf
>SYSCALL puts
lda #0
sec
rts
.9 pha
>PUSHA
>PUSHBI 1
>LDYA L.MSG.ERR
>SYSCALL printf
pla
@ -220,7 +222,7 @@ CS.RUN.BuildCat >PUSHEA.G DIB
>PUSHEA.G VolName
>PUSHW.G DIB+S.DIB.SIZE
>PUSHW ZPPtr2
>PUSHBI 6
>LDYA L.MSG.INIT
>SYSCALL printf
.99 bcs .9
@ -320,7 +322,7 @@ OptionVars .DA #bLL,#bLL
MSG.USAGE .AS "Usage : FORMAT <BLOCKDEV> [VOLUME.NAME]\r\n"
.AS " -L : Low-Level Format\r\n"
.AZ " -1-9 : Catalog Size (Blocks)\r\n"
MSG.OK .AZ "[OK]\r\n"
MSG.OK .AZ "[OK]"
MSG.ERR .AZ "[%h]\r\n"
MSG.INIT .AZ "Formatting %s (%D Blks),Volname:%s..."
*--------------------------------------

View File

@ -162,8 +162,7 @@ CS.RUN >SYSCALL GetChar
sec
.99 rts
*--------------------------------------
CS.RUN.DEV ldy #bLong
lda (pData),y
CS.RUN.DEV >LDA.G bLong
bpl CS.RUN.DIR
ldy #S.STAT.P.DEVBLOCKS+1
@ -181,6 +180,7 @@ CS.RUN.DEV ldy #bLong
>PUSHB (ZPFileStat),y
>PUSHW ZPFileName
>PUSHBI 8
>LDYA L.MSG.DEVEXT
>SYSCALL printf
bcs .9
@ -210,8 +210,10 @@ CS.RUN.DIR >LDA.G bAllmostAll
bmi .4
>PUSHW ZPFileName
>PUSHBI 2
>LDYA L.MSG.DIR
>SYSCALL printf
bcs .9
ldy #0
@ -240,6 +242,7 @@ CS.RUN.DIR >LDA.G bAllmostAll
>PUSHEA.G MOD File Mod
>PUSHW ZPFileName
>PUSHBI 8
>LDYA L.MSG.DIREXT
>SYSCALL printf
bcs .9
@ -270,6 +273,7 @@ CS.RUN.FILE ldy #bLong
bmi .8
>PUSHW ZPFileName
>PUSHBI 2
>LDYA L.MSG.FILE
>SYSCALL printf
bcs .9
@ -310,6 +314,7 @@ CS.RUN.FILE ldy #bLong
>PUSHYA Type
>PUSHW ZPFileName
>PUSHBI 16
>LDYA L.MSG.FILEEXT
>SYSCALL printf
bcs .9
@ -401,6 +406,7 @@ CS.RUN.ENTER.MSG
lda (pData),y
>SYSCALL GetMemPtr
>PUSHYA
>PUSHBI 2
>LDYA L.MSG.ENTER
>SYSCALL printf
rts

View File

@ -42,7 +42,7 @@ CS.INIT clc
rts
*--------------------------------------
CS.RUN >LDYA L.MSG0
>SYSCALL printf
>SYSCALL puts
>LDA.G DEV.ID
@ -92,12 +92,11 @@ DumpFD ldy #S.FD.DEV.DRVPTR+1
lda /S.FD.DEV.NAME
adc ZPPTR1+1
>PUSHYA
>LDA.G DEV.ID
>PUSHA
>PUSHB.G DEV.ID
>PUSHBI 5
>LDYA L.MSG1
>SYSCALL printf
rts
@ -105,8 +104,7 @@ DumpFD ldy #S.FD.DEV.DRVPTR+1
DumpDIB >LDA.G DEV.DIB+S.DIB.S
bpl .1 char device...
lda #0
>PUSHA
>PUSHBI 0
>PUSHB.G DEV.DIB+S.DIB.SIZE+2
>PUSHB.G DEV.DIB+S.DIB.SIZE+1
@ -140,10 +138,13 @@ DumpDIB >LDA.G DEV.DIB+S.DIB.S
>PUSHEA.G DEV.SFLAGS
>LDA.G DEV.DIB+S.DIB.S
bpl .4
>PUSHBI 12
>LDYA L.MSG2.B
bra .8
.4 >LDYA L.MSG2.C
.4 >PUSHBI 8
>LDYA L.MSG2.C
.8 >SYSCALL printf
rts
@ -159,7 +160,7 @@ CS.QUIT clc
rts
*--------------------------------------
CS.END
MSG0 .AZ "ID Name Addr. Status Typ/Sub IDString Version Size (BLK)\r\n"
MSG0 .AZ "ID Name Addr. Status Typ/Sub IDString Version Size (BLK)"
MSG1 .AZ "%03d %7s $%H "
MSG2.B .AZ "%s $%h/$%h %16S %03d.%03d %10u"
MSG2.C .AZ "%s $%h/$%h %16S %03d.%03d n/a"

View File

@ -62,7 +62,7 @@ CS.RUN >LDYA L.MemStat
>PUSHW MemStat+S.MSTAT.MH
>PUSHW MemStat+S.MSTAT.MF
>PUSHW MemStat+S.MSTAT.ML
>PUSHBI 8
>LDYA L.MSG.Stat
>SYSCALL printf
*--------------------------------------
@ -80,7 +80,7 @@ CS.RUN >LDYA L.MemStat
>PUSHW MemStat+S.MSTAT.XH
>PUSHW MemStat+S.MSTAT.XF
>PUSHW MemStat+S.MSTAT.XL
>PUSHBI 8
>LDYA L.MSG.Stat
>SYSCALL printf
*--------------------------------------
@ -98,7 +98,7 @@ CS.RUN >LDYA L.MemStat
>PUSHW MemStat+S.MSTAT.DH
>PUSHW MemStat+S.MSTAT.DF
>PUSHW MemStat+S.MSTAT.DL
>PUSHBI 8
>LDYA L.MSG.Stat
>SYSCALL printf

View File

@ -108,18 +108,22 @@ CS.RUN >SYSCALL GetChar
.10 >PUSHB.G MEM.COUNT
>PUSHB.G USED.COUNT
>PUSHBI 2
>LDYA L.MSG2
>SYSCALL printf
>PUSHW.G MemStat+S.MSTAT.MH
>PUSHBI 2
>LDYA L.MSG3
>SYSCALL printf
>PUSHW.G MemStat+S.MSTAT.MF
>PUSHBI 2
>LDYA L.MSG4
>SYSCALL printf
>PUSHW.G MemStat+S.MSTAT.ML
>PUSHBI 2
>LDYA L.MSG5
>SYSCALL printf
@ -132,6 +136,7 @@ CS.RUN >SYSCALL GetChar
ply
>PUSHYA
>PUSHBI 2
>LDYA L.MSG.FREE
>SYSCALL printf
lda #0
@ -139,18 +144,14 @@ CS.RUN >SYSCALL GetChar
rts
*--------------------------------------
CS.RUN.PRINTMEM ldy #S.MEM.LEN+1
lda (ZPPTR1),y
>PUSHA
dey
lda (ZPPTR1),y
>PUSHA
ldx #4
ldy #S.MEM.PTR+1
lda (ZPPTR1),y
.13 lda (ZPPTR1),y
>PUSHA
dey
lda (ZPPTR1),y
>PUSHA
dex
bne .13
ldy #S.MEM.REFCNT
lda (ZPPTR1),y
@ -179,8 +180,7 @@ CS.RUN.PRINTMEM ldy #S.MEM.LEN+1
>PUSHEA.G MEM.FLAGS
>LDA.G MEM.COUNT
>PUSHA
>PUSHB.G MEM.COUNT
lda (ZPPTR1) Get flags
bpl .12
@ -190,15 +190,17 @@ CS.RUN.PRINTMEM ldy #S.MEM.LEN+1
>SYSCALL GetPSStatus
bcc .12
>PUSHBI 0
>LDYA L.MSG1.INV
>SYSCALL printf
.12 >LDYA L.MSG1
.12 >PUSHBI 9
>LDYA L.MSG1
>SYSCALL printf
lda (ZPPTR1)
and #S.MEM.F.CODE
bne .7
bne CS.RUN.PRINTMEM.BIN
****** DATA
ldy #S.MEM.PTR
@ -224,8 +226,9 @@ CS.RUN.PRINTMEM ldy #S.MEM.LEN+1
>PUSHW ZPPTR2 String
tya Len
>PUSHA
>PUSHBI 3
>LDYA L.MSG1.STR
bra .8
bra CS.RUN.PRINTMEM.EXIT
.2 ldy #15
@ -233,16 +236,21 @@ CS.RUN.PRINTMEM ldy #S.MEM.LEN+1
dey
bpl .3
>PUSHBI 16
>LDYA L.MSG1.HEX
bra .8
****** BIN
.7 ldy #S.MEM.BIN
bra CS.RUN.PRINTMEM.EXIT
CS.RUN.PRINTMEM.BIN
ldy #S.MEM.BIN
lda (ZPPTR1),y
>SYSCALL GetMemPtr
>PUSHYA
>PUSHBI 2
>LDYA L.MSG1.BIN
.8 >SYSCALL printf
CS.RUN.PRINTMEM.EXIT
>SYSCALL printf
>INC.G LINE.COUNT
cmp #PAGELEN

View File

@ -32,7 +32,7 @@ L.FD.DEV .DA FD.DEV
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect >LDYA L.MSG.DETECT
>SYSCALL printf
>SYSCALL puts
>PUSHWI DRV.END
>PUSHWI DRV.CS.END
@ -47,7 +47,7 @@ Dev.Detect >LDYA L.MSG.DETECT
.9 rts
CS.END
MSG.DETECT .AZ "Apple IIe/IIc 80 Col Driver.\r\n"
MSG.DETECT .AZ "Apple IIe/IIc 80 Col Driver."
*--------------------------------------
FD.DEV .DA #S.FD.T.CDEV
.DA #0 HANDLER

View File

@ -63,7 +63,7 @@ L.MSG.DETECT.80C .DA MSG.DETECT.80C
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect >LDYA L.MSG.DETECT
>SYSCALL printf
>SYSCALL puts
lda MACHID
and #MACHID.T
@ -120,15 +120,15 @@ Dev.Detect >LDYA L.MSG.DETECT
>LDYA L.MSG.DETECT.80C
.3 >SYSCALL printf
.3 >SYSCALL puts
clc
rts
*--------------------------------------
CS.END
MSG.DETECT .AZ "Apple IIe/IIc DHGR Driver.\r\n"
MSG.DETECT.IIC .AZ "Apple //c detected, Assuming 'Le Chat Mauve' Mode.\r\n"
MSG.DETECT.EVE .AZ "'Le Chat Mauve EVE' Board Detected.\r\n"
MSG.DETECT.80C .AZ "No Specific H/W Found, Assuming 80c Mode.\r\n"
MSG.DETECT .AZ "Apple IIe/IIc DHGR Driver."
MSG.DETECT.IIC .AZ "Apple //c detected, Assuming 'Le Chat Mauve' Mode."
MSG.DETECT.EVE .AZ "'Le Chat Mauve EVE' Board Detected."
MSG.DETECT.80C .AZ "No Specific H/W Found, Assuming 80c Mode."
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------

View File

@ -77,7 +77,7 @@ Dev.Detect >STYA ARGS
bne .1
>LDYA L.MSG.DETECT.KO
>SYSCALL printf
>SYSCALL puts
lda #MLI.E.NODEV
sec
@ -101,7 +101,9 @@ Dev.Detect >STYA ARGS
bcs .9
.8 >PUSHW L.FD.DEV.NAME
>PUSHBI 2
>LDYA L.MSG.DETECT.OK
>SYSCALL printf
>PUSHWI DRV.END
>PUSHWI DRV.CS.END
@ -149,9 +151,9 @@ Dev.ParseArgs >LDYA ARGS
*--------------------------------------
CS.END
ARGS .BS 2
MSG.DETECT .AZ "UtherNet/CS8900A Driver.\r\n"
MSG.DETECT .AZ "UtherNet/CS8900A Driver."
MSG.DETECT.OK .AZ "UtherNet/CS8900A Installed As Device : %s\r\n"
MSG.DETECT.KO .AZ "Hardware Not Found.\r\n"
MSG.DETECT.KO .AZ "Hardware Not Found."
SSCANF.MAC .AZ "%h:%h:%h:%h:%h:%h"
*--------------------------------------
FD.DEV .DA #S.FD.T.CDEV

View File

@ -78,7 +78,7 @@ CS.INIT ldy #S.PS.ARGC
rts
.90 >LDYA L.MSG.USAGE
>SYSCALL printf
>SYSCALL puts
lda #0
sec
.9 rts
@ -118,6 +118,7 @@ CS.RUN.LOOP
.4 jsr Wait.Timeout
bcc .1
>PUSHWI KVER
>PUSHBI 2
>LDYA L.MSG.GREETINGS
>SYSCALL printf
@ -243,7 +244,7 @@ Wait.TimeOut sec
.9 rts
*--------------------------------------
CS.END
MSG.USAGE .AZ "Usage : GETTY <DEV> <PROGRAM>\r\n"
MSG.USAGE .AZ "Usage : GETTY <DEV> <PROGRAM>"
MSG.TELNETOPT .DA #IAC,#WILL,#TELOPT.BINARY
.DA #IAC,#DO,#TELOPT.LINEMODE
.DA #IAC,#SB,#TELOPT.LINEMODE,#SB.SEND,#0,#IAC,#SE

View File

@ -44,6 +44,7 @@ CS.INIT ldy #S.PS.ARGC
>SYSCALL GetArg
>PUSHYA
>PUSHBI 2
>LDYA L.MSG.LOAD
>SYSCALL printf
@ -58,7 +59,7 @@ CS.INIT ldy #S.PS.ARGC
rts
.9 >LDYA L.MSG.HELP
>SYSCALL printf
>SYSCALL puts
lda #0 tell TSKMGR that all done ok, but
sec we do not want to stay in memory
.99 rts
@ -71,7 +72,7 @@ CS.QUIT clc
rts
*--------------------------------------
CS.END
MSG.HELP .AZ "Usage: insdrv file.drv <args>\r\n"
MSG.HELP .AZ "Usage: insdrv file.drv <args>"
MSG.LOAD .AZ "INSDRV:Loading %s...\r\n"
*--------------------------------------
MAN

View File

@ -67,28 +67,31 @@ CS.RUN >LDYA L.FILENAME
>SYSCALL ExpandStr
txa
>STA.G hFileName
>PUSHBI 0
>LDYA L.MSG.TOPBAR
>SYSCALL printf
jsr CS.RUN.Load
bcs .1
>PUSHBI 0
>LDYA L.MSG.TOPBAR.OK
bra .2
.1 >LDYA L.MSG.TOPBAR.KO
.1 >PUSHBI 0
>LDYA L.MSG.TOPBAR.KO
.2 >SYSCALL printf
>PUSHBI 0
>LDYA L.MSG.KCONF
>SYSCALL printf
>LDYAI A2osX.HZ
jsr CS.RUN.DumpConfYA
>PUSHBI 0
>LDYA L.MSG.STATUSBAR
>SYSCALL printf
CS.RUN.REPaint >LDYA L.MSG.FCONF
CS.RUN.REPaint >PUSHBI 0
>LDYA L.MSG.FCONF
>SYSCALL printf
>LDYA ZPCfgPtr
@ -107,7 +110,9 @@ CS.RUN.Loop >SLEEP
jsr CS.RUN.Save
bcc .8
>PUSHA
>PUSHBI 0
>LDYA L.MSG.QUIT.ERR
>SYSCALL printf
bra .9
.1 cmp #20 Ctrl-T
@ -147,11 +152,13 @@ CS.RUN.Loop >SLEEP
lda (ZPCfgPtr),y
eor #$FF
sta (ZPCfgPtr),y
bra CS.RUN.REPaint
jmp CS.RUN.REPaint
.8 >LDYA L.MSG.QUIT
.9 >SYSCALL printf
lda #0
.8 >PUSHBI 0
>LDYA L.MSG.QUIT
>SYSCALL printf
.9 lda #0
sec
rts
*--------------------------------------
@ -245,7 +252,7 @@ CS.RUN.DumpConfYA
>STYA ZPTmp1
>PUSHB (ZPTmp1)
>PUSHBI 1
>LDYA L.MSG.HZ
>SYSCALL printf
@ -258,6 +265,7 @@ CS.RUN.DumpConfYA
.10 >LDYA L.MSG.ENABLED
.12 >PUSHYA
>PUSHBI 2
>LDYA L.MSG.CHROOT
>SYSCALL printf
@ -270,6 +278,7 @@ CS.RUN.DumpConfYA
.13 >LDYA L.MSG.ENABLED
.14 >PUSHYA
>PUSHBI 2
>LDYA L.MSG.PMODE
>SYSCALL printf
@ -298,7 +307,7 @@ CS.RUN.DumpConfYA
sec
sbc #8
>PUSHA Slot
>PUSHBI 3
>LDYA L.MSG.SLOT
>SYSCALL printf
@ -307,6 +316,7 @@ CS.RUN.DumpConfYA
cpy #16
bne .1
>PUSHBI 0
>LDYA L.MSG.PROMPT
>SYSCALL printf

View File

@ -49,6 +49,7 @@ CS.RUN lda #0
ldy #hPASSWORD
sta (pData),y
>PUSHBI 0
>LDYA L.MSG.LOGIN
>SYSCALL printf
bcs .9
@ -67,6 +68,7 @@ CS.RUN lda #0
jsr INPUT.LINEIN
bcc .1
>PUSHBI 0
>LDYA L.MSG.PASSWORD
>SYSCALL printf
bcs .9

View File

@ -3,11 +3,14 @@ PREFIX /A2OSX.BUILD
AUTO 4,1
.LIST OFF
*--------------------------------------
CL.PrintPrompt >LDYA L.ENV.PS1
CL.PrintPrompt >PUSHBI 0
>LDYA L.ENV.PS1
>SYSCALL GetEnv
>SYSCALL ExpandStr
phx
>SYSCALL printf
>PUSHBI 0
>LDYA L.MSG.PROMPT
>SYSCALL printf
plx

View File

@ -275,8 +275,8 @@ Cmd.Exec.EXT.SEP
Cmd.Exec.PWD ldy #S.PS.hPREFIX
lda (pPs),y
>SYSCALL GetMemPtr
>SYSCALL printf
jmp Cmd.Exec.ECHO.CR
>SYSCALL puts
jmp Cmd.Exec.Done
*--------------------------------------
Cmd.Exec.CD lda (ZPPTR2)
bne .1
@ -390,6 +390,7 @@ Cmd.Exec.SET lda (ZPPTR2)
>PUSHW ZPPTR2 Push value
>PUSHW ZPPTR1 Push name
>PUSHBI 4
>LDYA L.MSG.PRINTENV
>SYSCALL printf
bcs .9
@ -449,6 +450,8 @@ Cmd.Exec.SETVAR ldy #0
>PUSHYA push value
>PUSHW ZPPTR2 push name
>LDYA L.MSG.PRINTENV
>PUSHBI 4
>SYSCALL printf
.8 clc
@ -474,24 +477,11 @@ Cmd.Exec.TIME clc
>SYSCALL StrFTime
>LDYA ZPCMDBuf
>SYSCALL printf
bcs Cmd.Exec.ECHO.END
bra Cmd.Exec.ECHO.CR
>SYSCALL puts
jmp Cmd.Exec.Done
*--------------------------------------
Cmd.Exec.ECHO lda (ZPPtr2)
beq Cmd.Exec.ECHO.CR
>LDYA ZPPtr2
>SYSCALL printf
Cmd.Exec.ECHO.CR
lda #13
>SYSCALL PutChar
bcs Cmd.Exec.ECHO.END
lda #10
>SYSCALL PutChar
Cmd.Exec.ECHO.END
Cmd.Exec.ECHO >LDYA ZPPtr2
>SYSCALL puts
jmp Cmd.Exec.Done
*--------------------------------------
Cmd.Exec.READ lda (ZPPtr2)

View File

@ -171,6 +171,7 @@ CSH.Run jsr CL.RESET
beq .80
>PUSHW ZPCMDBuf
>PUSHBI 2
>LDYA L.MSG.ECHO
>SYSCALL printf
@ -1200,6 +1201,7 @@ CSH.ErrorMsg >LDA.G CSH.hBuf
.8 >PUSHW.G CSH.LineNum
>PUSHBI 2
>LDYA L.MSG.CSHERR
>SYSCALL printf

View File

@ -37,6 +37,8 @@ IO.PrintErrMsg pha Save EC for PrintF
.8 >PUSHW ZPPTR1
pla
>PUSHA
>PUSHBI 4
>LDYA L.MSG.ERROR
>SYSCALL printf
rts

View File

@ -139,6 +139,7 @@ CS.INIT jsr SetPWD
bcs .9
>PUSHWI KVER
>PUSHBI 2
>LDYA L.MSG.GREETINGS
>SYSCALL printf

View File

@ -114,7 +114,7 @@ Kernel.Init3 sta SETALTZP
jsr PS0.Init
>LDYAI MSG.Init3
>SYSCALL printf
>SYSCALL puts
jsr CPU.Init.6502
jsr CPU.Init.Z80
@ -135,6 +135,8 @@ Kernel.Init3 sta SETALTZP
>SYSCALL GetMemPtr
>PUSHYA
>PUSHBI 2
>LDYAI MSG.Prefix
>SYSCALL printf
@ -145,11 +147,12 @@ Kernel.Init3 sta SETALTZP
bne .1
>LDYAI MSG.MMode
>SYSCALL printf
>SYSCALL puts
>LDYAI STARTUP.SHELL
bra .8
.1 >PUSHWI STARTUP.CMDLINE
>PUSHBI 2
>LDYAI MSG.Startup
>SYSCALL printf
@ -165,13 +168,14 @@ Kernel.Init3 sta SETALTZP
>SYSCALL FreeMem ...discard...
>LDYAI MSG.Init3.OK
>SYSCALL printf
>SYSCALL puts
>DEBUGOA
jmp CORE.Run
.9 >PUSHA
>PUSHBI 1
>LDYAI MSG.StartupErr
>SYSCALL printf
bra * No need to discard Expanded CMDLINE
@ -305,7 +309,7 @@ PS0.Init >LDYAI CORE.S.PS0 Select Process 0 (Kernel)
.9 rts
*--------------------------------------
CPU.Init.6502 >LDYAI MSG.CPU
>SYSCALL printf
>SYSCALL puts
jsr Detect6502 A = CPU type
sta A2osX.CPUTYPE
@ -316,7 +320,7 @@ CPU.Init.6502 >LDYAI MSG.CPU
ldy MSG.CPUTYPE,x
lda MSG.CPUTYPE+1,x
>SYSCALL printf
>SYSCALL puts
lda MACHID
and #MACHID.T
@ -324,7 +328,7 @@ CPU.Init.6502 >LDYAI MSG.CPU
beq CPU.Init.Z80
>LDYAI MSG.CPU.SPEED
>SYSCALL printf
>SYSCALL puts
stz A2osX.RANDOM16
stz A2osX.RANDOM16+1
@ -383,12 +387,13 @@ CPU.Init.6502 >LDYAI MSG.CPU
>PUSHA push CPU speed LO
lda A2osX.CPUSPEED
>PUSHA push CPU speed HI
>PUSHBI 2
>LDYAI MSG.CPU.SPEEDOK
>SYSCALL printf
rts
*--------------------------------------
CPU.Init.Z80 >LDYAI MSG.Z80
>SYSCALL printf
>SYSCALL puts
jsr DetectZ80
bcs .9
@ -399,12 +404,13 @@ CPU.Init.Z80 >LDYAI MSG.Z80
lda #A2osX.S.Z80
sta A2osX.S,x
>PUSHBI 1
>LDYAI MSG.Z80.OK
>SYSCALL printf
rts
.9 >LDYAI MSG.Z80.KO
>SYSCALL printf
>SYSCALL puts
rts
*--------------------------------------
* Out:
@ -499,7 +505,7 @@ MemMgrInit >LDYAI Mem.MHiMem
* if irq not handled, jmp (S.IrqMgrOldFFFE)
*--------------------------------------
IrqMgrInit >LDYAI MSG.IRQ
>SYSCALL printf
>SYSCALL puts
php
sei
@ -530,7 +536,7 @@ IrqMgrInit >LDYAI MSG.IRQ
>STYA GP.IrqH.JSR+1
>LDYAI MSG.IRQ.CLOCK
>SYSCALL printf
>SYSCALL puts
clc
rts
@ -546,7 +552,7 @@ IrqMgrInit >LDYAI MSG.IRQ
>STYA GP.IrqH.JSR+1
>LDYAI MSG.IRQ.VBL
>SYSCALL printf
>SYSCALL puts
clc
rts
@ -557,7 +563,7 @@ IrqMgrInit >LDYAI MSG.IRQ
sta SYS.BASL0+38
>LDYAI MSG.IRQ.POLL
>SYSCALL printf
>SYSCALL puts
clc
rts
@ -719,7 +725,7 @@ IrqMgrInit.HZ2Tick
rts
*--------------------------------------
DevMgrInit >LDYAI MSG.DEV
>SYSCALL printf
>SYSCALL puts
lda DEVCNT
sta DevMgrInit.DEVCNT
@ -869,6 +875,7 @@ DevMgrInit.AddBDev
sta FD.BDEV+S.FD.DEV.NAME+3 SxDn
>PUSHWI FD.BDEV+S.FD.DEV.NAME
>PUSHBI 2
>LDYAI MSG.BLKDEV
>SYSCALL printf
@ -878,7 +885,7 @@ DevMgrInit.AddBDev
rts
*--------------------------------------
EvtMgrInit >LDYAI MSG.EVT
>SYSCALL printf
>SYSCALL puts
lda #$A5
sta A2osX.TIMER16
@ -891,14 +898,14 @@ EvtMgrInit >LDYAI MSG.EVT
rts
*--------------------------------------
FltMgrInit >LDYAI MSG.FLT
>SYSCALL printf
>SYSCALL puts
stz Flt.Table
clc
rts
*--------------------------------------
TskMgrInit >LDYAI MSG.TSK
>SYSCALL printf
>SYSCALL puts
>LDYAI K.ENV.SIZE get a buffer for ENV
>SYSCALL GetMem0 make sure blank!!
@ -992,36 +999,36 @@ MSG.KCREAD.KO .AZ "\nError While Reading Kernel Config File, Using Default.\n"
MSG.Init2.OK .AZ "A2osX[Stage2]:Complete.\n"
*--------------------------------------
SYSSCREEN.TOP .AZ "A2osX 0.92 System Screen"
MSG.Init3 .AZ "A2osX[Stage3]:Init\r\nPress Ctrl-D for Mantenance Mode.\r\n"
MSG.DEV .AZ "Device Manager...\r\n"
MSG.Init3 .AZ "A2osX[Stage3]:Init\r\nPress Ctrl-D for Mantenance Mode."
MSG.DEV .AZ "Device Manager..."
MSG.BLKDEV .AZ " Adding : /DEV/%s\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.IRQ .AZ "Interrupt Manager..."
MSG.IRQ.VBL .AZ " Mouse VBL IRQ Activated."
MSG.IRQ.CLOCK .AZ " Clock Card IRQ Activated."
MSG.IRQ.POLL .AZ " Polling Mode."
MSG.EVT .AZ "Event Manager..."
MSG.FLT .AZ "Path Filter..."
MSG.TSK .AZ "Task Manager..."
MSG.Prefix .AZ "Root:%s\r\n"
MSG.MMode .AZ "Ctrl-D Pressed, entering Maintenance mode...\r\n"
MSG.Startup .AZ "Executing Kernel Startup Script...\r\nCmd:%s\r\n"
MSG.MMode .AZ "Ctrl-D Pressed, entering Maintenance mode..."
MSG.Startup .AZ "Executing Kernel Startup Script...\r\nCommand Line:%s\r\n"
MSG.StartupErr .AZ "Failed : [$%h]\r\n"
MSG.Init3.OK .AZ "A2osX[Stage3]:Complete.\r\n"
MSG.Init3.OK .AZ "A2osX[Stage3]:Complete."
*--------------------------------------
MSG.CPU .AZ "Checking CPU..."
MSG.CPU.SPEED .AZ "Detecting CPU Speed..."
MSG.CPUTYPE .DA MSG.6502
.DA MSG.65C02
.DA MSG.65R02
.DA MSG.65816
MSG.6502 .AZ "6502.\r\n"
MSG.65C02 .AZ "65C02.\r\n"
MSG.65R02 .AZ "65R02.\r\n"
MSG.65816 .AZ "65816.\r\n"
MSG.6502 .AZ "6502."
MSG.65C02 .AZ "65C02."
MSG.65R02 .AZ "65R02."
MSG.65816 .AZ "65816."
MSG.CPU.SPEED .AZ "Detecting CPU Speed..."
MSG.CPU.SPEEDOK .AZ "%d.%02d Mhz.\r\n"
MSG.Z80 .AZ "Detecting Z80 CPU..."
MSG.Z80.OK .AZ "Detected In Slot %d.\r\n"
MSG.Z80.KO .AZ "Not Detected.\r\n"
MSG.Z80.KO .AZ "Not Detected."
*--------------------------------------
DEV.SYS .AZ "/DEV/SYS"
I.ENV.A2osX .AZ "A2OSX"

View File

@ -319,7 +319,7 @@ K.FreeMem tay
sbc #0
>PUSHYA
>PUSHBI 2
>LDYAI K.FreeMem.ERR
>SYSCALL printf

View File

@ -1,6 +1,16 @@
NEW
PREFIX /A2OSX.BUILD
AUTO 4,1
*--------------------------------------
*K.PrintF.PadL .BS 1
*K.PrintF.PadC .BS 1
*HEXBUF .BS 4
*BCDBUF .BS 5 5, enough to handle 10 digits (32bits)
*--------------------------------------
HEXBUF .EQ FAC
K.PrintF.PadL .EQ FAC+4
K.PrintF.PadC .EQ FAC+5
BCDBUF .EQ ARG
*/--------------------------------------
* # FPutC
* Print A (char) to hFILE
@ -184,8 +194,6 @@ K.SPrintF >STYA pIOBuf Out Buffer
bra K.PrintF.1
K.FPrintF jsr K.GetMemPtr A = hFILE
>STYA pFD
>PULLW ZPPtr1 format
@ -205,6 +213,8 @@ K.PrintF.0 >LDYAI K.IOBuf
K.PrintF.1 stz K.S.IOCTL+S.IOCTL.BYTECNT
stz K.S.IOCTL+S.IOCTL.BYTECNT+1
stz PrintF.GetByte+1
ldy #0
.1 lda (ZPPtr1),y
@ -261,9 +271,10 @@ K.PrintF.1 stz K.S.IOCTL+S.IOCTL.BYTECNT
jsr PrintF.ESC
ply
bcc .1
rts
bcs .99
.8 jmp PrintF.Flush
.8 jsr PrintF.Flush
bra .99
.10 cmp #'\'
bne .20
@ -283,7 +294,16 @@ K.PrintF.1 stz K.S.IOCTL+S.IOCTL.BYTECNT
.20 jsr PrintF.COut
bcc .1
.99 rts
.99 php
pha
lda pStack
sec ByteCnt byte
adc (pStack) ... ByteCnt
sta pStack CC
pla
plp
rts
*--------------------------------------
PrintF.ESC jmp (.1,x)
.1 .DA PrintF.B,PrintF.BB
@ -300,14 +320,16 @@ PrintFTBL2.OUT .HS 08.1B.0C.0A.0D \b\e\f\n\r
.DA #'\' \\
.DA #'%' \%
*--------------------------------------
PrintF.BB >PULLA
PrintF.BB jsr PrintF.GetByte
bcs PrintF.BB.RTS
pha
jsr PrintF.B
pla
bcc PrintF.B.1
PrintF.BB.RTS rts
*--------------------------------------
PrintF.B >PULLA
PrintF.B jsr PrintF.GetByte
bcs PrintF.BB.RTS
PrintF.B.1 ldx #8
@ -327,7 +349,10 @@ PrintF.I sec signed short
PrintF.D clc unsigned short (BYTE)
ldx #0 one byte
>PULLB HEXBUF
jsr PrintF.GetByte
bcs PrintF.BB.RTS
sta HEXBUF
stz HEXBUF+1
bra PrintF.DD.1
@ -336,7 +361,13 @@ PrintF.II sec signed int
PrintF.DD clc unsigned int (WORD)
ldx #1 two bytes
>PULLW HEXBUF
jsr PrintF.GetByte
bcs PrintF.BB.RTS
sta HEXBUF
jsr PrintF.GetByte
bcs PrintF.BB.RTS
sta HEXBUF+1
PrintF.DD.1 stz HEXBUF+2
stz HEXBUF+3
@ -345,10 +376,18 @@ PrintF.DD.1 stz HEXBUF+2
PrintF.L sec signed long
.HS 90 BCC
PrintF.U clc unsigned long (DWORD)
ldx #3 4 bytes
ldx #$ff
>PULLW HEXBUF
>PULLW HEXBUF+2
.1 jsr PrintF.GetByte
bcs PrintF.BB.RTS
inx
sta HEXBUF,x
cpx #3
bne .1
* ldx #3 4 bytes
PrintF.U.1 bcc PrintF.Hex2Dec unsigned, nothing to check
@ -463,16 +502,11 @@ PrintF.Hex2Dec ror .31+1
PrintF.E sec Force "E+12"
.HS 90 BCC
PrintF.F clc
lda pStack+1
sta INDEX+1
lda pStack
sta INDEX
clc
adc #5
sta pStack
jsr PrintF.GetFloatPtrYA
bcs .9
>STYA INDEX
ldx #ROM.SETFAC
jsr GP.ROMCALL
@ -494,23 +528,28 @@ PrintF.F clc
.9 rts
*--------------------------------------
PrintF.HH >PULLA
PrintF.HH jsr PrintF.GetByte
bcs PrintF.H.9
pha
jsr PrintF.H
pla
bra PrintF.H.1
*--------------------------------------
PrintF.H >PULLA
PrintF.H jsr PrintF.GetByte
bcs PrintF.H.9
PrintF.H.1 pha
jsr PrintF.NN.1
pla
bra PrintF.N.1
PrintF.H.9 rts
*--------------------------------------
PrintF.N >PULLA
PrintF.N jsr PrintF.GetByte
bcs PrintF.H.9
PrintF.N.1 and #$0F
bra PrintF.NN.2
PrintF.NN >PULLA
PrintF.NN jsr PrintF.GetByte
bcs PrintF.H.9
PrintF.NN.1 lsr
lsr
lsr
@ -526,7 +565,13 @@ PrintF.S ldy #$ff CSTR
.HS 2C bit abs
PrintF.SS ldy #$00 PSTR
>PULLW ZPPtr2
jsr PrintF.GetByte
bcs .9
sta ZPPtr2
jsr PrintF.GetByte
bcs .9
sta ZPPtr2+1
lda (ZPPtr2) if CSTR:last char=0, if PSTR:len=0
beq .8
@ -571,6 +616,42 @@ PrintF.SS ldy #$00 PSTR
.8 clc
.9 rts
*--------------------------------------
PrintF.GetFloatPtrYA
lda PrintF.GetByte+1
clc
adc #5
cmp (pStack)
bcc .9
pha Save new Ptr
lda PrintF.GetByte+1
* sec
adc pStack
tay
pla
sta PrintF.GetByte+1
lda pStack+1
* clc
rts
.9 sec
rts
*--------------------------------------
PrintF.GetByte lda #$FF SELF MODIFIED LStack Ptr
cmp (pStack)
beq .9 CS
phy
tay
iny
lda (pStack),y
sty PrintF.GetByte+1
ply
* clc
.9 rts
*--------------------------------------
PrintF.COut phy
ldy K.S.IOCTL+S.IOCTL.BYTECNT
@ -705,16 +786,6 @@ K.GetC.I >LDYAI K.IOBuf
bcs K.GetC.9
lda K.IOBuf
K.GetC.9 rts
*--------------------------------------
*K.PrintF.PadL .BS 1
*K.PrintF.PadC .BS 1
*HEXBUF .BS 4
*BCDBUF .BS 5 5, enough to handle 10 digits (32bits)
*--------------------------------------
HEXBUF .EQ FAC
K.PrintF.PadL .EQ FAC+4
K.PrintF.PadC .EQ FAC+5
BCDBUF .EQ ARG
*/--------------------------------------
* # SScanF
* Read formatted data from string
@ -737,6 +808,7 @@ BCDBUF .EQ ARG
* + %s : string
* TODO : %10s
* `>LDYA s`
* `>SYSCALL sscanf`
* **Out:**
* A = Number of arguments filled.
*\--------------------------------------
@ -1009,11 +1081,11 @@ K.FOpen.10 lda #S.FD.REG
lda #$FF
sta K.MLI.PARAMS+2
lda #$0D
lda #C.CR
sta K.MLI.PARAMS+3
>MLICALL MLINEWLINE
.8 lda #$ff Self Modified
.8 lda #$ff Self Modified, hFD
clc
rts CC