Posts

Showing posts from August, 2010

Assembly: Tambah Nombor Genap & Dapatkan purata

Kadang-kadang aku pun konpius tapi soalan mcm ni biasa keluar: Write an assembly language program segment to add two even number N1 and N2. The average is computed and stored in a varible named AVG(Assume AVG has been declared as an 8 bit length) jawapan(aku rasa x berapa bagus): .MODEL SMALL .STACK 64 .DATA TWO db ? i dw ? count dw ? Sum dw ? AVG db ? N1 dw ? N2 dw ? .CODE main proc far MOV Sum,0 MOV TWO,2 MOV count, 0 MOV i,0 start: INC i Mov AX,i Mov N2, AX ;AX to N2 DIV TWO CMP AH, 1 ;Kalau nombor ganjil bahagi dua mesti dapat baki 1 JE start ADD BX, i ;N1 + N2 Mov N1, BX INC count ;Kira berapa kali nombor genap ditambah CMP i, 10 JGE stop JMP start stop: MOV Sum, BX Mov AX, Sum DIV count ; Bahagi jumlah dengan bilangan tambah MOV AVG, AL ; Masuk nilai purata ke dalam AVG INT 21h main endp end main Mari kita fahamkan sesama: Bila bahagi degan operasi DIV, AX akan ada dua nilai berbeza dekat

Interior Monologue

I am Nothing and God is Everything. Most of the time I am writing in the form of an 'interior monologue' or Stream-of-consciousness. It is in my logbook and diary, I do keep a yearly diary, one book per year. In which I prefer to convey my thought processes while reminiscing a particular incident. I think what I see in my own view, yet in your point of view it might be said differently. We might get mutual understanding if you're persuaded to realize a common theme is happening for instance this written word. It is my way of conveying my understanding of reality to you, the reader. Do I reach the target of making you understand? I am not concerned upon it because most might skip reading this because reading this might be a waste of time for them. If you are willing, please continue reading this then its up to you, I am very democratic about it. First, I would like to try my best to avoid the association of my perspective with absolute truth and reality. It mustn't be

Contemplating Nothing

We conceptualize nothing so the sensation was a mere creation like a new word to describe the absence. Does it constitute nothing? Does it equal to zero, yet we can go beyond the negative infinitely. Just a mere conception, a mere method of measurement. Just another method to mention this and that like the word I am typing. When we say we feel nothing, usually it constitute the unknown which in most cases physiological. We crave something and we perceive it as sustenance. All mere conception as we believe we need substitute for it. Drugs, sex and over eating were just sedative against reality. Numbing our perception which sometimes contribute illness. Nothing never belong in this physical realm as there is something which create and administer it. To ever understand nothing will be unattainable as we begin with something which is GOD almighty. I guess this can be constituted as nothing, so throw it in the dust bin. How can you throw something which doesn't exist?

Popular posts from this blog

Perihal Flag Part 1(CMP dan SUB)

Contemplating Nothing