Kernel 0.94++

This commit is contained in:
Rémy GIBERT 2021-05-22 23:05:12 +02:00
parent 8ff85dfd1a
commit 31548cde8c
17 changed files with 467 additions and 176 deletions

View File

@ -70,7 +70,7 @@ This document lists all of the **ACOS Words** supported in the A2osX implementat
| SETINT | SETINT (*string1* [,*string1*...])<br>SETINT ("")<br>SETINT (*number*) | Not Yet Implemented | Sets the interrupt table with specified keys. | The <tt>SETINT</tt> command is used to set up 'interrupt' keys. Once setup the system will check for those keys whenever text is being displayed. If one of the keys are encountered, all further output will be suppressed until an input statement of some kind is encountered or the <tt>SETINT</tt> is reset. To reset the <tt>SETINT</tt> command, use the second syntax. If you wish to set the interrupt keys to those pre-defined by the ACOS config program, use the third syntax. <tt>SETINT(1)</tt> will set the interrupt key to the 'file stop' character. <tt>SETINT(2)</tt> will set the interrupt keys to the 'file stop' and 'file next' characters. | |
| STR$ | *string*=STR$(*number*) | Not Yet Implemented | Returns string representation of a numerical expression. | Returns the numerical supplied numerical expression as a string. | |
| TEXT | TEXT | Not Yet Implemented | Clear the screen and any window on the local console. | Used to clear the screen and any window on the local console. BJB REMY TODO: How is this different from HOME? | |
| THEN | THEN | Not Yet Implemented | Statement separator for logical IF statements. | Separates statements within <tt>IF</tt> statements. | |
| THEN | THEN | Impl. | Statement separator for logical IF statements. | Separates statements within <tt>IF</tt> statements. | |
| TIME$ | *string*=TIME$ | Not Yet Implemented | Returns the current TIME into a string. | The <tt>TIME$</tt> function is used to get the current time from your clock. If your system is equipped with a clock, the time will be returned in a "HH:MM:SS XM" format. If your clock is in the 24 hour configuration then it will be returned in the "HH:MM:SS" format. If you have no clock, then your estimated time on will be returned. The estimated time is based upon the number of characters output and the speed they were sent. The format for estimated time is "HH:MM:SS ET". When the clock is first reset via a <tt>MODEM(0)</tt> command, the time will be "00:00:00 ET" and will advance from there. REMY TODO: How is your implementation of no clocks? | |
| TONE | TONE (*pitch*, *duration*) | Not Yet Implemented | Generates a tone on the local speaker. | The TONE function is used to generate a tone from the speaker in your computer. BJB TODO: Need to determine limits. | |
| UPDATE | UPDATE | Not Yet Implemented | Flushes any cached data for the current message database. | The <tt>UPDATE</tt> statement is used to write any information about the current message base from memory out to disk (i.e. a flush operation). Normally, certain things are buffered and will stay within memory for long periods of time. In the event of a power failure or a system reset, this data will be lost before it is written out to disk. Use the <tt>UPDATE</tt> statement to force the data to be written out to disk. | |

Binary file not shown.

View File

@ -39,9 +39,24 @@ A2osX.QC.Start1 sei
lda #$8C Reset 80 col screen ($0C=FF=HOME)
jsr $C300
lda $280
ldx $280
beq A2osX.QC.Start2
.2 dex
lda $280,x
cmp #'/'
bne .2
stx A2osX.QC.BOOT
.3 lda $280,x
sta A2osX.QC.BOOT,x
dex
bne .3
jsr A2osX.QC.SetPFX
bcs A2osX.QC.Start2
jsr A2osX.QC.Load
bcs A2osX.QC.Start2
@ -51,9 +66,7 @@ A2osX.QC.Start2 sec
>LDYAI MSG.INIT1
jsr A2osX.QC.PrintYA
.3 jsr MLI
.DA #MLISETPREFIX
.DA MLISETPREFIX03
.3 jsr A2osX.QC.SetPFX
bcc .4
>LDYAI MSG.SETPREFIXKO
@ -113,6 +126,11 @@ A2osX.QC.Start2 sec
A2osX.QC.JMP >DEBUGOA
jmp $2000
*--------------------------------------
A2osX.QC.SetPFX jsr MLI
.DA #MLISETPREFIX
.DA MLISETPREFIX03
rts
*--------------------------------------
A2osX.QC.Load >LDYAI MSG.LOAD
clc
jsr A2osX.QC.PrintYA

