簡體   English   中英

沒有緩沖區大小和長度的 Assembly-Tasm 字符串輸入

[英]Assembly-Tasm string input without buffer size and length

我想做字符串輸入,但不像 0Ah 中斷方法。 此方法在輸入的字符串、緩沖區大小和字符串長度之前添加 2 個值。 是否有其他中斷我只能輸入沒有這個值的字符串?

您可以使用 DOS function 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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM