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

            久久精品免费网站网| 伊人久久大香线蕉综合网站| 久久精品麻豆日日躁夜夜躁| 浪潮AV色综合久久天堂| 久久青青草原综合伊人| 热综合一本伊人久久精品 | 欧美日韩久久中文字幕| 精品熟女少妇av免费久久| 91久久精品视频| 日韩精品久久无码人妻中文字幕| 久久综合久久综合久久综合| 欧美性大战久久久久久| 韩国无遮挡三级久久| 囯产精品久久久久久久久蜜桃| 久久综合综合久久97色| 人妻精品久久久久中文字幕69 | 国产精品久久久久久久久软件| 国产精品久久永久免费| 色综合久久夜色精品国产| 伊人久久大香线焦综合四虎| 久久精品国产99久久无毒不卡| 色狠狠久久综合网| 尹人香蕉久久99天天拍| 久久天天日天天操综合伊人av| 99久久99久久精品国产片果冻| 国产Av激情久久无码天堂| 久久婷婷国产综合精品 | 青青青国产精品国产精品久久久久| 久久天天躁狠狠躁夜夜2020一 | 精品人妻久久久久久888| 亚洲国产精品无码成人片久久| 久久久久青草线蕉综合超碰| 亚洲精品成人久久久| 中文字幕久久精品| 久久九九兔免费精品6| 99久久无色码中文字幕人妻 | 国产美女久久久| 久久99国产精一区二区三区| 国产精品久久99| 精品国产一区二区三区久久蜜臀| 丁香五月综合久久激情|