查看單個文章
舊 2005-12-23, 12:31 AM   #1
kinco
註冊會員
榮譽勳章
UID - 248756
在線等級: 級別:8 | 在線時長:113小時 | 升級還需:4小時級別:8 | 在線時長:113小時 | 升級還需:4小時級別:8 | 在線時長:113小時 | 升級還需:4小時
註冊日期: 2003-02-06
VIP期限: 2007-04
住址: 台北.中和
文章: 507
精華: 0
現金: 0 金幣
資產: 670 金幣
預設 組合語言作業又來了...小弟誠心拜託大家...

小弟依然看不太懂他的意思...
這次的題目是要使用者輸入字串~然後大寫換小寫
我不懂怎麼輸入字串阿~冏rz...小弟誠心請大家幫忙~感恩~
語法:
WriteString PROC 
Writes a null-terminated string to standard output. 
Call args: EDX = points to string 
Return arg: None 
Example: 
.data 
prompt BYTE "Enter your name: ",0 

.code 
mov edx,OFFSET prompt 
call WriteString 
ReadString PROC 
Reads a string of up to ECX non-null characters from standard input, stopping when the user presses the Enter key. 
A null byte is stored following the characters input, but the trailing carriage return and line feed characters are not placed into the buffer. 
ECX should always be smaller than the buffer size (never equal to the buffer size) because the null byte could be the (ECX+1)th character stored. 
Call args: EDX points to the input buffer 
ECX max number of non-null chars to read 

Return arg: EAX = size of input string. 
Example: 
.data 
MAX = 80 ;max chars to read 
stringIn BYTE MAX+1 DUP (?) ;room for null 
.code 
mov edx,OFFSET stringIn 
mov ecx,MAX ;buffer size - 1 
call ReadString 

Crlf PROC 
Writes a carriage return/linefeed sequence (0Dh,0Ah) to standard output. 
Call args: None 

Return arg: None 
Example: 
call Crlf
kinco 目前離線  
送花文章: 23, 收花文章: 5 篇, 收花: 9 次
回覆時引用此帖