function fastcall msxsnsmat(treg as ubyte) as ubyte:
  asm
    call $0141
    end asm
  end function

'- missing keyboard matrix info
' 0   7 6 5 4 3 2 1 0
' 1   ; ] [ \ = - 9 8
' 2   B A ? / > < ~ "
' 3   J I H G F E D C
' 4   R Q P O N M L K
' 5   Z Y X W V U T S
' 6   F3 F2 F1 Cd Cl Gr Ct Sh
' 7   Rt Sl Bs St Tb Es F5 F4
' 8   → ↓ ↑ ←  Dl In Hm Sp
' 9   n4 n3 n2 n1 n0 n/ n+ n*
'10   n. n, n- n9 n8 n7 n6 n5