View File

@ -160,7 +160,7 @@ CORE.Compile jsr CORE.GetChar
bra .8
*--------------------------------------
.3 jsr CORE.CreateOrGetVar
bcs .90
bcs .99
jsr CORE.GetCharNB
bcs .90
@ -425,6 +425,8 @@ CORE.CreateLabel
jsr CORE.NewKey
bcs .9
>STYA ZPSID
>PUSHB.G hLabels
>PUSHW ZPSID
>PUSHWI ZPCodeBufPtr
@ -490,21 +492,15 @@ CORE.CreateOrGetVar
jsr CORE.GetAddr
bcc .2
>LDA.G hVars
jsr CORE.NewKey
jsr CORE.NewVarKey
bcs .99
jsr CORE.GetChar
bcs .1
>STYA ZPSID
stz ZPTYPE
jsr CORE.GetVarType
stx ZPTYPE
cmp #'$'
bne .1
sta ZPTYPE
jsr CORE.GetNextChar skip $
beq .1
lda STRID
sta ZPADDR
@ -537,19 +533,9 @@ CORE.CreateOrGetVar
>SYSCALL SListAddData
rts
*--------------------------------------
.2 ldx #0
.2 jsr CORE.GetVarType
jsr CORE.GetChar
bcs .3
cmp #'$'
bne .3
tax
jsr CORE.GetNextChar skip $
.3 cpx ZPTYPE
cpx ZPTYPE
bne .90
clc
@ -560,15 +546,22 @@ CORE.CreateOrGetVar
.99 rts
*--------------------------------------
CORE.NewVarKey >LDA.G hVars
CORE.NewKey >PUSHA
>PUSHW ZPInputBufPtr
>SYSCALL SListNewKey
bcs CORE.GetAddr.RTS
bcs .9
>STYA ZPSID
pha
txa
jmp CORE.SkipA
jsr CORE.SkipA
pla Y,A = KeyID
clc
.9 rts
*--------------------------------------
CORE.GetAddr >PUSHA
>PUSHA for SListGetData
@ -590,9 +583,27 @@ CORE.GetAddr >PUSHA
rts
.9 >POP 1
CORE.GetAddr.RTS
rts
*--------------------------------------
CORE.GetVarType jsr CORE.GetChar
bcs .9
cmp #'$'
bne .9
inc ZPInputBufPtr
bne .1
inc ZPInputBufPtr+1 skip $
.1 tax NZ
rts
.9 ldx #0 Z
rts
*--------------------------------------
CORE.ToUpperCase
cmp #'a'
bcc .8

View File

@ -60,16 +60,17 @@ EXP.Eval.R lda EXP.AOPS
bra .40
.21 jsr EXP.VARLookup
bcs .99
bcc .22
ldx EXP.TYPE
bne .22
.22 ldx EXP.TYPE
bne .23
jsr CODE.INTGET
bra .40
.22 jsr CODE.STRGET
.23 jsr CODE.STRGET
bra .40
*--------------------------------------
@ -198,13 +199,13 @@ EXP.Int16 >PUSHW ZPInputBufPtr
EXP.VARLookup >LDA.G hVars
>PUSHA
>PUSHA for SListGetData
>PUSHA for SListGetData/SListAddData
>PUSHW ZPInputBufPtr
>SYSCALL SListLookup
bcs .9
bcs .3
>PUSHYA ZPSID
>PUSHYA KeyID
txa
jsr CORE.SkipA
@ -215,31 +216,64 @@ EXP.VARLookup >LDA.G hVars
>SYSCALL SListGetData
bcs .99
ldx #0
jsr CORE.GetVarType
jsr CORE.GetChar
bcs .2
cmp #'$'
bne .2
tax
jsr CORE.GetNextChar skip $
.2 cpx EXP.TYPE
cpx EXP.TYPE
bne .90
clc
rts
.9 >PULLA
.99 rts
.90 lda #E.TMISMATCH
sec
rts
.99 rts
*--------------------------------------
.3 jsr CORE.NewVarKey
bcs .39
phy
pha KeyID
jsr CORE.GetVarType
stx EXP.TYPE
beq .11
lda STRID
sta EXP.ADDR
lda STRID+1
sta EXP.ADDR+1
inc STRID
bne .10
inc STRID+1
bra .10
.11 lda ZPDataBufPtr
sta EXP.ADDR
clc
adc #2 Word
sta ZPDataBufPtr
lda ZPDataBufPtr+1
sta EXP.ADDR+1
adc #0
sta ZPDataBufPtr+1
.10 pla
>PUSHA
pla
>PUSHA
>PUSHWI EXP.ADDR
>PUSHWI 3 3 bytes : ADDR + TYPE
>SYSCALL SListAddData
rts
.39 inc pStack
rts
*--------------------------------------
MAN
SAVE usr/src/bin/acos.s.exp

