Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-03-26 15:22:48 +00:00
parent 3fe962ee0a
commit 49a81ec288
5 changed files with 83 additions and 85 deletions

Binary file not shown.

View File

@ -31,64 +31,9 @@ OUT.Reset ldx #4
rts
*---------------------------------------
OUT.PrintLineErr
>STA.G DIR.Byte Save Error code
jsr OUT.PrintLine.1
bcs .9
.1 >PUSHB.G DIR.Byte
>PUSHBI 1
>LDYA L.MSG.ERROR
>SYSCALL printf
ldx ZPLinePtr
cpx ZPLineBuf
beq .4
.3 phx
lda #'-'
>SYSCALL PutChar
plx
bcs .9
dex
cpx ZPLineBuf
bne .3
.4 lda #'^'
phy
>SYSCALL PutChar
ply
bcs .9
.5 lda #13
>SYSCALL PutChar
lda #10
>SYSCALL PutChar
.9 rts
*---------------------------------------
OUT.PrintLine jsr OUT.PrintLineOn
bcs OUT.PrintLine.9
OUT.PrintLine.1 jsr OUT.PrintLineOutBuf
bcs OUT.PrintLine.9
>LDA.G SRC.LINENUM
cmp #76
bne .23
>DEBUG
.23 >PUSHW ZPLineBuf
>PUSHW.G SRC.LINENUM
>PUSHBI 4
>LDYA L.MSG.SRCLINE
jmp OUT.Print
OUT.PrintLine.9 rts
*---------------------------------------
OUT.PrintLineOn clc
rts
OUT.PrintLineOn
* clc
* rts
>LDA.G ASM.LI.ON
bpl .9
@ -121,6 +66,58 @@ OUT.PrintLineOn clc
.9 sec
rts
*---------------------------------------
OUT.PrintLineErr
>STA.G DIR.Byte Save Error code
jsr OUT.PrintLine.1
bcs .9
.1 >PUSHB.G DIR.Byte
>PUSHBI 1
>LDYA L.MSG.ERROR
>SYSCALL printf
ldx ZPLinePtr
cpx ZPLineBuf
beq .4
.3 phx
lda #'-'
>SYSCALL PutChar
plx
bcs .9
dex
cpx ZPLineBuf
bne .3
.4 lda #'^'
phy
>SYSCALL PutChar
ply
bcs .9
.5 jmp OUT.PrintCR
.9 rts
*---------------------------------------
OUT.PrintLine jsr OUT.PrintLineOn
bcs OUT.Print.RTS
OUT.PrintLine.1 jsr OUT.PrintLineOutBuf
bcs OUT.Print.RTS
>PUSHW ZPLineBuf
>PUSHW.G SRC.LINENUM
>PUSHBI 4
>LDYA L.MSG.SRCLINE
*---------------------------------------
OUT.Print >SYSCALL printf
bcs OUT.Print.RTS
jmp OUT.PrintCR
OUT.Print.RTS rts
*---------------------------------------
OUT.PrintLineOutBuf
>LDA.G OUT.bEquate
bne OUT.PrintLineAcc
@ -182,25 +179,6 @@ OUT.PrintLineAcc
>SYSCALL printf
rts
*---------------------------------------
OUT.Print >SYSCALL printf
bra OUT.Print1
OUT.PrintCR lda #13
>SYSCALL PutChar
lda #10
>SYSCALL PutChar
OUT.Print1 >DEC.G OUT.LineCnt
bne .8
lda #PAGE.LEN
sta (pData),y
lda #$80
>STA.G bPause
.8 rts
*---------------------------------------
OUT.EmitByte phy
phx
pha
@ -245,6 +223,20 @@ OUT.EmitByte phy
clc
rts
*---------------------------------------
OUT.PrintCR >PUSHBI 0
>LDYA L.MSG.CRLF
>SYSCALL printf
>DEC.G OUT.LineCnt
bne .8
lda #PAGE.LEN
sta (pData),y
lda #$80
>STA.G bPause
.8 rts
*---------------------------------------
MAN
SAVE USR/SRC/BIN/ASM.S.OUT
LOAD USR/SRC/BIN/ASM.S

View File

