将字符串作为参数传递给函数 [英] pass string as an argument to a function

查看:441
本文介绍了将字符串作为参数传递给函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是汇编编程的初学者,试图弄清楚如何将字符串作为参数传递给nasm中的函数(子程序),然后逐个字符地打印。



注意:16位汇编程序,使用堆栈



你可以帮我解决这个问题。

Hi,
I am a very beginner to assembly programming and trying to figure out how to pass a string as an argument to a function(sub program) in nasm and then print character by character.

Note: 16 bit assembler, utilizing stacks

could you please help me in this regards.

推荐答案

在字符串上推送字符串的地址,这就是全部。所有进一步的细节取决于许多因素;请看我对这个问题的评论。



-SA
Push the address of the string on stack, that''s all. All further detail depend on many factors; please see my comment to the question.

—SA


这篇关于将字符串作为参数传递给函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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