View File

@ -294,7 +294,22 @@ KW.RIPCO
KW.SET
KW.SETINT
KW.TEXT
KW.THEN
lda #E.CSYN
sec
rts
*--------------------------------------
KW.THEN ldy pCCS
lda (pData),y
eor #KWID.IF
bne .9
clc
rts
.9 lda #E.NOIF
sec
rts
*--------------------------------------
KW.TONE
KW.UPDATE
KW.USE

View File

@ -2,16 +2,14 @@ NEW
AUTO 3,1
.LIST OFF
*--------------------------------------
STR.Add
RT.StrSet
*--------------------------------------
STR.replace
*--------------------------------------
STR.Get
RT.StrGet
*--------------------------------------
clc
rts
*--------------------------------------
MAN
SAVE usr/src/bin/acos.s.str
SAVE usr/src/bin/acos.s.rt
LOAD usr/src/bin/acos.s
ASM

View File

@ -506,6 +506,7 @@ CCODE.LEFT.LEN .EQ *-CCODE.LEFT
.INB usr/src/bin/acos.s.exp
.INB usr/src/bin/acos.s.fn
.INB usr/src/bin/acos.s.kw
.INB usr/src/bin/acos.s.rt
*--------------------------------------
CS.END
*--------------------------------------

View File

@ -3,12 +3,12 @@ NEW
.LIST OFF
*--------------------------------------
CSH.Init >SYSCALL SListNew
bcs .9
bcs .99
>STA.G CSH.hDefines
>SYSCALL SListNew
bcs .9
bcs .99
>STA.G CSH.hTags
@ -19,7 +19,7 @@ CSH.Init >SYSCALL SListNew
>LDYAI 256
>SYSCALL GetMem
bcs .9
.99 bcs .9
>STYA ZPCSHCode
txa
@ -49,6 +49,14 @@ CSH.Init >SYSCALL SListNew
txa
>STA.G CSH.hStack
>LDYAI 256
>SYSCALL GetMem
bcs .9
>STYA ZPCSHfDecl
txa
>STA.G CSH.hfDecl
lda #0
>STA.G CSH.ConstPtr
>STA.G CSH.StackPtr
@ -81,6 +89,9 @@ CSH.Quit >LDA.G CSH.hSymbols
>LDA.G hFileBuf
jsr .7
>LDA.G CSH.hfDecl
jsr .7
>LDA.G CSH.hStack
jsr .7
@ -115,30 +126,70 @@ CSH.Run.1 cmp #C.CR empty line....
jmp CSH.DIR
.4 cmp #'}' End of block ?
bne .40
bne .10
jsr CSH.CheckStack must be something on stack....
bcs .9
bcs CSH.Quit.RTS
jsr CSH.GetNextCharNB Skip '}'
jsr CSH.Pop was expected....
jsr CSH.Pop get stacked Cmd...
tax
jmp (J.CSH.KW.END,x)
.40 jsr CSH.IsLetter
bcc .5
*--------------------------------------
.10 jsr CSH.IsLetter
bcc .20
bra .99 error, todo : PREOPS ++ --.....
bcs .29 error, todo : PREOPS ++ --.....
*--------------------------------------
.20 >LDYA L.CSH.TMODS
jsr CSH.LookupID
bcs .50
.5 jsr CSH.SavePtr Save Ptr, in case of while,for....
jsr CSH.tDecl.JMP
bcs .59
jsr CSH.AddSymbol add with undef value...
bcs .99 OOM or DUP
jsr CSH.GetCharNB
bcs .99
cmp #';'
beq .8
cmp #'='
bne .21
jsr CSH.GetNextCharNB skip '='
bcs .99
lda ZPVarType
jsr CSH.ExpEval
bcs .9
jsr CSH.SetVarValueFromStack X= Type, Set value to this var
.29 bcs .99
bra .68
.21 cmp #'('
bne .99
jsr CSH.fDecl
bcs .99
bra .68
*--------------------------------------
.50 jsr CSH.SavePtr Save Ptr, in case of while,for....
>LDYA L.CSH.KW
jsr CSH.LookupID
bcs .6 not an internal CSH keyword....
jsr CSH.KW.JMP
bcs .9
.59 bcs .9
bra .8
.6 jsr CSH.GetVar
@ -148,7 +199,13 @@ CSH.Run.1 cmp #C.CR empty line....
jsr CSH.GetVarDef Get Type & ptr...
bcs .9
jsr CSH.GetCharNB
lda ZPVarQual
bit #CSH.Q.FUNC
beq .60
*--------------------------------------
.60 jsr CSH.GetCharNB
bcs .9
cmp #'=' TODO: all AOPS
@ -164,7 +221,7 @@ CSH.Run.1 cmp #C.CR empty line....
jsr CSH.SetVarValueFromStack X = Exp Type
bcs .9
jsr CSH.GetChar
.68 jsr CSH.GetCharNB
cmp #';'
beq .8
@ -337,56 +394,95 @@ CSH.AddSymbol >LDA.G CSH.hSymbols
.9 rts
.99 lda #E.OOM
.HS 2C BIT ABS
CSH.TMISMATCH lda #E.TMISMATCH
sec
* sec
rts
*--------------------------------------
CSH.fDeclaration
lda #CSH.Q.FUNC
tsb ZPVarType
jsr CSH.SkipLine
clc
rts
CSH.fDecl lda ZPCSHfDecl
sta ZPVarDataPtr
lda ZPCSHfDecl+1
sta ZPVarDataPtr+1
lda ZPVarID
jsr CSH.fDeclAddA
lda ZPVarID+1
jsr CSH.fDeclAddA
>DEBUG
jsr CSH.GetNextCharNB Skip (
bcs .9
.1 cmp #')'
beq .5
jsr CSH.GetDeclaration
.2 jsr CSH.fDeclGetArg
bcs .99
jsr CSH.GetCharNB
bcs .9
cmp #')'
beq .5
cmp #','
bne .9
jsr CSH.GetNextCharNB Skip ,
bcs .9
bra .2
.5 jsr CSH.GetNextCharNB Skip )
bcs .9
clc
rts
cmp #';'
bne .9
jsr CSH.GetNextCharNB Skip ;
.8 lda #0
sta (ZPCSHfDecl)
jmp CSH.SetVarValueFromStack
.9 lda #E.CSYN
sec
.99 rts
*--------------------------------------
CSH.GetDeclaration
>ENTER 4
CSH.fDeclGetArg >ENTER 4
>LDYA L.CSH.MTYPES
>LDYA L.CSH.TMODS
jsr CSH.LookupID
bcs .9
jsr CSH.tDecl
bcs .9
bra .8
.9 lda #E.CSYN
sec
.8 >LEAVE
rts
*--------------------------------------
CSH.fDeclAddA sta (ZPCSHfDecl)
inc ZPCSHfDecl
bne .8
inc ZPCSHfDecl+1
.8 rts
*--------------------------------------
CSH.tDecl jsr CSH.tDecl.JMP
bcs .9
.9 rts
CSH.tDecl.JMP jmp (J.CSH.TMODS,x)
*--------------------------------------
CSH.NewKey >PUSHA
>PUSHW ZPInputBufPtr
>SYSCALL SListNewKey
@ -771,14 +867,19 @@ CSH.GetChar lda (ZPInputBufPtr)
sec
rts
*---------------------------------------
CSH.IsEndArg
*---------------------------------------
CSH.IsOPChar ldx #CSH.OPChars.Cnt-1
.1 cmp CSH.OPChars,x
beq .8
dex
bpl .1
sec
rts
.8 clc
rts
*---------------------------------------
@ -788,16 +889,21 @@ CSH.IsLetterOrDigit
*---------------------------------------
CSH.IsLetter cmp #'_'
bne .1
clc
rts
.1 cmp #'A'
bcc .9
cmp #'Z'+1
bcc CSH.IsLetterRTS
cmp #'a'
bcc .9
cmp #'z'+1
rts CC if lowercase
.9 sec

