Kernel version 0.8 : Migrating CMDs to new CIO/DIR/TIME API

This commit is contained in:
Rémy GIBERT 2016-10-14 17:39:49 +02:00
parent f0659a7051
commit 9e7cf31491
8 changed files with 115 additions and 122 deletions

Binary file not shown.

Binary file not shown.

View File

@ -39,7 +39,8 @@ L.MSG.FILE .DA MSG.FILE
L.PRODOS.FT.TXT .DA PRODOS.FT.TXT L.PRODOS.FT.TXT .DA PRODOS.FT.TXT
L.STAT .DA STAT L.STAT .DA STAT
L.TIME.Format .DA TIME.Format L.TIME.Format .DA TIME.Format
L.TIME.Buffer .DA TIME.Buffer L.TIME.Create .DA TIME.Create
L.TIME.Mod .DA TIME.Mod
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
CS.INIT >SYSCALL SYS.GetArgC CS.INIT >SYSCALL SYS.GetArgC
@ -218,36 +219,14 @@ CS.RUN.DEV ldy #S.STAT.PRODOS.DEVBLOCKS+1
>SYSCALL SYS.PrintFYA >SYSCALL SYS.PrintFYA
rts rts
*-------------------------------------- *--------------------------------------
CS.RUN.DIR >PUSHW ZPPtr1 CS.RUN.DIR jsr CS.RUN.PUSHDATES
>PUSHW ZPPtr1
>LDYA L.MSG.DIR >LDYA L.MSG.DIR
>SYSCALL SYS.PrintFYA >SYSCALL SYS.PrintFYA
rts rts
*-------------------------------------- *--------------------------------------
CS.RUN.FILE >PUSHW L.TIME.Buffer CS.RUN.FILE jsr CS.RUN.PUSHDATES
>PUSHW L.TIME.Format
lda ZPPtr2
clc
adc #S.STAT.MTIME
tay
lda ZPPtr2+1
adc #0
>PUSHYA
>SYSCALL SYS.PStrFTime
>PUSHW L.TIME.Buffer ModTime
>PUSHW L.TIME.Buffer
>PUSHW L.TIME.Format
lda ZPPtr2
clc
adc #S.STAT.CTIME
tay
lda ZPPtr2+1
adc #0
>PUSHYA
>SYSCALL SYS.PStrFTime
>PUSHW L.TIME.Buffer Create Time
lda ZPPtr2 lda ZPPtr2
clc clc
@ -274,6 +253,33 @@ CS.RUN.FILE >PUSHW L.TIME.Buffer
>SYSCALL SYS.PrintFYA >SYSCALL SYS.PrintFYA
rts rts
*-------------------------------------- *--------------------------------------
CS.RUN.PUSHDATES
>PUSHW L.TIME.Mod
>PUSHW L.TIME.Format
lda ZPPtr2
clc
adc #S.STAT.MTIME
tay
lda ZPPtr2+1
adc #0
>PUSHYA
>SYSCALL SYS.PStrFTime
>PUSHW L.TIME.Create
>PUSHW L.TIME.Format
lda ZPPtr2
clc
adc #S.STAT.CTIME
tay
lda ZPPtr2+1
adc #0
>PUSHYA
>SYSCALL SYS.PStrFTime
>PUSHW L.TIME.Mod ModTime
>PUSHW L.TIME.Create Create Time
rts
*--------------------------------------
CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device? CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
lda (pEvent),y lda (pEvent),y
ldy #S.PS.hINDEV ldy #S.PS.hINDEV
@ -360,7 +366,7 @@ FileType2PSTR ldy #0
*-------------------------------------- *--------------------------------------
CS.END CS.END
MSG.DEV >CSTRING "%15S S%d,D%d Blocks Used:%5D,Total:%5D\n" MSG.DEV >CSTRING "%15S S%d,D%d Blocks Used:%5D,Total:%5D\n"
MSG.DIR >CSTRING "/%15S <dir>\n" MSG.DIR >CSTRING "/%15S <dir> %S %S\n"
MSG.FILE >CSTRING "%15S %S $%H %10u %S %S\n" MSG.FILE >CSTRING "%15S %S $%H %10u %S %S\n"
*-------------------------------------- *--------------------------------------
PRODOS.FT.HEX .HS 0406FAFCFDE2FF PRODOS.FT.HEX .HS 0406FAFCFDE2FF
@ -372,8 +378,9 @@ PRODOS.FT.TXT >PSTRING "TXT"
>PSTRING "ATK" >PSTRING "ATK"
>PSTRING "SYS" >PSTRING "SYS"
PRODOS.FT.DFLT >PSTRING "$ " PRODOS.FT.DFLT >PSTRING "$ "
TIME.Format >PSTRING "%y-%b-%d %H:%M" TIME.Format >PSTRING "%d-%b-%Y %H:%M"
TIME.Buffer .BS 16 TIME.Create .BS 20
TIME.Mod .BS 20
HEXDIGIT .AS '0123456789ABCDEF' HEXDIGIT .AS '0123456789ABCDEF'
hFullPath .BS 1 hFullPath .BS 1
STAT .BS S.STAT STAT .BS S.STAT

