This commit is contained in:
4am 2018-04-15 12:29:24 -04:00
parent b6e5ed072e
commit d5dec7a660
12 changed files with 64 additions and 45 deletions

View File

@ -1,7 +1,7 @@
;license:MIT
;(c) 2018 by 4am
;
; load and launch the On Beyond Z-Machine! interpreter
; glue code to load, set up, and launch the On Beyond Z-Machine! interpreter
;
; Public functions
; - ClearInterpreterOptions

View File

@ -1,3 +1,9 @@
;license:MIT
;(c) 2018 by 4am
;
; common assembler macros
;
PARAM = $00
!macro PARAMS_ON_STACK .bytes {

View File

@ -1,3 +1,11 @@
;license:MIT
;(c) 2018 by 4am
;
; Common functions across parsers
;
; Public functions:
; - ParseKeyValueText
;
;------------------------------------------------------------------------------
; ParseKeyValueText
; parse buffer with KEY=VALUE lines of text into an okvs

View File

@ -1,7 +1,7 @@
;license:MIT
;(c) 2018 by 4am
;
; Parser for game list
; Parser for game list file
;
; Public functions
; - LoadGameList

View File

@ -1,7 +1,7 @@
;license:MIT
;(c) 2018 by 4am
;
; Global preferences
; Parser for global preferences file
;
; Public functions
; - LoadGlobalPreferences

View File

@ -1,6 +1,8 @@
;license:MIT
;(c) 2018 by 4am
;
; It is Pitch Dark. You are likely to be eaten by a GUI.
;
; Public entry points
; - MainScreen

View File

@ -1,13 +1,14 @@
;license:MIT
;(c) 2017-8 by 4am
;
; ProDOS and file routines
; ProDOS - file and other MLI routines
;
; Public functions
; - LoadFile
; - LoadDHRFile
; - SaveFile
; - SetPrefix
; - GetFileInfo
; - QuitToProDOS
;
@ -248,6 +249,8 @@ GetFileInfo
jmp _getfileinfo
}
;------------------------------------------------------------------------------
;-------------------------------
; open file via ProDOS MLI
;

View File

@ -1,7 +1,7 @@
;license:MIT
;(c) 2018 by 4am
;
; Functions to build a ProDOS pathname from length-prefixed strings
; ProDOS - functions for constructing and passing around ProDOS pathnames
;
; Public functions
; - ResetPath
@ -77,38 +77,3 @@ SetStartupPath
bpl -
rts
}
;------------------------------------------------------------------------------
; CreateNullTerminatedString
; Copy a length-prefixed string to kNullTerminatedBuffer and null-terminate it.
; Destination string is left-padded with a single space because reasons.
; Maximum length is 127 bytes.
;
; in: A/Y contains address of length-prefixed string to copy
; X contains length of null-terminated string -- if > length of source,
; remaining buffer will be padded with spaces (#$A0)
; out: X preserved
; all other registers and flags clobbered
; $00/$01 clobbered
;------------------------------------------------------------------------------
!zone {
CreateNullTerminatedString
+STAY $00
phx
lda #$A0
- dex
sta kNullTerminatedBuffer,x
bpl -
plx
lda #$00
sta kNullTerminatedBuffer,x
lda ($00)
tay
- lda ($00),y
sta kNullTerminatedBuffer,y
dey
bne -
rts
}

View File

@ -8,7 +8,7 @@
; Public functions
; - DisconnectRAM32
;
; TODO reconnect on exit
; does not reconnect /RAM on exit, which is rude
;
MLI = $BF00 ; ProDOS MLI entry point
NODEV = $BF10 ; means 'no device connected'

View File

@ -11,6 +11,7 @@
; - PrintAt
; - SimulateClick
; - GetCheckedRadioButton
; - CreateNullTerminatedString
;
; Public constants
; - kStringOK
@ -197,3 +198,38 @@ GetCheckedRadioButton
clc
rts
}
;------------------------------------------------------------------------------
; CreateNullTerminatedString
; Copy a length-prefixed string to kNullTerminatedBuffer and null-terminate it.
; Destination string is left-padded with a single space because reasons.
; Maximum length is 127 bytes.
;
; in: A/Y contains address of length-prefixed string to copy
; X contains length of null-terminated string -- if > length of source,
; remaining buffer will be padded with spaces (#$A0)
; out: X preserved
; all other registers and flags clobbered
; $00/$01 clobbered
;------------------------------------------------------------------------------
!zone {
CreateNullTerminatedString
+STAY $00
phx
lda #$A0
- dex
sta kNullTerminatedBuffer,x
bpl -
plx
lda #$00
sta kNullTerminatedBuffer,x
lda ($00)
tay
- lda ($00),y
sta kNullTerminatedBuffer,y
dey
bne -
rts
}

View File

@ -14,8 +14,7 @@ SPEAKER = $C030
; SoftBell
;
; in: none
; out: all registers preserved
; all flags clobbered
; out: all registers and flags preserved
;------------------------------------------------------------------------------
SoftBell
php

View File

@ -157,8 +157,8 @@ VersionsDialog
lda #ID_VERSIONS_FRAME
jsr WeeGUI
lda #1 ; WeeGUI radio button labels are limited to 15 characters, so we have
sta .vtab ; just the hotkeys (1-9) in the radio button label then print the
lda #1 ; WeeGUI radio buttons are limited to 15 characters, so we have just the
sta .vtab ; hotkeys (1-9) 'in' the radio button then print the labels separately
jsr okvs_iter_values
!word gVersionsStore
!word PrintVersionLabelCallback