mirror of
https://github.com/a2stuff/prodos-path.git
synced 2025-01-06 18:30:00 +00:00
Remove unnecessary parameter validation
This commit is contained in:
parent
86bafa4b76
commit
e037edebcf
26
chtime.cmd.s
26
chtime.cmd.s
@ -34,38 +34,20 @@
|
||||
|
||||
;; Set accepted parameter flags
|
||||
|
||||
lda #PBitsFlags::FN1 ; Filename
|
||||
;; Filename
|
||||
lda #PBitsFlags::FN1
|
||||
sta PBITS
|
||||
|
||||
;; Address, Byte, Slot & Drive handling
|
||||
;; Address (A=Date word), Byte (B=Time word), Slot & Drive handling
|
||||
lda #PBitsFlags::AD | PBitsFlags::B | PBitsFlags::SD
|
||||
sta PBITS+1
|
||||
|
||||
clc ; Success (so far)
|
||||
rts ; Return to BASIC.SYSTEM
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
not_ours:
|
||||
sec ; Signal failure...
|
||||
next_command := *+1
|
||||
jmp $ffff ; Execute next command in chain
|
||||
rts1: rts ; Return to BASIC.SYSTEM
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
execute:
|
||||
;; Verify required arguments
|
||||
|
||||
lda FBITS
|
||||
and #PBitsFlags::FN1 ; Filename?
|
||||
bne :+
|
||||
lda #$10 ; SYNTAX ERROR
|
||||
sec
|
||||
rts1: rts
|
||||
:
|
||||
|
||||
;;; --------------------------------------------------
|
||||
|
||||
;; Get the existing file info
|
||||
lda #$A
|
||||
sta SSGINFO
|
||||
|
22
chtype.cmd.s
22
chtype.cmd.s
@ -33,32 +33,22 @@
|
||||
lda #0
|
||||
sta XCNUM
|
||||
|
||||
;; Set accepted parameter flags (Name, Type, Address)
|
||||
;; Set accepted parameter flags
|
||||
|
||||
lda #PBitsFlags::T | PBitsFlags::FN1 ; Filename and Type
|
||||
;; Filename and Type
|
||||
lda #PBitsFlags::T | PBitsFlags::FN1
|
||||
sta PBITS
|
||||
|
||||
lda #PBitsFlags::AD | PBitsFlags::SD ; Address, Slot & Drive handling
|
||||
;; Address (used as AuxType), Slot & Drive handling
|
||||
lda #PBitsFlags::AD | PBitsFlags::SD
|
||||
sta PBITS+1
|
||||
|
||||
clc ; Success (so far)
|
||||
rts ; Return to BASIC.SYSTEM
|
||||
rts1: rts ; Return to BASIC.SYSTEM
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
execute:
|
||||
;; Verify required arguments
|
||||
|
||||
lda FBITS
|
||||
and #PBitsFlags::FN1 ; Filename?
|
||||
bne :+
|
||||
lda #$10 ; SYNTAX ERROR
|
||||
sec
|
||||
rts1: rts
|
||||
:
|
||||
|
||||
;;; --------------------------------------------------
|
||||
|
||||
;; Get the existing file info
|
||||
lda #$A
|
||||
sta SSGINFO
|
||||
|
Loading…
Reference in New Issue
Block a user