home *** CD-ROM | disk | FTP | other *** search
/ SeeIn AO / ALICE-CD.BIN / Šj”­ƒlƒbƒg�•‚»‚Ì‘¼ / nv_mini / source / nvkey.adv < prev    next >
Text File  |  1998-08-31  |  9KB  |  364 lines

  1. ;===============================================================================
  2. ; NVSYSTEM-mini âLü[è╓îW                                programmed by ALICE SOFT
  3. ;===============================================================================
  4.  
  5. ;===============================================================================
  6. ; InitKey(),RemoveKey()
  7.  
  8. **InitKey:
  9.     ~GetKey:
  10.     ~0,0:
  11.  
  12. **RemoveKey:
  13.     ~0,0:
  14.  
  15. ;===============================================================================
  16. ; GetKey(),GetKeyMatrix()
  17.  
  18. **GetKey:
  19.     US a01,30:
  20.     IM Msx,Msy:
  21.     !Mkd:RND!
  22.     IK 6:
  23.     !Mkd:Mkd|RND!
  24.     {(RND&0b01110000)=0b01110000:    ; ESC+Space+Return check
  25.         ~RemoveNvSystem:            ;
  26.         ZZ 0,0:                        ;
  27.     }                                ;
  28.     ~GetKeyMatrix:
  29.     {(Mkd&0b01000000)\0:!Mkd:Mkd|0b00100000!}    ; ESC é¬ëƒé│éΩé─éóé╜éτSPCé¬ëƒé│éΩé─éóéΘ
  30.     IX bIxResult:                                ; é▒é╞é╔é╖éΘüiÄbÆΦüj
  31.     UG a01,30:
  32.     ~0,0:
  33.  
  34. **GetKeyMatrix:
  35.     US a01,30:
  36.     #MatrixTbl,1:
  37.     DF kDat[0],kMax,0:
  38.     < a01,0,0xffff,1,1:
  39.         F3,a02,a01:
  40.         { a02=0xffff:@GetKeyMatrixOut:}
  41.         IG kDat[a02],a02,1,0:
  42.         >
  43.  
  44. *GetKeyMatrixOut:
  45.     UG a01,30:
  46.     ~0,0:
  47.  
  48. ;-------------------------------------------------------------------------------
  49. *MatrixTbl:
  50.     _KeyMatrix:
  51. *KeyMatrix:
  52.     [ 0x0010,0x0011,0x0021,0x0022,0x0024 ]    ; shift,ctrl,pageup,pagedown,home
  53.     [ 0x0030,0x0031,0x0032,0x0033,0x0034 ]    ; 0,1,2,3,4
  54.     [ 0x0035,0x0036,0x0037,0x0038,0x0039 ]    ; 5,6,7,8,9
  55.     [ 0xffff ]                                ; end-code
  56.  
  57. ;===============================================================================
  58. ; PushKeyWait()
  59.  
  60. **PushKeyWait f01:
  61.     US a01,30:
  62.     NB a01,f01,1:
  63.     ~GetRpFlag CurRPage:~~a02:
  64.     {(a01=TRUE)*(a02=TRUE):@PKWout:}
  65.  
  66.     ~GetIxResult:~~a03:
  67.     ~GetRp CurRPage:~~a04:
  68.     { (a04=TRUE)*(a03=TRUE):
  69.         @PKWout:
  70.     }
  71.     { (a04=FALSE)*(a03=TRUE):
  72.         ~SetIxResult FALSE:
  73.     }
  74.  
  75.     { StrHideFlag = TRUE:
  76.         ~StopKeyPlus:
  77.         @PKWout1:
  78.     }
  79.  
  80.     ~InitPutPushKey:
  81.     { SpStrCount=NULL:@PKWSkip1:}
  82.  
  83. *PKWSkip0:    ;-------------ô┴ÄΩò╢ÄÜé¬éáéΘÅΩìç
  84.     ~SetSelSpStrBuff 0:
  85. *PKWSkip0a:
  86.     ~Select 1,SpStrCount,0b11111:
  87.     ~~a01:!a02:RND!
  88.     { a01\0xffff:~PutSpMsg a01,TRUE:@PKWSkip0:}
  89.     { a01=0xffff:
  90.         {(a02&32)\0 :~SystemMenu:@PKWSkip0:}
  91.         { a02=0x8000:@PKWSkip0:}
  92.         { a02=0x8001:@PKWout:}
  93.         }
  94.     ~GetKey:
  95.     <@ Mkd\0:
  96.         ~PutPushKeyWaitSub:
  97.         ~GetKey:
  98.         ~CheckAccelerator:
  99.         ~CheckShiftKey:~~Res:{ Res=TRUE:!Mkd:0xffff!}
  100.         >
  101.     @PKWout:
  102.  
  103. *PKWSkip1:    ;-------------ô┴ÄΩò╢ÄÜé¬é╚é⌐é┴é╜ÅΩìç
  104.     ~GetKey:
  105.     <@ Mkd\0:
  106.         ~PutPushKeyWaitSub:
  107.         ~GetKey:
  108.         ~CheckAccelerator:
  109.         ~CheckShiftKey:~~Res:
  110.         { Res=TRUE:@PKWout:}
  111.         >
  112.     <@ Mkd=0:
  113.         ~PutPushKeyWaitSub:
  114.         ~GetKey:
  115.         {(Mkd&0x0020)\0:
  116.             ~SystemMenu:@PKWSkip1:}
  117.         ~CheckAccelerator:
  118.         ~CheckShiftKey:~~Res:
  119.         { Res=TRUE:@PKWout:}
  120.         >
  121.     <@ Mkd\0:
  122.         ~PutPushKeyWaitSub:
  123.         ~GetKey:
  124.         ~CheckAccelerator:
  125.         ~CheckShiftKey:~~Res:
  126.         { Res=TRUE:@PKWout:}
  127.         >
  128.     @PKWout:
  129.  
  130. *PKWout:
  131.     { PushKeyStatus=TRUE:~PutPushKeyMark PushKeysP,FALSE:}
  132. *PKWout1:
  133.     UG a01,30:
  134.     ~0,0:
  135.  
  136. ;===============================================================================
  137. **InitPutPushKey:
  138.     US a01,30:
  139.     ~CheckLastStr:~~PushKeysP:
  140.     !PushKeyStatus:TRUE!
  141.     ~PutPushKeyMark PushKeysP,TRUE:
  142.     ~TimerSet 0:
  143.     UG a01,30:
  144.     ~0,0:
  145.  
  146. **PutPushKeyWaitSub:
  147.     US a01,30:
  148.     ~TimerGet:~~a01:
  149.     { a01>DefPushKeyWaitTime:
  150.         !PushKeyStatus:PushKeyStatus^1!
  151.         ~PutPushKeyMark PushKeysP,PushKeyStatus:
  152.         ~TimerSet 0:
  153.         }
  154.     UG a01,30:
  155.     ~0,0:
  156.  
  157. **PutPushKeyMark f01,f02:
  158.     US a01,30:
  159.     NB a01,f01,2:
  160.     !a03:16!
  161.     !a04:sX[a01]+sFSize[a01]!
  162.     !a05:sY[a01]+sFSize[a01]+StrYSpace-(a03+StrYSpace)!
  163.     { a02=TRUE:~SetFSize a03:T a04,a05:'üÑ'}
  164.     { a02=FALSE:CC a04,a05+YSize,a03+StrYSpace,a03+StrYSpace,a04,a05:}
  165.     UG a01,30:
  166.     ~0,0:
  167.  
  168. **StopKey:
  169.     !Mkd:0xffff!
  170.     <@ Mkd\0:~GetKey:>
  171.     <@ Mkd=0:~GetKey:>
  172.     <@ Mkd\0:~GetKey:>
  173.     ~0,0:
  174.  
  175. **StopKeyPlus:
  176.     !Mkd:0xffff!
  177.     <@ Mkd\0:
  178.         ~GetKey:
  179.         ~CheckAccelerator:
  180.         ~CheckShiftKey:~~Res:
  181.         { Res=TRUE:~0,0:}
  182.         >
  183.     <@ Mkd=0:
  184.         ~GetKey:
  185.         ~CheckAccelerator:
  186.         ~CheckShiftKey:~~Res:
  187.         { Res=TRUE:~0,0:}
  188.         >
  189.     <@ Mkd\0:
  190.         ~GetKey:
  191.         ~CheckAccelerator:
  192.         ~CheckShiftKey:~~Res:
  193.         { Res=TRUE:~0,0:}
  194.         >
  195.     ~0,0:
  196.  
  197. **ReleaseKeyMatrix:
  198.     US a01,30:
  199. *RKMlp:
  200.     ~GetKeyMatrix:
  201.     < a01,0,kMax-1,1,1:
  202.         { kDat[a01]\0:@RKMlp:}
  203.         >
  204.     UG a01,30:
  205.     ~0,0:
  206.  
  207. **ReleaseKeyMatrixOne f01:
  208.     US a01,1:
  209.     !a01:f01!
  210.     <@ kDat[a01]\0:~GetKeyMatrix:>
  211.     UG a01,1:
  212.     ~0,0:
  213.  
  214. **ReleaseKey:
  215.     US a01,30:
  216.     US Res,1:
  217.     ~GetKey:<@Mkd\0:~GetKey:>
  218.     UG Res,1:
  219.     UG a01,30:
  220.     ~0,0:
  221.  
  222. **GetIxResult:
  223.     ~0,bIxResult:
  224. **SetIxResult bIxResult:
  225.     IY bIxResult:
  226.     ~0,bIxResult:
  227. **CheckShiftKey:
  228.     ~GetRp CurRPage:~~RND:
  229.     {(kDat[0x0010]\0)*(RND=TRUE):~SetIxResult bIxResult^1:}
  230. *CSKLp:
  231.     ~ReleaseKeyMatrixOne 0x10:
  232.     ~0,bIxResult:
  233.  
  234. ;===============================================================================
  235. **CheckAccelerator:
  236.     US a01,30:
  237.     !a30:TRUE!
  238.     { kDat[0x0031]\0:\CALR0x31:~ReleaseKeyMatrixOne 0x31:@CALRout:}
  239.     { kDat[0x0032]\0:\CALR0x32:~ReleaseKeyMatrixOne 0x32:@CALRout:}
  240.     { kDat[0x0033]\0:\CALR0x33:~ReleaseKeyMatrixOne 0x33:@CALRout:}
  241.     { kDat[0x0034]\0:\CALR0x34:~ReleaseKeyMatrixOne 0x34:@CALRout:}
  242.     { kDat[0x0024]\0:~SetOnLineHelp:~ReleaseKeyMatrixOne 0x24:@CALRout:}
  243.     !a30:FALSE!
  244. *CALRout:
  245.     !Res:a30!
  246.     UG a01,30:
  247.     ~0,Res:
  248.  
  249. *CALR0x31:
  250.     !FastReadFlag:FastReadFlag^1!
  251.     { FastReadFlag = TRUE:
  252.         MS SysStrBuffTop+1,ümî⌐é╜ò╢Å═é≡æ¼é¡üvé≡éÅéÄé╔é╡é▄é╡é╜:
  253.         }
  254.     { FastReadFlag \ TRUE:
  255.         MS SysStrBuffTop+1,ümî⌐é╜ò╢Å═é≡æ¼é¡üvé≡éÅéåéåé╔é╡é▄é╡é╜:
  256.         }
  257.     ~MessageBox SysStrBuffTop+1:
  258.     \0:
  259.  
  260. *CALR0x32:
  261.     !GrpBrightMode:GrpBrightMode^1!
  262.     ~SetGrpToDib:
  263.     CC XSize,0,XSize,YSize,0,YSize:
  264.     ~SetStrToDib:
  265.     CC 0,YSize,XSize,YSize,0,0:
  266.  
  267.     { GrpBrightMode = TRUE:
  268.         MS SysStrBuffTop+1,ümébéfû╛ôxüvé≡ümû╛ôxùªÄwÆΦüné╔é╡é▄é╡é╜:
  269.     }
  270.     { GrpBrightMode \ TRUE:
  271.         MS SysStrBuffTop+1,ümébéfû╛ôxüvé≡ümÆ╩Åφüné╔é╡é▄é╡é╜:
  272.     }
  273.     ~MessageBox SysStrBuffTop+1:
  274.  
  275.     \0:
  276.  
  277. *CALR0x33:
  278.     MS SysStrBuffTop,û╛ôxùªé≡É▌ÆΦé╡é─é¡é╛é│éó:
  279.     ~SetGrpBright SysStrBuffTop:
  280.     ~~a01:
  281.     { a01=TRUE:
  282.         !GrpBrightMode:TRUE!
  283.         ~SetGrpToDib:
  284.         CC XSize,0,XSize,YSize,0,YSize:
  285.         ~SetStrToDib:
  286.         CC 0,YSize,XSize,YSize,0,0:
  287.         MS SysStrBuffTop+1,û╛ôxùªé≡ò╧ìXé╡é▄é╡é╜üB:
  288.         ~MessageBox SysStrBuffTop+1:
  289.     }
  290.     \0:
  291.  
  292. *CALR0x34:
  293.     ~SystemMenuClearStr:
  294.     ~SetGrpToDib:
  295.     CC XSize,0,XSize,YSize,0,YSize:
  296.     ~SetStrToDib:
  297.     CC 0,YSize,XSize,YSize,0,0:
  298.     \0:
  299. ;===============================================================================
  300. **SetOnLineHelp:
  301.     US a01,30:
  302.  
  303.     !a01:16!
  304.     !a04:a01*29+16!
  305.     !a05:(a01+StrYSpace)*20+16!
  306.     !a02:(XSize-a04)/2!
  307.     !a03:(YSize-a05)/2!
  308.     !a11:a02!
  309.     !a12:a03!
  310.  
  311.     CC 0,0,XSize,YSize,XSize,YSize:
  312.  
  313.     WZ 0,0:
  314.     CC XSize,0,XSize,YSize,0,0:
  315.     CK 1,a02,a03,a04,a05,SelStrColor,224,0,0:
  316.     CB a02+1,a03+1,a04-1,a05-1,SelStrColor:
  317.     CB a02  ,a03  ,a04-1,a05-1,StrNrmColor:
  318.  
  319.     ~SetFSize a01:
  320.     ~SetFColor StrNrmColor:
  321.  
  322.     #OnLineTbl,1:
  323.     < a13,0,19,1,1:
  324.         F1,SysStrBuffTop,0:        ; [data read]
  325.         T a11+8,a12+8:
  326.         X SysStrBuffTop:
  327.         !a12:a12+a01+StrYSpace!
  328.         >
  329.  
  330.     WZ 0,1:
  331.     ~StopKey:
  332.  
  333.     CC XSize,YSize,XSize,YSize,0,0:
  334.     ~SetFSize StrFontSize:
  335.     ~SetFColor StrFontColor:
  336.  
  337.     UG a01,30:
  338.     ~0,0:
  339.  
  340. *OnLineTbl:
  341.     _OnLineStrTbl:
  342. *OnLineStrTbl:
  343.     ;éPéQéRéSéTéUéVéWéXéOéPéQéRéSéTéUéVéWéXéOéPéQéRéSéTéUéVéWéX
  344.     "ü|ü@éméuéréxérésédélü|éìéëéÄéëü@ü@ü@âIâôâëâCâôüEâwâïâvü@ü|"    ; 01
  345.     "ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@"    ; 02
  346.     "îêÆΦü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@üFâ}âEâXì╢âNâèâbâNü@ü@ü@ü@ü@ü@ü@"    ; 03
  347.     "ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@édéÄéöéàéÆâLü[ü@ü@ü@ü@ü@ü@ü@ü@"    ; 04
  348.     "âLâââôâZâïü@ü@ü@ü@ü@ü@ü@ü@üFâ}âEâXëEâNâèâbâNü@ü@ü@ü@ü@ü@ü@"    ; 05
  349.     "ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@âXâyü[âXâLü[ü^édérébâLü[ü@ü@ü@"    ; 06
  350.     "æIæ≡âLü[ü@ü@ü@ü@ü@ü@ü@ü@ü@üFâ}âEâXü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@"    ; 07
  351.     "ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@âeâôâLü[éQéSéUéWü^ü¬ü½ü¿ü⌐âLü["    ; 08
  352.     "âVâXâeâÇâüâjâàü[ü@ü@ü@ü@ü@üFâ}âEâXëEâNâèâbâNü@ü@ü@ü@ü@ü@ü@"    ; 09
  353.     "ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@âXâyü[âXâLü[ü^édérébâLü[ü@ü@ü@"    ; 10
  354.     "ümî⌐é╜ò╢Å═é═æ¼é¡ünÉ╪éΦæ╓éªüFâVâXâeâÇâüâjâàü[ü@ü@ü@ü@ü@ü@ü@"    ; 11
  355.     "ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@éPâLü[ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@"    ; 12
  356.     "ümébéfû╛ôxünü@ü@ü@É╪éΦæ╓éªüFâVâXâeâÇâüâjâàü[ü@ü@ü@ü@ü@ü@ü@"    ; 13
  357.     "ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@éQâLü[ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@"    ; 14
  358.     "ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@üiéRâLü[é┼û╛ôxÄwÆΦüjü@ü@ü@ü@ü@"    ; 15
  359.     "ümò╢ÄÜé≡Å┴é╖ünü@ü@ü@ü@ü@ü@üFâVâXâeâÇâüâjâàü[ü@ü@ü@ü@ü@ü@ü@"    ; 16
  360.     "ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@éSâLü[ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@"    ; 17
  361.     "ümăé╠æIæ≡Äêé▄é┼Éié▐ünü@ü@üFéréxérésédéléRéTâüâjâàü[âoü[ü@"    ; 18
  362.     "ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@ü@éréêéëéåéöâLü[ü@ü@ü@ü@ü@ü@ü@ü@"    ; 19
  363.     "âQü[âÇÅIù╣ü@ü@ü@ü@ü@ü@ü@ü@üFédérébü{âXâyü[âXü{édéÄéöéàéÆ"    ; 20
  364.