Wednesday, September 16, 2009

Itachi Again!!!!!

BC 25-F

Announcements:

♠ September 18, 2009 (Friday)
♥ Final Schedule for oral defense will be given

♠ September 30, 2009 (Wednesday) / October 1, 2009 (Thursday)
♥ Submit first draft
♦ 8:00 am-12:00 noon &
2:00 pm - 5:00 pm @ the English Department (Green Basket)
♦ 6:00 pm - 10:00 pm @ the VH guard house (Green Basket)


♠ October 12, 2009 (Monday)
♥ Oral Defense
♦ 9:00 am - 12:00 noon
2:00 pm - 5:00 pm

♠ 2-3 days after oral defense
-submit brown envelope containing 1st & 2nd drafts, answered
questionnaires, note cards & photocopies @ English Department/VH Guard House (Green Basket)




"People live their lives bound by what they accept as correct and true. That's how they define "reality". But what does it mean to be "correct" or "true"? Merely vague concepts ... their "reality" may all be a mirage. Can we consider them to simply be living in their own world, shaped by their beliefs?"

Tuesday, September 15, 2009

Physics 39 -- September 15, 2009

Physics 39 -- Assembly

September 15, 2009 -- Tuesday


MOVINGDATA

Various sections of an assembly program:

1. data

2. bss - .comm -- common mem area

ex.

.comm symbol, length

- .lcomm -- local common mem area

3. text


Data types/directives

.ascii

.asciz

.byte

double

float

.int

.long

.octa

.quad

.short

.single


example:

*pi:

.float 3.14159

*size

.long 100, 150, 200, 250, 300


#declaration

.section .data

msg:

.ascii " This is a test message"

factors:

.double 37.45, 45.33, 12.30

height:

.int 54

length:

.int 62, 35, 47


.equ factor, 3 #static variable

.equ LINUX_SYS_CALL, 0x80

movl LINUX_SYS_CALL, %eax


buffer - continuous block of bytes

how to show the memory occupied by a file

*vdir -- shows the memory occupied

by a file

*vdir -h - shows the memory

occupied by a file with the memory's

unit


Codes

1. smaller memory

#sizetest1.s

.section .bss

.lcomm buffer, 10000

.section .text

.globl main

main:

movl $1, %eax

movl $0, %ebx

int $0x80

*exit command

gcc -o sizetest1 sizetest1.s

./siztest1


2. bigger memory

#sizetest2.s

.section .data

buffer:

.fill 10000

.section .text

.globl main

main:

movl $1, %eax

movl $0, %ebx

int $0x80

gcc -o sizetest2 sizetest2.s

./sizetest2


MOV instruction

1. movl - 32 bit long word

2. movl - 16 bit word

3. movb - 8 bit byte

1 byte = 8 bits

example:

movl %eax, %ecx

movw %ax, %cx

movb %al, %cl


3. Debugging

#movtest1.s

.section .data

value

.int 1

.section .text

.globl main

main:

nop #no operation

movl value, %ecx

movl $1, %eax

movl $0, %ebx

int $0x80

--debugging--

gcc -o movtest movtest1.s -gstabs

man gcc

/-gstabs

/-gstabs

/-gstabs

q -- (quit)


1. gdb -q movtest1 -- starts the debugging process

2. (gdb) break *main+1 -- command use to begin the

debugging process in the main

3. run --command use to start debugging the main

4. --to print the value of ecx type:

print/x $ecx

5. s - command use to go to the next line

6. info registers -- show all the values which the variables

contain


4. looping

#movtest2.s

.section .data

output:

.asciz "The value is %d\n"

values:

.int 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60

.section .text

.globl main

main:

nop

movl $0, %edi

loop:

movl

values

(, %edi, 4), %eax

pushl %eax

pushl $output

call printf

addl $8, %esp

inc %edi #inc - increment

cmpl $11, %edi #cmp - compare

jne loop #jne - jump not equal

movl $0, %ebx

movl $1, %eax

int $0x80

OUTPUT:

The value is 10

The value is 15

The value is 20

The value is 25

The value is 30

The value is 35

The value is 40

The value is 45

The value is 50

The value is 55

The value is 60

-----------------


*int - 32 bits

referencing

index system


4 things to consider in an

indexed memory mode:

1. base address

2. offset address

to add to the base address

*in movtest2 the offset address = 0.

3. size of data elements

4. index to determine which data element to select

----------------------------------------


in this line taken from movtest2.s

