FILE/DIR/TIME:Still in Progress

This commit is contained in:
Rémy GIBERT 2016-09-05 08:10:04 +02:00
parent fe5b0ac0bf
commit af6d616a9b
5 changed files with 322 additions and 12 deletions

View File

@ -64,7 +64,11 @@ A2osX.SaveSX .EQ $101 Aux
*--------------------------------------
TmpBuffer256 .EQ $0200 Main
*--------------------------------------
D.STACK.BASE .EQ $0300 $03EF...
* $12 bytes min !!!!
*--------------------------------------
MLICALL.PARAMS .EQ $0300
*--------------------------------------
*D.STACK.BASE .EQ $0300 $03EF...
D.STACK.TOP .EQ $03F0 ...Down to $0300
*--------------------------------------
*** IRQ Handler ***
@ -113,10 +117,6 @@ pLibJmp .EQ $BE13
pDrvJmp .EQ $BE16
pDevJmp .EQ $BE19
*--------------------------------------
* $12 bytes min !!!!
*--------------------------------------
MLICALL.PARAMS .EQ $BEC0
*--------------------------------------
* $BEE0->$BEEF : Public Variables
*--------------------------------------
A2osX.ASCREEN .EQ $BEE0 Active Screen

View File

@ -10,7 +10,7 @@ AUTO 6
* X = SYSfnc.Index
* Y,A = free for Inline param
*--------------------------------------
A2osX.GP.Start jmp (KERNEL.SYSCALL,x)
A2osX.GP.Start jmp A2osX.SYSCALL1
*--------------------------------------
* LIBCALL (AUXLC to AUXLC)
* In:
@ -41,6 +41,15 @@ A2osX.GP.Start jmp (KERNEL.SYSCALL,x)
GO.Reset jsr GO.AUXLC
jmp S.KernelRun
*--------------------------------------
A2osX.SYSCALL1 bit KERNEL.SYSCALL.FLAGS,x
bmi .2
bit RRAMWRAMBNK1
bit RRAMWRAMBNK1
jmp (KERNEL.SYSCALL,x)
.2 bit RRAMWRAMBNK2
bit RRAMWRAMBNK2
jmp (KERNEL.SYSCALL,x)
*--------------------------------------
A2osX.LIBCALL1 pha
phx
tya
@ -121,8 +130,7 @@ A2osX.SaveA .BS 1
A2osX.SaveX .BS 1
A2osX.SaveY .BS 1
*--------------------------------------
BrkHandler sta SETPAGE2
bra *
BrkHandler bra *
*--------------------------------------
IrqHandler bra *
*--------------------------------------
@ -130,7 +138,7 @@ A2osX.GP.End .EQ *
*--------------------------------------
* CONTROL SECTION :
*--------------------------------------
.DO A2osX.GP.End>$BEBF
.DO A2osX.GP.End>$BEDF
ERROR:GP too big
.FIN
*--------------------------------------

View File

@ -151,6 +151,150 @@ KERNEL.SYSCALL .DA S.GetMem $00
.DA 0
.DA 0
*--------------------------------------
KERNEL.SYSCALL.FLAGS
.DA 0 $00
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $10
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $20
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $30
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $40
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $50
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $60
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $70
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $80
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $90
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $A0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $B0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $C0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $D0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $E0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $F0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
.DA 0
MAN
SAVE SYS/KERNEL.S.JMP
LOAD SYS/KERNEL.S

View File

