home *** CD-ROM | disk | FTP | other *** search
/ Languages Around the World / LanguageWorld.iso / language / russian / ruswp5 / russkey.asm < prev    next >
Assembly Source File  |  1990-02-24  |  4KB  |  150 lines

  1.  
  2. cseg          segment
  3.               assume    cs:cseg,ds:cseg
  4. zero:
  5.               org    100h
  6. entry:
  7.               jmp    start
  8. trtab         equ    $
  9. ;THE SYMBOLS LOOK MEANINGLESS UNLESS YOU HAVE LOADED THE ega FONT
  10. ;RUSSIAN.EGA
  11.       db     001h,01Eh,'≥' ;Umlaut A
  12.       db     000h,01Eh,'≤' ;umlaut a
  13.       db     00Fh,018h,'⌠' ;umlaut O
  14.       db     000h,018h,'⌡' ;umlaut o
  15.       db     015h,016h,'÷' ;umlaut U
  16.       db     000h,016h,'≈' ;umlaut u
  17.       db     01Ah,02Ch,'°' ;Cap Eszet
  18.       db     000h,02Ch,'∙' ;eszet
  19.       db     02Dh,00Ch,'φ' ;-
  20.       db     05Fh,00Ch,'¥' ;_
  21.       db     03Dh,00Dh,'⌐' ;=
  22.       db     02Bh,00Dh,'ë' ;+
  23.       db     07Ah,02Ch,'º' ;z 
  24.       db     05Ah,02Ch,'ç' ;Z 
  25.       db     078h,02Dh,'σ' ;x 
  26.       db     058h,02Dh,'ò' ;X 
  27.       db     063h,02Eh,'µ' ;c 
  28.       db     043h,02Eh,'û' ;C 
  29.       db     076h,02Fh,'ó' ;v 
  30.       db     056h,02Fh,'é' ;V 
  31.       db     062h,030h,'í' ;b 
  32.       db     042h,030h,'ü' ;B 
  33.       db     06Eh,031h,'¡' ;n 
  34.       db     04Eh,031h,'ì' ;N 
  35.       db     06Dh,032h,'¼' ;m 
  36.       db     04Dh,032h,'î' ;M 
  37.       db     060h,029h,'Ω' ;`
  38.       db     07Eh,029h,'Ü' ;~    
  39.       db     071h,010h,'Θ' ;q 
  40.       db     051h,010h,'Ö' ;Q 
  41.       db     077h,011h,'Φ' ;w 
  42.       db     057h,011h,'ÿ' ;W 
  43.       db     065h,012h,'Ñ' ;e 
  44.       db     045h,012h,'à' ;E 
  45.       db     072h,013h,'α' ;r 
  46.       db     052h,013h,'É' ;R 
  47.       db     074h,014h,'Γ' ;t 
  48.       db     054h,014h,'Æ' ;T 
  49.       db     079h,015h,'δ' ;y 
  50.       db     059h,015h,'¢' ;Y 
  51.       db     075h,016h,'π' ;u 
  52.       db     055h,016h,'ô' ;U 
  53.       db     069h,017h,'¿' ;i 
  54.       db     049h,017h,'ê' ;I 
  55.       db     06Fh,018h,'«' ;o 
  56.       db     04Fh,018h,'Ä' ;O 
  57.       db     070h,019h,'»' ;p 
  58.       db     050h,019h,'Å' ;P 
  59.       db     05Bh,01Ah,'∩' ;[ 
  60.       db     07Bh,01Ah,'ƒ' ;{ 
  61.       db     05Dh,01Bh,'ε' ;] 
  62.       db     07Dh,01Bh,'₧' ;} 
  63.       db     05Ch,02Bh,'±' ;\ 
  64.       db     07Ch,02Bh,'≡' ;|  
  65.       db     061h,01Eh,'á' ;a 
  66.       db     041h,01Eh,'Ç' ;A 
  67.       db     073h,01Fh,'ß' ;s 
  68.       db     053h,01Fh,'æ' ;S 
  69.       db     064h,020h,'ñ' ;d 
  70.       db     044h,020h,'ä' ;D 
  71.       db     066h,021h,'Σ' ;f 
  72.       db     046h,021h,'ö' ;F 
  73.       db     067h,022h,'ú' ;g 
  74.       db     047h,022h,'â' ;G 
  75.       db     068h,023h,'ª' ;h 
  76.       db     048h,023h,'å' ;H 
  77.       db     06Ah,024h,'τ' ;j 
  78.       db     04Ah,024h,'ù' ;J 
  79.       db     06Bh,025h,'¬' ;k 
  80.       db     04Bh,025h,'è' ;K 
  81.       db     06Ch,026h,'½' ;l 
  82.       db     04Ch,026h,'ï' ;L 
  83.       db     03Bh,027h,'∞' ;; 
  84.       db     03Ah,027h,'£' ;: 
  85. trtabl     equ    ($-trtab)/3
  86.  
  87. inah  db   ?              ;ah we called with
  88.  
  89. newi16:
  90.           mov  cs:inah,ah
  91.           pushf
  92.           db   09ah ;far call
  93. oldi16    dw   0,0
  94.           pushf
  95.           push bx
  96.           mov  bl,cs:inah
  97.           cmp  bl,2
  98.           jb   yes
  99.           cmp  bl,10h
  100.           jb   no
  101.           cmp  bl,12h
  102.           jae  no
  103. yes:
  104.           push ds
  105.           xor  bx,bx
  106.           mov  ds,bx
  107.           test byte ptr ds:[417h],10h
  108.           pop  ds
  109.           jz   no ;only when scroll lock is lit
  110.           push cx
  111.           push ds
  112.           push cs
  113.           pop  ds
  114.           mov  bx,offset trtab
  115.           mov  cx,trtabl
  116. scan:     cmp  ax,ds:[bx]
  117.           jnz  scann
  118.       mov  al,ds:[bx+2]
  119.           jmp  short scanx
  120. scann:    add  bx,3
  121.           loop scan
  122. scanx:
  123.           pop  ds
  124.           pop  cx
  125. no:
  126.           pop  bx
  127.           popf
  128.           db   0cah ;retf 2
  129.           dw   2
  130. start:    xor  ax,ax
  131.           mov  ds,ax
  132.           mov  ax,offset newi16
  133.           xchg ax,ds:[16h*4]
  134.           mov  cs:oldi16,ax
  135.           mov  ax,cs
  136.           xchg ax,ds:[16h*4+2]
  137.           mov  cs:oldi16+2,ax
  138.           push cs
  139.           pop  ds
  140.          mov  dx,offset msg
  141.           mov  ah,9
  142.           int  21h
  143.           mov  dx,(start-zero+15)/16
  144.          mov  ax,3100h
  145.           int  21h
  146. msg       db   'Russian keyboard driver loaded. Hot key is Scroll Lock'
  147.           db   13,10,'$'
  148. cseg      ends
  149.       end  entry
  150.