PUBLIC F2252_
F2252_ PROC
                push    esi
                push    edi
                push    ebx
                mov     ah, 0           ; Function: Initialize keyboard
                int     90h             ; FM-Towns Keyboard BIOS call
                mov     ah, 5           ; Function: Click sound control
                mov     al, 1           ; Disable click sound
                int     90h             ; FM-Towns Keyboard BIOS call
                mov     ah, 2           ; Function: Encoding setting for function 7h (check input) and 9h (read character)
                mov     dx, 0           ; Encoding ASCII, no key mask
                int     90h             ; FM-Towns Keyboard BIOS call
                pop     ebx
                pop     edi
                pop     esi
                ret
F2252_ ENDP

PUBLIC F2253_KEYREAD
F2253_KEYREAD PROC
                push    esi
                push    edi
                push    ebx
                mov     ah, 9           ; Function: Read character
                mov     al, 0           ; Wait for input
                int     90h             ; FM-Towns Keyboard BIOS call
                mov     al, bh          ; BH: key address
                mov     ah, bl          ; BL: shift key state. Bit 0: Small/Large, Bit 1: Caps lock
                and     eax, 14FFh      ; Keep only bits for the SHIFT (0x0400) and CTRL (0x1000) modifier keys
                pop     ebx
                pop     edi
                pop     esi
                ret
F2253_KEYREAD ENDP
