问题标签 [tasm]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
assembly - 如何将变量转换为 DECIMAL 字符串以进行打印?
我计划将 X 变量转换为十进制。我在使用 turbo assembler 时遇到了困难,你能帮忙吗?
非常感谢
assembly - TurboShell/TurboAsm 中的“Var2 DW Var1”是什么意思?
为什么下面的代码可以完美编译?
“Var2 Dw Var1”这一行是什么意思?我认为只有立即值可以跟在类型定义之后。
assembly - 8086 汇编 - DIV 变猿,IP 无休止地跳到一个奇怪的位置
我被这个问题困扰了一天,没有找到任何相关信息..
我的代码中有这一部分需要一个数字(例如 259)并将其数字分隔到数组槽中。
我一直在 turbo 调试器上调试它。第一个分区工作正常。(25 到 ax,9 到 dx).. 下一个部门,IP 变成猿,只是跳转到命令“db FE”,然后一次又一次地循环。
我到底做错了什么?问:
gcc - gcc 真的知道如何输出 NASM 程序集吗
所以我有一个简单的 C 程序,它遍历传递给 main 的参数然后返回:
我想看看 gcc 如何以 NASM 格式写出程序集。我正在查看 .asm 文件中的输出,并注意到语法是 TASM。下面是 make 文件和 gcc 的输出。我做错了什么还是 gcc 没有输出真正的 NASM 语法?
和
命令行上的错误是:
让我相信这是 TASM 语法的原因是在此链接上发布的信息: http ://rs1.szif.hu/~tomcat/win32/intro.txt
TASM 编码人员通常在使用 NASM 时遇到词汇困难,因为它缺少在 TASM 中广泛使用的“ptr”关键字。
TASM 使用这个:
mov al, byte ptr [ds:si] 或 mov ax, word ptr [ds:si] 或 mov eax, dword ptr [ds:si]
对于 NASM,这简单地转化为:
mov al, byte [ds:si] 或 mov ax, word [ds:si] 或 mov eax, dword [ds:si]
NASM 在很多地方都允许使用这些大小的关键字,因此可以让您以 unifrom 方式对生成的操作码进行大量控制,例如这些都是有效的:
push dword 123 jmp [ds: word 1234] ; 这些都指定了偏移量 jmp [ds: dword 1234] 的大小;用于连接 32 位和 ; 时的棘手代码 16位段
它可能会变得非常多毛,但要记住的重要一点是,您可以在需要时拥有所需的所有控制权。
assembly - TASM 中带参数的函数
您能否用汇编语言发布一个使用带参数的函数的示例。一些简单的东西,比如返回两个元素之和的函数。
无法谷歌任何足够简单的例子。
添加:
assembly - 8086 - storing command line arguments in arrays
I'm writing an encoding/decoding .COM program using Huffman algorithm for dos 8086 (16-bit tasm or masm without using libraries), and need to store 2 command-line arguments (inputfilename and outputfilename) in arrays so that I can read the input file, apply my huffman encoding, and write to the output file.
I've read that they are stored at address 80h, where 80h contains the length of the arguments, and 81h onward the arguments themselves. So the idea is to store the first argument in inarg (and the second one in outarg, which I haven't started working on yet) The purpose of the interrupt 21h call with subroutine 9 was to check I had it right. (which is not the case)
Here is what I have so far:
With the following relevant data:
I've started with the basics without considering delimiters, and trying to get only the first argument (inarg, which is the input file name).
And it doesn't work, so I'm definitely doing something wrong. This look may like a total mess to any experienced programmer, but that's because I tried to follow resources I found on the internet without success, and therefore switch to implement it using only the concepts I understand so far. Any help would be greatly appreciated, Thank you.
assembly - asm 更改 cmd 背景颜色
我写了更改文本颜色的部分,但找不到更改背景颜色的方法,此代码用于 tasm 组装:
这是我的代码,但它不起作用:
assembly - 在汇编中运行简单程序时出错
我在汇编中编写了一个简单的程序,并尝试使用 TASM(Turbo) 和 TLINK 运行它。运行可执行文件后,出现此错误:
如果我删除仅将 2ah 移动到 BL 的线,它工作得很好。我尝试更改添加到 BL 的值,但仍然收到错误消息。我只是想了解导致错误的原因。
谢谢!
稍后编辑:我设法通过添加 .stack 100h 解决了该错误。谁能解释到底发生了什么?
assembly - 打印打包的 BCD (DT) - 汇编语言 (TASM)
我试图在汇编中制作一个简单的计算器。我使用了 TASM(学校政策)。问题是在 DT 变量中打印使用 FBSTP 命令(协处理器命令)保存的数字。
FBSTP adr - 将位于堆栈顶部的值 (ST (0)) 存储在地址“adr”中作为压缩十进制数(在“adr”中定义为 DT)。堆栈指针递减。转换是在存储过程中完成的。
我调试了程序,当除以 10 时,结果被破坏了。例如:12*1=12。res2 中的结果是正确的。将它移动到 AX 后它仍然是正确的,但是当我将它除以 10 时,DX 变为 8 而不是 2,所以它打印出 18 而不是 12。我还注意到 12h=18d 但我无法建立连接。LE:如果我在 word 变量中使用一个简单的整数存储并打印它,它就可以正常工作。
这是我认为重要的代码部分:
非常感谢。
assembly - 有没有什么软件可以帮助我轻松地用汇编语言绘制图片或形状?
有没有什么软件可以帮助我轻松地用汇编语言绘制图片或形状?我正在使用 tasm 5,在 notepad++ 中编辑代码并在 cmd 中运行。我正在使用窗户。32位。