mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-26 13:49:18 +00:00
Source refresh (now use new API)
This commit is contained in:
parent
50347568e7
commit
c9857252c5
86
BIN/RM.S.txt
86
BIN/RM.S.txt
@ -11,7 +11,8 @@ AUTO 6
|
||||
.INB INC/MACROS.I
|
||||
.INB INC/A2OSX.I
|
||||
*--------------------------------------
|
||||
ZPListDirPTR .EQ ZPBIN
|
||||
ZPPtr1 .EQ ZPBIN
|
||||
ZPPtr2 .EQ ZPBIN+2
|
||||
*--------------------------------------
|
||||
* File Header (16 Bytes)
|
||||
*--------------------------------------
|
||||
@ -31,6 +32,8 @@ CS.START cld
|
||||
.DA CS.RUN
|
||||
.DA CS.DOEVENT
|
||||
.DA CS.QUIT
|
||||
L.MSG.OK .DA MSG.OK
|
||||
L.MSG.ERR .DA MSG.ERR
|
||||
L.FullPath .DA FullPath
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
@ -45,11 +48,11 @@ CS.INIT lda #0
|
||||
beq .98
|
||||
|
||||
>SYSCALL SYS.GetMemPtrA
|
||||
>STYA ZPQuickPtr1
|
||||
lda (ZPQuickPtr1)
|
||||
>STYA ZPPtr1
|
||||
lda (ZPPtr1)
|
||||
beq .98
|
||||
ldy #1
|
||||
lda (ZPQuickPtr1),y
|
||||
lda (ZPPtr1),y
|
||||
cmp #'/'
|
||||
bne .10
|
||||
|
||||
@ -101,12 +104,12 @@ CS.RUN ldy #bCANCEL
|
||||
|
||||
pha
|
||||
>SYSCALL SYS.GetMemPtrA
|
||||
>STYA ZPQuickPtr1
|
||||
lda (ZPQuickPtr1)
|
||||
>STYA ZPPtr1
|
||||
lda (ZPPtr1)
|
||||
pha
|
||||
|
||||
and #$0F
|
||||
sta (ZPQuickPtr1) Adjust Filename len
|
||||
sta (ZPPtr1) Adjust Filename len
|
||||
|
||||
pla
|
||||
and #$F0
|
||||
@ -118,18 +121,18 @@ CS.RUN ldy #bCANCEL
|
||||
ldy #hS.LISTDIR
|
||||
lda (pData),y
|
||||
>SYSCALL SYS.GetMemPtrA
|
||||
>STYA ZPQuickPtr2
|
||||
>STYA ZPPtr2
|
||||
|
||||
ldy #S.LISTDIR.hPATH
|
||||
lda (ZPQuickPtr2),y
|
||||
lda (ZPPtr2),y
|
||||
>SYSCALL SYS.GetMemPtrA
|
||||
>STYA ZPQuickPtr2
|
||||
>STYA ZPPtr2
|
||||
|
||||
lda (ZPQuickPtr2)
|
||||
lda (ZPPtr2)
|
||||
tax
|
||||
tay
|
||||
|
||||
.2 lda (ZPQuickPtr2),y
|
||||
.2 lda (ZPPtr2),y
|
||||
sta FullPath,y
|
||||
dey
|
||||
bne .2
|
||||
@ -137,33 +140,27 @@ CS.RUN ldy #bCANCEL
|
||||
ldy #0
|
||||
.3 inx
|
||||
iny
|
||||
lda (ZPQuickPtr1),y
|
||||
lda (ZPPtr1),y
|
||||
sta FullPath,x
|
||||
tya
|
||||
cmp (ZPQuickPtr1)
|
||||
cmp (ZPPtr1)
|
||||
bne .3
|
||||
|
||||
stx FullPath
|
||||
|
||||
ldy #0
|
||||
.4 iny
|
||||
lda FullPath,y
|
||||
jsr COUT
|
||||
cpy FullPath
|
||||
bne .4
|
||||
>LDYA L.FullPath
|
||||
>SYSCALL SYS.PSTRoutYA
|
||||
|
||||
>LDYA L.FullPath
|
||||
>SYSCALL SYS.MLIDestroyYA
|
||||
bcc .5
|
||||
pha
|
||||
lda #"["
|
||||
jsr COUT
|
||||
pla
|
||||
jsr PRBYTE
|
||||
lda #"]"
|
||||
jsr COUT
|
||||
bcs .5
|
||||
>LDYA L.MSG.OK
|
||||
>SYSCALL SYS.PSTRoutYA
|
||||
bra .8
|
||||
|
||||
.5 jsr CROUT
|
||||
.5 >PUSHA
|
||||
>LDYA L.MSG.ERR
|
||||
>SYSCALL SYS.PSTRoutYA
|
||||
|
||||
.8 pla
|
||||
>SYSCALL SYS.FreeMemA
|
||||
@ -221,36 +218,11 @@ CS.QUIT ldy #hS.LISTDIR
|
||||
.3 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
PRBYTE pha
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
ora #$B0
|
||||
cmp #$BA
|
||||
bcc .1
|
||||
adc #6
|
||||
.1 jsr COUT
|
||||
pla
|
||||
and #$0F
|
||||
ora #$B0
|
||||
cmp #$BA
|
||||
bcc COUT
|
||||
adc #6
|
||||
bra COUT
|
||||
*--------------------------------------
|
||||
CROUT lda #13
|
||||
*--------------------------------------
|
||||
COUT phx
|
||||
phy
|
||||
ldx #DEVMGR.COUT
|
||||
jsr pDevJmp
|
||||
ply
|
||||
plx
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
MSG.OK >PSTRING " [Ok]\n"
|
||||
MSG.ERR >PSTRING " [%h]\n"
|
||||
FullPath .BS 64
|
||||
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR 0
|
||||
|
Loading…
Reference in New Issue
Block a user