How can I change the texts assigned to MSX function keys using Z80 ASM?
1 Answer
I answer myself:
At address 0xf87f (FNKSTR), at the system variables memory, there are 160 bytes where you can change the values of the 10 function keys (16 bytes each).
The strings are in ASCIIZ (zero terminated string).
EDIT:
; Sample code (compiled with sjasmplus)
OUTPUT test.bin
db $fe
dw start, newtext_end, start
ORG $8000
; Change the F1 key text
start:
ld hl,newtext
ld de,$f87f
ld bc,newtext_end-newtext
ldir
ret
newtext:
db "?\"Hi you!\"",0
newtext_end:
-
5
-
1An improvement to your sample code would be calling DSPFNK (00CFH) after chaning the work area contents, so that you don't need to
key on
from BASIC. Oct 2, 2019 at 8:22 -
It's true, but the question is about to change the Function Keys text, not about update them at screen bottom. Anyway is good to known that! Thanks. Oct 2, 2019 at 8:35