From 3b8531a4227a28f14fe8efdd4a7250c188102208 Mon Sep 17 00:00:00 2001 From: Colin Leroy-Mira Date: Sat, 25 Oct 2025 11:45:59 +0200 Subject: [PATCH] Apple2: -5 bytes on open() --- libsrc/apple2/open.s | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/libsrc/apple2/open.s b/libsrc/apple2/open.s index 8f1df26df..134898211 100644 --- a/libsrc/apple2/open.s +++ b/libsrc/apple2/open.s @@ -68,8 +68,7 @@ errno: jsr incsp4 ; Preserves A jmp ___directerrno ; Save fdtab slot -found: tya - pha +found: sty tmp2 ; Alloc I/O buffer lda #<(fdtab + FD::BUFFER) @@ -81,15 +80,7 @@ found: tya jsr pushax ; Preserves A ldx #>$0400 jsr iobuf_alloc - tay ; Save errno code - - ; Restore fdtab slot - pla - sta tmp2 ; Save fdtab slot - - ; Check for error - tya ; Restore errno code - bne errno + bne errno ; Check for error ; Get and save flags jsr popax