shave some bytes

This commit is contained in:
4am 2021-07-10 20:53:57 -04:00
parent fe21da1a00
commit 696f20ba49
3 changed files with 25 additions and 12 deletions

View File

@ -10,7 +10,7 @@ HardDiskName_e
; which should be a hard disk
;
; in: HardDiskArray populated
; user's select target is a hard disk
; user's selected target is a hard disk
; ProDOS is not in memory
; out: if C set, create or open failed (A contains MLI error code)
; if C clear, everything succeeded (A is clobbered)

View File

@ -39,6 +39,19 @@ SwapProDOS
plp
- rts
;-------------------------------
; MoveT00PakLow/MoveT00PakHigh
;
; Copy compressed blob of track 0 patchers
; from low memory to high memory or vice versa.
; Each entry point is always safe to call,
; e.g. if the blob is already low and you call
; MoveT00PakLow, it just exits.
;
; in: none
; out: if blob needs to be copied, exits via CopyMemory
; if no action, all registers preserved
;-------------------------------
MoveT00PakLow
bit T00PakPtr+1
bpl - ; already low

View File

@ -98,7 +98,7 @@ SetMark
sta mliparam+1 ; store file reference number
lda #CMD_SETMARK ; MLI set_mark command
ldy #PC_SETMARK ; number of params for 'set_mark' cmd
bne JsrMLIAndReturnPlus1
bne JsrMLIAndReturnPlus1 ; always branches
;-------------------------------
; write to an open file via ProDOS MLI
@ -115,7 +115,7 @@ WriteFile
sta mliparam+1 ; store file reference number
lda #CMD_WRITE ; MLI write command
ldy #PC_WRITE ; number of parameters for 'write' command
bne JsrMLIAndReturnPlus1
bne JsrMLIAndReturnPlus1 ; always branches
;-------------------------------
; set file size in an open file via ProDOS MLI
@ -132,7 +132,7 @@ SetEOF
sta mliparam+1 ; store file reference number
lda #CMD_SETEOF ; MLI set_eof command
ldy #PC_SETEOF ; number of params for 'set_eof' cmd
bne JsrMLIAndReturnPlus1
bne JsrMLIAndReturnPlus1 ; always branches
;-------------------------------
; get volume name of disk in specific slot+drive
@ -163,7 +163,7 @@ GetVolumeName
Online
lda #CMD_ONLINE
ldy #PC_ONLINE
bne mli
bne mli ; always branches
;-------------------------------
; query volume information
@ -270,17 +270,17 @@ CreateBinFile
CreateTxtFile
ldy #$04
lda #$01
+ sta mliparam+7 ; storage type (directory or file)
+ pha ; storage type (directory or file)
sty mliparam+4 ; file type (directory or binary)
lda #FULL_ACCESS
sta mliparam+3 ; access bits (full access)
lda #0
sta mliparam+5 ; aux type (none)
sta mliparam+6
sta mliparam+8 ; creation date (current)
sta mliparam+9
sta mliparam+10 ; creation time (current)
sta mliparam+11
ldy #6
- sta mliparam+5,y ; aux type (none) + creation datetime (current)
dey
bpl -
pla
sta mliparam+7 ; storage type (directory or file)
lda #CMD_CREATE ; MLI create command
ldy #PC_CREATE ; number of parameters for 'create' command
bne mli ; always branches