View File

@ -35,15 +35,18 @@ CSH.ExpEval ldx ZPPtr1
jsr CSH.ExpEval
bcs .19
stx ZPPtr2
jsr CSH.GetCharNB
bcs .19
cmp #')'
bne .19
jsr CSH.GetNextCharNB skip )
bcc .31
.19 jmp .90
*--------------------------------------
.20 jsr CSH.IsLetter define, Fnc or Var ?
@ -81,25 +84,27 @@ CSH.ExpEval ldx ZPPtr1
.23 jsr CSH.GetNumOnStack
bcs .29
bra .30
.24 cmp #'"' String literal
bne .90
jsr CSH.AddContCharP
.29 bcs .99
*--------------------------------------
.30 jsr CSH.GetCharNB
bcs .90
.31 cmp #','
.31 cmp #';'
beq .80
cmp #','
beq .80
cmp #')'
beq .80
cmp #';'
beq .80
jsr CSH.IsOPChar
bcs .90
@ -163,10 +168,13 @@ CSH.AddContCharP
.1 jsr CSH.GetNextChar
bcs .9
cmp #C.CR
beq .9
cmp #'"'
beq .2
sta (ZPCSHConst),y
iny
bra .1

View File

@ -116,21 +116,14 @@ CSH.STRUCT >ENTER 4
.99 >LEAVE
rts
*--------------------------------------
CSH.CONST lda ZPVarQual
bit #CSH.Q.PPPOINTER
bne .1
CSH.CONST lda #CSH.Q.CONST
lda #CSH.Q.CONST
bra .2
.1 lda #CSH.Q.PCONST
.2 bit ZPVarQual
bne .9
tsb ZPVarQual
clc
rts
>LDYA L.CSH.TMODS2
jsr CSH.LookupID
bcs .9
jmp (J.CSH.TMODS2-2,x)
.9 lda #E.CSYN
sec
@ -224,59 +217,21 @@ CSH.TYPE stx ZPVarType
bra .9 more than ***
.10 jsr CSH.IsLetter
bcs .9
bcs .8
>LDYA L.CSH.FTYPES
jsr CSH.LookupID
bcs .12
bcs .8 next char is an identifier
sec
ror bFastCall
lda #CSH.Q.FUNC
tsb ZPVarQual
jsr CSH.GetNextCharNB
bcs .9
bcs .9 next char is an identifier, ",", "(",")"
jsr CSH.AddSymbol
bcs .99
jsr CSH.GetCharNB
bcs .9
bra .13
.12 jsr CSH.AddSymbol add with undef value...
bcs .99 OOM or DUP
jsr CSH.GetCharNB
bcs .9
cmp #';'
beq .8
cmp #'='
beq .2
.13 cmp #'('
bne .9
jmp CSH.fDeclaration
.2 jsr CSH.GetNextCharNB Skip =
bcs .9
lda ZPVarType
jsr CSH.ExpEval
bcs .99
.7 jsr CSH.SetVarValueFromStack X= Type, Set value to this var
bcs .99
jsr CSH.GetChar
bcs .9
cmp #';'
bne .9
.8 clc
rts

