• <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 閱讀(1033) 評論(0)  編輯 收藏 引用 所屬分類: Assemble

            久久精品国产亚洲一区二区| 国产精品gz久久久| 无夜精品久久久久久| 精品国产乱码久久久久软件| 麻豆AV一区二区三区久久 | 色婷婷噜噜久久国产精品12p| 色青青草原桃花久久综合| 中文字幕无码精品亚洲资源网久久| 一本色道久久综合亚洲精品| 国产成人综合久久精品尤物| 久久精品国产久精国产果冻传媒| 国产精品久久久久国产A级| 亚洲精品美女久久久久99小说 | 久久精品国产亚洲AV电影 | 性欧美大战久久久久久久久 | 国产精品久久久久久久人人看| 97久久香蕉国产线看观看| 国产精品乱码久久久久久软件| 久久精品国产亚洲一区二区| 久久精品国产第一区二区三区| 国产精品久久久久久久app| 久久精品无码一区二区三区免费 | 欧美精品一区二区久久| 一本久久久久久久| 无码超乳爆乳中文字幕久久| 久久WWW免费人成一看片| 一本色道久久综合| 四虎国产精品成人免费久久| 久久国产免费直播| 久久本道久久综合伊人| 久久九九久精品国产| 久久99精品久久久久久水蜜桃| 狠狠88综合久久久久综合网 | 亚洲AV无码久久精品成人| 综合久久给合久久狠狠狠97色| 国产午夜精品久久久久九九| 99久久精品国产毛片| 久久国产精品二国产精品| 久久精品国产第一区二区| 亚洲综合久久久| 日韩精品久久无码中文字幕|