从汇编语言执行shell脚本(.ASM,86) [英] Executing a shell script from assembly language(.asm,x86)

查看:308
本文介绍了从汇编语言执行shell脚本(.ASM,86)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的.asm的文件执行shell脚本(完全是在下面的code提及),但可以,找不到替代在assembly.I以下行正在使用masm611组装和编译文件。

 的System.Diagnostics.Process PROC =新的System.Diagnostics.Process();
proc.StartInfo.FileName =myscript.sh;
proc.Start();


解决方案

首先,你不说哪个架构;所以这是无法回答的。一个简单的解决方案应该是只code在C,然后编译成汇编code - 这是一个交换机的所有流行的C编译器都,据我所知 - 那么就移植到自己的code,用适当的库链接

免责声明:我不是在组装工作。

I want to execute a shell script(exactly as mentioned in the code below) from my .asm file but can,t find the alternative to the following lines in assembly.I am using masm611 to assemble and compile the files.

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "myscript.sh";
proc.Start();

解决方案

First, you don't say which architecture; so this is unanswerable. An easy solution should be to just code this in C, then compile to assembly code - that's a switch all popular C compilers have, AFAIK - then just transplant to your own code, linking with appropriate libraries.

Disclaimer: I don't work in assembly.

这篇关于从汇编语言执行shell脚本(.ASM,86)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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