View File

@ -36,6 +36,7 @@ ZPCSHCode .BS 2
ZPCSHConst .BS 2
ZPCSHData .BS 2
ZPCSHStack .BS 2
ZPCSHfDecl .BS 2
ZPVarID .BS 2
ZPVarDef .EQ *
@ -127,7 +128,8 @@ J.CSH.cBOPS .DA CSH.BOPS.cMUL
L.CSH.FN .DA CSH.FN
L.CSH.DIRS .DA CSH.DIRS
L.CSH.KW .DA CSH.KW
L.CSH.MTYPES .DA CSH.MTYPES
L.CSH.TMODS .DA CSH.TMODS
L.CSH.TMODS2 .DA CSH.TMODS2
L.CSH.TYPES .DA CSH.TYPES
L.CSH.FTYPES .DA CSH.FTYPES
J.CSH.DIRS .DA CSH.DIR.DEFINE
@ -146,8 +148,8 @@ J.CSH.KW .DA CSH.IF
.DA CSH.TYPEDEF
.DA CSH.STRUCT
*--------------------------------------
J.CSH.MTYPES .DA CSH.CONST
.DA CSH.SIGNED
J.CSH.TMODS .DA CSH.CONST
J.CSH.TMODS2 .DA CSH.SIGNED
.DA CSH.UNSIGNED
.DA CSH.SHORT
J.CSH.TYPES .DA CSH.VOID
@ -534,8 +536,12 @@ CSH.KW >PSTR "if"
>PSTR "sizeof"
>PSTR "typedef"
>PSTR "struct"
CSH.MTYPES >PSTR "const" ALL
>PSTR "signed" char,int,long
.HS 00
*--------------------------------------
* Type Declaration
*--------------------------------------
CSH.TMODS >PSTR "const" ALL
CSH.TMODS2 >PSTR "signed" char,int,long
>PSTR "unsigned" char,int,long
>PSTR "short" int
CSH.TYPES >PSTR "void"
@ -700,6 +706,9 @@ CSH.DataPtr .BS 2
CSH.hStack .BS 1
CSH.StackPtr .BS 1
CSH.hfDecl .BS 1
CSH.fDeclBuf .BS 2
CSH.SaveInclude .BS 2
CSH.SaveDefine .BS 2

