Just as a recap, a complete XROM entry is a 16 bits value
XROM module ID are between 1 and 31 (included, 5 bits used)
XROM function ID are between 0 and 63 (included, 6 bits used)
XROM prefix is 10100 so encoding is → 10100MMM MMFFFFFF
Code: Select all
XROM: 1: 1 → 10100:00001:000001 → 10100000 01000001 → 0xA041
XROM: 1:63 → 10100:00001:111111 → 10100000 01111111 → 0xA07F
XROM:31: 1 → 10100:11111:000001 → 10100111 11000001 → 0xA7C1
XROM:31:63 → 10100:11111:111111 → 10100111 11111111 → 0xA7FF
The first word in a 4K ROM page contains the XROM module ID.
To my knowledge, the value can be higher than 31 but the functions in it will not be callable by a FOCAL program.
Edit: removed invalid values and added the first word comment after reading Ángel post.