movl $0, %edi

if you change 0 to one the output would be:

The value is 15

The value is 20

The value is 25

The value is 30

The value is 35

The value is 45

The value is 50

The value is 55

The value is 60

-------------------------------------------

*print

pushl %eax

pushl $output

call printf

addl $8, %esp

----------------------------------------

5. largest value in an array

#cmovtest.s

.section .data

output:

.asciz "The largest value is %d\n"

values:

.int 105, 235, 61, 315, 134, 221, 53, 145, 117, 5

.section .text

.globl main

main:

nop

movl values, %ebx

movl $0, %edi

loop:

movl values(, %edi, 4), %eax

cmp %ebx, %eax

cmova %eax, %ebx

inc %edi

cmp $10, %edi

jne loop

pushl %ebx

pushl $output

call printf

addl $8, %esp

pushl $0

call exit

gcc -o cmovtest cmovtest.s

./cmovtest


OUTPUT:

The largest value is 315



Igacitas: ENJOY Friends!



Monday, September 14, 2009

Uchiha Itachi

"People live their lives bound by what they accept as correct and true. That's how they define "reality". But what does it mean to be "correct" or "true"? Merely vague concepts ... their "reality" may all be a mirage. Can we consider them to simply be living in their own world, shaped by their beliefs?"

Personal Data
Registration ID: 012110
Birthday: June 9th
Blood Type: AB
Height: 178 cm
Weight: 58 kg

Itachi is Sasuke's older brother, and a genius ninja who entered the battlefield at a young age. Itachi, at age seven, was already a ninja, and at eight had mastered the Sharingan, which is a special ability of the Uchiha clan. As a result, Itachi became cold and distant. By age 13, Itachi was made an ANBU squad leader, though it was so the Uchiha clan could have a spy among ANBU's ranks. However, Itachi spied on his own clan in turn for the Konoha leadership at the time while he was being mentored by Madara Uchiha. After murdering his friend Shisui to obtain the Mangekyou Sharingan, Itachi expresses his true feelings for his clan after his clansmen attempted to force the truth out of him.

When the Third Hokage and Daizo learn that the Uchiha clan are planning a coop to take over the village, they assign Itachi the task of slaughtering his clan with his new power. However, in return, Itachi blackmailed them into letting Sasuke be sparred, and thus Itachi would take full blame. After he murdered his clan with Madara's aid, Itachi lies to Sasuke, saying that he was simply testing his strength, telling him:

Foolish little brother... you can't kill me, your hate's not strong enough... you're not strong enough. That's right, live in shame, run away, and live.

Taking his brother's words to heart, Sasuke was filled with the desire to avenge his family and become strong enough to kill Itachi, as Itachi had intentionally planned. Once leaving Konoha, Itachi joined Madara's Akatsuki organization, where he defeated Orochimaru when Orochimaru attempted to take his body, and became its top member.

When news of the Third Hokage's death came to him, Itachi returned to the Leaf Village on a mission with Kisame Hoshigaki to kidnap Naruto for the Nine-Tailed Fox demon sealed within Naruto. The pair encounter Kurenai, Asuma, and Kakashi, but while the three had no intention of letting Itachi and his companion leave quietly, they had little choice, as they are very easily defeated.

Though he failed, Itachi succeeded in stirring Sasuke back into his plans, attempting to expand his lifespan due to the Mangekyou Sharingan's side effects bringing him closer to death. Years later, Itachi confronts Sasuke in the final battle between the brothers, revealing that the Mangekyou Sharingan can be perfected once one brother kills the other and takes his eyes. Though claiming to be the victor after sealing Orochimaru, Itachi knells over with the last of his strength being to give Sasuke his Sharingan power.

Itachi's strongest attack is the Mangekyou Sharingan, which is the ability to enter another's mind and make them feel anything you want. For example, when fighting Kakashi, Itachi forces Kakashi to feel as if he is being stabbed with katanas for 72 hours in what was actually only a matter of seconds. This leaves Kakashi unconscious for several days.

Itachi's ninja level is unknown, though he was described by Asuma as an S-ranked criminal.


SOURCES:

(http://www.absoluteanime.com/naruto/itachi.htm)

(http://www.leafninja.com/biographies-U.php)


Thursday, September 10, 2009

The Blogger



Two roads diverged in a wood and I -

I took the one less traveled by,
and that has made all the difference.

-Robert Frost



♥ Saija ♥
The Blogger