can anyone tell me the byte value of the return key eg. 123456789 1011121314 ... its not [ db '',0 ] or [ db ' ',0 ] so what the hell is it ... ??? plz help me
Posted on 2001-03-30 10:24:00 by skud
hi, do you mean the ascii number? if yes the answer is: 13 (carriage return) example:

.DATA
text db "this",13,10
     db "is",13,10
     db "a",13,10
     db "test",0

.CODE
invoke MessageBox,NULL,addr text,addr text,MB_OK
13 = carriage return 10 = line feed This message was edited by drcmda, on 3/30/2001 11:33:29 AM
Posted on 2001-03-30 10:32:00 by drcmda
no not the ascii number :) i mean what do you put in the " ' " in a "db" thingy to represent pressing return :) what i am trying to do is get a byte from a text file (i have done this) and then compare it to a . then i will act on the result. however i have nothing to compare it to cos i dont know how to put it in a db. a db is a dword right? btw, to compare i am using lstrcmp This message was edited by skud, on 3/30/2001 12:07:04 PM
Posted on 2001-03-30 10:39:00 by skud
You can't enter the character, as it will be interpreted as a carriage return! You must put in the ASCII code instead! The putting stuff between inverted commas is just an easy, and understandable way of doing stuff. You could just as well type the following
MyVar     db 65,66,67,0
MyVar2    db "ABC",0
These are identical! Mirno
Posted on 2001-03-30 11:09:00 by Mirno
ok i did it :) thanks to people in efnet #win32asm i did it by db 13 This message was edited by skud, on 3/30/2001 12:20:14 PM
Posted on 2001-03-30 11:19:00 by skud
no, db is not for dword. db = declare byte. db "a","b","c" declares 3 bytes db 13 declares 1 byte (CR/RETURN) what you wanted is the ascii number of the return key and as i said it's 13. DON'T use lstrcmp, you can use "cmp al,13" that's all. but note that when you enter a text and press it will be interpreted as 13,10! 13 means that the cursor is set to beginning of line and 10 means that the cursor is set to the next line! however, you can compare this pair, too... note that 13,10 are two bytes -> one dword so you can do somthing like this: "cmp ax,0A0D". This message was edited by drcmda, on 3/30/2001 1:06:05 PM
Posted on 2001-03-30 11:56:00 by drcmda