mirror of
https://github.com/a2-4am/passport.git
synced 2024-10-06 01:57:34 +00:00
shave some bytes
This commit is contained in:
parent
fe21da1a00
commit
696f20ba49
@ -10,7 +10,7 @@ HardDiskName_e
|
|||||||
; which should be a hard disk
|
; which should be a hard disk
|
||||||
;
|
;
|
||||||
; in: HardDiskArray populated
|
; in: HardDiskArray populated
|
||||||
; user's select target is a hard disk
|
; user's selected target is a hard disk
|
||||||
; ProDOS is not in memory
|
; ProDOS is not in memory
|
||||||
; out: if C set, create or open failed (A contains MLI error code)
|
; out: if C set, create or open failed (A contains MLI error code)
|
||||||
; if C clear, everything succeeded (A is clobbered)
|
; if C clear, everything succeeded (A is clobbered)
|
||||||
|
13
src/memory.a
13
src/memory.a
@ -39,6 +39,19 @@ SwapProDOS
|
|||||||
plp
|
plp
|
||||||
- rts
|
- 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
|
MoveT00PakLow
|
||||||
bit T00PakPtr+1
|
bit T00PakPtr+1
|
||||||
bpl - ; already low
|
bpl - ; already low
|
||||||
|
22
src/mli.a
22
src/mli.a
@ -98,7 +98,7 @@ SetMark
|
|||||||
sta mliparam+1 ; store file reference number
|
sta mliparam+1 ; store file reference number
|
||||||
lda #CMD_SETMARK ; MLI set_mark command
|
lda #CMD_SETMARK ; MLI set_mark command
|
||||||
ldy #PC_SETMARK ; number of params for 'set_mark' cmd
|
ldy #PC_SETMARK ; number of params for 'set_mark' cmd
|
||||||
bne JsrMLIAndReturnPlus1
|
bne JsrMLIAndReturnPlus1 ; always branches
|
||||||
|
|
||||||
;-------------------------------
|
;-------------------------------
|
||||||
; write to an open file via ProDOS MLI
|
; write to an open file via ProDOS MLI
|
||||||
@ -115,7 +115,7 @@ WriteFile
|
|||||||
sta mliparam+1 ; store file reference number
|
sta mliparam+1 ; store file reference number
|
||||||
lda #CMD_WRITE ; MLI write command
|
lda #CMD_WRITE ; MLI write command
|
||||||
ldy #PC_WRITE ; number of parameters for '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
|
; set file size in an open file via ProDOS MLI
|
||||||
@ -132,7 +132,7 @@ SetEOF
|
|||||||
sta mliparam+1 ; store file reference number
|
sta mliparam+1 ; store file reference number
|
||||||
lda #CMD_SETEOF ; MLI set_eof command
|
lda #CMD_SETEOF ; MLI set_eof command
|
||||||
ldy #PC_SETEOF ; number of params for 'set_eof' cmd
|
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
|
; get volume name of disk in specific slot+drive
|
||||||
@ -163,7 +163,7 @@ GetVolumeName
|
|||||||
Online
|
Online
|
||||||
lda #CMD_ONLINE
|
lda #CMD_ONLINE
|
||||||
ldy #PC_ONLINE
|
ldy #PC_ONLINE
|
||||||
bne mli
|
bne mli ; always branches
|
||||||
|
|
||||||
;-------------------------------
|
;-------------------------------
|
||||||
; query volume information
|
; query volume information
|
||||||
@ -270,17 +270,17 @@ CreateBinFile
|
|||||||
CreateTxtFile
|
CreateTxtFile
|
||||||
ldy #$04
|
ldy #$04
|
||||||
lda #$01
|
lda #$01
|
||||||
+ sta mliparam+7 ; storage type (directory or file)
|
+ pha ; storage type (directory or file)
|
||||||
sty mliparam+4 ; file type (directory or binary)
|
sty mliparam+4 ; file type (directory or binary)
|
||||||
lda #FULL_ACCESS
|
lda #FULL_ACCESS
|
||||||
sta mliparam+3 ; access bits (full access)
|
sta mliparam+3 ; access bits (full access)
|
||||||
lda #0
|
lda #0
|
||||||
sta mliparam+5 ; aux type (none)
|
ldy #6
|
||||||
sta mliparam+6
|
- sta mliparam+5,y ; aux type (none) + creation datetime (current)
|
||||||
sta mliparam+8 ; creation date (current)
|
dey
|
||||||
sta mliparam+9
|
bpl -
|
||||||
sta mliparam+10 ; creation time (current)
|
pla
|
||||||
sta mliparam+11
|
sta mliparam+7 ; storage type (directory or file)
|
||||||
lda #CMD_CREATE ; MLI create command
|
lda #CMD_CREATE ; MLI create command
|
||||||
ldy #PC_CREATE ; number of parameters for 'create' command
|
ldy #PC_CREATE ; number of parameters for 'create' command
|
||||||
bne mli ; always branches
|
bne mli ; always branches
|
||||||
|
Loading…
Reference in New Issue
Block a user