View File

@ -534,14 +534,111 @@ CIFS2.ChOwn
sec
rts
*--------------------------------------
CIFS.FOpen
CIFS.FOpen jsr MakeTrans2Reg
ldx #0
CIFS2.FOpen
.1 lda SMB.Open2,x
sta (ZPReqPtr),y
iny
inx
cpx #SMB.Open2.Len
bne .1
lda #MLI.E.BADCALL
phy
ldy #5
lda (pStack),y
sta pPath+1
dey
lda (pStack),y
sta pPath
dey flags
lda (pStack),y
pha
and #O.RDWR
dec
ldy #S.NETBIOS+S.SMB.H+SMB.Trans2.H.Len+9 AccessMode
sta (ZPReqPtr),y
ldy #S.NETBIOS+S.SMB.H+SMB.Trans2.H.Len+19 OpenMode
pla
pha
and #O.CREATE
beq .2
lda #$10
sta (ZPReqPtr),y
.2 pla
and #O.APPEND
beq .3
lda (ZPReqPtr),y
ora #1
sta (ZPReqPtr),y
.3 ply
jsr AppendPath
lda #0
sta (ZPReqPtr),y
iny
jsr SetT2ReqLenYA
pha
>PUSHB MountTable+3 hSocket
>PUSHW ZPReqPtr
pla
>PUSHYA
ldx #LIBTCPIP.Send
jsr GO.LIBTCPIP
bcs .9
jmp Sleep
.9 >RET 6
*--------------------------------------
CIFS2.FOpen jsr ReadSocket
bcs .9
jsr GetRespData
ldy #S.NETBIOS+S.SMB.H.STATUS
lda (ZPRespPtr),y
clc
beq .8
lda #MLI.E.DUPFILE
sec
.8 jsr FreeRespData
stz CIFS.Status
>RET 4
.9 cmp #E.NODATA
bne .99
dec CIFS.Retries
beq .98
lda #0
sec
rts
.98 lda #MLI.E.IO
.99 sec
stz CIFS.Status
>RET 4
*--------------------------------------
CIFS.FClose
CIFS2.FClose

View File

@ -20,13 +20,18 @@ ZPReqPtr .BS 2
ZPReqLen .BS 2
ZPCtxPtr .BS 2
pFD .BS 2
pPath .BS 2
ZPPtr1 .BS 2
ZPPtr2 .BS 2
BufPtr .BS 2
hBuf .BS 1
hResp .BS 1
pPath .BS 2
flags .BS 1
ftype .BS 1
auxtype .BS 2
ZPRespPtr .BS 2
bFlag .BS 1
@ -1032,7 +1037,7 @@ SMB.Open2 .DA 0 TRANS2_OPEN2
.BS 2 PrmCnt
.HS 000000 Padding
.HS 0000 Flags
.BS 2 Access Mode
.BS 2 AccessMode
.HS 0000 Reserved1
.BS 2 FileAttributes
.HS 00000000 CreationTime

View File

@ -11,7 +11,7 @@ LOWERCASE .EQ 1
ACL .EQ 1
LOGO .EQ 1
*--------------------------------------
XRWDBG .EQ 1
XRWDBG .EQ 0
*--------------------------------------
.INB inc/zp.i
.INB inc/io.i

View File

