Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Joshua Bell | b63dabb7cd | |
Joshua Bell | 0c01446574 | |
Joshua Bell | af1c8f1865 | |
Joshua Bell | 3360d44dd7 | |
Joshua Bell | 4bdb0808a2 | |
Joshua Bell | 8cb8f98793 | |
Joshua Bell | e21c518a06 |
|
@ -13,8 +13,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: a2stuff/build-install-ca65-action@v1
|
||||
- uses: actions/checkout@v4
|
||||
- uses: a2stuff/build-install-ca65-action@v2
|
||||
- uses: a2stuff/build-install-cadius-action@v1
|
||||
|
||||
- name: build
|
||||
|
@ -25,7 +25,7 @@ jobs:
|
|||
|
||||
- name: deploy new version
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: ncipollo/release-action@v1.8.6
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
artifacts: "out/prodos-path.po"
|
||||
|
|
|
@ -36,6 +36,9 @@ Example:
|
|||
Notes:
|
||||
* `PATH` can be invoked as lower case (e.g. `path /hd/cmd`)
|
||||
* Commands can be invoked as lower case (e.g. `hello`)
|
||||
* A relative `PATH` (e.g. `path bin`) only works if an explicit prefix is set.
|
||||
* Note that if no prefix has been set, or if you run `prefix /`, BASIC.SYSTEM will use the last accessed slot and drive and the `PREFIX` command will report that volume as a prefix even though it is empty.
|
||||
|
||||
|
||||
Sample commands included:
|
||||
* `HELLO` - shows a short message, for testing purposes
|
||||
|
@ -55,6 +58,7 @@ Sample commands included:
|
|||
* `S` and `D` arguments can be used to specify slot and drive.
|
||||
* `BELL` - emits the standard Apple II beep
|
||||
* `BUZZ` - emits the ProDOS "nice little tone"
|
||||
* `HIDE` / `UNHIDE` - sets / clears the "invisible" bit on a file, used in GS/OS Finder
|
||||
|
||||
|
||||
## Instructions For Developers
|
||||
|
|
12
copy.cmd.s
12
copy.cmd.s
|
@ -197,6 +197,18 @@ read: lda FN1REF
|
|||
|
||||
|
||||
finish: jsr CloseFiles
|
||||
|
||||
;; Apply FN1 info to FN2 to preserve modification date
|
||||
ldx #$D - 3
|
||||
: lda FN1INFO+3,x
|
||||
sta SSGINFO+3,x
|
||||
dex
|
||||
bpl :-
|
||||
lda #$7
|
||||
sta SSGINFO
|
||||
lda #SET_FILE_INFO
|
||||
jsr GOSYSTEM
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
;;; ============================================================
|
||||
;;;
|
||||
;;; HIDE - Mark a file as invisible
|
||||
;;;
|
||||
;;; Usage: HIDE filename[,S#][,D#]
|
||||
;;;
|
||||
;;; * filename can be relative or absolute path
|
||||
;;;
|
||||
;;; ============================================================
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "more_apple2.inc"
|
||||
.include "prodos.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.org $4000
|
||||
|
||||
;; NOTE: Assumes XLEN is set by PATH
|
||||
|
||||
;; Point BI's parser at the command execution routine.
|
||||
lda #<execute
|
||||
sta XTRNADDR
|
||||
lda #>execute
|
||||
sta XTRNADDR+1
|
||||
|
||||
;; Mark command as external (zero).
|
||||
lda #0
|
||||
sta XCNUM
|
||||
|
||||
;; Set accepted parameter flags
|
||||
|
||||
;; Filename
|
||||
lda #PBitsFlags::FN1
|
||||
sta PBITS
|
||||
|
||||
;; Slot & Drive handling
|
||||
lda #PBitsFlags::SD
|
||||
sta PBITS+1
|
||||
|
||||
clc ; Success (so far)
|
||||
rts1: rts ; Return to BASIC.SYSTEM
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
execute:
|
||||
;; Get the existing file info
|
||||
lda #$A
|
||||
sta SSGINFO
|
||||
lda #GET_FILE_INFO
|
||||
jsr GOSYSTEM
|
||||
bcs rts1
|
||||
|
||||
;;; --------------------------------------------------
|
||||
|
||||
;; Clear invisible bit
|
||||
lda FIACESS
|
||||
ora #ACCESS_I
|
||||
sta FIACESS
|
||||
|
||||
;; Set new file info
|
||||
lda #$7
|
||||
sta SSGINFO
|
||||
|
||||
lda #SET_FILE_INFO
|
||||
jmp GOSYSTEM
|
||||
|
||||
;;; --------------------------------------------------
|
52
path.s
52
path.s
|
@ -171,16 +171,15 @@ nxtchr: jsr ToUpperASCII
|
|||
lda #>execute
|
||||
sta XTRNADDR+1
|
||||
|
||||
;; Mark command as external (zero).
|
||||
lda #0
|
||||
sta XCNUM
|
||||
|
||||
;; Set accepted parameter flags (optional name)
|
||||
lda #PBitsFlags::FNOPT | PBitsFlags::FN1
|
||||
sta PBITS
|
||||
lda #0
|
||||
sta PBITS+1
|
||||
|
||||
;; Mark command as external (zero).
|
||||
sta XCNUM ; A=0 from above
|
||||
|
||||
clc ; Success (so far)
|
||||
rts ; Return to BASIC.SYSTEM
|
||||
|
||||
|
@ -331,7 +330,7 @@ notok: dey
|
|||
|
||||
;; Indicate end of command string for BI's parser (if command uses it)
|
||||
dex
|
||||
stx XLEN
|
||||
stx xlen ; assigned to `XLEN` later
|
||||
|
||||
;; Check to see if path exists.
|
||||
lda #$A ; param length
|
||||
|
@ -346,14 +345,11 @@ notok: dey
|
|||
bne compose ; wrong type - try next path directory
|
||||
|
||||
;; Tell BASIC.SYSTEM it was handled.
|
||||
lda #0
|
||||
sta XCNUM
|
||||
sta PBITS
|
||||
sta PBITS+1
|
||||
lda #<XRETURN
|
||||
sta XTRNADDR
|
||||
lda #>XRETURN
|
||||
sta XTRNADDR+1
|
||||
ldx #xtrnaddr_len - 1
|
||||
: lda xtrnaddr,x
|
||||
sta XTRNADDR,x
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
;; MLI/BI trashes part of INBUF (clock driver?), so stash it in upper half.
|
||||
ldx #$7F
|
||||
|
@ -375,14 +371,12 @@ notok: dey
|
|||
sta RWREFNUM
|
||||
sta CFREFNUM
|
||||
|
||||
lda #<cmd_load_addr
|
||||
sta RWDATA
|
||||
lda #>cmd_load_addr
|
||||
sta RWDATA+1
|
||||
lda #<max_cmd_size
|
||||
sta RWCOUNT
|
||||
lda #>max_cmd_size
|
||||
sta RWCOUNT+1
|
||||
;; Assign `RWDATA` and `RWCOUNT`
|
||||
ldx #rwdata_len - 1
|
||||
: lda rwdata,x
|
||||
sta RWDATA,x
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
lda #READ
|
||||
jsr GOSYSTEM
|
||||
|
@ -408,6 +402,22 @@ notok: dey
|
|||
fail_load:
|
||||
rts
|
||||
|
||||
|
||||
;;; Assigned to `XTRNADDR`, `XLEN`, `XCNUM`, and `PBITS`
|
||||
xtrnaddr:
|
||||
.addr XRETURN ; assigned to `XTRNADDR`
|
||||
xlen: .byte 0 ; assigned to `XLEN`
|
||||
.byte 0 ; assigned to `XCNUM`
|
||||
.word 0 ; assigned to `PBITS`
|
||||
xtrnaddr_len = * - xtrnaddr
|
||||
|
||||
|
||||
;;; Assigned to `RWDATA` and `RWCOUNT`
|
||||
rwdata:
|
||||
.addr cmd_load_addr ; assigned to `RWDATA`
|
||||
.word max_cmd_size ; assigned to `RWCOUNT`
|
||||
rwdata_len = * - rwdata
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
execute:
|
||||
|
|
|
@ -33,6 +33,13 @@ FT_DIR = $0F
|
|||
FT_CMD = $F0
|
||||
FT_BAS = $FC
|
||||
|
||||
ACCESS_D = %10000000 ; Access: Destroy-Enable
|
||||
ACCESS_RN = %01000000 ; Access: Rename-Enable
|
||||
ACCESS_B = %00100000 ; Access: Backup
|
||||
ACCESS_I = %00000100 ; Access: Invisible
|
||||
ACCESS_W = %00000010 ; Access: Write-Enable
|
||||
ACCESS_R = %00000001 ; Access: Read-Enable
|
||||
|
||||
;;; ============================================================
|
||||
;;; BASIC.SYSTEM Global Page
|
||||
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
;;; ============================================================
|
||||
;;;
|
||||
;;; UNHIDE - Mark a file as not invisible
|
||||
;;;
|
||||
;;; Usage: UNHIDE filename[,S#][,D#]
|
||||
;;;
|
||||
;;; * filename can be relative or absolute path
|
||||
;;;
|
||||
;;; ============================================================
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "more_apple2.inc"
|
||||
.include "prodos.inc"
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
.org $4000
|
||||
|
||||
;; NOTE: Assumes XLEN is set by PATH
|
||||
|
||||
;; Point BI's parser at the command execution routine.
|
||||
lda #<execute
|
||||
sta XTRNADDR
|
||||
lda #>execute
|
||||
sta XTRNADDR+1
|
||||
|
||||
;; Mark command as external (zero).
|
||||
lda #0
|
||||
sta XCNUM
|
||||
|
||||
;; Set accepted parameter flags
|
||||
|
||||
;; Filename
|
||||
lda #PBitsFlags::FN1
|
||||
sta PBITS
|
||||
|
||||
;; Slot & Drive handling
|
||||
lda #PBitsFlags::SD
|
||||
sta PBITS+1
|
||||
|
||||
clc ; Success (so far)
|
||||
rts1: rts ; Return to BASIC.SYSTEM
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
execute:
|
||||
;; Get the existing file info
|
||||
lda #$A
|
||||
sta SSGINFO
|
||||
lda #GET_FILE_INFO
|
||||
jsr GOSYSTEM
|
||||
bcs rts1
|
||||
|
||||
;;; --------------------------------------------------
|
||||
|
||||
;; Set invisible bit
|
||||
lda FIACESS
|
||||
and #<(~ACCESS_I)
|
||||
sta FIACESS
|
||||
|
||||
;; Set new file info
|
||||
lda #$7
|
||||
sta SSGINFO
|
||||
|
||||
lda #SET_FILE_INFO
|
||||
jmp GOSYSTEM
|
||||
|
||||
;;; --------------------------------------------------
|
Loading…
Reference in New Issue