I need to create a String Value in registry that has absolutely nothing in it. For example: MyString db "",0 Only when I assemble, I get the "empty (null) string" error. Is it possible to declare byte with no content? Or is there a way to trick the assembler into letting you do so?(i.e.-declaring 255H as a byte. 255 is a null character...this doesn't work though :( ) -Nokturnal p.s. - If this isn't possible, C may have one up on Asm...since this method IS possible in C.
Posted on 2001-01-09 11:36:00 by Nok
Have you tried MyString db 0 The stuff in quotes is translated to its ASCII equal by MASM, and empty quotes probably confuse it! MyString1 db "asm",0 MyString2 db 97,115,109,0 are equal, MyString1 is easier to read (and input I needed to use Character map to work it out :P ), MyString2 is what MASM treats MyString1 as. I think you can even use the quotes in code: mov al, 'a' ;I think its single quotes for a single character mov bx, "bc" ;Double quotes, equal to 9998h (byte swapped ; because Intel does that)! mov ecx, "defg" ;same as for bx except 4 chars cos its 32 bit As for what you said in your "p.s." ANYTHING you can do in C can be done in asm. C is a series of rules for converting code into machine code, and so is asm (except the rules in asm are much more simple). There are no processor operations hidden from the ASM coder that C uses! If it can be done, it can be done in assembly (and it will usually be quicker than any higher level languages (and smaller))! Mirno
Posted on 2001-01-09 12:42:00 by Mirno
i really don't see what you want to do but a null string is a 0 : str db 0
Posted on 2001-01-09 13:29:00 by (scalp)