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

            久久精品九九亚洲精品天堂 | 国产精品久久久久免费a∨| 久久精品成人免费看| 狠狠色丁香久久综合五月| 亚洲午夜久久久精品影院| 午夜福利91久久福利| 国产成人精品久久| 久久这里只精品国产99热| 久久久久国产一级毛片高清板 | 久久久久国产一区二区三区| 欧美精品九九99久久在观看| 2021久久国自产拍精品| 久久这里只有精品视频99| 99久久免费国产精精品| 亚洲色欲久久久综合网东京热| 日韩精品无码久久久久久| 青草影院天堂男人久久| 久久受www免费人成_看片中文| 久久久久国产精品| 久久性精品| 69久久夜色精品国产69| 日韩精品久久久久久久电影| 亚洲国产精品久久久久久| 久久亚洲国产精品成人AV秋霞| 91超碰碰碰碰久久久久久综合| 久久久久亚洲国产| 精品熟女少妇aⅴ免费久久| 久久国产精品一国产精品金尊| 免费观看成人久久网免费观看| 久久综合精品国产一区二区三区| 伊人 久久 精品| 久久精品成人免费网站| 97久久婷婷五月综合色d啪蜜芽 | 青春久久| 91精品无码久久久久久五月天 | 青青草国产成人久久91网| 亚洲AV日韩精品久久久久| 精品综合久久久久久97| 狠狠综合久久综合88亚洲| 久久伊人精品一区二区三区| 亚洲人AV永久一区二区三区久久|