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

            国产真实乱对白精彩久久| 中文国产成人精品久久亚洲精品AⅤ无码精品 | 日日狠狠久久偷偷色综合免费| 激情五月综合综合久久69| 欧美久久久久久午夜精品| 久久精品国产欧美日韩| 香蕉aa三级久久毛片| 狠狠色噜噜色狠狠狠综合久久| 久久久久久毛片免费播放| 久久精品国产半推半就| 久久国产免费直播| 婷婷综合久久中文字幕蜜桃三电影| 91精品国产乱码久久久久久| 亚洲一本综合久久| 7777久久久国产精品消防器材| 大伊人青草狠狠久久| 欧美午夜A∨大片久久| 热re99久久精品国99热| 久久久久国色AV免费看图片| 麻豆亚洲AV永久无码精品久久| 久久久久久久久久免免费精品| 色综合久久中文字幕无码| 超级碰久久免费公开视频| 亚洲中文久久精品无码| 99久久人人爽亚洲精品美女| 久久大香萑太香蕉av| 久久黄视频| 色妞色综合久久夜夜| 久久精品国产国产精品四凭 | 久久婷婷色综合一区二区| 国产精品久久久久9999| 久久无码高潮喷水| 久久久久无码精品国产app| 久久精品国产影库免费看| 久久精品国产亚洲AV影院| 久久毛片免费看一区二区三区| 国产精品久久午夜夜伦鲁鲁| 99久久综合国产精品免费| 亚洲欧美日韩精品久久亚洲区| 久久国产精品无码网站| 国产激情久久久久影院老熟女|