![]() |
|
#1
|
|||
|
|||
|
Assembly question
I starting to learning assembly,and really insterested to read "The art of assembly language Programming" but stuck in chapter 1.6 "Logical Operations on Binary Numbers and Bit Strings"
Here is the text from the book: Code:
This bitwise logical AND operation would force the H.O. four bits to zero and pass the L.O. four bits of 'X' through unchanged. Likewise you could force the L.O. bit of 'X' to one and invert bit number two of 'X' by logically ORing 'X' with 0000 0001 and logically exclusive-ORing 'X' with 0000 0100 respectively. Using the logical AND OR and XOR operations to manipulate bit strings in this fashion is know as masking bit strings. We use the term masking because we can use certain values (one for AND zero for OR/XOR) to 'mask out' certain bits from the operation when forcing bits to zero one or their inverse. Code:
http://oopweb.com/Assembly/Documents/ArtOfAssembly/VolumeFrames.html - what the hell is "0ring??? - and i am a bit miss understand in this text.would someone explain me by an example operation? Last edited by 3ch0; 05-12-2004 at 10:43. |
|
#2
|
|||
|
|||
|
Hello 3ch0,
First, I have to admit that book mess up a lot what AND/OR/XOR is. It's a simple concept that is hidden in that text line ![]() About ORing, well, I guess the the author wants to say OR-ing (verb finished in -ing) (that磗 english i suppose ). So, that's the same as saying: "Apply the OR operator..."My explanation about this: OR = binary add 0 or 0 = 0 1 or 0 = 1 0 or 1 = 1 1 or 1 = 1 AND = binary multiply 0 and 0 = 0 0 and 1 = 0 1 and 0 = 0 1 and 1 = 1 XOR = exclusive OR 0 xor 0 = 0 0 xor 1 = 1 1 xor 0 = 1 1 xor 1 = 0 So, using this 3 operators you can play with the bits in a registry/memory as you like. For example, suppose that you have in the EAX register a value. If you want to know if that number is odd or even you can make the following: and eax, 1 ; will leave the bit-0 untouched to check if even or odd .if eax == 1 ; we are odd! .else ; we are even! .endif Hope this helps
Last edited by peleon; 05-12-2004 at 14:56. |
|
#3
|
|||
|
|||
|
k
thanks,i got it.so exclusive 0ring suppose be xor right?
the book was really good!!.did you knew any other basic assembly book?
|
|
#4
|
|||
|
|||
|
Yes, you are right.
About books...well, I dont know any other online book. You have plenty of tutorials on the net. Also, when you know the basics of assembly, you just need the Intel Instruction set manual to know all the different instructions to play with ![]() Regards |
|
#5
|
|||
|
|||
|
k
does the book explained good enough for basic assembly?.and how did you take for mastering assembly?
|
|
#6
|
|||
|
|||
|
i'm not a asm guru...but for those of you who start learning ASM, my advice is to make small examples in asm and debug them under a debugger. It's when you see the registers/memory "changing" under the debugger, when you start getting a solid knowledge in asm.
|
|
#7
|
|||
|
|||
|
If you want an introduction ebook, try Assembly Language Step by Step. It's published in 1992, so it's pretty new (for assembly), and it starts very basic, including how to count to hex and binary.
I may say it could be more useful than the Art of Assembly since this is directed as assembler proper (if I recall, doesn't Art of Assembly focus on HLA?). Anyway, you can get it at the runnet site: fxp://ftp.runnet.ru/BOOKS/, file name is ASSEMBLY_LANGUAGE__STEP_BY_.ZIP, just 6.4Mbs. |
|
#8
|
|||
|
|||
|
I started with the Art of Assembly and I must say I found it to be really good beginner book.
Apparently there are now different version, the socalled dos version which is the older version and deals with real assembly and the windows and linux version which focuses on HLA. So the dos version is the best choice if you want to learn real assembly and can be found in pdf at hxxp://webster.cs.ucr.edu/AoA/DOS/index.html The zip file of all the pdf is : hxxp://webster.cs.ucr.edu/AoA/DOS/pdfaoa.zip Last edited by zentis; 05-13-2004 at 06:39. |
|
#9
|
|||
|
|||
|
?
You mean this one : http://webster.cs.ucr.edu/AoA/DOS/pdf/0_AoAPDF.html or http://webster.cs.ucr.edu/AoA/DOS/pdf/0_AoAPDF.html ?.please direct only plz
|
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Assembly ... these might be useful to someone | yaa | General Discussion | 6 | 04-28-2005 18:17 |
| Assembly obfusscation | Zigmund | General Discussion | 6 | 04-23-2004 01:14 |