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

            久久国产精品一国产精品金尊| 色8激情欧美成人久久综合电| 一本久久知道综合久久| 国产一区二区三区久久精品| 狠狠色综合网站久久久久久久 | 性欧美大战久久久久久久| 9久久9久久精品| 久久久www免费人成精品| 国产亚洲精久久久久久无码AV| 久久久久婷婷| 久久久WWW成人免费毛片| 久久亚洲AV无码精品色午夜| 亚洲v国产v天堂a无码久久| 色综合久久久久无码专区| 欧美久久久久久| 亚洲综合久久久| 国产精品久久永久免费| 国产精品99久久久精品无码| 18岁日韩内射颜射午夜久久成人| 麻豆精品久久精品色综合| 99久久99久久久精品齐齐| 亚洲欧美成人久久综合中文网 | 人妻无码精品久久亚瑟影视| 狠狠色丁香久久婷婷综| 欧美日韩精品久久免费| 久久精品夜色噜噜亚洲A∨| 精品无码久久久久久午夜| 精品熟女少妇a∨免费久久| 久久这里只精品99re66| 久久婷婷人人澡人人| 久久久久久精品无码人妻| 精品综合久久久久久88小说| 91精品国产91热久久久久福利| 久久人妻少妇嫩草AV无码专区| 少妇人妻综合久久中文字幕 | 亚洲精品高清一二区久久| 国产精品伦理久久久久久| 久久精品中文字幕大胸| 亚洲七七久久精品中文国产| 亚洲国产香蕉人人爽成AV片久久 | 欧美伊人久久大香线蕉综合69|