View File

@ -36,7 +36,6 @@ CS.START cld
.DA CS.RUN .DA CS.RUN
.DA CS.DOEVENT .DA CS.DOEVENT
.DA CS.QUIT .DA CS.QUIT
L.LIBSTR .DA LIBSTR
L.MSG0 .DA MSG0 L.MSG0 .DA MSG0
L.MSG1 .DA MSG1 L.MSG1 .DA MSG1
L.MSG2 .DA MSG2 L.MSG2 .DA MSG2
@ -46,12 +45,7 @@ L.MSG5 .DA MSG5
L.MSG6 .DA MSG6 L.MSG6 .DA MSG6
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
CS.INIT >LDYA L.LIBSTR CS.INIT ldy #MEM.COUNT Skip SLOT0
>SYSCALL SYS.LoadLibYA
bcs .9
sta hLIBSTR
ldy #MEM.COUNT Skip SLOT0
lda (pData),y lda (pData),y
inc inc
sta (pData),y sta (pData),y
@ -79,8 +73,8 @@ CS.RUN ldy #bCANCEL
lda (pData),y lda (pData),y
bne .1 bne .1
>PUSHW L.MSG0 >LDYA L.MSG0
>LIBCALL hLIBSTR,LIBSTR.PRINTF >SYSCALL SYS.PrintFYA
.1 ldy #MEM.COUNT .1 ldy #MEM.COUNT
lda (pData),y lda (pData),y
@ -129,20 +123,20 @@ CS.RUN ldy #bCANCEL
>PUSHB (pData),y >PUSHB (pData),y
ldy #USED.COUNT ldy #USED.COUNT
>PUSHB (pData),y >PUSHB (pData),y
>PUSHW L.MSG2 >LDYA L.MSG2
>LIBCALL hLIBSTR,LIBSTR.PRINTF >SYSCALL SYS.PrintFYA
>PUSHW MemMgr.HiMem >PUSHW MemMgr.HiMem
>PUSHW L.MSG3 >LDYA L.MSG3
>LIBCALL hLIBSTR,LIBSTR.PRINTF >SYSCALL SYS.PrintFYA
>PUSHW MemMgr.Free >PUSHW MemMgr.Free
>PUSHW L.MSG4 >LDYA L.MSG4
>LIBCALL hLIBSTR,LIBSTR.PRINTF >SYSCALL SYS.PrintFYA
>PUSHW MemMgr.LoMem >PUSHW MemMgr.LoMem
>PUSHW L.MSG5 >LDYA L.MSG5
>LIBCALL hLIBSTR,LIBSTR.PRINTF >SYSCALL SYS.PrintFYA
lda MemMgr.Free lda MemMgr.Free
sec sec
@ -152,8 +146,8 @@ CS.RUN ldy #bCANCEL
sbc MemMgr.LoMem+1 sbc MemMgr.LoMem+1
>PUSHYA >PUSHYA
>PUSHW L.MSG6 >LDYA L.MSG6
>LIBCALL hLIBSTR,LIBSTR.PRINTF >SYSCALL SYS.PrintFYA
sec sec
rts rts
*-------------------------------------- *--------------------------------------
@ -188,8 +182,8 @@ CS.RUN.PRINTMEM ldy #S.MEM.LEN
lda (pData),y lda (pData),y
>PUSHA >PUSHA
>PUSHW L.MSG1 >LDYA L.MSG1
>LIBCALL hLIBSTR,LIBSTR.PRINTF >SYSCALL SYS.PrintFYA
ldy #S.MEM.BIN ldy #S.MEM.BIN
lda (ZPPTR1),y lda (ZPPTR1),y
@ -300,13 +294,10 @@ CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
.9 sec .9 sec
rts rts
*-------------------------------------- *--------------------------------------
CS.QUIT lda hLIBSTR CS.QUIT clc
>SYSCALL SYS.UnloadLibA
clc
rts rts
*-------------------------------------- *--------------------------------------
CS.END CS.END
LIBSTR >PSTRING "libstr.o"
MSG0 >CSTRING "hMem Flags PID REF PTR LEN BINPATH/DATA\n" MSG0 >CSTRING "hMem Flags PID REF PTR LEN BINPATH/DATA\n"
MSG1 >CSTRING " %03d %b %03d %03d $%H %05D " MSG1 >CSTRING " %03d %b %03d %03d $%H %05D "
MSG2 >CSTRING "\nAllocated hMem:%d, Total:%d\n" MSG2 >CSTRING "\nAllocated hMem:%d, Total:%d\n"
@ -314,7 +305,6 @@ MSG3 >CSTRING "High Memory: $%H\n"
MSG4 >CSTRING "Free ULimit: $%H\n" MSG4 >CSTRING "Free ULimit: $%H\n"
MSG5 >CSTRING "Low Memory: $%H\n" MSG5 >CSTRING "Low Memory: $%H\n"
MSG6 >CSTRING "\nFree Memory: %D Bytes.\n" MSG6 >CSTRING "\nFree Memory: %D Bytes.\n"
hLIBSTR .BS 1
*-------------------------------------- *--------------------------------------
.DUMMY .DUMMY
.OR 0 .OR 0

