Apple2: factorize MLI pathname setting (up to -22 bytes)

This commit is contained in:
Colin Leroy-Mira
2025-10-25 13:45:31 +02:00
committed by Oliver Schmidt
parent 850accee3a
commit 9390e5c2ce
7 changed files with 40 additions and 25 deletions

View File

@@ -53,6 +53,13 @@ EOF_COUNT = 2
.struct MLI
.union
; Pseudo-struct to make clear that calls with a
; PATHNAME parameter always have PATHNAME in the
; same place
.struct PATH
PARAM_COUNT .byte
PATHNAME .addr
.endstruct
.struct RW_BLOCK
PARAM_COUNT .byte
UNIT_NUM .byte
@@ -130,6 +137,13 @@ EOF_COUNT = 2
.endunion
.endstruct
; Assert that PATHNAME parameters is always at the same place
.assert MLI::CREATE::PATHNAME = MLI::PATH::PATHNAME, error
.assert MLI::DESTROY::PATHNAME = MLI::PATH::PATHNAME, error
.assert MLI::INFO::PATHNAME = MLI::PATH::PATHNAME, error
.assert MLI::PREFIX::PATHNAME = MLI::PATH::PATHNAME, error
.assert MLI::OPEN::PATHNAME = MLI::PATH::PATHNAME, error
.global mliparam
.global callmli