@ -177,6 +177,10 @@ SYM.NewGlobal jsr SYM.StoreGlobal
lda #$ff
>STA.G SYM.bInGlobal
>PUSHW.G SYM.GlobalID
>PUSHBI 2
>LDYA L.MSG.WORD
>SYSCALL printf
clc
rts

View File

@ -130,6 +130,7 @@ L.MSG.SUMMARY .DA MSG.SUMMARY
L.MSG.END .DA MSG.END
L.MSG.PSTR .DA MSG.PSTR
L.MSG.CRLF .DA MSG.CRLF
L.MSG.WORD .DA MSG.WORD
L.MSG.ACC .DA MSG.ACC
L.MSG.SRC.FILE .DA MSG.SRC.FILE
L.MSG.OBJ.FILE .DA MSG.OBJ.FILE
@ -347,7 +348,7 @@ CS.RUN ldy #S.PS.hStdIn
.9 pha
jsr OUT.PrintLineErr
>DEBUG
jsr SYM.StoreGlobal Make sure last Global flushed
jsr SYM.Dump
pla
@ -450,10 +451,10 @@ T.LI >PSTR "ON"
ASM..T. .AZ ".T."
ASM.6502 .AZ "6502"
MSG.HELP .AZ "A2osX-Macro Assembler (S-C MASM 3.0 Based)\r\nUsage : ASM <src file> [type TXT ($04) or S-C/BAS ($FA)]\r\n"
MSG.PASS .AZ "\r\n**** Pass:#%d ****\r\n\r\n"
MSG.SRC.FILE .AZ "**** Reading SRC File:%s\r\n"
MSG.OBJ.FILE .AZ "**** Writing OBJ File:%s, Type=%02x\r\n"
MSG.T.FILE .AZ "**** Loading CPU File:%s\r\n"
MSG.PASS .AZ "**** Pass:#%d ****"
MSG.SRC.FILE .AZ "**** Reading SRC File:%s"
MSG.OBJ.FILE .AZ "**** Writing OBJ File:%s, Type=%02x"
MSG.T.FILE .AZ "**** Loading CPU File:%s"
MSG.OUT0 .AZ "%H- "
MSG.OUT1 .AZ "%H-%h "
MSG.OUT2 .AZ "%H-%h %h "
@ -463,7 +464,7 @@ MSG.EQU1 .AZ " [ %h] "
MSG.EQU2 .AZ " [ %h%h] "
MSG.EQU3 .AZ " [ %h%h%h] "
MSG.EQU4 .AZ " [%h%h%h%h] "
MSG.SRCLINE .AZ " %05D %s\r\n"
MSG.SRCLINE .AZ " %05D %s"
MSG.ERROR .AZ "**** Fatal Error $%h"
MSG.SYMBOLS .AZ "Symbol Table:"
MSG.LSYMBOL .AZ " .%d=%h%h%h%h"
@ -471,6 +472,7 @@ MSG.SUMMARY .AZ "\r\nSymbol Table Size : %5D Bytes.\r\n"
MSG.END .AZ "End Of Assembly."
MSG.PSTR .AS "{%S}"
MSG.CRLF .AZ "\r\n"
MSG.WORD .AZ ">$%H"
MSG.ACC .AZ "%b,%d,%h%h%h%h\r\n"
SRC.MOD.RESERVED >PSTR "#/^<>"
SRC.EXP.RESERVED >PSTR "^!|&<=>+-*/"

View File

@ -73,8 +73,8 @@ A2osX.KCONFIG .EQ $BEF0
A2osX.HZ .EQ $BEF0 5/6 for 50/60Hz
A2osX.TTYDEVS .EQ $BEF1
A2osX.F .EQ $BEF8
A2osX.F.CHROOT .EQ %10000000 ChRooting to /RAMx
A2osX.F.PMODE .EQ %01000000 Preemptive Mode
A2osX.F.CHROOT .EQ %10000000 ChRooting to /RAMx
A2osX.F.PMODE .EQ %01000000 Preemptive Mode
A2osX.S .EQ $BEF8 $BEF9->$BEFF, 7 slots
A2osX.S.Z80 .EQ $80
A2osX.S.VSDRIVE .EQ $81