⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 box.asm

📁 如何在VB下实现BP神经网络的拓扑优化算法
💻 ASM
📖 第 1 页 / 共 5 页
字号:
        xor    ecx,ecx
        @@:
        mov    bl,byte ptr[esi+ecx]
        mov    byte ptr[edi+ebx],0
        inc    ecx
        cmp    ecx,4
        jnz    @b
        mov    bl,byte ptr[esi]
        mov    eax,first
        add    bl,al
        mov    byte ptr[esi],bl
        mov    byte ptr[edi+ebx],1
        
        mov    bl,byte ptr[esi+1]
        mov    eax,second
        add    bl,al
        mov    byte ptr[esi+1],bl
        mov    byte ptr[edi+ebx],1
        
        mov    bl,byte ptr[esi+2]
        mov    eax,third
        add    bl,al
        mov    byte ptr[esi+2],bl
        mov    byte ptr[edi+ebx],1
        
        mov    bl,byte ptr[esi+3]
        mov    eax,fourth
        add    bl,al
        mov    byte ptr[esi+3],bl
        mov    byte ptr[edi+ebx],1
        
        
        ret

_ratate     endp

_cir        proc        ;旋转;左移;右移
        LOCAL    hdc
        pushad
        invoke    GetDC,hWinMain
        mov    hdc,eax
        
        cmp    dialeft,0    ;当左移键与右移键都按下时,不移位
        jz    @f
        cmp    diaright,0
        jz    @f
        mov    dialeft,0
        mov    diaright,0
        @@:
        
        
        lea    esi,rdcoord
        lea    edi,rdbuff
        xor    ebx,ebx
        cmp    diacia,1
        je    cir
        @@:
        mov    al,byte ptr[esi+ebx]
        inc    ebx
        mov    ah,0
        mov    cl,10
        .if    diaright == 1
            inc    al
        .endif
        div    cl
        or    ah,ah
        jz    exit2
        cmp    ebx,4
        jb    @b
        
        xor    ebx,ebx
        @@:
        .if    random2 == 1
            .if    rdtop == 1 || rdtop == 3
                .if    dialeft == 1
                    mov    bl,byte ptr[esi]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                    mov    bl,byte ptr[esi+1]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                    mov    bl,byte ptr[esi+2]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                    mov    bl,byte ptr[esi+3]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,L
                        invoke    _setbuff,1,0
                    @@:
                .elseif    diaright == 1
                    mov    bl,byte ptr[esi]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                    mov    bl,byte ptr[esi+1]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                    mov    bl,byte ptr[esi+2]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                    mov    bl,byte ptr[esi+3]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,R
                        invoke    _setbuff,1,0
                    @@:
                    
                .endif
            .elseif    rdtop == 2
                .if    dialeft == 1                    
                    mov    bl,byte ptr[esi]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,L
                        invoke    _setbuff,1,0
                        @@:
                .elseif    diaright == 1                    
                    mov    bl,byte ptr[esi+3]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,R
                        invoke    _setbuff,1,0
                    @@:
                .endif
            .else
                .if    dialeft == 1                    
                    mov    bl,byte ptr[esi+3]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,L
                        invoke    _setbuff,1,0
                        @@:
                .elseif    diaright == 1                    
                    mov    bl,byte ptr[esi]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,R
                        invoke    _setbuff,1,0
                    @@:
                .endif
                
                
                
                
            .endif
        .elseif    random2 == 2
            .if    dialeft == 1
                    mov    bl,byte ptr[esi]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f                    
                    mov    bl,byte ptr[esi+2]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,L
                        invoke    _setbuff,1,0
                    @@:
            .elseif    diaright == 1
                    mov    bl,byte ptr[esi+1]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f                    
                    mov    bl,byte ptr[esi+3]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,R
                        invoke    _setbuff,1,0
                    @@:                
            .endif
        .elseif    random2 == 3
            .if    rdtop == 1
                .if    dialeft == 1                
                    mov    bl,byte ptr[esi]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                    mov    bl,byte ptr[esi+1]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f            
                    mov    bl,byte ptr[esi+2]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,L
                        invoke    _setbuff,1,0
                    @@:
                .elseif    diaright == 1
                    mov    bl,byte ptr[esi]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                    mov    bl,byte ptr[esi+1]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                    mov    bl,byte ptr[esi+3]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,R
                        invoke    _setbuff,1,0
                    @@:
                .endif
            .elseif rdtop == 2
                .if    dialeft == 1
                    mov    bl,byte ptr[esi]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f            
                    mov    bl,byte ptr[esi+3]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,L
                        invoke    _setbuff,1,0
                    @@:
                .elseif diaright == 1            
                    mov    bl,byte ptr[esi+2]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f                
                    mov    bl,byte ptr[esi+3]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,R
                        invoke    _setbuff,1,0
                    @@:            
                .endif
            .elseif    rdtop == 3
                .if    dialeft == 1
                    mov    bl,byte ptr[esi]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f    
                    mov    bl,byte ptr[esi+1]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f    
                    mov    bl,byte ptr[esi+3]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,L
                        invoke    _setbuff,1,0
                    @@:
                .elseif diaright == 1        
                    mov    bl,byte ptr[esi]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f            
                    mov    bl,byte ptr[esi+1]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f            
                    mov    bl,byte ptr[esi+2]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,R
                        invoke    _setbuff,1,0
                    @@:
                .endif
            .else
                .if    dialeft == 1
                    mov    bl,byte ptr[esi+2]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f    
                    mov    bl,byte ptr[esi+3]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,L
                        invoke    _setbuff,1,0
                    @@:
                .elseif diaright == 1    
                    mov    bl,byte ptr[esi]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f        
                    mov    bl,byte ptr[esi+3]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,R
                        invoke    _setbuff,1,0
                    @@:
                .endif
            .endif
        .elseif random2 == 4
            .if    rdtop == 1
                .if    dialeft == 1
                    mov    bl,byte ptr[esi]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f    
                    mov    bl,byte ptr[esi+1]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f    
                    mov    bl,byte ptr[esi+3]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,L
                        invoke    _setbuff,1,0
                    @@:
                .elseif    diaright == 1
                    mov    bl,byte ptr[esi]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f    
                    mov    bl,byte ptr[esi+1]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f    
                    mov    bl,byte ptr[esi+2]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,R
                        invoke    _setbuff,1,0
                    @@:
                .endif
            .elseif    rdtop == 2
                .if    dialeft == 1
                    mov    bl,byte ptr[esi]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f    
                    mov    bl,byte ptr[esi+3]
                    dec    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,L
                        invoke    _setbuff,1,0
                    @@:
                .elseif    diaright == 1
                    mov    bl,byte ptr[esi+2]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f    
                    mov    bl,byte ptr[esi+3]
                    inc    bl
                    cmp    byte ptr[edi+ebx],0
                    jnz    @f
                        invoke    _setbuff,0,0
                        invoke    _shift,R
                        invoke    _setbuff,1,0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -