在64位Windows上运行汇编项目

编程入门 行业动态 更新时间:2024-10-09 20:28:44
本文介绍了在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 ; 输出 字符串 at 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上运行汇编项目

本文发布于:2023-06-05 23:16:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/529903.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:项目   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!