2016-08-17 06:25:58 +00:00
|
|
|
|
PR#3
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2016-08-17 06:25:58 +00:00
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2016-10-03 06:18:46 +00:00
|
|
|
|
TXT.OpenFileYA pha
|
|
|
|
|
>PUSHWI 0 Aux type
|
2016-09-26 16:02:14 +00:00
|
|
|
|
>PUSHBI 4 S.FILEINFO.TYPE.TXT
|
2017-01-12 17:43:45 +00:00
|
|
|
|
>PUSHBI SYS.FOpen.R+SYS.FOpen.T
|
2016-10-03 06:18:46 +00:00
|
|
|
|
pla
|
|
|
|
|
|
|
|
|
|
>PUSHYA
|
2017-01-12 17:43:45 +00:00
|
|
|
|
>SYSCALL FOpen
|
2016-08-17 06:25:58 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
ldy #hInputFile
|
|
|
|
|
sta (pData),y
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2016-09-26 16:02:14 +00:00
|
|
|
|
TXT.ReadFile >PUSHWI UsrBuf256+1
|
|
|
|
|
>PUSHWI 127
|
2016-08-17 06:25:58 +00:00
|
|
|
|
ldy #hInputFile
|
|
|
|
|
lda (pData),y
|
|
|
|
|
>PUSHA
|
2017-01-12 17:43:45 +00:00
|
|
|
|
>SYSCALL FRead
|
2016-08-17 06:25:58 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
tya
|
|
|
|
|
beq .10
|
|
|
|
|
|
2016-09-26 06:18:51 +00:00
|
|
|
|
lda UsrBuf256,y Y,A=Bytes read
|
2016-08-17 06:25:58 +00:00
|
|
|
|
cmp #$0D
|
|
|
|
|
bne .10
|
|
|
|
|
|
|
|
|
|
dey
|
|
|
|
|
|
|
|
|
|
.10 tya
|
|
|
|
|
sta (pData)
|
|
|
|
|
beq .2
|
|
|
|
|
|
2016-09-26 06:18:51 +00:00
|
|
|
|
.1 lda UsrBuf256,y
|
2016-08-17 06:25:58 +00:00
|
|
|
|
sta (pData),y
|
|
|
|
|
dey
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.2 ldy #bEcho
|
|
|
|
|
lda (pData),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
2016-10-17 06:21:04 +00:00
|
|
|
|
>PUSHW pData
|
|
|
|
|
>LDYA L.MSG.ECHO
|
2017-04-03 06:01:52 +00:00
|
|
|
|
>SYSCALL PPrintFYA
|
2016-08-17 06:25:58 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2016-10-03 06:18:46 +00:00
|
|
|
|
TXT.CloseFile ldy #hInputFile
|
2016-08-17 06:25:58 +00:00
|
|
|
|
lda (pData),y
|
|
|
|
|
beq .9
|
|
|
|
|
|
2016-10-29 19:58:21 +00:00
|
|
|
|
>SYSCALL FCloseA
|
2016-09-26 16:02:14 +00:00
|
|
|
|
|
2016-08-17 06:25:58 +00:00
|
|
|
|
.9 lda #0
|
|
|
|
|
ldy #hInputFile
|
|
|
|
|
sta (pData),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2017-03-29 15:48:15 +00:00
|
|
|
|
SAVE /A2OSX.SRC/SBIN/SHELL.S.TXT
|
|
|
|
|
LOAD /A2OSX.SRC/SBIN/SHELL.S
|
2016-08-17 06:25:58 +00:00
|
|
|
|
ASM
|