Skip to main content

Antidote for insanity

Simple programming stuffs save me from insanity. This a86 assembly program tells if str1 is a palindrome.



start:
cld
mov cx, 7
lea si, str1
lea di, temp

reverse:
mov al, [si+6]
mov [di], al
inc di
dec si
loop reverse

mov ah, 09h
lea dx, temp
int 21h

cld
mov cx, 4

compare:
lea di, temp
lea si, str1
repe cmpsb
jne exit

mov ah, 09h
lea dx, yes
int 21h

exit:
mov ah, 4Ch
mov al, 00
int 21h
int 20h

str1 db 'racecar$'
yes db '',10,'string is a palindrome!$'
temp db 8 dup ('$')

[Middle-East Crisis]


Israel, known as the chosen people of God called a thousand reservists in a possible prelude to a ground offensive against Lebanon. Accordingly, they have to clean up bunkers and tunnels that are invulnerable to air attacks. Isn’t it ironic for the Mossads to be called as the chosen people of God?

Comments

Popular posts from this blog

Architecture Complexity

Here are the items to consider: Coding to an interface Service Oriented Architecture Automated Testing Domain Driven Design Custom Data Access Layer Layered architecture Complexity is relatively equal the number of lines of code. Note that complexity is not bad. It must be justified.

Importance of daily meetings

Why are daily meetings important? Yes I know what you are thinking, to check if the schedule is on target, to spot showstoppers, roadblocks and whatnots. But aside from those, there are things that make daily meetings rewarding. Let’s face it, some people (including me) find it hard oftentimes to achieve a certain level of focus at work especially when multitasking is inevitable. Meetings will remind us of our commitments infront of our peers. Since most of us will be ashamed of not making any progress, it will trigger ourselves to do something about it. In my opinion, having daily meetings typically before the shift starts will help a lot of peers suffering from bad habits - procrastination. It is one way of invigorating those who have not found their way out yet. “Keep each other in the zone, what are teammates for?”