| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 7205 人关注过本帖
标题:proteus can't load modile;Real time Simulation failed to start
只看楼主 加入收藏
兔先生
Rank: 2
等 级:论坛游民
帖 子:41
专家分:20
注 册:2018-11-9
结帖率:63.64%
收藏
 问题点数:0 回复次数:0 
proteus can't load modile;Real time Simulation failed to start
使用Wmd86进行汇编语言编译并可以在板子上运行,但在使用Proteus进行仿真时无法加载.EXE.文件到8086上,运行其他汇编代码没有问题。
汇编代码如下
程序代码:
ASSUME CS:CODE,DS:DATA


DATA segment
    db 03h,06h,0Ch,09h,00h,00h    
    
DATA ends

CODE SEGMENT

HEAD:      MOV DX,0606H
        MOV AL,82H
        OUT DX,AL
        
LOP1:   MOV AX,DATA
        MOV DS,AX
        ;读取bl输入的值放入al中
        mov dx, 0602h
        in  al, dx
        
        ;正反转
        mov ah, al
        and al,00000001b
        mov bx,5
        mov ds:bx,al
        ;档位
        and ah,00000110b
        ror ah,1h
        mov bx,4
        mov ds:bx,ah
        
;        mov dx, 0600h

;        mov al,00000000b
;        out dx,al
        call dang
        
        
;        mov al,01000000b
;        out dx,al
;        call dang
        ;CALL ZHUAN  ;转一圈
        call xiyi
        
LOP4:    JMP LOP1
        
        ;mov ax,4c00h
        ;int 21h
        
        
        

;----------------------------------------        
DELAY: MOV CX,0AAAAH
LOP2:    LOOP LOP2
        RET
;----------------------------------------


;----------------------------------------
    
DELAY3: 
        call DELAY
        ret
        
DELAY2: 
        call DELAY
        call DELAY
        ret


DELAY1: 
        call DELAY
        call DELAY
        call DELAY
        ret
;----------------------------------------

;----------------------------------------
;洗衣模式
xiyi:
    MOV AX,DATA
    MOV DS,AX
    MOV BX,4
    mov AL,DS:BX
    CMP AL,01H
        JE qingrou
    CMP AL,02H
        JE r1
    CMP AL,03H
        JE r2
    ret
r1: jmp zhengchang
    ret
r2: jmp shuaigan
    ret    
;----------------------------------------
;轻柔    4回合
qingrou:
    
    
p1:    call cWise1
    call cWise1
    call cWise1
    call cWise1
    call cWise1
    call cWise1
    call cWise1
    call cWise1
    call cWise1
    call cWise1
    call cWise1
    call cWise1
    call cWise1


p2:    call ccWise1
    call ccWise1
    call ccWise1
    call ccWise1
    call ccWise1
    call ccWise1
    call ccWise1
    call ccWise1
    call ccWise1
    call ccWise1
    call ccWise1
    call ccWise1
    call ccWise1
    
    ret

;正常    4回合
zhengchang:
    call cWise2
    call cWise2
    call cWise2
    call cWise2
    call cWise2
    call cWise2
    call cWise2
    call cWise2
    call cWise2
    call cWise2
    call cWise2
    call cWise2
    call cWise2

p4:    call ccWise2
    call ccWise2
    call ccWise2
    call ccWise2
    call ccWise2
    call ccWise2
    call ccWise2
    call ccWise2
    call ccWise2
    call ccWise2
    call ccWise2
    call ccWise2
    call ccWise2

    ret
    
;甩干    4回合
shuaigan:
;正反一圈
    
p5:    call cWise3
    call cWise3
    call cWise3
    call cWise3
    call cWise3
    call cWise3
    call cWise3
    call cWise3
    call cWise3
    call cWise3
    call cWise3
    call cWise3
    call cWise3

    

p6:    call ccWise3
    call ccWise3
    call ccWise3
    call ccWise3
    call ccWise3
    call ccWise3
    call ccWise3
    call ccWise3
    call ccWise3
    call ccWise3
    call ccWise3
    call ccWise3
    call ccWise3

    ret
;----------------------------------------



;---------------------------------------
;转一圈
zhuan:
    MOV AX,DATA
    MOV DS,AX
    MOV BX,5
    MOV AL,DS:BX
    CMP AL,00H
    JE  CWISE
    JMP CCWISE
    RET
    
;---------------------------------------

;---------------------------------------

;正转一圈
cWise:
    MOV AX,DATA
    MOV DS,AX
    
    MOV BX,4
    mov AL,DS:BX
    CMP AL,01H
        JE l1
    CMP AL,02H
        JE cWise2
    CMP AL,03H
        JE cWise3
    JMP LOP1
l1: JMP cWise1
    RET

cWise3:
MOV AX,DATA
    MOV DS,AX
    
    MOV DX,0600H
    MOV BX,00H

    MOV CL,DS:BX
    MOV AL,CL
;    OR  AL,01001111B    ;方向
    
    OUT DX,AL