View File

@ -451,13 +451,13 @@ DEC2HEX stz HEXBUF
rol HEXBUF+1 rol HEXBUF+1
rol HEXBUF+2 rol HEXBUF+2
rol HEXBUF+3 rol HEXBUF+3
bcs .9 overflow!!! * bcs .9 overflow!!!
asl HEXBUF HEXBUF * 4 -> HEXBUF asl HEXBUF HEXBUF * 4 -> HEXBUF
rol HEXBUF+1 rol HEXBUF+1
rol HEXBUF+2 rol HEXBUF+2
rol HEXBUF+3 rol HEXBUF+3
bcs .9 overflow!!! * bcs .9 overflow!!!
pla HEXBUF * 4 + HEXBUF -> HEXBUF pla HEXBUF * 4 + HEXBUF -> HEXBUF
adc HEXBUF adc HEXBUF
@ -471,13 +471,13 @@ DEC2HEX stz HEXBUF
pla pla
adc HEXBUF+3 adc HEXBUF+3
sta HEXBUF+3 sta HEXBUF+3
bcs .99 overflow!!! * bcs .99 overflow!!!
asl HEXBUF HEXBUF * 10 -> HEXBUF asl HEXBUF HEXBUF * 10 -> HEXBUF
rol HEXBUF+1 rol HEXBUF+1
rol HEXBUF+2 rol HEXBUF+2
rol HEXBUF+3 rol HEXBUF+3
bcs .99 overflow!!! * bcs .99 overflow!!!
inx inx
lda ASCBUF,x lda ASCBUF,x
@ -496,11 +496,11 @@ DEC2HEX stz HEXBUF
bne .1 bne .1
rts rts
.9 pla discard saved HEXBUF *.9 pla discard saved HEXBUF
pla * pla
pla * pla
pla * pla
.99 rts *.99 rts
*-------------------------------------- *--------------------------------------
*ACCESS .AS "drwxrwxrwx" *ACCESS .AS "drwxrwxrwx"
HEXBUF .BS 4 32 bits max HEXBUF .BS 4 32 bits max

