【问题标题】:Assembly-Tasm string input without buffer size and length没有缓冲区大小和长度的 Assembly-Tasm 字符串输入
【发布时间】:2020-06-19 07:27:56
【问题描述】:

我想做字符串输入,但不喜欢0Ah中断方法。此方法在输入的字符串、缓冲区大小和字符串长度之前添加 2 个值。是否有其他中断我只能输入没有这个值的字符串?

【问题讨论】:

    标签: string assembly dos x86-16 tasm


    【解决方案1】:

    您可以使用 DOS 函数3Fh - READ FROM FILE OR DEVICE 读取字符串。

    MOV AH,3Fh          ; DOS function number.
    MOV BX,0            ; File handle of standard input (keyboard).
    MOV CX,SizeOfBuffer ; Maximal number of bytes to read.
    LEA DX,[Buffer]     ; Offset of memory reserved for the string.
    INT 21h             ; Invokation of DOS function.
    JC Error
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-31
      • 2013-08-12
      • 2021-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多