mirror of
https://github.com/a2-4am/passport.git
synced 2024-09-07 23:54:47 +00:00
36 lines
898 B
Plaintext
36 lines
898 B
Plaintext
;-------------------------------
|
|
; SavePrefs
|
|
; save preferences to file
|
|
;
|
|
; in: ProDOS in not in memory
|
|
;-------------------------------
|
|
!macro SavePrefs {
|
|
jsr SwapProDOS ; ProDOS out -> in
|
|
lda gChangedPrefs
|
|
bne +
|
|
lda #<PREFSFILE
|
|
sta mliparam+1
|
|
lda #>PREFSFILE
|
|
sta mliparam+2
|
|
jsr DeleteFile ; don't care if this fails
|
|
jsr CreateTxtFile
|
|
bcs +
|
|
lda #<PREFSBUFFER
|
|
sta mliparam+3
|
|
lda #>PREFSBUFFER
|
|
sta mliparam+4
|
|
jsr OpenFile
|
|
bcs +
|
|
ldy #<PREFSVER
|
|
sty mliparam+2
|
|
ldy #>PREFSVER
|
|
sty mliparam+3
|
|
ldy #<PREFSWRITELEN
|
|
sty mliparam+4
|
|
ldy #>PREFSWRITELEN
|
|
sty mliparam+5
|
|
jsr WriteFile
|
|
jsr CloseFile
|
|
+
|
|
}
|