View File

@ -22,7 +22,7 @@ K.OPENDIRYA jsr PFT.CheckPathYA
bcs .9 bcs .9
>STYA ZPQuickPtr1 >STYA ZPQuickPtr1
stx K.OPENDIRYA.hDIR stx K.READDIRA.hDir
lda (ZPQuickPtr2) lda (ZPQuickPtr2)
cmp #1 One char ? cmp #1 One char ?
@ -59,7 +59,7 @@ K.OPENDIRYA jsr PFT.CheckPathYA
ldy #S.DIR.PRODOS.REF ldy #S.DIR.PRODOS.REF
sta (ZPQuickPtr1),y sta (ZPQuickPtr1),y
.8 lda K.OPENDIRYA.hDIR .8 lda K.READDIRA.hDir
clc clc
rts rts
@ -69,24 +69,25 @@ K.OPENDIRYA jsr PFT.CheckPathYA
sec sec
.99 rts .99 rts
*-------------------------------------- *--------------------------------------
K.OPENDIRYA.hDIR .BS 1
*--------------------------------------
* In : * In :
* A = hDIR * A = hDIR
* Out : * Out :
* CC : X = hDIREND, Y,A = PTR to S.DIRENT * CC : X = hDIREND, Y,A = PTR to S.DIRENT
* CS : A = EC, A = 0 : no more entry * CS : A = EC, A = 0 : no more entry
*-------------------------------------- *--------------------------------------
K.READDIRA.hDir .BS 1
K.READDIRA.hMem .BS 1 K.READDIRA.hMem .BS 1
K.READDIRA.hDIRENT .BS 1 K.READDIRA.hDIRENT .BS 1
K.READDIRA.BufSize .BS 2 K.READDIRA.BufSize .BS 2
K.READDIRA.EL .BS 1
K.READDIRA.EBP .BS 1
K.READDIRA.EC .BS 2
K.READDIRA.ECIB .BS 1 K.READDIRA.ECIB .BS 1
K.READDIRA.EC2Return .BS 1 K.READDIRA.EC2Return .BS 1
*--S.DIR Cache ------------------------
K.READDIRA.EL .BS 1
K.READDIRA.EPB .BS 1
K.READDIRA.EC .BS 2
*-------------------------------------- *--------------------------------------
K.READDIRA jsr PFT.CheckDirA K.READDIRA jsr PFT.CheckDirA
sta K.READDIRA.hDir
jsr K.GetMemPtrA jsr K.GetMemPtrA
>STYA ZPQuickPtr1 >STYA ZPQuickPtr1
@ -227,9 +228,7 @@ K.READDIRA.ROOT stz MLICALL.PARAMS+1 All Volumes
tax tax
jmp K.GetMemPtrA jmp K.GetMemPtrA
*-------------------------------------- *--------------------------------------
K.READDIRA.DIR ldy #S.DIR.PRODOS.REF K.READDIRA.DIR sta MLICALL.PARAMS+1 A=#S.DIR.PRODOS.REF
lda (ZPQuickPtr1),y
sta MLICALL.PARAMS+1
>PUSHWI 512 Get a 512 bytes buffer for reading dir... >PUSHWI 512 Get a 512 bytes buffer for reading dir...
>PUSHBI 0 >PUSHBI 0
@ -284,12 +283,12 @@ K.READDIRA.DIR ldy #S.DIR.PRODOS.REF
bpl .3 bpl .3
.4 ldx K.READDIRA.EC .4 ldx K.READDIRA.EC
cpx K.READDIRA.EBP cpx K.READDIRA.EPB
lda K.READDIRA.EC+1 lda K.READDIRA.EC+1
sbc #0 sbc #0
bcc .5 We have less than EPB to read bcc .5 We have less than EPB to read
ldx K.READDIRA.EBP ldx K.READDIRA.EPB
.5 stx K.READDIRA.ECIB .5 stx K.READDIRA.ECIB
stz K.READDIRA.EC2Return stz K.READDIRA.EC2Return
@ -341,15 +340,17 @@ K.READDIRA.DIR1 lda (ZPQuickPtr2) X = EntryCount In This Block
.8 dex .8 dex
bne K.READDIRA.DIR1 bne K.READDIRA.DIR1
* pass #2 Fill Buffer... * pass #2 Fill Buffer...(ZPQuickPtr1 & Ptr2 can now be trashed)
K.READDIRA.DIR2 jsr K.READDIRA.GetBuf K.READDIRA.DIR2 jsr K.READDIRA.GetBuf
bcs .98 bcs .98
ldy #S.DIR.PRODOS.EL Check if first run.... * ldy #S.DIR.PRODOS.EL Check if first run....
lda (ZPQuickPtr1),y * lda (ZPQuickPtr1),y
bne .73 * bne .73
.71 lda (ZPQuickPtr3)
beq .78 Empty slot, skip
lda (ZPQuickPtr3)
and #$F0 and #$F0
cmp #$F0 Vol Header ? cmp #$F0 Vol Header ?
bne .72 bne .72
@ -362,20 +363,20 @@ K.READDIRA.DIR2 jsr K.READDIRA.GetBuf
jsr K.READDIRA.ADD.. jsr K.READDIRA.ADD..
bra .78 bra .78
.73 lda K.READDIRA.EC .73 lda K.READDIRA.EC Regular FILE/DIR
sec sec
sbc #1 sbc #1
sta K.READDIRA.EC sta K.READDIRA.EC
bcs .74
lda K.READDIRA.EC+1 lda K.READDIRA.EC+1
sbc #0 sbc #0
sta K.READDIRA.EC+1 CC, we reached $ffff sta K.READDIRA.EC+1 CC, we reached $ffff
bcc .80 no more file to list... bcc .80 no more file to list...
.74 lda (ZPQuickPtr3) jsr K.READDIRA.AddFNToBuf
beq .78 jsr K.READDIRA.ClrStat
lda (ZPQuickPtr3)
and #$F0 and #$F0
cmp #$D0 Directory ? cmp #$D0 Directory ?
bne .75 bne .75
@ -392,12 +393,16 @@ K.READDIRA.DIR2 jsr K.READDIRA.GetBuf
inc ZPQuickPtr3+1 inc ZPQuickPtr3+1
.79 dec K.READDIRA.ECIB .79 dec K.READDIRA.ECIB
bne .72 bne .71
.80 .80
* lda #0 S.MEM.F.INIT0 already did this * lda #0 S.MEM.F.INIT0 already did this
* sta (ZPQuickPtr4) Ending 0 * sta (ZPQuickPtr4) Ending 0
lda K.READDIRA.hDir Restore ZPQuickPtr1 trashed by STR API calls
jsr K.GetMemPtrA
>STYA ZPQuickPtr1
ldx #3 ldx #3
ldy #S.DIR.PRODOS.EL+3 ldy #S.DIR.PRODOS.EL+3
@ -437,41 +442,28 @@ K.READDIRA.ADD. ldx #1 filename="1."
K.READDIRA.ADD.. K.READDIRA.ADD..
ldx #2 filename="2.." ldx #2 filename="2.."
txa txa
jsr K.READDIRA.AddToBuf jsr K.READDIRA.AddToBuf Add LEN
lda #'.' filename="1." lda #'.'
.1 jsr K.READDIRA.AddToBuf .1 jsr K.READDIRA.AddToBuf Add X dot(s)
dex dex
bne .1 bne .1
jsr K.READDIRA.ClrStat jsr K.READDIRA.ClrStat
lda #$0F
sta KrnBuf256+S.STAT.PRODOS.TYPE
* ldy #$25 total_blocks * ldy #$25 total_blocks
* lda (ZPQuickPtr3),y * lda (ZPQuickPtr3),y
* sta KrnBuf256+S.STAT.BLOCKS * sta KrnBuf256+S.STAT.BLOCKS
* iny * iny
* lda (ZPQuickPtr3),y * lda (ZPQuickPtr3),y
* sta KrnBuf256+S.STAT.BLOCKS+1 * sta KrnBuf256+S.STAT.BLOCKS+1
bra K.READDIRA.ADDSTAT
*-------------------------------------- *--------------------------------------
K.READDIRA.ADDD jsr K.READDIRA.AddFNToBuf K.READDIRA.ADDD lda #$0F
jsr K.READDIRA.ClrStat
lda #$0F
sta KrnBuf256+S.STAT.PRODOS.TYPE sta KrnBuf256+S.STAT.PRODOS.TYPE
bra K.READDIRA.ADDSTAT bra K.READDIRA.ADDSTAT
*-------------------------------------- *--------------------------------------
K.READDIRA.ADDF jsr K.READDIRA.AddFNToBuf K.READDIRA.ADDF ldx #ADDF.DST-ADDF.SRC
jsr K.READDIRA.ClrStat
ldx #ADDF.DST-ADDF.SRC
.1 ldy ADDF.SRC-1,x .1 ldy ADDF.SRC-1,x
lda (ZPQuickPtr3),y lda (ZPQuickPtr3),y
ldy ADDF.DST-1,x ldy ADDF.DST-1,x
@ -540,7 +532,7 @@ K.READDIRA.ConvertTime
lda ZPQuickPtr3+1 lda ZPQuickPtr3+1
adc #0 adc #0
>PUSHYA >PUSHYA
jmp K.PTime2Time jmp K.PTime2Time Will destroy Ptr1 & Ptr2 !!!!
*-------------------------------------- *--------------------------------------
ADDF.SRC .HS 1013141516171f20 ADDF.SRC .HS 1013141516171f20
ADDF.DST .DA #S.STAT.PRODOS.TYPE,#S.STAT.BLOCKS,#S.STAT.BLOCKS+1 ADDF.DST .DA #S.STAT.PRODOS.TYPE,#S.STAT.BLOCKS,#S.STAT.BLOCKS+1
@ -551,7 +543,7 @@ ADDF.DST .DA #S.STAT.PRODOS.TYPE,#S.STAT.BLOCKS,#S.STAT.BLOCKS+1
* A = hDIR * A = hDIR
*-------------------------------------- *--------------------------------------
K.CLOSEDIRA jsr PFT.CheckDirA K.CLOSEDIRA jsr PFT.CheckDirA
sta K.OPENDIRYA.hDIR sta K.READDIRA.hDir
jsr K.GetMemPtrA jsr K.GetMemPtrA
>STYA ZPQuickPtr1 >STYA ZPQuickPtr1
@ -566,7 +558,7 @@ K.CLOSEDIRA.1 ldy #S.DIR.PRODOS.REF
beq .2 beq .2
jsr K.FreeMemA jsr K.FreeMemA
.2 lda K.OPENDIRYA.hDIR .2 ldaK.READDIRA.hDir
jsr K.FreeMemA jsr K.FreeMemA
clc clc
rts rts

