Skip to content

Commit 14cb5dc

Browse files
committed
Normalize and optimize ti_PutC and ti_GetName entries
1 parent 110d115 commit 14cb5dc

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/fileioc/fileioc.asm

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -669,19 +669,17 @@ ti_PutC:
669669
; sp + 6 : Slot number
670670
; return:
671671
; Character written if no failure
672-
pop de
673672
pop hl
673+
pop de
674674
pop bc
675675
push bc
676-
push hl
677676
push de
678-
ld a, l
677+
push hl
678+
ld a, e
679679
ld (char_in), a
680680
call util_is_slot_open
681681
jp nz, util_ret_neg_one
682-
push hl
683682
call util_is_in_ram
684-
pop hl
685683
jp c, util_ret_neg_one
686684
_PutChar:
687685
call util_get_slot_size
@@ -1144,15 +1142,13 @@ ti_GetName:
11441142
; sp + 6 : slot index
11451143
; return:
11461144
; n/a
1147-
pop de
11481145
pop hl
1146+
pop de
11491147
pop bc
11501148
push bc
1151-
push hl
11521149
push de
11531150
push hl
11541151
call util_is_slot_open
1155-
pop de
11561152
ret nz
11571153
call util_get_vat_ptr
11581154
ld hl, (hl)

0 commit comments

Comments
 (0)