Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-12-2004, 10:36
3ch0
 
Posts: n/a
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.
Online book was here:
Code:
http://oopweb.com/Assembly/Documents/ArtOfAssembly/VolumeFrames.html
The question is:
- 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.
Reply With Quote
  #2  
Old 05-12-2004, 14:54
peleon peleon is offline
Friend
 
Join Date: Sep 2003
Posts: 174
Rept. Given: 0
Rept. Rcvd 7 Times in 1 Post
Thanks Given: 0
Thanks Rcvd at 7 Times in 7 Posts
peleon Reputation: 7
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.
Reply With Quote
  #3  
Old 05-12-2004, 15:34
3ch0
 
Posts: n/a
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?
Reply With Quote
  #4  
Old 05-12-2004, 15:54
peleon peleon is offline
Friend
 
Join Date: Sep 2003
Posts: 174
Rept. Given: 0
Rept. Rcvd 7 Times in 1 Post
Thanks Given: 0
Thanks Rcvd at 7 Times in 7 Posts
peleon Reputation: 7
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
Reply With Quote
  #5  
Old 05-12-2004, 16:00
3ch0
 
Posts: n/a
k

does the book explained good enough for basic assembly?.and how did you take for mastering assembly?
Reply With Quote
  #6  
Old 05-12-2004, 18:45
peleon peleon is offline
Friend
 
Join Date: Sep 2003
Posts: 174
Rept. Given: 0
Rept. Rcvd 7 Times in 1 Post
Thanks Given: 0
Thanks Rcvd at 7 Times in 7 Posts
peleon Reputation: 7
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.
Reply With Quote
  #7  
Old 05-12-2004, 19:22
auroras
 
Posts: n/a
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.
Reply With Quote
  #8  
Old 05-13-2004, 00:30
zentis
 
Posts: n/a
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.
Reply With Quote
  #9  
Old 05-13-2004, 06:33
3ch0
 
Posts: n/a
?

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


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


All times are GMT +8. The time now is 22:40.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )