如何在TASM中使用指针?

时间:2018-01-30 21:41:55

标签: assembly x86 dos x86-16 tasm

我是程序集的初学者,我想在程序集中创建一个子程序,该子程序接收指向内存中准备接收字符串的位置的指针。一旦它这样做,它将不断询问用户一个字符,并将每个字符保存在指针指向的内存空间中。一旦用户输入,子程序停止向用户请求一个字符,并将美元符号添加到字符串的末尾。

.MODEL SMALL

.DATA  

.CODE

START:

looping:
  mov ah, 06h
  int 21h
  cmp al, Dh
  je finish
  around here I am guessing I should save each character to the memory space
  pointed to by the pointer
  jmp looping

finish: around here I would add the dollar sign to the memory space pointed    
by the pointer

END START

非常感谢任何帮助。所以我已经阅读了你的一些建议,非常感谢所有的一切,但我想知道我可以做mov bx,地址然后按bx,然后弹出bx lea cx,bx?

0 个答案:

没有答案