@ -54,7 +54,9 @@ L.CMDS .DA BINSH
.DA BINSHUTDOWN
.DA 0
*--------------------------------------
CS.INIT clc
CS.INIT
*--------------------------------------
CS.QUIT clc
rts
*--------------------------------------
CS.RUN ldy #S.PS.PID
@ -208,9 +210,6 @@ CS.RUN.ERRMSG tax
CS.DOEVENT sec
rts
*--------------------------------------
CS.QUIT clc
rts
*--------------------------------------
CS.END
*--------------------------------------
MSG.CTRLR .AZ "INITD:Entering ROOT mode..."
@ -224,12 +223,6 @@ BINMEM .AZ "${ROOT}bin/mem"
BINPS .AZ "${ROOT}bin/ps"
BINLSOF .AZ "${ROOT}bin/lsof"
BINSHUTDOWN .AZ "${ROOT}bin/shutdown"
*--------------------------------------
MLI.PARAMS .DA #4
.DA #0
.DA 0
.DA #0
.DA 0
*--------------------------------------
.DUMMY
.OR 0

View File

@ -4,52 +4,70 @@ NEW
*--------------------------------------
PrintFYA sty PrintFYA.Next+1
sta PrintFYA.Next+2
pla
sta PrintFYA.99+1
pla
sta PrintFYA.98+1
lda $C011 RDLCBNK2
sta PrintFYA.91+1
lda $C012 RDLCRAM
sta PrintFYA.90+1
lda $C08A RROMBNK1, make sure $D000-$FFFF ROM selected
lda $CFFF get access to $C800-$CFFF internal ROM
PrintFYA.1 stz X.b0Flag
stz X.DigitCount
jsr PrintFYA.Next
beq PrintFYA.90
cmp #'%'
bne .7
.2 jsr PrintFYA.Next
beq PrintFYA.90
cmp #'0'
bne .3
ror X.b0Flag beq -> CS
bra .2
.3 bcc .4
cmp #'9'+1
bcs .4
and #$0f
sta X.DigitCount
bra .2
.4 ldx #PrintFYA.Tbl-PrintFYA.Esc-1
.5 cmp PrintFYA.Esc,x
beq .6
dex
bpl .5
bra PrintFYA.1
.6 txa
asl
tax
jmp (PrintFYA.Tbl,x)
.7 cmp #'\'
bne .8
jsr PrintFYA.Next
beq PrintFYA.90
cmp #'n'
bne .8
lda #$0D
.8 ora #$80
jsr $FDED COUT
bra PrintFYA.1
@ -73,9 +91,12 @@ PrintFYA.99 lda #$ff Self modified RTS LOPrintFYAPrintFYA
*--------------------------------------
PrintFYA.Next lda $ffff
beq .8
inc PrintFYA.Next+1
bne .8
inc PrintFYA.Next+2 Always !=0
.8 rts
*--------------------------------------
PrintFYA.Esc .AS "dDhHS"
@ -96,11 +117,14 @@ PrintFYA.DD plx
stz X.BCDBuffer+2
ldx #16 let's roll 16 bits
sed
.2 asl X.HexBuffer
rol X.HexBuffer+1
php cpy will disturb carry while BCD adc
ldy #0
.3 plp
lda X.BCDBuffer,y
adc X.BCDBuffer,y
sta X.BCDBuffer,y
@ -108,12 +132,15 @@ PrintFYA.DD plx
iny
cpy #3 Last byte of X.BCDBufferBUF?
bne .3
plp
dex
bne .2
cld
ldx #0
ldy #5
.4 lda X.BCDBuffer,x
pha
and #$0F
@ -131,12 +158,16 @@ PrintFYA.DD plx
inx
dey
bpl .4
lda X.DigitCount
beq .5
lda #6
sec
sbc X.DigitCount
.5 tay
.6 lda X.DigitBuffer,y
cmp #"0"
beq .7
@ -144,18 +175,24 @@ PrintFYA.DD plx
sec
ror X.b0Flag
bra .8
.7 cpy #5
beq .8
lda #" "
bit X.b0Flag
bpl .81
lda #"0"
.8 phy
jsr $FDED COUT
ply
.81 iny
cpy #6
bne .6
.9 jmp PrintFYA.1
*--------------------------------------
PrintFYA.HH pla
@ -170,16 +207,20 @@ PrintFYA.S pla
pla
sta .1+1
sta .2+1
.1 lda $ffff
beq .9
tax
ldy #1
.2 lda $ffff,y
ora #$80
jsr $FDED COUT
iny
dex
bne .2
.9 jmp PrintFYA.1
*--------------------------------------
X.HexBuffer .BS 2