View File

@ -298,26 +298,26 @@ K.PStrFTime.JMPH .DA /K.PStrFTime.A
.DA /K.PStrFTime.Y .DA /K.PStrFTime.Y
.DA /K.PStrFTime.YY .DA /K.PStrFTime.YY
*-------------------------------------- *--------------------------------------
K.PStrFTime.A ldx #3 Max Len K.PStrFTime.A ldx #3 Short day of week, 3 chars...
.HS 2C Bit abs .HS 2C Bit abs
K.PStrFTime.AA ldx #15 K.PStrFTime.AA ldx #15 full DoW
>LDYAI K.PStrFTime.DAY >LDYAI K.PStrFTime.DAY
>STYA ZPQuickPtr4 >STYA ZPQuickPtr4
ldy #S.Time.WDAY ldy #S.Time.WDAY
bra K.PStrFTime.STR bra K.PStrFTime.STR
K.PStrFTime.B ldx #3 K.PStrFTime.B ldx #3 Short Month, 3 chars....
.HS 2C Bit abs .HS 2C Bit abs
K.PStrFTime.BB ldx #15 K.PStrFTime.BB ldx #15 full Month....
>LDYAI K.PStrFTime.MON >LDYAI K.PStrFTime.MON
>STYA ZPQuickPtr4 >STYA ZPQuickPtr4
ldy #S.Time.MONTH ldy #S.Time.MONTH
K.PStrFTime.STR lda (ZPQuickPtr1),y get required S.Time field value K.PStrFTime.STR lda (ZPQuickPtr1),y get required S.Time field value
tay tay
beq .8 Illegal value beq .9 Illegal value
.1 dey range 0..x .1 dey range 0..x
beq .2 beq .2
@ -342,9 +342,11 @@ K.PStrFTime.STR lda (ZPQuickPtr1),y get required S.Time field value
tay tay
dex dex
bne .3 bne .3
.8 rts .8 rts
.9 lda #'?'
jmp K.PStrFTime.addChar
K.PStrFTime.D ldy #S.Time.DAY K.PStrFTime.D ldy #S.Time.DAY
bra K.PStrFTime.addDecPtr1Y bra K.PStrFTime.addDecPtr1Y
K.PStrFTime.HH ldy #S.Time.HOUR K.PStrFTime.HH ldy #S.Time.HOUR
@ -382,6 +384,7 @@ K.PStrFTime.addDecPtr1Y
K.PStrFTime.addDecA K.PStrFTime.addDecA
sta K.PStrFTime.BIN sta K.PStrFTime.BIN
stz K.PStrFTime.DEC stz K.PStrFTime.DEC
sed sed
ldx #8 ldx #8
@ -393,17 +396,18 @@ K.PStrFTime.addDecA
dex dex
bne .1 bne .1
cld cld
* lda K.PStrFTime.DEC already in A * lda K.PStrFTime.DEC already in A
pha
lsr lsr
lsr lsr
lsr lsr
lsr lsr
ora #$30 ora #$30
jsr K.PStrFTime.addChar jsr K.PStrFTime.addChar
lda K.PStrFTime.DEC pla
and #$0f and #$0f
ora #$30 ora #$30
*-------------------------------------- *--------------------------------------

View File

@ -14,9 +14,9 @@ DAY0 .EQ 4 day 0 was a thursday
*-------------------------------------- *--------------------------------------
* K.TimeYA get System Time * K.TimeYA get System Time
* In : * In :
* Y,A = PTR to K.Time * Y,A = PTR to S.TIME
* Out : * Out :
* K.Time filled with ProDOS MLI date/time * S.TIME filled with System date/time
*-------------------------------------- *--------------------------------------
K.TimeYA >STYA ZPQuickPtr2 K.TimeYA >STYA ZPQuickPtr2
>MLICALL MLIGETTIME >MLICALL MLIGETTIME
@ -26,7 +26,7 @@ K.TimeYA >STYA ZPQuickPtr2
*-------------------------------------- *--------------------------------------
* In : * In :
* PULLW = Src PDATE/TIME (DWORD) * PULLW = Src PDATE/TIME (DWORD)
* PULLW = Dst PTR To K.Time * PULLW = Dst PTR To S.TIME
*-------------------------------------- *--------------------------------------
K.PTime2Time >PULLW ZPQuickPtr1 K.PTime2Time >PULLW ZPQuickPtr1
>PULLW ZPQuickPtr2 >PULLW ZPQuickPtr2
@ -163,7 +163,7 @@ K.ComputeWDAY lda #3 Thursday : 4 (-1 for mod 7)
* K.CTime2Time * K.CTime2Time
* In : * In :
* PULLW = Src CTIME DWORD * PULLW = Src CTIME DWORD
* PULLW = Dst PTR To K.Time * PULLW = Dst PTR To S.TIME
*-------------------------------------- *--------------------------------------
K.CTime2Time >PULLW ZPQuickPtr1 K.CTime2Time >PULLW ZPQuickPtr1
>PULLW ZPQuickPtr2 >PULLW ZPQuickPtr2