• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            newplan

            阿基米德在洗澡時發現浮力原理,高興得來不及穿上褲子,跑到街上大喊:Eureka(我找到了)。
            posts - 39, comments - 26, trackbacks - 0, articles - 4
              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

            stack   segment para    stack   'stack'
                    db      256     dup(0)
            stack   ends
            ;
            data    segment    para    
            public    'data'
            buffer    db    16h dup(0)
            bufpt1    dw    
            0
            bufpt2    dw    
            0
            kbflag    db    
            0

            prompt    db    
            '---kbd_io program begin ---',13,10,'$'
            scantab    db    0,0,'1234567890-=',0,0
                db    'qwertyuiop[]',0dh,0
                db    'asdfghjkl;',0,0,0,0
                db    'zxcvbnm,./',0,0,0
                db    ' ',0,0,0,0,0,0,0,0,0,0,0,0,0
                db    '789-456+1230.'
            even
            shiftab    db    
            0,0,'!@#$%^&*()_+',0,0
                db    'QWERTYUIOP{}',0dh,0
                db    'ASDFGHJKL:"',0,0,0
                db    'ZXCVBNM<>?',0,0,0
                db    ' ',26 dup(0)
            even
            oldcs9    dw    ?
            oldip9    dw    ?
            data    ends
            ;
            code    segment    para    
            public    'code'
            start    proc    far
                assume    cs:code,ds:data
                push    ds
                mov    ax,
            0
                push    ax
                mov    ax,data
                mov    ds,ax

                cli
                mov    al,
            09
                mov    ah,35h
                 
            int    21h
                mov    oldcs9,es
                mov    oldip9,bx         ;保存中斷
                
                push    ds
                mov    dx,offset kbint
                mov    ax,seg    kbint
                mov    ds,ax
                mov    al,
            09
                mov    ah,25h
                
            int    21h
                pop    ds                ;設置中斷

                in    al,21h
                
            and     al,0fdh
                out    21h,al

                    mov     dx,offset prompt
                mov    ah,
            09
                
            int     21h
                sti
            forever:
                
            call    kbget
                test    kbflag,80h
                jnz    endint
                push    ax
                
            call    dispchar
                pop    ax
                cmp    al,0dh
                jnz    forever
                mov    al,0ah
                
            call    dispchar
                jmp    forever
            endint:
                mov    dx,oldip9
                mov    ax,oldcs9
                mov    ds,ax
                mov    al,09h
                mov    ah,25h
                
            int    21h

                ret
            start    endp
            kbget    proc    near
                push    bx
                cli
                mov    bx,bufpt1
                cmp    bx,bufpt2
                jnz     kbget2
                cmp    kbflag,80h
                jz    kbget3
                sti
                pop    bx
                jmp    kbget
            kbget2:
                mov    al,[buffer
            +bx]
                inc    bx
                cmp    bx,
            16
                jc    kbget3
                mov    bx,
            0
            kbget3:
                mov    bufpt1,bx
                pop    bx
                ret
            kbget    endp
            ;
            ------------------------------------------------------------
            kbint    proc     far
                push    bx
                push    ax
            ;
                in    al,60h
                push    ax
                in    al,61h
                
            or    al,80h
                out     61h,al
                
            and    al,7fh
                out    61h,al
            ;
                pop    ax
                test    al,80h
                jnz    kbint5
                    cmp     al,
            42
                     jz     left_shif
                    cmp     al,
            54
                     jz     right_shif
                    test    kbflag,03h    ;判斷shif鍵是否按住            
                    jnz     press_shif
                    mov     bx,offset scantab
                xlat    scantab
                cmp    al,
            0
                jnz    kbint4
                mov    kbflag,80h
                jmp    kbint2

            left_shif:  
                    
            or    kbflag,01h
                    jmp   kbint2
            right_shif:
                    
            or    kbflag,02h
                    jmp   kbint2

            press_shif:
                        mov     bx,offset shiftab
                    xlat    shiftab
                    cmp        al,
            0
                    jnz        kbint4
                    mov        kbflag,80h
                    jmp        kbint2
                    
            kbint4:
                mov    bx,bufpt2
                mov    [buffer
            +bx],al
                inc     bx
                cmp    bx,
            16
                jc    kbint3
                mov    bx,
            0
            kbint3:
                cmp    bx,bufpt1
                jz    kbint2
                mov    bufpt2,bx
            kbint5: 
                    cmp     al,0aah
                jz    kbint1
                cmp    al,0b6h
                jz    kbint1
                jmp    kbint2
            kbint1: mov     kbflag,
            0
            kbint2:
                cli
                mov    al,20h
                out    20h,al
                pop    ax
                pop    bx
                sti    
                iret
            kbint    endp
            ;
            dispchar    proc    near
                push    bx
                mov    bx,
            0
                mov    ah,0eh
                
            int    10h
                pop    bx
                ret
            dispchar    endp
            ;
            code    ends
                
            end    start

            posted @ 2008-01-04 00:12 山泉彎延 閱讀(932) | 評論 (0)編輯 收藏

            $P0000
            $P0110
            $P020A
            $P0320
            $P040B
            $P0530
            $P060B
            $P0740
            $P0801
            $P0A01
            $p0B00
            $M00018110
            $M0101ED82
            $M0200C048
            $M0300E004
            $M0400B005
            $M0501A206
            $M06959A01
            $M0700E00D
            $M08001001
            $M0901ED83
            $M0A01ED87
            $M0B01ED8E
            $M0C01ED96
            $M0D028201
            $M0E00E00F
            $M0F00A015
            $M1001ED92
            $M1101ED94
            $M1200A017
            $M13018001
            $M14002018
            $M15070A01
            $M1600D181    
            $M17050A10
            $M18068A11

            posted @ 2008-01-04 00:10 山泉彎延 閱讀(153) | 評論 (0)編輯 收藏

            08年新郵計劃朦朧消息
            ms8noo9pK朦朧消息,僅供參考NS#h4@Bk
            戊子年(生肖鼠)
            1aOe:TR$rZH朱仙鎮木版年畫
            oq/P*ro?r$rwww.zhaoonline.com薄一波同志誕生一百周年
            $Q0}0Q5Bu9J+S#LZ)\王震同志誕生一百周年BaC&s(SxW
            海南坡鹿/五指山(配合海南建省20周年)
            e(I aX\#Pc\fS'SZ佛教題材:白馬寺等(中國與印度聯合發行)收藏大學 自由講壇Si3h.J0hBj1v
            哪吒鬧海www.zhaoonline.comW4H?S5h)E U"H'X`
            成語故事(二)#iYW"Br
            寧夏回族自治區成立50周年EmKwz0W:x"|k0tSun
            廣西壯族自治區成立50周年收藏大學 自由講壇9_9w Y-b.`
            海棠花www.zhaoonline.com}^;||Cm0ypv
            驪山
            4l9|zDi*~/X]收藏大學 自由講壇頤和園
            ~$_(RH@)i2?www.zhaoonline.com第29屆奧運會
            0gH*k6j O2jF7L-e奧運項目(三) Ll.{ PN%vf
            奧運會從北京到倫敦(中國與英國聯合發行)
            %z8A~S7|Du0~u收藏大學 自由講壇殘奧會
            A9YB+J{/duwww.zhaoonline.com民間傳說——牛郎織女l e n [?m.ka
            陜西高速公路
            f.B+U@~r?J2010年上海世界博覽會Z;q#_;vP
            2010年廣州亞運會
            6fd.T d j2Y萬里江山圖(@4M$B-p7V"Z:U4X
            中國名亭(二)Ie5di]x{k(B
            中國古橋——拱橋(二)

            posted @ 2007-12-08 00:09 山泉彎延 閱讀(206) | 評論 (0)編輯 收藏

            ;**********************電話號碼表實現*******************************

             ;在本次試驗中需要注意基址寄存器BX的移動方法,對以字為單位的數組,BX的移動方式
             ;是每移動一次加2或者減2
             ;另外函數調用的過程中需要小心PUSH和pop的調用是否安全,例如在name_sort中pop CX的
             ;時候沒有先Push CX,導致了name_sort函數不可以調用
             ;此程序使用比較高效的方法只是對號碼單的首地址進行排序,為此開辟了一個地址數組
             ;AdTable,類似C語言中的指針數組
             ;在每個名字的前面存有每個名字的長度,有利于對名字進行比較,體現了空間換時間
             ;程序調試難度較大,費時2天長度,長度349行
             ;12月7日于海韻
            ;
            ==================================================================
            DateArea    segment
                 TemplateName        db 
            20,?,20 dup(?)
                 
                 TemplateNumber      db 
            9,?,9 dup(?)
                
                 PhoneTable          db 
            50 dup ( 21 dup (?), 8 dup (?,'$')

                 AdTable             dw 
            50 dup (?)   

                 FindedAdress        dw 
            1 dup (?)
                
                 InputNamePrint      db 
            13,10,'Input name:','$'
                
                 InputNumPrint       db 
            13,10,'Input a telephone number:','$'
                
                 AskForNumPrint      db 
            13,10,'Do you want a telepment numbre:(Y/N)','$'
               
                 NamePrint           db 
            13,10,'name?','$'
                 
                 AnswerFindedPrint   db  
            13,10,'name',16 dup (20h),'tel.',13,10,'$'    

                 AnswerNoFindPrint   db  
            13,10,'NO SUCH NAME!','$'        
            DateArea ends
            ;
            =====================================================================
            CodeArea  segment
                  assume cs
            :CodeArea ,ds:DateArea ,es:DateArea
            ;
            -----------------------------
            main proc far


                  
            push ds
                  
            sub ax,ax
                  
            push ax
                  mov ax
            ,DateArea
                  mov ds
            ,ax
                  mov es
            ,ax
                  ;
                  mov bx
            ,0
                  lea si
            ,PhoneTable
                  
            Start
            :
                   
                  lea dx 
            , InputNamePrint
                  mov ah
            ,09h
                  
            int 21h
                  ;
                   lea  di
            ,AdTable
                   mov  AdTable[bx]
            ,si
                   call input_name;該函數還要返回輸入字母為終止時候的提示
            ,
                  ;可以返回一個寄存器的狀態來表示
                   jz Search
                   call stor_name
                  ;
                   lea dx
            , InputNumPrint
                   mov ah 
            ,09h
                   
            int 21h
                  ;
                   call inphone
                  ;
                   add si
            ,30
                   add bx 
            ,2
                   jmp Start


            Search
            :
                   ;lea dx
            , AskForNumPrint
                   ;mov ah
            ,09h
                   ;
            int  21h
                   call name_sort 
                   lea dx
            , AskForNumPrint
                   mov ah
            ,09h
                   
            int  21h
                   ;
                   mov ah
            ,1
                   
            int 21h
                   
            sub al,4Eh
                   ;
                   jz  
            Exit
                   ;
                   lea  dx
            ,NamePrint
                   mov ah
            ,09h
                   
            int 21h
                   ;
                   call input_name
                   ;
                   call name_search
                   ;
                   call printline
                   ;
                   jmp Search
               
            Exit:  ret
            main endp
            ;
            ------------------------------
            input_name proc near 
               
            push ax 
               
            push bx
               
            push cx
               
            push dx
               
            push si
               
            push di
               ;
               lea  dx
            ,TemplateName
               mov  ah
            ,0ah
               
            int  21h
               lea  di 
            ,TemplateName
               add  di
            ,1
               mov al
            ,[di]
               cmp al
            ,0 
               ;
               
            pop di
               
            pop si
               
            pop dx
               
            pop cx
               
            pop bx
               
            pop ax
               
               ;     
               ret
            input_name endp
            ;
            ------------------------------
            stor_name  proc near
               
            push ax
               
            push bx
               
            push cx
               
            push dx
               
            push si
               
            push di
               ;
               mov  di
            ,AdTable[bx]
               lea  si
            ,TemplateName
               add  si
            ,1
               mov  dx
            ,21
               mov  cl
            ,[si]
               mov  al
            ,cl
               cbw
               mov  cx
            ,ax
               inc  cx
               
            sub  dx,cx
               cld  
               repnz movsb
               mov  cx
            ,dx
               cld
               mov al 
            ,20h 
               repnz stosb
               ;
               
            pop di
               
            pop si
               
            pop dx
               
            pop cx
               
            pop bx
               
            pop ax
               ;
            ret
            ;
            stor_name  endp
            ;
            ------------------------------ 
            inphone proc near
              
            push ax
              
            push bx
              
            push cx
              
            push dx
              
            push si
              
            push di
              ;
              lea dx
            ,TemplateNumber
              mov  ah
            ,0ah
              
            int  21h
              ;
              mov di
            ,AdTable[bx]
              add di
            ,21
              lea si
            ,TemplateNumber
              add si
            ,1
              mov cl
            ,[si]
              mov al
            ,cl
              cbw
              mov cx
            ,ax
              add si
            ,1
              cld
              repnz movsb
              ;
              
            pop di
              
            pop si
              
            pop dx
              
            pop cx
              
            pop bx
              
            pop ax
              ;
            ret  
            inphone endp
            ;
            ------------------------------
            name_sort proc near
                
            push ax
                
            push bx 
                
            push cx
                
            push dx
                
            push si
                
            push di
                lea  dx
            , AskForNumPrint
                mov  ah
            ,09h
                
            int  21h
                mov cx
            ,bx
            OuterSort
            :
                mov bx
            ,0
            InnerSort
            :
                mov si
            ,AdTable[bx]
                add bx
            ,2
                mov di 
            ,AdTable[bx]
                mov al
            ,[si]
                mov dl
            ,[di]
                cmp al
            ,dl
                
            push cx
                jg  AxGrBx
               
                mov al
            ,dl
                cbw
                mov cx
            ,ax
                jmp PassAGB
            AxGrBx
            :
                cbw
                mov cx
            ,ax   
            PassAGB
            :
                add si 
            ,1
                add di 
            ,1
                cld 

                repz  cmpsb
                
            pop    cx
                jb     Belower
                mov    ax
            ,AdTable[bx]
                
            sub    bx,2
                mov    dx
            ,AdTable[bx]
                xchg   ax
            ,dx
                mov  AdTable[bx]
            ,dx
                add    bx
            ,2 
                mov  AdTable[bx]
            ,ax
             Belower
            :
                mov   ax
            ,bx
                add   ax
            ,2
                cmp   ax
            ,cx
                jnz  InnerSort
                
            sub cx,2
                cmp cx
            ,2 
            jnz OuterSort
                
            pop di
                
            pop si
                
            pop dx
                
            pop cx
                
            pop bx
                
            pop ax
             ret
            name_sort endp
            ;
            ------------------------------
            name_search proc near
                
            push ax
                
            push bx
                
            push cx
                
            push dx
                
            push si
                
            push di
                mov ax
            ,bx    
                mov bx 
            ,0
            mLoop
            :
                lea si
            ,TemplateName+1
                mov cl
            ,[si]
                
            push ax
                mov al
            ,cl
                cbw
                mov cx
            ,ax
                add cx
            ,1
                
            pop ax
                mov di
            ,AdTable[bx]
                cld 
                repz cmpsb
                jz  FindOutNum
                add bx
            , 2
                cmp bx 
            ,ax
                jz  FindNoNum
                jmp mLoop
            FindNoNum
            :
                
            pop  di
                
            pop  si
                
            pop  dx
                
            pop  cx
                
            pop  bx
                
            pop  ax
                ret
            FindOutNum
            :
                mov dx
            ,AdTable[bx]
                add dx
            ,1
                mov FindedAdress
            ,dx
                ;mov ah
            ,09h
               ; 
            int 21h
                
            pop di
                
            pop si
                
            pop dx
                
            pop cx
                
            pop bx
                
            pop ax
                ret              
            name_search endp
            ;
            ------------------------------
            printline  proc near
                
            push ax
                
            push bx
                
            push cx
                
            push dx
                
            push si
                
            push di
                jz NoFind
                lea dx
            ,AnswerFindedPrint
                mov ah
            ,09
                
            int 21h
                mov dx
            ,[FindedAdress]
                mov ah
            ,09h
                
            int 21h
                JMP RetPlace
            NoFind
            :
                lea dx
            ,AnswerNoFindPrint
                mov ah
            ,09h
                
            int 21h
            RetPlace
            :
                
            pop di
                
            pop si
                
            pop dx
                
            pop cx
                
            pop bx
                
            pop ax

                ret
            printline endp
            ;
            ------------------------------


            CodeArea ends         
            end main

            posted @ 2007-12-07 19:22 山泉彎延 閱讀(2614) | 評論 (2)編輯 收藏

                 摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include <cstdlib>#include <iostream>#include <conio.h>#define &...  閱讀全文

            posted @ 2007-12-04 18:10 山泉彎延 閱讀(2702) | 評論 (0)編輯 收藏

                 摘要: 07年11月22日于海韻  閱讀全文

            posted @ 2007-11-22 23:01 山泉彎延 閱讀(454) | 評論 (0)編輯 收藏

            /*
             07.11.20 于海韻
            */
            #
            include  "sys/times.h"
            #include "apue.h"
            #include "fcntl.h"

            clock_t times(struct tms *buf);

            static void pr_times(clock_t real 
            ,struct tms *tmsstart, struct tms *tmsend);

            int main(int argc, char *argv[])
            {
              struct tms tmsstart
            ,tmsend;
             
              clock_t  start
            ,end;
             
              off_t excursion;
             
              
            if((excursion=lseek(0,0,SEEK_END))==-1)printf("can not seek!\n");
             
              char buf[excursion];
             
              
            /*printf("excutsion ==#%d\n",excursion);*/
              
            int outfile_fd;/*out file descrite tag */
             
              lseek(
            0,0,SEEK_SET);/*it is very importent  to go back  to the beginning of input file!*/
             
              
            if(read(0,buf,excursion)==0)printf("read OK!\n");
              
            /* buf[excursion]='\0';*/
              
            if(argc==3  &&  strcmp(argv[2],"sync")==0)
                  { 
            if(( outfile_fd=open(argv[1],O_RDWR|O_CREAT|O_SYNC,0666))<0)err_sys("creat error");}
                
            else if(argc==2)
                   {
            if (( outfile_fd=open(argv[1],O_RDWR|O_CREAT,0666))<0)err_sys("creat error");}
                
            else{printf("para error!\n");exit(1);}
                long size
            =1024
                fflush(stdin);
                
            printf("BUFFSIZE  USER CPU  SYSTEM CPU  REAL TIMES  CIRCLE TIMES\n");
                
            int  n;
                
            int t;
                char 
            *p=buf;
                long  redo_count;
            /*re do copy times*/ 

              
            do
                  
            if((start=times(&tmsstart))==-1)err_sys("times error");
                  redo_count
            =0;/*it is very import to set the counter zero at every circle */
                  t
            =1;/*it is use in the inside while */
                  
            while((n=write(outfile_fd,p,size))==size)
                          {   p
            +=size;/*the begin buf must increase every time*/
                              redo_count
            ++;/*count how many times circle do*/
                              t
            =size*redo_count;/*one tag to count how many charaters we have travered*/
                              
            /* printf("excursion==%d  t==%d   excursion-t==%d  size==%d\n",excursion,t,excursion-t,size);*/
                              
            if((excursion-t)<size)break;
                          }
                  
            if(excursion-t>0)
                     
            if(write(outfile_fd,p,excursion-t)!=(excursion-t))err_sys("read error");
                  
            if((end=times(&tmsend))==-1)err_sys("times error");
                  
            printf("%7ld",size);
                  pr_times(end
            -start,&tmsstart,&tmsend);
                  
            printf("%7ld\n",redo_count);
                  lseek(outfile_fd
            ,0,SEEK_SET);/*let the outfile pointer go back to the beginning of outfile!*/
                  p
            =buf;/*let p return to the beginning of buf;*/
                 
            /* printf("size=%d  excursion=%d\n",size,excursion);*/
                 } 
            while((size*=2)<=excursion);
              
            return 0;
            }
            static void
            pr_times(clock_t real 
            ,struct tms *tmsstart,struct tms *tmsend)
            {static long clktck
            =0;
            if(clktck==0)
             
            if((clktck=sysconf(_SC_CLK_TCK))<0)
                
            printf("sysconf error");

            printf("   %2.5f",(tmsend->tms_utime-tmsstart->tms_utime)/(double)clktck);
            printf("   %2.5f",(tmsend->tms_stime-tmsstart->tms_stime)/(double)clktck);
            printf("     %2.5f    ",real/(double)clktck);

             

            posted @ 2007-11-21 18:45 山泉彎延 閱讀(1229) | 評論 (0)編輯 收藏

                 摘要: 這是 http://222.34.36.100/longrange/%E6%B1%87%E7%BC%96%E8%AF%AD%E8%A8%80.doc 的 HTML 檔。G o o g l e 在網路漫游時會自動將檔案轉換成 HTML 網頁來儲存。請使用網址 http://www.google.com/search?q=cache:HLwqrGxAqr0J:222.34.36.100/longran...  閱讀全文

            posted @ 2007-11-19 19:10 山泉彎延 閱讀(15416) | 評論 (1)編輯 收藏

                  剛來海韻,對這個新鮮的環境滿懷好奇!想到處去逛逛,看看廈門這邊的風土人情,但是接下去是越來越沉重的課業負擔,根本就沒有辦法讓自己停下來,停下來的時候已經算是放任自己,墮落自己,有時候還會感嘆自己真是沒用,但這又能怎樣?換來的只是氣餒與傷心,我只能不斷的告訴自己,堅持住!
                 有幾同學都認為我是研究性的,我看看自己有時候確實有點象,但可憐的是有時候頭難受的讓人無法繼續思考,真是矛盾我是否該走研究的道路。。。。。
                

            posted @ 2007-11-19 13:04 山泉彎延 閱讀(521) | 評論 (0)編輯 收藏

            http://wiki.ubuntu.org.cn/%E5%BF%AB%E9%80%9F%E8%AE%BE%E7%BD%AE%E6%8C%87%E5%8D%97/DapperDrake#.E4.BF.AE.E6.94.B9.E6.BA.90.E5.B9.B6.E6.9B.B4.E6.96.B0.E5.8D.87.E7.BA.A7Ubuntu

            posted @ 2007-11-17 23:44 山泉彎延 閱讀(106) | 評論 (0)編輯 收藏

            僅列出標題
            共4頁: 1 2 3 4 
            久久精品aⅴ无码中文字字幕重口| 91精品国产综合久久婷婷| 国产精品一区二区久久精品无码 | 国产精品亚洲综合久久| 久久久亚洲欧洲日产国码是AV| 亚洲人成网亚洲欧洲无码久久| 99久久这里只有精品| 久久综合色之久久综合| 久久亚洲AV成人无码国产| 91久久精品视频| 久久精品国产精品亚洲精品| 久久免费视频网站| 中文字幕无码精品亚洲资源网久久| 国产精品久久久久久| 综合久久精品色| 国产精品成人精品久久久| 久久精品成人欧美大片| 久久精品国产亚洲av瑜伽| 麻豆一区二区99久久久久| 性欧美大战久久久久久久| 四虎国产精品免费久久5151| 7777精品久久久大香线蕉| 久久久国产一区二区三区| 日韩一区二区久久久久久 | 久久国产精品国产自线拍免费| 精品久久久久久久国产潘金莲 | 国产精品久久久久a影院| 成人午夜精品久久久久久久小说| 日韩人妻无码精品久久久不卡| 中文成人久久久久影院免费观看| 9999国产精品欧美久久久久久 | 草草久久久无码国产专区| 久久国产亚洲高清观看| 亚洲欧美伊人久久综合一区二区| 伊人久久大香线蕉无码麻豆 | 久久精品国产亚洲av麻豆图片| 久久精品成人免费国产片小草| 国产精品久久久久AV福利动漫| 97久久精品国产精品青草| 久久久久亚洲AV无码专区体验| 亚洲精品无码久久一线|