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 "ATK"
>PSTRING "SYS" >PSTRING "SYS"
PRODOS.FT.DFLT >PSTRING "$ " PRODOS.FT.DFLT >PSTRING "$ "
TIME.Format >PSTRING "%y-%b-%b %H:%M" TIME.Format >PSTRING "%y-%b-%d %H:%M"
TIME.Buffer .BS 16 TIME.Buffer .BS 16
HEXDIGIT .AS '0123456789ABCDEF' HEXDIGIT .AS '0123456789ABCDEF'
hFullPath .BS 1 hFullPath .BS 1

View File

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

View File

@ -432,36 +432,29 @@ K.READDIRA.GetBuf
>STYA ZPQuickPtr4 >STYA ZPQuickPtr4
.9 rts .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 jsr K.READDIRA.AddToBuf
lda #'.' filename="1." lda #'.' filename="1."
jsr K.READDIRA.AddToBuf
.1 jsr K.READDIRA.AddToBuf
dex
bne .1
jsr K.READDIRA.ClrStat jsr K.READDIRA.ClrStat
lda #$0F lda #$0F
sta KrnBuf256+S.STAT.PRODOS.TYPE 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.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 bra K.READDIRA.ADDSTAT
*-------------------------------------- *--------------------------------------
@ -478,34 +471,21 @@ K.READDIRA.ADDF jsr K.READDIRA.AddFNToBuf
jsr K.READDIRA.ClrStat jsr K.READDIRA.ClrStat
ldy #$10 type ldx #ADDF.DST-ADDF.SRC
.1 ldy ADDF.SRC-1,x
lda (ZPQuickPtr3),y lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.PRODOS.TYPE ldy ADDF.DST-1,x
sta KrnBuf256,y
dex
bpl .1
ldy #$13 blocks_used >PUSHWI KrnBuf256+S.STAT.CTIME
lda (ZPQuickPtr3),y lda #$18 creation Date/time
sta KrnBuf256+S.STAT.BLOCKS jsr K.READDIRA.ConvertTime
iny
lda (ZPQuickPtr3),y
sta KrnBuf256+S.STAT.BLOCKS+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.MTIME
lda #$21 mod Date/time
jsr K.READDIRA.ConvertTime
*-------------------------------------- *--------------------------------------
K.READDIRA.AddStat K.READDIRA.AddStat
ldy #S.STAT-1 ldy #S.STAT-1
@ -553,6 +533,20 @@ K.READDIRA.AddToBuf
inc ZPQuickPtr4+1 inc ZPQuickPtr4+1
.8 rts .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 : * In :
* A = hDIR * A = hDIR
*-------------------------------------- *--------------------------------------