在64位Windows上运行汇编项目 [英] Running assembly project on 64bit windows

查看:104
本文介绍了在64位Windows上运行汇编项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我是组装的新手,我使用emu8086创建项目,将项目编译为exe,但是当我尝试运行它时,出现一条消息,提示它不能在64位Windows下运行.
如何使项目在64位下运行?我必须更改我正在使用的代码或程序集吗?

这是我使用的代码:

Hi,
I''m completely new to assembly and I''m using emu8086 to create my projects, I compiled my project to exe but when i tried to run it there was a message telling it cannot run under 64 bit windows.
How can I make a project run under 64 bit? Am I have to change my codes or assembly that I''m using?

this is the code I used:

; multi-segment executable file template.

data segment
    ; add your data here!
    pkey db "press any key...$"
ends

stack segment
    dw   128  dup(0)
ends

code segment
start:
; set segment registers:
    mov ax, data
    mov ds, ax
    mov es, ax

    mov ah, 0eh
    mov al,'M'
    int 10h

    lea dx, pkey
    mov ah, 9
    int 21h        ; output string at ds:dx

    ; wait for any key....
    mov ah, 1
    int 21h

    mov ax, 4c00h ; exit to operating system.
    int 21h
ends

end start ; set entry point and stop the assembler.




谢谢




Thanks

推荐答案

结束 堆栈 dw 128 dup(0) 结束 代码 细分 开始: ; 集合 细分 mov ax 数据 mov ds ax mov es ax mov ah 0eh mov al ,'M' int 10h lea dx pkey mov ah 9 int 21h ; 字符串 ds:dx ; 等待 .... mov ah 1 int 21h mov ax 4c00h 退出 正在操作 系统. int 21h 结束 结束 开始 ; 条目 停止 汇编器
" ends stack segment dw 128 dup(0) ends code segment start: ; set segment registers: mov ax, data mov ds, ax mov es, ax mov ah, 0eh mov al,'M' int 10h lea dx, pkey mov ah, 9 int 21h ; output string at ds:dx ; wait for any key.... mov ah, 1 int 21h mov ax, 4c00h ; exit to operating system. int 21h ends end start ; set entry point and stop the assembler.




谢谢




Thanks


这是旧式的16位DOS代码,无法在受保护的系统中运行.如果要在仿真器中运行它,请查看仿真器文档中的规则和限制.
This is old style 16-bit DOS code and will not run in a protected system. If you are running it within an emulator then check the emulator documentation for rules and restrictions.


这篇关于在64位Windows上运行汇编项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