Kernel version 0.8 : Migration from LIBSTR/PStrOut to new Kernel Frintf

This commit is contained in:
Rémy GIBERT 2016-10-14 08:23:05 +02:00
parent b9a3c10329
commit f0659a7051
5 changed files with 56 additions and 61 deletions

Binary file not shown.

Binary file not shown.

View File

@ -372,7 +372,7 @@ PRODOS.FT.TXT >PSTRING "TXT"
>PSTRING "ATK"
>PSTRING "SYS"
PRODOS.FT.DFLT >PSTRING "$ "
TIME.Format >PSTRING "%y-%b-%b %H:%M"
TIME.Format >PSTRING "%y-%b-%d %H:%M"
TIME.Buffer .BS 16
HEXDIGIT .AS '0123456789ABCDEF'
hFullPath .BS 1

View File

@ -448,20 +448,20 @@ S.STAT.GID .EQ 6 WORD
S.STAT.INO .EQ 8 QWORD
S.STAT.NLINK .EQ 16 WORD
S.STAT.SIZE .EQ 18 DWORD
S.STAT.ATIME .EQ 22 DWORD
S.STAT.MTIME .EQ 26 DWORD
S.STAT.CTIME .EQ 30 DWORD
S.STAT.BLOCKS .EQ 34 DWORD
S.STAT.BLKSIZE .EQ 38 WORD
S.STAT.PRODOS.TYPE .EQ 40 BYTE
S.STAT.PRODOS.AUXTYPE .EQ 41 WORD
S.STAT.PRODOS.SLOT .EQ 42
S.STAT.PRODOS.DRIVE .EQ 43
S.STAT.PRODOS.DEVSTATUS .EQ 44
S.STAT.PRODOS.DEVCNFLCT .EQ 45
S.STAT.PRODOS.DEVBLOCKS .EQ 46
S.STAT.ATIME .EQ 22 S.TIME
S.STAT.MTIME .EQ 30 S.TIME
S.STAT.CTIME .EQ 38 S.TIME
S.STAT.BLOCKS .EQ 46 DWORD
S.STAT.BLKSIZE .EQ 50 WORD
S.STAT.PRODOS.TYPE .EQ 52 BYTE
S.STAT.PRODOS.AUXTYPE .EQ 53 WORD
S.STAT.PRODOS.SLOT .EQ 55 BYTE
S.STAT.PRODOS.DRIVE .EQ 56 BYTE
S.STAT.PRODOS.DEVSTATUS .EQ 57 BYTE
S.STAT.PRODOS.DEVCNFLCT .EQ 58 BYTE
S.STAT.PRODOS.DEVBLOCKS .EQ 59 BYTE
*
S.STAT .EQ 48
S.STAT .EQ 64
*--------------------------------------
* S.FILE for FOPEN,FREAD......
*--------------------------------------
@ -524,3 +524,4 @@ S.MEMSTAT .EQ 24
*--------------------------------------
MAN
SAVE INC/A2OSX.I

View File

@ -432,39 +432,32 @@ K.READDIRA.GetBuf
>STYA ZPQuickPtr4
.9 rts
*--------------------------------------
K.READDIRA.ADD. lda #1
K.READDIRA.ADD. ldx #1 filename="1."
.HS 2C bit abs
K.READDIRA.ADD..
ldx #2 filename="2.."
txa
jsr K.READDIRA.AddToBuf
lda #'.' filename="1."
jsr K.READDIRA.AddToBuf
.1 jsr K.READDIRA.AddToBuf
dex
bne .1
jsr K.READDIRA.ClrStat
lda #$0F
sta KrnBuf256+S.STAT.PRODOS.TYPE
ldy #$25 total_blocks
lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.BLOCKS
iny
lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.BLOCKS+1
* ldy #$25 total_blocks
* lda (ZPQuickPtr3),y
* sta KrnBuf256+S.STAT.BLOCKS
* iny
* lda (ZPQuickPtr3),y
* sta KrnBuf256+S.STAT.BLOCKS+1
bra K.READDIRA.ADDSTAT
*--------------------------------------
K.READDIRA.ADD..
lda #2
jsr K.READDIRA.AddToBuf
lda #'.' filename="2.."
jsr K.READDIRA.AddToBuf
jsr K.READDIRA.AddToBuf
jsr K.READDIRA.ClrStat
lda #$0F
sta KrnBuf256+S.STAT.PRODOS.TYPE
bra K.READDIRA.ADDSTAT
*--------------------------------------
K.READDIRA.ADDD jsr K.READDIRA.AddFNToBuf
jsr K.READDIRA.ClrStat
@ -478,34 +471,21 @@ K.READDIRA.ADDF jsr K.READDIRA.AddFNToBuf
jsr K.READDIRA.ClrStat
ldy #$10 type
ldx #ADDF.DST-ADDF.SRC
.1 ldy ADDF.SRC-1,x
lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.PRODOS.TYPE
ldy #$13 blocks_used
lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.BLOCKS
iny
lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.BLOCKS+1
ldy ADDF.DST-1,x
sta KrnBuf256,y
dex
bpl .1
iny $15 EOF
lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.SIZE
iny
lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.SIZE+1
iny
lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.SIZE+2
ldy #$1F auxtype
lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.PRODOS.AUXTYPE
iny
lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.PRODOS.AUXTYPE+1
>PUSHWI KrnBuf256+S.STAT.CTIME
lda #$18 creation Date/time
jsr K.READDIRA.ConvertTime
>PUSHWI KrnBuf256+S.STAT.MTIME
lda #$21 mod Date/time
jsr K.READDIRA.ConvertTime
*--------------------------------------
K.READDIRA.AddStat
ldy #S.STAT-1
@ -553,6 +533,20 @@ K.READDIRA.AddToBuf
inc ZPQuickPtr4+1
.8 rts
*--------------------------------------
K.READDIRA.ConvertTime
clc
adc ZPQuickPtr3
tay
lda ZPQuickPtr3+1
adc #0
>PUSHYA
jmp K.PTime2Time
*--------------------------------------
ADDF.SRC .HS 1013141516171f20
ADDF.DST .DA #S.STAT.PRODOS.TYPE,#S.STAT.BLOCKS,#S.STAT.BLOCKS+1
.DA #S.STAT.SIZE,#S.STAT.SIZE+1,#S.STAT.SIZE+2
.DA #S.STAT.PRODOS.AUXTYPE,#S.STAT.PRODOS.AUXTYPE+1
*--------------------------------------
* In :
* A = hDIR
*--------------------------------------