;    call DANG
    CALL DELAY3
    
    ADD BX,01H
    
    MOV CL,DS:BX
    MOV AL,CL
;    OR  AL,01001111B    ;档位
    
    OUT DX,AL
;    call DANG
    CALL DELAY3
    
    ADD BX,01H
    
    MOV CL,DS:BX
    MOV AL,CL
;    OR  AL,01001111B
    
    OUT DX,AL
;    call DANG
    CALL DELAY3
    
    ADD BX,01H
    
    MOV CL,DS:BX
    MOV AL,CL
;    OR  AL,01001111B

    OUT DX,AL
;    call DANG
    CALL DELAY3

    ret

cWise2:
    MOV AX,DATA
    MOV DS,AX
    
    MOV DX,0600H
    MOV BX,00H

    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY2
    
    ADD BX,01H
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY2
    
    ADD BX,01H
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY2
    
    ADD BX,01H
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY2

    ret

cWise1:
    MOV AX,DATA
    MOV DS,AX
    
    MOV DX,0600H
    MOV BX,00H

    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY1
    
    ADD BX,01H
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY1
    
    ADD BX,01H
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY1
    
    ADD BX,01H
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY1


    ret
    
;反转一圈
ccWise:
    MOV AX,DATA
    MOV DS,AX
    MOV BX,4
    mov AL,DS:BX
    CMP AL,01H
        JE ccWise1
    CMP AL,02H
        JE ccWise2
    CMP AL,03H
        JE ccWise3
    RET


ccwise3:
    MOV AX,DATA
    MOV DS,AX
    
    MOV DX,0600H
    MOV BX,03H

    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY3
    
    DEC BX
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY3
    
    DEC BX
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY3
    
    DEC BX
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY3
    
    RET

ccwise2:
MOV AX,DATA
    MOV DS,AX
    
    MOV DX,0600H
    MOV BX,03H

    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY2
    
    DEC BX
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY2
    
    DEC BX
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY2
    
    DEC BX
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY2
    
    ret

ccwise1:
    MOV AX,DATA
    MOV DS,AX
    
    MOV DX,0600H
    MOV BX,03H

    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY1
    
    DEC BX
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY1
    
    DEC BX
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY1
    
    DEC BX
    
    MOV CL,DS:BX
    MOV AL,CL
    OUT DX,AL
    CALL DELAY1
    ret

;---------------------------------------

;---------------------------------------
;数码管显示
light0:
        mov dx, 0604h                ; 控制端口a
        mov al, 3fh
        out dx, al                    ; 将al数据输出
        ret
light1:
        mov dx, 0604h                ; 控制端口a
        mov al, 06h
        out dx, al                    ; 将al数据输出
        ret
        
        ;数字2
light2:
        mov dx, 0604h                ; 控制端口a
        mov al, 5Bh
        out dx, al                    ; 将al数据输出
        ret
        ;数字3
light3:
        mov dx, 0604h                ; 控制端口a
        mov al, 4Fh
        out dx, al                    ; 将al数据输出
        ret

        ;数字4
light4:
        mov dx, 0604h                ; 控制端口a
        mov al, 66h
        out dx, al                    ; 将al数据输出
        ret
        
        ;数字5
light5:
        mov dx, 0604h                ; 控制端口a
        mov al, 6Dh
        out dx, al                    ; 将al数据输出
        ret

        ;数字6
light6:
        mov dx, 0604h                ;控制端口a
        mov al, 7Dh
        out dx, al                    ; 将al数据输出
        ret

        ;数字7
light7:
        mov dx, 0604h                ; 控制端口a
        mov al, 07h
        out dx, al                    ; 将al数据输出
        ret

        ;数字8
light8:
        mov dx, 0604h                ; 控制端口a
        mov al, 7Fh
        out dx, al                    ; 将al数据输出
        ret

;---------------------------------------

;---------------------------------------
;输出档位
dang:
    
    MOV AX,DATA
    MOV DS,AX
    MOV BX,04H
    MOV AL,DS:BX
    
    mov cl, 0H            ;判断0
    cmp al, cl
        je light0
        
    mov cl, 01H            ;判断1
    cmp al, cl
        je light1
        
    mov cl, 02H            ;判断2
    cmp al, cl
        je light2
        
    mov cl, 03H            ;判断3
    cmp al, cl
        je light3
    

;输出方向
Fang:
    MOV AX,DATA
    MOV DS,AX
    MOV BX,05H
    MOV AL,DS:BX
    
    mov cl, 0H            ;判断0
    cmp al, cl
        je light0
        
    mov cl, 01H            ;判断1
    cmp al, cl
        je light1
        
;---------------------------------------




        
CODE ENDS 
END HEAD
        


图片附件: 游客没有浏览图片的权限,请 登录注册

搜索更多相关主题的帖子: DATA OUT RET MOV call 
2020-09-17 12:50
快速回复:proteus can't load modile;Real time Simulation failed to start
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.084476 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved