Files
open-roms/c64/kernal/iostack/findfls.s
T

27 lines
403 B
ArmAsm

#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// Just a helper routine
// Find the LAT / SAT / FAT entry index where LAT corresponds to A, returns index in Y
// Carry flag set means not found
find_fls:
ldy LDTND
!:
dey
bmi find_fls_not_found // no more entries
cmp LAT, y
bne !- // does not match, try the next one
clc
rts
find_fls_not_found:
sec
rts
#endif // ROM layout