• <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>

            coreBugZJ

            此 blog 已棄。

            SPOJ 1. Life, the Universe, and Everything

            1. Life, the Universe, and Everything

            Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits.

            Example

            Input:
            1
            2
            88
            42
            99
            Output:
            1
            2
            88
            
            我的代碼:
            section .bss
                    buf : resb 0x4
                    len : resd 0x1
            section .text
                    global  _start
            _start : 
                    xor eax, eax
                    mov [len], eax
                    mov [buf], al
                    mov [buf+1], al
            LOOP_INPUT :
                    call INPUT
                    cmp al, 0xa
                    jne LOOP_INPUT
                    mov al, [buf]
                    cmp al, '4'
                    jne LOOP_JUDGE_E
                    mov al, [buf+1]
                    cmp al, '2'
                    jne LOOP_JUDGE_E
                    jmp EXIT
            LOOP_JUDGE_E :
                    call OUTPUT
                    jmp _start
            INPUT :
                    mov eax, 0x3
                    mov ebx, 0x0
                    mov ecx, buf
                    add ecx, [len]
                    mov edx, 0x1
                    int 0x80
                    mov eax, [len]
                    inc eax
                    mov [len], eax
                    mov al, [ecx]
                    ret
            OUTPUT :
                    mov eax, 0x4
                    mov ebx, 0x1
                    mov ecx, buf
                    mov edx, [len]
                    int 0x80
                    ret
            EXIT :
                    mov eax, 1
                    xor ebx, ebx
                    int 0x80
             
             

            posted on 2011-03-16 13:24 coreBugZJ 閱讀(1042) 評(píng)論(0)  編輯 收藏 引用 所屬分類: Assemble

            精品多毛少妇人妻AV免费久久| 久久精品国产亚洲AV久| 午夜精品久久久久久久久| 国内精品久久久久久99| 亚洲&#228;v永久无码精品天堂久久| 国产亚洲精品久久久久秋霞| 久久九九免费高清视频| 天天综合久久久网| 久久精品亚洲精品国产色婷| 色妞色综合久久夜夜 | 久久精品卫校国产小美女| 亚洲午夜无码久久久久| 99久久99久久精品国产片| 欧美丰满熟妇BBB久久久| 精品无码久久久久久久久久| 久久久久人妻一区精品色| 一本久久精品一区二区| 日韩十八禁一区二区久久| 久久99国产精品99久久| 999久久久国产精品| 久久久精品人妻一区二区三区蜜桃| 久久96国产精品久久久| 久久久久久无码Av成人影院| 人人狠狠综合88综合久久| 国产91久久精品一区二区| 国产精品美女久久久久网| 无码人妻精品一区二区三区久久久| 久久国产精品波多野结衣AV| 色综合久久最新中文字幕| 国产精品99久久久久久人| 99久久er这里只有精品18| 思思久久99热只有频精品66| 久久综合久久伊人| 久久精品国产亚洲av麻豆小说| 狠狠综合久久AV一区二区三区| 综合久久一区二区三区 | 91精品国产91久久久久久青草| 日本久久久久亚洲中字幕| 久久久久久国产精品免费无码| 久久精品国产亚洲av麻豆色欲| 亚洲国产精品一区二区久久hs|