@ -274,6 +274,7 @@ S.ComputeWDAY
* In :
* PULLW = Src PTR To S.TIME
* PULLW = Src PTR To Format String
* PULLW = Dst PTR To PSTR Buf
* %a Abbreviated weekday name : Thu
* %A Full weekday name : Thursday
* %b Abbreviated month name : Aug
@ -290,9 +291,166 @@ S.ComputeWDAY
* %Y Year four digits 2001
* PULLW = Dst PSTR Buffer
*--------------------------------------
S.StrFTime
clc
S.StrFTime >PULLW ZPQuickPtr1
>PULLW ZPQuickPtr2
>PULLW S.StrFTime.addChar+1
ldy #0
.1 iny
lda (ZPQuickPtr2),y
cmp #'%'
beq .2
jsr S.StrFTime.addChar
.10 tya
cmp (ZPQuickPtr2)
bne .1
rts
.2 tya
cmp (ZPQuickPtr2)
beq .8
iny
ldx #S.StrFTime.jmp-S.StrFTime.Table
.3 lda (ZPQuickPtr2),y
cmp S.StrFTime.Table-1,x
beq .4
dex
bne .3
beq .10
.4 lda S.StrFTime.JMPL,x
sta .5+1
lda S.StrFTime.JMPH,x
sta .5+2
phy
.5 jsr $ffff
ply
bra .10
.8 rts
*--------------------------------------
S.StrFTime.A
S.StrFTime.AA
S.StrFTime.B
S.StrFTime.BB
S.StrFTime.D ldy #S.TIME.DAY
bra S.StrFTime.addDecPtr1Y
S.StrFTime.HH ldy #S.TIME.HOUR
bra S.StrFTime.addDecPtr1Y
S.StrFTime.II
S.StrFTime.M ldy #S.TIME.MONTH
bra S.StrFTime.addDecPtr1Y
S.StrFTime.MM ldy #S.TIME.MINUTE
bra S.StrFTime.addDecPtr1Y
S.StrFTime.P
S.StrFTime.SS ldy #S.TIME.SECOND
bra S.StrFTime.addDecPtr1Y
S.StrFTime.W
S.StrFTime.YY ldy #S.TIME.CENTURY
jsr S.StrFTime.addDecPtr1Y
S.StrFTime.Y ldy #S.TIME.YEAR
bra S.StrFTime.addDecPtr1Y
*--------------------------------------
S.StrFTime.addDecPtr1Y
lda (ZPQuickPtr1),y
S.StrFTime.addDecA
pha
lsr
lsr
lsr
lsr
ora #$30
jsr S.StrFTime.addChar
pla
and #$0f
ora #$30
S.StrFTime.addChar
sta $ffff
inc S.StrFTime.addChar+1
bne .1
inc S.StrFTime.addChar+2
.1 rts
*--------------------------------------
S.StrFTime.Table .AS "aAbBdHImMpSwyY"
S.StrFTime.JMPL .HS #S.StrFTime.A
.HS #S.StrFTime.AA
.HS #S.StrFTime.B
.HS #S.StrFTime.BB
.HS #S.StrFTime.D
.HS #S.StrFTime.HH
.HS #S.StrFTime.II
.HS #S.StrFTime.M
.HS #S.StrFTime.MM
.HS #S.StrFTime.P
.HS #S.StrFTime.SS
.HS #S.StrFTime.W
.HS #S.StrFTime.Y
.HS #S.StrFTime.YY
S.StrFTime.JMPH .HS /S.StrFTime.A
.HS /S.StrFTime.AA
.HS /S.StrFTime.B
.HS /S.StrFTime.BB
.HS /S.StrFTime.D
.HS /S.StrFTime.HH
.HS /S.StrFTime.II
.HS /S.StrFTime.M
.HS /S.StrFTime.MM
.HS /S.StrFTime.P
.HS /S.StrFTime.SS
.HS /S.StrFTime.W
.HS /S.StrFTime.Y
.HS /S.StrFTime.YY
*--------------------------------------
S.StrFTime.SDAY >PSTRING "Mon"
>PSTRING "Tue"
>PSTRING "Wed"
>PSTRING "Thu"
>PSTRING "Fri"
>PSTRING "Sat"
>PSTRING "Sun"
S.StrFTime.LDAY >PSTRING "Monday"
>PSTRING "Tuesday"
>PSTRING "Wednesday"
>PSTRING "Thursday"
>PSTRING "Friday"
>PSTRING "Saturday"
>PSTRING "Sunday"
S.StrFTime.SMON >PSTRING "Jan"
>PSTRING "Feb"
>PSTRING "Mar"
>PSTRING "Apr"
>PSTRING "May"
>PSTRING "Jun"
>PSTRING "Jul"
>PSTRING "Aug"
>PSTRING "Sep"
>PSTRING "Oct"
>PSTRING "Nov"
>PSTRING "Dec"
S.StrFTime.LMON >PSTRING "January"
>PSTRING "February"
>PSTRING "March"
>PSTRING "April"
>PSTRING "May"
>PSTRING "June"
>PSTRING "July"
>PSTRING "August"
>PSTRING "September"
>PSTRING "October"
>PSTRING "November"
>PSTRING "December"
*--------------------------------------
* Y = Century
* A = Year (0..99)

View File

@ -61,7 +61,6 @@ A2osX.BE00.END .EQ *
*--------------------------------------
A2osX.D001 .EQ *
.PH $D000
.INB SYS/KERNEL.S.JMP
.INB SYS/KERNEL.S.RUN
.INB SYS/KERNEL.S.STR
.INB SYS/KERNEL.S.CIO
@ -85,6 +84,7 @@ A2osX.D002.END .EQ *
*--------------------------------------
A2osX.E000 .EQ *
.PH $E000
.INB SYS/KERNEL.S.JMP
.INB SYS/KERNEL.S.IRQ
.INB SYS/KERNEL.S.MEM
.INB SYS/KERNEL.S.BIN