mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-16 15:29:38 +00:00
KERNEL 0.94-2:Fixes for DIRENT api
This commit is contained in:
parent
30d8231517
commit
b25303e93a
Binary file not shown.
Binary file not shown.
|
@ -22,18 +22,14 @@ GFX.Close >LDA.G hDevGFX
|
||||||
GFX.TEXT ldy #S.PS.hStdIn
|
GFX.TEXT ldy #S.PS.hStdIn
|
||||||
lda (pPS),y
|
lda (pPS),y
|
||||||
|
|
||||||
bit #1
|
tax
|
||||||
bne GFX.IOCTL
|
lda hFDs-1,x
|
||||||
|
bra GFX.IOCTL
|
||||||
|
|
||||||
GFX.TEXT.RTS clc
|
GFX.TEXT.RTS clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
GFX.GR ldy #S.PS.hStdIn
|
GFX.GR >LDA.G hDevGFX
|
||||||
lda (pPS),y
|
|
||||||
bit #1
|
|
||||||
beq GFX.TEXT.RTS
|
|
||||||
|
|
||||||
>LDA.G hDevGFX
|
|
||||||
beq GFX.TEXT.RTS
|
beq GFX.TEXT.RTS
|
||||||
|
|
||||||
GFX.IOCTL >PUSHA
|
GFX.IOCTL >PUSHA
|
||||||
|
|
38
BIN/LC.S.txt
38
BIN/LC.S.txt
|
@ -25,8 +25,10 @@ ZPFileStat .BS 2
|
||||||
ZPFullPath .BS 2
|
ZPFullPath .BS 2
|
||||||
ZPNewPath .BS 2
|
ZPNewPath .BS 2
|
||||||
|
|
||||||
ZPLineBuf .BS 2
|
hSrcFullPath .BS 1
|
||||||
|
hSrcNewPath .BS 1
|
||||||
|
|
||||||
|
ArgIndex .BS 1
|
||||||
bPause .BS 1
|
bPause .BS 1
|
||||||
|
|
||||||
bContinue .BS 1
|
bContinue .BS 1
|
||||||
|
@ -63,13 +65,16 @@ L.MSG.ERR .DA MSG.ERR
|
||||||
CS.INIT clc
|
CS.INIT clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN >INC.G ArgIndex
|
CS.RUN inc ArgIndex
|
||||||
|
lda ArgIndex
|
||||||
>SYSCALL ArgV
|
>SYSCALL ArgV
|
||||||
bcs .5
|
bcs .5
|
||||||
|
|
||||||
>STYA ZPPtr1
|
>STYA ZPPtr1
|
||||||
lda (ZPPtr1)
|
lda (ZPPtr1)
|
||||||
cmp #'-'
|
cmp #'-'
|
||||||
bne .4
|
bne .4
|
||||||
|
|
||||||
jsr CS.RUN.CheckOpt
|
jsr CS.RUN.CheckOpt
|
||||||
bcc CS.RUN
|
bcc CS.RUN
|
||||||
|
|
||||||
|
@ -82,6 +87,7 @@ CS.RUN >INC.G ArgIndex
|
||||||
|
|
||||||
.4 >LDA.G hSrcBasePath
|
.4 >LDA.G hSrcBasePath
|
||||||
bne .9
|
bne .9
|
||||||
|
|
||||||
>LDYA ZPPtr1
|
>LDYA ZPPtr1
|
||||||
jsr InitSrcDirYA
|
jsr InitSrcDirYA
|
||||||
bcc CS.RUN
|
bcc CS.RUN
|
||||||
|
@ -91,16 +97,14 @@ CS.RUN >INC.G ArgIndex
|
||||||
>SYSCALL GetMem
|
>SYSCALL GetMem
|
||||||
bcs .99
|
bcs .99
|
||||||
>STYA ZPFullPath
|
>STYA ZPFullPath
|
||||||
txa
|
stx hSrcFullPath
|
||||||
>STA.G hSrcFullPath
|
|
||||||
|
|
||||||
>LDYAI 256
|
>LDYAI 256
|
||||||
>SYSCALL GetMem
|
>SYSCALL GetMem
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
>STYA ZPNewPath
|
>STYA ZPNewPath
|
||||||
txa
|
stx hSrcNewPath
|
||||||
>STA.G hSrcNewPath
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.LOOP ldy #S.PS.hStdIn
|
CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||||
lda (pPS),y
|
lda (pPS),y
|
||||||
|
@ -282,16 +286,14 @@ CS.QUIT jsr LeaveSubDir
|
||||||
bcc CS.QUIT
|
bcc CS.QUIT
|
||||||
|
|
||||||
>LDA.G hFilter
|
>LDA.G hFilter
|
||||||
beq .1
|
jsr .7
|
||||||
|
|
||||||
>SYSCALL FreeMem
|
lda hSrcFullPath
|
||||||
.1 >LDA.G hSrcFullPath
|
jsr .7
|
||||||
beq .2
|
|
||||||
|
|
||||||
>SYSCALL FreeMem
|
lda hSrcNewPath
|
||||||
|
|
||||||
.2 >LDA.G hSrcNewPath
|
.7 beq .8
|
||||||
beq .8
|
|
||||||
|
|
||||||
>SYSCALL FreeMem
|
>SYSCALL FreeMem
|
||||||
|
|
||||||
|
@ -335,15 +337,7 @@ MSG.FILE .AZ "File:%s..."
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.DUMMY
|
.DUMMY
|
||||||
.OR 0
|
.OR 0
|
||||||
DS.START
|
DS.START .INB usr/src/shared/x.fileenum.g
|
||||||
ArgIndex .BS 1
|
|
||||||
|
|
||||||
hSrcFullPath .BS 1
|
|
||||||
hSrcNewPath .BS 1
|
|
||||||
hFile .BS 1
|
|
||||||
hMem .BS 1
|
|
||||||
|
|
||||||
.INB usr/src/shared/x.fileenum.g
|
|
||||||
DS.END .ED
|
DS.END .ED
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
|
|
53
BIN/LS.S.txt
53
BIN/LS.S.txt
|
@ -27,12 +27,12 @@ ZPFileStat .BS 2
|
||||||
|
|
||||||
ZPLineBuf .BS 2
|
ZPLineBuf .BS 2
|
||||||
ZPPWBuf .BS 2
|
ZPPWBuf .BS 2
|
||||||
|
|
||||||
ArgCount .BS 1
|
|
||||||
|
|
||||||
ColCount .BS 1
|
ColCount .BS 1
|
||||||
bPass2 .BS 1
|
bPass2 .BS 1
|
||||||
|
hLineBuf .BS 1
|
||||||
|
hPWBuf .BS 1
|
||||||
|
|
||||||
|
ArgCount .BS 1
|
||||||
bPause .BS 1
|
bPause .BS 1
|
||||||
bAllmostAll .BS 1
|
bAllmostAll .BS 1
|
||||||
bColumn .BS 1
|
bColumn .BS 1
|
||||||
|
@ -148,17 +148,14 @@ CS.RUN jsr CS.RUN.ISATTY
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>STYA ZPPWBuf
|
>STYA ZPPWBuf
|
||||||
txa
|
stx hPWBuf
|
||||||
>STA.G hPWBuf
|
|
||||||
|
|
||||||
>LDYAI 256
|
>LDYAI 256
|
||||||
>SYSCALL GetMem
|
>SYSCALL GetMem
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>STYA ZPLineBuf
|
>STYA ZPLineBuf
|
||||||
txa
|
stx hLineBuf
|
||||||
|
|
||||||
>STA.G hLineBuf
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.LOOP stz bPass2
|
CS.RUN.LOOP stz bPass2
|
||||||
|
|
||||||
|
@ -186,7 +183,7 @@ CS.RUN.LOOP stz bPass2
|
||||||
bmi .1
|
bmi .1
|
||||||
|
|
||||||
jsr GetEntry
|
jsr GetEntry
|
||||||
bcs .9
|
bcs .6
|
||||||
|
|
||||||
jsr FilterMatch
|
jsr FilterMatch
|
||||||
bcs .8 no match, skip....
|
bcs .8 no match, skip....
|
||||||
|
@ -196,7 +193,7 @@ CS.RUN.LOOP stz bPass2
|
||||||
|
|
||||||
lda (ZPFileName)
|
lda (ZPFileName)
|
||||||
cmp #'.'
|
cmp #'.'
|
||||||
beq .8
|
beq .5
|
||||||
|
|
||||||
.4 ldy #S.STAT.MODE+1
|
.4 ldy #S.STAT.MODE+1
|
||||||
lda (ZPFileStat),y
|
lda (ZPFileStat),y
|
||||||
|
@ -209,11 +206,11 @@ CS.RUN.LOOP stz bPass2
|
||||||
jsr CS.RUN.PRINT.JMP
|
jsr CS.RUN.PRINT.JMP
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
.8 jsr GetNextEntry
|
.5 jsr GetNextEntry
|
||||||
bcc .1
|
bcc .1
|
||||||
|
|
||||||
bit bPass2
|
bit bPass2
|
||||||
bmi .9
|
bmi .6
|
||||||
|
|
||||||
jsr ResetSrcDir
|
jsr ResetSrcDir
|
||||||
bcs .99
|
bcs .99
|
||||||
|
@ -221,14 +218,14 @@ CS.RUN.LOOP stz bPass2
|
||||||
dec bPass2
|
dec bPass2
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.9 bit bLong
|
.6 bit bLong
|
||||||
bmi .91
|
bmi .7
|
||||||
|
|
||||||
jsr CS.RUN.NewLine
|
jsr CS.RUN.NewLine
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
.91 jsr LeaveSubDir
|
.7 jsr LeaveSubDir
|
||||||
bcs .98
|
bcs .8
|
||||||
|
|
||||||
jsr BasePath..
|
jsr BasePath..
|
||||||
|
|
||||||
|
@ -238,7 +235,7 @@ CS.RUN.LOOP stz bPass2
|
||||||
jsr GetNextEntry
|
jsr GetNextEntry
|
||||||
jmp CS.RUN.LOOP
|
jmp CS.RUN.LOOP
|
||||||
|
|
||||||
.98 lda #0
|
.8 lda #0
|
||||||
sec
|
sec
|
||||||
.99 rts
|
.99 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -720,15 +717,15 @@ CS.QUIT jsr LeaveSubDir
|
||||||
bcc CS.QUIT
|
bcc CS.QUIT
|
||||||
|
|
||||||
ldy #hFilter
|
ldy #hFilter
|
||||||
|
lda (pData),y
|
||||||
jsr .7
|
jsr .7
|
||||||
|
|
||||||
ldy #hPWBuf
|
lda hPWBuf
|
||||||
jsr .7
|
jsr .7
|
||||||
|
|
||||||
ldy #hLineBuf
|
lda hLineBuf
|
||||||
|
|
||||||
.7 lda (pData),y
|
.7 beq .8
|
||||||
beq .8
|
|
||||||
|
|
||||||
>SYSCALL FreeMem
|
>SYSCALL FreeMem
|
||||||
|
|
||||||
|
@ -830,20 +827,19 @@ MSG.USAGE .AS "Usage : LS [-A] [-C] [-F] [-L] [-R] [filespec]\r\n"
|
||||||
.AZ " -R : Recursively list subdirectories\r\n"
|
.AZ " -R : Recursively list subdirectories\r\n"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MSG.ENTER .AZ "Directory:%s"
|
MSG.ENTER .AZ "Directory:%s"
|
||||||
MSG.REG .AZ "%19s"
|
|
||||||
MSG.REGEXT .AZ "%s %6s %6s %10u %s %s %s %H %s"
|
MSG.REGEXT .AZ "%s %6s %6s %10u %s %s %s %H %s"
|
||||||
|
MSG.REG .AZ "%19s"
|
||||||
|
MSG.DIREXT .AS "%s %6s %6s %s %s <dir> "
|
||||||
MSG.DIR .AZ "\e[32m%s/\e[0m"
|
MSG.DIR .AZ "\e[32m%s/\e[0m"
|
||||||
MSG.DIREXT .AZ "%s %6s %6s %s %s <dir> %s"
|
MSG.BDEVEXT .AZ "\e[36m/%15s\e[0m s%dd%d Blocks Used:%5D Total:%5D"
|
||||||
MSG.BDEV .AZ "\e[32m%s/\e[0m"
|
MSG.BDEV .AZ "\e[36m/%s\e[0m"
|
||||||
MSG.BDEVEXT .AZ "/%15s s%dd%d Blocks Used:%5D Total:%5D"
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PRODOS.FT.HEX .HS 0406FAFCFDE2CBCCCFFF
|
PRODOS.FT.HEX .HS 0406FAFCFDCBCCCFFF
|
||||||
PRODOS.FT.TXT .AZ "txt"
|
PRODOS.FT.TXT .AZ "txt"
|
||||||
.AZ "bin"
|
.AZ "bin"
|
||||||
.AZ "asm"
|
.AZ "asm"
|
||||||
.AZ "bas"
|
.AZ "bas"
|
||||||
.AZ "var"
|
.AZ "var"
|
||||||
.AZ "atk"
|
|
||||||
.AZ "pix"
|
.AZ "pix"
|
||||||
.AZ "fon"
|
.AZ "fon"
|
||||||
.AZ "pak"
|
.AZ "pak"
|
||||||
|
@ -869,9 +865,6 @@ TIME.SysTime .BS S.TIME
|
||||||
TIME.Create .BS 10 DD-mmm-YY\0
|
TIME.Create .BS 10 DD-mmm-YY\0
|
||||||
TIME.Mod .BS 10
|
TIME.Mod .BS 10
|
||||||
|
|
||||||
hLineBuf .BS 1
|
|
||||||
hPWBuf .BS 1
|
|
||||||
|
|
||||||
.INB usr/src/shared/x.fileenum.g
|
.INB usr/src/shared/x.fileenum.g
|
||||||
DS.END .ED
|
DS.END .ED
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
42
BIN/UC.S.txt
42
BIN/UC.S.txt
|
@ -25,7 +25,9 @@ ZPFileStat .BS 2
|
||||||
ZPFullPath .BS 2
|
ZPFullPath .BS 2
|
||||||
ZPNewPath .BS 2
|
ZPNewPath .BS 2
|
||||||
|
|
||||||
ZPLineBuf .BS 2
|
ArgIndex .BS 1
|
||||||
|
hSrcFullPath .BS 1
|
||||||
|
hSrcNewPath .BS 1
|
||||||
|
|
||||||
bPause .BS 1
|
bPause .BS 1
|
||||||
|
|
||||||
|
@ -63,13 +65,16 @@ L.MSG.ERR .DA MSG.ERR
|
||||||
CS.INIT clc
|
CS.INIT clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN >INC.G ArgIndex
|
CS.RUN inc ArgIndex
|
||||||
|
lda ArgIndex
|
||||||
>SYSCALL ArgV
|
>SYSCALL ArgV
|
||||||
bcs .5
|
bcs .5
|
||||||
|
|
||||||
>STYA ZPPtr1
|
>STYA ZPPtr1
|
||||||
lda (ZPPtr1)
|
lda (ZPPtr1)
|
||||||
cmp #'-'
|
cmp #'-'
|
||||||
bne .4
|
bne .4
|
||||||
|
|
||||||
jsr CS.RUN.CheckOpt
|
jsr CS.RUN.CheckOpt
|
||||||
bcc CS.RUN
|
bcc CS.RUN
|
||||||
|
|
||||||
|
@ -82,24 +87,26 @@ CS.RUN >INC.G ArgIndex
|
||||||
|
|
||||||
.4 >LDA.G hSrcBasePath
|
.4 >LDA.G hSrcBasePath
|
||||||
bne .9
|
bne .9
|
||||||
|
|
||||||
>LDYA ZPPtr1
|
>LDYA ZPPtr1
|
||||||
jsr InitSrcDirYA
|
jsr InitSrcDirYA
|
||||||
bcc CS.RUN
|
bcc CS.RUN
|
||||||
|
|
||||||
.99 rts
|
.99 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.5 >LDYAI 256
|
.5 >LDYAI 256
|
||||||
>SYSCALL GetMem
|
>SYSCALL GetMem
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
>STYA ZPFullPath
|
>STYA ZPFullPath
|
||||||
txa
|
stx hSrcFullPath
|
||||||
>STA.G hSrcFullPath
|
|
||||||
|
|
||||||
>LDYAI 256
|
>LDYAI 256
|
||||||
>SYSCALL GetMem
|
>SYSCALL GetMem
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
>STYA ZPNewPath
|
>STYA ZPNewPath
|
||||||
txa
|
stx hSrcNewPath
|
||||||
>STA.G hSrcNewPath
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.LOOP ldy #S.PS.hStdIn
|
CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||||
lda (pPS),y
|
lda (pPS),y
|
||||||
|
@ -229,6 +236,7 @@ CS.RUN.FILE jsr FilterMatch
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.CheckErr bcs .1
|
CS.RUN.CheckErr bcs .1
|
||||||
|
|
||||||
>LDYA L.MSG.OK
|
>LDYA L.MSG.OK
|
||||||
>SYSCALL PutS
|
>SYSCALL PutS
|
||||||
rts
|
rts
|
||||||
|
@ -280,16 +288,14 @@ CS.QUIT jsr LeaveSubDir
|
||||||
bcc CS.QUIT
|
bcc CS.QUIT
|
||||||
|
|
||||||
>LDA.G hFilter
|
>LDA.G hFilter
|
||||||
beq .1
|
jsr .7
|
||||||
|
|
||||||
>SYSCALL FreeMem
|
lda hSrcFullPath
|
||||||
.1 >LDA.G hSrcFullPath
|
jsr .7
|
||||||
beq .2
|
|
||||||
|
|
||||||
>SYSCALL FreeMem
|
lda hSrcNewPath
|
||||||
|
|
||||||
.2 >LDA.G hSrcNewPath
|
.7 beq .8
|
||||||
beq .8
|
|
||||||
|
|
||||||
>SYSCALL FreeMem
|
>SYSCALL FreeMem
|
||||||
|
|
||||||
|
@ -333,15 +339,7 @@ MSG.FILE .AZ "File:%s..."
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.DUMMY
|
.DUMMY
|
||||||
.OR 0
|
.OR 0
|
||||||
DS.START
|
DS.START .INB usr/src/shared/x.fileenum.g
|
||||||
ArgIndex .BS 1
|
|
||||||
|
|
||||||
hSrcFullPath .BS 1
|
|
||||||
hSrcNewPath .BS 1
|
|
||||||
hFile .BS 1
|
|
||||||
hMem .BS 1
|
|
||||||
|
|
||||||
.INB usr/src/shared/x.fileenum.g
|
|
||||||
DS.END .ED
|
DS.END .ED
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
|
|
15
BIN/WC.S.txt
15
BIN/WC.S.txt
|
@ -306,7 +306,7 @@ CS.RUN.FILE jsr FilterMatch
|
||||||
CS.RUN.FILE.LOOP
|
CS.RUN.FILE.LOOP
|
||||||
.1 >PUSHB hFile
|
.1 >PUSHB hFile
|
||||||
>PUSHW ZPLineBuf
|
>PUSHW ZPLineBuf
|
||||||
>PUSHWI 256
|
>PUSHWI 255
|
||||||
>SYSCALL FGetS
|
>SYSCALL FGetS
|
||||||
bcs .8
|
bcs .8
|
||||||
|
|
||||||
|
@ -418,16 +418,17 @@ CS.RUN.IncFLine phy
|
||||||
CS.RUN.IncFWord phy
|
CS.RUN.IncFWord phy
|
||||||
|
|
||||||
ldy #fWordCount
|
ldy #fWordCount
|
||||||
ldx #4
|
|
||||||
|
|
||||||
CS.RUN.IncF lda (pData),y
|
CS.RUN.IncF ldx #4
|
||||||
|
|
||||||
|
.1 lda (pData),y
|
||||||
inc
|
inc
|
||||||
sta (pData),y
|
sta (pData),y
|
||||||
bne .8
|
bne .8
|
||||||
|
|
||||||
iny
|
iny
|
||||||
dex
|
dex
|
||||||
bne CS.RUN.IncF
|
bne .1
|
||||||
|
|
||||||
.8 ply
|
.8 ply
|
||||||
rts
|
rts
|
||||||
|
@ -523,7 +524,7 @@ CS.RUN.PrintTstat
|
||||||
bit bWord
|
bit bWord
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
>PUSHW L.MSG.LONG
|
>PUSHW L.MSG.LONGTAB
|
||||||
>PUSHL.G tWordCount
|
>PUSHL.G tWordCount
|
||||||
>PUSHBI 4
|
>PUSHBI 4
|
||||||
>SYSCALL PrintF
|
>SYSCALL PrintF
|
||||||
|
@ -532,7 +533,7 @@ CS.RUN.PrintTstat
|
||||||
.1 bit bLine
|
.1 bit bLine
|
||||||
bpl .2
|
bpl .2
|
||||||
|
|
||||||
>PUSHW L.MSG.LONG
|
>PUSHW L.MSG.LONGTAB
|
||||||
>PUSHL.G tLineCount
|
>PUSHL.G tLineCount
|
||||||
>PUSHBI 4
|
>PUSHBI 4
|
||||||
>SYSCALL PrintF
|
>SYSCALL PrintF
|
||||||
|
@ -541,7 +542,7 @@ CS.RUN.PrintTstat
|
||||||
.2 bit bChar
|
.2 bit bChar
|
||||||
bpl .3
|
bpl .3
|
||||||
|
|
||||||
>PUSHW L.MSG.LONG
|
>PUSHW L.MSG.LONGTAB
|
||||||
>PUSHL.G tCharCount
|
>PUSHL.G tCharCount
|
||||||
>PUSHBI 4
|
>PUSHBI 4
|
||||||
>SYSCALL PrintF
|
>SYSCALL PrintF
|
||||||
|
|
|
@ -45,7 +45,7 @@ NEW
|
||||||
CELL
|
CELL
|
||||||
LOOP
|
LOOP
|
||||||
LOOP
|
LOOP
|
||||||
TEXT
|
KEY TEXT
|
||||||
." All done." ;
|
." All done." ;
|
||||||
|
|
||||||
MANDELBROT
|
MANDELBROT
|
||||||
|
|
|
@ -145,8 +145,7 @@ m128k sta idapple Save MACHID in temp location
|
||||||
tsb LDR.MSG.PRODOS+1
|
tsb LDR.MSG.PRODOS+1
|
||||||
tsb LDR.MSG.PRODOS+2
|
tsb LDR.MSG.PRODOS+2
|
||||||
|
|
||||||
jsr LDR.Scr80Select
|
jsr LDR.Scr80Init X = LDR.MSG.machine type
|
||||||
jsr LDR.Scr80Init
|
|
||||||
|
|
||||||
ldx #$F
|
ldx #$F
|
||||||
|
|
||||||
|
@ -528,11 +527,11 @@ LDR.ClkDevTCLK jsr LDR.IsIIc
|
||||||
.1 jsr LDR.CheckTClkID
|
.1 jsr LDR.CheckTClkID
|
||||||
bcs .7
|
bcs .7
|
||||||
|
|
||||||
sta SETPAGE2
|
* sta SETPAGE2
|
||||||
stz $478,x
|
* stz $478,x
|
||||||
stz $7f8,x
|
* stz $7f8,x
|
||||||
|
|
||||||
sta CLRPAGE2
|
* sta CLRPAGE2
|
||||||
stz $478,x
|
stz $478,x
|
||||||
stz $7f8,x
|
stz $7f8,x
|
||||||
|
|
||||||
|
@ -983,8 +982,10 @@ LDR.SetDevID ldy #$FE check attributes byte.
|
||||||
sta devid
|
sta devid
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
LDR.Scr80Select jsr LDR.IsIIc
|
LDR.Scr80Init phx Save MDR.MSG
|
||||||
bcs .99
|
|
||||||
|
jsr LDR.IsIIc
|
||||||
|
bcs LDR.Scr80Init2
|
||||||
|
|
||||||
php
|
php
|
||||||
sei
|
sei
|
||||||
|
@ -996,7 +997,7 @@ LDR.Scr80Select jsr LDR.IsIIc
|
||||||
.1 ldy COL80IDX,x
|
.1 ldy COL80IDX,x
|
||||||
lda $C300,y
|
lda $C300,y
|
||||||
cmp COL80VAL,x
|
cmp COL80VAL,x
|
||||||
bne .9
|
bne .2
|
||||||
|
|
||||||
dex
|
dex
|
||||||
bpl .1
|
bpl .1
|
||||||
|
@ -1004,18 +1005,13 @@ LDR.Scr80Select jsr LDR.IsIIc
|
||||||
lda $C30C is it an apple 80 col compatible card?
|
lda $C30C is it an apple 80 col compatible card?
|
||||||
and #$F0
|
and #$F0
|
||||||
cmp #$80
|
cmp #$80
|
||||||
bne .9
|
beq .3
|
||||||
|
|
||||||
|
.2 sta CLRC3ROM
|
||||||
|
|
||||||
plp
|
.3 plp
|
||||||
rts
|
|
||||||
|
|
||||||
.9 sta CLRC3ROM
|
|
||||||
|
|
||||||
plp
|
|
||||||
.99 rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
LDR.Scr80Init lda #$8C Reset 80 col screen ($0C:HOME)
|
LDR.Scr80Init2 lda #$8C Reset 80 col screen ($0C:HOME)
|
||||||
jsr $C300
|
jsr $C300
|
||||||
|
|
||||||
jsr setnorm
|
jsr setnorm
|
||||||
|
@ -1146,6 +1142,9 @@ LDR.Scr80Init lda #$8C Reset 80 col screen ($0C:HOME)
|
||||||
jsr setnorm
|
jsr setnorm
|
||||||
|
|
||||||
ldx #LDR.MSG.PRODOS
|
ldx #LDR.MSG.PRODOS
|
||||||
|
jsr LDR.PrintX
|
||||||
|
|
||||||
|
plx MDR.MSG.machine type
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
LDR.PrintX bit RROMBNK2
|
LDR.PrintX bit RROMBNK2
|
||||||
|
|
||||||
|
|
|
@ -595,11 +595,11 @@ CORE.IRQ.TCLOCK.Off
|
||||||
lda $c080,x
|
lda $c080,x
|
||||||
|
|
||||||
ldx IRQ.0n
|
ldx IRQ.0n
|
||||||
sta SETPAGE2
|
* sta SETPAGE2
|
||||||
stz $478,x
|
* stz $478,x
|
||||||
stz $7f8,x
|
* stz $7f8,x
|
||||||
|
|
||||||
sta CLRPAGE2
|
* sta CLRPAGE2
|
||||||
stz $478,x
|
stz $478,x
|
||||||
stz $7f8,x
|
stz $7f8,x
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
|
@ -40,7 +40,6 @@ K.OpenDir jsr PFT.CheckPathYA
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
.DUMMY ZPTMP,9
|
.DUMMY ZPTMP,9
|
||||||
.OR ZPTMP 9 Bytes
|
.OR ZPTMP 9 Bytes
|
||||||
K.ReadDir.hBlk .BS 1
|
|
||||||
K.ReadDir.ECIB .BS 1
|
K.ReadDir.ECIB .BS 1
|
||||||
|
|
||||||
K.ReadDir.EL .BS 1
|
K.ReadDir.EL .BS 1
|
||||||
|
@ -82,7 +81,7 @@ K.ReadDir.ROOT ldy #S.FD.DIR.FC did we already returned something ?
|
||||||
|
|
||||||
>LDYAI 16+S.STAT*18+1 14*(Vols+Stat) + 4*(PFT+Stat) + \0
|
>LDYAI 16+S.STAT*18+1 14*(Vols+Stat) + 4*(PFT+Stat) + \0
|
||||||
|
|
||||||
jsr K.ReadDir.GetBufYA
|
jsr K.ReadDir.GetBuf
|
||||||
bcs DIRENT.RTS
|
bcs DIRENT.RTS
|
||||||
|
|
||||||
.1 lda (ZPPtr2)
|
.1 lda (ZPPtr2)
|
||||||
|
@ -186,20 +185,14 @@ K.ReadDir.DEV jmp DIRENT.EOF TODO : /dev
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.ReadDir.DIR sta K.MLI.PARAMS+1 A=#S.DIR.PRODOS.REF
|
K.ReadDir.DIR sta K.MLI.PARAMS+1 A=#S.DIR.PRODOS.REF
|
||||||
|
|
||||||
lda /K.Buf256 read in
|
stz K.MLI.PARAMS+2
|
||||||
|
lda /K.Buf256 read in Buf256+IOBuf
|
||||||
|
sta K.MLI.PARAMS+3
|
||||||
|
|
||||||
stz K.MLI.PARAMS+2 For reading
|
stz K.MLI.PARAMS+4
|
||||||
sta K.MLI.PARAMS+3 For reading
|
lda /512
|
||||||
|
sta K.MLI.PARAMS+5
|
||||||
|
|
||||||
ldy #4 Skip 4 bytes linked list
|
|
||||||
sty ZPPtr2 PTR to Buffer for PASS #1
|
|
||||||
sty ZPPtr3 PTR to Buffer for PASS #2
|
|
||||||
|
|
||||||
sta ZPPtr2+1 PTR to Buffer for PASS #1
|
|
||||||
sta ZPPtr3+1 PTR to Buffer for PASS #2
|
|
||||||
|
|
||||||
>LDYAI 512
|
|
||||||
>STYA K.MLI.PARAMS+4
|
|
||||||
>MLICALL MLIREAD Read A block from directory
|
>MLICALL MLIREAD Read A block from directory
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
|
@ -207,30 +200,18 @@ K.ReadDir.DIR sta K.MLI.PARAMS+1 A=#S.DIR.PRODOS.REF
|
||||||
lda (pFD),y
|
lda (pFD),y
|
||||||
bne .2 no, we have all we need....
|
bne .2 no, we have all we need....
|
||||||
|
|
||||||
ldy #$1f+3
|
|
||||||
ldx #3
|
ldx #3
|
||||||
|
|
||||||
.1 lda (ZPPtr2),y Get K.ReadDir.EL.... From Block
|
.1 lda K.Buf256+$23,x Get K.ReadDir.EL.... From Block
|
||||||
sta K.ReadDir.EL,x
|
sta K.ReadDir.EL,x
|
||||||
dey
|
|
||||||
dex
|
dex
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
ldx #8
|
ldx #7
|
||||||
|
|
||||||
ldy #16
|
|
||||||
|
|
||||||
.10 lda (ZPPtr2),y
|
|
||||||
pha
|
|
||||||
iny
|
|
||||||
dex
|
|
||||||
bne .10
|
|
||||||
|
|
||||||
ldx #8
|
|
||||||
|
|
||||||
ldy #S.FD.DIR.ACL+7
|
ldy #S.FD.DIR.ACL+7
|
||||||
|
|
||||||
.20 pla
|
.20 lda K.Buf256+$14,x
|
||||||
cpy #S.FD.DIR.MODE+1
|
cpy #S.FD.DIR.MODE+1
|
||||||
bne .30
|
bne .30
|
||||||
|
|
||||||
|
@ -239,7 +220,7 @@ K.ReadDir.DIR sta K.MLI.PARAMS+1 A=#S.DIR.PRODOS.REF
|
||||||
.30 sta (pFD),y
|
.30 sta (pFD),y
|
||||||
dey
|
dey
|
||||||
dex
|
dex
|
||||||
bne .20
|
bpl .20
|
||||||
|
|
||||||
inc K.ReadDir.EC Add one to EC because we include VOL/DIR Header
|
inc K.ReadDir.EC Add one to EC because we include VOL/DIR Header
|
||||||
bne .4
|
bne .4
|
||||||
|
@ -270,8 +251,11 @@ K.ReadDir.DIR sta K.MLI.PARAMS+1 A=#S.DIR.PRODOS.REF
|
||||||
bne .5
|
bne .5
|
||||||
|
|
||||||
iny
|
iny
|
||||||
clc
|
bne .5
|
||||||
beq .99 no...exit
|
|
||||||
|
lda #MLI.E.EOF
|
||||||
|
sec
|
||||||
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* pass #1 compute BufSize...
|
* pass #1 compute BufSize...
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -282,7 +266,9 @@ K.ReadDir.DIR sta K.MLI.PARAMS+1 A=#S.DIR.PRODOS.REF
|
||||||
sta K.ReadDir.BufSize
|
sta K.ReadDir.BufSize
|
||||||
stz K.ReadDir.BufSize+1
|
stz K.ReadDir.BufSize+1
|
||||||
|
|
||||||
K.ReadDir.DIR1 lda (ZPPtr2) X = EntryCount In This Block
|
jsr K.ReadDir.P3Init
|
||||||
|
|
||||||
|
K.ReadDir.DIR1 lda (ZPPtr3)
|
||||||
beq .7 Free slot....goto next
|
beq .7 Free slot....goto next
|
||||||
|
|
||||||
and #$F0 get storage_type
|
and #$F0 get storage_type
|
||||||
|
@ -292,7 +278,7 @@ K.ReadDir.DIR1 lda (ZPPtr2) X = EntryCount In This Block
|
||||||
cmp #$E0 directory header ?
|
cmp #$E0 directory header ?
|
||||||
beq .2
|
beq .2
|
||||||
|
|
||||||
lda (ZPPtr2) regular DIR or File, get LEN
|
lda (ZPPtr3) regular DIR or File, get LEN
|
||||||
and #$F compute filename len
|
and #$F compute filename len
|
||||||
sec add "#<filename>" + S.STAT
|
sec add "#<filename>" + S.STAT
|
||||||
adc #S.STAT
|
adc #S.STAT
|
||||||
|
@ -308,21 +294,13 @@ K.ReadDir.DIR1 lda (ZPPtr2) X = EntryCount In This Block
|
||||||
|
|
||||||
inc K.ReadDir.BufSize+1
|
inc K.ReadDir.BufSize+1
|
||||||
|
|
||||||
.3 inx
|
.3 inx X,Y = !Total entry Count
|
||||||
bne .7
|
bne .7
|
||||||
|
|
||||||
iny
|
iny
|
||||||
bra K.ReadDir.DIR2 we reached last entry in whole DIR
|
beq K.ReadDir.DIR2 we reached last entry in whole DIR
|
||||||
|
|
||||||
.7 lda ZPPtr2
|
.7 jsr K.ReadDir.P3Next
|
||||||
clc
|
|
||||||
adc K.ReadDir.EL
|
|
||||||
sta ZPPtr2
|
|
||||||
bcc .8
|
|
||||||
|
|
||||||
inc ZPPtr2+1
|
|
||||||
|
|
||||||
.8 dec K.ReadDir.ECIB
|
|
||||||
bne K.ReadDir.DIR1
|
bne K.ReadDir.DIR1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* pass #2 Fill Buffer...(ZPPtr1 & Ptr2 can now be trashed)
|
* pass #2 Fill Buffer...(ZPPtr1 & Ptr2 can now be trashed)
|
||||||
|
@ -330,11 +308,14 @@ K.ReadDir.DIR1 lda (ZPPtr2) X = EntryCount In This Block
|
||||||
K.ReadDir.DIR2 lda K.ReadDir.EPB
|
K.ReadDir.DIR2 lda K.ReadDir.EPB
|
||||||
sta K.ReadDir.ECIB
|
sta K.ReadDir.ECIB
|
||||||
|
|
||||||
|
>LDYA K.ReadDir.BufSize Get a BufSize bytes buffer for storing results
|
||||||
jsr K.ReadDir.GetBuf
|
jsr K.ReadDir.GetBuf
|
||||||
bcc .1
|
bcc .10
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
.10 jsr K.ReadDir.P3Init
|
||||||
|
|
||||||
.1 lda (ZPPtr3)
|
.1 lda (ZPPtr3)
|
||||||
beq .7 Empty slot, skip
|
beq .7 Empty slot, skip
|
||||||
|
|
||||||
|
@ -368,17 +349,8 @@ K.ReadDir.DIR2 lda K.ReadDir.EPB
|
||||||
ora K.ReadDir.EC
|
ora K.ReadDir.EC
|
||||||
beq .8 0! no more files in DIR
|
beq .8 0! no more files in DIR
|
||||||
|
|
||||||
.7 dec K.ReadDir.ECIB 0! no more file in block
|
.7 jsr K.ReadDir.P3Next
|
||||||
beq .8
|
bne .1
|
||||||
|
|
||||||
lda ZPPtr3
|
|
||||||
clc
|
|
||||||
adc K.ReadDir.EL
|
|
||||||
sta ZPPtr3
|
|
||||||
bcc .1
|
|
||||||
|
|
||||||
inc ZPPtr3+1
|
|
||||||
bra .1
|
|
||||||
|
|
||||||
.8 ldx #3
|
.8 ldx #3
|
||||||
ldy #S.FD.DIR.EL+3
|
ldy #S.FD.DIR.EL+3
|
||||||
|
@ -393,9 +365,28 @@ K.ReadDir.EXIT ldx K.ReadDir.hBuf
|
||||||
txa
|
txa
|
||||||
jmp K.GetMemPtr
|
jmp K.GetMemPtr
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
K.ReadDir.P3Init
|
||||||
|
ldy #4 Skip 4 bytes linked list
|
||||||
|
sty ZPPtr3
|
||||||
|
|
||||||
|
lda /K.Buf256
|
||||||
|
sta ZPPtr3+1
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
K.ReadDir.P3Next
|
||||||
|
lda ZPPtr3
|
||||||
|
clc
|
||||||
|
adc K.ReadDir.EL
|
||||||
|
sta ZPPtr3
|
||||||
|
bcc .8
|
||||||
|
|
||||||
|
inc ZPPtr3+1
|
||||||
|
|
||||||
|
.8 dec K.ReadDir.ECIB 0! no more file in block
|
||||||
|
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
K.ReadDir.GetBuf
|
K.ReadDir.GetBuf
|
||||||
>LDYA K.ReadDir.BufSize Get a BufSize bytes buffer for storing results
|
|
||||||
K.ReadDir.GetBufYA
|
|
||||||
jsr K.GetMem0 make sure 0 filled
|
jsr K.GetMem0 make sure 0 filled
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
|
@ -471,7 +462,9 @@ K.ReadDir.AddToBuf
|
||||||
sta (ZPPtr4)
|
sta (ZPPtr4)
|
||||||
inc ZPPtr4
|
inc ZPPtr4
|
||||||
bne .8
|
bne .8
|
||||||
|
|
||||||
inc ZPPtr4+1
|
inc ZPPtr4+1
|
||||||
|
|
||||||
.8 rts
|
.8 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.ReadDir.AddStatACL
|
K.ReadDir.AddStatACL
|
||||||
|
|
|
@ -897,11 +897,13 @@ IrqMgrInit >LDYAI MSG.IRQ
|
||||||
sei
|
sei
|
||||||
sta CLRPAGE2
|
sta CLRPAGE2
|
||||||
lda #$60
|
lda #$60
|
||||||
sta $5fa
|
sta $5fa //c EXTINT COM1:Dont buffer but get IRQ
|
||||||
sta $5fb
|
sta $5fb //c EXTINT COM2:Dont buffer but get IRQ
|
||||||
|
|
||||||
stz $4FF //c ROM FF
|
stz $5FA //c TYPHED no keyboard buffering
|
||||||
stz $4FC //c ROM 1,2,3,4,5
|
|
||||||
|
stz $4FF //c ROM FF: no ACIABUF
|
||||||
|
stz $4FC //c ROM 0X: no ACIABUF
|
||||||
plp
|
plp
|
||||||
|
|
||||||
.3 jsr IrqMgrInit.Mouse
|
.3 jsr IrqMgrInit.Mouse
|
||||||
|
@ -979,11 +981,11 @@ IrqMgrInit.TClock
|
||||||
|
|
||||||
lda #$40
|
lda #$40
|
||||||
|
|
||||||
sta SETPAGE2
|
* sta SETPAGE2
|
||||||
sta $478,x
|
* sta $478,x
|
||||||
sta $7f8,x
|
* sta $7f8,x
|
||||||
|
|
||||||
sta CLRPAGE2
|
* sta CLRPAGE2
|
||||||
sta $478,x
|
sta $478,x
|
||||||
sta $7f8,x
|
sta $7f8,x
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user